diff --git a/css/DI/app.css b/css/DI/app.css new file mode 100644 index 000000000..ab84f87f5 --- /dev/null +++ b/css/DI/app.css @@ -0,0 +1,86 @@ +body{ + font-family: 'Montserrat', serif; + padding-top: 64px; +} + +.combodo-row{ + display: flex; +} +.combodo-row fieldset{ + flex-grow: 1; +} +.combodo-column{ + padding: 10px; +} +.combodo-field-set{ + border: #b7b7b7 dashed 1px; + padding: 10px; + border-radius: 10px; +} +.combodo-field-set-label{ + font-weight: bold; + border-bottom: 2px solid #b7b7b7; + margin-bottom: 10px; +} +.loading{ + position: relative; +} +.loading:after{ + content: 'loading...'; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background-color: #0d6efd11; + display: flex; + align-items: center; + justify-content: center; + border-radius: 10px; +} +label.required:after{ + content: ' *'; + color: red; +} +label.locked:after{ + content: "\f023"; + font-family: "Font Awesome 5 Free", serif; + font-weight: 600; + margin-left: 8px; + color: #ffcc00; + font-size: .7rem; +} +form{ + /*background-color: #f8f8f8;*/ + border-radius: 10px; + padding: 5px; +} +form.actions button,a{ + margin: 0 3px; +} +[data-block="container"]:has(.test:empty) { + display: none; +} +.z_list_list{ + display: flex; +} +body[data-bs-theme="dark"] .app_icon{ + filter: invert(1); +} +.combodo-field-set-label.is_indirect_1:after{ + content: 'indirect'; + margin-left: 5px; + font-size: .8rem; + color: #0C63E4; +} +.combodo-field-set-label.is_abstract_1:after{ + content: 'abstract'; + margin-left: 5px; + font-size: .8rem; + color: #0C63E4; +} +.dropdown_scroll_300{ + max-height: 300px; + overflow-y: auto; + overflow-x: clip; +} diff --git a/js/DI/app.js b/js/DI/app.js new file mode 100644 index 000000000..dcba71d68 --- /dev/null +++ b/js/DI/app.js @@ -0,0 +1,48 @@ +/** + * Application handling. + * + * @returns {{init: init}} + * @constructor + */ +const App = function(){ + + // dom selectors + const aSelectors = { + darkModeButton: '#dark_mode' + }; + + /** + * init. + * + */ + function init(){ + + $(aSelectors.darkModeButton).on('click', function(){ + $('body').attr('data-bs-theme', this.ariaPressed === 'true' ? 'dark' : 'light'); + }); + + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { + $('body').attr('data-bs-theme', 'dark'); + $(aSelectors.darkModeButton).attr('aria-pressed', 'true'); + $(aSelectors.darkModeButton).toggleClass('active', true); + } + + } + + return { + init + } +}; + + + + + + + + + + + + + diff --git a/js/DI/collection.js b/js/DI/collection.js new file mode 100644 index 000000000..4f9596619 --- /dev/null +++ b/js/DI/collection.js @@ -0,0 +1,158 @@ +/** + * Collections handling. + * + * @param oForm + * @param objectFormUrl + * @returns {{handleElement: handleElement}} + * @constructor + */ +const Collection = function(oForm, objectFormUrl){ + + /** + * Listen for add item buttons. + * + * @param oContainer + */ + function listenAddItem (oContainer) { + + oContainer.querySelectorAll('.add_item_link').forEach(btn => { + btn.addEventListener("click", addFormToCollection) + }); + + } + + /** + * Listen for create item buttons. + * + * @param oContainer + */ + function listenCreateItem (oContainer) { + + oContainer.querySelectorAll('.create_item_link').forEach(btn => { + btn.addEventListener("click", createObject) + }); + + } + + /** + * Listen for remove item buttons. + * + * @param oContainer + */ + function listenRemoveItem(oContainer){ + + oContainer.querySelectorAll('.btn-remove-link').forEach(btn => { + btn.addEventListener("click", (e) => { + + const oContainer = e.currentTarget.closest('.link_set_widget_container'); + + btn.closest('tr').remove() + + if(oContainer.querySelectorAll('tbody tr').length === 1) { + oContainer.querySelector('.no_data').style.display = 'table-row'; + } + }) + }); + + } + + /** + * Add form to the collection. + * + * @param e + */ + function addFormToCollection(e){ + + // retrieve link set container + const oContainer = e.currentTarget.closest('.link_set_widget_container'); + + // retrieve collection holder + const collectionHolder = oContainer.querySelector('.' + e.currentTarget.dataset.collectionHolderClass); + + // compute template + const text = collectionHolder + .dataset + .prototype + .replace( + /__name__/g, + collectionHolder.dataset.index + ); + + // create item element + const item = oToolkit.createElementFromHtml(text); + listenRemoveItem(item); + oForm.handleElement(item); + collectionHolder.appendChild(item); + + // store new index + collectionHolder.dataset.index++; + + // remove no data row + oContainer.querySelector('.no_data').style.display = 'none'; + } + + /** + * Create an iTop object. + * + * @param e + */ + function createObject(e){ + + // set modal loading state + $('#object_modal .modal-body').html('loading...'); + + // open modal + const myModalAlternative = new bootstrap.Modal('#object_modal', []); + myModalAlternative.show(); + + // compute object form url + const url = objectFormUrl + .replaceAll('object_class', e.currentTarget.dataset.objectClass) + .replaceAll('form_name', 'new'); + + // prepare request data + const aLockedAttributes = {}; + aLockedAttributes[e.currentTarget.dataset.extKeyToMe] = 0; + const aData = { + locked_attributes: aLockedAttributes + } + + // fetch url + fetch(url, { + method: 'post', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + body: JSON.stringify(aData) + }) + .then((response) => response.json()) + .then((data) => { + const oModalBody = $('#object_modal .modal-body'); + oModalBody.html(data.template); + oForm.handleElement(oModalBody[0]); + }) + .catch(function (error) { + console.error(error); + }); + } + + /** + * Handle collection on the provided container element. + * + * @param oContainer + */ + const handleElement = function(oContainer) + { + listenAddItem(oContainer); + listenCreateItem(oContainer); + listenRemoveItem(oContainer); + } + + return { + handleElement + } +}; + + + diff --git a/js/DI/form.js b/js/DI/form.js index a730843ec..c7b21d0cc 100644 --- a/js/DI/form.js +++ b/js/DI/form.js @@ -1,7 +1,21 @@ +/** + * Forms handling. + * + * @param oWidget + * @returns {{handleElement: handleElement}} + * @constructor + */ +const Form = function(oWidget){ -const DIForm = function(reload_url){ + const DEPENDS_ON_SEPARATOR = ' '; - const SELECTOR = '[data-block="container"]'; + const aSelectors = { + dataDependsOn: '[data-depends-on]', + dataHideWhen: '[data-hide-when]', + dataDisableWhen: '[data-disable-when]', + dataBlockContainer: '[data-block="container"]', + dataAttCode: '[data-att-code="{0}"]' + }; /** * hideEmptyContainers. @@ -10,22 +24,11 @@ const DIForm = function(reload_url){ * Ex: FieldSetType with no children * */ - const hideEmptyContainers = function(oElement){ - $('.combodo-field-set', oElement).each(function(e){ + function hideEmptyContainers(oElement){ + $('.combodo-field-set', oElement).each(function(){ $(this).parent().toggle($(this).children().length !== 0); }); - }; - - /** - * parseTextToHtml. - * - * @param sText - * @returns {Document} - */ - const parseTextToHtml = (sText) => { - const oParser = new DOMParser(); - return oParser.parseFromString(sText, 'text/html'); - }; + } /** * updateForm. @@ -35,7 +38,7 @@ const DIForm = function(reload_url){ * @param sMethod * @returns {Promise} */ - const updateForm = async (aData, sUrl, sMethod) => { + async function updateForm(aData, sUrl, sMethod){ const req = await fetch(sUrl, { method: sMethod, body: aData, @@ -46,7 +49,7 @@ const DIForm = function(reload_url){ }); return await req.text(); - }; + } /** * changeOptions. @@ -55,7 +58,7 @@ const DIForm = function(reload_url){ * @param sId * @returns {Promise} */ - const changeOptions = async (oEvent, sId) => { + async function changeOptions(oEvent, sId){ // retrieve field that's need to be updated const oDependentField = document.getElementById(sId); @@ -66,21 +69,28 @@ const DIForm = function(reload_url){ const oForm = oDependentField.closest('form'); // retrieve field container - const oContainer = oDependentField.closest('[data-block="container"]'); + const oContainer = oDependentField.closest(aSelectors.dataBlockContainer); // set field container loading state oContainer.classList.add('loading'); - // prepare quest data - let sRequestBody = 'object_single_attribute['+oEvent.target.dataset.attCode + ']=' + oEvent.target.value; + // prepare request body + const oFormData = new FormData(oForm); + let sRequestBody = ''; + function encode(s){ return encodeURIComponent(s).replace(/%20/g,'+'); } + for(let pair of oFormData.entries()){ + if(typeof pair[1]=='string'){ + sRequestBody += (sRequestBody?'&':'') + encode(pair[0])+'='+encode(pair[1]); + } + } sRequestBody += '&att_code=' + oDependentField.dataset.attCode; sRequestBody += '&dependency_att_code=' + oEvent.target.dataset.attCode; // update fom - const sUpdateFormResponse = await updateForm(sRequestBody, reload_url, oForm.getAttribute('method')); - const oHtml = parseTextToHtml(sUpdateFormResponse); + const sUpdateFormResponse = await updateForm(sRequestBody, oForm.dataset.reloadUrl, oForm.getAttribute('method')); + const oHtml = oToolkit.parseTextToHtml(sUpdateFormResponse); let oSingle = oHtml.getElementById('object_single_attribute'); - oContainer.innerHTML = oSingle.innerHTML; + oContainer.replaceWith(oSingle.firstChild); // remove loading state oContainer.classList.remove('loading'); @@ -92,22 +102,23 @@ const DIForm = function(reload_url){ oNewDependentField.setAttribute('data-att-code', sAttCode); // init dynamics + initDependencies(oContainer); initDynamicsInvisible(oContainer); initDynamicsDisable(oContainer); // init widgets - initWidgets(oContainer); - }; + oWidget.handleElement(oContainer); + } /** * initDependencies. * * @param oElement */ - const initDependencies = function(oElement){ + function initDependencies(oElement){ // get all dependent fields - const aDependentsFields = oElement.querySelectorAll('[data-depends-on]'); + const aDependentsFields = oElement.querySelectorAll(aSelectors.dataDependsOn); // iterate throw dependent fields... aDependentsFields.forEach(function (oDependentField) { @@ -116,13 +127,13 @@ const DIForm = function(reload_url){ const sDependsOn = oDependentField.dataset.dependsOn; // may have multiple dependencies - let aDependsEls = sDependsOn.split(' '); + let aDependsEls = sDependsOn.split(DEPENDS_ON_SEPARATOR); // iterate throw dependencies... aDependsEls.forEach(function(sEl){ // retrieve dependency - const oDependsOnElement = document.querySelector(`[id$="${sEl}"]`); + const oDependsOnElement = oElement.querySelector(`[id$="${sEl}"]`); // listen for changes if(oDependsOnElement != null){ @@ -130,17 +141,17 @@ const DIForm = function(reload_url){ } }); }); - }; + } /** * initDynamicsInvisible. * * @param oElement */ - const initDynamicsInvisible = function(oElement){ + function initDynamicsInvisible(oElement){ // get all dynamic hide fields - const aInvisibleFields = oElement.querySelectorAll('[data-hide-when]'); + const aInvisibleFields = oElement.querySelectorAll(aSelectors.dataHideWhen); // iterate throw fields... aInvisibleFields.forEach(function (oInvisibleField) { @@ -149,29 +160,29 @@ const DIForm = function(reload_url){ const aHideWhenCondition = JSON.parse(oInvisibleField.dataset.hideWhen); // retrieve condition data - const oHideWhenElement = document.querySelector(`[data-att-code="${aHideWhenCondition.att_code}"]`); + const oHideWhenElement = oElement.querySelector(String.format(aSelectors.dataAttCode, aHideWhenCondition.att_code)); // initial hidden state - oInvisibleField.closest(SELECTOR).hidden = (oHideWhenElement.value === aHideWhenCondition.value); + oInvisibleField.closest(aSelectors.dataBlockContainer).hidden = (oHideWhenElement.value === aHideWhenCondition.value); // listen for changes oHideWhenElement.addEventListener('change', (e) => { - oInvisibleField.closest(SELECTOR).hidden = (e.target.value === aHideWhenCondition.value); - oInvisibleField.closest(SELECTOR).style.visibility = (e.target.value === aHideWhenCondition.value) ? 'hidden' : ''; + oInvisibleField.closest(aSelectors.dataBlockContainer).hidden = (e.target.value === aHideWhenCondition.value); + oInvisibleField.closest(aSelectors.dataBlockContainer).style.visibility = (e.target.value === aHideWhenCondition.value) ? 'hidden' : ''; }); }); - }; + } /** * initDynamicsDisable. * * @param oElement */ - const initDynamicsDisable = function(oElement){ + function initDynamicsDisable(oElement){ // get all dynamic hide fields - const aDisabledFields = oElement.querySelectorAll('[data-disable-when]'); + const aDisabledFields = oElement.querySelectorAll(aSelectors.dataDisableWhen); // iterate throw fields... aDisabledFields.forEach(function (oDisabledField) { @@ -180,55 +191,33 @@ const DIForm = function(reload_url){ const aDisableWhenCondition = JSON.parse(oDisabledField.dataset.disableWhen); // retrieve condition data - const oDisableWhenElement = document.querySelector(`[data-att-code="${aDisableWhenCondition.att_code}"]`); + const oDisableWhenElement = oElement.querySelector(`[data-att-code="${aDisableWhenCondition.att_code}"]`); // initial disabled state - oDisabledField.closest(SELECTOR).disabled = (oDisableWhenElement.value === aDisableWhenCondition.value); + oDisabledField.closest(aSelectors.dataBlockContainer).disabled = (oDisableWhenElement.value === aDisableWhenCondition.value); // listen for changes oDisableWhenElement.addEventListener('change', (e) => { - oDisabledField.closest(SELECTOR).disabled = (e.target.value === aDisableWhenCondition.value); + oDisabledField.closest(aSelectors.dataBlockContainer).disabled = (e.target.value === aDisableWhenCondition.value); }); }); - }; - - /** - * initWidgets. - * - * @param oElement - */ - const initWidgets = function(oElement){ - - // get all widgets - const aWidgetFields = oElement.querySelectorAll('[data-widget]'); - - // iterate throw widgets... - aWidgetFields.forEach(function (widgetField) { - - // initialize widget - const sWidgetName = widgetField.dataset.widget; - const oWidget = eval(`$(widgetField).${sWidgetName}()`); - console.log('Init widget: ' + sWidgetName); - console.log(oWidget); - }); - - }; + } /** * handleElement. * * @param element */ - const handleElement = function(element){ + function handleElement(element){ hideEmptyContainers(element); initDependencies(element); - initWidgets(element); initDynamicsInvisible(element); initDynamicsDisable(element); + oWidget.handleElement(element); } return { - handleElement + handleElement, } }; diff --git a/js/DI/toolkit.js b/js/DI/toolkit.js new file mode 100644 index 000000000..638f03510 --- /dev/null +++ b/js/DI/toolkit.js @@ -0,0 +1,69 @@ +/** + * Toolkit. + * + * @returns {{init: init, parseTextToHtml: (function(*): Document), createElementFromHtml: (function(*): DocumentFragment)}} + * @constructor + */ +const Toolkit = function(){ + + function init(){ + installStringFormatFunction(); + } + + /** + * installStringFormatFunction. + * + * String formatter utility. + */ + function installStringFormatFunction(){ + if (!String.format) { + String.format = function(format) { + const args = Array.prototype.slice.call(arguments, 1); + return format.replace(/{(\d+)}/g, function(match, number) { + return typeof args[number] != 'undefined' ? args[number] : match; + }); + }; + } + } + + /** + * parseTextToHtml. + * + * @param sText + * @returns {Document} + */ + function parseTextToHtml(sText){ + const oParser = new DOMParser(); + return oParser.parseFromString(sText, 'text/html'); + } + + /** + * + * @param html + * @returns {DocumentFragment} + */ + function createElementFromHtml(html) { + const t = document.createElement('template'); + t.innerHTML = html; + return t.content; + } + + return { + init, + parseTextToHtml, + createElementFromHtml + } +}; + + + + + + + + + + + + + diff --git a/js/DI/widget.js b/js/DI/widget.js new file mode 100644 index 000000000..d463daa00 --- /dev/null +++ b/js/DI/widget.js @@ -0,0 +1,56 @@ +/** + * Widgets handling. + * + * @returns {{handleElement: handleElement}} + * @constructor + */ +const Widget = function(){ + + /** + * initWidgets. + * + * @param oElement + */ + function initWidgets(oElement){ + + // get all widgets + const aWidgetFields = oElement.querySelectorAll('[data-widget]'); + + // iterate throw widgets... + aWidgetFields.forEach(function (widgetField) { + + // initialize widget + const sWidgetName = widgetField.dataset.widget; + const oWidget = eval(`$(widgetField).${sWidgetName}()`); + console.log('Init widget: ' + sWidgetName); + console.log(oWidget); + }); + + } + + /** + * handleElement. + * + * @param element + */ + function handleElement(element){ + initWidgets(element); + } + + return { + handleElement, + } +}; + + + + + + + + + + + + + diff --git a/js/DI/text_widget.js b/js/DI/widget/text_widget.js similarity index 54% rename from js/DI/text_widget.js rename to js/DI/widget/text_widget.js index 8fc09c8c7..198e9e215 100644 --- a/js/DI/text_widget.js +++ b/js/DI/widget/text_widget.js @@ -12,7 +12,13 @@ $.widget( "itop.text_widget", // the constructor _create: function() { - CKEDITOR.replace( this.element.attr('id')); + editor = CKEDITOR.replace(this.element.attr('id'), { + language: 'fr', + uiColor: '#9ec5fe88', + toolbarStartupExpanded: true + }); + + } }); diff --git a/lib/.gitignore b/lib/.gitignore deleted file mode 100644 index aeb628c79..000000000 --- a/lib/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# Combodo's fork of TCPDF -/combodo/tcpdf/examples -/combodo/tcpdf/tools -/combodo/tcpdf/fonts/** -!/combodo/tcpdf/fonts/courier* -!/combodo/tcpdf/fonts/dejavusans* -!/combodo/tcpdf/fonts/droidsansfallback* -!/combodo/tcpdf/fonts/helvetica* -!/combodo/tcpdf/fonts/symbol.php -!/combodo/tcpdf/fonts/times* -!/combodo/tcpdf/fonts/zapfdingbats.php - -# ArchiveTar -/pear/archive_tar/docs -/pear/archive_tar/scripts -/pear/archive_tar/sync-php4 - -# Emogrifier -/pelago/emogrifier/.github -/pelago/emogrifier/tests - -# SCSSPHP -/scssphp/scssphp/example - -# SwiftMailer -/swiftmailer/swiftmailer/.github -/swiftmailer/swiftmailer/doc -/swiftmailer/swiftmailer/tests - -# TWIG -/twig/twig/doc -/twig/twig/test -/twig/twig/drupal_test.sh diff --git a/lib/.htaccess b/lib/.htaccess deleted file mode 100644 index 1e558f452..000000000 --- a/lib/.htaccess +++ /dev/null @@ -1,24 +0,0 @@ -# Allow only static resources files -# - HTML not allowed as there could be some test pages calling server scripts or executing JS scripts -# - PHP not allowed as they should not be publicly accessible - -# Apache 2.4 - -Require all denied - - Require all granted - - - -# Apache 2.2 - -deny from all -Satisfy All - - Order Allow,Deny - Allow from all - - - -# Apache 2.2 and 2.4 -IndexIgnore * diff --git a/lib/apereo/phpcas/.codecov.yml b/lib/apereo/phpcas/.codecov.yml deleted file mode 100644 index ddfdd0eff..000000000 --- a/lib/apereo/phpcas/.codecov.yml +++ /dev/null @@ -1,17 +0,0 @@ -codecov: - strict_yaml_branch: master - -coverage: - round: up - precision: 2 - status: - project: - default: - target: "70%" - informational: true - patch: # temporarily disabled - default: - target: "70%" - informational: true - -comment: false diff --git a/lib/apereo/phpcas/.gitattributes b/lib/apereo/phpcas/.gitattributes deleted file mode 100644 index 3e28f4e42..000000000 --- a/lib/apereo/phpcas/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -/docs/ export-ignore -/test/ export-ignore -/utils/ export-ignore -/.buildpath export-ignore -/.gitignore export-ignore -/.project export-ignore -/.travis.yml export-ignore diff --git a/lib/apereo/phpcas/.github/dependabot.yml b/lib/apereo/phpcas/.github/dependabot.yml deleted file mode 100644 index c630ffa6b..000000000 --- a/lib/apereo/phpcas/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: -- package-ecosystem: composer - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 diff --git a/lib/apereo/phpcas/.github/workflows/test.yml b/lib/apereo/phpcas/.github/workflows/test.yml deleted file mode 100644 index 081e334d6..000000000 --- a/lib/apereo/phpcas/.github/workflows/test.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Test - -on: - - push - - pull_request - -jobs: - test: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - php-version: - - php: '7.2' - phpunit: '8' - - php: '7.3' - phpunit: latest - - php: '7.4' - phpunit: latest - - php: '8.0' - phpunit: latest - - php: '8.1' - phpunit: latest - steps: - - uses: actions/checkout@v2 - - uses: php-actions/composer@v6 - with: - php_version: "${{ matrix.php-version.php }}" - - name: Run PHPUnit - uses: php-actions/phpunit@v3 - with: - version: "${{ matrix.php-version.phpunit }}" - php_version: "${{ matrix.php-version.php }}" - php_extensions: xdebug - args: --verbose --coverage-clover=coverage.xml - bootstrap: vendor/autoload.php - env: - XDEBUG_MODE: coverage - - name: Report coverage - uses: codecov/codecov-action@v1 - with: - files: coverage.xml diff --git a/lib/apereo/phpcas/CAS.php b/lib/apereo/phpcas/CAS.php deleted file mode 100644 index 6ddcf07bc..000000000 --- a/lib/apereo/phpcas/CAS.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -require_once __DIR__.'/source/CAS.php'; - -trigger_error('Including CAS.php is deprecated. Install phpCAS using composer instead.', E_USER_DEPRECATED); diff --git a/lib/apereo/phpcas/LICENSE b/lib/apereo/phpcas/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/lib/apereo/phpcas/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/lib/apereo/phpcas/NOTICE b/lib/apereo/phpcas/NOTICE deleted file mode 100644 index 70d9ffcd4..000000000 --- a/lib/apereo/phpcas/NOTICE +++ /dev/null @@ -1,81 +0,0 @@ -Copyright 2007-2011, JA-SIG, Inc. -This project includes software developed by Jasig. -http://www.jasig.org/ - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this software except in compliance with the License. -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -=========================================================================== - -Copyright © 2003-2007, The ESUP-Portail consortium - -Requirements for sources originally licensed under the New BSD License: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -- Neither the name of JA-SIG, Inc. nor the names of its contributors may be -used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -=========================================================================== - -Copyright (c) 2009, Regents of the University of Nebraska -All rights reserved. - -Requirements for CAS_Autloader originally licensed under the New BSD License: - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -Neither the name of the University of Nebraska nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/apereo/phpcas/README.md b/lib/apereo/phpcas/README.md deleted file mode 100644 index d48128912..000000000 --- a/lib/apereo/phpcas/README.md +++ /dev/null @@ -1,35 +0,0 @@ -phpCAS -======= - -phpCAS is an authentication library that allows PHP applications to easily authenticate -users via a Central Authentication Service (CAS) server. - -Please see the wiki website for more information: - -https://apereo.github.io/phpCAS/ - -Api documentation can be found here: - -https://apereo.github.io/phpCAS/api/ - - -[![Test](https://github.com/apereo/phpCAS/actions/workflows/test.yml/badge.svg)](https://github.com/apereo/phpCAS/actions/workflows/test.yml) - -LICENSE -------- - -Copyright 2007-2020, Apereo Foundation. -This project includes software developed by Apereo Foundation. -http://www.apereo.org/ - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this software except in compliance with the License. -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/lib/apereo/phpcas/composer.json b/lib/apereo/phpcas/composer.json deleted file mode 100644 index 89ab7b9f6..000000000 --- a/lib/apereo/phpcas/composer.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name" : "apereo/phpcas", - "description" : "Provides a simple API for authenticating users against a CAS server", - "keywords" : [ - "cas", - "jasig", - "apereo" - ], - "homepage" : "https://wiki.jasig.org/display/CASC/phpCAS", - "type" : "library", - "license" : "Apache-2.0", - "authors" : [{ - "name" : "Joachim Fritschi", - "homepage" : "https://github.com/jfritschi", - "email" : "jfritschi@freenet.de" - }, { - "name" : "Adam Franco", - "homepage" : "https://github.com/adamfranco" - }, { - "name" : "Henry Pan", - "homepage" : "https://github.com/phy25" - } - ], - "require" : { - "php" : ">=7.1.0", - "ext-curl" : "*", - "ext-dom" : "*", - "psr/log" : "^1.0 || ^2.0 || ^3.0" - }, - "require-dev" : { - "monolog/monolog" : "^1.0.0 || ^2.0.0", - "phpunit/phpunit" : ">=7.5", - "phpstan/phpstan" : "^1.5" - }, - "autoload" : { - "classmap" : [ - "source/" - ] - }, - "autoload-dev" : { - "files": ["source/CAS.php"], - "psr-4" : { - "PhpCas\\" : "test/CAS/" - } - }, - "scripts" : { - "test" : "phpunit", - "phpstan" : "phpstan" - }, - "extra" : { - "branch-alias" : { - "dev-master" : "1.3.x-dev" - } - } -} diff --git a/lib/apereo/phpcas/phpunit.xml.dist b/lib/apereo/phpcas/phpunit.xml.dist deleted file mode 100644 index f0431f153..000000000 --- a/lib/apereo/phpcas/phpunit.xml.dist +++ /dev/null @@ -1,13 +0,0 @@ - - - - - source/ - - - - - test/CAS/Tests/ - - - diff --git a/lib/apereo/phpcas/source/CAS.php b/lib/apereo/phpcas/source/CAS.php deleted file mode 100644 index 8243a83e3..000000000 --- a/lib/apereo/phpcas/source/CAS.php +++ /dev/null @@ -1,2083 +0,0 @@ - - * @author Olivier Berger - * @author Brett Bieber - * @author Joachim Fritschi - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * @ingroup public - */ - -use Psr\Log\LoggerInterface; - -// -// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] -// in IIS -// -if (!isset($_SERVER['REQUEST_URI']) && isset($_SERVER['SCRIPT_NAME']) && isset($_SERVER['QUERY_STRING'])) { - $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']; -} - - -// ######################################################################## -// CONSTANTS -// ######################################################################## - -// ------------------------------------------------------------------------ -// CAS VERSIONS -// ------------------------------------------------------------------------ - -/** - * phpCAS version. accessible for the user by phpCAS::getVersion(). - */ -define('PHPCAS_VERSION', '1.6.0'); - -/** - * @addtogroup public - * @{ - */ - -/** - * phpCAS supported protocols. accessible for the user by phpCAS::getSupportedProtocols(). - */ - -/** - * CAS version 1.0 - */ -define("CAS_VERSION_1_0", '1.0'); -/*! - * CAS version 2.0 -*/ -define("CAS_VERSION_2_0", '2.0'); -/** - * CAS version 3.0 - */ -define("CAS_VERSION_3_0", '3.0'); - -// ------------------------------------------------------------------------ -// SAML defines -// ------------------------------------------------------------------------ - -/** - * SAML protocol - */ -define("SAML_VERSION_1_1", 'S1'); - -/** - * XML header for SAML POST - */ -define("SAML_XML_HEADER", ''); - -/** - * SOAP envelope for SAML POST - */ -define("SAML_SOAP_ENV", ''); - -/** - * SOAP body for SAML POST - */ -define("SAML_SOAP_BODY", ''); - -/** - * SAMLP request - */ -define("SAMLP_REQUEST", ''); -define("SAMLP_REQUEST_CLOSE", ''); - -/** - * SAMLP artifact tag (for the ticket) - */ -define("SAML_ASSERTION_ARTIFACT", ''); - -/** - * SAMLP close - */ -define("SAML_ASSERTION_ARTIFACT_CLOSE", ''); - -/** - * SOAP body close - */ -define("SAML_SOAP_BODY_CLOSE", ''); - -/** - * SOAP envelope close - */ -define("SAML_SOAP_ENV_CLOSE", ''); - -/** - * SAML Attributes - */ -define("SAML_ATTRIBUTES", 'SAMLATTRIBS'); - -/** @} */ -/** - * @addtogroup publicPGTStorage - * @{ - */ -// ------------------------------------------------------------------------ -// FILE PGT STORAGE -// ------------------------------------------------------------------------ -/** - * Default path used when storing PGT's to file - */ -define("CAS_PGT_STORAGE_FILE_DEFAULT_PATH", session_save_path()); -/** @} */ -// ------------------------------------------------------------------------ -// SERVICE ACCESS ERRORS -// ------------------------------------------------------------------------ -/** - * @addtogroup publicServices - * @{ - */ - -/** - * phpCAS::service() error code on success - */ -define("PHPCAS_SERVICE_OK", 0); -/** - * phpCAS::service() error code when the PT could not retrieve because - * the CAS server did not respond. - */ -define("PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE", 1); -/** - * phpCAS::service() error code when the PT could not retrieve because - * the response of the CAS server was ill-formed. - */ -define("PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE", 2); -/** - * phpCAS::service() error code when the PT could not retrieve because - * the CAS server did not want to. - */ -define("PHPCAS_SERVICE_PT_FAILURE", 3); -/** - * phpCAS::service() error code when the service was not available. - */ -define("PHPCAS_SERVICE_NOT_AVAILABLE", 4); - -// ------------------------------------------------------------------------ -// SERVICE TYPES -// ------------------------------------------------------------------------ -/** - * phpCAS::getProxiedService() type for HTTP GET - */ -define("PHPCAS_PROXIED_SERVICE_HTTP_GET", 'CAS_ProxiedService_Http_Get'); -/** - * phpCAS::getProxiedService() type for HTTP POST - */ -define("PHPCAS_PROXIED_SERVICE_HTTP_POST", 'CAS_ProxiedService_Http_Post'); -/** - * phpCAS::getProxiedService() type for IMAP - */ -define("PHPCAS_PROXIED_SERVICE_IMAP", 'CAS_ProxiedService_Imap'); - - -/** @} */ -// ------------------------------------------------------------------------ -// LANGUAGES -// ------------------------------------------------------------------------ -/** - * @addtogroup publicLang - * @{ - */ - -define("PHPCAS_LANG_ENGLISH", 'CAS_Languages_English'); -define("PHPCAS_LANG_FRENCH", 'CAS_Languages_French'); -define("PHPCAS_LANG_GREEK", 'CAS_Languages_Greek'); -define("PHPCAS_LANG_GERMAN", 'CAS_Languages_German'); -define("PHPCAS_LANG_JAPANESE", 'CAS_Languages_Japanese'); -define("PHPCAS_LANG_SPANISH", 'CAS_Languages_Spanish'); -define("PHPCAS_LANG_CATALAN", 'CAS_Languages_Catalan'); -define("PHPCAS_LANG_CHINESE_SIMPLIFIED", 'CAS_Languages_ChineseSimplified'); -define("PHPCAS_LANG_GALEGO", 'CAS_Languages_Galego'); -define("PHPCAS_LANG_PORTUGUESE", 'CAS_Languages_Portuguese'); - -/** @} */ - -/** - * @addtogroup internalLang - * @{ - */ - -/** - * phpCAS default language (when phpCAS::setLang() is not used) - */ -define("PHPCAS_LANG_DEFAULT", PHPCAS_LANG_ENGLISH); - -/** @} */ -// ------------------------------------------------------------------------ -// DEBUG -// ------------------------------------------------------------------------ -/** - * @addtogroup publicDebug - * @{ - */ - -/** - * The default directory for the debug file under Unix. - * @return string directory for the debug file - */ -function gettmpdir() { -if (!empty($_ENV['TMP'])) { return realpath($_ENV['TMP']); } -if (!empty($_ENV['TMPDIR'])) { return realpath( $_ENV['TMPDIR']); } -if (!empty($_ENV['TEMP'])) { return realpath( $_ENV['TEMP']); } -return "/tmp"; -} -define('DEFAULT_DEBUG_DIR', gettmpdir()."/"); - -/** @} */ - -// include the class autoloader -require_once __DIR__ . '/CAS/Autoload.php'; - -/** - * The phpCAS class is a simple container for the phpCAS library. It provides CAS - * authentication for web applications written in PHP. - * - * @ingroup public - * @class phpCAS - * @category Authentication - * @package PhpCAS - * @author Pascal Aubry - * @author Olivier Berger - * @author Brett Bieber - * @author Joachim Fritschi - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -class phpCAS -{ - - /** - * This variable is used by the interface class phpCAS. - * - * @var CAS_Client - * @hideinitializer - */ - private static $_PHPCAS_CLIENT; - - /** - * @var array - * This variable is used to store where the initializer is called from - * (to print a comprehensive error in case of multiple calls). - * - * @hideinitializer - */ - private static $_PHPCAS_INIT_CALL; - - /** - * @var array - * This variable is used to store phpCAS debug mode. - * - * @hideinitializer - */ - private static $_PHPCAS_DEBUG; - - /** - * This variable is used to enable verbose mode - * This pevents debug info to be show to the user. Since it's a security - * feature the default is false - * - * @hideinitializer - */ - private static $_PHPCAS_VERBOSE = false; - - - // ######################################################################## - // INITIALIZATION - // ######################################################################## - - /** - * @addtogroup publicInit - * @{ - */ - - /** - * phpCAS client initializer. - * - * @param string $server_version the version of the CAS server - * @param string $server_hostname the hostname of the CAS server - * @param int $server_port the port the CAS server is running on - * @param string $server_uri the URI the CAS server is responding on - * @param string|string[]|CAS_ServiceBaseUrl_Interface - * $service_base_url the base URL (protocol, host and the - * optional port) of the CAS client; pass - * in an array to use auto discovery with - * an allowlist; pass in - * CAS_ServiceBaseUrl_Interface for custom - * behavior. Added in 1.6.0. Similar to - * serverName config in other CAS clients. - * @param bool $changeSessionID Allow phpCAS to change the session_id - * (Single Sign Out/handleLogoutRequests - * is based on that change) - * @param \SessionHandlerInterface $sessionHandler the session handler - * - * @return void a newly created CAS_Client object - * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be - * called, only once, and before all other methods (except phpCAS::getVersion() - * and phpCAS::setDebug()). - */ - public static function client($server_version, $server_hostname, - $server_port, $server_uri, $service_base_url, - $changeSessionID = true, \SessionHandlerInterface $sessionHandler = null - ) { - phpCAS :: traceBegin(); - if (is_object(self::$_PHPCAS_CLIENT)) { - phpCAS :: error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')'); - } - - // store where the initializer is called from - $dbg = debug_backtrace(); - self::$_PHPCAS_INIT_CALL = array ( - 'done' => true, - 'file' => $dbg[0]['file'], - 'line' => $dbg[0]['line'], - 'method' => __CLASS__ . '::' . __FUNCTION__ - ); - - // initialize the object $_PHPCAS_CLIENT - try { - self::$_PHPCAS_CLIENT = new CAS_Client( - $server_version, false, $server_hostname, $server_port, $server_uri, $service_base_url, - $changeSessionID, $sessionHandler - ); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - phpCAS :: traceEnd(); - } - - /** - * phpCAS proxy initializer. - * - * @param string $server_version the version of the CAS server - * @param string $server_hostname the hostname of the CAS server - * @param string $server_port the port the CAS server is running on - * @param string $server_uri the URI the CAS server is responding on - * @param string|string[]|CAS_ServiceBaseUrl_Interface - * $service_base_url the base URL (protocol, host and the - * optional port) of the CAS client; pass - * in an array to use auto discovery with - * an allowlist; pass in - * CAS_ServiceBaseUrl_Interface for custom - * behavior. Added in 1.6.0. Similar to - * serverName config in other CAS clients. - * @param bool $changeSessionID Allow phpCAS to change the session_id - * (Single Sign Out/handleLogoutRequests - * is based on that change) - * @param \SessionHandlerInterface $sessionHandler the session handler - * - * @return void a newly created CAS_Client object - * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be - * called, only once, and before all other methods (except phpCAS::getVersion() - * and phpCAS::setDebug()). - */ - public static function proxy($server_version, $server_hostname, - $server_port, $server_uri, $service_base_url, - $changeSessionID = true, \SessionHandlerInterface $sessionHandler = null - ) { - phpCAS :: traceBegin(); - if (is_object(self::$_PHPCAS_CLIENT)) { - phpCAS :: error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')'); - } - - // store where the initialzer is called from - $dbg = debug_backtrace(); - self::$_PHPCAS_INIT_CALL = array ( - 'done' => true, - 'file' => $dbg[0]['file'], - 'line' => $dbg[0]['line'], - 'method' => __CLASS__ . '::' . __FUNCTION__ - ); - - // initialize the object $_PHPCAS_CLIENT - try { - self::$_PHPCAS_CLIENT = new CAS_Client( - $server_version, true, $server_hostname, $server_port, $server_uri, $service_base_url, - $changeSessionID, $sessionHandler - ); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - phpCAS :: traceEnd(); - } - - /** - * Answer whether or not the client or proxy has been initialized - * - * @return bool - */ - public static function isInitialized () - { - return (is_object(self::$_PHPCAS_CLIENT)); - } - - /** @} */ - // ######################################################################## - // DEBUGGING - // ######################################################################## - - /** - * @addtogroup publicDebug - * @{ - */ - - /** - * Set/unset PSR-3 logger - * - * @param LoggerInterface $logger the PSR-3 logger used for logging, or - * null to stop logging. - * - * @return void - */ - public static function setLogger($logger = null) - { - if (empty(self::$_PHPCAS_DEBUG['unique_id'])) { - self::$_PHPCAS_DEBUG['unique_id'] = substr(strtoupper(md5(uniqid(''))), 0, 4); - } - self::$_PHPCAS_DEBUG['logger'] = $logger; - self::$_PHPCAS_DEBUG['indent'] = 0; - phpCAS :: trace('START ('.date("Y-m-d H:i:s").') phpCAS-' . PHPCAS_VERSION . ' ******************'); - } - - /** - * Set/unset debug mode - * - * @param string $filename the name of the file used for logging, or false - * to stop debugging. - * - * @return void - * - * @deprecated - */ - public static function setDebug($filename = '') - { - trigger_error('phpCAS::setDebug() is deprecated in favor of phpCAS::setLogger().', E_USER_DEPRECATED); - - if ($filename != false && gettype($filename) != 'string') { - phpCAS :: error('type mismatched for parameter $dbg (should be false or the name of the log file)'); - } - if ($filename === false) { - self::$_PHPCAS_DEBUG['filename'] = false; - - } else { - if (empty ($filename)) { - if (preg_match('/^Win.*/', getenv('OS'))) { - if (isset ($_ENV['TMP'])) { - $debugDir = $_ENV['TMP'] . '/'; - } else { - $debugDir = ''; - } - } else { - $debugDir = DEFAULT_DEBUG_DIR; - } - $filename = $debugDir . 'phpCAS.log'; - } - - if (empty (self::$_PHPCAS_DEBUG['unique_id'])) { - self::$_PHPCAS_DEBUG['unique_id'] = substr(strtoupper(md5(uniqid(''))), 0, 4); - } - - self::$_PHPCAS_DEBUG['filename'] = $filename; - self::$_PHPCAS_DEBUG['indent'] = 0; - - phpCAS :: trace('START ('.date("Y-m-d H:i:s").') phpCAS-' . PHPCAS_VERSION . ' ******************'); - } - } - - /** - * Enable verbose errors messages in the website output - * This is a security relevant since internal status info may leak an may - * help an attacker. Default is therefore false - * - * @param bool $verbose enable verbose output - * - * @return void - */ - public static function setVerbose($verbose) - { - if ($verbose === true) { - self::$_PHPCAS_VERBOSE = true; - } else { - self::$_PHPCAS_VERBOSE = false; - } - } - - - /** - * Show is verbose mode is on - * - * @return bool verbose - */ - public static function getVerbose() - { - return self::$_PHPCAS_VERBOSE; - } - - /** - * Logs a string in debug mode. - * - * @param string $str the string to write - * - * @return void - * @private - */ - public static function log($str) - { - $indent_str = "."; - - - if (isset(self::$_PHPCAS_DEBUG['logger']) || !empty(self::$_PHPCAS_DEBUG['filename'])) { - for ($i = 0; $i < self::$_PHPCAS_DEBUG['indent']; $i++) { - - $indent_str .= '| '; - } - // allow for multiline output with proper identing. Usefull for - // dumping cas answers etc. - $str2 = str_replace("\n", "\n" . self::$_PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str, $str); - $str3 = self::$_PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str . $str2; - if (isset(self::$_PHPCAS_DEBUG['logger'])) { - self::$_PHPCAS_DEBUG['logger']->info($str3); - } - if (!empty(self::$_PHPCAS_DEBUG['filename'])) { - // Check if file exists and modifiy file permissions to be only - // readable by the webserver - if (!file_exists(self::$_PHPCAS_DEBUG['filename'])) { - touch(self::$_PHPCAS_DEBUG['filename']); - // Chmod will fail on windows - @chmod(self::$_PHPCAS_DEBUG['filename'], 0600); - } - error_log($str3 . "\n", 3, self::$_PHPCAS_DEBUG['filename']); - } - } - - } - - /** - * This method is used by interface methods to print an error and where the - * function was originally called from. - * - * @param string $msg the message to print - * - * @return void - * @private - */ - public static function error($msg) - { - phpCAS :: traceBegin(); - $dbg = debug_backtrace(); - $function = '?'; - $file = '?'; - $line = '?'; - if (is_array($dbg)) { - for ($i = 1; $i < sizeof($dbg); $i++) { - if (is_array($dbg[$i]) && isset($dbg[$i]['class']) ) { - if ($dbg[$i]['class'] == __CLASS__) { - $function = $dbg[$i]['function']; - $file = $dbg[$i]['file']; - $line = $dbg[$i]['line']; - } - } - } - } - if (self::$_PHPCAS_VERBOSE) { - echo "
\nphpCAS error: " . __CLASS__ . "::" . $function . '(): ' . htmlentities($msg) . " in " . $file . " on line " . $line . "
\n"; - } - phpCAS :: trace($msg . ' in ' . $file . 'on line ' . $line ); - phpCAS :: traceEnd(); - - throw new CAS_GracefullTerminationException(__CLASS__ . "::" . $function . '(): ' . $msg); - } - - /** - * This method is used to log something in debug mode. - * - * @param string $str string to log - * - * @return void - */ - public static function trace($str) - { - $dbg = debug_backtrace(); - phpCAS :: log($str . ' [' . basename($dbg[0]['file']) . ':' . $dbg[0]['line'] . ']'); - } - - /** - * This method is used to indicate the start of the execution of a function - * in debug mode. - * - * @return void - */ - public static function traceBegin() - { - $dbg = debug_backtrace(); - $str = '=> '; - if (!empty ($dbg[1]['class'])) { - $str .= $dbg[1]['class'] . '::'; - } - $str .= $dbg[1]['function'] . '('; - if (is_array($dbg[1]['args'])) { - foreach ($dbg[1]['args'] as $index => $arg) { - if ($index != 0) { - $str .= ', '; - } - if (is_object($arg)) { - $str .= get_class($arg); - } else { - $str .= str_replace(array("\r\n", "\n", "\r"), "", var_export($arg, true)); - } - } - } - if (isset($dbg[1]['file'])) { - $file = basename($dbg[1]['file']); - } else { - $file = 'unknown_file'; - } - if (isset($dbg[1]['line'])) { - $line = $dbg[1]['line']; - } else { - $line = 'unknown_line'; - } - $str .= ') [' . $file . ':' . $line . ']'; - phpCAS :: log($str); - if (!isset(self::$_PHPCAS_DEBUG['indent'])) { - self::$_PHPCAS_DEBUG['indent'] = 0; - } else { - self::$_PHPCAS_DEBUG['indent']++; - } - } - - /** - * This method is used to indicate the end of the execution of a function in - * debug mode. - * - * @param mixed $res the result of the function - * - * @return void - */ - public static function traceEnd($res = '') - { - if (empty(self::$_PHPCAS_DEBUG['indent'])) { - self::$_PHPCAS_DEBUG['indent'] = 0; - } else { - self::$_PHPCAS_DEBUG['indent']--; - } - $str = ''; - if (is_object($res)) { - $str .= '<= ' . get_class($res); - } else { - $str .= '<= ' . str_replace(array("\r\n", "\n", "\r"), "", var_export($res, true)); - } - - phpCAS :: log($str); - } - - /** - * This method is used to indicate the end of the execution of the program - * - * @return void - */ - public static function traceExit() - { - phpCAS :: log('exit()'); - while (self::$_PHPCAS_DEBUG['indent'] > 0) { - phpCAS :: log('-'); - self::$_PHPCAS_DEBUG['indent']--; - } - } - - /** @} */ - // ######################################################################## - // INTERNATIONALIZATION - // ######################################################################## - /** - * @addtogroup publicLang - * @{ - */ - - /** - * This method is used to set the language used by phpCAS. - * - * @param string $lang string representing the language. - * - * @return void - * - * @sa PHPCAS_LANG_FRENCH, PHPCAS_LANG_ENGLISH - * @note Can be called only once. - */ - public static function setLang($lang) - { - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setLang($lang); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** @} */ - // ######################################################################## - // VERSION - // ######################################################################## - /** - * @addtogroup public - * @{ - */ - - /** - * This method returns the phpCAS version. - * - * @return string the phpCAS version. - */ - public static function getVersion() - { - return PHPCAS_VERSION; - } - - /** - * This method returns supported protocols. - * - * @return array an array of all supported protocols. Use internal protocol name as array key. - */ - public static function getSupportedProtocols() - { - $supportedProtocols = array(); - $supportedProtocols[CAS_VERSION_1_0] = 'CAS 1.0'; - $supportedProtocols[CAS_VERSION_2_0] = 'CAS 2.0'; - $supportedProtocols[CAS_VERSION_3_0] = 'CAS 3.0'; - $supportedProtocols[SAML_VERSION_1_1] = 'SAML 1.1'; - - return $supportedProtocols; - } - - /** @} */ - // ######################################################################## - // HTML OUTPUT - // ######################################################################## - /** - * @addtogroup publicOutput - * @{ - */ - - /** - * This method sets the HTML header used for all outputs. - * - * @param string $header the HTML header. - * - * @return void - */ - public static function setHTMLHeader($header) - { - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setHTMLHeader($header); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * This method sets the HTML footer used for all outputs. - * - * @param string $footer the HTML footer. - * - * @return void - */ - public static function setHTMLFooter($footer) - { - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setHTMLFooter($footer); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** @} */ - // ######################################################################## - // PGT STORAGE - // ######################################################################## - /** - * @addtogroup publicPGTStorage - * @{ - */ - - /** - * This method can be used to set a custom PGT storage object. - * - * @param CAS_PGTStorage_AbstractStorage $storage a PGT storage object that inherits from the - * CAS_PGTStorage_AbstractStorage class - * - * @return void - */ - public static function setPGTStorage($storage) - { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - self::$_PHPCAS_CLIENT->setPGTStorage($storage); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - phpCAS :: traceEnd(); - } - - /** - * This method is used to tell phpCAS to store the response of the - * CAS server to PGT requests in a database. - * - * @param string $dsn_or_pdo a dsn string to use for creating a PDO - * object or a PDO object - * @param string $username the username to use when connecting to the - * database - * @param string $password the password to use when connecting to the - * database - * @param string $table the table to use for storing and retrieving - * PGT's - * @param string $driver_options any driver options to use when connecting - * to the database - * - * @return void - */ - public static function setPGTStorageDb($dsn_or_pdo, $username='', - $password='', $table='', $driver_options=null - ) { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - self::$_PHPCAS_CLIENT->setPGTStorageDb($dsn_or_pdo, $username, $password, $table, $driver_options); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - phpCAS :: traceEnd(); - } - - /** - * This method is used to tell phpCAS to store the response of the - * CAS server to PGT requests onto the filesystem. - * - * @param string $path the path where the PGT's should be stored - * - * @return void - */ - public static function setPGTStorageFile($path = '') - { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - self::$_PHPCAS_CLIENT->setPGTStorageFile($path); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - phpCAS :: traceEnd(); - } - /** @} */ - // ######################################################################## - // ACCESS TO EXTERNAL SERVICES - // ######################################################################## - /** - * @addtogroup publicServices - * @{ - */ - - /** - * Answer a proxy-authenticated service handler. - * - * @param string $type The service type. One of - * PHPCAS_PROXIED_SERVICE_HTTP_GET; PHPCAS_PROXIED_SERVICE_HTTP_POST; - * PHPCAS_PROXIED_SERVICE_IMAP - * - * @return CAS_ProxiedService - * @throws InvalidArgumentException If the service type is unknown. - */ - public static function getProxiedService ($type) - { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - $res = self::$_PHPCAS_CLIENT->getProxiedService($type); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - return $res; - } - - /** - * Initialize a proxied-service handler with the proxy-ticket it should use. - * - * @param CAS_ProxiedService $proxiedService Proxied Service Handler - * - * @return void - * @throws CAS_ProxyTicketException If there is a proxy-ticket failure. - * The code of the Exception will be one of: - * PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_FAILURE - */ - public static function initializeProxiedService (CAS_ProxiedService $proxiedService) - { - phpCAS::_validateProxyExists(); - - try { - self::$_PHPCAS_CLIENT->initializeProxiedService($proxiedService); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * This method is used to access an HTTP[S] service. - * - * @param string $url the service to access. - * @param int &$err_code an error code Possible values are - * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, - * PHPCAS_SERVICE_NOT_AVAILABLE. - * @param string &$output the output of the service (also used to give an - * error message on failure). - * - * @return bool true on success, false otherwise (in this later case, - * $err_code gives the reason why it failed and $output contains an error - * message). - */ - public static function serviceWeb($url, & $err_code, & $output) - { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - $res = self::$_PHPCAS_CLIENT->serviceWeb($url, $err_code, $output); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd($res); - return $res; - } - - /** - * This method is used to access an IMAP/POP3/NNTP service. - * - * @param string $url a string giving the URL of the service, - * including the mailing box for IMAP URLs, as accepted by imap_open(). - * @param string $service a string giving for CAS retrieve Proxy ticket - * @param string $flags options given to imap_open(). - * @param int &$err_code an error code Possible values are - * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, - * PHPCAS_SERVICE_NOT_AVAILABLE. - * @param string &$err_msg an error message on failure - * @param string &$pt the Proxy Ticket (PT) retrieved from the CAS - * server to access the URL on success, false on error). - * - * @return object|false IMAP stream on success, false otherwise (in this later - * case, $err_code gives the reason why it failed and $err_msg contains an - * error message). - */ - public static function serviceMail($url, $service, $flags, & $err_code, & $err_msg, & $pt) - { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - $res = self::$_PHPCAS_CLIENT->serviceMail($url, $service, $flags, $err_code, $err_msg, $pt); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd($res); - return $res; - } - - /** @} */ - // ######################################################################## - // AUTHENTICATION - // ######################################################################## - /** - * @addtogroup publicAuth - * @{ - */ - - /** - * Set the times authentication will be cached before really accessing the - * CAS server in gateway mode: - * - -1: check only once, and then never again (until you pree login) - * - 0: always check - * - n: check every "n" time - * - * @param int $n an integer. - * - * @return void - */ - public static function setCacheTimesForAuthRecheck($n) - { - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setCacheTimesForAuthRecheck($n); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - - /** - * Set a callback function to be run when receiving CAS attributes - * - * The callback function will be passed an $success_elements - * payload of the response (\DOMElement) as its first parameter. - * - * @param string $function Callback function - * @param array $additionalArgs optional array of arguments - * - * @return void - */ - public static function setCasAttributeParserCallback($function, array $additionalArgs = array()) - { - phpCAS::_validateClientExists(); - - self::$_PHPCAS_CLIENT->setCasAttributeParserCallback($function, $additionalArgs); - } - - /** - * Set a callback function to be run when a user authenticates. - * - * The callback function will be passed a $logoutTicket as its first - * parameter, followed by any $additionalArgs you pass. The $logoutTicket - * parameter is an opaque string that can be used to map the session-id to - * logout request in order to support single-signout in applications that - * manage their own sessions (rather than letting phpCAS start the session). - * - * phpCAS::forceAuthentication() will always exit and forward client unless - * they are already authenticated. To perform an action at the moment the user - * logs in (such as registering an account, performing logging, etc), register - * a callback function here. - * - * @param callable $function Callback function - * @param array $additionalArgs optional array of arguments - * - * @return void - */ - public static function setPostAuthenticateCallback ($function, array $additionalArgs = array()) - { - phpCAS::_validateClientExists(); - - self::$_PHPCAS_CLIENT->setPostAuthenticateCallback($function, $additionalArgs); - } - - /** - * Set a callback function to be run when a single-signout request is - * received. The callback function will be passed a $logoutTicket as its - * first parameter, followed by any $additionalArgs you pass. The - * $logoutTicket parameter is an opaque string that can be used to map a - * session-id to the logout request in order to support single-signout in - * applications that manage their own sessions (rather than letting phpCAS - * start and destroy the session). - * - * @param callable $function Callback function - * @param array $additionalArgs optional array of arguments - * - * @return void - */ - public static function setSingleSignoutCallback ($function, array $additionalArgs = array()) - { - phpCAS::_validateClientExists(); - - self::$_PHPCAS_CLIENT->setSingleSignoutCallback($function, $additionalArgs); - } - - /** - * This method is called to check if the user is already authenticated - * locally or has a global cas session. A already existing cas session is - * determined by a cas gateway call.(cas login call without any interactive - * prompt) - * - * @return bool true when the user is authenticated, false when a previous - * gateway login failed or the function will not return if the user is - * redirected to the cas server for a gateway login attempt - */ - public static function checkAuthentication() - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - $auth = self::$_PHPCAS_CLIENT->checkAuthentication(); - - // store where the authentication has been checked and the result - self::$_PHPCAS_CLIENT->markAuthenticationCall($auth); - - phpCAS :: traceEnd($auth); - return $auth; - } - - /** - * This method is called to force authentication if the user was not already - * authenticated. If the user is not authenticated, halt by redirecting to - * the CAS server. - * - * @return bool Authentication - */ - public static function forceAuthentication() - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - $auth = self::$_PHPCAS_CLIENT->forceAuthentication(); - - // store where the authentication has been checked and the result - self::$_PHPCAS_CLIENT->markAuthenticationCall($auth); - - /* if (!$auth) { - phpCAS :: trace('user is not authenticated, redirecting to the CAS server'); - self::$_PHPCAS_CLIENT->forceAuthentication(); - } else { - phpCAS :: trace('no need to authenticate (user `' . phpCAS :: getUser() . '\' is already authenticated)'); - }*/ - - phpCAS :: traceEnd(); - return $auth; - } - - /** - * This method is called to renew the authentication. - * - * @return void - **/ - public static function renewAuthentication() - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - $auth = self::$_PHPCAS_CLIENT->renewAuthentication(); - - // store where the authentication has been checked and the result - self::$_PHPCAS_CLIENT->markAuthenticationCall($auth); - - //self::$_PHPCAS_CLIENT->renewAuthentication(); - phpCAS :: traceEnd(); - } - - /** - * This method is called to check if the user is authenticated (previously or by - * tickets given in the URL). - * - * @return bool true when the user is authenticated. - */ - public static function isAuthenticated() - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - // call the isAuthenticated method of the $_PHPCAS_CLIENT object - $auth = self::$_PHPCAS_CLIENT->isAuthenticated(); - - // store where the authentication has been checked and the result - self::$_PHPCAS_CLIENT->markAuthenticationCall($auth); - - phpCAS :: traceEnd($auth); - return $auth; - } - - /** - * Checks whether authenticated based on $_SESSION. Useful to avoid - * server calls. - * - * @return bool true if authenticated, false otherwise. - * @since 0.4.22 by Brendan Arnold - */ - public static function isSessionAuthenticated() - { - phpCAS::_validateClientExists(); - - return (self::$_PHPCAS_CLIENT->isSessionAuthenticated()); - } - - /** - * This method returns the CAS user's login name. - * - * @return string the login name of the authenticated user - * @warning should only be called after phpCAS::forceAuthentication() - * or phpCAS::checkAuthentication(). - * */ - public static function getUser() - { - phpCAS::_validateClientExists(); - - try { - return self::$_PHPCAS_CLIENT->getUser(); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * Answer attributes about the authenticated user. - * - * @warning should only be called after phpCAS::forceAuthentication() - * or phpCAS::checkAuthentication(). - * - * @return array - */ - public static function getAttributes() - { - phpCAS::_validateClientExists(); - - try { - return self::$_PHPCAS_CLIENT->getAttributes(); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * Answer true if there are attributes for the authenticated user. - * - * @warning should only be called after phpCAS::forceAuthentication() - * or phpCAS::checkAuthentication(). - * - * @return bool - */ - public static function hasAttributes() - { - phpCAS::_validateClientExists(); - - try { - return self::$_PHPCAS_CLIENT->hasAttributes(); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * Answer true if an attribute exists for the authenticated user. - * - * @param string $key attribute name - * - * @return bool - * @warning should only be called after phpCAS::forceAuthentication() - * or phpCAS::checkAuthentication(). - */ - public static function hasAttribute($key) - { - phpCAS::_validateClientExists(); - - try { - return self::$_PHPCAS_CLIENT->hasAttribute($key); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * Answer an attribute for the authenticated user. - * - * @param string $key attribute name - * - * @return mixed string for a single value or an array if multiple values exist. - * @warning should only be called after phpCAS::forceAuthentication() - * or phpCAS::checkAuthentication(). - */ - public static function getAttribute($key) - { - phpCAS::_validateClientExists(); - - try { - return self::$_PHPCAS_CLIENT->getAttribute($key); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * Handle logout requests. - * - * @param bool $check_client additional safety check - * @param array $allowed_clients array of allowed clients - * - * @return void - */ - public static function handleLogoutRequests($check_client = true, $allowed_clients = array()) - { - phpCAS::_validateClientExists(); - - return (self::$_PHPCAS_CLIENT->handleLogoutRequests($check_client, $allowed_clients)); - } - - /** - * This method returns the URL to be used to login. - * - * @return string the login URL - */ - public static function getServerLoginURL() - { - phpCAS::_validateClientExists(); - - return self::$_PHPCAS_CLIENT->getServerLoginURL(); - } - - /** - * Set the login URL of the CAS server. - * - * @param string $url the login URL - * - * @return void - * @since 0.4.21 by Wyman Chan - */ - public static function setServerLoginURL($url = '') - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setServerLoginURL($url); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * Set the serviceValidate URL of the CAS server. - * Used for all CAS versions of URL validations. - * Examples: - * CAS 1.0 http://www.exemple.com/validate - * CAS 2.0 http://www.exemple.com/validateURL - * CAS 3.0 http://www.exemple.com/p3/serviceValidate - * - * @param string $url the serviceValidate URL - * - * @return void - */ - public static function setServerServiceValidateURL($url = '') - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setServerServiceValidateURL($url); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * Set the proxyValidate URL of the CAS server. - * Used for all CAS versions of proxy URL validations - * Examples: - * CAS 1.0 http://www.exemple.com/ - * CAS 2.0 http://www.exemple.com/proxyValidate - * CAS 3.0 http://www.exemple.com/p3/proxyValidate - * - * @param string $url the proxyValidate URL - * - * @return void - */ - public static function setServerProxyValidateURL($url = '') - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setServerProxyValidateURL($url); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * Set the samlValidate URL of the CAS server. - * - * @param string $url the samlValidate URL - * - * @return void - */ - public static function setServerSamlValidateURL($url = '') - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setServerSamlValidateURL($url); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * This method returns the URL to be used to logout. - * - * @return string the URL to use to log out - */ - public static function getServerLogoutURL() - { - phpCAS::_validateClientExists(); - - return self::$_PHPCAS_CLIENT->getServerLogoutURL(); - } - - /** - * Set the logout URL of the CAS server. - * - * @param string $url the logout URL - * - * @return void - * @since 0.4.21 by Wyman Chan - */ - public static function setServerLogoutURL($url = '') - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setServerLogoutURL($url); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * This method is used to logout from CAS. - * - * @param string $params an array that contains the optional url and - * service parameters that will be passed to the CAS server - * - * @return void - */ - public static function logout($params = "") - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - $parsedParams = array (); - if ($params != "") { - if (is_string($params)) { - phpCAS :: error('method `phpCAS::logout($url)\' is now deprecated, use `phpCAS::logoutWithUrl($url)\' instead'); - } - if (!is_array($params)) { - phpCAS :: error('type mismatched for parameter $params (should be `array\')'); - } - foreach ($params as $key => $value) { - if ($key != "service" && $key != "url") { - phpCAS :: error('only `url\' and `service\' parameters are allowed for method `phpCAS::logout($params)\''); - } - $parsedParams[$key] = $value; - } - } - self::$_PHPCAS_CLIENT->logout($parsedParams); - // never reached - phpCAS :: traceEnd(); - } - - /** - * This method is used to logout from CAS. Halts by redirecting to the CAS - * server. - * - * @param string $service a URL that will be transmitted to the CAS server - * - * @return void - */ - public static function logoutWithRedirectService($service) - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - if (!is_string($service)) { - phpCAS :: error('type mismatched for parameter $service (should be `string\')'); - } - self::$_PHPCAS_CLIENT->logout(array ( "service" => $service )); - // never reached - phpCAS :: traceEnd(); - } - - /** - * This method is used to logout from CAS. Halts by redirecting to the CAS - * server. - * - * @param string $url a URL that will be transmitted to the CAS server - * - * @return void - * @deprecated The url parameter has been removed from the CAS server as of - * version 3.3.5.1 - */ - public static function logoutWithUrl($url) - { - trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED); - phpCAS :: traceBegin(); - if (!is_object(self::$_PHPCAS_CLIENT)) { - phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()'); - } - if (!is_string($url)) { - phpCAS :: error('type mismatched for parameter $url (should be `string\')'); - } - self::$_PHPCAS_CLIENT->logout(array ( "url" => $url )); - // never reached - phpCAS :: traceEnd(); - } - - /** - * This method is used to logout from CAS. Halts by redirecting to the CAS - * server. - * - * @param string $service a URL that will be transmitted to the CAS server - * @param string $url a URL that will be transmitted to the CAS server - * - * @return void - * - * @deprecated The url parameter has been removed from the CAS server as of - * version 3.3.5.1 - */ - public static function logoutWithRedirectServiceAndUrl($service, $url) - { - trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED); - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - if (!is_string($service)) { - phpCAS :: error('type mismatched for parameter $service (should be `string\')'); - } - if (!is_string($url)) { - phpCAS :: error('type mismatched for parameter $url (should be `string\')'); - } - self::$_PHPCAS_CLIENT->logout( - array ( - "service" => $service, - "url" => $url - ) - ); - // never reached - phpCAS :: traceEnd(); - } - - /** - * Set the fixed URL that will be used by the CAS server to transmit the - * PGT. When this method is not called, a phpCAS script uses its own URL - * for the callback. - * - * @param string $url the URL - * - * @return void - */ - public static function setFixedCallbackURL($url = '') - { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - self::$_PHPCAS_CLIENT->setCallbackURL($url); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * Set the fixed URL that will be set as the CAS service parameter. When this - * method is not called, a phpCAS script uses its own URL. - * - * @param string $url the URL - * - * @return void - */ - public static function setFixedServiceURL($url) - { - phpCAS :: traceBegin(); - phpCAS::_validateProxyExists(); - - try { - self::$_PHPCAS_CLIENT->setURL($url); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * Get the URL that is set as the CAS service parameter. - * - * @return string Service Url - */ - public static function getServiceURL() - { - phpCAS::_validateProxyExists(); - return (self::$_PHPCAS_CLIENT->getURL()); - } - - /** - * Retrieve a Proxy Ticket from the CAS server. - * - * @param string $target_service Url string of service to proxy - * @param int &$err_code error code - * @param string &$err_msg error message - * - * @return string Proxy Ticket - */ - public static function retrievePT($target_service, & $err_code, & $err_msg) - { - phpCAS::_validateProxyExists(); - - try { - return (self::$_PHPCAS_CLIENT->retrievePT($target_service, $err_code, $err_msg)); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - } - - /** - * Set the certificate of the CAS server CA and if the CN should be properly - * verified. - * - * @param string $cert CA certificate file name - * @param bool $validate_cn Validate CN in certificate (default true) - * - * @return void - */ - public static function setCasServerCACert($cert, $validate_cn = true) - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->setCasServerCACert($cert, $validate_cn); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * Set no SSL validation for the CAS server. - * - * @return void - */ - public static function setNoCasServerValidation() - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - phpCAS :: trace('You have configured no validation of the legitimacy of the cas server. This is not recommended for production use.'); - self::$_PHPCAS_CLIENT->setNoCasServerValidation(); - phpCAS :: traceEnd(); - } - - - /** - * Disable the removal of a CAS-Ticket from the URL when authenticating - * DISABLING POSES A SECURITY RISK: - * We normally remove the ticket by an additional redirect as a security - * precaution to prevent a ticket in the HTTP_REFERRER or be carried over in - * the URL parameter - * - * @return void - */ - public static function setNoClearTicketsFromUrl() - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - self::$_PHPCAS_CLIENT->setNoClearTicketsFromUrl(); - phpCAS :: traceEnd(); - } - - /** @} */ - - /** - * Change CURL options. - * CURL is used to connect through HTTPS to CAS server - * - * @param string $key the option key - * @param string $value the value to set - * - * @return void - */ - public static function setExtraCurlOption($key, $value) - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - self::$_PHPCAS_CLIENT->setExtraCurlOption($key, $value); - phpCAS :: traceEnd(); - } - - /** - * Set a salt/seed for the session-id hash to make it harder to guess. - * - * When $changeSessionID = true phpCAS will create a session-id that is derived - * from the service ticket. Doing so allows phpCAS to look-up and destroy the - * proper session on single-log-out requests. While the service tickets - * provided by the CAS server may include enough data to generate a strong - * hash, clients may provide an additional salt to ensure that session ids - * are not guessable if the session tickets do not have enough entropy. - * - * @param string $salt The salt to combine with the session ticket. - * - * @return void - */ - public static function setSessionIdSalt($salt) { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - self::$_PHPCAS_CLIENT->setSessionIdSalt($salt); - phpCAS :: traceEnd(); - } - - /** - * If you want your service to be proxied you have to enable it (default - * disabled) and define an accepable list of proxies that are allowed to - * proxy your service. - * - * Add each allowed proxy definition object. For the normal CAS_ProxyChain - * class, the constructor takes an array of proxies to match. The list is in - * reverse just as seen from the service. Proxies have to be defined in reverse - * from the service to the user. If a user hits service A and gets proxied via - * B to service C the list of acceptable on C would be array(B,A). The definition - * of an individual proxy can be either a string or a regexp (preg_match is used) - * that will be matched against the proxy list supplied by the cas server - * when validating the proxy tickets. The strings are compared starting from - * the beginning and must fully match with the proxies in the list. - * Example: - * phpCAS::allowProxyChain(new CAS_ProxyChain(array( - * 'https://app.example.com/' - * ))); - * phpCAS::allowProxyChain(new CAS_ProxyChain(array( - * '/^https:\/\/app[0-9]\.example\.com\/rest\//', - * 'http://client.example.com/' - * ))); - * - * For quick testing or in certain production screnarios you might want to - * allow allow any other valid service to proxy your service. To do so, add - * the "Any" chain: - * phpCAS::allowProxyChain(new CAS_ProxyChain_Any); - * THIS SETTING IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY - * IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER - * ON THIS SERVICE. - * - * @param CAS_ProxyChain_Interface $proxy_chain A proxy-chain that will be - * matched against the proxies requesting access - * - * @return void - */ - public static function allowProxyChain(CAS_ProxyChain_Interface $proxy_chain) - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - if (self::$_PHPCAS_CLIENT->getServerVersion() !== CAS_VERSION_2_0 - && self::$_PHPCAS_CLIENT->getServerVersion() !== CAS_VERSION_3_0 - ) { - phpCAS :: error('this method can only be used with the cas 2.0/3.0 protocols'); - } - self::$_PHPCAS_CLIENT->getAllowedProxyChains()->allowProxyChain($proxy_chain); - phpCAS :: traceEnd(); - } - - /** - * Answer an array of proxies that are sitting in front of this application. - * This method will only return a non-empty array if we have received and - * validated a Proxy Ticket. - * - * @return array - * @access public - * @since 6/25/09 - */ - public static function getProxies () - { - phpCAS::_validateProxyExists(); - - return(self::$_PHPCAS_CLIENT->getProxies()); - } - - // ######################################################################## - // PGTIOU/PGTID and logoutRequest rebroadcasting - // ######################################################################## - - /** - * Add a pgtIou/pgtId and logoutRequest rebroadcast node. - * - * @param string $rebroadcastNodeUrl The rebroadcast node URL. Can be - * hostname or IP. - * - * @return void - */ - public static function addRebroadcastNode($rebroadcastNodeUrl) - { - phpCAS::traceBegin(); - phpCAS::log('rebroadcastNodeUrl:'.$rebroadcastNodeUrl); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->addRebroadcastNode($rebroadcastNodeUrl); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS::traceEnd(); - } - - /** - * This method is used to add header parameters when rebroadcasting - * pgtIou/pgtId or logoutRequest. - * - * @param String $header Header to send when rebroadcasting. - * - * @return void - */ - public static function addRebroadcastHeader($header) - { - phpCAS :: traceBegin(); - phpCAS::_validateClientExists(); - - try { - self::$_PHPCAS_CLIENT->addRebroadcastHeader($header); - } catch (Exception $e) { - phpCAS :: error(get_class($e) . ': ' . $e->getMessage()); - } - - phpCAS :: traceEnd(); - } - - /** - * Checks if a client already exists - * - * @throws CAS_OutOfSequenceBeforeClientException - * - * @return void - */ - private static function _validateClientExists() - { - if (!is_object(self::$_PHPCAS_CLIENT)) { - throw new CAS_OutOfSequenceBeforeClientException(); - } - } - - /** - * Checks of a proxy client aready exists - * - * @throws CAS_OutOfSequenceBeforeProxyException - * - * @return void - */ - private static function _validateProxyExists() - { - if (!is_object(self::$_PHPCAS_CLIENT)) { - throw new CAS_OutOfSequenceBeforeProxyException(); - } - } - - /** - * @return CAS_Client - */ - public static function getCasClient() - { - return self::$_PHPCAS_CLIENT; - } - - /** - * For testing purposes, use this method to set the client to a test double - * - * @return void - */ - public static function setCasClient(\CAS_Client $client) - { - self::$_PHPCAS_CLIENT = $client; - } -} -// ######################################################################## -// DOCUMENTATION -// ######################################################################## - -// ######################################################################## -// MAIN PAGE - -/** - * @mainpage - * - * The following pages only show the source documentation. - * - */ - -// ######################################################################## -// MODULES DEFINITION - -/** @defgroup public User interface */ - -/** @defgroup publicInit Initialization - * @ingroup public */ - -/** @defgroup publicAuth Authentication - * @ingroup public */ - -/** @defgroup publicServices Access to external services - * @ingroup public */ - -/** @defgroup publicConfig Configuration - * @ingroup public */ - -/** @defgroup publicLang Internationalization - * @ingroup publicConfig */ - -/** @defgroup publicOutput HTML output - * @ingroup publicConfig */ - -/** @defgroup publicPGTStorage PGT storage - * @ingroup publicConfig */ - -/** @defgroup publicDebug Debugging - * @ingroup public */ - -/** @defgroup internal Implementation */ - -/** @defgroup internalAuthentication Authentication - * @ingroup internal */ - -/** @defgroup internalBasic CAS Basic client features (CAS 1.0, Service Tickets) - * @ingroup internal */ - -/** @defgroup internalProxy CAS Proxy features (CAS 2.0, Proxy Granting Tickets) - * @ingroup internal */ - -/** @defgroup internalSAML CAS SAML features (SAML 1.1) - * @ingroup internal */ - -/** @defgroup internalPGTStorage PGT storage - * @ingroup internalProxy */ - -/** @defgroup internalPGTStorageDb PGT storage in a database - * @ingroup internalPGTStorage */ - -/** @defgroup internalPGTStorageFile PGT storage on the filesystem - * @ingroup internalPGTStorage */ - -/** @defgroup internalCallback Callback from the CAS server - * @ingroup internalProxy */ - -/** @defgroup internalProxyServices Proxy other services - * @ingroup internalProxy */ - -/** @defgroup internalService CAS client features (CAS 2.0, Proxied service) - * @ingroup internal */ - -/** @defgroup internalConfig Configuration - * @ingroup internal */ - -/** @defgroup internalBehave Internal behaviour of phpCAS - * @ingroup internalConfig */ - -/** @defgroup internalOutput HTML output - * @ingroup internalConfig */ - -/** @defgroup internalLang Internationalization - * @ingroup internalConfig - * - * To add a new language: - * - 1. define a new constant PHPCAS_LANG_XXXXXX in CAS/CAS.php - * - 2. copy any file from CAS/languages to CAS/languages/XXXXXX.php - * - 3. Make the translations - */ - -/** @defgroup internalDebug Debugging - * @ingroup internal */ - -/** @defgroup internalMisc Miscellaneous - * @ingroup internal */ - -// ######################################################################## -// EXAMPLES - -/** - * @example example_simple.php - */ -/** - * @example example_service.php - */ -/** - * @example example_service_that_proxies.php - */ -/** - * @example example_service_POST.php - */ -/** - * @example example_proxy_serviceWeb.php - */ -/** - * @example example_proxy_serviceWeb_chaining.php - */ -/** - * @example example_proxy_POST.php - */ -/** - * @example example_proxy_GET.php - */ -/** - * @example example_lang.php - */ -/** - * @example example_html.php - */ -/** - * @example example_pgt_storage_file.php - */ -/** - * @example example_pgt_storage_db.php - */ -/** - * @example example_gateway.php - */ -/** - * @example example_logout.php - */ -/** - * @example example_rebroadcast.php - */ -/** - * @example example_custom_urls.php - */ -/** - * @example example_advanced_saml11.php - */ diff --git a/lib/apereo/phpcas/source/CAS/AuthenticationException.php b/lib/apereo/phpcas/source/CAS/AuthenticationException.php deleted file mode 100644 index 803c88908..000000000 --- a/lib/apereo/phpcas/source/CAS/AuthenticationException.php +++ /dev/null @@ -1,115 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This interface defines methods that allow proxy-authenticated service handlers - * to interact with phpCAS. - * - * Proxy service handlers must implement this interface as well as call - * phpCAS::initializeProxiedService($this) at some point in their implementation. - * - * While not required, proxy-authenticated service handlers are encouraged to - * implement the CAS_ProxiedService_Testable interface to facilitate unit testing. - * - * @class CAS_AuthenticationException - * @category Authentication - * @package PhpCAS - * @author Joachim Fritschi - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -class CAS_AuthenticationException -extends RuntimeException -implements CAS_Exception -{ - - /** - * This method is used to print the HTML output when the user was not - * authenticated. - * - * @param CAS_Client $client phpcas client - * @param string $failure the failure that occured - * @param string $cas_url the URL the CAS server was asked for - * @param bool $no_response the response from the CAS server (other - * parameters are ignored if TRUE) - * @param bool $bad_response bad response from the CAS server ($err_code - * and $err_msg ignored if TRUE) - * @param string $cas_response the response of the CAS server - * @param int $err_code the error code given by the CAS server - * @param string $err_msg the error message given by the CAS server - */ - public function __construct($client,$failure,$cas_url,$no_response, - $bad_response=false,$cas_response='',$err_code=-1,$err_msg='' - ) { - $messages = array(); - phpCAS::traceBegin(); - $lang = $client->getLangObj(); - $client->printHTMLHeader($lang->getAuthenticationFailed()); - - if (phpCAS::getVerbose()) { - printf( - $lang->getYouWereNotAuthenticated(), - htmlentities($client->getURL()), - $_SERVER['SERVER_ADMIN'] ?? '' - ); - } - - phpCAS::trace($messages[] = 'CAS URL: '.$cas_url); - phpCAS::trace($messages[] = 'Authentication failure: '.$failure); - if ( $no_response ) { - phpCAS::trace($messages[] = 'Reason: no response from the CAS server'); - } else { - if ( $bad_response ) { - phpCAS::trace($messages[] = 'Reason: bad response from the CAS server'); - } else { - switch ($client->getServerVersion()) { - case CAS_VERSION_1_0: - phpCAS::trace($messages[] = 'Reason: CAS error'); - break; - case CAS_VERSION_2_0: - case CAS_VERSION_3_0: - if ( $err_code === -1 ) { - phpCAS::trace($messages[] = 'Reason: no CAS error'); - } else { - phpCAS::trace($messages[] = 'Reason: ['.$err_code.'] CAS error: '.$err_msg); - } - break; - } - } - phpCAS::trace($messages[] = 'CAS response: '.$cas_response); - } - $client->printHTMLFooter(); - phpCAS::traceExit(); - - parent::__construct(implode("\n", $messages)); - } - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/Autoload.php b/lib/apereo/phpcas/source/CAS/Autoload.php deleted file mode 100644 index 29395d592..000000000 --- a/lib/apereo/phpcas/source/CAS/Autoload.php +++ /dev/null @@ -1,95 +0,0 @@ - - * @copyright 2008 Regents of the University of Nebraska - * @license http://www1.unl.edu/wdn/wiki/Software_License BSD License - * @link http://code.google.com/p/simplecas/ - **/ - -/** - * Autoload a class - * - * @param string $class Classname to load - * - * @return bool - */ -function CAS_autoload($class) -{ - // Static to hold the Include Path to CAS - static $include_path; - // Check only for CAS classes - if (substr($class, 0, 4) !== 'CAS_' && substr($class, 0, 7) !== 'PhpCas\\') { - return false; - } - - // Setup the include path if it's not already set from a previous call - if (empty($include_path)) { - $include_path = array(dirname(__DIR__)); - } - - // Declare local variable to store the expected full path to the file - foreach ($include_path as $path) { - $class_path = str_replace('_', DIRECTORY_SEPARATOR, $class); - // PhpCas namespace mapping - if (substr($class_path, 0, 7) === 'PhpCas\\') { - $class_path = 'CAS' . DIRECTORY_SEPARATOR . substr($class_path, 7); - } - - $file_path = $path . DIRECTORY_SEPARATOR . $class_path . '.php'; - $fp = @fopen($file_path, 'r', true); - if ($fp) { - fclose($fp); - include $file_path; - if (!class_exists($class, false) && !interface_exists($class, false)) { - die( - new Exception( - 'Class ' . $class . ' was not present in ' . - $file_path . - ' [CAS_autoload]' - ) - ); - } - return true; - } - } - - $e = new Exception( - 'Class ' . $class . ' could not be loaded from ' . - $file_path . ', file does not exist (Path="' - . implode(':', $include_path) .'") [CAS_autoload]' - ); - $trace = $e->getTrace(); - if (isset($trace[2]) && isset($trace[2]['function']) - && in_array($trace[2]['function'], array('class_exists', 'interface_exists', 'trait_exists')) - ) { - return false; - } - if (isset($trace[1]) && isset($trace[1]['function']) - && in_array($trace[1]['function'], array('class_exists', 'interface_exists', 'trait_exists')) - ) { - return false; - } - die ((string) $e); -} - -// Set up autoload if not already configured by composer. -if (!class_exists('CAS_Client')) -{ - trigger_error('phpCAS autoloader is deprecated. Install phpCAS using composer instead.', E_USER_DEPRECATED); - spl_autoload_register('CAS_autoload'); - if (function_exists('__autoload') - && !in_array('__autoload', spl_autoload_functions()) - ) { - // __autoload() was being used, but now would be ignored, add - // it to the autoload stack - spl_autoload_register('__autoload'); - } -} diff --git a/lib/apereo/phpcas/source/CAS/Client.php b/lib/apereo/phpcas/source/CAS/Client.php deleted file mode 100644 index 91642ee52..000000000 --- a/lib/apereo/phpcas/source/CAS/Client.php +++ /dev/null @@ -1,4380 +0,0 @@ - - * @author Olivier Berger - * @author Brett Bieber - * @author Joachim Fritschi - * @author Adam Franco - * @author Tobias Schiebeck - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * The CAS_Client class is a client interface that provides CAS authentication - * to PHP applications. - * - * @class CAS_Client - * @category Authentication - * @package PhpCAS - * @author Pascal Aubry - * @author Olivier Berger - * @author Brett Bieber - * @author Joachim Fritschi - * @author Adam Franco - * @author Tobias Schiebeck - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - */ - -class CAS_Client -{ - - // ######################################################################## - // HTML OUTPUT - // ######################################################################## - /** - * @addtogroup internalOutput - * @{ - */ - - /** - * This method filters a string by replacing special tokens by appropriate values - * and prints it. The corresponding tokens are taken into account: - * - __CAS_VERSION__ - * - __PHPCAS_VERSION__ - * - __SERVER_BASE_URL__ - * - * Used by CAS_Client::PrintHTMLHeader() and CAS_Client::printHTMLFooter(). - * - * @param string $str the string to filter and output - * - * @return void - */ - private function _htmlFilterOutput($str) - { - $str = str_replace('__CAS_VERSION__', $this->getServerVersion(), $str); - $str = str_replace('__PHPCAS_VERSION__', phpCAS::getVersion(), $str); - $str = str_replace('__SERVER_BASE_URL__', $this->_getServerBaseURL(), $str); - echo $str; - } - - /** - * A string used to print the header of HTML pages. Written by - * CAS_Client::setHTMLHeader(), read by CAS_Client::printHTMLHeader(). - * - * @hideinitializer - * @see CAS_Client::setHTMLHeader, CAS_Client::printHTMLHeader() - */ - private $_output_header = ''; - - /** - * This method prints the header of the HTML output (after filtering). If - * CAS_Client::setHTMLHeader() was not used, a default header is output. - * - * @param string $title the title of the page - * - * @return void - * @see _htmlFilterOutput() - */ - public function printHTMLHeader($title) - { - if (!phpCAS::getVerbose()) { - return; - } - - $this->_htmlFilterOutput( - str_replace( - '__TITLE__', $title, - (empty($this->_output_header) - ? '__TITLE__

__TITLE__

' - : $this->_output_header) - ) - ); - } - - /** - * A string used to print the footer of HTML pages. Written by - * CAS_Client::setHTMLFooter(), read by printHTMLFooter(). - * - * @hideinitializer - * @see CAS_Client::setHTMLFooter, CAS_Client::printHTMLFooter() - */ - private $_output_footer = ''; - - /** - * This method prints the footer of the HTML output (after filtering). If - * CAS_Client::setHTMLFooter() was not used, a default footer is output. - * - * @return void - * @see _htmlFilterOutput() - */ - public function printHTMLFooter() - { - if (!phpCAS::getVerbose()) { - return; - } - - $lang = $this->getLangObj(); - $message = empty($this->_output_footer) - ? '
phpCAS __PHPCAS_VERSION__ ' . $lang->getUsingServer() . - ' __SERVER_BASE_URL__ (CAS __CAS_VERSION__)
' - : $this->_output_footer; - - $this->_htmlFilterOutput($message); - } - - /** - * This method set the HTML header used for all outputs. - * - * @param string $header the HTML header. - * - * @return void - */ - public function setHTMLHeader($header) - { - // Argument Validation - if (gettype($header) != 'string') - throw new CAS_TypeMismatchException($header, '$header', 'string'); - - $this->_output_header = $header; - } - - /** - * This method set the HTML footer used for all outputs. - * - * @param string $footer the HTML footer. - * - * @return void - */ - public function setHTMLFooter($footer) - { - // Argument Validation - if (gettype($footer) != 'string') - throw new CAS_TypeMismatchException($footer, '$footer', 'string'); - - $this->_output_footer = $footer; - } - - /** - * Simple wrapper for printf function, that respects - * phpCAS verbosity setting. - * - * @param string $format - * @param string|int|float ...$values - * - * @see printf() - */ - private function printf(string $format, ...$values): void - { - if (phpCAS::getVerbose()) { - printf($format, ...$values); - } - } - - /** @} */ - - - // ######################################################################## - // INTERNATIONALIZATION - // ######################################################################## - /** - * @addtogroup internalLang - * @{ - */ - /** - * A string corresponding to the language used by phpCAS. Written by - * CAS_Client::setLang(), read by CAS_Client::getLang(). - - * @note debugging information is always in english (debug purposes only). - */ - private $_lang = PHPCAS_LANG_DEFAULT; - - /** - * This method is used to set the language used by phpCAS. - * - * @param string $lang representing the language. - * - * @return void - */ - public function setLang($lang) - { - // Argument Validation - if (gettype($lang) != 'string') - throw new CAS_TypeMismatchException($lang, '$lang', 'string'); - - phpCAS::traceBegin(); - $obj = new $lang(); - if (!($obj instanceof CAS_Languages_LanguageInterface)) { - throw new CAS_InvalidArgumentException( - '$className must implement the CAS_Languages_LanguageInterface' - ); - } - $this->_lang = $lang; - phpCAS::traceEnd(); - } - /** - * Create the language - * - * @return CAS_Languages_LanguageInterface object implementing the class - */ - public function getLangObj() - { - $classname = $this->_lang; - return new $classname(); - } - - /** @} */ - // ######################################################################## - // CAS SERVER CONFIG - // ######################################################################## - /** - * @addtogroup internalConfig - * @{ - */ - - /** - * a record to store information about the CAS server. - * - $_server['version']: the version of the CAS server - * - $_server['hostname']: the hostname of the CAS server - * - $_server['port']: the port the CAS server is running on - * - $_server['uri']: the base URI the CAS server is responding on - * - $_server['base_url']: the base URL of the CAS server - * - $_server['login_url']: the login URL of the CAS server - * - $_server['service_validate_url']: the service validating URL of the - * CAS server - * - $_server['proxy_url']: the proxy URL of the CAS server - * - $_server['proxy_validate_url']: the proxy validating URL of the CAS server - * - $_server['logout_url']: the logout URL of the CAS server - * - * $_server['version'], $_server['hostname'], $_server['port'] and - * $_server['uri'] are written by CAS_Client::CAS_Client(), read by - * CAS_Client::getServerVersion(), CAS_Client::_getServerHostname(), - * CAS_Client::_getServerPort() and CAS_Client::_getServerURI(). - * - * The other fields are written and read by CAS_Client::_getServerBaseURL(), - * CAS_Client::getServerLoginURL(), CAS_Client::getServerServiceValidateURL(), - * CAS_Client::getServerProxyValidateURL() and CAS_Client::getServerLogoutURL(). - * - * @hideinitializer - */ - private $_server = array( - 'version' => '', - 'hostname' => 'none', - 'port' => -1, - 'uri' => 'none'); - - /** - * This method is used to retrieve the version of the CAS server. - * - * @return string the version of the CAS server. - */ - public function getServerVersion() - { - return $this->_server['version']; - } - - /** - * This method is used to retrieve the hostname of the CAS server. - * - * @return string the hostname of the CAS server. - */ - private function _getServerHostname() - { - return $this->_server['hostname']; - } - - /** - * This method is used to retrieve the port of the CAS server. - * - * @return int the port of the CAS server. - */ - private function _getServerPort() - { - return $this->_server['port']; - } - - /** - * This method is used to retrieve the URI of the CAS server. - * - * @return string a URI. - */ - private function _getServerURI() - { - return $this->_server['uri']; - } - - /** - * This method is used to retrieve the base URL of the CAS server. - * - * @return string a URL. - */ - private function _getServerBaseURL() - { - // the URL is build only when needed - if ( empty($this->_server['base_url']) ) { - $this->_server['base_url'] = 'https://' . $this->_getServerHostname(); - if ($this->_getServerPort()!=443) { - $this->_server['base_url'] .= ':' - .$this->_getServerPort(); - } - $this->_server['base_url'] .= $this->_getServerURI(); - } - return $this->_server['base_url']; - } - - /** - * This method is used to retrieve the login URL of the CAS server. - * - * @param bool $gateway true to check authentication, false to force it - * @param bool $renew true to force the authentication with the CAS server - * - * @return string a URL. - * @note It is recommended that CAS implementations ignore the "gateway" - * parameter if "renew" is set - */ - public function getServerLoginURL($gateway=false,$renew=false) - { - phpCAS::traceBegin(); - // the URL is build only when needed - if ( empty($this->_server['login_url']) ) { - $this->_server['login_url'] = $this->_buildQueryUrl($this->_getServerBaseURL().'login','service='.urlencode($this->getURL())); - } - $url = $this->_server['login_url']; - if ($renew) { - // It is recommended that when the "renew" parameter is set, its - // value be "true" - $url = $this->_buildQueryUrl($url, 'renew=true'); - } elseif ($gateway) { - // It is recommended that when the "gateway" parameter is set, its - // value be "true" - $url = $this->_buildQueryUrl($url, 'gateway=true'); - } - phpCAS::traceEnd($url); - return $url; - } - - /** - * This method sets the login URL of the CAS server. - * - * @param string $url the login URL - * - * @return string login url - */ - public function setServerLoginURL($url) - { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - return $this->_server['login_url'] = $url; - } - - - /** - * This method sets the serviceValidate URL of the CAS server. - * - * @param string $url the serviceValidate URL - * - * @return string serviceValidate URL - */ - public function setServerServiceValidateURL($url) - { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - return $this->_server['service_validate_url'] = $url; - } - - - /** - * This method sets the proxyValidate URL of the CAS server. - * - * @param string $url the proxyValidate URL - * - * @return string proxyValidate URL - */ - public function setServerProxyValidateURL($url) - { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - return $this->_server['proxy_validate_url'] = $url; - } - - - /** - * This method sets the samlValidate URL of the CAS server. - * - * @param string $url the samlValidate URL - * - * @return string samlValidate URL - */ - public function setServerSamlValidateURL($url) - { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - return $this->_server['saml_validate_url'] = $url; - } - - - /** - * This method is used to retrieve the service validating URL of the CAS server. - * - * @return string serviceValidate URL. - */ - public function getServerServiceValidateURL() - { - phpCAS::traceBegin(); - // the URL is build only when needed - if ( empty($this->_server['service_validate_url']) ) { - switch ($this->getServerVersion()) { - case CAS_VERSION_1_0: - $this->_server['service_validate_url'] = $this->_getServerBaseURL() - .'validate'; - break; - case CAS_VERSION_2_0: - $this->_server['service_validate_url'] = $this->_getServerBaseURL() - .'serviceValidate'; - break; - case CAS_VERSION_3_0: - $this->_server['service_validate_url'] = $this->_getServerBaseURL() - .'p3/serviceValidate'; - break; - } - } - $url = $this->_buildQueryUrl( - $this->_server['service_validate_url'], - 'service='.urlencode($this->getURL()) - ); - phpCAS::traceEnd($url); - return $url; - } - /** - * This method is used to retrieve the SAML validating URL of the CAS server. - * - * @return string samlValidate URL. - */ - public function getServerSamlValidateURL() - { - phpCAS::traceBegin(); - // the URL is build only when needed - if ( empty($this->_server['saml_validate_url']) ) { - switch ($this->getServerVersion()) { - case SAML_VERSION_1_1: - $this->_server['saml_validate_url'] = $this->_getServerBaseURL().'samlValidate'; - break; - } - } - - $url = $this->_buildQueryUrl( - $this->_server['saml_validate_url'], - 'TARGET='.urlencode($this->getURL()) - ); - phpCAS::traceEnd($url); - return $url; - } - - /** - * This method is used to retrieve the proxy validating URL of the CAS server. - * - * @return string proxyValidate URL. - */ - public function getServerProxyValidateURL() - { - phpCAS::traceBegin(); - // the URL is build only when needed - if ( empty($this->_server['proxy_validate_url']) ) { - switch ($this->getServerVersion()) { - case CAS_VERSION_1_0: - $this->_server['proxy_validate_url'] = ''; - break; - case CAS_VERSION_2_0: - $this->_server['proxy_validate_url'] = $this->_getServerBaseURL().'proxyValidate'; - break; - case CAS_VERSION_3_0: - $this->_server['proxy_validate_url'] = $this->_getServerBaseURL().'p3/proxyValidate'; - break; - } - } - $url = $this->_buildQueryUrl( - $this->_server['proxy_validate_url'], - 'service='.urlencode($this->getURL()) - ); - phpCAS::traceEnd($url); - return $url; - } - - - /** - * This method is used to retrieve the proxy URL of the CAS server. - * - * @return string proxy URL. - */ - public function getServerProxyURL() - { - // the URL is build only when needed - if ( empty($this->_server['proxy_url']) ) { - switch ($this->getServerVersion()) { - case CAS_VERSION_1_0: - $this->_server['proxy_url'] = ''; - break; - case CAS_VERSION_2_0: - case CAS_VERSION_3_0: - $this->_server['proxy_url'] = $this->_getServerBaseURL().'proxy'; - break; - } - } - return $this->_server['proxy_url']; - } - - /** - * This method is used to retrieve the logout URL of the CAS server. - * - * @return string logout URL. - */ - public function getServerLogoutURL() - { - // the URL is build only when needed - if ( empty($this->_server['logout_url']) ) { - $this->_server['logout_url'] = $this->_getServerBaseURL().'logout'; - } - return $this->_server['logout_url']; - } - - /** - * This method sets the logout URL of the CAS server. - * - * @param string $url the logout URL - * - * @return string logout url - */ - public function setServerLogoutURL($url) - { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - return $this->_server['logout_url'] = $url; - } - - /** - * An array to store extra curl options. - */ - private $_curl_options = array(); - - /** - * This method is used to set additional user curl options. - * - * @param string $key name of the curl option - * @param string $value value of the curl option - * - * @return void - */ - public function setExtraCurlOption($key, $value) - { - $this->_curl_options[$key] = $value; - } - - /** @} */ - - // ######################################################################## - // Change the internal behaviour of phpcas - // ######################################################################## - - /** - * @addtogroup internalBehave - * @{ - */ - - /** - * The class to instantiate for making web requests in readUrl(). - * The class specified must implement the CAS_Request_RequestInterface. - * By default CAS_Request_CurlRequest is used, but this may be overridden to - * supply alternate request mechanisms for testing. - */ - private $_requestImplementation = 'CAS_Request_CurlRequest'; - - /** - * Override the default implementation used to make web requests in readUrl(). - * This class must implement the CAS_Request_RequestInterface. - * - * @param string $className name of the RequestImplementation class - * - * @return void - */ - public function setRequestImplementation ($className) - { - $obj = new $className; - if (!($obj instanceof CAS_Request_RequestInterface)) { - throw new CAS_InvalidArgumentException( - '$className must implement the CAS_Request_RequestInterface' - ); - } - $this->_requestImplementation = $className; - } - - /** - * @var boolean $_clearTicketsFromUrl; If true, phpCAS will clear session - * tickets from the URL after a successful authentication. - */ - private $_clearTicketsFromUrl = true; - - /** - * Configure the client to not send redirect headers and call exit() on - * authentication success. The normal redirect is used to remove the service - * ticket from the client's URL, but for running unit tests we need to - * continue without exiting. - * - * Needed for testing authentication - * - * @return void - */ - public function setNoClearTicketsFromUrl () - { - $this->_clearTicketsFromUrl = false; - } - - /** - * @var callback $_attributeParserCallbackFunction; - */ - private $_casAttributeParserCallbackFunction = null; - - /** - * @var array $_attributeParserCallbackArgs; - */ - private $_casAttributeParserCallbackArgs = array(); - - /** - * Set a callback function to be run when parsing CAS attributes - * - * The callback function will be passed a XMLNode as its first parameter, - * followed by any $additionalArgs you pass. - * - * @param string $function callback function to call - * @param array $additionalArgs optional array of arguments - * - * @return void - */ - public function setCasAttributeParserCallback($function, array $additionalArgs = array()) - { - $this->_casAttributeParserCallbackFunction = $function; - $this->_casAttributeParserCallbackArgs = $additionalArgs; - } - - /** @var callable $_postAuthenticateCallbackFunction; - */ - private $_postAuthenticateCallbackFunction = null; - - /** - * @var array $_postAuthenticateCallbackArgs; - */ - private $_postAuthenticateCallbackArgs = array(); - - /** - * Set a callback function to be run when a user authenticates. - * - * The callback function will be passed a $logoutTicket as its first parameter, - * followed by any $additionalArgs you pass. The $logoutTicket parameter is an - * opaque string that can be used to map a session-id to the logout request - * in order to support single-signout in applications that manage their own - * sessions (rather than letting phpCAS start the session). - * - * phpCAS::forceAuthentication() will always exit and forward client unless - * they are already authenticated. To perform an action at the moment the user - * logs in (such as registering an account, performing logging, etc), register - * a callback function here. - * - * @param callable $function callback function to call - * @param array $additionalArgs optional array of arguments - * - * @return void - */ - public function setPostAuthenticateCallback ($function, array $additionalArgs = array()) - { - $this->_postAuthenticateCallbackFunction = $function; - $this->_postAuthenticateCallbackArgs = $additionalArgs; - } - - /** - * @var callable $_signoutCallbackFunction; - */ - private $_signoutCallbackFunction = null; - - /** - * @var array $_signoutCallbackArgs; - */ - private $_signoutCallbackArgs = array(); - - /** - * Set a callback function to be run when a single-signout request is received. - * - * The callback function will be passed a $logoutTicket as its first parameter, - * followed by any $additionalArgs you pass. The $logoutTicket parameter is an - * opaque string that can be used to map a session-id to the logout request in - * order to support single-signout in applications that manage their own sessions - * (rather than letting phpCAS start and destroy the session). - * - * @param callable $function callback function to call - * @param array $additionalArgs optional array of arguments - * - * @return void - */ - public function setSingleSignoutCallback ($function, array $additionalArgs = array()) - { - $this->_signoutCallbackFunction = $function; - $this->_signoutCallbackArgs = $additionalArgs; - } - - // ######################################################################## - // Methods for supplying code-flow feedback to integrators. - // ######################################################################## - - /** - * Ensure that this is actually a proxy object or fail with an exception - * - * @throws CAS_OutOfSequenceBeforeProxyException - * - * @return void - */ - public function ensureIsProxy() - { - if (!$this->isProxy()) { - throw new CAS_OutOfSequenceBeforeProxyException(); - } - } - - /** - * Mark the caller of authentication. This will help client integraters determine - * problems with their code flow if they call a function such as getUser() before - * authentication has occurred. - * - * @param bool $auth True if authentication was successful, false otherwise. - * - * @return null - */ - public function markAuthenticationCall ($auth) - { - // store where the authentication has been checked and the result - $dbg = debug_backtrace(); - $this->_authentication_caller = array ( - 'file' => $dbg[1]['file'], - 'line' => $dbg[1]['line'], - 'method' => $dbg[1]['class'] . '::' . $dbg[1]['function'], - 'result' => (boolean)$auth - ); - } - private $_authentication_caller; - - /** - * Answer true if authentication has been checked. - * - * @return bool - */ - public function wasAuthenticationCalled () - { - return !empty($this->_authentication_caller); - } - - /** - * Ensure that authentication was checked. Terminate with exception if no - * authentication was performed - * - * @throws CAS_OutOfSequenceBeforeAuthenticationCallException - * - * @return void - */ - private function _ensureAuthenticationCalled() - { - if (!$this->wasAuthenticationCalled()) { - throw new CAS_OutOfSequenceBeforeAuthenticationCallException(); - } - } - - /** - * Answer the result of the authentication call. - * - * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false - * and markAuthenticationCall() didn't happen. - * - * @return bool - */ - public function wasAuthenticationCallSuccessful () - { - $this->_ensureAuthenticationCalled(); - return $this->_authentication_caller['result']; - } - - - /** - * Ensure that authentication was checked. Terminate with exception if no - * authentication was performed - * - * @throws CAS_OutOfSequenceException - * - * @return void - */ - public function ensureAuthenticationCallSuccessful() - { - $this->_ensureAuthenticationCalled(); - if (!$this->_authentication_caller['result']) { - throw new CAS_OutOfSequenceException( - 'authentication was checked (by ' - . $this->getAuthenticationCallerMethod() - . '() at ' . $this->getAuthenticationCallerFile() - . ':' . $this->getAuthenticationCallerLine() - . ') but the method returned false' - ); - } - } - - /** - * Answer information about the authentication caller. - * - * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false - * and markAuthenticationCall() didn't happen. - * - * @return string the file that called authentication - */ - public function getAuthenticationCallerFile () - { - $this->_ensureAuthenticationCalled(); - return $this->_authentication_caller['file']; - } - - /** - * Answer information about the authentication caller. - * - * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false - * and markAuthenticationCall() didn't happen. - * - * @return int the line that called authentication - */ - public function getAuthenticationCallerLine () - { - $this->_ensureAuthenticationCalled(); - return $this->_authentication_caller['line']; - } - - /** - * Answer information about the authentication caller. - * - * Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false - * and markAuthenticationCall() didn't happen. - * - * @return string the method that called authentication - */ - public function getAuthenticationCallerMethod () - { - $this->_ensureAuthenticationCalled(); - return $this->_authentication_caller['method']; - } - - /** @} */ - - // ######################################################################## - // CONSTRUCTOR - // ######################################################################## - /** - * @addtogroup internalConfig - * @{ - */ - - /** - * CAS_Client constructor. - * - * @param string $server_version the version of the CAS server - * @param bool $proxy true if the CAS client is a CAS proxy - * @param string $server_hostname the hostname of the CAS server - * @param int $server_port the port the CAS server is running on - * @param string $server_uri the URI the CAS server is responding on - * @param bool $changeSessionID Allow phpCAS to change the session_id - * (Single Sign Out/handleLogoutRequests - * is based on that change) - * @param string|string[]|CAS_ServiceBaseUrl_Interface - * $service_base_url the base URL (protocol, host and the - * optional port) of the CAS client; pass - * in an array to use auto discovery with - * an allowlist; pass in - * CAS_ServiceBaseUrl_Interface for custom - * behavior. Added in 1.6.0. Similar to - * serverName config in other CAS clients. - * @param \SessionHandlerInterface $sessionHandler the session handler - * - * @return self a newly created CAS_Client object - */ - public function __construct( - $server_version, - $proxy, - $server_hostname, - $server_port, - $server_uri, - $service_base_url, - $changeSessionID = true, - \SessionHandlerInterface $sessionHandler = null - ) { - // Argument validation - if (gettype($server_version) != 'string') - throw new CAS_TypeMismatchException($server_version, '$server_version', 'string'); - if (gettype($proxy) != 'boolean') - throw new CAS_TypeMismatchException($proxy, '$proxy', 'boolean'); - if (gettype($server_hostname) != 'string') - throw new CAS_TypeMismatchException($server_hostname, '$server_hostname', 'string'); - if (gettype($server_port) != 'integer') - throw new CAS_TypeMismatchException($server_port, '$server_port', 'integer'); - if (gettype($server_uri) != 'string') - throw new CAS_TypeMismatchException($server_uri, '$server_uri', 'string'); - if (gettype($changeSessionID) != 'boolean') - throw new CAS_TypeMismatchException($changeSessionID, '$changeSessionID', 'boolean'); - - $this->_setServiceBaseUrl($service_base_url); - - if (empty($sessionHandler)) { - $sessionHandler = new CAS_Session_PhpSession; - } - - phpCAS::traceBegin(); - // true : allow to change the session_id(), false session_id won't be - // changed and logout won't be handled because of that - $this->_setChangeSessionID($changeSessionID); - - $this->setSessionHandler($sessionHandler); - - if (!$this->_isLogoutRequest()) { - if (session_id() === "") { - // skip Session Handling for logout requests and if don't want it - session_start(); - phpCAS :: trace("Starting a new session " . session_id()); - } - // init phpCAS session array - if (!isset($_SESSION[static::PHPCAS_SESSION_PREFIX]) - || !is_array($_SESSION[static::PHPCAS_SESSION_PREFIX])) { - $_SESSION[static::PHPCAS_SESSION_PREFIX] = array(); - } - } - - // Only for debug purposes - if ($this->isSessionAuthenticated()){ - phpCAS :: trace("Session is authenticated as: " . $this->getSessionValue('user')); - } else { - phpCAS :: trace("Session is not authenticated"); - } - // are we in proxy mode ? - $this->_proxy = $proxy; - - // Make cookie handling available. - if ($this->isProxy()) { - if (!$this->hasSessionValue('service_cookies')) { - $this->setSessionValue('service_cookies', array()); - } - // TODO remove explicit call to $_SESSION - $this->_serviceCookieJar = new CAS_CookieJar( - $_SESSION[static::PHPCAS_SESSION_PREFIX]['service_cookies'] - ); - } - - // check version - $supportedProtocols = phpCAS::getSupportedProtocols(); - if (isset($supportedProtocols[$server_version]) === false) { - phpCAS::error( - 'this version of CAS (`'.$server_version - .'\') is not supported by phpCAS '.phpCAS::getVersion() - ); - } - - if ($server_version === CAS_VERSION_1_0 && $this->isProxy()) { - phpCAS::error( - 'CAS proxies are not supported in CAS '.$server_version - ); - } - - $this->_server['version'] = $server_version; - - // check hostname - if ( empty($server_hostname) - || !preg_match('/[\.\d\-a-z]*/', $server_hostname) - ) { - phpCAS::error('bad CAS server hostname (`'.$server_hostname.'\')'); - } - $this->_server['hostname'] = $server_hostname; - - // check port - if ( $server_port == 0 - || !is_int($server_port) - ) { - phpCAS::error('bad CAS server port (`'.$server_hostname.'\')'); - } - $this->_server['port'] = $server_port; - - // check URI - if ( !preg_match('/[\.\d\-_a-z\/]*/', $server_uri) ) { - phpCAS::error('bad CAS server URI (`'.$server_uri.'\')'); - } - // add leading and trailing `/' and remove doubles - if(strstr($server_uri, '?') === false) $server_uri .= '/'; - $server_uri = preg_replace('/\/\//', '/', '/'.$server_uri); - $this->_server['uri'] = $server_uri; - - // set to callback mode if PgtIou and PgtId CGI GET parameters are provided - if ( $this->isProxy() ) { - if(!empty($_GET['pgtIou'])&&!empty($_GET['pgtId'])) { - $this->_setCallbackMode(true); - $this->_setCallbackModeUsingPost(false); - } elseif (!empty($_POST['pgtIou'])&&!empty($_POST['pgtId'])) { - $this->_setCallbackMode(true); - $this->_setCallbackModeUsingPost(true); - } else { - $this->_setCallbackMode(false); - $this->_setCallbackModeUsingPost(false); - } - - - } - - if ( $this->_isCallbackMode() ) { - //callback mode: check that phpCAS is secured - if ( !$this->getServiceBaseUrl()->isHttps() ) { - phpCAS::error( - 'CAS proxies must be secured to use phpCAS; PGT\'s will not be received from the CAS server' - ); - } - } else { - //normal mode: get ticket and remove it from CGI parameters for - // developers - $ticket = (isset($_GET['ticket']) ? $_GET['ticket'] : ''); - if (preg_match('/^[SP]T-/', $ticket) ) { - phpCAS::trace('Ticket \''.$ticket.'\' found'); - $this->setTicket($ticket); - unset($_GET['ticket']); - } else if ( !empty($ticket) ) { - //ill-formed ticket, halt - phpCAS::error( - 'ill-formed ticket found in the URL (ticket=`' - .htmlentities($ticket).'\')' - ); - } - - } - phpCAS::traceEnd(); - } - - /** @} */ - - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - // XX XX - // XX Session Handling XX - // XX XX - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - - /** - * @addtogroup internalConfig - * @{ - */ - - /** The session prefix for phpCAS values */ - const PHPCAS_SESSION_PREFIX = 'phpCAS'; - - /** - * @var bool A variable to whether phpcas will use its own session handling. Default = true - * @hideinitializer - */ - private $_change_session_id = true; - - /** - * @var SessionHandlerInterface - */ - private $_sessionHandler; - - /** - * Set a parameter whether to allow phpCAS to change session_id - * - * @param bool $allowed allow phpCAS to change session_id - * - * @return void - */ - private function _setChangeSessionID($allowed) - { - $this->_change_session_id = $allowed; - } - - /** - * Get whether phpCAS is allowed to change session_id - * - * @return bool - */ - public function getChangeSessionID() - { - return $this->_change_session_id; - } - - /** - * Set the session handler. - * - * @param \SessionHandlerInterface $sessionHandler - * - * @return bool - */ - public function setSessionHandler(\SessionHandlerInterface $sessionHandler) - { - $this->_sessionHandler = $sessionHandler; - if (session_status() !== PHP_SESSION_ACTIVE) { - return session_set_save_handler($this->_sessionHandler, true); - } - return true; - } - - /** - * Get a session value using the given key. - * - * @param string $key - * @param mixed $default default value if the key is not set - * - * @return mixed - */ - protected function getSessionValue($key, $default = null) - { - $this->validateSession($key); - - if (isset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key])) { - return $_SESSION[static::PHPCAS_SESSION_PREFIX][$key]; - } - - return $default; - } - - /** - * Determine whether a session value is set or not. - * - * To check if a session value is empty or not please use - * !!(getSessionValue($key)). - * - * @param string $key - * - * @return bool - */ - protected function hasSessionValue($key) - { - $this->validateSession($key); - - return isset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key]); - } - - /** - * Set a session value using the given key and value. - * - * @param string $key - * @param mixed $value - * - * @return string - */ - protected function setSessionValue($key, $value) - { - $this->validateSession($key); - - $_SESSION[static::PHPCAS_SESSION_PREFIX][$key] = $value; - } - - /** - * Remove a session value with the given key. - * - * @param string $key - */ - protected function removeSessionValue($key) - { - $this->validateSession($key); - - if (isset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key])) { - unset($_SESSION[static::PHPCAS_SESSION_PREFIX][$key]); - return true; - } - - return false; - } - - /** - * Remove all phpCAS session values. - */ - protected function clearSessionValues() - { - unset($_SESSION[static::PHPCAS_SESSION_PREFIX]); - } - - /** - * Ensure $key is a string for session utils input - * - * @param string $key - * - * @return bool - */ - protected function validateSession($key) - { - if (!is_string($key)) { - throw new InvalidArgumentException('Session key must be a string.'); - } - - return true; - } - - /** - * Renaming the session - * - * @param string $ticket name of the ticket - * - * @return void - */ - protected function _renameSession($ticket) - { - phpCAS::traceBegin(); - if ($this->getChangeSessionID()) { - if (!empty($this->_user)) { - $old_session = $_SESSION; - phpCAS :: trace("Killing session: ". session_id()); - session_destroy(); - // set up a new session, of name based on the ticket - $session_id = $this->_sessionIdForTicket($ticket); - phpCAS :: trace("Starting session: ". $session_id); - session_id($session_id); - session_start(); - phpCAS :: trace("Restoring old session vars"); - $_SESSION = $old_session; - } else { - phpCAS :: trace ( - 'Session should only be renamed after successfull authentication' - ); - } - } else { - phpCAS :: trace( - "Skipping session rename since phpCAS is not handling the session." - ); - } - phpCAS::traceEnd(); - } - - /** @} */ - - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - // XX XX - // XX AUTHENTICATION XX - // XX XX - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - - /** - * @addtogroup internalAuthentication - * @{ - */ - - /** - * The Authenticated user. Written by CAS_Client::_setUser(), read by - * CAS_Client::getUser(). - * - * @hideinitializer - */ - private $_user = ''; - - /** - * This method sets the CAS user's login name. - * - * @param string $user the login name of the authenticated user. - * - * @return void - */ - private function _setUser($user) - { - $this->_user = $user; - } - - /** - * This method returns the CAS user's login name. - * - * @return string the login name of the authenticated user - * - * @warning should be called only after CAS_Client::forceAuthentication() or - * CAS_Client::isAuthenticated(), otherwise halt with an error. - */ - public function getUser() - { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); - - return $this->_getUser(); - } - - /** - * This method returns the CAS user's login name. - * - * @return string the login name of the authenticated user - * - * @warning should be called only after CAS_Client::forceAuthentication() or - * CAS_Client::isAuthenticated(), otherwise halt with an error. - */ - private function _getUser() - { - // This is likely a duplicate check that could be removed.... - if ( empty($this->_user) ) { - phpCAS::error( - 'this method should be used only after '.__CLASS__ - .'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()' - ); - } - return $this->_user; - } - - /** - * The Authenticated users attributes. Written by - * CAS_Client::setAttributes(), read by CAS_Client::getAttributes(). - * @attention client applications should use phpCAS::getAttributes(). - * - * @hideinitializer - */ - private $_attributes = array(); - - /** - * Set an array of attributes - * - * @param array $attributes a key value array of attributes - * - * @return void - */ - public function setAttributes($attributes) - { - $this->_attributes = $attributes; - } - - /** - * Get an key values arry of attributes - * - * @return array of attributes - */ - public function getAttributes() - { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); - // This is likely a duplicate check that could be removed.... - if ( empty($this->_user) ) { - // if no user is set, there shouldn't be any attributes also... - phpCAS::error( - 'this method should be used only after '.__CLASS__ - .'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()' - ); - } - return $this->_attributes; - } - - /** - * Check whether attributes are available - * - * @return bool attributes available - */ - public function hasAttributes() - { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); - - return !empty($this->_attributes); - } - /** - * Check whether a specific attribute with a name is available - * - * @param string $key name of attribute - * - * @return bool is attribute available - */ - public function hasAttribute($key) - { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); - - return $this->_hasAttribute($key); - } - - /** - * Check whether a specific attribute with a name is available - * - * @param string $key name of attribute - * - * @return bool is attribute available - */ - private function _hasAttribute($key) - { - return (is_array($this->_attributes) - && array_key_exists($key, $this->_attributes)); - } - - /** - * Get a specific attribute by name - * - * @param string $key name of attribute - * - * @return string attribute values - */ - public function getAttribute($key) - { - // Sequence validation - $this->ensureAuthenticationCallSuccessful(); - - if ($this->_hasAttribute($key)) { - return $this->_attributes[$key]; - } - } - - /** - * This method is called to renew the authentication of the user - * If the user is authenticated, renew the connection - * If not, redirect to CAS - * - * @return bool true when the user is authenticated; otherwise halt. - */ - public function renewAuthentication() - { - phpCAS::traceBegin(); - // Either way, the user is authenticated by CAS - $this->removeSessionValue('auth_checked'); - if ( $this->isAuthenticated(true) ) { - phpCAS::trace('user already authenticated'); - $res = true; - } else { - $this->redirectToCas(false, true); - // never reached - $res = false; - } - phpCAS::traceEnd(); - return $res; - } - - /** - * This method is called to be sure that the user is authenticated. When not - * authenticated, halt by redirecting to the CAS server; otherwise return true. - * - * @return bool true when the user is authenticated; otherwise halt. - */ - public function forceAuthentication() - { - phpCAS::traceBegin(); - - if ( $this->isAuthenticated() ) { - // the user is authenticated, nothing to be done. - phpCAS::trace('no need to authenticate'); - $res = true; - } else { - // the user is not authenticated, redirect to the CAS server - $this->removeSessionValue('auth_checked'); - $this->redirectToCas(false/* no gateway */); - // never reached - $res = false; - } - phpCAS::traceEnd($res); - return $res; - } - - /** - * An integer that gives the number of times authentication will be cached - * before rechecked. - * - * @hideinitializer - */ - private $_cache_times_for_auth_recheck = 0; - - /** - * Set the number of times authentication will be cached before rechecked. - * - * @param int $n number of times to wait for a recheck - * - * @return void - */ - public function setCacheTimesForAuthRecheck($n) - { - if (gettype($n) != 'integer') - throw new CAS_TypeMismatchException($n, '$n', 'string'); - - $this->_cache_times_for_auth_recheck = $n; - } - - /** - * This method is called to check whether the user is authenticated or not. - * - * @return bool true when the user is authenticated, false when a previous - * gateway login failed or the function will not return if the user is - * redirected to the cas server for a gateway login attempt - */ - public function checkAuthentication() - { - phpCAS::traceBegin(); - $res = false; // default - if ( $this->isAuthenticated() ) { - phpCAS::trace('user is authenticated'); - /* The 'auth_checked' variable is removed just in case it's set. */ - $this->removeSessionValue('auth_checked'); - $res = true; - } else if ($this->getSessionValue('auth_checked')) { - // the previous request has redirected the client to the CAS server - // with gateway=true - $this->removeSessionValue('auth_checked'); - } else { - // avoid a check against CAS on every request - // we need to write this back to session later - $unauth_count = $this->getSessionValue('unauth_count', -2); - - if (($unauth_count != -2 - && $this->_cache_times_for_auth_recheck == -1) - || ($unauth_count >= 0 - && $unauth_count < $this->_cache_times_for_auth_recheck) - ) { - if ($this->_cache_times_for_auth_recheck != -1) { - $unauth_count++; - phpCAS::trace( - 'user is not authenticated (cached for ' - .$unauth_count.' times of ' - .$this->_cache_times_for_auth_recheck.')' - ); - } else { - phpCAS::trace( - 'user is not authenticated (cached for until login pressed)' - ); - } - $this->setSessionValue('unauth_count', $unauth_count); - } else { - $this->setSessionValue('unauth_count', 0); - $this->setSessionValue('auth_checked', true); - phpCAS::trace('user is not authenticated (cache reset)'); - $this->redirectToCas(true/* gateway */); - // never reached - } - } - phpCAS::traceEnd($res); - return $res; - } - - /** - * This method is called to check if the user is authenticated (previously or by - * tickets given in the URL). - * - * @param bool $renew true to force the authentication with the CAS server - * - * @return bool true when the user is authenticated. Also may redirect to the - * same URL without the ticket. - */ - public function isAuthenticated($renew=false) - { - phpCAS::traceBegin(); - $res = false; - - if ( $this->_wasPreviouslyAuthenticated() ) { - if ($this->hasTicket()) { - // User has a additional ticket but was already authenticated - phpCAS::trace( - 'ticket was present and will be discarded, use renewAuthenticate()' - ); - if ($this->_clearTicketsFromUrl) { - phpCAS::trace("Prepare redirect to : ".$this->getURL()); - session_write_close(); - header('Location: '.$this->getURL()); - flush(); - phpCAS::traceExit(); - throw new CAS_GracefullTerminationException(); - } else { - phpCAS::trace( - 'Already authenticated, but skipping ticket clearing since setNoClearTicketsFromUrl() was used.' - ); - $res = true; - } - } else { - // the user has already (previously during the session) been - // authenticated, nothing to be done. - phpCAS::trace( - 'user was already authenticated, no need to look for tickets' - ); - $res = true; - } - - // Mark the auth-check as complete to allow post-authentication - // callbacks to make use of phpCAS::getUser() and similar methods - $this->markAuthenticationCall($res); - } else { - if ($this->hasTicket()) { - $validate_url = ''; - $text_response = ''; - $tree_response = ''; - - switch ($this->getServerVersion()) { - case CAS_VERSION_1_0: - // if a Service Ticket was given, validate it - phpCAS::trace( - 'CAS 1.0 ticket `'.$this->getTicket().'\' is present' - ); - $this->validateCAS10( - $validate_url, $text_response, $tree_response, $renew - ); // if it fails, it halts - phpCAS::trace( - 'CAS 1.0 ticket `'.$this->getTicket().'\' was validated' - ); - $this->setSessionValue('user', $this->_getUser()); - $res = true; - $logoutTicket = $this->getTicket(); - break; - case CAS_VERSION_2_0: - case CAS_VERSION_3_0: - // if a Proxy Ticket was given, validate it - phpCAS::trace( - 'CAS '.$this->getServerVersion().' ticket `'.$this->getTicket().'\' is present' - ); - $this->validateCAS20( - $validate_url, $text_response, $tree_response, $renew - ); // note: if it fails, it halts - phpCAS::trace( - 'CAS '.$this->getServerVersion().' ticket `'.$this->getTicket().'\' was validated' - ); - if ( $this->isProxy() ) { - $this->_validatePGT( - $validate_url, $text_response, $tree_response - ); // idem - phpCAS::trace('PGT `'.$this->_getPGT().'\' was validated'); - $this->setSessionValue('pgt', $this->_getPGT()); - } - $this->setSessionValue('user', $this->_getUser()); - if (!empty($this->_attributes)) { - $this->setSessionValue('attributes', $this->_attributes); - } - $proxies = $this->getProxies(); - if (!empty($proxies)) { - $this->setSessionValue('proxies', $this->getProxies()); - } - $res = true; - $logoutTicket = $this->getTicket(); - break; - case SAML_VERSION_1_1: - // if we have a SAML ticket, validate it. - phpCAS::trace( - 'SAML 1.1 ticket `'.$this->getTicket().'\' is present' - ); - $this->validateSA( - $validate_url, $text_response, $tree_response, $renew - ); // if it fails, it halts - phpCAS::trace( - 'SAML 1.1 ticket `'.$this->getTicket().'\' was validated' - ); - $this->setSessionValue('user', $this->_getUser()); - $this->setSessionValue('attributes', $this->_attributes); - $res = true; - $logoutTicket = $this->getTicket(); - break; - default: - phpCAS::trace('Protocol error'); - break; - } - } else { - // no ticket given, not authenticated - phpCAS::trace('no ticket found'); - } - - // Mark the auth-check as complete to allow post-authentication - // callbacks to make use of phpCAS::getUser() and similar methods - $this->markAuthenticationCall($res); - - if ($res) { - // call the post-authenticate callback if registered. - if ($this->_postAuthenticateCallbackFunction) { - $args = $this->_postAuthenticateCallbackArgs; - array_unshift($args, $logoutTicket); - call_user_func_array( - $this->_postAuthenticateCallbackFunction, $args - ); - } - - // if called with a ticket parameter, we need to redirect to the - // app without the ticket so that CAS-ification is transparent - // to the browser (for later POSTS) most of the checks and - // errors should have been made now, so we're safe for redirect - // without masking error messages. remove the ticket as a - // security precaution to prevent a ticket in the HTTP_REFERRER - if ($this->_clearTicketsFromUrl) { - phpCAS::trace("Prepare redirect to : ".$this->getURL()); - session_write_close(); - header('Location: '.$this->getURL()); - flush(); - phpCAS::traceExit(); - throw new CAS_GracefullTerminationException(); - } - } - } - phpCAS::traceEnd($res); - return $res; - } - - /** - * This method tells if the current session is authenticated. - * - * @return bool true if authenticated based soley on $_SESSION variable - */ - public function isSessionAuthenticated () - { - return !!$this->getSessionValue('user'); - } - - /** - * This method tells if the user has already been (previously) authenticated - * by looking into the session variables. - * - * @note This function switches to callback mode when needed. - * - * @return bool true when the user has already been authenticated; false otherwise. - */ - private function _wasPreviouslyAuthenticated() - { - phpCAS::traceBegin(); - - if ( $this->_isCallbackMode() ) { - // Rebroadcast the pgtIou and pgtId to all nodes - if ($this->_rebroadcast&&!isset($_POST['rebroadcast'])) { - $this->_rebroadcast(self::PGTIOU); - } - $this->_callback(); - } - - $auth = false; - - if ( $this->isProxy() ) { - // CAS proxy: username and PGT must be present - if ( $this->isSessionAuthenticated() - && $this->getSessionValue('pgt') - ) { - // authentication already done - $this->_setUser($this->getSessionValue('user')); - if ($this->hasSessionValue('attributes')) { - $this->setAttributes($this->getSessionValue('attributes')); - } - $this->_setPGT($this->getSessionValue('pgt')); - phpCAS::trace( - 'user = `'.$this->getSessionValue('user').'\', PGT = `' - .$this->getSessionValue('pgt').'\'' - ); - - // Include the list of proxies - if ($this->hasSessionValue('proxies')) { - $this->_setProxies($this->getSessionValue('proxies')); - phpCAS::trace( - 'proxies = "' - .implode('", "', $this->getSessionValue('proxies')).'"' - ); - } - - $auth = true; - } elseif ( $this->isSessionAuthenticated() - && !$this->getSessionValue('pgt') - ) { - // these two variables should be empty or not empty at the same time - phpCAS::trace( - 'username found (`'.$this->getSessionValue('user') - .'\') but PGT is empty' - ); - // unset all tickets to enforce authentication - $this->clearSessionValues(); - $this->setTicket(''); - } elseif ( !$this->isSessionAuthenticated() - && $this->getSessionValue('pgt') - ) { - // these two variables should be empty or not empty at the same time - phpCAS::trace( - 'PGT found (`'.$this->getSessionValue('pgt') - .'\') but username is empty' - ); - // unset all tickets to enforce authentication - $this->clearSessionValues(); - $this->setTicket(''); - } else { - phpCAS::trace('neither user nor PGT found'); - } - } else { - // `simple' CAS client (not a proxy): username must be present - if ( $this->isSessionAuthenticated() ) { - // authentication already done - $this->_setUser($this->getSessionValue('user')); - if ($this->hasSessionValue('attributes')) { - $this->setAttributes($this->getSessionValue('attributes')); - } - phpCAS::trace('user = `'.$this->getSessionValue('user').'\''); - - // Include the list of proxies - if ($this->hasSessionValue('proxies')) { - $this->_setProxies($this->getSessionValue('proxies')); - phpCAS::trace( - 'proxies = "' - .implode('", "', $this->getSessionValue('proxies')).'"' - ); - } - - $auth = true; - } else { - phpCAS::trace('no user found'); - } - } - - phpCAS::traceEnd($auth); - return $auth; - } - - /** - * This method is used to redirect the client to the CAS server. - * It is used by CAS_Client::forceAuthentication() and - * CAS_Client::checkAuthentication(). - * - * @param bool $gateway true to check authentication, false to force it - * @param bool $renew true to force the authentication with the CAS server - * - * @return void - */ - public function redirectToCas($gateway=false,$renew=false) - { - phpCAS::traceBegin(); - $cas_url = $this->getServerLoginURL($gateway, $renew); - session_write_close(); - if (php_sapi_name() === 'cli') { - @header('Location: '.$cas_url); - } else { - header('Location: '.$cas_url); - } - phpCAS::trace("Redirect to : ".$cas_url); - $lang = $this->getLangObj(); - $this->printHTMLHeader($lang->getAuthenticationWanted()); - $this->printf('

'. $lang->getShouldHaveBeenRedirected(). '

', $cas_url); - $this->printHTMLFooter(); - phpCAS::traceExit(); - throw new CAS_GracefullTerminationException(); - } - - - /** - * This method is used to logout from CAS. - * - * @param array $params an array that contains the optional url and service - * parameters that will be passed to the CAS server - * - * @return void - */ - public function logout($params) - { - phpCAS::traceBegin(); - $cas_url = $this->getServerLogoutURL(); - $paramSeparator = '?'; - if (isset($params['url'])) { - $cas_url = $cas_url . $paramSeparator . "url=" - . urlencode($params['url']); - $paramSeparator = '&'; - } - if (isset($params['service'])) { - $cas_url = $cas_url . $paramSeparator . "service=" - . urlencode($params['service']); - } - header('Location: '.$cas_url); - phpCAS::trace("Prepare redirect to : ".$cas_url); - - phpCAS::trace("Destroying session : ".session_id()); - session_unset(); - session_destroy(); - if (session_status() === PHP_SESSION_NONE) { - phpCAS::trace("Session terminated"); - } else { - phpCAS::error("Session was not terminated"); - phpCAS::trace("Session was not terminated"); - } - $lang = $this->getLangObj(); - $this->printHTMLHeader($lang->getLogout()); - $this->printf('

'.$lang->getShouldHaveBeenRedirected(). '

', $cas_url); - $this->printHTMLFooter(); - phpCAS::traceExit(); - throw new CAS_GracefullTerminationException(); - } - - /** - * Check of the current request is a logout request - * - * @return bool is logout request. - */ - private function _isLogoutRequest() - { - return !empty($_POST['logoutRequest']); - } - - /** - * This method handles logout requests. - * - * @param bool $check_client true to check the client bofore handling - * the request, false not to perform any access control. True by default. - * @param array $allowed_clients an array of host names allowed to send - * logout requests. - * - * @return void - */ - public function handleLogoutRequests($check_client=true, $allowed_clients=array()) - { - phpCAS::traceBegin(); - if (!$this->_isLogoutRequest()) { - phpCAS::trace("Not a logout request"); - phpCAS::traceEnd(); - return; - } - if (!$this->getChangeSessionID() - && is_null($this->_signoutCallbackFunction) - ) { - phpCAS::trace( - "phpCAS can't handle logout requests if it is not allowed to change session_id." - ); - } - phpCAS::trace("Logout requested"); - $decoded_logout_rq = urldecode($_POST['logoutRequest']); - phpCAS::trace("SAML REQUEST: ".$decoded_logout_rq); - $allowed = false; - if ($check_client) { - if ($allowed_clients === array()) { - $allowed_clients = array( $this->_getServerHostname() ); - } - $client_ip = $_SERVER['REMOTE_ADDR']; - $client = gethostbyaddr($client_ip); - phpCAS::trace("Client: ".$client."/".$client_ip); - foreach ($allowed_clients as $allowed_client) { - if (($client == $allowed_client) - || ($client_ip == $allowed_client) - ) { - phpCAS::trace( - "Allowed client '".$allowed_client - ."' matches, logout request is allowed" - ); - $allowed = true; - break; - } else { - phpCAS::trace( - "Allowed client '".$allowed_client."' does not match" - ); - } - } - } else { - phpCAS::trace("No access control set"); - $allowed = true; - } - // If Logout command is permitted proceed with the logout - if ($allowed) { - phpCAS::trace("Logout command allowed"); - // Rebroadcast the logout request - if ($this->_rebroadcast && !isset($_POST['rebroadcast'])) { - $this->_rebroadcast(self::LOGOUT); - } - // Extract the ticket from the SAML Request - preg_match( - "|(.*)|", - $decoded_logout_rq, $tick, PREG_OFFSET_CAPTURE, 3 - ); - $wrappedSamlSessionIndex = preg_replace( - '||', '', $tick[0][0] - ); - $ticket2logout = preg_replace( - '||', '', $wrappedSamlSessionIndex - ); - phpCAS::trace("Ticket to logout: ".$ticket2logout); - - // call the post-authenticate callback if registered. - if ($this->_signoutCallbackFunction) { - $args = $this->_signoutCallbackArgs; - array_unshift($args, $ticket2logout); - call_user_func_array($this->_signoutCallbackFunction, $args); - } - - // If phpCAS is managing the session_id, destroy session thanks to - // session_id. - if ($this->getChangeSessionID()) { - $session_id = $this->_sessionIdForTicket($ticket2logout); - phpCAS::trace("Session id: ".$session_id); - - // destroy a possible application session created before phpcas - if (session_id() !== "") { - session_unset(); - session_destroy(); - } - // fix session ID - session_id($session_id); - $_COOKIE[session_name()]=$session_id; - $_GET[session_name()]=$session_id; - - // Overwrite session - session_start(); - session_unset(); - session_destroy(); - phpCAS::trace("Session ". $session_id . " destroyed"); - } - } else { - phpCAS::error("Unauthorized logout request from client '".$client."'"); - phpCAS::trace("Unauthorized logout request from client '".$client."'"); - } - flush(); - phpCAS::traceExit(); - throw new CAS_GracefullTerminationException(); - - } - - /** @} */ - - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - // XX XX - // XX BASIC CLIENT FEATURES (CAS 1.0) XX - // XX XX - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - - // ######################################################################## - // ST - // ######################################################################## - /** - * @addtogroup internalBasic - * @{ - */ - - /** - * The Ticket provided in the URL of the request if present - * (empty otherwise). Written by CAS_Client::CAS_Client(), read by - * CAS_Client::getTicket() and CAS_Client::_hasPGT(). - * - * @hideinitializer - */ - private $_ticket = ''; - - /** - * This method returns the Service Ticket provided in the URL of the request. - * - * @return string service ticket. - */ - public function getTicket() - { - return $this->_ticket; - } - - /** - * This method stores the Service Ticket. - * - * @param string $st The Service Ticket. - * - * @return void - */ - public function setTicket($st) - { - $this->_ticket = $st; - } - - /** - * This method tells if a Service Ticket was stored. - * - * @return bool if a Service Ticket has been stored. - */ - public function hasTicket() - { - return !empty($this->_ticket); - } - - /** @} */ - - // ######################################################################## - // ST VALIDATION - // ######################################################################## - /** - * @addtogroup internalBasic - * @{ - */ - - /** - * @var string the certificate of the CAS server CA. - * - * @hideinitializer - */ - private $_cas_server_ca_cert = null; - - - /** - - * validate CN of the CAS server certificate - - * - - * @hideinitializer - - */ - - private $_cas_server_cn_validate = true; - - /** - * Set to true not to validate the CAS server. - * - * @hideinitializer - */ - private $_no_cas_server_validation = false; - - - /** - * Set the CA certificate of the CAS server. - * - * @param string $cert the PEM certificate file name of the CA that emited - * the cert of the server - * @param bool $validate_cn valiate CN of the CAS server certificate - * - * @return void - */ - public function setCasServerCACert($cert, $validate_cn) - { - // Argument validation - if (gettype($cert) != 'string') { - throw new CAS_TypeMismatchException($cert, '$cert', 'string'); - } - if (gettype($validate_cn) != 'boolean') { - throw new CAS_TypeMismatchException($validate_cn, '$validate_cn', 'boolean'); - } - if (!file_exists($cert)) { - throw new CAS_InvalidArgumentException("Certificate file does not exist " . $this->_requestImplementation); - } - $this->_cas_server_ca_cert = $cert; - $this->_cas_server_cn_validate = $validate_cn; - } - - /** - * Set no SSL validation for the CAS server. - * - * @return void - */ - public function setNoCasServerValidation() - { - $this->_no_cas_server_validation = true; - } - - /** - * This method is used to validate a CAS 1,0 ticket; halt on failure, and - * sets $validate_url, $text_reponse and $tree_response on success. - * - * @param string &$validate_url reference to the the URL of the request to - * the CAS server. - * @param string &$text_response reference to the response of the CAS - * server, as is (XML text). - * @param string &$tree_response reference to the response of the CAS - * server, as a DOM XML tree. - * @param bool $renew true to force the authentication with the CAS server - * - * @return bool true when successfull and issue a CAS_AuthenticationException - * and false on an error - * @throws CAS_AuthenticationException - */ - public function validateCAS10(&$validate_url,&$text_response,&$tree_response,$renew=false) - { - phpCAS::traceBegin(); - // build the URL to validate the ticket - $validate_url = $this->getServerServiceValidateURL() - .'&ticket='.urlencode($this->getTicket()); - - if ( $renew ) { - // pass the renew - $validate_url .= '&renew=true'; - } - - $headers = ''; - $err_msg = ''; - // open and read the URL - if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) { - phpCAS::trace( - 'could not open URL \''.$validate_url.'\' to validate ('.$err_msg.')' - ); - throw new CAS_AuthenticationException( - $this, 'CAS 1.0 ticket not validated', $validate_url, - true/*$no_response*/ - ); - } - - if (preg_match('/^no\n/', $text_response)) { - phpCAS::trace('Ticket has not been validated'); - throw new CAS_AuthenticationException( - $this, 'ST not validated', $validate_url, false/*$no_response*/, - false/*$bad_response*/, $text_response - ); - } else if (!preg_match('/^yes\n/', $text_response)) { - phpCAS::trace('ill-formed response'); - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, $text_response - ); - } - // ticket has been validated, extract the user name - $arr = preg_split('/\n/', $text_response); - $this->_setUser(trim($arr[1])); - - $this->_renameSession($this->getTicket()); - - // at this step, ticket has been validated and $this->_user has been set, - phpCAS::traceEnd(true); - return true; - } - - /** @} */ - - - // ######################################################################## - // SAML VALIDATION - // ######################################################################## - /** - * @addtogroup internalSAML - * @{ - */ - - /** - * This method is used to validate a SAML TICKET; halt on failure, and sets - * $validate_url, $text_reponse and $tree_response on success. These - * parameters are used later by CAS_Client::_validatePGT() for CAS proxies. - * - * @param string &$validate_url reference to the the URL of the request to - * the CAS server. - * @param string &$text_response reference to the response of the CAS - * server, as is (XML text). - * @param string &$tree_response reference to the response of the CAS - * server, as a DOM XML tree. - * @param bool $renew true to force the authentication with the CAS server - * - * @return bool true when successfull and issue a CAS_AuthenticationException - * and false on an error - * - * @throws CAS_AuthenticationException - */ - public function validateSA(&$validate_url,&$text_response,&$tree_response,$renew=false) - { - phpCAS::traceBegin(); - $result = false; - // build the URL to validate the ticket - $validate_url = $this->getServerSamlValidateURL(); - - if ( $renew ) { - // pass the renew - $validate_url .= '&renew=true'; - } - - $headers = ''; - $err_msg = ''; - // open and read the URL - if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) { - phpCAS::trace( - 'could not open URL \''.$validate_url.'\' to validate ('.$err_msg.')' - ); - throw new CAS_AuthenticationException( - $this, 'SA not validated', $validate_url, true/*$no_response*/ - ); - } - - phpCAS::trace('server version: '.$this->getServerVersion()); - - // analyze the result depending on the version - switch ($this->getServerVersion()) { - case SAML_VERSION_1_1: - // create new DOMDocument Object - $dom = new DOMDocument(); - // Fix possible whitspace problems - $dom->preserveWhiteSpace = false; - // read the response of the CAS server into a DOM object - if (!($dom->loadXML($text_response))) { - phpCAS::trace('dom->loadXML() failed'); - throw new CAS_AuthenticationException( - $this, 'SA not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, - $text_response - ); - } - // read the root node of the XML tree - if (!($tree_response = $dom->documentElement)) { - phpCAS::trace('documentElement() failed'); - throw new CAS_AuthenticationException( - $this, 'SA not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, - $text_response - ); - } else if ( $tree_response->localName != 'Envelope' ) { - // insure that tag name is 'Envelope' - phpCAS::trace( - 'bad XML root node (should be `Envelope\' instead of `' - .$tree_response->localName.'\'' - ); - throw new CAS_AuthenticationException( - $this, 'SA not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, - $text_response - ); - } else if ($tree_response->getElementsByTagName("NameIdentifier")->length != 0) { - // check for the NameIdentifier tag in the SAML response - $success_elements = $tree_response->getElementsByTagName("NameIdentifier"); - phpCAS::trace('NameIdentifier found'); - $user = trim($success_elements->item(0)->nodeValue); - phpCAS::trace('user = `'.$user.'`'); - $this->_setUser($user); - $this->_setSessionAttributes($text_response); - $result = true; - } else { - phpCAS::trace('no tag found in SAML payload'); - throw new CAS_AuthenticationException( - $this, 'SA not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, - $text_response - ); - } - } - if ($result) { - $this->_renameSession($this->getTicket()); - } - // at this step, ST has been validated and $this->_user has been set, - phpCAS::traceEnd($result); - return $result; - } - - /** - * This method will parse the DOM and pull out the attributes from the SAML - * payload and put them into an array, then put the array into the session. - * - * @param string $text_response the SAML payload. - * - * @return bool true when successfull and false if no attributes a found - */ - private function _setSessionAttributes($text_response) - { - phpCAS::traceBegin(); - - $result = false; - - $attr_array = array(); - - // create new DOMDocument Object - $dom = new DOMDocument(); - // Fix possible whitspace problems - $dom->preserveWhiteSpace = false; - if (($dom->loadXML($text_response))) { - $xPath = new DOMXPath($dom); - $xPath->registerNamespace('samlp', 'urn:oasis:names:tc:SAML:1.0:protocol'); - $xPath->registerNamespace('saml', 'urn:oasis:names:tc:SAML:1.0:assertion'); - $nodelist = $xPath->query("//saml:Attribute"); - - if ($nodelist) { - foreach ($nodelist as $node) { - $xres = $xPath->query("saml:AttributeValue", $node); - $name = $node->getAttribute("AttributeName"); - $value_array = array(); - foreach ($xres as $node2) { - $value_array[] = $node2->nodeValue; - } - $attr_array[$name] = $value_array; - } - // UGent addition... - foreach ($attr_array as $attr_key => $attr_value) { - if (count($attr_value) > 1) { - $this->_attributes[$attr_key] = $attr_value; - phpCAS::trace("* " . $attr_key . "=" . print_r($attr_value, true)); - } else { - $this->_attributes[$attr_key] = $attr_value[0]; - phpCAS::trace("* " . $attr_key . "=" . $attr_value[0]); - } - } - $result = true; - } else { - phpCAS::trace("SAML Attributes are empty"); - $result = false; - } - } - phpCAS::traceEnd($result); - return $result; - } - - /** @} */ - - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - // XX XX - // XX PROXY FEATURES (CAS 2.0) XX - // XX XX - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - - // ######################################################################## - // PROXYING - // ######################################################################## - /** - * @addtogroup internalProxy - * @{ - */ - - /** - * @var bool is the client a proxy - * A boolean telling if the client is a CAS proxy or not. Written by - * CAS_Client::CAS_Client(), read by CAS_Client::isProxy(). - */ - private $_proxy; - - /** - * @var CAS_CookieJar Handler for managing service cookies. - */ - private $_serviceCookieJar; - - /** - * Tells if a CAS client is a CAS proxy or not - * - * @return bool true when the CAS client is a CAS proxy, false otherwise - */ - public function isProxy() - { - return $this->_proxy; - } - - - /** @} */ - // ######################################################################## - // PGT - // ######################################################################## - /** - * @addtogroup internalProxy - * @{ - */ - - /** - * the Proxy Grnting Ticket given by the CAS server (empty otherwise). - * Written by CAS_Client::_setPGT(), read by CAS_Client::_getPGT() and - * CAS_Client::_hasPGT(). - * - * @hideinitializer - */ - private $_pgt = ''; - - /** - * This method returns the Proxy Granting Ticket given by the CAS server. - * - * @return string the Proxy Granting Ticket. - */ - private function _getPGT() - { - return $this->_pgt; - } - - /** - * This method stores the Proxy Granting Ticket. - * - * @param string $pgt The Proxy Granting Ticket. - * - * @return void - */ - private function _setPGT($pgt) - { - $this->_pgt = $pgt; - } - - /** - * This method tells if a Proxy Granting Ticket was stored. - * - * @return bool true if a Proxy Granting Ticket has been stored. - */ - private function _hasPGT() - { - return !empty($this->_pgt); - } - - /** @} */ - - // ######################################################################## - // CALLBACK MODE - // ######################################################################## - /** - * @addtogroup internalCallback - * @{ - */ - /** - * each PHP script using phpCAS in proxy mode is its own callback to get the - * PGT back from the CAS server. callback_mode is detected by the constructor - * thanks to the GET parameters. - */ - - /** - * @var bool a boolean to know if the CAS client is running in callback mode. Written by - * CAS_Client::setCallBackMode(), read by CAS_Client::_isCallbackMode(). - * - * @hideinitializer - */ - private $_callback_mode = false; - - /** - * This method sets/unsets callback mode. - * - * @param bool $callback_mode true to set callback mode, false otherwise. - * - * @return void - */ - private function _setCallbackMode($callback_mode) - { - $this->_callback_mode = $callback_mode; - } - - /** - * This method returns true when the CAS client is running in callback mode, - * false otherwise. - * - * @return bool A boolean. - */ - private function _isCallbackMode() - { - return $this->_callback_mode; - } - - /** - * @var bool a boolean to know if the CAS client is using POST parameters when in callback mode. - * Written by CAS_Client::_setCallbackModeUsingPost(), read by CAS_Client::_isCallbackModeUsingPost(). - * - * @hideinitializer - */ - private $_callback_mode_using_post = false; - - /** - * This method sets/unsets usage of POST parameters in callback mode (default/false is GET parameters) - * - * @param bool $callback_mode_using_post true to use POST, false to use GET (default). - * - * @return void - */ - private function _setCallbackModeUsingPost($callback_mode_using_post) - { - $this->_callback_mode_using_post = $callback_mode_using_post; - } - - /** - * This method returns true when the callback mode is using POST, false otherwise. - * - * @return bool A boolean. - */ - private function _isCallbackModeUsingPost() - { - return $this->_callback_mode_using_post; - } - - /** - * the URL that should be used for the PGT callback (in fact the URL of the - * current request without any CGI parameter). Written and read by - * CAS_Client::_getCallbackURL(). - * - * @hideinitializer - */ - private $_callback_url = ''; - - /** - * This method returns the URL that should be used for the PGT callback (in - * fact the URL of the current request without any CGI parameter, except if - * phpCAS::setFixedCallbackURL() was used). - * - * @return string The callback URL - */ - private function _getCallbackURL() - { - // the URL is built when needed only - if ( empty($this->_callback_url) ) { - // remove the ticket if present in the URL - $final_uri = $this->getServiceBaseUrl()->get(); - $request_uri = $_SERVER['REQUEST_URI']; - $request_uri = preg_replace('/\?.*$/', '', $request_uri); - $final_uri .= $request_uri; - $this->_callback_url = $final_uri; - } - return $this->_callback_url; - } - - /** - * This method sets the callback url. - * - * @param string $url url to set callback - * - * @return string the callback url - */ - public function setCallbackURL($url) - { - // Sequence validation - $this->ensureIsProxy(); - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - return $this->_callback_url = $url; - } - - /** - * This method is called by CAS_Client::CAS_Client() when running in callback - * mode. It stores the PGT and its PGT Iou, prints its output and halts. - * - * @return void - */ - private function _callback() - { - phpCAS::traceBegin(); - if ($this->_isCallbackModeUsingPost()) { - $pgtId = $_POST['pgtId']; - $pgtIou = $_POST['pgtIou']; - } else { - $pgtId = $_GET['pgtId']; - $pgtIou = $_GET['pgtIou']; - } - if (preg_match('/^PGTIOU-[\.\-\w]+$/', $pgtIou)) { - if (preg_match('/^[PT]GT-[\.\-\w]+$/', $pgtId)) { - phpCAS::trace('Storing PGT `'.$pgtId.'\' (id=`'.$pgtIou.'\')'); - $this->_storePGT($pgtId, $pgtIou); - if ($this->isXmlResponse()) { - echo '' . "\r\n"; - echo ''; - phpCAS::traceExit("XML response sent"); - } else { - $this->printHTMLHeader('phpCAS callback'); - echo '

Storing PGT `'.$pgtId.'\' (id=`'.$pgtIou.'\').

'; - $this->printHTMLFooter(); - phpCAS::traceExit("HTML response sent"); - } - phpCAS::traceExit("Successfull Callback"); - } else { - phpCAS::error('PGT format invalid' . $pgtId); - phpCAS::traceExit('PGT format invalid' . $pgtId); - } - } else { - phpCAS::error('PGTiou format invalid' . $pgtIou); - phpCAS::traceExit('PGTiou format invalid' . $pgtIou); - } - - // Flush the buffer to prevent from sending anything other then a 200 - // Success Status back to the CAS Server. The Exception would normally - // report as a 500 error. - flush(); - throw new CAS_GracefullTerminationException(); - } - - /** - * Check if application/xml or text/xml is pressent in HTTP_ACCEPT header values - * when return value is complex and contains attached q parameters. - * Example: HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9 - * @return bool - */ - private function isXmlResponse() - { - if (!array_key_exists('HTTP_ACCEPT', $_SERVER)) { - return false; - } - if (strpos($_SERVER['HTTP_ACCEPT'], 'application/xml') === false && strpos($_SERVER['HTTP_ACCEPT'], 'text/xml') === false) { - return false; - } - - return true; - } - - /** @} */ - - // ######################################################################## - // PGT STORAGE - // ######################################################################## - /** - * @addtogroup internalPGTStorage - * @{ - */ - - /** - * @var CAS_PGTStorage_AbstractStorage - * an instance of a class inheriting of PGTStorage, used to deal with PGT - * storage. Created by CAS_Client::setPGTStorageFile(), used - * by CAS_Client::setPGTStorageFile() and CAS_Client::_initPGTStorage(). - * - * @hideinitializer - */ - private $_pgt_storage = null; - - /** - * This method is used to initialize the storage of PGT's. - * Halts on error. - * - * @return void - */ - private function _initPGTStorage() - { - // if no SetPGTStorageXxx() has been used, default to file - if ( !is_object($this->_pgt_storage) ) { - $this->setPGTStorageFile(); - } - - // initializes the storage - $this->_pgt_storage->init(); - } - - /** - * This method stores a PGT. Halts on error. - * - * @param string $pgt the PGT to store - * @param string $pgt_iou its corresponding Iou - * - * @return void - */ - private function _storePGT($pgt,$pgt_iou) - { - // ensure that storage is initialized - $this->_initPGTStorage(); - // writes the PGT - $this->_pgt_storage->write($pgt, $pgt_iou); - } - - /** - * This method reads a PGT from its Iou and deletes the corresponding - * storage entry. - * - * @param string $pgt_iou the PGT Iou - * - * @return string mul The PGT corresponding to the Iou, false when not found. - */ - private function _loadPGT($pgt_iou) - { - // ensure that storage is initialized - $this->_initPGTStorage(); - // read the PGT - return $this->_pgt_storage->read($pgt_iou); - } - - /** - * This method can be used to set a custom PGT storage object. - * - * @param CAS_PGTStorage_AbstractStorage $storage a PGT storage object that - * inherits from the CAS_PGTStorage_AbstractStorage class - * - * @return void - */ - public function setPGTStorage($storage) - { - // Sequence validation - $this->ensureIsProxy(); - - // check that the storage has not already been set - if ( is_object($this->_pgt_storage) ) { - phpCAS::error('PGT storage already defined'); - } - - // check to make sure a valid storage object was specified - if ( !($storage instanceof CAS_PGTStorage_AbstractStorage) ) - throw new CAS_TypeMismatchException($storage, '$storage', 'CAS_PGTStorage_AbstractStorage object'); - - // store the PGTStorage object - $this->_pgt_storage = $storage; - } - - /** - * This method is used to tell phpCAS to store the response of the - * CAS server to PGT requests in a database. - * - * @param string|PDO $dsn_or_pdo a dsn string to use for creating a PDO - * object or a PDO object - * @param string $username the username to use when connecting to the - * database - * @param string $password the password to use when connecting to the - * database - * @param string $table the table to use for storing and retrieving - * PGTs - * @param string $driver_options any driver options to use when connecting - * to the database - * - * @return void - */ - public function setPGTStorageDb( - $dsn_or_pdo, $username='', $password='', $table='', $driver_options=null - ) { - // Sequence validation - $this->ensureIsProxy(); - - // Argument validation - if (!(is_object($dsn_or_pdo) && $dsn_or_pdo instanceof PDO) && !is_string($dsn_or_pdo)) - throw new CAS_TypeMismatchException($dsn_or_pdo, '$dsn_or_pdo', 'string or PDO object'); - if (gettype($username) != 'string') - throw new CAS_TypeMismatchException($username, '$username', 'string'); - if (gettype($password) != 'string') - throw new CAS_TypeMismatchException($password, '$password', 'string'); - if (gettype($table) != 'string') - throw new CAS_TypeMismatchException($table, '$password', 'string'); - - // create the storage object - $this->setPGTStorage( - new CAS_PGTStorage_Db( - $this, $dsn_or_pdo, $username, $password, $table, $driver_options - ) - ); - } - - /** - * This method is used to tell phpCAS to store the response of the - * CAS server to PGT requests onto the filesystem. - * - * @param string $path the path where the PGT's should be stored - * - * @return void - */ - public function setPGTStorageFile($path='') - { - // Sequence validation - $this->ensureIsProxy(); - - // Argument validation - if (gettype($path) != 'string') - throw new CAS_TypeMismatchException($path, '$path', 'string'); - - // create the storage object - $this->setPGTStorage(new CAS_PGTStorage_File($this, $path)); - } - - - // ######################################################################## - // PGT VALIDATION - // ######################################################################## - /** - * This method is used to validate a PGT; halt on failure. - * - * @param string &$validate_url the URL of the request to the CAS server. - * @param string $text_response the response of the CAS server, as is - * (XML text); result of - * CAS_Client::validateCAS10() or - * CAS_Client::validateCAS20(). - * @param DOMElement $tree_response the response of the CAS server, as a DOM XML - * tree; result of CAS_Client::validateCAS10() or CAS_Client::validateCAS20(). - * - * @return bool true when successfull and issue a CAS_AuthenticationException - * and false on an error - * - * @throws CAS_AuthenticationException - */ - private function _validatePGT(&$validate_url,$text_response,$tree_response) - { - phpCAS::traceBegin(); - if ( $tree_response->getElementsByTagName("proxyGrantingTicket")->length == 0) { - phpCAS::trace(' not found'); - // authentication succeded, but no PGT Iou was transmitted - throw new CAS_AuthenticationException( - $this, 'Ticket validated but no PGT Iou transmitted', - $validate_url, false/*$no_response*/, false/*$bad_response*/, - $text_response - ); - } else { - // PGT Iou transmitted, extract it - $pgt_iou = trim( - $tree_response->getElementsByTagName("proxyGrantingTicket")->item(0)->nodeValue - ); - if (preg_match('/^PGTIOU-[\.\-\w]+$/', $pgt_iou)) { - $pgt = $this->_loadPGT($pgt_iou); - if ( $pgt == false ) { - phpCAS::trace('could not load PGT'); - throw new CAS_AuthenticationException( - $this, - 'PGT Iou was transmitted but PGT could not be retrieved', - $validate_url, false/*$no_response*/, - false/*$bad_response*/, $text_response - ); - } - $this->_setPGT($pgt); - } else { - phpCAS::trace('PGTiou format error'); - throw new CAS_AuthenticationException( - $this, 'PGT Iou was transmitted but has wrong format', - $validate_url, false/*$no_response*/, false/*$bad_response*/, - $text_response - ); - } - } - phpCAS::traceEnd(true); - return true; - } - - // ######################################################################## - // PGT VALIDATION - // ######################################################################## - - /** - * This method is used to retrieve PT's from the CAS server thanks to a PGT. - * - * @param string $target_service the service to ask for with the PT. - * @param int &$err_code an error code (PHPCAS_SERVICE_OK on success). - * @param string &$err_msg an error message (empty on success). - * - * @return string|false a Proxy Ticket, or false on error. - */ - public function retrievePT($target_service,&$err_code,&$err_msg) - { - // Argument validation - if (gettype($target_service) != 'string') - throw new CAS_TypeMismatchException($target_service, '$target_service', 'string'); - - phpCAS::traceBegin(); - - // by default, $err_msg is set empty and $pt to true. On error, $pt is - // set to false and $err_msg to an error message. At the end, if $pt is false - // and $error_msg is still empty, it is set to 'invalid response' (the most - // commonly encountered error). - $err_msg = ''; - - // build the URL to retrieve the PT - $cas_url = $this->getServerProxyURL().'?targetService=' - .urlencode($target_service).'&pgt='.$this->_getPGT(); - - $headers = ''; - $cas_response = ''; - // open and read the URL - if ( !$this->_readURL($cas_url, $headers, $cas_response, $err_msg) ) { - phpCAS::trace( - 'could not open URL \''.$cas_url.'\' to validate ('.$err_msg.')' - ); - $err_code = PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE; - $err_msg = 'could not retrieve PT (no response from the CAS server)'; - phpCAS::traceEnd(false); - return false; - } - - $bad_response = false; - - // create new DOMDocument object - $dom = new DOMDocument(); - // Fix possible whitspace problems - $dom->preserveWhiteSpace = false; - // read the response of the CAS server into a DOM object - if ( !($dom->loadXML($cas_response))) { - phpCAS::trace('dom->loadXML() failed'); - // read failed - $bad_response = true; - } - - if ( !$bad_response ) { - // read the root node of the XML tree - if ( !($root = $dom->documentElement) ) { - phpCAS::trace('documentElement failed'); - // read failed - $bad_response = true; - } - } - - if ( !$bad_response ) { - // insure that tag name is 'serviceResponse' - if ( $root->localName != 'serviceResponse' ) { - phpCAS::trace('localName failed'); - // bad root node - $bad_response = true; - } - } - - if ( !$bad_response ) { - // look for a proxySuccess tag - if ( $root->getElementsByTagName("proxySuccess")->length != 0) { - $proxy_success_list = $root->getElementsByTagName("proxySuccess"); - - // authentication succeded, look for a proxyTicket tag - if ( $proxy_success_list->item(0)->getElementsByTagName("proxyTicket")->length != 0) { - $err_code = PHPCAS_SERVICE_OK; - $err_msg = ''; - $pt = trim( - $proxy_success_list->item(0)->getElementsByTagName("proxyTicket")->item(0)->nodeValue - ); - phpCAS::trace('original PT: '.trim($pt)); - phpCAS::traceEnd($pt); - return $pt; - } else { - phpCAS::trace(' was found, but not '); - } - } else if ($root->getElementsByTagName("proxyFailure")->length != 0) { - // look for a proxyFailure tag - $proxy_failure_list = $root->getElementsByTagName("proxyFailure"); - - // authentication failed, extract the error - $err_code = PHPCAS_SERVICE_PT_FAILURE; - $err_msg = 'PT retrieving failed (code=`' - .$proxy_failure_list->item(0)->getAttribute('code') - .'\', message=`' - .trim($proxy_failure_list->item(0)->nodeValue) - .'\')'; - phpCAS::traceEnd(false); - return false; - } else { - phpCAS::trace('neither nor found'); - } - } - - // at this step, we are sure that the response of the CAS server was - // illformed - $err_code = PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE; - $err_msg = 'Invalid response from the CAS server (response=`' - .$cas_response.'\')'; - - phpCAS::traceEnd(false); - return false; - } - - /** @} */ - - // ######################################################################## - // READ CAS SERVER ANSWERS - // ######################################################################## - - /** - * @addtogroup internalMisc - * @{ - */ - - /** - * This method is used to acces a remote URL. - * - * @param string $url the URL to access. - * @param string &$headers an array containing the HTTP header lines of the - * response (an empty array on failure). - * @param string &$body the body of the response, as a string (empty on - * failure). - * @param string &$err_msg an error message, filled on failure. - * - * @return bool true on success, false otherwise (in this later case, $err_msg - * contains an error message). - */ - private function _readURL($url, &$headers, &$body, &$err_msg) - { - phpCAS::traceBegin(); - $className = $this->_requestImplementation; - $request = new $className(); - - if (count($this->_curl_options)) { - $request->setCurlOptions($this->_curl_options); - } - - $request->setUrl($url); - - if (empty($this->_cas_server_ca_cert) && !$this->_no_cas_server_validation) { - phpCAS::error( - 'one of the methods phpCAS::setCasServerCACert() or phpCAS::setNoCasServerValidation() must be called.' - ); - } - if ($this->_cas_server_ca_cert != '') { - $request->setSslCaCert( - $this->_cas_server_ca_cert, $this->_cas_server_cn_validate - ); - } - - // add extra stuff if SAML - if ($this->getServerVersion() == SAML_VERSION_1_1) { - $request->addHeader("soapaction: http://www.oasis-open.org/committees/security"); - $request->addHeader("cache-control: no-cache"); - $request->addHeader("pragma: no-cache"); - $request->addHeader("accept: text/xml"); - $request->addHeader("connection: keep-alive"); - $request->addHeader("content-type: text/xml"); - $request->makePost(); - $request->setPostBody($this->_buildSAMLPayload()); - } - - if ($request->send()) { - $headers = $request->getResponseHeaders(); - $body = $request->getResponseBody(); - $err_msg = ''; - phpCAS::traceEnd(true); - return true; - } else { - $headers = ''; - $body = ''; - $err_msg = $request->getErrorMessage(); - phpCAS::traceEnd(false); - return false; - } - } - - /** - * This method is used to build the SAML POST body sent to /samlValidate URL. - * - * @return string the SOAP-encased SAMLP artifact (the ticket). - */ - private function _buildSAMLPayload() - { - phpCAS::traceBegin(); - - //get the ticket - $sa = urlencode($this->getTicket()); - - $body = SAML_SOAP_ENV.SAML_SOAP_BODY.SAMLP_REQUEST - .SAML_ASSERTION_ARTIFACT.$sa.SAML_ASSERTION_ARTIFACT_CLOSE - .SAMLP_REQUEST_CLOSE.SAML_SOAP_BODY_CLOSE.SAML_SOAP_ENV_CLOSE; - - phpCAS::traceEnd($body); - return ($body); - } - - /** @} **/ - - // ######################################################################## - // ACCESS TO EXTERNAL SERVICES - // ######################################################################## - - /** - * @addtogroup internalProxyServices - * @{ - */ - - - /** - * Answer a proxy-authenticated service handler. - * - * @param string $type The service type. One of: - * PHPCAS_PROXIED_SERVICE_HTTP_GET, PHPCAS_PROXIED_SERVICE_HTTP_POST, - * PHPCAS_PROXIED_SERVICE_IMAP - * - * @return CAS_ProxiedService - * @throws InvalidArgumentException If the service type is unknown. - */ - public function getProxiedService ($type) - { - // Sequence validation - $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); - - // Argument validation - if (gettype($type) != 'string') - throw new CAS_TypeMismatchException($type, '$type', 'string'); - - switch ($type) { - case PHPCAS_PROXIED_SERVICE_HTTP_GET: - case PHPCAS_PROXIED_SERVICE_HTTP_POST: - $requestClass = $this->_requestImplementation; - $request = new $requestClass(); - if (count($this->_curl_options)) { - $request->setCurlOptions($this->_curl_options); - } - $proxiedService = new $type($request, $this->_serviceCookieJar); - if ($proxiedService instanceof CAS_ProxiedService_Testable) { - $proxiedService->setCasClient($this); - } - return $proxiedService; - case PHPCAS_PROXIED_SERVICE_IMAP; - $proxiedService = new CAS_ProxiedService_Imap($this->_getUser()); - if ($proxiedService instanceof CAS_ProxiedService_Testable) { - $proxiedService->setCasClient($this); - } - return $proxiedService; - default: - throw new CAS_InvalidArgumentException( - "Unknown proxied-service type, $type." - ); - } - } - - /** - * Initialize a proxied-service handler with the proxy-ticket it should use. - * - * @param CAS_ProxiedService $proxiedService service handler - * - * @return void - * - * @throws CAS_ProxyTicketException If there is a proxy-ticket failure. - * The code of the Exception will be one of: - * PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_FAILURE - * @throws CAS_ProxiedService_Exception If there is a failure getting the - * url from the proxied service. - */ - public function initializeProxiedService (CAS_ProxiedService $proxiedService) - { - // Sequence validation - $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); - - $url = $proxiedService->getServiceUrl(); - if (!is_string($url)) { - throw new CAS_ProxiedService_Exception( - "Proxied Service ".get_class($proxiedService) - ."->getServiceUrl() should have returned a string, returned a " - .gettype($url)." instead." - ); - } - $pt = $this->retrievePT($url, $err_code, $err_msg); - if (!$pt) { - throw new CAS_ProxyTicketException($err_msg, $err_code); - } - $proxiedService->setProxyTicket($pt); - } - - /** - * This method is used to access an HTTP[S] service. - * - * @param string $url the service to access. - * @param int &$err_code an error code Possible values are - * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, - * PHPCAS_SERVICE_NOT_AVAILABLE. - * @param string &$output the output of the service (also used to give an error - * message on failure). - * - * @return bool true on success, false otherwise (in this later case, $err_code - * gives the reason why it failed and $output contains an error message). - */ - public function serviceWeb($url,&$err_code,&$output) - { - // Sequence validation - $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); - - // Argument validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - try { - $service = $this->getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET); - $service->setUrl($url); - $service->send(); - $output = $service->getResponseBody(); - $err_code = PHPCAS_SERVICE_OK; - return true; - } catch (CAS_ProxyTicketException $e) { - $err_code = $e->getCode(); - $output = $e->getMessage(); - return false; - } catch (CAS_ProxiedService_Exception $e) { - $lang = $this->getLangObj(); - $output = sprintf( - $lang->getServiceUnavailable(), $url, $e->getMessage() - ); - $err_code = PHPCAS_SERVICE_NOT_AVAILABLE; - return false; - } - } - - /** - * This method is used to access an IMAP/POP3/NNTP service. - * - * @param string $url a string giving the URL of the service, including - * the mailing box for IMAP URLs, as accepted by imap_open(). - * @param string $serviceUrl a string giving for CAS retrieve Proxy ticket - * @param string $flags options given to imap_open(). - * @param int &$err_code an error code Possible values are - * PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, - * PHPCAS_SERVICE_NOT_AVAILABLE. - * @param string &$err_msg an error message on failure - * @param string &$pt the Proxy Ticket (PT) retrieved from the CAS - * server to access the URL on success, false on error). - * - * @return object|false an IMAP stream on success, false otherwise (in this later - * case, $err_code gives the reason why it failed and $err_msg contains an - * error message). - */ - public function serviceMail($url,$serviceUrl,$flags,&$err_code,&$err_msg,&$pt) - { - // Sequence validation - $this->ensureIsProxy(); - $this->ensureAuthenticationCallSuccessful(); - - // Argument validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - if (gettype($serviceUrl) != 'string') - throw new CAS_TypeMismatchException($serviceUrl, '$serviceUrl', 'string'); - if (gettype($flags) != 'integer') - throw new CAS_TypeMismatchException($flags, '$flags', 'string'); - - try { - $service = $this->getProxiedService(PHPCAS_PROXIED_SERVICE_IMAP); - $service->setServiceUrl($serviceUrl); - $service->setMailbox($url); - $service->setOptions($flags); - - $stream = $service->open(); - $err_code = PHPCAS_SERVICE_OK; - $pt = $service->getImapProxyTicket(); - return $stream; - } catch (CAS_ProxyTicketException $e) { - $err_msg = $e->getMessage(); - $err_code = $e->getCode(); - $pt = false; - return false; - } catch (CAS_ProxiedService_Exception $e) { - $lang = $this->getLangObj(); - $err_msg = sprintf( - $lang->getServiceUnavailable(), - $url, - $e->getMessage() - ); - $err_code = PHPCAS_SERVICE_NOT_AVAILABLE; - $pt = false; - return false; - } - } - - /** @} **/ - - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - // XX XX - // XX PROXIED CLIENT FEATURES (CAS 2.0) XX - // XX XX - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - - // ######################################################################## - // PT - // ######################################################################## - /** - * @addtogroup internalService - * @{ - */ - - /** - * This array will store a list of proxies in front of this application. This - * property will only be populated if this script is being proxied rather than - * accessed directly. - * - * It is set in CAS_Client::validateCAS20() and can be read by - * CAS_Client::getProxies() - * - * @access private - */ - private $_proxies = array(); - - /** - * Answer an array of proxies that are sitting in front of this application. - * - * This method will only return a non-empty array if we have received and - * validated a Proxy Ticket. - * - * @return array - * @access public - */ - public function getProxies() - { - return $this->_proxies; - } - - /** - * Set the Proxy array, probably from persistant storage. - * - * @param array $proxies An array of proxies - * - * @return void - * @access private - */ - private function _setProxies($proxies) - { - $this->_proxies = $proxies; - if (!empty($proxies)) { - // For proxy-authenticated requests people are not viewing the URL - // directly since the client is another application making a - // web-service call. - // Because of this, stripping the ticket from the URL is unnecessary - // and causes another web-service request to be performed. Additionally, - // if session handling on either the client or the server malfunctions - // then the subsequent request will not complete successfully. - $this->setNoClearTicketsFromUrl(); - } - } - - /** - * A container of patterns to be allowed as proxies in front of the cas client. - * - * @var CAS_ProxyChain_AllowedList - */ - private $_allowed_proxy_chains; - - /** - * Answer the CAS_ProxyChain_AllowedList object for this client. - * - * @return CAS_ProxyChain_AllowedList - */ - public function getAllowedProxyChains () - { - if (empty($this->_allowed_proxy_chains)) { - $this->_allowed_proxy_chains = new CAS_ProxyChain_AllowedList(); - } - return $this->_allowed_proxy_chains; - } - - /** @} */ - // ######################################################################## - // PT VALIDATION - // ######################################################################## - /** - * @addtogroup internalProxied - * @{ - */ - - /** - * This method is used to validate a cas 2.0 ST or PT; halt on failure - * Used for all CAS 2.0 validations - * - * @param string &$validate_url the url of the reponse - * @param string &$text_response the text of the repsones - * @param DOMElement &$tree_response the domxml tree of the respones - * @param bool $renew true to force the authentication with the CAS server - * - * @return bool true when successfull and issue a CAS_AuthenticationException - * and false on an error - * - * @throws CAS_AuthenticationException - */ - public function validateCAS20(&$validate_url,&$text_response,&$tree_response, $renew=false) - { - phpCAS::traceBegin(); - phpCAS::trace($text_response); - // build the URL to validate the ticket - if ($this->getAllowedProxyChains()->isProxyingAllowed()) { - $validate_url = $this->getServerProxyValidateURL().'&ticket=' - .urlencode($this->getTicket()); - } else { - $validate_url = $this->getServerServiceValidateURL().'&ticket=' - .urlencode($this->getTicket()); - } - - if ( $this->isProxy() ) { - // pass the callback url for CAS proxies - $validate_url .= '&pgtUrl='.urlencode($this->_getCallbackURL()); - } - - if ( $renew ) { - // pass the renew - $validate_url .= '&renew=true'; - } - - // open and read the URL - if ( !$this->_readURL($validate_url, $headers, $text_response, $err_msg) ) { - phpCAS::trace( - 'could not open URL \''.$validate_url.'\' to validate ('.$err_msg.')' - ); - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - true/*$no_response*/ - ); - } - - // create new DOMDocument object - $dom = new DOMDocument(); - // Fix possible whitspace problems - $dom->preserveWhiteSpace = false; - // CAS servers should only return data in utf-8 - $dom->encoding = "utf-8"; - // read the response of the CAS server into a DOMDocument object - if ( !($dom->loadXML($text_response))) { - // read failed - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, $text_response - ); - } else if ( !($tree_response = $dom->documentElement) ) { - // read the root node of the XML tree - // read failed - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, $text_response - ); - } else if ($tree_response->localName != 'serviceResponse') { - // insure that tag name is 'serviceResponse' - // bad root node - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, $text_response - ); - } else if ( $tree_response->getElementsByTagName("authenticationFailure")->length != 0) { - // authentication failed, extract the error code and message and throw exception - $auth_fail_list = $tree_response - ->getElementsByTagName("authenticationFailure"); - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - false/*$no_response*/, false/*$bad_response*/, - $text_response, - $auth_fail_list->item(0)->getAttribute('code')/*$err_code*/, - trim($auth_fail_list->item(0)->nodeValue)/*$err_msg*/ - ); - } else if ($tree_response->getElementsByTagName("authenticationSuccess")->length != 0) { - // authentication succeded, extract the user name - $success_elements = $tree_response - ->getElementsByTagName("authenticationSuccess"); - if ( $success_elements->item(0)->getElementsByTagName("user")->length == 0) { - // no user specified => error - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, $text_response - ); - } else { - $this->_setUser( - trim( - $success_elements->item(0)->getElementsByTagName("user")->item(0)->nodeValue - ) - ); - $this->_readExtraAttributesCas20($success_elements); - // Store the proxies we are sitting behind for authorization checking - $proxyList = array(); - if ( sizeof($arr = $success_elements->item(0)->getElementsByTagName("proxy")) > 0) { - foreach ($arr as $proxyElem) { - phpCAS::trace("Found Proxy: ".$proxyElem->nodeValue); - $proxyList[] = trim($proxyElem->nodeValue); - } - $this->_setProxies($proxyList); - phpCAS::trace("Storing Proxy List"); - } - // Check if the proxies in front of us are allowed - if (!$this->getAllowedProxyChains()->isProxyListAllowed($proxyList)) { - throw new CAS_AuthenticationException( - $this, 'Proxy not allowed', $validate_url, - false/*$no_response*/, true/*$bad_response*/, - $text_response - ); - } else { - $result = true; - } - } - } else { - throw new CAS_AuthenticationException( - $this, 'Ticket not validated', $validate_url, - false/*$no_response*/, true/*$bad_response*/, - $text_response - ); - } - - $this->_renameSession($this->getTicket()); - - // at this step, Ticket has been validated and $this->_user has been set, - - phpCAS::traceEnd($result); - return $result; - } - - /** - * This method recursively parses the attribute XML. - * It also collapses name-value pairs into a single - * array entry. It parses all common formats of - * attributes and well formed XML files. - * - * @param string $root the DOM root element to be parsed - * @param string $namespace namespace of the elements - * - * @return an array of the parsed XML elements - * - * Formats tested: - * - * "Jasig Style" Attributes: - * - * - * - * jsmith - * - * RubyCAS - * Smith - * John - * CN=Staff,OU=Groups,DC=example,DC=edu - * CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu - * - * PGTIOU-84678-8a9d2sfa23casd - * - * - * - * "Jasig Style" Attributes (longer version): - * - * - * - * jsmith - * - * - * surname - * Smith - * - * - * givenName - * John - * - * - * memberOf - * ['CN=Staff,OU=Groups,DC=example,DC=edu', 'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu'] - * - * - * PGTIOU-84678-8a9d2sfa23casd - * - * - * - * "RubyCAS Style" attributes - * - * - * - * jsmith - * - * RubyCAS - * Smith - * John - * CN=Staff,OU=Groups,DC=example,DC=edu - * CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu - * - * PGTIOU-84678-8a9d2sfa23casd - * - * - * - * "Name-Value" attributes. - * - * Attribute format from these mailing list thread: - * http://jasig.275507.n4.nabble.com/CAS-attributes-and-how-they-appear-in-the-CAS-response-td264272.html - * Note: This is a less widely used format, but in use by at least two institutions. - * - * - * - * jsmith - * - * - * - * - * - * - * - * PGTIOU-84678-8a9d2sfa23casd - * - * - * - * result: - * - * Array ( - * [surname] => Smith - * [givenName] => John - * [memberOf] => Array ( - * [0] => CN=Staff, OU=Groups, DC=example, DC=edu - * [1] => CN=Spanish Department, OU=Departments, OU=Groups, DC=example, DC=edu - * ) - * ) - */ - private function _xml_to_array($root, $namespace = "cas") - { - $result = array(); - if ($root->hasAttributes()) { - $attrs = $root->attributes; - $pair = array(); - foreach ($attrs as $attr) { - if ($attr->name === "name") { - $pair['name'] = $attr->value; - } elseif ($attr->name === "value") { - $pair['value'] = $attr->value; - } else { - $result[$attr->name] = $attr->value; - } - if (array_key_exists('name', $pair) && array_key_exists('value', $pair)) { - $result[$pair['name']] = $pair['value']; - } - } - } - if ($root->hasChildNodes()) { - $children = $root->childNodes; - if ($children->length == 1) { - $child = $children->item(0); - if ($child->nodeType == XML_TEXT_NODE) { - $result['_value'] = $child->nodeValue; - return (count($result) == 1) ? $result['_value'] : $result; - } - } - $groups = array(); - foreach ($children as $child) { - $child_nodeName = str_ireplace($namespace . ":", "", $child->nodeName); - if (in_array($child_nodeName, array("user", "proxies", "proxyGrantingTicket"))) { - continue; - } - if (!isset($result[$child_nodeName])) { - $res = $this->_xml_to_array($child, $namespace); - if (!empty($res)) { - $result[$child_nodeName] = $this->_xml_to_array($child, $namespace); - } - } else { - if (!isset($groups[$child_nodeName])) { - $result[$child_nodeName] = array($result[$child_nodeName]); - $groups[$child_nodeName] = 1; - } - $result[$child_nodeName][] = $this->_xml_to_array($child, $namespace); - } - } - } - return $result; - } - - /** - * This method parses a "JSON-like array" of strings - * into an array of strings - * - * @param string $json_value the json-like string: - * e.g.: - * ['CN=Staff,OU=Groups,DC=example,DC=edu', 'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu'] - * - * @return array of strings Description - * e.g.: - * Array ( - * [0] => CN=Staff,OU=Groups,DC=example,DC=edu - * [1] => CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu - * ) - */ - private function _parse_json_like_array_value($json_value) - { - $parts = explode(",", trim($json_value, "[]")); - $out = array(); - $quote = ''; - foreach ($parts as $part) { - $part = trim($part); - if ($quote === '') { - $value = ""; - if ($this->_startsWith($part, '\'')) { - $quote = '\''; - } elseif ($this->_startsWith($part, '"')) { - $quote = '"'; - } else { - $out[] = $part; - } - $part = ltrim($part, $quote); - } - if ($quote !== '') { - $value .= $part; - if ($this->_endsWith($part, $quote)) { - $out[] = rtrim($value, $quote); - $quote = ''; - } else { - $value .= ", "; - }; - } - } - return $out; - } - - /** - * This method recursively removes unneccessary hirarchy levels in array-trees. - * into an array of strings - * - * @param array $arr the array to flatten - * e.g.: - * Array ( - * [attributes] => Array ( - * [attribute] => Array ( - * [0] => Array ( - * [name] => surname - * [value] => Smith - * ) - * [1] => Array ( - * [name] => givenName - * [value] => John - * ) - * [2] => Array ( - * [name] => memberOf - * [value] => ['CN=Staff,OU=Groups,DC=example,DC=edu', 'CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu'] - * ) - * ) - * ) - * ) - * - * @return array the flattened array - * e.g.: - * Array ( - * [attribute] => Array ( - * [surname] => Smith - * [givenName] => John - * [memberOf] => Array ( - * [0] => CN=Staff, OU=Groups, DC=example, DC=edu - * [1] => CN=Spanish Department, OU=Departments, OU=Groups, DC=example, DC=edu - * ) - * ) - * ) - */ - private function _flatten_array($arr) - { - if (!is_array($arr)) { - if ($this->_startsWith($arr, '[') && $this->_endsWith($arr, ']')) { - return $this->_parse_json_like_array_value($arr); - } else { - return $arr; - } - } - $out = array(); - foreach ($arr as $key => $val) { - if (!is_array($val)) { - $out[$key] = $val; - } else { - switch (count($val)) { - case 1 : { - $key = key($val); - if (array_key_exists($key, $out)) { - $value = $out[$key]; - if (!is_array($value)) { - $out[$key] = array(); - $out[$key][] = $value; - } - $out[$key][] = $this->_flatten_array($val[$key]); - } else { - $out[$key] = $this->_flatten_array($val[$key]); - }; - break; - }; - case 2 : { - if (array_key_exists("name", $val) && array_key_exists("value", $val)) { - $key = $val['name']; - if (array_key_exists($key, $out)) { - $value = $out[$key]; - if (!is_array($value)) { - $out[$key] = array(); - $out[$key][] = $value; - } - $out[$key][] = $this->_flatten_array($val['value']); - } else { - $out[$key] = $this->_flatten_array($val['value']); - }; - } else { - $out[$key] = $this->_flatten_array($val); - } - break; - }; - default: { - $out[$key] = $this->_flatten_array($val); - } - } - } - } - return $out; - } - - /** - * This method will parse the DOM and pull out the attributes from the XML - * payload and put them into an array, then put the array into the session. - * - * @param DOMNodeList $success_elements payload of the response - * - * @return bool true when successfull, halt otherwise by calling - * CAS_Client::_authError(). - */ - private function _readExtraAttributesCas20($success_elements) - { - phpCAS::traceBegin(); - - $extra_attributes = array(); - if ($this->_casAttributeParserCallbackFunction !== null - && is_callable($this->_casAttributeParserCallbackFunction) - ) { - array_unshift($this->_casAttributeParserCallbackArgs, $success_elements->item(0)); - phpCAS :: trace("Calling attritubeParser callback"); - $extra_attributes = call_user_func_array( - $this->_casAttributeParserCallbackFunction, - $this->_casAttributeParserCallbackArgs - ); - } else { - phpCAS :: trace("Parse extra attributes: "); - $attributes = $this->_xml_to_array($success_elements->item(0)); - phpCAS :: trace(print_r($attributes,true). "\nFLATTEN Array: "); - $extra_attributes = $this->_flatten_array($attributes); - phpCAS :: trace(print_r($extra_attributes, true)."\nFILTER : "); - if (array_key_exists("attribute", $extra_attributes)) { - $extra_attributes = $extra_attributes["attribute"]; - } elseif (array_key_exists("attributes", $extra_attributes)) { - $extra_attributes = $extra_attributes["attributes"]; - }; - phpCAS :: trace(print_r($extra_attributes, true)."return"); - } - $this->setAttributes($extra_attributes); - phpCAS::traceEnd(); - return true; - } - - /** - * Add an attribute value to an array of attributes. - * - * @param array &$attributeArray reference to array - * @param string $name name of attribute - * @param string $value value of attribute - * - * @return void - */ - private function _addAttributeToArray(array &$attributeArray, $name, $value) - { - // If multiple attributes exist, add as an array value - if (isset($attributeArray[$name])) { - // Initialize the array with the existing value - if (!is_array($attributeArray[$name])) { - $existingValue = $attributeArray[$name]; - $attributeArray[$name] = array($existingValue); - } - - $attributeArray[$name][] = trim($value); - } else { - $attributeArray[$name] = trim($value); - } - } - - /** @} */ - - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - // XX XX - // XX MISC XX - // XX XX - // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - - /** - * @addtogroup internalMisc - * @{ - */ - - // ######################################################################## - // URL - // ######################################################################## - /** - * the URL of the current request (without any ticket CGI parameter). Written - * and read by CAS_Client::getURL(). - * - * @hideinitializer - */ - private $_url = ''; - - - /** - * This method sets the URL of the current request - * - * @param string $url url to set for service - * - * @return void - */ - public function setURL($url) - { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - $this->_url = $url; - } - - /** - * This method returns the URL of the current request (without any ticket - * CGI parameter). - * - * @return string The URL - */ - public function getURL() - { - phpCAS::traceBegin(); - // the URL is built when needed only - if ( empty($this->_url) ) { - // remove the ticket if present in the URL - $final_uri = $this->getServiceBaseUrl()->get(); - $request_uri = explode('?', $_SERVER['REQUEST_URI'], 2); - $final_uri .= $request_uri[0]; - - if (isset($request_uri[1]) && $request_uri[1]) { - $query_string= $this->_removeParameterFromQueryString('ticket', $request_uri[1]); - - // If the query string still has anything left, - // append it to the final URI - if ($query_string !== '') { - $final_uri .= "?$query_string"; - } - } - - phpCAS::trace("Final URI: $final_uri"); - $this->setURL($final_uri); - } - phpCAS::traceEnd($this->_url); - return $this->_url; - } - - /** - * This method sets the base URL of the CAS server. - * - * @param string $url the base URL - * - * @return string base url - */ - public function setBaseURL($url) - { - // Argument Validation - if (gettype($url) != 'string') - throw new CAS_TypeMismatchException($url, '$url', 'string'); - - return $this->_server['base_url'] = $url; - } - - /** - * The ServiceBaseUrl object that provides base URL during service URL - * discovery process. - * - * @var CAS_ServiceBaseUrl_Interface - * - * @hideinitializer - */ - private $_serviceBaseUrl = null; - - /** - * Answer the CAS_ServiceBaseUrl_Interface object for this client. - * - * @return CAS_ServiceBaseUrl_Interface - */ - public function getServiceBaseUrl() - { - if (empty($this->_serviceBaseUrl)) { - phpCAS::error("ServiceBaseUrl object is not initialized"); - } - return $this->_serviceBaseUrl; - } - - /** - * This method sets the service base URL used during service URL discovery process. - * - * This is required since phpCAS 1.6.0 to protect the integrity of the authentication. - * - * @since phpCAS 1.6.0 - * - * @param $name can be any of the following: - * - A base URL string. The service URL discovery will always use this (protocol, - * hostname and optional port number) without using any external host names. - * - An array of base URL strings. The service URL discovery will check against - * this list before using the auto discovered base URL. If there is no match, - * the first base URL in the array will be used as the default. This option is - * helpful if your PHP website is accessible through multiple domains without a - * canonical name, or through both HTTP and HTTPS. - * - A class that implements CAS_ServiceBaseUrl_Interface. If you need to customize - * the base URL discovery behavior, you can pass in a class that implements the - * interface. - * - * @return void - */ - private function _setServiceBaseUrl($name) - { - if (is_array($name)) { - $this->_serviceBaseUrl = new CAS_ServiceBaseUrl_AllowedListDiscovery($name); - } else if (is_string($name)) { - $this->_serviceBaseUrl = new CAS_ServiceBaseUrl_Static($name); - } else if ($name instanceof CAS_ServiceBaseUrl_Interface) { - $this->_serviceBaseUrl = $name; - } else { - throw new CAS_TypeMismatchException($name, '$name', 'array, string, or CAS_ServiceBaseUrl_Interface object'); - } - } - - /** - * Removes a parameter from a query string - * - * @param string $parameterName name of parameter - * @param string $queryString query string - * - * @return string new query string - * - * @link http://stackoverflow.com/questions/1842681/regular-expression-to-remove-one-parameter-from-query-string - */ - private function _removeParameterFromQueryString($parameterName, $queryString) - { - $parameterName = preg_quote($parameterName); - return preg_replace( - "/&$parameterName(=[^&]*)?|^$parameterName(=[^&]*)?&?/", - '', $queryString - ); - } - - /** - * This method is used to append query parameters to an url. Since the url - * might already contain parameter it has to be detected and to build a proper - * URL - * - * @param string $url base url to add the query params to - * @param string $query params in query form with & separated - * - * @return string url with query params - */ - private function _buildQueryUrl($url, $query) - { - $url .= (strstr($url, '?') === false) ? '?' : '&'; - $url .= $query; - return $url; - } - - /** - * This method tests if a string starts with a given character. - * - * @param string $text text to test - * @param string $char character to test for - * - * @return bool true if the $text starts with $char - */ - private function _startsWith($text, $char) - { - return (strpos($text, $char) === 0); - } - - /** - * This method tests if a string ends with a given character - * - * @param string $text text to test - * @param string $char character to test for - * - * @return bool true if the $text ends with $char - */ - private function _endsWith($text, $char) - { - return (strpos(strrev($text), $char) === 0); - } - - /** - * Answer a valid session-id given a CAS ticket. - * - * The output must be deterministic to allow single-log-out when presented with - * the ticket to log-out. - * - * - * @param string $ticket name of the ticket - * - * @return string - */ - private function _sessionIdForTicket($ticket) - { - // Hash the ticket to ensure that the value meets the PHP 7.1 requirement - // that session-ids have a length between 22 and 256 characters. - return hash('sha256', $this->_sessionIdSalt . $ticket); - } - - /** - * Set a salt/seed for the session-id hash to make it harder to guess. - * - * @var string $_sessionIdSalt - */ - private $_sessionIdSalt = ''; - - /** - * Set a salt/seed for the session-id hash to make it harder to guess. - * - * @param string $salt - * - * @return void - */ - public function setSessionIdSalt($salt) { - $this->_sessionIdSalt = (string)$salt; - } - - // ######################################################################## - // AUTHENTICATION ERROR HANDLING - // ######################################################################## - /** - * This method is used to print the HTML output when the user was not - * authenticated. - * - * @param string $failure the failure that occured - * @param string $cas_url the URL the CAS server was asked for - * @param bool $no_response the response from the CAS server (other - * parameters are ignored if true) - * @param bool $bad_response bad response from the CAS server ($err_code - * and $err_msg ignored if true) - * @param string $cas_response the response of the CAS server - * @param int $err_code the error code given by the CAS server - * @param string $err_msg the error message given by the CAS server - * - * @return void - */ - private function _authError( - $failure, - $cas_url, - $no_response=false, - $bad_response=false, - $cas_response='', - $err_code=-1, - $err_msg='' - ) { - phpCAS::traceBegin(); - $lang = $this->getLangObj(); - $this->printHTMLHeader($lang->getAuthenticationFailed()); - $this->printf( - $lang->getYouWereNotAuthenticated(), htmlentities($this->getURL()), - isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN']:'' - ); - phpCAS::trace('CAS URL: '.$cas_url); - phpCAS::trace('Authentication failure: '.$failure); - if ( $no_response ) { - phpCAS::trace('Reason: no response from the CAS server'); - } else { - if ( $bad_response ) { - phpCAS::trace('Reason: bad response from the CAS server'); - } else { - switch ($this->getServerVersion()) { - case CAS_VERSION_1_0: - phpCAS::trace('Reason: CAS error'); - break; - case CAS_VERSION_2_0: - case CAS_VERSION_3_0: - if ( $err_code === -1 ) { - phpCAS::trace('Reason: no CAS error'); - } else { - phpCAS::trace( - 'Reason: ['.$err_code.'] CAS error: '.$err_msg - ); - } - break; - } - } - phpCAS::trace('CAS response: '.$cas_response); - } - $this->printHTMLFooter(); - phpCAS::traceExit(); - throw new CAS_GracefullTerminationException(); - } - - // ######################################################################## - // PGTIOU/PGTID and logoutRequest rebroadcasting - // ######################################################################## - - /** - * Boolean of whether to rebroadcast pgtIou/pgtId and logoutRequest, and - * array of the nodes. - */ - private $_rebroadcast = false; - private $_rebroadcast_nodes = array(); - - /** - * Constants used for determining rebroadcast node type. - */ - const HOSTNAME = 0; - const IP = 1; - - /** - * Determine the node type from the URL. - * - * @param String $nodeURL The node URL. - * - * @return int hostname - * - */ - private function _getNodeType($nodeURL) - { - phpCAS::traceBegin(); - if (preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $nodeURL)) { - phpCAS::traceEnd(self::IP); - return self::IP; - } else { - phpCAS::traceEnd(self::HOSTNAME); - return self::HOSTNAME; - } - } - - /** - * Store the rebroadcast node for pgtIou/pgtId and logout requests. - * - * @param string $rebroadcastNodeUrl The rebroadcast node URL. - * - * @return void - */ - public function addRebroadcastNode($rebroadcastNodeUrl) - { - // Argument validation - if ( !(bool)preg_match("/^(http|https):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i", $rebroadcastNodeUrl)) - throw new CAS_TypeMismatchException($rebroadcastNodeUrl, '$rebroadcastNodeUrl', 'url'); - - // Store the rebroadcast node and set flag - $this->_rebroadcast = true; - $this->_rebroadcast_nodes[] = $rebroadcastNodeUrl; - } - - /** - * An array to store extra rebroadcast curl options. - */ - private $_rebroadcast_headers = array(); - - /** - * This method is used to add header parameters when rebroadcasting - * pgtIou/pgtId or logoutRequest. - * - * @param string $header Header to send when rebroadcasting. - * - * @return void - */ - public function addRebroadcastHeader($header) - { - if (gettype($header) != 'string') - throw new CAS_TypeMismatchException($header, '$header', 'string'); - - $this->_rebroadcast_headers[] = $header; - } - - /** - * Constants used for determining rebroadcast type (logout or pgtIou/pgtId). - */ - const LOGOUT = 0; - const PGTIOU = 1; - - /** - * This method rebroadcasts logout/pgtIou requests. Can be LOGOUT,PGTIOU - * - * @param int $type type of rebroadcasting. - * - * @return void - */ - private function _rebroadcast($type) - { - phpCAS::traceBegin(); - - $rebroadcast_curl_options = array( - CURLOPT_FAILONERROR => 1, - CURLOPT_FOLLOWLOCATION => 1, - CURLOPT_RETURNTRANSFER => 1, - CURLOPT_CONNECTTIMEOUT => 1, - CURLOPT_TIMEOUT => 4); - - // Try to determine the IP address of the server - if (!empty($_SERVER['SERVER_ADDR'])) { - $ip = $_SERVER['SERVER_ADDR']; - } else if (!empty($_SERVER['LOCAL_ADDR'])) { - // IIS 7 - $ip = $_SERVER['LOCAL_ADDR']; - } - // Try to determine the DNS name of the server - if (!empty($ip)) { - $dns = gethostbyaddr($ip); - } - $multiClassName = 'CAS_Request_CurlMultiRequest'; - $multiRequest = new $multiClassName(); - - for ($i = 0; $i < sizeof($this->_rebroadcast_nodes); $i++) { - if ((($this->_getNodeType($this->_rebroadcast_nodes[$i]) == self::HOSTNAME) && !empty($dns) && (stripos($this->_rebroadcast_nodes[$i], $dns) === false)) - || (($this->_getNodeType($this->_rebroadcast_nodes[$i]) == self::IP) && !empty($ip) && (stripos($this->_rebroadcast_nodes[$i], $ip) === false)) - ) { - phpCAS::trace( - 'Rebroadcast target URL: '.$this->_rebroadcast_nodes[$i] - .$_SERVER['REQUEST_URI'] - ); - $className = $this->_requestImplementation; - $request = new $className(); - - $url = $this->_rebroadcast_nodes[$i].$_SERVER['REQUEST_URI']; - $request->setUrl($url); - - if (count($this->_rebroadcast_headers)) { - $request->addHeaders($this->_rebroadcast_headers); - } - - $request->makePost(); - if ($type == self::LOGOUT) { - // Logout request - $request->setPostBody( - 'rebroadcast=false&logoutRequest='.$_POST['logoutRequest'] - ); - } else if ($type == self::PGTIOU) { - // pgtIou/pgtId rebroadcast - $request->setPostBody('rebroadcast=false'); - } - - $request->setCurlOptions($rebroadcast_curl_options); - - $multiRequest->addRequest($request); - } else { - phpCAS::trace( - 'Rebroadcast not sent to self: ' - .$this->_rebroadcast_nodes[$i].' == '.(!empty($ip)?$ip:'') - .'/'.(!empty($dns)?$dns:'') - ); - } - } - // We need at least 1 request - if ($multiRequest->getNumRequests() > 0) { - $multiRequest->send(); - } - phpCAS::traceEnd(); - } - - /** @} */ -} diff --git a/lib/apereo/phpcas/source/CAS/CookieJar.php b/lib/apereo/phpcas/source/CAS/CookieJar.php deleted file mode 100644 index b2439373a..000000000 --- a/lib/apereo/phpcas/source/CAS/CookieJar.php +++ /dev/null @@ -1,385 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class provides access to service cookies and handles parsing of response - * headers to pull out cookie values. - * - * @class CAS_CookieJar - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_CookieJar -{ - - private $_cookies; - - /** - * Create a new cookie jar by passing it a reference to an array in which it - * should store cookies. - * - * @param array &$storageArray Array to store cookies - * - * @return void - */ - public function __construct (array &$storageArray) - { - $this->_cookies =& $storageArray; - } - - /** - * Store cookies for a web service request. - * Cookie storage is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt - * - * @param string $request_url The URL that generated the response headers. - * @param array $response_headers An array of the HTTP response header strings. - * - * @return void - * - * @access private - */ - public function storeCookies ($request_url, $response_headers) - { - $urlParts = parse_url($request_url); - $defaultDomain = $urlParts['host']; - - $cookies = $this->parseCookieHeaders($response_headers, $defaultDomain); - - foreach ($cookies as $cookie) { - // Enforce the same-origin policy by verifying that the cookie - // would match the url that is setting it - if (!$this->cookieMatchesTarget($cookie, $urlParts)) { - continue; - } - - // store the cookie - $this->storeCookie($cookie); - - phpCAS::trace($cookie['name'].' -> '.$cookie['value']); - } - } - - /** - * Retrieve cookies applicable for a web service request. - * Cookie applicability is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt - * - * @param string $request_url The url that the cookies will be for. - * - * @return array An array containing cookies. E.g. array('name' => 'val'); - * - * @access private - */ - public function getCookies ($request_url) - { - if (!count($this->_cookies)) { - return array(); - } - - // If our request URL can't be parsed, no cookies apply. - $target = parse_url($request_url); - if ($target === false) { - return array(); - } - - $this->expireCookies(); - - $matching_cookies = array(); - foreach ($this->_cookies as $key => $cookie) { - if ($this->cookieMatchesTarget($cookie, $target)) { - $matching_cookies[$cookie['name']] = $cookie['value']; - } - } - return $matching_cookies; - } - - - /** - * Parse Cookies without PECL - * From the comments in http://php.net/manual/en/function.http-parse-cookie.php - * - * @param array $header array of header lines. - * @param string $defaultDomain The domain to use if none is specified in - * the cookie. - * - * @return array of cookies - */ - protected function parseCookieHeaders( $header, $defaultDomain ) - { - phpCAS::traceBegin(); - $cookies = array(); - foreach ( $header as $line ) { - if ( preg_match('/^Set-Cookie2?: /i', $line)) { - $cookies[] = $this->parseCookieHeader($line, $defaultDomain); - } - } - - phpCAS::traceEnd($cookies); - return $cookies; - } - - /** - * Parse a single cookie header line. - * - * Based on RFC2965 http://www.ietf.org/rfc/rfc2965.txt - * - * @param string $line The header line. - * @param string $defaultDomain The domain to use if none is specified in - * the cookie. - * - * @return array - */ - protected function parseCookieHeader ($line, $defaultDomain) - { - if (!$defaultDomain) { - throw new CAS_InvalidArgumentException( - '$defaultDomain was not provided.' - ); - } - - // Set our default values - $cookie = array( - 'domain' => $defaultDomain, - 'path' => '/', - 'secure' => false, - ); - - $line = preg_replace('/^Set-Cookie2?: /i', '', trim($line)); - - // trim any trailing semicolons. - $line = trim($line, ';'); - - phpCAS::trace("Cookie Line: $line"); - - // This implementation makes the assumption that semicolons will not - // be present in quoted attribute values. While attribute values that - // contain semicolons are allowed by RFC2965, they are hopefully rare - // enough to ignore for our purposes. Most browsers make the same - // assumption. - $attributeStrings = explode(';', $line); - - foreach ( $attributeStrings as $attributeString ) { - // split on the first equals sign and use the rest as value - $attributeParts = explode('=', $attributeString, 2); - - $attributeName = trim($attributeParts[0]); - $attributeNameLC = strtolower($attributeName); - - if (isset($attributeParts[1])) { - $attributeValue = trim($attributeParts[1]); - // Values may be quoted strings. - if (strpos($attributeValue, '"') === 0) { - $attributeValue = trim($attributeValue, '"'); - // unescape any escaped quotes: - $attributeValue = str_replace('\"', '"', $attributeValue); - } - } else { - $attributeValue = null; - } - - switch ($attributeNameLC) { - case 'expires': - $cookie['expires'] = strtotime($attributeValue); - break; - case 'max-age': - $cookie['max-age'] = (int)$attributeValue; - // Set an expiry time based on the max-age - if ($cookie['max-age']) { - $cookie['expires'] = time() + $cookie['max-age']; - } else { - // If max-age is zero, then the cookie should be removed - // imediately so set an expiry before now. - $cookie['expires'] = time() - 1; - } - break; - case 'secure': - $cookie['secure'] = true; - break; - case 'domain': - case 'path': - case 'port': - case 'version': - case 'comment': - case 'commenturl': - case 'discard': - case 'httponly': - case 'samesite': - $cookie[$attributeNameLC] = $attributeValue; - break; - default: - $cookie['name'] = $attributeName; - $cookie['value'] = $attributeValue; - } - } - - return $cookie; - } - - /** - * Add, update, or remove a cookie. - * - * @param array $cookie A cookie array as created by parseCookieHeaders() - * - * @return void - * - * @access protected - */ - protected function storeCookie ($cookie) - { - // Discard any old versions of this cookie. - $this->discardCookie($cookie); - $this->_cookies[] = $cookie; - - } - - /** - * Discard an existing cookie - * - * @param array $cookie An cookie - * - * @return void - * - * @access protected - */ - protected function discardCookie ($cookie) - { - if (!isset($cookie['domain']) - || !isset($cookie['path']) - || !isset($cookie['path']) - ) { - throw new CAS_InvalidArgumentException('Invalid Cookie array passed.'); - } - - foreach ($this->_cookies as $key => $old_cookie) { - if ( $cookie['domain'] == $old_cookie['domain'] - && $cookie['path'] == $old_cookie['path'] - && $cookie['name'] == $old_cookie['name'] - ) { - unset($this->_cookies[$key]); - } - } - } - - /** - * Go through our stored cookies and remove any that are expired. - * - * @return void - * - * @access protected - */ - protected function expireCookies () - { - foreach ($this->_cookies as $key => $cookie) { - if (isset($cookie['expires']) && $cookie['expires'] < time()) { - unset($this->_cookies[$key]); - } - } - } - - /** - * Answer true if cookie is applicable to a target. - * - * @param array $cookie An array of cookie attributes. - * @param array|false $target An array of URL attributes as generated by parse_url(). - * - * @return bool - * - * @access private - */ - protected function cookieMatchesTarget ($cookie, $target) - { - if (!is_array($target)) { - throw new CAS_InvalidArgumentException( - '$target must be an array of URL attributes as generated by parse_url().' - ); - } - if (!isset($target['host'])) { - throw new CAS_InvalidArgumentException( - '$target must be an array of URL attributes as generated by parse_url().' - ); - } - - // Verify that the scheme matches - if ($cookie['secure'] && $target['scheme'] != 'https') { - return false; - } - - // Verify that the host matches - // Match domain and mulit-host cookies - if (strpos($cookie['domain'], '.') === 0) { - // .host.domain.edu cookies are valid for host.domain.edu - if (substr($cookie['domain'], 1) == $target['host']) { - // continue with other checks - } else { - // non-exact host-name matches. - // check that the target host a.b.c.edu is within .b.c.edu - $pos = strripos($target['host'], $cookie['domain']); - if (!$pos) { - return false; - } - // verify that the cookie domain is the last part of the host. - if ($pos + strlen($cookie['domain']) != strlen($target['host'])) { - return false; - } - // verify that the host name does not contain interior dots as per - // RFC 2965 section 3.3.2 Rejecting Cookies - // http://www.ietf.org/rfc/rfc2965.txt - $hostname = substr($target['host'], 0, $pos); - if (strpos($hostname, '.') !== false) { - return false; - } - } - } else { - // If the cookie host doesn't begin with '.', - // the host must case-insensitive match exactly - if (strcasecmp($target['host'], $cookie['domain']) !== 0) { - return false; - } - } - - // Verify that the port matches - if (isset($cookie['ports']) - && !in_array($target['port'], $cookie['ports']) - ) { - return false; - } - - // Verify that the path matches - if (strpos($target['path'], $cookie['path']) !== 0) { - return false; - } - - return true; - } - -} - -?> diff --git a/lib/apereo/phpcas/source/CAS/Exception.php b/lib/apereo/phpcas/source/CAS/Exception.php deleted file mode 100644 index 2ff7cd658..000000000 --- a/lib/apereo/phpcas/source/CAS/Exception.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * A root exception interface for all exceptions in phpCAS. - * - * All exceptions thrown in phpCAS should implement this interface to allow them - * to be caught as a category by clients. Each phpCAS exception should extend - * an appropriate SPL exception class that best fits its type. - * - * For example, an InvalidArgumentException in phpCAS should be defined as - * - * class CAS_InvalidArgumentException - * extends InvalidArgumentException - * implements CAS_Exception - * { } - * - * This definition allows the CAS_InvalidArgumentException to be caught as either - * an InvalidArgumentException or as a CAS_Exception. - * - * @class CAS_Exception - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - */ -interface CAS_Exception -{ - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/GracefullTerminationException.php b/lib/apereo/phpcas/source/CAS/GracefullTerminationException.php deleted file mode 100644 index 29aa638cd..000000000 --- a/lib/apereo/phpcas/source/CAS/GracefullTerminationException.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * An exception for terminatinating execution or to throw for unit testing - * - * @class CAS_GracefullTerminationException.php - * @category Authentication - * @package PhpCAS - * @author Joachim Fritschi - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -class CAS_GracefullTerminationException -extends RuntimeException -implements CAS_Exception -{ - - /** - * Test if exceptions should be thrown or if we should just exit. - * In production usage we want to just exit cleanly when prompting the user - * for a redirect without filling the error logs with uncaught exceptions. - * In unit testing scenarios we cannot exit or we won't be able to continue - * with our tests. - * - * @param string $message Message Text - * @param int $code Error code - * - * @return self - */ - public function __construct ($message = 'Terminate Gracefully', $code = 0) - { - // Exit cleanly to avoid filling up the logs with uncaught exceptions. - if (self::$_exitWhenThrown) { - exit; - } else { - // Throw exceptions to allow unit testing to continue; - parent::__construct($message, $code); - } - } - - private static $_exitWhenThrown = true; - /** - * Force phpcas to thow Exceptions instead of calling exit() - * Needed for unit testing. Generally shouldn't be used in production due to - * an increase in Apache error logging if CAS_GracefulTerminiationExceptions - * are not caught and handled. - * - * @return void - */ - public static function throwInsteadOfExiting() - { - self::$_exitWhenThrown = false; - } - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/InvalidArgumentException.php b/lib/apereo/phpcas/source/CAS/InvalidArgumentException.php deleted file mode 100644 index 99be2ac32..000000000 --- a/lib/apereo/phpcas/source/CAS/InvalidArgumentException.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Exception that denotes invalid arguments were passed. - * - * @class CAS_InvalidArgumentException - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_InvalidArgumentException -extends InvalidArgumentException -implements CAS_Exception -{ - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/Catalan.php b/lib/apereo/phpcas/source/CAS/Languages/Catalan.php deleted file mode 100644 index 1ead905fc..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/Catalan.php +++ /dev/null @@ -1,114 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Catalan language class - * - * @class CAS_Languages_Catalan - * @category Authentication - * @package PhpCAS - * @author Iván-Benjamín García Torà - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_Catalan implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'usant servidor'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return 'Autentificació CAS necessària!'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return 'Sortida de CAS necessària!'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'Ja hauria d\ haver estat redireccionat al servidor CAS. Feu click aquí per a continuar.'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'Autentificació CAS fallida!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

No estàs autentificat.

Pots tornar a intentar-ho fent click aquí.

Si el problema persisteix hauría de contactar amb l\'administrador d\'aquest llocc.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'El servei `%s\' no està disponible (%s).'; - } -} diff --git a/lib/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php b/lib/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php deleted file mode 100644 index 5e33cb650..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php +++ /dev/null @@ -1,114 +0,0 @@ -, Phy25 - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Chinese Simplified language class - * - * @class CAS_Languages_ChineseSimplified - * @category Authentication - * @package PhpCAS - * @author Pascal Aubry , Phy25 - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_ChineseSimplified implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return '连接的服务器'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return '请进行 CAS 认证!'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return '请进行 CAS 登出!'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return '你正被重定向到 CAS 服务器。点击这里继续。'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'CAS 认证失败!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

你没有成功登录。

你可以点击这里重新登录

如果问题依然存在,请联系本站管理员

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return '服务器 %s 不可用(%s)。'; - } -} diff --git a/lib/apereo/phpcas/source/CAS/Languages/English.php b/lib/apereo/phpcas/source/CAS/Languages/English.php deleted file mode 100644 index cb13bde93..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/English.php +++ /dev/null @@ -1,114 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * English language class - * - * @class CAS_Languages_English - * @category Authentication - * @package PhpCAS - * @author Pascal Aubry - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_English implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'using server'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return 'CAS Authentication wanted!'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return 'CAS logout wanted!'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'You should already have been redirected to the CAS server. Click here to continue.'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'CAS Authentication failed!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

You were not authenticated.

You may submit your request again by clicking here.

If the problem persists, you may contact the administrator of this site.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'The service `%s\' is not available (%s).'; - } -} diff --git a/lib/apereo/phpcas/source/CAS/Languages/French.php b/lib/apereo/phpcas/source/CAS/Languages/French.php deleted file mode 100644 index 14f65aba2..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/French.php +++ /dev/null @@ -1,116 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * French language class - * - * @class CAS_Languages_French - * @category Authentication - * @package PhpCAS - * @author Pascal Aubry - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_French implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'utilisant le serveur'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return 'Authentication CAS nécessaire !'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return 'Déconnexion demandée !'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'Vous auriez du etre redirigé(e) vers le serveur CAS. Cliquez ici pour continuer.'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'Authentification CAS infructueuse !'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

Vous n\'avez pas été authentifié(e).

Vous pouvez soumettre votre requete à nouveau en cliquant ici.

Si le problème persiste, vous pouvez contacter l\'administrateur de ce site.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'Le service `%s\' est indisponible (%s)'; - } -} - -?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/Galego.php b/lib/apereo/phpcas/source/CAS/Languages/Galego.php deleted file mode 100644 index d5bf40455..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/Galego.php +++ /dev/null @@ -1,117 +0,0 @@ -aquí para continuar'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'Autenticación CAS errada!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return ' -

Non estás autenticado

Podes volver tentalo facendo click aquí.

Se o problema persiste debería contactar con el administrador deste sitio.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'O servizo `%s\' non está dispoñible (%s).'; - } -} -?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/German.php b/lib/apereo/phpcas/source/CAS/Languages/German.php deleted file mode 100644 index b718b1452..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/German.php +++ /dev/null @@ -1,116 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * German language class - * - * @class CAS_Languages_German - * @category Authentication - * @package PhpCAS - * @author Henrik Genssen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_German implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'via Server'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return 'CAS Authentifizierung erforderlich!'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return 'CAS Abmeldung!'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'eigentlich häten Sie zum CAS Server weitergeleitet werden sollen. Drücken Sie hier um fortzufahren.'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'CAS Anmeldung fehlgeschlagen!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

Sie wurden nicht angemeldet.

Um es erneut zu versuchen klicken Sie hier.

Wenn das Problem bestehen bleibt, kontaktieren Sie den Administrator dieser Seite.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'Der Dienst `%s\' ist nicht verfügbar (%s).'; - } -} - -?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/Greek.php b/lib/apereo/phpcas/source/CAS/Languages/Greek.php deleted file mode 100644 index 1cfb107e4..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/Greek.php +++ /dev/null @@ -1,115 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Greek language class - * - * @class CAS_Languages_Greek - * @category Authentication - * @package PhpCAS - * @author Vangelis Haniotakis - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_Greek implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'χρησιμοποιείται ο εξυπηρετητής'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return 'Απαιτείται η ταυτοποίηση CAS!'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return 'Απαιτείται η αποσύνδεση από CAS!'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'Θα έπρεπε να είχατε ανακατευθυνθεί στον εξυπηρετητή CAS. Κάντε κλίκ εδώ για να συνεχίσετε.'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'Η ταυτοποίηση CAS απέτυχε!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

Δεν ταυτοποιηθήκατε.

Μπορείτε να ξαναπροσπαθήσετε, κάνοντας κλίκ εδώ.

Εαν το πρόβλημα επιμείνει, ελάτε σε επαφή με τον διαχειριστή.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'Η υπηρεσία `%s\' δεν είναι διαθέσιμη (%s).'; - } -} -?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/Japanese.php b/lib/apereo/phpcas/source/CAS/Languages/Japanese.php deleted file mode 100644 index 568148458..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/Japanese.php +++ /dev/null @@ -1,113 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Japanese language class. Now Encoding is UTF-8. - * - * @class CAS_Languages_Japanese - * @category Authentication - * @package PhpCAS - * @author fnorif - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - **/ -class CAS_Languages_Japanese implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'サーバーを使っています。'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return 'CASによる認証を行います。'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return 'CASからログアウトします!'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'CASサーバに行く必要があります。自動的に転送されない場合は こちら をクリックして続行します。'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'CASによる認証に失敗しました。'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

認証できませんでした。

もう一度リクエストを送信する場合はこちらをクリック。

問題が解決しない場合は このサイトの管理者に問い合わせてください。

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'サービス `%s\' は利用できません (%s)。'; - } -} -?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/LanguageInterface.php b/lib/apereo/phpcas/source/CAS/Languages/LanguageInterface.php deleted file mode 100644 index dfb0ac514..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/LanguageInterface.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Language Interface class for all internationalization files - * - * @class CAS_Languages_LanguageInterface - * @category Authentication - * @package PhpCAS - * @author Joachim Fritschi - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ - -interface CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer(); - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted(); - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout(); - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected(); - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed(); - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated(); - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable(); - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/Languages/Portuguese.php b/lib/apereo/phpcas/source/CAS/Languages/Portuguese.php deleted file mode 100644 index a927cad62..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/Portuguese.php +++ /dev/null @@ -1,114 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://apereo.atlassian.net/wiki/spaces/CASC/pages/103252517/phpCAS - */ - -/** - * Portuguese language class - * - * @class CAS_Languages_Portuguese - * @category Authentication - * @package PhpCAS - * @author Sherwin Harris - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://apereo.atlassian.net/wiki/spaces/CASC/pages/103252517/phpCAS - * - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_Portuguese implements CAS_Languages_LanguageInterface -{ - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'Usando o servidor'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return 'A autenticação do servidor CAS desejado!'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return 'Saida do servidor CAS desejado!'; - } - - /** - * Get the should have been redirected string - * - * @return string should have been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'Você já deve ter sido redirecionado para o servidor CAS. Clique aqui para continuar'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return 'A autenticação do servidor CAS falheu!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

Você não foi autenticado.

Você pode enviar sua solicitação novamente clicando aqui.

Se o problema persistir, você pode entrar em contato com o administrador deste site.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'O serviço `%s\' não está disponível (%s).'; - } -} diff --git a/lib/apereo/phpcas/source/CAS/Languages/Spanish.php b/lib/apereo/phpcas/source/CAS/Languages/Spanish.php deleted file mode 100644 index c6ea50e74..000000000 --- a/lib/apereo/phpcas/source/CAS/Languages/Spanish.php +++ /dev/null @@ -1,117 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Spanish language class - * - * @class CAS_Languages_Spanish - * @category Authentication - * @package PhpCAS - * @author Iván-Benjamín García Torà - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - - * @sa @link internalLang Internationalization @endlink - * @ingroup internalLang - */ -class CAS_Languages_Spanish implements CAS_Languages_LanguageInterface -{ - - /** - * Get the using server string - * - * @return string using server - */ - public function getUsingServer() - { - return 'usando servidor'; - } - - /** - * Get authentication wanted string - * - * @return string authentication wanted - */ - public function getAuthenticationWanted() - { - return '¡Autentificación CAS necesaria!'; - } - - /** - * Get logout string - * - * @return string logout - */ - public function getLogout() - { - return '¡Salida CAS necesaria!'; - } - - /** - * Get the should have been redirected string - * - * @return string should habe been redirected - */ - public function getShouldHaveBeenRedirected() - { - return 'Ya debería haber sido redireccionado al servidor CAS. Haga click aquí para continuar.'; - } - - /** - * Get authentication failed string - * - * @return string authentication failed - */ - public function getAuthenticationFailed() - { - return '¡Autentificación CAS fallida!'; - } - - /** - * Get the your were not authenticated string - * - * @return string not authenticated - */ - public function getYouWereNotAuthenticated() - { - return '

No estás autentificado.

Puedes volver a intentarlo haciendo click aquí.

Si el problema persiste debería contactar con el administrador de este sitio.

'; - } - - /** - * Get the service unavailable string - * - * @return string service unavailable - */ - public function getServiceUnavailable() - { - return 'El servicio `%s\' no está disponible (%s).'; - } -} -?> diff --git a/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php deleted file mode 100644 index d4d7680de..000000000 --- a/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class defines Exceptions that should be thrown when the sequence of - * operations is invalid. In this case it should be thrown when an - * authentication call has not yet happened. - * - * @class CAS_OutOfSequenceBeforeAuthenticationCallException - * @category Authentication - * @package PhpCAS - * @author Joachim Fritschi - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_OutOfSequenceBeforeAuthenticationCallException -extends CAS_OutOfSequenceException -implements CAS_Exception -{ - /** - * Return standard error meessage - * - * @return void - */ - public function __construct () - { - parent::__construct('An authentication call hasn\'t happened yet.'); - } -} diff --git a/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php deleted file mode 100644 index 6c2c39c58..000000000 --- a/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class defines Exceptions that should be thrown when the sequence of - * operations is invalid. In this case it should be thrown when the client() or - * proxy() call has not yet happened and no client or proxy object exists. - * - * @class CAS_OutOfSequenceBeforeClientException - * @category Authentication - * @package PhpCAS - * @author Joachim Fritschi - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_OutOfSequenceBeforeClientException -extends CAS_OutOfSequenceException -implements CAS_Exception -{ - /** - * Return standard error message - * - * @return void - */ - public function __construct () - { - parent::__construct( - 'this method cannot be called before phpCAS::client() or phpCAS::proxy()' - ); - } -} diff --git a/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php deleted file mode 100644 index 799155521..000000000 --- a/lib/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class defines Exceptions that should be thrown when the sequence of - * operations is invalid. In this case it should be thrown when the proxy() call - * has not yet happened and no proxy object exists. - * - * @class CAS_OutOfSequenceBeforeProxyException - * @category Authentication - * @package PhpCAS - * @author Joachim Fritschi - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_OutOfSequenceBeforeProxyException -extends CAS_OutOfSequenceException -implements CAS_Exception -{ - - /** - * Return standard error message - * - * @return void - */ - public function __construct () - { - parent::__construct( - 'this method cannot be called before phpCAS::proxy()' - ); - } -} diff --git a/lib/apereo/phpcas/source/CAS/OutOfSequenceException.php b/lib/apereo/phpcas/source/CAS/OutOfSequenceException.php deleted file mode 100644 index d6f7d88fc..000000000 --- a/lib/apereo/phpcas/source/CAS/OutOfSequenceException.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class defines Exceptions that should be thrown when the sequence of - * operations is invalid. Examples are: - * - Requesting the response before executing a request. - * - Changing the URL of a request after executing the request. - * - * @class CAS_OutOfSequenceException - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_OutOfSequenceException -extends BadMethodCallException -implements CAS_Exception -{ - -} diff --git a/lib/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php b/lib/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php deleted file mode 100644 index a93568d60..000000000 --- a/lib/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php +++ /dev/null @@ -1,222 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Basic class for PGT storage - * The CAS_PGTStorage_AbstractStorage class is a generic class for PGT storage. - * This class should not be instanciated itself but inherited by specific PGT - * storage classes. - * - * @class CAS_PGTStorage_AbstractStorage - * @category Authentication - * @package PhpCAS - * @author Pascal Aubry - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @ingroup internalPGTStorage - */ - -abstract class CAS_PGTStorage_AbstractStorage -{ - /** - * @addtogroup internalPGTStorage - * @{ - */ - - // ######################################################################## - // CONSTRUCTOR - // ######################################################################## - - /** - * The constructor of the class, should be called only by inherited classes. - * - * @param CAS_Client $cas_parent the CAS _client instance that creates the - * current object. - * - * @return void - * - * @protected - */ - function __construct($cas_parent) - { - phpCAS::traceBegin(); - if ( !$cas_parent->isProxy() ) { - phpCAS::error( - 'defining PGT storage makes no sense when not using a CAS proxy' - ); - } - phpCAS::traceEnd(); - } - - // ######################################################################## - // DEBUGGING - // ######################################################################## - - /** - * This virtual method returns an informational string giving the type of storage - * used by the object (used for debugging purposes). - * - * @return string - * - * @public - */ - function getStorageType() - { - phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); - } - - /** - * This virtual method returns an informational string giving informations on the - * parameters of the storage.(used for debugging purposes). - * - * @return string - * - * @public - */ - function getStorageInfo() - { - phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); - } - - // ######################################################################## - // ERROR HANDLING - // ######################################################################## - - /** - * string used to store an error message. Written by - * PGTStorage::setErrorMessage(), read by PGTStorage::getErrorMessage(). - * - * @hideinitializer - * @deprecated not used. - */ - var $_error_message=false; - - /** - * This method sets en error message, which can be read later by - * PGTStorage::getErrorMessage(). - * - * @param string $error_message an error message - * - * @return void - * - * @deprecated not used. - */ - function setErrorMessage($error_message) - { - $this->_error_message = $error_message; - } - - /** - * This method returns an error message set by PGTStorage::setErrorMessage(). - * - * @return string an error message when set by PGTStorage::setErrorMessage(), FALSE - * otherwise. - * - * @deprecated not used. - */ - function getErrorMessage() - { - return $this->_error_message; - } - - // ######################################################################## - // INITIALIZATION - // ######################################################################## - - /** - * a boolean telling if the storage has already been initialized. Written by - * PGTStorage::init(), read by PGTStorage::isInitialized(). - * - * @hideinitializer - */ - var $_initialized = false; - - /** - * This method tells if the storage has already been intialized. - * - * @return bool - * - * @protected - */ - function isInitialized() - { - return $this->_initialized; - } - - /** - * This virtual method initializes the object. - * - * @return void - */ - function init() - { - $this->_initialized = true; - } - - // ######################################################################## - // PGT I/O - // ######################################################################## - - /** - * This virtual method stores a PGT and its corresponding PGT Iuo. - * - * @param string $pgt the PGT - * @param string $pgt_iou the PGT iou - * - * @return void - * - * @note Should never be called. - * - */ - function write($pgt,$pgt_iou) - { - phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); - } - - /** - * This virtual method reads a PGT corresponding to a PGT Iou and deletes - * the corresponding storage entry. - * - * @param string $pgt_iou the PGT iou - * - * @return string - * - * @note Should never be called. - */ - function read($pgt_iou) - { - phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); - } - - /** @} */ - -} - -?> diff --git a/lib/apereo/phpcas/source/CAS/PGTStorage/Db.php b/lib/apereo/phpcas/source/CAS/PGTStorage/Db.php deleted file mode 100644 index 2efe5a3e8..000000000 --- a/lib/apereo/phpcas/source/CAS/PGTStorage/Db.php +++ /dev/null @@ -1,440 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -define('CAS_PGT_STORAGE_DB_DEFAULT_TABLE', 'cas_pgts'); - -/** - * Basic class for PGT database storage - * The CAS_PGTStorage_Db class is a class for PGT database storage. - * - * @class CAS_PGTStorage_Db - * @category Authentication - * @package PhpCAS - * @author Daniel Frett - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * @ingroup internalPGTStorageDb - */ - -class CAS_PGTStorage_Db extends CAS_PGTStorage_AbstractStorage -{ - /** - * @addtogroup internalCAS_PGTStorageDb - * @{ - */ - - /** - * the PDO object to use for database interactions - */ - private $_pdo; - - /** - * This method returns the PDO object to use for database interactions. - * - * @return PDO object - */ - private function _getPdo() - { - return $this->_pdo; - } - - /** - * database connection options to use when creating a new PDO object - */ - private $_dsn; - private $_username; - private $_password; - private $_driver_options; - - /** - * @var string the table to use for storing/retrieving pgt's - */ - private $_table; - - /** - * This method returns the table to use when storing/retrieving PGT's - * - * @return string the name of the pgt storage table. - */ - private function _getTable() - { - return $this->_table; - } - - // ######################################################################## - // DEBUGGING - // ######################################################################## - - /** - * This method returns an informational string giving the type of storage - * used by the object (used for debugging purposes). - * - * @return string an informational string. - */ - public function getStorageType() - { - return "db"; - } - - /** - * This method returns an informational string giving informations on the - * parameters of the storage.(used for debugging purposes). - * - * @return string an informational string. - * @public - */ - public function getStorageInfo() - { - return 'table=`'.$this->_getTable().'\''; - } - - // ######################################################################## - // CONSTRUCTOR - // ######################################################################## - - /** - * The class constructor. - * - * @param CAS_Client $cas_parent the CAS_Client instance that creates - * the object. - * @param string $dsn_or_pdo a dsn string to use for creating a PDO - * object or a PDO object - * @param string $username the username to use when connecting to - * the database - * @param string $password the password to use when connecting to - * the database - * @param string $table the table to use for storing and - * retrieving PGT's - * @param string $driver_options any driver options to use when - * connecting to the database - */ - public function __construct( - $cas_parent, $dsn_or_pdo, $username='', $password='', $table='', - $driver_options=null - ) { - phpCAS::traceBegin(); - // call the ancestor's constructor - parent::__construct($cas_parent); - - // set default values - if ( empty($table) ) { - $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE; - } - if ( !is_array($driver_options) ) { - $driver_options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION); - } - - // store the specified parameters - if ($dsn_or_pdo instanceof PDO) { - $this->_pdo = $dsn_or_pdo; - } else { - $this->_dsn = $dsn_or_pdo; - $this->_username = $username; - $this->_password = $password; - $this->_driver_options = $driver_options; - } - - // store the table name - $this->_table = $table; - - phpCAS::traceEnd(); - } - - // ######################################################################## - // INITIALIZATION - // ######################################################################## - - /** - * This method is used to initialize the storage. Halts on error. - * - * @return void - */ - public function init() - { - phpCAS::traceBegin(); - // if the storage has already been initialized, return immediatly - if ($this->isInitialized()) { - return; - } - - // initialize the base object - parent::init(); - - // create the PDO object if it doesn't exist already - if (!($this->_pdo instanceof PDO)) { - try { - $this->_pdo = new PDO( - $this->_dsn, $this->_username, $this->_password, - $this->_driver_options - ); - } - catch(PDOException $e) { - phpCAS::error('Database connection error: ' . $e->getMessage()); - } - } - - phpCAS::traceEnd(); - } - - // ######################################################################## - // PDO database interaction - // ######################################################################## - - /** - * attribute that stores the previous error mode for the PDO handle while - * processing a transaction - */ - private $_errMode; - - /** - * This method will enable the Exception error mode on the PDO object - * - * @return void - */ - private function _setErrorMode() - { - // get PDO object and enable exception error mode - $pdo = $this->_getPdo(); - $this->_errMode = $pdo->getAttribute(PDO::ATTR_ERRMODE); - $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - } - - /** - * this method will reset the error mode on the PDO object - * - * @return void - */ - private function _resetErrorMode() - { - // get PDO object and reset the error mode to what it was originally - $pdo = $this->_getPdo(); - $pdo->setAttribute(PDO::ATTR_ERRMODE, $this->_errMode); - } - - // ######################################################################## - // database queries - // ######################################################################## - // these queries are potentially unsafe because the person using this library - // can set the table to use, but there is no reliable way to escape SQL - // fieldnames in PDO yet - - /** - * This method returns the query used to create a pgt storage table - * - * @return string the create table SQL, no bind params in query - */ - protected function createTableSql() - { - return 'CREATE TABLE ' . $this->_getTable() - . ' (pgt_iou VARCHAR(255) NOT NULL PRIMARY KEY, pgt VARCHAR(255) NOT NULL)'; - } - - /** - * This method returns the query used to store a pgt - * - * @return string the store PGT SQL, :pgt and :pgt_iou are the bind params contained - * in the query - */ - protected function storePgtSql() - { - return 'INSERT INTO ' . $this->_getTable() - . ' (pgt_iou, pgt) VALUES (:pgt_iou, :pgt)'; - } - - /** - * This method returns the query used to retrieve a pgt. the first column - * of the first row should contain the pgt - * - * @return string the retrieve PGT SQL, :pgt_iou is the only bind param contained - * in the query - */ - protected function retrievePgtSql() - { - return 'SELECT pgt FROM ' . $this->_getTable() . ' WHERE pgt_iou = :pgt_iou'; - } - - /** - * This method returns the query used to delete a pgt. - * - * @return string the delete PGT SQL, :pgt_iou is the only bind param contained in - * the query - */ - protected function deletePgtSql() - { - return 'DELETE FROM ' . $this->_getTable() . ' WHERE pgt_iou = :pgt_iou'; - } - - // ######################################################################## - // PGT I/O - // ######################################################################## - - /** - * This method creates the database table used to store pgt's and pgtiou's - * - * @return void - */ - public function createTable() - { - phpCAS::traceBegin(); - - // initialize this PGTStorage object if it hasn't been initialized yet - if ( !$this->isInitialized() ) { - $this->init(); - } - - // initialize the PDO object for this method - $pdo = $this->_getPdo(); - $this->_setErrorMode(); - - try { - $pdo->beginTransaction(); - - $query = $pdo->query($this->createTableSQL()); - $query->closeCursor(); - - $pdo->commit(); - } - catch(PDOException $e) { - // attempt rolling back the transaction before throwing a phpCAS error - try { - $pdo->rollBack(); - } - catch(PDOException $e) { - } - phpCAS::error('error creating PGT storage table: ' . $e->getMessage()); - } - - // reset the PDO object - $this->_resetErrorMode(); - - phpCAS::traceEnd(); - } - - /** - * This method stores a PGT and its corresponding PGT Iou in the database. - * Echoes a warning on error. - * - * @param string $pgt the PGT - * @param string $pgt_iou the PGT iou - * - * @return void - */ - public function write($pgt, $pgt_iou) - { - phpCAS::traceBegin(); - - // initialize the PDO object for this method - $pdo = $this->_getPdo(); - $this->_setErrorMode(); - - try { - $pdo->beginTransaction(); - - $query = $pdo->prepare($this->storePgtSql()); - $query->bindValue(':pgt', $pgt, PDO::PARAM_STR); - $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR); - $query->execute(); - $query->closeCursor(); - - $pdo->commit(); - } - catch(PDOException $e) { - // attempt rolling back the transaction before throwing a phpCAS error - try { - $pdo->rollBack(); - } - catch(PDOException $e) { - } - phpCAS::error('error writing PGT to database: ' . $e->getMessage()); - } - - // reset the PDO object - $this->_resetErrorMode(); - - phpCAS::traceEnd(); - } - - /** - * This method reads a PGT corresponding to a PGT Iou and deletes the - * corresponding db entry. - * - * @param string $pgt_iou the PGT iou - * - * @return string|false the corresponding PGT, or FALSE on error - */ - public function read($pgt_iou) - { - phpCAS::traceBegin(); - $pgt = false; - - // initialize the PDO object for this method - $pdo = $this->_getPdo(); - $this->_setErrorMode(); - - try { - $pdo->beginTransaction(); - - // fetch the pgt for the specified pgt_iou - $query = $pdo->prepare($this->retrievePgtSql()); - $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR); - $query->execute(); - $pgt = $query->fetchColumn(0); - $query->closeCursor(); - - // delete the specified pgt_iou from the database - $query = $pdo->prepare($this->deletePgtSql()); - $query->bindValue(':pgt_iou', $pgt_iou, PDO::PARAM_STR); - $query->execute(); - $query->closeCursor(); - - $pdo->commit(); - } - catch(PDOException $e) { - // attempt rolling back the transaction before throwing a phpCAS error - try { - $pdo->rollBack(); - } - catch(PDOException $e) { - } - phpCAS::trace('error reading PGT from database: ' . $e->getMessage()); - } - - // reset the PDO object - $this->_resetErrorMode(); - - phpCAS::traceEnd(); - return $pgt; - } - - /** @} */ - -} - -?> diff --git a/lib/apereo/phpcas/source/CAS/PGTStorage/File.php b/lib/apereo/phpcas/source/CAS/PGTStorage/File.php deleted file mode 100644 index fbacd3b7d..000000000 --- a/lib/apereo/phpcas/source/CAS/PGTStorage/File.php +++ /dev/null @@ -1,261 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * The CAS_PGTStorage_File class is a class for PGT file storage. An instance of - * this class is returned by CAS_Client::SetPGTStorageFile(). - * - * @class CAS_PGTStorage_File - * @category Authentication - * @package PhpCAS - * @author Pascal Aubry - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - * - * @ingroup internalPGTStorageFile - */ - -class CAS_PGTStorage_File extends CAS_PGTStorage_AbstractStorage -{ - /** - * @addtogroup internalPGTStorageFile - * @{ - */ - - /** - * a string telling where PGT's should be stored on the filesystem. Written by - * PGTStorageFile::PGTStorageFile(), read by getPath(). - * - * @private - */ - var $_path; - - /** - * This method returns the name of the directory where PGT's should be stored - * on the filesystem. - * - * @return string the name of a directory (with leading and trailing '/') - * - * @private - */ - function getPath() - { - return $this->_path; - } - - // ######################################################################## - // DEBUGGING - // ######################################################################## - - /** - * This method returns an informational string giving the type of storage - * used by the object (used for debugging purposes). - * - * @return string an informational string. - * @public - */ - function getStorageType() - { - return "file"; - } - - /** - * This method returns an informational string giving informations on the - * parameters of the storage.(used for debugging purposes). - * - * @return string an informational string. - * @public - */ - function getStorageInfo() - { - return 'path=`'.$this->getPath().'\''; - } - - // ######################################################################## - // CONSTRUCTOR - // ######################################################################## - - /** - * The class constructor, called by CAS_Client::SetPGTStorageFile(). - * - * @param CAS_Client $cas_parent the CAS_Client instance that creates the object. - * @param string $path the path where the PGT's should be stored - * - * @return void - * - * @public - */ - function __construct($cas_parent,$path) - { - phpCAS::traceBegin(); - // call the ancestor's constructor - parent::__construct($cas_parent); - - if (empty($path)) { - $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH; - } - // check that the path is an absolute path - if (getenv("OS")=="Windows_NT" || strtoupper(substr(PHP_OS,0,3)) == 'WIN') { - - if (!preg_match('`^[a-zA-Z]:`', $path)) { - phpCAS::error('an absolute path is needed for PGT storage to file'); - } - - } else { - - if ( $path[0] != '/' ) { - phpCAS::error('an absolute path is needed for PGT storage to file'); - } - - // store the path (with a leading and trailing '/') - $path = preg_replace('|[/]*$|', '/', $path); - $path = preg_replace('|^[/]*|', '/', $path); - } - - $this->_path = $path; - phpCAS::traceEnd(); - } - - // ######################################################################## - // INITIALIZATION - // ######################################################################## - - /** - * This method is used to initialize the storage. Halts on error. - * - * @return void - * @public - */ - function init() - { - phpCAS::traceBegin(); - // if the storage has already been initialized, return immediatly - if ($this->isInitialized()) { - return; - } - // call the ancestor's method (mark as initialized) - parent::init(); - phpCAS::traceEnd(); - } - - // ######################################################################## - // PGT I/O - // ######################################################################## - - /** - * This method returns the filename corresponding to a PGT Iou. - * - * @param string $pgt_iou the PGT iou. - * - * @return string a filename - * @private - */ - function getPGTIouFilename($pgt_iou) - { - phpCAS::traceBegin(); - $filename = $this->getPath()."phpcas-".hash("sha256", $pgt_iou); -// $filename = $this->getPath().$pgt_iou.'.plain'; - phpCAS::trace("Sha256 filename:" . $filename); - phpCAS::traceEnd(); - return $filename; - } - - /** - * This method stores a PGT and its corresponding PGT Iou into a file. Echoes a - * warning on error. - * - * @param string $pgt the PGT - * @param string $pgt_iou the PGT iou - * - * @return void - * - * @public - */ - function write($pgt,$pgt_iou) - { - phpCAS::traceBegin(); - $fname = $this->getPGTIouFilename($pgt_iou); - if (!file_exists($fname)) { - touch($fname); - // Chmod will fail on windows - @chmod($fname, 0600); - if ($f=fopen($fname, "w")) { - if (fputs($f, $pgt) === false) { - phpCAS::error('could not write PGT to `'.$fname.'\''); - } - phpCAS::trace('Successful write of PGT to `'.$fname.'\''); - fclose($f); - } else { - phpCAS::error('could not open `'.$fname.'\''); - } - } else { - phpCAS::error('File exists: `'.$fname.'\''); - } - phpCAS::traceEnd(); - } - - /** - * This method reads a PGT corresponding to a PGT Iou and deletes the - * corresponding file. - * - * @param string $pgt_iou the PGT iou - * - * @return string|false the corresponding PGT, or FALSE on error - * - * @public - */ - function read($pgt_iou) - { - phpCAS::traceBegin(); - $pgt = false; - $fname = $this->getPGTIouFilename($pgt_iou); - if (file_exists($fname)) { - if (!($f=fopen($fname, "r"))) { - phpCAS::error('could not open `'.$fname.'\''); - } else { - if (($pgt=fgets($f)) === false) { - phpCAS::error('could not read PGT from `'.$fname.'\''); - } - phpCAS::trace('Successful read of PGT to `'.$fname.'\''); - fclose($f); - } - // delete the PGT file - @unlink($fname); - } else { - phpCAS::error('No such file `'.$fname.'\''); - } - phpCAS::traceEnd($pgt); - return $pgt; - } - - /** @} */ - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService.php b/lib/apereo/phpcas/source/CAS/ProxiedService.php deleted file mode 100644 index 2673ee955..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService.php +++ /dev/null @@ -1,72 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This interface defines methods that allow proxy-authenticated service handlers - * to interact with phpCAS. - * - * Proxy service handlers must implement this interface as well as call - * phpCAS::initializeProxiedService($this) at some point in their implementation. - * - * While not required, proxy-authenticated service handlers are encouraged to - * implement the CAS_ProxiedService_Testable interface to facilitate unit testing. - * - * @class CAS_ProxiedService - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -interface CAS_ProxiedService -{ - - /** - * Answer a service identifier (URL) for whom we should fetch a proxy ticket. - * - * @return string - * @throws Exception If no service url is available. - */ - public function getServiceUrl (); - - /** - * Register a proxy ticket with the ProxiedService that it can use when - * making requests. - * - * @param string $proxyTicket Proxy ticket string - * - * @return void - * @throws InvalidArgumentException If the $proxyTicket is invalid. - * @throws CAS_OutOfSequenceException If called after a proxy ticket has - * already been initialized/set. - */ - public function setProxyTicket ($proxyTicket); - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Abstract.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Abstract.php deleted file mode 100644 index 0801c723b..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Abstract.php +++ /dev/null @@ -1,149 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class implements common methods for ProxiedService implementations included - * with phpCAS. - * - * @class CAS_ProxiedService_Abstract - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -abstract class CAS_ProxiedService_Abstract -implements CAS_ProxiedService, CAS_ProxiedService_Testable -{ - - /** - * The proxy ticket that can be used when making service requests. - * @var string $_proxyTicket; - */ - private $_proxyTicket; - - /** - * Register a proxy ticket with the Proxy that it can use when making requests. - * - * @param string $proxyTicket proxy ticket - * - * @return void - * @throws InvalidArgumentException If the $proxyTicket is invalid. - * @throws CAS_OutOfSequenceException If called after a proxy ticket has - * already been initialized/set. - */ - public function setProxyTicket ($proxyTicket) - { - if (empty($proxyTicket)) { - throw new CAS_InvalidArgumentException( - 'Trying to initialize with an empty proxy ticket.' - ); - } - if (!empty($this->_proxyTicket)) { - throw new CAS_OutOfSequenceException( - 'Already initialized, cannot change the proxy ticket.' - ); - } - $this->_proxyTicket = $proxyTicket; - } - - /** - * Answer the proxy ticket to be used when making requests. - * - * @return string - * @throws CAS_OutOfSequenceException If called before a proxy ticket has - * already been initialized/set. - */ - protected function getProxyTicket () - { - if (empty($this->_proxyTicket)) { - throw new CAS_OutOfSequenceException( - 'No proxy ticket yet. Call $this->initializeProxyTicket() to aquire the proxy ticket.' - ); - } - - return $this->_proxyTicket; - } - - /** - * @var CAS_Client $_casClient; - */ - private $_casClient; - - /** - * Use a particular CAS_Client->initializeProxiedService() rather than the - * static phpCAS::initializeProxiedService(). - * - * This method should not be called in standard operation, but is needed for unit - * testing. - * - * @param CAS_Client $casClient cas client - * - * @return void - * @throws CAS_OutOfSequenceException If called after a proxy ticket has - * already been initialized/set. - */ - public function setCasClient (CAS_Client $casClient) - { - if (!empty($this->_proxyTicket)) { - throw new CAS_OutOfSequenceException( - 'Already initialized, cannot change the CAS_Client.' - ); - } - - $this->_casClient = $casClient; - } - - /** - * Fetch our proxy ticket. - * - * Descendent classes should call this method once their service URL is available - * to initialize their proxy ticket. - * - * @return void - * @throws CAS_OutOfSequenceException If called after a proxy ticket has - * already been initialized. - */ - protected function initializeProxyTicket() - { - if (!empty($this->_proxyTicket)) { - throw new CAS_OutOfSequenceException( - 'Already initialized, cannot initialize again.' - ); - } - // Allow usage of a particular CAS_Client for unit testing. - if (empty($this->_casClient)) { - phpCAS::initializeProxiedService($this); - } else { - $this->_casClient->initializeProxiedService($this); - } - } - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Exception.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Exception.php deleted file mode 100644 index 0f87413dd..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Exception.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * An Exception for problems communicating with a proxied service. - * - * @class CAS_ProxiedService_Exception - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_ProxiedService_Exception -extends Exception -implements CAS_Exception -{ - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Http.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http.php deleted file mode 100644 index 4240b061a..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Http.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This interface defines methods that clients should use for configuring, sending, - * and receiving proxied HTTP requests. - * - * @class CAS_ProxiedService_Http - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -interface CAS_ProxiedService_Http -{ - - /********************************************************* - * Configure the Request - *********************************************************/ - - /** - * Set the URL of the Request - * - * @param string $url Url to set - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setUrl ($url); - - /********************************************************* - * 2. Send the Request - *********************************************************/ - - /** - * Perform the request. - * - * @return bool TRUE on success, FALSE on failure. - * @throws CAS_OutOfSequenceException If called multiple times. - */ - public function send (); - - /********************************************************* - * 3. Access the response - *********************************************************/ - - /** - * Answer the headers of the response. - * - * @return array An array of header strings. - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseHeaders (); - - /** - * Answer the body of response. - * - * @return string - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseBody (); - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php deleted file mode 100644 index 8d55edd50..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php +++ /dev/null @@ -1,360 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class implements common methods for ProxiedService implementations included - * with phpCAS. - * - * @class CAS_ProxiedService_Http_Abstract - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -abstract class CAS_ProxiedService_Http_Abstract extends -CAS_ProxiedService_Abstract implements CAS_ProxiedService_Http -{ - /** - * The HTTP request mechanism talking to the target service. - * - * @var CAS_Request_RequestInterface $requestHandler - */ - protected $requestHandler; - - /** - * The storage mechanism for cookies set by the target service. - * - * @var CAS_CookieJar $_cookieJar - */ - private $_cookieJar; - - /** - * Constructor. - * - * @param CAS_Request_RequestInterface $requestHandler request handler object - * @param CAS_CookieJar $cookieJar cookieJar object - * - * @return void - */ - public function __construct(CAS_Request_RequestInterface $requestHandler, - CAS_CookieJar $cookieJar - ) { - $this->requestHandler = $requestHandler; - $this->_cookieJar = $cookieJar; - } - - /** - * The target service url. - * @var string $_url; - */ - private $_url; - - /** - * Answer a service identifier (URL) for whom we should fetch a proxy ticket. - * - * @return string - * @throws Exception If no service url is available. - */ - public function getServiceUrl() - { - if (empty($this->_url)) { - throw new CAS_ProxiedService_Exception( - 'No URL set via ' . get_class($this) . '->setUrl($url).' - ); - } - - return $this->_url; - } - - /********************************************************* - * Configure the Request - *********************************************************/ - - /** - * Set the URL of the Request - * - * @param string $url url to set - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setUrl($url) - { - if ($this->hasBeenSent()) { - throw new CAS_OutOfSequenceException( - 'Cannot set the URL, request already sent.' - ); - } - if (!is_string($url)) { - throw new CAS_InvalidArgumentException('$url must be a string.'); - } - - $this->_url = $url; - } - - /********************************************************* - * 2. Send the Request - *********************************************************/ - - /** - * Perform the request. - * - * @return void - * @throws CAS_OutOfSequenceException If called multiple times. - * @throws CAS_ProxyTicketException If there is a proxy-ticket failure. - * The code of the Exception will be one of: - * PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_FAILURE - * @throws CAS_ProxiedService_Exception If there is a failure sending the - * request to the target service. - */ - public function send() - { - if ($this->hasBeenSent()) { - throw new CAS_OutOfSequenceException( - 'Cannot send, request already sent.' - ); - } - - phpCAS::traceBegin(); - - // Get our proxy ticket and append it to our URL. - $this->initializeProxyTicket(); - $url = $this->getServiceUrl(); - if (strstr($url, '?') === false) { - $url = $url . '?ticket=' . $this->getProxyTicket(); - } else { - $url = $url . '&ticket=' . $this->getProxyTicket(); - } - - try { - $this->makeRequest($url); - } catch (Exception $e) { - phpCAS::traceEnd(); - throw $e; - } - } - - /** - * Indicator of the number of requests (including redirects performed. - * - * @var int $_numRequests; - */ - private $_numRequests = 0; - - /** - * The response headers. - * - * @var array $_responseHeaders; - */ - private $_responseHeaders = array(); - - /** - * The response status code. - * - * @var int $_responseStatusCode; - */ - private $_responseStatusCode = ''; - - /** - * The response headers. - * - * @var string $_responseBody; - */ - private $_responseBody = ''; - - /** - * Build and perform a request, following redirects - * - * @param string $url url for the request - * - * @return void - * @throws CAS_ProxyTicketException If there is a proxy-ticket failure. - * The code of the Exception will be one of: - * PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_FAILURE - * @throws CAS_ProxiedService_Exception If there is a failure sending the - * request to the target service. - */ - protected function makeRequest($url) - { - // Verify that we are not in a redirect loop - $this->_numRequests++; - if ($this->_numRequests > 4) { - $message = 'Exceeded the maximum number of redirects (3) in proxied service request.'; - phpCAS::trace($message); - throw new CAS_ProxiedService_Exception($message); - } - - // Create a new request. - $request = clone $this->requestHandler; - $request->setUrl($url); - - // Add any cookies to the request. - $request->addCookies($this->_cookieJar->getCookies($url)); - - // Add any other parts of the request needed by concrete classes - $this->populateRequest($request); - - // Perform the request. - phpCAS::trace('Performing proxied service request to \'' . $url . '\''); - if (!$request->send()) { - $message = 'Could not perform proxied service request to URL`' - . $url . '\'. ' . $request->getErrorMessage(); - phpCAS::trace($message); - throw new CAS_ProxiedService_Exception($message); - } - - // Store any cookies from the response; - $this->_cookieJar->storeCookies($url, $request->getResponseHeaders()); - - // Follow any redirects - if ($redirectUrl = $this->getRedirectUrl($request->getResponseHeaders()) - ) { - phpCAS::trace('Found redirect:' . $redirectUrl); - $this->makeRequest($redirectUrl); - } else { - - $this->_responseHeaders = $request->getResponseHeaders(); - $this->_responseBody = $request->getResponseBody(); - $this->_responseStatusCode = $request->getResponseStatusCode(); - } - } - - /** - * Add any other parts of the request needed by concrete classes - * - * @param CAS_Request_RequestInterface $request request interface object - * - * @return void - */ - abstract protected function populateRequest( - CAS_Request_RequestInterface $request - ); - - /** - * Answer a redirect URL if a redirect header is found, otherwise null. - * - * @param array $responseHeaders response header to extract a redirect from - * - * @return string|null - */ - protected function getRedirectUrl(array $responseHeaders) - { - // Check for the redirect after authentication - foreach ($responseHeaders as $header) { - if ( preg_match('/^(Location:|URI:)\s*([^\s]+.*)$/', $header, $matches) - ) { - return trim(array_pop($matches)); - } - } - return null; - } - - /********************************************************* - * 3. Access the response - *********************************************************/ - - /** - * Answer true if our request has been sent yet. - * - * @return bool - */ - protected function hasBeenSent() - { - return ($this->_numRequests > 0); - } - - /** - * Answer the headers of the response. - * - * @return array An array of header strings. - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseHeaders() - { - if (!$this->hasBeenSent()) { - throw new CAS_OutOfSequenceException( - 'Cannot access response, request not sent yet.' - ); - } - - return $this->_responseHeaders; - } - - /** - * Answer HTTP status code of the response - * - * @return int - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseStatusCode() - { - if (!$this->hasBeenSent()) { - throw new CAS_OutOfSequenceException( - 'Cannot access response, request not sent yet.' - ); - } - - return $this->_responseStatusCode; - } - - /** - * Answer the body of response. - * - * @return string - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseBody() - { - if (!$this->hasBeenSent()) { - throw new CAS_OutOfSequenceException( - 'Cannot access response, request not sent yet.' - ); - } - - return $this->_responseBody; - } - - /** - * Answer the cookies from the response. This may include cookies set during - * redirect responses. - * - * @return array An array containing cookies. E.g. array('name' => 'val'); - */ - public function getCookies() - { - return $this->_cookieJar->getCookies($this->getServiceUrl()); - } - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php deleted file mode 100644 index a459d55ae..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php +++ /dev/null @@ -1,85 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class is used to make proxied service requests via the HTTP GET method. - * - * Usage Example: - * - * try { - * $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET); - * $service->setUrl('http://www.example.com/path/'); - * $service->send(); - * if ($service->getResponseStatusCode() == 200) - * return $service->getResponseBody(); - * else - * // The service responded with an error code 404, 500, etc. - * throw new Exception('The service responded with an error.'); - * - * } catch (CAS_ProxyTicketException $e) { - * if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE) - * return "Your login has timed out. You need to log in again."; - * else - * // Other proxy ticket errors are from bad request format - * // (shouldn't happen) or CAS server failure (unlikely) - * // so lets just stop if we hit those. - * throw $e; - * } catch (CAS_ProxiedService_Exception $e) { - * // Something prevented the service request from being sent or received. - * // We didn't even get a valid error response (404, 500, etc), so this - * // might be caused by a network error or a DNS resolution failure. - * // We could handle it in some way, but for now we will just stop. - * throw $e; - * } - * - * @class CAS_ProxiedService_Http_Get - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_ProxiedService_Http_Get -extends CAS_ProxiedService_Http_Abstract -{ - - /** - * Add any other parts of the request needed by concrete classes - * - * @param CAS_Request_RequestInterface $request request interface - * - * @return void - */ - protected function populateRequest (CAS_Request_RequestInterface $request) - { - // do nothing, since the URL has already been sent and that is our - // only data. - } -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php deleted file mode 100644 index 344c43987..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php +++ /dev/null @@ -1,152 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This class is used to make proxied service requests via the HTTP POST method. - * - * Usage Example: - * - * try { - * $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_POST); - * $service->setUrl('http://www.example.com/path/'); - * $service->setContentType('text/xml'); - * $service->setBody('example.search'); - * $service->send(); - * if ($service->getResponseStatusCode() == 200) - * return $service->getResponseBody(); - * else - * // The service responded with an error code 404, 500, etc. - * throw new Exception('The service responded with an error.'); - * - * } catch (CAS_ProxyTicketException $e) { - * if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE) - * return "Your login has timed out. You need to log in again."; - * else - * // Other proxy ticket errors are from bad request format - * // (shouldn't happen) or CAS server failure (unlikely) so lets just - * // stop if we hit those. - * throw $e; - * } catch (CAS_ProxiedService_Exception $e) { - * // Something prevented the service request from being sent or received. - * // We didn't even get a valid error response (404, 500, etc), so this - * // might be caused by a network error or a DNS resolution failure. - * // We could handle it in some way, but for now we will just stop. - * throw $e; - * } - * - * @class CAS_ProxiedService_Http_Post - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_ProxiedService_Http_Post -extends CAS_ProxiedService_Http_Abstract -{ - - /** - * The content-type of this request - * - * @var string $_contentType - */ - private $_contentType; - - /** - * The body of the this request - * - * @var string $_body - */ - private $_body; - - /** - * Set the content type of this POST request. - * - * @param string $contentType content type - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setContentType ($contentType) - { - if ($this->hasBeenSent()) { - throw new CAS_OutOfSequenceException( - 'Cannot set the content type, request already sent.' - ); - } - - $this->_contentType = $contentType; - } - - /** - * Set the body of this POST request. - * - * @param string $body body to set - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setBody ($body) - { - if ($this->hasBeenSent()) { - throw new CAS_OutOfSequenceException( - 'Cannot set the body, request already sent.' - ); - } - - $this->_body = $body; - } - - /** - * Add any other parts of the request needed by concrete classes - * - * @param CAS_Request_RequestInterface $request request interface class - * - * @return void - */ - protected function populateRequest (CAS_Request_RequestInterface $request) - { - if (empty($this->_contentType) && !empty($this->_body)) { - throw new CAS_ProxiedService_Exception( - "If you pass a POST body, you must specify a content type via " - .get_class($this).'->setContentType($contentType).' - ); - } - - $request->makePost(); - if (!empty($this->_body)) { - $request->addHeader('Content-Type: '.$this->_contentType); - $request->addHeader('Content-Length: '.strlen($this->_body)); - $request->setPostBody($this->_body); - } - } - - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Imap.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Imap.php deleted file mode 100644 index c4b47401d..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Imap.php +++ /dev/null @@ -1,281 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Provides access to a proxy-authenticated IMAP stream - * - * @class CAS_ProxiedService_Imap - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_ProxiedService_Imap -extends CAS_ProxiedService_Abstract -{ - - /** - * The username to send via imap_open. - * - * @var string $_username; - */ - private $_username; - - /** - * Constructor. - * - * @param string $username Username - * - * @return void - */ - public function __construct ($username) - { - if (!is_string($username) || !strlen($username)) { - throw new CAS_InvalidArgumentException('Invalid username.'); - } - - $this->_username = $username; - } - - /** - * The target service url. - * @var string $_url; - */ - private $_url; - - /** - * Answer a service identifier (URL) for whom we should fetch a proxy ticket. - * - * @return string - * @throws Exception If no service url is available. - */ - public function getServiceUrl () - { - if (empty($this->_url)) { - throw new CAS_ProxiedService_Exception( - 'No URL set via '.get_class($this).'->getServiceUrl($url).' - ); - } - - return $this->_url; - } - - /********************************************************* - * Configure the Stream - *********************************************************/ - - /** - * Set the URL of the service to pass to CAS for proxy-ticket retrieval. - * - * @param string $url Url to set - * - * @return void - * @throws CAS_OutOfSequenceException If called after the stream has been opened. - */ - public function setServiceUrl ($url) - { - if ($this->hasBeenOpened()) { - throw new CAS_OutOfSequenceException( - 'Cannot set the URL, stream already opened.' - ); - } - if (!is_string($url) || !strlen($url)) { - throw new CAS_InvalidArgumentException('Invalid url.'); - } - - $this->_url = $url; - } - - /** - * The mailbox to open. See the $mailbox parameter of imap_open(). - * - * @var string $_mailbox - */ - private $_mailbox; - - /** - * Set the mailbox to open. See the $mailbox parameter of imap_open(). - * - * @param string $mailbox Mailbox to set - * - * @return void - * @throws CAS_OutOfSequenceException If called after the stream has been opened. - */ - public function setMailbox ($mailbox) - { - if ($this->hasBeenOpened()) { - throw new CAS_OutOfSequenceException( - 'Cannot set the mailbox, stream already opened.' - ); - } - if (!is_string($mailbox) || !strlen($mailbox)) { - throw new CAS_InvalidArgumentException('Invalid mailbox.'); - } - - $this->_mailbox = $mailbox; - } - - /** - * A bit mask of options to pass to imap_open() as the $options parameter. - * - * @var int $_options - */ - private $_options = null; - - /** - * Set the options for opening the stream. See the $options parameter of - * imap_open(). - * - * @param int $options Options for the stream - * - * @return void - * @throws CAS_OutOfSequenceException If called after the stream has been opened. - */ - public function setOptions ($options) - { - if ($this->hasBeenOpened()) { - throw new CAS_OutOfSequenceException( - 'Cannot set options, stream already opened.' - ); - } - if (!is_int($options)) { - throw new CAS_InvalidArgumentException('Invalid options.'); - } - - $this->_options = $options; - } - - /********************************************************* - * 2. Open the stream - *********************************************************/ - - /** - * Open the IMAP stream (similar to imap_open()). - * - * @return resource Returns an IMAP stream on success - * @throws CAS_OutOfSequenceException If called multiple times. - * @throws CAS_ProxyTicketException If there is a proxy-ticket failure. - * The code of the Exception will be one of: - * PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE - * PHPCAS_SERVICE_PT_FAILURE - * @throws CAS_ProxiedService_Exception If there is a failure sending the - * request to the target service. - */ - public function open () - { - if ($this->hasBeenOpened()) { - throw new CAS_OutOfSequenceException('Stream already opened.'); - } - if (empty($this->_mailbox)) { - throw new CAS_ProxiedService_Exception( - 'You must specify a mailbox via '.get_class($this) - .'->setMailbox($mailbox)' - ); - } - - phpCAS::traceBegin(); - - // Get our proxy ticket and append it to our URL. - $this->initializeProxyTicket(); - phpCAS::trace('opening IMAP mailbox `'.$this->_mailbox.'\'...'); - $this->_stream = @imap_open( - $this->_mailbox, $this->_username, $this->getProxyTicket(), - $this->_options - ); - if ($this->_stream) { - phpCAS::trace('ok'); - } else { - phpCAS::trace('could not open mailbox'); - // @todo add localization integration. - $message = 'IMAP Error: '.$this->_url.' '. var_export(imap_errors(), true); - phpCAS::trace($message); - throw new CAS_ProxiedService_Exception($message); - } - - phpCAS::traceEnd(); - return $this->_stream; - } - - /** - * Answer true if our request has been sent yet. - * - * @return bool - */ - protected function hasBeenOpened () - { - return !empty($this->_stream); - } - - /********************************************************* - * 3. Access the result - *********************************************************/ - /** - * The IMAP stream - * - * @var resource $_stream - */ - private $_stream; - - /** - * Answer the IMAP stream - * - * @return resource - * @throws CAS_OutOfSequenceException if stream is not opened yet - */ - public function getStream () - { - if (!$this->hasBeenOpened()) { - throw new CAS_OutOfSequenceException( - 'Cannot access stream, not opened yet.' - ); - } - return $this->_stream; - } - - /** - * CAS_Client::serviceMail() needs to return the proxy ticket for some reason, - * so this method provides access to it. - * - * @return string - * @throws CAS_OutOfSequenceException If called before the stream has been - * opened. - */ - public function getImapProxyTicket () - { - if (!$this->hasBeenOpened()) { - throw new CAS_OutOfSequenceException( - 'Cannot access errors, stream not opened yet.' - ); - } - return $this->getProxyTicket(); - } -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxiedService/Testable.php b/lib/apereo/phpcas/source/CAS/ProxiedService/Testable.php deleted file mode 100644 index 3ce44fd16..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxiedService/Testable.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This interface defines methods that allow proxy-authenticated service handlers - * to be tested in unit tests. - * - * Classes implementing this interface SHOULD store the CAS_Client passed and - * initialize themselves with that client rather than via the static phpCAS - * method. For example: - * - * / ** - * * Fetch our proxy ticket. - * * / - * protected function initializeProxyTicket() { - * // Allow usage of a particular CAS_Client for unit testing. - * if (is_null($this->casClient)) - * phpCAS::initializeProxiedService($this); - * else - * $this->casClient->initializeProxiedService($this); - * } - * - * @class CAS_ProxiedService_Testabel - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -interface CAS_ProxiedService_Testable -{ - - /** - * Use a particular CAS_Client->initializeProxiedService() rather than the - * static phpCAS::initializeProxiedService(). - * - * This method should not be called in standard operation, but is needed for unit - * testing. - * - * @param CAS_Client $casClient Cas client object - * - * @return void - * @throws CAS_OutOfSequenceException If called after a proxy ticket has - * already been initialized/set. - */ - public function setCasClient (CAS_Client $casClient); - -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxyChain.php b/lib/apereo/phpcas/source/CAS/ProxyChain.php deleted file mode 100644 index e200724ce..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxyChain.php +++ /dev/null @@ -1,127 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * A normal proxy-chain definition that lists each level of the chain as either - * a string or regular expression. - * - * @class CAS_ProxyChain - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -class CAS_ProxyChain -implements CAS_ProxyChain_Interface -{ - - protected $chain = array(); - - /** - * A chain is an array of strings or regexp strings that will be matched - * against. Regexp will be matched with preg_match and strings will be - * matched from the beginning. A string must fully match the beginning of - * an proxy url. So you can define a full domain as acceptable or go further - * down. - * Proxies have to be defined in reverse from the service to the user. If a - * user hits service A get proxied via B to service C the list of acceptable - * proxies on C would be array(B,A); - * - * @param array $chain A chain of proxies - */ - public function __construct(array $chain) - { - // Ensure that we have an indexed array - $this->chain = array_values($chain); - } - - /** - * Match a list of proxies. - * - * @param array $list The list of proxies in front of this service. - * - * @return bool - */ - public function matches(array $list) - { - $list = array_values($list); // Ensure that we have an indexed array - if ($this->isSizeValid($list)) { - $mismatch = false; - foreach ($this->chain as $i => $search) { - $proxy_url = $list[$i]; - if (preg_match('/^\/.*\/[ixASUXu]*$/s', $search)) { - if (preg_match($search, $proxy_url)) { - phpCAS::trace( - "Found regexp " . $search . " matching " . $proxy_url - ); - } else { - phpCAS::trace( - "No regexp match " . $search . " != " . $proxy_url - ); - $mismatch = true; - break; - } - } else { - if (strncasecmp($search, $proxy_url, strlen($search)) == 0) { - phpCAS::trace( - "Found string " . $search . " matching " . $proxy_url - ); - } else { - phpCAS::trace( - "No match " . $search . " != " . $proxy_url - ); - $mismatch = true; - break; - } - } - } - if (!$mismatch) { - phpCAS::trace("Proxy chain matches"); - return true; - } - } else { - phpCAS::trace("Proxy chain skipped: size mismatch"); - } - return false; - } - - /** - * Validate the size of the the list as compared to our chain. - * - * @param array $list List of proxies - * - * @return bool - */ - protected function isSizeValid (array $list) - { - return (sizeof($this->chain) == sizeof($list)); - } -} diff --git a/lib/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php b/lib/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php deleted file mode 100644 index 988ddbb3c..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php +++ /dev/null @@ -1,119 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - - -/** - * ProxyChain is a container for storing chains of valid proxies that can - * be used to validate proxied requests to a service - * - * @class CAS_ProxyChain_AllowedList - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -class CAS_ProxyChain_AllowedList -{ - - private $_chains = array(); - - /** - * Check whether proxies are allowed by configuration - * - * @return bool - */ - public function isProxyingAllowed() - { - return (count($this->_chains) > 0); - } - - /** - * Add a chain of proxies to the list of possible chains - * - * @param CAS_ProxyChain_Interface $chain A chain of proxies - * - * @return void - */ - public function allowProxyChain(CAS_ProxyChain_Interface $chain) - { - $this->_chains[] = $chain; - } - - /** - * Check if the proxies found in the response match the allowed proxies - * - * @param array $proxies list of proxies to check - * - * @return bool whether the proxies match the allowed proxies - */ - public function isProxyListAllowed(array $proxies) - { - phpCAS::traceBegin(); - if (empty($proxies)) { - phpCAS::trace("No proxies were found in the response"); - phpCAS::traceEnd(true); - return true; - } elseif (!$this->isProxyingAllowed()) { - phpCAS::trace("Proxies are not allowed"); - phpCAS::traceEnd(false); - return false; - } else { - $res = $this->contains($proxies); - phpCAS::traceEnd($res); - return $res; - } - } - - /** - * Validate the proxies from the proxy ticket validation against the - * chains that were definded. - * - * @param array $list List of proxies from the proxy ticket validation. - * - * @return bool if any chain fully matches the supplied list - */ - public function contains(array $list) - { - phpCAS::traceBegin(); - $count = 0; - foreach ($this->_chains as $chain) { - phpCAS::trace("Checking chain ". $count++); - if ($chain->matches($list)) { - phpCAS::traceEnd(true); - return true; - } - } - phpCAS::trace("No proxy chain matches."); - phpCAS::traceEnd(false); - return false; - } -} -?> diff --git a/lib/apereo/phpcas/source/CAS/ProxyChain/Any.php b/lib/apereo/phpcas/source/CAS/ProxyChain/Any.php deleted file mode 100644 index fe18c5fbf..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxyChain/Any.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * A proxy-chain definition that will match any list of proxies. - * - * Use this class for quick testing or in certain production screnarios you - * might want to allow allow any other valid service to proxy your service. - * - * THIS CLASS IS HOWEVER NOT RECOMMENDED FOR PRODUCTION AND HAS SECURITY - * IMPLICATIONS: YOU ARE ALLOWING ANY SERVICE TO ACT ON BEHALF OF A USER - * ON THIS SERVICE. - * - * @class CAS_ProxyChain_Any - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_ProxyChain_Any -implements CAS_ProxyChain_Interface -{ - - /** - * Match a list of proxies. - * - * @param array $list The list of proxies in front of this service. - * - * @return bool - */ - public function matches(array $list) - { - phpCAS::trace("Using CAS_ProxyChain_Any. No proxy validation is performed."); - return true; - } - -} diff --git a/lib/apereo/phpcas/source/CAS/ProxyChain/Interface.php b/lib/apereo/phpcas/source/CAS/ProxyChain/Interface.php deleted file mode 100644 index b1d688174..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxyChain/Interface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * An interface for classes that define a list of allowed proxies in front of - * the current application. - * - * @class CAS_ProxyChain_Interface - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -interface CAS_ProxyChain_Interface -{ - - /** - * Match a list of proxies. - * - * @param array $list The list of proxies in front of this service. - * - * @return bool - */ - public function matches(array $list); - -} diff --git a/lib/apereo/phpcas/source/CAS/ProxyChain/Trusted.php b/lib/apereo/phpcas/source/CAS/ProxyChain/Trusted.php deleted file mode 100644 index e67d70852..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxyChain/Trusted.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * A proxy-chain definition that defines a chain up to a trusted proxy and - * delegates the resposibility of validating the rest of the chain to that - * trusted proxy. - * - * @class CAS_ProxyChain_Trusted - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_ProxyChain_Trusted -extends CAS_ProxyChain -implements CAS_ProxyChain_Interface -{ - - /** - * Validate the size of the the list as compared to our chain. - * - * @param array $list list of proxies - * - * @return bool - */ - protected function isSizeValid (array $list) - { - return (sizeof($this->chain) <= sizeof($list)); - } - -} diff --git a/lib/apereo/phpcas/source/CAS/ProxyTicketException.php b/lib/apereo/phpcas/source/CAS/ProxyTicketException.php deleted file mode 100644 index 2f825b421..000000000 --- a/lib/apereo/phpcas/source/CAS/ProxyTicketException.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - * - */ - -/** - * An Exception for errors related to fetching or validating proxy tickets. - * - * @class CAS_ProxyTicketException - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_ProxyTicketException -extends BadMethodCallException -implements CAS_Exception -{ - - /** - * Constructor - * - * @param string $message Message text - * @param int $code Error code - * - * @return void - */ - public function __construct ($message, $code = PHPCAS_SERVICE_PT_FAILURE) - { - // Warn if the code is not in our allowed list - $ptCodes = array( - PHPCAS_SERVICE_PT_FAILURE, - PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, - PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, - ); - if (!in_array($code, $ptCodes)) { - trigger_error( - 'Invalid code '.$code - .' passed. Must be one of PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, or PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE.' - ); - } - - parent::__construct($message, $code); - } -} diff --git a/lib/apereo/phpcas/source/CAS/Request/AbstractRequest.php b/lib/apereo/phpcas/source/CAS/Request/AbstractRequest.php deleted file mode 100644 index 4f9013ee2..000000000 --- a/lib/apereo/phpcas/source/CAS/Request/AbstractRequest.php +++ /dev/null @@ -1,380 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Provides support for performing web-requests via curl - * - * @class CAS_Request_AbstractRequest - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -abstract class CAS_Request_AbstractRequest -implements CAS_Request_RequestInterface -{ - - protected $url = null; - protected $cookies = array(); - protected $headers = array(); - protected $isPost = false; - protected $postBody = null; - protected $caCertPath = null; - protected $validateCN = true; - private $_sent = false; - private $_responseHeaders = array(); - private $_responseBody = null; - private $_errorMessage = ''; - - /********************************************************* - * Configure the Request - *********************************************************/ - - /** - * Set the URL of the Request - * - * @param string $url Url to set - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setUrl ($url) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - - $this->url = $url; - } - - /** - * Add a cookie to the request. - * - * @param string $name Name of entry - * @param string $value value of entry - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addCookie ($name, $value) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - - $this->cookies[$name] = $value; - } - - /** - * Add an array of cookies to the request. - * The cookie array is of the form - * array('cookie_name' => 'cookie_value', 'cookie_name2' => cookie_value2') - * - * @param array $cookies cookies to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addCookies (array $cookies) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - - $this->cookies = array_merge($this->cookies, $cookies); - } - - /** - * Add a header string to the request. - * - * @param string $header Header to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addHeader ($header) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - - $this->headers[] = $header; - } - - /** - * Add an array of header strings to the request. - * - * @param array $headers headers to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addHeaders (array $headers) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - - $this->headers = array_merge($this->headers, $headers); - } - - /** - * Make the request a POST request rather than the default GET request. - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function makePost () - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - - $this->isPost = true; - } - - /** - * Add a POST body to the request - * - * @param string $body body to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setPostBody ($body) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - if (!$this->isPost) { - throw new CAS_OutOfSequenceException( - 'Cannot add a POST body to a GET request, use makePost() first.' - ); - } - - $this->postBody = $body; - } - - /** - * Specify the path to an SSL CA certificate to validate the server with. - * - * @param string $caCertPath path to cert - * @param bool $validate_cn valdiate CN of certificate - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setSslCaCert ($caCertPath,$validate_cn=true) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - $this->caCertPath = $caCertPath; - $this->validateCN = $validate_cn; - } - - /********************************************************* - * 2. Send the Request - *********************************************************/ - - /** - * Perform the request. - * - * @return bool TRUE on success, FALSE on failure. - * @throws CAS_OutOfSequenceException If called multiple times. - */ - public function send () - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot send again.' - ); - } - if (is_null($this->url) || !$this->url) { - throw new CAS_OutOfSequenceException( - 'A url must be specified via setUrl() before the request can be sent.' - ); - } - $this->_sent = true; - return $this->sendRequest(); - } - - /** - * Send the request and store the results. - * - * @return bool TRUE on success, FALSE on failure. - */ - abstract protected function sendRequest (); - - /** - * Store the response headers. - * - * @param array $headers headers to store - * - * @return void - */ - protected function storeResponseHeaders (array $headers) - { - $this->_responseHeaders = array_merge($this->_responseHeaders, $headers); - } - - /** - * Store a single response header to our array. - * - * @param string $header header to store - * - * @return void - */ - protected function storeResponseHeader ($header) - { - $this->_responseHeaders[] = $header; - } - - /** - * Store the response body. - * - * @param string $body body to store - * - * @return void - */ - protected function storeResponseBody ($body) - { - $this->_responseBody = $body; - } - - /** - * Add a string to our error message. - * - * @param string $message message to add - * - * @return void - */ - protected function storeErrorMessage ($message) - { - $this->_errorMessage .= $message; - } - - /********************************************************* - * 3. Access the response - *********************************************************/ - - /** - * Answer the headers of the response. - * - * @return array An array of header strings. - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseHeaders () - { - if (!$this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has not been sent yet. Cannot '.__METHOD__ - ); - } - return $this->_responseHeaders; - } - - /** - * Answer HTTP status code of the response - * - * @return int - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - * @throws CAS_Request_Exception if the response did not contain a status code - */ - public function getResponseStatusCode () - { - if (!$this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has not been sent yet. Cannot '.__METHOD__ - ); - } - - if (!preg_match( - '/HTTP\/[0-9.]+\s+([0-9]+)\s*(.*)/', - $this->_responseHeaders[0], $matches - ) - ) { - throw new CAS_Request_Exception( - 'Bad response, no status code was found in the first line.' - ); - } - - return intval($matches[1]); - } - - /** - * Answer the body of response. - * - * @return string - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseBody () - { - if (!$this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has not been sent yet. Cannot '.__METHOD__ - ); - } - - return $this->_responseBody; - } - - /** - * Answer a message describing any errors if the request failed. - * - * @return string - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getErrorMessage () - { - if (!$this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has not been sent yet. Cannot '.__METHOD__ - ); - } - return $this->_errorMessage; - } -} diff --git a/lib/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php b/lib/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php deleted file mode 100644 index 850f6f0e4..000000000 --- a/lib/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php +++ /dev/null @@ -1,147 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This interface defines a class library for performing multiple web requests - * in batches. Implementations of this interface may perform requests serially - * or in parallel. - * - * @class CAS_Request_CurlMultiRequest - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_Request_CurlMultiRequest -implements CAS_Request_MultiRequestInterface -{ - private $_requests = array(); - private $_sent = false; - - /********************************************************* - * Add Requests - *********************************************************/ - - /** - * Add a new Request to this batch. - * Note, implementations will likely restrict requests to their own concrete - * class hierarchy. - * - * @param CAS_Request_RequestInterface $request reqest to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - * @throws CAS_InvalidArgumentException If passed a Request of the wrong - * implmentation. - */ - public function addRequest (CAS_Request_RequestInterface $request) - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - if (!$request instanceof CAS_Request_CurlRequest) { - throw new CAS_InvalidArgumentException( - 'As a CAS_Request_CurlMultiRequest, I can only work with CAS_Request_CurlRequest objects.' - ); - } - - $this->_requests[] = $request; - } - - /** - * Retrieve the number of requests added to this batch. - * - * @return int number of request elements - * @throws CAS_OutOfSequenceException if the request has already been sent - */ - public function getNumRequests() - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot '.__METHOD__ - ); - } - return count($this->_requests); - } - - /********************************************************* - * 2. Send the Request - *********************************************************/ - - /** - * Perform the request. After sending, all requests will have their - * responses poulated. - * - * @return bool TRUE on success, FALSE on failure. - * @throws CAS_OutOfSequenceException If called multiple times. - */ - public function send () - { - if ($this->_sent) { - throw new CAS_OutOfSequenceException( - 'Request has already been sent cannot send again.' - ); - } - if (!count($this->_requests)) { - throw new CAS_OutOfSequenceException( - 'At least one request must be added via addRequest() before the multi-request can be sent.' - ); - } - - $this->_sent = true; - - // Initialize our handles and configure all requests. - $handles = array(); - $multiHandle = curl_multi_init(); - foreach ($this->_requests as $i => $request) { - $handle = $request->initAndConfigure(); - curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); - $handles[$i] = $handle; - curl_multi_add_handle($multiHandle, $handle); - } - - // Execute the requests in parallel. - do { - curl_multi_exec($multiHandle, $running); - } while ($running > 0); - - // Populate all of the responses or errors back into the request objects. - foreach ($this->_requests as $i => $request) { - $buf = curl_multi_getcontent($handles[$i]); - $request->_storeResponseBody($buf); - curl_multi_remove_handle($multiHandle, $handles[$i]); - curl_close($handles[$i]); - } - - curl_multi_close($multiHandle); - } -} diff --git a/lib/apereo/phpcas/source/CAS/Request/CurlRequest.php b/lib/apereo/phpcas/source/CAS/Request/CurlRequest.php deleted file mode 100644 index e30dd0d19..000000000 --- a/lib/apereo/phpcas/source/CAS/Request/CurlRequest.php +++ /dev/null @@ -1,198 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Provides support for performing web-requests via curl - * - * @class CAS_Request_CurlRequest - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_Request_CurlRequest -extends CAS_Request_AbstractRequest -implements CAS_Request_RequestInterface -{ - - /** - * Set additional curl options - * - * @param array $options option to set - * - * @return void - */ - public function setCurlOptions (array $options) - { - $this->_curlOptions = $options; - } - private $_curlOptions = array(); - - /** - * Send the request and store the results. - * - * @return bool true on success, false on failure. - */ - protected function sendRequest () - { - phpCAS::traceBegin(); - - /********************************************************* - * initialize the CURL session - *********************************************************/ - $ch = $this->initAndConfigure(); - - /********************************************************* - * Perform the query - *********************************************************/ - $buf = curl_exec($ch); - if ( $buf === false ) { - phpCAS::trace('curl_exec() failed'); - $this->storeErrorMessage( - 'CURL error #'.curl_errno($ch).': '.curl_error($ch) - ); - $res = false; - } else { - $this->storeResponseBody($buf); - phpCAS::trace("Response Body: \n".$buf."\n"); - $res = true; - - } - // close the CURL session - curl_close($ch); - - phpCAS::traceEnd($res); - return $res; - } - - /** - * Internal method to initialize our cURL handle and configure the request. - * This method should NOT be used outside of the CurlRequest or the - * CurlMultiRequest. - * - * @return resource|false The cURL handle on success, false on failure - */ - public function initAndConfigure() - { - /********************************************************* - * initialize the CURL session - *********************************************************/ - $ch = curl_init($this->url); - - curl_setopt_array($ch, $this->_curlOptions); - - /********************************************************* - * Set SSL configuration - *********************************************************/ - if ($this->caCertPath) { - if ($this->validateCN) { - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - } else { - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); - } - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); - curl_setopt($ch, CURLOPT_CAINFO, $this->caCertPath); - phpCAS::trace('CURL: Set CURLOPT_CAINFO ' . $this->caCertPath); - } else { - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); - } - - /********************************************************* - * Configure curl to capture our output. - *********************************************************/ - // return the CURL output into a variable - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - - // get the HTTP header with a callback - curl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, '_curlReadHeaders')); - - /********************************************************* - * Add cookie headers to our request. - *********************************************************/ - if (count($this->cookies)) { - $cookieStrings = array(); - foreach ($this->cookies as $name => $val) { - $cookieStrings[] = $name.'='.$val; - } - curl_setopt($ch, CURLOPT_COOKIE, implode(';', $cookieStrings)); - } - - /********************************************************* - * Add any additional headers - *********************************************************/ - if (count($this->headers)) { - curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers); - } - - /********************************************************* - * Flag and Body for POST requests - *********************************************************/ - if ($this->isPost) { - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $this->postBody); - } - - /********************************************************* - * Set User Agent - *********************************************************/ - curl_setopt($ch, CURLOPT_USERAGENT, 'phpCAS/' . phpCAS::getVersion()); - - return $ch; - } - - /** - * Store the response body. - * This method should NOT be used outside of the CurlRequest or the - * CurlMultiRequest. - * - * @param string $body body to stor - * - * @return void - */ - public function _storeResponseBody ($body) - { - $this->storeResponseBody($body); - } - - /** - * Internal method for capturing the headers from a curl request. - * - * @param resource $ch handle of curl - * @param string $header header - * - * @return int - */ - public function _curlReadHeaders ($ch, $header) - { - $this->storeResponseHeader($header); - return strlen($header); - } -} diff --git a/lib/apereo/phpcas/source/CAS/Request/Exception.php b/lib/apereo/phpcas/source/CAS/Request/Exception.php deleted file mode 100644 index dd5a2a55a..000000000 --- a/lib/apereo/phpcas/source/CAS/Request/Exception.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * An Exception for problems performing requests - * - * @class CAS_Request_Exception - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_Request_Exception -extends Exception -implements CAS_Exception -{ - -} diff --git a/lib/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php b/lib/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php deleted file mode 100644 index 41002c777..000000000 --- a/lib/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php +++ /dev/null @@ -1,83 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This interface defines a class library for performing multiple web requests - * in batches. Implementations of this interface may perform requests serially - * or in parallel. - * - * @class CAS_Request_MultiRequestInterface - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -interface CAS_Request_MultiRequestInterface -{ - - /********************************************************* - * Add Requests - *********************************************************/ - - /** - * Add a new Request to this batch. - * Note, implementations will likely restrict requests to their own concrete - * class hierarchy. - * - * @param CAS_Request_RequestInterface $request request interface - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been - * sent. - * @throws CAS_InvalidArgumentException If passed a Request of the wrong - * implmentation. - */ - public function addRequest (CAS_Request_RequestInterface $request); - - /** - * Retrieve the number of requests added to this batch. - * - * @return int number of request elements - */ - public function getNumRequests (); - - /********************************************************* - * 2. Send the Request - *********************************************************/ - - /** - * Perform the request. After sending, all requests will have their - * responses poulated. - * - * @return bool TRUE on success, FALSE on failure. - * @throws CAS_OutOfSequenceException If called multiple times. - */ - public function send (); -} diff --git a/lib/apereo/phpcas/source/CAS/Request/RequestInterface.php b/lib/apereo/phpcas/source/CAS/Request/RequestInterface.php deleted file mode 100644 index b8e8772e9..000000000 --- a/lib/apereo/phpcas/source/CAS/Request/RequestInterface.php +++ /dev/null @@ -1,179 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * This interface defines a class library for performing web requests. - * - * @class CAS_Request_RequestInterface - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -interface CAS_Request_RequestInterface -{ - - /********************************************************* - * Configure the Request - *********************************************************/ - - /** - * Set the URL of the Request - * - * @param string $url url to set - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setUrl ($url); - - /** - * Add a cookie to the request. - * - * @param string $name name of cookie - * @param string $value value of cookie - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addCookie ($name, $value); - - /** - * Add an array of cookies to the request. - * The cookie array is of the form - * array('cookie_name' => 'cookie_value', 'cookie_name2' => cookie_value2') - * - * @param array $cookies cookies to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addCookies (array $cookies); - - /** - * Add a header string to the request. - * - * @param string $header header to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addHeader ($header); - - /** - * Add an array of header strings to the request. - * - * @param array $headers headers to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function addHeaders (array $headers); - - /** - * Make the request a POST request rather than the default GET request. - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function makePost (); - - /** - * Add a POST body to the request - * - * @param string $body body to add - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setPostBody ($body); - - - /** - * Specify the path to an SSL CA certificate to validate the server with. - * - * @param string $caCertPath path to cert file - * @param boolean $validate_cn validate CN of SSL certificate - * - * @return void - * @throws CAS_OutOfSequenceException If called after the Request has been sent. - */ - public function setSslCaCert ($caCertPath, $validate_cn = true); - - - - /********************************************************* - * 2. Send the Request - *********************************************************/ - - /** - * Perform the request. - * - * @return bool TRUE on success, FALSE on failure. - * @throws CAS_OutOfSequenceException If called multiple times. - */ - public function send (); - - /********************************************************* - * 3. Access the response - *********************************************************/ - - /** - * Answer the headers of the response. - * - * @return array An array of header strings. - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseHeaders (); - - /** - * Answer HTTP status code of the response - * - * @return int - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseStatusCode (); - - /** - * Answer the body of response. - * - * @return string - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getResponseBody (); - - /** - * Answer a message describing any errors if the request failed. - * - * @return string - * @throws CAS_OutOfSequenceException If called before the Request has been sent. - */ - public function getErrorMessage (); -} diff --git a/lib/apereo/phpcas/source/CAS/Session/PhpSession.php b/lib/apereo/phpcas/source/CAS/Session/PhpSession.php deleted file mode 100644 index 031cbbc70..000000000 --- a/lib/apereo/phpcas/source/CAS/Session/PhpSession.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Empty class used as a default implementation for phpCAS. - * - * Implements the standard PHP session handler without no alterations. - * - * @class CAS_Session_PhpSession - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_Session_PhpSession extends SessionHandler implements SessionHandlerInterface -{ -} diff --git a/lib/apereo/phpcas/source/CAS/TypeMismatchException.php b/lib/apereo/phpcas/source/CAS/TypeMismatchException.php deleted file mode 100644 index 72bdc87a1..000000000 --- a/lib/apereo/phpcas/source/CAS/TypeMismatchException.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ - -/** - * Exception that denotes invalid arguments were passed. - * - * @class CAS_InvalidArgumentException - * @category Authentication - * @package PhpCAS - * @author Adam Franco - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 - * @link https://wiki.jasig.org/display/CASC/phpCAS - */ -class CAS_TypeMismatchException -extends CAS_InvalidArgumentException -{ - /** - * Constructor, provides a nice message. - * - * @param mixed $argument Argument - * @param string $argumentName Argument Name - * @param string $type Type - * @param string $message Error Message - * @param integer $code Code - * - * @return void - */ - public function __construct ( - $argument, $argumentName, $type, $message = '', $code = 0 - ) { - if (is_object($argument)) { - $foundType = get_class($argument).' object'; - } else { - $foundType = gettype($argument); - } - - parent::__construct( - 'type mismatched for parameter ' - . $argumentName . ' (should be \'' . $type .' \'), ' - . $foundType . ' given. ' . $message, $code - ); - } -} -?> diff --git a/lib/autoload.php b/lib/autoload.php deleted file mode 100644 index 460e67535..000000000 --- a/lib/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ -handle = fopen($opened_path, $mode); - $this->position = 0; - - // remove all traces of this stream wrapper once it has been used - stream_wrapper_unregister('composer-bin-proxy'); - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return fstat($this->handle); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { - include("composer-bin-proxy://" . $binPath); - exit(0); - } -} - -include $binPath; diff --git a/lib/bin/generate-deps-for-config-factory.bat b/lib/bin/generate-deps-for-config-factory.bat deleted file mode 100644 index 3eae0eb2c..000000000 --- a/lib/bin/generate-deps-for-config-factory.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../laminas/laminas-servicemanager/bin/generate-deps-for-config-factory -php "%BIN_TARGET%" %* diff --git a/lib/bin/generate-factory-for-class b/lib/bin/generate-factory-for-class deleted file mode 100644 index 9aec04dbc..000000000 --- a/lib/bin/generate-factory-for-class +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env php -handle = fopen($opened_path, $mode); - $this->position = 0; - - // remove all traces of this stream wrapper once it has been used - stream_wrapper_unregister('composer-bin-proxy'); - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return fstat($this->handle); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { - include("composer-bin-proxy://" . $binPath); - exit(0); - } -} - -include $binPath; diff --git a/lib/bin/generate-factory-for-class.bat b/lib/bin/generate-factory-for-class.bat deleted file mode 100644 index 97f2fa32a..000000000 --- a/lib/bin/generate-factory-for-class.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../laminas/laminas-servicemanager/bin/generate-factory-for-class -php "%BIN_TARGET%" %* diff --git a/lib/bin/patch-type-declarations b/lib/bin/patch-type-declarations deleted file mode 100644 index 1b0b28230..000000000 --- a/lib/bin/patch-type-declarations +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env php -handle = fopen($opened_path, $mode); - $this->position = 0; - - // remove all traces of this stream wrapper once it has been used - stream_wrapper_unregister('composer-bin-proxy'); - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return fstat($this->handle); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { - include("composer-bin-proxy://" . $binPath); - exit(0); - } -} - -include $binPath; diff --git a/lib/bin/patch-type-declarations.bat b/lib/bin/patch-type-declarations.bat deleted file mode 100644 index b92a2da31..000000000 --- a/lib/bin/patch-type-declarations.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../symfony/error-handler/Resources/bin/patch-type-declarations -php "%BIN_TARGET%" %* diff --git a/lib/bin/php-parse b/lib/bin/php-parse deleted file mode 100644 index 1bd2c838c..000000000 --- a/lib/bin/php-parse +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'); - exit(0); - } -} - -include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'; diff --git a/lib/bin/php-parse.bat b/lib/bin/php-parse.bat deleted file mode 100644 index 2c5096dc3..000000000 --- a/lib/bin/php-parse.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/php-parse -SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 -php "%BIN_TARGET%" %* diff --git a/lib/bin/pscss b/lib/bin/pscss deleted file mode 100644 index fa9a900db..000000000 --- a/lib/bin/pscss +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env php -handle = fopen($opened_path, $mode); - $this->position = 0; - - // remove all traces of this stream wrapper once it has been used - stream_wrapper_unregister('composer-bin-proxy'); - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return fstat($this->handle); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { - include("composer-bin-proxy://" . $binPath); - exit(0); - } -} - -include $binPath; diff --git a/lib/bin/pscss.bat b/lib/bin/pscss.bat deleted file mode 100644 index 1e368dc92..000000000 --- a/lib/bin/pscss.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../scssphp/scssphp/bin/pscss -php "%BIN_TARGET%" %* diff --git a/lib/bin/var-dump-server b/lib/bin/var-dump-server deleted file mode 100644 index 10567b2c7..000000000 --- a/lib/bin/var-dump-server +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env php -handle = fopen($opened_path, $mode); - $this->position = 0; - - // remove all traces of this stream wrapper once it has been used - stream_wrapper_unregister('composer-bin-proxy'); - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return fstat($this->handle); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { - include("composer-bin-proxy://" . $binPath); - exit(0); - } -} - -include $binPath; diff --git a/lib/bin/var-dump-server.bat b/lib/bin/var-dump-server.bat deleted file mode 100644 index 46836b50c..000000000 --- a/lib/bin/var-dump-server.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../symfony/var-dumper/Resources/bin/var-dump-server -php "%BIN_TARGET%" %* diff --git a/lib/bin/yaml-lint b/lib/bin/yaml-lint deleted file mode 100644 index 182c83f09..000000000 --- a/lib/bin/yaml-lint +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env php -handle = fopen($opened_path, $mode); - $this->position = 0; - - // remove all traces of this stream wrapper once it has been used - stream_wrapper_unregister('composer-bin-proxy'); - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return fstat($this->handle); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { - include("composer-bin-proxy://" . $binPath); - exit(0); - } -} - -include $binPath; diff --git a/lib/bin/yaml-lint.bat b/lib/bin/yaml-lint.bat deleted file mode 100644 index 0474134c6..000000000 --- a/lib/bin/yaml-lint.bat +++ /dev/null @@ -1,4 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/../symfony/yaml/Resources/bin/yaml-lint -php "%BIN_TARGET%" %* diff --git a/lib/combodo/tcpdf/CHANGELOG.TXT b/lib/combodo/tcpdf/CHANGELOG.TXT deleted file mode 100644 index e90bd161a..000000000 --- a/lib/combodo/tcpdf/CHANGELOG.TXT +++ /dev/null @@ -1,3074 +0,0 @@ -6.4.4 (2021-12-31) - - PHP 8.1 fixes - -6.4.3 (2021-12-28) - - Fix MultiCell PHPDoc typehint (#407) - - Fix type hint for \TCPDF_STATIC::_freadint (#414) - - Footer and Header font phpdoc fixes + constructor $pdfa phpdoc fix + setHeaderData lw param fix (#402) - - Fix text-annotation state options (#412) - - Fix - Named links have been broken. This fixes. (#415) - - Fixed type in comment for $lw header image logo width in mm - - Change Set to set. Fixes #419 (#421) - - Fix failing tests and failing tests not marking exit code as 1 (#426) - - Fix phpdoc and prefer null as default value (#444) - - Run on PHP 8.1 normally and add nightly PHP as allowed to fail (#452) - - Fix AES128 encryption if the OpenSSL extension is installed (#453) - - Explicitly cast values to int for imagesetpixel (#460) - - Fix cell_height_ratio type (#405) - - Leave &NBSP; lowercase when using text-transform (#403) - -6.4.2 (2021-07-20) - - Fix PHP 8.1 type error with TCPDF_STATIC::pregSplit on preg_split - - Fix a PHP array offset error - - Fixed phpdoc blocks - - Drop a PHP 4 polyfill and add a .gitattributes file - - Added a test-suite - - Removed pointless assignments - - Fix docblock spelling error - - Update version info - - Fix color being filled to type 0 with PHP 8 - - Fix warnings for undefined tags for $lineStyle - - Normalized composer.json - - Allowed transparency in PDF/A-2 and PDF/A-3 - - Add a TCPDF composer example - - Fixed implicit conversion from float to int for PHP 8.1 - - Removed status.txt from font directories, because of filesize - - Fixed type hints - - Removed "U" modifier from regexes - -6.4.1 (2021-03-27) - - Update tcpdf version (no code changes) - -6.4.0 (2021-03-27) - - allow styles on
tags - - check if file exists before calling unlink - - Fix image file type for urls with query params - - Fix SVGPath should accept 1.19.30 (equiv 1.19,.30) compacted values list - - Fix Second parameter of TCPDF::cell() must be a number - - PHP 8.0 function signature fixes - - Fix vulnerability to roman numeral bombs - - Optimized a regular expression - - Cache file get contents calls - - Remove mb_internal encoding handling - -6.3.5 (2020-02-14) - - Fixed curly braces in pdf417 - - Fixed a syntax error issue when accessing an index of a casted variable - -6.3.4 (2020-02-12) - - Check if imagekeys exist - - Unlink only images in cache - -6.3.3 (2020-02-12) - - Fixed PHP 7.4 - cannot use array offset on integers - - Fixed PDF/A-3B validation issue caused by missing pdfaSchema:property. - - Removed backup changelog files from repo - - Prevents the deletion of non-existent files in /tmp - - Prevent crash in case of no list access in cache path - - Check existence of file before delete it - - Fixed erase users pictures - - Fixed problem with $imagekeys undefined or unlinked - - Fix SVGPath elliptical arc with rx/ry=0 + z should return to initial point - - Fixed PHP 7.4 errors - - handle integers for pages - - Fixed background image doesn't work in RTL - - Fixed PDF/A validity - - Fixed datamatrix.php for PHP 7.4 - - Fixed deprecated PHP features - -6.3.2 (2019-09-20) - - Update ICC profile - -6.3.1 (2019-09-20) - - Fix reported version - - Fix Undefined property: GLPIPDF::$imagekeys - -6.3.0 (2019-09-19) - - fix SpotColor handling in HTML - - Add an additional empty test to prevent error in PHP 7.2 - - Fix the documentation how to calculate the cell height - - Drop duplicated array indices - - Fix TCPDF_STATIC::fileGetContents() - - Introduce other version of pdfA (2 and 3) - - Add UF and AFRelationship missing - - Fix performance issue of cloned instances - - Change glob to readdir which performs better - - URI in PDF can result in E_NOTICE - - Fix a warning for PHP 7.4 - - Fixed gradient offsets for percentage-based stops. - - Fixed file_get_contents return value should also be checked for a non-empty string - - Fix Array and string offset access syntax with curly braces is deprecated - - Fix PHP Warning: chr() expects parameter 1 to be int - - Add a VERSION file - -6.2.26 (2018-10-16) - - Update sRGB.icc with the one from the Debian package icc-profiles-free - - Fix unsupported operand types error when codepoints arrays are merged - -6.2.25 (2018-09-23) - - Fix support for image URLs. - -6.2.24 - - Support remote urls when checking if file exists. - -6.2.23 (2018-09-22) - - Simplify file_exists function. - -6.2.22 (2018-09-14) - - Fixes on `include/tcpdf_images.php`, `include/tcpdf_static.php` and `tcpdf.php` about file handling - -6.2.21 (2018-09-14) - - _no code changes_ - -6.2.20 (2018-09-14) - - Fix for security vulnerability: Using the phar:// wrapper it was possible to trigger the unserialization of user provided data. - -6.2.19 (2018-09-14) - - Merge various fixes for PHP 7.3 compatibility and security. - -6.2.13 (2016-06-10) - - IMPORTANT: A new version of this library is under development at https://github.com/tecnickcom/tc-lib-pdf and as a consequence this version will not receive any additional development or support. This version should be considered obsolete, new projects should use the new version as soon it will become stable. - -6.2.12 (2015-09-12) - - fix composer package name to tecnickcom/tcpdf - -6.2.11 (2015-08-02) - - Bug #1070 "PNG regression in 6.2.9 (they appear as their alpha channel)" was fixed. - - Bug #1069 "Encoded SRC URLs in tags don't work anymore" was fixed. - -6.2.10 (2015-07-28) - - Minor mod to PNG parsing. - - Make dependency on mcrypt optional. - -6.2.8 (2015-04-29) - - Removed unwanted file. - -6.2.7 (2015-04-28) - - Merged PR 17: Avoid warning when iterating a non-array variable. - - Merged PR 16: Improve MuliCell param definition. - - Improved column check (PR 15). - - Merged PR 11: Use stream_is_local instead of limit to file://. - - Merged PR 10: ImageMagick link on README.txt. - -6.2.6 (2015-01-28) - - Bug #1008 "UTC offset sing breaks PDF/A-1b compliance" was fixed. - -6.2.5 (2015-01-24) - - Bug #1019 "$this in static context" was fixed. - - Bug #1015 "Infinite loop in getIndirectObject method of parser" was fixed. - -6.2.4 (2015-01-08) - - fix warning related to empty K_PATH_URL. - - fix error when a $table_colwidths key is not set. - -6.2.3 (2014-12-18) - - New comment. - - Moved the K_PATH_IMAGES definition in tcpdf_autoconfig. - -6.2.2 (2014-12-18) - - Fixed mispelled words. - - Fixed version number. - -6.2.1 (2014-12-18) - - The constant K_TCPDF_THROW_EXCEPTION_ERROR is now set to false in the default configuration file. - - An issue with the _destroy() method was fixed. - -6.2.0 (2014-12-10) - - Bug #1005 "Security Report, LFI posting internal files externally abusing default parameter" was fixed. - - Static methods serializeTCPDFtagParameters() and unserializeTCPDFtagParameters() were moved as non static to the main TCPDF class (see changes in example n. 49). - - Deprecated methods were removed, please use the equivalents defined in other classes (i.e. TCPDF_STATIC and TCPDF_FONTS). - - The constant K_TCPDF_CALLS_IN_HTML is now set by default to FALSE. - - DLE, DLX and DLP page format was added. - - Page format are now defined as a public property in TCPDF_STATIC. - -6.1.1 (2014-12-09) - - Fixed bug with the register_shutdown_function(). - -6.1.0 (2014-12-07) - - The method TCPDF_STATIC::getRandomSeed() was improved. - - The disk caching feature was removed. - - Bug #1003 "Backslashes become duplicated in table, using WriteHTML" was fixed. - - Bug #1002 "SVG radialGradient within non-square Rect" was fixed. - -6.0.099 (2014-11-15) - - Added basic support for nested SVG images (adapted PR from SamMousa). - - A bug related to setGDImageTransparency() was fixed (thanks to Maarten Boerema). - -6.0.098 (2014-11-08) - - Bug item #996 "getCharBBox($char) returns incorrect results for TTF glyphs without outlines" was fixed. - - Bug item #991 "Text problem with SVG" was fixed (only the font style part). - -6.0.097 (2014-10-20) - - Bug item #988 "hyphenateText - charmin parameter not work" was fixed. - - New 1D barcode method to print pre-formatted IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200. - -6.0.096 (2014-10-06) - - Bug item #982 "Display style is not inherited in SVG" was fixed. - - Bug item #984 "Double quote url in CSS" was fixed. - -6.0.095 (2014-10-02) - - Bug item #979 "New Timezone option overwriting current timezone" was fixed. - -6.0.094 (2014-09-30) - - Bug item #978 "Variable Undefined: $cborder" was fixed. - -6.0.093 (2014-09-02) - - Security fix: some serialize/unserialize methods were replaced with json_encode/json_decode to avoid a potential object injection with user supplied content. Thanks to ownCloud Inc. for reporting this issue. - - K_TIMEZONE constant was added to the default configuration to suppress date-time warnings. - -6.0.092 (2014-09-01) - - Bug item #956 "Monospaced fonts are not alignd at the baseline" was fixed. - - Bug item #964 "Problem when changing font size" was fixed. - - Bug item #969 "ImageSVG with radialGradient problem" was fixed. - - sRGB.icc file was replaced with the one from the Debian package icc-profiles-free (2.0.1+dfsg-1) - -6.0.091 (2014-08-13) - - Issue #325"Division by zero when css fontsize equals 0" was fixed. - -6.0.090 (2014-08-08) - - Starting from this version TCPDF is also available in GitHub at https://github.com/tecnickcom/TCPDF - - Function getmypid() was removed for better compatibility with shared hosting environments. - - Support for pulling SVG stroke opacity value from RGBa color was mergeg [adf006]. - - Bug item #951 "HTML Table within TCPDF columns doesnt flow correctly on page break ..." was fixed. - -6.0.089 (2014-07-16) - - Bug item #948 "bottom line of rowspan cell not work correctly" was fixed. - -6.0.088 (2014-07-09) - - Bug item #946 "Case sensitive type check causes broken match for SVG" was fixed. - - Bug item #945 "Imagick load doesn't account for passed data string " was fixed. - -6.0.087 (2014-06-25) - - A bug affecting fitcell option in Multicell was fixed. - -6.0.086 (2014-06-20) - - Bug item #938 "Hyphenation-dash extends outside of cell" was fixed (collateral effect). - -6.0.085 (2014-06-19) - - Some example images were replaced. - - A race condition bug was fixed. - - Bug item #938 "Hyphenation-dash extends outside of cell" was fixed. - -6.0.084 (2014-06-13) - - A bug related to MultiCell fitcell feature was fixed. - - Bug item #931 "Documentation error for setPageFormat()" was fixed. - -6.0.083 (2014-05-29) - - Bug item #928 "setHtmlVSpace with HR element" was fixed. - -6.0.082 (2014-05-23) - - Bug item #926 "test statement instead of assignment used in tcpdf_fonts.php" was fixed. - - Bug item #925 "924 transparent images bug" was fixed. - -6.0.081 (2014-05-22) - - Bug item #922 "writehtml tables thead repeating" was fixed. - - Patch #71 "External and internal links, local and remote" wa applied. - -6.0.080 (2014-05-20) - - Bug item #921 "Fatal error in hyphenateText() function" was fixed. - - Bug item #923 "Automatic Hyphenation error" was fixed. - - Patch #70 "Augument TCPDFBarcode classes with ability to return raw png image data" was applied. - -6.0.079 (2014-05-19) - - Patch item #69 "Named destinations, HTML internal and external links" was merged. - - Bug item #920 "hyphenateText() should not hyphenate the content of style-tags in HTML mode" was fixed. - - Image method now trigs an error in case the cache is now writeable. - - Fixed issue with layer default status. - -6.0.078 (2014-05-12) - - A warning issue in addTTFfont() method was fixed. - - Fonts were updated to include cbbox metrics. - -6.0.077 (2014-05-06) - - A Datamatrix barcode bug was fixed. - -6.0.076 (2014-05-06) - - A bug in Datamatrix Base256 encoding was fixed. - - Merged fix for SVG use/clip-gradient. - - Now it is possible to prefix a page number in Link methods with the * character to avoid been changed when adding/deleting/moving pages (see example_045.php). - -6.0.075 (2014-05-05) - - Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed. - -6.0.074 (2014-05-03) - - Part of Bug #917 "Using realtive Units like ex or em for images distort output in HTML mode" was fixed. - - Bug #915 "Problem with SVG Image using Radial Gradients" was fixed. - -6.0.073 (2014-04-29) - - Bug #913 "Possible bug with line-height" was fixed. - - Bug #914 "MultiCell and FitCell" was fixed. - - Bug #915 "Problem with SVG Image using Radial Gradients" was fixed. - -6.0.072 (2014-04-27) - - Deprecated curly braces substring syntax was replaced with square braces. - -6.0.071 (2014-04-25) - - Bug #911 "error with buffered png pics" was fixed. - -6.0.070 (2014-04-24) - - Bug #910 "An SVG image is being cut off (with clipping mask) when you use align options" was fixed. - -6.0.069 (2014-04-24) - - Datamatrix Base256 encoding was fixed. - -6.0.068 (2014-04-22) - - Some Datamatrix barcode bugs were fixed. - -6.0.067 (2014-04-21) - - startLayer() method signature was changed to include a new "lock" parameter. - -6.0.066 (2014-04-20) - - Bug #908 "Linebreak is not considered when getting length of the next string" was fixed. - -6.0.065 (2014-04-10) - - Bug #905 "RGB percentage color bug in convertHTMLColorToDec()" was fixed. - -6.0.064 (2014-04-07) - - Header and Footer fonts are now set by default. - - Bug #904 "PDF corrupted" was fixed. - -6.0.063 (2014-04-03) - - Method TCPDF_IMAGES::_parsepng() was fixed to support transparency in Indexed images. - -6.0.062 (2014-03-02) - - The method startLayer() now accepts the NULL value for the $print parameter to not set the print layer option. - -6.0.061 (2014-02-18) - - Bug #893 "Parsing error on streamed xref for secured pdf" was fixed. - -6.0.060 (2014-02-16) - - Bug #891 "Error on parsing hexa fields" was fixed. - - Bug #892 "Parsing pdf with trailing space at start" was fixed. - -6.0.059 (2014-02-03) - - SVG 'use' support was imporved. - -6.0.058 (2014-01-31) - - Bug #886 "Bugs with SVG using and " was fixed. - -6.0.057 (2014-01-26) - - Bug #883 "Parsing error" was fixed. - -6.0.056 (2014-01-25) - - The automatic cache folder selection now works also with some restricted hosting environments. - - CSS text-transform property is now supported (requires the multibyte string library for php) - see examle n. 061 (Thanks to Walter Ferraz). - - Bug #884 "Parsing error prev tag looking for" was fixed. - -6.0.055 (2014-01-15) - - Bug #880 "Error detecting hX tags (h1,h2..)" was fixed - - Bug #879 "Thead on the second page inherits style of previous tr" was fixed - -6.0.054 (2014-01-13) - - Bug #877 "Parenteses causing corrupt text" was fixed. - -6.0.053 (2014-01-03) - - Bug #876 "Cell padding should not be multiplied with number of lines in getStringHeight" was fixed. - - Patch #68 "Empty img src attribute leads to access of uninitialized string offset" was applied. - -6.0.052 (2013-12-12) - - Bug #871 "Datamatrix coding" was fixed. - -6.0.051 (2013-12-02) - - cbbox array values in addTTFfont() were converted to integers. - -6.0.050 (2013-12-01) - - The method getNumLines() was extended to support hyphenation. - - The CSS property line-height now supports non percentage values. - -6.0.050 (2013-11-27) - - A bug related to PNG images was fixed. - -6.0.048 (2013-11-24) - - SVG vars are now reset in ImageSVG() method. - -6.0.047 (2013-11-19) - - SVG support was extended to support some nested defs. - -6.0.046 (2013-11-17) - - preg_replace_callback functions were replaced to improve memory performances. - -6.0.045 (2013-11-17) - - Bug #862 "Parsing error on flate filter" was fixed. - -6.0.044 (2013-11-10) - - Bug #857 "Undefined offset error" was fixed. - - The uniord method now uses a static cache to improve performances (thanks to Mathieu Masseboeuf for the sugegstion). - - Two bugs in the TCPDF_FONTS class were fixed. - -6.0.043 (2013-10-29) - - Bug #854 "CSS instruction display" was fixed. - -6.0.042 (2013-10-25) - - Bug #852 "CMYK Colors Bug" was fixed. - -6.0.041 (2013-10-21) - - Bug #851 "Problem with images in PDF. PHP timing out" was fixed. - -6.0.040 (2013-10-20) - - Bug #849 "SVG import bug" was fixed. - -6.0.039 (2013-10-13) - - Bug #843 "Wrong call in parser" was fixed. - - Bug #844 "Wrong object type named" was fixed. - - Bug #845 "Parsing error on obj ref prefixed by '000000'" was fixed. - -6.0.038 (2013-10-06) - - Bug #841 "Division by zero warning at writeHTML a
  • tag" was fixed. - -6.0.037 (2013-09-30) - - Method getAllSpotColors() was added to return all spot colors. - - Method colorRegistrationBar() was extended to automatically print all spot colors and support individual spot colors. - - The method registrationMarkCMYK() was added to print a registration mark for CMYK colors. - - A bug related to page groups was fixed. - - Gradient() method now supports CMYK equivalents of spot colors. - - Example n. 56 was updated. - -6.0.036 (2013-09-29) - - Methods for registration bars and crop marks were extended to support registration color (see example n. 56). - - New default spot colors were added to tcpdf_colors.php, including the 'All' and 'None' special registration colors. - -6.0.035 (2013-09-25) - - TCPDF_PARSER class was improved. - -6.0.034 (2013-09-24) - - Bug #839 "Error in xref parsing in mixed newline chars" was fixed. - -6.0.033 (2013-09-23) - - Bug fix related to PNG image transparency using GD library. - -6.0.032 (2013-09-23) - - Bug #838 "Fatal error when imagick cannot handle the image, even though GD is available and can" was fixed. - -6.0.031 (2013-09-18) - - Bug #836 "Optional EOL marker before endstream" was fixed. - - Some additional controls were added to avoid "division by zero" error with badly formatted input. - -6.0.030 (2013-09-17) - - Bug #835 "PDF417 and Cyrilic simbols" was fixed. - -6.0.029 (2013-09-15) - - Constants K_TCPDF_PARSER_THROW_EXCEPTION_ERROR and K_TCPDF_PARSER_IGNORE_DECODING_ERRORS where removed in favor of a new configuration array in the TCPDF_PARSER class. - - The TCPDF_PARSER class can now be configured using the new $cfg parameter. - -6.0.028 (2013-09-15) - - A debug print_r was removed form tcpdf_parser.php. - - TCPDF_FILTERS class now throws an exception in case of error. - - TCPDF_PARSER class now throws an exception in case of error unless you define the constant K_TCPDF_PARSER_THROW_EXCEPTION_ERROR to false. - - The constant K_TCPDF_PARSER_IGNORE_DECODING_ERRORS can be set to tru eto ignore decoding errors on TCPDF_PARSER. - -6.0.027 (2013-09-14) - - A bug in tcpdf_parser wen parsing hexadecimal strings was fixed. - - A bug in tcpdf_parser wen looking for statxref was fixed. - - A bug on RC4 encryption was fixed. - -6.0.026 (2013-09-14) - - A bug in tcpdf_parser wen decoding streams was fixed. - -6.0.025 (2013-09-04) - - A pregSplit() bug was fixed. - - Improved content loading from URLs. - - Improved font path loading. - -6.0.024 (2013-09-02) - - Bug #826 "addEmptySignatureAppearance issue" was fixed. - -6.0.023 (2013-08-05) - - GNU Freefont fonts were updated. - - Licensing and copyright information about fonts were improved. - - PNG image support was improved. - -6.0.022 (2013-08-02) - - fixing initialization problem for signature_appearance property. - -6.0.021 (2013-07-18) - - The bug caused by the preg_split function on some PHP 5.2.x versions was fixed. - -6.0.020 (2013-06-04) - - The method addTTFfont() was fixed (Bug item #813 Undefined offset). - -6.0.019 (2013-06-04) - - The magic constant __DIR__ was replaced with dirname(__FILE__) for php 5.2 compatibility. - - The exceptions raised by file_exists() function were suppressed. - -6.0.018 (2013-05-19) - - The barcode examples were changed to automatically search for the barcode class path (in case the examples directory is not installed under the TCPDF root). - -6.0.017 (2013-05-16) - - The command line tool tcpdf_addfont.php was improved. - - The php logic was removed from configuration files that now contains only constant defines. - - The tcpdf_autoconfig.php file was added to automatically set missing configuration values. - -6.0.016 (2013-05-15) - - The tcpdf_addfont.php tool was improved (thanks to Remi Collet). - - Constant K_PATH_IMAGES is now automatically set in configuration file. - -6.0.015 (2013-05-14) - - Some unused vars were removed from AddFont() method. - - Some directories were moved inside the examples directory. - - All examples were updated to reflect the new default structure. - - Source code were clean-up up to be more compatible with system packaging. - - Files encodings and permissions were reset. - - The command line tool tcpdf_addfont.php was added on the tools directory. - -6.0.014 (2013-04-13) - - The signature of addTTFfont() method includes a new parameter to link existing fonts instead of copying and compressing them. - -6.0.013 (2013-04-10) - - Add support for SVG dx and dy text/tspan attributes. - - replace require() with require_once(). - - fix some minor typos on documentation. - - fix a problem when deleting all pages. - -6.0.012 (2013-04-24) - - An error condition in addHtmlLink() method was fixed (bug #799). - -6.0.011 (2013-04-22) - - Minor documentation changes. - -6.0.010 (2013-04-03) - - The method Rect() was fixed to print borders correctly. - -6.0.009 (2013-04-02) - - Adding back some files that were not properly committed on the latest release. - -6.0.008 (2013-04-01) - - Duplicated encoding maps was removed from tcpdf_font_data.php. - - Fixing bug on AddTTFFont(). - -6.0.007 (2013-03-29) - - HTML/CSS font size conversion were improved. - -6.0.006 (2013-03-27) - - Bug related to SVG and EPS files on xobjects were fixed. - -6.0.005 (2013-03-26) - - Default font path was fixed. - -6.0.004 (2013-03-21) - - Return value of addTTFfont() method was fixed. - -6.0.003 (2013-03-20) - - A bug related to non-unicode mode was fixed. - -6.0.002 (2013-03-18) - - _getFIXED call on tcpdf_fonts.php was fixed. - -6.0.001 (2013-03-18) - - Fixed $uni_type call on tcpdf.php. - -6.0.000 (2013-03-17) - - IMPORTANT: PHP4 support has been removed starting from this version. - - Several TCPDF methods and vars were moved to new class files: tcpdf_static.php, tcpdf_colors.php, tcpdf_images.php, tcpdf_font_data.php, tcpdf_fonts.php. - - Files htmlcolors.php, spotcolors.php, unicode_data.php and ecodings_maps.php were removed. - - Barcode classes were renamed and new barcode examples were added. - - Class TCPDF_PARSER was improved. - -******************************************************************************** - -5.9.209 (2013-03-15) - - Image method was improved. - -5.9.208 (2013-03-15) - - objclone function was patched to support old imagick extensions. - - tcpdf_parser was improved to support Cross-Reference Streams and large streams. - -5.9.207 (2013-03-04) - - Datamatrix class was fixed (a debug echo was removed). - -5.9.206 (2013-02-22) - - Bug item #754 "PNG with alpha channel becomes gray scale" was fixed. - - Minor documentation fixes. - -5.9.205 (2013-02-06) - - The constant K_TCPDF_THROW_EXCEPTION_ERROR was added on configuration file to change the behavior of Error() method. - - PDF417 barcode bug was fixed. - -5.9.204 (2013-01-23) - - The method Bookmark() was extended to include named destinations, URLs, internal links or embedded files (see example n. 15). - - automatic path calculation on configuration file was fixed. - - Error() method was extended to throw new Exception if PHP > 5. - -5.9.203 (2013-01-22) - - Horizontal position of radiobuttons and checkboxes was adjusted. - -5.9.202 (2012-12-16) - - Vertical space problem after table was fixed. - -5.9.201 (2012-12-10) - - First 256 chars are now always included on font subset to overcome a problem reported on the forum. - -5.9.200 (2012-12-05) - - Bug item #768 "Rowspan with Pagebreak error" was fixed. - - Page regions now works also with limited MultiCell() cells. - -5.9.199 (2012-11-29) - - Internal setImageBuffer() method was improved. - -5.9.198 (2012-11-19) - - Datamatrix EDIFACT mode was fixed. - -5.9.197 (2012-11-06) - - Bug item #756 "TCPDF 5.9.196 shows line on top of all PDFs" was fixed. - -5.9.196 (2012-11-02) - - Several methods were improved to avoid output when the context is out of page. - - Bug item #755 "remove cached files before unsetting" was fixed. - -5.9.195 (2012-10-24) - - Method _putfonts() was improved. - -5.9.194 (2012-10-23) - - Text alignment on TextField() method was fixed. - -5.9.193 (2012-09-25) - - Support for named destinations on HTML links was added (i.e.: link to named destination). - -5.9.192 (2012-09-24) - - A problem on the releasing process was fixed. - -5.9.191 (2012-09-24) - - SVG image naow support svg and eps images. - -5.9.190 (2012-09-23) - - "page" word translation is now set to empty if not defined. - - Tooltip feature was added on the radiobutton annotation. - -5.9.189 (2012-09-18) - - Bug item #3568969 "ini_get safe_mode error" was fixed. - -5.9.188 (2012-09-15) - - A datamatrix barcode bug was fixed. - -5.9.187 (2012-09-14) - - Subset feature was extended to include the first 256 characters. - -5.9.186 (2012-09-13) - - barcodes.php file was resynced. - - Methods SetAbsX, SetAbsY, SetAbsXY where added to set the absolute pointer coordinates. - - Method getCharBBox were added to get single character bounding box. - - Signature of addTTFfont method was changed ($addcbbox parameter was added). - -5.9.185 (2012-09-12) - - Method _putfontwidths() was fixed. - -5.9.184 (2012-09-11) - - A problem with EAN barcodes was fixed. - -5.9.183 (2012-09-07) - - A problem with font names normalization was fixed. - -5.9.182 (2012-09-05) - - Bug item #3564982 "Infinite loop in Write() method" was fixed. - -5.9.181 (2012-08-31) - - composer.json file was added. - - Bug item #3563369 "Cached images are not unlinked some time" was fixed. - -5.9.180 (2012-08-22) - - Bug item #3560493 "Problems with nested cells in HTML" was fixed. - -5.9.179 (2012-08-04) - - SVG 'use' tag was fixed for 'circle' and 'ellipse' shift problem. - - Alpha status is now correctly stored and restored by getGraphicVars() and SetGraphicVars() methods. - -5.9.178 (2012-08-02) - - SVG 'use' tag was fixed for 'circle' and 'ellipse'. - -5.9.177 (2012-08-02) - - An additional control on annotations was fixed. - -5.9.176 (2012-07-25) - - A bug related to stroke width was fixed. - - A problem related to font spacing in HTML was fixed. - -5.9.175 (2012-07-25) - - The problem of missing letter on hyphen break was fixed. - -5.9.174 (2012-07-25) - - The problem of wrong filename when downloading PDF from an Android device was fixed. - - The method setHeaderData() was extended to set text and line color for header (see example n. 1). - - The method setFooterData() was added to set text and line color for footer (see example n. 1). - - The methods setTextShadow() and getTextShadow() were added to set text shadows (see example n. 1). - - The GetCharWidth() method was fixed for negative character spacing. - - A 'none' border mode is now correctly recognized. - - Break on hyphen problem was fixed. - -5.9.173 (2012-07-23) - - Some additional control wher added on barcode methods. - - The option CURLOPT_FOLLOWLOCATION on Image method is now disabled if PHP safe_mode is on or open_basedir is set. - - Method Bookmark() was extended to include X parameter. - - Method setDestination() was extended to include X parameter. - - A problem with Thai language was fixed. - -5.9.172 (2012-07-02) - - A PNG color profile issue was fixed. - -5.9.171 (2012-07-01) - - Some SVG rendering problems were fixed. - -5.9.170 (2012-06-27) - - Bug #3538227 "Numerous errors inserting shared images" was fixed. - -5.9.169 (2012-06-25) - - Some SVG rendering problems were fixed. - -5.9.168 (2012-06-22) - - Thai language rendering was fixed. - -5.9.167 (2012-06-22) - - Thai language rendering was fixed and improved. - - Method isCharDefined() was improved. - - Protected method replaceChar() was added. - - Font "kerning" word was corrected to "tracking". - -5.9.166 (2012-06-21) - - Array to string conversion on file_id creation was fixed. - - Thai language rendering was fixed (thanks to Atsawin Chaowanakritsanakul). - -5.9.165 (2012-06-07) - - Some HTML form related bugs were fixed. - -5.9.164 (2012-06-06) - - A bug introduced on the latest release was fixed. - -5.9.163 (2012-06-05) - - Method getGDgamma() was changed. - - Rendering performances of PNG images with alpha channel were improved. - -5.9.162 (2012-05-11) - - A bug related to long text on TD cells was fixed. - -5.9.161 (2012-05-09) - - A bug on XREF table was fixed (Bug ID: 3525051). - - Deprecated Imagick:clone was replaced. - - Method objclone() was fixed for PHP4. - -5.9.160 (2012-05-03) - - A bug on tcpdf_parser.php was fixed. - -5.9.159 (2012-04-30) - - Barcode classes were updated to fix PNG export Bug (ID: 3522291). - -5.9.158 (2012-04-22) - - Some SVG-related bugs were fixed. - -5.9.157 (2012-04-16) - - Some SVG-related bugs were fixed. - -5.9.156 (2012-04-10) - - Bug item #3515885 "TOC and booklet: left and right page exchanged". - - SetAutoPageBreak(false) now works also in multicolumn mode. - -5.9.155 (2012-04-02) - - Bug item #3512596 "font import problems" was fixed. - - Method addTTFfont() was modified to extract only specified Platform ID and Encoding ID (check the source code documentation). - - All fonts were updated. - - Bug item #3513867 "booklet and setHeaderTemplateAutoreset: header shifted left" was fixed. - - Bug item #3513749 "TCPDF Superscript/Subscript" was fixed. - -5.9.154 (2012-03-29) - - A debug echo was removed. - -5.9.153 (2012-03-28) - - A bug on font conversion was fixed. - - All fonts were updated. - - Method isCharDefined() was added to find if a character is defined on the selected font. - - Method replaceMissingChars() was added to automatically replace missing chars on selected font. - - SetFont() method was fixed. - -5.9.152 (2012-03-23) - - The following overprint methods were added: setOverprint(), getOverprint(). - - Signature of setAlpha() method was changed and method getAlpha() was added. - - stroke-opacity support was added on SVG. - - The following date methods were added: setDocCreationTimestamp(), setDocModificationTimestamp(), getDocCreationTimestamp(), getDocModificationTimestamp(), getFormattedDate(), getTimestamp(). - - Signature of _datestring() method was changed. - - Method getFontBBox() was added. - - Method setPageBoxTypes() was aded. - -5.9.151 (2012-03-22) - - Bug item #3509889 "Transform() distorts PDF" was fixed. - - Precision of real number were extended. - - ComboBox and ListBox methods were fixed. - - Bulgarian language file was added. - - addTOC() method was improved to include bookmark color and font style. - -5.9.150 (2012-03-16) - - A bug related to form fields in PDF/A mode was fixed. - -5.9.149 (2012-02-21) - - Bug item #3489933 "SVG Parser treats tspan like text" was fixed. - -5.9.148 (2012-02-17) - - Bug item #3488600 "Multiple radiobutton sets get first set value" was fixed. - -5.9.147 (2012-02-14) - - A problem with SVG gradients has been fixed. - -5.9.146 (2012-02-12) - - Bug item #3486880 "$filehash undefine error" was fixed. - - The default font is now the one specified at PDF_FONT_NAME_MAIN constant. - -5.9.145 (2012-01-28) - - Japanese language file was added. - - TCPDF license and README.TXT files were updated. - -5.9.144 (2012-01-12) - - HTML output on barcode classes was improved. - -5.9.143 (2012-01-08) - - Bug item #3471057 "setCreator() has no effect" was fixed. - -5.9.142 (2011-12-23) - - Source code documentation was updated. - -5.9.141 (2011-12-14) - - Some minor bugs were fixed. - -5.9.140 (2011-12-13) - - SVG now supports embedded images encoded as base64. - -5.9.139 (2011-12-11) - - Spot color methods were fixed. - -5.9.138 (2011-12-10) - - cropMark() method was improved (check source code documentation). - - Example n. 56 was updated. - - Bug item #3452390 "Check Box still not ticked when set to true" was fixed. - -5.9.137 (2011-12-01) - - Bug item #3447005 "Background color and border of Form Elements is printed" was fixed. - - Color support for Form elements was improved. - -5.9.136 (2011-11-27) - - Bug item #3443387 "SetMargins with keep option does not work for top margin" was fixed. - -5.9.135 (2011-11-04) - - Bug item #3433406 "Double keywords in description" was fixed. - -5.9.134 (2011-10-29) - - The default value for $defcol parameter on convertHTMLColorToDec() method was fixed. - - Deafult HTTP headers were changed to avoid browser caching. - - Some deprecated syntax were replaced. - -5.9.133 (2011-10-26) - - Bug item #3428446 "copyPage method not working when diskcache enabled" was fixed. - -5.9.132 (2011-10-20) - - Bug item #3426167 "bug in function convertHTMLColorToDec()" was fixed. - -5.9.131 (2011-10-13) - - An error message was added to ImagePngAlpha() method. - -5.9.130 (2011-10-12) - - Now you can set image data strings on HTML img tag by encoding the image binary data in this way: $imgsrc = '@'.base64_encode($imgdata); - -5.9.129 (2011-10-07) - - Core fonts metrics was fixed (replace all helvetica and times php files on fonts folder). - - Form fields support was improved and some problems were fixed (check the example n. 14). - - Bug item #3420249 "Issue with booklet and MultiCell" was fixed. - -5.9.128 (2011-10-06) - - Method addTTFfont() was improved (check the source code documentation). - - Method setExtraXMP() to set custom XMP data was added. - -5.9.127 (2011-10-04) - - Readonly mode option was activated for radiobuttons. - -5.9.126 (2011-10-03) - - Bug item #3417989 "Graphics State operator in form XObject fails to render" was fixed. - - Xobjects problems with transparency, gradients and spot colors were fixed. - -5.9.125 (2011-10-03) - - Support for 8-digit CMYK hexadecimal color representation was added (to be used with XHTML and SVG). - - Spot colors support was improved (check example n. 37). - - Color methods were improved. - -5.9.124 (2011-10-02) - - Core fonts were updated. - -5.9.123 (2011-10-02) - - The method addTTFfont() wad added to automatically convert TTF fonts (check the new fonts guide at http://www.tcpdf.org). - - Old font utils were removed. - - All fonts were updated and new arabic fonts were added (almohanad were removed and replaced by aefurat and aealarabiya). - - The file unicode_data.php was updated. - - The file encodings_maps.php was added. - - PDF/A files are now compressed to save space. - - XHTML input form fields now support text-alignment attribute. - -5.9.122 (2011-09-29) - - PDF/A-1b compliance was improved to pass some online testing. - -5.9.121 (2011-09-28) - - This version includes support for PDF/A-1b format (the class constructor signature was changed - see example n. 65). - - Method setSRGBmode() was added to force sRGB_IEC61966-2.1 black scaled ICC color profile for the whole document (file sRGB.icc was added). - - 14 new fonts were added to allow embedding core fonts (for PDF/A compliance). - - Font utils were fixed. - -5.9.120 (2011-09-22) - - This version includes a fix for _getTrueTypeFontSubset() method. - -5.9.119 (2011-09-19) - - This version includes a fix for extra page numbering on TOC. - -5.9.118 (2011-09-17) - - This version includes some changes that allows you to add a bookmark for a page that do not exist. - -5.9.117 (2011-09-15) - - TCPDFBarcode and TCPDF2DBarcode classes were extended to include a method for exporting barcodes as PNG images. - -5.9.116 (2011-09-14) - - Datamatrix class was improved and documentation was fixed. - -5.9.115 (2011-09-13) - - Datamatrix ECC200 barcode support was added (a new datamatrix.php file was added) - check example n. 50. - - getBarcodeHTML() method was added on TCPDFBarcode and TCPDF2DBarcode classes to return an HTML representation of the barcode. - - cURL options on Image() method were improved. - - A bug on write2DBarcode() was fixed. - -5.9.114 (2011-09-04) - - A bug related to column position was fixed. - -5.9.113 (2011-08-24) - - This release include two new experimental files for parsing an existing PDF document (the integration with TCPDF is under development). - -5.9.112 (2011-08-18) - - A newline character was added after the 'trailer' keyword for compatibility with some parsers. - - Support for layers was improved. - -5.9.111 (2011-08-17) - - Barcode CODE 39 default gap was restored at 1. - -5.9.110 (2011-08-17) - - Barcode CODE 39 was fixed. - -5.9.109 (2011-08-12) - - Method getNumLines() was fixed. - - A bug related to page break in multi-column mode was fixed. - -5.9.108 (2011-08-09) - - A bug on PHP4 version was fixed. - -5.9.107 (2011-08-08) - - This version includes a minor bugfix. - -5.9.106 (2011-08-04) - - This version includes transparency groups: check the new parameter on startTemplate() method and example 62. - -5.9.105 (2011-08-04) - - Bug item #3386153 "Check Box not ticked when set to true" was fixed. - -5.9.104 (2011-08-01) - - Bug item #3383698 "imagemagick, resize and dpi" was fixed. - -5.9.103 (2011-07-16) - - Alignment of XHTML lines was improved. - - Spell of the "length" word was fixed. - -5.9.102 (2011-07-13) - - Methods startLayer() and endLayer() were added to support arbitrary PDF layers. - - Some improvements/fixes for images were added (thanks to Brendan Abbott). - -5.9.101 (2011-07-07) - - Support for JPEG and PNG ICC Color Profiles was added. - - Method addEmptySignatureAppearance() was added to add empty signature fields (see example n. 52). - - Bug item #3354332 "Strange line spacing with reduced font-size in writeHTML" was fixed. - -5.9.100 (2011-06-29) - - An SVG bug has been fixed. - -5.9.099 (2011-06-27) - - Bug item #3335045 "Font freesans seems somehow corrupted in footer" was fixed. - -5.9.098 (2011-06-23) - - The Named Destination feature was fixed. - -5.9.097 (2011-06-23) - - The method setHtmlVSpace() now can be used also for tags: div, li, br, dt and dd. - - The Named Destination feature was added (check the example n. 15) - thanks to Christian Deligant. - -5.9.096 (2011-06-19) - - Bug item #3322234 "Surrogate pairs codes in arrUTF8ToUTF16BE" was fixed. - -5.9.095 (2011-06-18) - - Numbers alignment for Table-Of-Content methods was improved and fixed. - - Font subsetting was fixed to include all parts of composite fonts. - -5.9.094 (2011-06-17) - - Bug item #3317898 "Page Group numbering broken in 5.9.093" was fixed. - -5.9.093 (2011-06-16) - - Method setStartingPageNumber() was added to set starting page number (for automatic page numbering). - -5.9.092 (2011-06-15) - - Method _putpages() was improved. - - Bug item #3316678 "Memory overflow when use Rotate and SetAutoPageBreak" was fixed. - - Right alignment of page numbers was improved. - -5.9.090 (2011-06-14) - - Methods AliasNbPages() and AliasNumPage() were re-added as deprecated for backward compatibility. - -5.9.089 (2011-06-13) - - Example n. 8 was updated. - - Method sendOutputData() was changed to remove default compression (it was incompatible with some server settings). - - Bugs related to page group numbers were fixed. - - Method copyPage() was fixed. - - Method Image() was improved to include support for alternative and external images. - -5.9.088 (2011-06-01) - - Method getAutoPageBreak() was added (see example n. 51). - - Example n. 51 (full page background) was updated. - -5.9.087 (2011-06-01) - - Method sendOutputData() was improved to include deflate encoding. - - Barcode classes on PHP 4 version were fixed. - -5.9.086 (2011-05-31) - - Font files were updated (the ones on the previous release were broken). - - The script fonts/utils/makeallttffonts.php was updated and fixed. - - Output() method was improved to use compression when available. - -5.9.085 (2011-05-31) - - TCPDFBarcode class (barcodes.php) now includes getBarcodeSVG() and getBarcodeSVGcode() methods to get SVG image representation of the barcode. - - TCPDF2DBarcode class (2dbarcodes.php) now includes getBarcodeSVG() and getBarcodeSVGcode() methods to get SVG image representation of the barcode. - -5.9.084 (2011-05-29) - - Font files were updated. - - The file fonts/utils/makeallttffonts.php was updated. - - Bug item# 3308774 "Problems with font subsetting" was fixed. - -5.9.083 (2011-05-24) - - Bug item #3308387 "line height & SetCellHeightRatio" was fixed. - -5.9.082 (2011-05-22) - - Bug item #3305592 "Setting fill color <> text color breaks text clipping" was fixed. - -5.9.081 (2011-05-18) - - Method resetHeaderTemplate() was added to reset the xobject template used by Header() method. - - Method setHeaderTemplateAutoreset() was added to automatically reset the xobject template used by Header() method at each page. - -5.9.080 (2011-05-17) - - A problem related to file path calculation for images was fixed. - - A problem related to unsuppressed getimagesize() error was fixed. - -5.9.079 (2011-05-16) - - Footer() method was changed to use C128 barcode as default (instead of the previous C128B). - -5.9.078 (2011-05-12) - - Bug item #3300878 "wrong rendering for html bullet list in some case" was fixed. - - Bug item #3301017 "Emphasized vs. font-weight" was fixed. - - Barcode Code 128 was improved to include AUTO mode (automatically switch between A, B and C modes). - - Examples n. 27 and 49 were updated. - -5.9.077 (2011-05-07) - - Bug item #3298591 "error code93" was fixed. - - SetLineStyle() function was improved. - -5.9.076 (2011-05-06) - - Bug item #3298264 "codebar 93 error" was fixed. - -5.9.075 (2011-05-02) - - Table header alignment when using WriteHTMLCell() or MultiCell() was fixed. - -5.9.074 (2011-04-28) - - Bug item #3294306 "CSS classes not work in table section" was fixed. - -5.9.073 (2011-04-27) - - A bug related to character entities on HTML cells was fixed. - -5.9.072 (2011-04-26) - - Method resetColumns() was added to remove multiple columns and reset page margins (example n. 10 was updated). - -5.9.071 (2011-04-19) - - Bug #3288574 "
    trouble" was fixed. - -5.9.069 (2011-04-19) - - Bug #3288763 "HTML-Table: non-breaking table rows: Bug" was fixed. - -5.9.068 (2011-04-15) - - Bookmark, addTOC and addHTMLTOC methods were improved to include font style and color (Examples 15, 49 and 59 were updated). - - Default $_SERVER['DOCUMENT_ROOT'] value on tcpdf_config.php file was changed. - -5.9.067 (2011-04-10) - - Performances were drastically improved (PDF documents are now created more quickly). - -5.9.066 (2011-04-09) - - A bug related to digital signature + encryption was fixed. - - A bug related to encryption + xobject templates was fixed. - -5.9.065 (2011-04-08) - - Bug item #3280512 "Text encoding iso-8859-2 crashes" was fixed. - -5.9.064 (2011-04-05) - - A bug related to character entities on HTML cells was fixed. - -5.9.063 (2011-04-01) - - Bug item #3267235 "WriteHTML() and image that doesn't fit on the page" was fixed. - -5.9.062 (2011-03-23) - - Bug item #3232650 "Using Write if there are pageRegions active creates error" was fixed. - - Bug item #3221891 "text input borders" was fixed. - - Bug item #3228958 "Adobe Reader 9.4.2 crash" was fixed. - -5.9.061 (2011-03-15) - - Bug item #3213488 "wrong function call in function Write" was fixed. - - Bug item #3203007 "list element with black background" was fixed. - -5.9.060 (2011-03-08) - - addTOC() method was fixed for text alignment problems. - -5.9.059 (2011-02-27) - - Default Header() method was improved to reduce document size. - -5.9.058 (2011-02-25) - - Image() method was improved to cache images with transparency layers (thanks to Korneliusz Jarzębski for reporting this problem). - -5.9.057 (2011-02-24) - - A problem with image caching system was fixed (thanks to Korneliusz Jarzębski for reporting this problem). - -5.9.056 (2011-02-22) - - A bug on fixHTMLCode() method was fixed. - - Automatic line break for HTML was fixed. - -5.9.055 (2011-02-17) - - Another bug related to HTML table page break was fixed. - -5.9.054 (2011-02-16) - - A bug related to HTML table page break was fixed. - -5.9.053 (2011-02-16) - - Support for HTML attribute display="none" was added. - -5.9.052 (2011-02-15) - - A bug related to HTML automatic newlines was fixed. - -5.9.051 (2011-02-12) - - "Commas at beginning of new lines" problem was fixed. - -5.9.050 (2011-02-11) - - Bug #3177606 "SVG Bar chart error" was fixed. - -5.9.049 (2011-02-03) - - Bug #3170777 "TCPDF creates a new page after a single line in writeHTML" was fixed. - -5.9.048 (2011-02-02) - - No changes. Just released to override previous release that was not uploaded correctly. - -5.9.047 (2011-01-28) - - Bug #3167115 "PDF error in (example 48)" was fixed (was introduced in 5.8.046). - -5.9.046 (2011-01-18) - - PDF view/print layers are now automatically turned off if not used (see setVisibility() method). - -5.9.045 (2011-01-17) - - HTML list support were improved. - -5.9.044 (2011-01-15) - - Bug #3158422 "writeHTMLCell Loop" was fixed. - - Some HTML image alignment problems were fixed. - -5.9.043 (2011-01-14) - - Bug #3158178 "PHP Notice" was fixed. - - Bug #3158193 "Endless loop in writeHTML" was fixed. - - Bug #3157764 "SVG Pie chart incorrectly rendered2". - -5.9.042 (2011-01-14) - - Some problems of the PHP4 version were fixed. - -5.9.041 (2011-01-13) - - A problem with SVG elliptical arc path was fixed (ref. bug #3156574). - - A problem related to font weight on HTML table headers was fixed. - -5.9.040 (2011-01-12) - - A bug related to empty pages after table was fixed. - -5.9.039 (2011-01-12) - - Bug item #3155759 "openssl_random_pseudo_bytes() slow under Windows" was fixed. - -5.9.038 (2011-01-11) - - Minor bugs were fixed. - -5.9.037 (2011-01-09) - - An alignment problem for HTML texts was fixed. - -5.9.036 (2011-01-07) - - A bug related to HTML tables on header was fixed. - -5.9.035 (2011-01-03) - - A problem related to HTML table border alignment was fixed. - - Bug #2996366 "FastCGI and Header Problems" was fixed. - -5.9.034 (2010-12-19) - - DejaVu and GNU Free fonts were updated. - -5.9.033 (2010-12-18) - - Source code documetnation was improved. - -5.9.032 (2010-12-18) - - Default font stretching and spacing values are now inherited by HTML methods. - -5.9.031 (2010-12-16) - - Source code documentation errors were fixed. - -5.9.030 (2010-12-16) - - Several source code documentation errors were fixed. - - Source code style was changed for Doxygen. - - Source code documentation was moved online to http://www.tcpdf.org - -5.9.029 (2010-12-04) - - The $fitbox parameter on Image() method was extended to specify image alignment inside the box (check the example n. 9). - -5.9.028 (2010-12-03) - - Font utils makefont.php and makeallttffonts.php were updated. - -5.9.027 (2010-12-01) - - Spot Colors are now better integrated with HTML mode. - - Method SetDocInfoUnicode() was added to turn on/off Unicode mode for document information dictionary (meta tags) - check the example n. 19. - -5.9.026 (2010-12-01) - - A problem with mixed text directions on HTML was fixed. - -5.9.025 (2010-12-01) - - The AddSpotColor() now automatically fills the spotcolor array (defined on spotcolors.php file). - -5.9.024 (2010-11-30) - - Bug item #3123612 "SVG not use gradientTransform in percentage mode" was fixed. - -5.9.023 (2010-11-25) - - A potential bug on SVG transcoder was fixed. - -5.9.022 (2010-11-21) - - Method ImageEPS includes support for EPS/AI Spot colors. - - Method ImageEPS includes a new parameter $fixoutvals to remove values outside the bounding box. - -5.9.021 (2010-11-20) - - Support for custom bullet points images was added (check the example n.6) - - Examples n. 6 and 61 were update (check the comments inside). - -5.9.020 (2010-11-19) - - A problem related to additional page when using multicolumn mode was fixed. - -5.9.019 (2010-11-19) - - An SVG bug was fixed. - - ImageSVG() and ImageEPS() methods now accepts image data streams (put the string on the $file parameter preceded by '@' character). - - Option 'E' was added to the $dest parameter of Output() method to return the document as base64 mime multi-part email attachment (RFC 2045). - -5.9.018 (2010-11-19) - - An SVG bug was fixed. - -5.9.017 (2010-11-16) - - Tagline color was set to transparent. - - The method fixHTMLCode() was added to automatically clean up HTML code (requires HTML Tidy). - -5.9.016 (2010-11-16) - - Bug item #3109705 "list item page break hanging bullet" was fixed. - -5.9.015 (2010-11-16) - - Bug item affecting QRCode was fixed. - - Some bugs affecting HTML lists were fixed. - - ImageSVG() and fitBlock() methods were improved to handle some SVG problems. - - Some problems with PHP4 compatibility were fixed. - -5.9.014 (2010-11-15) - - Bug item #3109464 "QRCode error" was fixed. - -5.9.013 (2010-11-15) - - Bug item #3109257 "Problem with interlaced GIFs and PNGs" was fixed. - - Image function now accepts image data streams (check example n. 9). - -5.9.012 (2010-11-12) - - Method getTCPDFVersion() was added. - - PDF_PRODUCER constant was removed. - - Method convertHTMLColorToDec() was improved. - - HTML colors now support spot color names defined on the new spotcolors.php file. - - The default method Header() was improved to support SVG and EPS/AI images. - - A bug on SVG importer was fixed. - -5.9.011 (2010-11-02) - - Bug item #3101486 "Bug Fix for image loading" was fixed. - -5.9.010 (2010-10-27) - - Support for CSS properties 'border-spacing' and 'padding' for tables were added. - - Several language files were added. - -5.9.009 (2010-10-21) - - HTML text alignment was improved to include the case of RTL text on LTR direction and LTR text on RTL direction. - -5.9.008 (2010-10-21) - - Bug item #3091502 "Bookmark oddity" was fixed. - - HTML internal links now accepts page number and Y position. - - The method write1DBarcode() was improved to accept separate horizontal and vertical padding (see example n. 27). - -5.9.007 (2010-10-20) - - Method adjustCellPadding() was fixed to handle bad input. - -5.9.006 (2010-10-19) - - Support for AES 256 bit encryption was added (see example n. 16). - - Method getNumLines() was fixed for the empty string case. - -5.9.005 (2010-10-18) - - Method addPageRegion() was changed to accept regions starting exactly from the top of the page. - -5.9.004 (2010-10-18) - - A bug related to annotations was fixed. - - The file unicode_data.php was canged to encapsulate all data in a class. - - The file htmlcolors.php was changed to remove the global variable. - -5.9.003 (2010-10-15) - - Support for no-write page regions was added. Check the example n. 64 and new methods setPageRegions(), addPageRegion(), getPageRegions(), removePageRegion(). - - A bug on Right-To-Left alignment was fixed. - -5.9.002 (2010-10-08) - - Cell method was improved to preserve the font stretching and spacing values when using the $stretch parameter (see example n. 4). - -5.9.001 (2010-10-07) - - The problem of blank page for nobr table higher than a single page was fixed. - -5.9.000 (2010-10-06) - - Support for text stretching and spacing (tracking) was added, see example n. 63 and methods setFontStretching(), getFontStretching(), setFontSpacing(), getFontSpacing(). - - Support for CSS properties 'font-stretch' and 'letter-spacing' was added (see example n. 63). - - The cMargin state was replaced by cell_padding array that can be set/get using setCellPadding() and getCellPadding() methods. - - Methods getCellPaddings() and setCellPaddings() were added to fine tune cell paddings (see example n. 5). - - Methods getCellMargins() and setCellMargins() were added to fine tune cell margins (see example n. 5). - - Method write1DBarcode() was improved to permit custom labels (see example n. 27). - - Method ImagePngAlpha() now includes support for ImageMagick to improve performances. - - XObject Template support was extended to support Multicell(), writeHTML() and writeHTMLCell() methods. - - The signature of getNumLines() and getStringHeight() methods is changed. - - Example n. 57 was updated. - -// ------------------------------------------------------------------- - -5.8.034 (2010-09-27) - - A bug related to SetFont on XObject templates was fixed. - -5.8.033 (2010-09-25) - - A problem with Footer() and multiple columns was fixed. - -5.8.032 (2010-09-22) - - Bug #3073165 "Issues with changes to addHTMLVertSpace()" was fixed. - -5.8.031 (2010-09-20) - - Bug #3071961 "Spaces in HTML" was fixed. - -5.8.030 (2010-09-17) - - SVG support was improved and some bugs were fixed. - -5.8.029 (2010-09-16) - - A problem with HTML borders was fixed. - -5.8.028 (2010-09-13) - - Bug #3065224 "mcrypt_create_iv error on TCPDF 5.8.027 on PHP 5.3.2" was fixed. - -5.8.027 (2010-09-13) - - Bug #3065118 "mcrypt_decrypt error on TCPDF 5.8.026 on PHP 5.3.2" was fixed. - -5.8.026 (2010-09-13) - - A bug on addHTMLTOC() method was fixed. Note: be sure that the #TOC_PAGE_NUMBER# template has enough width to be printed correctly. - -5.8.025 (2010-09-09) - - Bug #3062692 "Textarea inside a table" was fixed. - -5.8.024 (2010-09-08) - - Bug #3062005 "Undefined variable: ann_obj_id" was fixed. - -5.8.023 (2010-08-31) - - Forms bug added on version 5.8.019 was fixed. - -5.8.022 (2010-08-31) - - Bug #3056632 "SVG rendered vertically flipped" was fixed. - -5.8.021 (2010-08-30) - - A new CID-0 'chinese' font was added for traditional Chinese. - - Bug #3054287 'Inner tags are ignored due to "align" attribute' was fixed. - -5.8.020 (2010-08-26) - - CSS "catch-all" class selector is now supported. - -5.8.019 (2010-08-26) - - XObject Templates now includes support for links and annotations. - - A problem related to link alignment on cell was fixed. - - A problem related to SVG styles was fixed. - -5.8.018 (2010-08-25) - - Method getNumberOfColumns() was added. - - A problem related to table header was fixed. - - Method getSVGTransformMatrix() was fixed to apply SVG transformations in the correct order. - - SVG support was improved and several bugs were fixed. - -5.8.017 (2010-08-25) - - This version includes support for XObject Templates (see the new example n. 62). - - Methods starttemplate(), endTemplate() and printTemplate() were added (see the new example n. 62). - -5.8.016 (2010-08-24) - - Alignment problem on write2DBarcode was fixed. - -5.8.015 (2010-08-24) - - A problem arose with the latest bugfix was fixed. - -5.8.014 (2010-08-23) - - Method _getxobjectdict() was added for better compatibility with external extensions. - - A bug related to radiobuttons was fixed. - - Bug #3051509 "new line after punctuation marks" was fixed (partially). - -5.8.013 (2010-08-23) - - SVG support for 'direction' property was added. - - A problem on default width calculation for linear barcodes was fixed. - - New option was added to write1DBarcode() method to improve alignments (see example n. 27). - - Bug #3050896 "Nested HTML tables: styles are not applied" was fixed. - - Method _putresourcedict() was improved to include external XObject templates. - -5.8.012 (2010-08-22) - - Support for SVG 'text-anchor' property was added. - -5.8.011 (2010-08-21) - - Method write1DBarcode() was improved to be backward compatible (check the new example n. 27). - - Support for CSS width and height properties on images were added. - -5.8.010 (2010-08-20) - - Documentation of unhtmlentities() was fixed. - - The 'fitwidth' option was added and border color problem was fixed on write1DBarcode() method (check the example n. 27). - -5.8.009 (2010-08-20) - - Internal object numbering was improved. - - Some errors in object encryption were fixed. - -5.8.008 (2010-08-19) - - Method write1DBarcode() was changed, check the example n. 27. - - Method Footer() was changed to account for barcode changes. - - Automatic calculation of K_PATH_URL constant was fixed on configuration file. - - Method setEqualColumns() was fixed for $width=0 case. - - Method AddTOC() was fixed for multipage and multicolumn modes. - - Better support for SVG "font-family" property. - - A problem on default Page Zoom mode was fixed. - - Several Annotation bugs were fixed. - -5.8.007 (2010-08-18) - - A bug affecting HTML tables was fixed. - - Bug #3047500 "SVG not rendering paths properly" was fixed. - -5.8.006 (2010-08-17) - - A bug affecting HTML table nesting was fixed. - -5.8.005 (2010-08-17) - - A bug affecting the HTML 'select' tag in certain conditions was fixed. - -5.8.004 (2010-08-17) - - Better support for HTML "font-family" property. - - A bug related to HTML multicolumn was fixed. - -5.8.003 (2010-08-16) - - Better support for HTML "font-family" property. - -5.8.002 (2010-08-14) - - HTML alignments were improved - - IMPORTANT: Default regular expression to find spaces has been changed to exclude the non-breaking-space (160 DEC- A0 HEX). If you are using setSpacesRE() method, please read the new documentation. - - Example n. 1 was updated. - -5.8.001 (2010-08-12) - - Bug #3043650 "subsetchars incorrectly cached" was fixed. - -5.8.000 (2010-08-11) - - A control to avoid bookmarking page 0 was added. - - addTOC() method now includes support for multicolumn mode. - - Support for tables in multicolumn mode was improved. - - Example n.10 was updated. - - All trimming functions were replaced with stringLeftTrim(), stringRightTrim() and stringTrim(). - - HTML alignments were improved. - ------------------------------------------------------------- - -5.7.003 (2010-08-08) - - Bug #3041263 "php source ending is bad" was fixed (all PHP files were updated, including fonts). - -5.7.002 (2010-08-06) - - Methods copyPage(), movePage() and deletePage() were changed to account for internal markings. - -5.7.001 (2010-08-05) - - Bug #3040105 "Broken PDF when using TOC (example 45)" was fixed. - -5.7.000 (2010-08-03) - - CSS borders are now supported for HTML tables and other block tags (see example n. 61); - - Cell borders were improved (see example n. 57); - - Minor bugs were fixed. - ------------------------------------------------------------- - -5.6.000 (2010-07-31) - - A bug with object IDs was fixes. - - Performances were improved. - ------------------------------------------------------------- - -5.5.015 (2010-07-29) - - Automatic fix for unclosed self-closing tag. - - Support for deprecated 's' and 'strike' tags was added. - - Empty list items problem was fixed. - -5.5.014 (2010-07-15) - - Support for external images was improved. - -5.5.013 (2010-07-14) - - Bug #3029338 "FI and FO output destination filename bug" was fixed (previous fix was wrong). - -5.5.012 (2010-07-14) - - Bug #3029310 "Font baseline inconsistencies with line-height and font-size" was fixed. - - Bug #3029338 "FI and FO output destination filename bug" was fixed. - -5.5.011 (2010-07-09) - - Support for multiple CSS classes was added. - - The method getColumn() was added to return the current column number. - - Some regular Expressions were fixed to be more compatible with UTF-8. - -5.5.010 (2010-07-06) - - Bug item #3025772 "Borders in all image functions are still flawed" was fixed. - -5.5.009 (2010-07-05) - - A problem related to last page footer was fixed. - - Image alignments and fit-on-page features were improved. - -5.5.008 (2010-07-02) - - A problem on table header alignment in booklet mode was fixed. - - Default graphic vars are now applied for setHeader(); - -5.5.007 (2010-07-02) - - Attribute "readonly" was added to input and textarea form fields. - - Vertical alignment feature was added on MultiCell() method only for simple text mode (see example n. 5). - - Text-Fit feature was added on MultiCell() method only for simple text mode (see example n. 5). - -5.5.006 (2010-06-29) - - getStringHeight() and getNumLines() methods were fixed. - -5.5.005 (2010-06-28) - - Bug #3022170 "getFontDescent() does not return correct descent value" was fixed. - - Some problems with multicolumn mode were fixed. - -5.5.004 (2010-06-27) - - Bug #3021803 "SVG Border" was fixed. - -5.5.003 (2010-06-26) - - On Write() method, blank lines at the beginning of a page or column are now automatically removed. - -5.5.002 (2010-06-24) - - ToUnicode Identity-H name was replaced with a full CMap (to avoid preflight syntax error). - - Bug #3020638 "str_split() not available in php4" was fixed. - - Bug #3020665 "file_get_contents() too many parameters for php4" was fixed. - -5.5.001 (2010-06-23) - - A problem on image streams was fixed. - -5.5.000 (2010-06-22) - - Several PDF syntax errors (and related bugs) were fixed. - - Bug #3019090 "/Length values are wrong if AES encryption is used" was fixed. - ------------------------------------------------------------- - -5.4.003 (2010-06-19) - - A problem related to page boxes was fixed. - - Bug #3016920 "Font subsetting issues when editing pdf" was partially fixed (Note that flattening transparency layers is currently incompatible with TrueTypeUnicode fonts). - -5.4.002 (2010-06-18) - - A problem related with setProtection() method was fixed. - -5.4.001 (2010-06-18) - - A problem related with setProtection() method was fixed. - -5.4.000 (2010-06-18) - - The method setSignatureAppearance() was added, check the example n. 52. - - Several problems related to font subsetting were fixed. - ------------------------------------------------------------- - -5.3.010 (2010-06-15) - - Previous release was corrupted. - -5.3.009 (2010-06-15) - - Bug #3015934 "Bullets don't display correctly" was fixed. - -5.3.008 (2010-06-13) - - This version fixes some problems of SVG rasterization. - -5.3.007 (2010-06-13) - - This version improves SVG support. - -5.3.006 (2010-06-10) - - This version includes a change in uniqid calls for backward compatibility with PHP4. - -5.3.005 (2010-06-09) - - The method getPageSizeFromFormat() was changed to include all standard page formats (includes 281 page formats + variation). - -5.3.004 (2010-06-08) - - Bug #3013291 "HTML table cell width" was fixed. - - Bug #3013294 "HTML table cell alignment" was fixed. - - The columns widths of HTML tables are now inherited from the first row. - -5.3.003 (2010-06-08) - - Bug #3013102 "HTML table header misaligned after page break" was fixed. - -5.3.002 (2010-06-07) - - The methods setFontSubsetting() and setFontSubsetting() were added to control the default font subsetting mode (see example n. 1). - - Bug #3012596 "Whitespace should not appeared after use Thai top characters" was fixed. - - Examples n. 1, 14, and 54 were updated. - -5.3.001 (2010-06-06) - - Barcode PDF417 was improved to support Macro Code Blocks (see example n. 50). - -5.3.000 (2010-06-05) - - License was changed to GNU-LGPLv3 (see the updated LICENSE.TXT file). - - PDF417 barcode support was added (check the example n. 50). - - The method write2DBarcode() was improved (some parameters were added and other changed - check example n. 50). - ------------------------------------------------------------- - -5.2.000 (2010-06-02) - - IMPORTANT: Support for font subsetting was added by default to reduce the size of documents using large unicode font files. - If you embed the whole font in the PDF, the person on the other end can make changes to it even if he didn't have your font. - If you subset the font, file size of the PDF will be smaller but the person who receives your PDF would need to have your same font in order to make changes to your PDF. - - The signature of the SetFont() and AddFont() methods were changed to include the font subsetting option (subsetting is applied by default). - - Examples 14 and 54 were updated. - ------------------------------------------------------------- - -5.1.002 (2010-05-27) - - Bug #3007818 "SetAutoPageBreak fails with MultiCell" was fixed. - - A bug related to MultiCell() minimun height was fixed. - -5.1.001 (2010-05-26) - - The problem of blank page after table was fixed. - -5.1.000 (2010-05-25) - - This version includes support for CSS (Cascading Style Sheets) (see example n. 61). - - The convertHTMLColorToDec() method was improved. - ------------------------------------------------------------- - -5.0.014 (2010-05-21) - - A problem on color and style of HTML links was fixed. - - A bug relative to gradients was fixed. - - The getStringHeight() method was added and getNumLines() method was improved. - - All examples were updated. - -5.0.013 (2010-05-19) - - A bug related to page-breaks and table cells was fixed. - -5.0.012 (2010-05-19) - - Page orientation bug was fixed. - - The access to method setPageFormat() was changed to 'protected' because it is not intended to be directly called. - -5.0.011 (2010-05-19) - - Page orientation bug was fixed. - - Bug #3003966 "Multiple columns and nested lists" was fixed. - -5.0.010 (2010-05-17) - - The methods setPageFormat(), setPageOrientation() and related methods were extended to include page boxes, page rotations and page transitions. - - The method setPageBoxes() was added to set page boundaries (MediaBox, CropBox, BleedBox, TrimBox, ArtBox); - - A bug relative to underline, overline and linethrough was fixed. - -5.0.009 (2010-05-16) - - Bug #3002381 "Multiple columns and nested lists" was fixed. - -5.0.008 (2010-05-15) - - Bug "Columns WriteHTML and Justification" was fixed. - -5.0.007 (2010-05-14) - - Bug #3001347 "Bug when using WriteHTML with setEqualColumns()" was fixed. - - Bug #3001505 "problem with sup and sub tags at the beginning of a line" was fixed. - -5.0.006 (2010-05-13) - - Length of hr tag was fixed. - - An error on 2d barcode method was fixed. - -5.0.005 (2010-05-12) - - WARNING: The logic of permissions on the SetProtection() method has been inverted and extended (see example 16). Now you have to specify the features you want to block. - - SetProtection() method was extended to support RSA and AES 128 encryption and public-keys (see example 16). - - Bug #2999489 "setEqualColumns() and TOC uses wrong columns" was fixed (see the example 10). - -5.0.004 (2010-05-10) - - HTML line alignment when using sub and sup tags was fixed. - -5.0.003 (2010-05-07) - - Horizontal alignment was fixed for images and barcodes. Now the X coordinate is always relative to the left margin. Use GetAbsX() instead of GetX() to get the X relative to left margin. - - Header() method was changed to account for new image alignment rules. - -5.0.002 (2010-05-06) - - Bookmark() and related methods were fixed to accept HTML code. - - A problem on HTML links was fixed. - -5.0.001 (2010-05-06) - - Protected method _putstream was re-added for backward compatibility. - - The following method were added to display HTML Table Of Content (see example n. 59): - addTOCPage(), endTOCPage(), addHTMLTOC(). - -5.0.000 (2010-05-05) - - Method ImageSVG() was added to embedd SVG images (see example n. 58). Note that not all SVG images are supported. - - Method setRasterizeVectorImages() was added to enable/disable rasterization for vector images via ImageMagick library. - - Method RoundedRectXY() was added. - - Method PieSectorXY() was added. - - Gradient() method is now public and support new features. - - Shading to transparency is now supported. - - Image alignments were fixed. - - Support for dynamic images were improved. - - PDF_IMAGE_SCALE_RATIO has been changed to 1.25 for better compatibility with SVG. - - RAW and RAW2 modes were added to 2D Barcodes (see example n. 50). - - Automatic padding feature was added on barcodes (see examples n. 27 and 50). - - Bug #2995003 "Reproduced thead bug" was fixed. - - The Output() method now accepts FI and FD destinations to save the document on server before sending it to the client. - - Ellipse() method was improved and fixed (see page 2 of example n. 12). - ------------------------------------------------------------- - -4.9.018 (2010-04-21) - - Bug item #2990356 "Current font size not respected with more than two HTML

    " was fixed. - -4.9.017 (2010-04-21) - - Bug item #2990224 "Different behaviour for equivalent HTML strings" was fixed. - - Bug item #2990314 "Dash is not appearing with SHY character" was fixed. - -4.9.016 (2010-04-20) - - An error on htmlcolors.php was fixed. - - getImageFileType() method was improved. - - GIF images with transparency are now better supported. - - Automatic page orientation was improved. - -4.9.015 (2010-04-20) - - A new method copyPage() was added to clone pages (see example n. 44). - - Support for text overline was added. - - Underline and linethrough methods were fixed. - - Bug #2989058 "SHY character causes unnecessary word-wrapping" was fixed. - -4.9.014 (2010-04-18) - - Bug item #2988845 was fixed. - -4.9.013 (2010-04-15) - - Image() and ImageEPS() methods were fixed and improved; $fitonpage parameter was added. - -4.9.012 (2010-04-12) - - The hyphenateText() method was added to automatically hyphenate text (see example n. 46). - -4.9.011 (2010-04-07) - - Vertical alignments for Cell() method were improved (see example n. 57). - -4.9.010 (2010-04-06) - - Signature of Cell() method now includes new parameters for vertical alignment (see example n. 57). - - Text() method was extended to include all Cell() parameters. - - HTML line alignment procedure was changed to fix some bugs. - -4.9.009 (2010-04-05) - - Text() method was fixed for backward compatibility. - -4.9.008 (2010-04-03) - - Additional line space after table header was removed. - - Support for HTML lists in multicolumn mode was added. - - The method setTextRenderingMode() was added to set text rendering modes (see the example n. 26). - - The following HTML attributes were added to set text rendering modes (see the example n. 26): stroke, strokecolor, fill. - -4.9.007 (2010-04-03) - - Font Descent computation was fixed (patch #2981441). - -4.9.006 (2010-04-02) - - The constant K_TCPDF_CALLS_IN_HTML was added on configuration file to enable/disable the ability to call TCPDF methods in HTML. - - The usage of tcpdf tag in HTML mode was changed to remove the possible security flaw offered by the eval() function (thanks to Matthias Hecker for spotting this security problem). See the new example n. 49 for further information. - -4.9.005 (2010-04-01) - - Bug# 2980354 "Wrong File attachment description with security" was fixed. - - Several problems with HTML line alignment were fixed. - - The constant K_THAI_TOPCHAR was added on configuration file to enable/disable the special procedure used to avoid the overlappind of symbols on Thai language. - - A problem with font name directory was fixed. - - A bug on _destroy() method was fixed. - -4.9.004 (2010-03-31) - - Patch #979681 "GetCharWidth - default character width" was applied (bugfix). - -4.9.003 (2010-03-30) - - Problem of first
    on multiple columns was fixed. - - HTML line alignment was fixed. - - A QR-code bug was fixed. - -4.9.002 (2010-03-29) - - Patch #2978349 "$ignore_min_height is ignored in function Cell()" was applied. - - Bug #2978607 "2D Barcodes are wrong" was fixed. - - A problem with HTML block tags was fixed. - - Artificial italic for CID-0 fonts was added. - - Several multicolumn bugs were fixed. - - Support for HTML tables on multicolumn was added. - -4.9.001 (2010-03-28) - - QR Code minor bug was fixed. - - Multicolumn mode was added (see the new example n. 10). - - The following methods were added: setEqualColumns(), setColumnsArray(), selectColumn(). - - Thai diacritics support were changed (note that this is incompatible with html justification). - -4.9.000 (2010-03-27) - - QR Code (2D barcode) support was added (see example n. 50). - - The following methods were added to print crop and registration marks (see example n. 56): colorRegistrationBar(), cropMark(), registrationMark(). - - Limited support for CSS line-height property was added. - - Gradient method now supports Gray, RGB and CMYK space color. - - Example n. 51 was updated. - - Vertical alignment of font inside cell was fixed. - - Support for multiple Thai diacritics was added. - - Bug item #2974929 "Duplicate case values" was fixed. - - Bug item #2976729 "File attachment not working with security" was fixed. - ------------------------------------------------------------- - -4.8.039 (2010-03-20) - - Problems related to custom locale settings were fixed. - - Problems related to HTML on Header and Footer were fixed. - -4.8.038 (2010-03-13) - - Various bugs related to page-break in HTML mode were fixed. - - Bug item #2968974 "Another

    pagebreak problem" was fixed. - - Bug item #2969276 "justification problem" was fixed. - - Bug item #2969289 "bug when using justified text and custom headers" was fixed. - - Images are now automatically resized to be contained on the page. - - Some HTML line alignments were fixed. - - Signature of AddPage() and SetMargins() methods were changed to include an option to set default page margins. - -4.8.037 (2010-03-03) - - Bug item #2962068 was fixed. - - Bug item #2967017 "Problems with and pagebreaks" was fixed. - - Bug item #2967023 "table header lost with pagebreak" was fixed. - - Bug item #2967032 "Header lost with nested tables" was fixed. - -4.8.036 (2010-02-24) - - Automatic page break for HTML images was improved. - - Example 10 was updated. - - Japanese was removed from example 8 because the freeserif font doesn't contain japanese (you can display it using arialunicid0 font). - -4.8.035 (2010-02-23) - - Automatic page break for HTML images was added. - - Support for multicolumn HTML was added (example 10 was updated). - -4.8.034 (2010-02-17) - - Language files were updated. - -4.8.033 (2010-02-12) - - A bug related to protection mode with links was fixed. - -4.8.032 (2010-02-04) - - A bug related to $maxh parameter on Write() and MultiCell() was fixed. - - Support for body tag was added. - -4.8.031 (2010-01-30) - - Bug item #2941589 "paragraph justify not working on some non-C locales" was fixed. - -4.8.030 (2010-01-27) - - Some text alignment cases were fixed. - -4.8.029 (2010-01-27) - - Bug item #2941057 "TOC Error in PDF File Output" was fixed. - - Some text alignment cases were fixed. - -4.8.028 (2010-01-26) - - Text alignment for RTL mode was fixed. - -4.8.027 (2010-01-25) - - Bug item #2938412 "Table related problems - thead, nobr, table width" was fixed. - -4.8.026 (2010-01-19) - - The misspelled word "length" was replaced with "length" in some variables and comments. - -4.8.025 (2010-01-18) - - addExtGState() method was improved to reuse existing ExtGState objects. - -4.8.024 (2010-01-15) - - Justification mode for HTML was fixed (Bug item #2932470). - -4.8.023 (2010-01-15) - - Bug item #2932470 "Some HTML entities breaks justification" was fixed. - -4.8.022 (2010-01-14) - - Source code documentation was fixed. - -4.8.021 (2010-01-03) - - A Bug relative to Table Of Content index was fixed. - -4.8.020 (2009-12-21) - - Bug item #2918545 "Display problem of the first row of a table with larger font" was fixed. - - A Bug relative to table rowspan mode was fixed. - -4.8.019 (2009-12-16) - - Bug item #2915684 "Image size" was fixed. - - Bug item #2914995 "Image jpeg quality" was fixed. - - The signature of the Image() method was changed (check the documentation for the $resize parameter). - -4.8.018 (2009-12-15) - - Bug item #2914352 "write error" was fixed. - -4.8.017 (2009-11-27) - - THEAD problem when table is used on header/footer was fixed. - - A first line alignment on HTML justification was fixed. - - Method getImageFileType() was added. - - Images with unknown extension and type are now supported via ImageMagick PHP extension. - -4.8.016 (2009-11-21) - - Document Information Dictionary was fixed. - - CSS attributes 'page-break-before', 'page-break-after' and 'page-break-inside' are now supported. - - Problem of unclosed last page was fixed. - - Problem of 'thead' unnecessarily repeated on the next page was fixed. - -4.8.015 (2009-11-20) - - A problem with some PNG transparency images was fixed. - - Bug #2900762 "Sort issues in Bookmarks" was fixed. - - Text justification was fixed for various modes: underline, strikeout and background. - -4.8.014 (2009-11-04) - - Bug item #2891316 "writeHTML, underlining replacing spaces" was fixed. - - The handling of temporary RTL text direction mode was fixed. - -4.8.013 (2009-10-26) - - Bug item #2884729 "Problem with word-wrap and hyphen" was fixed. - -4.8.012 (2009-10-23) - - Table cell alignments for RTL booklet mode were fixed. - - Images and barcode alignments for booklet mode were fixed. - -4.8.011 (2009-10-22) - - DejaVu fonts were updated to latest version. - -4.8.010 (2009-10-21) - - Bookmark for TOC page was added. - - Signature of addTOC() method is changed. - - Bookmarks are now automatically sorted by page and Y position. - - Example n. 45 was updated. - - Example n. 55 was added to display all charactes available on core fonts. - -4.8.009 (2009-09-30) - - Compatibility with PHP 5.3 was improved. - - All examples were updated. - - Index file for examples was added. - -4.8.008 (2009-09-29) - - Example 49 was updated. - - Underline and linethrough now works with cell stretching mode. - -4.8.007 (2009-09-23) - - Infinite loop problem caused by nobr attribute was fixed. - -4.8.006 (2009-09-23) - - Bug item #2864522 "No images if DOCUMENT_ROOT=='/'" was fixed. - - Support for text-indent CSS attribute was added. - - Method rollbackTransaction() was changed to support self-reassignment of previous object (check source code documentation). - - Support for the HTML "nobr" attribute was added to avoid splitting a table or a table row on two pages (i.e.: ...). - -4.8.005 (2009-09-17) - - A bug relative to multiple transformations and annotations was fixed. - -4.8.004 (2009-09-16) - - A bug on _putannotsrefs() method was fixed. - -4.8.003 (2009-09-15) - - Bug item #2858754 "Division by zero" was fixed. - - A bug relative to HTML list items was fixed. - - A bug relative to form fields on multiple pages was fixed. - - PolyLine() method was added (see example n. 12). - - Signature of Polygon() method was changed. - -4.8.002 (2009-09-12) - - A problem related to CID-0 fonts offset was fixed: if the $cw[1] entry on the CID-0 font file is not defined, then a CID keys offset is introduced. - -4.8.001 (2009-09-09) - - The appearance streams (AP) for anotations form fields was fixed (see examples n. 14 and 54). - - Radiobuttons were fixed. - -4.8.000 (2009-09-07) - - This version includes some support for Forms fields (see example n. 14) and XHTML forms (see example n. 54). - - The following methods were changed to work without JavaScript: TextField(), RadioButton(), ListBox(), ComboBox(), CheckBox(), Button(). - - Support for Widget annotations was improved. - - Alignment of annotation objects was fixed (examples 36 and 41 were updated). - - addJavascriptObject() method was added. - - Signature of Image() method was changed. - - htmlcolors.php file was updated. - ------------------------------------------------------------- - -4.7.003 (2009-09-03) - - Support for TCPDF methods on HTML was improved (see example n. 49). - -4.7.002 (2009-09-02) - - Bug item #2848892 "writeHTML + table: Gaps between rows" was fixed. - - JavaScript support was fixed (see example n. 53). - -4.7.001 (2009-08-30) - - The Polygon() and Arrow() methods were fixed and improved (see example n. 12). - -4.7.000 (2009-08-29) - - This is a major release. - - Some procedures were internally optimized. - - The problem of mixed signature and annotations was fixed (example n. 52). - -4.6.030 (2009-08-29) - - IMPORTANT: percentages on table cell widths are now relative to the full table width (as in standard HTML). - - Various minor bugs were fixed. - - Example n. 52 (digital signature) was updated. - -4.6.029 (2009-08-26) - - PHP4 version was fixed. - -4.6.028 (2009-08-25) - - Signature algorithm was finally fixed (see example n. 52). - -4.6.027 (2009-08-24) - - TCPDF now supports unembedded TrueTypeUnicode Fonts (just comment the $file entry on the fonts' php file. - -4.6.026 (2009-08-21) - - Bug #2841693 "Problem with MultiCell and ishtml and justification" was fixed. - - Signature functions were improved but not yet fixed (tcpdf.crt and example n. 52 were updated). - -4.6.025 (2009-08-17) - - Carriage returns (\r) were removed from source code. - - Problem related to set_magic_quotes_runtime() depracated was fixed. - -4.6.024 (2009-08-07) - - Bug item #2833556 "justification using other units than mm" was fixed. - - Documentation was fixed/updated. - -4.6.023 (2009-08-02) - - Bug item #2830537 "MirrorH can show mask for transparent PNGs" was fixed. - -4.6.022 (2009-07-24) - - A bug relative to single line printing when using WriteHTMLCell() was fixed. - - Signature support were improved but is still experimental. - - Fonts Free and Dejavu were updated to latest versions. - -4.6.021 (2009-07-20) - - Bug item #2824015 "XHTML Ampersand & in hyperlink bug" was fixed. - - Bug item #2824036 "Image as hyperlink in table, text displaced at page break" was fixed. - - Links alignment on justified text was fixed. - - Unicode "\u" modifier was added to re_spaces variable by default. - -4.6.020 (2009-07-16) - - Bug item #2821921 "issue in example 18" was fixed. - - Signature of SetRTL() method was changed. - -4.6.019 (2009-07-13) - - Bug item #2820703 "xref table broken" was fixed. - -4.6.018 (2009-07-10) - - Bug item #2819319 "Text over text" was fixed. - - Method Arrow() was added to print graphic arrows (example 12 was updated). - -4.6.017 (2009-07-05) - - Bug item #2816079 "Example 48 not working" was fixed. - - The signature of the checkPageBreak() was changed. The parameter $addpage was added to turn off the automatic page creation. - -4.6.016 (2009-06-16) - - Method setSpacesRE() was added to set the regular expression used for detecting withespaces or word separators. If you are using chinese, try: setSpacesRE('/[\s\p{Z}\p{Lo}]/');, otherwise you can use setSpacesRE('/[\s\p{Z}]/'); - - The method _putinfo() now automatically fills the metadata with '?' in case of empty string. - -4.6.015 (2009-06-11) - - Bug #2804667 "word wrap bug" was fixed. - -4.6.014 (2009-06-04) - - Bug #2800931 "Table thead tag bug" was fixed. - - A bug related to
     tag was fixed.
    -
    -4.6.013 (2009-05-28)
    -	- List bullets position was fixed for RTL languages.
    -
    -4.6.012 (2009-05-23)
    -	- setUserRights() method doesn't work anymore unless you call the setSignature() method with the Adobe private key!
    -
    -4.6.011 (2009-05-18)
    -	- Signature of the Image() method was changed to include the new $fitbox parameter (see source code documentation).
    -
    -4.6.010 (2009-05-17)
    -	- Image() method was improved: now is possible to specify the maximum dimensions for a constraint box defined by $w and $h parameters, and setting the $resize parameter to null.
    -	-  tag indent problem was fixed.
    -	- $y parameter was added to checkPageBreak() method.
    -	- Bug n. 2791773 "writeHTML" was fixed.
    -
    -4.6.009 (2009-05-13)
    -	- xref table for embedded files was fixed.
    -
    -4.6.008 (2009-05-07)
    -	- setSignature() method was improved (but is still experimental).
    -	- Example n. 52 was added.
    -
    -4.6.007 (2009-05-05)
    -	- Bug #2786685 "writeHtmlCell and 
    in custom footer" was fixed. - - Table header repeating bug was fixed. - - Some newlines and tabs are now automatically removed from HTML strings. - -4.6.006 (2009-04-28) - - Support for "..." was added. - - By default TCPDF requires PCRE Unicode support turned on but now works also without it (with limited ability to detect some Unicode blank spaces). - -4.6.005 (2009-04-25) - - Points (pt) conversion in getHTMLUnitToUnits() was fixed. - - Default tcpdf.pem certificate file was added. - - Experimental support for signing document was added but it is not yet completed (some help is needed - I think that the calculation of the ByteRange is OK and the problem is on the signature calculation). - -4.6.004 (2009-04-23) - - Method deletePage() was added to delete pages (see example n. 44). - -4.6.003 (2009-04-21) - - The caching mechanism of the UTF8StringToArray() method was fixed. - -4.6.002 (2009-04-20) - - Documentation of rollbackTransaction() method was fixed. - - The setImageScale() and getImageScale() methods now set and get the adjusting parameter used by pixelsToUnits() method. - - HTML images now support other units of measure than pixels (getHTMLUnitToUnits() is now used instead of pixelsToUnits()). - - WARNING: PDF_IMAGE_SCALE_RATIO has been changed by default to 1. - -4.6.001 (2009-04-17) - - Spaces between HTML block tags are now automatically removed. - - The bug related to cMargin changes between tables was fixed. - -4.6.000 (2009-04-16) - - WARNING: THIS VERSION CHANGES THE BEHAVIOUR OF $x and $y parameters for several TCPDF methods: - zero coordinates for $x and $y are now valid coordinates; - set $x and $y as empty strings to get the current value. - - Some error caused by 'empty' function were fixed. - - Default color for convertHTMLColorToDec() method was changed to white and the return value for invalid color is false. - - HTML on footer bug was fixed. - - The following examples were fixed: 5,7,10,17,19,20,21,33,42,43. - -4.5.043 (2009-04-15) - - Barcode class (barcode.php) was extended to include new linear barcode types (see example n. 27): - C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9 - C39+ : CODE 39 with checksum - C39E : CODE 39 EXTENDED - C39E+ : CODE 39 EXTENDED + CHECKSUM - C93 : CODE 93 - USS-93 - S25 : Standard 2 of 5 - S25+ : Standard 2 of 5 + CHECKSUM - I25 : Interleaved 2 of 5 - I25+ : Interleaved 2 of 5 + CHECKSUM - C128A : CODE 128 A - C128B : CODE 128 B - C128C : CODE 128 C - EAN2 : 2-Digits UPC-Based Extension - EAN5 : 5-Digits UPC-Based Extension - EAN8 : EAN 8 - EAN13 : EAN 13 - UPCA : UPC-A - UPCE : UPC-E - MSI : MSI (Variation of Plessey code) - MSI+ : MSI + CHECKSUM (modulo 11) - POSTNET : POSTNET - PLANET : PLANET - RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX : KIX (Klant index - Customer index) - IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200 (NOTE: requires BCMath PHP extension) - CODABAR : CODABAR - CODE11 : CODE 11 - PHARMA : PHARMACODE - PHARMA2T : PHARMACODE TWO-TRACKS - -4.5.042 (2009-04-15) - - Method Write() was fixed for the strings containing only zero value. - -4.5.041 (2009-04-14) - - Barcode methods were fixed. - -4.5.040 (2009-04-14) - - Method Write() was fixed to handle empty strings. - -4.5.039 (2009-04-11) - - Support for linear barcodes was extended (see example n. 27 and barcodes.php documentation). - -4.5.038 (2009-04-10) - - Write() method was improved to support separators for Japanese, Korean, Chinese Traditional and Chinese Simplified. - -4.5.037 (2009-04-09) - - General performances were improved. - - The signature of the method utf8Bidi() was changed. - - The method UniArrSubString() was added. - - Experimental support for 2D barcodes were added (see example n. 50 and 2dbarcodes.php class). - -4.5.036 (2009-04-03) - - TCPDF methods can be called inside the HTML code (see example n. 49). - - All tag attributes, such as

    must be enclosed within double quotes. - -4.5.035 (2009-03-28) - - Bug #2717436 "writeHTML rowspan problem (continued)" was fixed. - - Bug #2719090 "writeHTML fix follow up" was fixed. - - The method _putuserrights() was changed to avoid Adobe Reader 9.1 crash. This broken the 'trick' that was used to display forms in Acrobat Reader. - -4.5.034 (2009-03-27) - - Bug #2716914 "Bug writeHTML of a table in body and footer related with pb" was fixed. - - Bug #2717056 ] "writeHTML problem when setting tr style" was fixed. - - The signature of the Cell() method was changed. - -4.5.033 (2009-03-27) - - The support for rowspan/colspan on HTML tables was improved (see example n. 48). - -4.5.032 (2009-03-23) - - setPrintFooter(false) bug was fixed. - -4.5.031 (2009-03-20) - - Table header support was extended to multiple pages. - -4.5.030 (2009-03-20) - - thead tag is now supported on HTML tables (header rows are repeated after page breaks). - - The startTransaction() was improved to autocommit. - - List bullets now uses the foreground color (putHtmlListBullet()). - -4.5.029 (2009-03-19) - - The following methods were added to UNDO commands (see example 47): startTransaction(), commitTransaction(), rollbackTransaction(). - - All examples were updated. - -4.5.028 (2009-03-18) - - Bug #2690945 "List Bugs" was fixed. - - HTML text alignment on lists was fixed. - - The constant PDF_FONT_MONOSPACED was added to the configuration file to define the default monospaced font. - - The following methods were fixed: getPageWidth(), getPageHeight(), getBreakMargin(). - - All examples were updated. - -4.5.027 (2009-03-16) - - Method getPageDimensions() was added to get page dimensions. - - The signature of the following methos were changed: getPageWidth(), getPageHeight(), getBreakMargin(). - - _parsepng() method was fixed for PNG URL images (fread bug). - -4.5.026 (2009-03-11) - - Bug #2681793 affecting URL images with spaces was fixed. - -4.5.025 (2009-03-10) - - A small bug affecting hyphenation support was fixed. - - The method SetDefaultMonospacedFont() was added to define the default monospaced font. - -4.5.024 (2009-03-07) - - The bug #2666493 was fixed "Footer corrupts document". - -4.5.023 (2009-03-06) - - The bug #2666688 was fixed "Rowspan in tables". - -4.5.022 (2009-03-05) - - The bug #2659676 was fixed "refer to #2157099 test 4 < BR > problem still not fixed". - - addTOC() function bug was fixed. - -4.5.020 (2009-03-03) - - The following bug was fixed: "function removeSHY corrupts unicode". - -4.5.019 (2009-02-28) - - The problem of decimal separator using different locale was fixed. - - The text hyphenation is now supported (see example n. 46). - -4.5.018 (2009-02-26) - - The _destroy() method was added to unset all class variables and frees memory. - - Now it's possible to call Output() method multiple times. - -4.5.017 (2009-02-24) - - A minor bug that raises a PHP warning was fixed. - -4.5.016 (2009-02-24) - - Bug item #2631200 "getNumLines() counts wrong" was fixed. - - Multiple attachments bug was fixed. - - All class variables are now cleared on Output() for memory otpimization. - -4.5.015 (2009-02-18) - - Bug item #2612553 "function Write() must not break a line on   character" was fixed. - -4.5.014 (2009-02-13) - - Bug item #2595015 "POSTNET Barcode Checksum Error" was fixed (on barcode.php). - - Pagebreak bug for barcode was fixed. - -4.5.013 (2009-02-12) - - border attribute is now supported on HTML images (only accepts the same values accepted by Cell()). - -4.5.012 (2009-02-12) - - An error on image border feature was fixed. - -4.5.011 (2009-02-12) - - HTML links for images are now supported. - - height attribute is now supported on HTML cells. - - $border parameter was added to Image() and ImageEps() methods. - - The method getNumLines() was added to estimate the number of lines required for the specified text. - -4.5.010 (2009-01-29) - - Bug n. 2546108 "BarCode Y position" was fixed. - -4.5.009 (2009-01-26) - - Bug n. 2538094 "Empty pdf file created" was fixed. - -4.5.008 (2009-01-26) - - setPage() method was fixed to correctly restore graphic states. - - Source code was cleaned up for performances. - -4.5.007 (2009-01-24) - - checkPageBreak() and write1DBarcode() methods were fixed. - - Source code was cleaned up for performances. - - barcodes.php was updated. - -4.5.006 (2009-01-23) - - getHTMLUnitToPoints() method was replaced by getHTMLUnitToUnits() to fix HTML units bugs. - -4.5.005 (2009-01-23) - - Page closing bug was fixed. - -4.5.004 (2009-01-21) - - The access of convertHTMLColorToDec() method was changed to public - - Fixed bug on UL tag. - -4.5.003 (2009-01-19) - - Fonts on different folders are now supported. - -4.5.002 (2009-01-07) - - addTOC() function was improved (see example n. 45). - -4.5.001 (2009-01-04) - - The signature of startPageGroup() function was changed. - - Method Footer() was improved to automatically print page or page-group number (see example n. 23). - - Protected method formatTOCPageNumber() was added to customize the format of page numbers on the Table Of Content. - - The signature of addTOC() was changed to include the font used for page numbers. - -4.5.000 (2009-01-03) - - A new $diskcache parameter was added to class constructor to enable disk caching and reduce RAM memory usage (see example n. 43). - - The method movePageTo() was added to move pages to previous positions (see example n. 44). - - The methods getAliasNumPage() and getPageNumGroupAlias() were added to get the alias for page number (needed when using movepageTo()). - - The methods addTOC() was added to print a Table Of Content (see example n. 45). - - Imagick class constant was removed for better compatibility with PHP4. - - All existing examples were updated and new examples were added. - -4.4.009 (2008-12-29) - - Examples 1 and 35 were fixed. - -4.4.008 (2008-12-28) - - Bug #2472169 "Unordered bullet size not adjusted for unit type" was fixed. - -4.4.007 (2008-12-23) - - Bug #2459935 "no unit conversion for header line" was fixed. - - Example n. 42 for image alpha channel was added. - - All examples were updated. - -4.4.006 (2008-12-11) - - Method setLIsymbol() was changed to reflect latest changes in HTML list handling. - -4.4.005 (2008-12-10) - - Bug item #2413870 "ordered list override value" was fixed. - -4.4.004 (2008-12-10) - - The protected method getHTMLUnitToPoints() was added to accept various HTML units of measure (em, ex, px, in, cm, mm, pt, pc, %). - - The method intToRoman() was added to convert integer number to Roman representation. - - Support fot HTML lists was improved: the CSS property list-style-type is now supported. - -4.4.003 (2008-12-09) - - Bug item #2412147 "Warning on line 3367" was fixed. - - Method setHtmlLinksStyle() was added to set default HTML link colors and font style. - - Method addHtmlLink() was changed to use color and style defined on the inline CSS. - -4.4.002 (2008-12-09) - - Borders on Multicell() were fixed. - - Problem of Multicell() on Header function (Bug item #2407579) was fixed. - - Problem on graphics tranformations applied to Multicell() was fixed. - - Support for ImageMagick was added. - - Width calculation for nested tables was fixed. - -4.4.001 (2008-12-08) - - Some missing core fonts were added on fonts directory. - - CID0 fonts rendering was fixed. - - HTML support was improved (

     and  tags are now supported).
    -	- Bug item #2406022 "Left padding bug in MultiCell with maxh" was fixed.
    -
    -4.4.000 (2008-12-07)
    -	- File attachments are now supported (see example n. 41).
    -	- Font functions were optimized to reduce document size.
    -	- makefont.php was updated.
    -	- Linux binaries were added on /fonts/utils
    -	- All fonts were updated.
    -	- $autopadding parameter was added to Multicell() to disable automatic padding features.
    -	- $maxh parameter was added to Multicell() and Write() to set a maximum height.
    -
    -4.3.009 (2008-12-05)
    -	- Bug item #2392989 (Custom header + setlinewidth + cell border bug) was fixed.
    -
    -4.3.008 (2008-12-05)
    -	- Bug item #2390566 "rect bug" was fixed.
    -	- File path was fixed for font embedded files.
    -	- SetFont() method signature was changed to include the font filename.
    -	- Some font-related methods were improved.
    -	- Methods getFontFamily() and getFontStyle() were added.
    -
    -4.3.007 (2008-12-03)
    -	- PNG alpha channel is now supported (GD library is required).
    -	- AddFont() function now support custom font file path on $file parameter.
    -	- The default width variable ($dw) is now always defined for any font.
    -	- The 'Style' attribute on CID-0 fonts was removed because of protection bug.
    -
    -4.3.006 (2008-12-01)
    -	- A regular expression on getHtmlDomArray() to find HTML tags was fixed.
    -
    -4.3.005 (2008-11-25)
    -	- makefont.php was fixed.
    -	- Bug item #2339877 was fixed (false loop condition detected on WriteHTML()).
    -	- Bug item #2336733 was fixed (lasth value update on Multicell() when border and fill are disabled).
    -	- Bug item #2342303 was fixed (automatic page-break on Image() and ImageEPS()).
    -
    -4.3.004 (2008-11-19)
    -	- Function _textstring() was fixed (bug 2309051).
    -	- All examples were updated.
    -
    -4.3.003 (2008-11-18)
    -	- CID-0 font bug was fixed.
    -	- Some functions were optimized.
    -	- Function getGroupPageNoFormatted() was added.
    -	- Example n. 23 was updated.
    -
    -4.3.002 (2008-11-17)
    -	- Bug item #2305518 "CID-0 font don't work with encryption" was fixed.
    -
    -4.3.001 (2008-11-17)
    -	- Bug item #2300007 "download mimetype pdf" was fixed.
    -	- Double quotes were replaced by single quotes to improve PHP performances.
    -	- A bug relative to HTML cell borders was fixed.
    -
    -4.3.000 (2008-11-14)
    -	- The function setOpenCell() was added to set the top/bottom cell sides to be open or closed when the cell cross the page.
    -	- A bug relative to list items indentation was fixed.
    -	- A bug relative to borders on HTML tables and Multicell was fixed.
    -	- A bug relative to rowspanned cells was fixed.
    -	- A bug relative to html images across pages was fixed.
    -
    -4.2.009 (2008-11-13)
    -	- Spaces between li tags are now automatically removed.
    -
    -4.2.008 (2008-11-12)
    -	- A bug relative to fill color on next page was fixed.
    -
    -4.2.007 (2008-11-12)
    -	- The function setListIndentWidth() was added to set custom indentation widht for HTML lists.
    -
    -4.2.006 (2008-11-06)
    -	- A bug relative to HTML justification was fixed.
    -
    -4.2.005 (2008-11-06)
    -	- A bug relative to HTML justification was fixed.
    -	- The methods formatPageNumber() and PageNoFormatted() were added to format page numbers.
    -	- Default Footer() method was changed to use PageNoFormatted() instead of PageNo().
    -	- Example 6 was updated.
    -
    -4.2.004 (2008-11-04)
    -	- Bug item n. 2217039 "filename handling improvement" was fixed.
    -
    -4.2.003 (2008-10-31)
    -	- Font style bug was fixed.
    -
    -4.2.002 (2008-10-31)
    -	- Bug item #2210922 (htm element br not work) was fixed.
    -	- Write() function was improved to support margin changes.
    -
    -4.2.001 (2008-10-30)
    -	- setHtmlVSpace($tagvs) function was added to set custom vertical spaces for HTML tags.
    -	- writeHTML() function now support margin changes during execution.
    -	- Signature of addHTMLVertSpace() function is changed.
    -
    -4.2.000 (2008-10-29)
    -	- htmlcolors.php was changed to support class-loaders.
    -	- ImageEps() function was improved in performances.
    -	- Signature of Link() And Annotation() functions were changed.
    -	- (Bug item #2198926) Links and Annotations alignment were fixed (support for geometric tranformations was added).
    -	- rowspan mode for HTML table cells was improved and fixed.
    -	- Booklet mode for double-sided pages was added; see SetBooklet() function and example n. 40.
    -	- lastPage() signature is changed.
    -	- Signature of Write() function is changed.
    -	- Some HTML justification problems were fixed.
    -	- Some functions were fixed to better support RTL mode.
    -	- Example n. 10 was changed to support RTL mode.
    -	- All examples were updated.
    -
    -4.1.004 (2008-10-23)
    -	- unicode_data.php was changed to support class-loaders.
    -	- Bug item #2186040/2 (writeHTML margin problem) was fixed.
    -
    -4.1.003 (2008-10-22)
    -	- Bug item #2185399 was fixed (rowspan and page break).
    -	- Bugs item #2186040 was fixed (writeHTML margin problem).
    -	- Newline after table was removed.
    -
    -4.1.002 (2008-10-21)
    -	- Bug item #2184525 was fixed (rowspan on HTML cell).
    -
    -4.1.001 (2008-10-21)
    -	- Support for "start" attribute was added to HTML ordered list.
    -	- unicode_data.php file was changed to include UTF-8 to ASCII table.
    -	- Some functions were modified to better support UTF-8 extensions to core fonts.
    -	- Support for images on HTML lists was improved.
    -	- Examples n. 1 and 6 were updated.
    -
    -4.1.000 (2008-10-18)
    -	- Page-break bug using HTML content was fixed.
    -	- The "false" parameter was reintroduced to class_exists function on PHP5 version to avoid autoload.
    -	- addHtmlLink() function was improved to support internal links (i.e.: link to page 23).
    -	- Justification alignment is now supported on HTML (see example n. 39).
    -	- example_006.php was updated.
    -
    -4.0.033 (2008-10-13)
    -	- Bug n. 2157099 was fixed.
    -	- SetX() and SetY() functions were improved.
    -	- SetY() includes a new parameter to avoid the X reset.
    -
    -4.0.032 (2008-10-10)
    -	- Bug n. 2156926 was fixed (bold, italic, underlined, linethrough).
    -	- setStyle() method was removed.
    -	- Configuration file was changed to use helvetica (non-unicode) font by default.
    -	- The use of mixed font types was improved.
    -	- All examples were updated.
    -
    -4.0.031 (2008-10-09)
    -	- _putannots() and _putbookmarks() links alignments were fixed.
    -
    -4.0.030 (2008-10-07)
    -	- _putbookmarks() function was fixed.
    -	- _putannots() was fixed to include internal links.
    -
    -4.0.029 (2008-09-27)
    -	- Infinite loop bug was fixed [Bug item #130309].
    -	- Multicell() problem on Header() was fixed.
    -
    -4.0.028 (2008-09-26)
    -	- setLIsymbol() was added to set the LI symbol used on UL lists.
    -	- Missing $padding and $encryption_key variables declarations were added [Bug item #2129058].
    -
    -4.0.027 (2008-09-19)
    -	- Bug #2118588 "Undefined offset in tcpdf.php on line 9581" was fixed.
    -	- arailunicid0.php font was updated.
    -	- The problem of javascript form fields duplication after saving was fixed.
    -
    -4.0.026 (2008-09-17)
    -	- convertHTMLColorToDec() function was improved to support rgb(RR,GG,BB) notation.
    -	- The following inline CSS attributes are now supported: text-decoration, color, background-color and font-size names: xx-small, x-small, small, medium, large, x-large, xx-large
    -	- Example n. 6 was updated.
    -
    -4.0.025 (2008-09-15)
    -	- _putcidfont0 function was improved to include CJK fonts (Chinese, Japanese, Korean, CJK, Asian fonts) without embedding.
    -	- arialunicid0 font was added (see the new example n. 38).
    -	- The following Unicode to CID-0 tables were added on fonts folder: uni2cid_ak12.php, uni2cid_aj16.php, uni2cid_ag15.php, uni2cid_ac15.php.
    -
    -4.0.024 (2008-09-12)
    -	- "stripos" function was replaced with "strpos + strtolower" for backward compatibility with PHP4.
    -	- support for Spot Colors were added. Check the new example n. 37 and the following new functions:
    -		AddSpotColor()
    -		SetDrawSpotColor()
    -		SetFillSpotColor()
    -		SetTextSpotColor()
    -		_putspotcolors()
    -	- Bookmark() function was improved to fix wrong levels.
    -	- $lasth changes after header/footer calls were fixed.
    -
    -4.0.023 (2008-09-05)
    -	- Some HTML related problems were fixed.
    -	- Image alignment on HTML was changed, now it always defaults to the normal mode (see example_006.php).
    -
    -4.0.022 (2008-08-28)
    -	- Line height on HTML was fixed.
    -	- Image inside an HTML cell problem was fixed.
    -	- A new "zarbold" persian font was added.
    -
    -4.0.021 (2008-08-24)
    -	- HTTP headers were fixed on Output function().
    -	- getAliasNbPages() and getPageGroupAlias() functions were changed to support non-unicode fonts on unicode documents.
    -	- Function Write() was fixed.
    -	- The problem of additional vertical spaces on HTML was fixed.
    -	- The problem of frame around HTML links was fixed.
    -
    -4.0.020 (2008-08-15)
    -	- "[2052259] WriteHTML  & " bug was fixed.
    -
    -4.0.019 (2008-08-13)
    -	- "Rowspan on first cell" bug was fixed.
    -
    -4.0.018 (2008-08-08)
    -	- Default cellpadding for HTML tables was fixed.
    -	- Annotation() function was added to support some PDF annotations (see example_036.php and section 8.4 of PDF reference 1.7).
    -	- HTML links are now correclty shifted during line alignments.
    -	- function getAliasNbPages() was added and Footer() was updated.
    -	- RowSpan mode for HTML tables was fixed.
    -	- Bugs item #2043610 "Multiple sizes vertical align wrong" was fixed.
    -	- ImageEPS() function was improved and RTL alignment was fixed (see example_032.php).
    -
    -4.0.017 (2008-08-05)
    -	- Missing CNZ and CEO style modes were added to Rect() function.
    -	- Fonts utils were updated to include support for OpenType fonts.
    -	- getLastH() function was added.
    -
    -4.0.016 (2008-07-30)
    -	- setPageMark() function was added. This function must be called after calling Image() function for a background image.
    -
    -4.0.015 (2008-07-29)
    -	- Some functions were changed to support different page formats (see example_028.php).
    -	- The signature of setPage() function is changed.
    -
    -4.0.014 (2008-07-29)
    -	- K_PATH_MAIN calculation on tcpdf_config.php was fixed.
    -	- HTML support for EPS/AI images was added (see example_006.php).
    -	- Bugs item #2030807 "Truncated text on multipage html fields" was fixed.
    -	- PDF header bug was fixed.
    -	- helvetica was added as default font family.
    -	- Stroke mode was fixed on Text function.
    -	- several minor bugs were fixed.
    -
    -4.0.013 (2008-07-27)
    -	- Bugs item #2027799 " Big spaces between lines after page break" was fixed.
    -	- K_PATH_MAIN calculation on tcpdf_config.php was changed.
    -	- Function setVisibility() was fixed to avoid the "Incorrect PDEObject type" error message.
    -
    -4.0.012 (2008-07-24)
    -	- Addpage(), Header() and Footer() functions were changed to simplify the implementation of external header/footer functions.
    -	- The following functions were added:
    -			setHeader()
    -			setFooter()
    -			getImageRBX()
    -			getImageRBY()
    -			getCellHeightRatio()
    -			getHeaderFont()
    -			getFooterFont()
    -			getRTL()
    -			getBarcode()
    -			getHeaderData()
    -			getHeaderMargin()
    -			getFooterMargin()
    -
    -4.0.011 (2008-07-23)
    -	- Font support was improved.
    -	- The folder /fonts/utils contains new utilities and instructions for embedd font files.
    -	- Documentation was updated.
    -
    -4.0.010 (2008-07-22)
    -	- HTML tables were fixed to work across pages.
    -	- Header() and Footer() functions were updated to preserve previous settings.
    -	- example_035.php was added.
    -
    -4.0.009 (2008-07-21)
    -	- UTF8StringToArray() function was fixed for non-unicode mode.
    -
    -4.0.008 (2008-07-21)
    -	- Barcodes alignment was fixed (see example_027.php).
    -	- unicode_data.php was updated.
    -	- Arabic shaping for "Zero-Width Non-Joiner" character (U+200C) was fixed.
    -
    -4.0.007 (2008-07-18)
    -	- str_split was replaced by preg_split for compatibility with PHP4 version.
    -	- Clipping mode was added to all graphic functions by using parameter $style = "CNZ" or "CEO" (see example_034.php).
    -
    -4.0.006 (2008-07-16)
    -	- HTML rowspan bug was fixed.
    -	- Line style for MultiCell() was fixed.
    -	- WriteHTML() function was improved.
    -	- CODE128C barcode was fixed (barcodes.php).
    -
    -4.0.005 (2008-07-11)
    -	- Bug [2015715] "PHP Error/Warning" was fixed.
    -
    -4.0.004 (2008-07-09)
    -	- HTML cell internal padding was fixed.
    -
    -4.0.003 (2008-07-08)
    -	- Removed URL encoding when F option is selected on Output() function.
    -	- fixed some minor bugs in html tables.
    -
    -4.0.002 (2008-07-07)
    -	- Bug [2000861] was still unfixed and has been fixed.
    -
    -4.0.001 (2008-07-05)
    -	- Bug [2000861] was fixed.
    -
    -4.0.000 (2008-07-03)
    -	- THIS IS A MAIN RELEASE THAT INCLUDES SEVERAL NEW FEATURES AND BUGFIXES
    -	- Signature fo SetTextColor() and SetFillColor() functions was changed (parameter $storeprev was removed).
    -	- HTML support was completely rewritten and improved (see example 6).
    -	- Alignments parameters were fixed.
    -	- Functions GetArrStringWidth() and GetStringWidth() now include font parameters.
    -	- Fonts support was improved.
    -	- All core fonts were replaced and moved to fonts/ directory.
    -	- The following functions were added: getMargins(), getFontSize(), getFontSizePt().
    -	- File config/tcpdf_config_old.php was renamed tcpdf_config_alt.php and updated.
    -	- Multicell and WriteHTMLCell fill function was fixed.
    -	- Several minor bugs were fixed.
    -	- barcodes.php was updated.
    -	- All examples were updated.
    -
    -------------------------------------------------------------
    -
    -3.1.001 (2008-06-13)
    -	- Bug [1992515] "K_PATH_FONTS default value wrong" was fixed.
    -	- Vera font was removed, DejaVu font and Free fonts were updated.
    -	- Image handling was improved.
    -	- All examples were updated.
    -
    -3.1.000 (2008-06-11)
    -	- setPDFVersion() was added to change the default PDF version (currently 1.7).
    -	- setViewerPreferences() was added to control the way the document is to be presented on the screen or printed (see example 29).
    -	- SetDisplayMode() signature was changed (new options were added).
    -	- LinearGradient(), RadialGradient(), CoonsPatchMesh() functions were added to print various color gradients (see example 30).
    -	- PieSector() function was added to render render pie charts (see example 31).
    -	- ImageEps() was added to display EPS and AI images with limited support (see example 32).
    -	- writeBarcode() function is now depracated, a new write1DBarcode() function was added. The barcode directory was removed and a new barcodes.php file was added.
    -	- The new write1DBarcode() function support more barcodes and do not need the GD library (see example 027). All barcodes are directly written to PDF using graphic functions.
    -	- HTML lists were improved and could be nested (you may now represent trees).
    -	- AddFont() bug was fixed.
    -	- _putfonts() bug was fixed.
    -	- graphics functions were fixed.
    -	- unicode_data.php file was updated (fixed).
    -	- almohanad font was updated.
    -	- example 18 was updated (Farsi and Arabic languages).
    -	- source code cleanup.
    -	- All examples were updated and new examples were added.
    -
    -3.0.015 (2008-06-06)
    -	- AddPage() function signature is changed to include page format.
    -	- example 28 was added to show page format changes.
    -	- setPageUnit() function was added to change the page units of measure.
    -	- setPageFormat() function was added to change the page format and orientation between pages.
    -	- setPageOrientation() function was added to change the page orientation.
    -	- Arabic font shaping was fixed for laa letter and square boxes (see the example 18).
    -
    -3.0.014 (2008-06-04)
    -	- Arabic font shaping was fixed.
    -	- setDefaultTableColumns() function was added.
    -	- $cell_height_ratio variable was added.
    -	- setCellHeightRatio() function was added to define the default height of cell repect font height.
    -
    -3.0.013 (2008-06-03)
    -	- Multicell height parameter was fixed.
    -	- Arabic font shaping was improved.
    -	- unicode_data.php was updated.
    -
    -3.0.012 (2008-05-30)
    -	- K_PATH_MAIN and K_PATH_URL constants are now automatically set on config file.
    -	- DOCUMENT_ROOT constant was fixed for IIS Webserver (config file was updated).
    -	- Arabic font shaping was improved.
    -	- TranslateY() function was fixed (bug [1977962]).
    -	- setVisibility() function was fixed.
    -	- writeBarcode() function was fixed to scale using $xref parameter.
    -	- All examples were updated.
    -
    -3.0.011 (2008-05-23)
    -	- CMYK color support was added to all graphic functions.
    -	- HTML table support was improved:
    -	  -- now it's possible to include additional html tags inside a cell;
    -	  -- colspan attribute was added.
    -	- example 006 was updated.
    -
    -3.0.010 (2008-05-21)
    -	- fixed $laa_array inclusion on utf8Bidi() function.
    -
    -3.0.009 (2008-05-20)
    -	- unicode_data.php was updated.
    -	- Arabic laa letter problem was fixed.
    -
    -3.0.008 (2008-05-12)
    -	- Arabic support was fixed and improved (unicode_data.php was updated).
    -	- Polycurve() function was added to draw a poly-Bezier curve.
    -	- list items alignment was fixed.
    -	- example 6 was updated.
    -
    -3.0.007 (2008-05-06)
    -	- Arabic support was fixed and improved.
    -	- AlMohanad (arabic) font was added.
    -	- C128 barcode bugs were fixed.
    -
    -3.0.006 (2008-04-21)
    -	- Condition to check negative width values was added.
    -
    -3.0.005 (2008-04-18)
    -	- back-Slash character escape was fixed on writeHTML() function.
    -	- Exampe 6 was updated.
    -
    -3.0.004 (2008-04-11)
    -	- Bug [1939304] (Right to Left Issue) was fixed.
    -
    -3.0.003 (2008-04-07)
    -	- Bug [1934523](Words between HTML tags in cell not kept on one line) was fixed.
    -	- "face" attribute of "font" tag is now fully supported.
    -
    -3.0.002 (2008-04-01)
    -	- Write() functions now return the number of cells and not the number of lines.
    -	- TCPDF is released under LGPL 2.1, or any later version.
    -
    -3.0.001 (2008-05-28)
    -	- _legacyparsejpeg() and _legacyparsepng() were renamed _parsejpeg() and _parsepng().
    -	- function writeBarcode() was fixed.
    -	- all examples were updated.
    -	- example 27 was added to show various barcodes.
    -
    -3.0.000 (2008-03-27)
    -	- private function pixelsToMillimeters() was changed to public function pixelsToUnits() to fix html image size bug.
    -	- Image-related functions were rewritten.
    -	- resize parameter was added to Image() signature to reduce the image size and fit width and height (see example 9).
    -	- TCPDF now supports all images supported by GD library: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM.
    -	- CMYK support was added to SetDrawColor(), SetFillColor(), SetTextColor() (see example 22).
    -	- Page Groups were added (see example 23).
    -	- setVisibility() function was added to restrict the rendering of some elements to screen or printout (see example 24).
    -	- All private variables and functions were changed to protected.
    -	- setAlpha() function was added to give transparency support for all objects (see example 25).
    -	- Clipping and stroke modes were added to Text() function (see example 26).
    -	- All examples were moved to "examples" directory.
    -	- function setJPEGQuality() was added to set the JPEG image comrpession (see example 9).
    -
    -2.9.000 (2008-03-26)
    -	- htmlcolors.php file was added to include html colors.
    -	- Support for HTML color names and three-digit hexadecimal color codes was added.
    -	- private function convertColorHexToDec() was renamed convertHTMLColorToDec().
    -	- color and bgcolor attributes are now supported on all HTML tags (color nesting is also supported).
    -	- Write() function were fixed.
    -	- example_006.php was updated.
    -	- private function setUserRights() was added to release user rights on Acrobat Reader (this allows to display forms, see example 14)
    -
    -2.8.000 (2008-03-20)
    -	- Private variables were changed to protected.
    -	- Function Write() was fixed and improved.
    -	- Support for dl, dt, dd, del HTML tags was introduced.
    -	- Line-trought mode was added for HTML and text.
    -	- Text vertical alignment on cells were fixed.
    -	- Examples were updated to reflect changes.
    -
    -2.7.002 (2008-03-13)
    -	- Bug "[1912142] Encrypted PDF created/modified date" was fixed.
    -
    -2.7.001 (2008-03-10)
    -	- Cell justification was fixed for non-unicode mode.
    -
    -2.7.000 (2008-03-09)
    -	- Cell() stretching mode 4 (forced character spacing) was fixed.
    -	- writeHTMLCell() now uses Multicell() to write.
    -	- Multicell() has a new parameter $ishtml to act as writeHTMLCell().
    -	- Write() speed was improved for non-arabic strings.
    -	- Example n. 20 was changed.
    -
    -2.6.000 (2008-03-07)
    -	- various alignments bugs were fixed.
    -
    -2.5.000 (2008-03-07)
    -	- Several bugs were fixed.
    -	- example_019.php was added to test non-unicode mode using old fonts.
    -
    -2.4.000 (2008-03-06)
    -	- RTL support was deeply improved.
    -	- GetStringWidth() was fixed to support RTL languages.
    -	- Text() RTL alignment was fixed.
    -	- Some functions were added: GetArrStringWidth(), GetCharWidth(), uniord(), utf8Bidi().
    -	- example_018.php was added and test_unicode.php was removed.
    -
    -2.3.000 (2008-03-05)
    -	- MultiCell() signature is changed. Now support multiple columns across pages (see example_017).
    -	- Write() signature is changed. Now support the cell mode to be used with MultiCell.
    -	- Header() and Footer() were changed.
    -	- The following functions were added: UTF8ArrSubString() and unichr().
    -	- Examples were updated to reflect last changes.
    -
    -2.2.004 (2008-03-04)
    -	- Several examples were added.
    -	- AddPage() Header() and Footer() were fixed.
    -	- Documentation is now available on http://www.tcpdf.org
    -
    -2.2.003 (2008-03-03)
    -	- [1894853] Performance of MultiCell() was improved.
    -	- RadioButton and ListBox functions were added.
    -	- javascript form functions were rewritten and properties names are changed. The properties function supported by form fields are listed on Possible values are listed on http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf.
    -
    -2.2.002 (2008-02-28)
    -	- [1900495] html images path was fixed.
    -	- Legacy image functions were reintroduced to allow PNG and JPEG support without GD library.
    -
    -2.2.001 (2008-02-16)
    -	- The bug "[1894700] bug with replace relative path" was fixed
    -	- Justification was fixed
    -
    -2.2.000 (2008-02-12)
    -	- fixed javascript bug introduced with latest release
    -
    -2.1.002 (2008-02-12)
    -	- Justify function was fixed on PHP4 version.
    -	- Bookmank function was added ([1578250] Table of contents).
    -	- Javascript and Form fields support was added ([1796359] Form fields).
    -
    -2.1.001 (2008-02-10)
    -	- The bug "[1885776] Race Condition in function justitfy" was fixed.
    -	- The bug "[1890217] xpdf complains that pdf is incorrect" was fixed.
    -
    -2.1.000 (2008-01-07)
    -	- FPDF_FONTPATH constant was changed to K_PATH_FONTS on config file
    -	- Bidirectional Algorithm to correctly reverse bidirectional languages was added.
    -	- SetLeftMargin, SetTopMargin, SetRightMargin functions were fixed.
    -	- SetCellPadding function was added.
    -	- writeHTML was updated with new parameters.
    -	- Text function was fixed.
    -	- MultiCell function was fixed, now works also across multiple pages.
    -	- Line width was fixed on Header and Footer functions and 
    tag. - - "GetImageSize" was renamed "getimagesize". - - Document version was changed from 1.3 to 1.5. - - _begindoc() function was fixed. - - ChangeDate was fixed and ModDate was added. - - The following functions were added: - setPage() : Move pointer to the specified document page. - getPage() : Get current document page number. - lastpage() : Reset pointer to the last document page. - getNumPages() : Get the total number of inserted pages. - GetNumChars() : count the number of (UTF-8) characters in a string. - - $stretch parameter was added to Cell() function to fit text on cell: - 0 = disabled - 1 = horizontal scaling only if necessary - 2 = forced horizontal scaling - 3 = character spacing only if necessary - 4 = forced character spacing - - Line function was fixed for RTL. - - Graphic transformation functions were added [1811158]: - StartTransform() - StopTransform() - ScaleX() - ScaleY() - ScaleXY() - Scale() - MirrorH() - MirrorV() - MirrorP() - MirrorL() - TranslateX() - TranslateY() - Translate() - Rotate() - SkewX() - SkewY() - Skew() - - Graphic function were added/updated [1688549]: - SetLineStyle() - _outPoint() - _outLine() - _outRect() - _outCurve() - Line() - Rect() - Curve - Ellipse - Circle - Polygon - RegularPolygon - -2.0.000 (2008-01-04) - - RTL (Right-To-Left) languages support was added. Language direction is set using the $l['a_meta_dir'] setting on /configure/language/xxx.php language files. - - setRTL($enable) method was added to manually enable/disable the RTL text direction. - - The attribute "dir" was added to support custom text direction on HTML tags. Possible values are: ltr - for Left-To-Right and RTL for Right-To-Left. - - RC4 40bit encryption was added. Check the SetProtection method. - - [1815213] Improved image support for GIF, JPEG, PNG formats. - - [1800094] Attribute "value" was added to ordered list items
  • . - - Image function now has a new "align" parameter that indicates the alignment of the pointer next to image insertion and relative to image height. The value can be: - T: top-right for LTR or top-left for RTL - M: middle-right for LTR or middle-left for RTL - B: bottom-right for LTR or bottom-left for RTL - N: next line - - Attribute "align" was added to html tag to set the above image "align" parameter. Possible values are: - top: top-right for LTR or top-left for RTL - middle: middle-right for LTR or middle-left for RTL - bottom: bottom-right for LTR or bottom-left for RTL - - [1798103] newline was added after , and

    tages. - - [1816393] Documentation was updated. - - 'ln' parameter was fixed on writeHTMLCell. Now it's possible to print two or more columns across several pages; - - The method lastPage() was added to move the pointer on the last page; - ------------------------------------------------------------- - -1.53.0.TC034 (2007-07-30) - - fixed htmlentities conversion. - - MultiCell() function returns the number of cells. - -1.53.0.TC033 (2007-07-30) - - fixed bug 1762550: case sensitive for font files - - NOTE: all fonts files names must be in lowercase! - -1.53.0.TC032 (2007-07-27) - - setLastH method was added to resolve bug 1689071. - - all fonts names were converted in lowercase (bug 1713005). - - bug 1740954 was fixed. - - justification was added as Cell option. - -1.53.0.TC031 (2007-03-20) - - ToUnicode CMap were added on _puttruetypeunicode function. Now you may search and copy unicode text. - -1.53.0.TC030 (2007-03-06) - - fixed bug on PHP4 version. - -1.53.0.TC029 (2007-03-06) - - DejaVu Fonts were added. - -1.53.0.TC028 (2007-03-03) - - MultiCell function signature were changed: the $ln parameter were added. Check documentation for further information. - - Greek language were added on example sentences. - - setPrintHeader() and setPrintFooter() functions were added to enable or disable page header and footer. - -1.53.0.TC027 (2006-12-14) - - $attr['face'] bug were fixed. - - K_TCPDF_EXTERNAL_CONFIG control where introduced on /config/tcpdf_config.php to use external configuration files. - -1.53.0.TC026 (2006-10-28) - - writeHTML function call were fixed on examples. - -1.53.0.TC025 (2006-10-27) - - Bugs item #1421290 were fixed (0D - 0A substitution in some characters) - - Bugs item #1573174 were fixed (MultiCell documentation) - -1.53.0.TC024 (2006-09-26) - - getPageHeight() function were fixed (bug 1543476). - - fixed missing breaks on closedHTMLTagHandler function (bug 1535263). - - fixed extra spaces on Write function (bug 1535262). - -1.53.0.TC023 (2006-08-04) - - paths to barcode directory were fixed. - - documentation were updated. - -1.53.0.TC022 (2006-07-16) - - fixed bug: [ 1516858 ] Probs with PHP autoloader and class_exists() - -1.53.0.TC021 (2006-07-01) - - HTML attributes with whitespaces are now supported (thanks to Nelson Benitez for his support) - -1.53.0.TC020 (2006-06-23) - - code cleanup - -1.53.0.TC019 (2006-05-21) - - fixed and closing tags - -1.53.0.TC018 (2006-05-18) - - fixed font names bug - -1.53.0.TC017 (2006-05-18) - - the TTF2UFM utility to convert True Type fonts for TCPDF were included on fonts folder. - - new free unicode fonts were included on /fonts/freefont. - - test_unicode.php example were exended. - - parameter $fill were added on Write, writeHTML and writeHTMLCell functions. - - documentation were updated. - -1.53.0.TC016 (2006-03-09) - - fixed closing tag on html parser. - -1.53.0.TC016 (2005-08-28) - - fpdf.php and tcpdf.php files were joined in one single class (you can still extend TCPDF with your own class). - - fixed problem when mb_internal_encoding is set. - -1.53.0.TC014 (2005-05-29) - - fixed WriteHTMLCell new page issue. - -1.53.0.TC013 (2005-05-29) - - fixed WriteHTMLCell across pages. - -1.53.0.TC012 (2005-05-29) - - font color attribute bug were fixed. - -1.53.0.TC011 (2005-03-31) - - SetFont function were fixed (thank Sjaak Lauwers for bug notice). - -1.53.0.TC010 (2005-03-22) - - the html functions were improved (thanks to Manfred Vervuert for bug reporting). - -1.53.0.TC009 (2005-03-19) - - a wrong reference to convertColorHexToDec were fixed. - -1.53.0.TC008 (2005-02-07) - - removed some extra bytes from PHP files. - -1.53.0.TC007 (2005-01-08) - - fill attribute were removed from writeHTMLCell method. - -1.53.0.TC006 (2005-01-08) - - the documentation were updated. - -1.53.0.TC005 (2005-01-05) - - Steven Wittens's unicode methods were removed. - - All unicode methods were rewritten from scratch. - - TCPDF is now licensed as LGPL. - -1.53.0.TC004 (2005-01-04) - - this changelog were added. - - removed commercial fonts for licensing issue. - - Bitstream Vera Fonts were added (http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html). - - Now the AddFont and SetFont functions returns the basic font if the styled version do not exist. - -EOF -------------------------------------------------------- diff --git a/lib/combodo/tcpdf/LICENSE.TXT b/lib/combodo/tcpdf/LICENSE.TXT deleted file mode 100644 index 49147d01a..000000000 --- a/lib/combodo/tcpdf/LICENSE.TXT +++ /dev/null @@ -1,860 +0,0 @@ -********************************************************************** -* TCPDF LICENSE -********************************************************************** - - TCPDF is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - 2002-2019 Nicola Asuni - Tecnick.com LTD - -********************************************************************** -********************************************************************** - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - -********************************************************************** -********************************************************************** - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - -********************************************************************** -********************************************************************** diff --git a/lib/combodo/tcpdf/README.md b/lib/combodo/tcpdf/README.md deleted file mode 100644 index 0fb94009b..000000000 --- a/lib/combodo/tcpdf/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# TCPDF -*PHP PDF Library* - -[![Donate via PayPal](https://img.shields.io/badge/donate-paypal-87ceeb.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20TCPDF%20project) -*Please consider supporting this project by making a donation via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20TCPDF%20project)* - -* **category** Library -* **author** Nicola Asuni -* **copyright** 2002-2021 Nicola Asuni - Tecnick.com LTD -* **license** http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) -* **link** http://www.tcpdf.org -* **source** https://github.com/tecnickcom/TCPDF - - -## IMPORTANT -A new version of this library is under development at https://github.com/tecnickcom/tc-lib-pdf and as a consequence this version will not receive any additional development or support. -This version should be considered obsolete, new projects should use the new version as soon it will become stable. - - - -## Description - -PHP library for generating PDF documents on-the-fly. - -### Main Features: -* no external libraries are required for the basic functions; -* all standard page formats, custom page formats, custom margins and units of measure; -* UTF-8 Unicode and Right-To-Left languages; -* TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts; -* font subsetting; -* methods to publish some XHTML + CSS code, Javascript and Forms; -* images, graphic (geometric figures) and transformation methods; -* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/script/formats.php) -* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417; -* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies; -* automatic page header and footer management; -* document encryption up to 256 bit and digital signature certifications; -* transactions to UNDO commands; -* PDF annotations, including links, text and file attachments; -* text rendering modes (fill, stroke and clipping); -* multiple columns mode; -* no-write page regions; -* bookmarks, named destinations and table of content; -* text hyphenation; -* text stretching and spacing (tracking); -* automatic page break, line break and text alignments including justification; -* automatic page numbering and page groups; -* move and delete pages; -* page compression (requires php-zlib extension); -* XOBject Templates; -* Layers and object visibility. -* PDF/A-1b support. - -### Third party fonts: - -This library may include third party font files released with different licenses. - -All the PHP files on the fonts directory are subject to the general TCPDF license (GNU-LGPLv3), -they do not contain any binary data but just a description of the general properties of a particular font. -These files can be also generated on the fly using the font utilities and TCPDF methods. - -All the original binary TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files). - -The binary files (.z) that begins with the prefix "free" have been extracted from the GNU FreeFont collection (GNU-GPLv3). -The binary files (.z) that begins with the prefix "pdfa" have been derived from the GNU FreeFont, so they are subject to the same license. -For the details of Copyright, License and other information, please check the files inside the directory fonts/freefont-20120503 -Link : http://www.gnu.org/software/freefont/ - -The binary files (.z) that begins with the prefix "dejavu" have been extracted from the DejaVu fonts 2.33 (Bitstream) collection. -For the details of Copyright, License and other information, please check the files inside the directory fonts/dejavu-fonts-ttf-2.33 -Link : http://dejavu-fonts.org - -The binary files (.z) that begins with the prefix "ae" have been extracted from the Arabeyes.org collection (GNU-GPLv2). -Link : http://projects.arabeyes.org/ - -### ICC profile: - -TCPDF includes the sRGB.icc profile from the icc-profiles-free Debian package: -https://packages.debian.org/source/stable/icc-profiles-free - - -## Developer(s) Contact - -* Nicola Asuni diff --git a/lib/combodo/tcpdf/VERSION b/lib/combodo/tcpdf/VERSION deleted file mode 100644 index 49df80bfe..000000000 --- a/lib/combodo/tcpdf/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.4.4 diff --git a/lib/combodo/tcpdf/composer.json b/lib/combodo/tcpdf/composer.json deleted file mode 100644 index b53dd6e7f..000000000 --- a/lib/combodo/tcpdf/composer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "combodo/tcpdf", - "replace": { - "tecnickcom/tcpdf": "self.version" - }, - "type": "library", - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "keywords": [ - "PDF", - "tcpdf", - "PDFD32000-2008", - "qrcode", - "datamatrix", - "pdf417", - "barcodes" - ], - "homepage": "https://github.com/combodo-itop-libs/TCPDF", - "version": "6.4.4", - "license": "LGPL-3.0-only", - "authors": [ - { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "role": "lead" - }, - { - "name": "Combodo", - "email": "contact@combodo.com" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "classmap": [ - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - } -} diff --git a/lib/combodo/tcpdf/config/tcpdf_config.php b/lib/combodo/tcpdf/config/tcpdf_config.php deleted file mode 100644 index 92317b121..000000000 --- a/lib/combodo/tcpdf/config/tcpdf_config.php +++ /dev/null @@ -1,227 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -//============================================================+ - -/** - * Configuration file for TCPDF. - * @author Nicola Asuni - * @package com.tecnick.tcpdf - * @version 4.9.005 - * @since 2004-10-27 - */ - -// IMPORTANT: -// If you define the constant K_TCPDF_EXTERNAL_CONFIG, all the following settings will be ignored. -// If you use the tcpdf_autoconfig.php, then you can overwrite some values here. - - -/** - * Installation path (/var/www/tcpdf/). - * By default it is automatically calculated but you can also set it as a fixed string to improve performances. - */ -//define ('K_PATH_MAIN', ''); - -/** - * URL path to tcpdf installation folder (http://localhost/tcpdf/). - * By default it is automatically set but you can also set it as a fixed string to improve performances. - */ -//define ('K_PATH_URL', ''); - -/** - * Path for PDF fonts. - * By default it is automatically set but you can also set it as a fixed string to improve performances. - */ -//define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/'); - -/** - * Default images directory. - * By default it is automatically set but you can also set it as a fixed string to improve performances. - */ -//define ('K_PATH_IMAGES', ''); - -/** - * Deafult image logo used be the default Header() method. - * Please set here your own logo or an empty string to disable it. - */ -//define ('PDF_HEADER_LOGO', ''); - -/** - * Header logo image width in user units. - */ -//define ('PDF_HEADER_LOGO_WIDTH', 0); - -/** - * Cache directory for temporary files (full path). - */ -//define ('K_PATH_CACHE', '/tmp/'); - -/** - * Generic name for a blank image. - */ -define ('K_BLANK_IMAGE', '_blank.png'); - -/** - * Page format. - */ -define ('PDF_PAGE_FORMAT', 'A4'); - -/** - * Page orientation (P=portrait, L=landscape). - */ -define ('PDF_PAGE_ORIENTATION', 'P'); - -/** - * Document creator. - */ -define ('PDF_CREATOR', 'TCPDF'); - -/** - * Document author. - */ -define ('PDF_AUTHOR', 'TCPDF'); - -/** - * Header title. - */ -define ('PDF_HEADER_TITLE', 'TCPDF Example'); - -/** - * Header description string. - */ -define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org"); - -/** - * Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]. - */ -define ('PDF_UNIT', 'mm'); - -/** - * Header margin. - */ -define ('PDF_MARGIN_HEADER', 5); - -/** - * Footer margin. - */ -define ('PDF_MARGIN_FOOTER', 10); - -/** - * Top margin. - */ -define ('PDF_MARGIN_TOP', 27); - -/** - * Bottom margin. - */ -define ('PDF_MARGIN_BOTTOM', 25); - -/** - * Left margin. - */ -define ('PDF_MARGIN_LEFT', 15); - -/** - * Right margin. - */ -define ('PDF_MARGIN_RIGHT', 15); - -/** - * Default main font name. - */ -define ('PDF_FONT_NAME_MAIN', 'helvetica'); - -/** - * Default main font size. - */ -define ('PDF_FONT_SIZE_MAIN', 10); - -/** - * Default data font name. - */ -define ('PDF_FONT_NAME_DATA', 'helvetica'); - -/** - * Default data font size. - */ -define ('PDF_FONT_SIZE_DATA', 8); - -/** - * Default monospaced font name. - */ -define ('PDF_FONT_MONOSPACED', 'courier'); - -/** - * Ratio used to adjust the conversion of pixels to user units. - */ -define ('PDF_IMAGE_SCALE_RATIO', 1.25); - -/** - * Magnification factor for titles. - */ -define('HEAD_MAGNIFICATION', 1.1); - -/** - * Height of cell respect font height. - */ -define('K_CELL_HEIGHT_RATIO', 1.25); - -/** - * Title magnification respect main font size. - */ -define('K_TITLE_MAGNIFICATION', 1.3); - -/** - * Reduction factor for small font. - */ -define('K_SMALL_RATIO', 2/3); - -/** - * Set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language. - */ -define('K_THAI_TOPCHARS', true); - -/** - * If true allows to call TCPDF methods using HTML syntax - * IMPORTANT: For security reason, disable this feature if you are printing user HTML content. - */ -define('K_TCPDF_CALLS_IN_HTML', false); - -/** - * If true and PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution. - */ -define('K_TCPDF_THROW_EXCEPTION_ERROR', false); - -/** - * Default timezone for datetime functions - */ -define('K_TIMEZONE', 'UTC'); - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/fonts/courier.php b/lib/combodo/tcpdf/fonts/courier.php deleted file mode 100644 index e935b6768..000000000 --- a/lib/combodo/tcpdf/fonts/courier.php +++ /dev/null @@ -1,12 +0,0 @@ -33,'FontBBox'=>'[-23 -250 715 805]','ItalicAngle'=>0,'Ascent'=>805,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>426,'StemV'=>51,'StemH'=>51,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600); -$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/courierb.php b/lib/combodo/tcpdf/fonts/courierb.php deleted file mode 100644 index acb01b0d6..000000000 --- a/lib/combodo/tcpdf/fonts/courierb.php +++ /dev/null @@ -1,12 +0,0 @@ -33,'FontBBox'=>'[-113 -250 749 801]','ItalicAngle'=>0,'Ascent'=>801,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>439,'StemV'=>106,'StemH'=>84,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600); -$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/courierbi.php b/lib/combodo/tcpdf/fonts/courierbi.php deleted file mode 100644 index 631c623e9..000000000 --- a/lib/combodo/tcpdf/fonts/courierbi.php +++ /dev/null @@ -1,12 +0,0 @@ -97,'FontBBox'=>'[-57 -250 869 801]','ItalicAngle'=>-12,'Ascent'=>801,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>439,'StemV'=>106,'StemH'=>84,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600); -$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/courieri.php b/lib/combodo/tcpdf/fonts/courieri.php deleted file mode 100644 index 5ae725d4a..000000000 --- a/lib/combodo/tcpdf/fonts/courieri.php +++ /dev/null @@ -1,12 +0,0 @@ -97,'FontBBox'=>'[-27 -250 849 805]','ItalicAngle'=>-12,'Ascent'=>805,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>426,'StemV'=>51,'StemH'=>51,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600); -$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusans.ctg.z b/lib/combodo/tcpdf/fonts/dejavusans.ctg.z deleted file mode 100644 index df25b6497..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusans.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusans.php b/lib/combodo/tcpdf/fonts/dejavusans.php deleted file mode 100644 index 72147beec..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusans.php +++ /dev/null @@ -1,16 +0,0 @@ -32,'FontBBox'=>'[-1021 -415 1681 1167]','ItalicAngle'=>0,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>34,'StemH'=>15,'AvgWidth'=>507,'MaxWidth'=>1735,'MissingWidth'=>600); -$cbbox=array(0=>array(50,-177,550,705),33=>array(151,0,250,729),34=>array(96,458,364,729),35=>array(77,0,761,718),36=>array(83,-147,553,760),37=>array(55,-14,895,742),38=>array(63,-14,749,742),39=>array(96,458,179,729),40=>array(86,-132,310,759),41=>array(80,-132,304,759),42=>array(30,286,470,742),43=>array(106,0,732,627),44=>array(77,-116,220,124),45=>array(49,234,312,314),46=>array(107,0,210,124),47=>array(0,-93,337,729),48=>array(66,-14,570,742),49=>array(110,0,544,729),50=>array(73,0,536,742),51=>array(76,-14,556,742),52=>array(49,0,580,729),53=>array(77,-14,549,729),54=>array(70,-14,573,742),55=>array(82,0,551,729),56=>array(68,-14,568,742),57=>array(63,-14,566,742),58=>array(117,0,220,517),59=>array(77,-116,220,517),60=>array(106,46,732,581),61=>array(106,172,732,454),62=>array(106,46,732,581),63=>array(72,0,461,742),64=>array(66,-174,930,704),65=>array(8,0,676,729),66=>array(98,0,615,729),67=>array(56,-14,644,742),68=>array(98,0,711,729),69=>array(98,0,568,729),70=>array(98,0,517,729),71=>array(56,-14,693,742),72=>array(98,0,654,729),73=>array(98,0,197,729),74=>array(-52,-200,197,729),75=>array(98,0,677,729),76=>array(98,0,552,729),77=>array(98,0,765,729),78=>array(98,0,650,729),79=>array(56,-14,731,742),80=>array(98,0,569,729),81=>array(56,-129,731,742),82=>array(98,0,666,729),83=>array(66,-14,579,742),84=>array(-3,0,614,729),85=>array(87,-14,645,729),86=>array(8,0,676,729),87=>array(33,0,956,729),88=>array(30,0,654,729),89=>array(-2,0,613,729),90=>array(45,0,640,729),91=>array(86,-132,293,760),92=>array(0,-93,337,729),93=>array(97,-132,304,760),94=>array(106,457,732,729),95=>array(-10,-236,510,-166),96=>array(83,617,317,800),97=>array(60,-14,522,560),98=>array(91,-14,580,760),99=>array(55,-14,488,560),100=>array(55,-14,544,760),101=>array(55,-14,562,560),102=>array(23,0,371,760),103=>array(55,-208,544,560),104=>array(91,0,549,760),105=>array(94,0,184,760),106=>array(-18,-208,184,760),107=>array(91,0,576,760),108=>array(94,0,184,760),109=>array(91,0,889,560),110=>array(91,0,549,560),111=>array(55,-14,557,560),112=>array(91,-208,580,560),113=>array(55,-208,544,560),114=>array(91,0,411,560),115=>array(54,-14,472,560),116=>array(27,0,368,702),117=>array(85,-14,543,560),118=>array(30,0,562,547),119=>array(42,0,776,547),120=>array(29,0,559,547),121=>array(30,-208,562,547),122=>array(43,0,482,547),123=>array(125,-163,511,760),124=>array(127,-236,210,764),125=>array(125,-163,511,760),126=>array(106,228,732,399),161=>array(151,0,250,729),162=>array(84,-153,517,699),163=>array(63,0,548,742),164=>array(46,40,592,587),165=>array(40,0,595,729),166=>array(127,-171,210,699),167=>array(45,-95,454,742),168=>array(105,659,395,758),169=>array(138,0,862,725),170=>array(56,229,404,742),171=>array(77,69,518,517),172=>array(106,140,732,421),173=>array(49,234,312,314),174=>array(138,0,862,725),175=>array(104,673,396,745),176=>array(95,432,405,742),177=>array(106,0,732,627),178=>array(46,326,338,742),179=>array(48,319,350,742),180=>array(181,616,415,800),181=>array(85,-208,612,547),182=>array(77,-96,528,729),183=>array(107,285,210,409),184=>array(142,-193,344,0),185=>array(67,326,346,734),186=>array(47,229,424,742),187=>array(94,69,535,517),188=>array(67,-14,937,742),189=>array(67,-14,906,742),190=>array(48,-14,937,742),191=>array(70,-14,459,729),192=>array(8,0,676,927),193=>array(8,0,676,927),194=>array(8,0,676,928),195=>array(8,0,676,921),196=>array(8,0,676,913),197=>array(8,0,676,928),198=>array(4,0,910,729),199=>array(56,-193,644,742),200=>array(98,0,568,927),201=>array(98,0,568,927),202=>array(98,0,568,928),203=>array(98,0,568,913),204=>array(29,0,216,927),205=>array(79,0,265,927),206=>array(-1,0,297,928),207=>array(3,0,293,913),208=>array(5,0,716,729),209=>array(98,0,650,921),210=>array(56,-14,731,927),211=>array(56,-14,731,927),212=>array(56,-14,731,928),213=>array(56,-14,731,921),214=>array(56,-14,731,913),215=>array(137,31,701,596),216=>array(50,-34,737,761),217=>array(87,-14,645,927),218=>array(87,-14,645,927),219=>array(87,-14,645,928),220=>array(87,-14,645,913),221=>array(-2,0,613,927),222=>array(98,0,569,729),223=>array(91,-14,584,760),224=>array(60,-14,522,800),225=>array(60,-14,522,800),226=>array(60,-14,522,800),227=>array(60,-14,522,777),228=>array(60,-14,522,758),229=>array(60,-14,522,878),230=>array(60,-14,929,560),231=>array(55,-193,488,560),232=>array(55,-14,562,800),233=>array(55,-14,562,800),234=>array(55,-14,562,800),235=>array(55,-14,562,758),236=>array(-28,0,206,800),237=>array(70,0,304,800),238=>array(-17,0,295,800),239=>array(-6,0,284,758),240=>array(55,-14,557,760),241=>array(91,0,549,777),242=>array(55,-14,557,800),243=>array(55,-14,557,800),244=>array(55,-14,557,800),245=>array(55,-14,557,777),246=>array(55,-14,557,758),247=>array(106,73,732,554),248=>array(35,-46,576,592),249=>array(85,-14,543,800),250=>array(85,-14,543,800),251=>array(85,-14,543,800),252=>array(85,-14,543,758),253=>array(30,-208,562,800),254=>array(91,-208,580,760),255=>array(30,-208,562,758),256=>array(8,0,676,899),257=>array(60,-14,522,745),258=>array(8,0,676,946),259=>array(60,-14,522,765),260=>array(8,-193,706,729),261=>array(60,-193,563,560),262=>array(56,-14,644,927),263=>array(55,-14,488,800),264=>array(56,-14,644,928),265=>array(55,-14,488,800),266=>array(56,-14,644,914),267=>array(55,-14,488,760),268=>array(56,-14,644,928),269=>array(55,-14,488,800),270=>array(98,0,711,928),271=>array(55,-14,732,760),272=>array(5,0,716,729),273=>array(55,-14,619,760),274=>array(98,0,568,900),275=>array(55,-14,562,745),276=>array(98,0,568,928),277=>array(55,-14,562,785),278=>array(98,0,568,914),279=>array(55,-14,562,760),280=>array(98,-193,569,729),281=>array(55,-193,562,560),282=>array(98,0,568,925),283=>array(55,-14,562,797),284=>array(56,-14,693,928),285=>array(55,-208,544,800),286=>array(56,-14,693,928),287=>array(55,-208,544,785),288=>array(56,-14,693,914),289=>array(55,-208,544,760),290=>array(56,-250,693,742),291=>array(55,-208,544,775),292=>array(98,0,654,928),293=>array(-13,0,549,928),294=>array(98,0,818,729),295=>array(59,0,578,760),296=>array(-14,0,309,921),297=>array(-22,0,300,777),298=>array(1,0,293,899),299=>array(-7,0,285,745),300=>array(-5,0,300,928),301=>array(-14,0,292,785),302=>array(86,-193,268,729),303=>array(73,-193,255,760),304=>array(98,0,198,914),305=>array(94,0,184,560),306=>array(98,-200,492,729),307=>array(94,-208,461,760),308=>array(-52,-200,296,928),309=>array(-18,-208,295,800),310=>array(98,-235,677,729),311=>array(91,-235,576,760),312=>array(91,0,576,547),313=>array(98,0,552,928),314=>array(94,0,286,928),315=>array(98,-235,552,729),316=>array(66,-235,209,760),317=>array(98,0,552,729),318=>array(94,0,375,760),319=>array(98,0,552,729),320=>array(94,0,314,760),321=>array(-7,0,557,729),322=>array(1,0,285,760),323=>array(98,0,650,928),324=>array(91,0,549,803),325=>array(98,-235,650,729),326=>array(91,-235,549,560),327=>array(98,0,650,921),328=>array(91,0,549,800),329=>array(100,0,715,729),330=>array(98,-208,637,742),331=>array(91,-208,549,560),332=>array(56,-14,731,899),333=>array(55,-14,557,745),334=>array(56,-14,731,928),335=>array(55,-14,557,785),336=>array(56,-14,731,927),337=>array(55,-14,557,800),338=>array(56,0,1006,729),339=>array(55,-14,970,560),340=>array(98,0,666,928),341=>array(91,0,447,803),342=>array(98,-235,666,729),343=>array(63,-235,411,560),344=>array(98,0,666,921),345=>array(91,0,419,800),346=>array(66,-14,579,928),347=>array(54,-14,472,803),348=>array(66,-14,579,928),349=>array(54,-14,472,800),350=>array(66,-193,579,742),351=>array(54,-193,472,560),352=>array(66,-14,579,928),353=>array(54,-14,472,800),354=>array(-3,-193,614,729),355=>array(27,-193,368,702),356=>array(-3,0,614,921),357=>array(27,0,374,813),358=>array(-3,0,614,729),359=>array(27,0,368,702),360=>array(87,-14,645,921),361=>array(85,-14,543,777),362=>array(87,-14,645,899),363=>array(85,-14,543,745),364=>array(87,-14,645,928),365=>array(85,-14,543,785),366=>array(87,-14,645,929),367=>array(85,-14,543,849),368=>array(87,-14,645,927),369=>array(85,-14,546,800),370=>array(87,-193,645,729),371=>array(85,-193,613,560),372=>array(33,0,956,932),373=>array(42,0,776,803),374=>array(-2,0,613,932),375=>array(30,-208,562,803),376=>array(-2,0,613,913),377=>array(45,0,640,928),378=>array(43,0,482,803),379=>array(45,0,640,914),380=>array(43,0,482,760),381=>array(45,0,640,928),382=>array(43,0,482,800),383=>array(23,0,371,760),384=>array(16,-14,580,760),385=>array(-51,0,664,729),386=>array(98,0,615,729),387=>array(91,-14,580,760),388=>array(0,0,615,729),389=>array(0,-14,580,760),390=>array(56,-14,644,742),391=>array(56,-14,794,924),392=>array(55,-14,600,760),393=>array(5,0,716,729),394=>array(-51,0,760,729),395=>array(98,0,615,729),396=>array(55,-14,544,760),397=>array(55,-208,557,548),398=>array(64,0,534,729),399=>array(57,-14,731,742),400=>array(80,-14,560,742),401=>array(-52,-200,517,729),402=>array(-63,-208,371,760),403=>array(56,-14,824,924),404=>array(4,-210,683,729),405=>array(91,0,910,760),406=>array(98,0,347,729),407=>array(5,0,290,729),408=>array(98,0,746,742),409=>array(90,0,576,760),410=>array(5,0,271,760),411=>array(30,0,562,760),412=>array(87,-14,894,729),413=>array(-52,-200,650,729),414=>array(91,-208,549,560),415=>array(56,-14,731,742),416=>array(50,-14,764,760),417=>array(58,-14,603,615),418=>array(56,-14,851,742),419=>array(55,-208,668,560),420=>array(-51,0,618,729),421=>array(90,-208,580,760),422=>array(98,-129,666,729),423=>array(56,-14,569,742),424=>array(49,-14,467,560),425=>array(98,0,568,729),426=>array(-132,-208,355,760),427=>array(27,-208,368,702),428=>array(12,0,614,729),429=>array(27,0,368,760),430=>array(-3,-200,614,729),431=>array(84,-4,796,760),432=>array(86,-14,676,615),433=>array(38,-14,726,724),434=>array(98,-15,683,729),435=>array(-2,0,742,742),436=>array(30,-208,730,560),437=>array(45,0,640,729),438=>array(43,0,482,547),439=>array(78,-31,621,729),440=>array(45,-31,588,729),441=>array(51,-213,531,547),442=>array(55,-208,488,547),443=>array(73,0,536,742),444=>array(45,-31,622,729),445=>array(51,-213,531,547),446=>array(43,-14,456,702),447=>array(91,-208,580,560),448=>array(98,-208,197,729),449=>array(98,-208,394,729),450=>array(10,-208,451,729),451=>array(98,0,197,729),452=>array(98,0,1352,928),453=>array(98,0,1211,800),454=>array(55,-14,1071,800),455=>array(98,-200,768,729),456=>array(98,-208,733,760),457=>array(94,-208,367,760),458=>array(98,-200,868,729),459=>array(98,-208,839,760),460=>array(91,-208,733,760),461=>array(8,0,676,928),462=>array(60,-14,522,800),463=>array(-1,0,297,928),464=>array(-16,0,296,800),465=>array(56,-14,731,928),466=>array(55,-14,557,800),467=>array(87,-14,645,928),468=>array(85,-14,543,800),469=>array(87,-14,645,1025),470=>array(85,-14,543,899),471=>array(87,-14,645,1044),472=>array(85,-14,543,892),473=>array(87,-14,645,1044),474=>array(85,-14,543,892),475=>array(87,-14,645,1047),476=>array(85,-14,543,892),477=>array(55,-14,562,560),478=>array(8,0,676,1025),479=>array(60,-14,522,899),480=>array(8,0,676,1025),481=>array(60,-14,522,869),482=>array(4,0,910,900),483=>array(60,-14,929,743),484=>array(56,-14,752,742),485=>array(55,-208,622,560),486=>array(56,-14,693,928),487=>array(55,-208,544,798),488=>array(98,0,677,928),489=>array(-11,0,576,928),490=>array(56,-193,731,742),491=>array(55,-193,557,560),492=>array(56,-193,731,899),493=>array(55,-193,557,745),494=>array(78,-31,621,928),495=>array(43,-213,523,800),496=>array(-18,-208,299,800),497=>array(98,0,1352,729),498=>array(98,0,1211,729),499=>array(55,-14,1071,760),500=>array(56,-14,693,928),501=>array(55,-208,544,798),502=>array(98,-14,1022,729),503=>array(98,-208,626,742),504=>array(98,0,650,927),505=>array(91,0,549,799),506=>array(8,0,676,931),507=>array(60,-14,607,931),508=>array(4,0,910,928),509=>array(60,-14,929,798),510=>array(50,-34,737,928),511=>array(35,-46,576,798),512=>array(8,0,676,930),513=>array(60,-14,522,799),514=>array(8,0,676,901),515=>array(60,-14,522,785),516=>array(98,0,568,930),517=>array(55,-14,562,798),518=>array(98,0,568,901),519=>array(55,-14,562,785),520=>array(-43,0,306,930),521=>array(-30,0,313,798),522=>array(2,0,308,901),523=>array(-14,0,292,785),524=>array(56,-14,731,930),525=>array(55,-14,557,799),526=>array(56,-14,731,901),527=>array(55,-14,557,785),528=>array(97,0,666,930),529=>array(63,0,411,798),530=>array(98,0,666,901),531=>array(91,0,421,785),532=>array(87,-14,645,930),533=>array(85,-14,543,799),534=>array(87,-14,645,901),535=>array(85,-14,543,785),536=>array(66,-240,579,742),537=>array(54,-240,472,560),538=>array(-3,-240,614,729),539=>array(27,-240,368,702),540=>array(76,-210,556,742),541=>array(35,-211,467,560),542=>array(98,0,654,928),543=>array(-8,0,549,928),544=>array(98,-208,637,742),545=>array(55,-70,783,760),546=>array(55,-14,643,742),547=>array(55,-14,555,632),548=>array(45,-208,640,729),549=>array(43,-208,482,547),550=>array(8,0,676,914),551=>array(60,-14,522,760),552=>array(98,-193,568,729),553=>array(55,-193,562,560),554=>array(56,-14,731,1025),555=>array(55,-14,557,899),556=>array(56,-14,731,1025),557=>array(55,-14,557,864),558=>array(56,-14,731,914),559=>array(55,-14,557,760),560=>array(56,-14,731,1025),561=>array(55,-14,557,899),562=>array(-2,0,613,899),563=>array(30,-208,562,745),564=>array(67,-70,420,757),565=>array(91,-70,788,560),566=>array(27,-70,422,702),567=>array(-18,-208,184,547),568=>array(55,-14,943,760),569=>array(55,-208,943,560),570=>array(-1,-34,686,761),571=>array(6,-34,692,761),572=>array(4,-46,545,592),573=>array(5,0,552,729),574=>array(-38,-34,649,761),575=>array(54,-242,512,560),576=>array(43,-242,525,547),577=>array(39,0,569,729),578=>array(39,0,445,560),579=>array(5,0,615,729),580=>array(6,-14,726,729),581=>array(8,0,676,729),582=>array(98,-93,568,822),583=>array(55,-93,562,640),584=>array(-52,-200,290,729),585=>array(-18,-208,264,760),586=>array(56,-200,836,743),587=>array(55,-208,656,560),588=>array(5,0,666,729),589=>array(7,0,411,560),590=>array(-5,0,615,729),591=>array(5,-208,588,547),592=>array(85,-14,547,560),593=>array(55,-14,544,560),594=>array(91,-14,580,560),595=>array(91,-14,580,760),596=>array(62,-14,495,560),597=>array(55,-69,488,560),598=>array(55,-208,656,760),599=>array(55,-14,715,760),600=>array(55,-14,562,560),601=>array(55,-14,562,560),602=>array(61,-14,814,560),603=>array(65,-14,473,561),604=>array(65,-14,473,561),605=>array(65,-14,771,561),606=>array(55,-14,596,561),607=>array(-18,-208,264,547),608=>array(55,-208,715,760),609=>array(55,-208,544,547),610=>array(55,-14,539,560),611=>array(47,-210,549,547),612=>array(47,-14,549,547),613=>array(85,-208,543,547),614=>array(91,0,549,760),615=>array(91,-208,549,760),616=>array(7,0,265,760),617=>array(81,0,304,547),618=>array(57,0,314,547),619=>array(37,0,359,760),620=>array(38,0,416,760),621=>array(94,-208,296,760),622=>array(94,-213,651,760),623=>array(91,-13,889,548),624=>array(91,-208,889,548),625=>array(91,-208,889,560),626=>array(-18,-208,552,560),627=>array(91,-208,661,560),628=>array(87,0,549,547),629=>array(55,-14,557,560),630=>array(55,0,768,547),631=>array(72,-18,655,561),632=>array(55,-208,602,760),633=>array(0,-13,320,547),634=>array(0,-13,320,755),635=>array(0,-208,433,547),636=>array(91,-207,411,560),637=>array(91,-208,411,560),638=>array(64,0,437,560),639=>array(57,0,437,560),640=>array(91,0,574,547),641=>array(91,0,574,547),642=>array(54,-208,472,560),643=>array(-19,-208,355,760),644=>array(-19,-208,355,760),645=>array(27,-208,401,549),646=>array(-132,-208,355,760),647=>array(27,-156,368,546),648=>array(27,-208,370,702),649=>array(0,-14,634,547),650=>array(55,-15,564,547),651=>array(94,0,545,548),652=>array(30,0,562,547),653=>array(42,0,776,547),654=>array(30,0,562,760),655=>array(50,0,552,547),656=>array(43,-208,593,547),657=>array(43,-54,482,547),658=>array(43,-213,523,547),659=>array(53,-213,553,547),660=>array(43,0,456,759),661=>array(43,0,456,759),662=>array(43,0,456,759),663=>array(43,-213,456,760),664=>array(56,-14,731,742),665=>array(91,0,530,547),666=>array(55,-14,596,561),667=>array(55,-14,724,760),668=>array(91,0,563,547),669=>array(-132,-208,272,760),670=>array(91,-213,576,547),671=>array(91,0,493,547),672=>array(55,-208,746,759),673=>array(43,0,456,759),674=>array(43,0,456,759),675=>array(55,-14,970,760),676=>array(55,-213,1014,760),677=>array(55,-54,970,760),678=>array(27,0,781,702),679=>array(27,-208,629,760),680=>array(27,-70,723,702),681=>array(23,-208,804,760),682=>array(94,0,657,760),683=>array(94,0,610,760),684=>array(26,-15,489,640),685=>array(26,84,489,640),686=>array(0,-214,570,760),687=>array(0,-208,683,760),688=>array(57,326,346,751),689=>array(57,326,346,751),690=>array(-11,209,116,751),691=>array(57,326,259,640),692=>array(35,319,236,632),693=>array(35,209,307,632),694=>array(16,326,320,632),695=>array(26,326,489,632),696=>array(19,209,354,632),697=>array(78,557,203,800),698=>array(78,557,384,800),699=>array(85,489,228,729),700=>array(87,499,230,729),701=>array(96,616,239,856),702=>array(57,492,191,760),703=>array(57,492,191,760),704=>array(57,326,317,751),705=>array(57,326,317,751),706=>array(130,524,370,836),707=>array(130,524,370,836),708=>array(94,561,406,800),709=>array(94,561,406,800),710=>array(94,616,406,800),711=>array(94,616,406,800),712=>array(104,488,171,759),713=>array(104,673,396,745),714=>array(181,616,415,800),715=>array(83,617,317,800),716=>array(104,-148,171,123),717=>array(104,-156,396,-84),718=>array(83,-236,317,-54),719=>array(181,-236,415,-53),720=>array(54,0,229,517),721=>array(54,356,229,517),722=>array(57,249,191,517),723=>array(57,249,191,517),724=>array(140,229,360,448),725=>array(140,229,360,448),726=>array(49,125,341,417),727=>array(49,234,269,307),728=>array(97,645,403,785),729=>array(200,658,300,758),730=>array(116,610,384,878),731=>array(162,-193,344,0),732=>array(89,639,411,777),733=>array(117,616,460,800),734=>array(-0,233,334,504),735=>array(117,616,383,800),736=>array(57,208,374,632),737=>array(60,326,116,751),738=>array(57,326,320,648),739=>array(57,326,391,632),740=>array(57,326,317,751),741=>array(104,0,389,668),742=>array(104,0,389,668),743=>array(104,0,389,668),744=>array(104,0,389,668),745=>array(104,0,389,668),748=>array(94,-260,406,-21),749=>array(104,610,396,808),750=>array(85,489,428,729),755=>array(116,-240,384,28),759=>array(89,-192,411,-55),768=>array(-418,560,-184,800),769=>array(-320,560,-86,800),770=>array(-406,560,-94,800),771=>array(-412,639,-90,777),772=>array(-394,673,-102,745),773=>array(-510,686,10,755),774=>array(-407,645,-101,785),775=>array(-296,560,-206,760),776=>array(-395,560,-105,758),777=>array(-348,618,-129,810),778=>array(-385,610,-117,878),779=>array(-381,616,-38,800),780=>array(-404,560,-92,800),781=>array(-283,615,-217,832),782=>array(-383,615,-117,832),783=>array(-455,616,-112,800),784=>array(-407,645,-101,917),785=>array(-407,645,-101,785),786=>array(-235,489,-92,645),787=>array(-305,595,-187,844),788=>array(-305,595,-187,844),789=>array(-66,575,66,759),790=>array(-418,-266,-184,-83),791=>array(-320,-267,-86,-83),792=>array(-357,-240,-221,-24),793=>array(-279,-240,-143,-24),794=>array(-208,690,31,930),795=>array(-133,427,60,609),796=>array(-313,-241,-208,-32),797=>array(-370,-240,-130,-87),798=>array(-370,-240,-130,-87),799=>array(-357,-240,-143,-24),800=>array(-370,-184,-130,-117),801=>array(-315,-208,-23,63),802=>array(-317,-208,-25,63),803=>array(-296,-183,-206,-69),804=>array(-396,-183,-106,-84),805=>array(-355,-241,-146,-32),806=>array(-323,-240,-180,-84),807=>array(-358,-193,-156,0),808=>array(-338,-193,-156,0),809=>array(-283,-240,-217,-47),810=>array(-383,-211,-114,-50),811=>array(-452,-222,-51,-82),812=>array(-404,-240,-92,-57),813=>array(-407,-240,-95,-57),814=>array(-407,-222,-101,-82),815=>array(-407,-224,-101,-83),816=>array(-412,-222,-90,-84),817=>array(-394,-156,-102,-84),818=>array(-510,-236,10,-166),819=>array(-510,-236,10,-9),820=>array(-557,240,-41,381),821=>array(-316,221,-59,301),822=>array(-634,221,-0,301),823=>array(-574,-46,-33,592),824=>array(-741,-34,-54,761),825=>array(-291,-241,-187,-32),826=>array(-382,-206,-113,-44),827=>array(-359,-240,-139,-21),828=>array(-452,-222,-51,-82),829=>array(-354,619,-138,834),830=>array(-247,595,-109,853),831=>array(-510,528,10,755),832=>array(-418,617,-184,800),833=>array(-320,616,-86,800),834=>array(-412,639,-90,777),835=>array(-305,595,-187,844),836=>array(-387,659,-77,978),837=>array(-278,-208,-171,-45),838=>array(-396,639,-104,786),839=>array(-360,-226,-140,-35),840=>array(-365,-240,-135,-47),841=>array(-360,-240,-140,-21),842=>array(-411,616,-89,800),843=>array(-411,567,-89,850),844=>array(-411,596,-89,820),845=>array(-452,-230,-48,-30),846=>array(-350,-240,-150,-45),849=>array(-316,610,-184,878),850=>array(-407,547,-101,855),851=>array(-354,-240,-138,-24),855=>array(-316,610,-184,878),856=>array(-103,658,-3,758),858=>array(-430,-241,-71,-32),860=>array(-445,-237,445,-60),861=>array(-445,802,445,979),862=>array(-445,855,445,927),863=>array(-445,-156,445,-84),864=>array(-354,756,354,894),865=>array(-445,752,445,929),866=>array(-442,-230,447,-30),880=>array(98,0,555,729),881=>array(94,0,477,547),882=>array(98,0,764,729),883=>array(98,0,549,729),884=>array(78,557,203,800),885=>array(78,-208,203,35),886=>array(98,0,650,729),887=>array(91,0,559,547),890=>array(214,-208,321,-45),891=>array(62,-14,495,560),892=>array(55,-14,488,560),893=>array(62,-14,495,560),894=>array(77,-116,220,517),900=>array(181,616,415,800),901=>array(105,659,415,978),902=>array(8,0,676,800),903=>array(107,285,210,409),904=>array(-12,0,682,800),905=>array(-6,0,765,800),906=>array(-9,0,311,800),908=>array(-7,-14,750,800),910=>array(-15,0,821,800),911=>array(-18,0,752,800),912=>array(2,0,313,978),913=>array(8,0,676,729),914=>array(98,0,615,729),915=>array(98,0,552,729),916=>array(8,0,676,729),917=>array(98,0,568,729),918=>array(45,0,640,729),919=>array(98,0,654,729),920=>array(56,-14,731,742),921=>array(98,0,197,729),922=>array(98,0,677,729),923=>array(8,0,676,729),924=>array(98,0,765,729),925=>array(98,0,650,729),926=>array(98,0,548,729),927=>array(56,-14,731,742),928=>array(98,0,654,729),929=>array(98,0,569,729),931=>array(98,0,568,729),932=>array(-3,0,614,729),933=>array(-2,0,613,729),934=>array(56,0,731,729),935=>array(30,0,654,729),936=>array(56,0,732,729),937=>array(38,0,726,738),938=>array(3,0,293,913),939=>array(-2,0,613,913),940=>array(55,-12,611,800),941=>array(65,-14,473,800),942=>array(91,-208,549,800),943=>array(81,0,324,800),944=>array(73,-14,521,978),945=>array(55,-12,611,559),946=>array(94,-208,566,766),947=>array(16,-208,562,547),948=>array(55,-14,557,742),949=>array(65,-14,473,561),950=>array(52,-210,496,760),951=>array(91,-208,549,560),952=>array(55,-11,557,768),953=>array(81,0,304,547),954=>array(93,0,565,547),955=>array(30,0,562,760),956=>array(85,-208,612,547),957=>array(36,0,512,547),958=>array(52,-210,500,760),959=>array(55,-14,557,560),960=>array(36,-19,574,547),961=>array(91,-208,580,560),962=>array(55,-210,488,560),963=>array(55,-14,604,547),964=>array(49,0,553,547),965=>array(73,-14,521,547),966=>array(55,-208,602,551),967=>array(29,-208,549,547),968=>array(55,-208,602,547),969=>array(66,-14,769,547),970=>array(2,0,311,758),971=>array(73,-14,521,758),972=>array(55,-14,557,800),973=>array(73,-14,521,800),974=>array(66,-14,769,800),975=>array(98,-208,677,729),976=>array(82,-11,538,768),977=>array(55,-11,557,768),978=>array(42,0,665,734),979=>array(-15,0,829,800),980=>array(42,0,665,913),981=>array(55,-208,602,760),982=>array(32,-14,803,547),983=>array(55,-206,600,550),984=>array(56,-207,731,742),985=>array(55,-208,557,560),986=>array(68,-210,583,729),987=>array(55,-210,540,547),988=>array(98,0,517,729),989=>array(-94,-208,409,760),990=>array(87,-2,604,729),991=>array(93,0,566,759),992=>array(56,-208,797,742),993=>array(58,-180,573,559),994=>array(56,-213,877,729),995=>array(66,-208,769,547),996=>array(56,-208,660,742),997=>array(55,-208,568,560),998=>array(98,-213,735,729),999=>array(22,-14,571,575),1000=>array(39,-208,630,745),1001=>array(49,-208,552,560),1002=>array(56,0,714,742),1003=>array(26,0,599,560),1004=>array(56,-14,643,758),1005=>array(55,-14,544,758),1006=>array(21,-208,589,729),1007=>array(27,-208,510,726),1008=>array(55,-7,600,550),1009=>array(91,-208,580,560),1010=>array(55,-14,488,560),1011=>array(-18,-208,184,760),1012=>array(56,-14,731,742),1013=>array(55,-14,480,560),1014=>array(96,-14,521,560),1015=>array(98,0,569,729),1016=>array(91,-208,580,760),1017=>array(56,-14,644,742),1018=>array(98,0,765,729),1019=>array(62,-208,587,547),1020=>array(42,-208,580,560),1021=>array(56,-14,644,742),1022=>array(56,-14,644,742),1023=>array(56,-14,644,742),1024=>array(98,0,568,927),1025=>array(98,0,568,913),1026=>array(-3,-200,709,729),1027=>array(98,0,552,927),1028=>array(56,-14,644,742),1029=>array(66,-14,579,742),1030=>array(98,0,197,729),1031=>array(3,0,293,913),1032=>array(-52,-200,197,729),1033=>array(41,0,1023,729),1034=>array(98,0,975,729),1035=>array(-3,0,709,729),1036=>array(98,0,690,927),1037=>array(98,0,650,927),1038=>array(17,0,592,928),1039=>array(98,-157,654,729),1040=>array(8,0,676,729),1041=>array(98,0,615,729),1042=>array(98,0,615,729),1043=>array(98,0,552,729),1044=>array(49,-157,732,729),1045=>array(98,0,568,729),1046=>array(20,0,1058,729),1047=>array(66,-14,575,742),1048=>array(98,0,650,729),1049=>array(98,0,650,928),1050=>array(98,0,690,729),1051=>array(41,0,653,729),1052=>array(98,0,765,729),1053=>array(98,0,654,729),1054=>array(56,-14,731,742),1055=>array(98,0,654,729),1056=>array(98,0,569,729),1057=>array(56,-14,644,742),1058=>array(-3,0,614,729),1059=>array(17,0,592,729),1060=>array(59,0,802,729),1061=>array(30,0,654,729),1062=>array(98,-157,737,729),1063=>array(85,0,587,729),1064=>array(98,0,971,729),1065=>array(98,-157,1054,729),1066=>array(29,0,762,729),1067=>array(98,0,784,729),1068=>array(98,0,615,729),1069=>array(54,-14,642,742),1070=>array(103,-14,1023,742),1071=>array(66,0,597,729),1072=>array(60,-14,522,560),1073=>array(55,-14,562,777),1074=>array(91,0,530,547),1075=>array(91,0,477,547),1076=>array(52,-138,639,547),1077=>array(55,-14,562,560),1078=>array(34,0,867,547),1079=>array(65,-14,473,561),1080=>array(91,0,559,547),1081=>array(91,0,559,760),1082=>array(91,0,571,547),1083=>array(37,0,556,547),1084=>array(91,0,664,547),1085=>array(91,0,563,547),1086=>array(55,-14,557,560),1087=>array(91,0,563,547),1088=>array(91,-208,580,560),1089=>array(55,-14,488,560),1090=>array(29,0,553,547),1091=>array(30,-208,562,547),1092=>array(55,-208,800,729),1093=>array(29,0,559,547),1094=>array(91,-138,635,547),1095=>array(73,0,500,547),1096=>array(91,0,824,547),1097=>array(91,-138,896,547),1098=>array(30,0,647,547),1099=>array(91,0,701,560),1100=>array(91,0,530,547),1101=>array(55,-14,488,560),1102=>array(94,-14,787,560),1103=>array(57,0,517,547),1104=>array(55,-14,562,802),1105=>array(55,-14,562,758),1106=>array(23,-208,570,760),1107=>array(91,0,480,803),1108=>array(55,-14,488,560),1109=>array(54,-14,472,560),1110=>array(94,0,184,760),1111=>array(-6,0,284,758),1112=>array(-18,-208,184,760),1113=>array(37,0,843,547),1114=>array(91,0,839,547),1115=>array(23,0,567,760),1116=>array(91,0,571,803),1117=>array(91,0,559,802),1118=>array(30,-208,562,760),1119=>array(91,-138,563,547),1120=>array(56,-14,877,729),1121=>array(66,-14,769,547),1122=>array(15,0,711,729),1123=>array(15,0,613,760),1124=>array(103,-14,888,742),1125=>array(94,-14,688,560),1126=>array(8,0,871,729),1127=>array(25,0,758,547),1128=>array(98,0,1135,729),1129=>array(94,0,977,547),1130=>array(56,0,731,729),1131=>array(52,0,560,547),1132=>array(98,0,971,729),1133=>array(94,0,772,547),1134=>array(56,-208,556,935),1135=>array(44,-193,473,753),1136=>array(8,0,844,729),1137=>array(24,-208,852,765),1138=>array(56,-14,731,742),1139=>array(55,-14,557,560),1140=>array(8,0,769,742),1141=>array(24,0,640,560),1142=>array(8,0,769,930),1143=>array(24,0,640,800),1144=>array(56,-208,962,742),1145=>array(55,-208,875,560),1146=>array(56,-14,897,742),1147=>array(55,-14,704,560),1148=>array(58,-14,1122,932),1149=>array(74,-14,954,758),1150=>array(56,-14,877,900),1151=>array(66,-14,769,734),1152=>array(56,-208,644,742),1153=>array(55,-208,488,560),1154=>array(29,-44,474,457),1155=>array(-519,608,-93,810),1156=>array(-372,645,4,788),1157=>array(-288,595,-169,797),1158=>array(-288,595,-169,797),1159=>array(-776,606,4,788),1160=>array(-1021,-180,409,922),1161=>array(-957,-280,345,1022),1162=>array(98,-208,748,928),1163=>array(94,-208,652,760),1164=>array(16,0,615,729),1165=>array(19,0,534,702),1166=>array(98,0,610,729),1167=>array(91,-208,580,560),1168=>array(98,0,552,878),1169=>array(91,0,477,700),1170=>array(35,0,617,729),1171=>array(27,0,542,547),1172=>array(98,-200,600,729),1173=>array(91,-208,505,547),1174=>array(20,-157,1071,729),1175=>array(34,-138,876,547),1176=>array(66,-193,575,742),1177=>array(65,-193,473,561),1178=>array(98,-157,713,729),1179=>array(91,-138,587,547),1180=>array(98,0,690,729),1181=>array(91,0,571,547),1182=>array(16,0,690,729),1183=>array(30,0,571,760),1184=>array(24,0,837,729),1185=>array(21,0,688,547),1186=>array(98,-157,752,729),1187=>array(94,-138,656,547),1188=>array(98,0,1009,729),1189=>array(94,0,862,547),1190=>array(98,-200,1057,729),1191=>array(94,-208,891,547),1192=>array(56,-14,871,743),1193=>array(55,-14,684,560),1194=>array(56,-193,644,742),1195=>array(55,-193,488,560),1196=>array(-3,-157,614,729),1197=>array(29,-138,553,547),1198=>array(-2,0,613,729),1199=>array(30,-208,562,547),1200=>array(-2,0,613,729),1201=>array(30,-208,562,547),1202=>array(30,-157,654,729),1203=>array(29,-138,559,547),1204=>array(-3,-157,910,729),1205=>array(2,-138,782,547),1206=>array(85,-157,686,729),1207=>array(73,-138,590,547),1208=>array(85,0,587,729),1209=>array(73,0,500,547),1210=>array(85,0,587,729),1211=>array(91,0,549,760),1212=>array(10,-14,885,742),1213=>array(7,-14,675,560),1214=>array(10,-184,885,742),1215=>array(7,-161,675,560),1216=>array(98,0,197,729),1217=>array(20,0,1058,928),1218=>array(34,0,867,785),1219=>array(98,-200,651,729),1220=>array(93,-208,566,547),1221=>array(26,-208,751,729),1222=>array(22,-208,646,547),1223=>array(98,-200,654,729),1224=>array(94,-208,566,547),1225=>array(98,-208,752,729),1226=>array(94,-208,656,547),1227=>array(85,-157,587,729),1228=>array(73,-138,500,547),1229=>array(98,-208,863,729),1230=>array(94,-208,750,547),1231=>array(94,0,184,760),1232=>array(8,0,676,946),1233=>array(60,-14,522,765),1234=>array(8,0,676,913),1235=>array(60,-14,522,758),1236=>array(4,0,910,729),1237=>array(60,-14,929,560),1238=>array(98,0,568,928),1239=>array(55,-14,562,785),1240=>array(57,-14,731,742),1241=>array(55,-14,562,560),1242=>array(57,-14,731,913),1243=>array(55,-14,562,758),1244=>array(20,0,1058,913),1245=>array(34,0,867,758),1246=>array(66,-14,575,913),1247=>array(65,-14,473,758),1248=>array(78,-31,621,729),1249=>array(43,-213,523,547),1250=>array(98,0,650,899),1251=>array(91,0,559,745),1252=>array(98,0,650,913),1253=>array(91,0,559,758),1254=>array(56,-14,731,913),1255=>array(55,-14,557,758),1256=>array(56,-14,731,742),1257=>array(55,-14,557,560),1258=>array(56,-14,731,913),1259=>array(55,-14,557,758),1260=>array(54,-14,642,913),1261=>array(55,-14,488,758),1262=>array(17,0,592,899),1263=>array(30,-208,562,745),1264=>array(17,0,592,913),1265=>array(30,-208,562,758),1266=>array(17,0,592,927),1267=>array(30,-208,562,800),1268=>array(85,0,587,913),1269=>array(73,0,500,758),1270=>array(98,-157,552,729),1271=>array(91,-138,477,547),1272=>array(98,0,784,913),1273=>array(91,0,701,758),1274=>array(35,-208,617,729),1275=>array(27,-208,542,547),1276=>array(30,-200,646,729),1277=>array(29,-208,549,547),1278=>array(30,0,654,729),1279=>array(29,0,559,547),1280=>array(71,0,588,729),1281=>array(55,0,495,547),1282=>array(71,-14,908,729),1283=>array(55,-14,806,547),1284=>array(98,-14,876,742),1285=>array(83,-14,784,561),1286=>array(98,-208,654,742),1287=>array(83,-208,564,561),1288=>array(26,-14,974,729),1289=>array(22,-14,866,547),1290=>array(98,-14,1022,729),1291=>array(94,-14,876,547),1292=>array(56,-14,692,742),1293=>array(55,-14,534,560),1294=>array(-3,-14,675,729),1295=>array(2,-14,620,547),1296=>array(80,-14,560,742),1297=>array(65,-14,473,561),1298=>array(41,-200,653,729),1299=>array(37,-208,556,547),1300=>array(41,0,1139,729),1301=>array(37,0,962,547),1302=>array(98,0,863,729),1303=>array(91,-208,832,560),1304=>array(66,0,967,729),1305=>array(57,-14,933,560),1306=>array(56,-129,731,742),1307=>array(55,-208,544,560),1308=>array(33,0,956,729),1309=>array(42,0,776,547),1310=>array(98,0,690,729),1311=>array(91,0,571,547),1312=>array(41,-200,1056,729),1313=>array(37,-208,881,547),1314=>array(98,-200,1057,729),1315=>array(91,-208,888,547),1316=>array(98,-157,752,729),1317=>array(91,-138,653,547),1329=>array(87,-29,680,729),1330=>array(87,0,650,743),1331=>array(45,0,729,743),1332=>array(44,0,724,743),1333=>array(87,-14,650,729),1334=>array(87,0,692,744),1335=>array(92,0,616,729),1336=>array(87,0,650,743),1337=>array(87,-14,835,743),1338=>array(45,-14,729,729),1339=>array(92,0,650,729),1340=>array(92,0,533,729),1341=>array(92,-14,849,729),1342=>array(129,-13,763,742),1343=>array(87,0,645,729),1344=>array(34,-26,638,729),1345=>array(82,-23,688,744),1346=>array(49,0,729,743),1347=>array(51,0,715,735),1348=>array(87,-14,767,729),1349=>array(71,-14,668,743),1350=>array(0,-14,680,729),1351=>array(78,-15,684,729),1352=>array(87,0,645,743),1353=>array(59,-28,664,744),1354=>array(44,0,713,743),1355=>array(82,0,686,744),1356=>array(87,0,767,743),1357=>array(87,-14,645,729),1358=>array(49,0,729,729),1359=>array(73,-14,632,741),1360=>array(87,0,645,743),1361=>array(78,-14,675,743),1362=>array(92,0,538,729),1363=>array(59,0,752,729),1364=>array(24,0,679,743),1365=>array(56,-14,731,742),1366=>array(54,-13,746,729),1369=>array(57,492,191,760),1370=>array(87,499,230,729),1371=>array(0,620,234,803),1372=>array(2,618,356,893),1373=>array(-0,617,233,800),1374=>array(4,613,401,866),1375=>array(44,618,462,760),1377=>array(85,-14,883,547),1378=>array(91,-208,549,560),1379=>array(55,-208,648,560),1380=>array(91,-208,653,560),1381=>array(85,-14,548,760),1382=>array(55,-208,648,560),1383=>array(91,0,490,760),1384=>array(91,-208,549,560),1385=>array(91,-208,738,560),1386=>array(55,-14,648,760),1387=>array(91,-208,549,760),1388=>array(91,-208,303,547),1389=>array(91,-208,889,760),1390=>array(55,-14,557,760),1391=>array(85,-208,543,760),1392=>array(91,0,549,760),1393=>array(52,-15,523,760),1394=>array(91,-208,653,560),1395=>array(68,-14,544,768),1396=>array(85,-14,647,760),1397=>array(-21,-208,181,547),1398=>array(-19,-14,543,760),1399=>array(0,-208,435,560),1400=>array(91,0,549,560),1401=>array(5,-208,370,547),1402=>array(85,-208,883,547),1403=>array(54,-208,494,561),1404=>array(91,0,609,560),1405=>array(85,-14,543,560),1406=>array(85,-208,647,760),1407=>array(85,-14,889,560),1408=>array(91,-208,549,560),1409=>array(54,-208,543,560),1410=>array(91,0,449,547),1411=>array(85,-208,889,760),1412=>array(20,-208,580,560),1413=>array(54,-14,556,560),1414=>array(34,-208,766,760),1415=>array(85,-14,812,760),1417=>array(117,0,220,415),1418=>array(49,212,312,314),1456=>array(283,-217,356,-22),1457=>array(83,-217,438,-22),1458=>array(125,-217,454,-22),1459=>array(125,-217,454,-22),1460=>array(283,-159,356,-85),1461=>array(222,-159,417,-85),1462=>array(222,-217,417,-22),1463=>array(173,-159,466,-85),1464=>array(173,-193,466,-46),1465=>array(0,625,73,698),1466=>array(0,625,73,698),1467=>array(148,-237,465,-17),1468=>array(288,237,361,310),1469=>array(283,-217,356,-22),1470=>array(49,472,312,552),1471=>array(173,625,466,698),1472=>array(102,-98,193,645),1473=>array(637,625,710,698),1474=>array(96,625,169,698),1475=>array(102,0,193,547),1478=>array(50,0,357,547),1479=>array(173,-217,466,-22),1488=>array(91,0,578,547),1489=>array(43,0,535,547),1490=>array(43,-5,383,547),1491=>array(43,0,511,547),1492=>array(91,0,563,547),1493=>array(91,0,182,547),1494=>array(43,0,303,547),1495=>array(91,0,563,547),1496=>array(90,-14,593,552),1497=>array(66,204,157,547),1498=>array(43,-208,446,547),1499=>array(43,0,474,547),1500=>array(43,0,492,729),1501=>array(91,0,573,547),1502=>array(43,0,588,555),1503=>array(91,-208,182,547),1504=>array(43,0,309,547),1505=>array(90,-14,593,547),1506=>array(43,-93,535,547),1507=>array(91,-208,549,547),1508=>array(91,0,569,547),1509=>array(43,-208,497,548),1510=>array(43,0,502,547),1511=>array(91,-208,633,546),1512=>array(43,0,474,547),1513=>array(43,0,666,547),1514=>array(10,-4,566,547),1520=>array(91,0,380,547),1521=>array(66,0,332,547),1522=>array(66,204,312,547),1523=>array(91,361,325,547),1524=>array(91,361,554,547),1542=>array(0,-20,607,892),1543=>array(0,-20,607,895),1545=>array(65,0,685,635),1546=>array(65,0,904,635),1548=>array(107,0,250,240),1557=>array(123,624,377,868),1563=>array(107,0,250,633),1567=>array(72,0,461,742),1569=>array(80,42,390,483),1570=>array(-37,0,315,939),1571=>array(53,0,220,999),1572=>array(-42,-244,406,588),1573=>array(53,-244,220,760),1574=>array(63,-131,719,588),1575=>array(94,0,184,760),1576=>array(63,-171,865,327),1577=>array(68,-28,453,513),1578=>array(63,-10,865,391),1579=>array(63,-10,865,513),1580=>array(77,-244,645,425),1581=>array(77,-244,645,425),1582=>array(77,-244,645,586),1583=>array(61,-19,388,415),1584=>array(61,-19,388,586),1585=>array(-42,-244,423,269),1586=>array(-42,-244,423,464),1587=>array(63,-244,1138,366),1588=>array(63,-244,1138,586),1589=>array(63,-244,1134,362),1590=>array(63,-244,1134,464),1591=>array(70,0,857,760),1592=>array(70,0,857,760),1593=>array(57,-244,587,521),1594=>array(57,-244,587,659),1600=>array(-10,0,303,90),1601=>array(63,-45,952,635),1602=>array(52,-215,701,635),1603=>array(70,-27,722,760),1604=>array(70,-152,637,760),1605=>array(68,-240,546,369),1606=>array(72,-162,660,464),1607=>array(68,-28,453,358),1608=>array(-42,-244,406,315),1609=>array(63,-131,719,411),1610=>array(63,-244,719,411),1611=>array(107,591,393,825),1612=>array(107,591,393,874),1613=>array(107,-239,393,-5),1614=>array(107,591,393,708),1615=>array(107,590,393,874),1616=>array(107,-137,393,-20),1617=>array(98,599,402,869),1618=>array(115,610,383,878),1619=>array(74,590,426,719),1620=>array(164,593,331,808),1621=>array(164,-244,331,-29),1623=>array(107,615,393,898),1626=>array(119,616,381,775),1632=>array(215,220,322,342),1633=>array(136,0,342,635),1634=>array(40,0,492,635),1635=>array(37,0,509,635),1636=>array(85,-10,457,641),1637=>array(66,-10,471,643),1638=>array(42,0,493,635),1639=>array(29,0,508,635),1640=>array(29,0,508,635),1641=>array(49,0,493,640),1642=>array(65,0,472,635),1643=>array(0,-110,300,318),1644=>array(87,499,230,729),1645=>array(42,101,502,537),1646=>array(63,-10,865,327),1647=>array(52,-215,701,481),1648=>array(223,602,277,887),1652=>array(60,649,227,864),1657=>array(63,-10,865,575),1658=>array(63,-10,865,513),1659=>array(63,-244,865,327),1660=>array(63,-180,865,391),1661=>array(63,-10,865,464),1662=>array(63,-244,865,327),1663=>array(63,-10,865,513),1664=>array(63,-244,865,327),1665=>array(77,-244,645,710),1666=>array(77,-244,645,708),1667=>array(77,-244,645,425),1668=>array(77,-244,645,425),1669=>array(77,-244,645,708),1670=>array(77,-244,645,425),1671=>array(77,-244,645,425),1672=>array(61,-19,388,746),1673=>array(61,-180,388,415),1674=>array(61,-171,388,415),1675=>array(61,-171,388,746),1676=>array(61,-19,388,586),1677=>array(61,-146,388,415),1678=>array(61,-19,388,708),1679=>array(61,-19,388,684),1680=>array(61,-19,388,708),1681=>array(-42,-244,469,648),1682=>array(-42,-244,473,556),1683=>array(-42,-244,507,269),1684=>array(-42,-244,474,269),1685=>array(-42,-244,634,269),1686=>array(-42,-244,474,269),1687=>array(-42,-244,439,464),1688=>array(-42,-244,439,586),1689=>array(-42,-244,439,586),1690=>array(63,-244,1138,464),1691=>array(63,-244,1138,366),1692=>array(63,-244,1138,586),1693=>array(63,-244,1134,362),1694=>array(63,-244,1134,586),1695=>array(70,0,857,760),1696=>array(57,-244,587,781),1697=>array(63,-45,952,481),1698=>array(63,-171,952,481),1699=>array(63,-171,952,635),1700=>array(63,-45,952,757),1701=>array(63,-293,952,481),1702=>array(63,-45,952,757),1703=>array(52,-215,701,635),1704=>array(52,-215,701,757),1705=>array(63,-43,895,760),1706=>array(63,-43,1000,760),1707=>array(63,-43,895,760),1708=>array(70,-27,722,760),1709=>array(70,-27,722,854),1710=>array(70,-293,722,760),1711=>array(63,-43,895,896),1712=>array(63,-43,895,896),1713=>array(63,-43,895,903),1714=>array(63,-171,895,896),1715=>array(63,-293,895,896),1716=>array(63,-43,895,1025),1717=>array(70,-152,723,971),1718=>array(70,-152,637,952),1719=>array(70,-152,684,1025),1720=>array(70,-391,637,760),1721=>array(72,-317,660,464),1722=>array(72,-162,660,366),1723=>array(72,-162,660,636),1724=>array(72,-330,660,464),1725=>array(72,-162,660,586),1726=>array(70,-33,638,487),1727=>array(77,-244,645,586),1734=>array(-42,-244,406,556),1740=>array(63,-131,719,411),1742=>array(63,-131,719,556),1749=>array(68,-28,453,358),1776=>array(215,220,322,342),1777=>array(136,0,342,635),1778=>array(40,0,492,635),1779=>array(37,0,509,635),1780=>array(40,0,471,643),1781=>array(52,-5,485,643),1782=>array(102,0,445,640),1783=>array(29,0,508,635),1784=>array(29,0,508,635),1785=>array(49,0,493,640),1984=>array(66,-14,570,742),1985=>array(110,0,544,729),1986=>array(110,0,530,729),1987=>array(110,0,530,729),1988=>array(110,0,530,729),1989=>array(110,0,530,729),1990=>array(110,0,530,729),1991=>array(104,0,532,729),1992=>array(104,0,532,729),1993=>array(77,0,560,741),1994=>array(94,0,184,729),1995=>array(55,-14,516,447),1996=>array(30,0,394,731),1997=>array(30,0,562,430),1998=>array(91,0,563,430),1999=>array(91,0,563,430),2000=>array(55,0,539,735),2001=>array(91,0,563,581),2002=>array(55,0,738,741),2003=>array(94,0,408,729),2004=>array(30,0,344,729),2005=>array(91,0,504,729),2006=>array(94,0,518,729),2007=>array(30,0,256,729),2008=>array(94,0,865,513),2009=>array(30,0,443,729),2010=>array(30,0,754,729),2011=>array(91,0,563,430),2012=>array(30,0,595,729),2013=>array(94,0,679,729),2014=>array(94,0,436,729),2015=>array(55,0,630,729),2016=>array(30,0,443,729),2017=>array(30,0,595,729),2018=>array(55,0,539,729),2019=>array(94,0,436,729),2020=>array(94,0,436,612),2021=>array(94,0,428,729),2022=>array(55,0,539,729),2023=>array(55,0,539,729),2027=>array(106,673,398,745),2028=>array(32,609,468,800),2029=>array(205,658,305,758),2030=>array(93,616,405,800),2031=>array(44,616,456,800),2032=>array(32,609,468,800),2033=>array(44,616,456,800),2034=>array(200,-184,300,-84),2035=>array(104,659,394,758),2036=>array(98,557,216,760),2037=>array(98,557,216,760),2040=>array(49,0,511,498),2041=>array(49,0,511,483),2042=>array(-10,0,371,72),3647=>array(86,-138,571,769),3713=>array(63,-10,607,560),3714=>array(68,-17,691,568),3716=>array(67,-10,619,568),3719=>array(53,-238,415,568),3720=>array(62,-0,574,575),3722=>array(68,-234,690,568),3725=>array(56,-8,619,573),3732=>array(91,-14,592,560),3733=>array(63,-15,564,579),3734=>array(0,-240,587,560),3735=>array(42,-8,599,571),3737=>array(46,-14,593,568),3738=>array(36,-8,556,561),3739=>array(36,-8,556,760),3740=>array(43,-8,725,614),3741=>array(91,-14,676,760),3742=>array(51,-8,636,561),3743=>array(51,-8,636,760),3745=>array(31,-14,636,547),3746=>array(56,-8,619,760),3747=>array(68,-8,634,568),3749=>array(39,-8,583,568),3751=>array(56,-13,558,560),3754=>array(39,-8,688,679),3755=>array(62,-12,762,575),3757=>array(56,-14,558,560),3758=>array(68,-8,684,605),3759=>array(99,-166,742,579),3760=>array(54,-13,589,563),3761=>array(-578,639,-43,880),3762=>array(60,0,473,560),3763=>array(-425,0,473,806),3764=>array(-594,615,-73,926),3765=>array(-594,615,0,926),3766=>array(-594,615,-73,926),3767=>array(-594,615,0,926),3768=>array(-376,-350,-161,-38),3769=>array(-418,-306,-152,-40),3771=>array(-578,639,-43,880),3772=>array(-611,-278,6,-39),3773=>array(63,-240,619,715),3776=>array(60,-14,324,560),3777=>array(60,-14,598,560),3778=>array(-22,-5,398,896),3779=>array(45,-14,490,892),3780=>array(92,-11,445,886),3782=>array(72,-232,574,557),3784=>array(-366,618,-278,792),3785=>array(-563,609,-45,891),3786=>array(-595,598,22,869),3787=>array(-462,609,-182,890),3788=>array(-611,636,6,875),3789=>array(-425,620,-220,806),3792=>array(66,-14,570,547),3793=>array(48,-75,582,576),3794=>array(48,-66,545,711),3795=>array(11,-9,692,830),3796=>array(48,-83,601,711),3797=>array(48,-83,601,711),3798=>array(43,-8,744,812),3799=>array(63,-240,607,560),3800=>array(73,-210,680,557),3801=>array(51,-4,621,571),3804=>array(62,-12,947,575),3805=>array(62,-12,973,575),4256=>array(59,-15,815,828),4257=>array(54,-0,704,828),4258=>array(54,-148,649,837),4259=>array(54,-15,781,828),4260=>array(49,0,552,837),4261=>array(39,0,714,837),4262=>array(29,-15,695,828),4263=>array(59,-15,885,837),4264=>array(29,0,390,874),4265=>array(59,0,561,828),4266=>array(29,-15,784,828),4267=>array(59,-15,824,828),4268=>array(63,0,566,828),4269=>array(49,-167,806,837),4270=>array(24,-15,717,837),4271=>array(39,0,566,828),4272=>array(54,-15,853,828),4273=>array(63,-15,567,828),4274=>array(63,-0,566,837),4275=>array(49,-182,806,837),4276=>array(49,0,817,834),4277=>array(44,0,680,828),4278=>array(64,-15,566,837),4279=>array(54,0,557,828),4280=>array(59,-15,562,828),4281=>array(63,0,566,828),4282=>array(59,-15,764,837),4283=>array(59,-15,810,828),4284=>array(63,-0,566,828),4285=>array(49,-15,574,837),4286=>array(63,-0,566,828),4287=>array(29,0,695,828),4288=>array(29,-15,785,828),4289=>array(63,0,566,828),4290=>array(54,-15,635,837),4291=>array(29,0,532,828),4292=>array(54,0,540,828),4293=>array(39,-15,699,837),4304=>array(49,-15,459,592),4305=>array(49,-14,469,837),4306=>array(44,-235,537,551),4307=>array(49,-230,759,547),4308=>array(49,-236,449,547),4309=>array(49,-236,459,547),4310=>array(20,-14,452,838),4311=>array(49,-14,752,547),4312=>array(49,0,469,547),4313=>array(44,-236,456,542),4314=>array(49,-230,1016,552),4315=>array(49,-15,459,837),4316=>array(63,-15,474,833),4317=>array(49,-0,737,547),4318=>array(49,-15,459,833),4319=>array(49,-236,458,551),4320=>array(49,0,747,833),4321=>array(63,-15,474,827),4322=>array(44,-236,610,680),4323=>array(5,-236,464,571),4324=>array(49,-236,766,547),4325=>array(49,-236,449,828),4326=>array(49,-230,737,546),4327=>array(49,-236,459,538),4328=>array(29,-15,454,837),4329=>array(63,0,474,837),4330=>array(44,-236,527,532),4331=>array(49,-14,458,828),4332=>array(64,-15,488,837),4333=>array(49,-236,471,827),4334=>array(63,-15,474,827),4335=>array(10,-235,444,572),4336=>array(49,-15,459,837),4337=>array(59,-15,469,837),4338=>array(49,-141,458,547),4339=>array(49,-236,459,546),4340=>array(49,-236,458,837),4341=>array(49,-15,515,837),4342=>array(49,-236,778,547),4343=>array(44,-236,508,547),4344=>array(49,-236,459,538),4345=>array(39,-236,532,551),4346=>array(49,-77,459,547),4347=>array(54,-10,394,484),4348=>array(49,420,270,837),5121=>array(8,1,676,730),5122=>array(8,0,676,1037),5123=>array(8,0,676,729),5124=>array(8,0,676,914),5125=>array(98,0,711,729),5126=>array(98,0,711,914),5127=>array(98,0,711,913),5129=>array(98,0,711,729),5130=>array(58,0,671,729),5131=>array(58,0,671,914),5132=>array(98,1,827,730),5133=>array(8,1,776,730),5134=>array(98,0,827,729),5135=>array(8,0,776,729),5136=>array(98,0,827,914),5137=>array(8,0,776,914),5138=>array(98,0,909,729),5139=>array(98,0,909,729),5140=>array(98,0,909,914),5141=>array(98,0,909,914),5142=>array(98,0,711,914),5143=>array(98,0,869,729),5144=>array(58,0,909,729),5145=>array(98,0,869,914),5146=>array(58,0,909,914),5147=>array(58,0,671,914),5149=>array(98,629,198,729),5150=>array(67,326,488,734),5151=>array(46,356,362,714),5152=>array(46,356,362,714),5153=>array(67,398,334,674),5154=>array(67,391,334,667),5155=>array(67,398,338,667),5156=>array(67,398,334,667),5157=>array(35,327,405,733),5158=>array(67,326,331,734),5159=>array(98,312,198,412),5160=>array(67,503,334,563),5161=>array(67,399,334,667),5162=>array(67,399,334,691),5163=>array(8,1,1028,730),5164=>array(8,0,847,729),5165=>array(98,0,892,729),5166=>array(58,0,1055,729),5167=>array(8,0,676,729),5168=>array(8,0,676,1037),5169=>array(8,0,676,729),5170=>array(8,0,676,914),5171=>array(58,0,671,729),5172=>array(58,0,671,914),5173=>array(58,0,671,913),5175=>array(58,0,671,729),5176=>array(58,0,671,729),5177=>array(58,0,671,914),5178=>array(98,0,827,729),5179=>array(8,0,776,729),5180=>array(98,0,827,729),5181=>array(8,0,776,729),5182=>array(98,0,827,914),5183=>array(8,0,776,914),5184=>array(98,0,869,729),5185=>array(58,0,909,729),5186=>array(98,0,869,914),5187=>array(58,0,909,914),5188=>array(98,0,869,729),5189=>array(58,0,909,729),5190=>array(98,0,869,914),5191=>array(58,0,909,914),5192=>array(58,0,671,913),5193=>array(67,326,453,734),5194=>array(67,326,137,734),5196=>array(87,-14,645,729),5197=>array(87,0,645,1037),5198=>array(87,0,645,743),5199=>array(87,0,645,914),5200=>array(58,0,671,729),5201=>array(58,0,671,914),5202=>array(58,0,671,913),5204=>array(58,0,671,729),5205=>array(59,0,672,729),5206=>array(59,0,672,914),5207=>array(98,-14,834,729),5208=>array(87,-14,831,729),5209=>array(98,0,834,743),5210=>array(87,0,831,743),5211=>array(98,0,834,914),5212=>array(87,0,831,914),5213=>array(98,0,869,729),5214=>array(58,0,842,729),5215=>array(98,0,869,914),5216=>array(58,0,842,914),5217=>array(98,0,889,729),5218=>array(59,0,842,729),5219=>array(98,0,889,914),5220=>array(59,0,842,914),5221=>array(117,0,889,729),5222=>array(67,326,379,734),5223=>array(87,-14,823,734),5224=>array(87,0,823,743),5225=>array(58,0,811,734),5226=>array(59,0,835,734),5227=>array(34,0,530,743),5228=>array(98,0,594,1037),5229=>array(98,0,594,743),5230=>array(98,0,594,914),5231=>array(34,-14,530,729),5232=>array(34,-14,530,914),5233=>array(34,-14,623,913),5234=>array(98,-14,594,729),5235=>array(98,-14,594,914),5236=>array(98,0,762,743),5237=>array(34,0,712,743),5238=>array(98,0,781,743),5239=>array(98,0,758,743),5240=>array(98,0,781,914),5241=>array(98,0,758,914),5242=>array(98,-14,762,729),5243=>array(34,-14,712,729),5244=>array(98,-14,762,914),5245=>array(34,-14,712,914),5246=>array(98,-14,781,729),5247=>array(98,-14,758,729),5248=>array(98,-14,781,914),5249=>array(98,-14,758,914),5250=>array(117,-14,781,729),5251=>array(67,318,379,734),5252=>array(27,318,340,734),5253=>array(34,0,696,743),5254=>array(98,0,720,743),5255=>array(34,-14,696,734),5256=>array(98,-14,720,734),5257=>array(34,0,530,743),5258=>array(98,0,594,1037),5259=>array(98,0,594,743),5260=>array(98,0,594,914),5261=>array(34,-14,530,729),5262=>array(34,-14,530,914),5263=>array(34,-14,623,913),5264=>array(98,-14,594,729),5265=>array(98,-14,594,914),5266=>array(98,0,762,743),5267=>array(34,0,712,743),5268=>array(98,0,781,743),5269=>array(98,0,758,743),5270=>array(98,0,781,914),5271=>array(98,0,758,914),5272=>array(98,-14,762,729),5273=>array(34,-14,712,729),5274=>array(98,-14,762,914),5275=>array(34,-14,712,914),5276=>array(98,-14,781,729),5277=>array(98,-14,758,729),5278=>array(98,-14,781,914),5279=>array(98,-14,758,914),5280=>array(117,-14,781,729),5281=>array(67,318,379,734),5282=>array(67,318,379,734),5283=>array(58,0,512,729),5284=>array(98,0,552,1037),5285=>array(98,0,552,729),5286=>array(98,0,552,914),5287=>array(58,0,512,729),5288=>array(58,0,512,914),5289=>array(58,0,607,913),5290=>array(98,0,552,729),5291=>array(98,0,552,914),5292=>array(98,0,651,729),5293=>array(58,0,710,729),5294=>array(98,0,741,729),5295=>array(98,0,706,729),5296=>array(98,0,741,914),5297=>array(98,0,706,914),5298=>array(98,0,651,729),5299=>array(58,0,710,729),5300=>array(98,0,651,914),5301=>array(58,0,710,914),5302=>array(98,0,741,729),5303=>array(98,0,706,729),5304=>array(98,0,741,914),5305=>array(98,0,706,914),5306=>array(117,0,741,729),5307=>array(67,326,331,734),5308=>array(67,326,453,734),5309=>array(67,326,331,734),5312=>array(58,-14,817,436),5313=>array(34,-14,793,755),5314=>array(34,-14,793,436),5315=>array(5,-14,765,636),5316=>array(58,0,817,450),5317=>array(58,0,817,636),5318=>array(58,0,817,635),5319=>array(34,0,793,450),5320=>array(34,0,793,636),5321=>array(98,-14,1035,436),5322=>array(58,-14,977,436),5323=>array(98,0,1025,450),5324=>array(34,0,793,450),5325=>array(98,0,1025,636),5326=>array(34,0,793,636),5327=>array(34,0,793,635),5328=>array(67,484,545,736),5329=>array(67,318,397,734),5330=>array(67,484,545,736),5331=>array(58,0,817,450),5332=>array(34,0,793,755),5333=>array(34,0,793,450),5334=>array(34,0,793,636),5335=>array(58,0,817,450),5336=>array(58,0,817,636),5337=>array(58,0,817,635),5338=>array(34,0,793,450),5339=>array(34,0,793,636),5340=>array(98,0,1035,450),5341=>array(58,0,977,450),5342=>array(98,0,1025,450),5343=>array(34,0,972,450),5344=>array(98,0,1025,636),5345=>array(34,0,972,636),5346=>array(98,0,1035,450),5347=>array(58,0,977,450),5348=>array(98,0,1035,636),5349=>array(58,0,977,636),5350=>array(98,0,1025,450),5351=>array(34,0,972,450),5352=>array(98,0,1025,636),5353=>array(34,0,972,636),5354=>array(67,484,545,736),5356=>array(58,0,671,729),5357=>array(34,0,505,729),5358=>array(98,0,649,1037),5359=>array(98,0,569,729),5360=>array(98,0,569,914),5361=>array(34,0,505,729),5362=>array(34,0,505,914),5363=>array(34,0,600,913),5364=>array(98,0,569,729),5365=>array(98,0,569,914),5366=>array(98,0,736,729),5367=>array(34,0,696,729),5368=>array(98,0,758,729),5369=>array(98,0,713,729),5370=>array(98,0,758,914),5371=>array(98,0,713,914),5372=>array(98,0,736,729),5373=>array(34,0,696,729),5374=>array(98,0,736,914),5375=>array(34,0,696,914),5376=>array(98,0,758,729),5377=>array(98,0,713,729),5378=>array(98,0,758,914),5379=>array(98,0,713,914),5380=>array(117,0,758,729),5381=>array(67,326,363,734),5382=>array(67,318,365,741),5383=>array(67,326,363,734),5392=>array(34,-14,678,743),5393=>array(34,-14,678,743),5394=>array(34,-14,678,914),5395=>array(34,-14,857,464),5396=>array(34,-14,857,636),5397=>array(34,-14,857,464),5398=>array(34,-14,857,636),5399=>array(98,-14,875,743),5400=>array(34,-14,814,743),5401=>array(98,-14,875,743),5402=>array(34,-14,814,743),5403=>array(98,-14,875,914),5404=>array(34,-14,814,914),5405=>array(98,-14,1106,464),5406=>array(34,-14,1042,464),5407=>array(98,-14,1106,636),5408=>array(34,-14,1042,636),5409=>array(98,-14,1106,464),5410=>array(34,-14,1042,464),5411=>array(98,-14,1106,636),5412=>array(34,-14,1042,636),5413=>array(67,476,585,737),5414=>array(58,0,529,729),5415=>array(98,0,569,1037),5416=>array(98,0,569,729),5417=>array(98,0,569,914),5418=>array(58,0,529,729),5419=>array(58,0,531,914),5420=>array(58,0,626,913),5421=>array(98,0,569,729),5422=>array(98,0,569,914),5423=>array(98,0,746,729),5424=>array(58,0,723,729),5425=>array(98,0,758,729),5426=>array(98,0,760,729),5427=>array(98,0,758,914),5428=>array(98,0,760,914),5429=>array(98,0,746,729),5430=>array(58,0,723,729),5431=>array(98,0,749,914),5432=>array(58,0,723,914),5433=>array(98,0,758,729),5434=>array(98,0,760,729),5435=>array(98,0,758,914),5436=>array(98,0,760,914),5437=>array(117,0,758,729),5438=>array(67,326,363,734),5440=>array(67,399,334,667),5441=>array(67,326,429,734),5442=>array(98,-14,857,436),5443=>array(58,-14,817,436),5444=>array(58,0,817,450),5445=>array(98,0,857,755),5446=>array(98,0,857,450),5447=>array(98,0,857,636),5448=>array(98,0,569,729),5449=>array(98,0,569,914),5450=>array(98,0,569,729),5451=>array(34,0,505,729),5452=>array(34,0,505,914),5453=>array(34,0,505,729),5454=>array(98,0,736,914),5455=>array(34,0,696,914),5456=>array(67,326,363,734),5458=>array(58,0,671,729),5459=>array(73,0,676,744),5460=>array(73,-15,676,1037),5461=>array(73,-15,676,729),5462=>array(73,-15,676,914),5463=>array(38,0,668,662),5464=>array(38,0,668,914),5465=>array(58,0,688,662),5466=>array(58,0,688,914),5467=>array(98,0,886,914),5468=>array(58,0,909,914),5469=>array(67,326,462,695),5470=>array(87,-14,645,743),5471=>array(87,-14,645,743),5472=>array(87,-14,645,743),5473=>array(87,-14,645,743),5474=>array(87,-14,645,914),5475=>array(87,-14,645,914),5476=>array(41,0,671,729),5477=>array(41,0,671,914),5478=>array(59,0,689,729),5479=>array(59,0,689,914),5480=>array(98,0,907,914),5481=>array(59,0,842,914),5482=>array(67,326,467,734),5492=>array(34,0,772,743),5493=>array(58,0,796,743),5494=>array(58,0,796,914),5495=>array(34,-14,772,729),5496=>array(34,-14,772,914),5497=>array(58,-14,796,729),5498=>array(58,-14,796,914),5499=>array(67,318,508,734),5500=>array(98,0,654,729),5501=>array(67,326,429,734),5502=>array(67,0,1013,1037),5503=>array(67,0,1013,743),5504=>array(67,0,1013,914),5505=>array(67,-14,949,734),5506=>array(67,-14,949,914),5507=>array(67,-14,1013,734),5508=>array(67,-14,1013,914),5509=>array(67,318,798,734),5514=>array(34,0,772,743),5515=>array(58,0,796,743),5516=>array(34,-14,772,729),5517=>array(58,-14,796,729),5518=>array(67,0,1225,1037),5519=>array(67,0,1225,743),5520=>array(67,0,1225,914),5521=>array(67,-14,904,736),5522=>array(67,-14,904,914),5523=>array(67,-14,1225,736),5524=>array(67,-14,1225,914),5525=>array(67,332,645,736),5526=>array(67,332,1018,736),5536=>array(34,0,793,692),5537=>array(34,0,793,692),5538=>array(58,-242,817,450),5539=>array(58,-242,817,636),5540=>array(34,-242,793,450),5541=>array(34,-242,793,636),5542=>array(67,338,545,736),5543=>array(58,0,627,729),5544=>array(16,0,585,729),5545=>array(16,0,585,914),5546=>array(58,0,627,729),5547=>array(58,0,627,914),5548=>array(16,0,585,729),5549=>array(16,0,585,914),5550=>array(5,326,363,734),5551=>array(98,-14,594,729),5598=>array(98,0,711,729),5601=>array(56,0,669,729),5702=>array(67,326,413,734),5703=>array(67,240,413,820),5742=>array(57,0,391,306),5743=>array(67,0,949,743),5744=>array(67,0,1211,743),5745=>array(67,0,1598,743),5746=>array(67,0,1598,914),5747=>array(67,-14,1277,736),5748=>array(67,-14,1277,914),5749=>array(67,-14,1598,736),5750=>array(67,-14,1598,914),5760=>array(-10,246,487,328),5761=>array(-10,-125,502,328),5762=>array(-10,-125,722,328),5763=>array(-10,-125,941,328),5764=>array(-10,-125,1160,328),5765=>array(-10,-125,1379,328),5766=>array(-10,246,502,697),5767=>array(-10,246,722,697),5768=>array(-10,246,941,697),5769=>array(-10,246,1160,697),5770=>array(-10,246,1379,697),5771=>array(-10,-125,508,697),5772=>array(-10,-125,728,697),5773=>array(-10,-125,948,697),5774=>array(-10,-125,1168,697),5775=>array(-10,-125,1389,697),5776=>array(-10,41,502,533),5777=>array(-10,41,722,533),5778=>array(-10,41,939,533),5779=>array(-10,41,1159,533),5780=>array(-10,41,1379,533),5781=>array(-10,-125,508,697),5782=>array(-10,-125,762,697),5783=>array(-10,-83,798,328),5784=>array(-10,-240,1214,328),5785=>array(-10,246,1160,902),5786=>array(-10,82,693,328),5787=>array(55,28,517,544),5788=>array(-10,28,452,544),7424=>array(30,0,562,547),7425=>array(5,0,669,547),7426=>array(60,-14,929,560),7427=>array(30,0,530,547),7428=>array(55,-14,488,560),7429=>array(91,0,550,547),7430=>array(18,0,550,547),7431=>array(91,0,443,547),7432=>array(63,-14,471,561),7433=>array(94,-213,184,547),7434=>array(0,-14,310,547),7435=>array(91,0,576,547),7436=>array(1,0,498,560),7437=>array(91,0,664,547),7438=>array(91,0,559,547),7439=>array(55,-14,557,560),7440=>array(62,-14,495,560),7441=>array(55,22,629,524),7442=>array(55,57,629,489),7443=>array(25,2,663,543),7444=>array(55,-14,970,560),7446=>array(55,273,557,560),7447=>array(55,-14,557,273),7448=>array(74,0,475,547),7449=>array(24,0,507,547),7450=>array(24,0,507,547),7451=>array(29,0,553,547),7452=>array(91,-16,510,547),7453=>array(85,37,646,495),7454=>array(85,38,857,496),7455=>array(23,-238,583,560),7456=>array(30,0,562,547),7457=>array(42,0,776,547),7458=>array(43,0,482,547),7459=>array(59,-14,466,547),7462=>array(87,0,498,560),7463=>array(30,0,562,547),7464=>array(74,0,490,547),7465=>array(74,0,475,547),7466=>array(44,0,546,547),7467=>array(37,0,556,547),7468=>array(5,326,426,734),7469=>array(2,326,573,734),7470=>array(62,326,388,734),7472=>array(62,326,448,734),7473=>array(62,326,358,734),7474=>array(41,326,336,734),7475=>array(35,318,437,742),7476=>array(62,326,412,734),7477=>array(62,326,124,734),7478=>array(-33,214,124,734),7479=>array(62,326,426,734),7480=>array(62,326,348,734),7481=>array(62,326,482,734),7482=>array(62,326,410,734),7483=>array(62,326,410,734),7484=>array(35,318,460,742),7485=>array(35,318,405,742),7486=>array(62,326,358,734),7487=>array(62,326,419,734),7488=>array(-2,326,387,734),7489=>array(55,318,406,734),7490=>array(21,326,603,734),7491=>array(38,318,329,640),7492=>array(38,318,329,640),7493=>array(35,318,343,640),7494=>array(38,318,585,640),7495=>array(57,318,365,751),7496=>array(35,318,343,751),7497=>array(35,318,354,640),7498=>array(35,318,354,640),7499=>array(41,318,298,640),7500=>array(40,318,297,640),7501=>array(35,209,343,640),7502=>array(60,207,116,632),7503=>array(57,326,363,751),7504=>array(57,326,560,640),7505=>array(57,209,346,640),7506=>array(35,318,351,640),7507=>array(35,318,307,640),7508=>array(35,479,351,640),7509=>array(35,318,351,479),7510=>array(57,209,365,640),7511=>array(17,326,232,719),7512=>array(54,318,342,632),7513=>array(54,347,407,604),7514=>array(57,319,560,633),7515=>array(19,326,354,632),7517=>array(59,209,357,755),7518=>array(10,209,354,632),7519=>array(35,318,351,742),7520=>array(35,209,379,635),7521=>array(18,209,346,633),7522=>array(60,0,116,425),7523=>array(57,0,259,313),7524=>array(54,-8,342,306),7525=>array(19,0,354,306),7526=>array(59,-117,357,429),7527=>array(10,-117,354,306),7528=>array(59,-117,367,313),7529=>array(35,-117,379,309),7530=>array(18,-117,346,307),7543=>array(91,-208,580,560),7544=>array(62,326,412,734),7547=>array(57,0,314,547),7549=>array(24,-208,643,560),7557=>array(71,-208,273,760),7579=>array(35,318,343,640),7580=>array(35,318,307,640),7581=>array(35,287,307,640),7582=>array(35,318,351,751),7583=>array(41,318,298,640),7584=>array(15,326,234,751),7585=>array(-11,209,170,632),7586=>array(35,209,343,632),7587=>array(54,209,342,632),7588=>array(36,326,198,751),7589=>array(60,326,187,632),7590=>array(36,326,198,632),7591=>array(36,326,198,632),7592=>array(-83,209,172,751),7593=>array(60,209,187,751),7594=>array(44,209,172,751),7595=>array(55,326,314,640),7596=>array(57,209,560,640),7597=>array(57,209,560,633),7598=>array(-11,209,348,640),7599=>array(57,209,417,640),7600=>array(55,326,346,640),7601=>array(35,318,351,640),7602=>array(35,210,351,751),7603=>array(34,209,297,640),7604=>array(-11,209,224,751),7605=>array(17,209,232,719),7606=>array(46,318,445,632),7607=>array(35,318,355,632),7608=>array(57,317,321,632),7609=>array(60,326,343,632),7610=>array(19,326,354,632),7611=>array(27,326,304,632),7612=>array(27,209,374,632),7613=>array(27,296,304,632),7614=>array(27,207,330,632),7615=>array(35,320,351,756),7620=>array(-456,616,-44,800),7621=>array(-456,616,-44,800),7622=>array(-456,616,-44,800),7623=>array(-456,616,-44,800),7624=>array(-468,616,-32,800),7625=>array(-468,616,-32,800),7680=>array(8,-241,676,729),7681=>array(60,-241,522,560),7682=>array(98,0,615,914),7683=>array(90,-14,580,915),7684=>array(98,-183,615,729),7685=>array(91,-183,580,760),7686=>array(98,-156,615,729),7687=>array(91,-156,580,760),7688=>array(56,-193,644,928),7689=>array(55,-193,488,800),7690=>array(98,0,711,914),7691=>array(55,-14,544,942),7692=>array(98,-183,711,729),7693=>array(55,-183,544,760),7694=>array(98,-156,711,729),7695=>array(55,-156,544,760),7696=>array(98,-192,711,729),7697=>array(55,-193,544,760),7698=>array(98,-240,711,729),7699=>array(55,-240,544,760),7700=>array(98,0,568,1044),7701=>array(55,-14,562,921),7702=>array(98,0,568,1044),7703=>array(55,-14,562,921),7704=>array(98,-213,568,729),7705=>array(55,-213,562,560),7706=>array(98,-192,568,729),7707=>array(55,-192,562,560),7708=>array(98,-193,568,928),7709=>array(55,-193,562,785),7710=>array(98,0,517,914),7711=>array(23,0,371,942),7712=>array(56,-14,693,887),7713=>array(55,-208,544,745),7714=>array(98,0,654,913),7715=>array(90,0,549,915),7716=>array(98,-183,654,729),7717=>array(91,-183,549,760),7718=>array(98,0,654,914),7719=>array(-9,0,549,913),7720=>array(8,-193,654,729),7721=>array(1,-193,549,760),7722=>array(98,-222,654,729),7723=>array(91,-222,549,760),7724=>array(0,-192,322,729),7725=>array(-22,-192,300,760),7726=>array(3,0,293,1044),7727=>array(-6,0,284,886),7728=>array(98,0,677,928),7729=>array(91,0,576,928),7730=>array(98,-183,677,729),7731=>array(91,-183,576,760),7732=>array(98,-156,677,729),7733=>array(91,-156,576,760),7734=>array(98,-183,552,729),7735=>array(98,-183,189,760),7736=>array(1,-183,552,927),7737=>array(-1,-183,291,899),7738=>array(98,-156,552,729),7739=>array(-6,-156,286,760),7740=>array(98,-240,552,729),7741=>array(-17,-240,295,760),7742=>array(98,0,765,928),7743=>array(91,0,889,800),7744=>array(98,0,765,914),7745=>array(91,0,889,760),7746=>array(98,-183,765,729),7747=>array(91,-183,889,560),7748=>array(98,0,650,914),7749=>array(91,0,549,760),7750=>array(98,-183,650,729),7751=>array(91,-183,549,560),7752=>array(98,-156,650,729),7753=>array(91,-156,549,560),7754=>array(98,-240,650,729),7755=>array(91,-240,549,560),7756=>array(56,-14,731,1044),7757=>array(55,-14,557,881),7758=>array(56,-14,731,1042),7759=>array(55,-14,557,882),7760=>array(56,-14,731,1044),7761=>array(55,-14,557,921),7762=>array(56,-14,731,1044),7763=>array(55,-14,557,921),7764=>array(98,0,569,928),7765=>array(91,-208,580,800),7766=>array(98,0,569,914),7767=>array(91,-208,580,760),7768=>array(98,0,666,913),7769=>array(91,0,411,760),7770=>array(98,-183,666,729),7771=>array(91,-183,411,560),7772=>array(98,-183,666,899),7773=>array(91,-183,411,745),7774=>array(98,-156,666,729),7775=>array(41,-156,411,560),7776=>array(66,-14,579,914),7777=>array(54,-14,472,760),7778=>array(66,-183,579,742),7779=>array(54,-183,472,560),7780=>array(66,-14,579,928),7781=>array(54,-14,485,800),7782=>array(66,-14,579,1042),7783=>array(54,-14,472,973),7784=>array(66,-183,579,914),7785=>array(54,-183,472,733),7786=>array(-3,0,614,914),7787=>array(27,0,368,942),7788=>array(-3,-183,614,729),7789=>array(27,-183,368,702),7790=>array(-3,-156,614,729),7791=>array(27,-156,390,702),7792=>array(-3,-240,614,729),7793=>array(27,-240,394,702),7794=>array(87,-183,645,729),7795=>array(85,-183,543,560),7796=>array(87,-192,645,729),7797=>array(85,-192,543,560),7798=>array(87,-213,645,729),7799=>array(85,-213,543,560),7800=>array(87,-14,645,1044),7801=>array(85,-14,543,990),7802=>array(87,-14,645,1025),7803=>array(85,-14,543,869),7804=>array(8,0,676,936),7805=>array(30,0,562,777),7806=>array(8,-183,676,729),7807=>array(30,-183,562,547),7808=>array(33,0,956,931),7809=>array(42,0,776,802),7810=>array(33,0,956,931),7811=>array(42,0,776,803),7812=>array(33,0,956,913),7813=>array(42,0,776,758),7814=>array(33,0,956,913),7815=>array(42,0,776,760),7816=>array(33,-183,956,729),7817=>array(42,-183,776,547),7818=>array(30,0,654,914),7819=>array(29,0,559,760),7820=>array(30,0,654,913),7821=>array(29,0,559,758),7822=>array(-2,0,613,914),7823=>array(30,-208,562,760),7824=>array(45,0,640,928),7825=>array(43,0,482,800),7826=>array(45,-183,640,729),7827=>array(43,-183,482,547),7828=>array(45,-156,640,729),7829=>array(43,-156,482,547),7830=>array(91,-156,549,760),7831=>array(2,0,368,913),7832=>array(42,0,776,878),7833=>array(30,-208,562,878),7834=>array(60,-14,672,760),7835=>array(23,0,371,942),7836=>array(1,0,371,760),7837=>array(23,0,371,760),7838=>array(87,-14,713,743),7839=>array(55,-14,557,742),7840=>array(8,-183,676,729),7841=>array(60,-183,522,560),7842=>array(8,0,676,992),7843=>array(60,-14,522,810),7844=>array(8,0,676,1028),7845=>array(60,-14,585,846),7846=>array(8,0,676,1028),7847=>array(60,-14,522,847),7848=>array(8,0,676,1044),7849=>array(60,-14,577,862),7850=>array(8,0,676,1057),7851=>array(60,-14,522,875),7852=>array(8,-183,676,928),7853=>array(60,-183,522,800),7854=>array(8,0,676,1044),7855=>array(60,-14,522,877),7856=>array(8,0,676,1044),7857=>array(60,-14,522,877),7858=>array(8,0,676,1068),7859=>array(60,-14,522,901),7860=>array(8,0,676,1043),7861=>array(60,-14,522,876),7862=>array(8,-183,676,946),7863=>array(60,-183,522,765),7864=>array(98,-183,568,729),7865=>array(55,-183,562,560),7866=>array(98,0,568,992),7867=>array(55,-14,562,810),7868=>array(98,0,568,921),7869=>array(55,-14,562,777),7870=>array(98,0,637,1028),7871=>array(55,-14,613,846),7872=>array(98,0,568,1028),7873=>array(55,-14,562,847),7874=>array(98,0,620,1044),7875=>array(55,-14,605,862),7876=>array(98,0,568,1057),7877=>array(55,-14,562,875),7878=>array(98,-183,568,928),7879=>array(55,-183,562,800),7880=>array(44,0,263,992),7881=>array(33,0,252,811),7882=>array(98,-183,197,729),7883=>array(93,-183,184,760),7884=>array(56,-183,731,742),7885=>array(55,-183,557,560),7886=>array(56,-14,731,992),7887=>array(55,-14,557,810),7888=>array(56,-14,731,1028),7889=>array(55,-14,601,846),7890=>array(56,-14,731,1028),7891=>array(55,-14,557,847),7892=>array(56,-14,731,1044),7893=>array(55,-14,592,862),7894=>array(56,-14,731,1057),7895=>array(55,-14,557,875),7896=>array(56,-183,731,928),7897=>array(55,-183,557,800),7898=>array(50,-14,764,927),7899=>array(58,-14,603,800),7900=>array(50,-14,764,927),7901=>array(58,-14,603,800),7902=>array(50,-14,764,992),7903=>array(58,-14,603,810),7904=>array(50,-14,764,921),7905=>array(58,-14,603,777),7906=>array(50,-183,764,760),7907=>array(58,-183,603,615),7908=>array(87,-183,645,729),7909=>array(85,-183,543,560),7910=>array(87,-14,645,992),7911=>array(85,-14,543,810),7912=>array(84,-4,796,927),7913=>array(86,-14,676,800),7914=>array(84,-4,796,927),7915=>array(86,-14,676,800),7916=>array(84,-4,796,992),7917=>array(86,-14,676,810),7918=>array(84,-4,796,921),7919=>array(86,-14,676,777),7920=>array(84,-183,796,760),7921=>array(86,-183,676,615),7922=>array(-2,0,613,931),7923=>array(30,-208,562,802),7924=>array(-2,-183,613,729),7925=>array(30,-208,562,547),7926=>array(-2,0,613,996),7927=>array(30,-208,562,813),7928=>array(-2,0,613,921),7929=>array(30,-208,562,777),7930=>array(98,0,764,729),7931=>array(16,0,462,760),7936=>array(55,-12,611,797),7937=>array(55,-12,611,797),7938=>array(55,-12,611,800),7939=>array(55,-12,611,800),7940=>array(55,-12,611,800),7941=>array(55,-12,611,800),7942=>array(55,-12,611,928),7943=>array(55,-12,611,928),7944=>array(8,0,676,797),7945=>array(8,0,676,797),7946=>array(2,0,869,800),7947=>array(3,0,869,800),7948=>array(3,0,761,800),7949=>array(2,0,793,800),7950=>array(3,0,700,928),7951=>array(2,0,734,928),7952=>array(65,-14,473,797),7953=>array(65,-14,473,797),7954=>array(65,-14,473,800),7955=>array(65,-14,473,800),7956=>array(65,-14,486,800),7957=>array(65,-14,501,800),7960=>array(3,0,647,797),7961=>array(3,0,647,797),7962=>array(2,0,902,800),7963=>array(3,0,911,800),7964=>array(3,0,834,800),7965=>array(2,0,864,800),7968=>array(91,-208,549,797),7969=>array(91,-208,549,797),7970=>array(91,-208,549,800),7971=>array(91,-208,549,800),7972=>array(91,-208,549,800),7973=>array(91,-208,549,800),7974=>array(91,-208,549,928),7975=>array(91,-208,549,928),7976=>array(3,0,739,797),7977=>array(3,0,737,797),7978=>array(2,0,988,800),7979=>array(3,0,991,800),7980=>array(3,0,929,800),7981=>array(2,0,953,800),7982=>array(3,0,835,928),7983=>array(2,0,849,928),7984=>array(76,0,304,797),7985=>array(71,0,304,797),7986=>array(-39,0,340,800),7987=>array(-34,0,347,800),7988=>array(2,0,362,800),7989=>array(-22,0,366,800),7990=>array(-26,0,304,928),7991=>array(-28,0,304,928),7992=>array(3,0,282,797),7993=>array(3,0,276,797),7994=>array(2,0,537,800),7995=>array(3,0,537,800),7996=>array(3,0,472,800),7997=>array(2,0,501,800),7998=>array(3,0,392,928),7999=>array(2,0,395,928),8000=>array(55,-14,557,797),8001=>array(55,-14,557,797),8002=>array(55,-14,557,800),8003=>array(55,-14,557,800),8004=>array(55,-14,557,800),8005=>array(55,-14,557,800),8008=>array(3,-14,748,797),8009=>array(3,-14,792,797),8010=>array(2,-14,1039,800),8011=>array(3,-14,1043,800),8012=>array(3,-14,882,800),8013=>array(2,-14,914,800),8016=>array(73,-14,521,797),8017=>array(73,-14,521,797),8018=>array(73,-14,521,800),8019=>array(73,-14,521,800),8020=>array(73,-14,521,800),8021=>array(73,-14,521,800),8022=>array(73,-14,521,928),8023=>array(73,-14,521,928),8025=>array(3,0,786,797),8027=>array(3,0,1000,800),8029=>array(2,0,1014,800),8031=>array(2,0,900,928),8032=>array(66,-14,769,797),8033=>array(66,-14,769,797),8034=>array(66,-14,769,800),8035=>array(66,-14,769,800),8036=>array(66,-14,769,800),8037=>array(66,-14,769,800),8038=>array(66,-14,769,928),8039=>array(66,-14,769,928),8040=>array(3,0,764,797),8041=>array(3,0,805,797),8042=>array(2,0,1051,800),8043=>array(3,0,1057,800),8044=>array(3,0,908,800),8045=>array(2,0,934,800),8046=>array(3,0,883,928),8047=>array(2,0,914,928),8048=>array(55,-12,611,800),8049=>array(55,-12,611,800),8050=>array(65,-14,473,800),8051=>array(65,-14,473,800),8052=>array(91,-208,549,800),8053=>array(91,-208,549,800),8054=>array(-56,0,304,800),8055=>array(81,0,324,800),8056=>array(55,-14,557,800),8057=>array(55,-14,557,800),8058=>array(73,-14,521,800),8059=>array(73,-14,521,800),8060=>array(66,-14,769,800),8061=>array(66,-14,769,800),8064=>array(55,-208,611,797),8065=>array(55,-208,611,797),8066=>array(55,-208,611,800),8067=>array(55,-208,611,800),8068=>array(55,-208,611,800),8069=>array(55,-208,611,800),8070=>array(55,-208,611,928),8071=>array(55,-208,611,928),8072=>array(8,-208,676,797),8073=>array(8,-208,676,797),8074=>array(2,-208,869,800),8075=>array(3,-208,869,800),8076=>array(3,-208,761,800),8077=>array(2,-208,793,800),8078=>array(3,-208,700,928),8079=>array(2,-208,734,928),8080=>array(91,-208,549,797),8081=>array(91,-208,549,797),8082=>array(91,-208,549,800),8083=>array(91,-208,549,800),8084=>array(91,-208,549,800),8085=>array(91,-208,549,800),8086=>array(91,-208,549,928),8087=>array(91,-208,549,928),8088=>array(3,-208,739,797),8089=>array(3,-208,737,797),8090=>array(2,-208,988,800),8091=>array(3,-208,991,800),8092=>array(3,-208,929,800),8093=>array(2,-208,953,800),8094=>array(3,-208,835,928),8095=>array(2,-208,849,928),8096=>array(66,-208,769,797),8097=>array(66,-208,769,797),8098=>array(66,-208,769,800),8099=>array(66,-208,769,800),8100=>array(66,-208,769,800),8101=>array(66,-208,769,800),8102=>array(66,-208,769,928),8103=>array(66,-208,769,928),8104=>array(3,-208,764,797),8105=>array(3,-208,805,797),8106=>array(2,-208,1051,800),8107=>array(3,-208,1057,800),8108=>array(3,-208,908,800),8109=>array(2,-208,934,800),8110=>array(3,-208,883,928),8111=>array(2,-208,914,928),8112=>array(55,-12,611,785),8113=>array(55,-12,611,745),8114=>array(55,-208,611,800),8115=>array(55,-208,611,559),8116=>array(55,-208,611,800),8118=>array(55,-12,611,777),8119=>array(55,-208,611,777),8120=>array(8,0,676,928),8121=>array(8,0,676,899),8122=>array(-2,0,708,800),8123=>array(8,0,676,800),8124=>array(8,-208,676,729),8125=>array(190,595,309,797),8126=>array(214,-208,321,-45),8127=>array(190,595,309,797),8128=>array(89,639,411,777),8129=>array(89,659,411,928),8130=>array(91,-208,549,800),8131=>array(91,-208,549,560),8132=>array(91,-208,549,800),8134=>array(91,-208,549,777),8135=>array(91,-208,549,777),8136=>array(-2,0,741,800),8137=>array(-12,0,682,800),8138=>array(-2,0,833,800),8139=>array(-6,0,765,800),8140=>array(98,-208,654,729),8141=>array(67,595,446,800),8142=>array(88,595,447,800),8143=>array(89,595,411,928),8144=>array(-10,0,304,785),8145=>array(-14,0,304,745),8146=>array(-20,0,304,978),8147=>array(2,0,313,978),8150=>array(-14,0,309,777),8151=>array(-13,0,310,928),8152=>array(-5,0,300,928),8153=>array(1,0,293,899),8154=>array(-2,0,377,800),8155=>array(-9,0,311,800),8157=>array(62,595,443,800),8158=>array(73,595,461,800),8159=>array(89,595,411,928),8160=>array(73,-14,521,785),8161=>array(73,-14,521,745),8162=>array(73,-14,521,978),8163=>array(73,-14,521,978),8164=>array(91,-208,580,797),8165=>array(91,-208,580,797),8166=>array(73,-14,521,777),8167=>array(73,-14,521,928),8168=>array(-2,0,613,928),8169=>array(-2,0,613,899),8170=>array(-2,0,847,800),8171=>array(-15,0,821,800),8172=>array(3,0,651,797),8173=>array(83,659,395,978),8174=>array(105,659,415,978),8175=>array(83,617,317,800),8178=>array(66,-208,769,800),8179=>array(66,-208,769,547),8180=>array(66,-208,769,800),8182=>array(66,-14,769,777),8183=>array(66,-208,769,777),8184=>array(-2,-14,885,800),8185=>array(-7,-14,750,800),8186=>array(-2,0,884,800),8187=>array(-18,0,752,800),8188=>array(38,-208,726,738),8189=>array(181,616,415,800),8190=>array(190,595,309,797),8208=>array(49,234,312,314),8209=>array(49,234,312,314),8210=>array(49,239,587,309),8211=>array(49,239,451,309),8212=>array(49,239,951,309),8213=>array(0,239,1000,309),8214=>array(127,-236,371,764),8215=>array(-10,-236,510,-9),8216=>array(85,489,228,729),8217=>array(87,499,230,729),8218=>array(85,-116,228,124),8219=>array(87,499,230,729),8220=>array(85,489,428,729),8221=>array(85,489,428,729),8222=>array(85,-116,428,124),8223=>array(85,489,428,729),8224=>array(28,-96,472,729),8225=>array(28,-96,472,729),8226=>array(150,227,440,516),8227=>array(150,188,479,555),8228=>array(115,0,219,124),8229=>array(115,0,552,124),8230=>array(115,0,885,124),8231=>array(107,302,210,426),8240=>array(55,-14,1287,742),8241=>array(55,-14,1681,742),8242=>array(20,547,203,729),8243=>array(20,547,350,729),8244=>array(20,547,496,729),8245=>array(20,547,203,729),8246=>array(20,547,350,729),8247=>array(20,547,496,729),8248=>array(5,-236,333,-30),8249=>array(77,69,306,517),8250=>array(94,69,323,517),8251=>array(95,2,740,725),8252=>array(72,0,414,729),8253=>array(72,0,461,742),8254=>array(-10,686,510,755),8255=>array(-43,-237,847,-60),8256=>array(-43,752,847,929),8257=>array(-42,-236,286,229),8258=>array(30,-29,970,814),8259=>array(108,313,400,421),8260=>array(-183,-14,350,742),8261=>array(86,-132,293,760),8262=>array(86,-132,293,760),8263=>array(36,0,886,742),8264=>array(72,0,661,742),8265=>array(72,0,661,742),8266=>array(49,-123,448,545),8267=>array(115,-96,566,729),8268=>array(105,220,395,509),8269=>array(105,220,395,509),8270=>array(30,-29,470,427),8271=>array(139,-116,282,517),8272=>array(-43,-237,847,929),8273=>array(30,-7,470,929),8274=>array(71,-93,408,729),8275=>array(49,228,951,399),8276=>array(-43,-240,847,-63),8277=>array(152,98,686,631),8278=>array(122,149,464,589),8279=>array(20,547,643,729),8280=>array(175,125,663,613),8281=>array(175,120,663,608),8282=>array(107,0,210,729),8283=>array(49,-138,749,867),8284=>array(55,0,783,729),8285=>array(107,39,210,655),8286=>array(107,8,210,683),8304=>array(42,319,366,742),8305=>array(60,326,116,751),8308=>array(31,326,369,734),8309=>array(50,319,353,734),8310=>array(45,319,369,742),8311=>array(53,326,354,734),8312=>array(43,319,365,742),8313=>array(41,319,364,742),8314=>array(67,326,461,677),8315=>array(67,479,461,525),8316=>array(67,422,461,581),8317=>array(54,252,195,751),8318=>array(50,252,191,751),8319=>array(57,326,346,640),8320=>array(42,-7,366,416),8321=>array(67,0,346,408),8322=>array(46,0,338,416),8323=>array(48,-7,350,416),8324=>array(31,0,369,408),8325=>array(50,-7,353,408),8326=>array(45,-7,369,416),8327=>array(53,0,354,408),8328=>array(43,-7,365,416),8329=>array(41,-7,364,416),8330=>array(67,0,461,351),8331=>array(67,152,461,199),8332=>array(67,96,461,254),8333=>array(54,-74,195,425),8334=>array(50,-74,191,425),8336=>array(38,-8,329,313),8337=>array(35,-8,354,313),8338=>array(35,-8,351,313),8339=>array(57,0,391,306),8340=>array(35,-8,354,313),8341=>array(57,0,346,425),8342=>array(57,0,363,425),8343=>array(60,0,116,425),8344=>array(57,0,560,313),8345=>array(57,0,346,313),8346=>array(57,-117,365,313),8347=>array(57,0,320,322),8348=>array(17,0,232,393),8352=>array(42,0,835,729),8353=>array(56,-44,593,778),8354=>array(47,-14,587,742),8355=>array(65,0,599,729),8356=>array(63,0,548,742),8357=>array(91,-93,889,640),8358=>array(57,0,691,729),8359=>array(98,-14,1226,729),8360=>array(98,-14,1025,729),8361=>array(29,0,960,729),8362=>array(46,-14,743,729),8363=>array(55,-156,619,760),8364=>array(0,-14,570,742),8365=>array(20,0,636,729),8366=>array(10,0,626,729),8367=>array(102,-222,1205,742),8368=>array(22,-14,569,742),8369=>array(33,0,579,729),8370=>array(45,-81,586,809),8371=>array(8,0,627,729),8372=>array(57,-14,717,742),8373=>array(81,-147,556,760),8376=>array(10,0,626,729),8377=>array(52,0,585,729),8378=>array(5,2,649,731),8400=>array(-491,635,-26,760),8401=>array(-470,635,-5,760),8406=>array(-470,560,-26,760),8407=>array(-470,560,-26,760),8411=>array(-491,560,-10,758),8412=>array(-586,560,86,758),8417=>array(-470,560,-26,760),8448=>array(33,-24,980,752),8449=>array(33,-24,999,752),8450=>array(56,-14,644,742),8451=>array(95,-14,1053,742),8452=>array(-21,0,637,729),8453=>array(29,-24,987,752),8454=>array(29,-24,1038,752),8455=>array(80,-14,560,742),8456=>array(54,-146,642,611),8457=>array(95,0,894,742),8459=>array(36,-14,943,748),8460=>array(1,-128,693,731),8461=>array(98,0,751,729),8462=>array(35,0,566,760),8463=>array(44,0,566,760),8464=>array(29,-15,432,742),8465=>array(52,-14,659,742),8466=>array(33,-14,679,743),8467=>array(-14,-14,353,742),8468=>array(16,-14,763,760),8469=>array(97,0,704,729),8470=>array(26,0,969,729),8471=>array(138,0,862,724),8472=>array(54,-221,658,495),8473=>array(98,0,666,729),8474=>array(56,-129,731,742),8475=>array(32,-9,764,774),8476=>array(41,-14,803,743),8477=>array(98,0,774,729),8478=>array(83,0,814,729),8479=>array(98,-107,666,847),8480=>array(126,443,770,730),8481=>array(-2,0,1023,547),8482=>array(144,447,784,729),8483=>array(8,-108,676,846),8484=>array(45,0,700,729),8485=>array(43,-213,523,760),8486=>array(38,0,726,738),8487=>array(38,-14,726,724),8488=>array(12,-149,573,783),8489=>array(33,0,255,547),8490=>array(98,0,677,729),8491=>array(8,0,676,928),8492=>array(45,0,734,772),8493=>array(63,-12,652,742),8494=>array(61,-12,793,647),8495=>array(42,-14,547,533),8496=>array(79,-14,565,742),8497=>array(41,-16,758,755),8498=>array(98,0,517,729),8499=>array(28,-28,1032,751),8500=>array(51,-12,411,395),8501=>array(50,-14,712,742),8502=>array(-2,-14,653,743),8503=>array(13,-35,407,742),8504=>array(42,-35,591,742),8505=>array(34,0,355,760),8506=>array(44,-21,915,654),8507=>array(74,0,1162,547),8508=>array(18,-8,685,547),8509=>array(0,-194,669,560),8510=>array(98,0,648,729),8511=>array(98,0,750,729),8512=>array(12,-192,791,719),8513=>array(80,-14,716,742),8514=>array(4,0,458,729),8515=>array(3,0,457,729),8516=>array(-2,0,613,729),8517=>array(42,0,786,729),8518=>array(44,-14,709,760),8519=>array(44,-14,572,560),8520=>array(39,0,313,760),8521=>array(-114,-208,313,760),8523=>array(29,-14,715,742),8526=>array(40,0,441,547),8528=>array(67,-14,922,742),8529=>array(67,-14,932,742),8530=>array(67,-14,1335,742),8531=>array(67,-14,918,742),8532=>array(46,-14,918,742),8533=>array(67,-14,921,742),8534=>array(46,-14,921,742),8535=>array(48,-14,921,742),8536=>array(31,-14,921,742),8537=>array(67,-14,937,742),8538=>array(50,-14,937,742),8539=>array(67,-14,933,742),8540=>array(48,-14,933,742),8541=>array(50,-14,933,742),8542=>array(53,-14,933,742),8543=>array(67,-14,751,742),8544=>array(98,0,197,729),8545=>array(98,0,394,729),8546=>array(98,0,591,729),8547=>array(98,0,915,729),8548=>array(8,0,676,729),8549=>array(8,0,824,729),8550=>array(8,0,1021,729),8551=>array(8,0,1219,729),8552=>array(98,0,886,729),8553=>array(30,0,654,729),8554=>array(30,0,835,729),8555=>array(30,0,1032,729),8556=>array(98,0,552,729),8557=>array(56,-14,644,742),8558=>array(98,0,711,729),8559=>array(98,0,765,729),8560=>array(94,0,184,760),8561=>array(94,0,364,760),8562=>array(94,0,543,760),8563=>array(94,0,782,760),8564=>array(30,0,562,547),8565=>array(30,0,717,760),8566=>array(30,0,897,760),8567=>array(30,0,1077,760),8568=>array(94,0,786,760),8569=>array(29,0,559,547),8570=>array(29,0,729,760),8571=>array(29,0,908,760),8572=>array(94,0,184,760),8573=>array(55,-14,488,560),8574=>array(55,-14,544,760),8575=>array(91,0,889,560),8576=>array(59,0,1186,729),8577=>array(98,0,711,729),8578=>array(59,0,1186,729),8579=>array(56,-14,644,742),8580=>array(62,-14,495,560),8581=>array(56,-208,644,742),8585=>array(42,-14,918,742),8592=>array(49,100,781,527),8593=>array(205,0,632,732),8594=>array(57,100,789,527),8595=>array(205,-3,632,729),8596=>array(49,100,789,527),8597=>array(205,-8,632,732),8598=>array(141,25,703,587),8599=>array(141,25,703,587),8600=>array(141,25,703,587),8601=>array(141,25,703,587),8602=>array(49,100,781,527),8603=>array(57,100,789,527),8604=>array(21,103,827,414),8605=>array(11,103,816,414),8606=>array(49,100,781,527),8607=>array(206,0,633,732),8608=>array(57,100,789,527),8609=>array(206,-3,633,729),8610=>array(49,100,781,527),8611=>array(57,100,789,527),8612=>array(49,100,781,527),8613=>array(206,0,632,732),8614=>array(57,100,789,527),8615=>array(206,-3,632,729),8616=>array(206,0,632,732),8617=>array(49,100,780,565),8618=>array(58,100,789,565),8619=>array(49,100,780,565),8620=>array(58,100,789,565),8621=>array(49,100,789,527),8622=>array(49,93,789,534),8623=>array(146,-2,702,730),8624=>array(169,0,629,743),8625=>array(209,0,669,743),8626=>array(169,-14,629,729),8627=>array(209,-14,669,729),8628=>array(233,-3,760,604),8629=>array(49,100,656,626),8630=>array(22,203,799,668),8631=>array(39,203,816,668),8632=>array(108,25,788,729),8633=>array(55,-46,783,673),8634=>array(103,62,762,680),8635=>array(77,62,736,680),8636=>array(49,272,781,527),8637=>array(49,100,781,355),8638=>array(377,0,632,732),8639=>array(205,0,460,732),8640=>array(57,272,789,527),8641=>array(57,100,789,355),8642=>array(377,0,632,732),8643=>array(205,0,460,732),8644=>array(49,-47,789,674),8645=>array(58,-3,779,732),8646=>array(49,-47,789,674),8647=>array(49,-47,781,674),8648=>array(59,0,779,732),8649=>array(58,-47,790,674),8650=>array(59,-3,779,729),8651=>array(49,7,789,620),8652=>array(49,7,789,620),8653=>array(49,100,781,527),8654=>array(49,94,789,533),8655=>array(57,100,789,527),8656=>array(49,100,781,527),8657=>array(206,0,633,732),8658=>array(57,100,789,527),8659=>array(206,-3,633,729),8660=>array(49,100,789,527),8661=>array(205,-8,633,732),8662=>array(141,-23,751,587),8663=>array(92,-23,703,587),8664=>array(92,25,703,636),8665=>array(141,25,751,636),8666=>array(49,100,781,527),8667=>array(57,100,789,527),8668=>array(49,100,781,527),8669=>array(57,100,789,527),8670=>array(205,0,632,732),8671=>array(205,-3,632,729),8672=>array(49,100,781,527),8673=>array(205,0,633,732),8674=>array(57,100,789,527),8675=>array(205,-3,633,729),8676=>array(52,99,781,528),8677=>array(57,99,786,528),8678=>array(27,65,781,562),8679=>array(171,0,667,754),8680=>array(35,65,789,562),8681=>array(171,-25,667,729),8682=>array(171,0,667,754),8683=>array(171,0,667,754),8684=>array(156,0,682,754),8685=>array(171,0,667,754),8686=>array(171,0,667,754),8687=>array(171,0,667,754),8688=>array(57,65,811,562),8689=>array(60,0,788,729),8690=>array(60,0,788,729),8691=>array(171,-25,667,754),8692=>array(57,100,789,527),8693=>array(58,-3,779,732),8694=>array(57,-193,789,820),8695=>array(49,94,781,533),8696=>array(57,94,789,533),8697=>array(49,94,789,533),8698=>array(49,94,781,533),8699=>array(57,94,789,533),8700=>array(49,94,789,533),8701=>array(27,96,781,531),8702=>array(57,96,811,531),8703=>array(27,96,811,531),8704=>array(8,0,676,729),8705=>array(66,-14,554,742),8706=>array(46,-14,471,662),8707=>array(98,0,568,729),8708=>array(98,-46,568,776),8709=>array(76,-10,795,710),8710=>array(-3,0,672,719),8711=>array(-3,0,672,719),8712=>array(85,-10,786,710),8713=>array(85,-138,786,835),8714=>array(106,76,612,550),8715=>array(85,-10,786,710),8716=>array(85,-138,786,835),8717=>array(106,76,612,550),8718=>array(146,0,490,485),8719=>array(76,-192,680,719),8720=>array(76,-192,680,719),8721=>array(12,-192,654,719),8722=>array(106,272,732,355),8723=>array(106,0,732,627),8724=>array(106,0,732,729),8725=>array(0,-93,337,729),8726=>array(192,-54,529,768),8727=>array(127,0,710,627),8728=>array(158,160,468,470),8729=>array(168,168,458,458),8730=>array(30,-20,637,811),8731=>array(30,-20,637,933),8732=>array(30,-20,637,924),8733=>array(107,112,607,487),8734=>array(107,112,726,487),8735=>array(138,99,700,661),8736=>array(85,0,786,729),8737=>array(85,-53,786,729),8738=>array(116,-3,732,727),8739=>array(211,-214,289,771),8740=>array(50,-214,451,771),8741=>array(133,-214,367,771),8742=>array(50,-214,451,771),8743=>array(129,0,603,579),8744=>array(129,0,603,579),8745=>array(129,0,603,579),8746=>array(129,0,603,579),8747=>array(57,-212,464,757),8748=>array(57,-212,732,757),8749=>array(57,-212,1000,757),8750=>array(57,-212,464,757),8751=>array(57,-212,732,757),8752=>array(57,-212,1000,757),8753=>array(57,-213,522,757),8754=>array(57,-212,514,757),8755=>array(57,-212,515,757),8756=>array(59,100,577,604),8757=>array(59,100,577,604),8758=>array(79,100,182,604),8759=>array(59,100,577,604),8760=>array(106,272,732,552),8761=>array(106,78,732,552),8762=>array(105,78,732,552),8763=>array(106,78,732,552),8764=>array(106,228,732,399),8765=>array(106,228,732,399),8766=>array(79,149,759,479),8767=>array(106,42,732,584),8768=>array(102,0,273,626),8769=>array(106,77,732,553),8770=>array(106,133,732,454),8771=>array(106,172,732,494),8772=>array(106,48,732,603),8773=>array(106,90,732,594),8774=>array(106,12,732,594),8775=>array(106,-5,732,657),8776=>array(106,133,732,494),8777=>array(106,2,732,625),8778=>array(106,90,732,598),8779=>array(106,59,732,602),8780=>array(106,90,732,594),8781=>array(105,105,732,521),8782=>array(106,26,732,601),8783=>array(106,172,732,601),8784=>array(106,172,732,625),8785=>array(106,1,732,625),8786=>array(106,2,733,625),8787=>array(106,2,733,625),8788=>array(101,151,899,476),8789=>array(100,151,900,475),8790=>array(106,172,732,454),8791=>array(106,172,732,760),8792=>array(106,172,732,662),8793=>array(106,172,732,812),8794=>array(106,172,732,812),8795=>array(106,172,732,849),8796=>array(106,172,732,854),8797=>array(106,172,732,764),8798=>array(106,172,732,760),8799=>array(106,172,732,856),8800=>array(106,19,732,608),8801=>array(106,90,732,537),8802=>array(106,-24,732,650),8803=>array(106,0,732,629),8804=>array(106,0,732,582),8805=>array(106,0,732,582),8806=>array(106,-83,732,638),8807=>array(106,-83,732,638),8808=>array(106,-164,732,638),8809=>array(106,-164,732,638),8810=>array(72,22,975,609),8811=>array(72,22,975,609),8812=>array(86,-132,378,759),8813=>array(105,13,732,613),8814=>array(106,2,732,674),8815=>array(106,-47,732,625),8816=>array(106,-102,732,667),8817=>array(106,-102,732,667),8818=>array(106,-55,732,582),8819=>array(106,-39,732,582),8820=>array(106,-105,732,664),8821=>array(106,-102,732,667),8822=>array(102,-87,732,686),8823=>array(102,-87,732,686),8824=>array(102,-197,732,797),8825=>array(102,-197,732,797),8826=>array(106,-38,732,664),8827=>array(106,-38,732,664),8828=>array(106,-105,732,667),8829=>array(106,-105,732,667),8830=>array(106,-85,732,667),8831=>array(106,-85,732,667),8832=>array(106,-61,732,764),8833=>array(106,-138,732,687),8834=>array(100,80,738,546),8835=>array(100,80,738,546),8836=>array(100,-96,738,726),8837=>array(100,-100,738,722),8838=>array(93,0,732,613),8839=>array(106,0,745,613),8840=>array(93,-116,732,730),8841=>array(106,-116,745,730),8842=>array(93,-73,732,614),8843=>array(93,-73,732,614),8844=>array(129,0,603,579),8845=>array(129,0,603,579),8846=>array(129,2,603,582),8847=>array(106,0,732,568),8848=>array(106,0,732,568),8849=>array(106,-83,732,630),8850=>array(106,-83,732,630),8851=>array(106,0,674,626),8852=>array(106,0,674,626),8853=>array(91,-14,747,643),8854=>array(91,-14,747,643),8855=>array(91,-14,747,643),8856=>array(91,-14,747,643),8857=>array(91,-14,747,643),8858=>array(91,-14,747,643),8859=>array(91,-14,747,643),8860=>array(91,-14,747,643),8861=>array(91,-14,747,643),8862=>array(91,-14,747,643),8863=>array(91,-14,747,643),8864=>array(91,-14,747,643),8865=>array(91,-14,747,643),8866=>array(85,0,786,700),8867=>array(85,0,786,700),8868=>array(85,0,786,700),8869=>array(85,0,786,700),8870=>array(85,0,436,700),8871=>array(85,0,436,700),8872=>array(85,0,786,700),8873=>array(85,0,786,700),8874=>array(85,0,786,700),8875=>array(85,0,786,700),8876=>array(85,-40,786,740),8877=>array(85,-40,786,740),8878=>array(85,-40,786,740),8879=>array(85,-40,786,740),8880=>array(106,-43,724,670),8881=>array(106,-43,724,670),8882=>array(106,15,732,612),8883=>array(106,15,732,612),8884=>array(106,-48,732,674),8885=>array(106,-48,732,674),8886=>array(59,175,941,454),8887=>array(59,175,941,454),8888=>array(48,175,790,454),8889=>array(59,-47,779,674),8890=>array(116,0,404,701),8891=>array(98,0,634,740),8892=>array(98,0,634,740),8893=>array(98,0,634,740),8894=>array(138,0,700,562),8895=>array(138,0,700,562),8896=>array(-3,-192,823,719),8897=>array(-3,-192,823,719),8898=>array(68,-192,752,719),8899=>array(68,-192,752,719),8900=>array(3,-233,491,807),8901=>array(107,285,210,409),8902=>array(122,149,504,512),8903=>array(106,15,732,613),8904=>array(106,-30,894,657),8905=>array(106,-30,894,657),8906=>array(106,-30,894,657),8907=>array(106,-30,894,657),8908=>array(106,-30,894,657),8909=>array(106,172,732,494),8910=>array(48,0,684,579),8911=>array(48,0,684,579),8912=>array(93,-3,732,630),8913=>array(106,-3,745,630),8914=>array(103,0,735,663),8915=>array(103,-14,735,649),8916=>array(186,0,652,729),8917=>array(106,-100,732,729),8918=>array(106,46,732,581),8919=>array(106,46,732,581),8920=>array(72,22,1350,609),8921=>array(72,22,1350,609),8922=>array(106,-228,732,854),8923=>array(106,-228,732,854),8924=>array(106,0,732,582),8925=>array(106,0,732,582),8926=>array(106,-105,732,667),8927=>array(106,-105,732,667),8928=>array(106,-178,732,764),8929=>array(106,-178,732,764),8930=>array(106,-141,732,767),8931=>array(106,-141,732,767),8932=>array(106,-94,732,619),8933=>array(106,-94,732,619),8934=>array(106,-138,732,582),8935=>array(106,-138,732,582),8936=>array(106,-169,732,667),8937=>array(110,-171,736,667),8938=>array(106,-130,732,756),8939=>array(106,-130,732,756),8940=>array(106,-189,732,815),8941=>array(104,-189,730,815),8942=>array(448,-93,551,715),8943=>array(115,249,884,373),8944=>array(115,-93,884,715),8945=>array(115,-93,884,715),8946=>array(43,-10,957,710),8947=>array(85,-10,786,710),8948=>array(106,76,612,550),8949=>array(85,-10,786,910),8950=>array(85,-10,786,853),8951=>array(106,76,612,686),8952=>array(85,-144,786,710),8953=>array(85,-10,786,710),8954=>array(43,-10,957,710),8955=>array(85,-10,786,710),8956=>array(106,76,612,550),8957=>array(85,-10,786,853),8958=>array(106,76,612,686),8959=>array(106,0,765,720),8960=>array(36,-18,567,514),8961=>array(56,162,540,443),8962=>array(71,0,563,596),8963=>array(205,481,632,732),8964=>array(205,0,632,251),8965=>array(205,0,632,406),8966=>array(205,0,632,513),8967=>array(154,-29,334,788),8968=>array(86,-132,293,760),8969=>array(97,-132,304,760),8970=>array(86,-132,293,760),8971=>array(97,-132,304,760),8972=>array(369,-77,759,313),8973=>array(49,-77,439,313),8974=>array(369,243,759,634),8975=>array(49,243,439,634),8976=>array(106,140,732,421),8977=>array(3,126,510,634),8984=>array(121,0,879,759),8985=>array(106,140,732,421),8988=>array(86,425,403,760),8989=>array(65,425,383,760),8990=>array(86,-70,403,264),8991=>array(65,-70,383,264),8992=>array(210,-250,497,928),8993=>array(21,-237,307,942),8996=>array(76,227,1076,575),8997=>array(76,0,1076,575),8998=>array(76,0,1414,760),8999=>array(76,0,1076,760),9000=>array(59,0,1385,729),9003=>array(0,0,1338,760),9004=>array(73,-91,800,748),9075=>array(81,0,304,547),9076=>array(91,-208,580,560),9077=>array(66,-14,769,547),9082=>array(55,-12,611,559),9085=>array(13,-228,745,102),9095=>array(76,0,1096,748),9108=>array(17,0,856,727),9115=>array(86,-252,414,946),9116=>array(86,-252,181,942),9117=>array(86,-240,414,942),9118=>array(86,-252,414,946),9119=>array(319,-252,414,942),9120=>array(86,-240,414,942),9121=>array(86,-252,414,928),9122=>array(86,-252,181,942),9123=>array(86,-240,414,942),9124=>array(86,-252,414,928),9125=>array(319,-252,414,935),9126=>array(86,-240,414,935),9127=>array(330,-261,668,928),9128=>array(82,-252,420,940),9129=>array(330,-240,668,940),9130=>array(330,-256,420,943),9131=>array(82,-261,420,928),9132=>array(330,-252,668,940),9133=>array(82,-240,420,940),9134=>array(210,-250,307,942),9166=>array(27,65,781,729),9167=>array(91,0,854,596),9187=>array(73,-91,800,748),9189=>array(3,75,766,444),9192=>array(43,-129,601,294),9250=>array(-62,-14,580,760),9251=>array(71,-228,563,102),9312=>array(74,-10,822,738),9313=>array(74,-10,822,738),9314=>array(74,-10,822,738),9315=>array(74,-10,822,738),9316=>array(74,-10,822,738),9317=>array(74,-10,822,738),9318=>array(74,-10,822,738),9319=>array(74,-10,822,738),9320=>array(74,-10,822,738),9321=>array(74,-10,822,738),9472=>array(-10,242,612,326),9473=>array(-10,200,612,368),9474=>array(262,-302,340,973),9475=>array(223,-302,379,973),9476=>array(-10,242,612,326),9477=>array(-10,200,612,368),9478=>array(262,-302,340,973),9479=>array(223,-302,379,973),9480=>array(-10,242,612,326),9481=>array(-10,200,612,368),9482=>array(262,-302,340,973),9483=>array(223,-302,379,973),9484=>array(262,-302,612,326),9485=>array(262,-302,612,368),9486=>array(223,-302,612,326),9487=>array(223,-302,612,368),9488=>array(-10,-302,340,326),9489=>array(-10,-302,340,368),9490=>array(-10,-302,379,326),9491=>array(-10,-302,379,368),9492=>array(262,242,612,973),9493=>array(262,200,612,973),9494=>array(223,242,612,973),9495=>array(223,200,612,973),9496=>array(-10,242,340,973),9497=>array(-10,200,340,973),9498=>array(-10,242,379,973),9499=>array(-10,200,379,973),9500=>array(262,-302,612,973),9501=>array(262,-302,612,973),9502=>array(223,-302,612,973),9503=>array(223,-302,612,973),9504=>array(223,-302,612,973),9505=>array(223,-302,612,973),9506=>array(223,-302,612,973),9507=>array(223,-302,612,973),9508=>array(-10,-302,340,973),9509=>array(-10,-302,340,973),9510=>array(-10,-302,379,973),9511=>array(-10,-302,379,973),9512=>array(-10,-302,379,973),9513=>array(-10,-302,379,973),9514=>array(-10,-302,379,973),9515=>array(-10,-302,379,973),9516=>array(-10,-302,612,326),9517=>array(-10,-302,612,368),9518=>array(-10,-302,612,368),9519=>array(-10,-302,612,368),9520=>array(-10,-302,612,326),9521=>array(-10,-302,612,368),9522=>array(-10,-302,612,368),9523=>array(-10,-302,612,368),9524=>array(-10,242,612,973),9525=>array(-10,200,612,973),9526=>array(-10,200,612,973),9527=>array(-10,200,612,973),9528=>array(-10,242,612,973),9529=>array(-10,200,612,973),9530=>array(-10,200,612,973),9531=>array(-10,200,612,973),9532=>array(-10,-302,612,973),9533=>array(-10,-302,612,973),9534=>array(-10,-302,612,973),9535=>array(-10,-302,612,973),9536=>array(-10,-302,612,973),9537=>array(-10,-302,612,973),9538=>array(-10,-302,612,973),9539=>array(-10,-302,612,973),9540=>array(-10,-302,612,973),9541=>array(-10,-302,612,973),9542=>array(-10,-302,612,973),9543=>array(-10,-302,612,973),9544=>array(-10,-302,612,973),9545=>array(-10,-302,612,973),9546=>array(-10,-302,612,973),9547=>array(-10,-302,612,973),9548=>array(-10,242,612,326),9549=>array(-10,200,612,368),9550=>array(262,-302,340,973),9551=>array(223,-302,379,973),9552=>array(-10,158,612,410),9553=>array(184,-302,418,973),9554=>array(262,-302,612,410),9555=>array(184,-302,612,326),9556=>array(184,-302,612,410),9557=>array(-10,-302,340,410),9558=>array(-10,-302,418,326),9559=>array(-10,-302,418,410),9560=>array(262,158,612,973),9561=>array(184,242,612,973),9562=>array(184,158,612,973),9563=>array(-10,158,340,973),9564=>array(-10,242,418,973),9565=>array(-10,158,418,973),9566=>array(262,-302,612,973),9567=>array(184,-302,612,973),9568=>array(184,-302,612,973),9569=>array(-10,-302,340,973),9570=>array(-10,-302,418,973),9571=>array(-10,-302,418,973),9572=>array(-10,-302,612,410),9573=>array(-10,-302,612,326),9574=>array(-10,-302,612,410),9575=>array(-10,158,612,973),9576=>array(-10,242,612,973),9577=>array(-10,158,612,973),9578=>array(-10,-302,612,973),9579=>array(-10,-302,612,973),9580=>array(-10,-302,612,973),9581=>array(262,-302,612,326),9582=>array(-10,-302,340,326),9583=>array(-10,242,340,973),9584=>array(262,242,612,973),9585=>array(-53,-302,655,973),9586=>array(-53,-302,655,973),9587=>array(-53,-302,655,973),9588=>array(-10,242,311,326),9589=>array(262,284,340,973),9590=>array(311,242,612,326),9591=>array(262,-302,340,284),9592=>array(-10,200,311,368),9593=>array(223,284,379,973),9594=>array(311,200,612,368),9595=>array(223,-302,379,284),9596=>array(-10,200,612,368),9597=>array(223,-302,379,973),9598=>array(-10,200,612,368),9599=>array(223,-302,379,973),9600=>array(-10,260,779,770),9601=>array(-10,-250,779,-123),9602=>array(-10,-250,779,-5),9603=>array(-10,-250,779,132),9604=>array(-10,-250,779,260),9605=>array(-10,-250,779,387),9606=>array(-10,-250,779,515),9607=>array(-10,-250,779,642),9608=>array(-10,-250,779,770),9609=>array(-10,-250,680,770),9610=>array(-10,-250,582,770),9611=>array(-10,-250,483,770),9612=>array(-10,-250,384,770),9613=>array(-10,-250,286,770),9614=>array(-10,-250,187,770),9615=>array(-10,-250,88,770),9616=>array(384,-250,778,770),9617=>array(-10,-250,680,770),9618=>array(-10,-250,775,770),9619=>array(-10,-250,779,770),9620=>array(-10,642,779,770),9621=>array(680,-250,778,770),9622=>array(-10,-250,385,260),9623=>array(384,-250,779,260),9624=>array(-10,260,385,770),9625=>array(-10,-250,779,770),9626=>array(-10,-250,779,770),9627=>array(-10,-250,779,770),9628=>array(-10,-250,779,770),9629=>array(384,260,779,770),9630=>array(-10,-250,779,770),9631=>array(-10,-250,779,770),9632=>array(91,-123,854,643),9633=>array(91,-123,854,643),9634=>array(91,-123,854,643),9635=>array(91,-123,854,643),9636=>array(91,-123,854,643),9637=>array(91,-123,854,643),9638=>array(91,-123,854,643),9639=>array(91,-123,854,643),9640=>array(91,-123,854,643),9641=>array(91,-123,854,643),9642=>array(91,11,587,509),9643=>array(91,11,587,509),9644=>array(91,75,854,444),9645=>array(91,75,854,444),9646=>array(91,-122,459,642),9647=>array(91,-122,459,642),9648=>array(3,75,766,444),9649=>array(3,75,766,444),9650=>array(3,-123,766,643),9651=>array(3,-123,766,643),9652=>array(3,11,499,509),9653=>array(3,11,499,509),9654=>array(3,-123,766,643),9655=>array(3,-123,766,643),9656=>array(3,11,499,509),9657=>array(3,11,499,509),9658=>array(3,11,766,509),9659=>array(3,11,766,509),9660=>array(3,-123,766,643),9661=>array(3,-123,766,643),9662=>array(3,11,499,509),9663=>array(3,11,499,509),9664=>array(3,-123,766,643),9665=>array(3,-123,766,643),9666=>array(3,11,499,509),9667=>array(3,11,499,509),9668=>array(3,11,766,509),9669=>array(3,11,766,509),9670=>array(3,-123,766,643),9671=>array(3,-123,766,643),9672=>array(3,-123,766,643),9673=>array(55,-125,818,645),9674=>array(3,-233,491,807),9675=>array(55,-125,818,645),9676=>array(56,-125,817,644),9677=>array(55,-125,818,645),9678=>array(55,-125,818,645),9679=>array(55,-123,818,641),9680=>array(55,-123,818,641),9681=>array(55,-123,818,641),9682=>array(55,-123,818,641),9683=>array(55,-123,818,641),9684=>array(55,-123,818,641),9685=>array(55,-123,818,641),9686=>array(55,-125,436,645),9687=>array(91,-125,472,645),9688=>array(91,-10,700,770),9689=>array(91,-250,879,770),9690=>array(91,260,879,770),9691=>array(91,-250,879,260),9692=>array(3,260,384,645),9693=>array(3,260,384,645),9694=>array(3,-125,384,260),9695=>array(3,-125,384,260),9696=>array(55,260,818,645),9697=>array(55,-125,818,260),9698=>array(3,-123,766,643),9699=>array(3,-123,766,643),9700=>array(3,-123,766,643),9701=>array(3,-123,766,643),9702=>array(150,227,440,516),9703=>array(91,-123,854,643),9704=>array(91,-123,854,643),9705=>array(91,-123,854,643),9706=>array(91,-123,854,643),9707=>array(91,-123,854,643),9708=>array(3,-123,766,643),9709=>array(3,-123,766,643),9710=>array(3,-123,766,643),9711=>array(55,-250,1064,770),9712=>array(91,-123,854,643),9713=>array(91,-123,854,643),9714=>array(91,-123,854,643),9715=>array(91,-123,854,643),9716=>array(55,-123,818,641),9717=>array(55,-123,818,641),9718=>array(55,-123,818,641),9719=>array(55,-123,818,641),9720=>array(3,-123,766,643),9721=>array(3,-123,766,643),9722=>array(3,-123,766,643),9723=>array(91,-66,739,585),9724=>array(91,-66,739,585),9725=>array(91,-17,642,537),9726=>array(91,-17,642,537),9727=>array(3,-123,766,643),9728=>array(83,0,813,729),9729=>array(51,-2,949,360),9730=>array(49,0,848,729),9731=>array(83,-0,813,927),9732=>array(64,0,833,880),9733=>array(65,-4,832,723),9734=>array(65,-4,832,723),9735=>array(83,2,490,729),9736=>array(83,0,813,731),9737=>array(83,0,813,730),9738=>array(61,0,828,727),9739=>array(61,0,828,723),9740=>array(61,-1,610,722),9741=>array(61,0,952,723),9742=>array(68,0,1177,729),9743=>array(71,0,1180,729),9744=>array(90,0,807,729),9745=>array(89,0,808,729),9746=>array(89,0,808,729),9747=>array(75,78,457,656),9748=>array(49,0,870,933),9749=>array(74,0,822,731),9750=>array(84,0,813,731),9751=>array(84,0,813,727),9752=>array(78,0,819,729),9753=>array(83,140,813,574),9754=>array(84,113,813,569),9755=>array(84,113,813,569),9756=>array(87,104,810,569),9757=>array(72,0,537,724),9758=>array(86,103,810,569),9759=>array(72,-3,537,720),9760=>array(61,0,835,730),9761=>array(84,0,813,730),9762=>array(83,0,813,730),9763=>array(49,0,848,730),9764=>array(49,-2,620,727),9765=>array(83,0,663,731),9766=>array(83,-1,566,731),9767=>array(83,0,701,911),9768=>array(83,0,462,730),9769=>array(83,-1,813,729),9770=>array(87,0,810,730),9771=>array(83,0,814,731),9772=>array(83,0,627,731),9773=>array(83,0,813,730),9774=>array(83,0,813,730),9775=>array(83,0,813,730),9776=>array(83,0,813,729),9777=>array(83,0,814,729),9778=>array(83,0,813,729),9779=>array(83,0,813,729),9780=>array(83,0,813,729),9781=>array(83,0,813,729),9782=>array(83,0,813,729),9783=>array(83,0,813,729),9784=>array(66,-11,831,735),9785=>array(83,-73,959,804),9786=>array(83,-73,959,804),9787=>array(83,-73,959,804),9788=>array(83,0,813,730),9789=>array(358,0,814,730),9790=>array(83,0,539,730),9791=>array(85,-102,528,732),9792=>array(85,-125,647,731),9793=>array(85,-14,647,843),9794=>array(79,-14,831,720),9795=>array(166,0,730,730),9796=>array(219,0,677,730),9797=>array(121,0,774,730),9798=>array(127,0,769,730),9799=>array(240,0,656,730),9800=>array(45,0,851,731),9801=>array(89,0,807,730),9802=>array(94,0,802,731),9803=>array(113,31,784,679),9804=>array(140,0,756,730),9805=>array(53,-180,843,730),9806=>array(83,52,813,653),9807=>array(34,-96,863,730),9808=>array(83,-0,813,730),9809=>array(94,0,802,730),9810=>array(86,153,810,579),9811=>array(157,0,739,730),9812=>array(98,0,798,730),9813=>array(110,0,786,730),9814=>array(167,-1,729,729),9815=>array(214,0,683,730),9816=>array(165,0,732,730),9817=>array(148,-0,748,730),9818=>array(98,0,798,730),9819=>array(110,0,786,730),9820=>array(167,-1,729,729),9821=>array(214,0,683,730),9822=>array(162,0,734,730),9823=>array(148,-0,748,730),9824=>array(158,0,738,729),9825=>array(90,0,806,727),9826=>array(168,0,728,729),9827=>array(111,0,785,729),9828=>array(157,0,739,729),9829=>array(89,0,808,729),9830=>array(168,0,728,729),9831=>array(111,0,785,732),9832=>array(105,-1,791,729),9833=>array(84,-5,339,729),9834=>array(84,-5,554,729),9835=>array(184,-102,712,729),9836=>array(92,-5,804,729),9837=>array(88,-3,392,731),9838=>array(84,0,273,731),9839=>array(84,0,400,731),9840=>array(84,0,664,731),9841=>array(64,0,701,731),9842=>array(84,0,813,709),9843=>array(76,16,820,731),9844=>array(76,16,820,731),9845=>array(76,16,820,731),9846=>array(76,16,820,731),9847=>array(76,16,820,731),9848=>array(76,16,820,731),9849=>array(76,16,820,731),9850=>array(76,16,820,731),9851=>array(84,0,812,704),9852=>array(83,0,814,731),9853=>array(83,0,814,731),9854=>array(83,0,814,731),9855=>array(149,1,747,731),9856=>array(73,0,797,725),9857=>array(73,0,797,725),9858=>array(73,0,797,725),9859=>array(73,0,797,725),9860=>array(73,0,797,725),9861=>array(73,0,797,725),9862=>array(83,0,813,731),9863=>array(83,0,813,731),9864=>array(83,0,813,731),9865=>array(83,0,813,731),9866=>array(83,0,813,98),9867=>array(83,0,813,98),9868=>array(83,0,813,413),9869=>array(83,0,813,413),9870=>array(83,0,813,413),9871=>array(83,0,813,413),9872=>array(168,3,728,731),9873=>array(168,3,728,731),9874=>array(52,0,844,731),9875=>array(97,-10,799,732),9876=>array(131,0,765,729),9877=>array(61,-10,479,732),9878=>array(59,-10,837,732),9879=>array(61,0,835,732),9880=>array(145,0,750,732),9881=>array(95,-17,802,727),9882=>array(128,-9,768,733),9883=>array(127,0,769,728),9884=>array(127,0,769,729),9888=>array(49,0,848,729),9889=>array(83,2,619,730),9890=>array(85,-125,919,731),9891=>array(79,-206,1023,720),9892=>array(85,-186,1109,856),9893=>array(85,-125,837,917),9894=>array(131,-14,727,869),9895=>array(101,-170,741,884),9896=>array(188,-14,650,869),9897=>array(4,133,829,596),9898=>array(187,133,651,596),9899=>array(187,133,651,596),9900=>array(247,194,591,537),9901=>array(174,194,664,537),9902=>array(41,169,797,560),9903=>array(5,194,833,536),9904=>array(103,237,757,540),9905=>array(211,42,626,698),9906=>array(85,-125,647,731),9907=>array(168,-125,646,731),9908=>array(86,-125,646,731),9909=>array(86,-125,646,731),9910=>array(59,-118,791,643),9911=>array(194,-104,595,710),9912=>array(158,-125,543,731),9920=>array(42,4,796,553),9921=>array(42,4,796,724),9922=>array(42,4,796,553),9923=>array(42,4,796,724),9954=>array(85,-14,647,843),9985=>array(11,190,803,635),9986=>array(42,141,784,588),9987=>array(11,94,803,539),9988=>array(36,119,824,613),9990=>array(42,-14,796,742),9991=>array(42,-14,796,742),9992=>array(59,21,782,708),9993=>array(64,107,773,622),9996=>array(212,0,561,742),9997=>array(21,83,802,678),9998=>array(89,75,724,710),9999=>array(26,198,819,530),10000=>array(89,75,724,710),10001=>array(43,185,757,544),10002=>array(67,209,757,520),10003=>array(150,97,667,630),10004=>array(116,87,721,631),10005=>array(126,72,711,657),10006=>array(85,31,752,698),10007=>array(118,-9,701,732),10008=>array(123,0,754,739),10009=>array(55,0,783,729),10010=>array(55,0,783,729),10011=>array(55,0,783,729),10012=>array(55,0,783,729),10013=>array(165,0,673,729),10014=>array(131,0,678,729),10015=>array(155,0,683,729),10016=>array(55,0,783,729),10017=>array(91,-13,747,744),10018=>array(41,-14,797,742),10019=>array(42,-12,796,742),10020=>array(41,-14,797,742),10021=>array(41,-13,797,743),10022=>array(42,-14,796,745),10023=>array(42,-14,796,745),10025=>array(23,-10,815,744),10026=>array(42,-14,796,742),10027=>array(23,-9,814,743),10028=>array(23,-10,815,744),10029=>array(23,-9,814,743),10030=>array(23,-9,814,743),10031=>array(23,-9,814,743),10032=>array(24,12,815,714),10033=>array(64,0,773,729),10034=>array(74,0,764,729),10035=>array(55,0,783,729),10036=>array(31,-14,787,742),10037=>array(41,-14,797,742),10038=>array(91,-14,747,742),10039=>array(41,-14,797,742),10040=>array(41,-14,797,742),10041=>array(41,-14,797,742),10042=>array(55,0,783,729),10043=>array(82,-14,756,742),10044=>array(82,-14,756,742),10045=>array(79,-14,759,742),10046=>array(79,-14,759,742),10047=>array(54,0,784,709),10048=>array(54,0,784,709),10049=>array(41,-14,797,742),10050=>array(42,-14,796,742),10051=>array(79,-14,759,742),10052=>array(89,0,749,729),10053=>array(76,0,762,729),10054=>array(63,2,773,729),10055=>array(79,-13,759,742),10056=>array(47,-13,791,730),10057=>array(47,-13,791,730),10058=>array(41,-13,797,743),10059=>array(41,-13,797,743),10061=>array(50,-10,847,738),10063=>array(60,-49,837,729),10064=>array(60,0,837,777),10065=>array(60,-49,837,729),10066=>array(60,0,837,777),10070=>array(83,-2,813,728),10072=>array(377,-240,460,760),10073=>array(336,-240,502,760),10074=>array(253,-240,585,760),10075=>array(85,395,264,729),10076=>array(59,395,237,729),10077=>array(85,395,479,729),10078=>array(59,395,453,729),10081=>array(155,-93,772,851),10082=>array(202,-17,636,742),10083=>array(163,-17,675,742),10084=>array(54,83,784,645),10085=>array(168,-1,729,729),10086=>array(62,21,724,702),10087=>array(78,169,759,564),10088=>array(196,-139,648,769),10089=>array(196,-139,648,769),10090=>array(264,-132,574,758),10091=>array(264,-132,574,758),10092=>array(215,-240,607,760),10093=>array(232,-240,623,760),10094=>array(142,-240,685,760),10095=>array(153,-240,696,760),10096=>array(167,-240,656,760),10097=>array(183,-240,672,760),10098=>array(346,-241,535,760),10099=>array(303,-241,492,760),10100=>array(175,-163,634,760),10101=>array(204,-163,663,760),10102=>array(74,-10,822,738),10103=>array(74,-10,822,738),10104=>array(74,-10,822,738),10105=>array(74,-10,822,738),10106=>array(74,-10,822,738),10107=>array(74,-10,822,738),10108=>array(74,-10,822,738),10109=>array(74,-10,822,738),10110=>array(74,-10,822,738),10111=>array(74,-10,822,738),10112=>array(4,-52,833,780),10113=>array(4,-52,833,780),10114=>array(4,-52,833,780),10115=>array(4,-52,833,780),10116=>array(4,-52,833,780),10117=>array(4,-52,833,780),10118=>array(4,-52,833,780),10119=>array(4,-52,833,780),10120=>array(4,-52,833,780),10121=>array(4,-52,833,780),10122=>array(4,-52,833,780),10123=>array(4,-52,833,780),10124=>array(4,-52,833,780),10125=>array(4,-52,833,780),10126=>array(4,-52,833,780),10127=>array(4,-52,833,780),10128=>array(4,-52,833,780),10129=>array(4,-52,833,780),10130=>array(4,-52,833,780),10131=>array(4,-52,833,780),10132=>array(57,75,789,552),10136=>array(123,55,682,614),10137=>array(57,100,789,527),10138=>array(123,13,682,572),10139=>array(57,129,789,498),10140=>array(57,57,764,570),10141=>array(57,100,789,527),10142=>array(57,100,789,527),10143=>array(57,100,789,527),10144=>array(57,100,789,527),10145=>array(57,65,811,562),10146=>array(111,94,789,533),10147=>array(111,94,789,533),10148=>array(111,-4,789,631),10149=>array(57,100,789,548),10150=>array(57,79,789,527),10151=>array(240,-7,606,634),10152=>array(57,100,789,527),10153=>array(57,75,765,552),10154=>array(57,75,765,552),10155=>array(21,12,794,586),10156=>array(21,12,794,586),10157=>array(135,0,774,574),10158=>array(135,0,774,574),10159=>array(62,49,799,574),10161=>array(62,49,799,574),10162=>array(154,-20,721,585),10163=>array(63,157,789,470),10164=>array(81,55,682,655),10165=>array(57,173,789,454),10166=>array(82,-29,682,572),10167=>array(82,55,682,655),10168=>array(57,172,789,455),10169=>array(82,-28,682,572),10170=>array(56,84,789,543),10171=>array(73,140,779,487),10172=>array(79,167,774,460),10173=>array(79,118,774,509),10174=>array(57,81,789,546),10181=>array(54,-163,352,769),10182=>array(39,-163,336,769),10208=>array(3,-233,491,807),10214=>array(86,-132,398,760),10215=>array(85,-132,398,760),10216=>array(89,-132,310,759),10217=>array(80,-132,301,759),10218=>array(89,-132,476,759),10219=>array(80,-132,467,759),10224=>array(44,0,794,732),10225=>array(43,-3,793,729),10226=>array(39,53,814,658),10227=>array(39,61,814,666),10228=>array(57,-14,1108,643),10229=>array(49,100,1376,527),10230=>array(57,100,1385,527),10231=>array(49,100,1385,527),10232=>array(49,100,1376,527),10233=>array(57,100,1385,527),10234=>array(49,100,1385,527),10235=>array(49,100,1376,527),10236=>array(57,100,1385,527),10237=>array(49,100,1376,527),10238=>array(57,100,1385,527),10239=>array(57,100,1385,527),10241=>array(146,635,293,781),10242=>array(146,358,293,504),10243=>array(146,358,293,781),10244=>array(146,82,293,228),10245=>array(146,82,293,781),10246=>array(146,82,293,504),10247=>array(146,82,293,781),10248=>array(439,635,586,781),10249=>array(146,635,586,781),10250=>array(146,358,586,781),10251=>array(146,358,586,781),10252=>array(146,82,586,781),10253=>array(146,82,586,781),10254=>array(146,82,586,781),10255=>array(146,82,586,781),10256=>array(439,358,586,504),10257=>array(146,358,586,781),10258=>array(146,358,586,504),10259=>array(146,358,586,781),10260=>array(146,82,586,504),10261=>array(146,82,586,781),10262=>array(146,82,586,504),10263=>array(146,82,586,781),10264=>array(439,358,586,781),10265=>array(146,358,586,781),10266=>array(146,358,586,781),10267=>array(146,358,586,781),10268=>array(146,82,586,781),10269=>array(146,82,586,781),10270=>array(146,82,586,781),10271=>array(146,82,586,781),10272=>array(439,82,586,228),10273=>array(146,82,586,781),10274=>array(146,82,586,504),10275=>array(146,82,586,781),10276=>array(146,82,586,228),10277=>array(146,82,586,781),10278=>array(146,82,586,504),10279=>array(146,82,586,781),10280=>array(439,82,586,781),10281=>array(146,82,586,781),10282=>array(146,82,586,781),10283=>array(146,82,586,781),10284=>array(146,82,586,781),10285=>array(146,82,586,781),10286=>array(146,82,586,781),10287=>array(146,82,586,781),10288=>array(439,82,586,504),10289=>array(146,82,586,781),10290=>array(146,82,586,504),10291=>array(146,82,586,781),10292=>array(146,82,586,504),10293=>array(146,82,586,781),10294=>array(146,82,586,504),10295=>array(146,82,586,781),10296=>array(439,82,586,781),10297=>array(146,82,586,781),10298=>array(146,82,586,781),10299=>array(146,82,586,781),10300=>array(146,82,586,781),10301=>array(146,82,586,781),10302=>array(146,82,586,781),10303=>array(146,82,586,781),10304=>array(146,-195,293,-49),10305=>array(146,-195,293,781),10306=>array(146,-195,293,504),10307=>array(146,-195,293,781),10308=>array(146,-195,293,228),10309=>array(146,-195,293,781),10310=>array(146,-195,293,504),10311=>array(146,-195,293,781),10312=>array(146,-195,586,781),10313=>array(146,-195,586,781),10314=>array(146,-195,586,781),10315=>array(146,-195,586,781),10316=>array(146,-195,586,781),10317=>array(146,-195,586,781),10318=>array(146,-195,586,781),10319=>array(146,-195,586,781),10320=>array(146,-195,586,504),10321=>array(146,-195,586,781),10322=>array(146,-195,586,504),10323=>array(146,-195,586,781),10324=>array(146,-195,586,504),10325=>array(146,-195,586,781),10326=>array(146,-195,586,504),10327=>array(146,-195,586,781),10328=>array(146,-195,586,781),10329=>array(146,-195,586,781),10330=>array(146,-195,586,781),10331=>array(146,-195,586,781),10332=>array(146,-195,586,781),10333=>array(146,-195,586,781),10334=>array(146,-195,586,781),10335=>array(146,-195,586,781),10336=>array(146,-195,586,228),10337=>array(146,-195,586,781),10338=>array(146,-195,586,504),10339=>array(146,-195,586,781),10340=>array(146,-195,586,228),10341=>array(146,-195,586,781),10342=>array(146,-195,586,504),10343=>array(146,-195,586,781),10344=>array(146,-195,586,781),10345=>array(146,-195,586,781),10346=>array(146,-195,586,781),10347=>array(146,-195,586,781),10348=>array(146,-195,586,781),10349=>array(146,-195,586,781),10350=>array(146,-195,586,781),10351=>array(146,-195,586,781),10352=>array(146,-195,586,504),10353=>array(146,-195,586,781),10354=>array(146,-195,586,504),10355=>array(146,-195,586,781),10356=>array(146,-195,586,504),10357=>array(146,-195,586,781),10358=>array(146,-195,586,504),10359=>array(146,-195,586,781),10360=>array(146,-195,586,781),10361=>array(146,-195,586,781),10362=>array(146,-195,586,781),10363=>array(146,-195,586,781),10364=>array(146,-195,586,781),10365=>array(146,-195,586,781),10366=>array(146,-195,586,781),10367=>array(146,-195,586,781),10368=>array(439,-195,586,-49),10369=>array(146,-195,586,781),10370=>array(146,-195,586,504),10371=>array(146,-195,586,781),10372=>array(146,-195,586,228),10373=>array(146,-195,586,781),10374=>array(146,-195,586,504),10375=>array(146,-195,586,781),10376=>array(439,-195,586,781),10377=>array(146,-195,586,781),10378=>array(146,-195,586,781),10379=>array(146,-195,586,781),10380=>array(146,-195,586,781),10381=>array(146,-195,586,781),10382=>array(146,-195,586,781),10383=>array(146,-195,586,781),10384=>array(439,-195,586,504),10385=>array(146,-195,586,781),10386=>array(146,-195,586,504),10387=>array(146,-195,586,781),10388=>array(146,-195,586,504),10389=>array(146,-195,586,781),10390=>array(146,-195,586,504),10391=>array(146,-195,586,781),10392=>array(439,-195,586,781),10393=>array(146,-195,586,781),10394=>array(146,-195,586,781),10395=>array(146,-195,586,781),10396=>array(146,-195,586,781),10397=>array(146,-195,586,781),10398=>array(146,-195,586,781),10399=>array(146,-195,586,781),10400=>array(439,-195,586,228),10401=>array(146,-195,586,781),10402=>array(146,-195,586,504),10403=>array(146,-195,586,781),10404=>array(146,-195,586,228),10405=>array(146,-195,586,781),10406=>array(146,-195,586,504),10407=>array(146,-195,586,781),10408=>array(439,-195,586,781),10409=>array(146,-195,586,781),10410=>array(146,-195,586,781),10411=>array(146,-195,586,781),10412=>array(146,-195,586,781),10413=>array(146,-195,586,781),10414=>array(146,-195,586,781),10415=>array(146,-195,586,781),10416=>array(439,-195,586,504),10417=>array(146,-195,586,781),10418=>array(146,-195,586,504),10419=>array(146,-195,586,781),10420=>array(146,-195,586,504),10421=>array(146,-195,586,781),10422=>array(146,-195,586,504),10423=>array(146,-195,586,781),10424=>array(439,-195,586,781),10425=>array(146,-195,586,781),10426=>array(146,-195,586,781),10427=>array(146,-195,586,781),10428=>array(146,-195,586,781),10429=>array(146,-195,586,781),10430=>array(146,-195,586,781),10431=>array(146,-195,586,781),10432=>array(146,-195,586,-49),10433=>array(146,-195,586,781),10434=>array(146,-195,586,504),10435=>array(146,-195,586,781),10436=>array(146,-195,586,228),10437=>array(146,-195,586,781),10438=>array(146,-195,586,504),10439=>array(146,-195,586,781),10440=>array(146,-195,586,781),10441=>array(146,-195,586,781),10442=>array(146,-195,586,781),10443=>array(146,-195,586,781),10444=>array(146,-195,586,781),10445=>array(146,-195,586,781),10446=>array(146,-195,586,781),10447=>array(146,-195,586,781),10448=>array(146,-195,586,504),10449=>array(146,-195,586,781),10450=>array(146,-195,586,504),10451=>array(146,-195,586,781),10452=>array(146,-195,586,504),10453=>array(146,-195,586,781),10454=>array(146,-195,586,504),10455=>array(146,-195,586,781),10456=>array(146,-195,586,781),10457=>array(146,-195,586,781),10458=>array(146,-195,586,781),10459=>array(146,-195,586,781),10460=>array(146,-195,586,781),10461=>array(146,-195,586,781),10462=>array(146,-195,586,781),10463=>array(146,-195,586,781),10464=>array(146,-195,586,228),10465=>array(146,-195,586,781),10466=>array(146,-195,586,504),10467=>array(146,-195,586,781),10468=>array(146,-195,586,228),10469=>array(146,-195,586,781),10470=>array(146,-195,586,504),10471=>array(146,-195,586,781),10472=>array(146,-195,586,781),10473=>array(146,-195,586,781),10474=>array(146,-195,586,781),10475=>array(146,-195,586,781),10476=>array(146,-195,586,781),10477=>array(146,-195,586,781),10478=>array(146,-195,586,781),10479=>array(146,-195,586,781),10480=>array(146,-195,586,504),10481=>array(146,-195,586,781),10482=>array(146,-195,586,504),10483=>array(146,-195,586,781),10484=>array(146,-195,586,504),10485=>array(146,-195,586,781),10486=>array(146,-195,586,504),10487=>array(146,-195,586,781),10488=>array(146,-195,586,781),10489=>array(146,-195,586,781),10490=>array(146,-195,586,781),10491=>array(146,-195,586,781),10492=>array(146,-195,586,781),10493=>array(146,-195,586,781),10494=>array(146,-195,586,781),10495=>array(146,-195,586,781),10502=>array(49,100,781,527),10503=>array(57,100,789,527),10506=>array(125,0,713,732),10507=>array(125,-3,713,729),10560=>array(39,63,644,838),10561=>array(39,63,644,838),10627=>array(125,-163,609,760),10628=>array(125,-163,609,760),10702=>array(106,-226,732,747),10703=>array(106,15,894,612),10704=>array(106,15,894,612),10705=>array(106,-30,894,657),10706=>array(106,-30,894,657),10707=>array(106,-30,894,657),10708=>array(106,-30,894,657),10709=>array(106,-30,894,657),10731=>array(3,-233,491,807),10746=>array(106,0,732,627),10747=>array(106,0,732,627),10752=>array(28,-198,972,748),10753=>array(28,-198,972,748),10754=>array(28,-198,972,748),10764=>array(57,-212,1268,757),10765=>array(57,-212,464,757),10766=>array(57,-212,464,757),10767=>array(57,-212,464,757),10768=>array(57,-212,464,757),10769=>array(57,-212,522,757),10770=>array(57,-212,464,757),10771=>array(57,-212,464,757),10772=>array(57,-212,555,757),10773=>array(57,-212,464,757),10774=>array(57,-212,464,757),10775=>array(-32,-212,553,757),10776=>array(57,-212,464,757),10777=>array(57,-212,464,757),10778=>array(57,-212,464,757),10779=>array(57,-212,469,872),10780=>array(52,-327,464,757),10799=>array(137,31,701,596),10858=>array(106,228,732,552),10859=>array(106,78,732,552),10877=>array(106,-123,732,581),10878=>array(106,-123,732,581),10879=>array(106,-123,733,581),10880=>array(106,-123,732,581),10881=>array(106,-123,732,644),10882=>array(106,-123,732,644),10883=>array(106,-123,733,759),10884=>array(106,-123,732,756),10885=>array(106,-132,732,663),10886=>array(106,-132,732,663),10887=>array(106,-121,732,582),10888=>array(106,-121,732,582),10889=>array(106,-204,732,663),10890=>array(106,-204,732,663),10891=>array(106,-311,732,791),10892=>array(106,-311,732,791),10893=>array(106,-124,732,663),10894=>array(106,-124,732,663),10895=>array(106,-241,732,756),10896=>array(106,-241,732,756),10897=>array(106,-229,732,730),10898=>array(106,-229,732,730),10899=>array(106,-224,732,741),10900=>array(106,-224,732,741),10901=>array(106,-61,732,644),10902=>array(106,-61,732,644),10903=>array(106,-61,733,644),10904=>array(106,-61,732,644),10905=>array(106,-36,732,685),10906=>array(106,-36,732,685),10907=>array(106,-31,732,725),10908=>array(106,-31,732,725),10909=>array(106,8,732,645),10910=>array(106,23,732,645),10911=>array(106,-176,732,729),10912=>array(106,-176,732,729),10926=>array(106,50,732,601),10927=>array(106,-24,732,667),10928=>array(106,-24,732,667),10929=>array(106,-145,732,667),10930=>array(106,-145,732,667),10931=>array(106,-121,732,662),10932=>array(106,-121,732,662),10933=>array(106,-195,732,662),10934=>array(106,-195,732,662),10935=>array(106,-191,732,693),10936=>array(106,-191,732,693),10937=>array(106,-259,732,693),10938=>array(106,-259,732,693),11001=>array(106,-171,732,585),11002=>array(106,-171,732,585),11008=>array(88,-27,703,587),11009=>array(141,-27,755,587),11010=>array(88,25,703,640),11011=>array(141,25,755,640),11012=>array(27,65,789,562),11013=>array(27,65,781,562),11014=>array(171,0,667,754),11015=>array(171,-25,667,729),11016=>array(88,-27,703,587),11017=>array(141,-27,755,587),11018=>array(88,25,703,640),11019=>array(141,25,755,640),11020=>array(27,65,789,562),11021=>array(171,-25,667,754),11022=>array(57,-3,790,355),11023=>array(57,272,790,630),11024=>array(35,-3,768,355),11025=>array(35,272,768,630),11026=>array(91,-123,854,643),11027=>array(91,-123,854,643),11028=>array(91,-123,854,643),11029=>array(91,-123,854,643),11030=>array(3,-123,766,643),11031=>array(3,-123,766,643),11032=>array(3,-123,766,643),11033=>array(3,-123,766,643),11034=>array(91,-123,854,643),11039=>array(18,-26,852,767),11040=>array(18,-26,852,767),11041=>array(73,-91,800,748),11042=>array(73,-91,800,748),11043=>array(17,-35,856,692),11044=>array(55,-250,1064,770),11091=>array(38,-47,832,788),11092=>array(38,-47,832,788),11360=>array(5,0,552,729),11361=>array(5,0,271,760),11362=>array(-20,0,552,729),11363=>array(5,0,569,729),11364=>array(98,-200,666,729),11365=>array(35,-46,576,592),11366=>array(-12,-93,384,822),11367=>array(98,-157,752,729),11368=>array(91,-138,639,760),11369=>array(98,-157,677,729),11370=>array(91,-138,576,760),11371=>array(45,-157,738,729),11372=>array(43,-138,572,547),11373=>array(56,-14,683,743),11374=>array(98,-200,765,729),11375=>array(8,0,676,729),11376=>array(56,-14,683,743),11377=>array(30,0,734,560),11378=>array(33,0,1128,742),11379=>array(42,0,961,560),11380=>array(51,0,562,587),11381=>array(98,0,555,729),11382=>array(94,0,477,547),11383=>array(55,-12,602,551),11385=>array(0,-13,320,760),11386=>array(55,-14,557,560),11387=>array(48,0,400,547),11388=>array(-11,-117,116,425),11389=>array(5,326,426,734),11390=>array(66,-242,598,742),11391=>array(45,-242,640,729),11520=>array(60,-63,544,547),11521=>array(24,-235,556,546),11522=>array(39,-235,535,546),11523=>array(62,-10,572,807),11524=>array(51,-235,537,546),11525=>array(39,-236,862,546),11526=>array(0,-8,575,816),11527=>array(53,0,900,546),11528=>array(69,0,542,546),11529=>array(51,-235,556,816),11530=>array(39,0,903,546),11531=>array(53,-8,595,816),11532=>array(39,0,544,816),11533=>array(51,0,887,546),11534=>array(51,0,556,546),11535=>array(69,-235,767,816),11536=>array(51,0,880,816),11537=>array(51,0,545,816),11538=>array(50,-235,536,546),11539=>array(51,-235,884,661),11540=>array(60,-235,892,546),11541=>array(49,-235,784,816),11542=>array(39,0,545,546),11543=>array(51,-235,556,547),11544=>array(51,-235,551,546),11545=>array(39,-235,541,816),11546=>array(42,-235,532,547),11547=>array(60,-9,596,816),11548=>array(39,-235,870,547),11549=>array(29,-235,545,546),11550=>array(47,-235,547,546),11551=>array(34,-235,547,567),11552=>array(39,0,875,546),11553=>array(49,-235,544,816),11554=>array(60,0,538,626),11555=>array(61,-235,553,816),11556=>array(51,-235,603,546),11557=>array(60,-8,841,816),11568=>array(55,-14,591,380),11569=>array(56,-14,832,742),11570=>array(56,-14,832,742),11571=>array(31,0,651,729),11572=>array(33,0,652,729),11573=>array(31,0,604,729),11574=>array(73,0,488,729),11575=>array(8,0,676,729),11576=>array(8,0,676,729),11577=>array(98,0,568,729),11578=>array(64,0,534,729),11579=>array(73,-14,609,742),11580=>array(107,0,811,729),11581=>array(45,0,665,729),11582=>array(73,0,437,729),11583=>array(45,0,665,729),11584=>array(56,-14,832,742),11585=>array(56,-52,832,781),11586=>array(73,0,197,729),11587=>array(20,0,610,729),11588=>array(98,0,654,729),11589=>array(30,0,654,729),11590=>array(73,0,454,729),11591=>array(45,0,629,729),11592=>array(73,301,571,426),11593=>array(98,0,568,729),11594=>array(54,0,448,729),11595=>array(54,-15,899,742),11596=>array(54,0,725,729),11597=>array(98,0,650,729),11598=>array(100,0,566,729),11599=>array(98,0,197,729),11600=>array(54,0,725,729),11601=>array(98,0,198,729),11602=>array(78,-14,705,729),11603=>array(48,-14,584,742),11604=>array(56,-14,832,742),11605=>array(56,-54,832,742),11606=>array(98,0,654,729),11607=>array(98,0,222,729),11608=>array(73,0,676,729),11609=>array(56,-14,832,742),11610=>array(56,-14,832,780),11611=>array(56,-14,681,742),11612=>array(49,0,719,729),11613=>array(30,0,654,729),11614=>array(56,-14,681,742),11615=>array(98,0,568,729),11616=>array(8,0,676,729),11617=>array(98,0,654,729),11618=>array(98,0,559,729),11619=>array(56,0,732,729),11620=>array(98,0,495,729),11621=>array(56,0,732,729),11631=>array(26,522,489,729),11800=>array(70,-14,459,728),11806=>array(106,78,732,399),11810=>array(86,403,293,760),11811=>array(97,403,304,760),11812=>array(86,-132,293,225),11813=>array(97,-132,304,225),11822=>array(72,0,461,742),19904=>array(83,-158,813,729),19905=>array(83,-158,813,729),19906=>array(83,-158,813,729),19907=>array(83,-158,813,729),19908=>array(83,-158,813,729),19909=>array(83,-158,813,729),19910=>array(83,-158,813,729),19911=>array(83,-158,813,729),19912=>array(83,-158,813,729),19913=>array(83,-158,814,729),19914=>array(83,-158,813,729),19915=>array(83,-158,813,729),19916=>array(83,-158,813,729),19917=>array(83,-158,813,729),19918=>array(83,-158,813,729),19919=>array(83,-158,813,729),19920=>array(83,-158,814,729),19921=>array(83,-158,813,729),19922=>array(83,-158,814,729),19923=>array(83,-158,813,729),19924=>array(83,-158,813,729),19925=>array(83,-158,813,729),19926=>array(83,-158,813,729),19927=>array(83,-158,813,729),19928=>array(83,-158,813,729),19929=>array(83,-158,813,729),19930=>array(83,-158,813,729),19931=>array(83,-158,814,729),19932=>array(83,-158,813,729),19933=>array(83,-158,813,729),19934=>array(83,-158,814,729),19935=>array(83,-158,813,729),19936=>array(83,-158,813,729),19937=>array(83,-158,813,729),19938=>array(83,-158,813,729),19939=>array(83,-158,813,729),19940=>array(83,-158,813,729),19941=>array(83,-158,814,729),19942=>array(83,-158,813,729),19943=>array(83,-158,813,729),19944=>array(83,-158,814,729),19945=>array(83,-158,813,729),19946=>array(83,-158,814,729),19947=>array(83,-158,813,729),19948=>array(83,-158,814,729),19949=>array(83,-158,813,729),19950=>array(83,-158,814,729),19951=>array(83,-158,813,729),19952=>array(83,-158,814,729),19953=>array(83,-158,813,729),19954=>array(83,-158,813,729),19955=>array(83,-158,813,729),19956=>array(83,-158,813,729),19957=>array(83,-158,814,729),19958=>array(83,-158,813,729),19959=>array(83,-158,813,729),19960=>array(83,-158,813,729),19961=>array(83,-158,814,729),19962=>array(83,-158,813,729),19963=>array(83,-158,814,729),19964=>array(83,-158,814,729),19965=>array(83,-158,813,729),19966=>array(83,-158,813,729),19967=>array(83,-158,813,729),42192=>array(98,0,615,729),42193=>array(98,0,569,729),42194=>array(34,0,505,729),42195=>array(98,0,711,729),42196=>array(-3,0,614,729),42197=>array(-3,0,614,729),42198=>array(56,-14,693,742),42199=>array(98,0,677,729),42200=>array(-21,0,558,729),42201=>array(0,-14,414,729),42202=>array(56,-14,644,742),42203=>array(56,-14,644,742),42204=>array(45,0,640,729),42205=>array(98,0,517,729),42206=>array(98,0,517,729),42207=>array(98,0,765,729),42208=>array(98,0,650,729),42209=>array(98,0,552,729),42210=>array(66,-14,579,742),42211=>array(98,0,666,729),42212=>array(29,0,597,729),42213=>array(8,0,676,729),42214=>array(8,0,676,729),42215=>array(98,0,654,729),42216=>array(80,-14,716,742),42217=>array(98,0,512,743),42218=>array(33,0,956,729),42219=>array(30,0,654,729),42220=>array(-2,0,613,729),42221=>array(71,0,588,729),42222=>array(8,0,676,729),42223=>array(8,0,676,729),42224=>array(98,0,568,729),42225=>array(64,0,534,729),42226=>array(98,0,197,729),42227=>array(56,-14,731,742),42228=>array(87,-14,645,729),42229=>array(87,0,645,743),42230=>array(4,0,458,729),42231=>array(56,0,669,729),42232=>array(85,0,214,155),42233=>array(71,-156,214,155),42234=>array(85,0,511,155),42235=>array(85,-156,511,155),42236=>array(71,-156,214,517),42237=>array(85,0,214,517),42238=>array(85,0,502,354),42239=>array(85,172,502,454),42564=>array(56,-14,569,742),42565=>array(49,-14,467,560),42566=>array(98,0,347,729),42567=>array(81,0,304,547),42572=>array(58,-14,1122,645),42573=>array(74,-14,954,471),42576=>array(29,0,931,729),42577=>array(30,0,817,560),42580=>array(56,-14,977,742),42581=>array(55,-14,748,560),42582=>array(103,0,968,729),42583=>array(94,-14,752,560),42594=>array(49,-157,1004,729),42595=>array(52,-138,863,547),42596=>array(41,0,1008,729),42597=>array(37,0,852,547),42598=>array(98,0,1120,729),42599=>array(91,0,959,547),42600=>array(56,-14,731,742),42601=>array(55,-14,557,560),42602=>array(56,-14,799,742),42603=>array(55,-14,658,560),42604=>array(56,-14,1302,742),42605=>array(55,-14,964,560),42606=>array(28,-208,851,743),42634=>array(-3,-200,758,729),42635=>array(29,-208,660,547),42636=>array(-3,0,614,729),42637=>array(29,0,553,547),42644=>array(85,0,587,729),42645=>array(91,0,549,760),42760=>array(104,0,389,668),42761=>array(104,0,389,668),42762=>array(104,0,389,668),42763=>array(104,0,389,668),42764=>array(104,0,389,668),42765=>array(104,0,389,668),42766=>array(104,0,389,668),42767=>array(104,0,389,668),42768=>array(104,0,389,668),42769=>array(104,0,389,668),42770=>array(104,0,389,668),42771=>array(104,0,389,668),42772=>array(104,0,389,668),42773=>array(104,0,389,668),42774=>array(104,0,389,668),42779=>array(50,326,319,736),42780=>array(50,324,319,734),42781=>array(95,326,158,734),42782=>array(95,326,158,734),42783=>array(95,0,158,408),42786=>array(67,0,350,729),42787=>array(67,0,321,547),42788=>array(56,224,411,742),42789=>array(56,42,411,560),42790=>array(98,-200,654,729),42791=>array(91,-208,549,760),42792=>array(-3,-213,819,729),42793=>array(27,-213,650,702),42794=>array(80,-14,560,742),42795=>array(65,-200,473,561),42800=>array(91,0,437,547),42801=>array(54,-14,472,560),42802=>array(8,0,1241,729),42803=>array(60,-14,894,560),42804=>array(8,-14,1147,742),42805=>array(60,-14,935,560),42806=>array(8,-14,1055,729),42807=>array(60,-14,890,560),42808=>array(8,0,963,729),42809=>array(60,-14,788,560),42810=>array(8,0,963,729),42811=>array(60,-14,788,560),42812=>array(8,-208,951,729),42813=>array(60,-208,788,560),42814=>array(56,-14,644,742),42815=>array(62,-14,495,560),42816=>array(5,0,677,729),42817=>array(7,0,580,760),42822=>array(98,0,675,729),42823=>array(94,0,298,760),42824=>array(41,0,576,729),42825=>array(59,0,368,760),42826=>array(5,-14,802,742),42827=>array(5,-14,694,560),42830=>array(56,-14,1302,742),42831=>array(55,-14,964,560),42832=>array(5,0,569,729),42833=>array(-2,-208,580,560),42834=>array(24,0,700,729),42835=>array(24,-208,720,560),42838=>array(56,-178,731,742),42839=>array(55,-208,637,560),42852=>array(5,0,569,729),42853=>array(-2,-208,580,760),42854=>array(5,0,569,729),42855=>array(-2,-208,580,760),42880=>array(5,0,459,729),42881=>array(94,-208,184,560),42882=>array(98,-208,637,742),42883=>array(91,-208,549,560),42889=>array(117,0,220,517),42890=>array(78,161,298,380),42891=>array(151,235,250,729),42892=>array(96,458,179,729),42893=>array(85,0,587,729),42894=>array(38,-208,416,760),42896=>array(98,-157,733,729),42897=>array(91,-138,621,560),42912=>array(2,-14,778,742),42913=>array(2,-208,633,560),42914=>array(2,0,677,729),42915=>array(2,0,577,760),42916=>array(2,0,746,729),42917=>array(2,0,633,560),42918=>array(2,0,693,729),42919=>array(2,0,411,560),42920=>array(2,-14,633,742),42921=>array(2,-14,519,560),42922=>array(-51,0,703,729),43002=>array(91,0,824,547),43003=>array(58,0,477,729),43004=>array(34,0,505,729),43005=>array(98,0,765,729),43006=>array(98,0,197,928),43007=>array(33,0,1167,729),61184=>array(95,602,323,668),61185=>array(69,451,342,668),61186=>array(54,301,361,668),61187=>array(47,150,368,668),61188=>array(44,0,372,668),61189=>array(69,451,342,668),61190=>array(95,451,323,518),61191=>array(69,301,342,518),61192=>array(54,150,361,518),61193=>array(47,0,368,518),61194=>array(54,301,361,668),61195=>array(69,301,342,518),61196=>array(95,301,323,367),61197=>array(69,150,342,367),61198=>array(54,0,361,367),61199=>array(47,150,368,668),61200=>array(54,150,361,518),61201=>array(69,150,342,367),61202=>array(95,150,323,217),61203=>array(69,0,342,217),61204=>array(44,0,372,668),61205=>array(47,0,368,518),61206=>array(54,0,361,367),61207=>array(69,0,342,217),61208=>array(95,0,323,66),61209=>array(104,0,171,668),61440=>array(73,0,903,732),61441=>array(73,0,903,732),61442=>array(73,0,903,732),61443=>array(73,0,903,732),62464=>array(54,-15,526,828),62465=>array(54,-15,526,828),62466=>array(54,-15,570,837),62467=>array(54,0,835,837),62468=>array(54,-15,526,837),62469=>array(54,-15,526,837),62470=>array(54,-15,599,837),62471=>array(54,-15,828,837),62472=>array(54,0,501,837),62473=>array(54,-15,526,828),62474=>array(54,0,1115,837),62475=>array(54,-15,525,837),62476=>array(63,-15,536,828),62477=>array(54,0,815,837),62478=>array(54,-15,526,828),62479=>array(54,-15,526,844),62480=>array(54,0,860,837),62481=>array(63,-15,536,828),62482=>array(54,-15,677,837),62483=>array(24,-15,519,837),62484=>array(54,-15,818,837),62485=>array(54,-15,526,828),62486=>array(54,-15,841,837),62487=>array(54,-15,525,829),62488=>array(54,-15,525,837),62489=>array(64,0,536,837),62490=>array(55,-15,595,828),62491=>array(54,-15,525,828),62492=>array(64,-15,536,837),62493=>array(54,-15,545,828),62494=>array(63,-15,536,828),62495=>array(24,-15,492,837),62496=>array(54,-15,526,837),62497=>array(59,-15,530,837),62498=>array(54,-79,526,837),62499=>array(54,-15,525,838),62500=>array(54,-15,532,838),62501=>array(54,-15,594,837),62502=>array(54,-15,901,838),62504=>array(60,-235,872,816),62505=>array(49,-230,759,853),62506=>array(49,-15,459,765),62507=>array(49,-15,459,777),62508=>array(49,-15,459,875),62509=>array(49,-15,459,818),62510=>array(49,-15,459,887),62511=>array(49,-15,459,809),62512=>array(49,-236,449,765),62513=>array(49,-236,449,799),62514=>array(49,-236,449,901),62515=>array(49,-236,449,809),62516=>array(49,0,469,765),62517=>array(49,0,469,799),62518=>array(49,0,469,809),62519=>array(49,-0,737,765),62520=>array(49,-0,737,777),62521=>array(49,-0,737,895),62522=>array(49,-0,737,799),62523=>array(49,-0,737,809),62524=>array(29,-236,488,765),62525=>array(29,-236,488,777),62526=>array(29,-236,488,904),62527=>array(29,-236,488,799),62528=>array(29,-236,488,809),62529=>array(29,-236,488,852),63173=>array(55,-14,557,760),64256=>array(23,0,708,760),64257=>array(23,0,536,760),64258=>array(23,0,536,760),64259=>array(23,0,873,760),64260=>array(23,0,873,760),64261=>array(23,0,662,760),64262=>array(54,-14,837,742),64275=>array(83,-14,1111,760),64276=>array(85,-14,1111,760),64277=>array(85,-208,1111,760),64278=>array(85,-208,1111,760),64279=>array(85,-208,1451,760),64285=>array(66,44,157,547),64286=>array(167,625,473,765),64287=>array(36,44,329,547),64288=>array(38,0,562,547),64289=>array(85,0,772,547),64290=>array(43,0,717,547),64291=>array(91,0,764,547),64292=>array(43,0,716,547),64293=>array(43,0,716,760),64294=>array(91,0,764,547),64295=>array(43,0,716,547),64296=>array(47,-4,716,547),64297=>array(106,272,732,627),64298=>array(43,0,666,698),64299=>array(38,0,666,698),64300=>array(43,0,666,698),64301=>array(43,0,666,698),64302=>array(91,-159,578,547),64303=>array(91,-193,578,547),64304=>array(91,-159,578,547),64305=>array(43,0,535,547),64306=>array(43,-5,383,547),64307=>array(43,0,511,547),64308=>array(91,0,563,547),64309=>array(43,0,265,547),64310=>array(43,0,363,547),64312=>array(90,-14,593,552),64313=>array(43,204,264,547),64314=>array(43,-208,446,547),64315=>array(43,0,474,547),64316=>array(43,0,492,729),64318=>array(43,0,588,555),64320=>array(43,0,309,547),64321=>array(90,-14,593,547),64323=>array(91,-208,549,547),64324=>array(91,0,569,547),64326=>array(43,0,502,547),64327=>array(91,-208,633,546),64328=>array(43,0,474,547),64329=>array(43,0,666,547),64330=>array(10,-4,566,547),64331=>array(91,0,182,698),64332=>array(43,0,535,698),64333=>array(43,0,474,698),64334=>array(91,0,569,698),64335=>array(43,0,571,760),64338=>array(63,-244,865,327),64339=>array(63,-244,992,327),64340=>array(-10,-244,191,293),64341=>array(-10,-244,312,293),64342=>array(63,-244,865,327),64343=>array(63,-244,992,327),64344=>array(-10,-244,244,293),64345=>array(-10,-244,312,293),64346=>array(63,-244,865,327),64347=>array(63,-244,992,327),64348=>array(-10,-244,244,293),64349=>array(-10,-244,312,293),64350=>array(63,-10,865,513),64351=>array(63,-10,992,513),64352=>array(-10,0,191,610),64353=>array(-10,0,312,610),64354=>array(63,-10,865,513),64355=>array(63,-10,992,513),64356=>array(-10,0,244,610),64357=>array(-10,0,312,610),64358=>array(63,-10,865,575),64359=>array(63,-10,992,575),64360=>array(-10,0,273,672),64361=>array(-10,0,312,672),64362=>array(63,-45,952,757),64363=>array(63,-44,1045,659),64364=>array(-10,0,406,757),64365=>array(-10,0,516,684),64366=>array(63,-45,952,757),64367=>array(63,-44,1045,659),64368=>array(-10,0,406,757),64369=>array(-10,0,516,684),64370=>array(77,-244,645,425),64371=>array(77,-244,655,425),64372=>array(-10,-220,545,398),64373=>array(-10,-220,655,398),64374=>array(77,-244,645,425),64375=>array(77,-244,655,425),64376=>array(-10,-98,545,398),64377=>array(-10,-98,655,398),64378=>array(77,-244,645,425),64379=>array(77,-244,655,425),64380=>array(-10,-220,545,398),64381=>array(-10,-220,655,398),64382=>array(77,-244,645,425),64383=>array(77,-244,655,425),64384=>array(-10,-220,545,398),64385=>array(-10,-220,655,398),64386=>array(61,-146,388,415),64387=>array(61,-146,535,415),64388=>array(61,-19,388,586),64389=>array(61,-19,535,586),64390=>array(61,-19,388,708),64391=>array(61,-19,535,708),64392=>array(61,-19,388,746),64393=>array(61,-19,535,746),64394=>array(-42,-244,439,586),64395=>array(-42,-244,562,586),64396=>array(-42,-244,469,648),64397=>array(-42,-244,562,648),64398=>array(63,-43,895,760),64399=>array(63,-43,981,760),64400=>array(-10,0,476,760),64401=>array(-10,0,562,760),64402=>array(63,-43,895,896),64403=>array(63,-43,981,896),64404=>array(-10,0,476,896),64405=>array(-10,0,562,896),64406=>array(63,-293,895,896),64407=>array(63,-293,981,896),64408=>array(-10,-269,476,896),64409=>array(-10,-269,562,896),64410=>array(63,-43,895,903),64411=>array(63,-43,981,903),64412=>array(-10,0,476,903),64413=>array(-10,0,562,903),64414=>array(72,-162,660,366),64415=>array(72,-244,771,284),64416=>array(72,-162,660,636),64417=>array(72,-244,771,514),64418=>array(-10,0,273,672),64419=>array(-10,0,312,672),64426=>array(70,-33,638,487),64427=>array(70,-244,642,333),64428=>array(-10,-33,467,487),64429=>array(-10,-244,471,333),64467=>array(70,-27,722,854),64468=>array(70,-27,853,854),64469=>array(-10,0,476,928),64470=>array(-10,0,562,928),64473=>array(-42,-244,406,556),64474=>array(-42,-244,526,556),64488=>array(-10,0,191,293),64489=>array(-10,0,312,293),64508=>array(63,-131,719,411),64509=>array(63,-133,843,251),64510=>array(-10,-146,244,293),64511=>array(-10,-146,312,293),65056=>array(-445,752,0,929),65057=>array(0,752,445,929),65058=>array(-354,756,0,894),65059=>array(0,756,354,894),65136=>array(4,591,289,825),65137=>array(-10,0,303,825),65138=>array(4,591,289,874),65139=>array(51,0,271,177),65140=>array(4,-239,289,-5),65142=>array(4,591,289,708),65143=>array(-10,0,303,708),65144=>array(4,590,289,874),65145=>array(-10,0,303,874),65146=>array(4,-137,289,-20),65147=>array(-10,-137,303,90),65148=>array(-6,599,299,869),65149=>array(-10,0,303,869),65150=>array(12,610,279,878),65151=>array(-10,0,303,878),65152=>array(80,42,390,483),65153=>array(-37,0,315,939),65154=>array(-37,0,315,939),65155=>array(53,0,220,1028),65156=>array(53,0,314,1028),65157=>array(-42,-244,406,588),65158=>array(-42,-244,526,588),65159=>array(53,-244,220,760),65160=>array(53,-244,314,760),65161=>array(63,-131,719,588),65162=>array(63,-133,843,466),65163=>array(-10,0,227,613),65164=>array(-10,0,312,613),65165=>array(94,0,184,760),65166=>array(94,0,314,760),65167=>array(63,-171,865,327),65168=>array(63,-171,992,327),65169=>array(-10,-146,191,293),65170=>array(-10,-146,312,293),65171=>array(68,-28,453,513),65172=>array(71,0,546,513),65173=>array(63,-10,865,391),65174=>array(63,-10,992,391),65175=>array(-10,0,244,488),65176=>array(-10,0,312,488),65177=>array(63,-10,865,513),65178=>array(63,-10,992,513),65179=>array(-10,0,244,610),65180=>array(-10,0,312,610),65181=>array(77,-244,645,425),65182=>array(77,-244,655,425),65183=>array(-10,-146,545,398),65184=>array(-10,-146,655,398),65185=>array(77,-244,645,425),65186=>array(77,-244,655,425),65187=>array(-10,0,545,398),65188=>array(-10,0,655,398),65189=>array(77,-244,645,586),65190=>array(77,-244,655,586),65191=>array(-10,0,545,537),65192=>array(-10,0,655,537),65193=>array(61,-19,388,415),65194=>array(61,-19,535,415),65195=>array(61,-19,388,586),65196=>array(61,-19,535,586),65197=>array(-42,-244,423,269),65198=>array(-42,-244,562,269),65199=>array(-42,-244,423,464),65200=>array(-42,-244,562,464),65201=>array(63,-244,1138,366),65202=>array(63,-244,1285,366),65203=>array(-10,-14,755,366),65204=>array(-10,-14,902,366),65205=>array(63,-244,1138,586),65206=>array(63,-244,1285,586),65207=>array(-10,-14,755,586),65208=>array(-10,-14,902,586),65209=>array(63,-244,1134,362),65210=>array(63,-244,1235,362),65211=>array(-10,0,774,362),65212=>array(-10,0,877,362),65213=>array(63,-244,1134,464),65214=>array(63,-244,1235,464),65215=>array(-10,0,774,464),65216=>array(-10,0,877,464),65217=>array(70,0,857,760),65218=>array(70,0,959,760),65219=>array(-10,0,729,760),65220=>array(-10,0,830,760),65221=>array(70,0,857,760),65222=>array(70,0,959,760),65223=>array(-10,0,729,760),65224=>array(-10,0,830,760),65225=>array(57,-244,587,521),65226=>array(57,-244,587,382),65227=>array(-10,0,496,521),65228=>array(-10,0,492,382),65229=>array(57,-244,587,659),65230=>array(57,-244,587,537),65231=>array(-10,0,496,659),65232=>array(-10,0,492,537),65233=>array(63,-45,952,635),65234=>array(63,-44,1045,537),65235=>array(-10,0,406,635),65236=>array(-10,0,516,562),65237=>array(52,-215,701,635),65238=>array(52,-244,844,500),65239=>array(-10,0,406,635),65240=>array(-10,0,516,562),65241=>array(70,-27,722,760),65242=>array(70,-27,853,760),65243=>array(-10,0,476,760),65244=>array(-10,0,562,760),65245=>array(70,-152,637,760),65246=>array(70,-152,767,760),65247=>array(-10,0,210,760),65248=>array(-10,0,341,760),65249=>array(68,-240,546,369),65250=>array(68,-240,675,307),65251=>array(-10,-25,456,303),65252=>array(-10,-24,588,303),65253=>array(72,-162,660,464),65254=>array(72,-244,771,342),65255=>array(-10,0,191,488),65256=>array(-10,0,312,488),65257=>array(68,-28,453,358),65258=>array(71,0,546,366),65259=>array(-10,-33,467,487),65260=>array(-10,-244,471,333),65261=>array(-42,-244,406,315),65262=>array(-42,-244,526,315),65263=>array(63,-131,719,411),65264=>array(63,-133,843,251),65265=>array(63,-244,719,411),65266=>array(63,-244,843,251),65267=>array(-10,-146,244,293),65268=>array(-10,-146,312,293),65269=>array(-103,-10,468,866),65270=>array(-103,-10,606,866),65271=>array(-13,-10,468,955),65272=>array(-13,-10,606,955),65273=>array(11,-244,468,760),65274=>array(11,-244,606,760),65275=>array(41,-10,468,760),65276=>array(41,-10,606,760),65533=>array(15,-84,1011,912),65535=>array(50,-177,550,705)); -$cw=array(0=>600,32=>318,33=>401,34=>460,35=>838,36=>636,37=>950,38=>780,39=>275,40=>390,41=>390,42=>500,43=>838,44=>318,45=>361,46=>318,47=>337,48=>636,49=>636,50=>636,51=>636,52=>636,53=>636,54=>636,55=>636,56=>636,57=>636,58=>337,59=>337,60=>838,61=>838,62=>838,63=>531,64=>1000,65=>684,66=>686,67=>698,68=>770,69=>632,70=>575,71=>775,72=>752,73=>295,74=>295,75=>656,76=>557,77=>863,78=>748,79=>787,80=>603,81=>787,82=>695,83=>635,84=>611,85=>732,86=>684,87=>989,88=>685,89=>611,90=>685,91=>390,92=>337,93=>390,94=>838,95=>500,96=>500,97=>613,98=>635,99=>550,100=>635,101=>615,102=>352,103=>635,104=>634,105=>278,106=>278,107=>579,108=>278,109=>974,110=>634,111=>612,112=>635,113=>635,114=>411,115=>521,116=>392,117=>634,118=>592,119=>818,120=>592,121=>592,122=>525,123=>636,124=>337,125=>636,126=>838,160=>318,161=>401,162=>636,163=>636,164=>636,165=>636,166=>337,167=>500,168=>500,169=>1000,170=>471,171=>612,172=>838,173=>361,174=>1000,175=>500,176=>500,177=>838,178=>401,179=>401,180=>500,181=>636,182=>636,183=>318,184=>500,185=>401,186=>471,187=>612,188=>969,189=>969,190=>969,191=>531,192=>684,193=>684,194=>684,195=>684,196=>684,197=>684,198=>974,199=>698,200=>632,201=>632,202=>632,203=>632,204=>295,205=>295,206=>295,207=>295,208=>775,209=>748,210=>787,211=>787,212=>787,213=>787,214=>787,215=>838,216=>787,217=>732,218=>732,219=>732,220=>732,221=>611,222=>605,223=>630,224=>613,225=>613,226=>613,227=>613,228=>613,229=>613,230=>982,231=>550,232=>615,233=>615,234=>615,235=>615,236=>278,237=>278,238=>278,239=>278,240=>612,241=>634,242=>612,243=>612,244=>612,245=>612,246=>612,247=>838,248=>612,249=>634,250=>634,251=>634,252=>634,253=>592,254=>635,255=>592,256=>684,257=>613,258=>684,259=>613,260=>684,261=>613,262=>698,263=>550,264=>698,265=>550,266=>698,267=>550,268=>698,269=>550,270=>770,271=>635,272=>775,273=>635,274=>632,275=>615,276=>632,277=>615,278=>632,279=>615,280=>632,281=>615,282=>632,283=>615,284=>775,285=>635,286=>775,287=>635,288=>775,289=>635,290=>775,291=>635,292=>752,293=>634,294=>916,295=>695,296=>295,297=>278,298=>295,299=>278,300=>295,301=>278,302=>295,303=>278,304=>295,305=>278,306=>590,307=>556,308=>295,309=>278,310=>656,311=>579,312=>579,313=>557,314=>278,315=>557,316=>278,317=>557,318=>375,319=>557,320=>342,321=>562,322=>284,323=>748,324=>634,325=>748,326=>634,327=>748,328=>634,329=>813,330=>748,331=>634,332=>787,333=>612,334=>787,335=>612,336=>787,337=>612,338=>1070,339=>1023,340=>695,341=>411,342=>695,343=>411,344=>695,345=>411,346=>635,347=>521,348=>635,349=>521,350=>635,351=>521,352=>635,353=>521,354=>611,355=>392,356=>611,357=>392,358=>611,359=>392,360=>732,361=>634,362=>732,363=>634,364=>732,365=>634,366=>732,367=>634,368=>732,369=>634,370=>732,371=>634,372=>989,373=>818,374=>611,375=>592,376=>611,377=>685,378=>525,379=>685,380=>525,381=>685,382=>525,383=>352,384=>635,385=>735,386=>686,387=>635,388=>686,389=>635,390=>703,391=>698,392=>550,393=>775,394=>819,395=>686,396=>635,397=>612,398=>632,399=>787,400=>614,401=>575,402=>352,403=>775,404=>687,405=>984,406=>354,407=>295,408=>746,409=>579,410=>278,411=>592,412=>974,413=>748,414=>634,415=>787,416=>913,417=>612,418=>949,419=>759,420=>652,421=>635,422=>695,423=>635,424=>521,425=>632,426=>336,427=>392,428=>611,429=>392,430=>611,431=>858,432=>634,433=>764,434=>721,435=>744,436=>730,437=>685,438=>525,439=>666,440=>666,441=>578,442=>525,443=>636,444=>666,445=>578,446=>510,447=>635,448=>295,449=>492,450=>459,451=>295,452=>1422,453=>1299,454=>1154,455=>835,456=>787,457=>457,458=>931,459=>924,460=>797,461=>684,462=>613,463=>295,464=>278,465=>787,466=>612,467=>732,468=>634,469=>732,470=>634,471=>732,472=>634,473=>732,474=>634,475=>732,476=>634,477=>615,478=>684,479=>613,480=>684,481=>613,482=>974,483=>982,484=>775,485=>635,486=>775,487=>635,488=>656,489=>579,490=>787,491=>612,492=>787,493=>612,494=>666,495=>578,496=>278,497=>1422,498=>1299,499=>1154,500=>775,501=>635,502=>1113,503=>682,504=>748,505=>634,506=>684,507=>613,508=>974,509=>982,510=>787,511=>612,512=>684,513=>613,514=>684,515=>613,516=>632,517=>615,518=>632,519=>615,520=>295,521=>278,522=>295,523=>278,524=>787,525=>612,526=>787,527=>612,528=>695,529=>411,530=>695,531=>411,532=>732,533=>634,534=>732,535=>634,536=>635,537=>521,538=>611,539=>392,540=>627,541=>521,542=>752,543=>634,544=>735,545=>838,546=>698,547=>610,548=>685,549=>525,550=>684,551=>613,552=>632,553=>615,554=>787,555=>612,556=>787,557=>612,558=>787,559=>612,560=>787,561=>612,562=>611,563=>592,564=>475,565=>843,566=>477,567=>278,568=>998,569=>998,570=>684,571=>698,572=>550,573=>557,574=>611,575=>521,576=>525,577=>603,578=>479,579=>686,580=>732,581=>684,582=>632,583=>615,584=>295,585=>278,586=>781,587=>635,588=>695,589=>411,590=>611,591=>592,592=>600,593=>635,594=>635,595=>635,596=>549,597=>550,598=>635,599=>696,600=>615,601=>615,602=>819,603=>541,604=>532,605=>775,606=>664,607=>278,608=>696,609=>635,610=>629,611=>596,612=>596,613=>634,614=>634,615=>634,616=>278,617=>338,618=>372,619=>396,620=>487,621=>278,622=>706,623=>974,624=>974,625=>974,626=>646,627=>642,628=>634,629=>612,630=>858,631=>728,632=>660,633=>414,634=>414,635=>414,636=>411,637=>411,638=>530,639=>530,640=>604,641=>604,642=>521,643=>336,644=>336,645=>461,646=>336,647=>392,648=>392,649=>634,650=>618,651=>598,652=>592,653=>818,654=>592,655=>611,656=>525,657=>525,658=>578,659=>578,660=>510,661=>510,662=>510,663=>510,664=>787,665=>580,666=>664,667=>708,668=>654,669=>292,670=>667,671=>507,672=>727,673=>510,674=>510,675=>1014,676=>1058,677=>1013,678=>830,679=>610,680=>778,681=>848,682=>706,683=>654,684=>515,685=>515,686=>661,687=>664,688=>404,689=>399,690=>175,691=>259,692=>295,693=>296,694=>379,695=>515,696=>373,697=>278,698=>460,699=>318,700=>318,701=>318,702=>307,703=>307,704=>370,705=>370,706=>500,707=>500,708=>500,709=>500,710=>500,711=>500,712=>275,713=>500,714=>500,715=>500,716=>275,717=>500,718=>500,719=>500,720=>337,721=>337,722=>307,723=>307,724=>500,725=>500,726=>390,727=>317,728=>500,729=>500,730=>500,731=>500,732=>500,733=>500,734=>315,735=>500,736=>426,737=>166,738=>373,739=>444,740=>370,741=>493,742=>493,743=>493,744=>493,745=>493,748=>500,749=>500,750=>518,755=>500,759=>500,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>654,881=>568,882=>862,883=>647,884=>278,885=>278,886=>748,887=>650,890=>500,891=>549,892=>550,893=>549,894=>337,900=>500,901=>500,902=>692,903=>318,904=>746,905=>871,906=>408,908=>813,910=>825,911=>826,912=>338,913=>684,914=>686,915=>557,916=>684,917=>632,918=>685,919=>752,920=>787,921=>295,922=>656,923=>684,924=>863,925=>748,926=>632,927=>787,928=>752,929=>603,931=>632,932=>611,933=>611,934=>787,935=>685,936=>787,937=>764,938=>295,939=>611,940=>659,941=>541,942=>634,943=>338,944=>579,945=>659,946=>638,947=>592,948=>612,949=>541,950=>544,951=>634,952=>612,953=>338,954=>589,955=>592,956=>636,957=>559,958=>558,959=>612,960=>602,961=>635,962=>587,963=>634,964=>602,965=>579,966=>660,967=>578,968=>660,969=>837,970=>338,971=>579,972=>612,973=>579,974=>837,975=>656,976=>614,977=>619,978=>699,979=>842,980=>699,981=>660,982=>837,983=>664,984=>787,985=>612,986=>648,987=>587,988=>575,989=>458,990=>660,991=>660,992=>865,993=>627,994=>934,995=>837,996=>758,997=>659,998=>792,999=>615,1000=>687,1001=>607,1002=>768,1003=>625,1004=>699,1005=>612,1006=>611,1007=>536,1008=>664,1009=>635,1010=>550,1011=>278,1012=>787,1013=>615,1014=>615,1015=>605,1016=>635,1017=>698,1018=>863,1019=>651,1020=>635,1021=>703,1022=>698,1023=>703,1024=>632,1025=>632,1026=>786,1027=>610,1028=>698,1029=>635,1030=>295,1031=>295,1032=>295,1033=>1094,1034=>1045,1035=>786,1036=>710,1037=>748,1038=>609,1039=>752,1040=>684,1041=>686,1042=>686,1043=>610,1044=>781,1045=>632,1046=>1077,1047=>641,1048=>748,1049=>748,1050=>710,1051=>752,1052=>863,1053=>752,1054=>787,1055=>752,1056=>603,1057=>698,1058=>611,1059=>609,1060=>861,1061=>685,1062=>776,1063=>686,1064=>1069,1065=>1094,1066=>833,1067=>882,1068=>686,1069=>698,1070=>1080,1071=>695,1072=>613,1073=>617,1074=>589,1075=>525,1076=>691,1077=>615,1078=>901,1079=>532,1080=>650,1081=>650,1082=>604,1083=>639,1084=>754,1085=>654,1086=>612,1087=>654,1088=>635,1089=>550,1090=>583,1091=>592,1092=>855,1093=>592,1094=>681,1095=>591,1096=>915,1097=>942,1098=>707,1099=>790,1100=>589,1101=>549,1102=>842,1103=>602,1104=>615,1105=>615,1106=>625,1107=>525,1108=>549,1109=>521,1110=>278,1111=>278,1112=>278,1113=>902,1114=>898,1115=>652,1116=>604,1117=>650,1118=>592,1119=>654,1120=>934,1121=>837,1122=>771,1123=>672,1124=>942,1125=>749,1126=>879,1127=>783,1128=>1160,1129=>1001,1130=>787,1131=>612,1132=>1027,1133=>824,1134=>636,1135=>541,1136=>856,1137=>876,1138=>787,1139=>612,1140=>781,1141=>665,1142=>781,1143=>665,1144=>992,1145=>904,1146=>953,1147=>758,1148=>1180,1149=>1028,1150=>934,1151=>837,1152=>698,1153=>550,1154=>502,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>418,1161=>418,1162=>772,1163=>677,1164=>686,1165=>589,1166=>603,1167=>635,1168=>610,1169=>525,1170=>675,1171=>590,1172=>624,1173=>530,1174=>1077,1175=>901,1176=>641,1177=>532,1178=>710,1179=>604,1180=>710,1181=>604,1182=>710,1183=>604,1184=>856,1185=>832,1186=>752,1187=>661,1188=>1014,1189=>877,1190=>1081,1191=>916,1192=>878,1193=>693,1194=>698,1195=>550,1196=>611,1197=>583,1198=>611,1199=>592,1200=>611,1201=>592,1202=>685,1203=>592,1204=>934,1205=>807,1206=>686,1207=>591,1208=>686,1209=>591,1210=>686,1211=>634,1212=>941,1213=>728,1214=>941,1215=>728,1216=>295,1217=>1077,1218=>901,1219=>656,1220=>604,1221=>776,1222=>670,1223=>752,1224=>661,1225=>776,1226=>681,1227=>686,1228=>591,1229=>888,1230=>774,1231=>278,1232=>684,1233=>613,1234=>684,1235=>613,1236=>974,1237=>982,1238=>632,1239=>615,1240=>787,1241=>615,1242=>787,1243=>615,1244=>1077,1245=>901,1246=>641,1247=>532,1248=>666,1249=>578,1250=>748,1251=>650,1252=>748,1253=>650,1254=>787,1255=>612,1256=>787,1257=>612,1258=>787,1259=>612,1260=>698,1261=>549,1262=>609,1263=>592,1264=>609,1265=>592,1266=>609,1267=>592,1268=>686,1269=>591,1270=>610,1271=>525,1272=>882,1273=>790,1274=>675,1275=>590,1276=>685,1277=>592,1278=>685,1279=>592,1280=>686,1281=>589,1282=>1006,1283=>897,1284=>975,1285=>869,1286=>679,1287=>588,1288=>1072,1289=>957,1290=>1113,1291=>967,1292=>775,1293=>660,1294=>773,1295=>711,1296=>614,1297=>541,1298=>752,1299=>639,1300=>1169,1301=>994,1302=>894,1303=>864,1304=>1032,1305=>986,1306=>787,1307=>635,1308=>989,1309=>818,1310=>710,1311=>604,1312=>1081,1313=>905,1314=>1081,1315=>912,1316=>793,1317=>683,1329=>766,1330=>732,1331=>753,1332=>753,1333=>732,1334=>772,1335=>640,1336=>732,1337=>859,1338=>753,1339=>691,1340=>533,1341=>922,1342=>863,1343=>732,1344=>716,1345=>766,1346=>753,1347=>767,1348=>792,1349=>728,1350=>729,1351=>757,1352=>732,1353=>713,1354=>800,1355=>768,1356=>792,1357=>732,1358=>753,1359=>705,1360=>694,1361=>744,1362=>538,1363=>811,1364=>757,1365=>787,1366=>790,1369=>307,1370=>318,1371=>234,1372=>361,1373=>238,1374=>405,1375=>500,1377=>974,1378=>634,1379=>658,1380=>663,1381=>634,1382=>635,1383=>515,1384=>634,1385=>738,1386=>658,1387=>634,1388=>271,1389=>980,1390=>623,1391=>634,1392=>634,1393=>608,1394=>634,1395=>629,1396=>634,1397=>271,1398=>634,1399=>499,1400=>634,1401=>404,1402=>974,1403=>560,1404=>648,1405=>634,1406=>634,1407=>974,1408=>634,1409=>633,1410=>435,1411=>974,1412=>636,1413=>609,1414=>805,1415=>812,1417=>337,1418=>361,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>361,1471=>0,1472=>295,1473=>0,1474=>0,1475=>295,1478=>441,1479=>0,1488=>668,1489=>578,1490=>412,1491=>546,1492=>653,1493=>272,1494=>346,1495=>653,1496=>648,1497=>224,1498=>537,1499=>529,1500=>568,1501=>664,1502=>679,1503=>272,1504=>400,1505=>649,1506=>626,1507=>640,1508=>625,1509=>540,1510=>593,1511=>709,1512=>564,1513=>708,1514=>657,1520=>471,1521=>423,1522=>331,1523=>416,1524=>645,1542=>637,1543=>637,1545=>757,1546=>977,1548=>323,1557=>0,1563=>318,1567=>531,1569=>470,1570=>278,1571=>278,1572=>483,1573=>278,1574=>783,1575=>278,1576=>941,1577=>524,1578=>941,1579=>941,1580=>646,1581=>646,1582=>646,1583=>445,1584=>445,1585=>483,1586=>483,1587=>1221,1588=>1221,1589=>1209,1590=>1209,1591=>925,1592=>925,1593=>597,1594=>597,1600=>293,1601=>1037,1602=>776,1603=>824,1604=>727,1605=>619,1606=>734,1607=>524,1608=>483,1609=>783,1610=>783,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,1619=>0,1620=>0,1621=>0,1623=>0,1626=>500,1632=>537,1633=>537,1634=>537,1635=>537,1636=>537,1637=>537,1638=>537,1639=>537,1640=>537,1641=>537,1642=>537,1643=>325,1644=>318,1645=>545,1646=>941,1647=>776,1648=>0,1652=>292,1657=>941,1658=>941,1659=>941,1660=>941,1661=>941,1662=>941,1663=>941,1664=>941,1665=>646,1666=>646,1667=>646,1668=>646,1669=>646,1670=>646,1671=>646,1672=>445,1673=>445,1674=>445,1675=>445,1676=>445,1677=>445,1678=>445,1679=>445,1680=>445,1681=>483,1682=>483,1683=>498,1684=>530,1685=>610,1686=>530,1687=>483,1688=>483,1689=>483,1690=>1221,1691=>1221,1692=>1221,1693=>1209,1694=>1209,1695=>925,1696=>597,1697=>1037,1698=>1037,1699=>1037,1700=>1037,1701=>1037,1702=>1037,1703=>776,1704=>776,1705=>895,1706=>1054,1707=>895,1708=>824,1709=>824,1710=>824,1711=>895,1712=>895,1713=>895,1714=>895,1715=>895,1716=>895,1717=>727,1718=>727,1719=>727,1720=>727,1721=>734,1722=>734,1723=>734,1724=>734,1725=>734,1726=>698,1727=>646,1734=>483,1740=>783,1742=>783,1749=>524,1776=>537,1777=>537,1778=>537,1779=>537,1780=>537,1781=>537,1782=>537,1783=>537,1784=>537,1785=>537,1984=>636,1985=>636,1986=>636,1987=>636,1988=>636,1989=>636,1990=>636,1991=>636,1992=>636,1993=>636,1994=>278,1995=>571,1996=>424,1997=>592,1998=>654,1999=>654,2000=>594,2001=>654,2002=>829,2003=>438,2004=>438,2005=>559,2006=>612,2007=>350,2008=>959,2009=>473,2010=>783,2011=>654,2012=>625,2013=>734,2014=>530,2015=>724,2016=>473,2017=>625,2018=>594,2019=>530,2020=>530,2021=>522,2022=>594,2023=>594,2027=>0,2028=>0,2029=>0,2030=>0,2031=>0,2032=>0,2033=>0,2034=>0,2035=>0,2036=>313,2037=>313,2040=>560,2041=>560,2042=>361,3647=>636,3713=>670,3714=>684,3716=>688,3719=>482,3720=>628,3722=>684,3725=>688,3732=>669,3733=>642,3734=>645,3735=>655,3737=>659,3738=>625,3739=>625,3740=>745,3741=>767,3742=>687,3743=>687,3745=>702,3746=>688,3747=>684,3749=>649,3751=>632,3754=>703,3755=>819,3757=>633,3758=>684,3759=>788,3760=>632,3761=>0,3762=>539,3763=>539,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>663,3776=>375,3777=>657,3778=>460,3779=>547,3780=>491,3782=>674,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>636,3793=>641,3794=>641,3795=>670,3796=>625,3797=>625,3798=>703,3799=>670,3800=>674,3801=>677,3804=>1028,3805=>1028,4256=>874,4257=>733,4258=>679,4259=>834,4260=>615,4261=>768,4262=>753,4263=>914,4264=>453,4265=>620,4266=>843,4267=>882,4268=>625,4269=>854,4270=>781,4271=>629,4272=>912,4273=>621,4274=>620,4275=>854,4276=>866,4277=>724,4278=>630,4279=>621,4280=>625,4281=>620,4282=>818,4283=>874,4284=>615,4285=>623,4286=>625,4287=>725,4288=>844,4289=>596,4290=>688,4291=>596,4292=>594,4293=>738,4304=>508,4305=>518,4306=>581,4307=>818,4308=>508,4309=>513,4310=>500,4311=>801,4312=>518,4313=>510,4314=>1064,4315=>522,4316=>522,4317=>786,4318=>508,4319=>518,4320=>796,4321=>522,4322=>654,4323=>522,4324=>825,4325=>513,4326=>786,4327=>518,4328=>518,4329=>522,4330=>571,4331=>522,4332=>518,4333=>520,4334=>522,4335=>454,4336=>508,4337=>518,4338=>508,4339=>508,4340=>518,4341=>554,4342=>828,4343=>552,4344=>508,4345=>571,4346=>508,4347=>448,4348=>324,5121=>684,5122=>684,5123=>684,5124=>684,5125=>769,5126=>769,5127=>769,5129=>769,5130=>769,5131=>769,5132=>835,5133=>834,5134=>835,5135=>834,5136=>835,5137=>834,5138=>967,5139=>1007,5140=>967,5141=>1007,5142=>769,5143=>967,5144=>1007,5145=>967,5146=>1007,5147=>769,5149=>256,5150=>543,5151=>423,5152=>423,5153=>389,5154=>389,5155=>393,5156=>389,5157=>466,5158=>385,5159=>256,5160=>389,5161=>389,5162=>389,5163=>1090,5164=>909,5165=>953,5166=>1117,5167=>684,5168=>684,5169=>684,5170=>684,5171=>729,5172=>729,5173=>729,5175=>729,5176=>729,5177=>729,5178=>835,5179=>684,5180=>835,5181=>834,5182=>835,5183=>834,5184=>967,5185=>1007,5186=>967,5187=>1007,5188=>967,5189=>1007,5190=>967,5191=>1007,5192=>729,5193=>508,5194=>192,5196=>732,5197=>732,5198=>732,5199=>732,5200=>730,5201=>730,5202=>730,5204=>730,5205=>730,5206=>730,5207=>921,5208=>889,5209=>921,5210=>889,5211=>921,5212=>889,5213=>928,5214=>900,5215=>928,5216=>900,5217=>947,5218=>900,5219=>947,5220=>900,5221=>947,5222=>434,5223=>877,5224=>877,5225=>866,5226=>890,5227=>628,5228=>628,5229=>628,5230=>628,5231=>628,5232=>628,5233=>628,5234=>628,5235=>628,5236=>860,5237=>771,5238=>815,5239=>816,5240=>815,5241=>816,5242=>860,5243=>771,5244=>860,5245=>771,5246=>815,5247=>816,5248=>815,5249=>816,5250=>815,5251=>407,5252=>407,5253=>750,5254=>775,5255=>750,5256=>775,5257=>628,5258=>628,5259=>628,5260=>628,5261=>628,5262=>628,5263=>628,5264=>628,5265=>628,5266=>860,5267=>771,5268=>815,5269=>816,5270=>815,5271=>816,5272=>860,5273=>771,5274=>860,5275=>771,5276=>815,5277=>816,5278=>815,5279=>816,5280=>815,5281=>435,5282=>435,5283=>610,5284=>557,5285=>557,5286=>557,5287=>610,5288=>610,5289=>610,5290=>557,5291=>557,5292=>749,5293=>769,5294=>746,5295=>764,5296=>746,5297=>764,5298=>749,5299=>769,5300=>749,5301=>769,5302=>746,5303=>764,5304=>746,5305=>764,5306=>746,5307=>386,5308=>508,5309=>386,5312=>852,5313=>852,5314=>852,5315=>852,5316=>852,5317=>852,5318=>852,5319=>852,5320=>852,5321=>1069,5322=>1035,5323=>1059,5324=>852,5325=>1059,5326=>852,5327=>852,5328=>600,5329=>453,5330=>600,5331=>852,5332=>852,5333=>852,5334=>852,5335=>852,5336=>852,5337=>852,5338=>852,5339=>852,5340=>1069,5341=>1035,5342=>1059,5343=>1030,5344=>1059,5345=>1030,5346=>1069,5347=>1035,5348=>1069,5349=>1035,5350=>1083,5351=>1030,5352=>1083,5353=>1030,5354=>600,5356=>729,5357=>603,5358=>603,5359=>603,5360=>603,5361=>603,5362=>603,5363=>603,5364=>603,5365=>603,5366=>834,5367=>754,5368=>792,5369=>771,5370=>792,5371=>771,5372=>834,5373=>754,5374=>834,5375=>754,5376=>792,5377=>771,5378=>792,5379=>771,5380=>792,5381=>418,5382=>420,5383=>418,5392=>712,5393=>712,5394=>712,5395=>892,5396=>892,5397=>892,5398=>892,5399=>910,5400=>872,5401=>910,5402=>872,5403=>910,5404=>872,5405=>1140,5406=>1100,5407=>1140,5408=>1100,5409=>1140,5410=>1100,5411=>1140,5412=>1100,5413=>641,5414=>627,5415=>627,5416=>627,5417=>627,5418=>627,5419=>627,5420=>627,5421=>627,5422=>627,5423=>844,5424=>781,5425=>816,5426=>818,5427=>816,5428=>818,5429=>844,5430=>781,5431=>844,5432=>781,5433=>816,5434=>818,5435=>816,5436=>818,5437=>816,5438=>418,5440=>389,5441=>484,5442=>916,5443=>916,5444=>916,5445=>916,5446=>916,5447=>916,5448=>603,5449=>603,5450=>603,5451=>603,5452=>603,5453=>603,5454=>834,5455=>754,5456=>418,5458=>729,5459=>684,5460=>684,5461=>684,5462=>684,5463=>726,5464=>726,5465=>726,5466=>726,5467=>924,5468=>1007,5469=>508,5470=>732,5471=>732,5472=>732,5473=>732,5474=>732,5475=>732,5476=>730,5477=>730,5478=>730,5479=>730,5480=>947,5481=>900,5482=>508,5492=>831,5493=>831,5494=>831,5495=>831,5496=>831,5497=>831,5498=>831,5499=>563,5500=>752,5501=>484,5502=>1047,5503=>1047,5504=>1047,5505=>1047,5506=>1047,5507=>1047,5508=>1047,5509=>825,5514=>831,5515=>831,5516=>831,5517=>831,5518=>1259,5519=>1259,5520=>1259,5521=>1002,5522=>1002,5523=>1259,5524=>1259,5525=>700,5526=>1073,5536=>852,5537=>852,5538=>852,5539=>852,5540=>852,5541=>852,5542=>600,5543=>643,5544=>643,5545=>643,5546=>643,5547=>643,5548=>643,5549=>643,5550=>418,5551=>628,5598=>770,5601=>767,5702=>468,5703=>468,5742=>444,5743=>1047,5744=>1310,5745=>1632,5746=>1632,5747=>1375,5748=>1375,5749=>1632,5750=>1632,5760=>477,5761=>493,5762=>712,5763=>931,5764=>1150,5765=>1370,5766=>493,5767=>712,5768=>931,5769=>1150,5770=>1370,5771=>498,5772=>718,5773=>938,5774=>1159,5775=>1379,5776=>493,5777=>712,5778=>930,5779=>1149,5780=>1370,5781=>498,5782=>752,5783=>789,5784=>1205,5785=>1150,5786=>683,5787=>507,5788=>507,7424=>592,7425=>717,7426=>982,7427=>586,7428=>550,7429=>605,7430=>605,7431=>491,7432=>541,7433=>278,7434=>395,7435=>579,7436=>583,7437=>754,7438=>650,7439=>612,7440=>550,7441=>684,7442=>684,7443=>684,7444=>1023,7446=>612,7447=>612,7448=>524,7449=>602,7450=>602,7451=>583,7452=>574,7453=>737,7454=>948,7455=>638,7456=>592,7457=>818,7458=>525,7459=>526,7462=>583,7463=>592,7464=>564,7465=>524,7466=>590,7467=>639,7468=>431,7469=>613,7470=>432,7472=>485,7473=>398,7474=>398,7475=>488,7476=>474,7477=>186,7478=>186,7479=>413,7480=>351,7481=>543,7482=>471,7483=>471,7484=>496,7485=>439,7486=>380,7487=>438,7488=>385,7489=>461,7490=>623,7491=>392,7492=>392,7493=>405,7494=>648,7495=>428,7496=>405,7497=>417,7498=>417,7499=>360,7500=>359,7501=>405,7502=>179,7503=>426,7504=>623,7505=>409,7506=>414,7507=>370,7508=>414,7509=>414,7510=>428,7511=>295,7512=>405,7513=>470,7514=>623,7515=>417,7517=>402,7518=>373,7519=>385,7520=>416,7521=>364,7522=>179,7523=>259,7524=>405,7525=>417,7526=>402,7527=>373,7528=>412,7529=>416,7530=>364,7543=>635,7544=>474,7547=>372,7549=>667,7557=>278,7579=>405,7580=>370,7581=>370,7582=>414,7583=>360,7584=>296,7585=>233,7586=>405,7587=>405,7588=>261,7589=>250,7590=>261,7591=>261,7592=>234,7593=>250,7594=>235,7595=>376,7596=>623,7597=>623,7598=>411,7599=>479,7600=>409,7601=>414,7602=>414,7603=>360,7604=>287,7605=>295,7606=>508,7607=>418,7608=>361,7609=>406,7610=>417,7611=>366,7612=>437,7613=>366,7614=>392,7615=>414,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>684,7681=>613,7682=>686,7683=>635,7684=>686,7685=>635,7686=>686,7687=>635,7688=>698,7689=>550,7690=>770,7691=>635,7692=>770,7693=>635,7694=>770,7695=>635,7696=>770,7697=>635,7698=>770,7699=>635,7700=>632,7701=>615,7702=>632,7703=>615,7704=>632,7705=>615,7706=>632,7707=>615,7708=>632,7709=>615,7710=>575,7711=>352,7712=>775,7713=>635,7714=>752,7715=>634,7716=>752,7717=>634,7718=>752,7719=>634,7720=>752,7721=>634,7722=>752,7723=>634,7724=>295,7725=>278,7726=>295,7727=>278,7728=>656,7729=>579,7730=>656,7731=>579,7732=>656,7733=>579,7734=>557,7735=>288,7736=>557,7737=>288,7738=>557,7739=>278,7740=>557,7741=>278,7742=>863,7743=>974,7744=>863,7745=>974,7746=>863,7747=>974,7748=>748,7749=>634,7750=>748,7751=>634,7752=>748,7753=>634,7754=>748,7755=>634,7756=>787,7757=>612,7758=>787,7759=>612,7760=>787,7761=>612,7762=>787,7763=>612,7764=>603,7765=>635,7766=>603,7767=>635,7768=>695,7769=>411,7770=>695,7771=>411,7772=>695,7773=>411,7774=>695,7775=>411,7776=>635,7777=>521,7778=>635,7779=>521,7780=>635,7781=>521,7782=>635,7783=>521,7784=>635,7785=>521,7786=>611,7787=>392,7788=>611,7789=>392,7790=>611,7791=>392,7792=>611,7793=>392,7794=>732,7795=>634,7796=>732,7797=>634,7798=>732,7799=>634,7800=>732,7801=>634,7802=>732,7803=>634,7804=>684,7805=>592,7806=>684,7807=>592,7808=>989,7809=>818,7810=>989,7811=>818,7812=>989,7813=>818,7814=>989,7815=>818,7816=>989,7817=>818,7818=>685,7819=>592,7820=>685,7821=>592,7822=>611,7823=>592,7824=>685,7825=>525,7826=>685,7827=>525,7828=>685,7829=>525,7830=>634,7831=>392,7832=>818,7833=>592,7834=>613,7835=>352,7836=>352,7837=>352,7838=>769,7839=>612,7840=>684,7841=>613,7842=>684,7843=>613,7844=>684,7845=>613,7846=>684,7847=>613,7848=>684,7849=>613,7850=>684,7851=>613,7852=>684,7853=>613,7854=>684,7855=>613,7856=>684,7857=>613,7858=>684,7859=>613,7860=>684,7861=>613,7862=>684,7863=>613,7864=>632,7865=>615,7866=>632,7867=>615,7868=>632,7869=>615,7870=>632,7871=>615,7872=>632,7873=>615,7874=>632,7875=>615,7876=>632,7877=>615,7878=>632,7879=>615,7880=>295,7881=>278,7882=>295,7883=>278,7884=>787,7885=>612,7886=>787,7887=>612,7888=>787,7889=>612,7890=>787,7891=>612,7892=>787,7893=>612,7894=>787,7895=>612,7896=>787,7897=>612,7898=>913,7899=>612,7900=>913,7901=>612,7902=>913,7903=>612,7904=>913,7905=>612,7906=>913,7907=>612,7908=>732,7909=>634,7910=>732,7911=>634,7912=>858,7913=>634,7914=>858,7915=>634,7916=>858,7917=>634,7918=>858,7919=>634,7920=>858,7921=>634,7922=>611,7923=>592,7924=>611,7925=>592,7926=>611,7927=>592,7928=>611,7929=>592,7930=>769,7931=>477,7936=>659,7937=>659,7938=>659,7939=>659,7940=>659,7941=>659,7942=>659,7943=>659,7944=>684,7945=>684,7946=>877,7947=>877,7948=>769,7949=>801,7950=>708,7951=>743,7952=>541,7953=>541,7954=>541,7955=>541,7956=>541,7957=>541,7960=>711,7961=>711,7962=>966,7963=>975,7964=>898,7965=>928,7968=>634,7969=>634,7970=>634,7971=>634,7972=>634,7973=>634,7974=>634,7975=>634,7976=>837,7977=>835,7978=>1086,7979=>1089,7980=>1027,7981=>1051,7982=>934,7983=>947,7984=>338,7985=>338,7986=>338,7987=>338,7988=>338,7989=>338,7990=>338,7991=>338,7992=>380,7993=>374,7994=>635,7995=>635,7996=>570,7997=>600,7998=>489,7999=>493,8000=>612,8001=>612,8002=>612,8003=>612,8004=>612,8005=>612,8008=>804,8009=>848,8010=>1095,8011=>1100,8012=>938,8013=>970,8016=>579,8017=>579,8018=>579,8019=>579,8020=>579,8021=>579,8022=>579,8023=>579,8025=>784,8027=>998,8029=>1012,8031=>897,8032=>837,8033=>837,8034=>837,8035=>837,8036=>837,8037=>837,8038=>837,8039=>837,8040=>802,8041=>843,8042=>1089,8043=>1095,8044=>946,8045=>972,8046=>921,8047=>952,8048=>659,8049=>659,8050=>541,8051=>548,8052=>634,8053=>654,8054=>338,8055=>338,8056=>612,8057=>612,8058=>579,8059=>579,8060=>837,8061=>837,8064=>659,8065=>659,8066=>659,8067=>659,8068=>659,8069=>659,8070=>659,8071=>659,8072=>684,8073=>684,8074=>877,8075=>877,8076=>769,8077=>801,8078=>708,8079=>743,8080=>634,8081=>634,8082=>634,8083=>634,8084=>634,8085=>634,8086=>634,8087=>634,8088=>837,8089=>835,8090=>1086,8091=>1089,8092=>1027,8093=>1051,8094=>934,8095=>947,8096=>837,8097=>837,8098=>837,8099=>837,8100=>837,8101=>837,8102=>837,8103=>837,8104=>802,8105=>843,8106=>1089,8107=>1095,8108=>946,8109=>972,8110=>921,8111=>952,8112=>659,8113=>659,8114=>659,8115=>659,8116=>659,8118=>659,8119=>659,8120=>684,8121=>684,8122=>716,8123=>692,8124=>684,8125=>500,8126=>500,8127=>500,8128=>500,8129=>500,8130=>634,8131=>634,8132=>654,8134=>634,8135=>634,8136=>805,8137=>746,8138=>931,8139=>871,8140=>752,8141=>500,8142=>500,8143=>500,8144=>338,8145=>338,8146=>338,8147=>338,8150=>338,8151=>338,8152=>295,8153=>295,8154=>475,8155=>408,8157=>500,8158=>500,8159=>500,8160=>579,8161=>579,8162=>579,8163=>579,8164=>635,8165=>635,8166=>579,8167=>579,8168=>611,8169=>611,8170=>845,8171=>825,8172=>685,8173=>500,8174=>500,8175=>500,8178=>837,8179=>837,8180=>837,8182=>837,8183=>837,8184=>941,8185=>813,8186=>922,8187=>826,8188=>764,8189=>500,8190=>500,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>330,8197=>250,8198=>167,8199=>636,8200=>318,8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>361,8209=>361,8210=>636,8211=>500,8212=>1000,8213=>1000,8214=>500,8215=>500,8216=>318,8217=>318,8218=>318,8219=>318,8220=>518,8221=>518,8222=>518,8223=>518,8224=>500,8225=>500,8226=>590,8227=>590,8228=>334,8229=>667,8230=>1000,8231=>318,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>200,8240=>1342,8241=>1735,8242=>227,8243=>374,8244=>520,8245=>227,8246=>374,8247=>520,8248=>339,8249=>400,8250=>400,8251=>838,8252=>485,8253=>531,8254=>500,8255=>804,8256=>804,8257=>250,8258=>1000,8259=>500,8260=>167,8261=>390,8262=>390,8263=>922,8264=>733,8265=>733,8266=>497,8267=>636,8268=>500,8269=>500,8270=>500,8271=>337,8272=>804,8273=>500,8274=>450,8275=>1000,8276=>804,8277=>838,8278=>586,8279=>663,8280=>838,8281=>838,8282=>318,8283=>797,8284=>838,8285=>318,8286=>318,8287=>222,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>401,8305=>179,8308=>401,8309=>401,8310=>401,8311=>401,8312=>401,8313=>401,8314=>528,8315=>528,8316=>528,8317=>246,8318=>246,8319=>398,8320=>401,8321=>401,8322=>401,8323=>401,8324=>401,8325=>401,8326=>401,8327=>401,8328=>401,8329=>401,8330=>528,8331=>528,8332=>528,8333=>246,8334=>246,8336=>392,8337=>417,8338=>414,8339=>444,8340=>417,8341=>404,8342=>426,8343=>166,8344=>623,8345=>398,8346=>428,8347=>373,8348=>295,8352=>877,8353=>636,8354=>636,8355=>636,8356=>636,8357=>974,8358=>748,8359=>1272,8360=>1074,8361=>989,8362=>784,8363=>636,8364=>636,8365=>636,8366=>636,8367=>1272,8368=>636,8369=>636,8370=>636,8371=>636,8372=>774,8373=>636,8376=>636,8377=>636,8378=>679,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>1019,8449=>1019,8450=>698,8451=>1123,8452=>642,8453=>1019,8454=>1067,8455=>614,8456=>698,8457=>952,8459=>988,8460=>754,8461=>850,8462=>634,8463=>634,8464=>470,8465=>697,8466=>720,8467=>413,8468=>818,8469=>801,8470=>1040,8471=>1000,8472=>697,8473=>701,8474=>787,8475=>798,8476=>814,8477=>792,8478=>896,8479=>684,8480=>1020,8481=>1074,8482=>1000,8483=>684,8484=>745,8485=>578,8486=>764,8487=>764,8488=>616,8489=>338,8490=>656,8491=>684,8492=>786,8493=>703,8494=>854,8495=>592,8496=>605,8497=>786,8498=>575,8499=>1069,8500=>462,8501=>745,8502=>674,8503=>466,8504=>645,8505=>380,8506=>926,8507=>1194,8508=>702,8509=>728,8510=>654,8511=>849,8512=>811,8513=>775,8514=>557,8515=>557,8516=>611,8517=>819,8518=>708,8519=>615,8520=>351,8521=>351,8523=>780,8526=>526,8528=>969,8529=>969,8530=>1370,8531=>969,8532=>969,8533=>969,8534=>969,8535=>969,8536=>969,8537=>969,8538=>969,8539=>969,8540=>969,8541=>969,8542=>969,8543=>568,8544=>295,8545=>492,8546=>689,8547=>923,8548=>684,8549=>922,8550=>1120,8551=>1317,8552=>917,8553=>685,8554=>933,8555=>1131,8556=>557,8557=>698,8558=>770,8559=>863,8560=>278,8561=>458,8562=>637,8563=>812,8564=>592,8565=>811,8566=>991,8567=>1170,8568=>819,8569=>592,8570=>822,8571=>1002,8572=>278,8573=>550,8574=>635,8575=>974,8576=>1245,8577=>770,8578=>1245,8579=>703,8580=>549,8581=>698,8585=>969,8592=>838,8593=>838,8594=>838,8595=>838,8596=>838,8597=>838,8598=>838,8599=>838,8600=>838,8601=>838,8602=>838,8603=>838,8604=>838,8605=>838,8606=>838,8607=>838,8608=>838,8609=>838,8610=>838,8611=>838,8612=>838,8613=>838,8614=>838,8615=>838,8616=>838,8617=>838,8618=>838,8619=>838,8620=>838,8621=>838,8622=>838,8623=>838,8624=>838,8625=>838,8626=>838,8627=>838,8628=>838,8629=>838,8630=>838,8631=>838,8632=>838,8633=>838,8634=>838,8635=>838,8636=>838,8637=>838,8638=>838,8639=>838,8640=>838,8641=>838,8642=>838,8643=>838,8644=>838,8645=>838,8646=>838,8647=>838,8648=>838,8649=>838,8650=>838,8651=>838,8652=>838,8653=>838,8654=>838,8655=>838,8656=>838,8657=>838,8658=>838,8659=>838,8660=>838,8661=>838,8662=>838,8663=>838,8664=>838,8665=>838,8666=>838,8667=>838,8668=>838,8669=>838,8670=>838,8671=>838,8672=>838,8673=>838,8674=>838,8675=>838,8676=>838,8677=>838,8678=>838,8679=>838,8680=>838,8681=>838,8682=>838,8683=>838,8684=>838,8685=>838,8686=>838,8687=>838,8688=>838,8689=>838,8690=>838,8691=>838,8692=>838,8693=>838,8694=>838,8695=>838,8696=>838,8697=>838,8698=>838,8699=>838,8700=>838,8701=>838,8702=>838,8703=>838,8704=>684,8705=>636,8706=>517,8707=>632,8708=>632,8709=>871,8710=>669,8711=>669,8712=>871,8713=>871,8714=>718,8715=>871,8716=>871,8717=>718,8718=>636,8719=>757,8720=>757,8721=>674,8722=>838,8723=>838,8724=>838,8725=>337,8726=>637,8727=>838,8728=>626,8729=>626,8730=>637,8731=>637,8732=>637,8733=>714,8734=>833,8735=>838,8736=>896,8737=>896,8738=>838,8739=>500,8740=>500,8741=>500,8742=>500,8743=>732,8744=>732,8745=>732,8746=>732,8747=>521,8748=>789,8749=>1057,8750=>521,8751=>789,8752=>1057,8753=>521,8754=>521,8755=>521,8756=>636,8757=>636,8758=>260,8759=>636,8760=>838,8761=>838,8762=>838,8763=>838,8764=>838,8765=>838,8766=>838,8767=>838,8768=>375,8769=>838,8770=>838,8771=>838,8772=>838,8773=>838,8774=>838,8775=>838,8776=>838,8777=>838,8778=>838,8779=>838,8780=>838,8781=>838,8782=>838,8783=>838,8784=>838,8785=>838,8786=>839,8787=>839,8788=>1000,8789=>1000,8790=>838,8791=>838,8792=>838,8793=>838,8794=>838,8795=>838,8796=>838,8797=>838,8798=>838,8799=>838,8800=>838,8801=>838,8802=>838,8803=>838,8804=>838,8805=>838,8806=>838,8807=>838,8808=>838,8809=>838,8810=>1047,8811=>1047,8812=>464,8813=>838,8814=>838,8815=>838,8816=>838,8817=>838,8818=>838,8819=>838,8820=>838,8821=>838,8822=>838,8823=>838,8824=>838,8825=>838,8826=>838,8827=>838,8828=>838,8829=>838,8830=>838,8831=>838,8832=>838,8833=>838,8834=>838,8835=>838,8836=>838,8837=>838,8838=>838,8839=>838,8840=>838,8841=>838,8842=>838,8843=>838,8844=>732,8845=>732,8846=>732,8847=>838,8848=>838,8849=>838,8850=>838,8851=>780,8852=>780,8853=>838,8854=>838,8855=>838,8856=>838,8857=>838,8858=>838,8859=>838,8860=>838,8861=>838,8862=>838,8863=>838,8864=>838,8865=>838,8866=>871,8867=>871,8868=>871,8869=>871,8870=>521,8871=>521,8872=>871,8873=>871,8874=>871,8875=>871,8876=>871,8877=>871,8878=>871,8879=>871,8880=>838,8881=>838,8882=>838,8883=>838,8884=>838,8885=>838,8886=>1000,8887=>1000,8888=>838,8889=>838,8890=>521,8891=>732,8892=>732,8893=>732,8894=>838,8895=>838,8896=>820,8897=>820,8898=>820,8899=>820,8900=>494,8901=>318,8902=>626,8903=>838,8904=>1000,8905=>1000,8906=>1000,8907=>1000,8908=>1000,8909=>838,8910=>732,8911=>732,8912=>838,8913=>838,8914=>838,8915=>838,8916=>838,8917=>838,8918=>838,8919=>838,8920=>1422,8921=>1422,8922=>838,8923=>838,8924=>838,8925=>838,8926=>838,8927=>838,8928=>838,8929=>838,8930=>838,8931=>838,8932=>838,8933=>838,8934=>838,8935=>838,8936=>838,8937=>838,8938=>838,8939=>838,8940=>838,8941=>838,8942=>1000,8943=>1000,8944=>1000,8945=>1000,8946=>1000,8947=>871,8948=>718,8949=>871,8950=>871,8951=>718,8952=>871,8953=>871,8954=>1000,8955=>871,8956=>718,8957=>871,8958=>718,8959=>871,8960=>602,8961=>602,8962=>635,8963=>838,8964=>838,8965=>838,8966=>838,8967=>488,8968=>390,8969=>390,8970=>390,8971=>390,8972=>809,8973=>809,8974=>809,8975=>809,8976=>838,8977=>513,8984=>1000,8985=>838,8988=>469,8989=>469,8990=>469,8991=>469,8992=>521,8993=>521,8996=>1152,8997=>1152,8998=>1414,8999=>1152,9000=>1443,9003=>1414,9004=>873,9075=>338,9076=>635,9077=>837,9082=>659,9085=>757,9095=>1152,9108=>873,9115=>500,9116=>500,9117=>500,9118=>500,9119=>500,9120=>500,9121=>500,9122=>500,9123=>500,9124=>500,9125=>500,9126=>500,9127=>750,9128=>750,9129=>750,9130=>750,9131=>750,9132=>750,9133=>750,9134=>521,9166=>838,9167=>945,9187=>873,9189=>769,9192=>636,9250=>635,9251=>635,9312=>896,9313=>896,9314=>896,9315=>896,9316=>896,9317=>896,9318=>896,9319=>896,9320=>896,9321=>896,9472=>602,9473=>602,9474=>602,9475=>602,9476=>602,9477=>602,9478=>602,9479=>602,9480=>602,9481=>602,9482=>602,9483=>602,9484=>602,9485=>602,9486=>602,9487=>602,9488=>602,9489=>602,9490=>602,9491=>602,9492=>602,9493=>602,9494=>602,9495=>602,9496=>602,9497=>602,9498=>602,9499=>602,9500=>602,9501=>602,9502=>602,9503=>602,9504=>602,9505=>602,9506=>602,9507=>602,9508=>602,9509=>602,9510=>602,9511=>602,9512=>602,9513=>602,9514=>602,9515=>602,9516=>602,9517=>602,9518=>602,9519=>602,9520=>602,9521=>602,9522=>602,9523=>602,9524=>602,9525=>602,9526=>602,9527=>602,9528=>602,9529=>602,9530=>602,9531=>602,9532=>602,9533=>602,9534=>602,9535=>602,9536=>602,9537=>602,9538=>602,9539=>602,9540=>602,9541=>602,9542=>602,9543=>602,9544=>602,9545=>602,9546=>602,9547=>602,9548=>602,9549=>602,9550=>602,9551=>602,9552=>602,9553=>602,9554=>602,9555=>602,9556=>602,9557=>602,9558=>602,9559=>602,9560=>602,9561=>602,9562=>602,9563=>602,9564=>602,9565=>602,9566=>602,9567=>602,9568=>602,9569=>602,9570=>602,9571=>602,9572=>602,9573=>602,9574=>602,9575=>602,9576=>602,9577=>602,9578=>602,9579=>602,9580=>602,9581=>602,9582=>602,9583=>602,9584=>602,9585=>602,9586=>602,9587=>602,9588=>602,9589=>602,9590=>602,9591=>602,9592=>602,9593=>602,9594=>602,9595=>602,9596=>602,9597=>602,9598=>602,9599=>602,9600=>769,9601=>769,9602=>769,9603=>769,9604=>769,9605=>769,9606=>769,9607=>769,9608=>769,9609=>769,9610=>769,9611=>769,9612=>769,9613=>769,9614=>769,9615=>769,9616=>769,9617=>769,9618=>769,9619=>769,9620=>769,9621=>769,9622=>769,9623=>769,9624=>769,9625=>769,9626=>769,9627=>769,9628=>769,9629=>769,9630=>769,9631=>769,9632=>945,9633=>945,9634=>945,9635=>945,9636=>945,9637=>945,9638=>945,9639=>945,9640=>945,9641=>945,9642=>678,9643=>678,9644=>945,9645=>945,9646=>550,9647=>550,9648=>769,9649=>769,9650=>769,9651=>769,9652=>502,9653=>502,9654=>769,9655=>769,9656=>502,9657=>502,9658=>769,9659=>769,9660=>769,9661=>769,9662=>502,9663=>502,9664=>769,9665=>769,9666=>502,9667=>502,9668=>769,9669=>769,9670=>769,9671=>769,9672=>769,9673=>873,9674=>494,9675=>873,9676=>873,9677=>873,9678=>873,9679=>873,9680=>873,9681=>873,9682=>873,9683=>873,9684=>873,9685=>873,9686=>527,9687=>527,9688=>791,9689=>970,9690=>970,9691=>970,9692=>387,9693=>387,9694=>387,9695=>387,9696=>873,9697=>873,9698=>769,9699=>769,9700=>769,9701=>769,9702=>590,9703=>945,9704=>945,9705=>945,9706=>945,9707=>945,9708=>769,9709=>769,9710=>769,9711=>1119,9712=>945,9713=>945,9714=>945,9715=>945,9716=>873,9717=>873,9718=>873,9719=>873,9720=>769,9721=>769,9722=>769,9723=>830,9724=>830,9725=>732,9726=>732,9727=>769,9728=>896,9729=>1000,9730=>896,9731=>896,9732=>896,9733=>896,9734=>896,9735=>573,9736=>896,9737=>896,9738=>888,9739=>888,9740=>671,9741=>1013,9742=>1246,9743=>1250,9744=>896,9745=>896,9746=>896,9747=>532,9748=>896,9749=>896,9750=>896,9751=>896,9752=>896,9753=>896,9754=>896,9755=>896,9756=>896,9757=>609,9758=>896,9759=>609,9760=>896,9761=>896,9762=>896,9763=>896,9764=>669,9765=>746,9766=>649,9767=>784,9768=>545,9769=>896,9770=>896,9771=>896,9772=>710,9773=>896,9774=>896,9775=>896,9776=>896,9777=>896,9778=>896,9779=>896,9780=>896,9781=>896,9782=>896,9783=>896,9784=>896,9785=>1042,9786=>1042,9787=>1042,9788=>896,9789=>896,9790=>896,9791=>614,9792=>732,9793=>732,9794=>896,9795=>896,9796=>896,9797=>896,9798=>896,9799=>896,9800=>896,9801=>896,9802=>896,9803=>896,9804=>896,9805=>896,9806=>896,9807=>896,9808=>896,9809=>896,9810=>896,9811=>896,9812=>896,9813=>896,9814=>896,9815=>896,9816=>896,9817=>896,9818=>896,9819=>896,9820=>896,9821=>896,9822=>896,9823=>896,9824=>896,9825=>896,9826=>896,9827=>896,9828=>896,9829=>896,9830=>896,9831=>896,9832=>896,9833=>472,9834=>638,9835=>896,9836=>896,9837=>472,9838=>357,9839=>484,9840=>748,9841=>766,9842=>896,9843=>896,9844=>896,9845=>896,9846=>896,9847=>896,9848=>896,9849=>896,9850=>896,9851=>896,9852=>896,9853=>896,9854=>896,9855=>896,9856=>869,9857=>869,9858=>869,9859=>869,9860=>869,9861=>869,9862=>896,9863=>896,9864=>896,9865=>896,9866=>896,9867=>896,9868=>896,9869=>896,9870=>896,9871=>896,9872=>896,9873=>896,9874=>896,9875=>896,9876=>896,9877=>541,9878=>896,9879=>896,9880=>896,9881=>896,9882=>896,9883=>896,9884=>896,9888=>896,9889=>702,9890=>1004,9891=>1089,9892=>1175,9893=>903,9894=>838,9895=>838,9896=>838,9897=>838,9898=>838,9899=>838,9900=>838,9901=>838,9902=>838,9903=>838,9904=>844,9905=>838,9906=>732,9907=>732,9908=>732,9909=>732,9910=>850,9911=>732,9912=>732,9920=>838,9921=>838,9922=>838,9923=>838,9954=>732,9985=>838,9986=>838,9987=>838,9988=>838,9990=>838,9991=>838,9992=>838,9993=>838,9996=>838,9997=>838,9998=>838,9999=>838,10000=>838,10001=>838,10002=>838,10003=>838,10004=>838,10005=>838,10006=>838,10007=>838,10008=>838,10009=>838,10010=>838,10011=>838,10012=>838,10013=>838,10014=>838,10015=>838,10016=>838,10017=>838,10018=>838,10019=>838,10020=>838,10021=>838,10022=>838,10023=>838,10025=>838,10026=>838,10027=>838,10028=>838,10029=>838,10030=>838,10031=>838,10032=>838,10033=>838,10034=>838,10035=>838,10036=>838,10037=>838,10038=>838,10039=>838,10040=>838,10041=>838,10042=>838,10043=>838,10044=>838,10045=>838,10046=>838,10047=>838,10048=>838,10049=>838,10050=>838,10051=>838,10052=>838,10053=>838,10054=>838,10055=>838,10056=>838,10057=>838,10058=>838,10059=>838,10061=>896,10063=>896,10064=>896,10065=>896,10066=>896,10070=>896,10072=>838,10073=>838,10074=>838,10075=>322,10076=>322,10077=>538,10078=>538,10081=>838,10082=>838,10083=>838,10084=>838,10085=>838,10086=>838,10087=>838,10088=>838,10089=>838,10090=>838,10091=>838,10092=>838,10093=>838,10094=>838,10095=>838,10096=>838,10097=>838,10098=>838,10099=>838,10100=>838,10101=>838,10102=>896,10103=>896,10104=>896,10105=>896,10106=>896,10107=>896,10108=>896,10109=>896,10110=>896,10111=>896,10112=>838,10113=>838,10114=>838,10115=>838,10116=>838,10117=>838,10118=>838,10119=>838,10120=>838,10121=>838,10122=>838,10123=>838,10124=>838,10125=>838,10126=>838,10127=>838,10128=>838,10129=>838,10130=>838,10131=>838,10132=>838,10136=>838,10137=>838,10138=>838,10139=>838,10140=>838,10141=>838,10142=>838,10143=>838,10144=>838,10145=>838,10146=>838,10147=>838,10148=>838,10149=>838,10150=>838,10151=>838,10152=>838,10153=>838,10154=>838,10155=>838,10156=>838,10157=>838,10158=>838,10159=>838,10161=>838,10162=>838,10163=>838,10164=>838,10165=>838,10166=>838,10167=>838,10168=>838,10169=>838,10170=>838,10171=>838,10172=>838,10173=>838,10174=>838,10181=>390,10182=>390,10208=>494,10214=>495,10215=>495,10216=>390,10217=>390,10218=>556,10219=>556,10224=>838,10225=>838,10226=>838,10227=>838,10228=>1157,10229=>1434,10230=>1434,10231=>1434,10232=>1434,10233=>1434,10234=>1434,10235=>1434,10236=>1434,10237=>1434,10238=>1434,10239=>1434,10240=>732,10241=>732,10242=>732,10243=>732,10244=>732,10245=>732,10246=>732,10247=>732,10248=>732,10249=>732,10250=>732,10251=>732,10252=>732,10253=>732,10254=>732,10255=>732,10256=>732,10257=>732,10258=>732,10259=>732,10260=>732,10261=>732,10262=>732,10263=>732,10264=>732,10265=>732,10266=>732,10267=>732,10268=>732,10269=>732,10270=>732,10271=>732,10272=>732,10273=>732,10274=>732,10275=>732,10276=>732,10277=>732,10278=>732,10279=>732,10280=>732,10281=>732,10282=>732,10283=>732,10284=>732,10285=>732,10286=>732,10287=>732,10288=>732,10289=>732,10290=>732,10291=>732,10292=>732,10293=>732,10294=>732,10295=>732,10296=>732,10297=>732,10298=>732,10299=>732,10300=>732,10301=>732,10302=>732,10303=>732,10304=>732,10305=>732,10306=>732,10307=>732,10308=>732,10309=>732,10310=>732,10311=>732,10312=>732,10313=>732,10314=>732,10315=>732,10316=>732,10317=>732,10318=>732,10319=>732,10320=>732,10321=>732,10322=>732,10323=>732,10324=>732,10325=>732,10326=>732,10327=>732,10328=>732,10329=>732,10330=>732,10331=>732,10332=>732,10333=>732,10334=>732,10335=>732,10336=>732,10337=>732,10338=>732,10339=>732,10340=>732,10341=>732,10342=>732,10343=>732,10344=>732,10345=>732,10346=>732,10347=>732,10348=>732,10349=>732,10350=>732,10351=>732,10352=>732,10353=>732,10354=>732,10355=>732,10356=>732,10357=>732,10358=>732,10359=>732,10360=>732,10361=>732,10362=>732,10363=>732,10364=>732,10365=>732,10366=>732,10367=>732,10368=>732,10369=>732,10370=>732,10371=>732,10372=>732,10373=>732,10374=>732,10375=>732,10376=>732,10377=>732,10378=>732,10379=>732,10380=>732,10381=>732,10382=>732,10383=>732,10384=>732,10385=>732,10386=>732,10387=>732,10388=>732,10389=>732,10390=>732,10391=>732,10392=>732,10393=>732,10394=>732,10395=>732,10396=>732,10397=>732,10398=>732,10399=>732,10400=>732,10401=>732,10402=>732,10403=>732,10404=>732,10405=>732,10406=>732,10407=>732,10408=>732,10409=>732,10410=>732,10411=>732,10412=>732,10413=>732,10414=>732,10415=>732,10416=>732,10417=>732,10418=>732,10419=>732,10420=>732,10421=>732,10422=>732,10423=>732,10424=>732,10425=>732,10426=>732,10427=>732,10428=>732,10429=>732,10430=>732,10431=>732,10432=>732,10433=>732,10434=>732,10435=>732,10436=>732,10437=>732,10438=>732,10439=>732,10440=>732,10441=>732,10442=>732,10443=>732,10444=>732,10445=>732,10446=>732,10447=>732,10448=>732,10449=>732,10450=>732,10451=>732,10452=>732,10453=>732,10454=>732,10455=>732,10456=>732,10457=>732,10458=>732,10459=>732,10460=>732,10461=>732,10462=>732,10463=>732,10464=>732,10465=>732,10466=>732,10467=>732,10468=>732,10469=>732,10470=>732,10471=>732,10472=>732,10473=>732,10474=>732,10475=>732,10476=>732,10477=>732,10478=>732,10479=>732,10480=>732,10481=>732,10482=>732,10483=>732,10484=>732,10485=>732,10486=>732,10487=>732,10488=>732,10489=>732,10490=>732,10491=>732,10492=>732,10493=>732,10494=>732,10495=>732,10502=>838,10503=>838,10506=>838,10507=>838,10560=>683,10561=>683,10627=>734,10628=>734,10702=>838,10703=>1000,10704=>1000,10705=>1000,10706=>1000,10707=>1000,10708=>1000,10709=>1000,10731=>494,10746=>838,10747=>838,10752=>1000,10753=>1000,10754=>1000,10764=>1325,10765=>521,10766=>521,10767=>521,10768=>521,10769=>521,10770=>521,10771=>521,10772=>521,10773=>521,10774=>521,10775=>521,10776=>521,10777=>521,10778=>521,10779=>521,10780=>521,10799=>838,10858=>838,10859=>838,10877=>838,10878=>838,10879=>838,10880=>838,10881=>838,10882=>838,10883=>838,10884=>838,10885=>838,10886=>838,10887=>838,10888=>838,10889=>838,10890=>838,10891=>838,10892=>838,10893=>838,10894=>838,10895=>838,10896=>838,10897=>838,10898=>838,10899=>838,10900=>838,10901=>838,10902=>838,10903=>838,10904=>838,10905=>838,10906=>838,10907=>838,10908=>838,10909=>838,10910=>838,10911=>838,10912=>838,10926=>838,10927=>838,10928=>838,10929=>838,10930=>838,10931=>838,10932=>838,10933=>838,10934=>838,10935=>838,10936=>838,10937=>838,10938=>838,11001=>838,11002=>838,11008=>838,11009=>838,11010=>838,11011=>838,11012=>838,11013=>838,11014=>838,11015=>838,11016=>838,11017=>838,11018=>838,11019=>838,11020=>838,11021=>838,11022=>836,11023=>836,11024=>836,11025=>836,11026=>945,11027=>945,11028=>945,11029=>945,11030=>769,11031=>769,11032=>769,11033=>769,11034=>945,11039=>869,11040=>869,11041=>873,11042=>873,11043=>873,11044=>1119,11091=>869,11092=>869,11360=>557,11361=>278,11362=>557,11363=>603,11364=>695,11365=>613,11366=>392,11367=>752,11368=>634,11369=>656,11370=>579,11371=>685,11372=>525,11373=>781,11374=>863,11375=>684,11376=>781,11377=>734,11378=>1128,11379=>961,11380=>592,11381=>654,11382=>568,11383=>660,11385=>414,11386=>612,11387=>491,11388=>175,11389=>431,11390=>635,11391=>685,11520=>591,11521=>595,11522=>564,11523=>602,11524=>587,11525=>911,11526=>626,11527=>952,11528=>595,11529=>607,11530=>954,11531=>620,11532=>595,11533=>926,11534=>595,11535=>806,11536=>931,11537=>584,11538=>592,11539=>923,11540=>953,11541=>828,11542=>596,11543=>595,11544=>590,11545=>592,11546=>592,11547=>621,11548=>920,11549=>589,11550=>586,11551=>581,11552=>914,11553=>596,11554=>595,11555=>592,11556=>642,11557=>901,11568=>646,11569=>888,11570=>888,11571=>682,11572=>684,11573=>635,11574=>562,11575=>684,11576=>684,11577=>632,11578=>632,11579=>683,11580=>875,11581=>685,11582=>491,11583=>685,11584=>888,11585=>888,11586=>300,11587=>627,11588=>752,11589=>656,11590=>527,11591=>685,11592=>645,11593=>632,11594=>502,11595=>953,11596=>778,11597=>748,11598=>621,11599=>295,11600=>778,11601=>295,11602=>752,11603=>633,11604=>888,11605=>888,11606=>752,11607=>320,11608=>749,11609=>888,11610=>888,11611=>698,11612=>768,11613=>685,11614=>698,11615=>622,11616=>684,11617=>752,11618=>632,11619=>788,11620=>567,11621=>788,11631=>515,11800=>531,11806=>838,11810=>390,11811=>390,11812=>390,11813=>390,11822=>531,19904=>896,19905=>896,19906=>896,19907=>896,19908=>896,19909=>896,19910=>896,19911=>896,19912=>896,19913=>896,19914=>896,19915=>896,19916=>896,19917=>896,19918=>896,19919=>896,19920=>896,19921=>896,19922=>896,19923=>896,19924=>896,19925=>896,19926=>896,19927=>896,19928=>896,19929=>896,19930=>896,19931=>896,19932=>896,19933=>896,19934=>896,19935=>896,19936=>896,19937=>896,19938=>896,19939=>896,19940=>896,19941=>896,19942=>896,19943=>896,19944=>896,19945=>896,19946=>896,19947=>896,19948=>896,19949=>896,19950=>896,19951=>896,19952=>896,19953=>896,19954=>896,19955=>896,19956=>896,19957=>896,19958=>896,19959=>896,19960=>896,19961=>896,19962=>896,19963=>896,19964=>896,19965=>896,19966=>896,19967=>896,42192=>686,42193=>603,42194=>603,42195=>770,42196=>611,42197=>611,42198=>775,42199=>656,42200=>656,42201=>512,42202=>698,42203=>703,42204=>685,42205=>575,42206=>575,42207=>863,42208=>748,42209=>557,42210=>635,42211=>695,42212=>695,42213=>684,42214=>684,42215=>752,42216=>775,42217=>512,42218=>989,42219=>685,42220=>611,42221=>686,42222=>684,42223=>684,42224=>632,42225=>632,42226=>295,42227=>787,42228=>732,42229=>732,42230=>557,42231=>767,42232=>300,42233=>300,42234=>596,42235=>596,42236=>300,42237=>300,42238=>588,42239=>588,42564=>635,42565=>521,42566=>354,42567=>338,42572=>1180,42573=>1028,42576=>1029,42577=>906,42580=>1080,42581=>842,42582=>977,42583=>843,42594=>1062,42595=>912,42596=>1066,42597=>901,42598=>1178,42599=>1008,42600=>787,42601=>612,42602=>855,42603=>712,42604=>1358,42605=>1019,42606=>879,42634=>782,42635=>685,42636=>611,42637=>583,42644=>686,42645=>634,42760=>493,42761=>493,42762=>493,42763=>493,42764=>493,42765=>493,42766=>493,42767=>493,42768=>493,42769=>493,42770=>493,42771=>493,42772=>493,42773=>493,42774=>493,42779=>369,42780=>369,42781=>252,42782=>252,42783=>252,42786=>385,42787=>356,42788=>472,42789=>472,42790=>752,42791=>634,42792=>878,42793=>709,42794=>614,42795=>541,42800=>491,42801=>521,42802=>1250,42803=>985,42804=>1203,42805=>990,42806=>1142,42807=>981,42808=>971,42809=>818,42810=>971,42811=>818,42812=>959,42813=>818,42814=>703,42815=>549,42816=>656,42817=>583,42822=>680,42823=>392,42824=>582,42825=>427,42826=>807,42827=>704,42830=>1358,42831=>1019,42832=>603,42833=>635,42834=>734,42835=>774,42838=>787,42839=>635,42852=>605,42853=>635,42854=>605,42855=>635,42880=>557,42881=>278,42882=>735,42883=>634,42889=>337,42890=>376,42891=>401,42892=>275,42893=>686,42894=>487,42896=>772,42897=>667,42912=>775,42913=>635,42914=>656,42915=>579,42916=>748,42917=>634,42918=>695,42919=>411,42920=>635,42921=>521,42922=>801,43002=>915,43003=>575,43004=>603,43005=>863,43006=>295,43007=>1199,61184=>213,61185=>238,61186=>257,61187=>264,61188=>267,61189=>238,61190=>213,61191=>238,61192=>257,61193=>264,61194=>257,61195=>238,61196=>213,61197=>238,61198=>257,61199=>264,61200=>257,61201=>238,61202=>213,61203=>238,61204=>267,61205=>264,61206=>257,61207=>238,61208=>213,61209=>275,61440=>977,61441=>977,61442=>977,61443=>977,62464=>580,62465=>580,62466=>624,62467=>889,62468=>585,62469=>580,62470=>653,62471=>882,62472=>555,62473=>580,62474=>1168,62475=>589,62476=>590,62477=>869,62478=>580,62479=>589,62480=>914,62481=>590,62482=>731,62483=>583,62484=>872,62485=>589,62486=>895,62487=>589,62488=>589,62489=>590,62490=>649,62491=>589,62492=>589,62493=>599,62494=>590,62495=>516,62496=>580,62497=>584,62498=>580,62499=>580,62500=>581,62501=>638,62502=>955,62504=>931,62505=>808,62506=>508,62507=>508,62508=>508,62509=>508,62510=>508,62511=>508,62512=>508,62513=>508,62514=>508,62515=>508,62516=>518,62517=>518,62518=>518,62519=>787,62520=>787,62521=>787,62522=>787,62523=>787,62524=>546,62525=>546,62526=>546,62527=>546,62528=>546,62529=>546,63173=>612,64256=>689,64257=>630,64258=>630,64259=>967,64260=>967,64261=>686,64262=>861,64275=>1202,64276=>1202,64277=>1196,64278=>1186,64279=>1529,64285=>224,64286=>0,64287=>331,64288=>636,64289=>856,64290=>774,64291=>906,64292=>771,64293=>843,64294=>855,64295=>807,64296=>875,64297=>838,64298=>708,64299=>708,64300=>708,64301=>708,64302=>668,64303=>668,64304=>668,64305=>578,64306=>412,64307=>546,64308=>653,64309=>355,64310=>406,64312=>648,64313=>330,64314=>537,64315=>529,64316=>568,64318=>679,64320=>399,64321=>649,64323=>640,64324=>625,64326=>593,64327=>709,64328=>564,64329=>708,64330=>657,64331=>272,64332=>578,64333=>529,64334=>625,64335=>629,64338=>941,64339=>982,64340=>278,64341=>302,64342=>941,64343=>982,64344=>278,64345=>302,64346=>941,64347=>982,64348=>278,64349=>302,64350=>941,64351=>982,64352=>278,64353=>302,64354=>941,64355=>982,64356=>278,64357=>302,64358=>941,64359=>982,64360=>278,64361=>302,64362=>1037,64363=>1035,64364=>478,64365=>506,64366=>1037,64367=>1035,64368=>478,64369=>506,64370=>646,64371=>646,64372=>618,64373=>646,64374=>646,64375=>646,64376=>618,64377=>646,64378=>646,64379=>646,64380=>618,64381=>646,64382=>646,64383=>646,64384=>618,64385=>646,64386=>445,64387=>525,64388=>445,64389=>525,64390=>445,64391=>525,64392=>445,64393=>525,64394=>483,64395=>552,64396=>483,64397=>552,64398=>895,64399=>895,64400=>476,64401=>552,64402=>895,64403=>895,64404=>476,64405=>552,64406=>895,64407=>895,64408=>476,64409=>552,64410=>895,64411=>895,64412=>476,64413=>552,64414=>734,64415=>761,64416=>734,64417=>761,64418=>278,64419=>302,64426=>698,64427=>632,64428=>527,64429=>461,64467=>824,64468=>843,64469=>476,64470=>552,64473=>483,64474=>517,64488=>278,64489=>302,64508=>783,64509=>833,64510=>278,64511=>302,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65136=>293,65137=>293,65138=>293,65139=>262,65140=>293,65142=>293,65143=>293,65144=>293,65145=>293,65146=>293,65147=>293,65148=>293,65149=>293,65150=>293,65151=>293,65152=>470,65153=>278,65154=>305,65155=>278,65156=>305,65157=>483,65158=>517,65159=>278,65160=>305,65161=>783,65162=>833,65163=>278,65164=>302,65165=>278,65166=>305,65167=>941,65168=>982,65169=>278,65170=>302,65171=>524,65172=>536,65173=>941,65174=>982,65175=>278,65176=>302,65177=>941,65178=>982,65179=>278,65180=>302,65181=>646,65182=>646,65183=>618,65184=>646,65185=>646,65186=>646,65187=>618,65188=>646,65189=>646,65190=>646,65191=>618,65192=>646,65193=>445,65194=>525,65195=>445,65196=>525,65197=>483,65198=>552,65199=>483,65200=>552,65201=>1221,65202=>1275,65203=>838,65204=>892,65205=>1221,65206=>1275,65207=>838,65208=>892,65209=>1209,65210=>1225,65211=>849,65212=>867,65213=>1209,65214=>1225,65215=>849,65216=>867,65217=>925,65218=>949,65219=>796,65220=>820,65221=>925,65222=>949,65223=>796,65224=>820,65225=>597,65226=>532,65227=>597,65228=>482,65229=>597,65230=>532,65231=>523,65232=>482,65233=>1037,65234=>1035,65235=>478,65236=>506,65237=>776,65238=>834,65239=>478,65240=>506,65241=>824,65242=>843,65243=>476,65244=>552,65245=>727,65246=>757,65247=>305,65248=>331,65249=>619,65250=>666,65251=>536,65252=>578,65253=>734,65254=>761,65255=>278,65256=>302,65257=>524,65258=>536,65259=>527,65260=>461,65261=>483,65262=>517,65263=>783,65264=>833,65265=>783,65266=>833,65267=>278,65268=>302,65269=>570,65270=>597,65271=>570,65272=>597,65273=>570,65274=>597,65275=>570,65276=>597,65279=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>1025,65535=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusans.z b/lib/combodo/tcpdf/fonts/dejavusans.z deleted file mode 100644 index d0c4d3de7..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusans.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansb.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansb.ctg.z deleted file mode 100644 index 71cef637e..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansb.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansb.php b/lib/combodo/tcpdf/fonts/dejavusansb.php deleted file mode 100644 index 5214aef7f..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansb.php +++ /dev/null @@ -1,16 +0,0 @@ -32,'FontBBox'=>'[-1069 -415 1975 1174]','ItalicAngle'=>0,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>60,'StemH'=>26,'AvgWidth'=>573,'MaxWidth'=>2016,'MissingWidth'=>600); -$cbbox=array(0=>array(50,-177,550,705),33=>array(140,0,316,729),34=>array(95,458,426,729),35=>array(68,0,770,718),36=>array(78,-147,628,760),37=>array(32,-14,970,742),38=>array(60,-14,830,742),39=>array(95,458,211,729),40=>array(86,-132,377,759),41=>array(80,-132,371,759),42=>array(20,278,503,742),43=>array(106,0,732,627),44=>array(53,-142,278,189),45=>array(54,217,361,359),46=>array(102,0,278,189),47=>array(0,-93,365,729),48=>array(48,-14,648,742),49=>array(113,0,627,729),50=>array(79,0,609,742),51=>array(67,-14,616,742),52=>array(45,0,650,729),53=>array(77,-14,626,729),54=>array(62,-14,642,741),55=>array(67,0,616,729),56=>array(61,-14,634,742),57=>array(52,-14,632,741),58=>array(112,0,288,547),59=>array(63,-142,288,547),60=>array(106,30,732,597),61=>array(106,144,732,482),62=>array(106,30,732,597),63=>array(69,0,515,742),64=>array(66,-174,929,703),65=>array(5,0,769,729),66=>array(92,0,692,729),67=>array(50,-14,670,742),68=>array(92,0,778,729),69=>array(92,0,610,729),70=>array(92,0,599,729),71=>array(50,-14,747,742),72=>array(92,0,745,729),73=>array(92,0,280,729),74=>array(-56,-200,280,729),75=>array(92,0,805,729),76=>array(92,0,610,729),77=>array(92,0,903,729),78=>array(92,0,745,729),79=>array(50,-14,800,742),80=>array(92,0,692,729),81=>array(50,-146,800,742),82=>array(92,0,750,729),83=>array(72,-14,647,742),84=>array(5,0,677,729),85=>array(92,-14,720,729),86=>array(5,0,769,729),87=>array(30,0,1072,729),88=>array(19,0,751,729),89=>array(-10,0,734,729),90=>array(45,0,680,729),91=>array(86,-132,389,760),92=>array(0,-93,365,729),93=>array(68,-132,371,760),94=>array(101,457,737,729),95=>array(0,-236,500,-143),96=>array(46,616,322,800),97=>array(43,-14,596,560),98=>array(84,-14,671,760),99=>array(43,-14,526,560),100=>array(45,-14,632,760),101=>array(43,-14,630,560),102=>array(19,0,444,760),103=>array(45,-216,632,559),104=>array(84,0,634,760),105=>array(84,0,259,760),106=>array(-33,-216,259,760),107=>array(84,0,684,760),108=>array(84,0,259,760),109=>array(83,0,963,560),110=>array(84,0,634,560),111=>array(43,-14,644,560),112=>array(84,-208,671,560),113=>array(45,-208,632,559),114=>array(84,0,490,560),115=>array(52,-14,548,560),116=>array(13,0,455,702),117=>array(78,-14,628,547),118=>array(15,0,637,547),119=>array(35,0,889,547),120=>array(15,0,630,547),121=>array(12,-216,634,547),122=>array(45,0,534,547),123=>array(125,-163,587,760),124=>array(127,-236,238,764),125=>array(125,-163,587,760),126=>array(106,212,732,415),161=>array(140,0,316,729),162=>array(85,-153,567,699),163=>array(61,0,613,742),164=>array(36,30,601,596),165=>array(12,0,684,729),166=>array(127,-171,238,699),167=>array(7,-95,496,742),168=>array(96,654,404,774),169=>array(138,0,862,725),170=>array(77,182,489,742),171=>array(77,67,552,519),172=>array(106,140,732,444),173=>array(54,217,361,359),174=>array(138,0,862,725),175=>array(96,668,404,760),176=>array(87,424,412,749),177=>array(106,0,732,627),178=>array(53,326,382,742),179=>array(44,319,384,742),180=>array(178,616,454,800),181=>array(85,-209,704,547),182=>array(63,-96,549,729),183=>array(102,253,278,442),184=>array(128,-196,349,0),185=>array(60,326,382,734),186=>array(57,182,507,742),187=>array(94,67,569,519),188=>array(49,-14,957,742),189=>array(49,-14,987,742),190=>array(51,-14,957,742),191=>array(69,-14,515,729),192=>array(5,0,769,927),193=>array(5,0,769,927),194=>array(5,0,769,927),195=>array(5,0,769,931),196=>array(5,0,769,927),197=>array(5,0,769,928),198=>array(0,0,1012,729),199=>array(50,-196,670,742),200=>array(92,0,610,927),201=>array(92,0,610,927),202=>array(92,0,610,927),203=>array(92,0,610,927),204=>array(11,0,280,927),205=>array(92,0,337,927),206=>array(1,0,370,927),207=>array(32,0,339,927),208=>array(16,0,787,729),209=>array(92,0,745,928),210=>array(50,-14,800,927),211=>array(50,-14,800,927),212=>array(50,-14,800,927),213=>array(50,-14,800,928),214=>array(50,-14,800,927),215=>array(125,20,713,607),216=>array(22,-36,823,765),217=>array(92,-14,720,927),218=>array(92,-14,720,927),219=>array(92,-14,720,927),220=>array(92,-14,720,927),221=>array(-10,0,734,927),222=>array(92,0,692,729),223=>array(84,-14,676,760),224=>array(43,-14,596,800),225=>array(43,-14,596,800),226=>array(43,-14,596,800),227=>array(43,-14,596,778),228=>array(43,-14,596,774),229=>array(43,-14,596,888),230=>array(43,-14,1000,560),231=>array(43,-196,526,560),232=>array(43,-14,630,800),233=>array(43,-14,630,800),234=>array(43,-14,630,800),235=>array(43,-14,630,774),236=>array(-21,0,259,800),237=>array(84,0,387,800),238=>array(-13,0,355,800),239=>array(17,0,325,774),240=>array(43,-14,644,760),241=>array(84,0,634,778),242=>array(43,-14,644,800),243=>array(43,-14,644,800),244=>array(43,-14,644,800),245=>array(43,-14,644,778),246=>array(43,-14,644,774),247=>array(106,42,732,585),248=>array(38,-46,645,594),249=>array(78,-14,628,800),250=>array(78,-14,628,800),251=>array(78,-14,628,800),252=>array(78,-14,628,774),253=>array(12,-216,634,800),254=>array(84,-208,671,760),255=>array(12,-216,634,774),256=>array(5,0,769,914),257=>array(43,-14,596,763),258=>array(5,0,769,935),259=>array(43,-14,596,780),260=>array(5,-196,769,729),261=>array(43,-196,596,560),262=>array(50,-14,670,927),263=>array(43,-14,557,800),264=>array(50,-14,670,927),265=>array(43,-14,542,800),266=>array(50,-14,670,927),267=>array(43,-14,526,760),268=>array(50,-14,670,927),269=>array(43,-14,537,800),270=>array(92,0,778,927),271=>array(45,-14,871,760),272=>array(16,0,787,729),273=>array(45,-14,707,760),274=>array(92,0,610,914),275=>array(43,-14,630,763),276=>array(92,0,610,927),277=>array(43,-14,630,784),278=>array(92,0,610,927),279=>array(43,-14,630,760),280=>array(92,-196,610,729),281=>array(43,-196,630,560),282=>array(92,0,610,927),283=>array(43,-14,630,800),284=>array(50,-14,747,927),285=>array(45,-216,632,800),286=>array(50,-14,747,927),287=>array(45,-216,632,784),288=>array(50,-14,747,927),289=>array(45,-216,632,760),290=>array(50,-224,747,742),291=>array(45,-216,632,765),292=>array(92,0,745,927),293=>array(-9,0,634,927),294=>array(92,0,882,729),295=>array(81,0,709,760),296=>array(16,0,355,928),297=>array(1,0,341,778),298=>array(32,0,339,914),299=>array(18,0,325,763),300=>array(21,0,350,927),301=>array(7,0,335,784),302=>array(92,-196,366,729),303=>array(84,-196,345,760),304=>array(92,0,280,927),305=>array(84,0,259,547),306=>array(92,-200,651,729),307=>array(84,-216,602,760),308=>array(-56,-200,370,927),309=>array(-33,-216,355,800),310=>array(92,-209,805,729),311=>array(84,-209,684,760),312=>array(84,0,684,547),313=>array(92,0,610,928),314=>array(84,0,357,928),315=>array(92,-209,610,729),316=>array(71,-209,273,760),317=>array(92,0,610,729),318=>array(84,0,479,760),319=>array(92,0,610,729),320=>array(84,0,484,760),321=>array(-45,0,615,729),322=>array(-18,0,390,760),323=>array(92,0,745,928),324=>array(84,0,634,803),325=>array(92,-209,745,729),326=>array(84,-209,634,560),327=>array(92,0,745,927),328=>array(84,0,634,800),329=>array(51,0,891,729),330=>array(84,-200,730,742),331=>array(84,-216,634,560),332=>array(50,-14,800,914),333=>array(43,-14,644,763),334=>array(50,-14,800,927),335=>array(43,-14,644,787),336=>array(50,-14,800,927),337=>array(43,-14,644,800),338=>array(50,-1,1094,730),339=>array(43,-14,1046,560),340=>array(92,0,750,928),341=>array(84,0,515,803),342=>array(92,-209,750,729),343=>array(71,-209,490,560),344=>array(92,0,750,927),345=>array(84,0,490,800),346=>array(72,-14,647,928),347=>array(52,-14,548,803),348=>array(72,-14,647,927),349=>array(52,-14,548,800),350=>array(72,-196,647,742),351=>array(52,-196,548,560),352=>array(72,-14,647,927),353=>array(52,-14,548,800),354=>array(5,-196,677,729),355=>array(13,-196,455,702),356=>array(5,0,677,930),357=>array(13,0,507,814),358=>array(5,0,677,729),359=>array(13,0,455,702),360=>array(92,-14,720,928),361=>array(78,-14,628,778),362=>array(92,-14,720,914),363=>array(78,-14,628,763),364=>array(92,-14,720,927),365=>array(78,-14,628,784),366=>array(92,-14,720,929),367=>array(78,-14,628,881),368=>array(92,-14,720,927),369=>array(78,-14,628,800),370=>array(92,-196,720,729),371=>array(78,-196,716,547),372=>array(30,0,1072,931),373=>array(35,0,889,800),374=>array(-10,0,734,931),375=>array(12,-216,634,800),376=>array(-10,0,734,927),377=>array(45,0,680,928),378=>array(45,0,534,803),379=>array(45,0,680,929),380=>array(45,0,534,760),381=>array(45,0,680,927),382=>array(45,0,534,800),383=>array(19,0,444,760),384=>array(9,-14,671,760),385=>array(-68,0,741,729),386=>array(92,0,692,729),387=>array(84,-14,671,760),388=>array(40,0,731,729),389=>array(25,-14,696,760),390=>array(50,-14,670,742),391=>array(50,-14,818,924),392=>array(43,-14,643,724),393=>array(16,0,787,729),394=>array(-68,0,827,729),395=>array(70,0,669,729),396=>array(45,-14,632,760),397=>array(43,-222,645,560),398=>array(92,0,610,729),399=>array(51,-14,800,742),400=>array(67,-14,616,742),401=>array(-56,-200,599,729),402=>array(-57,-208,444,760),403=>array(50,-14,868,924),404=>array(2,-211,793,730),405=>array(84,0,1000,760),406=>array(92,0,428,729),407=>array(5,0,384,729),408=>array(92,0,805,742),409=>array(84,0,684,760),410=>array(5,0,355,760),411=>array(-11,0,562,760),412=>array(83,-13,963,729),413=>array(-56,-200,745,729),414=>array(84,-208,634,560),415=>array(50,-14,800,742),416=>array(53,-14,854,761),417=>array(46,-14,708,609),418=>array(50,-14,1007,742),419=>array(43,-216,826,560),420=>array(-68,0,741,729),421=>array(84,-208,671,760),422=>array(92,-146,760,729),423=>array(26,-14,601,742),424=>array(15,-14,511,560),425=>array(92,0,610,729),426=>array(-31,-217,561,760),427=>array(13,-216,455,702),428=>array(15,0,701,729),429=>array(13,0,455,760),430=>array(5,-200,677,729),431=>array(91,-14,833,761),432=>array(75,-14,733,609),433=>array(27,-14,823,728),434=>array(92,0,772,729),435=>array(-10,0,796,742),436=>array(12,-216,778,560),437=>array(45,0,680,729),438=>array(45,0,534,547),439=>array(72,-33,728,729),440=>array(41,-33,696,729),441=>array(37,-215,586,547),442=>array(57,-208,534,547),443=>array(79,0,609,742),444=>array(41,-33,728,729),445=>array(37,-215,586,547),446=>array(36,-15,525,702),447=>array(84,-208,671,560),448=>array(92,-208,280,729),449=>array(92,-208,566,729),450=>array(5,-208,536,729),451=>array(99,0,274,729),452=>array(92,0,1510,927),453=>array(92,0,1364,800),454=>array(45,-14,1250,800),455=>array(92,-200,917,729),456=>array(92,-216,896,760),457=>array(84,-216,602,760),458=>array(92,-200,1117,729),459=>array(92,-216,1096,760),460=>array(84,-216,971,760),461=>array(5,0,769,927),462=>array(43,-14,596,800),463=>array(3,0,371,927),464=>array(2,0,370,800),465=>array(50,-14,800,927),466=>array(43,-14,644,800),467=>array(92,-14,720,927),468=>array(78,-14,628,800),469=>array(92,-14,720,1040),470=>array(78,-14,628,914),471=>array(92,-14,720,1114),472=>array(78,-14,628,917),473=>array(92,-14,720,1114),474=>array(78,-14,628,917),475=>array(92,-14,720,1114),476=>array(78,-14,628,917),477=>array(43,-14,630,560),478=>array(5,0,769,1040),479=>array(43,-14,596,914),480=>array(5,0,769,1042),481=>array(43,-14,596,914),482=>array(0,0,1012,914),483=>array(43,-14,1000,758),484=>array(50,-14,792,742),485=>array(45,-216,674,559),486=>array(50,-14,747,927),487=>array(45,-216,632,800),488=>array(92,0,805,927),489=>array(-5,0,684,927),490=>array(50,-196,800,742),491=>array(43,-196,644,560),492=>array(50,-196,800,914),493=>array(43,-196,644,763),494=>array(72,-33,728,927),495=>array(43,-215,593,793),496=>array(-33,-216,359,800),497=>array(92,0,1510,729),498=>array(92,0,1364,729),499=>array(45,-14,1250,760),500=>array(50,-14,747,928),501=>array(45,-216,632,800),502=>array(92,-14,1186,729),503=>array(92,-208,737,742),504=>array(92,0,745,927),505=>array(84,0,634,800),506=>array(5,0,769,931),507=>array(43,-14,708,931),508=>array(0,0,1012,927),509=>array(43,-14,1000,800),510=>array(22,-36,823,927),511=>array(38,-46,645,800),512=>array(5,0,769,928),513=>array(43,-14,596,800),514=>array(5,0,769,923),515=>array(43,-14,596,784),516=>array(92,0,610,928),517=>array(43,-14,630,800),518=>array(92,0,610,923),519=>array(43,-14,630,784),520=>array(-41,0,377,928),521=>array(-3,0,381,800),522=>array(23,0,351,923),523=>array(7,0,335,784),524=>array(50,-14,800,928),525=>array(43,-14,644,800),526=>array(50,-14,800,923),527=>array(43,-14,644,784),528=>array(92,0,750,928),529=>array(58,0,490,800),530=>array(92,0,750,923),531=>array(84,0,490,784),532=>array(92,-14,720,928),533=>array(78,-14,628,800),534=>array(92,-14,720,923),535=>array(78,-14,628,784),536=>array(72,-239,647,742),537=>array(52,-239,548,560),538=>array(5,-239,677,729),539=>array(13,-239,455,702),540=>array(67,-210,616,742),541=>array(49,-211,544,560),542=>array(92,0,745,927),543=>array(-12,0,634,927),544=>array(84,-208,730,742),545=>array(45,-75,822,760),546=>array(61,-14,748,742),547=>array(43,-14,616,646),548=>array(45,-216,680,729),549=>array(45,-216,534,547),550=>array(5,0,769,927),551=>array(43,-14,596,760),552=>array(92,-192,610,729),553=>array(43,-196,630,560),554=>array(50,-14,800,1040),555=>array(43,-14,644,914),556=>array(50,-14,800,1040),557=>array(43,-14,644,898),558=>array(50,-14,800,927),559=>array(43,-14,644,760),560=>array(50,-14,800,1042),561=>array(43,-14,644,914),562=>array(-10,0,734,914),563=>array(12,-216,634,763),564=>array(84,-75,449,760),565=>array(84,-75,824,560),566=>array(13,-76,469,702),567=>array(-33,-216,259,547),568=>array(45,-14,1043,760),569=>array(45,-208,1043,560),570=>array(-14,-36,788,765),571=>array(-34,-36,768,765),572=>array(-7,-46,600,594),573=>array(-1,0,610,729),574=>array(-60,-36,742,765),575=>array(52,-240,595,560),576=>array(45,-240,595,547),577=>array(40,0,741,729),578=>array(42,0,573,560),579=>array(6,0,692,729),580=>array(23,-14,789,729),581=>array(5,0,769,729),582=>array(92,-93,610,822),583=>array(43,-93,630,640),584=>array(-56,-200,360,729),585=>array(-33,-216,360,760),586=>array(48,-200,927,741),587=>array(45,-216,800,560),588=>array(6,0,750,729),589=>array(-21,0,490,560),590=>array(-10,0,734,729),591=>array(-4,-216,656,547),592=>array(78,-14,631,560),593=>array(45,-14,632,560),594=>array(84,-14,671,560),595=>array(84,-14,671,760),596=>array(43,-14,526,560),597=>array(43,-69,526,560),598=>array(45,-216,750,760),599=>array(45,-14,801,760),600=>array(43,-14,630,560),601=>array(43,-14,630,560),602=>array(59,-14,885,560),603=>array(54,-14,493,560),604=>array(54,-14,493,560),605=>array(54,-14,769,560),606=>array(54,-14,665,560),607=>array(-33,-216,360,547),608=>array(45,-216,801,760),609=>array(45,-216,632,547),610=>array(43,-14,545,546),611=>array(25,-211,619,547),612=>array(25,-21,619,547),613=>array(78,-214,628,547),614=>array(84,0,634,760),615=>array(84,-216,634,760),616=>array(84,0,461,760),617=>array(83,0,356,547),618=>array(84,0,461,547),619=>array(84,0,475,760),620=>array(84,0,609,760),621=>array(85,-216,429,760),622=>array(84,-215,793,760),623=>array(79,-14,959,546),624=>array(79,-209,959,546),625=>array(83,-216,964,560),626=>array(-33,-216,634,560),627=>array(84,-216,802,560),628=>array(84,0,623,547),629=>array(43,-14,644,560),630=>array(43,-1,826,547),631=>array(51,0,630,574),632=>array(60,-208,729,760),633=>array(84,-13,490,547),634=>array(84,-13,490,760),635=>array(84,-216,659,547),636=>array(84,-208,490,560),637=>array(83,-216,490,560),638=>array(84,0,530,547),639=>array(84,0,530,547),640=>array(52,0,590,547),641=>array(52,0,590,547),642=>array(52,-216,548,560),643=>array(-33,-216,431,760),644=>array(-11,-216,444,760),645=>array(84,-216,539,560),646=>array(-31,-217,561,760),647=>array(13,-155,455,547),648=>array(13,-216,455,702),649=>array(84,-14,836,547),650=>array(79,-14,693,547),651=>array(83,0,625,547),652=>array(15,0,637,547),653=>array(35,0,889,547),654=>array(12,0,634,763),655=>array(64,0,660,547),656=>array(45,-216,703,547),657=>array(45,-69,617,547),658=>array(43,-215,593,547),659=>array(57,-215,593,547),660=>array(36,0,525,759),661=>array(36,0,525,759),662=>array(36,0,525,759),663=>array(36,-208,525,759),664=>array(50,-14,800,742),665=>array(84,0,589,547),666=>array(54,-14,665,560),667=>array(43,0,693,760),668=>array(84,0,607,547),669=>array(-170,-216,341,760),670=>array(84,-213,684,547),671=>array(84,0,499,547),672=>array(45,-208,801,760),673=>array(36,0,525,759),674=>array(36,0,525,759),675=>array(45,-14,1108,760),676=>array(45,-215,1167,760),677=>array(45,-55,1107,760),678=>array(13,0,928,702),679=>array(13,-216,777,760),680=>array(13,-69,881,702),681=>array(19,-216,979,760),682=>array(84,0,815,760),683=>array(84,0,732,760),684=>array(22,0,569,641),685=>array(22,86,345,641),686=>array(-89,-214,629,760),687=>array(-89,-216,797,760),688=>array(54,326,406,751),689=>array(54,326,406,751),690=>array(-21,205,166,751),691=>array(54,326,314,640),692=>array(54,319,314,632),693=>array(54,205,421,632),694=>array(14,326,358,632),695=>array(22,326,569,632),696=>array(8,205,406,632),697=>array(78,557,218,800),698=>array(78,557,437,800),699=>array(103,418,318,729),700=>array(63,418,278,729),701=>array(124,616,296,856),702=>array(116,481,255,760),703=>array(116,481,255,760),704=>array(23,326,336,751),705=>array(23,326,336,751),706=>array(130,517,370,843),707=>array(130,517,370,843),708=>array(87,561,413,800),709=>array(87,561,413,800),710=>array(66,616,434,800),711=>array(66,616,434,800),712=>array(107,488,199,759),713=>array(96,668,404,760),714=>array(178,616,454,800),715=>array(46,616,322,800),716=>array(107,-81,199,190),717=>array(96,-184,404,-92),718=>array(46,-236,322,-52),719=>array(178,-236,454,-52),720=>array(45,0,246,547),721=>array(45,361,246,547),722=>array(116,269,255,547),723=>array(116,269,255,547),724=>array(138,238,357,458),725=>array(141,238,360,458),726=>array(54,119,362,427),727=>array(54,229,274,317),728=>array(86,639,414,784),729=>array(183,654,317,774),730=>array(111,610,389,888),731=>array(167,-196,376,0),732=>array(80,638,420,778),733=>array(94,616,479,800),734=>array(0,213,360,524),735=>array(111,616,387,800),736=>array(16,208,390,633),737=>array(54,326,166,751),738=>array(33,318,351,640),739=>array(10,326,403,632),740=>array(23,326,336,751),741=>array(96,0,404,693),742=>array(96,0,404,693),743=>array(96,0,404,693),744=>array(96,0,404,693),745=>array(96,0,404,693),748=>array(88,-260,414,-21),749=>array(96,605,404,822),750=>array(92,418,554,729),755=>array(111,-240,389,38),759=>array(80,-196,420,-84),768=>array(-455,616,-179,800),769=>array(-326,616,-50,800),770=>array(-435,616,-67,800),771=>array(-424,638,-84,778),772=>array(-405,668,-97,760),773=>array(-500,663,0,755),774=>array(-409,639,-81,784),775=>array(-338,617,-164,760),776=>array(-402,654,-94,774),777=>array(-370,616,-122,843),778=>array(-390,610,-112,888),779=>array(-404,616,-19,800),780=>array(-435,616,-67,800),781=>array(-297,615,-205,832),782=>array(-390,615,-113,832),783=>array(-484,616,-100,800),784=>array(-409,639,-81,882),785=>array(-409,639,-81,784),786=>array(-271,418,-69,563),787=>array(-266,595,-132,844),788=>array(-266,595,-132,844),789=>array(-89,616,89,800),790=>array(-455,-276,-179,-93),791=>array(-326,-276,-50,-93),792=>array(-380,-240,-211,-6),793=>array(-295,-240,-126,-6),794=>array(-224,658,47,929),795=>array(-175,400,21,609),796=>array(-331,-240,-216,-11),797=>array(-386,-240,-115,-59),798=>array(-389,-240,-118,-59),799=>array(-370,-240,-136,-6),800=>array(-389,-202,-118,-110),801=>array(-423,-216,-79,117),802=>array(-419,-216,-75,117),803=>array(-338,-212,-164,-70),804=>array(-402,-212,-94,-92),805=>array(-365,-240,-135,-11),806=>array(-327,-239,-125,-93),807=>array(-372,-196,-151,0),808=>array(-333,-196,-124,0),809=>array(-297,-240,-205,-47),810=>array(-405,-237,-97,-54),811=>array(-450,-239,-51,-94),812=>array(-435,-240,-67,-57),813=>array(-435,-240,-67,-57),814=>array(-409,-239,-81,-94),815=>array(-409,-240,-81,-95),816=>array(-424,-234,-84,-94),817=>array(-405,-184,-97,-92),818=>array(-500,-236,0,-143),819=>array(-500,-236,0,-9),820=>array(-625,212,1,415),821=>array(-471,214,-94,309),822=>array(-837,214,-86,309),823=>array(-655,-46,-48,594),824=>array(-825,-36,-24,765),825=>array(-285,-240,-170,-11),826=>array(-405,-238,-97,-55),827=>array(-332,-241,-98,-6),828=>array(-450,-239,-51,-94),829=>array(-379,585,-123,842),830=>array(-267,595,-127,867),831=>array(-500,528,0,755),832=>array(-455,616,-179,800),833=>array(-323,616,-47,800),834=>array(-421,638,-81,778),835=>array(-266,595,-132,844),836=>array(-404,654,-55,978),837=>array(-286,-208,-179,-45),838=>array(-403,639,-97,786),839=>array(-360,-226,-140,-35),840=>array(-379,-240,-121,-47),841=>array(-367,-240,-133,-21),842=>array(-420,616,-80,800),843=>array(-420,567,-80,850),844=>array(-420,573,-80,835),845=>array(-459,-230,-41,-30),846=>array(-357,-240,-143,-45),849=>array(-320,610,-179,888),850=>array(-409,640,-81,882),851=>array(-367,-240,-135,-9),855=>array(-320,610,-179,888),856=>array(-120,654,14,774),858=>array(-445,-240,-58,-11),860=>array(-433,-237,458,-79),861=>array(-433,802,458,960),862=>array(-445,797,445,889),863=>array(-445,-185,445,-93),864=>array(-362,756,362,894),865=>array(-445,769,445,927),866=>array(-449,-230,454,-30),880=>array(92,0,606,729),881=>array(84,0,481,547),882=>array(92,0,930,729),883=>array(92,0,744,729),884=>array(78,557,218,800),885=>array(78,-208,218,35),886=>array(92,0,745,729),887=>array(84,0,617,547),890=>array(202,-208,333,-45),891=>array(43,-14,526,560),892=>array(43,-14,526,560),893=>array(43,-14,526,560),894=>array(63,-142,288,547),900=>array(169,616,445,800),901=>array(96,654,445,978),902=>array(26,0,792,800),903=>array(102,253,278,442),904=>array(-24,0,771,800),905=>array(-18,0,915,800),906=>array(-21,0,450,800),908=>array(-19,-14,836,800),910=>array(-27,0,992,800),911=>array(-30,0,867,800),912=>array(23,-19,372,978),913=>array(5,0,769,729),914=>array(92,0,692,729),915=>array(92,0,610,729),916=>array(5,0,769,729),917=>array(92,0,610,729),918=>array(45,0,680,729),919=>array(92,0,745,729),920=>array(50,-14,800,742),921=>array(92,0,280,729),922=>array(92,0,805,729),923=>array(5,0,769,729),924=>array(92,0,903,729),925=>array(92,0,745,729),926=>array(98,0,548,729),927=>array(50,-14,800,742),928=>array(92,0,745,729),929=>array(92,0,692,729),931=>array(92,0,610,729),932=>array(5,0,677,729),933=>array(-10,0,734,729),934=>array(50,0,800,729),935=>array(19,0,751,729),936=>array(56,0,795,729),937=>array(27,0,823,742),938=>array(34,0,342,927),939=>array(-10,0,734,927),940=>array(48,-13,645,800),941=>array(54,-14,493,800),942=>array(84,-208,634,800),943=>array(77,-19,353,800),944=>array(78,-10,629,978),945=>array(48,-13,645,559),946=>array(84,-208,671,773),947=>array(15,-208,667,547),948=>array(43,-14,645,768),949=>array(54,-14,493,560),950=>array(43,-208,542,760),951=>array(84,-208,634,560),952=>array(43,-11,645,768),953=>array(78,-19,348,547),954=>array(84,0,655,547),955=>array(30,0,603,760),956=>array(85,-209,704,547),957=>array(15,0,635,547),958=>array(43,-208,542,760),959=>array(43,-14,644,560),960=>array(42,-19,732,547),961=>array(84,-208,671,562),962=>array(43,-208,526,560),963=>array(43,-14,727,547),964=>array(21,-19,612,547),965=>array(78,-10,629,547),966=>array(64,-208,725,552),967=>array(25,-208,620,547),968=>array(65,-208,724,547),969=>array(43,-13,826,547),970=>array(19,-19,355,774),971=>array(78,-10,629,774),972=>array(43,-14,644,800),973=>array(78,-10,629,800),974=>array(43,-13,826,800),975=>array(92,-208,805,729),976=>array(55,-11,575,768),977=>array(51,-11,612,768),978=>array(21,0,717,729),979=>array(-24,0,954,800),980=>array(21,0,717,927),981=>array(60,-208,729,760),982=>array(22,-13,843,547),983=>array(54,-205,688,548),984=>array(50,-208,800,742),985=>array(43,-208,644,560),986=>array(50,-208,678,729),987=>array(43,-208,541,547),988=>array(92,0,599,729),989=>array(-56,-208,437,760),990=>array(61,2,646,729),991=>array(82,0,571,759),992=>array(56,-208,843,742),993=>array(22,-180,537,559),994=>array(50,-213,1043,729),995=>array(59,-208,775,547),996=>array(50,-208,740,742),997=>array(45,-208,632,560),998=>array(92,-213,878,729),999=>array(21,-14,689,575),1000=>array(42,-208,692,745),1001=>array(46,-208,608,560),1002=>array(53,0,736,742),1003=>array(49,0,622,560),1004=>array(50,-14,715,758),1005=>array(83,-14,670,758),1006=>array(28,-208,654,729),1007=>array(27,-208,563,729),1008=>array(54,-7,688,548),1009=>array(84,-216,671,562),1010=>array(43,-14,526,560),1011=>array(-33,-216,259,760),1012=>array(50,-14,800,742),1013=>array(67,-14,550,560),1014=>array(81,-14,563,560),1015=>array(92,0,692,729),1016=>array(84,-208,671,760),1017=>array(50,-14,670,742),1018=>array(92,0,903,729),1019=>array(73,-208,649,547),1020=>array(33,-208,671,562),1021=>array(33,-14,653,742),1022=>array(50,-14,670,742),1023=>array(33,-14,653,742),1024=>array(92,0,610,927),1025=>array(92,0,610,927),1026=>array(5,-200,798,729),1027=>array(92,0,610,928),1028=>array(50,-14,670,742),1029=>array(72,-14,647,742),1030=>array(92,0,280,729),1031=>array(32,0,339,927),1032=>array(-56,-200,280,729),1033=>array(46,0,1102,729),1034=>array(92,0,1060,729),1035=>array(5,0,798,729),1036=>array(92,0,803,928),1037=>array(92,0,745,927),1038=>array(29,0,741,927),1039=>array(92,-157,745,729),1040=>array(5,0,769,729),1041=>array(92,0,692,729),1042=>array(92,0,692,729),1043=>array(92,0,610,729),1044=>array(60,-157,831,729),1045=>array(92,0,610,729),1046=>array(15,0,1209,729),1047=>array(66,-14,645,742),1048=>array(92,0,745,729),1049=>array(92,0,745,927),1050=>array(92,0,803,729),1051=>array(46,0,739,729),1052=>array(92,0,903,729),1053=>array(92,0,745,729),1054=>array(50,-14,800,742),1055=>array(92,0,745,729),1056=>array(92,0,692,729),1057=>array(50,-14,670,742),1058=>array(5,0,677,729),1059=>array(29,0,741,729),1060=>array(50,0,941,729),1061=>array(19,0,751,729),1062=>array(92,-157,868,729),1063=>array(81,0,716,729),1064=>array(92,0,1143,729),1065=>array(92,-157,1266,729),1066=>array(49,0,890,729),1067=>array(92,0,944,729),1068=>array(92,0,692,729),1069=>array(64,-14,684,742),1070=>array(92,-14,1119,742),1071=>array(64,0,678,729),1072=>array(43,-14,596,560),1073=>array(43,-14,655,792),1074=>array(84,0,589,547),1075=>array(84,0,499,547),1076=>array(56,-138,751,547),1077=>array(43,-14,630,560),1078=>array(15,0,980,547),1079=>array(49,-14,518,560),1080=>array(84,0,617,547),1081=>array(84,0,617,765),1082=>array(84,0,664,547),1083=>array(55,0,648,547),1084=>array(84,0,733,547),1085=>array(84,0,607,547),1086=>array(43,-14,644,560),1087=>array(84,0,607,547),1088=>array(84,-208,671,560),1089=>array(43,-14,526,560),1090=>array(4,0,575,547),1091=>array(12,-216,634,547),1092=>array(55,-208,937,760),1093=>array(15,0,630,547),1094=>array(84,-138,698,547),1095=>array(64,0,573,547),1096=>array(84,0,972,547),1097=>array(84,-138,1063,547),1098=>array(20,0,711,547),1099=>array(84,0,823,547),1100=>array(84,0,588,547),1101=>array(67,-14,550,560),1102=>array(84,-14,928,560),1103=>array(31,0,560,547),1104=>array(43,-14,630,803),1105=>array(43,-14,630,774),1106=>array(20,-216,669,760),1107=>array(84,0,520,803),1108=>array(43,-14,526,560),1109=>array(52,-14,548,560),1110=>array(84,0,259,760),1111=>array(17,0,325,774),1112=>array(-33,-216,259,760),1113=>array(44,0,942,547),1114=>array(84,0,912,547),1115=>array(20,0,656,760),1116=>array(84,0,664,803),1117=>array(84,0,617,803),1118=>array(12,-216,634,765),1119=>array(84,-138,607,547),1120=>array(50,-14,1043,729),1121=>array(43,-13,826,547),1122=>array(49,0,791,729),1123=>array(20,0,692,731),1124=>array(92,-14,948,742),1125=>array(84,-14,760,560),1126=>array(8,0,984,729),1127=>array(25,0,807,547),1128=>array(92,0,1351,729),1129=>array(84,0,1097,547),1130=>array(50,0,800,729),1131=>array(43,0,644,547),1132=>array(92,0,1137,729),1133=>array(84,0,964,547),1134=>array(54,-208,616,938),1135=>array(40,-193,493,756),1136=>array(9,0,1060,729),1137=>array(9,-208,1046,759),1138=>array(50,-14,800,742),1139=>array(43,-14,644,560),1140=>array(5,0,826,742),1141=>array(9,0,681,560),1142=>array(5,0,826,928),1143=>array(9,0,681,800),1144=>array(47,-216,1130,742),1145=>array(43,-216,1025,560),1146=>array(50,-14,1024,742),1147=>array(43,-14,820,560),1148=>array(57,-14,1348,928),1149=>array(47,-13,1126,828),1150=>array(50,-14,1043,910),1151=>array(43,-13,826,746),1152=>array(50,-208,670,742),1153=>array(43,-208,526,560),1154=>array(27,-33,521,488),1155=>array(-601,606,-85,822),1156=>array(-413,638,0,784),1157=>array(-365,595,-231,785),1158=>array(-365,595,-231,785),1159=>array(-796,592,4,788),1160=>array(-1069,-179,383,928),1161=>array(-996,-280,306,1022),1162=>array(92,-208,933,927),1163=>array(84,-208,782,765),1164=>array(23,0,692,729),1165=>array(0,0,567,702),1166=>array(92,0,702,729),1167=>array(84,-208,671,560),1168=>array(92,0,610,878),1169=>array(84,0,499,700),1170=>array(28,0,638,729),1171=>array(21,0,519,547),1172=>array(92,-200,728,729),1173=>array(84,-216,591,547),1174=>array(15,-157,1209,729),1175=>array(15,-138,980,547),1176=>array(66,-196,645,742),1177=>array(49,-196,518,560),1178=>array(92,-157,803,729),1179=>array(84,-138,664,547),1180=>array(92,0,803,729),1181=>array(84,0,664,547),1182=>array(23,0,803,729),1183=>array(7,0,664,760),1184=>array(24,0,1000,729),1185=>array(20,0,812,547),1186=>array(92,-157,932,729),1187=>array(84,-138,783,547),1188=>array(92,0,1075,729),1189=>array(84,0,847,547),1190=>array(92,-200,1193,729),1191=>array(84,-216,939,547),1192=>array(56,-14,924,743),1193=>array(55,-14,836,560),1194=>array(50,-196,670,742),1195=>array(43,-196,526,560),1196=>array(5,-157,677,729),1197=>array(4,-138,575,547),1198=>array(-10,0,734,729),1199=>array(12,-216,634,547),1200=>array(-10,0,734,729),1201=>array(12,-216,634,547),1202=>array(19,-157,751,729),1203=>array(15,-138,630,547),1204=>array(5,-157,1088,729),1205=>array(4,-138,976,547),1206=>array(81,-157,904,729),1207=>array(64,-138,749,547),1208=>array(81,0,716,729),1209=>array(64,0,573,547),1210=>array(81,0,716,729),1211=>array(84,0,634,760),1212=>array(7,-14,976,742),1213=>array(5,-14,761,560),1214=>array(7,-184,976,742),1215=>array(5,-161,761,560),1216=>array(92,0,280,729),1217=>array(15,0,1209,927),1218=>array(15,0,980,784),1219=>array(92,-200,769,729),1220=>array(84,-216,626,547),1221=>array(26,-208,926,729),1222=>array(21,-208,781,547),1223=>array(92,-200,745,729),1224=>array(84,-216,608,547),1225=>array(92,-208,933,729),1226=>array(84,-208,782,547),1227=>array(81,-157,716,729),1228=>array(64,-138,573,547),1229=>array(92,-208,1090,729),1230=>array(84,-208,908,547),1231=>array(84,0,259,760),1232=>array(5,0,769,935),1233=>array(43,-14,596,780),1234=>array(5,0,769,927),1235=>array(43,-14,596,774),1236=>array(0,0,1012,729),1237=>array(43,-14,1000,560),1238=>array(92,0,610,927),1239=>array(43,-14,630,784),1240=>array(51,-14,800,742),1241=>array(43,-14,630,560),1242=>array(51,-14,800,927),1243=>array(43,-14,630,774),1244=>array(15,0,1209,927),1245=>array(15,0,980,774),1246=>array(66,-14,645,927),1247=>array(49,-14,518,773),1248=>array(72,-33,728,729),1249=>array(43,-215,593,547),1250=>array(92,0,745,914),1251=>array(84,0,617,763),1252=>array(92,0,745,927),1253=>array(84,0,617,774),1254=>array(50,-14,800,927),1255=>array(43,-14,644,774),1256=>array(50,-14,800,742),1257=>array(43,-14,644,560),1258=>array(50,-14,800,927),1259=>array(43,-14,644,774),1260=>array(64,-14,684,927),1261=>array(67,-14,550,774),1262=>array(29,0,741,914),1263=>array(12,-216,634,763),1264=>array(29,0,741,927),1265=>array(12,-216,634,774),1266=>array(29,0,741,927),1267=>array(12,-216,634,800),1268=>array(81,0,716,927),1269=>array(64,0,573,774),1270=>array(92,-157,610,729),1271=>array(84,-138,499,547),1272=>array(92,0,944,927),1273=>array(84,0,823,774),1274=>array(28,-216,638,729),1275=>array(21,-217,519,547),1276=>array(19,-200,750,729),1277=>array(15,-216,620,547),1278=>array(19,0,751,729),1279=>array(15,0,630,547),1280=>array(70,0,670,729),1281=>array(44,0,524,547),1282=>array(70,-14,1081,729),1283=>array(44,-14,850,547),1284=>array(98,-14,1027,742),1285=>array(79,-14,836,560),1286=>array(98,-208,804,742),1287=>array(79,-208,668,560),1288=>array(26,-14,1150,729),1289=>array(21,-14,933,547),1290=>array(92,-14,1186,729),1291=>array(84,-14,939,547),1292=>array(50,-14,748,742),1293=>array(43,-14,544,546),1294=>array(5,-14,846,729),1295=>array(4,-14,709,547),1296=>array(67,-14,616,742),1297=>array(54,-14,493,560),1298=>array(46,-200,739,729),1299=>array(55,-216,648,547),1300=>array(46,0,1266,729),1301=>array(55,0,1053,547),1302=>array(92,0,1045,729),1303=>array(84,-208,964,560),1304=>array(64,0,1008,729),1305=>array(31,-14,965,560),1306=>array(50,-146,800,742),1307=>array(45,-208,632,559),1308=>array(30,0,1072,729),1309=>array(35,0,889,547),1310=>array(92,0,803,729),1311=>array(84,0,664,547),1312=>array(46,-200,1187,729),1313=>array(55,-216,980,547),1314=>array(92,-200,1193,729),1315=>array(84,-216,939,547),1316=>array(92,-157,933,729),1317=>array(84,-138,782,547),1329=>array(83,-38,731,729),1330=>array(83,0,655,743),1331=>array(26,0,728,743),1332=>array(22,0,731,743),1333=>array(83,-14,655,729),1334=>array(66,0,664,743),1335=>array(83,0,625,729),1336=>array(83,0,655,743),1337=>array(83,-13,903,742),1338=>array(26,-14,728,729),1339=>array(83,0,648,729),1340=>array(83,0,549,729),1341=>array(83,-14,888,729),1342=>array(62,-12,722,741),1343=>array(74,0,639,729),1344=>array(4,-46,598,729),1345=>array(66,-48,664,743),1346=>array(18,0,715,743),1347=>array(22,0,660,735),1348=>array(83,-14,780,729),1349=>array(57,-14,645,743),1350=>array(0,-14,697,729),1351=>array(57,-14,655,729),1352=>array(83,0,648,743),1353=>array(40,-48,638,743),1354=>array(18,0,789,743),1355=>array(57,0,654,743),1356=>array(83,0,780,743),1357=>array(92,-14,720,729),1358=>array(18,0,715,729),1359=>array(53,-14,641,743),1360=>array(83,0,648,743),1361=>array(57,-14,645,743),1362=>array(83,0,567,729),1363=>array(22,0,811,729),1364=>array(9,0,645,743),1365=>array(49,-14,799,742),1366=>array(44,-14,833,729),1369=>array(104,481,230,760),1370=>array(57,418,250,729),1371=>array(0,616,310,800),1372=>array(0,595,375,893),1373=>array(-7,614,290,847),1374=>array(0,586,460,878),1375=>array(40,618,434,893),1377=>array(71,-13,863,547),1378=>array(76,-208,571,560),1379=>array(40,-208,700,559),1380=>array(76,-208,703,560),1381=>array(71,-14,567,760),1382=>array(40,-208,700,559),1383=>array(76,0,532,760),1384=>array(76,-208,579,560),1385=>array(76,-208,756,560),1386=>array(40,-14,700,760),1387=>array(76,-208,571,760),1388=>array(76,-208,410,547),1389=>array(76,-208,909,760),1390=>array(40,-14,600,760),1391=>array(71,-208,567,760),1392=>array(76,0,571,760),1393=>array(26,-13,536,760),1394=>array(76,-208,703,560),1395=>array(62,-13,570,768),1396=>array(71,-13,699,760),1397=>array(-30,-216,233,547),1398=>array(-61,-13,567,760),1399=>array(13,-208,456,560),1400=>array(76,0,571,560),1401=>array(5,-208,375,547),1402=>array(71,-208,863,546),1403=>array(44,-208,533,560),1404=>array(76,0,622,560),1405=>array(71,-13,567,547),1406=>array(71,-208,699,760),1407=>array(71,-13,863,560),1408=>array(76,-208,571,560),1409=>array(44,-216,631,559),1410=>array(76,0,475,547),1411=>array(71,-208,863,760),1412=>array(-56,-208,604,560),1413=>array(44,-14,645,560),1414=>array(31,-190,774,760),1415=>array(71,-14,808,760),1417=>array(101,0,259,547),1418=>array(49,180,325,359),1456=>array(296,-229,394,-10),1457=>array(147,-229,501,-10),1458=>array(138,-229,492,-10),1459=>array(125,-229,492,-10),1460=>array(296,-171,394,-73),1461=>array(223,-171,467,-73),1462=>array(235,-229,455,-10),1463=>array(174,-171,516,0),1464=>array(187,-217,504,0),1465=>array(-24,547,73,723),1466=>array(-24,547,73,723),1467=>array(187,-239,528,-5),1468=>array(301,225,399,322),1469=>array(296,-217,394,-22),1470=>array(54,413,361,555),1471=>array(187,547,504,710),1472=>array(98,-98,273,645),1473=>array(753,613,851,710),1474=>array(137,613,235,710),1475=>array(98,0,273,547),1478=>array(78,0,462,547),1479=>array(187,-229,504,-10),1488=>array(84,0,644,547),1489=>array(43,0,567,547),1490=>array(43,-9,418,547),1491=>array(43,0,545,547),1492=>array(91,0,596,547),1493=>array(91,0,252,547),1494=>array(43,0,357,547),1495=>array(91,0,596,547),1496=>array(90,-13,624,553),1497=>array(66,164,228,547),1498=>array(43,-240,487,547),1499=>array(43,0,511,547),1500=>array(43,0,527,711),1501=>array(91,0,605,547),1502=>array(43,0,633,554),1503=>array(91,-240,252,547),1504=>array(43,0,362,547),1505=>array(90,-13,624,547),1506=>array(43,-101,575,547),1507=>array(91,-240,584,547),1508=>array(91,0,603,547),1509=>array(11,-240,543,548),1510=>array(33,0,564,547),1511=>array(91,-240,660,546),1512=>array(43,0,511,547),1513=>array(20,0,750,547),1514=>array(10,-4,592,547),1520=>array(91,0,574,547),1521=>array(66,0,524,547),1522=>array(66,164,500,547),1523=>array(84,361,360,547),1524=>array(84,361,626,547),1542=>array(-2,-20,630,892),1543=>array(-2,-20,630,897),1545=>array(65,0,811,635),1546=>array(65,0,1084,635),1548=>array(98,0,322,331),1557=>array(121,612,379,868),1563=>array(98,0,323,689),1567=>array(69,0,515,742),1569=>array(73,20,437,493),1570=>array(-20,0,362,955),1571=>array(75,0,259,993),1572=>array(-42,-244,547,603),1573=>array(76,-245,259,760),1574=>array(63,-107,863,603),1575=>array(84,0,259,760),1576=>array(63,-149,921,327),1577=>array(48,-30,540,513),1578=>array(63,-5,921,415),1579=>array(63,-5,921,537),1580=>array(77,-244,720,425),1581=>array(77,-244,720,425),1582=>array(77,-244,720,579),1583=>array(61,-15,442,415),1584=>array(61,-15,442,579),1585=>array(-42,-244,508,269),1586=>array(-42,-244,508,457),1587=>array(63,-244,1297,366),1588=>array(63,-244,1297,586),1589=>array(63,-244,1265,362),1590=>array(63,-244,1265,457),1591=>array(70,0,971,760),1592=>array(70,0,971,760),1593=>array(87,-244,720,521),1594=>array(87,-244,720,652),1600=>array(-10,0,352,125),1601=>array(63,-24,1082,627),1602=>array(52,-215,825,635),1603=>array(70,-27,814,760),1604=>array(70,-142,778,760),1605=>array(68,-244,660,369),1606=>array(62,-165,779,457),1607=>array(48,-30,540,358),1608=>array(-42,-244,547,322),1609=>array(63,-107,863,462),1610=>array(63,-244,863,462),1611=>array(107,591,393,825),1612=>array(107,591,393,881),1613=>array(107,-239,393,-5),1614=>array(107,591,393,723),1615=>array(107,590,393,881),1616=>array(107,-137,393,-5),1617=>array(88,599,412,869),1618=>array(115,610,383,878),1619=>array(59,584,441,735),1620=>array(154,601,335,822),1621=>array(155,-245,336,-23),1623=>array(107,615,393,906),1626=>array(99,616,401,775),1632=>array(218,195,392,366),1633=>array(140,0,431,635),1634=>array(12,0,598,635),1635=>array(12,0,597,635),1636=>array(74,-10,530,646),1637=>array(63,-10,547,643),1638=>array(37,0,574,635),1639=>array(15,0,596,635),1640=>array(15,0,596,635),1641=>array(32,0,590,640),1642=>array(65,0,545,635),1643=>array(0,-118,349,318),1644=>array(63,418,278,729),1645=>array(42,101,502,537),1646=>array(63,-5,921,327),1647=>array(52,-215,825,484),1648=>array(216,600,284,885),1652=>array(51,641,232,863),1657=>array(63,-5,921,599),1658=>array(63,-5,921,566),1659=>array(63,-244,921,327),1660=>array(63,-171,921,415),1661=>array(63,-5,921,566),1662=>array(63,-244,921,327),1663=>array(63,-5,921,566),1664=>array(63,-244,921,327),1665=>array(77,-244,720,725),1666=>array(77,-244,720,737),1667=>array(77,-244,720,425),1668=>array(77,-244,720,425),1669=>array(77,-244,720,737),1670=>array(77,-244,720,425),1671=>array(77,-244,720,425),1672=>array(61,-15,442,746),1673=>array(61,-180,442,415),1674=>array(61,-171,442,415),1675=>array(61,-171,442,746),1676=>array(61,-15,442,586),1677=>array(61,-146,442,415),1678=>array(61,-15,442,708),1679=>array(61,-15,442,684),1680=>array(61,-15,442,708),1681=>array(-42,-244,520,648),1682=>array(-42,-244,542,556),1683=>array(-42,-244,587,269),1684=>array(-42,-244,522,269),1685=>array(-42,-244,753,269),1686=>array(-42,-244,522,269),1687=>array(-42,-244,508,464),1688=>array(-42,-244,508,586),1689=>array(-42,-244,508,586),1690=>array(63,-244,1297,464),1691=>array(63,-244,1297,366),1692=>array(63,-244,1297,586),1693=>array(63,-244,1265,362),1694=>array(63,-244,1265,586),1695=>array(70,0,971,760),1696=>array(87,-244,720,781),1697=>array(63,-24,1082,484),1698=>array(63,-171,1082,484),1699=>array(63,-171,1082,635),1700=>array(63,-24,1082,786),1701=>array(63,-293,1082,484),1702=>array(63,-24,1082,786),1703=>array(52,-215,825,635),1704=>array(52,-215,825,757),1705=>array(63,-39,1024,760),1706=>array(63,-39,1194,760),1707=>array(63,-39,1024,760),1708=>array(70,-27,814,760),1709=>array(70,-27,814,854),1710=>array(70,-293,814,760),1711=>array(63,-39,1024,910),1712=>array(63,-39,1024,910),1713=>array(63,-39,1024,910),1714=>array(63,-171,1024,910),1715=>array(63,-293,1024,910),1716=>array(63,-39,1024,1025),1717=>array(70,-142,841,971),1718=>array(70,-142,778,952),1719=>array(70,-142,781,1025),1720=>array(70,-391,778,760),1721=>array(62,-317,779,464),1722=>array(62,-165,779,366),1723=>array(62,-165,779,636),1724=>array(62,-330,779,464),1725=>array(62,-165,779,586),1726=>array(70,-33,877,506),1727=>array(77,-244,720,579),1734=>array(-42,-244,547,556),1740=>array(63,-107,863,462),1742=>array(63,-107,863,556),1749=>array(48,-30,540,358),1776=>array(218,195,392,366),1777=>array(140,0,431,635),1778=>array(12,0,598,635),1779=>array(12,0,597,635),1780=>array(12,0,573,650),1781=>array(30,-8,580,643),1782=>array(85,0,514,645),1783=>array(15,0,596,635),1784=>array(15,0,596,635),1785=>array(32,0,590,640),1984=>array(48,-14,648,742),1985=>array(69,0,583,729),1986=>array(80,0,616,729),1987=>array(80,0,616,729),1988=>array(80,0,616,729),1989=>array(80,0,616,729),1990=>array(80,0,616,729),1991=>array(98,0,599,729),1992=>array(98,0,599,729),1993=>array(70,0,625,742),1994=>array(84,0,259,729),1995=>array(43,-14,504,465),1996=>array(15,0,529,729),1997=>array(15,0,637,451),1998=>array(84,0,607,451),1999=>array(84,0,607,451),2000=>array(46,0,548,742),2001=>array(84,0,607,667),2002=>array(43,0,820,742),2003=>array(84,0,467,729),2004=>array(84,0,467,729),2005=>array(84,0,584,729),2006=>array(84,0,604,729),2007=>array(15,0,360,729),2008=>array(84,0,938,532),2009=>array(15,0,491,729),2010=>array(15,0,811,729),2011=>array(84,0,607,451),2012=>array(15,0,637,729),2013=>array(84,0,869,729),2014=>array(84,0,543,729),2015=>array(43,0,692,729),2016=>array(15,0,491,729),2017=>array(15,0,637,729),2018=>array(43,0,531,729),2019=>array(84,0,543,729),2020=>array(84,0,543,581),2021=>array(84,0,543,729),2022=>array(43,0,531,729),2023=>array(43,0,531,729),2027=>array(95,668,403,760),2028=>array(63,638,438,777),2029=>array(185,654,319,774),2030=>array(65,616,433,800),2031=>array(33,616,438,803),2032=>array(63,638,438,777),2033=>array(33,616,438,803),2034=>array(183,-212,317,-92),2035=>array(96,654,404,774),2036=>array(63,418,278,729),2037=>array(103,418,318,729),2040=>array(84,0,607,562),2041=>array(84,0,607,564),2042=>array(-10,0,425,125),3647=>array(62,-147,638,760),3713=>array(43,-14,706,560),3714=>array(43,-14,723,560),3716=>array(43,-14,704,560),3719=>array(21,-241,521,561),3720=>array(42,0,705,560),3722=>array(40,-269,768,560),3725=>array(40,-24,713,610),3732=>array(42,-14,647,560),3733=>array(42,-19,647,561),3734=>array(-22,-240,684,560),3735=>array(20,-14,768,560),3737=>array(37,-15,681,560),3738=>array(38,-15,664,561),3739=>array(38,-15,664,760),3740=>array(60,-12,910,626),3741=>array(64,-14,762,760),3742=>array(76,-14,773,560),3743=>array(76,-14,773,760),3745=>array(24,-14,771,547),3746=>array(40,-23,713,760),3747=>array(48,-10,733,615),3749=>array(41,-33,693,560),3751=>array(33,-33,640,561),3754=>array(51,-21,819,724),3755=>array(44,-21,935,620),3757=>array(53,-20,662,606),3758=>array(48,-14,825,698),3759=>array(43,-259,897,648),3760=>array(36,-16,658,567),3761=>array(-653,610,-31,896),3762=>array(39,0,563,593),3763=>array(-479,0,563,875),3764=>array(-654,622,-62,950),3765=>array(-654,633,13,962),3766=>array(-654,622,-62,950),3767=>array(-654,633,13,962),3768=>array(-426,-385,-165,-55),3769=>array(-473,-316,-174,-28),3771=>array(-653,610,-31,896),3772=>array(-682,-311,15,-48),3773=>array(39,-220,691,776),3776=>array(83,-13,444,561),3777=>array(83,-13,818,561),3778=>array(-37,-14,458,936),3779=>array(23,-14,595,879),3780=>array(-15,-35,585,809),3782=>array(70,-240,688,582),3784=>array(-413,659,-297,844),3785=>array(-627,622,-22,918),3786=>array(-667,621,39,965),3787=>array(-521,612,-187,917),3788=>array(-682,603,15,866),3789=>array(-479,668,-229,875),3792=>array(66,-29,723,563),3793=>array(25,-139,721,586),3794=>array(31,-80,603,711),3795=>array(24,-14,882,981),3796=>array(48,-156,696,711),3797=>array(48,-156,696,711),3798=>array(64,-14,894,950),3799=>array(43,-240,706,560),3800=>array(72,-269,774,582),3801=>array(58,-14,858,564),3804=>array(44,-21,1301,620),3805=>array(44,-21,1305,620),4256=>array(47,-14,827,819),4257=>array(39,-0,719,819),4258=>array(37,-138,667,828),4259=>array(41,-15,793,819),4260=>array(29,0,572,828),4261=>array(24,0,729,828),4262=>array(15,-14,709,819),4263=>array(49,-14,890,828),4264=>array(4,0,415,862),4265=>array(39,0,581,819),4266=>array(18,-14,796,820),4267=>array(48,-14,837,819),4268=>array(43,0,586,819),4269=>array(37,-157,817,829),4270=>array(11,-14,731,822),4271=>array(20,0,585,823),4272=>array(43,-15,863,820),4273=>array(43,-15,587,820),4274=>array(43,-0,586,828),4275=>array(37,-170,817,828),4276=>array(37,0,828,825),4277=>array(28,0,695,820),4278=>array(44,0,586,828),4279=>array(34,0,577,820),4280=>array(39,-14,582,820),4281=>array(43,0,586,819),4282=>array(45,-14,778,827),4283=>array(46,-15,822,820),4284=>array(43,-0,586,819),4285=>array(29,-15,594,828),4286=>array(43,-0,586,819),4287=>array(15,0,726,819),4288=>array(18,-14,796,820),4289=>array(43,0,586,820),4290=>array(37,-15,652,828),4291=>array(9,0,552,820),4292=>array(33,0,561,820),4293=>array(24,-14,714,828),4304=>array(49,-14,505,599),4305=>array(49,-14,515,823),4306=>array(44,-232,578,561),4307=>array(49,-225,786,557),4308=>array(49,-232,496,557),4309=>array(49,-232,505,557),4310=>array(25,-14,502,828),4311=>array(49,-14,779,557),4312=>array(49,0,515,557),4313=>array(49,-232,506,542),4314=>array(49,-225,1025,562),4315=>array(49,-14,505,828),4316=>array(63,-14,520,819),4317=>array(49,-0,765,557),4318=>array(49,-14,505,818),4319=>array(49,-232,504,560),4320=>array(49,0,774,830),4321=>array(63,-14,520,818),4322=>array(49,-232,651,670),4323=>array(29,-232,533,604),4324=>array(49,-232,792,558),4325=>array(49,-232,496,818),4326=>array(49,-225,766,557),4327=>array(49,-232,505,549),4328=>array(20,-14,489,828),4329=>array(63,0,520,828),4330=>array(49,-232,573,548),4331=>array(49,-14,504,818),4332=>array(64,-15,534,828),4333=>array(49,-232,517,818),4334=>array(63,-14,520,818),4335=>array(24,-232,516,580),4336=>array(49,-15,505,823),4337=>array(49,-14,505,823),4338=>array(49,-146,504,557),4339=>array(49,-232,505,558),4340=>array(49,-232,504,828),4341=>array(49,-14,558,828),4342=>array(49,-232,803,557),4343=>array(49,-232,556,557),4344=>array(49,-232,505,549),4345=>array(44,-232,578,561),4346=>array(49,-111,505,557),4347=>array(49,0,399,500),4348=>array(24,400,294,828),5121=>array(5,0,769,729),5122=>array(5,0,769,1056),5123=>array(5,0,769,729),5124=>array(5,0,769,928),5125=>array(92,0,821,729),5126=>array(92,0,821,928),5127=>array(92,0,821,927),5129=>array(92,0,821,729),5130=>array(84,0,813,729),5131=>array(84,0,813,928),5132=>array(92,0,1013,729),5133=>array(5,0,925,729),5134=>array(92,0,1013,729),5135=>array(5,0,925,729),5136=>array(92,0,1013,928),5137=>array(5,0,925,928),5138=>array(92,0,1065,729),5139=>array(92,0,1056,729),5140=>array(92,0,1065,928),5141=>array(92,0,1056,928),5142=>array(92,0,821,928),5143=>array(92,0,1057,729),5144=>array(84,0,1058,729),5145=>array(92,0,1057,928),5146=>array(84,0,1058,928),5147=>array(84,0,813,928),5149=>array(92,607,226,728),5150=>array(60,326,473,734),5151=>array(31,338,379,722),5152=>array(31,338,379,722),5153=>array(60,392,338,711),5154=>array(60,352,338,670),5155=>array(60,392,338,670),5156=>array(60,392,338,670),5157=>array(31,327,518,749),5158=>array(60,326,414,734),5159=>array(92,304,226,424),5160=>array(60,494,338,569),5161=>array(60,392,338,670),5162=>array(60,392,338,693),5163=>array(5,0,1167,729),5164=>array(5,0,940,729),5165=>array(92,0,1170,729),5166=>array(84,0,1251,729),5167=>array(5,0,769,729),5168=>array(5,0,769,1056),5169=>array(5,0,769,729),5170=>array(5,0,769,928),5171=>array(73,0,802,729),5172=>array(73,0,802,928),5173=>array(73,0,802,927),5175=>array(73,0,802,729),5176=>array(73,0,802,729),5177=>array(73,0,802,928),5178=>array(92,0,1013,729),5179=>array(5,0,925,729),5180=>array(92,0,1013,729),5181=>array(5,0,925,729),5182=>array(92,0,1013,928),5183=>array(5,0,925,928),5184=>array(92,0,1046,729),5185=>array(73,0,1056,729),5186=>array(92,0,1046,928),5187=>array(73,0,1056,928),5188=>array(92,0,1046,729),5189=>array(73,0,1058,729),5190=>array(92,0,1046,928),5191=>array(73,0,1058,928),5192=>array(73,0,802,927),5193=>array(60,326,520,727),5194=>array(60,326,172,734),5196=>array(92,-14,720,729),5197=>array(92,0,720,1056),5198=>array(92,0,720,743),5199=>array(92,0,720,928),5200=>array(73,0,759,729),5201=>array(73,0,759,928),5202=>array(73,0,759,927),5204=>array(73,0,759,729),5205=>array(56,0,742,729),5206=>array(56,0,742,928),5207=>array(92,-14,964,729),5208=>array(92,-14,964,729),5209=>array(92,0,964,743),5210=>array(92,0,964,743),5211=>array(92,0,964,928),5212=>array(92,0,964,928),5213=>array(92,0,1003,729),5214=>array(73,0,970,729),5215=>array(92,0,1003,928),5216=>array(73,0,970,928),5217=>array(92,0,986,729),5218=>array(56,0,968,729),5219=>array(92,0,986,928),5220=>array(56,0,968,928),5221=>array(92,0,986,729),5222=>array(60,326,427,733),5223=>array(92,-14,949,734),5224=>array(92,0,949,743),5225=>array(73,0,967,734),5226=>array(56,0,960,734),5227=>array(41,0,651,743),5228=>array(92,0,702,1056),5229=>array(92,0,702,743),5230=>array(92,0,702,928),5231=>array(41,-14,651,729),5232=>array(41,-14,651,928),5233=>array(41,-14,708,927),5234=>array(92,-14,702,729),5235=>array(92,-14,702,928),5236=>array(92,0,937,743),5237=>array(41,0,891,743),5238=>array(92,0,939,743),5239=>array(92,0,891,743),5240=>array(92,0,939,928),5241=>array(92,0,891,928),5242=>array(92,-14,937,729),5243=>array(41,-14,891,729),5244=>array(92,-14,937,928),5245=>array(41,-14,891,928),5246=>array(92,-14,939,729),5247=>array(92,-14,891,729),5248=>array(92,-14,939,928),5249=>array(92,-14,891,928),5250=>array(92,-14,939,729),5251=>array(60,319,445,734),5252=>array(60,319,445,734),5253=>array(41,0,881,743),5254=>array(92,0,881,743),5255=>array(41,-14,881,734),5256=>array(92,-14,881,734),5257=>array(41,0,651,743),5258=>array(92,0,702,1056),5259=>array(92,0,702,743),5260=>array(92,0,702,928),5261=>array(41,-14,651,729),5262=>array(41,-14,651,928),5263=>array(41,-14,714,927),5264=>array(92,-14,702,729),5265=>array(92,-14,702,928),5266=>array(92,0,937,743),5267=>array(41,0,891,743),5268=>array(92,0,988,743),5269=>array(92,0,891,743),5270=>array(92,0,988,928),5271=>array(92,0,891,928),5272=>array(92,-14,937,729),5273=>array(41,-14,891,729),5274=>array(92,-14,937,928),5275=>array(41,-14,891,928),5276=>array(92,-14,988,729),5277=>array(92,-14,891,729),5278=>array(92,-14,988,928),5279=>array(92,-14,891,928),5280=>array(92,-14,988,729),5281=>array(60,319,445,734),5282=>array(60,319,445,734),5283=>array(27,0,535,729),5284=>array(92,0,599,1056),5285=>array(92,0,599,729),5286=>array(92,0,599,928),5287=>array(27,0,535,729),5288=>array(27,0,535,928),5289=>array(27,0,598,927),5290=>array(92,0,599,729),5291=>array(92,0,599,928),5292=>array(92,0,790,729),5293=>array(27,0,771,729),5294=>array(92,0,836,729),5295=>array(92,0,790,729),5296=>array(92,0,836,928),5297=>array(92,0,790,928),5298=>array(92,0,790,729),5299=>array(27,0,790,729),5300=>array(92,0,790,928),5301=>array(27,0,790,928),5302=>array(92,0,836,729),5303=>array(92,0,790,729),5304=>array(92,0,836,928),5305=>array(92,0,790,928),5306=>array(92,0,836,729),5307=>array(60,326,380,734),5308=>array(60,326,492,733),5309=>array(60,326,380,734),5312=>array(84,-14,947,468),5313=>array(41,-14,904,786),5314=>array(41,-14,904,468),5315=>array(41,-14,904,667),5316=>array(27,0,890,482),5317=>array(27,0,890,667),5318=>array(27,0,890,667),5319=>array(41,0,904,482),5320=>array(41,0,904,667),5321=>array(92,-14,1197,468),5322=>array(84,-14,1163,468),5323=>array(92,0,1172,482),5324=>array(41,0,1144,482),5325=>array(92,0,1172,667),5326=>array(41,0,1144,667),5327=>array(41,0,904,667),5328=>array(60,477,604,742),5329=>array(60,319,440,734),5330=>array(60,477,604,742),5331=>array(84,0,947,468),5332=>array(41,0,904,786),5333=>array(41,0,904,468),5334=>array(41,0,904,667),5335=>array(27,0,890,468),5336=>array(27,0,890,667),5337=>array(27,0,890,667),5338=>array(41,0,904,468),5339=>array(41,0,904,667),5340=>array(92,0,1190,468),5341=>array(84,0,1163,468),5342=>array(92,0,1199,468),5343=>array(41,0,1144,468),5344=>array(92,0,1199,667),5345=>array(41,0,1144,667),5346=>array(92,0,1187,468),5347=>array(27,0,1130,468),5348=>array(92,0,1187,667),5349=>array(27,0,1130,667),5350=>array(92,0,1199,468),5351=>array(41,0,1144,468),5352=>array(92,0,1199,667),5353=>array(41,0,1144,667),5354=>array(60,477,604,734),5356=>array(73,0,802,729),5357=>array(41,0,638,729),5358=>array(92,0,736,1056),5359=>array(92,0,689,729),5360=>array(92,0,689,928),5361=>array(41,0,638,729),5362=>array(41,0,638,928),5363=>array(41,0,694,927),5364=>array(92,0,689,729),5365=>array(92,0,689,928),5366=>array(92,0,906,729),5367=>array(41,0,875,729),5368=>array(92,0,926,729),5369=>array(92,0,905,729),5370=>array(92,0,926,928),5371=>array(92,0,905,928),5372=>array(92,0,906,729),5373=>array(41,0,875,729),5374=>array(92,0,906,928),5375=>array(41,0,875,928),5376=>array(92,0,926,729),5377=>array(92,0,905,729),5378=>array(92,0,926,928),5379=>array(92,0,905,928),5380=>array(92,0,926,729),5381=>array(60,326,437,734),5382=>array(60,319,404,742),5383=>array(60,326,437,734),5392=>array(41,-14,882,743),5393=>array(41,-14,882,743),5394=>array(41,-14,882,928),5395=>array(41,-14,1095,482),5396=>array(41,-14,1095,667),5397=>array(41,-14,1095,482),5398=>array(41,-14,1095,667),5399=>array(92,-14,1168,743),5400=>array(41,-14,1118,743),5401=>array(92,-14,1168,743),5402=>array(41,-14,1118,743),5403=>array(92,-14,1168,928),5404=>array(41,-14,1118,928),5405=>array(92,-14,1390,482),5406=>array(41,-14,1336,482),5407=>array(92,-14,1390,667),5408=>array(41,-14,1336,667),5409=>array(92,-14,1390,482),5410=>array(41,-14,1336,482),5411=>array(92,-14,1390,667),5412=>array(41,-14,1336,667),5413=>array(60,469,690,747),5414=>array(84,0,684,729),5415=>array(92,0,692,1056),5416=>array(92,0,692,729),5417=>array(92,0,692,928),5418=>array(84,0,684,729),5419=>array(84,0,684,928),5420=>array(84,0,750,927),5421=>array(92,0,692,729),5422=>array(92,0,692,928),5423=>array(92,0,911,729),5424=>array(84,0,919,729),5425=>array(92,0,929,729),5426=>array(92,0,912,729),5427=>array(92,0,929,928),5428=>array(92,0,912,928),5429=>array(92,0,911,729),5430=>array(84,0,919,729),5431=>array(92,0,911,928),5432=>array(84,0,919,928),5433=>array(92,0,929,729),5434=>array(92,0,912,729),5435=>array(92,0,929,928),5436=>array(92,0,912,928),5437=>array(92,0,929,928),5438=>array(60,326,438,734),5440=>array(60,392,338,670),5441=>array(60,326,454,734),5442=>array(92,-14,949,468),5443=>array(84,-14,941,468),5444=>array(27,0,884,482),5445=>array(92,0,949,786),5446=>array(92,0,949,482),5447=>array(92,0,949,667),5448=>array(92,0,692,729),5449=>array(92,0,692,928),5450=>array(92,0,692,729),5451=>array(41,0,641,729),5452=>array(41,0,641,928),5453=>array(41,0,641,729),5454=>array(92,0,911,928),5455=>array(41,0,875,928),5456=>array(60,326,438,727),5458=>array(73,0,802,729),5459=>array(51,0,769,743),5460=>array(51,-14,769,1056),5461=>array(51,-14,769,729),5462=>array(51,-14,769,928),5463=>array(73,0,844,663),5464=>array(73,0,844,928),5465=>array(84,0,855,663),5466=>array(84,0,855,928),5467=>array(92,0,1099,928),5468=>array(84,0,1058,928),5469=>array(60,311,546,675),5470=>array(92,-14,720,743),5471=>array(92,-14,720,743),5472=>array(92,-14,720,743),5473=>array(92,-14,720,743),5474=>array(92,-14,720,928),5475=>array(92,-14,720,928),5476=>array(54,0,759,729),5477=>array(54,0,759,928),5478=>array(56,0,762,729),5479=>array(56,0,762,928),5480=>array(92,0,1006,928),5481=>array(56,0,968,928),5482=>array(60,326,512,733),5492=>array(41,0,893,743),5493=>array(84,0,936,743),5494=>array(84,0,936,928),5495=>array(41,-14,893,729),5496=>array(41,-14,893,928),5497=>array(84,-14,936,729),5498=>array(84,-14,936,928),5499=>array(60,319,562,734),5500=>array(92,0,745,729),5501=>array(60,326,454,734),5502=>array(60,0,1197,1056),5503=>array(60,0,1197,743),5504=>array(60,0,1197,928),5505=>array(60,-14,1146,729),5506=>array(60,-14,1146,928),5507=>array(60,-14,1197,729),5508=>array(60,-14,1197,928),5509=>array(60,319,939,734),5514=>array(41,0,893,743),5515=>array(84,0,936,743),5516=>array(41,-14,893,729),5517=>array(84,-14,936,729),5518=>array(60,0,1550,1056),5519=>array(60,0,1550,743),5520=>array(60,0,1550,928),5521=>array(60,-14,1203,741),5522=>array(60,-14,1203,928),5523=>array(60,-14,1550,741),5524=>array(60,-14,1550,928),5525=>array(60,335,792,741),5526=>array(60,335,1217,741),5536=>array(41,0,904,709),5537=>array(41,0,904,709),5538=>array(27,-242,890,468),5539=>array(27,-242,890,667),5540=>array(41,-242,904,468),5541=>array(41,-242,904,667),5542=>array(60,344,604,734),5543=>array(84,0,771,729),5544=>array(5,0,692,729),5545=>array(5,0,692,928),5546=>array(84,0,771,729),5547=>array(84,0,771,928),5548=>array(5,0,692,729),5549=>array(5,0,692,928),5550=>array(15,326,438,734),5551=>array(92,-14,702,729),5598=>array(92,0,778,729),5601=>array(52,0,738,729),5702=>array(60,326,439,734),5703=>array(60,240,439,820),5742=>array(10,0,403,306),5743=>array(60,0,1146,743),5744=>array(60,0,1499,743),5745=>array(60,0,1975,743),5746=>array(60,0,1975,928),5747=>array(60,-14,1628,741),5748=>array(60,-14,1586,928),5749=>array(60,-14,1975,741),5750=>array(60,-14,1975,928),5760=>array(-10,219,553,354),5761=>array(-10,-125,646,354),5762=>array(-10,-125,955,354),5763=>array(-10,-125,1264,354),5764=>array(-10,-125,1572,354),5765=>array(-10,-125,1881,354),5766=>array(-10,219,637,697),5767=>array(-10,219,945,697),5768=>array(-10,219,1264,697),5769=>array(-10,219,1569,697),5770=>array(-10,219,1881,697),5771=>array(-10,-125,579,697),5772=>array(-10,-125,888,697),5773=>array(-10,-125,1198,697),5774=>array(-10,-125,1507,697),5775=>array(-10,-125,1817,697),5776=>array(-10,41,646,532),5777=>array(-10,41,955,532),5778=>array(-10,41,1264,532),5779=>array(-10,41,1572,532),5780=>array(-10,41,1881,532),5781=>array(-10,-125,579,697),5782=>array(-10,-125,948,697),5783=>array(-10,-109,798,354),5784=>array(-10,-254,1244,354),5785=>array(-10,219,1569,928),5786=>array(-10,14,750,354),5787=>array(55,-49,648,622),5788=>array(-10,-49,583,622),7424=>array(15,0,637,547),7425=>array(0,0,755,547),7426=>array(43,-14,1000,560),7427=>array(20,0,564,547),7428=>array(43,-14,526,560),7429=>array(84,-1,611,547),7430=>array(20,-1,611,547),7431=>array(92,0,480,547),7432=>array(54,-14,493,560),7433=>array(84,-213,259,547),7434=>array(44,-14,416,547),7435=>array(84,0,684,547),7436=>array(-18,0,499,547),7437=>array(84,0,733,547),7438=>array(84,0,617,547),7439=>array(43,-14,644,560),7440=>array(43,-14,526,560),7441=>array(43,-27,617,573),7442=>array(43,31,617,515),7443=>array(13,-28,653,579),7444=>array(43,-14,1046,560),7446=>array(43,273,644,560),7447=>array(44,-14,646,273),7448=>array(51,0,515,547),7449=>array(21,0,560,547),7450=>array(21,0,560,547),7451=>array(4,0,575,547),7452=>array(84,-14,607,547),7453=>array(85,10,646,560),7454=>array(69,10,857,561),7455=>array(19,-238,651,560),7456=>array(15,0,637,547),7457=>array(35,0,889,547),7458=>array(45,0,534,547),7459=>array(57,-14,581,547),7462=>array(84,0,499,547),7463=>array(15,0,637,547),7464=>array(84,0,607,547),7465=>array(51,0,515,547),7466=>array(84,0,698,547),7467=>array(55,0,648,547),7468=>array(3,326,484,734),7469=>array(0,326,638,734),7470=>array(58,326,436,734),7472=>array(58,326,490,734),7473=>array(58,326,384,734),7474=>array(58,326,384,734),7475=>array(31,318,471,742),7476=>array(58,326,469,734),7477=>array(58,326,176,734),7478=>array(-35,214,176,734),7479=>array(58,326,507,734),7480=>array(58,326,384,734),7481=>array(58,326,569,734),7482=>array(58,326,469,734),7483=>array(58,326,469,734),7484=>array(31,318,504,742),7485=>array(39,318,471,742),7486=>array(58,326,436,734),7487=>array(58,326,473,734),7488=>array(3,326,426,734),7489=>array(58,318,454,734),7490=>array(19,326,675,734),7491=>array(53,318,402,640),7492=>array(53,318,402,640),7493=>array(53,318,423,640),7494=>array(53,318,656,640),7495=>array(53,318,423,751),7496=>array(53,318,423,751),7497=>array(53,318,423,640),7498=>array(53,318,423,640),7499=>array(53,318,330,640),7500=>array(53,318,330,640),7501=>array(53,205,423,639),7502=>array(53,207,164,632),7503=>array(53,326,431,751),7504=>array(53,326,607,640),7505=>array(53,205,399,640),7506=>array(53,318,432,640),7507=>array(53,318,357,640),7508=>array(53,479,432,640),7509=>array(53,318,432,479),7510=>array(53,209,423,640),7511=>array(53,326,332,719),7512=>array(53,318,399,632),7513=>array(53,332,407,640),7514=>array(53,318,607,632),7515=>array(53,326,445,632),7517=>array(53,209,423,759),7518=>array(10,209,420,632),7519=>array(27,318,406,756),7520=>array(41,209,457,635),7521=>array(16,209,391,632),7522=>array(53,0,164,425),7523=>array(54,0,314,313),7524=>array(53,-8,399,306),7525=>array(53,0,445,306),7526=>array(53,-117,423,433),7527=>array(10,-117,420,306),7528=>array(53,-117,423,314),7529=>array(41,-117,457,309),7530=>array(16,-117,391,306),7543=>array(84,-216,671,559),7544=>array(58,326,469,734),7547=>array(84,0,461,547),7549=>array(5,-208,742,560),7557=>array(84,-216,434,760),7579=>array(53,318,423,640),7580=>array(53,318,357,640),7581=>array(53,288,357,640),7582=>array(53,318,432,751),7583=>array(53,318,330,640),7584=>array(53,326,321,751),7585=>array(53,205,292,632),7586=>array(53,205,423,632),7587=>array(53,207,399,632),7588=>array(53,326,291,751),7589=>array(53,326,226,632),7590=>array(53,326,291,632),7591=>array(53,326,291,632),7592=>array(53,205,375,751),7593=>array(53,205,270,751),7594=>array(53,205,274,751),7595=>array(53,326,314,632),7596=>array(53,205,608,640),7597=>array(53,209,607,632),7598=>array(53,205,506,640),7599=>array(53,205,505,640),7600=>array(53,326,393,632),7601=>array(53,318,432,640),7602=>array(53,209,486,751),7603=>array(53,205,366,640),7604=>array(53,205,340,751),7605=>array(53,205,332,719),7606=>array(53,318,527,632),7607=>array(53,298,438,632),7608=>array(53,318,383,632),7609=>array(53,326,395,632),7610=>array(53,326,445,632),7611=>array(53,326,361,632),7612=>array(53,205,468,632),7613=>array(53,288,414,632),7614=>array(53,206,399,632),7615=>array(53,320,370,756),7620=>array(-467,616,-35,800),7621=>array(-467,616,-35,800),7622=>array(-467,616,-35,800),7623=>array(-467,616,-35,800),7624=>array(-513,616,11,800),7625=>array(-513,616,11,800),7680=>array(5,-240,769,729),7681=>array(43,-240,596,560),7682=>array(92,0,692,928),7683=>array(84,-14,671,913),7684=>array(92,-212,692,729),7685=>array(84,-212,671,760),7686=>array(92,-184,692,729),7687=>array(84,-184,671,760),7688=>array(50,-196,670,927),7689=>array(43,-196,526,800),7690=>array(92,0,778,927),7691=>array(45,-14,632,942),7692=>array(92,-212,778,729),7693=>array(45,-212,632,760),7694=>array(92,-184,778,729),7695=>array(45,-184,632,760),7696=>array(92,-192,778,729),7697=>array(45,-196,632,760),7698=>array(92,-240,778,729),7699=>array(45,-240,632,760),7700=>array(92,0,610,1057),7701=>array(43,-14,630,927),7702=>array(92,0,610,1057),7703=>array(43,-14,630,927),7704=>array(92,-203,610,729),7705=>array(43,-203,630,560),7706=>array(92,-195,610,729),7707=>array(43,-195,630,560),7708=>array(92,-196,610,927),7709=>array(43,-196,630,784),7710=>array(92,0,599,928),7711=>array(19,0,444,942),7712=>array(50,-14,747,901),7713=>array(45,-216,632,760),7714=>array(92,0,745,928),7715=>array(84,0,634,913),7716=>array(92,-212,745,729),7717=>array(84,-212,634,760),7718=>array(92,0,745,927),7719=>array(23,0,634,927),7720=>array(45,-196,745,729),7721=>array(38,-196,634,760),7722=>array(92,-236,745,729),7723=>array(84,-236,634,760),7724=>array(16,-195,355,729),7725=>array(1,-195,341,760),7726=>array(40,0,378,1057),7727=>array(16,0,354,917),7728=>array(92,0,805,927),7729=>array(84,0,684,982),7730=>array(92,-212,805,729),7731=>array(84,-212,684,760),7732=>array(92,-184,805,729),7733=>array(84,-184,684,760),7734=>array(92,-212,610,729),7735=>array(83,-212,259,760),7736=>array(32,-212,610,942),7737=>array(18,-212,325,914),7738=>array(92,-184,610,729),7739=>array(20,-184,328,760),7740=>array(92,-240,610,729),7741=>array(-13,-240,355,760),7742=>array(92,0,903,927),7743=>array(83,0,963,800),7744=>array(92,0,903,928),7745=>array(83,0,963,760),7746=>array(92,-212,903,729),7747=>array(83,-212,963,560),7748=>array(92,0,745,928),7749=>array(84,0,634,760),7750=>array(92,-212,745,729),7751=>array(84,-212,634,560),7752=>array(92,-184,745,729),7753=>array(84,-184,634,560),7754=>array(92,-240,745,729),7755=>array(84,-240,634,560),7756=>array(50,-14,800,1057),7757=>array(43,-14,644,916),7758=>array(50,-14,800,1043),7759=>array(43,-14,644,900),7760=>array(50,-14,800,1057),7761=>array(43,-14,644,927),7762=>array(50,-14,800,1057),7763=>array(43,-14,644,927),7764=>array(92,0,692,927),7765=>array(84,-208,671,800),7766=>array(92,0,692,928),7767=>array(84,-208,671,760),7768=>array(92,0,750,928),7769=>array(84,0,490,760),7770=>array(92,-212,750,729),7771=>array(83,-212,490,560),7772=>array(92,-212,750,914),7773=>array(83,-212,490,759),7774=>array(92,-184,750,729),7775=>array(33,-184,490,560),7776=>array(72,-14,647,928),7777=>array(52,-14,548,760),7778=>array(72,-212,647,742),7779=>array(52,-212,548,560),7780=>array(72,-14,647,928),7781=>array(52,-14,548,816),7782=>array(72,-14,647,1053),7783=>array(52,-14,548,1002),7784=>array(72,-212,647,928),7785=>array(52,-212,548,762),7786=>array(5,0,677,927),7787=>array(13,0,455,942),7788=>array(5,-212,677,729),7789=>array(13,-212,455,702),7790=>array(5,-184,677,729),7791=>array(13,-184,455,702),7792=>array(5,-240,677,729),7793=>array(13,-240,455,702),7794=>array(92,-212,720,729),7795=>array(78,-212,628,547),7796=>array(92,-196,720,729),7797=>array(78,-195,628,547),7798=>array(92,-203,720,729),7799=>array(78,-203,628,547),7800=>array(92,-14,720,1057),7801=>array(78,-14,628,916),7802=>array(92,-14,720,1043),7803=>array(78,-14,628,887),7804=>array(5,0,769,928),7805=>array(15,0,637,778),7806=>array(5,-212,769,729),7807=>array(15,-212,637,547),7808=>array(30,0,1072,931),7809=>array(35,0,889,803),7810=>array(30,0,1072,931),7811=>array(35,0,889,803),7812=>array(30,0,1072,927),7813=>array(35,0,889,774),7814=>array(30,0,1072,927),7815=>array(35,0,889,760),7816=>array(30,-212,1072,729),7817=>array(35,-212,889,547),7818=>array(19,0,751,928),7819=>array(15,0,630,760),7820=>array(19,0,751,927),7821=>array(15,0,630,774),7822=>array(-10,0,734,928),7823=>array(12,-216,634,760),7824=>array(45,0,680,927),7825=>array(45,0,534,798),7826=>array(45,-212,680,729),7827=>array(45,-212,534,547),7828=>array(45,-184,680,729),7829=>array(45,-184,534,547),7830=>array(84,-184,634,760),7831=>array(13,0,455,927),7832=>array(35,0,889,888),7833=>array(12,-216,634,888),7834=>array(43,-14,758,760),7835=>array(19,0,444,942),7836=>array(-18,0,444,760),7837=>array(19,0,444,760),7838=>array(92,-14,823,743),7839=>array(43,-14,645,768),7840=>array(5,-212,769,729),7841=>array(43,-212,596,560),7842=>array(5,0,769,1025),7843=>array(43,-14,596,843),7844=>array(5,0,769,1054),7845=>array(43,-14,652,873),7846=>array(5,0,769,1054),7847=>array(43,-14,597,874),7848=>array(5,0,769,1093),7849=>array(43,-14,672,912),7850=>array(5,0,769,1068),7851=>array(43,-14,596,887),7852=>array(5,-212,769,927),7853=>array(43,-212,596,800),7854=>array(5,0,769,1057),7855=>array(43,-14,596,891),7856=>array(5,0,769,1057),7857=>array(43,-14,596,894),7858=>array(5,0,769,1123),7859=>array(43,-14,596,959),7860=>array(5,0,769,1068),7861=>array(43,-14,596,905),7862=>array(5,-212,769,935),7863=>array(43,-212,596,780),7864=>array(92,-212,610,729),7865=>array(43,-212,630,560),7866=>array(92,0,610,1025),7867=>array(43,-14,630,843),7868=>array(92,0,610,928),7869=>array(43,-14,630,778),7870=>array(92,0,684,1054),7871=>array(43,-14,688,873),7872=>array(92,0,621,1054),7873=>array(43,-14,630,874),7874=>array(92,0,686,1093),7875=>array(43,-14,681,912),7876=>array(92,0,610,1068),7877=>array(43,-14,630,887),7878=>array(92,-212,610,927),7879=>array(43,-212,630,800),7880=>array(66,0,313,1025),7881=>array(52,0,300,842),7882=>array(92,-212,280,729),7883=>array(83,-212,259,760),7884=>array(50,-212,800,742),7885=>array(43,-212,644,560),7886=>array(50,-14,800,1025),7887=>array(43,-14,644,843),7888=>array(50,-14,800,1054),7889=>array(43,-14,679,873),7890=>array(50,-14,800,1054),7891=>array(43,-14,644,874),7892=>array(50,-14,800,1093),7893=>array(43,-14,685,912),7894=>array(50,-14,800,1068),7895=>array(43,-14,644,887),7896=>array(50,-212,800,927),7897=>array(43,-212,644,800),7898=>array(53,-14,854,927),7899=>array(46,-14,708,800),7900=>array(53,-14,854,927),7901=>array(46,-14,708,800),7902=>array(53,-14,854,1025),7903=>array(46,-14,708,843),7904=>array(53,-14,854,928),7905=>array(46,-14,708,778),7906=>array(53,-212,854,761),7907=>array(46,-212,708,609),7908=>array(92,-212,720,729),7909=>array(78,-212,628,547),7910=>array(92,-14,720,1025),7911=>array(78,-14,628,843),7912=>array(91,-14,833,927),7913=>array(75,-14,733,800),7914=>array(91,-14,833,927),7915=>array(75,-14,733,800),7916=>array(91,-14,833,1025),7917=>array(75,-14,733,843),7918=>array(91,-14,833,928),7919=>array(75,-14,733,778),7920=>array(91,-212,833,761),7921=>array(75,-212,733,609),7922=>array(-10,0,734,931),7923=>array(12,-216,634,803),7924=>array(-10,-212,734,729),7925=>array(12,-216,634,547),7926=>array(-10,0,734,1029),7927=>array(12,-216,634,843),7928=>array(-10,0,734,928),7929=>array(12,-216,634,778),7930=>array(92,0,925,729),7931=>array(9,0,635,760),7936=>array(48,-13,645,785),7937=>array(48,-13,645,785),7938=>array(48,-13,645,800),7939=>array(48,-13,645,800),7940=>array(48,-13,645,800),7941=>array(48,-13,645,800),7942=>array(48,-13,645,928),7943=>array(48,-13,645,928),7944=>array(5,0,769,785),7945=>array(5,0,769,785),7946=>array(2,0,1036,800),7947=>array(3,0,1039,800),7948=>array(1,0,930,800),7949=>array(2,0,958,800),7950=>array(4,0,831,928),7951=>array(3,0,854,928),7952=>array(54,-14,493,785),7953=>array(54,-14,493,785),7954=>array(54,-14,498,800),7955=>array(54,-14,493,800),7956=>array(54,-14,531,800),7957=>array(54,-14,516,800),7960=>array(3,0,718,785),7961=>array(4,0,721,785),7962=>array(2,0,1026,800),7963=>array(3,0,1023,800),7964=>array(1,0,950,800),7965=>array(2,0,979,800),7968=>array(84,-208,634,785),7969=>array(84,-208,634,785),7970=>array(84,-208,634,800),7971=>array(84,-208,634,800),7972=>array(84,-208,634,800),7973=>array(84,-208,634,800),7974=>array(84,-208,634,928),7975=>array(84,-208,634,928),7976=>array(3,0,854,785),7977=>array(4,0,859,785),7978=>array(2,0,1159,800),7979=>array(3,0,1158,800),7980=>array(1,0,1088,800),7981=>array(2,0,1114,800),7982=>array(4,0,962,928),7983=>array(3,0,971,928),7984=>array(78,-19,348,785),7985=>array(78,-19,348,785),7986=>array(-27,-19,407,800),7987=>array(-58,-19,376,800),7988=>array(31,-19,446,800),7989=>array(-6,-19,438,800),7990=>array(-2,-19,348,928),7991=>array(-5,-19,348,928),7992=>array(3,0,391,785),7993=>array(4,0,397,785),7994=>array(2,0,685,800),7995=>array(3,0,693,800),7996=>array(1,0,620,800),7997=>array(2,0,646,800),7998=>array(4,0,512,928),7999=>array(3,0,512,928),8000=>array(43,-14,644,785),8001=>array(43,-14,644,785),8002=>array(43,-14,644,800),8003=>array(43,-14,644,800),8004=>array(43,-14,644,800),8005=>array(43,-14,644,800),8008=>array(3,-14,841,785),8009=>array(4,-14,883,785),8010=>array(2,-14,1171,800),8011=>array(3,-14,1173,800),8012=>array(1,-14,1002,800),8013=>array(2,-14,1032,800),8016=>array(78,-10,629,785),8017=>array(78,-10,629,785),8018=>array(78,-10,629,800),8019=>array(78,-10,629,800),8020=>array(78,-10,629,800),8021=>array(78,-10,629,800),8022=>array(78,-10,629,928),8023=>array(78,-10,629,928),8025=>array(4,0,940,785),8027=>array(3,0,1194,800),8029=>array(2,0,1208,800),8031=>array(3,0,1059,928),8032=>array(43,-13,826,785),8033=>array(43,-13,826,785),8034=>array(43,-13,826,800),8035=>array(43,-13,826,800),8036=>array(43,-13,826,800),8037=>array(43,-13,826,800),8038=>array(43,-13,826,928),8039=>array(43,-13,826,928),8040=>array(3,0,881,785),8041=>array(4,0,931,785),8042=>array(2,0,1219,800),8043=>array(3,-3,1224,800),8044=>array(1,0,1048,800),8045=>array(2,0,1078,800),8046=>array(4,0,1000,928),8047=>array(3,0,1048,928),8048=>array(48,-13,645,800),8049=>array(48,-13,645,800),8050=>array(54,-14,493,800),8051=>array(54,-14,493,800),8052=>array(84,-208,634,800),8053=>array(84,-208,634,800),8054=>array(-26,-19,348,800),8055=>array(77,-19,353,800),8056=>array(43,-14,644,800),8057=>array(43,-14,644,800),8058=>array(78,-10,629,800),8059=>array(78,-10,629,800),8060=>array(43,-13,826,800),8061=>array(43,-13,826,800),8064=>array(48,-208,645,785),8065=>array(48,-208,645,785),8066=>array(48,-208,645,800),8067=>array(48,-208,645,800),8068=>array(48,-208,645,800),8069=>array(48,-208,645,800),8070=>array(48,-208,645,928),8071=>array(48,-208,645,928),8072=>array(5,-208,769,785),8073=>array(5,-208,769,785),8074=>array(2,-208,1036,800),8075=>array(3,-208,1039,800),8076=>array(1,-208,930,800),8077=>array(2,-208,958,800),8078=>array(4,-208,831,928),8079=>array(3,-208,854,928),8080=>array(84,-208,634,785),8081=>array(84,-208,634,785),8082=>array(84,-208,634,800),8083=>array(84,-208,634,800),8084=>array(84,-208,634,800),8085=>array(84,-208,634,800),8086=>array(84,-208,634,928),8087=>array(84,-208,634,928),8088=>array(3,-208,854,785),8089=>array(4,-208,859,785),8090=>array(2,-208,1159,800),8091=>array(3,-208,1158,800),8092=>array(1,-208,1088,800),8093=>array(2,-208,1114,800),8094=>array(4,-208,962,928),8095=>array(3,-208,971,928),8096=>array(43,-208,826,785),8097=>array(43,-208,826,785),8098=>array(43,-208,826,800),8099=>array(43,-208,826,800),8100=>array(43,-208,826,800),8101=>array(43,-208,826,800),8102=>array(43,-208,826,928),8103=>array(43,-208,826,928),8104=>array(3,-208,881,785),8105=>array(4,-208,931,785),8106=>array(2,-208,1219,800),8107=>array(3,-208,1224,800),8108=>array(1,-208,1048,800),8109=>array(2,-208,1078,800),8110=>array(4,-208,1000,928),8111=>array(3,-208,1048,928),8112=>array(48,-13,645,784),8113=>array(48,-13,645,760),8114=>array(48,-208,645,800),8115=>array(48,-208,645,559),8116=>array(48,-208,645,800),8118=>array(48,-13,645,778),8119=>array(48,-208,645,778),8120=>array(5,0,769,927),8121=>array(5,0,769,914),8122=>array(-1,0,872,800),8123=>array(26,0,792,800),8124=>array(5,-208,769,729),8125=>array(183,595,317,785),8126=>array(202,-208,333,-45),8127=>array(183,595,317,785),8128=>array(80,638,420,778),8129=>array(80,654,420,928),8130=>array(84,-208,634,800),8131=>array(84,-208,634,560),8132=>array(84,-208,634,800),8134=>array(84,-208,634,778),8135=>array(84,-208,634,778),8136=>array(-1,0,856,800),8137=>array(-24,0,771,800),8138=>array(-1,0,988,800),8139=>array(-18,0,915,800),8140=>array(92,-208,745,729),8141=>array(34,595,468,800),8142=>array(63,595,478,800),8143=>array(80,595,420,928),8144=>array(3,-19,348,784),8145=>array(20,-19,348,760),8146=>array(-36,-19,348,978),8147=>array(23,-19,372,978),8150=>array(4,-19,348,778),8151=>array(-6,-19,348,928),8152=>array(21,0,350,927),8153=>array(32,0,339,914),8154=>array(-1,0,529,800),8155=>array(-21,0,450,800),8157=>array(40,595,474,800),8158=>array(45,595,489,800),8159=>array(80,595,420,928),8160=>array(78,-10,629,784),8161=>array(78,-10,629,760),8162=>array(78,-10,629,978),8163=>array(78,-10,629,978),8164=>array(84,-208,671,785),8165=>array(84,-208,671,785),8166=>array(78,-10,629,778),8167=>array(78,-10,629,928),8168=>array(-10,0,734,927),8169=>array(-10,0,734,914),8170=>array(-1,0,1030,800),8171=>array(-27,0,992,800),8172=>array(4,0,797,785),8173=>array(46,654,404,978),8174=>array(96,654,445,978),8175=>array(46,616,322,800),8178=>array(43,-208,826,800),8179=>array(43,-208,826,547),8180=>array(43,-208,826,800),8182=>array(43,-13,826,778),8183=>array(43,-208,826,778),8184=>array(-1,-14,1015,800),8185=>array(-19,-14,836,800),8186=>array(-1,0,1057,800),8187=>array(-30,0,867,800),8188=>array(27,-208,823,742),8189=>array(178,616,454,800),8190=>array(183,595,317,785),8208=>array(54,217,361,359),8209=>array(54,217,361,359),8210=>array(54,211,642,337),8211=>array(54,211,446,337),8212=>array(54,211,946,337),8213=>array(0,211,1000,337),8214=>array(127,-236,399,764),8215=>array(0,-236,500,-9),8216=>array(103,418,318,729),8217=>array(63,418,278,729),8218=>array(72,-122,287,189),8219=>array(63,418,278,729),8220=>array(103,418,565,729),8221=>array(92,418,554,729),8222=>array(72,-122,534,189),8223=>array(92,418,554,729),8224=>array(26,-96,470,729),8225=>array(25,-96,470,729),8226=>array(144,196,495,547),8227=>array(144,157,534,586),8228=>array(79,0,255,189),8229=>array(79,0,588,189),8230=>array(79,0,921,189),8231=>array(86,253,262,442),8240=>array(32,-14,1417,742),8241=>array(32,-14,1864,742),8242=>array(20,547,240,729),8243=>array(20,547,423,729),8244=>array(20,547,606,729),8245=>array(20,547,240,729),8246=>array(20,547,425,729),8247=>array(20,547,606,729),8248=>array(101,-238,632,29),8249=>array(77,67,318,519),8250=>array(94,67,335,519),8251=>array(72,0,900,829),8252=>array(69,0,558,729),8253=>array(69,0,515,742),8254=>array(0,663,500,755),8255=>array(-31,-237,859,-79),8256=>array(-31,769,859,927),8257=>array(-52,-235,296,231),8258=>array(20,-37,1003,832),8259=>array(96,220,404,358),8260=>array(-199,-14,366,742),8261=>array(86,-132,389,760),8262=>array(68,-132,371,760),8263=>array(34,0,996,742),8264=>array(69,0,760,742),8265=>array(69,0,760,742),8266=>array(49,-125,464,546),8267=>array(93,-96,579,729),8268=>array(75,189,425,541),8269=>array(75,189,425,541),8270=>array(20,0,503,464),8271=>array(104,-142,329,547),8272=>array(-31,-237,859,927),8273=>array(53,-14,439,797),8274=>array(30,-93,529,729),8275=>array(49,212,951,415),8276=>array(-31,-240,859,-82),8277=>array(152,98,686,631),8278=>array(110,93,574,645),8279=>array(20,547,789,729),8280=>array(76,21,762,708),8281=>array(126,71,712,657),8282=>array(102,0,280,729),8283=>array(49,-170,822,898),8284=>array(55,0,783,729),8285=>array(102,0,278,683),8286=>array(102,0,278,683),8304=>array(29,319,398,742),8305=>array(53,326,164,751),8308=>array(27,326,397,734),8309=>array(47,319,384,734),8310=>array(38,319,394,742),8311=>array(41,326,378,734),8312=>array(38,319,389,742),8313=>array(32,319,388,742),8314=>array(67,326,461,677),8315=>array(67,469,461,534),8316=>array(67,407,461,596),8317=>array(54,252,237,751),8318=>array(50,252,234,751),8319=>array(54,326,406,640),8320=>array(29,-7,398,416),8321=>array(60,0,382,408),8322=>array(53,0,382,416),8323=>array(44,-7,384,416),8324=>array(27,0,397,408),8325=>array(47,-7,384,408),8326=>array(38,-7,394,416),8327=>array(41,0,378,408),8328=>array(38,-7,389,416),8329=>array(32,-7,388,416),8330=>array(67,0,461,351),8331=>array(67,143,461,208),8332=>array(67,81,461,270),8333=>array(54,-74,237,425),8334=>array(50,-74,234,425),8336=>array(53,-8,402,313),8337=>array(53,-8,423,313),8338=>array(53,-8,432,313),8339=>array(10,0,403,306),8340=>array(53,-8,423,313),8341=>array(54,0,406,425),8342=>array(53,0,431,425),8343=>array(54,0,166,425),8344=>array(53,0,607,313),8345=>array(54,0,406,313),8346=>array(53,-117,423,313),8347=>array(33,-8,351,313),8348=>array(53,0,332,393),8352=>array(38,0,892,729),8353=>array(50,-44,634,778),8354=>array(29,-14,667,742),8355=>array(75,0,663,729),8356=>array(61,0,613,742),8357=>array(83,-93,963,640),8358=>array(43,0,794,729),8359=>array(92,-14,1470,729),8360=>array(92,-14,1157,729),8361=>array(13,0,1088,729),8362=>array(39,-14,859,729),8363=>array(30,-182,692,760),8364=>array(-19,-14,629,742),8365=>array(29,0,695,729),8366=>array(12,0,684,729),8367=>array(92,-223,1247,742),8368=>array(14,-14,648,742),8369=>array(34,0,696,729),8370=>array(50,-81,643,809),8371=>array(5,0,691,729),8372=>array(43,-14,816,742),8373=>array(72,-147,629,760),8376=>array(12,0,684,729),8377=>array(50,0,647,729),8378=>array(5,0,745,729),8400=>array(-498,628,-26,760),8401=>array(-470,628,1,760),8406=>array(-470,560,-26,760),8407=>array(-470,560,-26,760),8411=>array(-501,654,-1,774),8412=>array(-595,654,99,774),8417=>array(-470,560,-26,760),8448=>array(20,-24,1083,752),8449=>array(20,-24,1137,752),8450=>array(50,-14,670,742),8451=>array(87,-14,1147,749),8452=>array(64,0,832,729),8453=>array(20,-24,1064,752),8454=>array(20,-24,1117,752),8455=>array(67,-14,616,742),8456=>array(64,-146,684,611),8457=>array(87,0,1002,749),8459=>array(36,-14,1063,746),8460=>array(6,-125,809,747),8461=>array(100,0,788,729),8462=>array(31,0,654,760),8463=>array(10,0,625,760),8464=>array(36,-14,533,742),8465=>array(52,-14,659,743),8466=>array(37,-14,787,742),8467=>array(-14,-14,401,742),8468=>array(9,-14,936,760),8469=>array(92,0,745,729),8470=>array(34,0,1154,729),8471=>array(138,0,862,725),8472=>array(54,-221,658,495),8473=>array(92,0,709,729),8474=>array(50,-146,800,742),8475=>array(31,-14,904,768),8476=>array(41,-14,803,743),8477=>array(98,0,793,729),8478=>array(37,0,859,729),8479=>array(81,-112,694,887),8480=>array(127,444,792,731),8481=>array(3,0,1249,547),8482=>array(144,447,790,729),8483=>array(11,-113,729,885),8484=>array(45,0,709,729),8485=>array(26,-230,540,777),8486=>array(27,0,823,742),8487=>array(27,-14,823,728),8488=>array(-5,-159,670,729),8489=>array(1,0,271,566),8490=>array(92,0,805,729),8491=>array(5,0,769,928),8492=>array(41,-1,853,772),8493=>array(63,-19,767,742),8494=>array(61,-12,793,647),8495=>array(41,-14,591,533),8496=>array(72,-14,668,742),8497=>array(37,-14,860,773),8498=>array(92,0,599,729),8499=>array(38,-18,1156,751),8500=>array(29,-12,436,420),8501=>array(50,-14,761,742),8502=>array(19,-14,687,742),8503=>array(31,-35,439,742),8504=>array(63,-41,633,742),8505=>array(34,0,355,760),8506=>array(44,-27,932,723),8507=>array(69,0,1352,547),8508=>array(34,-14,765,547),8509=>array(-40,-208,700,561),8510=>array(92,0,627,729),8511=>array(92,0,771,729),8512=>array(12,-192,820,719),8513=>array(25,-14,723,742),8514=>array(9,0,527,729),8515=>array(43,0,561,729),8516=>array(0,0,744,729),8517=>array(21,0,786,729),8518=>array(34,-14,752,760),8519=>array(33,-14,635,560),8520=>array(15,0,353,760),8521=>array(-143,-216,354,760),8523=>array(41,-14,811,742),8526=>array(55,0,470,547),8528=>array(49,-14,983,742),8529=>array(49,-14,993,742),8530=>array(49,-14,1441,742),8531=>array(49,-14,989,742),8532=>array(53,-14,989,742),8533=>array(49,-14,989,742),8534=>array(53,-14,989,742),8535=>array(44,-14,989,742),8536=>array(27,-14,989,742),8537=>array(49,-14,999,742),8538=>array(47,-14,999,742),8539=>array(49,-14,994,742),8540=>array(44,-14,994,742),8541=>array(47,-14,994,742),8542=>array(41,-14,994,742),8543=>array(49,-14,814,742),8544=>array(92,0,280,729),8545=>array(92,0,566,729),8546=>array(92,0,853,729),8547=>array(92,0,1094,729),8548=>array(5,0,769,729),8549=>array(5,0,1007,729),8550=>array(5,0,1293,729),8551=>array(5,0,1580,729),8552=>array(92,0,1101,729),8553=>array(19,0,751,729),8554=>array(19,0,1028,729),8555=>array(19,0,1314,729),8556=>array(92,0,610,729),8557=>array(50,-14,670,742),8558=>array(92,0,778,729),8559=>array(92,0,903,729),8560=>array(84,0,259,760),8561=>array(84,0,523,760),8562=>array(84,0,788,760),8563=>array(84,0,946,760),8564=>array(15,0,637,547),8565=>array(15,0,878,760),8566=>array(15,0,1143,760),8567=>array(15,0,1407,760),8568=>array(84,0,954,760),8569=>array(15,0,630,547),8570=>array(15,0,885,760),8571=>array(15,0,1149,760),8572=>array(84,0,259,760),8573=>array(43,-14,526,560),8574=>array(45,-14,632,760),8575=>array(83,0,963,560),8576=>array(52,0,1236,729),8577=>array(92,0,778,729),8578=>array(52,0,1236,729),8579=>array(50,-14,670,742),8580=>array(43,-14,526,560),8581=>array(50,-208,670,742),8585=>array(29,-14,989,742),8592=>array(49,87,781,540),8593=>array(193,0,646,732),8594=>array(57,87,789,540),8595=>array(193,-3,646,729),8596=>array(49,87,789,540),8597=>array(193,-3,646,732),8598=>array(136,66,720,650),8599=>array(136,66,720,650),8600=>array(136,66,720,650),8601=>array(136,66,720,650),8602=>array(49,87,781,540),8603=>array(57,87,789,540),8604=>array(13,84,833,431),8605=>array(5,84,825,431),8606=>array(49,87,781,540),8607=>array(189,0,641,732),8608=>array(57,87,789,540),8609=>array(194,-3,646,729),8610=>array(49,87,793,540),8611=>array(45,87,789,540),8612=>array(49,87,781,540),8613=>array(193,0,646,732),8614=>array(57,87,789,540),8615=>array(193,0,646,732),8616=>array(193,0,646,732),8617=>array(49,87,781,565),8618=>array(57,87,789,565),8619=>array(49,87,781,565),8620=>array(57,87,789,565),8621=>array(49,87,789,540),8622=>array(49,86,789,541),8623=>array(123,-4,714,733),8624=>array(169,0,646,755),8625=>array(192,0,669,755),8626=>array(169,-26,646,729),8627=>array(192,-26,669,729),8628=>array(233,-3,772,621),8629=>array(49,87,673,626),8630=>array(11,198,816,685),8631=>array(22,198,828,685),8632=>array(118,13,788,729),8633=>array(49,-108,789,735),8634=>array(86,45,767,691),8635=>array(71,45,751,691),8636=>array(49,255,781,540),8637=>array(49,87,781,372),8638=>array(361,0,646,732),8639=>array(193,0,478,732),8640=>array(57,255,789,540),8641=>array(57,87,789,372),8642=>array(361,0,646,732),8643=>array(193,0,478,732),8644=>array(49,-59,789,686),8645=>array(47,-3,792,732),8646=>array(49,-59,789,686),8647=>array(49,-59,781,686),8648=>array(46,0,792,732),8649=>array(57,-59,789,686),8650=>array(46,-3,792,729),8651=>array(49,-5,789,632),8652=>array(49,-5,789,632),8653=>array(49,87,781,540),8654=>array(49,87,789,540),8655=>array(57,87,789,540),8656=>array(49,87,781,540),8657=>array(193,0,645,732),8658=>array(57,87,789,540),8659=>array(193,-3,645,729),8660=>array(49,87,789,540),8661=>array(193,-8,645,732),8662=>array(132,-26,755,596),8663=>array(88,-26,711,597),8664=>array(88,16,711,639),8665=>array(132,16,755,639),8666=>array(49,87,781,540),8667=>array(57,87,789,540),8668=>array(44,87,776,540),8669=>array(57,87,789,540),8670=>array(193,0,646,732),8671=>array(193,-3,646,729),8672=>array(49,87,781,540),8673=>array(193,0,646,732),8674=>array(57,87,789,540),8675=>array(193,-3,646,729),8676=>array(49,87,781,540),8677=>array(57,87,789,540),8678=>array(27,46,781,581),8679=>array(151,0,687,754),8680=>array(35,46,789,581),8681=>array(151,-25,687,729),8682=>array(151,0,687,754),8683=>array(151,0,687,754),8684=>array(151,0,687,754),8685=>array(151,0,687,754),8686=>array(151,0,687,754),8687=>array(151,0,687,754),8688=>array(35,46,789,581),8689=>array(60,0,788,729),8690=>array(60,0,788,729),8691=>array(151,-25,687,754),8692=>array(57,87,789,540),8693=>array(47,-3,792,732),8694=>array(57,-223,789,850),8695=>array(49,87,781,540),8696=>array(57,87,789,540),8697=>array(49,87,789,540),8698=>array(49,87,781,540),8699=>array(57,87,789,540),8700=>array(49,87,789,540),8701=>array(27,96,781,531),8702=>array(57,96,811,531),8703=>array(27,96,811,531),8704=>array(5,0,769,729),8705=>array(48,-14,629,742),8706=>array(29,-14,515,674),8707=>array(92,0,610,729),8708=>array(92,-46,610,775),8709=>array(47,-15,810,715),8710=>array(0,0,697,719),8711=>array(0,0,697,719),8712=>array(73,-2,824,730),8713=>array(73,-46,824,775),8714=>array(106,58,644,568),8715=>array(73,-2,824,730),8716=>array(73,-46,824,775),8717=>array(106,58,644,568),8718=>array(98,0,539,553),8719=>array(73,-192,712,719),8720=>array(73,-193,712,718),8721=>array(20,-192,697,719),8722=>array(106,256,732,371),8723=>array(106,0,732,627),8724=>array(49,0,647,729),8725=>array(0,-93,365,729),8726=>array(165,-49,530,772),8727=>array(118,0,720,626),8728=>array(150,151,475,477),8729=>array(102,253,278,442),8730=>array(37,-20,669,837),8731=>array(37,-20,669,933),8732=>array(36,-20,669,924),8733=>array(92,89,617,505),8734=>array(92,89,741,505),8735=>array(106,67,732,693),8736=>array(77,0,820,729),8737=>array(77,-44,820,729),8738=>array(116,-0,732,726),8739=>array(207,-207,322,773),8740=>array(48,-207,482,773),8741=>array(112,-207,417,773),8742=>array(48,-207,482,773),8743=>array(151,0,661,579),8744=>array(151,0,661,579),8745=>array(151,0,661,579),8746=>array(151,0,661,579),8747=>array(15,-227,548,754),8748=>array(15,-227,914,754),8749=>array(15,-227,1280,754),8750=>array(14,-227,548,754),8751=>array(38,-227,938,754),8752=>array(23,-227,1290,754),8753=>array(15,-227,616,754),8754=>array(14,-227,600,754),8755=>array(14,-227,588,754),8756=>array(60,78,637,647),8757=>array(60,78,637,647),8758=>array(59,79,235,647),8759=>array(60,78,637,647),8760=>array(106,256,732,631),8761=>array(106,45,800,584),8762=>array(106,-4,732,631),8763=>array(106,-34,732,660),8764=>array(106,212,732,415),8765=>array(106,212,732,415),8766=>array(65,131,772,497),8767=>array(106,42,732,584),8768=>array(85,0,289,626),8769=>array(106,76,732,551),8770=>array(106,110,732,482),8771=>array(106,144,732,517),8772=>array(106,0,732,637),8773=>array(106,37,732,628),8774=>array(106,-31,732,628),8775=>array(106,-86,732,726),8776=>array(106,110,732,517),8777=>array(106,8,732,614),8778=>array(106,37,732,628),8779=>array(106,-13,732,628),8780=>array(106,37,732,628),8781=>array(105,105,732,585),8782=>array(106,26,732,656),8783=>array(106,172,732,656),8784=>array(106,144,732,744),8785=>array(106,-117,732,743),8786=>array(105,-92,732,719),8787=>array(104,-92,731,719),8788=>array(98,102,965,520),8789=>array(96,102,966,520),8790=>array(106,144,732,482),8791=>array(106,144,732,839),8792=>array(106,144,732,704),8793=>array(106,144,732,840),8794=>array(106,144,732,840),8795=>array(106,144,732,959),8796=>array(106,144,732,952),8797=>array(106,144,732,762),8798=>array(106,144,732,786),8799=>array(106,144,732,903),8800=>array(106,-5,732,631),8801=>array(106,38,732,588),8802=>array(106,-69,732,695),8803=>array(106,-74,732,700),8804=>array(106,0,732,582),8805=>array(106,0,732,582),8806=>array(106,-106,732,617),8807=>array(106,-106,732,617),8808=>array(106,-185,732,617),8809=>array(106,-185,732,617),8810=>array(72,-34,974,660),8811=>array(72,-34,974,660),8812=>array(86,-132,414,759),8813=>array(105,-10,732,700),8814=>array(106,-4,732,690),8815=>array(106,-63,732,631),8816=>array(106,-112,732,645),8817=>array(106,-112,732,645),8818=>array(106,-84,732,582),8819=>array(106,-84,732,582),8820=>array(106,-112,732,645),8821=>array(106,-112,732,645),8822=>array(102,-119,732,678),8823=>array(102,-119,732,678),8824=>array(102,-221,732,779),8825=>array(102,-221,732,779),8826=>array(106,-55,732,681),8827=>array(106,-55,732,681),8828=>array(106,-177,732,684),8829=>array(106,-177,732,684),8830=>array(106,-132,732,684),8831=>array(106,-132,732,684),8832=>array(106,-89,732,781),8833=>array(106,-89,732,781),8834=>array(99,67,739,559),8835=>array(99,65,739,559),8836=>array(99,-96,739,726),8837=>array(99,-100,739,722),8838=>array(99,0,739,636),8839=>array(99,0,739,635),8840=>array(99,-124,739,759),8841=>array(99,-124,739,759),8842=>array(99,-97,739,636),8843=>array(99,-97,739,635),8844=>array(151,0,661,579),8845=>array(151,0,661,579),8846=>array(151,0,661,579),8847=>array(106,0,732,584),8848=>array(106,0,732,584),8849=>array(106,-115,732,667),8850=>array(106,-115,732,667),8851=>array(106,0,690,626),8852=>array(106,0,690,626),8853=>array(91,-14,747,643),8854=>array(91,-14,747,643),8855=>array(91,-14,747,643),8856=>array(91,-13,747,642),8857=>array(91,-14,747,643),8858=>array(91,-14,747,643),8859=>array(91,-14,747,643),8860=>array(91,-14,747,643),8861=>array(91,-14,747,643),8862=>array(77,-29,761,657),8863=>array(77,-29,761,657),8864=>array(77,-29,761,657),8865=>array(77,-29,761,657),8866=>array(85,0,829,705),8867=>array(85,0,829,705),8868=>array(85,0,829,705),8869=>array(85,0,829,705),8870=>array(85,0,457,705),8871=>array(85,0,457,705),8872=>array(85,0,829,705),8873=>array(85,0,829,705),8874=>array(85,0,829,705),8875=>array(85,0,829,705),8876=>array(85,-100,829,805),8877=>array(85,-100,829,805),8878=>array(85,-100,829,805),8879=>array(85,-100,829,805),8880=>array(106,-54,724,681),8881=>array(114,-54,732,681),8882=>array(106,-1,732,628),8883=>array(106,-1,732,628),8884=>array(106,-80,732,706),8885=>array(106,-80,732,706),8886=>array(60,151,940,477),8887=>array(60,151,940,477),8888=>array(60,151,778,477),8889=>array(43,-63,794,689),8890=>array(63,0,480,705),8891=>array(103,0,709,759),8892=>array(103,0,709,759),8893=>array(103,0,709,759),8894=>array(106,0,732,626),8895=>array(106,0,732,626),8896=>array(0,-192,843,719),8897=>array(0,-192,843,719),8898=>array(48,-192,794,719),8899=>array(48,-192,794,719),8900=>array(3,-233,491,807),8901=>array(102,253,278,442),8902=>array(83,112,543,549),8903=>array(106,-56,732,683),8904=>array(106,-48,894,674),8905=>array(106,-48,894,675),8906=>array(106,-48,894,675),8907=>array(106,-48,894,675),8908=>array(106,-48,894,675),8909=>array(106,144,732,517),8910=>array(49,0,763,579),8911=>array(49,0,763,579),8912=>array(93,-22,732,649),8913=>array(106,-22,745,649),8914=>array(83,0,755,639),8915=>array(83,-14,755,625),8916=>array(186,0,652,729),8917=>array(106,-100,732,729),8918=>array(106,30,732,597),8919=>array(106,30,732,597),8920=>array(72,-34,1350,660),8921=>array(72,-34,1350,660),8922=>array(106,-211,732,837),8923=>array(106,-211,732,837),8924=>array(106,0,732,582),8925=>array(106,0,732,582),8926=>array(106,-177,732,684),8927=>array(106,-177,732,684),8928=>array(106,-197,732,808),8929=>array(106,-263,732,742),8930=>array(106,-191,732,817),8931=>array(106,-191,732,817),8932=>array(106,-146,732,636),8933=>array(106,-146,732,636),8934=>array(106,-168,732,582),8935=>array(106,-168,732,582),8936=>array(106,-216,732,684),8937=>array(106,-216,732,684),8938=>array(106,-138,732,808),8939=>array(106,-138,732,808),8940=>array(106,-224,732,894),8941=>array(106,-224,732,894),8942=>array(412,-40,588,735),8943=>array(79,253,921,442),8944=>array(79,-40,921,735),8945=>array(79,-40,921,735),8946=>array(72,-2,1085,730),8947=>array(73,-2,824,730),8948=>array(106,58,644,568),8949=>array(73,-2,824,984),8950=>array(73,-2,824,919),8951=>array(106,58,644,741),8952=>array(73,-207,824,730),8953=>array(73,-2,824,730),8954=>array(72,-2,1085,730),8955=>array(73,-2,824,730),8956=>array(106,58,644,568),8957=>array(72,-2,824,919),8958=>array(106,58,644,741),8959=>array(106,0,791,732),8960=>array(31,-22,572,519),8961=>array(56,152,540,453),8962=>array(64,0,651,596),8963=>array(193,470,646,732),8964=>array(193,0,646,263),8965=>array(193,-12,646,423),8966=>array(193,-12,646,552),8967=>array(139,-39,349,798),8968=>array(86,-132,389,760),8969=>array(68,-132,371,760),8970=>array(86,-132,389,760),8971=>array(68,-132,371,760),8972=>array(352,-77,759,331),8973=>array(49,-77,457,331),8974=>array(352,226,759,634),8975=>array(49,226,457,634),8976=>array(106,140,732,444),8977=>array(3,113,536,646),8984=>array(84,0,843,759),8985=>array(106,140,732,444),8988=>array(86,425,403,760),8989=>array(65,425,383,760),8990=>array(86,-126,403,208),8991=>array(65,-126,383,208),8992=>array(235,-250,586,926),8993=>array(22,-240,373,940),8996=>array(76,215,1076,575),8997=>array(76,0,1076,575),8998=>array(76,0,1414,760),8999=>array(76,0,1076,760),9000=>array(59,0,1385,729),9003=>array(0,0,1338,760),9004=>array(73,-91,800,748),9075=>array(78,-19,348,547),9076=>array(84,-208,671,562),9077=>array(43,-13,826,547),9082=>array(48,-13,645,559),9085=>array(13,-228,850,99),9095=>array(76,0,1100,743),9108=>array(17,0,856,727),9115=>array(63,-252,438,928),9116=>array(63,-252,205,940),9117=>array(63,-240,438,940),9118=>array(63,-252,438,928),9119=>array(295,-252,438,940),9120=>array(63,-240,438,940),9121=>array(63,-252,438,928),9122=>array(63,-252,205,940),9123=>array(63,-240,438,940),9124=>array(63,-252,438,928),9125=>array(295,-252,438,940),9126=>array(63,-240,438,940),9127=>array(306,-261,668,928),9128=>array(82,-247,444,934),9129=>array(306,-240,668,934),9130=>array(306,-256,444,934),9131=>array(82,-261,444,928),9132=>array(306,-247,668,934),9133=>array(82,-240,444,934),9134=>array(235,-250,373,940),9166=>array(27,46,781,729),9167=>array(91,0,854,596),9187=>array(73,-91,800,748),9189=>array(3,75,766,444),9192=>array(39,-129,665,294),9250=>array(-81,-14,671,760),9251=>array(64,-228,651,99),9312=>array(59,-15,788,715),9313=>array(59,-15,788,715),9314=>array(59,-15,788,715),9315=>array(59,-15,788,715),9316=>array(59,-15,788,715),9317=>array(59,-15,788,715),9318=>array(59,-15,788,715),9319=>array(59,-15,788,715),9320=>array(59,-15,788,715),9321=>array(59,-15,788,715),9600=>array(-10,260,779,770),9601=>array(-10,-250,779,-123),9602=>array(-10,-250,779,-5),9603=>array(-10,-250,779,132),9604=>array(-10,-250,779,260),9605=>array(-10,-250,779,387),9606=>array(-10,-250,779,515),9607=>array(-10,-250,779,642),9608=>array(-10,-250,779,770),9609=>array(-10,-250,680,770),9610=>array(-10,-250,582,770),9611=>array(-10,-250,483,770),9612=>array(-10,-250,384,770),9613=>array(-10,-250,286,770),9614=>array(-10,-250,187,770),9615=>array(-10,-250,88,770),9616=>array(384,-250,778,770),9617=>array(-10,-250,680,770),9618=>array(-10,-250,779,770),9619=>array(-10,-250,779,770),9620=>array(-10,642,779,770),9621=>array(680,-250,778,770),9622=>array(-10,-250,385,260),9623=>array(384,-250,779,260),9624=>array(-10,260,385,770),9625=>array(-10,-250,779,770),9626=>array(-10,-250,779,770),9627=>array(-10,-250,779,770),9628=>array(-10,-250,779,770),9629=>array(384,260,779,770),9630=>array(-10,-250,779,770),9631=>array(-10,-250,779,770),9632=>array(91,-124,854,643),9633=>array(91,-124,854,643),9634=>array(91,-124,854,643),9635=>array(91,-124,854,643),9636=>array(91,-124,854,643),9637=>array(91,-124,854,643),9638=>array(91,-124,854,643),9639=>array(91,-124,854,643),9640=>array(91,-124,854,643),9641=>array(91,-124,854,643),9642=>array(91,11,587,509),9643=>array(91,11,587,509),9644=>array(91,75,854,444),9645=>array(91,75,854,444),9646=>array(91,-122,459,642),9647=>array(91,-122,459,642),9648=>array(3,75,766,444),9649=>array(3,75,766,444),9650=>array(3,-124,766,643),9651=>array(3,-124,766,643),9652=>array(3,11,499,509),9653=>array(3,11,499,509),9654=>array(3,-124,766,643),9655=>array(3,-124,766,643),9656=>array(3,11,499,509),9657=>array(3,11,499,509),9658=>array(3,11,766,509),9659=>array(3,11,766,509),9660=>array(3,-124,766,643),9661=>array(3,-124,766,643),9662=>array(3,11,499,509),9663=>array(3,11,499,509),9664=>array(3,-124,766,643),9665=>array(3,-124,766,643),9666=>array(3,11,499,509),9667=>array(3,11,499,509),9668=>array(3,11,766,509),9669=>array(3,11,766,509),9670=>array(3,-124,766,643),9671=>array(3,-124,766,643),9672=>array(3,-124,766,643),9673=>array(55,-125,818,645),9674=>array(3,-233,491,807),9675=>array(55,-125,818,645),9676=>array(56,-125,817,644),9677=>array(55,-125,818,645),9678=>array(55,-125,818,645),9679=>array(55,-123,818,641),9680=>array(55,-123,818,641),9681=>array(55,-123,818,641),9682=>array(55,-123,818,641),9683=>array(55,-123,818,641),9684=>array(55,-123,818,641),9685=>array(55,-123,818,641),9686=>array(55,-125,436,645),9687=>array(91,-125,472,645),9688=>array(91,-10,750,770),9689=>array(91,-250,879,770),9690=>array(91,260,879,770),9691=>array(91,-250,879,260),9692=>array(3,260,385,645),9693=>array(3,260,384,645),9694=>array(3,-125,384,260),9695=>array(3,-125,385,260),9696=>array(3,260,766,645),9697=>array(3,-125,766,260),9698=>array(3,-124,766,643),9699=>array(3,-124,766,643),9700=>array(3,-124,766,643),9701=>array(3,-124,766,643),9702=>array(144,196,495,547),9703=>array(91,-124,854,643),9704=>array(91,-124,854,643),9705=>array(91,-124,854,643),9706=>array(91,-124,854,643),9707=>array(91,-124,854,643),9708=>array(3,-124,766,643),9709=>array(3,-124,766,643),9710=>array(3,-124,766,643),9711=>array(55,-250,1064,770),9712=>array(91,-124,854,643),9713=>array(91,-124,854,643),9714=>array(91,-124,854,643),9715=>array(91,-124,854,643),9716=>array(55,-123,818,641),9717=>array(55,-123,818,641),9718=>array(55,-123,818,641),9719=>array(55,-123,818,641),9720=>array(3,-124,766,643),9721=>array(3,-124,766,643),9722=>array(3,-124,766,643),9723=>array(91,-66,739,585),9724=>array(91,-66,739,585),9725=>array(91,-17,642,537),9726=>array(91,-17,642,537),9727=>array(3,-124,766,643),9728=>array(83,0,813,729),9729=>array(51,-2,949,360),9730=>array(49,0,848,729),9731=>array(83,-0,813,927),9732=>array(64,0,833,880),9733=>array(65,-4,832,723),9734=>array(65,-4,832,723),9735=>array(83,2,490,729),9736=>array(83,0,813,731),9737=>array(83,0,813,730),9738=>array(61,0,828,727),9739=>array(61,0,828,723),9740=>array(61,-1,610,722),9741=>array(61,0,952,723),9742=>array(68,0,1177,729),9743=>array(71,0,1180,729),9744=>array(90,0,807,729),9745=>array(89,0,808,729),9746=>array(89,0,808,729),9747=>array(75,78,457,656),9748=>array(49,0,870,933),9749=>array(74,0,822,731),9750=>array(84,0,813,731),9751=>array(84,0,813,727),9752=>array(78,0,819,729),9753=>array(83,140,813,574),9754=>array(84,113,813,569),9755=>array(84,113,813,569),9756=>array(87,104,810,569),9757=>array(72,0,537,724),9758=>array(86,103,810,569),9759=>array(72,-3,537,720),9760=>array(61,0,835,730),9761=>array(84,0,813,730),9762=>array(83,0,813,730),9763=>array(49,0,848,730),9764=>array(49,-2,620,727),9765=>array(83,0,663,731),9766=>array(83,-1,566,731),9767=>array(83,0,701,911),9768=>array(83,0,462,730),9769=>array(83,-1,813,729),9770=>array(87,0,810,730),9771=>array(83,0,814,731),9772=>array(83,0,627,731),9773=>array(83,0,813,730),9774=>array(83,0,813,730),9775=>array(83,0,813,730),9776=>array(83,0,813,729),9777=>array(83,0,814,729),9778=>array(83,0,813,729),9779=>array(83,0,813,729),9780=>array(83,0,813,729),9781=>array(83,0,813,729),9782=>array(83,0,813,729),9783=>array(83,0,813,729),9784=>array(80,3,817,721),9785=>array(83,-73,959,804),9786=>array(83,-73,959,804),9787=>array(83,-73,959,804),9788=>array(83,0,813,730),9789=>array(358,0,814,730),9790=>array(83,0,539,730),9791=>array(85,-102,528,732),9792=>array(85,-125,647,731),9793=>array(85,-14,647,843),9794=>array(79,-14,831,720),9795=>array(166,0,730,730),9796=>array(219,0,677,730),9797=>array(121,0,774,730),9798=>array(127,0,769,730),9799=>array(240,0,656,730),9800=>array(45,0,851,731),9801=>array(89,0,807,730),9802=>array(94,0,802,731),9803=>array(113,31,784,679),9804=>array(140,0,756,730),9805=>array(53,-180,843,730),9806=>array(83,52,813,653),9807=>array(34,-96,863,730),9808=>array(83,-0,813,730),9809=>array(94,0,802,730),9810=>array(86,153,810,579),9811=>array(157,0,739,730),9812=>array(98,0,798,730),9813=>array(110,0,786,730),9814=>array(167,-1,729,729),9815=>array(214,0,683,730),9816=>array(165,0,732,730),9817=>array(148,-0,748,730),9818=>array(98,0,798,730),9819=>array(110,0,786,730),9820=>array(167,-1,729,729),9821=>array(214,0,683,730),9822=>array(162,0,734,730),9823=>array(148,-0,748,730),9824=>array(158,0,738,729),9825=>array(90,0,806,727),9826=>array(168,0,728,729),9827=>array(111,0,785,729),9828=>array(157,0,739,729),9829=>array(89,0,808,729),9830=>array(168,0,728,729),9831=>array(111,0,785,732),9832=>array(105,-1,791,729),9833=>array(84,-5,339,729),9834=>array(84,-5,554,729),9835=>array(184,-102,712,729),9836=>array(92,-5,804,729),9837=>array(88,-3,392,731),9838=>array(84,0,273,731),9839=>array(84,0,400,731),9840=>array(84,0,664,731),9841=>array(64,0,701,731),9842=>array(84,0,813,709),9843=>array(76,16,820,731),9844=>array(76,16,820,731),9845=>array(76,16,820,731),9846=>array(76,16,820,731),9847=>array(76,16,820,731),9848=>array(76,16,820,731),9849=>array(76,16,820,731),9850=>array(76,16,820,731),9851=>array(84,0,812,704),9852=>array(83,0,814,731),9853=>array(83,0,814,731),9854=>array(83,0,814,731),9855=>array(149,1,747,731),9856=>array(73,0,797,725),9857=>array(73,0,797,725),9858=>array(73,0,797,725),9859=>array(73,0,797,725),9860=>array(73,0,797,725),9861=>array(73,0,797,725),9862=>array(83,0,813,731),9863=>array(83,0,813,731),9864=>array(83,0,813,731),9865=>array(83,0,813,731),9866=>array(83,0,813,98),9867=>array(83,0,813,98),9868=>array(83,0,813,413),9869=>array(83,0,813,413),9870=>array(83,0,813,413),9871=>array(83,0,813,413),9872=>array(168,3,728,731),9873=>array(168,3,728,731),9874=>array(52,0,844,731),9875=>array(97,-10,799,732),9876=>array(131,0,765,729),9877=>array(61,-10,479,732),9878=>array(59,-10,837,732),9879=>array(61,0,835,732),9880=>array(145,0,750,732),9881=>array(95,-17,802,727),9882=>array(128,-9,768,733),9883=>array(127,0,769,728),9884=>array(127,0,769,729),9888=>array(49,0,848,729),9889=>array(83,2,619,730),9890=>array(85,-125,919,731),9891=>array(79,-206,1023,720),9892=>array(85,-186,1109,856),9893=>array(85,-125,837,917),9894=>array(131,-14,727,869),9895=>array(101,-170,741,884),9896=>array(188,-14,650,869),9897=>array(4,133,829,596),9898=>array(188,133,650,597),9899=>array(188,133,650,597),9900=>array(249,194,589,536),9901=>array(175,194,663,536),9902=>array(41,169,797,560),9903=>array(5,194,833,536),9904=>array(103,237,757,540),9905=>array(211,42,626,698),9906=>array(85,-125,647,731),9907=>array(168,-125,646,731),9908=>array(86,-125,646,731),9909=>array(86,-125,646,731),9910=>array(59,-118,791,643),9911=>array(194,-104,595,710),9912=>array(158,-125,543,731),9920=>array(42,4,796,553),9921=>array(42,4,796,724),9922=>array(42,4,796,553),9923=>array(42,4,796,724),9954=>array(85,-14,647,843),9985=>array(11,190,803,635),9986=>array(42,141,784,588),9987=>array(11,94,803,539),9988=>array(36,119,824,613),9990=>array(42,-14,796,742),9991=>array(42,-14,796,742),9992=>array(59,21,782,708),9993=>array(64,107,773,622),9996=>array(212,0,561,742),9997=>array(21,83,802,678),9998=>array(89,75,724,710),9999=>array(26,198,819,530),10000=>array(89,75,724,710),10001=>array(43,185,757,544),10002=>array(67,209,757,520),10003=>array(150,97,667,630),10004=>array(116,87,721,631),10005=>array(126,72,711,657),10006=>array(85,31,752,698),10007=>array(118,-9,701,732),10008=>array(123,0,754,739),10009=>array(55,0,783,729),10010=>array(55,0,783,729),10011=>array(55,0,783,729),10012=>array(55,0,783,729),10013=>array(165,0,673,729),10014=>array(131,0,678,729),10015=>array(155,0,683,729),10016=>array(55,0,783,729),10017=>array(91,-13,747,744),10018=>array(41,-14,797,742),10019=>array(42,-12,796,742),10020=>array(41,-14,797,742),10021=>array(41,-13,797,743),10022=>array(42,-14,796,745),10023=>array(42,-14,796,745),10025=>array(23,-9,814,743),10026=>array(42,-14,796,742),10027=>array(23,-9,814,743),10028=>array(23,-9,814,743),10029=>array(23,-9,814,743),10030=>array(23,-9,814,743),10031=>array(23,-9,814,743),10032=>array(24,12,815,714),10033=>array(64,0,773,729),10034=>array(74,0,764,729),10035=>array(55,0,783,729),10036=>array(31,-14,787,742),10037=>array(41,-14,797,742),10038=>array(91,-14,747,742),10039=>array(41,-14,797,742),10040=>array(41,-14,797,742),10041=>array(41,-14,797,742),10042=>array(55,0,783,729),10043=>array(82,-14,756,742),10044=>array(82,-14,756,742),10045=>array(84,-14,753,742),10046=>array(79,-14,759,742),10047=>array(54,0,784,709),10048=>array(54,0,784,709),10049=>array(41,-14,797,742),10050=>array(42,-14,796,742),10051=>array(79,-14,759,742),10052=>array(89,0,749,729),10053=>array(76,0,762,729),10054=>array(63,2,773,729),10055=>array(79,-13,759,742),10056=>array(47,-13,791,730),10057=>array(47,-13,791,730),10058=>array(41,-13,797,743),10059=>array(41,-13,797,743),10061=>array(50,-10,847,738),10063=>array(60,-49,837,729),10064=>array(60,0,837,777),10065=>array(60,-49,837,729),10066=>array(60,0,837,777),10070=>array(83,-2,813,728),10072=>array(377,-240,460,760),10073=>array(336,-240,502,760),10074=>array(253,-240,585,760),10075=>array(85,395,288,729),10076=>array(59,395,262,729),10077=>array(85,395,528,729),10078=>array(59,395,502,729),10081=>array(155,-93,772,851),10082=>array(202,-17,636,742),10083=>array(163,-17,675,742),10084=>array(54,83,784,645),10085=>array(168,-1,729,729),10086=>array(62,21,724,702),10087=>array(78,169,759,564),10088=>array(196,-139,648,769),10089=>array(196,-139,648,769),10090=>array(264,-132,574,758),10091=>array(264,-132,574,758),10092=>array(215,-240,607,760),10093=>array(232,-240,623,760),10094=>array(142,-240,685,760),10095=>array(153,-240,696,760),10096=>array(167,-240,656,760),10097=>array(183,-240,672,760),10098=>array(346,-241,535,760),10099=>array(303,-241,492,760),10100=>array(175,-163,634,760),10101=>array(204,-163,663,760),10102=>array(59,-15,788,715),10103=>array(59,-15,788,715),10104=>array(59,-15,788,715),10105=>array(59,-15,788,715),10106=>array(59,-15,788,715),10107=>array(59,-15,788,715),10108=>array(59,-15,788,715),10109=>array(59,-15,788,715),10110=>array(59,-15,788,715),10111=>array(59,-15,788,715),10112=>array(4,-52,833,780),10113=>array(4,-52,833,780),10114=>array(4,-52,833,780),10115=>array(4,-52,833,780),10116=>array(4,-52,833,780),10117=>array(4,-52,833,780),10118=>array(4,-52,833,780),10119=>array(4,-52,833,780),10120=>array(4,-52,833,780),10121=>array(4,-52,833,780),10122=>array(4,-52,833,780),10123=>array(4,-52,833,780),10124=>array(4,-52,833,780),10125=>array(4,-52,833,780),10126=>array(4,-52,833,780),10127=>array(4,-52,833,780),10128=>array(4,-52,833,780),10129=>array(4,-52,833,780),10130=>array(4,-52,833,780),10131=>array(4,-52,833,780),10132=>array(57,75,789,552),10136=>array(123,55,682,614),10137=>array(57,100,789,527),10138=>array(123,13,682,572),10139=>array(57,129,789,498),10140=>array(57,57,764,570),10141=>array(57,100,789,527),10142=>array(57,100,789,527),10143=>array(57,100,789,527),10144=>array(57,100,789,527),10145=>array(57,46,811,581),10146=>array(111,94,789,533),10147=>array(111,94,789,533),10148=>array(111,-4,789,631),10149=>array(57,100,789,548),10150=>array(57,79,789,527),10151=>array(240,-7,606,634),10152=>array(57,100,789,527),10153=>array(57,75,765,552),10154=>array(57,75,765,552),10155=>array(21,12,794,586),10156=>array(21,12,794,586),10157=>array(135,0,774,574),10158=>array(135,0,774,574),10159=>array(62,49,799,574),10161=>array(62,49,799,574),10162=>array(154,-20,721,585),10163=>array(63,157,789,470),10164=>array(81,55,682,655),10165=>array(57,173,789,454),10166=>array(82,-29,682,572),10167=>array(82,55,682,655),10168=>array(57,172,789,455),10169=>array(82,-28,682,572),10170=>array(56,84,789,543),10171=>array(73,140,779,487),10172=>array(79,167,774,460),10173=>array(79,118,774,509),10174=>array(57,81,789,546),10181=>array(54,-163,405,769),10182=>array(52,-163,403,769),10208=>array(3,-233,491,807),10214=>array(86,-132,419,760),10215=>array(86,-132,419,760),10216=>array(104,-132,377,759),10217=>array(80,-132,353,759),10218=>array(104,-132,641,759),10219=>array(80,-132,616,759),10224=>array(41,0,797,732),10225=>array(42,-3,798,729),10226=>array(9,45,816,685),10227=>array(22,45,830,685),10228=>array(57,-14,1108,643),10229=>array(49,87,1376,540),10230=>array(57,87,1385,540),10231=>array(49,87,1385,540),10232=>array(49,87,1376,540),10233=>array(57,87,1385,540),10234=>array(49,87,1385,540),10235=>array(49,87,1376,540),10236=>array(57,87,1385,540),10237=>array(49,87,1376,540),10238=>array(57,87,1385,540),10239=>array(57,87,1385,540),10241=>array(146,586,342,781),10242=>array(146,325,342,521),10243=>array(146,325,342,781),10244=>array(146,65,342,261),10245=>array(146,65,342,781),10246=>array(146,65,342,521),10247=>array(146,65,342,781),10248=>array(439,586,635,781),10249=>array(146,586,635,781),10250=>array(146,325,635,781),10251=>array(146,325,635,781),10252=>array(146,65,635,781),10253=>array(146,65,635,781),10254=>array(146,65,635,781),10255=>array(146,65,635,781),10256=>array(439,325,635,521),10257=>array(146,325,635,781),10258=>array(146,325,635,521),10259=>array(146,325,635,781),10260=>array(146,65,635,521),10261=>array(146,65,635,781),10262=>array(146,65,635,521),10263=>array(146,65,635,781),10264=>array(439,325,635,781),10265=>array(146,325,635,781),10266=>array(146,325,635,781),10267=>array(146,325,635,781),10268=>array(146,65,635,781),10269=>array(146,65,635,781),10270=>array(146,65,635,781),10271=>array(146,65,635,781),10272=>array(439,65,635,261),10273=>array(146,65,635,781),10274=>array(146,65,635,521),10275=>array(146,65,635,781),10276=>array(146,65,635,261),10277=>array(146,65,635,781),10278=>array(146,65,635,521),10279=>array(146,65,635,781),10280=>array(439,65,635,781),10281=>array(146,65,635,781),10282=>array(146,65,635,781),10283=>array(146,65,635,781),10284=>array(146,65,635,781),10285=>array(146,65,635,781),10286=>array(146,65,635,781),10287=>array(146,65,635,781),10288=>array(439,65,635,521),10289=>array(146,65,635,781),10290=>array(146,65,635,521),10291=>array(146,65,635,781),10292=>array(146,65,635,521),10293=>array(146,65,635,781),10294=>array(146,65,635,521),10295=>array(146,65,635,781),10296=>array(439,65,635,781),10297=>array(146,65,635,781),10298=>array(146,65,635,781),10299=>array(146,65,635,781),10300=>array(146,65,635,781),10301=>array(146,65,635,781),10302=>array(146,65,635,781),10303=>array(146,65,635,781),10304=>array(146,-195,342,0),10305=>array(146,-195,342,781),10306=>array(146,-195,342,521),10307=>array(146,-195,342,781),10308=>array(146,-195,342,261),10309=>array(146,-195,342,781),10310=>array(146,-195,342,521),10311=>array(146,-195,342,781),10312=>array(146,-195,635,781),10313=>array(146,-195,635,781),10314=>array(146,-195,635,781),10315=>array(146,-195,635,781),10316=>array(146,-195,635,781),10317=>array(146,-195,635,781),10318=>array(146,-195,635,781),10319=>array(146,-195,635,781),10320=>array(146,-195,635,521),10321=>array(146,-195,635,781),10322=>array(146,-195,635,521),10323=>array(146,-195,635,781),10324=>array(146,-195,635,521),10325=>array(146,-195,635,781),10326=>array(146,-195,635,521),10327=>array(146,-195,635,781),10328=>array(146,-195,635,781),10329=>array(146,-195,635,781),10330=>array(146,-195,635,781),10331=>array(146,-195,635,781),10332=>array(146,-195,635,781),10333=>array(146,-195,635,781),10334=>array(146,-195,635,781),10335=>array(146,-195,635,781),10336=>array(146,-195,635,261),10337=>array(146,-195,635,781),10338=>array(146,-195,635,521),10339=>array(146,-195,635,781),10340=>array(146,-195,635,261),10341=>array(146,-195,635,781),10342=>array(146,-195,635,521),10343=>array(146,-195,635,781),10344=>array(146,-195,635,781),10345=>array(146,-195,635,781),10346=>array(146,-195,635,781),10347=>array(146,-195,635,781),10348=>array(146,-195,635,781),10349=>array(146,-195,635,781),10350=>array(146,-195,635,781),10351=>array(146,-195,635,781),10352=>array(146,-195,635,521),10353=>array(146,-195,635,781),10354=>array(146,-195,635,521),10355=>array(146,-195,635,781),10356=>array(146,-195,635,521),10357=>array(146,-195,635,781),10358=>array(146,-195,635,521),10359=>array(146,-195,635,781),10360=>array(146,-195,635,781),10361=>array(146,-195,635,781),10362=>array(146,-195,635,781),10363=>array(146,-195,635,781),10364=>array(146,-195,635,781),10365=>array(146,-195,635,781),10366=>array(146,-195,635,781),10367=>array(146,-195,635,781),10368=>array(439,-195,635,0),10369=>array(146,-195,635,781),10370=>array(146,-195,635,521),10371=>array(146,-195,635,781),10372=>array(146,-195,635,261),10373=>array(146,-195,635,781),10374=>array(146,-195,635,521),10375=>array(146,-195,635,781),10376=>array(439,-195,635,781),10377=>array(146,-195,635,781),10378=>array(146,-195,635,781),10379=>array(146,-195,635,781),10380=>array(146,-195,635,781),10381=>array(146,-195,635,781),10382=>array(146,-195,635,781),10383=>array(146,-195,635,781),10384=>array(439,-195,635,521),10385=>array(146,-195,635,781),10386=>array(146,-195,635,521),10387=>array(146,-195,635,781),10388=>array(146,-195,635,521),10389=>array(146,-195,635,781),10390=>array(146,-195,635,521),10391=>array(146,-195,635,781),10392=>array(439,-195,635,781),10393=>array(146,-195,635,781),10394=>array(146,-195,635,781),10395=>array(146,-195,635,781),10396=>array(146,-195,635,781),10397=>array(146,-195,635,781),10398=>array(146,-195,635,781),10399=>array(146,-195,635,781),10400=>array(439,-195,635,261),10401=>array(146,-195,635,781),10402=>array(146,-195,635,521),10403=>array(146,-195,635,781),10404=>array(146,-195,635,261),10405=>array(146,-195,635,781),10406=>array(146,-195,635,521),10407=>array(146,-195,635,781),10408=>array(439,-195,635,781),10409=>array(146,-195,635,781),10410=>array(146,-195,635,781),10411=>array(146,-195,635,781),10412=>array(146,-195,635,781),10413=>array(146,-195,635,781),10414=>array(146,-195,635,781),10415=>array(146,-195,635,781),10416=>array(439,-195,635,521),10417=>array(146,-195,635,781),10418=>array(146,-195,635,521),10419=>array(146,-195,635,781),10420=>array(146,-195,635,521),10421=>array(146,-195,635,781),10422=>array(146,-195,635,521),10423=>array(146,-195,635,781),10424=>array(439,-195,635,781),10425=>array(146,-195,635,781),10426=>array(146,-195,635,781),10427=>array(146,-195,635,781),10428=>array(146,-195,635,781),10429=>array(146,-195,635,781),10430=>array(146,-195,635,781),10431=>array(146,-195,635,781),10432=>array(146,-195,635,0),10433=>array(146,-195,635,781),10434=>array(146,-195,635,521),10435=>array(146,-195,635,781),10436=>array(146,-195,635,261),10437=>array(146,-195,635,781),10438=>array(146,-195,635,521),10439=>array(146,-195,635,781),10440=>array(146,-195,635,781),10441=>array(146,-195,635,781),10442=>array(146,-195,635,781),10443=>array(146,-195,635,781),10444=>array(146,-195,635,781),10445=>array(146,-195,635,781),10446=>array(146,-195,635,781),10447=>array(146,-195,635,781),10448=>array(146,-195,635,521),10449=>array(146,-195,635,781),10450=>array(146,-195,635,521),10451=>array(146,-195,635,781),10452=>array(146,-195,635,521),10453=>array(146,-195,635,781),10454=>array(146,-195,635,521),10455=>array(146,-195,635,781),10456=>array(146,-195,635,781),10457=>array(146,-195,635,781),10458=>array(146,-195,635,781),10459=>array(146,-195,635,781),10460=>array(146,-195,635,781),10461=>array(146,-195,635,781),10462=>array(146,-195,635,781),10463=>array(146,-195,635,781),10464=>array(146,-195,635,261),10465=>array(146,-195,635,781),10466=>array(146,-195,635,521),10467=>array(146,-195,635,781),10468=>array(146,-195,635,261),10469=>array(146,-195,635,781),10470=>array(146,-195,635,521),10471=>array(146,-195,635,781),10472=>array(146,-195,635,781),10473=>array(146,-195,635,781),10474=>array(146,-195,635,781),10475=>array(146,-195,635,781),10476=>array(146,-195,635,781),10477=>array(146,-195,635,781),10478=>array(146,-195,635,781),10479=>array(146,-195,635,781),10480=>array(146,-195,635,521),10481=>array(146,-195,635,781),10482=>array(146,-195,635,521),10483=>array(146,-195,635,781),10484=>array(146,-195,635,521),10485=>array(146,-195,635,781),10486=>array(146,-195,635,521),10487=>array(146,-195,635,781),10488=>array(146,-195,635,781),10489=>array(146,-195,635,781),10490=>array(146,-195,635,781),10491=>array(146,-195,635,781),10492=>array(146,-195,635,781),10493=>array(146,-195,635,781),10494=>array(146,-195,635,781),10495=>array(146,-195,635,781),10502=>array(49,87,781,540),10503=>array(57,87,789,540),10506=>array(132,0,707,732),10507=>array(132,0,707,732),10560=>array(86,45,726,853),10561=>array(86,45,726,853),10627=>array(125,-163,628,760),10628=>array(125,-163,628,760),10702=>array(106,-258,732,800),10703=>array(106,-1,940,628),10704=>array(106,-1,940,628),10705=>array(106,-48,894,674),10706=>array(106,-48,894,674),10707=>array(106,-48,894,674),10708=>array(106,-48,894,675),10709=>array(106,-48,894,675),10731=>array(3,-233,491,807),10746=>array(106,0,732,627),10747=>array(106,0,732,627),10752=>array(28,-211,972,734),10753=>array(28,-211,972,734),10754=>array(28,-211,972,734),10764=>array(15,-227,1646,754),10765=>array(14,-227,548,754),10766=>array(14,-227,548,754),10767=>array(14,-227,548,754),10768=>array(14,-227,548,754),10769=>array(14,-227,576,754),10770=>array(14,-227,548,754),10771=>array(14,-227,548,754),10772=>array(14,-228,651,754),10773=>array(14,-227,548,754),10774=>array(14,-227,548,754),10775=>array(-30,-227,556,754),10776=>array(14,-227,548,754),10777=>array(14,-227,548,754),10778=>array(14,-227,548,754),10779=>array(15,-227,548,898),10780=>array(15,-372,548,754),10799=>array(125,20,713,607),10858=>array(106,212,732,660),10859=>array(106,-34,732,660),10877=>array(106,-150,732,632),10878=>array(106,-150,732,632),10879=>array(106,-150,732,632),10880=>array(106,-150,732,632),10881=>array(106,-150,732,688),10882=>array(106,-150,732,688),10883=>array(106,-150,732,827),10884=>array(106,-150,732,827),10885=>array(106,-217,732,630),10886=>array(106,-217,732,630),10887=>array(106,-124,732,582),10888=>array(106,-124,732,582),10889=>array(106,-281,732,630),10890=>array(106,-281,732,630),10891=>array(106,-303,732,814),10892=>array(106,-303,732,814),10893=>array(106,-183,732,653),10894=>array(106,-183,732,653),10895=>array(106,-245,732,765),10896=>array(106,-245,732,765),10897=>array(106,-278,732,782),10898=>array(106,-278,732,782),10899=>array(106,-263,732,771),10900=>array(106,-263,732,771),10901=>array(106,-50,732,733),10902=>array(106,-50,732,733),10903=>array(106,-50,732,733),10904=>array(106,-50,732,733),10905=>array(106,-45,732,678),10906=>array(106,-45,732,678),10907=>array(106,-81,732,724),10908=>array(106,-81,732,724),10909=>array(106,13,732,680),10910=>array(106,13,732,680),10911=>array(106,-239,732,746),10912=>array(106,-239,732,746),10926=>array(106,22,732,656),10927=>array(106,-83,732,684),10928=>array(106,-83,732,684),10929=>array(106,-246,732,684),10930=>array(106,-246,732,684),10931=>array(106,-205,732,672),10932=>array(106,-205,732,672),10933=>array(106,-304,732,672),10934=>array(106,-304,732,672),10935=>array(106,-252,732,713),10936=>array(106,-252,732,713),10937=>array(106,-316,732,713),10938=>array(106,-316,732,713),11001=>array(106,-195,732,609),11002=>array(106,-195,732,609),11008=>array(123,-23,744,598),11009=>array(94,-23,715,598),11010=>array(123,-23,744,598),11011=>array(94,-23,715,598),11012=>array(27,46,789,581),11013=>array(27,46,781,581),11014=>array(151,0,687,754),11015=>array(151,-25,687,729),11016=>array(123,-23,744,598),11017=>array(94,-23,715,598),11018=>array(123,-23,744,598),11019=>array(94,-23,715,598),11020=>array(27,46,789,581),11021=>array(151,-25,687,754),11022=>array(57,-25,800,372),11023=>array(57,255,800,652),11024=>array(38,-25,781,372),11025=>array(38,255,781,652),11026=>array(91,-124,854,643),11027=>array(91,-124,854,643),11028=>array(91,-124,854,643),11029=>array(91,-124,854,643),11030=>array(3,-124,766,643),11031=>array(3,-124,766,643),11032=>array(3,-124,766,643),11033=>array(3,-124,766,643),11034=>array(91,-124,854,643),11039=>array(18,-26,852,767),11040=>array(18,-26,852,767),11041=>array(73,-91,800,748),11042=>array(73,-91,800,748),11043=>array(17,-35,856,692),11044=>array(55,-250,1064,770),11091=>array(38,-47,832,788),11092=>array(38,-47,832,788),11360=>array(5,0,610,729),11361=>array(5,0,355,760),11362=>array(-17,0,610,729),11363=>array(6,0,692,729),11364=>array(92,-200,750,729),11365=>array(32,-46,639,594),11366=>array(13,-93,455,822),11367=>array(92,-157,932,729),11368=>array(84,-138,809,760),11369=>array(92,-157,805,729),11370=>array(84,-138,684,760),11371=>array(45,-157,768,729),11372=>array(45,-138,622,547),11373=>array(48,-14,769,741),11374=>array(92,-200,903,729),11375=>array(5,0,769,729),11376=>array(48,-14,769,741),11377=>array(15,0,778,560),11378=>array(30,0,1221,742),11379=>array(35,0,1056,560),11380=>array(38,0,637,586),11381=>array(92,0,606,729),11382=>array(84,0,481,547),11383=>array(64,0,725,552),11385=>array(84,-13,490,760),11386=>array(43,-14,644,560),11387=>array(78,0,467,547),11388=>array(-21,-121,166,425),11389=>array(3,326,484,734),11390=>array(72,-240,670,742),11391=>array(45,-240,680,729),11520=>array(45,-64,609,547),11521=>array(16,-232,625,546),11522=>array(41,-232,629,547),11523=>array(42,-10,585,807),11524=>array(40,-228,613,546),11525=>array(41,-228,988,546),11526=>array(20,-8,668,816),11527=>array(42,-9,974,547),11528=>array(39,0,589,547),11529=>array(41,-227,614,816),11530=>array(39,-9,985,546),11531=>array(42,-8,649,816),11532=>array(39,0,627,816),11533=>array(41,-8,988,546),11534=>array(41,-8,629,546),11535=>array(41,-228,846,816),11536=>array(42,-9,976,816),11537=>array(41,-9,630,816),11538=>array(46,-232,610,546),11539=>array(41,-228,984,661),11540=>array(45,-228,958,546),11541=>array(39,-228,978,816),11542=>array(44,0,628,546),11543=>array(41,-228,630,547),11544=>array(41,-232,627,546),11545=>array(44,-228,628,816),11546=>array(42,-232,610,547),11547=>array(43,-9,658,816),11548=>array(44,-228,989,547),11549=>array(44,-232,619,546),11550=>array(46,-232,639,546),11551=>array(44,-228,615,567),11552=>array(44,-9,1004,546),11553=>array(44,-228,619,816),11554=>array(42,-9,601,626),11555=>array(44,-228,622,816),11556=>array(42,-228,684,546),11557=>array(45,-8,959,816),11568=>array(55,-14,636,380),11569=>array(50,-14,892,742),11570=>array(50,-14,892,742),11571=>array(51,0,674,729),11572=>array(51,0,674,729),11573=>array(56,0,669,729),11574=>array(48,0,627,729),11575=>array(5,0,769,729),11576=>array(5,0,769,729),11577=>array(92,0,610,729),11578=>array(92,0,610,729),11579=>array(73,-14,729,742),11580=>array(73,0,916,729),11581=>array(92,0,754,729),11582=>array(92,0,549,729),11583=>array(92,0,754,729),11584=>array(50,-14,892,742),11585=>array(50,-84,892,815),11586=>array(92,0,281,729),11587=>array(21,0,720,729),11588=>array(92,0,745,729),11589=>array(-30,0,944,729),11590=>array(92,0,598,729),11591=>array(92,0,709,729),11592=>array(73,256,607,445),11593=>array(92,0,610,729),11594=>array(73,0,529,729),11595=>array(64,-14,892,742),11596=>array(82,0,695,729),11597=>array(92,0,745,729),11598=>array(92,0,610,729),11599=>array(92,0,280,729),11600=>array(82,0,695,729),11601=>array(92,0,281,729),11602=>array(42,-14,684,729),11603=>array(55,-14,636,742),11604=>array(50,-14,892,742),11605=>array(50,-95,892,742),11606=>array(92,0,745,729),11607=>array(92,0,281,729),11608=>array(92,0,744,729),11609=>array(50,-14,892,742),11610=>array(50,-14,892,823),11611=>array(50,-14,718,742),11612=>array(79,0,797,729),11613=>array(19,0,751,729),11614=>array(50,-14,718,742),11615=>array(92,0,610,729),11616=>array(5,0,769,729),11617=>array(92,0,745,729),11618=>array(92,0,599,729),11619=>array(50,0,800,729),11620=>array(92,0,654,729),11621=>array(50,0,800,729),11631=>array(64,490,651,729),11800=>array(69,-14,515,728),11807=>array(106,-34,732,415),11810=>array(86,403,389,760),11811=>array(68,403,371,760),11812=>array(86,-132,389,225),11813=>array(68,-132,371,225),11822=>array(69,0,515,742),19904=>array(83,-158,813,729),19905=>array(83,-158,813,729),19906=>array(83,-158,813,729),19907=>array(83,-158,813,729),19908=>array(83,-158,813,729),19909=>array(83,-158,813,729),19910=>array(83,-158,813,729),19911=>array(83,-158,813,729),19912=>array(83,-158,813,729),19913=>array(83,-158,814,729),19914=>array(83,-158,813,729),19915=>array(83,-158,813,729),19916=>array(83,-158,813,729),19917=>array(83,-158,813,729),19918=>array(83,-158,813,729),19919=>array(83,-158,813,729),19920=>array(83,-158,814,729),19921=>array(83,-158,813,729),19922=>array(83,-158,814,729),19923=>array(83,-158,813,729),19924=>array(83,-158,813,729),19925=>array(83,-158,813,729),19926=>array(83,-158,813,729),19927=>array(83,-158,813,729),19928=>array(83,-158,813,729),19929=>array(83,-158,813,729),19930=>array(83,-158,813,729),19931=>array(83,-158,814,729),19932=>array(83,-158,813,729),19933=>array(83,-158,813,729),19934=>array(83,-158,814,729),19935=>array(83,-158,813,729),19936=>array(83,-158,813,729),19937=>array(83,-158,813,729),19938=>array(83,-158,813,729),19939=>array(83,-158,813,729),19940=>array(83,-158,813,729),19941=>array(83,-158,814,729),19942=>array(83,-158,813,729),19943=>array(83,-158,813,729),19944=>array(83,-158,814,729),19945=>array(83,-158,813,729),19946=>array(83,-158,814,729),19947=>array(83,-158,813,729),19948=>array(83,-158,814,729),19949=>array(83,-158,813,729),19950=>array(83,-158,814,729),19951=>array(83,-158,813,729),19952=>array(83,-158,814,729),19953=>array(83,-158,813,729),19954=>array(83,-158,813,729),19955=>array(83,-158,813,729),19956=>array(83,-158,813,729),19957=>array(83,-158,814,729),19958=>array(83,-158,813,729),19959=>array(83,-158,813,729),19960=>array(83,-158,813,729),19961=>array(83,-158,814,729),19962=>array(83,-158,813,729),19963=>array(83,-158,814,729),19964=>array(83,-158,814,729),19965=>array(83,-158,813,729),19966=>array(83,-158,813,729),19967=>array(83,-158,813,729),42192=>array(92,0,692,729),42193=>array(92,0,692,729),42194=>array(41,0,641,729),42195=>array(92,0,778,729),42196=>array(5,0,677,729),42197=>array(5,0,677,729),42198=>array(50,-14,747,742),42199=>array(92,0,805,729),42200=>array(-30,0,683,729),42201=>array(0,-14,439,729),42202=>array(50,-14,670,742),42203=>array(50,-14,670,742),42204=>array(45,0,680,729),42205=>array(92,0,599,729),42206=>array(92,0,599,729),42207=>array(92,0,903,729),42208=>array(92,0,745,729),42209=>array(92,0,610,729),42210=>array(72,-14,647,742),42211=>array(92,0,750,729),42212=>array(20,0,678,729),42213=>array(5,0,769,729),42214=>array(5,0,769,729),42215=>array(92,0,745,729),42216=>array(25,-14,723,742),42217=>array(91,0,530,743),42218=>array(30,0,1072,729),42219=>array(19,0,751,729),42220=>array(-10,0,734,729),42221=>array(70,0,670,729),42222=>array(5,0,769,729),42223=>array(5,0,769,729),42224=>array(92,0,610,729),42225=>array(73,0,591,729),42226=>array(92,0,280,729),42227=>array(50,-14,800,742),42228=>array(92,-14,720,729),42229=>array(92,0,720,743),42230=>array(9,0,527,729),42231=>array(52,0,738,729),42232=>array(73,0,249,189),42233=>array(24,-142,249,189),42234=>array(73,0,601,189),42235=>array(73,-142,601,189),42236=>array(24,-142,249,547),42237=>array(73,0,249,547),42238=>array(73,0,515,405),42239=>array(73,134,515,492),42564=>array(26,-14,601,742),42565=>array(15,-14,511,560),42566=>array(92,0,428,729),42567=>array(83,0,356,547),42572=>array(57,-14,1348,654),42573=>array(47,-13,1126,547),42576=>array(49,0,1142,729),42577=>array(20,0,946,547),42580=>array(55,-14,1082,742),42581=>array(44,-14,888,560),42582=>array(92,0,1088,729),42583=>array(84,-14,880,560),42594=>array(60,-157,1058,729),42595=>array(56,-138,900,547),42596=>array(46,0,1069,729),42597=>array(55,0,888,547),42598=>array(92,0,1233,729),42599=>array(84,0,973,547),42600=>array(50,-14,800,742),42601=>array(43,-14,644,560),42602=>array(50,-14,987,742),42603=>array(43,-14,825,560),42604=>array(50,-14,1356,742),42605=>array(43,-14,1063,560),42606=>array(28,-208,933,743),42634=>array(5,-200,883,729),42635=>array(4,-216,709,547),42636=>array(5,0,677,729),42637=>array(4,0,575,547),42644=>array(81,0,716,729),42645=>array(84,0,634,760),42760=>array(96,0,404,693),42761=>array(96,0,404,693),42762=>array(96,0,404,693),42763=>array(96,0,404,693),42764=>array(96,0,404,693),42765=>array(96,0,404,693),42766=>array(96,0,404,693),42767=>array(96,0,404,693),42768=>array(96,0,404,693),42769=>array(96,0,404,693),42770=>array(96,0,404,693),42771=>array(96,0,404,693),42772=>array(96,0,404,693),42773=>array(96,0,404,693),42774=>array(96,0,404,693),42779=>array(58,326,342,736),42780=>array(58,324,342,734),42781=>array(88,326,199,734),42782=>array(88,326,199,734),42783=>array(88,0,199,408),42786=>array(67,0,409,729),42787=>array(67,0,355,547),42788=>array(56,224,479,742),42789=>array(56,42,479,560),42790=>array(92,-200,745,729),42791=>array(84,-216,634,760),42792=>array(5,-216,986,729),42793=>array(13,-215,810,702),42794=>array(67,-14,616,742),42795=>array(54,-202,493,560),42800=>array(92,0,473,547),42801=>array(52,-14,548,560),42802=>array(5,0,1344,729),42803=>array(43,-14,973,560),42804=>array(5,-14,1234,742),42805=>array(43,-14,1021,560),42806=>array(5,-14,1124,729),42807=>array(43,-14,970,560),42808=>array(5,0,1074,729),42809=>array(43,-14,907,560),42810=>array(5,0,1074,729),42811=>array(43,-14,907,560),42812=>array(5,-216,1030,729),42813=>array(43,-216,907,560),42814=>array(33,-14,653,742),42815=>array(43,-14,526,560),42816=>array(5,0,812,729),42817=>array(6,0,708,760),42822=>array(92,0,822,729),42823=>array(84,0,458,760),42824=>array(41,0,655,729),42825=>array(59,0,473,760),42826=>array(16,-14,902,742),42827=>array(5,-14,809,560),42830=>array(50,-14,1356,742),42831=>array(43,-14,1063,560),42832=>array(16,0,692,729),42833=>array(5,-208,671,560),42834=>array(34,0,907,729),42835=>array(34,-208,892,560),42838=>array(50,-188,800,742),42839=>array(45,-208,711,559),42852=>array(16,0,692,729),42853=>array(5,-208,671,760),42854=>array(16,0,692,729),42855=>array(5,-208,671,760),42880=>array(27,0,545,729),42881=>array(84,-208,259,547),42882=>array(84,-208,730,742),42883=>array(84,-208,634,560),42889=>array(112,0,288,547),42890=>array(83,141,303,405),42891=>array(140,245,316,729),42892=>array(95,458,211,729),42893=>array(81,0,716,729),42894=>array(84,-216,680,760),42896=>array(92,-157,868,729),42897=>array(84,-138,725,560),42912=>array(-11,-14,832,742),42913=>array(-11,-216,727,559),42914=>array(-11,0,805,729),42915=>array(-11,0,684,760),42916=>array(-11,0,848,729),42917=>array(-11,0,723,560),42918=>array(-11,0,781,729),42919=>array(-11,0,504,560),42920=>array(-11,-14,731,742),42921=>array(-11,-14,606,560),42922=>array(-68,0,794,729),43002=>array(84,0,972,547),43003=>array(84,0,591,729),43004=>array(41,0,641,729),43005=>array(92,0,903,729),43006=>array(92,0,280,928),43007=>array(31,0,1294,729),61184=>array(91,602,317,693),61185=>array(48,451,338,693),61186=>array(26,301,363,693),61187=>array(17,150,373,693),61188=>array(13,0,378,693),61189=>array(48,451,338,693),61190=>array(91,451,317,543),61191=>array(48,301,338,543),61192=>array(26,150,363,543),61193=>array(17,0,373,543),61194=>array(26,301,363,693),61195=>array(48,301,338,543),61196=>array(91,301,317,393),61197=>array(48,150,338,393),61198=>array(26,0,363,393),61199=>array(17,150,373,693),61200=>array(26,149,363,542),61201=>array(48,150,338,393),61202=>array(91,150,317,242),61203=>array(48,0,338,242),61204=>array(13,0,378,693),61205=>array(17,0,373,543),61206=>array(26,0,363,393),61207=>array(48,0,338,242),61208=>array(91,0,317,92),61209=>array(96,0,188,693),62464=>array(49,-14,563,819),62465=>array(49,-15,563,823),62466=>array(49,-14,604,828),62467=>array(49,0,853,828),62468=>array(49,-15,563,828),62469=>array(49,-15,563,828),62470=>array(29,-15,612,828),62471=>array(49,-14,846,828),62472=>array(49,0,541,828),62473=>array(49,-14,563,820),62474=>array(49,-6,1114,828),62475=>array(49,-14,563,828),62476=>array(63,-15,578,820),62477=>array(54,0,839,828),62478=>array(49,-15,563,819),62479=>array(49,-15,563,840),62480=>array(49,0,875,828),62481=>array(63,-14,578,819),62482=>array(44,-14,699,828),62483=>array(34,-14,570,828),62484=>array(49,-14,837,828),62485=>array(49,-14,563,819),62486=>array(49,0,858,828),62487=>array(49,-14,563,820),62488=>array(44,-14,558,828),62489=>array(64,0,579,828),62490=>array(50,-15,628,820),62491=>array(49,-14,563,819),62492=>array(63,-14,577,828),62493=>array(49,-14,581,820),62494=>array(63,-14,578,819),62495=>array(24,-14,546,828),62496=>array(49,-15,563,828),62497=>array(63,-15,577,828),62498=>array(49,-73,563,828),62499=>array(49,-15,563,830),62500=>array(49,-15,569,828),62501=>array(49,-14,627,828),62502=>array(49,-14,914,828),62504=>array(45,-228,960,816),62505=>array(54,-223,791,843),62506=>array(54,-14,510,761),62507=>array(54,-14,510,773),62508=>array(54,-14,510,866),62509=>array(54,-14,510,812),62510=>array(54,-14,510,877),62511=>array(54,-14,510,803),62512=>array(54,-232,501,761),62513=>array(54,-232,501,793),62514=>array(54,-232,501,891),62515=>array(54,-232,501,803),62516=>array(54,0,520,761),62517=>array(54,0,520,793),62518=>array(54,0,520,803),62519=>array(54,-0,770,761),62520=>array(54,-0,770,773),62521=>array(54,-0,770,884),62522=>array(54,-0,770,793),62523=>array(54,-0,770,803),62524=>array(54,-232,557,761),62525=>array(54,-232,557,773),62526=>array(54,-232,557,894),62527=>array(54,-232,557,793),62528=>array(54,-232,557,803),62529=>array(54,-232,557,844),63173=>array(43,-14,644,760),64256=>array(19,0,819,760),64257=>array(21,0,657,760),64258=>array(19,0,657,760),64259=>array(19,0,1031,760),64260=>array(19,0,1032,760),64261=>array(19,0,785,760),64262=>array(52,-14,997,742),64275=>array(74,-14,1300,760),64276=>array(78,-14,1301,760),64277=>array(78,-208,1300,760),64278=>array(78,-208,1300,760),64279=>array(78,-208,1629,760),64285=>array(66,32,228,547),64286=>array(182,635,510,780),64287=>array(66,32,500,547),64288=>array(38,0,590,547),64289=>array(85,0,855,547),64290=>array(43,0,731,547),64291=>array(91,0,778,547),64292=>array(43,0,730,547),64293=>array(43,0,730,739),64294=>array(91,0,778,547),64295=>array(43,0,730,547),64296=>array(47,-4,730,547),64297=>array(106,256,732,627),64298=>array(20,0,750,710),64299=>array(20,0,750,723),64300=>array(20,0,750,710),64301=>array(20,0,750,710),64302=>array(84,-171,644,547),64303=>array(84,-217,644,547),64304=>array(84,-171,644,547),64305=>array(43,0,567,547),64306=>array(43,-9,418,547),64307=>array(43,0,545,547),64308=>array(91,0,596,547),64309=>array(43,0,346,547),64310=>array(43,0,442,547),64312=>array(90,-13,624,553),64313=>array(43,164,369,547),64314=>array(43,-240,487,547),64315=>array(43,0,511,547),64316=>array(43,0,527,711),64318=>array(43,0,633,554),64320=>array(43,0,362,547),64321=>array(90,-13,624,547),64323=>array(91,-240,584,547),64324=>array(91,0,603,547),64326=>array(33,0,564,547),64327=>array(91,-240,660,546),64328=>array(43,0,511,547),64329=>array(20,0,750,547),64330=>array(10,-4,592,547),64331=>array(91,0,252,710),64332=>array(43,0,567,710),64333=>array(43,0,511,710),64334=>array(91,0,603,710),64335=>array(43,0,652,729),64338=>array(63,-244,921,327),64339=>array(63,-244,1068,327),64340=>array(-10,-244,292,293),64341=>array(-10,-244,418,293),64342=>array(63,-244,921,327),64343=>array(63,-244,1068,327),64344=>array(-10,-244,302,293),64345=>array(-10,-244,418,293),64346=>array(63,-244,921,327),64347=>array(63,-244,1068,327),64348=>array(-10,-244,302,293),64349=>array(-10,-244,418,293),64350=>array(63,-5,921,566),64351=>array(63,-5,1068,566),64352=>array(-10,0,292,640),64353=>array(-10,0,418,640),64354=>array(63,-5,921,566),64355=>array(63,-5,1068,566),64356=>array(-10,0,302,640),64357=>array(-10,0,418,640),64358=>array(63,-5,921,599),64359=>array(63,-5,1068,599),64360=>array(-10,0,333,672),64361=>array(-10,0,418,672),64362=>array(63,-24,1082,786),64363=>array(63,-29,1201,786),64364=>array(-10,0,575,786),64365=>array(-10,0,729,786),64366=>array(63,-24,1082,786),64367=>array(63,-29,1201,786),64368=>array(-10,0,575,786),64369=>array(-10,0,729,786),64370=>array(77,-244,720,425),64371=>array(77,-244,730,425),64372=>array(-10,-244,628,405),64373=>array(-10,-244,730,405),64374=>array(77,-244,720,425),64375=>array(77,-244,730,425),64376=>array(-10,-117,628,405),64377=>array(-10,-117,730,405),64378=>array(77,-244,720,425),64379=>array(77,-244,730,425),64380=>array(-10,-244,628,405),64381=>array(-10,-244,730,405),64382=>array(77,-244,720,425),64383=>array(77,-244,730,425),64384=>array(-10,-244,628,405),64385=>array(-10,-244,730,405),64386=>array(61,-146,442,415),64387=>array(61,-146,587,415),64388=>array(61,-15,442,586),64389=>array(61,-15,587,586),64390=>array(61,-15,442,708),64391=>array(61,-15,587,708),64392=>array(61,-15,442,746),64393=>array(61,-15,587,746),64394=>array(-42,-244,508,615),64395=>array(-42,-244,632,615),64396=>array(-42,-244,520,648),64397=>array(-42,-244,632,648),64398=>array(63,-39,1024,760),64399=>array(63,-39,1034,760),64400=>array(-10,0,582,760),64401=>array(-10,0,591,760),64402=>array(63,-39,1024,910),64403=>array(63,-39,1034,910),64404=>array(-10,0,582,910),64405=>array(-10,0,591,910),64406=>array(63,-293,1024,910),64407=>array(63,-293,1034,910),64408=>array(-10,-269,582,910),64409=>array(-10,-269,591,910),64410=>array(63,-39,1024,910),64411=>array(63,-39,1034,910),64412=>array(-10,0,582,910),64413=>array(-10,0,591,910),64414=>array(62,-165,779,366),64415=>array(62,-244,910,287),64416=>array(62,-165,779,636),64417=>array(62,-244,910,514),64418=>array(-10,0,333,672),64419=>array(-10,0,418,672),64426=>array(70,-33,877,506),64427=>array(70,-244,890,369),64428=>array(-10,-33,633,506),64429=>array(-10,-244,670,369),64467=>array(70,-27,814,854),64468=>array(70,-27,941,854),64469=>array(-10,0,582,928),64470=>array(-10,0,591,928),64473=>array(-42,-244,547,556),64474=>array(-42,-244,637,556),64488=>array(-10,0,292,293),64489=>array(-10,0,418,293),64508=>array(63,-107,863,462),64509=>array(63,-126,1021,291),64510=>array(-10,-166,302,293),64511=>array(-10,-166,418,293),65056=>array(-419,735,0,880),65057=>array(0,735,419,880),65058=>array(-362,756,0,894),65059=>array(0,756,362,894),65136=>array(28,591,313,825),65137=>array(-10,0,352,825),65138=>array(28,591,313,881),65139=>array(51,0,356,177),65140=>array(28,-239,313,-5),65142=>array(28,591,313,723),65143=>array(-10,0,352,723),65144=>array(28,590,313,881),65145=>array(-10,0,352,881),65146=>array(28,-137,313,-5),65147=>array(-10,-137,352,125),65148=>array(9,599,333,869),65149=>array(-10,0,352,869),65150=>array(36,610,304,878),65151=>array(-10,0,352,878),65152=>array(73,20,437,493),65153=>array(-20,0,362,955),65154=>array(-20,0,385,955),65155=>array(75,0,259,993),65156=>array(75,0,385,993),65157=>array(-42,-244,547,603),65158=>array(-42,-244,637,603),65159=>array(76,-245,259,760),65160=>array(76,-245,385,760),65161=>array(63,-107,863,603),65162=>array(63,-126,1021,480),65163=>array(-10,0,292,627),65164=>array(-10,0,418,627),65165=>array(84,0,259,760),65166=>array(84,0,385,760),65167=>array(63,-149,921,327),65168=>array(63,-149,1068,327),65169=>array(-10,-173,292,293),65170=>array(-10,-173,418,293),65171=>array(48,-30,540,513),65172=>array(65,0,616,513),65173=>array(63,-5,921,415),65174=>array(63,-5,1068,415),65175=>array(-10,0,302,488),65176=>array(-10,0,418,488),65177=>array(63,-5,921,537),65178=>array(63,-5,1068,537),65179=>array(-10,0,302,610),65180=>array(-10,0,418,610),65181=>array(77,-244,720,425),65182=>array(77,-244,730,425),65183=>array(-10,-173,628,405),65184=>array(-10,-173,730,405),65185=>array(77,-244,720,425),65186=>array(77,-244,730,425),65187=>array(-10,0,628,405),65188=>array(-10,0,730,405),65189=>array(77,-244,720,579),65190=>array(77,-244,730,579),65191=>array(-10,0,628,530),65192=>array(-10,0,730,530),65193=>array(61,-15,442,415),65194=>array(61,-15,587,415),65195=>array(61,-15,442,579),65196=>array(61,-15,587,579),65197=>array(-42,-244,508,269),65198=>array(-42,-244,632,269),65199=>array(-42,-244,508,457),65200=>array(-42,-244,632,457),65201=>array(63,-244,1297,366),65202=>array(63,-244,1423,366),65203=>array(-10,-14,901,366),65204=>array(-10,-14,1027,366),65205=>array(63,-244,1297,586),65206=>array(63,-244,1423,586),65207=>array(-10,-14,901,586),65208=>array(-10,-14,1027,586),65209=>array(63,-244,1265,362),65210=>array(63,-244,1374,362),65211=>array(-10,0,886,362),65212=>array(-10,0,995,362),65213=>array(63,-244,1265,457),65214=>array(63,-244,1374,457),65215=>array(-10,0,886,481),65216=>array(-10,0,995,481),65217=>array(70,0,971,760),65218=>array(70,0,1081,760),65219=>array(-10,0,875,760),65220=>array(-10,0,984,760),65221=>array(70,0,971,760),65222=>array(70,0,1081,760),65223=>array(-10,0,875,760),65224=>array(-10,0,984,760),65225=>array(87,-244,720,521),65226=>array(57,-244,693,382),65227=>array(-10,0,583,521),65228=>array(-10,0,574,382),65229=>array(87,-244,720,652),65230=>array(57,-244,693,530),65231=>array(-10,0,583,652),65232=>array(-10,0,574,530),65233=>array(63,-24,1082,627),65234=>array(63,-29,1201,627),65235=>array(-10,0,575,627),65236=>array(-10,0,729,627),65237=>array(52,-215,825,635),65238=>array(52,-244,911,476),65239=>array(-10,0,575,635),65240=>array(-10,0,729,635),65241=>array(70,-27,814,760),65242=>array(70,-27,941,760),65243=>array(-10,0,582,760),65244=>array(-10,0,591,760),65245=>array(70,-142,778,760),65246=>array(70,-142,902,760),65247=>array(-10,0,292,760),65248=>array(-10,0,418,760),65249=>array(68,-244,660,369),65250=>array(68,-244,794,311),65251=>array(-10,-23,546,311),65252=>array(-10,-23,680,311),65253=>array(62,-165,779,457),65254=>array(62,-244,910,383),65255=>array(-10,0,292,481),65256=>array(-10,0,418,481),65257=>array(48,-30,540,358),65258=>array(65,0,616,366),65259=>array(-10,-33,633,506),65260=>array(-10,-244,670,369),65261=>array(-42,-244,547,322),65262=>array(-42,-244,637,322),65263=>array(63,-107,863,462),65264=>array(63,-126,1021,291),65265=>array(63,-244,863,462),65266=>array(63,-244,1021,291),65267=>array(-10,-166,302,293),65268=>array(-10,-166,418,293),65269=>array(-62,-15,643,882),65270=>array(-62,-15,769,882),65271=>array(33,-15,643,944),65272=>array(33,-15,769,944),65273=>array(41,-245,643,760),65274=>array(41,-245,769,760),65275=>array(41,-15,643,760),65276=>array(41,-15,769,760),65533=>array(24,-139,1089,926),65535=>array(50,-177,550,705)); -$cw=array(0=>600,32=>348,33=>456,34=>521,35=>838,36=>696,37=>1002,38=>872,39=>306,40=>457,41=>457,42=>523,43=>838,44=>380,45=>415,46=>380,47=>365,48=>696,49=>696,50=>696,51=>696,52=>696,53=>696,54=>696,55=>696,56=>696,57=>696,58=>400,59=>400,60=>838,61=>838,62=>838,63=>580,64=>1000,65=>774,66=>762,67=>734,68=>830,69=>683,70=>683,71=>821,72=>837,73=>372,74=>372,75=>775,76=>637,77=>995,78=>837,79=>850,80=>733,81=>850,82=>770,83=>720,84=>682,85=>812,86=>774,87=>1103,88=>771,89=>724,90=>725,91=>457,92=>365,93=>457,94=>838,95=>500,96=>500,97=>675,98=>716,99=>593,100=>716,101=>678,102=>435,103=>716,104=>712,105=>343,106=>343,107=>665,108=>343,109=>1042,110=>712,111=>687,112=>716,113=>716,114=>493,115=>595,116=>478,117=>712,118=>652,119=>924,120=>645,121=>652,122=>582,123=>712,124=>365,125=>712,126=>838,160=>348,161=>456,162=>696,163=>696,164=>636,165=>696,166=>365,167=>500,168=>500,169=>1000,170=>564,171=>646,172=>838,173=>415,174=>1000,175=>500,176=>500,177=>838,178=>438,179=>438,180=>500,181=>736,182=>636,183=>380,184=>500,185=>438,186=>564,187=>646,188=>1035,189=>1035,190=>1035,191=>580,192=>774,193=>774,194=>774,195=>774,196=>774,197=>774,198=>1085,199=>734,200=>683,201=>683,202=>683,203=>683,204=>372,205=>372,206=>372,207=>372,208=>838,209=>837,210=>850,211=>850,212=>850,213=>850,214=>850,215=>838,216=>850,217=>812,218=>812,219=>812,220=>812,221=>724,222=>738,223=>719,224=>675,225=>675,226=>675,227=>675,228=>675,229=>675,230=>1048,231=>593,232=>678,233=>678,234=>678,235=>678,236=>343,237=>343,238=>343,239=>343,240=>687,241=>712,242=>687,243=>687,244=>687,245=>687,246=>687,247=>838,248=>687,249=>712,250=>712,251=>712,252=>712,253=>652,254=>716,255=>652,256=>774,257=>675,258=>774,259=>675,260=>774,261=>675,262=>734,263=>593,264=>734,265=>593,266=>734,267=>593,268=>734,269=>593,270=>830,271=>716,272=>838,273=>716,274=>683,275=>678,276=>683,277=>678,278=>683,279=>678,280=>683,281=>678,282=>683,283=>678,284=>821,285=>716,286=>821,287=>716,288=>821,289=>716,290=>821,291=>716,292=>837,293=>712,294=>974,295=>790,296=>372,297=>343,298=>372,299=>343,300=>372,301=>343,302=>372,303=>343,304=>372,305=>343,306=>744,307=>686,308=>372,309=>343,310=>775,311=>665,312=>665,313=>637,314=>343,315=>637,316=>343,317=>637,318=>479,319=>637,320=>557,321=>642,322=>371,323=>837,324=>712,325=>837,326=>712,327=>837,328=>712,329=>983,330=>837,331=>712,332=>850,333=>687,334=>850,335=>687,336=>850,337=>687,338=>1167,339=>1094,340=>770,341=>493,342=>770,343=>493,344=>770,345=>493,346=>720,347=>595,348=>720,349=>595,350=>720,351=>595,352=>720,353=>595,354=>682,355=>478,356=>682,357=>478,358=>682,359=>478,360=>812,361=>712,362=>812,363=>712,364=>812,365=>712,366=>812,367=>712,368=>812,369=>712,370=>812,371=>712,372=>1103,373=>924,374=>724,375=>652,376=>724,377=>725,378=>582,379=>725,380=>582,381=>725,382=>582,383=>435,384=>716,385=>811,386=>762,387=>716,388=>762,389=>716,390=>734,391=>734,392=>593,393=>838,394=>879,395=>757,396=>716,397=>688,398=>683,399=>849,400=>696,401=>683,402=>435,403=>821,404=>793,405=>1045,406=>436,407=>389,408=>775,409=>665,410=>360,411=>592,412=>1042,413=>837,414=>712,415=>850,416=>874,417=>687,418=>1083,419=>912,420=>782,421=>716,422=>770,423=>720,424=>595,425=>683,426=>552,427=>478,428=>707,429=>478,430=>682,431=>835,432=>712,433=>850,434=>813,435=>797,436=>778,437=>725,438=>582,439=>772,440=>772,441=>641,442=>582,443=>696,444=>772,445=>641,446=>573,447=>716,448=>372,449=>659,450=>544,451=>372,452=>1555,453=>1412,454=>1298,455=>1009,456=>980,457=>686,458=>1209,459=>1180,460=>1055,461=>774,462=>675,463=>372,464=>343,465=>850,466=>687,467=>812,468=>712,469=>812,470=>712,471=>812,472=>712,473=>812,474=>712,475=>812,476=>712,477=>678,478=>774,479=>675,480=>774,481=>675,482=>1085,483=>1048,484=>821,485=>716,486=>821,487=>716,488=>775,489=>665,490=>850,491=>687,492=>850,493=>687,494=>772,495=>582,496=>343,497=>1555,498=>1412,499=>1298,500=>821,501=>716,502=>1289,503=>787,504=>837,505=>712,506=>774,507=>675,508=>1085,509=>1048,510=>850,511=>687,512=>774,513=>675,514=>774,515=>675,516=>683,517=>678,518=>683,519=>678,520=>372,521=>343,522=>372,523=>343,524=>850,525=>687,526=>850,527=>687,528=>770,529=>493,530=>770,531=>493,532=>812,533=>712,534=>812,535=>712,536=>720,537=>595,538=>682,539=>478,540=>690,541=>607,542=>837,543=>712,544=>837,545=>865,546=>809,547=>659,548=>725,549=>582,550=>774,551=>675,552=>683,553=>678,554=>850,555=>687,556=>850,557=>687,558=>850,559=>687,560=>850,561=>687,562=>724,563=>652,564=>492,565=>867,566=>512,567=>343,568=>1088,569=>1088,570=>774,571=>734,572=>593,573=>637,574=>682,575=>595,576=>582,577=>782,578=>614,579=>762,580=>812,581=>774,582=>683,583=>678,584=>372,585=>343,586=>860,587=>791,588=>770,589=>493,590=>724,591=>652,592=>675,593=>716,594=>716,595=>716,596=>593,597=>593,598=>717,599=>792,600=>678,601=>678,602=>876,603=>557,604=>545,605=>815,606=>731,607=>343,608=>792,609=>716,610=>627,611=>644,612=>635,613=>712,614=>712,615=>712,616=>545,617=>440,618=>545,619=>559,620=>693,621=>343,622=>841,623=>1042,624=>1042,625=>1042,626=>712,627=>793,628=>707,629=>687,630=>909,631=>681,632=>796,633=>538,634=>538,635=>650,636=>493,637=>493,638=>596,639=>596,640=>642,641=>642,642=>595,643=>415,644=>435,645=>605,646=>552,647=>478,648=>478,649=>920,650=>772,651=>670,652=>652,653=>924,654=>652,655=>724,656=>694,657=>684,658=>641,659=>641,660=>573,661=>573,662=>573,663=>573,664=>850,665=>633,666=>731,667=>685,668=>691,669=>343,670=>732,671=>539,672=>792,673=>573,674=>573,675=>1156,676=>1214,677=>1155,678=>975,679=>769,680=>929,681=>1026,682=>862,683=>780,684=>591,685=>415,686=>677,687=>789,688=>456,689=>456,690=>219,691=>315,692=>315,693=>315,694=>411,695=>591,696=>417,697=>302,698=>521,699=>380,700=>380,701=>380,702=>366,703=>366,704=>326,705=>326,706=>500,707=>500,708=>500,709=>500,710=>500,711=>500,712=>306,713=>500,714=>500,715=>500,716=>306,717=>500,718=>500,719=>500,720=>337,721=>337,722=>366,723=>366,724=>500,725=>500,726=>416,727=>328,728=>500,729=>500,730=>500,731=>500,732=>500,733=>500,734=>351,735=>500,736=>412,737=>219,738=>381,739=>413,740=>326,741=>500,742=>500,743=>500,744=>500,745=>500,748=>500,749=>500,750=>657,755=>500,759=>500,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>698,881=>565,882=>1022,883=>836,884=>302,885=>302,886=>837,887=>701,890=>500,891=>593,892=>550,893=>549,894=>400,900=>441,901=>500,902=>797,903=>380,904=>846,905=>1009,906=>563,908=>891,910=>980,911=>894,912=>390,913=>774,914=>762,915=>637,916=>774,917=>683,918=>725,919=>837,920=>850,921=>372,922=>775,923=>774,924=>995,925=>837,926=>632,927=>850,928=>837,929=>733,931=>683,932=>682,933=>724,934=>850,935=>771,936=>850,937=>850,938=>372,939=>724,940=>687,941=>557,942=>712,943=>390,944=>675,945=>687,946=>716,947=>681,948=>687,949=>557,950=>591,951=>712,952=>687,953=>390,954=>710,955=>633,956=>736,957=>681,958=>591,959=>687,960=>791,961=>716,962=>593,963=>779,964=>638,965=>675,966=>782,967=>645,968=>794,969=>869,970=>390,971=>675,972=>687,973=>675,974=>869,975=>775,976=>651,977=>661,978=>746,979=>981,980=>746,981=>796,982=>869,983=>744,984=>850,985=>687,986=>734,987=>593,988=>683,989=>494,990=>702,991=>660,992=>919,993=>627,994=>1093,995=>837,996=>832,997=>716,998=>928,999=>744,1000=>733,1001=>650,1002=>789,1003=>671,1004=>752,1005=>716,1006=>682,1007=>590,1008=>744,1009=>716,1010=>593,1011=>343,1012=>850,1013=>645,1014=>644,1015=>738,1016=>716,1017=>734,1018=>995,1019=>732,1020=>716,1021=>698,1022=>734,1023=>698,1024=>683,1025=>683,1026=>878,1027=>637,1028=>734,1029=>720,1030=>372,1031=>372,1032=>372,1033=>1154,1034=>1130,1035=>878,1036=>817,1037=>837,1038=>771,1039=>837,1040=>774,1041=>762,1042=>762,1043=>637,1044=>891,1045=>683,1046=>1224,1047=>710,1048=>837,1049=>837,1050=>817,1051=>831,1052=>995,1053=>837,1054=>850,1055=>837,1056=>733,1057=>734,1058=>682,1059=>771,1060=>992,1061=>771,1062=>928,1063=>808,1064=>1235,1065=>1326,1066=>939,1067=>1036,1068=>762,1069=>734,1070=>1174,1071=>770,1072=>675,1073=>698,1074=>633,1075=>522,1076=>808,1077=>678,1078=>995,1079=>581,1080=>701,1081=>701,1082=>679,1083=>732,1084=>817,1085=>691,1086=>687,1087=>691,1088=>716,1089=>593,1090=>580,1091=>652,1092=>992,1093=>645,1094=>741,1095=>687,1096=>1062,1097=>1105,1098=>751,1099=>904,1100=>632,1101=>593,1102=>972,1103=>642,1104=>678,1105=>678,1106=>714,1107=>522,1108=>593,1109=>595,1110=>343,1111=>343,1112=>343,1113=>991,1114=>956,1115=>734,1116=>679,1117=>701,1118=>652,1119=>691,1120=>1093,1121=>869,1122=>840,1123=>736,1124=>1012,1125=>839,1126=>992,1127=>832,1128=>1358,1129=>1121,1130=>850,1131=>687,1132=>1236,1133=>1007,1134=>696,1135=>557,1136=>1075,1137=>1061,1138=>850,1139=>687,1140=>850,1141=>695,1142=>850,1143=>695,1144=>1148,1145=>1043,1146=>1074,1147=>863,1148=>1405,1149=>1173,1150=>1093,1151=>869,1152=>734,1153=>593,1154=>652,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>418,1161=>418,1162=>957,1163=>807,1164=>762,1165=>611,1166=>733,1167=>716,1168=>637,1169=>522,1170=>666,1171=>543,1172=>808,1173=>669,1174=>1224,1175=>995,1176=>710,1177=>581,1178=>775,1179=>679,1180=>817,1181=>679,1182=>817,1183=>679,1184=>1015,1185=>826,1186=>956,1187=>808,1188=>1103,1189=>874,1190=>1273,1191=>1017,1192=>952,1193=>858,1194=>734,1195=>593,1196=>682,1197=>580,1198=>724,1199=>652,1200=>724,1201=>652,1202=>771,1203=>645,1204=>1112,1205=>1000,1206=>808,1207=>687,1208=>808,1209=>687,1210=>808,1211=>712,1212=>1026,1213=>810,1214=>1026,1215=>810,1216=>372,1217=>1224,1218=>995,1219=>775,1220=>630,1221=>951,1222=>805,1223=>837,1224=>691,1225=>957,1226=>807,1227=>808,1228=>687,1229=>1115,1230=>933,1231=>343,1232=>774,1233=>675,1234=>774,1235=>675,1236=>1085,1237=>1048,1238=>683,1239=>678,1240=>849,1241=>678,1242=>849,1243=>678,1244=>1224,1245=>995,1246=>710,1247=>581,1248=>772,1249=>641,1250=>837,1251=>701,1252=>837,1253=>701,1254=>850,1255=>687,1256=>850,1257=>687,1258=>850,1259=>687,1260=>734,1261=>593,1262=>771,1263=>652,1264=>771,1265=>652,1266=>771,1267=>652,1268=>808,1269=>687,1270=>637,1271=>522,1272=>1036,1273=>904,1274=>666,1275=>543,1276=>771,1277=>645,1278=>771,1279=>645,1280=>762,1281=>608,1282=>1159,1283=>893,1284=>1119,1285=>920,1286=>828,1287=>693,1288=>1242,1289=>1017,1290=>1289,1291=>1013,1292=>839,1293=>638,1294=>938,1295=>803,1296=>696,1297=>557,1298=>831,1299=>732,1300=>1286,1301=>1068,1302=>1065,1303=>979,1304=>1082,1305=>1013,1306=>850,1307=>716,1308=>1103,1309=>924,1310=>817,1311=>679,1312=>1267,1313=>1059,1314=>1273,1315=>1017,1316=>957,1317=>807,1329=>813,1330=>729,1331=>728,1332=>731,1333=>729,1334=>733,1335=>652,1336=>720,1337=>903,1338=>728,1339=>666,1340=>558,1341=>961,1342=>788,1343=>713,1344=>651,1345=>730,1346=>715,1347=>704,1348=>780,1349=>689,1350=>715,1351=>708,1352=>731,1353=>677,1354=>867,1355=>711,1356=>780,1357=>731,1358=>715,1359=>693,1360=>666,1361=>698,1362=>576,1363=>833,1364=>698,1365=>763,1366=>855,1369=>330,1370=>342,1371=>308,1372=>374,1373=>313,1374=>461,1375=>468,1377=>938,1378=>642,1379=>704,1380=>708,1381=>642,1382=>644,1383=>565,1384=>642,1385=>756,1386=>704,1387=>643,1388=>310,1389=>984,1390=>638,1391=>643,1392=>643,1393=>603,1394=>643,1395=>642,1396=>643,1397=>309,1398=>643,1399=>486,1400=>643,1401=>366,1402=>938,1403=>573,1404=>666,1405=>643,1406=>643,1407=>934,1408=>643,1409=>643,1410=>479,1411=>934,1412=>648,1413=>620,1414=>813,1415=>812,1417=>360,1418=>374,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>415,1471=>0,1472=>372,1473=>0,1474=>0,1475=>372,1478=>497,1479=>0,1488=>728,1489=>610,1490=>447,1491=>588,1492=>687,1493=>343,1494=>400,1495=>687,1496=>679,1497=>294,1498=>578,1499=>566,1500=>605,1501=>696,1502=>724,1503=>343,1504=>453,1505=>680,1506=>666,1507=>675,1508=>658,1509=>661,1510=>653,1511=>736,1512=>602,1513=>758,1514=>683,1520=>664,1521=>567,1522=>519,1523=>444,1524=>710,1542=>667,1543=>667,1545=>884,1546=>1157,1548=>380,1557=>0,1563=>400,1567=>580,1569=>511,1570=>343,1571=>343,1572=>622,1573=>343,1574=>917,1575=>343,1576=>1005,1577=>590,1578=>1005,1579=>1005,1580=>721,1581=>721,1582=>721,1583=>513,1584=>513,1585=>576,1586=>576,1587=>1380,1588=>1380,1589=>1345,1590=>1345,1591=>1039,1592=>1039,1593=>683,1594=>683,1600=>342,1601=>1162,1602=>894,1603=>917,1604=>868,1605=>733,1606=>854,1607=>590,1608=>622,1609=>917,1610=>917,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,1619=>0,1620=>0,1621=>0,1623=>0,1626=>500,1632=>610,1633=>610,1634=>610,1635=>610,1636=>610,1637=>610,1638=>610,1639=>610,1640=>610,1641=>610,1642=>610,1643=>374,1644=>380,1645=>545,1646=>1005,1647=>894,1648=>0,1652=>292,1657=>1005,1658=>1005,1659=>1005,1660=>1005,1661=>1005,1662=>1005,1663=>1005,1664=>1005,1665=>721,1666=>721,1667=>721,1668=>721,1669=>721,1670=>721,1671=>721,1672=>445,1673=>445,1674=>445,1675=>445,1676=>445,1677=>445,1678=>445,1679=>445,1680=>445,1681=>576,1682=>576,1683=>576,1684=>576,1685=>681,1686=>576,1687=>576,1688=>576,1689=>576,1690=>1380,1691=>1380,1692=>1380,1693=>1345,1694=>1345,1695=>1039,1696=>683,1697=>1162,1698=>1162,1699=>1162,1700=>1162,1701=>1162,1702=>1162,1703=>894,1704=>894,1705=>1024,1706=>1271,1707=>1024,1708=>917,1709=>917,1710=>917,1711=>1024,1712=>1024,1713=>1024,1714=>1024,1715=>1024,1716=>1024,1717=>868,1718=>868,1719=>868,1720=>868,1721=>854,1722=>854,1723=>854,1724=>854,1725=>854,1726=>938,1727=>721,1734=>622,1740=>917,1742=>917,1749=>590,1776=>610,1777=>610,1778=>610,1779=>610,1780=>610,1781=>610,1782=>610,1783=>610,1784=>610,1785=>610,1984=>696,1985=>696,1986=>696,1987=>696,1988=>696,1989=>696,1990=>696,1991=>696,1992=>696,1993=>696,1994=>343,1995=>547,1996=>543,1997=>652,1998=>691,1999=>691,2000=>594,2001=>691,2002=>904,2003=>551,2004=>551,2005=>627,2006=>688,2007=>444,2008=>1022,2009=>506,2010=>826,2011=>691,2012=>652,2013=>912,2014=>627,2015=>707,2016=>506,2017=>652,2018=>574,2019=>627,2020=>627,2021=>627,2022=>574,2023=>574,2027=>0,2028=>0,2029=>0,2030=>0,2031=>0,2032=>0,2033=>0,2034=>0,2035=>0,2036=>380,2037=>380,2040=>691,2041=>691,2042=>415,3647=>696,3713=>790,3714=>748,3716=>749,3719=>569,3720=>742,3722=>744,3725=>761,3732=>706,3733=>704,3734=>747,3735=>819,3737=>730,3738=>727,3739=>727,3740=>922,3741=>827,3742=>866,3743=>866,3745=>836,3746=>761,3747=>770,3749=>769,3751=>713,3754=>827,3755=>1031,3757=>724,3758=>784,3759=>934,3760=>688,3761=>0,3762=>610,3763=>610,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>670,3776=>516,3777=>860,3778=>516,3779=>650,3780=>632,3782=>759,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>771,3793=>771,3794=>693,3795=>836,3796=>729,3797=>729,3798=>849,3799=>790,3800=>759,3801=>910,3804=>1363,3805=>1363,4256=>874,4257=>733,4258=>679,4259=>834,4260=>615,4261=>768,4262=>753,4263=>914,4264=>453,4265=>620,4266=>843,4267=>882,4268=>625,4269=>854,4270=>781,4271=>629,4272=>912,4273=>621,4274=>620,4275=>854,4276=>866,4277=>724,4278=>630,4279=>621,4280=>625,4281=>620,4282=>818,4283=>874,4284=>615,4285=>623,4286=>625,4287=>725,4288=>844,4289=>596,4290=>688,4291=>596,4292=>594,4293=>738,4304=>554,4305=>563,4306=>622,4307=>834,4308=>555,4309=>564,4310=>551,4311=>828,4312=>563,4313=>556,4314=>1074,4315=>568,4316=>568,4317=>814,4318=>554,4319=>563,4320=>823,4321=>568,4322=>700,4323=>591,4324=>852,4325=>560,4326=>814,4327=>563,4328=>553,4329=>568,4330=>622,4331=>568,4332=>553,4333=>566,4334=>568,4335=>540,4336=>554,4337=>559,4338=>553,4339=>554,4340=>553,4341=>587,4342=>853,4343=>604,4344=>563,4345=>622,4346=>554,4347=>448,4348=>324,5121=>774,5122=>774,5123=>774,5124=>774,5125=>905,5126=>905,5127=>905,5129=>905,5130=>905,5131=>905,5132=>1018,5133=>1009,5134=>1018,5135=>1009,5136=>1018,5137=>1009,5138=>1149,5139=>1140,5140=>1149,5141=>1140,5142=>905,5143=>1149,5144=>1142,5145=>1149,5146=>1142,5147=>905,5149=>310,5150=>529,5151=>425,5152=>425,5153=>395,5154=>395,5155=>395,5156=>395,5157=>564,5158=>470,5159=>310,5160=>395,5161=>395,5162=>395,5163=>1213,5164=>986,5165=>1216,5166=>1297,5167=>774,5168=>774,5169=>774,5170=>774,5171=>886,5172=>886,5173=>886,5175=>886,5176=>886,5177=>886,5178=>1018,5179=>1009,5180=>1018,5181=>1009,5182=>1018,5183=>1009,5184=>1149,5185=>1140,5186=>1149,5187=>1140,5188=>1149,5189=>1142,5190=>1149,5191=>1142,5192=>886,5193=>576,5194=>229,5196=>812,5197=>812,5198=>812,5199=>812,5200=>815,5201=>815,5202=>815,5204=>815,5205=>815,5206=>815,5207=>1056,5208=>1048,5209=>1056,5210=>1048,5211=>1056,5212=>1048,5213=>1060,5214=>1054,5215=>1060,5216=>1054,5217=>1060,5218=>1052,5219=>1060,5220=>1052,5221=>1060,5222=>483,5223=>1005,5224=>1005,5225=>1023,5226=>1017,5227=>743,5228=>743,5229=>743,5230=>743,5231=>743,5232=>743,5233=>743,5234=>743,5235=>743,5236=>1029,5237=>975,5238=>980,5239=>975,5240=>980,5241=>975,5242=>1029,5243=>975,5244=>1029,5245=>975,5246=>980,5247=>975,5248=>980,5249=>975,5250=>980,5251=>501,5252=>501,5253=>938,5254=>938,5255=>938,5256=>938,5257=>743,5258=>743,5259=>743,5260=>743,5261=>743,5262=>743,5263=>743,5264=>743,5265=>743,5266=>1029,5267=>975,5268=>1029,5269=>975,5270=>1029,5271=>975,5272=>1029,5273=>975,5274=>1029,5275=>975,5276=>1029,5277=>975,5278=>1029,5279=>975,5280=>1029,5281=>501,5282=>501,5283=>626,5284=>626,5285=>626,5286=>626,5287=>626,5288=>626,5289=>626,5290=>626,5291=>626,5292=>881,5293=>854,5294=>863,5295=>874,5296=>863,5297=>874,5298=>881,5299=>874,5300=>881,5301=>874,5302=>863,5303=>874,5304=>863,5305=>874,5306=>863,5307=>436,5308=>548,5309=>436,5312=>988,5313=>988,5314=>988,5315=>988,5316=>931,5317=>931,5318=>931,5319=>931,5320=>931,5321=>1238,5322=>1247,5323=>1200,5324=>1228,5325=>1200,5326=>1228,5327=>931,5328=>660,5329=>497,5330=>660,5331=>988,5332=>988,5333=>988,5334=>988,5335=>931,5336=>931,5337=>931,5338=>931,5339=>931,5340=>1231,5341=>1247,5342=>1283,5343=>1228,5344=>1283,5345=>1228,5346=>1228,5347=>1214,5348=>1228,5349=>1214,5350=>1283,5351=>1228,5352=>1283,5353=>1228,5354=>660,5356=>886,5357=>730,5358=>730,5359=>730,5360=>730,5361=>730,5362=>730,5363=>730,5364=>730,5365=>730,5366=>998,5367=>958,5368=>967,5369=>989,5370=>967,5371=>989,5372=>998,5373=>958,5374=>998,5375=>958,5376=>967,5377=>989,5378=>967,5379=>989,5380=>967,5381=>493,5382=>460,5383=>493,5392=>923,5393=>923,5394=>923,5395=>1136,5396=>1136,5397=>1136,5398=>1136,5399=>1209,5400=>1202,5401=>1209,5402=>1202,5403=>1209,5404=>1202,5405=>1431,5406=>1420,5407=>1431,5408=>1420,5409=>1431,5410=>1420,5411=>1431,5412=>1420,5413=>746,5414=>776,5415=>776,5416=>776,5417=>776,5418=>776,5419=>776,5420=>776,5421=>776,5422=>776,5423=>1003,5424=>1003,5425=>1013,5426=>996,5427=>1013,5428=>996,5429=>1003,5430=>1003,5431=>1003,5432=>1003,5433=>1013,5434=>996,5435=>1013,5436=>996,5437=>1013,5438=>495,5440=>395,5441=>510,5442=>1033,5443=>1033,5444=>976,5445=>976,5446=>976,5447=>976,5448=>733,5449=>733,5450=>733,5451=>733,5452=>733,5453=>733,5454=>1003,5455=>959,5456=>495,5458=>886,5459=>774,5460=>774,5461=>774,5462=>774,5463=>928,5464=>928,5465=>928,5466=>928,5467=>1172,5468=>1142,5469=>602,5470=>812,5471=>812,5472=>812,5473=>812,5474=>812,5475=>812,5476=>815,5477=>815,5478=>815,5479=>815,5480=>1060,5481=>1052,5482=>548,5492=>977,5493=>977,5494=>977,5495=>977,5496=>977,5497=>977,5498=>977,5499=>618,5500=>837,5501=>510,5502=>1238,5503=>1238,5504=>1238,5505=>1238,5506=>1238,5507=>1238,5508=>1238,5509=>989,5514=>977,5515=>977,5516=>977,5517=>977,5518=>1591,5519=>1591,5520=>1591,5521=>1295,5522=>1295,5523=>1591,5524=>1591,5525=>848,5526=>1273,5536=>988,5537=>988,5538=>931,5539=>931,5540=>931,5541=>931,5542=>660,5543=>776,5544=>776,5545=>776,5546=>776,5547=>776,5548=>776,5549=>776,5550=>495,5551=>743,5598=>830,5601=>830,5702=>496,5703=>496,5742=>413,5743=>1238,5744=>1591,5745=>2016,5746=>2016,5747=>1720,5748=>1678,5749=>2016,5750=>2016,5760=>543,5761=>637,5762=>945,5763=>1254,5764=>1563,5765=>1871,5766=>627,5767=>936,5768=>1254,5769=>1559,5770=>1871,5771=>569,5772=>877,5773=>1187,5774=>1497,5775=>1807,5776=>637,5777=>945,5778=>1240,5779=>1555,5780=>1871,5781=>569,5782=>569,5783=>789,5784=>1234,5785=>1559,5786=>740,5787=>638,5788=>638,7424=>652,7425=>833,7426=>1048,7427=>608,7428=>593,7429=>676,7430=>676,7431=>559,7432=>557,7433=>343,7434=>494,7435=>665,7436=>539,7437=>817,7438=>701,7439=>687,7440=>593,7441=>660,7442=>660,7443=>660,7444=>1094,7446=>687,7447=>687,7448=>556,7449=>642,7450=>642,7451=>580,7452=>634,7453=>737,7454=>948,7455=>695,7456=>652,7457=>924,7458=>582,7459=>646,7462=>539,7463=>652,7464=>691,7465=>556,7466=>781,7467=>732,7468=>487,7469=>683,7470=>480,7472=>523,7473=>430,7474=>430,7475=>517,7476=>527,7477=>234,7478=>234,7479=>488,7480=>401,7481=>626,7482=>527,7483=>527,7484=>535,7485=>509,7486=>461,7487=>485,7488=>430,7489=>511,7490=>695,7491=>458,7492=>458,7493=>479,7494=>712,7495=>479,7496=>479,7497=>479,7498=>479,7499=>386,7500=>386,7501=>479,7502=>219,7503=>487,7504=>664,7505=>456,7506=>488,7507=>414,7508=>488,7509=>488,7510=>479,7511=>388,7512=>456,7513=>462,7514=>664,7515=>501,7517=>451,7518=>429,7519=>433,7520=>493,7521=>406,7522=>219,7523=>315,7524=>456,7525=>501,7526=>451,7527=>429,7528=>451,7529=>493,7530=>406,7543=>716,7544=>527,7547=>545,7549=>747,7557=>514,7579=>479,7580=>414,7581=>414,7582=>488,7583=>386,7584=>377,7585=>348,7586=>479,7587=>456,7588=>347,7589=>281,7590=>347,7591=>347,7592=>431,7593=>326,7594=>330,7595=>370,7596=>664,7597=>664,7598=>562,7599=>562,7600=>448,7601=>488,7602=>542,7603=>422,7604=>396,7605=>388,7606=>583,7607=>494,7608=>399,7609=>451,7610=>501,7611=>417,7612=>523,7613=>470,7614=>455,7615=>425,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>774,7681=>675,7682=>762,7683=>716,7684=>762,7685=>716,7686=>762,7687=>716,7688=>734,7689=>593,7690=>830,7691=>716,7692=>830,7693=>716,7694=>830,7695=>716,7696=>830,7697=>716,7698=>830,7699=>716,7700=>683,7701=>678,7702=>683,7703=>678,7704=>683,7705=>678,7706=>683,7707=>678,7708=>683,7709=>678,7710=>683,7711=>435,7712=>821,7713=>716,7714=>837,7715=>712,7716=>837,7717=>712,7718=>837,7719=>712,7720=>837,7721=>712,7722=>837,7723=>712,7724=>372,7725=>343,7726=>372,7727=>343,7728=>775,7729=>665,7730=>775,7731=>665,7732=>775,7733=>665,7734=>637,7735=>343,7736=>637,7737=>343,7738=>637,7739=>343,7740=>637,7741=>343,7742=>995,7743=>1042,7744=>995,7745=>1042,7746=>995,7747=>1042,7748=>837,7749=>712,7750=>837,7751=>712,7752=>837,7753=>712,7754=>837,7755=>712,7756=>850,7757=>687,7758=>850,7759=>687,7760=>850,7761=>687,7762=>850,7763=>687,7764=>733,7765=>716,7766=>733,7767=>716,7768=>770,7769=>493,7770=>770,7771=>493,7772=>770,7773=>493,7774=>770,7775=>493,7776=>720,7777=>595,7778=>720,7779=>595,7780=>720,7781=>595,7782=>720,7783=>595,7784=>720,7785=>595,7786=>682,7787=>478,7788=>682,7789=>478,7790=>682,7791=>478,7792=>682,7793=>478,7794=>812,7795=>712,7796=>812,7797=>712,7798=>812,7799=>712,7800=>812,7801=>712,7802=>812,7803=>712,7804=>774,7805=>652,7806=>774,7807=>652,7808=>1103,7809=>924,7810=>1103,7811=>924,7812=>1103,7813=>924,7814=>1103,7815=>924,7816=>1103,7817=>924,7818=>771,7819=>645,7820=>771,7821=>645,7822=>724,7823=>652,7824=>725,7825=>582,7826=>725,7827=>582,7828=>725,7829=>582,7830=>712,7831=>478,7832=>924,7833=>652,7834=>675,7835=>435,7836=>435,7837=>435,7838=>896,7839=>687,7840=>774,7841=>675,7842=>774,7843=>675,7844=>774,7845=>675,7846=>774,7847=>675,7848=>774,7849=>675,7850=>774,7851=>675,7852=>774,7853=>675,7854=>774,7855=>675,7856=>774,7857=>675,7858=>774,7859=>675,7860=>774,7861=>675,7862=>774,7863=>675,7864=>683,7865=>678,7866=>683,7867=>678,7868=>683,7869=>678,7870=>683,7871=>678,7872=>683,7873=>678,7874=>683,7875=>678,7876=>683,7877=>678,7878=>683,7879=>678,7880=>372,7881=>343,7882=>372,7883=>343,7884=>850,7885=>687,7886=>850,7887=>687,7888=>850,7889=>687,7890=>850,7891=>687,7892=>850,7893=>687,7894=>850,7895=>687,7896=>850,7897=>687,7898=>874,7899=>687,7900=>874,7901=>687,7902=>874,7903=>687,7904=>874,7905=>687,7906=>874,7907=>687,7908=>812,7909=>712,7910=>812,7911=>712,7912=>835,7913=>712,7914=>835,7915=>712,7916=>835,7917=>712,7918=>835,7919=>712,7920=>835,7921=>712,7922=>724,7923=>652,7924=>724,7925=>652,7926=>724,7927=>652,7928=>724,7929=>652,7930=>953,7931=>644,7936=>687,7937=>687,7938=>687,7939=>687,7940=>687,7941=>687,7942=>687,7943=>687,7944=>774,7945=>774,7946=>1041,7947=>1043,7948=>935,7949=>963,7950=>835,7951=>859,7952=>557,7953=>557,7954=>557,7955=>557,7956=>557,7957=>557,7960=>792,7961=>794,7962=>1100,7963=>1096,7964=>1023,7965=>1052,7968=>712,7969=>712,7970=>712,7971=>712,7972=>712,7973=>712,7974=>712,7975=>712,7976=>945,7977=>951,7978=>1250,7979=>1250,7980=>1180,7981=>1206,7982=>1054,7983=>1063,7984=>390,7985=>390,7986=>390,7987=>390,7988=>390,7989=>390,7990=>390,7991=>390,7992=>483,7993=>489,7994=>777,7995=>785,7996=>712,7997=>738,7998=>604,7999=>604,8000=>687,8001=>687,8002=>687,8003=>687,8004=>687,8005=>687,8008=>892,8009=>933,8010=>1221,8011=>1224,8012=>1053,8013=>1082,8016=>675,8017=>675,8018=>675,8019=>675,8020=>675,8021=>675,8022=>675,8023=>675,8025=>930,8027=>1184,8029=>1199,8031=>1049,8032=>869,8033=>869,8034=>869,8035=>869,8036=>869,8037=>869,8038=>869,8039=>869,8040=>909,8041=>958,8042=>1246,8043=>1251,8044=>1076,8045=>1105,8046=>1028,8047=>1076,8048=>687,8049=>687,8050=>557,8051=>557,8052=>712,8053=>712,8054=>390,8055=>390,8056=>687,8057=>687,8058=>675,8059=>675,8060=>869,8061=>869,8064=>687,8065=>687,8066=>687,8067=>687,8068=>687,8069=>687,8070=>687,8071=>687,8072=>774,8073=>774,8074=>1041,8075=>1043,8076=>935,8077=>963,8078=>835,8079=>859,8080=>712,8081=>712,8082=>712,8083=>712,8084=>712,8085=>712,8086=>712,8087=>712,8088=>945,8089=>951,8090=>1250,8091=>1250,8092=>1180,8093=>1206,8094=>1054,8095=>1063,8096=>869,8097=>869,8098=>869,8099=>869,8100=>869,8101=>869,8102=>869,8103=>869,8104=>909,8105=>958,8106=>1246,8107=>1251,8108=>1076,8109=>1105,8110=>1028,8111=>1076,8112=>687,8113=>687,8114=>687,8115=>687,8116=>687,8118=>687,8119=>687,8120=>774,8121=>774,8122=>876,8123=>797,8124=>774,8125=>500,8126=>500,8127=>500,8128=>500,8129=>500,8130=>712,8131=>712,8132=>712,8134=>712,8135=>712,8136=>929,8137=>846,8138=>1080,8139=>1009,8140=>837,8141=>500,8142=>500,8143=>500,8144=>390,8145=>390,8146=>390,8147=>390,8150=>390,8151=>390,8152=>372,8153=>372,8154=>621,8155=>563,8157=>500,8158=>500,8159=>500,8160=>675,8161=>675,8162=>675,8163=>675,8164=>716,8165=>716,8166=>675,8167=>675,8168=>724,8169=>724,8170=>1020,8171=>980,8172=>838,8173=>500,8174=>500,8175=>500,8178=>869,8179=>869,8180=>869,8182=>869,8183=>869,8184=>1065,8185=>891,8186=>1084,8187=>894,8188=>850,8189=>500,8190=>500,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>330,8197=>250,8198=>167,8199=>696,8200=>380,8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>415,8209=>415,8210=>696,8211=>500,8212=>1000,8213=>1000,8214=>500,8215=>500,8216=>380,8217=>380,8218=>380,8219=>380,8220=>657,8221=>657,8222=>657,8223=>657,8224=>500,8225=>500,8226=>639,8227=>639,8228=>333,8229=>667,8230=>1000,8231=>348,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>200,8240=>1440,8241=>1887,8242=>264,8243=>447,8244=>630,8245=>264,8246=>447,8247=>630,8248=>733,8249=>412,8250=>412,8251=>972,8252=>627,8253=>580,8254=>500,8255=>828,8256=>828,8257=>329,8258=>1023,8259=>500,8260=>167,8261=>457,8262=>457,8263=>1030,8264=>829,8265=>829,8266=>513,8267=>636,8268=>500,8269=>500,8270=>523,8271=>400,8272=>828,8273=>523,8274=>556,8275=>1000,8276=>828,8277=>838,8278=>684,8279=>813,8280=>838,8281=>838,8282=>380,8283=>872,8284=>838,8285=>380,8286=>380,8287=>222,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>438,8305=>219,8308=>438,8309=>438,8310=>438,8311=>438,8312=>438,8313=>438,8314=>528,8315=>528,8316=>528,8317=>288,8318=>288,8319=>456,8320=>438,8321=>438,8322=>438,8323=>438,8324=>438,8325=>438,8326=>438,8327=>438,8328=>438,8329=>438,8330=>528,8331=>528,8332=>528,8333=>288,8334=>288,8336=>458,8337=>479,8338=>488,8339=>413,8340=>479,8341=>456,8342=>487,8343=>219,8344=>664,8345=>456,8346=>479,8347=>381,8348=>388,8352=>929,8353=>696,8354=>696,8355=>696,8356=>696,8357=>1042,8358=>837,8359=>1518,8360=>1205,8361=>1103,8362=>904,8363=>696,8364=>696,8365=>696,8366=>696,8367=>1392,8368=>696,8369=>696,8370=>696,8371=>696,8372=>859,8373=>696,8376=>696,8377=>696,8378=>769,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>1120,8449=>1170,8450=>734,8451=>1211,8452=>896,8453=>1091,8454=>1144,8455=>614,8456=>698,8457=>1086,8459=>1073,8460=>913,8461=>888,8462=>712,8463=>712,8464=>597,8465=>697,8466=>856,8467=>472,8468=>974,8469=>837,8470=>1203,8471=>1000,8472=>697,8473=>750,8474=>850,8475=>938,8476=>814,8477=>801,8478=>896,8479=>710,8480=>1020,8481=>1281,8482=>1000,8483=>755,8484=>754,8485=>578,8486=>850,8487=>850,8488=>763,8489=>338,8490=>775,8491=>774,8492=>928,8493=>818,8494=>854,8495=>636,8496=>729,8497=>808,8498=>683,8499=>1184,8500=>465,8501=>794,8502=>731,8503=>494,8504=>684,8505=>380,8506=>945,8507=>1348,8508=>790,8509=>737,8510=>654,8511=>863,8512=>840,8513=>775,8514=>557,8515=>637,8516=>760,8517=>830,8518=>716,8519=>678,8520=>343,8521=>343,8523=>872,8526=>547,8528=>1035,8529=>1035,8530=>1483,8531=>1035,8532=>1035,8533=>1035,8534=>1035,8535=>1035,8536=>1035,8537=>1035,8538=>1035,8539=>1035,8540=>1035,8541=>1035,8542=>1035,8543=>615,8544=>372,8545=>659,8546=>945,8547=>1099,8548=>774,8549=>1099,8550=>1386,8551=>1672,8552=>1121,8553=>771,8554=>1120,8555=>1407,8556=>637,8557=>734,8558=>830,8559=>995,8560=>343,8561=>607,8562=>872,8563=>984,8564=>652,8565=>962,8566=>1227,8567=>1491,8568=>969,8569=>645,8570=>969,8571=>1233,8572=>343,8573=>593,8574=>716,8575=>1042,8576=>1289,8577=>830,8578=>1289,8579=>734,8580=>593,8581=>734,8585=>1035,8592=>838,8593=>838,8594=>838,8595=>838,8596=>838,8597=>838,8598=>838,8599=>838,8600=>838,8601=>838,8602=>838,8603=>838,8604=>838,8605=>838,8606=>838,8607=>838,8608=>838,8609=>838,8610=>838,8611=>838,8612=>838,8613=>838,8614=>838,8615=>838,8616=>838,8617=>838,8618=>838,8619=>838,8620=>838,8621=>838,8622=>838,8623=>838,8624=>838,8625=>838,8626=>838,8627=>838,8628=>838,8629=>838,8630=>838,8631=>838,8632=>838,8633=>838,8634=>838,8635=>838,8636=>838,8637=>838,8638=>838,8639=>838,8640=>838,8641=>838,8642=>838,8643=>838,8644=>838,8645=>838,8646=>838,8647=>838,8648=>838,8649=>838,8650=>838,8651=>838,8652=>838,8653=>838,8654=>838,8655=>838,8656=>838,8657=>838,8658=>838,8659=>838,8660=>838,8661=>838,8662=>838,8663=>838,8664=>838,8665=>838,8666=>838,8667=>838,8668=>838,8669=>838,8670=>838,8671=>838,8672=>838,8673=>838,8674=>838,8675=>838,8676=>838,8677=>838,8678=>838,8679=>838,8680=>838,8681=>838,8682=>838,8683=>838,8684=>838,8685=>838,8686=>838,8687=>838,8688=>838,8689=>838,8690=>838,8691=>838,8692=>838,8693=>838,8694=>838,8695=>838,8696=>838,8697=>838,8698=>838,8699=>838,8700=>838,8701=>838,8702=>838,8703=>838,8704=>774,8705=>696,8706=>544,8707=>683,8708=>683,8709=>856,8710=>697,8711=>697,8712=>896,8713=>896,8714=>750,8715=>896,8716=>896,8717=>750,8718=>636,8719=>787,8720=>787,8721=>718,8722=>838,8723=>838,8724=>696,8725=>365,8726=>696,8727=>838,8728=>626,8729=>380,8730=>667,8731=>667,8732=>667,8733=>712,8734=>833,8735=>838,8736=>896,8737=>896,8738=>838,8739=>500,8740=>500,8741=>500,8742=>500,8743=>812,8744=>812,8745=>812,8746=>812,8747=>610,8748=>929,8749=>1295,8750=>563,8751=>977,8752=>1313,8753=>563,8754=>563,8755=>563,8756=>696,8757=>696,8758=>294,8759=>696,8760=>838,8761=>838,8762=>838,8763=>838,8764=>838,8765=>838,8766=>838,8767=>838,8768=>375,8769=>838,8770=>838,8771=>838,8772=>838,8773=>838,8774=>838,8775=>838,8776=>838,8777=>838,8778=>838,8779=>838,8780=>838,8781=>838,8782=>838,8783=>838,8784=>838,8785=>838,8786=>838,8787=>838,8788=>1063,8789=>1063,8790=>838,8791=>838,8792=>838,8793=>838,8794=>838,8795=>838,8796=>838,8797=>838,8798=>838,8799=>838,8800=>838,8801=>838,8802=>838,8803=>838,8804=>838,8805=>838,8806=>838,8807=>838,8808=>841,8809=>841,8810=>1047,8811=>1047,8812=>500,8813=>838,8814=>838,8815=>838,8816=>838,8817=>838,8818=>838,8819=>838,8820=>838,8821=>838,8822=>838,8823=>838,8824=>838,8825=>838,8826=>838,8827=>838,8828=>838,8829=>838,8830=>838,8831=>838,8832=>838,8833=>838,8834=>838,8835=>838,8836=>838,8837=>838,8838=>838,8839=>838,8840=>838,8841=>838,8842=>838,8843=>838,8844=>812,8845=>812,8846=>812,8847=>838,8848=>838,8849=>838,8850=>838,8851=>796,8852=>796,8853=>838,8854=>838,8855=>838,8856=>838,8857=>838,8858=>838,8859=>838,8860=>838,8861=>838,8862=>838,8863=>838,8864=>838,8865=>838,8866=>914,8867=>914,8868=>914,8869=>914,8870=>542,8871=>542,8872=>914,8873=>914,8874=>914,8875=>914,8876=>914,8877=>914,8878=>914,8879=>914,8880=>838,8881=>838,8882=>838,8883=>838,8884=>838,8885=>838,8886=>1000,8887=>1000,8888=>838,8889=>838,8890=>542,8891=>812,8892=>812,8893=>812,8894=>838,8895=>838,8896=>843,8897=>843,8898=>843,8899=>843,8900=>494,8901=>380,8902=>626,8903=>838,8904=>1000,8905=>1000,8906=>1000,8907=>1000,8908=>1000,8909=>838,8910=>812,8911=>812,8912=>838,8913=>838,8914=>838,8915=>838,8916=>838,8917=>838,8918=>838,8919=>838,8920=>1422,8921=>1422,8922=>838,8923=>838,8924=>838,8925=>838,8926=>838,8927=>838,8928=>838,8929=>838,8930=>838,8931=>838,8932=>838,8933=>838,8934=>838,8935=>838,8936=>838,8937=>838,8938=>838,8939=>838,8940=>838,8941=>838,8942=>1000,8943=>1000,8944=>1000,8945=>1000,8946=>1158,8947=>896,8948=>750,8949=>896,8950=>896,8951=>750,8952=>896,8953=>896,8954=>1158,8955=>896,8956=>750,8957=>896,8958=>750,8959=>896,8960=>602,8961=>602,8962=>716,8963=>838,8964=>838,8965=>838,8966=>838,8967=>488,8968=>457,8969=>457,8970=>457,8971=>457,8972=>809,8973=>809,8974=>809,8975=>809,8976=>838,8977=>539,8984=>928,8985=>838,8988=>469,8989=>469,8990=>469,8991=>469,8992=>610,8993=>610,8996=>1152,8997=>1152,8998=>1414,8999=>1152,9000=>1443,9003=>1414,9004=>873,9075=>390,9076=>716,9077=>869,9082=>687,9085=>863,9095=>1152,9108=>873,9115=>500,9116=>500,9117=>500,9118=>500,9119=>500,9120=>500,9121=>500,9122=>500,9123=>500,9124=>500,9125=>500,9126=>500,9127=>750,9128=>750,9129=>750,9130=>750,9131=>750,9132=>750,9133=>750,9134=>610,9166=>838,9167=>945,9187=>873,9189=>769,9192=>696,9250=>716,9251=>716,9312=>847,9313=>847,9314=>847,9315=>847,9316=>847,9317=>847,9318=>847,9319=>847,9320=>847,9321=>847,9600=>769,9601=>769,9602=>769,9603=>769,9604=>769,9605=>769,9606=>769,9607=>769,9608=>769,9609=>769,9610=>769,9611=>769,9612=>769,9613=>769,9614=>769,9615=>769,9616=>769,9617=>769,9618=>769,9619=>769,9620=>769,9621=>769,9622=>769,9623=>769,9624=>769,9625=>769,9626=>769,9627=>769,9628=>769,9629=>769,9630=>769,9631=>769,9632=>945,9633=>945,9634=>945,9635=>945,9636=>945,9637=>945,9638=>945,9639=>945,9640=>945,9641=>945,9642=>678,9643=>678,9644=>945,9645=>945,9646=>550,9647=>550,9648=>769,9649=>769,9650=>769,9651=>769,9652=>502,9653=>502,9654=>769,9655=>769,9656=>502,9657=>502,9658=>769,9659=>769,9660=>769,9661=>769,9662=>502,9663=>502,9664=>769,9665=>769,9666=>502,9667=>502,9668=>769,9669=>769,9670=>769,9671=>769,9672=>769,9673=>873,9674=>494,9675=>873,9676=>873,9677=>873,9678=>873,9679=>873,9680=>873,9681=>873,9682=>873,9683=>873,9684=>873,9685=>873,9686=>527,9687=>527,9688=>840,9689=>970,9690=>970,9691=>970,9692=>387,9693=>387,9694=>387,9695=>387,9696=>769,9697=>769,9698=>769,9699=>769,9700=>769,9701=>769,9702=>639,9703=>945,9704=>945,9705=>945,9706=>945,9707=>945,9708=>769,9709=>769,9710=>769,9711=>1119,9712=>945,9713=>945,9714=>945,9715=>945,9716=>873,9717=>873,9718=>873,9719=>873,9720=>769,9721=>769,9722=>769,9723=>830,9724=>830,9725=>732,9726=>732,9727=>769,9728=>896,9729=>1000,9730=>896,9731=>896,9732=>896,9733=>896,9734=>896,9735=>573,9736=>896,9737=>896,9738=>888,9739=>888,9740=>671,9741=>1013,9742=>1246,9743=>1250,9744=>896,9745=>896,9746=>896,9747=>532,9748=>896,9749=>896,9750=>896,9751=>896,9752=>896,9753=>896,9754=>896,9755=>896,9756=>896,9757=>609,9758=>896,9759=>609,9760=>896,9761=>896,9762=>896,9763=>896,9764=>669,9765=>746,9766=>649,9767=>784,9768=>545,9769=>896,9770=>896,9771=>896,9772=>710,9773=>896,9774=>896,9775=>896,9776=>896,9777=>896,9778=>896,9779=>896,9780=>896,9781=>896,9782=>896,9783=>896,9784=>896,9785=>1042,9786=>1042,9787=>1042,9788=>896,9789=>896,9790=>896,9791=>614,9792=>732,9793=>732,9794=>896,9795=>896,9796=>896,9797=>896,9798=>896,9799=>896,9800=>896,9801=>896,9802=>896,9803=>896,9804=>896,9805=>896,9806=>896,9807=>896,9808=>896,9809=>896,9810=>896,9811=>896,9812=>896,9813=>896,9814=>896,9815=>896,9816=>896,9817=>896,9818=>896,9819=>896,9820=>896,9821=>896,9822=>896,9823=>896,9824=>896,9825=>896,9826=>896,9827=>896,9828=>896,9829=>896,9830=>896,9831=>896,9832=>896,9833=>472,9834=>638,9835=>896,9836=>896,9837=>472,9838=>357,9839=>484,9840=>748,9841=>766,9842=>896,9843=>896,9844=>896,9845=>896,9846=>896,9847=>896,9848=>896,9849=>896,9850=>896,9851=>896,9852=>896,9853=>896,9854=>896,9855=>896,9856=>869,9857=>869,9858=>869,9859=>869,9860=>869,9861=>869,9862=>896,9863=>896,9864=>896,9865=>896,9866=>896,9867=>896,9868=>896,9869=>896,9870=>896,9871=>896,9872=>896,9873=>896,9874=>896,9875=>896,9876=>896,9877=>541,9878=>896,9879=>896,9880=>896,9881=>896,9882=>896,9883=>896,9884=>896,9888=>896,9889=>702,9890=>1004,9891=>1089,9892=>1175,9893=>903,9894=>838,9895=>838,9896=>838,9897=>838,9898=>838,9899=>838,9900=>838,9901=>838,9902=>838,9903=>838,9904=>844,9905=>838,9906=>732,9907=>732,9908=>732,9909=>732,9910=>850,9911=>732,9912=>732,9920=>838,9921=>838,9922=>838,9923=>838,9954=>732,9985=>838,9986=>838,9987=>838,9988=>838,9990=>838,9991=>838,9992=>838,9993=>838,9996=>838,9997=>838,9998=>838,9999=>838,10000=>838,10001=>838,10002=>838,10003=>838,10004=>838,10005=>838,10006=>838,10007=>838,10008=>838,10009=>838,10010=>838,10011=>838,10012=>838,10013=>838,10014=>838,10015=>838,10016=>838,10017=>838,10018=>838,10019=>838,10020=>838,10021=>838,10022=>838,10023=>838,10025=>838,10026=>838,10027=>838,10028=>838,10029=>838,10030=>838,10031=>838,10032=>838,10033=>838,10034=>838,10035=>838,10036=>838,10037=>838,10038=>838,10039=>838,10040=>838,10041=>838,10042=>838,10043=>838,10044=>838,10045=>838,10046=>838,10047=>838,10048=>838,10049=>838,10050=>838,10051=>838,10052=>838,10053=>838,10054=>838,10055=>838,10056=>838,10057=>838,10058=>838,10059=>838,10061=>896,10063=>896,10064=>896,10065=>896,10066=>896,10070=>896,10072=>838,10073=>838,10074=>838,10075=>347,10076=>347,10077=>587,10078=>587,10081=>838,10082=>838,10083=>838,10084=>838,10085=>838,10086=>838,10087=>838,10088=>838,10089=>838,10090=>838,10091=>838,10092=>838,10093=>838,10094=>838,10095=>838,10096=>838,10097=>838,10098=>838,10099=>838,10100=>838,10101=>838,10102=>847,10103=>847,10104=>847,10105=>847,10106=>847,10107=>847,10108=>847,10109=>847,10110=>847,10111=>847,10112=>838,10113=>838,10114=>838,10115=>838,10116=>838,10117=>838,10118=>838,10119=>838,10120=>838,10121=>838,10122=>838,10123=>838,10124=>838,10125=>838,10126=>838,10127=>838,10128=>838,10129=>838,10130=>838,10131=>838,10132=>838,10136=>838,10137=>838,10138=>838,10139=>838,10140=>838,10141=>838,10142=>838,10143=>838,10144=>838,10145=>838,10146=>838,10147=>838,10148=>838,10149=>838,10150=>838,10151=>838,10152=>838,10153=>838,10154=>838,10155=>838,10156=>838,10157=>838,10158=>838,10159=>838,10161=>838,10162=>838,10163=>838,10164=>838,10165=>838,10166=>838,10167=>838,10168=>838,10169=>838,10170=>838,10171=>838,10172=>838,10173=>838,10174=>838,10181=>457,10182=>457,10208=>494,10214=>487,10215=>487,10216=>457,10217=>457,10218=>721,10219=>721,10224=>838,10225=>838,10226=>838,10227=>838,10228=>1157,10229=>1434,10230=>1434,10231=>1434,10232=>1434,10233=>1434,10234=>1434,10235=>1434,10236=>1434,10237=>1434,10238=>1434,10239=>1434,10240=>781,10241=>781,10242=>781,10243=>781,10244=>781,10245=>781,10246=>781,10247=>781,10248=>781,10249=>781,10250=>781,10251=>781,10252=>781,10253=>781,10254=>781,10255=>781,10256=>781,10257=>781,10258=>781,10259=>781,10260=>781,10261=>781,10262=>781,10263=>781,10264=>781,10265=>781,10266=>781,10267=>781,10268=>781,10269=>781,10270=>781,10271=>781,10272=>781,10273=>781,10274=>781,10275=>781,10276=>781,10277=>781,10278=>781,10279=>781,10280=>781,10281=>781,10282=>781,10283=>781,10284=>781,10285=>781,10286=>781,10287=>781,10288=>781,10289=>781,10290=>781,10291=>781,10292=>781,10293=>781,10294=>781,10295=>781,10296=>781,10297=>781,10298=>781,10299=>781,10300=>781,10301=>781,10302=>781,10303=>781,10304=>781,10305=>781,10306=>781,10307=>781,10308=>781,10309=>781,10310=>781,10311=>781,10312=>781,10313=>781,10314=>781,10315=>781,10316=>781,10317=>781,10318=>781,10319=>781,10320=>781,10321=>781,10322=>781,10323=>781,10324=>781,10325=>781,10326=>781,10327=>781,10328=>781,10329=>781,10330=>781,10331=>781,10332=>781,10333=>781,10334=>781,10335=>781,10336=>781,10337=>781,10338=>781,10339=>781,10340=>781,10341=>781,10342=>781,10343=>781,10344=>781,10345=>781,10346=>781,10347=>781,10348=>781,10349=>781,10350=>781,10351=>781,10352=>781,10353=>781,10354=>781,10355=>781,10356=>781,10357=>781,10358=>781,10359=>781,10360=>781,10361=>781,10362=>781,10363=>781,10364=>781,10365=>781,10366=>781,10367=>781,10368=>781,10369=>781,10370=>781,10371=>781,10372=>781,10373=>781,10374=>781,10375=>781,10376=>781,10377=>781,10378=>781,10379=>781,10380=>781,10381=>781,10382=>781,10383=>781,10384=>781,10385=>781,10386=>781,10387=>781,10388=>781,10389=>781,10390=>781,10391=>781,10392=>781,10393=>781,10394=>781,10395=>781,10396=>781,10397=>781,10398=>781,10399=>781,10400=>781,10401=>781,10402=>781,10403=>781,10404=>781,10405=>781,10406=>781,10407=>781,10408=>781,10409=>781,10410=>781,10411=>781,10412=>781,10413=>781,10414=>781,10415=>781,10416=>781,10417=>781,10418=>781,10419=>781,10420=>781,10421=>781,10422=>781,10423=>781,10424=>781,10425=>781,10426=>781,10427=>781,10428=>781,10429=>781,10430=>781,10431=>781,10432=>781,10433=>781,10434=>781,10435=>781,10436=>781,10437=>781,10438=>781,10439=>781,10440=>781,10441=>781,10442=>781,10443=>781,10444=>781,10445=>781,10446=>781,10447=>781,10448=>781,10449=>781,10450=>781,10451=>781,10452=>781,10453=>781,10454=>781,10455=>781,10456=>781,10457=>781,10458=>781,10459=>781,10460=>781,10461=>781,10462=>781,10463=>781,10464=>781,10465=>781,10466=>781,10467=>781,10468=>781,10469=>781,10470=>781,10471=>781,10472=>781,10473=>781,10474=>781,10475=>781,10476=>781,10477=>781,10478=>781,10479=>781,10480=>781,10481=>781,10482=>781,10483=>781,10484=>781,10485=>781,10486=>781,10487=>781,10488=>781,10489=>781,10490=>781,10491=>781,10492=>781,10493=>781,10494=>781,10495=>781,10502=>838,10503=>838,10506=>838,10507=>838,10560=>838,10561=>838,10627=>753,10628=>753,10702=>838,10703=>1046,10704=>1046,10705=>1000,10706=>1000,10707=>1000,10708=>1000,10709=>1000,10731=>494,10746=>838,10747=>838,10752=>1000,10753=>1000,10754=>1000,10764=>1661,10765=>563,10766=>563,10767=>563,10768=>563,10769=>563,10770=>563,10771=>563,10772=>563,10773=>563,10774=>563,10775=>563,10776=>563,10777=>563,10778=>563,10779=>563,10780=>563,10799=>838,10858=>838,10859=>838,10877=>838,10878=>838,10879=>838,10880=>838,10881=>838,10882=>838,10883=>838,10884=>838,10885=>838,10886=>838,10887=>838,10888=>838,10889=>838,10890=>838,10891=>838,10892=>838,10893=>838,10894=>838,10895=>838,10896=>838,10897=>838,10898=>838,10899=>838,10900=>838,10901=>838,10902=>838,10903=>838,10904=>838,10905=>838,10906=>838,10907=>838,10908=>838,10909=>838,10910=>838,10911=>838,10912=>838,10926=>838,10927=>838,10928=>838,10929=>838,10930=>838,10931=>838,10932=>838,10933=>838,10934=>838,10935=>838,10936=>838,10937=>838,10938=>838,11001=>838,11002=>838,11008=>838,11009=>838,11010=>838,11011=>838,11012=>838,11013=>838,11014=>838,11015=>838,11016=>838,11017=>838,11018=>838,11019=>838,11020=>838,11021=>838,11022=>838,11023=>838,11024=>838,11025=>838,11026=>945,11027=>945,11028=>945,11029=>945,11030=>769,11031=>769,11032=>769,11033=>769,11034=>945,11039=>869,11040=>869,11041=>873,11042=>873,11043=>873,11044=>1119,11091=>869,11092=>869,11360=>637,11361=>360,11362=>637,11363=>733,11364=>770,11365=>675,11366=>478,11367=>956,11368=>712,11369=>775,11370=>665,11371=>725,11372=>582,11373=>860,11374=>995,11375=>774,11376=>860,11377=>778,11378=>1221,11379=>1056,11380=>652,11381=>698,11382=>565,11383=>782,11385=>538,11386=>687,11387=>559,11388=>219,11389=>487,11390=>720,11391=>725,11520=>663,11521=>676,11522=>661,11523=>629,11524=>661,11525=>1032,11526=>718,11527=>1032,11528=>648,11529=>667,11530=>1032,11531=>673,11532=>677,11533=>1036,11534=>680,11535=>886,11536=>1032,11537=>683,11538=>674,11539=>1035,11540=>1033,11541=>1027,11542=>676,11543=>673,11544=>667,11545=>667,11546=>660,11547=>671,11548=>1039,11549=>673,11550=>692,11551=>659,11552=>1048,11553=>660,11554=>654,11555=>670,11556=>733,11557=>1017,11568=>691,11569=>941,11570=>941,11571=>725,11572=>725,11573=>725,11574=>676,11575=>774,11576=>774,11577=>683,11578=>683,11579=>802,11580=>989,11581=>761,11582=>623,11583=>761,11584=>941,11585=>941,11586=>373,11587=>740,11588=>837,11589=>914,11590=>672,11591=>737,11592=>680,11593=>683,11594=>602,11595=>1039,11596=>778,11597=>837,11598=>683,11599=>372,11600=>778,11601=>373,11602=>725,11603=>691,11604=>941,11605=>941,11606=>837,11607=>373,11608=>836,11609=>941,11610=>941,11611=>734,11612=>876,11613=>771,11614=>734,11615=>683,11616=>774,11617=>837,11618=>683,11619=>850,11620=>697,11621=>850,11631=>716,11800=>580,11807=>838,11810=>457,11811=>457,11812=>457,11813=>457,11822=>580,19904=>896,19905=>896,19906=>896,19907=>896,19908=>896,19909=>896,19910=>896,19911=>896,19912=>896,19913=>896,19914=>896,19915=>896,19916=>896,19917=>896,19918=>896,19919=>896,19920=>896,19921=>896,19922=>896,19923=>896,19924=>896,19925=>896,19926=>896,19927=>896,19928=>896,19929=>896,19930=>896,19931=>896,19932=>896,19933=>896,19934=>896,19935=>896,19936=>896,19937=>896,19938=>896,19939=>896,19940=>896,19941=>896,19942=>896,19943=>896,19944=>896,19945=>896,19946=>896,19947=>896,19948=>896,19949=>896,19950=>896,19951=>896,19952=>896,19953=>896,19954=>896,19955=>896,19956=>896,19957=>896,19958=>896,19959=>896,19960=>896,19961=>896,19962=>896,19963=>896,19964=>896,19965=>896,19966=>896,19967=>896,42192=>762,42193=>733,42194=>733,42195=>830,42196=>682,42197=>682,42198=>821,42199=>775,42200=>775,42201=>530,42202=>734,42203=>734,42204=>725,42205=>683,42206=>683,42207=>995,42208=>837,42209=>637,42210=>720,42211=>770,42212=>770,42213=>774,42214=>774,42215=>837,42216=>775,42217=>530,42218=>1103,42219=>771,42220=>724,42221=>762,42222=>774,42223=>774,42224=>683,42225=>683,42226=>372,42227=>850,42228=>812,42229=>812,42230=>557,42231=>830,42232=>322,42233=>322,42234=>674,42235=>674,42236=>322,42237=>322,42238=>588,42239=>588,42564=>720,42565=>595,42566=>436,42567=>440,42572=>1405,42573=>1173,42576=>1234,42577=>1027,42580=>1174,42581=>972,42582=>1093,42583=>958,42594=>1085,42595=>924,42596=>1096,42597=>912,42598=>1260,42599=>997,42600=>850,42601=>687,42602=>1037,42603=>868,42604=>1406,42605=>1106,42606=>961,42634=>963,42635=>787,42636=>682,42637=>580,42644=>808,42645=>712,42760=>500,42761=>500,42762=>500,42763=>500,42764=>500,42765=>500,42766=>500,42767=>500,42768=>500,42769=>500,42770=>500,42771=>500,42772=>500,42773=>500,42774=>500,42779=>400,42780=>400,42781=>287,42782=>287,42783=>287,42786=>444,42787=>390,42788=>540,42789=>540,42790=>837,42791=>712,42792=>1031,42793=>857,42794=>696,42795=>557,42800=>559,42801=>595,42802=>1349,42803=>1052,42804=>1284,42805=>1064,42806=>1216,42807=>1054,42808=>1079,42809=>922,42810=>1079,42811=>922,42812=>1035,42813=>922,42814=>698,42815=>549,42816=>656,42817=>688,42822=>850,42823=>542,42824=>683,42825=>531,42826=>918,42827=>814,42830=>1406,42831=>1106,42832=>733,42833=>716,42834=>948,42835=>937,42838=>850,42839=>716,42852=>738,42853=>716,42854=>738,42855=>716,42880=>637,42881=>343,42882=>837,42883=>712,42889=>400,42890=>386,42891=>456,42892=>306,42893=>808,42894=>693,42896=>928,42897=>768,42912=>821,42913=>716,42914=>775,42915=>665,42916=>837,42917=>712,42918=>770,42919=>493,42920=>720,42921=>595,42922=>886,43002=>1062,43003=>683,43004=>733,43005=>995,43006=>372,43007=>1325,61184=>216,61185=>242,61186=>267,61187=>277,61188=>282,61189=>242,61190=>216,61191=>242,61192=>267,61193=>277,61194=>267,61195=>242,61196=>216,61197=>242,61198=>267,61199=>277,61200=>267,61201=>242,61202=>216,61203=>242,61204=>282,61205=>277,61206=>267,61207=>242,61208=>216,61209=>282,62464=>612,62465=>612,62466=>653,62467=>902,62468=>622,62469=>622,62470=>661,62471=>895,62472=>589,62473=>622,62474=>1163,62475=>626,62476=>627,62477=>893,62478=>612,62479=>626,62480=>924,62481=>627,62482=>744,62483=>634,62484=>886,62485=>626,62486=>907,62487=>626,62488=>621,62489=>628,62490=>677,62491=>626,62492=>621,62493=>630,62494=>627,62495=>571,62496=>622,62497=>631,62498=>612,62499=>611,62500=>618,62501=>671,62502=>963,62504=>1023,62505=>844,62506=>563,62507=>563,62508=>563,62509=>563,62510=>563,62511=>563,62512=>555,62513=>555,62514=>555,62515=>555,62516=>573,62517=>573,62518=>573,62519=>824,62520=>824,62521=>824,62522=>824,62523=>824,62524=>611,62525=>611,62526=>611,62527=>611,62528=>611,62529=>611,63173=>687,64256=>810,64257=>741,64258=>741,64259=>1115,64260=>1116,64261=>808,64262=>1020,64275=>1388,64276=>1384,64277=>1378,64278=>1384,64279=>1713,64285=>294,64286=>0,64287=>519,64288=>665,64289=>939,64290=>788,64291=>920,64292=>786,64293=>857,64294=>869,64295=>821,64296=>890,64297=>838,64298=>758,64299=>758,64300=>758,64301=>758,64302=>728,64303=>728,64304=>728,64305=>610,64306=>447,64307=>588,64308=>687,64309=>437,64310=>485,64312=>679,64313=>435,64314=>578,64315=>566,64316=>605,64318=>724,64320=>453,64321=>680,64323=>675,64324=>658,64326=>653,64327=>736,64328=>602,64329=>758,64330=>683,64331=>343,64332=>610,64333=>566,64334=>658,64335=>710,64338=>1005,64339=>1059,64340=>375,64341=>408,64342=>1005,64343=>1059,64344=>375,64345=>408,64346=>1005,64347=>1059,64348=>375,64349=>408,64350=>1005,64351=>1059,64352=>375,64353=>408,64354=>1005,64355=>1059,64356=>375,64357=>408,64358=>1005,64359=>1059,64360=>375,64361=>408,64362=>1162,64363=>1191,64364=>655,64365=>720,64366=>1162,64367=>1191,64368=>655,64369=>720,64370=>721,64371=>721,64372=>721,64373=>721,64374=>721,64375=>721,64376=>721,64377=>721,64378=>721,64379=>721,64380=>721,64381=>721,64382=>721,64383=>721,64384=>721,64385=>721,64386=>513,64387=>578,64388=>513,64389=>578,64390=>513,64391=>578,64392=>513,64393=>578,64394=>576,64395=>622,64396=>576,64397=>622,64398=>1024,64399=>1024,64400=>582,64401=>582,64402=>1024,64403=>1024,64404=>582,64405=>582,64406=>1024,64407=>1024,64408=>582,64409=>582,64410=>1024,64411=>1024,64412=>582,64413=>582,64414=>854,64415=>900,64416=>854,64417=>900,64418=>375,64419=>408,64426=>938,64427=>880,64428=>693,64429=>660,64467=>824,64468=>843,64469=>476,64470=>552,64473=>622,64474=>627,64488=>375,64489=>408,64508=>917,64509=>1012,64510=>375,64511=>408,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65136=>342,65137=>342,65138=>342,65139=>346,65140=>342,65142=>342,65143=>342,65144=>342,65145=>342,65146=>342,65147=>342,65148=>342,65149=>342,65150=>342,65151=>342,65152=>511,65153=>343,65154=>375,65155=>343,65156=>375,65157=>622,65158=>627,65159=>343,65160=>375,65161=>917,65162=>917,65163=>375,65164=>408,65165=>343,65166=>375,65167=>1005,65168=>1059,65169=>375,65170=>408,65171=>590,65172=>606,65173=>1005,65174=>1059,65175=>375,65176=>408,65177=>1005,65178=>1059,65179=>375,65180=>408,65181=>721,65182=>721,65183=>721,65184=>721,65185=>721,65186=>721,65187=>721,65188=>721,65189=>721,65190=>721,65191=>721,65192=>721,65193=>513,65194=>578,65195=>513,65196=>578,65197=>576,65198=>622,65199=>576,65200=>622,65201=>1380,65202=>1414,65203=>983,65204=>1018,65205=>1380,65206=>1414,65207=>983,65208=>1018,65209=>1345,65210=>1364,65211=>966,65212=>985,65213=>1345,65214=>1364,65215=>966,65216=>985,65217=>1039,65218=>1071,65219=>942,65220=>974,65221=>1039,65222=>1071,65223=>942,65224=>974,65225=>683,65226=>683,65227=>683,65228=>564,65229=>683,65230=>683,65231=>683,65232=>564,65233=>1162,65234=>1191,65235=>655,65236=>720,65237=>894,65238=>901,65239=>655,65240=>720,65241=>917,65242=>931,65243=>582,65244=>582,65245=>868,65246=>893,65247=>375,65248=>408,65249=>733,65250=>784,65251=>619,65252=>670,65253=>854,65254=>900,65255=>375,65256=>408,65257=>590,65258=>606,65259=>693,65260=>660,65261=>622,65262=>627,65263=>917,65264=>1012,65265=>917,65266=>1012,65267=>375,65268=>408,65269=>745,65270=>759,65271=>745,65272=>759,65273=>745,65274=>759,65275=>745,65276=>759,65279=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>1113,65535=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansb.z b/lib/combodo/tcpdf/fonts/dejavusansb.z deleted file mode 100644 index 07031ce34..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansb.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansbi.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansbi.ctg.z deleted file mode 100644 index 23445ef2f..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansbi.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansbi.php b/lib/combodo/tcpdf/fonts/dejavusansbi.php deleted file mode 100644 index e4a66708b..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansbi.php +++ /dev/null @@ -1,16 +0,0 @@ -96,'FontBBox'=>'[-1067 -385 1999 1121]','ItalicAngle'=>-11,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>60,'StemH'=>26,'AvgWidth'=>573,'MaxWidth'=>2016,'MissingWidth'=>600); -$cbbox=array(0=>array(50,-177,550,705),33=>array(69,0,387,729),34=>array(95,458,426,729),35=>array(65,0,780,718),36=>array(27,-147,630,760),37=>array(55,-14,947,742),38=>array(28,-14,813,742),39=>array(95,458,211,729),40=>array(77,-132,468,759),41=>array(-27,-132,364,759),42=>array(20,278,503,742),43=>array(106,0,732,627),44=>array(-34,-142,256,189),45=>array(25,217,360,359),46=>array(46,0,259,189),47=>array(-96,-93,434,729),48=>array(36,-14,660,742),49=>array(43,0,578,729),50=>array(8,0,640,742),51=>array(0,-14,637,742),52=>array(-1,0,635,729),53=>array(13,-14,644,729),54=>array(50,-15,660,741),55=>array(78,0,694,729),56=>array(22,-14,659,742),57=>array(41,-15,652,741),58=>array(41,0,323,547),59=>array(-35,-142,323,547),60=>array(106,30,732,597),61=>array(106,144,732,482),62=>array(106,30,732,597),63=>array(104,0,554,742),64=>array(45,-172,927,703),65=>array(-65,0,691,729),66=>array(21,0,699,729),67=>array(36,-14,724,742),68=>array(21,0,786,729),69=>array(21,0,670,729),70=>array(21,0,670,729),71=>array(36,-14,778,742),72=>array(21,0,816,729),73=>array(21,0,351,729),74=>array(-166,-200,351,729),75=>array(21,0,837,729),76=>array(21,0,566,729),77=>array(21,0,974,729),78=>array(21,0,816,729),79=>array(36,-14,814,742),80=>array(21,0,719,729),81=>array(36,-146,814,742),82=>array(21,0,685,729),83=>array(15,-14,665,742),84=>array(48,0,748,729),85=>array(68,-14,791,729),86=>array(76,0,840,729),87=>array(107,0,1143,729),88=>array(-51,0,812,729),89=>array(63,0,809,729),90=>array(-26,0,740,729),91=>array(-10,-132,466,760),92=>array(71,-93,276,729),93=>array(-28,-132,448,760),94=>array(101,457,737,729),95=>array(-10,-236,510,-143),96=>array(131,616,371,800),97=>array(17,-14,611,560),98=>array(31,-14,677,760),99=>array(37,-14,581,560),100=>array(36,-14,724,760),101=>array(36,-14,640,560),102=>array(50,0,540,760),103=>array(20,-216,682,559),104=>array(31,0,654,760),105=>array(31,0,354,760),106=>array(-128,-216,354,760),107=>array(31,0,716,760),108=>array(31,0,354,760),109=>array(31,0,984,560),110=>array(31,0,654,560),111=>array(36,-14,651,560),112=>array(-10,-208,677,560),113=>array(36,-208,682,560),114=>array(31,0,545,560),115=>array(10,-14,560,560),116=>array(43,0,509,702),117=>array(60,-14,681,547),118=>array(63,0,678,547),119=>array(87,0,927,547),120=>array(-41,0,671,547),121=>array(0,-216,687,547),122=>array(-9,0,586,547),123=>array(106,-163,669,760),124=>array(127,-236,238,764),125=>array(44,-163,606,760),126=>array(106,212,732,415),161=>array(69,0,387,729),162=>array(67,-153,610,699),163=>array(7,0,691,742),164=>array(36,30,601,596),165=>array(6,0,755,729),166=>array(127,-171,238,699),167=>array(-33,-95,494,742),168=>array(152,654,484,774),169=>array(138,0,862,725),170=>array(43,182,527,742),171=>array(61,67,594,519),172=>array(106,140,732,444),173=>array(25,217,360,359),174=>array(138,0,862,725),175=>array(155,668,481,760),176=>array(87,424,412,749),177=>array(106,0,732,627),178=>array(45,326,431,742),179=>array(40,319,427,742),180=>array(227,616,539,800),181=>array(-27,-209,670,547),182=>array(74,-96,603,729),183=>array(84,253,297,442),184=>array(22,-196,259,0),185=>array(67,326,395,734),186=>array(46,182,545,742),187=>array(57,66,589,519),188=>array(56,-14,948,742),189=>array(56,-14,1036,742),190=>array(47,-14,948,742),191=>array(37,-13,488,729),192=>array(-65,0,691,927),193=>array(-65,0,691,927),194=>array(-65,0,691,927),195=>array(-65,0,691,928),196=>array(-65,0,691,927),197=>array(-65,0,691,928),198=>array(-78,0,1072,729),199=>array(36,-196,724,742),200=>array(21,0,670,927),201=>array(21,0,670,927),202=>array(21,0,670,927),203=>array(21,0,670,927),204=>array(21,0,351,927),205=>array(21,0,448,927),206=>array(21,0,440,927),207=>array(21,0,442,927),208=>array(-2,0,803,729),209=>array(21,0,816,928),210=>array(36,-14,814,927),211=>array(36,-14,814,927),212=>array(36,-14,814,927),213=>array(36,-14,814,928),214=>array(36,-14,814,927),215=>array(125,20,713,607),216=>array(-47,-38,896,771),217=>array(68,-14,791,927),218=>array(68,-14,791,927),219=>array(68,-14,791,927),220=>array(68,-14,791,927),221=>array(63,0,809,927),222=>array(21,0,695,729),223=>array(31,-14,666,760),224=>array(17,-14,611,800),225=>array(17,-14,627,800),226=>array(17,-14,611,800),227=>array(17,-14,611,778),228=>array(17,-14,611,774),229=>array(17,-14,611,883),230=>array(17,-14,1008,560),231=>array(37,-196,581,560),232=>array(36,-14,640,800),233=>array(36,-14,650,800),234=>array(36,-14,640,800),235=>array(36,-14,640,774),236=>array(31,0,313,800),237=>array(31,0,470,800),238=>array(31,0,414,800),239=>array(31,0,415,774),240=>array(36,-14,678,760),241=>array(31,0,654,778),242=>array(36,-14,651,800),243=>array(36,-14,651,800),244=>array(36,-14,651,800),245=>array(36,-14,651,778),246=>array(36,-14,651,774),247=>array(106,42,732,585),248=>array(-17,-50,700,597),249=>array(60,-14,681,800),250=>array(60,-14,681,800),251=>array(60,-14,681,800),252=>array(60,-14,681,774),253=>array(0,-216,687,800),254=>array(-10,-208,677,760),255=>array(0,-216,687,774),256=>array(-65,0,691,914),257=>array(17,-14,611,763),258=>array(-65,0,691,936),259=>array(17,-14,611,772),260=>array(-65,-196,691,729),261=>array(17,-196,611,560),262=>array(36,-14,724,927),263=>array(37,-14,645,800),264=>array(36,-14,724,927),265=>array(37,-14,589,800),266=>array(36,-14,724,927),267=>array(37,-14,581,759),268=>array(36,-14,732,927),269=>array(37,-14,634,800),270=>array(21,0,786,927),271=>array(36,-14,947,760),272=>array(-2,0,803,729),273=>array(36,-14,817,760),274=>array(21,0,670,914),275=>array(36,-14,640,763),276=>array(21,0,670,927),277=>array(36,-14,640,784),278=>array(21,0,670,927),279=>array(36,-14,640,759),280=>array(21,-196,670,729),281=>array(36,-196,640,560),282=>array(21,0,670,927),283=>array(36,-14,640,800),284=>array(36,-14,778,927),285=>array(20,-216,682,800),286=>array(36,-14,778,927),287=>array(20,-216,682,784),288=>array(36,-14,778,927),289=>array(20,-216,682,759),290=>array(36,-224,778,742),291=>array(20,-216,682,765),292=>array(21,0,816,927),293=>array(31,0,654,927),294=>array(89,0,935,729),295=>array(85,0,708,760),296=>array(21,0,456,928),297=>array(31,0,431,778),298=>array(21,0,417,914),299=>array(31,0,402,763),300=>array(21,0,453,927),301=>array(31,0,427,784),302=>array(21,-196,351,729),303=>array(31,-196,354,760),304=>array(21,0,355,927),305=>array(31,0,313,547),306=>array(21,-200,723,729),307=>array(31,-216,697,760),308=>array(-166,-200,453,927),309=>array(-128,-216,428,800),310=>array(21,-209,837,729),311=>array(31,-209,716,760),312=>array(31,0,716,547),313=>array(21,0,566,928),314=>array(31,0,478,928),315=>array(21,-209,566,729),316=>array(-23,-209,354,760),317=>array(21,0,623,729),318=>array(31,0,582,760),319=>array(21,0,624,729),320=>array(31,0,555,760),321=>array(-23,0,603,729),322=>array(-7,0,456,760),323=>array(21,0,816,928),324=>array(31,0,654,803),325=>array(21,-209,816,729),326=>array(31,-209,654,560),327=>array(21,0,816,927),328=>array(31,0,654,800),329=>array(61,0,911,729),330=>array(31,-200,775,742),331=>array(50,-216,673,560),332=>array(36,-14,814,914),333=>array(36,-14,651,763),334=>array(36,-14,814,927),335=>array(36,-14,651,784),336=>array(36,-14,814,927),337=>array(36,-14,657,800),338=>array(42,0,1154,729),339=>array(36,-14,1054,560),340=>array(21,0,685,928),341=>array(31,0,618,803),342=>array(21,-209,685,729),343=>array(-23,-209,545,560),344=>array(21,0,685,927),345=>array(31,0,602,800),346=>array(15,-14,665,928),347=>array(10,-14,618,803),348=>array(15,-14,665,927),349=>array(10,-14,560,800),350=>array(15,-196,665,742),351=>array(10,-196,560,560),352=>array(15,-14,665,927),353=>array(10,-14,576,800),354=>array(48,-196,748,729),355=>array(43,-196,509,702),356=>array(48,0,748,927),357=>array(43,0,615,800),358=>array(48,0,748,729),359=>array(-11,0,493,702),360=>array(68,-14,791,928),361=>array(60,-14,681,778),362=>array(68,-14,791,914),363=>array(60,-14,681,763),364=>array(68,-14,791,927),365=>array(60,-14,681,784),366=>array(68,-14,791,923),367=>array(60,-14,681,873),368=>array(68,-14,791,927),369=>array(60,-14,681,800),370=>array(68,-196,791,729),371=>array(60,-196,681,547),372=>array(107,0,1143,931),373=>array(87,0,927,800),374=>array(63,0,809,931),375=>array(0,-216,687,800),376=>array(63,0,809,927),377=>array(-26,0,740,928),378=>array(-9,0,618,803),379=>array(-26,0,740,918),380=>array(-9,0,586,759),381=>array(-26,0,740,927),382=>array(-9,0,586,800),383=>array(50,0,540,760),384=>array(12,-14,651,760),385=>array(-37,0,744,729),386=>array(21,0,714,729),387=>array(12,-14,662,760),388=>array(61,0,704,729),389=>array(37,-14,677,760),390=>array(-13,-14,675,742),391=>array(32,-14,909,924),392=>array(27,-14,715,724),393=>array(-2,0,803,729),394=>array(-37,0,830,729),395=>array(65,0,763,729),396=>array(25,-14,707,760),397=>array(57,-208,662,548),398=>array(21,0,681,729),399=>array(36,-14,819,742),400=>array(37,-14,652,742),401=>array(-146,-200,689,729),402=>array(-151,-208,538,760),403=>array(32,-14,959,924),404=>array(94,-210,882,729),405=>array(10,-1,980,760),406=>array(74,0,384,729),407=>array(-7,0,397,729),408=>array(20,0,827,742),409=>array(10,0,695,760),410=>array(-10,0,365,760),411=>array(-44,0,536,760),412=>array(55,-13,1035,729),413=>array(-146,-200,835,729),414=>array(50,-208,664,560),415=>array(36,-14,814,742),416=>array(39,-14,907,760),417=>array(40,-14,771,570),418=>array(50,-14,1056,742),419=>array(63,-216,891,560),420=>array(-37,0,765,729),421=>array(-10,-208,670,760),422=>array(35,-146,684,729),423=>array(-1,-14,631,742),424=>array(-7,-14,534,560),425=>array(21,0,670,729),426=>array(34,-217,539,759),427=>array(48,-216,514,702),428=>array(36,0,772,729),429=>array(21,0,512,760),430=>array(67,-200,767,729),431=>array(67,-14,938,761),432=>array(57,-14,795,570),433=>array(42,-14,813,723),434=>array(74,0,764,729),435=>array(60,0,841,742),436=>array(24,-216,822,560),437=>array(-26,0,740,729),438=>array(-8,0,587,547),439=>array(21,-33,743,729),440=>array(10,-33,771,729),441=>array(6,-215,647,547),442=>array(-11,-208,585,547),443=>array(7,0,634,742),444=>array(11,-33,696,729),445=>array(-30,-215,573,547),446=>array(-27,-15,508,702),447=>array(-12,-208,693,560),448=>array(0,-208,371,729),449=>array(0,-208,658,729),450=>array(-23,-208,574,729),451=>array(27,0,346,729),452=>array(21,0,1570,927),453=>array(21,0,1416,800),454=>array(36,-14,1302,800),455=>array(21,-200,988,729),456=>array(21,-216,991,760),457=>array(31,-216,697,760),458=>array(21,-200,1188,729),459=>array(21,-216,1191,760),460=>array(31,-216,1066,760),461=>array(-65,0,691,927),462=>array(17,-14,615,800),463=>array(21,0,473,927),464=>array(31,0,457,800),465=>array(36,-14,814,927),466=>array(36,-14,651,800),467=>array(68,-14,791,927),468=>array(60,-14,681,800),469=>array(68,-14,791,1040),470=>array(60,-14,681,914),471=>array(68,-14,791,1057),472=>array(60,-14,681,917),473=>array(68,-14,791,1058),474=>array(60,-14,681,917),475=>array(68,-14,791,1057),476=>array(60,-14,681,917),477=>array(42,-14,630,560),478=>array(-65,0,691,1040),479=>array(17,-14,611,914),480=>array(-65,0,691,1040),481=>array(17,-14,620,881),482=>array(-78,0,1072,914),483=>array(17,-14,1008,758),484=>array(36,-14,778,742),485=>array(20,-216,682,559),486=>array(36,-14,778,927),487=>array(20,-216,682,799),488=>array(21,0,837,926),489=>array(31,0,716,926),490=>array(36,-196,814,742),491=>array(36,-196,651,560),492=>array(36,-196,814,914),493=>array(36,-196,651,763),494=>array(21,-33,743,927),495=>array(-44,-215,588,793),496=>array(-128,-216,466,800),497=>array(21,0,1570,729),498=>array(21,0,1416,729),499=>array(36,-14,1302,760),500=>array(36,-14,778,928),501=>array(20,-216,682,798),502=>array(22,-14,1222,729),503=>array(-20,-208,775,742),504=>array(21,0,816,927),505=>array(31,0,654,798),506=>array(-65,0,867,986),507=>array(17,-14,814,931),508=>array(-78,0,1072,928),509=>array(17,-14,1008,799),510=>array(-47,-38,896,928),511=>array(-17,-50,700,800),512=>array(-65,0,691,930),513=>array(17,-14,611,800),514=>array(-65,0,691,947),515=>array(17,-14,611,784),516=>array(21,0,670,930),517=>array(36,-14,640,800),518=>array(21,0,670,947),519=>array(36,-14,640,784),520=>array(21,0,437,930),521=>array(31,0,409,799),522=>array(21,0,447,947),523=>array(31,0,417,784),524=>array(36,-14,814,930),525=>array(36,-14,651,800),526=>array(36,-14,814,947),527=>array(36,-14,651,784),528=>array(21,0,685,930),529=>array(31,0,545,800),530=>array(21,0,685,947),531=>array(31,0,545,784),532=>array(68,-14,791,930),533=>array(60,-14,681,800),534=>array(68,-14,791,947),535=>array(60,-14,681,784),536=>array(15,-236,665,742),537=>array(10,-236,560,560),538=>array(48,-236,748,729),539=>array(43,-236,509,702),540=>array(-45,-210,649,742),541=>array(-47,-211,564,560),542=>array(21,0,816,926),543=>array(31,0,654,926),544=>array(32,-208,764,742),545=>array(31,-75,786,760),546=>array(25,-14,769,742),547=>array(22,-14,656,646),548=>array(-5,-216,761,729),549=>array(13,-216,608,547),550=>array(-65,0,691,927),551=>array(17,-14,611,759),552=>array(21,-192,670,729),553=>array(36,-196,640,560),554=>array(36,-14,814,1040),555=>array(36,-14,651,914),556=>array(36,-14,814,1040),557=>array(36,-14,651,914),558=>array(36,-14,814,928),559=>array(36,-14,651,759),560=>array(36,-14,814,1040),561=>array(36,-14,651,914),562=>array(63,0,809,914),563=>array(0,-216,687,763),564=>array(32,-75,413,760),565=>array(37,-75,808,560),566=>array(34,-76,500,702),567=>array(-128,-216,313,547),568=>array(25,-14,1023,760),569=>array(64,-208,1062,560),570=>array(-81,-36,854,765),571=>array(-101,-36,834,765),572=>array(-61,-46,652,594),573=>array(-13,0,566,729),574=>array(-127,-36,809,765),575=>array(33,-240,583,560),576=>array(15,-240,611,547),577=>array(69,0,765,729),578=>array(56,0,582,560),579=>array(-35,0,695,729),580=>array(20,-14,804,729),581=>array(-66,0,698,729),582=>array(21,-93,681,822),583=>array(36,-93,638,640),584=>array(-166,-200,368,729),585=>array(-128,-216,368,760),586=>array(66,-200,863,741),587=>array(64,-216,747,560),588=>array(-12,0,685,729),589=>array(-33,0,543,560),590=>array(30,0,805,729),591=>array(10,-216,708,547),592=>array(66,-14,660,560),593=>array(45,-14,685,560),594=>array(-8,-14,632,560),595=>array(12,-14,651,760),596=>array(-7,-14,537,560),597=>array(48,-69,581,560),598=>array(45,-216,727,760),599=>array(25,-14,876,760),600=>array(22,-14,630,560),601=>array(42,-14,630,560),602=>array(38,-14,890,560),603=>array(27,-14,520,560),604=>array(-50,-11,509,560),605=>array(-50,-11,788,560),606=>array(54,-14,679,560),607=>array(-107,-216,388,547),608=>array(23,-216,896,760),609=>array(44,-216,706,547),610=>array(43,-14,573,546),611=>array(87,-211,692,547),612=>array(80,-21,674,547),613=>array(88,-214,703,546),614=>array(10,0,625,760),615=>array(31,-216,646,760),616=>array(52,0,448,760),617=>array(74,-1,326,547),618=>array(31,0,515,547),619=>array(70,0,488,760),620=>array(93,0,613,760),621=>array(32,-216,356,760),622=>array(31,-215,788,760),623=>array(69,-14,1013,546),624=>array(88,-209,1032,546),625=>array(49,-216,994,560),626=>array(-160,-216,665,560),627=>array(50,-216,749,560),628=>array(-32,0,613,547),629=>array(36,-14,651,560),630=>array(43,-1,871,547),631=>array(-9,0,580,574),632=>array(60,-208,729,760),633=>array(31,-13,544,547),634=>array(10,-13,565,760),635=>array(50,-216,607,547),636=>array(9,-208,563,560),637=>array(51,-216,564,560),638=>array(31,0,583,547),639=>array(99,0,499,547),640=>array(-32,0,509,547),641=>array(-32,0,613,547),642=>array(28,-216,581,560),643=>array(-126,-216,519,760),644=>array(-106,-216,539,760),645=>array(137,-216,486,560),646=>array(-97,-217,655,760),647=>array(-25,-155,441,547),648=>array(48,-216,514,702),649=>array(74,-14,845,547),650=>array(22,-51,690,547),651=>array(74,-1,626,547),652=>array(-38,0,584,547),653=>array(-18,0,836,547),654=>array(-62,0,620,763),655=>array(53,0,648,547),656=>array(13,-216,651,547),657=>array(-1,-69,599,547),658=>array(-23,-215,608,547),659=>array(25,-215,608,547),660=>array(59,0,546,759),661=>array(57,0,592,759),662=>array(-31,0,504,759),663=>array(-5,-208,612,759),664=>array(50,-14,800,742),665=>array(31,0,593,547),666=>array(31,-14,665,560),667=>array(22,0,768,760),668=>array(28,0,658,547),669=>array(-235,-217,354,760),670=>array(73,-213,758,547),671=>array(31,0,473,547),672=>array(44,-208,895,760),673=>array(-3,0,546,759),674=>array(57,0,592,759),675=>array(25,-14,1142,760),676=>array(45,-215,1161,760),677=>array(29,-55,1145,760),678=>array(27,0,926,702),679=>array(42,-216,872,760),680=>array(34,-69,923,702),681=>array(48,-216,990,760),682=>array(10,0,808,760),683=>array(10,0,764,760),684=>array(20,0,631,641),685=>array(-31,86,399,641),686=>array(-18,-214,682,760),687=>array(-16,-216,724,760),688=>array(12,326,401,751),689=>array(12,326,400,751),690=>array(-75,205,219,751),691=>array(23,326,344,640),692=>array(24,319,344,632),693=>array(35,205,392,632),694=>array(-16,326,388,632),695=>array(52,326,599,632),696=>array(22,205,447,632),697=>array(78,557,218,800),698=>array(78,557,437,800),699=>array(113,418,389,729),700=>array(73,418,348,729),701=>array(198,616,347,856),702=>array(168,481,334,760),703=>array(159,481,325,760),704=>array(43,326,348,751),705=>array(35,326,374,751),706=>array(184,517,463,843),707=>array(161,517,440,843),708=>array(125,561,452,800),709=>array(172,561,499,800),710=>array(106,616,483,800),711=>array(151,616,528,800),712=>array(81,488,226,759),713=>array(155,668,481,760),714=>array(227,616,539,800),715=>array(131,616,371,800),716=>array(81,-81,226,190),717=>array(-11,-185,315,-93),718=>array(131,-238,371,-54),719=>array(227,-238,539,-54),720=>array(-8,0,299,547),721=>array(63,361,264,547),722=>array(126,269,292,547),723=>array(118,269,284,547),724=>array(116,238,353,458),725=>array(145,238,382,458),726=>array(46,119,370,427),727=>array(46,229,282,317),728=>array(166,639,496,784),729=>array(239,654,397,774),730=>array(184,605,462,883),731=>array(73,-196,284,0),732=>array(133,638,500,778),733=>array(143,616,563,800),734=>array(-12,213,347,524),735=>array(163,616,474,800),736=>array(36,213,458,637),737=>array(12,326,207,751),738=>array(11,318,355,640),739=>array(-20,326,427,632),740=>array(35,326,374,751),741=>array(146,0,471,693),742=>array(117,0,471,693),743=>array(87,0,471,693),744=>array(58,0,471,693),745=>array(29,0,471,693),748=>array(14,-260,340,-21),749=>array(143,605,492,822),750=>array(73,418,612,729),755=>array(91,-240,369,38),759=>array(88,-221,455,-109),768=>array(-259,616,-19,800),769=>array(-160,616,152,800),770=>array(-287,616,90,800),771=>array(-257,638,110,778),772=>array(-235,668,91,760),773=>array(-346,663,174,755),774=>array(-221,639,109,784),775=>array(-184,617,18,760),776=>array(-238,654,94,774),777=>array(-363,616,-117,843),778=>array(-200,605,78,883),779=>array(-244,616,176,800),780=>array(-236,616,141,800),781=>array(-130,615,4,832),782=>array(-223,615,97,832),783=>array(-279,616,70,800),784=>array(-221,642,109,882),785=>array(-250,639,80,784),786=>array(-264,418,-34,563),787=>array(-313,595,-130,844),788=>array(-288,595,-130,844),789=>array(-102,616,102,800),790=>array(-474,-276,-233,-93),791=>array(-406,-276,-94,-93),792=>array(-388,-240,-188,-6),793=>array(-318,-240,-118,-6),794=>array(-216,658,73,929),795=>array(-132,361,83,570),796=>array(-331,-240,-193,-11),797=>array(-403,-240,-114,-59),798=>array(-389,-240,-100,-59),799=>array(-378,-240,-128,-6),800=>array(-296,-202,-7,-110),801=>array(-514,-216,-105,117),802=>array(-310,-216,13,117),803=>array(-412,-212,-253,-92),804=>array(-442,-212,-110,-92),805=>array(-366,-240,-136,-11),806=>array(-392,-236,-162,-91),807=>array(-478,-196,-241,0),808=>array(-427,-196,-216,0),809=>array(-363,-310,-228,-93),810=>array(-422,-237,-80,-54),811=>array(-477,-239,-75,-94),812=>array(-414,-240,-37,-57),813=>array(-458,-240,-82,-57),814=>array(-424,-239,-94,-94),815=>array(-491,-240,-161,-95),816=>array(-480,-234,-113,-94),817=>array(-440,-185,-114,-93),818=>array(-565,-236,-28,-143),819=>array(-568,-236,-4,-9),820=>array(-625,212,1,415),821=>array(-480,214,-84,309),822=>array(-847,214,-77,309),823=>array(-709,-46,4,594),824=>array(-893,-36,43,765),825=>array(-308,-240,-170,-11),826=>array(-422,-238,-80,-55),827=>array(-355,-241,-75,-6),828=>array(-501,-239,-100,-94),829=>array(-392,562,-110,819),830=>array(-292,595,-101,867),831=>array(-510,528,10,755),832=>array(-259,616,-19,800),833=>array(-160,616,152,800),834=>array(-257,638,110,778),835=>array(-313,595,-130,844),836=>array(-344,654,94,978),837=>array(-365,-208,-244,-45),838=>array(-418,639,-82,786),839=>array(-378,-226,-122,-35),840=>array(-398,-240,-102,-47),841=>array(-363,-240,-111,-21),842=>array(-434,616,-68,800),843=>array(-434,567,-66,850),844=>array(-438,573,-31,835),845=>array(-459,-230,-41,-30),846=>array(-371,-240,-141,-45),849=>array(-321,610,-152,888),850=>array(-250,604,80,882),851=>array(-378,-240,-124,-9),855=>array(-348,610,-179,888),856=>array(0,654,159,774),858=>array(-445,-240,-58,-11),860=>array(-471,-237,419,-79),861=>array(-278,802,613,960),862=>array(-291,797,618,889),863=>array(-481,-185,427,-93),864=>array(-291,756,459,894),865=>array(-278,769,613,927),866=>array(-533,-230,376,-30),880=>array(21,0,623,729),881=>array(31,0,494,547),882=>array(88,0,1001,729),883=>array(88,0,815,729),884=>array(78,557,218,800),885=>array(54,-208,242,35),886=>array(21,0,816,729),887=>array(31,0,670,547),890=>array(132,-208,253,-45),891=>array(-7,-14,537,560),892=>array(37,-14,581,560),893=>array(-7,-14,537,560),894=>array(-35,-142,323,547),900=>array(216,616,528,800),901=>array(152,654,589,978),902=>array(-42,0,714,800),903=>array(84,253,297,442),904=>array(22,0,831,800),905=>array(28,0,986,800),906=>array(25,0,521,800),908=>array(28,-14,851,800),910=>array(20,0,1067,800),911=>array(-1,0,855,800),912=>array(50,-19,516,978),913=>array(-65,0,691,729),914=>array(21,0,699,729),915=>array(21,0,681,729),916=>array(-66,0,698,729),917=>array(21,0,670,729),918=>array(-26,0,740,729),919=>array(21,0,816,729),920=>array(40,-14,810,742),921=>array(21,0,351,729),922=>array(21,0,837,729),923=>array(-66,0,698,729),924=>array(21,0,974,729),925=>array(21,0,816,729),926=>array(27,0,619,729),927=>array(36,-14,814,742),928=>array(21,0,816,729),929=>array(21,0,719,729),931=>array(21,0,670,729),932=>array(48,0,748,729),933=>array(63,0,809,729),934=>array(43,0,806,729),935=>array(-51,0,812,729),936=>array(78,0,866,729),937=>array(-45,0,812,742),938=>array(21,0,450,927),939=>array(63,0,809,927),940=>array(38,-12,692,800),941=>array(27,-14,567,800),942=>array(50,-208,664,800),943=>array(42,-19,436,800),944=>array(54,-10,660,978),945=>array(38,-12,692,559),946=>array(-11,-208,660,773),947=>array(66,-208,740,547),948=>array(16,-14,634,768),949=>array(27,-14,520,560),950=>array(32,-208,627,760),951=>array(50,-208,664,560),952=>array(28,-11,659,768),953=>array(42,-19,313,547),954=>array(31,0,679,547),955=>array(-44,0,529,760),956=>array(-27,-209,670,547),957=>array(68,0,653,547),958=>array(26,-208,627,760),959=>array(36,-14,651,560),960=>array(73,-19,787,547),961=>array(9,-208,699,562),962=>array(55,-208,595,560),963=>array(37,-14,781,547),964=>array(52,-19,667,547),965=>array(54,-10,645,547),966=>array(76,-208,752,552),967=>array(-48,-208,693,547),968=>array(79,-208,797,547),969=>array(33,-13,834,547),970=>array(50,-19,407,774),971=>array(54,-10,645,774),972=>array(36,-14,651,800),973=>array(54,-10,645,800),974=>array(33,-13,834,800),975=>array(41,-208,860,729),976=>array(55,-11,601,768),977=>array(46,-11,612,768),978=>array(63,0,751,729),979=>array(22,0,989,800),980=>array(63,0,751,927),981=>array(60,-208,729,760),982=>array(33,-13,897,547),983=>array(38,-188,743,547),984=>array(68,-208,818,742),985=>array(62,-208,663,560),986=>array(70,-208,769,729),987=>array(63,-208,614,547),988=>array(21,0,670,729),989=>array(-146,-208,525,760),990=>array(21,2,682,729),991=>array(68,0,585,759),992=>array(102,-208,825,742),993=>array(-15,-180,500,559),994=>array(33,-213,1048,729),995=>array(81,-208,797,547),996=>array(37,-208,811,742),997=>array(34,-208,683,560),998=>array(21,-213,861,729),999=>array(-17,-14,736,575),1000=>array(-29,-208,721,745),1001=>array(-16,-208,626,560),1002=>array(-14,0,807,742),1003=>array(-7,0,674,560),1004=>array(26,-14,791,758),1005=>array(75,-14,739,758),1006=>array(23,-208,689,729),1007=>array(42,-208,614,726),1008=>array(19,-6,723,547),1009=>array(50,-216,690,560),1010=>array(37,-14,581,560),1011=>array(-128,-216,354,760),1012=>array(36,-14,814,742),1013=>array(67,-14,602,560),1014=>array(-26,-14,509,560),1015=>array(21,0,695,729),1016=>array(-10,-208,677,760),1017=>array(36,-14,724,742),1018=>array(21,0,974,729),1019=>array(0,-208,723,547),1020=>array(-31,-208,689,560),1021=>array(-13,-14,670,742),1022=>array(36,-14,724,742),1023=>array(-13,-14,670,742),1024=>array(21,0,670,927),1025=>array(21,0,670,927),1026=>array(67,-200,798,729),1027=>array(21,0,681,927),1028=>array(41,-14,733,742),1029=>array(15,-14,665,742),1030=>array(21,0,351,729),1031=>array(21,0,468,927),1032=>array(-166,-200,351,729),1033=>array(-25,0,1081,729),1034=>array(21,0,1039,729),1035=>array(48,0,778,729),1036=>array(21,0,857,927),1037=>array(21,0,816,927),1038=>array(77,0,812,927),1039=>array(36,-157,831,729),1040=>array(-65,0,691,729),1041=>array(21,0,714,729),1042=>array(21,0,699,729),1043=>array(21,0,681,729),1044=>array(-26,-157,813,729),1045=>array(21,0,670,729),1046=>array(-56,0,1249,729),1047=>array(-0,-14,668,742),1048=>array(21,0,816,729),1049=>array(21,0,816,927),1050=>array(21,0,857,729),1051=>array(-25,0,810,729),1052=>array(21,0,974,729),1053=>array(21,0,816,729),1054=>array(36,-14,814,742),1055=>array(21,0,816,729),1056=>array(21,0,719,729),1057=>array(36,-14,724,742),1058=>array(48,0,748,729),1059=>array(77,0,812,729),1060=>array(44,0,950,729),1061=>array(-51,0,812,729),1062=>array(36,-157,840,729),1063=>array(100,0,787,729),1064=>array(21,0,1214,729),1065=>array(36,-157,1238,729),1066=>array(92,0,869,729),1067=>array(21,0,1016,729),1068=>array(21,0,671,729),1069=>array(1,-14,693,742),1070=>array(21,-14,1129,742),1071=>array(-7,0,749,729),1072=>array(17,-14,611,560),1073=>array(24,-14,640,792),1074=>array(31,0,593,547),1075=>array(28,0,549,547),1076=>array(-10,-138,736,547),1077=>array(36,-14,640,560),1078=>array(-39,0,1015,547),1079=>array(-1,-14,535,560),1080=>array(31,0,670,547),1081=>array(31,0,670,765),1082=>array(31,0,698,547),1083=>array(2,0,702,547),1084=>array(28,0,784,547),1085=>array(28,0,658,547),1086=>array(36,-14,651,560),1087=>array(28,0,658,547),1088=>array(-10,-208,677,560),1089=>array(37,-14,581,560),1090=>array(34,0,626,547),1091=>array(0,-216,687,547),1092=>array(46,-208,945,760),1093=>array(-41,0,671,547),1094=>array(44,-138,682,547),1095=>array(80,0,626,547),1096=>array(31,0,1025,547),1097=>array(44,-138,1047,547),1098=>array(52,0,695,547),1099=>array(31,0,877,547),1100=>array(31,0,572,547),1101=>array(17,-14,557,560),1102=>array(31,-14,936,560),1103=>array(-22,0,613,547),1104=>array(36,-14,640,803),1105=>array(36,-14,640,774),1106=>array(52,-216,648,760),1107=>array(28,0,604,803),1108=>array(36,-14,576,560),1109=>array(10,-14,560,560),1110=>array(31,0,354,760),1111=>array(31,0,405,774),1112=>array(-128,-216,354,760),1113=>array(-9,0,926,547),1114=>array(31,0,896,547),1115=>array(31,0,622,760),1116=>array(31,0,698,803),1117=>array(31,0,670,803),1118=>array(0,-216,687,765),1119=>array(44,-138,673,547),1120=>array(33,-14,1048,729),1121=>array(33,-13,834,547),1122=>array(77,0,770,729),1123=>array(36,0,658,731),1124=>array(21,-14,1011,742),1125=>array(31,-14,810,560),1126=>array(-63,0,914,729),1127=>array(-28,0,754,547),1128=>array(21,0,1280,729),1129=>array(31,0,1044,547),1130=>array(-21,0,851,729),1131=>array(-13,0,683,547),1132=>array(21,0,1188,729),1133=>array(28,0,1003,547),1134=>array(-25,-208,640,938),1135=>array(-24,-193,525,756),1136=>array(74,0,1126,729),1137=>array(62,-208,1100,759),1138=>array(36,-14,814,742),1139=>array(36,-14,651,560),1140=>array(75,0,896,742),1141=>array(60,0,732,560),1142=>array(75,0,896,930),1143=>array(60,0,732,800),1144=>array(57,-216,1186,742),1145=>array(63,-216,1098,565),1146=>array(40,-14,1033,742),1147=>array(35,-14,823,560),1148=>array(37,-14,1348,928),1149=>array(31,-13,1129,828),1150=>array(33,-14,1048,910),1151=>array(33,-13,834,746),1152=>array(40,-208,732,742),1153=>array(33,-208,573,560),1154=>array(19,-33,530,488),1155=>array(-608,606,-79,822),1156=>array(-427,638,-12,784),1157=>array(-356,595,-213,785),1158=>array(-384,595,-213,785),1159=>array(-811,592,1,788),1160=>array(-1067,-179,388,928),1161=>array(-973,-280,323,1022),1162=>array(21,-208,890,927),1163=>array(28,-208,748,765),1164=>array(21,0,671,729),1165=>array(27,0,549,702),1166=>array(21,0,717,729),1167=>array(-10,-208,670,560),1168=>array(21,0,710,878),1169=>array(28,0,579,700),1170=>array(17,0,709,729),1171=>array(10,0,572,547),1172=>array(21,-200,708,729),1173=>array(28,-216,554,547),1174=>array(-41,-157,1264,729),1175=>array(-25,-138,1028,547),1176=>array(-0,-196,668,742),1177=>array(-1,-196,535,560),1178=>array(36,-157,873,729),1179=>array(44,-138,711,547),1180=>array(21,0,857,729),1181=>array(31,0,698,547),1182=>array(21,0,857,729),1183=>array(10,0,677,760),1184=>array(68,0,1055,729),1185=>array(52,0,846,547),1186=>array(36,-157,904,729),1187=>array(44,-138,765,547),1188=>array(21,0,1146,729),1189=>array(28,0,897,547),1190=>array(21,-200,1174,729),1191=>array(28,-216,902,547),1192=>array(40,-14,875,743),1193=>array(40,-14,798,560),1194=>array(36,-196,724,742),1195=>array(37,-196,581,560),1196=>array(63,-157,763,729),1197=>array(49,-138,642,547),1198=>array(63,0,809,729),1199=>array(66,-216,688,547),1200=>array(61,0,805,729),1201=>array(63,-216,708,547),1202=>array(-37,-157,827,729),1203=>array(-25,-138,687,547),1204=>array(63,-157,1060,729),1205=>array(49,-138,957,547),1206=>array(129,-157,876,729),1207=>array(103,-138,730,547),1208=>array(114,0,787,729),1209=>array(87,0,624,547),1210=>array(106,0,793,729),1211=>array(31,0,654,760),1212=>array(42,-14,984,742),1213=>array(30,-14,769,560),1214=>array(42,-184,984,742),1215=>array(30,-161,769,560),1216=>array(21,0,351,729),1217=>array(-56,0,1249,927),1218=>array(-39,0,1015,784),1219=>array(21,-200,840,729),1220=>array(31,-216,679,547),1221=>array(-46,-208,885,729),1222=>array(-38,-208,746,547),1223=>array(21,-200,816,729),1224=>array(28,-216,658,547),1225=>array(21,-208,889,729),1226=>array(28,-208,748,547),1227=>array(129,-157,803,729),1228=>array(103,-138,640,547),1229=>array(21,-208,1047,729),1230=>array(28,-208,874,547),1231=>array(31,0,354,760),1232=>array(-65,0,691,936),1233=>array(17,-14,611,772),1234=>array(-65,0,691,927),1235=>array(17,-14,611,774),1236=>array(-78,0,1072,729),1237=>array(17,-14,1008,560),1238=>array(21,0,670,927),1239=>array(36,-14,640,784),1240=>array(36,-14,819,742),1241=>array(42,-14,630,560),1242=>array(36,-14,819,927),1243=>array(42,-14,630,774),1244=>array(-56,0,1249,927),1245=>array(-39,0,1015,774),1246=>array(-0,-14,668,927),1247=>array(-1,-14,540,774),1248=>array(21,-33,743,729),1249=>array(-23,-215,608,547),1250=>array(21,0,816,914),1251=>array(31,0,670,763),1252=>array(21,0,816,927),1253=>array(31,0,670,774),1254=>array(36,-14,814,927),1255=>array(36,-14,651,774),1256=>array(36,-14,814,742),1257=>array(36,-14,651,560),1258=>array(36,-14,814,927),1259=>array(36,-14,651,774),1260=>array(1,-14,693,927),1261=>array(17,-14,557,774),1262=>array(77,0,812,914),1263=>array(0,-216,687,763),1264=>array(77,0,812,927),1265=>array(0,-216,687,774),1266=>array(77,0,812,927),1267=>array(0,-216,687,800),1268=>array(100,0,787,927),1269=>array(80,0,626,774),1270=>array(36,-157,696,729),1271=>array(44,-138,565,547),1272=>array(21,0,1016,927),1273=>array(31,0,877,774),1274=>array(38,-216,730,729),1275=>array(31,-217,593,547),1276=>array(-32,-200,832,729),1277=>array(-17,-216,694,547),1278=>array(-52,0,812,729),1279=>array(-38,0,673,547),1280=>array(37,0,741,729),1281=>array(17,0,575,547),1282=>array(35,-14,1116,729),1283=>array(16,-14,868,547),1284=>array(138,-14,1063,742),1285=>array(104,-14,854,560),1286=>array(138,-208,760,742),1287=>array(104,-208,634,560),1288=>array(-48,-14,1185,729),1289=>array(-38,-14,950,547),1290=>array(22,-14,1222,729),1291=>array(28,-14,957,547),1292=>array(41,-14,783,742),1293=>array(35,-14,573,546),1294=>array(47,-14,881,729),1295=>array(34,-14,727,547),1296=>array(37,-14,652,742),1297=>array(27,-14,520,560),1298=>array(-5,-200,829,729),1299=>array(23,-216,723,547),1300=>array(-25,0,1327,729),1301=>array(2,0,1096,547),1302=>array(21,0,1106,729),1303=>array(-10,-208,1008,560),1304=>array(-7,0,1068,729),1305=>array(-22,-14,965,560),1306=>array(36,-146,814,742),1307=>array(36,-208,682,560),1308=>array(107,0,1143,729),1309=>array(87,0,927,547),1310=>array(21,0,857,729),1311=>array(31,0,698,547),1312=>array(-25,-200,1167,729),1313=>array(2,-216,946,547),1314=>array(21,-200,1173,729),1315=>array(28,-216,902,547),1316=>array(36,-157,905,729),1317=>array(44,-138,764,547),1329=>array(75,-38,849,729),1330=>array(21,0,741,743),1331=>array(50,0,805,743),1332=>array(37,0,809,743),1333=>array(78,-14,763,729),1334=>array(18,0,753,743),1335=>array(21,0,730,729),1336=>array(21,0,741,743),1337=>array(21,-13,1020,742),1338=>array(11,-14,844,729),1339=>array(21,0,705,729),1340=>array(21,0,566,729),1341=>array(21,-14,1021,729),1342=>array(93,-12,864,741),1343=>array(97,0,746,729),1344=>array(-16,-46,694,729),1345=>array(33,-48,753,743),1346=>array(32,0,748,743),1347=>array(-22,0,733,735),1348=>array(78,-14,938,729),1349=>array(42,-14,709,743),1350=>array(46,-14,763,729),1351=>array(49,-14,762,729),1352=>array(21,0,734,743),1353=>array(51,-48,724,743),1354=>array(32,0,890,743),1355=>array(7,0,742,743),1356=>array(21,0,863,743),1357=>array(68,-14,791,729),1358=>array(35,0,748,729),1359=>array(37,-14,703,743),1360=>array(21,0,741,743),1361=>array(42,-14,709,743),1362=>array(21,0,666,729),1363=>array(24,0,901,729),1364=>array(-49,0,741,743),1365=>array(36,-14,813,742),1366=>array(30,-14,909,729),1369=>array(159,481,325,760),1370=>array(73,418,349,729),1371=>array(120,616,500,800),1372=>array(115,595,590,893),1373=>array(-1,616,315,849),1374=>array(117,586,652,878),1375=>array(164,618,622,893),1377=>array(74,-13,1018,547),1378=>array(-10,-208,654,560),1379=>array(43,-208,748,559),1380=>array(31,-208,752,560),1381=>array(59,-14,683,760),1382=>array(38,-208,708,559),1383=>array(31,0,644,760),1384=>array(-10,-208,653,560),1385=>array(-10,-208,843,560),1386=>array(43,-14,830,760),1387=>array(-10,-208,646,760),1388=>array(-10,-208,385,547),1389=>array(-10,-208,1063,760),1390=>array(40,-14,719,760),1391=>array(67,-208,683,760),1392=>array(31,0,646,760),1393=>array(10,-13,593,760),1394=>array(31,-208,711,560),1395=>array(52,-13,729,768),1396=>array(67,-13,871,760),1397=>array(-128,-216,313,547),1398=>array(2,-13,683,760),1399=>array(-60,-208,520,560),1400=>array(31,0,646,560),1401=>array(-67,-208,366,547),1402=>array(59,-208,1012,547),1403=>array(-26,-208,605,560),1404=>array(31,0,665,560),1405=>array(67,-13,683,547),1406=>array(67,-208,724,760),1407=>array(63,-13,975,560),1408=>array(-10,-208,646,560),1409=>array(19,-216,681,559),1410=>array(31,0,498,547),1411=>array(63,-208,975,760),1412=>array(-151,-208,671,560),1413=>array(37,-14,652,560),1414=>array(31,-190,865,760),1415=>array(67,-14,868,760),1417=>array(41,0,323,547),1418=>array(96,179,430,359),1456=>array(275,-229,416,-10),1457=>array(149,-229,523,-10),1458=>array(140,-229,513,-10),1459=>array(127,-229,513,-10),1460=>array(287,-171,404,-73),1461=>array(213,-171,477,-73),1462=>array(237,-229,477,-10),1463=>array(89,-171,451,0),1464=>array(109,-217,446,0),1465=>array(-34,625,83,723),1466=>array(-34,625,83,723),1467=>array(190,-239,525,-5),1468=>array(293,225,411,322),1469=>array(277,-217,413,-22),1470=>array(40,413,375,555),1471=>array(132,547,469,710),1472=>array(26,-98,345,645),1473=>array(816,613,934,710),1474=>array(204,613,321,710),1475=>array(45,0,326,547),1478=>array(25,0,490,547),1479=>array(188,-229,525,-10),1488=>array(104,0,730,547),1489=>array(43,0,590,547),1490=>array(44,-9,428,547),1491=>array(126,0,651,547),1492=>array(100,0,661,547),1493=>array(91,0,359,547),1494=>array(94,0,464,547),1495=>array(91,0,654,547),1496=>array(142,-13,676,553),1497=>array(98,164,334,547),1498=>array(126,-240,549,547),1499=>array(43,0,570,547),1500=>array(126,0,633,711),1501=>array(91,0,663,547),1502=>array(84,0,690,554),1503=>array(44,-240,359,547),1504=>array(43,0,430,547),1505=>array(144,-13,678,547),1506=>array(35,-101,682,547),1507=>array(158,-240,642,547),1508=>array(91,0,656,547),1509=>array(118,-240,649,548),1510=>array(54,0,670,547),1511=>array(51,-240,767,546),1512=>array(126,0,575,547),1513=>array(89,0,856,547),1514=>array(11,-4,650,547),1520=>array(91,0,680,547),1521=>array(98,0,680,547),1522=>array(98,164,655,547),1523=>array(66,361,378,547),1524=>array(66,361,644,547),3647=>array(2,-147,642,760),3713=>array(14,-14,752,560),3714=>array(12,-14,727,560),3716=>array(13,-14,699,558),3719=>array(2,-241,548,593),3720=>array(44,0,711,561),3722=>array(45,-269,747,584),3725=>array(14,-24,767,610),3732=>array(18,-14,671,593),3733=>array(17,-19,670,603),3734=>array(35,-240,729,593),3735=>array(-1,-14,784,560),3737=>array(-9,-33,735,593),3738=>array(13,-15,716,613),3739=>array(-1,-15,739,760),3740=>array(29,-12,952,665),3741=>array(24,-14,837,760),3742=>array(50,-14,825,604),3743=>array(35,-14,848,760),3745=>array(-7,-14,826,547),3746=>array(-0,-23,789,760),3747=>array(18,-10,768,615),3749=>array(9,-33,717,593),3751=>array(5,-33,668,593),3754=>array(8,-21,860,724),3755=>array(32,-21,961,620),3757=>array(27,-20,689,606),3758=>array(15,-14,880,698),3759=>array(79,-259,932,648),3760=>array(5,27,682,606),3761=>array(-649,610,-29,896),3762=>array(51,0,578,593),3763=>array(-479,0,578,875),3764=>array(-656,622,-63,950),3765=>array(-656,633,-1,962),3766=>array(-656,622,-63,950),3767=>array(-656,633,-1,962),3768=>array(-413,-385,-165,-55),3769=>array(-479,-316,-150,-28),3771=>array(-657,610,-33,896),3772=>array(-689,-311,17,-48),3773=>array(-25,-220,758,776),3776=>array(53,-13,469,561),3777=>array(53,-13,843,561),3778=>array(25,-14,486,936),3779=>array(67,-14,640,879),3780=>array(47,-35,552,809),3782=>array(33,-240,731,582),3784=>array(-431,659,-279,844),3785=>array(-636,622,-19,918),3786=>array(-672,621,37,965),3787=>array(-530,612,-178,917),3788=>array(-511,603,194,866),3789=>array(-479,668,-229,875),3792=>array(66,-29,723,563),3793=>array(55,-139,731,586),3794=>array(1,-80,612,711),3795=>array(-49,-14,953,981),3796=>array(31,-156,647,711),3797=>array(31,-156,647,711),3798=>array(5,-14,962,950),3799=>array(36,-240,748,560),3800=>array(86,-269,766,582),3801=>array(38,-14,875,564),3804=>array(32,-21,1356,620),3805=>array(32,-21,1361,620),4256=>array(111,-14,929,819),4257=>array(139,-0,736,819),4258=>array(150,-138,672,828),4259=>array(97,-15,902,819),4260=>array(133,0,665,828),4261=>array(136,0,832,828),4262=>array(144,-14,752,819),4263=>array(117,-14,993,828),4264=>array(127,0,562,862),4265=>array(108,0,653,819),4266=>array(95,-14,834,820),4267=>array(89,-14,942,819),4268=>array(24,0,689,819),4269=>array(106,-157,886,829),4270=>array(141,-14,886,822),4271=>array(141,0,741,823),4272=>array(76,-15,969,820),4273=>array(83,-15,626,820),4274=>array(23,-0,685,828),4275=>array(106,-170,886,828),4276=>array(127,0,918,825),4277=>array(101,0,794,820),4278=>array(24,0,685,828),4279=>array(127,0,731,820),4280=>array(66,-14,736,820),4281=>array(24,0,632,819),4282=>array(113,-14,880,827),4283=>array(89,-15,926,820),4284=>array(23,-0,698,819),4285=>array(75,-15,648,828),4286=>array(23,-0,741,819),4287=>array(27,0,880,819),4288=>array(110,-14,901,820),4289=>array(24,0,647,820),4290=>array(78,-15,692,828),4291=>array(95,0,707,820),4292=>array(131,0,715,820),4293=>array(43,-14,833,828),4304=>array(76,-14,531,599),4305=>array(86,-14,552,823),4306=>array(31,-232,565,561),4307=>array(41,-225,826,557),4308=>array(26,-232,551,557),4309=>array(25,-232,562,557),4310=>array(75,-14,537,828),4311=>array(84,-14,821,557),4312=>array(75,0,556,557),4313=>array(24,-232,554,542),4314=>array(96,-225,1077,562),4315=>array(87,-14,622,828),4316=>array(89,-14,629,819),4317=>array(92,-0,808,557),4318=>array(78,-14,589,818),4319=>array(25,-232,604,560),4320=>array(91,0,816,830),4321=>array(92,-14,560,818),4322=>array(62,-232,664,670),4323=>array(47,-232,591,604),4324=>array(94,-232,844,558),4325=>array(25,-232,650,818),4326=>array(88,-225,815,557),4327=>array(25,-232,602,549),4328=>array(63,-14,609,828),4329=>array(39,0,561,828),4330=>array(65,-232,612,548),4331=>array(86,-14,659,818),4332=>array(91,-15,685,828),4333=>array(35,-232,616,818),4334=>array(95,-14,553,818),4335=>array(-7,-232,542,580),4336=>array(73,-15,602,823),4337=>array(79,-14,609,823),4338=>array(17,-146,543,557),4339=>array(25,-232,604,558),4340=>array(26,-232,618,828),4341=>array(65,-14,656,828),4342=>array(87,-232,842,557),4343=>array(29,-232,551,557),4344=>array(25,-232,548,549),4345=>array(93,-232,627,561),4346=>array(68,-111,558,557),4347=>array(29,0,446,500),4348=>array(124,400,424,828),5121=>array(76,0,840,729),5122=>array(-66,0,698,1050),5123=>array(-66,0,698,729),5124=>array(-66,0,698,928),5125=>array(21,0,843,729),5126=>array(21,0,843,928),5127=>array(21,0,843,927),5129=>array(21,0,843,729),5130=>array(62,0,884,729),5131=>array(62,0,884,928),5132=>array(80,0,1084,729),5133=>array(76,0,937,729),5134=>array(80,0,942,729),5135=>array(-66,0,937,729),5136=>array(80,0,942,928),5137=>array(-66,0,937,928),5138=>array(80,0,1087,729),5139=>array(21,0,1067,729),5140=>array(80,0,1087,928),5141=>array(21,0,1067,928),5142=>array(21,0,843,928),5143=>array(80,0,1128,729),5144=>array(62,0,1070,729),5145=>array(80,0,1128,928),5146=>array(62,0,1070,928),5147=>array(62,0,884,928),5149=>array(80,607,237,728),5150=>array(20,326,434,734),5151=>array(8,338,402,722),5152=>array(54,338,356,722),5153=>array(53,392,370,711),5154=>array(29,352,345,670),5155=>array(33,392,341,670),5156=>array(57,392,341,670),5157=>array(-2,327,552,749),5158=>array(21,326,454,734),5159=>array(80,304,237,424),5160=>array(53,494,346,569),5161=>array(53,392,346,670),5162=>array(75,392,368,693),5163=>array(76,0,1145,729),5164=>array(-66,0,917,729),5165=>array(21,0,1147,729),5166=>array(62,0,1229,729),5167=>array(76,0,840,729),5168=>array(-66,0,698,1050),5169=>array(-66,0,698,729),5170=>array(-66,0,698,928),5171=>array(2,0,824,729),5172=>array(2,0,824,928),5173=>array(2,0,824,927),5175=>array(2,0,824,729),5176=>array(51,0,873,729),5177=>array(51,0,873,928),5178=>array(80,0,1084,729),5179=>array(76,0,937,729),5180=>array(80,0,942,729),5181=>array(-66,0,937,729),5182=>array(80,0,942,928),5183=>array(-66,0,937,928),5184=>array(80,0,1068,729),5185=>array(2,0,1067,729),5186=>array(80,0,1068,928),5187=>array(2,0,1067,928),5188=>array(80,0,1117,729),5189=>array(51,0,1070,729),5190=>array(80,0,1117,928),5191=>array(51,0,1070,928),5192=>array(51,0,873,927),5193=>array(48,326,559,727),5194=>array(20,326,212,734),5196=>array(79,-14,792,729),5197=>array(20,0,733,1050),5198=>array(20,0,733,743),5199=>array(20,0,733,928),5200=>array(2,0,763,729),5201=>array(2,0,763,928),5202=>array(2,0,763,927),5204=>array(2,0,763,729),5205=>array(52,0,813,729),5206=>array(52,0,813,928),5207=>array(80,-14,1037,729),5208=>array(79,-14,976,729),5209=>array(80,0,977,743),5210=>array(20,0,976,743),5211=>array(80,0,977,928),5212=>array(20,0,976,928),5213=>array(80,0,1007,729),5214=>array(2,0,982,729),5215=>array(80,0,1007,928),5216=>array(2,0,982,928),5217=>array(80,0,1057,729),5218=>array(52,0,979,729),5219=>array(80,0,1057,928),5220=>array(52,0,979,928),5221=>array(52,0,1057,729),5222=>array(59,326,466,733),5223=>array(79,-14,989,734),5224=>array(20,0,989,743),5225=>array(2,0,1007,734),5226=>array(52,0,1000,734),5227=>array(64,0,675,743),5228=>array(20,0,726,1050),5229=>array(20,0,726,743),5230=>array(20,0,726,928),5231=>array(18,-14,724,729),5232=>array(18,-14,731,928),5233=>array(18,-14,818,927),5234=>array(68,-14,679,729),5235=>array(68,-14,679,928),5236=>array(80,0,960,743),5237=>array(64,0,902,743),5238=>array(80,0,962,743),5239=>array(20,0,902,743),5240=>array(80,0,962,928),5241=>array(20,0,902,928),5242=>array(80,-14,1009,729),5243=>array(18,-14,902,729),5244=>array(80,-14,1017,928),5245=>array(18,-14,902,928),5246=>array(80,-14,916,729),5247=>array(68,-14,902,729),5248=>array(80,-14,916,928),5249=>array(68,-14,902,928),5250=>array(52,-14,916,729),5251=>array(47,319,432,734),5252=>array(43,319,485,734),5253=>array(64,0,921,743),5254=>array(20,0,921,743),5255=>array(18,-14,921,734),5256=>array(68,-14,921,734),5257=>array(64,0,675,743),5258=>array(20,0,726,1050),5259=>array(20,0,726,743),5260=>array(20,0,726,928),5261=>array(18,-14,724,729),5262=>array(18,-14,737,928),5263=>array(18,-14,824,927),5264=>array(68,-14,679,729),5265=>array(68,-14,679,928),5266=>array(80,0,960,743),5267=>array(64,0,902,743),5268=>array(80,0,1011,743),5269=>array(20,0,902,743),5270=>array(80,0,1011,928),5271=>array(20,0,902,928),5272=>array(80,-14,1009,729),5273=>array(18,-14,902,729),5274=>array(80,-14,1023,928),5275=>array(18,-14,902,928),5276=>array(80,-14,964,729),5277=>array(68,-14,902,729),5278=>array(80,-14,964,928),5279=>array(68,-14,902,928),5280=>array(52,-14,964,729),5281=>array(47,319,432,734),5282=>array(46,319,485,734),5283=>array(71,0,605,729),5284=>array(21,0,670,1050),5285=>array(21,0,670,729),5286=>array(21,0,670,928),5287=>array(-43,0,605,729),5288=>array(-43,0,621,928),5289=>array(-43,0,708,927),5290=>array(21,0,556,729),5291=>array(21,0,556,928),5292=>array(80,0,860,729),5293=>array(71,0,782,729),5294=>array(80,0,907,729),5295=>array(21,0,801,729),5296=>array(80,0,907,928),5297=>array(21,0,801,928),5298=>array(80,0,860,729),5299=>array(-43,0,801,729),5300=>array(80,0,875,928),5301=>array(-43,0,801,928),5302=>array(80,0,792,729),5303=>array(21,0,801,729),5304=>array(80,0,792,928),5305=>array(21,0,801,928),5306=>array(52,0,792,729),5307=>array(21,326,355,734),5308=>array(55,326,532,733),5309=>array(20,326,420,734),5312=>array(103,-14,946,468),5313=>array(41,-14,951,781),5314=>array(41,-14,951,468),5315=>array(41,-14,951,667),5316=>array(-20,0,891,482),5317=>array(-20,0,891,667),5318=>array(-20,0,891,667),5319=>array(42,0,885,482),5320=>array(42,0,885,667),5321=>array(80,-14,1196,468),5322=>array(103,-14,1175,468),5323=>array(80,0,1153,482),5324=>array(42,0,1156,482),5325=>array(80,0,1153,667),5326=>array(42,0,1156,667),5327=>array(42,0,885,667),5328=>array(61,477,593,742),5329=>array(43,319,481,734),5330=>array(34,477,607,742),5331=>array(102,0,945,468),5332=>array(39,0,949,781),5333=>array(39,0,949,468),5334=>array(39,0,949,667),5335=>array(-18,0,892,468),5336=>array(-18,0,892,667),5337=>array(-18,0,892,667),5338=>array(43,0,886,468),5339=>array(43,0,886,667),5340=>array(80,0,1188,468),5341=>array(102,0,1175,468),5342=>array(80,0,1245,468),5343=>array(39,0,1156,468),5344=>array(80,0,1245,667),5345=>array(39,0,1156,667),5346=>array(80,0,1189,468),5347=>array(-18,0,1142,468),5348=>array(80,0,1189,667),5349=>array(-18,0,1142,667),5350=>array(80,0,1181,468),5351=>array(43,0,1156,468),5352=>array(80,0,1181,667),5353=>array(43,0,1156,667),5354=>array(61,477,593,734),5356=>array(26,0,874,729),5357=>array(92,0,643,729),5358=>array(21,0,841,1050),5359=>array(21,0,760,729),5360=>array(21,0,773,928),5361=>array(-30,0,709,729),5362=>array(-30,0,717,928),5363=>array(-30,0,804,927),5364=>array(87,0,638,729),5365=>array(87,0,638,928),5366=>array(80,0,911,729),5367=>array(92,0,886,729),5368=>array(80,0,997,729),5369=>array(21,0,917,729),5370=>array(80,0,1010,928),5371=>array(21,0,917,928),5372=>array(80,0,977,729),5373=>array(-30,0,886,729),5374=>array(80,0,985,928),5375=>array(-30,0,886,928),5376=>array(80,0,875,729),5377=>array(87,0,917,729),5378=>array(80,0,875,928),5379=>array(87,0,917,928),5380=>array(52,0,875,729),5381=>array(57,326,406,734),5382=>array(28,319,413,742),5383=>array(20,326,477,734),5392=>array(65,-14,858,743),5393=>array(7,-14,917,743),5394=>array(7,-14,917,928),5395=>array(33,-14,1103,482),5396=>array(33,-14,1103,667),5397=>array(36,-14,1100,482),5398=>array(36,-14,1100,667),5399=>array(80,-14,1144,743),5400=>array(65,-14,1129,743),5401=>array(80,-14,1202,743),5402=>array(7,-14,1129,743),5403=>array(80,-14,1202,928),5404=>array(7,-14,1129,928),5405=>array(80,-14,1398,482),5406=>array(33,-14,1348,482),5407=>array(80,-14,1398,667),5408=>array(33,-14,1348,667),5409=>array(80,-14,1395,482),5410=>array(36,-14,1348,482),5411=>array(80,-14,1395,667),5412=>array(36,-14,1348,667),5413=>array(58,469,693,747),5414=>array(63,0,689,729),5415=>array(21,0,697,1050),5416=>array(21,0,697,729),5417=>array(21,0,697,928),5418=>array(79,0,755,729),5419=>array(79,0,772,928),5420=>array(79,0,859,927),5421=>array(87,0,713,729),5422=>array(87,0,713,928),5423=>array(80,0,916,729),5424=>array(63,0,931,729),5425=>array(80,0,934,729),5426=>array(21,0,923,729),5427=>array(80,0,934,928),5428=>array(21,0,923,928),5429=>array(80,0,982,729),5430=>array(79,0,931,729),5431=>array(80,0,1000,928),5432=>array(79,0,931,928),5433=>array(80,0,950,729),5434=>array(87,0,923,729),5435=>array(80,0,950,928),5436=>array(87,0,923,928),5437=>array(52,0,950,928),5438=>array(57,326,450,734),5440=>array(53,392,346,670),5441=>array(20,326,487,734),5442=>array(91,-14,996,468),5443=>array(103,-14,988,468),5444=>array(-20,0,885,482),5445=>array(45,0,930,781),5446=>array(45,0,930,482),5447=>array(45,0,930,667),5448=>array(21,0,716,729),5449=>array(21,0,716,928),5450=>array(21,0,667,729),5451=>array(65,0,712,729),5452=>array(65,0,712,928),5453=>array(17,0,712,729),5454=>array(80,0,982,928),5455=>array(65,0,887,928),5456=>array(74,326,478,727),5458=>array(2,0,849,729),5459=>array(99,0,838,743),5460=>array(2,-14,700,1050),5461=>array(2,-14,700,729),5462=>array(2,-14,700,928),5463=>array(51,0,873,663),5464=>array(51,0,873,928),5465=>array(69,0,896,663),5466=>array(69,0,896,928),5467=>array(80,0,1140,928),5468=>array(69,0,1070,928),5469=>array(52,311,568,675),5470=>array(68,-14,791,743),5471=>array(68,-14,772,743),5472=>array(40,-14,744,743),5473=>array(21,-14,744,743),5474=>array(40,-14,744,928),5475=>array(21,-14,744,928),5476=>array(2,0,769,729),5477=>array(2,0,769,928),5478=>array(47,0,811,729),5479=>array(47,0,811,928),5480=>array(80,0,1055,928),5481=>array(47,0,979,928),5482=>array(55,326,540,733),5492=>array(58,0,871,743),5493=>array(62,0,966,743),5494=>array(62,0,966,928),5495=>array(11,-14,915,729),5496=>array(11,-14,915,928),5497=>array(106,-14,919,729),5498=>array(106,-14,919,928),5499=>array(69,319,551,734),5500=>array(21,0,816,729),5501=>array(20,326,487,734),5502=>array(74,0,1220,1050),5503=>array(74,0,1220,743),5504=>array(74,0,1220,928),5505=>array(74,-14,1218,729),5506=>array(74,-14,1226,928),5507=>array(74,-14,1173,729),5508=>array(74,-14,1173,928),5509=>array(74,319,926,734),5514=>array(64,0,871,743),5515=>array(62,0,966,743),5516=>array(11,-14,916,729),5517=>array(106,-14,913,729),5518=>array(77,0,1573,1050),5519=>array(77,0,1573,743),5520=>array(77,0,1573,928),5521=>array(77,-14,1275,741),5522=>array(77,-14,1289,928),5523=>array(77,-14,1526,741),5524=>array(77,-14,1526,928),5525=>array(77,335,795,741),5526=>array(77,335,1220,741),5536=>array(16,0,939,709),5537=>array(16,0,939,709),5538=>array(-8,-242,916,468),5539=>array(-8,-242,916,667),5540=>array(66,-242,910,468),5541=>array(66,-242,910,667),5542=>array(74,344,606,734),5543=>array(62,0,739,729),5544=>array(-49,0,697,729),5545=>array(-49,0,697,928),5546=>array(79,0,825,729),5547=>array(79,0,825,928),5548=>array(37,0,714,729),5549=>array(37,0,714,928),5550=>array(36,326,450,734),5551=>array(22,-14,686,729),5598=>array(21,0,782,729),5601=>array(48,0,809,729),5702=>array(20,326,473,734),5703=>array(20,240,473,820),5742=>array(-20,0,427,306),5743=>array(74,0,1169,743),5744=>array(77,0,1522,743),5745=>array(77,0,1999,743),5746=>array(77,0,1999,928),5747=>array(77,-14,1701,741),5748=>array(77,-14,1672,928),5749=>array(77,-14,1952,741),5750=>array(77,-14,1952,928),7424=>array(-38,0,584,547),7425=>array(-53,0,800,547),7426=>array(42,-14,1021,560),7427=>array(-9,0,565,547),7428=>array(37,-14,581,560),7429=>array(31,-1,614,547),7430=>array(11,-1,611,547),7431=>array(39,0,526,547),7432=>array(27,-14,516,560),7433=>array(10,-213,333,547),7434=>array(-4,-14,471,547),7435=>array(31,0,716,547),7436=>array(-26,0,473,547),7437=>array(28,0,784,547),7438=>array(31,0,670,547),7439=>array(36,-14,651,560),7440=>array(-7,-14,537,560),7441=>array(42,-27,617,573),7442=>array(20,31,603,515),7443=>array(44,-28,619,579),7444=>array(42,-14,1046,560),7446=>array(15,273,616,560),7447=>array(72,-14,673,273),7448=>array(-2,0,533,547),7449=>array(-32,0,613,547),7450=>array(71,0,613,547),7451=>array(34,0,626,547),7452=>array(75,-14,662,547),7453=>array(32,10,685,560),7454=>array(39,11,896,561),7455=>array(-59,-238,715,560),7456=>array(63,0,678,547),7457=>array(87,0,927,547),7458=>array(-9,0,586,547),7459=>array(19,-14,588,547),7462=>array(31,0,552,547),7463=>array(-38,0,584,547),7464=>array(31,0,660,547),7465=>array(-2,0,533,547),7466=>array(98,0,751,547),7467=>array(2,0,702,547),7468=>array(-37,326,445,734),7469=>array(-40,326,670,734),7470=>array(18,326,436,734),7472=>array(18,326,490,734),7473=>array(18,326,417,734),7474=>array(18,326,424,734),7475=>array(31,318,489,742),7476=>array(18,326,509,734),7477=>array(18,326,216,734),7478=>array(-86,214,227,734),7479=>array(18,326,524,734),7480=>array(18,326,360,734),7481=>array(18,326,608,734),7482=>array(18,326,509,734),7483=>array(18,326,509,734),7484=>array(31,318,504,742),7485=>array(21,318,480,742),7486=>array(18,326,450,734),7487=>array(18,326,433,734),7488=>array(27,326,466,734),7489=>array(50,318,494,734),7490=>array(58,326,715,734),7491=>array(37,318,411,640),7492=>array(48,318,415,640),7493=>array(53,318,457,640),7494=>array(53,318,669,640),7495=>array(20,318,427,751),7496=>array(48,318,481,751),7497=>array(49,318,429,640),7498=>array(53,318,423,640),7499=>array(39,318,347,640),7500=>array(37,318,345,640),7501=>array(38,205,455,639),7502=>array(7,207,210,632),7503=>array(20,326,451,751),7504=>array(21,326,621,640),7505=>array(32,205,424,640),7506=>array(49,318,436,640),7507=>array(22,318,357,640),7508=>array(108,479,487,640),7509=>array(108,318,487,479),7510=>array(-6,209,427,640),7511=>array(72,326,365,719),7512=>array(42,318,433,632),7513=>array(55,332,466,640),7514=>array(47,318,642,632),7515=>array(83,326,471,632),7517=>array(-0,209,414,759),7518=>array(39,209,461,632),7519=>array(16,318,395,756),7520=>array(52,209,468,635),7521=>array(-25,209,432,632),7522=>array(12,0,205,425),7523=>array(23,0,344,313),7524=>array(42,-8,433,306),7525=>array(83,0,471,306),7526=>array(-0,-117,414,433),7527=>array(39,-117,461,306),7528=>array(-0,-117,427,314),7529=>array(52,-117,468,309),7530=>array(-25,-117,432,306),7543=>array(11,-216,673,559),7544=>array(18,326,509,734),7547=>array(31,0,515,547),7549=>array(-10,-208,753,560),7557=>array(84,-216,458,760),7579=>array(23,318,423,640),7580=>array(53,318,385,640),7581=>array(56,288,388,640),7582=>array(42,318,432,751),7583=>array(25,318,337,640),7584=>array(58,326,362,751),7585=>array(12,205,288,632),7586=>array(57,205,464,632),7587=>array(58,207,441,632),7588=>array(35,326,283,751),7589=>array(48,326,208,632),7590=>array(23,326,321,632),7591=>array(23,326,321,632),7592=>array(17,205,376,751),7593=>array(23,205,229,751),7594=>array(23,205,258,751),7595=>array(23,326,300,632),7596=>array(35,205,625,640),7597=>array(58,209,648,632),7598=>array(11,205,523,640),7599=>array(35,205,476,640),7600=>array(23,326,422,632),7601=>array(53,318,432,640),7602=>array(53,209,485,751),7603=>array(41,205,382,640),7604=>array(0,205,393,751),7605=>array(73,205,365,719),7606=>array(47,318,532,632),7607=>array(54,298,471,632),7608=>array(47,318,413,632),7609=>array(48,326,395,632),7610=>array(23,326,416,632),7611=>array(23,326,391,632),7612=>array(35,205,439,632),7613=>array(27,288,403,632),7614=>array(16,206,404,632),7615=>array(53,320,370,756),7620=>array(-483,616,-19,800),7621=>array(-451,616,-35,800),7622=>array(-467,616,-51,800),7623=>array(-483,616,-19,800),7624=>array(-495,616,-7,800),7625=>array(-531,616,29,800),7680=>array(-65,-240,691,729),7681=>array(17,-240,611,560),7682=>array(21,0,699,927),7683=>array(31,-14,677,941),7684=>array(21,-212,699,729),7685=>array(31,-212,677,760),7686=>array(21,-185,699,729),7687=>array(31,-185,677,760),7688=>array(36,-196,724,927),7689=>array(37,-196,581,800),7690=>array(21,0,786,927),7691=>array(36,-14,757,941),7692=>array(21,-212,786,729),7693=>array(36,-212,724,760),7694=>array(21,-185,786,729),7695=>array(36,-185,724,760),7696=>array(21,-194,786,729),7697=>array(34,-196,724,760),7698=>array(21,-240,786,729),7699=>array(36,-240,724,760),7700=>array(21,0,670,1057),7701=>array(36,-14,640,898),7702=>array(21,0,670,1057),7703=>array(36,-14,640,900),7704=>array(44,-203,693,729),7705=>array(36,-203,640,560),7706=>array(21,-221,670,729),7707=>array(36,-221,640,560),7708=>array(21,-196,670,927),7709=>array(36,-196,640,783),7710=>array(21,0,670,928),7711=>array(50,0,540,941),7712=>array(36,-14,778,899),7713=>array(20,-216,682,760),7714=>array(21,0,816,928),7715=>array(31,0,654,941),7716=>array(21,-212,816,729),7717=>array(31,-212,654,760),7718=>array(21,0,816,927),7719=>array(31,0,654,927),7720=>array(-61,-196,816,729),7721=>array(-43,-196,654,760),7722=>array(21,-239,816,729),7723=>array(31,-239,654,760),7724=>array(-108,-221,351,729),7725=>array(-108,-221,354,760),7726=>array(21,0,511,1057),7727=>array(31,0,477,903),7728=>array(21,0,837,927),7729=>array(31,0,716,982),7730=>array(21,-212,837,729),7731=>array(31,-212,716,760),7732=>array(21,-185,837,729),7733=>array(31,-185,716,760),7734=>array(21,-212,566,729),7735=>array(10,-212,354,760),7736=>array(21,-212,566,942),7737=>array(10,-212,450,914),7738=>array(21,-185,566,729),7739=>array(-68,-185,354,760),7740=>array(21,-240,566,729),7741=>array(-113,-240,354,760),7742=>array(21,0,974,927),7743=>array(31,0,984,800),7744=>array(21,0,974,928),7745=>array(31,0,984,759),7746=>array(21,-212,974,729),7747=>array(31,-212,984,560),7748=>array(21,0,816,927),7749=>array(31,0,654,759),7750=>array(21,-212,816,729),7751=>array(31,-212,654,560),7752=>array(21,-185,816,729),7753=>array(31,-185,654,560),7754=>array(21,-240,816,729),7755=>array(31,-240,654,560),7756=>array(36,-14,814,1057),7757=>array(36,-14,651,917),7758=>array(36,-14,814,1061),7759=>array(36,-14,651,900),7760=>array(36,-14,814,1057),7761=>array(36,-14,651,898),7762=>array(36,-14,814,1057),7763=>array(36,-14,651,900),7764=>array(21,0,719,927),7765=>array(-10,-208,677,800),7766=>array(21,0,719,928),7767=>array(-10,-208,677,759),7768=>array(21,0,685,928),7769=>array(31,0,545,759),7770=>array(21,-212,685,729),7771=>array(10,-212,545,560),7772=>array(21,-212,685,914),7773=>array(10,-212,545,759),7774=>array(21,-185,685,729),7775=>array(-69,-185,545,560),7776=>array(15,-14,665,928),7777=>array(10,-14,560,759),7778=>array(15,-212,665,742),7779=>array(10,-212,560,560),7780=>array(15,-14,719,928),7781=>array(10,-14,682,816),7782=>array(15,-14,690,1053),7783=>array(10,-14,605,875),7784=>array(15,-212,665,928),7785=>array(10,-212,560,762),7786=>array(48,0,748,928),7787=>array(43,0,509,941),7788=>array(48,-212,748,729),7789=>array(43,-212,509,702),7790=>array(48,-185,748,729),7791=>array(27,-185,509,702),7792=>array(38,-240,748,729),7793=>array(-20,-240,509,702),7794=>array(68,-212,791,729),7795=>array(60,-212,681,547),7796=>array(68,-221,791,729),7797=>array(60,-221,681,547),7798=>array(68,-203,791,729),7799=>array(60,-203,681,547),7800=>array(68,-14,791,1057),7801=>array(60,-14,681,917),7802=>array(68,-14,791,1043),7803=>array(60,-14,681,885),7804=>array(76,0,840,928),7805=>array(63,0,678,778),7806=>array(76,-212,840,729),7807=>array(63,-212,678,547),7808=>array(107,0,1143,931),7809=>array(87,0,927,803),7810=>array(107,0,1143,931),7811=>array(87,0,927,803),7812=>array(107,0,1143,927),7813=>array(87,0,927,774),7814=>array(107,0,1143,927),7815=>array(87,0,927,759),7816=>array(107,-212,1143,729),7817=>array(87,-212,927,547),7818=>array(-51,0,812,927),7819=>array(-41,0,671,759),7820=>array(-51,0,812,927),7821=>array(-41,0,671,774),7822=>array(63,0,809,928),7823=>array(0,-216,687,759),7824=>array(-26,0,740,927),7825=>array(-9,0,586,800),7826=>array(-26,-212,740,729),7827=>array(-9,-212,586,547),7828=>array(-26,-185,740,729),7829=>array(-9,-185,586,547),7830=>array(31,-185,654,760),7831=>array(43,0,509,927),7832=>array(87,0,927,883),7833=>array(0,-216,687,883),7834=>array(17,-14,825,760),7835=>array(50,0,540,941),7836=>array(-39,0,518,760),7837=>array(17,0,518,760),7838=>array(38,-14,808,743),7839=>array(16,-14,634,768),7840=>array(-65,-212,691,729),7841=>array(17,-212,611,560),7842=>array(-65,0,691,1025),7843=>array(17,-14,611,844),7844=>array(-65,0,853,1057),7845=>array(17,-14,795,876),7846=>array(-65,0,759,1057),7847=>array(17,-14,704,876),7848=>array(-65,0,840,1093),7849=>array(17,-14,773,913),7850=>array(-65,0,691,1068),7851=>array(17,-14,631,888),7852=>array(-65,-212,691,927),7853=>array(17,-212,611,800),7854=>array(-65,0,702,1057),7855=>array(17,-14,646,889),7856=>array(-65,0,691,1057),7857=>array(17,-14,611,889),7858=>array(-65,0,691,1121),7859=>array(17,-14,611,953),7860=>array(-65,0,693,1068),7861=>array(17,-14,630,900),7862=>array(-65,-212,691,936),7863=>array(17,-212,611,772),7864=>array(21,-212,670,729),7865=>array(36,-212,640,560),7866=>array(21,0,670,1025),7867=>array(36,-14,640,844),7868=>array(21,0,670,928),7869=>array(36,-14,640,778),7870=>array(21,0,805,1057),7871=>array(36,-14,814,876),7872=>array(21,0,772,1057),7873=>array(36,-14,721,876),7874=>array(21,0,799,1093),7875=>array(36,-14,797,913),7876=>array(21,0,670,1068),7877=>array(36,-14,648,888),7878=>array(21,-212,670,927),7879=>array(36,-212,640,800),7880=>array(21,0,417,1025),7881=>array(31,0,395,844),7882=>array(6,-212,351,729),7883=>array(10,-212,354,760),7884=>array(36,-212,814,742),7885=>array(36,-212,651,560),7886=>array(36,-14,814,1025),7887=>array(36,-14,651,844),7888=>array(36,-14,884,1057),7889=>array(36,-14,815,876),7890=>array(36,-14,814,1057),7891=>array(36,-14,724,876),7892=>array(36,-14,890,1093),7893=>array(36,-14,802,913),7894=>array(36,-14,814,1068),7895=>array(36,-14,655,888),7896=>array(36,-212,814,927),7897=>array(36,-212,651,800),7898=>array(39,-14,907,927),7899=>array(40,-14,771,800),7900=>array(39,-14,907,927),7901=>array(40,-14,771,798),7902=>array(39,-14,907,1025),7903=>array(40,-14,771,844),7904=>array(39,-14,907,928),7905=>array(40,-14,771,778),7906=>array(39,-212,907,760),7907=>array(40,-212,771,570),7908=>array(68,-212,791,729),7909=>array(60,-212,681,547),7910=>array(68,-14,791,1025),7911=>array(60,-14,681,844),7912=>array(67,-14,938,927),7913=>array(57,-14,795,799),7914=>array(67,-14,938,927),7915=>array(57,-14,795,800),7916=>array(67,-14,938,1025),7917=>array(57,-14,795,844),7918=>array(67,-14,938,928),7919=>array(57,-14,795,778),7920=>array(67,-212,938,761),7921=>array(57,-212,795,570),7922=>array(63,0,809,931),7923=>array(0,-216,687,803),7924=>array(63,-212,809,729),7925=>array(0,-216,687,547),7926=>array(63,0,809,1025),7927=>array(0,-216,687,844),7928=>array(63,0,809,928),7929=>array(0,-216,687,778),7930=>array(21,0,882,729),7931=>array(10,0,698,760),7936=>array(38,-12,692,785),7937=>array(38,-12,692,785),7938=>array(38,-12,692,800),7939=>array(38,-12,692,800),7940=>array(38,-12,692,800),7941=>array(38,-12,692,800),7942=>array(38,-12,692,928),7943=>array(38,-12,692,928),7944=>array(-65,0,691,785),7945=>array(-65,0,691,785),7946=>array(29,0,958,800),7947=>array(69,0,960,800),7948=>array(29,0,852,800),7949=>array(67,0,880,800),7950=>array(-3,0,752,928),7951=>array(20,0,776,928),7952=>array(27,-14,520,785),7953=>array(27,-14,520,785),7954=>array(27,-14,547,800),7955=>array(27,-14,541,800),7956=>array(27,-14,616,800),7957=>array(27,-14,601,800),7960=>array(31,0,778,785),7961=>array(69,0,781,785),7962=>array(29,0,1086,800),7963=>array(69,0,1083,800),7964=>array(29,0,1010,800),7965=>array(67,0,1039,800),7968=>array(50,-208,664,785),7969=>array(50,-208,664,785),7970=>array(50,-208,664,800),7971=>array(50,-208,664,800),7972=>array(50,-208,664,800),7973=>array(50,-208,684,800),7974=>array(50,-208,664,928),7975=>array(50,-208,664,928),7976=>array(31,0,924,785),7977=>array(69,0,930,785),7978=>array(29,0,1229,800),7979=>array(69,0,1229,800),7980=>array(29,0,1159,800),7981=>array(67,0,1185,800),7982=>array(98,0,1033,928),7983=>array(97,0,1042,928),7984=>array(42,-19,313,785),7985=>array(42,-19,313,785),7986=>array(0,-19,457,800),7987=>array(7,-19,426,800),7988=>array(42,-19,531,800),7989=>array(42,-19,523,800),7990=>array(42,-19,458,928),7991=>array(42,-19,455,928),7992=>array(31,0,462,785),7993=>array(69,0,468,785),7994=>array(29,0,756,800),7995=>array(69,0,764,800),7996=>array(29,0,691,800),7997=>array(67,0,717,800),7998=>array(98,0,583,928),7999=>array(97,0,583,928),8000=>array(36,-14,651,785),8001=>array(36,-14,651,785),8002=>array(36,-14,651,800),8003=>array(36,-14,651,800),8004=>array(36,-14,667,800),8005=>array(36,-14,680,800),8008=>array(31,-14,855,785),8009=>array(69,-14,897,785),8010=>array(29,-14,1185,800),8011=>array(69,-14,1188,800),8012=>array(29,-14,1017,800),8013=>array(67,-14,1046,800),8016=>array(54,-10,645,785),8017=>array(54,-10,645,785),8018=>array(54,-10,645,800),8019=>array(54,-10,645,800),8020=>array(54,-10,677,800),8021=>array(54,-10,683,800),8022=>array(54,-10,645,928),8023=>array(54,-10,645,928),8025=>array(69,0,1015,785),8027=>array(69,0,1269,800),8029=>array(67,0,1284,800),8031=>array(97,0,1134,928),8032=>array(33,-13,834,785),8033=>array(33,-13,834,785),8034=>array(33,-13,834,800),8035=>array(33,-13,834,800),8036=>array(33,-13,834,800),8037=>array(33,-13,834,800),8038=>array(33,-13,834,928),8039=>array(33,-13,834,928),8040=>array(13,0,870,785),8041=>array(63,0,920,785),8042=>array(29,0,1208,800),8043=>array(69,-3,1213,800),8044=>array(29,0,1037,800),8045=>array(67,0,1066,800),8046=>array(98,0,989,928),8047=>array(97,0,1037,928),8048=>array(38,-12,692,800),8049=>array(38,-12,692,800),8050=>array(27,-14,520,800),8051=>array(27,-14,567,800),8052=>array(50,-208,664,800),8053=>array(50,-208,664,800),8054=>array(42,-19,313,800),8055=>array(42,-19,436,800),8056=>array(36,-14,651,800),8057=>array(36,-14,651,800),8058=>array(54,-10,645,800),8059=>array(54,-10,645,800),8060=>array(33,-13,834,800),8061=>array(33,-13,834,800),8064=>array(38,-208,692,785),8065=>array(38,-208,692,785),8066=>array(38,-208,692,800),8067=>array(38,-208,692,800),8068=>array(38,-208,692,800),8069=>array(38,-208,692,800),8070=>array(38,-208,692,928),8071=>array(38,-208,692,928),8072=>array(-65,-208,691,785),8073=>array(-65,-208,691,785),8074=>array(29,-208,958,800),8075=>array(69,-208,960,800),8076=>array(29,-208,852,800),8077=>array(67,-208,880,800),8078=>array(-3,-208,752,928),8079=>array(20,-208,776,928),8080=>array(50,-208,664,785),8081=>array(50,-208,664,785),8082=>array(50,-208,664,800),8083=>array(50,-208,664,800),8084=>array(50,-208,664,800),8085=>array(50,-208,684,800),8086=>array(50,-208,664,928),8087=>array(50,-208,664,928),8088=>array(31,-208,924,785),8089=>array(69,-208,930,785),8090=>array(29,-208,1229,800),8091=>array(69,-208,1229,800),8092=>array(29,-208,1159,800),8093=>array(67,-208,1185,800),8094=>array(98,-208,1033,928),8095=>array(97,-208,1042,928),8096=>array(33,-208,834,785),8097=>array(33,-208,834,785),8098=>array(33,-208,834,800),8099=>array(33,-208,834,800),8100=>array(33,-208,834,800),8101=>array(33,-208,834,800),8102=>array(33,-208,834,928),8103=>array(33,-208,834,928),8104=>array(13,-208,870,785),8105=>array(63,-208,920,785),8106=>array(29,-208,1208,800),8107=>array(69,-208,1213,800),8108=>array(29,-208,1037,800),8109=>array(67,-208,1066,800),8110=>array(98,-208,989,928),8111=>array(97,-208,1037,928),8112=>array(38,-12,692,784),8113=>array(38,-12,692,760),8114=>array(38,-208,692,800),8115=>array(38,-208,692,559),8116=>array(38,-208,692,800),8118=>array(38,-12,692,778),8119=>array(38,-208,692,778),8120=>array(-65,0,691,927),8121=>array(-65,0,691,914),8122=>array(38,0,793,800),8123=>array(-42,0,714,800),8124=>array(-65,-208,691,729),8125=>array(210,595,381,785),8126=>array(132,-208,253,-45),8127=>array(210,595,381,785),8128=>array(133,638,500,778),8129=>array(152,654,540,928),8130=>array(50,-208,664,800),8131=>array(50,-208,664,560),8132=>array(50,-208,664,800),8134=>array(50,-208,664,778),8135=>array(50,-208,664,778),8136=>array(84,0,916,800),8137=>array(22,0,831,800),8138=>array(84,0,1059,800),8139=>array(28,0,986,800),8140=>array(21,-208,816,729),8141=>array(61,595,518,800),8142=>array(90,595,563,800),8143=>array(174,595,540,928),8144=>array(42,-19,413,784),8145=>array(42,-19,405,760),8146=>array(42,-19,402,978),8147=>array(50,-19,516,978),8150=>array(42,-19,424,778),8151=>array(42,-19,454,928),8152=>array(21,0,424,927),8153=>array(21,0,417,914),8154=>array(84,0,600,800),8155=>array(25,0,521,800),8157=>array(105,595,523,800),8158=>array(111,595,574,800),8159=>array(174,595,540,928),8160=>array(54,-10,645,784),8161=>array(54,-10,645,760),8162=>array(54,-10,645,978),8163=>array(54,-10,660,978),8164=>array(9,-208,699,785),8165=>array(9,-208,699,785),8166=>array(54,-10,645,778),8167=>array(54,-10,645,928),8168=>array(63,0,809,927),8169=>array(63,0,809,914),8170=>array(84,0,1105,800),8171=>array(20,0,1067,800),8172=>array(69,0,825,785),8173=>array(152,654,484,978),8174=>array(152,654,589,978),8175=>array(131,616,371,800),8178=>array(33,-208,834,800),8179=>array(33,-208,834,547),8180=>array(33,-208,834,800),8182=>array(33,-13,834,778),8183=>array(33,-208,834,778),8184=>array(84,-14,1029,800),8185=>array(28,-14,851,800),8186=>array(84,0,1046,800),8187=>array(-1,0,855,800),8188=>array(-45,-208,812,742),8189=>array(227,616,539,800),8190=>array(249,595,392,785),8208=>array(25,217,360,359),8209=>array(25,217,360,359),8210=>array(24,211,637,337),8211=>array(24,211,441,337),8212=>array(24,211,941,337),8213=>array(-30,211,995,337),8214=>array(127,-236,399,764),8215=>array(-10,-236,510,-9),8216=>array(113,418,389,729),8217=>array(73,418,349,729),8218=>array(-34,-122,242,189),8219=>array(107,418,302,729),8220=>array(113,418,652,729),8221=>array(73,418,612,729),8222=>array(-34,-122,505,189),8223=>array(95,418,535,729),8224=>array(38,-96,504,729),8225=>array(-28,-96,504,729),8226=>array(144,196,495,547),8227=>array(144,157,534,586),8228=>array(46,0,259,189),8229=>array(46,0,569,189),8230=>array(46,0,879,189),8231=>array(124,304,282,424),8240=>array(55,-14,1401,742),8241=>array(55,-14,1855,742),8242=>array(2,547,257,729),8243=>array(2,547,440,729),8244=>array(2,547,624,729),8245=>array(161,547,346,729),8246=>array(161,547,532,729),8247=>array(161,547,712,729),8248=>array(101,-238,632,29),8249=>array(61,67,355,519),8250=>array(38,66,331,519),8251=>array(72,0,900,829),8252=>array(-2,0,629,729),8253=>array(98,0,550,742),8254=>array(-10,663,510,755),8255=>array(-31,-237,859,-79),8256=>array(-31,769,859,927),8257=>array(-52,-235,296,231),8258=>array(20,-37,1003,832),8259=>array(102,188,428,325),8260=>array(-278,-14,445,742),8261=>array(-10,-132,466,760),8262=>array(-28,-132,448,760),8263=>array(69,0,1035,742),8264=>array(104,0,831,742),8265=>array(-2,0,799,742),8266=>array(87,-125,530,546),8267=>array(57,-96,666,729),8268=>array(75,189,425,541),8269=>array(75,189,425,541),8270=>array(20,-37,503,427),8271=>array(56,-142,327,547),8272=>array(-31,-237,859,927),8273=>array(68,-3,455,830),8274=>array(3,-93,548,729),8275=>array(49,212,951,415),8276=>array(-31,-351,859,-192),8277=>array(142,98,694,631),8278=>array(95,93,628,645),8279=>array(2,547,807,729),8280=>array(61,21,776,708),8281=>array(80,71,768,657),8282=>array(31,0,350,729),8283=>array(30,-170,839,898),8284=>array(43,0,794,729),8285=>array(31,0,339,683),8286=>array(31,0,339,683),8304=>array(29,319,398,742),8305=>array(12,326,205,751),8308=>array(3,326,388,734),8309=>array(12,319,393,734),8310=>array(37,319,403,742),8311=>array(51,326,418,734),8312=>array(20,319,400,742),8313=>array(23,319,389,742),8314=>array(67,326,461,677),8315=>array(67,469,461,534),8316=>array(67,407,461,596),8317=>array(48,252,282,751),8318=>array(-1,252,232,751),8319=>array(23,326,412,640),8320=>array(29,-7,398,416),8321=>array(67,0,395,408),8322=>array(45,0,431,416),8323=>array(40,-7,427,416),8324=>array(3,0,388,408),8325=>array(12,-7,393,408),8326=>array(37,-7,403,416),8327=>array(51,0,418,408),8328=>array(20,-7,400,416),8329=>array(23,-7,389,416),8330=>array(67,0,461,351),8331=>array(67,143,461,208),8332=>array(67,81,461,270),8333=>array(48,-74,282,425),8334=>array(-1,-74,232,425),8336=>array(37,-8,411,313),8337=>array(49,-8,429,313),8338=>array(49,-8,436,313),8339=>array(-20,0,427,306),8340=>array(53,-8,423,313),8341=>array(12,0,401,425),8342=>array(20,0,451,425),8343=>array(12,0,207,425),8344=>array(21,0,621,313),8345=>array(23,0,412,313),8346=>array(-6,-117,427,313),8347=>array(11,-8,355,313),8348=>array(72,0,365,393),8352=>array(53,0,919,729),8353=>array(36,-44,693,778),8354=>array(36,-14,697,742),8355=>array(3,0,690,729),8356=>array(7,0,691,742),8357=>array(30,-93,975,640),8358=>array(14,0,823,729),8359=>array(21,-14,1453,729),8360=>array(22,-14,1154,729),8361=>array(23,0,1143,729),8362=>array(-32,-14,870,729),8363=>array(36,-185,817,760),8364=>array(-41,-14,687,742),8365=>array(12,0,735,729),8366=>array(55,0,754,729),8367=>array(37,-223,1220,742),8368=>array(1,-14,660,742),8369=>array(21,0,697,729),8370=>array(38,-81,682,809),8371=>array(-66,0,685,729),8372=>array(16,-14,844,742),8373=>array(76,-147,688,760),8376=>array(18,0,754,729),8377=>array(61,0,718,729),8378=>array(-10,0,745,729),8400=>array(-510,628,-26,760),8401=>array(-483,628,-11,760),8406=>array(-470,560,-20,760),8407=>array(-477,560,-26,760),8411=>array(-335,654,190,774),8412=>array(-432,654,287,774),8417=>array(-470,560,-26,760),8448=>array(15,-23,1106,752),8449=>array(15,-23,1106,752),8450=>array(50,-14,670,742),8451=>array(87,-14,1201,749),8452=>array(64,0,832,729),8453=>array(25,-24,1097,752),8454=>array(25,-24,1169,752),8455=>array(37,-14,652,742),8456=>array(1,-146,693,611),8457=>array(87,0,999,749),8459=>array(36,-14,1063,746),8460=>array(6,-125,809,747),8461=>array(100,0,788,729),8462=>array(31,0,654,760),8463=>array(10,0,625,760),8464=>array(36,-14,533,742),8465=>array(52,-14,659,743),8466=>array(37,-14,787,742),8467=>array(-14,-14,401,742),8468=>array(12,-14,935,760),8469=>array(92,0,745,729),8470=>array(-37,0,1156,729),8471=>array(138,0,862,725),8472=>array(54,-221,658,495),8473=>array(92,0,709,729),8474=>array(50,-146,800,742),8475=>array(31,-14,904,768),8476=>array(41,-14,803,743),8477=>array(98,0,793,729),8478=>array(53,0,844,729),8479=>array(53,-112,666,887),8480=>array(126,443,770,730),8481=>array(40,0,1223,547),8482=>array(144,447,790,729),8483=>array(22,-113,877,885),8484=>array(45,0,709,729),8485=>array(-11,-230,648,777),8486=>array(-45,0,812,742),8487=>array(42,-14,813,723),8488=>array(-5,-159,670,729),8489=>array(36,0,306,566),8490=>array(21,0,837,729),8491=>array(-65,0,691,928),8492=>array(41,-1,853,772),8493=>array(63,-19,767,742),8494=>array(61,-12,793,647),8495=>array(41,-14,591,533),8496=>array(72,-14,668,742),8497=>array(37,-14,860,773),8498=>array(21,0,670,729),8499=>array(38,-18,1156,751),8500=>array(29,-12,436,420),8501=>array(50,-14,761,742),8502=>array(19,-14,687,742),8503=>array(31,-35,439,742),8504=>array(63,-41,633,742),8505=>array(34,0,355,760),8506=>array(44,-27,994,723),8507=>array(0,0,1384,547),8508=>array(34,-14,765,547),8509=>array(-40,-208,700,561),8510=>array(92,0,627,729),8511=>array(92,0,771,729),8512=>array(12,-192,820,719),8513=>array(5,-14,747,742),8514=>array(9,0,554,729),8515=>array(11,0,671,729),8516=>array(2,0,749,729),8517=>array(21,0,786,729),8518=>array(34,-14,752,760),8519=>array(33,-14,635,560),8520=>array(15,0,353,760),8521=>array(-143,-216,354,760),8523=>array(60,-14,838,742),8526=>array(1,0,523,547),8528=>array(56,-14,1023,742),8529=>array(56,-14,994,742),8530=>array(56,-14,1441,742),8531=>array(56,-14,1032,742),8532=>array(45,-14,1032,742),8533=>array(56,-14,998,742),8534=>array(45,-14,998,742),8535=>array(40,-14,998,742),8536=>array(3,-14,998,742),8537=>array(56,-14,1008,742),8538=>array(12,-14,1008,742),8539=>array(56,-14,1005,742),8540=>array(40,-14,1005,742),8541=>array(12,-14,1005,742),8542=>array(51,-14,1005,742),8543=>array(56,-14,893,742),8544=>array(21,0,351,729),8545=>array(21,0,638,729),8546=>array(21,0,924,729),8547=>array(21,0,1165,729),8548=>array(76,0,840,729),8549=>array(76,0,1078,729),8550=>array(76,0,1365,729),8551=>array(76,0,1651,729),8552=>array(21,0,1162,729),8553=>array(-51,0,812,729),8554=>array(-51,0,1099,729),8555=>array(-51,0,1386,729),8556=>array(21,0,566,729),8557=>array(36,-14,724,742),8558=>array(21,0,786,729),8559=>array(21,0,974,729),8560=>array(31,0,354,760),8561=>array(31,0,619,760),8562=>array(31,0,883,760),8563=>array(31,0,987,760),8564=>array(63,0,678,547),8565=>array(63,0,973,760),8566=>array(63,0,1238,760),8567=>array(63,0,1502,760),8568=>array(31,0,995,760),8569=>array(-41,0,671,547),8570=>array(-41,0,980,760),8571=>array(-41,0,1245,760),8572=>array(31,0,354,760),8573=>array(37,-14,581,560),8574=>array(36,-14,724,760),8575=>array(31,0,984,560),8576=>array(48,0,1240,729),8577=>array(21,0,782,729),8578=>array(48,0,1240,729),8579=>array(-13,-14,675,742),8580=>array(-7,-14,537,560),8581=>array(68,-208,752,742),8585=>array(29,-14,1032,742),8592=>array(49,87,781,540),8593=>array(193,0,646,732),8594=>array(57,87,789,540),8595=>array(193,-3,646,729),8596=>array(49,87,789,540),8597=>array(193,-3,646,732),8598=>array(136,66,720,650),8599=>array(136,66,720,650),8600=>array(136,66,720,650),8601=>array(136,66,720,650),8602=>array(49,87,781,540),8603=>array(57,87,789,540),8604=>array(13,84,833,431),8605=>array(5,84,825,431),8606=>array(49,87,781,540),8607=>array(189,0,641,732),8608=>array(57,87,789,540),8609=>array(194,-3,646,729),8610=>array(49,87,793,540),8611=>array(45,87,789,540),8612=>array(49,87,781,540),8613=>array(193,0,646,732),8614=>array(57,87,789,540),8615=>array(193,0,646,732),8616=>array(193,0,646,732),8617=>array(49,87,781,565),8618=>array(57,87,789,565),8619=>array(49,87,781,565),8620=>array(57,87,789,565),8621=>array(49,87,789,540),8622=>array(49,86,789,541),8623=>array(123,-4,714,733),8624=>array(169,0,646,755),8625=>array(192,0,669,755),8626=>array(169,-26,646,729),8627=>array(192,-26,669,729),8628=>array(233,-3,772,621),8629=>array(49,87,673,626),8630=>array(11,198,816,685),8631=>array(22,198,828,685),8632=>array(118,13,788,729),8633=>array(49,-108,789,735),8634=>array(86,45,767,691),8635=>array(71,45,751,691),8636=>array(49,255,781,540),8637=>array(49,87,781,372),8638=>array(361,0,646,732),8639=>array(193,0,478,732),8640=>array(57,255,789,540),8641=>array(57,87,789,372),8642=>array(361,0,646,732),8643=>array(193,0,478,732),8644=>array(49,-59,789,686),8645=>array(47,-3,792,732),8646=>array(49,-59,789,686),8647=>array(49,-59,781,686),8648=>array(46,0,792,732),8649=>array(57,-59,789,686),8650=>array(46,-3,792,729),8651=>array(49,-5,789,632),8652=>array(49,-5,789,632),8653=>array(49,87,781,540),8654=>array(49,87,789,540),8655=>array(57,87,789,540),8656=>array(49,87,781,540),8657=>array(193,0,645,732),8658=>array(57,87,789,540),8659=>array(193,-3,645,729),8660=>array(49,87,789,540),8661=>array(193,-8,645,732),8662=>array(132,-26,755,596),8663=>array(88,-26,711,597),8664=>array(88,16,711,639),8665=>array(132,16,755,639),8666=>array(49,87,781,540),8667=>array(57,87,789,540),8668=>array(44,87,776,540),8669=>array(57,87,789,540),8670=>array(193,0,646,732),8671=>array(193,-3,646,729),8672=>array(49,87,781,540),8673=>array(193,0,646,732),8674=>array(57,87,789,540),8675=>array(193,-3,646,729),8676=>array(49,87,781,540),8677=>array(57,87,789,540),8678=>array(27,46,781,581),8679=>array(151,0,687,754),8680=>array(35,46,789,581),8681=>array(151,-25,687,729),8682=>array(151,0,687,754),8683=>array(151,0,687,754),8684=>array(151,0,687,754),8685=>array(151,0,687,754),8686=>array(151,0,687,754),8687=>array(151,0,687,754),8688=>array(35,46,789,581),8689=>array(60,0,788,729),8690=>array(60,0,788,729),8691=>array(151,-25,687,754),8692=>array(57,87,789,540),8693=>array(47,-3,792,732),8694=>array(57,-223,789,850),8695=>array(49,87,781,540),8696=>array(57,87,789,540),8697=>array(49,87,789,540),8698=>array(49,87,781,540),8699=>array(57,87,789,540),8700=>array(49,87,789,540),8701=>array(27,96,781,531),8702=>array(57,96,811,531),8703=>array(27,96,811,531),8704=>array(5,0,769,729),8705=>array(48,-14,629,742),8706=>array(29,-14,515,674),8707=>array(92,0,610,729),8708=>array(92,-46,610,775),8709=>array(47,-15,810,715),8710=>array(0,0,697,719),8711=>array(0,0,697,719),8712=>array(73,-2,824,730),8713=>array(73,-46,824,775),8714=>array(106,58,644,568),8715=>array(73,-2,824,730),8716=>array(73,-46,824,775),8717=>array(106,58,644,568),8718=>array(98,0,539,553),8719=>array(73,-192,712,719),8720=>array(73,-193,712,718),8721=>array(20,-192,697,719),8722=>array(106,256,732,371),8723=>array(106,0,732,627),8724=>array(49,0,647,729),8725=>array(-96,-93,434,729),8726=>array(165,-49,530,772),8727=>array(118,0,720,626),8728=>array(150,151,475,477),8729=>array(102,253,278,442),8730=>array(37,-20,669,837),8731=>array(37,-20,669,933),8732=>array(36,-20,669,924),8733=>array(92,89,617,505),8734=>array(92,89,741,505),8735=>array(106,67,732,693),8736=>array(77,0,820,729),8737=>array(77,-44,820,729),8738=>array(116,-0,732,726),8739=>array(207,-207,322,773),8740=>array(48,-207,482,773),8741=>array(112,-207,417,773),8742=>array(48,-207,482,773),8743=>array(151,0,661,579),8744=>array(151,0,661,579),8745=>array(151,0,661,579),8746=>array(151,0,661,579),8747=>array(15,-227,548,754),8748=>array(15,-227,914,754),8749=>array(15,-227,1280,754),8750=>array(14,-227,548,754),8751=>array(38,-227,938,754),8752=>array(23,-227,1290,754),8753=>array(15,-227,616,754),8754=>array(14,-227,600,754),8755=>array(14,-227,588,754),8756=>array(60,78,637,647),8757=>array(60,78,637,647),8758=>array(59,79,235,647),8759=>array(60,78,637,647),8760=>array(106,256,732,631),8761=>array(106,45,800,584),8762=>array(106,-4,732,631),8763=>array(106,-34,732,660),8764=>array(106,212,732,415),8765=>array(106,212,732,415),8766=>array(65,131,772,497),8767=>array(106,42,732,584),8768=>array(85,0,289,626),8769=>array(106,76,732,551),8770=>array(106,110,732,482),8771=>array(106,144,732,517),8772=>array(106,0,732,637),8773=>array(106,37,732,628),8774=>array(106,-31,732,628),8775=>array(106,-86,732,726),8776=>array(106,110,732,517),8777=>array(106,8,732,614),8778=>array(106,37,732,628),8779=>array(106,-13,732,628),8780=>array(106,37,732,628),8781=>array(105,105,732,585),8782=>array(106,26,732,656),8783=>array(106,172,732,656),8784=>array(106,144,732,744),8785=>array(106,-117,732,743),8786=>array(105,-92,732,719),8787=>array(104,-92,731,719),8788=>array(98,102,965,520),8789=>array(96,102,966,520),8790=>array(106,144,732,482),8791=>array(106,144,732,839),8792=>array(106,144,732,704),8793=>array(106,144,732,840),8794=>array(106,144,732,840),8795=>array(106,144,732,959),8796=>array(106,144,732,952),8797=>array(106,144,732,762),8798=>array(106,144,732,786),8799=>array(106,144,732,903),8800=>array(106,-5,732,631),8801=>array(106,38,732,588),8802=>array(106,-69,732,695),8803=>array(106,-74,732,700),8804=>array(106,0,732,582),8805=>array(106,0,732,582),8806=>array(106,-106,732,617),8807=>array(106,-106,732,617),8808=>array(106,-185,732,617),8809=>array(106,-185,732,617),8810=>array(72,-34,974,660),8811=>array(72,-34,974,660),8812=>array(86,-132,414,759),8813=>array(105,-10,732,700),8814=>array(106,-4,732,690),8815=>array(106,-63,732,631),8816=>array(106,-112,732,645),8817=>array(106,-112,732,645),8818=>array(106,-84,732,582),8819=>array(106,-84,732,582),8820=>array(106,-112,732,645),8821=>array(106,-112,732,645),8822=>array(102,-119,732,678),8823=>array(102,-119,732,678),8824=>array(102,-221,732,779),8825=>array(102,-221,732,779),8826=>array(106,-55,732,681),8827=>array(106,-55,732,681),8828=>array(106,-177,732,684),8829=>array(106,-177,732,684),8830=>array(106,-132,732,684),8831=>array(106,-132,732,684),8832=>array(106,-89,732,781),8833=>array(106,-89,732,781),8834=>array(99,67,739,559),8835=>array(99,65,739,559),8836=>array(99,-96,739,726),8837=>array(99,-100,739,722),8838=>array(99,0,739,636),8839=>array(99,0,739,635),8840=>array(99,-124,739,759),8841=>array(99,-124,739,759),8842=>array(99,-97,739,636),8843=>array(99,-97,739,635),8844=>array(151,0,661,579),8845=>array(151,0,661,579),8846=>array(151,0,661,579),8847=>array(106,0,732,584),8848=>array(106,0,732,584),8849=>array(106,-115,732,667),8850=>array(106,-115,732,667),8851=>array(106,0,690,626),8852=>array(106,0,690,626),8853=>array(91,-14,747,643),8854=>array(91,-14,747,643),8855=>array(91,-14,747,643),8856=>array(91,-13,747,642),8857=>array(91,-14,747,643),8858=>array(91,-14,747,643),8859=>array(91,-14,747,643),8860=>array(91,-14,747,643),8861=>array(91,-14,747,643),8862=>array(77,-29,761,657),8863=>array(77,-29,761,657),8864=>array(77,-29,761,657),8865=>array(77,-29,761,657),8866=>array(85,0,829,705),8867=>array(85,0,829,705),8868=>array(85,0,829,705),8869=>array(85,0,829,705),8870=>array(85,0,457,705),8871=>array(85,0,457,705),8872=>array(85,0,829,705),8873=>array(85,0,829,705),8874=>array(85,0,829,705),8875=>array(85,0,829,705),8876=>array(85,-100,829,805),8877=>array(85,-100,829,805),8878=>array(85,-100,829,805),8879=>array(85,-100,829,805),8880=>array(106,-54,724,681),8881=>array(114,-54,732,681),8882=>array(106,-1,732,628),8883=>array(106,-1,732,628),8884=>array(106,-80,732,706),8885=>array(106,-80,732,706),8886=>array(60,151,940,477),8887=>array(60,151,940,477),8888=>array(60,151,778,477),8889=>array(43,-63,794,689),8890=>array(63,0,480,705),8891=>array(103,0,709,759),8892=>array(103,0,709,759),8893=>array(103,0,709,759),8894=>array(106,0,732,626),8895=>array(106,0,732,626),8896=>array(0,-192,843,719),8897=>array(0,-192,843,719),8898=>array(48,-192,794,719),8899=>array(48,-192,794,719),8900=>array(3,-233,491,807),8901=>array(102,253,278,442),8902=>array(83,112,543,549),8903=>array(106,-56,732,683),8904=>array(106,-48,894,674),8905=>array(106,-48,894,675),8906=>array(106,-48,894,675),8907=>array(106,-48,894,675),8908=>array(106,-48,894,675),8909=>array(106,144,732,517),8910=>array(49,0,763,579),8911=>array(49,0,763,579),8912=>array(93,-22,732,649),8913=>array(106,-22,745,649),8914=>array(83,0,755,639),8915=>array(83,-14,755,625),8916=>array(186,0,652,729),8917=>array(106,-100,732,729),8918=>array(106,30,732,597),8919=>array(106,30,732,597),8920=>array(72,-34,1350,660),8921=>array(72,-34,1350,660),8922=>array(106,-211,732,837),8923=>array(106,-211,732,837),8924=>array(106,0,732,582),8925=>array(106,0,732,582),8926=>array(106,-177,732,684),8927=>array(106,-177,732,684),8928=>array(106,-197,732,808),8929=>array(106,-263,732,742),8930=>array(106,-191,732,817),8931=>array(106,-191,732,817),8932=>array(106,-146,732,636),8933=>array(106,-146,732,636),8934=>array(106,-168,732,582),8935=>array(106,-168,732,582),8936=>array(106,-216,732,684),8937=>array(106,-216,732,684),8938=>array(106,-138,732,808),8939=>array(106,-138,732,808),8940=>array(106,-224,732,894),8941=>array(106,-224,732,894),8942=>array(412,-40,588,735),8943=>array(79,253,921,442),8944=>array(79,-40,921,735),8945=>array(79,-40,921,735),8946=>array(72,-2,1085,730),8947=>array(73,-2,824,730),8948=>array(106,58,644,568),8949=>array(73,-2,824,984),8950=>array(73,-2,824,919),8951=>array(106,58,644,741),8952=>array(73,-207,824,730),8953=>array(73,-2,824,730),8954=>array(72,-2,1085,730),8955=>array(73,-2,824,730),8956=>array(106,58,644,568),8957=>array(72,-2,824,919),8958=>array(106,58,644,741),8959=>array(106,0,791,732),8960=>array(31,-22,572,519),8961=>array(56,152,540,453),8962=>array(64,0,651,596),8963=>array(193,470,646,732),8964=>array(193,0,646,263),8965=>array(193,-12,646,423),8966=>array(193,-12,646,552),8967=>array(194,-42,443,802),8968=>array(-1,-132,476,760),8969=>array(118,-132,458,760),8970=>array(-1,-132,339,760),8971=>array(-19,-132,458,760),8972=>array(352,-77,759,331),8973=>array(49,-77,457,331),8974=>array(352,226,759,634),8975=>array(49,226,457,634),8976=>array(106,140,732,444),8977=>array(3,113,536,646),8984=>array(84,0,843,759),8985=>array(106,140,732,444),8988=>array(86,425,469,760),8989=>array(127,425,469,760),8990=>array(62,-126,403,208),8991=>array(41,-126,423,208),8992=>array(235,-250,586,926),8993=>array(22,-240,373,940),8996=>array(76,215,1076,575),8997=>array(76,0,1076,575),8998=>array(76,0,1414,760),8999=>array(76,0,1076,760),9000=>array(59,0,1385,729),9003=>array(0,0,1338,760),9004=>array(73,-91,800,748),9075=>array(78,-19,348,547),9076=>array(84,-208,671,562),9077=>array(43,-13,826,547),9082=>array(48,-13,645,559),9085=>array(1,-228,862,99),9095=>array(76,0,1100,743),9108=>array(17,0,856,727),9115=>array(63,-252,438,928),9116=>array(63,-252,205,940),9117=>array(63,-240,438,940),9118=>array(63,-252,438,928),9119=>array(295,-252,438,940),9120=>array(63,-240,438,940),9121=>array(63,-252,438,928),9122=>array(63,-252,205,940),9123=>array(63,-240,438,940),9124=>array(63,-252,438,928),9125=>array(295,-252,438,940),9126=>array(63,-240,438,940),9127=>array(306,-261,668,928),9128=>array(82,-247,444,934),9129=>array(306,-240,668,934),9130=>array(306,-256,444,934),9131=>array(82,-261,444,928),9132=>array(306,-247,668,934),9133=>array(82,-240,444,934),9134=>array(235,-250,373,940),9166=>array(27,46,781,729),9167=>array(91,0,854,596),9187=>array(73,-91,800,748),9189=>array(3,75,766,444),9192=>array(-5,-129,623,294),9250=>array(-34,-14,652,760),9251=>array(21,-228,672,99),9312=>array(59,-15,788,715),9313=>array(59,-15,788,715),9314=>array(59,-15,788,715),9315=>array(59,-15,788,715),9316=>array(59,-15,788,715),9317=>array(59,-15,788,715),9318=>array(59,-15,788,715),9319=>array(59,-15,788,715),9320=>array(59,-15,788,715),9321=>array(59,-15,788,715),9600=>array(-10,260,779,770),9601=>array(-10,-250,779,-123),9602=>array(-10,-250,779,-5),9603=>array(-10,-250,779,132),9604=>array(-10,-250,779,260),9605=>array(-10,-250,779,387),9606=>array(-10,-250,779,515),9607=>array(-10,-250,779,642),9608=>array(-10,-250,779,770),9609=>array(-10,-250,680,770),9610=>array(-10,-250,582,770),9611=>array(-10,-250,483,770),9612=>array(-10,-250,384,770),9613=>array(-10,-250,286,770),9614=>array(-10,-250,187,770),9615=>array(-10,-250,88,770),9616=>array(384,-250,778,770),9617=>array(-10,-250,680,770),9618=>array(-10,-250,779,770),9619=>array(-10,-250,779,770),9620=>array(-10,642,779,770),9621=>array(680,-250,778,770),9622=>array(-10,-250,385,260),9623=>array(384,-250,779,260),9624=>array(-10,260,385,770),9625=>array(-10,-250,779,770),9626=>array(-10,-250,779,770),9627=>array(-10,-250,779,770),9628=>array(-10,-250,779,770),9629=>array(384,260,779,770),9630=>array(-10,-250,779,770),9631=>array(-10,-250,779,770),9632=>array(91,-124,854,643),9633=>array(91,-124,854,643),9634=>array(91,-124,854,643),9635=>array(91,-124,854,643),9636=>array(91,-124,854,643),9637=>array(91,-124,854,643),9638=>array(91,-124,854,643),9639=>array(91,-124,854,643),9640=>array(91,-124,854,643),9641=>array(91,-124,854,643),9642=>array(91,11,587,509),9643=>array(91,11,587,509),9644=>array(91,75,854,444),9645=>array(91,75,854,444),9646=>array(91,-122,459,642),9647=>array(91,-122,459,642),9648=>array(3,75,766,444),9649=>array(3,75,766,444),9650=>array(3,-124,766,643),9651=>array(3,-124,766,643),9652=>array(3,11,499,509),9653=>array(3,11,499,509),9654=>array(3,-124,766,643),9655=>array(3,-124,766,643),9656=>array(3,11,499,509),9657=>array(3,11,499,509),9658=>array(3,11,766,509),9659=>array(3,11,766,509),9660=>array(3,-124,766,643),9661=>array(3,-124,766,643),9662=>array(3,11,499,509),9663=>array(3,11,499,509),9664=>array(3,-124,766,643),9665=>array(3,-124,766,643),9666=>array(3,11,499,509),9667=>array(3,11,499,509),9668=>array(3,11,766,509),9669=>array(3,11,766,509),9670=>array(3,-124,766,643),9671=>array(3,-124,766,643),9672=>array(3,-124,766,643),9673=>array(55,-125,818,645),9674=>array(3,-233,491,807),9675=>array(55,-125,818,645),9676=>array(56,-125,817,644),9677=>array(55,-125,818,645),9678=>array(55,-125,818,645),9679=>array(55,-123,818,641),9680=>array(55,-123,818,641),9681=>array(55,-123,818,641),9682=>array(55,-123,818,641),9683=>array(55,-123,818,641),9684=>array(55,-123,818,641),9685=>array(55,-123,818,641),9686=>array(55,-125,436,645),9687=>array(91,-125,472,645),9688=>array(91,-10,750,770),9689=>array(91,-250,879,770),9690=>array(91,260,879,770),9691=>array(91,-250,879,260),9692=>array(3,260,385,645),9693=>array(3,260,384,645),9694=>array(3,-125,384,260),9695=>array(3,-125,385,260),9696=>array(3,260,766,645),9697=>array(3,-125,766,260),9698=>array(3,-124,766,643),9699=>array(3,-124,766,643),9700=>array(3,-124,766,643),9701=>array(3,-124,766,643),9702=>array(144,196,495,547),9703=>array(91,-124,854,643),9704=>array(91,-124,854,643),9705=>array(91,-124,854,643),9706=>array(91,-124,854,643),9707=>array(91,-124,854,643),9708=>array(3,-124,766,643),9709=>array(3,-124,766,643),9710=>array(3,-124,766,643),9711=>array(55,-250,1064,770),9712=>array(91,-124,854,643),9713=>array(91,-124,854,643),9714=>array(91,-124,854,643),9715=>array(91,-124,854,643),9716=>array(55,-123,818,641),9717=>array(55,-123,818,641),9718=>array(55,-123,818,641),9719=>array(55,-123,818,641),9720=>array(3,-124,766,643),9721=>array(3,-124,766,643),9722=>array(3,-124,766,643),9723=>array(91,-66,739,585),9724=>array(91,-66,739,585),9725=>array(91,-17,642,537),9726=>array(91,-17,642,537),9727=>array(3,-124,766,643),9728=>array(83,0,813,729),9729=>array(51,-2,949,360),9730=>array(49,0,848,729),9731=>array(83,-0,813,927),9732=>array(64,0,833,880),9733=>array(65,-4,832,723),9734=>array(65,-4,832,723),9735=>array(83,2,490,729),9736=>array(83,0,813,731),9737=>array(83,0,813,730),9738=>array(61,0,828,727),9739=>array(61,0,828,723),9740=>array(61,-1,610,722),9741=>array(61,0,952,723),9742=>array(68,0,1177,729),9743=>array(71,0,1180,729),9744=>array(90,0,807,729),9745=>array(89,0,808,729),9746=>array(89,0,808,729),9747=>array(75,78,457,656),9748=>array(49,0,870,933),9749=>array(74,0,822,731),9750=>array(84,0,813,731),9751=>array(84,0,813,727),9752=>array(78,0,819,729),9753=>array(83,140,813,574),9754=>array(84,113,813,569),9755=>array(84,113,813,569),9756=>array(87,104,810,569),9757=>array(72,0,537,724),9758=>array(86,103,810,569),9759=>array(72,-3,537,720),9760=>array(61,0,835,730),9761=>array(84,0,813,730),9762=>array(83,0,813,730),9763=>array(49,0,848,730),9764=>array(49,-2,620,727),9765=>array(83,0,663,731),9766=>array(83,-1,566,731),9767=>array(83,0,701,911),9768=>array(83,0,462,730),9769=>array(83,-1,813,729),9770=>array(87,0,810,730),9771=>array(83,0,814,731),9772=>array(83,0,627,731),9773=>array(83,0,813,730),9774=>array(83,0,813,730),9775=>array(83,0,813,730),9776=>array(83,0,813,729),9777=>array(83,0,814,729),9778=>array(83,0,813,729),9779=>array(83,0,813,729),9780=>array(83,0,813,729),9781=>array(83,0,813,729),9782=>array(83,0,813,729),9783=>array(83,0,813,729),9784=>array(80,3,817,721),9785=>array(83,-73,959,804),9786=>array(83,-73,959,804),9787=>array(83,-73,959,804),9788=>array(83,0,813,730),9789=>array(358,0,814,730),9790=>array(83,0,539,730),9791=>array(85,-102,528,732),9792=>array(85,-125,647,731),9793=>array(85,-14,647,843),9794=>array(79,-14,831,720),9795=>array(166,0,730,730),9796=>array(219,0,677,730),9797=>array(121,0,774,730),9798=>array(127,0,769,730),9799=>array(240,0,656,730),9800=>array(45,0,851,731),9801=>array(89,0,807,730),9802=>array(94,0,802,731),9803=>array(113,31,784,679),9804=>array(140,0,756,730),9805=>array(53,-180,843,730),9806=>array(83,52,813,653),9807=>array(34,-96,863,730),9808=>array(83,-0,813,730),9809=>array(94,0,802,730),9810=>array(86,153,810,579),9811=>array(157,0,739,730),9812=>array(98,0,798,730),9813=>array(110,0,786,730),9814=>array(167,-1,729,729),9815=>array(214,0,683,730),9816=>array(165,0,732,730),9817=>array(148,-0,748,730),9818=>array(98,0,798,730),9819=>array(110,0,786,730),9820=>array(167,-1,729,729),9821=>array(214,0,683,730),9822=>array(162,0,734,730),9823=>array(148,-0,748,730),9824=>array(158,0,738,729),9825=>array(90,0,806,727),9826=>array(168,0,728,729),9827=>array(111,0,785,729),9828=>array(157,0,739,729),9829=>array(89,0,808,729),9830=>array(168,0,728,729),9831=>array(111,0,785,732),9832=>array(105,-1,791,729),9833=>array(84,-5,339,729),9834=>array(84,-5,554,729),9835=>array(184,-102,712,729),9836=>array(92,-5,804,729),9837=>array(88,-3,392,731),9838=>array(84,0,273,731),9839=>array(84,0,400,731),9840=>array(84,0,664,731),9841=>array(64,0,701,731),9842=>array(84,0,813,709),9843=>array(76,16,820,731),9844=>array(76,16,820,731),9845=>array(76,16,820,731),9846=>array(76,16,820,731),9847=>array(76,16,820,731),9848=>array(76,16,820,731),9849=>array(76,16,820,731),9850=>array(76,16,820,731),9851=>array(84,0,812,704),9852=>array(83,0,814,731),9853=>array(83,0,814,731),9854=>array(83,0,814,731),9855=>array(149,1,747,731),9856=>array(73,0,797,725),9857=>array(73,0,797,725),9858=>array(73,0,797,725),9859=>array(73,0,797,725),9860=>array(73,0,797,725),9861=>array(73,0,797,725),9862=>array(83,0,813,731),9863=>array(83,0,813,731),9864=>array(83,0,813,731),9865=>array(83,0,813,731),9866=>array(83,0,813,98),9867=>array(83,0,813,98),9868=>array(83,0,813,413),9869=>array(83,0,813,413),9870=>array(83,0,813,413),9871=>array(83,0,813,413),9872=>array(168,3,728,731),9873=>array(168,3,728,731),9874=>array(52,0,844,731),9875=>array(97,-10,799,732),9876=>array(131,0,765,729),9877=>array(61,-10,479,732),9878=>array(59,-10,837,732),9879=>array(61,0,835,732),9880=>array(145,0,750,732),9881=>array(95,-17,802,727),9882=>array(128,-9,768,733),9883=>array(127,0,769,728),9884=>array(127,0,769,729),9888=>array(49,0,848,729),9889=>array(83,2,619,730),9890=>array(85,-125,919,731),9891=>array(79,-206,1023,720),9892=>array(85,-186,1109,856),9893=>array(85,-125,837,917),9894=>array(131,-14,727,869),9895=>array(101,-170,741,884),9896=>array(188,-14,650,869),9897=>array(4,133,829,596),9898=>array(188,133,650,597),9899=>array(188,133,650,597),9900=>array(249,194,589,536),9901=>array(175,194,663,536),9902=>array(41,169,797,560),9903=>array(5,194,833,536),9904=>array(103,237,757,540),9905=>array(211,42,626,698),9906=>array(85,-125,647,731),9907=>array(168,-125,646,731),9908=>array(86,-125,646,731),9909=>array(86,-125,646,731),9910=>array(59,-118,791,643),9911=>array(194,-104,595,710),9912=>array(158,-125,543,731),9920=>array(42,4,796,553),9921=>array(42,4,796,724),9922=>array(42,4,796,553),9923=>array(42,4,796,724),9954=>array(85,-14,647,843),9985=>array(11,190,803,635),9986=>array(42,141,784,588),9987=>array(11,94,803,539),9988=>array(36,119,824,613),9990=>array(42,-14,796,742),9991=>array(42,-14,796,742),9992=>array(59,21,782,708),9993=>array(64,107,773,622),9996=>array(212,0,561,742),9997=>array(21,83,802,678),9998=>array(89,75,724,710),9999=>array(26,198,819,530),10000=>array(89,75,724,710),10001=>array(43,185,757,544),10002=>array(67,209,757,520),10003=>array(150,97,667,630),10004=>array(116,87,721,631),10005=>array(126,72,711,657),10006=>array(85,31,752,698),10007=>array(118,-9,701,732),10008=>array(123,0,754,739),10009=>array(55,0,783,729),10010=>array(55,0,783,729),10011=>array(55,0,783,729),10012=>array(55,0,783,729),10013=>array(165,0,673,729),10014=>array(131,0,678,729),10015=>array(155,0,683,729),10016=>array(55,0,783,729),10017=>array(91,-13,747,744),10018=>array(41,-14,797,742),10019=>array(42,-12,796,742),10020=>array(41,-14,797,742),10021=>array(41,-13,797,743),10022=>array(42,-14,796,745),10023=>array(42,-14,796,745),10025=>array(23,-9,814,743),10026=>array(42,-14,796,742),10027=>array(23,-9,814,743),10028=>array(23,-9,814,743),10029=>array(23,-9,814,743),10030=>array(23,-9,814,743),10031=>array(23,-9,814,743),10032=>array(24,12,815,714),10033=>array(64,0,773,729),10034=>array(74,0,764,729),10035=>array(55,0,783,729),10036=>array(31,-14,787,742),10037=>array(41,-14,797,742),10038=>array(91,-14,747,742),10039=>array(41,-14,797,742),10040=>array(41,-14,797,742),10041=>array(41,-14,797,742),10042=>array(55,0,783,729),10043=>array(82,-14,756,742),10044=>array(82,-14,756,742),10045=>array(84,-14,753,742),10046=>array(79,-14,759,742),10047=>array(54,0,784,709),10048=>array(54,0,784,709),10049=>array(41,-14,797,742),10050=>array(42,-14,796,742),10051=>array(79,-14,759,742),10052=>array(89,0,749,729),10053=>array(76,0,762,729),10054=>array(63,2,773,729),10055=>array(79,-13,759,742),10056=>array(47,-13,791,730),10057=>array(47,-13,791,730),10058=>array(41,-13,797,743),10059=>array(41,-13,797,743),10061=>array(50,-10,847,738),10063=>array(60,-49,837,729),10064=>array(60,0,837,777),10065=>array(60,-49,837,729),10066=>array(60,0,837,777),10070=>array(83,-2,813,728),10072=>array(377,-240,460,760),10073=>array(336,-240,502,760),10074=>array(253,-240,585,760),10075=>array(85,395,264,729),10076=>array(59,395,237,729),10077=>array(85,395,479,729),10078=>array(59,395,453,729),10081=>array(155,-93,772,851),10082=>array(202,-17,636,742),10083=>array(163,-17,675,742),10084=>array(54,83,784,645),10085=>array(168,-1,729,729),10086=>array(62,21,724,702),10087=>array(78,169,759,564),10088=>array(196,-139,648,769),10089=>array(196,-139,648,769),10090=>array(264,-132,574,758),10091=>array(264,-132,574,758),10092=>array(215,-240,607,760),10093=>array(232,-240,623,760),10094=>array(142,-240,685,760),10095=>array(153,-240,696,760),10096=>array(167,-240,656,760),10097=>array(183,-240,672,760),10098=>array(346,-241,535,760),10099=>array(303,-241,492,760),10100=>array(175,-163,634,760),10101=>array(204,-163,663,760),10102=>array(59,-15,788,715),10103=>array(59,-15,788,715),10104=>array(59,-15,788,715),10105=>array(59,-15,788,715),10106=>array(59,-15,788,715),10107=>array(59,-15,788,715),10108=>array(59,-15,788,715),10109=>array(59,-15,788,715),10110=>array(59,-15,788,715),10111=>array(59,-15,788,715),10112=>array(4,-52,833,780),10113=>array(4,-52,833,780),10114=>array(4,-52,833,780),10115=>array(4,-52,833,780),10116=>array(4,-52,833,780),10117=>array(4,-52,833,780),10118=>array(4,-52,833,780),10119=>array(4,-52,833,780),10120=>array(4,-52,833,780),10121=>array(4,-52,833,780),10122=>array(4,-52,833,780),10123=>array(4,-52,833,780),10124=>array(4,-52,833,780),10125=>array(4,-52,833,780),10126=>array(4,-52,833,780),10127=>array(4,-52,833,780),10128=>array(4,-52,833,780),10129=>array(4,-52,833,780),10130=>array(4,-52,833,780),10131=>array(4,-52,833,780),10132=>array(57,75,789,552),10136=>array(123,55,682,614),10137=>array(57,100,789,527),10138=>array(123,13,682,572),10139=>array(57,129,789,498),10140=>array(57,57,764,570),10141=>array(57,100,789,527),10142=>array(57,100,789,527),10143=>array(57,100,789,527),10144=>array(57,100,789,527),10145=>array(57,46,811,581),10146=>array(111,94,789,533),10147=>array(111,94,789,533),10148=>array(111,-4,789,631),10149=>array(57,100,789,548),10150=>array(57,79,789,527),10151=>array(240,-7,606,634),10152=>array(57,100,789,527),10153=>array(57,75,765,552),10154=>array(57,75,765,552),10155=>array(21,12,794,586),10156=>array(21,12,794,586),10157=>array(135,0,774,574),10158=>array(135,0,774,574),10159=>array(62,49,799,574),10161=>array(62,49,799,574),10162=>array(154,-20,721,585),10163=>array(63,157,789,470),10164=>array(81,55,682,655),10165=>array(57,173,789,454),10166=>array(82,-29,682,572),10167=>array(82,55,682,655),10168=>array(57,172,789,455),10169=>array(82,-28,682,572),10170=>array(56,84,789,543),10171=>array(73,140,779,487),10172=>array(79,167,774,460),10173=>array(79,118,774,509),10174=>array(57,81,789,546),10181=>array(0,-163,438,769),10182=>array(-39,-163,474,769),10208=>array(3,-233,491,807),10214=>array(7,-132,498,760),10215=>array(7,-132,498,760),10216=>array(104,-132,464,759),10217=>array(-7,-132,353,759),10218=>array(104,-132,728,759),10219=>array(-7,-132,616,759),10224=>array(41,0,797,732),10225=>array(42,-3,798,729),10226=>array(9,45,816,685),10227=>array(22,45,830,685),10228=>array(57,-14,1108,643),10229=>array(49,87,1376,540),10230=>array(57,87,1385,540),10231=>array(49,87,1385,540),10232=>array(49,87,1376,540),10233=>array(57,87,1385,540),10234=>array(49,87,1385,540),10235=>array(49,87,1376,540),10236=>array(57,87,1385,540),10237=>array(49,87,1376,540),10238=>array(57,87,1385,540),10239=>array(57,87,1385,540),10241=>array(146,586,342,781),10242=>array(146,325,342,521),10243=>array(146,325,342,781),10244=>array(146,65,342,261),10245=>array(146,65,342,781),10246=>array(146,65,342,521),10247=>array(146,65,342,781),10248=>array(439,586,635,781),10249=>array(146,586,635,781),10250=>array(146,325,635,781),10251=>array(146,325,635,781),10252=>array(146,65,635,781),10253=>array(146,65,635,781),10254=>array(146,65,635,781),10255=>array(146,65,635,781),10256=>array(439,325,635,521),10257=>array(146,325,635,781),10258=>array(146,325,635,521),10259=>array(146,325,635,781),10260=>array(146,65,635,521),10261=>array(146,65,635,781),10262=>array(146,65,635,521),10263=>array(146,65,635,781),10264=>array(439,325,635,781),10265=>array(146,325,635,781),10266=>array(146,325,635,781),10267=>array(146,325,635,781),10268=>array(146,65,635,781),10269=>array(146,65,635,781),10270=>array(146,65,635,781),10271=>array(146,65,635,781),10272=>array(439,65,635,261),10273=>array(146,65,635,781),10274=>array(146,65,635,521),10275=>array(146,65,635,781),10276=>array(146,65,635,261),10277=>array(146,65,635,781),10278=>array(146,65,635,521),10279=>array(146,65,635,781),10280=>array(439,65,635,781),10281=>array(146,65,635,781),10282=>array(146,65,635,781),10283=>array(146,65,635,781),10284=>array(146,65,635,781),10285=>array(146,65,635,781),10286=>array(146,65,635,781),10287=>array(146,65,635,781),10288=>array(439,65,635,521),10289=>array(146,65,635,781),10290=>array(146,65,635,521),10291=>array(146,65,635,781),10292=>array(146,65,635,521),10293=>array(146,65,635,781),10294=>array(146,65,635,521),10295=>array(146,65,635,781),10296=>array(439,65,635,781),10297=>array(146,65,635,781),10298=>array(146,65,635,781),10299=>array(146,65,635,781),10300=>array(146,65,635,781),10301=>array(146,65,635,781),10302=>array(146,65,635,781),10303=>array(146,65,635,781),10304=>array(146,-195,342,0),10305=>array(146,-195,342,781),10306=>array(146,-195,342,521),10307=>array(146,-195,342,781),10308=>array(146,-195,342,261),10309=>array(146,-195,342,781),10310=>array(146,-195,342,521),10311=>array(146,-195,342,781),10312=>array(146,-195,635,781),10313=>array(146,-195,635,781),10314=>array(146,-195,635,781),10315=>array(146,-195,635,781),10316=>array(146,-195,635,781),10317=>array(146,-195,635,781),10318=>array(146,-195,635,781),10319=>array(146,-195,635,781),10320=>array(146,-195,635,521),10321=>array(146,-195,635,781),10322=>array(146,-195,635,521),10323=>array(146,-195,635,781),10324=>array(146,-195,635,521),10325=>array(146,-195,635,781),10326=>array(146,-195,635,521),10327=>array(146,-195,635,781),10328=>array(146,-195,635,781),10329=>array(146,-195,635,781),10330=>array(146,-195,635,781),10331=>array(146,-195,635,781),10332=>array(146,-195,635,781),10333=>array(146,-195,635,781),10334=>array(146,-195,635,781),10335=>array(146,-195,635,781),10336=>array(146,-195,635,261),10337=>array(146,-195,635,781),10338=>array(146,-195,635,521),10339=>array(146,-195,635,781),10340=>array(146,-195,635,261),10341=>array(146,-195,635,781),10342=>array(146,-195,635,521),10343=>array(146,-195,635,781),10344=>array(146,-195,635,781),10345=>array(146,-195,635,781),10346=>array(146,-195,635,781),10347=>array(146,-195,635,781),10348=>array(146,-195,635,781),10349=>array(146,-195,635,781),10350=>array(146,-195,635,781),10351=>array(146,-195,635,781),10352=>array(146,-195,635,521),10353=>array(146,-195,635,781),10354=>array(146,-195,635,521),10355=>array(146,-195,635,781),10356=>array(146,-195,635,521),10357=>array(146,-195,635,781),10358=>array(146,-195,635,521),10359=>array(146,-195,635,781),10360=>array(146,-195,635,781),10361=>array(146,-195,635,781),10362=>array(146,-195,635,781),10363=>array(146,-195,635,781),10364=>array(146,-195,635,781),10365=>array(146,-195,635,781),10366=>array(146,-195,635,781),10367=>array(146,-195,635,781),10368=>array(439,-195,635,0),10369=>array(146,-195,635,781),10370=>array(146,-195,635,521),10371=>array(146,-195,635,781),10372=>array(146,-195,635,261),10373=>array(146,-195,635,781),10374=>array(146,-195,635,521),10375=>array(146,-195,635,781),10376=>array(439,-195,635,781),10377=>array(146,-195,635,781),10378=>array(146,-195,635,781),10379=>array(146,-195,635,781),10380=>array(146,-195,635,781),10381=>array(146,-195,635,781),10382=>array(146,-195,635,781),10383=>array(146,-195,635,781),10384=>array(439,-195,635,521),10385=>array(146,-195,635,781),10386=>array(146,-195,635,521),10387=>array(146,-195,635,781),10388=>array(146,-195,635,521),10389=>array(146,-195,635,781),10390=>array(146,-195,635,521),10391=>array(146,-195,635,781),10392=>array(439,-195,635,781),10393=>array(146,-195,635,781),10394=>array(146,-195,635,781),10395=>array(146,-195,635,781),10396=>array(146,-195,635,781),10397=>array(146,-195,635,781),10398=>array(146,-195,635,781),10399=>array(146,-195,635,781),10400=>array(439,-195,635,261),10401=>array(146,-195,635,781),10402=>array(146,-195,635,521),10403=>array(146,-195,635,781),10404=>array(146,-195,635,261),10405=>array(146,-195,635,781),10406=>array(146,-195,635,521),10407=>array(146,-195,635,781),10408=>array(439,-195,635,781),10409=>array(146,-195,635,781),10410=>array(146,-195,635,781),10411=>array(146,-195,635,781),10412=>array(146,-195,635,781),10413=>array(146,-195,635,781),10414=>array(146,-195,635,781),10415=>array(146,-195,635,781),10416=>array(439,-195,635,521),10417=>array(146,-195,635,781),10418=>array(146,-195,635,521),10419=>array(146,-195,635,781),10420=>array(146,-195,635,521),10421=>array(146,-195,635,781),10422=>array(146,-195,635,521),10423=>array(146,-195,635,781),10424=>array(439,-195,635,781),10425=>array(146,-195,635,781),10426=>array(146,-195,635,781),10427=>array(146,-195,635,781),10428=>array(146,-195,635,781),10429=>array(146,-195,635,781),10430=>array(146,-195,635,781),10431=>array(146,-195,635,781),10432=>array(146,-195,635,0),10433=>array(146,-195,635,781),10434=>array(146,-195,635,521),10435=>array(146,-195,635,781),10436=>array(146,-195,635,261),10437=>array(146,-195,635,781),10438=>array(146,-195,635,521),10439=>array(146,-195,635,781),10440=>array(146,-195,635,781),10441=>array(146,-195,635,781),10442=>array(146,-195,635,781),10443=>array(146,-195,635,781),10444=>array(146,-195,635,781),10445=>array(146,-195,635,781),10446=>array(146,-195,635,781),10447=>array(146,-195,635,781),10448=>array(146,-195,635,521),10449=>array(146,-195,635,781),10450=>array(146,-195,635,521),10451=>array(146,-195,635,781),10452=>array(146,-195,635,521),10453=>array(146,-195,635,781),10454=>array(146,-195,635,521),10455=>array(146,-195,635,781),10456=>array(146,-195,635,781),10457=>array(146,-195,635,781),10458=>array(146,-195,635,781),10459=>array(146,-195,635,781),10460=>array(146,-195,635,781),10461=>array(146,-195,635,781),10462=>array(146,-195,635,781),10463=>array(146,-195,635,781),10464=>array(146,-195,635,261),10465=>array(146,-195,635,781),10466=>array(146,-195,635,521),10467=>array(146,-195,635,781),10468=>array(146,-195,635,261),10469=>array(146,-195,635,781),10470=>array(146,-195,635,521),10471=>array(146,-195,635,781),10472=>array(146,-195,635,781),10473=>array(146,-195,635,781),10474=>array(146,-195,635,781),10475=>array(146,-195,635,781),10476=>array(146,-195,635,781),10477=>array(146,-195,635,781),10478=>array(146,-195,635,781),10479=>array(146,-195,635,781),10480=>array(146,-195,635,521),10481=>array(146,-195,635,781),10482=>array(146,-195,635,521),10483=>array(146,-195,635,781),10484=>array(146,-195,635,521),10485=>array(146,-195,635,781),10486=>array(146,-195,635,521),10487=>array(146,-195,635,781),10488=>array(146,-195,635,781),10489=>array(146,-195,635,781),10490=>array(146,-195,635,781),10491=>array(146,-195,635,781),10492=>array(146,-195,635,781),10493=>array(146,-195,635,781),10494=>array(146,-195,635,781),10495=>array(146,-195,635,781),10502=>array(49,87,781,540),10503=>array(57,87,789,540),10506=>array(132,0,707,732),10507=>array(132,0,707,732),10560=>array(86,45,726,853),10561=>array(86,45,726,853),10627=>array(117,-163,718,760),10628=>array(35,-163,636,760),10702=>array(106,-258,732,800),10703=>array(106,-1,940,628),10704=>array(106,-1,940,628),10705=>array(106,-48,894,674),10706=>array(106,-48,894,674),10707=>array(106,-48,894,674),10708=>array(106,-48,894,675),10709=>array(106,-48,894,675),10731=>array(3,-233,491,807),10746=>array(106,0,732,627),10747=>array(106,0,732,627),10752=>array(28,-211,972,734),10753=>array(28,-211,972,734),10754=>array(28,-211,972,734),10764=>array(15,-227,1646,754),10765=>array(14,-227,548,754),10766=>array(14,-227,548,754),10767=>array(14,-227,548,754),10768=>array(14,-227,548,754),10769=>array(14,-227,576,754),10770=>array(14,-227,548,754),10771=>array(14,-227,548,754),10772=>array(14,-228,651,754),10773=>array(14,-227,548,754),10774=>array(14,-227,548,754),10775=>array(-30,-227,556,754),10776=>array(14,-227,548,754),10777=>array(14,-227,548,754),10778=>array(14,-227,548,754),10779=>array(15,-227,548,898),10780=>array(15,-372,548,754),10799=>array(125,20,713,607),10858=>array(106,212,732,660),10859=>array(106,-34,732,660),10877=>array(106,-150,732,632),10878=>array(106,-150,732,632),10879=>array(106,-150,732,632),10880=>array(106,-150,732,632),10881=>array(106,-150,732,688),10882=>array(106,-150,732,688),10883=>array(106,-150,732,827),10884=>array(106,-150,732,827),10885=>array(106,-217,732,630),10886=>array(106,-217,732,630),10887=>array(106,-124,732,582),10888=>array(106,-124,732,582),10889=>array(106,-281,732,630),10890=>array(106,-281,732,630),10891=>array(106,-303,732,814),10892=>array(106,-303,732,814),10893=>array(106,-183,732,653),10894=>array(106,-183,732,653),10895=>array(106,-245,732,765),10896=>array(106,-245,732,765),10897=>array(106,-278,732,782),10898=>array(106,-278,732,782),10899=>array(106,-263,732,771),10900=>array(106,-263,732,771),10901=>array(106,-50,732,733),10902=>array(106,-50,732,733),10903=>array(106,-50,732,733),10904=>array(106,-50,732,733),10905=>array(106,-45,732,678),10906=>array(106,-45,732,678),10907=>array(106,-81,732,724),10908=>array(106,-81,732,724),10909=>array(106,13,732,680),10910=>array(106,13,732,680),10911=>array(106,-239,732,746),10912=>array(106,-239,732,746),10926=>array(106,22,732,656),10927=>array(106,-83,732,684),10928=>array(106,-83,732,684),10929=>array(106,-246,732,684),10930=>array(106,-246,732,684),10931=>array(106,-205,732,672),10932=>array(106,-205,732,672),10933=>array(106,-304,732,672),10934=>array(106,-304,732,672),10935=>array(106,-252,732,713),10936=>array(106,-252,732,713),10937=>array(106,-316,732,713),10938=>array(106,-316,732,713),11001=>array(106,-195,732,609),11002=>array(106,-195,732,609),11008=>array(123,-23,744,598),11009=>array(94,-23,715,598),11010=>array(123,-23,744,598),11011=>array(94,-23,715,598),11012=>array(27,46,789,581),11013=>array(27,46,781,581),11014=>array(151,0,687,754),11015=>array(151,-25,687,729),11016=>array(123,-23,744,598),11017=>array(94,-23,715,598),11018=>array(123,-23,744,598),11019=>array(94,-23,715,598),11020=>array(27,46,789,581),11021=>array(151,-25,687,754),11022=>array(57,-25,800,372),11023=>array(57,255,800,652),11024=>array(38,-25,781,372),11025=>array(38,255,781,652),11026=>array(91,-124,854,643),11027=>array(91,-124,854,643),11028=>array(91,-124,854,643),11029=>array(91,-124,854,643),11030=>array(3,-124,766,643),11031=>array(3,-124,766,643),11032=>array(3,-124,766,643),11033=>array(3,-124,766,643),11034=>array(91,-124,854,643),11039=>array(18,-26,852,767),11040=>array(18,-26,852,767),11041=>array(73,-91,800,748),11042=>array(73,-91,800,748),11043=>array(17,-35,856,692),11044=>array(55,-250,1064,770),11091=>array(38,-47,832,788),11092=>array(38,-47,832,788),11360=>array(-24,0,566,729),11361=>array(-35,0,390,760),11362=>array(-28,0,566,729),11363=>array(18,0,716,729),11364=>array(54,-200,708,729),11365=>array(-21,-46,692,594),11366=>array(-6,-93,531,822),11367=>array(36,-157,904,729),11368=>array(23,-138,770,760),11369=>array(36,-157,855,729),11370=>array(23,-138,709,760),11371=>array(-11,-157,755,729),11372=>array(5,-138,606,547),11373=>array(48,-14,840,741),11374=>array(41,-200,993,729),11375=>array(76,0,840,729),11376=>array(-23,-14,780,741),11377=>array(67,0,797,560),11378=>array(99,0,1263,742),11379=>array(87,0,1075,560),11380=>array(44,0,687,586),11381=>array(21,0,623,729),11382=>array(31,0,494,547),11383=>array(64,0,724,552),11385=>array(10,-13,529,760),11386=>array(43,-14,644,560),11387=>array(25,0,520,547),11388=>array(-75,-121,219,425),11389=>array(42,326,524,734),11390=>array(37,-240,688,742),11391=>array(-2,-240,763,729),11520=>array(41,-64,638,547),11521=>array(-12,-232,663,546),11522=>array(28,-232,635,547),11523=>array(42,-10,646,807),11524=>array(29,-228,642,546),11525=>array(21,-228,1017,546),11526=>array(74,-8,697,816),11527=>array(31,-9,1003,547),11528=>array(42,0,617,547),11529=>array(29,-227,643,816),11530=>array(20,-9,1014,546),11531=>array(35,-8,687,816),11532=>array(20,0,656,816),11533=>array(30,-8,1025,546),11534=>array(29,-8,667,546),11535=>array(55,-228,875,816),11536=>array(30,-9,1005,816),11537=>array(29,-9,668,816),11538=>array(26,-232,632,546),11539=>array(29,-228,1024,661),11540=>array(40,-228,980,546),11541=>array(26,-228,1009,816),11542=>array(24,0,657,546),11543=>array(29,-228,668,547),11544=>array(29,-232,665,546),11545=>array(27,-228,657,816),11546=>array(26,-232,632,547),11547=>array(41,-9,695,816),11548=>array(24,-228,1018,547),11549=>array(23,-232,641,546),11550=>array(31,-232,677,546),11551=>array(16,-228,653,567),11552=>array(24,-9,1042,546),11553=>array(31,-228,648,816),11554=>array(38,-9,625,626),11555=>array(40,-228,659,816),11556=>array(30,-228,721,546),11557=>array(40,-8,982,816),11800=>array(37,-13,494,729),11807=>array(106,-34,732,415),11810=>array(77,314,466,760),11811=>array(124,314,448,760),11812=>array(-10,-132,314,314),11813=>array(-28,-132,362,314),11822=>array(104,0,580,742),19904=>array(83,-158,813,729),19905=>array(83,-158,813,729),19906=>array(83,-158,813,729),19907=>array(83,-158,813,729),19908=>array(83,-158,813,729),19909=>array(83,-158,813,729),19910=>array(83,-158,813,729),19911=>array(83,-158,813,729),19912=>array(83,-158,813,729),19913=>array(83,-158,814,729),19914=>array(83,-158,813,729),19915=>array(83,-158,813,729),19916=>array(83,-158,813,729),19917=>array(83,-158,813,729),19918=>array(83,-158,813,729),19919=>array(83,-158,813,729),19920=>array(83,-158,814,729),19921=>array(83,-158,813,729),19922=>array(83,-158,814,729),19923=>array(83,-158,813,729),19924=>array(83,-158,813,729),19925=>array(83,-158,813,729),19926=>array(83,-158,813,729),19927=>array(83,-158,813,729),19928=>array(83,-158,813,729),19929=>array(83,-158,813,729),19930=>array(83,-158,813,729),19931=>array(83,-158,814,729),19932=>array(83,-158,813,729),19933=>array(83,-158,813,729),19934=>array(83,-158,814,729),19935=>array(83,-158,813,729),19936=>array(83,-158,813,729),19937=>array(83,-158,813,729),19938=>array(83,-158,813,729),19939=>array(83,-158,813,729),19940=>array(83,-158,813,729),19941=>array(83,-158,814,729),19942=>array(83,-158,813,729),19943=>array(83,-158,813,729),19944=>array(83,-158,814,729),19945=>array(83,-158,813,729),19946=>array(83,-158,814,729),19947=>array(83,-158,813,729),19948=>array(83,-158,814,729),19949=>array(83,-158,813,729),19950=>array(83,-158,814,729),19951=>array(83,-158,813,729),19952=>array(83,-158,814,729),19953=>array(83,-158,813,729),19954=>array(83,-158,813,729),19955=>array(83,-158,813,729),19956=>array(83,-158,813,729),19957=>array(83,-158,814,729),19958=>array(83,-158,813,729),19959=>array(83,-158,813,729),19960=>array(83,-158,813,729),19961=>array(83,-158,814,729),19962=>array(83,-158,813,729),19963=>array(83,-158,814,729),19964=>array(83,-158,814,729),19965=>array(83,-158,813,729),19966=>array(83,-158,813,729),19967=>array(83,-158,813,729),42192=>array(21,0,699,729),42193=>array(21,0,719,729),42194=>array(17,0,712,729),42195=>array(21,0,786,729),42196=>array(48,0,748,729),42197=>array(-65,0,634,729),42198=>array(36,-14,778,742),42199=>array(21,0,837,729),42200=>array(-65,0,754,729),42201=>array(7,-14,581,729),42202=>array(36,-14,724,742),42203=>array(-13,-14,675,742),42204=>array(-26,0,740,729),42205=>array(21,0,670,729),42206=>array(21,0,670,729),42207=>array(21,0,974,729),42208=>array(21,0,816,729),42209=>array(21,0,566,729),42210=>array(15,-14,665,742),42211=>array(21,0,685,729),42212=>array(81,0,749,729),42213=>array(-66,0,698,729),42214=>array(76,0,840,729),42215=>array(21,0,816,729),42216=>array(5,-14,747,742),42217=>array(19,0,592,743),42218=>array(107,0,1143,729),42219=>array(-51,0,812,729),42220=>array(63,0,809,729),42221=>array(67,0,741,729),42222=>array(-65,0,691,729),42223=>array(76,0,840,729),42224=>array(21,0,670,729),42225=>array(13,0,662,729),42226=>array(21,0,351,729),42227=>array(36,-14,814,742),42228=>array(68,-14,791,729),42229=>array(20,0,733,743),42230=>array(9,0,554,729),42231=>array(48,0,809,729),42232=>array(17,0,230,189),42233=>array(-63,-142,227,189),42234=>array(17,0,582,189),42235=>array(17,-142,579,189),42236=>array(-74,-142,284,547),42237=>array(2,0,284,547),42238=>array(88,0,554,405),42239=>array(39,134,549,492),42564=>array(-1,-14,631,742),42565=>array(-7,-14,534,560),42566=>array(74,0,384,729),42567=>array(74,-1,326,547),42572=>array(37,-14,1348,654),42573=>array(31,-13,1129,547),42576=>array(92,0,1213,729),42577=>array(52,0,1000,547),42580=>array(45,-14,1153,742),42581=>array(37,-14,941,560),42582=>array(21,0,1017,729),42583=>array(31,-14,905,560),42594=>array(-26,-157,1144,729),42595=>array(-10,-138,967,547),42596=>array(-25,0,1140,729),42597=>array(2,0,941,547),42598=>array(21,0,1304,729),42599=>array(28,0,1023,547),42600=>array(36,-14,814,742),42601=>array(36,-14,651,560),42602=>array(50,-14,987,742),42603=>array(43,-14,825,560),42604=>array(50,-14,1356,742),42605=>array(43,-14,1063,560),42606=>array(28,-208,933,743),42634=>array(48,-200,863,729),42635=>array(34,-216,672,547),42636=>array(48,0,748,729),42637=>array(34,0,626,547),42644=>array(106,0,793,729),42645=>array(10,0,625,760),42760=>array(146,0,471,693),42761=>array(117,0,471,693),42762=>array(87,0,471,693),42763=>array(58,0,471,693),42764=>array(29,0,471,693),42765=>array(29,0,471,693),42766=>array(29,0,442,693),42767=>array(29,0,413,693),42768=>array(29,0,383,693),42769=>array(29,0,354,693),42770=>array(29,0,471,693),42771=>array(29,0,442,693),42772=>array(29,0,413,693),42773=>array(29,0,383,693),42774=>array(29,0,354,693),42779=>array(180,326,464,736),42780=>array(142,324,426,734),42781=>array(152,326,342,734),42782=>array(152,326,342,734),42783=>array(88,0,278,408),42786=>array(30,0,432,729),42787=>array(38,0,369,547),42788=>array(55,224,530,742),42789=>array(55,42,530,560),42790=>array(41,-200,835,729),42791=>array(31,-216,646,760),42792=>array(69,-216,984,729),42793=>array(48,-215,810,702),42794=>array(37,-14,652,742),42795=>array(-2,-202,517,560),42800=>array(39,0,526,547),42801=>array(10,-14,560,560),42802=>array(-66,0,1273,729),42803=>array(22,-14,981,560),42804=>array(-65,-14,1249,742),42805=>array(17,-14,1029,560),42806=>array(-65,-14,1224,729),42807=>array(17,-14,1021,560),42808=>array(-66,0,1145,729),42809=>array(22,-14,960,560),42810=>array(-66,0,1145,729),42811=>array(22,-14,960,560),42812=>array(-45,-216,1122,729),42813=>array(42,-216,979,560),42814=>array(-13,-14,670,742),42815=>array(-7,-14,537,560),42816=>array(21,0,837,729),42817=>array(31,0,716,760),42822=>array(81,0,779,729),42823=>array(68,0,472,760),42824=>array(65,0,612,729),42825=>array(81,0,520,760),42826=>array(4,-14,915,742),42827=>array(-4,-14,821,560),42830=>array(50,-14,1356,742),42831=>array(43,-14,1063,560),42832=>array(-42,0,723,729),42833=>array(-81,-208,679,560),42834=>array(-1,0,938,729),42835=>array(0,-208,900,560),42838=>array(40,-188,811,742),42839=>array(34,-208,682,559),42852=>array(21,0,698,729),42853=>array(-11,-208,678,760),42854=>array(-50,0,698,729),42855=>array(-82,-208,678,760),42880=>array(71,0,616,729),42881=>array(11,-208,332,547),42882=>array(-8,-208,776,742),42883=>array(-10,-208,654,560),42889=>array(41,0,323,547),42890=>array(63,141,333,405),42891=>array(142,245,387,729),42892=>array(69,458,237,729),42893=>array(100,0,787,729),42894=>array(93,-216,613,760),42896=>array(21,-157,824,729),42897=>array(31,-138,695,560),42912=>array(-17,-14,837,742),42913=>array(-19,-216,735,559),42914=>array(-16,0,837,729),42915=>array(-18,0,716,760),42916=>array(-17,0,854,729),42917=>array(-19,0,731,560),42918=>array(-15,0,785,729),42919=>array(-15,0,545,560),42920=>array(-14,-14,734,742),42921=>array(-17,-14,612,560),42922=>array(-37,0,865,729),43002=>array(31,0,1025,547),43003=>array(92,0,662,729),43004=>array(65,0,712,729),43005=>array(21,0,974,729),43006=>array(1,0,370,928),43007=>array(-40,0,1365,729),61184=>array(141,602,384,693),61185=>array(83,451,406,693),61186=>array(29,301,430,693),61187=>array(-12,150,440,693),61188=>array(-47,0,446,693),61189=>array(100,451,376,693),61190=>array(112,451,355,543),61191=>array(54,301,376,543),61192=>array(0,150,401,543),61193=>array(-41,0,411,543),61194=>array(82,301,372,693),61195=>array(71,301,347,543),61196=>array(83,301,326,393),61197=>array(25,150,347,393),61198=>array(-29,0,372,393),61199=>array(75,150,353,693),61200=>array(53,149,342,542),61201=>array(42,150,318,393),61202=>array(53,150,296,242),61203=>array(-4,0,318,242),61204=>array(73,0,329,693),61205=>array(46,0,323,543),61206=>array(23,0,313,393),61207=>array(12,0,289,242),61208=>array(24,0,268,92),61209=>array(29,0,255,693),62464=>array(84,-14,614,819),62465=>array(90,-15,610,823),62466=>array(86,-14,652,828),62467=>array(124,0,954,828),62468=>array(80,-15,679,828),62469=>array(81,-15,657,828),62470=>array(129,-15,677,828),62471=>array(92,-14,949,828),62472=>array(98,0,644,828),62473=>array(80,-14,684,820),62474=>array(139,-6,1218,828),62475=>array(81,-14,674,828),62476=>array(88,-15,675,820),62477=>array(107,0,938,828),62478=>array(78,-15,654,819),62479=>array(87,-15,722,840),62480=>array(99,0,938,828),62481=>array(99,-14,618,819),62482=>array(97,-14,785,828),62483=>array(80,-14,680,828),62484=>array(136,-14,947,828),62485=>array(79,-14,717,819),62486=>array(113,0,963,828),62487=>array(74,-14,717,820),62488=>array(72,-14,672,828),62489=>array(40,0,626,828),62490=>array(100,-15,715,820),62491=>array(86,-14,717,819),62492=>array(90,-14,729,828),62493=>array(79,-14,719,820),62494=>array(94,-14,619,819),62495=>array(29,-14,623,828),62496=>array(81,-15,658,828),62497=>array(88,-15,677,828),62498=>array(14,-73,658,828),62499=>array(77,-15,719,830),62500=>array(78,-15,726,828),62501=>array(76,-14,732,828),62502=>array(126,-14,1016,828),62504=>array(40,-228,982,816),62505=>array(48,-223,821,843),62506=>array(81,-14,565,761),62507=>array(81,-14,567,773),62508=>array(81,-14,586,866),62509=>array(81,-14,623,812),62510=>array(81,-14,604,877),62511=>array(81,-14,577,803),62512=>array(31,-232,574,761),62513=>array(31,-232,631,793),62514=>array(31,-232,649,891),62515=>array(31,-232,601,803),62516=>array(80,0,589,761),62517=>array(80,0,637,793),62518=>array(80,0,601,803),62519=>array(97,-0,813,761),62520=>array(97,-0,813,773),62521=>array(97,-0,813,884),62522=>array(97,-0,813,793),62523=>array(97,-0,813,803),62524=>array(76,-232,621,761),62525=>array(76,-232,621,773),62526=>array(76,-232,630,894),62527=>array(76,-232,636,793),62528=>array(76,-232,621,803),62529=>array(76,-232,621,844),62917=>array(16,-14,648,760),64256=>array(50,0,916,760),64257=>array(50,0,798,760),64258=>array(50,0,798,760),64259=>array(50,0,1128,760),64260=>array(50,0,1129,760),64261=>array(45,0,836,760),64262=>array(8,-14,1047,742),64275=>array(47,-14,1334,760),64276=>array(47,-14,1335,760),64277=>array(65,-208,1311,760),64278=>array(65,-208,1353,760),64279=>array(65,-208,1682,760),64285=>array(98,38,334,547),64286=>array(194,635,524,780),64287=>array(98,36,655,547),64288=>array(38,0,697,547),64289=>array(120,0,926,547),64290=>array(126,0,838,547),64291=>array(100,0,840,547),64292=>array(43,0,791,547),64293=>array(126,0,837,739),64294=>array(91,0,842,547),64295=>array(126,0,794,547),64296=>array(48,-4,798,547),64297=>array(155,256,804,627),64298=>array(89,0,857,710),64299=>array(89,0,856,723),64300=>array(89,0,856,710),64301=>array(89,0,856,710),64302=>array(104,-171,730,547),64303=>array(104,-217,730,547),64304=>array(104,-171,730,547),64305=>array(43,0,590,547),64306=>array(44,-9,428,547),64307=>array(126,0,651,547),64308=>array(100,0,661,547),64309=>array(73,0,452,547),64310=>array(73,0,548,547),64312=>array(142,-13,676,553),64313=>array(101,164,476,547),64314=>array(126,-240,549,547),64315=>array(43,0,570,547),64316=>array(126,0,633,711),64318=>array(84,0,690,554),64320=>array(43,0,430,547),64321=>array(144,-13,678,547),64323=>array(158,-240,642,547),64324=>array(91,0,656,547),64326=>array(54,0,670,547),64327=>array(51,-240,767,546),64328=>array(126,0,575,547),64329=>array(89,0,856,547),64330=>array(11,-4,650,547),64331=>array(91,0,359,710),64332=>array(43,0,590,710),64333=>array(43,0,570,710),64334=>array(91,0,656,710),64335=>array(47,0,732,729),65056=>array(-276,735,171,880),65057=>array(157,735,564,880),65058=>array(-215,756,169,894),65059=>array(152,756,536,894),65533=>array(100,-139,1164,926),65535=>array(50,-177,550,705)); -$cw=array(0=>600,32=>348,33=>456,34=>521,35=>696,36=>696,37=>1002,38=>872,39=>306,40=>457,41=>457,42=>523,43=>838,44=>380,45=>415,46=>380,47=>365,48=>696,49=>696,50=>696,51=>696,52=>696,53=>696,54=>696,55=>696,56=>696,57=>696,58=>400,59=>400,60=>838,61=>838,62=>838,63=>580,64=>1000,65=>774,66=>762,67=>734,68=>830,69=>683,70=>683,71=>821,72=>837,73=>372,74=>372,75=>775,76=>637,77=>995,78=>837,79=>850,80=>733,81=>850,82=>770,83=>720,84=>682,85=>812,86=>774,87=>1103,88=>771,89=>724,90=>725,91=>457,92=>365,93=>457,94=>838,95=>500,96=>500,97=>675,98=>716,99=>593,100=>716,101=>678,102=>435,103=>716,104=>712,105=>343,106=>343,107=>665,108=>343,109=>1042,110=>712,111=>687,112=>716,113=>716,114=>493,115=>595,116=>478,117=>712,118=>652,119=>924,120=>645,121=>652,122=>582,123=>712,124=>365,125=>712,126=>838,160=>348,161=>456,162=>696,163=>696,164=>636,165=>696,166=>365,167=>500,168=>500,169=>1000,170=>564,171=>650,172=>838,173=>415,174=>1000,175=>500,176=>500,177=>838,178=>438,179=>438,180=>500,181=>736,182=>636,183=>380,184=>500,185=>438,186=>564,187=>650,188=>1035,189=>1035,190=>1035,191=>580,192=>774,193=>774,194=>774,195=>774,196=>774,197=>774,198=>1085,199=>734,200=>683,201=>683,202=>683,203=>683,204=>372,205=>372,206=>372,207=>372,208=>845,209=>837,210=>850,211=>850,212=>850,213=>850,214=>850,215=>838,216=>850,217=>812,218=>812,219=>812,220=>812,221=>724,222=>742,223=>719,224=>675,225=>675,226=>675,227=>675,228=>675,229=>675,230=>1048,231=>593,232=>678,233=>678,234=>678,235=>678,236=>343,237=>343,238=>343,239=>343,240=>687,241=>712,242=>687,243=>687,244=>687,245=>687,246=>687,247=>838,248=>687,249=>712,250=>712,251=>712,252=>712,253=>652,254=>716,255=>652,256=>774,257=>675,258=>774,259=>675,260=>774,261=>675,262=>734,263=>593,264=>734,265=>593,266=>734,267=>593,268=>734,269=>593,270=>830,271=>716,272=>845,273=>716,274=>683,275=>678,276=>683,277=>678,278=>683,279=>678,280=>683,281=>678,282=>683,283=>678,284=>821,285=>716,286=>821,287=>716,288=>821,289=>716,290=>821,291=>716,292=>837,293=>712,294=>974,295=>790,296=>372,297=>343,298=>372,299=>343,300=>372,301=>343,302=>372,303=>343,304=>372,305=>343,306=>744,307=>686,308=>372,309=>343,310=>775,311=>665,312=>665,313=>637,314=>343,315=>637,316=>343,317=>637,318=>343,319=>637,320=>343,321=>660,322=>375,323=>837,324=>712,325=>837,326=>712,327=>837,328=>712,329=>983,330=>837,331=>712,332=>850,333=>687,334=>850,335=>687,336=>850,337=>687,338=>1167,339=>1094,340=>770,341=>493,342=>770,343=>493,344=>770,345=>493,346=>720,347=>595,348=>720,349=>595,350=>720,351=>595,352=>720,353=>595,354=>682,355=>478,356=>682,357=>478,358=>682,359=>478,360=>812,361=>712,362=>812,363=>712,364=>812,365=>712,366=>812,367=>712,368=>812,369=>712,370=>812,371=>712,372=>1103,373=>924,374=>724,375=>652,376=>724,377=>725,378=>582,379=>725,380=>582,381=>725,382=>582,383=>435,384=>716,385=>811,386=>762,387=>716,388=>762,389=>716,390=>734,391=>734,392=>593,393=>845,394=>879,395=>762,396=>716,397=>687,398=>683,399=>850,400=>696,401=>683,402=>435,403=>821,404=>793,405=>1045,406=>436,407=>389,408=>775,409=>665,410=>360,411=>592,412=>1042,413=>837,414=>712,415=>850,416=>850,417=>687,418=>1114,419=>962,420=>782,421=>716,422=>770,423=>720,424=>595,425=>683,426=>552,427=>478,428=>707,429=>478,430=>682,431=>812,432=>712,433=>769,434=>813,435=>797,436=>778,437=>725,438=>582,439=>772,440=>772,441=>641,442=>582,443=>696,444=>772,445=>641,446=>573,447=>716,448=>372,449=>659,450=>544,451=>372,452=>1548,453=>1450,454=>1307,455=>977,456=>979,457=>670,458=>1193,459=>1213,460=>1063,461=>774,462=>675,463=>372,464=>343,465=>850,466=>687,467=>812,468=>712,469=>812,470=>712,471=>812,472=>712,473=>812,474=>712,475=>812,476=>712,477=>678,478=>774,479=>675,480=>774,481=>675,482=>1085,483=>1048,484=>821,485=>716,486=>821,487=>716,488=>775,489=>665,490=>850,491=>687,492=>850,493=>687,494=>772,495=>582,496=>343,497=>1548,498=>1450,499=>1307,500=>821,501=>716,502=>1289,503=>787,504=>837,505=>712,506=>774,507=>675,508=>1085,509=>1048,510=>850,511=>687,512=>774,513=>675,514=>774,515=>675,516=>683,517=>678,518=>683,519=>678,520=>372,521=>343,522=>372,523=>343,524=>850,525=>687,526=>850,527=>687,528=>770,529=>493,530=>770,531=>493,532=>812,533=>712,534=>812,535=>712,536=>720,537=>595,538=>682,539=>478,540=>690,541=>607,542=>837,543=>712,544=>837,545=>865,546=>809,547=>659,548=>725,549=>582,550=>774,551=>675,552=>683,553=>678,554=>850,555=>687,556=>850,557=>687,558=>850,559=>687,560=>850,561=>687,562=>724,563=>652,564=>492,565=>867,566=>512,567=>343,568=>1088,569=>1088,570=>774,571=>734,572=>593,573=>637,574=>682,575=>595,576=>582,577=>782,578=>614,579=>762,580=>812,581=>774,582=>683,583=>678,584=>372,585=>343,586=>860,587=>791,588=>770,589=>493,590=>724,591=>652,592=>675,593=>716,594=>716,595=>716,596=>593,597=>593,598=>791,599=>792,600=>678,601=>678,602=>876,603=>557,604=>545,605=>774,606=>731,607=>343,608=>792,609=>716,610=>627,611=>735,612=>635,613=>712,614=>712,615=>712,616=>545,617=>440,618=>545,619=>559,620=>693,621=>343,622=>841,623=>1042,624=>1042,625=>1042,626=>712,627=>793,628=>642,629=>687,630=>909,631=>682,632=>796,633=>538,634=>538,635=>650,636=>493,637=>493,638=>596,639=>596,640=>642,641=>642,642=>595,643=>415,644=>435,645=>605,646=>552,647=>478,648=>478,649=>920,650=>769,651=>670,652=>652,653=>924,654=>652,655=>724,656=>694,657=>684,658=>641,659=>641,660=>573,661=>573,662=>573,663=>573,664=>850,665=>633,666=>731,667=>685,668=>691,669=>343,670=>732,671=>539,672=>792,673=>573,674=>573,675=>1156,676=>1214,677=>1155,678=>975,679=>769,680=>929,681=>1026,682=>862,683=>780,684=>591,685=>415,686=>677,687=>789,688=>456,689=>456,690=>219,691=>315,692=>315,693=>315,694=>411,695=>591,696=>417,697=>302,698=>521,699=>380,700=>380,701=>380,702=>366,703=>366,704=>326,705=>326,706=>500,707=>500,708=>500,709=>500,710=>500,711=>500,712=>306,713=>500,714=>500,715=>500,716=>306,717=>500,718=>500,719=>500,720=>337,721=>337,722=>366,723=>366,724=>500,725=>500,726=>416,727=>328,728=>500,729=>500,730=>500,731=>500,732=>500,733=>500,734=>351,735=>500,736=>412,737=>219,738=>381,739=>413,740=>326,741=>500,742=>500,743=>500,744=>500,745=>500,748=>500,749=>500,750=>644,755=>500,759=>500,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>698,881=>565,882=>1022,883=>836,884=>302,885=>302,886=>837,887=>701,890=>500,891=>593,892=>550,893=>549,894=>400,900=>441,901=>500,902=>797,903=>380,904=>846,905=>1009,906=>563,908=>891,910=>980,911=>894,912=>390,913=>774,914=>762,915=>637,916=>774,917=>683,918=>725,919=>837,920=>850,921=>372,922=>775,923=>774,924=>995,925=>837,926=>632,927=>850,928=>837,929=>733,931=>683,932=>682,933=>724,934=>850,935=>771,936=>850,937=>850,938=>372,939=>724,940=>687,941=>557,942=>712,943=>390,944=>675,945=>687,946=>716,947=>681,948=>687,949=>557,950=>591,951=>712,952=>687,953=>390,954=>710,955=>633,956=>736,957=>681,958=>591,959=>687,960=>791,961=>716,962=>593,963=>779,964=>638,965=>675,966=>782,967=>645,968=>794,969=>869,970=>390,971=>675,972=>687,973=>675,974=>869,975=>775,976=>651,977=>661,978=>746,979=>981,980=>746,981=>796,982=>869,983=>744,984=>850,985=>687,986=>734,987=>593,988=>683,989=>494,990=>702,991=>660,992=>919,993=>627,994=>1093,995=>837,996=>832,997=>716,998=>928,999=>744,1000=>733,1001=>650,1002=>789,1003=>671,1004=>752,1005=>716,1006=>682,1007=>590,1008=>744,1009=>716,1010=>593,1011=>343,1012=>850,1013=>645,1014=>645,1015=>742,1016=>716,1017=>734,1018=>995,1019=>732,1020=>716,1021=>734,1022=>734,1023=>698,1024=>683,1025=>683,1026=>878,1027=>637,1028=>734,1029=>720,1030=>372,1031=>372,1032=>372,1033=>1154,1034=>1130,1035=>878,1036=>817,1037=>837,1038=>771,1039=>837,1040=>774,1041=>762,1042=>762,1043=>637,1044=>891,1045=>683,1046=>1224,1047=>710,1048=>837,1049=>837,1050=>817,1051=>831,1052=>995,1053=>837,1054=>850,1055=>837,1056=>733,1057=>734,1058=>682,1059=>771,1060=>992,1061=>771,1062=>928,1063=>808,1064=>1235,1065=>1326,1066=>939,1067=>1036,1068=>762,1069=>734,1070=>1174,1071=>770,1072=>675,1073=>698,1074=>633,1075=>522,1076=>808,1077=>678,1078=>995,1079=>581,1080=>701,1081=>701,1082=>679,1083=>732,1084=>817,1085=>691,1086=>687,1087=>691,1088=>716,1089=>593,1090=>580,1091=>652,1092=>992,1093=>645,1094=>741,1095=>687,1096=>1062,1097=>1105,1098=>751,1099=>904,1100=>632,1101=>593,1102=>972,1103=>642,1104=>678,1105=>678,1106=>714,1107=>522,1108=>593,1109=>595,1110=>343,1111=>343,1112=>343,1113=>991,1114=>956,1115=>734,1116=>679,1117=>701,1118=>652,1119=>691,1120=>1093,1121=>869,1122=>840,1123=>736,1124=>1012,1125=>839,1126=>992,1127=>832,1128=>1358,1129=>1121,1130=>850,1131=>687,1132=>1236,1133=>1007,1134=>696,1135=>557,1136=>1075,1137=>1061,1138=>850,1139=>687,1140=>850,1141=>695,1142=>850,1143=>695,1144=>1148,1145=>1043,1146=>1074,1147=>863,1148=>1405,1149=>1173,1150=>1093,1151=>869,1152=>734,1153=>593,1154=>652,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>418,1161=>418,1162=>938,1163=>806,1164=>762,1165=>611,1166=>736,1167=>718,1168=>637,1169=>522,1170=>666,1171=>543,1172=>789,1173=>522,1174=>1224,1175=>995,1176=>710,1177=>581,1178=>775,1179=>679,1180=>817,1181=>679,1182=>817,1183=>679,1184=>1015,1185=>826,1186=>837,1187=>691,1188=>1103,1189=>871,1190=>1254,1191=>979,1192=>946,1193=>859,1194=>734,1195=>593,1196=>682,1197=>580,1198=>724,1199=>652,1200=>724,1201=>652,1202=>771,1203=>645,1204=>1104,1205=>1001,1206=>808,1207=>687,1208=>808,1209=>687,1210=>808,1211=>712,1212=>1026,1213=>810,1214=>1026,1215=>810,1216=>372,1217=>1224,1218=>995,1219=>778,1220=>629,1221=>933,1222=>804,1223=>837,1224=>691,1225=>938,1226=>806,1227=>808,1228=>687,1229=>1096,1230=>932,1231=>343,1232=>774,1233=>675,1234=>774,1235=>675,1236=>1085,1237=>1048,1238=>683,1239=>678,1240=>850,1241=>678,1242=>850,1243=>678,1244=>1224,1245=>995,1246=>710,1247=>581,1248=>772,1249=>641,1250=>837,1251=>701,1252=>837,1253=>701,1254=>850,1255=>687,1256=>850,1257=>687,1258=>850,1259=>687,1260=>734,1261=>593,1262=>771,1263=>652,1264=>771,1265=>652,1266=>771,1267=>652,1268=>808,1269=>687,1270=>637,1271=>522,1272=>1036,1273=>904,1274=>666,1275=>543,1276=>771,1277=>645,1278=>771,1279=>645,1280=>762,1281=>608,1282=>1159,1283=>893,1284=>1119,1285=>920,1286=>828,1287=>693,1288=>1242,1289=>1017,1290=>1289,1291=>1013,1292=>839,1293=>638,1294=>938,1295=>803,1296=>696,1297=>557,1298=>831,1299=>732,1300=>1286,1301=>1070,1302=>1065,1303=>982,1304=>1082,1305=>960,1306=>850,1307=>716,1308=>1103,1309=>924,1310=>817,1311=>679,1312=>1248,1313=>1022,1314=>1254,1315=>979,1316=>957,1317=>807,1329=>904,1330=>810,1331=>809,1332=>813,1333=>810,1334=>815,1335=>724,1336=>800,1337=>1004,1338=>809,1339=>740,1340=>620,1341=>1068,1342=>875,1343=>792,1344=>723,1345=>811,1346=>794,1347=>782,1348=>867,1349=>766,1350=>794,1351=>787,1352=>812,1353=>752,1354=>963,1355=>790,1356=>867,1357=>812,1358=>794,1359=>771,1360=>740,1361=>775,1362=>640,1363=>926,1364=>775,1365=>848,1366=>951,1369=>366,1370=>380,1371=>342,1372=>415,1373=>348,1374=>513,1375=>521,1377=>1043,1378=>713,1379=>782,1380=>786,1381=>713,1382=>715,1383=>628,1384=>713,1385=>840,1386=>782,1387=>714,1388=>344,1389=>1094,1390=>708,1391=>714,1392=>714,1393=>670,1394=>714,1395=>713,1396=>714,1397=>343,1398=>714,1399=>541,1400=>714,1401=>407,1402=>1043,1403=>636,1404=>740,1405=>714,1406=>714,1407=>1038,1408=>714,1409=>714,1410=>532,1411=>1038,1412=>720,1413=>689,1414=>904,1415=>902,1417=>400,1418=>415,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>415,1471=>0,1472=>372,1473=>0,1474=>0,1475=>372,1478=>497,1479=>0,1488=>728,1489=>610,1490=>447,1491=>588,1492=>687,1493=>343,1494=>400,1495=>687,1496=>679,1497=>294,1498=>578,1499=>566,1500=>605,1501=>696,1502=>724,1503=>343,1504=>453,1505=>680,1506=>666,1507=>675,1508=>658,1509=>661,1510=>653,1511=>736,1512=>602,1513=>749,1514=>683,1520=>664,1521=>664,1522=>663,1523=>444,1524=>710,3647=>696,3713=>815,3714=>748,3716=>749,3719=>569,3720=>742,3722=>744,3725=>761,3732=>706,3733=>704,3734=>747,3735=>819,3737=>730,3738=>727,3739=>727,3740=>922,3741=>827,3742=>866,3743=>866,3745=>836,3746=>761,3747=>770,3749=>769,3751=>713,3754=>827,3755=>1031,3757=>724,3758=>784,3759=>934,3760=>688,3761=>0,3762=>610,3763=>610,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>670,3776=>516,3777=>860,3778=>516,3779=>650,3780=>632,3782=>759,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>771,3793=>771,3794=>693,3795=>836,3796=>729,3797=>729,3798=>849,3799=>790,3800=>759,3801=>910,3804=>1363,3805=>1363,4256=>874,4257=>733,4258=>679,4259=>834,4260=>615,4261=>768,4262=>753,4263=>914,4264=>453,4265=>620,4266=>843,4267=>882,4268=>625,4269=>854,4270=>781,4271=>629,4272=>912,4273=>621,4274=>620,4275=>854,4276=>866,4277=>724,4278=>630,4279=>621,4280=>625,4281=>620,4282=>818,4283=>874,4284=>615,4285=>623,4286=>625,4287=>725,4288=>844,4289=>596,4290=>688,4291=>596,4292=>594,4293=>738,4304=>554,4305=>563,4306=>622,4307=>834,4308=>550,4309=>559,4310=>546,4311=>828,4312=>563,4313=>556,4314=>1074,4315=>563,4316=>563,4317=>814,4318=>554,4319=>559,4320=>823,4321=>563,4322=>700,4323=>582,4324=>847,4325=>555,4326=>814,4327=>559,4328=>543,4329=>563,4330=>622,4331=>563,4332=>543,4333=>566,4334=>563,4335=>530,4336=>554,4337=>554,4338=>553,4339=>554,4340=>553,4341=>583,4342=>853,4343=>604,4344=>559,4345=>632,4346=>554,4347=>448,4348=>324,5121=>774,5122=>774,5123=>774,5124=>774,5125=>905,5126=>905,5127=>905,5129=>905,5130=>905,5131=>905,5132=>1018,5133=>1009,5134=>1018,5135=>1009,5136=>1018,5137=>1009,5138=>1149,5139=>1140,5140=>1149,5141=>1140,5142=>905,5143=>1149,5144=>1142,5145=>1149,5146=>1142,5147=>905,5149=>310,5150=>529,5151=>425,5152=>425,5153=>395,5154=>395,5155=>395,5156=>395,5157=>564,5158=>470,5159=>310,5160=>395,5161=>395,5162=>395,5163=>1213,5164=>986,5165=>1216,5166=>1297,5167=>774,5168=>774,5169=>774,5170=>774,5171=>886,5172=>886,5173=>886,5175=>886,5176=>886,5177=>886,5178=>1018,5179=>1009,5180=>1018,5181=>1009,5182=>1018,5183=>1009,5184=>1149,5185=>1140,5186=>1149,5187=>1140,5188=>1149,5189=>1142,5190=>1149,5191=>1142,5192=>886,5193=>576,5194=>229,5196=>812,5197=>812,5198=>812,5199=>812,5200=>815,5201=>815,5202=>815,5204=>815,5205=>815,5206=>815,5207=>1056,5208=>1048,5209=>1056,5210=>1048,5211=>1056,5212=>1048,5213=>1060,5214=>1054,5215=>1060,5216=>1054,5217=>1060,5218=>1052,5219=>1060,5220=>1052,5221=>1060,5222=>483,5223=>1005,5224=>1005,5225=>1023,5226=>1017,5227=>743,5228=>743,5229=>743,5230=>743,5231=>743,5232=>743,5233=>743,5234=>743,5235=>743,5236=>1029,5237=>975,5238=>980,5239=>975,5240=>980,5241=>975,5242=>1029,5243=>975,5244=>1029,5245=>975,5246=>980,5247=>975,5248=>980,5249=>975,5250=>980,5251=>501,5252=>501,5253=>938,5254=>938,5255=>938,5256=>938,5257=>743,5258=>743,5259=>743,5260=>743,5261=>743,5262=>743,5263=>743,5264=>743,5265=>743,5266=>1029,5267=>975,5268=>1029,5269=>975,5270=>1029,5271=>975,5272=>1029,5273=>975,5274=>1029,5275=>975,5276=>1029,5277=>975,5278=>1029,5279=>975,5280=>1029,5281=>501,5282=>501,5283=>626,5284=>626,5285=>626,5286=>626,5287=>626,5288=>626,5289=>626,5290=>626,5291=>626,5292=>881,5293=>854,5294=>863,5295=>874,5296=>863,5297=>874,5298=>881,5299=>874,5300=>881,5301=>874,5302=>863,5303=>874,5304=>863,5305=>874,5306=>863,5307=>436,5308=>548,5309=>436,5312=>988,5313=>988,5314=>988,5315=>988,5316=>931,5317=>931,5318=>931,5319=>931,5320=>931,5321=>1238,5322=>1247,5323=>1200,5324=>1228,5325=>1200,5326=>1228,5327=>931,5328=>660,5329=>497,5330=>660,5331=>988,5332=>988,5333=>988,5334=>988,5335=>931,5336=>931,5337=>931,5338=>931,5339=>931,5340=>1231,5341=>1247,5342=>1283,5343=>1228,5344=>1283,5345=>1228,5346=>1228,5347=>1214,5348=>1228,5349=>1214,5350=>1283,5351=>1228,5352=>1283,5353=>1228,5354=>660,5356=>886,5357=>730,5358=>730,5359=>730,5360=>730,5361=>730,5362=>730,5363=>730,5364=>730,5365=>730,5366=>998,5367=>958,5368=>967,5369=>989,5370=>967,5371=>989,5372=>998,5373=>958,5374=>998,5375=>958,5376=>967,5377=>989,5378=>967,5379=>989,5380=>967,5381=>493,5382=>460,5383=>493,5392=>923,5393=>923,5394=>923,5395=>1136,5396=>1136,5397=>1136,5398=>1136,5399=>1209,5400=>1202,5401=>1209,5402=>1202,5403=>1209,5404=>1202,5405=>1431,5406=>1420,5407=>1431,5408=>1420,5409=>1431,5410=>1420,5411=>1431,5412=>1420,5413=>746,5414=>776,5415=>776,5416=>776,5417=>776,5418=>776,5419=>776,5420=>776,5421=>776,5422=>776,5423=>1003,5424=>1003,5425=>1013,5426=>996,5427=>1013,5428=>996,5429=>1003,5430=>1003,5431=>1003,5432=>1003,5433=>1013,5434=>996,5435=>1013,5436=>996,5437=>1013,5438=>495,5440=>395,5441=>510,5442=>1033,5443=>1033,5444=>976,5445=>976,5446=>976,5447=>976,5448=>733,5449=>733,5450=>733,5451=>733,5452=>733,5453=>733,5454=>1003,5455=>959,5456=>495,5458=>886,5459=>774,5460=>774,5461=>774,5462=>774,5463=>928,5464=>928,5465=>928,5466=>928,5467=>1172,5468=>1142,5469=>602,5470=>812,5471=>812,5472=>812,5473=>812,5474=>812,5475=>812,5476=>815,5477=>815,5478=>815,5479=>815,5480=>1060,5481=>1052,5482=>548,5492=>977,5493=>977,5494=>977,5495=>977,5496=>977,5497=>977,5498=>977,5499=>618,5500=>837,5501=>510,5502=>1238,5503=>1238,5504=>1238,5505=>1238,5506=>1238,5507=>1238,5508=>1238,5509=>989,5514=>977,5515=>977,5516=>977,5517=>977,5518=>1591,5519=>1591,5520=>1591,5521=>1295,5522=>1295,5523=>1591,5524=>1591,5525=>848,5526=>1273,5536=>988,5537=>988,5538=>931,5539=>931,5540=>931,5541=>931,5542=>660,5543=>776,5544=>776,5545=>776,5546=>776,5547=>776,5548=>776,5549=>776,5550=>495,5551=>743,5598=>830,5601=>830,5702=>496,5703=>496,5742=>413,5743=>1238,5744=>1591,5745=>2016,5746=>2016,5747=>1720,5748=>1678,5749=>2016,5750=>2016,7424=>652,7425=>833,7426=>1048,7427=>608,7428=>593,7429=>676,7430=>676,7431=>559,7432=>557,7433=>343,7434=>494,7435=>665,7436=>539,7437=>817,7438=>701,7439=>687,7440=>593,7441=>660,7442=>660,7443=>660,7444=>1094,7446=>687,7447=>687,7448=>556,7449=>642,7450=>642,7451=>580,7452=>634,7453=>737,7454=>948,7455=>695,7456=>652,7457=>924,7458=>582,7459=>646,7462=>539,7463=>652,7464=>691,7465=>556,7466=>781,7467=>732,7468=>487,7469=>683,7470=>480,7472=>523,7473=>430,7474=>430,7475=>517,7476=>527,7477=>234,7478=>234,7479=>488,7480=>401,7481=>626,7482=>527,7483=>527,7484=>535,7485=>509,7486=>461,7487=>485,7488=>430,7489=>511,7490=>695,7491=>458,7492=>458,7493=>479,7494=>712,7495=>479,7496=>479,7497=>479,7498=>479,7499=>386,7500=>386,7501=>479,7502=>219,7503=>487,7504=>664,7505=>456,7506=>488,7507=>414,7508=>488,7509=>488,7510=>479,7511=>388,7512=>456,7513=>462,7514=>664,7515=>501,7517=>451,7518=>429,7519=>433,7520=>493,7521=>406,7522=>219,7523=>315,7524=>456,7525=>501,7526=>451,7527=>429,7528=>451,7529=>493,7530=>406,7543=>716,7544=>527,7547=>545,7549=>747,7557=>514,7579=>479,7580=>414,7581=>414,7582=>488,7583=>386,7584=>377,7585=>348,7586=>479,7587=>456,7588=>347,7589=>281,7590=>347,7591=>347,7592=>431,7593=>326,7594=>330,7595=>370,7596=>664,7597=>664,7598=>562,7599=>562,7600=>448,7601=>488,7602=>542,7603=>422,7604=>396,7605=>388,7606=>583,7607=>494,7608=>399,7609=>451,7610=>501,7611=>417,7612=>523,7613=>470,7614=>455,7615=>425,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>774,7681=>675,7682=>762,7683=>716,7684=>762,7685=>716,7686=>762,7687=>716,7688=>734,7689=>593,7690=>830,7691=>716,7692=>830,7693=>716,7694=>830,7695=>716,7696=>830,7697=>716,7698=>830,7699=>716,7700=>683,7701=>678,7702=>683,7703=>678,7704=>683,7705=>678,7706=>683,7707=>678,7708=>683,7709=>678,7710=>683,7711=>435,7712=>821,7713=>716,7714=>837,7715=>712,7716=>837,7717=>712,7718=>837,7719=>712,7720=>837,7721=>712,7722=>837,7723=>712,7724=>372,7725=>343,7726=>372,7727=>343,7728=>775,7729=>665,7730=>775,7731=>665,7732=>775,7733=>665,7734=>637,7735=>343,7736=>637,7737=>343,7738=>637,7739=>343,7740=>637,7741=>343,7742=>995,7743=>1042,7744=>995,7745=>1042,7746=>995,7747=>1042,7748=>837,7749=>712,7750=>837,7751=>712,7752=>837,7753=>712,7754=>837,7755=>712,7756=>850,7757=>687,7758=>850,7759=>687,7760=>850,7761=>687,7762=>850,7763=>687,7764=>733,7765=>716,7766=>733,7767=>716,7768=>770,7769=>493,7770=>770,7771=>493,7772=>770,7773=>493,7774=>770,7775=>493,7776=>720,7777=>595,7778=>720,7779=>595,7780=>720,7781=>595,7782=>720,7783=>595,7784=>720,7785=>595,7786=>682,7787=>478,7788=>682,7789=>478,7790=>682,7791=>478,7792=>682,7793=>478,7794=>812,7795=>712,7796=>812,7797=>712,7798=>812,7799=>712,7800=>812,7801=>712,7802=>812,7803=>712,7804=>774,7805=>652,7806=>774,7807=>652,7808=>1103,7809=>924,7810=>1103,7811=>924,7812=>1103,7813=>924,7814=>1103,7815=>924,7816=>1103,7817=>924,7818=>771,7819=>645,7820=>771,7821=>645,7822=>724,7823=>652,7824=>725,7825=>582,7826=>725,7827=>582,7828=>725,7829=>582,7830=>712,7831=>478,7832=>924,7833=>652,7834=>675,7835=>435,7836=>435,7837=>435,7838=>896,7839=>687,7840=>774,7841=>675,7842=>774,7843=>675,7844=>774,7845=>675,7846=>774,7847=>675,7848=>774,7849=>675,7850=>774,7851=>675,7852=>774,7853=>675,7854=>774,7855=>675,7856=>774,7857=>675,7858=>774,7859=>675,7860=>774,7861=>675,7862=>774,7863=>675,7864=>683,7865=>678,7866=>683,7867=>678,7868=>683,7869=>678,7870=>683,7871=>678,7872=>683,7873=>678,7874=>683,7875=>678,7876=>683,7877=>678,7878=>683,7879=>678,7880=>372,7881=>343,7882=>372,7883=>343,7884=>850,7885=>687,7886=>850,7887=>687,7888=>850,7889=>687,7890=>850,7891=>687,7892=>850,7893=>687,7894=>850,7895=>687,7896=>850,7897=>687,7898=>850,7899=>687,7900=>850,7901=>687,7902=>850,7903=>687,7904=>850,7905=>687,7906=>850,7907=>687,7908=>812,7909=>712,7910=>812,7911=>712,7912=>812,7913=>712,7914=>812,7915=>712,7916=>812,7917=>712,7918=>812,7919=>712,7920=>812,7921=>712,7922=>724,7923=>652,7924=>724,7925=>652,7926=>724,7927=>652,7928=>724,7929=>652,7930=>953,7931=>644,7936=>687,7937=>687,7938=>687,7939=>687,7940=>687,7941=>687,7942=>687,7943=>687,7944=>774,7945=>774,7946=>1041,7947=>1043,7948=>935,7949=>963,7950=>835,7951=>859,7952=>557,7953=>557,7954=>557,7955=>557,7956=>557,7957=>557,7960=>792,7961=>794,7962=>1100,7963=>1096,7964=>1023,7965=>1052,7968=>712,7969=>712,7970=>712,7971=>712,7972=>712,7973=>712,7974=>712,7975=>712,7976=>945,7977=>951,7978=>1250,7979=>1250,7980=>1180,7981=>1206,7982=>1054,7983=>1063,7984=>390,7985=>390,7986=>390,7987=>390,7988=>390,7989=>390,7990=>390,7991=>390,7992=>483,7993=>489,7994=>777,7995=>785,7996=>712,7997=>738,7998=>604,7999=>604,8000=>687,8001=>687,8002=>687,8003=>687,8004=>687,8005=>687,8008=>892,8009=>933,8010=>1221,8011=>1224,8012=>1053,8013=>1082,8016=>675,8017=>675,8018=>675,8019=>675,8020=>675,8021=>675,8022=>675,8023=>675,8025=>930,8027=>1184,8029=>1199,8031=>1049,8032=>869,8033=>869,8034=>869,8035=>869,8036=>869,8037=>869,8038=>869,8039=>869,8040=>909,8041=>958,8042=>1246,8043=>1251,8044=>1076,8045=>1105,8046=>1028,8047=>1076,8048=>687,8049=>687,8050=>557,8051=>557,8052=>712,8053=>712,8054=>390,8055=>390,8056=>687,8057=>687,8058=>675,8059=>675,8060=>869,8061=>869,8064=>687,8065=>687,8066=>687,8067=>687,8068=>687,8069=>687,8070=>687,8071=>687,8072=>774,8073=>774,8074=>1041,8075=>1043,8076=>935,8077=>963,8078=>835,8079=>859,8080=>712,8081=>712,8082=>712,8083=>712,8084=>712,8085=>712,8086=>712,8087=>712,8088=>945,8089=>951,8090=>1250,8091=>1250,8092=>1180,8093=>1206,8094=>1054,8095=>1063,8096=>869,8097=>869,8098=>869,8099=>869,8100=>869,8101=>869,8102=>869,8103=>869,8104=>909,8105=>958,8106=>1246,8107=>1251,8108=>1076,8109=>1105,8110=>1028,8111=>1076,8112=>687,8113=>687,8114=>687,8115=>687,8116=>687,8118=>687,8119=>687,8120=>774,8121=>774,8122=>876,8123=>797,8124=>774,8125=>500,8126=>500,8127=>500,8128=>500,8129=>500,8130=>712,8131=>712,8132=>712,8134=>712,8135=>712,8136=>929,8137=>846,8138=>1080,8139=>1009,8140=>837,8141=>500,8142=>500,8143=>500,8144=>390,8145=>390,8146=>390,8147=>390,8150=>390,8151=>390,8152=>372,8153=>372,8154=>621,8155=>563,8157=>500,8158=>500,8159=>500,8160=>675,8161=>675,8162=>675,8163=>675,8164=>716,8165=>716,8166=>675,8167=>675,8168=>724,8169=>724,8170=>1020,8171=>980,8172=>838,8173=>500,8174=>500,8175=>500,8178=>869,8179=>869,8180=>869,8182=>869,8183=>869,8184=>1065,8185=>891,8186=>1084,8187=>894,8188=>850,8189=>500,8190=>500,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>330,8197=>250,8198=>167,8199=>696,8200=>380,8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>415,8209=>415,8210=>696,8211=>500,8212=>1000,8213=>1000,8214=>500,8215=>500,8216=>380,8217=>380,8218=>380,8219=>380,8220=>644,8221=>644,8222=>644,8223=>657,8224=>500,8225=>500,8226=>639,8227=>639,8228=>380,8229=>685,8230=>1000,8231=>348,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>200,8240=>1454,8241=>1908,8242=>264,8243=>447,8244=>630,8245=>264,8246=>447,8247=>630,8248=>733,8249=>412,8250=>412,8251=>972,8252=>627,8253=>580,8254=>500,8255=>828,8256=>828,8257=>329,8258=>1023,8259=>500,8260=>167,8261=>457,8262=>457,8263=>1030,8264=>829,8265=>829,8266=>513,8267=>687,8268=>500,8269=>500,8270=>523,8271=>400,8272=>828,8273=>523,8274=>556,8275=>838,8276=>828,8277=>838,8278=>684,8279=>813,8280=>838,8281=>838,8282=>380,8283=>872,8284=>838,8285=>380,8286=>380,8287=>222,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>438,8305=>219,8308=>438,8309=>438,8310=>438,8311=>438,8312=>438,8313=>438,8314=>528,8315=>528,8316=>528,8317=>288,8318=>288,8319=>456,8320=>438,8321=>438,8322=>438,8323=>438,8324=>438,8325=>438,8326=>438,8327=>438,8328=>438,8329=>438,8330=>528,8331=>528,8332=>528,8333=>288,8334=>288,8336=>458,8337=>479,8338=>488,8339=>413,8340=>479,8341=>456,8342=>487,8343=>219,8344=>664,8345=>456,8346=>479,8347=>381,8348=>388,8352=>929,8353=>696,8354=>696,8355=>696,8356=>696,8357=>1042,8358=>837,8359=>1488,8360=>1205,8361=>1103,8362=>854,8363=>696,8364=>696,8365=>696,8366=>696,8367=>1392,8368=>696,8369=>696,8370=>696,8371=>696,8372=>859,8373=>696,8376=>696,8377=>696,8378=>769,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>1106,8449=>1106,8450=>734,8451=>1211,8452=>896,8453=>1114,8454=>1148,8455=>696,8456=>698,8457=>952,8459=>1073,8460=>913,8461=>888,8462=>712,8463=>712,8464=>597,8465=>697,8466=>856,8467=>472,8468=>974,8469=>837,8470=>1203,8471=>1000,8472=>697,8473=>750,8474=>850,8475=>938,8476=>814,8477=>801,8478=>896,8479=>710,8480=>1020,8481=>1239,8482=>1000,8483=>834,8484=>754,8485=>622,8486=>850,8487=>769,8488=>763,8489=>303,8490=>775,8491=>774,8492=>928,8493=>818,8494=>854,8495=>636,8496=>729,8497=>808,8498=>683,8499=>1184,8500=>465,8501=>794,8502=>731,8503=>494,8504=>684,8505=>380,8506=>945,8507=>1370,8508=>790,8509=>737,8510=>654,8511=>863,8512=>840,8513=>786,8514=>576,8515=>637,8516=>760,8517=>830,8518=>716,8519=>678,8520=>343,8521=>343,8523=>872,8526=>547,8528=>1035,8529=>1035,8530=>1483,8531=>1035,8532=>1035,8533=>1035,8534=>1035,8535=>1035,8536=>1035,8537=>1035,8538=>1035,8539=>1035,8540=>1035,8541=>1035,8542=>1035,8543=>615,8544=>372,8545=>659,8546=>945,8547=>1099,8548=>774,8549=>1099,8550=>1386,8551=>1672,8552=>1121,8553=>771,8554=>1120,8555=>1407,8556=>637,8557=>734,8558=>830,8559=>995,8560=>343,8561=>607,8562=>872,8563=>984,8564=>652,8565=>962,8566=>1227,8567=>1491,8568=>969,8569=>645,8570=>969,8571=>1233,8572=>343,8573=>593,8574=>716,8575=>1042,8576=>1289,8577=>830,8578=>1289,8579=>734,8580=>593,8581=>734,8585=>1035,8592=>838,8593=>838,8594=>838,8595=>838,8596=>838,8597=>838,8598=>838,8599=>838,8600=>838,8601=>838,8602=>838,8603=>838,8604=>838,8605=>838,8606=>838,8607=>838,8608=>838,8609=>838,8610=>838,8611=>838,8612=>838,8613=>838,8614=>838,8615=>838,8616=>838,8617=>838,8618=>838,8619=>838,8620=>838,8621=>838,8622=>838,8623=>838,8624=>838,8625=>838,8626=>838,8627=>838,8628=>838,8629=>838,8630=>838,8631=>838,8632=>838,8633=>838,8634=>838,8635=>838,8636=>838,8637=>838,8638=>838,8639=>838,8640=>838,8641=>838,8642=>838,8643=>838,8644=>838,8645=>838,8646=>838,8647=>838,8648=>838,8649=>838,8650=>838,8651=>838,8652=>838,8653=>838,8654=>838,8655=>838,8656=>838,8657=>838,8658=>838,8659=>838,8660=>838,8661=>838,8662=>838,8663=>838,8664=>838,8665=>838,8666=>838,8667=>838,8668=>838,8669=>838,8670=>838,8671=>838,8672=>838,8673=>838,8674=>838,8675=>838,8676=>838,8677=>838,8678=>838,8679=>838,8680=>838,8681=>838,8682=>838,8683=>838,8684=>838,8685=>838,8686=>838,8687=>838,8688=>838,8689=>838,8690=>838,8691=>838,8692=>838,8693=>838,8694=>838,8695=>838,8696=>838,8697=>838,8698=>838,8699=>838,8700=>838,8701=>838,8702=>838,8703=>838,8704=>774,8705=>696,8706=>544,8707=>683,8708=>683,8709=>856,8710=>697,8711=>697,8712=>896,8713=>896,8714=>750,8715=>896,8716=>896,8717=>750,8718=>636,8719=>787,8720=>787,8721=>718,8722=>838,8723=>838,8724=>696,8725=>365,8726=>696,8727=>838,8728=>626,8729=>380,8730=>667,8731=>667,8732=>667,8733=>712,8734=>833,8735=>838,8736=>896,8737=>896,8738=>838,8739=>500,8740=>500,8741=>500,8742=>500,8743=>812,8744=>812,8745=>812,8746=>812,8747=>610,8748=>929,8749=>1295,8750=>563,8751=>977,8752=>1313,8753=>563,8754=>563,8755=>563,8756=>696,8757=>696,8758=>294,8759=>696,8760=>838,8761=>838,8762=>838,8763=>838,8764=>838,8765=>838,8766=>838,8767=>838,8768=>375,8769=>838,8770=>838,8771=>838,8772=>838,8773=>838,8774=>838,8775=>838,8776=>838,8777=>838,8778=>838,8779=>838,8780=>838,8781=>838,8782=>838,8783=>838,8784=>838,8785=>838,8786=>838,8787=>838,8788=>1063,8789=>1063,8790=>838,8791=>838,8792=>838,8793=>838,8794=>838,8795=>838,8796=>838,8797=>838,8798=>838,8799=>838,8800=>838,8801=>838,8802=>838,8803=>838,8804=>838,8805=>838,8806=>838,8807=>838,8808=>841,8809=>841,8810=>1047,8811=>1047,8812=>500,8813=>838,8814=>838,8815=>838,8816=>838,8817=>838,8818=>838,8819=>838,8820=>838,8821=>838,8822=>838,8823=>838,8824=>838,8825=>838,8826=>838,8827=>838,8828=>838,8829=>838,8830=>838,8831=>838,8832=>838,8833=>838,8834=>838,8835=>838,8836=>838,8837=>838,8838=>838,8839=>838,8840=>838,8841=>838,8842=>838,8843=>838,8844=>812,8845=>812,8846=>812,8847=>838,8848=>838,8849=>838,8850=>838,8851=>796,8852=>796,8853=>838,8854=>838,8855=>838,8856=>838,8857=>838,8858=>838,8859=>838,8860=>838,8861=>838,8862=>838,8863=>838,8864=>838,8865=>838,8866=>914,8867=>914,8868=>914,8869=>914,8870=>542,8871=>542,8872=>914,8873=>914,8874=>914,8875=>914,8876=>914,8877=>914,8878=>914,8879=>914,8880=>838,8881=>838,8882=>838,8883=>838,8884=>838,8885=>838,8886=>1000,8887=>1000,8888=>838,8889=>838,8890=>542,8891=>812,8892=>812,8893=>812,8894=>838,8895=>838,8896=>843,8897=>843,8898=>843,8899=>843,8900=>494,8901=>380,8902=>626,8903=>838,8904=>1000,8905=>1000,8906=>1000,8907=>1000,8908=>1000,8909=>838,8910=>812,8911=>812,8912=>838,8913=>838,8914=>838,8915=>838,8916=>838,8917=>838,8918=>838,8919=>838,8920=>1422,8921=>1422,8922=>838,8923=>838,8924=>838,8925=>838,8926=>838,8927=>838,8928=>838,8929=>838,8930=>838,8931=>838,8932=>838,8933=>838,8934=>838,8935=>838,8936=>838,8937=>838,8938=>838,8939=>838,8940=>838,8941=>838,8942=>1000,8943=>1000,8944=>1000,8945=>1000,8946=>1158,8947=>896,8948=>750,8949=>896,8950=>896,8951=>750,8952=>896,8953=>896,8954=>1158,8955=>896,8956=>750,8957=>896,8958=>750,8959=>896,8960=>602,8961=>602,8962=>716,8963=>838,8964=>838,8965=>838,8966=>838,8967=>488,8968=>457,8969=>457,8970=>457,8971=>457,8972=>809,8973=>809,8974=>809,8975=>809,8976=>838,8977=>539,8984=>928,8985=>838,8988=>469,8989=>469,8990=>469,8991=>469,8992=>610,8993=>610,8996=>1152,8997=>1152,8998=>1414,8999=>1152,9000=>1443,9003=>1414,9004=>873,9075=>390,9076=>716,9077=>869,9082=>687,9085=>863,9095=>1152,9108=>873,9115=>500,9116=>500,9117=>500,9118=>500,9119=>500,9120=>500,9121=>500,9122=>500,9123=>500,9124=>500,9125=>500,9126=>500,9127=>750,9128=>750,9129=>750,9130=>750,9131=>750,9132=>750,9133=>750,9134=>610,9166=>838,9167=>945,9187=>873,9189=>769,9192=>696,9250=>716,9251=>716,9312=>847,9313=>847,9314=>847,9315=>847,9316=>847,9317=>847,9318=>847,9319=>847,9320=>847,9321=>847,9600=>769,9601=>769,9602=>769,9603=>769,9604=>769,9605=>769,9606=>769,9607=>769,9608=>769,9609=>769,9610=>769,9611=>769,9612=>769,9613=>769,9614=>769,9615=>769,9616=>769,9617=>769,9618=>769,9619=>769,9620=>769,9621=>769,9622=>769,9623=>769,9624=>769,9625=>769,9626=>769,9627=>769,9628=>769,9629=>769,9630=>769,9631=>769,9632=>945,9633=>945,9634=>945,9635=>945,9636=>945,9637=>945,9638=>945,9639=>945,9640=>945,9641=>945,9642=>678,9643=>678,9644=>945,9645=>945,9646=>550,9647=>550,9648=>769,9649=>769,9650=>769,9651=>769,9652=>502,9653=>502,9654=>769,9655=>769,9656=>502,9657=>502,9658=>769,9659=>769,9660=>769,9661=>769,9662=>502,9663=>502,9664=>769,9665=>769,9666=>502,9667=>502,9668=>769,9669=>769,9670=>769,9671=>769,9672=>769,9673=>873,9674=>494,9675=>873,9676=>873,9677=>873,9678=>873,9679=>873,9680=>873,9681=>873,9682=>873,9683=>873,9684=>873,9685=>873,9686=>527,9687=>527,9688=>840,9689=>970,9690=>970,9691=>970,9692=>387,9693=>387,9694=>387,9695=>387,9696=>769,9697=>769,9698=>769,9699=>769,9700=>769,9701=>769,9702=>639,9703=>945,9704=>945,9705=>945,9706=>945,9707=>945,9708=>769,9709=>769,9710=>769,9711=>1119,9712=>945,9713=>945,9714=>945,9715=>945,9716=>873,9717=>873,9718=>873,9719=>873,9720=>769,9721=>769,9722=>769,9723=>830,9724=>830,9725=>732,9726=>732,9727=>769,9728=>896,9729=>1000,9730=>896,9731=>896,9732=>896,9733=>896,9734=>896,9735=>573,9736=>896,9737=>896,9738=>888,9739=>888,9740=>671,9741=>1013,9742=>1246,9743=>1250,9744=>896,9745=>896,9746=>896,9747=>532,9748=>896,9749=>896,9750=>896,9751=>896,9752=>896,9753=>896,9754=>896,9755=>896,9756=>896,9757=>609,9758=>896,9759=>609,9760=>896,9761=>896,9762=>896,9763=>896,9764=>669,9765=>746,9766=>649,9767=>784,9768=>545,9769=>896,9770=>896,9771=>896,9772=>710,9773=>896,9774=>896,9775=>896,9776=>896,9777=>896,9778=>896,9779=>896,9780=>896,9781=>896,9782=>896,9783=>896,9784=>896,9785=>1042,9786=>1042,9787=>1042,9788=>896,9789=>896,9790=>896,9791=>614,9792=>732,9793=>732,9794=>896,9795=>896,9796=>896,9797=>896,9798=>896,9799=>896,9800=>896,9801=>896,9802=>896,9803=>896,9804=>896,9805=>896,9806=>896,9807=>896,9808=>896,9809=>896,9810=>896,9811=>896,9812=>896,9813=>896,9814=>896,9815=>896,9816=>896,9817=>896,9818=>896,9819=>896,9820=>896,9821=>896,9822=>896,9823=>896,9824=>896,9825=>896,9826=>896,9827=>896,9828=>896,9829=>896,9830=>896,9831=>896,9832=>896,9833=>472,9834=>638,9835=>896,9836=>896,9837=>472,9838=>357,9839=>484,9840=>748,9841=>766,9842=>896,9843=>896,9844=>896,9845=>896,9846=>896,9847=>896,9848=>896,9849=>896,9850=>896,9851=>896,9852=>896,9853=>896,9854=>896,9855=>896,9856=>869,9857=>869,9858=>869,9859=>869,9860=>869,9861=>869,9862=>896,9863=>896,9864=>896,9865=>896,9866=>896,9867=>896,9868=>896,9869=>896,9870=>896,9871=>896,9872=>896,9873=>896,9874=>896,9875=>896,9876=>896,9877=>541,9878=>896,9879=>896,9880=>896,9881=>896,9882=>896,9883=>896,9884=>896,9888=>896,9889=>702,9890=>1004,9891=>1089,9892=>1175,9893=>903,9894=>838,9895=>838,9896=>838,9897=>838,9898=>838,9899=>838,9900=>838,9901=>838,9902=>838,9903=>838,9904=>844,9905=>838,9906=>732,9907=>732,9908=>732,9909=>732,9910=>850,9911=>732,9912=>732,9920=>838,9921=>838,9922=>838,9923=>838,9954=>732,9985=>838,9986=>838,9987=>838,9988=>838,9990=>838,9991=>838,9992=>838,9993=>838,9996=>838,9997=>838,9998=>838,9999=>838,10000=>838,10001=>838,10002=>838,10003=>838,10004=>838,10005=>838,10006=>838,10007=>838,10008=>838,10009=>838,10010=>838,10011=>838,10012=>838,10013=>838,10014=>838,10015=>838,10016=>838,10017=>838,10018=>838,10019=>838,10020=>838,10021=>838,10022=>838,10023=>838,10025=>838,10026=>838,10027=>838,10028=>838,10029=>838,10030=>838,10031=>838,10032=>838,10033=>838,10034=>838,10035=>838,10036=>838,10037=>838,10038=>838,10039=>838,10040=>838,10041=>838,10042=>838,10043=>838,10044=>838,10045=>838,10046=>838,10047=>838,10048=>838,10049=>838,10050=>838,10051=>838,10052=>838,10053=>838,10054=>838,10055=>838,10056=>838,10057=>838,10058=>838,10059=>838,10061=>896,10063=>896,10064=>896,10065=>896,10066=>896,10070=>896,10072=>838,10073=>838,10074=>838,10075=>322,10076=>322,10077=>538,10078=>538,10081=>838,10082=>838,10083=>838,10084=>838,10085=>838,10086=>838,10087=>838,10088=>838,10089=>838,10090=>838,10091=>838,10092=>838,10093=>838,10094=>838,10095=>838,10096=>838,10097=>838,10098=>838,10099=>838,10100=>838,10101=>838,10102=>847,10103=>847,10104=>847,10105=>847,10106=>847,10107=>847,10108=>847,10109=>847,10110=>847,10111=>847,10112=>838,10113=>838,10114=>838,10115=>838,10116=>838,10117=>838,10118=>838,10119=>838,10120=>838,10121=>838,10122=>838,10123=>838,10124=>838,10125=>838,10126=>838,10127=>838,10128=>838,10129=>838,10130=>838,10131=>838,10132=>838,10136=>838,10137=>838,10138=>838,10139=>838,10140=>838,10141=>838,10142=>838,10143=>838,10144=>838,10145=>838,10146=>838,10147=>838,10148=>838,10149=>838,10150=>838,10151=>838,10152=>838,10153=>838,10154=>838,10155=>838,10156=>838,10157=>838,10158=>838,10159=>838,10161=>838,10162=>838,10163=>838,10164=>838,10165=>838,10166=>838,10167=>838,10168=>838,10169=>838,10170=>838,10171=>838,10172=>838,10173=>838,10174=>838,10181=>457,10182=>457,10208=>494,10214=>487,10215=>487,10216=>457,10217=>457,10218=>721,10219=>721,10224=>838,10225=>838,10226=>838,10227=>838,10228=>1157,10229=>1434,10230=>1434,10231=>1434,10232=>1434,10233=>1434,10234=>1434,10235=>1434,10236=>1434,10237=>1434,10238=>1434,10239=>1434,10240=>781,10241=>781,10242=>781,10243=>781,10244=>781,10245=>781,10246=>781,10247=>781,10248=>781,10249=>781,10250=>781,10251=>781,10252=>781,10253=>781,10254=>781,10255=>781,10256=>781,10257=>781,10258=>781,10259=>781,10260=>781,10261=>781,10262=>781,10263=>781,10264=>781,10265=>781,10266=>781,10267=>781,10268=>781,10269=>781,10270=>781,10271=>781,10272=>781,10273=>781,10274=>781,10275=>781,10276=>781,10277=>781,10278=>781,10279=>781,10280=>781,10281=>781,10282=>781,10283=>781,10284=>781,10285=>781,10286=>781,10287=>781,10288=>781,10289=>781,10290=>781,10291=>781,10292=>781,10293=>781,10294=>781,10295=>781,10296=>781,10297=>781,10298=>781,10299=>781,10300=>781,10301=>781,10302=>781,10303=>781,10304=>781,10305=>781,10306=>781,10307=>781,10308=>781,10309=>781,10310=>781,10311=>781,10312=>781,10313=>781,10314=>781,10315=>781,10316=>781,10317=>781,10318=>781,10319=>781,10320=>781,10321=>781,10322=>781,10323=>781,10324=>781,10325=>781,10326=>781,10327=>781,10328=>781,10329=>781,10330=>781,10331=>781,10332=>781,10333=>781,10334=>781,10335=>781,10336=>781,10337=>781,10338=>781,10339=>781,10340=>781,10341=>781,10342=>781,10343=>781,10344=>781,10345=>781,10346=>781,10347=>781,10348=>781,10349=>781,10350=>781,10351=>781,10352=>781,10353=>781,10354=>781,10355=>781,10356=>781,10357=>781,10358=>781,10359=>781,10360=>781,10361=>781,10362=>781,10363=>781,10364=>781,10365=>781,10366=>781,10367=>781,10368=>781,10369=>781,10370=>781,10371=>781,10372=>781,10373=>781,10374=>781,10375=>781,10376=>781,10377=>781,10378=>781,10379=>781,10380=>781,10381=>781,10382=>781,10383=>781,10384=>781,10385=>781,10386=>781,10387=>781,10388=>781,10389=>781,10390=>781,10391=>781,10392=>781,10393=>781,10394=>781,10395=>781,10396=>781,10397=>781,10398=>781,10399=>781,10400=>781,10401=>781,10402=>781,10403=>781,10404=>781,10405=>781,10406=>781,10407=>781,10408=>781,10409=>781,10410=>781,10411=>781,10412=>781,10413=>781,10414=>781,10415=>781,10416=>781,10417=>781,10418=>781,10419=>781,10420=>781,10421=>781,10422=>781,10423=>781,10424=>781,10425=>781,10426=>781,10427=>781,10428=>781,10429=>781,10430=>781,10431=>781,10432=>781,10433=>781,10434=>781,10435=>781,10436=>781,10437=>781,10438=>781,10439=>781,10440=>781,10441=>781,10442=>781,10443=>781,10444=>781,10445=>781,10446=>781,10447=>781,10448=>781,10449=>781,10450=>781,10451=>781,10452=>781,10453=>781,10454=>781,10455=>781,10456=>781,10457=>781,10458=>781,10459=>781,10460=>781,10461=>781,10462=>781,10463=>781,10464=>781,10465=>781,10466=>781,10467=>781,10468=>781,10469=>781,10470=>781,10471=>781,10472=>781,10473=>781,10474=>781,10475=>781,10476=>781,10477=>781,10478=>781,10479=>781,10480=>781,10481=>781,10482=>781,10483=>781,10484=>781,10485=>781,10486=>781,10487=>781,10488=>781,10489=>781,10490=>781,10491=>781,10492=>781,10493=>781,10494=>781,10495=>781,10502=>838,10503=>838,10506=>838,10507=>838,10560=>838,10561=>838,10627=>753,10628=>753,10702=>838,10703=>1046,10704=>1046,10705=>1000,10706=>1000,10707=>1000,10708=>1000,10709=>1000,10731=>494,10746=>838,10747=>838,10752=>1000,10753=>1000,10754=>1000,10764=>1661,10765=>563,10766=>563,10767=>563,10768=>563,10769=>563,10770=>563,10771=>563,10772=>563,10773=>563,10774=>563,10775=>563,10776=>563,10777=>563,10778=>563,10779=>563,10780=>563,10799=>838,10858=>838,10859=>838,10877=>838,10878=>838,10879=>838,10880=>838,10881=>838,10882=>838,10883=>838,10884=>838,10885=>838,10886=>838,10887=>838,10888=>838,10889=>838,10890=>838,10891=>838,10892=>838,10893=>838,10894=>838,10895=>838,10896=>838,10897=>838,10898=>838,10899=>838,10900=>838,10901=>838,10902=>838,10903=>838,10904=>838,10905=>838,10906=>838,10907=>838,10908=>838,10909=>838,10910=>838,10911=>838,10912=>838,10926=>838,10927=>838,10928=>838,10929=>838,10930=>838,10931=>838,10932=>838,10933=>838,10934=>838,10935=>838,10936=>838,10937=>838,10938=>838,11001=>838,11002=>838,11008=>838,11009=>838,11010=>838,11011=>838,11012=>838,11013=>838,11014=>838,11015=>838,11016=>838,11017=>838,11018=>838,11019=>838,11020=>838,11021=>838,11022=>838,11023=>838,11024=>838,11025=>838,11026=>945,11027=>945,11028=>945,11029=>945,11030=>769,11031=>769,11032=>769,11033=>769,11034=>945,11039=>869,11040=>869,11041=>873,11042=>873,11043=>873,11044=>1119,11091=>869,11092=>869,11360=>637,11361=>360,11362=>637,11363=>733,11364=>770,11365=>675,11366=>478,11367=>956,11368=>712,11369=>775,11370=>665,11371=>725,11372=>582,11373=>860,11374=>995,11375=>774,11376=>860,11377=>778,11378=>1221,11379=>1056,11380=>652,11381=>698,11382=>565,11383=>782,11385=>538,11386=>687,11387=>559,11388=>219,11389=>487,11390=>720,11391=>725,11520=>663,11521=>676,11522=>661,11523=>629,11524=>661,11525=>1032,11526=>718,11527=>1032,11528=>648,11529=>667,11530=>1032,11531=>673,11532=>677,11533=>1036,11534=>680,11535=>886,11536=>1032,11537=>683,11538=>674,11539=>1035,11540=>1033,11541=>1027,11542=>676,11543=>673,11544=>667,11545=>667,11546=>660,11547=>671,11548=>1039,11549=>673,11550=>692,11551=>659,11552=>1048,11553=>660,11554=>654,11555=>670,11556=>733,11557=>1017,11800=>586,11807=>838,11810=>457,11811=>457,11812=>457,11813=>457,11822=>580,19904=>896,19905=>896,19906=>896,19907=>896,19908=>896,19909=>896,19910=>896,19911=>896,19912=>896,19913=>896,19914=>896,19915=>896,19916=>896,19917=>896,19918=>896,19919=>896,19920=>896,19921=>896,19922=>896,19923=>896,19924=>896,19925=>896,19926=>896,19927=>896,19928=>896,19929=>896,19930=>896,19931=>896,19932=>896,19933=>896,19934=>896,19935=>896,19936=>896,19937=>896,19938=>896,19939=>896,19940=>896,19941=>896,19942=>896,19943=>896,19944=>896,19945=>896,19946=>896,19947=>896,19948=>896,19949=>896,19950=>896,19951=>896,19952=>896,19953=>896,19954=>896,19955=>896,19956=>896,19957=>896,19958=>896,19959=>896,19960=>896,19961=>896,19962=>896,19963=>896,19964=>896,19965=>896,19966=>896,19967=>896,42192=>762,42193=>733,42194=>733,42195=>830,42196=>682,42197=>682,42198=>821,42199=>775,42200=>775,42201=>530,42202=>734,42203=>734,42204=>725,42205=>683,42206=>683,42207=>995,42208=>837,42209=>637,42210=>720,42211=>770,42212=>770,42213=>774,42214=>774,42215=>837,42216=>786,42217=>530,42218=>1103,42219=>771,42220=>724,42221=>762,42222=>774,42223=>774,42224=>683,42225=>683,42226=>372,42227=>850,42228=>812,42229=>812,42230=>576,42231=>830,42232=>322,42233=>322,42234=>674,42235=>674,42236=>322,42237=>322,42238=>588,42239=>588,42564=>720,42565=>595,42566=>436,42567=>440,42572=>1405,42573=>1173,42576=>1234,42577=>1027,42580=>1174,42581=>972,42582=>1100,42583=>969,42594=>1100,42595=>940,42596=>1096,42597=>915,42598=>1260,42599=>997,42600=>850,42601=>687,42602=>1037,42603=>868,42604=>1406,42605=>1106,42606=>961,42634=>944,42635=>749,42636=>682,42637=>580,42644=>808,42645=>712,42760=>500,42761=>500,42762=>500,42763=>500,42764=>500,42765=>500,42766=>500,42767=>500,42768=>500,42769=>500,42770=>500,42771=>500,42772=>500,42773=>500,42774=>500,42779=>400,42780=>400,42781=>287,42782=>287,42783=>287,42786=>444,42787=>390,42788=>540,42789=>540,42790=>837,42791=>712,42792=>1031,42793=>857,42794=>696,42795=>557,42800=>559,42801=>595,42802=>1349,42803=>1052,42804=>1285,42805=>1065,42806=>1245,42807=>1052,42808=>1079,42809=>922,42810=>1079,42811=>922,42812=>1035,42813=>922,42814=>698,42815=>549,42816=>656,42817=>579,42822=>850,42823=>542,42824=>683,42825=>531,42826=>918,42827=>814,42830=>1406,42831=>1106,42832=>733,42833=>716,42834=>948,42835=>937,42838=>850,42839=>716,42852=>738,42853=>716,42854=>738,42855=>716,42880=>637,42881=>343,42882=>837,42883=>712,42889=>400,42890=>396,42891=>456,42892=>306,42893=>808,42894=>693,42896=>928,42897=>768,42912=>821,42913=>716,42914=>775,42915=>665,42916=>837,42917=>712,42918=>770,42919=>493,42920=>720,42921=>595,42922=>886,43002=>1062,43003=>683,43004=>733,43005=>995,43006=>372,43007=>1325,61184=>216,61185=>242,61186=>267,61187=>277,61188=>282,61189=>242,61190=>216,61191=>242,61192=>267,61193=>277,61194=>267,61195=>242,61196=>216,61197=>242,61198=>267,61199=>277,61200=>267,61201=>242,61202=>216,61203=>242,61204=>282,61205=>277,61206=>267,61207=>242,61208=>216,61209=>282,62464=>612,62465=>612,62466=>653,62467=>902,62468=>617,62469=>617,62470=>680,62471=>904,62472=>599,62473=>617,62474=>1163,62475=>621,62476=>622,62477=>893,62478=>612,62479=>622,62480=>924,62481=>622,62482=>754,62483=>624,62484=>886,62485=>622,62486=>907,62487=>621,62488=>611,62489=>624,62490=>677,62491=>621,62492=>611,62493=>630,62494=>622,62495=>561,62496=>612,62497=>626,62498=>612,62499=>611,62500=>618,62501=>667,62502=>963,62504=>1023,62505=>844,62506=>563,62507=>563,62508=>563,62509=>563,62510=>563,62511=>563,62512=>555,62513=>555,62514=>555,62515=>555,62516=>573,62517=>573,62518=>573,62519=>824,62520=>824,62521=>824,62522=>824,62523=>824,62524=>611,62525=>611,62526=>611,62527=>611,62528=>611,62529=>611,62917=>687,64256=>833,64257=>787,64258=>787,64259=>1138,64260=>1139,64261=>808,64262=>1020,64275=>1388,64276=>1384,64277=>1378,64278=>1384,64279=>1713,64285=>294,64286=>0,64287=>663,64288=>665,64289=>939,64290=>788,64291=>920,64292=>786,64293=>857,64294=>869,64295=>821,64296=>890,64297=>838,64298=>749,64299=>749,64300=>749,64301=>749,64302=>728,64303=>728,64304=>728,64305=>610,64306=>447,64307=>588,64308=>687,64309=>343,64310=>400,64311=>1000,64312=>679,64313=>436,64314=>578,64315=>566,64316=>605,64317=>1000,64318=>724,64319=>1000,64320=>453,64321=>680,64322=>1000,64323=>675,64324=>658,64325=>1000,64326=>653,64327=>736,64328=>602,64329=>749,64330=>683,64331=>343,64332=>610,64333=>566,64334=>658,64335=>710,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>1113,65535=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansbi.z b/lib/combodo/tcpdf/fonts/dejavusansbi.z deleted file mode 100644 index ff50412f1..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansbi.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensed.ctg.z b/lib/combodo/tcpdf/fonts/dejavusanscondensed.ctg.z deleted file mode 100644 index df25b6497..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensed.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensed.php b/lib/combodo/tcpdf/fonts/dejavusanscondensed.php deleted file mode 100644 index e257e55cd..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusanscondensed.php +++ /dev/null @@ -1,16 +0,0 @@ -32,'FontBBox'=>'[-918 -415 1513 1167]','ItalicAngle'=>0,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>34,'StemH'=>15,'AvgWidth'=>456,'MaxWidth'=>1562,'MissingWidth'=>540); -$cbbox=array(0=>array(44,-177,495,705),33=>array(136,0,225,729),34=>array(86,458,328,729),35=>array(69,0,686,718),36=>array(75,-147,498,760),37=>array(49,-14,806,742),38=>array(57,-14,674,742),39=>array(86,458,162,729),40=>array(77,-132,279,759),41=>array(72,-132,274,759),42=>array(26,286,423,742),43=>array(95,0,659,627),44=>array(69,-116,198,124),45=>array(44,234,281,314),46=>array(96,0,189,124),47=>array(0,-93,303,729),48=>array(59,-14,513,742),49=>array(99,0,490,729),50=>array(66,0,483,742),51=>array(68,-14,501,742),52=>array(44,0,522,729),53=>array(69,-14,494,729),54=>array(63,-14,516,742),55=>array(74,0,496,729),56=>array(61,-14,511,742),57=>array(57,-14,510,742),58=>array(105,0,198,517),59=>array(69,-116,198,517),60=>array(95,46,659,581),61=>array(95,172,659,454),62=>array(95,46,659,581),63=>array(64,0,415,742),64=>array(59,-174,837,704),65=>array(7,0,608,729),66=>array(88,0,554,729),67=>array(50,-14,580,742),68=>array(88,0,640,729),69=>array(88,0,511,729),70=>array(88,0,466,729),71=>array(50,-14,624,742),72=>array(88,0,589,729),73=>array(88,0,177,729),74=>array(-47,-200,177,729),75=>array(88,0,609,729),76=>array(88,0,497,729),77=>array(88,0,689,729),78=>array(88,0,585,729),79=>array(50,-14,658,742),80=>array(88,0,512,729),81=>array(50,-129,658,742),82=>array(88,0,600,729),83=>array(59,-14,521,742),84=>array(-3,0,553,729),85=>array(78,-14,581,729),86=>array(7,0,608,729),87=>array(30,0,861,729),88=>array(26,0,589,729),89=>array(-2,0,552,729),90=>array(40,0,576,729),91=>array(77,-132,264,760),92=>array(0,-93,303,729),93=>array(87,-132,274,760),94=>array(95,457,659,729),95=>array(-9,-236,459,-166),96=>array(75,617,286,800),97=>array(54,-14,470,560),98=>array(82,-14,522,760),99=>array(49,-14,439,560),100=>array(49,-14,490,760),101=>array(49,-14,506,560),102=>array(21,0,334,760),103=>array(49,-208,490,560),104=>array(82,0,494,760),105=>array(84,0,166,760),106=>array(-17,-208,166,760),107=>array(82,0,519,760),108=>array(84,0,166,760),109=>array(82,0,800,560),110=>array(82,0,494,560),111=>array(49,-14,501,560),112=>array(82,-208,522,560),113=>array(49,-208,490,560),114=>array(82,0,370,560),115=>array(48,-14,425,560),116=>array(24,0,332,702),117=>array(76,-14,489,560),118=>array(26,0,506,547),119=>array(38,0,699,547),120=>array(26,0,503,547),121=>array(26,-208,506,547),122=>array(39,0,434,547),123=>array(112,-163,460,760),124=>array(114,-236,189,764),125=>array(112,-163,460,760),126=>array(95,228,659,399),161=>array(136,0,225,729),162=>array(75,-153,466,699),163=>array(57,0,493,742),164=>array(41,40,533,587),165=>array(36,0,536,729),166=>array(114,-171,189,699),167=>array(40,-95,409,742),168=>array(94,659,356,758),169=>array(124,0,776,725),170=>array(50,229,364,742),171=>array(69,69,466,517),172=>array(95,140,659,421),173=>array(44,234,281,314),174=>array(124,0,776,725),175=>array(93,673,356,745),176=>array(85,432,365,742),177=>array(95,0,659,627),178=>array(41,326,304,742),179=>array(43,319,315,742),180=>array(163,616,374,800),181=>array(76,-208,551,547),182=>array(69,-96,475,729),183=>array(96,285,189,409),184=>array(127,-193,310,0),185=>array(60,326,312,734),186=>array(42,229,382,742),187=>array(84,69,482,517),188=>array(60,-14,844,742),189=>array(60,-14,815,742),190=>array(43,-14,844,742),191=>array(63,-14,413,729),192=>array(7,0,608,927),193=>array(7,0,608,927),194=>array(7,0,608,928),195=>array(7,0,608,921),196=>array(7,0,608,913),197=>array(7,0,608,928),198=>array(3,0,819,729),199=>array(50,-193,580,742),200=>array(88,0,511,927),201=>array(88,0,511,927),202=>array(88,0,511,928),203=>array(88,0,511,913),204=>array(26,0,194,927),205=>array(71,0,239,927),206=>array(-1,0,268,928),207=>array(2,0,264,913),208=>array(4,0,645,729),209=>array(88,0,585,921),210=>array(50,-14,658,927),211=>array(50,-14,658,927),212=>array(50,-14,658,928),213=>array(50,-14,658,921),214=>array(50,-14,658,913),215=>array(123,31,631,596),216=>array(44,-34,664,761),217=>array(78,-14,581,927),218=>array(78,-14,581,927),219=>array(78,-14,581,928),220=>array(78,-14,581,913),221=>array(-2,0,552,927),222=>array(88,0,512,729),223=>array(82,-14,526,760),224=>array(54,-14,470,800),225=>array(54,-14,470,800),226=>array(54,-14,470,800),227=>array(54,-14,470,777),228=>array(54,-14,470,758),229=>array(54,-14,470,878),230=>array(54,-14,836,560),231=>array(49,-193,439,560),232=>array(49,-14,506,800),233=>array(49,-14,506,800),234=>array(49,-14,506,800),235=>array(49,-14,506,758),236=>array(-25,0,186,800),237=>array(63,0,274,800),238=>array(-15,0,266,800),239=>array(-5,0,256,758),240=>array(49,-14,501,760),241=>array(82,0,494,777),242=>array(49,-14,501,800),243=>array(49,-14,501,800),244=>array(49,-14,501,800),245=>array(49,-14,501,777),246=>array(49,-14,501,758),247=>array(95,73,659,554),248=>array(31,-46,519,592),249=>array(76,-14,489,800),250=>array(76,-14,489,800),251=>array(76,-14,489,800),252=>array(76,-14,489,758),253=>array(26,-208,506,800),254=>array(82,-208,522,760),255=>array(26,-208,506,758),256=>array(7,0,608,899),257=>array(54,-14,470,745),258=>array(7,0,608,946),259=>array(54,-14,470,765),260=>array(7,-193,635,729),261=>array(54,-193,506,560),262=>array(50,-14,580,927),263=>array(49,-14,439,800),264=>array(50,-14,580,928),265=>array(49,-14,439,800),266=>array(50,-14,580,914),267=>array(49,-14,439,760),268=>array(50,-14,580,928),269=>array(49,-14,439,800),270=>array(88,0,640,928),271=>array(49,-14,659,760),272=>array(4,0,645,729),273=>array(49,-14,558,760),274=>array(88,0,511,900),275=>array(49,-14,506,745),276=>array(88,0,511,928),277=>array(49,-14,506,785),278=>array(88,0,511,914),279=>array(49,-14,506,760),280=>array(88,-193,512,729),281=>array(49,-193,506,560),282=>array(88,0,511,925),283=>array(49,-14,506,797),284=>array(50,-14,624,928),285=>array(49,-208,490,800),286=>array(50,-14,624,928),287=>array(49,-208,490,785),288=>array(50,-14,624,914),289=>array(49,-208,490,760),290=>array(50,-250,624,742),291=>array(49,-208,490,775),292=>array(88,0,589,928),293=>array(-12,0,494,928),294=>array(88,0,736,729),295=>array(53,0,520,760),296=>array(-13,0,278,921),297=>array(-20,0,271,777),298=>array(1,0,264,899),299=>array(-6,0,257,745),300=>array(-5,0,271,928),301=>array(-13,0,263,785),302=>array(77,-193,242,729),303=>array(66,-193,230,760),304=>array(88,0,178,914),305=>array(84,0,166,560),306=>array(88,-200,443,729),307=>array(84,-208,416,760),308=>array(-47,-200,267,928),309=>array(-17,-208,266,800),310=>array(88,-235,609,729),311=>array(82,-235,519,760),312=>array(82,0,519,547),313=>array(88,0,497,928),314=>array(84,0,258,928),315=>array(88,-235,497,729),316=>array(60,-235,189,760),317=>array(88,0,497,729),318=>array(84,0,338,760),319=>array(88,0,497,729),320=>array(84,0,283,760),321=>array(-6,0,501,729),322=>array(0,0,257,760),323=>array(88,0,585,928),324=>array(82,0,494,803),325=>array(88,-235,585,729),326=>array(82,-235,494,560),327=>array(88,0,585,921),328=>array(82,0,494,800),329=>array(90,0,644,729),330=>array(88,-208,574,742),331=>array(82,-208,494,560),332=>array(50,-14,658,899),333=>array(49,-14,501,745),334=>array(50,-14,658,928),335=>array(49,-14,501,785),336=>array(50,-14,658,927),337=>array(49,-14,501,800),338=>array(50,0,905,729),339=>array(49,-14,874,560),340=>array(88,0,600,928),341=>array(82,0,403,803),342=>array(88,-235,600,729),343=>array(57,-235,370,560),344=>array(88,0,600,921),345=>array(82,0,377,800),346=>array(59,-14,521,928),347=>array(48,-14,425,803),348=>array(59,-14,521,928),349=>array(48,-14,425,800),350=>array(59,-193,521,742),351=>array(48,-193,425,560),352=>array(59,-14,521,928),353=>array(48,-14,425,800),354=>array(-3,-193,553,729),355=>array(24,-193,332,702),356=>array(-3,0,553,921),357=>array(24,0,337,813),358=>array(-3,0,553,729),359=>array(24,0,332,702),360=>array(78,-14,581,921),361=>array(76,-14,489,777),362=>array(78,-14,581,899),363=>array(76,-14,489,745),364=>array(78,-14,581,928),365=>array(76,-14,489,785),366=>array(78,-14,581,929),367=>array(76,-14,489,849),368=>array(78,-14,581,927),369=>array(76,-14,492,800),370=>array(78,-193,581,729),371=>array(76,-193,552,560),372=>array(30,0,861,932),373=>array(38,0,699,803),374=>array(-2,0,552,932),375=>array(26,-208,506,803),376=>array(-2,0,552,913),377=>array(40,0,576,928),378=>array(39,0,434,803),379=>array(40,0,576,914),380=>array(39,0,434,760),381=>array(40,0,576,928),382=>array(39,0,434,800),383=>array(21,0,334,760),384=>array(14,-14,522,760),385=>array(-46,0,598,729),386=>array(88,0,554,729),387=>array(82,-14,522,760),388=>array(0,0,554,729),389=>array(0,-14,522,760),390=>array(50,-14,580,742),391=>array(50,-14,715,924),392=>array(49,-14,540,760),393=>array(4,0,645,729),394=>array(-46,0,684,729),395=>array(88,0,554,729),396=>array(49,-14,490,760),397=>array(49,-208,501,548),398=>array(57,0,480,729),399=>array(51,-14,658,742),400=>array(72,-14,504,742),401=>array(-47,-200,466,729),402=>array(-57,-208,334,760),403=>array(50,-14,742,924),404=>array(3,-210,615,729),405=>array(82,0,819,760),406=>array(88,0,312,729),407=>array(4,0,261,729),408=>array(88,0,671,742),409=>array(81,0,519,760),410=>array(4,0,244,760),411=>array(26,0,506,760),412=>array(78,-14,805,729),413=>array(-47,-200,585,729),414=>array(82,-208,494,560),415=>array(50,-14,658,742),416=>array(45,-14,688,760),417=>array(52,-14,543,615),418=>array(50,-14,766,742),419=>array(49,-208,602,560),420=>array(-46,0,556,729),421=>array(81,-208,522,760),422=>array(88,-129,600,729),423=>array(50,-14,512,742),424=>array(44,-14,420,560),425=>array(88,0,511,729),426=>array(-119,-208,320,760),427=>array(24,-208,332,702),428=>array(10,0,553,729),429=>array(24,0,332,760),430=>array(-3,-200,553,729),431=>array(76,-4,717,760),432=>array(77,-14,609,615),433=>array(34,-14,654,724),434=>array(88,-15,615,729),435=>array(-2,0,668,742),436=>array(26,-208,658,560),437=>array(40,0,576,729),438=>array(39,0,434,547),439=>array(70,-31,559,729),440=>array(40,-31,529,729),441=>array(45,-213,478,547),442=>array(49,-208,439,547),443=>array(66,0,483,742),444=>array(41,-31,560,729),445=>array(45,-213,478,547),446=>array(39,-14,410,702),447=>array(82,-208,522,560),448=>array(88,-208,177,729),449=>array(88,-208,355,729),450=>array(9,-208,406,729),451=>array(88,0,178,729),452=>array(88,0,1217,928),453=>array(88,0,1090,800),454=>array(49,-14,964,800),455=>array(88,-200,691,729),456=>array(88,-208,660,760),457=>array(84,-208,330,760),458=>array(88,-200,782,729),459=>array(88,-208,756,760),460=>array(82,-208,660,760),461=>array(7,0,608,928),462=>array(54,-14,470,800),463=>array(-1,0,268,928),464=>array(-14,0,267,800),465=>array(50,-14,658,928),466=>array(49,-14,501,800),467=>array(78,-14,581,928),468=>array(76,-14,489,800),469=>array(78,-14,581,1025),470=>array(76,-14,489,899),471=>array(78,-14,581,1044),472=>array(76,-14,489,892),473=>array(78,-14,581,1044),474=>array(76,-14,489,892),475=>array(78,-14,581,1047),476=>array(76,-14,489,892),477=>array(49,-14,506,560),478=>array(7,0,608,1025),479=>array(54,-14,470,899),480=>array(7,0,608,1025),481=>array(54,-14,470,869),482=>array(3,0,819,900),483=>array(54,-14,836,743),484=>array(50,-14,677,742),485=>array(49,-208,560,560),486=>array(50,-14,624,928),487=>array(49,-208,490,798),488=>array(88,0,609,928),489=>array(-10,0,519,928),490=>array(50,-193,658,742),491=>array(49,-193,501,560),492=>array(50,-193,658,899),493=>array(49,-193,501,745),494=>array(70,-31,559,928),495=>array(39,-213,471,800),496=>array(-17,-208,269,800),497=>array(88,0,1217,729),498=>array(88,0,1090,729),499=>array(49,-14,964,760),500=>array(50,-14,624,928),501=>array(49,-208,490,798),502=>array(88,-14,920,729),503=>array(88,-208,563,742),504=>array(88,0,585,927),505=>array(82,0,494,799),506=>array(7,0,608,931),507=>array(54,-14,547,931),508=>array(3,0,819,928),509=>array(54,-14,836,798),510=>array(44,-34,664,928),511=>array(31,-46,519,798),512=>array(7,0,608,930),513=>array(54,-14,470,799),514=>array(7,0,608,901),515=>array(54,-14,470,785),516=>array(88,0,511,930),517=>array(49,-14,506,798),518=>array(88,0,511,901),519=>array(49,-14,506,785),520=>array(-40,0,276,930),521=>array(-27,0,282,798),522=>array(2,0,277,901),523=>array(-13,0,263,785),524=>array(50,-14,658,930),525=>array(49,-14,501,799),526=>array(50,-14,658,901),527=>array(49,-14,501,785),528=>array(87,0,600,930),529=>array(57,0,370,798),530=>array(88,0,600,901),531=>array(82,0,379,785),532=>array(78,-14,581,930),533=>array(76,-14,489,799),534=>array(78,-14,581,901),535=>array(76,-14,489,785),536=>array(59,-240,521,742),537=>array(48,-240,425,560),538=>array(-3,-240,553,729),539=>array(24,-240,332,702),540=>array(68,-210,501,742),541=>array(31,-211,420,560),542=>array(88,0,589,928),543=>array(-7,0,494,928),544=>array(88,-208,574,742),545=>array(49,-70,705,760),546=>array(49,-14,579,742),547=>array(49,-14,500,632),548=>array(40,-208,576,729),549=>array(39,-208,434,547),550=>array(7,0,608,914),551=>array(54,-14,470,760),552=>array(88,-193,511,729),553=>array(49,-193,506,560),554=>array(50,-14,658,1025),555=>array(49,-14,501,899),556=>array(50,-14,658,1025),557=>array(49,-14,501,864),558=>array(50,-14,658,914),559=>array(49,-14,501,760),560=>array(50,-14,658,1025),561=>array(49,-14,501,899),562=>array(-2,0,552,899),563=>array(26,-208,506,745),564=>array(61,-70,378,757),565=>array(82,-70,709,560),566=>array(24,-70,380,702),567=>array(-17,-208,166,547),568=>array(49,-14,849,760),569=>array(49,-208,849,560),570=>array(-1,-34,617,761),571=>array(5,-34,624,761),572=>array(4,-46,491,592),573=>array(4,0,497,729),574=>array(-35,-34,584,761),575=>array(48,-242,461,560),576=>array(39,-242,473,547),577=>array(35,0,512,729),578=>array(35,0,400,560),579=>array(4,0,554,729),580=>array(5,-14,653,729),581=>array(7,0,608,729),582=>array(88,-93,511,822),583=>array(49,-93,506,640),584=>array(-47,-200,261,729),585=>array(-17,-208,237,760),586=>array(50,-200,752,743),587=>array(49,-208,591,560),588=>array(4,0,600,729),589=>array(6,0,370,560),590=>array(-4,0,554,729),591=>array(4,-208,530,547),592=>array(76,-14,492,560),593=>array(49,-14,490,560),594=>array(82,-14,522,560),595=>array(82,-14,522,760),596=>array(56,-14,445,560),597=>array(49,-69,439,560),598=>array(49,-208,591,760),599=>array(49,-14,644,760),600=>array(49,-14,506,560),601=>array(49,-14,506,560),602=>array(54,-14,733,560),603=>array(58,-14,426,561),604=>array(58,-14,426,561),605=>array(58,-14,694,561),606=>array(49,-14,537,561),607=>array(-17,-208,237,547),608=>array(49,-208,644,760),609=>array(49,-208,490,547),610=>array(49,-14,485,560),611=>array(42,-210,494,547),612=>array(42,-14,494,547),613=>array(76,-208,489,547),614=>array(82,0,494,760),615=>array(82,-208,494,760),616=>array(6,0,238,760),617=>array(73,0,273,547),618=>array(51,0,283,547),619=>array(33,0,323,760),620=>array(34,0,375,760),621=>array(84,-208,267,760),622=>array(84,-213,586,760),623=>array(82,-13,800,548),624=>array(82,-208,800,548),625=>array(82,-208,800,560),626=>array(-17,-208,497,560),627=>array(82,-208,595,560),628=>array(79,0,494,547),629=>array(49,-14,501,560),630=>array(49,0,691,547),631=>array(65,-18,590,561),632=>array(49,-208,542,760),633=>array(0,-13,289,547),634=>array(0,-13,289,755),635=>array(0,-208,390,547),636=>array(82,-207,370,560),637=>array(82,-208,370,560),638=>array(58,0,393,560),639=>array(51,0,393,560),640=>array(82,0,517,547),641=>array(82,0,517,547),642=>array(48,-208,425,560),643=>array(-18,-208,320,760),644=>array(-18,-208,320,760),645=>array(24,-208,361,549),646=>array(-119,-208,320,760),647=>array(24,-156,332,546),648=>array(24,-208,333,702),649=>array(0,-14,571,547),650=>array(49,-15,508,547),651=>array(84,0,491,548),652=>array(26,0,506,547),653=>array(38,0,699,547),654=>array(26,0,506,760),655=>array(44,0,497,547),656=>array(39,-208,534,547),657=>array(39,-54,434,547),658=>array(39,-213,471,547),659=>array(48,-213,498,547),660=>array(39,0,410,759),661=>array(39,0,410,759),662=>array(39,0,410,759),663=>array(39,-213,410,760),664=>array(50,-14,658,742),665=>array(82,0,478,547),666=>array(49,-14,537,561),667=>array(49,-14,652,760),668=>array(82,0,507,547),669=>array(-119,-208,246,760),670=>array(82,-213,519,547),671=>array(82,0,444,547),672=>array(49,-208,672,759),673=>array(39,0,410,759),674=>array(39,0,410,759),675=>array(49,-14,874,760),676=>array(49,-213,913,760),677=>array(49,-54,873,760),678=>array(24,0,703,702),679=>array(24,-208,566,760),680=>array(24,-70,651,702),681=>array(21,-208,724,760),682=>array(84,0,591,760),683=>array(84,0,549,760),684=>array(23,-15,440,640),685=>array(23,84,440,640),686=>array(0,-214,514,760),687=>array(0,-208,615,760),688=>array(51,326,312,751),689=>array(51,326,312,751),690=>array(-10,209,105,751),691=>array(51,326,233,640),692=>array(31,319,213,632),693=>array(31,209,277,632),694=>array(14,326,288,632),695=>array(23,326,440,632),696=>array(17,209,319,632),697=>array(70,557,183,800),698=>array(70,557,346,800),699=>array(76,489,206,729),700=>array(78,499,207,729),701=>array(86,616,215,856),702=>array(51,492,172,760),703=>array(51,492,172,760),704=>array(51,326,286,751),705=>array(51,326,286,751),706=>array(117,524,333,836),707=>array(117,524,333,836),708=>array(84,561,365,800),709=>array(84,561,365,800),710=>array(84,616,365,800),711=>array(84,616,365,800),712=>array(94,488,154,759),713=>array(93,673,356,745),714=>array(163,616,374,800),715=>array(75,617,286,800),716=>array(94,-148,154,123),717=>array(93,-156,356,-84),718=>array(75,-236,286,-54),719=>array(163,-236,374,-53),720=>array(48,0,206,517),721=>array(48,356,206,517),722=>array(51,249,172,517),723=>array(51,249,172,517),724=>array(126,229,324,448),725=>array(126,229,324,448),726=>array(44,125,307,417),727=>array(44,234,242,307),728=>array(87,645,363,785),729=>array(180,658,270,758),730=>array(104,610,346,878),731=>array(146,-193,310,0),732=>array(80,639,370,777),733=>array(105,616,414,800),734=>array(-0,233,301,504),735=>array(105,616,345,800),736=>array(51,208,336,632),737=>array(53,326,105,751),738=>array(51,326,289,648),739=>array(51,326,352,632),740=>array(51,326,286,751),741=>array(94,0,351,668),742=>array(94,0,351,668),743=>array(94,0,351,668),744=>array(94,0,351,668),745=>array(94,0,351,668),748=>array(84,-260,365,-21),749=>array(93,610,356,808),750=>array(76,489,386,729),755=>array(104,-240,346,28),759=>array(80,-192,370,-55),768=>array(-376,560,-166,800),769=>array(-288,560,-77,800),770=>array(-365,560,-84,800),771=>array(-371,639,-81,777),772=>array(-355,673,-92,745),773=>array(-459,686,9,755),774=>array(-366,645,-91,785),775=>array(-267,560,-185,760),776=>array(-356,560,-94,758),777=>array(-313,618,-116,810),778=>array(-347,610,-105,878),779=>array(-343,616,-34,800),780=>array(-364,560,-83,800),781=>array(-255,615,-195,832),782=>array(-345,615,-105,832),783=>array(-409,616,-101,800),784=>array(-366,645,-91,917),785=>array(-366,645,-91,785),786=>array(-211,489,-83,645),787=>array(-274,595,-168,844),788=>array(-274,595,-168,844),789=>array(-60,575,60,759),790=>array(-376,-266,-166,-83),791=>array(-288,-267,-77,-83),792=>array(-322,-240,-198,-24),793=>array(-251,-240,-128,-24),794=>array(-188,690,28,930),795=>array(-120,427,54,609),796=>array(-281,-241,-187,-32),797=>array(-333,-240,-117,-87),798=>array(-333,-240,-117,-87),799=>array(-322,-240,-128,-24),800=>array(-333,-184,-117,-117),801=>array(-284,-208,-21,63),802=>array(-286,-208,-22,63),803=>array(-267,-183,-185,-69),804=>array(-356,-183,-95,-84),805=>array(-320,-241,-132,-32),806=>array(-291,-240,-162,-84),807=>array(-322,-193,-140,0),808=>array(-304,-193,-140,0),809=>array(-255,-240,-195,-47),810=>array(-345,-211,-102,-50),811=>array(-407,-222,-45,-82),812=>array(-364,-240,-83,-57),813=>array(-366,-240,-85,-57),814=>array(-366,-222,-91,-82),815=>array(-366,-224,-91,-83),816=>array(-371,-222,-81,-84),817=>array(-355,-156,-92,-84),818=>array(-459,-236,9,-166),819=>array(-459,-236,9,-9),820=>array(-501,240,-36,381),821=>array(-285,221,-53,301),822=>array(-571,221,0,301),823=>array(-517,-46,-30,592),824=>array(-667,-34,-48,761),825=>array(-262,-241,-167,-32),826=>array(-344,-206,-102,-44),827=>array(-323,-240,-125,-21),828=>array(-407,-222,-45,-82),829=>array(-319,619,-124,834),830=>array(-223,595,-98,853),831=>array(-459,528,9,755),832=>array(-376,617,-166,800),833=>array(-288,616,-77,800),834=>array(-371,639,-81,777),835=>array(-274,595,-168,844),836=>array(-349,659,-69,978),837=>array(-250,-208,-154,-45),838=>array(-356,639,-93,786),839=>array(-324,-226,-126,-35),840=>array(-329,-240,-122,-47),841=>array(-324,-240,-126,-21),842=>array(-370,616,-80,800),843=>array(-370,567,-80,850),844=>array(-370,596,-80,820),845=>array(-407,-230,-43,-30),846=>array(-315,-240,-135,-45),849=>array(-285,610,-165,878),850=>array(-366,547,-91,855),851=>array(-319,-240,-124,-24),855=>array(-285,610,-165,878),856=>array(-92,658,-2,758),858=>array(-387,-241,-63,-32),860=>array(-401,-237,401,-60),861=>array(-401,802,401,979),862=>array(-401,855,401,927),863=>array(-401,-156,401,-84),864=>array(-319,756,319,894),865=>array(-401,752,401,929),866=>array(-398,-230,402,-30),880=>array(88,0,500,729),881=>array(84,0,429,547),882=>array(88,0,688,729),883=>array(88,0,495,729),884=>array(70,557,183,800),885=>array(70,-208,183,35),886=>array(88,0,585,729),887=>array(82,0,503,547),890=>array(192,-208,290,-45),891=>array(56,-14,445,560),892=>array(49,-14,439,560),893=>array(56,-14,445,560),894=>array(69,-116,198,517),900=>array(163,616,374,800),901=>array(94,659,374,978),902=>array(7,0,608,800),903=>array(96,285,189,409),904=>array(-11,0,614,800),905=>array(-6,0,689,800),906=>array(-9,0,280,800),908=>array(-6,-14,676,800),910=>array(-14,0,739,800),911=>array(-17,0,677,800),912=>array(2,0,281,978),913=>array(7,0,608,729),914=>array(88,0,554,729),915=>array(88,0,497,729),916=>array(7,0,608,729),917=>array(88,0,511,729),918=>array(40,0,576,729),919=>array(88,0,589,729),920=>array(50,-14,658,742),921=>array(88,0,177,729),922=>array(88,0,609,729),923=>array(7,0,608,729),924=>array(88,0,689,729),925=>array(88,0,585,729),926=>array(88,0,493,729),927=>array(50,-14,658,742),928=>array(88,0,589,729),929=>array(88,0,512,729),931=>array(88,0,511,729),932=>array(-3,0,553,729),933=>array(-2,0,552,729),934=>array(50,0,658,729),935=>array(26,0,589,729),936=>array(50,0,659,729),937=>array(34,0,654,738),938=>array(2,0,264,913),939=>array(-2,0,552,913),940=>array(49,-12,550,800),941=>array(58,-14,426,800),942=>array(82,-208,494,800),943=>array(73,0,292,800),944=>array(65,-14,469,978),945=>array(49,-12,550,559),946=>array(84,-208,510,766),947=>array(14,-208,506,547),948=>array(49,-14,501,742),949=>array(58,-14,426,561),950=>array(47,-210,447,760),951=>array(82,-208,494,560),952=>array(49,-11,501,768),953=>array(73,0,273,547),954=>array(83,0,509,547),955=>array(26,0,506,760),956=>array(76,-208,551,547),957=>array(32,0,461,547),958=>array(47,-210,451,760),959=>array(49,-14,501,560),960=>array(32,-19,517,547),961=>array(82,-208,522,560),962=>array(49,-210,439,560),963=>array(49,-14,544,547),964=>array(44,0,498,547),965=>array(65,-14,469,547),966=>array(49,-208,542,551),967=>array(26,-208,494,547),968=>array(49,-208,542,547),969=>array(59,-14,692,547),970=>array(2,0,280,758),971=>array(65,-14,469,758),972=>array(49,-14,501,800),973=>array(65,-14,469,800),974=>array(59,-14,692,800),975=>array(88,-208,609,729),976=>array(73,-11,484,768),977=>array(49,-11,501,768),978=>array(38,0,598,734),979=>array(-14,0,746,800),980=>array(38,0,598,913),981=>array(49,-208,542,760),982=>array(28,-14,723,547),983=>array(49,-206,541,550),984=>array(50,-207,658,742),985=>array(49,-208,501,560),986=>array(61,-210,525,729),987=>array(49,-210,486,547),988=>array(88,0,466,729),989=>array(-84,-208,369,760),990=>array(79,-2,543,729),991=>array(83,0,510,759),992=>array(50,-208,717,742),993=>array(52,-180,516,559),994=>array(50,-213,790,729),995=>array(59,-208,692,547),996=>array(50,-208,594,742),997=>array(49,-208,512,560),998=>array(88,-213,662,729),999=>array(20,-14,514,575),1000=>array(35,-208,567,745),1001=>array(44,-208,497,560),1002=>array(50,0,643,742),1003=>array(23,0,540,560),1004=>array(50,-14,579,758),1005=>array(49,-14,490,758),1006=>array(19,-208,531,729),1007=>array(24,-208,459,726),1008=>array(49,-7,541,550),1009=>array(82,-208,522,560),1010=>array(49,-14,439,560),1011=>array(-17,-208,166,760),1012=>array(50,-14,658,742),1013=>array(49,-14,433,560),1014=>array(86,-14,469,560),1015=>array(88,0,512,729),1016=>array(82,-208,522,760),1017=>array(50,-14,580,742),1018=>array(88,0,689,729),1019=>array(56,-208,529,547),1020=>array(37,-208,522,560),1021=>array(50,-14,580,742),1022=>array(50,-14,580,742),1023=>array(50,-14,580,742),1024=>array(88,0,511,927),1025=>array(88,0,511,913),1026=>array(-3,-200,638,729),1027=>array(88,0,497,927),1028=>array(50,-14,580,742),1029=>array(59,-14,521,742),1030=>array(88,0,177,729),1031=>array(2,0,264,913),1032=>array(-47,-200,177,729),1033=>array(37,0,921,729),1034=>array(88,0,877,729),1035=>array(-3,0,638,729),1036=>array(88,0,622,927),1037=>array(88,0,585,927),1038=>array(15,0,533,928),1039=>array(88,-157,589,729),1040=>array(7,0,608,729),1041=>array(88,0,554,729),1042=>array(88,0,554,729),1043=>array(88,0,497,729),1044=>array(44,-157,659,729),1045=>array(88,0,511,729),1046=>array(18,0,952,729),1047=>array(59,-14,518,742),1048=>array(88,0,585,729),1049=>array(88,0,585,928),1050=>array(88,0,622,729),1051=>array(37,0,588,729),1052=>array(88,0,689,729),1053=>array(88,0,589,729),1054=>array(50,-14,658,742),1055=>array(88,0,589,729),1056=>array(88,0,512,729),1057=>array(50,-14,580,742),1058=>array(-3,0,553,729),1059=>array(15,0,533,729),1060=>array(53,0,722,729),1061=>array(26,0,589,729),1062=>array(88,-157,664,729),1063=>array(77,0,529,729),1064=>array(88,0,875,729),1065=>array(88,-157,949,729),1066=>array(26,0,686,729),1067=>array(88,0,706,729),1068=>array(88,0,554,729),1069=>array(48,-14,578,742),1070=>array(92,-14,921,742),1071=>array(60,0,537,729),1072=>array(54,-14,470,560),1073=>array(49,-14,506,777),1074=>array(82,0,478,547),1075=>array(82,0,429,547),1076=>array(47,-138,576,547),1077=>array(49,-14,506,560),1078=>array(31,0,780,547),1079=>array(58,-14,426,561),1080=>array(82,0,503,547),1081=>array(82,0,503,760),1082=>array(82,0,514,547),1083=>array(33,0,501,547),1084=>array(82,0,598,547),1085=>array(82,0,507,547),1086=>array(49,-14,501,560),1087=>array(82,0,507,547),1088=>array(82,-208,522,560),1089=>array(49,-14,439,560),1090=>array(26,0,498,547),1091=>array(26,-208,506,547),1092=>array(49,-208,721,729),1093=>array(26,0,503,547),1094=>array(82,-138,571,547),1095=>array(66,0,450,547),1096=>array(82,0,742,547),1097=>array(82,-138,807,547),1098=>array(27,0,583,547),1099=>array(82,0,631,560),1100=>array(82,0,478,547),1101=>array(49,-14,439,560),1102=>array(84,-14,708,560),1103=>array(51,0,465,547),1104=>array(49,-14,506,802),1105=>array(49,-14,506,758),1106=>array(21,-208,514,760),1107=>array(82,0,433,803),1108=>array(49,-14,439,560),1109=>array(48,-14,425,560),1110=>array(84,0,166,760),1111=>array(-5,0,256,758),1112=>array(-17,-208,166,760),1113=>array(33,0,759,547),1114=>array(82,0,756,547),1115=>array(21,0,510,760),1116=>array(82,0,514,803),1117=>array(82,0,503,802),1118=>array(26,-208,506,760),1119=>array(82,-138,507,547),1120=>array(50,-14,790,729),1121=>array(59,-14,692,547),1122=>array(13,0,641,729),1123=>array(13,0,552,760),1124=>array(92,-14,800,742),1125=>array(84,-14,620,560),1126=>array(7,0,784,729),1127=>array(22,0,683,547),1128=>array(88,0,1021,729),1129=>array(84,0,879,547),1130=>array(50,0,658,729),1131=>array(47,0,504,547),1132=>array(88,0,874,729),1133=>array(84,0,695,547),1134=>array(50,-208,501,935),1135=>array(40,-193,426,753),1136=>array(7,0,760,729),1137=>array(22,-208,767,765),1138=>array(50,-14,658,742),1139=>array(49,-14,501,560),1140=>array(7,0,692,742),1141=>array(22,0,576,560),1142=>array(7,0,692,930),1143=>array(22,0,576,800),1144=>array(50,-208,866,742),1145=>array(49,-208,787,560),1146=>array(50,-14,808,742),1147=>array(49,-14,633,560),1148=>array(52,-14,1010,932),1149=>array(66,-14,858,758),1150=>array(50,-14,790,900),1151=>array(59,-14,692,734),1152=>array(50,-208,580,742),1153=>array(49,-208,439,560),1154=>array(26,-44,426,457),1155=>array(-467,608,-83,810),1156=>array(-334,645,4,788),1157=>array(-259,595,-152,797),1158=>array(-259,595,-152,797),1159=>array(-699,606,4,788),1160=>array(-918,-180,369,922),1161=>array(-861,-280,311,1022),1162=>array(88,-208,673,928),1163=>array(84,-208,587,760),1164=>array(14,0,554,729),1165=>array(17,0,480,702),1166=>array(88,0,549,729),1167=>array(82,-208,522,560),1168=>array(88,0,497,878),1169=>array(82,0,429,700),1170=>array(31,0,555,729),1171=>array(24,0,488,547),1172=>array(88,-200,540,729),1173=>array(82,-208,455,547),1174=>array(18,-157,964,729),1175=>array(31,-138,789,547),1176=>array(59,-193,518,742),1177=>array(58,-193,426,561),1178=>array(88,-157,642,729),1179=>array(82,-138,529,547),1180=>array(88,0,622,729),1181=>array(82,0,514,547),1182=>array(14,0,622,729),1183=>array(26,0,514,760),1184=>array(22,0,753,729),1185=>array(18,0,620,547),1186=>array(88,-157,677,729),1187=>array(84,-138,591,547),1188=>array(88,0,908,729),1189=>array(84,0,776,547),1190=>array(88,-200,951,729),1191=>array(84,-208,802,547),1192=>array(50,-14,784,743),1193=>array(49,-14,615,560),1194=>array(50,-193,580,742),1195=>array(49,-193,439,560),1196=>array(-3,-157,553,729),1197=>array(26,-138,498,547),1198=>array(-2,0,552,729),1199=>array(26,-208,506,547),1200=>array(-2,0,552,729),1201=>array(26,-208,506,547),1202=>array(26,-157,589,729),1203=>array(26,-138,503,547),1204=>array(-3,-157,819,729),1205=>array(2,-138,704,547),1206=>array(77,-157,617,729),1207=>array(66,-138,531,547),1208=>array(77,0,529,729),1209=>array(66,0,450,547),1210=>array(77,0,529,729),1211=>array(82,0,494,760),1212=>array(9,-14,796,742),1213=>array(6,-14,607,560),1214=>array(9,-184,796,742),1215=>array(6,-161,607,560),1216=>array(88,0,177,729),1217=>array(18,0,952,928),1218=>array(31,0,780,785),1219=>array(88,-200,586,729),1220=>array(83,-208,510,547),1221=>array(23,-208,677,729),1222=>array(20,-208,582,547),1223=>array(88,-200,589,729),1224=>array(84,-208,510,547),1225=>array(88,-208,677,729),1226=>array(84,-208,591,547),1227=>array(77,-157,529,729),1228=>array(66,-138,450,547),1229=>array(88,-208,777,729),1230=>array(84,-208,675,547),1231=>array(84,0,166,760),1232=>array(7,0,608,946),1233=>array(54,-14,470,765),1234=>array(7,0,608,913),1235=>array(54,-14,470,758),1236=>array(3,0,819,729),1237=>array(54,-14,836,560),1238=>array(88,0,511,928),1239=>array(49,-14,506,785),1240=>array(51,-14,658,742),1241=>array(49,-14,506,560),1242=>array(51,-14,658,913),1243=>array(49,-14,506,758),1244=>array(18,0,952,913),1245=>array(31,0,780,758),1246=>array(59,-14,518,913),1247=>array(58,-14,426,758),1248=>array(70,-31,559,729),1249=>array(39,-213,471,547),1250=>array(88,0,585,899),1251=>array(82,0,503,745),1252=>array(88,0,585,913),1253=>array(82,0,503,758),1254=>array(50,-14,658,913),1255=>array(49,-14,501,758),1256=>array(50,-14,658,742),1257=>array(49,-14,501,560),1258=>array(50,-14,658,913),1259=>array(49,-14,501,758),1260=>array(48,-14,578,913),1261=>array(49,-14,439,758),1262=>array(15,0,533,899),1263=>array(26,-208,506,745),1264=>array(15,0,533,913),1265=>array(26,-208,506,758),1266=>array(15,0,533,927),1267=>array(26,-208,506,800),1268=>array(77,0,529,913),1269=>array(66,0,450,758),1270=>array(88,-157,497,729),1271=>array(82,-138,429,547),1272=>array(88,0,706,913),1273=>array(82,0,631,758),1274=>array(31,-208,555,729),1275=>array(24,-208,488,547),1276=>array(26,-200,581,729),1277=>array(26,-208,494,547),1278=>array(26,0,589,729),1279=>array(26,0,503,547),1280=>array(63,0,529,729),1281=>array(49,0,445,547),1282=>array(63,-14,817,729),1283=>array(49,-14,726,547),1284=>array(88,-14,789,742),1285=>array(75,-14,706,561),1286=>array(88,-208,589,742),1287=>array(75,-208,508,561),1288=>array(23,-14,876,729),1289=>array(20,-14,780,547),1290=>array(88,-14,920,729),1291=>array(84,-14,789,547),1292=>array(50,-14,623,742),1293=>array(49,-14,481,560),1294=>array(-3,-14,607,729),1295=>array(2,-14,558,547),1296=>array(72,-14,504,742),1297=>array(58,-14,426,561),1298=>array(37,-200,588,729),1299=>array(33,-208,501,547),1300=>array(37,0,1025,729),1301=>array(33,0,866,547),1302=>array(88,0,777,729),1303=>array(82,-208,749,560),1304=>array(60,0,870,729),1305=>array(51,-14,840,560),1306=>array(50,-129,658,742),1307=>array(49,-208,490,560),1308=>array(30,0,861,729),1309=>array(38,0,699,547),1310=>array(88,0,622,729),1311=>array(82,0,514,547),1312=>array(37,-200,951,729),1313=>array(33,-208,793,547),1314=>array(88,-200,951,729),1315=>array(82,-208,799,547),1316=>array(88,-157,677,729),1317=>array(82,-138,588,547),1329=>array(78,-29,612,729),1330=>array(78,0,585,743),1331=>array(41,0,656,743),1332=>array(40,0,652,743),1333=>array(78,-14,585,729),1334=>array(78,0,624,744),1335=>array(83,0,554,729),1336=>array(78,0,585,743),1337=>array(78,-14,751,743),1338=>array(41,-14,656,729),1339=>array(83,0,585,729),1340=>array(83,0,480,729),1341=>array(83,-14,765,729),1342=>array(116,-13,687,742),1343=>array(78,0,581,729),1344=>array(31,-26,574,729),1345=>array(74,-23,619,744),1346=>array(44,0,656,743),1347=>array(46,0,644,735),1348=>array(78,-14,690,729),1349=>array(64,-14,602,743),1350=>array(0,-14,612,729),1351=>array(70,-15,616,729),1352=>array(78,0,581,743),1353=>array(53,-28,598,744),1354=>array(40,0,642,743),1355=>array(74,0,618,744),1356=>array(78,0,690,743),1357=>array(78,-14,581,729),1358=>array(44,0,656,729),1359=>array(66,-14,569,741),1360=>array(78,0,581,743),1361=>array(70,-14,608,743),1362=>array(83,0,484,729),1363=>array(53,0,677,729),1364=>array(22,0,611,743),1365=>array(50,-14,658,742),1366=>array(48,-13,672,729),1369=>array(51,492,172,760),1370=>array(78,499,207,729),1371=>array(0,620,211,803),1372=>array(2,618,321,893),1373=>array(-0,617,210,800),1374=>array(3,613,361,866),1375=>array(40,618,416,760),1377=>array(76,-14,795,547),1378=>array(82,-208,494,560),1379=>array(49,-208,583,560),1380=>array(82,-208,588,560),1381=>array(76,-14,493,760),1382=>array(49,-208,583,560),1383=>array(82,0,441,760),1384=>array(82,-208,494,560),1385=>array(82,-208,665,560),1386=>array(49,-14,583,760),1387=>array(82,-208,494,760),1388=>array(82,-208,272,547),1389=>array(82,-208,800,760),1390=>array(49,-14,501,760),1391=>array(76,-208,489,760),1392=>array(82,0,494,760),1393=>array(46,-15,471,760),1394=>array(82,-208,588,560),1395=>array(62,-14,490,768),1396=>array(76,-14,583,760),1397=>array(-20,-208,163,547),1398=>array(-18,-14,489,760),1399=>array(0,-208,392,560),1400=>array(82,0,494,560),1401=>array(4,-208,333,547),1402=>array(76,-208,795,547),1403=>array(48,-208,445,561),1404=>array(82,0,549,560),1405=>array(76,-14,489,560),1406=>array(76,-208,583,760),1407=>array(76,-14,800,560),1408=>array(82,-208,494,560),1409=>array(48,-208,489,560),1410=>array(82,0,404,547),1411=>array(76,-208,800,760),1412=>array(18,-208,522,560),1413=>array(48,-14,501,560),1414=>array(31,-208,690,760),1415=>array(76,-14,730,760),1417=>array(105,0,198,415),1418=>array(44,212,281,314),1456=>array(255,-217,321,-22),1457=>array(75,-217,395,-22),1458=>array(112,-217,409,-22),1459=>array(112,-217,409,-22),1460=>array(255,-159,321,-85),1461=>array(200,-159,376,-85),1462=>array(200,-217,376,-22),1463=>array(156,-159,420,-85),1464=>array(156,-193,420,-46),1465=>array(0,625,66,698),1466=>array(0,625,66,698),1467=>array(133,-237,419,-17),1468=>array(259,237,325,310),1469=>array(255,-217,321,-22),1470=>array(44,472,281,552),1471=>array(156,625,420,698),1472=>array(92,-98,174,645),1473=>array(573,625,640,698),1474=>array(86,625,153,698),1475=>array(92,0,174,547),1478=>array(44,0,322,547),1479=>array(156,-217,420,-22),1488=>array(82,0,520,547),1489=>array(39,0,482,547),1490=>array(39,-5,345,547),1491=>array(39,0,460,547),1492=>array(82,0,506,547),1493=>array(82,0,164,547),1494=>array(39,0,273,547),1495=>array(82,0,506,547),1496=>array(81,-14,534,552),1497=>array(60,204,142,547),1498=>array(39,-208,402,547),1499=>array(39,0,426,547),1500=>array(39,0,443,729),1501=>array(82,0,516,547),1502=>array(39,0,530,555),1503=>array(82,-208,164,547),1504=>array(39,0,278,547),1505=>array(81,-14,534,547),1506=>array(39,-93,482,547),1507=>array(82,-208,494,547),1508=>array(82,0,513,547),1509=>array(39,-208,447,548),1510=>array(39,0,453,547),1511=>array(82,-208,570,546),1512=>array(39,0,426,547),1513=>array(39,0,599,547),1514=>array(9,-4,510,547),1520=>array(82,0,342,547),1521=>array(60,0,299,547),1522=>array(60,204,281,547),1523=>array(82,361,292,547),1524=>array(82,361,499,547),1542=>array(0,-20,547,892),1543=>array(0,-20,547,895),1545=>array(58,0,616,635),1546=>array(58,0,814,635),1548=>array(96,0,225,240),1557=>array(110,624,340,868),1563=>array(96,0,225,633),1567=>array(64,0,415,742),1569=>array(71,42,351,483),1570=>array(-33,0,284,939),1571=>array(47,0,198,999),1572=>array(-38,-244,366,588),1573=>array(47,-244,198,760),1574=>array(57,-131,647,588),1575=>array(84,0,166,760),1576=>array(57,-171,778,327),1577=>array(61,-28,408,513),1578=>array(57,-10,778,391),1579=>array(57,-10,778,513),1580=>array(69,-244,580,425),1581=>array(69,-244,580,425),1582=>array(69,-244,580,586),1583=>array(55,-19,350,415),1584=>array(55,-19,350,586),1585=>array(-38,-244,381,269),1586=>array(-38,-244,381,464),1587=>array(57,-244,1024,366),1588=>array(57,-244,1024,586),1589=>array(57,-244,1021,362),1590=>array(57,-244,1021,464),1591=>array(63,0,772,760),1592=>array(63,0,772,760),1593=>array(51,-244,528,521),1594=>array(51,-244,528,659),1600=>array(-9,0,272,90),1601=>array(57,-45,857,635),1602=>array(47,-215,631,635),1603=>array(63,-27,650,760),1604=>array(63,-152,573,760),1605=>array(62,-240,492,369),1606=>array(64,-162,594,464),1607=>array(61,-28,408,358),1608=>array(-38,-244,366,315),1609=>array(57,-131,647,411),1610=>array(57,-244,647,411),1611=>array(97,591,354,825),1612=>array(97,591,354,874),1613=>array(97,-239,354,-5),1614=>array(97,591,354,708),1615=>array(97,590,354,874),1616=>array(97,-137,354,-20),1617=>array(88,599,362,869),1618=>array(104,610,345,878),1619=>array(66,590,383,719),1620=>array(147,593,298,808),1621=>array(147,-244,298,-29),1623=>array(97,615,354,898),1626=>array(106,616,343,775),1632=>array(193,220,290,342),1633=>array(122,0,308,635),1634=>array(36,0,443,635),1635=>array(33,0,458,635),1636=>array(77,-10,411,641),1637=>array(59,-10,424,643),1638=>array(37,0,444,635),1639=>array(26,0,457,635),1640=>array(26,0,457,635),1641=>array(44,0,444,640),1642=>array(58,0,425,635),1643=>array(0,-110,270,318),1644=>array(78,499,207,729),1645=>array(38,101,453,537),1646=>array(57,-10,778,327),1647=>array(47,-215,631,481),1648=>array(201,602,250,887),1652=>array(53,649,205,864),1657=>array(57,-10,778,575),1658=>array(57,-10,778,513),1659=>array(57,-244,778,327),1660=>array(57,-180,778,391),1661=>array(57,-10,778,464),1662=>array(57,-244,778,327),1663=>array(57,-10,778,513),1664=>array(57,-244,778,327),1665=>array(69,-244,580,710),1666=>array(69,-244,580,708),1667=>array(69,-244,580,425),1668=>array(69,-244,580,425),1669=>array(69,-244,580,708),1670=>array(69,-244,580,425),1671=>array(69,-244,580,425),1672=>array(55,-19,350,746),1673=>array(55,-180,350,415),1674=>array(55,-171,350,415),1675=>array(55,-171,350,746),1676=>array(55,-19,350,586),1677=>array(55,-146,350,415),1678=>array(55,-19,350,708),1679=>array(55,-19,350,684),1680=>array(55,-19,350,708),1681=>array(-38,-244,422,648),1682=>array(-38,-244,426,556),1683=>array(-38,-244,457,269),1684=>array(-38,-244,426,269),1685=>array(-38,-244,571,269),1686=>array(-38,-244,426,269),1687=>array(-38,-244,396,464),1688=>array(-38,-244,396,586),1689=>array(-38,-244,396,586),1690=>array(57,-244,1024,464),1691=>array(57,-244,1024,366),1692=>array(57,-244,1024,586),1693=>array(57,-244,1021,362),1694=>array(57,-244,1021,586),1695=>array(63,0,772,760),1696=>array(51,-244,528,781),1697=>array(57,-45,857,481),1698=>array(57,-171,857,481),1699=>array(57,-171,857,635),1700=>array(57,-45,857,757),1701=>array(57,-293,857,481),1702=>array(57,-45,857,757),1703=>array(47,-215,631,635),1704=>array(47,-215,631,757),1705=>array(57,-43,806,760),1706=>array(57,-43,900,760),1707=>array(57,-43,806,760),1708=>array(63,-27,650,760),1709=>array(63,-27,650,854),1710=>array(63,-293,650,760),1711=>array(57,-43,806,896),1712=>array(57,-43,806,896),1713=>array(57,-43,806,903),1714=>array(57,-171,806,896),1715=>array(57,-293,806,896),1716=>array(57,-43,806,1025),1717=>array(63,-152,651,971),1718=>array(63,-152,573,952),1719=>array(63,-152,615,1025),1720=>array(63,-391,573,760),1721=>array(64,-317,594,464),1722=>array(64,-162,594,366),1723=>array(64,-162,594,636),1724=>array(64,-330,594,464),1725=>array(64,-162,594,586),1726=>array(63,-33,575,487),1727=>array(69,-244,580,586),1734=>array(-38,-244,366,556),1740=>array(57,-131,647,411),1742=>array(57,-131,647,556),1749=>array(61,-28,408,358),1776=>array(193,220,290,342),1777=>array(122,0,308,635),1778=>array(36,0,443,635),1779=>array(33,0,458,635),1780=>array(36,0,424,643),1781=>array(46,-5,437,643),1782=>array(91,0,401,640),1783=>array(26,0,457,635),1784=>array(26,0,457,635),1785=>array(44,0,444,640),1984=>array(59,-14,513,742),1985=>array(99,0,490,729),1986=>array(99,0,477,729),1987=>array(99,0,477,729),1988=>array(99,0,477,729),1989=>array(99,0,477,729),1990=>array(99,0,477,729),1991=>array(94,0,479,729),1992=>array(94,0,479,729),1993=>array(69,0,504,741),1994=>array(84,0,166,729),1995=>array(49,-14,465,447),1996=>array(26,0,355,731),1997=>array(26,0,506,430),1998=>array(82,0,507,430),1999=>array(82,0,507,430),2000=>array(49,0,485,735),2001=>array(82,0,507,581),2002=>array(49,0,664,741),2003=>array(84,0,368,729),2004=>array(26,0,310,729),2005=>array(82,0,454,729),2006=>array(84,0,466,729),2007=>array(26,0,230,729),2008=>array(84,0,778,513),2009=>array(26,0,399,729),2010=>array(26,0,679,729),2011=>array(82,0,507,430),2012=>array(26,0,536,729),2013=>array(84,0,611,729),2014=>array(84,0,393,729),2015=>array(49,0,567,729),2016=>array(26,0,399,729),2017=>array(26,0,536,729),2018=>array(49,0,485,729),2019=>array(84,0,393,729),2020=>array(84,0,393,612),2021=>array(84,0,386,729),2022=>array(49,0,485,729),2023=>array(49,0,485,729),2027=>array(95,673,358,745),2028=>array(29,609,421,800),2029=>array(185,658,274,758),2030=>array(83,616,365,800),2031=>array(40,616,410,800),2032=>array(29,609,421,800),2033=>array(40,616,410,800),2034=>array(180,-184,270,-84),2035=>array(93,659,355,758),2036=>array(88,557,194,760),2037=>array(88,557,194,760),2040=>array(44,0,460,498),2041=>array(44,0,460,483),2042=>array(-9,0,334,72),3647=>array(77,-138,514,769),3713=>array(57,-10,546,560),3714=>array(61,-17,622,568),3716=>array(60,-10,558,568),3719=>array(48,-238,374,568),3720=>array(56,-0,517,575),3722=>array(61,-234,622,568),3725=>array(50,-8,558,573),3732=>array(82,-14,533,560),3733=>array(57,-15,508,579),3734=>array(0,-240,528,560),3735=>array(38,-8,540,571),3737=>array(42,-14,534,568),3738=>array(32,-8,501,561),3739=>array(32,-8,501,760),3740=>array(39,-8,652,614),3741=>array(82,-14,608,760),3742=>array(45,-8,572,561),3743=>array(45,-8,572,760),3745=>array(28,-14,572,547),3746=>array(50,-8,558,760),3747=>array(61,-8,571,568),3749=>array(35,-8,525,568),3751=>array(50,-13,502,560),3754=>array(35,-8,620,679),3755=>array(56,-12,686,575),3757=>array(50,-14,502,560),3758=>array(61,-8,615,605),3759=>array(89,-166,668,579),3760=>array(48,-13,530,563),3761=>array(-521,639,-39,880),3762=>array(54,0,426,560),3763=>array(-382,0,426,806),3764=>array(-535,615,-66,926),3765=>array(-535,615,0,926),3766=>array(-535,615,-66,926),3767=>array(-535,615,0,926),3768=>array(-338,-350,-145,-38),3769=>array(-377,-306,-137,-40),3771=>array(-521,639,-39,880),3772=>array(-550,-278,6,-39),3773=>array(57,-240,558,715),3776=>array(53,-14,292,560),3777=>array(53,-14,538,560),3778=>array(-20,-5,359,896),3779=>array(40,-14,441,892),3780=>array(83,-11,401,886),3782=>array(64,-232,517,557),3784=>array(-330,618,-250,792),3785=>array(-507,609,-41,891),3786=>array(-536,598,21,869),3787=>array(-416,609,-163,890),3788=>array(-550,636,6,875),3789=>array(-382,620,-198,806),3792=>array(59,-14,513,547),3793=>array(43,-75,524,576),3794=>array(43,-66,491,711),3795=>array(9,-9,624,830),3796=>array(43,-83,541,711),3797=>array(43,-83,541,711),3798=>array(39,-8,670,812),3799=>array(57,-240,546,560),3800=>array(66,-210,612,557),3801=>array(46,-4,559,571),3804=>array(56,-12,853,575),3805=>array(56,-12,876,575),4256=>array(53,-15,734,828),4257=>array(48,-0,634,828),4258=>array(48,-148,584,837),4259=>array(48,-15,703,828),4260=>array(44,0,497,837),4261=>array(35,0,643,837),4262=>array(26,-15,625,828),4263=>array(53,-15,796,837),4264=>array(26,0,351,874),4265=>array(53,0,505,828),4266=>array(26,-15,706,828),4267=>array(53,-15,742,828),4268=>array(57,0,510,828),4269=>array(44,-167,725,837),4270=>array(22,-15,646,837),4271=>array(35,0,510,828),4272=>array(48,-15,768,828),4273=>array(57,-15,510,828),4274=>array(57,-0,510,837),4275=>array(44,-182,725,837),4276=>array(44,0,735,834),4277=>array(40,0,612,828),4278=>array(57,-15,510,837),4279=>array(48,0,501,828),4280=>array(53,-15,505,828),4281=>array(57,0,510,828),4282=>array(53,-15,688,837),4283=>array(53,-15,729,828),4284=>array(57,-0,510,828),4285=>array(44,-15,517,837),4286=>array(57,-0,510,828),4287=>array(26,0,626,828),4288=>array(26,-15,707,828),4289=>array(57,0,510,828),4290=>array(48,-15,571,837),4291=>array(26,0,479,828),4292=>array(48,0,486,828),4293=>array(35,-15,629,837),4304=>array(44,-15,413,592),4305=>array(44,-14,422,837),4306=>array(40,-235,483,551),4307=>array(44,-230,684,547),4308=>array(44,-236,404,547),4309=>array(44,-236,413,547),4310=>array(18,-14,407,838),4311=>array(44,-14,677,547),4312=>array(44,0,422,547),4313=>array(40,-236,410,542),4314=>array(44,-230,914,552),4315=>array(44,-15,413,837),4316=>array(57,-15,426,833),4317=>array(44,-0,664,547),4318=>array(44,-15,413,833),4319=>array(44,-236,413,551),4320=>array(44,0,672,833),4321=>array(57,-15,426,827),4322=>array(40,-236,549,680),4323=>array(4,-236,417,571),4324=>array(44,-236,690,547),4325=>array(44,-236,404,828),4326=>array(44,-230,664,546),4327=>array(44,-236,413,538),4328=>array(26,-15,409,837),4329=>array(57,0,426,837),4330=>array(40,-236,475,532),4331=>array(44,-14,413,828),4332=>array(57,-15,439,837),4333=>array(44,-236,424,827),4334=>array(57,-15,426,827),4335=>array(9,-235,400,572),4336=>array(44,-15,413,837),4337=>array(53,-15,422,837),4338=>array(44,-141,413,547),4339=>array(44,-236,413,546),4340=>array(44,-236,413,837),4341=>array(44,-15,464,837),4342=>array(44,-236,700,547),4343=>array(40,-236,457,547),4344=>array(44,-236,413,538),4345=>array(35,-236,479,551),4346=>array(44,-77,413,547),4347=>array(48,-10,355,484),4348=>array(44,420,243,837),5121=>array(7,1,608,730),5122=>array(7,0,608,1037),5123=>array(7,0,608,729),5124=>array(7,0,608,914),5125=>array(88,0,640,729),5126=>array(88,0,640,914),5127=>array(88,0,640,913),5129=>array(88,0,640,729),5130=>array(52,0,604,729),5131=>array(52,0,604,914),5132=>array(88,1,744,730),5133=>array(7,1,699,730),5134=>array(88,0,744,729),5135=>array(7,0,699,729),5136=>array(88,0,744,914),5137=>array(7,0,699,914),5138=>array(88,0,818,729),5139=>array(88,0,818,729),5140=>array(88,0,818,914),5141=>array(88,0,818,914),5142=>array(88,0,640,914),5143=>array(88,0,782,729),5144=>array(52,0,818,729),5145=>array(88,0,782,914),5146=>array(52,0,818,914),5147=>array(52,0,604,914),5149=>array(88,629,178,729),5150=>array(60,326,439,734),5151=>array(41,356,326,714),5152=>array(41,356,326,714),5153=>array(60,398,301,674),5154=>array(60,391,301,667),5155=>array(60,398,305,667),5156=>array(60,398,301,667),5157=>array(31,327,365,733),5158=>array(60,326,298,734),5159=>array(88,312,178,412),5160=>array(60,503,301,563),5161=>array(60,399,301,667),5162=>array(60,399,301,691),5163=>array(7,1,926,730),5164=>array(7,0,763,729),5165=>array(88,0,803,729),5166=>array(52,0,950,729),5167=>array(7,0,608,729),5168=>array(7,0,608,1037),5169=>array(7,0,608,729),5170=>array(7,0,608,914),5171=>array(52,0,604,729),5172=>array(52,0,604,914),5173=>array(52,0,604,913),5175=>array(52,0,604,729),5176=>array(52,0,604,729),5177=>array(52,0,604,914),5178=>array(88,0,744,729),5179=>array(7,0,699,729),5180=>array(88,0,744,729),5181=>array(7,0,699,729),5182=>array(88,0,744,914),5183=>array(7,0,699,914),5184=>array(88,0,782,729),5185=>array(52,0,818,729),5186=>array(88,0,782,914),5187=>array(52,0,818,914),5188=>array(88,0,782,729),5189=>array(52,0,818,729),5190=>array(88,0,782,914),5191=>array(52,0,818,914),5192=>array(52,0,604,913),5193=>array(60,326,408,734),5194=>array(60,326,124,734),5196=>array(78,-14,581,729),5197=>array(78,0,581,1037),5198=>array(78,0,581,743),5199=>array(78,0,581,914),5200=>array(52,0,604,729),5201=>array(52,0,604,914),5202=>array(52,0,604,913),5204=>array(52,0,604,729),5205=>array(53,0,605,729),5206=>array(53,0,605,914),5207=>array(88,-14,751,729),5208=>array(78,-14,748,729),5209=>array(88,0,751,743),5210=>array(78,0,748,743),5211=>array(88,0,751,914),5212=>array(78,0,748,914),5213=>array(88,0,782,729),5214=>array(52,0,758,729),5215=>array(88,0,782,914),5216=>array(52,0,758,914),5217=>array(88,0,800,729),5218=>array(53,0,758,729),5219=>array(88,0,800,914),5220=>array(53,0,758,914),5221=>array(105,0,800,729),5222=>array(60,326,341,734),5223=>array(78,-14,741,734),5224=>array(78,0,741,743),5225=>array(52,0,730,734),5226=>array(53,0,752,734),5227=>array(31,0,478,743),5228=>array(88,0,535,1037),5229=>array(88,0,535,743),5230=>array(88,0,535,914),5231=>array(31,-14,478,729),5232=>array(31,-14,478,914),5233=>array(31,-14,561,913),5234=>array(88,-14,535,729),5235=>array(88,-14,535,914),5236=>array(88,0,686,743),5237=>array(31,0,642,743),5238=>array(88,0,703,743),5239=>array(88,0,683,743),5240=>array(88,0,703,914),5241=>array(88,0,683,914),5242=>array(88,-14,686,729),5243=>array(31,-14,642,729),5244=>array(88,-14,686,914),5245=>array(31,-14,642,914),5246=>array(88,-14,703,729),5247=>array(88,-14,683,729),5248=>array(88,-14,703,914),5249=>array(88,-14,683,914),5250=>array(105,-14,703,729),5251=>array(60,318,342,734),5252=>array(24,318,306,734),5253=>array(31,0,626,743),5254=>array(88,0,648,743),5255=>array(31,-14,626,734),5256=>array(88,-14,648,734),5257=>array(31,0,478,743),5258=>array(88,0,535,1037),5259=>array(88,0,535,743),5260=>array(88,0,535,914),5261=>array(31,-14,478,729),5262=>array(31,-14,478,914),5263=>array(31,-14,561,913),5264=>array(88,-14,535,729),5265=>array(88,-14,535,914),5266=>array(88,0,686,743),5267=>array(31,0,642,743),5268=>array(88,0,703,743),5269=>array(88,0,683,743),5270=>array(88,0,703,914),5271=>array(88,0,683,914),5272=>array(88,-14,686,729),5273=>array(31,-14,642,729),5274=>array(88,-14,686,914),5275=>array(31,-14,642,914),5276=>array(88,-14,703,729),5277=>array(88,-14,683,729),5278=>array(88,-14,703,914),5279=>array(88,-14,683,914),5280=>array(105,-14,703,729),5281=>array(60,318,342,734),5282=>array(60,318,342,734),5283=>array(52,0,461,729),5284=>array(88,0,497,1037),5285=>array(88,0,497,729),5286=>array(88,0,497,914),5287=>array(52,0,461,729),5288=>array(52,0,461,914),5289=>array(52,0,547,913),5290=>array(88,0,497,729),5291=>array(88,0,497,914),5292=>array(88,0,586,729),5293=>array(52,0,640,729),5294=>array(88,0,667,729),5295=>array(88,0,635,729),5296=>array(88,0,667,914),5297=>array(88,0,635,914),5298=>array(88,0,586,729),5299=>array(52,0,640,729),5300=>array(88,0,586,914),5301=>array(52,0,640,914),5302=>array(88,0,667,729),5303=>array(88,0,635,729),5304=>array(88,0,667,914),5305=>array(88,0,635,914),5306=>array(105,0,667,729),5307=>array(60,326,298,734),5308=>array(60,326,408,734),5309=>array(60,326,298,734),5312=>array(52,-14,736,436),5313=>array(31,-14,714,755),5314=>array(31,-14,714,436),5315=>array(4,-14,688,636),5316=>array(52,0,736,450),5317=>array(52,0,736,636),5318=>array(52,0,736,635),5319=>array(31,0,714,450),5320=>array(31,0,714,636),5321=>array(88,-14,932,436),5322=>array(52,-14,879,436),5323=>array(88,0,923,450),5324=>array(31,0,714,450),5325=>array(88,0,923,636),5326=>array(31,0,714,636),5327=>array(31,0,714,635),5328=>array(60,484,491,736),5329=>array(60,318,358,734),5330=>array(60,484,491,736),5331=>array(52,0,736,450),5332=>array(31,0,714,755),5333=>array(31,0,714,450),5334=>array(31,0,714,636),5335=>array(52,0,736,450),5336=>array(52,0,736,636),5337=>array(52,0,736,635),5338=>array(31,0,714,450),5339=>array(31,0,714,636),5340=>array(88,0,932,450),5341=>array(52,0,879,450),5342=>array(88,0,923,450),5343=>array(31,0,875,450),5344=>array(88,0,923,636),5345=>array(31,0,875,636),5346=>array(88,0,932,450),5347=>array(52,0,879,450),5348=>array(88,0,932,636),5349=>array(52,0,879,636),5350=>array(88,0,923,450),5351=>array(31,0,875,450),5352=>array(88,0,923,636),5353=>array(31,0,875,636),5354=>array(60,484,491,736),5356=>array(52,0,604,729),5357=>array(31,0,455,729),5358=>array(88,0,584,1037),5359=>array(88,0,512,729),5360=>array(88,0,512,914),5361=>array(31,0,455,729),5362=>array(31,0,455,914),5363=>array(31,0,540,913),5364=>array(88,0,512,729),5365=>array(88,0,512,914),5366=>array(88,0,663,729),5367=>array(31,0,626,729),5368=>array(88,0,682,729),5369=>array(88,0,642,729),5370=>array(88,0,682,914),5371=>array(88,0,642,914),5372=>array(88,0,663,729),5373=>array(31,0,626,729),5374=>array(88,0,663,914),5375=>array(31,0,626,914),5376=>array(88,0,682,729),5377=>array(88,0,642,729),5378=>array(88,0,682,914),5379=>array(88,0,642,914),5380=>array(105,0,682,729),5381=>array(60,326,327,734),5382=>array(60,318,329,741),5383=>array(60,326,327,734),5392=>array(31,-14,610,743),5393=>array(31,-14,610,743),5394=>array(31,-14,610,914),5395=>array(31,-14,772,464),5396=>array(31,-14,772,636),5397=>array(31,-14,772,464),5398=>array(31,-14,772,636),5399=>array(88,-14,788,743),5400=>array(31,-14,733,743),5401=>array(88,-14,788,743),5402=>array(31,-14,733,743),5403=>array(88,-14,788,914),5404=>array(31,-14,733,914),5405=>array(88,-14,996,464),5406=>array(31,-14,938,464),5407=>array(88,-14,996,636),5408=>array(31,-14,938,636),5409=>array(88,-14,996,464),5410=>array(31,-14,938,464),5411=>array(88,-14,996,636),5412=>array(31,-14,938,636),5413=>array(60,476,527,737),5414=>array(52,0,476,729),5415=>array(88,0,512,1037),5416=>array(88,0,512,729),5417=>array(88,0,512,914),5418=>array(52,0,476,729),5419=>array(52,0,479,914),5420=>array(52,0,564,913),5421=>array(88,0,512,729),5422=>array(88,0,512,914),5423=>array(88,0,672,729),5424=>array(52,0,650,729),5425=>array(88,0,682,729),5426=>array(88,0,685,729),5427=>array(88,0,682,914),5428=>array(88,0,685,914),5429=>array(88,0,672,729),5430=>array(52,0,650,729),5431=>array(88,0,674,914),5432=>array(52,0,650,914),5433=>array(88,0,682,729),5434=>array(88,0,685,729),5435=>array(88,0,682,914),5436=>array(88,0,685,914),5437=>array(105,0,682,729),5438=>array(60,326,327,734),5440=>array(60,399,301,667),5441=>array(60,326,387,734),5442=>array(88,-14,772,436),5443=>array(52,-14,736,436),5444=>array(52,0,736,450),5445=>array(88,0,772,755),5446=>array(88,0,772,450),5447=>array(88,0,772,636),5448=>array(88,0,512,729),5449=>array(88,0,512,914),5450=>array(88,0,512,729),5451=>array(31,0,455,729),5452=>array(31,0,455,914),5453=>array(31,0,455,729),5454=>array(88,0,663,914),5455=>array(31,0,626,914),5456=>array(60,326,327,734),5458=>array(52,0,604,729),5459=>array(66,0,608,744),5460=>array(66,-15,608,1037),5461=>array(66,-15,608,729),5462=>array(66,-15,608,914),5463=>array(34,0,602,662),5464=>array(34,0,602,914),5465=>array(52,0,620,662),5466=>array(52,0,620,914),5467=>array(88,0,798,914),5468=>array(52,0,818,914),5469=>array(60,326,416,695),5470=>array(78,-14,581,743),5471=>array(78,-14,581,743),5472=>array(78,-14,581,743),5473=>array(78,-14,581,743),5474=>array(78,-14,581,914),5475=>array(78,-14,581,914),5476=>array(36,0,604,729),5477=>array(36,0,604,914),5478=>array(53,0,621,729),5479=>array(53,0,621,914),5480=>array(88,0,816,914),5481=>array(53,0,758,914),5482=>array(60,326,421,734),5492=>array(31,0,695,743),5493=>array(52,0,717,743),5494=>array(52,0,717,914),5495=>array(31,-14,695,729),5496=>array(31,-14,695,914),5497=>array(52,-14,717,729),5498=>array(52,-14,717,914),5499=>array(60,318,458,734),5500=>array(88,0,589,729),5501=>array(60,326,387,734),5502=>array(60,0,912,1037),5503=>array(60,0,912,743),5504=>array(60,0,912,914),5505=>array(60,-14,854,734),5506=>array(60,-14,854,914),5507=>array(60,-14,912,734),5508=>array(60,-14,912,914),5509=>array(60,318,718,734),5514=>array(31,0,695,743),5515=>array(52,0,717,743),5516=>array(31,-14,695,729),5517=>array(52,-14,717,729),5518=>array(60,0,1103,1037),5519=>array(60,0,1103,743),5520=>array(60,0,1103,914),5521=>array(60,-14,813,736),5522=>array(60,-14,813,914),5523=>array(60,-14,1103,736),5524=>array(60,-14,1103,914),5525=>array(60,332,580,736),5526=>array(60,332,916,736),5536=>array(31,0,714,692),5537=>array(31,0,714,692),5538=>array(52,-242,736,450),5539=>array(52,-242,736,636),5540=>array(31,-242,714,450),5541=>array(31,-242,714,636),5542=>array(60,338,491,736),5543=>array(52,0,564,729),5544=>array(14,0,527,729),5545=>array(14,0,527,914),5546=>array(52,0,564,729),5547=>array(52,0,564,914),5548=>array(14,0,527,729),5549=>array(14,0,527,914),5550=>array(4,326,327,734),5551=>array(88,-14,535,729),5598=>array(88,0,640,729),5601=>array(50,0,602,729),5702=>array(60,326,372,734),5703=>array(60,240,372,820),5742=>array(51,0,352,306),5743=>array(60,0,854,743),5744=>array(60,0,1090,743),5745=>array(60,0,1438,743),5746=>array(60,0,1438,914),5747=>array(60,-14,1149,736),5748=>array(60,-14,1149,914),5749=>array(60,-14,1438,736),5750=>array(60,-14,1438,914),5760=>array(-9,246,438,328),5761=>array(-9,-125,453,328),5762=>array(-9,-125,650,328),5763=>array(-9,-125,847,328),5764=>array(-9,-125,1044,328),5765=>array(-9,-125,1242,328),5766=>array(-9,246,453,697),5767=>array(-9,246,650,697),5768=>array(-9,246,847,697),5769=>array(-9,246,1044,697),5770=>array(-9,246,1242,697),5771=>array(-9,-125,457,697),5772=>array(-9,-125,655,697),5773=>array(-9,-125,854,697),5774=>array(-9,-125,1052,697),5775=>array(-9,-125,1250,697),5776=>array(-9,41,453,533),5777=>array(-9,41,650,533),5778=>array(-9,41,846,533),5779=>array(-9,41,1043,533),5780=>array(-9,41,1242,533),5781=>array(-9,-125,457,697),5782=>array(-9,-125,686,697),5783=>array(-9,-83,719,328),5784=>array(-9,-240,1093,328),5785=>array(-9,246,1044,902),5786=>array(-9,82,624,328),5787=>array(49,28,466,544),5788=>array(-9,28,407,544),7424=>array(26,0,506,547),7425=>array(4,0,603,547),7426=>array(54,-14,836,560),7427=>array(27,0,478,547),7428=>array(49,-14,439,560),7429=>array(82,0,496,547),7430=>array(16,0,496,547),7431=>array(82,0,399,547),7432=>array(57,-14,424,561),7433=>array(84,-213,166,547),7434=>array(0,-14,279,547),7435=>array(82,0,519,547),7436=>array(0,0,448,560),7437=>array(82,0,598,547),7438=>array(82,0,503,547),7439=>array(49,-14,501,560),7440=>array(56,-14,445,560),7441=>array(49,22,567,524),7442=>array(49,57,567,489),7443=>array(22,2,597,543),7444=>array(49,-14,874,560),7446=>array(49,273,501,560),7447=>array(49,-14,501,273),7448=>array(66,0,427,547),7449=>array(22,0,457,547),7450=>array(22,0,457,547),7451=>array(26,0,498,547),7452=>array(82,-16,459,547),7453=>array(76,37,582,495),7454=>array(76,38,771,496),7455=>array(21,-238,525,560),7456=>array(26,0,506,547),7457=>array(38,0,699,547),7458=>array(39,0,434,547),7459=>array(53,-14,419,547),7462=>array(79,0,448,560),7463=>array(26,0,506,547),7464=>array(66,0,441,547),7465=>array(66,0,427,547),7466=>array(40,0,492,547),7467=>array(33,0,501,547),7468=>array(4,326,383,734),7469=>array(2,326,516,734),7470=>array(56,326,349,734),7472=>array(56,326,403,734),7473=>array(56,326,322,734),7474=>array(36,326,303,734),7475=>array(31,318,393,742),7476=>array(56,326,371,734),7477=>array(56,326,112,734),7478=>array(-30,214,112,734),7479=>array(56,326,384,734),7480=>array(56,326,313,734),7481=>array(56,326,434,734),7482=>array(56,326,369,734),7483=>array(56,326,369,734),7484=>array(31,318,415,742),7485=>array(31,318,365,742),7486=>array(56,326,323,734),7487=>array(56,326,378,734),7488=>array(-2,326,348,734),7489=>array(49,318,366,734),7490=>array(19,326,542,734),7491=>array(34,318,296,640),7492=>array(34,318,296,640),7493=>array(31,318,309,640),7494=>array(34,318,527,640),7495=>array(51,318,329,751),7496=>array(31,318,309,751),7497=>array(31,318,319,640),7498=>array(31,318,319,640),7499=>array(37,318,268,640),7500=>array(36,318,268,640),7501=>array(31,209,309,640),7502=>array(53,207,105,632),7503=>array(51,326,327,751),7504=>array(51,326,504,640),7505=>array(51,209,312,640),7506=>array(31,318,316,640),7507=>array(31,318,277,640),7508=>array(31,479,316,640),7509=>array(31,318,316,479),7510=>array(51,209,329,640),7511=>array(15,326,209,719),7512=>array(48,318,308,632),7513=>array(48,347,366,604),7514=>array(51,319,504,633),7515=>array(17,326,319,632),7517=>array(53,209,321,755),7518=>array(9,209,319,632),7519=>array(31,318,316,742),7520=>array(31,209,342,635),7521=>array(16,209,312,633),7522=>array(53,0,105,425),7523=>array(51,0,233,313),7524=>array(48,-8,308,306),7525=>array(17,0,319,306),7526=>array(53,-117,321,429),7527=>array(9,-117,319,306),7528=>array(53,-117,330,313),7529=>array(31,-117,342,309),7530=>array(16,-117,312,307),7543=>array(82,-208,522,560),7544=>array(56,326,371,734),7547=>array(51,0,283,547),7549=>array(22,-208,579,560),7557=>array(63,-208,246,760),7579=>array(31,318,309,640),7580=>array(31,318,277,640),7581=>array(31,287,277,640),7582=>array(31,318,316,751),7583=>array(37,318,268,640),7584=>array(13,326,211,751),7585=>array(-10,209,153,632),7586=>array(31,209,309,632),7587=>array(48,209,308,632),7588=>array(32,326,179,751),7589=>array(53,326,168,632),7590=>array(32,326,179,632),7591=>array(32,326,179,632),7592=>array(-75,209,155,751),7593=>array(53,209,168,751),7594=>array(40,209,155,751),7595=>array(49,326,283,640),7596=>array(51,209,504,640),7597=>array(51,209,504,633),7598=>array(-10,209,313,640),7599=>array(51,209,375,640),7600=>array(49,326,312,640),7601=>array(31,318,316,640),7602=>array(31,210,316,751),7603=>array(31,209,268,640),7604=>array(-10,209,202,751),7605=>array(15,209,209,719),7606=>array(41,318,401,632),7607=>array(31,318,320,632),7608=>array(51,317,290,632),7609=>array(53,326,309,632),7610=>array(17,326,319,632),7611=>array(24,326,273,632),7612=>array(24,209,336,632),7613=>array(24,296,273,632),7614=>array(24,207,297,632),7615=>array(31,320,316,756),7620=>array(-410,616,-40,800),7621=>array(-410,616,-40,800),7622=>array(-410,616,-40,800),7623=>array(-410,616,-40,800),7624=>array(-421,616,-29,800),7625=>array(-421,616,-29,800),7680=>array(7,-241,608,729),7681=>array(54,-241,470,560),7682=>array(88,0,554,914),7683=>array(81,-14,522,915),7684=>array(88,-183,554,729),7685=>array(82,-183,522,760),7686=>array(88,-156,554,729),7687=>array(82,-156,522,760),7688=>array(50,-193,580,928),7689=>array(49,-193,439,800),7690=>array(88,0,640,914),7691=>array(49,-14,490,942),7692=>array(88,-183,640,729),7693=>array(49,-183,490,760),7694=>array(88,-156,640,729),7695=>array(49,-156,490,760),7696=>array(88,-192,640,729),7697=>array(49,-193,490,760),7698=>array(88,-240,640,729),7699=>array(49,-240,490,760),7700=>array(88,0,511,1044),7701=>array(49,-14,506,921),7702=>array(88,0,511,1044),7703=>array(49,-14,506,921),7704=>array(88,-213,511,729),7705=>array(49,-213,506,560),7706=>array(88,-192,511,729),7707=>array(49,-192,506,560),7708=>array(88,-193,511,928),7709=>array(49,-193,506,785),7710=>array(88,0,466,914),7711=>array(21,0,334,942),7712=>array(50,-14,624,887),7713=>array(49,-208,490,745),7714=>array(88,0,589,913),7715=>array(81,0,494,915),7716=>array(88,-183,589,729),7717=>array(82,-183,494,760),7718=>array(88,0,589,914),7719=>array(-9,0,494,913),7720=>array(7,-193,589,729),7721=>array(0,-193,494,760),7722=>array(88,-222,589,729),7723=>array(82,-222,494,760),7724=>array(0,-192,290,729),7725=>array(-20,-192,271,760),7726=>array(3,0,264,1044),7727=>array(-5,0,256,886),7728=>array(88,0,609,928),7729=>array(82,0,519,928),7730=>array(88,-183,609,729),7731=>array(82,-183,519,760),7732=>array(88,-156,609,729),7733=>array(82,-156,519,760),7734=>array(88,-183,497,729),7735=>array(88,-183,171,760),7736=>array(1,-183,497,927),7737=>array(-1,-183,262,899),7738=>array(88,-156,497,729),7739=>array(-5,-156,258,760),7740=>array(88,-240,497,729),7741=>array(-15,-240,266,760),7742=>array(88,0,689,928),7743=>array(82,0,800,800),7744=>array(88,0,689,914),7745=>array(82,0,800,760),7746=>array(88,-183,689,729),7747=>array(82,-183,800,560),7748=>array(88,0,585,914),7749=>array(82,0,494,760),7750=>array(88,-183,585,729),7751=>array(82,-183,494,560),7752=>array(88,-156,585,729),7753=>array(82,-156,494,560),7754=>array(88,-240,585,729),7755=>array(82,-240,494,560),7756=>array(50,-14,658,1044),7757=>array(49,-14,501,881),7758=>array(50,-14,658,1042),7759=>array(49,-14,501,882),7760=>array(50,-14,658,1044),7761=>array(49,-14,501,921),7762=>array(50,-14,658,1044),7763=>array(49,-14,501,921),7764=>array(88,0,512,928),7765=>array(82,-208,522,800),7766=>array(88,0,512,914),7767=>array(82,-208,522,760),7768=>array(88,0,600,913),7769=>array(82,0,370,760),7770=>array(88,-183,600,729),7771=>array(82,-183,370,560),7772=>array(88,-183,600,899),7773=>array(82,-183,370,745),7774=>array(88,-156,600,729),7775=>array(37,-156,370,560),7776=>array(59,-14,521,914),7777=>array(48,-14,425,760),7778=>array(59,-183,521,742),7779=>array(48,-183,425,560),7780=>array(59,-14,521,928),7781=>array(48,-14,437,800),7782=>array(59,-14,521,1042),7783=>array(48,-14,425,973),7784=>array(59,-183,521,914),7785=>array(48,-183,425,733),7786=>array(-3,0,553,914),7787=>array(24,0,332,942),7788=>array(-3,-183,553,729),7789=>array(24,-183,332,702),7790=>array(-3,-156,553,729),7791=>array(24,-156,352,702),7792=>array(-3,-240,553,729),7793=>array(24,-240,354,702),7794=>array(78,-183,581,729),7795=>array(76,-183,489,560),7796=>array(78,-192,581,729),7797=>array(76,-192,489,560),7798=>array(78,-213,581,729),7799=>array(76,-213,489,560),7800=>array(78,-14,581,1044),7801=>array(76,-14,489,990),7802=>array(78,-14,581,1025),7803=>array(76,-14,489,869),7804=>array(7,0,608,936),7805=>array(26,0,506,777),7806=>array(7,-183,608,729),7807=>array(26,-183,506,547),7808=>array(30,0,861,931),7809=>array(38,0,699,802),7810=>array(30,0,861,931),7811=>array(38,0,699,803),7812=>array(30,0,861,913),7813=>array(38,0,699,758),7814=>array(30,0,861,913),7815=>array(38,0,699,760),7816=>array(30,-183,861,729),7817=>array(38,-183,699,547),7818=>array(26,0,589,914),7819=>array(26,0,503,760),7820=>array(26,0,589,913),7821=>array(26,0,503,758),7822=>array(-2,0,552,914),7823=>array(26,-208,506,760),7824=>array(40,0,576,928),7825=>array(39,0,434,800),7826=>array(40,-183,576,729),7827=>array(39,-183,434,547),7828=>array(40,-156,576,729),7829=>array(39,-156,434,547),7830=>array(82,-156,494,760),7831=>array(1,0,332,913),7832=>array(38,0,699,878),7833=>array(26,-208,506,878),7834=>array(54,-14,605,760),7835=>array(21,0,334,942),7836=>array(0,0,334,760),7837=>array(21,0,334,760),7838=>array(78,-14,642,743),7839=>array(49,-14,501,742),7840=>array(7,-183,608,729),7841=>array(54,-183,470,560),7842=>array(7,0,608,992),7843=>array(54,-14,470,810),7844=>array(7,0,608,1028),7845=>array(54,-14,527,846),7846=>array(7,0,608,1028),7847=>array(54,-14,470,847),7848=>array(7,0,608,1044),7849=>array(54,-14,519,862),7850=>array(7,0,608,1057),7851=>array(54,-14,470,875),7852=>array(7,-183,608,928),7853=>array(54,-183,470,800),7854=>array(7,0,608,1044),7855=>array(54,-14,470,877),7856=>array(7,0,608,1044),7857=>array(54,-14,470,877),7858=>array(7,0,608,1068),7859=>array(54,-14,470,901),7860=>array(7,0,608,1043),7861=>array(54,-14,470,876),7862=>array(7,-183,608,946),7863=>array(54,-183,470,765),7864=>array(88,-183,511,729),7865=>array(49,-183,506,560),7866=>array(88,0,511,992),7867=>array(49,-14,506,810),7868=>array(88,0,511,921),7869=>array(49,-14,506,777),7870=>array(88,0,573,1028),7871=>array(49,-14,552,846),7872=>array(88,0,511,1028),7873=>array(49,-14,506,847),7874=>array(88,0,558,1044),7875=>array(49,-14,545,862),7876=>array(88,0,511,1057),7877=>array(49,-14,506,875),7878=>array(88,-183,511,928),7879=>array(49,-183,506,800),7880=>array(40,0,237,992),7881=>array(30,0,227,811),7882=>array(88,-183,177,729),7883=>array(83,-183,166,760),7884=>array(50,-183,658,742),7885=>array(49,-183,501,560),7886=>array(50,-14,658,992),7887=>array(49,-14,501,810),7888=>array(50,-14,658,1028),7889=>array(49,-14,541,846),7890=>array(50,-14,658,1028),7891=>array(49,-14,501,847),7892=>array(50,-14,658,1044),7893=>array(49,-14,533,862),7894=>array(50,-14,658,1057),7895=>array(49,-14,501,875),7896=>array(50,-183,658,928),7897=>array(49,-183,501,800),7898=>array(45,-14,688,927),7899=>array(52,-14,543,800),7900=>array(45,-14,688,927),7901=>array(52,-14,543,800),7902=>array(45,-14,688,992),7903=>array(52,-14,543,810),7904=>array(45,-14,688,921),7905=>array(52,-14,543,777),7906=>array(45,-183,688,760),7907=>array(52,-183,543,615),7908=>array(78,-183,581,729),7909=>array(76,-183,489,560),7910=>array(78,-14,581,992),7911=>array(76,-14,489,810),7912=>array(76,-4,717,927),7913=>array(77,-14,609,800),7914=>array(76,-4,717,927),7915=>array(77,-14,609,800),7916=>array(76,-4,717,992),7917=>array(77,-14,609,810),7918=>array(76,-4,717,921),7919=>array(77,-14,609,777),7920=>array(76,-183,717,760),7921=>array(77,-183,609,615),7922=>array(-2,0,552,931),7923=>array(26,-208,506,802),7924=>array(-2,-183,552,729),7925=>array(26,-208,506,547),7926=>array(-2,0,552,996),7927=>array(26,-208,506,813),7928=>array(-2,0,552,921),7929=>array(26,-208,506,777),7930=>array(88,0,688,729),7931=>array(14,0,416,760),7936=>array(49,-12,550,797),7937=>array(49,-12,550,797),7938=>array(49,-12,550,800),7939=>array(49,-12,550,800),7940=>array(49,-12,550,800),7941=>array(49,-12,550,800),7942=>array(49,-12,550,928),7943=>array(49,-12,550,928),7944=>array(7,0,608,797),7945=>array(7,0,608,797),7946=>array(2,0,782,800),7947=>array(2,0,782,800),7948=>array(3,0,685,800),7949=>array(2,0,714,800),7950=>array(3,0,630,928),7951=>array(1,0,661,928),7952=>array(58,-14,426,797),7953=>array(58,-14,426,797),7954=>array(58,-14,426,800),7955=>array(58,-14,426,800),7956=>array(58,-14,438,800),7957=>array(58,-14,452,800),7960=>array(3,0,583,797),7961=>array(3,0,583,797),7962=>array(2,0,812,800),7963=>array(2,0,820,800),7964=>array(3,0,751,800),7965=>array(2,0,778,800),7968=>array(82,-208,494,797),7969=>array(82,-208,494,797),7970=>array(82,-208,494,800),7971=>array(82,-208,494,800),7972=>array(82,-208,494,800),7973=>array(82,-208,494,800),7974=>array(82,-208,494,928),7975=>array(82,-208,494,928),7976=>array(3,0,665,797),7977=>array(3,0,664,797),7978=>array(2,0,889,800),7979=>array(2,0,892,800),7980=>array(3,0,836,800),7981=>array(2,0,857,800),7982=>array(3,0,752,928),7983=>array(1,0,764,928),7984=>array(68,0,273,797),7985=>array(63,0,273,797),7986=>array(-35,0,307,800),7987=>array(-31,0,313,800),7988=>array(2,0,326,800),7989=>array(-20,0,330,800),7990=>array(-23,0,273,928),7991=>array(-26,0,273,928),7992=>array(3,0,254,797),7993=>array(3,0,249,797),7994=>array(2,0,483,800),7995=>array(2,0,483,800),7996=>array(3,0,425,800),7997=>array(2,0,452,800),7998=>array(3,0,353,928),7999=>array(1,0,356,928),8000=>array(49,-14,501,797),8001=>array(49,-14,501,797),8002=>array(49,-14,501,800),8003=>array(49,-14,501,800),8004=>array(49,-14,501,800),8005=>array(49,-14,501,800),8008=>array(3,-14,673,797),8009=>array(3,-14,713,797),8010=>array(2,-14,935,800),8011=>array(2,-14,939,800),8012=>array(3,-14,794,800),8013=>array(2,-14,823,800),8016=>array(65,-14,469,797),8017=>array(65,-14,469,797),8018=>array(65,-14,469,800),8019=>array(65,-14,469,800),8020=>array(65,-14,469,800),8021=>array(65,-14,469,800),8022=>array(65,-14,469,928),8023=>array(65,-14,469,928),8025=>array(3,0,708,797),8027=>array(2,0,900,800),8029=>array(2,0,913,800),8031=>array(1,0,810,928),8032=>array(59,-14,692,797),8033=>array(59,-14,692,797),8034=>array(59,-14,692,800),8035=>array(59,-14,692,800),8036=>array(59,-14,692,800),8037=>array(59,-14,692,800),8038=>array(59,-14,692,928),8039=>array(59,-14,692,928),8040=>array(3,0,688,797),8041=>array(3,0,725,797),8042=>array(2,0,946,800),8043=>array(2,0,952,800),8044=>array(3,0,817,800),8045=>array(2,0,841,800),8046=>array(3,0,795,928),8047=>array(1,0,823,928),8048=>array(49,-12,550,800),8049=>array(49,-12,550,800),8050=>array(58,-14,426,800),8051=>array(58,-14,426,800),8052=>array(82,-208,494,800),8053=>array(82,-208,494,800),8054=>array(-51,0,273,800),8055=>array(73,0,292,800),8056=>array(49,-14,501,800),8057=>array(49,-14,501,800),8058=>array(65,-14,469,800),8059=>array(65,-14,469,800),8060=>array(59,-14,692,800),8061=>array(59,-14,692,800),8064=>array(49,-208,550,797),8065=>array(49,-208,550,797),8066=>array(49,-208,550,800),8067=>array(49,-208,550,800),8068=>array(49,-208,550,800),8069=>array(49,-208,550,800),8070=>array(49,-208,550,928),8071=>array(49,-208,550,928),8072=>array(7,-208,608,797),8073=>array(7,-208,608,797),8074=>array(2,-208,782,800),8075=>array(2,-208,782,800),8076=>array(3,-208,685,800),8077=>array(2,-208,714,800),8078=>array(3,-208,630,928),8079=>array(1,-208,661,928),8080=>array(82,-208,494,797),8081=>array(82,-208,494,797),8082=>array(82,-208,494,800),8083=>array(82,-208,494,800),8084=>array(82,-208,494,800),8085=>array(82,-208,494,800),8086=>array(82,-208,494,928),8087=>array(82,-208,494,928),8088=>array(3,-208,665,797),8089=>array(3,-208,664,797),8090=>array(2,-208,889,800),8091=>array(2,-208,892,800),8092=>array(3,-208,836,800),8093=>array(2,-208,857,800),8094=>array(3,-208,752,928),8095=>array(1,-208,764,928),8096=>array(59,-208,692,797),8097=>array(59,-208,692,797),8098=>array(59,-208,692,800),8099=>array(59,-208,692,800),8100=>array(59,-208,692,800),8101=>array(59,-208,692,800),8102=>array(59,-208,692,928),8103=>array(59,-208,692,928),8104=>array(3,-208,688,797),8105=>array(3,-208,725,797),8106=>array(2,-208,946,800),8107=>array(2,-208,952,800),8108=>array(3,-208,817,800),8109=>array(2,-208,841,800),8110=>array(3,-208,795,928),8111=>array(1,-208,823,928),8112=>array(49,-12,550,785),8113=>array(49,-12,550,745),8114=>array(49,-208,550,800),8115=>array(49,-208,550,559),8116=>array(49,-208,550,800),8118=>array(49,-12,550,777),8119=>array(49,-208,550,777),8120=>array(7,0,608,928),8121=>array(7,0,608,899),8122=>array(-2,0,637,800),8123=>array(7,0,608,800),8124=>array(7,-208,608,729),8125=>array(171,595,278,797),8126=>array(192,-208,290,-45),8127=>array(171,595,278,797),8128=>array(80,639,370,777),8129=>array(80,659,370,928),8130=>array(82,-208,494,800),8131=>array(82,-208,494,560),8132=>array(82,-208,494,800),8134=>array(82,-208,494,777),8135=>array(82,-208,494,777),8136=>array(-2,0,667,800),8137=>array(-11,0,614,800),8138=>array(-2,0,750,800),8139=>array(-6,0,689,800),8140=>array(88,-208,589,729),8141=>array(60,595,402,800),8142=>array(79,595,403,800),8143=>array(80,595,370,928),8144=>array(-9,0,273,785),8145=>array(-13,0,273,745),8146=>array(-18,0,273,978),8147=>array(2,0,281,978),8150=>array(-13,0,278,777),8151=>array(-12,0,279,928),8152=>array(-5,0,271,928),8153=>array(1,0,264,899),8154=>array(-2,0,339,800),8155=>array(-9,0,280,800),8157=>array(55,595,399,800),8158=>array(65,595,416,800),8159=>array(80,595,370,928),8160=>array(65,-14,469,785),8161=>array(65,-14,469,745),8162=>array(65,-14,469,978),8163=>array(65,-14,469,978),8164=>array(82,-208,522,797),8165=>array(82,-208,522,797),8166=>array(65,-14,469,777),8167=>array(65,-14,469,928),8168=>array(-2,0,552,928),8169=>array(-2,0,552,899),8170=>array(-2,0,763,800),8171=>array(-14,0,739,800),8172=>array(3,0,586,797),8173=>array(75,659,356,978),8174=>array(94,659,374,978),8175=>array(75,617,286,800),8178=>array(59,-208,692,800),8179=>array(59,-208,692,547),8180=>array(59,-208,692,800),8182=>array(59,-14,692,777),8183=>array(59,-208,692,777),8184=>array(-2,-14,796,800),8185=>array(-6,-14,676,800),8186=>array(-2,0,796,800),8187=>array(-17,0,677,800),8188=>array(34,-208,654,738),8189=>array(163,616,374,800),8190=>array(171,595,278,797),8208=>array(44,234,281,314),8209=>array(44,234,281,314),8210=>array(44,239,529,309),8211=>array(44,239,406,309),8212=>array(44,239,856,309),8213=>array(0,239,900,309),8214=>array(114,-236,334,764),8215=>array(-9,-236,459,-9),8216=>array(76,489,206,729),8217=>array(78,499,207,729),8218=>array(76,-116,206,124),8219=>array(78,499,207,729),8220=>array(76,489,386,729),8221=>array(76,489,386,729),8222=>array(76,-116,386,124),8223=>array(76,489,386,729),8224=>array(25,-96,425,729),8225=>array(25,-96,425,729),8226=>array(135,227,396,516),8227=>array(135,188,431,555),8228=>array(104,0,198,124),8229=>array(104,0,497,124),8230=>array(104,0,796,124),8231=>array(97,302,189,426),8240=>array(49,-14,1159,742),8241=>array(49,-14,1513,742),8242=>array(18,547,183,729),8243=>array(18,547,315,729),8244=>array(18,547,447,729),8245=>array(18,547,183,729),8246=>array(18,547,315,729),8247=>array(18,547,447,729),8248=>array(4,-236,300,-30),8249=>array(69,69,276,517),8250=>array(84,69,291,517),8251=>array(85,2,666,725),8252=>array(64,0,373,729),8253=>array(64,0,415,742),8254=>array(-9,686,459,755),8255=>array(-40,-237,763,-60),8256=>array(-40,752,763,929),8257=>array(-38,-236,257,229),8258=>array(26,-29,874,814),8259=>array(97,313,360,421),8260=>array(-165,-14,315,742),8261=>array(77,-132,264,760),8262=>array(77,-132,264,760),8263=>array(32,0,798,742),8264=>array(64,0,595,742),8265=>array(64,0,595,742),8266=>array(44,-123,404,545),8267=>array(104,-96,510,729),8268=>array(95,220,355,509),8269=>array(95,220,355,509),8270=>array(26,-29,423,427),8271=>array(125,-116,254,517),8272=>array(-40,-237,763,929),8273=>array(26,-7,423,929),8274=>array(63,-93,367,729),8275=>array(44,228,856,399),8276=>array(-40,-240,763,-63),8277=>array(137,98,617,631),8278=>array(110,149,417,589),8279=>array(18,547,579,729),8280=>array(157,125,597,613),8281=>array(157,120,597,608),8282=>array(96,0,189,729),8283=>array(44,-138,674,867),8284=>array(49,0,705,729),8285=>array(96,39,189,655),8286=>array(96,8,189,683),8304=>array(38,319,330,742),8305=>array(53,326,105,751),8308=>array(27,326,333,734),8309=>array(44,319,318,734),8310=>array(40,319,332,742),8311=>array(47,326,319,734),8312=>array(39,319,329,742),8313=>array(36,319,328,742),8314=>array(60,326,415,677),8315=>array(60,479,415,525),8316=>array(60,422,415,581),8317=>array(48,252,176,751),8318=>array(45,252,172,751),8319=>array(51,326,312,640),8320=>array(38,-7,330,416),8321=>array(60,0,312,408),8322=>array(41,0,304,416),8323=>array(43,-7,315,416),8324=>array(27,0,333,408),8325=>array(44,-7,318,408),8326=>array(40,-7,332,416),8327=>array(47,0,319,408),8328=>array(39,-7,329,416),8329=>array(36,-7,328,416),8330=>array(60,0,415,351),8331=>array(60,152,415,199),8332=>array(60,96,415,254),8333=>array(48,-74,176,425),8334=>array(45,-74,172,425),8336=>array(34,-8,296,313),8337=>array(31,-8,319,313),8338=>array(31,-8,316,313),8339=>array(51,0,352,306),8340=>array(31,-8,319,313),8341=>array(51,0,312,425),8342=>array(51,0,327,425),8343=>array(53,0,105,425),8344=>array(51,0,504,313),8345=>array(51,0,312,313),8346=>array(51,-117,329,313),8347=>array(51,0,289,322),8348=>array(15,0,209,393),8352=>array(38,0,751,729),8353=>array(50,-44,534,778),8354=>array(42,-14,529,742),8355=>array(58,0,540,729),8356=>array(57,0,493,742),8357=>array(82,-93,800,640),8358=>array(51,0,622,729),8359=>array(88,-14,1103,729),8360=>array(88,-14,923,729),8361=>array(26,0,864,729),8362=>array(42,-14,668,729),8363=>array(49,-156,558,760),8364=>array(0,-14,513,742),8365=>array(18,0,572,729),8366=>array(9,0,564,729),8367=>array(91,-222,1085,742),8368=>array(20,-14,513,742),8369=>array(30,0,521,729),8370=>array(41,-81,528,809),8371=>array(7,0,565,729),8372=>array(51,-14,646,742),8373=>array(72,-147,500,760),8376=>array(9,0,564,729),8377=>array(46,0,527,729),8378=>array(4,2,584,731),8400=>array(-442,635,-23,760),8401=>array(-423,635,-4,760),8406=>array(-423,560,-23,760),8407=>array(-423,560,-23,760),8411=>array(-442,560,-9,758),8412=>array(-527,560,78,758),8417=>array(-423,560,-23,760),8448=>array(29,-24,883,752),8449=>array(29,-24,899,752),8450=>array(50,-14,580,742),8451=>array(85,-14,948,742),8452=>array(-19,0,573,729),8453=>array(26,-24,888,752),8454=>array(26,-24,934,752),8455=>array(72,-14,504,742),8456=>array(48,-146,578,611),8457=>array(85,0,804,742),8459=>array(32,-14,849,748),8460=>array(0,-128,624,731),8461=>array(88,0,677,729),8462=>array(31,0,510,760),8463=>array(40,0,510,760),8464=>array(26,-15,389,742),8465=>array(46,-14,593,742),8466=>array(30,-14,611,743),8467=>array(-13,-14,317,742),8468=>array(14,-14,687,760),8469=>array(87,0,634,729),8470=>array(23,0,873,729),8471=>array(124,0,776,724),8472=>array(48,-221,592,495),8473=>array(88,0,600,729),8474=>array(50,-129,658,742),8475=>array(29,-9,688,774),8476=>array(36,-14,723,743),8477=>array(88,0,697,729),8478=>array(74,0,733,729),8479=>array(88,-107,600,847),8480=>array(114,443,693,730),8481=>array(-2,0,921,547),8482=>array(129,447,706,729),8483=>array(7,-108,608,846),8484=>array(40,0,630,729),8485=>array(39,-213,471,760),8486=>array(34,0,654,738),8487=>array(34,-14,654,724),8488=>array(10,-149,516,783),8489=>array(30,0,229,547),8490=>array(88,0,609,729),8491=>array(7,0,608,928),8492=>array(40,0,661,772),8493=>array(57,-12,587,742),8494=>array(55,-12,714,647),8495=>array(38,-14,492,533),8496=>array(71,-14,509,742),8497=>array(37,-16,683,755),8498=>array(88,0,466,729),8499=>array(25,-28,929,751),8500=>array(45,-12,370,395),8501=>array(45,-14,641,742),8502=>array(-2,-14,588,743),8503=>array(12,-35,366,742),8504=>array(38,-35,532,742),8505=>array(31,0,320,760),8506=>array(40,-21,824,654),8507=>array(66,0,1046,547),8508=>array(16,-8,616,547),8509=>array(0,-194,602,560),8510=>array(88,0,584,729),8511=>array(88,0,676,729),8512=>array(11,-192,712,719),8513=>array(71,-14,645,742),8514=>array(3,0,412,729),8515=>array(3,0,412,729),8516=>array(-2,0,552,729),8517=>array(38,0,708,729),8518=>array(40,-14,639,760),8519=>array(40,-14,515,560),8520=>array(35,0,282,760),8521=>array(-103,-208,282,760),8523=>array(26,-14,644,742),8526=>array(35,0,397,547),8528=>array(60,-14,830,742),8529=>array(60,-14,839,742),8530=>array(60,-14,1202,742),8531=>array(60,-14,826,742),8532=>array(41,-14,826,742),8533=>array(60,-14,829,742),8534=>array(41,-14,829,742),8535=>array(43,-14,829,742),8536=>array(27,-14,829,742),8537=>array(60,-14,843,742),8538=>array(44,-14,843,742),8539=>array(60,-14,840,742),8540=>array(43,-14,840,742),8541=>array(44,-14,840,742),8542=>array(47,-14,840,742),8543=>array(60,-14,676,742),8544=>array(88,0,177,729),8545=>array(88,0,355,729),8546=>array(88,0,532,729),8547=>array(88,0,823,729),8548=>array(7,0,608,729),8549=>array(7,0,742,729),8550=>array(7,0,919,729),8551=>array(7,0,1097,729),8552=>array(88,0,798,729),8553=>array(26,0,589,729),8554=>array(26,0,751,729),8555=>array(26,0,929,729),8556=>array(88,0,497,729),8557=>array(50,-14,580,742),8558=>array(88,0,640,729),8559=>array(88,0,689,729),8560=>array(84,0,166,760),8561=>array(84,0,328,760),8562=>array(84,0,489,760),8563=>array(84,0,704,760),8564=>array(26,0,506,547),8565=>array(26,0,646,760),8566=>array(26,0,808,760),8567=>array(26,0,969,760),8568=>array(84,0,708,760),8569=>array(26,0,503,547),8570=>array(26,0,656,760),8571=>array(26,0,817,760),8572=>array(84,0,166,760),8573=>array(49,-14,439,560),8574=>array(49,-14,490,760),8575=>array(82,0,800,560),8576=>array(53,0,1068,729),8577=>array(88,0,640,729),8578=>array(53,0,1068,729),8579=>array(50,-14,580,742),8580=>array(56,-14,445,560),8581=>array(50,-208,580,742),8585=>array(38,-14,826,742),8592=>array(44,100,703,527),8593=>array(184,0,569,732),8594=>array(51,100,710,527),8595=>array(184,-3,569,729),8596=>array(44,100,710,527),8597=>array(184,-8,569,732),8598=>array(126,25,633,587),8599=>array(126,25,633,587),8600=>array(126,25,633,587),8601=>array(126,25,633,587),8602=>array(44,100,703,527),8603=>array(51,100,710,527),8604=>array(19,103,745,414),8605=>array(9,103,735,414),8606=>array(44,100,703,527),8607=>array(185,0,570,732),8608=>array(51,100,710,527),8609=>array(185,-3,570,729),8610=>array(44,100,703,527),8611=>array(51,100,710,527),8612=>array(44,100,703,527),8613=>array(185,0,569,732),8614=>array(51,100,710,527),8615=>array(185,-3,569,729),8616=>array(185,0,569,732),8617=>array(44,100,703,565),8618=>array(52,100,710,565),8619=>array(44,100,703,565),8620=>array(52,100,710,565),8621=>array(44,100,710,527),8622=>array(44,93,710,534),8623=>array(131,-2,632,730),8624=>array(152,0,567,743),8625=>array(188,0,603,743),8626=>array(152,-14,567,729),8627=>array(188,-14,603,729),8628=>array(209,-3,684,604),8629=>array(44,100,590,626),8630=>array(20,203,720,668),8631=>array(35,203,734,668),8632=>array(97,25,709,729),8633=>array(49,-46,705,673),8634=>array(92,62,686,680),8635=>array(69,62,663,680),8636=>array(44,272,703,527),8637=>array(44,100,703,355),8638=>array(339,0,569,732),8639=>array(184,0,415,732),8640=>array(51,272,710,527),8641=>array(51,100,710,355),8642=>array(339,0,569,732),8643=>array(184,0,415,732),8644=>array(44,-47,710,674),8645=>array(52,-3,701,732),8646=>array(44,-47,710,674),8647=>array(44,-47,703,674),8648=>array(53,0,702,732),8649=>array(52,-47,711,674),8650=>array(53,-3,702,729),8651=>array(44,7,710,620),8652=>array(44,7,710,620),8653=>array(44,100,703,527),8654=>array(44,94,710,533),8655=>array(51,100,710,527),8656=>array(44,100,703,527),8657=>array(185,0,570,732),8658=>array(51,100,710,527),8659=>array(185,-3,570,729),8660=>array(44,100,710,527),8661=>array(185,-8,570,732),8662=>array(126,-23,677,587),8663=>array(83,-23,633,587),8664=>array(83,25,633,636),8665=>array(126,25,677,636),8666=>array(44,100,703,527),8667=>array(51,100,710,527),8668=>array(44,100,703,527),8669=>array(51,100,710,527),8670=>array(184,0,569,732),8671=>array(184,-3,569,729),8672=>array(44,100,703,527),8673=>array(184,0,570,732),8674=>array(51,100,710,527),8675=>array(184,-3,570,729),8676=>array(47,99,703,528),8677=>array(51,99,708,528),8678=>array(24,65,703,562),8679=>array(154,0,601,754),8680=>array(31,65,710,562),8681=>array(154,-25,601,729),8682=>array(154,0,601,754),8683=>array(154,0,601,754),8684=>array(141,0,614,754),8685=>array(154,0,601,754),8686=>array(154,0,601,754),8687=>array(154,0,601,754),8688=>array(51,65,730,562),8689=>array(53,0,709,729),8690=>array(53,0,709,729),8691=>array(154,-25,601,754),8692=>array(51,100,710,527),8693=>array(52,-3,701,732),8694=>array(51,-193,710,820),8695=>array(44,94,703,533),8696=>array(51,94,710,533),8697=>array(44,94,710,533),8698=>array(44,94,703,533),8699=>array(51,94,710,533),8700=>array(44,94,710,533),8701=>array(24,96,703,531),8702=>array(51,96,730,531),8703=>array(24,96,730,531),8704=>array(7,0,608,729),8705=>array(59,-14,499,742),8706=>array(42,-14,424,662),8707=>array(88,0,511,729),8708=>array(88,-46,511,776),8709=>array(68,-10,716,710),8710=>array(-3,0,605,719),8711=>array(-3,0,605,719),8712=>array(77,-10,708,710),8713=>array(77,-138,708,835),8714=>array(95,76,551,550),8715=>array(77,-10,708,710),8716=>array(77,-138,708,835),8717=>array(95,76,551,550),8718=>array(132,0,441,485),8719=>array(68,-192,612,719),8720=>array(68,-192,612,719),8721=>array(11,-192,589,719),8722=>array(95,272,659,355),8723=>array(95,0,659,627),8724=>array(95,0,659,729),8725=>array(0,-93,303,729),8726=>array(173,-54,477,768),8727=>array(115,0,640,627),8728=>array(142,160,421,470),8729=>array(151,168,413,458),8730=>array(26,-20,574,811),8731=>array(26,-20,574,933),8732=>array(26,-20,574,924),8733=>array(97,112,546,487),8734=>array(97,112,653,487),8735=>array(124,99,630,661),8736=>array(77,0,708,729),8737=>array(77,-53,708,729),8738=>array(104,-3,659,727),8739=>array(189,-214,260,771),8740=>array(44,-214,406,771),8741=>array(119,-214,331,771),8742=>array(44,-214,406,771),8743=>array(116,0,543,579),8744=>array(116,0,543,579),8745=>array(116,0,543,579),8746=>array(116,0,543,579),8747=>array(51,-212,417,757),8748=>array(51,-212,659,757),8749=>array(51,-212,900,757),8750=>array(51,-212,417,757),8751=>array(51,-212,659,757),8752=>array(51,-212,900,757),8753=>array(51,-213,470,757),8754=>array(51,-212,463,757),8755=>array(51,-212,464,757),8756=>array(53,100,520,604),8757=>array(53,100,520,604),8758=>array(70,100,164,604),8759=>array(53,100,520,604),8760=>array(95,272,659,552),8761=>array(95,78,659,552),8762=>array(95,78,659,552),8763=>array(95,78,659,552),8764=>array(95,228,659,399),8765=>array(95,228,659,399),8766=>array(71,149,683,479),8767=>array(95,42,659,584),8768=>array(91,0,246,626),8769=>array(95,77,659,553),8770=>array(95,133,659,454),8771=>array(95,172,659,494),8772=>array(95,48,659,603),8773=>array(95,90,659,594),8774=>array(95,12,659,594),8775=>array(95,-5,659,657),8776=>array(95,133,659,494),8777=>array(95,2,659,625),8778=>array(95,90,659,598),8779=>array(95,59,659,602),8780=>array(95,90,659,594),8781=>array(95,105,659,521),8782=>array(95,26,659,601),8783=>array(95,172,659,601),8784=>array(95,172,659,625),8785=>array(95,1,659,625),8786=>array(95,2,660,625),8787=>array(95,2,660,625),8788=>array(91,151,810,476),8789=>array(90,151,810,475),8790=>array(95,172,659,454),8791=>array(95,172,659,760),8792=>array(95,172,659,662),8793=>array(95,172,659,812),8794=>array(95,172,659,812),8795=>array(95,172,659,849),8796=>array(95,172,659,854),8797=>array(95,172,659,764),8798=>array(95,172,659,760),8799=>array(95,172,659,856),8800=>array(95,19,659,608),8801=>array(95,90,659,537),8802=>array(95,-24,659,650),8803=>array(95,0,659,629),8804=>array(95,0,659,582),8805=>array(95,0,659,582),8806=>array(96,-83,659,638),8807=>array(96,-83,659,638),8808=>array(96,-164,659,638),8809=>array(96,-164,659,638),8810=>array(65,22,877,609),8811=>array(65,22,877,609),8812=>array(77,-132,340,759),8813=>array(95,13,659,613),8814=>array(95,2,659,674),8815=>array(95,-47,659,625),8816=>array(95,-102,659,667),8817=>array(95,-102,659,667),8818=>array(95,-55,659,582),8819=>array(96,-39,659,582),8820=>array(95,-105,659,664),8821=>array(95,-102,659,667),8822=>array(91,-87,659,686),8823=>array(91,-87,659,686),8824=>array(91,-197,659,797),8825=>array(91,-197,659,797),8826=>array(95,-38,659,664),8827=>array(95,-38,659,664),8828=>array(95,-105,659,667),8829=>array(95,-105,659,667),8830=>array(95,-85,659,667),8831=>array(95,-85,659,667),8832=>array(95,-61,659,764),8833=>array(95,-138,659,687),8834=>array(89,80,665,546),8835=>array(89,80,665,546),8836=>array(89,-96,665,726),8837=>array(89,-100,665,722),8838=>array(83,0,659,613),8839=>array(95,0,671,613),8840=>array(83,-116,659,730),8841=>array(95,-116,671,730),8842=>array(83,-73,659,614),8843=>array(83,-73,659,614),8844=>array(116,0,543,579),8845=>array(116,0,543,579),8846=>array(116,2,543,582),8847=>array(95,0,659,568),8848=>array(95,0,659,568),8849=>array(95,-83,659,630),8850=>array(95,-83,659,630),8851=>array(95,0,607,626),8852=>array(95,0,607,626),8853=>array(82,-14,672,643),8854=>array(82,-14,672,643),8855=>array(82,-14,672,643),8856=>array(82,-14,672,643),8857=>array(82,-14,672,643),8858=>array(82,-14,672,643),8859=>array(82,-14,672,643),8860=>array(82,-14,672,643),8861=>array(82,-14,672,643),8862=>array(82,-14,672,643),8863=>array(82,-14,672,643),8864=>array(82,-14,672,643),8865=>array(82,-14,672,643),8866=>array(77,0,708,700),8867=>array(77,0,708,700),8868=>array(77,0,708,700),8869=>array(77,0,708,700),8870=>array(77,0,392,700),8871=>array(77,0,392,700),8872=>array(77,0,708,700),8873=>array(77,0,708,700),8874=>array(77,0,708,700),8875=>array(77,0,708,700),8876=>array(77,-40,708,740),8877=>array(77,-40,708,740),8878=>array(77,-40,708,740),8879=>array(77,-40,708,740),8880=>array(95,-43,652,670),8881=>array(95,-43,652,670),8882=>array(95,15,659,612),8883=>array(95,15,659,612),8884=>array(95,-48,659,674),8885=>array(95,-48,659,674),8886=>array(53,175,847,454),8887=>array(53,175,847,454),8888=>array(43,175,711,454),8889=>array(53,-47,701,674),8890=>array(104,0,364,701),8891=>array(88,0,571,740),8892=>array(88,0,571,740),8893=>array(88,0,571,740),8894=>array(124,0,630,562),8895=>array(124,0,630,562),8896=>array(-3,-192,741,719),8897=>array(-3,-192,741,719),8898=>array(62,-192,677,719),8899=>array(62,-192,677,719),8900=>array(2,-233,442,807),8901=>array(96,285,189,409),8902=>array(109,149,454,512),8903=>array(95,15,659,613),8904=>array(95,-30,805,657),8905=>array(95,-30,805,657),8906=>array(95,-30,805,657),8907=>array(95,-30,805,657),8908=>array(95,-30,805,657),8909=>array(95,172,659,494),8910=>array(43,0,616,579),8911=>array(43,0,616,579),8912=>array(83,-3,659,630),8913=>array(95,-3,671,630),8914=>array(92,0,662,663),8915=>array(92,-14,662,649),8916=>array(167,0,587,729),8917=>array(95,-100,659,729),8918=>array(95,46,659,581),8919=>array(95,46,659,581),8920=>array(65,22,1215,609),8921=>array(65,22,1215,609),8922=>array(95,-228,659,854),8923=>array(95,-228,659,854),8924=>array(95,0,659,582),8925=>array(95,0,659,582),8926=>array(95,-105,659,667),8927=>array(95,-105,659,667),8928=>array(95,-178,659,764),8929=>array(95,-178,659,764),8930=>array(95,-141,659,767),8931=>array(95,-141,659,767),8932=>array(95,-94,659,619),8933=>array(95,-94,659,619),8934=>array(95,-138,659,582),8935=>array(95,-138,659,582),8936=>array(95,-169,659,667),8937=>array(99,-171,663,667),8938=>array(95,-130,659,756),8939=>array(95,-130,659,756),8940=>array(95,-189,659,815),8941=>array(93,-189,657,815),8942=>array(403,-93,497,715),8943=>array(104,249,796,373),8944=>array(104,-93,796,715),8945=>array(104,-93,796,715),8946=>array(39,-10,861,710),8947=>array(77,-10,708,710),8948=>array(95,76,551,550),8949=>array(77,-10,708,910),8950=>array(77,-10,708,853),8951=>array(95,76,551,686),8952=>array(77,-144,708,710),8953=>array(77,-10,708,710),8954=>array(39,-10,861,710),8955=>array(77,-10,708,710),8956=>array(95,76,551,550),8957=>array(77,-10,708,853),8958=>array(95,76,551,686),8959=>array(95,0,689,720),8960=>array(32,-18,510,514),8961=>array(50,162,486,443),8962=>array(64,0,507,596),8963=>array(184,481,569,732),8964=>array(184,0,569,251),8965=>array(184,0,569,406),8966=>array(184,0,569,513),8967=>array(138,-29,301,788),8968=>array(77,-132,264,760),8969=>array(87,-132,274,760),8970=>array(77,-132,264,760),8971=>array(87,-132,274,760),8972=>array(332,-77,684,313),8973=>array(44,-77,396,313),8974=>array(332,243,684,634),8975=>array(44,243,396,634),8976=>array(95,140,659,421),8977=>array(2,126,459,634),8984=>array(108,0,792,759),8985=>array(95,140,659,421),8988=>array(77,425,363,760),8989=>array(59,425,345,760),8990=>array(77,-70,363,264),8991=>array(59,-70,345,264),8992=>array(189,-250,448,928),8993=>array(18,-237,277,942),8996=>array(68,227,969,575),8997=>array(68,0,969,575),8998=>array(68,0,1272,760),8999=>array(68,0,969,760),9000=>array(53,0,1247,729),9003=>array(0,0,1204,760),9004=>array(66,-91,720,748),9075=>array(73,0,273,547),9076=>array(82,-208,522,560),9077=>array(59,-14,692,547),9082=>array(49,-12,550,559),9085=>array(11,-228,670,102),9095=>array(68,0,987,748),9108=>array(15,0,771,727),9115=>array(77,-252,373,946),9116=>array(77,-252,163,942),9117=>array(77,-240,373,942),9118=>array(77,-252,373,946),9119=>array(287,-252,373,942),9120=>array(77,-240,373,942),9121=>array(77,-252,373,928),9122=>array(77,-252,163,942),9123=>array(77,-240,373,942),9124=>array(77,-252,373,928),9125=>array(287,-252,373,935),9126=>array(77,-240,373,935),9127=>array(296,-261,602,928),9128=>array(74,-252,378,940),9129=>array(296,-240,602,940),9130=>array(296,-256,378,943),9131=>array(74,-261,378,928),9132=>array(296,-252,602,940),9133=>array(74,-240,378,940),9134=>array(189,-250,277,942),9166=>array(24,65,703,729),9167=>array(82,0,769,596),9187=>array(66,-91,720,748),9189=>array(2,75,690,444),9192=>array(39,-129,541,294),9250=>array(-56,-14,522,760),9251=>array(64,-228,507,102),9312=>array(66,-10,740,738),9313=>array(66,-10,740,738),9314=>array(66,-10,740,738),9315=>array(66,-10,740,738),9316=>array(66,-10,740,738),9317=>array(66,-10,740,738),9318=>array(66,-10,740,738),9319=>array(66,-10,740,738),9320=>array(66,-10,740,738),9321=>array(66,-10,740,738),9472=>array(-9,242,551,326),9473=>array(-9,200,551,368),9474=>array(235,-302,306,973),9475=>array(200,-302,341,973),9476=>array(-9,242,551,326),9477=>array(-9,200,551,368),9478=>array(235,-302,306,973),9479=>array(200,-302,341,973),9480=>array(-9,242,551,326),9481=>array(-9,200,551,368),9482=>array(235,-302,306,973),9483=>array(200,-302,341,973),9484=>array(235,-302,551,326),9485=>array(235,-302,551,368),9486=>array(200,-302,551,326),9487=>array(200,-302,551,368),9488=>array(-9,-302,306,326),9489=>array(-9,-302,306,368),9490=>array(-9,-302,341,326),9491=>array(-9,-302,341,368),9492=>array(235,242,551,973),9493=>array(235,200,551,973),9494=>array(200,242,551,973),9495=>array(200,200,551,973),9496=>array(-9,242,306,973),9497=>array(-9,200,306,973),9498=>array(-9,242,341,973),9499=>array(-9,200,341,973),9500=>array(235,-302,551,973),9501=>array(235,-302,551,973),9502=>array(200,-302,551,973),9503=>array(200,-302,551,973),9504=>array(200,-302,551,973),9505=>array(200,-302,551,973),9506=>array(200,-302,551,973),9507=>array(200,-302,551,973),9508=>array(-9,-302,306,973),9509=>array(-9,-302,306,973),9510=>array(-9,-302,341,973),9511=>array(-9,-302,341,973),9512=>array(-9,-302,341,973),9513=>array(-9,-302,341,973),9514=>array(-9,-302,341,973),9515=>array(-9,-302,341,973),9516=>array(-9,-302,551,326),9517=>array(-9,-302,551,368),9518=>array(-9,-302,551,368),9519=>array(-9,-302,551,368),9520=>array(-9,-302,551,326),9521=>array(-9,-302,551,368),9522=>array(-9,-302,551,368),9523=>array(-9,-302,551,368),9524=>array(-9,242,551,973),9525=>array(-9,200,551,973),9526=>array(-9,200,551,973),9527=>array(-9,200,551,973),9528=>array(-9,242,551,973),9529=>array(-9,200,551,973),9530=>array(-9,200,551,973),9531=>array(-9,200,551,973),9532=>array(-9,-302,551,973),9533=>array(-9,-302,551,973),9534=>array(-9,-302,551,973),9535=>array(-9,-302,551,973),9536=>array(-9,-302,551,973),9537=>array(-9,-302,551,973),9538=>array(-9,-302,551,973),9539=>array(-9,-302,551,973),9540=>array(-9,-302,551,973),9541=>array(-9,-302,551,973),9542=>array(-9,-302,551,973),9543=>array(-9,-302,551,973),9544=>array(-9,-302,551,973),9545=>array(-9,-302,551,973),9546=>array(-9,-302,551,973),9547=>array(-9,-302,551,973),9548=>array(-9,242,551,326),9549=>array(-9,200,551,368),9550=>array(235,-302,306,973),9551=>array(200,-302,341,973),9552=>array(-9,158,551,410),9553=>array(165,-302,376,973),9554=>array(235,-302,551,410),9555=>array(165,-302,551,326),9556=>array(165,-302,551,410),9557=>array(-9,-302,306,410),9558=>array(-9,-302,376,326),9559=>array(-9,-302,376,410),9560=>array(235,158,551,973),9561=>array(165,242,551,973),9562=>array(165,158,551,973),9563=>array(-9,158,306,973),9564=>array(-9,242,376,973),9565=>array(-9,158,376,973),9566=>array(235,-302,551,973),9567=>array(165,-302,551,973),9568=>array(165,-302,551,973),9569=>array(-9,-302,306,973),9570=>array(-9,-302,376,973),9571=>array(-9,-302,376,973),9572=>array(-9,-302,551,410),9573=>array(-9,-302,551,326),9574=>array(-9,-302,551,410),9575=>array(-9,158,551,973),9576=>array(-9,242,551,973),9577=>array(-9,158,551,973),9578=>array(-9,-302,551,973),9579=>array(-9,-302,551,973),9580=>array(-9,-302,551,973),9581=>array(235,-302,551,326),9582=>array(-9,-302,306,326),9583=>array(-9,242,306,973),9584=>array(235,242,551,973),9585=>array(-48,-302,590,973),9586=>array(-48,-302,590,973),9587=>array(-48,-302,590,973),9588=>array(-9,242,280,326),9589=>array(235,284,306,973),9590=>array(279,242,551,326),9591=>array(235,-302,306,284),9592=>array(-9,200,280,368),9593=>array(200,284,341,973),9594=>array(279,200,551,368),9595=>array(200,-302,341,284),9596=>array(-9,200,551,368),9597=>array(200,-302,341,973),9598=>array(-9,200,551,368),9599=>array(200,-302,341,973),9600=>array(-9,260,701,770),9601=>array(-9,-250,701,-123),9602=>array(-9,-250,701,-5),9603=>array(-9,-250,701,132),9604=>array(-9,-250,701,260),9605=>array(-9,-250,701,387),9606=>array(-9,-250,701,515),9607=>array(-9,-250,701,642),9608=>array(-9,-250,701,770),9609=>array(-9,-250,612,770),9610=>array(-9,-250,523,770),9611=>array(-9,-250,435,770),9612=>array(-9,-250,346,770),9613=>array(-9,-250,257,770),9614=>array(-9,-250,168,770),9615=>array(-9,-250,80,770),9616=>array(346,-250,701,770),9617=>array(-9,-250,612,770),9618=>array(-9,-250,698,770),9619=>array(-9,-250,701,770),9620=>array(-9,642,701,770),9621=>array(612,-250,701,770),9622=>array(-9,-250,347,260),9623=>array(346,-250,701,260),9624=>array(-9,260,347,770),9625=>array(-9,-250,701,770),9626=>array(-9,-250,701,770),9627=>array(-9,-250,701,770),9628=>array(-9,-250,701,770),9629=>array(346,260,701,770),9630=>array(-9,-250,701,770),9631=>array(-9,-250,701,770),9632=>array(82,-123,769,643),9633=>array(82,-123,769,643),9634=>array(82,-123,769,643),9635=>array(82,-123,769,643),9636=>array(82,-123,769,643),9637=>array(82,-123,769,643),9638=>array(82,-123,769,643),9639=>array(82,-123,769,643),9640=>array(82,-123,769,643),9641=>array(82,-123,769,643),9642=>array(82,11,528,509),9643=>array(82,11,528,509),9644=>array(82,75,769,444),9645=>array(82,75,769,444),9646=>array(82,-122,414,642),9647=>array(82,-122,414,642),9648=>array(2,75,690,444),9649=>array(2,75,690,444),9650=>array(2,-123,690,643),9651=>array(2,-123,690,643),9652=>array(2,11,449,509),9653=>array(2,11,449,509),9654=>array(2,-123,690,643),9655=>array(2,-123,690,643),9656=>array(2,11,449,509),9657=>array(2,11,449,509),9658=>array(2,11,690,509),9659=>array(2,11,690,509),9660=>array(2,-123,690,643),9661=>array(2,-123,690,643),9662=>array(2,11,449,509),9663=>array(2,11,449,509),9664=>array(2,-123,690,643),9665=>array(2,-123,690,643),9666=>array(2,11,449,509),9667=>array(2,11,449,509),9668=>array(2,11,690,509),9669=>array(2,11,690,509),9670=>array(2,-123,690,643),9671=>array(2,-123,690,643),9672=>array(2,-123,690,643),9673=>array(49,-125,736,645),9674=>array(2,-233,442,807),9675=>array(49,-125,736,645),9676=>array(50,-125,735,644),9677=>array(49,-125,736,645),9678=>array(49,-125,736,645),9679=>array(49,-123,736,641),9680=>array(49,-123,736,641),9681=>array(49,-123,736,641),9682=>array(49,-123,736,641),9683=>array(49,-123,736,641),9684=>array(49,-123,736,641),9685=>array(49,-123,736,641),9686=>array(49,-125,393,645),9687=>array(82,-125,425,645),9688=>array(82,-10,630,770),9689=>array(82,-250,792,770),9690=>array(82,260,792,770),9691=>array(82,-250,792,260),9692=>array(2,260,346,645),9693=>array(2,260,346,645),9694=>array(2,-125,346,260),9695=>array(2,-125,346,260),9696=>array(49,260,736,645),9697=>array(49,-125,736,260),9698=>array(2,-123,690,643),9699=>array(2,-123,690,643),9700=>array(2,-123,690,643),9701=>array(2,-123,690,643),9702=>array(135,227,396,516),9703=>array(82,-123,769,643),9704=>array(82,-123,769,643),9705=>array(82,-123,769,643),9706=>array(82,-123,769,643),9707=>array(82,-123,769,643),9708=>array(2,-123,690,643),9709=>array(2,-123,690,643),9710=>array(2,-123,690,643),9711=>array(49,-250,958,770),9712=>array(82,-123,769,643),9713=>array(82,-123,769,643),9714=>array(82,-123,769,643),9715=>array(82,-123,769,643),9716=>array(49,-123,736,641),9717=>array(49,-123,736,641),9718=>array(49,-123,736,641),9719=>array(49,-123,736,641),9720=>array(2,-123,690,643),9721=>array(2,-123,690,643),9722=>array(2,-123,690,643),9723=>array(82,-66,666,585),9724=>array(82,-66,666,585),9725=>array(82,-17,578,537),9726=>array(82,-17,578,537),9727=>array(2,-123,690,643),9728=>array(75,0,731,729),9729=>array(45,-2,854,360),9730=>array(44,0,763,729),9731=>array(75,-0,732,927),9732=>array(57,0,750,880),9733=>array(58,-4,749,723),9734=>array(58,-4,749,723),9735=>array(75,2,441,729),9736=>array(75,0,732,731),9737=>array(75,0,732,730),9738=>array(55,0,745,727),9739=>array(55,0,745,723),9740=>array(55,-1,549,722),9741=>array(55,0,857,723),9742=>array(62,0,1060,729),9743=>array(63,0,1062,729),9744=>array(81,0,727,729),9745=>array(80,0,727,729),9746=>array(80,0,727,729),9747=>array(67,78,411,656),9748=>array(44,0,783,933),9749=>array(66,0,740,731),9750=>array(75,0,732,731),9751=>array(75,0,732,727),9752=>array(70,0,737,729),9753=>array(75,140,732,574),9754=>array(75,113,732,569),9755=>array(75,113,732,569),9756=>array(78,104,729,569),9757=>array(64,0,483,724),9758=>array(78,103,729,569),9759=>array(64,-3,483,720),9760=>array(55,0,752,730),9761=>array(75,0,732,730),9762=>array(75,0,732,730),9763=>array(44,0,763,730),9764=>array(44,-2,558,727),9765=>array(75,0,597,731),9766=>array(75,-1,510,731),9767=>array(75,0,631,911),9768=>array(75,0,416,730),9769=>array(75,-1,732,729),9770=>array(78,0,729,730),9771=>array(75,0,733,731),9772=>array(75,0,565,731),9773=>array(75,0,732,730),9774=>array(75,0,732,730),9775=>array(75,0,732,730),9776=>array(75,0,732,729),9777=>array(75,0,733,729),9778=>array(75,0,732,729),9779=>array(75,0,732,729),9780=>array(75,0,732,729),9781=>array(75,0,732,729),9782=>array(75,0,732,729),9783=>array(75,0,732,729),9784=>array(59,-11,748,735),9785=>array(75,-73,864,804),9786=>array(75,-73,864,804),9787=>array(75,-73,864,804),9788=>array(75,0,732,730),9789=>array(322,0,733,730),9790=>array(75,0,485,730),9791=>array(77,-102,476,732),9792=>array(77,-125,583,731),9793=>array(77,-14,583,843),9794=>array(71,-14,748,720),9795=>array(149,0,657,730),9796=>array(197,0,609,730),9797=>array(109,0,697,730),9798=>array(114,0,692,730),9799=>array(216,0,590,730),9800=>array(41,0,766,731),9801=>array(80,0,727,730),9802=>array(84,0,722,731),9803=>array(101,31,706,679),9804=>array(125,0,681,730),9805=>array(48,-180,759,730),9806=>array(75,52,732,653),9807=>array(30,-96,777,730),9808=>array(74,-0,732,730),9809=>array(84,0,722,730),9810=>array(77,153,729,579),9811=>array(141,0,666,730),9812=>array(88,0,719,730),9813=>array(99,0,708,730),9814=>array(149,-1,657,729),9815=>array(192,0,615,730),9816=>array(148,0,659,730),9817=>array(133,-0,673,730),9818=>array(88,0,719,730),9819=>array(99,0,708,730),9820=>array(149,-1,657,729),9821=>array(192,0,615,730),9822=>array(146,0,661,730),9823=>array(133,-0,673,730),9824=>array(142,0,665,729),9825=>array(81,0,726,727),9826=>array(151,0,655,729),9827=>array(100,0,707,729),9828=>array(141,0,666,729),9829=>array(80,0,728,729),9830=>array(151,0,655,729),9831=>array(100,0,707,732),9832=>array(95,-1,712,729),9833=>array(75,-5,306,729),9834=>array(75,-5,499,729),9835=>array(165,-102,642,729),9836=>array(83,-5,724,729),9837=>array(79,-3,353,731),9838=>array(75,0,246,731),9839=>array(76,0,360,731),9840=>array(75,0,598,731),9841=>array(58,0,631,731),9842=>array(75,0,732,709),9843=>array(68,16,738,731),9844=>array(68,16,738,731),9845=>array(68,16,738,731),9846=>array(68,16,738,731),9847=>array(68,16,738,731),9848=>array(68,16,738,731),9849=>array(68,16,738,731),9850=>array(68,16,738,731),9851=>array(75,0,731,704),9852=>array(75,0,733,731),9853=>array(75,0,733,731),9854=>array(75,0,733,731),9855=>array(134,1,672,731),9856=>array(66,0,717,725),9857=>array(66,0,717,725),9858=>array(66,0,717,725),9859=>array(66,0,717,725),9860=>array(66,0,717,725),9861=>array(66,0,717,725),9862=>array(75,0,732,731),9863=>array(75,0,732,731),9864=>array(75,0,732,731),9865=>array(75,0,732,731),9866=>array(75,0,732,98),9867=>array(75,0,732,98),9868=>array(75,0,732,413),9869=>array(75,0,732,413),9870=>array(75,0,732,413),9871=>array(75,0,732,413),9872=>array(151,3,655,731),9873=>array(151,3,655,731),9874=>array(46,0,760,731),9875=>array(87,-10,720,732),9876=>array(118,0,689,729),9877=>array(55,-10,431,732),9878=>array(53,-10,753,732),9879=>array(55,0,751,732),9880=>array(130,0,676,732),9881=>array(85,-17,722,727),9882=>array(115,-9,691,733),9883=>array(114,0,692,728),9884=>array(114,0,692,729),9888=>array(44,0,763,729),9889=>array(75,2,558,730),9890=>array(77,-125,827,731),9891=>array(71,-206,921,720),9892=>array(77,-186,998,856),9893=>array(77,-125,753,917),9894=>array(118,-14,654,869),9895=>array(91,-170,667,884),9896=>array(168,-14,585,869),9897=>array(4,133,746,596),9898=>array(168,133,586,596),9899=>array(168,133,586,596),9900=>array(222,194,532,537),9901=>array(156,194,598,537),9902=>array(37,169,717,560),9903=>array(4,194,750,536),9904=>array(92,237,681,540),9905=>array(190,42,564,698),9906=>array(77,-125,583,731),9907=>array(151,-125,582,731),9908=>array(77,-125,582,731),9909=>array(77,-125,582,731),9910=>array(53,-118,712,643),9911=>array(175,-104,536,710),9912=>array(142,-125,489,731),9920=>array(38,4,716,553),9921=>array(38,4,716,724),9922=>array(38,4,716,553),9923=>array(38,4,716,724),9954=>array(77,-14,583,843),9985=>array(9,190,723,635),9986=>array(38,141,706,588),9987=>array(9,94,723,539),9988=>array(32,119,742,613),9990=>array(38,-14,716,742),9991=>array(38,-14,716,742),9992=>array(53,21,704,708),9993=>array(58,107,696,622),9996=>array(191,0,505,742),9997=>array(19,83,722,678),9998=>array(80,75,652,710),9999=>array(23,198,738,530),10000=>array(80,75,652,710),10001=>array(39,185,681,544),10002=>array(61,209,681,520),10003=>array(135,97,601,630),10004=>array(104,87,649,631),10005=>array(114,72,641,657),10006=>array(77,31,677,698),10007=>array(105,-9,631,732),10008=>array(110,0,679,739),10009=>array(49,0,705,729),10010=>array(49,0,705,729),10011=>array(49,0,705,729),10012=>array(49,0,705,729),10013=>array(148,0,606,729),10014=>array(118,0,610,729),10015=>array(140,0,615,729),10016=>array(49,0,705,729),10017=>array(82,-13,672,744),10018=>array(37,-14,717,742),10019=>array(38,-12,716,742),10020=>array(36,-14,718,742),10021=>array(37,-13,717,743),10022=>array(38,-14,717,745),10023=>array(38,-14,717,745),10025=>array(21,-10,734,744),10026=>array(38,-14,716,742),10027=>array(21,-9,733,743),10028=>array(21,-10,734,744),10029=>array(21,-9,733,743),10030=>array(21,-9,733,743),10031=>array(21,-9,733,743),10032=>array(22,12,734,714),10033=>array(58,0,696,729),10034=>array(66,0,688,729),10035=>array(49,0,705,729),10036=>array(28,-14,708,742),10037=>array(37,-14,717,742),10038=>array(82,-14,672,742),10039=>array(37,-14,717,742),10040=>array(37,-14,717,742),10041=>array(37,-14,717,742),10042=>array(49,0,705,729),10043=>array(73,-14,681,742),10044=>array(73,-14,681,742),10045=>array(70,-14,683,742),10046=>array(70,-14,683,742),10047=>array(48,0,706,709),10048=>array(48,0,706,709),10049=>array(37,-14,717,742),10050=>array(38,-14,716,742),10051=>array(70,-14,683,742),10052=>array(80,0,674,729),10053=>array(68,0,686,729),10054=>array(57,2,696,729),10055=>array(70,-13,684,742),10056=>array(42,-13,712,730),10057=>array(42,-13,712,730),10058=>array(37,-13,717,743),10059=>array(37,-13,717,743),10061=>array(44,-10,762,738),10063=>array(53,-49,753,729),10064=>array(53,0,753,777),10065=>array(53,-49,753,729),10066=>array(53,0,753,777),10070=>array(75,-2,732,728),10072=>array(339,-240,415,760),10073=>array(302,-240,452,760),10074=>array(228,-240,527,760),10075=>array(76,395,237,729),10076=>array(53,395,214,729),10077=>array(76,395,432,729),10078=>array(53,395,408,729),10081=>array(140,-93,695,851),10082=>array(182,-17,572,742),10083=>array(146,-17,607,742),10084=>array(48,83,706,645),10085=>array(151,-1,656,729),10086=>array(55,21,652,702),10087=>array(70,169,684,564),10088=>array(176,-139,583,769),10089=>array(176,-139,583,769),10090=>array(237,-132,517,758),10091=>array(237,-132,517,758),10092=>array(193,-240,546,760),10093=>array(208,-240,561,760),10094=>array(127,-240,617,760),10095=>array(137,-240,626,760),10096=>array(149,-240,590,760),10097=>array(165,-240,605,760),10098=>array(311,-241,482,760),10099=>array(272,-241,443,760),10100=>array(157,-163,571,760),10101=>array(183,-163,597,760),10102=>array(66,-10,740,738),10103=>array(66,-10,740,738),10104=>array(66,-10,740,738),10105=>array(66,-10,740,738),10106=>array(66,-10,740,738),10107=>array(66,-10,740,738),10108=>array(66,-10,740,738),10109=>array(66,-10,740,738),10110=>array(66,-10,740,738),10111=>array(66,-10,740,738),10112=>array(4,-52,750,780),10113=>array(4,-52,750,780),10114=>array(4,-52,750,780),10115=>array(4,-52,750,780),10116=>array(4,-52,750,780),10117=>array(4,-52,750,780),10118=>array(4,-52,750,780),10119=>array(4,-52,750,780),10120=>array(4,-52,750,780),10121=>array(4,-52,750,780),10122=>array(4,-52,750,780),10123=>array(4,-52,750,780),10124=>array(4,-52,750,780),10125=>array(4,-52,750,780),10126=>array(4,-52,750,780),10127=>array(4,-52,750,780),10128=>array(4,-52,750,780),10129=>array(4,-52,750,780),10130=>array(4,-52,750,780),10131=>array(4,-52,750,780),10132=>array(51,75,710,552),10136=>array(110,55,614,614),10137=>array(51,100,710,527),10138=>array(110,13,614,572),10139=>array(51,129,710,498),10140=>array(51,57,688,570),10141=>array(51,100,710,527),10142=>array(51,100,710,527),10143=>array(51,100,710,527),10144=>array(51,100,710,527),10145=>array(51,65,730,562),10146=>array(100,94,710,533),10147=>array(100,94,710,533),10148=>array(100,-4,710,631),10149=>array(51,100,710,548),10150=>array(51,79,710,527),10151=>array(216,-7,545,634),10152=>array(51,100,710,527),10153=>array(51,75,688,552),10154=>array(51,75,688,552),10155=>array(19,12,715,586),10156=>array(19,12,715,586),10157=>array(122,0,697,574),10158=>array(122,0,697,574),10159=>array(56,49,719,574),10161=>array(56,49,719,574),10162=>array(139,-20,649,585),10163=>array(57,157,710,470),10164=>array(72,55,614,655),10165=>array(51,173,710,454),10166=>array(73,-29,614,572),10167=>array(73,55,614,655),10168=>array(51,172,710,455),10169=>array(73,-28,614,572),10170=>array(50,84,710,543),10171=>array(66,140,702,487),10172=>array(71,167,697,460),10173=>array(71,118,697,509),10174=>array(51,81,710,546),10181=>array(48,-163,316,769),10182=>array(35,-163,303,769),10208=>array(2,-233,442,807),10214=>array(77,-132,359,760),10215=>array(77,-132,358,760),10216=>array(80,-132,279,759),10217=>array(72,-132,271,759),10218=>array(80,-132,429,759),10219=>array(72,-132,420,759),10224=>array(40,0,715,732),10225=>array(39,-3,714,729),10226=>array(35,53,733,658),10227=>array(35,61,733,666),10228=>array(51,-14,998,643),10229=>array(44,100,1239,527),10230=>array(51,100,1247,527),10231=>array(44,100,1247,527),10232=>array(44,100,1239,527),10233=>array(51,100,1247,527),10234=>array(44,100,1247,527),10235=>array(44,100,1239,527),10236=>array(51,100,1247,527),10237=>array(44,100,1239,527),10238=>array(51,100,1247,527),10239=>array(51,100,1247,527),10241=>array(132,635,264,781),10242=>array(132,358,264,504),10243=>array(132,358,264,781),10244=>array(132,82,264,228),10245=>array(132,82,264,781),10246=>array(132,82,264,504),10247=>array(132,82,264,781),10248=>array(396,635,527,781),10249=>array(132,635,527,781),10250=>array(132,358,527,781),10251=>array(132,358,527,781),10252=>array(132,82,527,781),10253=>array(132,82,527,781),10254=>array(132,82,527,781),10255=>array(132,82,527,781),10256=>array(396,358,527,504),10257=>array(132,358,527,781),10258=>array(132,358,527,504),10259=>array(132,358,527,781),10260=>array(132,82,527,504),10261=>array(132,82,527,781),10262=>array(132,82,527,504),10263=>array(132,82,527,781),10264=>array(396,358,527,781),10265=>array(132,358,527,781),10266=>array(132,358,527,781),10267=>array(132,358,527,781),10268=>array(132,82,527,781),10269=>array(132,82,527,781),10270=>array(132,82,527,781),10271=>array(132,82,527,781),10272=>array(396,82,527,228),10273=>array(132,82,527,781),10274=>array(132,82,527,504),10275=>array(132,82,527,781),10276=>array(132,82,527,228),10277=>array(132,82,527,781),10278=>array(132,82,527,504),10279=>array(132,82,527,781),10280=>array(396,82,527,781),10281=>array(132,82,527,781),10282=>array(132,82,527,781),10283=>array(132,82,527,781),10284=>array(132,82,527,781),10285=>array(132,82,527,781),10286=>array(132,82,527,781),10287=>array(132,82,527,781),10288=>array(396,82,527,504),10289=>array(132,82,527,781),10290=>array(132,82,527,504),10291=>array(132,82,527,781),10292=>array(132,82,527,504),10293=>array(132,82,527,781),10294=>array(132,82,527,504),10295=>array(132,82,527,781),10296=>array(396,82,527,781),10297=>array(132,82,527,781),10298=>array(132,82,527,781),10299=>array(132,82,527,781),10300=>array(132,82,527,781),10301=>array(132,82,527,781),10302=>array(132,82,527,781),10303=>array(132,82,527,781),10304=>array(132,-195,264,-49),10305=>array(132,-195,264,781),10306=>array(132,-195,264,504),10307=>array(132,-195,264,781),10308=>array(132,-195,264,228),10309=>array(132,-195,264,781),10310=>array(132,-195,264,504),10311=>array(132,-195,264,781),10312=>array(132,-195,527,781),10313=>array(132,-195,527,781),10314=>array(132,-195,527,781),10315=>array(132,-195,527,781),10316=>array(132,-195,527,781),10317=>array(132,-195,527,781),10318=>array(132,-195,527,781),10319=>array(132,-195,527,781),10320=>array(132,-195,527,504),10321=>array(132,-195,527,781),10322=>array(132,-195,527,504),10323=>array(132,-195,527,781),10324=>array(132,-195,527,504),10325=>array(132,-195,527,781),10326=>array(132,-195,527,504),10327=>array(132,-195,527,781),10328=>array(132,-195,527,781),10329=>array(132,-195,527,781),10330=>array(132,-195,527,781),10331=>array(132,-195,527,781),10332=>array(132,-195,527,781),10333=>array(132,-195,527,781),10334=>array(132,-195,527,781),10335=>array(132,-195,527,781),10336=>array(132,-195,527,228),10337=>array(132,-195,527,781),10338=>array(132,-195,527,504),10339=>array(132,-195,527,781),10340=>array(132,-195,527,228),10341=>array(132,-195,527,781),10342=>array(132,-195,527,504),10343=>array(132,-195,527,781),10344=>array(132,-195,527,781),10345=>array(132,-195,527,781),10346=>array(132,-195,527,781),10347=>array(132,-195,527,781),10348=>array(132,-195,527,781),10349=>array(132,-195,527,781),10350=>array(132,-195,527,781),10351=>array(132,-195,527,781),10352=>array(132,-195,527,504),10353=>array(132,-195,527,781),10354=>array(132,-195,527,504),10355=>array(132,-195,527,781),10356=>array(132,-195,527,504),10357=>array(132,-195,527,781),10358=>array(132,-195,527,504),10359=>array(132,-195,527,781),10360=>array(132,-195,527,781),10361=>array(132,-195,527,781),10362=>array(132,-195,527,781),10363=>array(132,-195,527,781),10364=>array(132,-195,527,781),10365=>array(132,-195,527,781),10366=>array(132,-195,527,781),10367=>array(132,-195,527,781),10368=>array(396,-195,527,-49),10369=>array(132,-195,527,781),10370=>array(132,-195,527,504),10371=>array(132,-195,527,781),10372=>array(132,-195,527,228),10373=>array(132,-195,527,781),10374=>array(132,-195,527,504),10375=>array(132,-195,527,781),10376=>array(396,-195,527,781),10377=>array(132,-195,527,781),10378=>array(132,-195,527,781),10379=>array(132,-195,527,781),10380=>array(132,-195,527,781),10381=>array(132,-195,527,781),10382=>array(132,-195,527,781),10383=>array(132,-195,527,781),10384=>array(396,-195,527,504),10385=>array(132,-195,527,781),10386=>array(132,-195,527,504),10387=>array(132,-195,527,781),10388=>array(132,-195,527,504),10389=>array(132,-195,527,781),10390=>array(132,-195,527,504),10391=>array(132,-195,527,781),10392=>array(396,-195,527,781),10393=>array(132,-195,527,781),10394=>array(132,-195,527,781),10395=>array(132,-195,527,781),10396=>array(132,-195,527,781),10397=>array(132,-195,527,781),10398=>array(132,-195,527,781),10399=>array(132,-195,527,781),10400=>array(396,-195,527,228),10401=>array(132,-195,527,781),10402=>array(132,-195,527,504),10403=>array(132,-195,527,781),10404=>array(132,-195,527,228),10405=>array(132,-195,527,781),10406=>array(132,-195,527,504),10407=>array(132,-195,527,781),10408=>array(396,-195,527,781),10409=>array(132,-195,527,781),10410=>array(132,-195,527,781),10411=>array(132,-195,527,781),10412=>array(132,-195,527,781),10413=>array(132,-195,527,781),10414=>array(132,-195,527,781),10415=>array(132,-195,527,781),10416=>array(396,-195,527,504),10417=>array(132,-195,527,781),10418=>array(132,-195,527,504),10419=>array(132,-195,527,781),10420=>array(132,-195,527,504),10421=>array(132,-195,527,781),10422=>array(132,-195,527,504),10423=>array(132,-195,527,781),10424=>array(396,-195,527,781),10425=>array(132,-195,527,781),10426=>array(132,-195,527,781),10427=>array(132,-195,527,781),10428=>array(132,-195,527,781),10429=>array(132,-195,527,781),10430=>array(132,-195,527,781),10431=>array(132,-195,527,781),10432=>array(132,-195,527,-49),10433=>array(132,-195,527,781),10434=>array(132,-195,527,504),10435=>array(132,-195,527,781),10436=>array(132,-195,527,228),10437=>array(132,-195,527,781),10438=>array(132,-195,527,504),10439=>array(132,-195,527,781),10440=>array(132,-195,527,781),10441=>array(132,-195,527,781),10442=>array(132,-195,527,781),10443=>array(132,-195,527,781),10444=>array(132,-195,527,781),10445=>array(132,-195,527,781),10446=>array(132,-195,527,781),10447=>array(132,-195,527,781),10448=>array(132,-195,527,504),10449=>array(132,-195,527,781),10450=>array(132,-195,527,504),10451=>array(132,-195,527,781),10452=>array(132,-195,527,504),10453=>array(132,-195,527,781),10454=>array(132,-195,527,504),10455=>array(132,-195,527,781),10456=>array(132,-195,527,781),10457=>array(132,-195,527,781),10458=>array(132,-195,527,781),10459=>array(132,-195,527,781),10460=>array(132,-195,527,781),10461=>array(132,-195,527,781),10462=>array(132,-195,527,781),10463=>array(132,-195,527,781),10464=>array(132,-195,527,228),10465=>array(132,-195,527,781),10466=>array(132,-195,527,504),10467=>array(132,-195,527,781),10468=>array(132,-195,527,228),10469=>array(132,-195,527,781),10470=>array(132,-195,527,504),10471=>array(132,-195,527,781),10472=>array(132,-195,527,781),10473=>array(132,-195,527,781),10474=>array(132,-195,527,781),10475=>array(132,-195,527,781),10476=>array(132,-195,527,781),10477=>array(132,-195,527,781),10478=>array(132,-195,527,781),10479=>array(132,-195,527,781),10480=>array(132,-195,527,504),10481=>array(132,-195,527,781),10482=>array(132,-195,527,504),10483=>array(132,-195,527,781),10484=>array(132,-195,527,504),10485=>array(132,-195,527,781),10486=>array(132,-195,527,504),10487=>array(132,-195,527,781),10488=>array(132,-195,527,781),10489=>array(132,-195,527,781),10490=>array(132,-195,527,781),10491=>array(132,-195,527,781),10492=>array(132,-195,527,781),10493=>array(132,-195,527,781),10494=>array(132,-195,527,781),10495=>array(132,-195,527,781),10502=>array(44,100,703,527),10503=>array(51,100,710,527),10506=>array(112,0,642,732),10507=>array(112,-3,642,729),10560=>array(35,63,580,838),10561=>array(35,63,580,838),10627=>array(112,-163,548,760),10628=>array(112,-163,548,760),10702=>array(95,-226,659,747),10703=>array(95,15,805,612),10704=>array(95,15,805,612),10705=>array(95,-30,805,657),10706=>array(95,-30,805,657),10707=>array(95,-30,805,657),10708=>array(95,-30,805,657),10709=>array(95,-30,805,657),10731=>array(2,-233,442,807),10746=>array(95,0,659,627),10747=>array(95,0,659,627),10752=>array(25,-198,875,748),10753=>array(25,-198,875,748),10754=>array(25,-198,875,748),10764=>array(51,-212,1142,757),10765=>array(51,-212,417,757),10766=>array(51,-212,417,757),10767=>array(51,-212,417,757),10768=>array(51,-212,417,757),10769=>array(51,-212,470,757),10770=>array(51,-212,417,757),10771=>array(51,-212,417,757),10772=>array(51,-212,500,757),10773=>array(51,-212,417,757),10774=>array(51,-212,417,757),10775=>array(-29,-212,498,757),10776=>array(51,-212,417,757),10777=>array(51,-212,417,757),10778=>array(51,-212,417,757),10779=>array(51,-212,422,872),10780=>array(47,-327,417,757),10799=>array(123,31,631,596),10858=>array(95,228,659,552),10859=>array(95,78,659,552),10877=>array(95,-123,659,581),10878=>array(95,-123,659,581),10879=>array(95,-123,660,581),10880=>array(95,-123,659,581),10881=>array(95,-123,659,644),10882=>array(95,-123,659,644),10883=>array(95,-123,660,759),10884=>array(95,-123,659,756),10885=>array(95,-132,659,663),10886=>array(95,-132,659,663),10887=>array(95,-121,659,582),10888=>array(95,-121,659,582),10889=>array(95,-204,659,663),10890=>array(95,-204,659,663),10891=>array(95,-311,659,791),10892=>array(95,-311,659,791),10893=>array(95,-124,659,663),10894=>array(95,-124,659,663),10895=>array(95,-241,659,756),10896=>array(95,-241,659,756),10897=>array(95,-229,659,730),10898=>array(95,-229,659,730),10899=>array(95,-224,659,741),10900=>array(95,-224,659,741),10901=>array(95,-61,659,644),10902=>array(95,-61,659,644),10903=>array(95,-61,660,644),10904=>array(95,-61,659,644),10905=>array(96,-36,659,685),10906=>array(96,-36,659,685),10907=>array(95,-31,659,725),10908=>array(95,-31,659,725),10909=>array(95,8,659,645),10910=>array(95,23,659,645),10911=>array(95,-176,659,729),10912=>array(95,-176,659,729),10926=>array(95,50,659,601),10927=>array(95,-24,659,667),10928=>array(95,-24,659,667),10929=>array(95,-145,659,667),10930=>array(95,-145,659,667),10931=>array(95,-121,659,662),10932=>array(95,-121,659,662),10933=>array(95,-195,659,662),10934=>array(95,-195,659,662),10935=>array(95,-191,659,693),10936=>array(95,-191,659,693),10937=>array(95,-259,659,693),10938=>array(95,-259,659,693),11001=>array(95,-171,659,585),11002=>array(95,-171,659,585),11008=>array(79,-27,633,587),11009=>array(126,-27,680,587),11010=>array(79,25,633,640),11011=>array(126,25,680,640),11012=>array(24,65,710,562),11013=>array(24,65,703,562),11014=>array(154,0,601,754),11015=>array(154,-25,601,729),11016=>array(79,-27,633,587),11017=>array(126,-27,680,587),11018=>array(79,25,633,640),11019=>array(126,25,680,640),11020=>array(24,65,710,562),11021=>array(154,-25,601,754),11022=>array(51,-3,711,355),11023=>array(51,272,711,630),11024=>array(31,-3,691,355),11025=>array(31,272,691,630),11026=>array(82,-123,769,643),11027=>array(82,-123,769,643),11028=>array(82,-123,769,643),11029=>array(82,-123,769,643),11030=>array(2,-123,690,643),11031=>array(2,-123,690,643),11032=>array(2,-123,690,643),11033=>array(2,-123,690,643),11034=>array(82,-123,769,643),11039=>array(16,-26,767,767),11040=>array(16,-26,767,767),11041=>array(66,-91,720,748),11042=>array(66,-91,720,748),11043=>array(15,-35,771,692),11044=>array(49,-250,958,770),11091=>array(34,-47,749,788),11092=>array(34,-47,749,788),11360=>array(4,0,497,729),11361=>array(4,0,244,760),11362=>array(-18,0,497,729),11363=>array(4,0,512,729),11364=>array(88,-200,600,729),11365=>array(31,-46,519,592),11366=>array(-11,-93,346,822),11367=>array(88,-157,677,729),11368=>array(82,-138,575,760),11369=>array(88,-157,609,729),11370=>array(82,-138,519,760),11371=>array(40,-157,665,729),11372=>array(39,-138,515,547),11373=>array(50,-14,615,743),11374=>array(88,-200,689,729),11375=>array(7,0,608,729),11376=>array(50,-14,615,743),11377=>array(26,0,661,560),11378=>array(30,0,1015,742),11379=>array(38,0,866,560),11380=>array(45,0,506,587),11381=>array(88,0,500,729),11382=>array(84,0,429,547),11383=>array(49,-12,542,551),11385=>array(0,-13,289,760),11386=>array(49,-14,501,560),11387=>array(43,0,360,547),11388=>array(-10,-117,105,425),11389=>array(4,326,383,734),11390=>array(59,-242,538,742),11391=>array(40,-242,576,729),11520=>array(54,-63,490,547),11521=>array(22,-235,500,546),11522=>array(35,-235,482,546),11523=>array(56,-10,515,807),11524=>array(46,-235,483,546),11525=>array(35,-236,776,546),11526=>array(0,-8,518,816),11527=>array(47,0,811,546),11528=>array(62,0,488,546),11529=>array(45,-235,501,816),11530=>array(35,0,813,546),11531=>array(48,-8,536,816),11532=>array(35,0,490,816),11533=>array(45,0,799,546),11534=>array(45,0,500,546),11535=>array(62,-235,690,816),11536=>array(45,0,792,816),11537=>array(45,0,491,816),11538=>array(44,-235,483,546),11539=>array(45,-235,796,661),11540=>array(54,-235,803,546),11541=>array(44,-235,706,816),11542=>array(35,0,491,546),11543=>array(45,-235,500,547),11544=>array(45,-235,496,546),11545=>array(35,-235,487,816),11546=>array(38,-235,479,547),11547=>array(53,-9,537,816),11548=>array(35,-235,783,547),11549=>array(26,-235,491,546),11550=>array(42,-235,493,546),11551=>array(31,-235,492,567),11552=>array(35,0,788,546),11553=>array(44,-235,490,816),11554=>array(53,0,484,626),11555=>array(54,-235,498,816),11556=>array(45,-235,542,546),11557=>array(53,-8,757,816),11568=>array(49,-14,532,380),11569=>array(50,-14,749,742),11570=>array(50,-14,749,742),11571=>array(28,0,586,729),11572=>array(29,0,587,729),11573=>array(28,0,544,729),11574=>array(66,0,439,729),11575=>array(7,0,608,729),11576=>array(7,0,608,729),11577=>array(88,0,511,729),11578=>array(57,0,480,729),11579=>array(66,-14,549,742),11580=>array(96,0,730,729),11581=>array(40,0,599,729),11582=>array(66,0,393,729),11583=>array(40,0,599,729),11584=>array(50,-14,749,742),11585=>array(50,-52,749,781),11586=>array(66,0,178,729),11587=>array(18,0,549,729),11588=>array(88,0,589,729),11589=>array(27,0,589,729),11590=>array(66,0,409,729),11591=>array(40,0,566,729),11592=>array(66,301,514,426),11593=>array(88,0,511,729),11594=>array(48,0,404,729),11595=>array(48,-15,809,742),11596=>array(48,0,652,729),11597=>array(88,0,585,729),11598=>array(89,0,510,729),11599=>array(88,0,177,729),11600=>array(48,0,652,729),11601=>array(88,0,178,729),11602=>array(70,-14,635,729),11603=>array(43,-14,526,742),11604=>array(50,-14,749,742),11605=>array(50,-54,749,742),11606=>array(88,0,589,729),11607=>array(88,0,200,729),11608=>array(66,0,608,729),11609=>array(50,-14,749,742),11610=>array(50,-14,749,780),11611=>array(50,-14,613,742),11612=>array(44,0,647,729),11613=>array(26,0,589,729),11614=>array(50,-14,613,742),11615=>array(88,0,511,729),11616=>array(7,0,608,729),11617=>array(88,0,589,729),11618=>array(88,0,503,729),11619=>array(50,0,659,729),11620=>array(88,0,446,729),11621=>array(50,0,659,729),11631=>array(23,522,440,729),11800=>array(63,-14,413,728),11806=>array(95,78,659,399),11810=>array(77,403,264,760),11811=>array(87,403,274,760),11812=>array(77,-132,264,225),11813=>array(87,-132,274,225),11822=>array(64,0,415,742),19904=>array(75,-158,732,729),19905=>array(75,-158,732,729),19906=>array(75,-158,732,729),19907=>array(75,-158,732,729),19908=>array(75,-158,732,729),19909=>array(75,-158,732,729),19910=>array(75,-158,732,729),19911=>array(75,-158,732,729),19912=>array(75,-158,732,729),19913=>array(75,-158,733,729),19914=>array(75,-158,732,729),19915=>array(75,-158,732,729),19916=>array(75,-158,732,729),19917=>array(75,-158,732,729),19918=>array(75,-158,732,729),19919=>array(75,-158,732,729),19920=>array(75,-158,733,729),19921=>array(75,-158,732,729),19922=>array(75,-158,733,729),19923=>array(75,-158,732,729),19924=>array(75,-158,732,729),19925=>array(75,-158,732,729),19926=>array(75,-158,732,729),19927=>array(75,-158,732,729),19928=>array(75,-158,732,729),19929=>array(75,-158,732,729),19930=>array(75,-158,732,729),19931=>array(75,-158,733,729),19932=>array(75,-158,732,729),19933=>array(75,-158,732,729),19934=>array(75,-158,733,729),19935=>array(75,-158,732,729),19936=>array(75,-158,732,729),19937=>array(75,-158,732,729),19938=>array(75,-158,732,729),19939=>array(75,-158,732,729),19940=>array(75,-158,732,729),19941=>array(75,-158,733,729),19942=>array(75,-158,732,729),19943=>array(75,-158,732,729),19944=>array(75,-158,733,729),19945=>array(75,-158,732,729),19946=>array(75,-158,733,729),19947=>array(75,-158,732,729),19948=>array(75,-158,733,729),19949=>array(75,-158,732,729),19950=>array(75,-158,733,729),19951=>array(75,-158,732,729),19952=>array(75,-158,733,729),19953=>array(75,-158,732,729),19954=>array(75,-158,732,729),19955=>array(75,-158,732,729),19956=>array(75,-158,732,729),19957=>array(75,-158,733,729),19958=>array(75,-158,732,729),19959=>array(75,-158,732,729),19960=>array(75,-158,732,729),19961=>array(75,-158,733,729),19962=>array(75,-158,732,729),19963=>array(75,-158,733,729),19964=>array(75,-158,733,729),19965=>array(75,-158,732,729),19966=>array(75,-158,732,729),19967=>array(75,-158,732,729),42192=>array(88,0,554,729),42193=>array(88,0,512,729),42194=>array(31,0,455,729),42195=>array(88,0,640,729),42196=>array(-3,0,553,729),42197=>array(-3,0,553,729),42198=>array(50,-14,624,742),42199=>array(88,0,609,729),42200=>array(-19,0,502,729),42201=>array(0,-14,373,729),42202=>array(50,-14,580,742),42203=>array(50,-14,580,742),42204=>array(40,0,576,729),42205=>array(88,0,466,729),42206=>array(88,0,466,729),42207=>array(88,0,689,729),42208=>array(88,0,585,729),42209=>array(88,0,497,729),42210=>array(59,-14,521,742),42211=>array(88,0,600,729),42212=>array(26,0,537,729),42213=>array(7,0,608,729),42214=>array(7,0,608,729),42215=>array(88,0,589,729),42216=>array(71,-14,645,742),42217=>array(88,0,461,743),42218=>array(30,0,861,729),42219=>array(26,0,589,729),42220=>array(-2,0,552,729),42221=>array(63,0,529,729),42222=>array(7,0,608,729),42223=>array(7,0,608,729),42224=>array(88,0,511,729),42225=>array(57,0,480,729),42226=>array(88,0,177,729),42227=>array(50,-14,658,742),42228=>array(78,-14,581,729),42229=>array(78,0,581,743),42230=>array(3,0,412,729),42231=>array(50,0,602,729),42232=>array(77,0,193,155),42233=>array(64,-156,193,155),42234=>array(77,0,460,155),42235=>array(77,-156,460,155),42236=>array(64,-156,193,517),42237=>array(77,0,193,517),42238=>array(77,0,453,354),42239=>array(77,172,453,454),42564=>array(50,-14,512,742),42565=>array(44,-14,420,560),42566=>array(88,0,312,729),42567=>array(73,0,273,547),42572=>array(52,-14,1010,645),42573=>array(66,-14,858,471),42576=>array(26,0,838,729),42577=>array(27,0,736,560),42580=>array(50,-14,879,742),42581=>array(49,-14,673,560),42582=>array(92,0,872,729),42583=>array(84,-14,677,560),42594=>array(44,-157,904,729),42595=>array(47,-138,777,547),42596=>array(37,0,908,729),42597=>array(33,0,767,547),42598=>array(88,0,1008,729),42599=>array(82,0,863,547),42600=>array(50,-14,658,742),42601=>array(49,-14,501,560),42602=>array(50,-14,720,742),42603=>array(49,-14,592,560),42604=>array(50,-14,1172,742),42605=>array(49,-14,868,560),42606=>array(25,-208,766,743),42634=>array(-3,-200,682,729),42635=>array(26,-208,594,547),42636=>array(-3,0,553,729),42637=>array(26,0,498,547),42644=>array(77,0,529,729),42645=>array(82,0,494,760),42760=>array(94,0,351,668),42761=>array(94,0,351,668),42762=>array(94,0,351,668),42763=>array(94,0,351,668),42764=>array(94,0,351,668),42765=>array(94,0,351,668),42766=>array(94,0,351,668),42767=>array(94,0,351,668),42768=>array(94,0,351,668),42769=>array(94,0,351,668),42770=>array(94,0,351,668),42771=>array(94,0,351,668),42772=>array(94,0,351,668),42773=>array(94,0,351,668),42774=>array(94,0,351,668),42779=>array(44,326,288,736),42780=>array(44,324,288,734),42781=>array(85,326,142,734),42782=>array(85,326,142,734),42783=>array(85,0,142,408),42786=>array(60,0,315,729),42787=>array(60,0,289,547),42788=>array(50,224,370,742),42789=>array(50,42,370,560),42790=>array(88,-200,589,729),42791=>array(82,-208,494,760),42792=>array(-3,-213,737,729),42793=>array(24,-213,585,702),42794=>array(72,-14,504,742),42795=>array(58,-200,426,561),42800=>array(82,0,393,547),42801=>array(48,-14,425,560),42802=>array(7,0,1117,729),42803=>array(54,-14,805,560),42804=>array(7,-14,1033,742),42805=>array(54,-14,842,560),42806=>array(7,-14,950,729),42807=>array(54,-14,801,560),42808=>array(7,0,867,729),42809=>array(54,-14,709,560),42810=>array(7,0,867,729),42811=>array(54,-14,709,560),42812=>array(7,-208,856,729),42813=>array(54,-208,709,560),42814=>array(50,-14,580,742),42815=>array(56,-14,445,560),42816=>array(4,0,609,729),42817=>array(6,0,522,760),42822=>array(88,0,607,729),42823=>array(84,0,269,760),42824=>array(36,0,519,729),42825=>array(53,0,332,760),42826=>array(4,-14,722,742),42827=>array(4,-14,625,560),42830=>array(50,-14,1172,742),42831=>array(49,-14,868,560),42832=>array(4,0,512,729),42833=>array(-2,-208,522,560),42834=>array(22,0,630,729),42835=>array(22,-208,648,560),42838=>array(50,-178,658,742),42839=>array(49,-208,574,560),42852=>array(4,0,512,729),42853=>array(-2,-208,522,760),42854=>array(4,0,512,729),42855=>array(-2,-208,522,760),42880=>array(4,0,413,729),42881=>array(84,-208,166,560),42882=>array(88,-208,574,742),42883=>array(82,-208,494,560),42889=>array(105,0,198,517),42890=>array(70,161,268,380),42891=>array(136,235,225,729),42892=>array(86,458,162,729),42893=>array(77,0,529,729),42894=>array(34,-208,375,760),42896=>array(88,-157,660,729),42897=>array(82,-138,559,560),42912=>array(1,-14,700,742),42913=>array(1,-208,570,560),42914=>array(1,0,609,729),42915=>array(1,0,520,760),42916=>array(1,0,672,729),42917=>array(1,0,570,560),42918=>array(1,0,624,729),42919=>array(1,0,370,560),42920=>array(1,-14,570,742),42921=>array(1,-14,467,560),42922=>array(-46,0,633,729),43002=>array(82,0,742,547),43003=>array(52,0,430,729),43004=>array(31,0,455,729),43005=>array(88,0,689,729),43006=>array(88,0,177,928),43007=>array(30,0,1050,729),61184=>array(85,602,291,668),61185=>array(62,451,308,668),61186=>array(48,301,325,668),61187=>array(42,150,332,668),61188=>array(40,0,334,668),61189=>array(62,451,308,668),61190=>array(85,451,291,518),61191=>array(62,301,308,518),61192=>array(48,150,325,518),61193=>array(42,0,332,518),61194=>array(48,301,325,668),61195=>array(62,301,308,518),61196=>array(85,301,291,367),61197=>array(62,150,308,367),61198=>array(48,0,325,367),61199=>array(42,150,332,668),61200=>array(48,150,325,518),61201=>array(62,150,308,367),61202=>array(85,150,291,217),61203=>array(62,0,308,217),61204=>array(40,0,334,668),61205=>array(42,0,332,518),61206=>array(48,0,325,367),61207=>array(62,0,308,217),61208=>array(85,0,291,66),61209=>array(94,0,154,668),61440=>array(66,0,813,732),61441=>array(66,0,813,732),61442=>array(66,0,813,732),61443=>array(66,0,813,732),62464=>array(48,-15,474,828),62465=>array(48,-15,474,828),62466=>array(48,-15,513,837),62467=>array(48,0,752,837),62468=>array(48,-15,474,837),62469=>array(48,-15,474,837),62470=>array(48,-15,540,837),62471=>array(48,-15,746,837),62472=>array(48,0,452,837),62473=>array(48,-15,474,828),62474=>array(48,0,1003,837),62475=>array(48,-15,473,837),62476=>array(57,-15,483,828),62477=>array(48,0,734,837),62478=>array(48,-15,474,828),62479=>array(48,-15,474,844),62480=>array(48,0,774,837),62481=>array(57,-15,483,828),62482=>array(48,-15,609,837),62483=>array(22,-15,467,837),62484=>array(48,-15,737,837),62485=>array(48,-15,474,828),62486=>array(48,-15,757,837),62487=>array(48,-15,473,829),62488=>array(48,-15,473,837),62489=>array(57,0,483,837),62490=>array(49,-15,536,828),62491=>array(48,-15,473,828),62492=>array(57,-15,482,837),62493=>array(48,-15,491,828),62494=>array(57,-15,483,828),62495=>array(22,-15,443,837),62496=>array(48,-15,474,837),62497=>array(53,-15,478,837),62498=>array(48,-79,474,837),62499=>array(48,-15,473,838),62500=>array(48,-15,479,838),62501=>array(48,-15,535,837),62502=>array(48,-15,812,838),62504=>array(53,-235,785,816),62505=>array(44,-230,684,853),62506=>array(44,-15,413,765),62507=>array(44,-15,413,777),62508=>array(44,-15,413,875),62509=>array(44,-15,413,818),62510=>array(44,-15,413,887),62511=>array(44,-15,413,809),62512=>array(44,-236,404,765),62513=>array(44,-236,404,799),62514=>array(44,-236,404,901),62515=>array(44,-236,404,809),62516=>array(44,0,422,765),62517=>array(44,0,422,799),62518=>array(44,0,422,809),62519=>array(44,-0,664,765),62520=>array(44,-0,664,777),62521=>array(44,-0,664,895),62522=>array(44,-0,664,799),62523=>array(44,-0,664,809),62524=>array(26,-236,439,765),62525=>array(26,-236,439,777),62526=>array(26,-236,439,904),62527=>array(26,-236,439,799),62528=>array(26,-236,439,809),62529=>array(26,-236,439,852),63173=>array(49,-14,501,760),64256=>array(21,0,637,760),64257=>array(21,0,483,760),64258=>array(21,0,483,760),64259=>array(21,0,786,760),64260=>array(21,0,786,760),64261=>array(21,0,596,760),64262=>array(48,-14,753,742),64275=>array(75,-14,1000,760),64276=>array(76,-14,1000,760),64277=>array(76,-208,1000,760),64278=>array(76,-208,1000,760),64279=>array(76,-208,1306,760),64285=>array(60,44,142,547),64286=>array(150,625,426,765),64287=>array(32,44,296,547),64288=>array(34,0,505,547),64289=>array(76,0,695,547),64290=>array(39,0,646,547),64291=>array(82,0,688,547),64292=>array(39,0,645,547),64293=>array(39,0,645,760),64294=>array(82,0,688,547),64295=>array(39,0,645,547),64296=>array(42,-4,645,547),64297=>array(95,272,659,627),64298=>array(39,0,599,698),64299=>array(34,0,599,698),64300=>array(39,0,599,698),64301=>array(39,0,599,698),64302=>array(82,-159,520,547),64303=>array(82,-193,520,547),64304=>array(82,-159,520,547),64305=>array(39,0,482,547),64306=>array(39,-5,345,547),64307=>array(39,0,460,547),64308=>array(82,0,506,547),64309=>array(39,0,238,547),64310=>array(39,0,327,547),64312=>array(81,-14,534,552),64313=>array(39,204,237,547),64314=>array(39,-208,402,547),64315=>array(39,0,426,547),64316=>array(39,0,443,729),64318=>array(39,0,530,555),64320=>array(39,0,278,547),64321=>array(81,-14,534,547),64323=>array(82,-208,494,547),64324=>array(82,0,513,547),64326=>array(39,0,453,547),64327=>array(82,-208,570,546),64328=>array(39,0,426,547),64329=>array(39,0,599,547),64330=>array(9,-4,510,547),64331=>array(82,0,164,698),64332=>array(39,0,482,698),64333=>array(39,0,426,698),64334=>array(82,0,513,698),64335=>array(39,0,514,760),64338=>array(57,-244,778,327),64339=>array(57,-244,893,327),64340=>array(-9,-244,172,293),64341=>array(-9,-244,281,293),64342=>array(57,-244,778,327),64343=>array(57,-244,893,327),64344=>array(-9,-244,220,293),64345=>array(-9,-244,281,293),64346=>array(57,-244,778,327),64347=>array(57,-244,893,327),64348=>array(-9,-244,220,293),64349=>array(-9,-244,281,293),64350=>array(57,-10,778,513),64351=>array(57,-10,893,513),64352=>array(-9,0,172,610),64353=>array(-9,0,281,610),64354=>array(57,-10,778,513),64355=>array(57,-10,893,513),64356=>array(-9,0,220,610),64357=>array(-9,0,281,610),64358=>array(57,-10,778,575),64359=>array(57,-10,893,575),64360=>array(-9,0,246,672),64361=>array(-9,0,281,672),64362=>array(57,-45,857,757),64363=>array(57,-44,940,659),64364=>array(-9,0,365,757),64365=>array(-9,0,464,684),64366=>array(57,-45,857,757),64367=>array(57,-44,940,659),64368=>array(-9,0,365,757),64369=>array(-9,0,464,684),64370=>array(69,-244,580,425),64371=>array(69,-244,590,425),64372=>array(-9,-220,491,398),64373=>array(-9,-220,590,398),64374=>array(69,-244,580,425),64375=>array(69,-244,590,425),64376=>array(-9,-98,491,398),64377=>array(-9,-98,590,398),64378=>array(69,-244,580,425),64379=>array(69,-244,590,425),64380=>array(-9,-220,491,398),64381=>array(-9,-220,590,398),64382=>array(69,-244,580,425),64383=>array(69,-244,590,425),64384=>array(-9,-220,491,398),64385=>array(-9,-220,590,398),64386=>array(55,-146,350,415),64387=>array(55,-146,481,415),64388=>array(55,-19,350,586),64389=>array(55,-19,481,586),64390=>array(55,-19,350,708),64391=>array(55,-19,481,708),64392=>array(55,-19,350,746),64393=>array(55,-19,481,746),64394=>array(-38,-244,396,586),64395=>array(-38,-244,505,586),64396=>array(-38,-244,422,648),64397=>array(-38,-244,505,648),64398=>array(57,-43,806,760),64399=>array(57,-43,883,760),64400=>array(-9,0,429,760),64401=>array(-9,0,506,760),64402=>array(57,-43,806,896),64403=>array(57,-43,883,896),64404=>array(-9,0,429,896),64405=>array(-9,0,506,896),64406=>array(57,-293,806,896),64407=>array(57,-293,883,896),64408=>array(-9,-269,429,896),64409=>array(-9,-269,506,896),64410=>array(57,-43,806,903),64411=>array(57,-43,883,903),64412=>array(-9,0,429,903),64413=>array(-9,0,506,903),64414=>array(64,-162,594,366),64415=>array(64,-244,694,284),64416=>array(64,-162,594,636),64417=>array(64,-244,694,514),64418=>array(-9,0,246,672),64419=>array(-9,0,281,672),64426=>array(63,-33,575,487),64427=>array(63,-244,578,333),64428=>array(-9,-33,421,487),64429=>array(-9,-244,424,333),64467=>array(63,-27,650,854),64468=>array(63,-27,768,854),64469=>array(-9,0,429,928),64470=>array(-9,0,506,928),64473=>array(-38,-244,366,556),64474=>array(-38,-244,474,556),64488=>array(-9,0,172,293),64489=>array(-9,0,281,293),64508=>array(57,-131,647,411),64509=>array(57,-133,759,251),64510=>array(-9,-146,220,293),64511=>array(-9,-146,281,293),65056=>array(-401,752,0,929),65057=>array(0,752,401,929),65058=>array(-319,756,0,894),65059=>array(0,756,319,894),65136=>array(3,591,260,825),65137=>array(-9,0,272,825),65138=>array(3,591,260,874),65139=>array(46,0,245,177),65140=>array(3,-239,260,-5),65142=>array(3,591,260,708),65143=>array(-9,0,272,708),65144=>array(3,590,260,874),65145=>array(-9,0,272,874),65146=>array(3,-137,260,-20),65147=>array(-9,-137,272,90),65148=>array(-5,599,269,869),65149=>array(-9,0,272,869),65150=>array(10,610,251,878),65151=>array(-9,0,272,878),65152=>array(71,42,351,483),65153=>array(-33,0,284,939),65154=>array(-33,0,284,939),65155=>array(47,0,198,1028),65156=>array(47,0,283,1028),65157=>array(-38,-244,366,588),65158=>array(-38,-244,474,588),65159=>array(47,-244,198,760),65160=>array(47,-244,283,760),65161=>array(57,-131,647,588),65162=>array(57,-133,759,466),65163=>array(-9,0,205,613),65164=>array(-9,0,281,613),65165=>array(84,0,166,760),65166=>array(84,0,283,760),65167=>array(57,-171,778,327),65168=>array(57,-171,893,327),65169=>array(-9,-146,172,293),65170=>array(-9,-146,281,293),65171=>array(61,-28,408,513),65172=>array(63,0,492,513),65173=>array(57,-10,778,391),65174=>array(57,-10,893,391),65175=>array(-9,0,220,488),65176=>array(-9,0,281,488),65177=>array(57,-10,778,513),65178=>array(57,-10,893,513),65179=>array(-9,0,220,610),65180=>array(-9,0,281,610),65181=>array(69,-244,580,425),65182=>array(69,-244,590,425),65183=>array(-9,-146,491,398),65184=>array(-9,-146,590,398),65185=>array(69,-244,580,425),65186=>array(69,-244,590,425),65187=>array(-9,0,491,398),65188=>array(-9,0,590,398),65189=>array(69,-244,580,586),65190=>array(69,-244,590,586),65191=>array(-9,0,491,537),65192=>array(-9,0,590,537),65193=>array(55,-19,350,415),65194=>array(55,-19,481,415),65195=>array(55,-19,350,586),65196=>array(55,-19,481,586),65197=>array(-38,-244,381,269),65198=>array(-38,-244,505,269),65199=>array(-38,-244,381,464),65200=>array(-38,-244,505,464),65201=>array(57,-244,1024,366),65202=>array(57,-244,1156,366),65203=>array(-9,-14,680,366),65204=>array(-9,-14,812,366),65205=>array(57,-244,1024,586),65206=>array(57,-244,1156,586),65207=>array(-9,-14,680,586),65208=>array(-9,-14,812,586),65209=>array(57,-244,1021,362),65210=>array(57,-244,1112,362),65211=>array(-9,0,697,362),65212=>array(-9,0,790,362),65213=>array(57,-244,1021,464),65214=>array(57,-244,1112,464),65215=>array(-9,0,697,464),65216=>array(-9,0,790,464),65217=>array(63,0,772,760),65218=>array(63,0,863,760),65219=>array(-9,0,656,760),65220=>array(-9,0,747,760),65221=>array(63,0,772,760),65222=>array(63,0,863,760),65223=>array(-9,0,656,760),65224=>array(-9,0,747,760),65225=>array(51,-244,528,521),65226=>array(51,-244,528,382),65227=>array(-9,0,447,521),65228=>array(-9,0,443,382),65229=>array(51,-244,528,659),65230=>array(51,-244,528,537),65231=>array(-9,0,447,659),65232=>array(-9,0,443,537),65233=>array(57,-45,857,635),65234=>array(57,-44,940,537),65235=>array(-9,0,365,635),65236=>array(-9,0,464,562),65237=>array(47,-215,631,635),65238=>array(47,-244,760,500),65239=>array(-9,0,365,635),65240=>array(-9,0,464,562),65241=>array(63,-27,650,760),65242=>array(63,-27,768,760),65243=>array(-9,0,429,760),65244=>array(-9,0,506,760),65245=>array(63,-152,573,760),65246=>array(63,-152,690,760),65247=>array(-9,0,189,760),65248=>array(-9,0,307,760),65249=>array(62,-240,492,369),65250=>array(62,-240,608,307),65251=>array(-9,-25,411,303),65252=>array(-9,-24,529,303),65253=>array(64,-162,594,464),65254=>array(64,-244,694,342),65255=>array(-9,0,172,488),65256=>array(-9,0,281,488),65257=>array(61,-28,408,358),65258=>array(63,0,492,366),65259=>array(-9,-33,421,487),65260=>array(-9,-244,424,333),65261=>array(-38,-244,366,315),65262=>array(-38,-244,474,315),65263=>array(57,-131,647,411),65264=>array(57,-133,759,251),65265=>array(57,-244,647,411),65266=>array(57,-244,759,251),65267=>array(-9,-146,220,293),65268=>array(-9,-146,281,293),65269=>array(-92,-10,422,866),65270=>array(-92,-10,546,866),65271=>array(-12,-10,422,955),65272=>array(-12,-10,546,955),65273=>array(10,-244,422,760),65274=>array(10,-244,546,760),65275=>array(37,-10,422,760),65276=>array(37,-10,546,760),65533=>array(13,-84,910,912),65535=>array(44,-177,495,705)); -$cw=array(0=>540,32=>286,33=>360,34=>414,35=>754,36=>572,37=>855,38=>702,39=>247,40=>351,41=>351,42=>450,43=>754,44=>286,45=>325,46=>286,47=>303,48=>572,49=>572,50=>572,51=>572,52=>572,53=>572,54=>572,55=>572,56=>572,57=>572,58=>303,59=>303,60=>754,61=>754,62=>754,63=>478,64=>900,65=>615,66=>617,67=>628,68=>693,69=>568,70=>518,71=>697,72=>677,73=>265,74=>265,75=>590,76=>501,77=>776,78=>673,79=>708,80=>542,81=>708,82=>625,83=>571,84=>549,85=>659,86=>615,87=>890,88=>616,89=>549,90=>616,91=>351,92=>303,93=>351,94=>754,95=>450,96=>450,97=>551,98=>571,99=>495,100=>571,101=>554,102=>316,103=>571,104=>570,105=>250,106=>250,107=>521,108=>250,109=>876,110=>570,111=>550,112=>571,113=>571,114=>370,115=>469,116=>353,117=>570,118=>532,119=>736,120=>532,121=>532,122=>472,123=>572,124=>303,125=>572,126=>754,160=>286,161=>360,162=>572,163=>572,164=>572,165=>572,166=>303,167=>450,168=>450,169=>900,170=>424,171=>550,172=>754,173=>325,174=>900,175=>450,176=>450,177=>754,178=>360,179=>360,180=>450,181=>572,182=>572,183=>286,184=>450,185=>360,186=>424,187=>550,188=>872,189=>872,190=>872,191=>478,192=>615,193=>615,194=>615,195=>615,196=>615,197=>615,198=>876,199=>628,200=>568,201=>568,202=>568,203=>568,204=>265,205=>265,206=>265,207=>265,208=>697,209=>673,210=>708,211=>708,212=>708,213=>708,214=>708,215=>754,216=>708,217=>659,218=>659,219=>659,220=>659,221=>549,222=>544,223=>567,224=>551,225=>551,226=>551,227=>551,228=>551,229=>551,230=>883,231=>495,232=>554,233=>554,234=>554,235=>554,236=>250,237=>250,238=>250,239=>250,240=>550,241=>570,242=>550,243=>550,244=>550,245=>550,246=>550,247=>754,248=>550,249=>570,250=>570,251=>570,252=>570,253=>532,254=>571,255=>532,256=>615,257=>551,258=>615,259=>551,260=>615,261=>551,262=>628,263=>495,264=>628,265=>495,266=>628,267=>495,268=>628,269=>495,270=>693,271=>571,272=>697,273=>571,274=>568,275=>554,276=>568,277=>554,278=>568,279=>554,280=>568,281=>554,282=>568,283=>554,284=>697,285=>571,286=>697,287=>571,288=>697,289=>571,290=>697,291=>571,292=>677,293=>570,294=>824,295=>625,296=>265,297=>250,298=>265,299=>250,300=>265,301=>250,302=>265,303=>250,304=>265,305=>250,306=>531,307=>500,308=>265,309=>250,310=>590,311=>521,312=>521,313=>501,314=>250,315=>501,316=>250,317=>501,318=>337,319=>501,320=>308,321=>505,322=>255,323=>673,324=>570,325=>673,326=>570,327=>673,328=>570,329=>732,330=>673,331=>570,332=>708,333=>550,334=>708,335=>550,336=>708,337=>550,338=>962,339=>920,340=>625,341=>370,342=>625,343=>370,344=>625,345=>370,346=>571,347=>469,348=>571,349=>469,350=>571,351=>469,352=>571,353=>469,354=>549,355=>353,356=>549,357=>353,358=>549,359=>353,360=>659,361=>570,362=>659,363=>570,364=>659,365=>570,366=>659,367=>570,368=>659,369=>570,370=>659,371=>570,372=>890,373=>736,374=>549,375=>532,376=>549,377=>616,378=>472,379=>616,380=>472,381=>616,382=>472,383=>316,384=>571,385=>661,386=>617,387=>571,388=>617,389=>571,390=>633,391=>628,392=>495,393=>697,394=>737,395=>617,396=>571,397=>550,398=>568,399=>708,400=>553,401=>518,402=>316,403=>697,404=>618,405=>885,406=>318,407=>265,408=>671,409=>521,410=>250,411=>532,412=>876,413=>673,414=>570,415=>708,416=>822,417=>550,418=>854,419=>683,420=>586,421=>571,422=>625,423=>571,424=>469,425=>568,426=>302,427=>353,428=>549,429=>353,430=>549,431=>772,432=>570,433=>688,434=>648,435=>669,436=>657,437=>616,438=>472,439=>599,440=>599,441=>520,442=>472,443=>572,444=>599,445=>520,446=>459,447=>571,448=>265,449=>443,450=>413,451=>266,452=>1279,453=>1169,454=>1039,455=>751,456=>708,457=>411,458=>838,459=>831,460=>717,461=>615,462=>551,463=>265,464=>250,465=>708,466=>550,467=>659,468=>570,469=>659,470=>570,471=>659,472=>570,473=>659,474=>570,475=>659,476=>570,477=>554,478=>615,479=>551,480=>615,481=>551,482=>876,483=>883,484=>697,485=>571,486=>697,487=>571,488=>590,489=>521,490=>708,491=>550,492=>708,493=>550,494=>599,495=>520,496=>250,497=>1279,498=>1169,499=>1039,500=>697,501=>571,502=>1001,503=>614,504=>673,505=>570,506=>615,507=>551,508=>876,509=>883,510=>708,511=>550,512=>615,513=>551,514=>615,515=>551,516=>568,517=>554,518=>568,519=>554,520=>265,521=>250,522=>265,523=>250,524=>708,525=>550,526=>708,527=>550,528=>625,529=>370,530=>625,531=>370,532=>659,533=>570,534=>659,535=>570,536=>571,537=>469,538=>549,539=>353,540=>564,541=>469,542=>677,543=>570,544=>662,545=>754,546=>628,547=>549,548=>616,549=>472,550=>615,551=>551,552=>568,553=>554,554=>708,555=>550,556=>708,557=>550,558=>708,559=>550,560=>708,561=>550,562=>549,563=>532,564=>427,565=>758,566=>429,567=>250,568=>898,569=>898,570=>615,571=>628,572=>495,573=>501,574=>549,575=>469,576=>472,577=>542,578=>431,579=>617,580=>659,581=>615,582=>568,583=>554,584=>265,585=>250,586=>703,587=>571,588=>625,589=>370,590=>549,591=>532,592=>540,593=>571,594=>571,595=>571,596=>494,597=>495,598=>571,599=>626,600=>554,601=>554,602=>737,603=>486,604=>479,605=>698,606=>598,607=>250,608=>626,609=>571,610=>566,611=>536,612=>536,613=>570,614=>570,615=>570,616=>250,617=>304,618=>334,619=>356,620=>438,621=>250,622=>635,623=>876,624=>876,625=>876,626=>581,627=>578,628=>570,629=>550,630=>772,631=>655,632=>593,633=>373,634=>373,635=>372,636=>370,637=>369,638=>477,639=>477,640=>543,641=>543,642=>469,643=>302,644=>302,645=>415,646=>302,647=>353,648=>353,649=>570,650=>556,651=>538,652=>532,653=>736,654=>532,655=>549,656=>472,657=>472,658=>520,659=>520,660=>459,661=>459,662=>459,663=>459,664=>708,665=>521,666=>598,667=>637,668=>588,669=>263,670=>600,671=>456,672=>654,673=>459,674=>459,675=>913,676=>952,677=>911,678=>747,679=>549,680=>700,681=>763,682=>635,683=>589,684=>463,685=>463,686=>595,687=>597,688=>364,689=>359,690=>157,691=>233,692=>266,693=>266,694=>341,695=>463,696=>335,697=>250,698=>414,699=>286,700=>286,701=>286,702=>276,703=>276,704=>333,705=>333,706=>450,707=>450,708=>450,709=>450,710=>450,711=>450,712=>247,713=>450,714=>450,715=>450,716=>247,717=>450,718=>450,719=>450,720=>303,721=>303,722=>276,723=>276,724=>450,725=>450,726=>351,727=>286,728=>450,729=>450,730=>450,731=>450,732=>450,733=>450,734=>284,735=>450,736=>383,737=>149,738=>335,739=>399,740=>333,741=>444,742=>444,743=>444,744=>444,745=>444,748=>450,749=>450,750=>466,755=>450,759=>450,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>589,881=>511,882=>775,883=>583,884=>250,885=>250,886=>673,887=>584,890=>450,891=>494,892=>495,893=>494,894=>303,900=>450,901=>450,902=>623,903=>286,904=>671,905=>784,906=>367,908=>731,910=>742,911=>743,912=>304,913=>615,914=>617,915=>501,916=>615,917=>568,918=>616,919=>677,920=>708,921=>265,922=>590,923=>615,924=>776,925=>673,926=>568,927=>708,928=>677,929=>542,931=>568,932=>549,933=>549,934=>708,935=>616,936=>708,937=>688,938=>265,939=>549,940=>593,941=>486,942=>570,943=>304,944=>521,945=>593,946=>574,947=>532,948=>550,949=>486,950=>489,951=>570,952=>550,953=>304,954=>530,955=>532,956=>572,957=>502,958=>501,959=>550,960=>542,961=>571,962=>528,963=>570,964=>542,965=>521,966=>593,967=>520,968=>593,969=>753,970=>304,971=>521,972=>550,973=>521,974=>753,975=>590,976=>553,977=>557,978=>628,979=>758,980=>628,981=>593,982=>753,983=>597,984=>708,985=>550,986=>583,987=>528,988=>518,989=>413,990=>593,991=>593,992=>778,993=>564,994=>840,995=>753,996=>682,997=>593,998=>712,999=>553,1000=>618,1001=>546,1002=>690,1003=>563,1004=>629,1005=>550,1006=>549,1007=>482,1008=>597,1009=>571,1010=>495,1011=>250,1012=>708,1013=>554,1014=>554,1015=>544,1016=>571,1017=>628,1018=>776,1019=>585,1020=>571,1021=>633,1022=>628,1023=>633,1024=>568,1025=>568,1026=>708,1027=>549,1028=>628,1029=>571,1030=>265,1031=>265,1032=>265,1033=>984,1034=>940,1035=>708,1036=>639,1037=>673,1038=>548,1039=>677,1040=>615,1041=>617,1042=>617,1043=>549,1044=>703,1045=>568,1046=>969,1047=>577,1048=>673,1049=>673,1050=>639,1051=>677,1052=>776,1053=>677,1054=>708,1055=>677,1056=>542,1057=>628,1058=>549,1059=>548,1060=>774,1061=>616,1062=>699,1063=>617,1064=>962,1065=>984,1066=>749,1067=>794,1068=>617,1069=>628,1070=>971,1071=>625,1072=>551,1073=>555,1074=>530,1075=>473,1076=>622,1077=>554,1078=>811,1079=>479,1080=>584,1081=>584,1082=>543,1083=>575,1084=>679,1085=>588,1086=>550,1087=>588,1088=>571,1089=>495,1090=>524,1091=>532,1092=>769,1093=>532,1094=>612,1095=>532,1096=>823,1097=>848,1098=>636,1099=>710,1100=>530,1101=>494,1102=>757,1103=>541,1104=>554,1105=>554,1106=>563,1107=>473,1108=>494,1109=>469,1110=>250,1111=>250,1112=>250,1113=>812,1114=>809,1115=>586,1116=>543,1117=>584,1118=>532,1119=>588,1120=>840,1121=>753,1122=>693,1123=>604,1124=>848,1125=>674,1126=>791,1127=>705,1128=>1043,1129=>901,1130=>708,1131=>550,1132=>924,1133=>742,1134=>572,1135=>486,1136=>771,1137=>789,1138=>708,1139=>550,1140=>703,1141=>598,1142=>703,1143=>598,1144=>893,1145=>813,1146=>857,1147=>682,1148=>1062,1149=>925,1150=>840,1151=>753,1152=>628,1153=>495,1154=>452,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>376,1161=>376,1162=>695,1163=>609,1164=>617,1165=>530,1166=>542,1167=>571,1168=>549,1169=>473,1170=>607,1171=>531,1172=>562,1173=>477,1174=>969,1175=>811,1176=>577,1177=>479,1178=>639,1179=>543,1180=>639,1181=>543,1182=>639,1183=>543,1184=>771,1185=>748,1186=>677,1187=>594,1188=>913,1189=>789,1190=>973,1191=>824,1192=>790,1193=>624,1194=>628,1195=>495,1196=>549,1197=>524,1198=>549,1199=>532,1200=>549,1201=>532,1202=>616,1203=>532,1204=>840,1205=>726,1206=>617,1207=>532,1208=>617,1209=>532,1210=>617,1211=>570,1212=>847,1213=>655,1214=>847,1215=>655,1216=>265,1217=>969,1218=>811,1219=>590,1220=>543,1221=>698,1222=>603,1223=>677,1224=>594,1225=>699,1226=>612,1227=>617,1228=>532,1229=>799,1230=>697,1231=>250,1232=>615,1233=>551,1234=>615,1235=>551,1236=>876,1237=>883,1238=>568,1239=>554,1240=>708,1241=>554,1242=>708,1243=>554,1244=>969,1245=>811,1246=>577,1247=>479,1248=>599,1249=>520,1250=>673,1251=>584,1252=>673,1253=>584,1254=>708,1255=>550,1256=>708,1257=>550,1258=>708,1259=>550,1260=>628,1261=>494,1262=>548,1263=>532,1264=>548,1265=>532,1266=>548,1267=>532,1268=>617,1269=>532,1270=>549,1271=>473,1272=>794,1273=>710,1274=>607,1275=>531,1276=>616,1277=>532,1278=>616,1279=>532,1280=>617,1281=>530,1282=>905,1283=>807,1284=>877,1285=>782,1286=>611,1287=>529,1288=>964,1289=>861,1290=>1001,1291=>870,1292=>697,1293=>593,1294=>695,1295=>640,1296=>553,1297=>486,1298=>677,1299=>575,1300=>1052,1301=>894,1302=>804,1303=>778,1304=>928,1305=>887,1306=>708,1307=>571,1308=>890,1309=>736,1310=>639,1311=>543,1312=>972,1313=>814,1314=>973,1315=>821,1316=>713,1317=>614,1329=>689,1330=>659,1331=>678,1332=>678,1333=>659,1334=>694,1335=>576,1336=>659,1337=>773,1338=>678,1339=>622,1340=>479,1341=>830,1342=>777,1343=>659,1344=>644,1345=>689,1346=>678,1347=>690,1348=>712,1349=>655,1350=>656,1351=>681,1352=>659,1353=>642,1354=>720,1355=>691,1356=>712,1357=>659,1358=>678,1359=>634,1360=>624,1361=>669,1362=>483,1363=>729,1364=>681,1365=>708,1366=>711,1369=>276,1370=>286,1371=>211,1372=>325,1373=>214,1374=>365,1375=>450,1377=>876,1378=>570,1379=>592,1380=>597,1381=>570,1382=>571,1383=>463,1384=>570,1385=>664,1386=>592,1387=>570,1388=>244,1389=>882,1390=>560,1391=>570,1392=>570,1393=>547,1394=>571,1395=>566,1396=>570,1397=>244,1398=>570,1399=>448,1400=>570,1401=>364,1402=>876,1403=>504,1404=>583,1405=>570,1406=>570,1407=>876,1408=>570,1409=>570,1410=>391,1411=>876,1412=>572,1413=>548,1414=>725,1415=>730,1417=>303,1418=>325,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>325,1471=>0,1472=>265,1473=>0,1474=>0,1475=>265,1478=>397,1479=>0,1488=>602,1489=>520,1490=>371,1491=>491,1492=>588,1493=>245,1494=>312,1495=>588,1496=>583,1497=>201,1498=>483,1499=>476,1500=>511,1501=>597,1502=>611,1503=>245,1504=>360,1505=>584,1506=>563,1507=>576,1508=>562,1509=>485,1510=>534,1511=>638,1512=>508,1513=>637,1514=>591,1520=>423,1521=>380,1522=>297,1523=>374,1524=>580,1542=>573,1543=>573,1545=>681,1546=>879,1548=>290,1557=>0,1563=>286,1567=>478,1569=>423,1570=>250,1571=>250,1572=>435,1573=>250,1574=>704,1575=>250,1576=>847,1577=>471,1578=>847,1579=>847,1580=>581,1581=>581,1582=>581,1583=>400,1584=>400,1585=>435,1586=>435,1587=>1099,1588=>1099,1589=>1088,1590=>1088,1591=>832,1592=>832,1593=>537,1594=>537,1600=>264,1601=>933,1602=>698,1603=>742,1604=>654,1605=>557,1606=>661,1607=>471,1608=>435,1609=>704,1610=>704,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,1619=>0,1620=>0,1621=>0,1623=>0,1626=>450,1632=>483,1633=>483,1634=>483,1635=>483,1636=>483,1637=>483,1638=>483,1639=>483,1640=>483,1641=>483,1642=>483,1643=>292,1644=>286,1645=>490,1646=>847,1647=>698,1648=>0,1652=>263,1657=>847,1658=>847,1659=>847,1660=>847,1661=>847,1662=>847,1663=>847,1664=>847,1665=>581,1666=>581,1667=>581,1668=>581,1669=>581,1670=>581,1671=>581,1672=>400,1673=>400,1674=>400,1675=>400,1676=>400,1677=>400,1678=>400,1679=>400,1680=>400,1681=>435,1682=>435,1683=>448,1684=>477,1685=>549,1686=>477,1687=>435,1688=>435,1689=>435,1690=>1099,1691=>1099,1692=>1099,1693=>1088,1694=>1088,1695=>832,1696=>537,1697=>933,1698=>933,1699=>933,1700=>933,1701=>933,1702=>933,1703=>698,1704=>698,1705=>805,1706=>948,1707=>805,1708=>742,1709=>742,1710=>742,1711=>805,1712=>805,1713=>805,1714=>805,1715=>805,1716=>805,1717=>654,1718=>654,1719=>654,1720=>654,1721=>661,1722=>661,1723=>661,1724=>661,1725=>661,1726=>628,1727=>581,1734=>435,1740=>704,1742=>704,1749=>471,1776=>483,1777=>483,1778=>483,1779=>483,1780=>483,1781=>483,1782=>483,1783=>483,1784=>483,1785=>483,1984=>572,1985=>572,1986=>572,1987=>572,1988=>572,1989=>572,1990=>572,1991=>572,1992=>572,1993=>572,1994=>250,1995=>514,1996=>381,1997=>532,1998=>588,1999=>588,2000=>534,2001=>588,2002=>746,2003=>394,2004=>394,2005=>502,2006=>550,2007=>315,2008=>863,2009=>425,2010=>705,2011=>588,2012=>563,2013=>660,2014=>477,2015=>651,2016=>425,2017=>563,2018=>534,2019=>477,2020=>477,2021=>470,2022=>534,2023=>534,2027=>0,2028=>0,2029=>0,2030=>0,2031=>0,2032=>0,2033=>0,2034=>0,2035=>0,2036=>282,2037=>282,2040=>504,2041=>504,2042=>325,3647=>572,3713=>603,3714=>615,3716=>619,3719=>434,3720=>565,3722=>615,3725=>619,3732=>602,3733=>577,3734=>580,3735=>589,3737=>593,3738=>563,3739=>563,3740=>670,3741=>690,3742=>618,3743=>618,3745=>631,3746=>619,3747=>615,3749=>584,3751=>569,3754=>633,3755=>737,3757=>569,3758=>615,3759=>708,3760=>569,3761=>0,3762=>485,3763=>485,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>597,3776=>337,3777=>591,3778=>414,3779=>492,3780=>442,3782=>606,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>572,3793=>576,3794=>576,3795=>603,3796=>563,3797=>563,3798=>633,3799=>603,3800=>606,3801=>609,3804=>925,3805=>925,4256=>787,4257=>660,4258=>611,4259=>751,4260=>554,4261=>690,4262=>678,4263=>822,4264=>408,4265=>558,4266=>758,4267=>794,4268=>562,4269=>769,4270=>703,4271=>566,4272=>820,4273=>558,4274=>558,4275=>769,4276=>779,4277=>651,4278=>567,4279=>558,4280=>563,4281=>558,4282=>736,4283=>786,4284=>554,4285=>561,4286=>563,4287=>652,4288=>760,4289=>536,4290=>620,4291=>536,4292=>534,4293=>664,4304=>457,4305=>466,4306=>523,4307=>736,4308=>457,4309=>461,4310=>450,4311=>721,4312=>466,4313=>459,4314=>958,4315=>470,4316=>470,4317=>708,4318=>457,4319=>466,4320=>716,4321=>470,4322=>589,4323=>470,4324=>743,4325=>461,4326=>708,4327=>466,4328=>466,4329=>470,4330=>514,4331=>470,4332=>466,4333=>468,4334=>470,4335=>409,4336=>457,4337=>466,4338=>457,4339=>457,4340=>466,4341=>499,4342=>745,4343=>497,4344=>457,4345=>514,4346=>457,4347=>403,4348=>291,5121=>615,5122=>615,5123=>615,5124=>615,5125=>692,5126=>692,5127=>692,5129=>692,5130=>692,5131=>692,5132=>751,5133=>751,5134=>751,5135=>751,5136=>751,5137=>751,5138=>870,5139=>906,5140=>870,5141=>906,5142=>692,5143=>870,5144=>906,5145=>870,5146=>906,5147=>692,5149=>230,5150=>488,5151=>381,5152=>381,5153=>350,5154=>350,5155=>354,5156=>350,5157=>419,5158=>347,5159=>230,5160=>350,5161=>350,5162=>350,5163=>980,5164=>817,5165=>857,5166=>1005,5167=>615,5168=>615,5169=>615,5170=>615,5171=>656,5172=>656,5173=>656,5175=>656,5176=>656,5177=>656,5178=>751,5179=>615,5180=>751,5181=>751,5182=>751,5183=>751,5184=>870,5185=>906,5186=>870,5187=>906,5188=>870,5189=>906,5190=>870,5191=>906,5192=>656,5193=>457,5194=>172,5196=>659,5197=>659,5198=>659,5199=>659,5200=>657,5201=>657,5202=>657,5204=>657,5205=>657,5206=>657,5207=>829,5208=>800,5209=>829,5210=>800,5211=>829,5212=>800,5213=>835,5214=>810,5215=>835,5216=>810,5217=>853,5218=>810,5219=>853,5220=>810,5221=>853,5222=>391,5223=>790,5224=>790,5225=>779,5226=>801,5227=>565,5228=>565,5229=>565,5230=>565,5231=>565,5232=>565,5233=>565,5234=>565,5235=>565,5236=>773,5237=>693,5238=>733,5239=>734,5240=>733,5241=>734,5242=>773,5243=>693,5244=>773,5245=>693,5246=>733,5247=>734,5248=>733,5249=>734,5250=>733,5251=>366,5252=>366,5253=>675,5254=>697,5255=>675,5256=>697,5257=>565,5258=>565,5259=>565,5260=>565,5261=>565,5262=>565,5263=>565,5264=>565,5265=>565,5266=>773,5267=>693,5268=>733,5269=>734,5270=>733,5271=>734,5272=>773,5273=>693,5274=>773,5275=>693,5276=>733,5277=>734,5278=>733,5279=>734,5280=>733,5281=>391,5282=>391,5283=>549,5284=>501,5285=>501,5286=>501,5287=>549,5288=>549,5289=>549,5290=>501,5291=>501,5292=>674,5293=>691,5294=>671,5295=>687,5296=>671,5297=>687,5298=>674,5299=>691,5300=>674,5301=>691,5302=>671,5303=>687,5304=>671,5305=>687,5306=>671,5307=>347,5308=>457,5309=>347,5312=>766,5313=>766,5314=>766,5315=>766,5316=>766,5317=>766,5318=>766,5319=>766,5320=>766,5321=>962,5322=>931,5323=>953,5324=>766,5325=>953,5326=>766,5327=>766,5328=>540,5329=>407,5330=>540,5331=>766,5332=>766,5333=>766,5334=>766,5335=>766,5336=>766,5337=>766,5338=>766,5339=>766,5340=>962,5341=>931,5342=>953,5343=>927,5344=>953,5345=>927,5346=>962,5347=>931,5348=>962,5349=>931,5350=>975,5351=>927,5352=>975,5353=>927,5354=>540,5356=>656,5357=>542,5358=>542,5359=>542,5360=>542,5361=>542,5362=>542,5363=>542,5364=>542,5365=>542,5366=>751,5367=>678,5368=>712,5369=>694,5370=>712,5371=>694,5372=>751,5373=>678,5374=>751,5375=>678,5376=>712,5377=>694,5378=>712,5379=>694,5380=>712,5381=>376,5382=>378,5383=>376,5392=>641,5393=>641,5394=>641,5395=>802,5396=>802,5397=>802,5398=>802,5399=>818,5400=>785,5401=>818,5402=>785,5403=>818,5404=>785,5405=>1026,5406=>989,5407=>1026,5408=>989,5409=>1026,5410=>989,5411=>1026,5412=>989,5413=>576,5414=>564,5415=>564,5416=>564,5417=>564,5418=>564,5419=>564,5420=>564,5421=>564,5422=>564,5423=>760,5424=>703,5425=>734,5426=>736,5427=>734,5428=>736,5429=>760,5430=>703,5431=>760,5432=>703,5433=>734,5434=>736,5435=>734,5436=>736,5437=>734,5438=>376,5440=>350,5441=>436,5442=>824,5443=>824,5444=>824,5445=>824,5446=>824,5447=>824,5448=>542,5449=>542,5450=>542,5451=>542,5452=>542,5453=>542,5454=>751,5455=>678,5456=>376,5458=>656,5459=>615,5460=>615,5461=>615,5462=>615,5463=>653,5464=>653,5465=>653,5466=>653,5467=>831,5468=>906,5469=>457,5470=>659,5471=>659,5472=>659,5473=>659,5474=>659,5475=>659,5476=>657,5477=>657,5478=>657,5479=>657,5480=>853,5481=>810,5482=>457,5492=>747,5493=>747,5494=>747,5495=>747,5496=>747,5497=>747,5498=>747,5499=>507,5500=>677,5501=>436,5502=>942,5503=>942,5504=>942,5505=>942,5506=>942,5507=>942,5508=>942,5509=>743,5514=>747,5515=>747,5516=>747,5517=>747,5518=>1133,5519=>1133,5520=>1133,5521=>901,5522=>901,5523=>1133,5524=>1133,5525=>629,5526=>965,5536=>766,5537=>766,5538=>766,5539=>766,5540=>766,5541=>766,5542=>540,5543=>579,5544=>579,5545=>579,5546=>579,5547=>579,5548=>579,5549=>579,5550=>376,5551=>565,5598=>693,5601=>690,5702=>421,5703=>421,5742=>399,5743=>942,5744=>1178,5745=>1469,5746=>1469,5747=>1237,5748=>1237,5749=>1469,5750=>1469,5760=>429,5761=>443,5762=>641,5763=>838,5764=>1035,5765=>1232,5766=>443,5767=>641,5768=>838,5769=>1035,5770=>1232,5771=>448,5772=>646,5773=>844,5774=>1042,5775=>1241,5776=>443,5777=>641,5778=>836,5779=>1034,5780=>1232,5781=>448,5782=>677,5783=>709,5784=>1084,5785=>1035,5786=>615,5787=>457,5788=>456,7424=>532,7425=>646,7426=>883,7427=>527,7428=>495,7429=>544,7430=>544,7431=>441,7432=>486,7433=>250,7434=>355,7435=>521,7436=>524,7437=>679,7438=>584,7439=>550,7440=>495,7441=>615,7442=>615,7443=>615,7444=>920,7446=>550,7447=>550,7448=>472,7449=>541,7450=>541,7451=>524,7452=>517,7453=>663,7454=>853,7455=>574,7456=>532,7457=>736,7458=>472,7459=>473,7462=>524,7463=>532,7464=>507,7465=>472,7466=>531,7467=>575,7468=>387,7469=>552,7470=>389,7472=>436,7473=>358,7474=>358,7475=>439,7476=>426,7477=>167,7478=>167,7479=>372,7480=>315,7481=>489,7482=>424,7483=>424,7484=>446,7485=>396,7486=>342,7487=>394,7488=>346,7489=>415,7490=>560,7491=>352,7492=>352,7493=>365,7494=>583,7495=>385,7496=>365,7497=>375,7498=>375,7499=>324,7500=>323,7501=>365,7502=>161,7503=>383,7504=>561,7505=>368,7506=>372,7507=>333,7508=>372,7509=>372,7510=>385,7511=>265,7512=>364,7513=>422,7514=>561,7515=>375,7517=>361,7518=>335,7519=>347,7520=>374,7521=>327,7522=>161,7523=>233,7524=>364,7525=>375,7526=>361,7527=>335,7528=>370,7529=>374,7530=>327,7543=>571,7544=>426,7547=>334,7549=>600,7557=>250,7579=>365,7580=>333,7581=>333,7582=>372,7583=>324,7584=>267,7585=>209,7586=>365,7587=>364,7588=>235,7589=>224,7590=>234,7591=>235,7592=>211,7593=>224,7594=>211,7595=>338,7596=>561,7597=>561,7598=>369,7599=>431,7600=>368,7601=>372,7602=>372,7603=>324,7604=>258,7605=>265,7606=>457,7607=>376,7608=>325,7609=>365,7610=>375,7611=>330,7612=>393,7613=>330,7614=>353,7615=>372,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>615,7681=>551,7682=>617,7683=>571,7684=>617,7685=>571,7686=>617,7687=>571,7688=>628,7689=>495,7690=>693,7691=>571,7692=>693,7693=>571,7694=>693,7695=>571,7696=>693,7697=>571,7698=>693,7699=>571,7700=>568,7701=>554,7702=>568,7703=>554,7704=>568,7705=>554,7706=>568,7707=>554,7708=>568,7709=>554,7710=>518,7711=>316,7712=>697,7713=>571,7714=>677,7715=>570,7716=>677,7717=>570,7718=>677,7719=>570,7720=>677,7721=>570,7722=>677,7723=>570,7724=>265,7725=>250,7726=>265,7727=>250,7728=>590,7729=>521,7730=>590,7731=>521,7732=>590,7733=>521,7734=>501,7735=>259,7736=>501,7737=>259,7738=>501,7739=>250,7740=>501,7741=>250,7742=>776,7743=>876,7744=>776,7745=>876,7746=>776,7747=>876,7748=>673,7749=>570,7750=>673,7751=>570,7752=>673,7753=>570,7754=>673,7755=>570,7756=>708,7757=>550,7758=>708,7759=>550,7760=>708,7761=>550,7762=>708,7763=>550,7764=>542,7765=>571,7766=>542,7767=>571,7768=>625,7769=>370,7770=>625,7771=>370,7772=>625,7773=>370,7774=>625,7775=>370,7776=>571,7777=>469,7778=>571,7779=>469,7780=>571,7781=>469,7782=>571,7783=>469,7784=>571,7785=>469,7786=>549,7787=>353,7788=>549,7789=>353,7790=>549,7791=>353,7792=>549,7793=>353,7794=>659,7795=>570,7796=>659,7797=>570,7798=>659,7799=>570,7800=>659,7801=>570,7802=>659,7803=>570,7804=>615,7805=>532,7806=>615,7807=>532,7808=>890,7809=>736,7810=>890,7811=>736,7812=>890,7813=>736,7814=>890,7815=>736,7816=>890,7817=>736,7818=>616,7819=>532,7820=>616,7821=>532,7822=>549,7823=>532,7824=>616,7825=>472,7826=>616,7827=>472,7828=>616,7829=>472,7830=>570,7831=>353,7832=>736,7833=>532,7834=>551,7835=>316,7836=>316,7837=>316,7838=>691,7839=>550,7840=>615,7841=>551,7842=>615,7843=>551,7844=>615,7845=>551,7846=>615,7847=>551,7848=>615,7849=>551,7850=>615,7851=>551,7852=>615,7853=>551,7854=>615,7855=>551,7856=>615,7857=>551,7858=>615,7859=>551,7860=>615,7861=>551,7862=>615,7863=>551,7864=>568,7865=>554,7866=>568,7867=>554,7868=>568,7869=>554,7870=>568,7871=>554,7872=>568,7873=>554,7874=>568,7875=>554,7876=>568,7877=>554,7878=>568,7879=>554,7880=>265,7881=>250,7882=>265,7883=>250,7884=>708,7885=>550,7886=>708,7887=>550,7888=>708,7889=>550,7890=>708,7891=>550,7892=>708,7893=>550,7894=>708,7895=>550,7896=>708,7897=>550,7898=>822,7899=>550,7900=>822,7901=>550,7902=>822,7903=>550,7904=>822,7905=>550,7906=>822,7907=>550,7908=>659,7909=>570,7910=>659,7911=>570,7912=>772,7913=>570,7914=>772,7915=>570,7916=>772,7917=>570,7918=>772,7919=>570,7920=>772,7921=>570,7922=>549,7923=>532,7924=>549,7925=>532,7926=>549,7927=>532,7928=>549,7929=>532,7930=>692,7931=>429,7936=>593,7937=>593,7938=>593,7939=>593,7940=>593,7941=>593,7942=>593,7943=>593,7944=>615,7945=>615,7946=>790,7947=>790,7948=>692,7949=>721,7950=>637,7951=>668,7952=>486,7953=>486,7954=>486,7955=>486,7956=>486,7957=>486,7960=>640,7961=>640,7962=>869,7963=>877,7964=>809,7965=>835,7968=>570,7969=>570,7970=>570,7971=>570,7972=>570,7973=>570,7974=>570,7975=>570,7976=>753,7977=>751,7978=>977,7979=>980,7980=>924,7981=>945,7982=>840,7983=>852,7984=>304,7985=>304,7986=>304,7987=>304,7988=>304,7989=>304,7990=>304,7991=>304,7992=>342,7993=>336,7994=>571,7995=>571,7996=>513,7997=>540,7998=>440,7999=>443,8000=>550,8001=>550,8002=>550,8003=>550,8004=>550,8005=>550,8008=>724,8009=>763,8010=>985,8011=>989,8012=>844,8013=>873,8016=>521,8017=>521,8018=>521,8019=>521,8020=>521,8021=>521,8022=>521,8023=>521,8025=>705,8027=>897,8029=>911,8031=>808,8032=>753,8033=>753,8034=>753,8035=>753,8036=>753,8037=>753,8038=>753,8039=>753,8040=>722,8041=>759,8042=>980,8043=>985,8044=>851,8045=>875,8046=>829,8047=>857,8048=>593,8049=>593,8050=>486,8051=>493,8052=>570,8053=>589,8054=>304,8055=>304,8056=>550,8057=>550,8058=>521,8059=>521,8060=>753,8061=>753,8064=>593,8065=>593,8066=>593,8067=>593,8068=>593,8069=>593,8070=>593,8071=>593,8072=>615,8073=>615,8074=>790,8075=>790,8076=>692,8077=>721,8078=>637,8079=>668,8080=>570,8081=>570,8082=>570,8083=>570,8084=>570,8085=>570,8086=>570,8087=>570,8088=>753,8089=>751,8090=>977,8091=>980,8092=>924,8093=>945,8094=>840,8095=>852,8096=>753,8097=>753,8098=>753,8099=>753,8100=>753,8101=>753,8102=>753,8103=>753,8104=>722,8105=>759,8106=>980,8107=>985,8108=>851,8109=>875,8110=>829,8111=>857,8112=>593,8113=>593,8114=>593,8115=>593,8116=>593,8118=>593,8119=>593,8120=>615,8121=>615,8122=>645,8123=>623,8124=>615,8125=>450,8126=>450,8127=>450,8128=>450,8129=>450,8130=>570,8131=>570,8132=>589,8134=>570,8135=>570,8136=>724,8137=>671,8138=>837,8139=>784,8140=>677,8141=>450,8142=>450,8143=>450,8144=>304,8145=>304,8146=>304,8147=>304,8150=>304,8151=>304,8152=>265,8153=>265,8154=>427,8155=>367,8157=>450,8158=>450,8159=>450,8160=>521,8161=>521,8162=>521,8163=>521,8164=>571,8165=>571,8166=>521,8167=>521,8168=>549,8169=>549,8170=>760,8171=>742,8172=>616,8173=>450,8174=>450,8175=>450,8178=>753,8179=>753,8180=>753,8182=>753,8183=>753,8184=>847,8185=>731,8186=>830,8187=>743,8188=>688,8189=>450,8190=>450,8192=>450,8193=>900,8194=>450,8195=>900,8196=>296,8197=>225,8198=>150,8199=>572,8200=>286,8201=>180,8202=>89,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>325,8209=>325,8210=>572,8211=>450,8212=>900,8213=>900,8214=>450,8215=>450,8216=>286,8217=>286,8218=>286,8219=>286,8220=>466,8221=>466,8222=>466,8223=>466,8224=>450,8225=>450,8226=>531,8227=>531,8228=>301,8229=>601,8230=>900,8231=>286,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>180,8240=>1208,8241=>1562,8242=>204,8243=>336,8244=>468,8245=>204,8246=>336,8247=>468,8248=>305,8249=>360,8250=>360,8251=>754,8252=>437,8253=>478,8254=>450,8255=>723,8256=>723,8257=>225,8258=>900,8259=>450,8260=>150,8261=>351,8262=>351,8263=>830,8264=>659,8265=>659,8266=>447,8267=>572,8268=>450,8269=>450,8270=>450,8271=>303,8272=>723,8273=>450,8274=>404,8275=>900,8276=>723,8277=>754,8278=>527,8279=>597,8280=>754,8281=>754,8282=>286,8283=>717,8284=>754,8285=>286,8286=>286,8287=>200,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>360,8305=>161,8308=>360,8309=>360,8310=>360,8311=>360,8312=>360,8313=>360,8314=>475,8315=>475,8316=>475,8317=>221,8318=>221,8319=>358,8320=>360,8321=>360,8322=>360,8323=>360,8324=>360,8325=>360,8326=>360,8327=>360,8328=>360,8329=>360,8330=>475,8331=>475,8332=>475,8333=>221,8334=>221,8336=>352,8337=>375,8338=>372,8339=>399,8340=>375,8341=>364,8342=>383,8343=>149,8344=>561,8345=>358,8346=>385,8347=>335,8348=>265,8352=>789,8353=>572,8354=>572,8355=>572,8356=>572,8357=>876,8358=>673,8359=>1145,8360=>966,8361=>890,8362=>706,8363=>572,8364=>572,8365=>572,8366=>572,8367=>1145,8368=>572,8369=>572,8370=>572,8371=>572,8372=>696,8373=>572,8376=>572,8377=>572,8378=>611,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>917,8449=>917,8450=>628,8451=>1011,8452=>578,8453=>917,8454=>960,8455=>553,8456=>628,8457=>856,8459=>889,8460=>679,8461=>765,8462=>570,8463=>570,8464=>422,8465=>627,8466=>648,8467=>372,8468=>736,8469=>721,8470=>936,8471=>900,8472=>627,8473=>631,8474=>708,8475=>718,8476=>732,8477=>712,8478=>807,8479=>615,8480=>917,8481=>967,8482=>900,8483=>615,8484=>670,8485=>520,8486=>688,8487=>688,8488=>554,8489=>304,8490=>590,8491=>615,8492=>708,8493=>633,8494=>769,8495=>532,8496=>545,8497=>708,8498=>518,8499=>962,8500=>416,8501=>670,8502=>606,8503=>419,8504=>580,8505=>342,8506=>833,8507=>1074,8508=>632,8509=>655,8510=>589,8511=>764,8512=>729,8513=>697,8514=>501,8515=>501,8516=>549,8517=>737,8518=>637,8519=>554,8520=>316,8521=>316,8523=>702,8526=>474,8528=>872,8529=>872,8530=>1233,8531=>872,8532=>872,8533=>872,8534=>872,8535=>872,8536=>872,8537=>872,8538=>872,8539=>872,8540=>872,8541=>872,8542=>872,8543=>511,8544=>265,8545=>443,8546=>620,8547=>831,8548=>615,8549=>830,8550=>1007,8551=>1185,8552=>826,8553=>616,8554=>839,8555=>1018,8556=>501,8557=>628,8558=>693,8559=>776,8560=>250,8561=>412,8562=>573,8563=>730,8564=>532,8565=>729,8566=>892,8567=>1053,8568=>737,8569=>532,8570=>740,8571=>901,8572=>250,8573=>495,8574=>571,8575=>876,8576=>1121,8577=>693,8578=>1121,8579=>633,8580=>494,8581=>628,8585=>872,8592=>754,8593=>754,8594=>754,8595=>754,8596=>754,8597=>754,8598=>754,8599=>754,8600=>754,8601=>754,8602=>754,8603=>754,8604=>754,8605=>754,8606=>754,8607=>754,8608=>754,8609=>754,8610=>754,8611=>754,8612=>754,8613=>754,8614=>754,8615=>754,8616=>754,8617=>754,8618=>754,8619=>754,8620=>754,8621=>754,8622=>754,8623=>754,8624=>754,8625=>754,8626=>754,8627=>754,8628=>754,8629=>754,8630=>754,8631=>754,8632=>754,8633=>754,8634=>754,8635=>754,8636=>754,8637=>754,8638=>754,8639=>754,8640=>754,8641=>754,8642=>754,8643=>754,8644=>754,8645=>754,8646=>754,8647=>754,8648=>754,8649=>754,8650=>754,8651=>754,8652=>754,8653=>754,8654=>754,8655=>754,8656=>754,8657=>754,8658=>754,8659=>754,8660=>754,8661=>754,8662=>754,8663=>754,8664=>754,8665=>754,8666=>754,8667=>754,8668=>754,8669=>754,8670=>754,8671=>754,8672=>754,8673=>754,8674=>754,8675=>754,8676=>754,8677=>754,8678=>754,8679=>754,8680=>754,8681=>754,8682=>754,8683=>754,8684=>754,8685=>754,8686=>754,8687=>754,8688=>754,8689=>754,8690=>754,8691=>754,8692=>754,8693=>754,8694=>754,8695=>754,8696=>754,8697=>754,8698=>754,8699=>754,8700=>754,8701=>754,8702=>754,8703=>754,8704=>615,8705=>572,8706=>465,8707=>568,8708=>568,8709=>784,8710=>602,8711=>602,8712=>784,8713=>784,8714=>646,8715=>784,8716=>784,8717=>646,8718=>572,8719=>681,8720=>681,8721=>606,8722=>754,8723=>754,8724=>754,8725=>303,8726=>573,8727=>754,8728=>563,8729=>563,8730=>573,8731=>573,8732=>573,8733=>643,8734=>750,8735=>754,8736=>807,8737=>807,8738=>754,8739=>450,8740=>450,8741=>450,8742=>450,8743=>659,8744=>659,8745=>659,8746=>659,8747=>469,8748=>710,8749=>951,8750=>469,8751=>710,8752=>951,8753=>469,8754=>469,8755=>469,8756=>572,8757=>572,8758=>234,8759=>572,8760=>754,8761=>754,8762=>754,8763=>754,8764=>754,8765=>754,8766=>754,8767=>754,8768=>337,8769=>754,8770=>754,8771=>754,8772=>754,8773=>754,8774=>754,8775=>754,8776=>754,8777=>754,8778=>754,8779=>754,8780=>754,8781=>754,8782=>754,8783=>754,8784=>754,8785=>754,8786=>755,8787=>755,8788=>900,8789=>900,8790=>754,8791=>754,8792=>754,8793=>754,8794=>754,8795=>754,8796=>754,8797=>754,8798=>754,8799=>754,8800=>754,8801=>754,8802=>754,8803=>754,8804=>754,8805=>754,8806=>754,8807=>754,8808=>754,8809=>754,8810=>942,8811=>942,8812=>417,8813=>754,8814=>754,8815=>754,8816=>754,8817=>754,8818=>754,8819=>754,8820=>754,8821=>754,8822=>754,8823=>754,8824=>754,8825=>754,8826=>754,8827=>754,8828=>754,8829=>754,8830=>754,8831=>754,8832=>754,8833=>754,8834=>754,8835=>754,8836=>754,8837=>754,8838=>754,8839=>754,8840=>754,8841=>754,8842=>754,8843=>754,8844=>659,8845=>659,8846=>659,8847=>754,8848=>754,8849=>754,8850=>754,8851=>702,8852=>702,8853=>754,8854=>754,8855=>754,8856=>754,8857=>754,8858=>754,8859=>754,8860=>754,8861=>754,8862=>754,8863=>754,8864=>754,8865=>754,8866=>784,8867=>784,8868=>784,8869=>784,8870=>468,8871=>468,8872=>784,8873=>784,8874=>784,8875=>784,8876=>784,8877=>784,8878=>784,8879=>784,8880=>754,8881=>754,8882=>754,8883=>754,8884=>754,8885=>754,8886=>900,8887=>900,8888=>754,8889=>754,8890=>468,8891=>659,8892=>659,8893=>659,8894=>754,8895=>754,8896=>738,8897=>738,8898=>738,8899=>738,8900=>444,8901=>286,8902=>563,8903=>754,8904=>900,8905=>900,8906=>900,8907=>900,8908=>900,8909=>754,8910=>659,8911=>659,8912=>754,8913=>754,8914=>754,8915=>754,8916=>754,8917=>754,8918=>754,8919=>754,8920=>1280,8921=>1280,8922=>754,8923=>754,8924=>754,8925=>754,8926=>754,8927=>754,8928=>754,8929=>754,8930=>754,8931=>754,8932=>754,8933=>754,8934=>754,8935=>754,8936=>754,8937=>754,8938=>754,8939=>754,8940=>754,8941=>754,8942=>900,8943=>900,8944=>900,8945=>900,8946=>900,8947=>784,8948=>646,8949=>784,8950=>784,8951=>646,8952=>784,8953=>784,8954=>900,8955=>784,8956=>646,8957=>784,8958=>646,8959=>784,8960=>542,8961=>542,8962=>571,8963=>754,8964=>754,8965=>754,8966=>754,8967=>439,8968=>351,8969=>351,8970=>351,8971=>351,8972=>728,8973=>728,8974=>728,8975=>728,8976=>754,8977=>461,8984=>900,8985=>754,8988=>422,8989=>422,8990=>422,8991=>422,8992=>469,8993=>469,8996=>1037,8997=>1037,8998=>1272,8999=>1037,9000=>1299,9003=>1272,9004=>786,9075=>304,9076=>571,9077=>753,9082=>593,9085=>681,9095=>1037,9108=>786,9115=>450,9116=>450,9117=>450,9118=>450,9119=>450,9120=>450,9121=>450,9122=>450,9123=>450,9124=>450,9125=>450,9126=>450,9127=>675,9128=>675,9129=>675,9130=>675,9131=>675,9132=>675,9133=>675,9134=>469,9166=>754,9167=>850,9187=>786,9189=>692,9192=>572,9250=>571,9251=>571,9312=>807,9313=>807,9314=>807,9315=>807,9316=>807,9317=>807,9318=>807,9319=>807,9320=>807,9321=>807,9472=>542,9473=>542,9474=>542,9475=>542,9476=>542,9477=>542,9478=>542,9479=>542,9480=>542,9481=>542,9482=>542,9483=>542,9484=>542,9485=>542,9486=>542,9487=>542,9488=>542,9489=>542,9490=>542,9491=>542,9492=>542,9493=>542,9494=>542,9495=>542,9496=>542,9497=>542,9498=>542,9499=>542,9500=>542,9501=>542,9502=>542,9503=>542,9504=>542,9505=>542,9506=>542,9507=>542,9508=>542,9509=>542,9510=>542,9511=>542,9512=>542,9513=>542,9514=>542,9515=>542,9516=>542,9517=>542,9518=>542,9519=>542,9520=>542,9521=>542,9522=>542,9523=>542,9524=>542,9525=>542,9526=>542,9527=>542,9528=>542,9529=>542,9530=>542,9531=>542,9532=>542,9533=>542,9534=>542,9535=>542,9536=>542,9537=>542,9538=>542,9539=>542,9540=>542,9541=>542,9542=>542,9543=>542,9544=>542,9545=>542,9546=>542,9547=>542,9548=>542,9549=>542,9550=>542,9551=>542,9552=>542,9553=>542,9554=>542,9555=>542,9556=>542,9557=>542,9558=>542,9559=>542,9560=>542,9561=>542,9562=>542,9563=>542,9564=>542,9565=>542,9566=>542,9567=>542,9568=>542,9569=>542,9570=>542,9571=>542,9572=>542,9573=>542,9574=>542,9575=>542,9576=>542,9577=>542,9578=>542,9579=>542,9580=>542,9581=>542,9582=>542,9583=>542,9584=>542,9585=>542,9586=>542,9587=>542,9588=>542,9589=>542,9590=>542,9591=>542,9592=>542,9593=>542,9594=>542,9595=>542,9596=>542,9597=>542,9598=>542,9599=>542,9600=>692,9601=>692,9602=>692,9603=>692,9604=>692,9605=>692,9606=>692,9607=>692,9608=>692,9609=>692,9610=>692,9611=>692,9612=>692,9613=>692,9614=>692,9615=>692,9616=>692,9617=>692,9618=>692,9619=>692,9620=>692,9621=>692,9622=>692,9623=>692,9624=>692,9625=>692,9626=>692,9627=>692,9628=>692,9629=>692,9630=>692,9631=>692,9632=>850,9633=>850,9634=>850,9635=>850,9636=>850,9637=>850,9638=>850,9639=>850,9640=>850,9641=>850,9642=>610,9643=>610,9644=>850,9645=>850,9646=>495,9647=>495,9648=>692,9649=>692,9650=>692,9651=>692,9652=>452,9653=>452,9654=>692,9655=>692,9656=>452,9657=>452,9658=>692,9659=>692,9660=>692,9661=>692,9662=>452,9663=>452,9664=>692,9665=>692,9666=>452,9667=>452,9668=>692,9669=>692,9670=>692,9671=>692,9672=>692,9673=>785,9674=>444,9675=>785,9676=>785,9677=>785,9678=>785,9679=>785,9680=>785,9681=>785,9682=>785,9683=>785,9684=>785,9685=>785,9686=>474,9687=>474,9688=>712,9689=>873,9690=>873,9691=>873,9692=>348,9693=>348,9694=>348,9695=>348,9696=>785,9697=>785,9698=>692,9699=>692,9700=>692,9701=>692,9702=>531,9703=>850,9704=>850,9705=>850,9706=>850,9707=>850,9708=>692,9709=>692,9710=>692,9711=>1007,9712=>850,9713=>850,9714=>850,9715=>850,9716=>785,9717=>785,9718=>785,9719=>785,9720=>692,9721=>692,9722=>692,9723=>747,9724=>747,9725=>659,9726=>659,9727=>692,9728=>807,9729=>900,9730=>807,9731=>807,9732=>807,9733=>807,9734=>807,9735=>515,9736=>806,9737=>807,9738=>799,9739=>799,9740=>604,9741=>911,9742=>1121,9743=>1125,9744=>807,9745=>807,9746=>807,9747=>479,9748=>807,9749=>807,9750=>807,9751=>807,9752=>807,9753=>807,9754=>807,9755=>807,9756=>807,9757=>548,9758=>807,9759=>548,9760=>807,9761=>807,9762=>807,9763=>807,9764=>602,9765=>671,9766=>584,9767=>705,9768=>490,9769=>807,9770=>807,9771=>807,9772=>639,9773=>807,9774=>807,9775=>807,9776=>807,9777=>807,9778=>807,9779=>807,9780=>807,9781=>807,9782=>807,9783=>807,9784=>807,9785=>938,9786=>938,9787=>938,9788=>807,9789=>807,9790=>807,9791=>552,9792=>659,9793=>659,9794=>807,9795=>807,9796=>807,9797=>807,9798=>807,9799=>807,9800=>807,9801=>807,9802=>807,9803=>807,9804=>807,9805=>807,9806=>807,9807=>807,9808=>807,9809=>807,9810=>807,9811=>807,9812=>807,9813=>807,9814=>807,9815=>807,9816=>807,9817=>807,9818=>807,9819=>807,9820=>807,9821=>807,9822=>807,9823=>807,9824=>807,9825=>807,9826=>807,9827=>807,9828=>807,9829=>807,9830=>807,9831=>807,9832=>807,9833=>424,9834=>574,9835=>807,9836=>807,9837=>424,9838=>321,9839=>435,9840=>673,9841=>689,9842=>807,9843=>807,9844=>807,9845=>807,9846=>807,9847=>807,9848=>807,9849=>807,9850=>807,9851=>807,9852=>807,9853=>807,9854=>807,9855=>807,9856=>782,9857=>782,9858=>782,9859=>782,9860=>782,9861=>782,9862=>807,9863=>807,9864=>807,9865=>807,9866=>807,9867=>807,9868=>807,9869=>807,9870=>807,9871=>807,9872=>807,9873=>807,9874=>807,9875=>807,9876=>807,9877=>487,9878=>807,9879=>807,9880=>807,9881=>807,9882=>807,9883=>807,9884=>807,9888=>807,9889=>632,9890=>904,9891=>980,9892=>1057,9893=>813,9894=>754,9895=>754,9896=>754,9897=>754,9898=>754,9899=>754,9900=>754,9901=>754,9902=>754,9903=>754,9904=>759,9905=>754,9906=>659,9907=>659,9908=>659,9909=>659,9910=>765,9911=>659,9912=>659,9920=>754,9921=>754,9922=>754,9923=>754,9954=>659,9985=>754,9986=>754,9987=>754,9988=>754,9990=>754,9991=>754,9992=>754,9993=>754,9996=>754,9997=>754,9998=>754,9999=>754,10000=>754,10001=>754,10002=>754,10003=>754,10004=>754,10005=>754,10006=>754,10007=>754,10008=>754,10009=>754,10010=>754,10011=>754,10012=>754,10013=>754,10014=>754,10015=>754,10016=>754,10017=>754,10018=>754,10019=>754,10020=>754,10021=>754,10022=>754,10023=>754,10025=>754,10026=>754,10027=>754,10028=>754,10029=>754,10030=>754,10031=>754,10032=>754,10033=>754,10034=>754,10035=>754,10036=>754,10037=>754,10038=>754,10039=>754,10040=>754,10041=>754,10042=>754,10043=>754,10044=>754,10045=>754,10046=>754,10047=>754,10048=>754,10049=>754,10050=>754,10051=>754,10052=>754,10053=>754,10054=>754,10055=>754,10056=>754,10057=>754,10058=>754,10059=>754,10061=>807,10063=>807,10064=>807,10065=>807,10066=>807,10070=>807,10072=>754,10073=>754,10074=>754,10075=>290,10076=>290,10077=>484,10078=>484,10081=>754,10082=>754,10083=>754,10084=>754,10085=>754,10086=>754,10087=>754,10088=>754,10089=>754,10090=>754,10091=>754,10092=>754,10093=>754,10094=>754,10095=>754,10096=>754,10097=>754,10098=>754,10099=>754,10100=>754,10101=>754,10102=>807,10103=>807,10104=>807,10105=>807,10106=>807,10107=>807,10108=>807,10109=>807,10110=>807,10111=>807,10112=>754,10113=>754,10114=>754,10115=>754,10116=>754,10117=>754,10118=>754,10119=>754,10120=>754,10121=>754,10122=>754,10123=>754,10124=>754,10125=>754,10126=>754,10127=>754,10128=>754,10129=>754,10130=>754,10131=>754,10132=>754,10136=>754,10137=>754,10138=>754,10139=>754,10140=>754,10141=>754,10142=>754,10143=>754,10144=>754,10145=>754,10146=>754,10147=>754,10148=>754,10149=>754,10150=>754,10151=>754,10152=>754,10153=>754,10154=>754,10155=>754,10156=>754,10157=>754,10158=>754,10159=>754,10161=>754,10162=>754,10163=>754,10164=>754,10165=>754,10166=>754,10167=>754,10168=>754,10169=>754,10170=>754,10171=>754,10172=>754,10173=>754,10174=>754,10181=>351,10182=>351,10208=>444,10214=>445,10215=>445,10216=>351,10217=>351,10218=>500,10219=>500,10224=>754,10225=>754,10226=>754,10227=>754,10228=>1042,10229=>1290,10230=>1290,10231=>1290,10232=>1290,10233=>1290,10234=>1290,10235=>1290,10236=>1290,10237=>1290,10238=>1290,10239=>1290,10240=>659,10241=>659,10242=>659,10243=>659,10244=>659,10245=>659,10246=>659,10247=>659,10248=>659,10249=>659,10250=>659,10251=>659,10252=>659,10253=>659,10254=>659,10255=>659,10256=>659,10257=>659,10258=>659,10259=>659,10260=>659,10261=>659,10262=>659,10263=>659,10264=>659,10265=>659,10266=>659,10267=>659,10268=>659,10269=>659,10270=>659,10271=>659,10272=>659,10273=>659,10274=>659,10275=>659,10276=>659,10277=>659,10278=>659,10279=>659,10280=>659,10281=>659,10282=>659,10283=>659,10284=>659,10285=>659,10286=>659,10287=>659,10288=>659,10289=>659,10290=>659,10291=>659,10292=>659,10293=>659,10294=>659,10295=>659,10296=>659,10297=>659,10298=>659,10299=>659,10300=>659,10301=>659,10302=>659,10303=>659,10304=>659,10305=>659,10306=>659,10307=>659,10308=>659,10309=>659,10310=>659,10311=>659,10312=>659,10313=>659,10314=>659,10315=>659,10316=>659,10317=>659,10318=>659,10319=>659,10320=>659,10321=>659,10322=>659,10323=>659,10324=>659,10325=>659,10326=>659,10327=>659,10328=>659,10329=>659,10330=>659,10331=>659,10332=>659,10333=>659,10334=>659,10335=>659,10336=>659,10337=>659,10338=>659,10339=>659,10340=>659,10341=>659,10342=>659,10343=>659,10344=>659,10345=>659,10346=>659,10347=>659,10348=>659,10349=>659,10350=>659,10351=>659,10352=>659,10353=>659,10354=>659,10355=>659,10356=>659,10357=>659,10358=>659,10359=>659,10360=>659,10361=>659,10362=>659,10363=>659,10364=>659,10365=>659,10366=>659,10367=>659,10368=>659,10369=>659,10370=>659,10371=>659,10372=>659,10373=>659,10374=>659,10375=>659,10376=>659,10377=>659,10378=>659,10379=>659,10380=>659,10381=>659,10382=>659,10383=>659,10384=>659,10385=>659,10386=>659,10387=>659,10388=>659,10389=>659,10390=>659,10391=>659,10392=>659,10393=>659,10394=>659,10395=>659,10396=>659,10397=>659,10398=>659,10399=>659,10400=>659,10401=>659,10402=>659,10403=>659,10404=>659,10405=>659,10406=>659,10407=>659,10408=>659,10409=>659,10410=>659,10411=>659,10412=>659,10413=>659,10414=>659,10415=>659,10416=>659,10417=>659,10418=>659,10419=>659,10420=>659,10421=>659,10422=>659,10423=>659,10424=>659,10425=>659,10426=>659,10427=>659,10428=>659,10429=>659,10430=>659,10431=>659,10432=>659,10433=>659,10434=>659,10435=>659,10436=>659,10437=>659,10438=>659,10439=>659,10440=>659,10441=>659,10442=>659,10443=>659,10444=>659,10445=>659,10446=>659,10447=>659,10448=>659,10449=>659,10450=>659,10451=>659,10452=>659,10453=>659,10454=>659,10455=>659,10456=>659,10457=>659,10458=>659,10459=>659,10460=>659,10461=>659,10462=>659,10463=>659,10464=>659,10465=>659,10466=>659,10467=>659,10468=>659,10469=>659,10470=>659,10471=>659,10472=>659,10473=>659,10474=>659,10475=>659,10476=>659,10477=>659,10478=>659,10479=>659,10480=>659,10481=>659,10482=>659,10483=>659,10484=>659,10485=>659,10486=>659,10487=>659,10488=>659,10489=>659,10490=>659,10491=>659,10492=>659,10493=>659,10494=>659,10495=>659,10502=>754,10503=>754,10506=>754,10507=>754,10560=>615,10561=>615,10627=>660,10628=>660,10702=>754,10703=>900,10704=>900,10705=>900,10706=>900,10707=>900,10708=>900,10709=>900,10731=>444,10746=>754,10747=>754,10752=>900,10753=>900,10754=>900,10764=>1192,10765=>469,10766=>469,10767=>469,10768=>469,10769=>469,10770=>469,10771=>469,10772=>469,10773=>469,10774=>469,10775=>469,10776=>469,10777=>469,10778=>469,10779=>469,10780=>469,10799=>754,10858=>754,10859=>754,10877=>754,10878=>754,10879=>754,10880=>754,10881=>754,10882=>754,10883=>754,10884=>754,10885=>754,10886=>754,10887=>754,10888=>754,10889=>754,10890=>754,10891=>754,10892=>754,10893=>754,10894=>754,10895=>754,10896=>754,10897=>754,10898=>754,10899=>754,10900=>754,10901=>754,10902=>754,10903=>754,10904=>754,10905=>754,10906=>754,10907=>754,10908=>754,10909=>754,10910=>754,10911=>754,10912=>754,10926=>754,10927=>754,10928=>754,10929=>754,10930=>754,10931=>754,10932=>754,10933=>754,10934=>754,10935=>754,10936=>754,10937=>754,10938=>754,11001=>754,11002=>754,11008=>754,11009=>754,11010=>754,11011=>754,11012=>754,11013=>754,11014=>754,11015=>754,11016=>754,11017=>754,11018=>754,11019=>754,11020=>754,11021=>754,11022=>752,11023=>752,11024=>752,11025=>752,11026=>850,11027=>850,11028=>850,11029=>850,11030=>692,11031=>692,11032=>692,11033=>692,11034=>850,11039=>782,11040=>782,11041=>786,11042=>786,11043=>786,11044=>1007,11091=>782,11092=>782,11360=>501,11361=>250,11362=>501,11363=>542,11364=>625,11365=>551,11366=>353,11367=>677,11368=>570,11369=>590,11370=>521,11371=>616,11372=>472,11373=>703,11374=>776,11375=>615,11376=>703,11377=>661,11378=>1015,11379=>865,11380=>532,11381=>589,11382=>511,11383=>593,11385=>373,11386=>550,11387=>441,11388=>157,11389=>387,11390=>571,11391=>616,11520=>532,11521=>535,11522=>508,11523=>541,11524=>528,11525=>819,11526=>563,11527=>856,11528=>536,11529=>546,11530=>858,11531=>558,11532=>536,11533=>833,11534=>535,11535=>725,11536=>838,11537=>526,11538=>533,11539=>831,11540=>857,11541=>745,11542=>536,11543=>535,11544=>531,11545=>532,11546=>532,11547=>558,11548=>828,11549=>530,11550=>527,11551=>523,11552=>822,11553=>536,11554=>535,11555=>533,11556=>577,11557=>811,11568=>582,11569=>799,11570=>799,11571=>614,11572=>615,11573=>571,11574=>505,11575=>615,11576=>615,11577=>568,11578=>568,11579=>614,11580=>787,11581=>616,11582=>441,11583=>616,11584=>799,11585=>799,11586=>270,11587=>564,11588=>677,11589=>590,11590=>475,11591=>616,11592=>580,11593=>568,11594=>452,11595=>857,11596=>700,11597=>673,11598=>558,11599=>265,11600=>700,11601=>265,11602=>677,11603=>569,11604=>799,11605=>799,11606=>677,11607=>288,11608=>674,11609=>799,11610=>799,11611=>628,11612=>690,11613=>616,11614=>628,11615=>560,11616=>615,11617=>677,11618=>568,11619=>709,11620=>510,11621=>709,11631=>463,11800=>478,11806=>754,11810=>351,11811=>351,11812=>351,11813=>351,11822=>478,19904=>807,19905=>807,19906=>807,19907=>807,19908=>807,19909=>807,19910=>807,19911=>807,19912=>807,19913=>807,19914=>807,19915=>807,19916=>807,19917=>807,19918=>807,19919=>807,19920=>807,19921=>807,19922=>807,19923=>807,19924=>807,19925=>807,19926=>807,19927=>807,19928=>807,19929=>807,19930=>807,19931=>807,19932=>807,19933=>807,19934=>807,19935=>807,19936=>807,19937=>807,19938=>807,19939=>807,19940=>807,19941=>807,19942=>807,19943=>807,19944=>807,19945=>807,19946=>807,19947=>807,19948=>807,19949=>807,19950=>807,19951=>807,19952=>807,19953=>807,19954=>807,19955=>807,19956=>807,19957=>807,19958=>807,19959=>807,19960=>807,19961=>807,19962=>807,19963=>807,19964=>807,19965=>807,19966=>807,19967=>807,42192=>617,42193=>542,42194=>542,42195=>693,42196=>549,42197=>549,42198=>697,42199=>590,42200=>590,42201=>460,42202=>628,42203=>633,42204=>616,42205=>518,42206=>518,42207=>776,42208=>673,42209=>501,42210=>571,42211=>625,42212=>625,42213=>615,42214=>615,42215=>677,42216=>697,42217=>460,42218=>890,42219=>616,42220=>549,42221=>617,42222=>615,42223=>615,42224=>568,42225=>568,42226=>265,42227=>708,42228=>659,42229=>659,42230=>501,42231=>690,42232=>270,42233=>270,42234=>536,42235=>536,42236=>270,42237=>270,42238=>529,42239=>529,42564=>571,42565=>469,42566=>318,42567=>304,42572=>1062,42573=>925,42576=>926,42577=>815,42580=>971,42581=>757,42582=>879,42583=>758,42594=>956,42595=>820,42596=>959,42597=>811,42598=>1060,42599=>907,42600=>708,42601=>550,42602=>770,42603=>641,42604=>1222,42605=>917,42606=>791,42634=>704,42635=>616,42636=>549,42637=>524,42644=>617,42645=>570,42760=>444,42761=>444,42762=>444,42763=>444,42764=>444,42765=>444,42766=>444,42767=>444,42768=>444,42769=>444,42770=>444,42771=>444,42772=>444,42773=>444,42774=>444,42779=>332,42780=>332,42781=>227,42782=>227,42783=>227,42786=>347,42787=>320,42788=>424,42789=>424,42790=>677,42791=>570,42792=>790,42793=>638,42794=>553,42795=>486,42800=>441,42801=>469,42802=>1125,42803=>886,42804=>1083,42805=>891,42806=>1028,42807=>883,42808=>874,42809=>736,42810=>874,42811=>736,42812=>863,42813=>736,42814=>633,42815=>494,42816=>590,42817=>524,42822=>612,42823=>353,42824=>523,42825=>384,42826=>726,42827=>633,42830=>1222,42831=>917,42832=>542,42833=>571,42834=>660,42835=>697,42838=>708,42839=>571,42852=>544,42853=>571,42854=>544,42855=>571,42880=>501,42881=>250,42882=>662,42883=>570,42889=>303,42890=>338,42891=>360,42892=>247,42893=>617,42894=>438,42896=>695,42897=>600,42912=>697,42913=>571,42914=>590,42915=>521,42916=>673,42917=>570,42918=>625,42919=>370,42920=>571,42921=>469,42922=>721,43002=>823,43003=>518,43004=>542,43005=>776,43006=>265,43007=>1079,61184=>192,61185=>214,61186=>231,61187=>237,61188=>240,61189=>214,61190=>192,61191=>214,61192=>231,61193=>237,61194=>231,61195=>214,61196=>192,61197=>214,61198=>231,61199=>237,61200=>231,61201=>214,61202=>192,61203=>214,61204=>240,61205=>237,61206=>231,61207=>214,61208=>192,61209=>247,61440=>879,61441=>879,61442=>879,61443=>879,62464=>522,62465=>522,62466=>561,62467=>800,62468=>526,62469=>522,62470=>587,62471=>793,62472=>500,62473=>522,62474=>1051,62475=>530,62476=>531,62477=>782,62478=>522,62479=>530,62480=>822,62481=>531,62482=>658,62483=>524,62484=>785,62485=>530,62486=>805,62487=>530,62488=>530,62489=>531,62490=>584,62491=>530,62492=>530,62493=>539,62494=>531,62495=>464,62496=>521,62497=>525,62498=>522,62499=>522,62500=>522,62501=>574,62502=>859,62504=>838,62505=>727,62506=>457,62507=>457,62508=>457,62509=>457,62510=>457,62511=>457,62512=>457,62513=>457,62514=>457,62515=>457,62516=>466,62517=>466,62518=>466,62519=>708,62520=>708,62521=>708,62522=>708,62523=>708,62524=>492,62525=>492,62526=>492,62527=>492,62528=>492,62529=>492,63173=>550,64256=>620,64257=>567,64258=>567,64259=>870,64260=>870,64261=>617,64262=>774,64275=>1081,64276=>1081,64277=>1076,64278=>1067,64279=>1376,64285=>201,64286=>0,64287=>297,64288=>572,64289=>770,64290=>696,64291=>815,64292=>694,64293=>759,64294=>769,64295=>726,64296=>788,64297=>754,64298=>637,64299=>637,64300=>637,64301=>637,64302=>602,64303=>602,64304=>602,64305=>520,64306=>371,64307=>491,64308=>588,64309=>320,64310=>365,64312=>583,64313=>297,64314=>483,64315=>476,64316=>511,64318=>611,64320=>359,64321=>584,64323=>576,64324=>562,64326=>534,64327=>638,64328=>508,64329=>637,64330=>591,64331=>245,64332=>520,64333=>476,64334=>562,64335=>566,64338=>847,64339=>883,64340=>250,64341=>271,64342=>847,64343=>883,64344=>250,64345=>271,64346=>847,64347=>883,64348=>250,64349=>271,64350=>847,64351=>883,64352=>250,64353=>271,64354=>847,64355=>883,64356=>250,64357=>271,64358=>847,64359=>883,64360=>250,64361=>271,64362=>933,64363=>932,64364=>430,64365=>455,64366=>933,64367=>932,64368=>430,64369=>455,64370=>581,64371=>581,64372=>556,64373=>581,64374=>581,64375=>581,64376=>556,64377=>581,64378=>581,64379=>581,64380=>556,64381=>581,64382=>581,64383=>581,64384=>556,64385=>581,64386=>400,64387=>472,64388=>400,64389=>472,64390=>400,64391=>472,64392=>400,64393=>472,64394=>435,64395=>497,64396=>435,64397=>497,64398=>805,64399=>805,64400=>428,64401=>497,64402=>805,64403=>805,64404=>428,64405=>497,64406=>805,64407=>805,64408=>428,64409=>497,64410=>805,64411=>805,64412=>428,64413=>497,64414=>661,64415=>685,64416=>661,64417=>685,64418=>250,64419=>271,64426=>628,64427=>568,64428=>475,64429=>415,64467=>742,64468=>758,64469=>428,64470=>497,64473=>435,64474=>465,64488=>250,64489=>271,64508=>704,64509=>750,64510=>250,64511=>271,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65136=>264,65137=>264,65138=>264,65139=>235,65140=>264,65142=>264,65143=>264,65144=>264,65145=>264,65146=>264,65147=>264,65148=>264,65149=>264,65150=>264,65151=>264,65152=>423,65153=>250,65154=>274,65155=>250,65156=>274,65157=>435,65158=>465,65159=>250,65160=>274,65161=>704,65162=>750,65163=>250,65164=>271,65165=>250,65166=>274,65167=>847,65168=>883,65169=>250,65170=>271,65171=>471,65172=>482,65173=>847,65174=>883,65175=>250,65176=>271,65177=>847,65178=>883,65179=>250,65180=>271,65181=>581,65182=>581,65183=>556,65184=>581,65185=>581,65186=>581,65187=>556,65188=>581,65189=>581,65190=>581,65191=>556,65192=>581,65193=>400,65194=>472,65195=>400,65196=>472,65197=>435,65198=>497,65199=>435,65200=>497,65201=>1099,65202=>1147,65203=>754,65204=>803,65205=>1099,65206=>1147,65207=>754,65208=>803,65209=>1088,65210=>1103,65211=>764,65212=>780,65213=>1088,65214=>1103,65215=>764,65216=>780,65217=>832,65218=>854,65219=>716,65220=>738,65221=>832,65222=>854,65223=>716,65224=>738,65225=>537,65226=>479,65227=>537,65228=>434,65229=>537,65230=>479,65231=>470,65232=>434,65233=>933,65234=>932,65235=>430,65236=>455,65237=>698,65238=>750,65239=>430,65240=>455,65241=>742,65242=>758,65243=>428,65244=>497,65245=>654,65246=>681,65247=>274,65248=>298,65249=>557,65250=>599,65251=>482,65252=>520,65253=>661,65254=>685,65255=>250,65256=>271,65257=>471,65258=>482,65259=>475,65260=>415,65261=>435,65262=>465,65263=>704,65264=>750,65265=>704,65266=>750,65267=>250,65268=>271,65269=>513,65270=>537,65271=>513,65272=>537,65273=>513,65274=>537,65275=>513,65276=>537,65279=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>923,65535=>540); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensed.z b/lib/combodo/tcpdf/fonts/dejavusanscondensed.z deleted file mode 100644 index 2053dd16f..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensed.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedb.ctg.z b/lib/combodo/tcpdf/fonts/dejavusanscondensedb.ctg.z deleted file mode 100644 index 71cef637e..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensedb.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedb.php b/lib/combodo/tcpdf/fonts/dejavusanscondensedb.php deleted file mode 100644 index 372bbdf61..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusanscondensedb.php +++ /dev/null @@ -1,16 +0,0 @@ -32,'FontBBox'=>'[-962 -415 1778 1174]','ItalicAngle'=>0,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>60,'StemH'=>26,'AvgWidth'=>515,'MaxWidth'=>1814,'MissingWidth'=>540); -$cbbox=array(0=>array(44,-177,495,705),33=>array(126,0,285,729),34=>array(85,458,383,729),35=>array(61,0,693,718),36=>array(70,-147,565,760),37=>array(29,-14,874,742),38=>array(54,-14,747,742),39=>array(85,458,190,729),40=>array(77,-132,339,759),41=>array(72,-132,334,759),42=>array(18,278,453,742),43=>array(95,0,659,627),44=>array(48,-142,250,189),45=>array(48,217,325,359),46=>array(92,0,250,189),47=>array(0,-93,329,729),48=>array(43,-14,583,742),49=>array(101,0,564,729),50=>array(71,0,548,742),51=>array(60,-14,555,742),52=>array(40,0,585,729),53=>array(69,-14,563,729),54=>array(56,-14,578,741),55=>array(60,0,555,729),56=>array(55,-14,571,742),57=>array(46,-14,569,741),58=>array(101,0,259,547),59=>array(57,-142,259,547),60=>array(95,30,659,597),61=>array(95,144,659,482),62=>array(95,30,659,597),63=>array(62,0,464,742),64=>array(59,-174,836,703),65=>array(4,0,692,729),66=>array(83,0,623,729),67=>array(44,-14,603,742),68=>array(83,0,700,729),69=>array(83,0,549,729),70=>array(83,0,540,729),71=>array(44,-14,672,742),72=>array(83,0,671,729),73=>array(83,0,252,729),74=>array(-51,-200,252,729),75=>array(83,0,725,729),76=>array(83,0,549,729),77=>array(83,0,813,729),78=>array(83,0,671,729),79=>array(44,-14,720,742),80=>array(83,0,623,729),81=>array(44,-146,720,742),82=>array(83,0,675,729),83=>array(64,-14,583,742),84=>array(4,0,609,729),85=>array(83,-14,648,729),86=>array(4,0,692,729),87=>array(26,0,965,729),88=>array(17,0,676,729),89=>array(-9,0,661,729),90=>array(40,0,612,729),91=>array(77,-132,351,760),92=>array(0,-93,329,729),93=>array(61,-132,334,760),94=>array(91,457,664,729),95=>array(0,-236,450,-143),96=>array(41,616,290,800),97=>array(39,-14,537,560),98=>array(75,-14,604,760),99=>array(39,-14,474,560),100=>array(40,-14,569,760),101=>array(39,-14,567,560),102=>array(17,0,400,760),103=>array(40,-216,569,559),104=>array(75,0,571,760),105=>array(75,0,233,760),106=>array(-30,-216,233,760),107=>array(75,0,616,760),108=>array(75,0,233,760),109=>array(75,0,867,560),110=>array(75,0,571,560),111=>array(39,-14,580,560),112=>array(75,-208,604,560),113=>array(40,-208,569,559),114=>array(75,0,441,560),115=>array(46,-14,493,560),116=>array(12,0,410,702),117=>array(70,-14,565,547),118=>array(13,0,574,547),119=>array(31,0,800,547),120=>array(13,0,567,547),121=>array(11,-216,571,547),122=>array(40,0,481,547),123=>array(112,-163,528,760),124=>array(114,-236,214,764),125=>array(112,-163,528,760),126=>array(95,212,659,415),161=>array(126,0,285,729),162=>array(76,-153,510,699),163=>array(55,0,552,742),164=>array(32,30,541,596),165=>array(11,0,616,729),166=>array(114,-171,214,699),167=>array(6,-95,447,742),168=>array(86,654,364,774),169=>array(124,0,776,725),170=>array(69,182,440,742),171=>array(69,67,497,519),172=>array(95,140,659,444),173=>array(48,217,325,359),174=>array(124,0,776,725),175=>array(86,668,364,760),176=>array(78,424,371,749),177=>array(95,0,659,627),178=>array(48,326,344,742),179=>array(40,319,346,742),180=>array(160,616,409,800),181=>array(76,-209,634,547),182=>array(57,-96,494,729),183=>array(92,253,250,442),184=>array(115,-196,314,0),185=>array(54,326,344,734),186=>array(51,182,457,742),187=>array(84,67,512,519),188=>array(44,-14,861,742),189=>array(44,-14,888,742),190=>array(45,-14,861,742),191=>array(62,-14,464,729),192=>array(4,0,692,927),193=>array(4,0,692,927),194=>array(4,0,692,927),195=>array(4,0,692,931),196=>array(4,0,692,927),197=>array(4,0,692,928),198=>array(0,0,911,729),199=>array(44,-196,603,742),200=>array(83,0,549,927),201=>array(83,0,549,927),202=>array(83,0,549,927),203=>array(83,0,549,927),204=>array(9,0,252,927),205=>array(83,0,303,927),206=>array(1,0,333,927),207=>array(28,0,306,927),208=>array(14,0,708,729),209=>array(83,0,671,928),210=>array(44,-14,720,927),211=>array(44,-14,720,927),212=>array(44,-14,720,927),213=>array(44,-14,720,928),214=>array(44,-14,720,927),215=>array(112,20,642,607),216=>array(20,-36,741,765),217=>array(83,-14,648,927),218=>array(83,-14,648,927),219=>array(83,-14,648,927),220=>array(83,-14,648,927),221=>array(-9,0,661,927),222=>array(83,0,623,729),223=>array(75,-14,608,760),224=>array(39,-14,537,800),225=>array(39,-14,537,800),226=>array(39,-14,537,800),227=>array(39,-14,537,778),228=>array(39,-14,537,774),229=>array(39,-14,537,888),230=>array(39,-14,900,560),231=>array(39,-196,474,560),232=>array(39,-14,567,800),233=>array(39,-14,567,800),234=>array(39,-14,567,800),235=>array(39,-14,567,774),236=>array(-19,0,233,800),237=>array(75,0,349,800),238=>array(-12,0,320,800),239=>array(15,0,292,774),240=>array(39,-14,580,760),241=>array(75,0,571,778),242=>array(39,-14,580,800),243=>array(39,-14,580,800),244=>array(39,-14,580,800),245=>array(39,-14,580,778),246=>array(39,-14,580,774),247=>array(95,42,659,585),248=>array(34,-46,581,594),249=>array(70,-14,565,800),250=>array(70,-14,565,800),251=>array(70,-14,565,800),252=>array(70,-14,565,774),253=>array(11,-216,571,800),254=>array(75,-208,604,760),255=>array(11,-216,571,774),256=>array(4,0,692,914),257=>array(39,-14,537,763),258=>array(4,0,692,935),259=>array(39,-14,537,780),260=>array(4,-196,692,729),261=>array(39,-196,537,560),262=>array(44,-14,603,927),263=>array(39,-14,501,800),264=>array(44,-14,603,927),265=>array(39,-14,488,800),266=>array(44,-14,603,927),267=>array(39,-14,474,760),268=>array(44,-14,603,927),269=>array(39,-14,483,800),270=>array(83,0,700,927),271=>array(40,-14,784,760),272=>array(14,0,708,729),273=>array(40,-14,637,760),274=>array(83,0,549,914),275=>array(39,-14,567,763),276=>array(83,0,549,927),277=>array(39,-14,567,784),278=>array(83,0,549,927),279=>array(39,-14,567,760),280=>array(83,-196,549,729),281=>array(39,-196,567,560),282=>array(83,0,549,927),283=>array(39,-14,567,800),284=>array(44,-14,672,927),285=>array(40,-216,569,800),286=>array(44,-14,672,927),287=>array(40,-216,569,784),288=>array(44,-14,672,927),289=>array(40,-216,569,760),290=>array(44,-224,672,742),291=>array(40,-216,569,765),292=>array(83,0,671,927),293=>array(-9,0,571,927),294=>array(83,0,794,729),295=>array(73,0,638,760),296=>array(14,0,320,928),297=>array(1,0,308,778),298=>array(28,0,306,914),299=>array(16,0,293,763),300=>array(19,0,315,927),301=>array(6,0,302,784),302=>array(83,-196,330,729),303=>array(75,-196,311,760),304=>array(83,0,252,927),305=>array(75,0,233,547),306=>array(83,-200,586,729),307=>array(75,-216,542,760),308=>array(-51,-200,333,927),309=>array(-30,-216,320,800),310=>array(83,-209,725,729),311=>array(75,-209,616,760),312=>array(75,0,616,547),313=>array(83,0,549,928),314=>array(75,0,321,928),315=>array(83,-209,549,729),316=>array(63,-209,246,760),317=>array(83,0,549,729),318=>array(75,0,432,760),319=>array(83,0,549,729),320=>array(75,0,436,760),321=>array(-41,0,554,729),322=>array(-17,0,352,760),323=>array(83,0,671,928),324=>array(75,0,571,803),325=>array(83,-209,671,729),326=>array(75,-209,571,560),327=>array(83,0,671,927),328=>array(75,0,571,800),329=>array(46,0,802,729),330=>array(75,-200,658,742),331=>array(75,-216,571,560),332=>array(44,-14,720,914),333=>array(39,-14,580,763),334=>array(44,-14,720,927),335=>array(39,-14,580,787),336=>array(44,-14,720,927),337=>array(39,-14,580,800),338=>array(44,-1,985,730),339=>array(39,-14,941,560),340=>array(83,0,675,928),341=>array(75,0,464,803),342=>array(83,-209,675,729),343=>array(63,-209,441,560),344=>array(83,0,675,927),345=>array(75,0,441,800),346=>array(64,-14,583,928),347=>array(46,-14,493,803),348=>array(64,-14,583,927),349=>array(46,-14,493,800),350=>array(64,-196,583,742),351=>array(46,-196,493,560),352=>array(64,-14,583,927),353=>array(46,-14,493,800),354=>array(4,-196,609,729),355=>array(12,-196,410,702),356=>array(4,0,609,930),357=>array(12,0,457,814),358=>array(4,0,609,729),359=>array(12,0,410,702),360=>array(83,-14,648,928),361=>array(70,-14,565,778),362=>array(83,-14,648,914),363=>array(70,-14,565,763),364=>array(83,-14,648,927),365=>array(70,-14,565,784),366=>array(83,-14,648,929),367=>array(70,-14,565,881),368=>array(83,-14,648,927),369=>array(70,-14,565,800),370=>array(83,-196,648,729),371=>array(70,-196,645,547),372=>array(26,0,965,931),373=>array(31,0,800,800),374=>array(-9,0,661,931),375=>array(11,-216,571,800),376=>array(-9,0,661,927),377=>array(40,0,612,928),378=>array(40,0,481,803),379=>array(40,0,612,929),380=>array(40,0,481,760),381=>array(40,0,612,927),382=>array(40,0,481,800),383=>array(17,0,400,760),384=>array(8,-14,604,760),385=>array(-62,0,667,729),386=>array(83,0,623,729),387=>array(75,-14,604,760),388=>array(35,0,659,729),389=>array(22,-14,627,760),390=>array(44,-14,603,742),391=>array(44,-14,736,924),392=>array(39,-14,579,724),393=>array(14,0,708,729),394=>array(-62,0,744,729),395=>array(63,0,603,729),396=>array(40,-14,569,760),397=>array(39,-222,580,560),398=>array(83,0,549,729),399=>array(45,-14,720,742),400=>array(60,-14,555,742),401=>array(-51,-200,540,729),402=>array(-52,-208,400,760),403=>array(44,-14,782,924),404=>array(2,-211,714,730),405=>array(75,0,900,760),406=>array(83,0,385,729),407=>array(4,0,346,729),408=>array(83,0,725,742),409=>array(75,0,616,760),410=>array(4,0,320,760),411=>array(-10,0,506,760),412=>array(75,-13,867,729),413=>array(-51,-200,671,729),414=>array(75,-208,571,560),415=>array(44,-14,720,742),416=>array(47,-14,769,761),417=>array(42,-14,637,609),418=>array(44,-14,906,742),419=>array(39,-216,744,560),420=>array(-62,0,667,729),421=>array(75,-208,604,760),422=>array(83,-146,684,729),423=>array(23,-14,541,742),424=>array(13,-14,460,560),425=>array(83,0,549,729),426=>array(-28,-217,505,760),427=>array(12,-216,410,702),428=>array(13,0,631,729),429=>array(12,0,410,760),430=>array(4,-200,609,729),431=>array(82,-14,750,761),432=>array(67,-14,660,609),433=>array(24,-14,741,728),434=>array(83,0,695,729),435=>array(-9,0,716,742),436=>array(11,-216,701,560),437=>array(40,0,612,729),438=>array(40,0,481,547),439=>array(65,-33,655,729),440=>array(37,-33,627,729),441=>array(33,-215,528,547),442=>array(51,-208,481,547),443=>array(71,0,548,742),444=>array(37,-33,655,729),445=>array(33,-215,528,547),446=>array(32,-15,473,702),447=>array(75,-208,604,560),448=>array(83,-208,252,729),449=>array(83,-208,510,729),450=>array(4,-208,482,729),451=>array(88,0,247,729),452=>array(83,0,1359,927),453=>array(83,0,1228,800),454=>array(40,-14,1125,800),455=>array(83,-200,826,729),456=>array(83,-216,807,760),457=>array(75,-216,542,760),458=>array(83,-200,1005,729),459=>array(83,-216,986,760),460=>array(75,-216,874,760),461=>array(4,0,692,927),462=>array(39,-14,537,800),463=>array(2,0,334,927),464=>array(1,0,333,800),465=>array(44,-14,720,927),466=>array(39,-14,580,800),467=>array(83,-14,648,927),468=>array(70,-14,565,800),469=>array(83,-14,648,1040),470=>array(70,-14,565,914),471=>array(83,-14,648,1114),472=>array(70,-14,565,917),473=>array(83,-14,648,1114),474=>array(70,-14,565,917),475=>array(83,-14,648,1114),476=>array(70,-14,565,917),477=>array(39,-14,567,560),478=>array(4,0,692,1040),479=>array(39,-14,537,914),480=>array(4,0,692,1042),481=>array(39,-14,537,914),482=>array(0,0,911,914),483=>array(39,-14,900,758),484=>array(44,-14,712,742),485=>array(40,-216,607,559),486=>array(44,-14,672,927),487=>array(40,-216,569,800),488=>array(83,0,725,927),489=>array(-5,0,616,927),490=>array(44,-196,720,742),491=>array(39,-196,580,560),492=>array(44,-196,720,914),493=>array(39,-196,580,763),494=>array(65,-33,655,927),495=>array(39,-215,534,793),496=>array(-30,-216,324,800),497=>array(83,0,1359,729),498=>array(83,0,1228,729),499=>array(40,-14,1125,760),500=>array(44,-14,672,928),501=>array(40,-216,569,800),502=>array(83,-14,1067,729),503=>array(83,-208,664,742),504=>array(83,0,671,927),505=>array(75,0,571,800),506=>array(4,0,692,931),507=>array(39,-14,637,931),508=>array(0,0,911,927),509=>array(39,-14,900,800),510=>array(20,-36,741,927),511=>array(34,-46,581,800),512=>array(4,0,692,928),513=>array(39,-14,537,800),514=>array(4,0,692,923),515=>array(39,-14,537,784),516=>array(83,0,549,928),517=>array(39,-14,567,800),518=>array(83,0,549,923),519=>array(39,-14,567,784),520=>array(-37,0,340,928),521=>array(-3,0,343,800),522=>array(21,0,316,923),523=>array(6,0,302,784),524=>array(44,-14,720,928),525=>array(39,-14,580,800),526=>array(44,-14,720,923),527=>array(39,-14,580,784),528=>array(83,0,675,928),529=>array(52,0,441,800),530=>array(83,0,675,923),531=>array(75,0,441,784),532=>array(83,-14,648,928),533=>array(70,-14,565,800),534=>array(83,-14,648,923),535=>array(70,-14,565,784),536=>array(64,-239,583,742),537=>array(46,-239,493,560),538=>array(4,-239,609,729),539=>array(12,-239,410,702),540=>array(60,-210,555,742),541=>array(44,-211,490,560),542=>array(83,0,671,927),543=>array(-11,0,571,927),544=>array(75,-208,658,742),545=>array(40,-75,740,760),546=>array(55,-14,673,742),547=>array(39,-14,554,646),548=>array(40,-216,612,729),549=>array(40,-216,481,547),550=>array(4,0,692,927),551=>array(39,-14,537,760),552=>array(83,-192,549,729),553=>array(39,-196,567,560),554=>array(44,-14,720,1040),555=>array(39,-14,580,914),556=>array(44,-14,720,1040),557=>array(39,-14,580,898),558=>array(44,-14,720,927),559=>array(39,-14,580,760),560=>array(44,-14,720,1042),561=>array(39,-14,580,914),562=>array(-9,0,661,914),563=>array(11,-216,571,763),564=>array(75,-75,404,760),565=>array(75,-75,742,560),566=>array(12,-76,422,702),567=>array(-30,-216,233,547),568=>array(40,-14,939,760),569=>array(40,-208,939,560),570=>array(-13,-36,709,765),571=>array(-31,-36,691,765),572=>array(-6,-46,540,594),573=>array(-1,0,549,729),574=>array(-54,-36,668,765),575=>array(46,-240,536,560),576=>array(40,-240,536,547),577=>array(35,0,667,729),578=>array(38,0,516,560),579=>array(5,0,623,729),580=>array(21,-14,710,729),581=>array(4,0,692,729),582=>array(83,-93,549,822),583=>array(39,-93,567,640),584=>array(-51,-200,324,729),585=>array(-30,-216,325,760),586=>array(43,-200,834,741),587=>array(40,-216,720,560),588=>array(5,0,675,729),589=>array(-19,0,441,560),590=>array(-9,0,661,729),591=>array(-4,-216,590,547),592=>array(70,-14,568,560),593=>array(40,-14,569,560),594=>array(75,-14,604,560),595=>array(75,-14,604,760),596=>array(39,-14,474,560),597=>array(39,-69,474,560),598=>array(40,-216,675,760),599=>array(40,-14,721,760),600=>array(39,-14,567,560),601=>array(39,-14,567,560),602=>array(53,-14,796,560),603=>array(48,-14,444,560),604=>array(48,-14,444,560),605=>array(48,-14,692,560),606=>array(48,-14,598,560),607=>array(-30,-216,325,547),608=>array(40,-216,721,760),609=>array(40,-216,569,547),610=>array(39,-14,491,546),611=>array(22,-211,557,547),612=>array(22,-21,557,547),613=>array(70,-214,565,547),614=>array(75,0,571,760),615=>array(75,-216,571,760),616=>array(75,0,416,760),617=>array(75,0,321,547),618=>array(75,0,416,547),619=>array(75,0,427,760),620=>array(75,0,549,760),621=>array(76,-216,386,760),622=>array(75,-215,714,760),623=>array(71,-14,863,546),624=>array(71,-209,863,546),625=>array(75,-216,868,560),626=>array(-30,-216,571,560),627=>array(75,-216,722,560),628=>array(75,0,561,547),629=>array(39,-14,580,560),630=>array(39,-1,744,547),631=>array(45,0,567,574),632=>array(54,-208,656,760),633=>array(75,-13,441,547),634=>array(75,-13,441,760),635=>array(75,-216,593,547),636=>array(75,-208,441,560),637=>array(75,-216,441,560),638=>array(75,0,477,547),639=>array(75,0,477,547),640=>array(46,0,532,547),641=>array(46,0,532,547),642=>array(46,-216,493,560),643=>array(-30,-216,388,760),644=>array(-10,-216,400,760),645=>array(75,-216,485,560),646=>array(-28,-217,505,760),647=>array(12,-155,410,547),648=>array(12,-216,410,702),649=>array(75,-14,753,547),650=>array(71,-14,624,547),651=>array(75,0,563,547),652=>array(13,0,574,547),653=>array(31,0,800,547),654=>array(11,0,571,763),655=>array(58,0,594,547),656=>array(40,-216,633,547),657=>array(40,-69,556,547),658=>array(39,-215,534,547),659=>array(51,-215,534,547),660=>array(32,0,473,759),661=>array(32,0,473,759),662=>array(32,0,473,759),663=>array(32,-208,473,759),664=>array(44,-14,720,742),665=>array(75,0,530,547),666=>array(48,-14,598,560),667=>array(39,0,624,760),668=>array(75,0,546,547),669=>array(-153,-216,307,760),670=>array(75,-213,616,547),671=>array(75,0,449,547),672=>array(40,-208,721,760),673=>array(32,0,473,759),674=>array(32,0,473,759),675=>array(40,-14,998,760),676=>array(40,-215,1050,760),677=>array(40,-55,997,760),678=>array(12,0,835,702),679=>array(12,-216,700,760),680=>array(12,-69,793,702),681=>array(17,-216,881,760),682=>array(75,0,734,760),683=>array(75,0,659,760),684=>array(20,0,512,641),685=>array(20,86,311,641),686=>array(-80,-214,566,760),687=>array(-80,-216,717,760),688=>array(48,326,365,751),689=>array(48,326,365,751),690=>array(-20,205,149,751),691=>array(48,326,283,640),692=>array(48,319,283,632),693=>array(48,205,379,632),694=>array(12,326,322,632),695=>array(20,326,512,632),696=>array(7,205,365,632),697=>array(70,557,196,800),698=>array(70,557,394,800),699=>array(92,418,286,729),700=>array(57,418,250,729),701=>array(111,616,267,856),702=>array(104,481,230,760),703=>array(104,481,230,760),704=>array(21,326,303,751),705=>array(21,326,303,751),706=>array(117,517,333,843),707=>array(117,517,333,843),708=>array(78,561,372,800),709=>array(78,561,372,800),710=>array(59,616,391,800),711=>array(59,616,391,800),712=>array(96,488,180,759),713=>array(86,668,364,760),714=>array(160,616,409,800),715=>array(41,616,290,800),716=>array(96,-81,180,190),717=>array(86,-184,364,-92),718=>array(41,-236,290,-52),719=>array(160,-236,409,-52),720=>array(41,0,221,547),721=>array(41,361,221,547),722=>array(104,269,230,547),723=>array(104,269,230,547),724=>array(124,238,322,458),725=>array(126,238,325,458),726=>array(48,119,326,427),727=>array(48,229,247,317),728=>array(77,639,373,784),729=>array(165,654,286,774),730=>array(100,610,351,888),731=>array(150,-196,338,0),732=>array(72,638,378,778),733=>array(84,616,431,800),734=>array(0,213,324,524),735=>array(100,616,349,800),736=>array(14,208,351,633),737=>array(48,326,149,751),738=>array(30,318,316,640),739=>array(9,326,363,632),740=>array(21,326,303,751),741=>array(86,0,364,693),742=>array(86,0,364,693),743=>array(86,0,364,693),744=>array(86,0,364,693),745=>array(86,0,364,693),748=>array(79,-260,373,-21),749=>array(86,605,364,822),750=>array(83,418,499,729),755=>array(100,-240,351,38),759=>array(72,-196,378,-84),768=>array(-410,616,-161,800),769=>array(-293,616,-44,800),770=>array(-392,616,-60,800),771=>array(-382,638,-75,778),772=>array(-365,668,-87,760),773=>array(-450,663,0,755),774=>array(-369,639,-73,784),775=>array(-305,617,-147,760),776=>array(-362,654,-84,774),777=>array(-333,616,-110,843),778=>array(-352,610,-101,888),779=>array(-364,616,-17,800),780=>array(-392,616,-60,800),781=>array(-268,615,-185,832),782=>array(-351,615,-101,832),783=>array(-436,616,-89,800),784=>array(-369,639,-73,882),785=>array(-369,639,-73,784),786=>array(-245,418,-62,563),787=>array(-239,595,-119,844),788=>array(-239,595,-119,844),789=>array(-80,616,80,800),790=>array(-410,-276,-161,-93),791=>array(-293,-276,-44,-93),792=>array(-342,-240,-190,-6),793=>array(-266,-240,-114,-6),794=>array(-202,658,42,929),795=>array(-158,400,19,609),796=>array(-298,-240,-194,-11),797=>array(-347,-240,-103,-59),798=>array(-350,-240,-105,-59),799=>array(-333,-240,-123,-6),800=>array(-350,-202,-105,-110),801=>array(-381,-216,-71,117),802=>array(-377,-216,-67,117),803=>array(-305,-212,-147,-70),804=>array(-362,-212,-84,-92),805=>array(-329,-240,-122,-11),806=>array(-294,-239,-112,-93),807=>array(-335,-196,-136,0),808=>array(-300,-196,-111,0),809=>array(-268,-240,-185,-47),810=>array(-365,-237,-87,-54),811=>array(-405,-239,-46,-94),812=>array(-392,-240,-60,-57),813=>array(-392,-240,-60,-57),814=>array(-369,-239,-73,-94),815=>array(-369,-240,-73,-95),816=>array(-382,-234,-75,-94),817=>array(-365,-184,-87,-92),818=>array(-450,-236,0,-143),819=>array(-450,-236,0,-9),820=>array(-563,212,1,415),821=>array(-424,214,-84,309),822=>array(-754,214,-78,309),823=>array(-590,-46,-43,594),824=>array(-743,-36,-21,765),825=>array(-257,-240,-153,-11),826=>array(-365,-238,-87,-55),827=>array(-299,-241,-88,-6),828=>array(-405,-239,-46,-94),829=>array(-342,585,-110,842),830=>array(-240,595,-114,867),831=>array(-450,528,0,755),832=>array(-410,616,-161,800),833=>array(-291,616,-42,800),834=>array(-379,638,-73,778),835=>array(-239,595,-119,844),836=>array(-364,654,-49,978),837=>array(-258,-208,-161,-45),838=>array(-363,639,-87,786),839=>array(-324,-226,-126,-35),840=>array(-342,-240,-108,-47),841=>array(-331,-240,-119,-21),842=>array(-378,616,-72,800),843=>array(-378,567,-72,850),844=>array(-378,573,-72,835),845=>array(-413,-230,-37,-30),846=>array(-322,-240,-128,-45),849=>array(-289,610,-161,888),850=>array(-369,640,-73,882),851=>array(-330,-240,-122,-9),855=>array(-289,610,-161,888),856=>array(-108,654,13,774),858=>array(-400,-240,-52,-11),860=>array(-390,-237,412,-79),861=>array(-390,802,412,960),862=>array(-401,797,401,889),863=>array(-401,-185,401,-93),864=>array(-326,756,326,894),865=>array(-401,769,401,927),866=>array(-404,-230,409,-30),880=>array(83,0,545,729),881=>array(75,0,433,547),882=>array(83,0,837,729),883=>array(83,0,670,729),884=>array(70,557,196,800),885=>array(70,-208,196,35),886=>array(83,0,671,729),887=>array(75,0,555,547),890=>array(182,-208,299,-45),891=>array(39,-14,474,560),892=>array(39,-14,474,560),893=>array(39,-14,474,560),894=>array(57,-142,259,547),900=>array(152,616,401,800),901=>array(86,654,401,978),902=>array(23,0,713,800),903=>array(92,253,250,442),904=>array(-22,0,694,800),905=>array(-17,0,824,800),906=>array(-19,0,405,800),908=>array(-17,-14,753,800),910=>array(-24,0,893,800),911=>array(-27,0,780,800),912=>array(21,-19,335,978),913=>array(4,0,692,729),914=>array(83,0,623,729),915=>array(83,0,549,729),916=>array(4,0,692,729),917=>array(83,0,549,729),918=>array(40,0,612,729),919=>array(83,0,671,729),920=>array(44,-14,720,742),921=>array(83,0,252,729),922=>array(83,0,725,729),923=>array(4,0,692,729),924=>array(83,0,813,729),925=>array(83,0,671,729),926=>array(88,0,493,729),927=>array(44,-14,720,742),928=>array(83,0,671,729),929=>array(83,0,623,729),931=>array(83,0,549,729),932=>array(4,0,609,729),933=>array(-9,0,661,729),934=>array(44,0,720,729),935=>array(17,0,676,729),936=>array(50,0,716,729),937=>array(24,0,741,742),938=>array(31,0,308,927),939=>array(-9,0,661,927),940=>array(43,-13,581,800),941=>array(48,-14,444,800),942=>array(75,-208,571,800),943=>array(69,-19,318,800),944=>array(70,-10,567,978),945=>array(43,-13,581,559),946=>array(75,-208,604,773),947=>array(13,-208,600,547),948=>array(39,-14,580,768),949=>array(48,-14,444,560),950=>array(39,-208,488,760),951=>array(75,-208,571,560),952=>array(39,-11,580,768),953=>array(70,-19,313,547),954=>array(75,0,589,547),955=>array(26,0,543,760),956=>array(76,-209,634,547),957=>array(13,0,571,547),958=>array(39,-208,488,760),959=>array(39,-14,580,560),960=>array(38,-19,659,547),961=>array(75,-208,604,562),962=>array(39,-208,474,560),963=>array(39,-14,654,547),964=>array(19,-19,551,547),965=>array(70,-10,567,547),966=>array(58,-208,652,552),967=>array(22,-208,558,547),968=>array(58,-208,652,547),969=>array(39,-13,744,547),970=>array(17,-19,320,774),971=>array(70,-10,567,774),972=>array(39,-14,580,800),973=>array(70,-10,567,800),974=>array(39,-13,744,800),975=>array(83,-208,725,729),976=>array(49,-11,518,768),977=>array(46,-11,551,768),978=>array(18,0,646,729),979=>array(-22,0,859,800),980=>array(18,0,646,927),981=>array(54,-208,656,760),982=>array(20,-13,759,547),983=>array(49,-205,619,548),984=>array(44,-208,720,742),985=>array(39,-208,580,560),986=>array(44,-208,610,729),987=>array(39,-208,487,547),988=>array(83,0,540,729),989=>array(-51,-208,393,760),990=>array(54,2,582,729),991=>array(73,0,514,759),992=>array(50,-208,759,742),993=>array(20,-180,483,559),994=>array(44,-213,939,729),995=>array(53,-208,698,547),996=>array(44,-208,667,742),997=>array(40,-208,569,560),998=>array(83,-213,791,729),999=>array(18,-14,621,575),1000=>array(38,-208,624,745),1001=>array(41,-208,547,560),1002=>array(47,0,663,742),1003=>array(44,0,560,560),1004=>array(44,-14,644,758),1005=>array(75,-14,604,758),1006=>array(25,-208,589,729),1007=>array(24,-208,507,729),1008=>array(49,-7,619,548),1009=>array(75,-216,604,562),1010=>array(39,-14,474,560),1011=>array(-30,-216,233,760),1012=>array(44,-14,720,742),1013=>array(61,-14,496,560),1014=>array(72,-14,507,560),1015=>array(83,0,623,729),1016=>array(75,-208,604,760),1017=>array(44,-14,603,742),1018=>array(83,0,813,729),1019=>array(66,-208,584,547),1020=>array(30,-208,604,562),1021=>array(30,-14,588,742),1022=>array(44,-14,603,742),1023=>array(30,-14,588,742),1024=>array(83,0,549,927),1025=>array(83,0,549,927),1026=>array(4,-200,718,729),1027=>array(83,0,549,928),1028=>array(44,-14,603,742),1029=>array(64,-14,583,742),1030=>array(83,0,252,729),1031=>array(28,0,306,927),1032=>array(-51,-200,252,729),1033=>array(41,0,992,729),1034=>array(83,0,954,729),1035=>array(4,0,718,729),1036=>array(83,0,723,928),1037=>array(83,0,671,927),1038=>array(26,0,667,927),1039=>array(83,-157,671,729),1040=>array(4,0,692,729),1041=>array(83,0,623,729),1042=>array(83,0,623,729),1043=>array(83,0,549,729),1044=>array(54,-157,748,729),1045=>array(83,0,549,729),1046=>array(13,0,1089,729),1047=>array(59,-14,580,742),1048=>array(83,0,671,729),1049=>array(83,0,671,927),1050=>array(83,0,723,729),1051=>array(41,0,665,729),1052=>array(83,0,813,729),1053=>array(83,0,671,729),1054=>array(44,-14,720,742),1055=>array(83,0,671,729),1056=>array(83,0,623,729),1057=>array(44,-14,603,742),1058=>array(4,0,609,729),1059=>array(26,0,667,729),1060=>array(44,0,848,729),1061=>array(17,0,676,729),1062=>array(83,-157,781,729),1063=>array(72,0,645,729),1064=>array(83,0,1029,729),1065=>array(83,-157,1139,729),1066=>array(44,0,801,729),1067=>array(83,0,850,729),1068=>array(83,0,623,729),1069=>array(57,-14,616,742),1070=>array(83,-14,1007,742),1071=>array(57,0,611,729),1072=>array(39,-14,537,560),1073=>array(39,-14,590,792),1074=>array(75,0,530,547),1075=>array(75,0,449,547),1076=>array(50,-138,677,547),1077=>array(39,-14,567,560),1078=>array(13,0,883,547),1079=>array(44,-14,466,560),1080=>array(75,0,555,547),1081=>array(75,0,555,765),1082=>array(75,0,598,547),1083=>array(49,0,584,547),1084=>array(75,0,660,547),1085=>array(75,0,546,547),1086=>array(39,-14,580,560),1087=>array(75,0,546,547),1088=>array(75,-208,604,560),1089=>array(39,-14,474,560),1090=>array(3,0,518,547),1091=>array(11,-216,571,547),1092=>array(49,-208,844,760),1093=>array(13,0,567,547),1094=>array(75,-138,628,547),1095=>array(58,0,516,547),1096=>array(75,0,875,547),1097=>array(75,-138,957,547),1098=>array(18,0,641,547),1099=>array(75,0,741,547),1100=>array(75,0,530,547),1101=>array(60,-14,495,560),1102=>array(75,-14,835,560),1103=>array(27,0,504,547),1104=>array(39,-14,567,803),1105=>array(39,-14,567,774),1106=>array(18,-216,602,760),1107=>array(75,0,468,803),1108=>array(39,-14,474,560),1109=>array(46,-14,493,560),1110=>array(75,0,233,760),1111=>array(15,0,292,774),1112=>array(-30,-216,233,760),1113=>array(40,0,848,547),1114=>array(75,0,821,547),1115=>array(18,0,591,760),1116=>array(75,0,598,803),1117=>array(75,0,555,803),1118=>array(11,-216,571,765),1119=>array(75,-138,546,547),1120=>array(44,-14,939,729),1121=>array(39,-13,744,547),1122=>array(44,0,712,729),1123=>array(18,0,623,731),1124=>array(83,-14,854,742),1125=>array(75,-14,685,560),1126=>array(7,0,886,729),1127=>array(22,0,727,547),1128=>array(83,0,1216,729),1129=>array(75,0,988,547),1130=>array(44,0,720,729),1131=>array(39,0,580,547),1132=>array(83,0,1023,729),1133=>array(75,0,868,547),1134=>array(48,-208,555,938),1135=>array(35,-193,444,756),1136=>array(8,0,954,729),1137=>array(8,-208,942,759),1138=>array(44,-14,720,742),1139=>array(39,-14,580,560),1140=>array(4,0,743,742),1141=>array(8,0,613,560),1142=>array(4,0,743,928),1143=>array(8,0,613,800),1144=>array(42,-216,1018,742),1145=>array(39,-216,923,560),1146=>array(44,-14,922,742),1147=>array(39,-14,738,560),1148=>array(51,-14,1213,928),1149=>array(42,-13,1014,828),1150=>array(44,-14,939,910),1151=>array(39,-13,744,746),1152=>array(44,-208,603,742),1153=>array(39,-208,474,560),1154=>array(24,-33,469,488),1155=>array(-541,606,-77,822),1156=>array(-372,638,0,784),1157=>array(-329,595,-208,785),1158=>array(-329,595,-208,785),1159=>array(-716,592,4,788),1160=>array(-962,-179,345,928),1161=>array(-896,-280,275,1022),1162=>array(83,-208,839,927),1163=>array(75,-208,704,765),1164=>array(21,0,623,729),1165=>array(0,0,511,702),1166=>array(83,0,632,729),1167=>array(75,-208,604,560),1168=>array(83,0,549,878),1169=>array(75,0,449,700),1170=>array(25,0,575,729),1171=>array(18,0,467,547),1172=>array(83,-200,655,729),1173=>array(75,-216,532,547),1174=>array(13,-157,1089,729),1175=>array(13,-138,883,547),1176=>array(59,-196,580,742),1177=>array(44,-196,466,560),1178=>array(83,-157,723,729),1179=>array(75,-138,598,547),1180=>array(83,0,723,729),1181=>array(75,0,598,547),1182=>array(21,0,723,729),1183=>array(6,0,598,760),1184=>array(22,0,901,729),1185=>array(18,0,730,547),1186=>array(83,-157,839,729),1187=>array(75,-138,705,547),1188=>array(83,0,968,729),1189=>array(75,0,762,547),1190=>array(83,-200,1074,729),1191=>array(75,-216,845,547),1192=>array(50,-14,832,743),1193=>array(49,-14,752,560),1194=>array(44,-196,603,742),1195=>array(39,-196,474,560),1196=>array(4,-157,609,729),1197=>array(3,-138,518,547),1198=>array(-9,0,661,729),1199=>array(11,-216,571,547),1200=>array(-9,0,661,729),1201=>array(11,-216,571,547),1202=>array(17,-157,676,729),1203=>array(13,-138,567,547),1204=>array(4,-157,979,729),1205=>array(3,-138,878,547),1206=>array(72,-157,813,729),1207=>array(58,-138,674,547),1208=>array(72,0,645,729),1209=>array(58,0,516,547),1210=>array(72,0,645,729),1211=>array(75,0,571,760),1212=>array(6,-14,879,742),1213=>array(4,-14,686,560),1214=>array(6,-184,879,742),1215=>array(4,-161,686,560),1216=>array(83,0,252,729),1217=>array(13,0,1089,927),1218=>array(13,0,883,784),1219=>array(83,-200,692,729),1220=>array(75,-216,563,547),1221=>array(23,-208,834,729),1222=>array(19,-208,703,547),1223=>array(83,-200,671,729),1224=>array(75,-216,547,547),1225=>array(83,-208,839,729),1226=>array(75,-208,704,547),1227=>array(72,-157,645,729),1228=>array(58,-138,516,547),1229=>array(83,-208,981,729),1230=>array(75,-208,817,547),1231=>array(75,0,233,760),1232=>array(4,0,692,935),1233=>array(39,-14,537,780),1234=>array(4,0,692,927),1235=>array(39,-14,537,774),1236=>array(0,0,911,729),1237=>array(39,-14,900,560),1238=>array(83,0,549,927),1239=>array(39,-14,567,784),1240=>array(45,-14,720,742),1241=>array(39,-14,567,560),1242=>array(45,-14,720,927),1243=>array(39,-14,567,774),1244=>array(13,0,1089,927),1245=>array(13,0,883,774),1246=>array(59,-14,580,927),1247=>array(44,-14,466,773),1248=>array(65,-33,655,729),1249=>array(39,-215,534,547),1250=>array(83,0,671,914),1251=>array(75,0,555,763),1252=>array(83,0,671,927),1253=>array(75,0,555,774),1254=>array(44,-14,720,927),1255=>array(39,-14,580,774),1256=>array(44,-14,720,742),1257=>array(39,-14,580,560),1258=>array(44,-14,720,927),1259=>array(39,-14,580,774),1260=>array(57,-14,616,927),1261=>array(60,-14,495,774),1262=>array(26,0,667,914),1263=>array(11,-216,571,763),1264=>array(26,0,667,927),1265=>array(11,-216,571,774),1266=>array(26,0,667,927),1267=>array(11,-216,571,800),1268=>array(72,0,645,927),1269=>array(58,0,516,774),1270=>array(83,-157,549,729),1271=>array(75,-138,449,547),1272=>array(83,0,850,927),1273=>array(75,0,741,774),1274=>array(25,-216,575,729),1275=>array(18,-217,467,547),1276=>array(17,-200,676,729),1277=>array(13,-216,558,547),1278=>array(17,0,676,729),1279=>array(13,0,567,547),1280=>array(63,0,604,729),1281=>array(40,0,472,547),1282=>array(63,-14,973,729),1283=>array(40,-14,765,547),1284=>array(88,-14,925,742),1285=>array(70,-14,752,560),1286=>array(88,-208,724,742),1287=>array(70,-208,602,560),1288=>array(23,-14,1035,729),1289=>array(19,-14,839,547),1290=>array(83,-14,1067,729),1291=>array(75,-14,845,547),1292=>array(44,-14,673,742),1293=>array(39,-14,490,546),1294=>array(4,-14,762,729),1295=>array(3,-14,638,547),1296=>array(60,-14,555,742),1297=>array(48,-14,444,560),1298=>array(41,-200,665,729),1299=>array(49,-216,584,547),1300=>array(41,0,1139,729),1301=>array(49,0,948,547),1302=>array(83,0,941,729),1303=>array(75,-208,868,560),1304=>array(57,0,908,729),1305=>array(27,-14,869,560),1306=>array(44,-146,720,742),1307=>array(40,-208,569,559),1308=>array(26,0,965,729),1309=>array(31,0,800,547),1310=>array(83,0,723,729),1311=>array(75,0,598,547),1312=>array(41,-200,1068,729),1313=>array(49,-216,883,547),1314=>array(83,-200,1074,729),1315=>array(75,-216,845,547),1316=>array(83,-157,839,729),1317=>array(75,-138,704,547),1329=>array(74,-38,658,729),1330=>array(74,0,590,743),1331=>array(23,0,655,743),1332=>array(20,0,659,743),1333=>array(74,-14,590,729),1334=>array(59,0,598,743),1335=>array(74,0,563,729),1336=>array(74,0,590,743),1337=>array(74,-13,813,742),1338=>array(23,-14,655,729),1339=>array(74,0,583,729),1340=>array(74,0,494,729),1341=>array(74,-14,799,729),1342=>array(55,-12,650,741),1343=>array(66,0,576,729),1344=>array(4,-46,539,729),1345=>array(59,-48,598,743),1346=>array(16,0,644,743),1347=>array(20,0,594,735),1348=>array(74,-14,702,729),1349=>array(51,-14,581,743),1350=>array(0,-14,628,729),1351=>array(51,-14,590,729),1352=>array(74,0,583,743),1353=>array(35,-48,574,743),1354=>array(16,0,710,743),1355=>array(51,0,589,743),1356=>array(74,0,702,743),1357=>array(83,-14,648,729),1358=>array(16,0,644,729),1359=>array(47,-14,577,743),1360=>array(74,0,583,743),1361=>array(51,-14,581,743),1362=>array(74,0,511,729),1363=>array(20,0,730,729),1364=>array(8,0,581,743),1365=>array(44,-14,720,742),1366=>array(40,-14,750,729),1369=>array(94,481,207,760),1370=>array(51,418,225,729),1371=>array(0,616,279,800),1372=>array(0,595,338,893),1373=>array(-6,614,261,847),1374=>array(0,586,414,878),1375=>array(35,618,391,893),1377=>array(64,-13,777,547),1378=>array(68,-208,514,560),1379=>array(35,-208,630,559),1380=>array(68,-208,633,560),1381=>array(64,-14,510,760),1382=>array(35,-208,630,559),1383=>array(68,0,479,760),1384=>array(68,-208,521,560),1385=>array(68,-208,681,560),1386=>array(35,-14,630,760),1387=>array(68,-208,514,760),1388=>array(68,-208,369,547),1389=>array(68,-208,818,760),1390=>array(35,-14,540,760),1391=>array(64,-208,510,760),1392=>array(68,0,514,760),1393=>array(23,-13,483,760),1394=>array(68,-208,633,560),1395=>array(55,-13,514,768),1396=>array(64,-13,629,760),1397=>array(-27,-216,210,547),1398=>array(-55,-13,510,760),1399=>array(12,-208,410,560),1400=>array(68,0,514,560),1401=>array(4,-208,338,547),1402=>array(64,-208,777,546),1403=>array(40,-208,480,560),1404=>array(68,0,560,560),1405=>array(64,-13,510,547),1406=>array(64,-208,629,760),1407=>array(64,-13,777,560),1408=>array(68,-208,514,560),1409=>array(40,-216,568,559),1410=>array(68,0,427,547),1411=>array(64,-208,777,760),1412=>array(-51,-208,544,560),1413=>array(40,-14,581,560),1414=>array(27,-190,697,760),1415=>array(64,-14,727,760),1417=>array(90,0,233,547),1418=>array(44,180,292,359),1456=>array(267,-229,355,-10),1457=>array(132,-229,452,-10),1458=>array(124,-229,443,-10),1459=>array(113,-229,443,-10),1460=>array(267,-171,355,-73),1461=>array(201,-171,421,-73),1462=>array(211,-229,410,-10),1463=>array(157,-171,465,0),1464=>array(167,-217,454,0),1465=>array(-22,547,66,723),1466=>array(-22,547,66,723),1467=>array(167,-239,476,-5),1468=>array(271,225,359,322),1469=>array(267,-217,355,-22),1470=>array(48,413,325,555),1471=>array(167,547,454,710),1472=>array(88,-98,246,645),1473=>array(677,613,766,710),1474=>array(123,613,211,710),1475=>array(88,0,246,547),1478=>array(70,0,416,547),1479=>array(167,-229,454,-10),1488=>array(75,0,580,547),1489=>array(39,0,510,547),1490=>array(39,-9,376,547),1491=>array(39,0,491,547),1492=>array(82,0,537,547),1493=>array(82,0,228,547),1494=>array(39,0,322,547),1495=>array(82,0,537,547),1496=>array(81,-13,562,553),1497=>array(60,164,206,547),1498=>array(39,-240,438,547),1499=>array(39,0,460,547),1500=>array(39,0,475,711),1501=>array(82,0,545,547),1502=>array(39,0,570,554),1503=>array(82,-240,228,547),1504=>array(39,0,326,547),1505=>array(81,-13,562,547),1506=>array(39,-101,518,547),1507=>array(82,-240,526,547),1508=>array(82,0,542,547),1509=>array(10,-240,489,548),1510=>array(29,0,508,547),1511=>array(82,-240,594,546),1512=>array(39,0,460,547),1513=>array(18,0,675,547),1514=>array(9,-4,533,547),1520=>array(82,0,517,547),1521=>array(60,0,472,547),1522=>array(60,164,450,547),1523=>array(75,361,324,547),1524=>array(75,361,563,547),1542=>array(-2,-20,567,892),1543=>array(-2,-20,567,897),1545=>array(58,0,729,635),1546=>array(58,0,976,635),1548=>array(88,0,290,331),1557=>array(108,612,341,868),1563=>array(88,0,291,689),1567=>array(62,0,464,742),1569=>array(65,20,394,493),1570=>array(-18,0,326,955),1571=>array(68,0,233,993),1572=>array(-38,-244,492,603),1573=>array(68,-245,233,760),1574=>array(57,-107,777,603),1575=>array(75,0,233,760),1576=>array(57,-149,829,327),1577=>array(43,-30,486,513),1578=>array(57,-5,829,415),1579=>array(57,-5,829,537),1580=>array(69,-244,648,425),1581=>array(69,-244,648,425),1582=>array(69,-244,648,579),1583=>array(55,-15,398,415),1584=>array(55,-15,398,579),1585=>array(-38,-244,458,269),1586=>array(-38,-244,458,457),1587=>array(57,-244,1167,366),1588=>array(57,-244,1167,586),1589=>array(57,-244,1138,362),1590=>array(57,-244,1138,457),1591=>array(63,0,875,760),1592=>array(63,0,875,760),1593=>array(79,-244,648,521),1594=>array(79,-244,648,652),1600=>array(-9,0,316,125),1601=>array(57,-24,974,627),1602=>array(47,-215,743,635),1603=>array(63,-27,733,760),1604=>array(63,-142,700,760),1605=>array(62,-244,594,369),1606=>array(55,-165,702,457),1607=>array(43,-30,486,358),1608=>array(-38,-244,492,322),1609=>array(57,-107,777,462),1610=>array(57,-244,777,462),1611=>array(97,591,354,825),1612=>array(97,591,354,881),1613=>array(97,-239,354,-5),1614=>array(97,591,354,723),1615=>array(97,590,354,881),1616=>array(97,-137,354,-5),1617=>array(79,599,371,869),1618=>array(104,610,345,878),1619=>array(53,584,397,735),1620=>array(138,601,302,822),1621=>array(139,-245,303,-23),1623=>array(97,615,354,906),1626=>array(89,616,361,775),1632=>array(196,195,353,366),1633=>array(125,0,388,635),1634=>array(11,0,539,635),1635=>array(11,0,538,635),1636=>array(66,-10,478,646),1637=>array(57,-10,492,643),1638=>array(33,0,517,635),1639=>array(13,0,536,635),1640=>array(13,0,536,635),1641=>array(28,0,532,640),1642=>array(58,0,491,635),1643=>array(0,-118,314,318),1644=>array(57,418,250,729),1645=>array(38,101,453,537),1646=>array(57,-5,829,327),1647=>array(47,-215,743,484),1648=>array(194,600,256,885),1652=>array(46,641,209,863),1657=>array(57,-5,829,599),1658=>array(57,-5,829,566),1659=>array(57,-244,829,327),1660=>array(57,-171,829,415),1661=>array(57,-5,829,566),1662=>array(57,-244,829,327),1663=>array(57,-5,829,566),1664=>array(57,-244,829,327),1665=>array(69,-244,648,725),1666=>array(69,-244,648,737),1667=>array(69,-244,648,425),1668=>array(69,-244,648,425),1669=>array(69,-244,648,737),1670=>array(69,-244,648,425),1671=>array(69,-244,648,425),1672=>array(55,-15,398,746),1673=>array(55,-180,398,415),1674=>array(55,-171,398,415),1675=>array(55,-171,398,746),1676=>array(55,-15,398,586),1677=>array(55,-146,398,415),1678=>array(55,-15,398,708),1679=>array(55,-15,398,684),1680=>array(55,-15,398,708),1681=>array(-38,-244,468,648),1682=>array(-38,-244,488,556),1683=>array(-38,-244,529,269),1684=>array(-38,-244,470,269),1685=>array(-38,-244,678,269),1686=>array(-38,-244,470,269),1687=>array(-38,-244,458,464),1688=>array(-38,-244,458,586),1689=>array(-38,-244,458,586),1690=>array(57,-244,1167,464),1691=>array(57,-244,1167,366),1692=>array(57,-244,1167,586),1693=>array(57,-244,1138,362),1694=>array(57,-244,1138,586),1695=>array(63,0,875,760),1696=>array(79,-244,648,781),1697=>array(57,-24,974,484),1698=>array(57,-171,974,484),1699=>array(57,-171,974,635),1700=>array(57,-24,974,786),1701=>array(57,-293,974,484),1702=>array(57,-24,974,786),1703=>array(47,-215,743,635),1704=>array(47,-215,743,757),1705=>array(57,-39,922,760),1706=>array(57,-39,1075,760),1707=>array(57,-39,922,760),1708=>array(63,-27,733,760),1709=>array(63,-27,733,854),1710=>array(63,-293,733,760),1711=>array(57,-39,922,910),1712=>array(57,-39,922,910),1713=>array(57,-39,922,910),1714=>array(57,-171,922,910),1715=>array(57,-293,922,910),1716=>array(57,-39,922,1025),1717=>array(63,-142,757,971),1718=>array(63,-142,700,952),1719=>array(63,-142,703,1025),1720=>array(63,-391,700,760),1721=>array(55,-317,702,464),1722=>array(55,-165,702,366),1723=>array(55,-165,702,636),1724=>array(55,-330,702,464),1725=>array(55,-165,702,586),1726=>array(63,-33,790,506),1727=>array(69,-244,648,579),1734=>array(-38,-244,492,556),1740=>array(57,-107,777,462),1742=>array(57,-107,777,556),1749=>array(43,-30,486,358),1776=>array(196,195,353,366),1777=>array(125,0,388,635),1778=>array(11,0,539,635),1779=>array(11,0,538,635),1780=>array(11,0,516,650),1781=>array(27,-8,522,643),1782=>array(77,0,463,645),1783=>array(13,0,536,635),1784=>array(13,0,536,635),1785=>array(28,0,532,640),1984=>array(43,-14,583,742),1985=>array(62,0,525,729),1986=>array(71,0,555,729),1987=>array(71,0,555,729),1988=>array(71,0,555,729),1989=>array(71,0,555,729),1990=>array(71,0,555,729),1991=>array(88,0,539,729),1992=>array(88,0,539,729),1993=>array(63,0,563,742),1994=>array(75,0,233,729),1995=>array(39,-14,454,465),1996=>array(13,0,476,729),1997=>array(13,0,574,451),1998=>array(75,0,546,451),1999=>array(75,0,546,451),2000=>array(41,0,493,742),2001=>array(75,0,546,667),2002=>array(39,0,738,742),2003=>array(75,0,421,729),2004=>array(75,0,421,729),2005=>array(75,0,526,729),2006=>array(75,0,543,729),2007=>array(13,0,324,729),2008=>array(75,0,845,532),2009=>array(13,0,442,729),2010=>array(13,0,730,729),2011=>array(75,0,546,451),2012=>array(13,0,574,729),2013=>array(75,0,782,729),2014=>array(75,0,489,729),2015=>array(39,0,623,729),2016=>array(13,0,442,729),2017=>array(13,0,574,729),2018=>array(39,0,479,729),2019=>array(75,0,489,729),2020=>array(75,0,489,581),2021=>array(75,0,489,729),2022=>array(39,0,479,729),2023=>array(39,0,479,729),2027=>array(85,668,363,760),2028=>array(56,638,394,777),2029=>array(167,654,287,774),2030=>array(58,616,390,800),2031=>array(29,616,395,803),2032=>array(56,638,394,777),2033=>array(29,616,395,803),2034=>array(165,-212,286,-92),2035=>array(86,654,364,774),2036=>array(57,418,250,729),2037=>array(92,418,286,729),2040=>array(75,0,546,562),2041=>array(75,0,546,564),2042=>array(-9,0,382,125),3647=>array(56,-147,575,760),3713=>array(39,-14,635,560),3714=>array(39,-14,650,560),3716=>array(39,-14,634,560),3719=>array(18,-241,470,561),3720=>array(38,0,635,560),3722=>array(35,-269,691,560),3725=>array(35,-24,642,610),3732=>array(38,-14,583,560),3733=>array(38,-19,583,561),3734=>array(-20,-240,615,560),3735=>array(18,-14,691,560),3737=>array(33,-15,613,560),3738=>array(34,-15,598,561),3739=>array(34,-15,598,760),3740=>array(54,-12,819,626),3741=>array(58,-14,686,760),3742=>array(68,-14,696,560),3743=>array(68,-14,696,760),3745=>array(22,-14,694,547),3746=>array(35,-23,642,760),3747=>array(43,-10,660,615),3749=>array(37,-33,624,560),3751=>array(29,-33,576,561),3754=>array(46,-21,738,724),3755=>array(40,-21,841,620),3757=>array(47,-20,596,606),3758=>array(43,-14,743,698),3759=>array(39,-259,808,648),3760=>array(32,-16,592,567),3761=>array(-588,610,-27,896),3762=>array(35,0,507,593),3763=>array(-432,0,507,875),3764=>array(-589,622,-55,950),3765=>array(-589,633,12,962),3766=>array(-589,622,-55,950),3767=>array(-589,633,12,962),3768=>array(-383,-385,-148,-55),3769=>array(-426,-316,-156,-28),3771=>array(-588,610,-27,896),3772=>array(-614,-311,13,-48),3773=>array(35,-220,623,776),3776=>array(75,-13,400,561),3777=>array(75,-13,737,561),3778=>array(-34,-14,413,936),3779=>array(21,-14,536,879),3780=>array(-13,-35,527,809),3782=>array(63,-240,620,582),3784=>array(-372,659,-267,844),3785=>array(-565,622,-20,918),3786=>array(-601,621,35,965),3787=>array(-470,612,-167,917),3788=>array(-614,603,13,866),3789=>array(-432,668,-207,875),3792=>array(59,-29,650,563),3793=>array(22,-139,649,586),3794=>array(28,-80,543,711),3795=>array(22,-14,794,981),3796=>array(43,-156,627,711),3797=>array(43,-156,627,711),3798=>array(58,-14,805,950),3799=>array(39,-240,635,560),3800=>array(64,-269,697,582),3801=>array(52,-14,773,564),3804=>array(40,-21,1171,620),3805=>array(40,-21,1174,620),4256=>array(42,-14,745,819),4257=>array(35,-0,647,819),4258=>array(33,-138,600,828),4259=>array(37,-15,714,819),4260=>array(26,0,515,828),4261=>array(22,0,656,828),4262=>array(13,-14,639,819),4263=>array(44,-14,801,828),4264=>array(4,0,374,862),4265=>array(35,0,523,819),4266=>array(16,-14,716,820),4267=>array(43,-14,753,819),4268=>array(39,0,527,819),4269=>array(33,-157,736,829),4270=>array(9,-14,659,822),4271=>array(18,0,527,823),4272=>array(39,-15,777,820),4273=>array(39,-15,528,820),4274=>array(39,-0,528,828),4275=>array(33,-170,736,828),4276=>array(33,0,746,825),4277=>array(25,0,626,820),4278=>array(40,0,528,828),4279=>array(30,0,520,820),4280=>array(35,-14,523,820),4281=>array(39,0,527,819),4282=>array(41,-14,700,827),4283=>array(42,-15,740,820),4284=>array(39,-0,528,819),4285=>array(26,-15,535,828),4286=>array(39,-0,528,819),4287=>array(13,0,654,819),4288=>array(16,-14,717,820),4289=>array(39,0,528,820),4290=>array(33,-15,587,828),4291=>array(8,0,497,820),4292=>array(30,0,505,820),4293=>array(21,-14,643,828),4304=>array(44,-14,455,599),4305=>array(44,-14,463,823),4306=>array(40,-232,521,561),4307=>array(44,-225,708,557),4308=>array(44,-232,447,557),4309=>array(44,-232,455,557),4310=>array(22,-14,452,828),4311=>array(44,-14,702,557),4312=>array(44,0,463,557),4313=>array(44,-232,456,542),4314=>array(44,-225,923,562),4315=>array(44,-14,455,828),4316=>array(57,-14,468,819),4317=>array(44,-0,689,557),4318=>array(44,-14,455,818),4319=>array(44,-232,454,560),4320=>array(44,0,697,830),4321=>array(57,-14,468,818),4322=>array(44,-232,586,670),4323=>array(26,-232,479,604),4324=>array(44,-232,713,558),4325=>array(44,-232,447,818),4326=>array(44,-225,689,557),4327=>array(44,-232,455,549),4328=>array(18,-14,440,828),4329=>array(57,0,468,828),4330=>array(44,-232,516,548),4331=>array(44,-14,454,818),4332=>array(58,-15,480,828),4333=>array(44,-232,466,818),4334=>array(57,-14,468,818),4335=>array(22,-232,464,580),4336=>array(44,-15,455,823),4337=>array(44,-14,455,823),4338=>array(44,-146,454,557),4339=>array(44,-232,455,558),4340=>array(44,-232,454,828),4341=>array(44,-14,502,828),4342=>array(44,-232,723,557),4343=>array(44,-232,500,557),4344=>array(44,-232,455,549),4345=>array(40,-232,521,561),4346=>array(44,-111,455,557),4347=>array(44,0,359,500),4348=>array(22,400,265,828),5121=>array(4,0,692,729),5122=>array(4,0,692,1056),5123=>array(4,0,692,729),5124=>array(4,0,692,928),5125=>array(83,0,739,729),5126=>array(83,0,739,928),5127=>array(83,0,739,927),5129=>array(83,0,739,729),5130=>array(75,0,732,729),5131=>array(75,0,732,928),5132=>array(83,0,912,729),5133=>array(4,0,833,729),5134=>array(83,0,912,729),5135=>array(4,0,833,729),5136=>array(83,0,912,928),5137=>array(4,0,833,928),5138=>array(83,0,958,729),5139=>array(83,0,950,729),5140=>array(83,0,958,928),5141=>array(83,0,950,928),5142=>array(83,0,739,928),5143=>array(83,0,952,729),5144=>array(75,0,953,729),5145=>array(83,0,952,928),5146=>array(75,0,953,928),5147=>array(75,0,732,928),5149=>array(83,607,203,728),5150=>array(54,326,426,734),5151=>array(28,338,341,722),5152=>array(28,338,341,722),5153=>array(54,392,305,711),5154=>array(54,352,305,670),5155=>array(54,392,305,670),5156=>array(54,392,305,670),5157=>array(28,327,466,749),5158=>array(54,326,373,734),5159=>array(83,304,203,424),5160=>array(54,494,305,569),5161=>array(54,392,305,670),5162=>array(54,392,305,693),5163=>array(4,0,1051,729),5164=>array(4,0,847,729),5165=>array(83,0,1054,729),5166=>array(75,0,1126,729),5167=>array(4,0,692,729),5168=>array(4,0,692,1056),5169=>array(4,0,692,729),5170=>array(4,0,692,928),5171=>array(66,0,722,729),5172=>array(66,0,722,928),5173=>array(66,0,722,927),5175=>array(66,0,722,729),5176=>array(66,0,722,729),5177=>array(66,0,722,928),5178=>array(83,0,912,729),5179=>array(4,0,833,729),5180=>array(83,0,912,729),5181=>array(4,0,833,729),5182=>array(83,0,912,928),5183=>array(4,0,833,928),5184=>array(83,0,942,729),5185=>array(66,0,950,729),5186=>array(83,0,942,928),5187=>array(66,0,950,928),5188=>array(83,0,942,729),5189=>array(66,0,953,729),5190=>array(83,0,942,928),5191=>array(66,0,953,928),5192=>array(66,0,722,927),5193=>array(54,326,468,727),5194=>array(54,326,155,734),5196=>array(83,-14,648,729),5197=>array(83,0,648,1056),5198=>array(83,0,648,743),5199=>array(83,0,648,928),5200=>array(66,0,684,729),5201=>array(66,0,684,928),5202=>array(66,0,684,927),5204=>array(66,0,684,729),5205=>array(50,0,668,729),5206=>array(50,0,668,928),5207=>array(83,-14,868,729),5208=>array(83,-14,868,729),5209=>array(83,0,868,743),5210=>array(83,0,868,743),5211=>array(83,0,868,928),5212=>array(83,0,868,928),5213=>array(83,0,903,729),5214=>array(66,0,874,729),5215=>array(83,0,903,928),5216=>array(66,0,874,928),5217=>array(83,0,888,729),5218=>array(50,0,871,729),5219=>array(83,0,888,928),5220=>array(50,0,871,928),5221=>array(83,0,888,729),5222=>array(54,326,384,733),5223=>array(83,-14,854,734),5224=>array(83,0,854,743),5225=>array(66,0,871,734),5226=>array(50,0,865,734),5227=>array(37,0,586,743),5228=>array(83,0,632,1056),5229=>array(83,0,632,743),5230=>array(83,0,632,928),5231=>array(37,-14,586,729),5232=>array(37,-14,586,928),5233=>array(37,-14,637,927),5234=>array(83,-14,632,729),5235=>array(83,-14,632,928),5236=>array(83,0,844,743),5237=>array(37,0,802,743),5238=>array(83,0,845,743),5239=>array(83,0,802,743),5240=>array(83,0,845,928),5241=>array(83,0,802,928),5242=>array(83,-14,844,729),5243=>array(37,-14,802,729),5244=>array(83,-14,844,928),5245=>array(37,-14,802,928),5246=>array(83,-14,845,729),5247=>array(83,-14,802,729),5248=>array(83,-14,845,928),5249=>array(83,-14,802,928),5250=>array(83,-14,845,729),5251=>array(54,319,400,734),5252=>array(54,319,400,734),5253=>array(37,0,793,743),5254=>array(83,0,793,743),5255=>array(37,-14,793,734),5256=>array(83,-14,793,734),5257=>array(37,0,586,743),5258=>array(83,0,632,1056),5259=>array(83,0,632,743),5260=>array(83,0,632,928),5261=>array(37,-14,586,729),5262=>array(37,-14,586,928),5263=>array(37,-14,643,927),5264=>array(83,-14,632,729),5265=>array(83,-14,632,928),5266=>array(83,0,844,743),5267=>array(37,0,802,743),5268=>array(83,0,889,743),5269=>array(83,0,802,743),5270=>array(83,0,889,928),5271=>array(83,0,802,928),5272=>array(83,-14,844,729),5273=>array(37,-14,802,729),5274=>array(83,-14,844,928),5275=>array(37,-14,802,928),5276=>array(83,-14,889,729),5277=>array(83,-14,802,729),5278=>array(83,-14,889,928),5279=>array(83,-14,802,928),5280=>array(83,-14,889,729),5281=>array(54,319,400,734),5282=>array(54,319,400,734),5283=>array(24,0,481,729),5284=>array(83,0,540,1056),5285=>array(83,0,540,729),5286=>array(83,0,540,928),5287=>array(24,0,481,729),5288=>array(24,0,481,928),5289=>array(24,0,539,927),5290=>array(83,0,540,729),5291=>array(83,0,540,928),5292=>array(83,0,711,729),5293=>array(24,0,694,729),5294=>array(83,0,752,729),5295=>array(83,0,711,729),5296=>array(83,0,752,928),5297=>array(83,0,711,928),5298=>array(83,0,711,729),5299=>array(24,0,711,729),5300=>array(83,0,711,928),5301=>array(24,0,711,928),5302=>array(83,0,752,729),5303=>array(83,0,711,729),5304=>array(83,0,752,928),5305=>array(83,0,711,928),5306=>array(83,0,752,729),5307=>array(54,326,342,734),5308=>array(54,326,443,733),5309=>array(54,326,342,734),5312=>array(75,-14,853,468),5313=>array(37,-14,813,786),5314=>array(37,-14,813,468),5315=>array(37,-14,813,667),5316=>array(24,0,801,482),5317=>array(24,0,801,667),5318=>array(24,0,801,667),5319=>array(37,0,813,482),5320=>array(37,0,813,667),5321=>array(83,-14,1077,468),5322=>array(75,-14,1047,468),5323=>array(83,0,1055,482),5324=>array(37,0,1030,482),5325=>array(83,0,1055,667),5326=>array(37,0,1030,667),5327=>array(37,0,813,667),5328=>array(54,477,543,742),5329=>array(54,319,396,734),5330=>array(54,477,543,742),5331=>array(75,0,853,468),5332=>array(37,0,813,786),5333=>array(37,0,813,468),5334=>array(37,0,813,667),5335=>array(24,0,801,468),5336=>array(24,0,801,667),5337=>array(24,0,801,667),5338=>array(37,0,813,468),5339=>array(37,0,813,667),5340=>array(83,0,1071,468),5341=>array(75,0,1047,468),5342=>array(83,0,1080,468),5343=>array(37,0,1030,468),5344=>array(83,0,1080,667),5345=>array(37,0,1030,667),5346=>array(83,0,1068,468),5347=>array(24,0,1018,468),5348=>array(83,0,1068,667),5349=>array(24,0,1018,667),5350=>array(83,0,1080,468),5351=>array(37,0,1030,468),5352=>array(83,0,1080,667),5353=>array(37,0,1030,667),5354=>array(54,477,543,734),5356=>array(66,0,722,729),5357=>array(37,0,575,729),5358=>array(83,0,663,1056),5359=>array(83,0,620,729),5360=>array(83,0,620,928),5361=>array(37,0,575,729),5362=>array(37,0,575,928),5363=>array(37,0,625,927),5364=>array(83,0,620,729),5365=>array(83,0,620,928),5366=>array(83,0,815,729),5367=>array(37,0,787,729),5368=>array(83,0,833,729),5369=>array(83,0,815,729),5370=>array(83,0,833,928),5371=>array(83,0,815,928),5372=>array(83,0,815,729),5373=>array(37,0,787,729),5374=>array(83,0,815,928),5375=>array(37,0,787,928),5376=>array(83,0,833,729),5377=>array(83,0,815,729),5378=>array(83,0,833,928),5379=>array(83,0,815,928),5380=>array(83,0,833,729),5381=>array(54,326,393,734),5382=>array(54,319,364,742),5383=>array(54,326,393,734),5392=>array(37,-14,794,743),5393=>array(37,-14,794,743),5394=>array(37,-14,794,928),5395=>array(37,-14,985,482),5396=>array(37,-14,985,667),5397=>array(37,-14,985,482),5398=>array(37,-14,985,667),5399=>array(83,-14,1051,743),5400=>array(37,-14,1006,743),5401=>array(83,-14,1051,743),5402=>array(37,-14,1006,743),5403=>array(83,-14,1051,928),5404=>array(37,-14,1006,928),5405=>array(83,-14,1251,482),5406=>array(37,-14,1203,482),5407=>array(83,-14,1251,667),5408=>array(37,-14,1203,667),5409=>array(83,-14,1251,482),5410=>array(37,-14,1203,482),5411=>array(83,-14,1251,667),5412=>array(37,-14,1203,667),5413=>array(54,469,621,747),5414=>array(75,0,616,729),5415=>array(83,0,623,1056),5416=>array(83,0,623,729),5417=>array(83,0,623,928),5418=>array(75,0,616,729),5419=>array(75,0,616,928),5420=>array(75,0,675,927),5421=>array(83,0,623,729),5422=>array(83,0,623,928),5423=>array(83,0,820,729),5424=>array(75,0,828,729),5425=>array(83,0,836,729),5426=>array(83,0,821,729),5427=>array(83,0,836,928),5428=>array(83,0,821,928),5429=>array(83,0,820,729),5430=>array(75,0,828,729),5431=>array(83,0,820,928),5432=>array(75,0,828,928),5433=>array(83,0,836,729),5434=>array(83,0,821,729),5435=>array(83,0,836,928),5436=>array(83,0,821,928),5437=>array(83,0,836,928),5438=>array(54,326,395,734),5440=>array(54,392,305,670),5441=>array(54,326,409,734),5442=>array(83,-14,854,468),5443=>array(75,-14,847,468),5444=>array(24,0,796,482),5445=>array(83,0,854,786),5446=>array(83,0,854,482),5447=>array(83,0,854,667),5448=>array(83,0,623,729),5449=>array(83,0,623,928),5450=>array(83,0,623,729),5451=>array(37,0,577,729),5452=>array(37,0,577,928),5453=>array(37,0,577,729),5454=>array(83,0,820,928),5455=>array(37,0,788,928),5456=>array(54,326,395,727),5458=>array(66,0,722,729),5459=>array(45,0,692,743),5460=>array(45,-14,692,1056),5461=>array(45,-14,692,729),5462=>array(45,-14,692,928),5463=>array(66,0,760,663),5464=>array(66,0,760,928),5465=>array(75,0,770,663),5466=>array(75,0,770,928),5467=>array(83,0,989,928),5468=>array(75,0,953,928),5469=>array(54,311,492,675),5470=>array(83,-14,648,743),5471=>array(83,-14,648,743),5472=>array(83,-14,648,743),5473=>array(83,-14,648,743),5474=>array(83,-14,648,928),5475=>array(83,-14,648,928),5476=>array(48,0,684,729),5477=>array(48,0,684,928),5478=>array(50,0,686,729),5479=>array(50,0,686,928),5480=>array(83,0,905,928),5481=>array(50,0,871,928),5482=>array(54,326,461,733),5492=>array(37,0,804,743),5493=>array(75,0,843,743),5494=>array(75,0,843,928),5495=>array(37,-14,804,729),5496=>array(37,-14,804,928),5497=>array(75,-14,843,729),5498=>array(75,-14,843,928),5499=>array(54,319,505,734),5500=>array(83,0,671,729),5501=>array(54,326,409,734),5502=>array(54,0,1077,1056),5503=>array(54,0,1077,743),5504=>array(54,0,1077,928),5505=>array(54,-14,1032,729),5506=>array(54,-14,1032,928),5507=>array(54,-14,1077,729),5508=>array(54,-14,1077,928),5509=>array(54,319,846,734),5514=>array(37,0,804,743),5515=>array(75,0,843,743),5516=>array(37,-14,804,729),5517=>array(75,-14,843,729),5518=>array(54,0,1395,1056),5519=>array(54,0,1395,743),5520=>array(54,0,1395,928),5521=>array(54,-14,1083,741),5522=>array(54,-14,1083,928),5523=>array(54,-14,1395,741),5524=>array(54,-14,1395,928),5525=>array(54,335,712,741),5526=>array(54,335,1095,741),5536=>array(37,0,813,709),5537=>array(37,0,813,709),5538=>array(24,-242,801,468),5539=>array(24,-242,801,667),5540=>array(37,-242,813,468),5541=>array(37,-242,813,667),5542=>array(54,344,543,734),5543=>array(75,0,694,729),5544=>array(4,0,623,729),5545=>array(4,0,623,928),5546=>array(75,0,694,729),5547=>array(75,0,694,928),5548=>array(4,0,623,729),5549=>array(4,0,623,928),5550=>array(13,326,395,734),5551=>array(83,-14,632,729),5598=>array(83,0,700,729),5601=>array(47,0,665,729),5702=>array(54,326,396,734),5703=>array(54,240,396,820),5742=>array(9,0,363,306),5743=>array(54,0,1032,743),5744=>array(54,0,1349,743),5745=>array(54,0,1778,743),5746=>array(54,0,1778,928),5747=>array(54,-14,1466,741),5748=>array(54,-14,1428,928),5749=>array(54,-14,1778,741),5750=>array(54,-14,1778,928),5760=>array(-9,219,498,354),5761=>array(-9,-125,582,354),5762=>array(-9,-125,860,354),5763=>array(-9,-125,1138,354),5764=>array(-9,-125,1415,354),5765=>array(-9,-125,1693,354),5766=>array(-9,219,573,697),5767=>array(-9,219,851,697),5768=>array(-9,219,1138,697),5769=>array(-9,219,1412,697),5770=>array(-9,219,1693,697),5771=>array(-9,-125,521,697),5772=>array(-9,-125,800,697),5773=>array(-9,-125,1078,697),5774=>array(-9,-125,1357,697),5775=>array(-9,-125,1635,697),5776=>array(-9,41,582,532),5777=>array(-9,41,860,532),5778=>array(-9,41,1138,532),5779=>array(-9,41,1415,532),5780=>array(-9,41,1693,532),5781=>array(-9,-125,521,697),5782=>array(-9,-125,854,697),5783=>array(-9,-109,719,354),5784=>array(-9,-254,1120,354),5785=>array(-9,219,1412,928),5786=>array(-9,14,675,354),5787=>array(49,-49,583,622),5788=>array(-9,-49,525,622),7424=>array(13,0,574,547),7425=>array(0,0,680,547),7426=>array(39,-14,900,560),7427=>array(18,0,508,547),7428=>array(39,-14,474,560),7429=>array(75,-1,550,547),7430=>array(18,-1,550,547),7431=>array(83,0,433,547),7432=>array(48,-14,444,560),7433=>array(75,-213,233,547),7434=>array(40,-14,375,547),7435=>array(75,0,616,547),7436=>array(-17,0,449,547),7437=>array(75,0,660,547),7438=>array(75,0,555,547),7439=>array(39,-14,580,560),7440=>array(39,-14,474,560),7441=>array(39,-27,556,573),7442=>array(39,31,556,515),7443=>array(12,-28,588,579),7444=>array(39,-14,941,560),7446=>array(39,273,580,560),7447=>array(40,-14,581,273),7448=>array(45,0,463,547),7449=>array(19,0,504,547),7450=>array(19,0,504,547),7451=>array(3,0,518,547),7452=>array(75,-14,547,547),7453=>array(76,10,582,560),7454=>array(62,10,771,561),7455=>array(17,-238,586,560),7456=>array(13,0,574,547),7457=>array(31,0,800,547),7458=>array(40,0,481,547),7459=>array(51,-14,523,547),7462=>array(75,0,449,547),7463=>array(13,0,574,547),7464=>array(75,0,546,547),7465=>array(45,0,463,547),7466=>array(75,0,628,547),7467=>array(49,0,584,547),7468=>array(2,326,436,734),7469=>array(0,326,574,734),7470=>array(52,326,393,734),7472=>array(52,326,441,734),7473=>array(52,326,346,734),7474=>array(52,326,346,734),7475=>array(28,318,424,742),7476=>array(52,326,422,734),7477=>array(52,326,159,734),7478=>array(-32,214,159,734),7479=>array(52,326,457,734),7480=>array(52,326,346,734),7481=>array(52,326,512,734),7482=>array(52,326,422,734),7483=>array(52,326,422,734),7484=>array(28,318,454,742),7485=>array(35,318,424,742),7486=>array(52,326,393,734),7487=>array(52,326,426,734),7488=>array(2,326,384,734),7489=>array(52,318,409,734),7490=>array(17,326,608,734),7491=>array(48,318,362,640),7492=>array(48,318,362,640),7493=>array(48,318,381,640),7494=>array(48,318,591,640),7495=>array(48,318,381,751),7496=>array(48,318,381,751),7497=>array(48,318,381,640),7498=>array(48,318,381,640),7499=>array(48,318,297,640),7500=>array(48,318,297,640),7501=>array(48,205,381,639),7502=>array(48,207,147,632),7503=>array(48,326,388,751),7504=>array(48,326,547,640),7505=>array(48,205,360,640),7506=>array(48,318,389,640),7507=>array(48,318,322,640),7508=>array(48,479,389,640),7509=>array(48,318,389,479),7510=>array(48,209,381,640),7511=>array(48,326,299,719),7512=>array(48,318,360,632),7513=>array(48,332,366,640),7514=>array(48,318,547,632),7515=>array(48,326,401,632),7517=>array(47,209,381,759),7518=>array(9,209,378,632),7519=>array(24,318,366,756),7520=>array(36,209,411,635),7521=>array(14,209,352,632),7522=>array(48,0,147,425),7523=>array(48,0,283,313),7524=>array(48,-8,360,306),7525=>array(48,0,401,306),7526=>array(47,-117,381,433),7527=>array(9,-117,378,306),7528=>array(47,-117,381,314),7529=>array(36,-117,411,309),7530=>array(14,-117,352,306),7543=>array(75,-216,604,559),7544=>array(52,326,422,734),7547=>array(75,0,416,547),7549=>array(4,-208,668,560),7557=>array(75,-216,391,760),7579=>array(48,318,381,640),7580=>array(48,318,322,640),7581=>array(48,288,322,640),7582=>array(48,318,389,751),7583=>array(48,318,297,640),7584=>array(48,326,289,751),7585=>array(48,205,263,632),7586=>array(48,205,381,632),7587=>array(48,207,360,632),7588=>array(48,326,262,751),7589=>array(48,326,203,632),7590=>array(48,326,262,632),7591=>array(48,326,262,632),7592=>array(48,205,338,751),7593=>array(48,205,243,751),7594=>array(48,205,247,751),7595=>array(48,326,283,632),7596=>array(48,205,548,640),7597=>array(48,209,547,632),7598=>array(48,205,456,640),7599=>array(48,205,455,640),7600=>array(48,326,354,632),7601=>array(48,318,389,640),7602=>array(48,209,438,751),7603=>array(48,205,330,640),7604=>array(48,205,306,751),7605=>array(48,205,299,719),7606=>array(48,318,475,632),7607=>array(48,298,395,632),7608=>array(47,318,345,632),7609=>array(48,326,355,632),7610=>array(48,326,401,632),7611=>array(48,326,325,632),7612=>array(48,205,421,632),7613=>array(48,288,373,632),7614=>array(48,206,360,632),7615=>array(48,320,333,756),7620=>array(-421,616,-31,800),7621=>array(-421,616,-31,800),7622=>array(-421,616,-31,800),7623=>array(-421,616,-31,800),7624=>array(-462,616,10,800),7625=>array(-462,616,10,800),7680=>array(4,-240,692,729),7681=>array(39,-240,537,560),7682=>array(83,0,623,928),7683=>array(75,-14,604,913),7684=>array(83,-212,623,729),7685=>array(75,-212,604,760),7686=>array(83,-184,623,729),7687=>array(75,-184,604,760),7688=>array(44,-196,603,927),7689=>array(39,-196,474,800),7690=>array(83,0,700,927),7691=>array(40,-14,569,942),7692=>array(83,-212,700,729),7693=>array(40,-212,569,760),7694=>array(83,-184,700,729),7695=>array(40,-184,569,760),7696=>array(83,-192,700,729),7697=>array(40,-196,569,760),7698=>array(83,-240,700,729),7699=>array(40,-240,569,760),7700=>array(83,0,549,1057),7701=>array(39,-14,567,927),7702=>array(83,0,549,1057),7703=>array(39,-14,567,927),7704=>array(83,-203,549,729),7705=>array(39,-203,567,560),7706=>array(83,-195,549,729),7707=>array(39,-195,567,560),7708=>array(83,-196,549,927),7709=>array(39,-196,567,784),7710=>array(83,0,540,928),7711=>array(17,0,400,942),7712=>array(44,-14,672,901),7713=>array(40,-216,569,760),7714=>array(83,0,671,928),7715=>array(75,0,571,913),7716=>array(83,-212,671,729),7717=>array(75,-212,571,760),7718=>array(83,0,671,927),7719=>array(21,0,571,927),7720=>array(40,-196,671,729),7721=>array(34,-196,571,760),7722=>array(83,-236,671,729),7723=>array(75,-236,571,760),7724=>array(14,-195,320,729),7725=>array(0,-195,307,760),7726=>array(36,0,341,1057),7727=>array(14,0,319,917),7728=>array(83,0,725,927),7729=>array(75,0,616,982),7730=>array(83,-212,725,729),7731=>array(75,-212,616,760),7732=>array(83,-184,725,729),7733=>array(75,-184,616,760),7734=>array(83,-212,549,729),7735=>array(75,-212,233,760),7736=>array(29,-212,549,942),7737=>array(16,-212,293,914),7738=>array(83,-184,549,729),7739=>array(18,-184,295,760),7740=>array(83,-240,549,729),7741=>array(-12,-240,320,760),7742=>array(83,0,813,927),7743=>array(75,0,867,800),7744=>array(83,0,813,928),7745=>array(75,0,867,760),7746=>array(83,-212,813,729),7747=>array(75,-212,867,560),7748=>array(83,0,671,928),7749=>array(75,0,571,760),7750=>array(83,-212,671,729),7751=>array(75,-212,571,560),7752=>array(83,-184,671,729),7753=>array(75,-184,571,560),7754=>array(83,-240,671,729),7755=>array(75,-240,571,560),7756=>array(44,-14,720,1057),7757=>array(39,-14,580,916),7758=>array(44,-14,720,1043),7759=>array(39,-14,580,900),7760=>array(44,-14,720,1057),7761=>array(39,-14,580,927),7762=>array(44,-14,720,1057),7763=>array(39,-14,580,927),7764=>array(83,0,623,927),7765=>array(75,-208,604,800),7766=>array(83,0,623,928),7767=>array(75,-208,604,760),7768=>array(83,0,675,928),7769=>array(75,0,441,760),7770=>array(83,-212,675,729),7771=>array(75,-212,441,560),7772=>array(83,-212,675,914),7773=>array(75,-212,441,759),7774=>array(83,-184,675,729),7775=>array(30,-184,441,560),7776=>array(64,-14,583,928),7777=>array(46,-14,493,760),7778=>array(64,-212,583,742),7779=>array(46,-212,493,560),7780=>array(64,-14,583,928),7781=>array(46,-14,493,816),7782=>array(64,-14,583,1053),7783=>array(46,-14,493,1002),7784=>array(64,-212,583,928),7785=>array(46,-212,493,762),7786=>array(4,0,609,927),7787=>array(12,0,410,942),7788=>array(4,-212,609,729),7789=>array(12,-212,410,702),7790=>array(4,-184,609,729),7791=>array(12,-184,410,702),7792=>array(4,-240,609,729),7793=>array(12,-240,410,702),7794=>array(83,-212,648,729),7795=>array(70,-212,565,547),7796=>array(83,-196,648,729),7797=>array(70,-195,565,547),7798=>array(83,-203,648,729),7799=>array(70,-203,565,547),7800=>array(83,-14,648,1057),7801=>array(70,-14,565,916),7802=>array(83,-14,648,1043),7803=>array(70,-14,565,887),7804=>array(4,0,692,928),7805=>array(13,0,574,778),7806=>array(4,-212,692,729),7807=>array(13,-212,574,547),7808=>array(26,0,965,931),7809=>array(31,0,800,803),7810=>array(26,0,965,931),7811=>array(31,0,800,803),7812=>array(26,0,965,927),7813=>array(31,0,800,774),7814=>array(26,0,965,927),7815=>array(31,0,800,760),7816=>array(26,-212,965,729),7817=>array(31,-212,800,547),7818=>array(17,0,676,928),7819=>array(13,0,567,760),7820=>array(17,0,676,927),7821=>array(13,0,567,774),7822=>array(-9,0,661,928),7823=>array(11,-216,571,760),7824=>array(40,0,612,927),7825=>array(40,0,481,798),7826=>array(40,-212,612,729),7827=>array(40,-212,481,547),7828=>array(40,-184,612,729),7829=>array(40,-184,481,547),7830=>array(75,-184,571,760),7831=>array(12,0,410,927),7832=>array(31,0,800,888),7833=>array(11,-216,571,888),7834=>array(39,-14,682,760),7835=>array(17,0,400,942),7836=>array(-17,0,400,760),7837=>array(17,0,400,760),7838=>array(83,-14,741,743),7839=>array(39,-14,580,768),7840=>array(4,-212,692,729),7841=>array(39,-212,537,560),7842=>array(4,0,692,1025),7843=>array(39,-14,537,843),7844=>array(4,0,692,1054),7845=>array(39,-14,587,873),7846=>array(4,0,692,1054),7847=>array(39,-14,538,874),7848=>array(4,0,692,1093),7849=>array(39,-14,605,912),7850=>array(4,0,692,1068),7851=>array(39,-14,537,887),7852=>array(4,-212,692,927),7853=>array(39,-212,537,800),7854=>array(4,0,692,1057),7855=>array(39,-14,537,891),7856=>array(4,0,692,1057),7857=>array(39,-14,537,894),7858=>array(4,0,692,1123),7859=>array(39,-14,537,959),7860=>array(4,0,692,1068),7861=>array(39,-14,537,905),7862=>array(4,-212,692,935),7863=>array(39,-212,537,780),7864=>array(83,-212,549,729),7865=>array(39,-212,567,560),7866=>array(83,0,549,1025),7867=>array(39,-14,567,843),7868=>array(83,0,549,928),7869=>array(39,-14,567,778),7870=>array(83,0,616,1054),7871=>array(39,-14,620,873),7872=>array(83,0,559,1054),7873=>array(39,-14,567,874),7874=>array(83,0,618,1093),7875=>array(39,-14,613,912),7876=>array(83,0,549,1068),7877=>array(39,-14,567,887),7878=>array(83,-212,549,927),7879=>array(39,-212,567,800),7880=>array(59,0,282,1025),7881=>array(47,0,270,842),7882=>array(83,-212,252,729),7883=>array(75,-212,233,760),7884=>array(44,-212,720,742),7885=>array(39,-212,580,560),7886=>array(44,-14,720,1025),7887=>array(39,-14,580,843),7888=>array(44,-14,720,1054),7889=>array(39,-14,611,873),7890=>array(44,-14,720,1054),7891=>array(39,-14,580,874),7892=>array(44,-14,720,1093),7893=>array(39,-14,617,912),7894=>array(44,-14,720,1068),7895=>array(39,-14,580,887),7896=>array(44,-212,720,927),7897=>array(39,-212,580,800),7898=>array(47,-14,769,927),7899=>array(42,-14,637,800),7900=>array(47,-14,769,927),7901=>array(42,-14,637,800),7902=>array(47,-14,769,1025),7903=>array(42,-14,637,843),7904=>array(47,-14,769,928),7905=>array(42,-14,637,778),7906=>array(47,-212,769,761),7907=>array(42,-212,637,609),7908=>array(83,-212,648,729),7909=>array(70,-212,565,547),7910=>array(83,-14,648,1025),7911=>array(70,-14,565,843),7912=>array(82,-14,750,927),7913=>array(67,-14,660,800),7914=>array(82,-14,750,927),7915=>array(67,-14,660,800),7916=>array(82,-14,750,1025),7917=>array(67,-14,660,843),7918=>array(82,-14,750,928),7919=>array(67,-14,660,778),7920=>array(82,-212,750,761),7921=>array(67,-212,660,609),7922=>array(-9,0,661,931),7923=>array(11,-216,571,803),7924=>array(-9,-212,661,729),7925=>array(11,-216,571,547),7926=>array(-9,0,661,1029),7927=>array(11,-216,571,843),7928=>array(-9,0,661,928),7929=>array(11,-216,571,778),7930=>array(83,0,833,729),7931=>array(8,0,571,760),7936=>array(43,-13,581,785),7937=>array(43,-13,581,785),7938=>array(43,-13,581,800),7939=>array(43,-13,581,800),7940=>array(43,-13,581,800),7941=>array(43,-13,581,800),7942=>array(43,-13,581,928),7943=>array(43,-13,581,928),7944=>array(4,0,692,785),7945=>array(4,0,692,785),7946=>array(1,0,933,800),7947=>array(3,0,935,800),7948=>array(1,0,837,800),7949=>array(1,0,862,800),7950=>array(3,0,748,928),7951=>array(3,0,769,928),7952=>array(48,-14,444,785),7953=>array(48,-14,444,785),7954=>array(48,-14,448,800),7955=>array(48,-14,444,800),7956=>array(48,-14,479,800),7957=>array(48,-14,465,800),7960=>array(3,0,646,785),7961=>array(3,0,649,785),7962=>array(1,0,924,800),7963=>array(3,0,921,800),7964=>array(1,0,855,800),7965=>array(1,0,881,800),7968=>array(75,-208,571,785),7969=>array(75,-208,571,785),7970=>array(75,-208,571,800),7971=>array(75,-208,571,800),7972=>array(75,-208,571,800),7973=>array(75,-208,571,800),7974=>array(75,-208,571,928),7975=>array(75,-208,571,928),7976=>array(3,0,769,785),7977=>array(3,0,773,785),7978=>array(1,0,1043,800),7979=>array(3,0,1042,800),7980=>array(1,0,979,800),7981=>array(1,0,1003,800),7982=>array(3,0,866,928),7983=>array(3,0,874,928),7984=>array(70,-19,313,785),7985=>array(70,-19,313,785),7986=>array(-25,-19,367,800),7987=>array(-53,-19,339,800),7988=>array(28,-19,401,800),7989=>array(-5,-19,395,800),7990=>array(-2,-19,313,928),7991=>array(-4,-19,313,928),7992=>array(3,0,352,785),7993=>array(3,0,357,785),7994=>array(1,0,616,800),7995=>array(3,0,624,800),7996=>array(1,0,558,800),7997=>array(1,0,582,800),7998=>array(3,0,461,928),7999=>array(3,0,461,928),8000=>array(39,-14,580,785),8001=>array(39,-14,580,785),8002=>array(39,-14,580,800),8003=>array(39,-14,580,800),8004=>array(39,-14,580,800),8005=>array(39,-14,580,800),8008=>array(3,-14,757,785),8009=>array(3,-14,795,785),8010=>array(1,-14,1054,800),8011=>array(3,-14,1056,800),8012=>array(1,-14,902,800),8013=>array(1,-14,929,800),8016=>array(70,-10,567,785),8017=>array(70,-10,567,785),8018=>array(70,-10,567,800),8019=>array(70,-10,567,800),8020=>array(70,-10,567,800),8021=>array(70,-10,567,800),8022=>array(70,-10,567,928),8023=>array(70,-10,567,928),8025=>array(3,0,846,785),8027=>array(3,0,1075,800),8029=>array(1,0,1088,800),8031=>array(3,0,953,928),8032=>array(39,-13,744,785),8033=>array(39,-13,744,785),8034=>array(39,-13,744,800),8035=>array(39,-13,744,800),8036=>array(39,-13,744,800),8037=>array(39,-13,744,800),8038=>array(39,-13,744,928),8039=>array(39,-13,744,928),8040=>array(3,0,793,785),8041=>array(3,0,838,785),8042=>array(1,0,1097,800),8043=>array(3,-3,1102,800),8044=>array(1,0,944,800),8045=>array(1,0,970,800),8046=>array(3,0,901,928),8047=>array(3,0,944,928),8048=>array(43,-13,581,800),8049=>array(43,-13,581,800),8050=>array(48,-14,444,800),8051=>array(48,-14,444,800),8052=>array(75,-208,571,800),8053=>array(75,-208,571,800),8054=>array(-24,-19,313,800),8055=>array(69,-19,318,800),8056=>array(39,-14,580,800),8057=>array(39,-14,580,800),8058=>array(70,-10,567,800),8059=>array(70,-10,567,800),8060=>array(39,-13,744,800),8061=>array(39,-13,744,800),8064=>array(43,-208,581,785),8065=>array(43,-208,581,785),8066=>array(43,-208,581,800),8067=>array(43,-208,581,800),8068=>array(43,-208,581,800),8069=>array(43,-208,581,800),8070=>array(43,-208,581,928),8071=>array(43,-208,581,928),8072=>array(4,-208,692,785),8073=>array(4,-208,692,785),8074=>array(1,-208,933,800),8075=>array(3,-208,935,800),8076=>array(1,-208,837,800),8077=>array(1,-208,862,800),8078=>array(3,-208,748,928),8079=>array(3,-208,769,928),8080=>array(75,-208,571,785),8081=>array(75,-208,571,785),8082=>array(75,-208,571,800),8083=>array(75,-208,571,800),8084=>array(75,-208,571,800),8085=>array(75,-208,571,800),8086=>array(75,-208,571,928),8087=>array(75,-208,571,928),8088=>array(3,-208,769,785),8089=>array(3,-208,773,785),8090=>array(1,-208,1043,800),8091=>array(3,-208,1042,800),8092=>array(1,-208,979,800),8093=>array(1,-208,1003,800),8094=>array(3,-208,866,928),8095=>array(3,-208,874,928),8096=>array(39,-208,744,785),8097=>array(39,-208,744,785),8098=>array(39,-208,744,800),8099=>array(39,-208,744,800),8100=>array(39,-208,744,800),8101=>array(39,-208,744,800),8102=>array(39,-208,744,928),8103=>array(39,-208,744,928),8104=>array(3,-208,793,785),8105=>array(3,-208,838,785),8106=>array(1,-208,1097,800),8107=>array(3,-208,1102,800),8108=>array(1,-208,944,800),8109=>array(1,-208,970,800),8110=>array(3,-208,901,928),8111=>array(3,-208,944,928),8112=>array(43,-13,581,784),8113=>array(43,-13,581,760),8114=>array(43,-208,581,800),8115=>array(43,-208,581,559),8116=>array(43,-208,581,800),8118=>array(43,-13,581,778),8119=>array(43,-208,581,778),8120=>array(4,0,692,927),8121=>array(4,0,692,914),8122=>array(-1,0,785,800),8123=>array(23,0,713,800),8124=>array(4,-208,692,729),8125=>array(165,595,286,785),8126=>array(182,-208,299,-45),8127=>array(165,595,286,785),8128=>array(72,638,378,778),8129=>array(72,654,378,928),8130=>array(75,-208,571,800),8131=>array(75,-208,571,560),8132=>array(75,-208,571,800),8134=>array(75,-208,571,778),8135=>array(75,-208,571,778),8136=>array(-1,0,771,800),8137=>array(-22,0,694,800),8138=>array(-1,0,890,800),8139=>array(-17,0,824,800),8140=>array(83,-208,671,729),8141=>array(30,595,422,800),8142=>array(57,595,430,800),8143=>array(72,595,378,928),8144=>array(2,-19,313,784),8145=>array(18,-19,313,760),8146=>array(-33,-19,313,978),8147=>array(21,-19,335,978),8150=>array(3,-19,313,778),8151=>array(-5,-19,313,928),8152=>array(19,0,315,927),8153=>array(28,0,306,914),8154=>array(-1,0,476,800),8155=>array(-19,0,405,800),8157=>array(35,595,427,800),8158=>array(41,595,440,800),8159=>array(72,595,378,928),8160=>array(70,-10,567,784),8161=>array(70,-10,567,760),8162=>array(70,-10,567,978),8163=>array(70,-10,567,978),8164=>array(75,-208,604,785),8165=>array(75,-208,604,785),8166=>array(70,-10,567,778),8167=>array(70,-10,567,928),8168=>array(-9,0,661,927),8169=>array(-9,0,661,914),8170=>array(-1,0,927,800),8171=>array(-24,0,893,800),8172=>array(3,0,718,785),8173=>array(41,654,364,978),8174=>array(86,654,401,978),8175=>array(41,616,290,800),8178=>array(39,-208,744,800),8179=>array(39,-208,744,547),8180=>array(39,-208,744,800),8182=>array(39,-13,744,778),8183=>array(39,-208,744,778),8184=>array(-1,-14,914,800),8185=>array(-17,-14,753,800),8186=>array(-1,0,952,800),8187=>array(-27,0,780,800),8188=>array(24,-208,741,742),8189=>array(160,616,409,800),8190=>array(165,595,286,785),8208=>array(48,217,325,359),8209=>array(48,217,325,359),8210=>array(48,211,578,337),8211=>array(48,211,402,337),8212=>array(48,211,852,337),8213=>array(0,211,900,337),8214=>array(114,-236,359,764),8215=>array(0,-236,450,-9),8216=>array(92,418,286,729),8217=>array(57,418,250,729),8218=>array(64,-122,259,189),8219=>array(57,418,250,729),8220=>array(92,418,509,729),8221=>array(83,418,499,729),8222=>array(64,-122,481,189),8223=>array(83,418,499,729),8224=>array(23,-96,423,729),8225=>array(22,-96,423,729),8226=>array(129,196,446,547),8227=>array(129,157,481,586),8228=>array(71,0,229,189),8229=>array(71,0,529,189),8230=>array(71,0,829,189),8231=>array(77,253,236,442),8240=>array(29,-14,1275,742),8241=>array(29,-14,1678,742),8242=>array(18,547,216,729),8243=>array(18,547,381,729),8244=>array(18,547,545,729),8245=>array(18,547,216,729),8246=>array(18,547,383,729),8247=>array(18,547,545,729),8248=>array(91,-238,569,29),8249=>array(69,67,286,519),8250=>array(84,67,302,519),8251=>array(65,0,810,829),8252=>array(62,0,502,729),8253=>array(62,0,464,742),8254=>array(0,663,450,755),8255=>array(-28,-237,773,-79),8256=>array(-28,769,773,927),8257=>array(-47,-235,267,231),8258=>array(18,-37,903,832),8259=>array(86,220,364,358),8260=>array(-180,-14,330,742),8261=>array(77,-132,351,760),8262=>array(61,-132,334,760),8263=>array(31,0,896,742),8264=>array(62,0,684,742),8265=>array(62,0,684,742),8266=>array(44,-125,418,546),8267=>array(83,-96,521,729),8268=>array(67,189,382,541),8269=>array(67,189,382,541),8270=>array(18,0,453,464),8271=>array(93,-142,296,547),8272=>array(-28,-237,773,927),8273=>array(47,-14,396,797),8274=>array(26,-93,477,729),8275=>array(44,212,856,415),8276=>array(-28,-240,773,-82),8277=>array(137,98,617,631),8278=>array(99,93,517,645),8279=>array(18,547,710,729),8280=>array(68,21,686,708),8281=>array(113,71,641,657),8282=>array(92,0,252,729),8283=>array(44,-170,740,898),8284=>array(49,0,705,729),8285=>array(92,0,250,683),8286=>array(92,0,250,683),8304=>array(26,319,358,742),8305=>array(48,326,147,751),8308=>array(24,326,358,734),8309=>array(42,319,346,734),8310=>array(34,319,355,742),8311=>array(37,326,341,734),8312=>array(34,319,351,742),8313=>array(28,319,349,742),8314=>array(60,326,415,677),8315=>array(60,469,415,534),8316=>array(60,407,415,596),8317=>array(48,252,214,751),8318=>array(45,252,211,751),8319=>array(48,326,365,640),8320=>array(26,-7,358,416),8321=>array(54,0,344,408),8322=>array(48,0,344,416),8323=>array(40,-7,346,416),8324=>array(24,0,358,408),8325=>array(42,-7,346,408),8326=>array(34,-7,355,416),8327=>array(37,0,341,408),8328=>array(34,-7,351,416),8329=>array(28,-7,349,416),8330=>array(60,0,415,351),8331=>array(60,143,415,208),8332=>array(60,81,415,270),8333=>array(48,-74,214,425),8334=>array(45,-74,211,425),8336=>array(48,-8,362,313),8337=>array(48,-8,381,313),8338=>array(48,-8,389,313),8339=>array(9,0,363,306),8340=>array(48,-8,381,313),8341=>array(48,0,365,425),8342=>array(48,0,388,425),8343=>array(48,0,149,425),8344=>array(48,0,547,313),8345=>array(48,0,365,313),8346=>array(48,-117,381,313),8347=>array(30,-8,316,313),8348=>array(48,0,299,393),8352=>array(34,0,803,729),8353=>array(44,-44,571,778),8354=>array(26,-14,601,742),8355=>array(67,0,597,729),8356=>array(55,0,552,742),8357=>array(75,-93,867,640),8358=>array(39,0,715,729),8359=>array(83,-14,1323,729),8360=>array(83,-14,1042,729),8361=>array(12,0,980,729),8362=>array(35,-14,773,729),8363=>array(27,-182,624,760),8364=>array(-18,-14,566,742),8365=>array(26,0,626,729),8366=>array(10,0,615,729),8367=>array(83,-223,1122,742),8368=>array(12,-14,584,742),8369=>array(31,0,626,729),8370=>array(44,-81,579,809),8371=>array(4,0,622,729),8372=>array(39,-14,735,742),8373=>array(64,-147,566,760),8376=>array(10,0,615,729),8377=>array(45,0,583,729),8378=>array(4,0,670,729),8400=>array(-448,628,-23,760),8401=>array(-423,628,1,760),8406=>array(-423,560,-23,760),8407=>array(-423,560,-23,760),8411=>array(-452,654,-0,774),8412=>array(-536,654,89,774),8417=>array(-423,560,-23,760),8448=>array(18,-24,976,752),8449=>array(18,-24,1024,752),8450=>array(44,-14,603,742),8451=>array(78,-14,1033,749),8452=>array(57,0,749,729),8453=>array(18,-24,958,752),8454=>array(18,-24,1005,752),8455=>array(60,-14,555,742),8456=>array(57,-146,616,611),8457=>array(78,0,902,749),8459=>array(32,-14,957,746),8460=>array(5,-125,729,747),8461=>array(90,0,709,729),8462=>array(27,0,589,760),8463=>array(9,0,563,760),8464=>array(32,-14,480,742),8465=>array(46,-14,593,743),8466=>array(33,-14,708,742),8467=>array(-13,-14,361,742),8468=>array(8,-14,842,760),8469=>array(83,0,671,729),8470=>array(30,0,1039,729),8471=>array(124,0,776,725),8472=>array(48,-221,592,495),8473=>array(83,0,638,729),8474=>array(44,-146,720,742),8475=>array(28,-14,814,768),8476=>array(36,-14,723,743),8477=>array(88,0,714,729),8478=>array(33,0,773,729),8479=>array(73,-112,625,887),8480=>array(114,444,713,731),8481=>array(3,0,1124,547),8482=>array(129,447,711,729),8483=>array(10,-113,656,885),8484=>array(40,0,639,729),8485=>array(23,-230,486,777),8486=>array(24,0,741,742),8487=>array(24,-14,741,728),8488=>array(-5,-159,604,729),8489=>array(0,0,244,566),8490=>array(83,0,725,729),8491=>array(4,0,692,928),8492=>array(37,-1,768,772),8493=>array(57,-19,690,742),8494=>array(55,-12,714,647),8495=>array(37,-14,532,533),8496=>array(65,-14,602,742),8497=>array(33,-14,774,773),8498=>array(83,0,540,729),8499=>array(34,-18,1041,751),8500=>array(26,-12,393,420),8501=>array(45,-14,685,742),8502=>array(17,-14,619,742),8503=>array(27,-35,396,742),8504=>array(57,-41,570,742),8505=>array(31,0,320,760),8506=>array(40,-27,839,723),8507=>array(62,0,1217,547),8508=>array(31,-14,689,547),8509=>array(-36,-208,630,561),8510=>array(83,0,564,729),8511=>array(83,0,694,729),8512=>array(11,-192,738,719),8513=>array(22,-14,650,742),8514=>array(8,0,475,729),8515=>array(39,0,505,729),8516=>array(0,0,670,729),8517=>array(18,0,708,729),8518=>array(31,-14,677,760),8519=>array(29,-14,571,560),8520=>array(13,0,317,760),8521=>array(-129,-216,319,760),8523=>array(37,-14,730,742),8526=>array(49,0,423,547),8528=>array(44,-14,885,742),8529=>array(44,-14,894,742),8530=>array(44,-14,1297,742),8531=>array(44,-14,890,742),8532=>array(48,-14,890,742),8533=>array(44,-14,891,742),8534=>array(48,-14,891,742),8535=>array(40,-14,891,742),8536=>array(24,-14,891,742),8537=>array(44,-14,899,742),8538=>array(42,-14,899,742),8539=>array(44,-14,895,742),8540=>array(40,-14,895,742),8541=>array(42,-14,895,742),8542=>array(37,-14,895,742),8543=>array(44,-14,733,742),8544=>array(83,0,252,729),8545=>array(83,0,510,729),8546=>array(83,0,768,729),8547=>array(83,0,984,729),8548=>array(4,0,692,729),8549=>array(4,0,906,729),8550=>array(4,0,1165,729),8551=>array(4,0,1422,729),8552=>array(83,0,991,729),8553=>array(17,0,676,729),8554=>array(17,0,925,729),8555=>array(17,0,1183,729),8556=>array(83,0,549,729),8557=>array(44,-14,603,742),8558=>array(83,0,700,729),8559=>array(83,0,813,729),8560=>array(75,0,233,760),8561=>array(75,0,471,760),8562=>array(75,0,709,760),8563=>array(75,0,852,760),8564=>array(13,0,574,547),8565=>array(13,0,791,760),8566=>array(13,0,1028,760),8567=>array(13,0,1267,760),8568=>array(75,0,858,760),8569=>array(13,0,567,547),8570=>array(13,0,796,760),8571=>array(13,0,1035,760),8572=>array(75,0,233,760),8573=>array(39,-14,474,560),8574=>array(40,-14,569,760),8575=>array(75,0,867,560),8576=>array(47,0,1113,729),8577=>array(83,0,700,729),8578=>array(47,0,1113,729),8579=>array(44,-14,603,742),8580=>array(39,-14,474,560),8581=>array(44,-208,603,742),8585=>array(26,-14,890,742),8592=>array(44,87,703,540),8593=>array(174,0,581,732),8594=>array(51,87,710,540),8595=>array(174,-3,581,729),8596=>array(44,87,710,540),8597=>array(173,-3,581,732),8598=>array(123,66,648,650),8599=>array(123,66,648,650),8600=>array(123,66,648,650),8601=>array(123,66,648,650),8602=>array(44,87,703,540),8603=>array(51,87,710,540),8604=>array(11,84,750,431),8605=>array(4,84,743,431),8606=>array(44,87,703,540),8607=>array(170,0,577,732),8608=>array(51,87,710,540),8609=>array(174,-3,582,729),8610=>array(44,87,714,540),8611=>array(40,87,710,540),8612=>array(44,87,703,540),8613=>array(174,0,581,732),8614=>array(51,87,710,540),8615=>array(174,0,581,732),8616=>array(174,0,581,732),8617=>array(44,87,703,565),8618=>array(51,87,710,565),8619=>array(44,87,703,565),8620=>array(51,87,710,565),8621=>array(44,87,710,540),8622=>array(44,86,710,541),8623=>array(110,-4,643,733),8624=>array(152,0,582,755),8625=>array(172,0,603,755),8626=>array(152,-26,582,729),8627=>array(172,-26,603,729),8628=>array(209,-3,695,621),8629=>array(44,87,606,626),8630=>array(9,198,734,685),8631=>array(20,198,745,685),8632=>array(105,13,709,729),8633=>array(44,-108,710,735),8634=>array(78,45,690,691),8635=>array(64,45,677,691),8636=>array(44,255,703,540),8637=>array(44,87,703,372),8638=>array(325,0,581,732),8639=>array(174,0,431,732),8640=>array(51,255,710,540),8641=>array(51,87,710,372),8642=>array(325,0,581,732),8643=>array(174,0,431,732),8644=>array(44,-59,710,686),8645=>array(42,-3,713,732),8646=>array(44,-59,710,686),8647=>array(44,-59,703,686),8648=>array(42,0,712,732),8649=>array(51,-59,710,686),8650=>array(42,-3,712,729),8651=>array(44,-5,710,632),8652=>array(44,-5,710,632),8653=>array(44,87,703,540),8654=>array(44,87,710,540),8655=>array(51,87,710,540),8656=>array(44,87,703,540),8657=>array(173,0,581,732),8658=>array(51,87,710,540),8659=>array(173,-3,581,729),8660=>array(44,87,710,540),8661=>array(173,-8,581,732),8662=>array(119,-26,680,596),8663=>array(79,-26,641,597),8664=>array(79,16,641,639),8665=>array(119,16,680,639),8666=>array(44,87,703,540),8667=>array(51,87,710,540),8668=>array(40,87,699,540),8669=>array(51,87,710,540),8670=>array(174,0,581,732),8671=>array(174,-3,581,729),8672=>array(44,87,703,540),8673=>array(174,0,581,732),8674=>array(51,87,710,540),8675=>array(174,-3,581,729),8676=>array(44,87,703,540),8677=>array(51,87,710,540),8678=>array(24,46,703,581),8679=>array(136,0,618,754),8680=>array(31,46,710,581),8681=>array(136,-25,618,729),8682=>array(136,0,618,754),8683=>array(136,0,618,754),8684=>array(136,0,618,754),8685=>array(136,0,618,754),8686=>array(136,0,618,754),8687=>array(136,0,618,754),8688=>array(31,46,710,581),8689=>array(53,0,709,729),8690=>array(53,0,709,729),8691=>array(136,-25,618,754),8692=>array(51,87,710,540),8693=>array(42,-3,713,732),8694=>array(51,-223,710,850),8695=>array(44,87,703,540),8696=>array(51,87,710,540),8697=>array(44,87,710,540),8698=>array(44,87,703,540),8699=>array(51,87,710,540),8700=>array(44,87,710,540),8701=>array(24,96,703,531),8702=>array(51,96,730,531),8703=>array(24,96,730,531),8704=>array(4,0,692,729),8705=>array(43,-14,566,742),8706=>array(26,-14,463,674),8707=>array(83,0,549,729),8708=>array(83,-46,549,775),8709=>array(42,-15,729,715),8710=>array(0,0,627,719),8711=>array(0,0,627,719),8712=>array(65,-2,742,730),8713=>array(65,-46,742,775),8714=>array(95,58,580,568),8715=>array(65,-2,742,730),8716=>array(65,-46,742,775),8717=>array(95,58,580,568),8718=>array(88,0,485,553),8719=>array(66,-192,641,719),8720=>array(66,-193,641,718),8721=>array(18,-192,627,719),8722=>array(95,256,659,371),8723=>array(95,0,659,627),8724=>array(44,0,583,729),8725=>array(0,-93,329,729),8726=>array(148,-49,478,772),8727=>array(106,0,647,626),8728=>array(135,151,428,477),8729=>array(92,253,250,442),8730=>array(33,-20,602,837),8731=>array(33,-20,602,933),8732=>array(32,-20,602,924),8733=>array(83,89,555,505),8734=>array(83,89,667,505),8735=>array(95,67,659,693),8736=>array(69,0,738,729),8737=>array(69,-44,738,729),8738=>array(104,-0,659,726),8739=>array(186,-207,290,773),8740=>array(43,-207,434,773),8741=>array(101,-207,376,773),8742=>array(43,-207,434,773),8743=>array(136,0,595,579),8744=>array(136,0,595,579),8745=>array(136,0,595,579),8746=>array(136,0,595,579),8747=>array(13,-227,493,754),8748=>array(13,-227,823,754),8749=>array(13,-227,1152,754),8750=>array(13,-227,493,754),8751=>array(34,-227,845,754),8752=>array(21,-227,1161,754),8753=>array(13,-227,555,754),8754=>array(13,-227,540,754),8755=>array(13,-227,530,754),8756=>array(53,78,573,647),8757=>array(53,78,573,647),8758=>array(53,79,211,647),8759=>array(53,78,573,647),8760=>array(95,256,659,631),8761=>array(95,45,721,584),8762=>array(95,-4,659,631),8763=>array(95,-34,659,660),8764=>array(95,212,659,415),8765=>array(95,212,659,415),8766=>array(59,131,695,497),8767=>array(95,42,659,584),8768=>array(77,0,260,626),8769=>array(95,76,659,551),8770=>array(95,110,659,482),8771=>array(95,144,659,517),8772=>array(95,0,659,637),8773=>array(95,37,659,628),8774=>array(95,-31,659,628),8775=>array(95,-86,659,726),8776=>array(95,110,659,517),8777=>array(95,8,659,614),8778=>array(95,37,659,628),8779=>array(95,-13,659,628),8780=>array(95,37,659,628),8781=>array(95,105,659,585),8782=>array(95,26,659,656),8783=>array(95,172,659,656),8784=>array(95,144,659,744),8785=>array(95,-117,659,743),8786=>array(94,-92,659,719),8787=>array(94,-92,658,719),8788=>array(88,102,868,520),8789=>array(86,102,870,520),8790=>array(95,144,659,482),8791=>array(95,144,659,839),8792=>array(95,144,659,704),8793=>array(95,144,659,840),8794=>array(95,144,659,840),8795=>array(95,144,659,959),8796=>array(95,144,659,952),8797=>array(95,144,659,762),8798=>array(95,144,659,786),8799=>array(95,144,659,903),8800=>array(95,-5,659,631),8801=>array(95,38,659,588),8802=>array(95,-69,659,695),8803=>array(95,-74,659,700),8804=>array(95,0,659,582),8805=>array(95,0,659,582),8806=>array(96,-106,659,617),8807=>array(96,-106,659,617),8808=>array(96,-185,659,617),8809=>array(96,-185,659,617),8810=>array(65,-34,877,660),8811=>array(65,-34,877,660),8812=>array(77,-132,373,759),8813=>array(95,-10,659,700),8814=>array(95,-4,659,690),8815=>array(95,-63,659,631),8816=>array(95,-112,659,645),8817=>array(95,-112,659,645),8818=>array(95,-84,659,582),8819=>array(95,-84,659,582),8820=>array(95,-112,659,645),8821=>array(95,-112,659,645),8822=>array(91,-119,659,678),8823=>array(91,-119,659,678),8824=>array(91,-221,659,779),8825=>array(91,-221,659,779),8826=>array(95,-55,659,681),8827=>array(95,-55,659,681),8828=>array(95,-177,659,684),8829=>array(95,-177,659,684),8830=>array(95,-132,659,684),8831=>array(95,-132,659,684),8832=>array(95,-89,659,781),8833=>array(95,-89,659,781),8834=>array(89,67,665,559),8835=>array(89,65,665,559),8836=>array(89,-96,665,726),8837=>array(89,-100,665,722),8838=>array(89,0,665,636),8839=>array(89,0,665,635),8840=>array(89,-124,665,759),8841=>array(89,-124,665,759),8842=>array(89,-97,665,636),8843=>array(89,-97,665,635),8844=>array(136,0,595,579),8845=>array(136,0,595,579),8846=>array(136,0,595,579),8847=>array(95,0,659,584),8848=>array(95,0,659,584),8849=>array(95,-115,659,667),8850=>array(95,-115,659,667),8851=>array(95,0,621,626),8852=>array(95,0,621,626),8853=>array(82,-14,672,643),8854=>array(82,-14,672,643),8855=>array(82,-14,672,643),8856=>array(82,-13,672,642),8857=>array(82,-14,672,643),8858=>array(82,-14,672,643),8859=>array(82,-14,672,643),8860=>array(82,-14,672,643),8861=>array(82,-14,672,643),8862=>array(69,-29,686,657),8863=>array(69,-29,686,657),8864=>array(69,-29,686,657),8865=>array(69,-29,686,657),8866=>array(77,0,746,705),8867=>array(77,0,746,705),8868=>array(77,0,746,705),8869=>array(77,0,746,705),8870=>array(77,0,412,705),8871=>array(77,0,412,705),8872=>array(77,0,746,705),8873=>array(77,0,746,705),8874=>array(77,0,746,705),8875=>array(77,0,746,705),8876=>array(77,-100,746,805),8877=>array(77,-100,746,805),8878=>array(77,-100,746,805),8879=>array(77,-100,746,805),8880=>array(95,-54,652,681),8881=>array(102,-54,659,681),8882=>array(95,-1,659,628),8883=>array(95,-1,659,628),8884=>array(95,-80,659,706),8885=>array(95,-80,659,706),8886=>array(54,151,846,477),8887=>array(54,151,846,477),8888=>array(53,151,701,477),8889=>array(39,-63,715,689),8890=>array(56,0,432,705),8891=>array(92,0,639,759),8892=>array(92,0,639,759),8893=>array(92,0,639,759),8894=>array(95,0,659,626),8895=>array(95,0,659,626),8896=>array(0,-192,759,719),8897=>array(0,-192,759,719),8898=>array(43,-192,715,719),8899=>array(43,-192,715,719),8900=>array(2,-233,442,807),8901=>array(92,253,250,442),8902=>array(75,112,489,549),8903=>array(95,-56,659,683),8904=>array(95,-48,805,674),8905=>array(95,-48,805,675),8906=>array(95,-48,805,675),8907=>array(95,-48,805,675),8908=>array(95,-48,805,675),8909=>array(95,144,659,517),8910=>array(44,0,687,579),8911=>array(44,0,687,579),8912=>array(83,-22,659,649),8913=>array(95,-22,671,649),8914=>array(75,0,680,639),8915=>array(75,-14,680,625),8916=>array(167,0,587,729),8917=>array(95,-100,659,729),8918=>array(95,30,659,597),8919=>array(95,30,659,597),8920=>array(65,-34,1215,660),8921=>array(65,-34,1215,660),8922=>array(95,-211,659,837),8923=>array(95,-211,659,837),8924=>array(95,0,659,582),8925=>array(95,0,659,582),8926=>array(95,-177,659,684),8927=>array(95,-177,659,684),8928=>array(95,-197,659,808),8929=>array(95,-263,659,742),8930=>array(95,-191,659,817),8931=>array(95,-191,659,817),8932=>array(95,-146,659,636),8933=>array(95,-146,659,636),8934=>array(95,-168,659,582),8935=>array(95,-168,659,582),8936=>array(95,-216,659,684),8937=>array(95,-216,659,684),8938=>array(95,-138,659,808),8939=>array(95,-138,659,808),8940=>array(95,-224,659,894),8941=>array(95,-224,659,894),8942=>array(371,-40,529,735),8943=>array(71,253,829,442),8944=>array(71,-40,829,735),8945=>array(71,-40,829,735),8946=>array(65,-2,977,730),8947=>array(65,-2,742,730),8948=>array(95,58,580,568),8949=>array(65,-2,742,984),8950=>array(65,-2,742,919),8951=>array(95,58,580,741),8952=>array(65,-207,742,730),8953=>array(65,-2,742,730),8954=>array(65,-2,977,730),8955=>array(65,-2,742,730),8956=>array(95,58,580,568),8957=>array(65,-2,742,919),8958=>array(95,58,580,741),8959=>array(95,0,712,732),8960=>array(28,-22,515,519),8961=>array(50,152,486,453),8962=>array(58,0,586,596),8963=>array(174,470,581,732),8964=>array(174,0,581,263),8965=>array(174,-12,581,423),8966=>array(174,-12,581,552),8967=>array(125,-39,314,798),8968=>array(77,-132,351,760),8969=>array(61,-132,334,760),8970=>array(77,-132,351,760),8971=>array(61,-132,334,760),8972=>array(316,-77,684,331),8973=>array(44,-77,412,331),8974=>array(316,226,684,634),8975=>array(44,226,412,634),8976=>array(95,140,659,444),8977=>array(2,113,482,646),8984=>array(76,0,759,759),8985=>array(95,140,659,444),8988=>array(77,425,363,760),8989=>array(59,425,345,760),8990=>array(77,-126,363,208),8991=>array(59,-126,345,208),8992=>array(211,-250,527,926),8993=>array(20,-240,336,940),8996=>array(68,215,969,575),8997=>array(68,0,969,575),8998=>array(68,0,1272,760),8999=>array(68,0,969,760),9000=>array(53,0,1247,729),9003=>array(0,0,1204,760),9004=>array(66,-91,720,748),9075=>array(70,-19,313,547),9076=>array(75,-208,604,562),9077=>array(39,-13,744,547),9082=>array(43,-13,581,559),9085=>array(11,-228,765,99),9095=>array(68,0,990,743),9108=>array(15,0,771,727),9115=>array(56,-252,394,928),9116=>array(56,-252,185,940),9117=>array(56,-240,394,940),9118=>array(56,-252,394,928),9119=>array(266,-252,394,940),9120=>array(56,-240,394,940),9121=>array(56,-252,394,928),9122=>array(56,-252,185,940),9123=>array(56,-240,394,940),9124=>array(56,-252,394,928),9125=>array(266,-252,394,940),9126=>array(56,-240,394,940),9127=>array(275,-261,602,928),9128=>array(74,-247,400,934),9129=>array(275,-240,602,934),9130=>array(275,-256,400,934),9131=>array(74,-261,400,928),9132=>array(275,-247,602,934),9133=>array(74,-240,400,934),9134=>array(211,-250,336,940),9166=>array(24,46,703,729),9167=>array(82,0,769,596),9187=>array(66,-91,720,748),9189=>array(2,75,690,444),9192=>array(35,-129,599,294),9250=>array(-73,-14,604,760),9251=>array(58,-228,586,99),9312=>array(53,-15,709,715),9313=>array(53,-15,709,715),9314=>array(53,-15,709,715),9315=>array(53,-15,709,715),9316=>array(53,-15,709,715),9317=>array(53,-15,709,715),9318=>array(53,-15,709,715),9319=>array(53,-15,709,715),9320=>array(53,-15,709,715),9321=>array(53,-15,709,715),9600=>array(-9,260,701,770),9601=>array(-9,-250,701,-123),9602=>array(-9,-250,701,-5),9603=>array(-9,-250,701,132),9604=>array(-9,-250,701,260),9605=>array(-9,-250,701,387),9606=>array(-9,-250,701,515),9607=>array(-9,-250,701,642),9608=>array(-9,-250,701,770),9609=>array(-9,-250,612,770),9610=>array(-9,-250,523,770),9611=>array(-9,-250,435,770),9612=>array(-9,-250,346,770),9613=>array(-9,-250,257,770),9614=>array(-9,-250,168,770),9615=>array(-9,-250,80,770),9616=>array(346,-250,701,770),9617=>array(-9,-250,612,770),9618=>array(-9,-250,701,770),9619=>array(-9,-250,701,770),9620=>array(-9,642,701,770),9621=>array(612,-250,701,770),9622=>array(-9,-250,347,260),9623=>array(346,-250,701,260),9624=>array(-9,260,347,770),9625=>array(-9,-250,701,770),9626=>array(-9,-250,701,770),9627=>array(-9,-250,701,770),9628=>array(-9,-250,701,770),9629=>array(346,260,701,770),9630=>array(-9,-250,701,770),9631=>array(-9,-250,701,770),9632=>array(82,-124,769,643),9633=>array(82,-124,769,643),9634=>array(82,-124,769,643),9635=>array(82,-124,769,643),9636=>array(82,-124,769,643),9637=>array(82,-124,769,643),9638=>array(82,-124,769,643),9639=>array(82,-124,769,643),9640=>array(82,-124,769,643),9641=>array(82,-124,769,643),9642=>array(82,11,528,509),9643=>array(82,11,528,509),9644=>array(82,75,769,444),9645=>array(82,75,769,444),9646=>array(82,-122,414,642),9647=>array(82,-122,414,642),9648=>array(2,75,690,444),9649=>array(2,75,690,444),9650=>array(2,-124,690,643),9651=>array(2,-124,690,643),9652=>array(2,11,449,509),9653=>array(2,11,449,509),9654=>array(2,-124,690,643),9655=>array(2,-124,690,643),9656=>array(2,11,449,509),9657=>array(2,11,449,509),9658=>array(2,11,690,509),9659=>array(2,11,690,509),9660=>array(2,-124,690,643),9661=>array(2,-124,690,643),9662=>array(2,11,449,509),9663=>array(2,11,449,509),9664=>array(2,-124,690,643),9665=>array(2,-124,690,643),9666=>array(2,11,449,509),9667=>array(2,11,449,509),9668=>array(2,11,690,509),9669=>array(2,11,690,509),9670=>array(2,-124,690,643),9671=>array(2,-124,690,643),9672=>array(2,-124,690,643),9673=>array(49,-125,736,645),9674=>array(2,-233,442,807),9675=>array(49,-125,736,645),9676=>array(50,-125,735,644),9677=>array(49,-125,736,645),9678=>array(49,-125,736,645),9679=>array(49,-123,736,641),9680=>array(49,-123,736,641),9681=>array(49,-123,736,641),9682=>array(49,-123,736,641),9683=>array(49,-123,736,641),9684=>array(49,-123,736,641),9685=>array(49,-123,736,641),9686=>array(49,-125,393,645),9687=>array(82,-125,425,645),9688=>array(82,-10,675,770),9689=>array(82,-250,792,770),9690=>array(82,260,792,770),9691=>array(82,-250,792,260),9692=>array(2,260,346,645),9693=>array(2,260,346,645),9694=>array(2,-125,346,260),9695=>array(2,-125,346,260),9696=>array(2,260,690,645),9697=>array(2,-125,690,260),9698=>array(2,-124,690,643),9699=>array(2,-124,690,643),9700=>array(2,-124,690,643),9701=>array(2,-124,690,643),9702=>array(129,196,446,547),9703=>array(82,-124,769,643),9704=>array(82,-124,769,643),9705=>array(82,-124,769,643),9706=>array(82,-124,769,643),9707=>array(82,-124,769,643),9708=>array(2,-124,690,643),9709=>array(2,-124,690,643),9710=>array(2,-124,690,643),9711=>array(49,-250,958,770),9712=>array(82,-124,769,643),9713=>array(82,-124,769,643),9714=>array(82,-124,769,643),9715=>array(82,-124,769,643),9716=>array(49,-123,736,641),9717=>array(49,-123,736,641),9718=>array(49,-123,736,641),9719=>array(49,-123,736,641),9720=>array(2,-124,690,643),9721=>array(2,-124,690,643),9722=>array(2,-124,690,643),9723=>array(82,-66,666,585),9724=>array(82,-66,666,585),9725=>array(82,-17,578,537),9726=>array(82,-17,578,537),9727=>array(2,-124,690,643),9728=>array(75,0,731,729),9729=>array(45,-2,854,360),9730=>array(44,0,763,729),9731=>array(75,-0,732,927),9732=>array(57,0,750,880),9733=>array(58,-4,749,723),9734=>array(58,-4,749,723),9735=>array(75,2,441,729),9736=>array(75,0,732,731),9737=>array(75,0,732,730),9738=>array(55,0,745,727),9739=>array(55,0,745,723),9740=>array(55,-1,549,722),9741=>array(55,0,857,723),9742=>array(62,0,1060,729),9743=>array(63,0,1062,729),9744=>array(81,0,727,729),9745=>array(80,0,727,729),9746=>array(80,0,727,729),9747=>array(67,78,411,656),9748=>array(44,0,783,933),9749=>array(66,0,740,731),9750=>array(75,0,732,731),9751=>array(75,0,732,727),9752=>array(70,0,737,729),9753=>array(75,140,732,574),9754=>array(75,113,732,569),9755=>array(75,113,732,569),9756=>array(78,104,729,569),9757=>array(64,0,483,724),9758=>array(78,103,729,569),9759=>array(64,-3,483,720),9760=>array(55,0,752,730),9761=>array(75,0,732,730),9762=>array(75,0,732,730),9763=>array(44,0,763,730),9764=>array(44,-2,558,727),9765=>array(75,0,597,731),9766=>array(75,-1,510,731),9767=>array(75,0,631,911),9768=>array(75,0,416,730),9769=>array(75,-1,732,729),9770=>array(78,0,729,730),9771=>array(75,0,733,731),9772=>array(75,0,565,731),9773=>array(75,0,732,730),9774=>array(75,0,732,730),9775=>array(75,0,732,730),9776=>array(75,0,732,729),9777=>array(75,0,733,729),9778=>array(75,0,732,729),9779=>array(75,0,732,729),9780=>array(75,0,732,729),9781=>array(75,0,732,729),9782=>array(75,0,732,729),9783=>array(75,0,732,729),9784=>array(71,3,735,721),9785=>array(75,-73,864,804),9786=>array(75,-73,864,804),9787=>array(75,-73,864,804),9788=>array(75,0,732,730),9789=>array(322,0,733,730),9790=>array(75,0,485,730),9791=>array(77,-102,476,732),9792=>array(77,-125,583,731),9793=>array(77,-14,583,843),9794=>array(71,-14,748,720),9795=>array(149,0,657,730),9796=>array(197,0,609,730),9797=>array(109,0,697,730),9798=>array(114,0,692,730),9799=>array(216,0,590,730),9800=>array(41,0,766,731),9801=>array(80,0,727,730),9802=>array(84,0,722,731),9803=>array(101,31,706,679),9804=>array(125,0,681,730),9805=>array(48,-180,759,730),9806=>array(75,52,732,653),9807=>array(30,-96,777,730),9808=>array(74,-0,732,730),9809=>array(84,0,722,730),9810=>array(77,153,729,579),9811=>array(141,0,666,730),9812=>array(88,0,719,730),9813=>array(99,0,708,730),9814=>array(149,-1,657,729),9815=>array(192,0,615,730),9816=>array(148,0,659,730),9817=>array(133,-0,673,730),9818=>array(88,0,719,730),9819=>array(99,0,708,730),9820=>array(149,-1,657,729),9821=>array(192,0,615,730),9822=>array(146,0,661,730),9823=>array(133,-0,673,730),9824=>array(142,0,665,729),9825=>array(81,0,726,727),9826=>array(151,0,655,729),9827=>array(100,0,707,729),9828=>array(141,0,666,729),9829=>array(80,0,728,729),9830=>array(151,0,655,729),9831=>array(100,0,707,732),9832=>array(95,-1,712,729),9833=>array(75,-5,306,729),9834=>array(75,-5,499,729),9835=>array(165,-102,642,729),9836=>array(83,-5,724,729),9837=>array(79,-3,353,731),9838=>array(75,0,246,731),9839=>array(76,0,360,731),9840=>array(75,0,598,731),9841=>array(58,0,631,731),9842=>array(75,0,732,709),9843=>array(68,16,738,731),9844=>array(68,16,738,731),9845=>array(68,16,738,731),9846=>array(68,16,738,731),9847=>array(68,16,738,731),9848=>array(68,16,738,731),9849=>array(68,16,738,731),9850=>array(68,16,738,731),9851=>array(75,0,731,704),9852=>array(75,0,733,731),9853=>array(75,0,733,731),9854=>array(75,0,733,731),9855=>array(134,1,672,731),9856=>array(66,0,717,725),9857=>array(66,0,717,725),9858=>array(66,0,717,725),9859=>array(66,0,717,725),9860=>array(66,0,717,725),9861=>array(66,0,717,725),9862=>array(75,0,732,731),9863=>array(75,0,732,731),9864=>array(75,0,732,731),9865=>array(75,0,732,731),9866=>array(75,0,732,98),9867=>array(75,0,732,98),9868=>array(75,0,732,413),9869=>array(75,0,732,413),9870=>array(75,0,732,413),9871=>array(75,0,732,413),9872=>array(151,3,655,731),9873=>array(151,3,655,731),9874=>array(46,0,760,731),9875=>array(87,-10,720,732),9876=>array(118,0,689,729),9877=>array(55,-10,431,732),9878=>array(53,-10,753,732),9879=>array(55,0,751,732),9880=>array(130,0,676,732),9881=>array(85,-17,722,727),9882=>array(115,-9,691,733),9883=>array(114,0,692,728),9884=>array(114,0,692,729),9888=>array(44,0,763,729),9889=>array(75,2,558,730),9890=>array(77,-125,827,731),9891=>array(71,-206,921,720),9892=>array(77,-186,998,856),9893=>array(77,-125,753,917),9894=>array(118,-14,654,869),9895=>array(91,-170,667,884),9896=>array(168,-14,585,869),9897=>array(4,133,746,596),9898=>array(168,133,585,597),9899=>array(168,133,585,597),9900=>array(224,194,531,536),9901=>array(158,194,597,536),9902=>array(37,169,717,560),9903=>array(4,194,750,536),9904=>array(92,237,681,540),9905=>array(190,42,564,698),9906=>array(77,-125,583,731),9907=>array(151,-125,582,731),9908=>array(77,-125,582,731),9909=>array(77,-125,582,731),9910=>array(53,-118,712,643),9911=>array(175,-104,536,710),9912=>array(142,-125,489,731),9920=>array(38,4,716,553),9921=>array(38,4,716,724),9922=>array(38,4,716,553),9923=>array(38,4,716,724),9954=>array(77,-14,583,843),9985=>array(9,190,723,635),9986=>array(38,141,706,588),9987=>array(9,94,723,539),9988=>array(32,119,742,613),9990=>array(38,-14,716,742),9991=>array(38,-14,716,742),9992=>array(53,21,704,708),9993=>array(58,107,696,622),9996=>array(191,0,505,742),9997=>array(19,83,722,678),9998=>array(80,75,652,710),9999=>array(23,198,738,530),10000=>array(80,75,652,710),10001=>array(39,185,681,544),10002=>array(61,209,681,520),10003=>array(135,97,601,630),10004=>array(104,87,649,631),10005=>array(114,72,641,657),10006=>array(77,31,677,698),10007=>array(105,-9,631,732),10008=>array(110,0,679,739),10009=>array(49,0,705,729),10010=>array(49,0,705,729),10011=>array(49,0,705,729),10012=>array(49,0,705,729),10013=>array(148,0,606,729),10014=>array(118,0,610,729),10015=>array(140,0,615,729),10016=>array(49,0,705,729),10017=>array(82,-13,672,744),10018=>array(37,-14,717,742),10019=>array(38,-12,716,742),10020=>array(36,-14,718,742),10021=>array(37,-13,717,743),10022=>array(38,-14,717,745),10023=>array(38,-14,717,745),10025=>array(21,-9,733,743),10026=>array(38,-14,716,742),10027=>array(21,-9,733,743),10028=>array(21,-9,733,743),10029=>array(21,-9,733,743),10030=>array(21,-9,733,743),10031=>array(21,-9,733,743),10032=>array(22,12,734,714),10033=>array(58,0,696,729),10034=>array(66,0,688,729),10035=>array(49,0,705,729),10036=>array(28,-14,708,742),10037=>array(37,-14,717,742),10038=>array(82,-14,672,742),10039=>array(37,-14,717,742),10040=>array(37,-14,717,742),10041=>array(37,-14,717,742),10042=>array(49,0,705,729),10043=>array(73,-14,681,742),10044=>array(73,-14,681,742),10045=>array(76,-14,678,742),10046=>array(71,-14,683,742),10047=>array(48,0,706,709),10048=>array(48,0,706,709),10049=>array(37,-14,717,742),10050=>array(38,-14,716,742),10051=>array(71,-14,683,742),10052=>array(80,0,674,729),10053=>array(68,0,686,729),10054=>array(57,2,696,729),10055=>array(70,-13,684,742),10056=>array(42,-13,712,730),10057=>array(42,-13,712,730),10058=>array(37,-13,717,743),10059=>array(37,-13,717,743),10061=>array(44,-10,762,738),10063=>array(53,-49,753,729),10064=>array(53,0,753,777),10065=>array(53,-49,753,729),10066=>array(53,0,753,777),10070=>array(75,-2,732,728),10072=>array(339,-240,415,760),10073=>array(302,-240,452,760),10074=>array(228,-240,527,760),10075=>array(76,395,259,729),10076=>array(53,395,236,729),10077=>array(76,395,476,729),10078=>array(53,395,452,729),10081=>array(140,-93,695,851),10082=>array(182,-17,572,742),10083=>array(146,-17,607,742),10084=>array(48,83,706,645),10085=>array(151,-1,656,729),10086=>array(55,21,652,702),10087=>array(70,169,684,564),10088=>array(176,-139,583,769),10089=>array(176,-139,583,769),10090=>array(237,-132,517,758),10091=>array(237,-132,517,758),10092=>array(193,-240,546,760),10093=>array(208,-240,561,760),10094=>array(127,-240,617,760),10095=>array(137,-240,626,760),10096=>array(149,-240,590,760),10097=>array(165,-240,605,760),10098=>array(311,-241,482,760),10099=>array(272,-241,443,760),10100=>array(157,-163,571,760),10101=>array(183,-163,597,760),10102=>array(53,-15,709,715),10103=>array(53,-15,709,715),10104=>array(53,-15,709,715),10105=>array(53,-15,709,715),10106=>array(53,-15,709,715),10107=>array(53,-15,709,715),10108=>array(53,-15,709,715),10109=>array(53,-15,709,715),10110=>array(53,-15,709,715),10111=>array(53,-15,709,715),10112=>array(4,-52,750,780),10113=>array(4,-52,750,780),10114=>array(4,-52,750,780),10115=>array(4,-52,750,780),10116=>array(4,-52,750,780),10117=>array(4,-52,750,780),10118=>array(4,-52,750,780),10119=>array(4,-52,750,780),10120=>array(4,-52,750,780),10121=>array(4,-52,750,780),10122=>array(4,-52,750,780),10123=>array(4,-52,750,780),10124=>array(4,-52,750,780),10125=>array(4,-52,750,780),10126=>array(4,-52,750,780),10127=>array(4,-52,750,780),10128=>array(4,-52,750,780),10129=>array(4,-52,750,780),10130=>array(4,-52,750,780),10131=>array(4,-52,750,780),10132=>array(51,75,710,552),10136=>array(110,55,614,614),10137=>array(51,100,710,527),10138=>array(110,13,614,572),10139=>array(51,129,710,498),10140=>array(51,57,688,570),10141=>array(51,100,710,527),10142=>array(51,100,710,527),10143=>array(51,100,710,527),10144=>array(51,100,710,527),10145=>array(51,46,730,581),10146=>array(100,94,710,533),10147=>array(100,94,710,533),10148=>array(100,-4,710,631),10149=>array(51,100,710,548),10150=>array(51,79,710,527),10151=>array(216,-7,545,634),10152=>array(51,100,710,527),10153=>array(51,75,688,552),10154=>array(51,75,688,552),10155=>array(19,12,715,586),10156=>array(19,12,715,586),10157=>array(122,0,697,574),10158=>array(122,0,697,574),10159=>array(56,49,719,574),10161=>array(56,49,719,574),10162=>array(139,-20,649,585),10163=>array(57,157,710,470),10164=>array(72,55,614,655),10165=>array(51,173,710,454),10166=>array(73,-29,614,572),10167=>array(73,55,614,655),10168=>array(51,172,710,455),10169=>array(73,-28,614,572),10170=>array(50,84,710,543),10171=>array(66,140,702,487),10172=>array(71,167,697,460),10173=>array(71,118,697,509),10174=>array(51,81,710,546),10181=>array(48,-163,365,769),10182=>array(46,-163,363,769),10208=>array(2,-233,442,807),10214=>array(77,-132,378,760),10215=>array(77,-132,378,760),10216=>array(94,-132,339,759),10217=>array(72,-132,317,759),10218=>array(94,-132,577,759),10219=>array(72,-132,554,759),10224=>array(37,0,717,732),10225=>array(38,-3,718,729),10226=>array(8,45,734,685),10227=>array(20,45,747,685),10228=>array(51,-14,998,643),10229=>array(44,87,1239,540),10230=>array(51,87,1247,540),10231=>array(44,87,1247,540),10232=>array(44,87,1239,540),10233=>array(51,87,1247,540),10234=>array(44,87,1247,540),10235=>array(44,87,1239,540),10236=>array(51,87,1247,540),10237=>array(44,87,1239,540),10238=>array(51,87,1247,540),10239=>array(51,87,1247,540),10241=>array(132,586,308,781),10242=>array(132,325,308,521),10243=>array(132,325,308,781),10244=>array(132,65,308,261),10245=>array(132,65,308,781),10246=>array(132,65,308,521),10247=>array(132,65,308,781),10248=>array(396,586,571,781),10249=>array(132,586,571,781),10250=>array(132,325,571,781),10251=>array(132,325,571,781),10252=>array(132,65,571,781),10253=>array(132,65,571,781),10254=>array(132,65,571,781),10255=>array(132,65,571,781),10256=>array(396,325,571,521),10257=>array(132,325,571,781),10258=>array(132,325,571,521),10259=>array(132,325,571,781),10260=>array(132,65,571,521),10261=>array(132,65,571,781),10262=>array(132,65,571,521),10263=>array(132,65,571,781),10264=>array(396,325,571,781),10265=>array(132,325,571,781),10266=>array(132,325,571,781),10267=>array(132,325,571,781),10268=>array(132,65,571,781),10269=>array(132,65,571,781),10270=>array(132,65,571,781),10271=>array(132,65,571,781),10272=>array(396,65,571,261),10273=>array(132,65,571,781),10274=>array(132,65,571,521),10275=>array(132,65,571,781),10276=>array(132,65,571,261),10277=>array(132,65,571,781),10278=>array(132,65,571,521),10279=>array(132,65,571,781),10280=>array(396,65,571,781),10281=>array(132,65,571,781),10282=>array(132,65,571,781),10283=>array(132,65,571,781),10284=>array(132,65,571,781),10285=>array(132,65,571,781),10286=>array(132,65,571,781),10287=>array(132,65,571,781),10288=>array(396,65,571,521),10289=>array(132,65,571,781),10290=>array(132,65,571,521),10291=>array(132,65,571,781),10292=>array(132,65,571,521),10293=>array(132,65,571,781),10294=>array(132,65,571,521),10295=>array(132,65,571,781),10296=>array(396,65,571,781),10297=>array(132,65,571,781),10298=>array(132,65,571,781),10299=>array(132,65,571,781),10300=>array(132,65,571,781),10301=>array(132,65,571,781),10302=>array(132,65,571,781),10303=>array(132,65,571,781),10304=>array(132,-195,308,0),10305=>array(132,-195,308,781),10306=>array(132,-195,308,521),10307=>array(132,-195,308,781),10308=>array(132,-195,308,261),10309=>array(132,-195,308,781),10310=>array(132,-195,308,521),10311=>array(132,-195,308,781),10312=>array(132,-195,571,781),10313=>array(132,-195,571,781),10314=>array(132,-195,571,781),10315=>array(132,-195,571,781),10316=>array(132,-195,571,781),10317=>array(132,-195,571,781),10318=>array(132,-195,571,781),10319=>array(132,-195,571,781),10320=>array(132,-195,571,521),10321=>array(132,-195,571,781),10322=>array(132,-195,571,521),10323=>array(132,-195,571,781),10324=>array(132,-195,571,521),10325=>array(132,-195,571,781),10326=>array(132,-195,571,521),10327=>array(132,-195,571,781),10328=>array(132,-195,571,781),10329=>array(132,-195,571,781),10330=>array(132,-195,571,781),10331=>array(132,-195,571,781),10332=>array(132,-195,571,781),10333=>array(132,-195,571,781),10334=>array(132,-195,571,781),10335=>array(132,-195,571,781),10336=>array(132,-195,571,261),10337=>array(132,-195,571,781),10338=>array(132,-195,571,521),10339=>array(132,-195,571,781),10340=>array(132,-195,571,261),10341=>array(132,-195,571,781),10342=>array(132,-195,571,521),10343=>array(132,-195,571,781),10344=>array(132,-195,571,781),10345=>array(132,-195,571,781),10346=>array(132,-195,571,781),10347=>array(132,-195,571,781),10348=>array(132,-195,571,781),10349=>array(132,-195,571,781),10350=>array(132,-195,571,781),10351=>array(132,-195,571,781),10352=>array(132,-195,571,521),10353=>array(132,-195,571,781),10354=>array(132,-195,571,521),10355=>array(132,-195,571,781),10356=>array(132,-195,571,521),10357=>array(132,-195,571,781),10358=>array(132,-195,571,521),10359=>array(132,-195,571,781),10360=>array(132,-195,571,781),10361=>array(132,-195,571,781),10362=>array(132,-195,571,781),10363=>array(132,-195,571,781),10364=>array(132,-195,571,781),10365=>array(132,-195,571,781),10366=>array(132,-195,571,781),10367=>array(132,-195,571,781),10368=>array(396,-195,571,0),10369=>array(132,-195,571,781),10370=>array(132,-195,571,521),10371=>array(132,-195,571,781),10372=>array(132,-195,571,261),10373=>array(132,-195,571,781),10374=>array(132,-195,571,521),10375=>array(132,-195,571,781),10376=>array(396,-195,571,781),10377=>array(132,-195,571,781),10378=>array(132,-195,571,781),10379=>array(132,-195,571,781),10380=>array(132,-195,571,781),10381=>array(132,-195,571,781),10382=>array(132,-195,571,781),10383=>array(132,-195,571,781),10384=>array(396,-195,571,521),10385=>array(132,-195,571,781),10386=>array(132,-195,571,521),10387=>array(132,-195,571,781),10388=>array(132,-195,571,521),10389=>array(132,-195,571,781),10390=>array(132,-195,571,521),10391=>array(132,-195,571,781),10392=>array(396,-195,571,781),10393=>array(132,-195,571,781),10394=>array(132,-195,571,781),10395=>array(132,-195,571,781),10396=>array(132,-195,571,781),10397=>array(132,-195,571,781),10398=>array(132,-195,571,781),10399=>array(132,-195,571,781),10400=>array(396,-195,571,261),10401=>array(132,-195,571,781),10402=>array(132,-195,571,521),10403=>array(132,-195,571,781),10404=>array(132,-195,571,261),10405=>array(132,-195,571,781),10406=>array(132,-195,571,521),10407=>array(132,-195,571,781),10408=>array(396,-195,571,781),10409=>array(132,-195,571,781),10410=>array(132,-195,571,781),10411=>array(132,-195,571,781),10412=>array(132,-195,571,781),10413=>array(132,-195,571,781),10414=>array(132,-195,571,781),10415=>array(132,-195,571,781),10416=>array(396,-195,571,521),10417=>array(132,-195,571,781),10418=>array(132,-195,571,521),10419=>array(132,-195,571,781),10420=>array(132,-195,571,521),10421=>array(132,-195,571,781),10422=>array(132,-195,571,521),10423=>array(132,-195,571,781),10424=>array(396,-195,571,781),10425=>array(132,-195,571,781),10426=>array(132,-195,571,781),10427=>array(132,-195,571,781),10428=>array(132,-195,571,781),10429=>array(132,-195,571,781),10430=>array(132,-195,571,781),10431=>array(132,-195,571,781),10432=>array(132,-195,571,0),10433=>array(132,-195,571,781),10434=>array(132,-195,571,521),10435=>array(132,-195,571,781),10436=>array(132,-195,571,261),10437=>array(132,-195,571,781),10438=>array(132,-195,571,521),10439=>array(132,-195,571,781),10440=>array(132,-195,571,781),10441=>array(132,-195,571,781),10442=>array(132,-195,571,781),10443=>array(132,-195,571,781),10444=>array(132,-195,571,781),10445=>array(132,-195,571,781),10446=>array(132,-195,571,781),10447=>array(132,-195,571,781),10448=>array(132,-195,571,521),10449=>array(132,-195,571,781),10450=>array(132,-195,571,521),10451=>array(132,-195,571,781),10452=>array(132,-195,571,521),10453=>array(132,-195,571,781),10454=>array(132,-195,571,521),10455=>array(132,-195,571,781),10456=>array(132,-195,571,781),10457=>array(132,-195,571,781),10458=>array(132,-195,571,781),10459=>array(132,-195,571,781),10460=>array(132,-195,571,781),10461=>array(132,-195,571,781),10462=>array(132,-195,571,781),10463=>array(132,-195,571,781),10464=>array(132,-195,571,261),10465=>array(132,-195,571,781),10466=>array(132,-195,571,521),10467=>array(132,-195,571,781),10468=>array(132,-195,571,261),10469=>array(132,-195,571,781),10470=>array(132,-195,571,521),10471=>array(132,-195,571,781),10472=>array(132,-195,571,781),10473=>array(132,-195,571,781),10474=>array(132,-195,571,781),10475=>array(132,-195,571,781),10476=>array(132,-195,571,781),10477=>array(132,-195,571,781),10478=>array(132,-195,571,781),10479=>array(132,-195,571,781),10480=>array(132,-195,571,521),10481=>array(132,-195,571,781),10482=>array(132,-195,571,521),10483=>array(132,-195,571,781),10484=>array(132,-195,571,521),10485=>array(132,-195,571,781),10486=>array(132,-195,571,521),10487=>array(132,-195,571,781),10488=>array(132,-195,571,781),10489=>array(132,-195,571,781),10490=>array(132,-195,571,781),10491=>array(132,-195,571,781),10492=>array(132,-195,571,781),10493=>array(132,-195,571,781),10494=>array(132,-195,571,781),10495=>array(132,-195,571,781),10502=>array(44,87,703,540),10503=>array(51,87,710,540),10506=>array(119,0,637,732),10507=>array(119,0,637,732),10560=>array(78,45,653,853),10561=>array(78,45,653,853),10627=>array(112,-163,566,760),10628=>array(112,-163,566,760),10702=>array(95,-258,659,800),10703=>array(95,-1,847,628),10704=>array(95,-1,847,628),10705=>array(95,-48,805,674),10706=>array(95,-48,805,674),10707=>array(95,-48,805,674),10708=>array(95,-48,805,675),10709=>array(95,-48,805,675),10731=>array(2,-233,442,807),10746=>array(95,0,659,627),10747=>array(95,0,659,627),10752=>array(25,-211,875,734),10753=>array(25,-211,875,734),10754=>array(25,-211,875,734),10764=>array(13,-227,1482,754),10765=>array(13,-227,493,754),10766=>array(13,-227,493,754),10767=>array(13,-227,493,754),10768=>array(13,-227,493,754),10769=>array(13,-227,519,754),10770=>array(13,-227,493,754),10771=>array(13,-227,493,754),10772=>array(13,-228,586,754),10773=>array(13,-227,493,754),10774=>array(13,-227,493,754),10775=>array(-27,-227,500,754),10776=>array(13,-227,493,754),10777=>array(13,-227,493,754),10778=>array(13,-227,493,754),10779=>array(13,-227,493,898),10780=>array(13,-372,493,754),10799=>array(112,20,642,607),10858=>array(95,212,659,660),10859=>array(95,-34,659,660),10877=>array(95,-150,659,632),10878=>array(95,-150,659,632),10879=>array(95,-150,659,632),10880=>array(95,-150,659,632),10881=>array(95,-150,659,688),10882=>array(95,-150,659,688),10883=>array(95,-150,659,827),10884=>array(95,-150,659,827),10885=>array(95,-217,659,630),10886=>array(95,-217,659,630),10887=>array(95,-124,659,582),10888=>array(95,-124,659,582),10889=>array(95,-281,659,630),10890=>array(95,-281,659,630),10891=>array(95,-303,659,814),10892=>array(95,-303,659,814),10893=>array(95,-183,659,653),10894=>array(95,-183,659,653),10895=>array(95,-245,659,765),10896=>array(95,-245,659,765),10897=>array(96,-278,659,782),10898=>array(96,-278,659,782),10899=>array(95,-263,659,771),10900=>array(95,-263,659,771),10901=>array(95,-50,659,733),10902=>array(95,-50,659,733),10903=>array(95,-50,659,733),10904=>array(95,-50,659,733),10905=>array(96,-45,659,678),10906=>array(96,-45,659,678),10907=>array(95,-81,659,724),10908=>array(95,-81,659,724),10909=>array(95,13,659,680),10910=>array(95,13,659,680),10911=>array(95,-239,659,746),10912=>array(95,-239,659,746),10926=>array(95,22,659,656),10927=>array(95,-83,659,684),10928=>array(95,-83,659,684),10929=>array(95,-246,659,684),10930=>array(95,-246,659,684),10931=>array(95,-205,659,672),10932=>array(95,-205,659,672),10933=>array(95,-304,659,672),10934=>array(95,-304,659,672),10935=>array(95,-252,659,713),10936=>array(95,-252,659,713),10937=>array(95,-316,659,713),10938=>array(95,-316,659,713),11001=>array(95,-195,659,609),11002=>array(95,-195,659,609),11008=>array(110,-23,670,598),11009=>array(84,-23,644,598),11010=>array(110,-23,670,598),11011=>array(84,-23,644,598),11012=>array(24,46,710,581),11013=>array(24,46,703,581),11014=>array(136,0,618,754),11015=>array(136,-25,618,729),11016=>array(110,-23,670,598),11017=>array(84,-23,644,598),11018=>array(110,-23,670,598),11019=>array(84,-23,644,598),11020=>array(24,46,710,581),11021=>array(136,-25,618,754),11022=>array(51,-25,721,372),11023=>array(51,255,721,652),11024=>array(34,-25,703,372),11025=>array(34,255,703,652),11026=>array(82,-124,769,643),11027=>array(82,-124,769,643),11028=>array(82,-124,769,643),11029=>array(82,-124,769,643),11030=>array(2,-124,690,643),11031=>array(2,-124,690,643),11032=>array(2,-124,690,643),11033=>array(2,-124,690,643),11034=>array(82,-124,769,643),11039=>array(16,-26,767,767),11040=>array(16,-26,767,767),11041=>array(66,-91,720,748),11042=>array(66,-91,720,748),11043=>array(15,-35,771,692),11044=>array(49,-250,958,770),11091=>array(34,-47,749,788),11092=>array(34,-47,749,788),11360=>array(4,0,549,729),11361=>array(4,0,320,760),11362=>array(-16,0,549,729),11363=>array(5,0,623,729),11364=>array(83,-200,675,729),11365=>array(29,-46,576,594),11366=>array(12,-93,410,822),11367=>array(83,-157,839,729),11368=>array(75,-138,729,760),11369=>array(83,-157,725,729),11370=>array(75,-138,616,760),11371=>array(40,-157,691,729),11372=>array(40,-138,560,547),11373=>array(43,-14,692,741),11374=>array(83,-200,813,729),11375=>array(4,0,692,729),11376=>array(43,-14,692,741),11377=>array(13,0,701,560),11378=>array(26,0,1099,742),11379=>array(31,0,951,560),11380=>array(34,0,574,586),11381=>array(83,0,545,729),11382=>array(75,0,433,547),11383=>array(58,0,652,552),11385=>array(75,-13,441,760),11386=>array(39,-14,580,560),11387=>array(70,0,420,547),11388=>array(-20,-121,149,425),11389=>array(2,326,436,734),11390=>array(64,-240,603,742),11391=>array(40,-240,612,729),11520=>array(40,-64,548,547),11521=>array(14,-232,563,546),11522=>array(36,-232,567,547),11523=>array(38,-10,527,807),11524=>array(35,-228,552,546),11525=>array(37,-228,889,546),11526=>array(18,-8,602,816),11527=>array(37,-9,877,547),11528=>array(35,0,531,547),11529=>array(37,-227,553,816),11530=>array(35,-9,887,546),11531=>array(38,-8,584,816),11532=>array(35,0,564,816),11533=>array(37,-8,889,546),11534=>array(37,-8,566,546),11535=>array(37,-228,761,816),11536=>array(38,-9,879,816),11537=>array(37,-9,567,816),11538=>array(41,-232,549,546),11539=>array(37,-228,886,661),11540=>array(40,-228,862,546),11541=>array(35,-228,880,816),11542=>array(40,0,565,546),11543=>array(37,-228,567,547),11544=>array(37,-232,564,546),11545=>array(40,-228,565,816),11546=>array(38,-232,549,547),11547=>array(39,-9,593,816),11548=>array(40,-228,891,547),11549=>array(40,-232,557,546),11550=>array(41,-232,576,546),11551=>array(40,-228,554,567),11552=>array(40,-9,904,546),11553=>array(40,-228,558,816),11554=>array(38,-9,541,626),11555=>array(40,-228,560,816),11556=>array(37,-228,615,546),11557=>array(40,-8,863,816),11568=>array(49,-14,573,380),11569=>array(44,-14,803,742),11570=>array(44,-14,803,742),11571=>array(46,0,606,729),11572=>array(46,0,606,729),11573=>array(50,0,602,729),11574=>array(43,0,565,729),11575=>array(4,0,692,729),11576=>array(4,0,692,729),11577=>array(83,0,549,729),11578=>array(83,0,549,729),11579=>array(66,-14,656,742),11580=>array(66,0,824,729),11581=>array(83,0,679,729),11582=>array(83,0,495,729),11583=>array(83,0,679,729),11584=>array(44,-14,803,742),11585=>array(44,-84,803,815),11586=>array(83,0,253,729),11587=>array(19,0,648,729),11588=>array(83,0,671,729),11589=>array(-27,0,850,729),11590=>array(83,0,539,729),11591=>array(83,0,639,729),11592=>array(66,256,546,445),11593=>array(83,0,549,729),11594=>array(66,0,476,729),11595=>array(57,-14,803,742),11596=>array(74,0,626,729),11597=>array(83,0,671,729),11598=>array(83,0,549,729),11599=>array(83,0,252,729),11600=>array(74,0,626,729),11601=>array(83,0,253,729),11602=>array(38,-14,615,729),11603=>array(49,-14,573,742),11604=>array(44,-14,803,742),11605=>array(44,-95,803,742),11606=>array(83,0,671,729),11607=>array(83,0,253,729),11608=>array(83,0,670,729),11609=>array(44,-14,803,742),11610=>array(44,-14,803,823),11611=>array(44,-14,646,742),11612=>array(71,0,718,729),11613=>array(17,0,676,729),11614=>array(44,-14,646,742),11615=>array(83,0,549,729),11616=>array(4,0,692,729),11617=>array(83,0,671,729),11618=>array(83,0,540,729),11619=>array(44,0,721,729),11620=>array(83,0,589,729),11621=>array(44,0,721,729),11631=>array(58,490,586,729),11800=>array(62,-14,464,728),11807=>array(95,-34,659,415),11810=>array(77,403,351,760),11811=>array(61,403,334,760),11812=>array(77,-132,351,225),11813=>array(61,-132,334,225),11822=>array(62,0,464,742),19904=>array(75,-158,732,729),19905=>array(75,-158,732,729),19906=>array(75,-158,732,729),19907=>array(75,-158,732,729),19908=>array(75,-158,732,729),19909=>array(75,-158,732,729),19910=>array(75,-158,732,729),19911=>array(75,-158,732,729),19912=>array(75,-158,732,729),19913=>array(75,-158,733,729),19914=>array(75,-158,732,729),19915=>array(75,-158,732,729),19916=>array(75,-158,732,729),19917=>array(75,-158,732,729),19918=>array(75,-158,732,729),19919=>array(75,-158,732,729),19920=>array(75,-158,733,729),19921=>array(75,-158,732,729),19922=>array(75,-158,733,729),19923=>array(75,-158,732,729),19924=>array(75,-158,732,729),19925=>array(75,-158,732,729),19926=>array(75,-158,732,729),19927=>array(75,-158,732,729),19928=>array(75,-158,732,729),19929=>array(75,-158,732,729),19930=>array(75,-158,732,729),19931=>array(75,-158,733,729),19932=>array(75,-158,732,729),19933=>array(75,-158,732,729),19934=>array(75,-158,733,729),19935=>array(75,-158,732,729),19936=>array(75,-158,732,729),19937=>array(75,-158,732,729),19938=>array(75,-158,732,729),19939=>array(75,-158,732,729),19940=>array(75,-158,732,729),19941=>array(75,-158,733,729),19942=>array(75,-158,732,729),19943=>array(75,-158,732,729),19944=>array(75,-158,733,729),19945=>array(75,-158,732,729),19946=>array(75,-158,733,729),19947=>array(75,-158,732,729),19948=>array(75,-158,733,729),19949=>array(75,-158,732,729),19950=>array(75,-158,733,729),19951=>array(75,-158,732,729),19952=>array(75,-158,733,729),19953=>array(75,-158,732,729),19954=>array(75,-158,732,729),19955=>array(75,-158,732,729),19956=>array(75,-158,732,729),19957=>array(75,-158,733,729),19958=>array(75,-158,732,729),19959=>array(75,-158,732,729),19960=>array(75,-158,732,729),19961=>array(75,-158,733,729),19962=>array(75,-158,732,729),19963=>array(75,-158,733,729),19964=>array(75,-158,733,729),19965=>array(75,-158,732,729),19966=>array(75,-158,732,729),19967=>array(75,-158,732,729),42192=>array(83,0,623,729),42193=>array(83,0,623,729),42194=>array(37,0,577,729),42195=>array(83,0,700,729),42196=>array(4,0,609,729),42197=>array(4,0,610,729),42198=>array(44,-14,672,742),42199=>array(83,0,725,729),42200=>array(-27,0,615,729),42201=>array(0,-14,396,729),42202=>array(44,-14,603,742),42203=>array(44,-14,603,742),42204=>array(40,0,612,729),42205=>array(83,0,540,729),42206=>array(83,0,540,729),42207=>array(83,0,813,729),42208=>array(83,0,671,729),42209=>array(83,0,549,729),42210=>array(64,-14,583,742),42211=>array(83,0,675,729),42212=>array(18,0,611,729),42213=>array(4,0,692,729),42214=>array(4,0,692,729),42215=>array(83,0,671,729),42216=>array(22,-14,650,742),42217=>array(82,0,477,743),42218=>array(26,0,965,729),42219=>array(17,0,676,729),42220=>array(-9,0,661,729),42221=>array(63,0,604,729),42222=>array(4,0,692,729),42223=>array(4,0,692,729),42224=>array(83,0,549,729),42225=>array(66,0,532,729),42226=>array(83,0,252,729),42227=>array(44,-14,720,742),42228=>array(83,-14,648,729),42229=>array(83,0,648,743),42230=>array(8,0,475,729),42231=>array(47,0,665,729),42232=>array(66,0,224,189),42233=>array(22,-142,224,189),42234=>array(66,0,541,189),42235=>array(66,-142,541,189),42236=>array(21,-142,224,547),42237=>array(65,0,224,547),42238=>array(66,0,463,405),42239=>array(66,134,463,492),42564=>array(23,-14,541,742),42565=>array(13,-14,460,560),42566=>array(83,0,385,729),42567=>array(75,0,321,547),42572=>array(51,-14,1213,654),42573=>array(42,-13,1014,547),42576=>array(44,0,1028,729),42577=>array(18,0,852,547),42580=>array(49,-14,974,742),42581=>array(40,-14,800,560),42582=>array(83,0,979,729),42583=>array(75,-14,792,560),42594=>array(54,-157,952,729),42595=>array(50,-138,811,547),42596=>array(41,0,962,729),42597=>array(49,0,800,547),42598=>array(83,0,1110,729),42599=>array(75,0,876,547),42600=>array(44,-14,720,742),42601=>array(39,-14,580,560),42602=>array(44,-14,889,742),42603=>array(39,-14,743,560),42604=>array(44,-14,1221,742),42605=>array(39,-14,957,560),42606=>array(25,-208,839,743),42634=>array(4,-200,795,729),42635=>array(3,-216,638,547),42636=>array(4,0,609,729),42637=>array(3,0,518,547),42644=>array(72,0,645,729),42645=>array(75,0,571,760),42760=>array(86,0,364,693),42761=>array(86,0,364,693),42762=>array(86,0,364,693),42763=>array(86,0,364,693),42764=>array(86,0,364,693),42765=>array(86,0,364,693),42766=>array(86,0,364,693),42767=>array(86,0,364,693),42768=>array(86,0,364,693),42769=>array(86,0,364,693),42770=>array(86,0,364,693),42771=>array(86,0,364,693),42772=>array(86,0,364,693),42773=>array(86,0,364,693),42774=>array(86,0,364,693),42779=>array(52,326,308,736),42780=>array(52,324,308,734),42781=>array(79,326,180,734),42782=>array(79,326,180,734),42783=>array(79,0,180,408),42786=>array(60,0,368,729),42787=>array(60,0,320,547),42788=>array(50,224,432,742),42789=>array(50,42,432,560),42790=>array(83,-200,671,729),42791=>array(75,-216,571,760),42792=>array(4,-216,888,729),42793=>array(12,-215,729,702),42794=>array(60,-14,555,742),42795=>array(48,-202,444,560),42800=>array(83,0,426,547),42801=>array(46,-14,493,560),42802=>array(4,0,1210,729),42803=>array(39,-14,876,560),42804=>array(4,-14,1111,742),42805=>array(39,-14,919,560),42806=>array(4,-14,1012,729),42807=>array(39,-14,874,560),42808=>array(4,0,967,729),42809=>array(39,-14,817,560),42810=>array(4,0,967,729),42811=>array(39,-14,817,560),42812=>array(4,-216,927,729),42813=>array(39,-216,816,560),42814=>array(30,-14,588,742),42815=>array(39,-14,474,560),42816=>array(4,0,730,729),42817=>array(5,0,637,760),42822=>array(83,0,740,729),42823=>array(75,0,413,760),42824=>array(36,0,590,729),42825=>array(53,0,426,760),42826=>array(14,-14,812,742),42827=>array(4,-14,729,560),42830=>array(44,-14,1221,742),42831=>array(39,-14,957,560),42832=>array(14,0,623,729),42833=>array(4,-208,604,560),42834=>array(31,0,817,729),42835=>array(31,-208,803,560),42838=>array(44,-188,720,742),42839=>array(40,-208,640,559),42852=>array(14,0,623,729),42853=>array(4,-208,604,760),42854=>array(14,0,623,729),42855=>array(4,-208,604,760),42880=>array(24,0,491,729),42881=>array(75,-208,233,547),42882=>array(75,-208,658,742),42883=>array(75,-208,571,560),42889=>array(101,0,259,547),42890=>array(75,141,272,405),42891=>array(126,245,285,729),42892=>array(85,458,190,729),42893=>array(72,0,645,729),42894=>array(75,-216,612,760),42896=>array(83,-157,781,729),42897=>array(75,-138,652,560),42912=>array(-10,-14,749,742),42913=>array(-10,-216,654,559),42914=>array(-10,0,725,729),42915=>array(-10,0,616,760),42916=>array(-10,0,763,729),42917=>array(-10,0,651,560),42918=>array(-10,0,703,729),42919=>array(-10,0,454,560),42920=>array(-10,-14,658,742),42921=>array(-10,-14,545,560),42922=>array(-62,0,715,729),43002=>array(75,0,875,547),43003=>array(75,0,532,729),43004=>array(37,0,577,729),43005=>array(83,0,813,729),43006=>array(83,0,252,928),43007=>array(28,0,1165,729),61184=>array(82,602,286,693),61185=>array(43,451,305,693),61186=>array(23,301,327,693),61187=>array(15,150,336,693),61188=>array(11,0,341,693),61189=>array(43,451,305,693),61190=>array(82,451,286,543),61191=>array(43,301,305,543),61192=>array(23,150,327,543),61193=>array(15,0,336,543),61194=>array(23,301,327,693),61195=>array(43,301,305,543),61196=>array(82,301,286,393),61197=>array(43,150,305,393),61198=>array(23,0,327,393),61199=>array(15,150,336,693),61200=>array(23,149,327,542),61201=>array(43,150,305,393),61202=>array(82,150,286,242),61203=>array(43,0,305,242),61204=>array(11,0,341,693),61205=>array(15,0,336,543),61206=>array(23,0,327,393),61207=>array(43,0,305,242),61208=>array(82,0,286,92),61209=>array(86,0,169,693),62464=>array(44,-14,507,819),62465=>array(44,-15,507,823),62466=>array(44,-14,544,828),62467=>array(44,0,768,828),62468=>array(44,-15,507,828),62469=>array(44,-15,507,828),62470=>array(26,-15,551,828),62471=>array(44,-14,761,828),62472=>array(44,0,487,828),62473=>array(44,-14,507,820),62474=>array(44,-6,1002,828),62475=>array(44,-14,506,828),62476=>array(57,-15,521,820),62477=>array(48,0,755,828),62478=>array(44,-15,507,819),62479=>array(44,-15,507,840),62480=>array(44,0,788,828),62481=>array(57,-14,521,819),62482=>array(40,-14,629,828),62483=>array(31,-14,513,828),62484=>array(44,-14,753,828),62485=>array(44,-14,507,819),62486=>array(44,0,772,828),62487=>array(44,-14,506,820),62488=>array(40,-14,502,828),62489=>array(58,0,521,828),62490=>array(44,-15,566,820),62491=>array(44,-14,506,819),62492=>array(57,-14,520,828),62493=>array(44,-14,523,820),62494=>array(57,-14,521,819),62495=>array(22,-14,492,828),62496=>array(44,-15,507,828),62497=>array(57,-15,520,828),62498=>array(44,-73,507,828),62499=>array(44,-15,506,830),62500=>array(44,-15,513,828),62501=>array(44,-14,565,828),62502=>array(44,-14,823,828),62504=>array(40,-228,864,816),62505=>array(48,-223,712,843),62506=>array(48,-14,459,761),62507=>array(48,-14,459,773),62508=>array(48,-14,459,866),62509=>array(48,-14,459,812),62510=>array(48,-14,459,877),62511=>array(48,-14,459,803),62512=>array(48,-232,451,761),62513=>array(48,-232,451,793),62514=>array(48,-232,451,891),62515=>array(48,-232,451,803),62516=>array(48,0,468,761),62517=>array(48,0,468,793),62518=>array(48,0,468,803),62519=>array(48,-0,693,761),62520=>array(48,-0,693,773),62521=>array(48,-0,693,884),62522=>array(48,-0,693,793),62523=>array(48,-0,693,803),62524=>array(48,-232,501,761),62525=>array(48,-232,501,773),62526=>array(48,-232,501,894),62527=>array(48,-232,501,793),62528=>array(48,-232,501,803),62529=>array(48,-232,501,844),63173=>array(39,-14,580,760),64256=>array(17,0,737,760),64257=>array(19,0,592,760),64258=>array(17,0,592,760),64259=>array(17,0,928,760),64260=>array(17,0,929,760),64261=>array(17,0,707,760),64262=>array(46,-14,897,742),64275=>array(66,-14,1170,760),64276=>array(70,-14,1171,760),64277=>array(70,-208,1170,760),64278=>array(70,-208,1170,760),64279=>array(70,-208,1466,760),64285=>array(60,32,206,547),64286=>array(164,635,459,780),64287=>array(60,32,450,547),64288=>array(34,0,532,547),64289=>array(76,0,770,547),64290=>array(39,0,659,547),64291=>array(82,0,701,547),64292=>array(39,0,658,547),64293=>array(39,0,658,739),64294=>array(82,0,701,547),64295=>array(39,0,658,547),64296=>array(42,-4,658,547),64297=>array(95,256,659,627),64298=>array(18,0,675,710),64299=>array(18,0,675,723),64300=>array(18,0,675,710),64301=>array(18,0,675,710),64302=>array(75,-171,580,547),64303=>array(75,-217,580,547),64304=>array(75,-171,580,547),64305=>array(39,0,510,547),64306=>array(39,-9,376,547),64307=>array(39,0,491,547),64308=>array(82,0,537,547),64309=>array(39,0,312,547),64310=>array(39,0,398,547),64312=>array(81,-13,562,553),64313=>array(39,164,332,547),64314=>array(39,-240,438,547),64315=>array(39,0,460,547),64316=>array(39,0,475,711),64318=>array(39,0,570,554),64320=>array(39,0,326,547),64321=>array(81,-13,562,547),64323=>array(82,-240,526,547),64324=>array(82,0,542,547),64326=>array(29,0,508,547),64327=>array(82,-240,594,546),64328=>array(39,0,460,547),64329=>array(18,0,675,547),64330=>array(9,-4,533,547),64331=>array(82,0,228,710),64332=>array(39,0,510,710),64333=>array(39,0,460,710),64334=>array(82,0,542,710),64335=>array(39,0,587,729),64338=>array(57,-244,829,327),64339=>array(57,-244,962,327),64340=>array(-9,-244,263,293),64341=>array(-9,-244,376,293),64342=>array(57,-244,829,327),64343=>array(57,-244,962,327),64344=>array(-9,-244,272,293),64345=>array(-9,-244,376,293),64346=>array(57,-244,829,327),64347=>array(57,-244,962,327),64348=>array(-9,-244,272,293),64349=>array(-9,-244,376,293),64350=>array(57,-5,829,566),64351=>array(57,-5,962,566),64352=>array(-9,0,263,640),64353=>array(-9,0,376,640),64354=>array(57,-5,829,566),64355=>array(57,-5,962,566),64356=>array(-9,0,272,640),64357=>array(-9,0,376,640),64358=>array(57,-5,829,599),64359=>array(57,-5,962,599),64360=>array(-9,0,300,672),64361=>array(-9,0,376,672),64362=>array(57,-24,974,786),64363=>array(57,-29,1081,786),64364=>array(-9,0,518,786),64365=>array(-9,0,657,786),64366=>array(57,-24,974,786),64367=>array(57,-29,1081,786),64368=>array(-9,0,518,786),64369=>array(-9,0,657,786),64370=>array(69,-244,648,425),64371=>array(69,-244,658,425),64372=>array(-9,-244,566,405),64373=>array(-9,-244,658,405),64374=>array(69,-244,648,425),64375=>array(69,-244,658,425),64376=>array(-9,-117,566,405),64377=>array(-9,-117,658,405),64378=>array(69,-244,648,425),64379=>array(69,-244,658,425),64380=>array(-9,-244,566,405),64381=>array(-9,-244,658,405),64382=>array(69,-244,648,425),64383=>array(69,-244,658,425),64384=>array(-9,-244,566,405),64385=>array(-9,-244,658,405),64386=>array(55,-146,398,415),64387=>array(55,-146,529,415),64388=>array(55,-15,398,586),64389=>array(55,-15,529,586),64390=>array(55,-15,398,708),64391=>array(55,-15,529,708),64392=>array(55,-15,398,746),64393=>array(55,-15,529,746),64394=>array(-38,-244,458,615),64395=>array(-38,-244,569,615),64396=>array(-38,-244,468,648),64397=>array(-38,-244,569,648),64398=>array(57,-39,922,760),64399=>array(57,-39,931,760),64400=>array(-9,0,523,760),64401=>array(-9,0,532,760),64402=>array(57,-39,922,910),64403=>array(57,-39,931,910),64404=>array(-9,0,523,910),64405=>array(-9,0,532,910),64406=>array(57,-293,922,910),64407=>array(57,-293,931,910),64408=>array(-9,-269,523,910),64409=>array(-9,-269,532,910),64410=>array(57,-39,922,910),64411=>array(57,-39,931,910),64412=>array(-9,0,523,910),64413=>array(-9,0,532,910),64414=>array(55,-165,702,366),64415=>array(55,-244,819,287),64416=>array(55,-165,702,636),64417=>array(55,-244,819,514),64418=>array(-9,0,300,672),64419=>array(-9,0,376,672),64426=>array(63,-33,790,506),64427=>array(63,-244,801,369),64428=>array(-9,-33,570,506),64429=>array(-9,-244,603,369),64467=>array(63,-27,733,854),64468=>array(63,-27,847,854),64469=>array(-9,0,523,928),64470=>array(-9,0,532,928),64473=>array(-38,-244,492,556),64474=>array(-38,-244,573,556),64488=>array(-9,0,263,293),64489=>array(-9,0,376,293),64508=>array(57,-107,777,462),64509=>array(57,-126,919,291),64510=>array(-9,-166,272,293),64511=>array(-9,-166,376,293),65056=>array(-377,735,0,880),65057=>array(0,735,377,880),65058=>array(-326,756,0,894),65059=>array(0,756,326,894),65136=>array(25,591,282,825),65137=>array(-9,0,316,825),65138=>array(25,591,282,881),65139=>array(46,0,321,177),65140=>array(25,-239,282,-5),65142=>array(25,591,282,723),65143=>array(-9,0,316,723),65144=>array(25,590,282,881),65145=>array(-9,0,316,881),65146=>array(25,-137,282,-5),65147=>array(-9,-137,316,125),65148=>array(8,599,299,869),65149=>array(-9,0,316,869),65150=>array(32,610,273,878),65151=>array(-9,0,316,878),65152=>array(65,20,394,493),65153=>array(-18,0,326,955),65154=>array(-18,0,347,955),65155=>array(68,0,233,993),65156=>array(68,0,347,993),65157=>array(-38,-244,492,603),65158=>array(-38,-244,573,603),65159=>array(68,-245,233,760),65160=>array(68,-245,347,760),65161=>array(57,-107,777,603),65162=>array(57,-126,919,480),65163=>array(-9,0,263,627),65164=>array(-9,0,376,627),65165=>array(75,0,233,760),65166=>array(75,0,347,760),65167=>array(57,-149,829,327),65168=>array(57,-149,962,327),65169=>array(-9,-173,263,293),65170=>array(-9,-173,376,293),65171=>array(43,-30,486,513),65172=>array(58,0,555,513),65173=>array(57,-5,829,415),65174=>array(57,-5,962,415),65175=>array(-9,0,272,488),65176=>array(-9,0,376,488),65177=>array(57,-5,829,537),65178=>array(57,-5,962,537),65179=>array(-9,0,272,610),65180=>array(-9,0,376,610),65181=>array(69,-244,648,425),65182=>array(69,-244,658,425),65183=>array(-9,-173,566,405),65184=>array(-9,-173,658,405),65185=>array(69,-244,648,425),65186=>array(69,-244,658,425),65187=>array(-9,0,566,405),65188=>array(-9,0,658,405),65189=>array(69,-244,648,579),65190=>array(69,-244,658,579),65191=>array(-9,0,566,530),65192=>array(-9,0,658,530),65193=>array(55,-15,398,415),65194=>array(55,-15,529,415),65195=>array(55,-15,398,579),65196=>array(55,-15,529,579),65197=>array(-38,-244,458,269),65198=>array(-38,-244,569,269),65199=>array(-38,-244,458,457),65200=>array(-38,-244,569,457),65201=>array(57,-244,1167,366),65202=>array(57,-244,1281,366),65203=>array(-9,-14,811,366),65204=>array(-9,-14,925,366),65205=>array(57,-244,1167,586),65206=>array(57,-244,1281,586),65207=>array(-9,-14,811,586),65208=>array(-9,-14,925,586),65209=>array(57,-244,1138,362),65210=>array(57,-244,1237,362),65211=>array(-9,0,797,362),65212=>array(-9,0,896,362),65213=>array(57,-244,1138,457),65214=>array(57,-244,1237,457),65215=>array(-9,0,797,481),65216=>array(-9,0,896,481),65217=>array(63,0,875,760),65218=>array(63,0,973,760),65219=>array(-9,0,787,760),65220=>array(-9,0,886,760),65221=>array(63,0,875,760),65222=>array(63,0,973,760),65223=>array(-9,0,787,760),65224=>array(-9,0,886,760),65225=>array(79,-244,648,521),65226=>array(51,-244,624,382),65227=>array(-9,0,524,521),65228=>array(-9,0,517,382),65229=>array(79,-244,648,652),65230=>array(51,-244,624,530),65231=>array(-9,0,524,652),65232=>array(-9,0,517,530),65233=>array(57,-24,974,627),65234=>array(57,-29,1081,627),65235=>array(-9,0,518,627),65236=>array(-9,0,657,627),65237=>array(47,-215,743,635),65238=>array(47,-244,820,476),65239=>array(-9,0,518,635),65240=>array(-9,0,657,635),65241=>array(63,-27,733,760),65242=>array(63,-27,847,760),65243=>array(-9,0,523,760),65244=>array(-9,0,532,760),65245=>array(63,-142,700,760),65246=>array(63,-142,813,760),65247=>array(-9,0,263,760),65248=>array(-9,0,376,760),65249=>array(62,-244,594,369),65250=>array(62,-244,715,311),65251=>array(-9,-23,491,311),65252=>array(-9,-23,612,311),65253=>array(55,-165,702,457),65254=>array(55,-244,819,383),65255=>array(-9,0,263,481),65256=>array(-9,0,376,481),65257=>array(43,-30,486,358),65258=>array(58,0,555,366),65259=>array(-9,-33,570,506),65260=>array(-9,-244,603,369),65261=>array(-38,-244,492,322),65262=>array(-38,-244,573,322),65263=>array(57,-107,777,462),65264=>array(57,-126,919,291),65265=>array(57,-244,777,462),65266=>array(57,-244,919,291),65267=>array(-9,-166,272,293),65268=>array(-9,-166,376,293),65269=>array(-56,-15,579,882),65270=>array(-56,-15,692,882),65271=>array(30,-15,579,944),65272=>array(30,-15,692,944),65273=>array(37,-245,579,760),65274=>array(37,-245,692,760),65275=>array(37,-15,579,760),65276=>array(37,-15,692,760),65533=>array(22,-139,980,926),65535=>array(44,-177,495,705)); -$cw=array(0=>540,32=>313,33=>410,34=>469,35=>754,36=>626,37=>901,38=>785,39=>275,40=>411,41=>411,42=>470,43=>754,44=>342,45=>374,46=>342,47=>329,48=>626,49=>626,50=>626,51=>626,52=>626,53=>626,54=>626,55=>626,56=>626,57=>626,58=>360,59=>360,60=>754,61=>754,62=>754,63=>522,64=>900,65=>696,66=>686,67=>660,68=>747,69=>615,70=>615,71=>738,72=>753,73=>334,74=>334,75=>697,76=>573,77=>896,78=>753,79=>765,80=>659,81=>765,82=>693,83=>648,84=>614,85=>730,86=>696,87=>993,88=>694,89=>651,90=>652,91=>411,92=>329,93=>411,94=>754,95=>450,96=>450,97=>607,98=>644,99=>533,100=>644,101=>610,102=>391,103=>644,104=>641,105=>308,106=>308,107=>598,108=>308,109=>938,110=>641,111=>618,112=>644,113=>644,114=>444,115=>536,116=>430,117=>641,118=>586,119=>831,120=>580,121=>586,122=>523,123=>641,124=>329,125=>641,126=>754,160=>313,161=>410,162=>626,163=>626,164=>572,165=>626,166=>329,167=>450,168=>450,169=>900,170=>507,171=>581,172=>754,173=>374,174=>900,175=>450,176=>450,177=>754,178=>394,179=>394,180=>450,181=>662,182=>572,183=>342,184=>450,185=>394,186=>507,187=>581,188=>932,189=>932,190=>932,191=>522,192=>696,193=>696,194=>696,195=>696,196=>696,197=>696,198=>976,199=>660,200=>615,201=>615,202=>615,203=>615,204=>334,205=>334,206=>334,207=>334,208=>754,209=>753,210=>765,211=>765,212=>765,213=>765,214=>765,215=>754,216=>765,217=>730,218=>730,219=>730,220=>730,221=>651,222=>664,223=>647,224=>607,225=>607,226=>607,227=>607,228=>607,229=>607,230=>943,231=>533,232=>610,233=>610,234=>610,235=>610,236=>308,237=>308,238=>308,239=>308,240=>618,241=>641,242=>618,243=>618,244=>618,245=>618,246=>618,247=>754,248=>618,249=>641,250=>641,251=>641,252=>641,253=>586,254=>644,255=>586,256=>696,257=>607,258=>696,259=>607,260=>696,261=>607,262=>660,263=>533,264=>660,265=>533,266=>660,267=>533,268=>660,269=>533,270=>747,271=>644,272=>754,273=>644,274=>615,275=>610,276=>615,277=>610,278=>615,279=>610,280=>615,281=>610,282=>615,283=>610,284=>738,285=>644,286=>738,287=>644,288=>738,289=>644,290=>738,291=>644,292=>753,293=>641,294=>876,295=>711,296=>334,297=>308,298=>334,299=>308,300=>334,301=>308,302=>334,303=>308,304=>334,305=>308,306=>669,307=>617,308=>334,309=>308,310=>697,311=>598,312=>598,313=>573,314=>308,315=>573,316=>308,317=>573,318=>431,319=>573,320=>501,321=>578,322=>334,323=>753,324=>641,325=>753,326=>641,327=>753,328=>641,329=>884,330=>753,331=>641,332=>765,333=>618,334=>765,335=>618,336=>765,337=>618,338=>1050,339=>984,340=>693,341=>444,342=>693,343=>444,344=>693,345=>444,346=>648,347=>536,348=>648,349=>536,350=>648,351=>536,352=>648,353=>536,354=>614,355=>430,356=>614,357=>430,358=>614,359=>430,360=>730,361=>641,362=>730,363=>641,364=>730,365=>641,366=>730,367=>641,368=>730,369=>641,370=>730,371=>641,372=>993,373=>831,374=>651,375=>586,376=>651,377=>652,378=>523,379=>652,380=>523,381=>652,382=>523,383=>391,384=>644,385=>729,386=>686,387=>644,388=>686,389=>644,390=>660,391=>660,392=>533,393=>754,394=>791,395=>681,396=>644,397=>619,398=>615,399=>764,400=>626,401=>615,402=>391,403=>738,404=>713,405=>940,406=>392,407=>350,408=>697,409=>598,410=>324,411=>532,412=>938,413=>753,414=>641,415=>765,416=>786,417=>618,418=>974,419=>821,420=>703,421=>644,422=>693,423=>648,424=>536,425=>615,426=>497,427=>430,428=>636,429=>430,430=>614,431=>751,432=>641,433=>765,434=>732,435=>717,436=>700,437=>652,438=>523,439=>695,440=>695,441=>576,442=>523,443=>626,444=>695,445=>576,446=>515,447=>644,448=>334,449=>593,450=>489,451=>334,452=>1399,453=>1271,454=>1168,455=>908,456=>882,457=>617,458=>1088,459=>1062,460=>949,461=>696,462=>607,463=>334,464=>308,465=>765,466=>618,467=>730,468=>641,469=>730,470=>641,471=>730,472=>641,473=>730,474=>641,475=>730,476=>641,477=>610,478=>696,479=>607,480=>696,481=>607,482=>976,483=>943,484=>738,485=>644,486=>738,487=>644,488=>697,489=>598,490=>765,491=>618,492=>765,493=>618,494=>695,495=>523,496=>308,497=>1399,498=>1271,499=>1168,500=>738,501=>644,502=>1160,503=>708,504=>753,505=>641,506=>696,507=>607,508=>976,509=>943,510=>765,511=>618,512=>696,513=>607,514=>696,515=>607,516=>615,517=>610,518=>615,519=>610,520=>334,521=>308,522=>334,523=>308,524=>765,525=>618,526=>765,527=>618,528=>693,529=>444,530=>693,531=>444,532=>730,533=>641,534=>730,535=>641,536=>648,537=>536,538=>614,539=>430,540=>621,541=>546,542=>753,543=>641,544=>753,545=>778,546=>728,547=>593,548=>652,549=>523,550=>696,551=>607,552=>615,553=>610,554=>765,555=>618,556=>765,557=>618,558=>765,559=>618,560=>765,561=>618,562=>651,563=>586,564=>442,565=>780,566=>460,567=>308,568=>979,569=>979,570=>696,571=>660,572=>533,573=>573,574=>614,575=>536,576=>523,577=>703,578=>553,579=>686,580=>730,581=>696,582=>615,583=>610,584=>334,585=>308,586=>774,587=>712,588=>693,589=>444,590=>651,591=>586,592=>607,593=>644,594=>644,595=>644,596=>533,597=>533,598=>645,599=>712,600=>610,601=>610,602=>788,603=>501,604=>490,605=>733,606=>658,607=>308,608=>712,609=>644,610=>564,611=>579,612=>571,613=>641,614=>641,615=>641,616=>491,617=>396,618=>491,619=>502,620=>624,621=>308,622=>757,623=>938,624=>938,625=>938,626=>641,627=>713,628=>636,629=>618,630=>817,631=>613,632=>716,633=>484,634=>484,635=>584,636=>444,637=>444,638=>536,639=>536,640=>578,641=>578,642=>536,643=>374,644=>391,645=>544,646=>497,647=>430,648=>430,649=>828,650=>695,651=>603,652=>586,653=>831,654=>586,655=>651,656=>624,657=>615,658=>576,659=>576,660=>515,661=>515,662=>515,663=>515,664=>765,665=>569,666=>658,667=>616,668=>622,669=>308,670=>659,671=>485,672=>712,673=>515,674=>515,675=>1040,676=>1093,677=>1039,678=>877,679=>691,680=>836,681=>923,682=>776,683=>702,684=>532,685=>374,686=>609,687=>710,688=>410,689=>410,690=>197,691=>284,692=>284,693=>284,694=>369,695=>532,696=>375,697=>271,698=>469,699=>342,700=>342,701=>342,702=>330,703=>330,704=>293,705=>293,706=>450,707=>450,708=>450,709=>450,710=>450,711=>450,712=>275,713=>450,714=>450,715=>450,716=>275,717=>450,718=>450,719=>450,720=>303,721=>303,722=>330,723=>330,724=>450,725=>450,726=>374,727=>295,728=>450,729=>450,730=>450,731=>450,732=>450,733=>450,734=>315,735=>450,736=>370,737=>197,738=>343,739=>371,740=>293,741=>450,742=>450,743=>450,744=>450,745=>450,748=>450,749=>450,750=>591,755=>450,759=>450,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>628,881=>508,882=>919,883=>752,884=>271,885=>271,886=>753,887=>630,890=>450,891=>533,892=>495,893=>494,894=>360,900=>397,901=>450,902=>717,903=>342,904=>761,905=>908,906=>507,908=>801,910=>882,911=>804,912=>351,913=>696,914=>686,915=>573,916=>696,917=>615,918=>652,919=>753,920=>765,921=>334,922=>697,923=>696,924=>896,925=>753,926=>568,927=>765,928=>753,929=>659,931=>615,932=>614,933=>651,934=>765,935=>694,936=>765,937=>765,938=>334,939=>651,940=>618,941=>501,942=>641,943=>351,944=>607,945=>618,946=>644,947=>613,948=>618,949=>501,950=>532,951=>641,952=>618,953=>351,954=>639,955=>569,956=>662,957=>613,958=>532,959=>618,960=>712,961=>644,962=>533,963=>701,964=>574,965=>607,966=>704,967=>580,968=>714,969=>782,970=>351,971=>607,972=>618,973=>607,974=>782,975=>697,976=>585,977=>594,978=>671,979=>883,980=>671,981=>716,982=>782,983=>669,984=>765,985=>618,986=>660,987=>533,988=>615,989=>444,990=>632,991=>593,992=>827,993=>564,994=>983,995=>753,996=>749,997=>644,998=>835,999=>669,1000=>660,1001=>585,1002=>709,1003=>604,1004=>677,1005=>644,1006=>614,1007=>531,1008=>669,1009=>644,1010=>533,1011=>308,1012=>765,1013=>580,1014=>580,1015=>664,1016=>644,1017=>660,1018=>896,1019=>659,1020=>644,1021=>628,1022=>660,1023=>628,1024=>615,1025=>615,1026=>791,1027=>573,1028=>660,1029=>648,1030=>334,1031=>334,1032=>334,1033=>1039,1034=>1017,1035=>791,1036=>735,1037=>753,1038=>694,1039=>753,1040=>696,1041=>686,1042=>686,1043=>573,1044=>801,1045=>615,1046=>1102,1047=>639,1048=>753,1049=>753,1050=>735,1051=>747,1052=>896,1053=>753,1054=>765,1055=>753,1056=>659,1057=>660,1058=>614,1059=>694,1060=>892,1061=>694,1062=>835,1063=>727,1064=>1112,1065=>1193,1066=>845,1067=>932,1068=>686,1069=>660,1070=>1056,1071=>693,1072=>607,1073=>628,1074=>569,1075=>470,1076=>727,1077=>610,1078=>896,1079=>523,1080=>630,1081=>630,1082=>611,1083=>659,1084=>735,1085=>622,1086=>618,1087=>622,1088=>644,1089=>533,1090=>521,1091=>586,1092=>893,1093=>580,1094=>667,1095=>618,1096=>956,1097=>995,1098=>676,1099=>813,1100=>569,1101=>533,1102=>875,1103=>578,1104=>610,1105=>610,1106=>642,1107=>470,1108=>533,1109=>536,1110=>308,1111=>308,1112=>308,1113=>892,1114=>860,1115=>661,1116=>611,1117=>630,1118=>586,1119=>622,1120=>983,1121=>782,1122=>756,1123=>662,1124=>911,1125=>755,1126=>893,1127=>749,1128=>1222,1129=>1009,1130=>765,1131=>618,1132=>1112,1133=>906,1134=>626,1135=>501,1136=>967,1137=>955,1138=>765,1139=>618,1140=>765,1141=>625,1142=>765,1143=>625,1144=>1033,1145=>939,1146=>967,1147=>776,1148=>1265,1149=>1055,1150=>983,1151=>782,1152=>660,1153=>533,1154=>587,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>376,1161=>376,1162=>861,1163=>726,1164=>686,1165=>550,1166=>659,1167=>644,1168=>573,1169=>470,1170=>599,1171=>488,1172=>727,1173=>602,1174=>1102,1175=>896,1176=>639,1177=>523,1178=>697,1179=>611,1180=>735,1181=>611,1182=>735,1183=>611,1184=>914,1185=>743,1186=>860,1187=>727,1188=>992,1189=>787,1190=>1146,1191=>915,1192=>856,1193=>772,1194=>660,1195=>533,1196=>614,1197=>521,1198=>651,1199=>586,1200=>651,1201=>586,1202=>694,1203=>580,1204=>1001,1205=>900,1206=>727,1207=>618,1208=>727,1209=>618,1210=>727,1211=>641,1212=>923,1213=>729,1214=>923,1215=>729,1216=>334,1217=>1102,1218=>896,1219=>697,1220=>567,1221=>855,1222=>725,1223=>753,1224=>622,1225=>861,1226=>726,1227=>727,1228=>618,1229=>1003,1230=>839,1231=>308,1232=>696,1233=>607,1234=>696,1235=>607,1236=>976,1237=>943,1238=>615,1239=>610,1240=>764,1241=>610,1242=>764,1243=>610,1244=>1102,1245=>896,1246=>639,1247=>523,1248=>695,1249=>576,1250=>753,1251=>630,1252=>753,1253=>630,1254=>765,1255=>618,1256=>765,1257=>618,1258=>765,1259=>618,1260=>660,1261=>533,1262=>694,1263=>586,1264=>694,1265=>586,1266=>694,1267=>586,1268=>727,1269=>618,1270=>573,1271=>470,1272=>932,1273=>813,1274=>599,1275=>488,1276=>694,1277=>580,1278=>694,1279=>580,1280=>686,1281=>547,1282=>1043,1283=>804,1284=>1007,1285=>828,1286=>745,1287=>624,1288=>1117,1289=>915,1290=>1160,1291=>912,1292=>755,1293=>574,1294=>844,1295=>722,1296=>626,1297=>501,1298=>747,1299=>659,1300=>1157,1301=>961,1302=>958,1303=>881,1304=>973,1305=>912,1306=>765,1307=>644,1308=>993,1309=>831,1310=>735,1311=>611,1312=>1140,1313=>953,1314=>1146,1315=>915,1316=>861,1317=>726,1329=>732,1330=>656,1331=>655,1332=>658,1333=>656,1334=>660,1335=>586,1336=>648,1337=>813,1338=>655,1339=>599,1340=>501,1341=>865,1342=>708,1343=>642,1344=>585,1345=>657,1346=>643,1347=>633,1348=>702,1349=>620,1350=>643,1351=>637,1352=>658,1353=>609,1354=>780,1355=>640,1356=>702,1357=>658,1358=>643,1359=>624,1360=>599,1361=>628,1362=>519,1363=>750,1364=>628,1365=>686,1366=>770,1369=>296,1370=>308,1371=>277,1372=>336,1373=>282,1374=>415,1375=>421,1377=>844,1378=>577,1379=>633,1380=>637,1381=>577,1382=>579,1383=>508,1384=>577,1385=>680,1386=>633,1387=>578,1388=>278,1389=>886,1390=>574,1391=>578,1392=>578,1393=>542,1394=>578,1395=>577,1396=>578,1397=>277,1398=>578,1399=>438,1400=>578,1401=>330,1402=>844,1403=>515,1404=>599,1405=>578,1406=>578,1407=>840,1408=>578,1409=>579,1410=>431,1411=>840,1412=>583,1413=>558,1414=>732,1415=>730,1417=>324,1418=>336,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>374,1471=>0,1472=>334,1473=>0,1474=>0,1475=>334,1478=>447,1479=>0,1488=>655,1489=>549,1490=>402,1491=>529,1492=>618,1493=>309,1494=>360,1495=>618,1496=>611,1497=>265,1498=>520,1499=>510,1500=>544,1501=>626,1502=>651,1503=>309,1504=>408,1505=>611,1506=>599,1507=>607,1508=>592,1509=>595,1510=>587,1511=>663,1512=>542,1513=>682,1514=>615,1520=>598,1521=>510,1522=>467,1523=>399,1524=>639,1542=>600,1543=>600,1545=>795,1546=>1042,1548=>342,1557=>0,1563=>360,1567=>522,1569=>460,1570=>308,1571=>308,1572=>559,1573=>308,1574=>825,1575=>308,1576=>904,1577=>531,1578=>904,1579=>904,1580=>648,1581=>648,1582=>648,1583=>461,1584=>461,1585=>518,1586=>518,1587=>1242,1588=>1242,1589=>1210,1590=>1210,1591=>935,1592=>935,1593=>615,1594=>615,1600=>308,1601=>1045,1602=>804,1603=>825,1604=>781,1605=>659,1606=>768,1607=>531,1608=>559,1609=>825,1610=>825,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,1619=>0,1620=>0,1621=>0,1623=>0,1626=>450,1632=>549,1633=>549,1634=>549,1635=>549,1636=>549,1637=>549,1638=>549,1639=>549,1640=>549,1641=>549,1642=>549,1643=>336,1644=>342,1645=>490,1646=>904,1647=>804,1648=>0,1652=>263,1657=>904,1658=>904,1659=>904,1660=>904,1661=>904,1662=>904,1663=>904,1664=>904,1665=>648,1666=>648,1667=>648,1668=>648,1669=>648,1670=>648,1671=>648,1672=>400,1673=>400,1674=>400,1675=>400,1676=>400,1677=>400,1678=>400,1679=>400,1680=>400,1681=>518,1682=>518,1683=>518,1684=>518,1685=>613,1686=>518,1687=>518,1688=>518,1689=>518,1690=>1242,1691=>1242,1692=>1242,1693=>1210,1694=>1210,1695=>935,1696=>615,1697=>1045,1698=>1045,1699=>1045,1700=>1045,1701=>1045,1702=>1045,1703=>804,1704=>804,1705=>921,1706=>1144,1707=>921,1708=>825,1709=>825,1710=>825,1711=>921,1712=>921,1713=>921,1714=>921,1715=>921,1716=>921,1717=>781,1718=>781,1719=>781,1720=>781,1721=>768,1722=>768,1723=>768,1724=>768,1725=>768,1726=>844,1727=>648,1734=>559,1740=>825,1742=>825,1749=>531,1776=>549,1777=>549,1778=>549,1779=>549,1780=>549,1781=>549,1782=>549,1783=>549,1784=>549,1785=>549,1984=>626,1985=>626,1986=>626,1987=>626,1988=>626,1989=>626,1990=>626,1991=>626,1992=>626,1993=>626,1994=>308,1995=>492,1996=>489,1997=>586,1998=>622,1999=>622,2000=>534,2001=>622,2002=>813,2003=>496,2004=>496,2005=>564,2006=>619,2007=>399,2008=>920,2009=>456,2010=>743,2011=>622,2012=>586,2013=>821,2014=>564,2015=>636,2016=>456,2017=>586,2018=>517,2019=>564,2020=>564,2021=>564,2022=>517,2023=>517,2027=>0,2028=>0,2029=>0,2030=>0,2031=>0,2032=>0,2033=>0,2034=>0,2035=>0,2036=>342,2037=>342,2040=>622,2041=>622,2042=>374,3647=>626,3713=>710,3714=>673,3716=>674,3719=>512,3720=>668,3722=>669,3725=>685,3732=>635,3733=>633,3734=>672,3735=>737,3737=>657,3738=>654,3739=>654,3740=>830,3741=>744,3742=>779,3743=>779,3745=>752,3746=>685,3747=>692,3749=>691,3751=>642,3754=>744,3755=>928,3757=>651,3758=>705,3759=>840,3760=>620,3761=>0,3762=>549,3763=>549,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>603,3776=>464,3777=>774,3778=>464,3779=>584,3780=>569,3782=>683,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>694,3793=>694,3794=>624,3795=>752,3796=>655,3797=>655,3798=>764,3799=>710,3800=>683,3801=>818,3804=>1227,3805=>1227,4256=>787,4257=>660,4258=>611,4259=>751,4260=>554,4261=>690,4262=>678,4263=>822,4264=>408,4265=>558,4266=>758,4267=>794,4268=>562,4269=>769,4270=>703,4271=>566,4272=>820,4273=>558,4274=>558,4275=>769,4276=>779,4277=>651,4278=>567,4279=>558,4280=>563,4281=>558,4282=>736,4283=>786,4284=>554,4285=>561,4286=>563,4287=>652,4288=>760,4289=>536,4290=>620,4291=>536,4292=>534,4293=>664,4304=>498,4305=>507,4306=>560,4307=>751,4308=>499,4309=>507,4310=>496,4311=>745,4312=>507,4313=>500,4314=>967,4315=>511,4316=>511,4317=>733,4318=>498,4319=>507,4320=>741,4321=>511,4322=>630,4323=>532,4324=>767,4325=>503,4326=>733,4327=>507,4328=>497,4329=>511,4330=>560,4331=>511,4332=>498,4333=>509,4334=>511,4335=>486,4336=>498,4337=>502,4338=>498,4339=>499,4340=>498,4341=>528,4342=>768,4343=>544,4344=>507,4345=>560,4346=>499,4347=>403,4348=>291,5121=>696,5122=>696,5123=>696,5124=>696,5125=>814,5126=>814,5127=>814,5129=>814,5130=>814,5131=>814,5132=>916,5133=>908,5134=>916,5135=>908,5136=>916,5137=>908,5138=>1034,5139=>1025,5140=>1034,5141=>1025,5142=>814,5143=>1034,5144=>1028,5145=>1034,5146=>1028,5147=>814,5149=>278,5150=>476,5151=>382,5152=>382,5153=>355,5154=>355,5155=>355,5156=>355,5157=>507,5158=>423,5159=>278,5160=>355,5161=>355,5162=>355,5163=>1092,5164=>888,5165=>1094,5166=>1167,5167=>696,5168=>696,5169=>696,5170=>696,5171=>797,5172=>797,5173=>797,5175=>797,5176=>797,5177=>797,5178=>916,5179=>908,5180=>916,5181=>908,5182=>916,5183=>908,5184=>1034,5185=>1025,5186=>1034,5187=>1025,5188=>1034,5189=>1028,5190=>1034,5191=>1028,5192=>797,5193=>518,5194=>206,5196=>730,5197=>730,5198=>730,5199=>730,5200=>734,5201=>734,5202=>734,5204=>734,5205=>734,5206=>734,5207=>950,5208=>943,5209=>950,5210=>943,5211=>950,5212=>943,5213=>954,5214=>949,5215=>954,5216=>949,5217=>954,5218=>946,5219=>954,5220=>946,5221=>954,5222=>435,5223=>904,5224=>904,5225=>921,5226=>915,5227=>668,5228=>668,5229=>668,5230=>668,5231=>668,5232=>668,5233=>668,5234=>668,5235=>668,5236=>926,5237=>877,5238=>882,5239=>877,5240=>882,5241=>877,5242=>926,5243=>877,5244=>926,5245=>877,5246=>882,5247=>877,5248=>882,5249=>877,5250=>882,5251=>451,5252=>451,5253=>844,5254=>844,5255=>844,5256=>844,5257=>668,5258=>668,5259=>668,5260=>668,5261=>668,5262=>668,5263=>668,5264=>668,5265=>668,5266=>926,5267=>877,5268=>926,5269=>877,5270=>926,5271=>877,5272=>926,5273=>877,5274=>926,5275=>877,5276=>926,5277=>877,5278=>926,5279=>877,5280=>926,5281=>451,5282=>451,5283=>563,5284=>563,5285=>563,5286=>563,5287=>563,5288=>563,5289=>563,5290=>563,5291=>563,5292=>793,5293=>769,5294=>777,5295=>786,5296=>777,5297=>786,5298=>793,5299=>786,5300=>793,5301=>786,5302=>777,5303=>786,5304=>777,5305=>786,5306=>777,5307=>392,5308=>493,5309=>392,5312=>889,5313=>889,5314=>889,5315=>889,5316=>838,5317=>838,5318=>838,5319=>838,5320=>838,5321=>1114,5322=>1122,5323=>1080,5324=>1105,5325=>1080,5326=>1105,5327=>838,5328=>593,5329=>447,5330=>593,5331=>889,5332=>889,5333=>889,5334=>889,5335=>838,5336=>838,5337=>838,5338=>838,5339=>838,5340=>1107,5341=>1122,5342=>1155,5343=>1105,5344=>1155,5345=>1105,5346=>1105,5347=>1093,5348=>1105,5349=>1093,5350=>1155,5351=>1105,5352=>1155,5353=>1105,5354=>593,5356=>797,5357=>657,5358=>657,5359=>657,5360=>657,5361=>657,5362=>657,5363=>657,5364=>657,5365=>657,5366=>897,5367=>862,5368=>870,5369=>890,5370=>870,5371=>890,5372=>897,5373=>862,5374=>897,5375=>862,5376=>870,5377=>890,5378=>870,5379=>890,5380=>870,5381=>443,5382=>414,5383=>443,5392=>831,5393=>831,5394=>831,5395=>1022,5396=>1022,5397=>1022,5398=>1022,5399=>1088,5400=>1081,5401=>1088,5402=>1081,5403=>1088,5404=>1081,5405=>1288,5406=>1278,5407=>1288,5408=>1278,5409=>1288,5410=>1278,5411=>1288,5412=>1278,5413=>671,5414=>698,5415=>698,5416=>698,5417=>698,5418=>698,5419=>698,5420=>698,5421=>698,5422=>698,5423=>902,5424=>903,5425=>911,5426=>896,5427=>911,5428=>896,5429=>902,5430=>903,5431=>902,5432=>903,5433=>911,5434=>896,5435=>911,5436=>896,5437=>911,5438=>445,5440=>355,5441=>458,5442=>929,5443=>929,5444=>878,5445=>878,5446=>878,5447=>878,5448=>659,5449=>659,5450=>659,5451=>659,5452=>659,5453=>659,5454=>902,5455=>863,5456=>445,5458=>797,5459=>696,5460=>696,5461=>696,5462=>696,5463=>835,5464=>835,5465=>835,5466=>835,5467=>1055,5468=>1028,5469=>542,5470=>730,5471=>730,5472=>730,5473=>730,5474=>730,5475=>730,5476=>734,5477=>734,5478=>734,5479=>734,5480=>954,5481=>946,5482=>493,5492=>879,5493=>879,5494=>879,5495=>879,5496=>879,5497=>879,5498=>879,5499=>556,5500=>753,5501=>458,5502=>1114,5503=>1114,5504=>1114,5505=>1114,5506=>1114,5507=>1114,5508=>1114,5509=>890,5514=>879,5515=>879,5516=>879,5517=>879,5518=>1432,5519=>1432,5520=>1432,5521=>1165,5522=>1165,5523=>1432,5524=>1432,5525=>763,5526=>1146,5536=>889,5537=>889,5538=>838,5539=>838,5540=>838,5541=>838,5542=>593,5543=>698,5544=>698,5545=>698,5546=>698,5547=>698,5548=>698,5549=>698,5550=>445,5551=>668,5598=>747,5601=>747,5702=>446,5703=>446,5742=>371,5743=>1114,5744=>1432,5745=>1814,5746=>1814,5747=>1548,5748=>1510,5749=>1814,5750=>1814,5760=>489,5761=>573,5762=>851,5763=>1128,5764=>1406,5765=>1684,5766=>564,5767=>842,5768=>1128,5769=>1403,5770=>1684,5771=>512,5772=>789,5773=>1068,5774=>1347,5775=>1626,5776=>573,5777=>851,5778=>1116,5779=>1399,5780=>1684,5781=>512,5782=>512,5783=>709,5784=>1110,5785=>1403,5786=>666,5787=>574,5788=>574,7424=>586,7425=>750,7426=>943,7427=>547,7428=>533,7429=>608,7430=>608,7431=>502,7432=>501,7433=>308,7434=>444,7435=>598,7436=>485,7437=>735,7438=>630,7439=>618,7440=>533,7441=>594,7442=>594,7443=>594,7444=>984,7446=>618,7447=>618,7448=>500,7449=>578,7450=>578,7451=>521,7452=>571,7453=>663,7454=>853,7455=>625,7456=>586,7457=>831,7458=>523,7459=>581,7462=>485,7463=>586,7464=>622,7465=>500,7466=>703,7467=>659,7468=>438,7469=>615,7470=>432,7472=>470,7473=>387,7474=>387,7475=>465,7476=>474,7477=>211,7478=>211,7479=>439,7480=>361,7481=>563,7482=>474,7483=>474,7484=>481,7485=>458,7486=>415,7487=>436,7488=>387,7489=>460,7490=>625,7491=>412,7492=>412,7493=>431,7494=>641,7495=>431,7496=>431,7497=>431,7498=>431,7499=>347,7500=>347,7501=>431,7502=>197,7503=>438,7504=>597,7505=>410,7506=>439,7507=>372,7508=>439,7509=>439,7510=>431,7511=>349,7512=>410,7513=>416,7514=>597,7515=>451,7517=>405,7518=>386,7519=>389,7520=>443,7521=>365,7522=>197,7523=>284,7524=>410,7525=>451,7526=>405,7527=>386,7528=>405,7529=>443,7530=>365,7543=>644,7544=>474,7547=>491,7549=>672,7557=>462,7579=>431,7580=>372,7581=>372,7582=>439,7583=>347,7584=>339,7585=>313,7586=>431,7587=>410,7588=>312,7589=>253,7590=>312,7591=>312,7592=>388,7593=>293,7594=>296,7595=>333,7596=>598,7597=>597,7598=>505,7599=>505,7600=>403,7601=>439,7602=>488,7603=>379,7604=>356,7605=>349,7606=>524,7607=>444,7608=>359,7609=>405,7610=>451,7611=>375,7612=>471,7613=>422,7614=>409,7615=>382,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>696,7681=>607,7682=>686,7683=>644,7684=>686,7685=>644,7686=>686,7687=>644,7688=>660,7689=>533,7690=>747,7691=>644,7692=>747,7693=>644,7694=>747,7695=>644,7696=>747,7697=>644,7698=>747,7699=>644,7700=>615,7701=>610,7702=>615,7703=>610,7704=>615,7705=>610,7706=>615,7707=>610,7708=>615,7709=>610,7710=>615,7711=>391,7712=>738,7713=>644,7714=>753,7715=>641,7716=>753,7717=>641,7718=>753,7719=>641,7720=>753,7721=>641,7722=>753,7723=>641,7724=>334,7725=>308,7726=>334,7727=>308,7728=>697,7729=>598,7730=>697,7731=>598,7732=>697,7733=>598,7734=>573,7735=>308,7736=>573,7737=>308,7738=>573,7739=>308,7740=>573,7741=>308,7742=>896,7743=>938,7744=>896,7745=>938,7746=>896,7747=>938,7748=>753,7749=>641,7750=>753,7751=>641,7752=>753,7753=>641,7754=>753,7755=>641,7756=>765,7757=>618,7758=>765,7759=>618,7760=>765,7761=>618,7762=>765,7763=>618,7764=>659,7765=>644,7766=>659,7767=>644,7768=>693,7769=>444,7770=>693,7771=>444,7772=>693,7773=>444,7774=>693,7775=>444,7776=>648,7777=>536,7778=>648,7779=>536,7780=>648,7781=>536,7782=>648,7783=>536,7784=>648,7785=>536,7786=>614,7787=>430,7788=>614,7789=>430,7790=>614,7791=>430,7792=>614,7793=>430,7794=>730,7795=>641,7796=>730,7797=>641,7798=>730,7799=>641,7800=>730,7801=>641,7802=>730,7803=>641,7804=>696,7805=>586,7806=>696,7807=>586,7808=>993,7809=>831,7810=>993,7811=>831,7812=>993,7813=>831,7814=>993,7815=>831,7816=>993,7817=>831,7818=>694,7819=>580,7820=>694,7821=>580,7822=>651,7823=>586,7824=>652,7825=>523,7826=>652,7827=>523,7828=>652,7829=>523,7830=>641,7831=>430,7832=>831,7833=>586,7834=>607,7835=>391,7836=>391,7837=>391,7838=>806,7839=>618,7840=>696,7841=>607,7842=>696,7843=>607,7844=>696,7845=>607,7846=>696,7847=>607,7848=>696,7849=>607,7850=>696,7851=>607,7852=>696,7853=>607,7854=>696,7855=>607,7856=>696,7857=>607,7858=>696,7859=>607,7860=>696,7861=>607,7862=>696,7863=>607,7864=>615,7865=>610,7866=>615,7867=>610,7868=>615,7869=>610,7870=>615,7871=>610,7872=>615,7873=>610,7874=>615,7875=>610,7876=>615,7877=>610,7878=>615,7879=>610,7880=>334,7881=>308,7882=>334,7883=>308,7884=>765,7885=>618,7886=>765,7887=>618,7888=>765,7889=>618,7890=>765,7891=>618,7892=>765,7893=>618,7894=>765,7895=>618,7896=>765,7897=>618,7898=>786,7899=>618,7900=>786,7901=>618,7902=>786,7903=>618,7904=>786,7905=>618,7906=>786,7907=>618,7908=>730,7909=>641,7910=>730,7911=>641,7912=>751,7913=>641,7914=>751,7915=>641,7916=>751,7917=>641,7918=>751,7919=>641,7920=>751,7921=>641,7922=>651,7923=>586,7924=>651,7925=>586,7926=>651,7927=>586,7928=>651,7929=>586,7930=>857,7931=>579,7936=>618,7937=>618,7938=>618,7939=>618,7940=>618,7941=>618,7942=>618,7943=>618,7944=>696,7945=>696,7946=>937,7947=>939,7948=>841,7949=>866,7950=>751,7951=>773,7952=>501,7953=>501,7954=>501,7955=>501,7956=>501,7957=>501,7960=>712,7961=>715,7962=>989,7963=>986,7964=>920,7965=>947,7968=>641,7969=>641,7970=>641,7971=>641,7972=>641,7973=>641,7974=>641,7975=>641,7976=>851,7977=>856,7978=>1125,7979=>1125,7980=>1062,7981=>1085,7982=>948,7983=>956,7984=>351,7985=>351,7986=>351,7987=>351,7988=>351,7989=>351,7990=>351,7991=>351,7992=>435,7993=>440,7994=>699,7995=>707,7996=>641,7997=>664,7998=>544,7999=>544,8000=>618,8001=>618,8002=>618,8003=>618,8004=>618,8005=>618,8008=>802,8009=>839,8010=>1099,8011=>1101,8012=>947,8013=>974,8016=>607,8017=>607,8018=>607,8019=>607,8020=>607,8021=>607,8022=>607,8023=>607,8025=>837,8027=>1065,8029=>1079,8031=>944,8032=>782,8033=>782,8034=>782,8035=>782,8036=>782,8037=>782,8038=>782,8039=>782,8040=>817,8041=>862,8042=>1121,8043=>1126,8044=>968,8045=>994,8046=>925,8047=>968,8048=>618,8049=>618,8050=>501,8051=>501,8052=>641,8053=>641,8054=>351,8055=>351,8056=>618,8057=>618,8058=>607,8059=>607,8060=>782,8061=>782,8064=>618,8065=>618,8066=>618,8067=>618,8068=>618,8069=>618,8070=>618,8071=>618,8072=>696,8073=>696,8074=>937,8075=>939,8076=>841,8077=>866,8078=>751,8079=>773,8080=>641,8081=>641,8082=>641,8083=>641,8084=>641,8085=>641,8086=>641,8087=>641,8088=>851,8089=>856,8090=>1125,8091=>1125,8092=>1062,8093=>1085,8094=>948,8095=>956,8096=>782,8097=>782,8098=>782,8099=>782,8100=>782,8101=>782,8102=>782,8103=>782,8104=>817,8105=>862,8106=>1121,8107=>1126,8108=>968,8109=>994,8110=>925,8111=>968,8112=>618,8113=>618,8114=>618,8115=>618,8116=>618,8118=>618,8119=>618,8120=>696,8121=>696,8122=>789,8123=>717,8124=>696,8125=>450,8126=>450,8127=>450,8128=>450,8129=>450,8130=>641,8131=>641,8132=>641,8134=>641,8135=>641,8136=>836,8137=>761,8138=>972,8139=>908,8140=>753,8141=>450,8142=>450,8143=>450,8144=>351,8145=>351,8146=>351,8147=>351,8150=>351,8151=>351,8152=>334,8153=>334,8154=>559,8155=>507,8157=>450,8158=>450,8159=>450,8160=>607,8161=>607,8162=>607,8163=>607,8164=>644,8165=>644,8166=>607,8167=>607,8168=>651,8169=>651,8170=>918,8171=>882,8172=>754,8173=>450,8174=>450,8175=>450,8178=>782,8179=>782,8180=>782,8182=>782,8183=>782,8184=>958,8185=>801,8186=>976,8187=>804,8188=>765,8189=>450,8190=>450,8192=>450,8193=>900,8194=>450,8195=>900,8196=>296,8197=>225,8198=>150,8199=>626,8200=>342,8201=>180,8202=>89,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>374,8209=>374,8210=>626,8211=>450,8212=>900,8213=>900,8214=>450,8215=>450,8216=>342,8217=>342,8218=>342,8219=>342,8220=>591,8221=>591,8222=>591,8223=>591,8224=>450,8225=>450,8226=>575,8227=>575,8228=>299,8229=>600,8230=>900,8231=>313,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>180,8240=>1296,8241=>1698,8242=>237,8243=>402,8244=>567,8245=>237,8246=>402,8247=>567,8248=>659,8249=>371,8250=>371,8251=>875,8252=>564,8253=>522,8254=>450,8255=>745,8256=>745,8257=>296,8258=>920,8259=>450,8260=>150,8261=>411,8262=>411,8263=>927,8264=>746,8265=>746,8266=>461,8267=>572,8268=>450,8269=>450,8270=>470,8271=>360,8272=>745,8273=>470,8274=>500,8275=>900,8276=>745,8277=>754,8278=>615,8279=>731,8280=>754,8281=>754,8282=>342,8283=>784,8284=>754,8285=>342,8286=>342,8287=>200,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>394,8305=>197,8308=>394,8309=>394,8310=>394,8311=>394,8312=>394,8313=>394,8314=>475,8315=>475,8316=>475,8317=>259,8318=>259,8319=>410,8320=>394,8321=>394,8322=>394,8323=>394,8324=>394,8325=>394,8326=>394,8327=>394,8328=>394,8329=>394,8330=>475,8331=>475,8332=>475,8333=>259,8334=>259,8336=>412,8337=>431,8338=>439,8339=>371,8340=>431,8341=>410,8342=>438,8343=>197,8344=>597,8345=>410,8346=>431,8347=>343,8348=>349,8352=>836,8353=>626,8354=>626,8355=>626,8356=>626,8357=>938,8358=>753,8359=>1366,8360=>1084,8361=>993,8362=>813,8363=>626,8364=>626,8365=>626,8366=>626,8367=>1252,8368=>626,8369=>626,8370=>626,8371=>626,8372=>773,8373=>626,8376=>626,8377=>626,8378=>692,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>1007,8449=>1053,8450=>660,8451=>1090,8452=>806,8453=>982,8454=>1029,8455=>553,8456=>628,8457=>978,8459=>965,8460=>822,8461=>799,8462=>641,8463=>641,8464=>537,8465=>627,8466=>771,8467=>424,8468=>876,8469=>753,8470=>1083,8471=>900,8472=>627,8473=>675,8474=>765,8475=>844,8476=>732,8477=>721,8478=>807,8479=>639,8480=>917,8481=>1152,8482=>900,8483=>679,8484=>679,8485=>520,8486=>765,8487=>765,8488=>686,8489=>304,8490=>697,8491=>696,8492=>835,8493=>736,8494=>769,8495=>572,8496=>656,8497=>727,8498=>615,8499=>1065,8500=>418,8501=>714,8502=>658,8503=>444,8504=>615,8505=>342,8506=>851,8507=>1213,8508=>710,8509=>663,8510=>589,8511=>776,8512=>756,8513=>697,8514=>501,8515=>573,8516=>684,8517=>747,8518=>644,8519=>610,8520=>308,8521=>308,8523=>785,8526=>492,8528=>932,8529=>932,8530=>1334,8531=>932,8532=>932,8533=>932,8534=>932,8535=>932,8536=>932,8537=>932,8538=>932,8539=>932,8540=>932,8541=>932,8542=>932,8543=>554,8544=>334,8545=>593,8546=>851,8547=>989,8548=>696,8549=>989,8550=>1247,8551=>1505,8552=>1008,8553=>694,8554=>1008,8555=>1266,8556=>573,8557=>660,8558=>747,8559=>896,8560=>308,8561=>546,8562=>785,8563=>885,8564=>586,8565=>866,8566=>1104,8567=>1342,8568=>872,8569=>580,8570=>872,8571=>1110,8572=>308,8573=>533,8574=>644,8575=>938,8576=>1160,8577=>747,8578=>1160,8579=>660,8580=>533,8581=>660,8585=>932,8592=>754,8593=>754,8594=>754,8595=>754,8596=>754,8597=>754,8598=>754,8599=>754,8600=>754,8601=>754,8602=>754,8603=>754,8604=>754,8605=>754,8606=>754,8607=>754,8608=>754,8609=>754,8610=>754,8611=>754,8612=>754,8613=>754,8614=>754,8615=>754,8616=>754,8617=>754,8618=>754,8619=>754,8620=>754,8621=>754,8622=>754,8623=>754,8624=>754,8625=>754,8626=>754,8627=>754,8628=>754,8629=>754,8630=>754,8631=>754,8632=>754,8633=>754,8634=>754,8635=>754,8636=>754,8637=>754,8638=>754,8639=>754,8640=>754,8641=>754,8642=>754,8643=>754,8644=>754,8645=>754,8646=>754,8647=>754,8648=>754,8649=>754,8650=>754,8651=>754,8652=>754,8653=>754,8654=>754,8655=>754,8656=>754,8657=>754,8658=>754,8659=>754,8660=>754,8661=>754,8662=>754,8663=>754,8664=>754,8665=>754,8666=>754,8667=>754,8668=>754,8669=>754,8670=>754,8671=>754,8672=>754,8673=>754,8674=>754,8675=>754,8676=>754,8677=>754,8678=>754,8679=>754,8680=>754,8681=>754,8682=>754,8683=>754,8684=>754,8685=>754,8686=>754,8687=>754,8688=>754,8689=>754,8690=>754,8691=>754,8692=>754,8693=>754,8694=>754,8695=>754,8696=>754,8697=>754,8698=>754,8699=>754,8700=>754,8701=>754,8702=>754,8703=>754,8704=>696,8705=>626,8706=>489,8707=>615,8708=>615,8709=>771,8710=>627,8711=>627,8712=>807,8713=>807,8714=>675,8715=>807,8716=>807,8717=>675,8718=>572,8719=>708,8720=>708,8721=>646,8722=>754,8723=>754,8724=>626,8725=>329,8726=>626,8727=>754,8728=>563,8729=>342,8730=>600,8731=>600,8732=>600,8733=>641,8734=>750,8735=>754,8736=>807,8737=>807,8738=>754,8739=>450,8740=>450,8741=>450,8742=>450,8743=>730,8744=>730,8745=>730,8746=>730,8747=>549,8748=>835,8749=>1165,8750=>506,8751=>879,8752=>1181,8753=>506,8754=>506,8755=>506,8756=>626,8757=>626,8758=>264,8759=>626,8760=>754,8761=>754,8762=>754,8763=>754,8764=>754,8765=>754,8766=>754,8767=>754,8768=>337,8769=>754,8770=>754,8771=>754,8772=>754,8773=>754,8774=>754,8775=>754,8776=>754,8777=>754,8778=>754,8779=>754,8780=>754,8781=>754,8782=>754,8783=>754,8784=>754,8785=>754,8786=>754,8787=>754,8788=>956,8789=>956,8790=>754,8791=>754,8792=>754,8793=>754,8794=>754,8795=>754,8796=>754,8797=>754,8798=>754,8799=>754,8800=>754,8801=>754,8802=>754,8803=>754,8804=>754,8805=>754,8806=>754,8807=>754,8808=>756,8809=>756,8810=>942,8811=>942,8812=>450,8813=>754,8814=>754,8815=>754,8816=>754,8817=>754,8818=>754,8819=>754,8820=>754,8821=>754,8822=>754,8823=>754,8824=>754,8825=>754,8826=>754,8827=>754,8828=>754,8829=>754,8830=>754,8831=>754,8832=>754,8833=>754,8834=>754,8835=>754,8836=>754,8837=>754,8838=>754,8839=>754,8840=>754,8841=>754,8842=>754,8843=>754,8844=>730,8845=>730,8846=>730,8847=>754,8848=>754,8849=>754,8850=>754,8851=>716,8852=>716,8853=>754,8854=>754,8855=>754,8856=>754,8857=>754,8858=>754,8859=>754,8860=>754,8861=>754,8862=>754,8863=>754,8864=>754,8865=>754,8866=>822,8867=>822,8868=>822,8869=>822,8870=>488,8871=>488,8872=>822,8873=>822,8874=>822,8875=>822,8876=>822,8877=>822,8878=>822,8879=>822,8880=>754,8881=>754,8882=>754,8883=>754,8884=>754,8885=>754,8886=>900,8887=>900,8888=>754,8889=>754,8890=>488,8891=>730,8892=>730,8893=>730,8894=>754,8895=>754,8896=>758,8897=>758,8898=>758,8899=>758,8900=>444,8901=>342,8902=>563,8903=>754,8904=>900,8905=>900,8906=>900,8907=>900,8908=>900,8909=>754,8910=>730,8911=>730,8912=>754,8913=>754,8914=>754,8915=>754,8916=>754,8917=>754,8918=>754,8919=>754,8920=>1280,8921=>1280,8922=>754,8923=>754,8924=>754,8925=>754,8926=>754,8927=>754,8928=>754,8929=>754,8930=>754,8931=>754,8932=>754,8933=>754,8934=>754,8935=>754,8936=>754,8937=>754,8938=>754,8939=>754,8940=>754,8941=>754,8942=>900,8943=>900,8944=>900,8945=>900,8946=>1042,8947=>807,8948=>675,8949=>807,8950=>807,8951=>675,8952=>807,8953=>807,8954=>1042,8955=>807,8956=>675,8957=>807,8958=>675,8959=>807,8960=>542,8961=>542,8962=>644,8963=>754,8964=>754,8965=>754,8966=>754,8967=>439,8968=>411,8969=>411,8970=>411,8971=>411,8972=>728,8973=>728,8974=>728,8975=>728,8976=>754,8977=>484,8984=>835,8985=>754,8988=>422,8989=>422,8990=>422,8991=>422,8992=>549,8993=>549,8996=>1037,8997=>1037,8998=>1272,8999=>1037,9000=>1299,9003=>1272,9004=>786,9075=>351,9076=>644,9077=>782,9082=>618,9085=>776,9095=>1037,9108=>786,9115=>450,9116=>450,9117=>450,9118=>450,9119=>450,9120=>450,9121=>450,9122=>450,9123=>450,9124=>450,9125=>450,9126=>450,9127=>675,9128=>675,9129=>675,9130=>675,9131=>675,9132=>675,9133=>675,9134=>549,9166=>754,9167=>850,9187=>786,9189=>692,9192=>626,9250=>644,9251=>644,9312=>762,9313=>762,9314=>762,9315=>762,9316=>762,9317=>762,9318=>762,9319=>762,9320=>762,9321=>762,9600=>692,9601=>692,9602=>692,9603=>692,9604=>692,9605=>692,9606=>692,9607=>692,9608=>692,9609=>692,9610=>692,9611=>692,9612=>692,9613=>692,9614=>692,9615=>692,9616=>692,9617=>692,9618=>692,9619=>692,9620=>692,9621=>692,9622=>692,9623=>692,9624=>692,9625=>692,9626=>692,9627=>692,9628=>692,9629=>692,9630=>692,9631=>692,9632=>850,9633=>850,9634=>850,9635=>850,9636=>850,9637=>850,9638=>850,9639=>850,9640=>850,9641=>850,9642=>610,9643=>610,9644=>850,9645=>850,9646=>495,9647=>495,9648=>692,9649=>692,9650=>692,9651=>692,9652=>452,9653=>452,9654=>692,9655=>692,9656=>452,9657=>452,9658=>692,9659=>692,9660=>692,9661=>692,9662=>452,9663=>452,9664=>692,9665=>692,9666=>452,9667=>452,9668=>692,9669=>692,9670=>692,9671=>692,9672=>692,9673=>785,9674=>444,9675=>785,9676=>785,9677=>785,9678=>785,9679=>785,9680=>785,9681=>785,9682=>785,9683=>785,9684=>785,9685=>785,9686=>474,9687=>474,9688=>756,9689=>873,9690=>873,9691=>873,9692=>348,9693=>348,9694=>348,9695=>348,9696=>692,9697=>692,9698=>692,9699=>692,9700=>692,9701=>692,9702=>575,9703=>850,9704=>850,9705=>850,9706=>850,9707=>850,9708=>692,9709=>692,9710=>692,9711=>1007,9712=>850,9713=>850,9714=>850,9715=>850,9716=>785,9717=>785,9718=>785,9719=>785,9720=>692,9721=>692,9722=>692,9723=>747,9724=>747,9725=>659,9726=>659,9727=>692,9728=>807,9729=>900,9730=>807,9731=>807,9732=>807,9733=>807,9734=>807,9735=>515,9736=>806,9737=>807,9738=>799,9739=>799,9740=>604,9741=>911,9742=>1121,9743=>1125,9744=>807,9745=>807,9746=>807,9747=>479,9748=>807,9749=>807,9750=>807,9751=>807,9752=>807,9753=>807,9754=>807,9755=>807,9756=>807,9757=>548,9758=>807,9759=>548,9760=>807,9761=>807,9762=>807,9763=>807,9764=>602,9765=>671,9766=>584,9767=>705,9768=>490,9769=>807,9770=>807,9771=>807,9772=>639,9773=>807,9774=>807,9775=>807,9776=>807,9777=>807,9778=>807,9779=>807,9780=>807,9781=>807,9782=>807,9783=>807,9784=>807,9785=>938,9786=>938,9787=>938,9788=>807,9789=>807,9790=>807,9791=>552,9792=>659,9793=>659,9794=>807,9795=>807,9796=>807,9797=>807,9798=>807,9799=>807,9800=>807,9801=>807,9802=>807,9803=>807,9804=>807,9805=>807,9806=>807,9807=>807,9808=>807,9809=>807,9810=>807,9811=>807,9812=>807,9813=>807,9814=>807,9815=>807,9816=>807,9817=>807,9818=>807,9819=>807,9820=>807,9821=>807,9822=>807,9823=>807,9824=>807,9825=>807,9826=>807,9827=>807,9828=>807,9829=>807,9830=>807,9831=>807,9832=>807,9833=>424,9834=>574,9835=>807,9836=>807,9837=>424,9838=>321,9839=>435,9840=>673,9841=>689,9842=>807,9843=>807,9844=>807,9845=>807,9846=>807,9847=>807,9848=>807,9849=>807,9850=>807,9851=>807,9852=>807,9853=>807,9854=>807,9855=>807,9856=>782,9857=>782,9858=>782,9859=>782,9860=>782,9861=>782,9862=>807,9863=>807,9864=>807,9865=>807,9866=>807,9867=>807,9868=>807,9869=>807,9870=>807,9871=>807,9872=>807,9873=>807,9874=>807,9875=>807,9876=>807,9877=>487,9878=>807,9879=>807,9880=>807,9881=>807,9882=>807,9883=>807,9884=>807,9888=>807,9889=>632,9890=>904,9891=>980,9892=>1057,9893=>813,9894=>754,9895=>754,9896=>754,9897=>754,9898=>754,9899=>754,9900=>754,9901=>754,9902=>754,9903=>754,9904=>759,9905=>754,9906=>659,9907=>659,9908=>659,9909=>659,9910=>765,9911=>659,9912=>659,9920=>754,9921=>754,9922=>754,9923=>754,9954=>659,9985=>754,9986=>754,9987=>754,9988=>754,9990=>754,9991=>754,9992=>754,9993=>754,9996=>754,9997=>754,9998=>754,9999=>754,10000=>754,10001=>754,10002=>754,10003=>754,10004=>754,10005=>754,10006=>754,10007=>754,10008=>754,10009=>754,10010=>754,10011=>754,10012=>754,10013=>754,10014=>754,10015=>754,10016=>754,10017=>754,10018=>754,10019=>754,10020=>754,10021=>754,10022=>754,10023=>754,10025=>754,10026=>754,10027=>754,10028=>754,10029=>754,10030=>754,10031=>754,10032=>754,10033=>754,10034=>754,10035=>754,10036=>754,10037=>754,10038=>754,10039=>754,10040=>754,10041=>754,10042=>754,10043=>754,10044=>754,10045=>754,10046=>754,10047=>754,10048=>754,10049=>754,10050=>754,10051=>754,10052=>754,10053=>754,10054=>754,10055=>754,10056=>754,10057=>754,10058=>754,10059=>754,10061=>807,10063=>807,10064=>807,10065=>807,10066=>807,10070=>807,10072=>754,10073=>754,10074=>754,10075=>312,10076=>312,10077=>528,10078=>528,10081=>754,10082=>754,10083=>754,10084=>754,10085=>754,10086=>754,10087=>754,10088=>754,10089=>754,10090=>754,10091=>754,10092=>754,10093=>754,10094=>754,10095=>754,10096=>754,10097=>754,10098=>754,10099=>754,10100=>754,10101=>754,10102=>762,10103=>762,10104=>762,10105=>762,10106=>762,10107=>762,10108=>762,10109=>762,10110=>762,10111=>762,10112=>754,10113=>754,10114=>754,10115=>754,10116=>754,10117=>754,10118=>754,10119=>754,10120=>754,10121=>754,10122=>754,10123=>754,10124=>754,10125=>754,10126=>754,10127=>754,10128=>754,10129=>754,10130=>754,10131=>754,10132=>754,10136=>754,10137=>754,10138=>754,10139=>754,10140=>754,10141=>754,10142=>754,10143=>754,10144=>754,10145=>754,10146=>754,10147=>754,10148=>754,10149=>754,10150=>754,10151=>754,10152=>754,10153=>754,10154=>754,10155=>754,10156=>754,10157=>754,10158=>754,10159=>754,10161=>754,10162=>754,10163=>754,10164=>754,10165=>754,10166=>754,10167=>754,10168=>754,10169=>754,10170=>754,10171=>754,10172=>754,10173=>754,10174=>754,10181=>411,10182=>411,10208=>444,10214=>438,10215=>438,10216=>411,10217=>411,10218=>648,10219=>648,10224=>754,10225=>754,10226=>754,10227=>754,10228=>1042,10229=>1290,10230=>1290,10231=>1290,10232=>1290,10233=>1290,10234=>1290,10235=>1290,10236=>1290,10237=>1290,10238=>1290,10239=>1290,10240=>703,10241=>703,10242=>703,10243=>703,10244=>703,10245=>703,10246=>703,10247=>703,10248=>703,10249=>703,10250=>703,10251=>703,10252=>703,10253=>703,10254=>703,10255=>703,10256=>703,10257=>703,10258=>703,10259=>703,10260=>703,10261=>703,10262=>703,10263=>703,10264=>703,10265=>703,10266=>703,10267=>703,10268=>703,10269=>703,10270=>703,10271=>703,10272=>703,10273=>703,10274=>703,10275=>703,10276=>703,10277=>703,10278=>703,10279=>703,10280=>703,10281=>703,10282=>703,10283=>703,10284=>703,10285=>703,10286=>703,10287=>703,10288=>703,10289=>703,10290=>703,10291=>703,10292=>703,10293=>703,10294=>703,10295=>703,10296=>703,10297=>703,10298=>703,10299=>703,10300=>703,10301=>703,10302=>703,10303=>703,10304=>703,10305=>703,10306=>703,10307=>703,10308=>703,10309=>703,10310=>703,10311=>703,10312=>703,10313=>703,10314=>703,10315=>703,10316=>703,10317=>703,10318=>703,10319=>703,10320=>703,10321=>703,10322=>703,10323=>703,10324=>703,10325=>703,10326=>703,10327=>703,10328=>703,10329=>703,10330=>703,10331=>703,10332=>703,10333=>703,10334=>703,10335=>703,10336=>703,10337=>703,10338=>703,10339=>703,10340=>703,10341=>703,10342=>703,10343=>703,10344=>703,10345=>703,10346=>703,10347=>703,10348=>703,10349=>703,10350=>703,10351=>703,10352=>703,10353=>703,10354=>703,10355=>703,10356=>703,10357=>703,10358=>703,10359=>703,10360=>703,10361=>703,10362=>703,10363=>703,10364=>703,10365=>703,10366=>703,10367=>703,10368=>703,10369=>703,10370=>703,10371=>703,10372=>703,10373=>703,10374=>703,10375=>703,10376=>703,10377=>703,10378=>703,10379=>703,10380=>703,10381=>703,10382=>703,10383=>703,10384=>703,10385=>703,10386=>703,10387=>703,10388=>703,10389=>703,10390=>703,10391=>703,10392=>703,10393=>703,10394=>703,10395=>703,10396=>703,10397=>703,10398=>703,10399=>703,10400=>703,10401=>703,10402=>703,10403=>703,10404=>703,10405=>703,10406=>703,10407=>703,10408=>703,10409=>703,10410=>703,10411=>703,10412=>703,10413=>703,10414=>703,10415=>703,10416=>703,10417=>703,10418=>703,10419=>703,10420=>703,10421=>703,10422=>703,10423=>703,10424=>703,10425=>703,10426=>703,10427=>703,10428=>703,10429=>703,10430=>703,10431=>703,10432=>703,10433=>703,10434=>703,10435=>703,10436=>703,10437=>703,10438=>703,10439=>703,10440=>703,10441=>703,10442=>703,10443=>703,10444=>703,10445=>703,10446=>703,10447=>703,10448=>703,10449=>703,10450=>703,10451=>703,10452=>703,10453=>703,10454=>703,10455=>703,10456=>703,10457=>703,10458=>703,10459=>703,10460=>703,10461=>703,10462=>703,10463=>703,10464=>703,10465=>703,10466=>703,10467=>703,10468=>703,10469=>703,10470=>703,10471=>703,10472=>703,10473=>703,10474=>703,10475=>703,10476=>703,10477=>703,10478=>703,10479=>703,10480=>703,10481=>703,10482=>703,10483=>703,10484=>703,10485=>703,10486=>703,10487=>703,10488=>703,10489=>703,10490=>703,10491=>703,10492=>703,10493=>703,10494=>703,10495=>703,10502=>754,10503=>754,10506=>754,10507=>754,10560=>754,10561=>754,10627=>678,10628=>678,10702=>754,10703=>941,10704=>941,10705=>900,10706=>900,10707=>900,10708=>900,10709=>900,10731=>444,10746=>754,10747=>754,10752=>900,10753=>900,10754=>900,10764=>1495,10765=>506,10766=>506,10767=>506,10768=>506,10769=>506,10770=>506,10771=>506,10772=>506,10773=>506,10774=>506,10775=>506,10776=>506,10777=>506,10778=>506,10779=>506,10780=>506,10799=>754,10858=>754,10859=>754,10877=>754,10878=>754,10879=>754,10880=>754,10881=>754,10882=>754,10883=>754,10884=>754,10885=>754,10886=>754,10887=>754,10888=>754,10889=>754,10890=>754,10891=>754,10892=>754,10893=>754,10894=>754,10895=>754,10896=>754,10897=>754,10898=>754,10899=>754,10900=>754,10901=>754,10902=>754,10903=>754,10904=>754,10905=>754,10906=>754,10907=>754,10908=>754,10909=>754,10910=>754,10911=>754,10912=>754,10926=>754,10927=>754,10928=>754,10929=>754,10930=>754,10931=>754,10932=>754,10933=>754,10934=>754,10935=>754,10936=>754,10937=>754,10938=>754,11001=>754,11002=>754,11008=>754,11009=>754,11010=>754,11011=>754,11012=>754,11013=>754,11014=>754,11015=>754,11016=>754,11017=>754,11018=>754,11019=>754,11020=>754,11021=>754,11022=>754,11023=>754,11024=>754,11025=>754,11026=>850,11027=>850,11028=>850,11029=>850,11030=>692,11031=>692,11032=>692,11033=>692,11034=>850,11039=>782,11040=>782,11041=>786,11042=>786,11043=>786,11044=>1007,11091=>782,11092=>782,11360=>573,11361=>324,11362=>573,11363=>659,11364=>693,11365=>607,11366=>430,11367=>860,11368=>641,11369=>697,11370=>598,11371=>652,11372=>523,11373=>774,11374=>896,11375=>696,11376=>774,11377=>700,11378=>1099,11379=>950,11380=>586,11381=>628,11382=>508,11383=>704,11385=>484,11386=>618,11387=>502,11388=>197,11389=>438,11390=>648,11391=>652,11520=>596,11521=>608,11522=>595,11523=>566,11524=>595,11525=>928,11526=>646,11527=>928,11528=>583,11529=>600,11530=>928,11531=>605,11532=>609,11533=>932,11534=>612,11535=>797,11536=>928,11537=>615,11538=>606,11539=>931,11540=>930,11541=>924,11542=>608,11543=>605,11544=>600,11545=>600,11546=>593,11547=>604,11548=>935,11549=>605,11550=>623,11551=>593,11552=>943,11553=>593,11554=>588,11555=>603,11556=>659,11557=>915,11568=>622,11569=>847,11570=>847,11571=>652,11572=>652,11573=>652,11574=>608,11575=>696,11576=>696,11577=>615,11578=>615,11579=>721,11580=>890,11581=>685,11582=>561,11583=>685,11584=>847,11585=>847,11586=>335,11587=>666,11588=>753,11589=>822,11590=>604,11591=>663,11592=>612,11593=>615,11594=>542,11595=>935,11596=>700,11597=>753,11598=>615,11599=>334,11600=>700,11601=>335,11602=>652,11603=>622,11604=>847,11605=>847,11606=>753,11607=>335,11608=>752,11609=>847,11610=>847,11611=>660,11612=>789,11613=>694,11614=>660,11615=>615,11616=>696,11617=>753,11618=>615,11619=>765,11620=>627,11621=>765,11631=>644,11800=>522,11807=>754,11810=>411,11811=>411,11812=>411,11813=>411,11822=>522,19904=>807,19905=>807,19906=>807,19907=>807,19908=>807,19909=>807,19910=>807,19911=>807,19912=>807,19913=>807,19914=>807,19915=>807,19916=>807,19917=>807,19918=>807,19919=>807,19920=>807,19921=>807,19922=>807,19923=>807,19924=>807,19925=>807,19926=>807,19927=>807,19928=>807,19929=>807,19930=>807,19931=>807,19932=>807,19933=>807,19934=>807,19935=>807,19936=>807,19937=>807,19938=>807,19939=>807,19940=>807,19941=>807,19942=>807,19943=>807,19944=>807,19945=>807,19946=>807,19947=>807,19948=>807,19949=>807,19950=>807,19951=>807,19952=>807,19953=>807,19954=>807,19955=>807,19956=>807,19957=>807,19958=>807,19959=>807,19960=>807,19961=>807,19962=>807,19963=>807,19964=>807,19965=>807,19966=>807,19967=>807,42192=>686,42193=>659,42194=>659,42195=>747,42196=>614,42197=>614,42198=>738,42199=>697,42200=>697,42201=>477,42202=>660,42203=>660,42204=>652,42205=>615,42206=>615,42207=>896,42208=>753,42209=>573,42210=>648,42211=>693,42212=>693,42213=>696,42214=>696,42215=>753,42216=>697,42217=>477,42218=>993,42219=>694,42220=>651,42221=>686,42222=>696,42223=>696,42224=>615,42225=>615,42226=>334,42227=>765,42228=>730,42229=>730,42230=>501,42231=>747,42232=>290,42233=>290,42234=>606,42235=>606,42236=>290,42237=>290,42238=>529,42239=>529,42564=>648,42565=>536,42566=>392,42567=>396,42572=>1265,42573=>1055,42576=>1110,42577=>924,42580=>1056,42581=>875,42582=>983,42583=>862,42594=>976,42595=>832,42596=>986,42597=>821,42598=>1134,42599=>897,42600=>765,42601=>618,42602=>933,42603=>781,42604=>1266,42605=>995,42606=>865,42634=>867,42635=>708,42636=>614,42637=>521,42644=>727,42645=>641,42760=>450,42761=>450,42762=>450,42763=>450,42764=>450,42765=>450,42766=>450,42767=>450,42768=>450,42769=>450,42770=>450,42771=>450,42772=>450,42773=>450,42774=>450,42779=>360,42780=>360,42781=>258,42782=>258,42783=>258,42786=>399,42787=>351,42788=>486,42789=>486,42790=>753,42791=>641,42792=>928,42793=>771,42794=>626,42795=>501,42800=>502,42801=>536,42802=>1214,42803=>946,42804=>1156,42805=>958,42806=>1094,42807=>949,42808=>971,42809=>830,42810=>971,42811=>830,42812=>932,42813=>830,42814=>628,42815=>494,42816=>590,42817=>620,42822=>765,42823=>488,42824=>614,42825=>478,42826=>826,42827=>732,42830=>1266,42831=>995,42832=>659,42833=>644,42834=>853,42835=>843,42838=>765,42839=>644,42852=>664,42853=>644,42854=>664,42855=>644,42880=>573,42881=>308,42882=>753,42883=>641,42889=>360,42890=>347,42891=>410,42892=>275,42893=>727,42894=>624,42896=>835,42897=>691,42912=>738,42913=>644,42914=>697,42915=>598,42916=>753,42917=>641,42918=>693,42919=>444,42920=>648,42921=>536,42922=>797,43002=>956,43003=>615,43004=>659,43005=>896,43006=>334,43007=>1192,61184=>194,61185=>218,61186=>240,61187=>249,61188=>254,61189=>218,61190=>194,61191=>218,61192=>240,61193=>249,61194=>240,61195=>218,61196=>194,61197=>218,61198=>240,61199=>249,61200=>240,61201=>218,61202=>194,61203=>218,61204=>254,61205=>249,61206=>240,61207=>218,61208=>194,61209=>254,62464=>551,62465=>551,62466=>587,62467=>812,62468=>560,62469=>560,62470=>594,62471=>805,62472=>530,62473=>560,62474=>1046,62475=>563,62476=>564,62477=>803,62478=>551,62479=>563,62480=>832,62481=>564,62482=>669,62483=>570,62484=>797,62485=>563,62486=>816,62487=>563,62488=>559,62489=>565,62490=>609,62491=>563,62492=>559,62493=>567,62494=>564,62495=>514,62496=>559,62497=>567,62498=>551,62499=>550,62500=>556,62501=>604,62502=>866,62504=>920,62505=>760,62506=>507,62507=>507,62508=>507,62509=>507,62510=>507,62511=>507,62512=>499,62513=>499,62514=>499,62515=>499,62516=>516,62517=>516,62518=>516,62519=>742,62520=>742,62521=>742,62522=>742,62523=>742,62524=>549,62525=>549,62526=>549,62527=>549,62528=>549,62529=>549,63173=>618,64256=>729,64257=>667,64258=>667,64259=>1003,64260=>1004,64261=>727,64262=>917,64275=>1249,64276=>1245,64277=>1240,64278=>1245,64279=>1542,64285=>265,64286=>0,64287=>467,64288=>598,64289=>845,64290=>709,64291=>828,64292=>707,64293=>771,64294=>782,64295=>739,64296=>801,64297=>754,64298=>682,64299=>682,64300=>682,64301=>682,64302=>655,64303=>655,64304=>655,64305=>549,64306=>402,64307=>529,64308=>618,64309=>393,64310=>436,64312=>611,64313=>391,64314=>520,64315=>510,64316=>544,64318=>651,64320=>408,64321=>611,64323=>607,64324=>592,64326=>587,64327=>663,64328=>542,64329=>682,64330=>615,64331=>309,64332=>549,64333=>510,64334=>592,64335=>639,64338=>904,64339=>953,64340=>338,64341=>367,64342=>904,64343=>953,64344=>338,64345=>367,64346=>904,64347=>953,64348=>338,64349=>367,64350=>904,64351=>953,64352=>338,64353=>367,64354=>904,64355=>953,64356=>338,64357=>367,64358=>904,64359=>953,64360=>338,64361=>367,64362=>1045,64363=>1072,64364=>589,64365=>647,64366=>1045,64367=>1072,64368=>589,64369=>647,64370=>648,64371=>648,64372=>648,64373=>648,64374=>648,64375=>648,64376=>648,64377=>648,64378=>648,64379=>648,64380=>648,64381=>648,64382=>648,64383=>648,64384=>648,64385=>648,64386=>461,64387=>520,64388=>461,64389=>520,64390=>461,64391=>520,64392=>461,64393=>520,64394=>518,64395=>560,64396=>518,64397=>560,64398=>921,64399=>921,64400=>523,64401=>523,64402=>921,64403=>921,64404=>523,64405=>523,64406=>921,64407=>921,64408=>523,64409=>523,64410=>921,64411=>921,64412=>523,64413=>523,64414=>768,64415=>810,64416=>768,64417=>810,64418=>338,64419=>367,64426=>844,64427=>792,64428=>624,64429=>594,64467=>742,64468=>758,64469=>428,64470=>497,64473=>559,64474=>564,64488=>338,64489=>367,64508=>825,64509=>910,64510=>338,64511=>367,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65136=>308,65137=>308,65138=>308,65139=>311,65140=>308,65142=>308,65143=>308,65144=>308,65145=>308,65146=>308,65147=>308,65148=>308,65149=>308,65150=>308,65151=>308,65152=>460,65153=>308,65154=>338,65155=>308,65156=>338,65157=>559,65158=>564,65159=>308,65160=>338,65161=>825,65162=>825,65163=>338,65164=>367,65165=>308,65166=>338,65167=>904,65168=>953,65169=>338,65170=>367,65171=>531,65172=>545,65173=>904,65174=>953,65175=>338,65176=>367,65177=>904,65178=>953,65179=>338,65180=>367,65181=>648,65182=>648,65183=>648,65184=>648,65185=>648,65186=>648,65187=>648,65188=>648,65189=>648,65190=>648,65191=>648,65192=>648,65193=>461,65194=>520,65195=>461,65196=>520,65197=>518,65198=>560,65199=>518,65200=>560,65201=>1242,65202=>1272,65203=>885,65204=>916,65205=>1242,65206=>1272,65207=>885,65208=>916,65209=>1210,65210=>1228,65211=>870,65212=>887,65213=>1210,65214=>1228,65215=>870,65216=>887,65217=>935,65218=>963,65219=>848,65220=>876,65221=>935,65222=>963,65223=>848,65224=>876,65225=>615,65226=>615,65227=>615,65228=>508,65229=>615,65230=>615,65231=>615,65232=>508,65233=>1045,65234=>1072,65235=>589,65236=>647,65237=>804,65238=>811,65239=>589,65240=>647,65241=>825,65242=>838,65243=>523,65244=>523,65245=>781,65246=>803,65247=>338,65248=>367,65249=>659,65250=>706,65251=>557,65252=>603,65253=>768,65254=>810,65255=>338,65256=>367,65257=>531,65258=>545,65259=>624,65260=>594,65261=>559,65262=>564,65263=>825,65264=>910,65265=>825,65266=>910,65267=>338,65268=>367,65269=>670,65270=>683,65271=>670,65272=>683,65273=>670,65274=>683,65275=>670,65276=>683,65279=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>1002,65535=>540); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedb.z b/lib/combodo/tcpdf/fonts/dejavusanscondensedb.z deleted file mode 100644 index af54a16a0..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensedb.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.ctg.z b/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.ctg.z deleted file mode 100644 index 23445ef2f..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.php b/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.php deleted file mode 100644 index d0d573d2c..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.php +++ /dev/null @@ -1,16 +0,0 @@ -96,'FontBBox'=>'[-960 -385 1799 1121]','ItalicAngle'=>-11,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>60,'StemH'=>26,'AvgWidth'=>515,'MaxWidth'=>1814,'MissingWidth'=>540); -$cbbox=array(0=>array(44,-177,495,705),33=>array(62,0,349,729),34=>array(85,458,383,729),35=>array(58,0,702,718),36=>array(24,-147,567,760),37=>array(49,-14,853,742),38=>array(25,-14,732,742),39=>array(85,458,190,729),40=>array(69,-132,421,759),41=>array(-24,-132,328,759),42=>array(18,278,453,742),43=>array(95,0,659,627),44=>array(-31,-142,230,189),45=>array(22,217,324,359),46=>array(41,0,233,189),47=>array(-87,-93,391,729),48=>array(32,-14,594,742),49=>array(39,0,521,729),50=>array(7,0,576,742),51=>array(0,-14,574,742),52=>array(-1,0,571,729),53=>array(12,-14,580,729),54=>array(44,-15,594,741),55=>array(70,0,625,729),56=>array(20,-14,593,742),57=>array(37,-15,587,741),58=>array(37,0,291,547),59=>array(-32,-142,291,547),60=>array(95,30,659,597),61=>array(95,144,659,482),62=>array(95,30,659,597),63=>array(93,0,499,742),64=>array(40,-172,834,703),65=>array(-59,0,622,729),66=>array(19,0,629,729),67=>array(32,-14,652,742),68=>array(19,0,708,729),69=>array(19,0,603,729),70=>array(19,0,603,729),71=>array(32,-14,700,742),72=>array(19,0,734,729),73=>array(19,0,316,729),74=>array(-149,-200,316,729),75=>array(19,0,753,729),76=>array(19,0,510,729),77=>array(19,0,877,729),78=>array(19,0,734,729),79=>array(32,-14,733,742),80=>array(19,0,647,729),81=>array(32,-146,733,742),82=>array(19,0,617,729),83=>array(13,-14,599,742),84=>array(43,0,673,729),85=>array(61,-14,712,729),86=>array(68,0,756,729),87=>array(96,0,1029,729),88=>array(-46,0,731,729),89=>array(57,0,729,729),90=>array(-23,0,667,729),91=>array(-9,-132,419,760),92=>array(63,-93,249,729),93=>array(-25,-132,404,760),94=>array(91,457,664,729),95=>array(-9,-236,459,-143),96=>array(118,616,334,800),97=>array(15,-14,550,560),98=>array(27,-14,609,760),99=>array(33,-14,523,560),100=>array(32,-14,652,760),101=>array(32,-14,576,560),102=>array(44,0,486,760),103=>array(18,-216,614,559),104=>array(27,0,589,760),105=>array(27,0,319,760),106=>array(-115,-216,319,760),107=>array(27,0,645,760),108=>array(27,0,319,760),109=>array(27,0,886,560),110=>array(27,0,589,560),111=>array(32,-14,586,560),112=>array(-9,-208,609,560),113=>array(32,-208,614,560),114=>array(27,0,491,560),115=>array(9,-14,504,560),116=>array(39,0,458,702),117=>array(54,-14,613,547),118=>array(57,0,611,547),119=>array(78,0,834,547),120=>array(-37,0,604,547),121=>array(0,-216,619,547),122=>array(-8,0,527,547),123=>array(95,-163,602,760),124=>array(114,-236,214,764),125=>array(40,-163,545,760),126=>array(95,212,659,415),161=>array(62,0,349,729),162=>array(60,-153,549,699),163=>array(6,0,622,742),164=>array(32,30,541,596),165=>array(5,0,680,729),166=>array(114,-171,214,699),167=>array(-30,-95,445,742),168=>array(136,654,436,774),169=>array(124,0,776,725),170=>array(39,182,475,742),171=>array(55,67,535,519),172=>array(95,140,659,444),173=>array(22,217,324,359),174=>array(124,0,776,725),175=>array(139,668,433,760),176=>array(78,424,371,749),177=>array(95,0,659,627),178=>array(40,326,388,742),179=>array(36,319,384,742),180=>array(204,616,485,800),181=>array(-24,-209,603,547),182=>array(66,-96,543,729),183=>array(75,253,268,442),184=>array(20,-196,233,0),185=>array(60,326,356,734),186=>array(41,182,491,742),187=>array(51,66,530,519),188=>array(50,-14,853,742),189=>array(50,-14,933,742),190=>array(42,-14,853,742),191=>array(33,-13,439,729),192=>array(-59,0,622,927),193=>array(-59,0,622,927),194=>array(-59,0,622,927),195=>array(-59,0,622,928),196=>array(-59,0,622,927),197=>array(-59,0,622,928),198=>array(-70,0,965,729),199=>array(32,-196,652,742),200=>array(19,0,603,927),201=>array(19,0,603,927),202=>array(19,0,603,927),203=>array(19,0,603,927),204=>array(19,0,316,927),205=>array(19,0,403,927),206=>array(19,0,396,927),207=>array(19,0,398,927),208=>array(-2,0,723,729),209=>array(19,0,734,928),210=>array(32,-14,733,927),211=>array(32,-14,733,927),212=>array(32,-14,733,927),213=>array(32,-14,733,928),214=>array(32,-14,733,927),215=>array(112,20,642,607),216=>array(-42,-38,807,771),217=>array(61,-14,712,927),218=>array(61,-14,712,927),219=>array(61,-14,712,927),220=>array(61,-14,712,927),221=>array(57,0,729,927),222=>array(19,0,625,729),223=>array(27,-14,600,760),224=>array(15,-14,550,800),225=>array(15,-14,564,800),226=>array(15,-14,550,800),227=>array(15,-14,550,778),228=>array(15,-14,550,774),229=>array(15,-14,550,883),230=>array(15,-14,907,560),231=>array(33,-196,523,560),232=>array(32,-14,576,800),233=>array(32,-14,585,800),234=>array(32,-14,576,800),235=>array(32,-14,576,774),236=>array(27,0,282,800),237=>array(27,0,423,800),238=>array(27,0,373,800),239=>array(27,0,374,774),240=>array(32,-14,611,760),241=>array(27,0,589,778),242=>array(32,-14,586,800),243=>array(32,-14,586,800),244=>array(32,-14,586,800),245=>array(32,-14,586,778),246=>array(32,-14,586,774),247=>array(95,42,659,585),248=>array(-16,-50,630,597),249=>array(54,-14,613,800),250=>array(54,-14,613,800),251=>array(54,-14,613,800),252=>array(54,-14,613,774),253=>array(0,-216,619,800),254=>array(-9,-208,609,760),255=>array(0,-216,619,774),256=>array(-59,0,622,914),257=>array(15,-14,550,763),258=>array(-59,0,622,936),259=>array(15,-14,550,772),260=>array(-59,-196,622,729),261=>array(15,-196,550,560),262=>array(32,-14,652,927),263=>array(33,-14,581,800),264=>array(32,-14,652,927),265=>array(33,-14,530,800),266=>array(32,-14,652,927),267=>array(33,-14,523,759),268=>array(32,-14,659,927),269=>array(33,-14,571,800),270=>array(19,0,708,927),271=>array(32,-14,853,760),272=>array(-2,0,723,729),273=>array(32,-14,735,760),274=>array(19,0,603,914),275=>array(32,-14,576,763),276=>array(19,0,603,927),277=>array(32,-14,576,784),278=>array(19,0,603,927),279=>array(32,-14,576,759),280=>array(19,-196,603,729),281=>array(32,-196,576,560),282=>array(19,0,603,927),283=>array(32,-14,576,800),284=>array(32,-14,700,927),285=>array(18,-216,614,800),286=>array(32,-14,700,927),287=>array(18,-216,614,784),288=>array(32,-14,700,927),289=>array(18,-216,614,759),290=>array(32,-224,700,742),291=>array(18,-216,614,765),292=>array(19,0,734,927),293=>array(27,0,589,927),294=>array(80,0,842,729),295=>array(77,0,637,760),296=>array(19,0,411,928),297=>array(27,0,388,778),298=>array(19,0,375,914),299=>array(27,0,362,763),300=>array(19,0,408,927),301=>array(27,0,385,784),302=>array(19,-196,316,729),303=>array(27,-196,319,760),304=>array(19,0,320,927),305=>array(27,0,282,547),306=>array(19,-200,650,729),307=>array(27,-216,627,760),308=>array(-149,-200,408,927),309=>array(-115,-216,385,800),310=>array(19,-209,753,729),311=>array(27,-209,645,760),312=>array(27,0,645,547),313=>array(19,0,510,928),314=>array(27,0,431,928),315=>array(19,-209,510,729),316=>array(-21,-209,319,760),317=>array(19,0,561,729),318=>array(27,0,523,760),319=>array(19,0,562,729),320=>array(27,0,500,760),321=>array(-21,0,543,729),322=>array(-6,0,411,760),323=>array(19,0,734,928),324=>array(27,0,589,803),325=>array(19,-209,734,729),326=>array(27,-209,589,560),327=>array(19,0,734,927),328=>array(27,0,589,800),329=>array(55,0,820,729),330=>array(28,-200,698,742),331=>array(45,-216,606,560),332=>array(32,-14,733,914),333=>array(32,-14,586,763),334=>array(32,-14,733,927),335=>array(32,-14,586,784),336=>array(32,-14,733,927),337=>array(32,-14,592,800),338=>array(38,0,1039,729),339=>array(32,-14,949,560),340=>array(19,0,617,928),341=>array(27,0,556,803),342=>array(19,-209,617,729),343=>array(-21,-209,491,560),344=>array(19,0,617,927),345=>array(27,0,542,800),346=>array(13,-14,599,928),347=>array(9,-14,556,803),348=>array(13,-14,599,927),349=>array(9,-14,504,800),350=>array(13,-196,599,742),351=>array(9,-196,504,560),352=>array(13,-14,599,927),353=>array(9,-14,519,800),354=>array(43,-196,673,729),355=>array(39,-196,458,702),356=>array(43,0,673,927),357=>array(39,0,554,800),358=>array(43,0,673,729),359=>array(-10,0,444,702),360=>array(61,-14,712,928),361=>array(54,-14,613,778),362=>array(61,-14,712,914),363=>array(54,-14,613,763),364=>array(61,-14,712,927),365=>array(54,-14,613,784),366=>array(61,-14,712,923),367=>array(54,-14,613,873),368=>array(61,-14,712,927),369=>array(54,-14,613,800),370=>array(61,-196,712,729),371=>array(54,-196,613,547),372=>array(96,0,1029,931),373=>array(78,0,834,800),374=>array(57,0,729,931),375=>array(0,-216,619,800),376=>array(57,0,729,927),377=>array(-23,0,667,928),378=>array(-8,0,556,803),379=>array(-23,0,667,918),380=>array(-8,0,527,759),381=>array(-23,0,667,927),382=>array(-8,0,527,800),383=>array(44,0,486,760),384=>array(10,-14,586,760),385=>array(-33,0,670,729),386=>array(19,0,643,729),387=>array(10,-14,596,760),388=>array(54,0,634,729),389=>array(33,-14,609,760),390=>array(-12,-14,607,742),391=>array(29,-14,818,924),392=>array(24,-14,644,724),393=>array(-2,0,723,729),394=>array(-33,0,747,729),395=>array(58,0,687,729),396=>array(22,-14,637,760),397=>array(51,-208,596,548),398=>array(19,0,613,729),399=>array(32,-14,737,742),400=>array(33,-14,587,742),401=>array(-132,-200,621,729),402=>array(-136,-208,484,760),403=>array(29,-14,864,924),404=>array(84,-210,794,729),405=>array(9,-1,883,760),406=>array(66,0,346,729),407=>array(-6,0,357,729),408=>array(18,0,744,742),409=>array(9,0,626,760),410=>array(-9,0,329,760),411=>array(-40,0,482,760),412=>array(49,-13,932,729),413=>array(-132,-200,752,729),414=>array(44,-208,598,560),415=>array(32,-14,733,742),416=>array(35,-14,816,760),417=>array(35,-14,693,570),418=>array(44,-14,951,742),419=>array(56,-216,802,560),420=>array(-33,0,689,729),421=>array(-9,-208,604,760),422=>array(31,-146,616,729),423=>array(-1,-14,568,742),424=>array(-6,-14,480,560),425=>array(19,0,603,729),426=>array(31,-217,485,759),427=>array(43,-216,463,702),428=>array(32,0,695,729),429=>array(19,0,461,760),430=>array(61,-200,690,729),431=>array(61,-14,844,761),432=>array(51,-14,716,570),433=>array(37,-14,732,723),434=>array(66,0,688,729),435=>array(54,0,757,742),436=>array(22,-216,740,560),437=>array(-23,0,666,729),438=>array(-8,0,529,547),439=>array(18,-33,669,729),440=>array(9,-33,694,729),441=>array(5,-215,583,547),442=>array(-10,-208,527,547),443=>array(6,0,571,742),444=>array(10,-33,627,729),445=>array(-27,-215,516,547),446=>array(-24,-15,458,702),447=>array(-11,-208,624,560),448=>array(0,-208,334,729),449=>array(0,-208,592,729),450=>array(-21,-208,517,729),451=>array(24,0,312,729),452=>array(19,0,1414,927),453=>array(19,0,1274,800),454=>array(32,-14,1172,800),455=>array(19,-200,890,729),456=>array(19,-216,892,760),457=>array(27,-216,627,760),458=>array(19,-200,1069,729),459=>array(19,-216,1072,760),460=>array(27,-216,959,760),461=>array(-59,0,622,927),462=>array(15,-14,554,800),463=>array(19,0,426,927),464=>array(27,0,411,800),465=>array(32,-14,733,927),466=>array(32,-14,586,800),467=>array(61,-14,712,927),468=>array(54,-14,613,800),469=>array(61,-14,712,1040),470=>array(54,-14,613,914),471=>array(61,-14,712,1057),472=>array(54,-14,613,917),473=>array(61,-14,712,1058),474=>array(54,-14,613,917),475=>array(61,-14,712,1057),476=>array(54,-14,613,917),477=>array(38,-14,567,560),478=>array(-59,0,622,1040),479=>array(15,-14,550,914),480=>array(-59,0,622,1040),481=>array(15,-14,558,881),482=>array(-70,0,965,914),483=>array(15,-14,907,758),484=>array(32,-14,700,742),485=>array(18,-216,614,559),486=>array(32,-14,700,927),487=>array(18,-216,614,799),488=>array(19,0,753,926),489=>array(27,0,645,926),490=>array(32,-196,733,742),491=>array(32,-196,586,560),492=>array(32,-196,733,914),493=>array(32,-196,586,763),494=>array(18,-33,669,927),495=>array(-40,-215,529,793),496=>array(-115,-216,419,800),497=>array(19,0,1414,729),498=>array(19,0,1274,729),499=>array(32,-14,1172,760),500=>array(32,-14,700,928),501=>array(18,-216,614,798),502=>array(20,-14,1100,729),503=>array(-18,-208,698,742),504=>array(19,0,734,927),505=>array(27,0,589,798),506=>array(-59,0,780,986),507=>array(15,-14,733,931),508=>array(-70,0,965,928),509=>array(15,-14,907,799),510=>array(-42,-38,807,928),511=>array(-16,-50,630,800),512=>array(-59,0,622,930),513=>array(15,-14,550,800),514=>array(-59,0,622,947),515=>array(15,-14,550,784),516=>array(19,0,603,930),517=>array(32,-14,576,800),518=>array(19,0,603,947),519=>array(32,-14,576,784),520=>array(19,0,393,930),521=>array(27,0,369,799),522=>array(19,0,402,947),523=>array(27,0,376,784),524=>array(32,-14,733,930),525=>array(32,-14,586,800),526=>array(32,-14,733,947),527=>array(32,-14,586,784),528=>array(19,0,617,930),529=>array(27,0,491,800),530=>array(19,0,617,947),531=>array(27,0,491,784),532=>array(61,-14,712,930),533=>array(54,-14,613,800),534=>array(61,-14,712,947),535=>array(54,-14,613,784),536=>array(13,-236,599,742),537=>array(9,-236,504,560),538=>array(43,-236,673,729),539=>array(39,-236,458,702),540=>array(-41,-210,584,742),541=>array(-43,-211,508,560),542=>array(19,0,734,926),543=>array(27,0,589,926),544=>array(29,-208,688,742),545=>array(28,-75,708,760),546=>array(22,-14,692,742),547=>array(20,-14,591,646),548=>array(-4,-216,685,729),549=>array(11,-216,548,547),550=>array(-59,0,622,927),551=>array(15,-14,550,759),552=>array(19,-192,603,729),553=>array(32,-196,576,560),554=>array(32,-14,733,1040),555=>array(32,-14,586,914),556=>array(32,-14,733,1040),557=>array(32,-14,586,914),558=>array(32,-14,733,928),559=>array(32,-14,586,759),560=>array(32,-14,733,1040),561=>array(32,-14,586,914),562=>array(57,0,729,914),563=>array(0,-216,619,763),564=>array(29,-75,372,760),565=>array(33,-75,727,560),566=>array(31,-76,451,702),567=>array(-115,-216,282,547),568=>array(22,-14,921,760),569=>array(57,-208,956,560),570=>array(-73,-36,769,765),571=>array(-91,-36,751,765),572=>array(-55,-46,587,594),573=>array(-12,0,510,729),574=>array(-114,-36,728,765),575=>array(29,-240,525,560),576=>array(13,-240,550,547),577=>array(62,0,689,729),578=>array(50,0,523,560),579=>array(-31,0,626,729),580=>array(18,-14,724,729),581=>array(-60,0,628,729),582=>array(19,-93,613,822),583=>array(32,-93,574,640),584=>array(-149,-200,332,729),585=>array(-115,-216,331,760),586=>array(60,-200,777,741),587=>array(58,-216,672,560),588=>array(-10,0,617,729),589=>array(-30,0,489,560),590=>array(26,0,725,729),591=>array(9,-216,637,547),592=>array(60,-14,594,560),593=>array(40,-14,617,560),594=>array(-8,-14,569,560),595=>array(10,-14,586,760),596=>array(-7,-14,483,560),597=>array(43,-69,523,560),598=>array(40,-216,655,760),599=>array(22,-14,789,760),600=>array(20,-14,567,560),601=>array(38,-14,567,560),602=>array(34,-14,801,560),603=>array(24,-14,468,560),604=>array(-45,-11,458,560),605=>array(-45,-11,709,560),606=>array(48,-14,611,560),607=>array(-97,-216,349,547),608=>array(21,-216,806,760),609=>array(40,-216,636,547),610=>array(39,-14,516,546),611=>array(78,-211,624,547),612=>array(72,-21,606,547),613=>array(79,-214,633,546),614=>array(9,0,563,760),615=>array(28,-216,581,760),616=>array(46,0,403,760),617=>array(66,-1,293,547),618=>array(27,0,463,547),619=>array(63,0,439,760),620=>array(83,0,552,760),621=>array(29,-216,321,760),622=>array(28,-215,709,760),623=>array(62,-14,912,546),624=>array(79,-209,929,546),625=>array(44,-216,895,560),626=>array(-145,-216,599,560),627=>array(45,-216,674,560),628=>array(-29,0,552,547),629=>array(32,-14,586,560),630=>array(39,-1,784,547),631=>array(-8,0,522,574),632=>array(53,-208,656,760),633=>array(27,-13,490,547),634=>array(9,-13,509,760),635=>array(45,-216,546,547),636=>array(8,-208,507,560),637=>array(46,-216,508,560),638=>array(27,0,525,547),639=>array(89,0,449,547),640=>array(-29,0,458,547),641=>array(-29,0,552,547),642=>array(25,-216,523,560),643=>array(-114,-216,467,760),644=>array(-96,-216,485,760),645=>array(123,-216,438,560),646=>array(-87,-217,590,760),647=>array(-22,-155,397,547),648=>array(43,-216,463,702),649=>array(66,-14,760,547),650=>array(20,-51,621,547),651=>array(66,-1,563,547),652=>array(-35,0,526,547),653=>array(-17,0,752,547),654=>array(-56,0,558,763),655=>array(48,0,583,547),656=>array(11,-216,586,547),657=>array(-1,-69,539,547),658=>array(-21,-215,548,547),659=>array(22,-215,548,547),660=>array(53,0,492,759),661=>array(51,0,533,759),662=>array(-28,0,454,759),663=>array(-4,-208,551,759),664=>array(44,-14,720,742),665=>array(27,0,534,547),666=>array(27,-14,598,560),667=>array(20,0,691,760),668=>array(25,0,592,547),669=>array(-212,-217,318,760),670=>array(65,-213,682,547),671=>array(27,0,426,547),672=>array(40,-208,806,760),673=>array(-3,0,492,759),674=>array(51,0,533,759),675=>array(22,-14,1028,760),676=>array(40,-215,1045,760),677=>array(26,-55,1030,760),678=>array(24,0,833,702),679=>array(38,-216,785,760),680=>array(30,-69,831,702),681=>array(43,-216,892,760),682=>array(9,0,727,760),683=>array(9,0,688,760),684=>array(18,0,568,641),685=>array(-28,86,359,641),686=>array(-16,-214,614,760),687=>array(-15,-216,652,760),688=>array(11,326,361,751),689=>array(11,326,360,751),690=>array(-67,205,197,751),691=>array(21,326,310,640),692=>array(21,319,310,632),693=>array(31,205,353,632),694=>array(-15,326,349,632),695=>array(47,326,539,632),696=>array(20,205,403,632),697=>array(70,557,196,800),698=>array(70,557,394,800),699=>array(101,418,351,729),700=>array(65,418,313,729),701=>array(178,616,312,856),702=>array(151,481,301,760),703=>array(143,481,293,760),704=>array(39,326,313,751),705=>array(31,326,336,751),706=>array(166,517,417,843),707=>array(145,517,396,843),708=>array(113,561,407,800),709=>array(155,561,449,800),710=>array(95,616,435,800),711=>array(136,616,475,800),712=>array(72,488,203,759),713=>array(139,668,433,760),714=>array(204,616,485,800),715=>array(118,616,334,800),716=>array(72,-81,203,190),717=>array(-10,-185,284,-93),718=>array(118,-238,334,-54),719=>array(204,-238,485,-54),720=>array(-7,0,269,547),721=>array(57,361,237,547),722=>array(114,269,264,547),723=>array(106,269,256,547),724=>array(104,238,318,458),725=>array(130,238,344,458),726=>array(41,119,333,427),727=>array(41,229,254,317),728=>array(149,639,447,784),729=>array(215,654,357,774),730=>array(166,605,416,883),731=>array(66,-196,256,0),732=>array(119,638,450,778),733=>array(128,616,507,800),734=>array(-11,213,312,524),735=>array(146,616,427,800),736=>array(32,213,412,637),737=>array(11,326,187,751),738=>array(10,318,320,640),739=>array(-18,326,384,632),740=>array(31,326,336,751),741=>array(131,0,424,693),742=>array(105,0,424,693),743=>array(79,0,424,693),744=>array(52,0,424,693),745=>array(26,0,424,693),748=>array(13,-260,307,-21),749=>array(128,605,443,822),750=>array(66,418,551,729),755=>array(82,-240,333,38),759=>array(79,-221,410,-109),768=>array(-233,616,-17,800),769=>array(-145,616,137,800),770=>array(-259,616,81,800),771=>array(-232,638,99,778),772=>array(-212,668,82,760),773=>array(-312,663,157,755),774=>array(-199,639,98,784),775=>array(-166,617,17,760),776=>array(-215,654,84,774),777=>array(-326,616,-105,843),778=>array(-180,605,70,883),779=>array(-220,616,158,800),780=>array(-213,616,127,800),781=>array(-118,615,4,832),782=>array(-201,615,87,832),783=>array(-251,616,63,800),784=>array(-199,642,98,882),785=>array(-226,639,72,784),786=>array(-238,418,-30,563),787=>array(-282,595,-117,844),788=>array(-259,595,-117,844),789=>array(-92,616,92,800),790=>array(-426,-276,-210,-93),791=>array(-365,-276,-84,-93),792=>array(-350,-240,-169,-6),793=>array(-286,-240,-106,-6),794=>array(-194,658,66,929),795=>array(-119,361,75,570),796=>array(-298,-240,-174,-11),797=>array(-363,-240,-103,-59),798=>array(-351,-240,-90,-59),799=>array(-341,-240,-115,-6),800=>array(-267,-202,-6,-110),801=>array(-463,-216,-95,117),802=>array(-279,-216,11,117),803=>array(-371,-212,-228,-92),804=>array(-398,-212,-99,-92),805=>array(-330,-240,-123,-11),806=>array(-353,-236,-145,-91),807=>array(-431,-196,-217,0),808=>array(-384,-196,-194,0),809=>array(-327,-310,-206,-93),810=>array(-380,-237,-71,-54),811=>array(-429,-239,-67,-94),812=>array(-373,-240,-33,-57),813=>array(-413,-240,-73,-57),814=>array(-382,-239,-84,-94),815=>array(-442,-240,-145,-95),816=>array(-433,-234,-102,-94),817=>array(-396,-185,-102,-93),818=>array(-509,-236,-25,-143),819=>array(-512,-236,-4,-9),820=>array(-563,212,1,415),821=>array(-433,214,-76,309),822=>array(-762,214,-69,309),823=>array(-638,-46,4,594),824=>array(-803,-36,39,765),825=>array(-277,-240,-153,-11),826=>array(-380,-238,-71,-55),827=>array(-320,-241,-67,-6),828=>array(-452,-239,-89,-94),829=>array(-353,562,-99,819),830=>array(-263,595,-91,867),831=>array(-459,528,9,755),832=>array(-233,616,-17,800),833=>array(-145,616,137,800),834=>array(-232,638,99,778),835=>array(-282,595,-117,844),836=>array(-310,654,84,978),837=>array(-328,-208,-219,-45),838=>array(-376,639,-74,786),839=>array(-341,-226,-109,-35),840=>array(-358,-240,-92,-47),841=>array(-327,-240,-100,-21),842=>array(-390,616,-61,800),843=>array(-391,567,-60,850),844=>array(-394,573,-28,835),845=>array(-413,-230,-37,-30),846=>array(-334,-240,-127,-45),849=>array(-289,610,-137,888),850=>array(-226,604,72,882),851=>array(-340,-240,-111,-9),855=>array(-313,610,-161,888),856=>array(0,654,143,774),858=>array(-400,-240,-52,-11),860=>array(-424,-237,378,-79),861=>array(-250,802,552,960),862=>array(-262,797,557,889),863=>array(-434,-185,385,-93),864=>array(-262,756,414,894),865=>array(-250,769,552,927),866=>array(-480,-230,338,-30),880=>array(19,0,561,729),881=>array(27,0,444,547),882=>array(79,0,901,729),883=>array(79,0,734,729),884=>array(70,557,196,800),885=>array(49,-208,217,35),886=>array(19,0,734,729),887=>array(27,0,603,547),890=>array(119,-208,228,-45),891=>array(-7,-14,483,560),892=>array(33,-14,523,560),893=>array(-7,-14,483,560),894=>array(-32,-142,291,547),900=>array(194,616,475,800),901=>array(136,654,531,978),902=>array(-38,0,643,800),903=>array(75,253,268,442),904=>array(21,0,748,800),905=>array(26,0,888,800),906=>array(23,0,469,800),908=>array(25,-14,766,800),910=>array(18,0,960,800),911=>array(-1,0,770,800),912=>array(44,-19,465,978),913=>array(-59,0,622,729),914=>array(19,0,629,729),915=>array(19,0,613,729),916=>array(-60,0,628,729),917=>array(19,0,603,729),918=>array(-23,0,667,729),919=>array(19,0,734,729),920=>array(35,-14,729,742),921=>array(19,0,316,729),922=>array(19,0,753,729),923=>array(-60,0,628,729),924=>array(19,0,877,729),925=>array(19,0,734,729),926=>array(24,0,557,729),927=>array(32,-14,733,742),928=>array(19,0,734,729),929=>array(19,0,647,729),931=>array(19,0,603,729),932=>array(43,0,673,729),933=>array(57,0,729,729),934=>array(39,0,726,729),935=>array(-46,0,731,729),936=>array(70,0,779,729),937=>array(-41,0,730,742),938=>array(19,0,405,927),939=>array(57,0,729,927),940=>array(34,-12,623,800),941=>array(24,-14,510,800),942=>array(44,-208,598,800),943=>array(38,-19,392,800),944=>array(48,-10,594,978),945=>array(34,-12,623,559),946=>array(-10,-208,594,773),947=>array(60,-208,666,547),948=>array(14,-14,571,768),949=>array(24,-14,468,560),950=>array(28,-208,565,760),951=>array(44,-208,598,560),952=>array(25,-11,593,768),953=>array(38,-19,282,547),954=>array(27,0,611,547),955=>array(-40,0,477,760),956=>array(-24,-209,603,547),957=>array(62,0,588,547),958=>array(23,-208,565,760),959=>array(32,-14,586,560),960=>array(65,-19,708,547),961=>array(8,-208,629,562),962=>array(49,-208,536,560),963=>array(33,-14,703,547),964=>array(46,-19,601,547),965=>array(48,-10,580,547),966=>array(68,-208,677,552),967=>array(-43,-208,624,547),968=>array(71,-208,718,547),969=>array(30,-13,751,547),970=>array(44,-19,366,774),971=>array(48,-10,580,774),972=>array(32,-14,586,800),973=>array(48,-10,580,800),974=>array(30,-13,751,800),975=>array(37,-208,774,729),976=>array(49,-11,541,768),977=>array(41,-11,551,768),978=>array(57,0,677,729),979=>array(21,0,890,800),980=>array(57,0,677,927),981=>array(53,-208,656,760),982=>array(30,-13,808,547),983=>array(34,-188,668,547),984=>array(62,-208,737,742),985=>array(56,-208,597,560),986=>array(63,-208,692,729),987=>array(57,-208,553,547),988=>array(19,0,603,729),989=>array(-132,-208,473,760),990=>array(19,2,614,729),991=>array(61,0,527,759),992=>array(92,-208,743,742),993=>array(-13,-180,451,559),994=>array(29,-213,944,729),995=>array(72,-208,718,547),996=>array(33,-208,729,742),997=>array(31,-208,615,560),998=>array(18,-213,775,729),999=>array(-15,-14,663,575),1000=>array(-26,-208,649,745),1001=>array(-14,-208,564,560),1002=>array(-13,0,726,742),1003=>array(-6,0,606,560),1004=>array(23,-14,712,758),1005=>array(67,-14,665,758),1006=>array(21,-208,621,729),1007=>array(38,-208,553,726),1008=>array(17,-6,651,547),1009=>array(44,-216,622,560),1010=>array(33,-14,523,560),1011=>array(-115,-216,319,760),1012=>array(32,-14,733,742),1013=>array(61,-14,542,560),1014=>array(-23,-14,458,560),1015=>array(19,0,625,729),1016=>array(-9,-208,609,760),1017=>array(32,-14,652,742),1018=>array(19,0,876,729),1019=>array(0,-208,650,547),1020=>array(-28,-208,621,560),1021=>array(-12,-14,603,742),1022=>array(32,-14,652,742),1023=>array(-12,-14,603,742),1024=>array(19,0,603,927),1025=>array(19,0,603,927),1026=>array(61,-200,718,729),1027=>array(19,0,613,927),1028=>array(36,-14,660,742),1029=>array(13,-14,599,742),1030=>array(19,0,316,729),1031=>array(19,0,422,927),1032=>array(-149,-200,316,729),1033=>array(-22,0,973,729),1034=>array(19,0,935,729),1035=>array(43,0,701,729),1036=>array(19,0,772,927),1037=>array(19,0,734,927),1038=>array(69,0,731,927),1039=>array(32,-157,748,729),1040=>array(-59,0,622,729),1041=>array(19,0,643,729),1042=>array(19,0,629,729),1043=>array(19,0,613,729),1044=>array(-23,-157,732,729),1045=>array(19,0,603,729),1046=>array(-51,0,1124,729),1047=>array(-0,-14,602,742),1048=>array(19,0,734,729),1049=>array(19,0,734,927),1050=>array(19,0,772,729),1051=>array(-22,0,729,729),1052=>array(19,0,877,729),1053=>array(19,0,734,729),1054=>array(32,-14,733,742),1055=>array(19,0,734,729),1056=>array(19,0,647,729),1057=>array(32,-14,652,742),1058=>array(43,0,673,729),1059=>array(69,0,731,729),1060=>array(40,0,855,729),1061=>array(-46,0,731,729),1062=>array(32,-157,756,729),1063=>array(90,0,708,729),1064=>array(19,0,1093,729),1065=>array(32,-157,1114,729),1066=>array(83,0,782,729),1067=>array(19,0,914,729),1068=>array(19,0,604,729),1069=>array(0,-14,624,742),1070=>array(19,-14,1016,742),1071=>array(-6,0,674,729),1072=>array(15,-14,550,560),1073=>array(21,-14,576,792),1074=>array(27,0,534,547),1075=>array(25,0,495,547),1076=>array(-9,-138,663,547),1077=>array(32,-14,576,560),1078=>array(-35,0,914,547),1079=>array(-1,-14,481,560),1080=>array(27,0,603,547),1081=>array(27,0,603,765),1082=>array(27,0,628,547),1083=>array(1,0,632,547),1084=>array(25,0,706,547),1085=>array(25,0,592,547),1086=>array(32,-14,586,560),1087=>array(25,0,592,547),1088=>array(-9,-208,609,560),1089=>array(33,-14,523,560),1090=>array(30,0,563,547),1091=>array(0,-216,619,547),1092=>array(42,-208,851,760),1093=>array(-37,0,604,547),1094=>array(40,-138,614,547),1095=>array(72,0,564,547),1096=>array(27,0,923,547),1097=>array(40,-138,942,547),1098=>array(46,0,626,547),1099=>array(27,0,790,547),1100=>array(27,0,515,547),1101=>array(15,-14,501,560),1102=>array(27,-14,842,560),1103=>array(-21,0,552,547),1104=>array(32,-14,576,803),1105=>array(32,-14,576,774),1106=>array(46,-216,584,760),1107=>array(25,0,544,803),1108=>array(32,-14,519,560),1109=>array(9,-14,504,560),1110=>array(27,0,319,760),1111=>array(27,0,365,774),1112=>array(-115,-216,319,760),1113=>array(-9,0,834,547),1114=>array(27,0,807,547),1115=>array(28,0,560,760),1116=>array(27,0,628,803),1117=>array(27,0,603,803),1118=>array(0,-216,619,765),1119=>array(40,-138,606,547),1120=>array(29,-14,943,729),1121=>array(30,-13,751,547),1122=>array(69,0,693,729),1123=>array(32,0,593,731),1124=>array(19,-14,910,742),1125=>array(27,-14,729,560),1126=>array(-57,0,822,729),1127=>array(-26,0,679,547),1128=>array(19,0,1152,729),1129=>array(27,0,940,547),1130=>array(-20,0,766,729),1131=>array(-12,0,615,547),1132=>array(18,0,1069,729),1133=>array(25,0,903,547),1134=>array(-22,-208,576,938),1135=>array(-22,-193,473,756),1136=>array(66,0,1014,729),1137=>array(55,-208,990,759),1138=>array(32,-14,733,742),1139=>array(32,-14,586,560),1140=>array(67,0,807,742),1141=>array(53,0,659,560),1142=>array(67,0,807,930),1143=>array(53,0,659,800),1144=>array(51,-216,1067,742),1145=>array(56,-216,989,565),1146=>array(36,-14,930,742),1147=>array(31,-14,741,560),1148=>array(33,-14,1213,928),1149=>array(28,-13,1016,828),1150=>array(29,-14,943,910),1151=>array(30,-13,751,746),1152=>array(36,-208,659,742),1153=>array(30,-208,516,560),1154=>array(17,-33,478,488),1155=>array(-547,606,-70,822),1156=>array(-385,638,-10,784),1157=>array(-321,595,-191,785),1158=>array(-346,595,-191,785),1159=>array(-730,592,1,788),1160=>array(-960,-179,349,928),1161=>array(-876,-280,291,1022),1162=>array(19,-208,801,927),1163=>array(25,-208,673,765),1164=>array(19,0,604,729),1165=>array(24,0,494,702),1166=>array(19,0,646,729),1167=>array(-9,-208,604,560),1168=>array(19,0,639,878),1169=>array(25,0,521,700),1170=>array(15,0,638,729),1171=>array(9,0,515,547),1172=>array(19,-200,638,729),1173=>array(25,-216,499,547),1174=>array(-37,-157,1138,729),1175=>array(-22,-138,925,547),1176=>array(-0,-196,602,742),1177=>array(-1,-196,481,560),1178=>array(32,-157,786,729),1179=>array(40,-138,641,547),1180=>array(19,0,772,729),1181=>array(27,0,628,547),1182=>array(19,0,772,729),1183=>array(9,0,610,760),1184=>array(61,0,950,729),1185=>array(46,0,761,547),1186=>array(32,-157,813,729),1187=>array(40,-138,688,547),1188=>array(19,0,1032,729),1189=>array(25,0,808,547),1190=>array(19,-200,1057,729),1191=>array(25,-216,813,547),1192=>array(35,-14,788,743),1193=>array(35,-14,719,560),1194=>array(32,-196,652,742),1195=>array(33,-196,523,560),1196=>array(57,-157,687,729),1197=>array(44,-138,578,547),1198=>array(57,0,729,729),1199=>array(59,-216,619,547),1200=>array(55,0,725,729),1201=>array(57,-216,637,547),1202=>array(-33,-157,745,729),1203=>array(-22,-138,618,547),1204=>array(57,-157,954,729),1205=>array(44,-138,861,547),1206=>array(116,-157,789,729),1207=>array(92,-138,657,547),1208=>array(102,0,708,729),1209=>array(79,0,562,547),1210=>array(95,0,714,729),1211=>array(27,0,589,760),1212=>array(38,-14,886,742),1213=>array(26,-14,692,560),1214=>array(38,-184,886,742),1215=>array(26,-161,692,560),1216=>array(19,0,316,729),1217=>array(-51,0,1124,927),1218=>array(-35,0,914,784),1219=>array(19,-200,756,729),1220=>array(27,-216,611,547),1221=>array(-42,-208,796,729),1222=>array(-34,-208,672,547),1223=>array(19,-200,734,729),1224=>array(25,-216,592,547),1225=>array(19,-208,800,729),1226=>array(25,-208,673,547),1227=>array(116,-157,722,729),1228=>array(92,-138,576,547),1229=>array(19,-208,943,729),1230=>array(25,-208,787,547),1231=>array(27,0,319,760),1232=>array(-59,0,622,936),1233=>array(15,-14,550,772),1234=>array(-59,0,622,927),1235=>array(15,-14,550,774),1236=>array(-70,0,965,729),1237=>array(15,-14,907,560),1238=>array(19,0,603,927),1239=>array(32,-14,576,784),1240=>array(32,-14,737,742),1241=>array(38,-14,567,560),1242=>array(32,-14,737,927),1243=>array(38,-14,567,774),1244=>array(-51,0,1124,927),1245=>array(-35,0,914,774),1246=>array(-0,-14,602,927),1247=>array(-1,-14,486,774),1248=>array(18,-33,669,729),1249=>array(-21,-215,548,547),1250=>array(19,0,734,914),1251=>array(27,0,603,763),1252=>array(19,0,734,927),1253=>array(27,0,603,774),1254=>array(32,-14,733,927),1255=>array(32,-14,586,774),1256=>array(32,-14,733,742),1257=>array(32,-14,586,560),1258=>array(32,-14,733,927),1259=>array(32,-14,586,774),1260=>array(0,-14,624,927),1261=>array(15,-14,501,774),1262=>array(69,0,731,914),1263=>array(0,-216,619,763),1264=>array(69,0,731,927),1265=>array(0,-216,619,774),1266=>array(69,0,731,927),1267=>array(0,-216,619,800),1268=>array(90,0,708,927),1269=>array(72,0,564,774),1270=>array(32,-157,626,729),1271=>array(40,-138,509,547),1272=>array(19,0,914,927),1273=>array(27,0,790,774),1274=>array(34,-216,657,729),1275=>array(28,-217,534,547),1276=>array(-29,-200,749,729),1277=>array(-16,-216,625,547),1278=>array(-47,0,731,729),1279=>array(-35,0,606,547),1280=>array(33,0,667,729),1281=>array(15,0,518,547),1282=>array(31,-14,1005,729),1283=>array(14,-14,781,547),1284=>array(124,-14,957,742),1285=>array(94,-14,769,560),1286=>array(124,-208,684,742),1287=>array(94,-208,571,560),1288=>array(-43,-14,1067,729),1289=>array(-34,-14,855,547),1290=>array(20,-14,1100,729),1291=>array(25,-14,861,547),1292=>array(36,-14,705,742),1293=>array(31,-14,516,546),1294=>array(42,-14,793,729),1295=>array(30,-14,654,547),1296=>array(33,-14,587,742),1297=>array(24,-14,468,560),1298=>array(-5,-200,747,729),1299=>array(21,-216,650,547),1300=>array(-22,0,1194,729),1301=>array(1,0,987,547),1302=>array(19,0,996,729),1303=>array(-9,-208,907,560),1304=>array(-6,0,962,729),1305=>array(-21,-14,869,560),1306=>array(32,-146,733,742),1307=>array(32,-208,614,560),1308=>array(96,0,1029,729),1309=>array(78,0,834,547),1310=>array(19,0,772,729),1311=>array(27,0,628,547),1312=>array(-22,-200,1051,729),1313=>array(1,-216,852,547),1314=>array(19,-200,1056,729),1315=>array(25,-216,813,547),1316=>array(32,-157,814,729),1317=>array(40,-138,688,547),1329=>array(67,-38,765,729),1330=>array(19,0,667,743),1331=>array(45,0,725,743),1332=>array(33,0,729,743),1333=>array(70,-14,687,729),1334=>array(16,0,678,743),1335=>array(19,0,657,729),1336=>array(19,0,667,743),1337=>array(19,-13,918,742),1338=>array(10,-14,760,729),1339=>array(19,0,634,729),1340=>array(19,0,510,729),1341=>array(19,-14,919,729),1342=>array(83,-12,778,741),1343=>array(87,0,671,729),1344=>array(-15,-46,625,729),1345=>array(29,-48,678,743),1346=>array(28,0,673,743),1347=>array(-20,0,660,735),1348=>array(70,-14,844,729),1349=>array(37,-14,638,743),1350=>array(42,-14,687,729),1351=>array(44,-14,686,729),1352=>array(19,0,661,743),1353=>array(45,-48,652,743),1354=>array(28,0,801,743),1355=>array(6,0,668,743),1356=>array(19,0,777,743),1357=>array(61,-14,712,729),1358=>array(31,0,673,729),1359=>array(33,-14,632,743),1360=>array(19,0,667,743),1361=>array(37,-14,638,743),1362=>array(19,0,599,729),1363=>array(21,0,811,729),1364=>array(-44,0,667,743),1365=>array(32,-14,732,742),1366=>array(27,-14,818,729),1369=>array(143,481,293,760),1370=>array(66,418,314,729),1371=>array(108,616,450,800),1372=>array(104,595,531,893),1373=>array(-1,616,284,849),1374=>array(105,586,587,878),1375=>array(147,618,560,893),1377=>array(66,-13,917,547),1378=>array(-9,-208,589,560),1379=>array(39,-208,673,559),1380=>array(27,-208,677,560),1381=>array(53,-14,615,760),1382=>array(34,-208,637,559),1383=>array(27,0,580,760),1384=>array(-9,-208,588,560),1385=>array(-9,-208,759,560),1386=>array(39,-14,747,760),1387=>array(-9,-208,582,760),1388=>array(-9,-208,347,547),1389=>array(-9,-208,957,760),1390=>array(35,-14,647,760),1391=>array(61,-208,615,760),1392=>array(27,0,582,760),1393=>array(9,-13,534,760),1394=>array(27,-208,641,560),1395=>array(47,-13,656,768),1396=>array(61,-13,784,760),1397=>array(-115,-216,282,547),1398=>array(2,-13,615,760),1399=>array(-54,-208,468,560),1400=>array(27,0,582,560),1401=>array(-61,-208,330,547),1402=>array(53,-208,911,547),1403=>array(-23,-208,545,560),1404=>array(27,0,598,560),1405=>array(61,-13,615,547),1406=>array(61,-208,652,760),1407=>array(56,-13,877,560),1408=>array(-9,-208,582,560),1409=>array(17,-216,613,559),1410=>array(27,0,448,547),1411=>array(56,-208,877,760),1412=>array(-136,-208,604,560),1413=>array(33,-14,587,560),1414=>array(27,-190,779,760),1415=>array(60,-14,782,760),1417=>array(37,0,291,547),1418=>array(86,179,387,359),1456=>array(247,-229,374,-10),1457=>array(135,-229,471,-10),1458=>array(126,-229,462,-10),1459=>array(115,-229,462,-10),1460=>array(258,-171,363,-73),1461=>array(192,-171,429,-73),1462=>array(214,-229,429,-10),1463=>array(81,-171,406,0),1464=>array(99,-217,402,0),1465=>array(-31,625,75,723),1466=>array(-31,625,75,723),1467=>array(171,-239,472,-5),1468=>array(264,225,370,322),1469=>array(250,-217,372,-22),1470=>array(36,413,337,555),1471=>array(119,547,422,710),1472=>array(23,-98,311,645),1473=>array(735,613,840,710),1474=>array(183,613,289,710),1475=>array(40,0,294,547),1478=>array(22,0,441,547),1479=>array(170,-229,473,-10),1488=>array(94,0,657,547),1489=>array(39,0,531,547),1490=>array(40,-9,385,547),1491=>array(114,0,586,547),1492=>array(90,0,595,547),1493=>array(82,0,323,547),1494=>array(84,0,417,547),1495=>array(82,0,588,547),1496=>array(127,-13,608,553),1497=>array(88,164,301,547),1498=>array(114,-240,494,547),1499=>array(39,0,513,547),1500=>array(114,0,570,711),1501=>array(82,0,597,547),1502=>array(76,0,621,554),1503=>array(40,-240,323,547),1504=>array(39,0,387,547),1505=>array(130,-13,610,547),1506=>array(32,-101,614,547),1507=>array(142,-240,577,547),1508=>array(82,0,590,547),1509=>array(106,-240,584,548),1510=>array(48,0,604,547),1511=>array(46,-240,690,546),1512=>array(114,0,517,547),1513=>array(80,0,771,547),1514=>array(10,-4,585,547),1520=>array(82,0,612,547),1521=>array(88,0,612,547),1522=>array(88,164,589,547),1523=>array(59,361,340,547),1524=>array(59,361,580,547),3647=>array(2,-147,578,760),3713=>array(13,-14,677,560),3714=>array(10,-14,654,560),3716=>array(12,-14,629,558),3719=>array(2,-241,493,593),3720=>array(40,0,641,561),3722=>array(40,-269,672,584),3725=>array(13,-24,690,610),3732=>array(16,-14,604,593),3733=>array(15,-19,604,603),3734=>array(31,-240,656,593),3735=>array(-1,-14,706,560),3737=>array(-8,-33,662,593),3738=>array(12,-15,645,613),3739=>array(-1,-15,666,760),3740=>array(26,-12,857,665),3741=>array(21,-14,753,760),3742=>array(45,-14,743,604),3743=>array(31,-14,764,760),3745=>array(-6,-14,744,547),3746=>array(-0,-23,710,760),3747=>array(16,-10,691,615),3749=>array(8,-33,646,593),3751=>array(4,-33,602,593),3754=>array(7,-21,774,724),3755=>array(29,-21,866,620),3757=>array(24,-20,620,606),3758=>array(13,-14,792,698),3759=>array(70,-259,839,648),3760=>array(4,27,614,606),3761=>array(-584,610,-26,896),3762=>array(45,0,520,593),3763=>array(-431,0,520,875),3764=>array(-590,622,-57,950),3765=>array(-590,633,-1,962),3766=>array(-590,622,-57,950),3767=>array(-590,633,-1,962),3768=>array(-372,-385,-148,-55),3769=>array(-431,-316,-135,-28),3771=>array(-591,610,-29,896),3772=>array(-620,-311,15,-48),3773=>array(-23,-220,682,776),3776=>array(47,-13,422,561),3777=>array(47,-13,759,561),3778=>array(22,-14,438,936),3779=>array(61,-14,576,879),3780=>array(42,-35,497,809),3782=>array(29,-240,658,582),3784=>array(-388,659,-251,844),3785=>array(-572,622,-17,918),3786=>array(-605,621,33,965),3787=>array(-478,612,-160,917),3788=>array(-460,603,175,866),3789=>array(-431,668,-206,875),3792=>array(59,-29,650,563),3793=>array(49,-139,659,586),3794=>array(1,-80,551,711),3795=>array(-44,-14,857,981),3796=>array(28,-156,583,711),3797=>array(28,-156,583,711),3798=>array(4,-14,866,950),3799=>array(32,-240,673,560),3800=>array(77,-269,690,582),3801=>array(34,-14,788,564),3804=>array(29,-21,1221,620),3805=>array(29,-21,1226,620),4256=>array(100,-14,836,819),4257=>array(125,-0,663,819),4258=>array(135,-138,605,828),4259=>array(87,-15,813,819),4260=>array(120,0,599,828),4261=>array(122,0,749,828),4262=>array(129,-14,677,819),4263=>array(105,-14,894,828),4264=>array(114,0,506,862),4265=>array(97,0,588,819),4266=>array(85,-14,751,820),4267=>array(80,-14,848,819),4268=>array(21,0,620,819),4269=>array(95,-157,798,829),4270=>array(126,-14,798,822),4271=>array(126,0,667,823),4272=>array(68,-15,872,820),4273=>array(75,-15,563,820),4274=>array(21,-0,616,828),4275=>array(96,-170,798,828),4276=>array(114,0,826,825),4277=>array(90,0,715,820),4278=>array(22,0,617,828),4279=>array(114,0,659,820),4280=>array(59,-14,663,820),4281=>array(21,0,569,819),4282=>array(102,-14,792,827),4283=>array(80,-15,833,820),4284=>array(21,-0,628,819),4285=>array(67,-15,584,828),4286=>array(21,-0,667,819),4287=>array(24,0,792,819),4288=>array(99,-14,811,820),4289=>array(21,0,583,820),4290=>array(70,-15,624,828),4291=>array(85,0,636,820),4292=>array(118,0,644,820),4293=>array(39,-14,750,828),4304=>array(68,-14,479,599),4305=>array(78,-14,497,823),4306=>array(28,-232,509,561),4307=>array(37,-225,744,557),4308=>array(23,-232,496,557),4309=>array(22,-232,506,557),4310=>array(67,-14,483,828),4311=>array(76,-14,739,557),4312=>array(67,0,501,557),4313=>array(22,-232,499,542),4314=>array(86,-225,969,562),4315=>array(78,-14,560,828),4316=>array(80,-14,566,819),4317=>array(83,-0,728,557),4318=>array(70,-14,531,818),4319=>array(22,-232,543,560),4320=>array(82,0,735,830),4321=>array(83,-14,504,818),4322=>array(56,-232,598,670),4323=>array(42,-232,532,604),4324=>array(84,-232,760,558),4325=>array(22,-232,585,818),4326=>array(79,-225,734,557),4327=>array(22,-232,542,549),4328=>array(57,-14,549,828),4329=>array(35,0,505,828),4330=>array(59,-232,551,548),4331=>array(77,-14,593,818),4332=>array(82,-15,617,828),4333=>array(31,-232,554,818),4334=>array(85,-14,498,818),4335=>array(-6,-232,488,580),4336=>array(66,-15,542,823),4337=>array(71,-14,549,823),4338=>array(15,-146,489,557),4339=>array(22,-232,543,558),4340=>array(23,-232,557,828),4341=>array(59,-14,591,828),4342=>array(79,-232,758,557),4343=>array(26,-232,496,557),4344=>array(22,-232,493,549),4345=>array(83,-232,564,561),4346=>array(62,-111,502,557),4347=>array(26,0,401,500),4348=>array(111,400,382,828),5121=>array(68,0,756,729),5122=>array(-60,0,628,1050),5123=>array(-60,0,628,729),5124=>array(-60,0,628,928),5125=>array(19,0,759,729),5126=>array(19,0,759,928),5127=>array(19,0,759,927),5129=>array(19,0,759,729),5130=>array(56,0,795,729),5131=>array(56,0,795,928),5132=>array(72,0,976,729),5133=>array(68,0,843,729),5134=>array(72,0,848,729),5135=>array(-60,0,843,729),5136=>array(72,0,848,928),5137=>array(-60,0,843,928),5138=>array(72,0,979,729),5139=>array(19,0,961,729),5140=>array(72,0,979,928),5141=>array(19,0,961,928),5142=>array(19,0,759,928),5143=>array(72,0,1015,729),5144=>array(56,0,963,729),5145=>array(72,0,1015,928),5146=>array(56,0,963,928),5147=>array(56,0,795,928),5149=>array(72,607,214,728),5150=>array(18,326,391,734),5151=>array(7,338,362,722),5152=>array(49,338,320,722),5153=>array(48,392,333,711),5154=>array(26,352,311,670),5155=>array(29,392,307,670),5156=>array(51,392,307,670),5157=>array(-2,327,497,749),5158=>array(18,326,409,734),5159=>array(72,304,214,424),5160=>array(47,494,312,569),5161=>array(47,392,312,670),5162=>array(67,392,331,693),5163=>array(68,0,1030,729),5164=>array(-60,0,826,729),5165=>array(19,0,1033,729),5166=>array(56,0,1105,729),5167=>array(68,0,756,729),5168=>array(-60,0,628,1050),5169=>array(-60,0,628,729),5170=>array(-60,0,628,928),5171=>array(2,0,742,729),5172=>array(2,0,742,928),5173=>array(2,0,742,927),5175=>array(2,0,742,729),5176=>array(46,0,786,729),5177=>array(46,0,786,928),5178=>array(72,0,976,729),5179=>array(68,0,843,729),5180=>array(72,0,848,729),5181=>array(-60,0,843,729),5182=>array(72,0,848,928),5183=>array(-60,0,843,928),5184=>array(72,0,962,729),5185=>array(2,0,961,729),5186=>array(72,0,962,928),5187=>array(2,0,961,928),5188=>array(72,0,1006,729),5189=>array(46,0,963,729),5190=>array(72,0,1006,928),5191=>array(46,0,963,928),5192=>array(46,0,786,927),5193=>array(43,326,503,727),5194=>array(18,326,191,734),5196=>array(71,-14,713,729),5197=>array(18,0,660,1050),5198=>array(18,0,660,743),5199=>array(18,0,660,928),5200=>array(2,0,687,729),5201=>array(2,0,687,928),5202=>array(2,0,687,927),5204=>array(2,0,687,729),5205=>array(47,0,732,729),5206=>array(47,0,732,928),5207=>array(72,-14,933,729),5208=>array(71,-14,878,729),5209=>array(72,0,879,743),5210=>array(18,0,878,743),5211=>array(72,0,879,928),5212=>array(18,0,878,928),5213=>array(72,0,907,729),5214=>array(2,0,884,729),5215=>array(72,0,907,928),5216=>array(2,0,884,928),5217=>array(72,0,952,729),5218=>array(47,0,882,729),5219=>array(72,0,952,928),5220=>array(47,0,882,928),5221=>array(46,0,952,729),5222=>array(53,326,420,733),5223=>array(71,-14,890,734),5224=>array(18,0,890,743),5225=>array(2,0,906,734),5226=>array(47,0,900,734),5227=>array(58,0,607,743),5228=>array(18,0,653,1050),5229=>array(18,0,653,743),5230=>array(18,0,653,928),5231=>array(16,-14,651,729),5232=>array(16,-14,658,928),5233=>array(16,-14,736,927),5234=>array(62,-14,611,729),5235=>array(62,-14,611,928),5236=>array(72,0,865,743),5237=>array(58,0,813,743),5238=>array(72,0,866,743),5239=>array(18,0,813,743),5240=>array(72,0,866,928),5241=>array(18,0,813,928),5242=>array(72,-14,909,729),5243=>array(16,-14,813,729),5244=>array(72,-14,915,928),5245=>array(16,-14,813,928),5246=>array(72,-14,824,729),5247=>array(62,-14,813,729),5248=>array(72,-14,824,928),5249=>array(62,-14,813,928),5250=>array(46,-14,824,729),5251=>array(42,319,389,734),5252=>array(39,319,437,734),5253=>array(58,0,829,743),5254=>array(18,0,829,743),5255=>array(16,-14,829,734),5256=>array(62,-14,829,734),5257=>array(58,0,607,743),5258=>array(18,0,653,1050),5259=>array(18,0,653,743),5260=>array(18,0,653,928),5261=>array(16,-14,651,729),5262=>array(16,-14,664,928),5263=>array(16,-14,742,927),5264=>array(62,-14,611,729),5265=>array(62,-14,611,928),5266=>array(72,0,865,743),5267=>array(58,0,813,743),5268=>array(72,0,910,743),5269=>array(18,0,813,743),5270=>array(72,0,910,928),5271=>array(18,0,813,928),5272=>array(72,-14,909,729),5273=>array(16,-14,813,729),5274=>array(72,-14,921,928),5275=>array(16,-14,813,928),5276=>array(72,-14,868,729),5277=>array(62,-14,813,729),5278=>array(72,-14,868,928),5279=>array(62,-14,813,928),5280=>array(46,-14,868,729),5281=>array(42,319,389,734),5282=>array(42,319,437,734),5283=>array(63,0,545,729),5284=>array(19,0,603,1050),5285=>array(19,0,603,729),5286=>array(19,0,603,928),5287=>array(-40,0,545,729),5288=>array(-40,0,559,928),5289=>array(-40,0,637,927),5290=>array(19,0,500,729),5291=>array(19,0,500,928),5292=>array(72,0,774,729),5293=>array(63,0,704,729),5294=>array(72,0,816,729),5295=>array(19,0,721,729),5296=>array(72,0,816,928),5297=>array(19,0,721,928),5298=>array(72,0,774,729),5299=>array(-40,0,721,729),5300=>array(72,0,788,928),5301=>array(-40,0,721,928),5302=>array(72,0,713,729),5303=>array(19,0,721,729),5304=>array(72,0,713,928),5305=>array(19,0,721,928),5306=>array(46,0,713,729),5307=>array(18,326,320,734),5308=>array(49,326,479,733),5309=>array(18,326,378,734),5312=>array(92,-14,852,468),5313=>array(36,-14,856,781),5314=>array(36,-14,856,468),5315=>array(36,-14,856,667),5316=>array(-18,0,802,482),5317=>array(-18,0,802,667),5318=>array(-18,0,802,667),5319=>array(37,0,796,482),5320=>array(37,0,796,667),5321=>array(72,-14,1077,468),5322=>array(92,-14,1058,468),5323=>array(72,0,1038,482),5324=>array(37,0,1041,482),5325=>array(72,0,1038,667),5326=>array(37,0,1041,667),5327=>array(37,0,796,667),5328=>array(54,477,534,742),5329=>array(39,319,433,734),5330=>array(31,477,546,742),5331=>array(92,0,851,468),5332=>array(35,0,854,781),5333=>array(35,0,854,468),5334=>array(35,0,854,667),5335=>array(-17,0,803,468),5336=>array(-17,0,803,667),5337=>array(-17,0,803,667),5338=>array(39,0,797,468),5339=>array(39,0,797,667),5340=>array(72,0,1069,468),5341=>array(92,0,1058,468),5342=>array(72,0,1121,468),5343=>array(35,0,1041,468),5344=>array(72,0,1121,667),5345=>array(35,0,1041,667),5346=>array(72,0,1070,468),5347=>array(-17,0,1028,468),5348=>array(72,0,1070,667),5349=>array(-17,0,1028,667),5350=>array(72,0,1063,468),5351=>array(39,0,1041,468),5352=>array(72,0,1063,667),5353=>array(39,0,1041,667),5354=>array(55,477,534,734),5356=>array(23,0,786,729),5357=>array(83,0,579,729),5358=>array(19,0,757,1050),5359=>array(19,0,684,729),5360=>array(19,0,696,928),5361=>array(-27,0,638,729),5362=>array(-27,0,646,928),5363=>array(-27,0,724,927),5364=>array(78,0,574,729),5365=>array(78,0,574,928),5366=>array(72,0,820,729),5367=>array(83,0,798,729),5368=>array(72,0,897,729),5369=>array(19,0,826,729),5370=>array(72,0,910,928),5371=>array(19,0,826,928),5372=>array(72,0,879,729),5373=>array(-27,0,798,729),5374=>array(72,0,887,928),5375=>array(-27,0,798,928),5376=>array(72,0,787,729),5377=>array(78,0,826,729),5378=>array(72,0,787,928),5379=>array(78,0,826,928),5380=>array(46,0,787,729),5381=>array(51,326,366,734),5382=>array(25,319,371,742),5383=>array(18,326,429,734),5392=>array(59,-14,772,743),5393=>array(6,-14,825,743),5394=>array(6,-14,825,928),5395=>array(30,-14,992,482),5396=>array(30,-14,992,667),5397=>array(32,-14,990,482),5398=>array(32,-14,990,667),5399=>array(72,-14,1029,743),5400=>array(59,-14,1017,743),5401=>array(72,-14,1082,743),5402=>array(6,-14,1017,743),5403=>array(72,-14,1082,928),5404=>array(6,-14,1017,928),5405=>array(72,-14,1258,482),5406=>array(30,-14,1213,482),5407=>array(72,-14,1258,667),5408=>array(30,-14,1213,667),5409=>array(72,-14,1256,482),5410=>array(32,-14,1213,482),5411=>array(72,-14,1256,667),5412=>array(32,-14,1213,667),5413=>array(52,469,624,747),5414=>array(56,0,620,729),5415=>array(19,0,627,1050),5416=>array(19,0,627,729),5417=>array(19,0,627,928),5418=>array(71,0,680,729),5419=>array(71,0,695,928),5420=>array(71,0,773,927),5421=>array(78,0,642,729),5422=>array(78,0,642,928),5423=>array(72,0,825,729),5424=>array(56,0,838,729),5425=>array(72,0,840,729),5426=>array(19,0,831,729),5427=>array(72,0,840,928),5428=>array(19,0,831,928),5429=>array(72,0,884,729),5430=>array(71,0,838,729),5431=>array(72,0,900,928),5432=>array(71,0,838,928),5433=>array(72,0,855,729),5434=>array(78,0,831,729),5435=>array(72,0,855,928),5436=>array(78,0,831,928),5437=>array(46,0,855,928),5438=>array(51,326,405,734),5440=>array(47,392,312,670),5441=>array(18,326,438,734),5442=>array(82,-14,896,468),5443=>array(92,-14,889,468),5444=>array(-18,0,796,482),5445=>array(40,0,837,781),5446=>array(40,0,837,482),5447=>array(40,0,837,667),5448=>array(19,0,645,729),5449=>array(19,0,645,928),5450=>array(19,0,601,729),5451=>array(59,0,641,729),5452=>array(59,0,641,928),5453=>array(15,0,641,729),5454=>array(72,0,884,928),5455=>array(59,0,798,928),5456=>array(66,326,430,727),5458=>array(2,0,764,729),5459=>array(88,0,755,743),5460=>array(2,-14,630,1050),5461=>array(2,-14,630,729),5462=>array(2,-14,630,928),5463=>array(45,0,786,663),5464=>array(45,0,786,928),5465=>array(62,0,807,663),5466=>array(62,0,807,928),5467=>array(72,0,1026,928),5468=>array(62,0,963,928),5469=>array(46,311,512,675),5470=>array(61,-14,712,743),5471=>array(61,-14,695,743),5472=>array(36,-14,670,743),5473=>array(19,-14,670,743),5474=>array(36,-14,670,928),5475=>array(19,-14,670,928),5476=>array(2,0,692,729),5477=>array(2,0,692,928),5478=>array(42,0,730,729),5479=>array(42,0,730,928),5480=>array(72,0,950,928),5481=>array(42,0,882,928),5482=>array(49,326,486,733),5492=>array(52,0,784,743),5493=>array(56,0,870,743),5494=>array(56,0,870,928),5495=>array(10,-14,824,729),5496=>array(10,-14,824,928),5497=>array(95,-14,828,729),5498=>array(95,-14,828,928),5499=>array(62,319,497,734),5500=>array(19,0,734,729),5501=>array(18,326,438,734),5502=>array(66,0,1099,1050),5503=>array(66,0,1099,743),5504=>array(66,0,1099,928),5505=>array(66,-14,1097,729),5506=>array(66,-14,1103,928),5507=>array(66,-14,1056,729),5508=>array(66,-14,1056,928),5509=>array(66,319,834,734),5514=>array(58,0,784,743),5515=>array(55,0,869,743),5516=>array(10,-14,824,729),5517=>array(95,-14,822,729),5518=>array(69,0,1416,1050),5519=>array(69,0,1416,743),5520=>array(69,0,1416,928),5521=>array(69,-14,1148,741),5522=>array(69,-14,1160,928),5523=>array(69,-14,1374,741),5524=>array(69,-14,1374,928),5525=>array(69,335,716,741),5526=>array(69,335,1099,741),5536=>array(14,0,846,709),5537=>array(14,0,846,709),5538=>array(-8,-242,824,468),5539=>array(-8,-242,824,667),5540=>array(60,-242,819,468),5541=>array(60,-242,819,667),5542=>array(66,344,546,734),5543=>array(56,0,665,729),5544=>array(-44,0,627,729),5545=>array(-44,0,627,928),5546=>array(71,0,742,729),5547=>array(71,0,742,928),5548=>array(33,0,643,729),5549=>array(33,0,643,928),5550=>array(32,326,405,734),5551=>array(20,-14,617,729),5598=>array(19,0,704,729),5601=>array(43,0,729,729),5702=>array(18,326,425,734),5703=>array(18,240,425,820),5742=>array(-18,0,384,306),5743=>array(66,0,1053,743),5744=>array(69,0,1371,743),5745=>array(69,0,1799,743),5746=>array(69,0,1799,928),5747=>array(69,-14,1531,741),5748=>array(69,-14,1505,928),5749=>array(69,-14,1757,741),5750=>array(69,-14,1757,928),7424=>array(-35,0,526,547),7425=>array(-48,0,721,547),7426=>array(38,-14,919,560),7427=>array(-8,0,509,547),7428=>array(33,-14,523,560),7429=>array(27,-1,553,547),7430=>array(10,-1,550,547),7431=>array(35,0,474,547),7432=>array(24,-14,465,560),7433=>array(9,-213,299,547),7434=>array(-4,-14,424,547),7435=>array(27,0,645,547),7436=>array(-23,0,426,547),7437=>array(25,0,706,547),7438=>array(27,0,603,547),7439=>array(32,-14,586,560),7440=>array(-7,-14,483,560),7441=>array(38,-27,556,573),7442=>array(18,31,543,515),7443=>array(40,-28,557,579),7444=>array(38,-14,941,560),7446=>array(13,273,555,560),7447=>array(65,-14,606,273),7448=>array(-2,0,480,547),7449=>array(-29,0,552,547),7450=>array(64,0,552,547),7451=>array(30,0,563,547),7452=>array(67,-14,596,547),7453=>array(28,10,617,560),7454=>array(35,11,807,561),7455=>array(-53,-238,644,560),7456=>array(57,0,611,547),7457=>array(78,0,834,547),7458=>array(-8,0,527,547),7459=>array(17,-14,530,547),7462=>array(27,0,497,547),7463=>array(-35,0,526,547),7464=>array(27,0,594,547),7465=>array(-2,0,480,547),7466=>array(88,0,676,547),7467=>array(1,0,632,547),7468=>array(-33,326,400,734),7469=>array(-36,326,604,734),7470=>array(16,326,392,734),7472=>array(16,326,441,734),7473=>array(16,326,375,734),7474=>array(16,326,382,734),7475=>array(28,318,440,742),7476=>array(16,326,458,734),7477=>array(16,326,194,734),7478=>array(-78,214,205,734),7479=>array(16,326,472,734),7480=>array(16,326,324,734),7481=>array(16,326,548,734),7482=>array(16,326,458,734),7483=>array(16,326,458,734),7484=>array(28,318,454,742),7485=>array(19,318,432,742),7486=>array(16,326,405,734),7487=>array(16,326,390,734),7488=>array(24,326,419,734),7489=>array(45,318,445,734),7490=>array(52,326,644,734),7491=>array(33,318,370,640),7492=>array(43,318,374,640),7493=>array(48,318,411,640),7494=>array(48,318,603,640),7495=>array(18,318,384,751),7496=>array(43,318,433,751),7497=>array(44,318,387,640),7498=>array(48,318,381,640),7499=>array(35,318,312,640),7500=>array(33,318,311,640),7501=>array(34,205,409,639),7502=>array(6,207,189,632),7503=>array(18,326,406,751),7504=>array(18,326,559,640),7505=>array(29,205,382,640),7506=>array(44,318,393,640),7507=>array(20,318,322,640),7508=>array(97,479,439,640),7509=>array(97,318,439,479),7510=>array(-5,209,384,640),7511=>array(64,326,329,719),7512=>array(38,318,390,632),7513=>array(49,332,420,640),7514=>array(42,318,578,632),7515=>array(75,326,424,632),7517=>array(-0,209,373,759),7518=>array(35,209,415,632),7519=>array(14,318,355,756),7520=>array(46,209,421,635),7521=>array(-22,209,389,632),7522=>array(10,0,185,425),7523=>array(21,0,310,313),7524=>array(38,-8,390,306),7525=>array(75,0,424,306),7526=>array(-0,-117,373,433),7527=>array(35,-117,415,306),7528=>array(-0,-117,384,314),7529=>array(46,-117,421,309),7530=>array(-22,-117,389,306),7543=>array(10,-216,606,559),7544=>array(16,326,458,734),7547=>array(27,0,463,547),7549=>array(-9,-208,678,560),7557=>array(75,-216,413,760),7579=>array(21,318,381,640),7580=>array(48,318,347,640),7581=>array(50,288,350,640),7582=>array(38,318,389,751),7583=>array(22,318,303,640),7584=>array(52,326,326,751),7585=>array(10,205,259,632),7586=>array(51,205,418,632),7587=>array(52,207,397,632),7588=>array(31,326,255,751),7589=>array(43,326,188,632),7590=>array(21,326,289,632),7591=>array(21,326,289,632),7592=>array(15,205,339,751),7593=>array(21,205,207,751),7594=>array(21,205,232,751),7595=>array(21,326,271,632),7596=>array(31,205,563,640),7597=>array(52,209,584,632),7598=>array(10,205,471,640),7599=>array(31,205,428,640),7600=>array(21,326,380,632),7601=>array(48,318,389,640),7602=>array(47,209,437,751),7603=>array(37,205,344,640),7604=>array(0,205,354,751),7605=>array(65,205,329,719),7606=>array(42,318,479,632),7607=>array(48,298,424,632),7608=>array(42,318,372,632),7609=>array(43,326,356,632),7610=>array(21,326,374,632),7611=>array(21,326,352,632),7612=>array(31,205,396,632),7613=>array(24,288,363,632),7614=>array(14,206,364,632),7615=>array(48,320,333,756),7620=>array(-435,616,-17,800),7621=>array(-406,616,-31,800),7622=>array(-421,616,-45,800),7623=>array(-435,616,-17,800),7624=>array(-446,616,-6,800),7625=>array(-479,616,26,800),7680=>array(-59,-240,622,729),7681=>array(15,-240,550,560),7682=>array(19,0,629,927),7683=>array(27,-14,609,941),7684=>array(19,-212,629,729),7685=>array(27,-212,609,760),7686=>array(19,-185,629,729),7687=>array(27,-185,609,760),7688=>array(32,-196,652,927),7689=>array(33,-196,523,800),7690=>array(19,0,708,927),7691=>array(32,-14,682,941),7692=>array(19,-212,708,729),7693=>array(32,-212,652,760),7694=>array(19,-185,708,729),7695=>array(32,-185,652,760),7696=>array(19,-194,708,729),7697=>array(30,-196,652,760),7698=>array(19,-240,708,729),7699=>array(32,-240,652,760),7700=>array(19,0,603,1057),7701=>array(32,-14,576,898),7702=>array(19,0,603,1057),7703=>array(32,-14,576,900),7704=>array(40,-203,624,729),7705=>array(32,-203,576,560),7706=>array(19,-221,603,729),7707=>array(32,-221,576,560),7708=>array(19,-196,603,927),7709=>array(32,-196,576,783),7710=>array(19,0,603,928),7711=>array(44,0,486,941),7712=>array(32,-14,700,899),7713=>array(18,-216,614,760),7714=>array(19,0,734,928),7715=>array(27,0,589,941),7716=>array(19,-212,734,729),7717=>array(27,-212,589,760),7718=>array(19,0,734,927),7719=>array(27,0,589,927),7720=>array(-55,-196,734,729),7721=>array(-40,-196,589,760),7722=>array(19,-239,734,729),7723=>array(27,-239,589,760),7724=>array(-97,-221,316,729),7725=>array(-97,-221,319,760),7726=>array(19,0,460,1057),7727=>array(27,0,430,903),7728=>array(19,0,753,927),7729=>array(27,0,645,982),7730=>array(19,-212,753,729),7731=>array(27,-212,645,760),7732=>array(19,-185,753,729),7733=>array(27,-185,645,760),7734=>array(19,-212,510,729),7735=>array(9,-212,319,760),7736=>array(19,-212,510,942),7737=>array(9,-212,405,914),7738=>array(19,-185,510,729),7739=>array(-62,-185,319,760),7740=>array(19,-240,510,729),7741=>array(-102,-240,319,760),7742=>array(19,0,877,927),7743=>array(27,0,886,800),7744=>array(19,0,877,928),7745=>array(27,0,886,759),7746=>array(19,-212,877,729),7747=>array(27,-212,886,560),7748=>array(19,0,734,927),7749=>array(27,0,589,759),7750=>array(19,-212,734,729),7751=>array(27,-212,589,560),7752=>array(19,-185,734,729),7753=>array(27,-185,589,560),7754=>array(19,-240,734,729),7755=>array(27,-240,589,560),7756=>array(32,-14,733,1057),7757=>array(32,-14,586,917),7758=>array(32,-14,733,1061),7759=>array(32,-14,586,900),7760=>array(32,-14,733,1057),7761=>array(32,-14,586,898),7762=>array(32,-14,733,1057),7763=>array(32,-14,586,900),7764=>array(19,0,647,927),7765=>array(-9,-208,609,800),7766=>array(19,0,647,928),7767=>array(-9,-208,609,759),7768=>array(19,0,617,928),7769=>array(27,0,491,759),7770=>array(19,-212,617,729),7771=>array(9,-212,491,560),7772=>array(19,-212,617,914),7773=>array(9,-212,491,759),7774=>array(19,-185,617,729),7775=>array(-62,-185,491,560),7776=>array(13,-14,599,928),7777=>array(9,-14,504,759),7778=>array(13,-212,599,742),7779=>array(9,-212,504,560),7780=>array(13,-14,647,928),7781=>array(9,-14,614,816),7782=>array(13,-14,621,1053),7783=>array(9,-14,544,875),7784=>array(13,-212,599,928),7785=>array(9,-212,504,762),7786=>array(43,0,673,928),7787=>array(39,0,458,941),7788=>array(43,-212,673,729),7789=>array(39,-212,458,702),7790=>array(43,-185,673,729),7791=>array(24,-185,458,702),7792=>array(35,-240,673,729),7793=>array(-18,-240,458,702),7794=>array(61,-212,712,729),7795=>array(54,-212,613,547),7796=>array(61,-221,712,729),7797=>array(54,-221,613,547),7798=>array(61,-203,712,729),7799=>array(54,-203,613,547),7800=>array(61,-14,712,1057),7801=>array(54,-14,613,917),7802=>array(61,-14,712,1043),7803=>array(54,-14,613,885),7804=>array(68,0,756,928),7805=>array(57,0,611,778),7806=>array(68,-212,756,729),7807=>array(57,-212,611,547),7808=>array(96,0,1029,931),7809=>array(78,0,834,803),7810=>array(96,0,1029,931),7811=>array(78,0,834,803),7812=>array(96,0,1029,927),7813=>array(78,0,834,774),7814=>array(96,0,1029,927),7815=>array(78,0,834,759),7816=>array(96,-212,1029,729),7817=>array(78,-212,834,547),7818=>array(-46,0,731,927),7819=>array(-37,0,604,759),7820=>array(-46,0,731,927),7821=>array(-37,0,604,774),7822=>array(57,0,729,928),7823=>array(0,-216,619,759),7824=>array(-23,0,667,927),7825=>array(-8,0,527,800),7826=>array(-23,-212,667,729),7827=>array(-8,-212,527,547),7828=>array(-23,-185,667,729),7829=>array(-8,-185,527,547),7830=>array(27,-185,589,760),7831=>array(39,0,458,927),7832=>array(78,0,834,883),7833=>array(0,-216,619,883),7834=>array(15,-14,743,760),7835=>array(44,0,486,941),7836=>array(-35,0,466,760),7837=>array(15,0,466,760),7838=>array(34,-14,727,743),7839=>array(14,-14,571,768),7840=>array(-59,-212,622,729),7841=>array(15,-212,550,560),7842=>array(-59,0,622,1025),7843=>array(15,-14,550,844),7844=>array(-59,0,768,1057),7845=>array(15,-14,716,876),7846=>array(-59,0,683,1057),7847=>array(15,-14,634,876),7848=>array(-59,0,756,1093),7849=>array(15,-14,696,913),7850=>array(-59,0,622,1068),7851=>array(15,-14,568,888),7852=>array(-59,-212,622,927),7853=>array(15,-212,550,800),7854=>array(-59,0,632,1057),7855=>array(15,-14,582,889),7856=>array(-59,0,622,1057),7857=>array(15,-14,550,889),7858=>array(-59,0,622,1121),7859=>array(15,-14,550,953),7860=>array(-59,0,624,1068),7861=>array(15,-14,567,900),7862=>array(-59,-212,622,936),7863=>array(15,-212,550,772),7864=>array(19,-212,603,729),7865=>array(32,-212,576,560),7866=>array(19,0,603,1025),7867=>array(32,-14,576,844),7868=>array(19,0,603,928),7869=>array(32,-14,576,778),7870=>array(19,0,725,1057),7871=>array(32,-14,733,876),7872=>array(19,0,695,1057),7873=>array(32,-14,649,876),7874=>array(19,0,720,1093),7875=>array(32,-14,718,913),7876=>array(19,0,603,1068),7877=>array(32,-14,583,888),7878=>array(19,-212,603,927),7879=>array(32,-212,576,800),7880=>array(19,0,375,1025),7881=>array(27,0,355,844),7882=>array(5,-212,316,729),7883=>array(9,-212,319,760),7884=>array(32,-212,733,742),7885=>array(32,-212,586,560),7886=>array(32,-14,733,1025),7887=>array(32,-14,586,844),7888=>array(32,-14,795,1057),7889=>array(32,-14,734,876),7890=>array(32,-14,733,1057),7891=>array(32,-14,651,876),7892=>array(32,-14,801,1093),7893=>array(32,-14,722,913),7894=>array(32,-14,733,1068),7895=>array(32,-14,590,888),7896=>array(32,-212,733,927),7897=>array(32,-212,586,800),7898=>array(35,-14,816,927),7899=>array(35,-14,693,800),7900=>array(35,-14,816,927),7901=>array(35,-14,693,798),7902=>array(35,-14,816,1025),7903=>array(35,-14,693,844),7904=>array(35,-14,816,928),7905=>array(35,-14,693,778),7906=>array(35,-212,816,760),7907=>array(35,-212,693,570),7908=>array(61,-212,712,729),7909=>array(54,-212,613,547),7910=>array(61,-14,712,1025),7911=>array(54,-14,613,844),7912=>array(61,-14,844,927),7913=>array(51,-14,716,799),7914=>array(61,-14,844,927),7915=>array(51,-14,716,800),7916=>array(61,-14,844,1025),7917=>array(51,-14,716,844),7918=>array(61,-14,844,928),7919=>array(51,-14,716,778),7920=>array(61,-212,844,761),7921=>array(51,-212,716,570),7922=>array(57,0,729,931),7923=>array(0,-216,619,803),7924=>array(57,-212,729,729),7925=>array(0,-216,619,547),7926=>array(57,0,729,1025),7927=>array(0,-216,619,844),7928=>array(57,0,729,928),7929=>array(0,-216,619,778),7930=>array(19,0,794,729),7931=>array(9,0,628,760),7936=>array(34,-12,623,785),7937=>array(34,-12,623,785),7938=>array(34,-12,623,800),7939=>array(34,-12,623,800),7940=>array(34,-12,623,800),7941=>array(34,-12,623,800),7942=>array(34,-12,623,928),7943=>array(34,-12,623,928),7944=>array(-59,0,622,785),7945=>array(-59,0,622,785),7946=>array(26,0,862,800),7947=>array(62,0,865,800),7948=>array(26,0,767,800),7949=>array(61,0,792,800),7950=>array(-3,0,677,928),7951=>array(18,0,699,928),7952=>array(24,-14,468,785),7953=>array(24,-14,468,785),7954=>array(24,-14,492,800),7955=>array(24,-14,487,800),7956=>array(24,-14,555,800),7957=>array(24,-14,541,800),7960=>array(27,0,701,785),7961=>array(62,0,703,785),7962=>array(26,0,978,800),7963=>array(62,0,975,800),7964=>array(26,0,909,800),7965=>array(61,0,936,800),7968=>array(44,-208,598,785),7969=>array(44,-208,598,785),7970=>array(44,-208,598,800),7971=>array(44,-208,598,800),7972=>array(44,-208,598,800),7973=>array(44,-208,615,800),7974=>array(44,-208,598,928),7975=>array(44,-208,598,928),7976=>array(27,0,832,785),7977=>array(62,0,837,785),7978=>array(26,0,1107,800),7979=>array(62,0,1106,800),7980=>array(26,0,1043,800),7981=>array(61,0,1067,800),7982=>array(88,0,930,928),7983=>array(87,0,938,928),7984=>array(38,-19,282,785),7985=>array(38,-19,282,785),7986=>array(0,-19,411,800),7987=>array(6,-19,383,800),7988=>array(38,-19,478,800),7989=>array(38,-19,471,800),7990=>array(38,-19,413,928),7991=>array(38,-19,410,928),7992=>array(27,0,417,785),7993=>array(62,0,422,785),7994=>array(26,0,681,800),7995=>array(62,0,688,800),7996=>array(26,0,622,800),7997=>array(61,0,646,800),7998=>array(88,0,525,928),7999=>array(87,0,525,928),8000=>array(32,-14,586,785),8001=>array(32,-14,586,785),8002=>array(32,-14,586,800),8003=>array(32,-14,586,800),8004=>array(32,-14,601,800),8005=>array(32,-14,612,800),8008=>array(27,-14,770,785),8009=>array(62,-14,808,785),8010=>array(26,-14,1067,800),8011=>array(62,-14,1069,800),8012=>array(26,-14,915,800),8013=>array(61,-14,941,800),8016=>array(48,-10,580,785),8017=>array(48,-10,580,785),8018=>array(48,-10,580,800),8019=>array(48,-10,580,800),8020=>array(48,-10,609,800),8021=>array(48,-10,615,800),8022=>array(48,-10,580,928),8023=>array(48,-10,580,928),8025=>array(62,0,914,785),8027=>array(62,0,1143,800),8029=>array(61,0,1156,800),8031=>array(87,0,1021,928),8032=>array(30,-13,751,785),8033=>array(30,-13,751,785),8034=>array(30,-13,751,800),8035=>array(30,-13,751,800),8036=>array(30,-13,751,800),8037=>array(30,-13,751,800),8038=>array(30,-13,751,928),8039=>array(30,-13,751,928),8040=>array(12,0,783,785),8041=>array(57,0,828,785),8042=>array(26,0,1087,800),8043=>array(62,-3,1092,800),8044=>array(26,0,934,800),8045=>array(61,0,960,800),8046=>array(88,0,891,928),8047=>array(87,0,934,928),8048=>array(34,-12,623,800),8049=>array(34,-12,623,800),8050=>array(24,-14,468,800),8051=>array(24,-14,510,800),8052=>array(44,-208,598,800),8053=>array(44,-208,598,800),8054=>array(38,-19,282,800),8055=>array(38,-19,392,800),8056=>array(32,-14,586,800),8057=>array(32,-14,586,800),8058=>array(48,-10,580,800),8059=>array(48,-10,580,800),8060=>array(30,-13,751,800),8061=>array(30,-13,751,800),8064=>array(34,-208,623,785),8065=>array(34,-208,623,785),8066=>array(34,-208,623,800),8067=>array(34,-208,623,800),8068=>array(34,-208,623,800),8069=>array(34,-208,623,800),8070=>array(34,-208,623,928),8071=>array(34,-208,623,928),8072=>array(-59,-208,622,785),8073=>array(-59,-208,622,785),8074=>array(26,-208,862,800),8075=>array(62,-208,865,800),8076=>array(26,-208,767,800),8077=>array(61,-208,792,800),8078=>array(-3,-208,677,928),8079=>array(18,-208,699,928),8080=>array(44,-208,598,785),8081=>array(44,-208,598,785),8082=>array(44,-208,598,800),8083=>array(44,-208,598,800),8084=>array(44,-208,598,800),8085=>array(44,-208,615,800),8086=>array(44,-208,598,928),8087=>array(44,-208,598,928),8088=>array(27,-208,832,785),8089=>array(62,-208,837,785),8090=>array(26,-208,1107,800),8091=>array(62,-208,1106,800),8092=>array(26,-208,1043,800),8093=>array(61,-208,1067,800),8094=>array(88,-208,930,928),8095=>array(87,-208,938,928),8096=>array(30,-208,751,785),8097=>array(30,-208,751,785),8098=>array(30,-208,751,800),8099=>array(30,-208,751,800),8100=>array(30,-208,751,800),8101=>array(30,-208,751,800),8102=>array(30,-208,751,928),8103=>array(30,-208,751,928),8104=>array(12,-208,783,785),8105=>array(57,-208,828,785),8106=>array(26,-208,1087,800),8107=>array(62,-208,1092,800),8108=>array(26,-208,934,800),8109=>array(61,-208,960,800),8110=>array(88,-208,891,928),8111=>array(87,-208,934,928),8112=>array(34,-12,623,784),8113=>array(34,-12,623,760),8114=>array(34,-208,623,800),8115=>array(34,-208,623,559),8116=>array(34,-208,623,800),8118=>array(34,-12,623,778),8119=>array(34,-208,623,778),8120=>array(-59,0,622,927),8121=>array(-59,0,622,914),8122=>array(34,0,714,800),8123=>array(-38,0,643,800),8124=>array(-59,-208,622,729),8125=>array(189,595,343,785),8126=>array(119,-208,228,-45),8127=>array(189,595,343,785),8128=>array(119,638,450,778),8129=>array(136,654,486,928),8130=>array(44,-208,598,800),8131=>array(44,-208,598,560),8132=>array(44,-208,598,800),8134=>array(44,-208,598,778),8135=>array(44,-208,598,778),8136=>array(75,0,825,800),8137=>array(21,0,748,800),8138=>array(75,0,954,800),8139=>array(26,0,888,800),8140=>array(19,-208,734,729),8141=>array(55,595,466,800),8142=>array(81,595,506,800),8143=>array(156,595,486,928),8144=>array(38,-19,372,784),8145=>array(38,-19,365,760),8146=>array(38,-19,362,978),8147=>array(44,-19,465,978),8150=>array(38,-19,382,778),8151=>array(38,-19,409,928),8152=>array(19,0,382,927),8153=>array(19,0,375,914),8154=>array(75,0,541,800),8155=>array(23,0,469,800),8157=>array(94,595,471,800),8158=>array(100,595,517,800),8159=>array(156,595,486,928),8160=>array(48,-10,580,784),8161=>array(48,-10,580,760),8162=>array(48,-10,580,978),8163=>array(48,-10,594,978),8164=>array(8,-208,629,785),8165=>array(8,-208,629,785),8166=>array(48,-10,580,778),8167=>array(48,-10,580,928),8168=>array(57,0,729,927),8169=>array(57,0,729,914),8170=>array(75,0,995,800),8171=>array(18,0,960,800),8172=>array(62,0,743,785),8173=>array(136,654,436,978),8174=>array(136,654,531,978),8175=>array(118,616,334,800),8178=>array(30,-208,751,800),8179=>array(30,-208,751,547),8180=>array(30,-208,751,800),8182=>array(30,-13,751,778),8183=>array(30,-208,751,778),8184=>array(75,-14,926,800),8185=>array(25,-14,766,800),8186=>array(75,0,941,800),8187=>array(-1,0,770,800),8188=>array(-41,-208,730,742),8189=>array(204,616,485,800),8190=>array(224,595,353,785),8208=>array(22,217,324,359),8209=>array(22,217,324,359),8210=>array(21,211,574,337),8211=>array(21,211,397,337),8212=>array(21,211,848,337),8213=>array(-27,211,896,337),8214=>array(114,-236,359,764),8215=>array(-9,-236,459,-9),8216=>array(101,418,351,729),8217=>array(66,418,314,729),8218=>array(-31,-122,218,189),8219=>array(96,418,272,729),8220=>array(101,418,587,729),8221=>array(66,418,551,729),8222=>array(-31,-122,455,189),8223=>array(85,418,482,729),8224=>array(34,-96,454,729),8225=>array(-25,-96,454,729),8226=>array(129,196,446,547),8227=>array(129,157,481,586),8228=>array(41,0,233,189),8229=>array(41,0,512,189),8230=>array(41,0,791,189),8231=>array(111,304,254,424),8240=>array(49,-14,1261,742),8241=>array(49,-14,1670,742),8242=>array(1,547,232,729),8243=>array(1,547,396,729),8244=>array(1,547,562,729),8245=>array(145,547,312,729),8246=>array(145,547,479,729),8247=>array(145,547,642,729),8248=>array(91,-238,569,29),8249=>array(55,67,320,519),8250=>array(34,66,298,519),8251=>array(65,0,810,829),8252=>array(-2,0,567,729),8253=>array(88,0,496,742),8254=>array(-9,663,459,755),8255=>array(-28,-237,773,-79),8256=>array(-28,769,773,927),8257=>array(-47,-235,267,231),8258=>array(18,-37,903,832),8259=>array(92,188,386,325),8260=>array(-250,-14,400,742),8261=>array(-9,-132,419,760),8262=>array(-25,-132,404,760),8263=>array(63,0,932,742),8264=>array(93,0,748,742),8265=>array(-2,0,719,742),8266=>array(79,-125,477,546),8267=>array(51,-96,599,729),8268=>array(67,189,382,541),8269=>array(67,189,382,541),8270=>array(18,-37,453,427),8271=>array(50,-142,294,547),8272=>array(-28,-237,773,927),8273=>array(61,-3,409,830),8274=>array(2,-93,493,729),8275=>array(44,212,856,415),8276=>array(-28,-351,773,-192),8277=>array(127,98,625,631),8278=>array(85,93,565,645),8279=>array(1,547,726,729),8280=>array(55,21,699,708),8281=>array(72,71,691,657),8282=>array(27,0,315,729),8283=>array(27,-170,756,898),8284=>array(39,0,715,729),8285=>array(27,0,306,683),8286=>array(27,0,306,683),8304=>array(26,319,358,742),8305=>array(10,326,185,751),8308=>array(2,326,350,734),8309=>array(11,319,354,734),8310=>array(33,319,362,742),8311=>array(46,326,376,734),8312=>array(18,319,360,742),8313=>array(21,319,350,742),8314=>array(60,326,415,677),8315=>array(60,469,415,534),8316=>array(60,407,415,596),8317=>array(43,252,253,751),8318=>array(-1,252,209,751),8319=>array(21,326,371,640),8320=>array(26,-7,358,416),8321=>array(60,0,356,408),8322=>array(40,0,388,416),8323=>array(36,-7,384,416),8324=>array(2,0,350,408),8325=>array(11,-7,354,408),8326=>array(33,-7,362,416),8327=>array(46,0,376,408),8328=>array(18,-7,360,416),8329=>array(21,-7,350,416),8330=>array(60,0,415,351),8331=>array(60,143,415,208),8332=>array(60,81,415,270),8333=>array(43,-74,253,425),8334=>array(-1,-74,209,425),8336=>array(33,-8,370,313),8337=>array(44,-8,387,313),8338=>array(44,-8,393,313),8339=>array(-18,0,384,306),8340=>array(48,-8,381,313),8341=>array(11,0,361,425),8342=>array(18,0,406,425),8343=>array(11,0,187,425),8344=>array(18,0,559,313),8345=>array(21,0,371,313),8346=>array(-5,-117,384,313),8347=>array(10,-8,320,313),8348=>array(64,0,329,393),8352=>array(48,0,827,729),8353=>array(32,-44,624,778),8354=>array(32,-14,628,742),8355=>array(3,0,621,729),8356=>array(6,0,622,742),8357=>array(26,-93,877,640),8358=>array(12,0,741,729),8359=>array(19,-14,1308,729),8360=>array(20,-14,1039,729),8361=>array(21,0,1029,729),8362=>array(-29,-14,783,729),8363=>array(32,-185,735,760),8364=>array(-37,-14,619,742),8365=>array(11,0,662,729),8366=>array(49,0,679,729),8367=>array(33,-223,1098,742),8368=>array(1,-14,594,742),8369=>array(19,0,628,729),8370=>array(34,-81,614,809),8371=>array(-60,0,616,729),8372=>array(14,-14,760,742),8373=>array(68,-147,620,760),8376=>array(16,0,679,729),8377=>array(54,0,646,729),8378=>array(-9,0,670,729),8400=>array(-459,628,-23,760),8401=>array(-435,628,-10,760),8406=>array(-423,560,-18,760),8407=>array(-429,560,-23,760),8411=>array(-302,654,171,774),8412=>array(-389,654,258,774),8417=>array(-423,560,-23,760),8448=>array(13,-23,996,752),8449=>array(13,-23,996,752),8450=>array(44,-14,603,742),8451=>array(78,-14,1081,749),8452=>array(57,0,749,729),8453=>array(22,-24,988,752),8454=>array(22,-24,1053,752),8455=>array(33,-14,587,742),8456=>array(0,-146,624,611),8457=>array(78,0,899,749),8459=>array(32,-14,957,746),8460=>array(5,-125,729,747),8461=>array(90,0,709,729),8462=>array(27,0,589,760),8463=>array(9,0,563,760),8464=>array(32,-14,480,742),8465=>array(46,-14,593,743),8466=>array(33,-14,708,742),8467=>array(-13,-14,361,742),8468=>array(10,-14,842,760),8469=>array(83,0,671,729),8470=>array(-34,0,1041,729),8471=>array(124,0,776,725),8472=>array(48,-221,592,495),8473=>array(83,0,638,729),8474=>array(44,-146,720,742),8475=>array(28,-14,814,768),8476=>array(36,-14,723,743),8477=>array(88,0,714,729),8478=>array(47,0,760,729),8479=>array(48,-112,600,887),8480=>array(114,443,693,730),8481=>array(36,0,1101,547),8482=>array(129,447,711,729),8483=>array(20,-113,790,885),8484=>array(40,0,639,729),8485=>array(-10,-230,583,777),8486=>array(-41,0,730,742),8487=>array(37,-14,732,723),8488=>array(-5,-159,604,729),8489=>array(32,0,276,566),8490=>array(19,0,753,729),8491=>array(-59,0,622,928),8492=>array(37,-1,768,772),8493=>array(57,-19,690,742),8494=>array(55,-12,714,647),8495=>array(37,-14,532,533),8496=>array(65,-14,602,742),8497=>array(33,-14,774,773),8498=>array(19,0,603,729),8499=>array(34,-18,1041,751),8500=>array(26,-12,393,420),8501=>array(45,-14,685,742),8502=>array(17,-14,619,742),8503=>array(27,-35,396,742),8504=>array(57,-41,570,742),8505=>array(31,0,320,760),8506=>array(40,-27,895,723),8507=>array(0,0,1246,547),8508=>array(31,-14,689,547),8509=>array(-36,-208,630,561),8510=>array(83,0,564,729),8511=>array(83,0,694,729),8512=>array(11,-192,738,719),8513=>array(4,-14,672,742),8514=>array(8,0,499,729),8515=>array(10,0,604,729),8516=>array(2,0,674,729),8517=>array(18,0,708,729),8518=>array(31,-14,677,760),8519=>array(29,-14,571,560),8520=>array(13,0,317,760),8521=>array(-129,-216,319,760),8523=>array(54,-14,754,742),8526=>array(1,0,471,547),8528=>array(50,-14,921,742),8529=>array(50,-14,895,742),8530=>array(50,-14,1297,742),8531=>array(50,-14,929,742),8532=>array(40,-14,929,742),8533=>array(50,-14,898,742),8534=>array(40,-14,898,742),8535=>array(36,-14,898,742),8536=>array(2,-14,898,742),8537=>array(50,-14,907,742),8538=>array(11,-14,907,742),8539=>array(50,-14,905,742),8540=>array(36,-14,905,742),8541=>array(11,-14,905,742),8542=>array(46,-14,905,742),8543=>array(50,-14,804,742),8544=>array(19,0,316,729),8545=>array(19,0,574,729),8546=>array(19,0,832,729),8547=>array(19,0,1048,729),8548=>array(68,0,756,729),8549=>array(68,0,971,729),8550=>array(68,0,1229,729),8551=>array(68,0,1486,729),8552=>array(19,0,1046,729),8553=>array(-46,0,731,729),8554=>array(-46,0,989,729),8555=>array(-46,0,1248,729),8556=>array(19,0,510,729),8557=>array(32,-14,652,742),8558=>array(19,0,708,729),8559=>array(19,0,877,729),8560=>array(27,0,319,760),8561=>array(27,0,557,760),8562=>array(27,0,795,760),8563=>array(27,0,889,760),8564=>array(57,0,611,547),8565=>array(57,0,876,760),8566=>array(57,0,1114,760),8567=>array(57,0,1353,760),8568=>array(27,0,896,760),8569=>array(-37,0,604,547),8570=>array(-37,0,882,760),8571=>array(-37,0,1121,760),8572=>array(27,0,319,760),8573=>array(33,-14,523,560),8574=>array(32,-14,652,760),8575=>array(27,0,886,560),8576=>array(43,0,1116,729),8577=>array(19,0,704,729),8578=>array(43,0,1116,729),8579=>array(-12,-14,607,742),8580=>array(-7,-14,483,560),8581=>array(62,-208,677,742),8585=>array(26,-14,929,742),8592=>array(44,87,703,540),8593=>array(174,0,581,732),8594=>array(51,87,710,540),8595=>array(174,-3,581,729),8596=>array(44,87,710,540),8597=>array(173,-3,581,732),8598=>array(123,66,648,650),8599=>array(123,66,648,650),8600=>array(123,66,648,650),8601=>array(123,66,648,650),8602=>array(44,87,703,540),8603=>array(51,87,710,540),8604=>array(11,84,750,431),8605=>array(4,84,743,431),8606=>array(44,87,703,540),8607=>array(170,0,577,732),8608=>array(51,87,710,540),8609=>array(174,-3,582,729),8610=>array(44,87,714,540),8611=>array(40,87,710,540),8612=>array(44,87,703,540),8613=>array(174,0,581,732),8614=>array(51,87,710,540),8615=>array(174,0,581,732),8616=>array(174,0,581,732),8617=>array(44,87,703,565),8618=>array(51,87,710,565),8619=>array(44,87,703,565),8620=>array(51,87,710,565),8621=>array(44,87,710,540),8622=>array(44,86,710,541),8623=>array(110,-4,643,733),8624=>array(152,0,582,755),8625=>array(172,0,603,755),8626=>array(152,-26,582,729),8627=>array(172,-26,603,729),8628=>array(209,-3,695,621),8629=>array(44,87,606,626),8630=>array(9,198,734,685),8631=>array(20,198,745,685),8632=>array(105,13,709,729),8633=>array(44,-108,710,735),8634=>array(78,45,690,691),8635=>array(64,45,677,691),8636=>array(44,255,703,540),8637=>array(44,87,703,372),8638=>array(325,0,581,732),8639=>array(174,0,431,732),8640=>array(51,255,710,540),8641=>array(51,87,710,372),8642=>array(325,0,581,732),8643=>array(174,0,431,732),8644=>array(44,-59,710,686),8645=>array(42,-3,713,732),8646=>array(44,-59,710,686),8647=>array(44,-59,703,686),8648=>array(42,0,712,732),8649=>array(51,-59,710,686),8650=>array(42,-3,712,729),8651=>array(44,-5,710,632),8652=>array(44,-5,710,632),8653=>array(44,87,703,540),8654=>array(44,87,710,540),8655=>array(51,87,710,540),8656=>array(44,87,703,540),8657=>array(173,0,581,732),8658=>array(51,87,710,540),8659=>array(173,-3,581,729),8660=>array(44,87,710,540),8661=>array(173,-8,581,732),8662=>array(119,-26,680,596),8663=>array(79,-26,641,597),8664=>array(79,16,641,639),8665=>array(119,16,680,639),8666=>array(44,87,703,540),8667=>array(51,87,710,540),8668=>array(40,87,699,540),8669=>array(51,87,710,540),8670=>array(174,0,581,732),8671=>array(174,-3,581,729),8672=>array(44,87,703,540),8673=>array(174,0,581,732),8674=>array(51,87,710,540),8675=>array(174,-3,581,729),8676=>array(44,87,703,540),8677=>array(51,87,710,540),8678=>array(24,46,703,581),8679=>array(136,0,618,754),8680=>array(31,46,710,581),8681=>array(136,-25,618,729),8682=>array(136,0,618,754),8683=>array(136,0,618,754),8684=>array(136,0,618,754),8685=>array(136,0,618,754),8686=>array(136,0,618,754),8687=>array(136,0,618,754),8688=>array(31,46,710,581),8689=>array(53,0,709,729),8690=>array(53,0,709,729),8691=>array(136,-25,618,754),8692=>array(51,87,710,540),8693=>array(42,-3,713,732),8694=>array(51,-223,710,850),8695=>array(44,87,703,540),8696=>array(51,87,710,540),8697=>array(44,87,710,540),8698=>array(44,87,703,540),8699=>array(51,87,710,540),8700=>array(44,87,710,540),8701=>array(24,96,703,531),8702=>array(51,96,730,531),8703=>array(24,96,730,531),8704=>array(4,0,692,729),8705=>array(43,-14,566,742),8706=>array(26,-14,463,674),8707=>array(83,0,549,729),8708=>array(83,-46,549,775),8709=>array(42,-15,729,715),8710=>array(0,0,627,719),8711=>array(0,0,627,719),8712=>array(65,-2,742,730),8713=>array(65,-46,742,775),8714=>array(95,58,580,568),8715=>array(65,-2,742,730),8716=>array(65,-46,742,775),8717=>array(95,58,580,568),8718=>array(88,0,485,553),8719=>array(66,-192,641,719),8720=>array(66,-193,641,718),8721=>array(18,-192,627,719),8722=>array(95,256,659,371),8723=>array(95,0,659,627),8724=>array(44,0,583,729),8725=>array(-87,-93,391,729),8726=>array(148,-49,478,772),8727=>array(106,0,647,626),8728=>array(135,151,428,477),8729=>array(92,253,250,442),8730=>array(33,-20,602,837),8731=>array(33,-20,602,933),8732=>array(32,-20,602,924),8733=>array(83,89,555,505),8734=>array(83,89,667,505),8735=>array(95,67,659,693),8736=>array(69,0,738,729),8737=>array(69,-44,738,729),8738=>array(104,-0,659,726),8739=>array(186,-207,290,773),8740=>array(43,-207,434,773),8741=>array(101,-207,376,773),8742=>array(43,-207,434,773),8743=>array(136,0,595,579),8744=>array(136,0,595,579),8745=>array(136,0,595,579),8746=>array(136,0,595,579),8747=>array(13,-227,493,754),8748=>array(13,-227,823,754),8749=>array(13,-227,1152,754),8750=>array(13,-227,493,754),8751=>array(34,-227,845,754),8752=>array(21,-227,1161,754),8753=>array(13,-227,555,754),8754=>array(13,-227,540,754),8755=>array(13,-227,530,754),8756=>array(53,78,573,647),8757=>array(53,78,573,647),8758=>array(53,79,211,647),8759=>array(53,78,573,647),8760=>array(95,256,659,631),8761=>array(95,45,721,584),8762=>array(95,-4,659,631),8763=>array(95,-34,659,660),8764=>array(95,212,659,415),8765=>array(95,212,659,415),8766=>array(59,131,695,497),8767=>array(95,42,659,584),8768=>array(77,0,260,626),8769=>array(95,76,659,551),8770=>array(95,110,659,482),8771=>array(95,144,659,517),8772=>array(95,0,659,637),8773=>array(95,37,659,628),8774=>array(95,-31,659,628),8775=>array(95,-86,659,726),8776=>array(95,110,659,517),8777=>array(95,8,659,614),8778=>array(95,37,659,628),8779=>array(95,-13,659,628),8780=>array(95,37,659,628),8781=>array(95,105,659,585),8782=>array(95,26,659,656),8783=>array(95,172,659,656),8784=>array(95,144,659,744),8785=>array(95,-117,659,743),8786=>array(94,-92,659,719),8787=>array(94,-92,658,719),8788=>array(88,102,868,520),8789=>array(86,102,870,520),8790=>array(95,144,659,482),8791=>array(95,144,659,839),8792=>array(95,144,659,704),8793=>array(95,144,659,840),8794=>array(95,144,659,840),8795=>array(95,144,659,959),8796=>array(95,144,659,952),8797=>array(95,144,659,762),8798=>array(95,144,659,786),8799=>array(95,144,659,903),8800=>array(95,-5,659,631),8801=>array(95,38,659,588),8802=>array(95,-69,659,695),8803=>array(95,-74,659,700),8804=>array(95,0,659,582),8805=>array(95,0,659,582),8806=>array(96,-106,659,617),8807=>array(96,-106,659,617),8808=>array(96,-185,659,617),8809=>array(96,-185,659,617),8810=>array(65,-34,877,660),8811=>array(65,-34,877,660),8812=>array(77,-132,373,759),8813=>array(95,-10,659,700),8814=>array(95,-4,659,690),8815=>array(95,-63,659,631),8816=>array(95,-112,659,645),8817=>array(95,-112,659,645),8818=>array(95,-84,659,582),8819=>array(95,-84,659,582),8820=>array(95,-112,659,645),8821=>array(95,-112,659,645),8822=>array(91,-119,659,678),8823=>array(91,-119,659,678),8824=>array(91,-221,659,779),8825=>array(91,-221,659,779),8826=>array(95,-55,659,681),8827=>array(95,-55,659,681),8828=>array(95,-177,659,684),8829=>array(95,-177,659,684),8830=>array(95,-132,659,684),8831=>array(95,-132,659,684),8832=>array(95,-89,659,781),8833=>array(95,-89,659,781),8834=>array(89,67,665,559),8835=>array(89,65,665,559),8836=>array(89,-96,665,726),8837=>array(89,-100,665,722),8838=>array(89,0,665,636),8839=>array(89,0,665,635),8840=>array(89,-124,665,759),8841=>array(89,-124,665,759),8842=>array(89,-97,665,636),8843=>array(89,-97,665,635),8844=>array(136,0,595,579),8845=>array(136,0,595,579),8846=>array(136,0,595,579),8847=>array(95,0,659,584),8848=>array(95,0,659,584),8849=>array(95,-115,659,667),8850=>array(95,-115,659,667),8851=>array(95,0,621,626),8852=>array(95,0,621,626),8853=>array(82,-14,672,643),8854=>array(82,-14,672,643),8855=>array(82,-14,672,643),8856=>array(82,-13,672,642),8857=>array(82,-14,672,643),8858=>array(82,-14,672,643),8859=>array(82,-14,672,643),8860=>array(82,-14,672,643),8861=>array(82,-14,672,643),8862=>array(69,-29,686,657),8863=>array(69,-29,686,657),8864=>array(69,-29,686,657),8865=>array(69,-29,686,657),8866=>array(77,0,746,705),8867=>array(77,0,746,705),8868=>array(77,0,746,705),8869=>array(77,0,746,705),8870=>array(77,0,412,705),8871=>array(77,0,412,705),8872=>array(77,0,746,705),8873=>array(77,0,746,705),8874=>array(77,0,746,705),8875=>array(77,0,746,705),8876=>array(77,-100,746,805),8877=>array(77,-100,746,805),8878=>array(77,-100,746,805),8879=>array(77,-100,746,805),8880=>array(95,-54,652,681),8881=>array(102,-54,659,681),8882=>array(95,-1,659,628),8883=>array(95,-1,659,628),8884=>array(95,-80,659,706),8885=>array(95,-80,659,706),8886=>array(54,151,846,477),8887=>array(54,151,846,477),8888=>array(53,151,701,477),8889=>array(39,-63,715,689),8890=>array(56,0,432,705),8891=>array(92,0,639,759),8892=>array(92,0,639,759),8893=>array(92,0,639,759),8894=>array(95,0,659,626),8895=>array(95,0,659,626),8896=>array(0,-192,759,719),8897=>array(0,-192,759,719),8898=>array(43,-192,715,719),8899=>array(43,-192,715,719),8900=>array(2,-233,442,807),8901=>array(92,253,250,442),8902=>array(75,112,489,549),8903=>array(95,-56,659,683),8904=>array(95,-48,805,674),8905=>array(95,-48,805,675),8906=>array(95,-48,805,675),8907=>array(95,-48,805,675),8908=>array(95,-48,805,675),8909=>array(95,144,659,517),8910=>array(44,0,687,579),8911=>array(44,0,687,579),8912=>array(83,-22,659,649),8913=>array(95,-22,671,649),8914=>array(75,0,680,639),8915=>array(75,-14,680,625),8916=>array(167,0,587,729),8917=>array(95,-100,659,729),8918=>array(95,30,659,597),8919=>array(95,30,659,597),8920=>array(65,-34,1215,660),8921=>array(65,-34,1215,660),8922=>array(95,-211,659,837),8923=>array(95,-211,659,837),8924=>array(95,0,659,582),8925=>array(95,0,659,582),8926=>array(95,-177,659,684),8927=>array(95,-177,659,684),8928=>array(95,-197,659,808),8929=>array(95,-263,659,742),8930=>array(95,-191,659,817),8931=>array(95,-191,659,817),8932=>array(95,-146,659,636),8933=>array(95,-146,659,636),8934=>array(95,-168,659,582),8935=>array(95,-168,659,582),8936=>array(95,-216,659,684),8937=>array(95,-216,659,684),8938=>array(95,-138,659,808),8939=>array(95,-138,659,808),8940=>array(95,-224,659,894),8941=>array(95,-224,659,894),8942=>array(371,-40,529,735),8943=>array(71,253,829,442),8944=>array(71,-40,829,735),8945=>array(71,-40,829,735),8946=>array(65,-2,977,730),8947=>array(65,-2,742,730),8948=>array(95,58,580,568),8949=>array(65,-2,742,984),8950=>array(65,-2,742,919),8951=>array(95,58,580,741),8952=>array(65,-207,742,730),8953=>array(65,-2,742,730),8954=>array(65,-2,977,730),8955=>array(65,-2,742,730),8956=>array(95,58,580,568),8957=>array(65,-2,742,919),8958=>array(95,58,580,741),8959=>array(95,0,712,732),8960=>array(28,-22,515,519),8961=>array(50,152,486,453),8962=>array(58,0,586,596),8963=>array(174,470,581,732),8964=>array(174,0,581,263),8965=>array(174,-12,581,423),8966=>array(174,-12,581,552),8967=>array(175,-42,399,802),8968=>array(-1,-132,429,760),8969=>array(106,-132,412,760),8970=>array(-1,-132,305,760),8971=>array(-17,-132,412,760),8972=>array(316,-77,684,331),8973=>array(44,-77,412,331),8974=>array(316,226,684,634),8975=>array(44,226,412,634),8976=>array(95,140,659,444),8977=>array(2,113,482,646),8984=>array(76,0,759,759),8985=>array(95,140,659,444),8988=>array(78,425,422,760),8989=>array(114,425,422,760),8990=>array(55,-126,363,208),8991=>array(37,-126,381,208),8992=>array(211,-250,527,926),8993=>array(20,-240,336,940),8996=>array(68,215,969,575),8997=>array(68,0,969,575),8998=>array(68,0,1272,760),8999=>array(68,0,969,760),9000=>array(53,0,1247,729),9003=>array(0,0,1204,760),9004=>array(66,-91,720,748),9075=>array(70,-19,313,547),9076=>array(75,-208,604,562),9077=>array(39,-13,744,547),9082=>array(43,-13,581,559),9085=>array(1,-228,775,99),9095=>array(68,0,990,743),9108=>array(15,0,771,727),9115=>array(56,-252,394,928),9116=>array(56,-252,185,940),9117=>array(56,-240,394,940),9118=>array(56,-252,394,928),9119=>array(266,-252,394,940),9120=>array(56,-240,394,940),9121=>array(56,-252,394,928),9122=>array(56,-252,185,940),9123=>array(56,-240,394,940),9124=>array(56,-252,394,928),9125=>array(266,-252,394,940),9126=>array(56,-240,394,940),9127=>array(275,-261,602,928),9128=>array(74,-247,400,934),9129=>array(275,-240,602,934),9130=>array(275,-256,400,934),9131=>array(74,-261,400,928),9132=>array(275,-247,602,934),9133=>array(74,-240,400,934),9134=>array(211,-250,336,940),9166=>array(24,46,703,729),9167=>array(82,0,769,596),9187=>array(66,-91,720,748),9189=>array(2,75,690,444),9192=>array(-5,-129,561,294),9250=>array(-31,-14,586,760),9251=>array(20,-228,605,99),9312=>array(53,-15,709,715),9313=>array(53,-15,709,715),9314=>array(53,-15,709,715),9315=>array(53,-15,709,715),9316=>array(53,-15,709,715),9317=>array(53,-15,709,715),9318=>array(53,-15,709,715),9319=>array(53,-15,709,715),9320=>array(53,-15,709,715),9321=>array(53,-15,709,715),9600=>array(-9,260,701,770),9601=>array(-9,-250,701,-123),9602=>array(-9,-250,701,-5),9603=>array(-9,-250,701,132),9604=>array(-9,-250,701,260),9605=>array(-9,-250,701,387),9606=>array(-9,-250,701,515),9607=>array(-9,-250,701,642),9608=>array(-9,-250,701,770),9609=>array(-9,-250,612,770),9610=>array(-9,-250,523,770),9611=>array(-9,-250,435,770),9612=>array(-9,-250,346,770),9613=>array(-9,-250,257,770),9614=>array(-9,-250,168,770),9615=>array(-9,-250,80,770),9616=>array(346,-250,701,770),9617=>array(-9,-250,612,770),9618=>array(-9,-250,701,770),9619=>array(-9,-250,701,770),9620=>array(-9,642,701,770),9621=>array(612,-250,701,770),9622=>array(-9,-250,347,260),9623=>array(346,-250,701,260),9624=>array(-9,260,347,770),9625=>array(-9,-250,701,770),9626=>array(-9,-250,701,770),9627=>array(-9,-250,701,770),9628=>array(-9,-250,701,770),9629=>array(346,260,701,770),9630=>array(-9,-250,701,770),9631=>array(-9,-250,701,770),9632=>array(82,-124,769,643),9633=>array(82,-124,769,643),9634=>array(82,-124,769,643),9635=>array(82,-124,769,643),9636=>array(82,-124,769,643),9637=>array(82,-124,769,643),9638=>array(82,-124,769,643),9639=>array(82,-124,769,643),9640=>array(82,-124,769,643),9641=>array(82,-124,769,643),9642=>array(82,11,528,509),9643=>array(82,11,528,509),9644=>array(82,75,769,444),9645=>array(82,75,769,444),9646=>array(82,-122,414,642),9647=>array(82,-122,414,642),9648=>array(2,75,690,444),9649=>array(2,75,690,444),9650=>array(2,-124,690,643),9651=>array(2,-124,690,643),9652=>array(2,11,449,509),9653=>array(2,11,449,509),9654=>array(2,-124,690,643),9655=>array(2,-124,690,643),9656=>array(2,11,449,509),9657=>array(2,11,449,509),9658=>array(2,11,690,509),9659=>array(2,11,690,509),9660=>array(2,-124,690,643),9661=>array(2,-124,690,643),9662=>array(2,11,449,509),9663=>array(2,11,449,509),9664=>array(2,-124,690,643),9665=>array(2,-124,690,643),9666=>array(2,11,449,509),9667=>array(2,11,449,509),9668=>array(2,11,690,509),9669=>array(2,11,690,509),9670=>array(2,-124,690,643),9671=>array(2,-124,690,643),9672=>array(2,-124,690,643),9673=>array(49,-125,736,645),9674=>array(2,-233,442,807),9675=>array(49,-125,736,645),9676=>array(50,-125,735,644),9677=>array(49,-125,736,645),9678=>array(49,-125,736,645),9679=>array(49,-123,736,641),9680=>array(49,-123,736,641),9681=>array(49,-123,736,641),9682=>array(49,-123,736,641),9683=>array(49,-123,736,641),9684=>array(49,-123,736,641),9685=>array(49,-123,736,641),9686=>array(49,-125,393,645),9687=>array(82,-125,425,645),9688=>array(82,-10,675,770),9689=>array(82,-250,792,770),9690=>array(82,260,792,770),9691=>array(82,-250,792,260),9692=>array(2,260,346,645),9693=>array(2,260,346,645),9694=>array(2,-125,346,260),9695=>array(2,-125,346,260),9696=>array(2,260,690,645),9697=>array(2,-125,690,260),9698=>array(2,-124,690,643),9699=>array(2,-124,690,643),9700=>array(2,-124,690,643),9701=>array(2,-124,690,643),9702=>array(129,196,446,547),9703=>array(82,-124,769,643),9704=>array(82,-124,769,643),9705=>array(82,-124,769,643),9706=>array(82,-124,769,643),9707=>array(82,-124,769,643),9708=>array(2,-124,690,643),9709=>array(2,-124,690,643),9710=>array(2,-124,690,643),9711=>array(49,-250,958,770),9712=>array(82,-124,769,643),9713=>array(82,-124,769,643),9714=>array(82,-124,769,643),9715=>array(82,-124,769,643),9716=>array(49,-123,736,641),9717=>array(49,-123,736,641),9718=>array(49,-123,736,641),9719=>array(49,-123,736,641),9720=>array(2,-124,690,643),9721=>array(2,-124,690,643),9722=>array(2,-124,690,643),9723=>array(82,-66,666,585),9724=>array(82,-66,666,585),9725=>array(82,-17,578,537),9726=>array(82,-17,578,537),9727=>array(2,-124,690,643),9728=>array(75,0,731,729),9729=>array(45,-2,854,360),9730=>array(44,0,763,729),9731=>array(75,-0,732,927),9732=>array(57,0,750,880),9733=>array(58,-4,749,723),9734=>array(58,-4,749,723),9735=>array(75,2,441,729),9736=>array(75,0,732,731),9737=>array(75,0,732,730),9738=>array(55,0,745,727),9739=>array(55,0,745,723),9740=>array(55,-1,549,722),9741=>array(55,0,857,723),9742=>array(62,0,1060,729),9743=>array(63,0,1062,729),9744=>array(81,0,727,729),9745=>array(80,0,727,729),9746=>array(80,0,727,729),9747=>array(67,78,411,656),9748=>array(44,0,783,933),9749=>array(66,0,740,731),9750=>array(75,0,732,731),9751=>array(75,0,732,727),9752=>array(70,0,737,729),9753=>array(75,140,732,574),9754=>array(75,113,732,569),9755=>array(75,113,732,569),9756=>array(78,104,729,569),9757=>array(64,0,483,724),9758=>array(78,103,729,569),9759=>array(64,-3,483,720),9760=>array(55,0,752,730),9761=>array(75,0,732,730),9762=>array(75,0,732,730),9763=>array(44,0,763,730),9764=>array(44,-2,558,727),9765=>array(75,0,597,731),9766=>array(75,-1,510,731),9767=>array(75,0,631,911),9768=>array(75,0,416,730),9769=>array(75,-1,732,729),9770=>array(78,0,729,730),9771=>array(75,0,733,731),9772=>array(75,0,565,731),9773=>array(75,0,732,730),9774=>array(75,0,732,730),9775=>array(75,0,732,730),9776=>array(75,0,732,729),9777=>array(75,0,733,729),9778=>array(75,0,732,729),9779=>array(75,0,732,729),9780=>array(75,0,732,729),9781=>array(75,0,732,729),9782=>array(75,0,732,729),9783=>array(75,0,732,729),9784=>array(71,3,735,721),9785=>array(75,-73,864,804),9786=>array(75,-73,864,804),9787=>array(75,-73,864,804),9788=>array(75,0,732,730),9789=>array(322,0,733,730),9790=>array(75,0,485,730),9791=>array(77,-102,476,732),9792=>array(77,-125,583,731),9793=>array(77,-14,583,843),9794=>array(71,-14,748,720),9795=>array(149,0,657,730),9796=>array(197,0,609,730),9797=>array(109,0,697,730),9798=>array(114,0,692,730),9799=>array(216,0,590,730),9800=>array(41,0,766,731),9801=>array(80,0,727,730),9802=>array(84,0,722,731),9803=>array(101,31,706,679),9804=>array(125,0,681,730),9805=>array(48,-180,759,730),9806=>array(75,52,732,653),9807=>array(30,-96,777,730),9808=>array(74,-0,732,730),9809=>array(84,0,722,730),9810=>array(77,153,729,579),9811=>array(141,0,666,730),9812=>array(88,0,719,730),9813=>array(99,0,708,730),9814=>array(149,-1,657,729),9815=>array(192,0,615,730),9816=>array(148,0,659,730),9817=>array(133,-0,673,730),9818=>array(88,0,719,730),9819=>array(99,0,708,730),9820=>array(149,-1,657,729),9821=>array(192,0,615,730),9822=>array(146,0,661,730),9823=>array(133,-0,673,730),9824=>array(142,0,665,729),9825=>array(81,0,726,727),9826=>array(151,0,655,729),9827=>array(100,0,707,729),9828=>array(141,0,666,729),9829=>array(80,0,728,729),9830=>array(151,0,655,729),9831=>array(100,0,707,732),9832=>array(95,-1,712,729),9833=>array(75,-5,306,729),9834=>array(75,-5,499,729),9835=>array(165,-102,642,729),9836=>array(83,-5,724,729),9837=>array(79,-3,353,731),9838=>array(75,0,246,731),9839=>array(76,0,360,731),9840=>array(75,0,598,731),9841=>array(58,0,631,731),9842=>array(75,0,732,709),9843=>array(68,16,738,731),9844=>array(68,16,738,731),9845=>array(68,16,738,731),9846=>array(68,16,738,731),9847=>array(68,16,738,731),9848=>array(68,16,738,731),9849=>array(68,16,738,731),9850=>array(68,16,738,731),9851=>array(75,0,731,704),9852=>array(75,0,733,731),9853=>array(75,0,733,731),9854=>array(75,0,733,731),9855=>array(134,1,672,731),9856=>array(66,0,717,725),9857=>array(66,0,717,725),9858=>array(66,0,717,725),9859=>array(66,0,717,725),9860=>array(66,0,717,725),9861=>array(66,0,717,725),9862=>array(75,0,732,731),9863=>array(75,0,732,731),9864=>array(75,0,732,731),9865=>array(75,0,732,731),9866=>array(75,0,732,98),9867=>array(75,0,732,98),9868=>array(75,0,732,413),9869=>array(75,0,732,413),9870=>array(75,0,732,413),9871=>array(75,0,732,413),9872=>array(151,3,655,731),9873=>array(151,3,655,731),9874=>array(46,0,760,731),9875=>array(87,-10,720,732),9876=>array(118,0,689,729),9877=>array(55,-10,431,732),9878=>array(53,-10,753,732),9879=>array(55,0,751,732),9880=>array(130,0,676,732),9881=>array(85,-17,722,727),9882=>array(115,-9,691,733),9883=>array(114,0,692,728),9884=>array(114,0,692,729),9888=>array(44,0,763,729),9889=>array(75,2,558,730),9890=>array(77,-125,827,731),9891=>array(71,-206,921,720),9892=>array(77,-186,998,856),9893=>array(77,-125,753,917),9894=>array(118,-14,654,869),9895=>array(91,-170,667,884),9896=>array(168,-14,585,869),9897=>array(4,133,746,596),9898=>array(168,133,585,597),9899=>array(168,133,585,597),9900=>array(224,194,531,536),9901=>array(158,194,597,536),9902=>array(37,169,717,560),9903=>array(4,194,750,536),9904=>array(92,237,681,540),9905=>array(190,42,564,698),9906=>array(77,-125,583,731),9907=>array(151,-125,582,731),9908=>array(77,-125,582,731),9909=>array(77,-125,582,731),9910=>array(53,-118,712,643),9911=>array(175,-104,536,710),9912=>array(142,-125,489,731),9920=>array(38,4,716,553),9921=>array(38,4,716,724),9922=>array(38,4,716,553),9923=>array(38,4,716,724),9954=>array(77,-14,583,843),9985=>array(9,190,723,635),9986=>array(38,141,706,588),9987=>array(9,94,723,539),9988=>array(32,119,742,613),9990=>array(38,-14,716,742),9991=>array(38,-14,716,742),9992=>array(53,21,704,708),9993=>array(58,107,696,622),9996=>array(191,0,505,742),9997=>array(19,83,722,678),9998=>array(80,75,652,710),9999=>array(23,198,738,530),10000=>array(80,75,652,710),10001=>array(39,185,681,544),10002=>array(61,209,681,520),10003=>array(135,97,601,630),10004=>array(104,87,649,631),10005=>array(114,72,641,657),10006=>array(77,31,677,698),10007=>array(105,-9,631,732),10008=>array(110,0,679,739),10009=>array(49,0,705,729),10010=>array(49,0,705,729),10011=>array(49,0,705,729),10012=>array(49,0,705,729),10013=>array(148,0,606,729),10014=>array(118,0,610,729),10015=>array(140,0,615,729),10016=>array(49,0,705,729),10017=>array(82,-13,672,744),10018=>array(37,-14,717,742),10019=>array(38,-12,716,742),10020=>array(36,-14,718,742),10021=>array(37,-13,717,743),10022=>array(38,-14,717,745),10023=>array(38,-14,717,745),10025=>array(21,-9,733,743),10026=>array(38,-14,716,742),10027=>array(21,-9,733,743),10028=>array(21,-9,733,743),10029=>array(21,-9,733,743),10030=>array(21,-9,733,743),10031=>array(21,-9,733,743),10032=>array(22,12,734,714),10033=>array(58,0,696,729),10034=>array(66,0,688,729),10035=>array(49,0,705,729),10036=>array(28,-14,708,742),10037=>array(37,-14,717,742),10038=>array(82,-14,672,742),10039=>array(37,-14,717,742),10040=>array(37,-14,717,742),10041=>array(37,-14,717,742),10042=>array(49,0,705,729),10043=>array(73,-14,681,742),10044=>array(73,-14,681,742),10045=>array(76,-14,678,742),10046=>array(71,-14,683,742),10047=>array(48,0,706,709),10048=>array(48,0,706,709),10049=>array(37,-14,717,742),10050=>array(38,-14,716,742),10051=>array(71,-14,683,742),10052=>array(80,0,674,729),10053=>array(68,0,686,729),10054=>array(57,2,696,729),10055=>array(70,-13,684,742),10056=>array(42,-13,712,730),10057=>array(42,-13,712,730),10058=>array(37,-13,717,743),10059=>array(37,-13,717,743),10061=>array(44,-10,762,738),10063=>array(53,-49,753,729),10064=>array(53,0,753,777),10065=>array(53,-49,753,729),10066=>array(53,0,753,777),10070=>array(75,-2,732,728),10072=>array(339,-240,415,760),10073=>array(302,-240,452,760),10074=>array(228,-240,527,760),10075=>array(76,395,237,729),10076=>array(53,395,214,729),10077=>array(76,395,432,729),10078=>array(53,395,408,729),10081=>array(140,-93,695,851),10082=>array(182,-17,572,742),10083=>array(146,-17,607,742),10084=>array(48,83,706,645),10085=>array(151,-1,656,729),10086=>array(55,21,652,702),10087=>array(70,169,684,564),10088=>array(176,-139,583,769),10089=>array(176,-139,583,769),10090=>array(237,-132,517,758),10091=>array(237,-132,517,758),10092=>array(193,-240,546,760),10093=>array(208,-240,561,760),10094=>array(127,-240,617,760),10095=>array(137,-240,626,760),10096=>array(149,-240,590,760),10097=>array(165,-240,605,760),10098=>array(311,-241,482,760),10099=>array(272,-241,443,760),10100=>array(157,-163,571,760),10101=>array(183,-163,597,760),10102=>array(53,-15,709,715),10103=>array(53,-15,709,715),10104=>array(53,-15,709,715),10105=>array(53,-15,709,715),10106=>array(53,-15,709,715),10107=>array(53,-15,709,715),10108=>array(53,-15,709,715),10109=>array(53,-15,709,715),10110=>array(53,-15,709,715),10111=>array(53,-15,709,715),10112=>array(4,-52,750,780),10113=>array(4,-52,750,780),10114=>array(4,-52,750,780),10115=>array(4,-52,750,780),10116=>array(4,-52,750,780),10117=>array(4,-52,750,780),10118=>array(4,-52,750,780),10119=>array(4,-52,750,780),10120=>array(4,-52,750,780),10121=>array(4,-52,750,780),10122=>array(4,-52,750,780),10123=>array(4,-52,750,780),10124=>array(4,-52,750,780),10125=>array(4,-52,750,780),10126=>array(4,-52,750,780),10127=>array(4,-52,750,780),10128=>array(4,-52,750,780),10129=>array(4,-52,750,780),10130=>array(4,-52,750,780),10131=>array(4,-52,750,780),10132=>array(51,75,710,552),10136=>array(110,55,614,614),10137=>array(51,100,710,527),10138=>array(110,13,614,572),10139=>array(51,129,710,498),10140=>array(51,57,688,570),10141=>array(51,100,710,527),10142=>array(51,100,710,527),10143=>array(51,100,710,527),10144=>array(51,100,710,527),10145=>array(51,46,730,581),10146=>array(100,94,710,533),10147=>array(100,94,710,533),10148=>array(100,-4,710,631),10149=>array(51,100,710,548),10150=>array(51,79,710,527),10151=>array(216,-7,545,634),10152=>array(51,100,710,527),10153=>array(51,75,688,552),10154=>array(51,75,688,552),10155=>array(19,12,715,586),10156=>array(19,12,715,586),10157=>array(122,0,697,574),10158=>array(122,0,697,574),10159=>array(56,49,719,574),10161=>array(56,49,719,574),10162=>array(139,-20,649,585),10163=>array(57,157,710,470),10164=>array(72,55,614,655),10165=>array(51,173,710,454),10166=>array(73,-29,614,572),10167=>array(73,55,614,655),10168=>array(51,172,710,455),10169=>array(73,-28,614,572),10170=>array(50,84,710,543),10171=>array(66,140,702,487),10172=>array(71,167,697,460),10173=>array(71,118,697,509),10174=>array(51,81,710,546),10181=>array(0,-163,394,769),10182=>array(-35,-163,427,769),10208=>array(2,-233,442,807),10214=>array(6,-132,448,760),10215=>array(6,-132,448,760),10216=>array(94,-132,417,759),10217=>array(-6,-132,317,759),10218=>array(94,-132,655,759),10219=>array(-6,-132,554,759),10224=>array(37,0,717,732),10225=>array(38,-3,718,729),10226=>array(8,45,734,685),10227=>array(20,45,747,685),10228=>array(51,-14,998,643),10229=>array(44,87,1239,540),10230=>array(51,87,1247,540),10231=>array(44,87,1247,540),10232=>array(44,87,1239,540),10233=>array(51,87,1247,540),10234=>array(44,87,1247,540),10235=>array(44,87,1239,540),10236=>array(51,87,1247,540),10237=>array(44,87,1239,540),10238=>array(51,87,1247,540),10239=>array(51,87,1247,540),10241=>array(132,586,308,781),10242=>array(132,325,308,521),10243=>array(132,325,308,781),10244=>array(132,65,308,261),10245=>array(132,65,308,781),10246=>array(132,65,308,521),10247=>array(132,65,308,781),10248=>array(396,586,571,781),10249=>array(132,586,571,781),10250=>array(132,325,571,781),10251=>array(132,325,571,781),10252=>array(132,65,571,781),10253=>array(132,65,571,781),10254=>array(132,65,571,781),10255=>array(132,65,571,781),10256=>array(396,325,571,521),10257=>array(132,325,571,781),10258=>array(132,325,571,521),10259=>array(132,325,571,781),10260=>array(132,65,571,521),10261=>array(132,65,571,781),10262=>array(132,65,571,521),10263=>array(132,65,571,781),10264=>array(396,325,571,781),10265=>array(132,325,571,781),10266=>array(132,325,571,781),10267=>array(132,325,571,781),10268=>array(132,65,571,781),10269=>array(132,65,571,781),10270=>array(132,65,571,781),10271=>array(132,65,571,781),10272=>array(396,65,571,261),10273=>array(132,65,571,781),10274=>array(132,65,571,521),10275=>array(132,65,571,781),10276=>array(132,65,571,261),10277=>array(132,65,571,781),10278=>array(132,65,571,521),10279=>array(132,65,571,781),10280=>array(396,65,571,781),10281=>array(132,65,571,781),10282=>array(132,65,571,781),10283=>array(132,65,571,781),10284=>array(132,65,571,781),10285=>array(132,65,571,781),10286=>array(132,65,571,781),10287=>array(132,65,571,781),10288=>array(396,65,571,521),10289=>array(132,65,571,781),10290=>array(132,65,571,521),10291=>array(132,65,571,781),10292=>array(132,65,571,521),10293=>array(132,65,571,781),10294=>array(132,65,571,521),10295=>array(132,65,571,781),10296=>array(396,65,571,781),10297=>array(132,65,571,781),10298=>array(132,65,571,781),10299=>array(132,65,571,781),10300=>array(132,65,571,781),10301=>array(132,65,571,781),10302=>array(132,65,571,781),10303=>array(132,65,571,781),10304=>array(132,-195,308,0),10305=>array(132,-195,308,781),10306=>array(132,-195,308,521),10307=>array(132,-195,308,781),10308=>array(132,-195,308,261),10309=>array(132,-195,308,781),10310=>array(132,-195,308,521),10311=>array(132,-195,308,781),10312=>array(132,-195,571,781),10313=>array(132,-195,571,781),10314=>array(132,-195,571,781),10315=>array(132,-195,571,781),10316=>array(132,-195,571,781),10317=>array(132,-195,571,781),10318=>array(132,-195,571,781),10319=>array(132,-195,571,781),10320=>array(132,-195,571,521),10321=>array(132,-195,571,781),10322=>array(132,-195,571,521),10323=>array(132,-195,571,781),10324=>array(132,-195,571,521),10325=>array(132,-195,571,781),10326=>array(132,-195,571,521),10327=>array(132,-195,571,781),10328=>array(132,-195,571,781),10329=>array(132,-195,571,781),10330=>array(132,-195,571,781),10331=>array(132,-195,571,781),10332=>array(132,-195,571,781),10333=>array(132,-195,571,781),10334=>array(132,-195,571,781),10335=>array(132,-195,571,781),10336=>array(132,-195,571,261),10337=>array(132,-195,571,781),10338=>array(132,-195,571,521),10339=>array(132,-195,571,781),10340=>array(132,-195,571,261),10341=>array(132,-195,571,781),10342=>array(132,-195,571,521),10343=>array(132,-195,571,781),10344=>array(132,-195,571,781),10345=>array(132,-195,571,781),10346=>array(132,-195,571,781),10347=>array(132,-195,571,781),10348=>array(132,-195,571,781),10349=>array(132,-195,571,781),10350=>array(132,-195,571,781),10351=>array(132,-195,571,781),10352=>array(132,-195,571,521),10353=>array(132,-195,571,781),10354=>array(132,-195,571,521),10355=>array(132,-195,571,781),10356=>array(132,-195,571,521),10357=>array(132,-195,571,781),10358=>array(132,-195,571,521),10359=>array(132,-195,571,781),10360=>array(132,-195,571,781),10361=>array(132,-195,571,781),10362=>array(132,-195,571,781),10363=>array(132,-195,571,781),10364=>array(132,-195,571,781),10365=>array(132,-195,571,781),10366=>array(132,-195,571,781),10367=>array(132,-195,571,781),10368=>array(396,-195,571,0),10369=>array(132,-195,571,781),10370=>array(132,-195,571,521),10371=>array(132,-195,571,781),10372=>array(132,-195,571,261),10373=>array(132,-195,571,781),10374=>array(132,-195,571,521),10375=>array(132,-195,571,781),10376=>array(396,-195,571,781),10377=>array(132,-195,571,781),10378=>array(132,-195,571,781),10379=>array(132,-195,571,781),10380=>array(132,-195,571,781),10381=>array(132,-195,571,781),10382=>array(132,-195,571,781),10383=>array(132,-195,571,781),10384=>array(396,-195,571,521),10385=>array(132,-195,571,781),10386=>array(132,-195,571,521),10387=>array(132,-195,571,781),10388=>array(132,-195,571,521),10389=>array(132,-195,571,781),10390=>array(132,-195,571,521),10391=>array(132,-195,571,781),10392=>array(396,-195,571,781),10393=>array(132,-195,571,781),10394=>array(132,-195,571,781),10395=>array(132,-195,571,781),10396=>array(132,-195,571,781),10397=>array(132,-195,571,781),10398=>array(132,-195,571,781),10399=>array(132,-195,571,781),10400=>array(396,-195,571,261),10401=>array(132,-195,571,781),10402=>array(132,-195,571,521),10403=>array(132,-195,571,781),10404=>array(132,-195,571,261),10405=>array(132,-195,571,781),10406=>array(132,-195,571,521),10407=>array(132,-195,571,781),10408=>array(396,-195,571,781),10409=>array(132,-195,571,781),10410=>array(132,-195,571,781),10411=>array(132,-195,571,781),10412=>array(132,-195,571,781),10413=>array(132,-195,571,781),10414=>array(132,-195,571,781),10415=>array(132,-195,571,781),10416=>array(396,-195,571,521),10417=>array(132,-195,571,781),10418=>array(132,-195,571,521),10419=>array(132,-195,571,781),10420=>array(132,-195,571,521),10421=>array(132,-195,571,781),10422=>array(132,-195,571,521),10423=>array(132,-195,571,781),10424=>array(396,-195,571,781),10425=>array(132,-195,571,781),10426=>array(132,-195,571,781),10427=>array(132,-195,571,781),10428=>array(132,-195,571,781),10429=>array(132,-195,571,781),10430=>array(132,-195,571,781),10431=>array(132,-195,571,781),10432=>array(132,-195,571,0),10433=>array(132,-195,571,781),10434=>array(132,-195,571,521),10435=>array(132,-195,571,781),10436=>array(132,-195,571,261),10437=>array(132,-195,571,781),10438=>array(132,-195,571,521),10439=>array(132,-195,571,781),10440=>array(132,-195,571,781),10441=>array(132,-195,571,781),10442=>array(132,-195,571,781),10443=>array(132,-195,571,781),10444=>array(132,-195,571,781),10445=>array(132,-195,571,781),10446=>array(132,-195,571,781),10447=>array(132,-195,571,781),10448=>array(132,-195,571,521),10449=>array(132,-195,571,781),10450=>array(132,-195,571,521),10451=>array(132,-195,571,781),10452=>array(132,-195,571,521),10453=>array(132,-195,571,781),10454=>array(132,-195,571,521),10455=>array(132,-195,571,781),10456=>array(132,-195,571,781),10457=>array(132,-195,571,781),10458=>array(132,-195,571,781),10459=>array(132,-195,571,781),10460=>array(132,-195,571,781),10461=>array(132,-195,571,781),10462=>array(132,-195,571,781),10463=>array(132,-195,571,781),10464=>array(132,-195,571,261),10465=>array(132,-195,571,781),10466=>array(132,-195,571,521),10467=>array(132,-195,571,781),10468=>array(132,-195,571,261),10469=>array(132,-195,571,781),10470=>array(132,-195,571,521),10471=>array(132,-195,571,781),10472=>array(132,-195,571,781),10473=>array(132,-195,571,781),10474=>array(132,-195,571,781),10475=>array(132,-195,571,781),10476=>array(132,-195,571,781),10477=>array(132,-195,571,781),10478=>array(132,-195,571,781),10479=>array(132,-195,571,781),10480=>array(132,-195,571,521),10481=>array(132,-195,571,781),10482=>array(132,-195,571,521),10483=>array(132,-195,571,781),10484=>array(132,-195,571,521),10485=>array(132,-195,571,781),10486=>array(132,-195,571,521),10487=>array(132,-195,571,781),10488=>array(132,-195,571,781),10489=>array(132,-195,571,781),10490=>array(132,-195,571,781),10491=>array(132,-195,571,781),10492=>array(132,-195,571,781),10493=>array(132,-195,571,781),10494=>array(132,-195,571,781),10495=>array(132,-195,571,781),10502=>array(44,87,703,540),10503=>array(51,87,710,540),10506=>array(119,0,637,732),10507=>array(119,0,637,732),10560=>array(78,45,653,853),10561=>array(78,45,653,853),10627=>array(105,-163,646,760),10628=>array(31,-163,573,760),10702=>array(95,-258,659,800),10703=>array(95,-1,847,628),10704=>array(95,-1,847,628),10705=>array(95,-48,805,674),10706=>array(95,-48,805,674),10707=>array(95,-48,805,674),10708=>array(95,-48,805,675),10709=>array(95,-48,805,675),10731=>array(2,-233,442,807),10746=>array(95,0,659,627),10747=>array(95,0,659,627),10752=>array(25,-211,875,734),10753=>array(25,-211,875,734),10754=>array(25,-211,875,734),10764=>array(13,-227,1482,754),10765=>array(13,-227,493,754),10766=>array(13,-227,493,754),10767=>array(13,-227,493,754),10768=>array(13,-227,493,754),10769=>array(13,-227,519,754),10770=>array(13,-227,493,754),10771=>array(13,-227,493,754),10772=>array(13,-228,586,754),10773=>array(13,-227,493,754),10774=>array(13,-227,493,754),10775=>array(-27,-227,500,754),10776=>array(13,-227,493,754),10777=>array(13,-227,493,754),10778=>array(13,-227,493,754),10779=>array(13,-227,493,898),10780=>array(13,-372,493,754),10799=>array(112,20,642,607),10858=>array(95,212,659,660),10859=>array(95,-34,659,660),10877=>array(95,-150,659,632),10878=>array(95,-150,659,632),10879=>array(95,-150,659,632),10880=>array(95,-150,659,632),10881=>array(95,-150,659,688),10882=>array(95,-150,659,688),10883=>array(95,-150,659,827),10884=>array(95,-150,659,827),10885=>array(95,-217,659,630),10886=>array(95,-217,659,630),10887=>array(95,-124,659,582),10888=>array(95,-124,659,582),10889=>array(95,-281,659,630),10890=>array(95,-281,659,630),10891=>array(95,-303,659,814),10892=>array(95,-303,659,814),10893=>array(95,-183,659,653),10894=>array(95,-183,659,653),10895=>array(95,-245,659,765),10896=>array(95,-245,659,765),10897=>array(96,-278,659,782),10898=>array(96,-278,659,782),10899=>array(95,-263,659,771),10900=>array(95,-263,659,771),10901=>array(95,-50,659,733),10902=>array(95,-50,659,733),10903=>array(95,-50,659,733),10904=>array(95,-50,659,733),10905=>array(96,-45,659,678),10906=>array(96,-45,659,678),10907=>array(95,-81,659,724),10908=>array(95,-81,659,724),10909=>array(95,13,659,680),10910=>array(95,13,659,680),10911=>array(95,-239,659,746),10912=>array(95,-239,659,746),10926=>array(95,22,659,656),10927=>array(95,-83,659,684),10928=>array(95,-83,659,684),10929=>array(95,-246,659,684),10930=>array(95,-246,659,684),10931=>array(95,-205,659,672),10932=>array(95,-205,659,672),10933=>array(95,-304,659,672),10934=>array(95,-304,659,672),10935=>array(95,-252,659,713),10936=>array(95,-252,659,713),10937=>array(95,-316,659,713),10938=>array(95,-316,659,713),11001=>array(95,-195,659,609),11002=>array(95,-195,659,609),11008=>array(110,-23,670,598),11009=>array(84,-23,644,598),11010=>array(110,-23,670,598),11011=>array(84,-23,644,598),11012=>array(24,46,710,581),11013=>array(24,46,703,581),11014=>array(136,0,618,754),11015=>array(136,-25,618,729),11016=>array(110,-23,670,598),11017=>array(84,-23,644,598),11018=>array(110,-23,670,598),11019=>array(84,-23,644,598),11020=>array(24,46,710,581),11021=>array(136,-25,618,754),11022=>array(51,-25,721,372),11023=>array(51,255,721,652),11024=>array(34,-25,703,372),11025=>array(34,255,703,652),11026=>array(82,-124,769,643),11027=>array(82,-124,769,643),11028=>array(82,-124,769,643),11029=>array(82,-124,769,643),11030=>array(2,-124,690,643),11031=>array(2,-124,690,643),11032=>array(2,-124,690,643),11033=>array(2,-124,690,643),11034=>array(82,-124,769,643),11039=>array(16,-26,767,767),11040=>array(16,-26,767,767),11041=>array(66,-91,720,748),11042=>array(66,-91,720,748),11043=>array(15,-35,771,692),11044=>array(49,-250,958,770),11091=>array(34,-47,749,788),11092=>array(34,-47,749,788),11360=>array(-22,0,510,729),11361=>array(-31,0,352,760),11362=>array(-25,0,510,729),11363=>array(16,0,645,729),11364=>array(48,-200,638,729),11365=>array(-19,-46,623,594),11366=>array(-5,-93,478,822),11367=>array(32,-157,813,729),11368=>array(21,-138,693,760),11369=>array(32,-157,770,729),11370=>array(21,-138,638,760),11371=>array(-10,-157,680,729),11372=>array(4,-138,545,547),11373=>array(43,-14,756,741),11374=>array(36,-200,894,729),11375=>array(68,0,756,729),11376=>array(-21,-14,702,741),11377=>array(60,0,718,560),11378=>array(89,0,1137,742),11379=>array(78,0,968,560),11380=>array(40,0,618,586),11381=>array(19,0,561,729),11382=>array(27,0,444,547),11383=>array(57,0,652,552),11385=>array(9,-13,476,760),11386=>array(39,-14,580,560),11387=>array(22,0,468,547),11388=>array(-67,-121,197,425),11389=>array(38,326,472,734),11390=>array(33,-240,619,742),11391=>array(-2,-240,687,729),11520=>array(37,-64,574,547),11521=>array(-11,-232,597,546),11522=>array(25,-232,572,547),11523=>array(38,-10,581,807),11524=>array(26,-228,578,546),11525=>array(19,-228,915,546),11526=>array(66,-8,627,816),11527=>array(27,-9,903,547),11528=>array(38,0,556,547),11529=>array(26,-227,579,816),11530=>array(18,-9,913,546),11531=>array(31,-8,619,816),11532=>array(18,0,590,816),11533=>array(27,-8,923,546),11534=>array(26,-8,600,546),11535=>array(49,-228,787,816),11536=>array(27,-9,905,816),11537=>array(26,-9,602,816),11538=>array(23,-232,569,546),11539=>array(26,-228,922,661),11540=>array(36,-228,882,546),11541=>array(23,-228,909,816),11542=>array(22,0,591,546),11543=>array(26,-228,602,547),11544=>array(26,-232,598,546),11545=>array(24,-228,591,816),11546=>array(23,-232,569,547),11547=>array(36,-9,626,816),11548=>array(22,-228,917,547),11549=>array(21,-232,577,546),11550=>array(28,-232,609,546),11551=>array(14,-228,588,567),11552=>array(22,-9,938,546),11553=>array(27,-228,583,816),11554=>array(34,-9,563,626),11555=>array(35,-228,593,816),11556=>array(26,-228,649,546),11557=>array(36,-8,884,816),11800=>array(33,-13,445,729),11807=>array(95,-34,659,415),11810=>array(69,314,419,760),11811=>array(111,314,404,760),11812=>array(-9,-132,283,314),11813=>array(-25,-132,326,314),11822=>array(93,0,522,742),19904=>array(75,-158,732,729),19905=>array(75,-158,732,729),19906=>array(75,-158,732,729),19907=>array(75,-158,732,729),19908=>array(75,-158,732,729),19909=>array(75,-158,732,729),19910=>array(75,-158,732,729),19911=>array(75,-158,732,729),19912=>array(75,-158,732,729),19913=>array(75,-158,733,729),19914=>array(75,-158,732,729),19915=>array(75,-158,732,729),19916=>array(75,-158,732,729),19917=>array(75,-158,732,729),19918=>array(75,-158,732,729),19919=>array(75,-158,732,729),19920=>array(75,-158,733,729),19921=>array(75,-158,732,729),19922=>array(75,-158,733,729),19923=>array(75,-158,732,729),19924=>array(75,-158,732,729),19925=>array(75,-158,732,729),19926=>array(75,-158,732,729),19927=>array(75,-158,732,729),19928=>array(75,-158,732,729),19929=>array(75,-158,732,729),19930=>array(75,-158,732,729),19931=>array(75,-158,733,729),19932=>array(75,-158,732,729),19933=>array(75,-158,732,729),19934=>array(75,-158,733,729),19935=>array(75,-158,732,729),19936=>array(75,-158,732,729),19937=>array(75,-158,732,729),19938=>array(75,-158,732,729),19939=>array(75,-158,732,729),19940=>array(75,-158,732,729),19941=>array(75,-158,733,729),19942=>array(75,-158,732,729),19943=>array(75,-158,732,729),19944=>array(75,-158,733,729),19945=>array(75,-158,732,729),19946=>array(75,-158,733,729),19947=>array(75,-158,732,729),19948=>array(75,-158,733,729),19949=>array(75,-158,732,729),19950=>array(75,-158,733,729),19951=>array(75,-158,732,729),19952=>array(75,-158,733,729),19953=>array(75,-158,732,729),19954=>array(75,-158,732,729),19955=>array(75,-158,732,729),19956=>array(75,-158,732,729),19957=>array(75,-158,733,729),19958=>array(75,-158,732,729),19959=>array(75,-158,732,729),19960=>array(75,-158,732,729),19961=>array(75,-158,733,729),19962=>array(75,-158,732,729),19963=>array(75,-158,733,729),19964=>array(75,-158,733,729),19965=>array(75,-158,732,729),19966=>array(75,-158,732,729),19967=>array(75,-158,732,729),42192=>array(19,0,629,729),42193=>array(19,0,647,729),42194=>array(15,0,641,729),42195=>array(19,0,708,729),42196=>array(43,0,673,729),42197=>array(-59,0,571,729),42198=>array(32,-14,700,742),42199=>array(19,0,753,729),42200=>array(-59,0,679,729),42201=>array(6,-14,523,729),42202=>array(32,-14,652,742),42203=>array(-12,-14,607,742),42204=>array(-23,0,667,729),42205=>array(19,0,603,729),42206=>array(19,0,603,729),42207=>array(19,0,877,729),42208=>array(19,0,734,729),42209=>array(19,0,510,729),42210=>array(13,-14,599,742),42211=>array(19,0,617,729),42212=>array(73,0,674,729),42213=>array(-60,0,628,729),42214=>array(68,0,756,729),42215=>array(19,0,734,729),42216=>array(4,-14,672,742),42217=>array(17,0,533,743),42218=>array(96,0,1029,729),42219=>array(-46,0,731,729),42220=>array(57,0,729,729),42221=>array(60,0,667,729),42222=>array(-59,0,622,729),42223=>array(68,0,756,729),42224=>array(19,0,603,729),42225=>array(12,0,596,729),42226=>array(19,0,316,729),42227=>array(32,-14,733,742),42228=>array(61,-14,712,729),42229=>array(18,0,660,743),42230=>array(8,0,499,729),42231=>array(43,0,729,729),42232=>array(15,0,207,189),42233=>array(-57,-142,205,189),42234=>array(15,0,523,189),42235=>array(15,-142,521,189),42236=>array(-67,-142,256,547),42237=>array(1,0,256,547),42238=>array(79,0,499,405),42239=>array(35,134,495,492),42564=>array(-1,-14,568,742),42565=>array(-6,-14,480,560),42566=>array(66,0,346,729),42567=>array(66,-1,293,547),42572=>array(33,-14,1213,654),42573=>array(28,-13,1016,547),42576=>array(83,0,1092,729),42577=>array(46,0,901,547),42580=>array(40,-14,1038,742),42581=>array(33,-14,848,560),42582=>array(19,0,916,729),42583=>array(27,-14,815,560),42594=>array(-23,-157,1029,729),42595=>array(-9,-138,870,547),42596=>array(-22,0,1026,729),42597=>array(1,0,848,547),42598=>array(19,0,1173,729),42599=>array(25,0,921,547),42600=>array(32,-14,733,742),42601=>array(32,-14,586,560),42602=>array(44,-14,889,742),42603=>array(39,-14,743,560),42604=>array(44,-14,1221,742),42605=>array(39,-14,957,560),42606=>array(25,-208,839,743),42634=>array(43,-200,777,729),42635=>array(30,-216,605,547),42636=>array(43,0,673,729),42637=>array(30,0,563,547),42644=>array(95,0,714,729),42645=>array(9,0,563,760),42760=>array(131,0,424,693),42761=>array(105,0,424,693),42762=>array(79,0,424,693),42763=>array(52,0,424,693),42764=>array(26,0,424,693),42765=>array(26,0,424,693),42766=>array(26,0,398,693),42767=>array(26,0,372,693),42768=>array(26,0,345,693),42769=>array(26,0,319,693),42770=>array(26,0,424,693),42771=>array(26,0,398,693),42772=>array(26,0,372,693),42773=>array(26,0,345,693),42774=>array(26,0,319,693),42779=>array(162,326,418,736),42780=>array(127,324,384,734),42781=>array(136,326,308,734),42782=>array(136,326,308,734),42783=>array(79,0,250,408),42786=>array(27,0,389,729),42787=>array(34,0,333,547),42788=>array(49,224,477,742),42789=>array(49,42,477,560),42790=>array(36,-200,752,729),42791=>array(28,-216,581,760),42792=>array(62,-216,886,729),42793=>array(43,-215,729,702),42794=>array(33,-14,587,742),42795=>array(-2,-202,465,560),42800=>array(35,0,474,547),42801=>array(9,-14,504,560),42802=>array(-60,0,1146,729),42803=>array(20,-14,883,560),42804=>array(-59,-14,1124,742),42805=>array(15,-14,926,560),42806=>array(-59,-14,1102,729),42807=>array(15,-14,919,560),42808=>array(-60,0,1031,729),42809=>array(20,-14,865,560),42810=>array(-60,0,1031,729),42811=>array(20,-14,865,560),42812=>array(-41,-216,1010,729),42813=>array(37,-216,882,560),42814=>array(-12,-14,603,742),42815=>array(-7,-14,483,560),42816=>array(19,0,753,729),42817=>array(27,0,645,760),42822=>array(72,0,701,729),42823=>array(62,0,425,760),42824=>array(59,0,551,729),42825=>array(72,0,468,760),42826=>array(4,-14,823,742),42827=>array(-4,-14,739,560),42830=>array(44,-14,1221,742),42831=>array(39,-14,957,560),42832=>array(-38,0,650,729),42833=>array(-73,-208,611,560),42834=>array(-1,0,844,729),42835=>array(0,-208,810,560),42838=>array(35,-188,729,742),42839=>array(30,-208,614,559),42852=>array(19,0,628,729),42853=>array(-10,-208,611,760),42854=>array(-45,0,628,729),42855=>array(-74,-208,611,760),42880=>array(63,0,555,729),42881=>array(9,-208,299,547),42882=>array(-8,-208,698,742),42883=>array(-9,-208,589,560),42889=>array(37,0,291,547),42890=>array(57,141,300,405),42891=>array(127,245,349,729),42892=>array(62,458,214,729),42893=>array(90,0,708,729),42894=>array(83,-216,552,760),42896=>array(19,-157,742,729),42897=>array(27,-138,626,560),42912=>array(-15,-14,754,742),42913=>array(-18,-216,662,559),42914=>array(-14,0,753,729),42915=>array(-17,0,645,760),42916=>array(-15,0,769,729),42917=>array(-18,0,659,560),42918=>array(-14,0,707,729),42919=>array(-13,0,491,560),42920=>array(-13,-14,661,742),42921=>array(-15,-14,551,560),42922=>array(-33,0,778,729),43002=>array(27,0,923,547),43003=>array(83,0,596,729),43004=>array(59,0,641,729),43005=>array(19,0,876,729),43006=>array(1,0,333,928),43007=>array(-36,0,1229,729),61184=>array(127,602,346,693),61185=>array(75,451,365,693),61186=>array(26,301,387,693),61187=>array(-11,150,396,693),61188=>array(-43,0,401,693),61189=>array(90,451,339,693),61190=>array(101,451,320,543),61191=>array(48,301,339,543),61192=>array(0,150,361,543),61193=>array(-37,0,370,543),61194=>array(74,301,334,693),61195=>array(63,301,313,543),61196=>array(74,301,293,393),61197=>array(22,150,313,393),61198=>array(-26,0,334,393),61199=>array(67,150,317,693),61200=>array(47,149,308,542),61201=>array(37,150,286,393),61202=>array(48,150,267,242),61203=>array(-4,0,286,242),61204=>array(65,0,296,693),61205=>array(41,0,291,543),61206=>array(21,0,282,393),61207=>array(11,0,260,242),61208=>array(22,0,241,92),61209=>array(26,0,230,693),62464=>array(76,-14,553,819),62465=>array(81,-15,549,823),62466=>array(78,-14,587,828),62467=>array(111,0,858,828),62468=>array(71,-15,611,828),62469=>array(73,-15,592,828),62470=>array(116,-15,610,828),62471=>array(83,-14,854,828),62472=>array(88,0,580,828),62473=>array(71,-14,616,820),62474=>array(125,-6,1096,828),62475=>array(73,-14,606,828),62476=>array(79,-15,607,820),62477=>array(97,0,844,828),62478=>array(70,-15,589,819),62479=>array(79,-15,650,840),62480=>array(89,0,844,828),62481=>array(88,-14,556,819),62482=>array(87,-14,707,828),62483=>array(72,-14,612,828),62484=>array(122,-14,853,828),62485=>array(70,-14,646,819),62486=>array(101,0,867,828),62487=>array(66,-14,646,820),62488=>array(65,-14,605,828),62489=>array(36,0,564,828),62490=>array(89,-15,644,820),62491=>array(78,-14,646,819),62492=>array(81,-14,656,828),62493=>array(70,-14,647,820),62494=>array(84,-14,557,819),62495=>array(26,-14,561,828),62496=>array(73,-15,593,828),62497=>array(79,-15,609,828),62498=>array(12,-73,593,828),62499=>array(69,-15,647,830),62500=>array(70,-15,653,828),62501=>array(68,-14,659,828),62502=>array(114,-14,915,828),62504=>array(36,-228,884,816),62505=>array(43,-223,739,843),62506=>array(73,-14,509,761),62507=>array(73,-14,510,773),62508=>array(73,-14,528,866),62509=>array(73,-14,561,812),62510=>array(73,-14,544,877),62511=>array(73,-14,520,803),62512=>array(27,-232,517,761),62513=>array(27,-232,568,793),62514=>array(27,-232,584,891),62515=>array(27,-232,541,803),62516=>array(72,0,531,761),62517=>array(72,0,573,793),62518=>array(72,0,541,803),62519=>array(87,-0,732,761),62520=>array(87,-0,732,773),62521=>array(87,-0,732,884),62522=>array(87,-0,732,793),62523=>array(87,-0,732,803),62524=>array(68,-232,559,761),62525=>array(68,-232,559,773),62526=>array(68,-232,567,894),62527=>array(68,-232,572,793),62528=>array(68,-232,559,803),62529=>array(68,-232,559,844),62917=>array(14,-14,583,760),64256=>array(44,0,824,760),64257=>array(44,0,718,760),64258=>array(44,0,718,760),64259=>array(44,0,1015,760),64260=>array(44,0,1016,760),64261=>array(41,0,752,760),64262=>array(7,-14,943,742),64275=>array(42,-14,1201,760),64276=>array(42,-14,1201,760),64277=>array(59,-208,1180,760),64278=>array(59,-208,1217,760),64279=>array(59,-208,1514,760),64285=>array(88,38,301,547),64286=>array(174,635,472,780),64287=>array(88,36,589,547),64288=>array(34,0,627,547),64289=>array(107,0,834,547),64290=>array(114,0,754,547),64291=>array(90,0,756,547),64292=>array(39,0,711,547),64293=>array(114,0,753,739),64294=>array(82,0,757,547),64295=>array(114,0,714,547),64296=>array(43,-4,718,547),64297=>array(140,256,724,627),64298=>array(80,0,771,710),64299=>array(80,0,771,723),64300=>array(80,0,771,710),64301=>array(80,0,771,710),64302=>array(94,-171,657,547),64303=>array(94,-217,657,547),64304=>array(94,-171,657,547),64305=>array(39,0,531,547),64306=>array(40,-9,385,547),64307=>array(114,0,586,547),64308=>array(90,0,595,547),64309=>array(66,0,407,547),64310=>array(66,0,494,547),64312=>array(127,-13,608,553),64313=>array(90,164,428,547),64314=>array(114,-240,494,547),64315=>array(39,0,513,547),64316=>array(114,0,570,711),64318=>array(76,0,621,554),64320=>array(39,0,387,547),64321=>array(130,-13,610,547),64323=>array(142,-240,577,547),64324=>array(82,0,590,547),64326=>array(48,0,604,547),64327=>array(46,-240,690,546),64328=>array(114,0,517,547),64329=>array(80,0,771,547),64330=>array(10,-4,585,547),64331=>array(82,0,323,710),64332=>array(39,0,531,710),64333=>array(39,0,513,710),64334=>array(82,0,590,710),64335=>array(42,0,659,729),65056=>array(-249,735,154,880),65057=>array(141,735,507,880),65058=>array(-193,756,152,894),65059=>array(136,756,482,894),65533=>array(89,-139,1048,926),65535=>array(44,-177,495,705)); -$cw=array(0=>540,32=>313,33=>410,34=>469,35=>626,36=>626,37=>901,38=>785,39=>275,40=>411,41=>411,42=>470,43=>754,44=>342,45=>374,46=>342,47=>329,48=>626,49=>626,50=>626,51=>626,52=>626,53=>626,54=>626,55=>626,56=>626,57=>626,58=>360,59=>360,60=>754,61=>754,62=>754,63=>522,64=>900,65=>696,66=>686,67=>660,68=>747,69=>615,70=>615,71=>738,72=>753,73=>334,74=>334,75=>697,76=>573,77=>896,78=>753,79=>765,80=>659,81=>765,82=>693,83=>648,84=>614,85=>730,86=>696,87=>993,88=>694,89=>651,90=>652,91=>411,92=>329,93=>411,94=>754,95=>450,96=>450,97=>607,98=>644,99=>533,100=>644,101=>610,102=>391,103=>644,104=>641,105=>308,106=>308,107=>598,108=>308,109=>938,110=>641,111=>618,112=>644,113=>644,114=>444,115=>536,116=>430,117=>641,118=>586,119=>831,120=>580,121=>586,122=>523,123=>641,124=>329,125=>641,126=>754,160=>313,161=>410,162=>626,163=>626,164=>572,165=>626,166=>329,167=>450,168=>450,169=>900,170=>507,171=>584,172=>754,173=>374,174=>900,175=>450,176=>450,177=>754,178=>394,179=>394,180=>450,181=>662,182=>572,183=>342,184=>450,185=>394,186=>507,187=>584,188=>932,189=>932,190=>932,191=>522,192=>696,193=>696,194=>696,195=>696,196=>696,197=>696,198=>976,199=>660,200=>615,201=>615,202=>615,203=>615,204=>334,205=>334,206=>334,207=>334,208=>760,209=>753,210=>765,211=>765,212=>765,213=>765,214=>765,215=>754,216=>765,217=>730,218=>730,219=>730,220=>730,221=>651,222=>668,223=>647,224=>607,225=>607,226=>607,227=>607,228=>607,229=>607,230=>943,231=>533,232=>610,233=>610,234=>610,235=>610,236=>308,237=>308,238=>308,239=>308,240=>618,241=>641,242=>618,243=>618,244=>618,245=>618,246=>618,247=>754,248=>618,249=>641,250=>641,251=>641,252=>641,253=>586,254=>644,255=>586,256=>696,257=>607,258=>696,259=>607,260=>696,261=>607,262=>660,263=>533,264=>660,265=>533,266=>660,267=>533,268=>660,269=>533,270=>747,271=>644,272=>760,273=>644,274=>615,275=>610,276=>615,277=>610,278=>615,279=>610,280=>615,281=>610,282=>615,283=>610,284=>738,285=>644,286=>738,287=>644,288=>738,289=>644,290=>738,291=>644,292=>753,293=>641,294=>876,295=>711,296=>334,297=>308,298=>334,299=>308,300=>334,301=>308,302=>334,303=>308,304=>334,305=>308,306=>669,307=>617,308=>334,309=>308,310=>697,311=>598,312=>598,313=>573,314=>308,315=>573,316=>308,317=>573,318=>308,319=>573,320=>308,321=>594,322=>337,323=>753,324=>641,325=>753,326=>641,327=>753,328=>641,329=>884,330=>753,331=>641,332=>765,333=>618,334=>765,335=>618,336=>765,337=>618,338=>1050,339=>984,340=>693,341=>444,342=>693,343=>444,344=>693,345=>444,346=>648,347=>536,348=>648,349=>536,350=>648,351=>536,352=>648,353=>536,354=>614,355=>430,356=>614,357=>430,358=>614,359=>430,360=>730,361=>641,362=>730,363=>641,364=>730,365=>641,366=>730,367=>641,368=>730,369=>641,370=>730,371=>641,372=>993,373=>831,374=>651,375=>586,376=>651,377=>652,378=>523,379=>652,380=>523,381=>652,382=>523,383=>391,384=>644,385=>729,386=>686,387=>644,388=>686,389=>644,390=>660,391=>660,392=>533,393=>760,394=>791,395=>686,396=>644,397=>618,398=>615,399=>765,400=>626,401=>615,402=>391,403=>738,404=>713,405=>940,406=>392,407=>350,408=>697,409=>598,410=>324,411=>532,412=>938,413=>753,414=>641,415=>765,416=>765,417=>618,418=>1002,419=>866,420=>703,421=>644,422=>693,423=>648,424=>536,425=>615,426=>497,427=>430,428=>636,429=>430,430=>614,431=>730,432=>641,433=>692,434=>732,435=>717,436=>700,437=>652,438=>523,439=>695,440=>695,441=>576,442=>523,443=>626,444=>695,445=>576,446=>515,447=>644,448=>334,449=>593,450=>489,451=>334,452=>1393,453=>1305,454=>1176,455=>879,456=>881,457=>603,458=>1074,459=>1091,460=>957,461=>696,462=>607,463=>334,464=>308,465=>765,466=>618,467=>730,468=>641,469=>730,470=>641,471=>730,472=>641,473=>730,474=>641,475=>730,476=>641,477=>610,478=>696,479=>607,480=>696,481=>607,482=>976,483=>943,484=>738,485=>644,486=>738,487=>644,488=>697,489=>598,490=>765,491=>618,492=>765,493=>618,494=>695,495=>523,496=>308,497=>1393,498=>1305,499=>1176,500=>738,501=>644,502=>1160,503=>708,504=>753,505=>641,506=>696,507=>607,508=>976,509=>943,510=>765,511=>618,512=>696,513=>607,514=>696,515=>607,516=>615,517=>610,518=>615,519=>610,520=>334,521=>308,522=>334,523=>308,524=>765,525=>618,526=>765,527=>618,528=>693,529=>444,530=>693,531=>444,532=>730,533=>641,534=>730,535=>641,536=>648,537=>536,538=>614,539=>430,540=>621,541=>546,542=>753,543=>641,544=>753,545=>778,546=>728,547=>593,548=>652,549=>523,550=>696,551=>607,552=>615,553=>610,554=>765,555=>618,556=>765,557=>618,558=>765,559=>618,560=>765,561=>618,562=>651,563=>586,564=>442,565=>780,566=>460,567=>308,568=>979,569=>979,570=>696,571=>660,572=>533,573=>573,574=>614,575=>536,576=>523,577=>703,578=>553,579=>686,580=>730,581=>696,582=>615,583=>610,584=>334,585=>308,586=>774,587=>712,588=>693,589=>444,590=>651,591=>586,592=>607,593=>644,594=>644,595=>644,596=>533,597=>533,598=>712,599=>712,600=>610,601=>610,602=>788,603=>501,604=>490,605=>696,606=>658,607=>308,608=>712,609=>644,610=>564,611=>661,612=>571,613=>641,614=>641,615=>641,616=>491,617=>396,618=>491,619=>502,620=>624,621=>308,622=>757,623=>938,624=>938,625=>938,626=>641,627=>713,628=>578,629=>618,630=>817,631=>613,632=>716,633=>484,634=>484,635=>584,636=>444,637=>444,638=>536,639=>536,640=>578,641=>578,642=>536,643=>374,644=>391,645=>544,646=>497,647=>430,648=>430,649=>828,650=>692,651=>603,652=>586,653=>831,654=>586,655=>651,656=>624,657=>615,658=>576,659=>576,660=>515,661=>515,662=>515,663=>515,664=>765,665=>569,666=>658,667=>616,668=>622,669=>308,670=>659,671=>485,672=>712,673=>515,674=>515,675=>1040,676=>1093,677=>1039,678=>877,679=>691,680=>836,681=>923,682=>776,683=>702,684=>532,685=>374,686=>609,687=>710,688=>410,689=>410,690=>197,691=>284,692=>284,693=>284,694=>369,695=>532,696=>375,697=>271,698=>469,699=>342,700=>342,701=>342,702=>330,703=>330,704=>293,705=>293,706=>450,707=>450,708=>450,709=>450,710=>450,711=>450,712=>275,713=>450,714=>450,715=>450,716=>275,717=>450,718=>450,719=>450,720=>303,721=>303,722=>330,723=>330,724=>450,725=>450,726=>374,727=>295,728=>450,729=>450,730=>450,731=>450,732=>450,733=>450,734=>315,735=>450,736=>370,737=>197,738=>343,739=>371,740=>293,741=>450,742=>450,743=>450,744=>450,745=>450,748=>450,749=>450,750=>580,755=>450,759=>450,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>628,881=>508,882=>919,883=>752,884=>271,885=>271,886=>753,887=>630,890=>450,891=>533,892=>495,893=>494,894=>360,900=>397,901=>450,902=>717,903=>342,904=>761,905=>908,906=>507,908=>801,910=>882,911=>804,912=>351,913=>696,914=>686,915=>573,916=>696,917=>615,918=>652,919=>753,920=>765,921=>334,922=>697,923=>696,924=>896,925=>753,926=>568,927=>765,928=>753,929=>659,931=>615,932=>614,933=>651,934=>765,935=>694,936=>765,937=>765,938=>334,939=>651,940=>618,941=>501,942=>641,943=>351,944=>607,945=>618,946=>644,947=>613,948=>618,949=>501,950=>532,951=>641,952=>618,953=>351,954=>639,955=>569,956=>662,957=>613,958=>532,959=>618,960=>712,961=>644,962=>533,963=>701,964=>574,965=>607,966=>704,967=>580,968=>714,969=>782,970=>351,971=>607,972=>618,973=>607,974=>782,975=>697,976=>585,977=>594,978=>671,979=>883,980=>671,981=>716,982=>782,983=>669,984=>765,985=>618,986=>660,987=>533,988=>615,989=>444,990=>632,991=>593,992=>827,993=>564,994=>983,995=>753,996=>749,997=>644,998=>835,999=>669,1000=>660,1001=>585,1002=>709,1003=>604,1004=>677,1005=>644,1006=>614,1007=>531,1008=>669,1009=>644,1010=>533,1011=>308,1012=>765,1013=>580,1014=>580,1015=>668,1016=>644,1017=>660,1018=>896,1019=>659,1020=>644,1021=>660,1022=>660,1023=>628,1024=>615,1025=>615,1026=>791,1027=>573,1028=>660,1029=>648,1030=>334,1031=>334,1032=>334,1033=>1039,1034=>1017,1035=>791,1036=>735,1037=>753,1038=>694,1039=>753,1040=>696,1041=>686,1042=>686,1043=>573,1044=>801,1045=>615,1046=>1102,1047=>639,1048=>753,1049=>753,1050=>735,1051=>747,1052=>896,1053=>753,1054=>765,1055=>753,1056=>659,1057=>660,1058=>614,1059=>694,1060=>892,1061=>694,1062=>835,1063=>727,1064=>1112,1065=>1193,1066=>845,1067=>932,1068=>686,1069=>660,1070=>1056,1071=>693,1072=>607,1073=>628,1074=>569,1075=>470,1076=>727,1077=>610,1078=>896,1079=>523,1080=>630,1081=>630,1082=>611,1083=>659,1084=>735,1085=>622,1086=>618,1087=>622,1088=>644,1089=>533,1090=>521,1091=>586,1092=>893,1093=>580,1094=>667,1095=>618,1096=>956,1097=>995,1098=>676,1099=>813,1100=>569,1101=>533,1102=>875,1103=>578,1104=>610,1105=>610,1106=>642,1107=>470,1108=>533,1109=>536,1110=>308,1111=>308,1112=>308,1113=>892,1114=>860,1115=>661,1116=>611,1117=>630,1118=>586,1119=>622,1120=>983,1121=>782,1122=>756,1123=>662,1124=>911,1125=>755,1126=>893,1127=>749,1128=>1222,1129=>1009,1130=>765,1131=>618,1132=>1112,1133=>906,1134=>626,1135=>501,1136=>967,1137=>955,1138=>765,1139=>618,1140=>765,1141=>625,1142=>765,1143=>625,1144=>1033,1145=>939,1146=>967,1147=>776,1148=>1265,1149=>1055,1150=>983,1151=>782,1152=>660,1153=>533,1154=>587,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>376,1161=>376,1162=>844,1163=>725,1164=>686,1165=>550,1166=>662,1167=>646,1168=>573,1169=>470,1170=>599,1171=>488,1172=>709,1173=>470,1174=>1102,1175=>896,1176=>639,1177=>523,1178=>697,1179=>611,1180=>735,1181=>611,1182=>735,1183=>611,1184=>914,1185=>743,1186=>753,1187=>622,1188=>992,1189=>783,1190=>1129,1191=>880,1192=>851,1193=>773,1194=>660,1195=>533,1196=>614,1197=>521,1198=>651,1199=>586,1200=>651,1201=>586,1202=>694,1203=>580,1204=>993,1205=>901,1206=>727,1207=>618,1208=>727,1209=>618,1210=>727,1211=>641,1212=>923,1213=>729,1214=>923,1215=>729,1216=>334,1217=>1102,1218=>896,1219=>700,1220=>566,1221=>839,1222=>724,1223=>753,1224=>622,1225=>844,1226=>725,1227=>727,1228=>618,1229=>986,1230=>838,1231=>308,1232=>696,1233=>607,1234=>696,1235=>607,1236=>976,1237=>943,1238=>615,1239=>610,1240=>765,1241=>610,1242=>765,1243=>610,1244=>1102,1245=>896,1246=>639,1247=>523,1248=>695,1249=>576,1250=>753,1251=>630,1252=>753,1253=>630,1254=>765,1255=>618,1256=>765,1257=>618,1258=>765,1259=>618,1260=>660,1261=>533,1262=>694,1263=>586,1264=>694,1265=>586,1266=>694,1267=>586,1268=>727,1269=>618,1270=>573,1271=>470,1272=>932,1273=>813,1274=>599,1275=>488,1276=>694,1277=>580,1278=>694,1279=>580,1280=>686,1281=>547,1282=>1043,1283=>804,1284=>1007,1285=>828,1286=>745,1287=>624,1288=>1117,1289=>915,1290=>1160,1291=>912,1292=>755,1293=>574,1294=>844,1295=>722,1296=>626,1297=>501,1298=>747,1299=>659,1300=>1157,1301=>963,1302=>958,1303=>883,1304=>973,1305=>864,1306=>765,1307=>644,1308=>993,1309=>831,1310=>735,1311=>611,1312=>1123,1313=>920,1314=>1128,1315=>880,1316=>861,1317=>726,1329=>813,1330=>729,1331=>728,1332=>731,1333=>729,1334=>733,1335=>651,1336=>720,1337=>903,1338=>728,1339=>666,1340=>558,1341=>961,1342=>787,1343=>713,1344=>650,1345=>729,1346=>715,1347=>704,1348=>780,1349=>689,1350=>715,1351=>708,1352=>730,1353=>677,1354=>867,1355=>711,1356=>780,1357=>730,1358=>715,1359=>693,1360=>666,1361=>698,1362=>576,1363=>833,1364=>698,1365=>763,1366=>855,1369=>330,1370=>342,1371=>308,1372=>374,1373=>313,1374=>461,1375=>468,1377=>938,1378=>642,1379=>704,1380=>708,1381=>642,1382=>643,1383=>565,1384=>642,1385=>756,1386=>704,1387=>642,1388=>309,1389=>984,1390=>637,1391=>642,1392=>642,1393=>603,1394=>642,1395=>642,1396=>642,1397=>308,1398=>642,1399=>486,1400=>642,1401=>366,1402=>938,1403=>572,1404=>666,1405=>642,1406=>642,1407=>934,1408=>642,1409=>643,1410=>479,1411=>934,1412=>647,1413=>620,1414=>813,1415=>812,1417=>360,1418=>374,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>374,1471=>0,1472=>334,1473=>0,1474=>0,1475=>334,1478=>447,1479=>0,1488=>655,1489=>549,1490=>402,1491=>529,1492=>618,1493=>309,1494=>360,1495=>618,1496=>611,1497=>265,1498=>520,1499=>510,1500=>544,1501=>626,1502=>651,1503=>309,1504=>408,1505=>611,1506=>599,1507=>607,1508=>592,1509=>595,1510=>587,1511=>663,1512=>542,1513=>673,1514=>615,1520=>598,1521=>598,1522=>597,1523=>399,1524=>639,3647=>626,3713=>734,3714=>673,3716=>674,3719=>512,3720=>668,3722=>669,3725=>685,3732=>635,3733=>633,3734=>672,3735=>737,3737=>657,3738=>654,3739=>654,3740=>830,3741=>744,3742=>779,3743=>779,3745=>752,3746=>685,3747=>692,3749=>691,3751=>642,3754=>744,3755=>928,3757=>651,3758=>705,3759=>840,3760=>620,3761=>0,3762=>549,3763=>549,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>603,3776=>464,3777=>774,3778=>464,3779=>584,3780=>569,3782=>683,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>694,3793=>694,3794=>624,3795=>752,3796=>655,3797=>655,3798=>764,3799=>710,3800=>683,3801=>818,3804=>1227,3805=>1227,4256=>787,4257=>660,4258=>611,4259=>751,4260=>554,4261=>690,4262=>678,4263=>822,4264=>408,4265=>558,4266=>758,4267=>794,4268=>562,4269=>769,4270=>703,4271=>566,4272=>820,4273=>558,4274=>558,4275=>769,4276=>779,4277=>651,4278=>567,4279=>558,4280=>563,4281=>558,4282=>736,4283=>786,4284=>554,4285=>561,4286=>563,4287=>652,4288=>760,4289=>536,4290=>620,4291=>536,4292=>534,4293=>664,4304=>498,4305=>507,4306=>560,4307=>751,4308=>495,4309=>502,4310=>491,4311=>745,4312=>507,4313=>500,4314=>967,4315=>507,4316=>507,4317=>733,4318=>498,4319=>502,4320=>741,4321=>507,4322=>630,4323=>523,4324=>762,4325=>499,4326=>733,4327=>502,4328=>488,4329=>507,4330=>560,4331=>507,4332=>489,4333=>509,4334=>507,4335=>477,4336=>498,4337=>498,4338=>498,4339=>499,4340=>498,4341=>524,4342=>768,4343=>544,4344=>502,4345=>568,4346=>499,4347=>403,4348=>291,5121=>696,5122=>696,5123=>696,5124=>696,5125=>814,5126=>814,5127=>814,5129=>814,5130=>814,5131=>814,5132=>916,5133=>908,5134=>916,5135=>908,5136=>916,5137=>908,5138=>1034,5139=>1025,5140=>1034,5141=>1025,5142=>814,5143=>1034,5144=>1028,5145=>1034,5146=>1028,5147=>814,5149=>278,5150=>476,5151=>382,5152=>382,5153=>355,5154=>355,5155=>355,5156=>355,5157=>507,5158=>423,5159=>278,5160=>355,5161=>355,5162=>355,5163=>1092,5164=>888,5165=>1094,5166=>1167,5167=>696,5168=>696,5169=>696,5170=>696,5171=>797,5172=>797,5173=>797,5175=>797,5176=>797,5177=>797,5178=>916,5179=>908,5180=>916,5181=>908,5182=>916,5183=>908,5184=>1034,5185=>1025,5186=>1034,5187=>1025,5188=>1034,5189=>1028,5190=>1034,5191=>1028,5192=>797,5193=>518,5194=>206,5196=>730,5197=>730,5198=>730,5199=>730,5200=>734,5201=>734,5202=>734,5204=>734,5205=>734,5206=>734,5207=>950,5208=>943,5209=>950,5210=>943,5211=>950,5212=>943,5213=>954,5214=>949,5215=>954,5216=>949,5217=>954,5218=>946,5219=>954,5220=>946,5221=>954,5222=>435,5223=>904,5224=>904,5225=>921,5226=>915,5227=>668,5228=>668,5229=>668,5230=>668,5231=>668,5232=>668,5233=>668,5234=>668,5235=>668,5236=>926,5237=>877,5238=>882,5239=>877,5240=>882,5241=>877,5242=>926,5243=>877,5244=>926,5245=>877,5246=>882,5247=>877,5248=>882,5249=>877,5250=>882,5251=>451,5252=>451,5253=>844,5254=>844,5255=>844,5256=>844,5257=>668,5258=>668,5259=>668,5260=>668,5261=>668,5262=>668,5263=>668,5264=>668,5265=>668,5266=>926,5267=>877,5268=>926,5269=>877,5270=>926,5271=>877,5272=>926,5273=>877,5274=>926,5275=>877,5276=>926,5277=>877,5278=>926,5279=>877,5280=>926,5281=>451,5282=>451,5283=>563,5284=>563,5285=>563,5286=>563,5287=>563,5288=>563,5289=>563,5290=>563,5291=>563,5292=>793,5293=>769,5294=>777,5295=>786,5296=>777,5297=>786,5298=>793,5299=>786,5300=>793,5301=>786,5302=>777,5303=>786,5304=>777,5305=>786,5306=>777,5307=>392,5308=>493,5309=>392,5312=>889,5313=>889,5314=>889,5315=>889,5316=>838,5317=>838,5318=>838,5319=>838,5320=>838,5321=>1114,5322=>1122,5323=>1080,5324=>1105,5325=>1080,5326=>1105,5327=>838,5328=>593,5329=>447,5330=>593,5331=>889,5332=>889,5333=>889,5334=>889,5335=>838,5336=>838,5337=>838,5338=>838,5339=>838,5340=>1107,5341=>1122,5342=>1155,5343=>1105,5344=>1155,5345=>1105,5346=>1105,5347=>1093,5348=>1105,5349=>1093,5350=>1155,5351=>1105,5352=>1155,5353=>1105,5354=>593,5356=>797,5357=>657,5358=>657,5359=>657,5360=>657,5361=>657,5362=>657,5363=>657,5364=>657,5365=>657,5366=>897,5367=>862,5368=>870,5369=>890,5370=>870,5371=>890,5372=>897,5373=>862,5374=>897,5375=>862,5376=>870,5377=>890,5378=>870,5379=>890,5380=>870,5381=>443,5382=>414,5383=>443,5392=>831,5393=>831,5394=>831,5395=>1022,5396=>1022,5397=>1022,5398=>1022,5399=>1088,5400=>1081,5401=>1088,5402=>1081,5403=>1088,5404=>1081,5405=>1288,5406=>1278,5407=>1288,5408=>1278,5409=>1288,5410=>1278,5411=>1288,5412=>1278,5413=>671,5414=>698,5415=>698,5416=>698,5417=>698,5418=>698,5419=>698,5420=>698,5421=>698,5422=>698,5423=>902,5424=>903,5425=>911,5426=>896,5427=>911,5428=>896,5429=>902,5430=>903,5431=>902,5432=>903,5433=>911,5434=>896,5435=>911,5436=>896,5437=>911,5438=>445,5440=>355,5441=>458,5442=>929,5443=>929,5444=>878,5445=>878,5446=>878,5447=>878,5448=>659,5449=>659,5450=>659,5451=>659,5452=>659,5453=>659,5454=>902,5455=>863,5456=>445,5458=>797,5459=>696,5460=>696,5461=>696,5462=>696,5463=>835,5464=>835,5465=>835,5466=>835,5467=>1055,5468=>1028,5469=>542,5470=>730,5471=>730,5472=>730,5473=>730,5474=>730,5475=>730,5476=>734,5477=>734,5478=>734,5479=>734,5480=>954,5481=>946,5482=>493,5492=>879,5493=>879,5494=>879,5495=>879,5496=>879,5497=>879,5498=>879,5499=>556,5500=>753,5501=>458,5502=>1114,5503=>1114,5504=>1114,5505=>1114,5506=>1114,5507=>1114,5508=>1114,5509=>890,5514=>879,5515=>879,5516=>879,5517=>879,5518=>1432,5519=>1432,5520=>1432,5521=>1165,5522=>1165,5523=>1432,5524=>1432,5525=>763,5526=>1146,5536=>889,5537=>889,5538=>838,5539=>838,5540=>838,5541=>838,5542=>593,5543=>698,5544=>698,5545=>698,5546=>698,5547=>698,5548=>698,5549=>698,5550=>445,5551=>668,5598=>747,5601=>747,5702=>446,5703=>446,5742=>371,5743=>1114,5744=>1432,5745=>1814,5746=>1814,5747=>1548,5748=>1510,5749=>1814,5750=>1814,7424=>586,7425=>750,7426=>943,7427=>547,7428=>533,7429=>608,7430=>608,7431=>502,7432=>501,7433=>308,7434=>444,7435=>598,7436=>485,7437=>735,7438=>630,7439=>618,7440=>533,7441=>594,7442=>594,7443=>594,7444=>984,7446=>618,7447=>618,7448=>500,7449=>578,7450=>578,7451=>521,7452=>571,7453=>663,7454=>853,7455=>625,7456=>586,7457=>831,7458=>523,7459=>581,7462=>485,7463=>586,7464=>622,7465=>500,7466=>703,7467=>659,7468=>438,7469=>615,7470=>432,7472=>470,7473=>387,7474=>387,7475=>465,7476=>474,7477=>211,7478=>211,7479=>439,7480=>361,7481=>563,7482=>474,7483=>474,7484=>481,7485=>458,7486=>415,7487=>436,7488=>387,7489=>460,7490=>625,7491=>412,7492=>412,7493=>431,7494=>641,7495=>431,7496=>431,7497=>431,7498=>431,7499=>347,7500=>347,7501=>431,7502=>197,7503=>438,7504=>597,7505=>410,7506=>439,7507=>372,7508=>439,7509=>439,7510=>431,7511=>349,7512=>410,7513=>416,7514=>597,7515=>451,7517=>405,7518=>386,7519=>389,7520=>443,7521=>365,7522=>197,7523=>284,7524=>410,7525=>451,7526=>405,7527=>386,7528=>405,7529=>443,7530=>365,7543=>644,7544=>474,7547=>491,7549=>672,7557=>462,7579=>431,7580=>372,7581=>372,7582=>439,7583=>347,7584=>339,7585=>313,7586=>431,7587=>410,7588=>312,7589=>253,7590=>312,7591=>312,7592=>388,7593=>293,7594=>296,7595=>333,7596=>598,7597=>597,7598=>505,7599=>505,7600=>403,7601=>439,7602=>488,7603=>379,7604=>356,7605=>349,7606=>524,7607=>444,7608=>359,7609=>405,7610=>451,7611=>375,7612=>471,7613=>422,7614=>409,7615=>382,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>696,7681=>607,7682=>686,7683=>644,7684=>686,7685=>644,7686=>686,7687=>644,7688=>660,7689=>533,7690=>747,7691=>644,7692=>747,7693=>644,7694=>747,7695=>644,7696=>747,7697=>644,7698=>747,7699=>644,7700=>615,7701=>610,7702=>615,7703=>610,7704=>615,7705=>610,7706=>615,7707=>610,7708=>615,7709=>610,7710=>615,7711=>391,7712=>738,7713=>644,7714=>753,7715=>641,7716=>753,7717=>641,7718=>753,7719=>641,7720=>753,7721=>641,7722=>753,7723=>641,7724=>334,7725=>308,7726=>334,7727=>308,7728=>697,7729=>598,7730=>697,7731=>598,7732=>697,7733=>598,7734=>573,7735=>308,7736=>573,7737=>308,7738=>573,7739=>308,7740=>573,7741=>308,7742=>896,7743=>938,7744=>896,7745=>938,7746=>896,7747=>938,7748=>753,7749=>641,7750=>753,7751=>641,7752=>753,7753=>641,7754=>753,7755=>641,7756=>765,7757=>618,7758=>765,7759=>618,7760=>765,7761=>618,7762=>765,7763=>618,7764=>659,7765=>644,7766=>659,7767=>644,7768=>693,7769=>444,7770=>693,7771=>444,7772=>693,7773=>444,7774=>693,7775=>444,7776=>648,7777=>536,7778=>648,7779=>536,7780=>648,7781=>536,7782=>648,7783=>536,7784=>648,7785=>536,7786=>614,7787=>430,7788=>614,7789=>430,7790=>614,7791=>430,7792=>614,7793=>430,7794=>730,7795=>641,7796=>730,7797=>641,7798=>730,7799=>641,7800=>730,7801=>641,7802=>730,7803=>641,7804=>696,7805=>586,7806=>696,7807=>586,7808=>993,7809=>831,7810=>993,7811=>831,7812=>993,7813=>831,7814=>993,7815=>831,7816=>993,7817=>831,7818=>694,7819=>580,7820=>694,7821=>580,7822=>651,7823=>586,7824=>652,7825=>523,7826=>652,7827=>523,7828=>652,7829=>523,7830=>641,7831=>430,7832=>831,7833=>586,7834=>607,7835=>391,7836=>391,7837=>391,7838=>806,7839=>618,7840=>696,7841=>607,7842=>696,7843=>607,7844=>696,7845=>607,7846=>696,7847=>607,7848=>696,7849=>607,7850=>696,7851=>607,7852=>696,7853=>607,7854=>696,7855=>607,7856=>696,7857=>607,7858=>696,7859=>607,7860=>696,7861=>607,7862=>696,7863=>607,7864=>615,7865=>610,7866=>615,7867=>610,7868=>615,7869=>610,7870=>615,7871=>610,7872=>615,7873=>610,7874=>615,7875=>610,7876=>615,7877=>610,7878=>615,7879=>610,7880=>334,7881=>308,7882=>334,7883=>308,7884=>765,7885=>618,7886=>765,7887=>618,7888=>765,7889=>618,7890=>765,7891=>618,7892=>765,7893=>618,7894=>765,7895=>618,7896=>765,7897=>618,7898=>765,7899=>618,7900=>765,7901=>618,7902=>765,7903=>618,7904=>765,7905=>618,7906=>765,7907=>618,7908=>730,7909=>641,7910=>730,7911=>641,7912=>730,7913=>641,7914=>730,7915=>641,7916=>730,7917=>641,7918=>730,7919=>641,7920=>730,7921=>641,7922=>651,7923=>586,7924=>651,7925=>586,7926=>651,7927=>586,7928=>651,7929=>586,7930=>857,7931=>579,7936=>618,7937=>618,7938=>618,7939=>618,7940=>618,7941=>618,7942=>618,7943=>618,7944=>696,7945=>696,7946=>937,7947=>939,7948=>841,7949=>866,7950=>751,7951=>773,7952=>501,7953=>501,7954=>501,7955=>501,7956=>501,7957=>501,7960=>712,7961=>715,7962=>989,7963=>986,7964=>920,7965=>947,7968=>641,7969=>641,7970=>641,7971=>641,7972=>641,7973=>641,7974=>641,7975=>641,7976=>851,7977=>856,7978=>1125,7979=>1125,7980=>1062,7981=>1085,7982=>948,7983=>956,7984=>351,7985=>351,7986=>351,7987=>351,7988=>351,7989=>351,7990=>351,7991=>351,7992=>435,7993=>440,7994=>699,7995=>707,7996=>641,7997=>664,7998=>544,7999=>544,8000=>618,8001=>618,8002=>618,8003=>618,8004=>618,8005=>618,8008=>802,8009=>839,8010=>1099,8011=>1101,8012=>947,8013=>974,8016=>607,8017=>607,8018=>607,8019=>607,8020=>607,8021=>607,8022=>607,8023=>607,8025=>837,8027=>1065,8029=>1079,8031=>944,8032=>782,8033=>782,8034=>782,8035=>782,8036=>782,8037=>782,8038=>782,8039=>782,8040=>817,8041=>862,8042=>1121,8043=>1126,8044=>968,8045=>994,8046=>925,8047=>968,8048=>618,8049=>618,8050=>501,8051=>501,8052=>641,8053=>641,8054=>351,8055=>351,8056=>618,8057=>618,8058=>607,8059=>607,8060=>782,8061=>782,8064=>618,8065=>618,8066=>618,8067=>618,8068=>618,8069=>618,8070=>618,8071=>618,8072=>696,8073=>696,8074=>937,8075=>939,8076=>841,8077=>866,8078=>751,8079=>773,8080=>641,8081=>641,8082=>641,8083=>641,8084=>641,8085=>641,8086=>641,8087=>641,8088=>851,8089=>856,8090=>1125,8091=>1125,8092=>1062,8093=>1085,8094=>948,8095=>956,8096=>782,8097=>782,8098=>782,8099=>782,8100=>782,8101=>782,8102=>782,8103=>782,8104=>817,8105=>862,8106=>1121,8107=>1126,8108=>968,8109=>994,8110=>925,8111=>968,8112=>618,8113=>618,8114=>618,8115=>618,8116=>618,8118=>618,8119=>618,8120=>696,8121=>696,8122=>789,8123=>717,8124=>696,8125=>450,8126=>450,8127=>450,8128=>450,8129=>450,8130=>641,8131=>641,8132=>641,8134=>641,8135=>641,8136=>836,8137=>761,8138=>972,8139=>908,8140=>753,8141=>450,8142=>450,8143=>450,8144=>351,8145=>351,8146=>351,8147=>351,8150=>351,8151=>351,8152=>334,8153=>334,8154=>559,8155=>507,8157=>450,8158=>450,8159=>450,8160=>607,8161=>607,8162=>607,8163=>607,8164=>644,8165=>644,8166=>607,8167=>607,8168=>651,8169=>651,8170=>918,8171=>882,8172=>754,8173=>450,8174=>450,8175=>450,8178=>782,8179=>782,8180=>782,8182=>782,8183=>782,8184=>958,8185=>801,8186=>976,8187=>804,8188=>765,8189=>450,8190=>450,8192=>450,8193=>900,8194=>450,8195=>900,8196=>296,8197=>225,8198=>150,8199=>626,8200=>342,8201=>180,8202=>89,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>374,8209=>374,8210=>626,8211=>450,8212=>900,8213=>900,8214=>450,8215=>450,8216=>342,8217=>342,8218=>342,8219=>342,8220=>580,8221=>580,8222=>580,8223=>591,8224=>450,8225=>450,8226=>575,8227=>575,8228=>342,8229=>616,8230=>900,8231=>313,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>180,8240=>1309,8241=>1717,8242=>237,8243=>402,8244=>567,8245=>237,8246=>402,8247=>567,8248=>659,8249=>371,8250=>371,8251=>875,8252=>564,8253=>522,8254=>450,8255=>745,8256=>745,8257=>296,8258=>920,8259=>450,8260=>150,8261=>411,8262=>411,8263=>927,8264=>746,8265=>746,8266=>461,8267=>618,8268=>450,8269=>450,8270=>470,8271=>360,8272=>745,8273=>470,8274=>500,8275=>754,8276=>745,8277=>754,8278=>615,8279=>731,8280=>754,8281=>754,8282=>342,8283=>784,8284=>754,8285=>342,8286=>342,8287=>200,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>394,8305=>197,8308=>394,8309=>394,8310=>394,8311=>394,8312=>394,8313=>394,8314=>475,8315=>475,8316=>475,8317=>259,8318=>259,8319=>410,8320=>394,8321=>394,8322=>394,8323=>394,8324=>394,8325=>394,8326=>394,8327=>394,8328=>394,8329=>394,8330=>475,8331=>475,8332=>475,8333=>259,8334=>259,8336=>412,8337=>431,8338=>439,8339=>371,8340=>431,8341=>410,8342=>438,8343=>197,8344=>597,8345=>410,8346=>431,8347=>343,8348=>349,8352=>836,8353=>626,8354=>626,8355=>626,8356=>626,8357=>938,8358=>753,8359=>1339,8360=>1084,8361=>993,8362=>768,8363=>626,8364=>626,8365=>626,8366=>626,8367=>1252,8368=>626,8369=>626,8370=>626,8371=>626,8372=>773,8373=>626,8376=>626,8377=>626,8378=>692,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>995,8449=>995,8450=>660,8451=>1090,8452=>807,8453=>1002,8454=>1033,8455=>626,8456=>628,8457=>856,8459=>965,8460=>822,8461=>799,8462=>641,8463=>641,8464=>537,8465=>627,8466=>771,8467=>424,8468=>876,8469=>753,8470=>1083,8471=>900,8472=>627,8473=>675,8474=>765,8475=>844,8476=>732,8477=>721,8478=>807,8479=>639,8480=>917,8481=>1115,8482=>900,8483=>751,8484=>679,8485=>560,8486=>765,8487=>692,8488=>686,8489=>272,8490=>697,8491=>696,8492=>835,8493=>736,8494=>769,8495=>572,8496=>656,8497=>727,8498=>615,8499=>1065,8500=>418,8501=>714,8502=>658,8503=>444,8504=>615,8505=>342,8506=>851,8507=>1232,8508=>710,8509=>663,8510=>589,8511=>776,8512=>756,8513=>707,8514=>518,8515=>573,8516=>684,8517=>747,8518=>644,8519=>610,8520=>308,8521=>308,8523=>785,8526=>492,8528=>932,8529=>932,8530=>1334,8531=>932,8532=>932,8533=>932,8534=>932,8535=>932,8536=>932,8537=>932,8538=>932,8539=>932,8540=>932,8541=>932,8542=>932,8543=>554,8544=>334,8545=>593,8546=>851,8547=>989,8548=>696,8549=>989,8550=>1247,8551=>1505,8552=>1008,8553=>694,8554=>1008,8555=>1266,8556=>573,8557=>660,8558=>747,8559=>896,8560=>308,8561=>546,8562=>785,8563=>885,8564=>586,8565=>866,8566=>1104,8567=>1342,8568=>872,8569=>580,8570=>872,8571=>1110,8572=>308,8573=>533,8574=>644,8575=>938,8576=>1160,8577=>747,8578=>1160,8579=>660,8580=>533,8581=>660,8585=>932,8592=>754,8593=>754,8594=>754,8595=>754,8596=>754,8597=>754,8598=>754,8599=>754,8600=>754,8601=>754,8602=>754,8603=>754,8604=>754,8605=>754,8606=>754,8607=>754,8608=>754,8609=>754,8610=>754,8611=>754,8612=>754,8613=>754,8614=>754,8615=>754,8616=>754,8617=>754,8618=>754,8619=>754,8620=>754,8621=>754,8622=>754,8623=>754,8624=>754,8625=>754,8626=>754,8627=>754,8628=>754,8629=>754,8630=>754,8631=>754,8632=>754,8633=>754,8634=>754,8635=>754,8636=>754,8637=>754,8638=>754,8639=>754,8640=>754,8641=>754,8642=>754,8643=>754,8644=>754,8645=>754,8646=>754,8647=>754,8648=>754,8649=>754,8650=>754,8651=>754,8652=>754,8653=>754,8654=>754,8655=>754,8656=>754,8657=>754,8658=>754,8659=>754,8660=>754,8661=>754,8662=>754,8663=>754,8664=>754,8665=>754,8666=>754,8667=>754,8668=>754,8669=>754,8670=>754,8671=>754,8672=>754,8673=>754,8674=>754,8675=>754,8676=>754,8677=>754,8678=>754,8679=>754,8680=>754,8681=>754,8682=>754,8683=>754,8684=>754,8685=>754,8686=>754,8687=>754,8688=>754,8689=>754,8690=>754,8691=>754,8692=>754,8693=>754,8694=>754,8695=>754,8696=>754,8697=>754,8698=>754,8699=>754,8700=>754,8701=>754,8702=>754,8703=>754,8704=>696,8705=>626,8706=>489,8707=>615,8708=>615,8709=>771,8710=>627,8711=>627,8712=>807,8713=>807,8714=>675,8715=>807,8716=>807,8717=>675,8718=>572,8719=>708,8720=>708,8721=>646,8722=>754,8723=>754,8724=>626,8725=>329,8726=>626,8727=>754,8728=>563,8729=>342,8730=>600,8731=>600,8732=>600,8733=>641,8734=>750,8735=>754,8736=>807,8737=>807,8738=>754,8739=>450,8740=>450,8741=>450,8742=>450,8743=>730,8744=>730,8745=>730,8746=>730,8747=>549,8748=>835,8749=>1165,8750=>506,8751=>879,8752=>1181,8753=>506,8754=>506,8755=>506,8756=>626,8757=>626,8758=>264,8759=>626,8760=>754,8761=>754,8762=>754,8763=>754,8764=>754,8765=>754,8766=>754,8767=>754,8768=>337,8769=>754,8770=>754,8771=>754,8772=>754,8773=>754,8774=>754,8775=>754,8776=>754,8777=>754,8778=>754,8779=>754,8780=>754,8781=>754,8782=>754,8783=>754,8784=>754,8785=>754,8786=>754,8787=>754,8788=>956,8789=>956,8790=>754,8791=>754,8792=>754,8793=>754,8794=>754,8795=>754,8796=>754,8797=>754,8798=>754,8799=>754,8800=>754,8801=>754,8802=>754,8803=>754,8804=>754,8805=>754,8806=>754,8807=>754,8808=>756,8809=>756,8810=>942,8811=>942,8812=>450,8813=>754,8814=>754,8815=>754,8816=>754,8817=>754,8818=>754,8819=>754,8820=>754,8821=>754,8822=>754,8823=>754,8824=>754,8825=>754,8826=>754,8827=>754,8828=>754,8829=>754,8830=>754,8831=>754,8832=>754,8833=>754,8834=>754,8835=>754,8836=>754,8837=>754,8838=>754,8839=>754,8840=>754,8841=>754,8842=>754,8843=>754,8844=>730,8845=>730,8846=>730,8847=>754,8848=>754,8849=>754,8850=>754,8851=>716,8852=>716,8853=>754,8854=>754,8855=>754,8856=>754,8857=>754,8858=>754,8859=>754,8860=>754,8861=>754,8862=>754,8863=>754,8864=>754,8865=>754,8866=>822,8867=>822,8868=>822,8869=>822,8870=>488,8871=>488,8872=>822,8873=>822,8874=>822,8875=>822,8876=>822,8877=>822,8878=>822,8879=>822,8880=>754,8881=>754,8882=>754,8883=>754,8884=>754,8885=>754,8886=>900,8887=>900,8888=>754,8889=>754,8890=>488,8891=>730,8892=>730,8893=>730,8894=>754,8895=>754,8896=>758,8897=>758,8898=>758,8899=>758,8900=>444,8901=>342,8902=>563,8903=>754,8904=>900,8905=>900,8906=>900,8907=>900,8908=>900,8909=>754,8910=>730,8911=>730,8912=>754,8913=>754,8914=>754,8915=>754,8916=>754,8917=>754,8918=>754,8919=>754,8920=>1280,8921=>1280,8922=>754,8923=>754,8924=>754,8925=>754,8926=>754,8927=>754,8928=>754,8929=>754,8930=>754,8931=>754,8932=>754,8933=>754,8934=>754,8935=>754,8936=>754,8937=>754,8938=>754,8939=>754,8940=>754,8941=>754,8942=>900,8943=>900,8944=>900,8945=>900,8946=>1042,8947=>807,8948=>675,8949=>807,8950=>807,8951=>675,8952=>807,8953=>807,8954=>1042,8955=>807,8956=>675,8957=>807,8958=>675,8959=>807,8960=>542,8961=>542,8962=>644,8963=>754,8964=>754,8965=>754,8966=>754,8967=>439,8968=>411,8969=>411,8970=>411,8971=>411,8972=>728,8973=>728,8974=>728,8975=>728,8976=>754,8977=>484,8984=>835,8985=>754,8988=>422,8989=>422,8990=>422,8991=>422,8992=>549,8993=>549,8996=>1037,8997=>1037,8998=>1272,8999=>1037,9000=>1299,9003=>1272,9004=>786,9075=>351,9076=>644,9077=>782,9082=>618,9085=>776,9095=>1037,9108=>786,9115=>450,9116=>450,9117=>450,9118=>450,9119=>450,9120=>450,9121=>450,9122=>450,9123=>450,9124=>450,9125=>450,9126=>450,9127=>675,9128=>675,9129=>675,9130=>675,9131=>675,9132=>675,9133=>675,9134=>549,9166=>754,9167=>850,9187=>786,9189=>692,9192=>626,9250=>644,9251=>644,9312=>762,9313=>762,9314=>762,9315=>762,9316=>762,9317=>762,9318=>762,9319=>762,9320=>762,9321=>762,9600=>692,9601=>692,9602=>692,9603=>692,9604=>692,9605=>692,9606=>692,9607=>692,9608=>692,9609=>692,9610=>692,9611=>692,9612=>692,9613=>692,9614=>692,9615=>692,9616=>692,9617=>692,9618=>692,9619=>692,9620=>692,9621=>692,9622=>692,9623=>692,9624=>692,9625=>692,9626=>692,9627=>692,9628=>692,9629=>692,9630=>692,9631=>692,9632=>850,9633=>850,9634=>850,9635=>850,9636=>850,9637=>850,9638=>850,9639=>850,9640=>850,9641=>850,9642=>610,9643=>610,9644=>850,9645=>850,9646=>495,9647=>495,9648=>692,9649=>692,9650=>692,9651=>692,9652=>452,9653=>452,9654=>692,9655=>692,9656=>452,9657=>452,9658=>692,9659=>692,9660=>692,9661=>692,9662=>452,9663=>452,9664=>692,9665=>692,9666=>452,9667=>452,9668=>692,9669=>692,9670=>692,9671=>692,9672=>692,9673=>785,9674=>444,9675=>785,9676=>785,9677=>785,9678=>785,9679=>785,9680=>785,9681=>785,9682=>785,9683=>785,9684=>785,9685=>785,9686=>474,9687=>474,9688=>756,9689=>873,9690=>873,9691=>873,9692=>348,9693=>348,9694=>348,9695=>348,9696=>692,9697=>692,9698=>692,9699=>692,9700=>692,9701=>692,9702=>575,9703=>850,9704=>850,9705=>850,9706=>850,9707=>850,9708=>692,9709=>692,9710=>692,9711=>1007,9712=>850,9713=>850,9714=>850,9715=>850,9716=>785,9717=>785,9718=>785,9719=>785,9720=>692,9721=>692,9722=>692,9723=>747,9724=>747,9725=>659,9726=>659,9727=>692,9728=>807,9729=>900,9730=>807,9731=>807,9732=>807,9733=>807,9734=>807,9735=>515,9736=>806,9737=>807,9738=>799,9739=>799,9740=>604,9741=>911,9742=>1121,9743=>1125,9744=>807,9745=>807,9746=>807,9747=>479,9748=>807,9749=>807,9750=>807,9751=>807,9752=>807,9753=>807,9754=>807,9755=>807,9756=>807,9757=>548,9758=>807,9759=>548,9760=>807,9761=>807,9762=>807,9763=>807,9764=>602,9765=>671,9766=>584,9767=>705,9768=>490,9769=>807,9770=>807,9771=>807,9772=>639,9773=>807,9774=>807,9775=>807,9776=>807,9777=>807,9778=>807,9779=>807,9780=>807,9781=>807,9782=>807,9783=>807,9784=>807,9785=>938,9786=>938,9787=>938,9788=>807,9789=>807,9790=>807,9791=>552,9792=>659,9793=>659,9794=>807,9795=>807,9796=>807,9797=>807,9798=>807,9799=>807,9800=>807,9801=>807,9802=>807,9803=>807,9804=>807,9805=>807,9806=>807,9807=>807,9808=>807,9809=>807,9810=>807,9811=>807,9812=>807,9813=>807,9814=>807,9815=>807,9816=>807,9817=>807,9818=>807,9819=>807,9820=>807,9821=>807,9822=>807,9823=>807,9824=>807,9825=>807,9826=>807,9827=>807,9828=>807,9829=>807,9830=>807,9831=>807,9832=>807,9833=>424,9834=>574,9835=>807,9836=>807,9837=>424,9838=>321,9839=>435,9840=>673,9841=>689,9842=>807,9843=>807,9844=>807,9845=>807,9846=>807,9847=>807,9848=>807,9849=>807,9850=>807,9851=>807,9852=>807,9853=>807,9854=>807,9855=>807,9856=>782,9857=>782,9858=>782,9859=>782,9860=>782,9861=>782,9862=>807,9863=>807,9864=>807,9865=>807,9866=>807,9867=>807,9868=>807,9869=>807,9870=>807,9871=>807,9872=>807,9873=>807,9874=>807,9875=>807,9876=>807,9877=>487,9878=>807,9879=>807,9880=>807,9881=>807,9882=>807,9883=>807,9884=>807,9888=>807,9889=>632,9890=>904,9891=>980,9892=>1057,9893=>813,9894=>754,9895=>754,9896=>754,9897=>754,9898=>754,9899=>754,9900=>754,9901=>754,9902=>754,9903=>754,9904=>759,9905=>754,9906=>659,9907=>659,9908=>659,9909=>659,9910=>765,9911=>659,9912=>659,9920=>754,9921=>754,9922=>754,9923=>754,9954=>659,9985=>754,9986=>754,9987=>754,9988=>754,9990=>754,9991=>754,9992=>754,9993=>754,9996=>754,9997=>754,9998=>754,9999=>754,10000=>754,10001=>754,10002=>754,10003=>754,10004=>754,10005=>754,10006=>754,10007=>754,10008=>754,10009=>754,10010=>754,10011=>754,10012=>754,10013=>754,10014=>754,10015=>754,10016=>754,10017=>754,10018=>754,10019=>754,10020=>754,10021=>754,10022=>754,10023=>754,10025=>754,10026=>754,10027=>754,10028=>754,10029=>754,10030=>754,10031=>754,10032=>754,10033=>754,10034=>754,10035=>754,10036=>754,10037=>754,10038=>754,10039=>754,10040=>754,10041=>754,10042=>754,10043=>754,10044=>754,10045=>754,10046=>754,10047=>754,10048=>754,10049=>754,10050=>754,10051=>754,10052=>754,10053=>754,10054=>754,10055=>754,10056=>754,10057=>754,10058=>754,10059=>754,10061=>807,10063=>807,10064=>807,10065=>807,10066=>807,10070=>807,10072=>754,10073=>754,10074=>754,10075=>290,10076=>290,10077=>484,10078=>484,10081=>754,10082=>754,10083=>754,10084=>754,10085=>754,10086=>754,10087=>754,10088=>754,10089=>754,10090=>754,10091=>754,10092=>754,10093=>754,10094=>754,10095=>754,10096=>754,10097=>754,10098=>754,10099=>754,10100=>754,10101=>754,10102=>762,10103=>762,10104=>762,10105=>762,10106=>762,10107=>762,10108=>762,10109=>762,10110=>762,10111=>762,10112=>754,10113=>754,10114=>754,10115=>754,10116=>754,10117=>754,10118=>754,10119=>754,10120=>754,10121=>754,10122=>754,10123=>754,10124=>754,10125=>754,10126=>754,10127=>754,10128=>754,10129=>754,10130=>754,10131=>754,10132=>754,10136=>754,10137=>754,10138=>754,10139=>754,10140=>754,10141=>754,10142=>754,10143=>754,10144=>754,10145=>754,10146=>754,10147=>754,10148=>754,10149=>754,10150=>754,10151=>754,10152=>754,10153=>754,10154=>754,10155=>754,10156=>754,10157=>754,10158=>754,10159=>754,10161=>754,10162=>754,10163=>754,10164=>754,10165=>754,10166=>754,10167=>754,10168=>754,10169=>754,10170=>754,10171=>754,10172=>754,10173=>754,10174=>754,10181=>411,10182=>411,10208=>444,10214=>438,10215=>438,10216=>411,10217=>411,10218=>648,10219=>648,10224=>754,10225=>754,10226=>754,10227=>754,10228=>1042,10229=>1290,10230=>1290,10231=>1290,10232=>1290,10233=>1290,10234=>1290,10235=>1290,10236=>1290,10237=>1290,10238=>1290,10239=>1290,10240=>703,10241=>703,10242=>703,10243=>703,10244=>703,10245=>703,10246=>703,10247=>703,10248=>703,10249=>703,10250=>703,10251=>703,10252=>703,10253=>703,10254=>703,10255=>703,10256=>703,10257=>703,10258=>703,10259=>703,10260=>703,10261=>703,10262=>703,10263=>703,10264=>703,10265=>703,10266=>703,10267=>703,10268=>703,10269=>703,10270=>703,10271=>703,10272=>703,10273=>703,10274=>703,10275=>703,10276=>703,10277=>703,10278=>703,10279=>703,10280=>703,10281=>703,10282=>703,10283=>703,10284=>703,10285=>703,10286=>703,10287=>703,10288=>703,10289=>703,10290=>703,10291=>703,10292=>703,10293=>703,10294=>703,10295=>703,10296=>703,10297=>703,10298=>703,10299=>703,10300=>703,10301=>703,10302=>703,10303=>703,10304=>703,10305=>703,10306=>703,10307=>703,10308=>703,10309=>703,10310=>703,10311=>703,10312=>703,10313=>703,10314=>703,10315=>703,10316=>703,10317=>703,10318=>703,10319=>703,10320=>703,10321=>703,10322=>703,10323=>703,10324=>703,10325=>703,10326=>703,10327=>703,10328=>703,10329=>703,10330=>703,10331=>703,10332=>703,10333=>703,10334=>703,10335=>703,10336=>703,10337=>703,10338=>703,10339=>703,10340=>703,10341=>703,10342=>703,10343=>703,10344=>703,10345=>703,10346=>703,10347=>703,10348=>703,10349=>703,10350=>703,10351=>703,10352=>703,10353=>703,10354=>703,10355=>703,10356=>703,10357=>703,10358=>703,10359=>703,10360=>703,10361=>703,10362=>703,10363=>703,10364=>703,10365=>703,10366=>703,10367=>703,10368=>703,10369=>703,10370=>703,10371=>703,10372=>703,10373=>703,10374=>703,10375=>703,10376=>703,10377=>703,10378=>703,10379=>703,10380=>703,10381=>703,10382=>703,10383=>703,10384=>703,10385=>703,10386=>703,10387=>703,10388=>703,10389=>703,10390=>703,10391=>703,10392=>703,10393=>703,10394=>703,10395=>703,10396=>703,10397=>703,10398=>703,10399=>703,10400=>703,10401=>703,10402=>703,10403=>703,10404=>703,10405=>703,10406=>703,10407=>703,10408=>703,10409=>703,10410=>703,10411=>703,10412=>703,10413=>703,10414=>703,10415=>703,10416=>703,10417=>703,10418=>703,10419=>703,10420=>703,10421=>703,10422=>703,10423=>703,10424=>703,10425=>703,10426=>703,10427=>703,10428=>703,10429=>703,10430=>703,10431=>703,10432=>703,10433=>703,10434=>703,10435=>703,10436=>703,10437=>703,10438=>703,10439=>703,10440=>703,10441=>703,10442=>703,10443=>703,10444=>703,10445=>703,10446=>703,10447=>703,10448=>703,10449=>703,10450=>703,10451=>703,10452=>703,10453=>703,10454=>703,10455=>703,10456=>703,10457=>703,10458=>703,10459=>703,10460=>703,10461=>703,10462=>703,10463=>703,10464=>703,10465=>703,10466=>703,10467=>703,10468=>703,10469=>703,10470=>703,10471=>703,10472=>703,10473=>703,10474=>703,10475=>703,10476=>703,10477=>703,10478=>703,10479=>703,10480=>703,10481=>703,10482=>703,10483=>703,10484=>703,10485=>703,10486=>703,10487=>703,10488=>703,10489=>703,10490=>703,10491=>703,10492=>703,10493=>703,10494=>703,10495=>703,10502=>754,10503=>754,10506=>754,10507=>754,10560=>754,10561=>754,10627=>678,10628=>678,10702=>754,10703=>941,10704=>941,10705=>900,10706=>900,10707=>900,10708=>900,10709=>900,10731=>444,10746=>754,10747=>754,10752=>900,10753=>900,10754=>900,10764=>1495,10765=>506,10766=>506,10767=>506,10768=>506,10769=>506,10770=>506,10771=>506,10772=>506,10773=>506,10774=>506,10775=>506,10776=>506,10777=>506,10778=>506,10779=>506,10780=>506,10799=>754,10858=>754,10859=>754,10877=>754,10878=>754,10879=>754,10880=>754,10881=>754,10882=>754,10883=>754,10884=>754,10885=>754,10886=>754,10887=>754,10888=>754,10889=>754,10890=>754,10891=>754,10892=>754,10893=>754,10894=>754,10895=>754,10896=>754,10897=>754,10898=>754,10899=>754,10900=>754,10901=>754,10902=>754,10903=>754,10904=>754,10905=>754,10906=>754,10907=>754,10908=>754,10909=>754,10910=>754,10911=>754,10912=>754,10926=>754,10927=>754,10928=>754,10929=>754,10930=>754,10931=>754,10932=>754,10933=>754,10934=>754,10935=>754,10936=>754,10937=>754,10938=>754,11001=>754,11002=>754,11008=>754,11009=>754,11010=>754,11011=>754,11012=>754,11013=>754,11014=>754,11015=>754,11016=>754,11017=>754,11018=>754,11019=>754,11020=>754,11021=>754,11022=>754,11023=>754,11024=>754,11025=>754,11026=>850,11027=>850,11028=>850,11029=>850,11030=>692,11031=>692,11032=>692,11033=>692,11034=>850,11039=>782,11040=>782,11041=>786,11042=>786,11043=>786,11044=>1007,11091=>782,11092=>782,11360=>573,11361=>324,11362=>573,11363=>659,11364=>693,11365=>607,11366=>430,11367=>860,11368=>641,11369=>697,11370=>598,11371=>652,11372=>523,11373=>774,11374=>896,11375=>696,11376=>774,11377=>700,11378=>1099,11379=>950,11380=>586,11381=>628,11382=>508,11383=>704,11385=>484,11386=>618,11387=>502,11388=>197,11389=>438,11390=>648,11391=>652,11520=>596,11521=>608,11522=>595,11523=>566,11524=>595,11525=>928,11526=>646,11527=>928,11528=>583,11529=>600,11530=>928,11531=>605,11532=>609,11533=>932,11534=>612,11535=>797,11536=>928,11537=>615,11538=>606,11539=>931,11540=>930,11541=>924,11542=>608,11543=>605,11544=>600,11545=>600,11546=>593,11547=>604,11548=>935,11549=>605,11550=>623,11551=>593,11552=>943,11553=>593,11554=>588,11555=>603,11556=>659,11557=>915,11800=>527,11807=>754,11810=>411,11811=>411,11812=>411,11813=>411,11822=>522,19904=>807,19905=>807,19906=>807,19907=>807,19908=>807,19909=>807,19910=>807,19911=>807,19912=>807,19913=>807,19914=>807,19915=>807,19916=>807,19917=>807,19918=>807,19919=>807,19920=>807,19921=>807,19922=>807,19923=>807,19924=>807,19925=>807,19926=>807,19927=>807,19928=>807,19929=>807,19930=>807,19931=>807,19932=>807,19933=>807,19934=>807,19935=>807,19936=>807,19937=>807,19938=>807,19939=>807,19940=>807,19941=>807,19942=>807,19943=>807,19944=>807,19945=>807,19946=>807,19947=>807,19948=>807,19949=>807,19950=>807,19951=>807,19952=>807,19953=>807,19954=>807,19955=>807,19956=>807,19957=>807,19958=>807,19959=>807,19960=>807,19961=>807,19962=>807,19963=>807,19964=>807,19965=>807,19966=>807,19967=>807,42192=>686,42193=>659,42194=>659,42195=>747,42196=>614,42197=>614,42198=>738,42199=>697,42200=>697,42201=>477,42202=>660,42203=>660,42204=>652,42205=>615,42206=>615,42207=>896,42208=>753,42209=>573,42210=>648,42211=>693,42212=>693,42213=>696,42214=>696,42215=>753,42216=>707,42217=>477,42218=>993,42219=>694,42220=>651,42221=>686,42222=>696,42223=>696,42224=>615,42225=>615,42226=>334,42227=>765,42228=>730,42229=>730,42230=>518,42231=>747,42232=>290,42233=>290,42234=>606,42235=>606,42236=>290,42237=>290,42238=>529,42239=>529,42564=>648,42565=>536,42566=>392,42567=>396,42572=>1265,42573=>1055,42576=>1110,42577=>924,42580=>1056,42581=>875,42582=>990,42583=>872,42594=>990,42595=>846,42596=>986,42597=>823,42598=>1134,42599=>896,42600=>765,42601=>618,42602=>933,42603=>781,42604=>1266,42605=>995,42606=>865,42634=>849,42635=>673,42636=>614,42637=>521,42644=>727,42645=>641,42760=>450,42761=>450,42762=>450,42763=>450,42764=>450,42765=>450,42766=>450,42767=>450,42768=>450,42769=>450,42770=>450,42771=>450,42772=>450,42773=>450,42774=>450,42779=>360,42780=>360,42781=>258,42782=>258,42783=>258,42786=>399,42787=>351,42788=>486,42789=>486,42790=>753,42791=>641,42792=>928,42793=>771,42794=>626,42795=>501,42800=>502,42801=>536,42802=>1214,42803=>946,42804=>1156,42805=>958,42806=>1120,42807=>947,42808=>971,42809=>830,42810=>971,42811=>830,42812=>932,42813=>830,42814=>628,42815=>494,42816=>590,42817=>521,42822=>765,42823=>488,42824=>614,42825=>478,42826=>826,42827=>732,42830=>1266,42831=>995,42832=>659,42833=>644,42834=>853,42835=>843,42838=>765,42839=>644,42852=>664,42853=>644,42854=>664,42855=>644,42880=>573,42881=>308,42882=>753,42883=>641,42889=>360,42890=>356,42891=>410,42892=>275,42893=>727,42894=>624,42896=>835,42897=>691,42912=>738,42913=>644,42914=>697,42915=>598,42916=>753,42917=>641,42918=>693,42919=>444,42920=>648,42921=>536,42922=>797,43002=>956,43003=>615,43004=>659,43005=>896,43006=>334,43007=>1192,61184=>194,61185=>218,61186=>240,61187=>249,61188=>254,61189=>218,61190=>194,61191=>218,61192=>240,61193=>249,61194=>240,61195=>218,61196=>194,61197=>218,61198=>240,61199=>249,61200=>240,61201=>218,61202=>194,61203=>218,61204=>254,61205=>249,61206=>240,61207=>218,61208=>194,61209=>254,62464=>551,62465=>551,62466=>587,62467=>812,62468=>555,62469=>555,62470=>612,62471=>813,62472=>539,62473=>555,62474=>1046,62475=>559,62476=>560,62477=>803,62478=>551,62479=>559,62480=>832,62481=>560,62482=>678,62483=>562,62484=>797,62485=>559,62486=>816,62487=>559,62488=>550,62489=>561,62490=>609,62491=>559,62492=>550,62493=>567,62494=>560,62495=>505,62496=>550,62497=>563,62498=>551,62499=>550,62500=>556,62501=>600,62502=>866,62504=>920,62505=>760,62506=>507,62507=>507,62508=>507,62509=>507,62510=>507,62511=>507,62512=>499,62513=>499,62514=>499,62515=>499,62516=>516,62517=>516,62518=>516,62519=>742,62520=>742,62521=>742,62522=>742,62523=>742,62524=>549,62525=>549,62526=>549,62527=>549,62528=>549,62529=>549,62917=>618,64256=>749,64257=>708,64258=>708,64259=>1024,64260=>1024,64261=>727,64262=>917,64275=>1249,64276=>1245,64277=>1240,64278=>1245,64279=>1542,64285=>265,64286=>0,64287=>597,64288=>598,64289=>845,64290=>709,64291=>828,64292=>707,64293=>771,64294=>782,64295=>739,64296=>801,64297=>754,64298=>673,64299=>673,64300=>673,64301=>673,64302=>655,64303=>655,64304=>655,64305=>549,64306=>402,64307=>529,64308=>618,64309=>309,64310=>360,64311=>900,64312=>611,64313=>392,64314=>520,64315=>510,64316=>544,64317=>900,64318=>651,64319=>900,64320=>408,64321=>611,64322=>900,64323=>607,64324=>592,64325=>900,64326=>587,64327=>663,64328=>542,64329=>673,64330=>615,64331=>309,64332=>549,64333=>510,64334=>592,64335=>639,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>1002,65535=>540); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.z b/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.z deleted file mode 100644 index 37da24ac6..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensedbi.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedi.ctg.z b/lib/combodo/tcpdf/fonts/dejavusanscondensedi.ctg.z deleted file mode 100644 index 1b98d135f..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensedi.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedi.php b/lib/combodo/tcpdf/fonts/dejavusanscondensedi.php deleted file mode 100644 index 44b9730de..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusanscondensedi.php +++ /dev/null @@ -1,16 +0,0 @@ -96,'FontBBox'=>'[-914 -350 1493 1068]','ItalicAngle'=>-11,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>34,'StemH'=>15,'AvgWidth'=>456,'MaxWidth'=>1521,'MissingWidth'=>540); -$cbbox=array(0=>array(44,-177,495,705),33=>array(71,0,288,729),34=>array(86,458,328,729),35=>array(63,0,696,718),36=>array(30,-147,513,760),37=>array(82,-14,773,742),38=>array(42,-14,663,742),39=>array(86,458,162,729),40=>array(69,-132,384,759),41=>array(-56,-132,259,759),42=>array(26,286,423,742),43=>array(95,0,659,627),44=>array(2,-116,174,124),45=>array(40,234,292,314),46=>array(52,0,167,124),47=>array(-66,-93,384,729),48=>array(44,-14,527,742),49=>array(44,0,437,729),50=>array(3,0,517,742),51=>array(1,-14,515,742),52=>array(16,0,509,729),53=>array(18,-14,523,729),54=>array(57,-14,533,742),55=>array(83,0,564,729),56=>array(30,-14,534,742),57=>array(40,-14,517,742),58=>array(46,0,230,517),59=>array(0,-116,241,517),60=>array(95,46,659,581),61=>array(95,172,659,454),62=>array(95,46,659,581),63=>array(110,0,460,742),64=>array(52,-173,855,703),65=>array(-48,0,554,729),66=>array(24,0,563,729),67=>array(38,-14,625,742),68=>array(24,0,650,729),69=>array(24,0,567,729),70=>array(24,0,528,729),71=>array(40,-14,653,742),72=>array(24,0,653,729),73=>array(24,0,242,729),74=>array(-148,-200,240,729),75=>array(24,0,650,729),76=>array(24,0,448,729),77=>array(24,0,752,729),78=>array(24,0,649,729),79=>array(36,-14,672,742),80=>array(24,0,541,729),81=>array(37,-129,672,742),82=>array(24,0,541,729),83=>array(5,-14,543,742),84=>array(39,0,608,729),85=>array(52,-14,642,729),86=>array(70,0,668,729),87=>array(86,0,918,729),88=>array(-39,0,633,729),89=>array(57,0,608,729),90=>array(-20,0,633,729),91=>array(36,-132,378,760),92=>array(76,-93,236,729),93=>array(-35,-132,308,760),94=>array(95,457,659,729),95=>array(-9,-236,459,-166),96=>array(171,617,350,800),97=>array(37,-14,492,560),98=>array(32,-14,528,760),99=>array(41,-14,483,560),100=>array(41,-14,576,760),101=>array(41,-14,514,560),102=>array(61,0,431,760),103=>array(29,-208,537,560),104=>array(31,0,510,760),105=>array(31,0,246,760),106=>array(-102,-208,250,760),107=>array(31,0,551,760),108=>array(31,0,246,760),109=>array(31,0,815,560),110=>array(31,0,510,560),111=>array(41,-14,510,560),112=>array(-3,-208,530,560),113=>array(41,-206,538,560),114=>array(31,0,417,560),115=>array(10,-14,450,560),116=>array(57,0,381,702),117=>array(51,-14,530,547),118=>array(64,0,544,547),119=>array(76,0,737,547),120=>array(-23,0,541,547),121=>array(-22,-208,543,547),122=>array(-3,0,489,547),123=>array(109,-163,545,760),124=>array(114,-236,189,764),125=>array(6,-163,442,760),126=>array(95,228,659,399),161=>array(76,0,294,729),162=>array(66,-153,507,698),163=>array(21,0,574,742),164=>array(41,40,533,587),165=>array(40,0,606,729),166=>array(114,-171,189,699),167=>array(11,-95,437,742),168=>array(166,659,444,758),169=>array(124,0,776,725),170=>array(36,229,401,742),171=>array(56,69,500,517),172=>array(95,140,659,421),173=>array(40,234,292,314),174=>array(124,0,776,725),175=>array(167,673,443,745),176=>array(85,432,365,742),177=>array(95,0,659,627),178=>array(32,326,347,742),179=>array(14,319,332,742),180=>array(227,616,470,800),181=>array(-12,-208,533,547),182=>array(70,-96,516,729),183=>array(102,285,217,409),184=>array(44,-193,241,0),185=>array(59,326,313,734),186=>array(36,229,416,742),187=>array(56,69,499,517),188=>array(59,-14,862,742),189=>array(59,-14,857,742),190=>array(14,-14,862,742),191=>array(33,-13,382,729),192=>array(-48,0,554,927),193=>array(-48,0,554,927),194=>array(-48,0,554,928),195=>array(-48,0,556,921),196=>array(-48,0,554,913),197=>array(-48,0,554,928),198=>array(-41,0,895,729),199=>array(38,-193,625,742),200=>array(24,0,567,927),201=>array(24,0,567,927),202=>array(24,0,567,928),203=>array(24,0,567,913),204=>array(24,0,263,927),205=>array(24,0,345,927),206=>array(24,0,341,928),207=>array(24,0,353,913),208=>array(0,0,655,729),209=>array(24,0,649,921),210=>array(36,-14,672,927),211=>array(36,-14,672,927),212=>array(36,-14,672,928),213=>array(36,-14,672,921),214=>array(36,-14,672,913),215=>array(123,31,631,596),216=>array(-31,-32,729,761),217=>array(52,-14,642,927),218=>array(52,-14,642,927),219=>array(52,-14,642,928),220=>array(52,-14,642,913),221=>array(57,0,608,927),222=>array(24,0,520,729),223=>array(42,-14,531,760),224=>array(37,-14,492,800),225=>array(37,-14,514,800),226=>array(37,-14,492,800),227=>array(37,-14,506,777),228=>array(37,-14,492,758),229=>array(37,-14,492,878),230=>array(37,-14,856,560),231=>array(41,-193,483,560),232=>array(41,-14,514,800),233=>array(41,-14,519,800),234=>array(41,-14,514,800),235=>array(41,-14,514,758),236=>array(31,0,236,800),237=>array(31,0,356,800),238=>array(31,0,316,800),239=>array(31,0,331,758),240=>array(40,-14,528,760),241=>array(31,0,522,777),242=>array(41,-14,510,800),243=>array(41,-14,521,800),244=>array(41,-14,510,800),245=>array(41,-14,513,777),246=>array(41,-14,510,758),247=>array(95,73,659,554),248=>array(-13,-46,560,590),249=>array(51,-14,530,800),250=>array(51,-14,530,800),251=>array(51,-14,530,800),252=>array(51,-14,530,758),253=>array(-22,-208,543,800),254=>array(-3,-208,530,760),255=>array(-22,-208,543,758),256=>array(-48,0,554,899),257=>array(37,-14,492,745),258=>array(-48,0,562,926),259=>array(37,-14,506,761),260=>array(-48,-194,557,729),261=>array(37,-194,492,560),262=>array(38,-14,625,927),263=>array(41,-14,522,800),264=>array(38,-14,625,928),265=>array(41,-14,497,800),266=>array(38,-14,625,914),267=>array(41,-14,483,760),268=>array(38,-14,625,928),269=>array(41,-14,514,800),270=>array(24,0,650,928),271=>array(41,-14,738,760),272=>array(0,0,655,729),273=>array(41,-14,631,760),274=>array(24,0,567,900),275=>array(41,-14,514,745),276=>array(24,0,567,928),277=>array(41,-14,514,785),278=>array(24,0,567,914),279=>array(41,-14,514,760),280=>array(24,-194,567,729),281=>array(41,-194,514,560),282=>array(24,0,567,928),283=>array(41,-14,514,800),284=>array(40,-14,653,928),285=>array(29,-208,537,800),286=>array(40,-14,653,928),287=>array(29,-208,537,785),288=>array(40,-14,653,914),289=>array(29,-208,537,760),290=>array(40,-250,653,742),291=>array(29,-208,537,775),292=>array(24,0,653,928),293=>array(31,0,510,928),294=>array(98,0,781,729),295=>array(41,0,519,760),296=>array(24,0,374,921),297=>array(31,0,349,777),298=>array(24,0,351,899),299=>array(31,0,343,745),300=>array(24,0,360,928),301=>array(31,0,343,785),302=>array(-6,-194,242,729),303=>array(-7,-194,246,760),304=>array(24,0,274,914),305=>array(31,0,209,547),306=>array(24,-200,505,729),307=>array(31,-208,499,760),308=>array(-148,-200,347,928),309=>array(-102,-208,325,800),310=>array(24,-235,650,729),311=>array(31,-235,551,760),312=>array(34,0,556,547),313=>array(24,0,448,928),314=>array(31,0,380,928),315=>array(24,-235,448,729),316=>array(18,-235,246,760),317=>array(24,0,448,729),318=>array(31,0,426,760),319=>array(24,0,448,729),320=>array(31,0,399,760),321=>array(-18,0,452,729),322=>array(15,0,286,760),323=>array(24,0,649,928),324=>array(31,0,510,803),325=>array(24,-235,649,729),326=>array(31,-235,510,560),327=>array(24,0,649,928),328=>array(31,0,514,800),329=>array(67,0,659,729),330=>array(42,-208,614,742),331=>array(31,-208,510,560),332=>array(36,-14,672,899),333=>array(41,-14,510,745),334=>array(36,-14,672,928),335=>array(41,-14,510,785),336=>array(36,-14,696,927),337=>array(41,-14,561,800),338=>array(41,0,960,729),339=>array(41,-14,886,560),340=>array(24,0,541,928),341=>array(31,0,494,803),342=>array(24,-235,541,729),343=>array(18,-235,417,560),344=>array(24,0,541,925),345=>array(31,0,443,800),346=>array(5,-14,543,928),347=>array(10,-14,494,803),348=>array(5,-14,543,928),349=>array(10,-14,450,800),350=>array(5,-193,543,742),351=>array(10,-193,450,560),352=>array(5,-14,543,928),353=>array(10,-14,471,800),354=>array(39,-193,608,729),355=>array(56,-193,381,702),356=>array(39,0,608,928),357=>array(57,0,430,803),358=>array(46,0,616,729),359=>array(14,0,366,702),360=>array(52,-14,642,921),361=>array(51,-14,530,777),362=>array(52,-14,642,899),363=>array(51,-14,530,745),364=>array(52,-14,642,928),365=>array(51,-14,530,785),366=>array(52,-14,642,929),367=>array(51,-14,530,861),368=>array(52,-14,657,927),369=>array(51,-14,557,800),370=>array(52,-194,642,729),371=>array(51,-194,530,547),372=>array(86,0,918,932),373=>array(76,0,737,800),374=>array(57,0,608,932),375=>array(-22,-208,543,800),376=>array(57,0,608,913),377=>array(-20,0,633,928),378=>array(-3,0,494,803),379=>array(-20,0,633,912),380=>array(-3,0,489,760),381=>array(-20,0,633,928),382=>array(-3,0,489,800),383=>array(61,0,431,760),384=>array(17,-14,505,760),385=>array(46,0,667,729),386=>array(24,0,571,729),387=>array(17,-14,521,760),388=>array(38,0,541,729),389=>array(31,-14,520,760),390=>array(56,-14,644,742),391=>array(35,-14,797,924),392=>array(35,-14,605,724),393=>array(0,0,655,729),394=>array(46,0,748,729),395=>array(62,0,618,729),396=>array(32,-14,558,760),397=>array(49,-208,518,548),398=>array(57,0,608,729),399=>array(46,-14,675,742),400=>array(109,-14,609,742),401=>array(-128,-200,547,729),402=>array(-142,-208,419,760),403=>array(35,-14,824,924),404=>array(85,-210,697,729),405=>array(15,0,807,760),406=>array(68,0,263,729),407=>array(0,0,270,729),408=>array(23,0,713,742),409=>array(15,0,537,760),410=>array(-2,0,250,760),411=>array(-40,0,481,760),412=>array(53,-14,870,729),413=>array(-128,-200,667,729),414=>array(51,-208,521,560),415=>array(36,-14,672,742),416=>array(31,-14,741,761),417=>array(43,-14,591,609),418=>array(50,-14,786,742),419=>array(66,-208,632,560),420=>array(46,0,646,729),421=>array(-3,-208,522,760),422=>array(36,-129,533,729),423=>array(1,-14,522,742),424=>array(9,-14,426,560),425=>array(24,0,567,729),426=>array(-53,-208,307,760),427=>array(64,-208,384,702),428=>array(39,0,616,729),429=>array(41,0,386,760),430=>array(64,-200,634,729),431=>array(50,-4,769,761),432=>array(52,-14,648,615),433=>array(38,-14,718,724),434=>array(68,-1,611,729),435=>array(61,0,710,742),436=>array(4,-208,700,560),437=>array(-23,0,630,729),438=>array(-9,0,482,547),439=>array(21,-31,587,729),440=>array(13,-31,596,729),441=>array(19,-213,535,547),442=>array(-8,-208,479,547),443=>array(0,0,508,742),444=>array(14,-31,563,729),445=>array(-15,-213,496,547),446=>array(-18,-14,387,702),447=>array(-5,-208,542,560),448=>array(6,-208,259,729),449=>array(6,-208,437,729),450=>array(-12,-208,436,729),451=>array(23,0,241,729),452=>array(24,0,1326,928),453=>array(24,0,1182,800),454=>array(41,-14,1060,800),455=>array(24,-200,741,729),456=>array(24,-208,751,760),457=>array(31,-208,500,760),458=>array(24,-200,913,729),459=>array(24,-208,923,760),460=>array(31,-208,820,760),461=>array(-48,0,554,928),462=>array(37,-14,501,800),463=>array(24,0,373,928),464=>array(31,0,360,800),465=>array(36,-14,672,928),466=>array(41,-14,538,800),467=>array(52,-14,642,928),468=>array(51,-14,530,800),469=>array(52,-14,642,1025),470=>array(51,-14,530,899),471=>array(52,-14,642,1047),472=>array(51,-14,530,903),473=>array(52,-14,642,1044),474=>array(51,-14,530,906),475=>array(52,-14,642,1044),476=>array(51,-14,530,903),477=>array(45,-14,507,560),478=>array(-48,0,564,1025),479=>array(37,-14,494,899),480=>array(-48,0,565,1025),481=>array(37,-14,516,868),482=>array(-41,0,895,900),483=>array(37,-14,856,743),484=>array(40,-14,669,742),485=>array(29,-208,537,560),486=>array(40,-14,653,928),487=>array(29,-208,537,800),488=>array(24,0,650,928),489=>array(31,0,551,928),490=>array(36,-194,672,742),491=>array(41,-194,510,560),492=>array(36,-194,672,899),493=>array(41,-194,510,745),494=>array(21,-31,587,928),495=>array(-43,-213,478,793),496=>array(-102,-208,353,793),497=>array(24,0,1326,729),498=>array(24,0,1182,729),499=>array(41,-14,1060,760),500=>array(40,-14,653,928),501=>array(29,-208,537,800),502=>array(26,-14,953,729),503=>array(-13,-208,599,742),504=>array(24,0,649,927),505=>array(31,0,510,800),506=>array(-48,0,708,928),507=>array(37,-14,695,928),508=>array(-41,0,895,928),509=>array(37,-14,856,800),510=>array(-31,-32,729,928),511=>array(-13,-46,560,800),512=>array(-48,0,554,930),513=>array(37,-14,492,800),514=>array(-48,0,554,917),515=>array(37,-14,495,785),516=>array(24,0,567,930),517=>array(41,-14,514,800),518=>array(24,0,567,917),519=>array(41,-14,514,785),520=>array(24,0,327,930),521=>array(20,0,329,800),522=>array(24,0,354,917),523=>array(31,0,333,785),524=>array(36,-14,672,930),525=>array(41,-14,510,800),526=>array(36,-14,672,917),527=>array(41,-14,510,785),528=>array(24,0,541,930),529=>array(31,0,417,800),530=>array(24,0,541,917),531=>array(31,0,438,785),532=>array(52,-14,642,930),533=>array(51,-14,530,800),534=>array(52,-14,642,917),535=>array(51,-14,530,785),536=>array(5,-240,543,742),537=>array(10,-240,450,560),538=>array(39,-240,608,729),539=>array(57,-240,381,702),540=>array(-33,-210,534,742),541=>array(-56,-211,440,560),542=>array(24,0,653,928),543=>array(31,0,510,928),544=>array(24,-208,597,742),545=>array(37,-70,670,760),546=>array(17,-14,597,742),547=>array(30,-14,526,648),548=>array(-5,-208,648,729),549=>array(9,-208,500,547),550=>array(-48,0,554,914),551=>array(37,-14,492,760),552=>array(24,-189,567,729),553=>array(41,-193,514,560),554=>array(36,-14,672,1025),555=>array(41,-14,524,899),556=>array(36,-14,672,1025),557=>array(41,-14,521,861),558=>array(36,-14,672,914),559=>array(41,-14,510,760),560=>array(36,-14,672,1029),561=>array(41,-14,510,899),562=>array(57,0,608,899),563=>array(-22,-208,543,745),564=>array(-12,-70,343,757),565=>array(39,-70,691,560),566=>array(-5,-70,372,702),567=>array(-102,-208,211,547),568=>array(32,-14,832,760),569=>array(66,-208,866,560),570=>array(-63,-34,679,761),571=>array(-57,-34,686,761),572=>array(-45,-46,541,592),573=>array(0,0,448,729),574=>array(-97,-34,646,761),575=>array(24,-242,464,560),576=>array(12,-242,503,547),577=>array(141,0,602,729),578=>array(62,0,412,560),579=>array(-28,0,559,729),580=>array(3,-14,666,729),581=>array(-57,0,545,729),582=>array(24,-93,573,822),583=>array(32,-93,516,640),584=>array(-147,-200,264,729),585=>array(-103,-208,249,760),586=>array(66,-200,695,743),587=>array(66,-208,555,560),588=>array(-6,0,541,729),589=>array(-4,0,418,560),590=>array(26,0,615,729),591=>array(5,-208,572,547),592=>array(62,-14,518,560),593=>array(49,-14,538,560),594=>array(1,-14,490,560),595=>array(17,-14,505,760),596=>array(2,-14,444,560),597=>array(54,-70,488,560),598=>array(49,-208,575,760),599=>array(32,-14,739,760),600=>array(25,-14,505,560),601=>array(45,-14,507,560),602=>array(36,-14,737,560),603=>array(35,-14,455,561),604=>array(4,-11,454,560),605=>array(13,-14,700,561),606=>array(49,-14,548,561),607=>array(-83,-208,260,547),608=>array(29,-208,729,760),609=>array(48,-208,556,547),610=>array(49,0,513,574),611=>array(92,-210,561,547),612=>array(91,-14,543,547),613=>array(84,-208,555,547),614=>array(15,0,485,760),615=>array(33,-208,504,760),616=>array(23,0,278,760),617=>array(71,0,232,547),618=>array(3,0,331,547),619=>array(20,0,334,760),620=>array(37,0,375,760),621=>array(35,-208,250,760),622=>array(37,-213,596,760),623=>array(73,-13,850,548),624=>array(90,-208,866,547),625=>array(51,-208,827,560),626=>array(-83,-208,524,560),627=>array(51,-208,541,560),628=>array(31,0,542,547),629=>array(49,-14,501,560),630=>array(49,0,733,547),631=>array(60,-15,592,560),632=>array(48,-208,542,760),633=>array(1,-13,387,547),634=>array(-17,-13,405,755),635=>array(19,-208,404,547),636=>array(-18,-208,404,560),637=>array(17,-208,404,560),638=>array(2,0,442,560),639=>array(86,0,358,560),640=>array(-26,0,409,547),641=>array(-26,0,505,547),642=>array(16,-208,461,560),643=>array(-101,-208,404,760),644=>array(-102,-208,404,760),645=>array(77,-208,308,549),646=>array(-185,-208,404,760),647=>array(-10,-155,310,547),648=>array(35,-208,384,702),649=>array(-8,-14,577,547),650=>array(50,-15,558,547),651=>array(71,0,497,548),652=>array(-21,0,458,547),653=>array(-10,0,650,547),654=>array(-40,0,527,755),655=>array(92,0,545,547),656=>array(9,-208,500,547),657=>array(-4,-54,487,547),658=>array(-22,-213,499,547),659=>array(18,-213,499,547),660=>array(83,0,437,759),661=>array(65,0,470,759),662=>array(-22,0,384,759),663=>array(-7,-213,489,760),664=>array(50,-14,658,742),665=>array(34,0,481,547),666=>array(30,-14,537,561),667=>array(33,0,721,759),668=>array(34,0,555,547),669=>array(-185,-208,250,760),670=>array(63,-213,585,547),671=>array(34,0,408,547),672=>array(49,-208,756,759),673=>array(6,0,437,759),674=>array(65,0,470,759),675=>array(32,-14,904,760),676=>array(49,-213,922,760),677=>array(35,-54,907,760),678=>array(46,0,708,702),679=>array(59,-208,651,760),680=>array(52,-70,688,702),681=>array(49,-208,734,760),682=>array(18,0,591,760),683=>array(18,0,579,760),684=>array(20,-15,497,640),685=>array(-25,84,489,640),686=>array(71,-214,562,760),687=>array(71,-208,561,760),688=>array(14,326,307,751),689=>array(14,326,307,751),690=>array(-58,209,152,751),691=>array(24,326,260,640),692=>array(4,319,241,632),693=>array(14,209,250,632),694=>array(-13,326,315,632),695=>array(50,326,467,632),696=>array(8,209,356,632),697=>array(147,557,303,800),698=>array(147,557,466,800),699=>array(118,489,289,729),700=>array(55,489,227,729),701=>array(161,616,268,856),702=>array(123,492,267,760),703=>array(124,492,268,760),704=>array(77,326,300,751),705=>array(66,326,319,751),706=>array(229,524,479,836),707=>array(209,524,458,836),708=>array(183,561,463,800),709=>array(224,561,505,800),710=>array(148,616,430,800),711=>array(180,616,461,800),712=>array(94,488,154,759),713=>array(167,673,443,745),714=>array(227,616,470,800),715=>array(171,617,350,800),716=>array(94,-148,154,123),717=>array(22,-156,298,-84),718=>array(171,-236,350,-54),719=>array(227,-237,470,-54),720=>array(3,0,251,517),721=>array(63,356,220,517),722=>array(80,249,224,517),723=>array(81,249,225,517),724=>array(106,229,317,448),725=>array(132,229,343,448),726=>array(42,125,318,417),727=>array(42,234,253,307),728=>array(180,645,457,785),729=>array(250,658,358,758),730=>array(188,610,430,878),731=>array(88,-194,251,0),732=>array(147,639,462,777),733=>array(169,616,510,800),734=>array(-4,233,291,504),735=>array(94,616,366,800),736=>array(56,208,374,632),737=>array(14,326,140,751),738=>array(26,326,297,648),739=>array(24,326,374,632),740=>array(66,326,319,751),741=>array(141,0,409,668),742=>array(114,0,409,668),743=>array(88,0,409,668),744=>array(62,0,409,668),745=>array(35,0,409,668),748=>array(86,-260,367,-21),749=>array(156,610,454,808),750=>array(121,489,473,729),755=>array(85,-240,327,28),759=>array(74,-193,389,-83),768=>array(-233,617,-55,800),769=>array(-183,616,61,800),770=>array(-256,616,25,800),771=>array(-259,639,55,777),772=>array(-240,673,36,745),773=>array(-459,686,9,755),774=>array(-224,645,52,785),775=>array(-153,646,-52,760),776=>array(-239,659,40,758),777=>array(-184,618,13,810),778=>array(-216,610,25,878),779=>array(-238,616,104,800),780=>array(-229,616,52,800),781=>array(-274,615,-176,832),782=>array(-364,615,-86,832),783=>array(-298,616,11,800),784=>array(-273,645,3,854),785=>array(-223,645,54,785),786=>array(-170,489,-14,645),787=>array(-296,595,-146,844),788=>array(-274,595,-146,844),789=>array(-72,616,72,800),790=>array(-280,-266,-101,-83),791=>array(-224,-267,19,-83),792=>array(-327,-240,-180,-24),793=>array(-271,-240,-123,-24),794=>array(-179,690,49,930),795=>array(-126,427,62,609),796=>array(-283,-241,-168,-32),797=>array(-346,-240,-119,-87),798=>array(-331,-240,-104,-87),799=>array(-327,-240,-123,-24),800=>array(-238,-184,-11,-117),801=>array(-305,-208,5,63),802=>array(-305,-208,-63,63),803=>array(-299,-184,-198,-70),804=>array(-392,-183,-113,-84),805=>array(-320,-241,-132,-32),806=>array(-305,-240,-148,-84),807=>array(-406,-193,-209,0),808=>array(-362,-194,-199,0),809=>array(-272,-240,-178,-47),810=>array(-359,-211,-88,-50),811=>array(-421,-222,-60,-82),812=>array(-347,-240,-66,-57),813=>array(-386,-240,-105,-57),814=>array(-390,-222,-113,-82),815=>array(-414,-224,-137,-83),816=>array(-419,-222,-105,-84),817=>array(-397,-156,-121,-84),818=>array(-510,-236,-30,-166),819=>array(-500,-236,7,-9),820=>array(-514,240,-24,381),821=>array(-292,221,-46,301),822=>array(-578,221,7,301),823=>array(-566,-46,20,592),824=>array(-729,-34,14,761),825=>array(-280,-241,-166,-32),826=>array(-358,-206,-88,-44),827=>array(-343,-240,-105,-21),828=>array(-446,-222,-84,-82),829=>array(-333,608,-117,825),830=>array(-245,595,-76,853),831=>array(-459,528,9,755),832=>array(-233,617,-55,800),833=>array(-183,616,61,800),834=>array(-259,639,55,777),835=>array(-296,595,-146,844),836=>array(-277,659,55,978),837=>array(-320,-208,-227,-45),838=>array(-370,639,-81,786),839=>array(-341,-226,-109,-35),840=>array(-345,-240,-105,-47),841=>array(-318,-240,-106,-21),842=>array(-382,616,-68,800),843=>array(-382,567,-68,850),844=>array(-382,596,-67,820),845=>array(-407,-230,-43,-30),846=>array(-324,-240,-132,-45),849=>array(-285,610,-142,878),850=>array(-374,633,-97,855),851=>array(-333,-241,-117,-24),855=>array(-309,610,-165,878),856=>array(21,658,128,758),858=>array(-387,-241,-63,-32),860=>array(-435,-237,367,-60),861=>array(-261,802,541,979),862=>array(-268,855,541,927),863=>array(-442,-156,374,-84),864=>array(-187,756,476,894),865=>array(-261,752,541,929),866=>array(-475,-230,330,-30),880=>array(24,0,511,729),881=>array(37,0,438,547),882=>array(85,0,751,729),883=>array(85,0,558,729),884=>array(147,557,303,800),885=>array(24,-208,179,35),886=>array(24,0,649,729),887=>array(34,0,551,547),890=>array(123,-208,216,-45),891=>array(2,-14,444,560),892=>array(41,-14,483,560),893=>array(2,-14,444,560),894=>array(0,-116,241,517),900=>array(227,616,470,800),901=>array(166,659,498,978),902=>array(-48,0,554,800),903=>array(102,285,217,409),904=>array(53,0,688,800),905=>array(58,0,782,800),906=>array(55,0,368,800),908=>array(57,-14,714,800),910=>array(50,0,827,800),911=>array(47,0,746,800),912=>array(66,0,405,978),913=>array(-48,0,554,729),914=>array(24,0,563,729),915=>array(24,0,561,729),916=>array(-57,0,545,729),917=>array(24,0,567,729),918=>array(-20,0,633,729),919=>array(24,0,653,729),920=>array(50,-14,658,742),921=>array(24,0,242,729),922=>array(24,0,650,729),923=>array(-57,0,545,729),924=>array(24,0,752,729),925=>array(24,0,649,729),926=>array(24,0,557,729),927=>array(36,-14,672,742),928=>array(24,0,652,729),929=>array(24,0,541,729),931=>array(24,0,567,729),932=>array(39,0,608,729),933=>array(57,0,608,729),934=>array(44,0,664,729),935=>array(-39,0,633,729),936=>array(79,0,723,729),937=>array(-31,0,650,738),938=>array(24,0,360,913),939=>array(57,0,608,913),940=>array(49,-12,581,800),941=>array(35,-14,505,800),942=>array(51,-208,557,800),943=>array(60,0,388,800),944=>array(53,0,510,978),945=>array(49,-12,581,559),946=>array(-1,-208,515,766),947=>array(66,-208,572,547),948=>array(34,-14,501,742),949=>array(35,-14,455,561),950=>array(44,-210,532,760),951=>array(51,-208,521,560),952=>array(49,-11,501,768),953=>array(60,0,239,547),954=>array(36,0,526,547),955=>array(-40,0,439,760),956=>array(-12,-208,533,547),957=>array(80,0,474,547),958=>array(34,-210,507,760),959=>array(41,-14,510,560),960=>array(49,-19,554,547),961=>array(14,-208,540,560),962=>array(66,-210,501,560),963=>array(51,-14,593,547),964=>array(76,0,546,547),965=>array(53,0,479,547),966=>array(66,-208,560,551),967=>array(-40,-208,560,547),968=>array(60,-208,608,547),969=>array(61,-14,694,547),970=>array(66,0,352,758),971=>array(53,0,479,758),972=>array(41,-14,525,800),973=>array(53,0,485,800),974=>array(61,-14,694,800),975=>array(42,-208,668,729),976=>array(72,-11,481,768),977=>array(59,-11,501,768),978=>array(87,0,631,729),979=>array(50,0,779,800),980=>array(87,0,631,913),981=>array(48,-208,542,760),982=>array(61,-14,772,547),983=>array(25,-188,599,547),984=>array(67,-207,675,742),985=>array(66,-208,519,560),986=>array(79,-210,607,729),987=>array(68,-210,552,547),988=>array(24,0,528,729),989=>array(-166,-208,450,760),990=>array(58,-2,576,729),991=>array(78,0,519,759),992=>array(98,-208,702,742),993=>array(19,-180,457,559),994=>array(32,-213,796,729),995=>array(78,-208,711,547),996=>array(39,-208,658,742),997=>array(40,-208,558,560),998=>array(24,-213,647,729),999=>array(-19,-14,558,575),1000=>array(-31,-208,594,745),1001=>array(-10,-208,513,560),1002=>array(-14,0,707,742),1003=>array(-26,0,584,560),1004=>array(29,-14,644,758),1005=>array(41,-14,526,758),1006=>array(27,-208,563,729),1007=>array(48,-208,505,726),1008=>array(8,-3,581,547),1009=>array(76,-208,540,560),1010=>array(41,-14,483,560),1011=>array(-102,-208,250,760),1012=>array(36,-14,672,742),1013=>array(49,-14,479,560),1014=>array(39,-14,469,560),1015=>array(24,0,520,729),1016=>array(-3,-208,530,760),1017=>array(38,-14,625,742),1018=>array(24,0,752,729),1019=>array(-10,-208,595,547),1020=>array(-21,-208,540,560),1021=>array(56,-14,644,742),1022=>array(38,-14,625,742),1023=>array(56,-14,644,742),1024=>array(24,0,567,927),1025=>array(24,0,567,913),1026=>array(64,-200,634,729),1027=>array(24,0,561,927),1028=>array(41,-14,634,742),1029=>array(5,-14,543,742),1030=>array(24,0,242,729),1031=>array(24,0,347,913),1032=>array(-148,-200,240,729),1033=>array(-27,0,900,729),1034=>array(24,0,856,729),1035=>array(46,0,617,729),1036=>array(24,0,672,927),1037=>array(24,0,649,927),1038=>array(22,0,597,928),1039=>array(38,-157,666,729),1040=>array(-48,0,554,729),1041=>array(24,0,571,729),1042=>array(24,0,563,729),1043=>array(24,0,561,729),1044=>array(-33,-157,662,729),1045=>array(24,0,567,729),1046=>array(-46,0,1000,729),1047=>array(1,-14,536,742),1048=>array(24,0,649,729),1049=>array(24,0,649,928),1050=>array(24,0,672,729),1051=>array(-27,0,652,729),1052=>array(24,0,752,729),1053=>array(24,0,653,729),1054=>array(36,-14,672,742),1055=>array(24,0,652,729),1056=>array(24,0,541,729),1057=>array(38,-14,625,742),1058=>array(39,0,608,729),1059=>array(22,0,597,729),1060=>array(48,0,729,729),1061=>array(-39,0,633,729),1062=>array(38,-157,666,729),1063=>array(98,0,593,729),1064=>array(24,0,938,729),1065=>array(38,-157,952,729),1066=>array(75,0,665,729),1067=>array(24,0,770,729),1068=>array(24,0,533,729),1069=>array(-5,-14,578,742),1070=>array(29,-14,931,742),1071=>array(-4,0,601,729),1072=>array(37,-14,492,560),1073=>array(28,-14,526,777),1074=>array(34,0,481,547),1075=>array(34,0,477,547),1076=>array(-13,-138,571,547),1077=>array(41,-14,514,560),1078=>array(-18,0,803,547),1079=>array(13,-14,439,561),1080=>array(34,0,551,547),1081=>array(34,0,551,760),1082=>array(34,0,538,547),1083=>array(-15,0,549,547),1084=>array(34,0,646,547),1085=>array(34,0,555,547),1086=>array(41,-14,510,560),1087=>array(34,0,555,547),1088=>array(-3,-208,530,560),1089=>array(41,-14,483,560),1090=>array(62,0,546,547),1091=>array(-22,-208,543,547),1092=>array(42,-208,731,729),1093=>array(-23,0,541,547),1094=>array(46,-138,567,547),1095=>array(84,0,498,547),1096=>array(34,0,790,547),1097=>array(46,-138,802,547),1098=>array(62,0,567,547),1099=>array(34,0,674,547),1100=>array(34,0,461,547),1101=>array(5,-14,446,560),1102=>array(37,-14,716,560),1103=>array(3,0,513,547),1104=>array(41,-14,514,802),1105=>array(41,-14,514,758),1106=>array(49,-208,497,760),1107=>array(34,0,529,803),1108=>array(42,-14,483,560),1109=>array(10,-14,450,560),1110=>array(31,0,246,760),1111=>array(31,0,344,758),1112=>array(-102,-208,250,760),1113=>array(-15,0,743,547),1114=>array(34,0,739,547),1115=>array(31,0,478,760),1116=>array(34,0,538,803),1117=>array(34,0,551,802),1118=>array(-22,-208,543,760),1119=>array(46,-138,567,547),1120=>array(32,-14,795,729),1121=>array(61,-14,694,547),1122=>array(44,0,619,729),1123=>array(32,0,520,729),1124=>array(29,-14,854,742),1125=>array(37,-14,664,560),1126=>array(-57,0,721,729),1127=>array(-26,0,635,547),1128=>array(24,0,958,729),1129=>array(37,0,831,547),1130=>array(-14,0,706,729),1131=>array(-0,0,550,547),1132=>array(24,0,921,729),1133=>array(35,0,741,547),1134=>array(-26,-208,523,935),1135=>array(-21,-193,466,753),1136=>array(65,0,819,729),1137=>array(69,-208,814,765),1138=>array(36,-14,672,742),1139=>array(49,-14,501,560),1140=>array(70,0,756,742),1141=>array(67,0,623,560),1142=>array(70,0,756,930),1143=>array(67,0,623,800),1144=>array(55,-208,915,742),1145=>array(60,-208,852,560),1146=>array(42,-14,815,742),1147=>array(41,-14,637,560),1148=>array(32,-14,1009,932),1149=>array(55,-14,862,758),1150=>array(32,-14,795,900),1151=>array(61,-14,694,734),1152=>array(41,-208,633,742),1153=>array(41,-208,481,560),1154=>array(20,-44,436,457),1155=>array(-473,608,-77,810),1156=>array(-347,645,-7,788),1157=>array(-284,595,-161,797),1158=>array(-295,595,-153,797),1159=>array(-711,606,0,788),1160=>array(-914,-180,374,922),1161=>array(-843,-280,319,1022),1162=>array(24,-208,649,928),1163=>array(35,-208,552,760),1164=>array(24,0,533,729),1165=>array(35,0,462,702),1166=>array(24,0,543,729),1167=>array(-3,-208,522,560),1168=>array(11,0,574,878),1169=>array(21,0,490,700),1170=>array(23,0,620,729),1171=>array(19,0,536,547),1172=>array(24,-200,561,729),1173=>array(31,-208,475,547),1174=>array(-33,-157,1014,729),1175=>array(-5,-138,814,547),1176=>array(1,-193,536,742),1177=>array(13,-193,439,561),1178=>array(38,-157,686,729),1179=>array(46,-138,549,547),1180=>array(24,0,672,729),1181=>array(34,0,538,547),1182=>array(24,0,672,729),1183=>array(15,0,519,760),1184=>array(71,0,804,729),1185=>array(53,0,644,547),1186=>array(38,-157,666,729),1187=>array(49,-138,570,547),1188=>array(24,0,972,729),1189=>array(35,0,822,547),1190=>array(24,-200,928,729),1191=>array(35,-208,774,547),1192=>array(40,-14,734,743),1193=>array(40,-14,580,560),1194=>array(38,-193,625,742),1195=>array(41,-193,483,560),1196=>array(60,-157,630,729),1197=>array(47,-138,534,547),1198=>array(57,0,608,729),1199=>array(64,-208,543,547),1200=>array(62,0,615,729),1201=>array(56,-208,572,547),1202=>array(-23,-157,652,729),1203=>array(-10,-138,554,547),1204=>array(60,-157,808,729),1205=>array(47,-138,683,547),1206=>array(127,-157,606,729),1207=>array(105,-138,510,547),1208=>array(114,0,593,729),1209=>array(92,0,496,547),1210=>array(107,0,601,729),1211=>array(31,0,510,760),1212=>array(37,-14,804,742),1213=>array(27,-14,619,560),1214=>array(37,-184,804,742),1215=>array(27,-161,619,560),1216=>array(24,0,242,729),1217=>array(-46,0,1000,928),1218=>array(-18,0,803,785),1219=>array(24,-200,649,729),1220=>array(34,-208,556,547),1221=>array(-42,-208,653,729),1222=>array(-33,-208,546,547),1223=>array(24,-200,653,729),1224=>array(35,-208,556,547),1225=>array(24,-208,653,729),1226=>array(35,-208,556,547),1227=>array(127,-157,606,729),1228=>array(105,-138,510,547),1229=>array(24,-208,752,729),1230=>array(35,-208,640,547),1231=>array(31,0,246,760),1232=>array(-48,0,562,926),1233=>array(37,-14,506,761),1234=>array(-48,0,554,913),1235=>array(37,-14,492,758),1236=>array(-41,0,895,729),1237=>array(37,-14,856,560),1238=>array(24,0,567,928),1239=>array(41,-14,514,785),1240=>array(46,-14,675,742),1241=>array(45,-14,507,560),1242=>array(46,-14,675,913),1243=>array(45,-14,507,758),1244=>array(-46,0,1000,913),1245=>array(-18,0,803,758),1246=>array(1,-14,536,913),1247=>array(13,-14,439,758),1248=>array(21,-31,587,729),1249=>array(-22,-213,499,547),1250=>array(24,0,649,899),1251=>array(34,0,551,745),1252=>array(24,0,649,913),1253=>array(34,0,551,758),1254=>array(36,-14,672,913),1255=>array(41,-14,510,758),1256=>array(36,-14,672,742),1257=>array(49,-14,501,560),1258=>array(36,-14,672,913),1259=>array(49,-14,501,758),1260=>array(-5,-14,578,913),1261=>array(5,-14,446,758),1262=>array(22,0,597,899),1263=>array(-22,-208,543,745),1264=>array(22,0,597,913),1265=>array(-22,-208,543,758),1266=>array(22,0,631,927),1267=>array(-22,-208,543,800),1268=>array(98,0,593,913),1269=>array(84,0,498,758),1270=>array(38,-157,574,729),1271=>array(46,-138,489,547),1272=>array(24,0,770,913),1273=>array(34,0,674,758),1274=>array(42,-208,637,729),1275=>array(38,-208,554,547),1276=>array(-20,-200,656,729),1277=>array(-4,-208,560,547),1278=>array(-37,0,638,729),1279=>array(-22,0,542,547),1280=>array(31,0,593,729),1281=>array(24,0,491,547),1282=>array(32,-14,849,729),1283=>array(23,-14,742,547),1284=>array(133,-14,821,742),1285=>array(104,-14,722,561),1286=>array(133,-208,540,742),1287=>array(104,-208,471,561),1288=>array(-43,-14,908,729),1289=>array(-33,-14,795,547),1290=>array(26,-14,953,729),1291=>array(35,-14,805,547),1292=>array(41,-14,661,742),1293=>array(42,-14,511,560),1294=>array(46,-14,639,729),1295=>array(33,-14,574,547),1296=>array(109,-14,609,742),1297=>array(35,-14,455,561),1298=>array(-9,-200,669,729),1299=>array(4,-208,567,547),1300=>array(-9,0,1092,729),1301=>array(-15,0,905,547),1302=>array(24,0,826,729),1303=>array(-3,-208,788,560),1304=>array(-4,0,926,729),1305=>array(3,-14,851,560),1306=>array(37,-129,672,742),1307=>array(41,-206,538,560),1308=>array(86,0,918,729),1309=>array(76,0,737,547),1310=>array(24,0,672,729),1311=>array(34,0,538,547),1312=>array(-27,-200,928,729),1313=>array(-15,-208,767,547),1314=>array(24,-200,928,729),1315=>array(34,-208,773,547),1316=>array(38,-157,666,729),1317=>array(46,-138,567,547),1329=>array(62,-29,644,729),1330=>array(14,0,596,743),1331=>array(59,0,646,743),1332=>array(50,0,641,743),1333=>array(62,-14,616,729),1334=>array(28,0,640,744),1335=>array(18,0,585,729),1336=>array(14,0,596,743),1337=>array(14,-14,763,743),1338=>array(21,-14,688,729),1339=>array(18,0,573,729),1340=>array(18,0,431,729),1341=>array(18,-14,795,729),1342=>array(100,-13,744,742),1343=>array(88,0,612,729),1344=>array(6,-26,604,729),1345=>array(39,-23,635,744),1346=>array(54,0,607,743),1347=>array(-2,0,644,735),1348=>array(62,-14,754,729),1349=>array(38,-14,593,743),1350=>array(48,-14,601,729),1351=>array(54,-15,638,729),1352=>array(14,0,596,743),1353=>array(63,-28,614,744),1354=>array(50,0,658,743),1355=>array(22,0,634,744),1356=>array(14,0,680,743),1357=>array(52,-14,642,729),1358=>array(54,0,610,729),1359=>array(40,-14,581,741),1360=>array(14,0,596,743),1361=>array(44,-14,600,743),1362=>array(18,0,515,729),1363=>array(50,0,677,729),1364=>array(-30,0,633,743),1365=>array(36,-14,672,742),1366=>array(28,-13,651,729),1369=>array(124,492,268,760),1370=>array(101,499,271,729),1371=>array(64,620,308,803),1372=>array(45,618,413,893),1373=>array(96,617,274,800),1374=>array(47,613,423,866),1375=>array(83,618,470,760),1377=>array(57,-14,840,547),1378=>array(-5,-208,501,560),1379=>array(47,-208,547,560),1380=>array(31,-208,552,560),1381=>array(63,-14,539,760),1382=>array(41,-208,535,560),1383=>array(31,0,487,760),1384=>array(-5,-208,501,560),1385=>array(-5,-208,662,560),1386=>array(41,-14,628,760),1387=>array(-5,-208,501,760),1388=>array(-5,-208,208,547),1389=>array(-5,-208,846,760),1390=>array(41,-14,545,760),1391=>array(63,-208,534,760),1392=>array(31,0,510,760),1393=>array(27,-15,465,760),1394=>array(31,-208,515,560),1395=>array(47,-14,563,768),1396=>array(63,-14,665,760),1397=>array(-104,-208,209,547),1398=>array(52,-14,534,760),1399=>array(-72,-208,403,560),1400=>array(31,0,510,560),1401=>array(-66,-208,305,547),1402=>array(57,-208,840,547),1403=>array(-20,-208,457,561),1404=>array(31,0,530,560),1405=>array(51,-14,530,547),1406=>array(63,-208,571,760),1407=>array(63,-14,808,560),1408=>array(-5,-208,501,560),1409=>array(28,-208,536,560),1410=>array(31,0,368,547),1411=>array(63,-208,808,760),1412=>array(-61,-208,525,560),1413=>array(40,-14,509,560),1414=>array(29,-208,689,760),1415=>array(63,-14,694,760),1417=>array(41,0,207,415),1418=>array(21,212,271,314),1456=>array(238,-217,338,-22),1457=>array(79,-217,412,-22),1458=>array(116,-217,426,-22),1459=>array(116,-217,426,-22),1460=>array(248,-159,328,-85),1461=>array(193,-159,382,-85),1462=>array(204,-217,393,-22),1463=>array(149,-159,426,-85),1464=>array(156,-193,433,-46),1465=>array(-7,625,73,698),1466=>array(-7,625,73,698),1467=>array(139,-237,412,-17),1468=>array(252,237,332,310),1469=>array(238,-217,338,-22),1470=>array(37,472,288,552),1471=>array(149,625,426,698),1472=>array(27,-98,239,645),1473=>array(627,625,707,698),1474=>array(146,625,225,698),1475=>array(44,0,222,547),1478=>array(-3,0,347,547),1479=>array(160,-217,437,-22),1488=>array(82,0,616,547),1489=>array(39,0,494,547),1490=>array(39,-5,345,547),1491=>array(122,0,556,547),1492=>array(91,0,555,547),1493=>array(82,0,259,547),1494=>array(89,0,369,547),1495=>array(82,0,558,547),1496=>array(127,-14,593,552),1497=>array(95,204,237,547),1498=>array(122,-208,458,547),1499=>array(39,0,481,547),1500=>array(122,0,539,729),1501=>array(82,0,576,547),1502=>array(67,0,582,555),1503=>array(45,-208,259,547),1504=>array(39,0,340,547),1505=>array(130,-14,583,547),1506=>array(26,-93,578,547),1507=>array(147,-208,546,547),1508=>array(82,0,561,547),1509=>array(134,-208,543,548),1510=>array(39,0,546,547),1511=>array(56,-208,666,546),1512=>array(122,0,484,547),1513=>array(106,0,695,547),1514=>array(9,-4,571,547),1520=>array(82,0,438,547),1521=>array(95,0,438,547),1522=>array(95,204,416,547),1523=>array(65,361,309,547),1524=>array(65,361,515,547),3647=>array(22,-138,518,769),3713=>array(24,-10,569,560),3714=>array(35,-17,584,568),3716=>array(41,-10,558,568),3719=>array(23,-238,399,568),3720=>array(61,-0,521,575),3722=>array(54,-234,608,568),3725=>array(26,-8,606,573),3732=>array(30,0,530,568),3733=>array(22,-15,530,579),3734=>array(76,-240,594,560),3735=>array(18,-8,568,571),3737=>array(-25,-8,566,568),3738=>array(10,-8,549,571),3739=>array(-6,-8,568,760),3740=>array(12,-8,691,614),3741=>array(41,-14,676,760),3742=>array(22,-8,620,561),3743=>array(5,-8,640,760),3745=>array(-8,-14,622,547),3746=>array(10,-8,625,760),3747=>array(36,-8,602,568),3749=>array(4,-8,543,568),3751=>array(23,-8,527,569),3754=>array(-5,-8,656,679),3755=>array(43,-12,710,575),3757=>array(24,-8,527,568),3758=>array(36,-8,665,605),3759=>array(120,-166,691,579),3760=>array(25,53,557,587),3761=>array(-519,639,-38,880),3762=>array(66,0,440,560),3763=>array(-321,0,440,820),3764=>array(-535,615,-66,926),3765=>array(-534,612,-16,926),3766=>array(-535,615,-66,926),3767=>array(-534,612,-16,926),3768=>array(-327,-350,-144,-38),3769=>array(-382,-306,-116,-40),3771=>array(-523,639,-40,880),3772=>array(-557,-284,9,-39),3773=>array(-4,-240,629,715),3776=>array(31,-14,336,560),3777=>array(31,-14,582,560),3778=>array(44,-5,375,896),3779=>array(91,-14,492,892),3780=>array(145,-11,395,886),3782=>array(25,-232,564,557),3784=>array(-343,632,-237,807),3785=>array(-515,609,-21,891),3786=>array(-536,598,21,869),3787=>array(-422,624,-157,904),3788=>array(-567,630,-2,875),3789=>array(-382,635,-197,820),3792=>array(59,-14,513,547),3793=>array(66,-75,541,576),3794=>array(15,-66,502,711),3795=>array(-51,-9,690,830),3796=>array(17,-83,504,711),3797=>array(17,-83,504,711),3798=>array(-6,-8,729,812),3799=>array(44,-240,589,560),3800=>array(73,-210,611,557),3801=>array(15,-4,607,571),3804=>array(43,-12,901,575),3805=>array(43,-12,925,575),4256=>array(115,-15,828,828),4257=>array(145,-0,646,828),4258=>array(158,-148,586,837),4259=>array(104,-15,804,828),4260=>array(145,0,587,837),4261=>array(143,0,739,837),4262=>array(156,-15,668,828),4263=>array(119,-15,893,837),4264=>array(149,0,489,874),4265=>array(120,0,576,828),4266=>array(106,-15,744,828),4267=>array(92,-15,839,828),4268=>array(44,0,605,828),4269=>array(111,-167,792,837),4270=>array(154,-15,792,837),4271=>array(152,0,655,828),4272=>array(80,-15,865,828),4273=>array(97,-15,549,828),4274=>array(43,-0,605,837),4275=>array(111,-182,792,837),4276=>array(131,0,823,834),4277=>array(114,0,703,828),4278=>array(41,-15,606,837),4279=>array(140,0,646,828),4280=>array(80,-15,650,828),4281=>array(44,0,555,828),4282=>array(119,-15,782,837),4283=>array(95,-15,826,828),4284=>array(43,-0,618,828),4285=>array(84,-15,576,837),4286=>array(43,-0,655,828),4287=>array(60,0,771,828),4288=>array(121,-15,803,828),4289=>array(44,0,564,828),4290=>array(89,-15,611,837),4291=>array(114,0,624,828),4292=>array(143,0,631,828),4293=>array(54,-15,744,837),4304=>array(71,-15,439,592),4305=>array(81,-14,459,837),4306=>array(30,-235,474,551),4307=>array(45,-230,725,547),4308=>array(25,-236,458,547),4309=>array(24,-236,469,547),4310=>array(72,-14,442,836),4311=>array(79,-14,718,547),4312=>array(84,0,463,547),4313=>array(19,-236,459,542),4314=>array(90,-230,964,552),4315=>array(81,-15,527,837),4316=>array(87,-15,534,833),4317=>array(86,-0,706,547),4318=>array(72,-15,496,833),4319=>array(24,-236,505,551),4320=>array(85,0,714,833),4321=>array(90,-15,458,827),4322=>array(55,-236,565,680),4323=>array(27,-236,479,571),4324=>array(88,-236,740,547),4325=>array(24,-236,549,828),4326=>array(89,-230,712,546),4327=>array(24,-236,503,538),4328=>array(74,-15,530,837),4329=>array(44,0,472,837),4330=>array(55,-236,512,532),4331=>array(80,-14,558,828),4332=>array(88,-15,586,837),4333=>array(33,-236,513,827),4334=>array(93,-15,465,827),4335=>array(-14,-235,431,572),4336=>array(68,-15,508,837),4337=>array(83,-15,523,837),4338=>array(21,-141,452,547),4339=>array(24,-236,504,546),4340=>array(25,-236,518,837),4341=>array(61,-15,555,837),4342=>array(82,-236,738,547),4343=>array(23,-236,454,547),4344=>array(25,-236,450,538),4345=>array(76,-236,521,551),4346=>array(69,-77,465,547),4347=>array(33,-10,397,484),4348=>array(139,420,388,837),5121=>array(70,1,672,730),5122=>array(-57,0,545,1037),5123=>array(-57,0,545,729),5124=>array(-57,0,545,914),5125=>array(24,0,650,729),5126=>array(24,0,650,914),5127=>array(24,0,650,913),5129=>array(24,0,650,729),5130=>array(42,0,668,729),5131=>array(42,0,668,914),5132=>array(79,1,808,730),5133=>array(70,1,708,730),5134=>array(79,0,681,729),5135=>array(-57,0,708,729),5136=>array(79,0,681,914),5137=>array(-57,0,708,914),5138=>array(79,0,828,729),5139=>array(24,0,827,729),5140=>array(79,0,828,914),5141=>array(24,0,827,914),5142=>array(24,0,671,914),5143=>array(79,0,846,729),5144=>array(42,0,827,729),5145=>array(79,0,846,914),5146=>array(42,0,827,914),5147=>array(42,0,668,914),5149=>array(80,629,187,729),5150=>array(24,326,404,734),5151=>array(18,356,349,714),5152=>array(64,356,303,714),5153=>array(60,398,325,674),5154=>array(36,391,302,667),5155=>array(37,398,305,667),5156=>array(60,398,301,667),5157=>array(0,327,396,733),5158=>array(24,326,333,734),5159=>array(79,312,187,412),5160=>array(55,503,307,563),5161=>array(55,399,307,667),5162=>array(75,399,327,691),5163=>array(70,1,902,730),5164=>array(-57,0,739,729),5165=>array(24,0,779,729),5166=>array(42,0,927,729),5167=>array(70,0,668,729),5168=>array(-57,0,545,1037),5169=>array(-57,0,545,729),5170=>array(-57,0,545,914),5171=>array(-12,0,614,729),5172=>array(-12,0,614,914),5173=>array(-12,0,614,913),5175=>array(-12,0,614,729),5176=>array(42,0,668,729),5177=>array(42,0,668,914),5178=>array(79,0,804,729),5179=>array(70,0,708,729),5180=>array(79,0,681,729),5181=>array(-57,0,708,729),5182=>array(79,0,681,914),5183=>array(-57,0,708,914),5184=>array(79,0,792,729),5185=>array(-12,0,827,729),5186=>array(79,0,792,914),5187=>array(-12,0,827,914),5188=>array(79,0,846,729),5189=>array(42,0,827,729),5190=>array(79,0,846,914),5191=>array(42,0,827,914),5192=>array(42,0,668,913),5193=>array(55,326,444,734),5194=>array(24,326,159,734),5196=>array(63,-14,646,729),5197=>array(13,0,595,1037),5198=>array(13,0,595,743),5199=>array(13,0,595,914),5200=>array(-12,0,604,729),5201=>array(-12,0,604,914),5202=>array(-12,0,604,913),5204=>array(-12,0,604,729),5205=>array(53,0,668,729),5206=>array(53,0,668,914),5207=>array(79,-14,816,729),5208=>array(63,-14,756,729),5209=>array(79,0,765,743),5210=>array(13,0,756,743),5211=>array(79,0,765,914),5212=>array(13,0,756,914),5213=>array(79,0,782,729),5214=>array(-12,0,767,729),5215=>array(79,0,782,914),5216=>array(-12,0,767,914),5217=>array(79,0,864,729),5218=>array(53,0,767,729),5219=>array(79,0,864,914),5220=>array(53,0,767,914),5221=>array(51,0,864,729),5222=>array(60,326,377,734),5223=>array(63,-14,776,734),5224=>array(13,0,776,743),5225=>array(-12,0,766,734),5226=>array(53,0,788,734),5227=>array(55,0,501,743),5228=>array(23,0,560,1037),5229=>array(23,0,560,743),5230=>array(23,0,560,914),5231=>array(6,-14,542,729),5232=>array(6,-14,591,914),5233=>array(6,-14,676,913),5234=>array(64,-14,510,729),5235=>array(64,-14,510,914),5236=>array(79,0,710,743),5237=>array(55,0,650,743),5238=>array(79,0,728,743),5239=>array(23,0,691,743),5240=>array(79,0,728,914),5241=>array(23,0,691,914),5242=>array(79,-14,751,729),5243=>array(6,-14,650,729),5244=>array(79,-14,799,914),5245=>array(6,-14,650,914),5246=>array(79,-14,678,729),5247=>array(64,-14,691,729),5248=>array(79,-14,678,914),5249=>array(64,-14,691,914),5250=>array(51,-14,678,729),5251=>array(46,318,328,734),5252=>array(8,318,342,734),5253=>array(55,0,662,743),5254=>array(23,0,684,743),5255=>array(6,-14,662,734),5256=>array(64,-14,684,734),5257=>array(55,0,501,743),5258=>array(23,0,560,1037),5259=>array(23,0,560,743),5260=>array(23,0,560,914),5261=>array(6,-14,542,729),5262=>array(6,-14,591,914),5263=>array(6,-14,676,913),5264=>array(64,-14,510,729),5265=>array(64,-14,510,914),5266=>array(79,0,710,743),5267=>array(55,0,650,743),5268=>array(79,0,728,743),5269=>array(23,0,691,743),5270=>array(79,0,728,914),5271=>array(23,0,691,914),5272=>array(79,-14,751,729),5273=>array(6,-14,650,729),5274=>array(79,-14,799,914),5275=>array(6,-14,650,914),5276=>array(79,-14,678,729),5277=>array(64,-14,691,729),5278=>array(79,-14,678,914),5279=>array(64,-14,691,914),5280=>array(51,-14,678,729),5281=>array(46,318,328,734),5282=>array(43,318,378,734),5283=>array(101,0,524,729),5284=>array(24,0,561,1037),5285=>array(24,0,561,729),5286=>array(24,0,561,914),5287=>array(-12,0,524,729),5288=>array(-12,0,577,914),5289=>array(-12,0,662,913),5290=>array(24,0,448,729),5291=>array(24,0,448,914),5292=>array(79,0,650,729),5293=>array(101,0,648,729),5294=>array(79,0,730,729),5295=>array(24,0,644,729),5296=>array(79,0,730,914),5297=>array(24,0,644,914),5298=>array(79,0,650,729),5299=>array(-12,0,648,729),5300=>array(79,0,702,914),5301=>array(-12,0,648,914),5302=>array(79,0,618,729),5303=>array(24,0,644,729),5304=>array(79,0,618,914),5305=>array(24,0,644,914),5306=>array(51,0,618,729),5307=>array(24,326,271,734),5308=>array(55,326,444,734),5309=>array(24,326,333,734),5312=>array(77,-14,743,436),5313=>array(26,-14,754,755),5314=>array(26,-14,754,436),5315=>array(0,-14,728,636),5316=>array(13,0,740,450),5317=>array(13,0,740,636),5318=>array(13,0,740,635),5319=>array(24,0,689,450),5320=>array(24,0,689,636),5321=>array(79,-14,938,436),5322=>array(77,-14,888,436),5323=>array(79,0,898,450),5324=>array(24,0,690,450),5325=>array(79,0,898,636),5326=>array(24,0,690,636),5327=>array(24,0,689,635),5328=>array(59,484,478,736),5329=>array(43,318,395,734),5330=>array(38,484,493,736),5331=>array(77,0,743,450),5332=>array(26,0,754,755),5333=>array(26,0,754,450),5334=>array(26,0,754,636),5335=>array(13,0,740,450),5336=>array(13,0,740,636),5337=>array(13,0,740,635),5338=>array(24,0,689,450),5339=>array(24,0,689,636),5340=>array(79,0,938,450),5341=>array(77,0,888,450),5342=>array(79,0,962,450),5343=>array(26,0,883,450),5344=>array(79,0,962,636),5345=>array(26,0,883,636),5346=>array(79,0,937,450),5347=>array(13,0,888,450),5348=>array(79,0,937,636),5349=>array(13,0,888,636),5350=>array(79,0,898,450),5351=>array(24,0,883,450),5352=>array(79,0,898,636),5353=>array(24,0,883,636),5354=>array(60,484,478,736),5356=>array(15,0,668,729),5357=>array(85,0,457,729),5358=>array(24,0,696,1037),5359=>array(24,0,576,729),5360=>array(24,0,625,914),5361=>array(-33,0,519,729),5362=>array(-33,0,570,914),5363=>array(-33,0,655,913),5364=>array(86,0,458,729),5365=>array(86,0,458,914),5366=>array(79,0,665,729),5367=>array(85,0,635,729),5368=>array(79,0,746,729),5369=>array(24,0,650,729),5370=>array(79,0,795,914),5371=>array(24,0,650,914),5372=>array(79,0,727,729),5373=>array(-33,0,635,729),5374=>array(79,0,778,914),5375=>array(-33,0,635,914),5376=>array(79,0,628,729),5377=>array(86,0,650,729),5378=>array(79,0,628,914),5379=>array(86,0,650,914),5380=>array(51,0,628,729),5381=>array(58,326,299,734),5382=>array(29,318,339,741),5383=>array(24,326,363,734),5392=>array(56,-14,584,743),5393=>array(-5,-14,646,743),5394=>array(-5,-14,646,914),5395=>array(29,-14,774,464),5396=>array(29,-14,774,636),5397=>array(24,-14,779,464),5398=>array(24,-14,779,636),5399=>array(79,-14,763,743),5400=>array(56,-14,742,743),5401=>array(79,-14,824,743),5402=>array(-5,-14,742,743),5403=>array(79,-14,824,914),5404=>array(-5,-14,742,914),5405=>array(79,-14,998,464),5406=>array(29,-14,946,464),5407=>array(79,-14,998,636),5408=>array(29,-14,946,636),5409=>array(79,-14,1002,464),5410=>array(24,-14,946,464),5411=>array(79,-14,1002,636),5412=>array(24,-14,946,636),5413=>array(57,476,531,737),5414=>array(40,0,479,729),5415=>array(24,0,514,1037),5416=>array(24,0,514,729),5417=>array(24,0,514,914),5418=>array(50,0,540,729),5419=>array(50,0,594,914),5420=>array(50,0,679,913),5421=>array(86,0,524,729),5422=>array(86,0,524,914),5423=>array(79,0,674,729),5424=>array(40,0,659,729),5425=>array(79,0,685,729),5426=>array(24,0,693,729),5427=>array(79,0,685,914),5428=>array(24,0,693,914),5429=>array(79,0,735,729),5430=>array(50,0,659,729),5431=>array(79,0,790,914),5432=>array(50,0,659,914),5433=>array(79,0,694,729),5434=>array(86,0,693,729),5435=>array(79,0,694,914),5436=>array(86,0,693,914),5437=>array(51,0,694,729),5438=>array(58,326,334,734),5440=>array(55,399,307,667),5441=>array(24,326,414,734),5442=>array(89,-14,812,436),5443=>array(77,-14,775,436),5444=>array(-35,0,687,450),5445=>array(48,0,747,755),5446=>array(48,0,747,450),5447=>array(48,0,747,636),5448=>array(24,0,538,729),5449=>array(24,0,538,914),5450=>array(24,0,487,729),5451=>array(56,0,519,729),5452=>array(56,0,519,914),5453=>array(5,0,519,729),5454=>array(79,0,727,914),5455=>array(56,0,635,914),5456=>array(75,326,363,734),5458=>array(-12,0,642,729),5459=>array(103,0,671,744),5460=>array(21,-15,546,1037),5461=>array(21,-15,546,729),5462=>array(21,-15,546,914),5463=>array(-8,0,617,662),5464=>array(-8,0,617,914),5465=>array(48,0,658,662),5466=>array(48,0,658,914),5467=>array(79,0,836,914),5468=>array(48,0,827,914),5469=>array(58,326,435,685),5470=>array(54,-14,645,743),5471=>array(54,-14,626,743),5472=>array(33,-14,605,743),5473=>array(14,-14,605,743),5474=>array(33,-14,605,914),5475=>array(14,-14,605,914),5476=>array(-12,0,614,729),5477=>array(-12,0,614,914),5478=>array(43,0,664,729),5479=>array(43,0,664,914),5480=>array(79,0,860,914),5481=>array(43,0,767,914),5482=>array(55,326,444,734),5492=>array(49,0,683,743),5493=>array(40,0,747,743),5494=>array(40,0,747,914),5495=>array(0,-14,708,729),5496=>array(0,-14,708,914),5497=>array(65,-14,699,729),5498=>array(65,-14,699,914),5499=>array(68,318,447,734),5500=>array(24,0,653,729),5501=>array(24,326,414,734),5502=>array(75,0,936,1037),5503=>array(75,0,936,743),5504=>array(75,0,936,914),5505=>array(75,-14,919,734),5506=>array(75,-14,967,914),5507=>array(75,-14,887,734),5508=>array(75,-14,887,914),5509=>array(75,318,705,734),5514=>array(55,0,683,743),5515=>array(40,0,748,743),5516=>array(0,-14,708,729),5517=>array(65,-14,692,729),5518=>array(74,0,1127,1037),5519=>array(74,0,1127,743),5520=>array(74,0,1127,914),5521=>array(74,-14,879,736),5522=>array(74,-14,927,914),5523=>array(74,-14,1078,736),5524=>array(74,-14,1078,914),5525=>array(74,332,582,736),5526=>array(74,332,918,736),5536=>array(11,0,740,692),5537=>array(11,0,740,692),5538=>array(-21,-242,708,450),5539=>array(-21,-242,708,636),5540=>array(50,-242,711,450),5541=>array(50,-242,711,636),5542=>array(73,338,491,736),5543=>array(40,0,534,729),5544=>array(-30,0,529,729),5545=>array(-30,0,529,914),5546=>array(50,0,609,729),5547=>array(50,0,609,914),5548=>array(45,0,539,729),5549=>array(45,0,539,914),5550=>array(21,326,335,734),5551=>array(26,-14,517,729),5598=>array(24,0,640,729),5601=>array(88,0,704,729),5702=>array(24,326,401,734),5703=>array(24,240,401,820),5742=>array(24,0,374,306),5743=>array(75,0,878,743),5744=>array(74,0,1115,743),5745=>array(74,0,1463,743),5746=>array(74,0,1463,914),5747=>array(74,-14,1214,736),5748=>array(74,-14,1263,914),5749=>array(74,-14,1414,736),5750=>array(74,-14,1414,914),7424=>array(-21,0,458,547),7425=>array(-43,0,645,547),7426=>array(50,-14,856,560),7427=>array(0,0,479,547),7428=>array(41,-14,483,560),7429=>array(34,0,496,547),7430=>array(11,0,496,547),7431=>array(34,0,441,547),7432=>array(27,-14,444,561),7433=>array(18,-213,232,547),7434=>array(-42,-14,329,547),7435=>array(34,0,556,547),7436=>array(-8,0,414,560),7437=>array(34,0,646,547),7438=>array(34,0,551,547),7439=>array(41,-14,510,560),7440=>array(2,-14,444,560),7441=>array(49,22,567,524),7442=>array(33,57,557,489),7443=>array(51,2,568,543),7444=>array(45,-14,874,560),7446=>array(24,273,477,560),7447=>array(75,-14,527,273),7448=>array(18,0,447,547),7449=>array(-26,0,505,547),7450=>array(70,0,505,547),7451=>array(62,0,546,547),7452=>array(70,-16,508,547),7453=>array(36,37,609,495),7454=>array(50,38,799,496),7455=>array(-49,-238,583,560),7456=>array(64,0,544,547),7457=>array(76,0,737,547),7458=>array(-3,0,489,547),7459=>array(16,-14,439,547),7462=>array(30,0,497,560),7463=>array(-21,0,458,547),7464=>array(18,0,489,547),7465=>array(18,0,447,547),7466=>array(62,0,540,547),7467=>array(-15,0,549,547),7468=>array(-31,326,348,734),7469=>array(-34,326,546,734),7470=>array(20,326,350,734),7472=>array(20,326,403,734),7473=>array(20,326,353,734),7474=>array(0,326,338,734),7475=>array(31,318,413,742),7476=>array(20,326,407,734),7477=>array(20,326,147,734),7478=>array(-75,214,158,734),7479=>array(20,326,405,734),7480=>array(20,326,286,734),7481=>array(20,326,470,734),7482=>array(20,326,404,734),7483=>array(20,326,404,734),7484=>array(31,318,415,742),7485=>array(16,318,372,742),7486=>array(20,326,337,734),7487=>array(20,326,342,734),7488=>array(26,326,384,734),7489=>array(41,318,402,734),7490=>array(54,326,578,734),7491=>array(22,318,300,640),7492=>array(30,318,307,640),7493=>array(31,318,335,640),7494=>array(31,318,538,640),7495=>array(15,318,319,751),7496=>array(21,318,347,751),7497=>array(31,318,321,640),7498=>array(29,318,319,640),7499=>array(26,318,284,640),7500=>array(21,318,278,640),7501=>array(34,209,345,640),7502=>array(16,207,142,632),7503=>array(14,326,336,751),7504=>array(24,326,509,640),7505=>array(34,209,327,640),7506=>array(31,318,316,640),7507=>array(6,318,277,640),7508=>array(17,479,302,640),7509=>array(45,318,330,479),7510=>array(13,209,338,640),7511=>array(27,326,229,719),7512=>array(43,318,335,632),7513=>array(26,347,381,604),7514=>array(46,319,532,633),7515=>array(43,326,346,632),7517=>array(5,209,321,755),7518=>array(38,209,356,632),7519=>array(22,318,312,742),7520=>array(41,209,352,635),7521=>array(-21,209,348,633),7522=>array(16,0,142,425),7523=>array(24,0,260,313),7524=>array(43,-8,335,306),7525=>array(43,0,346,306),7526=>array(5,-117,321,429),7527=>array(38,-117,356,306),7528=>array(5,-117,334,313),7529=>array(41,-117,352,309),7530=>array(-21,-117,348,307),7543=>array(17,-208,525,560),7544=>array(20,326,407,734),7547=>array(3,0,331,547),7549=>array(-3,-208,587,560),7557=>array(27,-208,299,760),7579=>array(4,318,309,640),7580=>array(31,318,301,640),7581=>array(34,287,304,640),7582=>array(20,318,317,751),7583=>array(11,318,274,640),7584=>array(22,326,248,751),7585=>array(-47,209,144,632),7586=>array(34,209,346,632),7587=>array(53,209,345,632),7588=>array(17,326,171,751),7589=>array(46,326,149,632),7590=>array(5,326,206,632),7591=>array(5,326,206,632),7592=>array(-112,209,152,751),7593=>array(25,209,152,751),7594=>array(-8,209,152,751),7595=>array(22,326,264,640),7596=>array(34,209,520,640),7597=>array(56,209,541,633),7598=>array(-48,209,329,640),7599=>array(34,209,345,640),7600=>array(22,326,338,640),7601=>array(31,318,316,640),7602=>array(31,210,316,751),7603=>array(13,209,286,640),7604=>array(-58,209,249,751),7605=>array(38,209,238,719),7606=>array(37,318,404,632),7607=>array(32,318,348,632),7608=>array(45,317,317,632),7609=>array(46,326,308,632),7610=>array(-10,326,292,632),7611=>array(-3,326,300,632),7612=>array(7,209,311,632),7613=>array(0,296,303,632),7614=>array(-10,207,310,632),7615=>array(31,320,316,756),7620=>array(-407,616,-54,800),7621=>array(-425,616,-25,800),7622=>array(-425,616,-25,800),7623=>array(-396,616,-43,800),7624=>array(-281,616,79,800),7625=>array(-313,616,111,800),7680=>array(-48,-241,554,729),7681=>array(37,-241,492,560),7682=>array(24,0,563,913),7683=>array(32,-14,528,915),7684=>array(24,-184,563,729),7685=>array(32,-184,528,760),7686=>array(24,-157,563,729),7687=>array(32,-157,528,760),7688=>array(38,-193,625,928),7689=>array(41,-193,483,800),7690=>array(24,0,650,914),7691=>array(41,-14,606,942),7692=>array(24,-184,650,729),7693=>array(41,-184,576,760),7694=>array(24,-156,650,729),7695=>array(41,-157,576,760),7696=>array(24,-193,650,729),7697=>array(40,-193,576,760),7698=>array(24,-240,650,729),7699=>array(30,-240,576,760),7700=>array(24,0,567,1044),7701=>array(41,-14,514,887),7702=>array(24,0,567,1044),7703=>array(41,-14,547,887),7704=>array(24,-213,567,729),7705=>array(41,-213,514,560),7706=>array(24,-193,567,729),7707=>array(41,-193,514,560),7708=>array(24,-193,567,928),7709=>array(41,-193,528,780),7710=>array(24,0,528,914),7711=>array(61,0,431,942),7712=>array(40,-14,653,899),7713=>array(29,-208,537,745),7714=>array(24,0,653,914),7715=>array(31,0,510,942),7716=>array(24,-184,653,729),7717=>array(31,-184,510,760),7718=>array(24,0,653,913),7719=>array(31,0,528,913),7720=>array(-71,-193,653,729),7721=>array(-70,-193,510,760),7722=>array(24,-222,653,729),7723=>array(31,-222,510,760),7724=>array(-100,-193,242,729),7725=>array(-115,-193,246,760),7726=>array(24,0,403,1044),7727=>array(31,0,394,883),7728=>array(24,0,650,928),7729=>array(31,0,551,928),7730=>array(24,-184,650,729),7731=>array(31,-184,551,760),7732=>array(24,-157,650,729),7733=>array(31,-157,551,760),7734=>array(24,-184,448,729),7735=>array(-2,-184,246,760),7736=>array(24,-184,448,927),7737=>array(-2,-184,370,899),7738=>array(24,-157,448,729),7739=>array(-83,-157,246,760),7740=>array(24,-240,448,729),7741=>array(-110,-240,246,760),7742=>array(24,0,752,928),7743=>array(31,0,815,800),7744=>array(24,0,752,914),7745=>array(31,0,815,760),7746=>array(24,-184,752,729),7747=>array(31,-184,815,560),7748=>array(24,0,649,913),7749=>array(31,0,510,760),7750=>array(24,-184,649,729),7751=>array(31,-184,510,560),7752=>array(24,-157,649,729),7753=>array(31,-157,510,560),7754=>array(24,-240,649,729),7755=>array(31,-240,510,560),7756=>array(36,-14,672,1044),7757=>array(41,-14,566,883),7758=>array(36,-14,672,1043),7759=>array(41,-14,524,885),7760=>array(36,-14,672,1044),7761=>array(41,-14,510,887),7762=>array(36,-14,672,1045),7763=>array(41,-14,540,886),7764=>array(24,0,541,928),7765=>array(-3,-208,530,800),7766=>array(24,0,541,914),7767=>array(-3,-208,530,760),7768=>array(24,0,541,914),7769=>array(31,0,417,760),7770=>array(24,-184,541,729),7771=>array(-2,-184,417,560),7772=>array(24,-184,541,899),7773=>array(-2,-184,454,745),7774=>array(24,-157,541,729),7775=>array(-83,-157,417,560),7776=>array(5,-14,543,914),7777=>array(10,-14,450,760),7778=>array(5,-184,543,742),7779=>array(10,-184,450,560),7780=>array(5,-14,583,928),7781=>array(10,-14,578,800),7782=>array(5,-14,593,1042),7783=>array(10,-14,514,858),7784=>array(5,-184,543,914),7785=>array(10,-184,450,760),7786=>array(39,0,608,914),7787=>array(57,0,381,942),7788=>array(39,-184,608,729),7789=>array(57,-184,381,702),7790=>array(39,-157,608,729),7791=>array(17,-156,381,702),7792=>array(21,-241,608,729),7793=>array(-9,-240,381,702),7794=>array(52,-183,642,729),7795=>array(51,-183,530,547),7796=>array(52,-193,642,729),7797=>array(25,-193,530,547),7798=>array(52,-213,642,729),7799=>array(51,-213,530,547),7800=>array(52,-14,642,1044),7801=>array(51,-14,558,883),7802=>array(52,-14,642,1025),7803=>array(51,-14,530,867),7804=>array(70,0,668,936),7805=>array(64,0,544,777),7806=>array(70,-182,668,729),7807=>array(64,-184,544,547),7808=>array(86,0,918,931),7809=>array(76,0,737,802),7810=>array(86,0,918,931),7811=>array(76,0,737,803),7812=>array(86,0,918,913),7813=>array(76,0,737,758),7814=>array(86,0,918,913),7815=>array(76,0,737,760),7816=>array(86,-184,918,729),7817=>array(76,-184,737,547),7818=>array(-39,0,633,914),7819=>array(-23,0,541,760),7820=>array(-39,0,633,913),7821=>array(-23,0,541,758),7822=>array(57,0,608,914),7823=>array(-22,-208,543,760),7824=>array(-20,0,633,928),7825=>array(-3,0,489,800),7826=>array(-20,-184,633,729),7827=>array(-3,-184,489,547),7828=>array(-20,-157,633,729),7829=>array(-3,-157,489,547),7830=>array(31,-157,510,760),7831=>array(57,0,381,913),7832=>array(76,0,737,878),7833=>array(-22,-208,543,878),7834=>array(37,-14,700,760),7835=>array(61,0,431,942),7836=>array(-20,0,400,760),7837=>array(25,0,400,760),7838=>array(14,-14,614,743),7839=>array(34,-14,501,742),7840=>array(-48,-184,554,729),7841=>array(37,-184,492,560),7842=>array(-48,0,554,992),7843=>array(37,-14,500,810),7844=>array(-48,0,693,1028),7845=>array(37,-14,641,847),7846=>array(-48,0,554,1028),7847=>array(37,-14,492,847),7848=>array(-48,0,696,1044),7849=>array(37,-14,641,863),7850=>array(-48,0,577,1043),7851=>array(37,-14,521,862),7852=>array(-48,-184,554,928),7853=>array(37,-184,492,800),7854=>array(-48,0,584,1044),7855=>array(37,-14,535,868),7856=>array(-48,0,554,1044),7857=>array(37,-14,502,868),7858=>array(-48,0,554,1068),7859=>array(37,-14,497,895),7860=>array(-48,0,586,1043),7861=>array(37,-14,537,870),7862=>array(-48,-184,562,926),7863=>array(37,-184,506,761),7864=>array(24,-184,567,729),7865=>array(41,-184,514,560),7866=>array(24,0,567,992),7867=>array(41,-14,524,810),7868=>array(24,0,567,921),7869=>array(41,-14,514,777),7870=>array(24,0,684,1028),7871=>array(41,-14,667,847),7872=>array(24,0,567,1028),7873=>array(41,-14,514,847),7874=>array(24,0,688,1044),7875=>array(41,-14,671,863),7876=>array(24,0,568,1043),7877=>array(41,-14,552,862),7878=>array(24,-184,567,928),7879=>array(41,-184,514,800),7880=>array(24,0,331,992),7881=>array(31,0,303,810),7882=>array(-5,-184,242,729),7883=>array(-2,-184,246,760),7884=>array(36,-184,672,742),7885=>array(41,-184,510,560),7886=>array(36,-14,672,992),7887=>array(41,-14,518,810),7888=>array(36,-14,739,1028),7889=>array(41,-14,663,847),7890=>array(36,-14,672,1028),7891=>array(41,-14,510,847),7892=>array(36,-14,742,1044),7893=>array(41,-14,663,863),7894=>array(36,-14,672,1043),7895=>array(41,-14,543,862),7896=>array(36,-184,672,928),7897=>array(41,-184,510,800),7898=>array(31,-14,741,927),7899=>array(43,-14,591,800),7900=>array(31,-14,741,927),7901=>array(43,-14,591,800),7902=>array(31,-14,741,991),7903=>array(43,-14,591,810),7904=>array(31,-14,741,921),7905=>array(43,-14,591,777),7906=>array(31,-184,741,761),7907=>array(43,-184,591,609),7908=>array(52,-184,642,729),7909=>array(51,-184,530,547),7910=>array(52,-14,642,992),7911=>array(51,-14,530,810),7912=>array(50,-4,769,927),7913=>array(52,-14,648,800),7914=>array(50,-4,769,927),7915=>array(52,-14,648,800),7916=>array(50,-4,769,992),7917=>array(52,-14,648,810),7918=>array(50,-4,769,921),7919=>array(52,-14,648,777),7920=>array(50,-184,769,761),7921=>array(52,-184,648,615),7922=>array(57,0,608,931),7923=>array(-22,-208,543,802),7924=>array(57,-184,608,729),7925=>array(-22,-208,543,547),7926=>array(57,0,608,996),7927=>array(-22,-208,543,813),7928=>array(57,0,608,921),7929=>array(-22,-208,543,777),7930=>array(24,0,638,729),7931=>array(18,0,470,760),7936=>array(49,-12,581,797),7937=>array(49,-12,581,797),7938=>array(49,-12,581,800),7939=>array(49,-12,581,800),7940=>array(49,-12,581,800),7941=>array(49,-12,582,800),7942=>array(49,-12,581,928),7943=>array(49,-12,581,928),7944=>array(-48,0,554,797),7945=>array(-48,0,554,797),7946=>array(46,0,728,800),7947=>array(71,0,728,800),7948=>array(28,0,630,800),7949=>array(57,0,659,800),7950=>array(-26,0,576,928),7951=>array(4,0,606,928),7952=>array(35,-14,455,797),7953=>array(35,-14,455,797),7954=>array(35,-14,480,800),7955=>array(35,-14,479,800),7956=>array(35,-14,534,800),7957=>array(35,-14,548,800),7960=>array(47,0,638,797),7961=>array(71,0,638,797),7962=>array(46,0,868,800),7963=>array(71,0,875,800),7964=>array(47,0,807,800),7965=>array(70,0,833,800),7968=>array(51,-208,521,797),7969=>array(51,-208,521,797),7970=>array(51,-208,522,800),7971=>array(51,-208,521,800),7972=>array(51,-208,557,800),7973=>array(51,-208,588,800),7974=>array(51,-208,560,928),7975=>array(51,-208,550,928),7976=>array(47,0,729,797),7977=>array(71,0,728,797),7978=>array(46,0,954,800),7979=>array(71,0,956,800),7980=>array(47,0,900,800),7981=>array(70,0,922,800),7982=>array(100,0,816,928),7983=>array(98,0,828,928),7984=>array(60,0,254,797),7985=>array(60,0,251,797),7986=>array(9,0,371,800),7987=>array(38,0,377,800),7988=>array(46,0,422,800),7989=>array(48,0,426,800),7990=>array(60,0,388,928),7991=>array(60,0,386,928),7992=>array(47,0,318,797),7993=>array(71,0,313,797),7994=>array(46,0,547,800),7995=>array(71,0,547,800),7996=>array(47,0,489,800),7997=>array(70,0,516,800),7998=>array(100,0,417,928),7999=>array(98,0,420,928),8000=>array(41,-14,510,797),8001=>array(41,-14,510,797),8002=>array(41,-14,510,800),8003=>array(41,-14,510,800),8004=>array(41,-14,559,800),8005=>array(41,-14,576,800),8008=>array(47,-14,688,797),8009=>array(71,-14,728,797),8010=>array(46,-14,949,800),8011=>array(71,-14,954,800),8012=>array(47,-14,809,800),8013=>array(70,-14,837,800),8016=>array(53,0,479,797),8017=>array(53,0,479,797),8018=>array(53,0,483,800),8019=>array(53,0,479,800),8020=>array(53,0,541,800),8021=>array(53,0,550,800),8022=>array(53,0,516,928),8023=>array(53,0,501,928),8025=>array(71,0,764,797),8027=>array(71,0,957,800),8029=>array(70,0,970,800),8031=>array(98,0,867,928),8032=>array(61,-14,694,797),8033=>array(61,-14,694,797),8034=>array(61,-14,694,800),8035=>array(61,-14,694,800),8036=>array(61,-14,694,800),8037=>array(61,-14,694,800),8038=>array(61,-14,694,928),8039=>array(61,-14,694,928),8040=>array(4,0,685,797),8041=>array(41,0,722,797),8042=>array(46,0,943,800),8043=>array(71,0,949,800),8044=>array(47,0,814,800),8045=>array(70,0,838,800),8046=>array(100,0,792,928),8047=>array(98,0,820,928),8048=>array(49,-12,581,800),8049=>array(49,-12,581,800),8050=>array(35,-14,455,800),8051=>array(35,-14,505,800),8052=>array(51,-208,521,800),8053=>array(51,-208,557,800),8054=>array(45,0,239,800),8055=>array(60,0,388,800),8056=>array(41,-14,510,800),8057=>array(41,-14,525,800),8058=>array(53,0,479,800),8059=>array(53,0,485,800),8060=>array(61,-14,694,800),8061=>array(61,-14,694,800),8064=>array(49,-208,581,797),8065=>array(49,-208,581,797),8066=>array(49,-208,581,800),8067=>array(49,-208,581,800),8068=>array(49,-208,581,800),8069=>array(49,-208,582,800),8070=>array(49,-208,581,928),8071=>array(49,-208,581,928),8072=>array(-48,-208,554,797),8073=>array(-48,-208,554,797),8074=>array(46,-208,728,800),8075=>array(71,-208,728,800),8076=>array(28,-208,630,800),8077=>array(57,-208,659,800),8078=>array(-26,-208,576,928),8079=>array(4,-208,606,928),8080=>array(35,-208,521,797),8081=>array(35,-208,521,797),8082=>array(35,-208,522,800),8083=>array(35,-208,521,800),8084=>array(35,-208,557,800),8085=>array(35,-208,588,800),8086=>array(35,-208,560,928),8087=>array(35,-208,550,928),8088=>array(47,-208,729,797),8089=>array(71,-208,728,797),8090=>array(46,-208,954,800),8091=>array(71,-208,956,800),8092=>array(47,-208,900,800),8093=>array(70,-208,922,800),8094=>array(100,-208,816,928),8095=>array(98,-208,828,928),8096=>array(61,-208,694,797),8097=>array(61,-208,694,797),8098=>array(61,-208,694,800),8099=>array(61,-208,694,800),8100=>array(61,-208,694,800),8101=>array(61,-208,694,800),8102=>array(61,-208,694,928),8103=>array(61,-208,694,928),8104=>array(4,-208,685,797),8105=>array(41,-208,722,797),8106=>array(46,-208,943,800),8107=>array(71,-208,949,800),8108=>array(47,-208,814,800),8109=>array(70,-208,838,800),8110=>array(100,-208,792,928),8111=>array(98,-208,820,928),8112=>array(49,-12,581,785),8113=>array(49,-12,581,745),8114=>array(49,-208,581,800),8115=>array(49,-208,581,559),8116=>array(49,-208,581,800),8118=>array(49,-12,581,777),8119=>array(49,-208,581,777),8120=>array(-48,0,554,928),8121=>array(-48,0,554,899),8122=>array(-19,0,583,800),8123=>array(-48,0,554,800),8124=>array(-48,-208,554,729),8125=>array(215,595,357,797),8126=>array(123,-208,216,-45),8127=>array(215,595,357,797),8128=>array(147,639,462,777),8129=>array(166,659,491,928),8130=>array(35,-208,521,800),8131=>array(35,-208,521,560),8132=>array(35,-208,557,800),8134=>array(51,-208,525,777),8135=>array(35,-208,525,777),8136=>array(94,0,723,800),8137=>array(53,0,688,800),8138=>array(94,0,813,800),8139=>array(58,0,782,800),8140=>array(24,-208,653,729),8141=>array(104,595,466,800),8142=>array(123,595,499,800),8143=>array(176,595,491,928),8144=>array(60,0,360,785),8145=>array(60,0,337,745),8146=>array(60,0,352,978),8147=>array(66,0,405,978),8150=>array(55,0,370,777),8151=>array(60,0,400,928),8152=>array(24,0,354,928),8153=>array(24,0,352,899),8154=>array(94,0,404,800),8155=>array(55,0,368,800),8157=>array(124,595,463,800),8158=>array(134,595,512,800),8159=>array(176,595,491,928),8160=>array(53,0,479,785),8161=>array(53,0,479,745),8162=>array(53,0,479,978),8163=>array(53,0,510,978),8164=>array(14,-208,540,797),8165=>array(14,-208,540,797),8166=>array(53,0,479,777),8167=>array(53,0,502,928),8168=>array(57,0,608,928),8169=>array(57,0,608,899),8170=>array(94,0,819,800),8171=>array(50,0,827,800),8172=>array(71,0,615,797),8173=>array(166,659,444,978),8174=>array(166,659,498,978),8175=>array(171,617,350,800),8178=>array(61,-208,694,800),8179=>array(61,-208,694,547),8180=>array(61,-208,694,800),8182=>array(61,-14,694,777),8183=>array(61,-208,694,777),8184=>array(94,-14,811,800),8185=>array(57,-14,714,800),8186=>array(94,0,793,800),8187=>array(47,0,746,800),8188=>array(-31,-208,650,738),8189=>array(227,616,470,800),8190=>array(240,595,359,797),8208=>array(40,234,292,314),8209=>array(40,234,292,314),8210=>array(38,239,535,309),8211=>array(38,239,413,309),8212=>array(38,239,862,309),8213=>array(-6,239,906,309),8214=>array(114,-236,334,764),8215=>array(-9,-236,459,-9),8216=>array(118,489,289,729),8217=>array(121,489,293,729),8218=>array(2,-116,174,124),8219=>array(149,489,258,729),8220=>array(118,489,469,729),8221=>array(121,489,473,729),8222=>array(2,-116,354,124),8223=>array(83,489,371,729),8224=>array(38,-96,451,729),8225=>array(-16,-96,457,729),8226=>array(135,227,396,516),8227=>array(135,188,431,555),8228=>array(58,0,173,124),8229=>array(58,0,473,124),8230=>array(58,0,773,124),8231=>array(89,302,204,426),8240=>array(82,-14,1133,742),8241=>array(82,-14,1493,742),8242=>array(1,547,199,729),8243=>array(1,547,331,729),8244=>array(1,547,462,729),8245=>array(81,547,215,729),8246=>array(81,547,347,729),8247=>array(81,547,479,729),8248=>array(4,-236,300,-30),8249=>array(56,69,304,517),8250=>array(56,69,304,517),8251=>array(103,0,646,596),8252=>array(0,0,435,729),8253=>array(104,0,450,742),8254=>array(-9,686,459,755),8255=>array(-40,-237,763,-60),8256=>array(-40,752,763,929),8257=>array(-38,-236,257,229),8258=>array(26,-29,874,814),8259=>array(87,313,370,421),8260=>array(-236,-14,386,742),8261=>array(36,-132,378,760),8262=>array(-35,-132,308,760),8263=>array(78,0,843,742),8264=>array(110,0,658,742),8265=>array(0,0,641,742),8266=>array(88,-123,462,545),8267=>array(48,-96,570,729),8268=>array(101,227,349,516),8269=>array(101,227,349,516),8270=>array(26,-29,423,427),8271=>array(86,-116,259,517),8272=>array(-40,-237,763,929),8273=>array(26,-7,423,876),8274=>array(-8,-93,442,729),8275=>array(44,228,856,399),8276=>array(-40,-237,763,-60),8277=>array(144,98,638,631),8278=>array(116,149,471,589),8279=>array(1,547,594,729),8280=>array(163,125,620,613),8281=>array(139,120,653,608),8282=>array(46,0,267,729),8283=>array(46,-138,699,867),8284=>array(56,0,726,729),8285=>array(53,39,254,655),8286=>array(47,8,259,683),8304=>array(38,319,330,742),8305=>array(16,326,142,751),8308=>array(37,326,352,734),8309=>array(11,319,323,734),8310=>array(40,319,339,742),8311=>array(70,326,354,734),8312=>array(23,319,337,742),8313=>array(29,319,328,742),8314=>array(60,326,415,677),8315=>array(60,479,415,525),8316=>array(60,422,415,581),8317=>array(49,252,221,751),8318=>array(6,252,179,751),8319=>array(24,326,316,640),8320=>array(38,-7,330,416),8321=>array(59,0,313,408),8322=>array(32,0,347,416),8323=>array(14,-7,332,416),8324=>array(37,0,352,408),8325=>array(11,-7,323,408),8326=>array(40,-7,339,416),8327=>array(70,0,354,408),8328=>array(23,-7,337,416),8329=>array(29,-7,328,416),8330=>array(60,0,415,351),8331=>array(60,152,415,199),8332=>array(60,96,415,254),8333=>array(49,-74,221,425),8334=>array(6,-74,179,425),8336=>array(22,-8,300,313),8337=>array(31,-8,321,313),8338=>array(31,-8,316,313),8339=>array(24,0,374,306),8340=>array(29,-8,319,313),8341=>array(14,0,307,425),8342=>array(14,0,336,425),8343=>array(14,0,140,425),8344=>array(24,0,509,313),8345=>array(24,0,316,314),8346=>array(13,-117,338,313),8347=>array(26,0,297,322),8348=>array(27,0,229,393),8352=>array(52,0,778,729),8353=>array(38,-44,572,778),8354=>array(38,-14,572,742),8355=>array(28,0,591,729),8356=>array(21,0,574,742),8357=>array(34,-93,811,640),8358=>array(34,0,639,729),8359=>array(24,-14,1125,729),8360=>array(25,-14,927,729),8361=>array(39,0,924,729),8362=>array(-22,-14,743,729),8363=>array(41,-157,631,760),8364=>array(-18,-14,546,742),8365=>array(17,0,614,729),8366=>array(58,0,628,729),8367=>array(42,-222,1060,742),8368=>array(8,-14,521,742),8369=>array(24,0,589,729),8370=>array(29,-81,567,809),8371=>array(-57,0,569,729),8372=>array(35,-14,662,742),8373=>array(76,-147,550,760),8376=>array(33,0,628,729),8377=>array(50,0,591,729),8378=>array(-18,2,584,731),8400=>array(-453,635,-25,760),8401=>array(-435,635,-15,760),8406=>array(-423,560,-19,760),8407=>array(-428,560,-23,760),8411=>array(-325,659,126,758),8412=>array(-411,659,211,758),8417=>array(-423,560,-23,760),8448=>array(15,-24,846,752),8449=>array(15,-24,846,752),8450=>array(50,-14,580,742),8451=>array(85,-14,994,742),8452=>array(103,0,694,729),8453=>array(20,-24,832,752),8454=>array(20,-24,891,752),8455=>array(109,-14,609,742),8456=>array(-5,-146,578,611),8457=>array(85,0,825,742),8459=>array(32,-14,849,748),8460=>array(0,-128,624,731),8461=>array(88,0,677,729),8462=>array(31,0,510,760),8463=>array(40,0,510,760),8464=>array(26,-15,389,742),8465=>array(46,-14,593,742),8466=>array(30,-14,611,743),8467=>array(-13,-14,317,742),8468=>array(20,-14,686,760),8469=>array(87,0,634,729),8470=>array(-40,0,866,729),8471=>array(124,0,776,724),8472=>array(48,-221,592,495),8473=>array(88,0,600,729),8474=>array(50,-129,658,742),8475=>array(29,-9,688,774),8476=>array(36,-14,723,743),8477=>array(88,0,697,729),8478=>array(74,0,733,729),8479=>array(83,-107,603,847),8480=>array(114,443,693,730),8481=>array(29,0,889,547),8482=>array(129,447,706,729),8483=>array(13,-108,736,846),8484=>array(40,0,630,729),8485=>array(8,-213,565,760),8486=>array(-31,0,650,738),8487=>array(38,-14,718,724),8488=>array(10,-149,516,783),8489=>array(64,0,243,547),8490=>array(24,0,650,729),8491=>array(-48,0,554,928),8492=>array(40,0,661,772),8493=>array(57,-12,587,742),8494=>array(55,-12,714,647),8495=>array(38,-15,493,533),8496=>array(71,-14,509,742),8497=>array(37,-16,683,755),8498=>array(24,0,528,729),8499=>array(25,-28,929,751),8500=>array(45,-12,370,395),8501=>array(45,-14,641,742),8502=>array(-2,-14,588,743),8503=>array(12,-35,366,742),8504=>array(38,-35,532,742),8505=>array(31,0,320,760),8506=>array(40,-21,871,654),8507=>array(18,0,1078,547),8508=>array(16,-8,616,547),8509=>array(0,-194,602,560),8510=>array(88,0,584,729),8511=>array(88,0,676,729),8512=>array(11,-192,712,719),8513=>array(42,-14,655,742),8514=>array(53,0,476,729),8515=>array(3,0,539,729),8516=>array(-59,0,493,729),8517=>array(38,0,708,729),8518=>array(40,-14,639,760),8519=>array(40,-14,515,560),8520=>array(35,0,282,760),8521=>array(-103,-208,282,760),8523=>array(52,-14,668,742),8526=>array(-13,0,445,547),8528=>array(59,-14,866,742),8529=>array(59,-14,839,742),8530=>array(59,-14,1202,742),8531=>array(59,-14,843,742),8532=>array(32,-14,843,742),8533=>array(59,-14,834,742),8534=>array(32,-14,834,742),8535=>array(14,-14,834,742),8536=>array(37,-14,834,742),8537=>array(59,-14,850,742),8538=>array(11,-14,850,742),8539=>array(59,-14,849,742),8540=>array(14,-14,849,742),8541=>array(11,-14,849,742),8542=>array(70,-14,849,742),8543=>array(59,-14,747,742),8544=>array(24,0,242,729),8545=>array(24,0,419,729),8546=>array(24,0,597,729),8547=>array(24,0,883,729),8548=>array(70,0,668,729),8549=>array(70,0,806,729),8550=>array(70,0,984,729),8551=>array(70,0,1161,729),8552=>array(24,0,842,729),8553=>array(-39,0,633,729),8554=>array(-39,0,816,729),8555=>array(-39,0,993,729),8556=>array(24,0,448,729),8557=>array(38,-14,625,742),8558=>array(24,0,650,729),8559=>array(24,0,752,729),8560=>array(31,0,246,760),8561=>array(31,0,408,760),8562=>array(31,0,569,760),8563=>array(31,0,742,760),8564=>array(64,0,544,547),8565=>array(64,0,726,760),8566=>array(64,0,888,760),8567=>array(64,0,1049,760),8568=>array(31,0,745,760),8569=>array(-23,0,541,547),8570=>array(-23,0,736,760),8571=>array(-23,0,897,760),8572=>array(31,0,246,760),8573=>array(41,-14,483,560),8574=>array(41,-14,576,760),8575=>array(31,0,815,560),8576=>array(53,0,1068,729),8577=>array(24,0,640,729),8578=>array(53,0,1068,729),8579=>array(56,-14,644,742),8580=>array(2,-14,444,560),8581=>array(67,-208,651,742),8585=>array(38,-14,843,742),8592=>array(44,100,703,527),8593=>array(184,0,569,732),8594=>array(51,100,710,527),8595=>array(184,-3,569,729),8596=>array(44,100,710,527),8597=>array(184,-8,569,732),8598=>array(126,25,633,587),8599=>array(126,25,633,587),8600=>array(126,25,633,587),8601=>array(126,25,633,587),8602=>array(44,100,703,527),8603=>array(51,100,710,527),8604=>array(19,103,745,414),8605=>array(9,103,735,414),8606=>array(44,100,703,527),8607=>array(185,0,570,732),8608=>array(51,100,710,527),8609=>array(185,-3,570,729),8610=>array(44,100,703,527),8611=>array(51,100,710,527),8612=>array(44,100,703,527),8613=>array(185,0,569,732),8614=>array(51,100,710,527),8615=>array(185,-3,569,729),8616=>array(185,0,569,732),8617=>array(44,100,703,565),8618=>array(52,100,710,565),8619=>array(44,100,703,565),8620=>array(52,100,710,565),8621=>array(44,100,710,527),8622=>array(44,93,710,534),8623=>array(131,-2,632,730),8624=>array(152,0,567,743),8625=>array(188,0,603,743),8626=>array(152,-14,567,729),8627=>array(188,-14,603,729),8628=>array(209,-3,684,604),8629=>array(44,100,590,626),8630=>array(20,203,720,668),8631=>array(35,203,734,668),8632=>array(97,25,709,729),8633=>array(49,-46,705,673),8634=>array(92,62,686,680),8635=>array(69,62,663,680),8636=>array(44,272,703,527),8637=>array(44,100,703,355),8638=>array(339,0,569,732),8639=>array(184,0,415,732),8640=>array(51,272,710,527),8641=>array(51,100,710,355),8642=>array(339,0,569,732),8643=>array(184,0,415,732),8644=>array(44,-47,710,674),8645=>array(52,-3,701,732),8646=>array(44,-47,710,674),8647=>array(44,-47,703,674),8648=>array(53,0,702,732),8649=>array(52,-47,711,674),8650=>array(53,-3,702,729),8651=>array(44,7,710,620),8652=>array(44,7,710,620),8653=>array(44,100,703,527),8654=>array(44,94,710,533),8655=>array(51,100,710,527),8656=>array(44,100,703,527),8657=>array(185,0,570,732),8658=>array(51,100,710,527),8659=>array(185,-3,570,729),8660=>array(44,100,710,527),8661=>array(185,-8,570,732),8662=>array(126,-23,677,587),8663=>array(83,-23,633,587),8664=>array(83,25,633,636),8665=>array(126,25,677,636),8666=>array(44,100,703,527),8667=>array(51,100,710,527),8668=>array(44,100,703,527),8669=>array(51,100,710,527),8670=>array(184,0,569,732),8671=>array(184,-3,569,729),8672=>array(44,100,703,527),8673=>array(184,0,570,732),8674=>array(51,100,710,527),8675=>array(184,-3,570,729),8676=>array(47,99,703,528),8677=>array(51,99,708,528),8678=>array(24,65,703,562),8679=>array(154,0,601,754),8680=>array(31,65,710,562),8681=>array(154,-25,601,729),8682=>array(154,0,601,754),8683=>array(154,0,601,754),8684=>array(141,0,614,754),8685=>array(154,0,601,754),8686=>array(154,0,601,754),8687=>array(154,0,601,754),8688=>array(51,65,730,562),8689=>array(53,0,709,729),8690=>array(53,0,709,729),8691=>array(154,-25,601,754),8692=>array(51,100,710,527),8693=>array(52,-3,701,732),8694=>array(51,-193,710,820),8695=>array(44,94,703,533),8696=>array(51,94,710,533),8697=>array(44,94,710,533),8698=>array(44,94,703,533),8699=>array(51,94,710,533),8700=>array(44,94,710,533),8701=>array(24,96,703,531),8702=>array(51,96,730,531),8703=>array(24,96,730,531),8704=>array(7,0,608,729),8705=>array(59,-14,499,742),8706=>array(42,-14,424,662),8707=>array(88,0,511,729),8708=>array(88,-46,511,776),8709=>array(68,-10,716,710),8710=>array(-3,0,605,719),8711=>array(-3,0,605,719),8712=>array(77,-10,708,710),8713=>array(77,-139,708,836),8714=>array(95,76,551,550),8715=>array(77,-10,708,710),8716=>array(77,-139,708,836),8717=>array(95,76,551,550),8718=>array(132,0,441,485),8719=>array(68,-192,612,719),8720=>array(68,-192,612,719),8721=>array(11,-192,589,719),8722=>array(95,272,659,355),8723=>array(95,0,659,627),8724=>array(95,0,659,729),8725=>array(-66,-93,384,729),8726=>array(173,-54,477,768),8727=>array(115,0,640,627),8728=>array(142,160,421,470),8729=>array(151,168,413,458),8730=>array(26,-20,574,811),8731=>array(26,-20,574,933),8732=>array(26,-20,574,924),8733=>array(97,112,546,487),8734=>array(97,112,653,487),8735=>array(124,99,630,661),8736=>array(77,0,708,729),8737=>array(77,-53,708,729),8738=>array(104,-3,659,727),8739=>array(189,-214,260,771),8740=>array(44,-214,406,771),8741=>array(119,-214,331,771),8742=>array(44,-214,406,771),8743=>array(116,0,543,579),8744=>array(116,0,543,579),8745=>array(116,0,543,579),8746=>array(116,0,543,579),8747=>array(51,-212,417,757),8748=>array(51,-212,659,757),8749=>array(51,-212,900,757),8750=>array(51,-212,418,757),8751=>array(51,-212,659,757),8752=>array(51,-212,900,757),8753=>array(51,-212,470,757),8754=>array(51,-212,463,757),8755=>array(51,-212,464,757),8756=>array(53,100,520,604),8757=>array(53,100,520,604),8758=>array(70,100,164,604),8759=>array(53,100,520,604),8760=>array(95,272,659,552),8761=>array(95,78,659,552),8762=>array(95,78,659,552),8763=>array(95,78,659,552),8764=>array(95,228,659,399),8765=>array(95,228,659,399),8766=>array(71,149,683,479),8767=>array(95,42,659,584),8768=>array(91,0,246,627),8769=>array(95,77,659,553),8770=>array(95,133,659,454),8771=>array(95,172,659,494),8772=>array(95,47,659,603),8773=>array(95,90,659,594),8774=>array(95,11,659,594),8775=>array(95,-5,659,658),8776=>array(95,133,659,494),8777=>array(95,2,659,625),8778=>array(95,90,659,598),8779=>array(95,59,659,602),8780=>array(95,90,659,594),8781=>array(95,105,659,521),8782=>array(95,26,659,601),8783=>array(95,172,659,601),8784=>array(95,172,659,625),8785=>array(95,1,659,625),8786=>array(94,2,659,625),8787=>array(94,2,658,625),8788=>array(90,151,810,476),8789=>array(90,151,810,475),8790=>array(95,172,659,454),8791=>array(95,172,659,760),8792=>array(95,172,659,662),8793=>array(95,172,659,812),8794=>array(95,172,659,812),8795=>array(95,172,659,849),8796=>array(95,172,659,854),8797=>array(95,172,659,764),8798=>array(95,172,659,760),8799=>array(95,172,659,856),8800=>array(95,19,659,608),8801=>array(95,90,659,537),8802=>array(95,-24,659,650),8803=>array(95,0,659,629),8804=>array(95,0,659,582),8805=>array(95,0,659,582),8806=>array(96,-83,659,638),8807=>array(96,-83,659,638),8808=>array(96,-164,659,638),8809=>array(96,-164,659,638),8810=>array(65,22,877,609),8811=>array(65,22,877,609),8812=>array(77,-132,340,759),8813=>array(95,13,659,613),8814=>array(95,2,659,674),8815=>array(95,-47,659,625),8816=>array(95,-102,659,667),8817=>array(95,-102,659,667),8818=>array(95,-55,659,582),8819=>array(95,-40,659,582),8820=>array(95,-105,659,664),8821=>array(95,-102,659,667),8822=>array(91,-87,659,686),8823=>array(91,-87,659,686),8824=>array(91,-197,659,797),8825=>array(91,-197,659,797),8826=>array(95,-38,659,664),8827=>array(95,-38,659,664),8828=>array(95,-105,659,667),8829=>array(95,-105,659,667),8830=>array(95,-85,659,667),8831=>array(95,-85,659,667),8832=>array(95,-61,659,764),8833=>array(95,-138,659,687),8834=>array(89,80,665,546),8835=>array(89,80,665,546),8836=>array(89,-96,665,726),8837=>array(89,-100,665,722),8838=>array(83,0,659,613),8839=>array(95,0,671,613),8840=>array(83,-116,659,730),8841=>array(95,-116,671,730),8842=>array(83,-73,659,613),8843=>array(83,-73,659,613),8844=>array(116,0,543,579),8845=>array(116,0,543,579),8846=>array(116,2,543,582),8847=>array(95,0,659,568),8848=>array(95,0,659,568),8849=>array(95,-83,659,630),8850=>array(95,-83,659,630),8851=>array(95,0,607,626),8852=>array(95,0,607,626),8853=>array(82,-14,672,643),8854=>array(82,-14,672,643),8855=>array(82,-14,672,643),8856=>array(82,-14,672,643),8857=>array(82,-14,672,643),8858=>array(82,-14,672,643),8859=>array(82,-14,672,643),8860=>array(82,-14,672,643),8861=>array(82,-14,672,643),8862=>array(82,-14,672,643),8863=>array(82,-14,672,643),8864=>array(82,-14,672,643),8865=>array(82,-14,672,643),8866=>array(77,0,708,700),8867=>array(77,0,708,700),8868=>array(77,0,708,700),8869=>array(77,0,708,700),8870=>array(77,0,392,700),8871=>array(77,0,392,700),8872=>array(77,0,708,700),8873=>array(77,0,708,700),8874=>array(77,0,708,700),8875=>array(77,0,708,700),8876=>array(77,-40,708,740),8877=>array(77,-40,708,740),8878=>array(77,-40,708,740),8879=>array(77,-40,708,740),8880=>array(95,-43,652,670),8881=>array(95,-43,652,670),8882=>array(95,15,659,612),8883=>array(95,15,659,612),8884=>array(95,-48,659,674),8885=>array(95,-48,659,674),8886=>array(53,175,847,455),8887=>array(53,175,847,455),8888=>array(42,175,711,455),8889=>array(53,-47,701,674),8890=>array(104,0,364,701),8891=>array(88,0,571,740),8892=>array(88,0,571,740),8893=>array(88,0,571,740),8894=>array(124,0,630,562),8895=>array(124,0,630,562),8896=>array(-3,-192,741,719),8897=>array(-3,-192,741,719),8898=>array(62,-192,677,719),8899=>array(62,-192,677,719),8900=>array(2,-233,442,807),8901=>array(96,285,189,409),8902=>array(109,149,454,512),8903=>array(95,15,659,613),8904=>array(95,-30,805,657),8905=>array(95,-30,805,657),8906=>array(95,-30,805,657),8907=>array(95,-30,805,657),8908=>array(95,-30,805,657),8909=>array(95,172,659,494),8910=>array(43,0,616,579),8911=>array(43,0,616,579),8912=>array(83,-3,659,630),8913=>array(95,-3,671,630),8914=>array(92,0,662,663),8915=>array(92,-14,662,649),8916=>array(167,0,587,729),8917=>array(95,-100,659,729),8918=>array(95,46,659,581),8919=>array(95,46,659,581),8920=>array(65,22,1215,609),8921=>array(65,22,1215,609),8922=>array(95,-228,659,854),8923=>array(95,-228,659,854),8924=>array(95,0,659,582),8925=>array(95,0,659,582),8926=>array(95,-105,659,667),8927=>array(95,-105,659,667),8928=>array(95,-178,659,764),8929=>array(95,-178,659,764),8930=>array(95,-141,659,767),8931=>array(95,-141,659,767),8932=>array(95,-94,659,619),8933=>array(95,-94,659,619),8934=>array(95,-138,659,582),8935=>array(95,-138,659,582),8936=>array(95,-169,659,667),8937=>array(95,-171,663,667),8938=>array(95,-130,659,756),8939=>array(95,-130,659,756),8940=>array(95,-189,659,815),8941=>array(93,-189,657,815),8942=>array(403,-93,497,715),8943=>array(104,249,796,373),8944=>array(104,-93,796,715),8945=>array(104,-93,796,715),8946=>array(38,-10,862,710),8947=>array(77,-10,708,710),8948=>array(95,76,551,550),8949=>array(77,-10,708,910),8950=>array(77,-10,708,853),8951=>array(95,76,551,686),8952=>array(77,-144,708,710),8953=>array(77,-10,708,710),8954=>array(38,-10,862,710),8955=>array(77,-10,708,710),8956=>array(95,76,551,550),8957=>array(77,-10,708,853),8958=>array(95,76,551,686),8959=>array(95,0,689,720),8960=>array(56,-18,534,514),8961=>array(50,162,486,443),8962=>array(64,0,507,596),8963=>array(184,481,569,732),8964=>array(184,0,569,251),8965=>array(184,0,569,406),8966=>array(184,0,569,513),8967=>array(187,-31,386,791),8968=>array(-1,-132,342,760),8969=>array(115,-132,352,760),8970=>array(-1,-132,236,760),8971=>array(9,-132,352,760),8972=>array(332,-77,684,313),8973=>array(44,-77,396,313),8974=>array(332,243,684,634),8975=>array(44,243,396,634),8976=>array(95,140,659,421),8977=>array(2,126,459,634),8984=>array(108,0,792,759),8985=>array(95,140,659,421),8988=>array(78,425,422,760),8989=>array(124,425,422,760),8990=>array(65,-70,363,264),8991=>array(46,-70,391,264),8992=>array(189,-250,448,928),8993=>array(18,-237,277,942),8996=>array(68,227,969,575),8997=>array(68,0,969,575),8998=>array(68,0,1272,760),8999=>array(68,0,969,760),9000=>array(53,0,1247,729),9003=>array(0,0,1204,760),9004=>array(66,-91,720,748),9075=>array(73,0,273,547),9076=>array(82,-208,522,560),9077=>array(59,-14,692,547),9082=>array(49,-12,550,559),9085=>array(4,-228,678,102),9095=>array(68,0,987,748),9108=>array(15,0,771,727),9115=>array(77,-252,373,946),9116=>array(77,-252,163,942),9117=>array(77,-240,373,942),9118=>array(77,-252,373,946),9119=>array(287,-252,373,942),9120=>array(77,-240,373,942),9121=>array(77,-252,373,928),9122=>array(77,-252,163,942),9123=>array(77,-240,373,942),9124=>array(77,-252,373,928),9125=>array(287,-252,373,935),9126=>array(77,-240,373,935),9127=>array(296,-261,602,928),9128=>array(74,-252,378,940),9129=>array(296,-240,602,940),9130=>array(296,-256,378,943),9131=>array(74,-261,378,928),9132=>array(296,-252,602,940),9133=>array(74,-240,378,940),9134=>array(189,-250,277,942),9166=>array(24,65,703,729),9167=>array(82,0,769,596),9187=>array(66,-91,720,748),9189=>array(2,75,690,444),9192=>array(14,-129,498,294),9250=>array(-13,-14,505,760),9251=>array(23,-228,524,102),9312=>array(66,-10,740,738),9313=>array(66,-10,740,738),9314=>array(66,-10,740,738),9315=>array(66,-10,740,738),9316=>array(66,-10,740,738),9317=>array(66,-10,740,738),9318=>array(66,-10,740,738),9319=>array(66,-10,740,738),9320=>array(66,-10,740,738),9321=>array(66,-10,740,738),9472=>array(-9,242,551,326),9473=>array(-9,200,551,368),9474=>array(235,-302,306,973),9475=>array(200,-302,341,973),9476=>array(-9,242,551,326),9477=>array(-9,200,551,368),9478=>array(235,-302,306,973),9479=>array(200,-302,341,973),9480=>array(-9,242,551,326),9481=>array(-9,200,551,368),9482=>array(235,-302,306,973),9483=>array(200,-302,341,973),9484=>array(235,-302,551,326),9485=>array(235,-302,551,368),9486=>array(200,-302,551,326),9487=>array(200,-302,551,368),9488=>array(-9,-302,306,326),9489=>array(-9,-302,306,368),9490=>array(-9,-302,341,326),9491=>array(-9,-302,341,368),9492=>array(235,242,551,973),9493=>array(235,200,551,973),9494=>array(200,242,551,973),9495=>array(200,200,551,973),9496=>array(-9,242,306,973),9497=>array(-9,200,306,973),9498=>array(-9,242,341,973),9499=>array(-9,200,341,973),9500=>array(235,-302,551,973),9501=>array(235,-302,551,973),9502=>array(200,-302,551,973),9503=>array(200,-302,551,973),9504=>array(200,-302,551,973),9505=>array(200,-302,551,973),9506=>array(200,-302,551,973),9507=>array(200,-302,551,973),9508=>array(-9,-302,306,973),9509=>array(-9,-302,306,973),9510=>array(-9,-302,341,973),9511=>array(-9,-302,341,973),9512=>array(-9,-302,341,973),9513=>array(-9,-302,341,973),9514=>array(-9,-302,341,973),9515=>array(-9,-302,341,973),9516=>array(-9,-302,551,326),9517=>array(-9,-302,551,368),9518=>array(-9,-302,551,368),9519=>array(-9,-302,551,368),9520=>array(-9,-302,551,326),9521=>array(-9,-302,551,368),9522=>array(-9,-302,551,368),9523=>array(-9,-302,551,368),9524=>array(-9,242,551,973),9525=>array(-9,200,551,973),9526=>array(-9,200,551,973),9527=>array(-9,200,551,973),9528=>array(-9,242,551,973),9529=>array(-9,200,551,973),9530=>array(-9,200,551,973),9531=>array(-9,200,551,973),9532=>array(-9,-302,551,973),9533=>array(-9,-302,551,973),9534=>array(-9,-302,551,973),9535=>array(-9,-302,551,973),9536=>array(-9,-302,551,973),9537=>array(-9,-302,551,973),9538=>array(-9,-302,551,973),9539=>array(-9,-302,551,973),9540=>array(-9,-302,551,973),9541=>array(-9,-302,551,973),9542=>array(-9,-302,551,973),9543=>array(-9,-302,551,973),9544=>array(-9,-302,551,973),9545=>array(-9,-302,551,973),9546=>array(-9,-302,551,973),9547=>array(-9,-302,551,973),9548=>array(-9,242,551,326),9549=>array(-9,200,551,368),9550=>array(235,-302,306,973),9551=>array(200,-302,341,973),9552=>array(-9,158,551,410),9553=>array(165,-302,376,973),9554=>array(235,-302,551,410),9555=>array(165,-302,551,326),9556=>array(165,-302,551,410),9557=>array(-9,-302,306,410),9558=>array(-9,-302,376,326),9559=>array(-9,-302,376,410),9560=>array(235,158,551,973),9561=>array(165,242,551,973),9562=>array(165,158,551,973),9563=>array(-9,158,306,973),9564=>array(-9,242,376,973),9565=>array(-9,158,376,973),9566=>array(235,-302,551,973),9567=>array(165,-302,551,973),9568=>array(165,-302,551,973),9569=>array(-9,-302,306,973),9570=>array(-9,-302,376,973),9571=>array(-9,-302,376,973),9572=>array(-9,-302,551,410),9573=>array(-9,-302,551,326),9574=>array(-9,-302,551,410),9575=>array(-9,158,551,973),9576=>array(-9,242,551,973),9577=>array(-9,158,551,973),9578=>array(-9,-302,551,973),9579=>array(-9,-302,551,973),9580=>array(-9,-302,551,973),9581=>array(235,-302,551,326),9582=>array(-9,-302,306,326),9583=>array(-9,242,306,973),9584=>array(235,242,551,973),9585=>array(-48,-302,590,973),9586=>array(-48,-302,590,973),9587=>array(-48,-302,590,973),9588=>array(-9,242,280,326),9589=>array(235,284,306,973),9590=>array(279,242,551,326),9591=>array(235,-302,306,284),9592=>array(-9,200,280,368),9593=>array(200,284,341,973),9594=>array(279,200,551,368),9595=>array(200,-302,341,284),9596=>array(-9,200,551,368),9597=>array(200,-302,341,973),9598=>array(-9,200,551,368),9599=>array(200,-302,341,973),9600=>array(-9,260,701,770),9601=>array(-9,-250,701,-123),9602=>array(-9,-250,701,-5),9603=>array(-9,-250,701,132),9604=>array(-9,-250,701,260),9605=>array(-9,-250,701,387),9606=>array(-9,-250,701,515),9607=>array(-9,-250,701,642),9608=>array(-9,-250,701,770),9609=>array(-9,-250,612,770),9610=>array(-9,-250,523,770),9611=>array(-9,-250,435,770),9612=>array(-9,-250,346,770),9613=>array(-9,-250,257,770),9614=>array(-9,-250,168,770),9615=>array(-9,-250,80,770),9616=>array(346,-250,701,770),9617=>array(-9,-250,612,770),9618=>array(-9,-250,701,770),9619=>array(-9,-250,701,770),9620=>array(-9,642,701,770),9621=>array(612,-250,701,770),9622=>array(-9,-250,347,260),9623=>array(346,-250,701,260),9624=>array(-9,260,347,770),9625=>array(-9,-250,701,770),9626=>array(-9,-250,701,770),9627=>array(-9,-250,701,770),9628=>array(-9,-250,701,770),9629=>array(346,260,701,770),9630=>array(-9,-250,701,770),9631=>array(-9,-250,701,770),9632=>array(82,-124,769,643),9633=>array(82,-124,769,643),9634=>array(82,-124,769,643),9635=>array(82,-124,769,643),9636=>array(82,-124,769,643),9637=>array(82,-124,769,643),9638=>array(82,-124,769,643),9639=>array(82,-124,769,643),9640=>array(82,-124,769,643),9641=>array(82,-124,769,643),9642=>array(82,11,528,509),9643=>array(82,11,528,509),9644=>array(82,75,769,444),9645=>array(82,75,769,444),9646=>array(82,-122,414,642),9647=>array(82,-122,414,642),9648=>array(2,75,690,444),9649=>array(2,75,690,444),9650=>array(2,-124,690,643),9651=>array(2,-124,690,643),9652=>array(2,11,449,509),9653=>array(2,11,449,509),9654=>array(2,-124,690,643),9655=>array(2,-124,690,643),9656=>array(2,11,449,509),9657=>array(2,11,449,509),9658=>array(2,11,690,509),9659=>array(2,11,690,509),9660=>array(2,-124,690,643),9661=>array(2,-124,690,643),9662=>array(2,11,449,509),9663=>array(2,11,449,509),9664=>array(2,-124,690,643),9665=>array(2,-124,690,643),9666=>array(2,11,449,509),9667=>array(2,11,449,509),9668=>array(2,11,690,509),9669=>array(2,11,690,509),9670=>array(2,-124,690,643),9671=>array(2,-124,690,643),9672=>array(2,-124,690,643),9673=>array(49,-125,736,645),9674=>array(2,-233,442,807),9675=>array(49,-125,736,645),9676=>array(50,-125,735,644),9677=>array(49,-125,736,645),9678=>array(49,-125,736,645),9679=>array(49,-123,736,641),9680=>array(49,-123,736,641),9681=>array(49,-123,736,641),9682=>array(49,-123,736,641),9683=>array(49,-123,736,641),9684=>array(49,-123,736,641),9685=>array(49,-123,736,641),9686=>array(49,-125,393,645),9687=>array(82,-125,425,645),9688=>array(82,-10,630,770),9689=>array(82,-250,792,770),9690=>array(82,260,792,770),9691=>array(82,-250,792,260),9692=>array(2,260,346,645),9693=>array(2,260,346,645),9694=>array(2,-125,346,260),9695=>array(2,-125,346,260),9696=>array(2,260,690,645),9697=>array(2,-125,690,260),9698=>array(2,-124,690,643),9699=>array(2,-124,690,643),9700=>array(2,-124,690,643),9701=>array(2,-124,690,643),9702=>array(135,227,396,516),9703=>array(82,-124,769,643),9704=>array(82,-124,769,643),9705=>array(82,-124,769,643),9706=>array(82,-124,769,643),9707=>array(82,-124,769,643),9708=>array(2,-124,690,643),9709=>array(2,-124,690,643),9710=>array(2,-124,690,643),9711=>array(49,-250,958,770),9712=>array(82,-124,769,643),9713=>array(82,-124,769,643),9714=>array(82,-124,769,643),9715=>array(82,-124,769,643),9716=>array(49,-123,736,641),9717=>array(49,-123,736,641),9718=>array(49,-123,736,641),9719=>array(49,-123,736,641),9720=>array(2,-124,690,643),9721=>array(2,-124,690,643),9722=>array(2,-124,690,643),9723=>array(82,-66,666,585),9724=>array(82,-66,666,585),9725=>array(82,-17,578,537),9726=>array(82,-17,578,537),9727=>array(2,-124,690,643),9728=>array(75,0,731,729),9729=>array(45,-2,854,360),9730=>array(44,0,763,729),9731=>array(75,-0,732,927),9732=>array(57,0,750,880),9733=>array(58,-4,749,723),9734=>array(58,-4,749,723),9735=>array(75,2,441,729),9736=>array(75,0,732,731),9737=>array(75,0,732,730),9738=>array(55,0,745,727),9739=>array(55,0,745,723),9740=>array(55,-1,549,722),9741=>array(55,0,857,723),9742=>array(62,0,1060,729),9743=>array(63,0,1062,729),9744=>array(81,0,727,729),9745=>array(80,0,727,729),9746=>array(80,0,727,729),9747=>array(67,78,411,656),9748=>array(44,0,783,933),9749=>array(66,0,740,731),9750=>array(75,0,732,731),9751=>array(75,0,732,727),9752=>array(70,0,737,729),9753=>array(75,140,732,574),9754=>array(75,113,732,569),9755=>array(75,113,732,569),9756=>array(78,104,729,569),9757=>array(64,0,483,724),9758=>array(78,103,729,569),9759=>array(64,-3,483,720),9760=>array(55,0,752,730),9761=>array(75,0,732,730),9762=>array(75,0,732,730),9763=>array(44,0,763,730),9764=>array(44,-2,558,727),9765=>array(75,0,597,731),9766=>array(75,-1,510,731),9767=>array(75,0,631,911),9768=>array(75,0,416,730),9769=>array(75,-1,732,729),9770=>array(78,0,729,730),9771=>array(75,0,733,731),9772=>array(75,0,565,731),9773=>array(75,0,732,730),9774=>array(75,0,732,730),9775=>array(75,0,732,730),9776=>array(75,0,726,729),9777=>array(75,0,727,729),9778=>array(75,0,726,729),9779=>array(75,0,726,729),9780=>array(75,0,726,729),9781=>array(75,0,726,729),9782=>array(75,0,726,729),9783=>array(75,0,726,729),9784=>array(71,3,735,721),9785=>array(75,-73,864,804),9786=>array(75,-73,864,804),9787=>array(75,-73,864,804),9788=>array(75,0,732,730),9789=>array(322,0,733,730),9790=>array(75,0,485,730),9791=>array(77,-102,476,732),9792=>array(77,-125,583,731),9793=>array(77,-14,583,843),9794=>array(71,-14,748,720),9795=>array(149,0,657,730),9796=>array(197,0,609,730),9797=>array(109,0,697,730),9798=>array(114,0,692,730),9799=>array(216,0,590,730),9800=>array(41,0,766,731),9801=>array(80,0,727,730),9802=>array(84,0,722,731),9803=>array(101,31,706,679),9804=>array(125,0,681,730),9805=>array(48,-180,759,730),9806=>array(75,52,732,653),9807=>array(30,-96,777,730),9808=>array(74,-0,732,730),9809=>array(84,0,722,730),9810=>array(77,153,729,579),9811=>array(141,0,666,730),9812=>array(88,0,719,730),9813=>array(99,0,708,730),9814=>array(149,-1,657,729),9815=>array(192,0,615,730),9816=>array(148,0,659,730),9817=>array(133,-0,673,730),9818=>array(88,0,719,730),9819=>array(99,0,708,730),9820=>array(149,-1,657,729),9821=>array(192,0,615,730),9822=>array(146,0,661,730),9823=>array(133,-0,673,730),9824=>array(142,0,665,729),9825=>array(81,0,726,727),9826=>array(151,0,655,729),9827=>array(100,0,707,729),9828=>array(141,0,666,729),9829=>array(80,0,728,729),9830=>array(151,0,655,729),9831=>array(100,0,707,732),9832=>array(95,-1,712,729),9833=>array(75,-5,306,729),9834=>array(75,-5,499,729),9835=>array(165,-102,642,729),9836=>array(83,-5,724,729),9837=>array(79,-3,353,731),9838=>array(75,0,246,731),9839=>array(76,0,360,731),9840=>array(75,0,598,731),9841=>array(58,0,631,731),9842=>array(75,0,732,709),9843=>array(68,16,738,731),9844=>array(68,16,738,731),9845=>array(68,16,738,731),9846=>array(68,16,738,731),9847=>array(68,16,738,731),9848=>array(68,16,738,731),9849=>array(68,16,738,731),9850=>array(68,16,738,731),9851=>array(75,0,731,704),9852=>array(75,0,733,731),9853=>array(75,0,733,731),9854=>array(75,0,733,731),9855=>array(134,1,672,731),9856=>array(66,0,717,725),9857=>array(66,0,717,725),9858=>array(66,0,717,725),9859=>array(66,0,717,725),9860=>array(66,0,717,725),9861=>array(66,0,717,725),9862=>array(75,0,726,724),9863=>array(75,0,727,724),9864=>array(75,0,727,724),9865=>array(75,0,727,724),9866=>array(75,0,726,98),9867=>array(75,0,726,98),9868=>array(75,0,726,411),9869=>array(75,0,726,411),9870=>array(75,0,726,411),9871=>array(75,0,726,411),9872=>array(71,3,571,724),9873=>array(71,3,571,724),9874=>array(47,0,753,724),9875=>array(54,-10,681,725),9876=>array(40,0,605,722),9877=>array(55,-10,428,725),9878=>array(37,-10,730,725),9879=>array(44,0,734,725),9880=>array(38,0,578,725),9881=>array(85,-17,722,727),9882=>array(33,-9,604,726),9883=>array(114,0,687,721),9884=>array(114,0,686,722),9888=>array(44,0,756,721),9889=>array(75,2,558,730),9890=>array(77,-125,827,731),9891=>array(71,-206,921,720),9892=>array(77,-186,998,856),9893=>array(77,-125,753,917),9894=>array(118,-14,654,869),9895=>array(91,-170,667,884),9896=>array(168,-14,585,869),9897=>array(4,133,746,596),9898=>array(168,133,585,597),9899=>array(168,133,585,597),9900=>array(224,194,531,536),9901=>array(158,194,597,536),9902=>array(37,169,717,560),9903=>array(4,194,750,536),9904=>array(92,237,681,540),9905=>array(190,42,564,698),9906=>array(77,-125,583,731),9907=>array(151,-125,582,731),9908=>array(77,-125,582,731),9909=>array(77,-125,582,731),9910=>array(53,-118,712,643),9911=>array(175,-104,536,710),9912=>array(142,-125,489,731),9920=>array(38,4,716,553),9921=>array(38,4,716,724),9922=>array(38,4,716,553),9923=>array(38,4,716,724),9954=>array(77,-14,583,843),9985=>array(9,190,723,635),9986=>array(38,141,706,588),9987=>array(9,94,723,539),9988=>array(32,119,742,613),9990=>array(38,-14,716,742),9991=>array(38,-14,716,742),9992=>array(53,21,704,708),9993=>array(58,107,696,622),9996=>array(191,0,505,742),9997=>array(19,83,722,678),9998=>array(80,75,652,710),9999=>array(23,198,738,530),10000=>array(80,75,652,710),10001=>array(39,185,681,544),10002=>array(61,209,681,520),10003=>array(135,97,601,630),10004=>array(104,87,649,631),10005=>array(114,72,641,657),10006=>array(77,31,677,698),10007=>array(105,-9,631,732),10008=>array(110,0,679,739),10009=>array(49,0,705,729),10010=>array(49,0,705,729),10011=>array(49,0,705,729),10012=>array(49,0,705,729),10013=>array(148,0,606,729),10014=>array(118,0,610,729),10015=>array(140,0,615,729),10016=>array(49,0,705,729),10017=>array(82,-13,672,744),10018=>array(37,-14,717,742),10019=>array(38,-12,716,742),10020=>array(36,-14,718,742),10021=>array(37,-13,717,743),10022=>array(38,-14,717,745),10023=>array(38,-14,717,745),10025=>array(21,-9,733,743),10026=>array(38,-14,716,742),10027=>array(21,-9,733,743),10028=>array(21,-9,733,743),10029=>array(21,-9,733,743),10030=>array(21,-9,733,743),10031=>array(21,-9,733,743),10032=>array(22,12,734,714),10033=>array(58,0,696,729),10034=>array(66,0,688,729),10035=>array(49,0,705,729),10036=>array(28,-14,708,742),10037=>array(37,-14,717,742),10038=>array(82,-14,672,742),10039=>array(37,-14,717,742),10040=>array(37,-14,717,742),10041=>array(37,-14,717,742),10042=>array(49,0,705,729),10043=>array(73,-14,681,742),10044=>array(73,-14,681,742),10045=>array(76,-14,678,742),10046=>array(71,-14,683,742),10047=>array(48,0,706,709),10048=>array(48,0,706,709),10049=>array(37,-14,717,742),10050=>array(38,-14,716,742),10051=>array(71,-14,683,742),10052=>array(80,0,674,729),10053=>array(68,0,686,729),10054=>array(57,2,696,729),10055=>array(70,-13,684,742),10056=>array(42,-13,712,730),10057=>array(42,-13,712,730),10058=>array(37,-13,717,743),10059=>array(37,-13,717,743),10061=>array(44,-10,762,738),10063=>array(53,-49,753,729),10064=>array(53,0,753,777),10065=>array(53,-49,753,729),10066=>array(53,0,753,777),10070=>array(75,-2,732,728),10072=>array(339,-240,415,760),10073=>array(302,-240,452,760),10074=>array(228,-240,527,760),10075=>array(76,395,237,729),10076=>array(53,395,214,729),10077=>array(76,395,432,729),10078=>array(53,395,408,729),10081=>array(140,-93,695,851),10082=>array(182,-17,572,742),10083=>array(146,-17,607,742),10084=>array(48,83,706,645),10085=>array(151,-1,656,729),10086=>array(55,21,652,702),10087=>array(70,169,684,564),10088=>array(176,-139,583,769),10089=>array(176,-139,583,769),10090=>array(237,-132,517,758),10091=>array(237,-132,517,758),10092=>array(193,-240,546,760),10093=>array(208,-240,561,760),10094=>array(127,-240,617,760),10095=>array(137,-240,626,760),10096=>array(149,-240,590,760),10097=>array(165,-240,605,760),10098=>array(311,-241,482,760),10099=>array(272,-241,443,760),10100=>array(157,-163,571,760),10101=>array(183,-163,597,760),10102=>array(66,-10,740,738),10103=>array(66,-10,740,738),10104=>array(66,-10,740,738),10105=>array(66,-10,740,738),10106=>array(66,-10,740,738),10107=>array(66,-10,740,738),10108=>array(66,-10,740,738),10109=>array(66,-10,740,738),10110=>array(66,-10,740,738),10111=>array(66,-10,740,738),10112=>array(4,-52,750,780),10113=>array(4,-52,750,780),10114=>array(4,-52,750,780),10115=>array(4,-52,750,780),10116=>array(4,-52,750,780),10117=>array(4,-52,750,780),10118=>array(4,-52,750,780),10119=>array(4,-52,750,780),10120=>array(4,-52,750,780),10121=>array(4,-52,750,780),10122=>array(4,-52,750,780),10123=>array(4,-52,750,780),10124=>array(4,-52,750,780),10125=>array(4,-52,750,780),10126=>array(4,-52,750,780),10127=>array(4,-52,750,780),10128=>array(4,-52,750,780),10129=>array(4,-52,750,780),10130=>array(4,-52,750,780),10131=>array(4,-52,750,780),10132=>array(51,75,710,552),10136=>array(110,55,614,614),10137=>array(51,100,710,527),10138=>array(110,13,614,572),10139=>array(51,129,710,498),10140=>array(51,57,688,570),10141=>array(51,100,710,527),10142=>array(51,100,710,527),10143=>array(51,100,710,527),10144=>array(51,100,710,527),10145=>array(51,65,730,562),10146=>array(100,94,710,533),10147=>array(100,94,710,533),10148=>array(100,-4,710,631),10149=>array(51,100,710,548),10150=>array(51,79,710,527),10151=>array(216,-7,545,634),10152=>array(51,100,710,527),10153=>array(51,75,688,552),10154=>array(51,75,688,552),10155=>array(19,12,715,586),10156=>array(19,12,715,586),10157=>array(122,0,697,574),10158=>array(122,0,697,574),10159=>array(56,49,719,574),10161=>array(56,49,719,574),10162=>array(139,-20,649,585),10163=>array(57,157,710,470),10164=>array(72,55,614,655),10165=>array(51,173,710,454),10166=>array(73,-29,614,572),10167=>array(73,55,614,655),10168=>array(51,172,710,455),10169=>array(73,-28,614,572),10170=>array(50,84,710,543),10171=>array(66,140,702,487),10172=>array(71,167,697,460),10173=>array(71,118,697,509),10174=>array(51,81,710,546),10181=>array(0,-163,339,769),10182=>array(-47,-163,355,769),10208=>array(2,-233,442,807),10214=>array(-0,-132,437,760),10215=>array(-1,-132,436,760),10216=>array(80,-132,357,759),10217=>array(-6,-132,271,759),10218=>array(80,-132,507,759),10219=>array(-6,-132,420,759),10224=>array(40,0,715,732),10225=>array(39,-3,714,729),10226=>array(-16,53,683,659),10227=>array(35,61,733,666),10228=>array(51,-14,998,643),10229=>array(44,100,1239,527),10230=>array(51,100,1247,527),10231=>array(44,100,1247,527),10232=>array(44,100,1239,527),10233=>array(51,100,1247,527),10234=>array(44,100,1247,527),10235=>array(44,100,1239,527),10236=>array(51,100,1247,527),10237=>array(44,100,1239,527),10238=>array(51,100,1247,527),10239=>array(51,100,1247,527),10241=>array(132,635,264,781),10242=>array(132,358,264,505),10243=>array(132,358,264,781),10244=>array(132,81,264,228),10245=>array(132,81,264,781),10246=>array(132,81,264,505),10247=>array(132,81,264,781),10248=>array(396,635,527,781),10249=>array(132,635,527,781),10250=>array(132,358,527,781),10251=>array(132,358,527,781),10252=>array(132,81,527,781),10253=>array(132,81,527,781),10254=>array(132,81,527,781),10255=>array(132,81,527,781),10256=>array(396,358,527,505),10257=>array(132,358,527,781),10258=>array(132,358,527,505),10259=>array(132,358,527,781),10260=>array(132,81,527,505),10261=>array(132,81,527,781),10262=>array(132,81,527,505),10263=>array(132,81,527,781),10264=>array(396,358,527,781),10265=>array(132,358,527,781),10266=>array(132,358,527,781),10267=>array(132,358,527,781),10268=>array(132,81,527,781),10269=>array(132,81,527,781),10270=>array(132,81,527,781),10271=>array(132,81,527,781),10272=>array(396,81,527,228),10273=>array(132,81,527,781),10274=>array(132,81,527,505),10275=>array(132,81,527,781),10276=>array(132,81,527,228),10277=>array(132,81,527,781),10278=>array(132,81,527,505),10279=>array(132,81,527,781),10280=>array(396,81,527,781),10281=>array(132,81,527,781),10282=>array(132,81,527,781),10283=>array(132,81,527,781),10284=>array(132,81,527,781),10285=>array(132,81,527,781),10286=>array(132,81,527,781),10287=>array(132,81,527,781),10288=>array(396,81,527,505),10289=>array(132,81,527,781),10290=>array(132,81,527,505),10291=>array(132,81,527,781),10292=>array(132,81,527,505),10293=>array(132,81,527,781),10294=>array(132,81,527,505),10295=>array(132,81,527,781),10296=>array(396,81,527,781),10297=>array(132,81,527,781),10298=>array(132,81,527,781),10299=>array(132,81,527,781),10300=>array(132,81,527,781),10301=>array(132,81,527,781),10302=>array(132,81,527,781),10303=>array(132,81,527,781),10304=>array(132,-195,264,-49),10305=>array(132,-195,264,781),10306=>array(132,-195,264,505),10307=>array(132,-195,264,781),10308=>array(132,-195,264,228),10309=>array(132,-195,264,781),10310=>array(132,-195,264,505),10311=>array(132,-195,264,781),10312=>array(132,-195,527,781),10313=>array(132,-195,527,781),10314=>array(132,-195,527,781),10315=>array(132,-195,527,781),10316=>array(132,-195,527,781),10317=>array(132,-195,527,781),10318=>array(132,-195,527,781),10319=>array(132,-195,527,781),10320=>array(132,-195,527,505),10321=>array(132,-195,527,781),10322=>array(132,-195,527,505),10323=>array(132,-195,527,781),10324=>array(132,-195,527,505),10325=>array(132,-195,527,781),10326=>array(132,-195,527,505),10327=>array(132,-195,527,781),10328=>array(132,-195,527,781),10329=>array(132,-195,527,781),10330=>array(132,-195,527,781),10331=>array(132,-195,527,781),10332=>array(132,-195,527,781),10333=>array(132,-195,527,781),10334=>array(132,-195,527,781),10335=>array(132,-195,527,781),10336=>array(132,-195,527,228),10337=>array(132,-195,527,781),10338=>array(132,-195,527,505),10339=>array(132,-195,527,781),10340=>array(132,-195,527,228),10341=>array(132,-195,527,781),10342=>array(132,-195,527,505),10343=>array(132,-195,527,781),10344=>array(132,-195,527,781),10345=>array(132,-195,527,781),10346=>array(132,-195,527,781),10347=>array(132,-195,527,781),10348=>array(132,-195,527,781),10349=>array(132,-195,527,781),10350=>array(132,-195,527,781),10351=>array(132,-195,527,781),10352=>array(132,-195,527,505),10353=>array(132,-195,527,781),10354=>array(132,-195,527,505),10355=>array(132,-195,527,781),10356=>array(132,-195,527,505),10357=>array(132,-195,527,781),10358=>array(132,-195,527,505),10359=>array(132,-195,527,781),10360=>array(132,-195,527,781),10361=>array(132,-195,527,781),10362=>array(132,-195,527,781),10363=>array(132,-195,527,781),10364=>array(132,-195,527,781),10365=>array(132,-195,527,781),10366=>array(132,-195,527,781),10367=>array(132,-195,527,781),10368=>array(396,-195,527,-49),10369=>array(132,-195,527,781),10370=>array(132,-195,527,505),10371=>array(132,-195,527,781),10372=>array(132,-195,527,228),10373=>array(132,-195,527,781),10374=>array(132,-195,527,505),10375=>array(132,-195,527,781),10376=>array(396,-195,527,781),10377=>array(132,-195,527,781),10378=>array(132,-195,527,781),10379=>array(132,-195,527,781),10380=>array(132,-195,527,781),10381=>array(132,-195,527,781),10382=>array(132,-195,527,781),10383=>array(132,-195,527,781),10384=>array(396,-195,527,505),10385=>array(132,-195,527,781),10386=>array(132,-195,527,505),10387=>array(132,-195,527,781),10388=>array(132,-195,527,505),10389=>array(132,-195,527,781),10390=>array(132,-195,527,505),10391=>array(132,-195,527,781),10392=>array(396,-195,527,781),10393=>array(132,-195,527,781),10394=>array(132,-195,527,781),10395=>array(132,-195,527,781),10396=>array(132,-195,527,781),10397=>array(132,-195,527,781),10398=>array(132,-195,527,781),10399=>array(132,-195,527,781),10400=>array(396,-195,527,228),10401=>array(132,-195,527,781),10402=>array(132,-195,527,505),10403=>array(132,-195,527,781),10404=>array(132,-195,527,228),10405=>array(132,-195,527,781),10406=>array(132,-195,527,505),10407=>array(132,-195,527,781),10408=>array(396,-195,527,781),10409=>array(132,-195,527,781),10410=>array(132,-195,527,781),10411=>array(132,-195,527,781),10412=>array(132,-195,527,781),10413=>array(132,-195,527,781),10414=>array(132,-195,527,781),10415=>array(132,-195,527,781),10416=>array(396,-195,527,505),10417=>array(132,-195,527,781),10418=>array(132,-195,527,505),10419=>array(132,-195,527,781),10420=>array(132,-195,527,505),10421=>array(132,-195,527,781),10422=>array(132,-195,527,505),10423=>array(132,-195,527,781),10424=>array(396,-195,527,781),10425=>array(132,-195,527,781),10426=>array(132,-195,527,781),10427=>array(132,-195,527,781),10428=>array(132,-195,527,781),10429=>array(132,-195,527,781),10430=>array(132,-195,527,781),10431=>array(132,-195,527,781),10432=>array(132,-195,527,-49),10433=>array(132,-195,527,781),10434=>array(132,-195,527,505),10435=>array(132,-195,527,781),10436=>array(132,-195,527,228),10437=>array(132,-195,527,781),10438=>array(132,-195,527,505),10439=>array(132,-195,527,781),10440=>array(132,-195,527,781),10441=>array(132,-195,527,781),10442=>array(132,-195,527,781),10443=>array(132,-195,527,781),10444=>array(132,-195,527,781),10445=>array(132,-195,527,781),10446=>array(132,-195,527,781),10447=>array(132,-195,527,781),10448=>array(132,-195,527,505),10449=>array(132,-195,527,781),10450=>array(132,-195,527,505),10451=>array(132,-195,527,781),10452=>array(132,-195,527,505),10453=>array(132,-195,527,781),10454=>array(132,-195,527,505),10455=>array(132,-195,527,781),10456=>array(132,-195,527,781),10457=>array(132,-195,527,781),10458=>array(132,-195,527,781),10459=>array(132,-195,527,781),10460=>array(132,-195,527,781),10461=>array(132,-195,527,781),10462=>array(132,-195,527,781),10463=>array(132,-195,527,781),10464=>array(132,-195,527,228),10465=>array(132,-195,527,781),10466=>array(132,-195,527,505),10467=>array(132,-195,527,781),10468=>array(132,-195,527,228),10469=>array(132,-195,527,781),10470=>array(132,-195,527,505),10471=>array(132,-195,527,781),10472=>array(132,-195,527,781),10473=>array(132,-195,527,781),10474=>array(132,-195,527,781),10475=>array(132,-195,527,781),10476=>array(132,-195,527,781),10477=>array(132,-195,527,781),10478=>array(132,-195,527,781),10479=>array(132,-195,527,781),10480=>array(132,-195,527,505),10481=>array(132,-195,527,781),10482=>array(132,-195,527,505),10483=>array(132,-195,527,781),10484=>array(132,-195,527,505),10485=>array(132,-195,527,781),10486=>array(132,-195,527,505),10487=>array(132,-195,527,781),10488=>array(132,-195,527,781),10489=>array(132,-195,527,781),10490=>array(132,-195,527,781),10491=>array(132,-195,527,781),10492=>array(132,-195,527,781),10493=>array(132,-195,527,781),10494=>array(132,-195,527,781),10495=>array(132,-195,527,781),10502=>array(44,100,703,527),10503=>array(51,100,710,527),10506=>array(112,0,642,732),10507=>array(112,-3,642,729),10560=>array(35,63,580,838),10561=>array(35,63,580,838),10627=>array(106,-163,629,760),10628=>array(31,-163,554,760),10702=>array(95,-226,659,747),10703=>array(95,15,805,612),10704=>array(95,15,805,612),10705=>array(95,-30,805,657),10706=>array(95,-30,805,657),10707=>array(95,-30,805,657),10708=>array(95,-30,805,657),10709=>array(95,-30,805,657),10731=>array(2,-233,442,807),10746=>array(95,0,659,627),10747=>array(95,0,659,627),10752=>array(25,-198,875,748),10753=>array(25,-198,875,748),10754=>array(25,-198,875,748),10764=>array(51,-212,1142,757),10765=>array(51,-212,418,757),10766=>array(51,-212,418,757),10767=>array(51,-212,418,757),10768=>array(51,-212,418,757),10769=>array(51,-212,470,757),10770=>array(51,-212,418,757),10771=>array(51,-212,418,757),10772=>array(51,-212,500,757),10773=>array(51,-212,418,757),10774=>array(51,-212,418,757),10775=>array(-29,-212,498,757),10776=>array(51,-212,418,757),10777=>array(51,-212,418,757),10778=>array(51,-212,418,757),10779=>array(51,-212,422,872),10780=>array(47,-327,417,757),10799=>array(123,31,631,596),10858=>array(95,228,659,552),10859=>array(95,78,659,552),10877=>array(95,-123,659,581),10878=>array(95,-123,659,581),10879=>array(95,-123,660,581),10880=>array(95,-123,659,581),10881=>array(95,-123,659,644),10882=>array(95,-123,659,644),10883=>array(95,-123,660,759),10884=>array(95,-123,659,756),10885=>array(95,-132,659,663),10886=>array(95,-132,659,663),10887=>array(95,-121,659,582),10888=>array(95,-121,659,582),10889=>array(95,-204,659,663),10890=>array(95,-204,659,663),10891=>array(95,-311,659,791),10892=>array(95,-311,659,791),10893=>array(95,-125,659,663),10894=>array(95,-125,659,663),10895=>array(95,-241,659,756),10896=>array(95,-241,659,756),10897=>array(95,-229,659,730),10898=>array(95,-229,659,730),10899=>array(95,-224,659,741),10900=>array(95,-224,659,741),10901=>array(95,-61,659,644),10902=>array(95,-61,659,644),10903=>array(95,-61,660,644),10904=>array(95,-61,659,644),10905=>array(96,-36,659,685),10906=>array(96,-36,659,685),10907=>array(95,-31,659,725),10908=>array(95,-31,659,725),10909=>array(95,8,659,645),10910=>array(95,23,659,645),10911=>array(95,-176,659,729),10912=>array(95,-176,659,729),10926=>array(95,50,659,601),10927=>array(95,-24,659,667),10928=>array(95,-24,659,667),10929=>array(95,-145,659,667),10930=>array(95,-145,659,667),10931=>array(95,-121,659,662),10932=>array(95,-121,659,662),10933=>array(95,-195,659,662),10934=>array(95,-195,659,662),10935=>array(95,-191,659,693),10936=>array(95,-191,659,693),10937=>array(95,-259,659,693),10938=>array(95,-259,659,693),11001=>array(95,-171,659,585),11002=>array(95,-171,659,585),11008=>array(79,-27,633,587),11009=>array(126,-27,680,587),11010=>array(79,25,633,640),11011=>array(126,25,680,640),11012=>array(24,65,710,562),11013=>array(24,65,703,562),11014=>array(154,0,601,754),11015=>array(154,-25,601,729),11016=>array(79,-27,633,587),11017=>array(126,-27,680,587),11018=>array(79,25,633,640),11019=>array(126,25,680,640),11020=>array(24,65,710,562),11021=>array(154,-25,601,754),11022=>array(51,-3,711,355),11023=>array(51,272,711,630),11024=>array(31,-3,691,355),11025=>array(31,272,691,630),11026=>array(82,-124,769,643),11027=>array(82,-124,769,643),11028=>array(82,-124,769,643),11029=>array(82,-124,769,643),11030=>array(2,-124,690,643),11031=>array(2,-124,690,643),11032=>array(2,-124,690,643),11033=>array(2,-124,690,643),11034=>array(82,-124,769,643),11039=>array(16,-26,767,767),11040=>array(16,-26,767,767),11041=>array(66,-91,720,748),11042=>array(66,-91,720,748),11043=>array(15,-35,771,692),11044=>array(49,-250,958,770),11091=>array(34,-47,749,788),11092=>array(34,-47,749,788),11360=>array(-12,0,448,729),11361=>array(-15,0,262,760),11362=>array(-28,0,448,729),11363=>array(23,0,538,729),11364=>array(51,-200,557,729),11365=>array(-18,-46,568,592),11366=>array(-91,-93,426,822),11367=>array(38,-157,666,729),11368=>array(27,-138,534,760),11369=>array(38,-157,664,729),11370=>array(27,-138,549,760),11371=>array(-10,-157,644,729),11372=>array(3,-138,494,547),11373=>array(50,-14,679,743),11374=>array(42,-200,770,729),11375=>array(134,0,736,729),11376=>array(-13,-14,625,743),11377=>array(123,0,731,560),11378=>array(157,0,1121,742),11379=>array(133,0,936,560),11380=>array(35,0,550,586),11381=>array(24,0,511,729),11382=>array(37,0,438,547),11383=>array(49,-12,543,551),11385=>array(-66,-13,321,760),11386=>array(50,-14,502,560),11387=>array(43,0,456,547),11388=>array(-58,-117,152,425),11389=>array(40,326,419,734),11390=>array(23,-242,562,742),11391=>array(-2,-242,651,729),11520=>array(55,-63,521,547),11521=>array(1,-235,539,546),11522=>array(15,-235,493,546),11523=>array(60,-10,573,807),11524=>array(41,-235,514,546),11525=>array(22,-236,806,546),11526=>array(53,-8,548,816),11527=>array(42,0,841,546),11528=>array(69,0,518,546),11529=>array(40,-235,531,816),11530=>array(22,0,843,546),11531=>array(45,-8,574,816),11532=>array(22,0,521,816),11533=>array(40,0,837,546),11534=>array(40,0,539,546),11535=>array(79,-235,721,816),11536=>array(40,0,823,816),11537=>array(40,0,529,816),11538=>array(31,-235,507,546),11539=>array(40,-235,836,661),11540=>array(55,-235,827,546),11541=>array(37,-235,738,816),11542=>array(22,0,521,546),11543=>array(40,-235,539,547),11544=>array(13,-235,534,546),11545=>array(24,-235,518,816),11546=>array(27,-235,503,547),11547=>array(55,-9,575,816),11548=>array(22,-235,813,547),11549=>array(-6,-235,505,546),11550=>array(33,-235,531,546),11551=>array(9,-235,531,567),11552=>array(22,0,826,546),11553=>array(36,-235,521,816),11554=>array(54,0,511,626),11555=>array(55,-235,536,816),11556=>array(40,-235,581,546),11557=>array(53,-8,789,816),11800=>array(33,-13,383,729),11807=>array(95,78,659,399),11810=>array(114,314,378,760),11811=>array(110,314,308,760),11812=>array(36,-132,234,314),11813=>array(-35,-132,230,314),11822=>array(99,0,470,742),19904=>array(75,-158,726,729),19905=>array(75,-158,726,729),19906=>array(75,-158,726,729),19907=>array(75,-158,726,729),19908=>array(75,-158,726,729),19909=>array(75,-158,726,729),19910=>array(75,-158,726,729),19911=>array(75,-158,726,729),19912=>array(75,-158,726,729),19913=>array(75,-158,727,729),19914=>array(75,-158,726,729),19915=>array(75,-158,726,729),19916=>array(75,-158,726,729),19917=>array(75,-158,726,729),19918=>array(75,-158,726,729),19919=>array(75,-158,726,729),19920=>array(75,-158,727,729),19921=>array(75,-158,726,729),19922=>array(75,-158,727,729),19923=>array(75,-158,726,729),19924=>array(75,-158,726,729),19925=>array(75,-158,726,729),19926=>array(75,-158,726,729),19927=>array(75,-158,726,729),19928=>array(75,-158,726,729),19929=>array(75,-158,726,729),19930=>array(75,-158,726,729),19931=>array(75,-158,727,729),19932=>array(75,-158,726,729),19933=>array(75,-158,726,729),19934=>array(75,-158,727,729),19935=>array(75,-158,726,729),19936=>array(75,-158,726,729),19937=>array(75,-158,726,729),19938=>array(75,-158,726,729),19939=>array(75,-158,726,729),19940=>array(75,-158,726,729),19941=>array(75,-158,727,729),19942=>array(75,-158,726,729),19943=>array(75,-158,726,729),19944=>array(75,-158,727,729),19945=>array(75,-158,726,729),19946=>array(75,-158,727,729),19947=>array(75,-158,726,729),19948=>array(75,-158,727,729),19949=>array(75,-158,726,729),19950=>array(75,-158,727,729),19951=>array(75,-158,726,729),19952=>array(75,-158,727,729),19953=>array(75,-158,726,729),19954=>array(75,-158,726,729),19955=>array(75,-158,726,729),19956=>array(75,-158,726,729),19957=>array(75,-158,727,729),19958=>array(75,-158,726,729),19959=>array(75,-158,726,729),19960=>array(75,-158,726,729),19961=>array(75,-158,727,729),19962=>array(75,-158,726,729),19963=>array(75,-158,727,729),19964=>array(75,-158,727,729),19965=>array(75,-158,726,729),19966=>array(75,-158,726,729),19967=>array(75,-158,726,729),42192=>array(24,0,563,729),42193=>array(24,0,541,729),42194=>array(5,0,519,729),42195=>array(24,0,650,729),42196=>array(39,0,608,729),42197=>array(-66,0,503,729),42198=>array(40,-14,653,742),42199=>array(24,0,650,729),42200=>array(-60,0,566,729),42201=>array(5,-14,500,729),42202=>array(38,-14,625,742),42203=>array(56,-14,644,742),42204=>array(-20,0,633,729),42205=>array(24,0,528,729),42206=>array(24,0,528,729),42207=>array(24,0,752,729),42208=>array(24,0,649,729),42209=>array(24,0,448,729),42210=>array(5,-14,543,742),42211=>array(24,0,541,729),42212=>array(86,0,601,729),42213=>array(-57,0,545,729),42214=>array(70,0,668,729),42215=>array(24,0,653,729),42216=>array(42,-14,655,742),42217=>array(23,0,518,743),42218=>array(86,0,918,729),42219=>array(-39,0,633,729),42220=>array(57,0,608,729),42221=>array(59,0,593,729),42222=>array(-48,0,554,729),42223=>array(134,0,736,729),42224=>array(24,0,567,729),42225=>array(1,0,544,729),42226=>array(24,0,242,729),42227=>array(36,-14,672,742),42228=>array(52,-14,642,729),42229=>array(13,0,595,743),42230=>array(53,0,476,729),42231=>array(50,0,666,729),42232=>array(63,0,207,155),42233=>array(37,-156,220,155),42234=>array(63,0,474,155),42235=>array(63,-156,487,155),42236=>array(5,-156,252,517),42237=>array(31,0,238,517),42238=>array(93,0,483,354),42239=>array(52,172,477,454),42564=>array(1,-14,522,742),42565=>array(9,-14,426,560),42566=>array(68,0,263,729),42567=>array(71,0,232,547),42572=>array(32,-14,1009,645),42573=>array(55,-14,862,471),42576=>array(75,0,902,729),42577=>array(62,0,779,547),42580=>array(41,-14,943,742),42581=>array(41,-14,721,560),42582=>array(29,0,825,729),42583=>array(37,-14,703,560),42594=>array(-33,-157,981,729),42595=>array(-13,-138,837,547),42596=>array(-27,0,971,729),42597=>array(-15,0,814,547),42598=>array(24,0,1072,729),42599=>array(34,0,911,547),42600=>array(36,-14,672,742),42601=>array(41,-14,510,560),42602=>array(50,-14,720,742),42603=>array(49,-14,592,560),42604=>array(50,-14,1172,742),42605=>array(49,-14,868,560),42606=>array(25,-208,766,743),42634=>array(39,-200,651,729),42635=>array(62,-208,568,547),42636=>array(39,0,608,729),42637=>array(62,0,546,547),42644=>array(107,0,601,729),42645=>array(15,0,485,760),42760=>array(141,0,409,668),42761=>array(114,0,409,668),42762=>array(88,0,409,668),42763=>array(62,0,409,668),42764=>array(35,0,409,668),42765=>array(35,0,409,668),42766=>array(35,0,382,668),42767=>array(35,0,356,668),42768=>array(35,0,330,668),42769=>array(35,0,303,668),42770=>array(35,0,409,668),42771=>array(35,0,382,668),42772=>array(35,0,356,668),42773=>array(35,0,330,668),42774=>array(35,0,303,668),42779=>array(62,326,305,736),42780=>array(27,324,271,734),42781=>array(50,326,178,734),42782=>array(50,326,178,734),42783=>array(50,0,178,408),42786=>array(27,0,336,729),42787=>array(34,0,302,547),42788=>array(49,224,416,742),42789=>array(49,42,416,560),42790=>array(42,-200,670,729),42791=>array(33,-208,504,760),42792=>array(65,-213,749,729),42793=>array(65,-213,600,702),42794=>array(109,-14,609,742),42795=>array(8,-199,452,561),42800=>array(34,0,441,547),42801=>array(10,-14,450,560),42802=>array(-57,0,1054,729),42803=>array(34,-14,812,560),42804=>array(-48,-14,1061,742),42805=>array(37,-14,859,560),42806=>array(-48,-14,1022,729),42807=>array(37,-14,856,560),42808=>array(-57,0,931,729),42809=>array(34,-14,757,560),42810=>array(-57,0,931,729),42811=>array(34,-14,757,560),42812=>array(-39,-208,938,729),42813=>array(51,-208,774,560),42814=>array(56,-14,644,742),42815=>array(2,-14,444,560),42816=>array(24,0,650,729),42817=>array(31,0,551,760),42822=>array(83,0,558,729),42823=>array(75,0,276,760),42824=>array(46,0,470,729),42825=>array(81,0,374,760),42826=>array(0,-14,730,742),42827=>array(0,-14,634,560),42830=>array(50,-14,1172,742),42831=>array(49,-14,868,560),42832=>array(-38,0,542,729),42833=>array(-75,-208,530,560),42834=>array(-4,0,660,729),42835=>array(-13,-208,656,560),42838=>array(40,-178,666,742),42839=>array(42,-208,538,560),42852=>array(24,0,521,729),42853=>array(-5,-208,528,760),42854=>array(-51,0,521,729),42855=>array(-77,-208,528,760),42880=>array(54,0,477,729),42881=>array(19,-208,232,560),42882=>array(-13,-208,597,742),42883=>array(-5,-208,510,560),42889=>array(46,0,230,517),42890=>array(55,161,293,380),42891=>array(121,235,288,729),42892=>array(63,458,185,729),42893=>array(98,0,593,729),42894=>array(37,-208,375,760),42896=>array(24,-157,649,729),42897=>array(31,-138,521,560),42912=>array(-8,-14,710,742),42913=>array(-7,-208,578,560),42914=>array(-6,0,650,729),42915=>array(-5,0,551,760),42916=>array(-8,0,681,729),42917=>array(-7,0,578,560),42918=>array(-6,0,632,729),42919=>array(-2,0,417,560),42920=>array(-5,-14,577,742),42921=>array(-4,-14,473,560),42922=>array(46,0,760,729),43002=>array(34,0,790,547),43003=>array(77,0,493,729),43004=>array(56,0,519,729),43005=>array(24,0,752,729),43006=>array(7,0,259,928),43007=>array(-34,0,1114,729),61184=>array(132,602,349,668),61185=>array(92,451,367,668),61186=>array(50,301,384,668),61187=>array(16,150,390,668),61188=>array(-19,0,389,668),61189=>array(110,451,340,668),61190=>array(105,451,323,518),61191=>array(66,301,340,518),61192=>array(23,150,357,518),61193=>array(-11,0,364,518),61194=>array(99,301,331,668),61195=>array(84,301,314,518),61196=>array(79,301,296,367),61197=>array(40,150,314,367),61198=>array(-3,0,331,367),61199=>array(95,150,311,668),61200=>array(73,150,305,518),61201=>array(58,150,288,367),61202=>array(53,150,270,217),61203=>array(13,0,288,217),61204=>array(93,0,288,668),61205=>array(68,0,285,518),61206=>array(46,0,278,367),61207=>array(31,0,261,217),61208=>array(27,0,244,66),61209=>array(35,0,212,668),62464=>array(83,-15,523,828),62465=>array(89,-15,520,828),62466=>array(85,-15,560,837),62467=>array(123,0,850,837),62468=>array(78,-15,586,837),62469=>array(80,-15,565,837),62470=>array(126,-15,584,837),62471=>array(86,-15,841,837),62472=>array(106,0,548,837),62473=>array(79,-15,591,828),62474=>array(137,0,1104,837),62475=>array(80,-15,581,837),62476=>array(86,-15,577,828),62477=>array(101,0,830,837),62478=>array(77,-15,563,828),62479=>array(87,-15,622,844),62480=>array(98,0,835,837),62481=>array(96,-15,518,828),62482=>array(96,-15,688,837),62483=>array(71,-15,579,837),62484=>array(132,-15,844,837),62485=>array(78,-15,619,828),62486=>array(114,-15,859,837),62487=>array(73,-15,618,829),62488=>array(81,-15,589,837),62489=>array(44,0,535,837),62490=>array(86,-15,621,828),62491=>array(85,-15,618,828),62492=>array(92,-15,629,837),62493=>array(78,-15,620,828),62494=>array(92,-15,527,828),62495=>array(30,-15,520,837),62496=>array(80,-15,571,837),62497=>array(82,-15,579,837),62498=>array(20,-79,566,836),62499=>array(77,-15,620,838),62500=>array(77,-15,626,837),62501=>array(75,-15,632,837),62502=>array(124,-15,911,837),62504=>array(54,-235,809,816),62505=>array(46,-230,714,853),62506=>array(69,-15,491,765),62507=>array(69,-15,483,777),62508=>array(69,-15,497,875),62509=>array(69,-15,489,818),62510=>array(69,-15,480,887),62511=>array(69,-15,497,809),62512=>array(25,-236,513,765),62513=>array(25,-236,516,799),62514=>array(25,-236,518,901),62515=>array(25,-236,514,809),62516=>array(84,0,504,765),62517=>array(84,0,516,799),62518=>array(84,0,514,809),62519=>array(86,-0,707,765),62520=>array(86,-0,707,777),62521=>array(86,-0,707,895),62522=>array(86,-0,707,799),62523=>array(86,-0,707,809),62524=>array(49,-236,501,765),62525=>array(49,-236,501,777),62526=>array(49,-236,525,904),62527=>array(49,-236,501,799),62528=>array(49,-236,510,809),62529=>array(49,-236,501,852),63173=>array(24,-14,518,760),64256=>array(61,0,733,760),64257=>array(61,0,577,760),64258=>array(61,0,577,760),64259=>array(61,0,882,760),64260=>array(61,0,882,760),64261=>array(48,0,642,760),64262=>array(2,-14,799,742),64275=>array(49,-14,1030,760),64276=>array(49,-14,1030,760),64277=>array(66,-208,1009,760),64278=>array(66,-208,1047,760),64279=>array(66,-208,1353,760),64285=>array(76,44,237,547),64286=>array(161,625,438,765),64287=>array(71,44,416,547),64288=>array(34,0,601,547),64289=>array(76,0,791,547),64290=>array(122,0,742,547),64291=>array(91,0,743,547),64292=>array(39,0,699,547),64293=>array(122,0,741,760),64294=>array(82,0,745,547),64295=>array(122,0,702,547),64296=>array(42,-4,705,547),64297=>array(143,272,721,627),64298=>array(106,0,714,698),64299=>array(106,0,695,698),64300=>array(106,0,717,698),64301=>array(106,0,695,698),64302=>array(82,-159,616,547),64303=>array(82,-193,616,547),64304=>array(82,-159,616,547),64305=>array(39,0,494,547),64306=>array(39,-5,345,547),64307=>array(122,0,556,547),64308=>array(91,0,555,547),64309=>array(88,0,334,547),64310=>array(75,0,422,547),64312=>array(127,-14,593,552),64313=>array(82,204,333,547),64314=>array(122,-208,458,547),64315=>array(39,0,481,547),64316=>array(122,0,539,729),64318=>array(67,0,582,555),64320=>array(39,0,340,547),64321=>array(130,-14,583,547),64323=>array(97,-208,496,547),64324=>array(82,0,561,547),64326=>array(39,0,546,547),64327=>array(56,-208,666,546),64328=>array(122,0,484,547),64329=>array(106,0,695,547),64330=>array(9,-4,571,547),64331=>array(82,0,277,698),64332=>array(39,0,494,698),64333=>array(39,0,481,698),64334=>array(82,0,561,698),64335=>array(75,0,610,760),65056=>array(-270,752,163,929),65057=>array(149,752,543,929),65058=>array(-187,756,151,894),65059=>array(137,756,476,894),65533=>array(86,-84,983,912),65535=>array(44,-177,495,705)); -$cw=array(0=>540,32=>286,33=>360,34=>414,35=>754,36=>572,37=>855,38=>702,39=>247,40=>351,41=>351,42=>450,43=>754,44=>286,45=>325,46=>286,47=>303,48=>572,49=>572,50=>572,51=>572,52=>572,53=>572,54=>572,55=>572,56=>572,57=>572,58=>303,59=>303,60=>754,61=>754,62=>754,63=>478,64=>900,65=>615,66=>617,67=>628,68=>693,69=>568,70=>518,71=>697,72=>677,73=>265,74=>265,75=>590,76=>501,77=>776,78=>673,79=>708,80=>542,81=>708,82=>625,83=>571,84=>549,85=>659,86=>615,87=>890,88=>616,89=>549,90=>616,91=>351,92=>303,93=>351,94=>754,95=>450,96=>450,97=>551,98=>571,99=>495,100=>571,101=>554,102=>316,103=>571,104=>570,105=>250,106=>250,107=>521,108=>250,109=>876,110=>570,111=>550,112=>571,113=>571,114=>370,115=>469,116=>353,117=>570,118=>532,119=>736,120=>532,121=>532,122=>472,123=>572,124=>303,125=>572,126=>754,160=>286,161=>360,162=>572,163=>572,164=>572,165=>572,166=>303,167=>450,168=>450,169=>900,170=>424,171=>555,172=>754,173=>325,174=>900,175=>450,176=>450,177=>754,178=>360,179=>360,180=>450,181=>572,182=>572,183=>286,184=>450,185=>360,186=>424,187=>555,188=>872,189=>872,190=>872,191=>478,192=>615,193=>615,194=>615,195=>615,196=>615,197=>615,198=>876,199=>628,200=>568,201=>568,202=>568,203=>568,204=>265,205=>265,206=>265,207=>265,208=>697,209=>673,210=>708,211=>708,212=>708,213=>708,214=>708,215=>754,216=>708,217=>659,218=>659,219=>659,220=>659,221=>549,222=>547,223=>567,224=>551,225=>551,226=>551,227=>551,228=>551,229=>551,230=>896,231=>495,232=>554,233=>554,234=>554,235=>554,236=>250,237=>250,238=>250,239=>250,240=>550,241=>570,242=>550,243=>550,244=>550,245=>550,246=>550,247=>754,248=>550,249=>570,250=>570,251=>570,252=>570,253=>532,254=>571,255=>532,256=>615,257=>551,258=>615,259=>551,260=>615,261=>551,262=>628,263=>495,264=>628,265=>495,266=>628,267=>495,268=>628,269=>495,270=>693,271=>571,272=>697,273=>571,274=>568,275=>554,276=>568,277=>554,278=>568,279=>554,280=>568,281=>554,282=>568,283=>554,284=>697,285=>571,286=>697,287=>571,288=>697,289=>571,290=>697,291=>571,292=>677,293=>570,294=>824,295=>625,296=>265,297=>250,298=>265,299=>250,300=>265,301=>250,302=>265,303=>250,304=>265,305=>250,306=>531,307=>500,308=>265,309=>250,310=>590,311=>521,312=>521,313=>501,314=>250,315=>501,316=>250,317=>501,318=>250,319=>501,320=>250,321=>505,322=>258,323=>673,324=>570,325=>673,326=>570,327=>673,328=>570,329=>732,330=>673,331=>570,332=>708,333=>550,334=>708,335=>550,336=>708,337=>550,338=>962,339=>925,340=>625,341=>370,342=>625,343=>370,344=>625,345=>370,346=>571,347=>469,348=>571,349=>469,350=>571,351=>469,352=>571,353=>469,354=>549,355=>353,356=>549,357=>353,358=>549,359=>353,360=>659,361=>570,362=>659,363=>570,364=>659,365=>570,366=>659,367=>570,368=>659,369=>570,370=>659,371=>570,372=>890,373=>736,374=>549,375=>532,376=>549,377=>616,378=>472,379=>616,380=>472,381=>616,382=>472,383=>316,384=>571,385=>661,386=>617,387=>571,388=>617,389=>571,390=>633,391=>628,392=>495,393=>697,394=>737,395=>617,396=>571,397=>550,398=>568,399=>708,400=>553,401=>518,402=>316,403=>697,404=>618,405=>885,406=>318,407=>265,408=>671,409=>521,410=>250,411=>532,412=>876,413=>673,414=>570,415=>708,416=>822,417=>550,418=>844,419=>663,420=>586,421=>571,422=>625,423=>571,424=>469,425=>568,426=>302,427=>353,428=>549,429=>353,430=>549,431=>754,432=>570,433=>688,434=>648,435=>669,436=>657,437=>616,438=>472,439=>599,440=>599,441=>520,442=>472,443=>572,444=>599,445=>520,446=>459,447=>571,448=>265,449=>443,450=>413,451=>266,452=>1310,453=>1165,454=>1043,455=>767,456=>751,457=>500,458=>938,459=>923,460=>820,461=>615,462=>551,463=>265,464=>250,465=>708,466=>550,467=>659,468=>570,469=>659,470=>570,471=>659,472=>570,473=>659,474=>570,475=>659,476=>570,477=>554,478=>615,479=>551,480=>615,481=>551,482=>876,483=>896,484=>697,485=>571,486=>697,487=>571,488=>590,489=>521,490=>708,491=>550,492=>708,493=>550,494=>599,495=>472,496=>250,497=>1310,498=>1165,499=>1043,500=>697,501=>571,502=>1001,503=>614,504=>673,505=>570,506=>615,507=>551,508=>876,509=>896,510=>708,511=>550,512=>615,513=>551,514=>615,515=>551,516=>568,517=>554,518=>568,519=>554,520=>265,521=>250,522=>265,523=>250,524=>708,525=>550,526=>708,527=>550,528=>625,529=>370,530=>625,531=>370,532=>659,533=>570,534=>659,535=>570,536=>571,537=>469,538=>549,539=>353,540=>564,541=>469,542=>677,543=>570,544=>662,545=>754,546=>628,547=>549,548=>616,549=>472,550=>615,551=>551,552=>568,553=>554,554=>708,555=>550,556=>708,557=>550,558=>708,559=>550,560=>708,561=>550,562=>549,563=>532,564=>427,565=>758,566=>429,567=>250,568=>898,569=>898,570=>615,571=>628,572=>495,573=>501,574=>549,575=>469,576=>472,577=>542,578=>431,579=>617,580=>659,581=>615,582=>568,583=>554,584=>265,585=>250,586=>703,587=>571,588=>625,589=>370,590=>549,591=>532,592=>551,593=>571,594=>571,595=>571,596=>495,597=>495,598=>571,599=>654,600=>554,601=>554,602=>759,603=>490,604=>490,605=>698,606=>598,607=>293,608=>626,609=>571,610=>566,611=>536,612=>536,613=>570,614=>570,615=>570,616=>334,617=>348,618=>334,619=>356,620=>438,621=>250,622=>635,623=>876,624=>876,625=>876,626=>581,627=>578,628=>570,629=>550,630=>772,631=>655,632=>593,633=>422,634=>422,635=>422,636=>422,637=>422,638=>477,639=>477,640=>541,641=>541,642=>469,643=>302,644=>302,645=>415,646=>302,647=>353,648=>353,649=>570,650=>556,651=>538,652=>532,653=>736,654=>532,655=>549,656=>472,657=>472,658=>520,659=>520,660=>459,661=>459,662=>459,663=>459,664=>708,665=>521,666=>598,667=>637,668=>588,669=>263,670=>600,671=>456,672=>654,673=>459,674=>459,675=>913,676=>952,677=>911,678=>747,679=>549,680=>700,681=>763,682=>635,683=>589,684=>463,685=>463,686=>513,687=>597,688=>359,689=>359,690=>157,691=>233,692=>266,693=>266,694=>341,695=>463,696=>335,697=>250,698=>414,699=>286,700=>286,701=>286,702=>276,703=>276,704=>333,705=>333,706=>450,707=>450,708=>450,709=>450,710=>450,711=>450,712=>247,713=>450,714=>450,715=>450,716=>247,717=>450,718=>450,719=>450,720=>303,721=>303,722=>276,723=>276,724=>450,725=>450,726=>351,727=>286,728=>450,729=>450,730=>450,731=>450,732=>450,733=>450,734=>284,735=>450,736=>383,737=>149,738=>335,739=>399,740=>333,741=>444,742=>444,743=>444,744=>444,745=>444,748=>450,749=>450,750=>466,755=>450,759=>450,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>589,881=>511,882=>775,883=>583,884=>250,885=>250,886=>673,887=>584,890=>450,891=>494,892=>495,893=>494,894=>303,900=>450,901=>450,902=>615,903=>286,904=>690,905=>813,906=>391,908=>755,910=>773,911=>814,912=>304,913=>615,914=>617,915=>501,916=>615,917=>568,918=>616,919=>677,920=>708,921=>265,922=>590,923=>615,924=>776,925=>673,926=>568,927=>708,928=>677,929=>542,931=>568,932=>549,933=>549,934=>708,935=>616,936=>708,937=>688,938=>265,939=>549,940=>593,941=>486,942=>570,943=>304,944=>521,945=>593,946=>574,947=>532,948=>550,949=>486,950=>489,951=>570,952=>550,953=>304,954=>530,955=>532,956=>572,957=>502,958=>501,959=>550,960=>542,961=>571,962=>528,963=>570,964=>542,965=>521,966=>593,967=>532,968=>593,969=>753,970=>304,971=>521,972=>550,973=>521,974=>753,975=>590,976=>553,977=>557,978=>628,979=>758,980=>628,981=>593,982=>753,983=>597,984=>708,985=>550,986=>583,987=>528,988=>518,989=>413,990=>593,991=>593,992=>778,993=>564,994=>840,995=>753,996=>682,997=>593,998=>712,999=>553,1000=>618,1001=>546,1002=>690,1003=>563,1004=>629,1005=>550,1006=>549,1007=>482,1008=>597,1009=>571,1010=>495,1011=>250,1012=>708,1013=>554,1014=>554,1015=>547,1016=>571,1017=>628,1018=>776,1019=>585,1020=>571,1021=>633,1022=>628,1023=>633,1024=>568,1025=>568,1026=>708,1027=>501,1028=>628,1029=>571,1030=>265,1031=>265,1032=>265,1033=>984,1034=>940,1035=>708,1036=>639,1037=>673,1038=>548,1039=>677,1040=>615,1041=>617,1042=>617,1043=>501,1044=>703,1045=>568,1046=>969,1047=>577,1048=>673,1049=>673,1050=>639,1051=>677,1052=>776,1053=>677,1054=>708,1055=>677,1056=>542,1057=>628,1058=>549,1059=>548,1060=>774,1061=>616,1062=>699,1063=>617,1064=>962,1065=>984,1066=>749,1067=>736,1068=>617,1069=>628,1070=>971,1071=>625,1072=>551,1073=>555,1074=>530,1075=>473,1076=>622,1077=>554,1078=>811,1079=>479,1080=>584,1081=>584,1082=>543,1083=>575,1084=>679,1085=>588,1086=>550,1087=>588,1088=>571,1089=>495,1090=>524,1091=>532,1092=>769,1093=>532,1094=>612,1095=>532,1096=>823,1097=>848,1098=>636,1099=>710,1100=>530,1101=>494,1102=>757,1103=>541,1104=>554,1105=>554,1106=>563,1107=>473,1108=>494,1109=>469,1110=>250,1111=>250,1112=>250,1113=>812,1114=>809,1115=>586,1116=>543,1117=>584,1118=>532,1119=>588,1120=>840,1121=>753,1122=>693,1123=>604,1124=>848,1125=>674,1126=>791,1127=>705,1128=>1043,1129=>901,1130=>708,1131=>550,1132=>924,1133=>742,1134=>572,1135=>486,1136=>771,1137=>789,1138=>708,1139=>550,1140=>703,1141=>598,1142=>703,1143=>598,1144=>893,1145=>813,1146=>857,1147=>682,1148=>1062,1149=>925,1150=>840,1151=>753,1152=>628,1153=>495,1154=>452,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>376,1161=>376,1162=>673,1163=>591,1164=>617,1165=>530,1166=>542,1167=>571,1168=>549,1169=>473,1170=>607,1171=>500,1172=>501,1173=>441,1174=>969,1175=>811,1176=>577,1177=>479,1178=>639,1179=>543,1180=>639,1181=>543,1182=>639,1183=>543,1184=>771,1185=>748,1186=>677,1187=>594,1188=>913,1189=>789,1190=>1002,1191=>855,1192=>801,1193=>636,1194=>628,1195=>495,1196=>549,1197=>476,1198=>549,1199=>532,1200=>549,1201=>532,1202=>616,1203=>532,1204=>840,1205=>726,1206=>617,1207=>532,1208=>617,1209=>532,1210=>617,1211=>570,1212=>836,1213=>658,1214=>836,1215=>658,1216=>265,1217=>969,1218=>811,1219=>589,1220=>543,1221=>677,1222=>575,1223=>677,1224=>594,1225=>677,1226=>594,1227=>617,1228=>532,1229=>776,1230=>679,1231=>250,1232=>615,1233=>551,1234=>615,1235=>551,1236=>876,1237=>896,1238=>568,1239=>554,1240=>708,1241=>554,1242=>708,1243=>554,1244=>969,1245=>811,1246=>577,1247=>479,1248=>599,1249=>520,1250=>673,1251=>584,1252=>673,1253=>584,1254=>708,1255=>550,1256=>708,1257=>550,1258=>708,1259=>550,1260=>628,1261=>494,1262=>548,1263=>532,1264=>548,1265=>532,1266=>548,1267=>532,1268=>617,1269=>532,1270=>501,1271=>442,1272=>736,1273=>710,1274=>607,1275=>500,1276=>616,1277=>532,1278=>616,1279=>532,1280=>617,1281=>530,1282=>905,1283=>807,1284=>877,1285=>782,1286=>611,1287=>529,1288=>964,1289=>861,1290=>1001,1291=>870,1292=>697,1293=>593,1294=>695,1295=>640,1296=>553,1297=>486,1298=>677,1299=>575,1300=>1076,1301=>896,1302=>810,1303=>780,1304=>927,1305=>890,1306=>708,1307=>571,1308=>890,1309=>736,1310=>639,1311=>543,1312=>1002,1313=>848,1314=>1002,1315=>854,1316=>713,1317=>614,1329=>689,1330=>659,1331=>678,1332=>678,1333=>659,1334=>694,1335=>576,1336=>659,1337=>773,1338=>678,1339=>622,1340=>479,1341=>830,1342=>777,1343=>659,1344=>644,1345=>689,1346=>678,1347=>690,1348=>712,1349=>655,1350=>656,1351=>681,1352=>659,1353=>642,1354=>720,1355=>691,1356=>712,1357=>659,1358=>678,1359=>634,1360=>624,1361=>669,1362=>483,1363=>729,1364=>681,1365=>708,1366=>711,1369=>276,1370=>286,1371=>211,1372=>325,1373=>214,1374=>365,1375=>450,1377=>876,1378=>570,1379=>592,1380=>597,1381=>570,1382=>571,1383=>463,1384=>570,1385=>664,1386=>592,1387=>570,1388=>244,1389=>882,1390=>560,1391=>570,1392=>570,1393=>547,1394=>571,1395=>566,1396=>570,1397=>250,1398=>570,1399=>448,1400=>570,1401=>364,1402=>876,1403=>504,1404=>583,1405=>570,1406=>570,1407=>876,1408=>570,1409=>571,1410=>391,1411=>876,1412=>572,1413=>550,1414=>725,1415=>730,1417=>303,1418=>325,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>325,1471=>0,1472=>265,1473=>0,1474=>0,1475=>265,1478=>410,1479=>0,1488=>602,1489=>520,1490=>371,1491=>491,1492=>588,1493=>245,1494=>312,1495=>588,1496=>583,1497=>201,1498=>483,1499=>476,1500=>511,1501=>597,1502=>611,1503=>245,1504=>360,1505=>584,1506=>563,1507=>576,1508=>562,1509=>485,1510=>534,1511=>638,1512=>508,1513=>637,1514=>591,1520=>423,1521=>409,1522=>423,1523=>374,1524=>580,3647=>572,3713=>603,3714=>615,3716=>619,3719=>434,3720=>565,3722=>615,3725=>619,3732=>577,3733=>577,3734=>605,3735=>589,3737=>576,3738=>533,3739=>533,3740=>670,3741=>690,3742=>618,3743=>618,3745=>631,3746=>619,3747=>615,3749=>584,3751=>569,3754=>633,3755=>737,3757=>569,3758=>615,3759=>708,3760=>569,3761=>0,3762=>485,3763=>485,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>597,3776=>324,3777=>611,3778=>414,3779=>492,3780=>442,3782=>606,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>572,3793=>576,3794=>576,3795=>603,3796=>563,3797=>563,3798=>633,3799=>603,3800=>606,3801=>609,3804=>925,3805=>925,4256=>787,4257=>660,4258=>611,4259=>751,4260=>554,4261=>690,4262=>678,4263=>822,4264=>408,4265=>558,4266=>758,4267=>794,4268=>562,4269=>769,4270=>703,4271=>566,4272=>820,4273=>558,4274=>558,4275=>769,4276=>779,4277=>651,4278=>567,4279=>558,4280=>563,4281=>558,4282=>736,4283=>786,4284=>554,4285=>561,4286=>563,4287=>652,4288=>760,4289=>536,4290=>620,4291=>536,4292=>534,4293=>664,4304=>457,4305=>466,4306=>523,4307=>736,4308=>457,4309=>461,4310=>450,4311=>721,4312=>466,4313=>459,4314=>958,4315=>470,4316=>470,4317=>708,4318=>457,4319=>466,4320=>716,4321=>470,4322=>589,4323=>470,4324=>743,4325=>461,4326=>708,4327=>466,4328=>466,4329=>470,4330=>514,4331=>470,4332=>466,4333=>468,4334=>470,4335=>409,4336=>457,4337=>466,4338=>457,4339=>457,4340=>466,4341=>499,4342=>745,4343=>497,4344=>457,4345=>514,4346=>457,4347=>403,4348=>291,5121=>615,5122=>615,5123=>615,5124=>615,5125=>692,5126=>692,5127=>692,5129=>692,5130=>692,5131=>692,5132=>751,5133=>751,5134=>751,5135=>751,5136=>751,5137=>751,5138=>870,5139=>906,5140=>870,5141=>906,5142=>692,5143=>870,5144=>906,5145=>870,5146=>906,5147=>692,5149=>230,5150=>488,5151=>381,5152=>381,5153=>350,5154=>350,5155=>354,5156=>350,5157=>419,5158=>347,5159=>230,5160=>350,5161=>350,5162=>350,5163=>980,5164=>817,5165=>857,5166=>1005,5167=>615,5168=>615,5169=>615,5170=>615,5171=>656,5172=>656,5173=>656,5175=>656,5176=>656,5177=>656,5178=>751,5179=>615,5180=>751,5181=>751,5182=>751,5183=>751,5184=>870,5185=>906,5186=>870,5187=>906,5188=>870,5189=>906,5190=>870,5191=>906,5192=>656,5193=>457,5194=>172,5196=>659,5197=>659,5198=>659,5199=>659,5200=>657,5201=>657,5202=>657,5204=>657,5205=>657,5206=>657,5207=>829,5208=>800,5209=>829,5210=>800,5211=>829,5212=>800,5213=>835,5214=>810,5215=>835,5216=>810,5217=>853,5218=>810,5219=>853,5220=>810,5221=>853,5222=>391,5223=>790,5224=>790,5225=>779,5226=>801,5227=>565,5228=>565,5229=>565,5230=>565,5231=>565,5232=>565,5233=>565,5234=>565,5235=>565,5236=>773,5237=>693,5238=>733,5239=>734,5240=>733,5241=>734,5242=>773,5243=>693,5244=>773,5245=>693,5246=>733,5247=>734,5248=>733,5249=>734,5250=>733,5251=>366,5252=>366,5253=>675,5254=>697,5255=>675,5256=>697,5257=>565,5258=>565,5259=>565,5260=>565,5261=>565,5262=>565,5263=>565,5264=>565,5265=>565,5266=>773,5267=>693,5268=>733,5269=>734,5270=>733,5271=>734,5272=>773,5273=>693,5274=>773,5275=>693,5276=>733,5277=>734,5278=>733,5279=>734,5280=>733,5281=>391,5282=>391,5283=>549,5284=>501,5285=>501,5286=>501,5287=>549,5288=>549,5289=>549,5290=>501,5291=>501,5292=>674,5293=>691,5294=>671,5295=>687,5296=>671,5297=>687,5298=>674,5299=>691,5300=>674,5301=>691,5302=>671,5303=>687,5304=>671,5305=>687,5306=>671,5307=>347,5308=>457,5309=>347,5312=>766,5313=>766,5314=>766,5315=>766,5316=>766,5317=>766,5318=>766,5319=>766,5320=>766,5321=>962,5322=>931,5323=>953,5324=>766,5325=>953,5326=>766,5327=>766,5328=>540,5329=>407,5330=>540,5331=>766,5332=>766,5333=>766,5334=>766,5335=>766,5336=>766,5337=>766,5338=>766,5339=>766,5340=>962,5341=>931,5342=>953,5343=>927,5344=>953,5345=>927,5346=>962,5347=>931,5348=>962,5349=>931,5350=>975,5351=>927,5352=>975,5353=>927,5354=>540,5356=>656,5357=>542,5358=>542,5359=>542,5360=>542,5361=>542,5362=>542,5363=>542,5364=>542,5365=>542,5366=>751,5367=>678,5368=>712,5369=>694,5370=>712,5371=>694,5372=>751,5373=>678,5374=>751,5375=>678,5376=>712,5377=>694,5378=>712,5379=>694,5380=>712,5381=>376,5382=>378,5383=>376,5392=>641,5393=>641,5394=>641,5395=>802,5396=>802,5397=>802,5398=>802,5399=>818,5400=>785,5401=>818,5402=>785,5403=>818,5404=>785,5405=>1026,5406=>989,5407=>1026,5408=>989,5409=>1026,5410=>989,5411=>1026,5412=>989,5413=>576,5414=>564,5415=>564,5416=>564,5417=>564,5418=>564,5419=>564,5420=>564,5421=>564,5422=>564,5423=>760,5424=>703,5425=>734,5426=>736,5427=>734,5428=>736,5429=>760,5430=>703,5431=>760,5432=>703,5433=>734,5434=>736,5435=>734,5436=>736,5437=>734,5438=>376,5440=>350,5441=>436,5442=>824,5443=>824,5444=>776,5445=>824,5446=>776,5447=>776,5448=>542,5449=>542,5450=>542,5451=>542,5452=>542,5453=>542,5454=>751,5455=>678,5456=>376,5458=>656,5459=>615,5460=>615,5461=>615,5462=>615,5463=>653,5464=>653,5465=>653,5466=>653,5467=>831,5468=>906,5469=>457,5470=>659,5471=>659,5472=>659,5473=>659,5474=>659,5475=>659,5476=>657,5477=>657,5478=>657,5479=>657,5480=>853,5481=>810,5482=>457,5492=>747,5493=>747,5494=>747,5495=>747,5496=>747,5497=>747,5498=>747,5499=>507,5500=>677,5501=>436,5502=>942,5503=>942,5504=>942,5505=>942,5506=>942,5507=>942,5508=>942,5509=>743,5514=>747,5515=>747,5516=>747,5517=>747,5518=>1133,5519=>1133,5520=>1133,5521=>901,5522=>901,5523=>1133,5524=>1133,5525=>629,5526=>965,5536=>766,5537=>766,5538=>719,5539=>719,5540=>719,5541=>719,5542=>540,5543=>579,5544=>579,5545=>579,5546=>579,5547=>579,5548=>579,5549=>579,5550=>376,5551=>565,5598=>693,5601=>693,5702=>421,5703=>421,5742=>399,5743=>942,5744=>1178,5745=>1469,5746=>1469,5747=>1237,5748=>1237,5749=>1469,5750=>1469,7424=>532,7425=>646,7426=>883,7427=>527,7428=>495,7429=>544,7430=>544,7431=>441,7432=>486,7433=>250,7434=>355,7435=>521,7436=>524,7437=>679,7438=>584,7439=>550,7440=>495,7441=>615,7442=>615,7443=>615,7444=>920,7446=>550,7447=>550,7448=>472,7449=>541,7450=>541,7451=>524,7452=>517,7453=>663,7454=>853,7455=>574,7456=>532,7457=>736,7458=>472,7459=>473,7462=>524,7463=>532,7464=>507,7465=>472,7466=>531,7467=>575,7468=>387,7469=>552,7470=>389,7472=>436,7473=>358,7474=>358,7475=>439,7476=>426,7477=>167,7478=>167,7479=>372,7480=>315,7481=>489,7482=>424,7483=>424,7484=>446,7485=>396,7486=>342,7487=>394,7488=>346,7489=>415,7490=>560,7491=>352,7492=>352,7493=>365,7494=>583,7495=>385,7496=>365,7497=>375,7498=>375,7499=>324,7500=>323,7501=>365,7502=>161,7503=>383,7504=>561,7505=>368,7506=>372,7507=>333,7508=>372,7509=>372,7510=>385,7511=>265,7512=>364,7513=>422,7514=>561,7515=>375,7517=>361,7518=>335,7519=>347,7520=>374,7521=>327,7522=>161,7523=>233,7524=>364,7525=>375,7526=>361,7527=>335,7528=>370,7529=>374,7530=>327,7543=>571,7544=>426,7547=>334,7549=>600,7557=>250,7579=>365,7580=>333,7581=>333,7582=>372,7583=>324,7584=>267,7585=>209,7586=>365,7587=>364,7588=>235,7589=>224,7590=>234,7591=>235,7592=>211,7593=>224,7594=>211,7595=>338,7596=>561,7597=>561,7598=>369,7599=>431,7600=>368,7601=>372,7602=>372,7603=>324,7604=>258,7605=>265,7606=>457,7607=>376,7608=>325,7609=>365,7610=>375,7611=>330,7612=>393,7613=>330,7614=>353,7615=>372,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>615,7681=>551,7682=>617,7683=>571,7684=>617,7685=>571,7686=>617,7687=>571,7688=>628,7689=>495,7690=>693,7691=>571,7692=>693,7693=>571,7694=>693,7695=>571,7696=>693,7697=>571,7698=>693,7699=>571,7700=>568,7701=>554,7702=>568,7703=>554,7704=>568,7705=>554,7706=>568,7707=>554,7708=>568,7709=>554,7710=>518,7711=>316,7712=>697,7713=>571,7714=>677,7715=>570,7716=>677,7717=>570,7718=>677,7719=>570,7720=>677,7721=>570,7722=>677,7723=>570,7724=>265,7725=>250,7726=>265,7727=>250,7728=>590,7729=>521,7730=>590,7731=>521,7732=>590,7733=>521,7734=>501,7735=>250,7736=>501,7737=>250,7738=>501,7739=>250,7740=>501,7741=>250,7742=>776,7743=>876,7744=>776,7745=>876,7746=>776,7747=>876,7748=>673,7749=>570,7750=>673,7751=>570,7752=>673,7753=>570,7754=>673,7755=>570,7756=>708,7757=>550,7758=>708,7759=>550,7760=>708,7761=>550,7762=>708,7763=>550,7764=>542,7765=>571,7766=>542,7767=>571,7768=>625,7769=>370,7770=>625,7771=>370,7772=>625,7773=>370,7774=>625,7775=>370,7776=>571,7777=>469,7778=>571,7779=>469,7780=>571,7781=>469,7782=>571,7783=>469,7784=>571,7785=>469,7786=>549,7787=>353,7788=>549,7789=>353,7790=>549,7791=>353,7792=>549,7793=>353,7794=>659,7795=>570,7796=>659,7797=>570,7798=>659,7799=>570,7800=>659,7801=>570,7802=>659,7803=>570,7804=>615,7805=>532,7806=>615,7807=>532,7808=>890,7809=>736,7810=>890,7811=>736,7812=>890,7813=>736,7814=>890,7815=>736,7816=>890,7817=>736,7818=>616,7819=>532,7820=>616,7821=>532,7822=>549,7823=>532,7824=>616,7825=>472,7826=>616,7827=>472,7828=>616,7829=>472,7830=>570,7831=>353,7832=>736,7833=>532,7834=>551,7835=>316,7836=>316,7837=>316,7838=>691,7839=>550,7840=>615,7841=>551,7842=>615,7843=>551,7844=>615,7845=>551,7846=>615,7847=>551,7848=>615,7849=>551,7850=>615,7851=>551,7852=>615,7853=>551,7854=>615,7855=>551,7856=>615,7857=>551,7858=>615,7859=>551,7860=>615,7861=>551,7862=>615,7863=>551,7864=>568,7865=>554,7866=>568,7867=>554,7868=>568,7869=>554,7870=>568,7871=>554,7872=>568,7873=>554,7874=>568,7875=>554,7876=>568,7877=>554,7878=>568,7879=>554,7880=>265,7881=>250,7882=>265,7883=>250,7884=>708,7885=>550,7886=>708,7887=>550,7888=>708,7889=>550,7890=>708,7891=>550,7892=>708,7893=>550,7894=>708,7895=>550,7896=>708,7897=>550,7898=>822,7899=>550,7900=>822,7901=>550,7902=>822,7903=>550,7904=>822,7905=>550,7906=>822,7907=>550,7908=>659,7909=>570,7910=>659,7911=>570,7912=>754,7913=>570,7914=>754,7915=>570,7916=>754,7917=>570,7918=>754,7919=>570,7920=>754,7921=>570,7922=>549,7923=>532,7924=>549,7925=>532,7926=>549,7927=>532,7928=>549,7929=>532,7930=>692,7931=>429,7936=>593,7937=>593,7938=>593,7939=>593,7940=>593,7941=>593,7942=>593,7943=>593,7944=>615,7945=>615,7946=>790,7947=>790,7948=>692,7949=>721,7950=>637,7951=>668,7952=>486,7953=>486,7954=>486,7955=>486,7956=>486,7957=>486,7960=>640,7961=>640,7962=>869,7963=>877,7964=>809,7965=>835,7968=>570,7969=>570,7970=>570,7971=>570,7972=>570,7973=>570,7974=>570,7975=>570,7976=>753,7977=>751,7978=>977,7979=>980,7980=>924,7981=>945,7982=>840,7983=>852,7984=>304,7985=>304,7986=>304,7987=>304,7988=>304,7989=>304,7990=>304,7991=>304,7992=>342,7993=>336,7994=>571,7995=>571,7996=>513,7997=>540,7998=>440,7999=>443,8000=>550,8001=>550,8002=>550,8003=>550,8004=>550,8005=>550,8008=>724,8009=>763,8010=>985,8011=>989,8012=>844,8013=>873,8016=>521,8017=>521,8018=>521,8019=>521,8020=>521,8021=>521,8022=>521,8023=>521,8025=>705,8027=>897,8029=>911,8031=>808,8032=>753,8033=>753,8034=>753,8035=>753,8036=>753,8037=>753,8038=>753,8039=>753,8040=>722,8041=>759,8042=>980,8043=>985,8044=>851,8045=>875,8046=>829,8047=>857,8048=>593,8049=>593,8050=>486,8051=>493,8052=>570,8053=>589,8054=>304,8055=>304,8056=>550,8057=>550,8058=>521,8059=>521,8060=>753,8061=>753,8064=>593,8065=>593,8066=>593,8067=>593,8068=>593,8069=>593,8070=>593,8071=>593,8072=>615,8073=>615,8074=>790,8075=>790,8076=>692,8077=>721,8078=>637,8079=>668,8080=>570,8081=>570,8082=>570,8083=>570,8084=>570,8085=>570,8086=>570,8087=>570,8088=>753,8089=>751,8090=>977,8091=>980,8092=>924,8093=>945,8094=>840,8095=>852,8096=>753,8097=>753,8098=>753,8099=>753,8100=>753,8101=>753,8102=>753,8103=>753,8104=>722,8105=>759,8106=>980,8107=>985,8108=>851,8109=>875,8110=>829,8111=>857,8112=>593,8113=>593,8114=>593,8115=>593,8116=>593,8118=>593,8119=>593,8120=>615,8121=>615,8122=>645,8123=>623,8124=>615,8125=>450,8126=>450,8127=>450,8128=>450,8129=>450,8130=>570,8131=>570,8132=>589,8134=>570,8135=>570,8136=>724,8137=>671,8138=>837,8139=>784,8140=>677,8141=>450,8142=>450,8143=>450,8144=>304,8145=>304,8146=>304,8147=>304,8150=>304,8151=>304,8152=>265,8153=>265,8154=>427,8155=>367,8157=>450,8158=>450,8159=>450,8160=>521,8161=>521,8162=>521,8163=>521,8164=>571,8165=>571,8166=>521,8167=>521,8168=>549,8169=>549,8170=>760,8171=>742,8172=>616,8173=>450,8174=>450,8175=>450,8178=>753,8179=>753,8180=>753,8182=>753,8183=>753,8184=>847,8185=>731,8186=>830,8187=>743,8188=>688,8189=>450,8190=>450,8192=>450,8193=>900,8194=>450,8195=>900,8196=>296,8197=>225,8198=>150,8199=>572,8200=>286,8201=>180,8202=>89,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>325,8209=>325,8210=>572,8211=>450,8212=>900,8213=>900,8214=>450,8215=>450,8216=>286,8217=>286,8218=>286,8219=>286,8220=>466,8221=>466,8222=>466,8223=>466,8224=>450,8225=>450,8226=>531,8227=>531,8228=>299,8229=>600,8230=>900,8231=>286,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>180,8240=>1215,8241=>1521,8242=>204,8243=>336,8244=>468,8245=>204,8246=>336,8247=>468,8248=>305,8249=>360,8250=>360,8251=>754,8252=>437,8253=>478,8254=>450,8255=>723,8256=>723,8257=>225,8258=>900,8259=>450,8260=>150,8261=>351,8262=>351,8263=>830,8264=>659,8265=>659,8266=>447,8267=>572,8268=>450,8269=>450,8270=>450,8271=>303,8272=>723,8273=>450,8274=>404,8275=>900,8276=>723,8277=>754,8278=>527,8279=>597,8280=>754,8281=>754,8282=>286,8283=>717,8284=>754,8285=>286,8286=>286,8287=>200,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>360,8305=>161,8308=>360,8309=>360,8310=>360,8311=>360,8312=>360,8313=>360,8314=>475,8315=>475,8316=>475,8317=>221,8318=>221,8319=>359,8320=>360,8321=>360,8322=>360,8323=>360,8324=>360,8325=>360,8326=>360,8327=>360,8328=>360,8329=>360,8330=>475,8331=>475,8332=>475,8333=>221,8334=>221,8336=>352,8337=>375,8338=>372,8339=>399,8340=>375,8341=>359,8342=>383,8343=>149,8344=>561,8345=>359,8346=>385,8347=>335,8348=>265,8352=>789,8353=>572,8354=>572,8355=>572,8356=>572,8357=>876,8358=>673,8359=>1143,8360=>966,8361=>890,8362=>754,8363=>572,8364=>572,8365=>572,8366=>572,8367=>1145,8368=>572,8369=>572,8370=>572,8371=>572,8372=>696,8373=>572,8376=>572,8377=>572,8378=>611,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>873,8449=>873,8450=>628,8451=>1011,8452=>807,8453=>872,8454=>929,8455=>553,8456=>628,8457=>856,8459=>889,8460=>679,8461=>765,8462=>570,8463=>570,8464=>422,8465=>627,8466=>648,8467=>372,8468=>736,8469=>721,8470=>936,8471=>900,8472=>627,8473=>631,8474=>708,8475=>718,8476=>732,8477=>712,8478=>807,8479=>615,8480=>917,8481=>912,8482=>900,8483=>615,8484=>670,8485=>520,8486=>688,8487=>688,8488=>554,8489=>304,8490=>590,8491=>615,8492=>708,8493=>633,8494=>769,8495=>532,8496=>545,8497=>708,8498=>518,8499=>962,8500=>416,8501=>670,8502=>606,8503=>419,8504=>580,8505=>342,8506=>833,8507=>1041,8508=>632,8509=>655,8510=>589,8511=>764,8512=>729,8513=>697,8514=>501,8515=>501,8516=>549,8517=>737,8518=>637,8519=>554,8520=>316,8521=>316,8523=>702,8526=>474,8528=>872,8529=>872,8530=>1233,8531=>872,8532=>872,8533=>872,8534=>872,8535=>872,8536=>872,8537=>872,8538=>872,8539=>872,8540=>872,8541=>872,8542=>872,8543=>511,8544=>265,8545=>443,8546=>620,8547=>831,8548=>615,8549=>830,8550=>1007,8551=>1185,8552=>826,8553=>616,8554=>839,8555=>1018,8556=>501,8557=>628,8558=>693,8559=>776,8560=>250,8561=>412,8562=>573,8563=>730,8564=>532,8565=>729,8566=>892,8567=>1053,8568=>737,8569=>532,8570=>740,8571=>901,8572=>250,8573=>495,8574=>571,8575=>876,8576=>1121,8577=>693,8578=>1121,8579=>633,8580=>494,8581=>628,8585=>872,8592=>754,8593=>754,8594=>754,8595=>754,8596=>754,8597=>754,8598=>754,8599=>754,8600=>754,8601=>754,8602=>754,8603=>754,8604=>754,8605=>754,8606=>754,8607=>754,8608=>754,8609=>754,8610=>754,8611=>754,8612=>754,8613=>754,8614=>754,8615=>754,8616=>754,8617=>754,8618=>754,8619=>754,8620=>754,8621=>754,8622=>754,8623=>754,8624=>754,8625=>754,8626=>754,8627=>754,8628=>754,8629=>754,8630=>754,8631=>754,8632=>754,8633=>754,8634=>754,8635=>754,8636=>754,8637=>754,8638=>754,8639=>754,8640=>754,8641=>754,8642=>754,8643=>754,8644=>754,8645=>754,8646=>754,8647=>754,8648=>754,8649=>754,8650=>754,8651=>754,8652=>754,8653=>754,8654=>754,8655=>754,8656=>754,8657=>754,8658=>754,8659=>754,8660=>754,8661=>754,8662=>754,8663=>754,8664=>754,8665=>754,8666=>754,8667=>754,8668=>754,8669=>754,8670=>754,8671=>754,8672=>754,8673=>754,8674=>754,8675=>754,8676=>754,8677=>754,8678=>754,8679=>754,8680=>754,8681=>754,8682=>754,8683=>754,8684=>754,8685=>754,8686=>754,8687=>754,8688=>754,8689=>754,8690=>754,8691=>754,8692=>754,8693=>754,8694=>754,8695=>754,8696=>754,8697=>754,8698=>754,8699=>754,8700=>754,8701=>754,8702=>754,8703=>754,8704=>615,8705=>572,8706=>465,8707=>568,8708=>568,8709=>784,8710=>602,8711=>602,8712=>784,8713=>784,8714=>646,8715=>784,8716=>784,8717=>646,8718=>572,8719=>681,8720=>681,8721=>606,8722=>754,8723=>754,8724=>754,8725=>303,8726=>573,8727=>754,8728=>563,8729=>563,8730=>573,8731=>573,8732=>573,8733=>643,8734=>750,8735=>754,8736=>807,8737=>807,8738=>754,8739=>450,8740=>450,8741=>450,8742=>450,8743=>659,8744=>659,8745=>659,8746=>659,8747=>469,8748=>710,8749=>951,8750=>469,8751=>710,8752=>951,8753=>469,8754=>469,8755=>469,8756=>572,8757=>572,8758=>234,8759=>572,8760=>754,8761=>754,8762=>754,8763=>754,8764=>754,8765=>754,8766=>754,8767=>754,8768=>337,8769=>754,8770=>754,8771=>754,8772=>754,8773=>754,8774=>754,8775=>754,8776=>754,8777=>754,8778=>754,8779=>754,8780=>754,8781=>754,8782=>754,8783=>754,8784=>754,8785=>754,8786=>754,8787=>754,8788=>900,8789=>900,8790=>754,8791=>754,8792=>754,8793=>754,8794=>754,8795=>754,8796=>754,8797=>754,8798=>754,8799=>754,8800=>754,8801=>754,8802=>754,8803=>754,8804=>754,8805=>754,8806=>754,8807=>754,8808=>754,8809=>754,8810=>942,8811=>942,8812=>417,8813=>754,8814=>754,8815=>754,8816=>754,8817=>754,8818=>754,8819=>754,8820=>754,8821=>754,8822=>754,8823=>754,8824=>754,8825=>754,8826=>754,8827=>754,8828=>754,8829=>754,8830=>754,8831=>754,8832=>754,8833=>754,8834=>754,8835=>754,8836=>754,8837=>754,8838=>754,8839=>754,8840=>754,8841=>754,8842=>754,8843=>754,8844=>659,8845=>659,8846=>659,8847=>754,8848=>754,8849=>754,8850=>754,8851=>702,8852=>702,8853=>754,8854=>754,8855=>754,8856=>754,8857=>754,8858=>754,8859=>754,8860=>754,8861=>754,8862=>754,8863=>754,8864=>754,8865=>754,8866=>784,8867=>784,8868=>784,8869=>784,8870=>468,8871=>468,8872=>784,8873=>784,8874=>784,8875=>784,8876=>784,8877=>784,8878=>784,8879=>784,8880=>754,8881=>754,8882=>754,8883=>754,8884=>754,8885=>754,8886=>900,8887=>900,8888=>754,8889=>754,8890=>468,8891=>659,8892=>659,8893=>659,8894=>754,8895=>754,8896=>738,8897=>738,8898=>738,8899=>738,8900=>444,8901=>286,8902=>563,8903=>754,8904=>900,8905=>900,8906=>900,8907=>900,8908=>900,8909=>754,8910=>659,8911=>659,8912=>754,8913=>754,8914=>754,8915=>754,8916=>754,8917=>754,8918=>754,8919=>754,8920=>1280,8921=>1280,8922=>754,8923=>754,8924=>754,8925=>754,8926=>754,8927=>754,8928=>754,8929=>754,8930=>754,8931=>754,8932=>754,8933=>754,8934=>754,8935=>754,8936=>754,8937=>754,8938=>754,8939=>754,8940=>754,8941=>754,8942=>900,8943=>900,8944=>900,8945=>900,8946=>900,8947=>784,8948=>646,8949=>784,8950=>784,8951=>646,8952=>784,8953=>784,8954=>900,8955=>784,8956=>646,8957=>784,8958=>646,8959=>784,8960=>542,8961=>542,8962=>571,8963=>754,8964=>754,8965=>754,8966=>754,8967=>439,8968=>351,8969=>351,8970=>351,8971=>351,8972=>728,8973=>728,8974=>728,8975=>728,8976=>754,8977=>461,8984=>900,8985=>754,8988=>422,8989=>422,8990=>422,8991=>422,8992=>469,8993=>469,8996=>1037,8997=>1037,8998=>1272,8999=>1037,9000=>1299,9003=>1272,9004=>786,9075=>304,9076=>571,9077=>753,9082=>593,9085=>681,9095=>1037,9108=>786,9115=>450,9116=>450,9117=>450,9118=>450,9119=>450,9120=>450,9121=>450,9122=>450,9123=>450,9124=>450,9125=>450,9126=>450,9127=>675,9128=>675,9129=>675,9130=>675,9131=>675,9132=>675,9133=>675,9134=>469,9166=>754,9167=>850,9187=>786,9189=>692,9192=>572,9250=>571,9251=>571,9312=>807,9313=>807,9314=>807,9315=>807,9316=>807,9317=>807,9318=>807,9319=>807,9320=>807,9321=>807,9472=>542,9473=>542,9474=>542,9475=>542,9476=>542,9477=>542,9478=>542,9479=>542,9480=>542,9481=>542,9482=>542,9483=>542,9484=>542,9485=>542,9486=>542,9487=>542,9488=>542,9489=>542,9490=>542,9491=>542,9492=>542,9493=>542,9494=>542,9495=>542,9496=>542,9497=>542,9498=>542,9499=>542,9500=>542,9501=>542,9502=>542,9503=>542,9504=>542,9505=>542,9506=>542,9507=>542,9508=>542,9509=>542,9510=>542,9511=>542,9512=>542,9513=>542,9514=>542,9515=>542,9516=>542,9517=>542,9518=>542,9519=>542,9520=>542,9521=>542,9522=>542,9523=>542,9524=>542,9525=>542,9526=>542,9527=>542,9528=>542,9529=>542,9530=>542,9531=>542,9532=>542,9533=>542,9534=>542,9535=>542,9536=>542,9537=>542,9538=>542,9539=>542,9540=>542,9541=>542,9542=>542,9543=>542,9544=>542,9545=>542,9546=>542,9547=>542,9548=>542,9549=>542,9550=>542,9551=>542,9552=>542,9553=>542,9554=>542,9555=>542,9556=>542,9557=>542,9558=>542,9559=>542,9560=>542,9561=>542,9562=>542,9563=>542,9564=>542,9565=>542,9566=>542,9567=>542,9568=>542,9569=>542,9570=>542,9571=>542,9572=>542,9573=>542,9574=>542,9575=>542,9576=>542,9577=>542,9578=>542,9579=>542,9580=>542,9581=>542,9582=>542,9583=>542,9584=>542,9585=>542,9586=>542,9587=>542,9588=>542,9589=>542,9590=>542,9591=>542,9592=>542,9593=>542,9594=>542,9595=>542,9596=>542,9597=>542,9598=>542,9599=>542,9600=>692,9601=>692,9602=>692,9603=>692,9604=>692,9605=>692,9606=>692,9607=>692,9608=>692,9609=>692,9610=>692,9611=>692,9612=>692,9613=>692,9614=>692,9615=>692,9616=>692,9617=>692,9618=>692,9619=>692,9620=>692,9621=>692,9622=>692,9623=>692,9624=>692,9625=>692,9626=>692,9627=>692,9628=>692,9629=>692,9630=>692,9631=>692,9632=>850,9633=>850,9634=>850,9635=>850,9636=>850,9637=>850,9638=>850,9639=>850,9640=>850,9641=>850,9642=>610,9643=>610,9644=>850,9645=>850,9646=>495,9647=>495,9648=>692,9649=>692,9650=>692,9651=>692,9652=>452,9653=>452,9654=>692,9655=>692,9656=>452,9657=>452,9658=>692,9659=>692,9660=>692,9661=>692,9662=>452,9663=>452,9664=>692,9665=>692,9666=>452,9667=>452,9668=>692,9669=>692,9670=>692,9671=>692,9672=>692,9673=>785,9674=>444,9675=>785,9676=>785,9677=>785,9678=>785,9679=>785,9680=>785,9681=>785,9682=>785,9683=>785,9684=>785,9685=>785,9686=>474,9687=>474,9688=>712,9689=>873,9690=>873,9691=>873,9692=>348,9693=>348,9694=>348,9695=>348,9696=>692,9697=>692,9698=>692,9699=>692,9700=>692,9701=>692,9702=>531,9703=>850,9704=>850,9705=>850,9706=>850,9707=>850,9708=>692,9709=>692,9710=>692,9711=>1007,9712=>850,9713=>850,9714=>850,9715=>850,9716=>785,9717=>785,9718=>785,9719=>785,9720=>692,9721=>692,9722=>692,9723=>747,9724=>747,9725=>659,9726=>659,9727=>692,9728=>807,9729=>900,9730=>807,9731=>807,9732=>807,9733=>807,9734=>807,9735=>515,9736=>806,9737=>807,9738=>799,9739=>799,9740=>604,9741=>911,9742=>1121,9743=>1125,9744=>807,9745=>807,9746=>807,9747=>479,9748=>807,9749=>807,9750=>807,9751=>807,9752=>807,9753=>807,9754=>807,9755=>807,9756=>807,9757=>548,9758=>807,9759=>548,9760=>807,9761=>807,9762=>807,9763=>807,9764=>602,9765=>671,9766=>584,9767=>705,9768=>490,9769=>807,9770=>807,9771=>807,9772=>639,9773=>807,9774=>807,9775=>807,9776=>800,9777=>800,9778=>800,9779=>800,9780=>800,9781=>800,9782=>800,9783=>800,9784=>807,9785=>938,9786=>938,9787=>938,9788=>807,9789=>807,9790=>807,9791=>552,9792=>659,9793=>659,9794=>807,9795=>807,9796=>807,9797=>807,9798=>807,9799=>807,9800=>807,9801=>807,9802=>807,9803=>807,9804=>807,9805=>807,9806=>807,9807=>807,9808=>807,9809=>807,9810=>807,9811=>807,9812=>807,9813=>807,9814=>807,9815=>807,9816=>807,9817=>807,9818=>807,9819=>807,9820=>807,9821=>807,9822=>807,9823=>807,9824=>807,9825=>807,9826=>807,9827=>807,9828=>807,9829=>807,9830=>807,9831=>807,9832=>807,9833=>424,9834=>574,9835=>807,9836=>807,9837=>424,9838=>321,9839=>435,9840=>673,9841=>689,9842=>807,9843=>807,9844=>807,9845=>807,9846=>807,9847=>807,9848=>807,9849=>807,9850=>807,9851=>807,9852=>807,9853=>807,9854=>807,9855=>807,9856=>782,9857=>782,9858=>782,9859=>782,9860=>782,9861=>782,9862=>800,9863=>800,9864=>800,9865=>800,9866=>800,9867=>800,9868=>800,9869=>800,9870=>800,9871=>800,9872=>675,9873=>675,9874=>800,9875=>734,9876=>644,9877=>483,9878=>766,9879=>800,9880=>615,9881=>807,9882=>637,9883=>800,9884=>800,9888=>800,9889=>632,9890=>904,9891=>980,9892=>1057,9893=>813,9894=>754,9895=>754,9896=>754,9897=>754,9898=>754,9899=>754,9900=>754,9901=>754,9902=>754,9903=>754,9904=>759,9905=>754,9906=>659,9907=>659,9908=>659,9909=>659,9910=>765,9911=>659,9912=>659,9920=>754,9921=>754,9922=>754,9923=>754,9954=>659,9985=>754,9986=>754,9987=>754,9988=>754,9990=>754,9991=>754,9992=>754,9993=>754,9996=>754,9997=>754,9998=>754,9999=>754,10000=>754,10001=>754,10002=>754,10003=>754,10004=>754,10005=>754,10006=>754,10007=>754,10008=>754,10009=>754,10010=>754,10011=>754,10012=>754,10013=>754,10014=>754,10015=>754,10016=>754,10017=>754,10018=>754,10019=>754,10020=>754,10021=>754,10022=>754,10023=>754,10025=>754,10026=>754,10027=>754,10028=>754,10029=>754,10030=>754,10031=>754,10032=>754,10033=>754,10034=>754,10035=>754,10036=>754,10037=>754,10038=>754,10039=>754,10040=>754,10041=>754,10042=>754,10043=>754,10044=>754,10045=>754,10046=>754,10047=>754,10048=>754,10049=>754,10050=>754,10051=>754,10052=>754,10053=>754,10054=>754,10055=>754,10056=>754,10057=>754,10058=>754,10059=>754,10061=>807,10063=>807,10064=>807,10065=>807,10066=>807,10070=>807,10072=>754,10073=>754,10074=>754,10075=>290,10076=>290,10077=>484,10078=>484,10081=>754,10082=>754,10083=>754,10084=>754,10085=>754,10086=>754,10087=>754,10088=>754,10089=>754,10090=>754,10091=>754,10092=>754,10093=>754,10094=>754,10095=>754,10096=>754,10097=>754,10098=>754,10099=>754,10100=>754,10101=>754,10102=>807,10103=>807,10104=>807,10105=>807,10106=>807,10107=>807,10108=>807,10109=>807,10110=>807,10111=>807,10112=>754,10113=>754,10114=>754,10115=>754,10116=>754,10117=>754,10118=>754,10119=>754,10120=>754,10121=>754,10122=>754,10123=>754,10124=>754,10125=>754,10126=>754,10127=>754,10128=>754,10129=>754,10130=>754,10131=>754,10132=>754,10136=>754,10137=>754,10138=>754,10139=>754,10140=>754,10141=>754,10142=>754,10143=>754,10144=>754,10145=>754,10146=>754,10147=>754,10148=>754,10149=>754,10150=>754,10151=>754,10152=>754,10153=>754,10154=>754,10155=>754,10156=>754,10157=>754,10158=>754,10159=>754,10161=>754,10162=>754,10163=>754,10164=>754,10165=>754,10166=>754,10167=>754,10168=>754,10169=>754,10170=>754,10171=>754,10172=>754,10173=>754,10174=>754,10181=>351,10182=>351,10208=>444,10214=>445,10215=>445,10216=>351,10217=>351,10218=>500,10219=>500,10224=>754,10225=>754,10226=>754,10227=>754,10228=>1042,10229=>1290,10230=>1290,10231=>1290,10232=>1290,10233=>1290,10234=>1290,10235=>1290,10236=>1290,10237=>1290,10238=>1290,10239=>1290,10240=>659,10241=>659,10242=>659,10243=>659,10244=>659,10245=>659,10246=>659,10247=>659,10248=>659,10249=>659,10250=>659,10251=>659,10252=>659,10253=>659,10254=>659,10255=>659,10256=>659,10257=>659,10258=>659,10259=>659,10260=>659,10261=>659,10262=>659,10263=>659,10264=>659,10265=>659,10266=>659,10267=>659,10268=>659,10269=>659,10270=>659,10271=>659,10272=>659,10273=>659,10274=>659,10275=>659,10276=>659,10277=>659,10278=>659,10279=>659,10280=>659,10281=>659,10282=>659,10283=>659,10284=>659,10285=>659,10286=>659,10287=>659,10288=>659,10289=>659,10290=>659,10291=>659,10292=>659,10293=>659,10294=>659,10295=>659,10296=>659,10297=>659,10298=>659,10299=>659,10300=>659,10301=>659,10302=>659,10303=>659,10304=>659,10305=>659,10306=>659,10307=>659,10308=>659,10309=>659,10310=>659,10311=>659,10312=>659,10313=>659,10314=>659,10315=>659,10316=>659,10317=>659,10318=>659,10319=>659,10320=>659,10321=>659,10322=>659,10323=>659,10324=>659,10325=>659,10326=>659,10327=>659,10328=>659,10329=>659,10330=>659,10331=>659,10332=>659,10333=>659,10334=>659,10335=>659,10336=>659,10337=>659,10338=>659,10339=>659,10340=>659,10341=>659,10342=>659,10343=>659,10344=>659,10345=>659,10346=>659,10347=>659,10348=>659,10349=>659,10350=>659,10351=>659,10352=>659,10353=>659,10354=>659,10355=>659,10356=>659,10357=>659,10358=>659,10359=>659,10360=>659,10361=>659,10362=>659,10363=>659,10364=>659,10365=>659,10366=>659,10367=>659,10368=>659,10369=>659,10370=>659,10371=>659,10372=>659,10373=>659,10374=>659,10375=>659,10376=>659,10377=>659,10378=>659,10379=>659,10380=>659,10381=>659,10382=>659,10383=>659,10384=>659,10385=>659,10386=>659,10387=>659,10388=>659,10389=>659,10390=>659,10391=>659,10392=>659,10393=>659,10394=>659,10395=>659,10396=>659,10397=>659,10398=>659,10399=>659,10400=>659,10401=>659,10402=>659,10403=>659,10404=>659,10405=>659,10406=>659,10407=>659,10408=>659,10409=>659,10410=>659,10411=>659,10412=>659,10413=>659,10414=>659,10415=>659,10416=>659,10417=>659,10418=>659,10419=>659,10420=>659,10421=>659,10422=>659,10423=>659,10424=>659,10425=>659,10426=>659,10427=>659,10428=>659,10429=>659,10430=>659,10431=>659,10432=>659,10433=>659,10434=>659,10435=>659,10436=>659,10437=>659,10438=>659,10439=>659,10440=>659,10441=>659,10442=>659,10443=>659,10444=>659,10445=>659,10446=>659,10447=>659,10448=>659,10449=>659,10450=>659,10451=>659,10452=>659,10453=>659,10454=>659,10455=>659,10456=>659,10457=>659,10458=>659,10459=>659,10460=>659,10461=>659,10462=>659,10463=>659,10464=>659,10465=>659,10466=>659,10467=>659,10468=>659,10469=>659,10470=>659,10471=>659,10472=>659,10473=>659,10474=>659,10475=>659,10476=>659,10477=>659,10478=>659,10479=>659,10480=>659,10481=>659,10482=>659,10483=>659,10484=>659,10485=>659,10486=>659,10487=>659,10488=>659,10489=>659,10490=>659,10491=>659,10492=>659,10493=>659,10494=>659,10495=>659,10502=>754,10503=>754,10506=>754,10507=>754,10560=>615,10561=>615,10627=>660,10628=>660,10702=>754,10703=>900,10704=>900,10705=>900,10706=>900,10707=>900,10708=>900,10709=>900,10731=>444,10746=>754,10747=>754,10752=>900,10753=>900,10754=>900,10764=>1192,10765=>469,10766=>469,10767=>469,10768=>469,10769=>469,10770=>469,10771=>469,10772=>469,10773=>469,10774=>469,10775=>469,10776=>469,10777=>469,10778=>469,10779=>469,10780=>469,10799=>754,10858=>754,10859=>754,10877=>754,10878=>754,10879=>754,10880=>754,10881=>754,10882=>754,10883=>754,10884=>754,10885=>754,10886=>754,10887=>754,10888=>754,10889=>754,10890=>754,10891=>754,10892=>754,10893=>754,10894=>754,10895=>754,10896=>754,10897=>754,10898=>754,10899=>754,10900=>754,10901=>754,10902=>754,10903=>754,10904=>754,10905=>754,10906=>754,10907=>754,10908=>754,10909=>754,10910=>754,10911=>754,10912=>754,10926=>754,10927=>754,10928=>754,10929=>754,10930=>754,10931=>754,10932=>754,10933=>754,10934=>754,10935=>754,10936=>754,10937=>754,10938=>754,11001=>754,11002=>754,11008=>754,11009=>754,11010=>754,11011=>754,11012=>754,11013=>754,11014=>754,11015=>754,11016=>754,11017=>754,11018=>754,11019=>754,11020=>754,11021=>754,11022=>752,11023=>752,11024=>752,11025=>752,11026=>850,11027=>850,11028=>850,11029=>850,11030=>692,11031=>692,11032=>692,11033=>692,11034=>850,11039=>782,11040=>782,11041=>786,11042=>786,11043=>786,11044=>1007,11091=>782,11092=>782,11360=>501,11361=>250,11362=>501,11363=>542,11364=>625,11365=>551,11366=>353,11367=>677,11368=>570,11369=>590,11370=>521,11371=>616,11372=>472,11373=>703,11374=>776,11375=>615,11376=>703,11377=>661,11378=>1015,11379=>865,11380=>532,11381=>589,11382=>511,11383=>593,11385=>373,11386=>550,11387=>441,11388=>157,11389=>387,11390=>571,11391=>616,11520=>532,11521=>535,11522=>508,11523=>541,11524=>528,11525=>819,11526=>563,11527=>856,11528=>536,11529=>546,11530=>858,11531=>558,11532=>536,11533=>833,11534=>535,11535=>725,11536=>838,11537=>526,11538=>533,11539=>831,11540=>857,11541=>745,11542=>536,11543=>535,11544=>531,11545=>532,11546=>532,11547=>558,11548=>828,11549=>530,11550=>527,11551=>523,11552=>822,11553=>536,11554=>535,11555=>533,11556=>577,11557=>811,11800=>478,11807=>754,11810=>351,11811=>351,11812=>351,11813=>351,11822=>478,19904=>807,19905=>807,19906=>807,19907=>807,19908=>807,19909=>807,19910=>807,19911=>807,19912=>807,19913=>807,19914=>807,19915=>807,19916=>807,19917=>807,19918=>807,19919=>807,19920=>807,19921=>807,19922=>807,19923=>807,19924=>807,19925=>807,19926=>807,19927=>807,19928=>807,19929=>807,19930=>807,19931=>807,19932=>807,19933=>807,19934=>807,19935=>807,19936=>807,19937=>807,19938=>807,19939=>807,19940=>807,19941=>807,19942=>807,19943=>807,19944=>807,19945=>807,19946=>807,19947=>807,19948=>807,19949=>807,19950=>807,19951=>807,19952=>807,19953=>807,19954=>807,19955=>807,19956=>807,19957=>807,19958=>807,19959=>807,19960=>807,19961=>807,19962=>807,19963=>807,19964=>807,19965=>807,19966=>807,19967=>807,42192=>617,42193=>542,42194=>542,42195=>693,42196=>549,42197=>549,42198=>697,42199=>590,42200=>590,42201=>460,42202=>628,42203=>633,42204=>616,42205=>518,42206=>518,42207=>776,42208=>673,42209=>501,42210=>571,42211=>625,42212=>625,42213=>615,42214=>615,42215=>677,42216=>697,42217=>460,42218=>890,42219=>616,42220=>549,42221=>617,42222=>615,42223=>615,42224=>568,42225=>568,42226=>265,42227=>708,42228=>659,42229=>659,42230=>501,42231=>690,42232=>270,42233=>270,42234=>536,42235=>536,42236=>270,42237=>270,42238=>529,42239=>529,42564=>571,42565=>469,42566=>318,42567=>304,42572=>1062,42573=>925,42576=>926,42577=>815,42580=>971,42581=>757,42582=>886,42583=>762,42594=>922,42595=>833,42596=>912,42597=>810,42598=>776,42599=>907,42600=>708,42601=>550,42602=>770,42603=>641,42604=>1222,42605=>917,42606=>791,42634=>725,42635=>649,42636=>549,42637=>524,42644=>617,42645=>570,42760=>444,42761=>444,42762=>444,42763=>444,42764=>444,42765=>444,42766=>444,42767=>444,42768=>444,42769=>444,42770=>444,42771=>444,42772=>444,42773=>444,42774=>444,42779=>332,42780=>332,42781=>227,42782=>227,42783=>227,42786=>347,42787=>320,42788=>424,42789=>424,42790=>677,42791=>570,42792=>790,42793=>638,42794=>553,42795=>486,42800=>441,42801=>469,42802=>1125,42803=>886,42804=>1097,42805=>900,42806=>1039,42807=>896,42808=>874,42809=>736,42810=>874,42811=>736,42812=>863,42813=>736,42814=>628,42815=>494,42816=>590,42817=>521,42822=>612,42823=>353,42824=>523,42825=>384,42826=>726,42827=>633,42830=>1222,42831=>917,42832=>542,42833=>571,42834=>660,42835=>697,42838=>708,42839=>571,42852=>544,42853=>571,42854=>544,42855=>571,42880=>501,42881=>250,42882=>662,42883=>570,42889=>303,42890=>338,42891=>360,42892=>247,42893=>617,42894=>438,42896=>695,42897=>600,42912=>697,42913=>571,42914=>590,42915=>521,42916=>673,42917=>570,42918=>625,42919=>370,42920=>571,42921=>469,42922=>784,43002=>823,43003=>518,43004=>542,43005=>776,43006=>265,43007=>1079,61184=>192,61185=>214,61186=>231,61187=>237,61188=>240,61189=>214,61190=>192,61191=>214,61192=>231,61193=>237,61194=>231,61195=>214,61196=>192,61197=>214,61198=>231,61199=>237,61200=>231,61201=>214,61202=>192,61203=>214,61204=>240,61205=>237,61206=>231,61207=>214,61208=>192,61209=>247,62464=>522,62465=>522,62466=>561,62467=>800,62468=>526,62469=>522,62470=>587,62471=>793,62472=>500,62473=>522,62474=>1051,62475=>530,62476=>531,62477=>782,62478=>522,62479=>530,62480=>822,62481=>531,62482=>658,62483=>524,62484=>785,62485=>530,62486=>805,62487=>530,62488=>530,62489=>531,62490=>584,62491=>530,62492=>530,62493=>539,62494=>531,62495=>464,62496=>521,62497=>525,62498=>522,62499=>522,62500=>522,62501=>574,62502=>859,62504=>838,62505=>727,62506=>457,62507=>457,62508=>457,62509=>457,62510=>457,62511=>457,62512=>457,62513=>457,62514=>457,62515=>457,62516=>466,62517=>466,62518=>466,62519=>708,62520=>708,62521=>708,62522=>708,62523=>708,62524=>492,62525=>492,62526=>492,62527=>492,62528=>492,62529=>492,63173=>550,64256=>649,64257=>581,64258=>581,64259=>899,64260=>899,64261=>617,64262=>774,64275=>1081,64276=>1081,64277=>1076,64278=>1067,64279=>1376,64285=>201,64286=>0,64287=>423,64288=>572,64289=>770,64290=>696,64291=>815,64292=>694,64293=>759,64294=>769,64295=>726,64296=>788,64297=>754,64298=>637,64299=>637,64300=>637,64301=>637,64302=>602,64303=>602,64304=>602,64305=>520,64306=>371,64307=>491,64308=>588,64309=>245,64310=>312,64311=>900,64312=>583,64313=>276,64314=>483,64315=>476,64316=>511,64317=>900,64318=>611,64319=>900,64320=>360,64321=>584,64322=>900,64323=>576,64324=>562,64325=>900,64326=>534,64327=>638,64328=>508,64329=>637,64330=>591,64331=>245,64332=>520,64333=>476,64334=>562,64335=>566,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>923,65535=>540); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusanscondensedi.z b/lib/combodo/tcpdf/fonts/dejavusanscondensedi.z deleted file mode 100644 index aa35d093a..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusanscondensedi.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansextralight.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansextralight.ctg.z deleted file mode 100644 index d5fff04b7..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansextralight.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansextralight.php b/lib/combodo/tcpdf/fonts/dejavusansextralight.php deleted file mode 100644 index f916c3355..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansextralight.php +++ /dev/null @@ -1,16 +0,0 @@ -32,'FontBBox'=>'[-733 -269 1659 1104]','ItalicAngle'=>0,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>17,'StemH'=>7,'AvgWidth'=>506,'MaxWidth'=>1735,'MissingWidth'=>600); -$cbbox=array(0=>array(50,-177,550,705),33=>array(177,0,224,729),34=>array(113,458,345,729),35=>array(77,0,761,718),36=>array(83,-147,556,760),37=>array(74,-14,875,742),38=>array(86,-14,718,742),39=>array(113,458,160,729),40=>array(109,-132,287,760),41=>array(109,-132,287,760),42=>array(37,286,461,742),43=>array(106,0,732,627),44=>array(114,-116,183,62),45=>array(49,254,312,294),46=>array(134,0,184,62),47=>array(16,-93,321,729),48=>array(89,-15,543,742),49=>array(110,0,520,729),50=>array(69,0,536,742),51=>array(76,-14,531,742),52=>array(49,0,556,729),53=>array(99,-14,525,729),54=>array(97,-14,549,742),55=>array(82,0,525,729),56=>array(94,-14,542,742),57=>array(97,-14,549,742),58=>array(144,0,193,480),59=>array(125,-116,193,480),60=>array(106,64,732,560),61=>array(106,215,732,412),62=>array(106,64,732,560),63=>array(76,0,439,742),64=>array(108,-186,917,708),65=>array(30,0,651,729),66=>array(123,0,587,729),67=>array(83,-14,644,742),68=>array(122,0,687,729),69=>array(122,0,542,729),70=>array(122,0,492,729),71=>array(83,-14,668,742),72=>array(122,0,628,729),73=>array(121,0,172,729),74=>array(5,-178,171,729),75=>array(173,0,644,729),76=>array(122,0,526,729),77=>array(161,0,702,729),78=>array(121,0,596,729),79=>array(82,-14,706,742),80=>array(122,0,542,729),81=>array(82,-129,706,742),82=>array(123,0,641,729),83=>array(89,-14,553,742),84=>array(22,0,589,729),85=>array(112,-14,620,729),86=>array(30,0,651,729),87=>array(69,0,895,729),88=>array(59,0,629,729),89=>array(22,0,587,729),90=>array(45,0,640,729),91=>array(113,-132,280,760),92=>array(16,-93,321,729),93=>array(113,-132,280,760),94=>array(125,457,713,729),95=>array(-10,-236,510,-198),96=>array(100,617,299,800),97=>array(82,-14,500,560),98=>array(114,-14,555,760),99=>array(68,-14,488,560),100=>array(114,-14,555,760),101=>array(79,-14,540,560),102=>array(45,0,349,760),103=>array(81,-208,521,560),104=>array(113,0,526,760),105=>array(112,0,157,760),106=>array(-18,-208,162,760),107=>array(159,0,547,760),108=>array(113,0,158,760),109=>array(113,0,868,560),110=>array(113,0,526,560),111=>array(79,-17,532,560),112=>array(114,-208,555,560),113=>array(114,-208,555,560),114=>array(114,0,410,560),115=>array(75,-14,449,560),116=>array(50,0,346,702),117=>array(113,-13,526,547),118=>array(63,0,528,547),119=>array(63,0,726,547),120=>array(56,0,536,547),121=>array(54,-189,538,547),122=>array(43,0,482,547),123=>array(169,-163,431,760),124=>array(146,-236,193,764),125=>array(169,-163,431,760),126=>array(106,250,732,382),161=>array(177,0,224,729),162=>array(109,-153,527,699),163=>array(63,0,548,742),164=>array(60,54,577,573),165=>array(62,0,574,729),166=>array(142,-171,190,699),167=>array(46,-85,446,742),168=>array(159,699,342,758),169=>array(138,0,862,725),170=>array(68,249,404,742),171=>array(94,86,535,500),172=>array(105,141,716,399),173=>array(49,254,312,294),174=>array(138,0,862,725),175=>array(104,702,396,745),176=>array(116,451,384,720),177=>array(105,0,732,627),178=>array(46,358,338,742),179=>array(48,345,340,742),180=>array(181,616,380,800),181=>array(107,-208,618,547),182=>array(84,-96,516,729),183=>array(133,306,184,367),184=>array(142,-188,333,0),185=>array(67,359,346,729),186=>array(63,249,408,742),187=>array(94,86,535,500),188=>array(67,-14,923,742),189=>array(67,-14,906,742),190=>array(48,-14,923,742),191=>array(76,-14,439,728),192=>array(30,0,651,927),193=>array(30,0,651,927),194=>array(30,0,651,928),195=>array(30,0,651,914),196=>array(30,0,651,913),197=>array(30,0,651,920),198=>array(27,0,910,729),199=>array(83,-188,644,742),200=>array(122,0,542,927),201=>array(122,0,542,927),202=>array(122,0,542,928),203=>array(122,0,542,913),204=>array(47,0,199,927),205=>array(95,0,246,927),206=>array(7,0,288,928),207=>array(56,0,239,913),208=>array(5,0,687,729),209=>array(121,0,596,914),210=>array(82,-14,706,927),211=>array(82,-14,706,927),212=>array(82,-14,706,928),213=>array(82,-14,706,914),214=>array(82,-14,706,913),215=>array(161,54,677,573),216=>array(59,-29,730,754),217=>array(112,-14,620,927),218=>array(112,-14,620,927),219=>array(112,-14,620,928),220=>array(112,-14,620,913),221=>array(22,0,587,927),222=>array(122,0,543,729),223=>array(133,-14,576,760),224=>array(82,-14,500,800),225=>array(82,-14,500,800),226=>array(82,-14,500,800),227=>array(82,-14,500,767),228=>array(82,-14,500,758),229=>array(82,-14,500,864),230=>array(82,-14,914,561),231=>array(68,-188,488,560),232=>array(79,-14,540,800),233=>array(79,-14,540,800),234=>array(79,-14,540,800),235=>array(79,-14,540,758),236=>array(-11,0,188,800),237=>array(70,0,270,800),238=>array(-0,0,280,800),239=>array(48,0,231,758),240=>array(79,-14,531,760),241=>array(113,0,526,767),242=>array(79,-17,532,800),243=>array(79,-17,532,800),244=>array(79,-17,532,800),245=>array(79,-17,532,767),246=>array(79,-17,532,758),247=>array(105,73,732,554),248=>array(39,-42,569,589),249=>array(113,-13,526,800),250=>array(113,-13,526,800),251=>array(113,-13,526,800),252=>array(113,-13,526,758),253=>array(54,-189,538,800),254=>array(114,-208,555,760),255=>array(54,-189,538,758),256=>array(30,0,651,899),257=>array(82,-14,500,745),258=>array(30,0,651,946),259=>array(82,-14,500,765),260=>array(30,-188,726,729),261=>array(82,-188,604,560),262=>array(83,-14,644,927),263=>array(68,-14,488,800),264=>array(83,-14,644,928),265=>array(68,-14,488,800),266=>array(83,-14,644,876),267=>array(68,-14,488,722),268=>array(83,-14,644,928),269=>array(68,-14,488,800),270=>array(122,0,687,938),271=>array(114,-14,707,760),272=>array(5,0,687,729),273=>array(79,-14,596,760),274=>array(122,0,542,900),275=>array(79,-14,540,745),276=>array(122,0,542,928),277=>array(79,-14,540,785),278=>array(122,0,542,876),279=>array(79,-14,540,722),280=>array(122,-188,589,729),281=>array(79,-188,548,560),282=>array(122,0,542,925),283=>array(79,-14,540,797),284=>array(83,-14,668,928),285=>array(81,-208,521,800),286=>array(83,-14,668,928),287=>array(81,-208,521,785),288=>array(83,-14,668,876),289=>array(81,-208,521,722),290=>array(83,-250,668,742),291=>array(81,-208,521,775),292=>array(122,0,628,928),293=>array(-5,0,526,928),294=>array(121,0,791,729),295=>array(70,0,556,760),296=>array(2,0,291,914),297=>array(-7,0,284,767),298=>array(1,0,293,899),299=>array(-7,0,285,745),300=>array(-5,0,300,928),301=>array(-14,0,292,785),302=>array(97,-188,288,729),303=>array(84,-188,275,760),304=>array(121,0,172,876),305=>array(112,0,157,547),306=>array(121,-178,466,729),307=>array(112,-208,439,760),308=>array(5,-178,287,928),309=>array(-18,-208,280,800),310=>array(173,-235,644,729),311=>array(159,-235,547,760),312=>array(111,0,576,547),313=>array(122,0,526,928),314=>array(113,0,267,928),315=>array(122,-235,526,729),316=>array(82,-235,181,760),317=>array(122,0,526,730),318=>array(113,0,350,761),319=>array(122,0,526,729),320=>array(113,0,288,760),321=>array(-2,0,526,729),322=>array(6,0,279,760),323=>array(121,0,596,928),324=>array(113,0,526,803),325=>array(121,-235,596,729),326=>array(113,-235,526,560),327=>array(121,0,596,921),328=>array(113,0,526,800),329=>array(127,0,693,729),330=>array(131,-178,606,729),331=>array(113,-198,526,560),332=>array(82,-14,706,899),333=>array(79,-17,532,745),334=>array(82,-14,706,928),335=>array(79,-17,532,785),336=>array(82,-14,706,927),337=>array(79,-17,532,800),338=>array(82,0,977,729),339=>array(79,-17,948,561),340=>array(123,0,641,928),341=>array(114,0,413,803),342=>array(123,-235,641,729),343=>array(79,-235,410,560),344=>array(123,0,641,921),345=>array(114,0,410,800),346=>array(89,-14,553,928),347=>array(75,-14,449,803),348=>array(89,-14,553,928),349=>array(75,-14,449,800),350=>array(89,-188,553,742),351=>array(75,-188,449,560),352=>array(89,-14,553,928),353=>array(75,-14,449,800),354=>array(22,-188,589,729),355=>array(50,-188,346,702),356=>array(22,0,589,921),357=>array(50,0,349,814),358=>array(22,0,589,729),359=>array(50,0,346,702),360=>array(112,-14,620,914),361=>array(113,-13,526,767),362=>array(112,-14,620,899),363=>array(113,-13,526,745),364=>array(112,-14,620,928),365=>array(113,-13,526,785),366=>array(112,-14,620,920),367=>array(113,-13,526,835),368=>array(112,-14,620,927),369=>array(113,-13,527,800),370=>array(112,-196,620,729),371=>array(113,-188,633,547),372=>array(69,0,895,932),373=>array(63,0,726,803),374=>array(22,0,587,932),375=>array(54,-189,538,803),376=>array(22,0,587,913),377=>array(45,0,640,928),378=>array(43,0,482,803),379=>array(45,0,640,867),380=>array(43,0,482,722),381=>array(45,0,640,928),382=>array(43,0,482,800),383=>array(45,0,349,760),384=>array(70,-14,555,760),385=>array(-48,0,587,729),386=>array(123,0,587,729),387=>array(114,-14,555,760),390=>array(83,-14,644,742),391=>array(83,-14,779,882),392=>array(68,-14,623,719),393=>array(5,0,687,729),394=>array(-49,0,687,729),395=>array(123,0,587,729),396=>array(114,-14,555,760),397=>array(76,-209,534,547),398=>array(122,0,542,729),399=>array(82,-14,706,742),400=>array(76,-14,531,742),401=>array(5,-178,492,729),402=>array(-3,-208,349,760),403=>array(83,-14,786,882),404=>array(91,-210,612,661),405=>array(113,0,863,760),406=>array(121,0,347,729),407=>array(24,0,271,729),408=>array(173,0,736,729),409=>array(112,0,500,760),410=>array(4,0,271,760),412=>array(113,-13,868,729),413=>array(5,-178,596,729),414=>array(113,-208,526,560),415=>array(82,-14,706,742),416=>array(76,-14,772,758),417=>array(82,-17,677,573),418=>array(82,-14,827,742),419=>array(79,-208,668,560),420=>array(-49,0,542,729),421=>array(114,-208,555,760),422=>array(123,-129,641,729),423=>array(89,-14,553,742),424=>array(75,-14,449,560),425=>array(98,0,568,729),427=>array(50,-208,346,702),428=>array(24,0,589,729),429=>array(50,0,346,760),430=>array(22,-178,589,729),431=>array(109,-4,797,760),432=>array(114,-13,699,573),433=>array(57,-15,707,729),434=>array(121,0,657,729),435=>array(22,0,716,729),436=>array(54,-189,674,560),437=>array(45,0,640,729),438=>array(43,0,482,547),448=>array(123,-208,172,729),449=>array(123,-208,370,729),450=>array(27,-208,434,729),451=>array(124,0,171,729),452=>array(122,0,1352,928),453=>array(122,0,1211,800),454=>array(114,-14,1071,800),455=>array(122,-178,742,729),456=>array(122,-208,711,760),457=>array(113,-208,344,760),458=>array(121,-178,842,729),459=>array(121,-208,817,760),460=>array(113,-208,711,760),461=>array(30,0,651,928),462=>array(82,-14,500,800),463=>array(7,0,288,928),464=>array(0,0,281,800),465=>array(82,-14,706,928),466=>array(79,-17,532,800),467=>array(112,-14,620,928),468=>array(113,-13,526,800),469=>array(112,-14,620,1025),470=>array(113,-13,526,899),471=>array(112,-14,620,1044),472=>array(113,-13,526,892),473=>array(112,-14,620,1044),474=>array(113,-13,526,892),475=>array(112,-14,620,1047),476=>array(113,-13,526,892),477=>array(79,-14,540,560),478=>array(30,0,651,1025),479=>array(82,-14,500,899),480=>array(30,0,651,1025),481=>array(82,-14,500,869),482=>array(27,0,910,900),483=>array(82,-14,914,743),484=>array(83,-14,752,742),485=>array(81,-208,598,560),486=>array(83,-14,668,928),487=>array(81,-208,521,798),488=>array(63,0,644,928),489=>array(42,0,547,928),490=>array(82,-196,706,742),491=>array(79,-196,532,560),492=>array(82,-196,706,899),493=>array(79,-196,532,745),496=>array(-18,-208,281,800),497=>array(122,0,1352,729),498=>array(122,0,1211,729),499=>array(114,-14,1071,760),500=>array(83,-14,668,928),501=>array(81,-208,521,798),504=>array(121,0,596,927),505=>array(113,0,526,799),506=>array(30,0,651,1000),507=>array(82,-14,611,1026),508=>array(27,0,910,928),509=>array(82,-14,914,798),510=>array(59,-29,730,928),511=>array(39,-42,569,798),512=>array(30,0,651,930),513=>array(82,-14,500,799),514=>array(30,0,651,901),515=>array(82,-14,500,785),516=>array(122,0,542,930),517=>array(79,-14,540,798),518=>array(122,0,542,901),519=>array(79,-14,540,785),520=>array(-29,0,287,930),521=>array(-13,0,299,798),522=>array(2,0,308,901),523=>array(-14,0,292,785),524=>array(82,-14,706,930),525=>array(79,-17,532,799),526=>array(82,-14,706,901),527=>array(79,-17,532,785),528=>array(112,0,641,930),529=>array(81,0,410,798),530=>array(123,0,641,901),531=>array(114,0,421,785),532=>array(112,-14,620,930),533=>array(113,-13,526,799),534=>array(112,-14,620,901),535=>array(113,-13,526,785),536=>array(89,-240,553,742),537=>array(75,-240,449,560),538=>array(22,-240,589,729),539=>array(50,-240,346,702),542=>array(122,0,628,928),543=>array(0,0,526,928),548=>array(45,-206,640,729),549=>array(43,-208,482,547),550=>array(30,0,651,878),551=>array(82,-14,500,723),552=>array(122,-188,542,729),553=>array(79,-188,540,560),554=>array(82,-14,706,1025),555=>array(79,-17,532,899),556=>array(82,-14,706,1025),557=>array(79,-17,532,864),558=>array(82,-14,706,876),559=>array(79,-17,532,722),560=>array(82,-14,706,1025),561=>array(79,-17,532,899),562=>array(22,0,587,899),563=>array(54,-189,538,745),567=>array(-18,-208,162,547),568=>array(114,-14,952,760),569=>array(114,-208,952,560),581=>array(30,0,651,729),584=>array(5,-178,290,729),585=>array(-18,-208,264,760),587=>array(114,-208,690,560),588=>array(5,0,641,729),589=>array(8,0,410,560),592=>array(87,-14,505,560),593=>array(114,-14,555,560),594=>array(114,-14,555,560),595=>array(114,-14,555,760),596=>array(68,-14,488,560),598=>array(114,-208,690,760),599=>array(114,-14,690,760),600=>array(79,-14,540,560),601=>array(79,-14,540,560),603=>array(89,-14,473,561),604=>array(89,-14,473,561),607=>array(-18,-208,264,547),608=>array(81,-208,656,719),609=>array(81,-208,521,547),611=>array(126,-210,576,547),613=>array(113,-208,526,547),614=>array(113,0,526,760),615=>array(113,-208,526,760),616=>array(10,0,268,760),617=>array(114,0,271,547),618=>array(57,0,314,547),621=>array(114,-208,271,760),623=>array(113,-13,868,547),624=>array(113,-208,868,547),625=>array(113,-208,868,560),626=>array(-21,-208,526,560),627=>array(113,-208,661,560),628=>array(114,0,523,547),629=>array(79,-17,532,560),632=>array(81,-208,579,754),633=>array(0,-13,296,547),634=>array(0,-13,296,755),635=>array(0,-208,432,547),636=>array(114,-207,410,560),637=>array(114,-208,410,560),638=>array(64,0,437,560),639=>array(94,0,466,560),640=>array(48,0,482,547),641=>array(48,0,482,547),642=>array(75,-208,449,560),643=>array(-3,-208,349,760),645=>array(38,-208,390,547),647=>array(50,-155,346,547),648=>array(50,-208,346,702),649=>array(57,-13,586,547),650=>array(55,-15,564,547),651=>array(114,0,496,547),652=>array(63,0,528,547),653=>array(63,0,726,547),654=>array(54,0,538,736),656=>array(43,-208,593,547),665=>array(113,0,506,547),668=>array(113,0,541,547),670=>array(132,-212,520,548),671=>array(125,0,481,560),672=>array(114,-208,718,760),675=>array(78,-14,946,760),678=>array(69,0,752,702),679=>array(50,-208,623,760),681=>array(45,-198,782,760),682=>array(113,0,634,760),683=>array(113,0,585,760),686=>array(0,-208,548,760),687=>array(0,-208,683,760),699=>array(114,499,183,729),700=>array(114,499,183,729),702=>array(57,492,191,760),710=>array(110,616,391,800),711=>array(110,616,391,800),713=>array(104,702,396,745),714=>array(181,616,380,800),715=>array(100,617,299,800),717=>array(104,-127,396,-84),718=>array(100,-235,299,-53),719=>array(181,-236,380,-53),728=>array(97,645,403,785),729=>array(228,658,272,722),730=>array(130,624,370,864),731=>array(173,-188,364,0),732=>array(104,650,395,767),733=>array(130,615,441,800),741=>array(104,0,372,668),742=>array(104,0,372,668),743=>array(104,0,372,668),744=>array(104,0,372,668),745=>array(104,0,372,668),755=>array(130,-238,370,3),759=>array(104,-170,395,-54),768=>array(-401,617,-202,800),769=>array(-320,616,-121,800),770=>array(-391,616,-110,800),771=>array(-397,650,-106,767),772=>array(-394,702,-102,745),773=>array(-510,686,10,724),774=>array(-407,645,-101,785),775=>array(-268,658,-223,722),776=>array(-342,699,-159,758),777=>array(-340,618,-161,847),778=>array(-371,624,-131,864),779=>array(-368,615,-57,800),780=>array(-388,616,-107,800),781=>array(-271,615,-229,832),782=>array(-383,615,-117,832),783=>array(-438,615,-126,800),784=>array(-407,645,-101,819),785=>array(-407,645,-101,785),786=>array(-210,489,-110,645),787=>array(-278,635,-187,844),788=>array(-305,635,-213,844),789=>array(-48,575,42,760),790=>array(-401,-266,-202,-83),791=>array(-320,-267,-121,-83),795=>array(-123,382,65,573),803=>array(-272,-184,-228,-120),804=>array(-342,-143,-159,-84),805=>array(-355,-241,-146,-32),806=>array(-308,-240,-209,-84),807=>array(-358,-188,-167,0),808=>array(-327,-188,-136,0),812=>array(-388,-269,-107,-85),813=>array(-391,-267,-110,-83),814=>array(-407,-222,-101,-82),815=>array(-407,-224,-101,-83),816=>array(-397,-211,-106,-95),817=>array(-394,-127,-102,-84),818=>array(-510,-236,10,-198),819=>array(-510,-236,10,-41),820=>array(-557,240,-41,343),821=>array(-317,266,-60,306),822=>array(-635,266,0,306),823=>array(-568,-42,-38,589),824=>array(-733,-29,-63,754),831=>array(-510,528,10,724),856=>array(-272,658,-228,722),860=>array(-446,-237,445,-59),861=>array(-446,802,445,980),865=>array(-446,751,446,929),880=>array(122,0,579,729),881=>array(114,0,497,547),882=>array(123,0,739,729),883=>array(121,0,527,729),884=>array(78,557,203,800),885=>array(78,-208,203,35),886=>array(123,0,632,729),887=>array(113,0,545,547),890=>array(210,-208,300,-45),891=>array(68,-14,488,560),892=>array(68,-14,488,560),893=>array(68,-14,488,560),894=>array(125,-116,193,480),900=>array(181,616,380,800),901=>array(159,699,380,978),902=>array(30,0,651,800),903=>array(133,306,184,367),904=>array(-12,0,657,800),905=>array(-6,0,739,800),906=>array(-9,0,286,800),908=>array(-7,-14,725,800),910=>array(-15,0,795,800),911=>array(-18,0,733,800),912=>array(57,0,279,978),913=>array(30,0,651,729),914=>array(123,0,587,729),915=>array(122,0,552,729),916=>array(30,0,651,729),917=>array(122,0,542,729),918=>array(45,0,640,729),919=>array(122,0,628,729),920=>array(82,-14,706,742),921=>array(121,0,172,729),922=>array(173,0,644,729),923=>array(30,0,651,729),924=>array(161,0,702,729),925=>array(121,0,596,729),926=>array(98,0,548,729),927=>array(82,-14,706,742),928=>array(123,0,629,729),929=>array(122,0,542,729),931=>array(98,0,568,729),932=>array(22,0,589,729),933=>array(22,0,587,729),934=>array(83,0,711,729),935=>array(59,0,629,729),936=>array(82,0,706,729),937=>array(57,0,707,744),938=>array(56,0,239,913),939=>array(22,0,587,913),940=>array(80,-12,596,800),941=>array(89,-14,473,800),942=>array(113,-208,526,800),943=>array(90,0,290,800),944=>array(96,0,498,978),945=>array(80,-12,596,559),946=>array(116,-208,542,760),947=>array(16,-208,539,547),948=>array(76,-14,534,742),949=>array(89,-14,473,561),950=>array(67,-210,496,760),951=>array(113,-208,526,560),952=>array(79,-11,534,768),953=>array(114,0,271,547),954=>array(113,0,530,547),955=>array(54,0,538,736),956=>array(107,-208,618,547),957=>array(67,0,491,547),958=>array(68,-210,479,760),959=>array(79,-17,532,560),960=>array(36,-14,574,547),961=>array(113,-208,555,560),962=>array(68,-210,488,560),963=>array(81,-14,581,547),964=>array(59,0,542,547),965=>array(96,0,498,547),966=>array(81,-208,579,556),967=>array(29,-208,549,547),968=>array(74,-208,583,547),969=>array(90,-14,735,547),970=>array(57,0,279,758),971=>array(96,0,498,758),972=>array(79,-17,532,800),973=>array(96,0,498,800),974=>array(90,-14,735,800),975=>array(173,-208,644,729),981=>array(81,-208,579,754),982=>array(56,-14,769,547),984=>array(82,-207,706,742),985=>array(79,-207,532,560),988=>array(122,0,492,729),1009=>array(113,-208,555,560),1010=>array(68,-14,488,560),1011=>array(-18,-208,162,760),1012=>array(82,-14,706,742),1013=>array(68,-14,480,560),1014=>array(95,-14,507,560),1015=>array(122,0,543,729),1016=>array(114,-208,555,760),1017=>array(83,-14,644,742),1020=>array(42,-208,555,560),1021=>array(83,-14,644,742),1022=>array(83,-14,644,742),1023=>array(83,-14,644,742),1024=>array(122,0,542,927),1025=>array(122,0,542,898),1026=>array(21,-178,684,729),1027=>array(122,0,552,927),1028=>array(83,-14,644,742),1029=>array(89,-14,553,742),1030=>array(121,0,172,729),1031=>array(56,0,239,913),1032=>array(5,-178,171,729),1033=>array(51,-14,996,729),1034=>array(122,0,947,729),1035=>array(21,0,684,729),1036=>array(123,0,616,927),1037=>array(123,0,632,927),1038=>array(44,-14,565,928),1039=>array(123,-157,629,729),1040=>array(30,0,651,729),1041=>array(123,0,587,729),1042=>array(123,0,587,729),1043=>array(122,0,552,729),1044=>array(80,-157,696,729),1045=>array(122,0,542,729),1046=>array(58,0,982,729),1047=>array(76,-14,565,742),1048=>array(123,0,632,729),1049=>array(123,0,632,928),1050=>array(123,0,616,729),1051=>array(51,-14,628,729),1052=>array(161,0,702,729),1053=>array(122,0,628,729),1054=>array(82,-14,706,742),1055=>array(123,0,629,729),1056=>array(122,0,542,729),1057=>array(83,-14,644,742),1058=>array(22,0,589,729),1059=>array(44,-14,565,729),1060=>array(93,0,767,729),1061=>array(59,0,629,729),1062=>array(122,-157,696,729),1063=>array(116,0,568,729),1064=>array(122,0,946,729),1065=>array(122,-157,1014,729),1066=>array(25,0,737,729),1067=>array(123,0,759,729),1068=>array(123,0,587,729),1069=>array(83,-14,644,742),1070=>array(121,-14,949,742),1071=>array(84,0,571,729),1072=>array(82,-14,500,560),1073=>array(79,-17,532,777),1074=>array(113,0,506,547),1075=>array(120,0,452,547),1076=>array(73,-138,607,547),1077=>array(79,-14,540,560),1078=>array(63,0,845,547),1079=>array(89,-14,473,561),1080=>array(113,0,545,547),1081=>array(113,0,545,760),1082=>array(113,0,530,547),1083=>array(47,-14,538,547),1084=>array(137,0,617,547),1085=>array(113,0,541,547),1086=>array(79,-17,532,560),1087=>array(113,0,541,547),1088=>array(114,-208,555,560),1089=>array(68,-14,488,560),1090=>array(34,0,515,547),1091=>array(54,-189,538,547),1092=>array(74,-208,781,760),1093=>array(56,0,536,547),1094=>array(112,-138,610,547),1095=>array(97,0,477,547),1096=>array(112,0,800,547),1097=>array(112,-138,868,547),1098=>array(41,0,643,547),1099=>array(113,0,649,547),1100=>array(113,0,506,547),1101=>array(68,-14,479,560),1102=>array(112,-14,734,563),1103=>array(66,0,479,547),1104=>array(79,-14,540,802),1105=>array(79,-14,540,722),1106=>array(41,-208,536,760),1107=>array(120,0,452,803),1108=>array(68,-14,479,560),1109=>array(75,-14,449,560),1110=>array(112,0,157,760),1111=>array(48,0,231,758),1112=>array(-18,-208,162,760),1113=>array(47,-14,818,547),1114=>array(114,0,818,547),1115=>array(41,0,544,760),1116=>array(113,0,530,803),1117=>array(113,0,545,802),1118=>array(54,-189,538,760),1119=>array(116,-138,546,547),1121=>array(90,-14,735,547),1122=>array(20,0,669,729),1123=>array(15,0,583,760),1124=>array(121,-14,890,742),1125=>array(112,-14,688,560),1136=>array(82,0,706,729),1137=>array(74,-208,583,547),1138=>array(82,-14,706,742),1168=>array(122,0,526,879),1169=>array(120,0,452,701),1176=>array(76,-188,565,742),1177=>array(89,-188,473,561),1184=>array(11,0,763,729),1185=>array(22,0,648,547),1188=>array(122,0,1008,729),1189=>array(114,0,829,547),1194=>array(83,-188,644,742),1195=>array(68,-188,488,560),1198=>array(22,0,587,729),1199=>array(54,-211,538,547),1204=>array(22,-157,885,729),1205=>array(22,-138,761,547),1210=>array(116,0,568,729),1211=>array(113,0,526,760),1216=>array(113,0,158,760),1217=>array(58,0,982,928),1218=>array(63,0,845,785),1223=>array(122,-208,628,729),1224=>array(113,-208,541,547),1232=>array(30,0,651,946),1233=>array(82,-14,500,765),1234=>array(30,0,651,913),1235=>array(82,-14,500,758),1236=>array(27,0,910,729),1237=>array(82,-14,914,561),1238=>array(122,0,542,928),1239=>array(79,-14,540,785),1240=>array(82,-14,706,742),1241=>array(79,-14,540,560),1242=>array(82,-14,706,913),1243=>array(79,-14,540,758),1244=>array(58,0,982,913),1245=>array(63,0,845,758),1246=>array(76,-14,565,913),1247=>array(89,-14,473,758),1250=>array(123,0,632,899),1251=>array(113,0,545,745),1252=>array(123,0,632,913),1253=>array(113,0,545,758),1254=>array(82,-14,706,913),1255=>array(79,-17,532,758),1256=>array(82,-14,706,742),1257=>array(79,-17,532,560),1258=>array(82,-14,706,913),1259=>array(79,-17,532,758),1260=>array(83,-14,644,913),1261=>array(68,-14,479,758),1262=>array(44,-14,565,899),1263=>array(54,-189,538,745),1264=>array(44,-14,565,913),1265=>array(54,-189,538,758),1266=>array(44,-14,565,927),1267=>array(54,-189,538,800),1268=>array(116,0,568,913),1269=>array(97,0,477,758),1272=>array(123,0,759,913),1273=>array(113,0,649,758),1278=>array(59,0,629,729),1279=>array(56,0,536,547),1280=>array(99,0,563,729),1281=>array(83,0,477,547),1296=>array(76,-14,531,742),1297=>array(89,-14,473,561),1298=>array(51,-208,628,729),1299=>array(47,-208,538,547),1300=>array(51,-14,1113,729),1301=>array(47,-14,938,547),1306=>array(82,-129,706,742),1307=>array(114,-208,555,560),1308=>array(69,0,895,729),1309=>array(63,0,726,547),1329=>array(112,-29,719,729),1330=>array(112,0,634,743),1331=>array(73,0,716,743),1332=>array(78,0,731,743),1333=>array(112,-14,634,729),1334=>array(103,0,676,743),1335=>array(112,0,596,729),1336=>array(112,0,634,743),1337=>array(112,-15,853,743),1338=>array(78,-14,721,729),1339=>array(112,0,620,729),1340=>array(122,0,526,729),1341=>array(112,-14,929,729),1342=>array(119,-14,781,743),1343=>array(111,0,620,729),1344=>array(44,-12,591,729),1345=>array(93,-21,666,743),1346=>array(78,0,731,743),1347=>array(59,0,746,740),1348=>array(112,-14,765,729),1349=>array(79,-15,649,744),1350=>array(24,-14,677,729),1351=>array(103,-15,677,729),1352=>array(112,0,620,743),1353=>array(88,-15,660,743),1354=>array(73,0,777,743),1355=>array(107,0,685,743),1356=>array(112,0,783,743),1357=>array(112,-14,620,729),1358=>array(78,0,731,729),1359=>array(87,-15,649,744),1360=>array(112,0,620,743),1361=>array(79,-15,649,744),1362=>array(112,0,563,729),1363=>array(78,0,706,729),1364=>array(73,0,669,743),1365=>array(82,-14,706,742),1366=>array(83,-11,711,729),1370=>array(114,499,183,729),1371=>array(17,670,216,853),1372=>array(2,669,346,925),1373=>array(5,670,205,853),1374=>array(16,666,358,872),1375=>array(0,702,366,745),1377=>array(113,-13,868,547),1378=>array(113,-208,526,560),1379=>array(78,-208,678,560),1380=>array(113,-208,718,560),1381=>array(113,-13,526,760),1382=>array(78,-208,677,560),1383=>array(113,0,526,760),1384=>array(113,-208,526,560),1385=>array(113,-208,796,560),1386=>array(78,-13,678,760),1387=>array(113,-208,526,760),1388=>array(113,-208,355,547),1389=>array(113,-208,799,760),1390=>array(79,-17,532,774),1391=>array(113,-208,526,760),1392=>array(113,0,526,760),1393=>array(74,-13,509,760),1394=>array(113,-208,687,560),1395=>array(68,-13,537,789),1396=>array(113,-13,695,760),1397=>array(-18,-208,162,547),1398=>array(0,-13,556,760),1399=>array(62,-208,483,562),1400=>array(113,0,526,560),1401=>array(30,-208,359,563),1402=>array(113,-208,868,547),1403=>array(56,-208,502,562),1404=>array(113,0,602,560),1405=>array(113,-13,526,547),1406=>array(113,-208,676,760),1407=>array(113,-13,895,560),1408=>array(113,-208,526,560),1409=>array(81,-208,521,560),1410=>array(113,0,453,547),1411=>array(113,-208,895,760),1412=>array(59,-208,571,560),1413=>array(79,-17,532,560),1414=>array(69,-208,826,760),1415=>array(113,-13,812,760),1417=>array(144,0,193,480),1418=>array(49,208,312,294),1652=>array(67,810,234,1048),4304=>array(49,0,420,550),4305=>array(49,0,420,770),4306=>array(49,-222,469,511),4307=>array(49,-222,677,511),4308=>array(49,-222,420,511),4309=>array(49,-222,419,511),4310=>array(39,0,419,770),4311=>array(49,0,661,511),4312=>array(49,5,419,511),4313=>array(49,-222,420,510),4314=>array(49,-222,921,513),4315=>array(49,0,420,770),4316=>array(59,0,430,764),4317=>array(49,5,694,511),4318=>array(49,0,420,770),4319=>array(49,-222,420,524),4320=>array(49,5,705,771),4321=>array(59,0,430,770),4322=>array(49,-222,529,604),4323=>array(17,-222,418,511),4324=>array(68,-222,671,511),4325=>array(49,-222,419,770),4326=>array(49,-222,694,511),4327=>array(49,-222,420,506),4328=>array(49,0,420,770),4329=>array(59,5,430,770),4330=>array(49,-222,464,511),4331=>array(49,0,420,770),4332=>array(59,0,430,770),4333=>array(49,-222,419,770),4334=>array(59,0,430,770),4335=>array(49,-222,420,551),4336=>array(49,0,419,770),4337=>array(49,0,419,770),4338=>array(49,-78,420,511),4339=>array(49,-222,420,510),4340=>array(49,-222,420,769),4341=>array(49,0,476,770),4342=>array(49,-222,706,511),4343=>array(49,-222,468,511),4344=>array(49,-222,420,506),4345=>array(49,-222,470,511),4346=>array(49,-37,403,511),4347=>array(49,24,367,486),4348=>array(49,370,255,760),5760=>array(-10,267,487,307),5761=>array(-10,-125,502,307),5762=>array(-10,-125,722,307),5763=>array(-10,-125,941,307),5764=>array(-10,-125,1160,307),5765=>array(-10,-125,1379,307),5766=>array(-10,267,502,697),5767=>array(-10,267,722,697),5768=>array(-10,267,941,697),5769=>array(-10,267,1160,697),5770=>array(-10,267,1379,697),5771=>array(-10,-125,508,697),5772=>array(-10,-125,728,697),5773=>array(-10,-125,948,697),5774=>array(-10,-125,1168,697),5775=>array(-10,-125,1389,697),5776=>array(-10,41,502,533),5777=>array(-10,41,722,533),5778=>array(-10,41,939,533),5779=>array(-10,41,1159,533),5780=>array(-10,41,1379,533),5781=>array(-10,-125,508,697),5782=>array(-10,-125,762,697),5783=>array(-10,-83,798,307),5784=>array(-10,-240,1214,307),5785=>array(-10,267,1160,902),5786=>array(-10,103,693,307),5787=>array(55,49,517,523),5788=>array(-10,49,452,523),7426=>array(82,-14,914,561),7428=>array(68,-14,488,560),7433=>array(112,-213,157,547),7435=>array(111,0,576,547),7437=>array(137,0,617,547),7438=>array(113,0,545,547),7439=>array(79,-18,532,559),7440=>array(68,-14,488,560),7441=>array(55,47,632,500),7442=>array(55,57,629,476),7443=>array(31,9,662,540),7444=>array(79,-17,948,561),7446=>array(79,273,532,559),7447=>array(79,-18,533,269),7449=>array(66,0,479,547),7450=>array(66,0,479,547),7456=>array(63,0,528,547),7457=>array(63,0,726,547),7458=>array(43,0,482,547),7462=>array(120,0,452,547),7463=>array(63,0,528,547),7464=>array(113,0,541,547),7467=>array(47,-14,538,547),7543=>array(81,-208,521,560),7680=>array(30,-241,651,729),7681=>array(82,-241,500,560),7682=>array(123,0,587,875),7683=>array(114,-14,555,877),7684=>array(123,-184,587,729),7685=>array(114,-184,555,760),7686=>array(123,-127,587,729),7687=>array(114,-127,555,760),7688=>array(83,-188,644,928),7689=>array(68,-188,488,800),7690=>array(122,0,687,876),7691=>array(114,-14,555,877),7692=>array(122,-184,687,729),7693=>array(114,-184,555,760),7694=>array(122,-127,687,729),7695=>array(114,-127,555,760),7696=>array(122,-188,687,729),7697=>array(114,-188,555,760),7698=>array(122,-240,687,729),7699=>array(114,-240,555,760),7700=>array(122,0,542,1044),7701=>array(79,-14,540,921),7702=>array(122,0,542,1044),7703=>array(79,-14,540,921),7704=>array(122,-240,542,729),7705=>array(79,-240,540,560),7706=>array(122,-170,542,729),7707=>array(79,-170,540,560),7708=>array(122,-188,542,928),7709=>array(79,-188,540,785),7710=>array(122,0,492,876),7711=>array(45,0,349,878),7712=>array(83,-14,668,887),7713=>array(81,-208,521,745),7714=>array(122,0,628,875),7715=>array(113,0,526,877),7716=>array(122,-184,628,729),7717=>array(113,-184,526,760),7718=>array(122,0,628,914),7719=>array(44,0,526,913),7720=>array(8,-189,628,729),7721=>array(0,-189,526,760),7722=>array(122,-222,628,729),7723=>array(113,-222,526,760),7724=>array(15,-170,306,729),7725=>array(-7,-170,284,760),7726=>array(57,0,272,1044),7727=>array(47,0,263,886),7728=>array(173,0,644,928),7729=>array(116,0,547,928),7730=>array(173,-184,644,729),7731=>array(159,-184,547,760),7732=>array(173,-127,644,729),7733=>array(159,-127,547,760),7734=>array(122,-184,526,729),7735=>array(119,-184,167,760),7736=>array(1,-184,526,927),7737=>array(-1,-184,291,899),7738=>array(122,-127,526,729),7739=>array(-6,-127,286,760),7740=>array(122,-240,526,729),7741=>array(-0,-240,280,760),7742=>array(161,0,702,928),7743=>array(113,0,868,800),7744=>array(161,0,702,876),7745=>array(113,0,868,722),7746=>array(161,-184,702,729),7747=>array(113,-184,868,560),7748=>array(121,0,596,875),7749=>array(113,0,526,722),7750=>array(121,-184,596,729),7751=>array(113,-184,526,560),7752=>array(121,-127,596,729),7753=>array(113,-127,526,560),7754=>array(121,-240,596,729),7755=>array(113,-240,526,560),7756=>array(82,-14,706,1044),7757=>array(79,-17,532,881),7758=>array(82,-14,706,1042),7759=>array(79,-17,532,882),7760=>array(82,-14,706,1044),7761=>array(79,-17,532,921),7762=>array(82,-14,706,1044),7763=>array(79,-17,532,921),7764=>array(122,0,542,928),7765=>array(114,-208,555,800),7766=>array(122,0,542,876),7767=>array(114,-208,555,722),7768=>array(123,0,641,875),7769=>array(114,0,410,722),7770=>array(123,-184,641,729),7771=>array(114,-184,410,560),7772=>array(123,-184,641,899),7773=>array(114,-184,410,745),7774=>array(123,-127,641,729),7775=>array(41,-127,410,560),7776=>array(89,-14,553,876),7777=>array(75,-14,449,722),7778=>array(89,-184,553,742),7779=>array(75,-184,449,560),7780=>array(89,-14,553,928),7781=>array(75,-14,451,800),7782=>array(89,-14,553,1005),7783=>array(75,-14,449,925),7784=>array(89,-184,553,876),7785=>array(75,-184,449,723),7786=>array(22,0,589,876),7787=>array(50,0,346,877),7788=>array(22,-184,589,729),7789=>array(50,-184,346,702),7790=>array(22,-127,589,729),7791=>array(50,-127,390,702),7792=>array(22,-240,589,729),7793=>array(50,-240,379,702),7794=>array(112,-143,620,729),7795=>array(113,-143,526,547),7796=>array(112,-170,620,729),7797=>array(113,-170,526,547),7798=>array(112,-240,620,729),7799=>array(113,-240,526,547),7800=>array(112,-14,620,1044),7801=>array(113,-13,526,990),7802=>array(112,-14,620,1025),7803=>array(113,-13,526,869),7804=>array(30,0,651,926),7805=>array(63,0,528,767),7806=>array(30,-184,651,729),7807=>array(63,-184,528,547),7808=>array(69,0,895,931),7809=>array(63,0,726,802),7810=>array(69,0,895,931),7811=>array(63,0,726,803),7812=>array(69,0,895,913),7813=>array(63,0,726,758),7814=>array(69,0,895,875),7815=>array(63,0,726,722),7816=>array(69,-184,895,729),7817=>array(63,-184,726,547),7818=>array(59,0,629,876),7819=>array(56,0,536,722),7820=>array(59,0,629,913),7821=>array(56,0,536,758),7822=>array(22,0,587,876),7823=>array(54,-189,538,722),7824=>array(45,0,640,928),7825=>array(43,0,482,800),7826=>array(45,-184,640,729),7827=>array(43,-184,482,547),7828=>array(45,-127,640,729),7829=>array(43,-127,482,547),7830=>array(113,-127,526,760),7831=>array(50,0,346,913),7832=>array(63,0,726,864),7833=>array(54,-189,538,864),7834=>array(82,-14,672,760),7835=>array(45,0,349,878),7836=>array(1,0,349,760),7837=>array(45,0,349,760),7838=>array(135,-14,713,743),7839=>array(76,-14,534,742),7840=>array(30,-184,651,729),7841=>array(82,-184,500,560),7842=>array(30,0,651,1029),7843=>array(82,-14,500,847),7844=>array(30,0,651,1028),7845=>array(82,-14,566,846),7846=>array(30,0,651,1028),7847=>array(82,-14,500,847),7848=>array(30,0,651,1081),7849=>array(82,-14,545,899),7850=>array(30,0,651,1050),7851=>array(82,-14,500,868),7852=>array(30,-184,651,928),7853=>array(82,-184,500,800),7854=>array(30,0,651,1044),7855=>array(82,-14,500,877),7856=>array(30,0,651,1044),7857=>array(82,-14,500,877),7858=>array(30,0,651,1104),7859=>array(82,-14,500,938),7860=>array(30,0,651,1037),7861=>array(82,-14,500,870),7862=>array(30,-184,651,946),7863=>array(82,-184,500,765),7864=>array(122,-184,542,729),7865=>array(79,-184,540,560),7866=>array(122,0,542,1029),7867=>array(79,-14,540,847),7868=>array(122,0,542,914),7869=>array(79,-14,540,767),7870=>array(122,0,618,1028),7871=>array(79,-14,594,846),7872=>array(122,0,542,1028),7873=>array(79,-14,540,847),7874=>array(122,0,588,1081),7875=>array(79,-14,574,899),7876=>array(122,0,542,1050),7877=>array(79,-14,540,868),7878=>array(122,-184,542,928),7879=>array(79,-184,540,800),7880=>array(52,0,231,1029),7881=>array(41,0,221,847),7882=>array(121,-184,172,729),7883=>array(112,-184,162,760),7884=>array(82,-184,706,742),7885=>array(79,-184,532,560),7886=>array(82,-14,706,1029),7887=>array(79,-17,532,847),7888=>array(82,-14,706,1028),7889=>array(79,-17,582,846),7890=>array(82,-14,706,1028),7891=>array(79,-17,532,847),7892=>array(82,-14,706,1081),7893=>array(79,-17,561,899),7894=>array(82,-14,706,1050),7895=>array(79,-17,532,868),7896=>array(82,-184,706,928),7897=>array(79,-184,532,800),7898=>array(76,-14,772,927),7899=>array(82,-17,677,800),7900=>array(76,-14,772,927),7901=>array(82,-17,677,800),7902=>array(76,-14,772,1029),7903=>array(82,-17,677,847),7904=>array(76,-14,772,914),7905=>array(82,-17,677,767),7906=>array(76,-184,772,758),7907=>array(82,-184,677,573),7908=>array(112,-184,620,729),7909=>array(113,-184,526,547),7910=>array(112,-14,620,1029),7911=>array(113,-13,526,847),7912=>array(109,-4,797,927),7913=>array(114,-13,699,800),7914=>array(109,-4,797,927),7915=>array(114,-13,699,800),7916=>array(109,-4,797,1029),7917=>array(114,-13,699,847),7918=>array(109,-4,797,914),7919=>array(114,-13,699,767),7920=>array(109,-184,797,760),7921=>array(114,-184,699,573),7922=>array(22,0,587,931),7923=>array(54,-189,538,802),7924=>array(22,-184,587,729),7925=>array(54,-189,538,547),7926=>array(22,0,587,1032),7927=>array(54,-189,538,850),7928=>array(22,0,587,914),7929=>array(54,-189,538,767),7930=>array(122,0,738,729),7931=>array(16,0,462,760),7936=>array(80,-12,596,806),7937=>array(80,-12,596,806),7938=>array(80,-12,596,806),7939=>array(80,-12,596,806),7940=>array(80,-12,596,806),7941=>array(80,-12,596,806),7942=>array(80,-12,596,966),7943=>array(80,-12,596,966),7944=>array(30,0,651,806),7945=>array(30,0,651,806),7946=>array(12,0,844,806),7947=>array(18,0,844,806),7948=>array(13,0,736,806),7949=>array(17,0,768,806),7950=>array(18,0,675,966),7951=>array(17,0,709,966),7952=>array(89,-14,473,806),7953=>array(89,-14,473,806),7954=>array(89,-14,473,806),7955=>array(89,-14,473,806),7956=>array(89,-14,473,806),7957=>array(89,-14,473,806),7960=>array(13,0,622,806),7961=>array(18,0,622,806),7962=>array(12,0,876,806),7963=>array(18,0,885,806),7964=>array(13,0,809,806),7965=>array(17,0,838,806),7968=>array(113,-208,526,806),7969=>array(113,-208,526,806),7970=>array(113,-208,526,806),7971=>array(113,-208,526,806),7972=>array(113,-208,526,806),7973=>array(113,-208,526,806),7974=>array(113,-208,526,966),7975=>array(113,-208,526,966),7976=>array(13,0,713,806),7977=>array(18,0,711,806),7978=>array(12,0,962,806),7979=>array(18,0,965,806),7980=>array(13,0,903,806),7981=>array(17,0,927,806),7982=>array(18,0,810,966),7983=>array(17,0,823,966),7984=>array(85,0,271,806),7985=>array(85,0,271,806),7986=>array(-30,0,322,806),7987=>array(-20,0,329,806),7988=>array(12,0,327,806),7989=>array(-8,0,332,806),7990=>array(-11,0,280,966),7991=>array(-14,0,278,966),7992=>array(13,0,257,806),7993=>array(18,0,251,806),7994=>array(12,0,512,806),7995=>array(18,0,512,806),7996=>array(13,0,447,806),7997=>array(17,0,477,806),7998=>array(18,0,367,966),7999=>array(17,0,370,966),8000=>array(79,-17,532,806),8001=>array(79,-17,532,806),8002=>array(79,-17,532,806),8003=>array(79,-17,532,806),8004=>array(79,-17,532,806),8005=>array(79,-17,532,806),8008=>array(13,-14,723,806),8009=>array(18,-14,767,806),8010=>array(12,-14,1013,806),8011=>array(18,-14,1018,806),8012=>array(13,-14,857,806),8013=>array(17,-14,889,806),8016=>array(96,0,498,806),8017=>array(96,0,498,806),8018=>array(95,0,498,806),8019=>array(92,0,498,806),8020=>array(96,0,498,806),8021=>array(96,0,498,806),8022=>array(96,0,498,966),8023=>array(96,0,498,966),8025=>array(18,0,760,806),8027=>array(18,0,974,806),8029=>array(17,0,989,806),8031=>array(17,0,875,966),8032=>array(90,-14,735,806),8033=>array(90,-14,735,806),8034=>array(90,-14,735,806),8035=>array(90,-14,735,806),8036=>array(90,-14,735,806),8037=>array(90,-14,735,806),8038=>array(90,-14,735,966),8039=>array(90,-14,735,966),8040=>array(13,0,745,806),8041=>array(18,0,786,806),8042=>array(12,0,1032,806),8043=>array(18,0,1038,806),8044=>array(13,0,889,806),8045=>array(17,0,915,806),8046=>array(18,0,864,966),8047=>array(17,0,895,966),8048=>array(80,-12,596,800),8049=>array(80,-12,596,800),8050=>array(89,-14,473,800),8051=>array(89,-14,473,800),8052=>array(113,-208,526,800),8053=>array(113,-208,526,800),8054=>array(-40,0,271,800),8055=>array(90,0,290,800),8056=>array(79,-17,532,800),8057=>array(79,-17,532,800),8058=>array(96,0,498,800),8059=>array(96,0,498,800),8060=>array(90,-14,735,800),8061=>array(90,-14,735,800),8064=>array(80,-208,596,806),8065=>array(80,-208,596,806),8066=>array(80,-208,596,806),8067=>array(80,-208,596,806),8068=>array(80,-208,596,806),8069=>array(80,-208,596,806),8070=>array(80,-208,596,966),8071=>array(80,-208,596,966),8072=>array(30,-208,651,806),8073=>array(30,-208,651,806),8074=>array(12,-208,844,806),8075=>array(18,-208,844,806),8076=>array(13,-208,736,806),8077=>array(17,-208,768,806),8078=>array(18,-208,675,966),8079=>array(17,-208,709,966),8080=>array(113,-208,526,806),8081=>array(113,-208,526,806),8082=>array(113,-208,526,806),8083=>array(113,-208,526,806),8084=>array(113,-208,526,806),8085=>array(113,-208,526,806),8086=>array(113,-208,526,966),8087=>array(113,-208,526,966),8088=>array(13,-208,713,806),8089=>array(18,-208,711,806),8090=>array(12,-208,962,806),8091=>array(18,-208,965,806),8092=>array(13,-208,903,806),8093=>array(17,-208,927,806),8094=>array(18,-208,810,966),8095=>array(17,-208,823,966),8096=>array(90,-208,735,806),8097=>array(90,-208,735,806),8098=>array(90,-208,735,806),8099=>array(90,-208,735,806),8100=>array(90,-208,735,806),8101=>array(90,-208,735,806),8102=>array(90,-208,735,966),8103=>array(90,-208,735,966),8104=>array(13,-208,745,806),8105=>array(18,-208,786,806),8106=>array(12,-208,1032,806),8107=>array(18,-208,1038,806),8108=>array(13,-208,889,806),8109=>array(17,-208,915,806),8110=>array(18,-208,864,966),8111=>array(17,-208,895,966),8112=>array(80,-12,596,785),8113=>array(80,-12,596,745),8114=>array(80,-208,596,800),8115=>array(80,-208,596,559),8116=>array(80,-208,596,800),8118=>array(80,-12,596,767),8119=>array(80,-208,596,767),8120=>array(30,0,651,928),8121=>array(30,0,651,899),8122=>array(15,0,683,800),8123=>array(30,0,651,800),8124=>array(30,-208,651,729),8125=>array(200,597,291,806),8126=>array(210,-208,300,-45),8127=>array(200,597,291,806),8128=>array(104,650,395,767),8129=>array(104,699,395,938),8130=>array(113,-208,526,800),8131=>array(113,-208,526,560),8132=>array(113,-208,526,800),8134=>array(113,-208,526,767),8135=>array(113,-208,526,767),8136=>array(15,0,715,800),8137=>array(-12,0,657,800),8138=>array(15,0,807,800),8139=>array(-6,0,739,800),8140=>array(122,-208,628,729),8141=>array(76,597,428,806),8142=>array(97,597,413,806),8143=>array(104,597,395,966),8144=>array(-10,0,295,785),8145=>array(-14,0,278,745),8146=>array(-3,0,271,978),8147=>array(57,0,279,978),8150=>array(1,0,292,767),8151=>array(2,0,293,938),8152=>array(-5,0,300,928),8153=>array(2,0,294,899),8154=>array(15,0,352,800),8155=>array(-9,0,286,800),8157=>array(76,597,425,806),8158=>array(87,597,427,806),8159=>array(104,597,395,966),8160=>array(96,0,498,785),8161=>array(96,0,498,745),8162=>array(96,0,498,978),8163=>array(96,0,498,978),8164=>array(113,-208,555,806),8165=>array(113,-208,555,806),8166=>array(96,0,498,767),8167=>array(96,0,498,938),8168=>array(22,0,587,928),8169=>array(22,0,587,899),8170=>array(15,0,822,800),8171=>array(-15,0,795,800),8172=>array(18,0,624,806),8173=>array(100,699,342,978),8174=>array(159,699,380,978),8175=>array(100,617,299,800),8178=>array(90,-208,735,800),8179=>array(90,-208,735,547),8180=>array(90,-208,735,800),8182=>array(90,-14,735,767),8183=>array(90,-208,735,767),8184=>array(15,-14,859,800),8185=>array(-7,-14,725,800),8186=>array(15,0,865,800),8187=>array(-18,0,733,800),8188=>array(57,-208,707,744),8189=>array(181,616,380,800),8190=>array(205,597,296,806),8208=>array(49,254,312,294),8209=>array(49,254,312,294),8210=>array(49,254,587,294),8211=>array(49,254,451,294),8212=>array(49,254,951,294),8213=>array(0,254,1000,294),8214=>array(146,-236,354,764),8215=>array(-10,-236,510,-41),8216=>array(114,499,183,729),8217=>array(114,499,183,729),8218=>array(114,-117,183,116),8219=>array(-183,499,-114,729),8220=>array(114,499,385,729),8221=>array(114,499,382,729),8222=>array(114,-118,384,116),8223=>array(-382,499,-114,729),8224=>array(28,-96,472,729),8225=>array(28,-96,472,729),8228=>array(142,0,191,62),8229=>array(142,0,524,63),8230=>array(142,0,857,63),8240=>array(74,-14,1267,742),8241=>array(74,-14,1659,742),8249=>array(77,86,306,500),8250=>array(77,86,306,500),8251=>array(122,2,713,662),8252=>array(98,0,388,729),8253=>array(76,0,439,742),8254=>array(-10,686,510,724),8255=>array(-44,-237,847,-59),8256=>array(-44,751,847,929),8258=>array(37,-29,961,814),8259=>array(108,340,400,395),8260=>array(-169,-14,336,742),8261=>array(113,-132,280,760),8262=>array(113,-132,280,760),8263=>array(40,0,864,742),8264=>array(76,0,635,742),8265=>array(98,0,639,742),8267=>array(121,-96,552,729),8268=>array(105,220,352,509),8269=>array(148,220,395,509),8270=>array(37,-29,461,427),8271=>array(125,-116,193,517),8272=>array(-44,-237,847,929),8273=>array(37,-7,461,929),8274=>array(86,-93,392,729),8275=>array(49,250,951,382),8276=>array(-44,-241,847,-63),8304=>array(53,345,351,742),8305=>array(60,326,116,751),8308=>array(48,359,358,734),8320=>array(53,-14,351,383),8321=>array(67,0,346,370),8322=>array(46,-1,338,383),8323=>array(48,-14,340,383),8324=>array(48,0,358,375),8363=>array(79,-127,596,760),8364=>array(27,-14,573,742),8369=>array(81,0,576,729),8376=>array(35,0,602,729),8377=>array(51,0,583,729),8451=>array(116,-14,1053,742),8457=>array(116,0,868,729),8462=>array(39,0,525,760),8463=>array(40,0,525,760),8470=>array(121,0,1102,742),8471=>array(138,0,862,725),8486=>array(57,0,707,744),8487=>array(57,-15,707,729),8490=>array(173,0,644,729),8491=>array(30,0,651,920),8494=>array(61,-12,793,647),8498=>array(122,0,492,729),8500=>array(52,-13,413,395),8513=>array(106,-14,691,742),8514=>array(31,0,435,729),8515=>array(31,0,435,729),8516=>array(23,0,588,729),8523=>array(86,-14,718,742),8530=>array(67,-14,1319,742),8531=>array(67,-14,908,742),8532=>array(46,-14,908,742),8543=>array(67,-14,737,742),8544=>array(121,0,172,729),8545=>array(121,0,369,729),8546=>array(121,0,566,729),8547=>array(121,0,890,729),8548=>array(30,0,651,729),8549=>array(30,0,799,729),8550=>array(30,0,997,729),8551=>array(30,0,1194,729),8552=>array(121,0,861,729),8553=>array(59,0,629,729),8554=>array(59,0,810,729),8555=>array(59,0,1007,729),8556=>array(122,0,526,729),8557=>array(83,-14,644,742),8558=>array(122,0,687,729),8559=>array(161,0,702,729),8560=>array(112,0,157,760),8561=>array(112,0,337,760),8562=>array(112,0,517,760),8563=>array(112,0,748,760),8564=>array(63,0,528,547),8565=>array(63,0,690,760),8566=>array(63,0,870,760),8567=>array(63,0,1050,760),8568=>array(112,0,763,760),8569=>array(56,0,536,547),8570=>array(56,0,702,760),8571=>array(56,0,881,760),8572=>array(113,0,158,760),8573=>array(68,-14,488,560),8574=>array(114,-14,555,760),8575=>array(113,0,868,560),8576=>array(122,0,1202,729),8577=>array(122,0,687,729),8578=>array(122,0,1202,729),8579=>array(83,-14,644,742),8580=>array(68,-14,488,560),8581=>array(83,-208,644,742),8585=>array(53,-14,908,742),8592=>array(49,112,781,515),8593=>array(217,0,621,732),8594=>array(57,112,789,515),8595=>array(217,-3,621,729),8596=>array(49,112,789,515),8597=>array(217,-8,621,732),8598=>array(149,37,691,580),8599=>array(149,37,691,580),8600=>array(149,37,691,580),8601=>array(149,37,691,580),8644=>array(49,-35,789,662),8645=>array(71,-57,767,684),8646=>array(49,-35,789,662),8647=>array(49,-35,781,661),8648=>array(71,0,767,732),8649=>array(58,-35,790,661),8650=>array(71,0,767,732),8704=>array(30,0,651,729),8707=>array(122,0,542,729),8710=>array(30,0,651,729),8711=>array(30,0,651,729),8722=>array(106,293,732,334),8725=>array(16,-93,321,729),8726=>array(208,-54,514,768),8727=>array(100,85,524,542),8728=>array(179,178,447,447),8756=>array(13,121,440,562),8757=>array(13,121,440,562),8758=>array(13,121,64,563),8759=>array(13,121,441,562),8764=>array(80,283,556,415),9134=>array(234,-236,281,764),9167=>array(91,0,854,596),10731=>array(3,-233,491,807),10799=>array(161,54,677,573),11374=>array(161,-178,702,729),11375=>array(30,0,651,729),11381=>array(122,0,579,729),11382=>array(114,0,497,547),11383=>array(81,-12,579,556),11386=>array(79,-17,532,560),11800=>array(76,-14,439,728),11810=>array(113,403,280,760),11811=>array(113,403,280,760),11812=>array(113,-132,280,225),11813=>array(113,-132,280,225),11822=>array(76,0,439,742),42192=>array(123,0,587,729),42193=>array(122,0,542,729),42194=>array(62,0,481,729),42195=>array(122,0,687,729),42196=>array(22,0,589,729),42197=>array(22,0,589,729),42198=>array(83,-14,668,742),42199=>array(173,0,644,729),42200=>array(12,0,483,729),42201=>array(0,-14,389,729),42202=>array(83,-14,644,742),42203=>array(83,-14,644,742),42204=>array(45,0,640,729),42205=>array(122,0,492,729),42206=>array(122,0,492,729),42207=>array(161,0,702,729),42208=>array(121,0,596,729),42209=>array(122,0,526,729),42210=>array(89,-14,553,742),42211=>array(123,0,641,729),42212=>array(54,0,572,729),42213=>array(30,0,651,729),42214=>array(30,0,651,729),42215=>array(122,0,628,729),42216=>array(106,-14,691,742),42217=>array(123,0,512,743),42218=>array(69,0,895,729),42219=>array(59,0,629,729),42220=>array(22,0,587,729),42221=>array(68,0,532,729),42222=>array(30,0,651,729),42223=>array(30,0,651,729),42224=>array(122,0,542,729),42225=>array(89,0,510,729),42226=>array(121,0,172,729),42227=>array(82,-14,706,742),42228=>array(112,-14,620,729),42229=>array(112,0,620,743),42230=>array(31,0,435,729),42231=>array(83,0,648,729),42232=>array(98,0,202,124),42233=>array(71,-156,202,124),42234=>array(98,0,499,124),42235=>array(98,-156,499,124),42236=>array(71,-156,202,501),42237=>array(98,0,202,501),42238=>array(85,0,502,340),42239=>array(85,187,502,439),42564=>array(89,-14,553,742),42565=>array(75,-14,449,560),42566=>array(121,0,347,729),42567=>array(114,0,271,547),42576=>array(25,0,906,729),42577=>array(41,0,791,547),42580=>array(82,-14,910,742),42581=>array(79,-14,700,563),42582=>array(121,0,894,729),42583=>array(112,-14,701,560),42594=>array(80,-157,1009,729),42595=>array(73,-138,827,547),42596=>array(51,-14,1009,729),42597=>array(47,-14,825,547),42598=>array(161,0,1083,729),42599=>array(137,0,905,547),42600=>array(82,-14,706,742),42601=>array(79,-17,532,560),42602=>array(56,-14,799,742),42603=>array(55,-14,658,560),42604=>array(82,-14,1278,742),42605=>array(79,-17,940,560),42606=>array(28,-208,851,743),42636=>array(22,0,589,729),42637=>array(34,0,515,547),42644=>array(116,0,568,729),42645=>array(113,0,526,760),42760=>array(104,0,372,668),42761=>array(104,0,372,668),42762=>array(104,0,372,668),42763=>array(104,0,372,668),42764=>array(104,0,372,668),42765=>array(104,0,372,668),42766=>array(104,0,372,668),42767=>array(104,0,372,668),42768=>array(104,0,372,668),42769=>array(104,0,372,668),42770=>array(104,0,372,668),42771=>array(104,0,372,668),42772=>array(104,0,372,668),42773=>array(104,0,372,668),42774=>array(104,0,372,668),42779=>array(58,326,312,736),42780=>array(58,324,312,734),42781=>array(111,326,141,734),42782=>array(111,326,141,734),42783=>array(111,0,141,408),42786=>array(77,0,340,729),42787=>array(77,0,311,547),42788=>array(56,224,411,742),42789=>array(56,42,411,560),42790=>array(122,-178,628,729),42791=>array(113,-198,526,760),42800=>array(137,0,437,547),42801=>array(75,-14,449,560),42802=>array(30,0,1220,729),42803=>array(82,-14,873,560),42814=>array(83,-14,644,742),42815=>array(68,-14,488,560),42822=>array(148,0,625,729),42823=>array(139,0,253,760),42830=>array(82,-14,1278,742),42831=>array(79,-17,940,560),42880=>array(31,0,435,729),42881=>array(113,-208,158,560),42891=>array(177,235,224,729),42892=>array(113,458,160,729),42893=>array(116,0,568,729),43002=>array(112,0,800,547),43003=>array(83,0,453,729),43004=>array(62,0,481,729),43005=>array(161,0,702,729),43006=>array(121,0,172,928),43007=>array(80,0,1096,729),62464=>array(49,-7,477,770),62465=>array(49,-7,477,770),62466=>array(49,-7,516,770),62467=>array(49,-2,759,770),62468=>array(49,-7,477,770),62469=>array(49,-7,476,770),62470=>array(49,-7,487,770),62471=>array(49,-7,772,769),62472=>array(49,-7,476,769),62473=>array(49,-7,477,770),62474=>array(49,-2,988,770),62475=>array(49,-8,477,770),62476=>array(59,-7,486,764),62477=>array(49,-2,788,769),62478=>array(49,-7,477,770),62479=>array(49,-7,477,770),62480=>array(49,0,781,770),62481=>array(59,-7,486,770),62482=>array(49,-8,623,780),62483=>array(49,-7,506,770),62484=>array(49,-7,774,770),62485=>array(49,-7,477,770),62486=>array(49,-2,741,770),62487=>array(49,-7,477,770),62488=>array(49,-7,477,770),62489=>array(59,0,486,770),62490=>array(49,-7,554,770),62491=>array(49,-7,476,770),62492=>array(59,-7,486,770),62493=>array(49,-8,476,769),62494=>array(60,-7,486,770),62495=>array(49,-7,477,770),62496=>array(49,-7,476,770),62497=>array(49,-7,476,770),62498=>array(49,-69,477,770),62499=>array(49,-7,477,770),62500=>array(49,-7,476,769),62501=>array(49,-7,538,770),63173=>array(76,-14,534,742),64256=>array(45,0,685,760),64257=>array(45,0,513,760),64258=>array(45,0,513,760),64259=>array(45,0,849,760),64260=>array(45,0,849,760),64297=>array(106,293,732,627),65533=>array(15,-84,1011,912),65535=>array(50,-177,550,705)); -$cw=array(0=>600,32=>318,33=>401,34=>460,35=>838,36=>636,37=>950,38=>780,39=>275,40=>390,41=>390,42=>500,43=>838,44=>318,45=>361,46=>318,47=>337,48=>636,49=>636,50=>636,51=>636,52=>636,53=>636,54=>636,55=>636,56=>636,57=>636,58=>337,59=>337,60=>838,61=>838,62=>838,63=>531,64=>1000,65=>684,66=>655,67=>698,68=>770,69=>632,70=>575,71=>775,72=>752,73=>295,74=>295,75=>656,76=>557,77=>863,78=>748,79=>787,80=>603,81=>787,82=>695,83=>635,84=>611,85=>732,86=>684,87=>989,88=>685,89=>611,90=>685,91=>390,92=>337,93=>390,94=>838,95=>500,96=>500,97=>613,98=>635,99=>550,100=>635,101=>615,102=>352,103=>600,104=>634,105=>278,106=>278,107=>579,108=>278,109=>974,110=>634,111=>612,112=>635,113=>635,114=>411,115=>521,116=>392,117=>634,118=>592,119=>818,120=>592,121=>592,122=>525,123=>636,124=>337,125=>636,126=>838,160=>318,161=>401,162=>636,163=>636,164=>636,165=>636,166=>337,167=>500,168=>500,169=>1000,170=>471,171=>612,172=>838,173=>361,174=>1000,175=>500,176=>500,177=>838,178=>401,179=>401,180=>483,181=>636,182=>636,183=>318,184=>500,185=>401,186=>471,187=>612,188=>969,189=>969,190=>969,191=>536,192=>684,193=>684,194=>684,195=>684,196=>684,197=>684,198=>974,199=>698,200=>632,201=>632,202=>632,203=>632,204=>295,205=>295,206=>295,207=>295,208=>775,209=>748,210=>787,211=>787,212=>787,213=>787,214=>787,215=>838,216=>787,217=>732,218=>732,219=>732,220=>732,221=>611,222=>605,223=>676,224=>613,225=>613,226=>613,227=>613,228=>613,229=>613,230=>982,231=>550,232=>615,233=>615,234=>615,235=>615,236=>278,237=>278,238=>278,239=>278,240=>612,241=>634,242=>612,243=>612,244=>612,245=>612,246=>612,247=>838,248=>612,249=>634,250=>634,251=>634,252=>634,253=>592,254=>635,255=>592,256=>684,257=>613,258=>684,259=>613,260=>684,261=>613,262=>698,263=>550,264=>698,265=>550,266=>698,267=>550,268=>698,269=>550,270=>770,271=>635,272=>775,273=>635,274=>632,275=>615,276=>632,277=>615,278=>632,279=>615,280=>632,281=>615,282=>632,283=>615,284=>775,285=>600,286=>775,287=>600,288=>775,289=>600,290=>775,291=>600,292=>752,293=>634,294=>916,295=>695,296=>295,297=>278,298=>295,299=>278,300=>295,301=>278,302=>295,303=>278,304=>295,305=>278,306=>590,307=>556,308=>295,309=>278,310=>656,311=>579,312=>579,313=>557,314=>278,315=>557,316=>278,317=>557,318=>375,319=>557,320=>342,321=>562,322=>284,323=>748,324=>634,325=>748,326=>634,327=>748,328=>634,329=>813,330=>757,331=>634,332=>787,333=>612,334=>787,335=>612,336=>787,337=>612,338=>1070,339=>1023,340=>695,341=>411,342=>695,343=>411,344=>695,345=>411,346=>635,347=>521,348=>635,349=>521,350=>635,351=>521,352=>635,353=>521,354=>611,355=>392,356=>611,357=>392,358=>611,359=>392,360=>732,361=>634,362=>732,363=>634,364=>732,365=>634,366=>732,367=>634,368=>732,369=>634,370=>732,371=>634,372=>989,373=>818,374=>611,375=>592,376=>611,377=>685,378=>525,379=>685,380=>525,381=>685,382=>525,383=>352,384=>635,385=>735,386=>686,387=>635,390=>698,391=>698,392=>550,393=>775,394=>824,395=>686,396=>635,397=>612,398=>632,399=>787,400=>585,401=>575,402=>352,403=>775,404=>685,405=>965,406=>354,407=>295,408=>690,409=>526,410=>278,412=>974,413=>748,414=>634,415=>787,416=>934,417=>757,418=>949,419=>759,420=>652,421=>635,422=>695,423=>635,424=>521,425=>632,427=>392,428=>611,429=>392,430=>611,431=>879,432=>779,433=>764,434=>721,435=>696,436=>805,437=>685,438=>525,448=>295,449=>492,450=>459,451=>295,452=>1422,453=>1299,454=>1154,455=>835,456=>787,457=>457,458=>931,459=>924,460=>797,461=>684,462=>613,463=>295,464=>278,465=>787,466=>612,467=>732,468=>634,469=>732,470=>634,471=>732,472=>634,473=>732,474=>634,475=>732,476=>634,477=>615,478=>684,479=>613,480=>684,481=>613,482=>974,483=>982,484=>775,485=>600,486=>775,487=>600,488=>656,489=>579,490=>787,491=>612,492=>787,493=>612,496=>278,497=>1422,498=>1299,499=>1154,500=>775,501=>600,504=>748,505=>634,506=>684,507=>613,508=>974,509=>982,510=>787,511=>612,512=>684,513=>613,514=>684,515=>613,516=>632,517=>615,518=>632,519=>615,520=>295,521=>278,522=>295,523=>278,524=>787,525=>612,526=>787,527=>612,528=>695,529=>411,530=>695,531=>411,532=>732,533=>634,534=>732,535=>634,536=>635,537=>521,538=>611,539=>392,542=>752,543=>634,548=>685,549=>525,550=>684,551=>613,552=>632,553=>615,554=>787,555=>612,556=>787,557=>612,558=>787,559=>612,560=>787,561=>612,562=>611,563=>592,567=>278,568=>1032,569=>1032,581=>684,584=>295,585=>278,587=>635,588=>695,589=>411,592=>614,593=>635,594=>635,595=>635,596=>550,598=>635,599=>727,600=>615,601=>615,603=>541,604=>541,607=>326,608=>637,609=>635,611=>685,613=>634,614=>634,615=>634,616=>278,617=>387,618=>372,621=>387,623=>974,624=>974,625=>974,626=>634,627=>634,628=>634,629=>612,632=>660,633=>411,634=>411,635=>411,636=>411,637=>411,638=>530,639=>530,640=>602,641=>602,642=>521,643=>336,645=>461,647=>392,648=>392,649=>634,650=>618,651=>598,652=>592,653=>818,654=>592,656=>525,665=>580,668=>654,670=>667,671=>583,672=>712,675=>1014,678=>824,679=>610,681=>848,682=>706,683=>654,686=>661,687=>664,699=>318,700=>318,702=>307,710=>500,711=>500,713=>500,714=>483,715=>500,717=>500,718=>500,719=>483,728=>500,729=>500,730=>500,731=>500,732=>500,733=>500,741=>493,742=>493,743=>493,744=>493,745=>493,755=>500,759=>500,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,795=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,831=>0,847=>0,856=>0,860=>0,861=>0,865=>0,880=>654,881=>568,882=>862,883=>647,884=>278,885=>278,886=>748,887=>650,890=>361,891=>549,892=>550,893=>549,894=>337,900=>483,901=>500,902=>692,903=>318,904=>746,905=>871,906=>408,908=>813,910=>825,911=>826,912=>387,913=>684,914=>655,915=>557,916=>684,917=>632,918=>685,919=>752,920=>787,921=>295,922=>656,923=>684,924=>863,925=>748,926=>632,927=>787,928=>752,929=>603,931=>632,932=>611,933=>611,934=>860,935=>685,936=>787,937=>764,938=>295,939=>611,940=>659,941=>541,942=>634,943=>387,944=>579,945=>659,946=>638,947=>592,948=>612,949=>541,950=>544,951=>634,952=>612,953=>387,954=>594,955=>592,956=>636,957=>559,958=>558,959=>612,960=>602,961=>635,962=>587,963=>634,964=>602,965=>579,966=>660,967=>592,968=>660,969=>837,970=>387,971=>579,972=>612,973=>579,974=>837,975=>656,981=>660,982=>837,984=>787,985=>612,988=>575,1009=>635,1010=>550,1011=>278,1012=>787,1013=>615,1014=>615,1015=>605,1016=>635,1017=>698,1020=>635,1021=>698,1022=>698,1023=>698,1024=>632,1025=>632,1026=>786,1027=>557,1028=>698,1029=>635,1030=>295,1031=>295,1032=>295,1033=>1094,1034=>1045,1035=>786,1036=>674,1037=>755,1038=>609,1039=>752,1040=>684,1041=>686,1042=>655,1043=>557,1044=>776,1045=>632,1046=>1040,1047=>636,1048=>755,1049=>755,1050=>674,1051=>752,1052=>863,1053=>752,1054=>787,1055=>752,1056=>603,1057=>698,1058=>611,1059=>609,1060=>860,1061=>685,1062=>776,1063=>686,1064=>1068,1065=>1094,1066=>833,1067=>882,1068=>686,1069=>698,1070=>1031,1071=>695,1072=>613,1073=>612,1074=>586,1075=>491,1076=>677,1077=>615,1078=>908,1079=>541,1080=>659,1081=>659,1082=>594,1083=>639,1084=>754,1085=>654,1086=>612,1087=>654,1088=>635,1089=>550,1090=>549,1091=>592,1092=>854,1093=>592,1094=>681,1095=>591,1096=>917,1097=>938,1098=>727,1099=>765,1100=>589,1101=>549,1102=>813,1103=>592,1104=>615,1105=>615,1106=>625,1107=>491,1108=>549,1109=>521,1110=>278,1111=>278,1112=>278,1113=>898,1114=>892,1115=>652,1116=>594,1117=>659,1118=>592,1119=>662,1121=>837,1122=>769,1123=>667,1124=>942,1125=>749,1136=>787,1137=>660,1138=>787,1168=>557,1169=>491,1176=>636,1177=>541,1184=>856,1185=>832,1188=>1014,1189=>868,1194=>698,1195=>550,1198=>611,1199=>592,1204=>934,1205=>809,1210=>686,1211=>634,1216=>278,1217=>1040,1218=>908,1223=>752,1224=>654,1232=>684,1233=>613,1234=>684,1235=>613,1236=>974,1237=>982,1238=>632,1239=>615,1240=>787,1241=>615,1242=>787,1243=>615,1244=>1040,1245=>908,1246=>636,1247=>541,1250=>755,1251=>659,1252=>755,1253=>659,1254=>787,1255=>612,1256=>787,1257=>612,1258=>787,1259=>612,1260=>698,1261=>549,1262=>609,1263=>592,1264=>609,1265=>592,1266=>609,1267=>592,1268=>686,1269=>591,1272=>882,1273=>765,1278=>685,1279=>592,1280=>686,1281=>589,1296=>585,1297=>541,1298=>752,1299=>639,1300=>1169,1301=>994,1306=>787,1307=>635,1308=>989,1309=>818,1329=>792,1330=>746,1331=>790,1332=>800,1333=>746,1334=>779,1335=>665,1336=>746,1337=>877,1338=>780,1339=>689,1340=>540,1341=>1040,1342=>858,1343=>744,1344=>684,1345=>774,1346=>800,1347=>794,1348=>789,1349=>728,1350=>755,1351=>755,1352=>732,1353=>739,1354=>889,1355=>792,1356=>833,1357=>732,1358=>790,1359=>737,1360=>732,1361=>728,1362=>557,1363=>784,1364=>767,1365=>787,1366=>833,1370=>318,1371=>224,1372=>359,1373=>213,1374=>370,1375=>366,1377=>974,1378=>634,1379=>702,1380=>742,1381=>634,1382=>702,1383=>567,1384=>634,1385=>832,1386=>702,1387=>634,1388=>280,1389=>894,1390=>645,1391=>634,1392=>634,1393=>606,1394=>702,1395=>649,1396=>709,1397=>278,1398=>669,1399=>581,1400=>634,1401=>419,1402=>974,1403=>581,1404=>671,1405=>634,1406=>701,1407=>1002,1408=>634,1409=>600,1410=>477,1411=>1002,1412=>645,1413=>612,1414=>899,1415=>836,1417=>337,1418=>313,1652=>292,4304=>469,4305=>469,4306=>519,4307=>726,4308=>479,4309=>478,4310=>468,4311=>709,4312=>468,4313=>479,4314=>970,4315=>479,4316=>479,4317=>744,4318=>469,4319=>479,4320=>754,4321=>479,4322=>578,4323=>468,4324=>729,4325=>468,4326=>743,4327=>479,4328=>479,4329=>479,4330=>513,4331=>479,4332=>479,4333=>468,4334=>479,4335=>469,4336=>468,4337=>468,4338=>469,4339=>469,4340=>469,4341=>524,4342=>755,4343=>517,4344=>479,4345=>519,4346=>524,4347=>416,4348=>304,5760=>477,5761=>493,5762=>712,5763=>931,5764=>1150,5765=>1370,5766=>493,5767=>712,5768=>931,5769=>1150,5770=>1370,5771=>498,5772=>718,5773=>938,5774=>1159,5775=>1379,5776=>493,5777=>712,5778=>930,5779=>1149,5780=>1370,5781=>498,5782=>752,5783=>789,5784=>1205,5785=>1150,5786=>683,5787=>507,5788=>507,7426=>982,7428=>550,7433=>278,7435=>604,7437=>754,7438=>650,7439=>612,7440=>550,7441=>684,7442=>684,7443=>684,7444=>1023,7446=>612,7447=>612,7449=>592,7450=>592,7456=>592,7457=>818,7458=>525,7462=>525,7463=>592,7464=>654,7467=>639,7543=>635,7680=>684,7681=>613,7682=>655,7683=>635,7684=>655,7685=>635,7686=>655,7687=>635,7688=>698,7689=>550,7690=>770,7691=>635,7692=>770,7693=>635,7694=>770,7695=>635,7696=>770,7697=>635,7698=>770,7699=>635,7700=>632,7701=>615,7702=>632,7703=>615,7704=>632,7705=>615,7706=>632,7707=>615,7708=>632,7709=>615,7710=>575,7711=>352,7712=>775,7713=>600,7714=>752,7715=>634,7716=>752,7717=>634,7718=>752,7719=>634,7720=>752,7721=>634,7722=>752,7723=>634,7724=>295,7725=>278,7726=>295,7727=>278,7728=>656,7729=>579,7730=>656,7731=>579,7732=>656,7733=>579,7734=>557,7735=>288,7736=>557,7737=>288,7738=>557,7739=>278,7740=>557,7741=>278,7742=>863,7743=>974,7744=>863,7745=>974,7746=>863,7747=>974,7748=>748,7749=>634,7750=>748,7751=>634,7752=>748,7753=>634,7754=>748,7755=>634,7756=>787,7757=>612,7758=>787,7759=>612,7760=>787,7761=>612,7762=>787,7763=>612,7764=>603,7765=>635,7766=>603,7767=>635,7768=>695,7769=>411,7770=>695,7771=>411,7772=>695,7773=>411,7774=>695,7775=>411,7776=>635,7777=>521,7778=>635,7779=>521,7780=>635,7781=>521,7782=>635,7783=>521,7784=>635,7785=>521,7786=>611,7787=>392,7788=>611,7789=>392,7790=>611,7791=>392,7792=>611,7793=>392,7794=>732,7795=>634,7796=>732,7797=>634,7798=>732,7799=>634,7800=>732,7801=>634,7802=>732,7803=>634,7804=>684,7805=>592,7806=>684,7807=>592,7808=>989,7809=>818,7810=>989,7811=>818,7812=>989,7813=>818,7814=>989,7815=>818,7816=>989,7817=>818,7818=>685,7819=>592,7820=>685,7821=>592,7822=>611,7823=>592,7824=>685,7825=>525,7826=>685,7827=>525,7828=>685,7829=>525,7830=>634,7831=>392,7832=>818,7833=>592,7834=>613,7835=>352,7836=>352,7837=>352,7838=>769,7839=>612,7840=>684,7841=>613,7842=>684,7843=>613,7844=>684,7845=>613,7846=>684,7847=>613,7848=>684,7849=>613,7850=>684,7851=>613,7852=>684,7853=>613,7854=>684,7855=>613,7856=>684,7857=>613,7858=>684,7859=>613,7860=>684,7861=>613,7862=>684,7863=>613,7864=>632,7865=>615,7866=>632,7867=>615,7868=>632,7869=>615,7870=>632,7871=>615,7872=>632,7873=>615,7874=>632,7875=>615,7876=>632,7877=>615,7878=>632,7879=>615,7880=>295,7881=>278,7882=>295,7883=>278,7884=>787,7885=>612,7886=>787,7887=>612,7888=>787,7889=>612,7890=>787,7891=>612,7892=>787,7893=>612,7894=>787,7895=>612,7896=>787,7897=>612,7898=>934,7899=>757,7900=>934,7901=>757,7902=>934,7903=>757,7904=>934,7905=>757,7906=>934,7907=>757,7908=>732,7909=>634,7910=>732,7911=>634,7912=>879,7913=>779,7914=>879,7915=>779,7916=>879,7917=>779,7918=>879,7919=>779,7920=>879,7921=>779,7922=>611,7923=>592,7924=>611,7925=>592,7926=>611,7927=>592,7928=>611,7929=>592,7930=>769,7931=>477,7936=>659,7937=>659,7938=>659,7939=>659,7940=>659,7941=>659,7942=>659,7943=>659,7944=>684,7945=>684,7946=>877,7947=>877,7948=>769,7949=>801,7950=>708,7951=>743,7952=>541,7953=>541,7954=>541,7955=>541,7956=>541,7957=>541,7960=>711,7961=>711,7962=>966,7963=>975,7964=>898,7965=>928,7968=>634,7969=>634,7970=>634,7971=>634,7972=>634,7973=>634,7974=>634,7975=>634,7976=>837,7977=>835,7978=>1086,7979=>1089,7980=>1027,7981=>1051,7982=>934,7983=>947,7984=>338,7985=>338,7986=>338,7987=>338,7988=>338,7989=>338,7990=>338,7991=>338,7992=>380,7993=>374,7994=>635,7995=>635,7996=>570,7997=>600,7998=>489,7999=>493,8000=>612,8001=>612,8002=>612,8003=>612,8004=>612,8005=>612,8008=>804,8009=>848,8010=>1095,8011=>1100,8012=>938,8013=>970,8016=>579,8017=>579,8018=>579,8019=>579,8020=>579,8021=>579,8022=>579,8023=>579,8025=>784,8027=>998,8029=>1012,8031=>897,8032=>837,8033=>837,8034=>837,8035=>837,8036=>837,8037=>837,8038=>837,8039=>837,8040=>802,8041=>843,8042=>1089,8043=>1095,8044=>946,8045=>972,8046=>921,8047=>952,8048=>659,8049=>659,8050=>541,8051=>548,8052=>634,8053=>654,8054=>338,8055=>338,8056=>612,8057=>612,8058=>579,8059=>579,8060=>837,8061=>837,8064=>659,8065=>659,8066=>659,8067=>659,8068=>659,8069=>659,8070=>659,8071=>659,8072=>684,8073=>684,8074=>877,8075=>877,8076=>769,8077=>801,8078=>708,8079=>743,8080=>634,8081=>634,8082=>634,8083=>634,8084=>634,8085=>634,8086=>634,8087=>634,8088=>837,8089=>835,8090=>1086,8091=>1089,8092=>1027,8093=>1051,8094=>934,8095=>947,8096=>837,8097=>837,8098=>837,8099=>837,8100=>837,8101=>837,8102=>837,8103=>837,8104=>802,8105=>843,8106=>1089,8107=>1095,8108=>946,8109=>972,8110=>921,8111=>952,8112=>659,8113=>659,8114=>659,8115=>659,8116=>659,8118=>659,8119=>659,8120=>684,8121=>684,8122=>716,8123=>692,8124=>684,8125=>500,8126=>500,8127=>500,8128=>500,8129=>500,8130=>634,8131=>634,8132=>654,8134=>634,8135=>634,8136=>805,8137=>746,8138=>931,8139=>871,8140=>752,8141=>500,8142=>500,8143=>500,8144=>338,8145=>338,8146=>338,8147=>338,8150=>338,8151=>338,8152=>295,8153=>295,8154=>475,8155=>408,8157=>500,8158=>500,8159=>500,8160=>579,8161=>579,8162=>579,8163=>579,8164=>635,8165=>635,8166=>579,8167=>579,8168=>611,8169=>611,8170=>845,8171=>825,8172=>685,8173=>500,8174=>500,8175=>500,8178=>837,8179=>837,8180=>837,8182=>837,8183=>837,8184=>941,8185=>813,8186=>922,8187=>826,8188=>764,8189=>500,8190=>500,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>330,8197=>250,8198=>167,8199=>636,8200=>318,8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>361,8209=>361,8210=>636,8211=>500,8212=>1000,8213=>1000,8214=>500,8215=>500,8216=>318,8217=>318,8218=>318,8219=>318,8220=>518,8221=>518,8222=>518,8223=>518,8224=>500,8225=>500,8228=>334,8229=>667,8230=>1000,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>200,8240=>1342,8241=>1735,8249=>400,8250=>400,8251=>838,8252=>485,8253=>531,8254=>500,8255=>804,8256=>804,8258=>1000,8259=>500,8260=>167,8261=>390,8262=>390,8263=>922,8264=>733,8265=>733,8267=>636,8268=>500,8269=>500,8270=>500,8271=>337,8272=>804,8273=>500,8274=>450,8275=>1000,8276=>804,8287=>222,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>401,8305=>179,8308=>401,8320=>401,8321=>401,8322=>401,8323=>401,8324=>401,8363=>636,8364=>636,8369=>636,8376=>636,8377=>636,8451=>1123,8457=>952,8462=>634,8463=>634,8470=>1165,8471=>1000,8486=>764,8487=>764,8490=>656,8491=>684,8494=>854,8498=>575,8500=>462,8513=>775,8514=>557,8515=>557,8516=>611,8523=>780,8530=>1370,8531=>969,8532=>969,8543=>568,8544=>295,8545=>492,8546=>689,8547=>923,8548=>684,8549=>922,8550=>1120,8551=>1317,8552=>917,8553=>685,8554=>933,8555=>1131,8556=>557,8557=>698,8558=>770,8559=>863,8560=>278,8561=>458,8562=>637,8563=>812,8564=>592,8565=>811,8566=>991,8567=>1170,8568=>819,8569=>592,8570=>822,8571=>1002,8572=>278,8573=>550,8574=>635,8575=>974,8576=>1285,8577=>770,8578=>1285,8579=>698,8580=>549,8581=>698,8585=>969,8592=>838,8593=>838,8594=>838,8595=>838,8596=>838,8597=>838,8598=>838,8599=>838,8600=>838,8601=>838,8644=>838,8645=>838,8646=>838,8647=>838,8648=>838,8649=>838,8650=>838,8704=>684,8707=>632,8710=>684,8711=>684,8722=>838,8725=>337,8726=>637,8727=>626,8728=>626,8756=>636,8757=>636,8758=>260,8759=>636,8764=>636,9134=>521,9167=>945,10731=>494,10799=>838,11374=>863,11375=>684,11381=>654,11382=>568,11383=>660,11386=>612,11800=>536,11810=>390,11811=>390,11812=>390,11813=>390,11822=>531,42192=>655,42193=>603,42194=>603,42195=>770,42196=>611,42197=>611,42198=>775,42199=>656,42200=>656,42201=>512,42202=>698,42203=>698,42204=>685,42205=>575,42206=>575,42207=>863,42208=>748,42209=>557,42210=>635,42211=>695,42212=>695,42213=>684,42214=>684,42215=>752,42216=>775,42217=>512,42218=>989,42219=>685,42220=>611,42221=>655,42222=>684,42223=>684,42224=>632,42225=>632,42226=>295,42227=>787,42228=>732,42229=>732,42230=>557,42231=>770,42232=>300,42233=>300,42234=>596,42235=>596,42236=>300,42237=>300,42238=>588,42239=>588,42564=>635,42565=>521,42566=>354,42567=>387,42576=>1029,42577=>906,42580=>1031,42581=>813,42582=>927,42583=>814,42594=>1014,42595=>866,42596=>1015,42597=>864,42598=>1088,42599=>944,42600=>787,42601=>612,42602=>855,42603=>712,42604=>1358,42605=>1019,42606=>879,42636=>611,42637=>549,42644=>686,42645=>634,42760=>493,42761=>493,42762=>493,42763=>493,42764=>493,42765=>493,42766=>493,42767=>493,42768=>493,42769=>493,42770=>493,42771=>493,42772=>493,42773=>493,42774=>493,42779=>369,42780=>369,42781=>252,42782=>252,42783=>252,42786=>385,42787=>356,42788=>472,42789=>472,42790=>752,42791=>634,42800=>491,42801=>521,42802=>1250,42803=>985,42814=>703,42815=>549,42822=>680,42823=>392,42830=>1358,42831=>1019,42880=>557,42881=>278,42891=>401,42892=>275,42893=>686,43002=>917,43003=>575,43004=>603,43005=>863,43006=>295,43007=>1199,62464=>525,62465=>525,62466=>565,62467=>808,62468=>535,62469=>525,62470=>536,62471=>821,62472=>525,62473=>525,62474=>1037,62475=>535,62476=>535,62477=>837,62478=>525,62479=>536,62480=>830,62481=>535,62482=>672,62483=>565,62484=>823,62485=>535,62486=>790,62487=>535,62488=>535,62489=>535,62490=>603,62491=>535,62492=>535,62493=>525,62494=>535,62495=>525,62496=>525,62497=>525,62498=>525,62499=>525,62500=>524,62501=>567,63173=>612,64256=>689,64257=>630,64258=>630,64259=>967,64260=>967,64297=>838,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65533=>1025,65535=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansextralight.z b/lib/combodo/tcpdf/fonts/dejavusansextralight.z deleted file mode 100644 index a966f6de5..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansextralight.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansi.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansi.ctg.z deleted file mode 100644 index 1b98d135f..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansi.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansi.php b/lib/combodo/tcpdf/fonts/dejavusansi.php deleted file mode 100644 index 07c6fd109..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansi.php +++ /dev/null @@ -1,16 +0,0 @@ -96,'FontBBox'=>'[-1016 -350 1659 1068]','ItalicAngle'=>-11,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>34,'StemH'=>15,'AvgWidth'=>507,'MaxWidth'=>1690,'MissingWidth'=>600); -$cbbox=array(0=>array(50,-177,550,705),33=>array(79,0,320,729),34=>array(96,458,364,729),35=>array(70,0,773,718),36=>array(33,-147,570,760),37=>array(91,-14,859,742),38=>array(47,-14,736,742),39=>array(96,458,179,729),40=>array(77,-132,427,759),41=>array(-62,-132,288,759),42=>array(30,286,470,742),43=>array(106,0,732,627),44=>array(3,-116,193,124),45=>array(45,234,324,314),46=>array(58,0,185,124),47=>array(-73,-93,427,729),48=>array(50,-14,586,742),49=>array(49,0,485,729),50=>array(4,0,574,742),51=>array(2,-14,572,742),52=>array(18,0,565,729),53=>array(20,-14,581,729),54=>array(63,-14,592,742),55=>array(93,0,627,729),56=>array(33,-14,593,742),57=>array(44,-14,574,742),58=>array(52,0,256,517),59=>array(1,-116,267,517),60=>array(106,46,732,581),61=>array(106,172,732,454),62=>array(106,46,732,581),63=>array(123,0,511,742),64=>array(58,-173,950,703),65=>array(-53,0,615,729),66=>array(27,0,625,729),67=>array(42,-14,695,742),68=>array(27,0,722,729),69=>array(27,0,630,729),70=>array(27,0,587,729),71=>array(45,-14,725,742),72=>array(27,0,725,729),73=>array(27,0,268,729),74=>array(-164,-200,266,729),75=>array(27,0,722,729),76=>array(27,0,497,729),77=>array(27,0,836,729),78=>array(27,0,721,729),79=>array(40,-14,747,742),80=>array(27,0,601,729),81=>array(41,-129,747,742),82=>array(27,0,600,729),83=>array(6,-14,603,742),84=>array(43,0,676,729),85=>array(58,-14,713,729),86=>array(78,0,742,729),87=>array(96,0,1020,729),88=>array(-43,0,703,729),89=>array(63,0,676,729),90=>array(-22,0,703,729),91=>array(40,-132,420,760),92=>array(85,-93,262,729),93=>array(-38,-132,342,760),94=>array(106,457,732,729),95=>array(-10,-236,510,-166),96=>array(190,617,388,800),97=>array(41,-14,547,560),98=>array(36,-14,587,760),99=>array(46,-14,536,560),100=>array(46,-14,639,760),101=>array(46,-14,571,560),102=>array(68,0,478,760),103=>array(32,-208,596,560),104=>array(35,0,566,760),105=>array(35,0,273,760),106=>array(-113,-208,277,760),107=>array(35,0,612,760),108=>array(35,0,273,760),109=>array(35,0,906,560),110=>array(35,0,566,560),111=>array(46,-14,566,560),112=>array(-3,-208,589,560),113=>array(46,-206,597,560),114=>array(35,0,463,560),115=>array(11,-14,500,560),116=>array(64,0,423,702),117=>array(57,-14,589,547),118=>array(72,0,604,547),119=>array(85,0,819,547),120=>array(-26,0,600,547),121=>array(-25,-208,603,547),122=>array(-3,0,543,547),123=>array(121,-163,605,760),124=>array(127,-236,210,764),125=>array(7,-163,491,760),126=>array(106,228,732,399),161=>array(85,0,326,729),162=>array(74,-153,563,698),163=>array(24,0,637,742),164=>array(46,40,592,587),165=>array(45,0,673,729),166=>array(127,-171,210,699),167=>array(12,-95,485,742),168=>array(184,659,493,758),169=>array(138,0,862,725),170=>array(40,229,446,742),171=>array(62,69,555,517),172=>array(106,140,732,421),173=>array(45,234,324,314),174=>array(138,0,862,725),175=>array(186,673,492,745),176=>array(95,432,405,742),177=>array(106,0,732,627),178=>array(36,326,385,742),179=>array(16,319,368,742),180=>array(252,616,522,800),181=>array(-13,-208,592,547),182=>array(78,-96,573,729),183=>array(114,285,241,409),184=>array(49,-193,267,0),185=>array(66,326,347,734),186=>array(40,229,462,742),187=>array(62,69,554,517),188=>array(66,-14,958,742),189=>array(66,-14,953,742),190=>array(16,-14,958,742),191=>array(37,-13,425,729),192=>array(-53,0,615,927),193=>array(-53,0,615,927),194=>array(-53,0,615,928),195=>array(-53,0,617,921),196=>array(-53,0,615,913),197=>array(-53,0,615,928),198=>array(-45,0,994,729),199=>array(42,-193,695,742),200=>array(27,0,630,927),201=>array(27,0,630,927),202=>array(27,0,630,928),203=>array(27,0,630,913),204=>array(27,0,292,927),205=>array(27,0,383,927),206=>array(27,0,379,928),207=>array(27,0,392,913),208=>array(0,0,727,729),209=>array(27,0,721,921),210=>array(40,-14,747,927),211=>array(40,-14,747,927),212=>array(40,-14,747,928),213=>array(40,-14,747,921),214=>array(40,-14,747,913),215=>array(137,31,701,596),216=>array(-34,-32,809,761),217=>array(58,-14,713,927),218=>array(58,-14,713,927),219=>array(58,-14,713,928),220=>array(58,-14,713,913),221=>array(63,0,676,927),222=>array(27,0,577,729),223=>array(47,-14,590,760),224=>array(41,-14,547,800),225=>array(41,-14,571,800),226=>array(41,-14,547,800),227=>array(41,-14,562,777),228=>array(41,-14,547,758),229=>array(41,-14,547,878),230=>array(41,-14,951,560),231=>array(46,-193,536,560),232=>array(46,-14,571,800),233=>array(46,-14,576,800),234=>array(46,-14,571,800),235=>array(46,-14,571,758),236=>array(35,0,262,800),237=>array(35,0,396,800),238=>array(35,0,351,800),239=>array(35,0,367,758),240=>array(45,-14,587,760),241=>array(35,0,580,777),242=>array(46,-14,566,800),243=>array(46,-14,578,800),244=>array(46,-14,566,800),245=>array(46,-14,569,777),246=>array(46,-14,566,758),247=>array(106,73,732,554),248=>array(-14,-46,622,590),249=>array(57,-14,589,800),250=>array(57,-14,589,800),251=>array(57,-14,589,800),252=>array(57,-14,589,758),253=>array(-25,-208,603,800),254=>array(-3,-208,589,760),255=>array(-25,-208,603,758),256=>array(-53,0,615,899),257=>array(41,-14,547,745),258=>array(-53,0,624,926),259=>array(41,-14,562,761),260=>array(-53,-194,618,729),261=>array(41,-194,547,560),262=>array(42,-14,695,927),263=>array(46,-14,580,800),264=>array(42,-14,695,928),265=>array(46,-14,551,800),266=>array(42,-14,695,914),267=>array(46,-14,536,760),268=>array(42,-14,695,928),269=>array(46,-14,570,800),270=>array(27,0,722,928),271=>array(46,-14,819,760),272=>array(0,0,727,729),273=>array(46,-14,701,760),274=>array(27,0,630,900),275=>array(46,-14,571,745),276=>array(27,0,630,928),277=>array(46,-14,571,785),278=>array(27,0,630,914),279=>array(46,-14,571,760),280=>array(27,-194,630,729),281=>array(46,-194,571,560),282=>array(27,0,630,928),283=>array(46,-14,571,800),284=>array(45,-14,725,928),285=>array(32,-208,596,800),286=>array(45,-14,725,928),287=>array(32,-208,596,785),288=>array(45,-14,725,914),289=>array(32,-208,596,760),290=>array(45,-250,725,742),291=>array(32,-208,596,775),292=>array(27,0,725,928),293=>array(35,0,566,928),294=>array(109,0,868,729),295=>array(46,0,576,760),296=>array(27,0,415,921),297=>array(35,0,387,777),298=>array(27,0,390,899),299=>array(35,0,381,745),300=>array(27,0,400,928),301=>array(35,0,381,785),302=>array(-7,-194,268,729),303=>array(-8,-194,273,760),304=>array(27,0,304,914),305=>array(35,0,232,547),306=>array(27,-200,561,729),307=>array(35,-208,554,760),308=>array(-164,-200,386,928),309=>array(-113,-208,360,800),310=>array(27,-235,722,729),311=>array(35,-235,612,760),312=>array(38,0,617,547),313=>array(27,0,497,928),314=>array(35,0,422,928),315=>array(27,-235,497,729),316=>array(20,-235,273,760),317=>array(27,0,497,729),318=>array(35,0,474,760),319=>array(27,0,497,729),320=>array(35,0,443,760),321=>array(-20,0,502,729),322=>array(17,0,318,760),323=>array(27,0,721,928),324=>array(35,0,566,803),325=>array(27,-235,721,729),326=>array(35,-235,566,560),327=>array(27,0,721,928),328=>array(35,0,570,800),329=>array(75,0,732,729),330=>array(46,-208,682,742),331=>array(35,-208,566,560),332=>array(40,-14,747,899),333=>array(46,-14,566,745),334=>array(40,-14,747,928),335=>array(46,-14,566,785),336=>array(40,-14,773,927),337=>array(46,-14,623,800),338=>array(46,0,1067,729),339=>array(46,-14,984,560),340=>array(27,0,600,928),341=>array(35,0,549,803),342=>array(27,-235,600,729),343=>array(20,-235,463,560),344=>array(27,0,600,925),345=>array(35,0,492,800),346=>array(6,-14,603,928),347=>array(11,-14,549,803),348=>array(6,-14,603,928),349=>array(11,-14,500,800),350=>array(6,-193,603,742),351=>array(11,-193,500,560),352=>array(6,-14,603,928),353=>array(11,-14,523,800),354=>array(43,-193,676,729),355=>array(62,-193,423,702),356=>array(43,0,676,928),357=>array(64,0,477,803),358=>array(52,0,685,729),359=>array(16,0,406,702),360=>array(58,-14,713,921),361=>array(57,-14,589,777),362=>array(58,-14,713,899),363=>array(57,-14,589,745),364=>array(58,-14,713,928),365=>array(57,-14,589,785),366=>array(58,-14,713,929),367=>array(57,-14,589,861),368=>array(58,-14,729,927),369=>array(57,-14,619,800),370=>array(58,-194,713,729),371=>array(57,-194,589,547),372=>array(96,0,1020,932),373=>array(85,0,819,800),374=>array(63,0,676,932),375=>array(-25,-208,603,800),376=>array(63,0,676,913),377=>array(-22,0,703,928),378=>array(-3,0,549,803),379=>array(-22,0,703,912),380=>array(-3,0,543,760),381=>array(-22,0,703,928),382=>array(-3,0,543,800),383=>array(68,0,478,760),384=>array(19,-14,561,760),385=>array(51,0,740,729),386=>array(27,0,635,729),387=>array(19,-14,579,760),388=>array(42,0,601,729),389=>array(35,-14,578,760),390=>array(63,-14,715,742),391=>array(39,-14,885,924),392=>array(39,-14,672,724),393=>array(0,0,727,729),394=>array(51,0,831,729),395=>array(69,0,686,729),396=>array(36,-14,619,760),397=>array(55,-208,575,548),398=>array(64,0,675,729),399=>array(51,-14,750,742),400=>array(121,-14,676,742),401=>array(-142,-200,607,729),402=>array(-157,-208,465,760),403=>array(39,-14,915,924),404=>array(95,-210,774,729),405=>array(17,0,897,760),406=>array(76,0,292,729),407=>array(0,0,299,729),408=>array(26,0,792,742),409=>array(17,0,596,760),410=>array(-2,0,277,760),411=>array(-44,0,535,760),412=>array(60,-14,966,729),413=>array(-142,-200,740,729),414=>array(57,-208,579,560),415=>array(40,-14,747,742),416=>array(34,-14,823,761),417=>array(48,-14,657,609),418=>array(56,-14,873,742),419=>array(74,-208,702,560),420=>array(51,0,717,729),421=>array(-3,-208,580,760),422=>array(40,-129,592,729),423=>array(2,-14,580,742),424=>array(11,-14,473,560),425=>array(27,0,630,729),426=>array(-58,-208,341,760),427=>array(72,-208,426,702),428=>array(43,0,685,729),429=>array(46,0,429,760),430=>array(71,-200,704,729),431=>array(56,-4,854,761),432=>array(58,-14,720,615),433=>array(42,-14,798,724),434=>array(76,-1,678,729),435=>array(67,0,789,742),436=>array(4,-208,777,560),437=>array(-26,0,700,729),438=>array(-10,0,535,547),439=>array(23,-31,652,729),440=>array(15,-31,662,729),441=>array(21,-213,594,547),442=>array(-9,-208,533,547),443=>array(1,0,564,742),444=>array(16,-31,625,729),445=>array(-16,-213,550,547),446=>array(-20,-14,430,702),447=>array(-5,-208,603,560),448=>array(7,-208,288,729),449=>array(7,-208,485,729),450=>array(-13,-208,484,729),451=>array(26,0,267,729),452=>array(27,0,1473,928),453=>array(27,0,1313,800),454=>array(46,-14,1178,800),455=>array(27,-200,823,729),456=>array(27,-208,834,760),457=>array(35,-208,555,760),458=>array(27,-200,1014,729),459=>array(27,-208,1025,760),460=>array(35,-208,911,760),461=>array(-53,0,615,928),462=>array(41,-14,556,800),463=>array(27,0,414,928),464=>array(35,0,400,800),465=>array(40,-14,747,928),466=>array(46,-14,598,800),467=>array(58,-14,713,928),468=>array(57,-14,589,800),469=>array(58,-14,713,1025),470=>array(57,-14,589,899),471=>array(58,-14,713,1047),472=>array(57,-14,589,903),473=>array(58,-14,713,1044),474=>array(57,-14,589,906),475=>array(58,-14,713,1044),476=>array(57,-14,589,903),477=>array(51,-14,563,560),478=>array(-53,0,626,1025),479=>array(41,-14,548,899),480=>array(-53,0,627,1025),481=>array(41,-14,573,868),482=>array(-45,0,994,900),483=>array(41,-14,951,743),484=>array(45,-14,743,742),485=>array(32,-208,596,560),486=>array(45,-14,725,928),487=>array(32,-208,596,800),488=>array(27,0,722,928),489=>array(35,0,612,928),490=>array(40,-194,747,742),491=>array(46,-194,566,560),492=>array(40,-194,747,899),493=>array(46,-194,566,745),494=>array(23,-31,652,928),495=>array(-47,-213,530,793),496=>array(-113,-208,392,793),497=>array(27,0,1473,729),498=>array(27,0,1313,729),499=>array(46,-14,1178,760),500=>array(45,-14,725,928),501=>array(32,-208,596,800),502=>array(29,-14,1059,729),503=>array(-14,-208,666,742),504=>array(27,0,721,927),505=>array(35,0,566,800),506=>array(-53,0,786,928),507=>array(41,-14,772,928),508=>array(-45,0,994,928),509=>array(41,-14,951,800),510=>array(-34,-32,809,928),511=>array(-14,-46,622,800),512=>array(-53,0,615,930),513=>array(41,-14,547,800),514=>array(-53,0,615,917),515=>array(41,-14,549,785),516=>array(27,0,630,930),517=>array(46,-14,571,800),518=>array(27,0,630,917),519=>array(46,-14,571,785),520=>array(27,0,363,930),521=>array(22,0,365,800),522=>array(27,0,393,917),523=>array(35,0,370,785),524=>array(40,-14,747,930),525=>array(46,-14,566,800),526=>array(40,-14,747,917),527=>array(46,-14,566,785),528=>array(27,0,600,930),529=>array(35,0,463,800),530=>array(27,0,600,917),531=>array(35,0,486,785),532=>array(58,-14,713,930),533=>array(57,-14,589,800),534=>array(58,-14,713,917),535=>array(57,-14,589,785),536=>array(6,-240,603,742),537=>array(11,-240,500,560),538=>array(43,-240,676,729),539=>array(64,-240,423,702),540=>array(-36,-210,593,742),541=>array(-62,-211,489,560),542=>array(27,0,725,928),543=>array(35,0,566,928),544=>array(27,-208,663,742),545=>array(41,-70,744,760),546=>array(19,-14,663,742),547=>array(34,-14,584,648),548=>array(-6,-208,720,729),549=>array(10,-208,555,547),550=>array(-53,0,615,914),551=>array(41,-14,547,760),552=>array(27,-189,630,729),553=>array(46,-193,571,560),554=>array(40,-14,747,1025),555=>array(46,-14,582,899),556=>array(40,-14,747,1025),557=>array(46,-14,579,861),558=>array(40,-14,747,914),559=>array(46,-14,566,760),560=>array(40,-14,747,1029),561=>array(46,-14,566,899),562=>array(63,0,676,899),563=>array(-25,-208,603,745),564=>array(-13,-70,381,757),565=>array(43,-70,768,560),566=>array(-5,-70,413,702),567=>array(-113,-208,235,547),568=>array(36,-14,924,760),569=>array(74,-208,962,560),570=>array(-70,-34,754,761),571=>array(-63,-34,762,761),572=>array(-50,-46,600,592),573=>array(0,0,497,729),574=>array(-107,-34,718,761),575=>array(27,-242,515,560),576=>array(13,-242,559,547),577=>array(157,0,668,729),578=>array(69,0,457,560),579=>array(-31,0,621,729),580=>array(4,-14,739,729),581=>array(-63,0,605,729),582=>array(27,-93,636,822),583=>array(36,-93,573,640),584=>array(-163,-200,293,729),585=>array(-114,-208,276,760),586=>array(74,-200,772,743),587=>array(74,-208,616,560),588=>array(-6,0,600,729),589=>array(-5,0,464,560),590=>array(29,0,684,729),591=>array(6,-208,635,547),592=>array(69,-14,575,560),593=>array(55,-14,597,560),594=>array(2,-14,544,560),595=>array(19,-14,561,760),596=>array(2,-14,493,560),597=>array(61,-70,542,560),598=>array(55,-208,638,760),599=>array(36,-14,821,760),600=>array(28,-14,561,560),601=>array(51,-14,563,560),602=>array(41,-14,819,560),603=>array(39,-14,506,561),604=>array(5,-11,504,560),605=>array(14,-14,777,561),606=>array(55,-14,609,561),607=>array(-91,-208,289,547),608=>array(33,-208,809,760),609=>array(53,-208,617,547),610=>array(55,0,569,574),611=>array(103,-210,623,547),612=>array(102,-14,604,547),613=>array(94,-208,616,547),614=>array(17,0,539,760),615=>array(37,-208,560,760),616=>array(26,0,309,760),617=>array(80,0,258,547),618=>array(4,0,368,547),619=>array(22,0,372,760),620=>array(41,0,417,760),621=>array(39,-208,278,760),622=>array(41,-213,662,760),623=>array(81,-13,944,548),624=>array(100,-208,962,547),625=>array(57,-208,919,560),626=>array(-93,-208,582,560),627=>array(57,-208,601,560),628=>array(34,0,602,547),629=>array(55,-14,557,560),630=>array(55,0,814,547),631=>array(66,-15,658,560),632=>array(54,-208,602,760),633=>array(2,-13,430,547),634=>array(-18,-13,450,755),635=>array(21,-208,449,547),636=>array(-20,-208,449,560),637=>array(19,-208,449,560),638=>array(2,0,491,560),639=>array(96,0,397,560),640=>array(-29,0,454,547),641=>array(-29,0,561,547),642=>array(18,-208,512,560),643=>array(-112,-208,449,760),644=>array(-113,-208,449,760),645=>array(86,-208,341,549),646=>array(-206,-208,449,760),647=>array(-11,-155,344,547),648=>array(40,-208,426,702),649=>array(-9,-14,641,547),650=>array(56,-15,619,547),651=>array(80,0,551,548),652=>array(-23,0,509,547),653=>array(-11,0,723,547),654=>array(-43,0,586,755),655=>array(103,0,605,547),656=>array(10,-208,555,547),657=>array(-5,-54,541,547),658=>array(-24,-213,554,547),659=>array(20,-213,554,547),660=>array(93,0,485,759),661=>array(72,0,522,759),662=>array(-24,0,426,759),663=>array(-7,-213,543,760),664=>array(56,-14,731,742),665=>array(38,0,534,547),666=>array(33,-14,596,561),667=>array(37,0,801,759),668=>array(38,0,616,547),669=>array(-205,-208,278,760),670=>array(71,-213,650,547),671=>array(38,0,454,547),672=>array(55,-208,840,759),673=>array(7,0,485,759),674=>array(72,0,522,759),675=>array(36,-14,1004,760),676=>array(55,-213,1024,760),677=>array(40,-54,1007,760),678=>array(51,0,787,702),679=>array(66,-208,723,760),680=>array(58,-70,764,702),681=>array(55,-208,815,760),682=>array(21,0,657,760),683=>array(21,0,643,760),684=>array(22,-15,552,640),685=>array(-28,84,543,640),686=>array(80,-214,624,760),687=>array(79,-208,623,760),688=>array(16,326,340,751),689=>array(16,326,340,751),690=>array(-64,209,168,751),691=>array(27,326,289,640),692=>array(5,319,267,632),693=>array(16,209,277,632),694=>array(-14,326,350,632),695=>array(56,326,519,632),696=>array(9,209,395,632),697=>array(164,557,336,800),698=>array(164,557,518,800),699=>array(131,489,321,729),700=>array(62,489,251,729),701=>array(179,616,298,856),702=>array(136,492,296,760),703=>array(138,492,297,760),704=>array(85,326,333,751),705=>array(74,326,354,751),706=>array(255,524,532,836),707=>array(232,524,509,836),708=>array(203,561,515,800),709=>array(250,561,561,800),710=>array(165,616,477,800),711=>array(200,616,512,800),712=>array(104,488,171,759),713=>array(186,673,492,745),714=>array(252,616,522,800),715=>array(190,617,388,800),716=>array(104,-148,171,123),717=>array(24,-156,331,-84),718=>array(190,-236,388,-54),719=>array(252,-237,522,-54),720=>array(4,0,279,517),721=>array(70,356,244,517),722=>array(89,249,249,517),723=>array(90,249,250,517),724=>array(119,229,353,448),725=>array(147,229,381,448),726=>array(47,125,353,417),727=>array(47,234,281,307),728=>array(200,645,507,785),729=>array(279,658,398,758),730=>array(209,610,477,878),731=>array(98,-194,279,0),732=>array(164,639,513,777),733=>array(188,616,567,800),734=>array(-5,233,323,504),735=>array(104,616,406,800),736=>array(63,208,415,632),737=>array(16,326,155,751),738=>array(30,326,330,648),739=>array(27,326,415,632),740=>array(74,326,354,751),741=>array(157,0,454,668),742=>array(127,0,454,668),743=>array(98,0,454,668),744=>array(69,0,454,668),745=>array(40,0,454,668),748=>array(96,-260,408,-21),749=>array(174,610,504,808),750=>array(135,489,525,729),755=>array(95,-240,363,28),759=>array(83,-193,432,-83),768=>array(-259,617,-61,800),769=>array(-203,616,67,800),770=>array(-284,616,28,800),771=>array(-288,639,61,777),772=>array(-266,673,40,745),773=>array(-510,686,10,755),774=>array(-249,645,58,785),775=>array(-169,646,-58,760),776=>array(-265,659,44,758),777=>array(-204,618,14,810),778=>array(-240,610,28,878),779=>array(-264,616,115,800),780=>array(-255,616,57,800),781=>array(-305,615,-195,832),782=>array(-404,615,-96,832),783=>array(-331,616,12,800),784=>array(-304,645,3,854),785=>array(-247,645,60,785),786=>array(-189,489,-16,645),787=>array(-329,595,-162,844),788=>array(-305,595,-163,844),789=>array(-80,616,80,800),790=>array(-311,-266,-113,-83),791=>array(-249,-267,21,-83),792=>array(-363,-240,-200,-24),793=>array(-300,-240,-137,-24),794=>array(-198,690,54,930),795=>array(-141,427,69,609),796=>array(-315,-241,-188,-32),797=>array(-384,-240,-132,-87),798=>array(-368,-240,-116,-87),799=>array(-363,-240,-137,-24),800=>array(-265,-184,-12,-117),801=>array(-339,-208,6,63),802=>array(-339,-208,-70,63),803=>array(-332,-184,-220,-70),804=>array(-435,-183,-126,-84),805=>array(-355,-241,-146,-32),806=>array(-339,-240,-165,-84),807=>array(-451,-193,-233,0),808=>array(-402,-194,-221,0),809=>array(-302,-240,-198,-47),810=>array(-398,-211,-98,-50),811=>array(-468,-222,-67,-82),812=>array(-386,-240,-74,-57),813=>array(-429,-240,-117,-57),814=>array(-433,-222,-126,-82),815=>array(-459,-224,-153,-83),816=>array(-466,-222,-117,-84),817=>array(-441,-156,-135,-84),818=>array(-566,-236,-33,-166),819=>array(-556,-236,8,-9),820=>array(-570,240,-27,381),821=>array(-325,221,-51,301),822=>array(-642,221,7,301),823=>array(-629,-46,21,592),824=>array(-811,-34,15,761),825=>array(-312,-241,-184,-32),826=>array(-398,-206,-98,-44),827=>array(-380,-240,-118,-21),828=>array(-495,-222,-94,-82),829=>array(-370,608,-130,825),830=>array(-272,595,-84,853),831=>array(-510,528,10,755),832=>array(-259,617,-61,800),833=>array(-203,616,67,800),834=>array(-288,639,61,777),835=>array(-329,595,-162,844),836=>array(-308,659,61,978),837=>array(-356,-208,-252,-45),838=>array(-411,639,-89,786),839=>array(-378,-226,-122,-35),840=>array(-383,-240,-117,-47),841=>array(-353,-240,-119,-21),842=>array(-425,616,-75,800),843=>array(-425,567,-75,850),844=>array(-424,596,-75,820),845=>array(-452,-230,-48,-30),846=>array(-360,-240,-147,-45),849=>array(-316,610,-157,878),850=>array(-415,633,-108,855),851=>array(-370,-241,-130,-24),855=>array(-343,610,-183,878),856=>array(23,658,142,758),858=>array(-430,-241,-71,-32),860=>array(-483,-237,407,-60),861=>array(-290,802,601,979),862=>array(-297,855,600,927),863=>array(-491,-156,415,-84),864=>array(-208,756,528,894),865=>array(-290,752,601,929),866=>array(-528,-230,366,-30),880=>array(27,0,568,729),881=>array(41,0,486,547),882=>array(95,0,834,729),883=>array(95,0,620,729),884=>array(164,557,336,800),885=>array(27,-208,199,35),886=>array(27,0,721,729),887=>array(38,0,612,547),890=>array(136,-208,240,-45),891=>array(2,-14,493,560),892=>array(46,-14,536,560),893=>array(2,-14,493,560),894=>array(1,-116,267,517),900=>array(252,616,522,800),901=>array(184,659,553,978),902=>array(-53,0,615,800),903=>array(114,285,241,409),904=>array(59,0,765,800),905=>array(64,0,869,800),906=>array(62,0,409,800),908=>array(64,-14,793,800),910=>array(56,0,919,800),911=>array(53,0,828,800),912=>array(74,0,450,978),913=>array(-53,0,615,729),914=>array(27,0,625,729),915=>array(27,0,623,729),916=>array(-63,0,605,729),917=>array(27,0,630,729),918=>array(-22,0,703,729),919=>array(27,0,725,729),920=>array(56,-14,731,742),921=>array(27,0,268,729),922=>array(27,0,722,729),923=>array(-63,0,605,729),924=>array(27,0,836,729),925=>array(27,0,721,729),926=>array(27,0,619,729),927=>array(40,-14,747,742),928=>array(27,0,725,729),929=>array(27,0,601,729),931=>array(27,0,630,729),932=>array(43,0,676,729),933=>array(63,0,676,729),934=>array(50,0,737,729),935=>array(-43,0,703,729),936=>array(88,0,803,729),937=>array(-34,0,723,738),938=>array(27,0,399,913),939=>array(63,0,676,913),940=>array(55,-12,645,800),941=>array(39,-14,561,800),942=>array(57,-208,619,800),943=>array(67,0,431,800),944=>array(59,0,566,978),945=>array(55,-12,645,559),946=>array(-1,-208,572,766),947=>array(74,-208,635,547),948=>array(38,-14,557,742),949=>array(39,-14,506,561),950=>array(49,-210,590,760),951=>array(57,-208,579,560),952=>array(55,-11,557,768),953=>array(67,0,265,547),954=>array(40,0,584,547),955=>array(-44,0,488,760),956=>array(-13,-208,592,547),957=>array(89,0,526,547),958=>array(38,-210,563,760),959=>array(46,-14,566,560),960=>array(55,-19,615,547),961=>array(16,-208,599,560),962=>array(74,-210,556,560),963=>array(57,-14,659,547),964=>array(84,0,606,547),965=>array(59,0,533,547),966=>array(74,-208,622,551),967=>array(-44,-208,622,547),968=>array(66,-208,675,547),969=>array(68,-14,771,547),970=>array(74,0,391,758),971=>array(59,0,533,758),972=>array(46,-14,583,800),973=>array(59,0,539,800),974=>array(68,-14,771,800),975=>array(47,-208,742,729),976=>array(81,-11,534,768),977=>array(65,-11,557,768),978=>array(97,0,701,729),979=>array(56,0,865,800),980=>array(97,0,701,913),981=>array(54,-208,602,760),982=>array(68,-14,858,547),983=>array(28,-188,665,547),984=>array(75,-207,750,742),985=>array(74,-208,576,560),986=>array(88,-210,675,729),987=>array(76,-210,613,547),988=>array(27,0,587,729),989=>array(-184,-208,500,760),990=>array(64,-2,639,729),991=>array(87,0,576,759),992=>array(109,-208,779,742),993=>array(21,-180,508,559),994=>array(36,-213,884,729),995=>array(86,-208,790,547),996=>array(43,-208,730,742),997=>array(44,-208,619,560),998=>array(27,-213,719,729),999=>array(-21,-14,620,575),1000=>array(-34,-208,660,745),1001=>array(-11,-208,569,560),1002=>array(-15,0,785,742),1003=>array(-29,0,649,560),1004=>array(33,-14,715,758),1005=>array(46,-14,584,758),1006=>array(31,-208,625,729),1007=>array(53,-208,561,726),1008=>array(9,-3,646,547),1009=>array(84,-208,599,560),1010=>array(46,-14,536,560),1011=>array(-113,-208,277,760),1012=>array(40,-14,747,742),1013=>array(55,-14,532,560),1014=>array(43,-14,521,560),1015=>array(27,0,577,729),1016=>array(-3,-208,589,760),1017=>array(42,-14,695,742),1018=>array(27,0,836,729),1019=>array(-11,-208,661,547),1020=>array(-22,-208,599,560),1021=>array(63,-14,715,742),1022=>array(42,-14,695,742),1023=>array(63,-14,715,742),1024=>array(27,0,630,927),1025=>array(27,0,630,913),1026=>array(71,-200,704,729),1027=>array(27,0,623,927),1028=>array(45,-14,704,742),1029=>array(6,-14,603,742),1030=>array(27,0,268,729),1031=>array(27,0,386,913),1032=>array(-164,-200,266,729),1033=>array(-30,0,1000,729),1034=>array(27,0,951,729),1035=>array(52,0,685,729),1036=>array(27,0,747,927),1037=>array(27,0,721,927),1038=>array(24,0,663,928),1039=>array(42,-157,740,729),1040=>array(-53,0,615,729),1041=>array(27,0,635,729),1042=>array(27,0,625,729),1043=>array(27,0,623,729),1044=>array(-37,-157,735,729),1045=>array(27,0,630,729),1046=>array(-51,0,1111,729),1047=>array(1,-14,595,742),1048=>array(27,0,721,729),1049=>array(27,0,721,928),1050=>array(27,0,747,729),1051=>array(-30,0,724,729),1052=>array(27,0,836,729),1053=>array(27,0,725,729),1054=>array(40,-14,747,742),1055=>array(27,0,725,729),1056=>array(27,0,601,729),1057=>array(42,-14,695,742),1058=>array(43,0,676,729),1059=>array(24,0,663,729),1060=>array(54,0,811,729),1061=>array(-43,0,703,729),1062=>array(42,-157,740,729),1063=>array(109,0,658,729),1064=>array(27,0,1042,729),1065=>array(42,-157,1057,729),1066=>array(84,0,738,729),1067=>array(27,0,855,729),1068=>array(27,0,592,729),1069=>array(-6,-14,642,742),1070=>array(32,-14,1034,742),1071=>array(-4,0,667,729),1072=>array(41,-14,547,560),1073=>array(31,-14,584,777),1074=>array(38,0,534,547),1075=>array(38,0,530,547),1076=>array(-14,-138,634,547),1077=>array(46,-14,571,560),1078=>array(-19,0,892,547),1079=>array(14,-14,488,561),1080=>array(38,0,612,547),1081=>array(38,0,612,760),1082=>array(38,0,597,547),1083=>array(-16,0,609,547),1084=>array(38,0,717,547),1085=>array(38,0,616,547),1086=>array(46,-14,566,560),1087=>array(38,0,616,547),1088=>array(-3,-208,589,560),1089=>array(46,-14,536,560),1090=>array(68,0,606,547),1091=>array(-25,-208,603,547),1092=>array(46,-208,813,729),1093=>array(-26,0,600,547),1094=>array(51,-138,629,547),1095=>array(94,0,553,547),1096=>array(38,0,877,547),1097=>array(51,-138,891,547),1098=>array(69,0,630,547),1099=>array(38,0,749,547),1100=>array(38,0,513,547),1101=>array(6,-14,496,560),1102=>array(41,-14,796,560),1103=>array(3,0,570,547),1104=>array(46,-14,571,802),1105=>array(46,-14,571,758),1106=>array(55,-208,552,760),1107=>array(38,0,587,803),1108=>array(47,-14,537,560),1109=>array(11,-14,500,560),1110=>array(35,0,273,760),1111=>array(35,0,382,758),1112=>array(-113,-208,277,760),1113=>array(-16,0,826,547),1114=>array(38,0,821,547),1115=>array(35,0,530,760),1116=>array(38,0,597,803),1117=>array(38,0,612,802),1118=>array(-25,-208,603,760),1119=>array(51,-138,629,547),1120=>array(36,-14,884,729),1121=>array(68,-14,771,547),1122=>array(49,0,688,729),1123=>array(36,0,578,729),1124=>array(32,-14,948,742),1125=>array(41,-14,737,560),1126=>array(-63,0,800,729),1127=>array(-28,0,705,547),1128=>array(27,0,1064,729),1129=>array(41,0,923,547),1130=>array(-15,0,784,729),1131=>array(-0,0,611,547),1132=>array(27,0,1023,729),1133=>array(39,0,823,547),1134=>array(-29,-208,582,935),1135=>array(-23,-193,518,753),1136=>array(73,0,910,729),1137=>array(77,-208,905,765),1138=>array(40,-14,747,742),1139=>array(55,-14,557,560),1140=>array(78,0,840,742),1141=>array(75,0,692,560),1142=>array(78,0,840,930),1143=>array(75,0,692,800),1144=>array(62,-208,1017,742),1145=>array(66,-208,946,560),1146=>array(47,-14,905,742),1147=>array(46,-14,708,560),1148=>array(35,-14,1121,932),1149=>array(61,-14,958,758),1150=>array(36,-14,884,900),1151=>array(68,-14,771,734),1152=>array(46,-208,704,742),1153=>array(46,-208,534,560),1154=>array(22,-44,484,457),1155=>array(-525,608,-86,810),1156=>array(-385,645,-8,788),1157=>array(-315,595,-179,797),1158=>array(-328,595,-170,797),1159=>array(-790,606,-0,788),1160=>array(-1016,-180,415,922),1161=>array(-936,-280,354,1022),1162=>array(27,-208,721,928),1163=>array(39,-208,613,760),1164=>array(27,0,592,729),1165=>array(39,0,514,702),1166=>array(27,0,604,729),1167=>array(-3,-208,580,560),1168=>array(13,0,637,878),1169=>array(23,0,544,700),1170=>array(26,0,688,729),1171=>array(21,0,595,547),1172=>array(27,-200,623,729),1173=>array(35,-208,527,547),1174=>array(-36,-157,1126,729),1175=>array(-5,-138,905,547),1176=>array(1,-193,595,742),1177=>array(14,-193,488,561),1178=>array(42,-157,762,729),1179=>array(51,-138,610,547),1180=>array(27,0,747,729),1181=>array(38,0,597,547),1182=>array(27,0,747,729),1183=>array(17,0,576,760),1184=>array(79,0,893,729),1185=>array(59,0,715,547),1186=>array(42,-157,740,729),1187=>array(54,-138,633,547),1188=>array(27,0,1080,729),1189=>array(39,0,913,547),1190=>array(27,-200,1031,729),1191=>array(39,-208,860,547),1192=>array(45,-14,815,743),1193=>array(44,-14,644,560),1194=>array(42,-193,695,742),1195=>array(46,-193,536,560),1196=>array(67,-157,700,729),1197=>array(53,-138,593,547),1198=>array(63,0,676,729),1199=>array(72,-208,603,547),1200=>array(69,0,684,729),1201=>array(62,-208,635,547),1202=>array(-26,-157,725,729),1203=>array(-11,-138,616,547),1204=>array(67,-157,898,729),1205=>array(53,-138,759,547),1206=>array(142,-157,674,729),1207=>array(117,-138,567,547),1208=>array(127,0,659,729),1209=>array(102,0,551,547),1210=>array(119,0,667,729),1211=>array(35,0,566,760),1212=>array(41,-14,894,742),1213=>array(31,-14,687,560),1214=>array(41,-184,894,742),1215=>array(31,-161,687,560),1216=>array(27,0,268,729),1217=>array(-51,0,1111,928),1218=>array(-19,0,892,785),1219=>array(27,-200,721,729),1220=>array(38,-208,617,547),1221=>array(-46,-208,726,729),1222=>array(-36,-208,607,547),1223=>array(27,-200,725,729),1224=>array(39,-208,617,547),1225=>array(27,-208,725,729),1226=>array(39,-208,617,547),1227=>array(142,-157,674,729),1228=>array(117,-138,567,547),1229=>array(27,-208,836,729),1230=>array(39,-208,711,547),1231=>array(35,0,273,760),1232=>array(-53,0,624,926),1233=>array(41,-14,562,761),1234=>array(-53,0,615,913),1235=>array(41,-14,547,758),1236=>array(-45,0,994,729),1237=>array(41,-14,951,560),1238=>array(27,0,630,928),1239=>array(46,-14,571,785),1240=>array(51,-14,750,742),1241=>array(51,-14,563,560),1242=>array(51,-14,750,913),1243=>array(51,-14,563,758),1244=>array(-51,0,1111,913),1245=>array(-19,0,892,758),1246=>array(1,-14,595,913),1247=>array(14,-14,488,758),1248=>array(23,-31,652,729),1249=>array(-24,-213,554,547),1250=>array(27,0,721,899),1251=>array(38,0,612,745),1252=>array(27,0,721,913),1253=>array(38,0,612,758),1254=>array(40,-14,747,913),1255=>array(46,-14,566,758),1256=>array(40,-14,747,742),1257=>array(55,-14,557,560),1258=>array(40,-14,747,913),1259=>array(55,-14,557,758),1260=>array(-6,-14,642,913),1261=>array(6,-14,496,758),1262=>array(24,0,663,899),1263=>array(-25,-208,603,745),1264=>array(24,0,663,913),1265=>array(-25,-208,603,758),1266=>array(24,0,701,927),1267=>array(-25,-208,603,800),1268=>array(109,0,658,913),1269=>array(94,0,553,758),1270=>array(42,-157,638,729),1271=>array(51,-138,543,547),1272=>array(27,0,855,913),1273=>array(38,0,749,758),1274=>array(47,-208,708,729),1275=>array(42,-208,615,547),1276=>array(-21,-200,729,729),1277=>array(-4,-208,622,547),1278=>array(-41,0,709,729),1279=>array(-24,0,602,547),1280=>array(35,0,658,729),1281=>array(27,0,545,547),1282=>array(36,-14,943,729),1283=>array(26,-14,824,547),1284=>array(148,-14,912,742),1285=>array(116,-14,802,561),1286=>array(148,-208,599,742),1287=>array(116,-208,523,561),1288=>array(-48,-14,1009,729),1289=>array(-36,-14,884,547),1290=>array(29,-14,1059,729),1291=>array(39,-14,894,547),1292=>array(45,-14,734,742),1293=>array(47,-14,568,560),1294=>array(51,-14,710,729),1295=>array(37,-14,638,547),1296=>array(121,-14,676,742),1297=>array(39,-14,506,561),1298=>array(-10,-200,744,729),1299=>array(4,-208,629,547),1300=>array(-10,0,1213,729),1301=>array(-16,0,1005,547),1302=>array(27,0,918,729),1303=>array(-3,-208,875,560),1304=>array(-4,0,1029,729),1305=>array(3,-14,945,560),1306=>array(41,-129,747,742),1307=>array(46,-206,597,560),1308=>array(96,0,1020,729),1309=>array(85,0,819,547),1310=>array(27,0,747,729),1311=>array(38,0,597,547),1312=>array(-30,-200,1031,729),1313=>array(-16,-208,852,547),1314=>array(27,-200,1031,729),1315=>array(38,-208,859,547),1316=>array(42,-157,740,729),1317=>array(51,-138,629,547),1329=>array(69,-29,715,729),1330=>array(16,0,662,743),1331=>array(66,0,717,743),1332=>array(56,0,712,743),1333=>array(69,-14,685,729),1334=>array(32,0,710,744),1335=>array(21,0,650,729),1336=>array(16,0,662,743),1337=>array(16,-14,847,743),1338=>array(23,-14,764,729),1339=>array(21,0,637,729),1340=>array(21,0,479,729),1341=>array(21,-14,884,729),1342=>array(111,-13,827,742),1343=>array(99,0,680,729),1344=>array(7,-26,671,729),1345=>array(43,-23,706,744),1346=>array(61,0,674,743),1347=>array(-2,0,715,735),1348=>array(69,-14,837,729),1349=>array(42,-14,659,743),1350=>array(53,-14,667,729),1351=>array(61,-15,709,729),1352=>array(16,0,662,743),1353=>array(70,-28,682,744),1354=>array(56,0,730,743),1355=>array(25,0,705,744),1356=>array(16,0,755,743),1357=>array(58,-14,713,729),1358=>array(61,0,677,729),1359=>array(44,-14,645,741),1360=>array(16,0,662,743),1361=>array(49,-14,666,743),1362=>array(21,0,572,729),1363=>array(56,0,752,729),1364=>array(-33,0,703,743),1365=>array(40,-14,747,742),1366=>array(31,-13,724,729),1369=>array(138,492,297,760),1370=>array(112,499,300,729),1371=>array(71,620,341,803),1372=>array(51,618,458,893),1373=>array(106,617,305,800),1374=>array(52,613,470,866),1375=>array(92,618,522,760),1377=>array(64,-14,934,547),1378=>array(-5,-208,557,560),1379=>array(52,-208,607,560),1380=>array(35,-208,613,560),1381=>array(71,-14,598,760),1382=>array(45,-208,594,560),1383=>array(35,0,541,760),1384=>array(-5,-208,557,560),1385=>array(-5,-208,735,560),1386=>array(46,-14,698,760),1387=>array(-5,-208,557,760),1388=>array(-5,-208,231,547),1389=>array(-5,-208,939,760),1390=>array(45,-14,605,760),1391=>array(71,-208,593,760),1392=>array(35,0,566,760),1393=>array(31,-15,516,760),1394=>array(35,-208,572,560),1395=>array(52,-14,625,768),1396=>array(71,-14,739,760),1397=>array(-116,-208,232,547),1398=>array(58,-14,593,760),1399=>array(-80,-208,448,560),1400=>array(35,0,566,560),1401=>array(-73,-208,339,547),1402=>array(64,-208,934,547),1403=>array(-22,-208,508,561),1404=>array(35,0,589,560),1405=>array(57,-14,589,547),1406=>array(71,-208,635,760),1407=>array(71,-14,897,560),1408=>array(-5,-208,557,560),1409=>array(31,-208,595,560),1410=>array(35,0,409,547),1411=>array(71,-208,897,760),1412=>array(-67,-208,583,560),1413=>array(45,-14,565,560),1414=>array(33,-208,765,760),1415=>array(71,-14,771,760),1417=>array(46,0,229,415),1418=>array(23,212,301,314),1456=>array(264,-217,375,-22),1457=>array(88,-217,458,-22),1458=>array(129,-217,473,-22),1459=>array(129,-217,473,-22),1460=>array(276,-159,364,-85),1461=>array(215,-159,425,-85),1462=>array(227,-217,437,-22),1463=>array(166,-159,474,-85),1464=>array(173,-193,481,-46),1465=>array(-7,625,81,698),1466=>array(-7,625,81,698),1467=>array(154,-237,458,-17),1468=>array(281,237,369,310),1469=>array(264,-217,375,-22),1470=>array(41,472,320,552),1471=>array(166,625,474,698),1472=>array(30,-98,265,645),1473=>array(697,625,785,698),1474=>array(162,625,250,698),1475=>array(49,0,246,547),1478=>array(-3,0,385,547),1479=>array(178,-217,485,-22),1488=>array(91,0,684,547),1489=>array(43,0,549,547),1490=>array(43,-5,383,547),1491=>array(135,0,618,547),1492=>array(101,0,617,547),1493=>array(91,0,288,547),1494=>array(99,0,410,547),1495=>array(91,0,620,547),1496=>array(141,-14,659,552),1497=>array(106,204,264,547),1498=>array(135,-208,509,547),1499=>array(43,0,534,547),1500=>array(135,0,599,729),1501=>array(91,0,640,547),1502=>array(75,0,646,555),1503=>array(50,-208,288,547),1504=>array(43,0,377,547),1505=>array(144,-14,647,547),1506=>array(29,-93,642,547),1507=>array(163,-208,606,547),1508=>array(91,0,623,547),1509=>array(149,-208,603,548),1510=>array(43,0,607,547),1511=>array(62,-208,740,546),1512=>array(135,0,538,547),1513=>array(118,0,772,547),1514=>array(10,-4,634,547),1520=>array(91,0,486,547),1521=>array(106,0,486,547),1522=>array(106,204,462,547),1523=>array(73,361,343,547),1524=>array(73,361,572,547),3647=>array(24,-138,575,769),3713=>array(27,-10,632,560),3714=>array(39,-17,648,568),3716=>array(46,-10,620,568),3719=>array(26,-238,443,568),3720=>array(68,-0,579,575),3722=>array(61,-234,676,568),3725=>array(30,-8,673,573),3732=>array(34,0,589,568),3733=>array(25,-15,589,579),3734=>array(85,-240,660,560),3735=>array(20,-8,631,571),3737=>array(-28,-8,629,568),3738=>array(11,-8,610,571),3739=>array(-7,-8,631,760),3740=>array(13,-8,768,614),3741=>array(46,-14,751,760),3742=>array(25,-8,688,561),3743=>array(6,-8,710,760),3745=>array(-8,-14,690,547),3746=>array(12,-8,694,760),3747=>array(41,-8,669,568),3749=>array(5,-8,604,568),3751=>array(26,-8,585,569),3754=>array(-6,-8,729,679),3755=>array(48,-12,789,575),3757=>array(27,-8,585,568),3758=>array(40,-8,739,605),3759=>array(133,-166,768,579),3760=>array(28,53,618,587),3761=>array(-576,639,-42,880),3762=>array(74,0,489,560),3763=>array(-357,0,489,820),3764=>array(-594,615,-73,926),3765=>array(-593,612,-18,926),3766=>array(-594,615,-73,926),3767=>array(-593,612,-18,926),3768=>array(-363,-350,-160,-38),3769=>array(-425,-306,-129,-40),3771=>array(-581,639,-44,880),3772=>array(-618,-284,9,-39),3773=>array(-4,-240,699,715),3776=>array(35,-14,373,560),3777=>array(35,-14,646,560),3778=>array(50,-5,417,896),3779=>array(101,-14,546,892),3780=>array(161,-11,438,886),3782=>array(28,-232,626,557),3784=>array(-380,632,-264,807),3785=>array(-572,609,-23,891),3786=>array(-595,598,23,869),3787=>array(-469,624,-175,904),3788=>array(-630,630,-2,875),3789=>array(-424,635,-219,820),3792=>array(66,-14,570,547),3793=>array(73,-75,601,576),3794=>array(17,-66,558,711),3795=>array(-56,-9,766,830),3796=>array(19,-83,560,711),3797=>array(19,-83,560,711),3798=>array(-6,-8,811,812),3799=>array(49,-240,654,560),3800=>array(82,-210,679,557),3801=>array(17,-4,675,571),3804=>array(48,-12,1001,575),3805=>array(48,-12,1027,575),4256=>array(128,-15,920,828),4257=>array(162,-0,718,828),4258=>array(176,-148,651,837),4259=>array(115,-15,893,828),4260=>array(162,0,652,837),4261=>array(159,0,821,837),4262=>array(174,-15,742,828),4263=>array(132,-15,992,837),4264=>array(167,0,543,874),4265=>array(134,0,639,828),4266=>array(119,-15,827,828),4267=>array(103,-15,932,828),4268=>array(49,0,672,828),4269=>array(124,-167,880,837),4270=>array(171,-15,880,837),4271=>array(169,0,727,828),4272=>array(89,-15,960,828),4273=>array(107,-15,609,828),4274=>array(48,-0,672,837),4275=>array(124,-182,880,837),4276=>array(146,0,914,834),4277=>array(127,0,781,828),4278=>array(46,-15,673,837),4279=>array(155,0,718,828),4280=>array(89,-15,723,828),4281=>array(49,0,616,828),4282=>array(133,-15,869,837),4283=>array(105,-15,917,828),4284=>array(48,-0,687,828),4285=>array(94,-15,639,837),4286=>array(48,-0,728,828),4287=>array(66,0,856,828),4288=>array(135,-15,892,828),4289=>array(49,0,627,828),4290=>array(99,-15,679,837),4291=>array(127,0,693,828),4292=>array(159,0,701,828),4293=>array(60,-15,827,837),4304=>array(79,-15,488,592),4305=>array(90,-14,510,837),4306=>array(33,-235,526,551),4307=>array(50,-230,806,547),4308=>array(28,-236,509,547),4309=>array(27,-236,521,547),4310=>array(80,-14,491,836),4311=>array(88,-14,797,547),4312=>array(94,0,514,547),4313=>array(21,-236,510,542),4314=>array(100,-230,1071,552),4315=>array(90,-15,585,837),4316=>array(97,-15,593,833),4317=>array(96,-0,784,547),4318=>array(80,-15,550,833),4319=>array(27,-236,561,551),4320=>array(95,0,793,833),4321=>array(100,-15,509,827),4322=>array(62,-236,627,680),4323=>array(31,-236,533,571),4324=>array(98,-236,822,547),4325=>array(27,-236,610,828),4326=>array(99,-230,791,546),4327=>array(27,-236,559,538),4328=>array(83,-15,589,837),4329=>array(49,0,524,837),4330=>array(62,-236,569,532),4331=>array(89,-14,620,828),4332=>array(98,-15,651,837),4333=>array(37,-236,569,827),4334=>array(104,-15,516,827),4335=>array(-16,-235,478,572),4336=>array(76,-15,564,837),4337=>array(92,-15,582,837),4338=>array(24,-141,501,547),4339=>array(27,-236,560,546),4340=>array(28,-236,575,837),4341=>array(68,-15,616,837),4342=>array(91,-236,820,547),4343=>array(26,-236,504,547),4344=>array(28,-236,500,538),4345=>array(85,-236,578,551),4346=>array(77,-77,516,547),4347=>array(37,-10,441,484),4348=>array(155,420,431,837),5121=>array(79,1,747,730),5122=>array(-63,0,605,1037),5123=>array(-63,0,605,729),5124=>array(-63,0,605,914),5125=>array(27,0,722,729),5126=>array(27,0,722,914),5127=>array(27,0,722,913),5129=>array(27,0,722,729),5130=>array(47,0,742,729),5131=>array(47,0,742,914),5132=>array(88,1,898,730),5133=>array(79,1,786,730),5134=>array(88,0,756,729),5135=>array(-63,0,786,729),5136=>array(88,0,756,914),5137=>array(-63,0,786,914),5138=>array(88,0,920,729),5139=>array(27,0,918,729),5140=>array(88,0,920,914),5141=>array(27,0,918,914),5142=>array(27,0,746,914),5143=>array(88,0,940,729),5144=>array(47,0,918,729),5145=>array(88,0,940,914),5146=>array(47,0,918,914),5147=>array(47,0,742,914),5149=>array(88,629,208,729),5150=>array(27,326,448,734),5151=>array(20,356,388,714),5152=>array(72,356,336,714),5153=>array(66,398,361,674),5154=>array(40,391,335,667),5155=>array(41,398,339,667),5156=>array(67,398,335,667),5157=>array(0,327,440,733),5158=>array(27,326,370,734),5159=>array(88,312,208,412),5160=>array(61,503,340,563),5161=>array(61,399,340,667),5162=>array(83,399,363,691),5163=>array(79,1,1002,730),5164=>array(-63,0,821,729),5165=>array(27,0,866,729),5166=>array(47,0,1029,729),5167=>array(78,0,742,729),5168=>array(-63,0,605,1037),5169=>array(-63,0,605,729),5170=>array(-63,0,605,914),5171=>array(-13,0,682,729),5172=>array(-13,0,682,914),5173=>array(-13,0,682,913),5175=>array(-13,0,682,729),5176=>array(47,0,742,729),5177=>array(47,0,742,914),5178=>array(88,0,893,729),5179=>array(78,0,786,729),5180=>array(88,0,756,729),5181=>array(-63,0,786,729),5182=>array(88,0,756,914),5183=>array(-63,0,786,914),5184=>array(88,0,880,729),5185=>array(-13,0,918,729),5186=>array(88,0,880,914),5187=>array(-13,0,918,914),5188=>array(88,0,940,729),5189=>array(47,0,918,729),5190=>array(88,0,940,914),5191=>array(47,0,918,914),5192=>array(47,0,742,913),5193=>array(61,326,493,734),5194=>array(27,326,177,734),5196=>array(71,-14,717,729),5197=>array(15,0,661,1037),5198=>array(15,0,661,743),5199=>array(15,0,661,914),5200=>array(-13,0,671,729),5201=>array(-13,0,671,914),5202=>array(-13,0,671,913),5204=>array(-13,0,671,729),5205=>array(59,0,743,729),5206=>array(59,0,743,914),5207=>array(88,-14,906,729),5208=>array(71,-14,840,729),5209=>array(88,0,850,743),5210=>array(15,0,840,743),5211=>array(88,0,850,914),5212=>array(15,0,840,914),5213=>array(88,0,869,729),5214=>array(-13,0,852,729),5215=>array(88,0,869,914),5216=>array(-13,0,852,914),5217=>array(88,0,960,729),5218=>array(59,0,852,729),5219=>array(88,0,960,914),5220=>array(59,0,852,914),5221=>array(57,0,960,729),5222=>array(67,326,419,734),5223=>array(71,-14,863,734),5224=>array(15,0,863,743),5225=>array(-13,0,851,734),5226=>array(59,0,875,734),5227=>array(62,0,557,743),5228=>array(26,0,622,1037),5229=>array(26,0,622,743),5230=>array(26,0,622,914),5231=>array(7,-14,603,729),5232=>array(7,-14,656,914),5233=>array(7,-14,751,913),5234=>array(71,-14,567,729),5235=>array(71,-14,567,914),5236=>array(88,0,789,743),5237=>array(62,0,722,743),5238=>array(88,0,808,743),5239=>array(26,0,768,743),5240=>array(88,0,808,914),5241=>array(26,0,768,914),5242=>array(88,-14,834,729),5243=>array(7,-14,722,729),5244=>array(88,-14,888,914),5245=>array(7,-14,722,914),5246=>array(88,-14,753,729),5247=>array(71,-14,768,729),5248=>array(88,-14,753,914),5249=>array(71,-14,768,914),5250=>array(57,-14,753,729),5251=>array(52,318,364,734),5252=>array(8,318,380,734),5253=>array(62,0,736,743),5254=>array(26,0,760,743),5255=>array(7,-14,736,734),5256=>array(71,-14,760,734),5257=>array(62,0,557,743),5258=>array(26,0,622,1037),5259=>array(26,0,622,743),5260=>array(26,0,622,914),5261=>array(7,-14,603,729),5262=>array(7,-14,656,914),5263=>array(7,-14,751,913),5264=>array(71,-14,567,729),5265=>array(71,-14,567,914),5266=>array(88,0,789,743),5267=>array(62,0,722,743),5268=>array(88,0,808,743),5269=>array(26,0,768,743),5270=>array(88,0,808,914),5271=>array(26,0,768,914),5272=>array(88,-14,834,729),5273=>array(7,-14,722,729),5274=>array(88,-14,888,914),5275=>array(7,-14,722,914),5276=>array(88,-14,753,729),5277=>array(71,-14,768,729),5278=>array(88,-14,753,914),5279=>array(71,-14,768,914),5280=>array(57,-14,753,729),5281=>array(52,318,364,734),5282=>array(48,318,420,734),5283=>array(113,0,583,729),5284=>array(27,0,623,1037),5285=>array(27,0,623,729),5286=>array(27,0,623,914),5287=>array(-13,0,583,729),5288=>array(-13,0,641,914),5289=>array(-13,0,736,913),5290=>array(27,0,497,729),5291=>array(27,0,497,914),5292=>array(88,0,722,729),5293=>array(113,0,720,729),5294=>array(88,0,812,729),5295=>array(27,0,715,729),5296=>array(88,0,812,914),5297=>array(27,0,715,914),5298=>array(88,0,722,729),5299=>array(-13,0,720,729),5300=>array(88,0,780,914),5301=>array(-13,0,720,914),5302=>array(88,0,686,729),5303=>array(27,0,715,729),5304=>array(88,0,686,914),5305=>array(27,0,715,914),5306=>array(57,0,686,729),5307=>array(27,326,301,734),5308=>array(61,326,493,734),5309=>array(27,326,371,734),5312=>array(85,-14,825,436),5313=>array(29,-14,837,755),5314=>array(29,-14,837,436),5315=>array(0,-14,809,636),5316=>array(14,0,823,450),5317=>array(14,0,823,636),5318=>array(14,0,823,635),5319=>array(26,0,766,450),5320=>array(26,0,766,636),5321=>array(88,-14,1043,436),5322=>array(85,-14,986,436),5323=>array(88,0,998,450),5324=>array(26,0,767,450),5325=>array(88,0,998,636),5326=>array(26,0,767,636),5327=>array(26,0,766,635),5328=>array(66,484,531,736),5329=>array(48,318,438,734),5330=>array(42,484,548,736),5331=>array(85,0,825,450),5332=>array(29,0,837,755),5333=>array(29,0,837,450),5334=>array(29,0,837,636),5335=>array(14,0,823,450),5336=>array(14,0,823,636),5337=>array(14,0,823,635),5338=>array(26,0,766,450),5339=>array(26,0,766,636),5340=>array(88,0,1043,450),5341=>array(85,0,986,450),5342=>array(88,0,1069,450),5343=>array(29,0,981,450),5344=>array(88,0,1069,636),5345=>array(29,0,981,636),5346=>array(88,0,1041,450),5347=>array(14,0,986,450),5348=>array(88,0,1041,636),5349=>array(14,0,986,636),5350=>array(88,0,998,450),5351=>array(26,0,981,450),5352=>array(88,0,998,636),5353=>array(26,0,981,636),5354=>array(67,484,531,736),5356=>array(16,0,742,729),5357=>array(95,0,507,729),5358=>array(27,0,774,1037),5359=>array(27,0,640,729),5360=>array(27,0,694,914),5361=>array(-37,0,576,729),5362=>array(-37,0,633,914),5363=>array(-37,0,728,913),5364=>array(96,0,508,729),5365=>array(96,0,508,914),5366=>array(88,0,738,729),5367=>array(95,0,706,729),5368=>array(88,0,829,729),5369=>array(27,0,723,729),5370=>array(88,0,883,914),5371=>array(27,0,723,914),5372=>array(88,0,807,729),5373=>array(-37,0,706,729),5374=>array(88,0,864,914),5375=>array(-37,0,706,914),5376=>array(88,0,697,729),5377=>array(96,0,723,729),5378=>array(88,0,697,914),5379=>array(96,0,723,914),5380=>array(57,0,697,729),5381=>array(65,326,332,734),5382=>array(33,318,377,741),5383=>array(27,326,403,734),5392=>array(63,-14,649,743),5393=>array(-6,-14,718,743),5394=>array(-6,-14,718,914),5395=>array(32,-14,860,464),5396=>array(32,-14,860,636),5397=>array(26,-14,865,464),5398=>array(26,-14,865,636),5399=>array(88,-14,847,743),5400=>array(63,-14,824,743),5401=>array(88,-14,916,743),5402=>array(-6,-14,824,743),5403=>array(88,-14,916,914),5404=>array(-6,-14,824,914),5405=>array(88,-14,1109,464),5406=>array(32,-14,1051,464),5407=>array(88,-14,1109,636),5408=>array(32,-14,1051,636),5409=>array(88,-14,1114,464),5410=>array(26,-14,1051,464),5411=>array(88,-14,1114,636),5412=>array(26,-14,1051,636),5413=>array(63,476,590,737),5414=>array(44,0,531,729),5415=>array(27,0,571,1037),5416=>array(27,0,571,729),5417=>array(27,0,571,914),5418=>array(56,0,600,729),5419=>array(56,0,660,914),5420=>array(56,0,755,913),5421=>array(96,0,583,729),5422=>array(96,0,583,914),5423=>array(88,0,749,729),5424=>array(44,0,732,729),5425=>array(88,0,760,729),5426=>array(27,0,770,729),5427=>array(88,0,760,914),5428=>array(27,0,770,914),5429=>array(88,0,817,729),5430=>array(56,0,732,729),5431=>array(88,0,877,914),5432=>array(56,0,732,914),5433=>array(88,0,771,729),5434=>array(96,0,770,729),5435=>array(88,0,771,914),5436=>array(96,0,770,914),5437=>array(57,0,771,729),5438=>array(65,326,372,734),5440=>array(61,399,340,667),5441=>array(27,326,460,734),5442=>array(100,-14,901,436),5443=>array(86,-14,861,436),5444=>array(-39,0,763,450),5445=>array(54,0,830,755),5446=>array(54,0,830,450),5447=>array(54,0,830,636),5448=>array(27,0,597,729),5449=>array(27,0,597,914),5450=>array(27,0,541,729),5451=>array(63,0,576,729),5452=>array(63,0,576,914),5453=>array(6,0,576,729),5454=>array(88,0,807,914),5455=>array(63,0,706,914),5456=>array(83,326,403,734),5458=>array(-13,0,713,729),5459=>array(114,0,746,744),5460=>array(23,-15,606,1037),5461=>array(23,-15,606,729),5462=>array(23,-15,606,914),5463=>array(-9,0,686,662),5464=>array(-9,0,686,914),5465=>array(54,0,731,662),5466=>array(54,0,731,914),5467=>array(88,0,929,914),5468=>array(54,0,918,914),5469=>array(64,326,483,685),5470=>array(60,-14,716,743),5471=>array(60,-14,695,743),5472=>array(37,-14,672,743),5473=>array(16,-14,672,743),5474=>array(37,-14,672,914),5475=>array(16,-14,672,914),5476=>array(-13,0,682,729),5477=>array(-13,0,682,914),5478=>array(48,0,738,729),5479=>array(48,0,738,914),5480=>array(88,0,955,914),5481=>array(48,0,852,914),5482=>array(61,326,493,734),5492=>array(55,0,758,743),5493=>array(44,0,830,743),5494=>array(44,0,830,914),5495=>array(0,-14,787,729),5496=>array(0,-14,787,914),5497=>array(72,-14,776,729),5498=>array(72,-14,776,914),5499=>array(76,318,497,734),5500=>array(27,0,725,729),5501=>array(27,326,460,734),5502=>array(83,0,1040,1037),5503=>array(83,0,1040,743),5504=>array(83,0,1040,914),5505=>array(83,-14,1021,734),5506=>array(83,-14,1075,914),5507=>array(83,-14,985,734),5508=>array(83,-14,985,914),5509=>array(83,318,783,734),5514=>array(61,0,759,743),5515=>array(44,0,831,743),5516=>array(0,-14,787,729),5517=>array(72,-14,770,729),5518=>array(83,0,1252,1037),5519=>array(83,0,1252,743),5520=>array(83,0,1252,914),5521=>array(83,-14,976,736),5522=>array(83,-14,1030,914),5523=>array(83,-14,1198,736),5524=>array(83,-14,1198,914),5525=>array(83,332,646,736),5526=>array(83,332,1020,736),5536=>array(12,0,822,692),5537=>array(12,0,822,692),5538=>array(-23,-242,787,450),5539=>array(-23,-242,787,636),5540=>array(56,-242,790,450),5541=>array(56,-242,790,636),5542=>array(81,338,545,736),5543=>array(44,0,593,729),5544=>array(-34,0,588,729),5545=>array(-34,0,588,914),5546=>array(55,0,677,729),5547=>array(55,0,677,914),5548=>array(50,0,599,729),5549=>array(50,0,599,914),5550=>array(23,326,372,734),5551=>array(29,-14,574,729),5598=>array(27,0,711,729),5601=>array(98,0,782,729),5702=>array(27,326,446,734),5703=>array(27,240,446,820),5742=>array(27,0,415,306),5743=>array(83,0,976,743),5744=>array(83,0,1238,743),5745=>array(83,0,1625,743),5746=>array(83,0,1625,914),5747=>array(83,-14,1349,736),5748=>array(83,-14,1403,914),5749=>array(83,-14,1571,736),5750=>array(83,-14,1571,914),7424=>array(-23,0,509,547),7425=>array(-48,0,716,547),7426=>array(56,-14,951,560),7427=>array(0,0,531,547),7428=>array(46,-14,536,560),7429=>array(38,0,550,547),7430=>array(12,0,550,547),7431=>array(38,0,490,547),7432=>array(31,-14,493,561),7433=>array(21,-213,258,547),7434=>array(-46,-14,365,547),7435=>array(38,0,617,547),7436=>array(-9,0,460,560),7437=>array(38,0,717,547),7438=>array(38,0,612,547),7439=>array(46,-14,566,560),7440=>array(2,-14,493,560),7441=>array(55,22,629,524),7442=>array(37,57,618,489),7443=>array(57,2,631,543),7444=>array(51,-14,970,560),7446=>array(27,273,529,560),7447=>array(83,-14,585,273),7448=>array(21,0,496,547),7449=>array(-29,0,561,547),7450=>array(78,0,561,547),7451=>array(68,0,606,547),7452=>array(78,-16,564,547),7453=>array(41,37,676,495),7454=>array(56,38,887,496),7455=>array(-55,-238,647,560),7456=>array(72,0,604,547),7457=>array(85,0,819,547),7458=>array(-3,0,543,547),7459=>array(18,-14,488,547),7462=>array(33,0,552,560),7463=>array(-23,0,509,547),7464=>array(21,0,543,547),7465=>array(21,0,496,547),7466=>array(69,0,599,547),7467=>array(-16,0,609,547),7468=>array(-35,326,386,734),7469=>array(-37,326,607,734),7470=>array(22,326,389,734),7472=>array(22,326,448,734),7473=>array(22,326,392,734),7474=>array(1,326,376,734),7475=>array(35,318,458,742),7476=>array(22,326,452,734),7477=>array(22,326,164,734),7478=>array(-83,214,175,734),7479=>array(22,326,450,734),7480=>array(22,326,317,734),7481=>array(22,326,521,734),7482=>array(22,326,449,734),7483=>array(22,326,449,734),7484=>array(35,318,460,742),7485=>array(18,318,413,742),7486=>array(22,326,375,734),7487=>array(22,326,380,734),7488=>array(29,326,426,734),7489=>array(45,318,447,734),7490=>array(61,326,642,734),7491=>array(25,318,333,640),7492=>array(33,318,341,640),7493=>array(35,318,373,640),7494=>array(35,318,598,640),7495=>array(17,318,354,751),7496=>array(24,318,385,751),7497=>array(34,318,356,640),7498=>array(32,318,354,640),7499=>array(29,318,315,640),7500=>array(23,318,309,640),7501=>array(38,209,383,640),7502=>array(18,207,158,632),7503=>array(16,326,374,751),7504=>array(27,326,565,640),7505=>array(38,209,363,640),7506=>array(35,318,351,640),7507=>array(7,318,307,640),7508=>array(19,479,335,640),7509=>array(50,318,367,479),7510=>array(15,209,376,640),7511=>array(31,326,253,719),7512=>array(48,318,373,632),7513=>array(29,347,423,604),7514=>array(52,319,590,633),7515=>array(48,326,384,632),7517=>array(6,209,356,755),7518=>array(42,209,395,632),7519=>array(25,318,347,742),7520=>array(46,209,391,635),7521=>array(-23,209,387,633),7522=>array(18,0,158,425),7523=>array(27,0,289,313),7524=>array(48,-8,373,306),7525=>array(48,0,384,306),7526=>array(6,-117,356,429),7527=>array(42,-117,395,306),7528=>array(6,-117,371,313),7529=>array(46,-117,391,309),7530=>array(-23,-117,387,307),7543=>array(19,-208,583,560),7544=>array(22,326,452,734),7547=>array(3,0,368,547),7549=>array(-3,-208,652,560),7557=>array(30,-208,332,760),7579=>array(5,318,343,640),7580=>array(35,318,334,640),7581=>array(38,287,338,640),7582=>array(22,318,353,751),7583=>array(13,318,304,640),7584=>array(25,326,275,751),7585=>array(-52,209,159,632),7586=>array(38,209,384,632),7587=>array(59,209,383,632),7588=>array(19,326,189,751),7589=>array(51,326,165,632),7590=>array(6,326,228,632),7591=>array(6,326,228,632),7592=>array(-124,209,169,751),7593=>array(28,209,169,751),7594=>array(-8,209,169,751),7595=>array(25,326,292,640),7596=>array(38,209,577,640),7597=>array(63,209,601,633),7598=>array(-53,209,365,640),7599=>array(38,209,383,640),7600=>array(25,326,376,640),7601=>array(35,318,351,640),7602=>array(34,210,351,751),7603=>array(14,209,317,640),7604=>array(-64,209,276,751),7605=>array(42,209,265,719),7606=>array(41,318,449,632),7607=>array(36,318,386,632),7608=>array(50,317,352,632),7609=>array(51,326,341,632),7610=>array(-11,326,324,632),7611=>array(-3,326,333,632),7612=>array(8,209,345,632),7613=>array(0,296,336,632),7614=>array(-11,207,344,632),7615=>array(35,320,351,756),7620=>array(-452,616,-61,800),7621=>array(-472,616,-28,800),7622=>array(-472,616,-28,800),7623=>array(-439,616,-48,800),7624=>array(-313,616,87,800),7625=>array(-348,616,123,800),7680=>array(-53,-241,615,729),7681=>array(41,-241,547,560),7682=>array(27,0,625,913),7683=>array(36,-14,587,915),7684=>array(27,-184,625,729),7685=>array(36,-184,587,760),7686=>array(27,-157,625,729),7687=>array(36,-157,587,760),7688=>array(42,-193,695,928),7689=>array(46,-193,536,800),7690=>array(27,0,722,914),7691=>array(46,-14,674,942),7692=>array(27,-184,722,729),7693=>array(46,-184,639,760),7694=>array(27,-156,722,729),7695=>array(46,-157,639,760),7696=>array(27,-193,722,729),7697=>array(44,-193,639,760),7698=>array(27,-240,722,729),7699=>array(34,-240,639,760),7700=>array(27,0,630,1044),7701=>array(46,-14,571,887),7702=>array(27,0,630,1044),7703=>array(46,-14,608,887),7704=>array(27,-213,630,729),7705=>array(46,-213,571,560),7706=>array(27,-193,630,729),7707=>array(46,-193,571,560),7708=>array(27,-193,630,928),7709=>array(46,-193,586,780),7710=>array(27,0,587,914),7711=>array(68,0,478,942),7712=>array(45,-14,725,899),7713=>array(32,-208,596,745),7714=>array(27,0,725,914),7715=>array(35,0,566,942),7716=>array(27,-184,725,729),7717=>array(35,-184,566,760),7718=>array(27,0,725,913),7719=>array(35,0,587,913),7720=>array(-79,-193,725,729),7721=>array(-77,-193,566,760),7722=>array(27,-222,725,729),7723=>array(35,-222,566,760),7724=>array(-110,-193,268,729),7725=>array(-127,-193,273,760),7726=>array(27,0,447,1044),7727=>array(35,0,437,883),7728=>array(27,0,722,928),7729=>array(35,0,612,928),7730=>array(27,-184,722,729),7731=>array(35,-184,612,760),7732=>array(27,-157,722,729),7733=>array(35,-157,612,760),7734=>array(27,-184,497,729),7735=>array(-2,-184,273,760),7736=>array(27,-184,497,927),7737=>array(-2,-184,411,899),7738=>array(27,-157,497,729),7739=>array(-92,-157,273,760),7740=>array(27,-240,497,729),7741=>array(-123,-240,273,760),7742=>array(27,0,836,928),7743=>array(35,0,906,800),7744=>array(27,0,836,914),7745=>array(35,0,906,760),7746=>array(27,-184,836,729),7747=>array(35,-184,906,560),7748=>array(27,0,721,913),7749=>array(35,0,566,760),7750=>array(27,-184,721,729),7751=>array(35,-184,566,560),7752=>array(27,-157,721,729),7753=>array(35,-157,566,560),7754=>array(27,-240,721,729),7755=>array(35,-240,566,560),7756=>array(40,-14,747,1044),7757=>array(46,-14,629,883),7758=>array(40,-14,747,1043),7759=>array(46,-14,583,885),7760=>array(40,-14,747,1044),7761=>array(46,-14,566,887),7762=>array(40,-14,747,1045),7763=>array(46,-14,600,886),7764=>array(27,0,601,928),7765=>array(-3,-208,589,800),7766=>array(27,0,601,914),7767=>array(-3,-208,589,760),7768=>array(27,0,600,914),7769=>array(35,0,463,760),7770=>array(27,-184,600,729),7771=>array(-2,-184,463,560),7772=>array(27,-184,600,899),7773=>array(-2,-184,504,745),7774=>array(27,-157,600,729),7775=>array(-93,-157,463,560),7776=>array(6,-14,603,914),7777=>array(11,-14,500,760),7778=>array(6,-184,603,742),7779=>array(11,-184,500,560),7780=>array(6,-14,648,928),7781=>array(11,-14,642,800),7782=>array(6,-14,659,1042),7783=>array(11,-14,571,858),7784=>array(6,-184,603,914),7785=>array(11,-184,500,760),7786=>array(43,0,676,914),7787=>array(64,0,423,942),7788=>array(43,-184,676,729),7789=>array(64,-184,423,702),7790=>array(43,-157,676,729),7791=>array(19,-156,423,702),7792=>array(23,-241,676,729),7793=>array(-10,-240,423,702),7794=>array(58,-183,713,729),7795=>array(57,-183,589,547),7796=>array(58,-193,713,729),7797=>array(28,-193,589,547),7798=>array(58,-213,713,729),7799=>array(57,-213,589,547),7800=>array(58,-14,713,1044),7801=>array(57,-14,619,883),7802=>array(58,-14,713,1025),7803=>array(57,-14,589,867),7804=>array(78,0,742,936),7805=>array(72,0,604,777),7806=>array(78,-182,742,729),7807=>array(72,-184,604,547),7808=>array(96,0,1020,931),7809=>array(85,0,819,802),7810=>array(96,0,1020,931),7811=>array(85,0,819,803),7812=>array(96,0,1020,913),7813=>array(85,0,819,758),7814=>array(96,0,1020,913),7815=>array(85,0,819,760),7816=>array(96,-184,1020,729),7817=>array(85,-184,819,547),7818=>array(-43,0,703,914),7819=>array(-26,0,600,760),7820=>array(-43,0,703,913),7821=>array(-26,0,600,758),7822=>array(63,0,676,914),7823=>array(-25,-208,603,760),7824=>array(-22,0,703,928),7825=>array(-3,0,543,800),7826=>array(-22,-184,703,729),7827=>array(-3,-184,543,547),7828=>array(-22,-157,703,729),7829=>array(-3,-157,543,547),7830=>array(35,-157,566,760),7831=>array(64,0,423,913),7832=>array(85,0,819,878),7833=>array(-25,-208,603,878),7834=>array(41,-14,777,760),7835=>array(68,0,478,942),7836=>array(-22,0,445,760),7837=>array(28,0,445,760),7838=>array(16,-14,682,743),7839=>array(38,-14,557,742),7840=>array(-53,-184,615,729),7841=>array(41,-184,547,560),7842=>array(-53,0,615,992),7843=>array(41,-14,555,810),7844=>array(-53,0,770,1028),7845=>array(41,-14,712,847),7846=>array(-53,0,615,1028),7847=>array(41,-14,547,847),7848=>array(-53,0,773,1044),7849=>array(41,-14,711,863),7850=>array(-53,0,641,1043),7851=>array(41,-14,580,862),7852=>array(-53,-184,615,928),7853=>array(41,-184,547,800),7854=>array(-53,0,649,1044),7855=>array(41,-14,594,868),7856=>array(-53,0,615,1044),7857=>array(41,-14,558,868),7858=>array(-53,0,615,1068),7859=>array(41,-14,552,895),7860=>array(-53,0,651,1043),7861=>array(41,-14,596,870),7862=>array(-53,-184,624,926),7863=>array(41,-184,562,761),7864=>array(27,-184,630,729),7865=>array(46,-184,571,560),7866=>array(27,0,630,992),7867=>array(46,-14,583,810),7868=>array(27,0,630,921),7869=>array(46,-14,571,777),7870=>array(27,0,760,1028),7871=>array(46,-14,741,847),7872=>array(27,0,630,1028),7873=>array(46,-14,571,847),7874=>array(27,0,764,1044),7875=>array(46,-14,746,863),7876=>array(27,0,631,1043),7877=>array(46,-14,614,862),7878=>array(27,-184,630,928),7879=>array(46,-184,571,800),7880=>array(27,0,368,992),7881=>array(35,0,336,810),7882=>array(-6,-184,268,729),7883=>array(-2,-184,273,760),7884=>array(40,-184,747,742),7885=>array(46,-184,566,560),7886=>array(40,-14,747,992),7887=>array(46,-14,575,810),7888=>array(40,-14,821,1028),7889=>array(46,-14,736,847),7890=>array(40,-14,747,1028),7891=>array(46,-14,566,847),7892=>array(40,-14,824,1044),7893=>array(46,-14,736,863),7894=>array(40,-14,747,1043),7895=>array(46,-14,604,862),7896=>array(40,-184,747,928),7897=>array(46,-184,566,800),7898=>array(34,-14,823,927),7899=>array(48,-14,657,800),7900=>array(34,-14,823,927),7901=>array(48,-14,657,800),7902=>array(34,-14,823,991),7903=>array(48,-14,657,810),7904=>array(34,-14,823,921),7905=>array(48,-14,657,777),7906=>array(34,-184,823,761),7907=>array(48,-184,657,609),7908=>array(58,-184,713,729),7909=>array(57,-184,589,547),7910=>array(58,-14,713,992),7911=>array(57,-14,589,810),7912=>array(56,-4,854,927),7913=>array(58,-14,720,800),7914=>array(56,-4,854,927),7915=>array(58,-14,720,800),7916=>array(56,-4,854,992),7917=>array(58,-14,720,810),7918=>array(56,-4,854,921),7919=>array(58,-14,720,777),7920=>array(56,-184,854,761),7921=>array(58,-184,720,615),7922=>array(63,0,676,931),7923=>array(-25,-208,603,802),7924=>array(63,-184,676,729),7925=>array(-25,-208,603,547),7926=>array(63,0,676,996),7927=>array(-25,-208,603,813),7928=>array(63,0,676,921),7929=>array(-25,-208,603,777),7930=>array(27,0,709,729),7931=>array(21,0,522,760),7936=>array(55,-12,645,797),7937=>array(55,-12,645,797),7938=>array(55,-12,645,800),7939=>array(55,-12,645,800),7940=>array(55,-12,645,800),7941=>array(55,-12,646,800),7942=>array(55,-12,645,928),7943=>array(55,-12,645,928),7944=>array(-53,0,615,797),7945=>array(-53,0,615,797),7946=>array(51,0,809,800),7947=>array(79,0,809,800),7948=>array(32,0,700,800),7949=>array(64,0,732,800),7950=>array(-29,0,639,928),7951=>array(5,0,674,928),7952=>array(39,-14,506,797),7953=>array(39,-14,506,797),7954=>array(39,-14,533,800),7955=>array(39,-14,532,800),7956=>array(39,-14,593,800),7957=>array(39,-14,608,800),7960=>array(52,0,709,797),7961=>array(79,0,709,797),7962=>array(51,0,964,800),7963=>array(79,0,973,800),7964=>array(52,0,896,800),7965=>array(78,0,926,800),7968=>array(57,-208,579,797),7969=>array(57,-208,579,797),7970=>array(57,-208,580,800),7971=>array(57,-208,579,800),7972=>array(57,-208,619,800),7973=>array(57,-208,653,800),7974=>array(57,-208,622,928),7975=>array(57,-208,611,928),7976=>array(52,0,810,797),7977=>array(79,0,809,797),7978=>array(51,0,1059,800),7979=>array(79,0,1062,800),7980=>array(52,0,1000,800),7981=>array(78,0,1024,800),7982=>array(111,0,907,928),7983=>array(109,0,920,928),7984=>array(67,0,282,797),7985=>array(67,0,279,797),7986=>array(10,0,412,800),7987=>array(42,0,418,800),7988=>array(51,0,469,800),7989=>array(53,0,473,800),7990=>array(67,0,431,928),7991=>array(67,0,428,928),7992=>array(52,0,353,797),7993=>array(79,0,347,797),7994=>array(51,0,608,800),7995=>array(79,0,608,800),7996=>array(52,0,543,800),7997=>array(78,0,573,800),7998=>array(111,0,463,928),7999=>array(109,0,466,928),8000=>array(46,-14,566,797),8001=>array(46,-14,566,797),8002=>array(46,-14,567,800),8003=>array(46,-14,566,800),8004=>array(46,-14,621,800),8005=>array(46,-14,639,800),8008=>array(52,-14,764,797),8009=>array(79,-14,808,797),8010=>array(51,-14,1055,800),8011=>array(79,-14,1060,800),8012=>array(52,-14,898,800),8013=>array(78,-14,930,800),8016=>array(59,0,533,797),8017=>array(59,0,533,797),8018=>array(59,0,537,800),8019=>array(59,0,533,800),8020=>array(59,0,601,800),8021=>array(59,0,611,800),8022=>array(59,0,573,928),8023=>array(59,0,557,928),8025=>array(79,0,849,797),8027=>array(79,0,1063,800),8029=>array(78,0,1077,800),8031=>array(109,0,963,928),8032=>array(68,-14,771,797),8033=>array(68,-14,771,797),8034=>array(68,-14,771,800),8035=>array(68,-14,771,800),8036=>array(68,-14,771,800),8037=>array(68,-14,771,800),8038=>array(68,-14,771,928),8039=>array(68,-14,771,928),8040=>array(4,0,761,797),8041=>array(45,0,802,797),8042=>array(51,0,1048,800),8043=>array(79,0,1054,800),8044=>array(52,0,904,800),8045=>array(78,0,931,800),8046=>array(111,0,880,928),8047=>array(109,0,911,928),8048=>array(55,-12,645,800),8049=>array(55,-12,645,800),8050=>array(39,-14,506,800),8051=>array(39,-14,561,800),8052=>array(57,-208,579,800),8053=>array(57,-208,619,800),8054=>array(51,0,265,800),8055=>array(67,0,431,800),8056=>array(46,-14,566,800),8057=>array(46,-14,583,800),8058=>array(59,0,533,800),8059=>array(59,0,539,800),8060=>array(68,-14,771,800),8061=>array(68,-14,771,800),8064=>array(55,-208,645,797),8065=>array(55,-208,645,797),8066=>array(55,-208,645,800),8067=>array(55,-208,645,800),8068=>array(55,-208,645,800),8069=>array(55,-208,646,800),8070=>array(55,-208,645,928),8071=>array(55,-208,645,928),8072=>array(-53,-208,615,797),8073=>array(-53,-208,615,797),8074=>array(51,-208,809,800),8075=>array(79,-208,809,800),8076=>array(32,-208,700,800),8077=>array(64,-208,732,800),8078=>array(-29,-208,639,928),8079=>array(5,-208,674,928),8080=>array(39,-208,579,797),8081=>array(39,-208,579,797),8082=>array(39,-208,580,800),8083=>array(39,-208,579,800),8084=>array(39,-208,619,800),8085=>array(39,-208,653,800),8086=>array(39,-208,622,928),8087=>array(39,-208,611,928),8088=>array(52,-208,810,797),8089=>array(79,-208,809,797),8090=>array(51,-208,1059,800),8091=>array(79,-208,1062,800),8092=>array(52,-208,1000,800),8093=>array(78,-208,1024,800),8094=>array(111,-208,907,928),8095=>array(109,-208,920,928),8096=>array(68,-208,771,797),8097=>array(68,-208,771,797),8098=>array(68,-208,771,800),8099=>array(68,-208,771,800),8100=>array(68,-208,771,800),8101=>array(68,-208,771,800),8102=>array(68,-208,771,928),8103=>array(68,-208,771,928),8104=>array(4,-208,761,797),8105=>array(45,-208,802,797),8106=>array(51,-208,1048,800),8107=>array(79,-208,1054,800),8108=>array(52,-208,904,800),8109=>array(78,-208,931,800),8110=>array(111,-208,880,928),8111=>array(109,-208,911,928),8112=>array(55,-12,645,785),8113=>array(55,-12,645,745),8114=>array(55,-208,645,800),8115=>array(55,-208,645,559),8116=>array(55,-208,645,800),8118=>array(55,-12,645,777),8119=>array(55,-208,645,777),8120=>array(-53,0,615,928),8121=>array(-53,0,615,899),8122=>array(-21,0,647,800),8123=>array(-53,0,615,800),8124=>array(-53,-208,615,729),8125=>array(239,595,397,797),8126=>array(136,-208,240,-45),8127=>array(239,595,397,797),8128=>array(164,639,513,777),8129=>array(184,659,545,928),8130=>array(39,-208,579,800),8131=>array(39,-208,579,560),8132=>array(39,-208,619,800),8134=>array(57,-208,583,777),8135=>array(39,-208,583,777),8136=>array(105,0,803,800),8137=>array(59,0,765,800),8138=>array(105,0,904,800),8139=>array(64,0,869,800),8140=>array(27,-208,725,729),8141=>array(116,595,518,800),8142=>array(137,595,554,800),8143=>array(196,595,545,928),8144=>array(67,0,399,785),8145=>array(67,0,374,745),8146=>array(67,0,391,978),8147=>array(74,0,450,978),8150=>array(62,0,411,777),8151=>array(67,0,444,928),8152=>array(27,0,394,928),8153=>array(27,0,391,899),8154=>array(105,0,448,800),8155=>array(62,0,409,800),8157=>array(137,595,514,800),8158=>array(148,595,568,800),8159=>array(196,595,545,928),8160=>array(59,0,533,785),8161=>array(59,0,533,745),8162=>array(59,0,533,978),8163=>array(59,0,566,978),8164=>array(16,-208,599,797),8165=>array(16,-208,599,797),8166=>array(59,0,533,777),8167=>array(59,0,558,928),8168=>array(63,0,676,928),8169=>array(63,0,676,899),8170=>array(105,0,910,800),8171=>array(56,0,919,800),8172=>array(79,0,683,797),8173=>array(184,659,493,978),8174=>array(184,659,553,978),8175=>array(190,617,388,800),8178=>array(68,-208,771,800),8179=>array(68,-208,771,547),8180=>array(68,-208,771,800),8182=>array(68,-14,771,777),8183=>array(68,-208,771,777),8184=>array(105,-14,901,800),8185=>array(64,-14,793,800),8186=>array(105,0,881,800),8187=>array(53,0,828,800),8188=>array(-34,-208,723,738),8189=>array(252,616,522,800),8190=>array(266,595,398,797),8208=>array(45,234,324,314),8209=>array(45,234,324,314),8210=>array(42,239,594,309),8211=>array(42,239,458,309),8212=>array(42,239,958,309),8213=>array(-7,239,1007,309),8214=>array(127,-236,371,764),8215=>array(-10,-236,510,-9),8216=>array(131,489,321,729),8217=>array(135,489,325,729),8218=>array(3,-116,193,124),8219=>array(165,489,287,729),8220=>array(131,489,521,729),8221=>array(135,489,525,729),8222=>array(3,-116,393,124),8223=>array(92,489,412,729),8224=>array(42,-96,501,729),8225=>array(-17,-96,508,729),8226=>array(150,227,440,516),8227=>array(150,188,479,555),8228=>array(65,0,192,124),8229=>array(65,0,525,124),8230=>array(65,0,859,124),8231=>array(99,302,226,426),8240=>array(91,-14,1259,742),8241=>array(91,-14,1659,742),8242=>array(2,547,221,729),8243=>array(2,547,367,729),8244=>array(2,547,514,729),8245=>array(90,547,238,729),8246=>array(90,547,385,729),8247=>array(90,547,531,729),8248=>array(5,-236,333,-30),8249=>array(62,69,338,517),8250=>array(62,69,338,517),8251=>array(114,0,717,596),8252=>array(0,0,483,729),8253=>array(115,0,500,742),8254=>array(-10,686,510,755),8255=>array(-43,-237,847,-60),8256=>array(-43,752,847,929),8257=>array(-42,-236,286,229),8258=>array(30,-29,970,814),8259=>array(97,313,411,421),8260=>array(-262,-14,428,742),8261=>array(40,-132,420,760),8262=>array(-39,-132,342,760),8263=>array(87,0,937,742),8264=>array(123,0,731,742),8265=>array(0,0,711,742),8266=>array(98,-123,513,545),8267=>array(54,-96,633,729),8268=>array(112,227,387,516),8269=>array(112,227,387,516),8270=>array(30,-29,470,427),8271=>array(96,-116,287,517),8272=>array(-43,-237,847,929),8273=>array(30,-7,470,876),8274=>array(-9,-93,491,729),8275=>array(49,228,951,399),8276=>array(-43,-237,847,-60),8277=>array(160,98,708,631),8278=>array(129,149,523,589),8279=>array(2,547,660,729),8280=>array(182,125,688,613),8281=>array(154,120,726,608),8282=>array(51,0,296,729),8283=>array(52,-138,776,867),8284=>array(63,0,806,729),8285=>array(59,39,282,655),8286=>array(53,8,287,683),8304=>array(42,319,367,742),8305=>array(18,326,158,751),8308=>array(41,326,390,734),8309=>array(13,319,359,734),8310=>array(45,319,376,742),8311=>array(78,326,394,734),8312=>array(26,319,375,742),8313=>array(33,319,364,742),8314=>array(67,326,461,677),8315=>array(67,479,461,525),8316=>array(67,422,461,581),8317=>array(55,252,246,751),8318=>array(7,252,198,751),8319=>array(26,326,352,640),8320=>array(42,-7,367,416),8321=>array(66,0,347,408),8322=>array(36,0,385,416),8323=>array(16,-7,368,416),8324=>array(41,0,390,408),8325=>array(13,-7,359,408),8326=>array(45,-7,376,416),8327=>array(78,0,394,408),8328=>array(26,-7,375,416),8329=>array(33,-7,364,416),8330=>array(67,0,461,351),8331=>array(67,152,461,199),8332=>array(67,96,461,254),8333=>array(55,-74,246,425),8334=>array(7,-74,198,425),8336=>array(25,-8,333,313),8337=>array(34,-8,356,313),8338=>array(35,-8,351,313),8339=>array(27,0,415,306),8340=>array(32,-8,354,313),8341=>array(16,0,340,425),8342=>array(16,0,374,425),8343=>array(16,0,155,425),8344=>array(27,0,565,313),8345=>array(26,0,352,314),8346=>array(15,-117,376,313),8347=>array(30,0,330,322),8348=>array(31,0,253,393),8352=>array(58,0,864,729),8353=>array(42,-44,636,778),8354=>array(42,-14,636,742),8355=>array(32,0,657,729),8356=>array(24,0,637,742),8357=>array(38,-93,900,640),8358=>array(38,0,710,729),8359=>array(27,-14,1250,729),8360=>array(28,-14,1029,729),8361=>array(43,0,1027,729),8362=>array(-24,-14,826,729),8363=>array(46,-157,701,760),8364=>array(-19,-14,607,742),8365=>array(19,0,682,729),8366=>array(64,0,698,729),8367=>array(47,-222,1178,742),8368=>array(9,-14,578,742),8369=>array(27,0,655,729),8370=>array(32,-81,630,809),8371=>array(-63,0,632,729),8372=>array(38,-14,736,742),8373=>array(84,-147,611,760),8376=>array(37,0,697,729),8377=>array(56,0,656,729),8378=>array(-20,2,649,731),8400=>array(-503,635,-28,760),8401=>array(-482,635,-17,760),8406=>array(-470,560,-21,760),8407=>array(-475,560,-26,760),8411=>array(-360,659,140,758),8412=>array(-456,659,235,758),8417=>array(-470,560,-26,760),8448=>array(17,-24,939,752),8449=>array(17,-24,939,752),8450=>array(56,-14,644,742),8451=>array(95,-14,1104,742),8452=>array(114,0,771,729),8453=>array(22,-24,924,752),8454=>array(22,-24,989,752),8455=>array(121,-14,676,742),8456=>array(-6,-146,642,611),8457=>array(95,0,916,742),8459=>array(36,-14,943,748),8460=>array(1,-128,693,731),8461=>array(98,0,751,729),8462=>array(35,0,566,760),8463=>array(44,0,566,760),8464=>array(29,-15,432,742),8465=>array(52,-14,659,742),8466=>array(33,-14,679,743),8467=>array(-14,-14,353,742),8468=>array(22,-14,762,760),8469=>array(97,0,704,729),8470=>array(-44,0,962,729),8471=>array(138,0,862,724),8472=>array(54,-221,658,495),8473=>array(98,0,666,729),8474=>array(56,-129,731,742),8475=>array(32,-9,764,774),8476=>array(41,-14,803,743),8477=>array(98,0,774,729),8478=>array(83,0,814,729),8479=>array(93,-107,670,847),8480=>array(126,443,770,730),8481=>array(32,0,987,547),8482=>array(144,447,784,729),8483=>array(14,-108,817,846),8484=>array(45,0,700,729),8485=>array(9,-213,627,760),8486=>array(-34,0,723,738),8487=>array(42,-14,798,724),8488=>array(12,-149,573,783),8489=>array(71,0,270,547),8490=>array(27,0,722,729),8491=>array(-53,0,615,928),8492=>array(45,0,734,772),8493=>array(63,-12,652,742),8494=>array(61,-12,793,647),8495=>array(42,-15,547,533),8496=>array(79,-14,565,742),8497=>array(41,-16,758,755),8498=>array(27,0,587,729),8499=>array(28,-28,1032,751),8500=>array(51,-12,411,395),8501=>array(50,-14,712,742),8502=>array(-2,-14,653,743),8503=>array(13,-35,407,742),8504=>array(42,-35,591,742),8505=>array(34,0,355,760),8506=>array(44,-21,967,654),8507=>array(20,0,1198,547),8508=>array(18,-8,685,547),8509=>array(0,-194,669,560),8510=>array(98,0,648,729),8511=>array(98,0,750,729),8512=>array(12,-192,791,719),8513=>array(47,-14,728,742),8514=>array(59,0,529,729),8515=>array(3,0,599,729),8516=>array(-65,0,548,729),8517=>array(42,0,786,729),8518=>array(44,-14,709,760),8519=>array(44,-14,572,560),8520=>array(39,0,313,760),8521=>array(-114,-208,313,760),8523=>array(58,-14,742,742),8526=>array(-14,0,495,547),8528=>array(66,-14,962,742),8529=>array(66,-14,932,742),8530=>array(66,-14,1335,742),8531=>array(66,-14,936,742),8532=>array(36,-14,936,742),8533=>array(66,-14,927,742),8534=>array(36,-14,927,742),8535=>array(16,-14,927,742),8536=>array(41,-14,927,742),8537=>array(66,-14,944,742),8538=>array(13,-14,944,742),8539=>array(66,-14,943,742),8540=>array(16,-14,943,742),8541=>array(13,-14,943,742),8542=>array(78,-14,943,742),8543=>array(66,-14,829,742),8544=>array(27,0,268,729),8545=>array(27,0,465,729),8546=>array(27,0,663,729),8547=>array(27,0,981,729),8548=>array(78,0,742,729),8549=>array(78,0,896,729),8550=>array(78,0,1093,729),8551=>array(78,0,1290,729),8552=>array(27,0,936,729),8553=>array(-43,0,703,729),8554=>array(-43,0,906,729),8555=>array(-43,0,1104,729),8556=>array(27,0,497,729),8557=>array(42,-14,695,742),8558=>array(27,0,722,729),8559=>array(27,0,836,729),8560=>array(35,0,273,760),8561=>array(35,0,453,760),8562=>array(35,0,632,760),8563=>array(35,0,824,760),8564=>array(72,0,604,547),8565=>array(72,0,806,760),8566=>array(72,0,986,760),8567=>array(72,0,1166,760),8568=>array(35,0,827,760),8569=>array(-26,0,600,547),8570=>array(-26,0,817,760),8571=>array(-26,0,997,760),8572=>array(35,0,273,760),8573=>array(46,-14,536,560),8574=>array(46,-14,639,760),8575=>array(35,0,906,560),8576=>array(59,0,1187,729),8577=>array(27,0,711,729),8578=>array(59,0,1187,729),8579=>array(63,-14,715,742),8580=>array(2,-14,493,560),8581=>array(75,-208,723,742),8585=>array(42,-14,936,742),8592=>array(49,100,781,527),8593=>array(205,0,632,732),8594=>array(57,100,789,527),8595=>array(205,-3,632,729),8596=>array(49,100,789,527),8597=>array(205,-8,632,732),8598=>array(141,25,703,587),8599=>array(141,25,703,587),8600=>array(141,25,703,587),8601=>array(141,25,703,587),8602=>array(49,100,781,527),8603=>array(57,100,789,527),8604=>array(21,103,827,414),8605=>array(11,103,816,414),8606=>array(49,100,781,527),8607=>array(206,0,633,732),8608=>array(57,100,789,527),8609=>array(206,-3,633,729),8610=>array(49,100,781,527),8611=>array(57,100,789,527),8612=>array(49,100,781,527),8613=>array(206,0,632,732),8614=>array(57,100,789,527),8615=>array(206,-3,632,729),8616=>array(206,0,632,732),8617=>array(49,100,780,565),8618=>array(58,100,789,565),8619=>array(49,100,780,565),8620=>array(58,100,789,565),8621=>array(49,100,789,527),8622=>array(49,93,789,534),8623=>array(146,-2,702,730),8624=>array(169,0,629,743),8625=>array(209,0,669,743),8626=>array(169,-14,629,729),8627=>array(209,-14,669,729),8628=>array(233,-3,760,604),8629=>array(49,100,656,626),8630=>array(22,203,799,668),8631=>array(39,203,816,668),8632=>array(108,25,788,729),8633=>array(55,-46,783,673),8634=>array(103,62,762,680),8635=>array(77,62,736,680),8636=>array(49,272,781,527),8637=>array(49,100,781,355),8638=>array(377,0,632,732),8639=>array(205,0,460,732),8640=>array(57,272,789,527),8641=>array(57,100,789,355),8642=>array(377,0,632,732),8643=>array(205,0,460,732),8644=>array(49,-47,789,674),8645=>array(58,-3,779,732),8646=>array(49,-47,789,674),8647=>array(49,-47,781,674),8648=>array(59,0,779,732),8649=>array(58,-47,790,674),8650=>array(59,-3,779,729),8651=>array(49,7,789,620),8652=>array(49,7,789,620),8653=>array(49,100,781,527),8654=>array(49,94,789,533),8655=>array(57,100,789,527),8656=>array(49,100,781,527),8657=>array(206,0,633,732),8658=>array(57,100,789,527),8659=>array(206,-3,633,729),8660=>array(49,100,789,527),8661=>array(205,-8,633,732),8662=>array(141,-23,751,587),8663=>array(92,-23,703,587),8664=>array(92,25,703,636),8665=>array(141,25,751,636),8666=>array(49,100,781,527),8667=>array(57,100,789,527),8668=>array(49,100,781,527),8669=>array(57,100,789,527),8670=>array(205,0,632,732),8671=>array(205,-3,632,729),8672=>array(49,100,781,527),8673=>array(205,0,633,732),8674=>array(57,100,789,527),8675=>array(205,-3,633,729),8676=>array(52,99,781,528),8677=>array(57,99,786,528),8678=>array(27,65,781,562),8679=>array(171,0,667,754),8680=>array(35,65,789,562),8681=>array(171,-25,667,729),8682=>array(171,0,667,754),8683=>array(171,0,667,754),8684=>array(156,0,682,754),8685=>array(171,0,667,754),8686=>array(171,0,667,754),8687=>array(171,0,667,754),8688=>array(57,65,811,562),8689=>array(60,0,788,729),8690=>array(60,0,788,729),8691=>array(171,-25,667,754),8692=>array(57,100,789,527),8693=>array(58,-3,779,732),8694=>array(57,-193,789,820),8695=>array(49,94,781,533),8696=>array(57,94,789,533),8697=>array(49,94,789,533),8698=>array(49,94,781,533),8699=>array(57,94,789,533),8700=>array(49,94,789,533),8701=>array(27,96,781,531),8702=>array(57,96,811,531),8703=>array(27,96,811,531),8704=>array(8,0,676,729),8705=>array(66,-14,554,742),8706=>array(46,-14,471,662),8707=>array(98,0,568,729),8708=>array(98,-46,568,776),8709=>array(76,-10,795,710),8710=>array(-3,0,672,719),8711=>array(-3,0,672,719),8712=>array(85,-10,786,710),8713=>array(85,-139,786,836),8714=>array(106,76,612,550),8715=>array(85,-10,786,710),8716=>array(85,-139,786,836),8717=>array(106,76,612,550),8718=>array(146,0,490,485),8719=>array(76,-192,680,719),8720=>array(76,-192,680,719),8721=>array(12,-192,654,719),8722=>array(106,272,732,355),8723=>array(106,0,732,627),8724=>array(106,0,732,729),8725=>array(-73,-93,427,729),8726=>array(192,-54,529,768),8727=>array(127,0,710,627),8728=>array(158,160,468,470),8729=>array(168,168,458,458),8730=>array(30,-20,637,811),8731=>array(30,-20,637,933),8732=>array(30,-20,637,924),8733=>array(107,112,607,487),8734=>array(107,112,726,487),8735=>array(138,99,700,661),8736=>array(85,0,786,729),8737=>array(85,-53,786,729),8738=>array(116,-3,732,727),8739=>array(211,-214,289,771),8740=>array(50,-214,451,771),8741=>array(133,-214,367,771),8742=>array(50,-214,451,771),8743=>array(128,0,604,579),8744=>array(128,0,604,579),8745=>array(128,0,604,579),8746=>array(128,0,604,579),8747=>array(57,-212,464,757),8748=>array(57,-212,732,757),8749=>array(57,-212,1000,757),8750=>array(57,-212,464,757),8751=>array(57,-212,732,757),8752=>array(57,-212,1000,757),8753=>array(57,-212,522,757),8754=>array(57,-212,514,757),8755=>array(57,-212,515,757),8756=>array(59,100,577,604),8757=>array(59,100,577,604),8758=>array(79,100,182,604),8759=>array(59,100,577,604),8760=>array(106,272,732,552),8761=>array(106,78,732,552),8762=>array(105,78,732,552),8763=>array(106,78,732,552),8764=>array(106,228,732,399),8765=>array(106,228,732,399),8766=>array(79,149,759,479),8767=>array(106,42,732,584),8768=>array(102,0,273,627),8769=>array(106,77,732,553),8770=>array(106,133,732,454),8771=>array(106,172,732,494),8772=>array(106,47,732,603),8773=>array(106,90,732,594),8774=>array(106,11,732,594),8775=>array(106,-5,732,658),8776=>array(106,133,732,494),8777=>array(106,2,732,625),8778=>array(106,90,732,598),8779=>array(106,59,732,602),8780=>array(106,90,732,594),8781=>array(105,105,732,521),8782=>array(106,26,732,601),8783=>array(106,172,732,601),8784=>array(106,172,732,625),8785=>array(106,1,732,625),8786=>array(104,2,732,625),8787=>array(104,2,731,625),8788=>array(101,151,899,476),8789=>array(100,151,900,475),8790=>array(106,172,732,454),8791=>array(106,172,732,760),8792=>array(106,172,732,662),8793=>array(106,172,732,812),8794=>array(106,172,732,812),8795=>array(106,172,732,849),8796=>array(106,172,732,854),8797=>array(106,172,732,764),8798=>array(106,172,732,760),8799=>array(106,172,732,856),8800=>array(106,19,732,608),8801=>array(106,90,732,537),8802=>array(106,-24,732,650),8803=>array(106,0,732,629),8804=>array(106,0,732,582),8805=>array(106,0,732,582),8806=>array(106,-83,732,638),8807=>array(106,-83,732,638),8808=>array(106,-164,732,638),8809=>array(106,-164,732,638),8810=>array(72,22,975,609),8811=>array(72,22,975,609),8812=>array(86,-132,378,759),8813=>array(105,13,732,613),8814=>array(106,2,732,674),8815=>array(106,-47,732,625),8816=>array(106,-102,732,667),8817=>array(106,-102,732,667),8818=>array(106,-55,732,582),8819=>array(106,-40,732,582),8820=>array(106,-105,732,664),8821=>array(106,-102,732,667),8822=>array(102,-87,732,686),8823=>array(102,-87,732,686),8824=>array(102,-197,732,797),8825=>array(102,-197,732,797),8826=>array(106,-38,732,664),8827=>array(106,-38,732,664),8828=>array(106,-105,732,667),8829=>array(106,-105,732,667),8830=>array(106,-85,732,667),8831=>array(106,-85,732,667),8832=>array(106,-61,732,764),8833=>array(106,-138,732,687),8834=>array(99,80,739,546),8835=>array(99,80,739,546),8836=>array(99,-96,739,726),8837=>array(99,-100,739,722),8838=>array(93,0,732,613),8839=>array(106,0,745,613),8840=>array(93,-116,732,730),8841=>array(106,-116,745,730),8842=>array(93,-73,732,613),8843=>array(93,-73,732,613),8844=>array(128,0,604,579),8845=>array(128,0,604,579),8846=>array(128,2,604,582),8847=>array(106,0,732,568),8848=>array(106,0,732,568),8849=>array(106,-83,732,630),8850=>array(106,-83,732,630),8851=>array(106,0,674,626),8852=>array(106,0,674,626),8853=>array(91,-14,747,643),8854=>array(91,-14,747,643),8855=>array(91,-14,747,643),8856=>array(91,-14,747,643),8857=>array(91,-14,747,643),8858=>array(91,-14,747,643),8859=>array(91,-14,747,643),8860=>array(91,-14,747,643),8861=>array(91,-14,747,643),8862=>array(91,-14,747,643),8863=>array(91,-14,747,643),8864=>array(91,-14,747,643),8865=>array(91,-14,747,643),8866=>array(85,0,786,700),8867=>array(85,0,786,700),8868=>array(85,0,786,700),8869=>array(85,0,786,700),8870=>array(85,0,436,700),8871=>array(85,0,436,700),8872=>array(85,0,786,700),8873=>array(85,0,786,700),8874=>array(85,0,786,700),8875=>array(85,0,786,700),8876=>array(85,-40,786,740),8877=>array(85,-40,786,740),8878=>array(85,-40,786,740),8879=>array(85,-40,786,740),8880=>array(106,-43,724,670),8881=>array(106,-43,724,670),8882=>array(106,15,732,612),8883=>array(106,15,732,612),8884=>array(106,-48,732,674),8885=>array(106,-48,732,674),8886=>array(59,175,941,455),8887=>array(59,175,941,455),8888=>array(47,175,791,455),8889=>array(59,-47,779,674),8890=>array(116,0,404,701),8891=>array(98,0,634,740),8892=>array(98,0,634,740),8893=>array(98,0,634,740),8894=>array(138,0,700,562),8895=>array(138,0,700,562),8896=>array(-3,-192,823,719),8897=>array(-3,-192,823,719),8898=>array(68,-192,752,719),8899=>array(68,-192,752,719),8900=>array(3,-233,491,807),8901=>array(107,285,210,409),8902=>array(122,149,504,512),8903=>array(106,15,732,613),8904=>array(106,-30,894,657),8905=>array(106,-30,894,657),8906=>array(106,-30,894,657),8907=>array(106,-30,894,657),8908=>array(106,-30,894,657),8909=>array(106,172,732,494),8910=>array(48,0,684,579),8911=>array(48,0,684,579),8912=>array(93,-3,732,630),8913=>array(106,-3,745,630),8914=>array(103,0,735,663),8915=>array(103,-14,735,649),8916=>array(186,0,652,729),8917=>array(106,-100,732,729),8918=>array(106,46,732,581),8919=>array(106,46,732,581),8920=>array(72,22,1350,609),8921=>array(72,22,1350,609),8922=>array(106,-228,732,854),8923=>array(106,-228,732,854),8924=>array(106,0,732,582),8925=>array(106,0,732,582),8926=>array(106,-105,732,667),8927=>array(106,-105,732,667),8928=>array(106,-178,732,764),8929=>array(106,-178,732,764),8930=>array(106,-141,732,767),8931=>array(106,-141,732,767),8932=>array(106,-94,732,619),8933=>array(106,-94,732,619),8934=>array(106,-138,732,582),8935=>array(106,-138,732,582),8936=>array(106,-169,732,667),8937=>array(106,-171,736,667),8938=>array(106,-130,732,756),8939=>array(106,-130,732,756),8940=>array(106,-189,732,815),8941=>array(104,-189,730,815),8942=>array(448,-93,551,715),8943=>array(115,249,884,373),8944=>array(115,-93,884,715),8945=>array(115,-93,884,715),8946=>array(42,-10,958,710),8947=>array(85,-10,786,710),8948=>array(106,76,612,550),8949=>array(85,-10,786,910),8950=>array(85,-10,786,853),8951=>array(106,76,612,686),8952=>array(85,-144,786,710),8953=>array(85,-10,786,710),8954=>array(42,-10,958,710),8955=>array(85,-10,786,710),8956=>array(106,76,612,550),8957=>array(85,-10,786,853),8958=>array(106,76,612,686),8959=>array(106,0,765,720),8960=>array(62,-18,593,514),8961=>array(56,162,540,443),8962=>array(71,0,563,596),8963=>array(205,481,632,732),8964=>array(205,0,632,251),8965=>array(205,0,632,406),8966=>array(205,0,632,513),8967=>array(208,-31,428,791),8968=>array(-1,-132,380,760),8969=>array(127,-132,391,760),8970=>array(-1,-132,263,760),8971=>array(10,-132,391,760),8972=>array(369,-77,759,313),8973=>array(49,-77,439,313),8974=>array(369,243,759,634),8975=>array(49,243,439,634),8976=>array(106,140,732,421),8977=>array(3,126,510,634),8984=>array(121,0,879,759),8985=>array(106,140,732,421),8988=>array(86,425,469,760),8989=>array(138,425,469,760),8990=>array(72,-70,403,264),8991=>array(52,-70,434,264),8992=>array(210,-250,497,928),8993=>array(21,-237,307,942),8996=>array(76,227,1076,575),8997=>array(76,0,1076,575),8998=>array(76,0,1414,760),8999=>array(76,0,1076,760),9000=>array(59,0,1385,729),9003=>array(0,0,1338,760),9004=>array(73,-91,800,748),9075=>array(81,0,304,547),9076=>array(91,-208,580,560),9077=>array(66,-14,769,547),9082=>array(55,-12,611,559),9085=>array(4,-228,753,102),9095=>array(76,0,1096,748),9108=>array(17,0,856,727),9115=>array(86,-252,414,946),9116=>array(86,-252,181,942),9117=>array(86,-240,414,942),9118=>array(86,-252,414,946),9119=>array(319,-252,414,942),9120=>array(86,-240,414,942),9121=>array(86,-252,414,928),9122=>array(86,-252,181,942),9123=>array(86,-240,414,942),9124=>array(86,-252,414,928),9125=>array(319,-252,414,935),9126=>array(86,-240,414,935),9127=>array(330,-261,668,928),9128=>array(82,-252,420,940),9129=>array(330,-240,668,940),9130=>array(330,-256,420,943),9131=>array(82,-261,420,928),9132=>array(330,-252,668,940),9133=>array(82,-240,420,940),9134=>array(210,-250,307,942),9166=>array(27,65,781,729),9167=>array(91,0,854,596),9187=>array(73,-91,800,748),9189=>array(3,75,766,444),9192=>array(16,-129,553,294),9250=>array(-15,-14,561,760),9251=>array(26,-228,583,102),9312=>array(74,-10,822,738),9313=>array(74,-10,822,738),9314=>array(74,-10,822,738),9315=>array(74,-10,822,738),9316=>array(74,-10,822,738),9317=>array(74,-10,822,738),9318=>array(74,-10,822,738),9319=>array(74,-10,822,738),9320=>array(74,-10,822,738),9321=>array(74,-10,822,738),9472=>array(-10,242,612,326),9473=>array(-10,200,612,368),9474=>array(262,-302,340,973),9475=>array(223,-302,379,973),9476=>array(-10,242,612,326),9477=>array(-10,200,612,368),9478=>array(262,-302,340,973),9479=>array(223,-302,379,973),9480=>array(-10,242,612,326),9481=>array(-10,200,612,368),9482=>array(262,-302,340,973),9483=>array(223,-302,379,973),9484=>array(262,-302,612,326),9485=>array(262,-302,612,368),9486=>array(223,-302,612,326),9487=>array(223,-302,612,368),9488=>array(-10,-302,340,326),9489=>array(-10,-302,340,368),9490=>array(-10,-302,379,326),9491=>array(-10,-302,379,368),9492=>array(262,242,612,973),9493=>array(262,200,612,973),9494=>array(223,242,612,973),9495=>array(223,200,612,973),9496=>array(-10,242,340,973),9497=>array(-10,200,340,973),9498=>array(-10,242,379,973),9499=>array(-10,200,379,973),9500=>array(262,-302,612,973),9501=>array(262,-302,612,973),9502=>array(223,-302,612,973),9503=>array(223,-302,612,973),9504=>array(223,-302,612,973),9505=>array(223,-302,612,973),9506=>array(223,-302,612,973),9507=>array(223,-302,612,973),9508=>array(-10,-302,340,973),9509=>array(-10,-302,340,973),9510=>array(-10,-302,379,973),9511=>array(-10,-302,379,973),9512=>array(-10,-302,379,973),9513=>array(-10,-302,379,973),9514=>array(-10,-302,379,973),9515=>array(-10,-302,379,973),9516=>array(-10,-302,612,326),9517=>array(-10,-302,612,368),9518=>array(-10,-302,612,368),9519=>array(-10,-302,612,368),9520=>array(-10,-302,612,326),9521=>array(-10,-302,612,368),9522=>array(-10,-302,612,368),9523=>array(-10,-302,612,368),9524=>array(-10,242,612,973),9525=>array(-10,200,612,973),9526=>array(-10,200,612,973),9527=>array(-10,200,612,973),9528=>array(-10,242,612,973),9529=>array(-10,200,612,973),9530=>array(-10,200,612,973),9531=>array(-10,200,612,973),9532=>array(-10,-302,612,973),9533=>array(-10,-302,612,973),9534=>array(-10,-302,612,973),9535=>array(-10,-302,612,973),9536=>array(-10,-302,612,973),9537=>array(-10,-302,612,973),9538=>array(-10,-302,612,973),9539=>array(-10,-302,612,973),9540=>array(-10,-302,612,973),9541=>array(-10,-302,612,973),9542=>array(-10,-302,612,973),9543=>array(-10,-302,612,973),9544=>array(-10,-302,612,973),9545=>array(-10,-302,612,973),9546=>array(-10,-302,612,973),9547=>array(-10,-302,612,973),9548=>array(-10,242,612,326),9549=>array(-10,200,612,368),9550=>array(262,-302,340,973),9551=>array(223,-302,379,973),9552=>array(-10,158,612,410),9553=>array(184,-302,418,973),9554=>array(262,-302,612,410),9555=>array(184,-302,612,326),9556=>array(184,-302,612,410),9557=>array(-10,-302,340,410),9558=>array(-10,-302,418,326),9559=>array(-10,-302,418,410),9560=>array(262,158,612,973),9561=>array(184,242,612,973),9562=>array(184,158,612,973),9563=>array(-10,158,340,973),9564=>array(-10,242,418,973),9565=>array(-10,158,418,973),9566=>array(262,-302,612,973),9567=>array(184,-302,612,973),9568=>array(184,-302,612,973),9569=>array(-10,-302,340,973),9570=>array(-10,-302,418,973),9571=>array(-10,-302,418,973),9572=>array(-10,-302,612,410),9573=>array(-10,-302,612,326),9574=>array(-10,-302,612,410),9575=>array(-10,158,612,973),9576=>array(-10,242,612,973),9577=>array(-10,158,612,973),9578=>array(-10,-302,612,973),9579=>array(-10,-302,612,973),9580=>array(-10,-302,612,973),9581=>array(262,-302,612,326),9582=>array(-10,-302,340,326),9583=>array(-10,242,340,973),9584=>array(262,242,612,973),9585=>array(-53,-302,655,973),9586=>array(-53,-302,655,973),9587=>array(-53,-302,655,973),9588=>array(-10,242,311,326),9589=>array(262,284,340,973),9590=>array(311,242,612,326),9591=>array(262,-302,340,284),9592=>array(-10,200,311,368),9593=>array(223,284,379,973),9594=>array(311,200,612,368),9595=>array(223,-302,379,284),9596=>array(-10,200,612,368),9597=>array(223,-302,379,973),9598=>array(-10,200,612,368),9599=>array(223,-302,379,973),9600=>array(-10,260,779,770),9601=>array(-10,-250,779,-123),9602=>array(-10,-250,779,-5),9603=>array(-10,-250,779,132),9604=>array(-10,-250,779,260),9605=>array(-10,-250,779,387),9606=>array(-10,-250,779,515),9607=>array(-10,-250,779,642),9608=>array(-10,-250,779,770),9609=>array(-10,-250,680,770),9610=>array(-10,-250,582,770),9611=>array(-10,-250,483,770),9612=>array(-10,-250,384,770),9613=>array(-10,-250,286,770),9614=>array(-10,-250,187,770),9615=>array(-10,-250,88,770),9616=>array(384,-250,778,770),9617=>array(-10,-250,680,770),9618=>array(-10,-250,779,770),9619=>array(-10,-250,779,770),9620=>array(-10,642,779,770),9621=>array(680,-250,778,770),9622=>array(-10,-250,385,260),9623=>array(384,-250,779,260),9624=>array(-10,260,385,770),9625=>array(-10,-250,779,770),9626=>array(-10,-250,779,770),9627=>array(-10,-250,779,770),9628=>array(-10,-250,779,770),9629=>array(384,260,779,770),9630=>array(-10,-250,779,770),9631=>array(-10,-250,779,770),9632=>array(91,-124,854,643),9633=>array(91,-124,854,643),9634=>array(91,-124,854,643),9635=>array(91,-124,854,643),9636=>array(91,-124,854,643),9637=>array(91,-124,854,643),9638=>array(91,-124,854,643),9639=>array(91,-124,854,643),9640=>array(91,-124,854,643),9641=>array(91,-124,854,643),9642=>array(91,11,587,509),9643=>array(91,11,587,509),9644=>array(91,75,854,444),9645=>array(91,75,854,444),9646=>array(91,-122,459,642),9647=>array(91,-122,459,642),9648=>array(3,75,766,444),9649=>array(3,75,766,444),9650=>array(3,-124,766,643),9651=>array(3,-124,766,643),9652=>array(3,11,499,509),9653=>array(3,11,499,509),9654=>array(3,-124,766,643),9655=>array(3,-124,766,643),9656=>array(3,11,499,509),9657=>array(3,11,499,509),9658=>array(3,11,766,509),9659=>array(3,11,766,509),9660=>array(3,-124,766,643),9661=>array(3,-124,766,643),9662=>array(3,11,499,509),9663=>array(3,11,499,509),9664=>array(3,-124,766,643),9665=>array(3,-124,766,643),9666=>array(3,11,499,509),9667=>array(3,11,499,509),9668=>array(3,11,766,509),9669=>array(3,11,766,509),9670=>array(3,-124,766,643),9671=>array(3,-124,766,643),9672=>array(3,-124,766,643),9673=>array(55,-125,818,645),9674=>array(3,-233,491,807),9675=>array(55,-125,818,645),9676=>array(56,-125,817,644),9677=>array(55,-125,818,645),9678=>array(55,-125,818,645),9679=>array(55,-123,818,641),9680=>array(55,-123,818,641),9681=>array(55,-123,818,641),9682=>array(55,-123,818,641),9683=>array(55,-123,818,641),9684=>array(55,-123,818,641),9685=>array(55,-123,818,641),9686=>array(55,-125,436,645),9687=>array(91,-125,472,645),9688=>array(91,-10,700,770),9689=>array(91,-250,879,770),9690=>array(91,260,879,770),9691=>array(91,-250,879,260),9692=>array(3,260,385,645),9693=>array(3,260,384,645),9694=>array(3,-125,384,260),9695=>array(3,-125,385,260),9696=>array(3,260,766,645),9697=>array(3,-125,766,260),9698=>array(3,-124,766,643),9699=>array(3,-124,766,643),9700=>array(3,-124,766,643),9701=>array(3,-124,766,643),9702=>array(150,227,440,516),9703=>array(91,-124,854,643),9704=>array(91,-124,854,643),9705=>array(91,-124,854,643),9706=>array(91,-124,854,643),9707=>array(91,-124,854,643),9708=>array(3,-124,766,643),9709=>array(3,-124,766,643),9710=>array(3,-124,766,643),9711=>array(55,-250,1064,770),9712=>array(91,-124,854,643),9713=>array(91,-124,854,643),9714=>array(91,-124,854,643),9715=>array(91,-124,854,643),9716=>array(55,-123,818,641),9717=>array(55,-123,818,641),9718=>array(55,-123,818,641),9719=>array(55,-123,818,641),9720=>array(3,-124,766,643),9721=>array(3,-124,766,643),9722=>array(3,-124,766,643),9723=>array(91,-66,739,585),9724=>array(91,-66,739,585),9725=>array(91,-17,642,537),9726=>array(91,-17,642,537),9727=>array(3,-124,766,643),9728=>array(83,0,813,729),9729=>array(51,-2,949,360),9730=>array(49,0,848,729),9731=>array(83,-0,813,927),9732=>array(64,0,833,880),9733=>array(65,-4,832,723),9734=>array(65,-4,832,723),9735=>array(83,2,490,729),9736=>array(83,0,813,731),9737=>array(83,0,813,730),9738=>array(61,0,828,727),9739=>array(61,0,828,723),9740=>array(61,-1,610,722),9741=>array(61,0,952,723),9742=>array(68,0,1177,729),9743=>array(71,0,1180,729),9744=>array(90,0,807,729),9745=>array(89,0,808,729),9746=>array(89,0,808,729),9747=>array(75,78,457,656),9748=>array(49,0,870,933),9749=>array(74,0,822,731),9750=>array(84,0,813,731),9751=>array(84,0,813,727),9752=>array(78,0,819,729),9753=>array(83,140,813,574),9754=>array(84,113,813,569),9755=>array(84,113,813,569),9756=>array(87,104,810,569),9757=>array(72,0,537,724),9758=>array(86,103,810,569),9759=>array(72,-3,537,720),9760=>array(61,0,835,730),9761=>array(84,0,813,730),9762=>array(83,0,813,730),9763=>array(49,0,848,730),9764=>array(49,-2,620,727),9765=>array(83,0,663,731),9766=>array(83,-1,566,731),9767=>array(83,0,701,911),9768=>array(83,0,462,730),9769=>array(83,-1,813,729),9770=>array(87,0,810,730),9771=>array(83,0,814,731),9772=>array(83,0,627,731),9773=>array(83,0,813,730),9774=>array(83,0,813,730),9775=>array(83,0,813,730),9776=>array(83,0,807,729),9777=>array(83,0,807,729),9778=>array(83,0,807,729),9779=>array(83,0,807,729),9780=>array(83,0,807,729),9781=>array(83,0,807,729),9782=>array(83,0,807,729),9783=>array(83,0,807,729),9784=>array(80,3,817,721),9785=>array(83,-73,959,804),9786=>array(83,-73,959,804),9787=>array(83,-73,959,804),9788=>array(83,0,813,730),9789=>array(358,0,814,730),9790=>array(83,0,539,730),9791=>array(85,-102,528,732),9792=>array(85,-125,647,731),9793=>array(85,-14,647,843),9794=>array(79,-14,831,720),9795=>array(166,0,730,730),9796=>array(219,0,677,730),9797=>array(121,0,774,730),9798=>array(127,0,769,730),9799=>array(240,0,656,730),9800=>array(45,0,851,731),9801=>array(89,0,807,730),9802=>array(94,0,802,731),9803=>array(113,31,784,679),9804=>array(140,0,756,730),9805=>array(53,-180,843,730),9806=>array(83,52,813,653),9807=>array(34,-96,863,730),9808=>array(83,-0,813,730),9809=>array(94,0,802,730),9810=>array(86,153,810,579),9811=>array(157,0,739,730),9812=>array(98,0,798,730),9813=>array(110,0,786,730),9814=>array(167,-1,729,729),9815=>array(214,0,683,730),9816=>array(165,0,732,730),9817=>array(148,-0,748,730),9818=>array(98,0,798,730),9819=>array(110,0,786,730),9820=>array(167,-1,729,729),9821=>array(214,0,683,730),9822=>array(162,0,734,730),9823=>array(148,-0,748,730),9824=>array(158,0,738,729),9825=>array(90,0,806,727),9826=>array(168,0,728,729),9827=>array(111,0,785,729),9828=>array(157,0,739,729),9829=>array(89,0,808,729),9830=>array(168,0,728,729),9831=>array(111,0,785,732),9832=>array(105,-1,791,729),9833=>array(84,-5,339,729),9834=>array(84,-5,554,729),9835=>array(184,-102,712,729),9836=>array(92,-5,804,729),9837=>array(88,-3,392,731),9838=>array(84,0,273,731),9839=>array(84,0,400,731),9840=>array(84,0,664,731),9841=>array(64,0,701,731),9842=>array(84,0,813,709),9843=>array(76,16,820,731),9844=>array(76,16,820,731),9845=>array(76,16,820,731),9846=>array(76,16,820,731),9847=>array(76,16,820,731),9848=>array(76,16,820,731),9849=>array(76,16,820,731),9850=>array(76,16,820,731),9851=>array(84,0,812,704),9852=>array(83,0,814,731),9853=>array(83,0,814,731),9854=>array(83,0,814,731),9855=>array(149,1,747,731),9856=>array(73,0,797,725),9857=>array(73,0,797,725),9858=>array(73,0,797,725),9859=>array(73,0,797,725),9860=>array(73,0,797,725),9861=>array(73,0,797,725),9862=>array(83,0,807,724),9863=>array(84,0,808,724),9864=>array(84,0,808,724),9865=>array(84,0,808,724),9866=>array(83,0,807,98),9867=>array(83,0,807,98),9868=>array(83,0,807,411),9869=>array(83,0,807,411),9870=>array(83,0,807,411),9871=>array(83,0,807,411),9872=>array(80,3,634,724),9873=>array(80,3,634,724),9874=>array(52,0,837,724),9875=>array(61,-10,756,725),9876=>array(44,0,672,722),9877=>array(62,-10,476,725),9878=>array(41,-10,811,725),9879=>array(49,0,815,725),9880=>array(42,0,642,725),9881=>array(95,-17,802,727),9882=>array(37,-9,671,726),9883=>array(127,0,763,721),9884=>array(127,0,762,722),9888=>array(49,0,840,721),9889=>array(83,2,619,730),9890=>array(85,-125,919,731),9891=>array(79,-206,1023,720),9892=>array(85,-186,1109,856),9893=>array(85,-125,837,917),9894=>array(131,-14,727,869),9895=>array(101,-170,741,884),9896=>array(188,-14,650,869),9897=>array(4,133,829,596),9898=>array(188,133,650,597),9899=>array(188,133,650,597),9900=>array(249,194,589,536),9901=>array(175,194,663,536),9902=>array(41,169,797,560),9903=>array(5,194,833,536),9904=>array(103,237,757,540),9905=>array(211,42,626,698),9906=>array(85,-125,647,731),9907=>array(168,-125,646,731),9908=>array(86,-125,646,731),9909=>array(86,-125,646,731),9910=>array(59,-118,791,643),9911=>array(194,-104,595,710),9912=>array(158,-125,543,731),9920=>array(42,4,796,553),9921=>array(42,4,796,724),9922=>array(42,4,796,553),9923=>array(42,4,796,724),9954=>array(85,-14,647,843),9985=>array(11,190,803,635),9986=>array(42,141,784,588),9987=>array(11,94,803,539),9988=>array(36,119,824,613),9990=>array(42,-14,796,742),9991=>array(42,-14,796,742),9992=>array(59,21,782,708),9993=>array(64,107,773,622),9996=>array(212,0,561,742),9997=>array(21,83,802,678),9998=>array(89,75,724,710),9999=>array(26,198,819,530),10000=>array(89,75,724,710),10001=>array(43,185,757,544),10002=>array(67,209,757,520),10003=>array(150,97,667,630),10004=>array(116,87,721,631),10005=>array(126,72,711,657),10006=>array(85,31,752,698),10007=>array(118,-9,701,732),10008=>array(123,0,754,739),10009=>array(55,0,783,729),10010=>array(55,0,783,729),10011=>array(55,0,783,729),10012=>array(55,0,783,729),10013=>array(165,0,673,729),10014=>array(131,0,678,729),10015=>array(155,0,683,729),10016=>array(55,0,783,729),10017=>array(91,-13,747,744),10018=>array(41,-14,797,742),10019=>array(42,-12,796,742),10020=>array(41,-14,797,742),10021=>array(41,-13,797,743),10022=>array(42,-14,796,745),10023=>array(42,-14,796,745),10025=>array(23,-9,814,743),10026=>array(42,-14,796,742),10027=>array(23,-9,814,743),10028=>array(23,-9,814,743),10029=>array(23,-9,814,743),10030=>array(23,-9,814,743),10031=>array(23,-9,814,743),10032=>array(24,12,815,714),10033=>array(64,0,773,729),10034=>array(74,0,764,729),10035=>array(55,0,783,729),10036=>array(31,-14,787,742),10037=>array(41,-14,797,742),10038=>array(91,-14,747,742),10039=>array(41,-14,797,742),10040=>array(41,-14,797,742),10041=>array(41,-14,797,742),10042=>array(55,0,783,729),10043=>array(82,-14,756,742),10044=>array(82,-14,756,742),10045=>array(84,-14,753,742),10046=>array(79,-14,759,742),10047=>array(54,0,784,709),10048=>array(54,0,784,709),10049=>array(41,-14,797,742),10050=>array(42,-14,796,742),10051=>array(79,-14,759,742),10052=>array(89,0,749,729),10053=>array(76,0,762,729),10054=>array(63,2,773,729),10055=>array(79,-13,759,742),10056=>array(47,-13,791,730),10057=>array(47,-13,791,730),10058=>array(41,-13,797,743),10059=>array(41,-13,797,743),10061=>array(50,-10,847,738),10063=>array(60,-49,837,729),10064=>array(60,0,837,777),10065=>array(60,-49,837,729),10066=>array(60,0,837,777),10070=>array(83,-2,813,728),10072=>array(377,-240,460,760),10073=>array(336,-240,502,760),10074=>array(253,-240,585,760),10075=>array(85,395,264,729),10076=>array(59,395,237,729),10077=>array(85,395,479,729),10078=>array(59,395,453,729),10081=>array(155,-93,772,851),10082=>array(202,-17,636,742),10083=>array(163,-17,675,742),10084=>array(54,83,784,645),10085=>array(168,-1,729,729),10086=>array(62,21,724,702),10087=>array(78,169,759,564),10088=>array(196,-139,648,769),10089=>array(196,-139,648,769),10090=>array(264,-132,574,758),10091=>array(264,-132,574,758),10092=>array(215,-240,607,760),10093=>array(232,-240,623,760),10094=>array(142,-240,685,760),10095=>array(153,-240,696,760),10096=>array(167,-240,656,760),10097=>array(183,-240,672,760),10098=>array(346,-241,535,760),10099=>array(303,-241,492,760),10100=>array(175,-163,634,760),10101=>array(204,-163,663,760),10102=>array(74,-10,822,738),10103=>array(74,-10,822,738),10104=>array(74,-10,822,738),10105=>array(74,-10,822,738),10106=>array(74,-10,822,738),10107=>array(74,-10,822,738),10108=>array(74,-10,822,738),10109=>array(74,-10,822,738),10110=>array(74,-10,822,738),10111=>array(74,-10,822,738),10112=>array(4,-52,833,780),10113=>array(4,-52,833,780),10114=>array(4,-52,833,780),10115=>array(4,-52,833,780),10116=>array(4,-52,833,780),10117=>array(4,-52,833,780),10118=>array(4,-52,833,780),10119=>array(4,-52,833,780),10120=>array(4,-52,833,780),10121=>array(4,-52,833,780),10122=>array(4,-52,833,780),10123=>array(4,-52,833,780),10124=>array(4,-52,833,780),10125=>array(4,-52,833,780),10126=>array(4,-52,833,780),10127=>array(4,-52,833,780),10128=>array(4,-52,833,780),10129=>array(4,-52,833,780),10130=>array(4,-52,833,780),10131=>array(4,-52,833,780),10132=>array(57,75,789,552),10136=>array(123,55,682,614),10137=>array(57,100,789,527),10138=>array(123,13,682,572),10139=>array(57,129,789,498),10140=>array(57,57,764,570),10141=>array(57,100,789,527),10142=>array(57,100,789,527),10143=>array(57,100,789,527),10144=>array(57,100,789,527),10145=>array(57,65,811,562),10146=>array(111,94,789,533),10147=>array(111,94,789,533),10148=>array(111,-4,789,631),10149=>array(57,100,789,548),10150=>array(57,79,789,527),10151=>array(240,-7,606,634),10152=>array(57,100,789,527),10153=>array(57,75,765,552),10154=>array(57,75,765,552),10155=>array(21,12,794,586),10156=>array(21,12,794,586),10157=>array(135,0,774,574),10158=>array(135,0,774,574),10159=>array(62,49,799,574),10161=>array(62,49,799,574),10162=>array(154,-20,721,585),10163=>array(63,157,789,470),10164=>array(81,55,682,655),10165=>array(57,173,789,454),10166=>array(82,-29,682,572),10167=>array(82,55,682,655),10168=>array(57,172,789,455),10169=>array(82,-28,682,572),10170=>array(56,84,789,543),10171=>array(73,140,779,487),10172=>array(79,167,774,460),10173=>array(79,118,774,509),10174=>array(57,81,789,546),10181=>array(0,-163,377,769),10182=>array(-52,-163,395,769),10208=>array(3,-233,491,807),10214=>array(-0,-132,485,760),10215=>array(-1,-132,484,760),10216=>array(89,-132,397,759),10217=>array(-7,-132,301,759),10218=>array(89,-132,563,759),10219=>array(-7,-132,467,759),10224=>array(44,0,794,732),10225=>array(43,-3,793,729),10226=>array(-17,53,759,659),10227=>array(39,61,814,666),10228=>array(57,-14,1108,643),10229=>array(49,100,1376,527),10230=>array(57,100,1385,527),10231=>array(49,100,1385,527),10232=>array(49,100,1376,527),10233=>array(57,100,1385,527),10234=>array(49,100,1385,527),10235=>array(49,100,1376,527),10236=>array(57,100,1385,527),10237=>array(49,100,1376,527),10238=>array(57,100,1385,527),10239=>array(57,100,1385,527),10241=>array(146,635,293,781),10242=>array(146,358,293,505),10243=>array(146,358,293,781),10244=>array(146,81,293,228),10245=>array(146,81,293,781),10246=>array(146,81,293,505),10247=>array(146,81,293,781),10248=>array(439,635,586,781),10249=>array(146,635,586,781),10250=>array(146,358,586,781),10251=>array(146,358,586,781),10252=>array(146,81,586,781),10253=>array(146,81,586,781),10254=>array(146,81,586,781),10255=>array(146,81,586,781),10256=>array(439,358,586,505),10257=>array(146,358,586,781),10258=>array(146,358,586,505),10259=>array(146,358,586,781),10260=>array(146,81,586,505),10261=>array(146,81,586,781),10262=>array(146,81,586,505),10263=>array(146,81,586,781),10264=>array(439,358,586,781),10265=>array(146,358,586,781),10266=>array(146,358,586,781),10267=>array(146,358,586,781),10268=>array(146,81,586,781),10269=>array(146,81,586,781),10270=>array(146,81,586,781),10271=>array(146,81,586,781),10272=>array(439,81,586,228),10273=>array(146,81,586,781),10274=>array(146,81,586,505),10275=>array(146,81,586,781),10276=>array(146,81,586,228),10277=>array(146,81,586,781),10278=>array(146,81,586,505),10279=>array(146,81,586,781),10280=>array(439,81,586,781),10281=>array(146,81,586,781),10282=>array(146,81,586,781),10283=>array(146,81,586,781),10284=>array(146,81,586,781),10285=>array(146,81,586,781),10286=>array(146,81,586,781),10287=>array(146,81,586,781),10288=>array(439,81,586,505),10289=>array(146,81,586,781),10290=>array(146,81,586,505),10291=>array(146,81,586,781),10292=>array(146,81,586,505),10293=>array(146,81,586,781),10294=>array(146,81,586,505),10295=>array(146,81,586,781),10296=>array(439,81,586,781),10297=>array(146,81,586,781),10298=>array(146,81,586,781),10299=>array(146,81,586,781),10300=>array(146,81,586,781),10301=>array(146,81,586,781),10302=>array(146,81,586,781),10303=>array(146,81,586,781),10304=>array(146,-195,293,-49),10305=>array(146,-195,293,781),10306=>array(146,-195,293,505),10307=>array(146,-195,293,781),10308=>array(146,-195,293,228),10309=>array(146,-195,293,781),10310=>array(146,-195,293,505),10311=>array(146,-195,293,781),10312=>array(146,-195,586,781),10313=>array(146,-195,586,781),10314=>array(146,-195,586,781),10315=>array(146,-195,586,781),10316=>array(146,-195,586,781),10317=>array(146,-195,586,781),10318=>array(146,-195,586,781),10319=>array(146,-195,586,781),10320=>array(146,-195,586,505),10321=>array(146,-195,586,781),10322=>array(146,-195,586,505),10323=>array(146,-195,586,781),10324=>array(146,-195,586,505),10325=>array(146,-195,586,781),10326=>array(146,-195,586,505),10327=>array(146,-195,586,781),10328=>array(146,-195,586,781),10329=>array(146,-195,586,781),10330=>array(146,-195,586,781),10331=>array(146,-195,586,781),10332=>array(146,-195,586,781),10333=>array(146,-195,586,781),10334=>array(146,-195,586,781),10335=>array(146,-195,586,781),10336=>array(146,-195,586,228),10337=>array(146,-195,586,781),10338=>array(146,-195,586,505),10339=>array(146,-195,586,781),10340=>array(146,-195,586,228),10341=>array(146,-195,586,781),10342=>array(146,-195,586,505),10343=>array(146,-195,586,781),10344=>array(146,-195,586,781),10345=>array(146,-195,586,781),10346=>array(146,-195,586,781),10347=>array(146,-195,586,781),10348=>array(146,-195,586,781),10349=>array(146,-195,586,781),10350=>array(146,-195,586,781),10351=>array(146,-195,586,781),10352=>array(146,-195,586,505),10353=>array(146,-195,586,781),10354=>array(146,-195,586,505),10355=>array(146,-195,586,781),10356=>array(146,-195,586,505),10357=>array(146,-195,586,781),10358=>array(146,-195,586,505),10359=>array(146,-195,586,781),10360=>array(146,-195,586,781),10361=>array(146,-195,586,781),10362=>array(146,-195,586,781),10363=>array(146,-195,586,781),10364=>array(146,-195,586,781),10365=>array(146,-195,586,781),10366=>array(146,-195,586,781),10367=>array(146,-195,586,781),10368=>array(439,-195,586,-49),10369=>array(146,-195,586,781),10370=>array(146,-195,586,505),10371=>array(146,-195,586,781),10372=>array(146,-195,586,228),10373=>array(146,-195,586,781),10374=>array(146,-195,586,505),10375=>array(146,-195,586,781),10376=>array(439,-195,586,781),10377=>array(146,-195,586,781),10378=>array(146,-195,586,781),10379=>array(146,-195,586,781),10380=>array(146,-195,586,781),10381=>array(146,-195,586,781),10382=>array(146,-195,586,781),10383=>array(146,-195,586,781),10384=>array(439,-195,586,505),10385=>array(146,-195,586,781),10386=>array(146,-195,586,505),10387=>array(146,-195,586,781),10388=>array(146,-195,586,505),10389=>array(146,-195,586,781),10390=>array(146,-195,586,505),10391=>array(146,-195,586,781),10392=>array(439,-195,586,781),10393=>array(146,-195,586,781),10394=>array(146,-195,586,781),10395=>array(146,-195,586,781),10396=>array(146,-195,586,781),10397=>array(146,-195,586,781),10398=>array(146,-195,586,781),10399=>array(146,-195,586,781),10400=>array(439,-195,586,228),10401=>array(146,-195,586,781),10402=>array(146,-195,586,505),10403=>array(146,-195,586,781),10404=>array(146,-195,586,228),10405=>array(146,-195,586,781),10406=>array(146,-195,586,505),10407=>array(146,-195,586,781),10408=>array(439,-195,586,781),10409=>array(146,-195,586,781),10410=>array(146,-195,586,781),10411=>array(146,-195,586,781),10412=>array(146,-195,586,781),10413=>array(146,-195,586,781),10414=>array(146,-195,586,781),10415=>array(146,-195,586,781),10416=>array(439,-195,586,505),10417=>array(146,-195,586,781),10418=>array(146,-195,586,505),10419=>array(146,-195,586,781),10420=>array(146,-195,586,505),10421=>array(146,-195,586,781),10422=>array(146,-195,586,505),10423=>array(146,-195,586,781),10424=>array(439,-195,586,781),10425=>array(146,-195,586,781),10426=>array(146,-195,586,781),10427=>array(146,-195,586,781),10428=>array(146,-195,586,781),10429=>array(146,-195,586,781),10430=>array(146,-195,586,781),10431=>array(146,-195,586,781),10432=>array(146,-195,586,-49),10433=>array(146,-195,586,781),10434=>array(146,-195,586,505),10435=>array(146,-195,586,781),10436=>array(146,-195,586,228),10437=>array(146,-195,586,781),10438=>array(146,-195,586,505),10439=>array(146,-195,586,781),10440=>array(146,-195,586,781),10441=>array(146,-195,586,781),10442=>array(146,-195,586,781),10443=>array(146,-195,586,781),10444=>array(146,-195,586,781),10445=>array(146,-195,586,781),10446=>array(146,-195,586,781),10447=>array(146,-195,586,781),10448=>array(146,-195,586,505),10449=>array(146,-195,586,781),10450=>array(146,-195,586,505),10451=>array(146,-195,586,781),10452=>array(146,-195,586,505),10453=>array(146,-195,586,781),10454=>array(146,-195,586,505),10455=>array(146,-195,586,781),10456=>array(146,-195,586,781),10457=>array(146,-195,586,781),10458=>array(146,-195,586,781),10459=>array(146,-195,586,781),10460=>array(146,-195,586,781),10461=>array(146,-195,586,781),10462=>array(146,-195,586,781),10463=>array(146,-195,586,781),10464=>array(146,-195,586,228),10465=>array(146,-195,586,781),10466=>array(146,-195,586,505),10467=>array(146,-195,586,781),10468=>array(146,-195,586,228),10469=>array(146,-195,586,781),10470=>array(146,-195,586,505),10471=>array(146,-195,586,781),10472=>array(146,-195,586,781),10473=>array(146,-195,586,781),10474=>array(146,-195,586,781),10475=>array(146,-195,586,781),10476=>array(146,-195,586,781),10477=>array(146,-195,586,781),10478=>array(146,-195,586,781),10479=>array(146,-195,586,781),10480=>array(146,-195,586,505),10481=>array(146,-195,586,781),10482=>array(146,-195,586,505),10483=>array(146,-195,586,781),10484=>array(146,-195,586,505),10485=>array(146,-195,586,781),10486=>array(146,-195,586,505),10487=>array(146,-195,586,781),10488=>array(146,-195,586,781),10489=>array(146,-195,586,781),10490=>array(146,-195,586,781),10491=>array(146,-195,586,781),10492=>array(146,-195,586,781),10493=>array(146,-195,586,781),10494=>array(146,-195,586,781),10495=>array(146,-195,586,781),10502=>array(49,100,781,527),10503=>array(57,100,789,527),10506=>array(125,0,713,732),10507=>array(125,-3,713,729),10560=>array(39,63,644,838),10561=>array(39,63,644,838),10627=>array(118,-163,699,760),10628=>array(35,-163,616,760),10702=>array(106,-226,732,747),10703=>array(106,15,894,612),10704=>array(106,15,894,612),10705=>array(106,-30,894,657),10706=>array(106,-30,894,657),10707=>array(106,-30,894,657),10708=>array(106,-30,894,657),10709=>array(106,-30,894,657),10731=>array(3,-233,491,807),10746=>array(106,0,732,627),10747=>array(106,0,732,627),10752=>array(28,-198,972,748),10753=>array(28,-198,972,748),10754=>array(28,-198,972,748),10764=>array(57,-212,1268,757),10765=>array(57,-212,464,757),10766=>array(57,-212,464,757),10767=>array(57,-212,464,757),10768=>array(57,-212,464,757),10769=>array(57,-212,522,757),10770=>array(57,-212,464,757),10771=>array(57,-212,464,757),10772=>array(57,-212,555,757),10773=>array(57,-212,464,757),10774=>array(57,-212,464,757),10775=>array(-33,-212,553,757),10776=>array(57,-212,464,757),10777=>array(57,-212,464,757),10778=>array(57,-212,464,757),10779=>array(57,-212,469,872),10780=>array(52,-327,464,757),10799=>array(137,31,701,596),10858=>array(106,228,732,552),10859=>array(106,78,732,552),10877=>array(106,-123,732,581),10878=>array(106,-123,732,581),10879=>array(106,-123,733,581),10880=>array(106,-123,732,581),10881=>array(106,-123,732,644),10882=>array(106,-123,732,644),10883=>array(106,-123,733,759),10884=>array(106,-123,732,756),10885=>array(106,-132,732,663),10886=>array(106,-132,732,663),10887=>array(106,-121,732,582),10888=>array(106,-121,732,582),10889=>array(106,-204,732,663),10890=>array(106,-204,732,663),10891=>array(106,-311,732,791),10892=>array(106,-311,732,791),10893=>array(106,-125,732,663),10894=>array(106,-125,732,663),10895=>array(106,-241,732,756),10896=>array(106,-241,732,756),10897=>array(106,-229,732,730),10898=>array(106,-229,732,730),10899=>array(106,-224,732,741),10900=>array(106,-224,732,741),10901=>array(106,-61,732,644),10902=>array(106,-61,732,644),10903=>array(106,-61,733,644),10904=>array(106,-61,732,644),10905=>array(106,-36,732,685),10906=>array(106,-36,732,685),10907=>array(106,-31,732,725),10908=>array(106,-31,732,725),10909=>array(106,8,732,645),10910=>array(106,23,732,645),10911=>array(106,-176,732,729),10912=>array(106,-176,732,729),10926=>array(106,50,732,601),10927=>array(106,-24,732,667),10928=>array(106,-24,732,667),10929=>array(106,-145,732,667),10930=>array(106,-145,732,667),10931=>array(106,-121,732,662),10932=>array(106,-121,732,662),10933=>array(106,-195,732,662),10934=>array(106,-195,732,662),10935=>array(106,-191,732,693),10936=>array(106,-191,732,693),10937=>array(106,-259,732,693),10938=>array(106,-259,732,693),11001=>array(106,-171,732,585),11002=>array(106,-171,732,585),11008=>array(88,-27,703,587),11009=>array(141,-27,755,587),11010=>array(88,25,703,640),11011=>array(141,25,755,640),11012=>array(27,65,789,562),11013=>array(27,65,781,562),11014=>array(171,0,667,754),11015=>array(171,-25,667,729),11016=>array(88,-27,703,587),11017=>array(141,-27,755,587),11018=>array(88,25,703,640),11019=>array(141,25,755,640),11020=>array(27,65,789,562),11021=>array(171,-25,667,754),11022=>array(57,-3,790,355),11023=>array(57,272,790,630),11024=>array(35,-3,768,355),11025=>array(35,272,768,630),11026=>array(91,-124,854,643),11027=>array(91,-124,854,643),11028=>array(91,-124,854,643),11029=>array(91,-124,854,643),11030=>array(3,-124,766,643),11031=>array(3,-124,766,643),11032=>array(3,-124,766,643),11033=>array(3,-124,766,643),11034=>array(91,-124,854,643),11039=>array(18,-26,852,767),11040=>array(18,-26,852,767),11041=>array(73,-91,800,748),11042=>array(73,-91,800,748),11043=>array(17,-35,856,692),11044=>array(55,-250,1064,770),11091=>array(38,-47,832,788),11092=>array(38,-47,832,788),11360=>array(-13,0,497,729),11361=>array(-16,0,291,760),11362=>array(-31,0,497,729),11363=>array(26,0,597,729),11364=>array(57,-200,618,729),11365=>array(-20,-46,631,592),11366=>array(-101,-93,473,822),11367=>array(42,-157,740,729),11368=>array(30,-138,593,760),11369=>array(42,-157,737,729),11370=>array(30,-138,610,760),11371=>array(-11,-157,715,729),11372=>array(3,-138,548,547),11373=>array(56,-14,754,743),11374=>array(47,-200,855,729),11375=>array(149,0,817,729),11376=>array(-15,-14,694,743),11377=>array(136,0,813,560),11378=>array(175,0,1245,742),11379=>array(148,0,1040,560),11380=>array(39,0,611,586),11381=>array(27,0,568,729),11382=>array(41,0,486,547),11383=>array(55,-12,603,551),11385=>array(-74,-13,357,760),11386=>array(55,-14,558,560),11387=>array(48,0,506,547),11388=>array(-64,-117,168,425),11389=>array(44,326,465,734),11390=>array(26,-242,624,742),11391=>array(-2,-242,723,729),11520=>array(61,-63,578,547),11521=>array(1,-235,598,546),11522=>array(17,-235,547,546),11523=>array(66,-10,637,807),11524=>array(45,-235,570,546),11525=>array(24,-236,896,546),11526=>array(59,-8,609,816),11527=>array(47,0,934,546),11528=>array(77,0,575,546),11529=>array(44,-235,590,816),11530=>array(24,0,937,546),11531=>array(51,-8,638,816),11532=>array(24,0,578,816),11533=>array(45,0,930,546),11534=>array(45,0,598,546),11535=>array(88,-235,801,816),11536=>array(45,0,914,816),11537=>array(45,0,588,816),11538=>array(34,-235,563,546),11539=>array(45,-235,929,661),11540=>array(61,-235,918,546),11541=>array(41,-235,820,816),11542=>array(24,0,579,546),11543=>array(45,-235,598,547),11544=>array(15,-235,593,546),11545=>array(27,-235,575,816),11546=>array(31,-235,559,547),11547=>array(62,-9,638,816),11548=>array(24,-235,904,547),11549=>array(-6,-235,562,546),11550=>array(37,-235,590,546),11551=>array(10,-235,589,567),11552=>array(24,0,917,546),11553=>array(41,-235,578,816),11554=>array(61,0,568,626),11555=>array(62,-235,595,816),11556=>array(45,-235,645,546),11557=>array(60,-8,876,816),11800=>array(37,-13,425,729),11807=>array(106,78,732,399),11810=>array(126,314,420,760),11811=>array(122,314,342,760),11812=>array(40,-132,260,314),11813=>array(-38,-132,255,314),11822=>array(110,0,522,742),19904=>array(83,-158,807,729),19905=>array(83,-158,807,729),19906=>array(83,-158,807,729),19907=>array(83,-158,807,729),19908=>array(83,-158,807,729),19909=>array(83,-158,807,729),19910=>array(83,-158,807,729),19911=>array(83,-158,807,729),19912=>array(83,-158,807,729),19913=>array(83,-158,807,729),19914=>array(83,-158,807,729),19915=>array(83,-158,807,729),19916=>array(83,-158,807,729),19917=>array(83,-158,807,729),19918=>array(83,-158,807,729),19919=>array(83,-158,807,729),19920=>array(83,-158,807,729),19921=>array(83,-158,807,729),19922=>array(83,-158,807,729),19923=>array(83,-158,807,729),19924=>array(83,-158,807,729),19925=>array(83,-158,807,729),19926=>array(83,-158,807,729),19927=>array(83,-158,807,729),19928=>array(83,-158,807,729),19929=>array(83,-158,807,729),19930=>array(83,-158,807,729),19931=>array(83,-158,807,729),19932=>array(83,-158,807,729),19933=>array(83,-158,807,729),19934=>array(83,-158,807,729),19935=>array(83,-158,807,729),19936=>array(83,-158,807,729),19937=>array(83,-158,807,729),19938=>array(83,-158,807,729),19939=>array(83,-158,807,729),19940=>array(83,-158,807,729),19941=>array(83,-158,807,729),19942=>array(83,-158,807,729),19943=>array(83,-158,807,729),19944=>array(83,-158,807,729),19945=>array(83,-158,807,729),19946=>array(83,-158,807,729),19947=>array(83,-158,807,729),19948=>array(83,-158,807,729),19949=>array(83,-158,807,729),19950=>array(83,-158,807,729),19951=>array(83,-158,807,729),19952=>array(83,-158,807,729),19953=>array(83,-158,807,729),19954=>array(83,-158,807,729),19955=>array(83,-158,807,729),19956=>array(83,-158,807,729),19957=>array(83,-158,807,729),19958=>array(83,-158,807,729),19959=>array(83,-158,807,729),19960=>array(83,-158,807,729),19961=>array(83,-158,807,729),19962=>array(83,-158,807,729),19963=>array(83,-158,807,729),19964=>array(83,-158,807,729),19965=>array(83,-158,807,729),19966=>array(83,-158,807,729),19967=>array(83,-158,807,729),42192=>array(27,0,625,729),42193=>array(27,0,601,729),42194=>array(6,0,576,729),42195=>array(27,0,722,729),42196=>array(43,0,676,729),42197=>array(-74,0,559,729),42198=>array(45,-14,725,742),42199=>array(27,0,722,729),42200=>array(-66,0,628,729),42201=>array(5,-14,556,729),42202=>array(42,-14,695,742),42203=>array(63,-14,715,742),42204=>array(-22,0,703,729),42205=>array(27,0,587,729),42206=>array(27,0,587,729),42207=>array(27,0,836,729),42208=>array(27,0,721,729),42209=>array(27,0,497,729),42210=>array(6,-14,603,742),42211=>array(27,0,600,729),42212=>array(96,0,667,729),42213=>array(-63,0,605,729),42214=>array(78,0,742,729),42215=>array(27,0,725,729),42216=>array(47,-14,728,742),42217=>array(26,0,575,743),42218=>array(96,0,1020,729),42219=>array(-43,0,703,729),42220=>array(63,0,676,729),42221=>array(65,0,659,729),42222=>array(-53,0,615,729),42223=>array(149,0,817,729),42224=>array(27,0,630,729),42225=>array(2,0,604,729),42226=>array(27,0,268,729),42227=>array(40,-14,747,742),42228=>array(58,-14,713,729),42229=>array(15,0,661,743),42230=>array(59,0,529,729),42231=>array(56,0,740,729),42232=>array(70,0,229,155),42233=>array(41,-156,245,155),42234=>array(70,0,526,155),42235=>array(70,-156,541,155),42236=>array(6,-156,280,517),42237=>array(35,0,265,517),42238=>array(104,0,537,354),42239=>array(58,172,530,454),42564=>array(2,-14,580,742),42565=>array(11,-14,473,560),42566=>array(76,0,292,729),42567=>array(80,0,258,547),42572=>array(35,-14,1121,645),42573=>array(61,-14,958,471),42576=>array(84,0,1002,729),42577=>array(69,0,865,547),42580=>array(45,-14,1047,742),42581=>array(46,-14,801,560),42582=>array(32,0,916,729),42583=>array(41,-14,781,560),42594=>array(-37,-157,1090,729),42595=>array(-14,-138,930,547),42596=>array(-30,0,1079,729),42597=>array(-16,0,905,547),42598=>array(27,0,1190,729),42599=>array(38,0,1012,547),42600=>array(40,-14,747,742),42601=>array(46,-14,566,560),42602=>array(56,-14,799,742),42603=>array(55,-14,658,560),42604=>array(56,-14,1302,742),42605=>array(55,-14,964,560),42606=>array(28,-208,851,743),42634=>array(43,-200,723,729),42635=>array(68,-208,631,547),42636=>array(43,0,676,729),42637=>array(68,0,606,547),42644=>array(119,0,667,729),42645=>array(17,0,539,760),42760=>array(157,0,454,668),42761=>array(127,0,454,668),42762=>array(98,0,454,668),42763=>array(69,0,454,668),42764=>array(40,0,454,668),42765=>array(40,0,454,668),42766=>array(40,0,425,668),42767=>array(40,0,396,668),42768=>array(40,0,366,668),42769=>array(40,0,337,668),42770=>array(40,0,454,668),42771=>array(40,0,425,668),42772=>array(40,0,396,668),42773=>array(40,0,366,668),42774=>array(40,0,337,668),42779=>array(69,326,338,736),42780=>array(31,324,300,734),42781=>array(56,326,197,734),42782=>array(56,326,197,734),42783=>array(56,0,197,408),42786=>array(30,0,374,729),42787=>array(38,0,335,547),42788=>array(55,224,461,742),42789=>array(55,42,461,560),42790=>array(47,-200,744,729),42791=>array(37,-208,560,760),42792=>array(72,-213,832,729),42793=>array(72,-213,666,702),42794=>array(121,-14,676,742),42795=>array(9,-199,502,561),42800=>array(38,0,490,547),42801=>array(11,-14,500,560),42802=>array(-63,0,1170,729),42803=>array(38,-14,902,560),42804=>array(-53,-14,1179,742),42805=>array(41,-14,954,560),42806=>array(-53,-14,1136,729),42807=>array(41,-14,951,560),42808=>array(-63,0,1034,729),42809=>array(38,-14,841,560),42810=>array(-63,0,1034,729),42811=>array(38,-14,841,560),42812=>array(-43,-208,1042,729),42813=>array(57,-208,860,560),42814=>array(63,-14,715,742),42815=>array(2,-14,493,560),42816=>array(27,0,722,729),42817=>array(35,0,612,760),42822=>array(92,0,620,729),42823=>array(84,0,307,760),42824=>array(52,0,521,729),42825=>array(90,0,415,760),42826=>array(0,-14,811,742),42827=>array(1,-14,704,560),42830=>array(56,-14,1302,742),42831=>array(55,-14,964,560),42832=>array(-42,0,603,729),42833=>array(-83,-208,589,560),42834=>array(-5,0,733,729),42835=>array(-15,-208,729,560),42838=>array(44,-178,740,742),42839=>array(46,-208,597,560),42852=>array(27,0,579,729),42853=>array(-5,-208,586,760),42854=>array(-57,0,579,729),42855=>array(-85,-208,586,760),42880=>array(60,0,530,729),42881=>array(21,-208,257,560),42882=>array(-14,-208,663,742),42883=>array(-5,-208,566,560),42889=>array(52,0,256,517),42890=>array(62,161,325,380),42891=>array(135,235,320,729),42892=>array(70,458,206,729),42893=>array(109,0,658,729),42894=>array(41,-208,417,760),42896=>array(27,-157,721,729),42897=>array(35,-138,579,560),42912=>array(-9,-14,789,742),42913=>array(-7,-208,642,560),42914=>array(-6,0,722,729),42915=>array(-6,0,612,760),42916=>array(-8,0,756,729),42917=>array(-7,0,642,560),42918=>array(-7,0,702,729),42919=>array(-2,0,463,560),42920=>array(-6,-14,641,742),42921=>array(-4,-14,525,560),42922=>array(51,0,845,729),43002=>array(38,0,877,547),43003=>array(86,0,548,729),43004=>array(63,0,576,729),43005=>array(27,0,836,729),43006=>array(8,0,287,928),43007=>array(-38,0,1237,729),61184=>array(147,602,388,668),61185=>array(103,451,407,668),61186=>array(56,301,426,668),61187=>array(18,150,433,668),61188=>array(-21,0,432,668),61189=>array(123,451,378,668),61190=>array(118,451,358,518),61191=>array(73,301,378,518),61192=>array(26,150,397,518),61193=>array(-12,0,404,518),61194=>array(110,301,368,668),61195=>array(94,301,349,518),61196=>array(88,301,329,367),61197=>array(44,150,349,367),61198=>array(-3,0,368,367),61199=>array(105,150,345,668),61200=>array(81,150,338,518),61201=>array(64,150,319,367),61202=>array(59,150,300,217),61203=>array(15,0,319,217),61204=>array(104,0,319,668),61205=>array(76,0,316,518),61206=>array(52,0,309,367),61207=>array(35,0,290,217),61208=>array(30,0,271,66),61209=>array(40,0,236,668),62464=>array(93,-15,582,828),62465=>array(99,-15,577,828),62466=>array(95,-15,622,837),62467=>array(137,0,944,837),62468=>array(87,-15,651,837),62469=>array(89,-15,627,837),62470=>array(141,-15,649,837),62471=>array(96,-15,935,837),62472=>array(118,0,608,837),62473=>array(87,-15,656,828),62474=>array(152,0,1227,837),62475=>array(89,-15,646,837),62476=>array(96,-15,641,828),62477=>array(112,0,922,837),62478=>array(85,-15,625,828),62479=>array(97,-15,690,844),62480=>array(109,0,928,837),62481=>array(107,-15,575,828),62482=>array(106,-15,764,837),62483=>array(80,-15,643,837),62484=>array(147,-15,937,837),62485=>array(86,-15,687,828),62486=>array(126,-15,955,837),62487=>array(82,-15,687,829),62488=>array(90,-15,654,837),62489=>array(49,0,594,837),62490=>array(96,-15,689,828),62491=>array(95,-15,687,828),62492=>array(103,-15,699,837),62493=>array(86,-15,688,828),62494=>array(103,-15,586,828),62495=>array(34,-15,578,837),62496=>array(89,-15,634,837),62497=>array(91,-15,643,837),62498=>array(22,-79,629,836),62499=>array(85,-15,688,838),62500=>array(86,-15,695,837),62501=>array(83,-15,702,837),62502=>array(138,-15,1012,837),62504=>array(61,-235,898,816),62505=>array(51,-230,793,853),62506=>array(77,-15,545,765),62507=>array(77,-15,537,777),62508=>array(77,-15,552,875),62509=>array(77,-15,543,818),62510=>array(77,-15,533,887),62511=>array(77,-15,552,809),62512=>array(28,-236,570,765),62513=>array(28,-236,573,799),62514=>array(28,-236,575,901),62515=>array(28,-236,571,809),62516=>array(94,0,560,765),62517=>array(94,0,573,799),62518=>array(94,0,571,809),62519=>array(96,-0,785,765),62520=>array(96,-0,785,777),62521=>array(96,-0,785,895),62522=>array(96,-0,785,799),62523=>array(96,-0,785,809),62524=>array(55,-236,557,765),62525=>array(55,-236,557,777),62526=>array(55,-236,583,904),62527=>array(55,-236,557,799),62528=>array(55,-236,566,809),62529=>array(55,-236,557,852),63173=>array(27,-14,575,760),64256=>array(68,0,814,760),64257=>array(68,0,641,760),64258=>array(68,0,641,760),64259=>array(68,0,979,760),64260=>array(68,0,979,760),64261=>array(53,0,713,760),64262=>array(2,-14,888,742),64275=>array(54,-14,1145,760),64276=>array(54,-14,1145,760),64277=>array(73,-208,1122,760),64278=>array(73,-208,1164,760),64279=>array(73,-208,1503,760),64285=>array(84,44,264,547),64286=>array(179,625,486,765),64287=>array(80,44,462,547),64288=>array(38,0,668,547),64289=>array(85,0,878,547),64290=>array(135,0,824,547),64291=>array(101,0,825,547),64292=>array(43,0,777,547),64293=>array(135,0,823,760),64294=>array(91,0,828,547),64295=>array(135,0,780,547),64296=>array(47,-4,784,547),64297=>array(159,272,801,627),64298=>array(118,0,793,698),64299=>array(118,0,772,698),64300=>array(118,0,797,698),64301=>array(118,0,772,698),64302=>array(91,-159,684,547),64303=>array(91,-193,684,547),64304=>array(91,-159,684,547),64305=>array(43,0,549,547),64306=>array(43,-5,383,547),64307=>array(135,0,618,547),64308=>array(101,0,617,547),64309=>array(98,0,371,547),64310=>array(83,0,469,547),64312=>array(141,-14,659,552),64313=>array(91,204,370,547),64314=>array(135,-208,509,547),64315=>array(43,0,534,547),64316=>array(135,0,599,729),64318=>array(75,0,646,555),64320=>array(43,0,377,547),64321=>array(144,-14,647,547),64323=>array(108,-208,551,547),64324=>array(91,0,623,547),64326=>array(43,0,607,547),64327=>array(62,-208,740,546),64328=>array(135,0,538,547),64329=>array(118,0,772,547),64330=>array(10,-4,634,547),64331=>array(91,0,308,698),64332=>array(43,0,549,698),64333=>array(43,0,534,698),64334=>array(91,0,623,698),64335=>array(84,0,677,760),65056=>array(-299,752,181,929),65057=>array(166,752,604,929),65058=>array(-208,756,168,894),65059=>array(153,756,528,894),65533=>array(96,-84,1092,912),65535=>array(50,-177,550,705)); -$cw=array(0=>600,32=>318,33=>401,34=>460,35=>838,36=>636,37=>950,38=>780,39=>275,40=>390,41=>390,42=>500,43=>838,44=>318,45=>361,46=>318,47=>337,48=>636,49=>636,50=>636,51=>636,52=>636,53=>636,54=>636,55=>636,56=>636,57=>636,58=>337,59=>337,60=>838,61=>838,62=>838,63=>531,64=>1000,65=>684,66=>686,67=>698,68=>770,69=>632,70=>575,71=>775,72=>752,73=>295,74=>295,75=>656,76=>557,77=>863,78=>748,79=>787,80=>603,81=>787,82=>695,83=>635,84=>611,85=>732,86=>684,87=>989,88=>685,89=>611,90=>685,91=>390,92=>337,93=>390,94=>838,95=>500,96=>500,97=>613,98=>635,99=>550,100=>635,101=>615,102=>352,103=>635,104=>634,105=>278,106=>278,107=>579,108=>278,109=>974,110=>634,111=>612,112=>635,113=>635,114=>411,115=>521,116=>392,117=>634,118=>592,119=>818,120=>592,121=>592,122=>525,123=>636,124=>337,125=>636,126=>838,160=>318,161=>401,162=>636,163=>636,164=>636,165=>636,166=>337,167=>500,168=>500,169=>1000,170=>471,171=>617,172=>838,173=>361,174=>1000,175=>500,176=>500,177=>838,178=>401,179=>401,180=>500,181=>636,182=>636,183=>318,184=>500,185=>401,186=>471,187=>617,188=>969,189=>969,190=>969,191=>531,192=>684,193=>684,194=>684,195=>684,196=>684,197=>684,198=>974,199=>698,200=>632,201=>632,202=>632,203=>632,204=>295,205=>295,206=>295,207=>295,208=>775,209=>748,210=>787,211=>787,212=>787,213=>787,214=>787,215=>838,216=>787,217=>732,218=>732,219=>732,220=>732,221=>611,222=>608,223=>630,224=>613,225=>613,226=>613,227=>613,228=>613,229=>613,230=>995,231=>550,232=>615,233=>615,234=>615,235=>615,236=>278,237=>278,238=>278,239=>278,240=>612,241=>634,242=>612,243=>612,244=>612,245=>612,246=>612,247=>838,248=>612,249=>634,250=>634,251=>634,252=>634,253=>592,254=>635,255=>592,256=>684,257=>613,258=>684,259=>613,260=>684,261=>613,262=>698,263=>550,264=>698,265=>550,266=>698,267=>550,268=>698,269=>550,270=>770,271=>635,272=>775,273=>635,274=>632,275=>615,276=>632,277=>615,278=>632,279=>615,280=>632,281=>615,282=>632,283=>615,284=>775,285=>635,286=>775,287=>635,288=>775,289=>635,290=>775,291=>635,292=>752,293=>634,294=>916,295=>695,296=>295,297=>278,298=>295,299=>278,300=>295,301=>278,302=>295,303=>278,304=>295,305=>278,306=>590,307=>556,308=>295,309=>278,310=>656,311=>579,312=>579,313=>557,314=>278,315=>557,316=>278,317=>557,318=>278,319=>557,320=>278,321=>562,322=>287,323=>748,324=>634,325=>748,326=>634,327=>748,328=>634,329=>813,330=>748,331=>634,332=>787,333=>612,334=>787,335=>612,336=>787,337=>612,338=>1070,339=>1028,340=>695,341=>411,342=>695,343=>411,344=>695,345=>411,346=>635,347=>521,348=>635,349=>521,350=>635,351=>521,352=>635,353=>521,354=>611,355=>392,356=>611,357=>392,358=>611,359=>392,360=>732,361=>634,362=>732,363=>634,364=>732,365=>634,366=>732,367=>634,368=>732,369=>634,370=>732,371=>634,372=>989,373=>818,374=>611,375=>592,376=>611,377=>685,378=>525,379=>685,380=>525,381=>685,382=>525,383=>352,384=>635,385=>735,386=>686,387=>635,388=>686,389=>635,390=>703,391=>698,392=>550,393=>775,394=>819,395=>686,396=>635,397=>612,398=>632,399=>787,400=>614,401=>575,402=>352,403=>775,404=>687,405=>984,406=>354,407=>295,408=>746,409=>579,410=>278,411=>592,412=>974,413=>748,414=>634,415=>787,416=>913,417=>612,418=>938,419=>737,420=>652,421=>635,422=>695,423=>635,424=>521,425=>632,426=>336,427=>392,428=>611,429=>392,430=>611,431=>838,432=>634,433=>764,434=>721,435=>744,436=>730,437=>685,438=>525,439=>666,440=>666,441=>578,442=>525,443=>636,444=>666,445=>578,446=>510,447=>635,448=>295,449=>492,450=>459,451=>295,452=>1455,453=>1295,454=>1160,455=>852,456=>835,457=>556,458=>1043,459=>1026,460=>912,461=>684,462=>613,463=>295,464=>278,465=>787,466=>612,467=>732,468=>634,469=>732,470=>634,471=>732,472=>634,473=>732,474=>634,475=>732,476=>634,477=>615,478=>684,479=>613,480=>684,481=>613,482=>974,483=>995,484=>775,485=>635,486=>775,487=>635,488=>656,489=>579,490=>787,491=>612,492=>787,493=>612,494=>666,495=>525,496=>278,497=>1455,498=>1295,499=>1160,500=>775,501=>635,502=>1113,503=>682,504=>748,505=>634,506=>684,507=>613,508=>974,509=>995,510=>787,511=>612,512=>684,513=>613,514=>684,515=>613,516=>632,517=>615,518=>632,519=>615,520=>295,521=>278,522=>295,523=>278,524=>787,525=>612,526=>787,527=>612,528=>695,529=>411,530=>695,531=>411,532=>732,533=>634,534=>732,535=>634,536=>635,537=>521,538=>611,539=>392,540=>627,541=>521,542=>752,543=>634,544=>735,545=>838,546=>698,547=>610,548=>685,549=>525,550=>684,551=>613,552=>632,553=>615,554=>787,555=>612,556=>787,557=>612,558=>787,559=>612,560=>787,561=>612,562=>611,563=>592,564=>475,565=>843,566=>477,567=>278,568=>998,569=>998,570=>684,571=>698,572=>550,573=>557,574=>611,575=>521,576=>525,577=>603,578=>479,579=>686,580=>732,581=>684,582=>632,583=>615,584=>295,585=>278,586=>781,587=>635,588=>695,589=>411,590=>611,591=>592,592=>613,593=>635,594=>635,595=>635,596=>550,597=>550,598=>635,599=>727,600=>615,601=>615,602=>844,603=>545,604=>545,605=>775,606=>664,607=>326,608=>696,609=>635,610=>629,611=>596,612=>596,613=>634,614=>634,615=>634,616=>372,617=>387,618=>372,619=>396,620=>487,621=>278,622=>706,623=>974,624=>974,625=>974,626=>646,627=>642,628=>634,629=>612,630=>858,631=>728,632=>660,633=>469,634=>469,635=>469,636=>469,637=>469,638=>530,639=>530,640=>602,641=>602,642=>521,643=>336,644=>336,645=>461,646=>336,647=>392,648=>392,649=>634,650=>618,651=>598,652=>592,653=>818,654=>592,655=>611,656=>525,657=>525,658=>578,659=>578,660=>510,661=>510,662=>510,663=>510,664=>787,665=>580,666=>664,667=>708,668=>654,669=>292,670=>667,671=>507,672=>727,673=>510,674=>510,675=>1014,676=>1058,677=>1013,678=>830,679=>610,680=>778,681=>848,682=>706,683=>654,684=>515,685=>515,686=>570,687=>664,688=>399,689=>399,690=>175,691=>259,692=>295,693=>296,694=>379,695=>515,696=>373,697=>278,698=>460,699=>318,700=>318,701=>318,702=>307,703=>307,704=>370,705=>370,706=>500,707=>500,708=>500,709=>500,710=>500,711=>500,712=>275,713=>500,714=>500,715=>500,716=>275,717=>500,718=>500,719=>500,720=>337,721=>337,722=>307,723=>307,724=>500,725=>500,726=>390,727=>317,728=>500,729=>500,730=>500,731=>500,732=>500,733=>500,734=>315,735=>500,736=>426,737=>166,738=>373,739=>444,740=>370,741=>493,742=>493,743=>493,744=>493,745=>493,748=>500,749=>500,750=>518,755=>500,759=>500,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,842=>0,843=>0,844=>0,845=>0,846=>0,847=>0,849=>0,850=>0,851=>0,855=>0,856=>0,858=>0,860=>0,861=>0,862=>0,863=>0,864=>0,865=>0,866=>0,880=>654,881=>568,882=>862,883=>647,884=>278,885=>278,886=>748,887=>650,890=>500,891=>549,892=>550,893=>549,894=>337,900=>500,901=>500,902=>684,903=>318,904=>767,905=>903,906=>435,908=>839,910=>860,911=>905,912=>338,913=>684,914=>686,915=>557,916=>684,917=>632,918=>685,919=>752,920=>787,921=>295,922=>656,923=>684,924=>863,925=>748,926=>632,927=>787,928=>752,929=>603,931=>632,932=>611,933=>611,934=>787,935=>685,936=>787,937=>764,938=>295,939=>611,940=>659,941=>541,942=>634,943=>338,944=>579,945=>659,946=>638,947=>592,948=>612,949=>541,950=>544,951=>634,952=>612,953=>338,954=>589,955=>592,956=>636,957=>559,958=>558,959=>612,960=>602,961=>635,962=>587,963=>634,964=>602,965=>579,966=>660,967=>592,968=>660,969=>837,970=>338,971=>579,972=>612,973=>579,974=>837,975=>656,976=>614,977=>619,978=>699,979=>842,980=>699,981=>660,982=>837,983=>664,984=>787,985=>612,986=>648,987=>587,988=>575,989=>458,990=>660,991=>660,992=>865,993=>627,994=>934,995=>837,996=>758,997=>659,998=>792,999=>615,1000=>687,1001=>607,1002=>768,1003=>625,1004=>699,1005=>612,1006=>611,1007=>536,1008=>664,1009=>635,1010=>550,1011=>278,1012=>787,1013=>615,1014=>615,1015=>608,1016=>635,1017=>698,1018=>863,1019=>651,1020=>635,1021=>703,1022=>698,1023=>703,1024=>632,1025=>632,1026=>786,1027=>557,1028=>698,1029=>635,1030=>295,1031=>295,1032=>295,1033=>1094,1034=>1045,1035=>786,1036=>710,1037=>748,1038=>609,1039=>752,1040=>684,1041=>686,1042=>686,1043=>557,1044=>781,1045=>632,1046=>1077,1047=>641,1048=>748,1049=>748,1050=>710,1051=>752,1052=>863,1053=>752,1054=>787,1055=>752,1056=>603,1057=>698,1058=>611,1059=>609,1060=>861,1061=>685,1062=>776,1063=>686,1064=>1069,1065=>1094,1066=>833,1067=>818,1068=>686,1069=>698,1070=>1080,1071=>695,1072=>613,1073=>617,1074=>589,1075=>525,1076=>691,1077=>615,1078=>901,1079=>532,1080=>650,1081=>650,1082=>604,1083=>639,1084=>754,1085=>654,1086=>612,1087=>654,1088=>635,1089=>550,1090=>583,1091=>592,1092=>855,1093=>592,1094=>681,1095=>591,1096=>915,1097=>942,1098=>707,1099=>790,1100=>589,1101=>549,1102=>842,1103=>602,1104=>615,1105=>615,1106=>625,1107=>525,1108=>549,1109=>521,1110=>278,1111=>278,1112=>278,1113=>902,1114=>898,1115=>652,1116=>604,1117=>650,1118=>592,1119=>654,1120=>934,1121=>837,1122=>771,1123=>672,1124=>942,1125=>749,1126=>879,1127=>783,1128=>1160,1129=>1001,1130=>787,1131=>612,1132=>1027,1133=>824,1134=>636,1135=>541,1136=>856,1137=>876,1138=>787,1139=>612,1140=>781,1141=>665,1142=>781,1143=>665,1144=>992,1145=>904,1146=>953,1147=>758,1148=>1180,1149=>1028,1150=>934,1151=>837,1152=>698,1153=>550,1154=>502,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1160=>418,1161=>418,1162=>748,1163=>657,1164=>686,1165=>589,1166=>603,1167=>635,1168=>610,1169=>525,1170=>675,1171=>556,1172=>557,1173=>491,1174=>1077,1175=>901,1176=>641,1177=>532,1178=>710,1179=>604,1180=>710,1181=>604,1182=>710,1183=>604,1184=>856,1185=>832,1186=>752,1187=>661,1188=>1014,1189=>877,1190=>1113,1191=>950,1192=>890,1193=>707,1194=>698,1195=>550,1196=>611,1197=>529,1198=>611,1199=>592,1200=>611,1201=>592,1202=>685,1203=>592,1204=>934,1205=>807,1206=>686,1207=>591,1208=>686,1209=>591,1210=>686,1211=>634,1212=>929,1213=>731,1214=>929,1215=>731,1216=>295,1217=>1077,1218=>901,1219=>655,1220=>604,1221=>752,1222=>639,1223=>752,1224=>661,1225=>752,1226=>661,1227=>686,1228=>591,1229=>863,1230=>754,1231=>278,1232=>684,1233=>613,1234=>684,1235=>613,1236=>974,1237=>995,1238=>632,1239=>615,1240=>787,1241=>615,1242=>787,1243=>615,1244=>1077,1245=>901,1246=>641,1247=>532,1248=>666,1249=>578,1250=>748,1251=>650,1252=>748,1253=>650,1254=>787,1255=>612,1256=>787,1257=>612,1258=>787,1259=>612,1260=>698,1261=>549,1262=>609,1263=>592,1264=>609,1265=>592,1266=>609,1267=>592,1268=>686,1269=>591,1270=>557,1271=>491,1272=>818,1273=>790,1274=>675,1275=>556,1276=>685,1277=>592,1278=>685,1279=>592,1280=>686,1281=>589,1282=>1006,1283=>897,1284=>975,1285=>869,1286=>679,1287=>588,1288=>1072,1289=>957,1290=>1113,1291=>967,1292=>775,1293=>660,1294=>773,1295=>711,1296=>614,1297=>541,1298=>752,1299=>639,1300=>1195,1301=>997,1302=>900,1303=>867,1304=>1031,1305=>989,1306=>787,1307=>635,1308=>989,1309=>818,1310=>710,1311=>604,1312=>1113,1313=>942,1314=>1113,1315=>949,1316=>793,1317=>683,1329=>766,1330=>732,1331=>753,1332=>753,1333=>732,1334=>772,1335=>640,1336=>732,1337=>859,1338=>753,1339=>691,1340=>533,1341=>922,1342=>863,1343=>732,1344=>716,1345=>766,1346=>753,1347=>767,1348=>792,1349=>728,1350=>729,1351=>757,1352=>732,1353=>713,1354=>800,1355=>768,1356=>792,1357=>732,1358=>753,1359=>705,1360=>694,1361=>744,1362=>538,1363=>811,1364=>757,1365=>787,1366=>790,1369=>307,1370=>318,1371=>234,1372=>361,1373=>238,1374=>405,1375=>500,1377=>974,1378=>634,1379=>658,1380=>663,1381=>634,1382=>635,1383=>515,1384=>634,1385=>738,1386=>658,1387=>634,1388=>271,1389=>980,1390=>623,1391=>634,1392=>634,1393=>608,1394=>634,1395=>629,1396=>634,1397=>278,1398=>634,1399=>499,1400=>634,1401=>404,1402=>974,1403=>560,1404=>648,1405=>634,1406=>634,1407=>974,1408=>634,1409=>635,1410=>435,1411=>974,1412=>636,1413=>612,1414=>805,1415=>812,1417=>337,1418=>361,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1466=>0,1467=>0,1468=>0,1469=>0,1470=>361,1471=>0,1472=>295,1473=>0,1474=>0,1475=>295,1478=>456,1479=>0,1488=>668,1489=>578,1490=>412,1491=>546,1492=>653,1493=>272,1494=>346,1495=>653,1496=>648,1497=>224,1498=>537,1499=>529,1500=>568,1501=>664,1502=>679,1503=>272,1504=>400,1505=>649,1506=>626,1507=>640,1508=>625,1509=>540,1510=>593,1511=>709,1512=>564,1513=>708,1514=>657,1520=>471,1521=>454,1522=>471,1523=>416,1524=>645,3647=>636,3713=>670,3714=>684,3716=>688,3719=>482,3720=>628,3722=>684,3725=>688,3732=>642,3733=>642,3734=>672,3735=>655,3737=>641,3738=>592,3739=>592,3740=>745,3741=>767,3742=>687,3743=>687,3745=>702,3746=>688,3747=>684,3749=>649,3751=>632,3754=>703,3755=>819,3757=>633,3758=>684,3759=>788,3760=>632,3761=>0,3762=>539,3763=>539,3764=>0,3765=>0,3766=>0,3767=>0,3768=>0,3769=>0,3771=>0,3772=>0,3773=>663,3776=>360,3777=>679,3778=>460,3779=>547,3780=>491,3782=>674,3784=>0,3785=>0,3786=>0,3787=>0,3788=>0,3789=>0,3792=>636,3793=>641,3794=>641,3795=>670,3796=>625,3797=>625,3798=>703,3799=>670,3800=>674,3801=>677,3804=>1028,3805=>1028,4256=>874,4257=>733,4258=>679,4259=>834,4260=>615,4261=>768,4262=>753,4263=>914,4264=>453,4265=>620,4266=>843,4267=>882,4268=>625,4269=>854,4270=>781,4271=>629,4272=>912,4273=>621,4274=>620,4275=>854,4276=>866,4277=>724,4278=>630,4279=>621,4280=>625,4281=>620,4282=>818,4283=>874,4284=>615,4285=>623,4286=>625,4287=>725,4288=>844,4289=>596,4290=>688,4291=>596,4292=>594,4293=>738,4304=>508,4305=>518,4306=>581,4307=>818,4308=>508,4309=>513,4310=>500,4311=>801,4312=>518,4313=>510,4314=>1064,4315=>522,4316=>522,4317=>786,4318=>508,4319=>518,4320=>796,4321=>522,4322=>654,4323=>522,4324=>825,4325=>513,4326=>786,4327=>518,4328=>518,4329=>522,4330=>571,4331=>522,4332=>518,4333=>520,4334=>522,4335=>454,4336=>508,4337=>518,4338=>508,4339=>508,4340=>518,4341=>554,4342=>828,4343=>552,4344=>508,4345=>571,4346=>508,4347=>448,4348=>324,5121=>684,5122=>684,5123=>684,5124=>684,5125=>769,5126=>769,5127=>769,5129=>769,5130=>769,5131=>769,5132=>835,5133=>834,5134=>835,5135=>834,5136=>835,5137=>834,5138=>967,5139=>1007,5140=>967,5141=>1007,5142=>769,5143=>967,5144=>1007,5145=>967,5146=>1007,5147=>769,5149=>256,5150=>543,5151=>423,5152=>423,5153=>389,5154=>389,5155=>393,5156=>389,5157=>466,5158=>385,5159=>256,5160=>389,5161=>389,5162=>389,5163=>1090,5164=>909,5165=>953,5166=>1117,5167=>684,5168=>684,5169=>684,5170=>684,5171=>729,5172=>729,5173=>729,5175=>729,5176=>729,5177=>729,5178=>835,5179=>684,5180=>835,5181=>834,5182=>835,5183=>834,5184=>967,5185=>1007,5186=>967,5187=>1007,5188=>967,5189=>1007,5190=>967,5191=>1007,5192=>729,5193=>508,5194=>192,5196=>732,5197=>732,5198=>732,5199=>732,5200=>730,5201=>730,5202=>730,5204=>730,5205=>730,5206=>730,5207=>921,5208=>889,5209=>921,5210=>889,5211=>921,5212=>889,5213=>928,5214=>900,5215=>928,5216=>900,5217=>947,5218=>900,5219=>947,5220=>900,5221=>947,5222=>434,5223=>877,5224=>877,5225=>866,5226=>890,5227=>628,5228=>628,5229=>628,5230=>628,5231=>628,5232=>628,5233=>628,5234=>628,5235=>628,5236=>860,5237=>771,5238=>815,5239=>816,5240=>815,5241=>816,5242=>860,5243=>771,5244=>860,5245=>771,5246=>815,5247=>816,5248=>815,5249=>816,5250=>815,5251=>407,5252=>407,5253=>750,5254=>775,5255=>750,5256=>775,5257=>628,5258=>628,5259=>628,5260=>628,5261=>628,5262=>628,5263=>628,5264=>628,5265=>628,5266=>860,5267=>771,5268=>815,5269=>816,5270=>815,5271=>816,5272=>860,5273=>771,5274=>860,5275=>771,5276=>815,5277=>816,5278=>815,5279=>816,5280=>815,5281=>435,5282=>435,5283=>610,5284=>557,5285=>557,5286=>557,5287=>610,5288=>610,5289=>610,5290=>557,5291=>557,5292=>749,5293=>769,5294=>746,5295=>764,5296=>746,5297=>764,5298=>749,5299=>769,5300=>749,5301=>769,5302=>746,5303=>764,5304=>746,5305=>764,5306=>746,5307=>386,5308=>508,5309=>386,5312=>852,5313=>852,5314=>852,5315=>852,5316=>852,5317=>852,5318=>852,5319=>852,5320=>852,5321=>1069,5322=>1035,5323=>1059,5324=>852,5325=>1059,5326=>852,5327=>852,5328=>600,5329=>453,5330=>600,5331=>852,5332=>852,5333=>852,5334=>852,5335=>852,5336=>852,5337=>852,5338=>852,5339=>852,5340=>1069,5341=>1035,5342=>1059,5343=>1030,5344=>1059,5345=>1030,5346=>1069,5347=>1035,5348=>1069,5349=>1035,5350=>1083,5351=>1030,5352=>1083,5353=>1030,5354=>600,5356=>729,5357=>603,5358=>603,5359=>603,5360=>603,5361=>603,5362=>603,5363=>603,5364=>603,5365=>603,5366=>834,5367=>754,5368=>792,5369=>771,5370=>792,5371=>771,5372=>834,5373=>754,5374=>834,5375=>754,5376=>792,5377=>771,5378=>792,5379=>771,5380=>792,5381=>418,5382=>420,5383=>418,5392=>712,5393=>712,5394=>712,5395=>892,5396=>892,5397=>892,5398=>892,5399=>910,5400=>872,5401=>910,5402=>872,5403=>910,5404=>872,5405=>1140,5406=>1100,5407=>1140,5408=>1100,5409=>1140,5410=>1100,5411=>1140,5412=>1100,5413=>641,5414=>627,5415=>627,5416=>627,5417=>627,5418=>627,5419=>627,5420=>627,5421=>627,5422=>627,5423=>844,5424=>781,5425=>816,5426=>818,5427=>816,5428=>818,5429=>844,5430=>781,5431=>844,5432=>781,5433=>816,5434=>818,5435=>816,5436=>818,5437=>816,5438=>418,5440=>389,5441=>484,5442=>916,5443=>916,5444=>863,5445=>916,5446=>863,5447=>863,5448=>603,5449=>603,5450=>603,5451=>603,5452=>603,5453=>603,5454=>834,5455=>754,5456=>418,5458=>729,5459=>684,5460=>684,5461=>684,5462=>684,5463=>726,5464=>726,5465=>726,5466=>726,5467=>924,5468=>1007,5469=>508,5470=>732,5471=>732,5472=>732,5473=>732,5474=>732,5475=>732,5476=>730,5477=>730,5478=>730,5479=>730,5480=>947,5481=>900,5482=>508,5492=>831,5493=>831,5494=>831,5495=>831,5496=>831,5497=>831,5498=>831,5499=>563,5500=>752,5501=>484,5502=>1047,5503=>1047,5504=>1047,5505=>1047,5506=>1047,5507=>1047,5508=>1047,5509=>825,5514=>831,5515=>831,5516=>831,5517=>831,5518=>1259,5519=>1259,5520=>1259,5521=>1002,5522=>1002,5523=>1259,5524=>1259,5525=>700,5526=>1073,5536=>852,5537=>852,5538=>799,5539=>799,5540=>799,5541=>799,5542=>600,5543=>643,5544=>643,5545=>643,5546=>643,5547=>643,5548=>643,5549=>643,5550=>418,5551=>628,5598=>770,5601=>770,5702=>468,5703=>468,5742=>444,5743=>1047,5744=>1310,5745=>1632,5746=>1632,5747=>1375,5748=>1375,5749=>1632,5750=>1632,7424=>592,7425=>717,7426=>982,7427=>586,7428=>550,7429=>605,7430=>605,7431=>491,7432=>541,7433=>278,7434=>395,7435=>579,7436=>583,7437=>754,7438=>650,7439=>612,7440=>550,7441=>684,7442=>684,7443=>684,7444=>1023,7446=>612,7447=>612,7448=>524,7449=>602,7450=>602,7451=>583,7452=>574,7453=>737,7454=>948,7455=>638,7456=>592,7457=>818,7458=>525,7459=>526,7462=>583,7463=>592,7464=>564,7465=>524,7466=>590,7467=>639,7468=>431,7469=>613,7470=>432,7472=>485,7473=>398,7474=>398,7475=>488,7476=>474,7477=>186,7478=>186,7479=>413,7480=>351,7481=>543,7482=>471,7483=>471,7484=>496,7485=>439,7486=>380,7487=>438,7488=>385,7489=>461,7490=>623,7491=>392,7492=>392,7493=>405,7494=>648,7495=>428,7496=>405,7497=>417,7498=>417,7499=>360,7500=>359,7501=>405,7502=>179,7503=>426,7504=>623,7505=>409,7506=>414,7507=>370,7508=>414,7509=>414,7510=>428,7511=>295,7512=>405,7513=>470,7514=>623,7515=>417,7517=>402,7518=>373,7519=>385,7520=>416,7521=>364,7522=>179,7523=>259,7524=>405,7525=>417,7526=>402,7527=>373,7528=>412,7529=>416,7530=>364,7543=>635,7544=>474,7547=>372,7549=>667,7557=>278,7579=>405,7580=>370,7581=>370,7582=>414,7583=>360,7584=>296,7585=>233,7586=>405,7587=>405,7588=>261,7589=>250,7590=>261,7591=>261,7592=>234,7593=>250,7594=>235,7595=>376,7596=>623,7597=>623,7598=>411,7599=>479,7600=>409,7601=>414,7602=>414,7603=>360,7604=>287,7605=>295,7606=>508,7607=>418,7608=>361,7609=>406,7610=>417,7611=>366,7612=>437,7613=>366,7614=>392,7615=>414,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,7680=>684,7681=>613,7682=>686,7683=>635,7684=>686,7685=>635,7686=>686,7687=>635,7688=>698,7689=>550,7690=>770,7691=>635,7692=>770,7693=>635,7694=>770,7695=>635,7696=>770,7697=>635,7698=>770,7699=>635,7700=>632,7701=>615,7702=>632,7703=>615,7704=>632,7705=>615,7706=>632,7707=>615,7708=>632,7709=>615,7710=>575,7711=>352,7712=>775,7713=>635,7714=>752,7715=>634,7716=>752,7717=>634,7718=>752,7719=>634,7720=>752,7721=>634,7722=>752,7723=>634,7724=>295,7725=>278,7726=>295,7727=>278,7728=>656,7729=>579,7730=>656,7731=>579,7732=>656,7733=>579,7734=>557,7735=>278,7736=>557,7737=>278,7738=>557,7739=>278,7740=>557,7741=>278,7742=>863,7743=>974,7744=>863,7745=>974,7746=>863,7747=>974,7748=>748,7749=>634,7750=>748,7751=>634,7752=>748,7753=>634,7754=>748,7755=>634,7756=>787,7757=>612,7758=>787,7759=>612,7760=>787,7761=>612,7762=>787,7763=>612,7764=>603,7765=>635,7766=>603,7767=>635,7768=>695,7769=>411,7770=>695,7771=>411,7772=>695,7773=>411,7774=>695,7775=>411,7776=>635,7777=>521,7778=>635,7779=>521,7780=>635,7781=>521,7782=>635,7783=>521,7784=>635,7785=>521,7786=>611,7787=>392,7788=>611,7789=>392,7790=>611,7791=>392,7792=>611,7793=>392,7794=>732,7795=>634,7796=>732,7797=>634,7798=>732,7799=>634,7800=>732,7801=>634,7802=>732,7803=>634,7804=>684,7805=>592,7806=>684,7807=>592,7808=>989,7809=>818,7810=>989,7811=>818,7812=>989,7813=>818,7814=>989,7815=>818,7816=>989,7817=>818,7818=>685,7819=>592,7820=>685,7821=>592,7822=>611,7823=>592,7824=>685,7825=>525,7826=>685,7827=>525,7828=>685,7829=>525,7830=>634,7831=>392,7832=>818,7833=>592,7834=>613,7835=>352,7836=>352,7837=>352,7838=>769,7839=>612,7840=>684,7841=>613,7842=>684,7843=>613,7844=>684,7845=>613,7846=>684,7847=>613,7848=>684,7849=>613,7850=>684,7851=>613,7852=>684,7853=>613,7854=>684,7855=>613,7856=>684,7857=>613,7858=>684,7859=>613,7860=>684,7861=>613,7862=>684,7863=>613,7864=>632,7865=>615,7866=>632,7867=>615,7868=>632,7869=>615,7870=>632,7871=>615,7872=>632,7873=>615,7874=>632,7875=>615,7876=>632,7877=>615,7878=>632,7879=>615,7880=>295,7881=>278,7882=>295,7883=>278,7884=>787,7885=>612,7886=>787,7887=>612,7888=>787,7889=>612,7890=>787,7891=>612,7892=>787,7893=>612,7894=>787,7895=>612,7896=>787,7897=>612,7898=>913,7899=>612,7900=>913,7901=>612,7902=>913,7903=>612,7904=>913,7905=>612,7906=>913,7907=>612,7908=>732,7909=>634,7910=>732,7911=>634,7912=>838,7913=>634,7914=>838,7915=>634,7916=>838,7917=>634,7918=>838,7919=>634,7920=>838,7921=>634,7922=>611,7923=>592,7924=>611,7925=>592,7926=>611,7927=>592,7928=>611,7929=>592,7930=>769,7931=>477,7936=>659,7937=>659,7938=>659,7939=>659,7940=>659,7941=>659,7942=>659,7943=>659,7944=>684,7945=>684,7946=>877,7947=>877,7948=>769,7949=>801,7950=>708,7951=>743,7952=>541,7953=>541,7954=>541,7955=>541,7956=>541,7957=>541,7960=>711,7961=>711,7962=>966,7963=>975,7964=>898,7965=>928,7968=>634,7969=>634,7970=>634,7971=>634,7972=>634,7973=>634,7974=>634,7975=>634,7976=>837,7977=>835,7978=>1086,7979=>1089,7980=>1027,7981=>1051,7982=>934,7983=>947,7984=>338,7985=>338,7986=>338,7987=>338,7988=>338,7989=>338,7990=>338,7991=>338,7992=>380,7993=>374,7994=>635,7995=>635,7996=>570,7997=>600,7998=>489,7999=>493,8000=>612,8001=>612,8002=>612,8003=>612,8004=>612,8005=>612,8008=>804,8009=>848,8010=>1095,8011=>1100,8012=>938,8013=>970,8016=>579,8017=>579,8018=>579,8019=>579,8020=>579,8021=>579,8022=>579,8023=>579,8025=>784,8027=>998,8029=>1012,8031=>897,8032=>837,8033=>837,8034=>837,8035=>837,8036=>837,8037=>837,8038=>837,8039=>837,8040=>802,8041=>843,8042=>1089,8043=>1095,8044=>946,8045=>972,8046=>921,8047=>952,8048=>659,8049=>659,8050=>541,8051=>548,8052=>634,8053=>654,8054=>338,8055=>338,8056=>612,8057=>612,8058=>579,8059=>579,8060=>837,8061=>837,8064=>659,8065=>659,8066=>659,8067=>659,8068=>659,8069=>659,8070=>659,8071=>659,8072=>684,8073=>684,8074=>877,8075=>877,8076=>769,8077=>801,8078=>708,8079=>743,8080=>634,8081=>634,8082=>634,8083=>634,8084=>634,8085=>634,8086=>634,8087=>634,8088=>837,8089=>835,8090=>1086,8091=>1089,8092=>1027,8093=>1051,8094=>934,8095=>947,8096=>837,8097=>837,8098=>837,8099=>837,8100=>837,8101=>837,8102=>837,8103=>837,8104=>802,8105=>843,8106=>1089,8107=>1095,8108=>946,8109=>972,8110=>921,8111=>952,8112=>659,8113=>659,8114=>659,8115=>659,8116=>659,8118=>659,8119=>659,8120=>684,8121=>684,8122=>716,8123=>692,8124=>684,8125=>500,8126=>500,8127=>500,8128=>500,8129=>500,8130=>634,8131=>634,8132=>654,8134=>634,8135=>634,8136=>805,8137=>746,8138=>931,8139=>871,8140=>752,8141=>500,8142=>500,8143=>500,8144=>338,8145=>338,8146=>338,8147=>338,8150=>338,8151=>338,8152=>295,8153=>295,8154=>475,8155=>408,8157=>500,8158=>500,8159=>500,8160=>579,8161=>579,8162=>579,8163=>579,8164=>635,8165=>635,8166=>579,8167=>579,8168=>611,8169=>611,8170=>845,8171=>825,8172=>685,8173=>500,8174=>500,8175=>500,8178=>837,8179=>837,8180=>837,8182=>837,8183=>837,8184=>941,8185=>813,8186=>922,8187=>826,8188=>764,8189=>500,8190=>500,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>330,8197=>250,8198=>167,8199=>636,8200=>318,8201=>200,8202=>100,8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>361,8209=>361,8210=>636,8211=>500,8212=>1000,8213=>1000,8214=>500,8215=>500,8216=>318,8217=>318,8218=>318,8219=>318,8220=>518,8221=>518,8222=>518,8223=>518,8224=>500,8225=>500,8226=>590,8227=>590,8228=>333,8229=>667,8230=>1000,8231=>318,8232=>0,8233=>0,8234=>0,8235=>0,8236=>0,8237=>0,8238=>0,8239=>200,8240=>1350,8241=>1690,8242=>227,8243=>374,8244=>520,8245=>227,8246=>374,8247=>520,8248=>339,8249=>400,8250=>400,8251=>838,8252=>485,8253=>531,8254=>500,8255=>804,8256=>804,8257=>250,8258=>1000,8259=>500,8260=>167,8261=>390,8262=>390,8263=>922,8264=>733,8265=>733,8266=>497,8267=>636,8268=>500,8269=>500,8270=>500,8271=>337,8272=>804,8273=>500,8274=>450,8275=>1000,8276=>804,8277=>838,8278=>586,8279=>663,8280=>838,8281=>838,8282=>318,8283=>797,8284=>838,8285=>318,8286=>318,8287=>222,8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,8303=>0,8304=>401,8305=>179,8308=>401,8309=>401,8310=>401,8311=>401,8312=>401,8313=>401,8314=>528,8315=>528,8316=>528,8317=>246,8318=>246,8319=>399,8320=>401,8321=>401,8322=>401,8323=>401,8324=>401,8325=>401,8326=>401,8327=>401,8328=>401,8329=>401,8330=>528,8331=>528,8332=>528,8333=>246,8334=>246,8336=>392,8337=>417,8338=>414,8339=>444,8340=>417,8341=>399,8342=>426,8343=>166,8344=>623,8345=>399,8346=>428,8347=>373,8348=>295,8352=>877,8353=>636,8354=>636,8355=>636,8356=>636,8357=>974,8358=>748,8359=>1271,8360=>1074,8361=>989,8362=>838,8363=>636,8364=>636,8365=>636,8366=>636,8367=>1272,8368=>636,8369=>636,8370=>636,8371=>636,8372=>774,8373=>636,8376=>636,8377=>636,8378=>679,8400=>0,8401=>0,8406=>0,8407=>0,8411=>0,8412=>0,8417=>0,8448=>970,8449=>970,8450=>698,8451=>1123,8452=>896,8453=>969,8454=>1032,8455=>614,8456=>698,8457=>952,8459=>988,8460=>754,8461=>850,8462=>634,8463=>634,8464=>470,8465=>697,8466=>720,8467=>413,8468=>818,8469=>801,8470=>1040,8471=>1000,8472=>697,8473=>701,8474=>787,8475=>798,8476=>814,8477=>792,8478=>896,8479=>684,8480=>1020,8481=>1014,8482=>1000,8483=>684,8484=>745,8485=>578,8486=>764,8487=>764,8488=>616,8489=>338,8490=>656,8491=>684,8492=>786,8493=>703,8494=>854,8495=>592,8496=>605,8497=>786,8498=>575,8499=>1069,8500=>462,8501=>745,8502=>674,8503=>466,8504=>645,8505=>380,8506=>926,8507=>1157,8508=>702,8509=>728,8510=>654,8511=>849,8512=>811,8513=>775,8514=>557,8515=>557,8516=>611,8517=>819,8518=>708,8519=>615,8520=>351,8521=>351,8523=>780,8526=>526,8528=>969,8529=>969,8530=>1370,8531=>969,8532=>969,8533=>969,8534=>969,8535=>969,8536=>969,8537=>969,8538=>969,8539=>969,8540=>969,8541=>969,8542=>969,8543=>568,8544=>295,8545=>492,8546=>689,8547=>923,8548=>684,8549=>922,8550=>1120,8551=>1317,8552=>917,8553=>685,8554=>933,8555=>1131,8556=>557,8557=>698,8558=>770,8559=>863,8560=>278,8561=>458,8562=>637,8563=>812,8564=>592,8565=>811,8566=>991,8567=>1170,8568=>819,8569=>592,8570=>822,8571=>1002,8572=>278,8573=>550,8574=>635,8575=>974,8576=>1245,8577=>770,8578=>1245,8579=>703,8580=>549,8581=>698,8585=>969,8592=>838,8593=>838,8594=>838,8595=>838,8596=>838,8597=>838,8598=>838,8599=>838,8600=>838,8601=>838,8602=>838,8603=>838,8604=>838,8605=>838,8606=>838,8607=>838,8608=>838,8609=>838,8610=>838,8611=>838,8612=>838,8613=>838,8614=>838,8615=>838,8616=>838,8617=>838,8618=>838,8619=>838,8620=>838,8621=>838,8622=>838,8623=>838,8624=>838,8625=>838,8626=>838,8627=>838,8628=>838,8629=>838,8630=>838,8631=>838,8632=>838,8633=>838,8634=>838,8635=>838,8636=>838,8637=>838,8638=>838,8639=>838,8640=>838,8641=>838,8642=>838,8643=>838,8644=>838,8645=>838,8646=>838,8647=>838,8648=>838,8649=>838,8650=>838,8651=>838,8652=>838,8653=>838,8654=>838,8655=>838,8656=>838,8657=>838,8658=>838,8659=>838,8660=>838,8661=>838,8662=>838,8663=>838,8664=>838,8665=>838,8666=>838,8667=>838,8668=>838,8669=>838,8670=>838,8671=>838,8672=>838,8673=>838,8674=>838,8675=>838,8676=>838,8677=>838,8678=>838,8679=>838,8680=>838,8681=>838,8682=>838,8683=>838,8684=>838,8685=>838,8686=>838,8687=>838,8688=>838,8689=>838,8690=>838,8691=>838,8692=>838,8693=>838,8694=>838,8695=>838,8696=>838,8697=>838,8698=>838,8699=>838,8700=>838,8701=>838,8702=>838,8703=>838,8704=>684,8705=>636,8706=>517,8707=>632,8708=>632,8709=>871,8710=>669,8711=>669,8712=>871,8713=>871,8714=>718,8715=>871,8716=>871,8717=>718,8718=>636,8719=>757,8720=>757,8721=>674,8722=>838,8723=>838,8724=>838,8725=>337,8726=>637,8727=>838,8728=>626,8729=>626,8730=>637,8731=>637,8732=>637,8733=>714,8734=>833,8735=>838,8736=>896,8737=>896,8738=>838,8739=>500,8740=>500,8741=>500,8742=>500,8743=>732,8744=>732,8745=>732,8746=>732,8747=>521,8748=>789,8749=>1057,8750=>521,8751=>789,8752=>1057,8753=>521,8754=>521,8755=>521,8756=>636,8757=>636,8758=>260,8759=>636,8760=>838,8761=>838,8762=>838,8763=>838,8764=>838,8765=>838,8766=>838,8767=>838,8768=>375,8769=>838,8770=>838,8771=>838,8772=>838,8773=>838,8774=>838,8775=>838,8776=>838,8777=>838,8778=>838,8779=>838,8780=>838,8781=>838,8782=>838,8783=>838,8784=>838,8785=>838,8786=>838,8787=>838,8788=>1000,8789=>1000,8790=>838,8791=>838,8792=>838,8793=>838,8794=>838,8795=>838,8796=>838,8797=>838,8798=>838,8799=>838,8800=>838,8801=>838,8802=>838,8803=>838,8804=>838,8805=>838,8806=>838,8807=>838,8808=>838,8809=>838,8810=>1047,8811=>1047,8812=>464,8813=>838,8814=>838,8815=>838,8816=>838,8817=>838,8818=>838,8819=>838,8820=>838,8821=>838,8822=>838,8823=>838,8824=>838,8825=>838,8826=>838,8827=>838,8828=>838,8829=>838,8830=>838,8831=>838,8832=>838,8833=>838,8834=>838,8835=>838,8836=>838,8837=>838,8838=>838,8839=>838,8840=>838,8841=>838,8842=>838,8843=>838,8844=>732,8845=>732,8846=>732,8847=>838,8848=>838,8849=>838,8850=>838,8851=>780,8852=>780,8853=>838,8854=>838,8855=>838,8856=>838,8857=>838,8858=>838,8859=>838,8860=>838,8861=>838,8862=>838,8863=>838,8864=>838,8865=>838,8866=>871,8867=>871,8868=>871,8869=>871,8870=>521,8871=>521,8872=>871,8873=>871,8874=>871,8875=>871,8876=>871,8877=>871,8878=>871,8879=>871,8880=>838,8881=>838,8882=>838,8883=>838,8884=>838,8885=>838,8886=>1000,8887=>1000,8888=>838,8889=>838,8890=>521,8891=>732,8892=>732,8893=>732,8894=>838,8895=>838,8896=>820,8897=>820,8898=>820,8899=>820,8900=>494,8901=>318,8902=>626,8903=>838,8904=>1000,8905=>1000,8906=>1000,8907=>1000,8908=>1000,8909=>838,8910=>732,8911=>732,8912=>838,8913=>838,8914=>838,8915=>838,8916=>838,8917=>838,8918=>838,8919=>838,8920=>1422,8921=>1422,8922=>838,8923=>838,8924=>838,8925=>838,8926=>838,8927=>838,8928=>838,8929=>838,8930=>838,8931=>838,8932=>838,8933=>838,8934=>838,8935=>838,8936=>838,8937=>838,8938=>838,8939=>838,8940=>838,8941=>838,8942=>1000,8943=>1000,8944=>1000,8945=>1000,8946=>1000,8947=>871,8948=>718,8949=>871,8950=>871,8951=>718,8952=>871,8953=>871,8954=>1000,8955=>871,8956=>718,8957=>871,8958=>718,8959=>871,8960=>602,8961=>602,8962=>635,8963=>838,8964=>838,8965=>838,8966=>838,8967=>488,8968=>390,8969=>390,8970=>390,8971=>390,8972=>809,8973=>809,8974=>809,8975=>809,8976=>838,8977=>513,8984=>1000,8985=>838,8988=>469,8989=>469,8990=>469,8991=>469,8992=>521,8993=>521,8996=>1152,8997=>1152,8998=>1414,8999=>1152,9000=>1443,9003=>1414,9004=>873,9075=>338,9076=>635,9077=>837,9082=>659,9085=>757,9095=>1152,9108=>873,9115=>500,9116=>500,9117=>500,9118=>500,9119=>500,9120=>500,9121=>500,9122=>500,9123=>500,9124=>500,9125=>500,9126=>500,9127=>750,9128=>750,9129=>750,9130=>750,9131=>750,9132=>750,9133=>750,9134=>521,9166=>838,9167=>945,9187=>873,9189=>769,9192=>636,9250=>635,9251=>635,9312=>896,9313=>896,9314=>896,9315=>896,9316=>896,9317=>896,9318=>896,9319=>896,9320=>896,9321=>896,9472=>602,9473=>602,9474=>602,9475=>602,9476=>602,9477=>602,9478=>602,9479=>602,9480=>602,9481=>602,9482=>602,9483=>602,9484=>602,9485=>602,9486=>602,9487=>602,9488=>602,9489=>602,9490=>602,9491=>602,9492=>602,9493=>602,9494=>602,9495=>602,9496=>602,9497=>602,9498=>602,9499=>602,9500=>602,9501=>602,9502=>602,9503=>602,9504=>602,9505=>602,9506=>602,9507=>602,9508=>602,9509=>602,9510=>602,9511=>602,9512=>602,9513=>602,9514=>602,9515=>602,9516=>602,9517=>602,9518=>602,9519=>602,9520=>602,9521=>602,9522=>602,9523=>602,9524=>602,9525=>602,9526=>602,9527=>602,9528=>602,9529=>602,9530=>602,9531=>602,9532=>602,9533=>602,9534=>602,9535=>602,9536=>602,9537=>602,9538=>602,9539=>602,9540=>602,9541=>602,9542=>602,9543=>602,9544=>602,9545=>602,9546=>602,9547=>602,9548=>602,9549=>602,9550=>602,9551=>602,9552=>602,9553=>602,9554=>602,9555=>602,9556=>602,9557=>602,9558=>602,9559=>602,9560=>602,9561=>602,9562=>602,9563=>602,9564=>602,9565=>602,9566=>602,9567=>602,9568=>602,9569=>602,9570=>602,9571=>602,9572=>602,9573=>602,9574=>602,9575=>602,9576=>602,9577=>602,9578=>602,9579=>602,9580=>602,9581=>602,9582=>602,9583=>602,9584=>602,9585=>602,9586=>602,9587=>602,9588=>602,9589=>602,9590=>602,9591=>602,9592=>602,9593=>602,9594=>602,9595=>602,9596=>602,9597=>602,9598=>602,9599=>602,9600=>769,9601=>769,9602=>769,9603=>769,9604=>769,9605=>769,9606=>769,9607=>769,9608=>769,9609=>769,9610=>769,9611=>769,9612=>769,9613=>769,9614=>769,9615=>769,9616=>769,9617=>769,9618=>769,9619=>769,9620=>769,9621=>769,9622=>769,9623=>769,9624=>769,9625=>769,9626=>769,9627=>769,9628=>769,9629=>769,9630=>769,9631=>769,9632=>945,9633=>945,9634=>945,9635=>945,9636=>945,9637=>945,9638=>945,9639=>945,9640=>945,9641=>945,9642=>678,9643=>678,9644=>945,9645=>945,9646=>550,9647=>550,9648=>769,9649=>769,9650=>769,9651=>769,9652=>502,9653=>502,9654=>769,9655=>769,9656=>502,9657=>502,9658=>769,9659=>769,9660=>769,9661=>769,9662=>502,9663=>502,9664=>769,9665=>769,9666=>502,9667=>502,9668=>769,9669=>769,9670=>769,9671=>769,9672=>769,9673=>873,9674=>494,9675=>873,9676=>873,9677=>873,9678=>873,9679=>873,9680=>873,9681=>873,9682=>873,9683=>873,9684=>873,9685=>873,9686=>527,9687=>527,9688=>791,9689=>970,9690=>970,9691=>970,9692=>387,9693=>387,9694=>387,9695=>387,9696=>769,9697=>769,9698=>769,9699=>769,9700=>769,9701=>769,9702=>590,9703=>945,9704=>945,9705=>945,9706=>945,9707=>945,9708=>769,9709=>769,9710=>769,9711=>1119,9712=>945,9713=>945,9714=>945,9715=>945,9716=>873,9717=>873,9718=>873,9719=>873,9720=>769,9721=>769,9722=>769,9723=>830,9724=>830,9725=>732,9726=>732,9727=>769,9728=>896,9729=>1000,9730=>896,9731=>896,9732=>896,9733=>896,9734=>896,9735=>573,9736=>896,9737=>896,9738=>888,9739=>888,9740=>671,9741=>1013,9742=>1246,9743=>1250,9744=>896,9745=>896,9746=>896,9747=>532,9748=>896,9749=>896,9750=>896,9751=>896,9752=>896,9753=>896,9754=>896,9755=>896,9756=>896,9757=>609,9758=>896,9759=>609,9760=>896,9761=>896,9762=>896,9763=>896,9764=>669,9765=>746,9766=>649,9767=>784,9768=>545,9769=>896,9770=>896,9771=>896,9772=>710,9773=>896,9774=>896,9775=>896,9776=>890,9777=>890,9778=>890,9779=>890,9780=>890,9781=>890,9782=>890,9783=>890,9784=>896,9785=>1042,9786=>1042,9787=>1042,9788=>896,9789=>896,9790=>896,9791=>614,9792=>732,9793=>732,9794=>896,9795=>896,9796=>896,9797=>896,9798=>896,9799=>896,9800=>896,9801=>896,9802=>896,9803=>896,9804=>896,9805=>896,9806=>896,9807=>896,9808=>896,9809=>896,9810=>896,9811=>896,9812=>896,9813=>896,9814=>896,9815=>896,9816=>896,9817=>896,9818=>896,9819=>896,9820=>896,9821=>896,9822=>896,9823=>896,9824=>896,9825=>896,9826=>896,9827=>896,9828=>896,9829=>896,9830=>896,9831=>896,9832=>896,9833=>472,9834=>638,9835=>896,9836=>896,9837=>472,9838=>357,9839=>484,9840=>748,9841=>766,9842=>896,9843=>896,9844=>896,9845=>896,9846=>896,9847=>896,9848=>896,9849=>896,9850=>896,9851=>896,9852=>896,9853=>896,9854=>896,9855=>896,9856=>869,9857=>869,9858=>869,9859=>869,9860=>869,9861=>869,9862=>890,9863=>890,9864=>890,9865=>890,9866=>890,9867=>890,9868=>890,9869=>890,9870=>890,9871=>890,9872=>750,9873=>750,9874=>890,9875=>816,9876=>716,9877=>537,9878=>852,9879=>890,9880=>684,9881=>896,9882=>708,9883=>890,9884=>890,9888=>890,9889=>702,9890=>1004,9891=>1089,9892=>1175,9893=>903,9894=>838,9895=>838,9896=>838,9897=>838,9898=>838,9899=>838,9900=>838,9901=>838,9902=>838,9903=>838,9904=>844,9905=>838,9906=>732,9907=>732,9908=>732,9909=>732,9910=>850,9911=>732,9912=>732,9920=>838,9921=>838,9922=>838,9923=>838,9954=>732,9985=>838,9986=>838,9987=>838,9988=>838,9990=>838,9991=>838,9992=>838,9993=>838,9996=>838,9997=>838,9998=>838,9999=>838,10000=>838,10001=>838,10002=>838,10003=>838,10004=>838,10005=>838,10006=>838,10007=>838,10008=>838,10009=>838,10010=>838,10011=>838,10012=>838,10013=>838,10014=>838,10015=>838,10016=>838,10017=>838,10018=>838,10019=>838,10020=>838,10021=>838,10022=>838,10023=>838,10025=>838,10026=>838,10027=>838,10028=>838,10029=>838,10030=>838,10031=>838,10032=>838,10033=>838,10034=>838,10035=>838,10036=>838,10037=>838,10038=>838,10039=>838,10040=>838,10041=>838,10042=>838,10043=>838,10044=>838,10045=>838,10046=>838,10047=>838,10048=>838,10049=>838,10050=>838,10051=>838,10052=>838,10053=>838,10054=>838,10055=>838,10056=>838,10057=>838,10058=>838,10059=>838,10061=>896,10063=>896,10064=>896,10065=>896,10066=>896,10070=>896,10072=>838,10073=>838,10074=>838,10075=>322,10076=>322,10077=>538,10078=>538,10081=>838,10082=>838,10083=>838,10084=>838,10085=>838,10086=>838,10087=>838,10088=>838,10089=>838,10090=>838,10091=>838,10092=>838,10093=>838,10094=>838,10095=>838,10096=>838,10097=>838,10098=>838,10099=>838,10100=>838,10101=>838,10102=>896,10103=>896,10104=>896,10105=>896,10106=>896,10107=>896,10108=>896,10109=>896,10110=>896,10111=>896,10112=>838,10113=>838,10114=>838,10115=>838,10116=>838,10117=>838,10118=>838,10119=>838,10120=>838,10121=>838,10122=>838,10123=>838,10124=>838,10125=>838,10126=>838,10127=>838,10128=>838,10129=>838,10130=>838,10131=>838,10132=>838,10136=>838,10137=>838,10138=>838,10139=>838,10140=>838,10141=>838,10142=>838,10143=>838,10144=>838,10145=>838,10146=>838,10147=>838,10148=>838,10149=>838,10150=>838,10151=>838,10152=>838,10153=>838,10154=>838,10155=>838,10156=>838,10157=>838,10158=>838,10159=>838,10161=>838,10162=>838,10163=>838,10164=>838,10165=>838,10166=>838,10167=>838,10168=>838,10169=>838,10170=>838,10171=>838,10172=>838,10173=>838,10174=>838,10181=>390,10182=>390,10208=>494,10214=>495,10215=>495,10216=>390,10217=>390,10218=>556,10219=>556,10224=>838,10225=>838,10226=>838,10227=>838,10228=>1157,10229=>1434,10230=>1434,10231=>1434,10232=>1434,10233=>1434,10234=>1434,10235=>1434,10236=>1434,10237=>1434,10238=>1434,10239=>1434,10240=>732,10241=>732,10242=>732,10243=>732,10244=>732,10245=>732,10246=>732,10247=>732,10248=>732,10249=>732,10250=>732,10251=>732,10252=>732,10253=>732,10254=>732,10255=>732,10256=>732,10257=>732,10258=>732,10259=>732,10260=>732,10261=>732,10262=>732,10263=>732,10264=>732,10265=>732,10266=>732,10267=>732,10268=>732,10269=>732,10270=>732,10271=>732,10272=>732,10273=>732,10274=>732,10275=>732,10276=>732,10277=>732,10278=>732,10279=>732,10280=>732,10281=>732,10282=>732,10283=>732,10284=>732,10285=>732,10286=>732,10287=>732,10288=>732,10289=>732,10290=>732,10291=>732,10292=>732,10293=>732,10294=>732,10295=>732,10296=>732,10297=>732,10298=>732,10299=>732,10300=>732,10301=>732,10302=>732,10303=>732,10304=>732,10305=>732,10306=>732,10307=>732,10308=>732,10309=>732,10310=>732,10311=>732,10312=>732,10313=>732,10314=>732,10315=>732,10316=>732,10317=>732,10318=>732,10319=>732,10320=>732,10321=>732,10322=>732,10323=>732,10324=>732,10325=>732,10326=>732,10327=>732,10328=>732,10329=>732,10330=>732,10331=>732,10332=>732,10333=>732,10334=>732,10335=>732,10336=>732,10337=>732,10338=>732,10339=>732,10340=>732,10341=>732,10342=>732,10343=>732,10344=>732,10345=>732,10346=>732,10347=>732,10348=>732,10349=>732,10350=>732,10351=>732,10352=>732,10353=>732,10354=>732,10355=>732,10356=>732,10357=>732,10358=>732,10359=>732,10360=>732,10361=>732,10362=>732,10363=>732,10364=>732,10365=>732,10366=>732,10367=>732,10368=>732,10369=>732,10370=>732,10371=>732,10372=>732,10373=>732,10374=>732,10375=>732,10376=>732,10377=>732,10378=>732,10379=>732,10380=>732,10381=>732,10382=>732,10383=>732,10384=>732,10385=>732,10386=>732,10387=>732,10388=>732,10389=>732,10390=>732,10391=>732,10392=>732,10393=>732,10394=>732,10395=>732,10396=>732,10397=>732,10398=>732,10399=>732,10400=>732,10401=>732,10402=>732,10403=>732,10404=>732,10405=>732,10406=>732,10407=>732,10408=>732,10409=>732,10410=>732,10411=>732,10412=>732,10413=>732,10414=>732,10415=>732,10416=>732,10417=>732,10418=>732,10419=>732,10420=>732,10421=>732,10422=>732,10423=>732,10424=>732,10425=>732,10426=>732,10427=>732,10428=>732,10429=>732,10430=>732,10431=>732,10432=>732,10433=>732,10434=>732,10435=>732,10436=>732,10437=>732,10438=>732,10439=>732,10440=>732,10441=>732,10442=>732,10443=>732,10444=>732,10445=>732,10446=>732,10447=>732,10448=>732,10449=>732,10450=>732,10451=>732,10452=>732,10453=>732,10454=>732,10455=>732,10456=>732,10457=>732,10458=>732,10459=>732,10460=>732,10461=>732,10462=>732,10463=>732,10464=>732,10465=>732,10466=>732,10467=>732,10468=>732,10469=>732,10470=>732,10471=>732,10472=>732,10473=>732,10474=>732,10475=>732,10476=>732,10477=>732,10478=>732,10479=>732,10480=>732,10481=>732,10482=>732,10483=>732,10484=>732,10485=>732,10486=>732,10487=>732,10488=>732,10489=>732,10490=>732,10491=>732,10492=>732,10493=>732,10494=>732,10495=>732,10502=>838,10503=>838,10506=>838,10507=>838,10560=>683,10561=>683,10627=>734,10628=>734,10702=>838,10703=>1000,10704=>1000,10705=>1000,10706=>1000,10707=>1000,10708=>1000,10709=>1000,10731=>494,10746=>838,10747=>838,10752=>1000,10753=>1000,10754=>1000,10764=>1325,10765=>521,10766=>521,10767=>521,10768=>521,10769=>521,10770=>521,10771=>521,10772=>521,10773=>521,10774=>521,10775=>521,10776=>521,10777=>521,10778=>521,10779=>521,10780=>521,10799=>838,10858=>838,10859=>838,10877=>838,10878=>838,10879=>838,10880=>838,10881=>838,10882=>838,10883=>838,10884=>838,10885=>838,10886=>838,10887=>838,10888=>838,10889=>838,10890=>838,10891=>838,10892=>838,10893=>838,10894=>838,10895=>838,10896=>838,10897=>838,10898=>838,10899=>838,10900=>838,10901=>838,10902=>838,10903=>838,10904=>838,10905=>838,10906=>838,10907=>838,10908=>838,10909=>838,10910=>838,10911=>838,10912=>838,10926=>838,10927=>838,10928=>838,10929=>838,10930=>838,10931=>838,10932=>838,10933=>838,10934=>838,10935=>838,10936=>838,10937=>838,10938=>838,11001=>838,11002=>838,11008=>838,11009=>838,11010=>838,11011=>838,11012=>838,11013=>838,11014=>838,11015=>838,11016=>838,11017=>838,11018=>838,11019=>838,11020=>838,11021=>838,11022=>836,11023=>836,11024=>836,11025=>836,11026=>945,11027=>945,11028=>945,11029=>945,11030=>769,11031=>769,11032=>769,11033=>769,11034=>945,11039=>869,11040=>869,11041=>873,11042=>873,11043=>873,11044=>1119,11091=>869,11092=>869,11360=>557,11361=>278,11362=>557,11363=>603,11364=>695,11365=>613,11366=>392,11367=>752,11368=>634,11369=>656,11370=>579,11371=>685,11372=>525,11373=>781,11374=>863,11375=>684,11376=>781,11377=>734,11378=>1128,11379=>961,11380=>592,11381=>654,11382=>568,11383=>660,11385=>414,11386=>612,11387=>491,11388=>175,11389=>431,11390=>635,11391=>685,11520=>591,11521=>595,11522=>564,11523=>602,11524=>587,11525=>911,11526=>626,11527=>952,11528=>595,11529=>607,11530=>954,11531=>620,11532=>595,11533=>926,11534=>595,11535=>806,11536=>931,11537=>584,11538=>592,11539=>923,11540=>953,11541=>828,11542=>596,11543=>595,11544=>590,11545=>592,11546=>592,11547=>621,11548=>920,11549=>589,11550=>586,11551=>581,11552=>914,11553=>596,11554=>595,11555=>592,11556=>642,11557=>901,11800=>531,11807=>838,11810=>390,11811=>390,11812=>390,11813=>390,11822=>531,19904=>896,19905=>896,19906=>896,19907=>896,19908=>896,19909=>896,19910=>896,19911=>896,19912=>896,19913=>896,19914=>896,19915=>896,19916=>896,19917=>896,19918=>896,19919=>896,19920=>896,19921=>896,19922=>896,19923=>896,19924=>896,19925=>896,19926=>896,19927=>896,19928=>896,19929=>896,19930=>896,19931=>896,19932=>896,19933=>896,19934=>896,19935=>896,19936=>896,19937=>896,19938=>896,19939=>896,19940=>896,19941=>896,19942=>896,19943=>896,19944=>896,19945=>896,19946=>896,19947=>896,19948=>896,19949=>896,19950=>896,19951=>896,19952=>896,19953=>896,19954=>896,19955=>896,19956=>896,19957=>896,19958=>896,19959=>896,19960=>896,19961=>896,19962=>896,19963=>896,19964=>896,19965=>896,19966=>896,19967=>896,42192=>686,42193=>603,42194=>603,42195=>770,42196=>611,42197=>611,42198=>775,42199=>656,42200=>656,42201=>512,42202=>698,42203=>703,42204=>685,42205=>575,42206=>575,42207=>863,42208=>748,42209=>557,42210=>635,42211=>695,42212=>695,42213=>684,42214=>684,42215=>752,42216=>775,42217=>512,42218=>989,42219=>685,42220=>611,42221=>686,42222=>684,42223=>684,42224=>632,42225=>632,42226=>295,42227=>787,42228=>732,42229=>732,42230=>557,42231=>767,42232=>300,42233=>300,42234=>596,42235=>596,42236=>300,42237=>300,42238=>588,42239=>588,42564=>635,42565=>521,42566=>354,42567=>338,42572=>1180,42573=>1028,42576=>1029,42577=>906,42580=>1080,42581=>842,42582=>985,42583=>847,42594=>1024,42595=>925,42596=>1014,42597=>900,42598=>863,42599=>1008,42600=>787,42601=>612,42602=>855,42603=>712,42604=>1358,42605=>1019,42606=>879,42634=>805,42635=>722,42636=>611,42637=>583,42644=>686,42645=>634,42760=>493,42761=>493,42762=>493,42763=>493,42764=>493,42765=>493,42766=>493,42767=>493,42768=>493,42769=>493,42770=>493,42771=>493,42772=>493,42773=>493,42774=>493,42779=>369,42780=>369,42781=>252,42782=>252,42783=>252,42786=>385,42787=>356,42788=>472,42789=>472,42790=>752,42791=>634,42792=>878,42793=>709,42794=>614,42795=>541,42800=>491,42801=>521,42802=>1250,42803=>985,42804=>1219,42805=>1000,42806=>1155,42807=>996,42808=>971,42809=>818,42810=>971,42811=>818,42812=>959,42813=>818,42814=>698,42815=>549,42816=>656,42817=>579,42822=>680,42823=>392,42824=>582,42825=>427,42826=>807,42827=>704,42830=>1358,42831=>1019,42832=>603,42833=>635,42834=>734,42835=>774,42838=>787,42839=>635,42852=>605,42853=>635,42854=>605,42855=>635,42880=>557,42881=>278,42882=>735,42883=>634,42889=>337,42890=>376,42891=>401,42892=>275,42893=>686,42894=>487,42896=>772,42897=>667,42912=>775,42913=>635,42914=>656,42915=>579,42916=>748,42917=>634,42918=>695,42919=>411,42920=>635,42921=>521,42922=>872,43002=>915,43003=>575,43004=>603,43005=>863,43006=>295,43007=>1199,61184=>213,61185=>238,61186=>257,61187=>264,61188=>267,61189=>238,61190=>213,61191=>238,61192=>257,61193=>264,61194=>257,61195=>238,61196=>213,61197=>238,61198=>257,61199=>264,61200=>257,61201=>238,61202=>213,61203=>238,61204=>267,61205=>264,61206=>257,61207=>238,61208=>213,61209=>275,62464=>580,62465=>580,62466=>624,62467=>889,62468=>585,62469=>580,62470=>653,62471=>882,62472=>555,62473=>580,62474=>1168,62475=>589,62476=>590,62477=>869,62478=>580,62479=>589,62480=>914,62481=>590,62482=>731,62483=>583,62484=>872,62485=>589,62486=>895,62487=>589,62488=>589,62489=>590,62490=>649,62491=>589,62492=>589,62493=>599,62494=>590,62495=>516,62496=>580,62497=>584,62498=>580,62499=>580,62500=>581,62501=>638,62502=>955,62504=>931,62505=>808,62506=>508,62507=>508,62508=>508,62509=>508,62510=>508,62511=>508,62512=>508,62513=>508,62514=>508,62515=>508,62516=>518,62517=>518,62518=>518,62519=>787,62520=>787,62521=>787,62522=>787,62523=>787,62524=>546,62525=>546,62526=>546,62527=>546,62528=>546,62529=>546,63173=>612,64256=>722,64257=>646,64258=>646,64259=>1000,64260=>1000,64261=>686,64262=>861,64275=>1202,64276=>1202,64277=>1196,64278=>1186,64279=>1529,64285=>224,64286=>0,64287=>471,64288=>636,64289=>856,64290=>774,64291=>906,64292=>771,64293=>843,64294=>855,64295=>807,64296=>875,64297=>838,64298=>708,64299=>708,64300=>708,64301=>708,64302=>668,64303=>668,64304=>668,64305=>578,64306=>412,64307=>546,64308=>653,64309=>272,64310=>346,64311=>1000,64312=>648,64313=>307,64314=>537,64315=>529,64316=>568,64317=>1000,64318=>679,64319=>1000,64320=>400,64321=>649,64322=>1000,64323=>640,64324=>625,64325=>1000,64326=>593,64327=>709,64328=>564,64329=>708,64330=>657,64331=>272,64332=>578,64333=>529,64334=>625,64335=>629,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,65039=>0,65056=>0,65057=>0,65058=>0,65059=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>1025,65535=>600); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansi.z b/lib/combodo/tcpdf/fonts/dejavusansi.z deleted file mode 100644 index 6a1b2b825..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansi.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmono.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansmono.ctg.z deleted file mode 100644 index 209e2d50b..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmono.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmono.php b/lib/combodo/tcpdf/fonts/dejavusansmono.php deleted file mode 100644 index 5e0c537d2..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansmono.php +++ /dev/null @@ -1,16 +0,0 @@ -33,'FontBBox'=>'[-558 -375 718 1042]','ItalicAngle'=>0,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>34,'StemH'=>15,'AvgWidth'=>602,'MaxWidth'=>602,'MissingWidth'=>602); -$cbbox=array(0=>array(51,-177,551,705),33=>array(252,0,351,729),34=>array(165,458,437,729),35=>array(1,0,600,718),36=>array(93,-147,544,760),37=>array(16,0,586,699),38=>array(28,-14,596,742),39=>array(258,458,343,729),40=>array(208,-132,432,759),41=>array(170,-132,394,759),42=>array(81,286,521,742),43=>array(43,55,559,572),44=>array(197,-140,368,148),45=>array(174,234,428,314),46=>array(239,0,362,149),47=>array(50,-93,527,729),48=>array(65,-14,537,742),49=>array(120,0,534,729),50=>array(74,0,517,742),51=>array(67,-14,527,742),52=>array(50,0,554,729),53=>array(70,-14,522,729),54=>array(65,-14,537,742),55=>array(68,0,527,729),56=>array(64,-14,538,742),57=>array(62,-14,534,742),58=>array(239,0,362,519),59=>array(197,-140,368,519),60=>array(43,69,559,558),61=>array(43,172,559,454),62=>array(43,69,559,558),63=>array(119,0,508,742),64=>array(13,-156,575,681),65=>array(18,0,584,729),66=>array(81,0,555,729),67=>array(68,-14,524,742),68=>array(67,0,540,729),69=>array(96,0,538,729),70=>array(114,0,543,729),71=>array(50,-14,539,742),72=>array(67,0,535,729),73=>array(98,0,503,729),74=>array(53,-14,467,729),75=>array(67,0,598,729),76=>array(105,0,556,729),77=>array(42,0,559,729),78=>array(68,0,534,729),79=>array(57,-14,545,742),80=>array(96,0,557,729),81=>array(57,-132,545,742),82=>array(70,0,602,729),83=>array(68,-14,536,742),84=>array(23,0,579,729),85=>array(72,-14,530,729),86=>array(28,0,574,729),87=>array(0,0,602,729),88=>array(9,0,593,729),89=>array(18,0,584,729),90=>array(76,0,571,729),91=>array(226,-132,433,760),92=>array(50,-93,527,729),93=>array(169,-132,376,760),94=>array(35,457,567,729),95=>array(0,-236,602,-197),96=>array(136,616,370,800),97=>array(65,-14,517,560),98=>array(94,-14,543,760),99=>array(95,-14,518,560),100=>array(60,-14,509,760),101=>array(60,-14,543,560),102=>array(95,0,519,760),103=>array(60,-215,509,560),104=>array(95,0,513,760),105=>array(87,0,533,760),106=>array(91,-208,383,760),107=>array(115,0,587,760),108=>array(78,0,505,765),109=>array(53,0,554,560),110=>array(95,0,513,560),111=>array(67,-14,535,560),112=>array(93,-208,541,560),113=>array(67,-210,515,558),114=>array(177,0,564,560),115=>array(104,-14,503,560),116=>array(64,0,504,702),117=>array(95,-14,513,546),118=>array(49,0,553,547),119=>array(0,0,602,547),120=>array(37,0,565,547),121=>array(51,-208,563,547),122=>array(99,0,508,548),123=>array(108,-163,494,760),124=>array(259,-236,343,764),125=>array(108,-163,494,760),126=>array(43,240,559,381),161=>array(252,0,351,729),162=>array(104,-153,518,699),163=>array(68,0,543,742),164=>array(100,95,537,532),165=>array(18,0,584,729),166=>array(259,-171,343,699),167=>array(97,-95,506,742),168=>array(156,659,446,758),169=>array(0,61,602,663),170=>array(132,229,469,742),171=>array(58,69,509,517),172=>array(43,181,559,421),173=>array(174,234,428,314),174=>array(0,61,602,663),175=>array(155,673,447,745),176=>array(146,432,456,742),177=>array(43,0,559,572),178=>array(157,326,436,742),179=>array(159,319,451,742),180=>array(232,616,466,800),181=>array(95,-209,577,547),182=>array(52,-96,503,729),183=>array(239,273,362,422),184=>array(193,-193,395,0),185=>array(168,326,447,734),186=>array(119,229,483,742),187=>array(94,69,545,517),188=>array(13,-132,544,810),189=>array(13,-132,544,810),190=>array(13,-132,544,818),191=>array(94,-13,483,729),192=>array(18,0,584,927),193=>array(18,0,584,927),194=>array(18,0,584,928),195=>array(18,0,584,921),196=>array(18,0,584,913),197=>array(18,0,584,928),198=>array(0,0,576,729),199=>array(68,-193,524,742),200=>array(96,0,538,927),201=>array(96,0,538,927),202=>array(96,0,538,928),203=>array(96,0,538,913),204=>array(98,0,503,927),205=>array(98,0,503,927),206=>array(98,0,503,928),207=>array(98,0,503,913),208=>array(4,0,538,729),209=>array(68,0,534,923),210=>array(57,-14,545,927),211=>array(57,-14,545,927),212=>array(57,-14,545,928),213=>array(57,-14,545,921),214=>array(57,-14,545,913),215=>array(73,85,529,541),216=>array(4,-34,586,761),217=>array(72,-14,530,927),218=>array(72,-14,530,927),219=>array(72,-14,530,928),220=>array(72,-14,530,913),221=>array(18,0,584,927),222=>array(98,0,569,729),223=>array(92,-14,561,760),224=>array(65,-14,517,800),225=>array(65,-14,517,800),226=>array(65,-14,517,800),227=>array(65,-14,517,777),228=>array(65,-14,517,758),229=>array(65,-14,517,878),230=>array(20,-14,586,560),231=>array(95,-193,518,560),232=>array(60,-14,543,800),233=>array(60,-14,543,800),234=>array(60,-14,543,800),235=>array(60,-14,543,758),236=>array(87,0,533,800),237=>array(87,0,533,800),238=>array(87,0,533,800),239=>array(87,0,533,758),240=>array(67,-14,535,760),241=>array(95,0,513,777),242=>array(67,-14,535,800),243=>array(67,-14,535,800),244=>array(67,-14,535,800),245=>array(67,-14,535,777),246=>array(67,-14,535,758),247=>array(43,73,559,554),248=>array(23,-47,573,592),249=>array(95,-14,513,800),250=>array(95,-14,513,800),251=>array(95,-14,513,800),252=>array(95,-14,513,758),253=>array(51,-208,563,800),254=>array(93,-208,541,765),255=>array(51,-208,563,758),256=>array(18,0,584,898),257=>array(65,-14,517,745),258=>array(18,0,584,928),259=>array(65,-14,517,785),260=>array(18,-193,609,729),261=>array(65,-193,556,560),262=>array(68,-14,524,927),263=>array(95,-14,518,800),264=>array(68,-14,524,932),265=>array(95,-14,518,800),266=>array(68,-14,524,914),267=>array(95,-14,518,758),268=>array(68,-14,524,928),269=>array(95,-14,518,800),270=>array(67,0,540,925),271=>array(60,-14,641,760),272=>array(4,0,538,729),273=>array(60,-14,602,760),274=>array(96,0,538,898),275=>array(60,-14,543,745),276=>array(96,0,538,928),277=>array(60,-14,543,785),278=>array(96,0,538,914),279=>array(60,-14,543,758),280=>array(96,-193,538,729),281=>array(60,-193,543,560),282=>array(96,0,538,925),283=>array(60,-14,543,797),284=>array(50,-14,539,928),285=>array(60,-215,509,800),286=>array(50,-14,539,928),287=>array(60,-215,509,785),288=>array(50,-14,539,914),289=>array(60,-215,509,758),290=>array(50,-280,539,742),291=>array(60,-215,509,788),292=>array(67,0,535,928),293=>array(95,0,513,928),294=>array(1,0,601,729),295=>array(34,0,513,760),296=>array(98,0,503,921),297=>array(87,0,533,777),298=>array(98,0,503,898),299=>array(87,0,533,745),300=>array(98,0,503,928),301=>array(87,0,533,785),302=>array(98,-193,503,729),303=>array(87,-193,533,760),304=>array(98,0,503,914),305=>array(87,0,533,547),306=>array(-0,-13,600,730),307=>array(-2,-213,567,760),308=>array(53,-14,474,928),309=>array(91,-208,457,800),310=>array(67,-266,598,729),311=>array(115,-266,587,760),312=>array(115,0,587,547),313=>array(98,0,556,928),314=>array(78,0,505,928),315=>array(105,-266,556,729),316=>array(78,-266,505,765),317=>array(105,0,556,729),318=>array(78,0,565,765),319=>array(105,0,556,729),320=>array(78,0,592,765),321=>array(-5,0,556,729),322=>array(37,0,505,765),323=>array(68,0,534,927),324=>array(95,0,513,803),325=>array(68,-266,534,729),326=>array(95,-266,513,560),327=>array(68,0,534,928),328=>array(95,0,513,800),329=>array(12,0,573,760),330=>array(72,-208,530,743),331=>array(95,-208,513,560),332=>array(57,-14,545,898),333=>array(67,-14,535,745),334=>array(57,-14,545,928),335=>array(67,-14,535,785),336=>array(57,-14,545,927),337=>array(67,-14,535,800),338=>array(35,0,594,729),339=>array(7,-14,591,560),340=>array(70,0,602,927),341=>array(177,0,566,803),342=>array(70,-266,602,729),343=>array(141,-266,564,560),344=>array(70,0,602,925),345=>array(177,0,564,800),346=>array(68,-14,536,927),347=>array(104,-14,503,803),348=>array(68,-14,536,928),349=>array(104,-14,503,800),350=>array(68,-193,536,742),351=>array(104,-193,503,560),352=>array(68,-14,536,928),353=>array(104,-14,503,800),354=>array(23,-193,579,729),355=>array(64,-193,504,702),356=>array(23,0,579,928),357=>array(64,0,504,812),358=>array(23,0,579,729),359=>array(64,0,504,702),360=>array(72,-14,530,921),361=>array(95,-14,513,777),362=>array(72,-14,530,898),363=>array(95,-14,513,745),364=>array(72,-14,530,928),365=>array(95,-14,513,785),366=>array(72,-14,530,1042),367=>array(95,-14,513,856),368=>array(72,-14,530,927),369=>array(95,-14,513,800),370=>array(72,-201,530,729),371=>array(95,-193,586,546),372=>array(0,0,602,932),373=>array(0,0,602,803),374=>array(18,0,584,932),375=>array(51,-208,563,803),376=>array(18,0,584,913),377=>array(76,0,571,927),378=>array(99,0,508,803),379=>array(76,0,571,914),380=>array(99,0,508,758),381=>array(76,0,571,928),382=>array(99,0,508,800),383=>array(95,0,519,760),384=>array(34,-14,543,760),385=>array(10,0,581,729),386=>array(81,0,555,729),387=>array(94,-14,543,760),388=>array(23,0,579,729),389=>array(29,-14,572,760),390=>array(68,-14,524,742),391=>array(29,-14,573,800),392=>array(46,-14,556,694),393=>array(4,0,538,729),394=>array(4,0,598,729),395=>array(64,0,538,729),396=>array(77,-14,525,760),397=>array(66,-220,535,560),398=>array(96,0,538,729),399=>array(57,-14,545,742),400=>array(67,-14,527,742),401=>array(31,-208,571,729),402=>array(95,-208,519,760),403=>array(25,-14,577,800),404=>array(14,-210,589,661),405=>array(32,0,570,760),406=>array(98,0,528,729),407=>array(98,0,503,729),408=>array(54,0,595,729),409=>array(115,0,587,760),410=>array(78,0,505,765),411=>array(24,0,553,729),412=>array(53,-13,554,729),413=>array(14,-208,512,729),414=>array(95,-210,513,560),415=>array(57,-14,545,742),416=>array(3,-14,582,760),417=>array(16,-14,587,560),418=>array(22,-14,580,742),419=>array(42,-210,583,560),420=>array(27,0,575,729),421=>array(93,-208,541,699),422=>array(70,-129,602,729),423=>array(68,-14,536,742),424=>array(104,-14,503,560),425=>array(59,0,553,729),426=>array(58,-208,544,760),427=>array(64,-208,504,702),428=>array(23,0,579,729),429=>array(64,0,504,760),430=>array(23,-208,579,729),431=>array(4,-14,598,762),432=>array(19,-14,583,555),433=>array(36,0,566,713),434=>array(75,0,521,729),435=>array(8,0,594,730),436=>array(12,-208,598,553),437=>array(76,0,571,729),438=>array(76,0,526,548),439=>array(13,-14,589,729),440=>array(13,-14,589,729),441=>array(61,-213,541,547),442=>array(84,-208,518,547),443=>array(74,0,517,742),444=>array(13,-14,589,729),445=>array(61,-213,541,547),446=>array(95,-14,507,702),447=>array(61,-208,550,560),448=>array(251,0,351,729),449=>array(153,0,449,729),450=>array(80,0,522,729),451=>array(251,0,351,729),461=>array(18,0,584,928),462=>array(65,-14,517,800),463=>array(98,0,503,928),464=>array(87,0,533,800),465=>array(57,-14,545,928),466=>array(67,-14,535,800),467=>array(72,-14,530,928),468=>array(95,-14,513,800),469=>array(72,-14,530,953),470=>array(95,-14,513,899),471=>array(72,-14,530,997),472=>array(95,-14,513,954),473=>array(72,-14,530,998),474=>array(95,-14,513,954),475=>array(72,-14,530,997),476=>array(95,-14,513,954),477=>array(60,-14,542,560),478=>array(18,0,584,953),479=>array(65,-14,517,899),480=>array(18,0,584,953),481=>array(65,-14,517,899),482=>array(0,0,576,898),483=>array(20,-14,586,745),486=>array(50,-14,539,928),487=>array(60,-215,509,800),488=>array(67,0,598,928),489=>array(115,0,587,928),490=>array(57,-201,545,742),491=>array(67,-201,535,560),492=>array(57,-201,545,898),493=>array(67,-201,535,745),494=>array(13,-14,589,928),495=>array(61,-213,541,800),496=>array(91,-208,474,797),500=>array(50,-14,539,927),501=>array(60,-215,509,800),502=>array(30,-14,572,729),504=>array(68,0,534,927),505=>array(95,0,513,800),508=>array(0,0,576,927),509=>array(20,-14,586,800),510=>array(4,-34,586,927),511=>array(23,-47,573,800),512=>array(18,0,584,927),513=>array(65,-14,517,800),514=>array(18,0,584,928),515=>array(65,-14,517,785),516=>array(91,0,538,927),517=>array(60,-14,543,800),518=>array(96,0,538,928),519=>array(60,-14,543,785),520=>array(91,0,503,927),521=>array(87,0,533,800),522=>array(98,0,503,928),523=>array(87,0,533,785),524=>array(57,-14,545,927),525=>array(67,-14,535,800),526=>array(57,-14,545,928),527=>array(67,-14,535,785),528=>array(67,0,602,927),529=>array(176,0,564,800),530=>array(70,0,602,928),531=>array(177,0,564,785),532=>array(72,-14,530,927),533=>array(95,-14,513,800),534=>array(72,-14,530,928),535=>array(95,-14,513,785),536=>array(68,-265,536,742),537=>array(104,-265,503,560),538=>array(23,-265,579,729),539=>array(64,-265,504,702),540=>array(61,-210,541,742),541=>array(85,-211,517,560),542=>array(67,0,535,928),543=>array(95,0,513,928),544=>array(72,-210,530,743),545=>array(9,-72,578,760),548=>array(76,-208,571,729),549=>array(99,-208,508,548),550=>array(18,0,584,914),551=>array(65,-14,517,758),552=>array(96,-193,538,729),553=>array(60,-193,543,560),554=>array(57,-14,545,953),555=>array(67,-14,535,899),556=>array(57,-14,545,953),557=>array(67,-14,535,899),558=>array(57,-14,545,914),559=>array(67,-14,535,758),560=>array(57,-14,545,953),561=>array(67,-14,535,899),562=>array(18,0,584,898),563=>array(51,-208,563,745),564=>array(78,-72,505,765),565=>array(52,-72,550,560),566=>array(64,-72,504,702),567=>array(91,-208,383,547),568=>array(59,-14,543,760),569=>array(59,-214,543,560),570=>array(4,-34,586,761),571=>array(4,-34,586,761),572=>array(23,-47,573,592),573=>array(10,0,592,729),574=>array(16,-34,598,761),575=>array(104,-242,512,560),576=>array(99,-242,508,548),577=>array(27,0,575,729),579=>array(4,0,555,729),580=>array(10,-14,592,729),581=>array(28,0,574,729),588=>array(10,0,602,729),589=>array(69,0,564,560),592=>array(75,-14,527,560),593=>array(60,-14,509,560),594=>array(94,-15,542,559),595=>array(94,-14,543,760),596=>array(90,-14,513,560),597=>array(95,-69,528,560),598=>array(60,-208,527,760),599=>array(60,-14,527,760),600=>array(60,-14,542,560),601=>array(60,-14,542,560),602=>array(15,-14,587,560),603=>array(83,-11,520,560),604=>array(83,-11,520,560),605=>array(27,-11,575,560),606=>array(86,-21,517,559),607=>array(91,-208,555,546),608=>array(60,-215,525,760),609=>array(77,-215,525,546),610=>array(60,0,543,574),611=>array(50,-210,552,546),612=>array(50,0,552,546),613=>array(92,-210,510,546),614=>array(95,0,513,760),615=>array(95,-208,513,760),616=>array(69,0,524,760),617=>array(97,0,505,546),618=>array(78,0,524,546),619=>array(43,0,559,765),620=>array(77,0,525,765),621=>array(78,-208,505,765),622=>array(20,-213,582,765),623=>array(51,0,552,560),624=>array(51,-210,552,560),625=>array(50,-208,551,560),626=>array(87,-208,538,560),627=>array(66,-208,515,560),628=>array(70,0,532,560),629=>array(67,-14,535,560),630=>array(34,0,568,547),631=>array(83,-15,519,560),632=>array(67,-208,535,759),633=>array(74,-13,461,546),634=>array(74,-13,461,765),635=>array(50,-208,563,546),636=>array(177,-208,564,560),637=>array(177,-208,564,560),638=>array(78,0,524,560),639=>array(78,0,524,560),640=>array(60,0,542,546),641=>array(60,0,542,546),642=>array(92,-208,510,560),643=>array(61,-208,541,760),644=>array(61,-208,541,760),645=>array(61,-208,541,546),646=>array(58,-208,544,760),647=>array(81,-155,521,547),648=>array(64,-208,504,702),649=>array(0,-14,602,547),650=>array(46,-15,556,547),651=>array(32,0,558,547),652=>array(35,0,567,547),653=>array(7,0,595,547),654=>array(35,0,567,755),655=>array(50,0,552,561),656=>array(95,-208,507,547),657=>array(82,-54,521,547),658=>array(61,-213,541,547),659=>array(51,-213,551,547),660=>array(95,0,507,759),661=>array(95,0,507,759),662=>array(95,0,507,759),663=>array(95,-214,507,759),664=>array(46,22,556,532),665=>array(102,0,500,561),666=>array(86,-21,517,559),667=>array(26,0,553,759),668=>array(70,0,532,560),669=>array(99,-208,503,760),670=>array(58,-213,544,547),671=>array(120,0,482,560),672=>array(17,-208,561,759),673=>array(95,0,507,759),674=>array(95,0,507,759),675=>array(14,-14,575,760),676=>array(13,-213,588,760),677=>array(26,-54,575,760),678=>array(75,-14,527,702),679=>array(75,-208,525,760),680=>array(88,-70,509,702),681=>array(66,-208,535,760),682=>array(112,-14,490,760),683=>array(107,0,494,760),684=>array(70,-15,532,641),685=>array(70,84,532,640),686=>array(87,-214,515,760),687=>array(96,-208,506,760),688=>array(157,326,445,752),689=>array(157,325,445,751),690=>array(237,209,365,752),691=>array(200,326,402,640),692=>array(200,318,402,633),693=>array(165,209,438,633),694=>array(148,326,454,633),695=>array(70,326,532,633),696=>array(133,209,469,633),697=>array(240,557,365,800),699=>array(226,472,397,760),700=>array(226,472,397,760),701=>array(242,595,360,844),702=>array(234,492,368,760),703=>array(234,492,368,760),704=>array(171,444,431,870),705=>array(171,444,431,870),710=>array(145,616,457,800),711=>array(145,616,457,800),712=>array(268,488,334,759),713=>array(155,673,447,745),716=>array(268,-148,334,123),717=>array(155,-174,447,-102),718=>array(184,-285,418,-102),719=>array(184,-285,418,-102),720=>array(214,0,388,517),721=>array(214,355,388,517),722=>array(234,249,368,517),723=>array(234,249,368,517),726=>array(155,125,447,417),727=>array(191,234,411,307),728=>array(148,645,454,785),729=>array(250,658,351,758),730=>array(167,610,435,878),731=>array(205,-193,387,0),732=>array(140,639,462,777),733=>array(168,616,511,800),734=>array(-171,233,431,504),736=>array(143,208,459,632),737=>array(167,326,436,755),738=>array(169,326,433,648),739=>array(134,326,468,632),740=>array(171,326,431,751),741=>array(146,0,456,668),742=>array(146,0,456,668),743=>array(146,0,456,668),744=>array(146,0,456,668),745=>array(146,0,456,668),750=>array(103,472,498,760),755=>array(194,-245,408,-31),768=>array(136,616,370,800),769=>array(232,616,466,800),770=>array(145,616,457,800),771=>array(140,639,462,777),772=>array(155,673,447,745),773=>array(0,716,602,755),774=>array(148,645,454,785),775=>array(250,658,351,758),776=>array(156,659,446,758),777=>array(200,618,402,847),778=>array(167,610,435,878),779=>array(168,616,511,800),780=>array(145,616,457,800),781=>array(267,616,333,833),782=>array(167,616,433,833),783=>array(103,616,445,800),784=>array(148,645,454,857),785=>array(148,645,454,785),786=>array(229,472,392,641),787=>array(242,595,360,844),788=>array(242,595,360,844),789=>array(232,616,362,800),790=>array(184,-285,418,-102),791=>array(184,-285,418,-102),792=>array(201,-375,354,-135),793=>array(225,-375,377,-135),794=>array(181,690,421,930),795=>array(205,373,397,555),796=>array(247,-245,354,-31),797=>array(173,-288,412,-135),798=>array(171,-288,410,-135),799=>array(171,-375,411,-135),800=>array(181,-202,421,-135),801=>array(245,-208,513,63),802=>array(89,-208,357,63),803=>array(250,-202,351,-102),804=>array(156,-201,446,-103),805=>array(194,-245,408,-31),806=>array(199,-265,362,-96),807=>array(193,-193,395,0),808=>array(210,-193,392,0),809=>array(268,-319,334,-102),810=>array(167,-263,436,-102),811=>array(101,-222,501,-82),812=>array(145,-237,457,-53),813=>array(145,-237,457,-53),814=>array(148,-238,454,-98),815=>array(148,-237,454,-97),816=>array(140,-237,462,-99),817=>array(155,-174,447,-102),818=>array(0,-236,602,-197),819=>array(0,-236,602,-80),820=>array(43,240,559,381),821=>array(69,221,519,301),822=>array(0,221,602,301),823=>array(23,-47,573,592),824=>array(4,-34,586,761),825=>array(247,-245,354,-31),826=>array(167,-188,436,-26),827=>array(167,-371,436,-102),828=>array(101,-222,501,-82),829=>array(193,599,409,816),830=>array(232,595,370,853),831=>array(0,599,602,755),835=>array(242,595,360,844),856=>array(501,658,601,758),865=>array(-116,742,718,902),884=>array(240,557,365,800),885=>array(237,-208,362,35),890=>array(265,-208,372,-45),894=>array(197,-140,368,519),900=>array(232,616,466,800),901=>array(156,659,466,980),902=>array(12,0,584,800),903=>array(239,273,362,422),904=>array(-110,0,538,800),905=>array(-134,0,535,800),906=>array(-110,0,503,800),908=>array(-37,-14,545,800),910=>array(-195,0,584,800),911=>array(-24,0,566,800),912=>array(151,0,476,980),913=>array(18,0,584,729),914=>array(81,0,555,729),915=>array(105,0,556,729),916=>array(18,0,584,729),917=>array(96,0,538,729),918=>array(76,0,571,729),919=>array(67,0,535,729),920=>array(57,-14,545,742),921=>array(98,0,503,729),922=>array(67,0,598,729),923=>array(18,0,584,729),924=>array(42,0,559,729),925=>array(68,0,534,729),926=>array(67,0,535,729),927=>array(57,-14,545,742),928=>array(67,0,535,729),929=>array(96,0,557,729),931=>array(59,0,553,729),932=>array(23,0,579,729),933=>array(18,0,584,729),934=>array(57,0,544,729),935=>array(9,0,593,729),936=>array(57,0,544,729),937=>array(36,0,566,713),938=>array(98,0,503,913),939=>array(18,0,584,913),940=>array(34,-12,573,800),941=>array(83,-11,520,800),942=>array(95,-208,513,800),943=>array(151,0,476,800),944=>array(25,0,551,980),945=>array(34,-12,573,559),946=>array(74,-208,547,766),947=>array(16,-208,553,547),948=>array(67,-14,535,767),949=>array(83,-11,520,560),950=>array(75,-210,519,760),951=>array(95,-208,513,560),952=>array(67,-14,535,732),953=>array(151,0,476,547),954=>array(115,0,587,547),955=>array(33,0,565,760),956=>array(95,-209,577,547),957=>array(57,0,532,547),958=>array(79,-210,527,760),959=>array(67,-14,535,560),960=>array(39,-19,577,547),961=>array(93,-208,541,560),962=>array(95,-210,518,560),963=>array(67,-14,552,547),964=>array(78,0,524,546),965=>array(25,0,551,547),966=>array(37,-208,565,551),967=>array(43,-208,559,547),968=>array(64,-208,538,547),969=>array(34,-14,568,547),970=>array(151,0,476,758),971=>array(25,0,551,758),972=>array(67,-14,535,800),973=>array(25,0,551,800),974=>array(34,-14,568,800),976=>array(73,-11,501,768),977=>array(57,-11,540,768),978=>array(17,0,582,729),979=>array(-195,0,582,800),980=>array(17,0,582,913),981=>array(53,-208,549,729),982=>array(28,0,574,547),983=>array(25,-188,571,547),984=>array(57,-208,545,742),985=>array(67,-208,535,560),986=>array(68,-210,537,729),987=>array(76,-210,520,547),988=>array(114,0,543,729),989=>array(0,-208,503,760),990=>array(47,-2,563,729),991=>array(64,0,538,759),992=>array(16,-208,575,742),993=>array(43,-180,559,559),1008=>array(25,-7,571,550),1009=>array(93,-208,541,560),1010=>array(95,-14,518,560),1011=>array(91,-208,383,760),1012=>array(57,-14,545,742),1013=>array(79,-14,504,560),1014=>array(79,-14,504,560),1015=>array(98,0,569,729),1016=>array(93,-208,541,765),1017=>array(68,-14,524,742),1018=>array(42,0,559,729),1019=>array(62,-208,539,547),1020=>array(42,-208,541,560),1021=>array(68,-14,524,742),1022=>array(68,-14,524,742),1023=>array(68,-14,524,742),1024=>array(96,0,538,927),1025=>array(96,0,538,913),1026=>array(-32,-229,554,730),1027=>array(105,0,556,927),1028=>array(68,-14,524,742),1029=>array(68,-14,536,742),1030=>array(98,0,503,729),1031=>array(98,0,503,913),1032=>array(53,-14,467,729),1033=>array(-9,0,597,729),1034=>array(17,0,597,729),1035=>array(-32,0,554,730),1036=>array(67,0,598,927),1037=>array(68,0,534,927),1038=>array(51,0,563,928),1039=>array(67,-157,535,729),1040=>array(18,0,584,729),1041=>array(81,0,555,729),1042=>array(81,0,555,729),1043=>array(105,0,556,729),1044=>array(16,-157,586,729),1045=>array(96,0,538,729),1046=>array(7,0,595,729),1047=>array(67,-14,527,742),1048=>array(68,0,534,729),1049=>array(68,0,534,928),1050=>array(67,0,598,729),1051=>array(2,0,534,729),1052=>array(42,0,559,729),1053=>array(67,0,535,729),1054=>array(57,-14,545,742),1055=>array(67,0,535,729),1056=>array(96,0,557,729),1057=>array(68,-14,524,742),1058=>array(23,0,579,729),1059=>array(51,0,563,729),1060=>array(32,0,570,729),1061=>array(9,0,593,729),1062=>array(39,-157,573,729),1063=>array(67,0,533,729),1064=>array(56,0,547,729),1065=>array(29,-157,586,729),1066=>array(16,0,557,729),1067=>array(32,0,554,729),1068=>array(96,0,557,729),1069=>array(68,-14,524,742),1070=>array(29,-14,573,742),1071=>array(37,0,553,729),1072=>array(65,-14,517,560),1073=>array(61,-14,535,777),1074=>array(102,0,500,547),1075=>array(125,0,493,547),1076=>array(51,-140,551,547),1077=>array(60,-14,543,560),1078=>array(29,0,574,547),1079=>array(83,-11,520,560),1080=>array(95,0,513,547),1081=>array(95,0,513,785),1082=>array(115,0,587,547),1083=>array(15,0,513,547),1084=>array(30,0,576,547),1085=>array(95,0,513,547),1086=>array(67,-14,535,560),1087=>array(95,0,513,547),1088=>array(93,-208,541,560),1089=>array(95,-14,518,560),1090=>array(110,0,503,547),1091=>array(51,-208,563,547),1092=>array(48,-208,549,760),1093=>array(37,0,565,547),1094=>array(61,-140,546,547),1095=>array(95,0,513,548),1096=>array(61,0,542,547),1097=>array(39,-140,590,547),1098=>array(15,0,568,547),1099=>array(51,0,551,547),1100=>array(95,0,527,547),1101=>array(95,-14,518,560),1102=>array(38,-14,570,560),1103=>array(82,0,480,547),1104=>array(60,-14,543,803),1105=>array(60,-14,543,718),1106=>array(17,-208,541,760),1107=>array(125,0,505,803),1108=>array(95,-14,518,560),1109=>array(104,-14,503,560),1110=>array(87,0,533,760),1111=>array(87,0,533,758),1112=>array(91,-208,383,760),1113=>array(5,0,599,547),1114=>array(32,0,577,547),1115=>array(17,0,528,760),1116=>array(115,0,587,803),1117=>array(95,0,513,803),1118=>array(51,-208,563,785),1119=>array(95,-140,513,547),1122=>array(16,0,557,729),1123=>array(15,0,568,760),1138=>array(57,-14,545,742),1139=>array(67,-14,535,560),1168=>array(105,0,556,878),1169=>array(125,0,493,700),1170=>array(42,0,556,729),1171=>array(62,0,493,547),1172=>array(105,-200,556,729),1173=>array(125,-208,540,547),1174=>array(7,-157,595,729),1175=>array(29,-140,585,547),1176=>array(67,-193,527,742),1177=>array(83,-193,520,560),1178=>array(67,-157,598,729),1179=>array(115,-140,587,547),1186=>array(15,-157,587,729),1187=>array(48,-140,561,547),1188=>array(55,0,590,729),1189=>array(61,0,585,547),1194=>array(68,-193,524,742),1195=>array(95,-193,518,560),1196=>array(23,-157,579,729),1197=>array(110,-140,503,547),1198=>array(18,0,584,729),1199=>array(45,-208,557,547),1200=>array(18,0,584,729),1201=>array(45,-208,557,547),1202=>array(9,-157,593,729),1203=>array(37,-140,565,547),1210=>array(68,0,535,730),1211=>array(95,0,513,760),1216=>array(98,0,503,729),1217=>array(7,0,595,928),1218=>array(29,0,574,785),1219=>array(67,-200,590,729),1220=>array(115,-208,553,547),1223=>array(67,-200,535,729),1224=>array(95,-208,513,547),1227=>array(68,-157,535,730),1228=>array(95,-140,513,548),1231=>array(222,0,312,765),1232=>array(18,0,584,928),1233=>array(65,-14,517,785),1234=>array(18,0,584,913),1235=>array(65,-14,517,758),1236=>array(0,0,576,729),1237=>array(20,-14,586,560),1238=>array(96,0,538,928),1239=>array(60,-14,543,785),1240=>array(57,-14,545,742),1241=>array(60,-14,542,560),1242=>array(57,-14,545,913),1243=>array(60,-14,542,758),1244=>array(7,0,595,913),1245=>array(29,0,574,758),1246=>array(67,-14,527,913),1247=>array(83,-11,520,758),1248=>array(13,-14,589,729),1249=>array(61,-213,541,547),1250=>array(68,0,534,898),1251=>array(95,0,513,745),1252=>array(68,0,534,913),1253=>array(95,0,513,758),1254=>array(57,-14,545,913),1255=>array(67,-14,535,758),1256=>array(57,-14,545,742),1257=>array(67,-14,535,560),1258=>array(57,-14,545,913),1259=>array(67,-14,535,758),1260=>array(68,-14,524,913),1261=>array(95,-14,518,758),1262=>array(51,0,563,898),1263=>array(51,-208,563,745),1264=>array(51,0,563,913),1265=>array(51,-208,563,758),1266=>array(51,0,563,927),1267=>array(51,-208,563,800),1268=>array(67,0,533,913),1269=>array(95,0,513,758),1270=>array(105,-157,556,729),1271=>array(125,-140,493,547),1272=>array(32,0,554,913),1273=>array(51,0,551,758),1296=>array(67,-14,527,742),1297=>array(83,-11,520,560),1306=>array(57,-132,545,742),1307=>array(67,-210,515,558),1308=>array(0,0,602,729),1309=>array(0,0,602,547),1329=>array(58,-29,544,729),1330=>array(63,0,539,742),1331=>array(42,0,561,742),1332=>array(26,0,576,742),1333=>array(63,-14,539,729),1334=>array(47,0,555,742),1335=>array(59,0,543,729),1336=>array(63,0,539,743),1337=>array(21,-14,581,742),1338=>array(42,-14,561,729),1339=>array(72,0,530,729),1340=>array(75,0,526,729),1341=>array(45,-14,557,729),1342=>array(26,-14,575,742),1343=>array(72,0,530,729),1344=>array(44,-26,558,729),1345=>array(46,-23,556,742),1346=>array(26,0,576,742),1347=>array(42,0,560,742),1348=>array(26,-14,576,729),1349=>array(31,-14,571,742),1350=>array(26,-14,576,729),1351=>array(47,-14,555,729),1352=>array(72,0,530,743),1353=>array(47,-28,555,742),1354=>array(32,0,570,742),1355=>array(47,0,555,742),1356=>array(26,0,576,742),1357=>array(72,-14,530,729),1358=>array(16,0,585,729),1359=>array(51,-14,550,742),1360=>array(72,0,530,743),1361=>array(31,-14,571,742),1362=>array(66,0,536,729),1363=>array(34,0,567,729),1364=>array(25,0,577,742),1365=>array(57,-14,545,742),1366=>array(35,-14,567,729),1369=>array(234,492,368,760),1370=>array(229,499,373,729),1371=>array(185,620,418,803),1372=>array(110,618,492,893),1373=>array(184,616,418,800),1374=>array(87,613,515,885),1375=>array(92,618,510,760),1377=>array(50,-13,551,547),1378=>array(89,-208,512,560),1379=>array(36,-208,566,558),1380=>array(56,-208,546,560),1381=>array(80,-14,522,760),1382=>array(36,-208,566,558),1383=>array(101,0,500,760),1384=>array(89,-208,512,560),1385=>array(32,-208,569,560),1386=>array(36,-14,566,760),1387=>array(92,-208,510,760),1388=>array(160,-208,442,547),1389=>array(51,-208,551,760),1390=>array(67,-14,535,771),1391=>array(92,-208,510,760),1392=>array(92,0,510,760),1393=>array(83,-15,518,760),1394=>array(56,-208,546,560),1395=>array(78,-14,524,760),1396=>array(51,-14,551,760),1397=>array(155,-208,447,547),1398=>array(51,-14,551,760),1399=>array(84,-208,517,561),1400=>array(92,0,510,560),1401=>array(118,-208,483,571),1402=>array(50,-208,551,547),1403=>array(82,-208,520,561),1404=>array(64,0,538,560),1405=>array(92,-14,510,546),1406=>array(50,-208,552,760),1407=>array(51,-13,551,560),1408=>array(92,-208,510,560),1409=>array(77,-215,525,560),1410=>array(122,0,480,547),1411=>array(51,-208,551,760),1412=>array(42,-208,560,560),1413=>array(67,-14,535,560),1414=>array(20,-208,582,760),1415=>array(35,-14,566,760),1417=>array(250,0,353,415),1418=>array(174,205,428,314),1542=>array(24,-19,573,892),1543=>array(24,-19,573,895),1545=>array(44,0,558,635),1546=>array(0,0,602,635),1548=>array(229,0,373,240),1557=>array(174,624,428,868),1563=>array(229,0,373,633),1567=>array(106,0,496,742),1569=>array(212,42,522,483),1570=>array(125,0,477,939),1571=>array(217,0,385,999),1572=>array(37,-244,525,588),1573=>array(217,-244,385,760),1574=>array(12,-131,602,544),1575=>array(256,0,346,760),1576=>array(34,-152,586,263),1577=>array(108,-28,494,513),1578=>array(34,-10,586,391),1579=>array(34,-10,586,513),1580=>array(43,-244,584,425),1581=>array(43,-244,584,425),1582=>array(43,-244,584,586),1583=>array(113,-19,488,427),1584=>array(113,-19,488,598),1585=>array(-25,-246,533,267),1586=>array(-25,-246,533,464),1587=>array(-107,-240,574,366),1588=>array(-107,-240,574,586),1589=>array(-117,-240,594,320),1590=>array(-117,-240,594,413),1591=>array(5,0,580,760),1592=>array(5,0,580,760),1593=>array(60,-244,589,521),1594=>array(60,-244,589,659),1600=>array(-10,0,612,90),1601=>array(-36,-45,568,600),1602=>array(15,-189,557,635),1603=>array(4,-27,578,760),1604=>array(33,-152,537,760),1605=>array(63,-240,541,369),1606=>array(26,-162,569,422),1607=>array(108,-28,494,358),1608=>array(37,-244,525,315),1609=>array(12,-131,602,389),1610=>array(12,-244,602,389),1611=>array(158,591,443,825),1612=>array(158,591,443,874),1613=>array(158,-239,443,-5),1614=>array(158,591,443,708),1615=>array(158,590,443,874),1616=>array(158,-137,443,-20),1617=>array(148,599,453,869),1618=>array(167,610,435,878),1619=>array(125,590,477,719),1620=>array(217,593,385,808),1621=>array(217,-244,385,-29),1626=>array(170,616,433,775),1632=>array(247,220,354,342),1633=>array(198,0,404,635),1634=>array(75,0,527,635),1635=>array(65,0,537,635),1636=>array(115,-10,486,641),1637=>array(99,-10,504,643),1638=>array(75,0,527,635),1639=>array(62,0,540,635),1640=>array(62,0,540,635),1641=>array(79,0,523,640),1642=>array(98,0,505,635),1643=>array(151,-110,451,318),1644=>array(229,499,373,729),1645=>array(71,101,531,537),1652=>array(217,649,385,864),1657=>array(34,-10,586,575),1658=>array(34,-10,586,513),1659=>array(34,-244,586,263),1662=>array(34,-244,586,263),1663=>array(34,-10,586,513),1664=>array(34,-244,586,263),1667=>array(43,-244,584,425),1668=>array(43,-244,584,425),1670=>array(43,-244,584,425),1671=>array(43,-244,584,425),1681=>array(-25,-246,602,582),1688=>array(-25,-246,549,555),1700=>array(-36,-45,568,700),1705=>array(5,-43,670,760),1711=>array(5,-43,672,902),1726=>array(0,-33,572,487),1740=>array(12,-131,602,389),1776=>array(247,220,354,342),1777=>array(198,0,404,635),1778=>array(75,0,527,635),1779=>array(65,0,537,635),1780=>array(85,0,517,643),1781=>array(84,-5,518,643),1782=>array(129,0,473,640),1783=>array(62,0,540,635),1784=>array(62,0,540,635),1785=>array(79,0,523,640),3713=>array(30,-10,549,560),3714=>array(53,-17,585,568),3716=>array(59,-10,539,568),3719=>array(120,-238,482,568),3720=>array(61,-0,542,575),3722=>array(47,-238,598,563),3725=>array(56,-8,545,573),3732=>array(60,-14,542,560),3733=>array(73,-15,554,579),3734=>array(13,-240,530,560),3735=>array(52,-14,551,560),3737=>array(37,-14,541,568),3738=>array(61,-8,541,561),3739=>array(61,-8,541,760),3740=>array(48,-8,620,638),3741=>array(48,-8,548,760),3742=>array(49,-8,553,561),3743=>array(49,-8,553,760),3745=>array(8,-14,547,547),3746=>array(56,-8,545,760),3747=>array(49,-8,553,568),3749=>array(47,-8,555,568),3751=>array(54,-13,548,560),3754=>array(48,-8,642,701),3755=>array(10,-12,592,575),3757=>array(58,-8,552,568),3758=>array(42,-8,606,605),3759=>array(23,-106,583,579),3760=>array(44,-13,549,563),3761=>array(-558,639,-53,880),3762=>array(77,0,516,560),3763=>array(-404,0,516,806),3764=>array(41,615,562,926),3765=>array(41,612,634,926),3766=>array(41,615,562,926),3767=>array(41,612,634,926),3768=>array(226,-350,441,-38),3769=>array(184,-306,450,-40),3771=>array(34,639,568,880),3772=>array(-8,-278,610,-39),3784=>array(257,618,345,792),3785=>array(42,609,560,891),3786=>array(46,598,664,869),3787=>array(161,609,441,890),3788=>array(-8,636,610,875),3789=>array(198,620,404,806),4304=>array(78,0,525,560),4305=>array(77,0,525,761),4306=>array(54,-208,547,510),4307=>array(27,-208,575,505),4308=>array(78,-208,525,510),4309=>array(77,-208,524,510),4310=>array(77,0,524,760),4311=>array(27,0,575,505),4312=>array(78,0,524,510),4313=>array(77,-207,525,501),4314=>array(78,-208,524,510),4315=>array(77,0,525,760),4316=>array(78,0,524,748),4317=>array(27,0,575,505),4318=>array(78,0,525,757),4319=>array(78,-207,525,524),4320=>array(27,0,575,760),4321=>array(78,0,525,743),4322=>array(22,-207,580,614),4323=>array(27,-207,536,506),4324=>array(27,-208,577,505),4325=>array(78,-208,524,743),4326=>array(27,-208,575,506),4327=>array(77,-207,524,496),4328=>array(27,0,525,760),4329=>array(77,0,525,760),4330=>array(42,-207,560,518),4331=>array(77,0,525,743),4332=>array(79,0,576,760),4333=>array(78,-207,525,743),4334=>array(78,0,525,743),4335=>array(78,-207,525,605),4336=>array(77,0,525,760),4337=>array(58,-207,525,760),4338=>array(78,-131,525,511),4339=>array(78,-208,525,510),4340=>array(78,-208,525,760),4341=>array(68,0,561,760),4342=>array(27,-207,575,511),4343=>array(52,-207,550,511),4344=>array(79,-207,525,520),4345=>array(54,-208,548,518),4346=>array(78,-66,455,511),4347=>array(142,24,460,486),4348=>array(198,370,404,760),7426=>array(20,-14,586,560),7432=>array(83,-11,520,560),7433=>array(87,-211,533,549),7444=>array(7,-14,591,560),7446=>array(67,273,535,560),7447=>array(66,-14,535,273),7453=>array(21,1,581,419),7454=>array(31,-1,571,417),7455=>array(21,0,581,501),7468=>array(123,326,479,734),7469=>array(120,326,482,734),7470=>array(152,326,450,734),7472=>array(152,326,450,734),7473=>array(162,326,440,734),7474=>array(162,326,440,734),7475=>array(146,318,455,742),7476=>array(153,326,448,734),7477=>array(174,326,429,734),7478=>array(171,318,431,734),7479=>array(134,326,469,734),7480=>array(159,326,443,734),7481=>array(138,326,464,734),7482=>array(154,326,448,734),7483=>array(154,326,448,734),7484=>array(147,318,455,742),7486=>array(156,326,446,734),7487=>array(133,326,469,734),7488=>array(126,326,476,734),7489=>array(157,318,445,734),7490=>array(111,326,491,734),7491=>array(159,318,443,640),7492=>array(159,318,443,640),7493=>array(160,318,442,640),7494=>array(123,318,479,640),7495=>array(160,318,442,751),7496=>array(160,318,442,751),7497=>array(149,318,453,640),7498=>array(149,318,453,640),7499=>array(164,320,438,640),7500=>array(164,320,438,640),7501=>array(160,206,442,640),7502=>array(161,208,441,633),7503=>array(152,326,450,751),7504=>array(143,326,459,640),7505=>array(169,209,433,640),7506=>array(153,318,449,640),7507=>array(168,318,434,640),7508=>array(153,479,449,640),7509=>array(153,318,449,479),7510=>array(160,209,442,640),7511=>array(163,326,439,719),7512=>array(169,318,433,632),7513=>array(125,327,478,561),7514=>array(143,326,459,640),7515=>array(142,326,460,632),7522=>array(160,0,441,425),7523=>array(200,0,402,314),7524=>array(169,-8,433,306),7525=>array(142,0,460,306),7543=>array(60,-215,509,560),7544=>array(153,326,448,734),7547=>array(76,0,526,547),7557=>array(78,-208,505,765),7579=>array(160,318,442,640),7580=>array(168,318,434,640),7581=>array(165,286,438,639),7582=>array(153,318,449,751),7583=>array(164,320,438,640),7584=>array(167,326,435,751),7585=>array(173,209,429,632),7586=>array(160,206,442,631),7587=>array(169,208,433,632),7588=>array(158,326,444,751),7589=>array(172,326,430,632),7590=>array(161,326,441,632),7591=>array(160,326,442,632),7592=>array(174,209,428,751),7593=>array(167,209,436,755),7594=>array(167,209,436,755),7595=>array(187,326,416,640),7596=>array(143,209,458,640),7597=>array(143,208,459,640),7598=>array(167,209,436,640),7599=>array(167,209,436,640),7600=>array(156,326,446,640),7601=>array(153,318,449,640),7602=>array(153,210,449,751),7603=>array(169,209,433,640),7604=>array(184,209,418,751),7605=>array(163,209,439,719),7606=>array(102,318,500,632),7607=>array(141,318,461,632),7609=>array(159,326,443,632),7610=>array(133,326,469,632),7611=>array(172,326,430,633),7612=>array(171,209,431,632),7613=>array(163,296,439,632),7614=>array(150,207,452,632),7615=>array(153,318,449,736),7680=>array(18,-245,584,729),7681=>array(65,-245,517,560),7682=>array(81,0,555,914),7683=>array(94,-14,543,760),7684=>array(81,-202,555,729),7685=>array(94,-202,543,760),7686=>array(81,-174,555,729),7687=>array(94,-174,543,760),7688=>array(68,-193,524,927),7689=>array(95,-193,518,800),7690=>array(67,0,540,914),7691=>array(60,-14,509,760),7692=>array(67,-202,540,729),7693=>array(60,-202,509,760),7694=>array(67,-174,540,729),7695=>array(60,-174,509,760),7696=>array(61,-193,540,729),7697=>array(60,-193,509,760),7698=>array(67,-237,540,729),7699=>array(60,-237,509,760),7704=>array(96,-237,538,729),7705=>array(60,-237,543,560),7706=>array(96,-237,538,729),7707=>array(60,-237,543,560),7708=>array(96,-193,538,928),7709=>array(60,-193,543,785),7710=>array(114,0,543,914),7711=>array(95,0,519,914),7712=>array(50,-14,539,898),7713=>array(60,-215,509,745),7714=>array(67,0,535,914),7715=>array(95,0,513,914),7716=>array(67,-202,535,729),7717=>array(95,-202,513,760),7718=>array(67,0,535,901),7719=>array(95,0,513,918),7720=>array(10,-193,535,729),7721=>array(27,-193,513,760),7722=>array(67,-238,535,729),7723=>array(95,-238,513,760),7724=>array(98,-237,503,729),7725=>array(87,-237,533,760),7728=>array(67,0,598,927),7729=>array(115,0,587,927),7730=>array(67,-202,598,729),7731=>array(115,-202,587,760),7732=>array(67,-174,598,729),7733=>array(115,-174,587,760),7734=>array(105,-202,556,729),7735=>array(78,-202,505,765),7736=>array(105,-202,556,898),7737=>array(78,-202,505,898),7738=>array(105,-174,556,729),7739=>array(78,-174,505,765),7740=>array(105,-237,556,729),7741=>array(78,-237,505,765),7742=>array(42,0,559,927),7743=>array(53,0,554,800),7744=>array(42,0,559,914),7745=>array(53,0,554,758),7746=>array(42,-202,559,729),7747=>array(53,-202,554,560),7748=>array(68,0,534,914),7749=>array(95,0,513,758),7750=>array(68,-202,534,729),7751=>array(95,-202,513,560),7752=>array(68,-174,534,729),7753=>array(95,-174,513,560),7754=>array(68,-237,534,729),7755=>array(95,-237,513,560),7756=>array(57,-14,545,997),7757=>array(67,-14,535,997),7764=>array(96,0,557,931),7765=>array(93,-208,541,800),7766=>array(96,0,557,914),7767=>array(93,-208,541,758),7768=>array(70,0,602,914),7769=>array(177,0,564,758),7770=>array(70,-202,602,729),7771=>array(177,-202,564,560),7772=>array(70,-202,602,898),7773=>array(155,-202,564,745),7774=>array(70,-174,602,729),7775=>array(155,-174,564,560),7776=>array(68,-14,536,914),7777=>array(104,-14,503,758),7778=>array(68,-202,536,742),7779=>array(104,-202,503,560),7784=>array(68,-202,536,914),7785=>array(104,-202,503,758),7786=>array(23,0,579,914),7787=>array(64,0,504,914),7788=>array(23,-202,579,729),7789=>array(64,-202,504,702),7790=>array(23,-174,579,729),7791=>array(64,-174,504,702),7792=>array(23,-237,579,729),7793=>array(64,-237,504,702),7794=>array(72,-201,530,729),7795=>array(95,-201,513,546),7796=>array(72,-237,530,729),7797=>array(95,-237,513,546),7798=>array(72,-237,530,729),7799=>array(95,-237,513,546),7800=>array(72,-14,530,997),7801=>array(95,-14,513,997),7804=>array(28,0,574,909),7805=>array(49,0,553,757),7806=>array(28,-202,574,729),7807=>array(49,-202,553,547),7808=>array(0,0,602,931),7809=>array(0,0,602,803),7810=>array(0,0,602,931),7811=>array(0,0,602,803),7812=>array(0,0,602,900),7813=>array(0,0,602,718),7814=>array(0,0,602,914),7815=>array(0,0,602,758),7816=>array(0,-202,602,729),7817=>array(0,-202,602,547),7818=>array(9,0,593,914),7819=>array(37,0,565,758),7820=>array(9,0,593,901),7821=>array(37,0,565,718),7822=>array(18,0,584,914),7823=>array(51,-208,563,758),7824=>array(76,0,571,932),7825=>array(99,0,508,803),7826=>array(76,-202,571,729),7827=>array(99,-202,508,548),7828=>array(76,-174,571,729),7829=>array(99,-174,508,548),7830=>array(95,-174,513,760),7831=>array(64,0,504,860),7832=>array(0,0,602,888),7833=>array(51,-208,563,888),7835=>array(95,0,519,914),7839=>array(67,-14,535,767),7840=>array(18,-202,584,729),7841=>array(65,-202,517,560),7852=>array(18,-202,584,932),7853=>array(65,-202,517,803),7856=>array(18,0,584,997),7857=>array(65,-14,517,954),7862=>array(18,-202,584,928),7863=>array(65,-202,517,760),7864=>array(96,-202,538,729),7865=>array(60,-202,543,560),7868=>array(96,0,538,921),7869=>array(60,-14,543,777),7878=>array(96,-202,538,932),7879=>array(60,-202,543,803),7882=>array(98,-202,503,729),7883=>array(87,-202,533,760),7884=>array(57,-202,545,742),7885=>array(67,-202,535,560),7896=>array(57,-202,545,932),7897=>array(67,-202,535,803),7898=>array(3,-14,582,927),7899=>array(16,-14,587,800),7900=>array(3,-14,582,927),7901=>array(16,-14,587,800),7904=>array(3,-14,582,921),7905=>array(16,-14,587,777),7906=>array(3,-202,582,760),7907=>array(16,-202,587,560),7908=>array(72,-202,530,729),7909=>array(95,-202,513,546),7912=>array(4,-14,598,927),7913=>array(19,-14,583,800),7914=>array(4,-14,598,927),7915=>array(19,-14,583,800),7918=>array(4,-14,598,921),7919=>array(19,-14,583,777),7920=>array(4,-202,598,762),7921=>array(19,-202,583,555),7922=>array(18,0,584,931),7923=>array(51,-208,563,803),7924=>array(18,-202,584,729),7925=>array(51,-208,563,547),7928=>array(18,0,584,921),7929=>array(51,-208,563,777),7936=>array(34,-12,573,806),7937=>array(34,-12,573,806),7938=>array(34,-12,573,806),7939=>array(34,-12,573,806),7940=>array(34,-12,573,806),7941=>array(34,-12,573,806),7942=>array(34,-12,573,977),7943=>array(34,-12,573,977),7944=>array(18,0,584,806),7945=>array(18,0,584,806),7946=>array(-198,0,584,806),7947=>array(-198,0,584,806),7948=>array(-112,0,584,806),7949=>array(-122,0,584,806),7950=>array(-31,0,584,977),7951=>array(-55,0,584,977),7952=>array(83,-11,520,806),7953=>array(83,-11,520,806),7954=>array(83,-11,520,806),7955=>array(83,-11,520,806),7956=>array(83,-11,520,806),7957=>array(83,-11,520,806),7960=>array(-63,0,538,806),7961=>array(-63,0,538,806),7962=>array(-308,0,538,806),7963=>array(-308,0,538,806),7964=>array(-247,0,538,806),7965=>array(-256,0,538,806),7968=>array(95,-208,513,806),7969=>array(95,-208,513,806),7970=>array(95,-208,513,806),7971=>array(95,-208,513,806),7972=>array(95,-208,515,806),7973=>array(95,-208,515,806),7974=>array(95,-208,513,977),7975=>array(95,-208,513,977),7976=>array(-88,0,535,806),7977=>array(-88,0,535,806),7978=>array(-344,0,535,806),7979=>array(-344,0,535,806),7980=>array(-295,0,535,806),7981=>array(-305,0,535,806),7982=>array(-202,0,535,977),7983=>array(-202,0,535,977),7984=>array(151,0,476,806),7985=>array(151,0,476,806),7986=>array(120,0,492,806),7987=>array(120,0,492,806),7988=>array(144,0,515,806),7989=>array(134,0,515,806),7990=>array(140,0,476,977),7991=>array(140,0,476,977),7992=>array(-63,0,503,806),7993=>array(-63,0,503,806),7994=>array(-295,0,503,806),7995=>array(-295,0,503,806),7996=>array(-247,0,503,806),7997=>array(-256,0,503,806),7998=>array(-165,0,503,977),7999=>array(-165,0,503,977),8000=>array(67,-14,535,806),8001=>array(67,-14,535,806),8002=>array(67,-14,535,806),8003=>array(67,-14,535,806),8004=>array(67,-14,535,806),8005=>array(67,-14,535,806),8008=>array(-27,-14,545,806),8009=>array(-63,-14,545,806),8010=>array(-308,-14,545,806),8011=>array(-308,-14,545,806),8012=>array(-173,-14,545,806),8013=>array(-183,-14,545,806),8016=>array(25,0,551,806),8017=>array(25,0,551,806),8018=>array(25,0,551,806),8019=>array(25,0,551,806),8020=>array(25,0,551,806),8021=>array(25,0,551,806),8022=>array(25,0,551,977),8023=>array(25,0,551,977),8025=>array(-137,0,584,806),8027=>array(-344,0,584,806),8029=>array(-342,0,584,806),8031=>array(-238,0,584,977),8032=>array(34,-14,568,806),8033=>array(34,-14,568,806),8034=>array(34,-14,568,806),8035=>array(34,-14,568,806),8036=>array(34,-14,568,806),8037=>array(34,-14,568,806),8038=>array(34,-14,568,977),8039=>array(34,-14,568,977),8040=>array(-27,0,566,806),8041=>array(-76,0,566,806),8042=>array(-308,0,566,806),8043=>array(-308,0,566,806),8044=>array(-161,0,566,806),8045=>array(-171,0,566,806),8046=>array(-128,0,566,977),8047=>array(-165,0,566,977),8048=>array(34,-12,573,800),8049=>array(34,-12,573,800),8050=>array(83,-11,520,800),8051=>array(83,-11,520,800),8052=>array(95,-208,513,800),8053=>array(95,-208,513,800),8054=>array(136,0,476,800),8055=>array(151,0,476,800),8056=>array(67,-14,535,800),8057=>array(67,-14,535,800),8058=>array(25,0,551,800),8059=>array(25,0,551,800),8060=>array(34,-14,568,800),8061=>array(34,-14,568,800),8064=>array(34,-208,573,806),8065=>array(34,-208,573,806),8066=>array(34,-208,573,806),8067=>array(34,-208,573,806),8068=>array(34,-208,573,806),8069=>array(34,-208,573,806),8070=>array(34,-208,573,977),8071=>array(34,-208,573,977),8072=>array(18,-208,584,806),8073=>array(18,-208,584,806),8074=>array(-198,-208,584,806),8075=>array(-198,-208,584,806),8076=>array(-112,-208,584,806),8077=>array(-122,-208,584,806),8078=>array(-31,-208,584,977),8079=>array(-55,-208,584,977),8080=>array(95,-208,513,806),8081=>array(95,-208,513,806),8082=>array(95,-208,513,806),8083=>array(95,-208,513,806),8084=>array(95,-208,515,806),8085=>array(95,-208,515,806),8086=>array(95,-208,513,977),8087=>array(95,-208,513,977),8088=>array(-88,-208,535,806),8089=>array(-88,-208,535,806),8090=>array(-344,-208,535,806),8091=>array(-344,-208,535,806),8092=>array(-295,-208,535,806),8093=>array(-305,-208,535,806),8094=>array(-202,-208,535,977),8095=>array(-202,-208,535,977),8096=>array(34,-208,568,806),8097=>array(34,-208,568,806),8098=>array(34,-208,568,806),8099=>array(34,-208,568,806),8100=>array(34,-208,568,806),8101=>array(34,-208,568,806),8102=>array(34,-208,568,977),8103=>array(34,-208,568,977),8104=>array(-27,-208,566,806),8105=>array(-76,-208,566,806),8106=>array(-308,-208,566,806),8107=>array(-308,-208,566,806),8108=>array(-161,-208,566,806),8109=>array(-171,-208,566,806),8110=>array(-128,-208,566,977),8111=>array(-165,-208,566,977),8112=>array(34,-12,573,785),8113=>array(34,-12,573,745),8114=>array(34,-208,573,800),8115=>array(34,-208,573,559),8116=>array(34,-208,573,800),8118=>array(34,-12,573,777),8119=>array(34,-208,573,777),8120=>array(18,0,584,928),8121=>array(18,0,584,898),8122=>array(-59,0,584,800),8123=>array(12,0,584,800),8124=>array(18,-208,584,729),8125=>array(242,595,360,806),8126=>array(265,-208,372,-45),8127=>array(242,595,360,806),8128=>array(140,639,462,777),8129=>array(140,659,462,943),8130=>array(95,-208,513,800),8131=>array(95,-208,513,560),8132=>array(95,-208,513,800),8134=>array(95,-208,513,777),8135=>array(95,-208,513,777),8136=>array(-181,0,538,800),8137=>array(-110,0,538,800),8138=>array(-206,0,535,800),8139=>array(-134,0,535,800),8140=>array(67,-208,535,729),8141=>array(120,595,492,806),8142=>array(144,595,515,806),8143=>array(140,595,462,977),8144=>array(148,0,476,785),8145=>array(151,0,476,745),8146=>array(136,0,476,980),8147=>array(151,0,476,980),8150=>array(140,0,476,777),8151=>array(140,0,476,943),8152=>array(98,0,503,928),8153=>array(98,0,503,898),8154=>array(-157,0,503,800),8155=>array(-110,0,503,800),8157=>array(120,595,492,806),8158=>array(134,595,515,806),8159=>array(140,595,462,977),8160=>array(25,0,551,785),8161=>array(25,0,551,745),8162=>array(25,0,551,980),8163=>array(25,0,551,980),8164=>array(93,-208,541,806),8165=>array(93,-208,541,806),8166=>array(25,0,551,777),8167=>array(25,0,551,943),8168=>array(18,0,584,928),8169=>array(18,0,584,898),8170=>array(-206,0,584,800),8171=>array(-195,0,584,800),8172=>array(-63,0,557,806),8173=>array(136,659,446,980),8174=>array(156,659,466,980),8175=>array(136,616,370,800),8178=>array(34,-208,568,800),8179=>array(34,-208,568,547),8180=>array(34,-208,568,800),8182=>array(34,-14,568,777),8183=>array(34,-208,568,777),8184=>array(-169,-14,545,800),8185=>array(-37,-14,545,800),8186=>array(-169,0,566,800),8187=>array(-24,0,566,800),8188=>array(36,-208,566,713),8189=>array(232,616,466,800),8190=>array(242,595,360,806),8208=>array(174,234,428,314),8209=>array(174,234,428,314),8210=>array(0,240,602,309),8211=>array(0,240,602,309),8212=>array(0,240,602,309),8213=>array(0,240,602,309),8214=>array(139,-236,462,764),8215=>array(0,-236,602,-80),8216=>array(226,472,397,760),8217=>array(226,472,397,760),8218=>array(197,-140,368,148),8219=>array(226,472,397,760),8220=>array(103,472,499,760),8221=>array(103,472,498,760),8222=>array(103,-140,498,148),8223=>array(103,472,498,760),8224=>array(79,-96,523,729),8225=>array(79,-96,523,729),8226=>array(156,227,446,516),8227=>array(156,188,485,555),8230=>array(39,0,562,149),8240=>array(0,0,602,699),8241=>array(0,0,602,699),8242=>array(209,547,393,729),8243=>array(136,547,466,729),8244=>array(63,547,539,729),8245=>array(209,547,393,729),8246=>array(136,547,466,729),8247=>array(63,547,539,729),8249=>array(169,69,398,517),8250=>array(205,69,434,517),8252=>array(102,0,501,729),8253=>array(119,0,508,742),8254=>array(0,716,602,755),8261=>array(226,-132,433,760),8262=>array(169,-132,376,760),8263=>array(16,0,586,742),8264=>array(16,0,501,742),8265=>array(102,0,586,742),8267=>array(99,-96,550,729),8304=>array(155,319,448,742),8305=>array(160,326,441,751),8308=>array(131,326,444,734),8309=>array(156,319,436,734),8310=>array(161,319,454,742),8311=>array(155,326,440,734),8312=>array(154,318,448,741),8313=>array(148,319,441,742),8314=>array(139,357,464,646),8315=>array(139,479,464,525),8316=>array(139,422,464,581),8317=>array(230,252,372,751),8318=>array(230,252,372,751),8319=>array(157,326,445,640),8320=>array(155,-7,448,416),8321=>array(168,0,447,408),8322=>array(157,0,436,416),8323=>array(159,-7,451,416),8324=>array(131,0,444,408),8325=>array(156,-7,436,408),8326=>array(161,-7,454,416),8327=>array(155,0,440,408),8328=>array(154,-8,448,415),8329=>array(148,-7,441,416),8330=>array(139,31,464,320),8331=>array(139,152,464,199),8332=>array(139,96,464,254),8333=>array(230,-74,372,425),8334=>array(230,-74,372,425),8336=>array(159,-8,443,313),8337=>array(149,-8,453,313),8338=>array(153,-8,449,313),8339=>array(134,0,468,306),8340=>array(149,-8,453,313),8341=>array(157,0,445,426),8342=>array(152,0,450,425),8343=>array(167,0,436,429),8344=>array(143,0,459,313),8345=>array(157,0,445,314),8346=>array(160,-117,442,313),8347=>array(169,0,433,322),8348=>array(163,0,439,393),8352=>array(5,-11,600,737),8353=>array(60,-44,548,778),8354=>array(46,-14,543,742),8355=>array(0,0,533,729),8356=>array(68,0,553,742),8357=>array(53,-93,554,640),8358=>array(0,0,602,729),8359=>array(5,-14,600,729),8360=>array(5,-14,598,729),8361=>array(0,0,602,729),8362=>array(21,-14,582,729),8363=>array(60,-174,602,760),8364=>array(18,-14,518,742),8365=>array(21,0,582,729),8366=>array(23,0,579,729),8367=>array(15,-222,597,742),8368=>array(22,-14,569,742),8369=>array(52,0,602,729),8370=>array(26,-81,567,809),8371=>array(19,0,583,729),8372=>array(0,-14,602,742),8373=>array(63,-147,539,760),8376=>array(23,0,579,729),8377=>array(51,0,555,729),8450=>array(68,-14,524,742),8453=>array(3,-24,602,752),8461=>array(28,0,577,729),8462=>array(41,0,535,760),8463=>array(41,0,535,760),8469=>array(36,0,565,729),8470=>array(5,0,597,729),8471=>array(0,61,602,663),8473=>array(32,0,575,729),8474=>array(8,-129,592,742),8477=>array(18,0,592,729),8482=>array(0,447,550,729),8484=>array(23,0,575,729),8486=>array(36,0,566,713),8490=>array(67,0,598,729),8491=>array(18,0,584,928),8494=>array(5,-12,597,647),8520=>array(13,0,469,760),8531=>array(13,-139,549,810),8532=>array(13,-139,549,818),8533=>array(13,-139,544,810),8534=>array(13,-139,544,818),8535=>array(13,-139,544,818),8536=>array(5,-139,544,810),8537=>array(13,-139,552,810),8538=>array(13,-139,552,810),8539=>array(13,-140,546,810),8540=>array(13,-140,546,818),8541=>array(13,-140,546,810),8542=>array(13,-140,546,810),8543=>array(13,246,544,810),8592=>array(32,112,570,436),8593=>array(139,0,463,538),8594=>array(32,112,570,436),8595=>array(139,0,463,538),8596=>array(32,112,570,436),8597=>array(139,0,463,538),8598=>array(90,0,512,422),8599=>array(90,0,512,422),8600=>array(90,0,512,422),8601=>array(90,0,512,422),8602=>array(32,112,570,436),8603=>array(32,112,570,436),8604=>array(43,193,559,422),8605=>array(43,193,559,422),8606=>array(32,112,570,436),8607=>array(139,0,463,538),8608=>array(32,112,570,436),8609=>array(139,0,463,538),8610=>array(32,112,570,436),8611=>array(32,112,570,436),8612=>array(32,112,570,436),8613=>array(139,0,463,538),8614=>array(32,112,570,436),8615=>array(139,0,463,538),8616=>array(139,0,463,538),8617=>array(32,112,570,517),8618=>array(32,112,570,517),8619=>array(32,112,570,517),8620=>array(32,112,570,517),8621=>array(32,112,570,436),8622=>array(32,102,570,446),8623=>array(55,0,547,698),8624=>array(89,0,513,674),8625=>array(89,0,513,674),8626=>array(89,0,513,674),8627=>array(89,0,513,674),8628=>array(91,0,511,540),8629=>array(31,0,571,420),8630=>array(40,168,563,487),8631=>array(40,168,563,487),8632=>array(24,0,578,513),8633=>array(32,0,570,604),8634=>array(43,0,559,497),8635=>array(43,0,559,497),8636=>array(32,234,570,436),8637=>array(32,112,570,314),8638=>array(261,0,463,538),8639=>array(139,0,341,538),8640=>array(32,234,570,436),8641=>array(32,112,570,314),8642=>array(261,0,463,538),8643=>array(160,0,362,538),8644=>array(32,0,570,561),8645=>array(21,0,582,538),8646=>array(32,0,570,561),8647=>array(32,0,570,561),8648=>array(21,0,582,538),8649=>array(32,0,570,561),8650=>array(21,0,582,538),8651=>array(32,32,570,516),8652=>array(32,32,570,516),8653=>array(32,112,570,436),8654=>array(32,112,570,460),8655=>array(32,112,570,436),8656=>array(32,112,570,436),8657=>array(139,0,463,538),8658=>array(32,112,570,436),8659=>array(139,0,463,538),8660=>array(32,112,570,436),8661=>array(139,0,463,538),8662=>array(76,-28,526,422),8663=>array(76,-28,526,422),8664=>array(76,0,526,451),8665=>array(76,0,526,451),8666=>array(32,112,570,436),8667=>array(32,112,570,436),8668=>array(32,112,570,436),8669=>array(32,112,570,436),8670=>array(139,0,463,538),8671=>array(139,0,463,538),8672=>array(32,112,570,436),8673=>array(139,0,463,538),8674=>array(32,112,570,436),8675=>array(139,0,463,538),8676=>array(32,112,570,436),8677=>array(32,112,570,436),8678=>array(12,92,570,456),8679=>array(119,0,483,558),8680=>array(32,92,590,456),8681=>array(119,0,483,558),8682=>array(119,0,483,558),8683=>array(119,0,483,558),8684=>array(119,0,483,558),8685=>array(119,0,483,558),8686=>array(119,0,483,558),8687=>array(119,0,483,558),8688=>array(32,92,590,456),8689=>array(34,0,568,534),8690=>array(34,0,568,534),8691=>array(119,0,483,558),8692=>array(32,112,570,436),8693=>array(21,0,582,538),8694=>array(32,-125,570,672),8695=>array(32,112,570,436),8696=>array(32,112,570,436),8697=>array(32,112,570,436),8698=>array(32,112,570,436),8699=>array(32,112,570,436),8700=>array(32,112,570,436),8701=>array(12,92,570,456),8702=>array(32,92,590,456),8703=>array(12,92,590,456),8704=>array(18,0,584,729),8705=>array(57,-14,545,742),8706=>array(89,-14,513,662),8707=>array(87,0,514,729),8708=>array(87,-46,514,776),8709=>array(36,48,567,580),8710=>array(-3,0,606,695),8711=>array(-3,0,606,695),8712=>array(63,0,539,715),8713=>array(63,-86,539,801),8714=>array(63,81,539,545),8715=>array(63,0,539,715),8716=>array(63,-86,539,801),8717=>array(63,81,539,545),8719=>array(74,-213,528,741),8721=>array(70,-213,530,741),8722=>array(43,272,559,355),8723=>array(43,0,559,572),8725=>array(50,-93,527,729),8727=>array(81,85,521,542),8728=>array(146,160,456,470),8729=>array(156,200,446,489),8730=>array(29,-19,578,828),8731=>array(29,-19,578,933),8732=>array(29,-19,578,924),8733=>array(91,122,511,492),8734=>array(20,122,582,492),8735=>array(61,140,541,620),8736=>array(61,140,541,620),8743=>array(80,0,521,579),8744=>array(80,0,521,579),8745=>array(80,0,521,579),8746=>array(80,0,521,579),8747=>array(63,-183,539,871),8748=>array(31,-189,571,877),8749=>array(26,-176,577,864),8756=>array(91,65,512,564),8757=>array(92,65,510,564),8758=>array(238,65,363,564),8759=>array(91,65,512,564),8760=>array(43,272,559,564),8761=>array(36,65,566,564),8762=>array(42,65,561,564),8763=>array(43,65,559,564),8764=>array(43,243,559,384),8765=>array(43,243,559,384),8769=>array(43,85,559,535),8770=>array(43,149,559,454),8771=>array(43,172,559,470),8772=>array(43,48,560,604),8773=>array(43,94,559,570),8774=>array(43,24,559,570),8775=>array(43,0,559,647),8776=>array(43,149,559,470),8777=>array(43,23,559,595),8778=>array(43,94,559,572),8779=>array(43,73,559,572),8780=>array(43,94,559,570),8781=>array(42,108,559,519),8782=>array(43,33,560,593),8783=>array(43,172,560,593),8784=>array(43,172,559,637),8785=>array(43,-11,559,637),8786=>array(43,-10,559,637),8787=>array(42,-10,560,637),8788=>array(36,147,566,479),8789=>array(36,147,566,479),8790=>array(43,172,559,454),8791=>array(43,172,559,760),8792=>array(43,172,559,662),8793=>array(43,172,559,783),8794=>array(43,172,559,783),8795=>array(43,172,559,831),8796=>array(43,172,559,836),8797=>array(34,172,568,764),8798=>array(43,172,559,760),8799=>array(43,172,559,856),8800=>array(43,18,559,608),8801=>array(43,94,559,532),8802=>array(43,5,559,622),8803=>array(43,0,559,616),8804=>array(43,0,559,531),8805=>array(43,0,559,531),8806=>array(42,-84,558,578),8807=>array(42,-84,558,578),8808=>array(42,-162,558,578),8809=>array(42,-162,558,578),8813=>array(42,0,559,627),8814=>array(43,-14,559,641),8815=>array(43,-14,559,641),8816=>array(43,-119,559,629),8817=>array(43,-119,559,629),8818=>array(42,-21,558,531),8819=>array(42,-21,558,531),8820=>array(42,-119,558,629),8821=>array(42,-119,558,629),8822=>array(42,-89,558,603),8823=>array(42,-89,558,603),8824=>array(42,-195,558,711),8825=>array(42,-195,558,711),8826=>array(42,-22,558,648),8827=>array(43,-22,559,648),8828=>array(42,-123,558,711),8829=>array(42,-123,558,711),8830=>array(42,-56,558,711),8831=>array(42,-56,558,711),8832=>array(42,-81,558,707),8833=>array(42,-81,558,707),8834=>array(43,80,559,546),8835=>array(43,80,559,546),8836=>array(43,-29,559,655),8837=>array(43,-29,559,655),8838=>array(43,0,559,625),8839=>array(43,0,559,625),8840=>array(43,-104,559,729),8841=>array(43,-104,559,729),8842=>array(43,-102,559,625),8843=>array(43,-102,559,625),8847=>array(43,58,559,568),8848=>array(43,58,559,568),8849=>array(43,7,559,619),8850=>array(43,7,559,619),8853=>array(39,51,563,577),8854=>array(39,51,563,577),8855=>array(39,51,563,577),8856=>array(39,51,563,577),8857=>array(39,51,563,577),8858=>array(39,51,563,577),8859=>array(39,51,563,577),8860=>array(39,51,563,577),8861=>array(39,51,563,577),8862=>array(39,51,564,576),8863=>array(39,51,564,576),8864=>array(39,51,564,576),8865=>array(39,51,564,576),8866=>array(43,0,559,627),8867=>array(43,0,559,627),8868=>array(43,0,559,627),8869=>array(43,0,559,627),8901=>array(239,273,362,422),8902=>array(129,201,473,527),8909=>array(43,172,559,470),8922=>array(43,-218,559,760),8923=>array(43,-218,559,760),8924=>array(42,0,558,531),8925=>array(43,0,559,531),8926=>array(42,-123,558,711),8927=>array(42,-123,558,711),8928=>array(42,-182,558,770),8929=>array(42,-182,558,770),8930=>array(43,-81,559,707),8931=>array(43,-81,559,707),8932=>array(43,-95,559,619),8933=>array(43,-95,559,619),8934=>array(42,-134,558,531),8935=>array(42,-134,558,531),8936=>array(42,-213,558,711),8937=>array(42,-213,558,711),8943=>array(39,239,562,388),8960=>array(36,48,567,580),8961=>array(56,162,540,443),8962=>array(71,0,531,596),8963=>array(71,406,530,746),8964=>array(71,-132,530,209),8965=>array(71,0,530,444),8966=>array(71,0,530,566),8968=>array(226,-132,433,760),8969=>array(169,-132,376,760),8970=>array(226,-132,433,760),8971=>array(169,-132,376,760),8972=>array(268,73,585,408),8973=>array(6,73,324,408),8974=>array(268,352,585,687),8975=>array(6,352,324,687),8976=>array(43,181,559,421),8977=>array(47,126,555,634),8978=>array(3,211,599,512),8979=>array(3,211,599,512),8980=>array(90,168,512,512),8981=>array(81,112,510,539),8984=>array(35,114,567,646),8985=>array(43,181,559,421),8988=>array(146,352,463,687),8989=>array(139,352,456,687),8990=>array(146,-56,463,279),8991=>array(139,-56,456,279),8992=>array(250,-250,537,928),8993=>array(61,-237,347,942),8997=>array(51,114,551,598),8998=>array(3,145,599,536),8999=>array(61,145,541,536),9000=>array(24,212,578,517),9003=>array(3,145,599,536),9013=>array(35,-22,566,286),9015=>array(125,-100,477,829),9016=>array(3,-100,599,829),9017=>array(3,-100,599,829),9018=>array(3,-100,599,829),9019=>array(3,-100,599,829),9020=>array(3,-100,599,829),9021=>array(3,-171,599,900),9022=>array(3,57,599,658),9025=>array(3,-100,599,829),9026=>array(3,-100,599,829),9027=>array(3,-100,599,829),9028=>array(3,-100,599,829),9031=>array(3,-100,599,829),9032=>array(3,-100,599,829),9033=>array(3,-29,599,729),9035=>array(18,-171,584,900),9036=>array(3,-100,599,829),9037=>array(3,-100,599,829),9040=>array(3,-100,599,829),9042=>array(18,-171,584,900),9043=>array(3,-100,599,829),9044=>array(3,-100,599,829),9047=>array(3,-100,599,829),9048=>array(125,-100,477,729),9049=>array(3,-100,599,729),9050=>array(3,-100,599,656),9051=>array(125,-100,477,489),9052=>array(3,-100,599,658),9054=>array(3,-100,599,829),9055=>array(-10,44,612,671),9056=>array(3,-100,599,829),9059=>array(129,201,473,636),9060=>array(156,229,446,660),9061=>array(3,57,599,831),9064=>array(43,240,559,660),9065=>array(43,69,559,660),9067=>array(18,0,584,729),9068=>array(43,-14,559,742),9069=>array(43,-171,559,900),9070=>array(125,-140,477,519),9071=>array(3,-100,599,829),9072=>array(3,-100,599,829),9075=>array(151,0,476,547),9076=>array(93,-208,541,560),9077=>array(34,-14,568,547),9078=>array(3,-100,599,559),9079=>array(76,-100,526,560),9080=>array(125,-100,477,547),9081=>array(3,-100,599,547),9082=>array(34,-12,573,559),9085=>array(13,-228,589,88),9088=>array(35,-22,566,528),9089=>array(3,106,599,528),9090=>array(3,106,599,528),9091=>array(3,177,599,567),9096=>array(40,27,562,601),9097=>array(34,46,567,579),9098=>array(34,46,567,579),9099=>array(34,46,567,579),9109=>array(3,-100,599,829),9115=>array(137,-258,465,940),9116=>array(137,-252,232,942),9117=>array(137,-240,465,942),9118=>array(137,-258,465,940),9119=>array(370,-252,465,942),9120=>array(137,-240,465,942),9121=>array(137,-252,465,928),9122=>array(137,-252,232,942),9123=>array(137,-240,465,942),9124=>array(137,-252,465,928),9125=>array(370,-252,465,935),9126=>array(137,-240,465,935),9127=>array(256,-261,594,928),9128=>array(8,-252,347,940),9129=>array(256,-240,594,940),9130=>array(256,-256,347,943),9131=>array(8,-261,346,928),9132=>array(255,-252,594,940),9133=>array(8,-240,346,940),9134=>array(250,-250,347,942),9166=>array(12,92,570,558),9167=>array(3,0,599,596),9251=>array(73,-228,528,88),9472=>array(-10,242,612,326),9473=>array(-10,200,612,368),9474=>array(262,-302,340,973),9475=>array(223,-302,379,973),9476=>array(-10,242,612,326),9477=>array(-10,200,612,368),9478=>array(262,-302,340,973),9479=>array(223,-302,379,973),9480=>array(-10,242,612,326),9481=>array(-10,200,612,368),9482=>array(262,-302,340,973),9483=>array(223,-302,379,973),9484=>array(262,-302,612,326),9485=>array(262,-302,612,368),9486=>array(223,-302,612,326),9487=>array(223,-302,612,368),9488=>array(-10,-302,340,326),9489=>array(-10,-302,340,368),9490=>array(-10,-302,379,326),9491=>array(-10,-302,379,368),9492=>array(262,242,612,973),9493=>array(262,200,612,973),9494=>array(223,242,612,973),9495=>array(223,200,612,973),9496=>array(-10,242,340,973),9497=>array(-10,200,340,973),9498=>array(-10,242,379,973),9499=>array(-10,200,379,973),9500=>array(262,-302,612,973),9501=>array(262,-302,612,973),9502=>array(223,-302,612,973),9503=>array(223,-302,612,973),9504=>array(223,-302,612,973),9505=>array(223,-302,612,973),9506=>array(223,-302,612,973),9507=>array(223,-302,612,973),9508=>array(-10,-302,340,973),9509=>array(-10,-302,340,973),9510=>array(-10,-302,379,973),9511=>array(-10,-302,379,973),9512=>array(-10,-302,379,973),9513=>array(-10,-302,379,973),9514=>array(-10,-302,379,973),9515=>array(-10,-302,379,973),9516=>array(-10,-302,612,326),9517=>array(-10,-302,612,368),9518=>array(-10,-302,612,368),9519=>array(-10,-302,612,368),9520=>array(-10,-302,612,326),9521=>array(-10,-302,612,368),9522=>array(-10,-302,612,368),9523=>array(-10,-302,612,368),9524=>array(-10,242,612,973),9525=>array(-10,200,612,973),9526=>array(-10,200,612,973),9527=>array(-10,200,612,973),9528=>array(-10,242,612,973),9529=>array(-10,200,612,973),9530=>array(-10,200,612,973),9531=>array(-10,200,612,973),9532=>array(-10,-302,612,973),9533=>array(-10,-302,612,973),9534=>array(-10,-302,612,973),9535=>array(-10,-302,612,973),9536=>array(-10,-302,612,973),9537=>array(-10,-302,612,973),9538=>array(-10,-302,612,973),9539=>array(-10,-302,612,973),9540=>array(-10,-302,612,973),9541=>array(-10,-302,612,973),9542=>array(-10,-302,612,973),9543=>array(-10,-302,612,973),9544=>array(-10,-302,612,973),9545=>array(-10,-302,612,973),9546=>array(-10,-302,612,973),9547=>array(-10,-302,612,973),9548=>array(-10,242,612,326),9549=>array(-10,200,612,368),9550=>array(262,-302,340,973),9551=>array(223,-302,379,973),9552=>array(-10,158,612,410),9553=>array(184,-302,418,973),9554=>array(262,-302,612,410),9555=>array(184,-302,612,326),9556=>array(184,-302,612,410),9557=>array(-10,-302,340,410),9558=>array(-10,-302,418,326),9559=>array(-10,-302,418,410),9560=>array(262,158,612,973),9561=>array(184,242,612,973),9562=>array(184,158,612,973),9563=>array(-10,158,340,973),9564=>array(-10,242,418,973),9565=>array(-10,158,418,973),9566=>array(262,-302,612,973),9567=>array(184,-302,612,973),9568=>array(184,-302,612,973),9569=>array(-10,-302,340,973),9570=>array(-10,-302,418,973),9571=>array(-10,-302,418,973),9572=>array(-10,-302,612,410),9573=>array(-10,-302,612,326),9574=>array(-10,-302,612,410),9575=>array(-10,158,612,973),9576=>array(-10,242,612,973),9577=>array(-10,158,612,973),9578=>array(-10,-302,612,973),9579=>array(-10,-302,612,973),9580=>array(-10,-302,612,973),9581=>array(262,-302,612,326),9582=>array(-10,-302,340,326),9583=>array(-10,242,340,973),9584=>array(262,242,612,973),9585=>array(-53,-302,655,973),9586=>array(-53,-302,655,973),9587=>array(-53,-302,655,973),9588=>array(-10,242,311,326),9589=>array(262,284,340,973),9590=>array(311,242,612,326),9591=>array(262,-302,340,284),9592=>array(-10,200,311,368),9593=>array(223,284,379,973),9594=>array(311,200,612,368),9595=>array(223,-302,379,284),9596=>array(-10,200,612,368),9597=>array(223,-302,379,973),9598=>array(-10,200,612,368),9599=>array(223,-302,379,973),9600=>array(-10,260,612,770),9601=>array(-10,-250,612,-123),9602=>array(-10,-250,612,5),9603=>array(-10,-250,612,132),9604=>array(-10,-250,612,260),9605=>array(-10,-250,612,387),9606=>array(-10,-250,612,515),9607=>array(-10,-250,612,642),9608=>array(-10,-250,612,770),9609=>array(-10,-250,534,770),9610=>array(-10,-250,457,770),9611=>array(-10,-250,379,770),9612=>array(-10,-250,301,770),9613=>array(-10,-250,223,770),9614=>array(-10,-250,146,770),9615=>array(-10,-250,68,770),9616=>array(301,-250,612,770),9617=>array(-10,-250,534,770),9618=>array(-10,-250,612,770),9619=>array(-10,-250,612,770),9620=>array(-10,642,612,770),9621=>array(534,-250,611,770),9622=>array(-10,-250,301,260),9623=>array(301,-250,612,260),9624=>array(-10,260,301,770),9625=>array(-10,-250,612,770),9626=>array(-10,-250,612,770),9627=>array(-10,-250,612,770),9628=>array(-10,-250,612,770),9629=>array(301,260,612,770),9630=>array(-10,-250,612,770),9631=>array(-10,-250,612,770),9632=>array(3,-39,599,558),9633=>array(3,-39,599,558),9634=>array(3,-39,599,558),9635=>array(3,-39,599,558),9636=>array(3,-39,599,558),9637=>array(3,-39,599,558),9638=>array(3,-39,599,558),9639=>array(3,-39,599,558),9640=>array(3,-39,599,558),9641=>array(3,-39,599,558),9642=>array(107,66,495,454),9643=>array(107,66,495,454),9644=>array(3,117,599,402),9645=>array(3,117,599,402),9646=>array(158,-39,444,558),9647=>array(158,-39,444,558),9648=>array(3,117,599,402),9649=>array(3,117,599,402),9650=>array(3,-39,599,558),9651=>array(3,-39,599,558),9652=>array(107,66,495,454),9653=>array(107,66,495,454),9654=>array(3,-39,599,558),9655=>array(3,-39,599,558),9656=>array(107,66,495,454),9657=>array(107,66,495,454),9658=>array(3,66,599,454),9659=>array(3,66,599,454),9660=>array(3,-39,599,558),9661=>array(3,-39,599,558),9662=>array(107,66,495,454),9663=>array(107,66,495,454),9664=>array(3,-39,599,558),9665=>array(3,-39,599,558),9666=>array(107,66,495,454),9667=>array(107,66,495,454),9668=>array(3,66,599,454),9669=>array(3,66,599,454),9670=>array(3,-39,599,558),9671=>array(3,-39,599,558),9672=>array(3,-39,599,558),9673=>array(3,-41,599,561),9674=>array(57,-233,545,807),9675=>array(3,-41,599,561),9676=>array(3,-41,599,561),9677=>array(3,-41,599,561),9678=>array(3,-41,599,561),9679=>array(3,-41,599,561),9680=>array(3,-41,599,561),9681=>array(3,-41,599,561),9682=>array(3,-41,599,561),9683=>array(3,-41,599,561),9684=>array(3,-41,599,561),9685=>array(3,-41,599,561),9686=>array(152,-41,450,561),9687=>array(152,-41,450,561),9688=>array(-10,-10,612,770),9689=>array(-10,-250,612,770),9690=>array(-10,260,612,770),9691=>array(-10,-250,612,260),9692=>array(152,260,450,561),9693=>array(152,260,450,561),9694=>array(152,-41,450,260),9695=>array(152,-41,450,260),9696=>array(3,260,599,561),9697=>array(3,-41,599,260),9698=>array(3,-39,599,558),9699=>array(3,-39,599,558),9700=>array(3,-39,599,558),9701=>array(3,-39,599,558),9702=>array(156,227,446,516),9703=>array(3,-39,599,558),9704=>array(3,-39,599,558),9705=>array(3,-39,599,558),9706=>array(3,-39,599,558),9707=>array(3,-39,599,558),9708=>array(3,-39,599,558),9709=>array(3,-39,599,558),9710=>array(3,-39,599,558),9711=>array(-10,-54,612,573),9712=>array(3,-39,599,558),9713=>array(3,-39,599,558),9714=>array(3,-39,599,558),9715=>array(3,-39,599,558),9716=>array(3,-41,599,561),9717=>array(3,-41,599,561),9718=>array(3,-41,599,561),9719=>array(3,-41,599,561),9720=>array(3,-39,599,558),9721=>array(3,-39,599,558),9722=>array(3,-39,599,558),9723=>array(47,6,554,513),9724=>array(47,6,554,513),9725=>array(85,44,516,475),9726=>array(85,44,516,475),9727=>array(3,-39,599,558),9728=>array(17,80,585,649),9729=>array(24,4,578,227),9730=>array(17,3,585,522),9731=>array(43,-3,559,708),9732=>array(14,23,588,681),9733=>array(28,7,574,525),9734=>array(28,10,574,528),9735=>array(98,2,504,729),9736=>array(29,0,573,731),9737=>array(21,3,581,563),9738=>array(7,2,595,639),9739=>array(9,-1,593,677),9740=>array(26,0,576,724),9741=>array(22,1,580,724),9742=>array(10,-0,592,598),9743=>array(4,5,598,598),9744=>array(54,2,548,504),9745=>array(48,-1,554,512),9746=>array(65,2,537,481),9747=>array(98,43,504,658),9748=>array(14,-2,588,651),9749=>array(38,3,564,688),9750=>array(27,3,575,734),9751=>array(23,1,579,728),9752=>array(19,3,583,596),9753=>array(23,203,579,557),9754=>array(23,132,579,560),9755=>array(23,132,579,560),9756=>array(7,138,595,516),9757=>array(68,0,534,724),9758=>array(7,138,595,516),9759=>array(68,-3,534,720),9760=>array(6,-1,596,593),9761=>array(4,-2,598,728),9762=>array(4,1,598,595),9763=>array(17,3,585,523),9764=>array(38,-0,564,671),9765=>array(47,-0,555,730),9766=>array(59,-1,543,731),9767=>array(47,3,555,751),9768=>array(100,-2,502,725),9769=>array(27,0,575,549),9770=>array(15,1,587,644),9771=>array(4,0,598,594),9772=>array(50,-3,552,669),9773=>array(7,2,595,642),9774=>array(13,2,589,578),9775=>array(7,2,595,591),9784=>array(13,82,589,642),9785=>array(16,80,586,650),9786=>array(16,80,586,650),9787=>array(16,80,586,650),9788=>array(16,80,586,650),9789=>array(76,2,526,722),9790=>array(73,3,529,734),9791=>array(92,-78,510,708),9792=>array(71,-49,531,655),9793=>array(71,-49,531,655),9794=>array(10,75,592,648),9795=>array(35,21,567,710),9796=>array(85,21,517,710),9797=>array(33,65,569,666),9798=>array(37,65,565,666),9799=>array(105,21,497,710),9800=>array(12,0,590,641),9801=>array(26,-4,576,596),9802=>array(13,6,589,601),9803=>array(25,24,577,632),9804=>array(30,-1,572,641),9805=>array(23,-136,579,562),9806=>array(42,88,561,614),9807=>array(24,-75,578,597),9808=>array(27,3,575,597),9809=>array(10,1,592,601),9810=>array(43,156,559,460),9811=>array(46,2,556,642),9812=>array(33,2,569,563),9813=>array(42,0,560,560),9814=>array(55,0,547,639),9815=>array(108,-4,494,596),9816=>array(70,3,532,597),9817=>array(76,3,526,551),9818=>array(52,-2,550,518),9819=>array(26,2,576,596),9820=>array(72,2,530,596),9821=>array(110,3,492,597),9822=>array(50,1,552,641),9823=>array(58,2,544,597),9824=>array(63,65,540,664),9825=>array(7,65,595,663),9826=>array(71,65,531,664),9827=>array(24,65,578,664),9828=>array(62,65,540,664),9829=>array(5,65,597,664),9830=>array(71,65,531,664),9831=>array(24,65,578,667),9832=>array(22,3,580,597),9833=>array(181,16,421,708),9834=>array(79,16,523,708),9835=>array(52,-79,550,706),9836=>array(8,61,594,664),9837=>array(158,18,444,710),9838=>array(211,21,391,710),9839=>array(152,21,450,710),9840=>array(47,-1,555,639),9841=>array(22,-8,580,632),9842=>array(23,-2,579,538),9843=>array(29,5,573,527),9844=>array(37,4,565,514),9845=>array(33,5,569,521),9846=>array(18,3,584,549),9847=>array(30,4,572,525),9848=>array(37,0,565,509),9849=>array(22,6,580,543),9850=>array(22,0,580,537),9851=>array(28,-0,574,528),9852=>array(22,3,580,561),9853=>array(27,2,575,550),9854=>array(22,3,580,561),9855=>array(39,4,563,643),9856=>array(29,2,573,546),9857=>array(29,2,573,546),9858=>array(29,2,573,546),9859=>array(29,0,573,544),9860=>array(29,2,573,546),9861=>array(29,-2,573,542),9862=>array(22,0,580,557),9863=>array(22,2,580,559),9864=>array(22,0,580,557),9865=>array(22,-5,580,552),9866=>array(40,3,562,73),9867=>array(40,3,562,73),9872=>array(73,-1,529,591),9873=>array(56,2,546,640),9874=>array(19,-0,583,520),9875=>array(15,0,587,603),9876=>array(63,6,539,553),9877=>array(92,-1,510,740),9878=>array(9,1,593,558),9879=>array(11,3,591,552),9880=>array(36,-1,566,640),9881=>array(15,0,587,603),9882=>array(21,6,582,656),9883=>array(40,5,562,597),9884=>array(21,-1,582,638),9888=>array(17,1,585,520),9889=>array(66,4,536,642),9904=>array(119,0,484,730),9905=>array(108,0,494,594),9985=>array(22,181,580,494),9986=>array(22,170,580,505),9987=>array(28,156,574,462),9988=>array(30,161,572,501),9990=>array(25,35,577,588),9991=>array(18,31,584,598),9992=>array(30,29,572,544),9993=>array(31,56,571,448),9996=>array(158,5,444,614),9997=>array(22,73,580,498),9998=>array(42,64,560,581),9999=>array(19,109,583,346),10000=>array(42,91,560,608),10001=>array(29,146,573,420),10002=>array(18,133,584,388),10003=>array(74,94,528,561),10004=>array(36,56,566,532),10005=>array(63,55,539,531),10006=>array(31,92,540,601),10007=>array(64,-10,538,593),10008=>array(25,-1,577,646),10009=>array(31,2,571,542),10010=>array(42,3,560,503),10011=>array(28,3,574,550),10012=>array(23,0,579,556),10013=>array(76,1,520,640),10014=>array(62,0,541,639),10015=>array(70,2,532,595),10016=>array(23,1,579,558),10017=>array(35,1,567,616),10018=>array(15,-10,587,562),10019=>array(14,-8,588,567),10020=>array(13,-9,589,567),10021=>array(11,-13,591,566),10022=>array(21,-12,581,552),10023=>array(18,-13,584,557),10025=>array(20,-8,583,527),10026=>array(33,-13,569,526),10027=>array(20,-13,583,522),10028=>array(17,-11,585,529),10029=>array(20,-8,583,527),10030=>array(30,-2,572,514),10031=>array(20,-5,583,531),10032=>array(22,8,580,502),10033=>array(26,-1,576,563),10034=>array(42,-0,560,547),10035=>array(23,-1,579,554),10036=>array(18,-8,584,560),10037=>array(13,-11,589,565),10038=>array(24,-14,578,625),10039=>array(15,-16,587,556),10040=>array(13,-11,589,565),10041=>array(18,-17,584,551),10042=>array(23,1,579,557),10043=>array(24,-8,578,613),10044=>array(27,-9,575,606),10045=>array(25,-10,573,609),10046=>array(16,-13,586,592),10047=>array(18,0,584,551),10048=>array(11,1,591,565),10049=>array(11,-9,591,572),10050=>array(18,-16,584,552),10051=>array(24,-9,578,653),10052=>array(16,1,586,667),10053=>array(23,-3,579,587),10054=>array(12,2,590,594),10055=>array(24,-9,578,605),10056=>array(20,-10,582,552),10057=>array(16,-14,586,556),10058=>array(11,-11,591,569),10059=>array(17,-11,585,513),10061=>array(18,-5,584,527),10063=>array(34,-31,568,504),10064=>array(30,0,572,542),10065=>array(27,-35,575,512),10066=>array(23,0,579,555),10070=>array(21,-3,581,557),10072=>array(263,-119,339,701),10073=>array(225,-120,377,700),10074=>array(165,-151,438,677),10075=>array(233,476,369,731),10076=>array(228,471,374,722),10077=>array(125,476,477,731),10078=>array(120,471,482,722),10081=>array(50,-80,552,688),10082=>array(125,-19,478,598),10083=>array(93,-14,509,603),10084=>array(22,51,580,507),10085=>array(56,-2,546,637),10086=>array(32,12,570,567),10087=>array(24,150,578,472),10088=>array(117,-49,485,688),10089=>array(117,-49,485,688),10090=>array(175,-59,427,665),10091=>array(179,-59,423,643),10092=>array(158,-64,444,667),10093=>array(158,-64,444,667),10094=>array(103,-83,500,647),10095=>array(103,-83,500,647),10096=>array(100,-93,502,727),10097=>array(101,-93,501,728),10098=>array(223,-138,379,683),10099=>array(223,-135,379,686),10100=>array(137,-160,465,671),10101=>array(122,-164,480,676),10132=>array(41,148,562,487),10136=>array(57,71,545,561),10137=>array(41,204,562,509),10138=>array(57,94,545,583),10139=>array(22,204,580,485),10140=>array(36,145,566,530),10141=>array(41,214,562,519),10142=>array(22,184,580,510),10143=>array(26,182,576,503),10144=>array(41,201,562,505),10145=>array(41,189,562,494),10146=>array(47,182,555,512),10147=>array(60,205,542,518),10148=>array(60,140,542,592),10149=>array(26,193,576,530),10150=>array(26,193,576,529),10151=>array(164,128,438,609),10152=>array(26,179,576,500),10153=>array(49,177,553,516),10154=>array(49,148,553,487),10155=>array(26,89,576,498),10156=>array(47,104,555,458),10157=>array(61,107,541,538),10158=>array(41,63,561,530),10159=>array(24,163,578,557),10161=>array(20,124,582,524),10162=>array(71,92,531,584),10163=>array(43,163,559,386),10164=>array(57,90,545,579),10165=>array(41,227,562,427),10166=>array(57,63,545,552),10167=>array(38,90,564,616),10168=>array(21,192,582,409),10169=>array(57,85,545,574),10170=>array(26,146,576,490),10171=>array(14,179,588,461),10172=>array(19,218,583,456),10173=>array(18,174,583,493),10174=>array(24,131,578,462),10178=>array(43,0,559,627),10181=>array(152,-163,450,769),10182=>array(152,-163,450,769),10208=>array(57,-233,545,807),10214=>array(145,-132,458,760),10215=>array(145,-132,457,760),10216=>array(190,-132,412,759),10217=>array(190,-132,412,759),10731=>array(57,-233,545,807),10746=>array(43,55,559,572),10747=>array(43,55,559,572),10799=>array(73,85,529,541),10858=>array(43,243,559,564),10859=>array(43,65,559,564),11013=>array(41,190,561,494),11014=>array(149,82,453,602),11015=>array(149,82,453,602),11016=>array(68,109,485,526),11017=>array(117,109,534,526),11018=>array(117,109,534,526),11019=>array(68,109,485,526),11020=>array(41,190,561,494),11021=>array(149,82,453,602),11026=>array(3,-39,599,558),11027=>array(3,-39,599,558),11028=>array(3,-39,599,558),11029=>array(3,-39,599,558),11030=>array(3,-39,599,558),11031=>array(3,-39,599,558),11032=>array(3,-39,599,558),11033=>array(3,-39,599,558),11034=>array(3,-39,599,558),11364=>array(70,-213,602,729),11373=>array(52,-14,540,742),11374=>array(42,-208,559,729),11375=>array(18,0,584,729),11376=>array(52,-14,540,742),11381=>array(67,0,535,729),11382=>array(95,0,513,547),11383=>array(37,-12,565,551),11385=>array(74,-13,461,760),11386=>array(67,-14,535,560),11388=>array(237,-117,365,426),11389=>array(129,326,473,734),11390=>array(68,-242,570,742),11391=>array(76,-242,571,729),11800=>array(94,-13,483,729),11807=>array(43,65,559,384),11810=>array(226,403,433,760),11811=>array(169,403,376,760),11812=>array(226,-132,433,225),11813=>array(169,-132,376,225),11822=>array(106,0,496,742),42760=>array(146,0,456,668),42761=>array(146,0,456,668),42762=>array(146,0,456,668),42763=>array(146,0,456,668),42764=>array(146,0,456,668),42765=>array(146,0,456,668),42766=>array(146,0,456,668),42767=>array(146,0,456,668),42768=>array(146,0,456,668),42769=>array(146,0,456,668),42770=>array(146,0,456,668),42771=>array(146,0,456,668),42772=>array(146,0,456,668),42773=>array(146,0,456,668),42774=>array(146,0,456,668),42779=>array(166,326,436,736),42780=>array(166,324,436,734),42781=>array(270,326,332,734),42782=>array(270,326,332,734),42783=>array(270,0,332,408),42786=>array(157,0,464,729),42787=>array(179,0,452,547),42788=>array(115,224,494,742),42789=>array(115,42,494,560),42790=>array(67,-208,535,729),42791=>array(95,-208,513,760),42889=>array(239,0,362,519),42890=>array(191,161,411,380),42891=>array(252,235,351,729),42892=>array(258,458,343,729),42893=>array(67,0,533,729),42894=>array(77,-208,525,765),42896=>array(41,-157,573,729),42897=>array(60,-140,546,560),42922=>array(10,0,585,729),63173=>array(67,-14,535,760),64257=>array(17,0,527,760),64258=>array(17,0,527,760),64338=>array(34,-244,586,263),64339=>array(34,-244,612,264),64340=>array(-10,-244,342,293),64341=>array(-10,-244,612,293),64342=>array(34,-244,586,263),64343=>array(34,-244,612,264),64344=>array(-10,-244,389,293),64345=>array(-10,-244,612,293),64346=>array(34,-244,586,263),64347=>array(34,-244,612,264),64348=>array(-10,-244,380,293),64349=>array(-10,-244,612,293),64350=>array(34,-10,586,467),64351=>array(34,-10,612,470),64352=>array(-10,0,342,559),64353=>array(-10,0,612,553),64354=>array(34,-10,586,513),64355=>array(34,-10,612,513),64356=>array(-10,0,390,559),64357=>array(-10,0,612,561),64358=>array(34,-10,586,542),64359=>array(34,-10,612,535),64360=>array(-10,0,465,620),64361=>array(-10,0,612,627),64362=>array(-36,-45,568,681),64363=>array(-73,-44,612,628),64364=>array(-10,0,406,757),64365=>array(-10,0,612,633),64366=>array(-36,-45,568,687),64367=>array(-73,-44,612,630),64368=>array(-10,0,406,757),64369=>array(-10,0,612,641),64370=>array(43,-244,584,425),64371=>array(43,-244,622,425),64372=>array(-10,-220,545,398),64373=>array(-10,-220,623,398),64374=>array(43,-244,584,425),64375=>array(43,-244,622,425),64376=>array(-10,-98,545,398),64377=>array(-10,-98,623,398),64378=>array(43,-244,584,425),64379=>array(43,-244,622,425),64380=>array(-10,-239,545,398),64381=>array(-10,-220,623,398),64382=>array(43,-244,584,425),64383=>array(43,-244,622,425),64384=>array(-10,-239,545,398),64385=>array(-10,-220,623,398),64394=>array(-25,-246,547,527),64395=>array(-78,-244,612,533),64396=>array(-25,-246,595,576),64397=>array(-78,-244,612,564),64398=>array(5,-43,670,760),64399=>array(-61,-43,638,760),64400=>array(-10,0,521,760),64401=>array(-10,0,612,760),64402=>array(5,-43,673,910),64403=>array(-61,-43,638,911),64404=>array(-10,0,521,903),64405=>array(-10,0,612,903),64414=>array(26,-162,569,336),64415=>array(-21,-244,612,256),64426=>array(0,-33,572,487),64427=>array(0,0,618,487),64428=>array(-10,-33,486,487),64429=>array(-10,0,618,487),64488=>array(-10,0,342,293),64489=>array(-10,0,612,293),64508=>array(12,-131,602,389),64509=>array(-64,-133,612,251),64510=>array(-10,-146,386,293),64511=>array(-10,-146,612,293),65136=>array(158,591,443,825),65137=>array(-10,0,612,825),65138=>array(158,591,443,874),65139=>array(392,0,612,177),65140=>array(158,-239,443,-5),65142=>array(158,591,443,708),65143=>array(-10,0,612,708),65144=>array(158,590,443,874),65145=>array(-10,0,612,874),65146=>array(158,-137,443,-20),65147=>array(-10,-137,612,90),65148=>array(148,599,453,869),65149=>array(-10,0,612,869),65150=>array(167,610,435,878),65151=>array(-10,0,612,878),65152=>array(212,42,522,483),65153=>array(125,0,477,939),65154=>array(125,0,612,939),65155=>array(212,0,380,1028),65156=>array(236,0,612,1028),65157=>array(37,-244,525,588),65158=>array(44,-244,612,588),65159=>array(214,-244,381,760),65160=>array(259,-244,612,760),65161=>array(12,-131,602,542),65162=>array(-64,-133,612,421),65163=>array(-10,0,374,613),65164=>array(-10,0,612,613),65165=>array(256,0,346,760),65166=>array(287,0,612,760),65167=>array(34,-171,586,263),65168=>array(34,-171,612,264),65169=>array(-10,-146,342,293),65170=>array(-10,-146,612,293),65171=>array(108,-28,494,513),65172=>array(118,0,612,513),65173=>array(34,-10,586,391),65174=>array(34,-10,612,391),65175=>array(-10,0,392,488),65176=>array(-10,0,612,488),65177=>array(34,-10,586,513),65178=>array(34,-10,612,513),65179=>array(-10,0,396,610),65180=>array(-10,0,612,592),65181=>array(43,-244,584,425),65182=>array(43,-244,622,425),65183=>array(-10,-146,545,398),65184=>array(-10,-146,623,398),65185=>array(43,-244,584,425),65186=>array(43,-244,622,425),65187=>array(-10,0,545,398),65188=>array(-10,0,623,398),65189=>array(43,-244,584,586),65190=>array(43,-244,622,586),65191=>array(-10,0,545,537),65192=>array(-10,0,623,537),65193=>array(113,-19,488,427),65194=>array(113,-19,612,427),65195=>array(113,-19,488,586),65196=>array(113,-19,612,586),65197=>array(-25,-246,533,267),65198=>array(-78,-244,612,269),65199=>array(-25,-246,533,464),65200=>array(-78,-244,612,464),65201=>array(-107,-240,574,366),65202=>array(-145,-240,612,366),65203=>array(-10,-17,572,363),65204=>array(-10,-17,612,363),65205=>array(-107,-240,574,586),65206=>array(-145,-240,612,586),65207=>array(-10,-17,572,586),65208=>array(-10,-17,612,586),65209=>array(-117,-240,594,320),65210=>array(-154,-240,612,320),65211=>array(-10,0,594,320),65212=>array(-10,0,612,320),65213=>array(-117,-240,594,400),65214=>array(-154,-240,612,400),65215=>array(-10,0,594,433),65216=>array(-10,0,612,426),65217=>array(5,0,580,760),65218=>array(10,0,612,760),65219=>array(-10,0,580,760),65220=>array(-10,0,612,760),65221=>array(5,0,580,760),65222=>array(10,0,612,760),65223=>array(-10,0,580,760),65224=>array(-10,0,612,760),65225=>array(60,-244,589,521),65226=>array(72,-244,619,382),65227=>array(-10,0,497,521),65228=>array(-10,0,612,382),65229=>array(60,-244,589,659),65230=>array(72,-244,619,537),65231=>array(-10,0,497,659),65232=>array(-10,0,612,537),65233=>array(-36,-45,568,594),65234=>array(-73,-44,612,537),65235=>array(-10,0,406,635),65236=>array(-10,0,612,562),65237=>array(15,-189,557,635),65238=>array(-9,-240,612,500),65239=>array(-10,0,406,635),65240=>array(-10,0,612,562),65241=>array(4,-27,578,760),65242=>array(-46,-27,612,760),65243=>array(-10,0,521,760),65244=>array(-10,0,612,760),65245=>array(33,-152,537,760),65246=>array(5,-152,612,760),65247=>array(-10,0,489,760),65248=>array(-10,0,612,760),65249=>array(63,-240,541,369),65250=>array(35,-240,612,307),65251=>array(-10,-24,456,303),65252=>array(-10,-24,612,303),65253=>array(26,-162,569,439),65254=>array(-21,-244,612,335),65255=>array(-10,0,342,488),65256=>array(-10,0,612,488),65257=>array(108,-28,494,358),65258=>array(118,0,612,366),65259=>array(-10,-33,486,487),65260=>array(-10,-244,612,333),65261=>array(37,-244,525,315),65262=>array(44,-244,612,315),65263=>array(12,-131,602,389),65264=>array(-64,-133,612,251),65265=>array(12,-244,602,389),65266=>array(-64,-244,612,251),65267=>array(-10,-146,384,293),65268=>array(-10,-146,612,293),65269=>array(-52,-10,515,866),65270=>array(-94,-10,612,866),65271=>array(41,-10,515,955),65272=>array(-16,-10,612,955),65273=>array(65,-244,515,760),65274=>array(46,-244,612,760),65275=>array(87,-10,515,760),65276=>array(46,-10,612,760),65533=>array(40,-84,562,887),65535=>array(51,-177,551,705)); -$cw=array(0=>602,32=>602,33=>602,34=>602,35=>602,36=>602,37=>602,38=>602,39=>602,40=>602,41=>602,42=>602,43=>602,44=>602,45=>602,46=>602,47=>602,48=>602,49=>602,50=>602,51=>602,52=>602,53=>602,54=>602,55=>602,56=>602,57=>602,58=>602,59=>602,60=>602,61=>602,62=>602,63=>602,64=>602,65=>602,66=>602,67=>602,68=>602,69=>602,70=>602,71=>602,72=>602,73=>602,74=>602,75=>602,76=>602,77=>602,78=>602,79=>602,80=>602,81=>602,82=>602,83=>602,84=>602,85=>602,86=>602,87=>602,88=>602,89=>602,90=>602,91=>602,92=>602,93=>602,94=>602,95=>602,96=>602,97=>602,98=>602,99=>602,100=>602,101=>602,102=>602,103=>602,104=>602,105=>602,106=>602,107=>602,108=>602,109=>602,110=>602,111=>602,112=>602,113=>602,114=>602,115=>602,116=>602,117=>602,118=>602,119=>602,120=>602,121=>602,122=>602,123=>602,124=>602,125=>602,126=>602,160=>602,161=>602,162=>602,163=>602,164=>602,165=>602,166=>602,167=>602,168=>602,169=>602,170=>602,171=>602,172=>602,173=>602,174=>602,175=>602,176=>602,177=>602,178=>602,179=>602,180=>602,181=>602,182=>602,183=>602,184=>602,185=>602,186=>602,187=>602,188=>602,189=>602,190=>602,191=>602,192=>602,193=>602,194=>602,195=>602,196=>602,197=>602,198=>602,199=>602,200=>602,201=>602,202=>602,203=>602,204=>602,205=>602,206=>602,207=>602,208=>602,209=>602,210=>602,211=>602,212=>602,213=>602,214=>602,215=>602,216=>602,217=>602,218=>602,219=>602,220=>602,221=>602,222=>602,223=>602,224=>602,225=>602,226=>602,227=>602,228=>602,229=>602,230=>602,231=>602,232=>602,233=>602,234=>602,235=>602,236=>602,237=>602,238=>602,239=>602,240=>602,241=>602,242=>602,243=>602,244=>602,245=>602,246=>602,247=>602,248=>602,249=>602,250=>602,251=>602,252=>602,253=>602,254=>602,255=>602,256=>602,257=>602,258=>602,259=>602,260=>602,261=>602,262=>602,263=>602,264=>602,265=>602,266=>602,267=>602,268=>602,269=>602,270=>602,271=>602,272=>602,273=>602,274=>602,275=>602,276=>602,277=>602,278=>602,279=>602,280=>602,281=>602,282=>602,283=>602,284=>602,285=>602,286=>602,287=>602,288=>602,289=>602,290=>602,291=>602,292=>602,293=>602,294=>602,295=>602,296=>602,297=>602,298=>602,299=>602,300=>602,301=>602,302=>602,303=>602,304=>602,305=>602,306=>602,307=>602,308=>602,309=>602,310=>602,311=>602,312=>602,313=>602,314=>602,315=>602,316=>602,317=>602,318=>602,319=>602,320=>602,321=>602,322=>602,323=>602,324=>602,325=>602,326=>602,327=>602,328=>602,329=>602,330=>602,331=>602,332=>602,333=>602,334=>602,335=>602,336=>602,337=>602,338=>602,339=>602,340=>602,341=>602,342=>602,343=>602,344=>602,345=>602,346=>602,347=>602,348=>602,349=>602,350=>602,351=>602,352=>602,353=>602,354=>602,355=>602,356=>602,357=>602,358=>602,359=>602,360=>602,361=>602,362=>602,363=>602,364=>602,365=>602,366=>602,367=>602,368=>602,369=>602,370=>602,371=>602,372=>602,373=>602,374=>602,375=>602,376=>602,377=>602,378=>602,379=>602,380=>602,381=>602,382=>602,383=>602,384=>602,385=>602,386=>602,387=>602,388=>602,389=>602,390=>602,391=>602,392=>602,393=>602,394=>602,395=>602,396=>602,397=>602,398=>602,399=>602,400=>602,401=>602,402=>602,403=>602,404=>602,405=>602,406=>602,407=>602,408=>602,409=>602,410=>602,411=>602,412=>602,413=>602,414=>602,415=>602,416=>602,417=>602,418=>602,419=>602,420=>602,421=>602,422=>602,423=>602,424=>602,425=>602,426=>602,427=>602,428=>602,429=>602,430=>602,431=>602,432=>602,433=>602,434=>602,435=>602,436=>602,437=>602,438=>602,439=>602,440=>602,441=>602,442=>602,443=>602,444=>602,445=>602,446=>602,447=>602,448=>602,449=>602,450=>602,451=>602,461=>602,462=>602,463=>602,464=>602,465=>602,466=>602,467=>602,468=>602,469=>602,470=>602,471=>602,472=>602,473=>602,474=>602,475=>602,476=>602,477=>602,478=>602,479=>602,480=>602,481=>602,482=>602,483=>602,486=>602,487=>602,488=>602,489=>602,490=>602,491=>602,492=>602,493=>602,494=>602,495=>602,496=>602,500=>602,501=>602,502=>602,504=>602,505=>602,508=>602,509=>602,510=>602,511=>602,512=>602,513=>602,514=>602,515=>602,516=>602,517=>602,518=>602,519=>602,520=>602,521=>602,522=>602,523=>602,524=>602,525=>602,526=>602,527=>602,528=>602,529=>602,530=>602,531=>602,532=>602,533=>602,534=>602,535=>602,536=>602,537=>602,538=>602,539=>602,540=>602,541=>602,542=>602,543=>602,544=>602,545=>602,548=>602,549=>602,550=>602,551=>602,552=>602,553=>602,554=>602,555=>602,556=>602,557=>602,558=>602,559=>602,560=>602,561=>602,562=>602,563=>602,564=>602,565=>602,566=>602,567=>602,568=>602,569=>602,570=>602,571=>602,572=>602,573=>602,574=>602,575=>602,576=>602,577=>602,579=>602,580=>602,581=>602,588=>602,589=>602,592=>602,593=>602,594=>602,595=>602,596=>602,597=>602,598=>602,599=>602,600=>602,601=>602,602=>602,603=>602,604=>602,605=>602,606=>602,607=>602,608=>602,609=>602,610=>602,611=>602,612=>602,613=>602,614=>602,615=>602,616=>602,617=>602,618=>602,619=>602,620=>602,621=>602,622=>602,623=>602,624=>602,625=>602,626=>602,627=>602,628=>602,629=>602,630=>602,631=>602,632=>602,633=>602,634=>602,635=>602,636=>602,637=>602,638=>602,639=>602,640=>602,641=>602,642=>602,643=>602,644=>602,645=>602,646=>602,647=>602,648=>602,649=>602,650=>602,651=>602,652=>602,653=>602,654=>602,655=>602,656=>602,657=>602,658=>602,659=>602,660=>602,661=>602,662=>602,663=>602,664=>602,665=>602,666=>602,667=>602,668=>602,669=>602,670=>602,671=>602,672=>602,673=>602,674=>602,675=>602,676=>602,677=>602,678=>602,679=>602,680=>602,681=>602,682=>602,683=>602,684=>602,685=>602,686=>602,687=>602,688=>602,689=>602,690=>602,691=>602,692=>602,693=>602,694=>602,695=>602,696=>602,697=>602,699=>602,700=>602,701=>602,702=>602,703=>602,704=>602,705=>602,710=>602,711=>602,712=>602,713=>602,716=>602,717=>602,718=>602,719=>602,720=>602,721=>602,722=>602,723=>602,726=>602,727=>602,728=>602,729=>602,730=>602,731=>602,732=>602,733=>602,734=>602,736=>602,737=>602,738=>602,739=>602,740=>602,741=>602,742=>602,743=>602,744=>602,745=>602,750=>602,755=>602,768=>602,769=>602,770=>602,771=>602,772=>602,773=>602,774=>602,775=>602,776=>602,777=>602,778=>602,779=>602,780=>602,781=>602,782=>602,783=>602,784=>602,785=>602,786=>602,787=>602,788=>602,789=>602,790=>602,791=>602,792=>602,793=>602,794=>602,795=>602,796=>602,797=>602,798=>602,799=>602,800=>602,801=>602,802=>602,803=>602,804=>602,805=>602,806=>602,807=>602,808=>602,809=>602,810=>602,811=>602,812=>602,813=>602,814=>602,815=>602,816=>602,817=>602,818=>602,819=>602,820=>602,821=>602,822=>602,823=>602,824=>602,825=>602,826=>602,827=>602,828=>602,829=>602,830=>602,831=>602,835=>602,856=>602,865=>602,884=>602,885=>602,890=>602,894=>602,900=>602,901=>602,902=>602,903=>602,904=>602,905=>602,906=>602,908=>602,910=>602,911=>602,912=>602,913=>602,914=>602,915=>602,916=>602,917=>602,918=>602,919=>602,920=>602,921=>602,922=>602,923=>602,924=>602,925=>602,926=>602,927=>602,928=>602,929=>602,931=>602,932=>602,933=>602,934=>602,935=>602,936=>602,937=>602,938=>602,939=>602,940=>602,941=>602,942=>602,943=>602,944=>602,945=>602,946=>602,947=>602,948=>602,949=>602,950=>602,951=>602,952=>602,953=>602,954=>602,955=>602,956=>602,957=>602,958=>602,959=>602,960=>602,961=>602,962=>602,963=>602,964=>602,965=>602,966=>602,967=>602,968=>602,969=>602,970=>602,971=>602,972=>602,973=>602,974=>602,976=>602,977=>602,978=>602,979=>602,980=>602,981=>602,982=>602,983=>602,984=>602,985=>602,986=>602,987=>602,988=>602,989=>602,990=>602,991=>602,992=>602,993=>602,1008=>602,1009=>602,1010=>602,1011=>602,1012=>602,1013=>602,1014=>602,1015=>602,1016=>602,1017=>602,1018=>602,1019=>602,1020=>602,1021=>602,1022=>602,1023=>602,1024=>602,1025=>602,1026=>602,1027=>602,1028=>602,1029=>602,1030=>602,1031=>602,1032=>602,1033=>602,1034=>602,1035=>602,1036=>602,1037=>602,1038=>602,1039=>602,1040=>602,1041=>602,1042=>602,1043=>602,1044=>602,1045=>602,1046=>602,1047=>602,1048=>602,1049=>602,1050=>602,1051=>602,1052=>602,1053=>602,1054=>602,1055=>602,1056=>602,1057=>602,1058=>602,1059=>602,1060=>602,1061=>602,1062=>602,1063=>602,1064=>602,1065=>602,1066=>602,1067=>602,1068=>602,1069=>602,1070=>602,1071=>602,1072=>602,1073=>602,1074=>602,1075=>602,1076=>602,1077=>602,1078=>602,1079=>602,1080=>602,1081=>602,1082=>602,1083=>602,1084=>602,1085=>602,1086=>602,1087=>602,1088=>602,1089=>602,1090=>602,1091=>602,1092=>602,1093=>602,1094=>602,1095=>602,1096=>602,1097=>602,1098=>602,1099=>602,1100=>602,1101=>602,1102=>602,1103=>602,1104=>602,1105=>602,1106=>602,1107=>602,1108=>602,1109=>602,1110=>602,1111=>602,1112=>602,1113=>602,1114=>602,1115=>602,1116=>602,1117=>602,1118=>602,1119=>602,1122=>602,1123=>602,1138=>602,1139=>602,1168=>602,1169=>602,1170=>602,1171=>602,1172=>602,1173=>602,1174=>602,1175=>602,1176=>602,1177=>602,1178=>602,1179=>602,1186=>602,1187=>602,1188=>602,1189=>602,1194=>602,1195=>602,1196=>602,1197=>602,1198=>602,1199=>602,1200=>602,1201=>602,1202=>602,1203=>602,1210=>602,1211=>602,1216=>602,1217=>602,1218=>602,1219=>602,1220=>602,1223=>602,1224=>602,1227=>602,1228=>602,1231=>602,1232=>602,1233=>602,1234=>602,1235=>602,1236=>602,1237=>602,1238=>602,1239=>602,1240=>602,1241=>602,1242=>602,1243=>602,1244=>602,1245=>602,1246=>602,1247=>602,1248=>602,1249=>602,1250=>602,1251=>602,1252=>602,1253=>602,1254=>602,1255=>602,1256=>602,1257=>602,1258=>602,1259=>602,1260=>602,1261=>602,1262=>602,1263=>602,1264=>602,1265=>602,1266=>602,1267=>602,1268=>602,1269=>602,1270=>602,1271=>602,1272=>602,1273=>602,1296=>602,1297=>602,1306=>602,1307=>602,1308=>602,1309=>602,1329=>602,1330=>602,1331=>602,1332=>602,1333=>602,1334=>602,1335=>602,1336=>602,1337=>602,1338=>602,1339=>602,1340=>602,1341=>602,1342=>602,1343=>602,1344=>602,1345=>602,1346=>602,1347=>602,1348=>602,1349=>602,1350=>602,1351=>602,1352=>602,1353=>602,1354=>602,1355=>602,1356=>602,1357=>602,1358=>602,1359=>602,1360=>602,1361=>602,1362=>602,1363=>602,1364=>602,1365=>602,1366=>602,1369=>602,1370=>602,1371=>602,1372=>602,1373=>602,1374=>602,1375=>602,1377=>602,1378=>602,1379=>602,1380=>602,1381=>602,1382=>602,1383=>602,1384=>602,1385=>602,1386=>602,1387=>602,1388=>602,1389=>602,1390=>602,1391=>602,1392=>602,1393=>602,1394=>602,1395=>602,1396=>602,1397=>602,1398=>602,1399=>602,1400=>602,1401=>602,1402=>602,1403=>602,1404=>602,1405=>602,1406=>602,1407=>602,1408=>602,1409=>602,1410=>602,1411=>602,1412=>602,1413=>602,1414=>602,1415=>602,1417=>602,1418=>602,1542=>602,1543=>602,1545=>602,1546=>602,1548=>602,1557=>602,1563=>602,1567=>602,1569=>602,1570=>602,1571=>602,1572=>602,1573=>602,1574=>602,1575=>602,1576=>602,1577=>602,1578=>602,1579=>602,1580=>602,1581=>602,1582=>602,1583=>602,1584=>602,1585=>602,1586=>602,1587=>602,1588=>602,1589=>602,1590=>602,1591=>602,1592=>602,1593=>602,1594=>602,1600=>602,1601=>602,1602=>602,1603=>602,1604=>602,1605=>602,1606=>602,1607=>602,1608=>602,1609=>602,1610=>602,1611=>602,1612=>602,1613=>602,1614=>602,1615=>602,1616=>602,1617=>602,1618=>602,1619=>602,1620=>602,1621=>602,1626=>602,1632=>602,1633=>602,1634=>602,1635=>602,1636=>602,1637=>602,1638=>602,1639=>602,1640=>602,1641=>602,1642=>602,1643=>602,1644=>602,1645=>602,1652=>602,1657=>602,1658=>602,1659=>602,1662=>602,1663=>602,1664=>602,1667=>602,1668=>602,1670=>602,1671=>602,1681=>602,1688=>602,1700=>602,1705=>602,1711=>602,1726=>602,1740=>602,1776=>602,1777=>602,1778=>602,1779=>602,1780=>602,1781=>602,1782=>602,1783=>602,1784=>602,1785=>602,3713=>602,3714=>602,3716=>602,3719=>602,3720=>602,3722=>602,3725=>602,3732=>602,3733=>602,3734=>602,3735=>602,3737=>602,3738=>602,3739=>602,3740=>602,3741=>602,3742=>602,3743=>602,3745=>602,3746=>602,3747=>602,3749=>602,3751=>602,3754=>602,3755=>602,3757=>602,3758=>602,3759=>602,3760=>602,3761=>602,3762=>602,3763=>602,3764=>602,3765=>602,3766=>602,3767=>602,3768=>602,3769=>602,3771=>602,3772=>602,3784=>602,3785=>602,3786=>602,3787=>602,3788=>602,3789=>602,4304=>602,4305=>602,4306=>602,4307=>602,4308=>602,4309=>602,4310=>602,4311=>602,4312=>602,4313=>602,4314=>602,4315=>602,4316=>602,4317=>602,4318=>602,4319=>602,4320=>602,4321=>602,4322=>602,4323=>602,4324=>602,4325=>602,4326=>602,4327=>602,4328=>602,4329=>602,4330=>602,4331=>602,4332=>602,4333=>602,4334=>602,4335=>602,4336=>602,4337=>602,4338=>602,4339=>602,4340=>602,4341=>602,4342=>602,4343=>602,4344=>602,4345=>602,4346=>602,4347=>602,4348=>602,7426=>602,7432=>602,7433=>602,7444=>602,7446=>602,7447=>602,7453=>602,7454=>602,7455=>602,7468=>602,7469=>602,7470=>602,7472=>602,7473=>602,7474=>602,7475=>602,7476=>602,7477=>602,7478=>602,7479=>602,7480=>602,7481=>602,7482=>602,7483=>602,7484=>602,7486=>602,7487=>602,7488=>602,7489=>602,7490=>602,7491=>602,7492=>602,7493=>602,7494=>602,7495=>602,7496=>602,7497=>602,7498=>602,7499=>602,7500=>602,7501=>602,7502=>602,7503=>602,7504=>602,7505=>602,7506=>602,7507=>602,7508=>602,7509=>602,7510=>602,7511=>602,7512=>602,7513=>602,7514=>602,7515=>602,7522=>602,7523=>602,7524=>602,7525=>602,7543=>602,7544=>602,7547=>602,7557=>602,7579=>602,7580=>602,7581=>602,7582=>602,7583=>602,7584=>602,7585=>602,7586=>602,7587=>602,7588=>602,7589=>602,7590=>602,7591=>602,7592=>602,7593=>602,7594=>602,7595=>602,7596=>602,7597=>602,7598=>602,7599=>602,7600=>602,7601=>602,7602=>602,7603=>602,7604=>602,7605=>602,7606=>602,7607=>602,7609=>602,7610=>602,7611=>602,7612=>602,7613=>602,7614=>602,7615=>602,7680=>602,7681=>602,7682=>602,7683=>602,7684=>602,7685=>602,7686=>602,7687=>602,7688=>602,7689=>602,7690=>602,7691=>602,7692=>602,7693=>602,7694=>602,7695=>602,7696=>602,7697=>602,7698=>602,7699=>602,7704=>602,7705=>602,7706=>602,7707=>602,7708=>602,7709=>602,7710=>602,7711=>602,7712=>602,7713=>602,7714=>602,7715=>602,7716=>602,7717=>602,7718=>602,7719=>602,7720=>602,7721=>602,7722=>602,7723=>602,7724=>602,7725=>602,7728=>602,7729=>602,7730=>602,7731=>602,7732=>602,7733=>602,7734=>602,7735=>602,7736=>602,7737=>602,7738=>602,7739=>602,7740=>602,7741=>602,7742=>602,7743=>602,7744=>602,7745=>602,7746=>602,7747=>602,7748=>602,7749=>602,7750=>602,7751=>602,7752=>602,7753=>602,7754=>602,7755=>602,7756=>602,7757=>602,7764=>602,7765=>602,7766=>602,7767=>602,7768=>602,7769=>602,7770=>602,7771=>602,7772=>602,7773=>602,7774=>602,7775=>602,7776=>602,7777=>602,7778=>602,7779=>602,7784=>602,7785=>602,7786=>602,7787=>602,7788=>602,7789=>602,7790=>602,7791=>602,7792=>602,7793=>602,7794=>602,7795=>602,7796=>602,7797=>602,7798=>602,7799=>602,7800=>602,7801=>602,7804=>602,7805=>602,7806=>602,7807=>602,7808=>602,7809=>602,7810=>602,7811=>602,7812=>602,7813=>602,7814=>602,7815=>602,7816=>602,7817=>602,7818=>602,7819=>602,7820=>602,7821=>602,7822=>602,7823=>602,7824=>602,7825=>602,7826=>602,7827=>602,7828=>602,7829=>602,7830=>602,7831=>602,7832=>602,7833=>602,7835=>602,7839=>602,7840=>602,7841=>602,7852=>602,7853=>602,7856=>602,7857=>602,7862=>602,7863=>602,7864=>602,7865=>602,7868=>602,7869=>602,7878=>602,7879=>602,7882=>602,7883=>602,7884=>602,7885=>602,7896=>602,7897=>602,7898=>602,7899=>602,7900=>602,7901=>602,7904=>602,7905=>602,7906=>602,7907=>602,7908=>602,7909=>602,7912=>602,7913=>602,7914=>602,7915=>602,7918=>602,7919=>602,7920=>602,7921=>602,7922=>602,7923=>602,7924=>602,7925=>602,7928=>602,7929=>602,7936=>602,7937=>602,7938=>602,7939=>602,7940=>602,7941=>602,7942=>602,7943=>602,7944=>602,7945=>602,7946=>602,7947=>602,7948=>602,7949=>602,7950=>602,7951=>602,7952=>602,7953=>602,7954=>602,7955=>602,7956=>602,7957=>602,7960=>602,7961=>602,7962=>602,7963=>602,7964=>602,7965=>602,7968=>602,7969=>602,7970=>602,7971=>602,7972=>602,7973=>602,7974=>602,7975=>602,7976=>602,7977=>602,7978=>602,7979=>602,7980=>602,7981=>602,7982=>602,7983=>602,7984=>602,7985=>602,7986=>602,7987=>602,7988=>602,7989=>602,7990=>602,7991=>602,7992=>602,7993=>602,7994=>602,7995=>602,7996=>602,7997=>602,7998=>602,7999=>602,8000=>602,8001=>602,8002=>602,8003=>602,8004=>602,8005=>602,8008=>602,8009=>602,8010=>602,8011=>602,8012=>602,8013=>602,8016=>602,8017=>602,8018=>602,8019=>602,8020=>602,8021=>602,8022=>602,8023=>602,8025=>602,8027=>602,8029=>602,8031=>602,8032=>602,8033=>602,8034=>602,8035=>602,8036=>602,8037=>602,8038=>602,8039=>602,8040=>602,8041=>602,8042=>602,8043=>602,8044=>602,8045=>602,8046=>602,8047=>602,8048=>602,8049=>602,8050=>602,8051=>602,8052=>602,8053=>602,8054=>602,8055=>602,8056=>602,8057=>602,8058=>602,8059=>602,8060=>602,8061=>602,8064=>602,8065=>602,8066=>602,8067=>602,8068=>602,8069=>602,8070=>602,8071=>602,8072=>602,8073=>602,8074=>602,8075=>602,8076=>602,8077=>602,8078=>602,8079=>602,8080=>602,8081=>602,8082=>602,8083=>602,8084=>602,8085=>602,8086=>602,8087=>602,8088=>602,8089=>602,8090=>602,8091=>602,8092=>602,8093=>602,8094=>602,8095=>602,8096=>602,8097=>602,8098=>602,8099=>602,8100=>602,8101=>602,8102=>602,8103=>602,8104=>602,8105=>602,8106=>602,8107=>602,8108=>602,8109=>602,8110=>602,8111=>602,8112=>602,8113=>602,8114=>602,8115=>602,8116=>602,8118=>602,8119=>602,8120=>602,8121=>602,8122=>602,8123=>602,8124=>602,8125=>602,8126=>602,8127=>602,8128=>602,8129=>602,8130=>602,8131=>602,8132=>602,8134=>602,8135=>602,8136=>602,8137=>602,8138=>602,8139=>602,8140=>602,8141=>602,8142=>602,8143=>602,8144=>602,8145=>602,8146=>602,8147=>602,8150=>602,8151=>602,8152=>602,8153=>602,8154=>602,8155=>602,8157=>602,8158=>602,8159=>602,8160=>602,8161=>602,8162=>602,8163=>602,8164=>602,8165=>602,8166=>602,8167=>602,8168=>602,8169=>602,8170=>602,8171=>602,8172=>602,8173=>602,8174=>602,8175=>602,8178=>602,8179=>602,8180=>602,8182=>602,8183=>602,8184=>602,8185=>602,8186=>602,8187=>602,8188=>602,8189=>602,8190=>602,8192=>602,8193=>602,8194=>602,8195=>602,8196=>602,8197=>602,8198=>602,8199=>602,8200=>602,8201=>602,8202=>602,8208=>602,8209=>602,8210=>602,8211=>602,8212=>602,8213=>602,8214=>602,8215=>602,8216=>602,8217=>602,8218=>602,8219=>602,8220=>602,8221=>602,8222=>602,8223=>602,8224=>602,8225=>602,8226=>602,8227=>602,8230=>602,8239=>602,8240=>602,8241=>602,8242=>602,8243=>602,8244=>602,8245=>602,8246=>602,8247=>602,8249=>602,8250=>602,8252=>602,8253=>602,8254=>602,8261=>602,8262=>602,8263=>602,8264=>602,8265=>602,8267=>602,8287=>602,8304=>602,8305=>602,8308=>602,8309=>602,8310=>602,8311=>602,8312=>602,8313=>602,8314=>602,8315=>602,8316=>602,8317=>602,8318=>602,8319=>602,8320=>602,8321=>602,8322=>602,8323=>602,8324=>602,8325=>602,8326=>602,8327=>602,8328=>602,8329=>602,8330=>602,8331=>602,8332=>602,8333=>602,8334=>602,8336=>602,8337=>602,8338=>602,8339=>602,8340=>602,8341=>602,8342=>602,8343=>602,8344=>602,8345=>602,8346=>602,8347=>602,8348=>602,8352=>602,8353=>602,8354=>602,8355=>602,8356=>602,8357=>602,8358=>602,8359=>602,8360=>602,8361=>602,8362=>602,8363=>602,8364=>602,8365=>602,8366=>602,8367=>602,8368=>602,8369=>602,8370=>602,8371=>602,8372=>602,8373=>602,8376=>602,8377=>602,8450=>602,8453=>602,8461=>602,8462=>602,8463=>602,8469=>602,8470=>602,8471=>602,8473=>602,8474=>602,8477=>602,8482=>602,8484=>602,8486=>602,8490=>602,8491=>602,8494=>602,8520=>602,8531=>602,8532=>602,8533=>602,8534=>602,8535=>602,8536=>602,8537=>602,8538=>602,8539=>602,8540=>602,8541=>602,8542=>602,8543=>602,8592=>602,8593=>602,8594=>602,8595=>602,8596=>602,8597=>602,8598=>602,8599=>602,8600=>602,8601=>602,8602=>602,8603=>602,8604=>602,8605=>602,8606=>602,8607=>602,8608=>602,8609=>602,8610=>602,8611=>602,8612=>602,8613=>602,8614=>602,8615=>602,8616=>602,8617=>602,8618=>602,8619=>602,8620=>602,8621=>602,8622=>602,8623=>602,8624=>602,8625=>602,8626=>602,8627=>602,8628=>602,8629=>602,8630=>602,8631=>602,8632=>602,8633=>602,8634=>602,8635=>602,8636=>602,8637=>602,8638=>602,8639=>602,8640=>602,8641=>602,8642=>602,8643=>602,8644=>602,8645=>602,8646=>602,8647=>602,8648=>602,8649=>602,8650=>602,8651=>602,8652=>602,8653=>602,8654=>602,8655=>602,8656=>602,8657=>602,8658=>602,8659=>602,8660=>602,8661=>602,8662=>602,8663=>602,8664=>602,8665=>602,8666=>602,8667=>602,8668=>602,8669=>602,8670=>602,8671=>602,8672=>602,8673=>602,8674=>602,8675=>602,8676=>602,8677=>602,8678=>602,8679=>602,8680=>602,8681=>602,8682=>602,8683=>602,8684=>602,8685=>602,8686=>602,8687=>602,8688=>602,8689=>602,8690=>602,8691=>602,8692=>602,8693=>602,8694=>602,8695=>602,8696=>602,8697=>602,8698=>602,8699=>602,8700=>602,8701=>602,8702=>602,8703=>602,8704=>602,8705=>602,8706=>602,8707=>602,8708=>602,8709=>602,8710=>602,8711=>602,8712=>602,8713=>602,8714=>602,8715=>602,8716=>602,8717=>602,8719=>602,8721=>602,8722=>602,8723=>602,8725=>602,8727=>602,8728=>602,8729=>602,8730=>602,8731=>602,8732=>602,8733=>602,8734=>602,8735=>602,8736=>602,8743=>602,8744=>602,8745=>602,8746=>602,8747=>602,8748=>602,8749=>602,8756=>602,8757=>602,8758=>602,8759=>602,8760=>602,8761=>602,8762=>602,8763=>602,8764=>602,8765=>602,8769=>602,8770=>602,8771=>602,8772=>602,8773=>602,8774=>602,8775=>602,8776=>602,8777=>602,8778=>602,8779=>602,8780=>602,8781=>602,8782=>602,8783=>602,8784=>602,8785=>602,8786=>602,8787=>602,8788=>602,8789=>602,8790=>602,8791=>602,8792=>602,8793=>602,8794=>602,8795=>602,8796=>602,8797=>602,8798=>602,8799=>602,8800=>602,8801=>602,8802=>602,8803=>602,8804=>602,8805=>602,8806=>602,8807=>602,8808=>602,8809=>602,8813=>602,8814=>602,8815=>602,8816=>602,8817=>602,8818=>602,8819=>602,8820=>602,8821=>602,8822=>602,8823=>602,8824=>602,8825=>602,8826=>602,8827=>602,8828=>602,8829=>602,8830=>602,8831=>602,8832=>602,8833=>602,8834=>602,8835=>602,8836=>602,8837=>602,8838=>602,8839=>602,8840=>602,8841=>602,8842=>602,8843=>602,8847=>602,8848=>602,8849=>602,8850=>602,8853=>602,8854=>602,8855=>602,8856=>602,8857=>602,8858=>602,8859=>602,8860=>602,8861=>602,8862=>602,8863=>602,8864=>602,8865=>602,8866=>602,8867=>602,8868=>602,8869=>602,8901=>602,8902=>602,8909=>602,8922=>602,8923=>602,8924=>602,8925=>602,8926=>602,8927=>602,8928=>602,8929=>602,8930=>602,8931=>602,8932=>602,8933=>602,8934=>602,8935=>602,8936=>602,8937=>602,8943=>602,8960=>602,8961=>602,8962=>602,8963=>602,8964=>602,8965=>602,8966=>602,8968=>602,8969=>602,8970=>602,8971=>602,8972=>602,8973=>602,8974=>602,8975=>602,8976=>602,8977=>602,8978=>602,8979=>602,8980=>602,8981=>602,8984=>602,8985=>602,8988=>602,8989=>602,8990=>602,8991=>602,8992=>602,8993=>602,8997=>602,8998=>602,8999=>602,9000=>602,9003=>602,9013=>602,9015=>602,9016=>602,9017=>602,9018=>602,9019=>602,9020=>602,9021=>602,9022=>602,9025=>602,9026=>602,9027=>602,9028=>602,9031=>602,9032=>602,9033=>602,9035=>602,9036=>602,9037=>602,9040=>602,9042=>602,9043=>602,9044=>602,9047=>602,9048=>602,9049=>602,9050=>602,9051=>602,9052=>602,9054=>602,9055=>602,9056=>602,9059=>602,9060=>602,9061=>602,9064=>602,9065=>602,9067=>602,9068=>602,9069=>602,9070=>602,9071=>602,9072=>602,9075=>602,9076=>602,9077=>602,9078=>602,9079=>602,9080=>602,9081=>602,9082=>602,9085=>602,9088=>602,9089=>602,9090=>602,9091=>602,9096=>602,9097=>602,9098=>602,9099=>602,9109=>602,9115=>602,9116=>602,9117=>602,9118=>602,9119=>602,9120=>602,9121=>602,9122=>602,9123=>602,9124=>602,9125=>602,9126=>602,9127=>602,9128=>602,9129=>602,9130=>602,9131=>602,9132=>602,9133=>602,9134=>602,9166=>602,9167=>602,9251=>602,9472=>602,9473=>602,9474=>602,9475=>602,9476=>602,9477=>602,9478=>602,9479=>602,9480=>602,9481=>602,9482=>602,9483=>602,9484=>602,9485=>602,9486=>602,9487=>602,9488=>602,9489=>602,9490=>602,9491=>602,9492=>602,9493=>602,9494=>602,9495=>602,9496=>602,9497=>602,9498=>602,9499=>602,9500=>602,9501=>602,9502=>602,9503=>602,9504=>602,9505=>602,9506=>602,9507=>602,9508=>602,9509=>602,9510=>602,9511=>602,9512=>602,9513=>602,9514=>602,9515=>602,9516=>602,9517=>602,9518=>602,9519=>602,9520=>602,9521=>602,9522=>602,9523=>602,9524=>602,9525=>602,9526=>602,9527=>602,9528=>602,9529=>602,9530=>602,9531=>602,9532=>602,9533=>602,9534=>602,9535=>602,9536=>602,9537=>602,9538=>602,9539=>602,9540=>602,9541=>602,9542=>602,9543=>602,9544=>602,9545=>602,9546=>602,9547=>602,9548=>602,9549=>602,9550=>602,9551=>602,9552=>602,9553=>602,9554=>602,9555=>602,9556=>602,9557=>602,9558=>602,9559=>602,9560=>602,9561=>602,9562=>602,9563=>602,9564=>602,9565=>602,9566=>602,9567=>602,9568=>602,9569=>602,9570=>602,9571=>602,9572=>602,9573=>602,9574=>602,9575=>602,9576=>602,9577=>602,9578=>602,9579=>602,9580=>602,9581=>602,9582=>602,9583=>602,9584=>602,9585=>602,9586=>602,9587=>602,9588=>602,9589=>602,9590=>602,9591=>602,9592=>602,9593=>602,9594=>602,9595=>602,9596=>602,9597=>602,9598=>602,9599=>602,9600=>602,9601=>602,9602=>602,9603=>602,9604=>602,9605=>602,9606=>602,9607=>602,9608=>602,9609=>602,9610=>602,9611=>602,9612=>602,9613=>602,9614=>602,9615=>602,9616=>602,9617=>602,9618=>602,9619=>602,9620=>602,9621=>602,9622=>602,9623=>602,9624=>602,9625=>602,9626=>602,9627=>602,9628=>602,9629=>602,9630=>602,9631=>602,9632=>602,9633=>602,9634=>602,9635=>602,9636=>602,9637=>602,9638=>602,9639=>602,9640=>602,9641=>602,9642=>602,9643=>602,9644=>602,9645=>602,9646=>602,9647=>602,9648=>602,9649=>602,9650=>602,9651=>602,9652=>602,9653=>602,9654=>602,9655=>602,9656=>602,9657=>602,9658=>602,9659=>602,9660=>602,9661=>602,9662=>602,9663=>602,9664=>602,9665=>602,9666=>602,9667=>602,9668=>602,9669=>602,9670=>602,9671=>602,9672=>602,9673=>602,9674=>602,9675=>602,9676=>602,9677=>602,9678=>602,9679=>602,9680=>602,9681=>602,9682=>602,9683=>602,9684=>602,9685=>602,9686=>602,9687=>602,9688=>602,9689=>602,9690=>602,9691=>602,9692=>602,9693=>602,9694=>602,9695=>602,9696=>602,9697=>602,9698=>602,9699=>602,9700=>602,9701=>602,9702=>602,9703=>602,9704=>602,9705=>602,9706=>602,9707=>602,9708=>602,9709=>602,9710=>602,9711=>602,9712=>602,9713=>602,9714=>602,9715=>602,9716=>602,9717=>602,9718=>602,9719=>602,9720=>602,9721=>602,9722=>602,9723=>602,9724=>602,9725=>602,9726=>602,9727=>602,9728=>602,9729=>602,9730=>602,9731=>602,9732=>602,9733=>602,9734=>602,9735=>602,9736=>602,9737=>602,9738=>602,9739=>602,9740=>602,9741=>602,9742=>602,9743=>602,9744=>602,9745=>602,9746=>602,9747=>602,9748=>602,9749=>602,9750=>602,9751=>602,9752=>602,9753=>602,9754=>602,9755=>602,9756=>602,9757=>602,9758=>602,9759=>602,9760=>602,9761=>602,9762=>602,9763=>602,9764=>602,9765=>602,9766=>602,9767=>602,9768=>602,9769=>602,9770=>602,9771=>602,9772=>602,9773=>602,9774=>602,9775=>602,9784=>602,9785=>602,9786=>602,9787=>602,9788=>602,9789=>602,9790=>602,9791=>602,9792=>602,9793=>602,9794=>602,9795=>602,9796=>602,9797=>602,9798=>602,9799=>602,9800=>602,9801=>602,9802=>602,9803=>602,9804=>602,9805=>602,9806=>602,9807=>602,9808=>602,9809=>602,9810=>602,9811=>602,9812=>602,9813=>602,9814=>602,9815=>602,9816=>602,9817=>602,9818=>602,9819=>602,9820=>602,9821=>602,9822=>602,9823=>602,9824=>602,9825=>602,9826=>602,9827=>602,9828=>602,9829=>602,9830=>602,9831=>602,9832=>602,9833=>602,9834=>602,9835=>602,9836=>602,9837=>602,9838=>602,9839=>602,9840=>602,9841=>602,9842=>602,9843=>602,9844=>602,9845=>602,9846=>602,9847=>602,9848=>602,9849=>602,9850=>602,9851=>602,9852=>602,9853=>602,9854=>602,9855=>602,9856=>602,9857=>602,9858=>602,9859=>602,9860=>602,9861=>602,9862=>602,9863=>602,9864=>602,9865=>602,9866=>602,9867=>602,9872=>602,9873=>602,9874=>602,9875=>602,9876=>602,9877=>602,9878=>602,9879=>602,9880=>602,9881=>602,9882=>602,9883=>602,9884=>602,9888=>602,9889=>602,9904=>602,9905=>602,9985=>602,9986=>602,9987=>602,9988=>602,9990=>602,9991=>602,9992=>602,9993=>602,9996=>602,9997=>602,9998=>602,9999=>602,10000=>602,10001=>602,10002=>602,10003=>602,10004=>602,10005=>602,10006=>602,10007=>602,10008=>602,10009=>602,10010=>602,10011=>602,10012=>602,10013=>602,10014=>602,10015=>602,10016=>602,10017=>602,10018=>602,10019=>602,10020=>602,10021=>602,10022=>602,10023=>602,10025=>602,10026=>602,10027=>602,10028=>602,10029=>602,10030=>602,10031=>602,10032=>602,10033=>602,10034=>602,10035=>602,10036=>602,10037=>602,10038=>602,10039=>602,10040=>602,10041=>602,10042=>602,10043=>602,10044=>602,10045=>602,10046=>602,10047=>602,10048=>602,10049=>602,10050=>602,10051=>602,10052=>602,10053=>602,10054=>602,10055=>602,10056=>602,10057=>602,10058=>602,10059=>602,10061=>602,10063=>602,10064=>602,10065=>602,10066=>602,10070=>602,10072=>602,10073=>602,10074=>602,10075=>602,10076=>602,10077=>602,10078=>602,10081=>602,10082=>602,10083=>602,10084=>602,10085=>602,10086=>602,10087=>602,10088=>602,10089=>602,10090=>602,10091=>602,10092=>602,10093=>602,10094=>602,10095=>602,10096=>602,10097=>602,10098=>602,10099=>602,10100=>602,10101=>602,10132=>602,10136=>602,10137=>602,10138=>602,10139=>602,10140=>602,10141=>602,10142=>602,10143=>602,10144=>602,10145=>602,10146=>602,10147=>602,10148=>602,10149=>602,10150=>602,10151=>602,10152=>602,10153=>602,10154=>602,10155=>602,10156=>602,10157=>602,10158=>602,10159=>602,10161=>602,10162=>602,10163=>602,10164=>602,10165=>602,10166=>602,10167=>602,10168=>602,10169=>602,10170=>602,10171=>602,10172=>602,10173=>602,10174=>602,10178=>602,10181=>602,10182=>602,10208=>602,10214=>602,10215=>602,10216=>602,10217=>602,10731=>602,10746=>602,10747=>602,10799=>602,10858=>602,10859=>602,11013=>602,11014=>602,11015=>602,11016=>602,11017=>602,11018=>602,11019=>602,11020=>602,11021=>602,11026=>602,11027=>602,11028=>602,11029=>602,11030=>602,11031=>602,11032=>602,11033=>602,11034=>602,11364=>602,11373=>602,11374=>602,11375=>602,11376=>602,11381=>602,11382=>602,11383=>602,11385=>602,11386=>602,11388=>602,11389=>602,11390=>602,11391=>602,11800=>602,11807=>602,11810=>602,11811=>602,11812=>602,11813=>602,11822=>602,42760=>602,42761=>602,42762=>602,42763=>602,42764=>602,42765=>602,42766=>602,42767=>602,42768=>602,42769=>602,42770=>602,42771=>602,42772=>602,42773=>602,42774=>602,42779=>602,42780=>602,42781=>602,42782=>602,42783=>602,42786=>602,42787=>602,42788=>602,42789=>602,42790=>602,42791=>602,42889=>602,42890=>602,42891=>602,42892=>602,42893=>602,42894=>602,42896=>602,42897=>602,42922=>602,63173=>602,64257=>602,64258=>602,64338=>602,64339=>602,64340=>602,64341=>602,64342=>602,64343=>602,64344=>602,64345=>602,64346=>602,64347=>602,64348=>602,64349=>602,64350=>602,64351=>602,64352=>602,64353=>602,64354=>602,64355=>602,64356=>602,64357=>602,64358=>602,64359=>602,64360=>602,64361=>602,64362=>602,64363=>602,64364=>602,64365=>602,64366=>602,64367=>602,64368=>602,64369=>602,64370=>602,64371=>602,64372=>602,64373=>602,64374=>602,64375=>602,64376=>602,64377=>602,64378=>602,64379=>602,64380=>602,64381=>602,64382=>602,64383=>602,64384=>602,64385=>602,64394=>602,64395=>602,64396=>602,64397=>602,64398=>602,64399=>602,64400=>602,64401=>602,64402=>602,64403=>602,64404=>602,64405=>602,64414=>602,64415=>602,64426=>602,64427=>602,64428=>602,64429=>602,64488=>602,64489=>602,64508=>602,64509=>602,64510=>602,64511=>602,65136=>602,65137=>602,65138=>602,65139=>602,65140=>602,65142=>602,65143=>602,65144=>602,65145=>602,65146=>602,65147=>602,65148=>602,65149=>602,65150=>602,65151=>602,65152=>602,65153=>602,65154=>602,65155=>602,65156=>602,65157=>602,65158=>602,65159=>602,65160=>602,65161=>602,65162=>602,65163=>602,65164=>602,65165=>602,65166=>602,65167=>602,65168=>602,65169=>602,65170=>602,65171=>602,65172=>602,65173=>602,65174=>602,65175=>602,65176=>602,65177=>602,65178=>602,65179=>602,65180=>602,65181=>602,65182=>602,65183=>602,65184=>602,65185=>602,65186=>602,65187=>602,65188=>602,65189=>602,65190=>602,65191=>602,65192=>602,65193=>602,65194=>602,65195=>602,65196=>602,65197=>602,65198=>602,65199=>602,65200=>602,65201=>602,65202=>602,65203=>602,65204=>602,65205=>602,65206=>602,65207=>602,65208=>602,65209=>602,65210=>602,65211=>602,65212=>602,65213=>602,65214=>602,65215=>602,65216=>602,65217=>602,65218=>602,65219=>602,65220=>602,65221=>602,65222=>602,65223=>602,65224=>602,65225=>602,65226=>602,65227=>602,65228=>602,65229=>602,65230=>602,65231=>602,65232=>602,65233=>602,65234=>602,65235=>602,65236=>602,65237=>602,65238=>602,65239=>602,65240=>602,65241=>602,65242=>602,65243=>602,65244=>602,65245=>602,65246=>602,65247=>602,65248=>602,65249=>602,65250=>602,65251=>602,65252=>602,65253=>602,65254=>602,65255=>602,65256=>602,65257=>602,65258=>602,65259=>602,65260=>602,65261=>602,65262=>602,65263=>602,65264=>602,65265=>602,65266=>602,65267=>602,65268=>602,65269=>602,65270=>602,65271=>602,65272=>602,65273=>602,65274=>602,65275=>602,65276=>602,65279=>602,65529=>602,65530=>602,65531=>602,65532=>602,65533=>602,65535=>602); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansmono.z b/lib/combodo/tcpdf/fonts/dejavusansmono.z deleted file mode 100644 index 126cc9228..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmono.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonob.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansmonob.ctg.z deleted file mode 100644 index 76b78bc8f..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmonob.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonob.php b/lib/combodo/tcpdf/fonts/dejavusansmonob.php deleted file mode 100644 index 9028c6ec0..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansmonob.php +++ /dev/null @@ -1,16 +0,0 @@ -33,'FontBBox'=>'[-447 -394 731 1052]','ItalicAngle'=>0,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>60,'StemH'=>26,'AvgWidth'=>602,'MaxWidth'=>602,'MissingWidth'=>602); -$cbbox=array(0=>array(51,-177,551,705),33=>array(236,0,366,729),34=>array(113,458,488,729),35=>array(1,0,600,718),36=>array(80,-147,533,760),37=>array(16,0,595,699),38=>array(18,-14,603,742),39=>array(238,458,363,729),40=>array(187,-132,451,759),41=>array(151,-132,415,759),42=>array(59,278,541,742),43=>array(32,45,569,582),44=>array(177,-140,378,179),45=>array(147,217,455,359),46=>array(219,0,382,179),47=>array(55,-93,547,729),48=>array(60,-14,542,742),49=>array(92,0,554,729),50=>array(56,0,519,742),51=>array(61,-14,537,742),52=>array(50,0,557,729),53=>array(70,-14,534,729),54=>array(64,-15,548,741),55=>array(66,0,527,729),56=>array(63,-14,539,742),57=>array(54,-19,538,736),58=>array(219,0,382,519),59=>array(181,-140,382,519),60=>array(43,53,559,574),61=>array(43,144,559,482),62=>array(43,53,559,574),63=>array(114,0,520,742),64=>array(3,-156,566,681),65=>array(16,0,586,729),66=>array(61,0,566,730),67=>array(74,-14,528,742),68=>array(67,0,557,729),69=>array(82,0,536,729),70=>array(89,0,543,729),71=>array(57,-14,552,742),72=>array(67,0,535,729),73=>array(84,0,518,729),74=>array(53,-14,492,729),75=>array(57,0,598,729),76=>array(110,0,562,729),77=>array(42,0,560,729),78=>array(58,0,543,729),79=>array(45,-14,557,742),80=>array(79,0,560,729),81=>array(45,-137,557,742),82=>array(65,0,602,729),83=>array(63,-14,542,742),84=>array(44,0,558,729),85=>array(52,-14,550,729),86=>array(28,0,574,729),87=>array(0,0,602,729),88=>array(13,0,589,729),89=>array(4,0,598,729),90=>array(56,0,567,729),91=>array(206,-132,454,760),92=>array(54,-93,547,729),93=>array(148,-132,396,760),94=>array(28,457,574,729),95=>array(0,-236,602,-143),96=>array(97,616,373,800),97=>array(46,-14,541,560),98=>array(73,-14,558,760),99=>array(82,-14,518,561),100=>array(44,-14,529,760),101=>array(45,-14,561,560),102=>array(85,0,529,760),103=>array(48,-207,535,561),104=>array(84,0,523,760),105=>array(70,0,569,813),106=>array(70,-207,415,813),107=>array(85,0,585,760),108=>array(44,0,534,760),109=>array(40,0,564,560),110=>array(84,0,523,560),111=>array(48,-14,554,560),112=>array(73,-208,558,560),113=>array(44,-208,529,560),114=>array(142,0,562,560),115=>array(84,-14,521,560),116=>array(54,0,524,702),117=>array(78,-14,518,547),118=>array(39,0,563,547),119=>array(0,0,602,547),120=>array(27,0,575,547),121=>array(29,-207,574,547),122=>array(79,0,528,547),123=>array(86,-163,514,760),124=>array(245,-236,356,764),125=>array(88,-163,516,760),126=>array(43,226,559,396),161=>array(236,0,366,729),162=>array(72,-153,506,699),163=>array(58,0,548,742),164=>array(91,86,546,541),165=>array(4,0,598,729),166=>array(245,-171,356,699),167=>array(83,-95,518,742),168=>array(147,654,455,774),169=>array(0,61,602,663),170=>array(125,209,479,742),171=>array(58,69,509,517),172=>array(43,177,559,439),173=>array(147,217,455,359),174=>array(0,61,602,663),175=>array(147,668,455,760),176=>array(138,417,463,742),177=>array(43,0,559,627),178=>array(134,326,459,742),179=>array(140,319,470,742),180=>array(229,616,505,800),181=>array(85,-209,580,547),182=>array(34,-96,520,729),183=>array(219,259,382,437),184=>array(179,-196,400,0),185=>array(153,326,469,734),186=>array(134,209,488,742),187=>array(94,69,545,517),188=>array(23,-132,558,810),189=>array(23,-132,558,810),190=>array(23,-132,558,818),191=>array(86,-13,491,729),192=>array(16,0,586,927),193=>array(16,0,586,927),194=>array(16,0,586,927),195=>array(16,0,586,928),196=>array(16,0,586,927),197=>array(16,0,586,928),198=>array(0,0,576,729),199=>array(74,-196,528,742),200=>array(82,0,536,927),201=>array(82,0,536,927),202=>array(82,0,536,927),203=>array(82,0,536,927),204=>array(84,0,518,927),205=>array(84,0,518,927),206=>array(84,0,518,927),207=>array(84,0,518,927),208=>array(0,0,557,729),209=>array(58,0,543,928),210=>array(45,-14,557,927),211=>array(45,-14,557,927),212=>array(45,-14,557,927),213=>array(45,-14,557,928),214=>array(45,-14,557,927),215=>array(58,72,543,556),216=>array(-3,-31,596,761),217=>array(52,-14,550,927),218=>array(52,-14,550,927),219=>array(52,-14,550,927),220=>array(52,-14,550,927),221=>array(4,0,598,927),222=>array(79,0,560,729),223=>array(62,-14,573,760),224=>array(46,-14,541,800),225=>array(46,-14,541,800),226=>array(46,-14,541,800),227=>array(46,-14,541,778),228=>array(46,-14,541,774),229=>array(46,-14,541,888),230=>array(7,-14,580,560),231=>array(82,-196,518,561),232=>array(45,-14,561,800),233=>array(45,-14,561,800),234=>array(45,-14,561,800),235=>array(45,-14,561,774),236=>array(70,0,569,800),237=>array(70,0,569,800),238=>array(70,0,569,800),239=>array(70,0,569,774),240=>array(48,-14,550,765),241=>array(84,0,523,778),242=>array(48,-14,554,801),243=>array(48,-14,554,800),244=>array(48,-14,554,800),245=>array(48,-14,554,762),246=>array(48,-14,554,762),247=>array(32,42,569,585),248=>array(12,-57,587,603),249=>array(78,-14,518,800),250=>array(78,-14,518,800),251=>array(78,-14,518,800),252=>array(78,-14,518,774),253=>array(29,-207,574,800),254=>array(73,-208,558,760),255=>array(29,-207,574,774),256=>array(16,0,586,913),257=>array(46,-14,541,760),258=>array(16,0,586,927),259=>array(46,-14,541,784),260=>array(16,-196,600,729),261=>array(46,-196,553,560),262=>array(74,-14,532,927),263=>array(82,-14,555,800),264=>array(74,-14,561,927),265=>array(82,-14,536,800),266=>array(74,-14,528,927),267=>array(82,-14,518,774),268=>array(74,-14,552,927),269=>array(82,-14,535,800),270=>array(67,0,557,936),271=>array(44,-14,711,760),272=>array(0,0,557,729),273=>array(44,-14,600,760),274=>array(82,0,536,913),275=>array(45,-14,561,760),276=>array(82,0,536,927),277=>array(45,-14,561,784),278=>array(82,0,536,927),279=>array(45,-14,561,774),280=>array(82,-196,537,729),281=>array(45,-196,561,560),282=>array(82,0,536,927),283=>array(45,-14,561,802),284=>array(57,-14,552,927),285=>array(48,-207,535,800),286=>array(57,-14,552,927),287=>array(48,-207,535,784),288=>array(57,-14,552,927),289=>array(48,-207,535,774),290=>array(57,-241,552,742),291=>array(48,-207,535,764),292=>array(67,0,535,927),293=>array(-30,0,523,927),294=>array(1,0,601,729),295=>array(6,0,523,760),296=>array(84,0,518,928),297=>array(70,0,569,778),298=>array(84,0,518,913),299=>array(70,0,569,760),300=>array(84,0,518,927),301=>array(70,0,569,784),302=>array(84,-196,518,729),303=>array(70,-196,569,813),304=>array(84,0,518,927),305=>array(70,0,569,547),306=>array(-4,-13,601,730),307=>array(4,-212,602,813),308=>array(53,-14,516,927),309=>array(70,-207,485,800),310=>array(57,-227,598,729),311=>array(85,-227,585,760),312=>array(85,0,585,547),313=>array(110,0,562,928),314=>array(44,0,534,928),315=>array(110,-227,562,729),316=>array(44,-227,534,760),317=>array(110,0,562,729),318=>array(44,0,581,760),319=>array(110,0,571,729),320=>array(44,0,597,760),321=>array(-19,0,562,729),322=>array(18,0,545,760),323=>array(58,0,543,928),324=>array(84,0,523,803),325=>array(58,-227,543,729),326=>array(84,-227,523,560),327=>array(58,0,543,927),328=>array(84,0,523,800),329=>array(-54,0,601,760),330=>array(52,-208,549,743),331=>array(84,-207,523,560),332=>array(45,-14,557,913),333=>array(48,-14,554,760),334=>array(45,-14,557,927),335=>array(48,-14,554,784),336=>array(45,-14,557,927),337=>array(48,-14,554,800),338=>array(33,0,594,729),339=>array(7,-14,591,560),340=>array(65,0,602,928),341=>array(142,0,580,803),342=>array(65,-227,602,729),343=>array(123,-227,562,560),344=>array(65,0,602,927),345=>array(142,0,562,800),346=>array(63,-14,542,928),347=>array(84,-14,521,803),348=>array(63,-14,542,927),349=>array(84,-14,521,800),350=>array(63,-196,542,742),351=>array(84,-196,521,560),352=>array(63,-14,542,927),353=>array(84,-14,521,800),354=>array(44,-196,558,729),355=>array(54,-196,524,702),356=>array(44,0,558,933),357=>array(54,0,582,824),358=>array(44,0,558,729),359=>array(54,0,524,702),360=>array(52,-14,550,928),361=>array(78,-14,518,778),362=>array(52,-14,550,913),363=>array(78,-14,518,760),364=>array(52,-14,550,927),365=>array(78,-14,518,784),366=>array(52,-14,550,1052),367=>array(78,-14,518,888),368=>array(52,-14,550,927),369=>array(78,-14,530,800),370=>array(52,-204,550,729),371=>array(78,-196,600,547),372=>array(0,0,602,931),373=>array(0,0,602,803),374=>array(4,0,598,931),375=>array(29,-207,574,803),376=>array(4,0,598,927),377=>array(56,0,567,928),378=>array(79,0,528,803),379=>array(56,0,567,927),380=>array(79,0,528,774),381=>array(56,0,567,927),382=>array(79,0,528,800),383=>array(85,0,529,760),384=>array(6,-14,558,760),385=>array(0,0,598,730),386=>array(79,0,560,729),387=>array(73,-14,558,760),388=>array(21,0,581,729),389=>array(22,-14,580,760),390=>array(74,-14,528,742),391=>array(74,-14,624,802),392=>array(82,-14,626,760),393=>array(0,0,557,729),394=>array(-14,0,589,729),395=>array(61,0,566,729),396=>array(73,-14,558,760),397=>array(47,-220,554,560),398=>array(82,0,536,729),399=>array(45,-14,557,742),400=>array(61,-14,537,742),401=>array(53,-207,549,729),402=>array(44,-207,558,760),403=>array(19,-14,583,802),404=>array(16,-142,586,729),405=>array(6,-1,596,760),406=>array(84,0,551,729),407=>array(84,0,518,729),408=>array(9,0,593,729),409=>array(85,0,585,760),410=>array(44,0,534,760),411=>array(39,0,563,760),412=>array(40,-13,564,729),413=>array(15,-208,587,729),414=>array(84,-208,523,560),415=>array(45,-14,557,742),416=>array(2,-14,600,759),417=>array(4,-14,598,570),418=>array(14,-14,588,742),419=>array(9,-208,602,560),420=>array(10,0,592,729),421=>array(73,-208,558,760),422=>array(65,-116,602,729),423=>array(63,-14,542,742),424=>array(84,-14,521,560),425=>array(48,0,559,729),426=>array(29,-207,558,760),427=>array(54,-207,524,702),428=>array(10,0,558,730),429=>array(54,0,524,760),430=>array(44,-208,558,729),431=>array(2,-14,600,759),432=>array(3,-14,599,570),433=>array(44,0,558,713),434=>array(57,0,540,729),435=>array(1,0,601,729),436=>array(14,-207,588,547),437=>array(56,0,567,729),438=>array(77,0,525,547),439=>array(5,-14,597,729),440=>array(5,-14,597,729),441=>array(54,-215,548,547),442=>array(64,-208,536,547),443=>array(56,0,519,742),444=>array(5,-14,597,729),445=>array(54,-215,548,547),446=>array(71,-15,531,702),447=>array(40,-208,556,560),448=>array(236,0,366,729),449=>array(124,0,478,729),450=>array(36,0,566,729),451=>array(236,0,366,729),461=>array(16,0,586,927),462=>array(46,-14,541,800),463=>array(84,0,518,927),464=>array(70,0,569,800),465=>array(45,-14,557,927),466=>array(48,-14,554,800),467=>array(52,-14,550,927),468=>array(78,-14,518,800),469=>array(52,-14,550,985),470=>array(78,-14,518,914),471=>array(52,-14,550,1008),472=>array(78,-14,518,1002),473=>array(52,-14,550,1008),474=>array(78,-14,518,1002),475=>array(52,-14,550,1008),476=>array(78,-14,518,1002),477=>array(45,-14,561,560),478=>array(16,0,586,985),479=>array(46,-14,541,914),480=>array(16,0,586,985),481=>array(46,-14,541,914),482=>array(0,0,576,913),483=>array(7,-14,580,760),486=>array(57,-14,552,927),487=>array(48,-207,535,800),488=>array(57,0,598,927),489=>array(85,0,585,927),490=>array(45,-204,557,742),491=>array(48,-204,554,560),492=>array(45,-204,557,913),493=>array(48,-204,554,760),494=>array(5,-14,597,927),495=>array(54,-215,548,800),496=>array(70,-207,493,802),500=>array(57,-14,552,927),501=>array(48,-207,535,800),502=>array(12,-14,590,729),504=>array(58,0,543,927),505=>array(84,0,523,801),508=>array(0,0,576,927),509=>array(7,-14,580,800),510=>array(-3,-31,596,927),511=>array(12,-57,587,800),512=>array(16,0,586,927),513=>array(46,-14,541,800),514=>array(16,0,586,927),515=>array(46,-14,541,784),516=>array(54,0,536,927),517=>array(45,-14,561,800),518=>array(82,0,536,927),519=>array(45,-14,561,784),520=>array(54,0,518,927),521=>array(69,0,569,800),522=>array(84,0,518,927),523=>array(70,0,569,784),524=>array(45,-14,557,927),525=>array(48,-14,554,800),526=>array(45,-14,557,927),527=>array(48,-14,554,784),528=>array(30,0,602,927),529=>array(118,0,562,800),530=>array(65,0,602,927),531=>array(142,0,562,784),532=>array(52,-14,550,927),533=>array(69,-14,518,800),534=>array(52,-14,550,927),535=>array(78,-14,518,784),536=>array(63,-246,542,742),537=>array(84,-246,521,560),538=>array(44,-246,558,729),539=>array(54,-246,524,702),540=>array(26,-210,576,742),541=>array(54,-211,548,560),542=>array(67,0,535,927),543=>array(84,0,523,927),544=>array(52,-208,549,743),545=>array(4,-68,598,760),548=>array(56,-207,567,729),549=>array(79,-207,528,547),550=>array(16,0,586,927),551=>array(46,-14,541,774),552=>array(82,-196,536,729),553=>array(45,-196,561,560),554=>array(45,-14,557,985),555=>array(48,-14,554,914),556=>array(45,-14,557,985),557=>array(48,-14,554,914),558=>array(45,-14,557,927),559=>array(48,-14,554,774),560=>array(45,-14,557,985),561=>array(48,-14,554,914),562=>array(4,0,598,913),563=>array(29,-207,574,760),564=>array(24,-68,578,760),565=>array(18,-68,584,560),566=>array(54,-68,524,702),567=>array(70,-207,415,547),568=>array(11,-14,591,760),569=>array(11,-214,591,560),570=>array(-3,-31,596,761),571=>array(-3,-31,596,761),572=>array(12,-57,587,603),573=>array(14,0,588,729),574=>array(6,-31,605,761),575=>array(84,-240,521,560),576=>array(79,-240,528,547),577=>array(14,0,588,729),579=>array(0,0,566,730),580=>array(10,-14,592,729),581=>array(28,0,574,729),588=>array(10,0,602,729),589=>array(94,0,562,560),592=>array(54,-14,549,560),593=>array(59,-14,543,560),594=>array(59,-14,543,560),595=>array(73,-14,558,759),596=>array(84,-14,520,561),597=>array(79,-69,523,561),598=>array(38,-162,538,760),599=>array(34,-14,539,759),600=>array(43,-14,559,560),601=>array(45,-14,561,560),602=>array(3,-14,599,560),603=>array(73,-11,510,557),604=>array(50,-11,552,560),605=>array(23,-11,579,560),606=>array(53,-21,549,559),607=>array(70,-207,514,547),608=>array(8,-208,594,760),609=>array(61,-208,542,547),610=>array(75,0,527,546),611=>array(48,-203,554,554),612=>array(48,-59,554,547),613=>array(82,-214,521,546),614=>array(82,0,521,759),615=>array(82,-208,521,759),616=>array(52,0,551,760),617=>array(70,-1,531,547),618=>array(52,0,551,547),619=>array(43,-1,560,759),620=>array(53,0,549,760),621=>array(56,-217,546,760),622=>array(13,-215,589,760),623=>array(39,-13,563,547),624=>array(39,-208,563,547),625=>array(39,-208,563,560),626=>array(31,-216,571,560),627=>array(33,-216,569,560),628=>array(59,0,543,547),629=>array(48,-14,554,560),630=>array(37,-1,565,547),631=>array(40,0,562,574),632=>array(10,-208,592,762),633=>array(91,-13,511,547),634=>array(91,-13,511,759),635=>array(38,-208,564,547),636=>array(91,-208,511,560),637=>array(91,-208,511,560),638=>array(66,0,536,547),639=>array(66,0,536,547),640=>array(51,0,551,547),641=>array(32,0,570,547),642=>array(83,-208,520,560),643=>array(44,-207,558,760),644=>array(44,-207,558,760),645=>array(44,-207,558,760),646=>array(29,-207,558,760),647=>array(66,-155,536,547),648=>array(66,-208,536,702),649=>array(43,-14,559,547),650=>array(42,-51,561,547),651=>array(41,-1,561,547),652=>array(39,0,563,547),653=>array(0,0,602,547),654=>array(28,0,574,754),655=>array(33,0,569,547),656=>array(22,-208,579,547),657=>array(58,-55,544,547),658=>array(54,-215,548,547),659=>array(49,-215,553,547),660=>array(81,0,521,759),661=>array(81,0,521,759),662=>array(81,0,521,759),663=>array(81,-208,521,759),664=>array(27,-28,575,582),665=>array(58,0,544,547),666=>array(53,-21,549,559),667=>array(30,0,572,759),668=>array(59,0,543,547),669=>array(46,-208,557,813),670=>array(51,-208,551,547),671=>array(115,0,487,547),672=>array(34,-208,538,759),673=>array(71,0,531,759),674=>array(71,0,531,759),675=>array(25,-14,577,760),676=>array(11,-219,591,756),677=>array(14,-55,588,760),678=>array(32,-14,570,702),679=>array(67,-207,535,760),680=>array(40,-69,563,702),681=>array(36,-207,566,760),682=>array(25,-14,577,760),683=>array(22,-2,580,760),684=>array(28,0,574,641),685=>array(140,86,462,641),686=>array(27,-214,575,759),687=>array(40,-208,563,759),688=>array(161,326,441,752),689=>array(161,326,441,751),690=>array(190,177,412,748),691=>array(167,326,436,640),692=>array(167,319,436,633),693=>array(132,209,470,632),694=>array(129,326,473,633),695=>array(108,326,494,633),696=>array(126,211,476,633),697=>array(244,557,384,800),699=>array(211,441,412,760),700=>array(211,441,412,760),701=>array(234,595,368,844),702=>array(231,481,371,760),703=>array(231,481,371,760),704=>array(160,326,442,751),705=>array(160,326,442,751),710=>array(117,616,485,800),711=>array(117,616,485,800),712=>array(254,488,348,759),713=>array(147,668,455,760),716=>array(254,-81,348,190),717=>array(147,-198,455,-106),718=>array(145,-285,421,-102),719=>array(181,-285,457,-102),720=>array(201,0,401,547),721=>array(201,361,401,547),722=>array(231,269,371,547),723=>array(231,269,371,547),726=>array(147,119,455,427),727=>array(191,229,411,317),728=>array(137,639,465,784),729=>array(234,654,368,774),730=>array(162,610,440,888),731=>array(218,-196,427,0),732=>array(131,638,471,778),733=>array(145,616,530,800),734=>array(-152,213,453,524),736=>array(139,216,463,640),737=>array(144,326,458,752),738=>array(161,319,441,640),739=>array(125,326,477,633),740=>array(160,326,442,751),741=>array(134,0,468,693),742=>array(134,0,468,693),743=>array(134,0,468,693),744=>array(134,0,468,693),745=>array(134,0,468,693),750=>array(73,441,528,760),755=>array(194,-245,408,-31),768=>array(97,616,373,800),769=>array(229,616,505,800),770=>array(117,616,485,800),771=>array(131,638,471,778),772=>array(147,668,455,760),773=>array(0,663,602,755),774=>array(137,639,465,784),775=>array(234,654,368,774),776=>array(147,654,455,774),777=>array(190,616,412,849),778=>array(162,610,440,888),779=>array(145,616,530,800),780=>array(117,616,485,800),781=>array(255,616,348,833),782=>array(116,616,487,833),783=>array(69,616,454,800),784=>array(137,639,465,879),785=>array(137,639,465,784),786=>array(218,441,399,590),787=>array(234,595,368,844),788=>array(234,595,368,844),789=>array(229,616,404,800),790=>array(163,-290,439,-106),791=>array(163,-290,439,-106),792=>array(179,-394,361,-123),793=>array(230,-394,413,-123),794=>array(166,658,437,929),795=>array(203,361,399,570),796=>array(248,-245,354,-31),797=>array(167,-305,438,-123),798=>array(154,-394,425,-212),799=>array(172,-394,443,-123),800=>array(166,-215,437,-123),801=>array(273,-207,523,82),802=>array(82,-208,332,81),803=>array(234,-226,368,-105),804=>array(147,-226,455,-105),805=>array(194,-245,408,-31),806=>array(182,-246,363,-97),807=>array(179,-196,400,0),808=>array(196,-196,406,0),809=>array(255,-323,347,-106),810=>array(147,-289,455,-106),811=>array(102,-239,500,-94),812=>array(117,-237,485,-53),813=>array(117,-237,485,-53),814=>array(137,-240,465,-95),815=>array(137,-239,465,-94),816=>array(131,-238,471,-98),817=>array(147,-198,455,-106),818=>array(0,-236,602,-143),819=>array(0,-236,602,-9),820=>array(43,226,559,396),821=>array(94,214,472,309),822=>array(0,214,602,309),823=>array(12,-57,587,603),824=>array(-3,-31,596,761),825=>array(248,-245,354,-31),826=>array(147,-254,455,-71),827=>array(161,-386,441,-106),828=>array(102,-239,500,-94),829=>array(172,582,430,839),830=>array(231,595,371,867),831=>array(0,528,602,755),835=>array(234,595,368,844),856=>array(465,654,600,774),865=>array(-118,735,720,880),884=>array(244,557,384,800),885=>array(218,-208,358,35),890=>array(253,-208,383,-45),894=>array(181,-140,382,519),900=>array(229,616,505,800),901=>array(147,654,505,999),902=>array(-40,0,586,800),903=>array(219,259,382,437),904=>array(-171,0,536,800),905=>array(-191,0,535,800),906=>array(-162,0,518,800),908=>array(-83,-14,557,800),910=>array(-242,0,598,800),911=>array(-62,0,558,800),912=>array(132,0,505,999),913=>array(16,0,586,729),914=>array(61,0,566,730),915=>array(89,0,543,729),916=>array(16,0,586,729),917=>array(82,0,536,729),918=>array(56,0,567,729),919=>array(67,0,535,729),920=>array(45,-14,557,742),921=>array(84,0,518,729),922=>array(57,0,598,729),923=>array(16,0,586,729),924=>array(42,0,560,729),925=>array(58,0,543,729),926=>array(67,0,535,729),927=>array(45,-14,557,742),928=>array(67,0,535,729),929=>array(79,0,560,729),931=>array(48,0,559,729),932=>array(44,0,558,729),933=>array(4,0,598,729),934=>array(45,0,557,729),935=>array(13,0,589,729),936=>array(39,0,563,729),937=>array(44,0,558,713),938=>array(84,0,518,927),939=>array(4,0,598,927),940=>array(26,-12,568,800),941=>array(73,-11,510,800),942=>array(84,-208,523,800),943=>array(132,0,505,800),944=>array(37,0,565,999),945=>array(26,-12,568,559),946=>array(64,-208,554,766),947=>array(27,-208,563,547),948=>array(48,-14,554,766),949=>array(73,-11,510,557),950=>array(70,-208,517,760),951=>array(84,-208,523,560),952=>array(47,-12,554,770),953=>array(132,0,478,547),954=>array(85,0,585,547),955=>array(39,0,563,760),956=>array(85,-209,580,547),957=>array(23,0,559,547),958=>array(70,-208,517,760),959=>array(48,-14,554,560),960=>array(7,-19,593,547),961=>array(73,-208,558,560),962=>array(82,-208,521,561),963=>array(48,-14,570,547),964=>array(66,0,536,547),965=>array(37,0,565,547),966=>array(32,-208,570,552),967=>array(35,-208,567,547),968=>array(34,-208,569,547),969=>array(31,-14,571,547),970=>array(132,0,478,774),971=>array(37,0,565,774),972=>array(48,-14,554,800),973=>array(37,0,565,800),974=>array(31,-14,571,800),976=>array(55,-11,508,768),977=>array(51,-11,553,768),978=>array(17,0,582,729),979=>array(-232,0,582,800),980=>array(17,0,582,927),981=>array(28,-208,573,760),982=>array(15,0,587,547),983=>array(25,-188,571,547),984=>array(45,-208,557,742),985=>array(48,-208,554,560),986=>array(47,-222,570,729),987=>array(44,-208,557,547),988=>array(89,0,543,729),989=>array(6,-208,491,760),990=>array(48,-2,566,729),991=>array(56,0,545,759),992=>array(0,-208,581,742),993=>array(22,-180,537,559),1008=>array(25,-3,571,547),1009=>array(73,-213,558,560),1010=>array(82,-14,518,561),1011=>array(70,-207,415,813),1012=>array(45,-14,557,742),1013=>array(78,-14,514,561),1014=>array(82,-14,518,561),1015=>array(79,0,560,729),1016=>array(73,-208,558,760),1017=>array(74,-14,528,742),1018=>array(42,0,560,729),1019=>array(42,-208,560,498),1020=>array(22,-208,558,560),1021=>array(74,-14,528,742),1022=>array(74,-14,528,742),1023=>array(74,-14,528,742),1024=>array(82,0,536,927),1025=>array(82,0,536,927),1026=>array(-17,-207,577,760),1027=>array(89,0,543,927),1028=>array(74,-14,528,742),1029=>array(63,-14,542,742),1030=>array(84,0,518,729),1031=>array(84,0,518,927),1032=>array(53,-14,492,729),1033=>array(-7,0,597,729),1034=>array(10,0,597,729),1035=>array(-17,0,577,760),1036=>array(57,0,598,927),1037=>array(58,0,543,927),1038=>array(14,0,588,927),1039=>array(67,-157,535,729),1040=>array(16,0,586,729),1041=>array(79,0,560,729),1042=>array(61,0,566,730),1043=>array(89,0,543,729),1044=>array(20,-157,582,729),1045=>array(82,0,536,729),1046=>array(6,0,596,729),1047=>array(61,-14,537,742),1048=>array(58,0,543,729),1049=>array(58,0,543,927),1050=>array(57,0,598,729),1051=>array(3,0,535,729),1052=>array(42,0,560,729),1053=>array(67,0,535,729),1054=>array(45,-14,557,742),1055=>array(67,0,535,729),1056=>array(79,0,560,729),1057=>array(74,-14,528,742),1058=>array(44,0,558,729),1059=>array(14,0,588,729),1060=>array(17,0,590,729),1061=>array(13,0,589,729),1062=>array(39,-157,574,729),1063=>array(49,0,550,760),1064=>array(38,0,563,729),1065=>array(38,-157,596,729),1066=>array(10,0,574,729),1067=>array(20,0,583,729),1068=>array(61,0,542,729),1069=>array(74,-14,528,742),1070=>array(0,-14,598,742),1071=>array(41,0,566,729),1072=>array(46,-14,541,560),1073=>array(32,-14,554,787),1074=>array(58,0,544,547),1075=>array(108,0,499,547),1076=>array(31,-140,577,547),1077=>array(45,-14,561,560),1078=>array(7,0,596,547),1079=>array(75,-11,527,560),1080=>array(74,0,533,547),1081=>array(74,0,533,784),1082=>array(85,0,585,547),1083=>array(34,0,551,547),1084=>array(42,0,560,547),1085=>array(84,0,523,547),1086=>array(48,-14,554,560),1087=>array(84,0,523,547),1088=>array(73,-208,558,560),1089=>array(82,-14,518,561),1090=>array(80,0,523,547),1091=>array(29,-207,574,547),1092=>array(39,-208,563,760),1093=>array(27,0,575,547),1094=>array(47,-140,563,547),1095=>array(67,0,518,547),1096=>array(38,0,563,547),1097=>array(28,-140,596,547),1098=>array(20,0,568,547),1099=>array(15,0,586,547),1100=>array(67,0,518,547),1101=>array(82,-14,518,560),1102=>array(27,-14,568,560),1103=>array(47,0,541,547),1104=>array(45,-14,561,800),1105=>array(45,-14,561,774),1106=>array(10,-207,558,760),1107=>array(108,0,505,800),1108=>array(82,-14,518,561),1109=>array(84,-14,521,560),1110=>array(70,0,569,813),1111=>array(70,0,569,774),1112=>array(70,-207,415,813),1113=>array(2,0,599,547),1114=>array(17,0,599,547),1115=>array(10,0,532,760),1116=>array(85,0,585,800),1117=>array(74,0,533,800),1118=>array(29,-207,574,784),1119=>array(83,-140,523,547),1122=>array(10,0,574,729),1123=>array(20,0,568,760),1138=>array(45,-14,557,742),1139=>array(48,-14,554,560),1168=>array(89,0,543,878),1169=>array(108,0,499,700),1170=>array(23,0,543,729),1171=>array(45,0,499,547),1172=>array(89,-207,566,729),1173=>array(108,-207,523,547),1174=>array(6,-157,596,729),1175=>array(7,-140,597,547),1176=>array(61,-196,537,742),1177=>array(75,-196,527,560),1178=>array(57,-157,598,729),1179=>array(85,-140,585,547),1186=>array(18,-157,602,729),1187=>array(14,-140,594,547),1188=>array(38,0,592,729),1189=>array(38,0,590,547),1194=>array(74,-196,528,742),1195=>array(82,-196,518,561),1196=>array(44,-157,558,729),1197=>array(80,-140,523,547),1198=>array(4,0,598,729),1199=>array(28,-208,574,547),1200=>array(4,0,598,729),1201=>array(28,-208,574,547),1202=>array(13,-157,589,729),1203=>array(27,-140,575,547),1210=>array(49,0,550,760),1211=>array(84,0,523,760),1216=>array(84,0,518,729),1217=>array(6,0,596,927),1218=>array(7,0,596,784),1219=>array(57,-207,590,729),1220=>array(85,-207,573,547),1223=>array(67,-207,535,729),1224=>array(84,-207,523,547),1227=>array(49,-157,550,760),1228=>array(67,-140,518,547),1231=>array(189,0,332,760),1232=>array(16,0,586,927),1233=>array(46,-14,541,784),1234=>array(16,0,586,927),1235=>array(46,-14,541,774),1236=>array(0,0,576,729),1237=>array(7,-14,580,560),1238=>array(82,0,536,927),1239=>array(45,-14,561,784),1240=>array(45,-14,557,742),1241=>array(45,-14,561,560),1242=>array(45,-14,557,927),1243=>array(45,-14,561,762),1244=>array(6,0,596,927),1245=>array(7,0,596,762),1246=>array(61,-14,537,927),1247=>array(75,-11,527,762),1248=>array(5,-14,597,729),1249=>array(54,-215,548,547),1250=>array(58,0,543,913),1251=>array(74,0,533,760),1252=>array(58,0,543,927),1253=>array(74,0,533,762),1254=>array(45,-14,557,927),1255=>array(48,-14,554,762),1256=>array(45,-14,557,742),1257=>array(48,-14,554,560),1258=>array(45,-14,557,927),1259=>array(48,-14,554,762),1260=>array(74,-14,528,927),1261=>array(82,-14,518,762),1262=>array(14,0,588,913),1263=>array(29,-207,574,760),1264=>array(14,0,588,927),1265=>array(29,-207,574,762),1266=>array(14,0,588,927),1267=>array(29,-207,574,800),1268=>array(49,0,550,927),1269=>array(67,0,518,762),1270=>array(89,-157,543,729),1271=>array(108,-140,499,547),1272=>array(20,0,583,927),1273=>array(15,0,586,762),1296=>array(61,-14,537,742),1297=>array(73,-11,510,557),1306=>array(45,-137,557,742),1307=>array(44,-208,529,560),1308=>array(0,0,602,729),1309=>array(0,0,602,547),1329=>array(35,-31,567,729),1330=>array(48,0,554,743),1331=>array(16,0,585,743),1332=>array(16,0,585,743),1333=>array(48,-14,561,729),1334=>array(38,0,564,743),1335=>array(55,0,547,729),1336=>array(48,0,554,743),1337=>array(21,-14,581,743),1338=>array(16,-14,585,729),1339=>array(52,0,550,729),1340=>array(75,0,527,729),1341=>array(38,-13,564,729),1342=>array(17,-14,584,742),1343=>array(52,0,550,729),1344=>array(31,-37,571,729),1345=>array(35,-31,567,743),1346=>array(16,0,585,743),1347=>array(35,0,567,741),1348=>array(16,-14,585,729),1349=>array(24,-14,577,741),1350=>array(16,-14,585,729),1351=>array(37,-13,565,729),1352=>array(52,0,550,743),1353=>array(38,-39,564,743),1354=>array(25,0,577,741),1355=>array(35,0,566,741),1356=>array(16,0,585,743),1357=>array(52,-14,550,729),1358=>array(16,0,585,729),1359=>array(51,-14,550,742),1360=>array(52,0,550,743),1361=>array(24,-13,577,741),1362=>array(55,0,547,729),1363=>array(15,0,586,729),1364=>array(25,0,577,741),1365=>array(45,-14,557,742),1366=>array(15,-14,586,729),1369=>array(231,481,371,760),1370=>array(200,411,401,730),1371=>array(133,616,468,800),1372=>array(66,618,535,893),1373=>array(133,616,468,800),1374=>array(33,590,569,906),1375=>array(92,618,510,760),1377=>array(39,-13,563,547),1378=>array(73,-208,529,560),1379=>array(32,-208,570,560),1380=>array(50,-208,552,560),1381=>array(70,-14,532,760),1382=>array(32,-208,570,560),1383=>array(88,0,514,760),1384=>array(73,-208,529,560),1385=>array(26,-208,575,560),1386=>array(32,-14,570,760),1387=>array(82,-208,521,760),1388=>array(160,-208,442,547),1389=>array(39,-208,563,760),1390=>array(48,-14,554,760),1391=>array(81,-208,521,760),1392=>array(82,0,521,760),1393=>array(75,-14,527,760),1394=>array(50,-208,552,560),1395=>array(67,-14,534,741),1396=>array(81,-14,583,760),1397=>array(128,-207,474,547),1398=>array(50,-13,552,760),1399=>array(77,-208,525,559),1400=>array(82,0,521,560),1401=>array(110,-208,492,579),1402=>array(39,-208,563,547),1403=>array(67,-208,535,559),1404=>array(57,0,545,560),1405=>array(81,-14,521,547),1406=>array(47,-208,555,760),1407=>array(40,-13,562,560),1408=>array(82,-208,521,560),1409=>array(57,-207,544,561),1410=>array(92,0,510,547),1411=>array(40,-208,562,760),1412=>array(32,-208,570,560),1413=>array(48,-14,554,560),1414=>array(21,-208,581,760),1415=>array(22,-14,580,760),1417=>array(220,0,382,519),1418=>array(147,188,455,359),1542=>array(29,-19,578,928),1543=>array(29,-19,578,928),1545=>array(0,0,602,635),1546=>array(0,0,602,635),1548=>array(215,0,388,274),1557=>array(168,623,425,896),1563=>array(195,0,368,637),1567=>array(82,0,488,742),1569=>array(203,13,522,483),1570=>array(109,0,492,973),1571=>array(211,0,388,1041),1572=>array(37,-244,572,633),1573=>array(211,-329,388,760),1574=>array(0,-171,602,609),1575=>array(229,0,372,760),1576=>array(13,-172,597,263),1577=>array(86,-28,518,549),1578=>array(13,-18,597,427),1579=>array(13,-18,597,598),1580=>array(43,-244,584,444),1581=>array(43,-244,584,444),1582=>array(43,-244,584,623),1583=>array(113,-19,537,456),1584=>array(113,-19,537,658),1585=>array(-25,-246,565,267),1586=>array(-25,-246,565,481),1587=>array(-96,-240,602,366),1588=>array(-96,-240,602,671),1589=>array(-139,-240,594,319),1590=>array(-139,-240,594,449),1591=>array(5,0,588,760),1592=>array(5,0,588,760),1593=>array(35,-244,589,549),1594=>array(35,-244,589,701),1600=>array(-16,0,618,110),1601=>array(-52,-64,602,619),1602=>array(0,-230,602,696),1603=>array(4,-46,593,760),1604=>array(0,-181,568,760),1605=>array(29,-240,563,357),1606=>array(9,-162,586,464),1607=>array(86,-28,518,358),1608=>array(37,-244,572,330),1609=>array(0,-171,602,432),1610=>array(0,-323,602,432),1611=>array(148,563,453,854),1612=>array(111,552,456,884),1613=>array(148,-295,453,-4),1614=>array(148,563,453,729),1615=>array(146,580,456,884),1616=>array(148,-171,453,-4),1617=>array(124,591,478,869),1618=>array(154,597,448,891),1619=>array(109,580,492,743),1620=>array(211,573,388,820),1621=>array(211,-293,388,-47),1626=>array(152,616,449,775),1632=>array(221,189,382,373),1633=>array(178,0,424,684),1634=>array(61,0,563,684),1635=>array(30,0,583,684),1636=>array(84,-10,486,684),1637=>array(50,-22,553,684),1638=>array(32,0,570,684),1639=>array(44,0,560,684),1640=>array(44,0,560,684),1641=>array(60,0,561,684),1642=>array(66,0,536,635),1643=>array(132,-129,470,318),1644=>array(215,485,388,760),1645=>array(71,101,531,537),1652=>array(211,629,388,876),1657=>array(13,-18,597,604),1658=>array(13,-18,597,549),1659=>array(13,-357,597,263),1662=>array(13,-355,597,263),1663=>array(13,-18,597,600),1664=>array(13,-340,597,263),1667=>array(43,-244,584,444),1668=>array(43,-244,584,444),1670=>array(43,-244,586,444),1671=>array(43,-244,586,444),1681=>array(-25,-246,598,611),1688=>array(-25,-246,598,655),1700=>array(-52,-64,602,785),1705=>array(5,-60,670,803),1711=>array(5,-60,671,991),1726=>array(-46,-42,602,498),1740=>array(0,-171,602,432),1776=>array(221,189,382,373),1777=>array(178,0,424,684),1778=>array(61,0,563,684),1779=>array(30,0,583,684),1780=>array(30,0,550,684),1781=>array(37,-13,564,684),1782=>array(104,0,497,684),1783=>array(44,0,560,684),1784=>array(44,0,560,684),1785=>array(60,0,561,684),3713=>array(30,-10,556,560),3714=>array(53,-39,609,568),3716=>array(59,-10,561,568),3719=>array(70,-238,535,568),3720=>array(37,-0,565,575),3722=>array(35,-238,598,563),3725=>array(50,-14,552,560),3732=>array(60,-14,542,560),3733=>array(26,-15,576,579),3734=>array(13,-240,554,560),3735=>array(41,-8,562,571),3737=>array(37,-14,564,568),3738=>array(61,-8,541,561),3739=>array(61,-8,541,760),3740=>array(41,-8,623,648),3741=>array(41,-8,561,760),3742=>array(35,-8,566,561),3743=>array(35,-8,566,760),3745=>array(8,-14,564,547),3746=>array(50,-14,552,760),3747=>array(49,-8,566,568),3749=>array(30,-8,572,568),3751=>array(39,-13,559,560),3754=>array(30,-8,634,648),3755=>array(15,-12,582,575),3757=>array(43,-8,567,568),3758=>array(26,-8,606,617),3759=>array(0,-126,602,579),3760=>array(40,-6,571,567),3761=>array(40,620,571,896),3762=>array(52,0,550,588),3763=>array(-426,0,550,846),3764=>array(5,622,597,950),3765=>array(-52,633,615,962),3766=>array(4,622,597,950),3767=>array(4,633,671,962),3768=>array(176,-385,437,-55),3769=>array(129,-316,428,-28),3771=>array(-10,610,612,896),3772=>array(-4,-311,606,-48),3784=>array(243,659,359,844),3785=>array(-2,622,604,918),3786=>array(25,619,731,963),3787=>array(133,612,469,917),3788=>array(-4,603,606,866),3789=>array(176,639,426,846),4304=>array(48,0,555,567),4305=>array(49,0,554,758),4306=>array(39,-196,562,521),4307=>array(13,-197,589,516),4308=>array(47,-196,555,521),4309=>array(48,-196,555,521),4310=>array(48,0,555,757),4311=>array(13,0,589,516),4312=>array(48,0,555,521),4313=>array(48,-196,555,512),4314=>array(48,-196,555,521),4315=>array(49,0,555,757),4316=>array(48,0,555,745),4317=>array(13,0,589,516),4318=>array(48,0,555,754),4319=>array(47,-196,555,539),4320=>array(13,0,589,765),4321=>array(47,0,555,741),4322=>array(9,-197,593,656),4323=>array(11,-197,555,531),4324=>array(13,-196,589,521),4325=>array(48,-196,554,741),4326=>array(13,-197,589,521),4327=>array(49,-196,555,506),4328=>array(1,0,558,757),4329=>array(48,0,555,757),4330=>array(28,-196,574,539),4331=>array(48,0,555,741),4332=>array(46,0,602,757),4333=>array(48,-196,554,741),4334=>array(47,0,554,741),4335=>array(47,-196,555,610),4336=>array(48,0,555,757),4337=>array(48,-196,555,757),4338=>array(48,-134,555,521),4339=>array(47,-196,555,521),4340=>array(47,-196,555,757),4341=>array(53,0,575,757),4342=>array(13,-196,589,521),4343=>array(38,-197,564,521),4344=>array(48,-197,555,534),4345=>array(39,-196,563,527),4346=>array(62,-95,541,521),4347=>array(132,24,470,492),4348=>array(187,359,415,758),7426=>array(26,-14,599,560),7432=>array(50,-11,552,560),7433=>array(51,-264,550,549),7444=>array(7,-14,591,560),7446=>array(48,273,554,560),7447=>array(47,-14,554,273),7453=>array(20,0,581,440),7454=>array(20,-2,571,438),7455=>array(21,-0,581,523),7468=>array(121,326,480,734),7469=>array(119,326,482,734),7470=>array(142,326,460,735),7472=>array(146,326,455,734),7473=>array(158,326,444,734),7474=>array(158,326,444,734),7475=>array(146,318,457,742),7476=>array(153,326,448,734),7477=>array(164,326,438,734),7478=>array(163,318,439,734),7479=>array(131,326,472,734),7480=>array(158,326,443,734),7481=>array(138,326,464,734),7482=>array(148,326,454,734),7483=>array(148,326,454,734),7484=>array(140,318,462,742),7486=>array(149,326,452,734),7487=>array(132,326,470,734),7488=>array(139,326,463,734),7489=>array(145,318,458,734),7490=>array(111,326,490,734),7491=>array(145,318,457,640),7492=>array(145,318,457,640),7493=>array(148,318,454,640),7494=>array(121,318,481,640),7495=>array(148,318,454,751),7496=>array(148,318,454,751),7497=>array(139,318,463,640),7498=>array(139,318,463,640),7499=>array(143,320,459,640),7500=>array(143,320,459,640),7501=>array(147,210,455,640),7502=>array(144,178,458,633),7503=>array(144,326,458,751),7504=>array(136,326,466,640),7505=>array(163,210,439,640),7506=>array(142,318,460,640),7507=>array(164,318,438,640),7508=>array(142,479,460,640),7509=>array(142,318,460,479),7510=>array(148,209,454,640),7511=>array(153,326,449,719),7512=>array(163,318,439,632),7513=>array(125,326,478,573),7514=>array(136,319,466,632),7515=>array(136,326,466,632),7522=>array(144,0,458,455),7523=>array(167,0,436,314),7524=>array(163,-8,439,306),7525=>array(136,0,466,306),7543=>array(48,-207,535,561),7544=>array(153,326,448,734),7547=>array(52,0,551,547),7557=>array(44,-207,534,760),7579=>array(148,318,454,640),7580=>array(164,318,438,640),7581=>array(161,288,441,640),7582=>array(143,318,459,755),7583=>array(143,320,459,640),7584=>array(161,326,441,751),7585=>array(182,205,420,632),7586=>array(149,209,453,632),7587=>array(163,207,439,632),7588=>array(144,326,458,751),7589=>array(156,325,446,632),7590=>array(144,326,458,632),7591=>array(144,326,458,632),7592=>array(140,210,462,781),7593=>array(146,205,456,751),7594=>array(146,210,456,751),7595=>array(184,326,418,632),7596=>array(136,209,466,640),7597=>array(136,209,466,632),7598=>array(131,205,471,640),7599=>array(132,205,470,640),7600=>array(148,326,454,632),7601=>array(142,318,460,640),7602=>array(118,209,484,753),7603=>array(164,209,438,640),7604=>array(139,210,463,751),7605=>array(153,210,449,719),7606=>array(139,318,463,632),7607=>array(138,298,464,632),7609=>array(137,326,465,632),7610=>array(136,326,466,632),7611=>array(160,326,442,632),7612=>array(125,209,477,632),7613=>array(147,295,455,632),7614=>array(145,206,457,632),7615=>array(142,319,460,757),7680=>array(16,-245,586,729),7681=>array(46,-245,541,560),7682=>array(61,0,566,927),7683=>array(73,-14,558,774),7684=>array(61,-226,566,730),7685=>array(73,-226,558,760),7686=>array(61,-198,566,730),7687=>array(73,-198,558,760),7688=>array(74,-196,532,927),7689=>array(82,-196,555,800),7690=>array(67,0,557,927),7691=>array(44,-14,529,774),7692=>array(67,-226,557,729),7693=>array(44,-226,529,760),7694=>array(67,-198,557,729),7695=>array(44,-198,529,760),7696=>array(67,-196,557,729),7697=>array(44,-196,529,760),7698=>array(67,-237,557,729),7699=>array(44,-237,529,760),7704=>array(82,-237,536,729),7705=>array(45,-237,561,560),7706=>array(82,-238,536,729),7707=>array(45,-238,561,560),7708=>array(82,-196,536,927),7709=>array(45,-196,561,784),7710=>array(89,0,543,927),7711=>array(85,0,529,927),7712=>array(57,-14,552,913),7713=>array(48,-207,535,760),7714=>array(67,0,535,927),7715=>array(84,0,523,927),7716=>array(67,-226,535,729),7717=>array(84,-226,523,760),7718=>array(67,0,535,927),7719=>array(84,0,523,934),7720=>array(16,-196,535,729),7721=>array(33,-196,523,760),7722=>array(67,-240,535,729),7723=>array(84,-240,523,760),7724=>array(84,-238,518,729),7725=>array(70,-238,569,813),7728=>array(57,0,598,927),7729=>array(85,0,585,927),7730=>array(57,-226,598,729),7731=>array(85,-226,585,760),7732=>array(57,-198,598,729),7733=>array(85,-198,585,760),7734=>array(110,-226,562,729),7735=>array(44,-226,534,760),7736=>array(110,-226,562,913),7737=>array(44,-226,534,913),7738=>array(110,-198,562,729),7739=>array(44,-198,534,760),7740=>array(110,-237,562,729),7741=>array(44,-237,534,760),7742=>array(42,0,560,927),7743=>array(40,0,564,800),7744=>array(42,0,560,927),7745=>array(40,0,564,774),7746=>array(42,-226,560,729),7747=>array(40,-226,564,560),7748=>array(58,0,543,927),7749=>array(84,0,523,774),7750=>array(58,-226,543,729),7751=>array(84,-226,523,560),7752=>array(58,-198,543,729),7753=>array(84,-198,523,560),7754=>array(58,-237,543,729),7755=>array(84,-237,523,560),7756=>array(45,-14,557,997),7757=>array(48,-14,554,997),7764=>array(79,0,560,931),7765=>array(73,-208,558,800),7766=>array(79,0,560,927),7767=>array(73,-208,558,774),7768=>array(65,0,602,927),7769=>array(142,0,562,774),7770=>array(65,-226,602,729),7771=>array(142,-226,562,560),7772=>array(65,-226,602,913),7773=>array(142,-226,562,760),7774=>array(65,-198,602,729),7775=>array(142,-198,562,560),7776=>array(63,-14,542,927),7777=>array(84,-14,521,774),7778=>array(63,-226,542,742),7779=>array(84,-226,521,560),7784=>array(63,-226,542,927),7785=>array(84,-226,521,774),7786=>array(44,0,558,927),7787=>array(54,0,524,927),7788=>array(44,-226,558,729),7789=>array(54,-226,524,702),7790=>array(44,-198,558,729),7791=>array(54,-198,524,702),7792=>array(44,-237,558,729),7793=>array(54,-237,524,702),7794=>array(52,-226,550,729),7795=>array(78,-226,518,547),7796=>array(52,-238,550,729),7797=>array(78,-238,518,547),7798=>array(52,-237,550,729),7799=>array(78,-237,518,547),7800=>array(52,-14,550,997),7801=>array(78,-14,518,997),7804=>array(28,0,574,916),7805=>array(39,0,563,758),7806=>array(28,-226,574,729),7807=>array(39,-226,563,547),7808=>array(0,0,602,931),7809=>array(0,0,602,803),7810=>array(0,0,602,931),7811=>array(0,0,602,803),7812=>array(0,0,602,922),7813=>array(0,0,602,740),7814=>array(0,0,602,927),7815=>array(0,0,602,774),7816=>array(0,-226,602,729),7817=>array(0,-226,602,547),7818=>array(13,0,589,927),7819=>array(27,0,575,774),7820=>array(13,0,589,927),7821=>array(27,0,575,734),7822=>array(4,0,598,927),7823=>array(29,-207,574,774),7824=>array(56,0,567,931),7825=>array(79,0,528,803),7826=>array(56,-226,567,729),7827=>array(79,-226,528,547),7828=>array(56,-198,567,729),7829=>array(79,-198,528,547),7830=>array(84,-198,523,760),7831=>array(54,0,524,876),7832=>array(0,0,602,898),7833=>array(29,-207,574,898),7835=>array(85,0,529,927),7839=>array(48,-14,554,766),7840=>array(16,-226,586,729),7841=>array(46,-226,541,560),7852=>array(16,-226,586,931),7853=>array(46,-226,541,803),7856=>array(16,0,586,997),7857=>array(46,-14,541,954),7862=>array(16,-226,586,927),7863=>array(46,-226,541,759),7864=>array(82,-226,536,729),7865=>array(45,-226,561,560),7868=>array(82,0,536,928),7869=>array(45,-14,561,762),7878=>array(82,-226,536,931),7879=>array(45,-226,561,803),7882=>array(84,-226,518,729),7883=>array(70,-226,569,813),7884=>array(45,-226,557,742),7885=>array(48,-226,554,560),7896=>array(45,-226,557,931),7897=>array(48,-226,554,803),7898=>array(2,-14,600,927),7899=>array(4,-14,598,800),7900=>array(2,-14,600,927),7901=>array(4,-14,598,800),7904=>array(2,-14,600,928),7905=>array(4,-14,598,778),7906=>array(2,-226,600,759),7907=>array(4,-226,598,570),7908=>array(52,-226,550,729),7909=>array(78,-226,518,547),7912=>array(2,-14,600,927),7913=>array(3,-14,599,800),7914=>array(2,-14,600,927),7915=>array(3,-14,599,800),7918=>array(2,-14,600,928),7919=>array(3,-14,599,778),7920=>array(2,-226,600,759),7921=>array(3,-226,599,570),7922=>array(4,0,598,931),7923=>array(29,-207,574,803),7924=>array(4,-226,598,729),7925=>array(29,-226,574,547),7928=>array(4,0,598,928),7929=>array(29,-207,574,762),7936=>array(26,-12,568,806),7937=>array(26,-12,568,806),7938=>array(26,-12,568,806),7939=>array(26,-12,568,806),7940=>array(26,-12,568,806),7941=>array(26,-12,568,806),7942=>array(26,-12,568,978),7943=>array(26,-12,568,978),7944=>array(7,0,586,806),7945=>array(-17,0,586,806),7946=>array(-300,0,586,806),7947=>array(-305,0,586,806),7948=>array(-195,0,586,806),7949=>array(-225,0,586,806),7950=>array(-84,0,586,978),7951=>array(-108,0,586,978),7952=>array(73,-11,510,806),7953=>array(73,-11,510,806),7954=>array(71,-11,524,806),7955=>array(66,-11,529,806),7956=>array(73,-11,559,806),7957=>array(73,-11,568,806),7960=>array(-117,0,536,806),7961=>array(-117,0,536,806),7962=>array(-400,0,536,806),7963=>array(-405,0,536,806),7964=>array(-325,0,536,806),7965=>array(-349,0,536,806),7968=>array(84,-208,523,806),7969=>array(84,-208,523,806),7970=>array(71,-208,524,806),7971=>array(66,-208,529,806),7972=>array(84,-208,559,806),7973=>array(84,-208,568,806),7974=>array(84,-208,523,978),7975=>array(84,-208,523,978),7976=>array(-142,0,535,806),7977=>array(-142,0,535,806),7978=>array(-427,0,535,806),7979=>array(-432,0,535,806),7980=>array(-354,0,535,806),7981=>array(-374,0,535,806),7982=>array(-230,0,535,978),7983=>array(-230,0,535,978),7984=>array(132,0,478,806),7985=>array(132,0,478,806),7986=>array(71,0,524,806),7987=>array(66,0,529,806),7988=>array(120,0,559,806),7989=>array(100,0,568,806),7990=>array(131,0,478,978),7991=>array(131,0,478,978),7992=>array(-117,0,518,806),7993=>array(-117,0,518,806),7994=>array(-388,0,518,806),7995=>array(-403,0,518,806),7996=>array(-320,0,518,806),7997=>array(-344,0,518,806),7998=>array(-208,0,518,978),7999=>array(-208,0,518,978),8000=>array(48,-14,554,806),8001=>array(48,-14,554,806),8002=>array(48,-14,554,806),8003=>array(48,-14,554,806),8004=>array(48,-14,559,806),8005=>array(48,-14,568,806),8008=>array(-81,-14,557,806),8009=>array(-117,-14,557,806),8010=>array(-391,-14,557,806),8011=>array(-396,-14,557,806),8012=>array(-232,-14,557,806),8013=>array(-256,-14,557,806),8016=>array(37,0,565,806),8017=>array(37,0,565,806),8018=>array(37,0,565,806),8019=>array(37,0,565,806),8020=>array(37,0,565,806),8021=>array(37,0,568,806),8022=>array(37,0,565,978),8023=>array(37,0,565,978),8025=>array(-190,0,598,806),8027=>array(-447,0,598,806),8029=>array(-425,0,598,806),8031=>array(-287,0,598,978),8032=>array(31,-14,571,806),8033=>array(31,-14,571,806),8034=>array(31,-14,571,806),8035=>array(31,-14,571,806),8036=>array(31,-14,571,806),8037=>array(31,-14,571,806),8038=>array(31,-14,571,978),8039=>array(31,-14,571,978),8040=>array(-71,0,558,806),8041=>array(-105,0,558,806),8042=>array(-391,0,558,806),8043=>array(-396,0,558,806),8044=>array(-220,0,558,806),8045=>array(-239,0,558,806),8046=>array(-152,0,558,978),8047=>array(-189,0,558,978),8048=>array(26,-12,568,800),8049=>array(26,-12,568,800),8050=>array(73,-11,510,800),8051=>array(73,-11,510,800),8052=>array(84,-208,523,800),8053=>array(84,-208,523,800),8054=>array(97,0,478,800),8055=>array(132,0,505,800),8056=>array(48,-14,554,800),8057=>array(48,-14,554,800),8058=>array(37,0,565,800),8059=>array(37,0,565,800),8060=>array(31,-14,571,800),8061=>array(31,-14,571,800),8064=>array(26,-208,568,806),8065=>array(26,-208,568,806),8066=>array(26,-208,568,806),8067=>array(26,-208,568,806),8068=>array(26,-208,568,806),8069=>array(26,-208,568,806),8070=>array(26,-208,568,978),8071=>array(26,-208,568,978),8072=>array(7,-208,586,806),8073=>array(-17,-208,586,806),8074=>array(-300,-208,586,806),8075=>array(-305,-208,586,806),8076=>array(-195,-208,586,806),8077=>array(-225,-208,586,806),8078=>array(-84,-208,586,978),8079=>array(-108,-208,586,978),8080=>array(84,-208,523,806),8081=>array(84,-208,523,806),8082=>array(71,-208,524,806),8083=>array(66,-208,529,806),8084=>array(84,-208,559,806),8085=>array(84,-208,568,806),8086=>array(84,-208,523,978),8087=>array(84,-208,523,978),8088=>array(-142,-208,535,806),8089=>array(-142,-208,535,806),8090=>array(-427,-208,535,806),8091=>array(-432,-208,535,806),8092=>array(-354,-208,535,806),8093=>array(-374,-208,535,806),8094=>array(-230,-208,535,978),8095=>array(-230,-208,535,978),8096=>array(31,-208,571,806),8097=>array(31,-208,571,806),8098=>array(31,-208,571,806),8099=>array(31,-208,571,806),8100=>array(31,-208,571,806),8101=>array(31,-208,571,806),8102=>array(31,-208,571,978),8103=>array(31,-208,571,978),8104=>array(-71,-208,558,806),8105=>array(-105,-208,558,806),8106=>array(-391,-208,558,806),8107=>array(-396,-208,558,806),8108=>array(-220,-208,558,806),8109=>array(-239,-208,558,806),8110=>array(-152,-208,558,978),8111=>array(-189,-208,558,978),8112=>array(26,-12,568,784),8113=>array(26,-12,568,760),8114=>array(26,-208,568,800),8115=>array(26,-208,568,559),8116=>array(26,-208,568,800),8118=>array(26,-12,568,778),8119=>array(26,-208,568,778),8120=>array(16,0,586,927),8121=>array(16,0,586,913),8122=>array(-132,0,586,800),8123=>array(-40,0,586,800),8124=>array(16,-208,586,729),8125=>array(222,595,379,806),8126=>array(253,-208,383,-45),8127=>array(222,595,379,806),8128=>array(131,638,471,778),8129=>array(131,654,471,944),8130=>array(84,-208,523,800),8131=>array(84,-208,523,560),8132=>array(84,-208,523,800),8134=>array(84,-208,523,778),8135=>array(84,-208,523,778),8136=>array(-245,0,536,800),8137=>array(-171,0,536,800),8138=>array(-259,0,535,800),8139=>array(-191,0,535,800),8140=>array(67,-208,535,729),8141=>array(71,595,524,806),8142=>array(120,595,559,806),8143=>array(131,595,471,978),8144=>array(132,0,478,784),8145=>array(132,0,478,760),8146=>array(97,0,478,980),8147=>array(132,0,505,999),8150=>array(131,0,478,778),8151=>array(131,0,478,944),8152=>array(84,0,518,927),8153=>array(84,0,518,913),8154=>array(-230,0,518,800),8155=>array(-162,0,518,800),8157=>array(66,595,529,806),8158=>array(100,595,568,806),8159=>array(131,595,471,978),8160=>array(37,0,565,784),8161=>array(37,0,565,760),8162=>array(37,0,565,980),8163=>array(37,0,565,999),8164=>array(73,-208,558,806),8165=>array(73,-208,558,806),8166=>array(37,0,565,778),8167=>array(37,0,565,944),8168=>array(4,0,598,927),8169=>array(4,0,598,913),8170=>array(-269,0,598,800),8171=>array(-242,0,598,800),8172=>array(-127,0,560,806),8173=>array(97,654,455,980),8174=>array(147,654,505,999),8175=>array(97,616,373,800),8178=>array(31,-208,571,800),8179=>array(31,-208,571,547),8180=>array(31,-208,571,800),8182=>array(31,-14,571,778),8183=>array(31,-208,571,778),8184=>array(-223,-14,557,800),8185=>array(-83,-14,557,800),8186=>array(-218,0,558,800),8187=>array(-62,0,558,800),8188=>array(44,-208,558,713),8189=>array(229,616,505,800),8190=>array(222,595,379,806),8208=>array(147,217,455,359),8209=>array(147,217,455,359),8210=>array(0,217,602,337),8211=>array(0,217,602,337),8212=>array(0,217,602,337),8213=>array(0,217,602,337),8214=>array(125,-236,476,764),8215=>array(0,-236,602,-9),8216=>array(211,441,412,760),8217=>array(211,441,412,760),8218=>array(177,-140,378,179),8219=>array(211,441,412,760),8220=>array(74,441,528,760),8221=>array(73,441,528,760),8222=>array(73,-140,528,179),8223=>array(73,441,528,760),8224=>array(76,-96,525,729),8225=>array(76,-96,525,729),8226=>array(125,195,477,547),8227=>array(125,156,516,586),8230=>array(28,0,574,179),8240=>array(0,0,602,699),8241=>array(0,0,602,699),8242=>array(191,547,411,729),8243=>array(99,547,503,729),8244=>array(8,547,594,729),8245=>array(191,547,411,729),8246=>array(98,547,504,729),8247=>array(8,547,594,729),8249=>array(169,69,398,517),8250=>array(205,69,434,517),8252=>array(85,0,517,729),8253=>array(114,0,520,742),8254=>array(0,663,602,755),8261=>array(206,-132,454,760),8262=>array(148,-132,396,760),8263=>array(19,0,583,742),8264=>array(19,0,525,742),8265=>array(77,0,583,742),8267=>array(82,-96,568,729),8304=>array(136,319,466,742),8305=>array(144,326,458,781),8308=>array(120,326,456,734),8309=>array(143,319,461,734),8310=>array(140,318,471,742),8311=>array(139,326,454,734),8312=>array(138,319,463,742),8313=>array(130,319,461,742),8314=>array(132,352,470,652),8315=>array(132,469,470,535),8316=>array(139,407,464,596),8317=>array(218,252,384,751),8318=>array(218,252,384,751),8319=>array(161,326,441,640),8320=>array(136,-7,466,416),8321=>array(153,0,469,408),8322=>array(134,0,459,416),8323=>array(140,-7,470,416),8324=>array(120,0,456,408),8325=>array(143,-7,461,408),8326=>array(140,-8,471,416),8327=>array(139,0,454,408),8328=>array(138,-7,463,416),8329=>array(130,-7,461,416),8330=>array(132,25,470,326),8331=>array(132,143,470,208),8332=>array(139,81,464,270),8333=>array(218,-74,384,425),8334=>array(218,-74,384,425),8336=>array(145,-8,457,313),8337=>array(139,-8,463,313),8338=>array(142,-8,460,313),8339=>array(125,0,477,307),8340=>array(139,-8,463,313),8341=>array(161,0,441,426),8342=>array(144,0,458,425),8343=>array(144,0,458,426),8344=>array(136,0,466,313),8345=>array(161,0,441,313),8346=>array(148,-117,454,313),8347=>array(161,-7,441,314),8348=>array(153,0,449,393),8352=>array(0,0,595,729),8353=>array(43,-44,554,778),8354=>array(34,-14,551,742),8355=>array(0,0,544,729),8356=>array(54,0,541,742),8357=>array(19,-93,582,640),8358=>array(0,0,602,729),8359=>array(2,-14,601,729),8360=>array(4,-14,598,729),8361=>array(0,0,602,729),8362=>array(2,-14,601,729),8363=>array(29,-196,585,760),8364=>array(3,-14,526,742),8365=>array(24,0,584,729),8366=>array(2,0,601,729),8367=>array(4,-223,593,742),8368=>array(12,-14,590,742),8369=>array(29,0,602,729),8370=>array(21,-81,573,809),8371=>array(12,0,590,729),8372=>array(0,-14,602,742),8373=>array(22,-147,580,760),8376=>array(44,0,558,729),8377=>array(50,0,560,729),8450=>array(68,-14,524,742),8453=>array(3,-24,598,752),8461=>array(11,0,588,729),8462=>array(29,0,547,760),8463=>array(29,0,547,760),8469=>array(24,0,580,729),8470=>array(0,0,597,729),8471=>array(0,61,602,663),8473=>array(36,0,573,729),8474=>array(0,-146,598,742),8477=>array(4,0,597,729),8482=>array(0,447,550,729),8484=>array(6,0,584,729),8486=>array(44,0,558,713),8490=>array(57,0,598,729),8491=>array(16,0,586,928),8494=>array(0,-12,602,647),8520=>array(-9,0,501,813),8531=>array(23,-139,568,810),8532=>array(8,-139,568,818),8533=>array(23,-139,559,810),8534=>array(8,-139,559,818),8535=>array(14,-139,559,818),8536=>array(-6,-139,559,810),8537=>array(23,-140,569,810),8538=>array(17,-140,569,810),8539=>array(23,-139,562,810),8540=>array(14,-139,562,818),8541=>array(17,-139,562,810),8542=>array(13,-139,562,810),8543=>array(23,244,558,810),8592=>array(32,97,570,451),8593=>array(124,0,478,538),8594=>array(32,97,570,451),8595=>array(124,0,478,538),8596=>array(32,97,570,451),8597=>array(124,0,478,538),8598=>array(75,-10,522,437),8599=>array(80,-10,527,437),8600=>array(80,-15,526,432),8601=>array(75,-15,522,432),8602=>array(32,97,570,451),8603=>array(32,97,570,451),8604=>array(29,178,566,437),8605=>array(36,178,573,437),8606=>array(32,97,570,451),8607=>array(124,0,478,538),8608=>array(32,97,570,451),8609=>array(124,0,478,538),8610=>array(32,97,570,451),8611=>array(32,97,570,451),8612=>array(32,97,570,451),8613=>array(124,0,478,538),8614=>array(32,97,570,451),8615=>array(124,0,478,538),8616=>array(124,0,478,538),8617=>array(32,97,570,509),8618=>array(32,97,570,509),8619=>array(32,97,570,509),8620=>array(32,97,570,509),8621=>array(32,97,570,451),8622=>array(32,87,570,460),8623=>array(28,-2,562,700),8624=>array(89,0,527,689),8625=>array(75,0,513,689),8626=>array(89,-15,527,674),8627=>array(75,-15,513,674),8628=>array(91,0,526,555),8629=>array(31,-15,586,421),8630=>array(24,168,578,506),8631=>array(24,168,578,506),8632=>array(24,-10,578,542),8633=>array(32,-15,570,634),8634=>array(27,-19,575,511),8635=>array(27,-19,575,511),8636=>array(32,219,570,451),8637=>array(32,97,570,329),8638=>array(246,0,478,538),8639=>array(124,0,356,538),8640=>array(32,219,570,451),8641=>array(32,97,570,329),8642=>array(246,0,478,538),8643=>array(124,0,356,538),8644=>array(32,-15,570,575),8645=>array(6,0,596,538),8646=>array(32,-15,570,575),8647=>array(32,-15,570,575),8648=>array(6,0,596,538),8649=>array(32,-15,570,575),8650=>array(6,0,596,538),8651=>array(32,-15,570,575),8652=>array(32,-15,570,575),8653=>array(32,97,570,451),8654=>array(32,97,570,451),8655=>array(32,97,570,451),8656=>array(32,97,570,451),8657=>array(124,0,478,538),8658=>array(32,97,570,451),8659=>array(124,0,478,538),8660=>array(32,97,570,451),8661=>array(124,0,478,538),8662=>array(61,-28,526,437),8663=>array(76,-28,541,437),8664=>array(76,-15,541,451),8665=>array(61,-15,526,451),8666=>array(32,97,570,451),8667=>array(32,97,570,451),8668=>array(32,97,570,451),8669=>array(32,97,570,451),8670=>array(124,0,478,538),8671=>array(124,0,478,538),8672=>array(32,97,570,451),8673=>array(124,0,478,538),8674=>array(32,97,570,451),8675=>array(124,0,478,538),8676=>array(32,97,570,451),8677=>array(32,97,570,451),8678=>array(2,67,570,480),8679=>array(94,0,508,567),8680=>array(32,67,600,480),8681=>array(94,0,508,567),8682=>array(94,0,508,567),8683=>array(94,0,508,567),8684=>array(94,0,508,567),8685=>array(94,0,508,567),8686=>array(94,0,508,567),8687=>array(94,0,508,567),8688=>array(32,70,600,483),8689=>array(19,-10,578,549),8690=>array(21,0,581,559),8691=>array(94,0,508,567),8692=>array(32,97,570,451),8693=>array(6,0,596,538),8694=>array(32,-139,570,687),8695=>array(32,97,570,451),8696=>array(32,97,570,451),8697=>array(32,92,570,451),8698=>array(32,97,570,451),8699=>array(32,97,570,451),8700=>array(32,97,570,457),8701=>array(2,67,570,480),8702=>array(32,67,600,480),8703=>array(2,67,600,480),8704=>array(16,0,586,729),8705=>array(11,-14,592,742),8706=>array(58,-14,544,674),8707=>array(80,0,533,729),8708=>array(80,-46,533,775),8709=>array(31,43,572,584),8710=>array(-3,0,606,695),8711=>array(-3,0,606,695),8712=>array(49,0,553,744),8713=>array(49,-96,558,840),8714=>array(48,63,554,564),8715=>array(49,0,553,744),8716=>array(49,-96,558,840),8717=>array(48,63,554,564),8719=>array(74,-213,528,741),8721=>array(62,-213,539,741),8722=>array(32,256,569,372),8723=>array(43,0,559,627),8725=>array(55,-93,547,729),8727=>array(59,77,541,542),8728=>array(138,182,463,507),8729=>array(125,168,477,520),8730=>array(24,-19,573,843),8731=>array(24,-19,573,933),8732=>array(24,-19,573,924),8733=>array(86,109,516,508),8734=>array(6,109,596,508),8735=>array(43,122,559,638),8736=>array(43,122,559,638),8743=>array(89,0,513,579),8744=>array(89,0,513,579),8745=>array(89,0,513,579),8746=>array(89,0,513,579),8747=>array(71,-204,530,892),8748=>array(0,-204,602,892),8749=>array(-21,-204,623,892),8756=>array(72,51,532,580),8757=>array(72,51,530,580),8758=>array(219,51,383,580),8759=>array(72,51,532,580),8760=>array(32,256,569,619),8761=>array(36,51,578,580),8762=>array(23,26,581,603),8763=>array(43,0,559,624),8764=>array(43,229,559,398),8765=>array(43,229,559,398),8769=>array(43,48,559,577),8770=>array(43,124,559,482),8771=>array(43,144,559,498),8772=>array(43,16,560,637),8773=>array(43,29,559,614),8774=>array(43,-42,559,614),8775=>array(43,-70,559,695),8776=>array(43,124,559,498),8777=>array(43,30,559,596),8778=>array(43,29,559,587),8779=>array(43,12,559,587),8780=>array(43,29,559,614),8781=>array(42,83,559,543),8782=>array(43,10,559,617),8783=>array(43,144,559,617),8784=>array(43,144,559,707),8785=>array(43,-81,559,707),8786=>array(43,-81,559,707),8787=>array(43,-81,560,707),8788=>array(40,124,563,503),8789=>array(40,124,563,503),8790=>array(43,144,559,482),8791=>array(43,144,559,814),8792=>array(43,144,559,715),8793=>array(43,144,559,824),8794=>array(43,144,559,824),8795=>array(43,144,559,935),8796=>array(43,144,559,889),8797=>array(43,144,559,750),8798=>array(42,144,559,801),8799=>array(42,144,559,903),8800=>array(38,-5,564,631),8801=>array(43,29,559,597),8802=>array(43,-55,559,685),8803=>array(43,-47,559,688),8804=>array(43,0,559,582),8805=>array(43,0,559,582),8806=>array(43,-116,559,633),8807=>array(43,-116,559,633),8808=>array(43,-189,559,633),8809=>array(43,-189,559,633),8813=>array(42,-54,559,680),8814=>array(43,-3,559,629),8815=>array(43,-3,559,629),8816=>array(43,-96,559,658),8817=>array(43,-96,559,656),8818=>array(43,-38,559,582),8819=>array(43,-38,559,582),8820=>array(43,-96,559,658),8821=>array(43,-98,559,656),8822=>array(43,-119,559,684),8823=>array(43,-119,559,684),8824=>array(43,-209,559,774),8825=>array(43,-209,559,774),8826=>array(42,-46,558,672),8827=>array(42,-46,558,672),8828=>array(43,-206,559,744),8829=>array(43,-206,559,744),8830=>array(43,-101,559,744),8831=>array(43,-101,559,744),8832=>array(42,-118,558,744),8833=>array(42,-118,558,744),8834=>array(43,67,559,559),8835=>array(43,67,559,559),8836=>array(43,-58,559,684),8837=>array(43,-58,559,684),8838=>array(43,-20,559,645),8839=>array(43,-20,559,645),8840=>array(43,-115,559,729),8841=>array(43,-115,559,729),8842=>array(43,-125,559,645),8843=>array(43,-125,559,645),8847=>array(43,42,559,584),8848=>array(43,42,559,584),8849=>array(43,-10,559,636),8850=>array(43,-10,559,636),8853=>array(13,25,589,604),8854=>array(13,25,589,604),8855=>array(13,25,589,604),8856=>array(13,25,589,604),8857=>array(13,25,589,604),8858=>array(13,25,589,604),8859=>array(13,25,589,604),8860=>array(13,25,589,604),8861=>array(13,25,589,604),8862=>array(24,37,579,591),8863=>array(24,37,579,591),8864=>array(24,37,579,591),8865=>array(24,37,579,591),8866=>array(32,0,569,627),8867=>array(32,0,569,627),8868=>array(32,0,569,627),8869=>array(32,0,569,627),8901=>array(219,259,382,437),8902=>array(110,183,492,545),8909=>array(43,144,559,498),8922=>array(43,-272,559,776),8923=>array(43,-272,559,776),8924=>array(43,0,559,582),8925=>array(43,0,559,582),8926=>array(43,-206,559,744),8927=>array(43,-206,559,744),8928=>array(43,-244,559,803),8929=>array(43,-244,559,803),8930=>array(43,-143,559,769),8931=>array(43,-143,559,769),8932=>array(43,-123,559,636),8933=>array(43,-123,559,636),8934=>array(43,-158,559,582),8935=>array(43,-158,559,582),8936=>array(43,-220,559,744),8937=>array(43,-220,559,744),8943=>array(28,225,574,404),8960=>array(31,43,572,584),8961=>array(56,152,540,453),8962=>array(54,0,548,596),8963=>array(71,406,530,746),8964=>array(71,-132,530,209),8965=>array(71,0,530,459),8966=>array(71,0,530,581),8968=>array(206,-132,454,760),8969=>array(148,-132,396,760),8970=>array(206,-132,454,760),8971=>array(148,-132,396,760),8972=>array(261,73,585,415),8973=>array(6,73,331,415),8974=>array(261,345,585,687),8975=>array(6,345,331,687),8976=>array(43,177,559,439),8977=>array(35,113,567,646),8978=>array(3,211,599,512),8979=>array(3,211,599,512),8980=>array(90,168,512,512),8981=>array(76,107,510,539),8984=>array(17,95,585,664),8985=>array(43,177,559,439),8988=>array(131,352,463,701),8989=>array(139,352,471,701),8990=>array(131,-70,463,279),8991=>array(139,-70,471,279),8992=>array(237,-250,566,925),8993=>array(33,-239,362,940),8997=>array(31,95,571,613),8998=>array(3,145,599,536),8999=>array(46,145,556,536),9000=>array(24,212,578,517),9003=>array(3,145,599,536),9013=>array(25,-33,576,296),9015=>array(125,-114,477,843),9016=>array(3,-114,599,843),9017=>array(3,-114,599,843),9018=>array(3,-114,599,843),9019=>array(3,-114,599,843),9020=>array(3,-114,599,843),9021=>array(3,-171,599,900),9022=>array(3,57,599,658),9025=>array(3,-100,599,829),9026=>array(3,-100,599,829),9027=>array(3,-114,599,843),9028=>array(3,-114,599,843),9031=>array(3,-114,599,843),9032=>array(3,-114,599,843),9033=>array(3,-29,599,729),9035=>array(16,-171,586,900),9036=>array(3,-100,599,829),9037=>array(3,-100,599,829),9040=>array(3,-114,599,843),9042=>array(16,-171,586,900),9043=>array(3,-100,599,829),9044=>array(3,-100,599,829),9047=>array(3,-114,599,843),9048=>array(113,-114,489,729),9049=>array(3,-114,599,729),9050=>array(3,-114,599,655),9051=>array(113,-114,489,496),9052=>array(3,-114,599,658),9054=>array(3,-114,599,843),9055=>array(-10,44,612,671),9056=>array(3,-114,599,843),9059=>array(110,183,492,652),9060=>array(147,222,455,676),9061=>array(3,57,599,847),9064=>array(43,226,559,676),9065=>array(43,53,559,676),9067=>array(16,0,586,729),9068=>array(43,-14,559,742),9069=>array(43,-171,559,900),9070=>array(113,-140,489,519),9071=>array(3,-114,599,843),9072=>array(3,-114,599,843),9075=>array(132,0,478,547),9076=>array(73,-208,558,560),9077=>array(31,-14,571,547),9078=>array(3,-114,599,559),9079=>array(64,-114,538,561),9080=>array(113,-114,489,547),9081=>array(3,-114,599,547),9082=>array(26,-12,568,559),9085=>array(8,-232,594,101),9088=>array(25,-33,576,528),9089=>array(3,92,599,528),9090=>array(3,92,599,528),9091=>array(3,172,599,572),9096=>array(35,27,566,601),9097=>array(34,46,567,579),9098=>array(34,46,567,579),9099=>array(34,46,567,579),9109=>array(3,-114,599,843),9115=>array(113,-252,488,928),9116=>array(113,-252,255,940),9117=>array(113,-240,488,940),9118=>array(114,-252,489,928),9119=>array(347,-252,489,940),9120=>array(114,-240,489,940),9121=>array(113,-252,488,928),9122=>array(113,-252,255,940),9123=>array(113,-240,488,940),9124=>array(113,-252,488,928),9125=>array(346,-252,488,940),9126=>array(113,-240,488,940),9127=>array(232,-261,594,928),9128=>array(8,-247,370,934),9129=>array(232,-240,594,934),9130=>array(232,-256,370,934),9131=>array(8,-261,370,928),9132=>array(232,-247,594,934),9133=>array(8,-240,370,934),9134=>array(237,-250,362,940),9166=>array(2,67,570,567),9167=>array(3,0,599,596),9251=>array(54,-232,548,101),9600=>array(-10,260,612,770),9601=>array(-10,-250,612,-123),9602=>array(-10,-250,612,5),9603=>array(-10,-250,612,132),9604=>array(-10,-250,612,260),9605=>array(-10,-250,612,387),9606=>array(-10,-250,612,515),9607=>array(-10,-250,612,642),9608=>array(-10,-250,612,770),9609=>array(-10,-250,534,770),9610=>array(-10,-250,457,770),9611=>array(-10,-250,379,770),9612=>array(-10,-250,301,770),9613=>array(-10,-250,223,770),9614=>array(-10,-250,146,770),9615=>array(-10,-250,68,770),9616=>array(301,-250,612,770),9617=>array(-10,-250,534,770),9618=>array(-10,-250,612,770),9619=>array(-10,-250,612,770),9620=>array(-10,642,612,770),9621=>array(534,-250,611,770),9622=>array(-10,-250,301,260),9623=>array(301,-250,612,260),9624=>array(-10,260,301,770),9625=>array(-10,-250,612,770),9626=>array(-10,-250,612,770),9627=>array(-10,-250,612,770),9628=>array(-10,-250,612,770),9629=>array(301,260,612,770),9630=>array(-10,-250,612,770),9631=>array(-10,-250,612,770),9632=>array(3,-39,599,558),9633=>array(3,-39,599,558),9634=>array(3,-39,599,558),9635=>array(3,-39,599,558),9636=>array(3,-39,599,558),9637=>array(3,-39,599,558),9638=>array(3,-39,599,558),9639=>array(3,-39,599,558),9640=>array(3,-39,599,558),9641=>array(3,-39,599,558),9642=>array(107,66,495,454),9643=>array(107,66,495,454),9644=>array(3,117,599,402),9645=>array(3,117,599,402),9646=>array(158,-39,444,558),9647=>array(158,-39,444,558),9648=>array(3,117,599,402),9649=>array(3,117,599,402),9650=>array(3,-39,599,558),9651=>array(3,-39,599,558),9652=>array(107,66,495,454),9653=>array(107,66,495,454),9654=>array(3,-39,599,558),9655=>array(3,-39,599,558),9656=>array(107,66,495,454),9657=>array(107,66,495,454),9658=>array(3,66,599,454),9659=>array(3,66,599,454),9660=>array(3,-39,599,558),9661=>array(3,-39,599,558),9662=>array(107,66,495,454),9663=>array(107,66,495,454),9664=>array(3,-39,599,558),9665=>array(3,-39,599,558),9666=>array(107,66,495,454),9667=>array(107,66,495,454),9668=>array(3,66,599,454),9669=>array(3,66,599,454),9670=>array(3,-39,599,558),9671=>array(3,-38,599,558),9672=>array(3,-38,599,558),9673=>array(3,-41,599,561),9674=>array(57,-233,545,807),9675=>array(3,-41,599,561),9676=>array(3,-41,599,561),9677=>array(3,-41,599,561),9678=>array(3,-41,599,561),9679=>array(3,-41,599,561),9680=>array(3,-41,599,561),9681=>array(3,-41,599,561),9682=>array(3,-41,599,561),9683=>array(3,-41,599,561),9684=>array(3,-41,599,561),9685=>array(3,-41,599,561),9686=>array(152,-41,450,561),9687=>array(152,-41,450,561),9688=>array(-10,-10,612,770),9689=>array(-10,-250,612,770),9690=>array(-10,260,612,770),9691=>array(-10,-250,612,260),9692=>array(152,260,450,561),9693=>array(152,260,450,561),9694=>array(152,-41,450,260),9695=>array(152,-41,450,260),9696=>array(3,260,599,561),9697=>array(3,-41,599,260),9698=>array(3,-39,599,558),9699=>array(3,-39,599,558),9700=>array(3,-39,599,558),9701=>array(3,-39,599,558),9702=>array(125,195,477,547),9703=>array(3,-39,599,558),9704=>array(3,-39,599,558),9705=>array(3,-39,599,558),9706=>array(3,-39,599,558),9707=>array(3,-39,599,558),9708=>array(3,-39,599,558),9709=>array(3,-39,599,558),9710=>array(3,-39,599,558),9711=>array(-10,-54,612,573),9712=>array(3,-39,599,558),9713=>array(3,-39,599,558),9714=>array(3,-39,599,558),9715=>array(3,-39,599,558),9716=>array(3,-41,599,561),9717=>array(3,-41,599,561),9718=>array(3,-41,599,561),9719=>array(3,-41,599,561),9720=>array(3,-39,599,558),9721=>array(3,-39,599,558),9722=>array(3,-39,599,558),9723=>array(47,6,554,513),9724=>array(47,6,554,513),9725=>array(85,44,516,475),9726=>array(85,44,516,475),9727=>array(3,-39,599,558),9728=>array(17,80,585,649),9729=>array(26,3,576,225),9730=>array(17,3,585,522),9731=>array(43,-3,559,708),9732=>array(14,23,588,681),9733=>array(28,7,574,525),9734=>array(28,10,574,528),9735=>array(98,2,504,729),9736=>array(29,0,573,731),9737=>array(21,3,581,563),9738=>array(7,2,595,639),9739=>array(9,-1,593,677),9740=>array(26,0,576,724),9741=>array(22,1,580,724),9742=>array(10,-0,592,598),9743=>array(4,5,598,598),9744=>array(54,2,548,504),9745=>array(48,-1,554,512),9746=>array(65,2,537,481),9747=>array(98,43,504,658),9748=>array(14,-2,588,651),9749=>array(38,3,564,688),9750=>array(27,3,575,734),9751=>array(23,1,579,728),9752=>array(19,3,583,596),9753=>array(23,203,579,557),9754=>array(23,132,579,560),9755=>array(23,132,579,560),9756=>array(7,138,595,516),9757=>array(68,0,534,724),9758=>array(7,138,595,516),9759=>array(68,-3,534,720),9760=>array(6,-1,596,593),9761=>array(4,-2,598,728),9762=>array(4,1,598,595),9763=>array(17,3,585,523),9764=>array(38,-0,564,671),9765=>array(47,-0,555,730),9766=>array(59,-1,543,731),9767=>array(47,3,555,751),9768=>array(100,-2,502,725),9769=>array(27,0,575,549),9770=>array(15,1,587,644),9771=>array(4,0,598,594),9772=>array(50,-3,552,669),9773=>array(7,2,595,642),9774=>array(13,2,589,578),9775=>array(7,2,595,591),9784=>array(13,82,589,642),9785=>array(16,80,586,650),9786=>array(16,80,586,650),9787=>array(16,80,586,650),9788=>array(16,80,586,650),9789=>array(76,2,526,722),9790=>array(73,3,529,734),9791=>array(92,-78,510,708),9792=>array(71,-49,531,655),9793=>array(71,-49,531,655),9794=>array(10,75,592,648),9795=>array(35,21,567,710),9796=>array(85,21,517,710),9797=>array(33,65,569,666),9798=>array(37,65,565,666),9799=>array(105,21,497,710),9800=>array(12,0,590,641),9801=>array(26,-4,576,596),9802=>array(13,6,589,601),9803=>array(25,24,577,632),9804=>array(30,-1,572,641),9805=>array(23,-136,579,562),9806=>array(42,88,561,614),9807=>array(24,-75,578,597),9808=>array(27,3,575,597),9809=>array(10,1,592,601),9810=>array(43,156,559,460),9811=>array(46,2,556,642),9812=>array(33,2,569,563),9813=>array(42,0,560,560),9814=>array(55,0,547,639),9815=>array(108,-4,494,596),9816=>array(70,3,532,597),9817=>array(76,3,526,551),9818=>array(52,-2,550,518),9819=>array(26,2,576,596),9820=>array(72,2,530,596),9821=>array(110,3,492,597),9822=>array(50,1,552,641),9823=>array(58,2,544,597),9824=>array(63,65,540,664),9825=>array(7,65,595,663),9826=>array(71,65,531,664),9827=>array(24,65,578,664),9828=>array(62,65,540,664),9829=>array(5,65,597,664),9830=>array(71,65,531,664),9831=>array(24,65,578,667),9832=>array(22,3,580,597),9833=>array(181,16,421,708),9834=>array(79,16,523,708),9835=>array(52,-79,550,706),9836=>array(8,61,594,664),9837=>array(158,18,444,710),9838=>array(211,21,391,710),9839=>array(152,21,450,710),9840=>array(47,-1,555,639),9841=>array(22,-8,580,632),9842=>array(23,-2,579,538),9843=>array(29,5,573,527),9844=>array(37,4,565,514),9845=>array(33,5,569,521),9846=>array(18,3,584,549),9847=>array(30,4,572,525),9848=>array(37,0,565,509),9849=>array(22,6,580,543),9850=>array(22,0,580,537),9851=>array(28,-0,574,528),9852=>array(22,3,580,561),9853=>array(27,2,575,550),9854=>array(22,3,580,561),9855=>array(39,4,563,643),9856=>array(29,2,573,546),9857=>array(29,2,573,546),9858=>array(29,2,573,546),9859=>array(29,0,573,544),9860=>array(29,2,573,546),9861=>array(29,-2,573,542),9862=>array(22,0,580,557),9863=>array(22,2,580,559),9864=>array(22,0,580,557),9865=>array(22,-5,580,552),9866=>array(40,3,562,73),9867=>array(40,3,562,73),9872=>array(73,-1,529,591),9873=>array(56,2,546,640),9874=>array(19,-0,583,520),9875=>array(15,0,587,603),9876=>array(63,6,539,553),9877=>array(92,-1,510,740),9878=>array(9,1,593,558),9879=>array(11,3,591,552),9880=>array(36,-1,566,640),9881=>array(15,0,587,603),9882=>array(21,6,582,656),9883=>array(40,5,562,597),9884=>array(21,-1,582,638),9888=>array(17,1,585,520),9889=>array(66,4,536,642),9904=>array(119,0,484,730),9905=>array(108,0,494,594),9985=>array(22,181,580,494),9986=>array(22,170,580,505),9987=>array(28,156,574,462),9988=>array(30,161,572,501),9990=>array(25,35,577,588),9991=>array(18,31,584,598),9992=>array(30,29,572,544),9993=>array(31,56,571,448),9996=>array(158,5,444,614),9997=>array(22,73,580,498),9998=>array(42,64,560,581),9999=>array(19,109,583,346),10000=>array(42,91,560,608),10001=>array(29,146,573,420),10002=>array(18,133,584,388),10003=>array(74,94,528,561),10004=>array(36,56,566,532),10005=>array(63,55,539,531),10006=>array(31,92,540,601),10007=>array(64,-10,538,593),10008=>array(25,-1,577,646),10009=>array(31,2,571,542),10010=>array(42,3,560,503),10011=>array(28,3,574,550),10012=>array(23,0,579,556),10013=>array(76,1,520,640),10014=>array(62,0,541,639),10015=>array(70,2,532,595),10016=>array(23,1,579,558),10017=>array(35,1,567,616),10018=>array(15,-10,587,562),10019=>array(14,-8,588,567),10020=>array(13,-9,589,567),10021=>array(11,-13,591,566),10022=>array(21,-12,581,552),10023=>array(18,-13,584,557),10025=>array(20,-8,583,527),10026=>array(33,-13,569,526),10027=>array(20,-13,583,522),10028=>array(17,-11,585,529),10029=>array(20,-8,583,527),10030=>array(30,-2,572,514),10031=>array(20,-5,583,531),10032=>array(22,8,580,502),10033=>array(26,-1,576,563),10034=>array(42,-0,560,547),10035=>array(23,-1,579,554),10036=>array(18,-8,584,560),10037=>array(13,-11,589,565),10038=>array(24,-14,578,625),10039=>array(15,-16,587,556),10040=>array(13,-11,589,565),10041=>array(18,-17,584,551),10042=>array(23,1,579,557),10043=>array(24,-8,578,613),10044=>array(27,-9,575,606),10045=>array(25,-10,573,609),10046=>array(16,-13,586,592),10047=>array(18,0,584,551),10048=>array(11,1,591,565),10049=>array(11,-9,591,572),10050=>array(18,-16,584,552),10051=>array(24,-9,578,653),10052=>array(16,1,586,667),10053=>array(23,-3,579,587),10054=>array(12,2,590,594),10055=>array(24,-9,578,605),10056=>array(20,-10,582,552),10057=>array(16,-14,586,556),10058=>array(11,-11,591,569),10059=>array(17,-11,585,513),10061=>array(18,-5,584,527),10063=>array(34,-31,568,504),10064=>array(30,0,572,542),10065=>array(27,-35,575,512),10066=>array(23,0,579,555),10070=>array(21,-3,581,557),10072=>array(263,-119,339,701),10073=>array(225,-120,377,700),10074=>array(165,-151,438,677),10075=>array(233,476,369,731),10076=>array(228,471,374,722),10077=>array(125,476,477,731),10078=>array(120,471,482,722),10081=>array(50,-80,552,688),10082=>array(125,-19,478,598),10083=>array(93,-14,509,603),10084=>array(22,51,580,507),10085=>array(56,-2,546,637),10086=>array(32,12,570,567),10087=>array(24,150,578,472),10088=>array(117,-49,485,688),10089=>array(117,-49,485,688),10090=>array(175,-59,427,665),10091=>array(179,-59,423,643),10092=>array(158,-64,444,667),10093=>array(158,-64,444,667),10094=>array(103,-83,500,647),10095=>array(103,-83,500,647),10096=>array(100,-93,502,727),10097=>array(101,-93,501,728),10098=>array(223,-138,379,683),10099=>array(223,-135,379,686),10100=>array(137,-160,465,671),10101=>array(122,-164,480,676),10132=>array(41,148,562,487),10136=>array(57,71,545,561),10137=>array(41,204,562,509),10138=>array(57,94,545,583),10139=>array(22,204,580,485),10140=>array(36,145,566,530),10141=>array(41,214,562,519),10142=>array(22,184,580,510),10143=>array(26,182,576,503),10144=>array(41,201,562,505),10145=>array(41,189,562,494),10146=>array(47,182,555,512),10147=>array(60,205,542,518),10148=>array(60,140,542,592),10149=>array(26,193,576,530),10150=>array(26,193,576,529),10151=>array(164,128,438,609),10152=>array(26,179,576,500),10153=>array(49,177,553,516),10154=>array(49,148,553,487),10155=>array(26,89,576,498),10156=>array(47,104,555,458),10157=>array(61,107,541,538),10158=>array(41,63,561,530),10159=>array(24,163,578,557),10161=>array(20,124,582,524),10162=>array(71,92,531,584),10163=>array(43,163,559,386),10164=>array(57,90,545,579),10165=>array(41,227,562,427),10166=>array(57,63,545,552),10167=>array(38,90,564,616),10168=>array(21,192,582,409),10169=>array(57,85,545,574),10170=>array(26,146,576,490),10171=>array(14,179,588,461),10172=>array(19,218,583,456),10173=>array(18,174,583,493),10174=>array(24,131,578,462),10175=>array(41,148,562,487),10178=>array(32,0,569,627),10181=>array(125,-163,477,769),10182=>array(125,-163,477,769),10208=>array(57,-233,545,807),10214=>array(145,-132,479,760),10215=>array(124,-132,457,760),10216=>array(165,-132,438,759),10217=>array(165,-132,438,759),10731=>array(57,-233,545,807),10746=>array(32,45,569,582),10747=>array(32,45,569,582),10799=>array(58,72,543,556),10858=>array(43,229,559,624),10859=>array(43,0,559,624),11013=>array(41,190,561,494),11014=>array(149,82,453,602),11015=>array(149,82,453,602),11016=>array(68,109,485,526),11017=>array(117,109,534,526),11018=>array(117,109,534,526),11019=>array(68,109,485,526),11020=>array(41,190,561,494),11021=>array(149,82,453,602),11026=>array(3,-39,599,558),11027=>array(3,-39,599,558),11028=>array(3,-39,599,558),11029=>array(3,-39,599,558),11030=>array(3,-39,599,558),11031=>array(3,-39,599,558),11032=>array(3,-39,599,558),11033=>array(3,-39,599,558),11034=>array(3,-39,599,558),11364=>array(65,-208,602,729),11373=>array(47,-14,562,742),11374=>array(42,-208,560,729),11375=>array(16,0,586,729),11376=>array(47,-14,562,742),11381=>array(67,0,535,729),11382=>array(84,0,523,547),11383=>array(32,0,570,552),11385=>array(91,-13,511,759),11386=>array(48,-14,554,560),11388=>array(190,-149,412,421),11389=>array(129,326,473,734),11390=>array(63,-239,575,742),11391=>array(56,-240,567,729),11800=>array(85,-13,491,729),11807=>array(43,0,559,398),11810=>array(206,403,454,760),11811=>array(148,403,396,760),11812=>array(206,-132,454,225),11813=>array(148,-132,396,225),11822=>array(82,0,488,742),42760=>array(134,0,468,693),42761=>array(134,0,468,693),42762=>array(134,0,468,693),42763=>array(134,0,468,693),42764=>array(134,0,468,693),42765=>array(134,0,468,693),42766=>array(134,0,468,693),42767=>array(134,0,468,693),42768=>array(134,0,468,693),42769=>array(134,0,468,693),42770=>array(134,0,468,693),42771=>array(134,0,468,693),42772=>array(134,0,468,693),42773=>array(134,0,468,693),42774=>array(134,0,468,693),42779=>array(159,326,443,736),42780=>array(159,324,443,734),42781=>array(245,326,356,734),42782=>array(245,326,356,734),42783=>array(245,0,356,408),42786=>array(125,0,492,729),42787=>array(160,0,467,547),42788=>array(90,224,514,742),42789=>array(90,42,514,560),42790=>array(67,-208,535,729),42791=>array(84,-207,523,760),42889=>array(219,0,382,519),42890=>array(191,141,411,405),42891=>array(236,235,366,729),42892=>array(238,458,363,729),42893=>array(49,0,550,760),42894=>array(53,-217,549,760),42896=>array(39,-157,574,729),42897=>array(47,-140,563,560),42922=>array(0,0,601,730),63173=>array(48,-14,554,760),64257=>array(6,0,536,760),64258=>array(6,0,536,760),64338=>array(13,-338,597,263),64339=>array(34,-338,612,264),64340=>array(-18,-324,366,293),64341=>array(-16,-311,618,313),64342=>array(13,-338,597,263),64343=>array(34,-338,612,264),64344=>array(-18,-322,437,293),64345=>array(-16,-322,618,313),64346=>array(13,-352,597,263),64347=>array(34,-328,612,264),64348=>array(-18,-326,420,293),64349=>array(-16,-328,618,313),64350=>array(13,-18,597,574),64351=>array(34,-10,612,565),64352=>array(-18,0,366,634),64353=>array(-16,0,618,650),64354=>array(13,-18,597,600),64355=>array(34,-10,612,604),64356=>array(-18,0,435,654),64357=>array(-16,0,618,671),64358=>array(13,-18,597,608),64359=>array(34,-10,612,628),64360=>array(-18,0,428,658),64361=>array(-16,0,618,656),64362=>array(-52,-64,602,766),64363=>array(-87,-47,612,750),64364=>array(-10,0,430,833),64365=>array(-10,0,612,761),64366=>array(-52,-64,602,774),64367=>array(-87,-47,612,754),64368=>array(-10,0,430,823),64369=>array(-10,0,612,751),64370=>array(43,-244,584,444),64371=>array(0,-350,622,339),64372=>array(-10,-313,545,423),64373=>array(-10,-269,623,423),64374=>array(43,-244,584,444),64375=>array(0,-350,622,339),64376=>array(-10,-152,545,423),64377=>array(-10,-133,623,423),64378=>array(43,-244,584,444),64379=>array(0,-350,622,339),64380=>array(-10,-321,545,423),64381=>array(-10,-312,623,423),64382=>array(43,-244,584,444),64383=>array(0,-350,622,339),64384=>array(-10,-308,545,423),64385=>array(-10,-312,623,423),64394=>array(-25,-246,603,627),64395=>array(-78,-244,612,627),64396=>array(-25,-246,591,612),64397=>array(-78,-244,612,626),64398=>array(5,-60,670,803),64399=>array(-71,-60,626,803),64400=>array(-10,0,521,760),64401=>array(-15,0,620,760),64402=>array(5,-60,673,998),64403=>array(-71,-60,631,1000),64404=>array(-10,0,521,962),64405=>array(-15,0,620,962),64414=>array(9,-162,586,336),64415=>array(-42,-242,612,256),64426=>array(-46,-42,602,498),64427=>array(-46,0,654,498),64428=>array(-10,-42,525,498),64429=>array(-19,0,654,498),64488=>array(-18,0,366,293),64489=>array(-16,0,618,313),64508=>array(0,-171,602,432),64509=>array(-39,-172,612,271),64510=>array(-18,-146,431,293),64511=>array(-16,-146,618,313),65136=>array(148,563,453,854),65137=>array(-16,0,618,854),65138=>array(111,552,456,884),65139=>array(339,0,612,197),65140=>array(148,-295,453,-4),65142=>array(148,563,453,729),65143=>array(-16,0,618,729),65144=>array(146,580,456,884),65145=>array(-16,0,618,884),65146=>array(148,-171,453,-4),65147=>array(-16,-171,618,110),65148=>array(124,591,478,869),65149=>array(-16,0,618,869),65150=>array(154,597,448,891),65151=>array(-16,0,618,891),65152=>array(203,13,522,483),65153=>array(109,0,492,963),65154=>array(109,0,612,963),65155=>array(207,0,383,1040),65156=>array(230,0,612,1040),65157=>array(37,-244,572,620),65158=>array(0,-244,612,618),65159=>array(208,-293,384,760),65160=>array(253,-293,612,760),65161=>array(0,-171,602,599),65162=>array(-39,-172,612,433),65163=>array(-18,0,377,625),65164=>array(-16,0,618,625),65165=>array(229,0,372,760),65166=>array(263,0,612,760),65167=>array(13,-171,597,263),65168=>array(34,-171,612,264),65169=>array(-18,-186,366,293),65170=>array(-16,-195,618,313),65171=>array(86,-28,518,551),65172=>array(42,0,612,622),65173=>array(13,-18,597,427),65174=>array(34,-10,612,427),65175=>array(-18,0,431,525),65176=>array(-16,0,618,525),65177=>array(13,-18,597,598),65178=>array(34,-10,612,598),65179=>array(-18,0,430,696),65180=>array(-16,0,618,677),65181=>array(43,-244,584,444),65182=>array(43,-244,622,444),65183=>array(-10,-146,545,423),65184=>array(-10,-146,623,423),65185=>array(43,-244,584,444),65186=>array(43,-244,622,444),65187=>array(-10,0,545,423),65188=>array(-10,0,623,423),65189=>array(43,-244,584,623),65190=>array(43,-244,622,623),65191=>array(-10,0,545,609),65192=>array(-10,0,623,574),65193=>array(113,-19,537,456),65194=>array(113,-19,612,456),65195=>array(113,-19,537,648),65196=>array(113,-19,612,660),65197=>array(-25,-246,565,267),65198=>array(-78,-244,612,269),65199=>array(-25,-246,565,491),65200=>array(-78,-244,612,499),65201=>array(-96,-240,602,366),65202=>array(-129,-240,614,366),65203=>array(-10,-14,602,366),65204=>array(-10,-14,613,366),65205=>array(-96,-240,602,671),65206=>array(-129,-240,614,671),65207=>array(-10,-14,602,671),65208=>array(-10,-14,613,671),65209=>array(-139,-240,594,319),65210=>array(-166,-240,615,319),65211=>array(-16,0,594,319),65212=>array(-16,0,618,319),65213=>array(-139,-240,594,437),65214=>array(-166,-240,615,437),65215=>array(-16,0,594,469),65216=>array(-16,0,618,462),65217=>array(5,0,588,760),65218=>array(0,0,612,760),65219=>array(-23,0,588,760),65220=>array(-18,0,612,760),65221=>array(5,0,588,760),65222=>array(0,0,612,760),65223=>array(-23,0,588,760),65224=>array(-18,0,612,760),65225=>array(35,-244,589,549),65226=>array(41,-244,619,396),65227=>array(-10,0,497,545),65228=>array(-10,0,612,396),65229=>array(35,-244,589,710),65230=>array(41,-244,619,574),65231=>array(-10,0,497,696),65232=>array(-10,0,612,574),65233=>array(-52,-64,602,630),65234=>array(-87,-47,612,578),65235=>array(-10,0,430,681),65236=>array(-10,0,612,598),65237=>array(0,-230,602,696),65238=>array(-9,-240,612,552),65239=>array(-10,0,430,671),65240=>array(-10,0,612,598),65241=>array(4,-46,593,760),65242=>array(-49,-46,621,760),65243=>array(-10,0,521,760),65244=>array(-15,0,620,760),65245=>array(0,-181,568,760),65246=>array(-37,-181,622,760),65247=>array(-10,0,513,760),65248=>array(-10,0,612,760),65249=>array(29,-240,563,357),65250=>array(0,-240,612,330),65251=>array(-15,-23,519,326),65252=>array(-15,-23,612,326),65253=>array(9,-162,586,480),65254=>array(-42,-242,612,382),65255=>array(-18,0,366,525),65256=>array(-16,0,618,525),65257=>array(86,-28,518,358),65258=>array(42,0,612,436),65259=>array(-10,-42,525,498),65260=>array(-10,-263,612,373),65261=>array(37,-244,572,330),65262=>array(0,-244,612,330),65263=>array(0,-171,602,432),65264=>array(-39,-172,612,271),65265=>array(0,-323,602,432),65266=>array(-39,-326,612,271),65267=>array(-18,-176,430,293),65268=>array(-16,-178,618,313),65269=>array(-67,-10,541,890),65270=>array(-72,-10,612,890),65271=>array(-8,-10,541,966),65272=>array(-21,-10,612,966),65273=>array(53,-320,541,760),65274=>array(53,-333,612,760),65275=>array(53,-10,541,760),65276=>array(53,-10,612,760),65533=>array(22,-138,579,927),65535=>array(51,-177,551,705)); -$cw=array(0=>602,32=>602,33=>602,34=>602,35=>602,36=>602,37=>602,38=>602,39=>602,40=>602,41=>602,42=>602,43=>602,44=>602,45=>602,46=>602,47=>602,48=>602,49=>602,50=>602,51=>602,52=>602,53=>602,54=>602,55=>602,56=>602,57=>602,58=>602,59=>602,60=>602,61=>602,62=>602,63=>602,64=>602,65=>602,66=>602,67=>602,68=>602,69=>602,70=>602,71=>602,72=>602,73=>602,74=>602,75=>602,76=>602,77=>602,78=>602,79=>602,80=>602,81=>602,82=>602,83=>602,84=>602,85=>602,86=>602,87=>602,88=>602,89=>602,90=>602,91=>602,92=>602,93=>602,94=>602,95=>602,96=>602,97=>602,98=>602,99=>602,100=>602,101=>602,102=>602,103=>602,104=>602,105=>602,106=>602,107=>602,108=>602,109=>602,110=>602,111=>602,112=>602,113=>602,114=>602,115=>602,116=>602,117=>602,118=>602,119=>602,120=>602,121=>602,122=>602,123=>602,124=>602,125=>602,126=>602,160=>602,161=>602,162=>602,163=>602,164=>602,165=>602,166=>602,167=>602,168=>602,169=>602,170=>602,171=>602,172=>602,173=>602,174=>602,175=>602,176=>602,177=>602,178=>602,179=>602,180=>602,181=>602,182=>602,183=>602,184=>602,185=>602,186=>602,187=>602,188=>602,189=>602,190=>602,191=>602,192=>602,193=>602,194=>602,195=>602,196=>602,197=>602,198=>602,199=>602,200=>602,201=>602,202=>602,203=>602,204=>602,205=>602,206=>602,207=>602,208=>602,209=>602,210=>602,211=>602,212=>602,213=>602,214=>602,215=>602,216=>602,217=>602,218=>602,219=>602,220=>602,221=>602,222=>602,223=>602,224=>602,225=>602,226=>602,227=>602,228=>602,229=>602,230=>602,231=>602,232=>602,233=>602,234=>602,235=>602,236=>602,237=>602,238=>602,239=>602,240=>602,241=>602,242=>602,243=>602,244=>602,245=>602,246=>602,247=>602,248=>602,249=>602,250=>602,251=>602,252=>602,253=>602,254=>602,255=>602,256=>602,257=>602,258=>602,259=>602,260=>602,261=>602,262=>602,263=>602,264=>602,265=>602,266=>602,267=>602,268=>602,269=>602,270=>602,271=>602,272=>602,273=>602,274=>602,275=>602,276=>602,277=>602,278=>602,279=>602,280=>602,281=>602,282=>602,283=>602,284=>602,285=>602,286=>602,287=>602,288=>602,289=>602,290=>602,291=>602,292=>602,293=>602,294=>602,295=>602,296=>602,297=>602,298=>602,299=>602,300=>602,301=>602,302=>602,303=>602,304=>602,305=>602,306=>602,307=>602,308=>602,309=>602,310=>602,311=>602,312=>602,313=>602,314=>602,315=>602,316=>602,317=>602,318=>602,319=>602,320=>602,321=>602,322=>602,323=>602,324=>602,325=>602,326=>602,327=>602,328=>602,329=>602,330=>602,331=>602,332=>602,333=>602,334=>602,335=>602,336=>602,337=>602,338=>602,339=>602,340=>602,341=>602,342=>602,343=>602,344=>602,345=>602,346=>602,347=>602,348=>602,349=>602,350=>602,351=>602,352=>602,353=>602,354=>602,355=>602,356=>602,357=>602,358=>602,359=>602,360=>602,361=>602,362=>602,363=>602,364=>602,365=>602,366=>602,367=>602,368=>602,369=>602,370=>602,371=>602,372=>602,373=>602,374=>602,375=>602,376=>602,377=>602,378=>602,379=>602,380=>602,381=>602,382=>602,383=>602,384=>602,385=>602,386=>602,387=>602,388=>602,389=>602,390=>602,391=>602,392=>602,393=>602,394=>602,395=>602,396=>602,397=>602,398=>602,399=>602,400=>602,401=>602,402=>602,403=>602,404=>602,405=>602,406=>602,407=>602,408=>602,409=>602,410=>602,411=>602,412=>602,413=>602,414=>602,415=>602,416=>602,417=>602,418=>602,419=>602,420=>602,421=>602,422=>602,423=>602,424=>602,425=>602,426=>602,427=>602,428=>602,429=>602,430=>602,431=>602,432=>602,433=>602,434=>602,435=>602,436=>602,437=>602,438=>602,439=>602,440=>602,441=>602,442=>602,443=>602,444=>602,445=>602,446=>602,447=>602,448=>602,449=>602,450=>602,451=>602,461=>602,462=>602,463=>602,464=>602,465=>602,466=>602,467=>602,468=>602,469=>602,470=>602,471=>602,472=>602,473=>602,474=>602,475=>602,476=>602,477=>602,478=>602,479=>602,480=>602,481=>602,482=>602,483=>602,486=>602,487=>602,488=>602,489=>602,490=>602,491=>602,492=>602,493=>602,494=>602,495=>602,496=>602,500=>602,501=>602,502=>602,504=>602,505=>602,508=>602,509=>602,510=>602,511=>602,512=>602,513=>602,514=>602,515=>602,516=>602,517=>602,518=>602,519=>602,520=>602,521=>602,522=>602,523=>602,524=>602,525=>602,526=>602,527=>602,528=>602,529=>602,530=>602,531=>602,532=>602,533=>602,534=>602,535=>602,536=>602,537=>602,538=>602,539=>602,540=>602,541=>602,542=>602,543=>602,544=>602,545=>602,548=>602,549=>602,550=>602,551=>602,552=>602,553=>602,554=>602,555=>602,556=>602,557=>602,558=>602,559=>602,560=>602,561=>602,562=>602,563=>602,564=>602,565=>602,566=>602,567=>602,568=>602,569=>602,570=>602,571=>602,572=>602,573=>602,574=>602,575=>602,576=>602,577=>602,579=>602,580=>602,581=>602,588=>602,589=>602,592=>602,593=>602,594=>602,595=>602,596=>602,597=>602,598=>602,599=>602,600=>602,601=>602,602=>602,603=>602,604=>602,605=>602,606=>602,607=>602,608=>602,609=>602,610=>602,611=>602,612=>602,613=>602,614=>602,615=>602,616=>602,617=>602,618=>602,619=>602,620=>602,621=>602,622=>602,623=>602,624=>602,625=>602,626=>602,627=>602,628=>602,629=>602,630=>602,631=>602,632=>602,633=>602,634=>602,635=>602,636=>602,637=>602,638=>602,639=>602,640=>602,641=>602,642=>602,643=>602,644=>602,645=>602,646=>602,647=>602,648=>602,649=>602,650=>602,651=>602,652=>602,653=>602,654=>602,655=>602,656=>602,657=>602,658=>602,659=>602,660=>602,661=>602,662=>602,663=>602,664=>602,665=>602,666=>602,667=>602,668=>602,669=>602,670=>602,671=>602,672=>602,673=>602,674=>602,675=>602,676=>602,677=>602,678=>602,679=>602,680=>602,681=>602,682=>602,683=>602,684=>602,685=>602,686=>602,687=>602,688=>602,689=>602,690=>602,691=>602,692=>602,693=>602,694=>602,695=>602,696=>602,697=>602,699=>602,700=>602,701=>602,702=>602,703=>602,704=>602,705=>602,710=>602,711=>602,712=>602,713=>602,716=>602,717=>602,718=>602,719=>602,720=>602,721=>602,722=>602,723=>602,726=>602,727=>602,728=>602,729=>602,730=>602,731=>602,732=>602,733=>602,734=>602,736=>602,737=>602,738=>602,739=>602,740=>602,741=>602,742=>602,743=>602,744=>602,745=>602,750=>602,755=>602,768=>602,769=>602,770=>602,771=>602,772=>602,773=>602,774=>602,775=>602,776=>602,777=>602,778=>602,779=>602,780=>602,781=>602,782=>602,783=>602,784=>602,785=>602,786=>602,787=>602,788=>602,789=>602,790=>602,791=>602,792=>602,793=>602,794=>602,795=>602,796=>602,797=>602,798=>602,799=>602,800=>602,801=>602,802=>602,803=>602,804=>602,805=>602,806=>602,807=>602,808=>602,809=>602,810=>602,811=>602,812=>602,813=>602,814=>602,815=>602,816=>602,817=>602,818=>602,819=>602,820=>602,821=>602,822=>602,823=>602,824=>602,825=>602,826=>602,827=>602,828=>602,829=>602,830=>602,831=>602,835=>602,856=>602,865=>602,884=>602,885=>602,890=>602,894=>602,900=>602,901=>602,902=>602,903=>602,904=>602,905=>602,906=>602,908=>602,910=>602,911=>602,912=>602,913=>602,914=>602,915=>602,916=>602,917=>602,918=>602,919=>602,920=>602,921=>602,922=>602,923=>602,924=>602,925=>602,926=>602,927=>602,928=>602,929=>602,931=>602,932=>602,933=>602,934=>602,935=>602,936=>602,937=>602,938=>602,939=>602,940=>602,941=>602,942=>602,943=>602,944=>602,945=>602,946=>602,947=>602,948=>602,949=>602,950=>602,951=>602,952=>602,953=>602,954=>602,955=>602,956=>602,957=>602,958=>602,959=>602,960=>602,961=>602,962=>602,963=>602,964=>602,965=>602,966=>602,967=>602,968=>602,969=>602,970=>602,971=>602,972=>602,973=>602,974=>602,976=>602,977=>602,978=>602,979=>602,980=>602,981=>602,982=>602,983=>602,984=>602,985=>602,986=>602,987=>602,988=>602,989=>602,990=>602,991=>602,992=>602,993=>602,1008=>602,1009=>602,1010=>602,1011=>602,1012=>602,1013=>602,1014=>602,1015=>602,1016=>602,1017=>602,1018=>602,1019=>602,1020=>602,1021=>602,1022=>602,1023=>602,1024=>602,1025=>602,1026=>602,1027=>602,1028=>602,1029=>602,1030=>602,1031=>602,1032=>602,1033=>602,1034=>602,1035=>602,1036=>602,1037=>602,1038=>602,1039=>602,1040=>602,1041=>602,1042=>602,1043=>602,1044=>602,1045=>602,1046=>602,1047=>602,1048=>602,1049=>602,1050=>602,1051=>602,1052=>602,1053=>602,1054=>602,1055=>602,1056=>602,1057=>602,1058=>602,1059=>602,1060=>602,1061=>602,1062=>602,1063=>602,1064=>602,1065=>602,1066=>602,1067=>602,1068=>602,1069=>602,1070=>602,1071=>602,1072=>602,1073=>602,1074=>602,1075=>602,1076=>602,1077=>602,1078=>602,1079=>602,1080=>602,1081=>602,1082=>602,1083=>602,1084=>602,1085=>602,1086=>602,1087=>602,1088=>602,1089=>602,1090=>602,1091=>602,1092=>602,1093=>602,1094=>602,1095=>602,1096=>602,1097=>602,1098=>602,1099=>602,1100=>602,1101=>602,1102=>602,1103=>602,1104=>602,1105=>602,1106=>602,1107=>602,1108=>602,1109=>602,1110=>602,1111=>602,1112=>602,1113=>602,1114=>602,1115=>602,1116=>602,1117=>602,1118=>602,1119=>602,1122=>602,1123=>602,1138=>602,1139=>602,1168=>602,1169=>602,1170=>602,1171=>602,1172=>602,1173=>602,1174=>602,1175=>602,1176=>602,1177=>602,1178=>602,1179=>602,1186=>602,1187=>602,1188=>602,1189=>602,1194=>602,1195=>602,1196=>602,1197=>602,1198=>602,1199=>602,1200=>602,1201=>602,1202=>602,1203=>602,1210=>602,1211=>602,1216=>602,1217=>602,1218=>602,1219=>602,1220=>602,1223=>602,1224=>602,1227=>602,1228=>602,1231=>602,1232=>602,1233=>602,1234=>602,1235=>602,1236=>602,1237=>602,1238=>602,1239=>602,1240=>602,1241=>602,1242=>602,1243=>602,1244=>602,1245=>602,1246=>602,1247=>602,1248=>602,1249=>602,1250=>602,1251=>602,1252=>602,1253=>602,1254=>602,1255=>602,1256=>602,1257=>602,1258=>602,1259=>602,1260=>602,1261=>602,1262=>602,1263=>602,1264=>602,1265=>602,1266=>602,1267=>602,1268=>602,1269=>602,1270=>602,1271=>602,1272=>602,1273=>602,1296=>602,1297=>602,1306=>602,1307=>602,1308=>602,1309=>602,1329=>602,1330=>602,1331=>602,1332=>602,1333=>602,1334=>602,1335=>602,1336=>602,1337=>602,1338=>602,1339=>602,1340=>602,1341=>602,1342=>602,1343=>602,1344=>602,1345=>602,1346=>602,1347=>602,1348=>602,1349=>602,1350=>602,1351=>602,1352=>602,1353=>602,1354=>602,1355=>602,1356=>602,1357=>602,1358=>602,1359=>602,1360=>602,1361=>602,1362=>602,1363=>602,1364=>602,1365=>602,1366=>602,1369=>602,1370=>602,1371=>602,1372=>602,1373=>602,1374=>602,1375=>602,1377=>602,1378=>602,1379=>602,1380=>602,1381=>602,1382=>602,1383=>602,1384=>602,1385=>602,1386=>602,1387=>602,1388=>602,1389=>602,1390=>602,1391=>602,1392=>602,1393=>602,1394=>602,1395=>602,1396=>602,1397=>602,1398=>602,1399=>602,1400=>602,1401=>602,1402=>602,1403=>602,1404=>602,1405=>602,1406=>602,1407=>602,1408=>602,1409=>602,1410=>602,1411=>602,1412=>602,1413=>602,1414=>602,1415=>602,1417=>602,1418=>602,1542=>602,1543=>602,1545=>602,1546=>602,1548=>602,1557=>602,1563=>602,1567=>602,1569=>602,1570=>602,1571=>602,1572=>602,1573=>602,1574=>602,1575=>602,1576=>602,1577=>602,1578=>602,1579=>602,1580=>602,1581=>602,1582=>602,1583=>602,1584=>602,1585=>602,1586=>602,1587=>602,1588=>602,1589=>602,1590=>602,1591=>602,1592=>602,1593=>602,1594=>602,1600=>602,1601=>602,1602=>602,1603=>602,1604=>602,1605=>602,1606=>602,1607=>602,1608=>602,1609=>602,1610=>602,1611=>602,1612=>602,1613=>602,1614=>602,1615=>602,1616=>602,1617=>602,1618=>602,1619=>602,1620=>602,1621=>602,1626=>602,1632=>602,1633=>602,1634=>602,1635=>602,1636=>602,1637=>602,1638=>602,1639=>602,1640=>602,1641=>602,1642=>602,1643=>602,1644=>602,1645=>602,1652=>602,1657=>602,1658=>602,1659=>602,1662=>602,1663=>602,1664=>602,1667=>602,1668=>602,1670=>602,1671=>602,1681=>602,1688=>602,1700=>602,1705=>602,1711=>602,1726=>602,1740=>602,1776=>602,1777=>602,1778=>602,1779=>602,1780=>602,1781=>602,1782=>602,1783=>602,1784=>602,1785=>602,3713=>602,3714=>602,3716=>602,3719=>602,3720=>602,3722=>602,3725=>602,3732=>602,3733=>602,3734=>602,3735=>602,3737=>602,3738=>602,3739=>602,3740=>602,3741=>602,3742=>602,3743=>602,3745=>602,3746=>602,3747=>602,3749=>602,3751=>602,3754=>602,3755=>602,3757=>602,3758=>602,3759=>602,3760=>602,3761=>602,3762=>602,3763=>602,3764=>602,3765=>602,3766=>602,3767=>602,3768=>602,3769=>602,3771=>602,3772=>602,3784=>602,3785=>602,3786=>602,3787=>602,3788=>602,3789=>602,4304=>602,4305=>602,4306=>602,4307=>602,4308=>602,4309=>602,4310=>602,4311=>602,4312=>602,4313=>602,4314=>602,4315=>602,4316=>602,4317=>602,4318=>602,4319=>602,4320=>602,4321=>602,4322=>602,4323=>602,4324=>602,4325=>602,4326=>602,4327=>602,4328=>602,4329=>602,4330=>602,4331=>602,4332=>602,4333=>602,4334=>602,4335=>602,4336=>602,4337=>602,4338=>602,4339=>602,4340=>602,4341=>602,4342=>602,4343=>602,4344=>602,4345=>602,4346=>602,4347=>602,4348=>602,7426=>602,7432=>602,7433=>602,7444=>602,7446=>602,7447=>602,7453=>602,7454=>602,7455=>602,7468=>602,7469=>602,7470=>602,7472=>602,7473=>602,7474=>602,7475=>602,7476=>602,7477=>602,7478=>602,7479=>602,7480=>602,7481=>602,7482=>602,7483=>602,7484=>602,7486=>602,7487=>602,7488=>602,7489=>602,7490=>602,7491=>602,7492=>602,7493=>602,7494=>602,7495=>602,7496=>602,7497=>602,7498=>602,7499=>602,7500=>602,7501=>602,7502=>602,7503=>602,7504=>602,7505=>602,7506=>602,7507=>602,7508=>602,7509=>602,7510=>602,7511=>602,7512=>602,7513=>602,7514=>602,7515=>602,7522=>602,7523=>602,7524=>602,7525=>602,7543=>602,7544=>602,7547=>602,7557=>602,7579=>602,7580=>602,7581=>602,7582=>602,7583=>602,7584=>602,7585=>602,7586=>602,7587=>602,7588=>602,7589=>602,7590=>602,7591=>602,7592=>602,7593=>602,7594=>602,7595=>602,7596=>602,7597=>602,7598=>602,7599=>602,7600=>602,7601=>602,7602=>602,7603=>602,7604=>602,7605=>602,7606=>602,7607=>602,7609=>602,7610=>602,7611=>602,7612=>602,7613=>602,7614=>602,7615=>602,7680=>602,7681=>602,7682=>602,7683=>602,7684=>602,7685=>602,7686=>602,7687=>602,7688=>602,7689=>602,7690=>602,7691=>602,7692=>602,7693=>602,7694=>602,7695=>602,7696=>602,7697=>602,7698=>602,7699=>602,7704=>602,7705=>602,7706=>602,7707=>602,7708=>602,7709=>602,7710=>602,7711=>602,7712=>602,7713=>602,7714=>602,7715=>602,7716=>602,7717=>602,7718=>602,7719=>602,7720=>602,7721=>602,7722=>602,7723=>602,7724=>602,7725=>602,7728=>602,7729=>602,7730=>602,7731=>602,7732=>602,7733=>602,7734=>602,7735=>602,7736=>602,7737=>602,7738=>602,7739=>602,7740=>602,7741=>602,7742=>602,7743=>602,7744=>602,7745=>602,7746=>602,7747=>602,7748=>602,7749=>602,7750=>602,7751=>602,7752=>602,7753=>602,7754=>602,7755=>602,7756=>602,7757=>602,7764=>602,7765=>602,7766=>602,7767=>602,7768=>602,7769=>602,7770=>602,7771=>602,7772=>602,7773=>602,7774=>602,7775=>602,7776=>602,7777=>602,7778=>602,7779=>602,7784=>602,7785=>602,7786=>602,7787=>602,7788=>602,7789=>602,7790=>602,7791=>602,7792=>602,7793=>602,7794=>602,7795=>602,7796=>602,7797=>602,7798=>602,7799=>602,7800=>602,7801=>602,7804=>602,7805=>602,7806=>602,7807=>602,7808=>602,7809=>602,7810=>602,7811=>602,7812=>602,7813=>602,7814=>602,7815=>602,7816=>602,7817=>602,7818=>602,7819=>602,7820=>602,7821=>602,7822=>602,7823=>602,7824=>602,7825=>602,7826=>602,7827=>602,7828=>602,7829=>602,7830=>602,7831=>602,7832=>602,7833=>602,7835=>602,7839=>602,7840=>602,7841=>602,7852=>602,7853=>602,7856=>602,7857=>602,7862=>602,7863=>602,7864=>602,7865=>602,7868=>602,7869=>602,7878=>602,7879=>602,7882=>602,7883=>602,7884=>602,7885=>602,7896=>602,7897=>602,7898=>602,7899=>602,7900=>602,7901=>602,7904=>602,7905=>602,7906=>602,7907=>602,7908=>602,7909=>602,7912=>602,7913=>602,7914=>602,7915=>602,7918=>602,7919=>602,7920=>602,7921=>602,7922=>602,7923=>602,7924=>602,7925=>602,7928=>602,7929=>602,7936=>602,7937=>602,7938=>602,7939=>602,7940=>602,7941=>602,7942=>602,7943=>602,7944=>602,7945=>602,7946=>602,7947=>602,7948=>602,7949=>602,7950=>602,7951=>602,7952=>602,7953=>602,7954=>602,7955=>602,7956=>602,7957=>602,7960=>602,7961=>602,7962=>602,7963=>602,7964=>602,7965=>602,7968=>602,7969=>602,7970=>602,7971=>602,7972=>602,7973=>602,7974=>602,7975=>602,7976=>602,7977=>602,7978=>602,7979=>602,7980=>602,7981=>602,7982=>602,7983=>602,7984=>602,7985=>602,7986=>602,7987=>602,7988=>602,7989=>602,7990=>602,7991=>602,7992=>602,7993=>602,7994=>602,7995=>602,7996=>602,7997=>602,7998=>602,7999=>602,8000=>602,8001=>602,8002=>602,8003=>602,8004=>602,8005=>602,8008=>602,8009=>602,8010=>602,8011=>602,8012=>602,8013=>602,8016=>602,8017=>602,8018=>602,8019=>602,8020=>602,8021=>602,8022=>602,8023=>602,8025=>602,8027=>602,8029=>602,8031=>602,8032=>602,8033=>602,8034=>602,8035=>602,8036=>602,8037=>602,8038=>602,8039=>602,8040=>602,8041=>602,8042=>602,8043=>602,8044=>602,8045=>602,8046=>602,8047=>602,8048=>602,8049=>602,8050=>602,8051=>602,8052=>602,8053=>602,8054=>602,8055=>602,8056=>602,8057=>602,8058=>602,8059=>602,8060=>602,8061=>602,8064=>602,8065=>602,8066=>602,8067=>602,8068=>602,8069=>602,8070=>602,8071=>602,8072=>602,8073=>602,8074=>602,8075=>602,8076=>602,8077=>602,8078=>602,8079=>602,8080=>602,8081=>602,8082=>602,8083=>602,8084=>602,8085=>602,8086=>602,8087=>602,8088=>602,8089=>602,8090=>602,8091=>602,8092=>602,8093=>602,8094=>602,8095=>602,8096=>602,8097=>602,8098=>602,8099=>602,8100=>602,8101=>602,8102=>602,8103=>602,8104=>602,8105=>602,8106=>602,8107=>602,8108=>602,8109=>602,8110=>602,8111=>602,8112=>602,8113=>602,8114=>602,8115=>602,8116=>602,8118=>602,8119=>602,8120=>602,8121=>602,8122=>602,8123=>602,8124=>602,8125=>602,8126=>602,8127=>602,8128=>602,8129=>602,8130=>602,8131=>602,8132=>602,8134=>602,8135=>602,8136=>602,8137=>602,8138=>602,8139=>602,8140=>602,8141=>602,8142=>602,8143=>602,8144=>602,8145=>602,8146=>602,8147=>602,8150=>602,8151=>602,8152=>602,8153=>602,8154=>602,8155=>602,8157=>602,8158=>602,8159=>602,8160=>602,8161=>602,8162=>602,8163=>602,8164=>602,8165=>602,8166=>602,8167=>602,8168=>602,8169=>602,8170=>602,8171=>602,8172=>602,8173=>602,8174=>602,8175=>602,8178=>602,8179=>602,8180=>602,8182=>602,8183=>602,8184=>602,8185=>602,8186=>602,8187=>602,8188=>602,8189=>602,8190=>602,8192=>602,8193=>602,8194=>602,8195=>602,8196=>602,8197=>602,8198=>602,8199=>602,8200=>602,8201=>602,8202=>602,8208=>602,8209=>602,8210=>602,8211=>602,8212=>602,8213=>602,8214=>602,8215=>602,8216=>602,8217=>602,8218=>602,8219=>602,8220=>602,8221=>602,8222=>602,8223=>602,8224=>602,8225=>602,8226=>602,8227=>602,8230=>602,8239=>602,8240=>602,8241=>602,8242=>602,8243=>602,8244=>602,8245=>602,8246=>602,8247=>602,8249=>602,8250=>602,8252=>602,8253=>602,8254=>602,8261=>602,8262=>602,8263=>602,8264=>602,8265=>602,8267=>602,8287=>602,8304=>602,8305=>602,8308=>602,8309=>602,8310=>602,8311=>602,8312=>602,8313=>602,8314=>602,8315=>602,8316=>602,8317=>602,8318=>602,8319=>602,8320=>602,8321=>602,8322=>602,8323=>602,8324=>602,8325=>602,8326=>602,8327=>602,8328=>602,8329=>602,8330=>602,8331=>602,8332=>602,8333=>602,8334=>602,8336=>602,8337=>602,8338=>602,8339=>602,8340=>602,8341=>602,8342=>602,8343=>602,8344=>602,8345=>602,8346=>602,8347=>602,8348=>602,8352=>602,8353=>602,8354=>602,8355=>602,8356=>602,8357=>602,8358=>602,8359=>602,8360=>602,8361=>602,8362=>602,8363=>602,8364=>602,8365=>602,8366=>602,8367=>602,8368=>602,8369=>602,8370=>602,8371=>602,8372=>602,8373=>602,8376=>602,8377=>602,8450=>602,8453=>602,8461=>602,8462=>602,8463=>602,8469=>602,8470=>602,8471=>602,8473=>602,8474=>602,8477=>602,8482=>602,8484=>602,8486=>602,8490=>602,8491=>602,8494=>602,8520=>602,8531=>602,8532=>602,8533=>602,8534=>602,8535=>602,8536=>602,8537=>602,8538=>602,8539=>602,8540=>602,8541=>602,8542=>602,8543=>602,8592=>602,8593=>602,8594=>602,8595=>602,8596=>602,8597=>602,8598=>602,8599=>602,8600=>602,8601=>602,8602=>602,8603=>602,8604=>602,8605=>602,8606=>602,8607=>602,8608=>602,8609=>602,8610=>602,8611=>602,8612=>602,8613=>602,8614=>602,8615=>602,8616=>602,8617=>602,8618=>602,8619=>602,8620=>602,8621=>602,8622=>602,8623=>602,8624=>602,8625=>602,8626=>602,8627=>602,8628=>602,8629=>602,8630=>602,8631=>602,8632=>602,8633=>602,8634=>602,8635=>602,8636=>602,8637=>602,8638=>602,8639=>602,8640=>602,8641=>602,8642=>602,8643=>602,8644=>602,8645=>602,8646=>602,8647=>602,8648=>602,8649=>602,8650=>602,8651=>602,8652=>602,8653=>602,8654=>602,8655=>602,8656=>602,8657=>602,8658=>602,8659=>602,8660=>602,8661=>602,8662=>602,8663=>602,8664=>602,8665=>602,8666=>602,8667=>602,8668=>602,8669=>602,8670=>602,8671=>602,8672=>602,8673=>602,8674=>602,8675=>602,8676=>602,8677=>602,8678=>602,8679=>602,8680=>602,8681=>602,8682=>602,8683=>602,8684=>602,8685=>602,8686=>602,8687=>602,8688=>602,8689=>602,8690=>602,8691=>602,8692=>602,8693=>602,8694=>602,8695=>602,8696=>602,8697=>602,8698=>602,8699=>602,8700=>602,8701=>602,8702=>602,8703=>602,8704=>602,8705=>602,8706=>602,8707=>602,8708=>602,8709=>602,8710=>602,8711=>602,8712=>602,8713=>602,8714=>602,8715=>602,8716=>602,8717=>602,8719=>602,8721=>602,8722=>602,8723=>602,8725=>602,8727=>602,8728=>602,8729=>602,8730=>602,8731=>602,8732=>602,8733=>602,8734=>602,8735=>602,8736=>602,8743=>602,8744=>602,8745=>602,8746=>602,8747=>602,8748=>602,8749=>602,8756=>602,8757=>602,8758=>602,8759=>602,8760=>602,8761=>602,8762=>602,8763=>602,8764=>602,8765=>602,8769=>602,8770=>602,8771=>602,8772=>602,8773=>602,8774=>602,8775=>602,8776=>602,8777=>602,8778=>602,8779=>602,8780=>602,8781=>602,8782=>602,8783=>602,8784=>602,8785=>602,8786=>602,8787=>602,8788=>602,8789=>602,8790=>602,8791=>602,8792=>602,8793=>602,8794=>602,8795=>602,8796=>602,8797=>602,8798=>602,8799=>602,8800=>602,8801=>602,8802=>602,8803=>602,8804=>602,8805=>602,8806=>602,8807=>602,8808=>602,8809=>602,8813=>602,8814=>602,8815=>602,8816=>602,8817=>602,8818=>602,8819=>602,8820=>602,8821=>602,8822=>602,8823=>602,8824=>602,8825=>602,8826=>602,8827=>602,8828=>602,8829=>602,8830=>602,8831=>602,8832=>602,8833=>602,8834=>602,8835=>602,8836=>602,8837=>602,8838=>602,8839=>602,8840=>602,8841=>602,8842=>602,8843=>602,8847=>602,8848=>602,8849=>602,8850=>602,8853=>602,8854=>602,8855=>602,8856=>602,8857=>602,8858=>602,8859=>602,8860=>602,8861=>602,8862=>602,8863=>602,8864=>602,8865=>602,8866=>602,8867=>602,8868=>602,8869=>602,8901=>602,8902=>602,8909=>602,8922=>602,8923=>602,8924=>602,8925=>602,8926=>602,8927=>602,8928=>602,8929=>602,8930=>602,8931=>602,8932=>602,8933=>602,8934=>602,8935=>602,8936=>602,8937=>602,8943=>602,8960=>602,8961=>602,8962=>602,8963=>602,8964=>602,8965=>602,8966=>602,8968=>602,8969=>602,8970=>602,8971=>602,8972=>602,8973=>602,8974=>602,8975=>602,8976=>602,8977=>602,8978=>602,8979=>602,8980=>602,8981=>602,8984=>602,8985=>602,8988=>602,8989=>602,8990=>602,8991=>602,8992=>602,8993=>602,8997=>602,8998=>602,8999=>602,9000=>602,9003=>602,9013=>602,9015=>602,9016=>602,9017=>602,9018=>602,9019=>602,9020=>602,9021=>602,9022=>602,9025=>602,9026=>602,9027=>602,9028=>602,9031=>602,9032=>602,9033=>602,9035=>602,9036=>602,9037=>602,9040=>602,9042=>602,9043=>602,9044=>602,9047=>602,9048=>602,9049=>602,9050=>602,9051=>602,9052=>602,9054=>602,9055=>602,9056=>602,9059=>602,9060=>602,9061=>602,9064=>602,9065=>602,9067=>602,9068=>602,9069=>602,9070=>602,9071=>602,9072=>602,9075=>602,9076=>602,9077=>602,9078=>602,9079=>602,9080=>602,9081=>602,9082=>602,9085=>602,9088=>602,9089=>602,9090=>602,9091=>602,9096=>602,9097=>602,9098=>602,9099=>602,9109=>602,9115=>602,9116=>602,9117=>602,9118=>602,9119=>602,9120=>602,9121=>602,9122=>602,9123=>602,9124=>602,9125=>602,9126=>602,9127=>602,9128=>602,9129=>602,9130=>602,9131=>602,9132=>602,9133=>602,9134=>602,9166=>602,9167=>602,9251=>602,9600=>602,9601=>602,9602=>602,9603=>602,9604=>602,9605=>602,9606=>602,9607=>602,9608=>602,9609=>602,9610=>602,9611=>602,9612=>602,9613=>602,9614=>602,9615=>602,9616=>602,9617=>602,9618=>602,9619=>602,9620=>602,9621=>602,9622=>602,9623=>602,9624=>602,9625=>602,9626=>602,9627=>602,9628=>602,9629=>602,9630=>602,9631=>602,9632=>602,9633=>602,9634=>602,9635=>602,9636=>602,9637=>602,9638=>602,9639=>602,9640=>602,9641=>602,9642=>602,9643=>602,9644=>602,9645=>602,9646=>602,9647=>602,9648=>602,9649=>602,9650=>602,9651=>602,9652=>602,9653=>602,9654=>602,9655=>602,9656=>602,9657=>602,9658=>602,9659=>602,9660=>602,9661=>602,9662=>602,9663=>602,9664=>602,9665=>602,9666=>602,9667=>602,9668=>602,9669=>602,9670=>602,9671=>602,9672=>602,9673=>602,9674=>602,9675=>602,9676=>602,9677=>602,9678=>602,9679=>602,9680=>602,9681=>602,9682=>602,9683=>602,9684=>602,9685=>602,9686=>602,9687=>602,9688=>602,9689=>602,9690=>602,9691=>602,9692=>602,9693=>602,9694=>602,9695=>602,9696=>602,9697=>602,9698=>602,9699=>602,9700=>602,9701=>602,9702=>602,9703=>602,9704=>602,9705=>602,9706=>602,9707=>602,9708=>602,9709=>602,9710=>602,9711=>602,9712=>602,9713=>602,9714=>602,9715=>602,9716=>602,9717=>602,9718=>602,9719=>602,9720=>602,9721=>602,9722=>602,9723=>602,9724=>602,9725=>602,9726=>602,9727=>602,9728=>602,9729=>602,9730=>602,9731=>602,9732=>602,9733=>602,9734=>602,9735=>602,9736=>602,9737=>602,9738=>602,9739=>602,9740=>602,9741=>602,9742=>602,9743=>602,9744=>602,9745=>602,9746=>602,9747=>602,9748=>602,9749=>602,9750=>602,9751=>602,9752=>602,9753=>602,9754=>602,9755=>602,9756=>602,9757=>602,9758=>602,9759=>602,9760=>602,9761=>602,9762=>602,9763=>602,9764=>602,9765=>602,9766=>602,9767=>602,9768=>602,9769=>602,9770=>602,9771=>602,9772=>602,9773=>602,9774=>602,9775=>602,9784=>602,9785=>602,9786=>602,9787=>602,9788=>602,9789=>602,9790=>602,9791=>602,9792=>602,9793=>602,9794=>602,9795=>602,9796=>602,9797=>602,9798=>602,9799=>602,9800=>602,9801=>602,9802=>602,9803=>602,9804=>602,9805=>602,9806=>602,9807=>602,9808=>602,9809=>602,9810=>602,9811=>602,9812=>602,9813=>602,9814=>602,9815=>602,9816=>602,9817=>602,9818=>602,9819=>602,9820=>602,9821=>602,9822=>602,9823=>602,9824=>602,9825=>602,9826=>602,9827=>602,9828=>602,9829=>602,9830=>602,9831=>602,9832=>602,9833=>602,9834=>602,9835=>602,9836=>602,9837=>602,9838=>602,9839=>602,9840=>602,9841=>602,9842=>602,9843=>602,9844=>602,9845=>602,9846=>602,9847=>602,9848=>602,9849=>602,9850=>602,9851=>602,9852=>602,9853=>602,9854=>602,9855=>602,9856=>602,9857=>602,9858=>602,9859=>602,9860=>602,9861=>602,9862=>602,9863=>602,9864=>602,9865=>602,9866=>602,9867=>602,9872=>602,9873=>602,9874=>602,9875=>602,9876=>602,9877=>602,9878=>602,9879=>602,9880=>602,9881=>602,9882=>602,9883=>602,9884=>602,9888=>602,9889=>602,9904=>602,9905=>602,9985=>602,9986=>602,9987=>602,9988=>602,9990=>602,9991=>602,9992=>602,9993=>602,9996=>602,9997=>602,9998=>602,9999=>602,10000=>602,10001=>602,10002=>602,10003=>602,10004=>602,10005=>602,10006=>602,10007=>602,10008=>602,10009=>602,10010=>602,10011=>602,10012=>602,10013=>602,10014=>602,10015=>602,10016=>602,10017=>602,10018=>602,10019=>602,10020=>602,10021=>602,10022=>602,10023=>602,10025=>602,10026=>602,10027=>602,10028=>602,10029=>602,10030=>602,10031=>602,10032=>602,10033=>602,10034=>602,10035=>602,10036=>602,10037=>602,10038=>602,10039=>602,10040=>602,10041=>602,10042=>602,10043=>602,10044=>602,10045=>602,10046=>602,10047=>602,10048=>602,10049=>602,10050=>602,10051=>602,10052=>602,10053=>602,10054=>602,10055=>602,10056=>602,10057=>602,10058=>602,10059=>602,10061=>602,10063=>602,10064=>602,10065=>602,10066=>602,10070=>602,10072=>602,10073=>602,10074=>602,10075=>602,10076=>602,10077=>602,10078=>602,10081=>602,10082=>602,10083=>602,10084=>602,10085=>602,10086=>602,10087=>602,10088=>602,10089=>602,10090=>602,10091=>602,10092=>602,10093=>602,10094=>602,10095=>602,10096=>602,10097=>602,10098=>602,10099=>602,10100=>602,10101=>602,10132=>602,10136=>602,10137=>602,10138=>602,10139=>602,10140=>602,10141=>602,10142=>602,10143=>602,10144=>602,10145=>602,10146=>602,10147=>602,10148=>602,10149=>602,10150=>602,10151=>602,10152=>602,10153=>602,10154=>602,10155=>602,10156=>602,10157=>602,10158=>602,10159=>602,10161=>602,10162=>602,10163=>602,10164=>602,10165=>602,10166=>602,10167=>602,10168=>602,10169=>602,10170=>602,10171=>602,10172=>602,10173=>602,10174=>602,10175=>602,10178=>602,10181=>602,10182=>602,10208=>602,10214=>602,10215=>602,10216=>602,10217=>602,10731=>602,10746=>602,10747=>602,10799=>602,10858=>602,10859=>602,11013=>602,11014=>602,11015=>602,11016=>602,11017=>602,11018=>602,11019=>602,11020=>602,11021=>602,11026=>602,11027=>602,11028=>602,11029=>602,11030=>602,11031=>602,11032=>602,11033=>602,11034=>602,11364=>602,11373=>602,11374=>602,11375=>602,11376=>602,11381=>602,11382=>602,11383=>602,11385=>602,11386=>602,11388=>602,11389=>602,11390=>602,11391=>602,11800=>602,11807=>602,11810=>602,11811=>602,11812=>602,11813=>602,11822=>602,42760=>602,42761=>602,42762=>602,42763=>602,42764=>602,42765=>602,42766=>602,42767=>602,42768=>602,42769=>602,42770=>602,42771=>602,42772=>602,42773=>602,42774=>602,42779=>602,42780=>602,42781=>602,42782=>602,42783=>602,42786=>602,42787=>602,42788=>602,42789=>602,42790=>602,42791=>602,42889=>602,42890=>602,42891=>602,42892=>602,42893=>602,42894=>602,42896=>602,42897=>602,42922=>602,63173=>602,64257=>602,64258=>602,64338=>602,64339=>602,64340=>602,64341=>602,64342=>602,64343=>602,64344=>602,64345=>602,64346=>602,64347=>602,64348=>602,64349=>602,64350=>602,64351=>602,64352=>602,64353=>602,64354=>602,64355=>602,64356=>602,64357=>602,64358=>602,64359=>602,64360=>602,64361=>602,64362=>602,64363=>602,64364=>602,64365=>602,64366=>602,64367=>602,64368=>602,64369=>602,64370=>602,64371=>602,64372=>602,64373=>602,64374=>602,64375=>602,64376=>602,64377=>602,64378=>602,64379=>602,64380=>602,64381=>602,64382=>602,64383=>602,64384=>602,64385=>602,64394=>602,64395=>602,64396=>602,64397=>602,64398=>602,64399=>602,64400=>602,64401=>602,64402=>602,64403=>602,64404=>602,64405=>602,64414=>602,64415=>602,64426=>602,64427=>602,64428=>602,64429=>602,64488=>602,64489=>602,64508=>602,64509=>602,64510=>602,64511=>602,65136=>602,65137=>602,65138=>602,65139=>602,65140=>602,65142=>602,65143=>602,65144=>602,65145=>602,65146=>602,65147=>602,65148=>602,65149=>602,65150=>602,65151=>602,65152=>602,65153=>602,65154=>602,65155=>602,65156=>602,65157=>602,65158=>602,65159=>602,65160=>602,65161=>602,65162=>602,65163=>602,65164=>602,65165=>602,65166=>602,65167=>602,65168=>602,65169=>602,65170=>602,65171=>602,65172=>602,65173=>602,65174=>602,65175=>602,65176=>602,65177=>602,65178=>602,65179=>602,65180=>602,65181=>602,65182=>602,65183=>602,65184=>602,65185=>602,65186=>602,65187=>602,65188=>602,65189=>602,65190=>602,65191=>602,65192=>602,65193=>602,65194=>602,65195=>602,65196=>602,65197=>602,65198=>602,65199=>602,65200=>602,65201=>602,65202=>602,65203=>602,65204=>602,65205=>602,65206=>602,65207=>602,65208=>602,65209=>602,65210=>602,65211=>602,65212=>602,65213=>602,65214=>602,65215=>602,65216=>602,65217=>602,65218=>602,65219=>602,65220=>602,65221=>602,65222=>602,65223=>602,65224=>602,65225=>602,65226=>602,65227=>602,65228=>602,65229=>602,65230=>602,65231=>602,65232=>602,65233=>602,65234=>602,65235=>602,65236=>602,65237=>602,65238=>602,65239=>602,65240=>602,65241=>602,65242=>602,65243=>602,65244=>602,65245=>602,65246=>602,65247=>602,65248=>602,65249=>602,65250=>602,65251=>602,65252=>602,65253=>602,65254=>602,65255=>602,65256=>602,65257=>602,65258=>602,65259=>602,65260=>602,65261=>602,65262=>602,65263=>602,65264=>602,65265=>602,65266=>602,65267=>602,65268=>602,65269=>602,65270=>602,65271=>602,65272=>602,65273=>602,65274=>602,65275=>602,65276=>602,65279=>602,65529=>602,65530=>602,65531=>602,65532=>602,65533=>602,65535=>602); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonob.z b/lib/combodo/tcpdf/fonts/dejavusansmonob.z deleted file mode 100644 index ef5638e25..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmonob.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonobi.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansmonobi.ctg.z deleted file mode 100644 index aa6da4149..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmonobi.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonobi.php b/lib/combodo/tcpdf/fonts/dejavusansmonobi.php deleted file mode 100644 index 3fb89bd95..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansmonobi.php +++ /dev/null @@ -1,16 +0,0 @@ -97,'FontBBox'=>'[-425 -394 808 1053]','ItalicAngle'=>-11,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>60,'StemH'=>26,'AvgWidth'=>602,'MaxWidth'=>602,'MissingWidth'=>602); -$cbbox=array(0=>array(51,-177,551,705),33=>array(165,0,437,729),34=>array(113,458,488,729),35=>array(-20,0,619,718),36=>array(19,-147,533,760),37=>array(16,0,595,699),38=>array(-16,-14,593,742),39=>array(238,458,363,729),40=>array(165,-132,527,759),41=>array(55,-132,417,759),42=>array(59,278,541,742),43=>array(32,45,569,582),44=>array(102,-140,365,179),45=>array(119,217,453,359),46=>array(170,0,367,179),47=>array(0,-93,525,729),48=>array(44,-14,558,742),49=>array(21,0,498,729),50=>array(-14,0,554,742),51=>array(-15,-14,547,742),52=>array(9,0,547,729),53=>array(3,-14,562,729),54=>array(47,-16,571,741),55=>array(53,0,598,729),56=>array(31,-14,555,742),57=>array(27,-15,551,742),58=>array(149,0,412,519),59=>array(83,-140,412,519),60=>array(43,53,559,574),61=>array(43,144,559,482),62=>array(43,53,559,574),63=>array(142,0,557,742),64=>array(-7,-156,600,681),65=>array(-55,0,515,729),66=>array(-10,0,575,730),67=>array(64,-14,595,742),68=>array(-4,0,569,729),69=>array(14,0,610,729),70=>array(23,0,619,729),71=>array(50,-14,582,742),72=>array(-4,0,606,729),73=>array(13,0,589,729),74=>array(-10,-14,563,729),75=>array(-9,0,668,729),76=>array(39,0,516,729),77=>array(-28,0,630,729),78=>array(-12,0,613,729),79=>array(30,-14,572,742),80=>array(8,0,591,729),81=>array(30,-137,572,742),82=>array(4,0,569,729),83=>array(2,-14,566,742),84=>array(88,0,629,729),85=>array(22,-14,621,729),86=>array(99,0,647,729),87=>array(20,0,669,729),88=>array(-70,0,656,729),89=>array(71,0,663,729),90=>array(-16,0,630,729),91=>array(109,-132,531,760),92=>array(166,-93,362,729),93=>array(52,-132,473,760),94=>array(28,457,574,729),95=>array(0,-236,602,-143),96=>array(181,616,422,800),97=>array(23,-14,557,560),98=>array(23,-14,569,760),99=>array(73,-14,565,560),100=>array(32,-14,621,760),101=>array(37,-14,564,561),102=>array(113,0,619,760),103=>array(9,-207,581,562),104=>array(29,0,547,760),105=>array(7,0,527,813),106=>array(-31,-207,512,813),107=>array(40,0,634,760),108=>array(114,0,505,760),109=>array(-16,0,589,560),110=>array(29,0,547,560),111=>array(43,-14,559,561),112=>array(-18,-208,571,560),113=>array(33,-208,579,561),114=>array(75,0,599,560),115=>array(44,-14,534,560),116=>array(80,0,571,702),117=>array(52,-14,569,547),118=>array(84,0,601,547),119=>array(44,0,647,547),120=>array(-37,0,599,547),121=>array(-44,-207,614,547),122=>array(24,0,580,547),123=>array(64,-163,591,760),124=>array(245,-236,356,764),125=>array(-15,-163,512,760),126=>array(43,226,559,396),161=>array(165,0,437,729),162=>array(51,-153,538,699),163=>array(-11,0,608,742),164=>array(91,86,546,541),165=>array(-14,0,656,729),166=>array(245,-171,356,699),167=>array(51,-95,517,742),168=>array(203,654,535,774),169=>array(0,61,602,663),170=>array(103,209,513,742),171=>array(38,69,538,517),172=>array(43,177,559,439),173=>array(119,217,453,359),174=>array(0,61,602,663),175=>array(206,668,532,760),176=>array(138,417,463,742),177=>array(43,0,559,627),178=>array(127,326,502,742),179=>array(135,319,508,742),180=>array(278,616,590,800),181=>array(-27,-209,560,547),182=>array(50,-96,581,729),183=>array(199,259,397,437),184=>array(74,-196,311,0),185=>array(141,326,476,734),186=>array(108,209,521,742),187=>array(40,69,541,517),188=>array(15,-132,558,810),189=>array(15,-132,577,810),190=>array(23,-132,558,818),191=>array(44,-13,459,729),192=>array(-55,0,515,927),193=>array(-55,0,558,927),194=>array(-55,0,556,927),195=>array(-55,0,572,928),196=>array(-55,0,554,927),197=>array(-55,0,515,928),198=>array(-73,0,640,729),199=>array(64,-196,595,742),200=>array(14,0,610,927),201=>array(14,0,610,927),202=>array(14,0,610,927),203=>array(14,0,610,927),204=>array(13,0,589,927),205=>array(13,0,589,927),206=>array(13,0,589,927),207=>array(13,0,589,927),208=>array(-8,0,569,729),209=>array(-12,0,613,928),210=>array(30,-14,572,927),211=>array(30,-14,572,927),212=>array(30,-14,572,927),213=>array(30,-14,572,928),214=>array(30,-14,572,927),215=>array(58,72,543,556),216=>array(-69,-31,662,761),217=>array(22,-14,621,927),218=>array(22,-14,621,927),219=>array(22,-14,621,927),220=>array(22,-14,621,927),221=>array(71,0,663,927),222=>array(8,0,569,729),223=>array(14,-14,565,761),224=>array(23,-14,557,800),225=>array(23,-14,605,800),226=>array(23,-14,557,800),227=>array(23,-14,566,778),228=>array(23,-14,557,774),229=>array(23,-14,557,888),230=>array(-15,-14,601,560),231=>array(73,-196,565,560),232=>array(37,-14,564,800),233=>array(37,-14,590,800),234=>array(37,-14,564,800),235=>array(37,-14,564,774),236=>array(7,0,527,800),237=>array(7,0,568,800),238=>array(7,0,527,800),239=>array(7,0,527,774),240=>array(40,-14,589,760),241=>array(29,0,551,778),242=>array(43,-14,559,800),243=>array(43,-14,590,800),244=>array(43,-14,559,800),245=>array(43,-14,559,778),246=>array(43,-14,559,774),247=>array(32,42,569,585),248=>array(-40,-57,640,603),249=>array(52,-14,569,800),250=>array(52,-14,590,800),251=>array(52,-14,569,800),252=>array(52,-14,569,774),253=>array(-44,-207,614,800),254=>array(-18,-208,571,760),255=>array(-44,-207,614,774),256=>array(-55,0,562,913),257=>array(23,-14,557,760),258=>array(-55,0,575,927),259=>array(23,-14,557,784),260=>array(-55,-196,515,729),261=>array(23,-196,557,560),262=>array(64,-14,627,927),263=>array(73,-14,632,800),264=>array(64,-14,625,927),265=>array(73,-14,576,800),266=>array(64,-14,595,927),267=>array(73,-14,565,774),268=>array(64,-14,650,927),269=>array(73,-14,613,800),270=>array(-4,0,592,927),271=>array(32,-14,808,760),272=>array(-8,0,569,729),273=>array(32,-14,681,760),274=>array(14,0,610,913),275=>array(37,-14,564,760),276=>array(14,0,610,927),277=>array(37,-14,566,784),278=>array(14,0,610,927),279=>array(37,-14,564,774),280=>array(14,-196,610,729),281=>array(37,-196,564,561),282=>array(14,0,610,927),283=>array(37,-14,603,800),284=>array(50,-14,621,927),285=>array(9,-207,581,800),286=>array(50,-14,599,927),287=>array(9,-207,581,784),288=>array(50,-14,582,927),289=>array(9,-207,581,774),290=>array(50,-241,582,742),291=>array(9,-207,581,771),292=>array(-4,0,606,927),293=>array(29,0,547,927),294=>array(-4,0,650,729),295=>array(10,0,527,760),296=>array(13,0,589,928),297=>array(7,0,529,778),298=>array(13,0,589,913),299=>array(7,0,532,760),300=>array(13,0,589,927),301=>array(7,0,547,784),302=>array(32,-196,608,729),303=>array(10,-196,530,813),304=>array(13,0,589,927),305=>array(7,0,527,547),306=>array(8,-16,718,729),307=>array(5,-193,710,827),308=>array(-10,-14,599,927),309=>array(-31,-207,516,800),310=>array(-9,-227,668,729),311=>array(40,-227,634,760),312=>array(32,0,626,547),313=>array(39,0,556,928),314=>array(114,0,556,928),315=>array(39,-227,516,729),316=>array(104,-224,505,760),317=>array(39,0,600,729),318=>array(114,0,641,760),319=>array(39,0,604,729),320=>array(114,0,678,760),321=>array(-34,0,516,729),322=>array(18,0,580,760),323=>array(-12,0,613,928),324=>array(29,0,587,804),325=>array(-12,-227,613,729),326=>array(29,-227,547,560),327=>array(-12,0,618,927),328=>array(29,0,581,800),329=>array(-84,0,625,760),330=>array(-0,-208,587,743),331=>array(50,-207,565,560),332=>array(30,-14,572,913),333=>array(43,-14,559,760),334=>array(30,-14,575,927),335=>array(43,-14,559,784),336=>array(30,-14,658,927),337=>array(43,-14,619,800),338=>array(15,0,660,729),339=>array(-10,-14,616,560),340=>array(4,0,569,928),341=>array(75,0,670,804),342=>array(4,-227,569,729),343=>array(16,-227,599,560),344=>array(4,0,583,927),345=>array(75,0,613,800),346=>array(2,-14,566,928),347=>array(44,-14,587,804),348=>array(2,-14,569,927),349=>array(44,-14,534,800),350=>array(2,-196,566,742),351=>array(44,-196,534,560),352=>array(2,-14,579,927),353=>array(44,-14,571,800),354=>array(74,-196,629,729),355=>array(80,-196,571,702),356=>array(88,0,629,927),357=>array(80,0,681,813),358=>array(88,0,629,729),359=>array(71,0,562,702),360=>array(22,-14,621,928),361=>array(52,-14,569,778),362=>array(22,-14,621,913),363=>array(52,-14,569,760),364=>array(22,-14,621,927),365=>array(52,-14,569,784),366=>array(22,-14,621,1053),367=>array(52,-14,569,891),368=>array(22,-14,658,927),369=>array(52,-14,619,800),370=>array(22,-204,621,729),371=>array(52,-196,569,547),372=>array(20,0,669,931),373=>array(44,0,647,804),374=>array(71,0,663,931),375=>array(-44,-207,614,804),376=>array(71,0,663,927),377=>array(-16,0,630,928),378=>array(24,0,587,804),379=>array(-16,0,630,927),380=>array(24,0,580,774),381=>array(-16,0,630,927),382=>array(24,0,580,800),383=>array(113,0,619,760),384=>array(23,-14,569,760),385=>array(17,0,607,730),386=>array(8,0,604,729),387=>array(0,-14,539,760),388=>array(29,0,555,729),389=>array(22,-14,561,760),390=>array(7,-14,528,742),391=>array(68,-14,704,802),392=>array(63,-14,702,760),393=>array(-8,0,569,729),394=>array(16,0,589,729),395=>array(29,0,637,729),396=>array(54,-14,634,760),397=>array(41,-220,574,560),398=>array(11,0,607,729),399=>array(44,-14,557,742),400=>array(29,-14,583,742),401=>array(-39,-207,641,729),402=>array(-50,-207,652,760),403=>array(12,-14,663,802),404=>array(41,-142,671,729),405=>array(-68,-1,611,760),406=>array(130,0,589,729),407=>array(13,0,589,729),408=>array(-62,0,649,729),409=>array(11,0,606,760),410=>array(86,0,482,760),411=>array(-35,0,489,760),412=>array(4,-13,636,729),413=>array(-77,-208,679,729),414=>array(49,-208,558,560),415=>array(30,-14,557,742),416=>array(-13,-14,661,759),417=>array(-0,-14,607,570),418=>array(-2,-14,659,742),419=>array(27,-208,675,560),420=>array(40,0,619,729),421=>array(-21,-208,558,760),422=>array(5,-116,561,729),423=>array(32,-14,574,742),424=>array(61,-14,544,560),425=>array(-23,0,629,729),426=>array(95,-207,600,760),427=>array(139,-207,630,702),428=>array(40,0,629,730),429=>array(65,0,557,760),430=>array(88,-208,627,729),431=>array(-27,-14,688,759),432=>array(-23,-14,608,570),433=>array(43,0,627,713),434=>array(30,0,538,729),435=>array(72,0,666,729),436=>array(-41,-207,659,547),437=>array(-15,0,631,729),438=>array(23,0,579,547),439=>array(-23,-14,629,729),440=>array(-26,-14,611,729),441=>array(22,-215,610,547),442=>array(-11,-208,585,547),443=>array(-16,0,551,742),444=>array(-23,-14,615,729),445=>array(-14,-215,573,547),446=>array(27,-15,514,702),447=>array(-18,-208,594,560),448=>array(165,0,438,729),449=>array(53,0,549,729),450=>array(8,0,604,729),451=>array(165,0,437,729),461=>array(-55,0,579,927),462=>array(23,-14,571,800),463=>array(13,0,589,927),464=>array(7,0,571,800),465=>array(30,-14,579,927),466=>array(43,-14,571,800),467=>array(22,-14,621,927),468=>array(52,-14,578,800),469=>array(22,-14,621,985),470=>array(52,-14,569,914),471=>array(22,-14,621,1007),472=>array(52,-14,648,1002),473=>array(22,-14,621,1008),474=>array(52,-14,626,1002),475=>array(22,-14,621,1008),476=>array(52,-14,569,1002),477=>array(41,-14,560,560),478=>array(-55,0,578,985),479=>array(23,-14,557,914),480=>array(-55,0,578,985),481=>array(23,-14,557,914),482=>array(-73,0,640,913),483=>array(-15,-14,601,760),486=>array(50,-14,646,927),487=>array(9,-207,581,800),488=>array(-9,0,668,927),489=>array(40,0,634,927),490=>array(30,-204,572,742),491=>array(43,-204,559,561),492=>array(30,-204,572,913),493=>array(43,-204,559,760),494=>array(-23,-14,629,927),495=>array(-14,-215,577,800),500=>array(50,-14,624,927),501=>array(9,-207,590,800),502=>array(-58,-14,608,729),504=>array(-12,0,613,927),505=>array(29,0,547,801),508=>array(-73,0,660,927),509=>array(-15,-14,601,800),510=>array(-69,-31,662,927),511=>array(-40,-57,640,800),512=>array(-55,0,558,927),513=>array(23,-14,557,800),514=>array(-55,0,550,927),515=>array(23,-14,557,784),516=>array(14,0,610,927),517=>array(37,-14,564,800),518=>array(14,0,610,927),519=>array(37,-14,564,784),520=>array(13,0,589,927),521=>array(7,0,527,800),522=>array(13,0,589,927),523=>array(7,0,527,784),524=>array(30,-14,572,927),525=>array(43,-14,559,800),526=>array(30,-14,572,927),527=>array(43,-14,559,784),528=>array(4,0,569,927),529=>array(75,0,599,800),530=>array(4,0,569,927),531=>array(75,0,599,784),532=>array(22,-14,621,927),533=>array(52,-14,569,800),534=>array(22,-14,621,927),535=>array(52,-14,569,784),536=>array(2,-246,566,742),537=>array(44,-246,534,560),538=>array(66,-246,629,729),539=>array(80,-246,571,702),540=>array(-18,-210,677,742),541=>array(9,-211,620,560),542=>array(-4,0,606,927),543=>array(29,0,556,927),545=>array(-10,-68,564,760),548=>array(5,-207,651,729),549=>array(46,-207,602,547),550=>array(-55,0,515,927),551=>array(23,-14,557,774),552=>array(14,-196,610,729),553=>array(37,-196,564,561),554=>array(30,-14,578,985),555=>array(43,-14,559,914),556=>array(30,-14,578,985),557=>array(43,-14,559,914),558=>array(30,-14,572,927),559=>array(43,-14,559,774),560=>array(30,-14,578,985),561=>array(43,-14,559,914),562=>array(71,0,663,913),563=>array(-44,-207,614,760),564=>array(83,-68,544,760),565=>array(-30,-68,569,560),566=>array(77,-68,569,702),567=>array(-31,-207,460,547),568=>array(-13,-14,576,760),569=>array(26,-214,615,560),570=>array(-69,-31,663,761),571=>array(-69,-31,663,761),572=>array(-41,-57,640,603),573=>array(-6,0,542,729),574=>array(-61,-31,671,761),575=>array(65,-240,556,560),576=>array(49,-240,604,547),577=>array(44,0,612,729),579=>array(-39,0,575,730),580=>array(-8,-14,621,729),581=>array(-45,0,503,729),588=>array(-4,0,569,729),589=>array(68,0,599,560),592=>array(46,-14,568,560),593=>array(59,-14,597,560),594=>array(5,-14,543,560),595=>array(-14,-14,524,759),596=>array(35,-14,519,561),597=>array(84,-69,568,561),598=>array(32,-162,569,760),599=>array(15,-14,614,759),600=>array(18,-14,559,560),601=>array(41,-14,560,560),602=>array(-18,-14,604,560),603=>array(22,-11,581,560),604=>array(-0,-11,559,560),605=>array(-27,-11,584,560),606=>array(53,-21,575,559),607=>array(-4,-207,541,547),608=>array(-26,-208,688,760),609=>array(48,-208,615,547),610=>array(75,0,556,546),611=>array(35,-203,628,554),612=>array(102,-59,613,547),613=>array(86,-214,595,546),614=>array(7,0,516,759),615=>array(28,-208,536,759),616=>array(-22,0,499,760),617=>array(102,-1,500,547),618=>array(-1,0,604,547),619=>array(13,-1,562,759),620=>array(53,0,497,760),621=>array(129,-217,472,760),622=>array(86,-215,609,760),623=>array(21,-13,618,547),624=>array(40,-208,637,547),625=>array(4,-208,602,560),626=>array(-44,-216,603,560),627=>array(-0,-216,519,560),628=>array(5,0,597,547),629=>array(48,-14,554,560),630=>array(37,-1,613,547),631=>array(31,0,564,574),632=>array(-10,-208,612,762),633=>array(42,-13,565,547),634=>array(21,-13,586,759),635=>array(7,-208,531,547),636=>array(16,-208,580,560),637=>array(60,-208,580,560),638=>array(13,0,589,547),639=>array(13,0,504,547),640=>array(-2,0,501,547),641=>array(-21,0,624,547),642=>array(61,-208,551,560),643=>array(-50,-207,652,760),644=>array(-50,-207,652,760),645=>array(117,-207,485,760),646=>array(-38,-207,652,760),647=>array(28,-155,520,547),648=>array(103,-208,595,702),649=>array(33,-14,578,547),650=>array(42,-51,619,547),651=>array(73,-1,564,547),652=>array(-14,0,510,547),653=>array(-53,0,554,547),654=>array(-45,0,614,754),655=>array(86,0,622,547),656=>array(-11,-208,545,547),657=>array(10,-55,565,547),658=>array(-14,-215,577,547),659=>array(6,-215,582,547),660=>array(94,0,542,759),661=>array(102,0,588,759),662=>array(14,0,500,759),663=>array(40,-208,608,759),664=>array(26,-28,575,582),665=>array(5,0,545,547),666=>array(27,-21,549,559),667=>array(9,0,646,759),668=>array(5,0,597,547),669=>array(-26,-208,574,813),670=>array(29,-208,625,547),671=>array(62,0,462,547),672=>array(34,-208,632,759),673=>array(15,0,552,759),674=>array(92,0,579,759),675=>array(-5,-14,611,760),676=>array(1,-219,617,756),677=>array(-13,-55,604,760),678=>array(50,-14,584,702),679=>array(98,-207,629,760),680=>array(63,-69,597,702),681=>array(62,-207,587,760),682=>array(77,-14,585,760),683=>array(73,-2,612,760),684=>array(25,0,637,641),685=>array(85,86,517,641),686=>array(100,-214,628,759),687=>array(110,-208,529,759),688=>array(119,326,439,752),689=>array(119,326,439,751),690=>array(135,177,467,748),691=>array(136,326,463,640),692=>array(139,319,466,633),693=>array(115,209,443,632),694=>array(99,326,503,633),695=>array(138,326,524,633),696=>array(107,211,517,633),697=>array(220,557,408,800),699=>array(205,441,468,760),700=>array(180,441,443,760),701=>array(235,595,393,844),702=>array(293,481,460,760),703=>array(264,481,431,760),704=>array(174,326,454,751),705=>array(171,326,480,751),710=>array(164,616,534,800),711=>array(202,616,571,800),712=>array(228,488,374,759),713=>array(206,668,532,760),716=>array(228,-81,374,190),717=>array(38,-198,364,-106),718=>array(229,-285,470,-102),719=>array(230,-285,542,-102),720=>array(147,0,455,547),721=>array(218,361,419,547),722=>array(252,269,418,547),723=>array(223,269,390,547),726=>array(139,119,463,427),727=>array(183,229,419,317),728=>array(218,639,547,784),729=>array(290,654,447,774),730=>array(226,610,504,888),731=>array(125,-196,335,0),732=>array(184,638,551,778),733=>array(182,616,619,800),734=>array(-165,213,440,524),736=>array(135,216,504,640),737=>array(173,326,429,752),738=>array(140,319,445,640),739=>array(96,326,496,633),740=>array(172,326,479,751),741=>array(183,0,536,693),742=>array(154,0,536,693),743=>array(125,0,536,693),744=>array(96,0,536,693),745=>array(66,0,536,693),750=>array(72,441,589,760),755=>array(94,-245,313,-31),768=>array(181,616,422,800),769=>array(278,616,590,800),770=>array(164,616,534,800),771=>array(184,638,551,778),772=>array(206,668,532,760),773=>array(0,663,602,755),774=>array(218,639,547,784),775=>array(290,654,447,774),776=>array(203,654,535,774),777=>array(196,616,419,849),778=>array(226,610,504,888),779=>array(182,616,619,800),780=>array(202,616,571,800),781=>array(233,616,369,833),782=>array(94,616,508,833),783=>array(154,616,503,800),784=>array(218,639,547,879),785=>array(190,639,521,784),786=>array(212,441,422,590),787=>array(209,595,393,844),788=>array(235,595,393,844),789=>array(278,616,500,800),790=>array(247,-290,488,-106),791=>array(212,-290,524,-106),792=>array(151,-394,369,-123),793=>array(179,-394,397,-123),794=>array(174,658,463,929),795=>array(193,361,409,570),796=>array(147,-245,278,-31),797=>array(122,-305,412,-123),798=>array(89,-394,378,-212),799=>array(110,-394,399,-123),800=>array(156,-215,446,-123),801=>array(245,-207,551,82),802=>array(98,-208,325,81),803=>array(119,-226,277,-105),804=>array(32,-226,364,-105),805=>array(94,-245,313,-31),806=>array(66,-246,276,-97),807=>array(74,-196,311,0),808=>array(104,-196,314,0),809=>array(233,-323,369,-106),810=>array(129,-289,473,-106),811=>array(112,-239,515,-94),812=>array(36,-237,404,-53),813=>array(0,-237,368,-53),814=>array(48,-240,377,-95),815=>array(20,-239,351,-94),816=>array(14,-238,381,-98),817=>array(38,-198,364,-106),818=>array(0,-236,602,-143),819=>array(0,-236,602,-9),820=>array(26,226,576,396),821=>array(84,214,481,309),822=>array(-9,214,611,309),823=>array(-41,-57,640,603),824=>array(-69,-31,663,761),825=>array(128,-245,259,-31),826=>array(129,-254,473,-71),827=>array(134,-386,468,-106),828=>array(87,-239,490,-94),829=>array(160,582,442,839),830=>array(206,595,396,867),831=>array(0,528,602,755),835=>array(209,595,393,844),856=>array(592,654,749,774),865=>array(-132,735,706,880),884=>array(220,557,408,800),885=>array(194,-208,382,35),890=>array(185,-208,306,-45),894=>array(83,-140,412,519),900=>array(278,616,590,800),901=>array(203,654,645,999),902=>array(-55,0,515,800),903=>array(199,259,397,437),904=>array(-123,0,610,800),905=>array(-142,0,606,800),906=>array(-113,0,589,800),908=>array(-35,-14,572,800),910=>array(-193,0,663,800),911=>array(-25,0,559,800),912=>array(164,0,645,999),913=>array(-55,0,515,729),914=>array(-10,0,575,730),915=>array(89,0,685,729),916=>array(-55,0,515,729),917=>array(14,0,610,729),918=>array(-16,0,630,729),919=>array(-4,0,606,729),920=>array(44,-14,557,742),921=>array(13,0,589,729),922=>array(-9,0,668,729),923=>array(-55,0,515,729),924=>array(-28,0,630,729),925=>array(-12,0,613,729),926=>array(-4,0,606,729),927=>array(30,-14,572,742),928=>array(67,0,677,729),929=>array(8,0,591,729),931=>array(-23,0,629,729),932=>array(88,0,629,729),933=>array(71,0,663,729),934=>array(44,0,557,729),935=>array(-70,0,656,729),936=>array(77,0,634,729),937=>array(-25,0,559,713),938=>array(13,0,589,927),939=>array(71,0,663,927),940=>array(26,-12,615,800),941=>array(49,-11,590,800),942=>array(49,-208,590,800),943=>array(164,0,590,800),944=>array(69,0,645,999),945=>array(26,-12,615,559),946=>array(-31,-208,563,766),947=>array(32,-208,590,547),948=>array(27,-14,561,766),949=>array(49,-11,540,557),950=>array(66,-208,604,760),951=>array(49,-208,558,560),952=>array(47,-12,554,770),953=>array(164,0,446,547),954=>array(32,0,626,547),955=>array(36,0,560,760),956=>array(-27,-209,560,547),957=>array(76,0,573,547),958=>array(55,-208,604,760),959=>array(43,-14,559,561),960=>array(4,-19,602,547),961=>array(-1,-208,577,560),962=>array(101,-208,585,561),963=>array(21,-14,598,547),964=>array(98,0,589,547),965=>array(69,0,580,547),966=>array(35,-208,574,552),967=>array(-30,-208,632,547),968=>array(56,-208,643,547),969=>array(31,-14,577,547),970=>array(164,0,535,774),971=>array(69,0,580,774),972=>array(43,-14,590,800),973=>array(69,0,590,800),974=>array(31,-14,590,800),976=>array(54,-11,542,768),977=>array(46,-11,553,768),978=>array(12,0,568,729),979=>array(-228,0,568,800),980=>array(12,0,568,927),981=>array(27,-208,573,760),982=>array(9,0,627,547),983=>array(3,-188,632,547),984=>array(63,-208,576,742),985=>array(66,-208,573,560),986=>array(44,-222,639,729),987=>array(36,-208,602,547),988=>array(23,0,619,729),989=>array(-83,-208,581,760),990=>array(9,-2,602,729),991=>array(42,0,560,759),992=>array(52,-208,563,742),993=>array(-15,-180,501,559),1008=>array(-17,-3,613,547),1009=>array(39,-213,578,560),1010=>array(73,-14,565,560),1011=>array(-31,-207,512,813),1012=>array(44,-14,557,742),1013=>array(78,-14,562,561),1014=>array(34,-14,518,561),1015=>array(8,0,569,729),1016=>array(-18,-208,571,760),1017=>array(64,-14,595,742),1018=>array(-29,0,631,729),1019=>array(-27,-208,629,498),1020=>array(-42,-208,577,560),1021=>array(7,-14,528,742),1022=>array(64,-14,595,742),1023=>array(7,-14,528,742),1024=>array(14,0,610,927),1025=>array(14,0,610,927),1026=>array(76,-207,631,760),1027=>array(89,0,685,927),1028=>array(61,-14,595,742),1029=>array(2,-14,566,742),1030=>array(13,0,589,729),1031=>array(13,0,589,927),1032=>array(-10,-14,563,729),1033=>array(-78,0,576,729),1034=>array(-61,0,576,729),1035=>array(76,0,631,760),1036=>array(-9,0,668,927),1037=>array(-13,0,614,927),1038=>array(20,0,659,927),1039=>array(11,-157,621,729),1040=>array(-55,0,515,729),1041=>array(8,0,604,729),1042=>array(-10,0,575,730),1043=>array(89,0,685,729),1044=>array(-66,-157,601,729),1045=>array(14,0,610,729),1046=>array(-64,0,667,729),1047=>array(-15,-14,547,742),1048=>array(-13,0,614,729),1049=>array(-13,0,614,927),1050=>array(-9,0,668,729),1051=>array(-68,0,606,729),1052=>array(-28,0,630,729),1053=>array(-4,0,606,729),1054=>array(30,-14,572,742),1055=>array(67,0,677,729),1056=>array(8,0,591,729),1057=>array(64,-14,595,742),1058=>array(88,0,629,729),1059=>array(20,0,659,729),1060=>array(11,0,599,729),1061=>array(-70,0,656,729),1062=>array(-17,-157,593,729),1063=>array(73,0,624,760),1064=>array(-33,0,634,729),1065=>array(-18,-157,649,729),1066=>array(61,0,553,729),1067=>array(-51,0,653,729),1068=>array(-10,0,521,729),1069=>array(7,-14,542,742),1070=>array(-51,-14,599,742),1071=>array(-30,0,637,729),1072=>array(23,-14,557,560),1073=>array(18,-14,565,787),1074=>array(5,0,548,547),1075=>array(55,0,552,547),1076=>array(-36,-140,583,547),1077=>array(37,-14,564,561),1078=>array(-46,0,647,547),1079=>array(25,-11,538,560),1080=>array(21,0,586,547),1081=>array(21,0,586,784),1082=>array(32,0,626,547),1083=>array(-20,0,604,547),1084=>array(-11,0,613,547),1085=>array(31,0,576,547),1086=>array(43,-14,559,561),1087=>array(31,0,576,547),1088=>array(-18,-208,571,560),1089=>array(73,-14,565,560),1090=>array(112,0,576,547),1091=>array(-44,-207,614,547),1092=>array(30,-208,571,760),1093=>array(-37,0,599,547),1094=>array(8,-140,553,547),1095=>array(145,0,624,547),1096=>array(-15,0,617,547),1097=>array(-11,-140,621,547),1098=>array(51,0,552,547),1099=>array(-38,0,640,547),1100=>array(14,0,501,547),1101=>array(34,-14,526,560),1102=>array(0,-14,655,560),1103=>array(-6,0,594,547),1104=>array(37,-14,564,800),1105=>array(37,-14,564,774),1106=>array(40,-207,543,760),1107=>array(55,0,590,800),1108=>array(135,-14,619,561),1109=>array(44,-14,534,560),1110=>array(7,0,527,813),1111=>array(7,0,554,774),1112=>array(-31,-207,512,813),1113=>array(-51,0,583,547),1114=>array(-36,0,583,547),1115=>array(20,0,502,760),1116=>array(32,0,626,800),1117=>array(21,0,586,800),1118=>array(-44,-207,614,784),1119=>array(44,-140,590,547),1122=>array(45,0,546,729),1123=>array(57,0,548,760),1138=>array(30,-14,557,742),1139=>array(48,-14,554,560),1168=>array(89,0,714,878),1169=>array(41,0,566,700),1170=>array(86,0,685,729),1171=>array(35,0,552,547),1172=>array(89,-207,685,729),1173=>array(108,-207,605,547),1174=>array(-64,-157,667,729),1175=>array(-46,-140,647,547),1176=>array(-15,-196,547,742),1177=>array(25,-196,538,560),1178=>array(-9,-193,668,729),1179=>array(85,-158,680,547),1186=>array(18,-193,628,729),1187=>array(14,-158,614,547),1188=>array(-33,0,663,729),1189=>array(-15,0,644,547),1194=>array(64,-196,595,742),1195=>array(73,-196,565,560),1196=>array(161,-193,700,729),1197=>array(167,-158,629,547),1198=>array(71,0,663,729),1199=>array(69,-208,615,547),1200=>array(62,0,665,729),1201=>array(44,-208,615,547),1202=>array(13,-193,725,729),1203=>array(27,-158,666,547),1210=>array(49,0,610,760),1211=>array(29,0,547,760),1216=>array(13,0,589,729),1217=>array(-64,0,667,927),1218=>array(-46,0,647,784),1219=>array(-9,-207,666,729),1220=>array(85,-207,680,547),1223=>array(-4,-207,606,729),1224=>array(84,-207,629,547),1227=>array(146,-193,698,760),1228=>array(145,-158,624,547),1231=>array(136,0,427,760),1232=>array(-55,0,575,927),1233=>array(23,-14,557,784),1234=>array(-55,0,554,927),1235=>array(23,-14,557,774),1236=>array(-73,0,640,729),1237=>array(-15,-14,601,560),1238=>array(14,0,610,927),1239=>array(37,-14,564,784),1240=>array(44,-14,557,742),1241=>array(41,-14,560,560),1242=>array(44,-14,557,927),1243=>array(41,-14,560,774),1244=>array(-64,0,667,927),1245=>array(-46,0,647,774),1246=>array(-15,-14,547,927),1247=>array(25,-11,582,774),1248=>array(-23,-14,629,729),1249=>array(-14,-215,577,547),1250=>array(-13,0,614,913),1251=>array(21,0,586,760),1252=>array(-13,0,614,927),1253=>array(21,0,586,762),1254=>array(30,-14,572,927),1255=>array(43,-14,559,774),1256=>array(44,-14,557,742),1257=>array(48,-14,554,560),1258=>array(44,-14,557,927),1259=>array(48,-14,554,774),1260=>array(7,-14,596,927),1261=>array(34,-14,563,774),1262=>array(20,0,659,913),1263=>array(-44,-207,614,760),1264=>array(20,0,659,927),1265=>array(-44,-207,614,774),1266=>array(20,0,659,927),1267=>array(-44,-207,619,800),1268=>array(73,0,640,927),1269=>array(145,0,624,774),1270=>array(89,-193,685,729),1271=>array(108,-158,605,547),1272=>array(-51,0,653,927),1273=>array(-38,0,640,774),1296=>array(29,-14,583,742),1297=>array(49,-11,540,557),1306=>array(30,-137,572,742),1307=>array(33,-208,579,561),1308=>array(20,0,669,729),1309=>array(44,0,647,547),1329=>array(9,-31,606,729),1330=>array(-24,0,574,743),1331=>array(27,0,577,743),1332=>array(27,0,577,743),1333=>array(20,-14,583,729),1334=>array(-20,0,584,743),1335=>array(-16,0,583,729),1336=>array(-24,0,574,743),1337=>array(-50,-14,593,743),1338=>array(-13,-14,618,729),1339=>array(-19,0,542,729),1340=>array(3,0,480,729),1341=>array(-31,-13,601,729),1342=>array(18,-14,646,742),1343=>array(59,0,585,729),1344=>array(12,-37,605,729),1345=>array(0,-31,583,743),1346=>array(27,0,542,743),1347=>array(-12,0,639,741),1348=>array(-12,-14,657,729),1349=>array(16,-14,584,741),1350=>array(59,-14,574,729),1351=>array(17,-13,568,729),1352=>array(-20,0,578,743),1353=>array(38,-39,589,743),1354=>array(30,0,601,741),1355=>array(-17,0,589,741),1356=>array(-56,0,577,743),1357=>array(24,-14,622,729),1358=>array(23,0,585,729),1359=>array(22,-14,577,742),1360=>array(-20,0,578,743),1361=>array(16,-13,584,741),1362=>array(-16,0,583,729),1363=>array(2,0,602,729),1364=>array(-32,0,608,741),1365=>array(30,-14,572,742),1366=>array(-13,-14,582,729),1369=>array(264,481,431,760),1370=>array(169,411,432,730),1371=>array(115,616,486,800),1372=>array(40,618,562,893),1373=>array(151,616,450,800),1374=>array(7,590,565,906),1375=>array(78,618,507,760),1377=>array(21,-13,617,547),1378=>array(-1,-208,546,560),1379=>array(40,-208,588,560),1380=>array(16,-208,539,560),1381=>array(34,-14,566,760),1382=>array(40,-208,588,560),1383=>array(14,0,546,760),1384=>array(-1,-208,546,560),1385=>array(-48,-208,594,560),1386=>array(3,-14,604,760),1387=>array(-12,-208,536,760),1388=>array(86,-208,390,547),1389=>array(-55,-208,615,760),1390=>array(22,-14,583,760),1391=>array(64,-208,573,760),1392=>array(27,0,545,760),1393=>array(33,-14,513,760),1394=>array(16,-208,524,560),1395=>array(45,-14,583,741),1396=>array(63,-14,677,760),1397=>array(55,-207,547,547),1398=>array(77,-13,585,760),1399=>array(26,-208,559,559),1400=>array(27,0,545,560),1401=>array(54,-208,502,579),1402=>array(40,-208,636,547),1403=>array(36,-208,570,559),1404=>array(2,0,532,560),1405=>array(55,-14,572,547),1406=>array(31,-208,581,760),1407=>array(21,-13,581,560),1408=>array(7,-208,555,560),1409=>array(18,-207,590,562),1410=>array(39,0,478,547),1411=>array(20,-208,580,760),1412=>array(-36,-208,599,560),1413=>array(43,-14,559,561),1414=>array(-10,-208,592,760),1415=>array(-13,-14,528,760),1417=>array(169,0,433,519),1418=>array(137,217,472,359),3713=>array(-6,-10,581,560),3714=>array(26,-39,574,568),3716=>array(38,-10,562,568),3719=>array(48,-238,563,568),3720=>array(42,-0,570,575),3722=>array(39,-238,601,563),3725=>array(35,-14,605,560),3732=>array(23,-14,567,560),3733=>array(-12,-15,601,579),3734=>array(74,-240,601,560),3735=>array(18,-8,593,571),3737=>array(-20,-14,617,568),3738=>array(38,-8,594,561),3739=>array(19,-8,616,760),3740=>array(7,-8,687,648),3741=>array(-3,-8,636,760),3742=>array(10,-8,619,561),3743=>array(-9,-8,641,760),3745=>array(-32,-14,619,547),3746=>array(16,-14,627,760),3747=>array(22,-8,599,568),3749=>array(-3,-8,592,568),3751=>array(11,-13,586,560),3754=>array(-11,-8,698,648),3755=>array(-7,-12,608,575),3757=>array(18,-8,595,568),3758=>array(-3,-8,661,617),3759=>array(31,-126,636,579),3760=>array(69,-6,656,567),3761=>array(190,620,720,896),3762=>array(126,0,622,588),3763=>array(-425,0,622,846),3764=>array(3,622,595,950),3765=>array(-54,633,601,962),3766=>array(2,622,595,950),3767=>array(3,633,657,962),3768=>array(147,-385,395,-55),3769=>array(90,-316,418,-28),3771=>array(-14,610,610,896),3772=>array(-11,-311,609,-48),3784=>array(225,659,376,844),3785=>array(-10,622,627,918),3786=>array(20,619,729,963),3787=>array(125,612,478,917),3788=>array(167,603,787,866),3789=>array(177,639,427,846),4304=>array(30,0,552,567),4305=>array(18,0,538,758),4306=>array(8,-196,544,521),4307=>array(7,-197,624,516),4308=>array(12,-196,589,521),4309=>array(13,-196,587,521),4310=>array(16,0,538,757),4311=>array(3,0,605,516),4312=>array(37,0,563,521),4313=>array(15,-196,580,512),4314=>array(28,-196,585,521),4315=>array(18,0,596,757),4316=>array(16,0,568,745),4317=>array(0,0,601,516),4318=>array(11,0,567,754),4319=>array(11,-196,626,539),4320=>array(-21,0,580,765),4321=>array(17,0,538,741),4322=>array(-18,-197,590,656),4323=>array(35,-197,589,531),4324=>array(28,-196,625,521),4325=>array(-7,-196,646,741),4326=>array(22,-197,621,521),4327=>array(18,-196,622,506),4328=>array(21,0,604,757),4329=>array(-26,0,538,757),4330=>array(10,-196,590,539),4331=>array(17,0,626,741),4332=>array(16,0,645,757),4333=>array(-9,-196,563,741),4334=>array(21,0,542,741),4335=>array(5,-196,572,610),4336=>array(10,0,584,757),4337=>array(-0,-196,616,757),4338=>array(3,-134,576,521),4339=>array(12,-196,625,521),4340=>array(-8,-196,614,757),4341=>array(9,0,599,757),4342=>array(16,-196,626,521),4343=>array(4,-197,540,521),4344=>array(12,-197,583,534),4345=>array(62,-196,596,527),4346=>array(38,-95,569,521),4347=>array(87,24,481,492),4348=>array(170,359,453,758),7426=>array(5,-14,621,560),7432=>array(21,-11,580,560),7433=>array(93,-264,613,549),7444=>array(-19,-14,607,560),7446=>array(101,273,607,560),7447=>array(100,-14,607,273),7453=>array(20,0,653,440),7454=>array(32,-2,647,438),7455=>array(21,-0,670,523),7468=>array(82,326,441,734),7469=>array(80,326,516,734),7470=>array(102,326,465,735),7472=>array(107,326,462,734),7473=>array(119,326,484,734),7474=>array(119,326,484,734),7475=>array(139,318,477,742),7476=>array(114,326,488,734),7477=>array(125,326,477,734),7478=>array(128,318,480,734),7479=>array(91,326,505,734),7480=>array(119,326,417,734),7481=>array(98,326,503,734),7482=>array(109,326,494,734),7483=>array(109,326,494,734),7484=>array(131,318,470,742),7486=>array(110,326,471,734),7487=>array(92,326,449,734),7488=>array(165,326,502,734),7489=>array(129,318,499,734),7490=>array(128,326,530,734),7491=>array(132,318,467,640),7492=>array(135,318,470,640),7493=>array(143,318,483,640),7494=>array(110,318,497,640),7495=>array(108,318,449,751),7496=>array(132,318,496,751),7497=>array(134,318,469,640),7498=>array(133,318,468,640),7499=>array(126,320,473,640),7500=>array(129,320,476,640),7501=>array(145,210,495,640),7502=>array(176,178,502,633),7503=>array(102,326,469,751),7504=>array(106,326,479,640),7505=>array(144,210,463,640),7506=>array(137,318,465,640),7507=>array(137,318,442,640),7508=>array(126,479,449,640),7509=>array(153,318,476,479),7510=>array(106,209,470,640),7511=>array(162,326,471,719),7512=>array(150,318,470,632),7513=>array(101,326,493,573),7514=>array(123,319,496,632),7515=>array(166,326,496,632),7522=>array(137,0,465,455),7523=>array(136,0,463,314),7524=>array(150,-8,470,306),7525=>array(166,0,496,306),7543=>array(15,-208,587,561),7544=>array(114,326,488,734),7547=>array(52,0,657,547),7557=>array(170,-207,556,760),7579=>array(119,318,459,640),7580=>array(159,318,465,640),7581=>array(160,288,466,640),7582=>array(127,318,472,755),7583=>array(114,320,463,640),7584=>array(167,326,482,751),7585=>array(140,205,416,632),7586=>array(146,209,494,632),7587=>array(162,207,481,632),7588=>array(103,326,429,751),7589=>array(174,325,429,632),7590=>array(114,326,488,632),7591=>array(114,326,488,632),7592=>array(98,210,466,781),7593=>array(188,205,415,751),7594=>array(187,210,438,751),7595=>array(154,326,404,632),7596=>array(117,209,490,640),7597=>array(134,209,507,632),7598=>array(89,205,494,640),7599=>array(114,205,440,640),7600=>array(119,326,483,632),7601=>array(137,318,465,640),7602=>array(112,209,490,753),7603=>array(147,209,454,640),7604=>array(86,210,516,751),7605=>array(173,210,482,719),7606=>array(133,318,472,632),7607=>array(135,298,497,632),7609=>array(155,326,469,632),7610=>array(106,326,436,632),7611=>array(130,326,472,632),7612=>array(107,209,450,632),7613=>array(121,295,463,632),7614=>array(107,206,470,632),7615=>array(134,319,468,757),7680=>array(-55,-245,515,729),7681=>array(23,-245,557,560),7682=>array(-10,0,575,927),7683=>array(23,-14,569,774),7684=>array(-10,-226,575,730),7685=>array(23,-226,569,760),7686=>array(-10,-198,575,730),7687=>array(23,-198,569,760),7688=>array(64,-196,600,927),7689=>array(73,-196,632,800),7690=>array(-4,0,569,927),7691=>array(32,-14,621,774),7692=>array(-4,-226,569,729),7693=>array(32,-226,621,760),7694=>array(-4,-198,569,729),7695=>array(32,-198,621,760),7696=>array(-17,-196,569,729),7697=>array(14,-196,621,760),7698=>array(-24,-237,569,729),7699=>array(0,-237,621,760),7704=>array(14,-237,610,729),7705=>array(19,-237,564,561),7706=>array(14,-238,610,729),7707=>array(33,-238,564,561),7708=>array(14,-196,610,927),7709=>array(37,-196,566,784),7710=>array(23,0,619,927),7711=>array(113,0,619,927),7712=>array(50,-14,586,913),7713=>array(9,-207,581,760),7714=>array(-4,0,606,927),7715=>array(29,0,547,927),7716=>array(-4,-226,606,729),7717=>array(29,-226,547,760),7718=>array(-4,0,606,915),7719=>array(29,0,547,934),7720=>array(-90,-196,606,729),7721=>array(-73,-196,547,760),7722=>array(-4,-240,606,729),7723=>array(29,-240,547,760),7724=>array(13,-238,589,729),7725=>array(7,-238,527,813),7728=>array(-9,0,668,927),7729=>array(40,0,634,927),7730=>array(-9,-226,668,729),7731=>array(40,-226,634,760),7732=>array(-9,-198,668,729),7733=>array(40,-198,634,760),7734=>array(39,-226,516,729),7735=>array(114,-226,505,760),7736=>array(39,-226,562,913),7737=>array(114,-226,562,913),7738=>array(39,-198,516,729),7739=>array(38,-198,505,760),7740=>array(24,-237,516,729),7741=>array(0,-237,505,760),7742=>array(-28,0,630,927),7743=>array(-16,0,590,800),7744=>array(-28,0,630,927),7745=>array(-16,0,589,774),7746=>array(-28,-226,630,729),7747=>array(-16,-226,589,560),7748=>array(-12,0,613,927),7749=>array(29,0,547,774),7750=>array(-12,-226,613,729),7751=>array(29,-226,547,560),7752=>array(-12,-198,613,729),7753=>array(29,-198,547,560),7754=>array(-12,-237,613,729),7755=>array(0,-237,547,560),7756=>array(30,-14,572,997),7757=>array(43,-14,625,997),7764=>array(8,0,591,931),7765=>array(-18,-208,590,800),7766=>array(8,0,591,927),7767=>array(-18,-208,571,774),7768=>array(4,0,569,927),7769=>array(75,0,599,774),7770=>array(4,-226,569,729),7771=>array(75,-226,599,560),7772=>array(4,-226,569,913),7773=>array(75,-226,599,760),7774=>array(4,-198,569,729),7775=>array(38,-198,599,560),7776=>array(2,-14,566,927),7777=>array(44,-14,534,774),7778=>array(2,-226,566,742),7779=>array(44,-226,534,560),7784=>array(2,-226,566,927),7785=>array(44,-226,534,774),7786=>array(88,0,629,927),7787=>array(80,0,571,927),7788=>array(88,-226,629,729),7789=>array(80,-226,571,702),7790=>array(38,-198,629,729),7791=>array(38,-198,571,702),7792=>array(0,-237,629,729),7793=>array(0,-237,571,702),7794=>array(22,-226,621,729),7795=>array(32,-226,569,547),7796=>array(14,-238,621,729),7797=>array(14,-238,569,547),7798=>array(0,-237,621,729),7799=>array(0,-237,569,547),7800=>array(22,-14,621,997),7801=>array(52,-14,625,997),7804=>array(99,0,647,916),7805=>array(84,0,601,758),7806=>array(99,-226,647,729),7807=>array(84,-226,601,547),7808=>array(20,0,669,931),7809=>array(44,0,647,804),7810=>array(20,0,669,931),7811=>array(44,0,647,804),7812=>array(20,0,669,922),7813=>array(44,0,647,741),7814=>array(20,0,669,927),7815=>array(44,0,647,774),7816=>array(20,-226,669,729),7817=>array(44,-226,647,547),7818=>array(-70,0,656,927),7819=>array(-37,0,599,774),7820=>array(-70,0,656,927),7821=>array(-37,0,599,734),7822=>array(71,0,663,927),7823=>array(-44,-207,614,774),7824=>array(-16,0,630,931),7825=>array(24,0,580,803),7826=>array(-16,-226,630,729),7827=>array(24,-226,580,547),7828=>array(-16,-198,630,729),7829=>array(24,-198,580,547),7830=>array(29,-198,547,760),7831=>array(80,0,571,876),7832=>array(44,0,647,898),7833=>array(-44,-207,614,898),7835=>array(113,0,619,927),7839=>array(27,-14,561,766),7840=>array(-55,-226,515,729),7841=>array(23,-226,557,560),7852=>array(-55,-226,531,931),7853=>array(23,-226,557,803),7856=>array(-55,0,575,997),7857=>array(23,-14,557,954),7862=>array(-55,-226,575,927),7863=>array(23,-226,557,759),7864=>array(14,-226,610,729),7865=>array(37,-226,564,561),7868=>array(14,0,610,928),7869=>array(37,-14,564,762),7878=>array(14,-226,610,931),7879=>array(37,-226,564,803),7882=>array(13,-226,589,729),7883=>array(7,-226,527,813),7884=>array(30,-226,572,742),7885=>array(43,-226,559,561),7896=>array(30,-226,572,931),7897=>array(43,-226,559,803),7898=>array(-13,-14,661,927),7899=>array(-0,-14,607,800),7900=>array(-13,-14,661,927),7901=>array(-0,-14,607,800),7904=>array(-13,-14,661,928),7905=>array(-0,-14,607,778),7906=>array(-13,-226,661,759),7907=>array(-0,-226,607,570),7908=>array(22,-226,621,729),7909=>array(52,-226,569,547),7912=>array(-27,-14,688,927),7913=>array(-23,-14,608,800),7914=>array(-27,-14,688,927),7915=>array(-23,-14,608,800),7918=>array(-27,-14,688,928),7919=>array(-23,-14,608,778),7920=>array(-27,-226,688,759),7921=>array(-23,-226,608,570),7922=>array(71,0,663,931),7923=>array(-44,-207,614,804),7924=>array(71,-226,663,729),7925=>array(-44,-226,614,547),7928=>array(71,0,663,928),7929=>array(-44,-207,614,762),7936=>array(26,-12,615,806),7937=>array(26,-12,615,806),7938=>array(26,-12,615,806),7939=>array(26,-12,615,806),7940=>array(26,-12,644,806),7941=>array(26,-12,653,806),7942=>array(26,-12,615,978),7943=>array(26,-12,615,978),7944=>array(-55,0,515,806),7945=>array(-55,0,515,806),7946=>array(-260,0,515,806),7947=>array(-240,0,515,806),7948=>array(-155,0,515,806),7949=>array(-160,0,515,806),7950=>array(-55,0,515,978),7951=>array(-55,0,515,978),7952=>array(49,-11,540,806),7953=>array(49,-11,540,806),7954=>array(49,-11,573,806),7955=>array(49,-11,578,806),7956=>array(49,-11,644,806),7957=>array(49,-11,653,806),7960=>array(-77,0,610,806),7961=>array(-52,0,610,806),7962=>array(-360,0,610,806),7963=>array(-340,0,610,806),7964=>array(-284,0,610,806),7965=>array(-284,0,610,806),7968=>array(49,-208,558,806),7969=>array(49,-208,558,806),7970=>array(49,-208,573,806),7971=>array(49,-208,578,806),7972=>array(49,-208,644,806),7973=>array(49,-208,653,806),7974=>array(49,-208,588,978),7975=>array(49,-208,588,978),7976=>array(-101,0,606,806),7977=>array(-77,0,606,806),7978=>array(-387,0,606,806),7979=>array(-367,0,606,806),7980=>array(-313,0,606,806),7981=>array(-309,0,606,806),7982=>array(-140,0,606,978),7983=>array(-140,0,606,978),7984=>array(164,0,461,806),7985=>array(164,0,461,806),7986=>array(111,0,573,806),7987=>array(131,0,578,806),7988=>array(160,0,644,806),7989=>array(164,0,653,806),7990=>array(164,0,588,978),7991=>array(164,0,588,978),7992=>array(-77,0,589,806),7993=>array(-52,0,589,806),7994=>array(-348,0,589,806),7995=>array(-338,0,589,806),7996=>array(-279,0,589,806),7997=>array(-279,0,589,806),7998=>array(-118,0,589,978),7999=>array(-118,0,589,978),8000=>array(43,-14,559,806),8001=>array(43,-14,559,806),8002=>array(43,-14,573,806),8003=>array(43,-14,578,806),8004=>array(43,-14,644,806),8005=>array(43,-14,653,806),8008=>array(-40,-14,572,806),8009=>array(-52,-14,572,806),8010=>array(-350,-14,572,806),8011=>array(-331,-14,572,806),8012=>array(-191,-14,572,806),8013=>array(-191,-14,572,806),8016=>array(69,0,580,806),8017=>array(69,0,580,806),8018=>array(69,0,580,806),8019=>array(69,0,580,806),8020=>array(69,0,644,806),8021=>array(69,0,653,806),8022=>array(69,0,588,978),8023=>array(69,0,588,978),8025=>array(-125,0,663,806),8027=>array(-382,0,663,806),8029=>array(-360,0,663,806),8031=>array(-196,0,663,978),8032=>array(31,-14,577,806),8033=>array(31,-14,577,806),8034=>array(31,-14,577,806),8035=>array(31,-14,578,806),8036=>array(31,-14,644,806),8037=>array(31,-14,653,806),8038=>array(31,-14,588,978),8039=>array(31,-14,588,978),8040=>array(-30,0,559,806),8041=>array(-40,0,559,806),8042=>array(-350,0,559,806),8043=>array(-331,0,559,806),8044=>array(-179,0,559,806),8045=>array(-174,0,559,806),8046=>array(-62,0,559,978),8047=>array(-98,0,559,978),8048=>array(26,-12,615,800),8049=>array(26,-12,615,800),8050=>array(49,-11,540,800),8051=>array(49,-11,590,800),8052=>array(49,-208,558,800),8053=>array(49,-208,590,800),8054=>array(164,0,446,800),8055=>array(164,0,590,800),8056=>array(43,-14,559,800),8057=>array(43,-14,590,800),8058=>array(69,0,580,800),8059=>array(69,0,590,800),8060=>array(31,-14,577,800),8061=>array(31,-14,590,800),8064=>array(26,-208,615,806),8065=>array(26,-208,615,806),8066=>array(26,-208,615,806),8067=>array(26,-208,615,806),8068=>array(26,-208,644,806),8069=>array(26,-208,653,806),8070=>array(26,-208,615,978),8071=>array(26,-208,615,978),8072=>array(-55,-208,515,806),8073=>array(-55,-208,515,806),8074=>array(-260,-208,515,806),8075=>array(-240,-208,515,806),8076=>array(-155,-208,515,806),8077=>array(-160,-208,515,806),8078=>array(-55,-208,515,978),8079=>array(-55,-208,515,978),8080=>array(33,-208,558,806),8081=>array(33,-208,558,806),8082=>array(33,-208,573,806),8083=>array(33,-208,578,806),8084=>array(33,-208,644,806),8085=>array(33,-208,653,806),8086=>array(33,-208,588,978),8087=>array(33,-208,588,978),8088=>array(-101,-208,606,806),8089=>array(-77,-208,606,806),8090=>array(-387,-208,606,806),8091=>array(-367,-208,606,806),8092=>array(-313,-208,606,806),8093=>array(-309,-208,606,806),8094=>array(-140,-208,606,978),8095=>array(-140,-208,606,978),8096=>array(31,-208,577,806),8097=>array(31,-208,577,806),8098=>array(31,-208,577,806),8099=>array(31,-208,578,806),8100=>array(31,-208,644,806),8101=>array(31,-208,653,806),8102=>array(31,-208,588,978),8103=>array(31,-208,588,978),8104=>array(-30,-208,559,806),8105=>array(-40,-208,559,806),8106=>array(-350,-208,559,806),8107=>array(-331,-208,559,806),8108=>array(-179,-208,559,806),8109=>array(-174,-208,559,806),8110=>array(-62,-208,559,978),8111=>array(-98,-208,559,978),8112=>array(26,-12,615,784),8113=>array(26,-12,615,760),8114=>array(26,-208,615,800),8115=>array(26,-208,615,559),8116=>array(26,-208,615,800),8118=>array(26,-12,615,778),8119=>array(26,-208,615,778),8120=>array(-55,0,575,927),8121=>array(-55,0,562,913),8122=>array(-55,0,515,800),8123=>array(-55,0,515,800),8124=>array(-55,-208,515,729),8125=>array(263,595,461,806),8126=>array(185,-208,306,-45),8127=>array(263,595,461,806),8128=>array(184,638,551,778),8129=>array(203,654,592,944),8130=>array(33,-208,558,800),8131=>array(33,-208,558,560),8132=>array(33,-208,590,800),8134=>array(49,-208,558,778),8135=>array(33,-208,558,778),8136=>array(-161,0,610,800),8137=>array(-123,0,610,800),8138=>array(-175,0,606,800),8139=>array(-142,0,606,800),8140=>array(-4,-208,606,729),8141=>array(111,595,573,806),8142=>array(160,595,644,806),8143=>array(222,595,588,978),8144=>array(164,0,547,784),8145=>array(164,0,532,760),8146=>array(164,0,535,980),8147=>array(164,0,645,999),8150=>array(164,0,551,778),8151=>array(164,0,592,944),8152=>array(13,0,589,927),8153=>array(13,0,589,913),8154=>array(-146,0,589,800),8155=>array(-113,0,589,800),8157=>array(131,595,578,806),8158=>array(165,595,653,806),8159=>array(222,595,588,978),8160=>array(69,0,580,784),8161=>array(69,0,580,760),8162=>array(69,0,580,980),8163=>array(69,0,645,999),8164=>array(-1,-208,577,806),8165=>array(-1,-208,577,806),8166=>array(69,0,580,778),8167=>array(69,0,592,944),8168=>array(71,0,663,927),8169=>array(71,0,663,913),8170=>array(-185,0,663,800),8171=>array(-193,0,663,800),8172=>array(-62,0,591,806),8173=>array(181,654,535,980),8174=>array(203,654,645,999),8175=>array(181,616,422,800),8178=>array(31,-208,577,800),8179=>array(31,-208,577,547),8180=>array(31,-208,590,800),8182=>array(31,-14,577,778),8183=>array(31,-208,577,778),8184=>array(-139,-14,572,800),8185=>array(-35,-14,572,800),8186=>array(-134,0,559,800),8187=>array(-25,0,559,800),8188=>array(-25,-208,559,713),8189=>array(278,616,590,800),8190=>array(287,595,461,806),8208=>array(119,217,453,359),8209=>array(119,217,453,359),8210=>array(-29,217,597,337),8211=>array(-29,217,597,337),8212=>array(-29,217,597,337),8213=>array(-29,217,597,337),8214=>array(125,-236,476,764),8215=>array(0,-236,602,-9),8216=>array(205,441,468,760),8217=>array(205,441,468,760),8218=>array(84,-140,347,179),8219=>array(242,441,422,760),8220=>array(95,441,612,760),8221=>array(72,441,589,760),8222=>array(-38,-140,478,179),8223=>array(108,441,543,760),8224=>array(89,-96,559,729),8225=>array(24,-96,560,729),8226=>array(125,195,477,547),8227=>array(125,156,516,586),8230=>array(-42,0,537,179),8240=>array(0,0,602,699),8241=>array(0,0,602,699),8242=>array(297,547,553,729),8243=>array(206,547,645,729),8244=>array(114,547,736,729),8245=>array(332,547,518,729),8246=>array(239,547,610,729),8247=>array(149,547,701,729),8249=>array(149,69,428,517),8250=>array(155,69,433,517),8252=>array(15,0,587,729),8253=>array(143,0,559,742),8254=>array(0,663,602,755),8261=>array(109,-132,531,760),8262=>array(52,-132,473,760),8263=>array(-17,0,619,742),8264=>array(14,0,587,742),8265=>array(15,0,588,742),8267=>array(2,-96,608,729),8304=>array(148,319,513,742),8305=>array(137,326,465,781),8308=>array(132,326,479,734),8309=>array(116,319,513,734),8310=>array(141,319,513,742),8311=>array(126,326,513,734),8312=>array(141,319,513,742),8313=>array(141,319,513,742),8314=>array(132,352,470,652),8315=>array(132,469,470,535),8316=>array(139,407,464,596),8317=>array(187,252,415,751),8318=>array(187,252,415,751),8319=>array(130,326,450,640),8320=>array(148,-7,513,416),8321=>array(141,0,476,408),8322=>array(127,0,502,416),8323=>array(135,-7,508,416),8324=>array(132,0,479,408),8325=>array(116,-7,513,408),8326=>array(141,-7,513,416),8327=>array(126,0,513,408),8328=>array(141,-7,513,416),8329=>array(141,-7,513,416),8330=>array(132,25,470,326),8331=>array(132,143,470,208),8332=>array(139,81,464,270),8333=>array(187,-74,415,425),8334=>array(187,-74,415,425),8336=>array(132,-8,467,313),8337=>array(134,-8,469,313),8338=>array(137,-8,465,313),8339=>array(96,0,496,307),8340=>array(133,-8,468,313),8341=>array(119,0,439,426),8342=>array(102,0,469,425),8343=>array(173,0,429,426),8344=>array(106,0,479,313),8345=>array(130,0,450,313),8346=>array(106,-117,470,313),8347=>array(140,-7,445,314),8348=>array(162,0,471,393),8352=>array(37,0,641,729),8353=>array(33,-44,630,778),8354=>array(32,-14,619,742),8355=>array(3,0,628,729),8356=>array(-13,0,604,742),8357=>array(-11,-93,580,640),8358=>array(-39,0,641,729),8359=>array(0,-14,658,729),8360=>array(0,-14,597,729),8361=>array(0,0,666,729),8362=>array(-24,-14,655,729),8363=>array(32,-198,681,760),8364=>array(-16,-14,603,742),8365=>array(0,0,625,729),8366=>array(83,0,630,729),8367=>array(0,-223,638,742),8368=>array(1,-14,626,742),8369=>array(8,0,632,729),8370=>array(34,-81,605,809),8371=>array(-57,0,583,729),8372=>array(-29,-14,632,742),8373=>array(26,-147,639,760),8376=>array(54,0,629,729),8377=>array(56,0,630,729),8450=>array(57,-14,590,742),8453=>array(57,-24,602,752),8461=>array(11,0,588,729),8462=>array(29,0,547,760),8463=>array(29,0,547,760),8469=>array(24,0,580,729),8470=>array(-71,0,582,729),8471=>array(0,61,602,663),8473=>array(36,0,573,729),8474=>array(0,-146,598,742),8477=>array(4,0,597,729),8482=>array(0,447,550,729),8484=>array(6,0,584,729),8486=>array(-25,0,559,713),8490=>array(-9,0,668,729),8491=>array(-55,0,515,928),8494=>array(0,-12,602,647),8520=>array(-9,0,501,813),8531=>array(15,-139,575,810),8532=>array(1,-139,575,818),8533=>array(15,-139,580,810),8534=>array(1,-139,580,818),8535=>array(23,-139,580,818),8536=>array(21,-139,580,810),8537=>array(15,-139,580,810),8538=>array(4,-139,580,810),8539=>array(15,-139,580,810),8540=>array(23,-139,580,818),8541=>array(4,-139,580,810),8542=>array(0,-139,580,810),8543=>array(15,244,558,810),8592=>array(32,97,570,451),8593=>array(124,0,478,538),8594=>array(32,97,570,451),8595=>array(124,0,478,538),8596=>array(32,97,570,451),8597=>array(124,0,478,538),8598=>array(75,-10,522,437),8599=>array(80,-10,527,437),8600=>array(80,-15,526,432),8601=>array(75,-15,522,432),8602=>array(32,97,570,451),8603=>array(32,97,570,451),8604=>array(29,178,566,437),8605=>array(36,178,573,437),8606=>array(32,97,570,451),8607=>array(124,0,478,538),8608=>array(32,97,570,451),8609=>array(124,0,478,538),8610=>array(32,97,570,451),8611=>array(32,97,570,451),8612=>array(32,97,570,451),8613=>array(124,0,478,538),8614=>array(32,97,570,451),8615=>array(124,0,478,538),8616=>array(124,0,478,538),8617=>array(32,97,570,509),8618=>array(32,97,570,509),8619=>array(32,97,570,509),8620=>array(32,97,570,509),8621=>array(32,97,570,451),8622=>array(32,87,570,460),8623=>array(28,-2,562,700),8624=>array(89,0,527,689),8625=>array(75,0,513,689),8626=>array(89,-15,527,674),8627=>array(75,-15,513,674),8628=>array(91,0,526,555),8629=>array(31,-15,586,421),8630=>array(24,168,578,506),8631=>array(24,168,578,506),8632=>array(24,-10,578,542),8633=>array(32,-15,570,634),8634=>array(27,-19,575,511),8635=>array(27,-19,575,511),8636=>array(32,219,570,451),8637=>array(32,97,570,329),8638=>array(246,0,478,538),8639=>array(124,0,356,538),8640=>array(32,219,570,451),8641=>array(32,97,570,329),8642=>array(246,0,478,538),8643=>array(124,0,356,538),8644=>array(32,-15,570,575),8645=>array(6,0,596,538),8646=>array(32,-15,570,575),8647=>array(32,-15,570,575),8648=>array(6,0,596,538),8649=>array(32,-15,570,575),8650=>array(6,0,596,538),8651=>array(32,-15,570,575),8652=>array(32,-15,570,575),8653=>array(32,97,570,451),8654=>array(32,97,570,451),8655=>array(32,97,570,451),8656=>array(32,97,570,451),8657=>array(124,0,478,538),8658=>array(32,97,570,451),8659=>array(124,0,478,538),8660=>array(32,97,570,451),8661=>array(124,0,478,538),8662=>array(61,-28,526,437),8663=>array(76,-28,541,437),8664=>array(76,-15,541,451),8665=>array(61,-15,526,451),8666=>array(32,97,570,451),8667=>array(32,97,570,451),8668=>array(32,97,570,451),8669=>array(32,97,570,451),8670=>array(124,0,478,538),8671=>array(124,0,478,538),8672=>array(32,97,570,451),8673=>array(124,0,478,538),8674=>array(32,97,570,451),8675=>array(124,0,478,538),8676=>array(32,97,570,451),8677=>array(32,97,570,451),8678=>array(2,67,570,480),8679=>array(94,0,508,567),8680=>array(32,67,600,480),8681=>array(94,0,508,567),8682=>array(94,0,508,567),8683=>array(94,0,508,567),8684=>array(94,0,508,567),8685=>array(94,0,508,567),8686=>array(94,0,508,567),8687=>array(94,0,508,567),8688=>array(32,70,600,483),8689=>array(19,-10,578,549),8690=>array(21,0,581,559),8691=>array(94,0,508,567),8692=>array(32,97,570,451),8693=>array(6,0,596,538),8694=>array(32,-139,570,687),8695=>array(32,97,570,451),8696=>array(32,97,570,451),8697=>array(32,92,570,451),8698=>array(32,97,570,451),8699=>array(32,97,570,451),8700=>array(32,97,570,457),8701=>array(2,67,570,480),8702=>array(32,67,600,480),8703=>array(2,67,600,480),8704=>array(16,0,586,729),8705=>array(11,-14,592,742),8706=>array(58,-14,544,674),8707=>array(80,0,533,729),8708=>array(80,-46,533,775),8709=>array(31,43,572,584),8710=>array(-3,0,606,695),8711=>array(-3,0,606,695),8712=>array(49,0,553,744),8713=>array(49,-96,558,840),8714=>array(48,63,554,564),8715=>array(49,0,553,744),8716=>array(49,-96,558,840),8717=>array(48,63,554,564),8719=>array(74,-213,528,741),8721=>array(62,-213,539,741),8722=>array(32,256,569,372),8723=>array(43,0,559,627),8725=>array(0,-93,525,729),8727=>array(59,77,541,542),8728=>array(138,182,463,507),8729=>array(125,168,477,520),8730=>array(24,-19,573,843),8731=>array(24,-19,573,933),8732=>array(24,-19,573,924),8733=>array(86,109,516,508),8734=>array(6,109,596,508),8735=>array(43,122,559,638),8736=>array(43,122,559,638),8743=>array(89,0,513,579),8744=>array(89,0,513,579),8745=>array(89,0,513,579),8746=>array(89,0,513,579),8747=>array(71,-204,530,892),8748=>array(0,-204,602,892),8749=>array(-21,-204,623,892),8756=>array(72,51,532,580),8757=>array(72,51,530,580),8758=>array(219,51,383,580),8759=>array(72,51,532,580),8760=>array(32,256,569,619),8761=>array(36,51,578,580),8762=>array(23,26,581,603),8763=>array(43,0,559,624),8764=>array(43,229,559,398),8765=>array(43,229,559,398),8769=>array(43,48,559,577),8770=>array(43,124,559,482),8771=>array(43,144,559,498),8772=>array(43,16,560,637),8773=>array(43,29,559,614),8774=>array(43,-42,559,614),8775=>array(43,-70,559,695),8776=>array(43,124,559,498),8777=>array(43,30,559,596),8778=>array(43,29,559,587),8779=>array(43,12,559,587),8780=>array(43,29,559,614),8781=>array(42,83,559,543),8782=>array(43,10,559,617),8783=>array(43,144,559,617),8784=>array(43,144,559,707),8785=>array(43,-81,559,707),8786=>array(43,-81,559,707),8787=>array(43,-81,560,707),8788=>array(40,124,563,503),8789=>array(40,124,563,503),8790=>array(43,144,559,482),8791=>array(43,144,559,814),8792=>array(43,144,559,715),8793=>array(43,144,559,824),8794=>array(43,144,559,824),8795=>array(43,144,559,935),8796=>array(43,144,559,889),8797=>array(43,144,559,750),8798=>array(42,144,559,801),8799=>array(42,144,559,903),8800=>array(38,-5,564,631),8801=>array(43,29,559,597),8802=>array(43,-55,559,685),8803=>array(43,-47,559,688),8804=>array(43,0,559,582),8805=>array(43,0,559,582),8806=>array(43,-116,559,633),8807=>array(43,-116,559,633),8808=>array(43,-189,559,633),8809=>array(43,-189,559,633),8813=>array(42,-54,559,680),8814=>array(43,-3,559,629),8815=>array(43,53,559,574),8816=>array(43,-96,559,658),8817=>array(43,-96,559,656),8818=>array(43,-38,559,582),8819=>array(43,-38,559,582),8820=>array(43,-96,559,658),8821=>array(43,-98,559,656),8822=>array(43,-119,559,684),8823=>array(43,-119,559,684),8824=>array(43,-209,559,774),8825=>array(43,-209,559,774),8826=>array(42,-46,558,672),8827=>array(42,-46,558,672),8828=>array(43,-206,559,744),8829=>array(43,-206,559,744),8830=>array(43,-101,559,744),8831=>array(43,-101,559,744),8832=>array(42,-118,558,744),8833=>array(42,-118,558,744),8834=>array(43,67,559,559),8835=>array(43,67,559,559),8836=>array(43,-58,559,684),8837=>array(43,-58,559,684),8838=>array(43,-20,559,645),8839=>array(43,-20,559,645),8840=>array(43,-115,559,729),8841=>array(43,-115,559,729),8842=>array(43,-125,559,645),8843=>array(43,-125,559,645),8847=>array(43,42,559,584),8848=>array(43,42,559,584),8849=>array(43,-10,559,636),8850=>array(43,-10,559,636),8853=>array(13,25,589,604),8854=>array(13,25,589,604),8855=>array(13,25,589,604),8856=>array(13,25,589,604),8857=>array(13,25,589,604),8858=>array(13,25,589,604),8859=>array(13,25,589,604),8860=>array(13,25,589,604),8861=>array(13,25,589,604),8862=>array(24,37,579,591),8863=>array(24,37,579,591),8864=>array(24,37,579,591),8865=>array(24,37,579,591),8866=>array(32,0,569,627),8867=>array(32,0,569,627),8868=>array(32,0,569,627),8869=>array(32,0,569,627),8901=>array(219,259,382,437),8902=>array(110,183,492,545),8909=>array(43,144,559,498),8922=>array(43,-272,559,776),8923=>array(43,-272,559,776),8924=>array(43,0,559,582),8925=>array(43,0,559,582),8926=>array(43,-206,559,744),8927=>array(43,-206,559,744),8928=>array(43,-244,559,803),8929=>array(43,-244,559,803),8930=>array(43,-143,559,769),8931=>array(43,-143,559,769),8932=>array(43,-123,559,636),8933=>array(43,-123,559,636),8934=>array(43,-158,559,582),8935=>array(43,-158,559,582),8936=>array(43,-220,559,744),8937=>array(43,-220,559,744),8943=>array(28,225,574,404),8960=>array(31,43,572,584),8961=>array(56,152,540,453),8962=>array(54,0,548,596),8963=>array(71,406,530,746),8964=>array(71,-132,530,209),8965=>array(71,0,530,459),8966=>array(71,0,530,581),8968=>array(119,-132,541,760),8969=>array(179,-132,483,760),8970=>array(119,-132,423,760),8971=>array(61,-132,483,760),8972=>array(261,73,585,415),8973=>array(6,73,331,415),8974=>array(261,345,585,687),8975=>array(6,345,331,687),8976=>array(43,177,559,439),8977=>array(35,113,567,646),8978=>array(3,211,599,512),8979=>array(3,211,599,512),8980=>array(90,168,512,512),8981=>array(76,107,510,539),8984=>array(17,95,585,664),8985=>array(43,177,559,439),8988=>array(131,352,463,701),8989=>array(139,352,471,701),8990=>array(131,-70,463,279),8991=>array(139,-70,471,279),8992=>array(237,-250,566,925),8993=>array(33,-239,362,940),8997=>array(31,95,571,613),8998=>array(3,145,599,536),8999=>array(46,145,556,536),9000=>array(24,212,578,517),9003=>array(3,145,599,536),9013=>array(25,-33,576,296),9015=>array(125,-114,477,843),9016=>array(3,-114,599,843),9017=>array(3,-114,599,843),9018=>array(3,-114,599,843),9019=>array(3,-114,599,843),9020=>array(3,-114,599,843),9021=>array(3,-171,599,900),9022=>array(3,57,599,658),9025=>array(3,-100,599,829),9026=>array(3,-100,599,829),9027=>array(3,-114,599,843),9028=>array(3,-114,599,843),9031=>array(3,-114,599,843),9032=>array(3,-114,599,843),9033=>array(3,-29,599,729),9035=>array(16,-171,586,900),9036=>array(3,-100,599,829),9037=>array(3,-100,599,829),9040=>array(3,-114,599,843),9042=>array(16,-171,586,900),9043=>array(3,-100,599,829),9044=>array(3,-100,599,829),9047=>array(3,-114,599,843),9048=>array(113,-114,489,729),9049=>array(3,-114,599,729),9050=>array(3,-114,599,655),9051=>array(113,-114,489,496),9052=>array(3,-114,599,658),9054=>array(3,-114,599,843),9055=>array(-10,44,612,671),9056=>array(3,-114,599,843),9059=>array(110,183,492,652),9060=>array(147,222,455,676),9061=>array(3,57,599,847),9064=>array(43,226,559,676),9065=>array(43,53,559,676),9067=>array(16,0,586,729),9068=>array(43,-14,559,742),9069=>array(43,-171,559,900),9070=>array(113,-140,489,519),9071=>array(3,-114,599,843),9072=>array(3,-114,599,843),9075=>array(132,0,478,547),9076=>array(73,-208,558,560),9077=>array(31,-14,571,547),9078=>array(3,-114,599,559),9079=>array(64,-114,538,561),9080=>array(113,-114,489,547),9081=>array(3,-114,599,547),9082=>array(26,-12,568,559),9085=>array(8,-232,594,101),9088=>array(25,-33,576,528),9089=>array(3,92,599,528),9090=>array(3,92,599,528),9091=>array(3,172,599,572),9096=>array(35,27,566,601),9097=>array(34,46,567,579),9098=>array(34,46,567,579),9099=>array(34,46,567,579),9109=>array(3,-114,599,843),9115=>array(113,-252,488,928),9116=>array(113,-252,255,940),9117=>array(113,-240,488,940),9118=>array(114,-252,489,928),9119=>array(347,-252,489,940),9120=>array(114,-240,489,940),9121=>array(113,-252,488,928),9122=>array(113,-252,255,940),9123=>array(113,-240,488,940),9124=>array(113,-252,488,928),9125=>array(346,-252,488,940),9126=>array(113,-240,488,940),9127=>array(232,-261,594,928),9128=>array(8,-247,370,934),9129=>array(232,-240,594,934),9130=>array(232,-256,370,934),9131=>array(8,-261,370,928),9132=>array(232,-247,594,934),9133=>array(8,-240,370,934),9134=>array(237,-250,362,940),9166=>array(2,67,570,567),9167=>array(3,0,599,596),9251=>array(14,-232,574,101),9600=>array(-10,260,612,770),9601=>array(-10,-250,612,-123),9602=>array(-10,-250,612,5),9603=>array(-10,-250,612,132),9604=>array(-10,-250,612,260),9605=>array(-10,-250,612,387),9606=>array(-10,-250,612,515),9607=>array(-10,-250,612,642),9608=>array(-10,-250,612,770),9609=>array(-10,-250,534,770),9610=>array(-10,-250,457,770),9611=>array(-10,-250,379,770),9612=>array(-10,-250,301,770),9613=>array(-10,-250,223,770),9614=>array(-10,-250,146,770),9615=>array(-10,-250,68,770),9616=>array(301,-250,612,770),9617=>array(-10,-250,534,770),9618=>array(-10,-250,612,770),9619=>array(-10,-250,612,770),9620=>array(-10,642,612,770),9621=>array(534,-250,611,770),9622=>array(-10,-250,301,260),9623=>array(301,-250,612,260),9624=>array(-10,260,301,770),9625=>array(-10,-250,612,770),9626=>array(-10,-250,612,770),9627=>array(-10,-250,612,770),9628=>array(-10,-250,612,770),9629=>array(301,260,612,770),9630=>array(-10,-250,612,770),9631=>array(-10,-250,612,770),9632=>array(3,-39,599,558),9633=>array(3,-39,599,558),9634=>array(3,-39,599,558),9635=>array(3,-39,599,558),9636=>array(3,-39,599,558),9637=>array(3,-39,599,558),9638=>array(3,-39,599,558),9639=>array(3,-39,599,558),9640=>array(3,-39,599,558),9641=>array(3,-39,599,558),9642=>array(107,66,495,454),9643=>array(107,66,495,454),9644=>array(3,117,599,402),9645=>array(3,117,599,402),9646=>array(158,-39,444,558),9647=>array(158,-39,444,558),9648=>array(3,117,599,402),9649=>array(3,117,599,402),9650=>array(3,-39,599,558),9651=>array(3,-39,599,558),9652=>array(107,66,495,454),9653=>array(107,66,495,454),9654=>array(3,-39,599,558),9655=>array(3,-39,599,558),9656=>array(107,66,495,454),9657=>array(107,66,495,454),9658=>array(3,66,599,454),9659=>array(3,66,599,454),9660=>array(3,-39,599,558),9661=>array(3,-39,599,558),9662=>array(107,66,495,454),9663=>array(107,66,495,454),9664=>array(3,-39,599,558),9665=>array(3,-39,599,558),9666=>array(107,66,495,454),9667=>array(107,66,495,454),9668=>array(3,66,599,454),9669=>array(3,66,599,454),9670=>array(3,-39,599,558),9671=>array(3,-38,599,558),9672=>array(3,-39,599,558),9673=>array(3,-41,599,561),9674=>array(57,-233,545,807),9675=>array(3,-41,599,561),9676=>array(3,-41,599,561),9677=>array(3,-41,599,561),9678=>array(3,-41,599,561),9679=>array(3,-41,599,561),9680=>array(3,-41,599,561),9681=>array(3,-41,599,561),9682=>array(3,-41,599,561),9683=>array(3,-41,599,561),9684=>array(3,-41,599,561),9685=>array(3,-41,599,561),9686=>array(152,-41,450,561),9687=>array(152,-41,450,561),9688=>array(-10,-10,612,770),9689=>array(-10,-250,612,770),9690=>array(-10,260,612,770),9691=>array(-10,-250,612,260),9692=>array(152,260,450,561),9693=>array(152,260,450,561),9694=>array(152,-41,450,260),9695=>array(152,-41,450,260),9696=>array(3,260,599,561),9697=>array(3,-41,599,260),9698=>array(3,-39,599,558),9699=>array(3,-39,599,558),9700=>array(3,-39,599,558),9701=>array(3,-39,599,558),9702=>array(125,195,477,547),9703=>array(3,-39,599,558),9704=>array(3,-39,599,558),9705=>array(3,-39,599,558),9706=>array(3,-39,599,558),9707=>array(3,-39,599,558),9708=>array(3,-39,599,558),9709=>array(3,-39,599,558),9710=>array(3,-39,599,558),9711=>array(-10,-54,612,573),9712=>array(3,-39,599,558),9713=>array(3,-39,599,558),9714=>array(3,-39,599,558),9715=>array(3,-39,599,558),9716=>array(3,-41,599,561),9717=>array(3,-41,599,561),9718=>array(3,-41,599,561),9719=>array(3,-41,599,561),9720=>array(3,-39,599,558),9721=>array(3,-39,599,558),9722=>array(3,-39,599,558),9723=>array(47,6,554,513),9724=>array(47,6,554,513),9725=>array(85,44,516,475),9726=>array(85,44,516,475),9727=>array(3,-39,599,558),9728=>array(17,80,585,649),9784=>array(13,82,589,642),9785=>array(16,80,586,650),9786=>array(16,80,586,650),9787=>array(16,80,586,650),9788=>array(16,80,586,650),9791=>array(92,-78,510,708),9792=>array(71,-49,531,655),9793=>array(71,-49,531,655),9794=>array(10,75,592,648),9795=>array(35,21,567,710),9796=>array(85,21,517,710),9797=>array(33,65,569,666),9798=>array(37,65,565,666),9799=>array(105,21,497,710),9824=>array(63,65,540,664),9825=>array(7,65,595,663),9826=>array(71,65,531,664),9827=>array(24,65,578,664),9828=>array(62,65,540,664),9829=>array(5,65,597,664),9830=>array(71,65,531,664),9831=>array(24,65,578,667),9833=>array(181,16,421,708),9834=>array(79,16,523,708),9835=>array(52,-79,550,706),9836=>array(8,61,594,664),9837=>array(158,18,444,710),9838=>array(211,21,391,710),9839=>array(152,21,450,710),10178=>array(32,0,569,627),10181=>array(76,-163,509,769),10182=>array(35,-163,547,769),10208=>array(57,-233,545,807),10214=>array(59,-132,565,760),10215=>array(37,-132,543,760),10216=>array(165,-132,524,759),10217=>array(78,-132,438,759),10731=>array(57,-233,545,807),10746=>array(32,45,569,582),10747=>array(32,45,569,582),10799=>array(58,72,543,556),10858=>array(43,229,559,624),10859=>array(43,0,559,624),11013=>array(41,190,561,494),11014=>array(149,82,453,602),11015=>array(149,82,453,602),11016=>array(68,109,485,526),11017=>array(117,109,534,526),11018=>array(117,109,534,526),11019=>array(68,109,485,526),11020=>array(41,190,561,494),11021=>array(149,82,453,602),11026=>array(3,-39,599,558),11027=>array(3,-39,599,558),11028=>array(3,-39,599,558),11029=>array(3,-39,599,558),11030=>array(3,-39,599,558),11031=>array(3,-39,599,558),11032=>array(3,-39,599,558),11033=>array(3,-39,599,558),11034=>array(3,-39,599,558),11364=>array(-3,-208,583,729),11373=>array(30,-14,632,742),11374=>array(-28,-208,632,729),11375=>array(158,0,728,729),11376=>array(-24,-14,579,742),11381=>array(-4,0,552,729),11382=>array(31,0,540,547),11383=>array(31,0,570,552),11385=>array(94,-13,614,759),11386=>array(48,-14,554,560),11388=>array(135,-149,467,421),11389=>array(271,326,616,734),11390=>array(2,-239,566,742),11391=>array(9,-240,654,729),11800=>array(42,-13,458,729),11807=>array(43,0,559,398),11810=>array(196,314,531,760),11811=>array(207,314,473,760),11812=>array(109,-132,375,314),11813=>array(52,-132,386,314),11822=>array(121,0,550,742),42760=>array(183,0,536,693),42761=>array(154,0,536,693),42762=>array(125,0,536,693),42763=>array(96,0,536,693),42764=>array(66,0,536,693),42765=>array(66,0,536,693),42766=>array(66,0,506,693),42767=>array(66,0,477,693),42768=>array(66,0,448,693),42769=>array(66,0,419,693),42770=>array(66,0,536,693),42771=>array(66,0,506,693),42772=>array(66,0,477,693),42773=>array(66,0,448,693),42774=>array(66,0,419,693),42779=>array(178,326,462,736),42780=>array(140,324,424,734),42781=>array(206,326,396,734),42782=>array(206,326,396,734),42783=>array(142,0,333,408),42786=>array(89,0,515,729),42787=>array(131,0,481,547),42788=>array(89,224,564,742),42789=>array(89,42,564,560),42790=>array(-4,-208,606,729),42791=>array(29,-207,547,760),42889=>array(149,0,412,519),42890=>array(167,141,436,405),42891=>array(228,235,437,729),42892=>array(211,458,389,729),42893=>array(73,0,624,760),42894=>array(54,-217,475,760),42896=>array(-17,-157,608,729),42897=>array(8,-140,544,560),42922=>array(17,1,705,730),63173=>array(20,-14,604,760),64257=>array(32,0,625,760),64258=>array(32,0,625,760),65533=>array(-56,-138,599,927),65535=>array(51,-177,551,705)); -$cw=array(0=>602,32=>602,33=>602,34=>602,35=>602,36=>602,37=>602,38=>602,39=>602,40=>602,41=>602,42=>602,43=>602,44=>602,45=>602,46=>602,47=>602,48=>602,49=>602,50=>602,51=>602,52=>602,53=>602,54=>602,55=>602,56=>602,57=>602,58=>602,59=>602,60=>602,61=>602,62=>602,63=>602,64=>602,65=>602,66=>602,67=>602,68=>602,69=>602,70=>602,71=>602,72=>602,73=>602,74=>602,75=>602,76=>602,77=>602,78=>602,79=>602,80=>602,81=>602,82=>602,83=>602,84=>602,85=>602,86=>602,87=>602,88=>602,89=>602,90=>602,91=>602,92=>602,93=>602,94=>602,95=>602,96=>602,97=>602,98=>602,99=>602,100=>602,101=>602,102=>602,103=>602,104=>602,105=>602,106=>602,107=>602,108=>602,109=>602,110=>602,111=>602,112=>602,113=>602,114=>602,115=>602,116=>602,117=>602,118=>602,119=>602,120=>602,121=>602,122=>602,123=>602,124=>602,125=>602,126=>602,160=>602,161=>602,162=>602,163=>602,164=>602,165=>602,166=>602,167=>602,168=>602,169=>602,170=>602,171=>602,172=>602,173=>602,174=>602,175=>602,176=>602,177=>602,178=>602,179=>602,180=>602,181=>602,182=>602,183=>602,184=>602,185=>602,186=>602,187=>602,188=>602,189=>602,190=>602,191=>602,192=>602,193=>602,194=>602,195=>602,196=>602,197=>602,198=>602,199=>602,200=>602,201=>602,202=>602,203=>602,204=>602,205=>602,206=>602,207=>602,208=>602,209=>602,210=>602,211=>602,212=>602,213=>602,214=>602,215=>602,216=>602,217=>602,218=>602,219=>602,220=>602,221=>602,222=>602,223=>602,224=>602,225=>602,226=>602,227=>602,228=>602,229=>602,230=>602,231=>602,232=>602,233=>602,234=>602,235=>602,236=>602,237=>602,238=>602,239=>602,240=>602,241=>602,242=>602,243=>602,244=>602,245=>602,246=>602,247=>602,248=>602,249=>602,250=>602,251=>602,252=>602,253=>602,254=>602,255=>602,256=>602,257=>602,258=>602,259=>602,260=>602,261=>602,262=>602,263=>602,264=>602,265=>602,266=>602,267=>602,268=>602,269=>602,270=>602,271=>602,272=>602,273=>602,274=>602,275=>602,276=>602,277=>602,278=>602,279=>602,280=>602,281=>602,282=>602,283=>602,284=>602,285=>602,286=>602,287=>602,288=>602,289=>602,290=>602,291=>602,292=>602,293=>602,294=>602,295=>602,296=>602,297=>602,298=>602,299=>602,300=>602,301=>602,302=>602,303=>602,304=>602,305=>602,306=>602,307=>602,308=>602,309=>602,310=>602,311=>602,312=>602,313=>602,314=>602,315=>602,316=>602,317=>602,318=>602,319=>602,320=>602,321=>602,322=>602,323=>602,324=>602,325=>602,326=>602,327=>602,328=>602,329=>602,330=>602,331=>602,332=>602,333=>602,334=>602,335=>602,336=>602,337=>602,338=>602,339=>602,340=>602,341=>602,342=>602,343=>602,344=>602,345=>602,346=>602,347=>602,348=>602,349=>602,350=>602,351=>602,352=>602,353=>602,354=>602,355=>602,356=>602,357=>602,358=>602,359=>602,360=>602,361=>602,362=>602,363=>602,364=>602,365=>602,366=>602,367=>602,368=>602,369=>602,370=>602,371=>602,372=>602,373=>602,374=>602,375=>602,376=>602,377=>602,378=>602,379=>602,380=>602,381=>602,382=>602,383=>602,384=>602,385=>602,386=>602,387=>602,388=>602,389=>602,390=>602,391=>602,392=>602,393=>602,394=>602,395=>602,396=>602,397=>602,398=>602,399=>602,400=>602,401=>602,402=>602,403=>602,404=>602,405=>602,406=>602,407=>602,408=>602,409=>602,410=>602,411=>602,412=>602,413=>602,414=>602,415=>602,416=>602,417=>602,418=>602,419=>602,420=>602,421=>602,422=>602,423=>602,424=>602,425=>602,426=>602,427=>602,428=>602,429=>602,430=>602,431=>602,432=>602,433=>602,434=>602,435=>602,436=>602,437=>602,438=>602,439=>602,440=>602,441=>602,442=>602,443=>602,444=>602,445=>602,446=>602,447=>602,448=>602,449=>602,450=>602,451=>602,461=>602,462=>602,463=>602,464=>602,465=>602,466=>602,467=>602,468=>602,469=>602,470=>602,471=>602,472=>602,473=>602,474=>602,475=>602,476=>602,477=>602,478=>602,479=>602,480=>602,481=>602,482=>602,483=>602,486=>602,487=>602,488=>602,489=>602,490=>602,491=>602,492=>602,493=>602,494=>602,495=>602,500=>602,501=>602,502=>602,504=>602,505=>602,508=>602,509=>602,510=>602,511=>602,512=>602,513=>602,514=>602,515=>602,516=>602,517=>602,518=>602,519=>602,520=>602,521=>602,522=>602,523=>602,524=>602,525=>602,526=>602,527=>602,528=>602,529=>602,530=>602,531=>602,532=>602,533=>602,534=>602,535=>602,536=>602,537=>602,538=>602,539=>602,540=>602,541=>602,542=>602,543=>602,545=>602,548=>602,549=>602,550=>602,551=>602,552=>602,553=>602,554=>602,555=>602,556=>602,557=>602,558=>602,559=>602,560=>602,561=>602,562=>602,563=>602,564=>602,565=>602,566=>602,567=>602,568=>602,569=>602,570=>602,571=>602,572=>602,573=>602,574=>602,575=>602,576=>602,577=>602,579=>602,580=>602,581=>602,588=>602,589=>602,592=>602,593=>602,594=>602,595=>602,596=>602,597=>602,598=>602,599=>602,600=>602,601=>602,602=>602,603=>602,604=>602,605=>602,606=>602,607=>602,608=>602,609=>602,610=>602,611=>602,612=>602,613=>602,614=>602,615=>602,616=>602,617=>602,618=>602,619=>602,620=>602,621=>602,622=>602,623=>602,624=>602,625=>602,626=>602,627=>602,628=>602,629=>602,630=>602,631=>602,632=>602,633=>602,634=>602,635=>602,636=>602,637=>602,638=>602,639=>602,640=>602,641=>602,642=>602,643=>602,644=>602,645=>602,646=>602,647=>602,648=>602,649=>602,650=>602,651=>602,652=>602,653=>602,654=>602,655=>602,656=>602,657=>602,658=>602,659=>602,660=>602,661=>602,662=>602,663=>602,664=>602,665=>602,666=>602,667=>602,668=>602,669=>602,670=>602,671=>602,672=>602,673=>602,674=>602,675=>602,676=>602,677=>602,678=>602,679=>602,680=>602,681=>602,682=>602,683=>602,684=>602,685=>602,686=>602,687=>602,688=>602,689=>602,690=>602,691=>602,692=>602,693=>602,694=>602,695=>602,696=>602,697=>602,699=>602,700=>602,701=>602,702=>602,703=>602,704=>602,705=>602,710=>602,711=>602,712=>602,713=>602,716=>602,717=>602,718=>602,719=>602,720=>602,721=>602,722=>602,723=>602,726=>602,727=>602,728=>602,729=>602,730=>602,731=>602,732=>602,733=>602,734=>602,736=>602,737=>602,738=>602,739=>602,740=>602,741=>602,742=>602,743=>602,744=>602,745=>602,750=>602,755=>602,768=>602,769=>602,770=>602,771=>602,772=>602,773=>602,774=>602,775=>602,776=>602,777=>602,778=>602,779=>602,780=>602,781=>602,782=>602,783=>602,784=>602,785=>602,786=>602,787=>602,788=>602,789=>602,790=>602,791=>602,792=>602,793=>602,794=>602,795=>602,796=>602,797=>602,798=>602,799=>602,800=>602,801=>602,802=>602,803=>602,804=>602,805=>602,806=>602,807=>602,808=>602,809=>602,810=>602,811=>602,812=>602,813=>602,814=>602,815=>602,816=>602,817=>602,818=>602,819=>602,820=>602,821=>602,822=>602,823=>602,824=>602,825=>602,826=>602,827=>602,828=>602,829=>602,830=>602,831=>602,835=>602,856=>602,865=>602,884=>602,885=>602,890=>602,894=>602,900=>602,901=>602,902=>602,903=>602,904=>602,905=>602,906=>602,908=>602,910=>602,911=>602,912=>602,913=>602,914=>602,915=>602,916=>602,917=>602,918=>602,919=>602,920=>602,921=>602,922=>602,923=>602,924=>602,925=>602,926=>602,927=>602,928=>602,929=>602,931=>602,932=>602,933=>602,934=>602,935=>602,936=>602,937=>602,938=>602,939=>602,940=>602,941=>602,942=>602,943=>602,944=>602,945=>602,946=>602,947=>602,948=>602,949=>602,950=>602,951=>602,952=>602,953=>602,954=>602,955=>602,956=>602,957=>602,958=>602,959=>602,960=>602,961=>602,962=>602,963=>602,964=>602,965=>602,966=>602,967=>602,968=>602,969=>602,970=>602,971=>602,972=>602,973=>602,974=>602,976=>602,977=>602,978=>602,979=>602,980=>602,981=>602,982=>602,983=>602,984=>602,985=>602,986=>602,987=>602,988=>602,989=>602,990=>602,991=>602,992=>602,993=>602,1008=>602,1009=>602,1010=>602,1011=>602,1012=>602,1013=>602,1014=>602,1015=>602,1016=>602,1017=>602,1018=>602,1019=>602,1020=>602,1021=>602,1022=>602,1023=>602,1024=>602,1025=>602,1026=>602,1027=>602,1028=>602,1029=>602,1030=>602,1031=>602,1032=>602,1033=>602,1034=>602,1035=>602,1036=>602,1037=>602,1038=>602,1039=>602,1040=>602,1041=>602,1042=>602,1043=>602,1044=>602,1045=>602,1046=>602,1047=>602,1048=>602,1049=>602,1050=>602,1051=>602,1052=>602,1053=>602,1054=>602,1055=>602,1056=>602,1057=>602,1058=>602,1059=>602,1060=>602,1061=>602,1062=>602,1063=>602,1064=>602,1065=>602,1066=>602,1067=>602,1068=>602,1069=>602,1070=>602,1071=>602,1072=>602,1073=>602,1074=>602,1075=>602,1076=>602,1077=>602,1078=>602,1079=>602,1080=>602,1081=>602,1082=>602,1083=>602,1084=>602,1085=>602,1086=>602,1087=>602,1088=>602,1089=>602,1090=>602,1091=>602,1092=>602,1093=>602,1094=>602,1095=>602,1096=>602,1097=>602,1098=>602,1099=>602,1100=>602,1101=>602,1102=>602,1103=>602,1104=>602,1105=>602,1106=>602,1107=>602,1108=>602,1109=>602,1110=>602,1111=>602,1112=>602,1113=>602,1114=>602,1115=>602,1116=>602,1117=>602,1118=>602,1119=>602,1122=>602,1123=>602,1138=>602,1139=>602,1168=>602,1169=>602,1170=>602,1171=>602,1172=>602,1173=>602,1174=>602,1175=>602,1176=>602,1177=>602,1178=>602,1179=>602,1186=>602,1187=>602,1188=>602,1189=>602,1194=>602,1195=>602,1196=>602,1197=>602,1198=>602,1199=>602,1200=>602,1201=>602,1202=>602,1203=>602,1210=>602,1211=>602,1216=>602,1217=>602,1218=>602,1219=>602,1220=>602,1223=>602,1224=>602,1227=>602,1228=>602,1231=>602,1232=>602,1233=>602,1234=>602,1235=>602,1236=>602,1237=>602,1238=>602,1239=>602,1240=>602,1241=>602,1242=>602,1243=>602,1244=>602,1245=>602,1246=>602,1247=>602,1248=>602,1249=>602,1250=>602,1251=>602,1252=>602,1253=>602,1254=>602,1255=>602,1256=>602,1257=>602,1258=>602,1259=>602,1260=>602,1261=>602,1262=>602,1263=>602,1264=>602,1265=>602,1266=>602,1267=>602,1268=>602,1269=>602,1270=>602,1271=>602,1272=>602,1273=>602,1296=>602,1297=>602,1306=>602,1307=>602,1308=>602,1309=>602,1329=>602,1330=>602,1331=>602,1332=>602,1333=>602,1334=>602,1335=>602,1336=>602,1337=>602,1338=>602,1339=>602,1340=>602,1341=>602,1342=>602,1343=>602,1344=>602,1345=>602,1346=>602,1347=>602,1348=>602,1349=>602,1350=>602,1351=>602,1352=>602,1353=>602,1354=>602,1355=>602,1356=>602,1357=>602,1358=>602,1359=>602,1360=>602,1361=>602,1362=>602,1363=>602,1364=>602,1365=>602,1366=>602,1369=>602,1370=>602,1371=>602,1372=>602,1373=>602,1374=>602,1375=>602,1377=>602,1378=>602,1379=>602,1380=>602,1381=>602,1382=>602,1383=>602,1384=>602,1385=>602,1386=>602,1387=>602,1388=>602,1389=>602,1390=>602,1391=>602,1392=>602,1393=>602,1394=>602,1395=>602,1396=>602,1397=>602,1398=>602,1399=>602,1400=>602,1401=>602,1402=>602,1403=>602,1404=>602,1405=>602,1406=>602,1407=>602,1408=>602,1409=>602,1410=>602,1411=>602,1412=>602,1413=>602,1414=>602,1415=>602,1417=>602,1418=>602,3713=>602,3714=>602,3716=>602,3719=>602,3720=>602,3722=>602,3725=>602,3732=>602,3733=>602,3734=>602,3735=>602,3737=>602,3738=>602,3739=>602,3740=>602,3741=>602,3742=>602,3743=>602,3745=>602,3746=>602,3747=>602,3749=>602,3751=>602,3754=>602,3755=>602,3757=>602,3758=>602,3759=>602,3760=>602,3761=>602,3762=>602,3763=>602,3764=>602,3765=>602,3766=>602,3767=>602,3768=>602,3769=>602,3771=>602,3772=>602,3784=>602,3785=>602,3786=>602,3787=>602,3788=>602,3789=>602,4304=>602,4305=>602,4306=>602,4307=>602,4308=>602,4309=>602,4310=>602,4311=>602,4312=>602,4313=>602,4314=>602,4315=>602,4316=>602,4317=>602,4318=>602,4319=>602,4320=>602,4321=>602,4322=>602,4323=>602,4324=>602,4325=>602,4326=>602,4327=>602,4328=>602,4329=>602,4330=>602,4331=>602,4332=>602,4333=>602,4334=>602,4335=>602,4336=>602,4337=>602,4338=>602,4339=>602,4340=>602,4341=>602,4342=>602,4343=>602,4344=>602,4345=>602,4346=>602,4347=>602,4348=>602,7426=>602,7432=>602,7433=>602,7444=>602,7446=>602,7447=>602,7453=>602,7454=>602,7455=>602,7468=>602,7469=>602,7470=>602,7472=>602,7473=>602,7474=>602,7475=>602,7476=>602,7477=>602,7478=>602,7479=>602,7480=>602,7481=>602,7482=>602,7483=>602,7484=>602,7486=>602,7487=>602,7488=>602,7489=>602,7490=>602,7491=>602,7492=>602,7493=>602,7494=>602,7495=>602,7496=>602,7497=>602,7498=>602,7499=>602,7500=>602,7501=>602,7502=>602,7503=>602,7504=>602,7505=>602,7506=>602,7507=>602,7508=>602,7509=>602,7510=>602,7511=>602,7512=>602,7513=>602,7514=>602,7515=>602,7522=>602,7523=>602,7524=>602,7525=>602,7543=>602,7544=>602,7547=>602,7557=>602,7579=>602,7580=>602,7581=>602,7582=>602,7583=>602,7584=>602,7585=>602,7586=>602,7587=>602,7588=>602,7589=>602,7590=>602,7591=>602,7592=>602,7593=>602,7594=>602,7595=>602,7596=>602,7597=>602,7598=>602,7599=>602,7600=>602,7601=>602,7602=>602,7603=>602,7604=>602,7605=>602,7606=>602,7607=>602,7609=>602,7610=>602,7611=>602,7612=>602,7613=>602,7614=>602,7615=>602,7680=>602,7681=>602,7682=>602,7683=>602,7684=>602,7685=>602,7686=>602,7687=>602,7688=>602,7689=>602,7690=>602,7691=>602,7692=>602,7693=>602,7694=>602,7695=>602,7696=>602,7697=>602,7698=>602,7699=>602,7704=>602,7705=>602,7706=>602,7707=>602,7708=>602,7709=>602,7710=>602,7711=>602,7712=>602,7713=>602,7714=>602,7715=>602,7716=>602,7717=>602,7718=>602,7719=>602,7720=>602,7721=>602,7722=>602,7723=>602,7724=>602,7725=>602,7728=>602,7729=>602,7730=>602,7731=>602,7732=>602,7733=>602,7734=>602,7735=>602,7736=>602,7737=>602,7738=>602,7739=>602,7740=>602,7741=>602,7742=>602,7743=>602,7744=>602,7745=>602,7746=>602,7747=>602,7748=>602,7749=>602,7750=>602,7751=>602,7752=>602,7753=>602,7754=>602,7755=>602,7756=>602,7757=>602,7764=>602,7765=>602,7766=>602,7767=>602,7768=>602,7769=>602,7770=>602,7771=>602,7772=>602,7773=>602,7774=>602,7775=>602,7776=>602,7777=>602,7778=>602,7779=>602,7784=>602,7785=>602,7786=>602,7787=>602,7788=>602,7789=>602,7790=>602,7791=>602,7792=>602,7793=>602,7794=>602,7795=>602,7796=>602,7797=>602,7798=>602,7799=>602,7800=>602,7801=>602,7804=>602,7805=>602,7806=>602,7807=>602,7808=>602,7809=>602,7810=>602,7811=>602,7812=>602,7813=>602,7814=>602,7815=>602,7816=>602,7817=>602,7818=>602,7819=>602,7820=>602,7821=>602,7822=>602,7823=>602,7824=>602,7825=>602,7826=>602,7827=>602,7828=>602,7829=>602,7830=>602,7831=>602,7832=>602,7833=>602,7835=>602,7839=>602,7840=>602,7841=>602,7852=>602,7853=>602,7856=>602,7857=>602,7862=>602,7863=>602,7864=>602,7865=>602,7868=>602,7869=>602,7878=>602,7879=>602,7882=>602,7883=>602,7884=>602,7885=>602,7896=>602,7897=>602,7898=>602,7899=>602,7900=>602,7901=>602,7904=>602,7905=>602,7906=>602,7907=>602,7908=>602,7909=>602,7912=>602,7913=>602,7914=>602,7915=>602,7918=>602,7919=>602,7920=>602,7921=>602,7922=>602,7923=>602,7924=>602,7925=>602,7928=>602,7929=>602,7936=>602,7937=>602,7938=>602,7939=>602,7940=>602,7941=>602,7942=>602,7943=>602,7944=>602,7945=>602,7946=>602,7947=>602,7948=>602,7949=>602,7950=>602,7951=>602,7952=>602,7953=>602,7954=>602,7955=>602,7956=>602,7957=>602,7960=>602,7961=>602,7962=>602,7963=>602,7964=>602,7965=>602,7968=>602,7969=>602,7970=>602,7971=>602,7972=>602,7973=>602,7974=>602,7975=>602,7976=>602,7977=>602,7978=>602,7979=>602,7980=>602,7981=>602,7982=>602,7983=>602,7984=>602,7985=>602,7986=>602,7987=>602,7988=>602,7989=>602,7990=>602,7991=>602,7992=>602,7993=>602,7994=>602,7995=>602,7996=>602,7997=>602,7998=>602,7999=>602,8000=>602,8001=>602,8002=>602,8003=>602,8004=>602,8005=>602,8008=>602,8009=>602,8010=>602,8011=>602,8012=>602,8013=>602,8016=>602,8017=>602,8018=>602,8019=>602,8020=>602,8021=>602,8022=>602,8023=>602,8025=>602,8027=>602,8029=>602,8031=>602,8032=>602,8033=>602,8034=>602,8035=>602,8036=>602,8037=>602,8038=>602,8039=>602,8040=>602,8041=>602,8042=>602,8043=>602,8044=>602,8045=>602,8046=>602,8047=>602,8048=>602,8049=>602,8050=>602,8051=>602,8052=>602,8053=>602,8054=>602,8055=>602,8056=>602,8057=>602,8058=>602,8059=>602,8060=>602,8061=>602,8064=>602,8065=>602,8066=>602,8067=>602,8068=>602,8069=>602,8070=>602,8071=>602,8072=>602,8073=>602,8074=>602,8075=>602,8076=>602,8077=>602,8078=>602,8079=>602,8080=>602,8081=>602,8082=>602,8083=>602,8084=>602,8085=>602,8086=>602,8087=>602,8088=>602,8089=>602,8090=>602,8091=>602,8092=>602,8093=>602,8094=>602,8095=>602,8096=>602,8097=>602,8098=>602,8099=>602,8100=>602,8101=>602,8102=>602,8103=>602,8104=>602,8105=>602,8106=>602,8107=>602,8108=>602,8109=>602,8110=>602,8111=>602,8112=>602,8113=>602,8114=>602,8115=>602,8116=>602,8118=>602,8119=>602,8120=>602,8121=>602,8122=>602,8123=>602,8124=>602,8125=>602,8126=>602,8127=>602,8128=>602,8129=>602,8130=>602,8131=>602,8132=>602,8134=>602,8135=>602,8136=>602,8137=>602,8138=>602,8139=>602,8140=>602,8141=>602,8142=>602,8143=>602,8144=>602,8145=>602,8146=>602,8147=>602,8150=>602,8151=>602,8152=>602,8153=>602,8154=>602,8155=>602,8157=>602,8158=>602,8159=>602,8160=>602,8161=>602,8162=>602,8163=>602,8164=>602,8165=>602,8166=>602,8167=>602,8168=>602,8169=>602,8170=>602,8171=>602,8172=>602,8173=>602,8174=>602,8175=>602,8178=>602,8179=>602,8180=>602,8182=>602,8183=>602,8184=>602,8185=>602,8186=>602,8187=>602,8188=>602,8189=>602,8190=>602,8192=>602,8193=>602,8194=>602,8195=>602,8196=>602,8197=>602,8198=>602,8199=>602,8200=>602,8201=>602,8202=>602,8208=>602,8209=>602,8210=>602,8211=>602,8212=>602,8213=>602,8214=>602,8215=>602,8216=>602,8217=>602,8218=>602,8219=>602,8220=>602,8221=>602,8222=>602,8223=>602,8224=>602,8225=>602,8226=>602,8227=>602,8230=>602,8239=>602,8240=>602,8241=>602,8242=>602,8243=>602,8244=>602,8245=>602,8246=>602,8247=>602,8249=>602,8250=>602,8252=>602,8253=>602,8254=>602,8261=>602,8262=>602,8263=>602,8264=>602,8265=>602,8267=>602,8287=>602,8304=>602,8305=>602,8308=>602,8309=>602,8310=>602,8311=>602,8312=>602,8313=>602,8314=>602,8315=>602,8316=>602,8317=>602,8318=>602,8319=>602,8320=>602,8321=>602,8322=>602,8323=>602,8324=>602,8325=>602,8326=>602,8327=>602,8328=>602,8329=>602,8330=>602,8331=>602,8332=>602,8333=>602,8334=>602,8336=>602,8337=>602,8338=>602,8339=>602,8340=>602,8341=>602,8342=>602,8343=>602,8344=>602,8345=>602,8346=>602,8347=>602,8348=>602,8352=>602,8353=>602,8354=>602,8355=>602,8356=>602,8357=>602,8358=>602,8359=>602,8360=>602,8361=>602,8362=>602,8363=>602,8364=>602,8365=>602,8366=>602,8367=>602,8368=>602,8369=>602,8370=>602,8371=>602,8372=>602,8373=>602,8376=>602,8377=>602,8450=>602,8453=>602,8461=>602,8462=>602,8463=>602,8469=>602,8470=>602,8471=>602,8473=>602,8474=>602,8477=>602,8482=>602,8484=>602,8486=>602,8490=>602,8491=>602,8494=>602,8520=>602,8531=>602,8532=>602,8533=>602,8534=>602,8535=>602,8536=>602,8537=>602,8538=>602,8539=>602,8540=>602,8541=>602,8542=>602,8543=>602,8592=>602,8593=>602,8594=>602,8595=>602,8596=>602,8597=>602,8598=>602,8599=>602,8600=>602,8601=>602,8602=>602,8603=>602,8604=>602,8605=>602,8606=>602,8607=>602,8608=>602,8609=>602,8610=>602,8611=>602,8612=>602,8613=>602,8614=>602,8615=>602,8616=>602,8617=>602,8618=>602,8619=>602,8620=>602,8621=>602,8622=>602,8623=>602,8624=>602,8625=>602,8626=>602,8627=>602,8628=>602,8629=>602,8630=>602,8631=>602,8632=>602,8633=>602,8634=>602,8635=>602,8636=>602,8637=>602,8638=>602,8639=>602,8640=>602,8641=>602,8642=>602,8643=>602,8644=>602,8645=>602,8646=>602,8647=>602,8648=>602,8649=>602,8650=>602,8651=>602,8652=>602,8653=>602,8654=>602,8655=>602,8656=>602,8657=>602,8658=>602,8659=>602,8660=>602,8661=>602,8662=>602,8663=>602,8664=>602,8665=>602,8666=>602,8667=>602,8668=>602,8669=>602,8670=>602,8671=>602,8672=>602,8673=>602,8674=>602,8675=>602,8676=>602,8677=>602,8678=>602,8679=>602,8680=>602,8681=>602,8682=>602,8683=>602,8684=>602,8685=>602,8686=>602,8687=>602,8688=>602,8689=>602,8690=>602,8691=>602,8692=>602,8693=>602,8694=>602,8695=>602,8696=>602,8697=>602,8698=>602,8699=>602,8700=>602,8701=>602,8702=>602,8703=>602,8704=>602,8705=>602,8706=>602,8707=>602,8708=>602,8709=>602,8710=>602,8711=>602,8712=>602,8713=>602,8714=>602,8715=>602,8716=>602,8717=>602,8719=>602,8721=>602,8722=>602,8723=>602,8725=>602,8727=>602,8728=>602,8729=>602,8730=>602,8731=>602,8732=>602,8733=>602,8734=>602,8735=>602,8736=>602,8743=>602,8744=>602,8745=>602,8746=>602,8747=>602,8748=>602,8749=>602,8756=>602,8757=>602,8758=>602,8759=>602,8760=>602,8761=>602,8762=>602,8763=>602,8764=>602,8765=>602,8769=>602,8770=>602,8771=>602,8772=>602,8773=>602,8774=>602,8775=>602,8776=>602,8777=>602,8778=>602,8779=>602,8780=>602,8781=>602,8782=>602,8783=>602,8784=>602,8785=>602,8786=>602,8787=>602,8788=>602,8789=>602,8790=>602,8791=>602,8792=>602,8793=>602,8794=>602,8795=>602,8796=>602,8797=>602,8798=>602,8799=>602,8800=>602,8801=>602,8802=>602,8803=>602,8804=>602,8805=>602,8806=>602,8807=>602,8808=>602,8809=>602,8813=>602,8814=>602,8815=>602,8816=>602,8817=>602,8818=>602,8819=>602,8820=>602,8821=>602,8822=>602,8823=>602,8824=>602,8825=>602,8826=>602,8827=>602,8828=>602,8829=>602,8830=>602,8831=>602,8832=>602,8833=>602,8834=>602,8835=>602,8836=>602,8837=>602,8838=>602,8839=>602,8840=>602,8841=>602,8842=>602,8843=>602,8847=>602,8848=>602,8849=>602,8850=>602,8853=>602,8854=>602,8855=>602,8856=>602,8857=>602,8858=>602,8859=>602,8860=>602,8861=>602,8862=>602,8863=>602,8864=>602,8865=>602,8866=>602,8867=>602,8868=>602,8869=>602,8901=>602,8902=>602,8909=>602,8922=>602,8923=>602,8924=>602,8925=>602,8926=>602,8927=>602,8928=>602,8929=>602,8930=>602,8931=>602,8932=>602,8933=>602,8934=>602,8935=>602,8936=>602,8937=>602,8943=>602,8960=>602,8961=>602,8962=>602,8963=>602,8964=>602,8965=>602,8966=>602,8968=>602,8969=>602,8970=>602,8971=>602,8972=>602,8973=>602,8974=>602,8975=>602,8976=>602,8977=>602,8978=>602,8979=>602,8980=>602,8981=>602,8984=>602,8985=>602,8988=>602,8989=>602,8990=>602,8991=>602,8992=>602,8993=>602,8997=>602,8998=>602,8999=>602,9000=>602,9003=>602,9013=>602,9015=>602,9016=>602,9017=>602,9018=>602,9019=>602,9020=>602,9021=>602,9022=>602,9025=>602,9026=>602,9027=>602,9028=>602,9031=>602,9032=>602,9033=>602,9035=>602,9036=>602,9037=>602,9040=>602,9042=>602,9043=>602,9044=>602,9047=>602,9048=>602,9049=>602,9050=>602,9051=>602,9052=>602,9054=>602,9055=>602,9056=>602,9059=>602,9060=>602,9061=>602,9064=>602,9065=>602,9067=>602,9068=>602,9069=>602,9070=>602,9071=>602,9072=>602,9075=>602,9076=>602,9077=>602,9078=>602,9079=>602,9080=>602,9081=>602,9082=>602,9085=>602,9088=>602,9089=>602,9090=>602,9091=>602,9096=>602,9097=>602,9098=>602,9099=>602,9109=>602,9115=>602,9116=>602,9117=>602,9118=>602,9119=>602,9120=>602,9121=>602,9122=>602,9123=>602,9124=>602,9125=>602,9126=>602,9127=>602,9128=>602,9129=>602,9130=>602,9131=>602,9132=>602,9133=>602,9134=>602,9166=>602,9167=>602,9251=>602,9600=>602,9601=>602,9602=>602,9603=>602,9604=>602,9605=>602,9606=>602,9607=>602,9608=>602,9609=>602,9610=>602,9611=>602,9612=>602,9613=>602,9614=>602,9615=>602,9616=>602,9617=>602,9618=>602,9619=>602,9620=>602,9621=>602,9622=>602,9623=>602,9624=>602,9625=>602,9626=>602,9627=>602,9628=>602,9629=>602,9630=>602,9631=>602,9632=>602,9633=>602,9634=>602,9635=>602,9636=>602,9637=>602,9638=>602,9639=>602,9640=>602,9641=>602,9642=>602,9643=>602,9644=>602,9645=>602,9646=>602,9647=>602,9648=>602,9649=>602,9650=>602,9651=>602,9652=>602,9653=>602,9654=>602,9655=>602,9656=>602,9657=>602,9658=>602,9659=>602,9660=>602,9661=>602,9662=>602,9663=>602,9664=>602,9665=>602,9666=>602,9667=>602,9668=>602,9669=>602,9670=>602,9671=>602,9672=>602,9673=>602,9674=>602,9675=>602,9676=>602,9677=>602,9678=>602,9679=>602,9680=>602,9681=>602,9682=>602,9683=>602,9684=>602,9685=>602,9686=>602,9687=>602,9688=>602,9689=>602,9690=>602,9691=>602,9692=>602,9693=>602,9694=>602,9695=>602,9696=>602,9697=>602,9698=>602,9699=>602,9700=>602,9701=>602,9702=>602,9703=>602,9704=>602,9705=>602,9706=>602,9707=>602,9708=>602,9709=>602,9710=>602,9711=>602,9712=>602,9713=>602,9714=>602,9715=>602,9716=>602,9717=>602,9718=>602,9719=>602,9720=>602,9721=>602,9722=>602,9723=>602,9724=>602,9725=>602,9726=>602,9727=>602,9728=>602,9784=>602,9785=>602,9786=>602,9787=>602,9788=>602,9791=>602,9792=>602,9793=>602,9794=>602,9795=>602,9796=>602,9797=>602,9798=>602,9799=>602,9824=>602,9825=>602,9826=>602,9827=>602,9828=>602,9829=>602,9830=>602,9831=>602,9833=>602,9834=>602,9835=>602,9836=>602,9837=>602,9838=>602,9839=>602,10178=>602,10181=>602,10182=>602,10208=>602,10214=>602,10215=>602,10216=>602,10217=>602,10731=>602,10746=>602,10747=>602,10799=>602,10858=>602,10859=>602,11013=>602,11014=>602,11015=>602,11016=>602,11017=>602,11018=>602,11019=>602,11020=>602,11021=>602,11026=>602,11027=>602,11028=>602,11029=>602,11030=>602,11031=>602,11032=>602,11033=>602,11034=>602,11364=>602,11373=>602,11374=>602,11375=>602,11376=>602,11381=>602,11382=>602,11383=>602,11385=>602,11386=>602,11388=>602,11389=>602,11390=>602,11391=>602,11800=>602,11807=>602,11810=>602,11811=>602,11812=>602,11813=>602,11822=>602,42760=>602,42761=>602,42762=>602,42763=>602,42764=>602,42765=>602,42766=>602,42767=>602,42768=>602,42769=>602,42770=>602,42771=>602,42772=>602,42773=>602,42774=>602,42779=>602,42780=>602,42781=>602,42782=>602,42783=>602,42786=>602,42787=>602,42788=>602,42789=>602,42790=>602,42791=>602,42889=>602,42890=>602,42891=>602,42892=>602,42893=>602,42894=>602,42896=>602,42897=>602,42922=>602,63173=>602,64257=>602,64258=>602,65529=>602,65530=>602,65531=>602,65532=>602,65533=>602,65535=>602); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonobi.z b/lib/combodo/tcpdf/fonts/dejavusansmonobi.z deleted file mode 100644 index a866f7982..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmonobi.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonoi.ctg.z b/lib/combodo/tcpdf/fonts/dejavusansmonoi.ctg.z deleted file mode 100644 index 0fa53ab2e..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmonoi.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonoi.php b/lib/combodo/tcpdf/fonts/dejavusansmonoi.php deleted file mode 100644 index 753fa9a52..000000000 --- a/lib/combodo/tcpdf/fonts/dejavusansmonoi.php +++ /dev/null @@ -1,16 +0,0 @@ -97,'FontBBox'=>'[-403 -375 746 1028]','ItalicAngle'=>-11,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>34,'StemH'=>15,'AvgWidth'=>602,'MaxWidth'=>602,'MissingWidth'=>602); -$cbbox=array(0=>array(51,-177,551,705),33=>array(181,0,422,729),34=>array(165,458,437,729),35=>array(-3,0,602,718),36=>array(15,-147,529,760),37=>array(16,0,586,699),38=>array(-10,-14,581,742),39=>array(258,458,343,729),40=>array(182,-132,509,759),41=>array(73,-132,400,759),42=>array(81,286,521,742),43=>array(43,55,559,572),44=>array(99,-140,326,148),45=>array(148,234,419,314),46=>array(173,0,325,148),47=>array(8,-93,517,729),48=>array(48,-14,554,742),49=>array(60,0,478,729),50=>array(3,0,550,742),51=>array(-9,-14,538,742),52=>array(12,0,531,729),53=>array(2,-14,541,729),54=>array(45,-14,551,742),55=>array(85,0,592,729),56=>array(20,-14,550,742),57=>array(31,-14,537,742),58=>array(168,0,392,518),59=>array(99,-140,392,519),60=>array(43,69,559,558),61=>array(43,172,559,454),62=>array(43,69,559,558),63=>array(159,0,547,742),64=>array(-14,-155,593,682),65=>array(-52,0,513,729),66=>array(11,0,570,729),67=>array(56,-14,592,742),68=>array(-4,0,552,729),69=>array(26,0,600,729),70=>array(45,0,616,729),71=>array(38,-14,574,742),72=>array(-4,0,606,729),73=>array(28,0,574,729),74=>array(-12,-14,538,729),75=>array(-4,0,661,729),76=>array(38,0,505,729),77=>array(-29,0,631,729),78=>array(-3,0,605,729),79=>array(40,-14,562,742),80=>array(25,0,588,729),81=>array(40,-132,562,742),82=>array(6,0,562,729),83=>array(12,-14,560,742),84=>array(78,0,651,729),85=>array(39,-14,601,729),86=>array(97,0,646,729),87=>array(40,0,672,729),88=>array(-62,0,653,729),89=>array(95,0,658,729),90=>array(-3,0,622,729),91=>array(129,-132,510,760),92=>array(174,-93,354,729),93=>array(72,-132,453,760),94=>array(35,457,567,729),95=>array(0,-236,602,-197),96=>array(221,616,414,800),97=>array(35,-14,531,560),98=>array(29,-14,541,760),99=>array(76,-14,555,560),100=>array(58,-14,612,760),101=>array(48,-14,550,561),102=>array(129,0,608,760),103=>array(29,-215,559,560),104=>array(41,0,535,760),105=>array(30,0,490,760),106=>array(2,-208,482,760),107=>array(44,0,588,760),108=>array(152,0,477,765),109=>array(-7,0,575,560),110=>array(41,0,535,560),111=>array(57,-14,544,560),112=>array(-1,-208,551,560),113=>array(48,-208,560,560),114=>array(106,0,595,560),115=>array(56,-14,526,560),116=>array(95,0,549,702),117=>array(61,-13,553,547),118=>array(89,0,593,547),119=>array(45,0,642,547),120=>array(-34,0,590,547),121=>array(-19,-208,598,547),122=>array(38,0,553,547),123=>array(90,-163,574,760),124=>array(259,-236,343,764),125=>array(-7,-163,477,760),126=>array(43,240,559,381),161=>array(190,0,431,729),162=>array(60,-153,531,699),163=>array(-4,0,600,742),164=>array(100,95,537,532),165=>array(23,0,621,729),166=>array(259,-171,343,699),167=>array(49,-98,522,738),168=>array(213,659,522,758),169=>array(0,61,602,663),170=>array(109,229,506,742),171=>array(36,69,540,517),172=>array(43,181,559,421),173=>array(148,234,419,314),174=>array(0,61,602,663),175=>array(215,673,521,745),176=>array(146,432,456,742),177=>array(43,0,559,572),178=>array(150,326,484,742),179=>array(140,319,480,742),180=>array(281,616,550,800),181=>array(-19,-208,566,547),182=>array(61,-96,557,729),183=>array(222,273,374,422),184=>array(89,-193,306,0),185=>array(170,326,450,734),186=>array(109,229,520,742),187=>array(40,69,544,517),188=>array(23,-132,553,810),189=>array(23,-132,559,810),190=>array(23,-132,553,818),191=>array(70,-13,458,729),192=>array(-52,0,513,927),193=>array(-52,0,534,927),194=>array(-52,0,525,928),195=>array(-52,0,565,921),196=>array(-52,0,537,913),197=>array(-52,0,513,928),198=>array(-71,0,638,729),199=>array(56,-193,592,742),200=>array(26,0,600,927),201=>array(26,0,600,927),202=>array(26,0,600,928),203=>array(26,0,600,913),204=>array(28,0,574,927),205=>array(28,0,574,927),206=>array(28,0,574,928),207=>array(28,0,574,913),208=>array(-4,0,552,729),209=>array(-3,0,605,921),210=>array(40,-14,562,927),211=>array(40,-14,562,927),212=>array(40,-14,562,928),213=>array(40,-14,562,921),214=>array(40,-14,562,913),215=>array(73,85,529,541),216=>array(7,-34,586,761),217=>array(39,-14,601,927),218=>array(39,-14,601,927),219=>array(39,-14,601,928),220=>array(39,-14,601,913),221=>array(95,0,658,927),222=>array(25,0,566,729),223=>array(27,-14,550,760),224=>array(35,-14,531,800),225=>array(35,-14,552,800),226=>array(35,-14,531,800),227=>array(35,-14,544,777),228=>array(35,-14,531,758),229=>array(35,-14,531,913),230=>array(-23,-14,593,560),231=>array(76,-193,555,560),232=>array(48,-14,550,800),233=>array(48,-14,550,800),234=>array(48,-14,550,800),235=>array(48,-14,550,758),236=>array(30,0,490,800),237=>array(30,0,536,800),238=>array(30,0,490,800),239=>array(30,0,508,758),240=>array(58,-14,552,760),241=>array(41,0,542,777),242=>array(57,-14,544,800),243=>array(57,-14,550,800),244=>array(57,-14,544,800),245=>array(57,-14,544,777),246=>array(57,-14,544,758),247=>array(43,73,559,554),248=>array(23,-47,573,592),249=>array(61,-13,553,800),250=>array(61,-13,553,800),251=>array(61,-13,553,800),252=>array(61,-13,553,758),253=>array(-19,-208,598,800),254=>array(-1,-208,551,765),255=>array(-19,-208,598,758),256=>array(-52,0,551,898),257=>array(35,-14,531,745),258=>array(-52,0,564,928),259=>array(35,-14,536,785),260=>array(-52,-193,522,729),261=>array(35,-193,531,560),262=>array(56,-14,594,927),263=>array(76,-14,594,800),264=>array(56,-14,605,928),265=>array(76,-14,555,800),266=>array(56,-14,592,914),267=>array(76,-14,555,758),268=>array(56,-14,611,928),269=>array(76,-14,582,800),270=>array(-4,0,552,928),271=>array(58,-14,738,760),272=>array(-4,0,552,729),273=>array(58,-14,691,760),274=>array(26,0,600,898),275=>array(48,-14,550,745),276=>array(26,0,600,928),277=>array(48,-14,550,785),278=>array(26,0,600,914),279=>array(48,-14,550,758),280=>array(26,-193,600,729),281=>array(48,-193,550,561),282=>array(26,0,600,928),283=>array(48,-14,565,800),284=>array(38,-14,574,928),285=>array(29,-215,559,800),286=>array(38,-14,589,928),287=>array(29,-215,559,785),288=>array(38,-14,574,914),289=>array(29,-215,559,758),290=>array(38,-280,574,742),291=>array(29,-215,559,788),292=>array(-4,0,606,928),293=>array(41,0,535,928),294=>array(-4,0,650,729),295=>array(21,0,514,760),296=>array(28,0,574,921),297=>array(30,0,528,777),298=>array(28,0,574,898),299=>array(30,0,521,745),300=>array(28,0,574,928),301=>array(30,0,536,785),302=>array(45,-193,592,729),303=>array(32,-193,493,760),304=>array(28,0,574,914),305=>array(30,0,490,547),306=>array(1,-14,705,729),307=>array(2,-209,737,760),308=>array(-12,-14,566,928),309=>array(2,-208,488,800),310=>array(-4,-266,661,729),311=>array(44,-266,588,760),312=>array(62,0,606,547),313=>array(38,0,536,928),314=>array(152,0,536,928),315=>array(38,-266,505,729),316=>array(152,-266,477,765),317=>array(38,0,540,729),318=>array(152,0,604,766),319=>array(38,0,548,729),320=>array(152,0,653,765),321=>array(-14,0,507,728),322=>array(43,0,544,765),323=>array(-3,0,605,931),324=>array(41,0,546,803),325=>array(-3,-266,605,729),326=>array(41,-266,535,560),327=>array(-3,0,605,928),328=>array(41,0,562,800),329=>array(-17,0,595,760),330=>array(20,-208,573,743),331=>array(61,-208,554,560),332=>array(40,-14,562,898),333=>array(57,-14,544,745),334=>array(40,-14,564,928),335=>array(57,-14,544,785),336=>array(40,-14,621,927),337=>array(57,-14,598,800),338=>array(17,0,660,729),339=>array(-3,-14,621,560),340=>array(6,0,562,928),341=>array(106,0,651,803),342=>array(6,-266,562,729),343=>array(25,-266,595,560),344=>array(6,0,562,928),345=>array(106,0,595,800),346=>array(12,-14,560,931),347=>array(56,-14,546,803),348=>array(12,-14,560,928),349=>array(56,-14,536,813),350=>array(12,-193,560,742),351=>array(56,-193,526,560),352=>array(12,-14,560,928),353=>array(56,-14,538,800),354=>array(78,-193,651,729),355=>array(95,-193,549,702),356=>array(78,0,651,928),357=>array(95,0,626,820),358=>array(78,0,650,729),359=>array(87,0,542,702),360=>array(39,-14,601,921),361=>array(61,-13,553,777),362=>array(39,-14,601,898),363=>array(61,-13,553,745),364=>array(39,-14,601,928),365=>array(61,-13,553,785),366=>array(39,-14,601,1028),367=>array(61,-13,553,847),368=>array(39,-14,621,927),369=>array(61,-13,598,800),370=>array(39,-201,601,729),371=>array(61,-194,553,547),372=>array(40,0,672,932),373=>array(45,0,642,803),374=>array(95,0,658,932),375=>array(-19,-208,598,803),376=>array(95,0,658,913),377=>array(-3,0,622,931),378=>array(38,0,553,803),379=>array(-3,0,622,914),380=>array(38,0,553,758),381=>array(-3,0,622,928),382=>array(38,0,553,800),383=>array(129,0,608,760),384=>array(29,-14,541,760),385=>array(41,0,598,729),386=>array(10,0,593,729),387=>array(21,-14,537,760),388=>array(33,0,547,729),389=>array(51,-14,554,760),390=>array(2,-14,524,742),391=>array(23,-14,652,800),392=>array(33,-14,625,694),393=>array(-4,0,552,729),394=>array(35,0,598,729),395=>array(49,0,626,729),396=>array(32,0,609,729),397=>array(58,-14,601,760),398=>array(25,0,609,729),399=>array(57,-14,545,742),400=>array(35,-14,573,742),401=>array(-61,-208,663,729),402=>array(35,-208,613,760),403=>array(19,-14,656,800),404=>array(35,-210,673,661),405=>array(-42,0,579,760),406=>array(153,0,574,729),407=>array(27,0,574,729),408=>array(-17,0,640,729),409=>array(41,0,586,760),410=>array(93,0,446,765),411=>array(-22,0,549,729),412=>array(18,-13,626,729),413=>array(-77,-208,604,729),414=>array(61,-210,545,560),415=>array(57,-14,545,742),416=>array(-20,-14,634,760),417=>array(5,-14,595,560),418=>array(21,-14,651,742),419=>array(61,-210,650,560),420=>array(59,0,609,729),421=>array(4,-208,546,699),422=>array(11,-129,544,729),423=>array(36,-14,568,742),424=>array(82,-14,525,560),425=>array(-13,0,625,729),426=>array(131,-208,530,760),427=>array(108,-208,563,702),428=>array(54,0,650,729),429=>array(83,0,552,760),430=>array(78,-208,651,729),431=>array(-29,-14,652,760),432=>array(-15,-13,592,555),433=>array(38,0,635,713),434=>array(43,0,520,729),435=>array(79,0,658,730),436=>array(-13,-208,669,547),437=>array(5,0,631,729),438=>array(43,0,559,548),439=>array(-16,-14,602,729),440=>array(-16,-14,619,729),441=>array(1,-213,679,547),442=>array(-9,-208,533,547),443=>array(2,0,544,742),444=>array(-16,-14,628,729),445=>array(-6,-213,567,547),446=>array(32,-14,482,702),447=>array(-15,-208,593,560),448=>array(181,0,421,729),449=>array(82,0,520,729),450=>array(58,0,555,729),451=>array(181,0,422,729),461=>array(-52,0,554,928),462=>array(35,-14,553,800),463=>array(28,0,574,928),464=>array(30,0,538,800),465=>array(40,-14,571,928),466=>array(57,-14,563,800),467=>array(39,-14,601,928),468=>array(61,-13,553,800),469=>array(39,-14,601,953),470=>array(61,-13,553,899),471=>array(39,-14,601,997),472=>array(61,-13,585,954),473=>array(39,-14,601,998),474=>array(61,-13,579,954),475=>array(39,-14,601,997),476=>array(61,-13,553,954),477=>array(55,-14,542,560),479=>array(35,-14,559,899),480=>array(-52,0,556,953),481=>array(35,-14,559,899),482=>array(-71,0,638,898),483=>array(-23,-14,593,745),486=>array(38,-14,574,928),487=>array(29,-215,559,800),488=>array(-4,0,661,928),489=>array(44,0,588,928),490=>array(40,-201,562,742),491=>array(57,-201,544,560),492=>array(40,-201,562,898),493=>array(57,-201,544,745),494=>array(-16,-14,602,928),495=>array(-6,-213,572,800),500=>array(38,-14,574,927),501=>array(29,-215,559,800),502=>array(-40,-14,586,729),504=>array(-3,0,605,927),505=>array(41,0,535,800),508=>array(-71,0,654,927),509=>array(-23,-14,593,800),510=>array(7,-34,586,927),511=>array(23,-47,573,800),512=>array(-52,0,519,927),513=>array(35,-14,531,800),514=>array(-52,0,542,928),515=>array(35,-14,531,785),516=>array(26,0,600,927),517=>array(48,-14,550,800),518=>array(26,0,600,928),519=>array(48,-14,550,785),520=>array(28,0,574,927),521=>array(30,0,495,800),522=>array(28,0,574,928),523=>array(30,0,511,785),524=>array(40,-14,562,927),525=>array(57,-14,544,800),526=>array(40,-14,562,928),527=>array(57,-14,544,785),528=>array(6,0,562,927),529=>array(106,0,595,800),530=>array(6,0,562,928),531=>array(106,0,595,785),532=>array(39,-14,601,927),533=>array(61,-13,553,800),534=>array(39,-14,601,928),535=>array(61,-13,553,785),536=>array(12,-265,560,742),537=>array(56,-265,526,560),538=>array(78,-265,651,729),539=>array(95,-265,549,702),540=>array(17,-210,646,742),541=>array(40,-211,591,560),542=>array(-4,0,606,928),543=>array(41,0,535,928),545=>array(-5,-72,538,760),548=>array(25,-208,651,729),549=>array(66,-208,582,548),550=>array(-52,0,513,914),551=>array(35,-14,531,758),552=>array(26,-193,600,729),553=>array(48,-193,550,561),554=>array(40,-14,562,953),555=>array(57,-14,544,899),556=>array(40,-14,562,953),557=>array(57,-14,544,899),558=>array(40,-14,562,914),559=>array(57,-14,544,758),560=>array(40,-14,562,953),561=>array(57,-14,544,899),562=>array(95,0,658,898),563=>array(-19,-208,598,745),564=>array(146,-72,465,765),565=>array(4,-72,531,560),566=>array(95,-72,549,702),567=>array(2,-208,441,547),568=>array(32,-14,531,760),569=>array(71,-214,570,560),570=>array(-67,-34,656,761),571=>array(-67,-34,656,761),572=>array(-32,-47,628,592),573=>array(-6,0,537,729),574=>array(-55,-34,668,761),575=>array(77,-242,547,560),576=>array(69,-242,585,548),577=>array(59,0,604,729),579=>array(-32,0,570,729),580=>array(-4,-14,601,729),581=>array(-44,0,505,729),588=>array(-0,0,562,729),589=>array(58,0,595,560),592=>array(54,-14,549,560),593=>array(77,-14,579,560),594=>array(23,-14,525,560),595=>array(4,-14,507,760),596=>array(42,-14,513,560),597=>array(90,-72,572,558),598=>array(67,-208,556,760),599=>array(40,-14,601,760),600=>array(33,-14,542,560),601=>array(55,-14,542,560),602=>array(-3,-14,595,560),603=>array(60,-11,551,560),604=>array(32,-11,532,560),605=>array(-23,-11,582,560),606=>array(86,-21,542,559),607=>array(-5,-208,559,547),608=>array(36,-215,620,760),609=>array(69,-215,600,545),610=>array(59,0,574,574),611=>array(52,-210,626,547),612=>array(103,0,605,547),613=>array(100,-210,583,546),614=>array(18,0,502,760),615=>array(38,-208,522,760),616=>array(4,0,503,760),617=>array(136,0,466,547),618=>array(24,0,578,547),619=>array(15,0,559,765),620=>array(79,0,466,765),621=>array(168,-208,435,765),622=>array(101,-213,601,765),623=>array(33,0,606,560),624=>array(53,-210,626,560),625=>array(16,-208,589,560),626=>array(12,-208,568,560),627=>array(32,-208,484,560),628=>array(16,0,586,560),629=>array(67,-14,535,560),630=>array(34,0,616,547),631=>array(72,-15,523,560),632=>array(48,-208,561,759),633=>array(87,-13,516,547),634=>array(67,-13,536,755),635=>array(50,-208,479,547),636=>array(66,-208,535,560),637=>array(104,-208,535,560),638=>array(23,0,579,560),639=>array(23,0,483,560),640=>array(6,0,490,547),641=>array(6,0,596,547),642=>array(56,-208,550,560),643=>array(20,-208,582,760),644=>array(-33,-208,635,760),645=>array(173,-208,429,549),646=>array(-16,-208,639,760),647=>array(81,-155,535,547),648=>array(156,-208,610,702),649=>array(-25,-14,625,547),650=>array(47,-15,610,547),651=>array(71,0,555,547),652=>array(-19,0,514,547),653=>array(-46,0,542,547),654=>array(-39,0,591,755),655=>array(104,0,607,561),656=>array(62,-208,509,547),657=>array(33,-54,579,547),658=>array(-6,-213,572,547),659=>array(17,-213,552,547),660=>array(144,0,537,759),661=>array(124,0,575,759),662=>array(27,0,478,759),663=>array(44,-214,595,759),664=>array(46,22,556,532),665=>array(47,0,504,561),666=>array(60,-21,517,559),667=>array(8,0,627,759),668=>array(16,0,586,560),669=>array(25,-208,509,760),670=>array(38,-213,618,547),671=>array(65,0,444,560),672=>array(17,-208,654,759),673=>array(59,0,537,759),674=>array(124,0,575,759),675=>array(-7,-14,609,760),676=>array(10,-213,615,760),677=>array(8,-54,612,760),678=>array(79,-14,546,702),679=>array(105,-208,620,760),680=>array(98,-70,550,702),681=>array(64,-208,550,760),682=>array(40,-14,499,760),683=>array(33,0,527,760),684=>array(65,-15,596,641),685=>array(16,84,586,640),686=>array(160,-214,568,760),687=>array(147,-208,491,760),688=>array(115,318,440,744),689=>array(115,317,440,743),690=>array(185,202,417,744),691=>array(169,318,432,632),692=>array(170,311,433,625),693=>array(146,202,408,625),694=>array(119,318,483,625),695=>array(100,318,562,625),696=>array(123,202,510,625),697=>array(216,557,389,800),699=>array(226,472,453,760),700=>array(198,472,425,760),701=>array(242,595,384,844),702=>array(300,492,460,760),703=>array(292,492,452,760),704=>array(199,437,448,862),705=>array(187,437,469,862),710=>array(194,616,502,800),711=>array(230,616,538,800),712=>array(241,488,361,759),713=>array(215,673,521,745),716=>array(241,-148,361,123),717=>array(51,-174,357,-102),718=>array(269,-285,462,-102),719=>array(233,-285,502,-102),720=>array(164,0,438,517),721=>array(229,355,404,517),722=>array(252,249,413,517),723=>array(245,249,405,517),726=>array(148,125,455,417),727=>array(184,234,418,307),728=>array(229,645,536,785),729=>array(308,658,428,758),730=>array(246,645,514,913),731=>array(113,-193,293,0),732=>array(196,638,542,777),733=>array(215,616,598,800),734=>array(-176,233,420,504),736=>array(148,208,500,632),737=>array(201,326,402,755),738=>array(142,326,442,648),739=>array(104,326,491,632),740=>array(188,326,469,751),741=>array(199,0,521,668),742=>array(169,0,521,668),743=>array(140,0,521,668),744=>array(111,0,521,668),745=>array(82,0,521,668),750=>array(108,472,559,760),755=>array(94,-245,313,-31),768=>array(221,616,414,800),769=>array(281,616,550,800),770=>array(194,616,502,800),771=>array(196,638,542,777),772=>array(215,673,521,745),773=>array(0,716,602,755),774=>array(229,645,536,785),775=>array(308,658,428,758),776=>array(213,659,522,758),777=>array(207,618,408,847),778=>array(246,645,514,913),779=>array(215,616,598,800),780=>array(230,616,538,800),781=>array(245,616,354,833),782=>array(146,616,454,833),783=>array(188,616,495,800),784=>array(229,645,536,857),785=>array(203,645,511,785),786=>array(229,472,424,641),787=>array(218,595,384,844),788=>array(242,595,384,844),789=>array(281,616,458,800),790=>array(269,-285,462,-102),791=>array(233,-285,502,-102),792=>array(188,-375,370,-135),793=>array(229,-375,412,-135),794=>array(191,690,444,930),795=>array(197,373,406,555),796=>array(147,-245,278,-31),797=>array(178,-288,430,-135),798=>array(204,-288,456,-135),799=>array(183,-375,435,-135),800=>array(175,-202,427,-135),801=>array(151,-208,472,63),802=>array(39,-208,284,63),803=>array(141,-202,261,-102),804=>array(46,-201,356,-103),805=>array(94,-245,313,-31),806=>array(85,-265,280,-96),807=>array(89,-193,306,0),808=>array(118,-193,298,0),809=>array(247,-319,355,-102),810=>array(150,-263,452,-102),811=>array(114,-222,515,-82),812=>array(64,-237,376,-53),813=>array(28,-237,341,-53),814=>array(57,-238,365,-98),815=>array(31,-237,340,-97),816=>array(23,-238,370,-99),817=>array(51,-174,357,-102),818=>array(0,-236,602,-197),819=>array(0,-236,602,-80),820=>array(29,240,573,381),821=>array(69,221,519,301),822=>array(0,221,602,301),823=>array(-32,-47,628,592),824=>array(-67,-34,656,761),825=>array(129,-245,260,-31),826=>array(150,-188,452,-26),827=>array(140,-371,462,-102),828=>array(87,-222,488,-82),829=>array(181,599,421,816),830=>array(207,595,395,853),831=>array(0,599,602,755),835=>array(218,595,384,844),856=>array(626,658,746,758),865=>array(-131,742,702,902),884=>array(216,557,389,800),885=>array(213,-208,386,35),890=>array(197,-208,293,-45),894=>array(99,-140,392,519),900=>array(281,616,550,800),901=>array(213,659,601,980),902=>array(-52,0,513,800),903=>array(222,273,374,422),904=>array(-61,0,600,800),905=>array(-85,0,606,800),906=>array(-61,0,574,800),908=>array(12,-14,562,800),910=>array(-146,0,658,800),911=>array(-33,0,564,800),912=>array(191,0,601,980),913=>array(-52,0,513,729),914=>array(11,0,570,729),915=>array(34,0,627,729),916=>array(-53,0,513,729),917=>array(26,0,600,729),918=>array(-3,0,622,729),919=>array(-4,0,606,729),920=>array(57,-14,545,742),921=>array(28,0,574,729),922=>array(-4,0,661,729),923=>array(-53,0,513,729),924=>array(-29,0,631,729),925=>array(-3,0,605,729),926=>array(-4,0,606,729),927=>array(40,-14,562,742),928=>array(-4,0,606,729),929=>array(25,0,588,729),931=>array(-13,0,625,729),932=>array(78,0,651,729),933=>array(95,0,658,729),934=>array(57,0,544,729),935=>array(-62,0,653,729),936=>array(95,0,615,729),937=>array(-33,0,564,713),938=>array(28,0,574,913),939=>array(95,0,658,913),940=>array(34,-12,606,800),941=>array(64,-15,550,800),942=>array(61,-208,550,800),943=>array(191,0,550,800),944=>array(64,0,601,980),945=>array(34,-12,606,559),946=>array(-21,-208,553,766),947=>array(32,-208,584,547),948=>array(46,-14,535,767),949=>array(64,-15,536,553),950=>array(72,-210,613,760),951=>array(61,-208,545,560),952=>array(67,-14,535,732),953=>array(191,0,438,547),954=>array(62,0,606,547),955=>array(27,0,560,760),956=>array(-19,-208,566,547),957=>array(109,0,547,547),958=>array(68,-210,591,760),959=>array(57,-14,544,560),960=>array(35,-19,596,547),961=>array(18,-208,560,560),962=>array(114,-210,585,560),963=>array(60,-14,599,547),964=>array(113,0,578,547),965=>array(64,0,564,547),966=>array(57,-208,585,551),967=>array(0,-208,602,547),968=>array(76,-208,612,547),969=>array(24,-14,574,547),970=>array(191,0,522,758),971=>array(64,0,564,758),972=>array(57,-14,550,800),973=>array(64,0,564,800),974=>array(24,-14,574,800),976=>array(72,-11,526,768),977=>array(66,-11,540,768),978=>array(28,0,583,729),979=>array(-186,0,583,800),980=>array(28,0,583,913),981=>array(55,-208,551,729),982=>array(12,0,607,547),983=>array(-1,-188,636,547),984=>array(76,-208,564,742),985=>array(85,-208,554,560),986=>array(63,-210,604,729),987=>array(96,-210,594,547),988=>array(45,0,616,729),989=>array(-90,-208,594,760),990=>array(24,-2,599,729),991=>array(58,0,547,759),992=>array(80,-208,558,742),993=>array(6,-180,494,559),1008=>array(-21,-3,617,547),1009=>array(87,-208,560,560),1010=>array(76,-14,555,560),1011=>array(2,-208,482,760),1012=>array(57,-14,545,742),1013=>array(79,-14,557,560),1014=>array(27,-14,504,560),1015=>array(25,0,566,729),1016=>array(-1,-208,551,765),1017=>array(56,-14,592,742),1018=>array(-29,0,630,729),1019=>array(-12,-208,612,547),1020=>array(-23,-208,560,560),1021=>array(2,-14,524,742),1022=>array(56,-14,592,742),1023=>array(2,-14,524,742),1024=>array(26,0,600,985),1025=>array(26,0,600,900),1026=>array(39,-229,552,730),1027=>array(34,0,627,985),1028=>array(55,-14,590,742),1029=>array(12,-14,560,742),1030=>array(28,0,574,729),1031=>array(28,0,574,900),1032=>array(-12,-14,538,729),1033=>array(-80,0,575,729),1034=>array(-54,0,577,729),1035=>array(17,0,530,730),1036=>array(37,0,702,985),1037=>array(-3,0,605,985),1038=>array(19,0,634,928),1039=>array(11,-157,621,729),1040=>array(-52,0,513,729),1041=>array(10,0,593,729),1042=>array(11,0,570,729),1043=>array(34,0,627,729),1044=>array(-70,-157,613,729),1045=>array(26,0,600,729),1046=>array(-63,0,657,729),1047=>array(-9,-14,538,742),1048=>array(-3,0,605,729),1049=>array(-3,0,605,928),1050=>array(-4,0,661,729),1051=>array(-69,0,605,729),1052=>array(-29,0,631,729),1053=>array(-4,0,606,729),1054=>array(40,-14,562,742),1055=>array(-4,0,606,729),1056=>array(25,0,588,729),1057=>array(56,-14,592,742),1058=>array(78,0,651,729),1059=>array(19,0,634,729),1060=>array(23,0,583,729),1061=>array(-62,0,653,729),1062=>array(-17,-157,593,729),1063=>array(82,0,604,729),1064=>array(-15,0,618,729),1065=>array(-26,-157,606,729),1066=>array(70,0,529,729),1067=>array(-40,0,625,729),1068=>array(25,0,529,729),1069=>array(2,-14,537,742),1070=>array(-0,-14,621,742),1071=>array(-34,0,624,729),1072=>array(35,-14,531,560),1073=>array(35,-14,556,777),1074=>array(49,0,507,547),1075=>array(72,0,546,547),1076=>array(-16,-140,559,547),1077=>array(48,-14,550,561),1078=>array(-24,0,617,547),1079=>array(32,-11,532,560),1080=>array(42,0,566,547),1081=>array(42,0,566,785),1082=>array(62,0,606,547),1083=>array(-39,0,566,547),1084=>array(-23,0,629,547),1085=>array(42,0,566,547),1086=>array(57,-14,544,560),1087=>array(42,0,566,547),1088=>array(-1,-208,551,560),1089=>array(76,-14,555,560),1090=>array(149,0,557,547),1091=>array(-19,-208,598,547),1092=>array(36,-208,562,760),1093=>array(-34,0,590,547),1094=>array(21,-140,544,547),1095=>array(108,0,566,548),1096=>array(8,0,595,547),1097=>array(-0,-140,586,547),1098=>array(54,0,550,547),1099=>array(-2,0,604,547),1100=>array(43,0,507,547),1101=>array(47,-14,526,560),1102=>array(-15,-14,582,560),1103=>array(29,0,534,547),1104=>array(48,-14,550,803),1105=>array(48,-14,550,718),1106=>array(56,-208,526,760),1107=>array(72,0,589,803),1108=>array(95,-14,566,560),1109=>array(56,-14,526,560),1110=>array(30,0,490,760),1111=>array(30,0,500,718),1112=>array(2,-208,482,760),1113=>array(-48,0,582,547),1114=>array(-21,0,559,547),1115=>array(36,0,494,760),1116=>array(62,0,606,803),1117=>array(42,0,566,803),1118=>array(-19,-208,598,785),1119=>array(56,-140,580,547),1122=>array(50,0,529,729),1123=>array(54,0,547,760),1138=>array(57,-14,545,742),1139=>array(67,-14,535,560),1168=>array(34,0,656,878),1169=>array(72,0,576,700),1170=>array(34,0,627,729),1171=>array(56,0,546,547),1172=>array(34,-200,627,729),1173=>array(72,-208,546,547),1174=>array(-63,-157,657,729),1175=>array(-24,-140,617,547),1176=>array(-9,-193,538,742),1177=>array(32,-193,532,560),1178=>array(-4,-152,661,729),1179=>array(62,-135,606,547),1186=>array(-4,-152,606,729),1187=>array(42,-135,566,547),1188=>array(-15,0,662,729),1189=>array(8,0,639,547),1194=>array(56,-193,592,742),1195=>array(76,-193,555,560),1196=>array(78,-152,651,729),1197=>array(146,-135,557,547),1198=>array(95,0,658,729),1199=>array(86,-208,598,547),1200=>array(95,0,661,729),1201=>array(74,-208,598,547),1202=>array(-63,-152,648,729),1203=>array(-16,-135,599,547),1210=>array(-3,0,511,730),1211=>array(41,0,535,760),1216=>array(28,0,574,729),1217=>array(-63,0,657,928),1218=>array(-24,0,617,785),1219=>array(-4,-200,661,729),1220=>array(62,-208,606,547),1223=>array(-4,-200,606,729),1224=>array(42,-208,566,547),1227=>array(34,-152,627,729),1228=>array(72,-135,546,547),1231=>array(171,0,410,765),1232=>array(-52,0,564,928),1233=>array(35,-14,536,785),1234=>array(-52,0,537,913),1235=>array(35,-14,531,758),1236=>array(-71,0,638,729),1237=>array(-23,-14,593,560),1238=>array(26,0,600,928),1239=>array(48,-14,550,785),1240=>array(57,-14,545,742),1241=>array(55,-14,542,560),1242=>array(57,-14,545,913),1243=>array(55,-14,542,758),1244=>array(-63,0,657,913),1245=>array(-24,0,617,758),1246=>array(-9,-14,538,913),1247=>array(32,-11,532,758),1248=>array(-16,-14,602,729),1249=>array(-6,-213,572,547),1250=>array(-3,0,605,898),1251=>array(42,0,566,745),1252=>array(-3,0,605,913),1253=>array(42,0,566,758),1254=>array(40,-14,562,913),1255=>array(57,-14,544,758),1256=>array(57,-14,545,742),1257=>array(67,-14,535,560),1258=>array(57,-14,545,913),1259=>array(67,-14,535,758),1260=>array(2,-14,537,913),1261=>array(47,-14,526,758),1262=>array(19,0,634,898),1263=>array(-19,-208,598,745),1264=>array(19,0,634,913),1265=>array(-19,-208,598,758),1266=>array(19,0,634,927),1267=>array(-19,-208,598,800),1268=>array(82,0,604,913),1269=>array(108,0,566,758),1270=>array(95,-152,606,730),1271=>array(123,-135,567,548),1272=>array(-40,0,625,913),1273=>array(-2,0,604,758),1296=>array(35,-14,573,742),1297=>array(64,-15,536,553),1306=>array(40,-132,562,742),1307=>array(48,-208,560,560),1308=>array(40,0,672,729),1309=>array(45,0,642,547),1329=>array(28,-29,589,729),1330=>array(-9,0,551,742),1331=>array(56,0,547,742),1332=>array(37,0,562,742),1333=>array(31,-14,576,729),1334=>array(-3,0,575,742),1335=>array(-12,0,579,729),1336=>array(-9,0,551,743),1337=>array(-49,-14,593,742),1338=>array(15,-14,597,729),1339=>array(0,0,526,729),1340=>array(4,0,471,729),1341=>array(-24,-14,593,729),1342=>array(24,-14,640,742),1343=>array(75,0,565,729),1344=>array(23,-26,594,729),1345=>array(8,-23,577,742),1346=>array(37,0,520,742),1347=>array(-8,0,631,742),1348=>array(-5,-14,647,729),1349=>array(27,-14,578,742),1350=>array(82,-14,564,729),1351=>array(27,-14,551,729),1352=>array(0,0,561,743),1353=>array(53,-28,578,742),1354=>array(42,0,596,742),1355=>array(-4,0,577,742),1356=>array(-45,0,562,742),1357=>array(41,-14,602,729),1358=>array(20,0,545,729),1359=>array(22,-14,558,742),1360=>array(0,0,561,743),1361=>array(27,-14,578,742),1362=>array(-5,0,571,729),1363=>array(21,0,583,729),1364=>array(-24,0,610,742),1365=>array(40,-14,562,742),1366=>array(4,-14,563,729),1369=>array(292,492,452,760),1370=>array(207,499,395,729),1371=>array(233,620,502,803),1372=>array(83,618,518,893),1373=>array(269,616,462,800),1374=>array(61,613,511,885),1375=>array(78,618,507,760),1377=>array(26,-13,605,547),1378=>array(15,-208,539,560),1379=>array(45,-208,556,558),1380=>array(21,-208,525,560),1381=>array(48,-14,556,760),1382=>array(45,-208,556,558),1383=>array(27,0,533,760),1384=>array(15,-208,539,560),1385=>array(-42,-208,588,560),1386=>array(7,-14,600,760),1387=>array(-2,-208,522,760),1388=>array(86,-208,382,547),1389=>array(-43,-208,603,760),1390=>array(36,-14,566,771),1391=>array(78,-208,562,760),1392=>array(38,0,532,760),1393=>array(45,-15,503,760),1394=>array(21,-208,505,560),1395=>array(54,-14,586,760),1396=>array(19,-14,626,760),1397=>array(81,-208,520,547),1398=>array(101,-14,584,760),1399=>array(26,-208,553,561),1400=>array(38,0,532,560),1401=>array(58,-208,487,571),1402=>array(45,-208,625,547),1403=>array(28,-208,557,561),1404=>array(10,0,516,560),1405=>array(58,-13,550,547),1406=>array(36,-208,562,760),1407=>array(22,-13,579,560),1408=>array(17,-208,541,560),1409=>array(45,-215,576,560),1410=>array(68,0,440,547),1411=>array(21,-208,579,760),1412=>array(-22,-208,577,560),1413=>array(57,-14,544,560),1414=>array(-14,-208,591,760),1415=>array(3,-14,507,760),1417=>array(209,0,393,415),1418=>array(170,205,439,314),3713=>array(-6,-10,574,560),3714=>array(24,-17,572,568),3716=>array(38,-10,540,568),3719=>array(94,-238,510,568),3720=>array(66,-0,546,575),3722=>array(51,-238,588,563),3725=>array(30,-8,599,573),3732=>array(23,-14,567,560),3733=>array(35,-15,579,579),3734=>array(74,-240,578,560),3735=>array(30,-14,583,560),3737=>array(-20,-14,593,568),3738=>array(38,-8,594,561),3739=>array(19,-8,616,760),3740=>array(16,-8,664,638),3741=>array(4,-8,622,760),3742=>array(24,-8,604,561),3743=>array(5,-8,627,760),3745=>array(-32,-14,602,547),3746=>array(12,-8,620,760),3747=>array(22,-8,586,568),3749=>array(14,-8,575,568),3751=>array(27,-13,575,560),3754=>array(1,-8,679,701),3755=>array(-12,-12,619,575),3757=>array(33,-8,579,568),3758=>array(14,-8,662,605),3759=>array(52,-106,615,579),3760=>array(73,-13,640,563),3761=>array(199,639,702,880),3762=>array(145,0,586,560),3763=>array(-403,0,586,806),3764=>array(41,615,562,926),3765=>array(41,612,616,926),3766=>array(41,615,562,926),3767=>array(41,612,616,926),3768=>array(201,-350,404,-38),3769=>array(144,-306,440,-40),3771=>array(31,639,567,880),3772=>array(-15,-278,612,-39),3784=>array(240,618,362,792),3785=>array(34,609,582,891),3786=>array(46,598,664,869),3787=>array(154,609,448,890),3788=>array(-15,636,612,875),3789=>array(199,620,404,806),4304=>array(60,0,522,560),4305=>array(46,0,510,761),4306=>array(21,-208,528,510),4307=>array(42,-208,609,505),4308=>array(41,-208,562,510),4309=>array(41,-208,559,510),4310=>array(43,0,507,760),4311=>array(17,0,591,505),4312=>array(72,0,535,510),4313=>array(42,-207,553,501),4314=>array(62,-208,557,510),4315=>array(44,0,568,760),4316=>array(43,0,538,748),4317=>array(17,0,588,505),4318=>array(40,0,541,757),4319=>array(37,-207,596,524),4320=>array(-7,0,567,760),4321=>array(46,0,506,743),4322=>array(-3,-207,580,614),4323=>array(53,-207,579,506),4324=>array(38,-208,614,505),4325=>array(20,-208,616,743),4326=>array(37,-208,611,506),4327=>array(42,-207,592,496),4328=>array(45,0,573,760),4329=>array(3,0,509,760),4330=>array(25,-207,578,518),4331=>array(44,0,597,743),4332=>array(45,0,624,760),4333=>array(19,-207,532,743),4334=>array(46,0,512,743),4335=>array(35,-207,533,605),4336=>array(37,0,558,760),4337=>array(2,-207,590,760),4338=>array(36,-131,547,511),4339=>array(41,-208,595,510),4340=>array(17,-208,578,760),4341=>array(22,0,582,760),4342=>array(30,-207,615,511),4343=>array(17,-207,525,511),4344=>array(40,-207,554,520),4345=>array(78,-208,583,518),4346=>array(56,-66,551,511),4347=>array(97,24,470,486),4348=>array(181,370,441,760),7426=>array(13,-14,629,560),7432=>array(51,-11,542,560),7433=>array(130,-211,590,549),7444=>array(-23,-14,601,560),7446=>array(120,273,588,560),7447=>array(119,-14,588,273),7453=>array(21,1,648,419),7454=>array(42,-1,643,417),7455=>array(21,0,666,501),7468=>array(83,326,440,734),7469=>array(80,326,516,734),7470=>array(112,326,457,734),7472=>array(112,326,457,734),7473=>array(123,326,474,734),7474=>array(123,326,480,734),7475=>array(140,318,475,742),7476=>array(114,326,488,734),7477=>array(134,326,468,734),7478=>array(135,318,472,734),7479=>array(94,326,502,734),7480=>array(119,326,413,734),7481=>array(99,326,503,734),7482=>array(115,326,487,734),7483=>array(115,326,487,734),7484=>array(139,318,463,742),7486=>array(116,326,465,734),7487=>array(94,326,437,734),7488=>array(157,326,516,734),7489=>array(139,318,486,734),7490=>array(140,326,530,734),7491=>array(145,318,457,640),7492=>array(144,318,458,640),7493=>array(140,318,462,640),7494=>array(107,318,495,640),7495=>array(140,318,462,751),7496=>array(126,318,476,751),7497=>array(143,318,459,640),7498=>array(143,318,459,640),7499=>array(146,320,457,640),7500=>array(146,320,457,640),7501=>array(134,206,468,640),7502=>array(156,208,446,633),7503=>array(130,326,472,751),7504=>array(118,326,484,640),7505=>array(146,209,456,640),7506=>array(147,318,455,640),7507=>array(150,318,452,640),7508=>array(150,479,452,640),7509=>array(150,318,452,479),7510=>array(127,209,475,640),7511=>array(158,326,444,719),7512=>array(146,319,456,632),7513=>array(104,327,499,561),7514=>array(119,326,483,640),7515=>array(142,326,460,632),7522=>array(156,0,446,425),7523=>array(169,-8,432,306),7524=>array(146,-7,456,306),7525=>array(142,0,460,306),7543=>array(36,-215,566,560),7544=>array(114,326,488,734),7547=>array(78,0,630,547),7557=>array(196,-208,520,765),7579=>array(140,318,462,640),7580=>array(150,318,452,640),7581=>array(147,286,455,639),7582=>array(146,318,457,751),7583=>array(143,320,459,640),7584=>array(150,326,452,751),7585=>array(155,209,447,632),7586=>array(134,206,468,631),7587=>array(146,208,456,632),7588=>array(144,326,458,751),7589=>array(197,326,405,632),7590=>array(127,326,475,632),7591=>array(127,326,475,632),7592=>array(148,209,454,751),7593=>array(217,209,385,755),7594=>array(199,209,403,755),7595=>array(182,326,420,640),7596=>array(119,209,483,640),7597=>array(119,208,483,640),7598=>array(130,209,472,640),7599=>array(169,209,433,640),7600=>array(122,326,480,640),7601=>array(147,318,455,640),7602=>array(140,210,462,751),7603=>array(143,209,459,640),7604=>array(124,209,478,751),7605=>array(188,209,472,719),7606=>array(97,318,505,632),7607=>array(122,318,480,632),7609=>array(151,326,451,632),7610=>array(133,326,469,632),7611=>array(139,326,463,632),7612=>array(164,209,438,632),7613=>array(129,296,473,632),7614=>array(119,207,483,632),7615=>array(143,318,459,736),7680=>array(-52,-245,513,729),7681=>array(35,-245,531,560),7682=>array(11,0,570,914),7683=>array(29,-14,541,760),7684=>array(11,-202,570,729),7685=>array(29,-202,541,760),7686=>array(11,-174,570,729),7687=>array(29,-174,541,760),7688=>array(56,-193,594,927),7689=>array(76,-193,594,800),7690=>array(-4,0,552,914),7691=>array(58,-14,612,760),7692=>array(-4,-202,552,729),7693=>array(58,-202,612,760),7694=>array(-4,-174,552,729),7695=>array(51,-174,612,760),7696=>array(-43,-193,552,729),7697=>array(58,-193,612,760),7698=>array(-4,-237,552,729),7699=>array(28,-237,612,760),7704=>array(26,-237,600,729),7705=>array(35,-237,550,561),7706=>array(26,-238,600,729),7707=>array(30,-238,550,561),7708=>array(26,-193,600,928),7709=>array(48,-193,550,785),7710=>array(45,0,616,914),7711=>array(129,0,608,914),7712=>array(38,-14,576,898),7713=>array(29,-215,559,745),7714=>array(-4,0,606,914),7715=>array(41,0,535,914),7716=>array(-4,-202,606,729),7717=>array(41,-202,535,760),7718=>array(-4,0,606,913),7719=>array(41,0,535,918),7720=>array(-94,-193,606,729),7721=>array(-77,-193,535,760),7722=>array(-4,-238,606,729),7723=>array(41,-238,535,760),7724=>array(23,-238,574,729),7725=>array(23,-238,490,760),7728=>array(-4,0,661,927),7729=>array(44,0,588,927),7730=>array(-4,-202,661,729),7731=>array(44,-202,588,760),7732=>array(-4,-174,661,729),7733=>array(44,-174,588,760),7734=>array(38,-202,505,729),7735=>array(141,-202,477,765),7736=>array(38,-202,551,898),7737=>array(141,-202,551,898),7738=>array(38,-174,505,729),7739=>array(51,-174,477,765),7740=>array(38,-237,505,729),7741=>array(28,-237,477,765),7742=>array(-29,0,631,927),7743=>array(-7,0,575,800),7744=>array(-29,0,631,914),7745=>array(-7,0,575,758),7746=>array(-29,-202,631,729),7747=>array(-7,-202,575,560),7748=>array(-3,0,605,914),7749=>array(41,0,535,758),7750=>array(-3,-202,605,729),7751=>array(41,-202,535,560),7752=>array(-3,-174,605,729),7753=>array(41,-174,535,560),7754=>array(-3,-237,605,729),7755=>array(28,-237,535,560),7756=>array(40,-14,562,997),7757=>array(57,-14,585,997),7764=>array(25,0,588,931),7765=>array(-1,-208,551,800),7766=>array(25,0,588,914),7767=>array(-1,-208,551,758),7768=>array(6,0,562,914),7769=>array(106,0,595,758),7770=>array(6,-202,562,729),7771=>array(106,-202,595,560),7772=>array(6,-202,562,898),7773=>array(106,-202,595,745),7774=>array(6,-174,562,729),7775=>array(51,-174,595,560),7776=>array(12,-14,560,914),7777=>array(56,-14,526,758),7778=>array(12,-202,560,742),7779=>array(56,-202,526,560),7784=>array(12,-202,560,914),7785=>array(56,-202,526,758),7786=>array(78,0,651,914),7787=>array(95,0,549,914),7788=>array(78,-202,651,729),7789=>array(95,-202,549,702),7790=>array(51,-174,651,729),7791=>array(51,-174,549,702),7792=>array(28,-237,651,729),7793=>array(28,-237,549,702),7794=>array(39,-201,601,729),7795=>array(46,-201,553,547),7796=>array(23,-238,601,729),7797=>array(23,-238,553,547),7798=>array(28,-237,601,729),7799=>array(28,-237,553,547),7800=>array(39,-14,601,997),7801=>array(61,-13,585,997),7804=>array(97,0,646,909),7805=>array(89,0,593,757),7806=>array(97,-202,646,729),7807=>array(89,-202,593,547),7808=>array(40,0,672,931),7809=>array(45,0,642,803),7810=>array(40,0,672,931),7811=>array(45,0,642,803),7812=>array(40,0,672,900),7813=>array(45,0,642,718),7814=>array(40,0,672,914),7815=>array(45,0,642,758),7816=>array(40,-202,672,729),7817=>array(45,-202,642,547),7818=>array(-62,0,653,914),7819=>array(-34,0,590,758),7820=>array(-62,0,653,913),7821=>array(-34,0,590,718),7822=>array(95,0,658,914),7823=>array(-19,-208,598,758),7824=>array(-3,0,622,932),7825=>array(38,0,553,803),7826=>array(-3,-202,622,729),7827=>array(38,-202,553,547),7828=>array(-3,-174,622,729),7829=>array(38,-174,553,547),7830=>array(41,-174,535,760),7831=>array(95,0,549,860),7832=>array(45,0,642,923),7833=>array(-19,-208,598,923),7835=>array(129,0,608,914),7839=>array(46,-14,535,767),7840=>array(-52,-202,513,729),7841=>array(35,-202,531,560),7852=>array(-52,-202,513,932),7853=>array(35,-202,531,803),7856=>array(-52,0,564,997),7857=>array(35,-14,536,954),7862=>array(-52,-202,564,928),7863=>array(35,-202,531,760),7864=>array(26,-202,600,729),7865=>array(48,-202,550,561),7868=>array(26,0,600,921),7869=>array(48,-14,550,777),7878=>array(26,-202,600,932),7879=>array(48,-202,550,803),7882=>array(28,-202,574,729),7883=>array(30,-202,490,760),7884=>array(40,-202,562,742),7885=>array(57,-202,544,560),7896=>array(40,-202,562,932),7897=>array(57,-202,544,803),7898=>array(-20,-14,634,927),7899=>array(5,-14,595,800),7900=>array(-20,-14,634,927),7901=>array(5,-14,595,800),7904=>array(-20,-14,634,921),7905=>array(5,-14,595,777),7906=>array(-20,-202,634,760),7907=>array(5,-202,595,560),7908=>array(39,-202,601,729),7909=>array(61,-202,553,547),7912=>array(-29,-14,652,927),7913=>array(-15,-13,592,800),7914=>array(-29,-14,652,927),7915=>array(-15,-13,592,800),7918=>array(-29,-14,652,921),7919=>array(-15,-13,592,777),7920=>array(-29,-202,652,760),7921=>array(-15,-202,592,555),7922=>array(95,0,658,931),7923=>array(-19,-208,598,803),7924=>array(95,-202,658,729),7925=>array(-19,-208,598,547),7928=>array(95,0,658,921),7929=>array(-19,-208,598,777),7936=>array(34,-12,606,806),7937=>array(34,-12,606,806),7938=>array(34,-12,606,806),7939=>array(34,-12,606,806),7940=>array(34,-12,606,806),7941=>array(34,-12,606,806),7942=>array(34,-12,606,977),7943=>array(34,-12,606,977),7944=>array(-52,0,513,806),7945=>array(-52,0,513,806),7946=>array(-165,0,513,806),7947=>array(-141,0,513,806),7948=>array(-80,0,513,806),7949=>array(-65,0,513,806),7950=>array(-52,0,513,977),7951=>array(-52,0,513,977),7952=>array(64,-15,536,806),7953=>array(64,-15,536,806),7954=>array(64,-15,536,806),7955=>array(64,-15,536,806),7956=>array(64,-15,599,806),7957=>array(64,-15,599,806),7960=>array(-31,0,600,806),7961=>array(-6,0,600,806),7962=>array(-275,0,600,806),7963=>array(-250,0,600,806),7964=>array(-214,0,600,806),7965=>array(-199,0,600,806),7968=>array(61,-208,545,806),7969=>array(61,-208,545,806),7970=>array(61,-208,545,806),7971=>array(61,-208,545,806),7972=>array(61,-208,599,806),7973=>array(61,-208,599,806),7974=>array(61,-208,576,977),7975=>array(61,-208,572,977),7976=>array(-55,0,606,806),7977=>array(-31,0,606,806),7978=>array(-312,0,606,806),7979=>array(-287,0,606,806),7980=>array(-263,0,606,806),7981=>array(-248,0,606,806),7982=>array(-112,0,606,977),7983=>array(-116,0,606,977),7984=>array(191,0,438,806),7985=>array(191,0,438,806),7986=>array(152,0,536,806),7987=>array(177,0,536,806),7988=>array(177,0,599,806),7989=>array(191,0,599,806),7990=>array(191,0,576,977),7991=>array(191,0,572,977),7992=>array(-31,0,574,806),7993=>array(-6,0,574,806),7994=>array(-263,0,574,806),7995=>array(-238,0,574,806),7996=>array(-214,0,574,806),7997=>array(-199,0,574,806),7998=>array(-75,0,574,977),7999=>array(-79,0,574,977),8000=>array(57,-14,544,806),8001=>array(57,-14,544,806),8002=>array(57,-14,544,806),8003=>array(57,-14,544,806),8004=>array(57,-14,599,806),8005=>array(57,-14,599,806),8008=>array(6,-14,562,806),8009=>array(-6,-14,562,806),8010=>array(-275,-14,562,806),8011=>array(-250,-14,562,806),8012=>array(-141,-14,562,806),8013=>array(-126,-14,562,806),8016=>array(64,0,564,806),8017=>array(64,0,564,806),8018=>array(64,0,564,806),8019=>array(64,0,564,806),8020=>array(64,0,599,806),8021=>array(64,0,599,806),8022=>array(64,0,576,977),8023=>array(64,0,572,977),8025=>array(-80,0,658,806),8027=>array(-287,0,658,806),8029=>array(-285,0,658,806),8031=>array(-152,0,658,977),8032=>array(24,-14,574,806),8033=>array(24,-14,574,806),8034=>array(24,-14,574,806),8035=>array(24,-14,574,806),8036=>array(24,-14,599,806),8037=>array(24,-14,599,806),8038=>array(24,-14,576,977),8039=>array(24,-14,574,977),8040=>array(-33,0,564,806),8041=>array(-33,0,564,806),8042=>array(-275,0,564,806),8043=>array(-250,0,564,806),8044=>array(-128,0,564,806),8045=>array(-114,0,564,806),8046=>array(-39,0,564,977),8047=>array(-79,0,564,977),8048=>array(34,-12,606,800),8049=>array(34,-12,606,800),8050=>array(64,-15,536,800),8051=>array(64,-15,550,800),8052=>array(61,-208,545,800),8053=>array(61,-208,550,800),8054=>array(191,0,438,800),8055=>array(191,0,550,800),8056=>array(57,-14,544,800),8057=>array(57,-14,550,800),8058=>array(64,0,564,800),8059=>array(64,0,564,800),8060=>array(24,-14,574,800),8061=>array(24,-14,574,800),8064=>array(34,-208,606,806),8065=>array(34,-208,606,806),8066=>array(34,-208,606,806),8067=>array(34,-208,606,806),8068=>array(34,-208,606,806),8069=>array(34,-208,606,806),8070=>array(34,-208,606,977),8071=>array(34,-208,606,977),8072=>array(-52,-208,513,806),8073=>array(-52,-208,513,806),8074=>array(-165,-208,513,806),8075=>array(-141,-208,513,806),8076=>array(-80,-208,513,806),8077=>array(-65,-208,513,806),8078=>array(-52,-208,513,977),8079=>array(-52,-208,513,977),8080=>array(44,-208,545,806),8081=>array(44,-208,545,806),8082=>array(44,-208,545,806),8083=>array(44,-208,545,806),8084=>array(44,-208,599,806),8085=>array(44,-208,599,806),8086=>array(44,-208,576,977),8087=>array(44,-208,572,977),8088=>array(-55,-208,606,806),8089=>array(-31,-208,606,806),8090=>array(-312,-208,606,806),8091=>array(-287,-208,606,806),8092=>array(-263,-208,606,806),8093=>array(-248,-208,606,806),8094=>array(-112,-208,606,977),8095=>array(-116,-208,606,977),8096=>array(24,-208,574,806),8097=>array(24,-208,574,806),8098=>array(24,-208,574,806),8099=>array(24,-208,574,806),8100=>array(24,-208,599,806),8101=>array(24,-208,599,806),8102=>array(24,-208,576,977),8103=>array(24,-208,574,977),8104=>array(-33,-208,564,806),8105=>array(-33,-208,564,806),8106=>array(-275,-208,564,806),8107=>array(-250,-208,564,806),8108=>array(-128,-208,564,806),8109=>array(-114,-208,564,806),8110=>array(-39,-208,564,977),8111=>array(-79,-208,564,977),8112=>array(34,-12,606,785),8113=>array(34,-12,606,745),8114=>array(34,-208,606,800),8115=>array(34,-208,606,559),8116=>array(34,-208,606,800),8118=>array(34,-12,606,777),8119=>array(34,-208,606,777),8120=>array(-52,0,564,928),8121=>array(-52,0,551,898),8122=>array(-52,0,513,800),8123=>array(-52,0,513,800),8124=>array(-52,-208,513,729),8125=>array(274,595,434,806),8126=>array(197,-208,293,-45),8127=>array(274,595,434,806),8128=>array(196,638,542,777),8129=>array(213,659,580,943),8130=>array(44,-208,545,800),8131=>array(44,-208,545,560),8132=>array(44,-208,550,800),8134=>array(61,-208,545,777),8135=>array(44,-208,545,777),8136=>array(-96,0,600,800),8137=>array(-61,0,600,800),8138=>array(-121,0,606,800),8139=>array(-85,0,606,800),8140=>array(-4,-208,606,729),8141=>array(152,595,536,806),8142=>array(177,595,599,806),8143=>array(230,595,576,977),8144=>array(191,0,536,785),8145=>array(191,0,521,745),8146=>array(191,0,522,980),8147=>array(191,0,601,980),8150=>array(191,0,542,777),8151=>array(191,0,580,943),8152=>array(28,0,574,928),8153=>array(28,0,574,898),8154=>array(-72,0,574,800),8155=>array(-61,0,574,800),8157=>array(177,595,536,806),8158=>array(191,595,599,806),8159=>array(226,595,572,977),8160=>array(64,0,564,785),8161=>array(64,0,564,745),8162=>array(64,0,564,980),8163=>array(64,0,601,980),8164=>array(18,-208,560,806),8165=>array(18,-208,560,806),8166=>array(64,0,564,777),8167=>array(64,0,580,943),8168=>array(95,0,658,928),8169=>array(95,0,658,898),8170=>array(-121,0,658,800),8171=>array(-146,0,658,800),8172=>array(-6,0,588,806),8173=>array(213,659,522,980),8174=>array(213,659,601,980),8175=>array(221,616,414,800),8178=>array(24,-208,574,800),8179=>array(24,-208,574,547),8180=>array(24,-208,574,800),8182=>array(24,-14,574,777),8183=>array(24,-208,574,777),8184=>array(-84,-14,562,800),8185=>array(12,-14,562,800),8186=>array(-84,0,564,800),8187=>array(-33,0,564,800),8188=>array(-33,-208,564,713),8189=>array(281,616,550,800),8190=>array(299,595,434,806),8208=>array(148,234,419,314),8209=>array(148,234,419,314),8210=>array(-25,240,591,309),8211=>array(-25,240,591,309),8212=>array(-25,240,591,309),8213=>array(-25,240,591,309),8214=>array(139,-236,462,764),8215=>array(0,-236,602,-80),8216=>array(226,472,453,760),8217=>array(226,472,453,760),8218=>array(99,-140,326,148),8219=>array(263,472,407,760),8220=>array(120,472,571,760),8221=>array(108,472,559,760),8222=>array(-8,-140,443,148),8223=>array(145,472,513,760),8224=>array(95,-96,554,729),8225=>array(29,-96,554,729),8226=>array(156,227,446,516),8227=>array(156,188,485,555),8230=>array(-32,0,520,148),8240=>array(0,0,602,699),8241=>array(0,0,602,699),8242=>array(315,547,534,729),8243=>array(242,547,607,729),8244=>array(169,547,681,729),8245=>array(351,547,499,729),8246=>array(277,547,572,729),8247=>array(204,547,646,729),8249=>array(151,69,428,517),8250=>array(155,69,431,517),8252=>array(31,0,572,729),8253=>array(163,0,546,742),8254=>array(0,716,602,755),8261=>array(129,-132,510,760),8262=>array(72,-132,453,760),8263=>array(-13,0,615,743),8264=>array(59,0,587,743),8265=>array(31,0,603,743),8267=>array(19,-96,590,729),8304=>array(172,319,513,742),8305=>array(156,326,446,751),8308=>array(135,326,458,734),8309=>array(150,319,513,734),8310=>array(173,319,513,742),8311=>array(172,326,513,734),8312=>array(157,319,513,742),8313=>array(172,319,513,742),8314=>array(139,357,464,646),8315=>array(139,479,464,525),8316=>array(139,422,464,581),8317=>array(198,252,404,751),8318=>array(198,252,404,751),8319=>array(126,326,456,640),8320=>array(172,-7,513,416),8321=>array(170,0,450,408),8322=>array(150,0,484,416),8323=>array(140,-7,480,416),8324=>array(135,0,458,408),8325=>array(150,-7,513,408),8326=>array(173,-7,513,416),8327=>array(172,0,513,408),8328=>array(157,-7,513,416),8329=>array(172,-7,513,416),8330=>array(139,31,464,320),8331=>array(139,152,464,199),8332=>array(139,96,464,254),8333=>array(198,-74,404,425),8334=>array(198,-74,404,425),8336=>array(145,-8,457,313),8337=>array(143,-8,459,314),8338=>array(147,-8,455,313),8339=>array(104,0,491,306),8340=>array(143,-8,459,313),8341=>array(115,-8,440,418),8342=>array(130,0,472,425),8343=>array(201,0,402,429),8344=>array(118,0,484,313),8345=>array(126,0,456,313),8346=>array(127,-117,475,313),8347=>array(142,0,442,322),8348=>array(158,0,444,393),8352=>array(40,0,594,729),8353=>array(38,-44,579,778),8354=>array(38,-14,579,742),8355=>array(28,0,574,729),8356=>array(22,0,587,742),8357=>array(22,-93,536,640),8358=>array(-19,0,621,729),8359=>array(2,-14,595,729),8360=>array(4,-14,579,729),8361=>array(2,0,646,729),8362=>array(-19,-14,659,729),8363=>array(58,-175,691,760),8364=>array(-5,-14,582,742),8365=>array(16,0,650,729),8366=>array(78,0,648,729),8367=>array(5,-231,593,753),8368=>array(8,-14,526,742),8369=>array(25,0,641,729),8370=>array(29,-81,573,809),8371=>array(-28,0,604,729),8372=>array(-19,-14,621,742),8373=>array(65,-147,592,760),8376=>array(50,0,650,729),8377=>array(55,0,626,729),8450=>array(57,-14,590,742),8453=>array(0,-24,598,752),8461=>array(28,0,577,729),8462=>array(41,0,535,760),8463=>array(41,0,535,760),8469=>array(36,0,565,729),8470=>array(-66,0,581,729),8471=>array(0,61,602,663),8473=>array(32,0,575,729),8474=>array(8,-129,592,742),8477=>array(18,0,592,729),8482=>array(0,447,550,729),8484=>array(23,0,575,729),8486=>array(-33,0,564,713),8490=>array(-4,0,661,729),8491=>array(-52,0,513,928),8494=>array(5,-12,597,647),8520=>array(13,0,469,760),8531=>array(23,-139,553,810),8532=>array(23,-139,553,818),8533=>array(23,-139,580,810),8534=>array(23,-139,580,818),8535=>array(23,-139,580,818),8536=>array(23,-139,580,810),8537=>array(23,-139,580,810),8538=>array(23,-139,580,810),8539=>array(23,-139,580,810),8540=>array(23,-139,580,818),8541=>array(23,-139,580,810),8542=>array(23,-139,580,810),8543=>array(23,246,553,810),8592=>array(32,112,570,436),8593=>array(139,0,463,538),8594=>array(32,112,570,436),8595=>array(139,0,463,538),8596=>array(32,112,570,436),8597=>array(139,0,463,538),8598=>array(90,0,512,422),8599=>array(90,0,512,422),8600=>array(90,0,512,422),8601=>array(90,0,512,422),8602=>array(32,112,570,436),8603=>array(32,112,570,436),8604=>array(43,193,559,422),8605=>array(43,193,559,422),8606=>array(32,112,570,436),8607=>array(139,0,463,538),8608=>array(32,112,570,436),8609=>array(139,0,463,538),8610=>array(32,112,570,436),8611=>array(32,112,570,436),8612=>array(32,112,570,436),8613=>array(139,0,463,538),8614=>array(32,112,570,436),8615=>array(139,0,463,538),8616=>array(139,0,463,538),8617=>array(32,112,570,517),8618=>array(32,112,570,517),8619=>array(32,112,570,517),8620=>array(32,112,570,517),8621=>array(32,112,570,436),8622=>array(32,102,570,446),8623=>array(55,0,547,698),8624=>array(89,0,513,674),8625=>array(89,0,513,674),8626=>array(89,0,513,674),8627=>array(89,0,513,674),8628=>array(91,0,511,540),8629=>array(31,0,571,420),8630=>array(40,168,563,487),8631=>array(40,168,563,487),8632=>array(24,0,578,513),8633=>array(32,0,570,604),8634=>array(43,0,559,497),8635=>array(43,0,559,497),8636=>array(32,234,570,436),8637=>array(32,112,570,314),8638=>array(261,0,463,538),8639=>array(139,0,341,538),8640=>array(32,234,570,436),8641=>array(32,112,570,314),8642=>array(261,0,463,538),8643=>array(160,0,362,538),8644=>array(32,0,570,561),8645=>array(21,0,582,538),8646=>array(32,0,570,561),8647=>array(32,0,570,561),8648=>array(21,0,582,538),8649=>array(32,0,570,561),8650=>array(21,0,582,538),8651=>array(32,32,570,516),8652=>array(32,32,570,516),8653=>array(32,112,570,436),8654=>array(32,112,570,460),8655=>array(32,112,570,436),8656=>array(32,112,570,436),8657=>array(139,0,463,538),8658=>array(32,112,570,436),8659=>array(139,0,463,538),8660=>array(32,112,570,436),8661=>array(139,0,463,538),8662=>array(76,-28,526,422),8663=>array(76,-28,526,422),8664=>array(76,0,526,451),8665=>array(76,0,526,451),8666=>array(32,112,570,436),8667=>array(32,112,570,436),8668=>array(32,112,570,436),8669=>array(32,112,570,436),8670=>array(139,0,463,538),8671=>array(139,0,463,538),8672=>array(32,112,570,436),8673=>array(139,0,463,538),8674=>array(32,112,570,436),8675=>array(139,0,463,538),8676=>array(32,112,570,436),8677=>array(32,112,570,436),8678=>array(12,92,570,456),8679=>array(119,0,483,558),8680=>array(32,92,590,456),8681=>array(119,0,483,558),8682=>array(119,0,483,558),8683=>array(119,0,483,558),8684=>array(119,0,483,558),8685=>array(119,0,483,558),8686=>array(119,0,483,558),8687=>array(119,0,483,558),8688=>array(32,92,590,456),8689=>array(34,0,568,534),8690=>array(34,0,568,534),8691=>array(119,0,483,558),8692=>array(32,112,570,436),8693=>array(21,0,582,538),8694=>array(32,-125,570,672),8695=>array(32,112,570,436),8696=>array(32,112,570,436),8697=>array(32,112,570,436),8698=>array(32,112,570,436),8699=>array(32,112,570,436),8700=>array(32,112,570,436),8701=>array(12,92,570,456),8702=>array(32,92,590,456),8703=>array(12,92,590,456),8704=>array(18,0,584,729),8705=>array(57,-14,545,742),8706=>array(89,-14,513,662),8707=>array(87,0,514,729),8708=>array(87,-46,514,776),8709=>array(36,48,567,580),8710=>array(-3,0,606,695),8711=>array(-3,0,606,695),8712=>array(63,0,539,715),8713=>array(63,-86,539,801),8714=>array(63,81,539,545),8715=>array(63,0,539,715),8716=>array(63,-86,539,801),8717=>array(63,81,539,545),8719=>array(74,-213,528,741),8721=>array(70,-213,530,741),8722=>array(43,272,559,355),8723=>array(43,0,559,572),8725=>array(8,-93,517,729),8727=>array(81,85,521,542),8728=>array(146,160,456,470),8729=>array(156,200,446,489),8730=>array(29,-19,578,828),8731=>array(29,-19,578,933),8732=>array(29,-19,578,924),8733=>array(91,122,511,492),8734=>array(20,122,582,492),8735=>array(61,140,541,620),8736=>array(61,140,541,620),8743=>array(80,0,521,579),8744=>array(80,0,521,579),8745=>array(80,0,521,579),8746=>array(80,0,521,579),8747=>array(63,-183,539,871),8748=>array(31,-189,571,877),8749=>array(26,-176,577,864),8756=>array(91,65,512,564),8757=>array(92,65,510,564),8758=>array(238,65,363,564),8759=>array(91,65,512,564),8760=>array(43,272,559,564),8761=>array(36,65,566,564),8762=>array(42,65,561,564),8763=>array(43,65,559,564),8764=>array(43,243,559,384),8765=>array(43,243,559,384),8769=>array(43,85,559,535),8770=>array(43,149,559,454),8771=>array(43,172,559,470),8772=>array(43,48,560,604),8773=>array(43,94,559,570),8774=>array(43,24,559,570),8775=>array(43,0,559,647),8776=>array(43,149,559,470),8777=>array(43,23,559,595),8778=>array(43,94,559,572),8779=>array(43,73,559,572),8780=>array(43,94,559,570),8781=>array(42,108,559,519),8782=>array(43,33,560,593),8783=>array(43,172,560,593),8784=>array(43,172,559,637),8785=>array(43,-11,559,637),8786=>array(43,-10,559,637),8787=>array(42,-10,560,637),8788=>array(36,147,566,479),8789=>array(36,147,566,479),8790=>array(43,172,559,454),8791=>array(43,172,559,760),8792=>array(43,172,559,662),8793=>array(43,172,559,783),8794=>array(43,172,559,783),8795=>array(43,172,559,831),8796=>array(43,172,559,836),8797=>array(34,172,568,764),8798=>array(43,172,559,760),8799=>array(43,172,559,856),8800=>array(43,18,559,608),8801=>array(43,94,559,532),8802=>array(43,5,559,622),8803=>array(43,0,559,616),8804=>array(42,0,558,531),8805=>array(43,0,559,531),8806=>array(42,-84,558,578),8807=>array(42,-84,558,578),8808=>array(42,-162,558,578),8809=>array(42,-162,558,578),8813=>array(42,0,559,627),8814=>array(43,-14,559,641),8815=>array(43,-14,559,641),8816=>array(43,-119,559,629),8817=>array(43,-119,559,629),8818=>array(42,-21,558,531),8819=>array(42,-21,558,531),8820=>array(42,-119,558,629),8821=>array(42,-119,558,629),8822=>array(42,-89,558,603),8823=>array(42,-89,558,603),8824=>array(42,-195,558,711),8825=>array(42,-195,558,711),8826=>array(42,-22,558,648),8827=>array(43,-22,559,648),8828=>array(42,-123,558,711),8829=>array(42,-123,558,711),8830=>array(42,-56,558,711),8831=>array(42,-56,558,711),8832=>array(42,-81,558,707),8833=>array(42,-81,558,707),8834=>array(43,80,559,546),8835=>array(43,80,559,546),8836=>array(43,-29,559,655),8837=>array(43,-29,559,655),8838=>array(43,0,559,625),8839=>array(43,0,559,625),8840=>array(43,-104,559,729),8841=>array(43,-104,559,729),8842=>array(43,-102,559,625),8843=>array(43,-102,559,625),8847=>array(43,58,559,568),8848=>array(43,58,559,568),8849=>array(43,7,559,619),8850=>array(43,7,559,619),8853=>array(39,51,563,577),8854=>array(39,51,563,577),8855=>array(39,51,563,577),8856=>array(39,51,563,577),8857=>array(39,51,563,577),8858=>array(39,51,563,577),8859=>array(39,51,563,577),8860=>array(39,51,563,577),8861=>array(39,52,563,577),8862=>array(39,51,564,576),8863=>array(39,51,564,576),8864=>array(39,51,564,576),8865=>array(39,51,564,576),8866=>array(43,0,559,627),8867=>array(43,0,559,627),8868=>array(43,0,559,627),8869=>array(43,0,559,627),8901=>array(239,273,362,422),8902=>array(129,201,473,527),8909=>array(43,172,559,470),8922=>array(43,-218,559,760),8923=>array(43,-218,559,760),8924=>array(42,0,558,531),8925=>array(43,0,559,531),8926=>array(42,-123,558,711),8927=>array(42,-123,558,711),8928=>array(42,-182,558,770),8929=>array(42,-182,558,770),8930=>array(43,-81,559,707),8931=>array(43,-81,559,707),8932=>array(43,-95,559,619),8933=>array(43,-95,559,619),8934=>array(42,-134,558,531),8935=>array(42,-134,558,531),8936=>array(42,-213,558,711),8937=>array(42,-213,558,711),8943=>array(39,239,562,388),8960=>array(36,48,567,580),8961=>array(56,162,540,443),8962=>array(71,0,531,596),8963=>array(71,406,530,746),8964=>array(71,-132,530,209),8965=>array(71,0,530,444),8966=>array(71,0,530,566),8968=>array(139,-132,520,760),8969=>array(199,-132,463,760),8970=>array(139,-132,403,760),8971=>array(82,-132,463,760),8972=>array(268,73,585,408),8973=>array(6,73,324,408),8974=>array(268,352,585,687),8975=>array(6,352,324,687),8976=>array(43,181,559,421),8977=>array(47,126,555,634),8978=>array(3,211,599,512),8979=>array(3,211,599,512),8980=>array(90,168,512,512),8981=>array(81,112,510,539),8984=>array(35,114,567,646),8985=>array(43,181,559,421),8988=>array(146,352,463,687),8989=>array(139,352,456,687),8990=>array(146,-56,463,279),8991=>array(139,-56,456,279),8992=>array(250,-250,537,928),8993=>array(61,-237,347,942),8997=>array(51,114,551,598),8998=>array(3,145,599,536),8999=>array(61,145,541,536),9000=>array(24,212,578,517),9003=>array(3,145,599,536),9013=>array(35,-22,566,286),9015=>array(125,-100,477,829),9016=>array(3,-100,599,829),9017=>array(3,-100,599,829),9018=>array(3,-100,599,829),9019=>array(3,-100,599,829),9020=>array(3,-100,599,829),9021=>array(3,-171,599,900),9022=>array(3,57,599,658),9025=>array(3,-100,599,829),9026=>array(3,-100,599,829),9027=>array(3,-100,599,829),9028=>array(3,-100,599,829),9031=>array(3,-100,599,829),9032=>array(3,-100,599,829),9033=>array(3,-29,599,729),9035=>array(18,-171,584,900),9036=>array(3,-100,599,829),9037=>array(3,-100,599,829),9040=>array(3,-100,599,829),9042=>array(18,-171,584,900),9043=>array(3,-100,599,829),9044=>array(3,-100,599,829),9047=>array(3,-100,599,829),9048=>array(125,-100,477,729),9049=>array(3,-100,599,729),9050=>array(3,-100,599,656),9051=>array(125,-100,477,489),9052=>array(3,-100,599,658),9054=>array(3,-100,599,829),9055=>array(-10,44,612,671),9056=>array(3,-100,599,829),9059=>array(129,201,473,636),9060=>array(156,229,446,660),9061=>array(3,57,599,831),9064=>array(43,240,559,660),9065=>array(43,69,559,660),9067=>array(18,0,584,729),9068=>array(43,-14,559,742),9069=>array(43,-171,559,900),9070=>array(125,-140,477,519),9071=>array(3,-100,599,829),9072=>array(3,-100,599,829),9075=>array(151,0,476,547),9076=>array(93,-208,541,560),9077=>array(34,-14,568,547),9078=>array(3,-100,599,559),9079=>array(76,-100,526,560),9080=>array(125,-100,477,547),9081=>array(3,-100,599,547),9082=>array(34,-12,573,559),9085=>array(13,-228,589,88),9088=>array(35,-22,566,528),9089=>array(3,106,599,528),9090=>array(3,106,599,528),9091=>array(3,177,599,567),9096=>array(40,27,562,601),9097=>array(34,46,567,579),9098=>array(34,46,567,579),9099=>array(34,46,567,579),9109=>array(3,-100,599,829),9115=>array(137,-258,465,940),9116=>array(137,-252,232,942),9117=>array(137,-240,465,942),9118=>array(137,-258,465,940),9119=>array(370,-252,465,942),9120=>array(137,-240,465,942),9121=>array(137,-252,465,928),9122=>array(137,-252,232,942),9123=>array(137,-240,465,942),9124=>array(137,-252,465,928),9125=>array(370,-252,465,935),9126=>array(137,-240,465,935),9127=>array(256,-261,594,928),9128=>array(8,-252,347,940),9129=>array(256,-240,594,940),9130=>array(256,-256,347,943),9131=>array(8,-261,346,928),9132=>array(255,-252,594,940),9133=>array(8,-240,346,940),9134=>array(250,-250,347,942),9166=>array(12,92,570,558),9167=>array(3,0,599,596),9251=>array(28,-228,545,88),9472=>array(-10,242,612,326),9473=>array(-10,200,612,368),9474=>array(262,-302,340,973),9475=>array(223,-302,379,973),9476=>array(-10,242,612,326),9477=>array(-10,200,612,368),9478=>array(262,-302,340,973),9479=>array(223,-302,379,973),9480=>array(-10,242,612,326),9481=>array(-10,200,612,368),9482=>array(262,-302,340,973),9483=>array(223,-302,379,973),9484=>array(262,-302,612,326),9485=>array(262,-302,612,368),9486=>array(223,-302,612,326),9487=>array(223,-302,612,368),9488=>array(-10,-302,340,326),9489=>array(-10,-302,340,368),9490=>array(-10,-302,379,326),9491=>array(-10,-302,379,368),9492=>array(262,242,612,973),9493=>array(262,200,612,973),9494=>array(223,242,612,973),9495=>array(223,200,612,973),9496=>array(-10,242,340,973),9497=>array(-10,200,340,973),9498=>array(-10,242,379,973),9499=>array(-10,200,379,973),9500=>array(262,-302,612,973),9501=>array(262,-302,612,973),9502=>array(223,-302,612,973),9503=>array(223,-302,612,973),9504=>array(223,-302,612,973),9505=>array(223,-302,612,973),9506=>array(223,-302,612,973),9507=>array(223,-302,612,973),9508=>array(-10,-302,340,973),9509=>array(-10,-302,340,973),9510=>array(-10,-302,379,973),9511=>array(-10,-302,379,973),9512=>array(-10,-302,379,973),9513=>array(-10,-302,379,973),9514=>array(-10,-302,379,973),9515=>array(-10,-302,379,973),9516=>array(-10,-302,612,326),9517=>array(-10,-302,612,368),9518=>array(-10,-302,612,368),9519=>array(-10,-302,612,368),9520=>array(-10,-302,612,326),9521=>array(-10,-302,612,368),9522=>array(-10,-302,612,368),9523=>array(-10,-302,612,368),9524=>array(-10,242,612,973),9525=>array(-10,200,612,973),9526=>array(-10,200,612,973),9527=>array(-10,200,612,973),9528=>array(-10,242,612,973),9529=>array(-10,200,612,973),9530=>array(-10,200,612,973),9531=>array(-10,200,612,973),9532=>array(-10,-302,612,973),9533=>array(-10,-302,612,973),9534=>array(-10,-302,612,973),9535=>array(-10,-302,612,973),9536=>array(-10,-302,612,973),9537=>array(-10,-302,612,973),9538=>array(-10,-302,612,973),9539=>array(-10,-302,612,973),9540=>array(-10,-302,612,973),9541=>array(-10,-302,612,973),9542=>array(-10,-302,612,973),9543=>array(-10,-302,612,973),9544=>array(-10,-302,612,973),9545=>array(-10,-302,612,973),9546=>array(-10,-302,612,973),9547=>array(-10,-302,612,973),9548=>array(-10,242,612,326),9549=>array(-10,200,612,368),9550=>array(262,-302,340,973),9551=>array(223,-302,379,973),9552=>array(-10,158,612,410),9553=>array(184,-302,418,973),9554=>array(262,-302,612,410),9555=>array(184,-302,612,326),9556=>array(184,-302,612,410),9557=>array(-10,-302,340,410),9558=>array(-10,-302,418,326),9559=>array(-10,-302,418,410),9560=>array(262,158,612,973),9561=>array(184,242,612,973),9562=>array(184,158,612,973),9563=>array(-10,158,340,973),9564=>array(-10,242,418,973),9565=>array(-10,158,418,973),9566=>array(262,-302,612,973),9567=>array(184,-302,612,973),9568=>array(184,-302,612,973),9569=>array(-10,-302,340,973),9570=>array(-10,-302,418,973),9571=>array(-10,-302,418,973),9572=>array(-10,-302,612,410),9573=>array(-10,-302,612,326),9574=>array(-10,-302,612,410),9575=>array(-10,158,612,973),9576=>array(-10,242,612,973),9577=>array(-10,158,612,973),9578=>array(-10,-302,612,973),9579=>array(-10,-302,612,973),9580=>array(-10,-302,612,973),9581=>array(262,-302,612,326),9582=>array(-10,-302,340,326),9583=>array(-10,242,340,973),9584=>array(262,242,612,973),9585=>array(-53,-302,655,973),9586=>array(-53,-302,655,973),9587=>array(-53,-302,655,973),9588=>array(-10,242,311,326),9589=>array(262,284,340,973),9590=>array(311,242,612,326),9591=>array(262,-302,340,284),9592=>array(-10,200,311,368),9593=>array(223,284,379,973),9594=>array(311,200,612,368),9595=>array(223,-302,379,284),9596=>array(-10,200,612,368),9597=>array(223,-302,379,973),9598=>array(-10,200,612,368),9599=>array(223,-302,379,973),9600=>array(-10,260,612,770),9601=>array(-10,-250,612,-123),9602=>array(-10,-250,612,5),9603=>array(-10,-250,612,132),9604=>array(-10,-250,612,260),9605=>array(-10,-250,612,387),9606=>array(-10,-250,612,515),9607=>array(-10,-250,612,642),9608=>array(-10,-250,612,770),9609=>array(-10,-250,534,770),9610=>array(-10,-250,457,770),9611=>array(-10,-250,379,770),9612=>array(-10,-250,301,770),9613=>array(-10,-250,223,770),9614=>array(-10,-250,146,770),9615=>array(-10,-250,68,770),9616=>array(301,-250,612,770),9617=>array(-10,-250,534,770),9618=>array(-10,-250,612,770),9619=>array(-10,-250,612,770),9620=>array(-10,642,612,770),9621=>array(534,-250,611,770),9622=>array(-10,-250,301,260),9623=>array(301,-250,612,260),9624=>array(-10,260,301,770),9625=>array(-10,-250,612,770),9626=>array(-10,-250,612,770),9627=>array(-10,-250,612,770),9628=>array(-10,-250,612,770),9629=>array(301,260,612,770),9630=>array(-10,-250,612,770),9631=>array(-10,-250,612,770),9632=>array(3,-39,599,558),9633=>array(3,-39,599,558),9634=>array(3,-39,599,558),9635=>array(3,-39,599,558),9636=>array(3,-39,599,558),9637=>array(3,-39,599,558),9638=>array(3,-39,599,558),9639=>array(3,-39,599,558),9640=>array(3,-39,599,558),9641=>array(3,-39,599,558),9642=>array(107,66,495,454),9643=>array(107,66,495,454),9644=>array(3,117,599,402),9645=>array(3,117,599,402),9646=>array(158,-39,444,558),9647=>array(158,-39,444,558),9648=>array(3,117,599,402),9649=>array(3,117,599,402),9650=>array(3,-39,599,558),9651=>array(3,-39,599,558),9652=>array(107,66,495,454),9653=>array(107,66,495,454),9654=>array(3,-39,599,558),9655=>array(3,-39,599,558),9656=>array(107,66,495,454),9657=>array(107,66,495,454),9658=>array(3,66,599,454),9659=>array(3,66,599,454),9660=>array(3,-39,599,558),9661=>array(3,-39,599,558),9662=>array(107,66,495,454),9663=>array(107,66,495,454),9664=>array(3,-39,599,558),9665=>array(3,-39,599,558),9666=>array(107,66,495,454),9667=>array(107,66,495,454),9668=>array(3,66,599,454),9669=>array(3,66,599,454),9670=>array(3,-39,599,558),9671=>array(3,-39,599,558),9672=>array(3,-38,599,558),9673=>array(3,-41,599,561),9674=>array(57,-233,545,807),9675=>array(3,-41,599,561),9676=>array(3,-41,599,561),9677=>array(3,-41,599,561),9678=>array(3,-41,599,561),9679=>array(3,-41,599,561),9680=>array(3,-41,599,561),9681=>array(3,-41,599,561),9682=>array(3,-41,599,561),9683=>array(3,-41,599,561),9684=>array(3,-41,599,561),9685=>array(3,-41,599,561),9686=>array(152,-41,450,561),9687=>array(152,-41,450,561),9688=>array(-10,-10,612,770),9689=>array(-10,-250,612,770),9690=>array(-10,260,612,770),9691=>array(-10,-250,612,260),9692=>array(152,260,450,561),9693=>array(152,260,450,561),9694=>array(152,-41,450,260),9695=>array(152,-41,450,260),9696=>array(3,260,599,561),9697=>array(3,-41,599,260),9698=>array(3,-39,599,558),9699=>array(3,-39,599,558),9700=>array(3,-39,599,558),9701=>array(3,-39,599,558),9702=>array(156,227,446,516),9703=>array(3,-39,599,558),9704=>array(3,-39,599,558),9705=>array(3,-39,599,558),9706=>array(3,-39,599,558),9707=>array(3,-39,599,558),9708=>array(3,-39,599,558),9709=>array(3,-39,599,558),9710=>array(3,-39,599,558),9711=>array(-10,-54,612,573),9712=>array(3,-39,599,558),9713=>array(3,-39,599,558),9714=>array(3,-39,599,558),9715=>array(3,-39,599,558),9716=>array(3,-41,599,561),9717=>array(3,-41,599,561),9718=>array(3,-41,599,561),9719=>array(3,-41,599,561),9720=>array(3,-39,599,558),9721=>array(3,-39,599,558),9722=>array(3,-39,599,558),9723=>array(47,6,554,513),9724=>array(47,6,554,513),9725=>array(85,44,516,475),9726=>array(85,44,516,475),9727=>array(3,-39,599,558),9728=>array(17,80,585,649),9784=>array(13,82,589,642),9785=>array(16,80,586,650),9786=>array(16,80,586,650),9787=>array(16,80,586,650),9788=>array(16,80,586,650),9791=>array(92,-78,510,708),9792=>array(71,-49,531,655),9793=>array(71,-49,531,655),9794=>array(10,75,592,648),9795=>array(35,21,567,710),9796=>array(85,21,517,710),9797=>array(33,65,569,666),9798=>array(37,65,565,666),9799=>array(105,21,497,710),9824=>array(63,65,540,664),9825=>array(7,65,595,663),9826=>array(71,65,531,664),9827=>array(24,65,578,664),9828=>array(62,65,540,664),9829=>array(5,65,597,664),9830=>array(71,65,531,664),9831=>array(24,65,578,667),9833=>array(181,16,421,708),9834=>array(79,16,523,708),9835=>array(52,-79,550,706),9836=>array(8,61,594,664),9837=>array(158,18,444,710),9838=>array(211,21,391,710),9839=>array(152,21,450,710),10178=>array(43,0,559,627),10181=>array(103,-163,472,769),10182=>array(62,-163,508,769),10208=>array(57,-233,545,807),10214=>array(59,-132,544,760),10215=>array(58,-132,543,760),10216=>array(190,-132,498,759),10217=>array(104,-132,412,759),10731=>array(57,-233,545,807),10746=>array(43,55,559,572),10747=>array(43,55,559,572),10799=>array(73,85,529,541),10858=>array(43,243,559,564),10859=>array(43,65,559,564),11013=>array(41,190,561,494),11014=>array(149,82,453,602),11015=>array(149,82,453,602),11016=>array(68,109,485,526),11017=>array(117,109,534,526),11018=>array(117,109,534,526),11019=>array(68,109,485,526),11020=>array(41,190,561,494),11021=>array(149,82,453,602),11026=>array(3,-39,599,558),11027=>array(3,-39,599,558),11028=>array(3,-39,599,558),11029=>array(3,-39,599,558),11030=>array(3,-39,599,558),11031=>array(3,-39,599,558),11032=>array(3,-39,599,558),11033=>array(3,-39,599,558),11034=>array(3,-39,599,558),11364=>array(-4,-213,563,729),11373=>array(37,-14,611,742),11374=>array(-29,-208,630,729),11375=>array(89,0,655,729),11376=>array(-19,-14,555,742),11381=>array(-4,0,548,729),11382=>array(42,0,522,547),11383=>array(38,-12,566,551),11385=>array(6,-13,502,760),11386=>array(67,-14,535,560),11388=>array(185,-125,417,418),11389=>array(168,326,513,734),11390=>array(12,-242,560,742),11391=>array(-3,-242,622,729),11800=>array(73,-13,457,729),11807=>array(43,65,559,384),11810=>array(216,314,510,760),11811=>array(232,314,453,760),11812=>array(129,-132,350,314),11813=>array(72,-132,366,314),11822=>array(145,0,557,742),42760=>array(199,0,521,668),42761=>array(169,0,521,668),42762=>array(140,0,521,668),42763=>array(111,0,521,668),42764=>array(82,0,521,668),42765=>array(82,0,521,668),42766=>array(82,0,491,668),42767=>array(82,0,462,668),42768=>array(82,0,433,668),42769=>array(82,0,403,668),42770=>array(82,0,521,668),42771=>array(82,0,491,668),42772=>array(82,0,462,668),42773=>array(82,0,433,668),42774=>array(82,0,403,668),42779=>array(185,326,455,736),42780=>array(147,324,417,734),42781=>array(230,326,372,734),42782=>array(230,326,372,734),42783=>array(167,0,308,408),42786=>array(120,0,488,729),42787=>array(150,0,466,547),42788=>array(113,224,544,742),42789=>array(113,42,544,560),42790=>array(-4,-208,606,729),42791=>array(41,-208,535,760),42889=>array(168,0,392,518),42890=>array(169,161,433,380),42891=>array(237,235,422,729),42892=>array(231,458,369,729),42893=>array(82,0,604,729),42894=>array(80,-208,455,765),42896=>array(-5,-157,603,729),42897=>array(20,-140,521,560),42922=>array(41,0,704,729),63173=>array(47,-14,576,760),64257=>array(48,0,613,760),64258=>array(48,0,613,760),65533=>array(-16,-84,601,887),65535=>array(51,-177,551,705)); -$cw=array(0=>602,32=>602,33=>602,34=>602,35=>602,36=>602,37=>602,38=>602,39=>602,40=>602,41=>602,42=>602,43=>602,44=>602,45=>602,46=>602,47=>602,48=>602,49=>602,50=>602,51=>602,52=>602,53=>602,54=>602,55=>602,56=>602,57=>602,58=>602,59=>602,60=>602,61=>602,62=>602,63=>602,64=>602,65=>602,66=>602,67=>602,68=>602,69=>602,70=>602,71=>602,72=>602,73=>602,74=>602,75=>602,76=>602,77=>602,78=>602,79=>602,80=>602,81=>602,82=>602,83=>602,84=>602,85=>602,86=>602,87=>602,88=>602,89=>602,90=>602,91=>602,92=>602,93=>602,94=>602,95=>602,96=>602,97=>602,98=>602,99=>602,100=>602,101=>602,102=>602,103=>602,104=>602,105=>602,106=>602,107=>602,108=>602,109=>602,110=>602,111=>602,112=>602,113=>602,114=>602,115=>602,116=>602,117=>602,118=>602,119=>602,120=>602,121=>602,122=>602,123=>602,124=>602,125=>602,126=>602,160=>602,161=>602,162=>602,163=>602,164=>602,165=>602,166=>602,167=>602,168=>602,169=>602,170=>602,171=>602,172=>602,173=>602,174=>602,175=>602,176=>602,177=>602,178=>602,179=>602,180=>602,181=>602,182=>602,183=>602,184=>602,185=>602,186=>602,187=>602,188=>602,189=>602,190=>602,191=>602,192=>602,193=>602,194=>602,195=>602,196=>602,197=>602,198=>602,199=>602,200=>602,201=>602,202=>602,203=>602,204=>602,205=>602,206=>602,207=>602,208=>602,209=>602,210=>602,211=>602,212=>602,213=>602,214=>602,215=>602,216=>602,217=>602,218=>602,219=>602,220=>602,221=>602,222=>602,223=>602,224=>602,225=>602,226=>602,227=>602,228=>602,229=>602,230=>602,231=>602,232=>602,233=>602,234=>602,235=>602,236=>602,237=>602,238=>602,239=>602,240=>602,241=>602,242=>602,243=>602,244=>602,245=>602,246=>602,247=>602,248=>602,249=>602,250=>602,251=>602,252=>602,253=>602,254=>602,255=>602,256=>602,257=>602,258=>602,259=>602,260=>602,261=>602,262=>602,263=>602,264=>602,265=>602,266=>602,267=>602,268=>602,269=>602,270=>602,271=>602,272=>602,273=>602,274=>602,275=>602,276=>602,277=>602,278=>602,279=>602,280=>602,281=>602,282=>602,283=>602,284=>602,285=>602,286=>602,287=>602,288=>602,289=>602,290=>602,291=>602,292=>602,293=>602,294=>602,295=>602,296=>602,297=>602,298=>602,299=>602,300=>602,301=>602,302=>602,303=>602,304=>602,305=>602,306=>602,307=>602,308=>602,309=>602,310=>602,311=>602,312=>602,313=>602,314=>602,315=>602,316=>602,317=>602,318=>602,319=>602,320=>602,321=>602,322=>602,323=>602,324=>602,325=>602,326=>602,327=>602,328=>602,329=>602,330=>602,331=>602,332=>602,333=>602,334=>602,335=>602,336=>602,337=>602,338=>602,339=>602,340=>602,341=>602,342=>602,343=>602,344=>602,345=>602,346=>602,347=>602,348=>602,349=>602,350=>602,351=>602,352=>602,353=>602,354=>602,355=>602,356=>602,357=>602,358=>602,359=>602,360=>602,361=>602,362=>602,363=>602,364=>602,365=>602,366=>602,367=>602,368=>602,369=>602,370=>602,371=>602,372=>602,373=>602,374=>602,375=>602,376=>602,377=>602,378=>602,379=>602,380=>602,381=>602,382=>602,383=>602,384=>602,385=>602,386=>602,387=>602,388=>602,389=>602,390=>602,391=>602,392=>602,393=>602,394=>602,395=>602,396=>602,397=>602,398=>602,399=>602,400=>602,401=>602,402=>602,403=>602,404=>602,405=>602,406=>602,407=>602,408=>602,409=>602,410=>602,411=>602,412=>602,413=>602,414=>602,415=>602,416=>602,417=>602,418=>602,419=>602,420=>602,421=>602,422=>602,423=>602,424=>602,425=>602,426=>602,427=>602,428=>602,429=>602,430=>602,431=>602,432=>602,433=>602,434=>602,435=>602,436=>602,437=>602,438=>602,439=>602,440=>602,441=>602,442=>602,443=>602,444=>602,445=>602,446=>602,447=>602,448=>602,449=>602,450=>602,451=>602,461=>602,462=>602,463=>602,464=>602,465=>602,466=>602,467=>602,468=>602,469=>602,470=>602,471=>602,472=>602,473=>602,474=>602,475=>602,476=>602,477=>602,479=>602,480=>602,481=>602,482=>602,483=>602,486=>602,487=>602,488=>602,489=>602,490=>602,491=>602,492=>602,493=>602,494=>602,495=>602,500=>602,501=>602,502=>602,504=>602,505=>602,508=>602,509=>602,510=>602,511=>602,512=>602,513=>602,514=>602,515=>602,516=>602,517=>602,518=>602,519=>602,520=>602,521=>602,522=>602,523=>602,524=>602,525=>602,526=>602,527=>602,528=>602,529=>602,530=>602,531=>602,532=>602,533=>602,534=>602,535=>602,536=>602,537=>602,538=>602,539=>602,540=>602,541=>602,542=>602,543=>602,545=>602,548=>602,549=>602,550=>602,551=>602,552=>602,553=>602,554=>602,555=>602,556=>602,557=>602,558=>602,559=>602,560=>602,561=>602,562=>602,563=>602,564=>602,565=>602,566=>602,567=>602,568=>602,569=>602,570=>602,571=>602,572=>602,573=>602,574=>602,575=>602,576=>602,577=>602,579=>602,580=>602,581=>602,588=>602,589=>602,592=>602,593=>602,594=>602,595=>602,596=>602,597=>602,598=>602,599=>602,600=>602,601=>602,602=>602,603=>602,604=>602,605=>602,606=>602,607=>602,608=>602,609=>602,610=>602,611=>602,612=>602,613=>602,614=>602,615=>602,616=>602,617=>602,618=>602,619=>602,620=>602,621=>602,622=>602,623=>602,624=>602,625=>602,626=>602,627=>602,628=>602,629=>602,630=>602,631=>602,632=>602,633=>602,634=>602,635=>602,636=>602,637=>602,638=>602,639=>602,640=>602,641=>602,642=>602,643=>602,644=>602,645=>602,646=>602,647=>602,648=>602,649=>602,650=>602,651=>602,652=>602,653=>602,654=>602,655=>602,656=>602,657=>602,658=>602,659=>602,660=>602,661=>602,662=>602,663=>602,664=>602,665=>602,666=>602,667=>602,668=>602,669=>602,670=>602,671=>602,672=>602,673=>602,674=>602,675=>602,676=>602,677=>602,678=>602,679=>602,680=>602,681=>602,682=>602,683=>602,684=>602,685=>602,686=>602,687=>602,688=>602,689=>602,690=>602,691=>602,692=>602,693=>602,694=>602,695=>602,696=>602,697=>602,699=>602,700=>602,701=>602,702=>602,703=>602,704=>602,705=>602,710=>602,711=>602,712=>602,713=>602,716=>602,717=>602,718=>602,719=>602,720=>602,721=>602,722=>602,723=>602,726=>602,727=>602,728=>602,729=>602,730=>602,731=>602,732=>602,733=>602,734=>602,736=>602,737=>602,738=>602,739=>602,740=>602,741=>602,742=>602,743=>602,744=>602,745=>602,750=>602,755=>602,768=>602,769=>602,770=>602,771=>602,772=>602,773=>602,774=>602,775=>602,776=>602,777=>602,778=>602,779=>602,780=>602,781=>602,782=>602,783=>602,784=>602,785=>602,786=>602,787=>602,788=>602,789=>602,790=>602,791=>602,792=>602,793=>602,794=>602,795=>602,796=>602,797=>602,798=>602,799=>602,800=>602,801=>602,802=>602,803=>602,804=>602,805=>602,806=>602,807=>602,808=>602,809=>602,810=>602,811=>602,812=>602,813=>602,814=>602,815=>602,816=>602,817=>602,818=>602,819=>602,820=>602,821=>602,822=>602,823=>602,824=>602,825=>602,826=>602,827=>602,828=>602,829=>602,830=>602,831=>602,835=>602,856=>602,865=>602,884=>602,885=>602,890=>602,894=>602,900=>602,901=>602,902=>602,903=>602,904=>602,905=>602,906=>602,908=>602,910=>602,911=>602,912=>602,913=>602,914=>602,915=>602,916=>602,917=>602,918=>602,919=>602,920=>602,921=>602,922=>602,923=>602,924=>602,925=>602,926=>602,927=>602,928=>602,929=>602,931=>602,932=>602,933=>602,934=>602,935=>602,936=>602,937=>602,938=>602,939=>602,940=>602,941=>602,942=>602,943=>602,944=>602,945=>602,946=>602,947=>602,948=>602,949=>602,950=>602,951=>602,952=>602,953=>602,954=>602,955=>602,956=>602,957=>602,958=>602,959=>602,960=>602,961=>602,962=>602,963=>602,964=>602,965=>602,966=>602,967=>602,968=>602,969=>602,970=>602,971=>602,972=>602,973=>602,974=>602,976=>602,977=>602,978=>602,979=>602,980=>602,981=>602,982=>602,983=>602,984=>602,985=>602,986=>602,987=>602,988=>602,989=>602,990=>602,991=>602,992=>602,993=>602,1008=>602,1009=>602,1010=>602,1011=>602,1012=>602,1013=>602,1014=>602,1015=>602,1016=>602,1017=>602,1018=>602,1019=>602,1020=>602,1021=>602,1022=>602,1023=>602,1024=>602,1025=>602,1026=>602,1027=>602,1028=>602,1029=>602,1030=>602,1031=>602,1032=>602,1033=>602,1034=>602,1035=>602,1036=>602,1037=>602,1038=>602,1039=>602,1040=>602,1041=>602,1042=>602,1043=>602,1044=>602,1045=>602,1046=>602,1047=>602,1048=>602,1049=>602,1050=>602,1051=>602,1052=>602,1053=>602,1054=>602,1055=>602,1056=>602,1057=>602,1058=>602,1059=>602,1060=>602,1061=>602,1062=>602,1063=>602,1064=>602,1065=>602,1066=>602,1067=>602,1068=>602,1069=>602,1070=>602,1071=>602,1072=>602,1073=>602,1074=>602,1075=>602,1076=>602,1077=>602,1078=>602,1079=>602,1080=>602,1081=>602,1082=>602,1083=>602,1084=>602,1085=>602,1086=>602,1087=>602,1088=>602,1089=>602,1090=>602,1091=>602,1092=>602,1093=>602,1094=>602,1095=>602,1096=>602,1097=>602,1098=>602,1099=>602,1100=>602,1101=>602,1102=>602,1103=>602,1104=>602,1105=>602,1106=>602,1107=>602,1108=>602,1109=>602,1110=>602,1111=>602,1112=>602,1113=>602,1114=>602,1115=>602,1116=>602,1117=>602,1118=>602,1119=>602,1122=>602,1123=>602,1138=>602,1139=>602,1168=>602,1169=>602,1170=>602,1171=>602,1172=>602,1173=>602,1174=>602,1175=>602,1176=>602,1177=>602,1178=>602,1179=>602,1186=>602,1187=>602,1188=>602,1189=>602,1194=>602,1195=>602,1196=>602,1197=>602,1198=>602,1199=>602,1200=>602,1201=>602,1202=>602,1203=>602,1210=>602,1211=>602,1216=>602,1217=>602,1218=>602,1219=>602,1220=>602,1223=>602,1224=>602,1227=>602,1228=>602,1231=>602,1232=>602,1233=>602,1234=>602,1235=>602,1236=>602,1237=>602,1238=>602,1239=>602,1240=>602,1241=>602,1242=>602,1243=>602,1244=>602,1245=>602,1246=>602,1247=>602,1248=>602,1249=>602,1250=>602,1251=>602,1252=>602,1253=>602,1254=>602,1255=>602,1256=>602,1257=>602,1258=>602,1259=>602,1260=>602,1261=>602,1262=>602,1263=>602,1264=>602,1265=>602,1266=>602,1267=>602,1268=>602,1269=>602,1270=>602,1271=>602,1272=>602,1273=>602,1296=>602,1297=>602,1306=>602,1307=>602,1308=>602,1309=>602,1329=>602,1330=>602,1331=>602,1332=>602,1333=>602,1334=>602,1335=>602,1336=>602,1337=>602,1338=>602,1339=>602,1340=>602,1341=>602,1342=>602,1343=>602,1344=>602,1345=>602,1346=>602,1347=>602,1348=>602,1349=>602,1350=>602,1351=>602,1352=>602,1353=>602,1354=>602,1355=>602,1356=>602,1357=>602,1358=>602,1359=>602,1360=>602,1361=>602,1362=>602,1363=>602,1364=>602,1365=>602,1366=>602,1369=>602,1370=>602,1371=>602,1372=>602,1373=>602,1374=>602,1375=>602,1377=>602,1378=>602,1379=>602,1380=>602,1381=>602,1382=>602,1383=>602,1384=>602,1385=>602,1386=>602,1387=>602,1388=>602,1389=>602,1390=>602,1391=>602,1392=>602,1393=>602,1394=>602,1395=>602,1396=>602,1397=>602,1398=>602,1399=>602,1400=>602,1401=>602,1402=>602,1403=>602,1404=>602,1405=>602,1406=>602,1407=>602,1408=>602,1409=>602,1410=>602,1411=>602,1412=>602,1413=>602,1414=>602,1415=>602,1417=>602,1418=>602,3713=>602,3714=>602,3716=>602,3719=>602,3720=>602,3722=>602,3725=>602,3732=>602,3733=>602,3734=>602,3735=>602,3737=>602,3738=>602,3739=>602,3740=>602,3741=>602,3742=>602,3743=>602,3745=>602,3746=>602,3747=>602,3749=>602,3751=>602,3754=>602,3755=>602,3757=>602,3758=>602,3759=>602,3760=>602,3761=>602,3762=>602,3763=>602,3764=>602,3765=>602,3766=>602,3767=>602,3768=>602,3769=>602,3771=>602,3772=>602,3784=>602,3785=>602,3786=>602,3787=>602,3788=>602,3789=>602,4304=>602,4305=>602,4306=>602,4307=>602,4308=>602,4309=>602,4310=>602,4311=>602,4312=>602,4313=>602,4314=>602,4315=>602,4316=>602,4317=>602,4318=>602,4319=>602,4320=>602,4321=>602,4322=>602,4323=>602,4324=>602,4325=>602,4326=>602,4327=>602,4328=>602,4329=>602,4330=>602,4331=>602,4332=>602,4333=>602,4334=>602,4335=>602,4336=>602,4337=>602,4338=>602,4339=>602,4340=>602,4341=>602,4342=>602,4343=>602,4344=>602,4345=>602,4346=>602,4347=>602,4348=>602,7426=>602,7432=>602,7433=>602,7444=>602,7446=>602,7447=>602,7453=>602,7454=>602,7455=>602,7468=>602,7469=>602,7470=>602,7472=>602,7473=>602,7474=>602,7475=>602,7476=>602,7477=>602,7478=>602,7479=>602,7480=>602,7481=>602,7482=>602,7483=>602,7484=>602,7485=>602,7486=>602,7487=>602,7488=>602,7489=>602,7490=>602,7491=>602,7492=>602,7493=>602,7494=>602,7495=>602,7496=>602,7497=>602,7498=>602,7499=>602,7500=>602,7501=>602,7502=>602,7503=>602,7504=>602,7505=>602,7506=>602,7507=>602,7508=>602,7509=>602,7510=>602,7511=>602,7512=>602,7513=>602,7514=>602,7515=>602,7522=>602,7523=>602,7524=>602,7525=>602,7543=>602,7544=>602,7547=>602,7557=>602,7579=>602,7580=>602,7581=>602,7582=>602,7583=>602,7584=>602,7585=>602,7586=>602,7587=>602,7588=>602,7589=>602,7590=>602,7591=>602,7592=>602,7593=>602,7594=>602,7595=>602,7596=>602,7597=>602,7598=>602,7599=>602,7600=>602,7601=>602,7602=>602,7603=>602,7604=>602,7605=>602,7606=>602,7607=>602,7609=>602,7610=>602,7611=>602,7612=>602,7613=>602,7614=>602,7615=>602,7680=>602,7681=>602,7682=>602,7683=>602,7684=>602,7685=>602,7686=>602,7687=>602,7688=>602,7689=>602,7690=>602,7691=>602,7692=>602,7693=>602,7694=>602,7695=>602,7696=>602,7697=>602,7698=>602,7699=>602,7704=>602,7705=>602,7706=>602,7707=>602,7708=>602,7709=>602,7710=>602,7711=>602,7712=>602,7713=>602,7714=>602,7715=>602,7716=>602,7717=>602,7718=>602,7719=>602,7720=>602,7721=>602,7722=>602,7723=>602,7724=>602,7725=>602,7728=>602,7729=>602,7730=>602,7731=>602,7732=>602,7733=>602,7734=>602,7735=>602,7736=>602,7737=>602,7738=>602,7739=>602,7740=>602,7741=>602,7742=>602,7743=>602,7744=>602,7745=>602,7746=>602,7747=>602,7748=>602,7749=>602,7750=>602,7751=>602,7752=>602,7753=>602,7754=>602,7755=>602,7756=>602,7757=>602,7764=>602,7765=>602,7766=>602,7767=>602,7768=>602,7769=>602,7770=>602,7771=>602,7772=>602,7773=>602,7774=>602,7775=>602,7776=>602,7777=>602,7778=>602,7779=>602,7784=>602,7785=>602,7786=>602,7787=>602,7788=>602,7789=>602,7790=>602,7791=>602,7792=>602,7793=>602,7794=>602,7795=>602,7796=>602,7797=>602,7798=>602,7799=>602,7800=>602,7801=>602,7804=>602,7805=>602,7806=>602,7807=>602,7808=>602,7809=>602,7810=>602,7811=>602,7812=>602,7813=>602,7814=>602,7815=>602,7816=>602,7817=>602,7818=>602,7819=>602,7820=>602,7821=>602,7822=>602,7823=>602,7824=>602,7825=>602,7826=>602,7827=>602,7828=>602,7829=>602,7830=>602,7831=>602,7832=>602,7833=>602,7835=>602,7839=>602,7840=>602,7841=>602,7852=>602,7853=>602,7856=>602,7857=>602,7862=>602,7863=>602,7864=>602,7865=>602,7868=>602,7869=>602,7878=>602,7879=>602,7882=>602,7883=>602,7884=>602,7885=>602,7896=>602,7897=>602,7898=>602,7899=>602,7900=>602,7901=>602,7904=>602,7905=>602,7906=>602,7907=>602,7908=>602,7909=>602,7912=>602,7913=>602,7914=>602,7915=>602,7918=>602,7919=>602,7920=>602,7921=>602,7922=>602,7923=>602,7924=>602,7925=>602,7928=>602,7929=>602,7936=>602,7937=>602,7938=>602,7939=>602,7940=>602,7941=>602,7942=>602,7943=>602,7944=>602,7945=>602,7946=>602,7947=>602,7948=>602,7949=>602,7950=>602,7951=>602,7952=>602,7953=>602,7954=>602,7955=>602,7956=>602,7957=>602,7960=>602,7961=>602,7962=>602,7963=>602,7964=>602,7965=>602,7968=>602,7969=>602,7970=>602,7971=>602,7972=>602,7973=>602,7974=>602,7975=>602,7976=>602,7977=>602,7978=>602,7979=>602,7980=>602,7981=>602,7982=>602,7983=>602,7984=>602,7985=>602,7986=>602,7987=>602,7988=>602,7989=>602,7990=>602,7991=>602,7992=>602,7993=>602,7994=>602,7995=>602,7996=>602,7997=>602,7998=>602,7999=>602,8000=>602,8001=>602,8002=>602,8003=>602,8004=>602,8005=>602,8008=>602,8009=>602,8010=>602,8011=>602,8012=>602,8013=>602,8016=>602,8017=>602,8018=>602,8019=>602,8020=>602,8021=>602,8022=>602,8023=>602,8025=>602,8027=>602,8029=>602,8031=>602,8032=>602,8033=>602,8034=>602,8035=>602,8036=>602,8037=>602,8038=>602,8039=>602,8040=>602,8041=>602,8042=>602,8043=>602,8044=>602,8045=>602,8046=>602,8047=>602,8048=>602,8049=>602,8050=>602,8051=>602,8052=>602,8053=>602,8054=>602,8055=>602,8056=>602,8057=>602,8058=>602,8059=>602,8060=>602,8061=>602,8064=>602,8065=>602,8066=>602,8067=>602,8068=>602,8069=>602,8070=>602,8071=>602,8072=>602,8073=>602,8074=>602,8075=>602,8076=>602,8077=>602,8078=>602,8079=>602,8080=>602,8081=>602,8082=>602,8083=>602,8084=>602,8085=>602,8086=>602,8087=>602,8088=>602,8089=>602,8090=>602,8091=>602,8092=>602,8093=>602,8094=>602,8095=>602,8096=>602,8097=>602,8098=>602,8099=>602,8100=>602,8101=>602,8102=>602,8103=>602,8104=>602,8105=>602,8106=>602,8107=>602,8108=>602,8109=>602,8110=>602,8111=>602,8112=>602,8113=>602,8114=>602,8115=>602,8116=>602,8118=>602,8119=>602,8120=>602,8121=>602,8122=>602,8123=>602,8124=>602,8125=>602,8126=>602,8127=>602,8128=>602,8129=>602,8130=>602,8131=>602,8132=>602,8134=>602,8135=>602,8136=>602,8137=>602,8138=>602,8139=>602,8140=>602,8141=>602,8142=>602,8143=>602,8144=>602,8145=>602,8146=>602,8147=>602,8150=>602,8151=>602,8152=>602,8153=>602,8154=>602,8155=>602,8157=>602,8158=>602,8159=>602,8160=>602,8161=>602,8162=>602,8163=>602,8164=>602,8165=>602,8166=>602,8167=>602,8168=>602,8169=>602,8170=>602,8171=>602,8172=>602,8173=>602,8174=>602,8175=>602,8178=>602,8179=>602,8180=>602,8182=>602,8183=>602,8184=>602,8185=>602,8186=>602,8187=>602,8188=>602,8189=>602,8190=>602,8192=>602,8193=>602,8194=>602,8195=>602,8196=>602,8197=>602,8198=>602,8199=>602,8200=>602,8201=>602,8202=>602,8208=>602,8209=>602,8210=>602,8211=>602,8212=>602,8213=>602,8214=>602,8215=>602,8216=>602,8217=>602,8218=>602,8219=>602,8220=>602,8221=>602,8222=>602,8223=>602,8224=>602,8225=>602,8226=>602,8227=>602,8230=>602,8239=>602,8240=>602,8241=>602,8242=>602,8243=>602,8244=>602,8245=>602,8246=>602,8247=>602,8249=>602,8250=>602,8252=>602,8253=>602,8254=>602,8261=>602,8262=>602,8263=>602,8264=>602,8265=>602,8267=>602,8287=>602,8304=>602,8305=>602,8308=>602,8309=>602,8310=>602,8311=>602,8312=>602,8313=>602,8314=>602,8315=>602,8316=>602,8317=>602,8318=>602,8319=>602,8320=>602,8321=>602,8322=>602,8323=>602,8324=>602,8325=>602,8326=>602,8327=>602,8328=>602,8329=>602,8330=>602,8331=>602,8332=>602,8333=>602,8334=>602,8336=>602,8337=>602,8338=>602,8339=>602,8340=>602,8341=>602,8342=>602,8343=>602,8344=>602,8345=>602,8346=>602,8347=>602,8348=>602,8352=>602,8353=>602,8354=>602,8355=>602,8356=>602,8357=>602,8358=>602,8359=>602,8360=>602,8361=>602,8362=>602,8363=>602,8364=>602,8365=>602,8366=>602,8367=>602,8368=>602,8369=>602,8370=>602,8371=>602,8372=>602,8373=>602,8376=>602,8377=>602,8450=>602,8453=>602,8461=>602,8462=>602,8463=>602,8469=>602,8470=>602,8471=>602,8473=>602,8474=>602,8477=>602,8482=>602,8484=>602,8486=>602,8490=>602,8491=>602,8494=>602,8520=>602,8531=>602,8532=>602,8533=>602,8534=>602,8535=>602,8536=>602,8537=>602,8538=>602,8539=>602,8540=>602,8541=>602,8542=>602,8543=>602,8592=>602,8593=>602,8594=>602,8595=>602,8596=>602,8597=>602,8598=>602,8599=>602,8600=>602,8601=>602,8602=>602,8603=>602,8604=>602,8605=>602,8606=>602,8607=>602,8608=>602,8609=>602,8610=>602,8611=>602,8612=>602,8613=>602,8614=>602,8615=>602,8616=>602,8617=>602,8618=>602,8619=>602,8620=>602,8621=>602,8622=>602,8623=>602,8624=>602,8625=>602,8626=>602,8627=>602,8628=>602,8629=>602,8630=>602,8631=>602,8632=>602,8633=>602,8634=>602,8635=>602,8636=>602,8637=>602,8638=>602,8639=>602,8640=>602,8641=>602,8642=>602,8643=>602,8644=>602,8645=>602,8646=>602,8647=>602,8648=>602,8649=>602,8650=>602,8651=>602,8652=>602,8653=>602,8654=>602,8655=>602,8656=>602,8657=>602,8658=>602,8659=>602,8660=>602,8661=>602,8662=>602,8663=>602,8664=>602,8665=>602,8666=>602,8667=>602,8668=>602,8669=>602,8670=>602,8671=>602,8672=>602,8673=>602,8674=>602,8675=>602,8676=>602,8677=>602,8678=>602,8679=>602,8680=>602,8681=>602,8682=>602,8683=>602,8684=>602,8685=>602,8686=>602,8687=>602,8688=>602,8689=>602,8690=>602,8691=>602,8692=>602,8693=>602,8694=>602,8695=>602,8696=>602,8697=>602,8698=>602,8699=>602,8700=>602,8701=>602,8702=>602,8703=>602,8704=>602,8705=>602,8706=>602,8707=>602,8708=>602,8709=>602,8710=>602,8711=>602,8712=>602,8713=>602,8714=>602,8715=>602,8716=>602,8717=>602,8719=>602,8721=>602,8722=>602,8723=>602,8725=>602,8727=>602,8728=>602,8729=>602,8730=>602,8731=>602,8732=>602,8733=>602,8734=>602,8735=>602,8736=>602,8743=>602,8744=>602,8745=>602,8746=>602,8747=>602,8748=>602,8749=>602,8756=>602,8757=>602,8758=>602,8759=>602,8760=>602,8761=>602,8762=>602,8763=>602,8764=>602,8765=>602,8769=>602,8770=>602,8771=>602,8772=>602,8773=>602,8774=>602,8775=>602,8776=>602,8777=>602,8778=>602,8779=>602,8780=>602,8781=>602,8782=>602,8783=>602,8784=>602,8785=>602,8786=>602,8787=>602,8788=>602,8789=>602,8790=>602,8791=>602,8792=>602,8793=>602,8794=>602,8795=>602,8796=>602,8797=>602,8798=>602,8799=>602,8800=>602,8801=>602,8802=>602,8803=>602,8804=>602,8805=>602,8806=>602,8807=>602,8808=>602,8809=>602,8813=>602,8814=>602,8815=>602,8816=>602,8817=>602,8818=>602,8819=>602,8820=>602,8821=>602,8822=>602,8823=>602,8824=>602,8825=>602,8826=>602,8827=>602,8828=>602,8829=>602,8830=>602,8831=>602,8832=>602,8833=>602,8834=>602,8835=>602,8836=>602,8837=>602,8838=>602,8839=>602,8840=>602,8841=>602,8842=>602,8843=>602,8847=>602,8848=>602,8849=>602,8850=>602,8853=>602,8854=>602,8855=>602,8856=>602,8857=>602,8858=>602,8859=>602,8860=>602,8861=>602,8862=>602,8863=>602,8864=>602,8865=>602,8866=>602,8867=>602,8868=>602,8869=>602,8901=>602,8902=>602,8909=>602,8922=>602,8923=>602,8924=>602,8925=>602,8926=>602,8927=>602,8928=>602,8929=>602,8930=>602,8931=>602,8932=>602,8933=>602,8934=>602,8935=>602,8936=>602,8937=>602,8943=>602,8960=>602,8961=>602,8962=>602,8963=>602,8964=>602,8965=>602,8966=>602,8968=>602,8969=>602,8970=>602,8971=>602,8972=>602,8973=>602,8974=>602,8975=>602,8976=>602,8977=>602,8978=>602,8979=>602,8980=>602,8981=>602,8984=>602,8985=>602,8988=>602,8989=>602,8990=>602,8991=>602,8992=>602,8993=>602,8997=>602,8998=>602,8999=>602,9000=>602,9003=>602,9013=>602,9015=>602,9016=>602,9017=>602,9018=>602,9019=>602,9020=>602,9021=>602,9022=>602,9025=>602,9026=>602,9027=>602,9028=>602,9031=>602,9032=>602,9033=>602,9035=>602,9036=>602,9037=>602,9040=>602,9042=>602,9043=>602,9044=>602,9047=>602,9048=>602,9049=>602,9050=>602,9051=>602,9052=>602,9054=>602,9055=>602,9056=>602,9059=>602,9060=>602,9061=>602,9064=>602,9065=>602,9067=>602,9068=>602,9069=>602,9070=>602,9071=>602,9072=>602,9075=>602,9076=>602,9077=>602,9078=>602,9079=>602,9080=>602,9081=>602,9082=>602,9085=>602,9088=>602,9089=>602,9090=>602,9091=>602,9096=>602,9097=>602,9098=>602,9099=>602,9109=>602,9115=>602,9116=>602,9117=>602,9118=>602,9119=>602,9120=>602,9121=>602,9122=>602,9123=>602,9124=>602,9125=>602,9126=>602,9127=>602,9128=>602,9129=>602,9130=>602,9131=>602,9132=>602,9133=>602,9134=>602,9166=>602,9167=>602,9251=>602,9472=>602,9473=>602,9474=>602,9475=>602,9476=>602,9477=>602,9478=>602,9479=>602,9480=>602,9481=>602,9482=>602,9483=>602,9484=>602,9485=>602,9486=>602,9487=>602,9488=>602,9489=>602,9490=>602,9491=>602,9492=>602,9493=>602,9494=>602,9495=>602,9496=>602,9497=>602,9498=>602,9499=>602,9500=>602,9501=>602,9502=>602,9503=>602,9504=>602,9505=>602,9506=>602,9507=>602,9508=>602,9509=>602,9510=>602,9511=>602,9512=>602,9513=>602,9514=>602,9515=>602,9516=>602,9517=>602,9518=>602,9519=>602,9520=>602,9521=>602,9522=>602,9523=>602,9524=>602,9525=>602,9526=>602,9527=>602,9528=>602,9529=>602,9530=>602,9531=>602,9532=>602,9533=>602,9534=>602,9535=>602,9536=>602,9537=>602,9538=>602,9539=>602,9540=>602,9541=>602,9542=>602,9543=>602,9544=>602,9545=>602,9546=>602,9547=>602,9548=>602,9549=>602,9550=>602,9551=>602,9552=>602,9553=>602,9554=>602,9555=>602,9556=>602,9557=>602,9558=>602,9559=>602,9560=>602,9561=>602,9562=>602,9563=>602,9564=>602,9565=>602,9566=>602,9567=>602,9568=>602,9569=>602,9570=>602,9571=>602,9572=>602,9573=>602,9574=>602,9575=>602,9576=>602,9577=>602,9578=>602,9579=>602,9580=>602,9581=>602,9582=>602,9583=>602,9584=>602,9585=>602,9586=>602,9587=>602,9588=>602,9589=>602,9590=>602,9591=>602,9592=>602,9593=>602,9594=>602,9595=>602,9596=>602,9597=>602,9598=>602,9599=>602,9600=>602,9601=>602,9602=>602,9603=>602,9604=>602,9605=>602,9606=>602,9607=>602,9608=>602,9609=>602,9610=>602,9611=>602,9612=>602,9613=>602,9614=>602,9615=>602,9616=>602,9617=>602,9618=>602,9619=>602,9620=>602,9621=>602,9622=>602,9623=>602,9624=>602,9625=>602,9626=>602,9627=>602,9628=>602,9629=>602,9630=>602,9631=>602,9632=>602,9633=>602,9634=>602,9635=>602,9636=>602,9637=>602,9638=>602,9639=>602,9640=>602,9641=>602,9642=>602,9643=>602,9644=>602,9645=>602,9646=>602,9647=>602,9648=>602,9649=>602,9650=>602,9651=>602,9652=>602,9653=>602,9654=>602,9655=>602,9656=>602,9657=>602,9658=>602,9659=>602,9660=>602,9661=>602,9662=>602,9663=>602,9664=>602,9665=>602,9666=>602,9667=>602,9668=>602,9669=>602,9670=>602,9671=>602,9672=>602,9673=>602,9674=>602,9675=>602,9676=>602,9677=>602,9678=>602,9679=>602,9680=>602,9681=>602,9682=>602,9683=>602,9684=>602,9685=>602,9686=>602,9687=>602,9688=>602,9689=>602,9690=>602,9691=>602,9692=>602,9693=>602,9694=>602,9695=>602,9696=>602,9697=>602,9698=>602,9699=>602,9700=>602,9701=>602,9702=>602,9703=>602,9704=>602,9705=>602,9706=>602,9707=>602,9708=>602,9709=>602,9710=>602,9711=>602,9712=>602,9713=>602,9714=>602,9715=>602,9716=>602,9717=>602,9718=>602,9719=>602,9720=>602,9721=>602,9722=>602,9723=>602,9724=>602,9725=>602,9726=>602,9727=>602,9728=>602,9784=>602,9785=>602,9786=>602,9787=>602,9788=>602,9791=>602,9792=>602,9793=>602,9794=>602,9795=>602,9796=>602,9797=>602,9798=>602,9799=>602,9824=>602,9825=>602,9826=>602,9827=>602,9828=>602,9829=>602,9830=>602,9831=>602,9833=>602,9834=>602,9835=>602,9836=>602,9837=>602,9838=>602,9839=>602,10178=>602,10181=>602,10182=>602,10208=>602,10214=>602,10215=>602,10216=>602,10217=>602,10731=>602,10746=>602,10747=>602,10799=>602,10858=>602,10859=>602,11013=>602,11014=>602,11015=>602,11016=>602,11017=>602,11018=>602,11019=>602,11020=>602,11021=>602,11026=>602,11027=>602,11028=>602,11029=>602,11030=>602,11031=>602,11032=>602,11033=>602,11034=>602,11364=>602,11373=>602,11374=>602,11375=>602,11376=>602,11381=>602,11382=>602,11383=>602,11385=>602,11386=>602,11388=>602,11389=>602,11390=>602,11391=>602,11800=>602,11807=>602,11810=>602,11811=>602,11812=>602,11813=>602,11822=>602,42760=>602,42761=>602,42762=>602,42763=>602,42764=>602,42765=>602,42766=>602,42767=>602,42768=>602,42769=>602,42770=>602,42771=>602,42772=>602,42773=>602,42774=>602,42779=>602,42780=>602,42781=>602,42782=>602,42783=>602,42786=>602,42787=>602,42788=>602,42789=>602,42790=>602,42791=>602,42889=>602,42890=>602,42891=>602,42892=>602,42893=>602,42894=>602,42896=>602,42897=>602,42922=>602,63173=>602,64257=>602,64258=>602,65529=>602,65530=>602,65531=>602,65532=>602,65533=>602,65535=>602); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/dejavusansmonoi.z b/lib/combodo/tcpdf/fonts/dejavusansmonoi.z deleted file mode 100644 index 14be5c14e..000000000 Binary files a/lib/combodo/tcpdf/fonts/dejavusansmonoi.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/droidsansfallback.ctg.z b/lib/combodo/tcpdf/fonts/droidsansfallback.ctg.z deleted file mode 100644 index c57166dbd..000000000 Binary files a/lib/combodo/tcpdf/fonts/droidsansfallback.ctg.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/droidsansfallback.php b/lib/combodo/tcpdf/fonts/droidsansfallback.php deleted file mode 100644 index 83b9bdd1c..000000000 --- a/lib/combodo/tcpdf/fonts/droidsansfallback.php +++ /dev/null @@ -1,2975 +0,0 @@ -1043,'Descent'=>-266,'CapHeight'=>0,'Flags'=>96,'FontBBox'=>'[-90 -266 1121 1043]','ItalicAngle'=>-6.5,'StemV'=>70,'MissingWidth'=>600); -$up=-78; -$ut=51; -$dw=600; -$cw=array( -0=>1000,32=>262,33=>270,34=>402,35=>645,36=>551,37=>824,38=>703,39=>227,40=>301, -41=>301,42=>551,43=>551,44=>250,45=>320,46=>270,47=>375,48=>551,49=>551,50=>551, -51=>551,52=>551,53=>551,54=>551,55=>551,56=>551,57=>551,58=>270,59=>270,60=>551, -61=>551,62=>551,63=>426,64=>867,65=>609,66=>621,67=>602,68=>684,69=>527,70=>492, -71=>691,72=>703,73=>340,74=>270,75=>578,76=>492,77=>871,78=>730,79=>742,80=>578, -81=>742,82=>590,83=>520,84=>520,85=>699,86=>566,87=>883,88=>547,89=>527,90=>539, -91=>305,92=>375,93=>305,94=>531,95=>410,96=>578,97=>531,98=>586,99=>465,100=>586, -101=>535,102=>328,103=>520,104=>590,105=>258,106=>258,107=>496,108=>258,109=>895,110=>590, -111=>578,112=>586,113=>586,114=>398,115=>453,116=>340,117=>590,118=>480,119=>746,120=>500, -121=>488,122=>441,123=>355,124=>551,125=>355,126=>551,8364=>551,8230=>805,8224=>484,8225=>496, -8240=>1168,338=>891,8216=>176,8217=>176,8220=>363,8221=>363,8211=>500,8212=>1000,8482=>1000,339=>910, -161=>270,728=>578,321=>492,164=>551,167=>484,168=>578,170=>332,358=>520,173=>320,174=>832, -175=>410,176=>430,177=>551,178=>332,179=>332,180=>578,182=>656,183=>270,184=>207,185=>332, -186=>352,188=>738,189=>738,190=>738,191=>426,1040=>609,1041=>574,1042=>621,1043=>492,1044=>648, -1045=>527,198=>852,1047=>547,1048=>730,1049=>730,1050=>578,1051=>668,1052=>871,1053=>703,1054=>742, -1055=>691,208=>684,1057=>602,1058=>520,1059=>586,1060=>766,1061=>547,1062=>699,215=>551,216=>742, -1065=>996,1066=>656,1067=>824,1068=>574,1069=>594,222=>578,223=>602,224=>531,225=>531,1074=>566, -1075=>398,1076=>547,1077=>535,230=>832,1079=>461,232=>535,233=>535,234=>535,1083=>547,236=>258, -237=>258,1086=>578,299=>258,240=>578,1089=>465,242=>578,243=>578,1092=>695,1093=>500,1094=>602, -247=>551,248=>578,249=>590,250=>590,1099=>750,252=>590,305=>258,254=>586,729=>258,257=>531, -273=>586,275=>535,283=>535,294=>703,295=>590,306=>609,307=>520,312=>496,319=>492,320=>301, -322=>258,329=>660,330=>730,331=>590,333=>578,359=>340,363=>590,711=>578,730=>578,731=>184, -733=>578,913=>609,914=>621,915=>492,916=>566,917=>527,918=>539,919=>703,920=>742,921=>340, -922=>578,923=>566,924=>871,925=>730,926=>531,927=>742,928=>691,929=>578,931=>531,932=>520, -933=>527,934=>766,935=>547,936=>766,937=>742,945=>586,946=>602,947=>488,948=>578,949=>453, -950=>453,951=>590,952=>566,953=>328,954=>496,955=>512,956=>594,957=>516,958=>445,959=>578, -960=>629,961=>578,963=>590,964=>449,965=>590,966=>699,967=>523,968=>738,969=>754,1025=>527, -1046=>816,1056=>578,1063=>660,1064=>996,1070=>1016,1071=>590,1072=>531,1073=>570,1078=>719,1080=>613, -1081=>613,1082=>492,1084=>719,1085=>613,1087=>594,1088=>586,1090=>441,1091=>488,1095=>586,1096=>867, -1097=>879,1098=>680,1100=>566,1101=>461,1102=>809,1103=>531,1105=>535,8213=>1000,8242=>227,8243=>402, -8453=>1000,8467=>1000,8470=>1000,8486=>742,8539=>738,8540=>738,8541=>738,8542=>738,8706=>1000,8719=>1000, -8721=>1000,8730=>1000,8734=>1000,8747=>500,8776=>1000,8800=>551,8804=>1000,8805=>1000,65281=>1000,65282=>1000, -65283=>1000,65284=>1000,65285=>1000,65286=>1000,65287=>1000,65288=>1000,65289=>1000,65290=>1000,65291=>1000,65292=>1000, -65293=>1000,65294=>1000,65295=>1000,65296=>1000,65297=>1000,65298=>1000,65299=>1000,65300=>1000,65301=>1000,65302=>1000, -65303=>1000,65304=>1000,65305=>1000,65306=>1000,65307=>1000,65308=>1000,65309=>1000,65310=>1000,65311=>1000,65312=>1000, -65313=>1000,65314=>1000,65315=>1000,65316=>1000,65317=>1000,65318=>1000,65319=>1000,65320=>1000,65321=>1000,65322=>1000, -65323=>1000,65324=>1000,65325=>1000,65326=>1000,65327=>1000,65328=>1000,65329=>1000,65330=>1000,65331=>1000,65332=>1000, -65333=>1000,65334=>1000,65335=>1000,65336=>1000,65337=>1000,65338=>1000,65339=>1000,65340=>1000,65341=>1000,65342=>1000, -65343=>1000,65344=>1000,65345=>1000,65346=>1000,65347=>1000,65348=>1000,65349=>1000,65350=>1000,65351=>1000,65352=>1000, -65353=>1000,65354=>1000,65355=>1000,65356=>1000,65357=>1000,65358=>1000,65359=>1000,65360=>1000,65361=>1000,65362=>1000, -65363=>1000,65364=>1000,65365=>1000,65366=>1000,65367=>1000,65368=>1000,65369=>1000,65370=>1000,65371=>1000,65372=>1000, -65373=>1000,65374=>1000,9312=>1000,9313=>1000,9314=>1000,9315=>1000,9316=>1000,9317=>1000,9318=>1000,9319=>1000, -9320=>1000,9321=>1000,9322=>1000,9323=>1000,9324=>1000,9325=>1000,9326=>1000,9327=>1000,9328=>1000,9329=>1000, -9330=>1000,9331=>1000,9332=>1000,9333=>1000,9334=>1000,9335=>1000,9336=>1000,9337=>1000,9338=>1000,9339=>1000, -9340=>1000,9341=>1000,9342=>1000,9343=>1000,9344=>1000,9345=>1000,9346=>1000,9347=>1000,9348=>1000,9349=>1000, -9350=>1000,9351=>1000,9352=>1000,9353=>1000,9354=>1000,9355=>1000,9356=>1000,9357=>1000,9358=>1000,9359=>1000, -9360=>1000,9361=>1000,9362=>1000,9363=>1000,9364=>1000,9365=>1000,9366=>1000,9367=>1000,9368=>1000,9369=>1000, -9370=>1000,9371=>1000,9372=>1000,9373=>1000,9374=>1000,9375=>1000,9376=>1000,9377=>1000,9378=>1000,9379=>1000, -9380=>1000,9381=>1000,9382=>1000,9383=>1000,9384=>1000,9385=>1000,9386=>1000,9387=>1000,9388=>1000,9389=>1000, -9390=>1000,9391=>1000,9392=>1000,9393=>1000,9394=>1000,9395=>1000,9396=>1000,9397=>1000,9424=>1000,9425=>1000, -9426=>1000,9427=>1000,9428=>1000,9429=>1000,9430=>1000,9431=>1000,9432=>1000,9433=>1000,9434=>1000,9435=>1000, -9436=>1000,9437=>1000,9438=>1000,9439=>1000,9440=>1000,9441=>1000,9442=>1000,9443=>1000,9444=>1000,9445=>1000, -9446=>1000,9447=>1000,9448=>1000,9449=>1000,8214=>512,8208=>320,8229=>535,8231=>270,9472=>602,9473=>602, -9474=>602,9475=>602,9476=>602,9477=>602,9478=>602,9479=>602,9480=>602,9481=>602,9482=>602,9483=>602, -9484=>602,9485=>602,9486=>602,9487=>602,9488=>602,9489=>602,9490=>602,9491=>602,9492=>602,9493=>602, -9494=>602,9495=>602,9496=>602,9497=>602,9498=>602,9499=>602,9500=>602,9501=>602,9502=>602,9503=>602, -9504=>602,9505=>602,9506=>602,9507=>602,9508=>602,9509=>602,9510=>602,9511=>602,9512=>602,9513=>602, -9514=>602,9515=>602,9516=>602,9517=>602,9518=>602,9519=>602,9520=>602,9521=>602,9522=>602,9523=>602, -9524=>602,9525=>602,9526=>602,9527=>602,9528=>602,9529=>602,9530=>602,9531=>602,9532=>602,9533=>602, -9534=>602,9535=>602,9536=>602,9537=>602,9538=>602,9539=>602,9540=>602,9541=>602,9542=>602,9543=>602, -9544=>602,9545=>602,9546=>602,9547=>602,9552=>602,9553=>602,9554=>602,9555=>602,9556=>602,9557=>602, -9558=>602,9559=>602,9560=>602,9561=>602,9562=>602,9563=>602,9564=>602,9565=>602,9566=>602,9567=>602, -9568=>602,9569=>602,9570=>602,9571=>602,9572=>602,9573=>602,9574=>602,9575=>602,9576=>602,9577=>602, -9578=>602,9579=>602,9580=>602,9581=>602,9582=>602,9583=>602,9584=>602,9585=>602,9586=>602,9587=>602, -9588=>602,9601=>602,9602=>602,9603=>602,9604=>602,9605=>602,9606=>602,9607=>602,9608=>602,9609=>602, -9610=>602,9611=>602,9612=>602,9613=>602,9614=>602,9615=>602,9618=>602,9619=>602,9620=>602,9621=>602, -9632=>602,9633=>602,9635=>602,9636=>602,9637=>602,9638=>602,9639=>602,9640=>602,9641=>602,9650=>602, -9651=>602,9654=>602,9655=>602,9660=>602,9661=>602,9664=>602,9665=>602,9670=>602,9671=>602,9672=>602, -9675=>602,9678=>602,9679=>602,9680=>602,9681=>602,9698=>602,9699=>602,9700=>602,9701=>602,9711=>602, -9733=>1000,9734=>1000,9742=>1000,9743=>1000,9756=>938,9758=>938,9792=>1000,9794=>1000,9824=>1000,9825=>1000, -9827=>1000,9828=>1000,9829=>1000,9831=>1000,9832=>1000,9833=>1000,9834=>1000,9836=>1000,9837=>1000,9839=>1000, -65104=>500,65106=>500,65108=>500,65109=>500,65110=>500,65111=>500,65113=>500,65114=>500,65115=>500,65116=>500, -65117=>500,65118=>500,65119=>500,65120=>500,65121=>500,65122=>500,65123=>500,65124=>500,65125=>500,65126=>500, -65128=>500,65129=>500,65130=>500,65131=>500,8245=>227,8308=>332,462=>531,464=>258,466=>578,468=>590, -470=>590,472=>590,474=>590,476=>590,720=>262,713=>559,714=>578,715=>578,717=>559,8251=>699, -8319=>367,8748=>1000,8750=>500,8756=>1000,8757=>1000,8758=>1000,8759=>1000,8764=>1000,8547=>1000,8321=>332, -8322=>332,8323=>332,8324=>332,8451=>1000,8457=>1000,8481=>1000,8491=>1000,8531=>738,8532=>738,8544=>1000, -8545=>1000,8546=>1000,8548=>1000,8549=>1000,8550=>1000,8551=>1000,8552=>1000,8553=>1000,8554=>1000,8555=>1000, -8560=>1000,8561=>1000,8562=>1000,8564=>1000,8569=>1000,8563=>1000,8565=>1000,8566=>1000,8567=>1000,8568=>1000, -65504=>1000,65505=>1000,65506=>1000,65508=>1000,65509=>1000,65507=>1000,8592=>1000,8593=>500,8594=>1000,8595=>500, -8596=>1000,8597=>500,8598=>1000,8599=>1000,8600=>1000,8601=>1000,8658=>1000,8660=>1000,8704=>1000,8707=>1000, -8711=>1000,8725=>1000,8733=>1000,8712=>1000,8715=>1000,8735=>1000,8736=>1000,8741=>500,8739=>500,8743=>1000, -8744=>1000,8745=>1000,8746=>1000,8765=>1000,8780=>1000,8786=>1000,8801=>1000,8806=>1000,8807=>1000,8810=>1000, -8811=>1000,8814=>1000,8815=>1000,8834=>1000,8835=>1000,8838=>1000,8839=>1000,8869=>1000,8895=>1000,8853=>1000, -8857=>1000,8978=>1000,65510=>1000,12288=>1000,12289=>1000,12290=>1000,12291=>1000,12293=>1000,12294=>1000,12295=>1000, -12296=>1000,12297=>1000,12298=>1000,12299=>1000,12300=>1000,12301=>1000,12302=>1000,12303=>1000,12304=>1000,12305=>1000, -12306=>1000,12307=>1000,12308=>1000,12309=>1000,12310=>1000,12311=>1000,12317=>1000,12318=>1000,12319=>1000,12321=>1000, -12322=>1000,12323=>1000,12324=>1000,12325=>1000,12326=>1000,12327=>1000,12328=>1000,12329=>1000,12353=>1000,12354=>1000, -12355=>1000,12356=>1000,12357=>1000,12358=>1000,12359=>1000,12360=>1000,12361=>1000,12362=>1000,12363=>1000,12364=>1000, -12365=>1000,12366=>1000,12367=>1000,12368=>1000,12369=>1000,12370=>1000,12371=>1000,12372=>1000,12373=>1000,12374=>1000, -12375=>1000,12376=>1000,12377=>1000,12378=>1000,12379=>1000,12380=>1000,12381=>1000,12382=>1000,12383=>1000,12384=>1000, -12385=>1000,12386=>1000,12387=>1000,12388=>1000,12389=>1000,12390=>1000,12391=>1000,12392=>1000,12393=>1000,12394=>1000, -12395=>1000,12396=>1000,12397=>1000,12398=>1000,12399=>1000,12400=>1000,12401=>1000,12402=>1000,12403=>1000,12404=>1000, -12405=>1000,12406=>1000,12407=>1000,12408=>1000,12409=>1000,12410=>1000,12411=>1000,12412=>1000,12413=>1000,12414=>1000, -12415=>1000,12416=>1000,12417=>1000,12418=>1000,12419=>1000,12420=>1000,12421=>1000,12422=>1000,12423=>1000,12424=>1000, -12425=>1000,12426=>1000,12427=>1000,12428=>1000,12429=>1000,12430=>1000,12431=>1000,12432=>1000,12433=>1000,12434=>1000, -12435=>1000,12443=>1000,12444=>1000,12445=>1000,12446=>1000,12449=>1000,12450=>1000,12451=>1000,12452=>1000,12453=>1000, -12454=>1000,12455=>1000,12456=>1000,12457=>1000,12458=>1000,12459=>1000,12460=>1000,12461=>1000,12462=>1000,12463=>1000, -12464=>1000,12465=>1000,12466=>1000,12467=>1000,12468=>1000,12469=>1000,12470=>1000,12471=>1000,12472=>1000,12473=>1000, -12474=>1000,12475=>1000,12476=>1000,12477=>1000,12478=>1000,12479=>1000,12480=>1000,12481=>1000,12482=>1000,12483=>1000, -12484=>1000,12485=>1000,12486=>1000,12487=>1000,12488=>1000,12489=>1000,12490=>1000,12491=>1000,12492=>1000,12493=>1000, -12494=>1000,12495=>1000,12496=>1000,12497=>1000,12498=>1000,12499=>1000,12500=>1000,12501=>1000,12502=>1000,12503=>1000, -12504=>1000,12505=>1000,12506=>1000,12507=>1000,12508=>1000,12509=>1000,12510=>1000,12511=>1000,12512=>1000,12513=>1000, -12514=>1000,12515=>1000,12516=>1000,12517=>1000,12518=>1000,12519=>1000,12520=>1000,12521=>1000,12522=>1000,12523=>1000, -12524=>1000,12525=>1000,12526=>1000,12527=>1000,12528=>1000,12529=>1000,12530=>1000,12531=>1000,12532=>1000,12533=>1000, -12534=>1000,12539=>1000,12540=>1000,12541=>1000,12542=>1000,12549=>1000,12550=>1000,12551=>1000,12552=>1000,12553=>1000, -12554=>1000,12555=>1000,12556=>1000,12557=>1000,12558=>1000,12559=>1000,12560=>1000,12561=>1000,12562=>1000,12563=>1000, -12564=>1000,12565=>1000,12566=>1000,12567=>1000,12568=>1000,12569=>1000,12570=>1000,12571=>1000,12572=>1000,12573=>1000, -12574=>1000,12575=>1000,12576=>1000,12577=>1000,12578=>1000,12579=>1000,12580=>1000,12581=>1000,12582=>1000,12583=>1000, -12584=>1000,12585=>1000,12593=>1000,12594=>1000,12595=>1000,12596=>1000,12597=>1000,12598=>1000,12599=>1000,12600=>1000, -12601=>1000,12602=>1000,12603=>1000,12604=>1000,12605=>1000,12606=>1000,12607=>1000,12608=>1000,12609=>1000,12610=>1000, -12611=>1000,12612=>1000,12613=>1000,12614=>1000,12615=>1000,12616=>1000,12617=>1000,12618=>1000,12619=>1000,12620=>1000, -12621=>1000,12622=>1000,12623=>1000,12624=>1000,12625=>1000,12626=>1000,12627=>1000,12628=>1000,12629=>1000,12630=>1000, -12631=>1000,12632=>1000,12633=>1000,12634=>1000,12635=>1000,12636=>1000,12637=>1000,12638=>1000,12639=>1000,12640=>1000, -12641=>1000,12642=>1000,12643=>1000,12644=>1000,12645=>1000,12646=>1000,12647=>1000,12648=>1000,12649=>1000,12650=>1000, -12651=>1000,12652=>1000,12653=>1000,12654=>1000,12655=>1000,12656=>1000,12657=>1000,12658=>1000,12659=>1000,12660=>1000, -12661=>1000,12662=>1000,12663=>1000,12664=>1000,12665=>1000,12666=>1000,12667=>1000,12668=>1000,12669=>1000,12670=>1000, -12671=>1000,12672=>1000,12673=>1000,12674=>1000,12675=>1000,12676=>1000,12677=>1000,12678=>1000,12679=>1000,12680=>1000, -12681=>1000,12682=>1000,12683=>1000,12684=>1000,12685=>1000,12686=>1000,12800=>1000,12801=>1000,12802=>1000,12803=>1000, -12804=>1000,12805=>1000,12806=>1000,12807=>1000,12808=>1000,12809=>1000,12810=>1000,12811=>1000,12812=>1000,12813=>1000, -12814=>1000,12815=>1000,12816=>1000,12817=>1000,12818=>1000,12819=>1000,12820=>1000,12821=>1000,12822=>1000,12823=>1000, -12824=>1000,12825=>1000,12826=>1000,12827=>1000,12828=>1000,12832=>1000,12833=>1000,12834=>1000,12835=>1000,12836=>1000, -12837=>1000,12838=>1000,12839=>1000,12840=>1000,12841=>1000,12849=>1000,12850=>1000,12857=>1000,12896=>1000,12897=>1000, -12898=>1000,12899=>1000,12900=>1000,12901=>1000,12902=>1000,12903=>1000,12904=>1000,12905=>1000,12906=>1000,12907=>1000, -12908=>1000,12909=>1000,12910=>1000,12911=>1000,12912=>1000,12913=>1000,12914=>1000,12915=>1000,12916=>1000,12917=>1000, -12918=>1000,12919=>1000,12920=>1000,12921=>1000,12922=>1000,12923=>1000,12927=>1000,12963=>1000,12964=>1000,12965=>1000, -12966=>1000,12967=>1000,12968=>1000,13059=>1000,13069=>1000,13076=>1000,13080=>1000,13090=>1000,13091=>1000,13094=>1000, -13095=>1000,13099=>1000,13110=>1000,13115=>1000,13129=>1000,13130=>1000,13133=>1000,13137=>1000,13143=>1000,13179=>1000, -13180=>1000,13181=>1000,13182=>1000,13184=>1000,13185=>1000,13186=>1000,13187=>1000,13188=>1000,13192=>1000,13193=>1000, -13194=>1000,13195=>1000,13196=>1000,13197=>1000,13198=>1000,13199=>1000,13200=>1000,13201=>1000,13202=>1000,13203=>1000, -13204=>1000,13205=>1000,13206=>1000,13207=>1000,13208=>1000,13209=>1000,13210=>1000,13211=>1000,13212=>1000,13213=>1000, -13214=>1000,13215=>1000,13216=>1000,13217=>1000,13218=>1000,13219=>1000,13220=>1000,13221=>1000,13222=>1000,13223=>1000, -13224=>1000,13225=>1000,13226=>1000,13227=>1000,13228=>1000,13229=>1000,13230=>1000,13231=>1000,13232=>1000,13233=>1000, -13234=>1000,13235=>1000,13236=>1000,13237=>1000,13238=>1000,13239=>1000,13240=>1000,13241=>1000,13242=>1000,13243=>1000, -13244=>1000,13245=>1000,13246=>1000,13247=>1000,13248=>1000,13249=>1000,13250=>1000,13251=>1000,13252=>1000,13253=>1000, -13254=>1000,13255=>1000,13256=>1000,13257=>1000,13258=>1000,13261=>1000,13262=>1000,13263=>1000,13264=>1000,13265=>1000, -13266=>1000,13267=>1000,13269=>1000,13270=>1000,13272=>1000,13275=>1000,13276=>1000,13277=>1000,19968=>1000,19969=>1000, -19971=>1000,19975=>1000,19976=>1000,19977=>1000,19978=>1000,19979=>1000,19980=>1000,19981=>1000,19982=>1000,19983=>1000, -19984=>1000,19985=>1000,19987=>1000,19988=>1000,19989=>1000,19990=>1000,19991=>1000,19992=>1000,19993=>1000,19994=>1000, -19995=>1000,19996=>1000,19997=>1000,19998=>1000,19999=>1000,20001=>1000,20002=>1000,20004=>1000,20005=>1000,20006=>1000, -20007=>1000,20008=>1000,20010=>1000,20011=>1000,20012=>1000,20013=>1000,20014=>1000,20016=>1000,20017=>1000,20018=>1000, -20019=>1000,20020=>1000,20022=>1000,20024=>1000,20025=>1000,20026=>1000,20027=>1000,20028=>1000,20029=>1000,20030=>1000, -20031=>1000,20034=>1000,20035=>1000,20037=>1000,20039=>1000,20040=>1000,20041=>1000,20043=>1000,20044=>1000,20045=>1000, -20046=>1000,20047=>1000,20048=>1000,20050=>1000,20051=>1000,20052=>1000,20053=>1000,20054=>1000,20055=>1000,20056=>1000, -20057=>1000,20060=>1000,20061=>1000,20062=>1000,20063=>1000,20064=>1000,20065=>1000,20066=>1000,20070=>1000,20073=>1000, -20075=>1000,20077=>1000,20080=>1000,20081=>1000,20083=>1000,20086=>1000,20087=>1000,20094=>1000,20095=>1000,20096=>1000, -20098=>1000,20099=>1000,20100=>1000,20101=>1000,20102=>1000,20104=>1000,20105=>1000,20106=>1000,20107=>1000,20108=>1000, -20109=>1000,20110=>1000,20111=>1000,20112=>1000,20113=>1000,20114=>1000,20115=>1000,20116=>1000,20117=>1000,20120=>1000, -20121=>1000,20122=>1000,20123=>1000,20124=>1000,20126=>1000,20127=>1000,20128=>1000,20129=>1000,20130=>1000,20132=>1000, -20133=>1000,20134=>1000,20135=>1000,20136=>1000,20137=>1000,20139=>1000,20140=>1000,20141=>1000,20142=>1000,20144=>1000, -20146=>1000,20147=>1000,20149=>1000,20150=>1000,20153=>1000,20154=>1000,20155=>1000,20159=>1000,20160=>1000,20161=>1000, -20162=>1000,20163=>1000,20164=>1000,20165=>1000,20166=>1000,20167=>1000,20168=>1000,20169=>1000,20170=>1000,20171=>1000, -20173=>1000,20174=>1000,20175=>1000,20177=>1000,20179=>1000,20180=>1000,20181=>1000,20182=>1000,20183=>1000,20184=>1000, -20185=>1000,20186=>1000,20188=>1000,20189=>1000,20190=>1000,20191=>1000,20193=>1000,20195=>1000,20196=>1000,20197=>1000, -20200=>1000,20201=>1000,20202=>1000,20203=>1000,20204=>1000,20205=>1000,20206=>1000,20208=>1000,20209=>1000,20210=>1000, -20211=>1000,20212=>1000,20213=>1000,20214=>1000,20215=>1000,20219=>1000,20220=>1000,20221=>1000,20223=>1000,20224=>1000, -20225=>1000,20226=>1000,20227=>1000,20228=>1000,20229=>1000,20232=>1000,20233=>1000,20234=>1000,20235=>1000,20237=>1000, -20238=>1000,20239=>1000,20240=>1000,20241=>1000,20242=>1000,20243=>1000,20244=>1000,20245=>1000,20247=>1000,20248=>1000, -20249=>1000,20250=>1000,20251=>1000,20252=>1000,20253=>1000,20254=>1000,20255=>1000,20256=>1000,20258=>1000,20260=>1000, -20261=>1000,20262=>1000,20263=>1000,20266=>1000,20267=>1000,20268=>1000,20269=>1000,20271=>1000,20272=>1000,20274=>1000, -20275=>1000,20276=>1000,20278=>1000,20280=>1000,20281=>1000,20282=>1000,20283=>1000,20284=>1000,20285=>1000,20286=>1000, -20287=>1000,20289=>1000,20291=>1000,20294=>1000,20295=>1000,20296=>1000,20297=>1000,20300=>1000,20301=>1000,20302=>1000, -20303=>1000,20304=>1000,20305=>1000,20306=>1000,20307=>1000,20308=>1000,20309=>1000,20310=>1000,20311=>1000,20312=>1000, -20313=>1000,20314=>1000,20315=>1000,20316=>1000,20317=>1000,20318=>1000,20319=>1000,20320=>1000,20321=>1000,20322=>1000, -20323=>1000,20324=>1000,20325=>1000,20327=>1000,20329=>1000,20330=>1000,20331=>1000,20332=>1000,20334=>1000,20335=>1000, -20336=>1000,20339=>1000,20340=>1000,20341=>1000,20342=>1000,20343=>1000,20344=>1000,20345=>1000,20346=>1000,20347=>1000, -20348=>1000,20349=>1000,20350=>1000,20351=>1000,20352=>1000,20353=>1000,20354=>1000,20355=>1000,20356=>1000,20357=>1000, -20358=>1000,20359=>1000,20360=>1000,20361=>1000,20362=>1000,20363=>1000,20365=>1000,20367=>1000,20368=>1000,20369=>1000, -20370=>1000,20372=>1000,20373=>1000,20374=>1000,20375=>1000,20376=>1000,20378=>1000,20379=>1000,20380=>1000,20381=>1000, -20382=>1000,20384=>1000,20385=>1000,20387=>1000,20389=>1000,20390=>1000,20391=>1000,20392=>1000,20393=>1000,20394=>1000, -20395=>1000,20396=>1000,20397=>1000,20398=>1000,20399=>1000,20402=>1000,20403=>1000,20405=>1000,20406=>1000,20407=>1000, -20409=>1000,20410=>1000,20411=>1000,20415=>1000,20416=>1000,20417=>1000,20418=>1000,20419=>1000,20420=>1000,20421=>1000, -20423=>1000,20425=>1000,20426=>1000,20427=>1000,20429=>1000,20430=>1000,20431=>1000,20432=>1000,20433=>1000,20435=>1000, -20436=>1000,20438=>1000,20439=>1000,20440=>1000,20441=>1000,20442=>1000,20443=>1000,20444=>1000,20445=>1000,20446=>1000, -20447=>1000,20448=>1000,20449=>1000,20451=>1000,20452=>1000,20453=>1000,20454=>1000,20456=>1000,20457=>1000,20458=>1000, -20460=>1000,20461=>1000,20462=>1000,20463=>1000,20465=>1000,20467=>1000,20468=>1000,20469=>1000,20470=>1000,20471=>1000, -20472=>1000,20474=>1000,20478=>1000,20479=>1000,20480=>1000,20482=>1000,20485=>1000,20486=>1000,20487=>1000,20489=>1000, -20491=>1000,20492=>1000,20493=>1000,20494=>1000,20495=>1000,20497=>1000,20498=>1000,20499=>1000,20500=>1000,20501=>1000, -20502=>1000,20503=>1000,20504=>1000,20505=>1000,20506=>1000,20507=>1000,20508=>1000,20510=>1000,20511=>1000,20512=>1000, -20513=>1000,20514=>1000,20515=>1000,20516=>1000,20517=>1000,20518=>1000,20519=>1000,20520=>1000,20521=>1000,20522=>1000, -20523=>1000,20524=>1000,20525=>1000,20526=>1000,20527=>1000,20528=>1000,20529=>1000,20531=>1000,20533=>1000,20534=>1000, -20535=>1000,20537=>1000,20538=>1000,20539=>1000,20540=>1000,20542=>1000,20544=>1000,20545=>1000,20546=>1000,20547=>1000, -20549=>1000,20550=>1000,20551=>1000,20552=>1000,20553=>1000,20554=>1000,20555=>1000,20556=>1000,20557=>1000,20558=>1000, -20559=>1000,20560=>1000,20561=>1000,20563=>1000,20565=>1000,20566=>1000,20567=>1000,20570=>1000,20571=>1000,20572=>1000, -20573=>1000,20574=>1000,20575=>1000,20576=>1000,20577=>1000,20578=>1000,20579=>1000,20580=>1000,20581=>1000,20584=>1000, -20585=>1000,20586=>1000,20587=>1000,20588=>1000,20589=>1000,20590=>1000,20591=>1000,20592=>1000,20594=>1000,20595=>1000, -20596=>1000,20597=>1000,20598=>1000,20599=>1000,20600=>1000,20602=>1000,20603=>1000,20605=>1000,20606=>1000,20607=>1000, -20608=>1000,20610=>1000,20611=>1000,20613=>1000,20615=>1000,20616=>1000,20619=>1000,20620=>1000,20621=>1000,20622=>1000, -20625=>1000,20626=>1000,20628=>1000,20629=>1000,20630=>1000,20632=>1000,20633=>1000,20634=>1000,20635=>1000,20636=>1000, -20637=>1000,20638=>1000,20642=>1000,20643=>1000,20645=>1000,20647=>1000,20648=>1000,20649=>1000,20652=>1000,20653=>1000, -20654=>1000,20655=>1000,20656=>1000,20657=>1000,20658=>1000,20659=>1000,20660=>1000,20661=>1000,20662=>1000,20663=>1000, -20664=>1000,20666=>1000,20667=>1000,20669=>1000,20670=>1000,20671=>1000,20673=>1000,20674=>1000,20676=>1000,20677=>1000, -20678=>1000,20679=>1000,20680=>1000,20681=>1000,20682=>1000,20683=>1000,20685=>1000,20686=>1000,20687=>1000,20689=>1000, -20691=>1000,20692=>1000,20693=>1000,20694=>1000,20695=>1000,20696=>1000,20698=>1000,20699=>1000,20701=>1000,20702=>1000, -20704=>1000,20707=>1000,20708=>1000,20709=>1000,20710=>1000,20711=>1000,20712=>1000,20713=>1000,20714=>1000,20716=>1000, -20717=>1000,20718=>1000,20719=>1000,20720=>1000,20721=>1000,20723=>1000,20724=>1000,20725=>1000,20726=>1000,20728=>1000, -20729=>1000,20731=>1000,20733=>1000,20734=>1000,20735=>1000,20736=>1000,20737=>1000,20738=>1000,20739=>1000,20740=>1000, -20741=>1000,20742=>1000,20743=>1000,20744=>1000,20745=>1000,20746=>1000,20747=>1000,20748=>1000,20752=>1000,20753=>1000, -20754=>1000,20755=>1000,20756=>1000,20757=>1000,20758=>1000,20759=>1000,20760=>1000,20762=>1000,20764=>1000,20767=>1000, -20768=>1000,20769=>1000,20770=>1000,20772=>1000,20773=>1000,20774=>1000,20777=>1000,20778=>1000,20781=>1000,20782=>1000, -20784=>1000,20785=>1000,20786=>1000,20787=>1000,20788=>1000,20789=>1000,20791=>1000,20792=>1000,20793=>1000,20794=>1000, -20795=>1000,20796=>1000,20797=>1000,20799=>1000,20800=>1000,20801=>1000,20803=>1000,20804=>1000,20805=>1000,20806=>1000, -20807=>1000,20808=>1000,20809=>1000,20810=>1000,20811=>1000,20812=>1000,20813=>1000,20814=>1000,20816=>1000,20817=>1000, -20818=>1000,20820=>1000,20821=>1000,20822=>1000,20823=>1000,20825=>1000,20826=>1000,20827=>1000,20828=>1000,20829=>1000, -20830=>1000,20831=>1000,20833=>1000,20834=>1000,20835=>1000,20836=>1000,20837=>1000,20839=>1000,20840=>1000,20841=>1000, -20842=>1000,20843=>1000,20844=>1000,20845=>1000,20846=>1000,20848=>1000,20849=>1000,20851=>1000,20852=>1000,20853=>1000, -20854=>1000,20855=>1000,20856=>1000,20857=>1000,20859=>1000,20860=>1000,20861=>1000,20864=>1000,20865=>1000,20866=>1000, -20869=>1000,20870=>1000,20871=>1000,20872=>1000,20873=>1000,20874=>1000,20876=>1000,20877=>1000,20879=>1000,20880=>1000, -20881=>1000,20882=>1000,20883=>1000,20884=>1000,20885=>1000,20886=>1000,20887=>1000,20888=>1000,20889=>1000,20891=>1000, -20892=>1000,20893=>1000,20894=>1000,20896=>1000,20898=>1000,20900=>1000,20901=>1000,20902=>1000,20904=>1000,20905=>1000, -20906=>1000,20907=>1000,20908=>1000,20911=>1000,20912=>1000,20913=>1000,20914=>1000,20915=>1000,20916=>1000,20917=>1000, -20918=>1000,20919=>1000,20921=>1000,20923=>1000,20924=>1000,20925=>1000,20926=>1000,20928=>1000,20932=>1000,20933=>1000, -20934=>1000,20935=>1000,20936=>1000,20937=>1000,20938=>1000,20939=>1000,20940=>1000,20941=>1000,20942=>1000,20943=>1000, -20944=>1000,20945=>1000,20948=>1000,20950=>1000,20951=>1000,20952=>1000,20955=>1000,20956=>1000,20957=>1000,20958=>1000, -20960=>1000,20961=>1000,20964=>1000,20966=>1000,20967=>1000,20969=>1000,20970=>1000,20971=>1000,20972=>1000,20973=>1000, -20975=>1000,20976=>1000,20977=>1000,20979=>1000,20981=>1000,20982=>1000,20984=>1000,20985=>1000,20986=>1000,20987=>1000, -20988=>1000,20989=>1000,20990=>1000,20991=>1000,20992=>1000,20993=>1000,20994=>1000,20995=>1000,20996=>1000,20998=>1000, -20999=>1000,21000=>1000,21001=>1000,21002=>1000,21003=>1000,21004=>1000,21005=>1000,21006=>1000,21008=>1000,21009=>1000, -21010=>1000,21011=>1000,21012=>1000,21013=>1000,21014=>1000,21015=>1000,21016=>1000,21017=>1000,21018=>1000,21019=>1000, -21020=>1000,21021=>1000,21022=>1000,21024=>1000,21025=>1000,21028=>1000,21029=>1000,21031=>1000,21032=>1000,21033=>1000, -21034=>1000,21035=>1000,21037=>1000,21038=>1000,21040=>1000,21041=>1000,21042=>1000,21043=>1000,21045=>1000,21046=>1000, -21047=>1000,21048=>1000,21049=>1000,21050=>1000,21051=>1000,21053=>1000,21055=>1000,21056=>1000,21057=>1000,21058=>1000, -21059=>1000,21060=>1000,21062=>1000,21063=>1000,21065=>1000,21066=>1000,21067=>1000,21068=>1000,21069=>1000,21070=>1000, -21071=>1000,21072=>1000,21073=>1000,21074=>1000,21076=>1000,21077=>1000,21078=>1000,21082=>1000,21083=>1000,21084=>1000, -21085=>1000,21086=>1000,21087=>1000,21089=>1000,21090=>1000,21091=>1000,21092=>1000,21093=>1000,21095=>1000,21097=>1000, -21098=>1000,21099=>1000,21100=>1000,21101=>1000,21102=>1000,21103=>1000,21104=>1000,21105=>1000,21106=>1000,21107=>1000, -21108=>1000,21109=>1000,21111=>1000,21112=>1000,21114=>1000,21115=>1000,21116=>1000,21117=>1000,21119=>1000,21120=>1000, -21121=>1000,21122=>1000,21123=>1000,21124=>1000,21127=>1000,21128=>1000,21129=>1000,21130=>1000,21131=>1000,21132=>1000, -21133=>1000,21136=>1000,21137=>1000,21138=>1000,21139=>1000,21140=>1000,21142=>1000,21143=>1000,21144=>1000,21145=>1000, -21147=>1000,21148=>1000,21149=>1000,21150=>1000,21151=>1000,21152=>1000,21153=>1000,21154=>1000,21155=>1000,21156=>1000, -21158=>1000,21160=>1000,21161=>1000,21162=>1000,21163=>1000,21164=>1000,21165=>1000,21166=>1000,21167=>1000,21169=>1000, -21170=>1000,21171=>1000,21172=>1000,21173=>1000,21177=>1000,21179=>1000,21180=>1000,21182=>1000,21183=>1000,21184=>1000, -21185=>1000,21186=>1000,21187=>1000,21189=>1000,21191=>1000,21193=>1000,21195=>1000,21197=>1000,21200=>1000,21202=>1000, -21203=>1000,21205=>1000,21206=>1000,21207=>1000,21208=>1000,21209=>1000,21211=>1000,21213=>1000,21214=>1000,21215=>1000, -21216=>1000,21218=>1000,21219=>1000,21220=>1000,21222=>1000,21223=>1000,21225=>1000,21227=>1000,21231=>1000,21232=>1000, -21233=>1000,21234=>1000,21235=>1000,21236=>1000,21237=>1000,21239=>1000,21240=>1000,21241=>1000,21242=>1000,21243=>1000, -21244=>1000,21246=>1000,21247=>1000,21248=>1000,21249=>1000,21250=>1000,21253=>1000,21254=>1000,21255=>1000,21256=>1000, -21257=>1000,21258=>1000,21259=>1000,21261=>1000,21262=>1000,21263=>1000,21264=>1000,21265=>1000,21266=>1000,21269=>1000, -21270=>1000,21271=>1000,21273=>1000,21274=>1000,21276=>1000,21277=>1000,21279=>1000,21280=>1000,21281=>1000,21282=>1000, -21283=>1000,21284=>1000,21286=>1000,21290=>1000,21293=>1000,21294=>1000,21295=>1000,21296=>1000,21297=>1000,21299=>1000, -21300=>1000,21303=>1000,21304=>1000,21305=>1000,21306=>1000,21307=>1000,21308=>1000,21309=>1000,21310=>1000,21311=>1000, -21312=>1000,21313=>1000,21315=>1000,21316=>1000,21317=>1000,21318=>1000,21319=>1000,21320=>1000,21321=>1000,21322=>1000, -21324=>1000,21325=>1000,21326=>1000,21327=>1000,21329=>1000,21330=>1000,21331=>1000,21332=>1000,21333=>1000,21334=>1000, -21335=>1000,21336=>1000,21338=>1000,21340=>1000,21342=>1000,21343=>1000,21344=>1000,21345=>1000,21346=>1000,21347=>1000, -21348=>1000,21350=>1000,21351=>1000,21352=>1000,21353=>1000,21355=>1000,21356=>1000,21358=>1000,21359=>1000,21360=>1000, -21361=>1000,21362=>1000,21363=>1000,21364=>1000,21365=>1000,21367=>1000,21368=>1000,21369=>1000,21370=>1000,21371=>1000, -21372=>1000,21373=>1000,21375=>1000,21378=>1000,21380=>1000,21381=>1000,21382=>1000,21385=>1000,21386=>1000,21387=>1000, -21388=>1000,21389=>1000,21390=>1000,21391=>1000,21394=>1000,21395=>1000,21396=>1000,21397=>1000,21398=>1000,21399=>1000, -21400=>1000,21401=>1000,21402=>1000,21404=>1000,21405=>1000,21406=>1000,21407=>1000,21408=>1000,21410=>1000,21411=>1000, -21412=>1000,21413=>1000,21414=>1000,21415=>1000,21416=>1000,21417=>1000,21420=>1000,21421=>1000,21422=>1000,21424=>1000, -21426=>1000,21427=>1000,21428=>1000,21430=>1000,21433=>1000,21435=>1000,21439=>1000,21441=>1000,21442=>1000,21443=>1000, -21448=>1000,21449=>1000,21450=>1000,21451=>1000,21452=>1000,21453=>1000,21454=>1000,21457=>1000,21460=>1000,21462=>1000, -21463=>1000,21464=>1000,21465=>1000,21467=>1000,21469=>1000,21471=>1000,21472=>1000,21473=>1000,21474=>1000,21475=>1000, -21476=>1000,21477=>1000,21478=>1000,21480=>1000,21481=>1000,21482=>1000,21483=>1000,21484=>1000,21485=>1000,21486=>1000, -21487=>1000,21488=>1000,21489=>1000,21490=>1000,21491=>1000,21493=>1000,21494=>1000,21495=>1000,21496=>1000,21497=>1000, -21498=>1000,21499=>1000,21500=>1000,21501=>1000,21505=>1000,21507=>1000,21508=>1000,21510=>1000,21511=>1000,21512=>1000, -21513=>1000,21514=>1000,21515=>1000,21516=>1000,21517=>1000,21518=>1000,21519=>1000,21520=>1000,21521=>1000,21522=>1000, -21523=>1000,21525=>1000,21526=>1000,21527=>1000,21528=>1000,21529=>1000,21531=>1000,21532=>1000,21533=>1000,21534=>1000, -21535=>1000,21536=>1000,21537=>1000,21539=>1000,21540=>1000,21541=>1000,21542=>1000,21543=>1000,21544=>1000,21545=>1000, -21546=>1000,21547=>1000,21548=>1000,21549=>1000,21550=>1000,21551=>1000,21552=>1000,21553=>1000,21554=>1000,21555=>1000, -21556=>1000,21557=>1000,21558=>1000,21559=>1000,21560=>1000,21561=>1000,21563=>1000,21564=>1000,21565=>1000,21566=>1000, -21568=>1000,21569=>1000,21570=>1000,21571=>1000,21573=>1000,21574=>1000,21575=>1000,21576=>1000,21577=>1000,21578=>1000, -21579=>1000,21582=>1000,21583=>1000,21584=>1000,21585=>1000,21586=>1000,21587=>1000,21588=>1000,21589=>1000,21590=>1000, -21591=>1000,21592=>1000,21593=>1000,21595=>1000,21596=>1000,21599=>1000,21600=>1000,21601=>1000,21602=>1000,21603=>1000, -21604=>1000,21605=>1000,21606=>1000,21607=>1000,21608=>1000,21610=>1000,21611=>1000,21612=>1000,21615=>1000,21616=>1000, -21617=>1000,21618=>1000,21619=>1000,21620=>1000,21621=>1000,21622=>1000,21623=>1000,21624=>1000,21626=>1000,21627=>1000, -21628=>1000,21629=>1000,21630=>1000,21631=>1000,21632=>1000,21633=>1000,21634=>1000,21636=>1000,21638=>1000,21639=>1000, -21640=>1000,21642=>1000,21643=>1000,21644=>1000,21645=>1000,21646=>1000,21647=>1000,21648=>1000,21649=>1000,21650=>1000, -21652=>1000,21653=>1000,21654=>1000,21656=>1000,21657=>1000,21658=>1000,21659=>1000,21660=>1000,21661=>1000,21664=>1000, -21665=>1000,21666=>1000,21667=>1000,21668=>1000,21669=>1000,21670=>1000,21671=>1000,21672=>1000,21673=>1000,21674=>1000, -21675=>1000,21676=>1000,21677=>1000,21678=>1000,21679=>1000,21680=>1000,21681=>1000,21682=>1000,21683=>1000,21684=>1000, -21686=>1000,21687=>1000,21688=>1000,21690=>1000,21691=>1000,21692=>1000,21693=>1000,21694=>1000,21695=>1000,21696=>1000, -21697=>1000,21698=>1000,21699=>1000,21700=>1000,21701=>1000,21702=>1000,21703=>1000,21704=>1000,21705=>1000,21708=>1000, -21709=>1000,21710=>1000,21711=>1000,21712=>1000,21713=>1000,21714=>1000,21715=>1000,21716=>1000,21717=>1000,21718=>1000, -21719=>1000,21720=>1000,21721=>1000,21722=>1000,21724=>1000,21725=>1000,21726=>1000,21727=>1000,21728=>1000,21729=>1000, -21730=>1000,21732=>1000,21733=>1000,21734=>1000,21735=>1000,21736=>1000,21737=>1000,21738=>1000,21739=>1000,21741=>1000, -21742=>1000,21745=>1000,21746=>1000,21747=>1000,21751=>1000,21752=>1000,21754=>1000,21755=>1000,21756=>1000,21757=>1000, -21759=>1000,21761=>1000,21763=>1000,21764=>1000,21765=>1000,21766=>1000,21767=>1000,21768=>1000,21769=>1000,21770=>1000, -21771=>1000,21772=>1000,21774=>1000,21775=>1000,21776=>1000,21777=>1000,21778=>1000,21780=>1000,21782=>1000,21783=>1000, -21786=>1000,21787=>1000,21788=>1000,21792=>1000,21794=>1000,21795=>1000,21796=>1000,21798=>1000,21799=>1000,21802=>1000, -21804=>1000,21805=>1000,21806=>1000,21807=>1000,21808=>1000,21809=>1000,21810=>1000,21811=>1000,21812=>1000,21813=>1000, -21814=>1000,21815=>1000,21816=>1000,21817=>1000,21819=>1000,21820=>1000,21822=>1000,21823=>1000,21824=>1000,21825=>1000, -21827=>1000,21828=>1000,21829=>1000,21830=>1000,21832=>1000,21833=>1000,21834=>1000,21835=>1000,21836=>1000,21837=>1000, -21838=>1000,21839=>1000,21840=>1000,21841=>1000,21842=>1000,21843=>1000,21845=>1000,21846=>1000,21847=>1000,21852=>1000, -21853=>1000,21854=>1000,21855=>1000,21857=>1000,21858=>1000,21859=>1000,21860=>1000,21861=>1000,21862=>1000,21863=>1000, -21866=>1000,21868=>1000,21869=>1000,21870=>1000,21877=>1000,21878=>1000,21879=>1000,21880=>1000,21883=>1000,21884=>1000, -21885=>1000,21886=>1000,21887=>1000,21888=>1000,21889=>1000,21890=>1000,21891=>1000,21892=>1000,21894=>1000,21895=>1000, -21896=>1000,21897=>1000,21898=>1000,21899=>1000,21900=>1000,21901=>1000,21902=>1000,21903=>1000,21905=>1000,21906=>1000, -21907=>1000,21908=>1000,21909=>1000,21912=>1000,21913=>1000,21914=>1000,21916=>1000,21917=>1000,21918=>1000,21919=>1000, -21921=>1000,21922=>1000,21923=>1000,21924=>1000,21925=>1000,21926=>1000,21927=>1000,21928=>1000,21929=>1000,21930=>1000, -21931=>1000,21932=>1000,21933=>1000,21934=>1000,21936=>1000,21937=>1000,21938=>1000,21939=>1000,21941=>1000,21942=>1000, -21943=>1000,21945=>1000,21947=>1000,21949=>1000,21950=>1000,21951=>1000,21952=>1000,21954=>1000,21955=>1000,21956=>1000, -21957=>1000,21958=>1000,21959=>1000,21960=>1000,21961=>1000,21962=>1000,21963=>1000,21964=>1000,21965=>1000,21966=>1000, -21967=>1000,21968=>1000,21969=>1000,21970=>1000,21971=>1000,21972=>1000,21973=>1000,21974=>1000,21977=>1000,21978=>1000, -21979=>1000,21980=>1000,21981=>1000,21983=>1000,21985=>1000,21986=>1000,21987=>1000,21988=>1000,21989=>1000,21990=>1000, -21991=>1000,21992=>1000,21993=>1000,21994=>1000,21995=>1000,21996=>1000,21999=>1000,22002=>1000,22003=>1000,22005=>1000, -22006=>1000,22007=>1000,22009=>1000,22010=>1000,22012=>1000,22013=>1000,22014=>1000,22015=>1000,22016=>1000,22017=>1000, -22018=>1000,22020=>1000,22022=>1000,22024=>1000,22025=>1000,22028=>1000,22029=>1000,22030=>1000,22031=>1000,22032=>1000, -22034=>1000,22035=>1000,22036=>1000,22037=>1000,22038=>1000,22039=>1000,22040=>1000,22043=>1000,22044=>1000,22045=>1000, -22046=>1000,22047=>1000,22051=>1000,22052=>1000,22055=>1000,22057=>1000,22058=>1000,22060=>1000,22061=>1000,22062=>1000, -22063=>1000,22064=>1000,22065=>1000,22066=>1000,22067=>1000,22068=>1000,22069=>1000,22070=>1000,22072=>1000,22073=>1000, -22074=>1000,22075=>1000,22077=>1000,22078=>1000,22079=>1000,22080=>1000,22081=>1000,22082=>1000,22085=>1000,22086=>1000, -22088=>1000,22089=>1000,22090=>1000,22092=>1000,22093=>1000,22094=>1000,22096=>1000,22099=>1000,22100=>1000,22103=>1000, -22104=>1000,22105=>1000,22106=>1000,22107=>1000,22108=>1000,22110=>1000,22112=>1000,22114=>1000,22115=>1000,22116=>1000, -22117=>1000,22118=>1000,22120=>1000,22121=>1000,22122=>1000,22123=>1000,22124=>1000,22125=>1000,22126=>1000,22127=>1000, -22128=>1000,22129=>1000,22130=>1000,22131=>1000,22132=>1000,22134=>1000,22135=>1000,22136=>1000,22137=>1000,22138=>1000, -22139=>1000,22140=>1000,22142=>1000,22143=>1000,22144=>1000,22145=>1000,22146=>1000,22147=>1000,22148=>1000,22149=>1000, -22150=>1000,22151=>1000,22154=>1000,22156=>1000,22157=>1000,22158=>1000,22159=>1000,22160=>1000,22163=>1000,22164=>1000, -22165=>1000,22167=>1000,22168=>1000,22169=>1000,22170=>1000,22172=>1000,22173=>1000,22176=>1000,22178=>1000,22179=>1000, -22181=>1000,22182=>1000,22183=>1000,22184=>1000,22186=>1000,22187=>1000,22188=>1000,22189=>1000,22190=>1000,22191=>1000, -22194=>1000,22195=>1000,22196=>1000,22197=>1000,22198=>1000,22199=>1000,22204=>1000,22205=>1000,22206=>1000,22208=>1000, -22209=>1000,22210=>1000,22211=>1000,22213=>1000,22214=>1000,22216=>1000,22217=>1000,22218=>1000,22219=>1000,22220=>1000, -22221=>1000,22222=>1000,22225=>1000,22227=>1000,22228=>1000,22231=>1000,22232=>1000,22234=>1000,22235=>1000,22237=>1000, -22238=>1000,22239=>1000,22240=>1000,22241=>1000,22242=>1000,22243=>1000,22244=>1000,22245=>1000,22247=>1000,22250=>1000, -22251=>1000,22253=>1000,22254=>1000,22256=>1000,22257=>1000,22258=>1000,22259=>1000,22260=>1000,22261=>1000,22263=>1000, -22265=>1000,22266=>1000,22269=>1000,22270=>1000,22271=>1000,22272=>1000,22273=>1000,22274=>1000,22275=>1000,22276=>1000, -22278=>1000,22279=>1000,22280=>1000,22281=>1000,22282=>1000,22283=>1000,22284=>1000,22285=>1000,22287=>1000,22290=>1000, -22291=>1000,22292=>1000,22294=>1000,22296=>1000,22298=>1000,22299=>1000,22300=>1000,22302=>1000,22303=>1000,22304=>1000, -22306=>1000,22307=>1000,22310=>1000,22311=>1000,22312=>1000,22313=>1000,22314=>1000,22316=>1000,22317=>1000,22318=>1000, -22319=>1000,22320=>1000,22323=>1000,22324=>1000,22327=>1000,22328=>1000,22329=>1000,22330=>1000,22331=>1000,22334=>1000, -22336=>1000,22337=>1000,22338=>1000,22341=>1000,22343=>1000,22345=>1000,22346=>1000,22347=>1000,22348=>1000,22349=>1000, -22350=>1000,22351=>1000,22352=>1000,22353=>1000,22354=>1000,22359=>1000,22361=>1000,22362=>1000,22363=>1000,22364=>1000, -22365=>1000,22366=>1000,22367=>1000,22368=>1000,22369=>1000,22370=>1000,22372=>1000,22373=>1000,22374=>1000,22376=>1000, -22377=>1000,22378=>1000,22379=>1000,22381=>1000,22382=>1000,22383=>1000,22384=>1000,22385=>1000,22386=>1000,22387=>1000, -22388=>1000,22389=>1000,22390=>1000,22391=>1000,22395=>1000,22396=>1000,22397=>1000,22399=>1000,22400=>1000,22402=>1000, -22403=>1000,22404=>1000,22405=>1000,22406=>1000,22408=>1000,22409=>1000,22411=>1000,22412=>1000,22415=>1000,22418=>1000, -22419=>1000,22420=>1000,22421=>1000,22423=>1000,22424=>1000,22425=>1000,22426=>1000,22427=>1000,22429=>1000,22430=>1000, -22431=>1000,22432=>1000,22433=>1000,22434=>1000,22435=>1000,22436=>1000,22437=>1000,22438=>1000,22439=>1000,22441=>1000, -22442=>1000,22443=>1000,22444=>1000,22445=>1000,22446=>1000,22448=>1000,22450=>1000,22451=>1000,22452=>1000,22453=>1000, -22454=>1000,22456=>1000,22457=>1000,22458=>1000,22460=>1000,22461=>1000,22463=>1000,22464=>1000,22465=>1000,22466=>1000, -22467=>1000,22470=>1000,22471=>1000,22472=>1000,22475=>1000,22476=>1000,22478=>1000,22479=>1000,22480=>1000,22482=>1000, -22483=>1000,22484=>1000,22485=>1000,22486=>1000,22488=>1000,22489=>1000,22490=>1000,22492=>1000,22493=>1000,22495=>1000, -22496=>1000,22497=>1000,22498=>1000,22499=>1000,22500=>1000,22501=>1000,22503=>1000,22505=>1000,22508=>1000,22509=>1000, -22510=>1000,22511=>1000,22512=>1000,22513=>1000,22514=>1000,22515=>1000,22516=>1000,22517=>1000,22518=>1000,22519=>1000, -22520=>1000,22521=>1000,22522=>1000,22523=>1000,22524=>1000,22525=>1000,22528=>1000,22529=>1000,22530=>1000,22532=>1000, -22533=>1000,22534=>1000,22535=>1000,22536=>1000,22537=>1000,22538=>1000,22539=>1000,22540=>1000,22541=>1000,22542=>1000, -22544=>1000,22545=>1000,22548=>1000,22549=>1000,22553=>1000,22555=>1000,22556=>1000,22557=>1000,22558=>1000,22560=>1000, -22561=>1000,22563=>1000,22564=>1000,22565=>1000,22567=>1000,22568=>1000,22569=>1000,22570=>1000,22572=>1000,22573=>1000, -22574=>1000,22575=>1000,22576=>1000,22577=>1000,22578=>1000,22579=>1000,22580=>1000,22581=>1000,22582=>1000,22583=>1000, -22584=>1000,22585=>1000,22586=>1000,22587=>1000,22589=>1000,22591=>1000,22592=>1000,22593=>1000,22596=>1000,22600=>1000, -22601=>1000,22602=>1000,22603=>1000,22604=>1000,22605=>1000,22606=>1000,22607=>1000,22609=>1000,22610=>1000,22611=>1000, -22612=>1000,22613=>1000,22615=>1000,22616=>1000,22617=>1000,22618=>1000,22619=>1000,22621=>1000,22622=>1000,22625=>1000, -22626=>1000,22627=>1000,22628=>1000,22629=>1000,22632=>1000,22633=>1000,22635=>1000,22636=>1000,22637=>1000,22639=>1000, -22640=>1000,22641=>1000,22642=>1000,22644=>1000,22645=>1000,22646=>1000,22649=>1000,22650=>1000,22651=>1000,22652=>1000, -22653=>1000,22654=>1000,22655=>1000,22656=>1000,22657=>1000,22658=>1000,22659=>1000,22661=>1000,22662=>1000,22663=>1000, -22664=>1000,22665=>1000,22666=>1000,22667=>1000,22670=>1000,22671=>1000,22672=>1000,22673=>1000,22674=>1000,22675=>1000, -22676=>1000,22679=>1000,22680=>1000,22681=>1000,22682=>1000,22684=>1000,22685=>1000,22686=>1000,22687=>1000,22688=>1000, -22689=>1000,22691=>1000,22693=>1000,22694=>1000,22696=>1000,22697=>1000,22699=>1000,22700=>1000,22702=>1000,22703=>1000, -22705=>1000,22706=>1000,22707=>1000,22712=>1000,22713=>1000,22714=>1000,22715=>1000,22716=>1000,22717=>1000,22718=>1000, -22719=>1000,22721=>1000,22722=>1000,22725=>1000,22726=>1000,22727=>1000,22728=>1000,22729=>1000,22730=>1000,22732=>1000, -22734=>1000,22735=>1000,22737=>1000,22738=>1000,22739=>1000,22740=>1000,22741=>1000,22742=>1000,22743=>1000,22744=>1000, -22745=>1000,22746=>1000,22747=>1000,22748=>1000,22749=>1000,22750=>1000,22751=>1000,22754=>1000,22755=>1000,22756=>1000, -22757=>1000,22759=>1000,22760=>1000,22761=>1000,22763=>1000,22764=>1000,22766=>1000,22767=>1000,22768=>1000,22769=>1000, -22770=>1000,22771=>1000,22772=>1000,22774=>1000,22775=>1000,22777=>1000,22778=>1000,22779=>1000,22780=>1000,22781=>1000, -22782=>1000,22783=>1000,22786=>1000,22787=>1000,22788=>1000,22790=>1000,22791=>1000,22793=>1000,22794=>1000,22795=>1000, -22796=>1000,22797=>1000,22798=>1000,22799=>1000,22800=>1000,22802=>1000,22804=>1000,22805=>1000,22806=>1000,22807=>1000, -22808=>1000,22809=>1000,22810=>1000,22811=>1000,22812=>1000,22815=>1000,22816=>1000,22818=>1000,22820=>1000,22821=>1000, -22823=>1000,22825=>1000,22826=>1000,22827=>1000,22828=>1000,22829=>1000,22830=>1000,22831=>1000,22833=>1000,22834=>1000, -22836=>1000,22839=>1000,22840=>1000,22841=>1000,22842=>1000,22844=>1000,22846=>1000,22848=>1000,22849=>1000,22850=>1000, -22852=>1000,22853=>1000,22855=>1000,22856=>1000,22857=>1000,22858=>1000,22859=>1000,22862=>1000,22863=>1000,22864=>1000, -22865=>1000,22867=>1000,22868=>1000,22869=>1000,22870=>1000,22871=>1000,22872=>1000,22874=>1000,22875=>1000,22876=>1000, -22877=>1000,22880=>1000,22881=>1000,22882=>1000,22883=>1000,22885=>1000,22887=>1000,22888=>1000,22889=>1000,22890=>1000, -22891=>1000,22892=>1000,22893=>1000,22894=>1000,22896=>1000,22897=>1000,22898=>1000,22899=>1000,22900=>1000,22902=>1000, -22903=>1000,22904=>1000,22905=>1000,22907=>1000,22908=>1000,22909=>1000,22910=>1000,22911=>1000,22912=>1000,22913=>1000, -22914=>1000,22915=>1000,22916=>1000,22917=>1000,22918=>1000,22919=>1000,22920=>1000,22922=>1000,22925=>1000,22926=>1000, -22927=>1000,22928=>1000,22930=>1000,22931=>1000,22934=>1000,22935=>1000,22936=>1000,22937=>1000,22939=>1000,22941=>1000, -22942=>1000,22944=>1000,22945=>1000,22946=>1000,22947=>1000,22948=>1000,22949=>1000,22950=>1000,22951=>1000,22952=>1000, -22953=>1000,22954=>1000,22955=>1000,22956=>1000,22958=>1000,22959=>1000,22961=>1000,22962=>1000,22963=>1000,22964=>1000, -22965=>1000,22966=>1000,22969=>1000,22970=>1000,22971=>1000,22972=>1000,22973=>1000,22974=>1000,22976=>1000,22977=>1000, -22979=>1000,22981=>1000,22982=>1000,22983=>1000,22984=>1000,22985=>1000,22986=>1000,22987=>1000,22988=>1000,22989=>1000, -22990=>1000,22991=>1000,22992=>1000,22993=>1000,22994=>1000,22995=>1000,22996=>1000,22998=>1000,22999=>1000,23000=>1000, -23001=>1000,23002=>1000,23003=>1000,23004=>1000,23005=>1000,23006=>1000,23008=>1000,23009=>1000,23011=>1000,23012=>1000, -23013=>1000,23014=>1000,23016=>1000,23017=>1000,23018=>1000,23019=>1000,23020=>1000,23021=>1000,23022=>1000,23025=>1000, -23026=>1000,23027=>1000,23028=>1000,23029=>1000,23030=>1000,23031=>1000,23032=>1000,23033=>1000,23034=>1000,23035=>1000, -23036=>1000,23037=>1000,23038=>1000,23039=>1000,23040=>1000,23041=>1000,23043=>1000,23044=>1000,23045=>1000,23046=>1000, -23047=>1000,23048=>1000,23049=>1000,23050=>1000,23052=>1000,23055=>1000,23057=>1000,23059=>1000,23061=>1000,23062=>1000, -23063=>1000,23064=>1000,23065=>1000,23066=>1000,23067=>1000,23068=>1000,23070=>1000,23071=>1000,23072=>1000,23075=>1000, -23077=>1000,23081=>1000,23085=>1000,23086=>1000,23087=>1000,23089=>1000,23090=>1000,23091=>1000,23092=>1000,23093=>1000, -23094=>1000,23095=>1000,23096=>1000,23097=>1000,23100=>1000,23102=>1000,23104=>1000,23105=>1000,23106=>1000,23107=>1000, -23108=>1000,23110=>1000,23111=>1000,23112=>1000,23113=>1000,23114=>1000,23116=>1000,23117=>1000,23120=>1000,23121=>1000, -23122=>1000,23123=>1000,23125=>1000,23126=>1000,23127=>1000,23128=>1000,23130=>1000,23131=>1000,23132=>1000,23133=>1000, -23134=>1000,23135=>1000,23136=>1000,23138=>1000,23140=>1000,23141=>1000,23142=>1000,23143=>1000,23145=>1000,23146=>1000, -23148=>1000,23149=>1000,23152=>1000,23156=>1000,23157=>1000,23158=>1000,23159=>1000,23160=>1000,23162=>1000,23163=>1000, -23164=>1000,23165=>1000,23167=>1000,23171=>1000,23172=>1000,23178=>1000,23179=>1000,23180=>1000,23182=>1000,23183=>1000, -23184=>1000,23186=>1000,23187=>1000,23188=>1000,23189=>1000,23191=>1000,23194=>1000,23195=>1000,23196=>1000,23197=>1000, -23198=>1000,23199=>1000,23202=>1000,23204=>1000,23205=>1000,23206=>1000,23207=>1000,23209=>1000,23210=>1000,23212=>1000, -23214=>1000,23215=>1000,23216=>1000,23217=>1000,23218=>1000,23219=>1000,23220=>1000,23221=>1000,23222=>1000,23223=>1000, -23224=>1000,23225=>1000,23226=>1000,23227=>1000,23228=>1000,23229=>1000,23230=>1000,23231=>1000,23232=>1000,23233=>1000, -23234=>1000,23236=>1000,23238=>1000,23239=>1000,23240=>1000,23241=>1000,23242=>1000,23243=>1000,23244=>1000,23245=>1000, -23248=>1000,23250=>1000,23252=>1000,23253=>1000,23254=>1000,23255=>1000,23256=>1000,23257=>1000,23258=>1000,23259=>1000, -23260=>1000,23261=>1000,23262=>1000,23263=>1000,23264=>1000,23265=>1000,23266=>1000,23267=>1000,23269=>1000,23270=>1000, -23272=>1000,23273=>1000,23274=>1000,23275=>1000,23276=>1000,23277=>1000,23278=>1000,23281=>1000,23283=>1000,23284=>1000, -23285=>1000,23286=>1000,23287=>1000,23288=>1000,23289=>1000,23290=>1000,23291=>1000,23293=>1000,23295=>1000,23297=>1000, -23298=>1000,23299=>1000,23301=>1000,23303=>1000,23304=>1000,23305=>1000,23307=>1000,23308=>1000,23311=>1000,23312=>1000, -23315=>1000,23316=>1000,23318=>1000,23319=>1000,23321=>1000,23322=>1000,23323=>1000,23325=>1000,23326=>1000,23328=>1000, -23329=>1000,23330=>1000,23331=>1000,23332=>1000,23333=>1000,23334=>1000,23335=>1000,23336=>1000,23338=>1000,23340=>1000, -23341=>1000,23342=>1000,23343=>1000,23344=>1000,23346=>1000,23348=>1000,23350=>1000,23351=>1000,23352=>1000,23356=>1000, -23357=>1000,23358=>1000,23359=>1000,23360=>1000,23363=>1000,23365=>1000,23367=>1000,23368=>1000,23371=>1000,23372=>1000, -23373=>1000,23374=>1000,23376=>1000,23377=>1000,23379=>1000,23380=>1000,23381=>1000,23382=>1000,23383=>1000,23384=>1000, -23385=>1000,23386=>1000,23387=>1000,23388=>1000,23389=>1000,23391=>1000,23394=>1000,23395=>1000,23396=>1000,23397=>1000, -23398=>1000,23401=>1000,23402=>1000,23403=>1000,23404=>1000,23406=>1000,23408=>1000,23409=>1000,23410=>1000,23411=>1000, -23413=>1000,23415=>1000,23416=>1000,23418=>1000,23419=>1000,23420=>1000,23421=>1000,23423=>1000,23424=>1000,23425=>1000, -23427=>1000,23428=>1000,23429=>1000,23431=>1000,23432=>1000,23433=>1000,23435=>1000,23436=>1000,23437=>1000,23438=>1000, -23439=>1000,23442=>1000,23443=>1000,23445=>1000,23446=>1000,23447=>1000,23448=>1000,23449=>1000,23450=>1000,23451=>1000, -23452=>1000,23453=>1000,23454=>1000,23455=>1000,23456=>1000,23457=>1000,23458=>1000,23459=>1000,23460=>1000,23461=>1000, -23462=>1000,23463=>1000,23464=>1000,23466=>1000,23467=>1000,23468=>1000,23469=>1000,23470=>1000,23472=>1000,23475=>1000, -23476=>1000,23477=>1000,23478=>1000,23480=>1000,23481=>1000,23485=>1000,23486=>1000,23487=>1000,23488=>1000,23489=>1000, -23490=>1000,23491=>1000,23492=>1000,23493=>1000,23494=>1000,23495=>1000,23497=>1000,23498=>1000,23499=>1000,23500=>1000, -23501=>1000,23502=>1000,23504=>1000,23505=>1000,23506=>1000,23507=>1000,23508=>1000,23510=>1000,23511=>1000,23512=>1000, -23513=>1000,23515=>1000,23517=>1000,23518=>1000,23519=>1000,23520=>1000,23521=>1000,23522=>1000,23523=>1000,23524=>1000, -23525=>1000,23526=>1000,23527=>1000,23528=>1000,23529=>1000,23530=>1000,23531=>1000,23532=>1000,23534=>1000,23535=>1000, -23536=>1000,23537=>1000,23538=>1000,23539=>1000,23541=>1000,23542=>1000,23544=>1000,23545=>1000,23546=>1000,23547=>1000, -23548=>1000,23550=>1000,23551=>1000,23553=>1000,23554=>1000,23555=>1000,23556=>1000,23557=>1000,23558=>1000,23559=>1000, -23560=>1000,23561=>1000,23562=>1000,23563=>1000,23564=>1000,23565=>1000,23566=>1000,23567=>1000,23568=>1000,23569=>1000, -23570=>1000,23571=>1000,23572=>1000,23573=>1000,23574=>1000,23576=>1000,23577=>1000,23578=>1000,23580=>1000,23581=>1000, -23582=>1000,23583=>1000,23584=>1000,23586=>1000,23588=>1000,23589=>1000,23591=>1000,23592=>1000,23594=>1000,23596=>1000, -23597=>1000,23600=>1000,23601=>1000,23603=>1000,23604=>1000,23607=>1000,23608=>1000,23609=>1000,23610=>1000,23611=>1000, -23612=>1000,23613=>1000,23614=>1000,23615=>1000,23616=>1000,23617=>1000,23618=>1000,23620=>1000,23621=>1000,23622=>1000, -23623=>1000,23624=>1000,23625=>1000,23626=>1000,23627=>1000,23628=>1000,23629=>1000,23630=>1000,23631=>1000,23632=>1000, -23633=>1000,23635=>1000,23636=>1000,23637=>1000,23638=>1000,23640=>1000,23641=>1000,23643=>1000,23644=>1000,23645=>1000, -23646=>1000,23648=>1000,23649=>1000,23650=>1000,23651=>1000,23652=>1000,23653=>1000,23654=>1000,23655=>1000,23656=>1000, -23657=>1000,23658=>1000,23660=>1000,23661=>1000,23662=>1000,23663=>1000,23665=>1000,23667=>1000,23668=>1000,23670=>1000, -23673=>1000,23674=>1000,23675=>1000,23676=>1000,23678=>1000,23679=>1000,23681=>1000,23682=>1000,23686=>1000,23688=>1000, -23689=>1000,23690=>1000,23691=>1000,23692=>1000,23693=>1000,23695=>1000,23696=>1000,23697=>1000,23698=>1000,23699=>1000, -23700=>1000,23701=>1000,23702=>1000,23703=>1000,23704=>1000,23705=>1000,23706=>1000,23707=>1000,23708=>1000,23709=>1000, -23711=>1000,23712=>1000,23713=>1000,23714=>1000,23715=>1000,23716=>1000,23717=>1000,23718=>1000,23719=>1000,23720=>1000, -23721=>1000,23722=>1000,23723=>1000,23724=>1000,23725=>1000,23726=>1000,23727=>1000,23728=>1000,23729=>1000,23731=>1000, -23733=>1000,23734=>1000,23735=>1000,23736=>1000,23738=>1000,23739=>1000,23740=>1000,23741=>1000,23742=>1000,23743=>1000, -23744=>1000,23745=>1000,23748=>1000,23749=>1000,23750=>1000,23751=>1000,23752=>1000,23753=>1000,23754=>1000,23755=>1000, -23756=>1000,23758=>1000,23759=>1000,23760=>1000,23762=>1000,23763=>1000,23764=>1000,23766=>1000,23767=>1000,23768=>1000, -23769=>1000,23770=>1000,23771=>1000,23774=>1000,23775=>1000,23776=>1000,23777=>1000,23780=>1000,23781=>1000,23782=>1000, -23784=>1000,23785=>1000,23786=>1000,23788=>1000,23789=>1000,23790=>1000,23791=>1000,23792=>1000,23793=>1000,23796=>1000, -23797=>1000,23798=>1000,23799=>1000,23800=>1000,23801=>1000,23802=>1000,23803=>1000,23805=>1000,23807=>1000,23808=>1000, -23809=>1000,23810=>1000,23811=>1000,23814=>1000,23815=>1000,23819=>1000,23820=>1000,23821=>1000,23822=>1000,23823=>1000, -23825=>1000,23826=>1000,23828=>1000,23829=>1000,23830=>1000,23831=>1000,23832=>1000,23833=>1000,23834=>1000,23835=>1000, -23837=>1000,23838=>1000,23839=>1000,23840=>1000,23842=>1000,23843=>1000,23844=>1000,23845=>1000,23846=>1000,23847=>1000, -23848=>1000,23849=>1000,23853=>1000,23854=>1000,23856=>1000,23857=>1000,23858=>1000,23859=>1000,23860=>1000,23861=>1000, -23862=>1000,23863=>1000,23864=>1000,23865=>1000,23866=>1000,23868=>1000,23869=>1000,23870=>1000,23871=>1000,23872=>1000, -23873=>1000,23874=>1000,23875=>1000,23877=>1000,23879=>1000,23881=>1000,23882=>1000,23883=>1000,23884=>1000,23886=>1000, -23888=>1000,23889=>1000,23890=>1000,23891=>1000,23893=>1000,23896=>1000,23897=>1000,23899=>1000,23900=>1000,23901=>1000, -23902=>1000,23906=>1000,23907=>1000,23909=>1000,23911=>1000,23912=>1000,23913=>1000,23915=>1000,23916=>1000,23917=>1000, -23919=>1000,23921=>1000,23922=>1000,23923=>1000,23924=>1000,23926=>1000,23927=>1000,23929=>1000,23930=>1000,23932=>1000, -23933=>1000,23934=>1000,23935=>1000,23936=>1000,23937=>1000,23938=>1000,23940=>1000,23942=>1000,23943=>1000,23944=>1000, -23945=>1000,23946=>1000,23947=>1000,23948=>1000,23949=>1000,23952=>1000,23954=>1000,23955=>1000,23956=>1000,23957=>1000, -23959=>1000,23961=>1000,23962=>1000,23964=>1000,23965=>1000,23966=>1000,23967=>1000,23968=>1000,23969=>1000,23970=>1000, -23975=>1000,23976=>1000,23977=>1000,23978=>1000,23980=>1000,23981=>1000,23982=>1000,23983=>1000,23984=>1000,23985=>1000, -23986=>1000,23988=>1000,23989=>1000,23991=>1000,23992=>1000,23993=>1000,23994=>1000,23996=>1000,23997=>1000,24000=>1000, -24002=>1000,24003=>1000,24005=>1000,24006=>1000,24007=>1000,24009=>1000,24011=>1000,24012=>1000,24013=>1000,24015=>1000, -24016=>1000,24017=>1000,24018=>1000,24019=>1000,24020=>1000,24021=>1000,24022=>1000,24024=>1000,24027=>1000,24029=>1000, -24030=>1000,24031=>1000,24032=>1000,24033=>1000,24034=>1000,24035=>1000,24037=>1000,24038=>1000,24039=>1000,24040=>1000, -24041=>1000,24043=>1000,24046=>1000,24047=>1000,24048=>1000,24049=>1000,24050=>1000,24051=>1000,24052=>1000,24053=>1000, -24055=>1000,24057=>1000,24059=>1000,24061=>1000,24062=>1000,24063=>1000,24065=>1000,24066=>1000,24067=>1000,24068=>1000, -24069=>1000,24070=>1000,24072=>1000,24074=>1000,24075=>1000,24076=>1000,24078=>1000,24079=>1000,24080=>1000,24081=>1000, -24084=>1000,24085=>1000,24086=>1000,24087=>1000,24088=>1000,24089=>1000,24090=>1000,24091=>1000,24092=>1000,24093=>1000, -24095=>1000,24096=>1000,24097=>1000,24098=>1000,24099=>1000,24100=>1000,24101=>1000,24102=>1000,24103=>1000,24104=>1000, -24105=>1000,24107=>1000,24109=>1000,24110=>1000,24111=>1000,24112=>1000,24113=>1000,24115=>1000,24116=>1000,24118=>1000, -24119=>1000,24120=>1000,24123=>1000,24124=>1000,24125=>1000,24126=>1000,24127=>1000,24128=>1000,24129=>1000,24130=>1000, -24131=>1000,24132=>1000,24133=>1000,24135=>1000,24138=>1000,24139=>1000,24140=>1000,24141=>1000,24142=>1000,24143=>1000, -24147=>1000,24148=>1000,24149=>1000,24151=>1000,24152=>1000,24153=>1000,24155=>1000,24156=>1000,24157=>1000,24158=>1000, -24159=>1000,24160=>1000,24161=>1000,24162=>1000,24163=>1000,24164=>1000,24166=>1000,24167=>1000,24168=>1000,24169=>1000, -24170=>1000,24171=>1000,24172=>1000,24173=>1000,24174=>1000,24175=>1000,24176=>1000,24178=>1000,24179=>1000,24180=>1000, -24181=>1000,24182=>1000,24183=>1000,24184=>1000,24185=>1000,24186=>1000,24187=>1000,24188=>1000,24189=>1000,24190=>1000, -24191=>1000,24192=>1000,24193=>1000,24194=>1000,24195=>1000,24196=>1000,24198=>1000,24199=>1000,24200=>1000,24201=>1000, -24202=>1000,24203=>1000,24204=>1000,24205=>1000,24207=>1000,24208=>1000,24209=>1000,24211=>1000,24212=>1000,24213=>1000, -24214=>1000,24215=>1000,24217=>1000,24218=>1000,24219=>1000,24220=>1000,24222=>1000,24223=>1000,24224=>1000,24226=>1000, -24227=>1000,24228=>1000,24229=>1000,24230=>1000,24231=>1000,24232=>1000,24234=>1000,24235=>1000,24236=>1000,24237=>1000, -24238=>1000,24240=>1000,24241=>1000,24242=>1000,24243=>1000,24244=>1000,24245=>1000,24246=>1000,24247=>1000,24248=>1000, -24249=>1000,24254=>1000,24257=>1000,24258=>1000,24259=>1000,24260=>1000,24261=>1000,24262=>1000,24263=>1000,24264=>1000, -24265=>1000,24266=>1000,24267=>1000,24268=>1000,24270=>1000,24271=>1000,24272=>1000,24273=>1000,24274=>1000,24275=>1000, -24276=>1000,24277=>1000,24278=>1000,24279=>1000,24280=>1000,24281=>1000,24282=>1000,24283=>1000,24284=>1000,24285=>1000, -24286=>1000,24287=>1000,24288=>1000,24289=>1000,24290=>1000,24291=>1000,24293=>1000,24294=>1000,24295=>1000,24296=>1000, -24297=>1000,24298=>1000,24300=>1000,24302=>1000,24303=>1000,24304=>1000,24305=>1000,24306=>1000,24307=>1000,24308=>1000, -24310=>1000,24311=>1000,24312=>1000,24314=>1000,24315=>1000,24316=>1000,24318=>1000,24319=>1000,24320=>1000,24321=>1000, -24322=>1000,24323=>1000,24324=>1000,24325=>1000,24327=>1000,24328=>1000,24329=>1000,24330=>1000,24331=>1000,24332=>1000, -24333=>1000,24335=>1000,24336=>1000,24337=>1000,24338=>1000,24339=>1000,24340=>1000,24341=>1000,24342=>1000,24343=>1000, -24344=>1000,24346=>1000,24347=>1000,24349=>1000,24351=>1000,24352=>1000,24353=>1000,24354=>1000,24355=>1000,24356=>1000, -24357=>1000,24358=>1000,24359=>1000,24360=>1000,24361=>1000,24362=>1000,24365=>1000,24366=>1000,24367=>1000,24368=>1000, -24369=>1000,24371=>1000,24372=>1000,24373=>1000,24374=>1000,24375=>1000,24376=>1000,24377=>1000,24378=>1000,24380=>1000, -24382=>1000,24384=>1000,24385=>1000,24387=>1000,24388=>1000,24389=>1000,24390=>1000,24392=>1000,24393=>1000,24394=>1000, -24395=>1000,24396=>1000,24398=>1000,24399=>1000,24400=>1000,24401=>1000,24402=>1000,24403=>1000,24404=>1000,24405=>1000, -24406=>1000,24407=>1000,24408=>1000,24409=>1000,24411=>1000,24412=>1000,24413=>1000,24417=>1000,24418=>1000,24420=>1000, -24421=>1000,24422=>1000,24423=>1000,24425=>1000,24426=>1000,24427=>1000,24428=>1000,24429=>1000,24431=>1000,24432=>1000, -24433=>1000,24435=>1000,24436=>1000,24438=>1000,24439=>1000,24440=>1000,24441=>1000,24443=>1000,24444=>1000,24445=>1000, -24446=>1000,24447=>1000,24448=>1000,24449=>1000,24450=>1000,24451=>1000,24452=>1000,24453=>1000,24454=>1000,24455=>1000, -24456=>1000,24457=>1000,24458=>1000,24459=>1000,24460=>1000,24464=>1000,24465=>1000,24466=>1000,24467=>1000,24469=>1000, -24470=>1000,24471=>1000,24472=>1000,24473=>1000,24475=>1000,24476=>1000,24478=>1000,24479=>1000,24480=>1000,24481=>1000, -24485=>1000,24486=>1000,24488=>1000,24489=>1000,24490=>1000,24491=>1000,24492=>1000,24493=>1000,24494=>1000,24495=>1000, -24498=>1000,24499=>1000,24500=>1000,24501=>1000,24502=>1000,24503=>1000,24505=>1000,24507=>1000,24508=>1000,24509=>1000, -24510=>1000,24511=>1000,24512=>1000,24513=>1000,24515=>1000,24516=>1000,24517=>1000,24518=>1000,24521=>1000,24524=>1000, -24525=>1000,24527=>1000,24528=>1000,24529=>1000,24530=>1000,24532=>1000,24533=>1000,24534=>1000,24535=>1000,24536=>1000, -24537=>1000,24540=>1000,24541=>1000,24542=>1000,24544=>1000,24545=>1000,24547=>1000,24548=>1000,24549=>1000,24551=>1000, -24552=>1000,24554=>1000,24555=>1000,24557=>1000,24558=>1000,24559=>1000,24560=>1000,24561=>1000,24563=>1000,24564=>1000, -24565=>1000,24567=>1000,24568=>1000,24570=>1000,24571=>1000,24573=>1000,24574=>1000,24575=>1000,24576=>1000,24577=>1000, -24578=>1000,24579=>1000,24580=>1000,24581=>1000,24582=>1000,24585=>1000,24586=>1000,24587=>1000,24588=>1000,24589=>1000, -24590=>1000,24591=>1000,24592=>1000,24593=>1000,24594=>1000,24595=>1000,24596=>1000,24597=>1000,24598=>1000,24599=>1000, -24601=>1000,24602=>1000,24603=>1000,24604=>1000,24605=>1000,24606=>1000,24608=>1000,24609=>1000,24610=>1000,24612=>1000, -24613=>1000,24614=>1000,24615=>1000,24616=>1000,24617=>1000,24618=>1000,24619=>1000,24620=>1000,24621=>1000,24622=>1000, -24623=>1000,24625=>1000,24626=>1000,24627=>1000,24628=>1000,24629=>1000,24631=>1000,24633=>1000,24634=>1000,24635=>1000, -24636=>1000,24639=>1000,24640=>1000,24641=>1000,24642=>1000,24643=>1000,24644=>1000,24645=>1000,24646=>1000,24647=>1000, -24649=>1000,24650=>1000,24651=>1000,24652=>1000,24653=>1000,24656=>1000,24658=>1000,24659=>1000,24660=>1000,24661=>1000, -24664=>1000,24665=>1000,24666=>1000,24667=>1000,24669=>1000,24670=>1000,24671=>1000,24672=>1000,24674=>1000,24675=>1000, -24676=>1000,24677=>1000,24678=>1000,24679=>1000,24680=>1000,24681=>1000,24682=>1000,24683=>1000,24684=>1000,24685=>1000, -24686=>1000,24687=>1000,24688=>1000,24690=>1000,24691=>1000,24693=>1000,24694=>1000,24695=>1000,24696=>1000,24697=>1000, -24698=>1000,24699=>1000,24700=>1000,24701=>1000,24703=>1000,24704=>1000,24705=>1000,24707=>1000,24708=>1000,24709=>1000, -24710=>1000,24711=>1000,24712=>1000,24713=>1000,24714=>1000,24715=>1000,24716=>1000,24717=>1000,24718=>1000,24720=>1000, -24722=>1000,24724=>1000,24725=>1000,24726=>1000,24727=>1000,24730=>1000,24731=>1000,24732=>1000,24733=>1000,24735=>1000, -24736=>1000,24738=>1000,24739=>1000,24740=>1000,24742=>1000,24743=>1000,24744=>1000,24745=>1000,24746=>1000,24747=>1000, -24748=>1000,24749=>1000,24751=>1000,24752=>1000,24753=>1000,24754=>1000,24755=>1000,24756=>1000,24757=>1000,24758=>1000, -24759=>1000,24760=>1000,24761=>1000,24762=>1000,24763=>1000,24764=>1000,24765=>1000,24766=>1000,24767=>1000,24768=>1000, -24769=>1000,24771=>1000,24772=>1000,24773=>1000,24774=>1000,24775=>1000,24776=>1000,24777=>1000,24778=>1000,24779=>1000, -24780=>1000,24781=>1000,24782=>1000,24783=>1000,24785=>1000,24787=>1000,24788=>1000,24789=>1000,24792=>1000,24793=>1000, -24794=>1000,24795=>1000,24796=>1000,24797=>1000,24798=>1000,24799=>1000,24800=>1000,24801=>1000,24802=>1000,24803=>1000, -24804=>1000,24806=>1000,24807=>1000,24808=>1000,24809=>1000,24811=>1000,24812=>1000,24813=>1000,24814=>1000,24815=>1000, -24816=>1000,24817=>1000,24818=>1000,24819=>1000,24820=>1000,24821=>1000,24822=>1000,24823=>1000,24824=>1000,24825=>1000, -24826=>1000,24827=>1000,24828=>1000,24830=>1000,24831=>1000,24832=>1000,24833=>1000,24835=>1000,24836=>1000,24837=>1000, -24838=>1000,24840=>1000,24841=>1000,24842=>1000,24843=>1000,24845=>1000,24846=>1000,24847=>1000,24848=>1000,24849=>1000, -24850=>1000,24851=>1000,24852=>1000,24853=>1000,24854=>1000,24856=>1000,24858=>1000,24859=>1000,24860=>1000,24861=>1000, -24863=>1000,24864=>1000,24865=>1000,24867=>1000,24868=>1000,24870=>1000,24871=>1000,24872=>1000,24873=>1000,24875=>1000, -24876=>1000,24878=>1000,24879=>1000,24880=>1000,24882=>1000,24884=>1000,24886=>1000,24887=>1000,24891=>1000,24892=>1000, -24893=>1000,24894=>1000,24895=>1000,24896=>1000,24897=>1000,24898=>1000,24900=>1000,24901=>1000,24902=>1000,24903=>1000, -24904=>1000,24905=>1000,24906=>1000,24907=>1000,24908=>1000,24909=>1000,24910=>1000,24911=>1000,24913=>1000,24914=>1000, -24915=>1000,24916=>1000,24917=>1000,24918=>1000,24920=>1000,24921=>1000,24922=>1000,24923=>1000,24925=>1000,24926=>1000, -24927=>1000,24929=>1000,24930=>1000,24931=>1000,24932=>1000,24933=>1000,24934=>1000,24935=>1000,24936=>1000,24938=>1000, -24939=>1000,24940=>1000,24942=>1000,24943=>1000,24944=>1000,24945=>1000,24946=>1000,24947=>1000,24948=>1000,24949=>1000, -24950=>1000,24951=>1000,24953=>1000,24954=>1000,24956=>1000,24957=>1000,24958=>1000,24960=>1000,24961=>1000,24962=>1000, -24963=>1000,24967=>1000,24969=>1000,24970=>1000,24971=>1000,24972=>1000,24973=>1000,24974=>1000,24976=>1000,24977=>1000, -24978=>1000,24979=>1000,24980=>1000,24982=>1000,24984=>1000,24985=>1000,24986=>1000,24987=>1000,24989=>1000,24991=>1000, -24993=>1000,24994=>1000,24996=>1000,24999=>1000,25000=>1000,25001=>1000,25002=>1000,25003=>1000,25004=>1000,25005=>1000, -25006=>1000,25007=>1000,25008=>1000,25009=>1000,25010=>1000,25011=>1000,25012=>1000,25013=>1000,25014=>1000,25015=>1000, -25016=>1000,25018=>1000,25020=>1000,25022=>1000,25023=>1000,25025=>1000,25026=>1000,25027=>1000,25029=>1000,25030=>1000, -25031=>1000,25032=>1000,25033=>1000,25034=>1000,25035=>1000,25036=>1000,25037=>1000,25040=>1000,25041=>1000,25042=>1000, -25044=>1000,25046=>1000,25048=>1000,25054=>1000,25055=>1000,25056=>1000,25059=>1000,25060=>1000,25061=>1000,25062=>1000, -25063=>1000,25064=>1000,25065=>1000,25066=>1000,25067=>1000,25069=>1000,25070=>1000,25072=>1000,25073=>1000,25074=>1000, -25076=>1000,25077=>1000,25078=>1000,25079=>1000,25080=>1000,25081=>1000,25082=>1000,25083=>1000,25084=>1000,25085=>1000, -25086=>1000,25087=>1000,25088=>1000,25089=>1000,25091=>1000,25092=>1000,25094=>1000,25095=>1000,25096=>1000,25097=>1000, -25098=>1000,25099=>1000,25100=>1000,25101=>1000,25102=>1000,25103=>1000,25104=>1000,25105=>1000,25106=>1000,25107=>1000, -25108=>1000,25109=>1000,25110=>1000,25111=>1000,25112=>1000,25113=>1000,25114=>1000,25115=>1000,25117=>1000,25118=>1000, -25119=>1000,25120=>1000,25121=>1000,25122=>1000,25123=>1000,25124=>1000,25125=>1000,25126=>1000,25127=>1000,25129=>1000, -25130=>1000,25131=>1000,25132=>1000,25133=>1000,25134=>1000,25135=>1000,25136=>1000,25137=>1000,25138=>1000,25139=>1000, -25140=>1000,25142=>1000,25143=>1000,25144=>1000,25146=>1000,25147=>1000,25149=>1000,25150=>1000,25151=>1000,25152=>1000, -25153=>1000,25154=>1000,25155=>1000,25158=>1000,25159=>1000,25160=>1000,25161=>1000,25162=>1000,25163=>1000,25164=>1000, -25165=>1000,25166=>1000,25168=>1000,25169=>1000,25170=>1000,25171=>1000,25172=>1000,25173=>1000,25176=>1000,25177=>1000, -25178=>1000,25179=>1000,25180=>1000,25182=>1000,25184=>1000,25185=>1000,25186=>1000,25187=>1000,25188=>1000,25189=>1000, -25190=>1000,25191=>1000,25192=>1000,25193=>1000,25194=>1000,25195=>1000,25196=>1000,25197=>1000,25198=>1000,25199=>1000, -25200=>1000,25201=>1000,25202=>1000,25203=>1000,25204=>1000,25206=>1000,25207=>1000,25209=>1000,25210=>1000,25211=>1000, -25212=>1000,25213=>1000,25214=>1000,25215=>1000,25216=>1000,25217=>1000,25218=>1000,25219=>1000,25220=>1000,25222=>1000, -25223=>1000,25224=>1000,25225=>1000,25226=>1000,25228=>1000,25230=>1000,25231=>1000,25233=>1000,25234=>1000,25235=>1000, -25236=>1000,25237=>1000,25238=>1000,25239=>1000,25240=>1000,25242=>1000,25243=>1000,25244=>1000,25246=>1000,25247=>1000, -25248=>1000,25249=>1000,25250=>1000,25252=>1000,25253=>1000,25254=>1000,25256=>1000,25257=>1000,25258=>1000,25259=>1000, -25260=>1000,25261=>1000,25262=>1000,25263=>1000,25264=>1000,25265=>1000,25267=>1000,25268=>1000,25269=>1000,25270=>1000, -25272=>1000,25273=>1000,25275=>1000,25276=>1000,25277=>1000,25278=>1000,25279=>1000,25282=>1000,25284=>1000,25285=>1000, -25286=>1000,25287=>1000,25288=>1000,25289=>1000,25290=>1000,25291=>1000,25292=>1000,25293=>1000,25294=>1000,25295=>1000, -25296=>1000,25297=>1000,25298=>1000,25299=>1000,25300=>1000,25302=>1000,25303=>1000,25304=>1000,25305=>1000,25306=>1000, -25307=>1000,25308=>1000,25309=>1000,25311=>1000,25312=>1000,25313=>1000,25314=>1000,25315=>1000,25317=>1000,25318=>1000, -25319=>1000,25320=>1000,25321=>1000,25323=>1000,25324=>1000,25325=>1000,25326=>1000,25327=>1000,25328=>1000,25329=>1000, -25330=>1000,25331=>1000,25332=>1000,25333=>1000,25334=>1000,25335=>1000,25336=>1000,25337=>1000,25338=>1000,25339=>1000, -25340=>1000,25341=>1000,25342=>1000,25343=>1000,25344=>1000,25345=>1000,25346=>1000,25347=>1000,25351=>1000,25352=>1000, -25353=>1000,25355=>1000,25356=>1000,25357=>1000,25358=>1000,25359=>1000,25360=>1000,25361=>1000,25363=>1000,25364=>1000, -25365=>1000,25366=>1000,25369=>1000,25370=>1000,25371=>1000,25373=>1000,25374=>1000,25375=>1000,25376=>1000,25377=>1000, -25378=>1000,25379=>1000,25380=>1000,25381=>1000,25383=>1000,25384=>1000,25385=>1000,25386=>1000,25387=>1000,25388=>1000, -25389=>1000,25391=>1000,25394=>1000,25395=>1000,25396=>1000,25398=>1000,25400=>1000,25401=>1000,25402=>1000,25403=>1000, -25404=>1000,25405=>1000,25406=>1000,25407=>1000,25408=>1000,25409=>1000,25410=>1000,25411=>1000,25412=>1000,25413=>1000, -25414=>1000,25415=>1000,25416=>1000,25417=>1000,25418=>1000,25419=>1000,25420=>1000,25421=>1000,25422=>1000,25423=>1000, -25424=>1000,25425=>1000,25428=>1000,25429=>1000,25430=>1000,25431=>1000,25432=>1000,25433=>1000,25434=>1000,25436=>1000, -25438=>1000,25439=>1000,25441=>1000,25442=>1000,25443=>1000,25445=>1000,25447=>1000,25448=>1000,25449=>1000,25451=>1000, -25453=>1000,25454=>1000,25455=>1000,25456=>1000,25457=>1000,25458=>1000,25461=>1000,25462=>1000,25463=>1000,25464=>1000, -25466=>1000,25467=>1000,25468=>1000,25469=>1000,25471=>1000,25472=>1000,25473=>1000,25474=>1000,25475=>1000,25476=>1000, -25477=>1000,25479=>1000,25480=>1000,25481=>1000,25482=>1000,25484=>1000,25485=>1000,25486=>1000,25487=>1000,25488=>1000, -25489=>1000,25490=>1000,25492=>1000,25494=>1000,25495=>1000,25496=>1000,25497=>1000,25499=>1000,25500=>1000,25501=>1000, -25502=>1000,25503=>1000,25504=>1000,25505=>1000,25506=>1000,25507=>1000,25508=>1000,25509=>1000,25511=>1000,25512=>1000, -25513=>1000,25514=>1000,25515=>1000,25516=>1000,25517=>1000,25518=>1000,25519=>1000,25520=>1000,25521=>1000,25522=>1000, -25523=>1000,25524=>1000,25525=>1000,25527=>1000,25528=>1000,25530=>1000,25531=>1000,25532=>1000,25533=>1000,25534=>1000, -25536=>1000,25538=>1000,25539=>1000,25540=>1000,25541=>1000,25542=>1000,25543=>1000,25544=>1000,25545=>1000,25546=>1000, -25547=>1000,25548=>1000,25549=>1000,25550=>1000,25551=>1000,25552=>1000,25554=>1000,25555=>1000,25557=>1000,25558=>1000, -25559=>1000,25560=>1000,25561=>1000,25562=>1000,25563=>1000,25564=>1000,25565=>1000,25566=>1000,25567=>1000,25568=>1000, -25569=>1000,25571=>1000,25572=>1000,25573=>1000,25575=>1000,25576=>1000,25577=>1000,25578=>1000,25579=>1000,25581=>1000, -25582=>1000,25583=>1000,25584=>1000,25585=>1000,25586=>1000,25587=>1000,25588=>1000,25589=>1000,25590=>1000,25591=>1000, -25592=>1000,25593=>1000,25594=>1000,25597=>1000,25599=>1000,25600=>1000,25601=>1000,25602=>1000,25605=>1000,25606=>1000, -25609=>1000,25610=>1000,25611=>1000,25612=>1000,25613=>1000,25614=>1000,25615=>1000,25616=>1000,25618=>1000,25619=>1000, -25620=>1000,25621=>1000,25622=>1000,25623=>1000,25624=>1000,25626=>1000,25627=>1000,25628=>1000,25630=>1000,25631=>1000, -25632=>1000,25633=>1000,25634=>1000,25635=>1000,25636=>1000,25637=>1000,25638=>1000,25639=>1000,25640=>1000,25642=>1000, -25643=>1000,25644=>1000,25645=>1000,25646=>1000,25647=>1000,25648=>1000,25651=>1000,25652=>1000,25653=>1000,25654=>1000, -25655=>1000,25657=>1000,25658=>1000,25661=>1000,25662=>1000,25663=>1000,25664=>1000,25665=>1000,25666=>1000,25667=>1000, -25668=>1000,25669=>1000,25670=>1000,25671=>1000,25672=>1000,25674=>1000,25675=>1000,25677=>1000,25678=>1000,25680=>1000, -25681=>1000,25682=>1000,25683=>1000,25684=>1000,25688=>1000,25689=>1000,25691=>1000,25692=>1000,25693=>1000,25694=>1000, -25695=>1000,25696=>1000,25697=>1000,25701=>1000,25702=>1000,25703=>1000,25704=>1000,25705=>1000,25707=>1000,25708=>1000, -25709=>1000,25710=>1000,25711=>1000,25712=>1000,25714=>1000,25715=>1000,25716=>1000,25717=>1000,25718=>1000,25719=>1000, -25720=>1000,25721=>1000,25722=>1000,25723=>1000,25725=>1000,25727=>1000,25730=>1000,25731=>1000,25732=>1000,25733=>1000, -25735=>1000,25736=>1000,25737=>1000,25738=>1000,25739=>1000,25740=>1000,25743=>1000,25744=>1000,25745=>1000,25746=>1000, -25747=>1000,25749=>1000,25750=>1000,25751=>1000,25752=>1000,25753=>1000,25754=>1000,25756=>1000,25757=>1000,25758=>1000, -25759=>1000,25760=>1000,25762=>1000,25763=>1000,25764=>1000,25765=>1000,25766=>1000,25769=>1000,25771=>1000,25772=>1000, -25773=>1000,25774=>1000,25776=>1000,25777=>1000,25778=>1000,25779=>1000,25781=>1000,25783=>1000,25784=>1000,25785=>1000, -25786=>1000,25787=>1000,25788=>1000,25789=>1000,25790=>1000,25791=>1000,25792=>1000,25793=>1000,25794=>1000,25795=>1000, -25796=>1000,25797=>1000,25799=>1000,25801=>1000,25802=>1000,25803=>1000,25805=>1000,25806=>1000,25807=>1000,25808=>1000, -25810=>1000,25812=>1000,25814=>1000,25815=>1000,25816=>1000,25817=>1000,25818=>1000,25819=>1000,25822=>1000,25824=>1000, -25825=>1000,25826=>1000,25827=>1000,25828=>1000,25829=>1000,25830=>1000,25831=>1000,25832=>1000,25833=>1000,25835=>1000, -25836=>1000,25837=>1000,25839=>1000,25840=>1000,25841=>1000,25842=>1000,25843=>1000,25844=>1000,25846=>1000,25847=>1000, -25848=>1000,25850=>1000,25851=>1000,25852=>1000,25853=>1000,25854=>1000,25855=>1000,25856=>1000,25857=>1000,25859=>1000, -25860=>1000,25861=>1000,25862=>1000,25863=>1000,25865=>1000,25868=>1000,25869=>1000,25870=>1000,25871=>1000,25872=>1000, -25874=>1000,25875=>1000,25876=>1000,25877=>1000,25878=>1000,25879=>1000,25880=>1000,25881=>1000,25883=>1000,25884=>1000, -25885=>1000,25888=>1000,25889=>1000,25890=>1000,25891=>1000,25892=>1000,25893=>1000,25894=>1000,25897=>1000,25898=>1000, -25899=>1000,25900=>1000,25901=>1000,25902=>1000,25903=>1000,25906=>1000,25907=>1000,25908=>1000,25909=>1000,25910=>1000, -25911=>1000,25912=>1000,25913=>1000,25915=>1000,25917=>1000,25918=>1000,25919=>1000,25921=>1000,25923=>1000,25925=>1000, -25926=>1000,25928=>1000,25929=>1000,25930=>1000,25932=>1000,25933=>1000,25934=>1000,25935=>1000,25937=>1000,25939=>1000, -25940=>1000,25941=>1000,25942=>1000,25943=>1000,25944=>1000,25945=>1000,25947=>1000,25948=>1000,25949=>1000,25950=>1000, -25954=>1000,25955=>1000,25956=>1000,25957=>1000,25958=>1000,25959=>1000,25960=>1000,25962=>1000,25963=>1000,25964=>1000, -25965=>1000,25967=>1000,25968=>1000,25970=>1000,25971=>1000,25972=>1000,25973=>1000,25974=>1000,25975=>1000,25976=>1000, -25977=>1000,25978=>1000,25979=>1000,25980=>1000,25982=>1000,25983=>1000,25984=>1000,25985=>1000,25986=>1000,25987=>1000, -25988=>1000,25989=>1000,25991=>1000,25992=>1000,25993=>1000,25995=>1000,25996=>1000,25998=>1000,26000=>1000,26001=>1000, -26002=>1000,26003=>1000,26004=>1000,26005=>1000,26006=>1000,26007=>1000,26009=>1000,26011=>1000,26012=>1000,26013=>1000, -26014=>1000,26015=>1000,26016=>1000,26017=>1000,26018=>1000,26020=>1000,26021=>1000,26023=>1000,26024=>1000,26025=>1000, -26026=>1000,26027=>1000,26028=>1000,26029=>1000,26030=>1000,26031=>1000,26032=>1000,26034=>1000,26035=>1000,26038=>1000, -26039=>1000,26040=>1000,26041=>1000,26043=>1000,26044=>1000,26045=>1000,26047=>1000,26049=>1000,26050=>1000,26051=>1000, -26052=>1000,26053=>1000,26054=>1000,26059=>1000,26060=>1000,26061=>1000,26062=>1000,26063=>1000,26064=>1000,26066=>1000, -26067=>1000,26070=>1000,26071=>1000,26073=>1000,26074=>1000,26075=>1000,26077=>1000,26078=>1000,26079=>1000,26080=>1000, -26081=>1000,26082=>1000,26083=>1000,26085=>1000,26086=>1000,26087=>1000,26088=>1000,26089=>1000,26092=>1000,26093=>1000, -26094=>1000,26095=>1000,26096=>1000,26097=>1000,26098=>1000,26099=>1000,26100=>1000,26101=>1000,26102=>1000,26103=>1000, -26106=>1000,26107=>1000,26108=>1000,26109=>1000,26111=>1000,26112=>1000,26114=>1000,26115=>1000,26116=>1000,26117=>1000, -26118=>1000,26119=>1000,26120=>1000,26121=>1000,26122=>1000,26123=>1000,26124=>1000,26125=>1000,26126=>1000,26127=>1000, -26128=>1000,26129=>1000,26130=>1000,26131=>1000,26132=>1000,26133=>1000,26137=>1000,26140=>1000,26141=>1000,26142=>1000, -26143=>1000,26144=>1000,26145=>1000,26146=>1000,26148=>1000,26149=>1000,26150=>1000,26151=>1000,26152=>1000,26155=>1000, -26157=>1000,26158=>1000,26159=>1000,26160=>1000,26161=>1000,26162=>1000,26163=>1000,26164=>1000,26165=>1000,26166=>1000, -26169=>1000,26170=>1000,26171=>1000,26172=>1000,26174=>1000,26175=>1000,26177=>1000,26178=>1000,26179=>1000,26180=>1000, -26181=>1000,26183=>1000,26185=>1000,26186=>1000,26187=>1000,26188=>1000,26191=>1000,26193=>1000,26194=>1000,26195=>1000, -26196=>1000,26197=>1000,26198=>1000,26199=>1000,26201=>1000,26202=>1000,26203=>1000,26204=>1000,26205=>1000,26206=>1000, -26207=>1000,26209=>1000,26210=>1000,26212=>1000,26213=>1000,26214=>1000,26215=>1000,26216=>1000,26217=>1000,26218=>1000, -26219=>1000,26220=>1000,26222=>1000,26223=>1000,26224=>1000,26225=>1000,26226=>1000,26227=>1000,26228=>1000,26230=>1000, -26231=>1000,26232=>1000,26233=>1000,26234=>1000,26235=>1000,26236=>1000,26238=>1000,26240=>1000,26241=>1000,26242=>1000, -26243=>1000,26244=>1000,26246=>1000,26247=>1000,26248=>1000,26249=>1000,26250=>1000,26251=>1000,26252=>1000,26253=>1000, -26254=>1000,26256=>1000,26257=>1000,26260=>1000,26261=>1000,26262=>1000,26263=>1000,26264=>1000,26265=>1000,26269=>1000, -26271=>1000,26272=>1000,26273=>1000,26274=>1000,26278=>1000,26279=>1000,26280=>1000,26281=>1000,26282=>1000,26283=>1000, -26286=>1000,26287=>1000,26288=>1000,26289=>1000,26290=>1000,26291=>1000,26292=>1000,26293=>1000,26295=>1000,26296=>1000, -26297=>1000,26298=>1000,26299=>1000,26300=>1000,26301=>1000,26302=>1000,26303=>1000,26304=>1000,26305=>1000,26308=>1000, -26310=>1000,26311=>1000,26312=>1000,26313=>1000,26314=>1000,26315=>1000,26316=>1000,26319=>1000,26322=>1000,26326=>1000, -26328=>1000,26329=>1000,26330=>1000,26331=>1000,26332=>1000,26333=>1000,26334=>1000,26336=>1000,26339=>1000,26340=>1000, -26342=>1000,26344=>1000,26345=>1000,26347=>1000,26348=>1000,26349=>1000,26350=>1000,26352=>1000,26354=>1000,26355=>1000, -26356=>1000,26357=>1000,26358=>1000,26359=>1000,26360=>1000,26361=>1000,26362=>1000,26363=>1000,26364=>1000,26365=>1000, -26366=>1000,26367=>1000,26368=>1000,26369=>1000,26371=>1000,26372=>1000,26373=>1000,26376=>1000,26377=>1000,26378=>1000, -26379=>1000,26381=>1000,26382=>1000,26383=>1000,26384=>1000,26386=>1000,26387=>1000,26388=>1000,26389=>1000,26390=>1000, -26391=>1000,26392=>1000,26395=>1000,26397=>1000,26398=>1000,26399=>1000,26400=>1000,26401=>1000,26402=>1000,26403=>1000, -26406=>1000,26407=>1000,26408=>1000,26410=>1000,26411=>1000,26412=>1000,26413=>1000,26414=>1000,26415=>1000,26417=>1000, -26419=>1000,26420=>1000,26421=>1000,26422=>1000,26423=>1000,26424=>1000,26425=>1000,26426=>1000,26427=>1000,26428=>1000, -26429=>1000,26430=>1000,26431=>1000,26432=>1000,26433=>1000,26434=>1000,26435=>1000,26437=>1000,26438=>1000,26439=>1000, -26440=>1000,26441=>1000,26443=>1000,26444=>1000,26445=>1000,26446=>1000,26447=>1000,26448=>1000,26449=>1000,26451=>1000, -26453=>1000,26454=>1000,26455=>1000,26457=>1000,26458=>1000,26460=>1000,26461=>1000,26462=>1000,26463=>1000,26464=>1000, -26465=>1000,26466=>1000,26467=>1000,26468=>1000,26469=>1000,26470=>1000,26472=>1000,26473=>1000,26474=>1000,26476=>1000, -26477=>1000,26479=>1000,26480=>1000,26481=>1000,26482=>1000,26483=>1000,26484=>1000,26485=>1000,26486=>1000,26487=>1000, -26488=>1000,26489=>1000,26490=>1000,26491=>1000,26492=>1000,26493=>1000,26494=>1000,26495=>1000,26497=>1000,26499=>1000, -26500=>1000,26501=>1000,26502=>1000,26503=>1000,26505=>1000,26507=>1000,26508=>1000,26509=>1000,26510=>1000,26511=>1000, -26512=>1000,26513=>1000,26514=>1000,26515=>1000,26516=>1000,26517=>1000,26519=>1000,26520=>1000,26521=>1000,26522=>1000, -26524=>1000,26525=>1000,26526=>1000,26527=>1000,26528=>1000,26529=>1000,26530=>1000,26531=>1000,26533=>1000,26534=>1000, -26535=>1000,26536=>1000,26537=>1000,26538=>1000,26539=>1000,26541=>1000,26542=>1000,26543=>1000,26544=>1000,26546=>1000, -26547=>1000,26548=>1000,26549=>1000,26550=>1000,26551=>1000,26552=>1000,26553=>1000,26554=>1000,26555=>1000,26558=>1000, -26560=>1000,26561=>1000,26562=>1000,26563=>1000,26564=>1000,26565=>1000,26566=>1000,26568=>1000,26569=>1000,26570=>1000, -26571=>1000,26572=>1000,26573=>1000,26574=>1000,26575=>1000,26576=>1000,26577=>1000,26578=>1000,26579=>1000,26580=>1000, -26584=>1000,26585=>1000,26586=>1000,26587=>1000,26588=>1000,26589=>1000,26590=>1000,26591=>1000,26592=>1000,26594=>1000, -26595=>1000,26596=>1000,26597=>1000,26598=>1000,26599=>1000,26601=>1000,26602=>1000,26603=>1000,26604=>1000,26605=>1000, -26606=>1000,26607=>1000,26608=>1000,26609=>1000,26610=>1000,26611=>1000,26612=>1000,26613=>1000,26614=>1000,26615=>1000, -26616=>1000,26618=>1000,26619=>1000,26620=>1000,26621=>1000,26622=>1000,26623=>1000,26624=>1000,26625=>1000,26626=>1000, -26627=>1000,26628=>1000,26629=>1000,26631=>1000,26632=>1000,26633=>1000,26634=>1000,26635=>1000,26636=>1000,26638=>1000, -26639=>1000,26641=>1000,26642=>1000,26643=>1000,26644=>1000,26646=>1000,26647=>1000,26648=>1000,26650=>1000,26652=>1000, -26653=>1000,26654=>1000,26655=>1000,26656=>1000,26657=>1000,26658=>1000,26661=>1000,26662=>1000,26664=>1000,26665=>1000, -26666=>1000,26667=>1000,26669=>1000,26670=>1000,26671=>1000,26673=>1000,26674=>1000,26675=>1000,26676=>1000,26677=>1000, -26679=>1000,26680=>1000,26681=>1000,26682=>1000,26683=>1000,26684=>1000,26685=>1000,26686=>1000,26688=>1000,26689=>1000, -26690=>1000,26691=>1000,26692=>1000,26693=>1000,26694=>1000,26696=>1000,26697=>1000,26698=>1000,26699=>1000,26700=>1000, -26701=>1000,26702=>1000,26703=>1000,26704=>1000,26705=>1000,26706=>1000,26707=>1000,26708=>1000,26709=>1000,26713=>1000, -26716=>1000,26717=>1000,26719=>1000,26720=>1000,26721=>1000,26722=>1000,26723=>1000,26724=>1000,26725=>1000,26726=>1000, -26727=>1000,26728=>1000,26729=>1000,26731=>1000,26733=>1000,26734=>1000,26735=>1000,26737=>1000,26738=>1000,26740=>1000, -26741=>1000,26742=>1000,26743=>1000,26744=>1000,26745=>1000,26747=>1000,26748=>1000,26749=>1000,26750=>1000,26751=>1000, -26752=>1000,26753=>1000,26754=>1000,26755=>1000,26757=>1000,26758=>1000,26759=>1000,26761=>1000,26762=>1000,26763=>1000, -26764=>1000,26765=>1000,26767=>1000,26768=>1000,26769=>1000,26770=>1000,26771=>1000,26772=>1000,26774=>1000,26775=>1000, -26779=>1000,26780=>1000,26781=>1000,26783=>1000,26784=>1000,26785=>1000,26786=>1000,26787=>1000,26788=>1000,26790=>1000, -26791=>1000,26792=>1000,26793=>1000,26794=>1000,26795=>1000,26796=>1000,26797=>1000,26798=>1000,26799=>1000,26800=>1000, -26801=>1000,26802=>1000,26803=>1000,26804=>1000,26805=>1000,26806=>1000,26809=>1000,26810=>1000,26812=>1000,26816=>1000, -26818=>1000,26820=>1000,26821=>1000,26822=>1000,26823=>1000,26824=>1000,26825=>1000,26826=>1000,26827=>1000,26828=>1000, -26829=>1000,26830=>1000,26831=>1000,26832=>1000,26833=>1000,26834=>1000,26835=>1000,26836=>1000,26837=>1000,26838=>1000, -26839=>1000,26840=>1000,26842=>1000,26844=>1000,26845=>1000,26846=>1000,26847=>1000,26848=>1000,26849=>1000,26851=>1000, -26852=>1000,26854=>1000,26855=>1000,26856=>1000,26857=>1000,26858=>1000,26859=>1000,26860=>1000,26862=>1000,26863=>1000, -26864=>1000,26865=>1000,26866=>1000,26867=>1000,26868=>1000,26869=>1000,26870=>1000,26871=>1000,26872=>1000,26873=>1000, -26874=>1000,26875=>1000,26876=>1000,26877=>1000,26880=>1000,26881=>1000,26884=>1000,26885=>1000,26886=>1000,26887=>1000, -26888=>1000,26890=>1000,26891=>1000,26892=>1000,26893=>1000,26894=>1000,26895=>1000,26896=>1000,26897=>1000,26898=>1000, -26899=>1000,26900=>1000,26901=>1000,26903=>1000,26905=>1000,26906=>1000,26907=>1000,26908=>1000,26911=>1000,26912=>1000, -26913=>1000,26914=>1000,26915=>1000,26916=>1000,26917=>1000,26918=>1000,26919=>1000,26920=>1000,26922=>1000,26925=>1000, -26927=>1000,26928=>1000,26930=>1000,26931=>1000,26932=>1000,26933=>1000,26934=>1000,26935=>1000,26936=>1000,26937=>1000, -26939=>1000,26940=>1000,26941=>1000,26943=>1000,26944=>1000,26945=>1000,26946=>1000,26948=>1000,26949=>1000,26952=>1000, -26953=>1000,26954=>1000,26955=>1000,26956=>1000,26958=>1000,26959=>1000,26961=>1000,26962=>1000,26963=>1000,26964=>1000, -26965=>1000,26966=>1000,26967=>1000,26968=>1000,26969=>1000,26970=>1000,26971=>1000,26972=>1000,26973=>1000,26974=>1000, -26975=>1000,26976=>1000,26977=>1000,26978=>1000,26979=>1000,26981=>1000,26982=>1000,26984=>1000,26985=>1000,26986=>1000, -26987=>1000,26988=>1000,26989=>1000,26990=>1000,26991=>1000,26992=>1000,26993=>1000,26995=>1000,26996=>1000,26997=>1000, -26998=>1000,26999=>1000,27000=>1000,27001=>1000,27002=>1000,27003=>1000,27004=>1000,27005=>1000,27006=>1000,27008=>1000, -27009=>1000,27010=>1000,27011=>1000,27012=>1000,27014=>1000,27015=>1000,27016=>1000,27017=>1000,27018=>1000,27021=>1000, -27022=>1000,27024=>1000,27025=>1000,27027=>1000,27028=>1000,27029=>1000,27030=>1000,27031=>1000,27032=>1000,27033=>1000, -27034=>1000,27035=>1000,27036=>1000,27038=>1000,27040=>1000,27041=>1000,27043=>1000,27044=>1000,27045=>1000,27046=>1000, -27047=>1000,27048=>1000,27049=>1000,27050=>1000,27051=>1000,27052=>1000,27053=>1000,27054=>1000,27055=>1000,27056=>1000, -27057=>1000,27058=>1000,27059=>1000,27060=>1000,27061=>1000,27062=>1000,27063=>1000,27065=>1000,27067=>1000,27068=>1000, -27069=>1000,27070=>1000,27071=>1000,27073=>1000,27074=>1000,27075=>1000,27076=>1000,27078=>1000,27079=>1000,27081=>1000, -27082=>1000,27083=>1000,27084=>1000,27085=>1000,27086=>1000,27087=>1000,27088=>1000,27091=>1000,27092=>1000,27096=>1000, -27097=>1000,27099=>1000,27101=>1000,27102=>1000,27103=>1000,27104=>1000,27106=>1000,27108=>1000,27109=>1000,27110=>1000, -27111=>1000,27112=>1000,27114=>1000,27115=>1000,27116=>1000,27117=>1000,27118=>1000,27121=>1000,27122=>1000,27123=>1000, -27124=>1000,27126=>1000,27127=>1000,27128=>1000,27129=>1000,27131=>1000,27132=>1000,27133=>1000,27134=>1000,27135=>1000, -27136=>1000,27137=>1000,27138=>1000,27140=>1000,27141=>1000,27142=>1000,27143=>1000,27144=>1000,27145=>1000,27146=>1000, -27147=>1000,27148=>1000,27149=>1000,27151=>1000,27153=>1000,27154=>1000,27155=>1000,27156=>1000,27157=>1000,27158=>1000, -27159=>1000,27160=>1000,27161=>1000,27163=>1000,27165=>1000,27166=>1000,27167=>1000,27168=>1000,27169=>1000,27170=>1000, -27171=>1000,27173=>1000,27174=>1000,27175=>1000,27176=>1000,27177=>1000,27178=>1000,27179=>1000,27182=>1000,27183=>1000, -27184=>1000,27185=>1000,27186=>1000,27188=>1000,27189=>1000,27190=>1000,27192=>1000,27193=>1000,27194=>1000,27195=>1000, -27196=>1000,27197=>1000,27198=>1000,27199=>1000,27200=>1000,27201=>1000,27204=>1000,27206=>1000,27207=>1000,27208=>1000, -27209=>1000,27211=>1000,27213=>1000,27214=>1000,27215=>1000,27216=>1000,27217=>1000,27218=>1000,27219=>1000,27220=>1000, -27221=>1000,27222=>1000,27224=>1000,27225=>1000,27226=>1000,27227=>1000,27229=>1000,27230=>1000,27231=>1000,27232=>1000, -27233=>1000,27234=>1000,27236=>1000,27237=>1000,27238=>1000,27239=>1000,27240=>1000,27241=>1000,27242=>1000,27243=>1000, -27245=>1000,27247=>1000,27249=>1000,27250=>1000,27251=>1000,27254=>1000,27256=>1000,27257=>1000,27260=>1000,27262=>1000, -27263=>1000,27264=>1000,27265=>1000,27267=>1000,27268=>1000,27269=>1000,27271=>1000,27273=>1000,27276=>1000,27277=>1000, -27278=>1000,27280=>1000,27281=>1000,27282=>1000,27283=>1000,27284=>1000,27285=>1000,27286=>1000,27287=>1000,27290=>1000, -27291=>1000,27292=>1000,27294=>1000,27295=>1000,27296=>1000,27297=>1000,27298=>1000,27299=>1000,27300=>1000,27301=>1000, -27302=>1000,27304=>1000,27305=>1000,27306=>1000,27307=>1000,27308=>1000,27309=>1000,27310=>1000,27311=>1000,27315=>1000, -27316=>1000,27318=>1000,27319=>1000,27320=>1000,27321=>1000,27322=>1000,27323=>1000,27325=>1000,27329=>1000,27330=>1000, -27331=>1000,27333=>1000,27334=>1000,27335=>1000,27339=>1000,27340=>1000,27341=>1000,27343=>1000,27344=>1000,27345=>1000, -27347=>1000,27353=>1000,27354=>1000,27355=>1000,27356=>1000,27357=>1000,27358=>1000,27359=>1000,27360=>1000,27361=>1000, -27362=>1000,27364=>1000,27365=>1000,27367=>1000,27368=>1000,27370=>1000,27371=>1000,27372=>1000,27374=>1000,27375=>1000, -27376=>1000,27377=>1000,27379=>1000,27382=>1000,27384=>1000,27385=>1000,27386=>1000,27387=>1000,27388=>1000,27392=>1000, -27394=>1000,27395=>1000,27396=>1000,27397=>1000,27400=>1000,27401=>1000,27402=>1000,27403=>1000,27404=>1000,27407=>1000, -27408=>1000,27409=>1000,27410=>1000,27411=>1000,27414=>1000,27415=>1000,27416=>1000,27417=>1000,27418=>1000,27421=>1000, -27422=>1000,27423=>1000,27424=>1000,27425=>1000,27426=>1000,27427=>1000,27428=>1000,27429=>1000,27431=>1000,27432=>1000, -27436=>1000,27437=>1000,27439=>1000,27441=>1000,27442=>1000,27443=>1000,27444=>1000,27446=>1000,27447=>1000,27448=>1000, -27449=>1000,27450=>1000,27451=>1000,27452=>1000,27453=>1000,27454=>1000,27455=>1000,27457=>1000,27458=>1000,27459=>1000, -27461=>1000,27462=>1000,27463=>1000,27464=>1000,27465=>1000,27466=>1000,27467=>1000,27468=>1000,27469=>1000,27470=>1000, -27472=>1000,27473=>1000,27475=>1000,27476=>1000,27477=>1000,27478=>1000,27481=>1000,27483=>1000,27484=>1000,27486=>1000, -27487=>1000,27488=>1000,27489=>1000,27490=>1000,27491=>1000,27492=>1000,27493=>1000,27494=>1000,27495=>1000,27497=>1000, -27498=>1000,27501=>1000,27503=>1000,27506=>1000,27507=>1000,27508=>1000,27510=>1000,27511=>1000,27512=>1000,27513=>1000, -27515=>1000,27516=>1000,27518=>1000,27519=>1000,27520=>1000,27521=>1000,27522=>1000,27523=>1000,27524=>1000,27526=>1000, -27527=>1000,27528=>1000,27529=>1000,27530=>1000,27531=>1000,27532=>1000,27533=>1000,27534=>1000,27535=>1000,27537=>1000, -27538=>1000,27539=>1000,27540=>1000,27541=>1000,27542=>1000,27543=>1000,27544=>1000,27545=>1000,27546=>1000,27547=>1000, -27550=>1000,27551=>1000,27552=>1000,27553=>1000,27554=>1000,27555=>1000,27556=>1000,27557=>1000,27558=>1000,27559=>1000, -27562=>1000,27563=>1000,27565=>1000,27566=>1000,27567=>1000,27568=>1000,27569=>1000,27570=>1000,27571=>1000,27572=>1000, -27573=>1000,27574=>1000,27575=>1000,27578=>1000,27579=>1000,27580=>1000,27581=>1000,27583=>1000,27584=>1000,27585=>1000, -27586=>1000,27587=>1000,27588=>1000,27589=>1000,27590=>1000,27591=>1000,27592=>1000,27593=>1000,27594=>1000,27595=>1000, -27596=>1000,27597=>1000,27598=>1000,27599=>1000,27600=>1000,27602=>1000,27603=>1000,27604=>1000,27605=>1000,27606=>1000, -27607=>1000,27608=>1000,27609=>1000,27610=>1000,27611=>1000,27614=>1000,27615=>1000,27616=>1000,27617=>1000,27618=>1000, -27619=>1000,27620=>1000,27622=>1000,27623=>1000,27624=>1000,27626=>1000,27627=>1000,27628=>1000,27631=>1000,27632=>1000, -27634=>1000,27635=>1000,27637=>1000,27639=>1000,27640=>1000,27641=>1000,27643=>1000,27644=>1000,27645=>1000,27646=>1000, -27647=>1000,27648=>1000,27649=>1000,27650=>1000,27651=>1000,27652=>1000,27653=>1000,27654=>1000,27655=>1000,27656=>1000, -27657=>1000,27659=>1000,27660=>1000,27661=>1000,27663=>1000,27664=>1000,27665=>1000,27667=>1000,27668=>1000,27669=>1000, -27670=>1000,27671=>1000,27672=>1000,27673=>1000,27674=>1000,27675=>1000,27677=>1000,27679=>1000,27680=>1000,27681=>1000, -27682=>1000,27683=>1000,27684=>1000,27685=>1000,27686=>1000,27687=>1000,27688=>1000,27689=>1000,27690=>1000,27691=>1000, -27692=>1000,27694=>1000,27695=>1000,27696=>1000,27698=>1000,27699=>1000,27700=>1000,27701=>1000,27702=>1000,27703=>1000, -27704=>1000,27707=>1000,27709=>1000,27710=>1000,27711=>1000,27712=>1000,27713=>1000,27714=>1000,27715=>1000,27718=>1000, -27719=>1000,27721=>1000,27722=>1000,27723=>1000,27724=>1000,27725=>1000,27726=>1000,27727=>1000,27728=>1000,27730=>1000, -27732=>1000,27733=>1000,27735=>1000,27737=>1000,27738=>1000,27739=>1000,27740=>1000,27741=>1000,27742=>1000,27743=>1000, -27744=>1000,27745=>1000,27746=>1000,27748=>1000,27749=>1000,27750=>1000,27751=>1000,27752=>1000,27753=>1000,27754=>1000, -27755=>1000,27757=>1000,27759=>1000,27760=>1000,27761=>1000,27762=>1000,27763=>1000,27764=>1000,27766=>1000,27768=>1000, -27769=>1000,27770=>1000,27771=>1000,27773=>1000,27774=>1000,27776=>1000,27777=>1000,27778=>1000,27779=>1000,27780=>1000, -27781=>1000,27782=>1000,27783=>1000,27784=>1000,27785=>1000,27786=>1000,27787=>1000,27788=>1000,27789=>1000,27790=>1000, -27791=>1000,27792=>1000,27794=>1000,27795=>1000,27796=>1000,27797=>1000,27798=>1000,27800=>1000,27801=>1000,27802=>1000, -27803=>1000,27804=>1000,27805=>1000,27807=>1000,27809=>1000,27810=>1000,27811=>1000,27812=>1000,27813=>1000,27814=>1000, -27815=>1000,27817=>1000,27818=>1000,27819=>1000,27820=>1000,27821=>1000,27822=>1000,27824=>1000,27825=>1000,27826=>1000, -27827=>1000,27828=>1000,27830=>1000,27831=>1000,27832=>1000,27833=>1000,27834=>1000,27835=>1000,27836=>1000,27837=>1000, -27838=>1000,27839=>1000,27840=>1000,27841=>1000,27842=>1000,27843=>1000,27844=>1000,27845=>1000,27846=>1000,27847=>1000, -27849=>1000,27850=>1000,27852=>1000,27853=>1000,27855=>1000,27856=>1000,27857=>1000,27858=>1000,27859=>1000,27860=>1000, -27861=>1000,27862=>1000,27863=>1000,27865=>1000,27866=>1000,27867=>1000,27868=>1000,27869=>1000,27870=>1000,27872=>1000, -27873=>1000,27874=>1000,27875=>1000,27877=>1000,27879=>1000,27880=>1000,27881=>1000,27882=>1000,27883=>1000,27884=>1000, -27885=>1000,27886=>1000,27887=>1000,27888=>1000,27889=>1000,27890=>1000,27891=>1000,27893=>1000,27894=>1000,27895=>1000, -27896=>1000,27897=>1000,27898=>1000,27899=>1000,27900=>1000,27901=>1000,27902=>1000,27904=>1000,27905=>1000,27907=>1000, -27908=>1000,27911=>1000,27912=>1000,27913=>1000,27914=>1000,27915=>1000,27916=>1000,27917=>1000,27918=>1000,27919=>1000, -27920=>1000,27921=>1000,27922=>1000,27926=>1000,27927=>1000,27928=>1000,27929=>1000,27930=>1000,27931=>1000,27933=>1000, -27934=>1000,27935=>1000,27936=>1000,27938=>1000,27941=>1000,27943=>1000,27944=>1000,27945=>1000,27946=>1000,27947=>1000, -27948=>1000,27949=>1000,27950=>1000,27951=>1000,27952=>1000,27953=>1000,27954=>1000,27955=>1000,27956=>1000,27957=>1000, -27958=>1000,27959=>1000,27960=>1000,27961=>1000,27962=>1000,27963=>1000,27964=>1000,27965=>1000,27966=>1000,27967=>1000, -27968=>1000,27969=>1000,27970=>1000,27971=>1000,27972=>1000,27973=>1000,27974=>1000,27975=>1000,27976=>1000,27978=>1000, -27979=>1000,27981=>1000,27982=>1000,27983=>1000,27985=>1000,27986=>1000,27987=>1000,27988=>1000,27992=>1000,27993=>1000, -27994=>1000,27996=>1000,27998=>1000,27999=>1000,28000=>1000,28001=>1000,28002=>1000,28003=>1000,28004=>1000,28005=>1000, -28006=>1000,28007=>1000,28008=>1000,28009=>1000,28010=>1000,28012=>1000,28013=>1000,28014=>1000,28015=>1000,28016=>1000, -28020=>1000,28021=>1000,28022=>1000,28023=>1000,28024=>1000,28025=>1000,28026=>1000,28027=>1000,28028=>1000,28029=>1000, -28030=>1000,28031=>1000,28032=>1000,28034=>1000,28035=>1000,28036=>1000,28037=>1000,28038=>1000,28039=>1000,28040=>1000, -28041=>1000,28042=>1000,28043=>1000,28044=>1000,28045=>1000,28046=>1000,28048=>1000,28049=>1000,28050=>1000,28051=>1000, -28052=>1000,28053=>1000,28054=>1000,28055=>1000,28056=>1000,28057=>1000,28059=>1000,28060=>1000,28061=>1000,28062=>1000, -28063=>1000,28064=>1000,28065=>1000,28067=>1000,28068=>1000,28070=>1000,28071=>1000,28072=>1000,28073=>1000,28074=>1000, -28075=>1000,28076=>1000,28078=>1000,28079=>1000,28082=>1000,28083=>1000,28084=>1000,28085=>1000,28087=>1000,28088=>1000, -28090=>1000,28091=>1000,28092=>1000,28093=>1000,28094=>1000,28095=>1000,28096=>1000,28098=>1000,28099=>1000,28100=>1000, -28101=>1000,28102=>1000,28103=>1000,28104=>1000,28105=>1000,28106=>1000,28107=>1000,28108=>1000,28109=>1000,28111=>1000, -28112=>1000,28113=>1000,28114=>1000,28115=>1000,28116=>1000,28117=>1000,28118=>1000,28119=>1000,28120=>1000,28121=>1000, -28122=>1000,28123=>1000,28124=>1000,28125=>1000,28126=>1000,28127=>1000,28128=>1000,28129=>1000,28130=>1000,28131=>1000, -28132=>1000,28133=>1000,28134=>1000,28136=>1000,28137=>1000,28138=>1000,28139=>1000,28140=>1000,28141=>1000,28142=>1000, -28143=>1000,28144=>1000,28145=>1000,28146=>1000,28147=>1000,28148=>1000,28149=>1000,28150=>1000,28151=>1000,28152=>1000, -28153=>1000,28154=>1000,28155=>1000,28156=>1000,28157=>1000,28160=>1000,28163=>1000,28165=>1000,28167=>1000,28168=>1000, -28169=>1000,28170=>1000,28171=>1000,28172=>1000,28173=>1000,28174=>1000,28176=>1000,28177=>1000,28179=>1000,28180=>1000, -28181=>1000,28182=>1000,28183=>1000,28185=>1000,28186=>1000,28187=>1000,28188=>1000,28189=>1000,28191=>1000,28192=>1000, -28193=>1000,28194=>1000,28195=>1000,28196=>1000,28197=>1000,28198=>1000,28199=>1000,28200=>1000,28201=>1000,28203=>1000, -28204=>1000,28205=>1000,28206=>1000,28207=>1000,28208=>1000,28209=>1000,28210=>1000,28211=>1000,28212=>1000,28213=>1000, -28214=>1000,28216=>1000,28217=>1000,28218=>1000,28219=>1000,28220=>1000,28221=>1000,28222=>1000,28223=>1000,28224=>1000, -28225=>1000,28227=>1000,28228=>1000,28229=>1000,28230=>1000,28231=>1000,28233=>1000,28234=>1000,28235=>1000,28237=>1000, -28238=>1000,28241=>1000,28242=>1000,28243=>1000,28244=>1000,28245=>1000,28246=>1000,28248=>1000,28250=>1000,28251=>1000, -28252=>1000,28253=>1000,28254=>1000,28255=>1000,28256=>1000,28257=>1000,28258=>1000,28259=>1000,28260=>1000,28261=>1000, -28262=>1000,28263=>1000,28264=>1000,28265=>1000,28267=>1000,28270=>1000,28271=>1000,28273=>1000,28274=>1000,28275=>1000, -28276=>1000,28278=>1000,28279=>1000,28280=>1000,28281=>1000,28282=>1000,28286=>1000,28287=>1000,28288=>1000,28290=>1000, -28291=>1000,28293=>1000,28294=>1000,28296=>1000,28297=>1000,28300=>1000,28301=>1000,28302=>1000,28303=>1000,28304=>1000, -28306=>1000,28307=>1000,28308=>1000,28310=>1000,28311=>1000,28312=>1000,28313=>1000,28315=>1000,28316=>1000,28317=>1000, -28318=>1000,28319=>1000,28320=>1000,28321=>1000,28322=>1000,28323=>1000,28324=>1000,28325=>1000,28326=>1000,28327=>1000, -28330=>1000,28331=>1000,28334=>1000,28335=>1000,28336=>1000,28337=>1000,28338=>1000,28339=>1000,28340=>1000,28342=>1000, -28343=>1000,28345=>1000,28346=>1000,28347=>1000,28348=>1000,28349=>1000,28350=>1000,28351=>1000,28352=>1000,28353=>1000, -28354=>1000,28355=>1000,28356=>1000,28357=>1000,28358=>1000,28359=>1000,28360=>1000,28361=>1000,28362=>1000,28363=>1000, -28364=>1000,28365=>1000,28366=>1000,28367=>1000,28368=>1000,28369=>1000,28370=>1000,28371=>1000,28372=>1000,28373=>1000, -28374=>1000,28375=>1000,28376=>1000,28378=>1000,28380=>1000,28381=>1000,28382=>1000,28383=>1000,28384=>1000,28385=>1000, -28386=>1000,28388=>1000,28389=>1000,28390=>1000,28392=>1000,28393=>1000,28395=>1000,28396=>1000,28397=>1000,28398=>1000, -28399=>1000,28401=>1000,28402=>1000,28404=>1000,28405=>1000,28406=>1000,28407=>1000,28408=>1000,28409=>1000,28411=>1000, -28412=>1000,28413=>1000,28414=>1000,28415=>1000,28416=>1000,28417=>1000,28418=>1000,28419=>1000,28421=>1000,28422=>1000, -28423=>1000,28424=>1000,28425=>1000,28426=>1000,28429=>1000,28430=>1000,28431=>1000,28433=>1000,28434=>1000,28435=>1000, -28436=>1000,28437=>1000,28440=>1000,28441=>1000,28442=>1000,28444=>1000,28446=>1000,28447=>1000,28448=>1000,28449=>1000, -28450=>1000,28451=>1000,28452=>1000,28453=>1000,28454=>1000,28455=>1000,28457=>1000,28458=>1000,28459=>1000,28460=>1000, -28461=>1000,28462=>1000,28463=>1000,28464=>1000,28465=>1000,28466=>1000,28467=>1000,28469=>1000,28470=>1000,28471=>1000, -28472=>1000,28473=>1000,28474=>1000,28475=>1000,28476=>1000,28478=>1000,28479=>1000,28480=>1000,28481=>1000,28483=>1000, -28485=>1000,28486=>1000,28487=>1000,28491=>1000,28493=>1000,28494=>1000,28495=>1000,28496=>1000,28497=>1000,28498=>1000, -28499=>1000,28500=>1000,28501=>1000,28503=>1000,28504=>1000,28506=>1000,28507=>1000,28508=>1000,28509=>1000,28510=>1000, -28511=>1000,28512=>1000,28513=>1000,28514=>1000,28515=>1000,28516=>1000,28518=>1000,28519=>1000,28521=>1000,28522=>1000, -28523=>1000,28524=>1000,28525=>1000,28526=>1000,28527=>1000,28528=>1000,28530=>1000,28531=>1000,28532=>1000,28534=>1000, -28535=>1000,28536=>1000,28538=>1000,28539=>1000,28540=>1000,28541=>1000,28542=>1000,28543=>1000,28544=>1000,28545=>1000, -28546=>1000,28548=>1000,28549=>1000,28550=>1000,28551=>1000,28552=>1000,28553=>1000,28555=>1000,28556=>1000,28557=>1000, -28558=>1000,28560=>1000,28561=>1000,28562=>1000,28563=>1000,28564=>1000,28565=>1000,28566=>1000,28567=>1000,28572=>1000, -28574=>1000,28576=>1000,28577=>1000,28578=>1000,28579=>1000,28580=>1000,28581=>1000,28582=>1000,28583=>1000,28584=>1000, -28585=>1000,28586=>1000,28587=>1000,28588=>1000,28589=>1000,28590=>1000,28591=>1000,28592=>1000,28593=>1000,28594=>1000, -28595=>1000,28596=>1000,28597=>1000,28598=>1000,28600=>1000,28601=>1000,28602=>1000,28604=>1000,28605=>1000,28606=>1000, -28607=>1000,28608=>1000,28609=>1000,28610=>1000,28611=>1000,28612=>1000,28614=>1000,28615=>1000,28616=>1000,28617=>1000, -28618=>1000,28619=>1000,28620=>1000,28621=>1000,28622=>1000,28623=>1000,28625=>1000,28626=>1000,28628=>1000,28629=>1000, -28632=>1000,28634=>1000,28635=>1000,28636=>1000,28637=>1000,28638=>1000,28639=>1000,28640=>1000,28641=>1000,28642=>1000, -28643=>1000,28644=>1000,28646=>1000,28647=>1000,28648=>1000,28649=>1000,28651=>1000,28652=>1000,28653=>1000,28654=>1000, -28655=>1000,28656=>1000,28657=>1000,28658=>1000,28659=>1000,28660=>1000,28661=>1000,28662=>1000,28663=>1000,28666=>1000, -28667=>1000,28668=>1000,28670=>1000,28671=>1000,28672=>1000,28673=>1000,28676=>1000,28677=>1000,28678=>1000,28679=>1000, -28681=>1000,28682=>1000,28683=>1000,28684=>1000,28685=>1000,28686=>1000,28687=>1000,28689=>1000,28692=>1000,28693=>1000, -28694=>1000,28695=>1000,28696=>1000,28697=>1000,28698=>1000,28699=>1000,28700=>1000,28701=>1000,28702=>1000,28703=>1000, -28704=>1000,28705=>1000,28706=>1000,28707=>1000,28708=>1000,28710=>1000,28711=>1000,28712=>1000,28713=>1000,28714=>1000, -28715=>1000,28716=>1000,28719=>1000,28720=>1000,28721=>1000,28722=>1000,28723=>1000,28724=>1000,28725=>1000,28727=>1000, -28728=>1000,28729=>1000,28730=>1000,28731=>1000,28732=>1000,28734=>1000,28735=>1000,28736=>1000,28737=>1000,28738=>1000, -28739=>1000,28740=>1000,28741=>1000,28742=>1000,28744=>1000,28745=>1000,28746=>1000,28748=>1000,28751=>1000,28752=>1000, -28753=>1000,28754=>1000,28757=>1000,28758=>1000,28759=>1000,28760=>1000,28762=>1000,28763=>1000,28765=>1000,28766=>1000, -28767=>1000,28768=>1000,28769=>1000,28770=>1000,28771=>1000,28772=>1000,28773=>1000,28774=>1000,28776=>1000,28777=>1000, -28778=>1000,28779=>1000,28780=>1000,28781=>1000,28783=>1000,28784=>1000,28785=>1000,28788=>1000,28789=>1000,28790=>1000, -28792=>1000,28794=>1000,28796=>1000,28797=>1000,28798=>1000,28799=>1000,28800=>1000,28802=>1000,28803=>1000,28804=>1000, -28805=>1000,28806=>1000,28809=>1000,28810=>1000,28814=>1000,28817=>1000,28818=>1000,28819=>1000,28820=>1000,28821=>1000, -28822=>1000,28824=>1000,28825=>1000,28826=>1000,28828=>1000,28829=>1000,28831=>1000,28833=>1000,28836=>1000,28841=>1000, -28843=>1000,28844=>1000,28845=>1000,28846=>1000,28847=>1000,28848=>1000,28849=>1000,28851=>1000,28852=>1000,28853=>1000, -28855=>1000,28856=>1000,28857=>1000,28858=>1000,28859=>1000,28860=>1000,28861=>1000,28862=>1000,28864=>1000,28865=>1000, -28866=>1000,28867=>1000,28869=>1000,28870=>1000,28871=>1000,28872=>1000,28874=>1000,28875=>1000,28877=>1000,28878=>1000, -28879=>1000,28881=>1000,28882=>1000,28883=>1000,28884=>1000,28887=>1000,28888=>1000,28889=>1000,28890=>1000,28891=>1000, -28892=>1000,28893=>1000,28894=>1000,28895=>1000,28896=>1000,28897=>1000,28898=>1000,28900=>1000,28902=>1000,28903=>1000, -28904=>1000,28905=>1000,28907=>1000,28908=>1000,28909=>1000,28911=>1000,28912=>1000,28913=>1000,28915=>1000,28916=>1000, -28918=>1000,28919=>1000,28920=>1000,28921=>1000,28922=>1000,28923=>1000,28924=>1000,28925=>1000,28927=>1000,28928=>1000, -28930=>1000,28932=>1000,28934=>1000,28937=>1000,28938=>1000,28939=>1000,28940=>1000,28941=>1000,28942=>1000,28943=>1000, -28944=>1000,28947=>1000,28948=>1000,28949=>1000,28950=>1000,28951=>1000,28952=>1000,28953=>1000,28954=>1000,28955=>1000, -28956=>1000,28958=>1000,28959=>1000,28960=>1000,28961=>1000,28962=>1000,28963=>1000,28965=>1000,28966=>1000,28968=>1000, -28974=>1000,28975=>1000,28976=>1000,28977=>1000,28978=>1000,28982=>1000,28986=>1000,28988=>1000,28993=>1000,28994=>1000, -28995=>1000,28996=>1000,28997=>1000,28998=>1000,28999=>1000,29001=>1000,29002=>1000,29003=>1000,29004=>1000,29005=>1000, -29006=>1000,29008=>1000,29010=>1000,29011=>1000,29012=>1000,29013=>1000,29014=>1000,29016=>1000,29017=>1000,29018=>1000, -29020=>1000,29021=>1000,29022=>1000,29023=>1000,29024=>1000,29025=>1000,29026=>1000,29027=>1000,29028=>1000,29029=>1000, -29030=>1000,29031=>1000,29032=>1000,29033=>1000,29034=>1000,29036=>1000,29038=>1000,29040=>1000,29042=>1000,29043=>1000, -29048=>1000,29050=>1000,29051=>1000,29053=>1000,29056=>1000,29057=>1000,29058=>1000,29060=>1000,29061=>1000,29062=>1000, -29063=>1000,29064=>1000,29065=>1000,29066=>1000,29071=>1000,29072=>1000,29074=>1000,29076=>1000,29077=>1000,29079=>1000, -29080=>1000,29081=>1000,29082=>1000,29083=>1000,29084=>1000,29085=>1000,29086=>1000,29087=>1000,29088=>1000,29089=>1000, -29090=>1000,29092=>1000,29093=>1000,29095=>1000,29096=>1000,29097=>1000,29098=>1000,29100=>1000,29103=>1000,29104=>1000, -29105=>1000,29106=>1000,29107=>1000,29109=>1000,29112=>1000,29113=>1000,29114=>1000,29116=>1000,29117=>1000,29118=>1000, -29119=>1000,29120=>1000,29121=>1000,29122=>1000,29123=>1000,29124=>1000,29125=>1000,29126=>1000,29127=>1000,29128=>1000, -29129=>1000,29130=>1000,29131=>1000,29134=>1000,29135=>1000,29136=>1000,29138=>1000,29140=>1000,29141=>1000,29142=>1000, -29143=>1000,29144=>1000,29145=>1000,29146=>1000,29147=>1000,29148=>1000,29151=>1000,29152=>1000,29153=>1000,29154=>1000, -29156=>1000,29157=>1000,29158=>1000,29159=>1000,29160=>1000,29164=>1000,29165=>1000,29166=>1000,29168=>1000,29169=>1000, -29170=>1000,29172=>1000,29173=>1000,29176=>1000,29177=>1000,29179=>1000,29180=>1000,29181=>1000,29182=>1000,29183=>1000, -29184=>1000,29185=>1000,29186=>1000,29187=>1000,29189=>1000,29190=>1000,29191=>1000,29194=>1000,29196=>1000,29197=>1000, -29200=>1000,29203=>1000,29204=>1000,29209=>1000,29210=>1000,29211=>1000,29213=>1000,29214=>1000,29215=>1000,29218=>1000, -29219=>1000,29222=>1000,29223=>1000,29224=>1000,29225=>1000,29226=>1000,29228=>1000,29229=>1000,29232=>1000,29233=>1000, -29234=>1000,29237=>1000,29238=>1000,29239=>1000,29240=>1000,29241=>1000,29242=>1000,29243=>1000,29244=>1000,29245=>1000, -29246=>1000,29247=>1000,29248=>1000,29249=>1000,29250=>1000,29252=>1000,29254=>1000,29255=>1000,29256=>1000,29257=>1000, -29258=>1000,29259=>1000,29260=>1000,29261=>1000,29263=>1000,29266=>1000,29267=>1000,29270=>1000,29272=>1000,29273=>1000, -29274=>1000,29275=>1000,29277=>1000,29278=>1000,29279=>1000,29280=>1000,29281=>1000,29282=>1000,29283=>1000,29286=>1000, -29287=>1000,29289=>1000,29290=>1000,29292=>1000,29294=>1000,29295=>1000,29296=>1000,29298=>1000,29299=>1000,29300=>1000, -29301=>1000,29302=>1000,29303=>1000,29304=>1000,29305=>1000,29306=>1000,29307=>1000,29308=>1000,29309=>1000,29310=>1000, -29311=>1000,29312=>1000,29313=>1000,29314=>1000,29316=>1000,29317=>1000,29318=>1000,29319=>1000,29320=>1000,29321=>1000, -29322=>1000,29323=>1000,29324=>1000,29325=>1000,29326=>1000,29327=>1000,29328=>1000,29329=>1000,29330=>1000,29331=>1000, -29333=>1000,29334=>1000,29335=>1000,29336=>1000,29338=>1000,29339=>1000,29341=>1000,29342=>1000,29343=>1000,29344=>1000, -29345=>1000,29346=>1000,29347=>1000,29348=>1000,29349=>1000,29350=>1000,29351=>1000,29352=>1000,29353=>1000,29354=>1000, -29356=>1000,29357=>1000,29358=>1000,29359=>1000,29360=>1000,29361=>1000,29362=>1000,29364=>1000,29365=>1000,29366=>1000, -29367=>1000,29368=>1000,29369=>1000,29370=>1000,29373=>1000,29374=>1000,29375=>1000,29376=>1000,29377=>1000,29378=>1000, -29379=>1000,29380=>1000,29381=>1000,29382=>1000,29384=>1000,29385=>1000,29386=>1000,29387=>1000,29388=>1000,29389=>1000, -29390=>1000,29392=>1000,29393=>1000,29394=>1000,29396=>1000,29398=>1000,29399=>1000,29400=>1000,29401=>1000,29402=>1000, -29403=>1000,29404=>1000,29406=>1000,29407=>1000,29408=>1000,29409=>1000,29410=>1000,29411=>1000,29412=>1000,29414=>1000, -29416=>1000,29417=>1000,29418=>1000,29419=>1000,29420=>1000,29421=>1000,29422=>1000,29423=>1000,29424=>1000,29425=>1000, -29426=>1000,29427=>1000,29428=>1000,29430=>1000,29431=>1000,29432=>1000,29433=>1000,29434=>1000,29435=>1000,29436=>1000, -29437=>1000,29438=>1000,29439=>1000,29440=>1000,29441=>1000,29443=>1000,29447=>1000,29448=>1000,29450=>1000,29451=>1000, -29452=>1000,29454=>1000,29455=>1000,29457=>1000,29458=>1000,29459=>1000,29461=>1000,29462=>1000,29463=>1000,29464=>1000, -29465=>1000,29467=>1000,29468=>1000,29469=>1000,29470=>1000,29471=>1000,29473=>1000,29474=>1000,29475=>1000,29476=>1000, -29477=>1000,29478=>1000,29479=>1000,29481=>1000,29482=>1000,29483=>1000,29484=>1000,29485=>1000,29486=>1000,29487=>1000, -29488=>1000,29489=>1000,29490=>1000,29491=>1000,29492=>1000,29493=>1000,29494=>1000,29495=>1000,29496=>1000,29497=>1000, -29498=>1000,29499=>1000,29500=>1000,29502=>1000,29503=>1000,29504=>1000,29506=>1000,29507=>1000,29508=>1000,29509=>1000, -29513=>1000,29514=>1000,29516=>1000,29517=>1000,29518=>1000,29519=>1000,29520=>1000,29521=>1000,29522=>1000,29527=>1000, -29528=>1000,29529=>1000,29530=>1000,29531=>1000,29533=>1000,29534=>1000,29535=>1000,29536=>1000,29537=>1000,29538=>1000, -29539=>1000,29541=>1000,29542=>1000,29543=>1000,29544=>1000,29545=>1000,29546=>1000,29547=>1000,29548=>1000,29549=>1000, -29550=>1000,29551=>1000,29552=>1000,29554=>1000,29555=>1000,29557=>1000,29558=>1000,29559=>1000,29560=>1000,29562=>1000, -29563=>1000,29564=>1000,29565=>1000,29566=>1000,29567=>1000,29568=>1000,29569=>1000,29570=>1000,29571=>1000,29572=>1000, -29573=>1000,29574=>1000,29575=>1000,29576=>1000,29577=>1000,29578=>1000,29579=>1000,29582=>1000,29585=>1000,29586=>1000, -29587=>1000,29588=>1000,29589=>1000,29590=>1000,29591=>1000,29592=>1000,29595=>1000,29597=>1000,29599=>1000,29600=>1000, -29601=>1000,29602=>1000,29604=>1000,29605=>1000,29606=>1000,29607=>1000,29608=>1000,29609=>1000,29611=>1000,29612=>1000, -29613=>1000,29614=>1000,29615=>1000,29616=>1000,29618=>1000,29619=>1000,29620=>1000,29621=>1000,29622=>1000,29623=>1000, -29624=>1000,29625=>1000,29626=>1000,29627=>1000,29628=>1000,29629=>1000,29630=>1000,29631=>1000,29632=>1000,29634=>1000, -29635=>1000,29637=>1000,29638=>1000,29639=>1000,29640=>1000,29641=>1000,29642=>1000,29643=>1000,29644=>1000,29645=>1000, -29646=>1000,29647=>1000,29648=>1000,29649=>1000,29650=>1000,29651=>1000,29652=>1000,29654=>1000,29655=>1000,29656=>1000, -29657=>1000,29658=>1000,29659=>1000,29660=>1000,29661=>1000,29662=>1000,29664=>1000,29667=>1000,29668=>1000,29669=>1000, -29670=>1000,29671=>1000,29672=>1000,29673=>1000,29674=>1000,29675=>1000,29677=>1000,29678=>1000,29681=>1000,29682=>1000, -29684=>1000,29685=>1000,29686=>1000,29687=>1000,29688=>1000,29689=>1000,29690=>1000,29692=>1000,29693=>1000,29694=>1000, -29695=>1000,29696=>1000,29697=>1000,29699=>1000,29700=>1000,29701=>1000,29702=>1000,29703=>1000,29704=>1000,29705=>1000, -29706=>1000,29707=>1000,29708=>1000,29709=>1000,29711=>1000,29712=>1000,29715=>1000,29718=>1000,29722=>1000,29723=>1000, -29725=>1000,29728=>1000,29729=>1000,29730=>1000,29731=>1000,29732=>1000,29733=>1000,29734=>1000,29736=>1000,29737=>1000, -29738=>1000,29739=>1000,29740=>1000,29741=>1000,29742=>1000,29743=>1000,29744=>1000,29745=>1000,29746=>1000,29747=>1000, -29748=>1000,29749=>1000,29750=>1000,29752=>1000,29754=>1000,29756=>1000,29759=>1000,29760=>1000,29761=>1000,29762=>1000, -29763=>1000,29764=>1000,29766=>1000,29770=>1000,29771=>1000,29773=>1000,29774=>1000,29775=>1000,29776=>1000,29777=>1000, -29778=>1000,29780=>1000,29781=>1000,29783=>1000,29785=>1000,29786=>1000,29787=>1000,29788=>1000,29790=>1000,29791=>1000, -29792=>1000,29794=>1000,29795=>1000,29796=>1000,29797=>1000,29799=>1000,29800=>1000,29801=>1000,29802=>1000,29805=>1000, -29806=>1000,29807=>1000,29808=>1000,29809=>1000,29810=>1000,29811=>1000,29813=>1000,29814=>1000,29815=>1000,29817=>1000, -29820=>1000,29821=>1000,29822=>1000,29823=>1000,29824=>1000,29825=>1000,29826=>1000,29827=>1000,29829=>1000,29830=>1000, -29831=>1000,29832=>1000,29833=>1000,29834=>1000,29835=>1000,29838=>1000,29840=>1000,29842=>1000,29844=>1000,29845=>1000, -29847=>1000,29848=>1000,29850=>1000,29852=>1000,29854=>1000,29855=>1000,29856=>1000,29857=>1000,29858=>1000,29859=>1000, -29861=>1000,29862=>1000,29863=>1000,29864=>1000,29865=>1000,29866=>1000,29867=>1000,29869=>1000,29871=>1000,29872=>1000, -29873=>1000,29874=>1000,29877=>1000,29878=>1000,29879=>1000,29880=>1000,29881=>1000,29882=>1000,29883=>1000,29885=>1000, -29886=>1000,29887=>1000,29888=>1000,29889=>1000,29890=>1000,29891=>1000,29893=>1000,29894=>1000,29898=>1000,29899=>1000, -29903=>1000,29906=>1000,29908=>1000,29909=>1000,29910=>1000,29911=>1000,29912=>1000,29913=>1000,29914=>1000,29915=>1000, -29916=>1000,29917=>1000,29918=>1000,29919=>1000,29920=>1000,29921=>1000,29922=>1000,29923=>1000,29924=>1000,29925=>1000, -29926=>1000,29927=>1000,29928=>1000,29929=>1000,29932=>1000,29934=>1000,29935=>1000,29936=>1000,29937=>1000,29938=>1000, -29940=>1000,29941=>1000,29942=>1000,29943=>1000,29944=>1000,29947=>1000,29949=>1000,29950=>1000,29951=>1000,29952=>1000, -29953=>1000,29954=>1000,29955=>1000,29956=>1000,29957=>1000,29959=>1000,29960=>1000,29963=>1000,29964=>1000,29965=>1000, -29966=>1000,29967=>1000,29968=>1000,29969=>1000,29970=>1000,29971=>1000,29972=>1000,29973=>1000,29974=>1000,29975=>1000, -29976=>1000,29977=>1000,29978=>1000,29979=>1000,29980=>1000,29981=>1000,29982=>1000,29983=>1000,29985=>1000,29986=>1000, -29987=>1000,29989=>1000,29990=>1000,29992=>1000,29993=>1000,29994=>1000,29995=>1000,29996=>1000,29997=>1000,29998=>1000, -29999=>1000,30000=>1000,30001=>1000,30002=>1000,30003=>1000,30005=>1000,30007=>1000,30008=>1000,30009=>1000,30010=>1000, -30011=>1000,30012=>1000,30013=>1000,30014=>1000,30015=>1000,30016=>1000,30020=>1000,30021=>1000,30022=>1000,30023=>1000, -30024=>1000,30025=>1000,30026=>1000,30027=>1000,30028=>1000,30029=>1000,30030=>1000,30031=>1000,30033=>1000,30035=>1000, -30036=>1000,30041=>1000,30042=>1000,30043=>1000,30044=>1000,30045=>1000,30047=>1000,30048=>1000,30050=>1000,30051=>1000, -30052=>1000,30053=>1000,30054=>1000,30055=>1000,30057=>1000,30058=>1000,30059=>1000,30060=>1000,30061=>1000,30063=>1000, -30064=>1000,30066=>1000,30067=>1000,30068=>1000,30069=>1000,30070=>1000,30071=>1000,30072=>1000,30073=>1000,30074=>1000, -30077=>1000,30078=>1000,30079=>1000,30080=>1000,30082=>1000,30083=>1000,30084=>1000,30086=>1000,30087=>1000,30089=>1000, -30090=>1000,30091=>1000,30092=>1000,30094=>1000,30095=>1000,30096=>1000,30097=>1000,30098=>1000,30100=>1000,30101=>1000, -30102=>1000,30103=>1000,30104=>1000,30105=>1000,30106=>1000,30109=>1000,30111=>1000,30112=>1000,30113=>1000,30114=>1000, -30115=>1000,30116=>1000,30117=>1000,30119=>1000,30122=>1000,30123=>1000,30124=>1000,30126=>1000,30127=>1000,30128=>1000, -30129=>1000,30130=>1000,30131=>1000,30132=>1000,30133=>1000,30134=>1000,30136=>1000,30137=>1000,30138=>1000,30139=>1000, -30140=>1000,30141=>1000,30142=>1000,30143=>1000,30144=>1000,30145=>1000,30146=>1000,30147=>1000,30148=>1000,30149=>1000, -30151=>1000,30152=>1000,30153=>1000,30154=>1000,30155=>1000,30156=>1000,30157=>1000,30158=>1000,30159=>1000,30160=>1000, -30161=>1000,30162=>1000,30164=>1000,30165=>1000,30166=>1000,30167=>1000,30168=>1000,30169=>1000,30170=>1000,30171=>1000, -30173=>1000,30174=>1000,30175=>1000,30176=>1000,30177=>1000,30178=>1000,30179=>1000,30180=>1000,30182=>1000,30183=>1000, -30184=>1000,30185=>1000,30186=>1000,30187=>1000,30189=>1000,30191=>1000,30192=>1000,30193=>1000,30194=>1000,30195=>1000, -30196=>1000,30197=>1000,30198=>1000,30199=>1000,30200=>1000,30201=>1000,30202=>1000,30203=>1000,30204=>1000,30205=>1000, -30206=>1000,30207=>1000,30208=>1000,30209=>1000,30211=>1000,30213=>1000,30216=>1000,30217=>1000,30218=>1000,30219=>1000, -30220=>1000,30221=>1000,30223=>1000,30224=>1000,30225=>1000,30227=>1000,30228=>1000,30229=>1000,30230=>1000,30231=>1000, -30232=>1000,30233=>1000,30234=>1000,30235=>1000,30236=>1000,30237=>1000,30238=>1000,30239=>1000,30240=>1000,30241=>1000, -30242=>1000,30243=>1000,30244=>1000,30245=>1000,30246=>1000,30247=>1000,30248=>1000,30249=>1000,30250=>1000,30251=>1000, -30253=>1000,30255=>1000,30256=>1000,30257=>1000,30258=>1000,30259=>1000,30260=>1000,30261=>1000,30264=>1000,30266=>1000, -30267=>1000,30268=>1000,30269=>1000,30270=>1000,30271=>1000,30272=>1000,30274=>1000,30275=>1000,30278=>1000,30279=>1000, -30280=>1000,30281=>1000,30284=>1000,30285=>1000,30286=>1000,30288=>1000,30290=>1000,30291=>1000,30292=>1000,30294=>1000, -30295=>1000,30296=>1000,30297=>1000,30298=>1000,30300=>1000,30302=>1000,30303=>1000,30304=>1000,30305=>1000,30306=>1000, -30307=>1000,30308=>1000,30309=>1000,30311=>1000,30312=>1000,30313=>1000,30314=>1000,30315=>1000,30316=>1000,30317=>1000, -30318=>1000,30319=>1000,30320=>1000,30321=>1000,30322=>1000,30325=>1000,30326=>1000,30328=>1000,30329=>1000,30330=>1000, -30331=>1000,30332=>1000,30333=>1000,30334=>1000,30335=>1000,30336=>1000,30337=>1000,30338=>1000,30339=>1000,30340=>1000, -30342=>1000,30343=>1000,30344=>1000,30345=>1000,30346=>1000,30347=>1000,30350=>1000,30351=>1000,30352=>1000,30353=>1000, -30354=>1000,30355=>1000,30357=>1000,30358=>1000,30361=>1000,30362=>1000,30363=>1000,30364=>1000,30365=>1000,30366=>1000, -30372=>1000,30374=>1000,30378=>1000,30379=>1000,30381=>1000,30382=>1000,30383=>1000,30384=>1000,30385=>1000,30386=>1000, -30388=>1000,30389=>1000,30391=>1000,30392=>1000,30393=>1000,30394=>1000,30395=>1000,30397=>1000,30398=>1000,30399=>1000, -30402=>1000,30403=>1000,30404=>1000,30405=>1000,30406=>1000,30408=>1000,30409=>1000,30410=>1000,30413=>1000,30414=>1000, -30415=>1000,30416=>1000,30417=>1000,30418=>1000,30419=>1000,30420=>1000,30422=>1000,30423=>1000,30424=>1000,30426=>1000, -30427=>1000,30428=>1000,30429=>1000,30430=>1000,30431=>1000,30433=>1000,30435=>1000,30436=>1000,30437=>1000,30438=>1000, -30439=>1000,30441=>1000,30442=>1000,30444=>1000,30445=>1000,30446=>1000,30447=>1000,30448=>1000,30449=>1000,30450=>1000, -30451=>1000,30452=>1000,30453=>1000,30455=>1000,30456=>1000,30457=>1000,30458=>1000,30459=>1000,30460=>1000,30462=>1000, -30465=>1000,30467=>1000,30468=>1000,30469=>1000,30471=>1000,30472=>1000,30473=>1000,30474=>1000,30475=>1000,30476=>1000, -30477=>1000,30480=>1000,30481=>1000,30482=>1000,30483=>1000,30485=>1000,30489=>1000,30490=>1000,30491=>1000,30493=>1000, -30494=>1000,30495=>1000,30496=>1000,30498=>1000,30499=>1000,30500=>1000,30501=>1000,30502=>1000,30503=>1000,30504=>1000, -30505=>1000,30509=>1000,30511=>1000,30513=>1000,30514=>1000,30515=>1000,30516=>1000,30517=>1000,30518=>1000,30519=>1000, -30520=>1000,30521=>1000,30522=>1000,30523=>1000,30524=>1000,30525=>1000,30526=>1000,30528=>1000,30529=>1000,30531=>1000, -30532=>1000,30533=>1000,30534=>1000,30535=>1000,30538=>1000,30539=>1000,30540=>1000,30541=>1000,30542=>1000,30543=>1000, -30544=>1000,30545=>1000,30546=>1000,30548=>1000,30549=>1000,30550=>1000,30553=>1000,30554=>1000,30555=>1000,30556=>1000, -30558=>1000,30559=>1000,30560=>1000,30561=>1000,30562=>1000,30563=>1000,30565=>1000,30566=>1000,30567=>1000,30568=>1000, -30569=>1000,30570=>1000,30571=>1000,30572=>1000,30573=>1000,30574=>1000,30575=>1000,30585=>1000,30588=>1000,30589=>1000, -30590=>1000,30591=>1000,30592=>1000,30593=>1000,30594=>1000,30595=>1000,30596=>1000,30597=>1000,30599=>1000,30600=>1000, -30601=>1000,30603=>1000,30604=>1000,30605=>1000,30606=>1000,30607=>1000,30609=>1000,30610=>1000,30613=>1000,30615=>1000, -30617=>1000,30618=>1000,30619=>1000,30620=>1000,30621=>1000,30622=>1000,30623=>1000,30624=>1000,30625=>1000,30626=>1000, -30627=>1000,30629=>1000,30631=>1000,30632=>1000,30633=>1000,30634=>1000,30635=>1000,30636=>1000,30637=>1000,30640=>1000, -30641=>1000,30642=>1000,30643=>1000,30644=>1000,30645=>1000,30646=>1000,30647=>1000,30649=>1000,30650=>1000,30651=>1000, -30652=>1000,30653=>1000,30655=>1000,30658=>1000,30660=>1000,30663=>1000,30665=>1000,30666=>1000,30668=>1000,30669=>1000, -30670=>1000,30671=>1000,30672=>1000,30675=>1000,30676=>1000,30677=>1000,30679=>1000,30680=>1000,30681=>1000,30682=>1000, -30683=>1000,30684=>1000,30686=>1000,30688=>1000,30690=>1000,30691=>1000,30693=>1000,30695=>1000,30696=>1000,30697=>1000, -30699=>1000,30700=>1000,30701=>1000,30702=>1000,30703=>1000,30704=>1000,30705=>1000,30706=>1000,30707=>1000,30710=>1000, -30711=>1000,30712=>1000,30713=>1000,30714=>1000,30715=>1000,30716=>1000,30717=>1000,30718=>1000,30719=>1000,30720=>1000, -30721=>1000,30722=>1000,30723=>1000,30725=>1000,30726=>1000,30729=>1000,30732=>1000,30733=>1000,30734=>1000,30735=>1000, -30736=>1000,30737=>1000,30738=>1000,30739=>1000,30740=>1000,30741=>1000,30742=>1000,30743=>1000,30744=>1000,30746=>1000, -30748=>1000,30749=>1000,30751=>1000,30752=>1000,30753=>1000,30754=>1000,30755=>1000,30757=>1000,30758=>1000,30759=>1000, -30760=>1000,30761=>1000,30762=>1000,30763=>1000,30764=>1000,30765=>1000,30766=>1000,30767=>1000,30768=>1000,30769=>1000, -30770=>1000,30771=>1000,30772=>1000,30773=>1000,30775=>1000,30776=>1000,30777=>1000,30778=>1000,30779=>1000,30780=>1000, -30782=>1000,30783=>1000,30784=>1000,30787=>1000,30789=>1000,30791=>1000,30792=>1000,30793=>1000,30794=>1000,30796=>1000, -30797=>1000,30798=>1000,30799=>1000,30800=>1000,30802=>1000,30805=>1000,30806=>1000,30807=>1000,30812=>1000,30813=>1000, -30814=>1000,30816=>1000,30818=>1000,30820=>1000,30821=>1000,30824=>1000,30825=>1000,30826=>1000,30827=>1000,30828=>1000, -30829=>1000,30830=>1000,30831=>1000,30832=>1000,30833=>1000,30834=>1000,30836=>1000,30839=>1000,30841=>1000,30842=>1000, -30843=>1000,30844=>1000,30846=>1000,30847=>1000,30848=>1000,30849=>1000,30851=>1000,30852=>1000,30853=>1000,30854=>1000, -30855=>1000,30857=>1000,30860=>1000,30861=>1000,30862=>1000,30863=>1000,30865=>1000,30867=>1000,30868=>1000,30869=>1000, -30870=>1000,30871=>1000,30872=>1000,30873=>1000,30874=>1000,30875=>1000,30876=>1000,30878=>1000,30879=>1000,30880=>1000, -30881=>1000,30882=>1000,30883=>1000,30884=>1000,30885=>1000,30887=>1000,30888=>1000,30889=>1000,30890=>1000,30891=>1000, -30892=>1000,30893=>1000,30895=>1000,30896=>1000,30897=>1000,30898=>1000,30899=>1000,30900=>1000,30901=>1000,30905=>1000, -30906=>1000,30907=>1000,30908=>1000,30910=>1000,30913=>1000,30915=>1000,30916=>1000,30917=>1000,30918=>1000,30920=>1000, -30921=>1000,30922=>1000,30923=>1000,30924=>1000,30925=>1000,30926=>1000,30927=>1000,30928=>1000,30929=>1000,30932=>1000, -30933=>1000,30937=>1000,30938=>1000,30939=>1000,30941=>1000,30942=>1000,30943=>1000,30944=>1000,30945=>1000,30946=>1000, -30947=>1000,30949=>1000,30951=>1000,30952=>1000,30953=>1000,30954=>1000,30956=>1000,30957=>1000,30959=>1000,30962=>1000, -30963=>1000,30964=>1000,30965=>1000,30967=>1000,30969=>1000,30970=>1000,30971=>1000,30972=>1000,30973=>1000,30974=>1000, -30975=>1000,30977=>1000,30978=>1000,30980=>1000,30981=>1000,30983=>1000,30985=>1000,30988=>1000,30990=>1000,30992=>1000, -30993=>1000,30994=>1000,30995=>1000,30996=>1000,30998=>1000,30999=>1000,31001=>1000,31003=>1000,31004=>1000,31005=>1000, -31006=>1000,31009=>1000,31011=>1000,31012=>1000,31013=>1000,31014=>1000,31015=>1000,31016=>1000,31017=>1000,31018=>1000, -31019=>1000,31020=>1000,31021=>1000,31023=>1000,31024=>1000,31025=>1000,31028=>1000,31029=>1000,31032=>1000,31033=>1000, -31034=>1000,31035=>1000,31036=>1000,31037=>1000,31038=>1000,31039=>1000,31040=>1000,31041=>1000,31042=>1000,31044=>1000, -31045=>1000,31046=>1000,31047=>1000,31048=>1000,31049=>1000,31050=>1000,31051=>1000,31052=>1000,31055=>1000,31056=>1000, -31057=>1000,31058=>1000,31059=>1000,31060=>1000,31061=>1000,31062=>1000,31063=>1000,31066=>1000,31067=>1000,31068=>1000, -31069=>1000,31070=>1000,31071=>1000,31072=>1000,31073=>1000,31074=>1000,31075=>1000,31076=>1000,31077=>1000,31079=>1000, -31080=>1000,31081=>1000,31082=>1000,31083=>1000,31085=>1000,31087=>1000,31088=>1000,31090=>1000,31091=>1000,31092=>1000, -31095=>1000,31096=>1000,31097=>1000,31098=>1000,31100=>1000,31101=>1000,31103=>1000,31104=>1000,31105=>1000,31106=>1000, -31108=>1000,31109=>1000,31112=>1000,31114=>1000,31115=>1000,31117=>1000,31118=>1000,31119=>1000,31120=>1000,31121=>1000, -31122=>1000,31123=>1000,31124=>1000,31125=>1000,31126=>1000,31127=>1000,31128=>1000,31130=>1000,31131=>1000,31132=>1000, -31133=>1000,31136=>1000,31137=>1000,31138=>1000,31140=>1000,31142=>1000,31143=>1000,31144=>1000,31146=>1000,31147=>1000, -31148=>1000,31149=>1000,31150=>1000,31152=>1000,31153=>1000,31154=>1000,31155=>1000,31156=>1000,31158=>1000,31159=>1000, -31160=>1000,31161=>1000,31162=>1000,31163=>1000,31165=>1000,31166=>1000,31167=>1000,31168=>1000,31169=>1000,31171=>1000, -31173=>1000,31174=>1000,31176=>1000,31177=>1000,31178=>1000,31179=>1000,31181=>1000,31182=>1000,31183=>1000,31185=>1000, -31186=>1000,31189=>1000,31190=>1000,31192=>1000,31196=>1000,31197=>1000,31198=>1000,31199=>1000,31200=>1000,31201=>1000, -31203=>1000,31204=>1000,31206=>1000,31207=>1000,31209=>1000,31210=>1000,31211=>1000,31212=>1000,31213=>1000,31214=>1000, -31215=>1000,31216=>1000,31222=>1000,31223=>1000,31224=>1000,31226=>1000,31227=>1000,31229=>1000,31232=>1000,31234=>1000, -31235=>1000,31236=>1000,31237=>1000,31238=>1000,31240=>1000,31242=>1000,31243=>1000,31244=>1000,31245=>1000,31246=>1000, -31248=>1000,31249=>1000,31250=>1000,31251=>1000,31252=>1000,31253=>1000,31255=>1000,31256=>1000,31257=>1000,31258=>1000, -31259=>1000,31260=>1000,31262=>1000,31263=>1000,31264=>1000,31266=>1000,31267=>1000,31270=>1000,31272=>1000,31275=>1000, -31278=>1000,31279=>1000,31280=>1000,31281=>1000,31282=>1000,31283=>1000,31286=>1000,31287=>1000,31289=>1000,31291=>1000, -31292=>1000,31293=>1000,31294=>1000,31295=>1000,31296=>1000,31298=>1000,31299=>1000,31300=>1000,31302=>1000,31303=>1000, -31304=>1000,31305=>1000,31306=>1000,31307=>1000,31308=>1000,31309=>1000,31310=>1000,31311=>1000,31312=>1000,31313=>1000, -31316=>1000,31318=>1000,31319=>1000,31320=>1000,31322=>1000,31323=>1000,31324=>1000,31327=>1000,31328=>1000,31329=>1000, -31330=>1000,31331=>1000,31335=>1000,31336=>1000,31337=>1000,31339=>1000,31340=>1000,31341=>1000,31342=>1000,31344=>1000, -31345=>1000,31348=>1000,31349=>1000,31350=>1000,31351=>1000,31352=>1000,31353=>1000,31354=>1000,31355=>1000,31357=>1000, -31358=>1000,31359=>1000,31360=>1000,31361=>1000,31363=>1000,31364=>1000,31365=>1000,31366=>1000,31367=>1000,31368=>1000, -31369=>1000,31370=>1000,31371=>1000,31372=>1000,31373=>1000,31375=>1000,31376=>1000,31377=>1000,31378=>1000,31379=>1000, -31380=>1000,31381=>1000,31382=>1000,31383=>1000,31384=>1000,31385=>1000,31388=>1000,31389=>1000,31390=>1000,31391=>1000, -31392=>1000,31394=>1000,31395=>1000,31397=>1000,31398=>1000,31400=>1000,31401=>1000,31402=>1000,31403=>1000,31404=>1000, -31405=>1000,31406=>1000,31407=>1000,31408=>1000,31409=>1000,31410=>1000,31411=>1000,31412=>1000,31413=>1000,31414=>1000, -31415=>1000,31416=>1000,31418=>1000,31422=>1000,31423=>1000,31424=>1000,31425=>1000,31427=>1000,31428=>1000,31429=>1000, -31431=>1000,31432=>1000,31434=>1000,31435=>1000,31437=>1000,31439=>1000,31441=>1000,31442=>1000,31443=>1000,31445=>1000, -31446=>1000,31447=>1000,31448=>1000,31449=>1000,31450=>1000,31452=>1000,31453=>1000,31454=>1000,31455=>1000,31456=>1000, -31457=>1000,31458=>1000,31459=>1000,31460=>1000,31461=>1000,31462=>1000,31463=>1000,31466=>1000,31467=>1000,31469=>1000, -31470=>1000,31471=>1000,31472=>1000,31478=>1000,31479=>1000,31480=>1000,31481=>1000,31482=>1000,31483=>1000,31485=>1000, -31487=>1000,31488=>1000,31489=>1000,31490=>1000,31491=>1000,31492=>1000,31493=>1000,31494=>1000,31496=>1000,31497=>1000, -31498=>1000,31499=>1000,31502=>1000,31503=>1000,31504=>1000,31505=>1000,31506=>1000,31507=>1000,31508=>1000,31509=>1000, -31512=>1000,31513=>1000,31514=>1000,31515=>1000,31517=>1000,31518=>1000,31520=>1000,31522=>1000,31523=>1000,31524=>1000, -31525=>1000,31526=>1000,31528=>1000,31530=>1000,31531=>1000,31532=>1000,31533=>1000,31534=>1000,31535=>1000,31536=>1000, -31537=>1000,31538=>1000,31539=>1000,31540=>1000,31541=>1000,31542=>1000,31544=>1000,31545=>1000,31546=>1000,31547=>1000, -31548=>1000,31550=>1000,31552=>1000,31556=>1000,31557=>1000,31558=>1000,31559=>1000,31560=>1000,31561=>1000,31562=>1000, -31563=>1000,31564=>1000,31565=>1000,31566=>1000,31567=>1000,31568=>1000,31569=>1000,31570=>1000,31572=>1000,31574=>1000, -31576=>1000,31578=>1000,31579=>1000,31581=>1000,31584=>1000,31585=>1000,31586=>1000,31587=>1000,31588=>1000,31589=>1000, -31590=>1000,31591=>1000,31593=>1000,31596=>1000,31597=>1000,31598=>1000,31600=>1000,31601=>1000,31602=>1000,31603=>1000, -31604=>1000,31605=>1000,31606=>1000,31607=>1000,31608=>1000,31609=>1000,31610=>1000,31611=>1000,31613=>1000,31614=>1000, -31616=>1000,31618=>1000,31620=>1000,31621=>1000,31622=>1000,31623=>1000,31624=>1000,31626=>1000,31627=>1000,31628=>1000, -31629=>1000,31630=>1000,31631=>1000,31632=>1000,31633=>1000,31634=>1000,31636=>1000,31637=>1000,31638=>1000,31639=>1000, -31640=>1000,31641=>1000,31642=>1000,31643=>1000,31644=>1000,31645=>1000,31646=>1000,31647=>1000,31648=>1000,31649=>1000, -31650=>1000,31652=>1000,31654=>1000,31655=>1000,31656=>1000,31657=>1000,31658=>1000,31659=>1000,31660=>1000,31661=>1000, -31663=>1000,31665=>1000,31668=>1000,31669=>1000,31671=>1000,31672=>1000,31673=>1000,31678=>1000,31680=>1000,31681=>1000, -31684=>1000,31686=>1000,31687=>1000,31689=>1000,31690=>1000,31691=>1000,31692=>1000,31694=>1000,31695=>1000,31697=>1000, -31698=>1000,31699=>1000,31700=>1000,31701=>1000,31704=>1000,31705=>1000,31706=>1000,31707=>1000,31708=>1000,31709=>1000, -31710=>1000,31711=>1000,31712=>1000,31713=>1000,31714=>1000,31715=>1000,31716=>1000,31717=>1000,31718=>1000,31719=>1000, -31720=>1000,31721=>1000,31722=>1000,31723=>1000,31725=>1000,31726=>1000,31728=>1000,31729=>1000,31730=>1000,31731=>1000, -31732=>1000,31734=>1000,31735=>1000,31736=>1000,31737=>1000,31739=>1000,31740=>1000,31741=>1000,31742=>1000,31743=>1000, -31744=>1000,31745=>1000,31746=>1000,31747=>1000,31749=>1000,31750=>1000,31751=>1000,31753=>1000,31754=>1000,31755=>1000, -31756=>1000,31757=>1000,31758=>1000,31759=>1000,31760=>1000,31761=>1000,31762=>1000,31763=>1000,31764=>1000,31766=>1000, -31767=>1000,31769=>1000,31772=>1000,31773=>1000,31774=>1000,31775=>1000,31776=>1000,31777=>1000,31778=>1000,31779=>1000, -31781=>1000,31782=>1000,31783=>1000,31784=>1000,31785=>1000,31786=>1000,31787=>1000,31788=>1000,31789=>1000,31792=>1000, -31795=>1000,31799=>1000,31800=>1000,31801=>1000,31803=>1000,31804=>1000,31805=>1000,31806=>1000,31807=>1000,31808=>1000, -31809=>1000,31811=>1000,31813=>1000,31815=>1000,31816=>1000,31817=>1000,31818=>1000,31820=>1000,31821=>1000,31823=>1000, -31824=>1000,31827=>1000,31828=>1000,31830=>1000,31831=>1000,31832=>1000,31833=>1000,31834=>1000,31835=>1000,31836=>1000, -31839=>1000,31840=>1000,31843=>1000,31844=>1000,31845=>1000,31846=>1000,31847=>1000,31849=>1000,31850=>1000,31851=>1000, -31852=>1000,31854=>1000,31855=>1000,31858=>1000,31859=>1000,31860=>1000,31861=>1000,31864=>1000,31865=>1000,31866=>1000, -31867=>1000,31868=>1000,31869=>1000,31870=>1000,31871=>1000,31872=>1000,31873=>1000,31874=>1000,31875=>1000,31876=>1000, -31877=>1000,31880=>1000,31881=>1000,31882=>1000,31883=>1000,31884=>1000,31885=>1000,31888=>1000,31889=>1000,31890=>1000, -31892=>1000,31893=>1000,31894=>1000,31895=>1000,31896=>1000,31899=>1000,31900=>1000,31901=>1000,31902=>1000,31903=>1000, -31905=>1000,31906=>1000,31907=>1000,31908=>1000,31909=>1000,31911=>1000,31912=>1000,31914=>1000,31915=>1000,31917=>1000, -31918=>1000,31919=>1000,31921=>1000,31922=>1000,31923=>1000,31924=>1000,31925=>1000,31929=>1000,31930=>1000,31931=>1000, -31932=>1000,31933=>1000,31934=>1000,31935=>1000,31936=>1000,31937=>1000,31938=>1000,31941=>1000,31943=>1000,31944=>1000, -31946=>1000,31947=>1000,31948=>1000,31949=>1000,31950=>1000,31952=>1000,31953=>1000,31954=>1000,31956=>1000,31957=>1000, -31958=>1000,31959=>1000,31960=>1000,31961=>1000,31964=>1000,31965=>1000,31966=>1000,31967=>1000,31968=>1000,31970=>1000, -31975=>1000,31976=>1000,31978=>1000,31980=>1000,31982=>1000,31983=>1000,31984=>1000,31985=>1000,31986=>1000,31988=>1000, -31990=>1000,31991=>1000,31992=>1000,31994=>1000,31995=>1000,31997=>1000,31998=>1000,32000=>1000,32001=>1000,32002=>1000, -32003=>1000,32004=>1000,32005=>1000,32006=>1000,32007=>1000,32008=>1000,32009=>1000,32010=>1000,32011=>1000,32012=>1000, -32013=>1000,32014=>1000,32015=>1000,32016=>1000,32017=>1000,32018=>1000,32019=>1000,32020=>1000,32021=>1000,32022=>1000, -32023=>1000,32024=>1000,32025=>1000,32026=>1000,32027=>1000,32028=>1000,32029=>1000,32030=>1000,32031=>1000,32032=>1000, -32033=>1000,32034=>1000,32039=>1000,32040=>1000,32041=>1000,32043=>1000,32044=>1000,32046=>1000,32047=>1000,32048=>1000, -32049=>1000,32050=>1000,32051=>1000,32053=>1000,32054=>1000,32056=>1000,32057=>1000,32058=>1000,32059=>1000,32060=>1000, -32061=>1000,32062=>1000,32063=>1000,32064=>1000,32065=>1000,32066=>1000,32067=>1000,32068=>1000,32069=>1000,32070=>1000, -32071=>1000,32072=>1000,32074=>1000,32075=>1000,32076=>1000,32078=>1000,32079=>1000,32080=>1000,32081=>1000,32082=>1000, -32083=>1000,32084=>1000,32085=>1000,32086=>1000,32088=>1000,32091=>1000,32092=>1000,32094=>1000,32095=>1000,32097=>1000, -32098=>1000,32099=>1000,32102=>1000,32103=>1000,32104=>1000,32105=>1000,32106=>1000,32107=>1000,32109=>1000,32110=>1000, -32111=>1000,32112=>1000,32113=>1000,32114=>1000,32115=>1000,32117=>1000,32118=>1000,32119=>1000,32121=>1000,32122=>1000, -32123=>1000,32124=>1000,32125=>1000,32127=>1000,32128=>1000,32129=>1000,32131=>1000,32132=>1000,32133=>1000,32134=>1000, -32136=>1000,32137=>1000,32140=>1000,32141=>1000,32142=>1000,32143=>1000,32145=>1000,32146=>1000,32147=>1000,32148=>1000, -32150=>1000,32153=>1000,32154=>1000,32155=>1000,32156=>1000,32157=>1000,32158=>1000,32159=>1000,32160=>1000,32161=>1000, -32162=>1000,32163=>1000,32166=>1000,32167=>1000,32169=>1000,32170=>1000,32171=>1000,32172=>1000,32173=>1000,32174=>1000, -32175=>1000,32176=>1000,32177=>1000,32178=>1000,32180=>1000,32181=>1000,32183=>1000,32184=>1000,32185=>1000,32186=>1000, -32187=>1000,32188=>1000,32189=>1000,32190=>1000,32191=>1000,32192=>1000,32193=>1000,32194=>1000,32196=>1000,32197=>1000, -32198=>1000,32199=>1000,32201=>1000,32202=>1000,32203=>1000,32204=>1000,32206=>1000,32207=>1000,32209=>1000,32210=>1000, -32213=>1000,32214=>1000,32215=>1000,32216=>1000,32217=>1000,32218=>1000,32219=>1000,32220=>1000,32221=>1000,32222=>1000, -32223=>1000,32224=>1000,32225=>1000,32227=>1000,32228=>1000,32230=>1000,32231=>1000,32232=>1000,32233=>1000,32234=>1000, -32236=>1000,32238=>1000,32239=>1000,32240=>1000,32241=>1000,32242=>1000,32243=>1000,32244=>1000,32246=>1000,32247=>1000, -32249=>1000,32250=>1000,32251=>1000,32257=>1000,32259=>1000,32260=>1000,32261=>1000,32264=>1000,32265=>1000,32266=>1000, -32267=>1000,32268=>1000,32269=>1000,32270=>1000,32271=>1000,32272=>1000,32273=>1000,32274=>1000,32275=>1000,32276=>1000, -32277=>1000,32278=>1000,32279=>1000,32282=>1000,32283=>1000,32284=>1000,32285=>1000,32286=>1000,32287=>1000,32288=>1000, -32289=>1000,32290=>1000,32291=>1000,32292=>1000,32293=>1000,32294=>1000,32297=>1000,32298=>1000,32299=>1000,32301=>1000, -32302=>1000,32303=>1000,32304=>1000,32305=>1000,32306=>1000,32307=>1000,32308=>1000,32309=>1000,32310=>1000,32311=>1000, -32312=>1000,32313=>1000,32314=>1000,32315=>1000,32316=>1000,32317=>1000,32318=>1000,32319=>1000,32320=>1000,32321=>1000, -32322=>1000,32323=>1000,32324=>1000,32325=>1000,32326=>1000,32327=>1000,32328=>1000,32329=>1000,32330=>1000,32331=>1000, -32332=>1000,32333=>1000,32336=>1000,32337=>1000,32338=>1000,32339=>1000,32340=>1000,32341=>1000,32342=>1000,32343=>1000, -32344=>1000,32345=>1000,32346=>1000,32348=>1000,32349=>1000,32350=>1000,32351=>1000,32352=>1000,32353=>1000,32354=>1000, -32355=>1000,32358=>1000,32359=>1000,32360=>1000,32361=>1000,32362=>1000,32363=>1000,32365=>1000,32367=>1000,32368=>1000, -32370=>1000,32371=>1000,32372=>1000,32373=>1000,32374=>1000,32375=>1000,32376=>1000,32377=>1000,32378=>1000,32379=>1000, -32380=>1000,32381=>1000,32382=>1000,32383=>1000,32384=>1000,32385=>1000,32386=>1000,32387=>1000,32390=>1000,32391=>1000, -32392=>1000,32393=>1000,32394=>1000,32395=>1000,32396=>1000,32397=>1000,32398=>1000,32399=>1000,32400=>1000,32401=>1000, -32402=>1000,32403=>1000,32404=>1000,32405=>1000,32406=>1000,32407=>1000,32408=>1000,32409=>1000,32410=>1000,32411=>1000, -32412=>1000,32415=>1000,32416=>1000,32417=>1000,32418=>1000,32419=>1000,32420=>1000,32421=>1000,32422=>1000,32423=>1000, -32424=>1000,32425=>1000,32426=>1000,32427=>1000,32428=>1000,32429=>1000,32431=>1000,32432=>1000,32433=>1000,32434=>1000, -32435=>1000,32437=>1000,32438=>1000,32439=>1000,32440=>1000,32441=>1000,32442=>1000,32445=>1000,32446=>1000,32447=>1000, -32448=>1000,32449=>1000,32450=>1000,32451=>1000,32452=>1000,32453=>1000,32454=>1000,32455=>1000,32456=>1000,32457=>1000, -32458=>1000,32459=>1000,32460=>1000,32461=>1000,32462=>1000,32463=>1000,32464=>1000,32465=>1000,32466=>1000,32467=>1000, -32468=>1000,32469=>1000,32471=>1000,32472=>1000,32473=>1000,32474=>1000,32475=>1000,32476=>1000,32477=>1000,32478=>1000, -32479=>1000,32480=>1000,32481=>1000,32482=>1000,32483=>1000,32485=>1000,32486=>1000,32487=>1000,32488=>1000,32489=>1000, -32490=>1000,32491=>1000,32493=>1000,32494=>1000,32495=>1000,32496=>1000,32497=>1000,32498=>1000,32499=>1000,32500=>1000, -32501=>1000,32502=>1000,32503=>1000,32504=>1000,32506=>1000,32507=>1000,32508=>1000,32509=>1000,32510=>1000,32511=>1000, -32512=>1000,32513=>1000,32514=>1000,32515=>1000,32516=>1000,32517=>1000,32518=>1000,32519=>1000,32520=>1000,32521=>1000, -32523=>1000,32524=>1000,32525=>1000,32526=>1000,32527=>1000,32529=>1000,32530=>1000,32531=>1000,32532=>1000,32533=>1000, -32534=>1000,32535=>1000,32536=>1000,32537=>1000,32538=>1000,32539=>1000,32540=>1000,32541=>1000,32543=>1000,32544=>1000, -32545=>1000,32546=>1000,32547=>1000,32548=>1000,32549=>1000,32550=>1000,32551=>1000,32552=>1000,32553=>1000,32554=>1000, -32555=>1000,32556=>1000,32557=>1000,32558=>1000,32559=>1000,32560=>1000,32561=>1000,32562=>1000,32563=>1000,32564=>1000, -32565=>1000,32566=>1000,32568=>1000,32569=>1000,32570=>1000,32573=>1000,32574=>1000,32575=>1000,32578=>1000,32579=>1000, -32580=>1000,32581=>1000,32583=>1000,32584=>1000,32586=>1000,32587=>1000,32588=>1000,32589=>1000,32590=>1000,32591=>1000, -32592=>1000,32593=>1000,32596=>1000,32597=>1000,32599=>1000,32600=>1000,32602=>1000,32603=>1000,32604=>1000,32605=>1000, -32606=>1000,32607=>1000,32608=>1000,32609=>1000,32610=>1000,32611=>1000,32613=>1000,32614=>1000,32615=>1000,32616=>1000, -32617=>1000,32618=>1000,32619=>1000,32620=>1000,32621=>1000,32622=>1000,32624=>1000,32625=>1000,32626=>1000,32627=>1000, -32628=>1000,32629=>1000,32630=>1000,32631=>1000,32632=>1000,32633=>1000,32634=>1000,32635=>1000,32636=>1000,32637=>1000, -32638=>1000,32639=>1000,32641=>1000,32642=>1000,32643=>1000,32645=>1000,32646=>1000,32647=>1000,32648=>1000,32649=>1000, -32650=>1000,32651=>1000,32652=>1000,32653=>1000,32654=>1000,32657=>1000,32658=>1000,32660=>1000,32661=>1000,32662=>1000, -32666=>1000,32667=>1000,32668=>1000,32669=>1000,32670=>1000,32671=>1000,32672=>1000,32673=>1000,32674=>1000,32675=>1000, -32676=>1000,32677=>1000,32678=>1000,32679=>1000,32680=>1000,32681=>1000,32684=>1000,32685=>1000,32686=>1000,32687=>1000, -32688=>1000,32689=>1000,32690=>1000,32691=>1000,32693=>1000,32694=>1000,32695=>1000,32696=>1000,32697=>1000,32698=>1000, -32699=>1000,32700=>1000,32701=>1000,32702=>1000,32703=>1000,32704=>1000,32705=>1000,32706=>1000,32707=>1000,32709=>1000, -32710=>1000,32711=>1000,32713=>1000,32714=>1000,32715=>1000,32716=>1000,32717=>1000,32718=>1000,32719=>1000,32720=>1000, -32721=>1000,32722=>1000,32724=>1000,32725=>1000,32727=>1000,32728=>1000,32731=>1000,32732=>1000,32734=>1000,32735=>1000, -32736=>1000,32737=>1000,32738=>1000,32739=>1000,32741=>1000,32742=>1000,32744=>1000,32745=>1000,32746=>1000,32747=>1000, -32748=>1000,32749=>1000,32750=>1000,32751=>1000,32752=>1000,32753=>1000,32754=>1000,32755=>1000,32756=>1000,32757=>1000, -32759=>1000,32760=>1000,32761=>1000,32763=>1000,32764=>1000,32765=>1000,32766=>1000,32767=>1000,32768=>1000,32769=>1000, -32771=>1000,32772=>1000,32773=>1000,32774=>1000,32775=>1000,32777=>1000,32779=>1000,32780=>1000,32781=>1000,32782=>1000, -32783=>1000,32784=>1000,32785=>1000,32786=>1000,32788=>1000,32789=>1000,32790=>1000,32791=>1000,32792=>1000,32793=>1000, -32795=>1000,32796=>1000,32798=>1000,32799=>1000,32800=>1000,32801=>1000,32802=>1000,32804=>1000,32805=>1000,32806=>1000, -32807=>1000,32808=>1000,32809=>1000,32810=>1000,32812=>1000,32813=>1000,32816=>1000,32817=>1000,32819=>1000,32820=>1000, -32821=>1000,32822=>1000,32823=>1000,32824=>1000,32825=>1000,32827=>1000,32829=>1000,32830=>1000,32831=>1000,32834=>1000, -32835=>1000,32838=>1000,32839=>1000,32840=>1000,32842=>1000,32843=>1000,32844=>1000,32845=>1000,32847=>1000,32848=>1000, -32849=>1000,32850=>1000,32852=>1000,32854=>1000,32856=>1000,32858=>1000,32860=>1000,32861=>1000,32862=>1000,32863=>1000, -32865=>1000,32866=>1000,32868=>1000,32871=>1000,32872=>1000,32873=>1000,32874=>1000,32876=>1000,32879=>1000,32880=>1000, -32881=>1000,32882=>1000,32883=>1000,32884=>1000,32885=>1000,32886=>1000,32887=>1000,32888=>1000,32889=>1000,32893=>1000, -32894=>1000,32895=>1000,32896=>1000,32898=>1000,32899=>1000,32900=>1000,32901=>1000,32902=>1000,32903=>1000,32905=>1000, -32906=>1000,32907=>1000,32908=>1000,32911=>1000,32912=>1000,32914=>1000,32915=>1000,32917=>1000,32918=>1000,32920=>1000, -32921=>1000,32922=>1000,32923=>1000,32924=>1000,32925=>1000,32927=>1000,32928=>1000,32929=>1000,32930=>1000,32931=>1000, -32932=>1000,32933=>1000,32937=>1000,32938=>1000,32939=>1000,32940=>1000,32941=>1000,32942=>1000,32943=>1000,32945=>1000, -32946=>1000,32948=>1000,32949=>1000,32951=>1000,32952=>1000,32954=>1000,32956=>1000,32957=>1000,32958=>1000,32959=>1000, -32960=>1000,32961=>1000,32962=>1000,32963=>1000,32964=>1000,32965=>1000,32966=>1000,32967=>1000,32968=>1000,32969=>1000, -32970=>1000,32972=>1000,32973=>1000,32974=>1000,32975=>1000,32976=>1000,32977=>1000,32980=>1000,32981=>1000,32982=>1000, -32983=>1000,32984=>1000,32985=>1000,32986=>1000,32987=>1000,32988=>1000,32989=>1000,32990=>1000,32992=>1000,32993=>1000, -32995=>1000,32996=>1000,32997=>1000,32998=>1000,32999=>1000,33000=>1000,33001=>1000,33002=>1000,33003=>1000,33004=>1000, -33005=>1000,33007=>1000,33008=>1000,33009=>1000,33010=>1000,33011=>1000,33012=>1000,33013=>1000,33014=>1000,33016=>1000, -33017=>1000,33018=>1000,33019=>1000,33020=>1000,33021=>1000,33022=>1000,33024=>1000,33025=>1000,33026=>1000,33029=>1000, -33030=>1000,33031=>1000,33032=>1000,33033=>1000,33034=>1000,33037=>1000,33038=>1000,33039=>1000,33040=>1000,33041=>1000, -33042=>1000,33043=>1000,33044=>1000,33045=>1000,33046=>1000,33048=>1000,33049=>1000,33050=>1000,33051=>1000,33053=>1000, -33054=>1000,33055=>1000,33057=>1000,33058=>1000,33059=>1000,33060=>1000,33061=>1000,33063=>1000,33065=>1000,33067=>1000, -33068=>1000,33069=>1000,33071=>1000,33072=>1000,33073=>1000,33074=>1000,33075=>1000,33078=>1000,33080=>1000,33081=>1000, -33082=>1000,33085=>1000,33086=>1000,33091=>1000,33092=>1000,33094=>1000,33095=>1000,33096=>1000,33098=>1000,33099=>1000, -33100=>1000,33101=>1000,33102=>1000,33103=>1000,33104=>1000,33105=>1000,33106=>1000,33107=>1000,33108=>1000,33109=>1000, -33113=>1000,33114=>1000,33115=>1000,33116=>1000,33118=>1000,33119=>1000,33120=>1000,33121=>1000,33122=>1000,33124=>1000, -33125=>1000,33126=>1000,33127=>1000,33129=>1000,33131=>1000,33133=>1000,33134=>1000,33135=>1000,33136=>1000,33137=>1000, -33138=>1000,33139=>1000,33140=>1000,33142=>1000,33143=>1000,33144=>1000,33145=>1000,33146=>1000,33147=>1000,33148=>1000, -33149=>1000,33150=>1000,33151=>1000,33152=>1000,33154=>1000,33155=>1000,33158=>1000,33159=>1000,33160=>1000,33161=>1000, -33162=>1000,33163=>1000,33164=>1000,33165=>1000,33167=>1000,33169=>1000,33171=>1000,33173=>1000,33175=>1000,33176=>1000, -33177=>1000,33178=>1000,33179=>1000,33180=>1000,33181=>1000,33182=>1000,33183=>1000,33184=>1000,33186=>1000,33187=>1000, -33188=>1000,33190=>1000,33191=>1000,33192=>1000,33193=>1000,33194=>1000,33195=>1000,33196=>1000,33198=>1000,33200=>1000, -33201=>1000,33202=>1000,33203=>1000,33204=>1000,33205=>1000,33207=>1000,33208=>1000,33209=>1000,33210=>1000,33211=>1000, -33212=>1000,33213=>1000,33214=>1000,33215=>1000,33216=>1000,33217=>1000,33218=>1000,33219=>1000,33220=>1000,33221=>1000, -33222=>1000,33223=>1000,33224=>1000,33225=>1000,33226=>1000,33228=>1000,33229=>1000,33231=>1000,33232=>1000,33233=>1000, -33234=>1000,33235=>1000,33237=>1000,33239=>1000,33240=>1000,33241=>1000,33242=>1000,33243=>1000,33245=>1000,33246=>1000, -33247=>1000,33248=>1000,33249=>1000,33250=>1000,33251=>1000,33253=>1000,33254=>1000,33255=>1000,33256=>1000,33257=>1000, -33258=>1000,33260=>1000,33261=>1000,33262=>1000,33266=>1000,33267=>1000,33268=>1000,33271=>1000,33272=>1000,33273=>1000, -33274=>1000,33275=>1000,33276=>1000,33278=>1000,33279=>1000,33280=>1000,33281=>1000,33282=>1000,33284=>1000,33285=>1000, -33286=>1000,33287=>1000,33288=>1000,33289=>1000,33290=>1000,33291=>1000,33292=>1000,33293=>1000,33294=>1000,33296=>1000, -33297=>1000,33298=>1000,33300=>1000,33301=>1000,33302=>1000,33303=>1000,33304=>1000,33307=>1000,33308=>1000,33309=>1000, -33310=>1000,33311=>1000,33312=>1000,33313=>1000,33314=>1000,33315=>1000,33317=>1000,33320=>1000,33321=>1000,33322=>1000, -33323=>1000,33324=>1000,33325=>1000,33326=>1000,33327=>1000,33328=>1000,33329=>1000,33330=>1000,33331=>1000,33332=>1000, -33333=>1000,33334=>1000,33335=>1000,33336=>1000,33337=>1000,33338=>1000,33339=>1000,33340=>1000,33341=>1000,33342=>1000, -33343=>1000,33344=>1000,33346=>1000,33348=>1000,33349=>1000,33351=>1000,33353=>1000,33355=>1000,33358=>1000,33359=>1000, -33360=>1000,33361=>1000,33362=>1000,33363=>1000,33365=>1000,33366=>1000,33367=>1000,33368=>1000,33369=>1000,33370=>1000, -33371=>1000,33372=>1000,33373=>1000,33374=>1000,33375=>1000,33377=>1000,33378=>1000,33379=>1000,33380=>1000,33382=>1000, -33384=>1000,33385=>1000,33386=>1000,33387=>1000,33388=>1000,33389=>1000,33390=>1000,33391=>1000,33392=>1000,33393=>1000, -33394=>1000,33395=>1000,33396=>1000,33397=>1000,33398=>1000,33399=>1000,33400=>1000,33401=>1000,33402=>1000,33404=>1000, -33405=>1000,33406=>1000,33407=>1000,33408=>1000,33410=>1000,33411=>1000,33412=>1000,33413=>1000,33416=>1000,33418=>1000, -33419=>1000,33421=>1000,33422=>1000,33423=>1000,33424=>1000,33425=>1000,33426=>1000,33427=>1000,33428=>1000,33431=>1000, -33432=>1000,33433=>1000,33434=>1000,33435=>1000,33436=>1000,33437=>1000,33438=>1000,33439=>1000,33440=>1000,33441=>1000, -33442=>1000,33443=>1000,33444=>1000,33445=>1000,33446=>1000,33447=>1000,33448=>1000,33449=>1000,33450=>1000,33451=>1000, -33452=>1000,33453=>1000,33454=>1000,33455=>1000,33456=>1000,33457=>1000,33459=>1000,33460=>1000,33461=>1000,33462=>1000, -33463=>1000,33464=>1000,33465=>1000,33466=>1000,33467=>1000,33468=>1000,33469=>1000,33470=>1000,33471=>1000,33472=>1000, -33473=>1000,33474=>1000,33475=>1000,33476=>1000,33477=>1000,33479=>1000,33480=>1000,33482=>1000,33483=>1000,33484=>1000, -33485=>1000,33486=>1000,33487=>1000,33489=>1000,33490=>1000,33491=>1000,33492=>1000,33493=>1000,33494=>1000,33495=>1000, -33496=>1000,33497=>1000,33499=>1000,33500=>1000,33502=>1000,33503=>1000,33504=>1000,33505=>1000,33507=>1000,33508=>1000, -33509=>1000,33510=>1000,33511=>1000,33512=>1000,33514=>1000,33515=>1000,33516=>1000,33517=>1000,33519=>1000,33520=>1000, -33521=>1000,33522=>1000,33523=>1000,33524=>1000,33525=>1000,33526=>1000,33527=>1000,33529=>1000,33530=>1000,33531=>1000, -33533=>1000,33534=>1000,33536=>1000,33537=>1000,33538=>1000,33539=>1000,33540=>1000,33541=>1000,33542=>1000,33543=>1000, -33544=>1000,33545=>1000,33548=>1000,33549=>1000,33550=>1000,33551=>1000,33553=>1000,33556=>1000,33557=>1000,33558=>1000, -33559=>1000,33560=>1000,33561=>1000,33562=>1000,33563=>1000,33564=>1000,33566=>1000,33568=>1000,33570=>1000,33571=>1000, -33572=>1000,33573=>1000,33574=>1000,33575=>1000,33576=>1000,33577=>1000,33578=>1000,33579=>1000,33580=>1000,33581=>1000, -33583=>1000,33585=>1000,33586=>1000,33587=>1000,33588=>1000,33589=>1000,33590=>1000,33591=>1000,33592=>1000,33593=>1000, -33594=>1000,33595=>1000,33596=>1000,33599=>1000,33600=>1000,33601=>1000,33602=>1000,33603=>1000,33604=>1000,33605=>1000, -33606=>1000,33607=>1000,33608=>1000,33609=>1000,33610=>1000,33611=>1000,33612=>1000,33613=>1000,33614=>1000,33615=>1000, -33616=>1000,33617=>1000,33618=>1000,33619=>1000,33620=>1000,33622=>1000,33624=>1000,33626=>1000,33627=>1000,33628=>1000, -33630=>1000,33631=>1000,33632=>1000,33633=>1000,33634=>1000,33635=>1000,33636=>1000,33637=>1000,33638=>1000,33639=>1000, -33640=>1000,33641=>1000,33642=>1000,33643=>1000,33644=>1000,33645=>1000,33646=>1000,33647=>1000,33651=>1000,33652=>1000, -33653=>1000,33654=>1000,33655=>1000,33656=>1000,33658=>1000,33659=>1000,33660=>1000,33661=>1000,33662=>1000,33663=>1000, -33665=>1000,33667=>1000,33669=>1000,33670=>1000,33671=>1000,33672=>1000,33673=>1000,33674=>1000,33675=>1000,33676=>1000, -33677=>1000,33678=>1000,33679=>1000,33680=>1000,33682=>1000,33683=>1000,33684=>1000,33685=>1000,33686=>1000,33687=>1000, -33688=>1000,33689=>1000,33690=>1000,33691=>1000,33692=>1000,33693=>1000,33694=>1000,33695=>1000,33696=>1000,33698=>1000, -33699=>1000,33700=>1000,33701=>1000,33702=>1000,33703=>1000,33704=>1000,33705=>1000,33706=>1000,33707=>1000,33710=>1000, -33711=>1000,33712=>1000,33713=>1000,33714=>1000,33715=>1000,33716=>1000,33717=>1000,33718=>1000,33719=>1000,33720=>1000, -33721=>1000,33722=>1000,33724=>1000,33725=>1000,33727=>1000,33728=>1000,33729=>1000,33730=>1000,33731=>1000,33732=>1000, -33733=>1000,33734=>1000,33735=>1000,33736=>1000,33737=>1000,33738=>1000,33739=>1000,33740=>1000,33742=>1000,33743=>1000, -33745=>1000,33747=>1000,33748=>1000,33749=>1000,33750=>1000,33751=>1000,33752=>1000,33753=>1000,33755=>1000,33756=>1000, -33757=>1000,33758=>1000,33759=>1000,33760=>1000,33761=>1000,33762=>1000,33763=>1000,33764=>1000,33765=>1000,33767=>1000, -33768=>1000,33769=>1000,33770=>1000,33771=>1000,33772=>1000,33774=>1000,33775=>1000,33776=>1000,33777=>1000,33778=>1000, -33779=>1000,33780=>1000,33781=>1000,33782=>1000,33783=>1000,33784=>1000,33785=>1000,33786=>1000,33787=>1000,33788=>1000, -33789=>1000,33790=>1000,33791=>1000,33793=>1000,33795=>1000,33796=>1000,33798=>1000,33799=>1000,33801=>1000,33802=>1000, -33803=>1000,33804=>1000,33805=>1000,33806=>1000,33807=>1000,33808=>1000,33809=>1000,33810=>1000,33811=>1000,33816=>1000, -33819=>1000,33820=>1000,33821=>1000,33824=>1000,33826=>1000,33827=>1000,33828=>1000,33829=>1000,33830=>1000,33831=>1000, -33832=>1000,33833=>1000,33834=>1000,33835=>1000,33836=>1000,33837=>1000,33839=>1000,33840=>1000,33841=>1000,33842=>1000, -33843=>1000,33844=>1000,33845=>1000,33846=>1000,33847=>1000,33848=>1000,33849=>1000,33850=>1000,33851=>1000,33852=>1000, -33853=>1000,33855=>1000,33856=>1000,33858=>1000,33859=>1000,33860=>1000,33861=>1000,33862=>1000,33863=>1000,33864=>1000, -33865=>1000,33867=>1000,33868=>1000,33869=>1000,33870=>1000,33872=>1000,33873=>1000,33874=>1000,33876=>1000,33878=>1000, -33879=>1000,33881=>1000,33882=>1000,33883=>1000,33884=>1000,33885=>1000,33886=>1000,33887=>1000,33888=>1000,33889=>1000, -33890=>1000,33891=>1000,33893=>1000,33894=>1000,33895=>1000,33896=>1000,33897=>1000,33899=>1000,33900=>1000,33901=>1000, -33902=>1000,33903=>1000,33904=>1000,33905=>1000,33907=>1000,33908=>1000,33909=>1000,33910=>1000,33911=>1000,33912=>1000, -33913=>1000,33914=>1000,33917=>1000,33918=>1000,33922=>1000,33924=>1000,33926=>1000,33927=>1000,33928=>1000,33929=>1000, -33931=>1000,33932=>1000,33933=>1000,33934=>1000,33935=>1000,33936=>1000,33937=>1000,33940=>1000,33943=>1000,33944=>1000, -33945=>1000,33946=>1000,33947=>1000,33948=>1000,33949=>1000,33950=>1000,33951=>1000,33952=>1000,33953=>1000,33954=>1000, -33956=>1000,33959=>1000,33960=>1000,33961=>1000,33962=>1000,33963=>1000,33964=>1000,33965=>1000,33966=>1000,33967=>1000, -33968=>1000,33969=>1000,33970=>1000,33972=>1000,33974=>1000,33976=>1000,33977=>1000,33978=>1000,33979=>1000,33980=>1000, -33981=>1000,33983=>1000,33984=>1000,33985=>1000,33986=>1000,33988=>1000,33989=>1000,33990=>1000,33991=>1000,33993=>1000, -33994=>1000,33995=>1000,33996=>1000,33997=>1000,33998=>1000,33999=>1000,34000=>1000,34001=>1000,34002=>1000,34003=>1000, -34004=>1000,34006=>1000,34007=>1000,34009=>1000,34010=>1000,34011=>1000,34012=>1000,34013=>1000,34015=>1000,34016=>1000, -34019=>1000,34021=>1000,34022=>1000,34023=>1000,34024=>1000,34025=>1000,34026=>1000,34027=>1000,34028=>1000,34030=>1000, -34031=>1000,34032=>1000,34033=>1000,34034=>1000,34035=>1000,34036=>1000,34038=>1000,34039=>1000,34041=>1000,34042=>1000, -34043=>1000,34044=>1000,34045=>1000,34046=>1000,34047=>1000,34048=>1000,34050=>1000,34054=>1000,34055=>1000,34056=>1000, -34057=>1000,34058=>1000,34059=>1000,34060=>1000,34061=>1000,34062=>1000,34063=>1000,34065=>1000,34066=>1000,34067=>1000, -34068=>1000,34069=>1000,34070=>1000,34071=>1000,34072=>1000,34073=>1000,34074=>1000,34076=>1000,34077=>1000,34078=>1000, -34079=>1000,34080=>1000,34081=>1000,34083=>1000,34084=>1000,34085=>1000,34086=>1000,34087=>1000,34088=>1000,34089=>1000, -34090=>1000,34091=>1000,34092=>1000,34093=>1000,34094=>1000,34095=>1000,34096=>1000,34097=>1000,34101=>1000,34103=>1000, -34104=>1000,34105=>1000,34106=>1000,34107=>1000,34108=>1000,34109=>1000,34110=>1000,34111=>1000,34112=>1000,34113=>1000, -34115=>1000,34116=>1000,34117=>1000,34118=>1000,34119=>1000,34120=>1000,34121=>1000,34122=>1000,34123=>1000,34125=>1000, -34126=>1000,34129=>1000,34131=>1000,34132=>1000,34133=>1000,34134=>1000,34135=>1000,34136=>1000,34137=>1000,34138=>1000, -34139=>1000,34141=>1000,34142=>1000,34144=>1000,34145=>1000,34146=>1000,34147=>1000,34148=>1000,34149=>1000,34150=>1000, -34151=>1000,34152=>1000,34153=>1000,34154=>1000,34155=>1000,34156=>1000,34157=>1000,34158=>1000,34161=>1000,34162=>1000, -34164=>1000,34165=>1000,34166=>1000,34167=>1000,34168=>1000,34169=>1000,34170=>1000,34171=>1000,34172=>1000,34174=>1000, -34176=>1000,34177=>1000,34178=>1000,34179=>1000,34180=>1000,34181=>1000,34182=>1000,34183=>1000,34184=>1000,34185=>1000, -34186=>1000,34187=>1000,34188=>1000,34189=>1000,34190=>1000,34191=>1000,34192=>1000,34193=>1000,34196=>1000,34197=>1000, -34198=>1000,34199=>1000,34200=>1000,34201=>1000,34202=>1000,34203=>1000,34204=>1000,34205=>1000,34206=>1000,34207=>1000, -34208=>1000,34209=>1000,34210=>1000,34211=>1000,34212=>1000,34214=>1000,34215=>1000,34216=>1000,34217=>1000,34218=>1000, -34219=>1000,34220=>1000,34222=>1000,34223=>1000,34224=>1000,34225=>1000,34227=>1000,34228=>1000,34229=>1000,34230=>1000, -34231=>1000,34232=>1000,34233=>1000,34234=>1000,34237=>1000,34238=>1000,34239=>1000,34240=>1000,34241=>1000,34242=>1000, -34243=>1000,34244=>1000,34245=>1000,34246=>1000,34247=>1000,34248=>1000,34249=>1000,34251=>1000,34253=>1000,34254=>1000, -34255=>1000,34256=>1000,34257=>1000,34258=>1000,34259=>1000,34261=>1000,34263=>1000,34264=>1000,34265=>1000,34266=>1000, -34268=>1000,34269=>1000,34270=>1000,34271=>1000,34273=>1000,34274=>1000,34275=>1000,34276=>1000,34277=>1000,34278=>1000, -34280=>1000,34281=>1000,34282=>1000,34283=>1000,34284=>1000,34285=>1000,34287=>1000,34288=>1000,34289=>1000,34290=>1000, -34294=>1000,34295=>1000,34296=>1000,34297=>1000,34298=>1000,34299=>1000,34301=>1000,34302=>1000,34303=>1000,34304=>1000, -34305=>1000,34306=>1000,34308=>1000,34309=>1000,34310=>1000,34311=>1000,34313=>1000,34314=>1000,34315=>1000,34316=>1000, -34321=>1000,34323=>1000,34326=>1000,34327=>1000,34328=>1000,34329=>1000,34330=>1000,34331=>1000,34332=>1000,34334=>1000, -34335=>1000,34336=>1000,34337=>1000,34338=>1000,34339=>1000,34340=>1000,34341=>1000,34342=>1000,34343=>1000,34345=>1000, -34346=>1000,34348=>1000,34349=>1000,34350=>1000,34351=>1000,34352=>1000,34353=>1000,34354=>1000,34355=>1000,34356=>1000, -34357=>1000,34358=>1000,34360=>1000,34361=>1000,34362=>1000,34363=>1000,34364=>1000,34366=>1000,34367=>1000,34368=>1000, -34371=>1000,34374=>1000,34375=>1000,34376=>1000,34379=>1000,34380=>1000,34381=>1000,34382=>1000,34383=>1000,34384=>1000, -34385=>1000,34386=>1000,34387=>1000,34388=>1000,34389=>1000,34390=>1000,34393=>1000,34394=>1000,34395=>1000,34396=>1000, -34398=>1000,34399=>1000,34401=>1000,34402=>1000,34403=>1000,34404=>1000,34405=>1000,34407=>1000,34408=>1000,34409=>1000, -34410=>1000,34411=>1000,34412=>1000,34413=>1000,34414=>1000,34415=>1000,34416=>1000,34417=>1000,34419=>1000,34420=>1000, -34423=>1000,34425=>1000,34426=>1000,34427=>1000,34428=>1000,34429=>1000,34430=>1000,34431=>1000,34432=>1000,34433=>1000, -34434=>1000,34437=>1000,34438=>1000,34439=>1000,34442=>1000,34443=>1000,34444=>1000,34445=>1000,34446=>1000,34448=>1000, -34449=>1000,34451=>1000,34452=>1000,34453=>1000,34454=>1000,34455=>1000,34456=>1000,34457=>1000,34458=>1000,34460=>1000, -34461=>1000,34462=>1000,34465=>1000,34466=>1000,34467=>1000,34468=>1000,34469=>1000,34471=>1000,34472=>1000,34473=>1000, -34474=>1000,34475=>1000,34476=>1000,34479=>1000,34480=>1000,34481=>1000,34483=>1000,34484=>1000,34485=>1000,34486=>1000, -34487=>1000,34488=>1000,34489=>1000,34490=>1000,34491=>1000,34492=>1000,34493=>1000,34494=>1000,34495=>1000,34496=>1000, -34497=>1000,34498=>1000,34499=>1000,34500=>1000,34501=>1000,34502=>1000,34503=>1000,34504=>1000,34505=>1000,34506=>1000, -34507=>1000,34508=>1000,34509=>1000,34510=>1000,34511=>1000,34512=>1000,34513=>1000,34515=>1000,34516=>1000,34518=>1000, -34519=>1000,34520=>1000,34521=>1000,34522=>1000,34523=>1000,34524=>1000,34525=>1000,34526=>1000,34527=>1000,34530=>1000, -34531=>1000,34532=>1000,34534=>1000,34536=>1000,34537=>1000,34538=>1000,34539=>1000,34540=>1000,34541=>1000,34542=>1000, -34543=>1000,34544=>1000,34545=>1000,34546=>1000,34547=>1000,34548=>1000,34549=>1000,34550=>1000,34551=>1000,34552=>1000, -34553=>1000,34554=>1000,34555=>1000,34558=>1000,34560=>1000,34561=>1000,34562=>1000,34563=>1000,34564=>1000,34565=>1000, -34566=>1000,34567=>1000,34568=>1000,34569=>1000,34570=>1000,34571=>1000,34572=>1000,34573=>1000,34574=>1000,34577=>1000, -34578=>1000,34579=>1000,34581=>1000,34583=>1000,34584=>1000,34585=>1000,34586=>1000,34587=>1000,34588=>1000,34590=>1000, -34592=>1000,34593=>1000,34594=>1000,34595=>1000,34596=>1000,34597=>1000,34598=>1000,34599=>1000,34600=>1000,34601=>1000, -34602=>1000,34604=>1000,34605=>1000,34606=>1000,34608=>1000,34609=>1000,34610=>1000,34611=>1000,34612=>1000,34613=>1000, -34615=>1000,34616=>1000,34618=>1000,34619=>1000,34620=>1000,34622=>1000,34623=>1000,34624=>1000,34625=>1000,34626=>1000, -34627=>1000,34630=>1000,34631=>1000,34632=>1000,34633=>1000,34635=>1000,34636=>1000,34637=>1000,34638=>1000,34639=>1000, -34640=>1000,34641=>1000,34642=>1000,34643=>1000,34644=>1000,34645=>1000,34646=>1000,34647=>1000,34648=>1000,34649=>1000, -34650=>1000,34651=>1000,34652=>1000,34653=>1000,34654=>1000,34655=>1000,34656=>1000,34657=>1000,34658=>1000,34659=>1000, -34660=>1000,34661=>1000,34662=>1000,34663=>1000,34664=>1000,34665=>1000,34666=>1000,34667=>1000,34668=>1000,34669=>1000, -34670=>1000,34671=>1000,34672=>1000,34675=>1000,34676=>1000,34677=>1000,34678=>1000,34679=>1000,34680=>1000,34681=>1000, -34682=>1000,34683=>1000,34684=>1000,34685=>1000,34686=>1000,34687=>1000,34689=>1000,34690=>1000,34691=>1000,34692=>1000, -34693=>1000,34695=>1000,34696=>1000,34697=>1000,34699=>1000,34701=>1000,34703=>1000,34704=>1000,34705=>1000,34706=>1000, -34707=>1000,34708=>1000,34710=>1000,34711=>1000,34712=>1000,34714=>1000,34715=>1000,34716=>1000,34717=>1000,34718=>1000, -34719=>1000,34722=>1000,34723=>1000,34724=>1000,34728=>1000,34730=>1000,34731=>1000,34732=>1000,34733=>1000,34734=>1000, -34735=>1000,34736=>1000,34738=>1000,34739=>1000,34740=>1000,34741=>1000,34742=>1000,34743=>1000,34744=>1000,34745=>1000, -34746=>1000,34747=>1000,34748=>1000,34749=>1000,34750=>1000,34751=>1000,34752=>1000,34754=>1000,34755=>1000,34756=>1000, -34757=>1000,34758=>1000,34759=>1000,34760=>1000,34761=>1000,34762=>1000,34763=>1000,34764=>1000,34768=>1000,34769=>1000, -34770=>1000,34771=>1000,34772=>1000,34775=>1000,34776=>1000,34777=>1000,34779=>1000,34780=>1000,34781=>1000,34782=>1000, -34783=>1000,34784=>1000,34785=>1000,34786=>1000,34787=>1000,34788=>1000,34789=>1000,34790=>1000,34791=>1000,34792=>1000, -34794=>1000,34795=>1000,34796=>1000,34797=>1000,34798=>1000,34799=>1000,34802=>1000,34803=>1000,34804=>1000,34806=>1000, -34807=>1000,34809=>1000,34810=>1000,34811=>1000,34812=>1000,34814=>1000,34815=>1000,34816=>1000,34817=>1000,34818=>1000, -34819=>1000,34821=>1000,34822=>1000,34823=>1000,34824=>1000,34825=>1000,34826=>1000,34827=>1000,34828=>1000,34829=>1000, -34830=>1000,34831=>1000,34832=>1000,34833=>1000,34835=>1000,34836=>1000,34837=>1000,34838=>1000,34839=>1000,34841=>1000, -34843=>1000,34844=>1000,34845=>1000,34847=>1000,34848=>1000,34849=>1000,34850=>1000,34851=>1000,34852=>1000,34853=>1000, -34854=>1000,34855=>1000,34856=>1000,34857=>1000,34858=>1000,34859=>1000,34860=>1000,34862=>1000,34863=>1000,34864=>1000, -34865=>1000,34866=>1000,34867=>1000,34869=>1000,34870=>1000,34871=>1000,34872=>1000,34873=>1000,34875=>1000,34876=>1000, -34877=>1000,34878=>1000,34879=>1000,34880=>1000,34881=>1000,34882=>1000,34883=>1000,34884=>1000,34885=>1000,34886=>1000, -34888=>1000,34890=>1000,34891=>1000,34892=>1000,34893=>1000,34894=>1000,34898=>1000,34899=>1000,34900=>1000,34901=>1000, -34902=>1000,34903=>1000,34905=>1000,34906=>1000,34907=>1000,34909=>1000,34910=>1000,34913=>1000,34914=>1000,34915=>1000, -34916=>1000,34917=>1000,34919=>1000,34920=>1000,34921=>1000,34922=>1000,34923=>1000,34924=>1000,34925=>1000,34926=>1000, -34927=>1000,34928=>1000,34929=>1000,34930=>1000,34932=>1000,34933=>1000,34934=>1000,34935=>1000,34937=>1000,34940=>1000, -34941=>1000,34942=>1000,34943=>1000,34944=>1000,34945=>1000,34946=>1000,34947=>1000,34948=>1000,34949=>1000,34952=>1000, -34953=>1000,34955=>1000,34956=>1000,34957=>1000,34958=>1000,34961=>1000,34962=>1000,34963=>1000,34965=>1000,34966=>1000, -34967=>1000,34968=>1000,34969=>1000,34970=>1000,34971=>1000,34972=>1000,34974=>1000,34975=>1000,34977=>1000,34978=>1000, -34980=>1000,34983=>1000,34984=>1000,34986=>1000,34987=>1000,34988=>1000,34989=>1000,34990=>1000,34992=>1000,34993=>1000, -34994=>1000,34996=>1000,34997=>1000,34998=>1000,34999=>1000,35000=>1000,35001=>1000,35002=>1000,35004=>1000,35005=>1000, -35006=>1000,35007=>1000,35008=>1000,35009=>1000,35010=>1000,35011=>1000,35012=>1000,35013=>1000,35014=>1000,35017=>1000, -35018=>1000,35019=>1000,35020=>1000,35021=>1000,35022=>1000,35023=>1000,35024=>1000,35026=>1000,35028=>1000,35029=>1000, -35030=>1000,35031=>1000,35032=>1000,35033=>1000,35034=>1000,35035=>1000,35036=>1000,35037=>1000,35038=>1000,35039=>1000, -35041=>1000,35042=>1000,35043=>1000,35044=>1000,35045=>1000,35047=>1000,35048=>1000,35051=>1000,35052=>1000,35054=>1000, -35055=>1000,35056=>1000,35057=>1000,35058=>1000,35059=>1000,35060=>1000,35061=>1000,35062=>1000,35063=>1000,35064=>1000, -35065=>1000,35066=>1000,35067=>1000,35068=>1000,35069=>1000,35070=>1000,35073=>1000,35074=>1000,35076=>1000,35077=>1000, -35078=>1000,35079=>1000,35081=>1000,35082=>1000,35083=>1000,35084=>1000,35086=>1000,35088=>1000,35089=>1000,35090=>1000, -35091=>1000,35092=>1000,35093=>1000,35094=>1000,35095=>1000,35096=>1000,35097=>1000,35098=>1000,35099=>1000,35100=>1000, -35101=>1000,35102=>1000,35103=>1000,35105=>1000,35106=>1000,35107=>1000,35109=>1000,35110=>1000,35111=>1000,35113=>1000, -35114=>1000,35115=>1000,35116=>1000,35117=>1000,35118=>1000,35119=>1000,35120=>1000,35121=>1000,35122=>1000,35123=>1000, -35124=>1000,35125=>1000,35126=>1000,35127=>1000,35128=>1000,35131=>1000,35132=>1000,35133=>1000,35134=>1000,35137=>1000, -35138=>1000,35139=>1000,35140=>1000,35142=>1000,35145=>1000,35147=>1000,35148=>1000,35149=>1000,35151=>1000,35152=>1000, -35153=>1000,35154=>1000,35155=>1000,35158=>1000,35159=>1000,35160=>1000,35161=>1000,35162=>1000,35163=>1000,35164=>1000, -35165=>1000,35166=>1000,35167=>1000,35168=>1000,35169=>1000,35170=>1000,35171=>1000,35172=>1000,35174=>1000,35177=>1000, -35178=>1000,35179=>1000,35180=>1000,35181=>1000,35182=>1000,35183=>1000,35185=>1000,35186=>1000,35187=>1000,35188=>1000, -35190=>1000,35191=>1000,35193=>1000,35194=>1000,35195=>1000,35196=>1000,35198=>1000,35199=>1000,35201=>1000,35202=>1000, -35203=>1000,35205=>1000,35206=>1000,35207=>1000,35208=>1000,35210=>1000,35211=>1000,35215=>1000,35219=>1000,35221=>1000, -35222=>1000,35223=>1000,35224=>1000,35226=>1000,35227=>1000,35228=>1000,35229=>1000,35230=>1000,35231=>1000,35233=>1000, -35234=>1000,35235=>1000,35236=>1000,35238=>1000,35239=>1000,35241=>1000,35242=>1000,35244=>1000,35245=>1000,35246=>1000, -35247=>1000,35250=>1000,35251=>1000,35254=>1000,35255=>1000,35257=>1000,35258=>1000,35261=>1000,35262=>1000,35263=>1000, -35264=>1000,35265=>1000,35266=>1000,35268=>1000,35269=>1000,35270=>1000,35271=>1000,35272=>1000,35273=>1000,35274=>1000, -35275=>1000,35276=>1000,35278=>1000,35279=>1000,35280=>1000,35281=>1000,35282=>1000,35283=>1000,35284=>1000,35285=>1000, -35286=>1000,35289=>1000,35290=>1000,35291=>1000,35292=>1000,35293=>1000,35294=>1000,35295=>1000,35296=>1000,35297=>1000, -35298=>1000,35299=>1000,35300=>1000,35301=>1000,35302=>1000,35303=>1000,35304=>1000,35305=>1000,35307=>1000,35308=>1000, -35309=>1000,35311=>1000,35312=>1000,35313=>1000,35314=>1000,35315=>1000,35316=>1000,35318=>1000,35319=>1000,35320=>1000, -35322=>1000,35323=>1000,35324=>1000,35326=>1000,35327=>1000,35328=>1000,35330=>1000,35331=>1000,35332=>1000,35335=>1000, -35336=>1000,35338=>1000,35340=>1000,35342=>1000,35343=>1000,35344=>1000,35345=>1000,35346=>1000,35347=>1000,35349=>1000, -35350=>1000,35351=>1000,35352=>1000,35355=>1000,35357=>1000,35358=>1000,35359=>1000,35362=>1000,35363=>1000,35365=>1000, -35367=>1000,35370=>1000,35372=>1000,35373=>1000,35376=>1000,35377=>1000,35379=>1000,35380=>1000,35382=>1000,35383=>1000, -35385=>1000,35386=>1000,35387=>1000,35388=>1000,35390=>1000,35391=>1000,35392=>1000,35393=>1000,35396=>1000,35397=>1000, -35398=>1000,35400=>1000,35402=>1000,35404=>1000,35405=>1000,35406=>1000,35407=>1000,35408=>1000,35409=>1000,35410=>1000, -35412=>1000,35413=>1000,35414=>1000,35415=>1000,35416=>1000,35417=>1000,35419=>1000,35422=>1000,35424=>1000,35425=>1000, -35426=>1000,35427=>1000,35430=>1000,35432=>1000,35433=>1000,35435=>1000,35436=>1000,35437=>1000,35438=>1000,35440=>1000, -35441=>1000,35442=>1000,35443=>1000,35444=>1000,35445=>1000,35446=>1000,35447=>1000,35449=>1000,35450=>1000,35451=>1000, -35452=>1000,35455=>1000,35457=>1000,35458=>1000,35459=>1000,35460=>1000,35461=>1000,35462=>1000,35463=>1000,35465=>1000, -35466=>1000,35467=>1000,35468=>1000,35469=>1000,35471=>1000,35473=>1000,35474=>1000,35475=>1000,35477=>1000,35478=>1000, -35480=>1000,35481=>1000,35482=>1000,35486=>1000,35488=>1000,35489=>1000,35491=>1000,35492=>1000,35493=>1000,35494=>1000, -35495=>1000,35496=>1000,35498=>1000,35499=>1000,35500=>1000,35501=>1000,35504=>1000,35506=>1000,35510=>1000,35512=>1000, -35513=>1000,35514=>1000,35515=>1000,35516=>1000,35517=>1000,35518=>1000,35519=>1000,35520=>1000,35522=>1000,35523=>1000, -35524=>1000,35525=>1000,35526=>1000,35527=>1000,35528=>1000,35529=>1000,35531=>1000,35532=>1000,35533=>1000,35535=>1000, -35537=>1000,35538=>1000,35539=>1000,35540=>1000,35541=>1000,35542=>1000,35543=>1000,35544=>1000,35545=>1000,35546=>1000, -35547=>1000,35548=>1000,35549=>1000,35550=>1000,35551=>1000,35552=>1000,35553=>1000,35554=>1000,35556=>1000,35558=>1000, -35559=>1000,35560=>1000,35562=>1000,35563=>1000,35565=>1000,35566=>1000,35567=>1000,35568=>1000,35569=>1000,35570=>1000, -35571=>1000,35572=>1000,35573=>1000,35574=>1000,35575=>1000,35576=>1000,35578=>1000,35579=>1000,35580=>1000,35582=>1000, -35583=>1000,35584=>1000,35585=>1000,35586=>1000,35588=>1000,35589=>1000,35590=>1000,35591=>1000,35592=>1000,35594=>1000, -35595=>1000,35596=>1000,35597=>1000,35598=>1000,35599=>1000,35600=>1000,35601=>1000,35602=>1000,35603=>1000,35604=>1000, -35605=>1000,35606=>1000,35607=>1000,35608=>1000,35609=>1000,35610=>1000,35611=>1000,35612=>1000,35613=>1000,35614=>1000, -35616=>1000,35617=>1000,35618=>1000,35619=>1000,35620=>1000,35621=>1000,35622=>1000,35623=>1000,35624=>1000,35626=>1000, -35627=>1000,35628=>1000,35630=>1000,35631=>1000,35632=>1000,35633=>1000,35635=>1000,35637=>1000,35638=>1000,35639=>1000, -35641=>1000,35642=>1000,35643=>1000,35644=>1000,35645=>1000,35646=>1000,35648=>1000,35649=>1000,35650=>1000,35653=>1000, -35654=>1000,35655=>1000,35656=>1000,35657=>1000,35658=>1000,35659=>1000,35660=>1000,35662=>1000,35663=>1000,35664=>1000, -35665=>1000,35666=>1000,35667=>1000,35668=>1000,35669=>1000,35670=>1000,35671=>1000,35672=>1000,35673=>1000,35674=>1000, -35675=>1000,35676=>1000,35677=>1000,35679=>1000,35680=>1000,35683=>1000,35685=>1000,35686=>1000,35687=>1000,35688=>1000, -35690=>1000,35691=>1000,35692=>1000,35693=>1000,35695=>1000,35696=>1000,35697=>1000,35698=>1000,35700=>1000,35703=>1000, -35704=>1000,35705=>1000,35706=>1000,35707=>1000,35709=>1000,35710=>1000,35711=>1000,35712=>1000,35714=>1000,35715=>1000, -35716=>1000,35717=>1000,35718=>1000,35720=>1000,35722=>1000,35723=>1000,35724=>1000,35726=>1000,35728=>1000,35730=>1000, -35731=>1000,35732=>1000,35733=>1000,35734=>1000,35736=>1000,35737=>1000,35738=>1000,35740=>1000,35742=>1000,35743=>1000, -35744=>1000,35745=>1000,35746=>1000,35747=>1000,35748=>1000,35749=>1000,35750=>1000,35751=>1000,35752=>1000,35753=>1000, -35754=>1000,35755=>1000,35757=>1000,35758=>1000,35759=>1000,35760=>1000,35762=>1000,35763=>1000,35764=>1000,35765=>1000, -35766=>1000,35767=>1000,35768=>1000,35769=>1000,35770=>1000,35772=>1000,35773=>1000,35774=>1000,35775=>1000,35776=>1000, -35777=>1000,35778=>1000,35779=>1000,35780=>1000,35781=>1000,35782=>1000,35784=>1000,35785=>1000,35786=>1000,35787=>1000, -35788=>1000,35789=>1000,35790=>1000,35791=>1000,35793=>1000,35794=>1000,35795=>1000,35796=>1000,35797=>1000,35798=>1000, -35799=>1000,35800=>1000,35801=>1000,35802=>1000,35803=>1000,35804=>1000,35805=>1000,35806=>1000,35807=>1000,35808=>1000, -35809=>1000,35810=>1000,35811=>1000,35812=>1000,35813=>1000,35814=>1000,35815=>1000,35816=>1000,35817=>1000,35819=>1000, -35820=>1000,35821=>1000,35822=>1000,35823=>1000,35824=>1000,35825=>1000,35826=>1000,35827=>1000,35828=>1000,35829=>1000, -35830=>1000,35831=>1000,35832=>1000,35833=>1000,35834=>1000,35835=>1000,35836=>1000,35837=>1000,35838=>1000,35839=>1000, -35840=>1000,35841=>1000,35842=>1000,35843=>1000,35844=>1000,35845=>1000,35846=>1000,35847=>1000,35848=>1000,35850=>1000, -35851=>1000,35852=>1000,35853=>1000,35854=>1000,35855=>1000,35856=>1000,35857=>1000,35858=>1000,35859=>1000,35860=>1000, -35861=>1000,35862=>1000,35863=>1000,35864=>1000,35865=>1000,35866=>1000,35867=>1000,35868=>1000,35869=>1000,35871=>1000, -35872=>1000,35873=>1000,35874=>1000,35875=>1000,35876=>1000,35877=>1000,35878=>1000,35879=>1000,35880=>1000,35881=>1000, -35882=>1000,35883=>1000,35884=>1000,35885=>1000,35886=>1000,35887=>1000,35888=>1000,35889=>1000,35890=>1000,35891=>1000, -35892=>1000,35893=>1000,35894=>1000,35895=>1000,35897=>1000,35898=>1000,35899=>1000,35900=>1000,35901=>1000,35902=>1000, -35903=>1000,35905=>1000,35906=>1000,35907=>1000,35909=>1000,35910=>1000,35911=>1000,35912=>1000,35913=>1000,35914=>1000, -35915=>1000,35916=>1000,35917=>1000,35918=>1000,35919=>1000,35920=>1000,35924=>1000,35925=>1000,35926=>1000,35927=>1000, -35930=>1000,35932=>1000,35933=>1000,35935=>1000,35937=>1000,35938=>1000,35940=>1000,35941=>1000,35942=>1000,35944=>1000, -35945=>1000,35946=>1000,35947=>1000,35948=>1000,35949=>1000,35951=>1000,35952=>1000,35953=>1000,35954=>1000,35955=>1000, -35957=>1000,35958=>1000,35959=>1000,35960=>1000,35961=>1000,35962=>1000,35963=>1000,35964=>1000,35965=>1000,35968=>1000, -35969=>1000,35970=>1000,35972=>1000,35973=>1000,35974=>1000,35977=>1000,35978=>1000,35980=>1000,35981=>1000,35982=>1000, -35983=>1000,35984=>1000,35985=>1000,35986=>1000,35987=>1000,35988=>1000,35989=>1000,35991=>1000,35992=>1000,35993=>1000, -35994=>1000,35996=>1000,35997=>1000,35998=>1000,36000=>1000,36001=>1000,36002=>1000,36003=>1000,36004=>1000,36005=>1000, -36007=>1000,36008=>1000,36009=>1000,36010=>1000,36011=>1000,36012=>1000,36013=>1000,36014=>1000,36015=>1000,36016=>1000, -36018=>1000,36019=>1000,36020=>1000,36021=>1000,36022=>1000,36023=>1000,36024=>1000,36025=>1000,36026=>1000,36027=>1000, -36028=>1000,36029=>1000,36030=>1000,36031=>1000,36032=>1000,36033=>1000,36034=>1000,36035=>1000,36036=>1000,36037=>1000, -36039=>1000,36040=>1000,36042=>1000,36044=>1000,36045=>1000,36046=>1000,36047=>1000,36049=>1000,36050=>1000,36051=>1000, -36053=>1000,36055=>1000,36057=>1000,36058=>1000,36059=>1000,36060=>1000,36061=>1000,36062=>1000,36063=>1000,36064=>1000, -36065=>1000,36066=>1000,36067=>1000,36068=>1000,36069=>1000,36070=>1000,36071=>1000,36072=>1000,36074=>1000,36076=>1000, -36077=>1000,36078=>1000,36080=>1000,36081=>1000,36083=>1000,36084=>1000,36085=>1000,36088=>1000,36089=>1000,36090=>1000, -36091=>1000,36092=>1000,36093=>1000,36094=>1000,36096=>1000,36098=>1000,36100=>1000,36101=>1000,36102=>1000,36103=>1000, -36104=>1000,36105=>1000,36106=>1000,36107=>1000,36109=>1000,36111=>1000,36112=>1000,36114=>1000,36115=>1000,36116=>1000, -36117=>1000,36118=>1000,36119=>1000,36121=>1000,36123=>1000,36125=>1000,36126=>1000,36127=>1000,36129=>1000,36130=>1000, -36131=>1000,36132=>1000,36133=>1000,36134=>1000,36135=>1000,36136=>1000,36137=>1000,36138=>1000,36139=>1000,36140=>1000, -36141=>1000,36142=>1000,36143=>1000,36144=>1000,36145=>1000,36146=>1000,36147=>1000,36148=>1000,36149=>1000,36150=>1000, -36151=>1000,36152=>1000,36153=>1000,36154=>1000,36155=>1000,36156=>1000,36157=>1000,36158=>1000,36159=>1000,36160=>1000, -36161=>1000,36162=>1000,36163=>1000,36164=>1000,36165=>1000,36166=>1000,36167=>1000,36168=>1000,36169=>1000,36170=>1000, -36171=>1000,36172=>1000,36173=>1000,36174=>1000,36175=>1000,36176=>1000,36179=>1000,36180=>1000,36181=>1000,36182=>1000, -36184=>1000,36185=>1000,36186=>1000,36187=>1000,36188=>1000,36189=>1000,36190=>1000,36192=>1000,36193=>1000,36194=>1000, -36195=>1000,36196=>1000,36198=>1000,36199=>1000,36200=>1000,36201=>1000,36203=>1000,36204=>1000,36205=>1000,36206=>1000, -36207=>1000,36208=>1000,36209=>1000,36210=>1000,36211=>1000,36212=>1000,36213=>1000,36214=>1000,36215=>1000,36216=>1000, -36217=>1000,36219=>1000,36221=>1000,36224=>1000,36225=>1000,36228=>1000,36229=>1000,36233=>1000,36234=>1000,36235=>1000, -36236=>1000,36237=>1000,36238=>1000,36239=>1000,36240=>1000,36241=>1000,36242=>1000,36243=>1000,36244=>1000,36245=>1000, -36246=>1000,36249=>1000,36251=>1000,36252=>1000,36255=>1000,36256=>1000,36257=>1000,36259=>1000,36261=>1000,36263=>1000, -36264=>1000,36266=>1000,36267=>1000,36268=>1000,36269=>1000,36270=>1000,36271=>1000,36273=>1000,36274=>1000,36275=>1000, -36276=>1000,36277=>1000,36278=>1000,36279=>1000,36280=>1000,36281=>1000,36282=>1000,36284=>1000,36286=>1000,36287=>1000, -36289=>1000,36290=>1000,36291=>1000,36292=>1000,36293=>1000,36294=>1000,36295=>1000,36296=>1000,36299=>1000,36300=>1000, -36301=>1000,36302=>1000,36303=>1000,36304=>1000,36305=>1000,36307=>1000,36309=>1000,36310=>1000,36311=>1000,36312=>1000, -36313=>1000,36314=>1000,36315=>1000,36316=>1000,36317=>1000,36318=>1000,36319=>1000,36320=>1000,36321=>1000,36322=>1000, -36323=>1000,36324=>1000,36326=>1000,36327=>1000,36328=>1000,36329=>1000,36330=>1000,36331=>1000,36332=>1000,36334=>1000, -36335=>1000,36336=>1000,36337=>1000,36338=>1000,36339=>1000,36340=>1000,36341=>1000,36343=>1000,36344=>1000,36345=>1000, -36346=>1000,36347=>1000,36348=>1000,36349=>1000,36350=>1000,36351=>1000,36352=>1000,36354=>1000,36355=>1000,36356=>1000, -36357=>1000,36358=>1000,36359=>1000,36360=>1000,36361=>1000,36362=>1000,36364=>1000,36365=>1000,36367=>1000,36368=>1000, -36369=>1000,36370=>1000,36371=>1000,36372=>1000,36373=>1000,36374=>1000,36375=>1000,36376=>1000,36377=>1000,36378=>1000, -36379=>1000,36380=>1000,36381=>1000,36382=>1000,36383=>1000,36384=>1000,36385=>1000,36386=>1000,36387=>1000,36388=>1000, -36389=>1000,36390=>1000,36391=>1000,36393=>1000,36394=>1000,36395=>1000,36396=>1000,36398=>1000,36399=>1000,36400=>1000, -36401=>1000,36403=>1000,36404=>1000,36405=>1000,36406=>1000,36408=>1000,36409=>1000,36410=>1000,36412=>1000,36413=>1000, -36414=>1000,36415=>1000,36416=>1000,36417=>1000,36418=>1000,36420=>1000,36421=>1000,36423=>1000,36424=>1000,36425=>1000, -36426=>1000,36427=>1000,36428=>1000,36429=>1000,36430=>1000,36432=>1000,36433=>1000,36434=>1000,36435=>1000,36436=>1000, -36437=>1000,36438=>1000,36439=>1000,36441=>1000,36442=>1000,36443=>1000,36444=>1000,36445=>1000,36446=>1000,36447=>1000, -36448=>1000,36449=>1000,36450=>1000,36451=>1000,36452=>1000,36453=>1000,36454=>1000,36455=>1000,36457=>1000,36458=>1000, -36460=>1000,36461=>1000,36463=>1000,36464=>1000,36466=>1000,36467=>1000,36468=>1000,36470=>1000,36472=>1000,36474=>1000, -36475=>1000,36476=>1000,36479=>1000,36481=>1000,36482=>1000,36484=>1000,36485=>1000,36486=>1000,36487=>1000,36488=>1000, -36489=>1000,36490=>1000,36491=>1000,36492=>1000,36493=>1000,36494=>1000,36495=>1000,36496=>1000,36497=>1000,36498=>1000, -36499=>1000,36500=>1000,36501=>1000,36502=>1000,36503=>1000,36504=>1000,36505=>1000,36506=>1000,36508=>1000,36509=>1000, -36510=>1000,36511=>1000,36512=>1000,36513=>1000,36515=>1000,36516=>1000,36517=>1000,36518=>1000,36520=>1000,36521=>1000, -36522=>1000,36523=>1000,36524=>1000,36527=>1000,36528=>1000,36529=>1000,36530=>1000,36538=>1000,36541=>1000,36542=>1000, -36544=>1000,36546=>1000,36549=>1000,36550=>1000,36552=>1000,36553=>1000,36554=>1000,36555=>1000,36556=>1000,36557=>1000, -36558=>1000,36559=>1000,36561=>1000,36562=>1000,36563=>1000,36564=>1000,36567=>1000,36568=>1000,36571=>1000,36572=>1000, -36573=>1000,36574=>1000,36575=>1000,36576=>1000,36577=>1000,36578=>1000,36579=>1000,36581=>1000,36582=>1000,36583=>1000, -36584=>1000,36585=>1000,36587=>1000,36588=>1000,36590=>1000,36591=>1000,36593=>1000,36596=>1000,36597=>1000,36598=>1000, -36599=>1000,36600=>1000,36601=>1000,36602=>1000,36603=>1000,36604=>1000,36605=>1000,36606=>1000,36607=>1000,36608=>1000, -36609=>1000,36610=>1000,36611=>1000,36613=>1000,36614=>1000,36615=>1000,36616=>1000,36617=>1000,36618=>1000,36619=>1000, -36620=>1000,36621=>1000,36622=>1000,36624=>1000,36625=>1000,36626=>1000,36627=>1000,36628=>1000,36629=>1000,36630=>1000, -36631=>1000,36632=>1000,36633=>1000,36634=>1000,36635=>1000,36636=>1000,36637=>1000,36638=>1000,36639=>1000,36640=>1000, -36643=>1000,36644=>1000,36645=>1000,36646=>1000,36647=>1000,36649=>1000,36650=>1000,36652=>1000,36654=>1000,36655=>1000, -36658=>1000,36659=>1000,36660=>1000,36661=>1000,36662=>1000,36663=>1000,36664=>1000,36665=>1000,36667=>1000,36670=>1000, -36671=>1000,36672=>1000,36674=>1000,36675=>1000,36676=>1000,36677=>1000,36678=>1000,36679=>1000,36680=>1000,36681=>1000, -36683=>1000,36684=>1000,36685=>1000,36686=>1000,36687=>1000,36688=>1000,36689=>1000,36690=>1000,36691=>1000,36692=>1000, -36693=>1000,36694=>1000,36695=>1000,36696=>1000,36697=>1000,36698=>1000,36699=>1000,36700=>1000,36701=>1000,36702=>1000, -36703=>1000,36704=>1000,36705=>1000,36706=>1000,36707=>1000,36708=>1000,36710=>1000,36711=>1000,36712=>1000,36713=>1000, -36715=>1000,36716=>1000,36717=>1000,36718=>1000,36719=>1000,36720=>1000,36721=>1000,36722=>1000,36723=>1000,36724=>1000, -36725=>1000,36726=>1000,36727=>1000,36728=>1000,36729=>1000,36730=>1000,36731=>1000,36732=>1000,36733=>1000,36734=>1000, -36735=>1000,36737=>1000,36738=>1000,36739=>1000,36740=>1000,36741=>1000,36742=>1000,36743=>1000,36744=>1000,36745=>1000, -36746=>1000,36747=>1000,36749=>1000,36750=>1000,36751=>1000,36752=>1000,36753=>1000,36755=>1000,36756=>1000,36757=>1000, -36758=>1000,36759=>1000,36760=>1000,36761=>1000,36762=>1000,36763=>1000,36764=>1000,36766=>1000,36767=>1000,36771=>1000, -36774=>1000,36775=>1000,36776=>1000,36777=>1000,36779=>1000,36781=>1000,36782=>1000,36783=>1000,36784=>1000,36785=>1000, -36786=>1000,36788=>1000,36790=>1000,36791=>1000,36793=>1000,36794=>1000,36795=>1000,36796=>1000,36797=>1000,36798=>1000, -36799=>1000,36801=>1000,36802=>1000,36804=>1000,36805=>1000,36806=>1000,36807=>1000,36808=>1000,36809=>1000,36811=>1000, -36813=>1000,36814=>1000,36816=>1000,36817=>1000,36818=>1000,36819=>1000,36820=>1000,36821=>1000,36822=>1000,36823=>1000, -36824=>1000,36825=>1000,36826=>1000,36827=>1000,36828=>1000,36829=>1000,36830=>1000,36831=>1000,36832=>1000,36833=>1000, -36834=>1000,36835=>1000,36836=>1000,36837=>1000,36838=>1000,36840=>1000,36841=>1000,36842=>1000,36843=>1000,36845=>1000, -36846=>1000,36847=>1000,36848=>1000,36850=>1000,36851=>1000,36852=>1000,36853=>1000,36854=>1000,36855=>1000,36856=>1000, -36857=>1000,36858=>1000,36859=>1000,36860=>1000,36861=>1000,36862=>1000,36863=>1000,36864=>1000,36865=>1000,36866=>1000, -36867=>1000,36868=>1000,36869=>1000,36870=>1000,36872=>1000,36873=>1000,36874=>1000,36875=>1000,36876=>1000,36877=>1000, -36878=>1000,36879=>1000,36880=>1000,36881=>1000,36882=>1000,36883=>1000,36884=>1000,36885=>1000,36886=>1000,36887=>1000, -36889=>1000,36890=>1000,36891=>1000,36892=>1000,36893=>1000,36894=>1000,36895=>1000,36896=>1000,36897=>1000,36898=>1000, -36899=>1000,36900=>1000,36902=>1000,36903=>1000,36909=>1000,36910=>1000,36911=>1000,36913=>1000,36914=>1000,36916=>1000, -36917=>1000,36918=>1000,36920=>1000,36921=>1000,36923=>1000,36924=>1000,36925=>1000,36926=>1000,36927=>1000,36929=>1000, -36930=>1000,36932=>1000,36933=>1000,36935=>1000,36937=>1000,36938=>1000,36939=>1000,36941=>1000,36942=>1000,36943=>1000, -36944=>1000,36945=>1000,36946=>1000,36947=>1000,36948=>1000,36949=>1000,36950=>1000,36951=>1000,36952=>1000,36953=>1000, -36955=>1000,36956=>1000,36957=>1000,36958=>1000,36960=>1000,36961=>1000,36962=>1000,36963=>1000,36965=>1000,36967=>1000, -36968=>1000,36969=>1000,36971=>1000,36973=>1000,36974=>1000,36975=>1000,36976=>1000,36978=>1000,36979=>1000,36980=>1000, -36981=>1000,36982=>1000,36983=>1000,36984=>1000,36985=>1000,36986=>1000,36987=>1000,36988=>1000,36989=>1000,36990=>1000, -36991=>1000,36992=>1000,36993=>1000,36994=>1000,36995=>1000,36996=>1000,36997=>1000,36998=>1000,36999=>1000,37000=>1000, -37001=>1000,37002=>1000,37003=>1000,37005=>1000,37007=>1000,37008=>1000,37009=>1000,37011=>1000,37012=>1000,37013=>1000, -37015=>1000,37016=>1000,37017=>1000,37019=>1000,37021=>1000,37022=>1000,37023=>1000,37024=>1000,37025=>1000,37026=>1000, -37027=>1000,37029=>1000,37030=>1000,37031=>1000,37032=>1000,37034=>1000,37036=>1000,37038=>1000,37039=>1000,37040=>1000, -37041=>1000,37042=>1000,37043=>1000,37044=>1000,37045=>1000,37046=>1000,37048=>1000,37049=>1000,37050=>1000,37051=>1000, -37053=>1000,37054=>1000,37055=>1000,37057=>1000,37059=>1000,37060=>1000,37061=>1000,37063=>1000,37064=>1000,37066=>1000, -37067=>1000,37070=>1000,37071=>1000,37072=>1000,37073=>1000,37075=>1000,37076=>1000,37077=>1000,37078=>1000,37079=>1000, -37080=>1000,37081=>1000,37082=>1000,37083=>1000,37084=>1000,37085=>1000,37086=>1000,37087=>1000,37088=>1000,37089=>1000, -37090=>1000,37091=>1000,37092=>1000,37093=>1000,37094=>1000,37095=>1000,37096=>1000,37097=>1000,37098=>1000,37099=>1000, -37100=>1000,37101=>1000,37103=>1000,37104=>1000,37105=>1000,37106=>1000,37107=>1000,37108=>1000,37109=>1000,37111=>1000, -37112=>1000,37113=>1000,37114=>1000,37115=>1000,37116=>1000,37117=>1000,37118=>1000,37119=>1000,37120=>1000,37121=>1000, -37122=>1000,37123=>1000,37124=>1000,37125=>1000,37126=>1000,37127=>1000,37128=>1000,37129=>1000,37131=>1000,37133=>1000, -37134=>1000,37135=>1000,37136=>1000,37137=>1000,37138=>1000,37140=>1000,37141=>1000,37142=>1000,37143=>1000,37144=>1000, -37145=>1000,37146=>1000,37147=>1000,37148=>1000,37149=>1000,37150=>1000,37151=>1000,37152=>1000,37153=>1000,37154=>1000, -37155=>1000,37156=>1000,37158=>1000,37159=>1000,37160=>1000,37161=>1000,37162=>1000,37163=>1000,37164=>1000,37165=>1000, -37166=>1000,37167=>1000,37168=>1000,37169=>1000,37170=>1000,37171=>1000,37172=>1000,37173=>1000,37174=>1000,37176=>1000, -37177=>1000,37178=>1000,37179=>1000,37182=>1000,37183=>1000,37184=>1000,37185=>1000,37187=>1000,37188=>1000,37189=>1000, -37190=>1000,37191=>1000,37192=>1000,37193=>1000,37194=>1000,37195=>1000,37196=>1000,37197=>1000,37198=>1000,37199=>1000, -37200=>1000,37202=>1000,37203=>1000,37204=>1000,37205=>1000,37206=>1000,37207=>1000,37208=>1000,37210=>1000,37213=>1000, -37214=>1000,37215=>1000,37216=>1000,37217=>1000,37218=>1000,37219=>1000,37220=>1000,37221=>1000,37224=>1000,37225=>1000, -37226=>1000,37228=>1000,37230=>1000,37231=>1000,37232=>1000,37233=>1000,37234=>1000,37235=>1000,37236=>1000,37237=>1000, -37238=>1000,37239=>1000,37240=>1000,37241=>1000,37242=>1000,37245=>1000,37246=>1000,37247=>1000,37248=>1000,37249=>1000, -37250=>1000,37251=>1000,37252=>1000,37253=>1000,37254=>1000,37255=>1000,37257=>1000,37258=>1000,37259=>1000,37260=>1000, -37261=>1000,37263=>1000,37264=>1000,37265=>1000,37266=>1000,37267=>1000,37271=>1000,37273=>1000,37274=>1000,37275=>1000, -37276=>1000,37277=>1000,37278=>1000,37279=>1000,37280=>1000,37281=>1000,37282=>1000,37283=>1000,37284=>1000,37285=>1000, -37287=>1000,37288=>1000,37290=>1000,37291=>1000,37292=>1000,37293=>1000,37294=>1000,37295=>1000,37296=>1000,37297=>1000, -37298=>1000,37299=>1000,37300=>1000,37301=>1000,37303=>1000,37304=>1000,37305=>1000,37306=>1000,37308=>1000,37309=>1000, -37310=>1000,37312=>1000,37313=>1000,37314=>1000,37315=>1000,37317=>1000,37318=>1000,37319=>1000,37320=>1000,37321=>1000, -37322=>1000,37323=>1000,37324=>1000,37325=>1000,37326=>1000,37327=>1000,37328=>1000,37329=>1000,37331=>1000,37332=>1000, -37333=>1000,37334=>1000,37335=>1000,37336=>1000,37337=>1000,37338=>1000,37339=>1000,37340=>1000,37341=>1000,37342=>1000, -37343=>1000,37345=>1000,37346=>1000,37347=>1000,37348=>1000,37349=>1000,37350=>1000,37351=>1000,37352=>1000,37353=>1000, -37354=>1000,37355=>1000,37356=>1000,37357=>1000,37358=>1000,37361=>1000,37363=>1000,37364=>1000,37365=>1000,37366=>1000, -37367=>1000,37368=>1000,37369=>1000,37372=>1000,37373=>1000,37375=>1000,37376=>1000,37377=>1000,37378=>1000,37379=>1000, -37380=>1000,37381=>1000,37382=>1000,37383=>1000,37385=>1000,37386=>1000,37388=>1000,37389=>1000,37390=>1000,37391=>1000, -37392=>1000,37393=>1000,37394=>1000,37396=>1000,37397=>1000,37398=>1000,37399=>1000,37401=>1000,37402=>1000,37404=>1000, -37406=>1000,37411=>1000,37412=>1000,37413=>1000,37414=>1000,37415=>1000,37417=>1000,37420=>1000,37421=>1000,37422=>1000, -37424=>1000,37425=>1000,37426=>1000,37427=>1000,37428=>1000,37430=>1000,37431=>1000,37432=>1000,37433=>1000,37434=>1000, -37436=>1000,37437=>1000,37438=>1000,37439=>1000,37440=>1000,37444=>1000,37445=>1000,37446=>1000,37448=>1000,37449=>1000, -37450=>1000,37451=>1000,37452=>1000,37453=>1000,37454=>1000,37455=>1000,37456=>1000,37457=>1000,37458=>1000,37459=>1000, -37460=>1000,37462=>1000,37463=>1000,37465=>1000,37466=>1000,37467=>1000,37470=>1000,37472=>1000,37473=>1000,37474=>1000, -37475=>1000,37476=>1000,37477=>1000,37478=>1000,37479=>1000,37484=>1000,37485=>1000,37487=>1000,37488=>1000,37489=>1000, -37490=>1000,37492=>1000,37494=>1000,37495=>1000,37496=>1000,37497=>1000,37498=>1000,37499=>1000,37500=>1000,37501=>1000, -37502=>1000,37503=>1000,37504=>1000,37506=>1000,37507=>1000,37509=>1000,37510=>1000,37511=>1000,37512=>1000,37514=>1000, -37515=>1000,37516=>1000,37517=>1000,37518=>1000,37521=>1000,37523=>1000,37524=>1000,37525=>1000,37526=>1000,37527=>1000, -37528=>1000,37529=>1000,37530=>1000,37531=>1000,37532=>1000,37533=>1000,37536=>1000,37537=>1000,37538=>1000,37539=>1000, -37540=>1000,37541=>1000,37542=>1000,37543=>1000,37544=>1000,37545=>1000,37546=>1000,37547=>1000,37548=>1000,37549=>1000, -37550=>1000,37554=>1000,37555=>1000,37556=>1000,37557=>1000,37558=>1000,37559=>1000,37561=>1000,37563=>1000,37564=>1000, -37568=>1000,37569=>1000,37570=>1000,37571=>1000,37572=>1000,37573=>1000,37574=>1000,37575=>1000,37576=>1000,37577=>1000, -37578=>1000,37579=>1000,37580=>1000,37581=>1000,37582=>1000,37583=>1000,37584=>1000,37585=>1000,37586=>1000,37587=>1000, -37589=>1000,37591=>1000,37592=>1000,37593=>1000,37597=>1000,37598=>1000,37599=>1000,37600=>1000,37601=>1000,37604=>1000, -37606=>1000,37607=>1000,37608=>1000,37609=>1000,37610=>1000,37613=>1000,37614=>1000,37615=>1000,37616=>1000,37617=>1000, -37618=>1000,37619=>1000,37623=>1000,37624=>1000,37625=>1000,37626=>1000,37627=>1000,37628=>1000,37630=>1000,37631=>1000, -37632=>1000,37633=>1000,37634=>1000,37636=>1000,37638=>1000,37640=>1000,37641=>1000,37643=>1000,37644=>1000,37645=>1000, -37646=>1000,37647=>1000,37648=>1000,37650=>1000,37651=>1000,37652=>1000,37653=>1000,37654=>1000,37656=>1000,37657=>1000, -37658=>1000,37659=>1000,37661=>1000,37662=>1000,37663=>1000,37664=>1000,37665=>1000,37666=>1000,37667=>1000,37668=>1000, -37669=>1000,37670=>1000,37671=>1000,37672=>1000,37673=>1000,37674=>1000,37675=>1000,37676=>1000,37677=>1000,37678=>1000, -37679=>1000,37682=>1000,37683=>1000,37684=>1000,37685=>1000,37686=>1000,37688=>1000,37689=>1000,37690=>1000,37691=>1000, -37692=>1000,37694=>1000,37700=>1000,37702=>1000,37703=>1000,37704=>1000,37705=>1000,37706=>1000,37707=>1000,37708=>1000, -37709=>1000,37710=>1000,37711=>1000,37712=>1000,37713=>1000,37714=>1000,37716=>1000,37717=>1000,37718=>1000,37719=>1000, -37720=>1000,37721=>1000,37722=>1000,37723=>1000,37724=>1000,37726=>1000,37728=>1000,37729=>1000,37731=>1000,37732=>1000, -37733=>1000,37735=>1000,37738=>1000,37740=>1000,37741=>1000,37742=>1000,37744=>1000,37745=>1000,37749=>1000,37750=>1000, -37751=>1000,37753=>1000,37754=>1000,37755=>1000,37756=>1000,37758=>1000,37760=>1000,37762=>1000,37763=>1000,37768=>1000, -37769=>1000,37770=>1000,37772=>1000,37773=>1000,37774=>1000,37775=>1000,37777=>1000,37778=>1000,37780=>1000,37781=>1000, -37782=>1000,37783=>1000,37784=>1000,37785=>1000,37786=>1000,37787=>1000,37789=>1000,37790=>1000,37791=>1000,37793=>1000, -37794=>1000,37795=>1000,37796=>1000,37797=>1000,37798=>1000,37799=>1000,37800=>1000,37801=>1000,37802=>1000,37804=>1000, -37805=>1000,37806=>1000,37807=>1000,37808=>1000,37809=>1000,37810=>1000,37811=>1000,37812=>1000,37813=>1000,37815=>1000, -37817=>1000,37824=>1000,37826=>1000,37827=>1000,37828=>1000,37830=>1000,37831=>1000,37832=>1000,37834=>1000,37836=>1000, -37837=>1000,37838=>1000,37839=>1000,37840=>1000,37841=>1000,37842=>1000,37844=>1000,37845=>1000,37846=>1000,37847=>1000, -37848=>1000,37849=>1000,37850=>1000,37852=>1000,37853=>1000,37854=>1000,37855=>1000,37857=>1000,37858=>1000,37859=>1000, -37860=>1000,37861=>1000,37862=>1000,37863=>1000,37864=>1000,37868=>1000,37870=>1000,37877=>1000,37878=>1000,37879=>1000, -37880=>1000,37881=>1000,37882=>1000,37883=>1000,37884=>1000,37885=>1000,37886=>1000,37887=>1000,37888=>1000,37891=>1000, -37892=>1000,37894=>1000,37895=>1000,37897=>1000,37898=>1000,37899=>1000,37900=>1000,37901=>1000,37902=>1000,37903=>1000, -37904=>1000,37905=>1000,37906=>1000,37907=>1000,37908=>1000,37909=>1000,37910=>1000,37912=>1000,37913=>1000,37914=>1000, -37920=>1000,37921=>1000,37925=>1000,37928=>1000,37929=>1000,37930=>1000,37931=>1000,37932=>1000,37934=>1000,37936=>1000, -37937=>1000,37938=>1000,37939=>1000,37941=>1000,37942=>1000,37943=>1000,37944=>1000,37945=>1000,37946=>1000,37947=>1000, -37948=>1000,37949=>1000,37950=>1000,37951=>1000,37952=>1000,37953=>1000,37956=>1000,37957=>1000,37958=>1000,37959=>1000, -37960=>1000,37961=>1000,37962=>1000,37963=>1000,37964=>1000,37967=>1000,37968=>1000,37969=>1000,37970=>1000,37971=>1000, -37973=>1000,37975=>1000,37978=>1000,37979=>1000,37981=>1000,37982=>1000,37984=>1000,37986=>1000,37987=>1000,37988=>1000, -37992=>1000,37993=>1000,37994=>1000,37995=>1000,37997=>1000,37998=>1000,37999=>1000,38000=>1000,38001=>1000,38002=>1000, -38003=>1000,38004=>1000,38005=>1000,38006=>1000,38007=>1000,38008=>1000,38012=>1000,38013=>1000,38014=>1000,38015=>1000, -38016=>1000,38017=>1000,38018=>1000,38019=>1000,38021=>1000,38022=>1000,38023=>1000,38024=>1000,38025=>1000,38026=>1000, -38027=>1000,38028=>1000,38029=>1000,38030=>1000,38031=>1000,38032=>1000,38034=>1000,38035=>1000,38036=>1000,38037=>1000, -38039=>1000,38041=>1000,38042=>1000,38043=>1000,38044=>1000,38045=>1000,38046=>1000,38047=>1000,38048=>1000,38049=>1000, -38050=>1000,38051=>1000,38052=>1000,38053=>1000,38054=>1000,38055=>1000,38056=>1000,38057=>1000,38058=>1000,38059=>1000, -38060=>1000,38061=>1000,38062=>1000,38063=>1000,38064=>1000,38065=>1000,38066=>1000,38067=>1000,38068=>1000,38069=>1000, -38070=>1000,38071=>1000,38072=>1000,38073=>1000,38074=>1000,38075=>1000,38076=>1000,38077=>1000,38078=>1000,38079=>1000, -38080=>1000,38081=>1000,38082=>1000,38083=>1000,38084=>1000,38085=>1000,38086=>1000,38088=>1000,38089=>1000,38090=>1000, -38091=>1000,38092=>1000,38093=>1000,38094=>1000,38096=>1000,38097=>1000,38098=>1000,38101=>1000,38102=>1000,38103=>1000, -38104=>1000,38105=>1000,38107=>1000,38108=>1000,38109=>1000,38110=>1000,38111=>1000,38112=>1000,38113=>1000,38114=>1000, -38115=>1000,38116=>1000,38117=>1000,38119=>1000,38120=>1000,38121=>1000,38122=>1000,38123=>1000,38124=>1000,38125=>1000, -38126=>1000,38127=>1000,38128=>1000,38129=>1000,38130=>1000,38131=>1000,38132=>1000,38133=>1000,38134=>1000,38135=>1000, -38136=>1000,38137=>1000,38138=>1000,38140=>1000,38141=>1000,38142=>1000,38143=>1000,38144=>1000,38145=>1000,38146=>1000, -38147=>1000,38148=>1000,38149=>1000,38150=>1000,38151=>1000,38152=>1000,38153=>1000,38154=>1000,38155=>1000,38156=>1000, -38157=>1000,38158=>1000,38159=>1000,38160=>1000,38161=>1000,38162=>1000,38163=>1000,38164=>1000,38165=>1000,38166=>1000, -38167=>1000,38168=>1000,38169=>1000,38170=>1000,38171=>1000,38173=>1000,38174=>1000,38175=>1000,38177=>1000,38178=>1000, -38179=>1000,38180=>1000,38181=>1000,38182=>1000,38184=>1000,38185=>1000,38186=>1000,38187=>1000,38188=>1000,38189=>1000, -38190=>1000,38191=>1000,38192=>1000,38193=>1000,38194=>1000,38196=>1000,38197=>1000,38198=>1000,38199=>1000,38200=>1000, -38201=>1000,38202=>1000,38203=>1000,38204=>1000,38206=>1000,38207=>1000,38208=>1000,38209=>1000,38210=>1000,38212=>1000, -38213=>1000,38214=>1000,38215=>1000,38217=>1000,38218=>1000,38220=>1000,38221=>1000,38222=>1000,38223=>1000,38224=>1000, -38225=>1000,38226=>1000,38227=>1000,38228=>1000,38230=>1000,38231=>1000,38232=>1000,38233=>1000,38235=>1000,38236=>1000, -38237=>1000,38238=>1000,38239=>1000,38241=>1000,38242=>1000,38243=>1000,38244=>1000,38245=>1000,38246=>1000,38247=>1000, -38248=>1000,38249=>1000,38250=>1000,38251=>1000,38252=>1000,38253=>1000,38255=>1000,38256=>1000,38257=>1000,38258=>1000, -38259=>1000,38262=>1000,38263=>1000,38266=>1000,38267=>1000,38268=>1000,38269=>1000,38271=>1000,38272=>1000,38274=>1000, -38275=>1000,38278=>1000,38279=>1000,38280=>1000,38281=>1000,38282=>1000,38283=>1000,38284=>1000,38285=>1000,38286=>1000, -38287=>1000,38288=>1000,38289=>1000,38290=>1000,38291=>1000,38292=>1000,38294=>1000,38296=>1000,38297=>1000,38299=>1000, -38300=>1000,38302=>1000,38303=>1000,38304=>1000,38305=>1000,38306=>1000,38307=>1000,38308=>1000,38309=>1000,38311=>1000, -38312=>1000,38313=>1000,38315=>1000,38316=>1000,38317=>1000,38318=>1000,38320=>1000,38321=>1000,38322=>1000,38325=>1000, -38326=>1000,38327=>1000,38329=>1000,38330=>1000,38331=>1000,38332=>1000,38333=>1000,38334=>1000,38335=>1000,38336=>1000, -38339=>1000,38341=>1000,38342=>1000,38343=>1000,38344=>1000,38345=>1000,38346=>1000,38347=>1000,38348=>1000,38349=>1000, -38352=>1000,38353=>1000,38354=>1000,38355=>1000,38356=>1000,38357=>1000,38358=>1000,38360=>1000,38362=>1000,38363=>1000, -38364=>1000,38366=>1000,38367=>1000,38368=>1000,38369=>1000,38370=>1000,38371=>1000,38372=>1000,38373=>1000,38376=>1000, -38377=>1000,38378=>1000,38379=>1000,38381=>1000,38382=>1000,38383=>1000,38384=>1000,38385=>1000,38386=>1000,38387=>1000, -38388=>1000,38389=>1000,38390=>1000,38391=>1000,38392=>1000,38393=>1000,38394=>1000,38395=>1000,38396=>1000,38397=>1000, -38398=>1000,38400=>1000,38401=>1000,38402=>1000,38403=>1000,38404=>1000,38405=>1000,38406=>1000,38408=>1000,38409=>1000, -38410=>1000,38411=>1000,38412=>1000,38413=>1000,38414=>1000,38415=>1000,38416=>1000,38417=>1000,38418=>1000,38420=>1000, -38421=>1000,38422=>1000,38423=>1000,38425=>1000,38426=>1000,38428=>1000,38429=>1000,38430=>1000,38431=>1000,38432=>1000, -38433=>1000,38434=>1000,38435=>1000,38436=>1000,38440=>1000,38442=>1000,38444=>1000,38445=>1000,38446=>1000,38447=>1000, -38448=>1000,38449=>1000,38450=>1000,38451=>1000,38452=>1000,38453=>1000,38454=>1000,38457=>1000,38458=>1000,38459=>1000, -38460=>1000,38461=>1000,38463=>1000,38464=>1000,38466=>1000,38467=>1000,38468=>1000,38469=>1000,38470=>1000,38471=>1000, -38472=>1000,38473=>1000,38474=>1000,38475=>1000,38476=>1000,38477=>1000,38478=>1000,38479=>1000,38480=>1000,38481=>1000, -38483=>1000,38484=>1000,38485=>1000,38488=>1000,38491=>1000,38492=>1000,38493=>1000,38494=>1000,38495=>1000,38497=>1000, -38498=>1000,38499=>1000,38500=>1000,38501=>1000,38502=>1000,38503=>1000,38504=>1000,38505=>1000,38506=>1000,38507=>1000, -38508=>1000,38509=>1000,38511=>1000,38512=>1000,38513=>1000,38514=>1000,38515=>1000,38516=>1000,38517=>1000,38518=>1000, -38519=>1000,38520=>1000,38522=>1000,38524=>1000,38525=>1000,38526=>1000,38528=>1000,38531=>1000,38532=>1000,38533=>1000, -38534=>1000,38535=>1000,38536=>1000,38537=>1000,38538=>1000,38539=>1000,38541=>1000,38542=>1000,38543=>1000,38544=>1000, -38545=>1000,38546=>1000,38547=>1000,38548=>1000,38549=>1000,38551=>1000,38552=>1000,38553=>1000,38555=>1000,38556=>1000, -38557=>1000,38558=>1000,38560=>1000,38561=>1000,38562=>1000,38563=>1000,38564=>1000,38567=>1000,38568=>1000,38569=>1000, -38570=>1000,38572=>1000,38574=>1000,38575=>1000,38576=>1000,38577=>1000,38578=>1000,38579=>1000,38580=>1000,38582=>1000, -38583=>1000,38584=>1000,38585=>1000,38587=>1000,38588=>1000,38589=>1000,38590=>1000,38591=>1000,38592=>1000,38593=>1000, -38594=>1000,38595=>1000,38596=>1000,38597=>1000,38598=>1000,38599=>1000,38600=>1000,38601=>1000,38602=>1000,38603=>1000, -38604=>1000,38605=>1000,38606=>1000,38607=>1000,38609=>1000,38610=>1000,38611=>1000,38612=>1000,38613=>1000,38614=>1000, -38615=>1000,38616=>1000,38617=>1000,38618=>1000,38619=>1000,38620=>1000,38621=>1000,38622=>1000,38623=>1000,38624=>1000, -38625=>1000,38626=>1000,38627=>1000,38629=>1000,38632=>1000,38633=>1000,38634=>1000,38635=>1000,38639=>1000,38640=>1000, -38641=>1000,38642=>1000,38643=>1000,38645=>1000,38646=>1000,38647=>1000,38648=>1000,38649=>1000,38650=>1000,38651=>1000, -38653=>1000,38654=>1000,38655=>1000,38656=>1000,38657=>1000,38658=>1000,38660=>1000,38661=>1000,38662=>1000,38663=>1000, -38664=>1000,38665=>1000,38666=>1000,38667=>1000,38669=>1000,38670=>1000,38671=>1000,38672=>1000,38673=>1000,38674=>1000, -38675=>1000,38678=>1000,38680=>1000,38681=>1000,38684=>1000,38685=>1000,38686=>1000,38687=>1000,38688=>1000,38690=>1000, -38691=>1000,38692=>1000,38693=>1000,38694=>1000,38695=>1000,38696=>1000,38697=>1000,38698=>1000,38699=>1000,38700=>1000, -38701=>1000,38702=>1000,38703=>1000,38704=>1000,38706=>1000,38707=>1000,38709=>1000,38712=>1000,38713=>1000,38714=>1000, -38715=>1000,38717=>1000,38718=>1000,38719=>1000,38722=>1000,38723=>1000,38724=>1000,38726=>1000,38727=>1000,38728=>1000, -38729=>1000,38731=>1000,38733=>1000,38735=>1000,38737=>1000,38738=>1000,38739=>1000,38741=>1000,38742=>1000,38744=>1000, -38745=>1000,38746=>1000,38747=>1000,38748=>1000,38750=>1000,38752=>1000,38753=>1000,38754=>1000,38756=>1000,38757=>1000, -38758=>1000,38760=>1000,38761=>1000,38762=>1000,38763=>1000,38764=>1000,38765=>1000,38766=>1000,38768=>1000,38769=>1000, -38770=>1000,38771=>1000,38772=>1000,38774=>1000,38775=>1000,38776=>1000,38777=>1000,38778=>1000,38779=>1000,38780=>1000, -38781=>1000,38782=>1000,38783=>1000,38784=>1000,38785=>1000,38786=>1000,38787=>1000,38788=>1000,38789=>1000,38790=>1000, -38792=>1000,38794=>1000,38795=>1000,38797=>1000,38798=>1000,38799=>1000,38800=>1000,38801=>1000,38802=>1000,38804=>1000, -38807=>1000,38808=>1000,38809=>1000,38810=>1000,38812=>1000,38813=>1000,38814=>1000,38816=>1000,38817=>1000,38818=>1000, -38819=>1000,38820=>1000,38821=>1000,38822=>1000,38824=>1000,38826=>1000,38827=>1000,38828=>1000,38829=>1000,38830=>1000, -38831=>1000,38834=>1000,38835=>1000,38836=>1000,38838=>1000,38839=>1000,38841=>1000,38843=>1000,38847=>1000,38849=>1000, -38851=>1000,38852=>1000,38853=>1000,38854=>1000,38855=>1000,38856=>1000,38857=>1000,38859=>1000,38860=>1000,38861=>1000, -38862=>1000,38863=>1000,38864=>1000,38867=>1000,38868=>1000,38869=>1000,38870=>1000,38871=>1000,38872=>1000,38873=>1000, -38876=>1000,38877=>1000,38878=>1000,38879=>1000,38881=>1000,38883=>1000,38885=>1000,38886=>1000,38887=>1000,38889=>1000, -38890=>1000,38891=>1000,38892=>1000,38893=>1000,38894=>1000,38896=>1000,38897=>1000,38898=>1000,38899=>1000,38901=>1000, -38902=>1000,38904=>1000,38905=>1000,38906=>1000,38907=>1000,38909=>1000,38910=>1000,38911=>1000,38912=>1000,38913=>1000, -38914=>1000,38915=>1000,38916=>1000,38917=>1000,38918=>1000,38919=>1000,38920=>1000,38922=>1000,38924=>1000,38925=>1000, -38926=>1000,38927=>1000,38928=>1000,38929=>1000,38930=>1000,38931=>1000,38934=>1000,38935=>1000,38936=>1000,38938=>1000, -38939=>1000,38940=>1000,38941=>1000,38942=>1000,38944=>1000,38945=>1000,38948=>1000,38950=>1000,38951=>1000,38952=>1000, -38953=>1000,38955=>1000,38956=>1000,38957=>1000,38959=>1000,38960=>1000,38962=>1000,38964=>1000,38965=>1000,38967=>1000, -38968=>1000,38969=>1000,38971=>1000,38972=>1000,38973=>1000,38977=>1000,38979=>1000,38980=>1000,38981=>1000,38982=>1000, -38984=>1000,38985=>1000,38986=>1000,38987=>1000,38988=>1000,38989=>1000,38990=>1000,38991=>1000,38992=>1000,38993=>1000, -38994=>1000,38995=>1000,38996=>1000,38997=>1000,38999=>1000,39000=>1000,39001=>1000,39002=>1000,39003=>1000,39004=>1000, -39005=>1000,39006=>1000,39007=>1000,39008=>1000,39010=>1000,39011=>1000,39012=>1000,39013=>1000,39015=>1000,39017=>1000, -39018=>1000,39019=>1000,39023=>1000,39024=>1000,39025=>1000,39026=>1000,39027=>1000,39028=>1000,39029=>1000,39030=>1000, -39031=>1000,39032=>1000,39033=>1000,39034=>1000,39035=>1000,39036=>1000,39037=>1000,39038=>1000,39039=>1000,39040=>1000, -39041=>1000,39042=>1000,39043=>1000,39044=>1000,39045=>1000,39046=>1000,39047=>1000,39048=>1000,39049=>1000,39050=>1000, -39052=>1000,39053=>1000,39055=>1000,39056=>1000,39057=>1000,39059=>1000,39060=>1000,39062=>1000,39063=>1000,39064=>1000, -39066=>1000,39067=>1000,39068=>1000,39069=>1000,39070=>1000,39071=>1000,39072=>1000,39073=>1000,39074=>1000,39076=>1000, -39077=>1000,39078=>1000,39079=>1000,39080=>1000,39081=>1000,39082=>1000,39084=>1000,39085=>1000,39086=>1000,39087=>1000, -39089=>1000,39090=>1000,39091=>1000,39094=>1000,39096=>1000,39098=>1000,39099=>1000,39100=>1000,39101=>1000,39102=>1000, -39103=>1000,39104=>1000,39105=>1000,39106=>1000,39107=>1000,39108=>1000,39110=>1000,39111=>1000,39113=>1000,39115=>1000, -39116=>1000,39118=>1000,39121=>1000,39122=>1000,39123=>1000,39125=>1000,39128=>1000,39129=>1000,39130=>1000,39131=>1000, -39132=>1000,39134=>1000,39135=>1000,39137=>1000,39138=>1000,39139=>1000,39141=>1000,39143=>1000,39144=>1000,39145=>1000, -39146=>1000,39147=>1000,39149=>1000,39150=>1000,39151=>1000,39154=>1000,39156=>1000,39158=>1000,39161=>1000,39162=>1000, -39164=>1000,39165=>1000,39166=>1000,39168=>1000,39170=>1000,39171=>1000,39173=>1000,39175=>1000,39176=>1000,39177=>1000, -39178=>1000,39180=>1000,39181=>1000,39184=>1000,39185=>1000,39186=>1000,39187=>1000,39188=>1000,39189=>1000,39190=>1000, -39191=>1000,39192=>1000,39194=>1000,39195=>1000,39197=>1000,39198=>1000,39199=>1000,39200=>1000,39201=>1000,39204=>1000, -39205=>1000,39207=>1000,39208=>1000,39209=>1000,39210=>1000,39211=>1000,39212=>1000,39213=>1000,39214=>1000,39215=>1000, -39216=>1000,39217=>1000,39218=>1000,39219=>1000,39221=>1000,39226=>1000,39228=>1000,39229=>1000,39230=>1000,39231=>1000, -39233=>1000,39234=>1000,39235=>1000,39237=>1000,39239=>1000,39240=>1000,39241=>1000,39243=>1000,39244=>1000,39245=>1000, -39246=>1000,39248=>1000,39249=>1000,39250=>1000,39251=>1000,39252=>1000,39253=>1000,39254=>1000,39255=>1000,39256=>1000, -39257=>1000,39259=>1000,39260=>1000,39262=>1000,39263=>1000,39265=>1000,39267=>1000,39269=>1000,39271=>1000,39272=>1000, -39273=>1000,39274=>1000,39275=>1000,39276=>1000,39277=>1000,39278=>1000,39279=>1000,39280=>1000,39281=>1000,39282=>1000, -39284=>1000,39285=>1000,39286=>1000,39287=>1000,39290=>1000,39292=>1000,39293=>1000,39295=>1000,39296=>1000,39297=>1000, -39300=>1000,39301=>1000,39302=>1000,39303=>1000,39304=>1000,39306=>1000,39307=>1000,39309=>1000,39311=>1000,39312=>1000, -39313=>1000,39314=>1000,39315=>1000,39316=>1000,39317=>1000,39318=>1000,39319=>1000,39320=>1000,39321=>1000,39324=>1000, -39325=>1000,39326=>1000,39329=>1000,39331=>1000,39333=>1000,39334=>1000,39335=>1000,39336=>1000,39339=>1000,39340=>1000, -39341=>1000,39342=>1000,39343=>1000,39344=>1000,39345=>1000,39346=>1000,39347=>1000,39348=>1000,39349=>1000,39353=>1000, -39354=>1000,39355=>1000,39356=>1000,39357=>1000,39361=>1000,39362=>1000,39363=>1000,39364=>1000,39365=>1000,39366=>1000, -39367=>1000,39368=>1000,39369=>1000,39371=>1000,39372=>1000,39373=>1000,39374=>1000,39375=>1000,39376=>1000,39377=>1000, -39378=>1000,39379=>1000,39380=>1000,39381=>1000,39382=>1000,39383=>1000,39384=>1000,39385=>1000,39387=>1000,39388=>1000, -39389=>1000,39391=>1000,39394=>1000,39395=>1000,39396=>1000,39397=>1000,39399=>1000,39401=>1000,39402=>1000,39404=>1000, -39405=>1000,39406=>1000,39408=>1000,39409=>1000,39410=>1000,39412=>1000,39414=>1000,39415=>1000,39416=>1000,39417=>1000, -39418=>1000,39419=>1000,39420=>1000,39421=>1000,39422=>1000,39423=>1000,39425=>1000,39426=>1000,39427=>1000,39428=>1000, -39429=>1000,39430=>1000,39431=>1000,39432=>1000,39433=>1000,39434=>1000,39435=>1000,39437=>1000,39438=>1000,39439=>1000, -39441=>1000,39442=>1000,39443=>1000,39444=>1000,39445=>1000,39446=>1000,39449=>1000,39450=>1000,39451=>1000,39452=>1000, -39453=>1000,39454=>1000,39456=>1000,39458=>1000,39459=>1000,39460=>1000,39461=>1000,39463=>1000,39464=>1000,39465=>1000, -39466=>1000,39467=>1000,39468=>1000,39469=>1000,39470=>1000,39472=>1000,39473=>1000,39474=>1000,39476=>1000,39477=>1000, -39478=>1000,39479=>1000,39480=>1000,39481=>1000,39482=>1000,39485=>1000,39486=>1000,39487=>1000,39488=>1000,39489=>1000, -39490=>1000,39491=>1000,39492=>1000,39493=>1000,39494=>1000,39496=>1000,39497=>1000,39498=>1000,39500=>1000,39501=>1000, -39502=>1000,39503=>1000,39504=>1000,39506=>1000,39507=>1000,39508=>1000,39509=>1000,39510=>1000,39511=>1000,39513=>1000, -39514=>1000,39515=>1000,39518=>1000,39519=>1000,39520=>1000,39522=>1000,39524=>1000,39525=>1000,39526=>1000,39527=>1000, -39528=>1000,39529=>1000,39530=>1000,39531=>1000,39532=>1000,39533=>1000,39534=>1000,39535=>1000,39536=>1000,39537=>1000, -39539=>1000,39540=>1000,39541=>1000,39542=>1000,39543=>1000,39544=>1000,39545=>1000,39546=>1000,39547=>1000,39548=>1000, -39549=>1000,39550=>1000,39551=>1000,39552=>1000,39553=>1000,39554=>1000,39556=>1000,39557=>1000,39558=>1000,39559=>1000, -39560=>1000,39562=>1000,39563=>1000,39564=>1000,39567=>1000,39568=>1000,39569=>1000,39570=>1000,39571=>1000,39574=>1000, -39575=>1000,39576=>1000,39578=>1000,39579=>1000,39580=>1000,39581=>1000,39582=>1000,39583=>1000,39584=>1000,39585=>1000, -39586=>1000,39587=>1000,39588=>1000,39589=>1000,39591=>1000,39592=>1000,39595=>1000,39597=>1000,39599=>1000,39600=>1000, -39601=>1000,39603=>1000,39604=>1000,39606=>1000,39607=>1000,39608=>1000,39609=>1000,39610=>1000,39611=>1000,39612=>1000, -39614=>1000,39615=>1000,39616=>1000,39617=>1000,39618=>1000,39620=>1000,39621=>1000,39622=>1000,39623=>1000,39626=>1000, -39627=>1000,39628=>1000,39629=>1000,39631=>1000,39632=>1000,39633=>1000,39634=>1000,39635=>1000,39636=>1000,39637=>1000, -39638=>1000,39640=>1000,39641=>1000,39644=>1000,39646=>1000,39647=>1000,39649=>1000,39650=>1000,39651=>1000,39653=>1000, -39654=>1000,39655=>1000,39658=>1000,39659=>1000,39660=>1000,39661=>1000,39662=>1000,39663=>1000,39665=>1000,39666=>1000, -39667=>1000,39668=>1000,39670=>1000,39671=>1000,39673=>1000,39674=>1000,39675=>1000,39676=>1000,39677=>1000,39678=>1000, -39681=>1000,39683=>1000,39684=>1000,39685=>1000,39686=>1000,39688=>1000,39690=>1000,39691=>1000,39692=>1000,39693=>1000, -39694=>1000,39695=>1000,39696=>1000,39697=>1000,39698=>1000,39699=>1000,39701=>1000,39702=>1000,39703=>1000,39704=>1000, -39705=>1000,39706=>1000,39710=>1000,39711=>1000,39712=>1000,39714=>1000,39715=>1000,39716=>1000,39717=>1000,39719=>1000, -39720=>1000,39721=>1000,39722=>1000,39723=>1000,39726=>1000,39727=>1000,39729=>1000,39730=>1000,39731=>1000,39733=>1000, -39735=>1000,39738=>1000,39739=>1000,39740=>1000,39742=>1000,39743=>1000,39745=>1000,39746=>1000,39747=>1000,39748=>1000, -39749=>1000,39750=>1000,39751=>1000,39752=>1000,39753=>1000,39754=>1000,39755=>1000,39756=>1000,39757=>1000,39758=>1000, -39759=>1000,39761=>1000,39762=>1000,39764=>1000,39765=>1000,39766=>1000,39768=>1000,39769=>1000,39770=>1000,39771=>1000, -39775=>1000,39776=>1000,39777=>1000,39780=>1000,39782=>1000,39783=>1000,39784=>1000,39788=>1000,39791=>1000,39792=>1000, -39793=>1000,39794=>1000,39796=>1000,39797=>1000,39798=>1000,39799=>1000,39802=>1000,39803=>1000,39804=>1000,39805=>1000, -39806=>1000,39808=>1000,39810=>1000,39811=>1000,39813=>1000,39814=>1000,39815=>1000,39816=>1000,39822=>1000,39823=>1000, -39824=>1000,39825=>1000,39826=>1000,39827=>1000,39829=>1000,39830=>1000,39831=>1000,39834=>1000,39835=>1000,39838=>1000, -39839=>1000,39840=>1000,39841=>1000,39842=>1000,39844=>1000,39845=>1000,39846=>1000,39848=>1000,39850=>1000,39851=>1000, -39853=>1000,39854=>1000,39855=>1000,39857=>1000,39860=>1000,39861=>1000,39862=>1000,39864=>1000,39865=>1000,39867=>1000, -39869=>1000,39871=>1000,39872=>1000,39873=>1000,39875=>1000,39876=>1000,39878=>1000,39879=>1000,39880=>1000,39881=>1000, -39882=>1000,39887=>1000,39889=>1000,39890=>1000,39891=>1000,39892=>1000,39893=>1000,39894=>1000,39895=>1000,39897=>1000, -39898=>1000,39899=>1000,39900=>1000,39902=>1000,39904=>1000,39905=>1000,39906=>1000,39907=>1000,39908=>1000,39909=>1000, -39910=>1000,39911=>1000,39912=>1000,39914=>1000,39915=>1000,39916=>1000,39920=>1000,39921=>1000,39922=>1000,39925=>1000, -39927=>1000,39928=>1000,39933=>1000,39936=>1000,39940=>1000,39941=>1000,39942=>1000,39943=>1000,39944=>1000,39945=>1000, -39946=>1000,39947=>1000,39948=>1000,39949=>1000,39950=>1000,39952=>1000,39954=>1000,39955=>1000,39956=>1000,39957=>1000, -39959=>1000,39963=>1000,39964=>1000,39965=>1000,39969=>1000,39971=>1000,39972=>1000,39973=>1000,39976=>1000,39977=>1000, -39979=>1000,39980=>1000,39981=>1000,39982=>1000,39983=>1000,39984=>1000,39985=>1000,39986=>1000,39987=>1000,39988=>1000, -39990=>1000,39991=>1000,39993=>1000,39994=>1000,39995=>1000,39996=>1000,39997=>1000,39998=>1000,39999=>1000,40000=>1000, -40001=>1000,40004=>1000,40006=>1000,40007=>1000,40008=>1000,40009=>1000,40010=>1000,40011=>1000,40012=>1000,40013=>1000, -40014=>1000,40016=>1000,40018=>1000,40020=>1000,40021=>1000,40022=>1000,40023=>1000,40024=>1000,40025=>1000,40026=>1000, -40030=>1000,40031=>1000,40032=>1000,40034=>1000,40035=>1000,40038=>1000,40039=>1000,40040=>1000,40045=>1000,40046=>1000, -40049=>1000,40051=>1000,40052=>1000,40053=>1000,40054=>1000,40055=>1000,40056=>1000,40057=>1000,40058=>1000,40060=>1000, -40063=>1000,40065=>1000,40066=>1000,40069=>1000,40070=>1000,40071=>1000,40072=>1000,40075=>1000,40077=>1000,40078=>1000, -40080=>1000,40081=>1000,40082=>1000,40084=>1000,40085=>1000,40090=>1000,40091=>1000,40092=>1000,40094=>1000,40095=>1000, -40096=>1000,40097=>1000,40098=>1000,40099=>1000,40100=>1000,40101=>1000,40102=>1000,40103=>1000,40104=>1000,40105=>1000, -40107=>1000,40109=>1000,40110=>1000,40112=>1000,40113=>1000,40114=>1000,40115=>1000,40116=>1000,40117=>1000,40118=>1000, -40119=>1000,40120=>1000,40122=>1000,40123=>1000,40124=>1000,40125=>1000,40131=>1000,40132=>1000,40133=>1000,40134=>1000, -40135=>1000,40138=>1000,40139=>1000,40140=>1000,40141=>1000,40142=>1000,40143=>1000,40144=>1000,40147=>1000,40148=>1000, -40149=>1000,40150=>1000,40151=>1000,40152=>1000,40153=>1000,40156=>1000,40157=>1000,40158=>1000,40159=>1000,40162=>1000, -40165=>1000,40166=>1000,40167=>1000,40169=>1000,40170=>1000,40171=>1000,40172=>1000,40173=>1000,40176=>1000,40177=>1000, -40178=>1000,40179=>1000,40180=>1000,40181=>1000,40182=>1000,40183=>1000,40185=>1000,40186=>1000,40187=>1000,40188=>1000, -40189=>1000,40191=>1000,40192=>1000,40195=>1000,40196=>1000,40197=>1000,40198=>1000,40199=>1000,40200=>1000,40201=>1000, -40206=>1000,40208=>1000,40210=>1000,40212=>1000,40213=>1000,40215=>1000,40216=>1000,40217=>1000,40219=>1000,40221=>1000, -40222=>1000,40223=>1000,40224=>1000,40226=>1000,40227=>1000,40229=>1000,40230=>1000,40232=>1000,40233=>1000,40234=>1000, -40235=>1000,40236=>1000,40237=>1000,40238=>1000,40239=>1000,40240=>1000,40241=>1000,40243=>1000,40246=>1000,40247=>1000, -40248=>1000,40251=>1000,40253=>1000,40254=>1000,40255=>1000,40256=>1000,40257=>1000,40258=>1000,40259=>1000,40260=>1000, -40261=>1000,40262=>1000,40264=>1000,40266=>1000,40267=>1000,40268=>1000,40271=>1000,40272=>1000,40273=>1000,40274=>1000, -40275=>1000,40276=>1000,40278=>1000,40279=>1000,40280=>1000,40281=>1000,40282=>1000,40283=>1000,40284=>1000,40285=>1000, -40286=>1000,40287=>1000,40288=>1000,40289=>1000,40292=>1000,40295=>1000,40296=>1000,40297=>1000,40298=>1000,40299=>1000, -40300=>1000,40303=>1000,40304=>1000,40305=>1000,40306=>1000,40307=>1000,40308=>1000,40309=>1000,40311=>1000,40312=>1000, -40313=>1000,40314=>1000,40315=>1000,40317=>1000,40319=>1000,40320=>1000,40321=>1000,40322=>1000,40324=>1000,40325=>1000, -40326=>1000,40327=>1000,40328=>1000,40329=>1000,40330=>1000,40331=>1000,40332=>1000,40335=>1000,40336=>1000,40338=>1000, -40340=>1000,40342=>1000,40343=>1000,40344=>1000,40345=>1000,40346=>1000,40347=>1000,40348=>1000,40349=>1000,40350=>1000, -40351=>1000,40352=>1000,40353=>1000,40354=>1000,40355=>1000,40356=>1000,40358=>1000,40359=>1000,40360=>1000,40361=>1000, -40362=>1000,40363=>1000,40364=>1000,40365=>1000,40367=>1000,40369=>1000,40370=>1000,40371=>1000,40372=>1000,40373=>1000, -40374=>1000,40375=>1000,40376=>1000,40377=>1000,40378=>1000,40379=>1000,40380=>1000,40382=>1000,40383=>1000,40385=>1000, -40386=>1000,40387=>1000,40388=>1000,40389=>1000,40390=>1000,40391=>1000,40392=>1000,40394=>1000,40395=>1000,40396=>1000, -40397=>1000,40398=>1000,40399=>1000,40400=>1000,40401=>1000,40402=>1000,40403=>1000,40405=>1000,40406=>1000,40407=>1000, -40408=>1000,40409=>1000,40410=>1000,40411=>1000,40412=>1000,40413=>1000,40414=>1000,40415=>1000,40417=>1000,40418=>1000, -40419=>1000,40420=>1000,40421=>1000,40422=>1000,40424=>1000,40425=>1000,40427=>1000,40428=>1000,40429=>1000,40430=>1000, -40431=>1000,40432=>1000,40434=>1000,40435=>1000,40436=>1000,40437=>1000,40438=>1000,40439=>1000,40440=>1000,40441=>1000, -40442=>1000,40443=>1000,40445=>1000,40446=>1000,40447=>1000,40448=>1000,40449=>1000,40450=>1000,40451=>1000,40452=>1000, -40453=>1000,40454=>1000,40455=>1000,40457=>1000,40459=>1000,40461=>1000,40463=>1000,40464=>1000,40465=>1000,40466=>1000, -40467=>1000,40468=>1000,40469=>1000,40471=>1000,40473=>1000,40474=>1000,40475=>1000,40477=>1000,40478=>1000,40479=>1000, -40480=>1000,40481=>1000,40482=>1000,40483=>1000,40485=>1000,40486=>1000,40488=>1000,40489=>1000,40490=>1000,40491=>1000, -40492=>1000,40493=>1000,40495=>1000,40497=>1000,40498=>1000,40499=>1000,40501=>1000,40502=>1000,40503=>1000,40504=>1000, -40505=>1000,40506=>1000,40509=>1000,40510=>1000,40511=>1000,40513=>1000,40514=>1000,40515=>1000,40516=>1000,40517=>1000, -40518=>1000,40519=>1000,40520=>1000,40521=>1000,40522=>1000,40523=>1000,40524=>1000,40526=>1000,40527=>1000,40529=>1000, -40533=>1000,40535=>1000,40536=>1000,40538=>1000,40539=>1000,40540=>1000,40542=>1000,40547=>1000,40548=>1000,40550=>1000, -40551=>1000,40552=>1000,40553=>1000,40554=>1000,40555=>1000,40556=>1000,40557=>1000,40560=>1000,40561=>1000,40563=>1000, -40565=>1000,40568=>1000,40569=>1000,40570=>1000,40572=>1000,40573=>1000,40574=>1000,40575=>1000,40576=>1000,40577=>1000, -40578=>1000,40579=>1000,40582=>1000,40583=>1000,40584=>1000,40585=>1000,40586=>1000,40587=>1000,40588=>1000,40589=>1000, -40590=>1000,40593=>1000,40594=>1000,40595=>1000,40596=>1000,40597=>1000,40599=>1000,40601=>1000,40602=>1000,40603=>1000, -40604=>1000,40605=>1000,40607=>1000,40608=>1000,40609=>1000,40612=>1000,40613=>1000,40614=>1000,40615=>1000,40617=>1000, -40618=>1000,40621=>1000,40622=>1000,40624=>1000,40628=>1000,40629=>1000,40630=>1000,40631=>1000,40632=>1000,40633=>1000, -40634=>1000,40635=>1000,40636=>1000,40637=>1000,40638=>1000,40639=>1000,40640=>1000,40642=>1000,40643=>1000,40644=>1000, -40648=>1000,40649=>1000,40652=>1000,40653=>1000,40654=>1000,40655=>1000,40656=>1000,40657=>1000,40658=>1000,40659=>1000, -40660=>1000,40661=>1000,40662=>1000,40664=>1000,40665=>1000,40666=>1000,40667=>1000,40668=>1000,40669=>1000,40670=>1000, -40671=>1000,40672=>1000,40674=>1000,40676=>1000,40677=>1000,40678=>1000,40679=>1000,40680=>1000,40681=>1000,40682=>1000, -40683=>1000,40685=>1000,40686=>1000,40687=>1000,40688=>1000,40690=>1000,40691=>1000,40692=>1000,40693=>1000,40694=>1000, -40695=>1000,40697=>1000,40698=>1000,40699=>1000,40700=>1000,40701=>1000,40702=>1000,40703=>1000,40704=>1000,40705=>1000, -40710=>1000,40711=>1000,40712=>1000,40713=>1000,40714=>1000,40715=>1000,40717=>1000,40718=>1000,40719=>1000,40720=>1000, -40722=>1000,40723=>1000,40725=>1000,40726=>1000,40727=>1000,40728=>1000,40729=>1000,40730=>1000,40731=>1000,40732=>1000, -40734=>1000,40736=>1000,40737=>1000,40738=>1000,40739=>1000,40740=>1000,40741=>1000,40744=>1000,40745=>1000,40746=>1000, -40747=>1000,40748=>1000,40749=>1000,40750=>1000,40751=>1000,40752=>1000,40753=>1000,40754=>1000,40755=>1000,40756=>1000, -40757=>1000,40758=>1000,40759=>1000,40760=>1000,40761=>1000,40763=>1000,40765=>1000,40766=>1000,40768=>1000,40769=>1000, -40770=>1000,40771=>1000,40772=>1000,40774=>1000,40775=>1000,40776=>1000,40777=>1000,40778=>1000,40779=>1000,40780=>1000, -40781=>1000,40782=>1000,40783=>1000,40784=>1000,40785=>1000,40786=>1000,40788=>1000,40789=>1000,40790=>1000,40791=>1000, -40792=>1000,40793=>1000,40795=>1000,40796=>1000,40797=>1000,40798=>1000,40799=>1000,40800=>1000,40801=>1000,40802=>1000, -40803=>1000,40804=>1000,40805=>1000,40806=>1000,40807=>1000,40810=>1000,40811=>1000,40812=>1000,40814=>1000,40815=>1000, -40816=>1000,40817=>1000,40818=>1000,40820=>1000,40821=>1000,40822=>1000,40823=>1000,40824=>1000,40825=>1000,40826=>1000, -40827=>1000,40830=>1000,40831=>1000,40832=>1000,40835=>1000,40836=>1000,40837=>1000,40838=>1000,40839=>1000,40840=>1000, -40841=>1000,40842=>1000,40843=>1000,40844=>1000,40845=>1000,40848=>1000,40849=>1000,40850=>1000,40852=>1000,40853=>1000, -40856=>1000,40857=>1000,40858=>1000,40859=>1000,40860=>1000,40861=>1000,40863=>1000,40864=>1000,40866=>1000,40868=>1000, -44032=>1000,44033=>1000,44034=>1000,44035=>1000,44036=>1000,44037=>1000,44038=>1000,44039=>1000,44040=>1000,44041=>1000, -44042=>1000,44043=>1000,44044=>1000,44045=>1000,44046=>1000,44047=>1000,44048=>1000,44049=>1000,44050=>1000,44051=>1000, -44052=>1000,44053=>1000,44054=>1000,44055=>1000,44056=>1000,44057=>1000,44058=>1000,44059=>1000,44060=>1000,44061=>1000, -44062=>1000,44063=>1000,44064=>1000,44065=>1000,44066=>1000,44067=>1000,44068=>1000,44069=>1000,44070=>1000,44071=>1000, -44072=>1000,44073=>1000,44074=>1000,44075=>1000,44076=>1000,44077=>1000,44078=>1000,44079=>1000,44080=>1000,44081=>1000, -44082=>1000,44083=>1000,44084=>1000,44085=>1000,44086=>1000,44087=>1000,44088=>1000,44089=>1000,44090=>1000,44091=>1000, -44092=>1000,44093=>1000,44094=>1000,44095=>1000,44096=>1000,44097=>1000,44098=>1000,44099=>1000,44100=>1000,44101=>1000, -44102=>1000,44103=>1000,44104=>1000,44105=>1000,44106=>1000,44107=>1000,44108=>1000,44109=>1000,44110=>1000,44111=>1000, -44112=>1000,44113=>1000,44114=>1000,44115=>1000,44116=>1000,44117=>1000,44118=>1000,44119=>1000,44120=>1000,44121=>1000, -44122=>1000,44123=>1000,44124=>1000,44125=>1000,44126=>1000,44127=>1000,44128=>1000,44129=>1000,44130=>1000,44131=>1000, -44132=>1000,44133=>1000,44134=>1000,44135=>1000,44136=>1000,44137=>1000,44138=>1000,44139=>1000,44140=>1000,44141=>1000, -44142=>1000,44143=>1000,44144=>1000,44145=>1000,44146=>1000,44147=>1000,44148=>1000,44149=>1000,44150=>1000,44151=>1000, -44152=>1000,44153=>1000,44154=>1000,44155=>1000,44156=>1000,44157=>1000,44158=>1000,44159=>1000,44160=>1000,44161=>1000, -44162=>1000,44163=>1000,44164=>1000,44165=>1000,44166=>1000,44167=>1000,44168=>1000,44169=>1000,44170=>1000,44171=>1000, -44172=>1000,44173=>1000,44174=>1000,44175=>1000,44176=>1000,44177=>1000,44178=>1000,44179=>1000,44180=>1000,44181=>1000, -44182=>1000,44183=>1000,44184=>1000,44185=>1000,44186=>1000,44187=>1000,44188=>1000,44189=>1000,44190=>1000,44191=>1000, -44192=>1000,44193=>1000,44194=>1000,44195=>1000,44196=>1000,44197=>1000,44198=>1000,44199=>1000,44200=>1000,44201=>1000, -44202=>1000,44203=>1000,44204=>1000,44205=>1000,44206=>1000,44207=>1000,44208=>1000,44209=>1000,44210=>1000,44211=>1000, -44212=>1000,44213=>1000,44214=>1000,44215=>1000,44216=>1000,44217=>1000,44218=>1000,44219=>1000,44220=>1000,44221=>1000, -44222=>1000,44223=>1000,44224=>1000,44225=>1000,44226=>1000,44227=>1000,44228=>1000,44229=>1000,44230=>1000,44231=>1000, -44232=>1000,44233=>1000,44234=>1000,44235=>1000,44236=>1000,44237=>1000,44238=>1000,44239=>1000,44240=>1000,44241=>1000, -44242=>1000,44243=>1000,44244=>1000,44245=>1000,44246=>1000,44247=>1000,44248=>1000,44249=>1000,44250=>1000,44251=>1000, -44252=>1000,44253=>1000,44254=>1000,44255=>1000,44256=>1000,44257=>1000,44258=>1000,44259=>1000,44260=>1000,44261=>1000, -44262=>1000,44263=>1000,44264=>1000,44265=>1000,44266=>1000,44267=>1000,44268=>1000,44269=>1000,44270=>1000,44271=>1000, -44272=>1000,44273=>1000,44274=>1000,44275=>1000,44276=>1000,44277=>1000,44278=>1000,44279=>1000,44280=>1000,44281=>1000, -44282=>1000,44283=>1000,44284=>1000,44285=>1000,44286=>1000,44287=>1000,44288=>1000,44289=>1000,44290=>1000,44291=>1000, -44292=>1000,44293=>1000,44294=>1000,44295=>1000,44296=>1000,44297=>1000,44298=>1000,44299=>1000,44300=>1000,44301=>1000, -44302=>1000,44303=>1000,44304=>1000,44305=>1000,44306=>1000,44307=>1000,44308=>1000,44309=>1000,44310=>1000,44311=>1000, -44312=>1000,44313=>1000,44314=>1000,44315=>1000,44316=>1000,44317=>1000,44318=>1000,44319=>1000,44320=>1000,44321=>1000, -44322=>1000,44323=>1000,44324=>1000,44325=>1000,44326=>1000,44327=>1000,44328=>1000,44329=>1000,44330=>1000,44331=>1000, -44332=>1000,44333=>1000,44334=>1000,44335=>1000,44336=>1000,44337=>1000,44338=>1000,44339=>1000,44340=>1000,44341=>1000, -44342=>1000,44343=>1000,44344=>1000,44345=>1000,44346=>1000,44347=>1000,44348=>1000,44349=>1000,44350=>1000,44351=>1000, -44352=>1000,44353=>1000,44354=>1000,44355=>1000,44356=>1000,44357=>1000,44358=>1000,44359=>1000,44360=>1000,44361=>1000, -44362=>1000,44363=>1000,44364=>1000,44365=>1000,44366=>1000,44367=>1000,44368=>1000,44369=>1000,44370=>1000,44371=>1000, -44372=>1000,44373=>1000,44374=>1000,44375=>1000,44376=>1000,44377=>1000,44378=>1000,44379=>1000,44380=>1000,44381=>1000, -44382=>1000,44383=>1000,44384=>1000,44385=>1000,44386=>1000,44387=>1000,44388=>1000,44389=>1000,44390=>1000,44391=>1000, -44392=>1000,44393=>1000,44394=>1000,44395=>1000,44396=>1000,44397=>1000,44398=>1000,44399=>1000,44400=>1000,44401=>1000, -44402=>1000,44403=>1000,44404=>1000,44405=>1000,44406=>1000,44407=>1000,44408=>1000,44409=>1000,44410=>1000,44411=>1000, -44412=>1000,44413=>1000,44414=>1000,44415=>1000,44416=>1000,44417=>1000,44418=>1000,44419=>1000,44420=>1000,44421=>1000, -44422=>1000,44423=>1000,44424=>1000,44425=>1000,44426=>1000,44427=>1000,44428=>1000,44429=>1000,44430=>1000,44431=>1000, -44432=>1000,44433=>1000,44434=>1000,44435=>1000,44436=>1000,44437=>1000,44438=>1000,44439=>1000,44440=>1000,44441=>1000, -44442=>1000,44443=>1000,44444=>1000,44445=>1000,44446=>1000,44447=>1000,44448=>1000,44449=>1000,44450=>1000,44451=>1000, -44452=>1000,44453=>1000,44454=>1000,44455=>1000,44456=>1000,44457=>1000,44458=>1000,44459=>1000,44460=>1000,44461=>1000, -44462=>1000,44463=>1000,44464=>1000,44465=>1000,44466=>1000,44467=>1000,44468=>1000,44469=>1000,44470=>1000,44471=>1000, -44472=>1000,44473=>1000,44474=>1000,44475=>1000,44476=>1000,44477=>1000,44478=>1000,44479=>1000,44480=>1000,44481=>1000, -44482=>1000,44483=>1000,44484=>1000,44485=>1000,44486=>1000,44487=>1000,44488=>1000,44489=>1000,44490=>1000,44491=>1000, -44492=>1000,44493=>1000,44494=>1000,44495=>1000,44496=>1000,44497=>1000,44498=>1000,44499=>1000,44500=>1000,44501=>1000, -44502=>1000,44503=>1000,44504=>1000,44505=>1000,44506=>1000,44507=>1000,44508=>1000,44509=>1000,44510=>1000,44511=>1000, -44512=>1000,44513=>1000,44514=>1000,44515=>1000,44516=>1000,44517=>1000,44518=>1000,44519=>1000,44520=>1000,44521=>1000, -44522=>1000,44523=>1000,44524=>1000,44525=>1000,44526=>1000,44527=>1000,44528=>1000,44529=>1000,44530=>1000,44531=>1000, -44532=>1000,44533=>1000,44534=>1000,44535=>1000,44536=>1000,44537=>1000,44538=>1000,44539=>1000,44540=>1000,44541=>1000, -44542=>1000,44543=>1000,44544=>1000,44545=>1000,44546=>1000,44547=>1000,44548=>1000,44549=>1000,44550=>1000,44551=>1000, -44552=>1000,44553=>1000,44554=>1000,44555=>1000,44556=>1000,44557=>1000,44558=>1000,44559=>1000,44560=>1000,44561=>1000, -44562=>1000,44563=>1000,44564=>1000,44565=>1000,44566=>1000,44567=>1000,44568=>1000,44569=>1000,44570=>1000,44571=>1000, -44572=>1000,44573=>1000,44574=>1000,44575=>1000,44576=>1000,44577=>1000,44578=>1000,44579=>1000,44580=>1000,44581=>1000, -44582=>1000,44583=>1000,44584=>1000,44585=>1000,44586=>1000,44587=>1000,44588=>1000,44589=>1000,44590=>1000,44591=>1000, -44592=>1000,44593=>1000,44594=>1000,44595=>1000,44596=>1000,44597=>1000,44598=>1000,44599=>1000,44600=>1000,44601=>1000, -44602=>1000,44603=>1000,44604=>1000,44605=>1000,44606=>1000,44607=>1000,44608=>1000,44609=>1000,44610=>1000,44611=>1000, -44612=>1000,44613=>1000,44614=>1000,44615=>1000,44616=>1000,44617=>1000,44618=>1000,44619=>1000,44620=>1000,44621=>1000, -44622=>1000,44623=>1000,44624=>1000,44625=>1000,44626=>1000,44627=>1000,44628=>1000,44629=>1000,44630=>1000,44631=>1000, -44632=>1000,44633=>1000,44634=>1000,44635=>1000,44636=>1000,44637=>1000,44638=>1000,44639=>1000,44640=>1000,44641=>1000, -44642=>1000,44643=>1000,44644=>1000,44645=>1000,44646=>1000,44647=>1000,44648=>1000,44649=>1000,44650=>1000,44651=>1000, -44652=>1000,44653=>1000,44654=>1000,44655=>1000,44656=>1000,44657=>1000,44658=>1000,44659=>1000,44660=>1000,44661=>1000, -44662=>1000,44663=>1000,44664=>1000,44665=>1000,44666=>1000,44667=>1000,44668=>1000,44669=>1000,44670=>1000,44671=>1000, -44672=>1000,44673=>1000,44674=>1000,44675=>1000,44676=>1000,44677=>1000,44678=>1000,44679=>1000,44680=>1000,44681=>1000, -44682=>1000,44683=>1000,44684=>1000,44685=>1000,44686=>1000,44687=>1000,44688=>1000,44689=>1000,44690=>1000,44691=>1000, -44692=>1000,44693=>1000,44694=>1000,44695=>1000,44696=>1000,44697=>1000,44698=>1000,44699=>1000,44700=>1000,44701=>1000, -44702=>1000,44703=>1000,44704=>1000,44705=>1000,44706=>1000,44707=>1000,44708=>1000,44709=>1000,44710=>1000,44711=>1000, -44712=>1000,44713=>1000,44714=>1000,44715=>1000,44716=>1000,44717=>1000,44718=>1000,44719=>1000,44720=>1000,44721=>1000, -44722=>1000,44723=>1000,44724=>1000,44725=>1000,44726=>1000,44727=>1000,44728=>1000,44729=>1000,44730=>1000,44731=>1000, -44732=>1000,44733=>1000,44734=>1000,44735=>1000,44736=>1000,44737=>1000,44738=>1000,44739=>1000,44740=>1000,44741=>1000, -44742=>1000,44743=>1000,44744=>1000,44745=>1000,44746=>1000,44747=>1000,44748=>1000,44749=>1000,44750=>1000,44751=>1000, -44752=>1000,44753=>1000,44754=>1000,44755=>1000,44756=>1000,44757=>1000,44758=>1000,44759=>1000,44760=>1000,44761=>1000, -44762=>1000,44763=>1000,44764=>1000,44765=>1000,44766=>1000,44767=>1000,44768=>1000,44769=>1000,44770=>1000,44771=>1000, -44772=>1000,44773=>1000,44774=>1000,44775=>1000,44776=>1000,44777=>1000,44778=>1000,44779=>1000,44780=>1000,44781=>1000, -44782=>1000,44783=>1000,44784=>1000,44785=>1000,44786=>1000,44787=>1000,44788=>1000,44789=>1000,44790=>1000,44791=>1000, -44792=>1000,44793=>1000,44794=>1000,44795=>1000,44796=>1000,44797=>1000,44798=>1000,44799=>1000,44800=>1000,44801=>1000, -44802=>1000,44803=>1000,44804=>1000,44805=>1000,44806=>1000,44807=>1000,44808=>1000,44809=>1000,44810=>1000,44811=>1000, -44812=>1000,44813=>1000,44814=>1000,44815=>1000,44816=>1000,44817=>1000,44818=>1000,44819=>1000,44820=>1000,44821=>1000, -44822=>1000,44823=>1000,44824=>1000,44825=>1000,44826=>1000,44827=>1000,44828=>1000,44829=>1000,44830=>1000,44831=>1000, -44832=>1000,44833=>1000,44834=>1000,44835=>1000,44836=>1000,44837=>1000,44838=>1000,44839=>1000,44840=>1000,44841=>1000, -44842=>1000,44843=>1000,44844=>1000,44845=>1000,44846=>1000,44847=>1000,44848=>1000,44849=>1000,44850=>1000,44851=>1000, -44852=>1000,44853=>1000,44854=>1000,44855=>1000,44856=>1000,44857=>1000,44858=>1000,44859=>1000,44860=>1000,44861=>1000, -44862=>1000,44863=>1000,44864=>1000,44865=>1000,44866=>1000,44867=>1000,44868=>1000,44869=>1000,44870=>1000,44871=>1000, -44872=>1000,44873=>1000,44874=>1000,44875=>1000,44876=>1000,44877=>1000,44878=>1000,44879=>1000,44880=>1000,44881=>1000, -44882=>1000,44883=>1000,44884=>1000,44885=>1000,44886=>1000,44887=>1000,44888=>1000,44889=>1000,44890=>1000,44891=>1000, -44892=>1000,44893=>1000,44894=>1000,44895=>1000,44896=>1000,44897=>1000,44898=>1000,44899=>1000,44900=>1000,44901=>1000, -44902=>1000,44903=>1000,44904=>1000,44905=>1000,44906=>1000,44907=>1000,44908=>1000,44909=>1000,44910=>1000,44911=>1000, -44912=>1000,44913=>1000,44914=>1000,44915=>1000,44916=>1000,44917=>1000,44918=>1000,44919=>1000,44920=>1000,44921=>1000, -44922=>1000,44923=>1000,44924=>1000,44925=>1000,44926=>1000,44927=>1000,44928=>1000,44929=>1000,44930=>1000,44931=>1000, -44932=>1000,44933=>1000,44934=>1000,44935=>1000,44936=>1000,44937=>1000,44938=>1000,44939=>1000,44940=>1000,44941=>1000, -44942=>1000,44943=>1000,44944=>1000,44945=>1000,44946=>1000,44947=>1000,44948=>1000,44949=>1000,44950=>1000,44951=>1000, -44952=>1000,44953=>1000,44954=>1000,44955=>1000,44956=>1000,44957=>1000,44958=>1000,44959=>1000,44960=>1000,44961=>1000, -44962=>1000,44963=>1000,44964=>1000,44965=>1000,44966=>1000,44967=>1000,44968=>1000,44969=>1000,44970=>1000,44971=>1000, -44972=>1000,44973=>1000,44974=>1000,44975=>1000,44976=>1000,44977=>1000,44978=>1000,44979=>1000,44980=>1000,44981=>1000, -44982=>1000,44983=>1000,44984=>1000,44985=>1000,44986=>1000,44987=>1000,44988=>1000,44989=>1000,44990=>1000,44991=>1000, -44992=>1000,44993=>1000,44994=>1000,44995=>1000,44996=>1000,44997=>1000,44998=>1000,44999=>1000,45000=>1000,45001=>1000, -45002=>1000,45003=>1000,45004=>1000,45005=>1000,45006=>1000,45007=>1000,45008=>1000,45009=>1000,45010=>1000,45011=>1000, -45012=>1000,45013=>1000,45014=>1000,45015=>1000,45016=>1000,45017=>1000,45018=>1000,45019=>1000,45020=>1000,45021=>1000, -45022=>1000,45023=>1000,45024=>1000,45025=>1000,45026=>1000,45027=>1000,45028=>1000,45029=>1000,45030=>1000,45031=>1000, -45032=>1000,45033=>1000,45034=>1000,45035=>1000,45036=>1000,45037=>1000,45038=>1000,45039=>1000,45040=>1000,45041=>1000, -45042=>1000,45043=>1000,45044=>1000,45045=>1000,45046=>1000,45047=>1000,45048=>1000,45049=>1000,45050=>1000,45051=>1000, -45052=>1000,45053=>1000,45054=>1000,45055=>1000,45056=>1000,45057=>1000,45058=>1000,45059=>1000,45060=>1000,45061=>1000, -45062=>1000,45063=>1000,45064=>1000,45065=>1000,45066=>1000,45067=>1000,45068=>1000,45069=>1000,45070=>1000,45071=>1000, -45072=>1000,45073=>1000,45074=>1000,45075=>1000,45076=>1000,45077=>1000,45078=>1000,45079=>1000,45080=>1000,45081=>1000, -45082=>1000,45083=>1000,45084=>1000,45085=>1000,45086=>1000,45087=>1000,45088=>1000,45089=>1000,45090=>1000,45091=>1000, -45092=>1000,45093=>1000,45094=>1000,45095=>1000,45096=>1000,45097=>1000,45098=>1000,45099=>1000,45100=>1000,45101=>1000, -45102=>1000,45103=>1000,45104=>1000,45105=>1000,45106=>1000,45107=>1000,45108=>1000,45109=>1000,45110=>1000,45111=>1000, -45112=>1000,45113=>1000,45114=>1000,45115=>1000,45116=>1000,45117=>1000,45118=>1000,45119=>1000,45120=>1000,45121=>1000, -45122=>1000,45123=>1000,45124=>1000,45125=>1000,45126=>1000,45127=>1000,45128=>1000,45129=>1000,45130=>1000,45131=>1000, -45132=>1000,45133=>1000,45134=>1000,45135=>1000,45136=>1000,45137=>1000,45138=>1000,45139=>1000,45140=>1000,45141=>1000, -45142=>1000,45143=>1000,45144=>1000,45145=>1000,45146=>1000,45147=>1000,45148=>1000,45149=>1000,45150=>1000,45151=>1000, -45152=>1000,45153=>1000,45154=>1000,45155=>1000,45156=>1000,45157=>1000,45158=>1000,45159=>1000,45160=>1000,45161=>1000, -45162=>1000,45163=>1000,45164=>1000,45165=>1000,45166=>1000,45167=>1000,45168=>1000,45169=>1000,45170=>1000,45171=>1000, -45172=>1000,45173=>1000,45174=>1000,45175=>1000,45176=>1000,45177=>1000,45178=>1000,45179=>1000,45180=>1000,45181=>1000, -45182=>1000,45183=>1000,45184=>1000,45185=>1000,45186=>1000,45187=>1000,45188=>1000,45189=>1000,45190=>1000,45191=>1000, -45192=>1000,45193=>1000,45194=>1000,45195=>1000,45196=>1000,45197=>1000,45198=>1000,45199=>1000,45200=>1000,45201=>1000, -45202=>1000,45203=>1000,45204=>1000,45205=>1000,45206=>1000,45207=>1000,45208=>1000,45209=>1000,45210=>1000,45211=>1000, -45212=>1000,45213=>1000,45214=>1000,45215=>1000,45216=>1000,45217=>1000,45218=>1000,45219=>1000,45220=>1000,45221=>1000, -45222=>1000,45223=>1000,45224=>1000,45225=>1000,45226=>1000,45227=>1000,45228=>1000,45229=>1000,45230=>1000,45231=>1000, -45232=>1000,45233=>1000,45234=>1000,45235=>1000,45236=>1000,45237=>1000,45238=>1000,45239=>1000,45240=>1000,45241=>1000, -45242=>1000,45243=>1000,45244=>1000,45245=>1000,45246=>1000,45247=>1000,45248=>1000,45249=>1000,45250=>1000,45251=>1000, -45252=>1000,45253=>1000,45254=>1000,45255=>1000,45256=>1000,45257=>1000,45258=>1000,45259=>1000,45260=>1000,45261=>1000, -45262=>1000,45263=>1000,45264=>1000,45265=>1000,45266=>1000,45267=>1000,45268=>1000,45269=>1000,45270=>1000,45271=>1000, -45272=>1000,45273=>1000,45274=>1000,45275=>1000,45276=>1000,45277=>1000,45278=>1000,45279=>1000,45280=>1000,45281=>1000, -45282=>1000,45283=>1000,45284=>1000,45285=>1000,45286=>1000,45287=>1000,45288=>1000,45289=>1000,45290=>1000,45291=>1000, -45292=>1000,45293=>1000,45294=>1000,45295=>1000,45296=>1000,45297=>1000,45298=>1000,45299=>1000,45300=>1000,45301=>1000, -45302=>1000,45303=>1000,45304=>1000,45305=>1000,45306=>1000,45307=>1000,45308=>1000,45309=>1000,45310=>1000,45311=>1000, -45312=>1000,45313=>1000,45314=>1000,45315=>1000,45316=>1000,45317=>1000,45318=>1000,45319=>1000,45320=>1000,45321=>1000, -45322=>1000,45323=>1000,45324=>1000,45325=>1000,45326=>1000,45327=>1000,45328=>1000,45329=>1000,45330=>1000,45331=>1000, -45332=>1000,45333=>1000,45334=>1000,45335=>1000,45336=>1000,45337=>1000,45338=>1000,45339=>1000,45340=>1000,45341=>1000, -45342=>1000,45343=>1000,45344=>1000,45345=>1000,45346=>1000,45347=>1000,45348=>1000,45349=>1000,45350=>1000,45351=>1000, -45352=>1000,45353=>1000,45354=>1000,45355=>1000,45356=>1000,45357=>1000,45358=>1000,45359=>1000,45360=>1000,45361=>1000, -45362=>1000,45363=>1000,45364=>1000,45365=>1000,45366=>1000,45367=>1000,45368=>1000,45369=>1000,45370=>1000,45371=>1000, -45372=>1000,45373=>1000,45374=>1000,45375=>1000,45376=>1000,45377=>1000,45378=>1000,45379=>1000,45380=>1000,45381=>1000, -45382=>1000,45383=>1000,45384=>1000,45385=>1000,45386=>1000,45387=>1000,45388=>1000,45389=>1000,45390=>1000,45391=>1000, -45392=>1000,45393=>1000,45394=>1000,45395=>1000,45396=>1000,45397=>1000,45398=>1000,45399=>1000,45400=>1000,45401=>1000, -45402=>1000,45403=>1000,45404=>1000,45405=>1000,45406=>1000,45407=>1000,45408=>1000,45409=>1000,45410=>1000,45411=>1000, -45412=>1000,45413=>1000,45414=>1000,45415=>1000,45416=>1000,45417=>1000,45418=>1000,45419=>1000,45420=>1000,45421=>1000, -45422=>1000,45423=>1000,45424=>1000,45425=>1000,45426=>1000,45427=>1000,45428=>1000,45429=>1000,45430=>1000,45431=>1000, -45432=>1000,45433=>1000,45434=>1000,45435=>1000,45436=>1000,45437=>1000,45438=>1000,45439=>1000,45440=>1000,45441=>1000, -45442=>1000,45443=>1000,45444=>1000,45445=>1000,45446=>1000,45447=>1000,45448=>1000,45449=>1000,45450=>1000,45451=>1000, -45452=>1000,45453=>1000,45454=>1000,45455=>1000,45456=>1000,45457=>1000,45458=>1000,45459=>1000,45460=>1000,45461=>1000, -45462=>1000,45463=>1000,45464=>1000,45465=>1000,45466=>1000,45467=>1000,45468=>1000,45469=>1000,45470=>1000,45471=>1000, -45472=>1000,45473=>1000,45474=>1000,45475=>1000,45476=>1000,45477=>1000,45478=>1000,45479=>1000,45480=>1000,45481=>1000, -45482=>1000,45483=>1000,45484=>1000,45485=>1000,45486=>1000,45487=>1000,45488=>1000,45489=>1000,45490=>1000,45491=>1000, -45492=>1000,45493=>1000,45494=>1000,45495=>1000,45496=>1000,45497=>1000,45498=>1000,45499=>1000,45500=>1000,45501=>1000, -45502=>1000,45503=>1000,45504=>1000,45505=>1000,45506=>1000,45507=>1000,45508=>1000,45509=>1000,45510=>1000,45511=>1000, -45512=>1000,45513=>1000,45514=>1000,45515=>1000,45516=>1000,45517=>1000,45518=>1000,45519=>1000,45520=>1000,45521=>1000, -45522=>1000,45523=>1000,45524=>1000,45525=>1000,45526=>1000,45527=>1000,45528=>1000,45529=>1000,45530=>1000,45531=>1000, -45532=>1000,45533=>1000,45534=>1000,45535=>1000,45536=>1000,45537=>1000,45538=>1000,45539=>1000,45540=>1000,45541=>1000, -45542=>1000,45543=>1000,45544=>1000,45545=>1000,45546=>1000,45547=>1000,45548=>1000,45549=>1000,45550=>1000,45551=>1000, -45552=>1000,45553=>1000,45554=>1000,45555=>1000,45556=>1000,45557=>1000,45558=>1000,45559=>1000,45560=>1000,45561=>1000, -45562=>1000,45563=>1000,45564=>1000,45565=>1000,45566=>1000,45567=>1000,45568=>1000,45569=>1000,45570=>1000,45571=>1000, -45572=>1000,45573=>1000,45574=>1000,45575=>1000,45576=>1000,45577=>1000,45578=>1000,45579=>1000,45580=>1000,45581=>1000, -45582=>1000,45583=>1000,45584=>1000,45585=>1000,45586=>1000,45587=>1000,45588=>1000,45589=>1000,45590=>1000,45591=>1000, -45592=>1000,45593=>1000,45594=>1000,45595=>1000,45596=>1000,45597=>1000,45598=>1000,45599=>1000,45600=>1000,45601=>1000, -45602=>1000,45603=>1000,45604=>1000,45605=>1000,45606=>1000,45607=>1000,45608=>1000,45609=>1000,45610=>1000,45611=>1000, -45612=>1000,45613=>1000,45614=>1000,45615=>1000,45616=>1000,45617=>1000,45618=>1000,45619=>1000,45620=>1000,45621=>1000, -45622=>1000,45623=>1000,45624=>1000,45625=>1000,45626=>1000,45627=>1000,45628=>1000,45629=>1000,45630=>1000,45631=>1000, -45632=>1000,45633=>1000,45634=>1000,45635=>1000,45636=>1000,45637=>1000,45638=>1000,45639=>1000,45640=>1000,45641=>1000, -45642=>1000,45643=>1000,45644=>1000,45645=>1000,45646=>1000,45647=>1000,45648=>1000,45649=>1000,45650=>1000,45651=>1000, -45652=>1000,45653=>1000,45654=>1000,45655=>1000,45656=>1000,45657=>1000,45658=>1000,45659=>1000,45660=>1000,45661=>1000, -45662=>1000,45663=>1000,45664=>1000,45665=>1000,45666=>1000,45667=>1000,45668=>1000,45669=>1000,45670=>1000,45671=>1000, -45672=>1000,45673=>1000,45674=>1000,45675=>1000,45676=>1000,45677=>1000,45678=>1000,45679=>1000,45680=>1000,45681=>1000, -45682=>1000,45683=>1000,45684=>1000,45685=>1000,45686=>1000,45687=>1000,45688=>1000,45689=>1000,45690=>1000,45691=>1000, -45692=>1000,45693=>1000,45694=>1000,45695=>1000,45696=>1000,45697=>1000,45698=>1000,45699=>1000,45700=>1000,45701=>1000, -45702=>1000,45703=>1000,45704=>1000,45705=>1000,45706=>1000,45707=>1000,45708=>1000,45709=>1000,45710=>1000,45711=>1000, -45712=>1000,45713=>1000,45714=>1000,45715=>1000,45716=>1000,45717=>1000,45718=>1000,45719=>1000,45720=>1000,45721=>1000, -45722=>1000,45723=>1000,45724=>1000,45725=>1000,45726=>1000,45727=>1000,45728=>1000,45729=>1000,45730=>1000,45731=>1000, -45732=>1000,45733=>1000,45734=>1000,45735=>1000,45736=>1000,45737=>1000,45738=>1000,45739=>1000,45740=>1000,45741=>1000, -45742=>1000,45743=>1000,45744=>1000,45745=>1000,45746=>1000,45747=>1000,45748=>1000,45749=>1000,45750=>1000,45751=>1000, -45752=>1000,45753=>1000,45754=>1000,45755=>1000,45756=>1000,45757=>1000,45758=>1000,45759=>1000,45760=>1000,45761=>1000, -45762=>1000,45763=>1000,45764=>1000,45765=>1000,45766=>1000,45767=>1000,45768=>1000,45769=>1000,45770=>1000,45771=>1000, -45772=>1000,45773=>1000,45774=>1000,45775=>1000,45776=>1000,45777=>1000,45778=>1000,45779=>1000,45780=>1000,45781=>1000, -45782=>1000,45783=>1000,45784=>1000,45785=>1000,45786=>1000,45787=>1000,45788=>1000,45789=>1000,45790=>1000,45791=>1000, -45792=>1000,45793=>1000,45794=>1000,45795=>1000,45796=>1000,45797=>1000,45798=>1000,45799=>1000,45800=>1000,45801=>1000, -45802=>1000,45803=>1000,45804=>1000,45805=>1000,45806=>1000,45807=>1000,45808=>1000,45809=>1000,45810=>1000,45811=>1000, -45812=>1000,45813=>1000,45814=>1000,45815=>1000,45816=>1000,45817=>1000,45818=>1000,45819=>1000,45820=>1000,45821=>1000, -45822=>1000,45823=>1000,45824=>1000,45825=>1000,45826=>1000,45827=>1000,45828=>1000,45829=>1000,45830=>1000,45831=>1000, -45832=>1000,45833=>1000,45834=>1000,45835=>1000,45836=>1000,45837=>1000,45838=>1000,45839=>1000,45840=>1000,45841=>1000, -45842=>1000,45843=>1000,45844=>1000,45845=>1000,45846=>1000,45847=>1000,45848=>1000,45849=>1000,45850=>1000,45851=>1000, -45852=>1000,45853=>1000,45854=>1000,45855=>1000,45856=>1000,45857=>1000,45858=>1000,45859=>1000,45860=>1000,45861=>1000, -45862=>1000,45863=>1000,45864=>1000,45865=>1000,45866=>1000,45867=>1000,45868=>1000,45869=>1000,45870=>1000,45871=>1000, -45872=>1000,45873=>1000,45874=>1000,45875=>1000,45876=>1000,45877=>1000,45878=>1000,45879=>1000,45880=>1000,45881=>1000, -45882=>1000,45883=>1000,45884=>1000,45885=>1000,45886=>1000,45887=>1000,45888=>1000,45889=>1000,45890=>1000,45891=>1000, -45892=>1000,45893=>1000,45894=>1000,45895=>1000,45896=>1000,45897=>1000,45898=>1000,45899=>1000,45900=>1000,45901=>1000, -45902=>1000,45903=>1000,45904=>1000,45905=>1000,45906=>1000,45907=>1000,45908=>1000,45909=>1000,45910=>1000,45911=>1000, -45912=>1000,45913=>1000,45914=>1000,45915=>1000,45916=>1000,45917=>1000,45918=>1000,45919=>1000,45920=>1000,45921=>1000, -45922=>1000,45923=>1000,45924=>1000,45925=>1000,45926=>1000,45927=>1000,45928=>1000,45929=>1000,45930=>1000,45931=>1000, -45932=>1000,45933=>1000,45934=>1000,45935=>1000,45936=>1000,45937=>1000,45938=>1000,45939=>1000,45940=>1000,45941=>1000, -45942=>1000,45943=>1000,45944=>1000,45945=>1000,45946=>1000,45947=>1000,45948=>1000,45949=>1000,45950=>1000,45951=>1000, -45952=>1000,45953=>1000,45954=>1000,45955=>1000,45956=>1000,45957=>1000,45958=>1000,45959=>1000,45960=>1000,45961=>1000, -45962=>1000,45963=>1000,45964=>1000,45965=>1000,45966=>1000,45967=>1000,45968=>1000,45969=>1000,45970=>1000,45971=>1000, -45972=>1000,45973=>1000,45974=>1000,45975=>1000,45976=>1000,45977=>1000,45978=>1000,45979=>1000,45980=>1000,45981=>1000, -45982=>1000,45983=>1000,45984=>1000,45985=>1000,45986=>1000,45987=>1000,45988=>1000,45989=>1000,45990=>1000,45991=>1000, -45992=>1000,45993=>1000,45994=>1000,45995=>1000,45996=>1000,45997=>1000,45998=>1000,45999=>1000,46000=>1000,46001=>1000, -46002=>1000,46003=>1000,46004=>1000,46005=>1000,46006=>1000,46007=>1000,46008=>1000,46009=>1000,46010=>1000,46011=>1000, -46012=>1000,46013=>1000,46014=>1000,46015=>1000,46016=>1000,46017=>1000,46018=>1000,46019=>1000,46020=>1000,46021=>1000, -46022=>1000,46023=>1000,46024=>1000,46025=>1000,46026=>1000,46027=>1000,46028=>1000,46029=>1000,46030=>1000,46031=>1000, -46032=>1000,46033=>1000,46034=>1000,46035=>1000,46036=>1000,46037=>1000,46038=>1000,46039=>1000,46040=>1000,46041=>1000, -46042=>1000,46043=>1000,46044=>1000,46045=>1000,46046=>1000,46047=>1000,46048=>1000,46049=>1000,46050=>1000,46051=>1000, -46052=>1000,46053=>1000,46054=>1000,46055=>1000,46056=>1000,46057=>1000,46058=>1000,46059=>1000,46060=>1000,46061=>1000, -46062=>1000,46063=>1000,46064=>1000,46065=>1000,46066=>1000,46067=>1000,46068=>1000,46069=>1000,46070=>1000,46071=>1000, -46072=>1000,46073=>1000,46074=>1000,46075=>1000,46076=>1000,46077=>1000,46078=>1000,46079=>1000,46080=>1000,46081=>1000, -46082=>1000,46083=>1000,46084=>1000,46085=>1000,46086=>1000,46087=>1000,46088=>1000,46089=>1000,46090=>1000,46091=>1000, -46092=>1000,46093=>1000,46094=>1000,46095=>1000,46096=>1000,46097=>1000,46098=>1000,46099=>1000,46100=>1000,46101=>1000, -46102=>1000,46103=>1000,46104=>1000,46105=>1000,46106=>1000,46107=>1000,46108=>1000,46109=>1000,46110=>1000,46111=>1000, -46112=>1000,46113=>1000,46114=>1000,46115=>1000,46116=>1000,46117=>1000,46118=>1000,46119=>1000,46120=>1000,46121=>1000, -46122=>1000,46123=>1000,46124=>1000,46125=>1000,46126=>1000,46127=>1000,46128=>1000,46129=>1000,46130=>1000,46131=>1000, -46132=>1000,46133=>1000,46134=>1000,46135=>1000,46136=>1000,46137=>1000,46138=>1000,46139=>1000,46140=>1000,46141=>1000, -46142=>1000,46143=>1000,46144=>1000,46145=>1000,46146=>1000,46147=>1000,46148=>1000,46149=>1000,46150=>1000,46151=>1000, -46152=>1000,46153=>1000,46154=>1000,46155=>1000,46156=>1000,46157=>1000,46158=>1000,46159=>1000,46160=>1000,46161=>1000, -46162=>1000,46163=>1000,46164=>1000,46165=>1000,46166=>1000,46167=>1000,46168=>1000,46169=>1000,46170=>1000,46171=>1000, -46172=>1000,46173=>1000,46174=>1000,46175=>1000,46176=>1000,46177=>1000,46178=>1000,46179=>1000,46180=>1000,46181=>1000, -46182=>1000,46183=>1000,46184=>1000,46185=>1000,46186=>1000,46187=>1000,46188=>1000,46189=>1000,46190=>1000,46191=>1000, -46192=>1000,46193=>1000,46194=>1000,46195=>1000,46196=>1000,46197=>1000,46198=>1000,46199=>1000,46200=>1000,46201=>1000, -46202=>1000,46203=>1000,46204=>1000,46205=>1000,46206=>1000,46207=>1000,46208=>1000,46209=>1000,46210=>1000,46211=>1000, -46212=>1000,46213=>1000,46214=>1000,46215=>1000,46216=>1000,46217=>1000,46218=>1000,46219=>1000,46220=>1000,46221=>1000, -46222=>1000,46223=>1000,46224=>1000,46225=>1000,46226=>1000,46227=>1000,46228=>1000,46229=>1000,46230=>1000,46231=>1000, -46232=>1000,46233=>1000,46234=>1000,46235=>1000,46236=>1000,46237=>1000,46238=>1000,46239=>1000,46240=>1000,46241=>1000, -46242=>1000,46243=>1000,46244=>1000,46245=>1000,46246=>1000,46247=>1000,46248=>1000,46249=>1000,46250=>1000,46251=>1000, -46252=>1000,46253=>1000,46254=>1000,46255=>1000,46256=>1000,46257=>1000,46258=>1000,46259=>1000,46260=>1000,46261=>1000, -46262=>1000,46263=>1000,46264=>1000,46265=>1000,46266=>1000,46267=>1000,46268=>1000,46269=>1000,46270=>1000,46271=>1000, -46272=>1000,46273=>1000,46274=>1000,46275=>1000,46276=>1000,46277=>1000,46278=>1000,46279=>1000,46280=>1000,46281=>1000, -46282=>1000,46283=>1000,46284=>1000,46285=>1000,46286=>1000,46287=>1000,46288=>1000,46289=>1000,46290=>1000,46291=>1000, -46292=>1000,46293=>1000,46294=>1000,46295=>1000,46296=>1000,46297=>1000,46298=>1000,46299=>1000,46300=>1000,46301=>1000, -46302=>1000,46303=>1000,46304=>1000,46305=>1000,46306=>1000,46307=>1000,46308=>1000,46309=>1000,46310=>1000,46311=>1000, -46312=>1000,46313=>1000,46314=>1000,46315=>1000,46316=>1000,46317=>1000,46318=>1000,46319=>1000,46320=>1000,46321=>1000, -46322=>1000,46323=>1000,46324=>1000,46325=>1000,46326=>1000,46327=>1000,46328=>1000,46329=>1000,46330=>1000,46331=>1000, -46332=>1000,46333=>1000,46334=>1000,46335=>1000,46336=>1000,46337=>1000,46338=>1000,46339=>1000,46340=>1000,46341=>1000, -46342=>1000,46343=>1000,46344=>1000,46345=>1000,46346=>1000,46347=>1000,46348=>1000,46349=>1000,46350=>1000,46351=>1000, -46352=>1000,46353=>1000,46354=>1000,46355=>1000,46356=>1000,46357=>1000,46358=>1000,46359=>1000,46360=>1000,46361=>1000, -46362=>1000,46363=>1000,46364=>1000,46365=>1000,46366=>1000,46367=>1000,46368=>1000,46369=>1000,46370=>1000,46371=>1000, -46372=>1000,46373=>1000,46374=>1000,46375=>1000,46376=>1000,46377=>1000,46378=>1000,46379=>1000,46380=>1000,46381=>1000, -46382=>1000,46383=>1000,46384=>1000,46385=>1000,46386=>1000,46387=>1000,46388=>1000,46389=>1000,46390=>1000,46391=>1000, -46392=>1000,46393=>1000,46394=>1000,46395=>1000,46396=>1000,46397=>1000,46398=>1000,46399=>1000,46400=>1000,46401=>1000, -46402=>1000,46403=>1000,46404=>1000,46405=>1000,46406=>1000,46407=>1000,46408=>1000,46409=>1000,46410=>1000,46411=>1000, -46412=>1000,46413=>1000,46414=>1000,46415=>1000,46416=>1000,46417=>1000,46418=>1000,46419=>1000,46420=>1000,46421=>1000, -46422=>1000,46423=>1000,46424=>1000,46425=>1000,46426=>1000,46427=>1000,46428=>1000,46429=>1000,46430=>1000,46431=>1000, -46432=>1000,46433=>1000,46434=>1000,46435=>1000,46436=>1000,46437=>1000,46438=>1000,46439=>1000,46440=>1000,46441=>1000, -46442=>1000,46443=>1000,46444=>1000,46445=>1000,46446=>1000,46447=>1000,46448=>1000,46449=>1000,46450=>1000,46451=>1000, -46452=>1000,46453=>1000,46454=>1000,46455=>1000,46456=>1000,46457=>1000,46458=>1000,46459=>1000,46460=>1000,46461=>1000, -46462=>1000,46463=>1000,46464=>1000,46465=>1000,46466=>1000,46467=>1000,46468=>1000,46469=>1000,46470=>1000,46471=>1000, -46472=>1000,46473=>1000,46474=>1000,46475=>1000,46476=>1000,46477=>1000,46478=>1000,46479=>1000,46480=>1000,46481=>1000, -46482=>1000,46483=>1000,46484=>1000,46485=>1000,46486=>1000,46487=>1000,46488=>1000,46489=>1000,46490=>1000,46491=>1000, -46492=>1000,46493=>1000,46494=>1000,46495=>1000,46496=>1000,46497=>1000,46498=>1000,46499=>1000,46500=>1000,46501=>1000, -46502=>1000,46503=>1000,46504=>1000,46505=>1000,46506=>1000,46507=>1000,46508=>1000,46509=>1000,46510=>1000,46511=>1000, -46512=>1000,46513=>1000,46514=>1000,46515=>1000,46516=>1000,46517=>1000,46518=>1000,46519=>1000,46520=>1000,46521=>1000, -46522=>1000,46523=>1000,46524=>1000,46525=>1000,46526=>1000,46527=>1000,46528=>1000,46529=>1000,46530=>1000,46531=>1000, -46532=>1000,46533=>1000,46534=>1000,46535=>1000,46536=>1000,46537=>1000,46538=>1000,46539=>1000,46540=>1000,46541=>1000, -46542=>1000,46543=>1000,46544=>1000,46545=>1000,46546=>1000,46547=>1000,46548=>1000,46549=>1000,46550=>1000,46551=>1000, -46552=>1000,46553=>1000,46554=>1000,46555=>1000,46556=>1000,46557=>1000,46558=>1000,46559=>1000,46560=>1000,46561=>1000, -46562=>1000,46563=>1000,46564=>1000,46565=>1000,46566=>1000,46567=>1000,46568=>1000,46569=>1000,46570=>1000,46571=>1000, -46572=>1000,46573=>1000,46574=>1000,46575=>1000,46576=>1000,46577=>1000,46578=>1000,46579=>1000,46580=>1000,46581=>1000, -46582=>1000,46583=>1000,46584=>1000,46585=>1000,46586=>1000,46587=>1000,46588=>1000,46589=>1000,46590=>1000,46591=>1000, -46592=>1000,46593=>1000,46594=>1000,46595=>1000,46596=>1000,46597=>1000,46598=>1000,46599=>1000,46600=>1000,46601=>1000, -46602=>1000,46603=>1000,46604=>1000,46605=>1000,46606=>1000,46607=>1000,46608=>1000,46609=>1000,46610=>1000,46611=>1000, -46612=>1000,46613=>1000,46614=>1000,46615=>1000,46616=>1000,46617=>1000,46618=>1000,46619=>1000,46620=>1000,46621=>1000, -46622=>1000,46623=>1000,46624=>1000,46625=>1000,46626=>1000,46627=>1000,46628=>1000,46629=>1000,46630=>1000,46631=>1000, -46632=>1000,46633=>1000,46634=>1000,46635=>1000,46636=>1000,46637=>1000,46638=>1000,46639=>1000,46640=>1000,46641=>1000, -46642=>1000,46643=>1000,46644=>1000,46645=>1000,46646=>1000,46647=>1000,46648=>1000,46649=>1000,46650=>1000,46651=>1000, -46652=>1000,46653=>1000,46654=>1000,46655=>1000,46656=>1000,46657=>1000,46658=>1000,46659=>1000,46660=>1000,46661=>1000, -46662=>1000,46663=>1000,46664=>1000,46665=>1000,46666=>1000,46667=>1000,46668=>1000,46669=>1000,46670=>1000,46671=>1000, -46672=>1000,46673=>1000,46674=>1000,46675=>1000,46676=>1000,46677=>1000,46678=>1000,46679=>1000,46680=>1000,46681=>1000, -46682=>1000,46683=>1000,46684=>1000,46685=>1000,46686=>1000,46687=>1000,46688=>1000,46689=>1000,46690=>1000,46691=>1000, -46692=>1000,46693=>1000,46694=>1000,46695=>1000,46696=>1000,46697=>1000,46698=>1000,46699=>1000,46700=>1000,46701=>1000, -46702=>1000,46703=>1000,46704=>1000,46705=>1000,46706=>1000,46707=>1000,46708=>1000,46709=>1000,46710=>1000,46711=>1000, -46712=>1000,46713=>1000,46714=>1000,46715=>1000,46716=>1000,46717=>1000,46718=>1000,46719=>1000,46720=>1000,46721=>1000, -46722=>1000,46723=>1000,46724=>1000,46725=>1000,46726=>1000,46727=>1000,46728=>1000,46729=>1000,46730=>1000,46731=>1000, -46732=>1000,46733=>1000,46734=>1000,46735=>1000,46736=>1000,46737=>1000,46738=>1000,46739=>1000,46740=>1000,46741=>1000, -46742=>1000,46743=>1000,46744=>1000,46745=>1000,46746=>1000,46747=>1000,46748=>1000,46749=>1000,46750=>1000,46751=>1000, -46752=>1000,46753=>1000,46754=>1000,46755=>1000,46756=>1000,46757=>1000,46758=>1000,46759=>1000,46760=>1000,46761=>1000, -46762=>1000,46763=>1000,46764=>1000,46765=>1000,46766=>1000,46767=>1000,46768=>1000,46769=>1000,46770=>1000,46771=>1000, -46772=>1000,46773=>1000,46774=>1000,46775=>1000,46776=>1000,46777=>1000,46778=>1000,46779=>1000,46780=>1000,46781=>1000, -46782=>1000,46783=>1000,46784=>1000,46785=>1000,46786=>1000,46787=>1000,46788=>1000,46789=>1000,46790=>1000,46791=>1000, -46792=>1000,46793=>1000,46794=>1000,46795=>1000,46796=>1000,46797=>1000,46798=>1000,46799=>1000,46800=>1000,46801=>1000, -46802=>1000,46803=>1000,46804=>1000,46805=>1000,46806=>1000,46807=>1000,46808=>1000,46809=>1000,46810=>1000,46811=>1000, -46812=>1000,46813=>1000,46814=>1000,46815=>1000,46816=>1000,46817=>1000,46818=>1000,46819=>1000,46820=>1000,46821=>1000, -46822=>1000,46823=>1000,46824=>1000,46825=>1000,46826=>1000,46827=>1000,46828=>1000,46829=>1000,46830=>1000,46831=>1000, -46832=>1000,46833=>1000,46834=>1000,46835=>1000,46836=>1000,46837=>1000,46838=>1000,46839=>1000,46840=>1000,46841=>1000, -46842=>1000,46843=>1000,46844=>1000,46845=>1000,46846=>1000,46847=>1000,46848=>1000,46849=>1000,46850=>1000,46851=>1000, -46852=>1000,46853=>1000,46854=>1000,46855=>1000,46856=>1000,46857=>1000,46858=>1000,46859=>1000,46860=>1000,46861=>1000, -46862=>1000,46863=>1000,46864=>1000,46865=>1000,46866=>1000,46867=>1000,46868=>1000,46869=>1000,46870=>1000,46871=>1000, -46872=>1000,46873=>1000,46874=>1000,46875=>1000,46876=>1000,46877=>1000,46878=>1000,46879=>1000,46880=>1000,46881=>1000, -46882=>1000,46883=>1000,46884=>1000,46885=>1000,46886=>1000,46887=>1000,46888=>1000,46889=>1000,46890=>1000,46891=>1000, -46892=>1000,46893=>1000,46894=>1000,46895=>1000,46896=>1000,46897=>1000,46898=>1000,46899=>1000,46900=>1000,46901=>1000, -46902=>1000,46903=>1000,46904=>1000,46905=>1000,46906=>1000,46907=>1000,46908=>1000,46909=>1000,46910=>1000,46911=>1000, -46912=>1000,46913=>1000,46914=>1000,46915=>1000,46916=>1000,46917=>1000,46918=>1000,46919=>1000,46920=>1000,46921=>1000, -46922=>1000,46923=>1000,46924=>1000,46925=>1000,46926=>1000,46927=>1000,46928=>1000,46929=>1000,46930=>1000,46931=>1000, -46932=>1000,46933=>1000,46934=>1000,46935=>1000,46936=>1000,46937=>1000,46938=>1000,46939=>1000,46940=>1000,46941=>1000, -46942=>1000,46943=>1000,46944=>1000,46945=>1000,46946=>1000,46947=>1000,46948=>1000,46949=>1000,46950=>1000,46951=>1000, -46952=>1000,46953=>1000,46954=>1000,46955=>1000,46956=>1000,46957=>1000,46958=>1000,46959=>1000,46960=>1000,46961=>1000, -46962=>1000,46963=>1000,46964=>1000,46965=>1000,46966=>1000,46967=>1000,46968=>1000,46969=>1000,46970=>1000,46971=>1000, -46972=>1000,46973=>1000,46974=>1000,46975=>1000,46976=>1000,46977=>1000,46978=>1000,46979=>1000,46980=>1000,46981=>1000, -46982=>1000,46983=>1000,46984=>1000,46985=>1000,46986=>1000,46987=>1000,46988=>1000,46989=>1000,46990=>1000,46991=>1000, -46992=>1000,46993=>1000,46994=>1000,46995=>1000,46996=>1000,46997=>1000,46998=>1000,46999=>1000,47000=>1000,47001=>1000, -47002=>1000,47003=>1000,47004=>1000,47005=>1000,47006=>1000,47007=>1000,47008=>1000,47009=>1000,47010=>1000,47011=>1000, -47012=>1000,47013=>1000,47014=>1000,47015=>1000,47016=>1000,47017=>1000,47018=>1000,47019=>1000,47020=>1000,47021=>1000, -47022=>1000,47023=>1000,47024=>1000,47025=>1000,47026=>1000,47027=>1000,47028=>1000,47029=>1000,47030=>1000,47031=>1000, -47032=>1000,47033=>1000,47034=>1000,47035=>1000,47036=>1000,47037=>1000,47038=>1000,47039=>1000,47040=>1000,47041=>1000, -47042=>1000,47043=>1000,47044=>1000,47045=>1000,47046=>1000,47047=>1000,47048=>1000,47049=>1000,47050=>1000,47051=>1000, -47052=>1000,47053=>1000,47054=>1000,47055=>1000,47056=>1000,47057=>1000,47058=>1000,47059=>1000,47060=>1000,47061=>1000, -47062=>1000,47063=>1000,47064=>1000,47065=>1000,47066=>1000,47067=>1000,47068=>1000,47069=>1000,47070=>1000,47071=>1000, -47072=>1000,47073=>1000,47074=>1000,47075=>1000,47076=>1000,47077=>1000,47078=>1000,47079=>1000,47080=>1000,47081=>1000, -47082=>1000,47083=>1000,47084=>1000,47085=>1000,47086=>1000,47087=>1000,47088=>1000,47089=>1000,47090=>1000,47091=>1000, -47092=>1000,47093=>1000,47094=>1000,47095=>1000,47096=>1000,47097=>1000,47098=>1000,47099=>1000,47100=>1000,47101=>1000, -47102=>1000,47103=>1000,47104=>1000,47105=>1000,47106=>1000,47107=>1000,47108=>1000,47109=>1000,47110=>1000,47111=>1000, -47112=>1000,47113=>1000,47114=>1000,47115=>1000,47116=>1000,47117=>1000,47118=>1000,47119=>1000,47120=>1000,47121=>1000, -47122=>1000,47123=>1000,47124=>1000,47125=>1000,47126=>1000,47127=>1000,47128=>1000,47129=>1000,47130=>1000,47131=>1000, -47132=>1000,47133=>1000,47134=>1000,47135=>1000,47136=>1000,47137=>1000,47138=>1000,47139=>1000,47140=>1000,47141=>1000, -47142=>1000,47143=>1000,47144=>1000,47145=>1000,47146=>1000,47147=>1000,47148=>1000,47149=>1000,47150=>1000,47151=>1000, -47152=>1000,47153=>1000,47154=>1000,47155=>1000,47156=>1000,47157=>1000,47158=>1000,47159=>1000,47160=>1000,47161=>1000, -47162=>1000,47163=>1000,47164=>1000,47165=>1000,47166=>1000,47167=>1000,47168=>1000,47169=>1000,47170=>1000,47171=>1000, -47172=>1000,47173=>1000,47174=>1000,47175=>1000,47176=>1000,47177=>1000,47178=>1000,47179=>1000,47180=>1000,47181=>1000, -47182=>1000,47183=>1000,47184=>1000,47185=>1000,47186=>1000,47187=>1000,47188=>1000,47189=>1000,47190=>1000,47191=>1000, -47192=>1000,47193=>1000,47194=>1000,47195=>1000,47196=>1000,47197=>1000,47198=>1000,47199=>1000,47200=>1000,47201=>1000, -47202=>1000,47203=>1000,47204=>1000,47205=>1000,47206=>1000,47207=>1000,47208=>1000,47209=>1000,47210=>1000,47211=>1000, -47212=>1000,47213=>1000,47214=>1000,47215=>1000,47216=>1000,47217=>1000,47218=>1000,47219=>1000,47220=>1000,47221=>1000, -47222=>1000,47223=>1000,47224=>1000,47225=>1000,47226=>1000,47227=>1000,47228=>1000,47229=>1000,47230=>1000,47231=>1000, -47232=>1000,47233=>1000,47234=>1000,47235=>1000,47236=>1000,47237=>1000,47238=>1000,47239=>1000,47240=>1000,47241=>1000, -47242=>1000,47243=>1000,47244=>1000,47245=>1000,47246=>1000,47247=>1000,47248=>1000,47249=>1000,47250=>1000,47251=>1000, -47252=>1000,47253=>1000,47254=>1000,47255=>1000,47256=>1000,47257=>1000,47258=>1000,47259=>1000,47260=>1000,47261=>1000, -47262=>1000,47263=>1000,47264=>1000,47265=>1000,47266=>1000,47267=>1000,47268=>1000,47269=>1000,47270=>1000,47271=>1000, -47272=>1000,47273=>1000,47274=>1000,47275=>1000,47276=>1000,47277=>1000,47278=>1000,47279=>1000,47280=>1000,47281=>1000, -47282=>1000,47283=>1000,47284=>1000,47285=>1000,47286=>1000,47287=>1000,47288=>1000,47289=>1000,47290=>1000,47291=>1000, -47292=>1000,47293=>1000,47294=>1000,47295=>1000,47296=>1000,47297=>1000,47298=>1000,47299=>1000,47300=>1000,47301=>1000, -47302=>1000,47303=>1000,47304=>1000,47305=>1000,47306=>1000,47307=>1000,47308=>1000,47309=>1000,47310=>1000,47311=>1000, -47312=>1000,47313=>1000,47314=>1000,47315=>1000,47316=>1000,47317=>1000,47318=>1000,47319=>1000,47320=>1000,47321=>1000, -47322=>1000,47323=>1000,47324=>1000,47325=>1000,47326=>1000,47327=>1000,47328=>1000,47329=>1000,47330=>1000,47331=>1000, -47332=>1000,47333=>1000,47334=>1000,47335=>1000,47336=>1000,47337=>1000,47338=>1000,47339=>1000,47340=>1000,47341=>1000, -47342=>1000,47343=>1000,47344=>1000,47345=>1000,47346=>1000,47347=>1000,47348=>1000,47349=>1000,47350=>1000,47351=>1000, -47352=>1000,47353=>1000,47354=>1000,47355=>1000,47356=>1000,47357=>1000,47358=>1000,47359=>1000,47360=>1000,47361=>1000, -47362=>1000,47363=>1000,47364=>1000,47365=>1000,47366=>1000,47367=>1000,47368=>1000,47369=>1000,47370=>1000,47371=>1000, -47372=>1000,47373=>1000,47374=>1000,47375=>1000,47376=>1000,47377=>1000,47378=>1000,47379=>1000,47380=>1000,47381=>1000, -47382=>1000,47383=>1000,47384=>1000,47385=>1000,47386=>1000,47387=>1000,47388=>1000,47389=>1000,47390=>1000,47391=>1000, -47392=>1000,47393=>1000,47394=>1000,47395=>1000,47396=>1000,47397=>1000,47398=>1000,47399=>1000,47400=>1000,47401=>1000, -47402=>1000,47403=>1000,47404=>1000,47405=>1000,47406=>1000,47407=>1000,47408=>1000,47409=>1000,47410=>1000,47411=>1000, -47412=>1000,47413=>1000,47414=>1000,47415=>1000,47416=>1000,47417=>1000,47418=>1000,47419=>1000,47420=>1000,47421=>1000, -47422=>1000,47423=>1000,47424=>1000,47425=>1000,47426=>1000,47427=>1000,47428=>1000,47429=>1000,47430=>1000,47431=>1000, -47432=>1000,47433=>1000,47434=>1000,47435=>1000,47436=>1000,47437=>1000,47438=>1000,47439=>1000,47440=>1000,47441=>1000, -47442=>1000,47443=>1000,47444=>1000,47445=>1000,47446=>1000,47447=>1000,47448=>1000,47449=>1000,47450=>1000,47451=>1000, -47452=>1000,47453=>1000,47454=>1000,47455=>1000,47456=>1000,47457=>1000,47458=>1000,47459=>1000,47460=>1000,47461=>1000, -47462=>1000,47463=>1000,47464=>1000,47465=>1000,47466=>1000,47467=>1000,47468=>1000,47469=>1000,47470=>1000,47471=>1000, -47472=>1000,47473=>1000,47474=>1000,47475=>1000,47476=>1000,47477=>1000,47478=>1000,47479=>1000,47480=>1000,47481=>1000, -47482=>1000,47483=>1000,47484=>1000,47485=>1000,47486=>1000,47487=>1000,47488=>1000,47489=>1000,47490=>1000,47491=>1000, -47492=>1000,47493=>1000,47494=>1000,47495=>1000,47496=>1000,47497=>1000,47498=>1000,47499=>1000,47500=>1000,47501=>1000, -47502=>1000,47503=>1000,47504=>1000,47505=>1000,47506=>1000,47507=>1000,47508=>1000,47509=>1000,47510=>1000,47511=>1000, -47512=>1000,47513=>1000,47514=>1000,47515=>1000,47516=>1000,47517=>1000,47518=>1000,47519=>1000,47520=>1000,47521=>1000, -47522=>1000,47523=>1000,47524=>1000,47525=>1000,47526=>1000,47527=>1000,47528=>1000,47529=>1000,47530=>1000,47531=>1000, -47532=>1000,47533=>1000,47534=>1000,47535=>1000,47536=>1000,47537=>1000,47538=>1000,47539=>1000,47540=>1000,47541=>1000, -47542=>1000,47543=>1000,47544=>1000,47545=>1000,47546=>1000,47547=>1000,47548=>1000,47549=>1000,47550=>1000,47551=>1000, -47552=>1000,47553=>1000,47554=>1000,47555=>1000,47556=>1000,47557=>1000,47558=>1000,47559=>1000,47560=>1000,47561=>1000, -47562=>1000,47563=>1000,47564=>1000,47565=>1000,47566=>1000,47567=>1000,47568=>1000,47569=>1000,47570=>1000,47571=>1000, -47572=>1000,47573=>1000,47574=>1000,47575=>1000,47576=>1000,47577=>1000,47578=>1000,47579=>1000,47580=>1000,47581=>1000, -47582=>1000,47583=>1000,47584=>1000,47585=>1000,47586=>1000,47587=>1000,47588=>1000,47589=>1000,47590=>1000,47591=>1000, -47592=>1000,47593=>1000,47594=>1000,47595=>1000,47596=>1000,47597=>1000,47598=>1000,47599=>1000,47600=>1000,47601=>1000, -47602=>1000,47603=>1000,47604=>1000,47605=>1000,47606=>1000,47607=>1000,47608=>1000,47609=>1000,47610=>1000,47611=>1000, -47612=>1000,47613=>1000,47614=>1000,47615=>1000,47616=>1000,47617=>1000,47618=>1000,47619=>1000,47620=>1000,47621=>1000, -47622=>1000,47623=>1000,47624=>1000,47625=>1000,47626=>1000,47627=>1000,47628=>1000,47629=>1000,47630=>1000,47631=>1000, -47632=>1000,47633=>1000,47634=>1000,47635=>1000,47636=>1000,47637=>1000,47638=>1000,47639=>1000,47640=>1000,47641=>1000, -47642=>1000,47643=>1000,47644=>1000,47645=>1000,47646=>1000,47647=>1000,47648=>1000,47649=>1000,47650=>1000,47651=>1000, -47652=>1000,47653=>1000,47654=>1000,47655=>1000,47656=>1000,47657=>1000,47658=>1000,47659=>1000,47660=>1000,47661=>1000, -47662=>1000,47663=>1000,47664=>1000,47665=>1000,47666=>1000,47667=>1000,47668=>1000,47669=>1000,47670=>1000,47671=>1000, -47672=>1000,47673=>1000,47674=>1000,47675=>1000,47676=>1000,47677=>1000,47678=>1000,47679=>1000,47680=>1000,47681=>1000, -47682=>1000,47683=>1000,47684=>1000,47685=>1000,47686=>1000,47687=>1000,47688=>1000,47689=>1000,47690=>1000,47691=>1000, -47692=>1000,47693=>1000,47694=>1000,47695=>1000,47696=>1000,47697=>1000,47698=>1000,47699=>1000,47700=>1000,47701=>1000, -47702=>1000,47703=>1000,47704=>1000,47705=>1000,47706=>1000,47707=>1000,47708=>1000,47709=>1000,47710=>1000,47711=>1000, -47712=>1000,47713=>1000,47714=>1000,47715=>1000,47716=>1000,47717=>1000,47718=>1000,47719=>1000,47720=>1000,47721=>1000, -47722=>1000,47723=>1000,47724=>1000,47725=>1000,47726=>1000,47727=>1000,47728=>1000,47729=>1000,47730=>1000,47731=>1000, -47732=>1000,47733=>1000,47734=>1000,47735=>1000,47736=>1000,47737=>1000,47738=>1000,47739=>1000,47740=>1000,47741=>1000, -47742=>1000,47743=>1000,47744=>1000,47745=>1000,47746=>1000,47747=>1000,47748=>1000,47749=>1000,47750=>1000,47751=>1000, -47752=>1000,47753=>1000,47754=>1000,47755=>1000,47756=>1000,47757=>1000,47758=>1000,47759=>1000,47760=>1000,47761=>1000, -47762=>1000,47763=>1000,47764=>1000,47765=>1000,47766=>1000,47767=>1000,47768=>1000,47769=>1000,47770=>1000,47771=>1000, -47772=>1000,47773=>1000,47774=>1000,47775=>1000,47776=>1000,47777=>1000,47778=>1000,47779=>1000,47780=>1000,47781=>1000, -47782=>1000,47783=>1000,47784=>1000,47785=>1000,47786=>1000,47787=>1000,47788=>1000,47789=>1000,47790=>1000,47791=>1000, -47792=>1000,47793=>1000,47794=>1000,47795=>1000,47796=>1000,47797=>1000,47798=>1000,47799=>1000,47800=>1000,47801=>1000, -47802=>1000,47803=>1000,47804=>1000,47805=>1000,47806=>1000,47807=>1000,47808=>1000,47809=>1000,47810=>1000,47811=>1000, -47812=>1000,47813=>1000,47814=>1000,47815=>1000,47816=>1000,47817=>1000,47818=>1000,47819=>1000,47820=>1000,47821=>1000, -47822=>1000,47823=>1000,47824=>1000,47825=>1000,47826=>1000,47827=>1000,47828=>1000,47829=>1000,47830=>1000,47831=>1000, -47832=>1000,47833=>1000,47834=>1000,47835=>1000,47836=>1000,47837=>1000,47838=>1000,47839=>1000,47840=>1000,47841=>1000, -47842=>1000,47843=>1000,47844=>1000,47845=>1000,47846=>1000,47847=>1000,47848=>1000,47849=>1000,47850=>1000,47851=>1000, -47852=>1000,47853=>1000,47854=>1000,47855=>1000,47856=>1000,47857=>1000,47858=>1000,47859=>1000,47860=>1000,47861=>1000, -47862=>1000,47863=>1000,47864=>1000,47865=>1000,47866=>1000,47867=>1000,47868=>1000,47869=>1000,47870=>1000,47871=>1000, -47872=>1000,47873=>1000,47874=>1000,47875=>1000,47876=>1000,47877=>1000,47878=>1000,47879=>1000,47880=>1000,47881=>1000, -47882=>1000,47883=>1000,47884=>1000,47885=>1000,47886=>1000,47887=>1000,47888=>1000,47889=>1000,47890=>1000,47891=>1000, -47892=>1000,47893=>1000,47894=>1000,47895=>1000,47896=>1000,47897=>1000,47898=>1000,47899=>1000,47900=>1000,47901=>1000, -47902=>1000,47903=>1000,47904=>1000,47905=>1000,47906=>1000,47907=>1000,47908=>1000,47909=>1000,47910=>1000,47911=>1000, -47912=>1000,47913=>1000,47914=>1000,47915=>1000,47916=>1000,47917=>1000,47918=>1000,47919=>1000,47920=>1000,47921=>1000, -47922=>1000,47923=>1000,47924=>1000,47925=>1000,47926=>1000,47927=>1000,47928=>1000,47929=>1000,47930=>1000,47931=>1000, -47932=>1000,47933=>1000,47934=>1000,47935=>1000,47936=>1000,47937=>1000,47938=>1000,47939=>1000,47940=>1000,47941=>1000, -47942=>1000,47943=>1000,47944=>1000,47945=>1000,47946=>1000,47947=>1000,47948=>1000,47949=>1000,47950=>1000,47951=>1000, -47952=>1000,47953=>1000,47954=>1000,47955=>1000,47956=>1000,47957=>1000,47958=>1000,47959=>1000,47960=>1000,47961=>1000, -47962=>1000,47963=>1000,47964=>1000,47965=>1000,47966=>1000,47967=>1000,47968=>1000,47969=>1000,47970=>1000,47971=>1000, -47972=>1000,47973=>1000,47974=>1000,47975=>1000,47976=>1000,47977=>1000,47978=>1000,47979=>1000,47980=>1000,47981=>1000, -47982=>1000,47983=>1000,47984=>1000,47985=>1000,47986=>1000,47987=>1000,47988=>1000,47989=>1000,47990=>1000,47991=>1000, -47992=>1000,47993=>1000,47994=>1000,47995=>1000,47996=>1000,47997=>1000,47998=>1000,47999=>1000,48000=>1000,48001=>1000, -48002=>1000,48003=>1000,48004=>1000,48005=>1000,48006=>1000,48007=>1000,48008=>1000,48009=>1000,48010=>1000,48011=>1000, -48012=>1000,48013=>1000,48014=>1000,48015=>1000,48016=>1000,48017=>1000,48018=>1000,48019=>1000,48020=>1000,48021=>1000, -48022=>1000,48023=>1000,48024=>1000,48025=>1000,48026=>1000,48027=>1000,48028=>1000,48029=>1000,48030=>1000,48031=>1000, -48032=>1000,48033=>1000,48034=>1000,48035=>1000,48036=>1000,48037=>1000,48038=>1000,48039=>1000,48040=>1000,48041=>1000, -48042=>1000,48043=>1000,48044=>1000,48045=>1000,48046=>1000,48047=>1000,48048=>1000,48049=>1000,48050=>1000,48051=>1000, -48052=>1000,48053=>1000,48054=>1000,48055=>1000,48056=>1000,48057=>1000,48058=>1000,48059=>1000,48060=>1000,48061=>1000, -48062=>1000,48063=>1000,48064=>1000,48065=>1000,48066=>1000,48067=>1000,48068=>1000,48069=>1000,48070=>1000,48071=>1000, -48072=>1000,48073=>1000,48074=>1000,48075=>1000,48076=>1000,48077=>1000,48078=>1000,48079=>1000,48080=>1000,48081=>1000, -48082=>1000,48083=>1000,48084=>1000,48085=>1000,48086=>1000,48087=>1000,48088=>1000,48089=>1000,48090=>1000,48091=>1000, -48092=>1000,48093=>1000,48094=>1000,48095=>1000,48096=>1000,48097=>1000,48098=>1000,48099=>1000,48100=>1000,48101=>1000, -48102=>1000,48103=>1000,48104=>1000,48105=>1000,48106=>1000,48107=>1000,48108=>1000,48109=>1000,48110=>1000,48111=>1000, -48112=>1000,48113=>1000,48114=>1000,48115=>1000,48116=>1000,48117=>1000,48118=>1000,48119=>1000,48120=>1000,48121=>1000, -48122=>1000,48123=>1000,48124=>1000,48125=>1000,48126=>1000,48127=>1000,48128=>1000,48129=>1000,48130=>1000,48131=>1000, -48132=>1000,48133=>1000,48134=>1000,48135=>1000,48136=>1000,48137=>1000,48138=>1000,48139=>1000,48140=>1000,48141=>1000, -48142=>1000,48143=>1000,48144=>1000,48145=>1000,48146=>1000,48147=>1000,48148=>1000,48149=>1000,48150=>1000,48151=>1000, -48152=>1000,48153=>1000,48154=>1000,48155=>1000,48156=>1000,48157=>1000,48158=>1000,48159=>1000,48160=>1000,48161=>1000, -48162=>1000,48163=>1000,48164=>1000,48165=>1000,48166=>1000,48167=>1000,48168=>1000,48169=>1000,48170=>1000,48171=>1000, -48172=>1000,48173=>1000,48174=>1000,48175=>1000,48176=>1000,48177=>1000,48178=>1000,48179=>1000,48180=>1000,48181=>1000, -48182=>1000,48183=>1000,48184=>1000,48185=>1000,48186=>1000,48187=>1000,48188=>1000,48189=>1000,48190=>1000,48191=>1000, -48192=>1000,48193=>1000,48194=>1000,48195=>1000,48196=>1000,48197=>1000,48198=>1000,48199=>1000,48200=>1000,48201=>1000, -48202=>1000,48203=>1000,48204=>1000,48205=>1000,48206=>1000,48207=>1000,48208=>1000,48209=>1000,48210=>1000,48211=>1000, -48212=>1000,48213=>1000,48214=>1000,48215=>1000,48216=>1000,48217=>1000,48218=>1000,48219=>1000,48220=>1000,48221=>1000, -48222=>1000,48223=>1000,48224=>1000,48225=>1000,48226=>1000,48227=>1000,48228=>1000,48229=>1000,48230=>1000,48231=>1000, -48232=>1000,48233=>1000,48234=>1000,48235=>1000,48236=>1000,48237=>1000,48238=>1000,48239=>1000,48240=>1000,48241=>1000, -48242=>1000,48243=>1000,48244=>1000,48245=>1000,48246=>1000,48247=>1000,48248=>1000,48249=>1000,48250=>1000,48251=>1000, -48252=>1000,48253=>1000,48254=>1000,48255=>1000,48256=>1000,48257=>1000,48258=>1000,48259=>1000,48260=>1000,48261=>1000, -48262=>1000,48263=>1000,48264=>1000,48265=>1000,48266=>1000,48267=>1000,48268=>1000,48269=>1000,48270=>1000,48271=>1000, -48272=>1000,48273=>1000,48274=>1000,48275=>1000,48276=>1000,48277=>1000,48278=>1000,48279=>1000,48280=>1000,48281=>1000, -48282=>1000,48283=>1000,48284=>1000,48285=>1000,48286=>1000,48287=>1000,48288=>1000,48289=>1000,48290=>1000,48291=>1000, -48292=>1000,48293=>1000,48294=>1000,48295=>1000,48296=>1000,48297=>1000,48298=>1000,48299=>1000,48300=>1000,48301=>1000, -48302=>1000,48303=>1000,48304=>1000,48305=>1000,48306=>1000,48307=>1000,48308=>1000,48309=>1000,48310=>1000,48311=>1000, -48312=>1000,48313=>1000,48314=>1000,48315=>1000,48316=>1000,48317=>1000,48318=>1000,48319=>1000,48320=>1000,48321=>1000, -48322=>1000,48323=>1000,48324=>1000,48325=>1000,48326=>1000,48327=>1000,48328=>1000,48329=>1000,48330=>1000,48331=>1000, -48332=>1000,48333=>1000,48334=>1000,48335=>1000,48336=>1000,48337=>1000,48338=>1000,48339=>1000,48340=>1000,48341=>1000, -48342=>1000,48343=>1000,48344=>1000,48345=>1000,48346=>1000,48347=>1000,48348=>1000,48349=>1000,48350=>1000,48351=>1000, -48352=>1000,48353=>1000,48354=>1000,48355=>1000,48356=>1000,48357=>1000,48358=>1000,48359=>1000,48360=>1000,48361=>1000, -48362=>1000,48363=>1000,48364=>1000,48365=>1000,48366=>1000,48367=>1000,48368=>1000,48369=>1000,48370=>1000,48371=>1000, -48372=>1000,48373=>1000,48374=>1000,48375=>1000,48376=>1000,48377=>1000,48378=>1000,48379=>1000,48380=>1000,48381=>1000, -48382=>1000,48383=>1000,48384=>1000,48385=>1000,48386=>1000,48387=>1000,48388=>1000,48389=>1000,48390=>1000,48391=>1000, -48392=>1000,48393=>1000,48394=>1000,48395=>1000,48396=>1000,48397=>1000,48398=>1000,48399=>1000,48400=>1000,48401=>1000, -48402=>1000,48403=>1000,48404=>1000,48405=>1000,48406=>1000,48407=>1000,48408=>1000,48409=>1000,48410=>1000,48411=>1000, -48412=>1000,48413=>1000,48414=>1000,48415=>1000,48416=>1000,48417=>1000,48418=>1000,48419=>1000,48420=>1000,48421=>1000, -48422=>1000,48423=>1000,48424=>1000,48425=>1000,48426=>1000,48427=>1000,48428=>1000,48429=>1000,48430=>1000,48431=>1000, -48432=>1000,48433=>1000,48434=>1000,48435=>1000,48436=>1000,48437=>1000,48438=>1000,48439=>1000,48440=>1000,48441=>1000, -48442=>1000,48443=>1000,48444=>1000,48445=>1000,48446=>1000,48447=>1000,48448=>1000,48449=>1000,48450=>1000,48451=>1000, -48452=>1000,48453=>1000,48454=>1000,48455=>1000,48456=>1000,48457=>1000,48458=>1000,48459=>1000,48460=>1000,48461=>1000, -48462=>1000,48463=>1000,48464=>1000,48465=>1000,48466=>1000,48467=>1000,48468=>1000,48469=>1000,48470=>1000,48471=>1000, -48472=>1000,48473=>1000,48474=>1000,48475=>1000,48476=>1000,48477=>1000,48478=>1000,48479=>1000,48480=>1000,48481=>1000, -48482=>1000,48483=>1000,48484=>1000,48485=>1000,48486=>1000,48487=>1000,48488=>1000,48489=>1000,48490=>1000,48491=>1000, -48492=>1000,48493=>1000,48494=>1000,48495=>1000,48496=>1000,48497=>1000,48498=>1000,48499=>1000,48500=>1000,48501=>1000, -48502=>1000,48503=>1000,48504=>1000,48505=>1000,48506=>1000,48507=>1000,48508=>1000,48509=>1000,48510=>1000,48511=>1000, -48512=>1000,48513=>1000,48514=>1000,48515=>1000,48516=>1000,48517=>1000,48518=>1000,48519=>1000,48520=>1000,48521=>1000, -48522=>1000,48523=>1000,48524=>1000,48525=>1000,48526=>1000,48527=>1000,48528=>1000,48529=>1000,48530=>1000,48531=>1000, -48532=>1000,48533=>1000,48534=>1000,48535=>1000,48536=>1000,48537=>1000,48538=>1000,48539=>1000,48540=>1000,48541=>1000, -48542=>1000,48543=>1000,48544=>1000,48545=>1000,48546=>1000,48547=>1000,48548=>1000,48549=>1000,48550=>1000,48551=>1000, -48552=>1000,48553=>1000,48554=>1000,48555=>1000,48556=>1000,48557=>1000,48558=>1000,48559=>1000,48560=>1000,48561=>1000, -48562=>1000,48563=>1000,48564=>1000,48565=>1000,48566=>1000,48567=>1000,48568=>1000,48569=>1000,48570=>1000,48571=>1000, -48572=>1000,48573=>1000,48574=>1000,48575=>1000,48576=>1000,48577=>1000,48578=>1000,48579=>1000,48580=>1000,48581=>1000, -48582=>1000,48583=>1000,48584=>1000,48585=>1000,48586=>1000,48587=>1000,48588=>1000,48589=>1000,48590=>1000,48591=>1000, -48592=>1000,48593=>1000,48594=>1000,48595=>1000,48596=>1000,48597=>1000,48598=>1000,48599=>1000,48600=>1000,48601=>1000, -48602=>1000,48603=>1000,48604=>1000,48605=>1000,48606=>1000,48607=>1000,48608=>1000,48609=>1000,48610=>1000,48611=>1000, -48612=>1000,48613=>1000,48614=>1000,48615=>1000,48616=>1000,48617=>1000,48618=>1000,48619=>1000,48620=>1000,48621=>1000, -48622=>1000,48623=>1000,48624=>1000,48625=>1000,48626=>1000,48627=>1000,48628=>1000,48629=>1000,48630=>1000,48631=>1000, -48632=>1000,48633=>1000,48634=>1000,48635=>1000,48636=>1000,48637=>1000,48638=>1000,48639=>1000,48640=>1000,48641=>1000, -48642=>1000,48643=>1000,48644=>1000,48645=>1000,48646=>1000,48647=>1000,48648=>1000,48649=>1000,48650=>1000,48651=>1000, -48652=>1000,48653=>1000,48654=>1000,48655=>1000,48656=>1000,48657=>1000,48658=>1000,48659=>1000,48660=>1000,48661=>1000, -48662=>1000,48663=>1000,48664=>1000,48665=>1000,48666=>1000,48667=>1000,48668=>1000,48669=>1000,48670=>1000,48671=>1000, -48672=>1000,48673=>1000,48674=>1000,48675=>1000,48676=>1000,48677=>1000,48678=>1000,48679=>1000,48680=>1000,48681=>1000, -48682=>1000,48683=>1000,48684=>1000,48685=>1000,48686=>1000,48687=>1000,48688=>1000,48689=>1000,48690=>1000,48691=>1000, -48692=>1000,48693=>1000,48694=>1000,48695=>1000,48696=>1000,48697=>1000,48698=>1000,48699=>1000,48700=>1000,48701=>1000, -48702=>1000,48703=>1000,48704=>1000,48705=>1000,48706=>1000,48707=>1000,48708=>1000,48709=>1000,48710=>1000,48711=>1000, -48712=>1000,48713=>1000,48714=>1000,48715=>1000,48716=>1000,48717=>1000,48718=>1000,48719=>1000,48720=>1000,48721=>1000, -48722=>1000,48723=>1000,48724=>1000,48725=>1000,48726=>1000,48727=>1000,48728=>1000,48729=>1000,48730=>1000,48731=>1000, -48732=>1000,48733=>1000,48734=>1000,48735=>1000,48736=>1000,48737=>1000,48738=>1000,48739=>1000,48740=>1000,48741=>1000, -48742=>1000,48743=>1000,48744=>1000,48745=>1000,48746=>1000,48747=>1000,48748=>1000,48749=>1000,48750=>1000,48751=>1000, -48752=>1000,48753=>1000,48754=>1000,48755=>1000,48756=>1000,48757=>1000,48758=>1000,48759=>1000,48760=>1000,48761=>1000, -48762=>1000,48763=>1000,48764=>1000,48765=>1000,48766=>1000,48767=>1000,48768=>1000,48769=>1000,48770=>1000,48771=>1000, -48772=>1000,48773=>1000,48774=>1000,48775=>1000,48776=>1000,48777=>1000,48778=>1000,48779=>1000,48780=>1000,48781=>1000, -48782=>1000,48783=>1000,48784=>1000,48785=>1000,48786=>1000,48787=>1000,48788=>1000,48789=>1000,48790=>1000,48791=>1000, -48792=>1000,48793=>1000,48794=>1000,48795=>1000,48796=>1000,48797=>1000,48798=>1000,48799=>1000,48800=>1000,48801=>1000, -48802=>1000,48803=>1000,48804=>1000,48805=>1000,48806=>1000,48807=>1000,48808=>1000,48809=>1000,48810=>1000,48811=>1000, -48812=>1000,48813=>1000,48814=>1000,48815=>1000,48816=>1000,48817=>1000,48818=>1000,48819=>1000,48820=>1000,48821=>1000, -48822=>1000,48823=>1000,48824=>1000,48825=>1000,48826=>1000,48827=>1000,48828=>1000,48829=>1000,48830=>1000,48831=>1000, -48832=>1000,48833=>1000,48834=>1000,48835=>1000,48836=>1000,48837=>1000,48838=>1000,48839=>1000,48840=>1000,48841=>1000, -48842=>1000,48843=>1000,48844=>1000,48845=>1000,48846=>1000,48847=>1000,48848=>1000,48849=>1000,48850=>1000,48851=>1000, -48852=>1000,48853=>1000,48854=>1000,48855=>1000,48856=>1000,48857=>1000,48858=>1000,48859=>1000,48860=>1000,48861=>1000, -48862=>1000,48863=>1000,48864=>1000,48865=>1000,48866=>1000,48867=>1000,48868=>1000,48869=>1000,48870=>1000,48871=>1000, -48872=>1000,48873=>1000,48874=>1000,48875=>1000,48876=>1000,48877=>1000,48878=>1000,48879=>1000,48880=>1000,48881=>1000, -48882=>1000,48883=>1000,48884=>1000,48885=>1000,48886=>1000,48887=>1000,48888=>1000,48889=>1000,48890=>1000,48891=>1000, -48892=>1000,48893=>1000,48894=>1000,48895=>1000,48896=>1000,48897=>1000,48898=>1000,48899=>1000,48900=>1000,48901=>1000, -48902=>1000,48903=>1000,48904=>1000,48905=>1000,48906=>1000,48907=>1000,48908=>1000,48909=>1000,48910=>1000,48911=>1000, -48912=>1000,48913=>1000,48914=>1000,48915=>1000,48916=>1000,48917=>1000,48918=>1000,48919=>1000,48920=>1000,48921=>1000, -48922=>1000,48923=>1000,48924=>1000,48925=>1000,48926=>1000,48927=>1000,48928=>1000,48929=>1000,48930=>1000,48931=>1000, -48932=>1000,48933=>1000,48934=>1000,48935=>1000,48936=>1000,48937=>1000,48938=>1000,48939=>1000,48940=>1000,48941=>1000, -48942=>1000,48943=>1000,48944=>1000,48945=>1000,48946=>1000,48947=>1000,48948=>1000,48949=>1000,48950=>1000,48951=>1000, -48952=>1000,48953=>1000,48954=>1000,48955=>1000,48956=>1000,48957=>1000,48958=>1000,48959=>1000,48960=>1000,48961=>1000, -48962=>1000,48963=>1000,48964=>1000,48965=>1000,48966=>1000,48967=>1000,48968=>1000,48969=>1000,48970=>1000,48971=>1000, -48972=>1000,48973=>1000,48974=>1000,48975=>1000,48976=>1000,48977=>1000,48978=>1000,48979=>1000,48980=>1000,48981=>1000, -48982=>1000,48983=>1000,48984=>1000,48985=>1000,48986=>1000,48987=>1000,48988=>1000,48989=>1000,48990=>1000,48991=>1000, -48992=>1000,48993=>1000,48994=>1000,48995=>1000,48996=>1000,48997=>1000,48998=>1000,48999=>1000,49000=>1000,49001=>1000, -49002=>1000,49003=>1000,49004=>1000,49005=>1000,49006=>1000,49007=>1000,49008=>1000,49009=>1000,49010=>1000,49011=>1000, -49012=>1000,49013=>1000,49014=>1000,49015=>1000,49016=>1000,49017=>1000,49018=>1000,49019=>1000,49020=>1000,49021=>1000, -49022=>1000,49023=>1000,49024=>1000,49025=>1000,49026=>1000,49027=>1000,49028=>1000,49029=>1000,49030=>1000,49031=>1000, -49032=>1000,49033=>1000,49034=>1000,49035=>1000,49036=>1000,49037=>1000,49038=>1000,49039=>1000,49040=>1000,49041=>1000, -49042=>1000,49043=>1000,49044=>1000,49045=>1000,49046=>1000,49047=>1000,49048=>1000,49049=>1000,49050=>1000,49051=>1000, -49052=>1000,49053=>1000,49054=>1000,49055=>1000,49056=>1000,49057=>1000,49058=>1000,49059=>1000,49060=>1000,49061=>1000, -49062=>1000,49063=>1000,49064=>1000,49065=>1000,49066=>1000,49067=>1000,49068=>1000,49069=>1000,49070=>1000,49071=>1000, -49072=>1000,49073=>1000,49074=>1000,49075=>1000,49076=>1000,49077=>1000,49078=>1000,49079=>1000,49080=>1000,49081=>1000, -49082=>1000,49083=>1000,49084=>1000,49085=>1000,49086=>1000,49087=>1000,49088=>1000,49089=>1000,49090=>1000,49091=>1000, -49092=>1000,49093=>1000,49094=>1000,49095=>1000,49096=>1000,49097=>1000,49098=>1000,49099=>1000,49100=>1000,49101=>1000, -49102=>1000,49103=>1000,49104=>1000,49105=>1000,49106=>1000,49107=>1000,49108=>1000,49109=>1000,49110=>1000,49111=>1000, -49112=>1000,49113=>1000,49114=>1000,49115=>1000,49116=>1000,49117=>1000,49118=>1000,49119=>1000,49120=>1000,49121=>1000, -49122=>1000,49123=>1000,49124=>1000,49125=>1000,49126=>1000,49127=>1000,49128=>1000,49129=>1000,49130=>1000,49131=>1000, -49132=>1000,49133=>1000,49134=>1000,49135=>1000,49136=>1000,49137=>1000,49138=>1000,49139=>1000,49140=>1000,49141=>1000, -49142=>1000,49143=>1000,49144=>1000,49145=>1000,49146=>1000,49147=>1000,49148=>1000,49149=>1000,49150=>1000,49151=>1000, -49152=>1000,49153=>1000,49154=>1000,49155=>1000,49156=>1000,49157=>1000,49158=>1000,49159=>1000,49160=>1000,49161=>1000, -49162=>1000,49163=>1000,49164=>1000,49165=>1000,49166=>1000,49167=>1000,49168=>1000,49169=>1000,49170=>1000,49171=>1000, -49172=>1000,49173=>1000,49174=>1000,49175=>1000,49176=>1000,49177=>1000,49178=>1000,49179=>1000,49180=>1000,49181=>1000, -49182=>1000,49183=>1000,49184=>1000,49185=>1000,49186=>1000,49187=>1000,49188=>1000,49189=>1000,49190=>1000,49191=>1000, -49192=>1000,49193=>1000,49194=>1000,49195=>1000,49196=>1000,49197=>1000,49198=>1000,49199=>1000,49200=>1000,49201=>1000, -49202=>1000,49203=>1000,49204=>1000,49205=>1000,49206=>1000,49207=>1000,49208=>1000,49209=>1000,49210=>1000,49211=>1000, -49212=>1000,49213=>1000,49214=>1000,49215=>1000,49216=>1000,49217=>1000,49218=>1000,49219=>1000,49220=>1000,49221=>1000, -49222=>1000,49223=>1000,49224=>1000,49225=>1000,49226=>1000,49227=>1000,49228=>1000,49229=>1000,49230=>1000,49231=>1000, -49232=>1000,49233=>1000,49234=>1000,49235=>1000,49236=>1000,49237=>1000,49238=>1000,49239=>1000,49240=>1000,49241=>1000, -49242=>1000,49243=>1000,49244=>1000,49245=>1000,49246=>1000,49247=>1000,49248=>1000,49249=>1000,49250=>1000,49251=>1000, -49252=>1000,49253=>1000,49254=>1000,49255=>1000,49256=>1000,49257=>1000,49258=>1000,49259=>1000,49260=>1000,49261=>1000, -49262=>1000,49263=>1000,49264=>1000,49265=>1000,49266=>1000,49267=>1000,49268=>1000,49269=>1000,49270=>1000,49271=>1000, -49272=>1000,49273=>1000,49274=>1000,49275=>1000,49276=>1000,49277=>1000,49278=>1000,49279=>1000,49280=>1000,49281=>1000, -49282=>1000,49283=>1000,49284=>1000,49285=>1000,49286=>1000,49287=>1000,49288=>1000,49289=>1000,49290=>1000,49291=>1000, -49292=>1000,49293=>1000,49294=>1000,49295=>1000,49296=>1000,49297=>1000,49298=>1000,49299=>1000,49300=>1000,49301=>1000, -49302=>1000,49303=>1000,49304=>1000,49305=>1000,49306=>1000,49307=>1000,49308=>1000,49309=>1000,49310=>1000,49311=>1000, -49312=>1000,49313=>1000,49314=>1000,49315=>1000,49316=>1000,49317=>1000,49318=>1000,49319=>1000,49320=>1000,49321=>1000, -49322=>1000,49323=>1000,49324=>1000,49325=>1000,49326=>1000,49327=>1000,49328=>1000,49329=>1000,49330=>1000,49331=>1000, -49332=>1000,49333=>1000,49334=>1000,49335=>1000,49336=>1000,49337=>1000,49338=>1000,49339=>1000,49340=>1000,49341=>1000, -49342=>1000,49343=>1000,49344=>1000,49345=>1000,49346=>1000,49347=>1000,49348=>1000,49349=>1000,49350=>1000,49351=>1000, -49352=>1000,49353=>1000,49354=>1000,49355=>1000,49356=>1000,49357=>1000,49358=>1000,49359=>1000,49360=>1000,49361=>1000, -49362=>1000,49363=>1000,49364=>1000,49365=>1000,49366=>1000,49367=>1000,49368=>1000,49369=>1000,49370=>1000,49371=>1000, -49372=>1000,49373=>1000,49374=>1000,49375=>1000,49376=>1000,49377=>1000,49378=>1000,49379=>1000,49380=>1000,49381=>1000, -49382=>1000,49383=>1000,49384=>1000,49385=>1000,49386=>1000,49387=>1000,49388=>1000,49389=>1000,49390=>1000,49391=>1000, -49392=>1000,49393=>1000,49394=>1000,49395=>1000,49396=>1000,49397=>1000,49398=>1000,49399=>1000,49400=>1000,49401=>1000, -49402=>1000,49403=>1000,49404=>1000,49405=>1000,49406=>1000,49407=>1000,49408=>1000,49409=>1000,49410=>1000,49411=>1000, -49412=>1000,49413=>1000,49414=>1000,49415=>1000,49416=>1000,49417=>1000,49418=>1000,49419=>1000,49420=>1000,49421=>1000, -49422=>1000,49423=>1000,49424=>1000,49425=>1000,49426=>1000,49427=>1000,49428=>1000,49429=>1000,49430=>1000,49431=>1000, -49432=>1000,49433=>1000,49434=>1000,49435=>1000,49436=>1000,49437=>1000,49438=>1000,49439=>1000,49440=>1000,49441=>1000, -49442=>1000,49443=>1000,49444=>1000,49445=>1000,49446=>1000,49447=>1000,49448=>1000,49449=>1000,49450=>1000,49451=>1000, -49452=>1000,49453=>1000,49454=>1000,49455=>1000,49456=>1000,49457=>1000,49458=>1000,49459=>1000,49460=>1000,49461=>1000, -49462=>1000,49463=>1000,49464=>1000,49465=>1000,49466=>1000,49467=>1000,49468=>1000,49469=>1000,49470=>1000,49471=>1000, -49472=>1000,49473=>1000,49474=>1000,49475=>1000,49476=>1000,49477=>1000,49478=>1000,49479=>1000,49480=>1000,49481=>1000, -49482=>1000,49483=>1000,49484=>1000,49485=>1000,49486=>1000,49487=>1000,49488=>1000,49489=>1000,49490=>1000,49491=>1000, -49492=>1000,49493=>1000,49494=>1000,49495=>1000,49496=>1000,49497=>1000,49498=>1000,49499=>1000,49500=>1000,49501=>1000, -49502=>1000,49503=>1000,49504=>1000,49505=>1000,49506=>1000,49507=>1000,49508=>1000,49509=>1000,49510=>1000,49511=>1000, -49512=>1000,49513=>1000,49514=>1000,49515=>1000,49516=>1000,49517=>1000,49518=>1000,49519=>1000,49520=>1000,49521=>1000, -49522=>1000,49523=>1000,49524=>1000,49525=>1000,49526=>1000,49527=>1000,49528=>1000,49529=>1000,49530=>1000,49531=>1000, -49532=>1000,49533=>1000,49534=>1000,49535=>1000,49536=>1000,49537=>1000,49538=>1000,49539=>1000,49540=>1000,49541=>1000, -49542=>1000,49543=>1000,49544=>1000,49545=>1000,49546=>1000,49547=>1000,49548=>1000,49549=>1000,49550=>1000,49551=>1000, -49552=>1000,49553=>1000,49554=>1000,49555=>1000,49556=>1000,49557=>1000,49558=>1000,49559=>1000,49560=>1000,49561=>1000, -49562=>1000,49563=>1000,49564=>1000,49565=>1000,49566=>1000,49567=>1000,49568=>1000,49569=>1000,49570=>1000,49571=>1000, -49572=>1000,49573=>1000,49574=>1000,49575=>1000,49576=>1000,49577=>1000,49578=>1000,49579=>1000,49580=>1000,49581=>1000, -49582=>1000,49583=>1000,49584=>1000,49585=>1000,49586=>1000,49587=>1000,49588=>1000,49589=>1000,49590=>1000,49591=>1000, -49592=>1000,49593=>1000,49594=>1000,49595=>1000,49596=>1000,49597=>1000,49598=>1000,49599=>1000,49600=>1000,49601=>1000, -49602=>1000,49603=>1000,49604=>1000,49605=>1000,49606=>1000,49607=>1000,49608=>1000,49609=>1000,49610=>1000,49611=>1000, -49612=>1000,49613=>1000,49614=>1000,49615=>1000,49616=>1000,49617=>1000,49618=>1000,49619=>1000,49620=>1000,49621=>1000, -49622=>1000,49623=>1000,49624=>1000,49625=>1000,49626=>1000,49627=>1000,49628=>1000,49629=>1000,49630=>1000,49631=>1000, -49632=>1000,49633=>1000,49634=>1000,49635=>1000,49636=>1000,49637=>1000,49638=>1000,49639=>1000,49640=>1000,49641=>1000, -49642=>1000,49643=>1000,49644=>1000,49645=>1000,49646=>1000,49647=>1000,49648=>1000,49649=>1000,49650=>1000,49651=>1000, -49652=>1000,49653=>1000,49654=>1000,49655=>1000,49656=>1000,49657=>1000,49658=>1000,49659=>1000,49660=>1000,49661=>1000, -49662=>1000,49663=>1000,49664=>1000,49665=>1000,49666=>1000,49667=>1000,49668=>1000,49669=>1000,49670=>1000,49671=>1000, -49672=>1000,49673=>1000,49674=>1000,49675=>1000,49676=>1000,49677=>1000,49678=>1000,49679=>1000,49680=>1000,49681=>1000, -49682=>1000,49683=>1000,49684=>1000,49685=>1000,49686=>1000,49687=>1000,49688=>1000,49689=>1000,49690=>1000,49691=>1000, -49692=>1000,49693=>1000,49694=>1000,49695=>1000,49696=>1000,49697=>1000,49698=>1000,49699=>1000,49700=>1000,49701=>1000, -49702=>1000,49703=>1000,49704=>1000,49705=>1000,49706=>1000,49707=>1000,49708=>1000,49709=>1000,49710=>1000,49711=>1000, -49712=>1000,49713=>1000,49714=>1000,49715=>1000,49716=>1000,49717=>1000,49718=>1000,49719=>1000,49720=>1000,49721=>1000, -49722=>1000,49723=>1000,49724=>1000,49725=>1000,49726=>1000,49727=>1000,49728=>1000,49729=>1000,49730=>1000,49731=>1000, -49732=>1000,49733=>1000,49734=>1000,49735=>1000,49736=>1000,49737=>1000,49738=>1000,49739=>1000,49740=>1000,49741=>1000, -49742=>1000,49743=>1000,49744=>1000,49745=>1000,49746=>1000,49747=>1000,49748=>1000,49749=>1000,49750=>1000,49751=>1000, -49752=>1000,49753=>1000,49754=>1000,49755=>1000,49756=>1000,49757=>1000,49758=>1000,49759=>1000,49760=>1000,49761=>1000, -49762=>1000,49763=>1000,49764=>1000,49765=>1000,49766=>1000,49767=>1000,49768=>1000,49769=>1000,49770=>1000,49771=>1000, -49772=>1000,49773=>1000,49774=>1000,49775=>1000,49776=>1000,49777=>1000,49778=>1000,49779=>1000,49780=>1000,49781=>1000, -49782=>1000,49783=>1000,49784=>1000,49785=>1000,49786=>1000,49787=>1000,49788=>1000,49789=>1000,49790=>1000,49791=>1000, -49792=>1000,49793=>1000,49794=>1000,49795=>1000,49796=>1000,49797=>1000,49798=>1000,49799=>1000,49800=>1000,49801=>1000, -49802=>1000,49803=>1000,49804=>1000,49805=>1000,49806=>1000,49807=>1000,49808=>1000,49809=>1000,49810=>1000,49811=>1000, -49812=>1000,49813=>1000,49814=>1000,49815=>1000,49816=>1000,49817=>1000,49818=>1000,49819=>1000,49820=>1000,49821=>1000, -49822=>1000,49823=>1000,49824=>1000,49825=>1000,49826=>1000,49827=>1000,49828=>1000,49829=>1000,49830=>1000,49831=>1000, -49832=>1000,49833=>1000,49834=>1000,49835=>1000,49836=>1000,49837=>1000,49838=>1000,49839=>1000,49840=>1000,49841=>1000, -49842=>1000,49843=>1000,49844=>1000,49845=>1000,49846=>1000,49847=>1000,49848=>1000,49849=>1000,49850=>1000,49851=>1000, -49852=>1000,49853=>1000,49854=>1000,49855=>1000,49856=>1000,49857=>1000,49858=>1000,49859=>1000,49860=>1000,49861=>1000, -49862=>1000,49863=>1000,49864=>1000,49865=>1000,49866=>1000,49867=>1000,49868=>1000,49869=>1000,49870=>1000,49871=>1000, -49872=>1000,49873=>1000,49874=>1000,49875=>1000,49876=>1000,49877=>1000,49878=>1000,49879=>1000,49880=>1000,49881=>1000, -49882=>1000,49883=>1000,49884=>1000,49885=>1000,49886=>1000,49887=>1000,49888=>1000,49889=>1000,49890=>1000,49891=>1000, -49892=>1000,49893=>1000,49894=>1000,49895=>1000,49896=>1000,49897=>1000,49898=>1000,49899=>1000,49900=>1000,49901=>1000, -49902=>1000,49903=>1000,49904=>1000,49905=>1000,49906=>1000,49907=>1000,49908=>1000,49909=>1000,49910=>1000,49911=>1000, -49912=>1000,49913=>1000,49914=>1000,49915=>1000,49916=>1000,49917=>1000,49918=>1000,49919=>1000,49920=>1000,49921=>1000, -49922=>1000,49923=>1000,49924=>1000,49925=>1000,49926=>1000,49927=>1000,49928=>1000,49929=>1000,49930=>1000,49931=>1000, -49932=>1000,49933=>1000,49934=>1000,49935=>1000,49936=>1000,49937=>1000,49938=>1000,49939=>1000,49940=>1000,49941=>1000, -49942=>1000,49943=>1000,49944=>1000,49945=>1000,49946=>1000,49947=>1000,49948=>1000,49949=>1000,49950=>1000,49951=>1000, -49952=>1000,49953=>1000,49954=>1000,49955=>1000,49956=>1000,49957=>1000,49958=>1000,49959=>1000,49960=>1000,49961=>1000, -49962=>1000,49963=>1000,49964=>1000,49965=>1000,49966=>1000,49967=>1000,49968=>1000,49969=>1000,49970=>1000,49971=>1000, -49972=>1000,49973=>1000,49974=>1000,49975=>1000,49976=>1000,49977=>1000,49978=>1000,49979=>1000,49980=>1000,49981=>1000, -49982=>1000,49983=>1000,49984=>1000,49985=>1000,49986=>1000,49987=>1000,49988=>1000,49989=>1000,49990=>1000,49991=>1000, -49992=>1000,49993=>1000,49994=>1000,49995=>1000,49996=>1000,49997=>1000,49998=>1000,49999=>1000,50000=>1000,50001=>1000, -50002=>1000,50003=>1000,50004=>1000,50005=>1000,50006=>1000,50007=>1000,50008=>1000,50009=>1000,50010=>1000,50011=>1000, -50012=>1000,50013=>1000,50014=>1000,50015=>1000,50016=>1000,50017=>1000,50018=>1000,50019=>1000,50020=>1000,50021=>1000, -50022=>1000,50023=>1000,50024=>1000,50025=>1000,50026=>1000,50027=>1000,50028=>1000,50029=>1000,50030=>1000,50031=>1000, -50032=>1000,50033=>1000,50034=>1000,50035=>1000,50036=>1000,50037=>1000,50038=>1000,50039=>1000,50040=>1000,50041=>1000, -50042=>1000,50043=>1000,50044=>1000,50045=>1000,50046=>1000,50047=>1000,50048=>1000,50049=>1000,50050=>1000,50051=>1000, -50052=>1000,50053=>1000,50054=>1000,50055=>1000,50056=>1000,50057=>1000,50058=>1000,50059=>1000,50060=>1000,50061=>1000, -50062=>1000,50063=>1000,50064=>1000,50065=>1000,50066=>1000,50067=>1000,50068=>1000,50069=>1000,50070=>1000,50071=>1000, -50072=>1000,50073=>1000,50074=>1000,50075=>1000,50076=>1000,50077=>1000,50078=>1000,50079=>1000,50080=>1000,50081=>1000, -50082=>1000,50083=>1000,50084=>1000,50085=>1000,50086=>1000,50087=>1000,50088=>1000,50089=>1000,50090=>1000,50091=>1000, -50092=>1000,50093=>1000,50094=>1000,50095=>1000,50096=>1000,50097=>1000,50098=>1000,50099=>1000,50100=>1000,50101=>1000, -50102=>1000,50103=>1000,50104=>1000,50105=>1000,50106=>1000,50107=>1000,50108=>1000,50109=>1000,50110=>1000,50111=>1000, -50112=>1000,50113=>1000,50114=>1000,50115=>1000,50116=>1000,50117=>1000,50118=>1000,50119=>1000,50120=>1000,50121=>1000, -50122=>1000,50123=>1000,50124=>1000,50125=>1000,50126=>1000,50127=>1000,50128=>1000,50129=>1000,50130=>1000,50131=>1000, -50132=>1000,50133=>1000,50134=>1000,50135=>1000,50136=>1000,50137=>1000,50138=>1000,50139=>1000,50140=>1000,50141=>1000, -50142=>1000,50143=>1000,50144=>1000,50145=>1000,50146=>1000,50147=>1000,50148=>1000,50149=>1000,50150=>1000,50151=>1000, -50152=>1000,50153=>1000,50154=>1000,50155=>1000,50156=>1000,50157=>1000,50158=>1000,50159=>1000,50160=>1000,50161=>1000, -50162=>1000,50163=>1000,50164=>1000,50165=>1000,50166=>1000,50167=>1000,50168=>1000,50169=>1000,50170=>1000,50171=>1000, -50172=>1000,50173=>1000,50174=>1000,50175=>1000,50176=>1000,50177=>1000,50178=>1000,50179=>1000,50180=>1000,50181=>1000, -50182=>1000,50183=>1000,50184=>1000,50185=>1000,50186=>1000,50187=>1000,50188=>1000,50189=>1000,50190=>1000,50191=>1000, -50192=>1000,50193=>1000,50194=>1000,50195=>1000,50196=>1000,50197=>1000,50198=>1000,50199=>1000,50200=>1000,50201=>1000, -50202=>1000,50203=>1000,50204=>1000,50205=>1000,50206=>1000,50207=>1000,50208=>1000,50209=>1000,50210=>1000,50211=>1000, -50212=>1000,50213=>1000,50214=>1000,50215=>1000,50216=>1000,50217=>1000,50218=>1000,50219=>1000,50220=>1000,50221=>1000, -50222=>1000,50223=>1000,50224=>1000,50225=>1000,50226=>1000,50227=>1000,50228=>1000,50229=>1000,50230=>1000,50231=>1000, -50232=>1000,50233=>1000,50234=>1000,50235=>1000,50236=>1000,50237=>1000,50238=>1000,50239=>1000,50240=>1000,50241=>1000, -50242=>1000,50243=>1000,50244=>1000,50245=>1000,50246=>1000,50247=>1000,50248=>1000,50249=>1000,50250=>1000,50251=>1000, -50252=>1000,50253=>1000,50254=>1000,50255=>1000,50256=>1000,50257=>1000,50258=>1000,50259=>1000,50260=>1000,50261=>1000, -50262=>1000,50263=>1000,50264=>1000,50265=>1000,50266=>1000,50267=>1000,50268=>1000,50269=>1000,50270=>1000,50271=>1000, -50272=>1000,50273=>1000,50274=>1000,50275=>1000,50276=>1000,50277=>1000,50278=>1000,50279=>1000,50280=>1000,50281=>1000, -50282=>1000,50283=>1000,50284=>1000,50285=>1000,50286=>1000,50287=>1000,50288=>1000,50289=>1000,50290=>1000,50291=>1000, -50292=>1000,50293=>1000,50294=>1000,50295=>1000,50296=>1000,50297=>1000,50298=>1000,50299=>1000,50300=>1000,50301=>1000, -50302=>1000,50303=>1000,50304=>1000,50305=>1000,50306=>1000,50307=>1000,50308=>1000,50309=>1000,50310=>1000,50311=>1000, -50312=>1000,50313=>1000,50314=>1000,50315=>1000,50316=>1000,50317=>1000,50318=>1000,50319=>1000,50320=>1000,50321=>1000, -50322=>1000,50323=>1000,50324=>1000,50325=>1000,50326=>1000,50327=>1000,50328=>1000,50329=>1000,50330=>1000,50331=>1000, -50332=>1000,50333=>1000,50334=>1000,50335=>1000,50336=>1000,50337=>1000,50338=>1000,50339=>1000,50340=>1000,50341=>1000, -50342=>1000,50343=>1000,50344=>1000,50345=>1000,50346=>1000,50347=>1000,50348=>1000,50349=>1000,50350=>1000,50351=>1000, -50352=>1000,50353=>1000,50354=>1000,50355=>1000,50356=>1000,50357=>1000,50358=>1000,50359=>1000,50360=>1000,50361=>1000, -50362=>1000,50363=>1000,50364=>1000,50365=>1000,50366=>1000,50367=>1000,50368=>1000,50369=>1000,50370=>1000,50371=>1000, -50372=>1000,50373=>1000,50374=>1000,50375=>1000,50376=>1000,50377=>1000,50378=>1000,50379=>1000,50380=>1000,50381=>1000, -50382=>1000,50383=>1000,50384=>1000,50385=>1000,50386=>1000,50387=>1000,50388=>1000,50389=>1000,50390=>1000,50391=>1000, -50392=>1000,50393=>1000,50394=>1000,50395=>1000,50396=>1000,50397=>1000,50398=>1000,50399=>1000,50400=>1000,50401=>1000, -50402=>1000,50403=>1000,50404=>1000,50405=>1000,50406=>1000,50407=>1000,50408=>1000,50409=>1000,50410=>1000,50411=>1000, -50412=>1000,50413=>1000,50414=>1000,50415=>1000,50416=>1000,50417=>1000,50418=>1000,50419=>1000,50420=>1000,50421=>1000, -50422=>1000,50423=>1000,50424=>1000,50425=>1000,50426=>1000,50427=>1000,50428=>1000,50429=>1000,50430=>1000,50431=>1000, -50432=>1000,50433=>1000,50434=>1000,50435=>1000,50436=>1000,50437=>1000,50438=>1000,50439=>1000,50440=>1000,50441=>1000, -50442=>1000,50443=>1000,50444=>1000,50445=>1000,50446=>1000,50447=>1000,50448=>1000,50449=>1000,50450=>1000,50451=>1000, -50452=>1000,50453=>1000,50454=>1000,50455=>1000,50456=>1000,50457=>1000,50458=>1000,50459=>1000,50460=>1000,50461=>1000, -50462=>1000,50463=>1000,50464=>1000,50465=>1000,50466=>1000,50467=>1000,50468=>1000,50469=>1000,50470=>1000,50471=>1000, -50472=>1000,50473=>1000,50474=>1000,50475=>1000,50476=>1000,50477=>1000,50478=>1000,50479=>1000,50480=>1000,50481=>1000, -50482=>1000,50483=>1000,50484=>1000,50485=>1000,50486=>1000,50487=>1000,50488=>1000,50489=>1000,50490=>1000,50491=>1000, -50492=>1000,50493=>1000,50494=>1000,50495=>1000,50496=>1000,50497=>1000,50498=>1000,50499=>1000,50500=>1000,50501=>1000, -50502=>1000,50503=>1000,50504=>1000,50505=>1000,50506=>1000,50507=>1000,50508=>1000,50509=>1000,50510=>1000,50511=>1000, -50512=>1000,50513=>1000,50514=>1000,50515=>1000,50516=>1000,50517=>1000,50518=>1000,50519=>1000,50520=>1000,50521=>1000, -50522=>1000,50523=>1000,50524=>1000,50525=>1000,50526=>1000,50527=>1000,50528=>1000,50529=>1000,50530=>1000,50531=>1000, -50532=>1000,50533=>1000,50534=>1000,50535=>1000,50536=>1000,50537=>1000,50538=>1000,50539=>1000,50540=>1000,50541=>1000, -50542=>1000,50543=>1000,50544=>1000,50545=>1000,50546=>1000,50547=>1000,50548=>1000,50549=>1000,50550=>1000,50551=>1000, -50552=>1000,50553=>1000,50554=>1000,50555=>1000,50556=>1000,50557=>1000,50558=>1000,50559=>1000,50560=>1000,50561=>1000, -50562=>1000,50563=>1000,50564=>1000,50565=>1000,50566=>1000,50567=>1000,50568=>1000,50569=>1000,50570=>1000,50571=>1000, -50572=>1000,50573=>1000,50574=>1000,50575=>1000,50576=>1000,50577=>1000,50578=>1000,50579=>1000,50580=>1000,50581=>1000, -50582=>1000,50583=>1000,50584=>1000,50585=>1000,50586=>1000,50587=>1000,50588=>1000,50589=>1000,50590=>1000,50591=>1000, -50592=>1000,50593=>1000,50594=>1000,50595=>1000,50596=>1000,50597=>1000,50598=>1000,50599=>1000,50600=>1000,50601=>1000, -50602=>1000,50603=>1000,50604=>1000,50605=>1000,50606=>1000,50607=>1000,50608=>1000,50609=>1000,50610=>1000,50611=>1000, -50612=>1000,50613=>1000,50614=>1000,50615=>1000,50616=>1000,50617=>1000,50618=>1000,50619=>1000,50620=>1000,50621=>1000, -50622=>1000,50623=>1000,50624=>1000,50625=>1000,50626=>1000,50627=>1000,50628=>1000,50629=>1000,50630=>1000,50631=>1000, -50632=>1000,50633=>1000,50634=>1000,50635=>1000,50636=>1000,50637=>1000,50638=>1000,50639=>1000,50640=>1000,50641=>1000, -50642=>1000,50643=>1000,50644=>1000,50645=>1000,50646=>1000,50647=>1000,50648=>1000,50649=>1000,50650=>1000,50651=>1000, -50652=>1000,50653=>1000,50654=>1000,50655=>1000,50656=>1000,50657=>1000,50658=>1000,50659=>1000,50660=>1000,50661=>1000, -50662=>1000,50663=>1000,50664=>1000,50665=>1000,50666=>1000,50667=>1000,50668=>1000,50669=>1000,50670=>1000,50671=>1000, -50672=>1000,50673=>1000,50674=>1000,50675=>1000,50676=>1000,50677=>1000,50678=>1000,50679=>1000,50680=>1000,50681=>1000, -50682=>1000,50683=>1000,50684=>1000,50685=>1000,50686=>1000,50687=>1000,50688=>1000,50689=>1000,50690=>1000,50691=>1000, -50692=>1000,50693=>1000,50694=>1000,50695=>1000,50696=>1000,50697=>1000,50698=>1000,50699=>1000,50700=>1000,50701=>1000, -50702=>1000,50703=>1000,50704=>1000,50705=>1000,50706=>1000,50707=>1000,50708=>1000,50709=>1000,50710=>1000,50711=>1000, -50712=>1000,50713=>1000,50714=>1000,50715=>1000,50716=>1000,50717=>1000,50718=>1000,50719=>1000,50720=>1000,50721=>1000, -50722=>1000,50723=>1000,50724=>1000,50725=>1000,50726=>1000,50727=>1000,50728=>1000,50729=>1000,50730=>1000,50731=>1000, -50732=>1000,50733=>1000,50734=>1000,50735=>1000,50736=>1000,50737=>1000,50738=>1000,50739=>1000,50740=>1000,50741=>1000, -50742=>1000,50743=>1000,50744=>1000,50745=>1000,50746=>1000,50747=>1000,50748=>1000,50749=>1000,50750=>1000,50751=>1000, -50752=>1000,50753=>1000,50754=>1000,50755=>1000,50756=>1000,50757=>1000,50758=>1000,50759=>1000,50760=>1000,50761=>1000, -50762=>1000,50763=>1000,50764=>1000,50765=>1000,50766=>1000,50767=>1000,50768=>1000,50769=>1000,50770=>1000,50771=>1000, -50772=>1000,50773=>1000,50774=>1000,50775=>1000,50776=>1000,50777=>1000,50778=>1000,50779=>1000,50780=>1000,50781=>1000, -50782=>1000,50783=>1000,50784=>1000,50785=>1000,50786=>1000,50787=>1000,50788=>1000,50789=>1000,50790=>1000,50791=>1000, -50792=>1000,50793=>1000,50794=>1000,50795=>1000,50796=>1000,50797=>1000,50798=>1000,50799=>1000,50800=>1000,50801=>1000, -50802=>1000,50803=>1000,50804=>1000,50805=>1000,50806=>1000,50807=>1000,50808=>1000,50809=>1000,50810=>1000,50811=>1000, -50812=>1000,50813=>1000,50814=>1000,50815=>1000,50816=>1000,50817=>1000,50818=>1000,50819=>1000,50820=>1000,50821=>1000, -50822=>1000,50823=>1000,50824=>1000,50825=>1000,50826=>1000,50827=>1000,50828=>1000,50829=>1000,50830=>1000,50831=>1000, -50832=>1000,50833=>1000,50834=>1000,50835=>1000,50836=>1000,50837=>1000,50838=>1000,50839=>1000,50840=>1000,50841=>1000, -50842=>1000,50843=>1000,50844=>1000,50845=>1000,50846=>1000,50847=>1000,50848=>1000,50849=>1000,50850=>1000,50851=>1000, -50852=>1000,50853=>1000,50854=>1000,50855=>1000,50856=>1000,50857=>1000,50858=>1000,50859=>1000,50860=>1000,50861=>1000, -50862=>1000,50863=>1000,50864=>1000,50865=>1000,50866=>1000,50867=>1000,50868=>1000,50869=>1000,50870=>1000,50871=>1000, -50872=>1000,50873=>1000,50874=>1000,50875=>1000,50876=>1000,50877=>1000,50878=>1000,50879=>1000,50880=>1000,50881=>1000, -50882=>1000,50883=>1000,50884=>1000,50885=>1000,50886=>1000,50887=>1000,50888=>1000,50889=>1000,50890=>1000,50891=>1000, -50892=>1000,50893=>1000,50894=>1000,50895=>1000,50896=>1000,50897=>1000,50898=>1000,50899=>1000,50900=>1000,50901=>1000, -50902=>1000,50903=>1000,50904=>1000,50905=>1000,50906=>1000,50907=>1000,50908=>1000,50909=>1000,50910=>1000,50911=>1000, -50912=>1000,50913=>1000,50914=>1000,50915=>1000,50916=>1000,50917=>1000,50918=>1000,50919=>1000,50920=>1000,50921=>1000, -50922=>1000,50923=>1000,50924=>1000,50925=>1000,50926=>1000,50927=>1000,50928=>1000,50929=>1000,50930=>1000,50931=>1000, -50932=>1000,50933=>1000,50934=>1000,50935=>1000,50936=>1000,50937=>1000,50938=>1000,50939=>1000,50940=>1000,50941=>1000, -50942=>1000,50943=>1000,50944=>1000,50945=>1000,50946=>1000,50947=>1000,50948=>1000,50949=>1000,50950=>1000,50951=>1000, -50952=>1000,50953=>1000,50954=>1000,50955=>1000,50956=>1000,50957=>1000,50958=>1000,50959=>1000,50960=>1000,50961=>1000, -50962=>1000,50963=>1000,50964=>1000,50965=>1000,50966=>1000,50967=>1000,50968=>1000,50969=>1000,50970=>1000,50971=>1000, -50972=>1000,50973=>1000,50974=>1000,50975=>1000,50976=>1000,50977=>1000,50978=>1000,50979=>1000,50980=>1000,50981=>1000, -50982=>1000,50983=>1000,50984=>1000,50985=>1000,50986=>1000,50987=>1000,50988=>1000,50989=>1000,50990=>1000,50991=>1000, -50992=>1000,50993=>1000,50994=>1000,50995=>1000,50996=>1000,50997=>1000,50998=>1000,50999=>1000,51000=>1000,51001=>1000, -51002=>1000,51003=>1000,51004=>1000,51005=>1000,51006=>1000,51007=>1000,51008=>1000,51009=>1000,51010=>1000,51011=>1000, -51012=>1000,51013=>1000,51014=>1000,51015=>1000,51016=>1000,51017=>1000,51018=>1000,51019=>1000,51020=>1000,51021=>1000, -51022=>1000,51023=>1000,51024=>1000,51025=>1000,51026=>1000,51027=>1000,51028=>1000,51029=>1000,51030=>1000,51031=>1000, -51032=>1000,51033=>1000,51034=>1000,51035=>1000,51036=>1000,51037=>1000,51038=>1000,51039=>1000,51040=>1000,51041=>1000, -51042=>1000,51043=>1000,51044=>1000,51045=>1000,51046=>1000,51047=>1000,51048=>1000,51049=>1000,51050=>1000,51051=>1000, -51052=>1000,51053=>1000,51054=>1000,51055=>1000,51056=>1000,51057=>1000,51058=>1000,51059=>1000,51060=>1000,51061=>1000, -51062=>1000,51063=>1000,51064=>1000,51065=>1000,51066=>1000,51067=>1000,51068=>1000,51069=>1000,51070=>1000,51071=>1000, -51072=>1000,51073=>1000,51074=>1000,51075=>1000,51076=>1000,51077=>1000,51078=>1000,51079=>1000,51080=>1000,51081=>1000, -51082=>1000,51083=>1000,51084=>1000,51085=>1000,51086=>1000,51087=>1000,51088=>1000,51089=>1000,51090=>1000,51091=>1000, -51092=>1000,51093=>1000,51094=>1000,51095=>1000,51096=>1000,51097=>1000,51098=>1000,51099=>1000,51100=>1000,51101=>1000, -51102=>1000,51103=>1000,51104=>1000,51105=>1000,51106=>1000,51107=>1000,51108=>1000,51109=>1000,51110=>1000,51111=>1000, -51112=>1000,51113=>1000,51114=>1000,51115=>1000,51116=>1000,51117=>1000,51118=>1000,51119=>1000,51120=>1000,51121=>1000, -51122=>1000,51123=>1000,51124=>1000,51125=>1000,51126=>1000,51127=>1000,51128=>1000,51129=>1000,51130=>1000,51131=>1000, -51132=>1000,51133=>1000,51134=>1000,51135=>1000,51136=>1000,51137=>1000,51138=>1000,51139=>1000,51140=>1000,51141=>1000, -51142=>1000,51143=>1000,51144=>1000,51145=>1000,51146=>1000,51147=>1000,51148=>1000,51149=>1000,51150=>1000,51151=>1000, -51152=>1000,51153=>1000,51154=>1000,51155=>1000,51156=>1000,51157=>1000,51158=>1000,51159=>1000,51160=>1000,51161=>1000, -51162=>1000,51163=>1000,51164=>1000,51165=>1000,51166=>1000,51167=>1000,51168=>1000,51169=>1000,51170=>1000,51171=>1000, -51172=>1000,51173=>1000,51174=>1000,51175=>1000,51176=>1000,51177=>1000,51178=>1000,51179=>1000,51180=>1000,51181=>1000, -51182=>1000,51183=>1000,51184=>1000,51185=>1000,51186=>1000,51187=>1000,51188=>1000,51189=>1000,51190=>1000,51191=>1000, -51192=>1000,51193=>1000,51194=>1000,51195=>1000,51196=>1000,51197=>1000,51198=>1000,51199=>1000,51200=>1000,51201=>1000, -51202=>1000,51203=>1000,51204=>1000,51205=>1000,51206=>1000,51207=>1000,51208=>1000,51209=>1000,51210=>1000,51211=>1000, -51212=>1000,51213=>1000,51214=>1000,51215=>1000,51216=>1000,51217=>1000,51218=>1000,51219=>1000,51220=>1000,51221=>1000, -51222=>1000,51223=>1000,51224=>1000,51225=>1000,51226=>1000,51227=>1000,51228=>1000,51229=>1000,51230=>1000,51231=>1000, -51232=>1000,51233=>1000,51234=>1000,51235=>1000,51236=>1000,51237=>1000,51238=>1000,51239=>1000,51240=>1000,51241=>1000, -51242=>1000,51243=>1000,51244=>1000,51245=>1000,51246=>1000,51247=>1000,51248=>1000,51249=>1000,51250=>1000,51251=>1000, -51252=>1000,51253=>1000,51254=>1000,51255=>1000,51256=>1000,51257=>1000,51258=>1000,51259=>1000,51260=>1000,51261=>1000, -51262=>1000,51263=>1000,51264=>1000,51265=>1000,51266=>1000,51267=>1000,51268=>1000,51269=>1000,51270=>1000,51271=>1000, -51272=>1000,51273=>1000,51274=>1000,51275=>1000,51276=>1000,51277=>1000,51278=>1000,51279=>1000,51280=>1000,51281=>1000, -51282=>1000,51283=>1000,51284=>1000,51285=>1000,51286=>1000,51287=>1000,51288=>1000,51289=>1000,51290=>1000,51291=>1000, -51292=>1000,51293=>1000,51294=>1000,51295=>1000,51296=>1000,51297=>1000,51298=>1000,51299=>1000,51300=>1000,51301=>1000, -51302=>1000,51303=>1000,51304=>1000,51305=>1000,51306=>1000,51307=>1000,51308=>1000,51309=>1000,51310=>1000,51311=>1000, -51312=>1000,51313=>1000,51314=>1000,51315=>1000,51316=>1000,51317=>1000,51318=>1000,51319=>1000,51320=>1000,51321=>1000, -51322=>1000,51323=>1000,51324=>1000,51325=>1000,51326=>1000,51327=>1000,51328=>1000,51329=>1000,51330=>1000,51331=>1000, -51332=>1000,51333=>1000,51334=>1000,51335=>1000,51336=>1000,51337=>1000,51338=>1000,51339=>1000,51340=>1000,51341=>1000, -51342=>1000,51343=>1000,51344=>1000,51345=>1000,51346=>1000,51347=>1000,51348=>1000,51349=>1000,51350=>1000,51351=>1000, -51352=>1000,51353=>1000,51354=>1000,51355=>1000,51356=>1000,51357=>1000,51358=>1000,51359=>1000,51360=>1000,51361=>1000, -51362=>1000,51363=>1000,51364=>1000,51365=>1000,51366=>1000,51367=>1000,51368=>1000,51369=>1000,51370=>1000,51371=>1000, -51372=>1000,51373=>1000,51374=>1000,51375=>1000,51376=>1000,51377=>1000,51378=>1000,51379=>1000,51380=>1000,51381=>1000, -51382=>1000,51383=>1000,51384=>1000,51385=>1000,51386=>1000,51387=>1000,51388=>1000,51389=>1000,51390=>1000,51391=>1000, -51392=>1000,51393=>1000,51394=>1000,51395=>1000,51396=>1000,51397=>1000,51398=>1000,51399=>1000,51400=>1000,51401=>1000, -51402=>1000,51403=>1000,51404=>1000,51405=>1000,51406=>1000,51407=>1000,51408=>1000,51409=>1000,51410=>1000,51411=>1000, -51412=>1000,51413=>1000,51414=>1000,51415=>1000,51416=>1000,51417=>1000,51418=>1000,51419=>1000,51420=>1000,51421=>1000, -51422=>1000,51423=>1000,51424=>1000,51425=>1000,51426=>1000,51427=>1000,51428=>1000,51429=>1000,51430=>1000,51431=>1000, -51432=>1000,51433=>1000,51434=>1000,51435=>1000,51436=>1000,51437=>1000,51438=>1000,51439=>1000,51440=>1000,51441=>1000, -51442=>1000,51443=>1000,51444=>1000,51445=>1000,51446=>1000,51447=>1000,51448=>1000,51449=>1000,51450=>1000,51451=>1000, -51452=>1000,51453=>1000,51454=>1000,51455=>1000,51456=>1000,51457=>1000,51458=>1000,51459=>1000,51460=>1000,51461=>1000, -51462=>1000,51463=>1000,51464=>1000,51465=>1000,51466=>1000,51467=>1000,51468=>1000,51469=>1000,51470=>1000,51471=>1000, -51472=>1000,51473=>1000,51474=>1000,51475=>1000,51476=>1000,51477=>1000,51478=>1000,51479=>1000,51480=>1000,51481=>1000, -51482=>1000,51483=>1000,51484=>1000,51485=>1000,51486=>1000,51487=>1000,51488=>1000,51489=>1000,51490=>1000,51491=>1000, -51492=>1000,51493=>1000,51494=>1000,51495=>1000,51496=>1000,51497=>1000,51498=>1000,51499=>1000,51500=>1000,51501=>1000, -51502=>1000,51503=>1000,51504=>1000,51505=>1000,51506=>1000,51507=>1000,51508=>1000,51509=>1000,51510=>1000,51511=>1000, -51512=>1000,51513=>1000,51514=>1000,51515=>1000,51516=>1000,51517=>1000,51518=>1000,51519=>1000,51520=>1000,51521=>1000, -51522=>1000,51523=>1000,51524=>1000,51525=>1000,51526=>1000,51527=>1000,51528=>1000,51529=>1000,51530=>1000,51531=>1000, -51532=>1000,51533=>1000,51534=>1000,51535=>1000,51536=>1000,51537=>1000,51538=>1000,51539=>1000,51540=>1000,51541=>1000, -51542=>1000,51543=>1000,51544=>1000,51545=>1000,51546=>1000,51547=>1000,51548=>1000,51549=>1000,51550=>1000,51551=>1000, -51552=>1000,51553=>1000,51554=>1000,51555=>1000,51556=>1000,51557=>1000,51558=>1000,51559=>1000,51560=>1000,51561=>1000, -51562=>1000,51563=>1000,51564=>1000,51565=>1000,51566=>1000,51567=>1000,51568=>1000,51569=>1000,51570=>1000,51571=>1000, -51572=>1000,51573=>1000,51574=>1000,51575=>1000,51576=>1000,51577=>1000,51578=>1000,51579=>1000,51580=>1000,51581=>1000, -51582=>1000,51583=>1000,51584=>1000,51585=>1000,51586=>1000,51587=>1000,51588=>1000,51589=>1000,51590=>1000,51591=>1000, -51592=>1000,51593=>1000,51594=>1000,51595=>1000,51596=>1000,51597=>1000,51598=>1000,51599=>1000,51600=>1000,51601=>1000, -51602=>1000,51603=>1000,51604=>1000,51605=>1000,51606=>1000,51607=>1000,51608=>1000,51609=>1000,51610=>1000,51611=>1000, -51612=>1000,51613=>1000,51614=>1000,51615=>1000,51616=>1000,51617=>1000,51618=>1000,51619=>1000,51620=>1000,51621=>1000, -51622=>1000,51623=>1000,51624=>1000,51625=>1000,51626=>1000,51627=>1000,51628=>1000,51629=>1000,51630=>1000,51631=>1000, -51632=>1000,51633=>1000,51634=>1000,51635=>1000,51636=>1000,51637=>1000,51638=>1000,51639=>1000,51640=>1000,51641=>1000, -51642=>1000,51643=>1000,51644=>1000,51645=>1000,51646=>1000,51647=>1000,51648=>1000,51649=>1000,51650=>1000,51651=>1000, -51652=>1000,51653=>1000,51654=>1000,51655=>1000,51656=>1000,51657=>1000,51658=>1000,51659=>1000,51660=>1000,51661=>1000, -51662=>1000,51663=>1000,51664=>1000,51665=>1000,51666=>1000,51667=>1000,51668=>1000,51669=>1000,51670=>1000,51671=>1000, -51672=>1000,51673=>1000,51674=>1000,51675=>1000,51676=>1000,51677=>1000,51678=>1000,51679=>1000,51680=>1000,51681=>1000, -51682=>1000,51683=>1000,51684=>1000,51685=>1000,51686=>1000,51687=>1000,51688=>1000,51689=>1000,51690=>1000,51691=>1000, -51692=>1000,51693=>1000,51694=>1000,51695=>1000,51696=>1000,51697=>1000,51698=>1000,51699=>1000,51700=>1000,51701=>1000, -51702=>1000,51703=>1000,51704=>1000,51705=>1000,51706=>1000,51707=>1000,51708=>1000,51709=>1000,51710=>1000,51711=>1000, -51712=>1000,51713=>1000,51714=>1000,51715=>1000,51716=>1000,51717=>1000,51718=>1000,51719=>1000,51720=>1000,51721=>1000, -51722=>1000,51723=>1000,51724=>1000,51725=>1000,51726=>1000,51727=>1000,51728=>1000,51729=>1000,51730=>1000,51731=>1000, -51732=>1000,51733=>1000,51734=>1000,51735=>1000,51736=>1000,51737=>1000,51738=>1000,51739=>1000,51740=>1000,51741=>1000, -51742=>1000,51743=>1000,51744=>1000,51745=>1000,51746=>1000,51747=>1000,51748=>1000,51749=>1000,51750=>1000,51751=>1000, -51752=>1000,51753=>1000,51754=>1000,51755=>1000,51756=>1000,51757=>1000,51758=>1000,51759=>1000,51760=>1000,51761=>1000, -51762=>1000,51763=>1000,51764=>1000,51765=>1000,51766=>1000,51767=>1000,51768=>1000,51769=>1000,51770=>1000,51771=>1000, -51772=>1000,51773=>1000,51774=>1000,51775=>1000,51776=>1000,51777=>1000,51778=>1000,51779=>1000,51780=>1000,51781=>1000, -51782=>1000,51783=>1000,51784=>1000,51785=>1000,51786=>1000,51787=>1000,51788=>1000,51789=>1000,51790=>1000,51791=>1000, -51792=>1000,51793=>1000,51794=>1000,51795=>1000,51796=>1000,51797=>1000,51798=>1000,51799=>1000,51800=>1000,51801=>1000, -51802=>1000,51803=>1000,51804=>1000,51805=>1000,51806=>1000,51807=>1000,51808=>1000,51809=>1000,51810=>1000,51811=>1000, -51812=>1000,51813=>1000,51814=>1000,51815=>1000,51816=>1000,51817=>1000,51818=>1000,51819=>1000,51820=>1000,51821=>1000, -51822=>1000,51823=>1000,51824=>1000,51825=>1000,51826=>1000,51827=>1000,51828=>1000,51829=>1000,51830=>1000,51831=>1000, -51832=>1000,51833=>1000,51834=>1000,51835=>1000,51836=>1000,51837=>1000,51838=>1000,51839=>1000,51840=>1000,51841=>1000, -51842=>1000,51843=>1000,51844=>1000,51845=>1000,51846=>1000,51847=>1000,51848=>1000,51849=>1000,51850=>1000,51851=>1000, -51852=>1000,51853=>1000,51854=>1000,51855=>1000,51856=>1000,51857=>1000,51858=>1000,51859=>1000,51860=>1000,51861=>1000, -51862=>1000,51863=>1000,51864=>1000,51865=>1000,51866=>1000,51867=>1000,51868=>1000,51869=>1000,51870=>1000,51871=>1000, -51872=>1000,51873=>1000,51874=>1000,51875=>1000,51876=>1000,51877=>1000,51878=>1000,51879=>1000,51880=>1000,51881=>1000, -51882=>1000,51883=>1000,51884=>1000,51885=>1000,51886=>1000,51887=>1000,51888=>1000,51889=>1000,51890=>1000,51891=>1000, -51892=>1000,51893=>1000,51894=>1000,51895=>1000,51896=>1000,51897=>1000,51898=>1000,51899=>1000,51900=>1000,51901=>1000, -51902=>1000,51903=>1000,51904=>1000,51905=>1000,51906=>1000,51907=>1000,51908=>1000,51909=>1000,51910=>1000,51911=>1000, -51912=>1000,51913=>1000,51914=>1000,51915=>1000,51916=>1000,51917=>1000,51918=>1000,51919=>1000,51920=>1000,51921=>1000, -51922=>1000,51923=>1000,51924=>1000,51925=>1000,51926=>1000,51927=>1000,51928=>1000,51929=>1000,51930=>1000,51931=>1000, -51932=>1000,51933=>1000,51934=>1000,51935=>1000,51936=>1000,51937=>1000,51938=>1000,51939=>1000,51940=>1000,51941=>1000, -51942=>1000,51943=>1000,51944=>1000,51945=>1000,51946=>1000,51947=>1000,51948=>1000,51949=>1000,51950=>1000,51951=>1000, -51952=>1000,51953=>1000,51954=>1000,51955=>1000,51956=>1000,51957=>1000,51958=>1000,51959=>1000,51960=>1000,51961=>1000, -51962=>1000,51963=>1000,51964=>1000,51965=>1000,51966=>1000,51967=>1000,51968=>1000,51969=>1000,51970=>1000,51971=>1000, -51972=>1000,51973=>1000,51974=>1000,51975=>1000,51976=>1000,51977=>1000,51978=>1000,51979=>1000,51980=>1000,51981=>1000, -51982=>1000,51983=>1000,51984=>1000,51985=>1000,51986=>1000,51987=>1000,51988=>1000,51989=>1000,51990=>1000,51991=>1000, -51992=>1000,51993=>1000,51994=>1000,51995=>1000,51996=>1000,51997=>1000,51998=>1000,51999=>1000,52000=>1000,52001=>1000, -52002=>1000,52003=>1000,52004=>1000,52005=>1000,52006=>1000,52007=>1000,52008=>1000,52009=>1000,52010=>1000,52011=>1000, -52012=>1000,52013=>1000,52014=>1000,52015=>1000,52016=>1000,52017=>1000,52018=>1000,52019=>1000,52020=>1000,52021=>1000, -52022=>1000,52023=>1000,52024=>1000,52025=>1000,52026=>1000,52027=>1000,52028=>1000,52029=>1000,52030=>1000,52031=>1000, -52032=>1000,52033=>1000,52034=>1000,52035=>1000,52036=>1000,52037=>1000,52038=>1000,52039=>1000,52040=>1000,52041=>1000, -52042=>1000,52043=>1000,52044=>1000,52045=>1000,52046=>1000,52047=>1000,52048=>1000,52049=>1000,52050=>1000,52051=>1000, -52052=>1000,52053=>1000,52054=>1000,52055=>1000,52056=>1000,52057=>1000,52058=>1000,52059=>1000,52060=>1000,52061=>1000, -52062=>1000,52063=>1000,52064=>1000,52065=>1000,52066=>1000,52067=>1000,52068=>1000,52069=>1000,52070=>1000,52071=>1000, -52072=>1000,52073=>1000,52074=>1000,52075=>1000,52076=>1000,52077=>1000,52078=>1000,52079=>1000,52080=>1000,52081=>1000, -52082=>1000,52083=>1000,52084=>1000,52085=>1000,52086=>1000,52087=>1000,52088=>1000,52089=>1000,52090=>1000,52091=>1000, -52092=>1000,52093=>1000,52094=>1000,52095=>1000,52096=>1000,52097=>1000,52098=>1000,52099=>1000,52100=>1000,52101=>1000, -52102=>1000,52103=>1000,52104=>1000,52105=>1000,52106=>1000,52107=>1000,52108=>1000,52109=>1000,52110=>1000,52111=>1000, -52112=>1000,52113=>1000,52114=>1000,52115=>1000,52116=>1000,52117=>1000,52118=>1000,52119=>1000,52120=>1000,52121=>1000, -52122=>1000,52123=>1000,52124=>1000,52125=>1000,52126=>1000,52127=>1000,52128=>1000,52129=>1000,52130=>1000,52131=>1000, -52132=>1000,52133=>1000,52134=>1000,52135=>1000,52136=>1000,52137=>1000,52138=>1000,52139=>1000,52140=>1000,52141=>1000, -52142=>1000,52143=>1000,52144=>1000,52145=>1000,52146=>1000,52147=>1000,52148=>1000,52149=>1000,52150=>1000,52151=>1000, -52152=>1000,52153=>1000,52154=>1000,52155=>1000,52156=>1000,52157=>1000,52158=>1000,52159=>1000,52160=>1000,52161=>1000, -52162=>1000,52163=>1000,52164=>1000,52165=>1000,52166=>1000,52167=>1000,52168=>1000,52169=>1000,52170=>1000,52171=>1000, -52172=>1000,52173=>1000,52174=>1000,52175=>1000,52176=>1000,52177=>1000,52178=>1000,52179=>1000,52180=>1000,52181=>1000, -52182=>1000,52183=>1000,52184=>1000,52185=>1000,52186=>1000,52187=>1000,52188=>1000,52189=>1000,52190=>1000,52191=>1000, -52192=>1000,52193=>1000,52194=>1000,52195=>1000,52196=>1000,52197=>1000,52198=>1000,52199=>1000,52200=>1000,52201=>1000, -52202=>1000,52203=>1000,52204=>1000,52205=>1000,52206=>1000,52207=>1000,52208=>1000,52209=>1000,52210=>1000,52211=>1000, -52212=>1000,52213=>1000,52214=>1000,52215=>1000,52216=>1000,52217=>1000,52218=>1000,52219=>1000,52220=>1000,52221=>1000, -52222=>1000,52223=>1000,52224=>1000,52225=>1000,52226=>1000,52227=>1000,52228=>1000,52229=>1000,52230=>1000,52231=>1000, -52232=>1000,52233=>1000,52234=>1000,52235=>1000,52236=>1000,52237=>1000,52238=>1000,52239=>1000,52240=>1000,52241=>1000, -52242=>1000,52243=>1000,52244=>1000,52245=>1000,52246=>1000,52247=>1000,52248=>1000,52249=>1000,52250=>1000,52251=>1000, -52252=>1000,52253=>1000,52254=>1000,52255=>1000,52256=>1000,52257=>1000,52258=>1000,52259=>1000,52260=>1000,52261=>1000, -52262=>1000,52263=>1000,52264=>1000,52265=>1000,52266=>1000,52267=>1000,52268=>1000,52269=>1000,52270=>1000,52271=>1000, -52272=>1000,52273=>1000,52274=>1000,52275=>1000,52276=>1000,52277=>1000,52278=>1000,52279=>1000,52280=>1000,52281=>1000, -52282=>1000,52283=>1000,52284=>1000,52285=>1000,52286=>1000,52287=>1000,52288=>1000,52289=>1000,52290=>1000,52291=>1000, -52292=>1000,52293=>1000,52294=>1000,52295=>1000,52296=>1000,52297=>1000,52298=>1000,52299=>1000,52300=>1000,52301=>1000, -52302=>1000,52303=>1000,52304=>1000,52305=>1000,52306=>1000,52307=>1000,52308=>1000,52309=>1000,52310=>1000,52311=>1000, -52312=>1000,52313=>1000,52314=>1000,52315=>1000,52316=>1000,52317=>1000,52318=>1000,52319=>1000,52320=>1000,52321=>1000, -52322=>1000,52323=>1000,52324=>1000,52325=>1000,52326=>1000,52327=>1000,52328=>1000,52329=>1000,52330=>1000,52331=>1000, -52332=>1000,52333=>1000,52334=>1000,52335=>1000,52336=>1000,52337=>1000,52338=>1000,52339=>1000,52340=>1000,52341=>1000, -52342=>1000,52343=>1000,52344=>1000,52345=>1000,52346=>1000,52347=>1000,52348=>1000,52349=>1000,52350=>1000,52351=>1000, -52352=>1000,52353=>1000,52354=>1000,52355=>1000,52356=>1000,52357=>1000,52358=>1000,52359=>1000,52360=>1000,52361=>1000, -52362=>1000,52363=>1000,52364=>1000,52365=>1000,52366=>1000,52367=>1000,52368=>1000,52369=>1000,52370=>1000,52371=>1000, -52372=>1000,52373=>1000,52374=>1000,52375=>1000,52376=>1000,52377=>1000,52378=>1000,52379=>1000,52380=>1000,52381=>1000, -52382=>1000,52383=>1000,52384=>1000,52385=>1000,52386=>1000,52387=>1000,52388=>1000,52389=>1000,52390=>1000,52391=>1000, -52392=>1000,52393=>1000,52394=>1000,52395=>1000,52396=>1000,52397=>1000,52398=>1000,52399=>1000,52400=>1000,52401=>1000, -52402=>1000,52403=>1000,52404=>1000,52405=>1000,52406=>1000,52407=>1000,52408=>1000,52409=>1000,52410=>1000,52411=>1000, -52412=>1000,52413=>1000,52414=>1000,52415=>1000,52416=>1000,52417=>1000,52418=>1000,52419=>1000,52420=>1000,52421=>1000, -52422=>1000,52423=>1000,52424=>1000,52425=>1000,52426=>1000,52427=>1000,52428=>1000,52429=>1000,52430=>1000,52431=>1000, -52432=>1000,52433=>1000,52434=>1000,52435=>1000,52436=>1000,52437=>1000,52438=>1000,52439=>1000,52440=>1000,52441=>1000, -52442=>1000,52443=>1000,52444=>1000,52445=>1000,52446=>1000,52447=>1000,52448=>1000,52449=>1000,52450=>1000,52451=>1000, -52452=>1000,52453=>1000,52454=>1000,52455=>1000,52456=>1000,52457=>1000,52458=>1000,52459=>1000,52460=>1000,52461=>1000, -52462=>1000,52463=>1000,52464=>1000,52465=>1000,52466=>1000,52467=>1000,52468=>1000,52469=>1000,52470=>1000,52471=>1000, -52472=>1000,52473=>1000,52474=>1000,52475=>1000,52476=>1000,52477=>1000,52478=>1000,52479=>1000,52480=>1000,52481=>1000, -52482=>1000,52483=>1000,52484=>1000,52485=>1000,52486=>1000,52487=>1000,52488=>1000,52489=>1000,52490=>1000,52491=>1000, -52492=>1000,52493=>1000,52494=>1000,52495=>1000,52496=>1000,52497=>1000,52498=>1000,52499=>1000,52500=>1000,52501=>1000, -52502=>1000,52503=>1000,52504=>1000,52505=>1000,52506=>1000,52507=>1000,52508=>1000,52509=>1000,52510=>1000,52511=>1000, -52512=>1000,52513=>1000,52514=>1000,52515=>1000,52516=>1000,52517=>1000,52518=>1000,52519=>1000,52520=>1000,52521=>1000, -52522=>1000,52523=>1000,52524=>1000,52525=>1000,52526=>1000,52527=>1000,52528=>1000,52529=>1000,52530=>1000,52531=>1000, -52532=>1000,52533=>1000,52534=>1000,52535=>1000,52536=>1000,52537=>1000,52538=>1000,52539=>1000,52540=>1000,52541=>1000, -52542=>1000,52543=>1000,52544=>1000,52545=>1000,52546=>1000,52547=>1000,52548=>1000,52549=>1000,52550=>1000,52551=>1000, -52552=>1000,52553=>1000,52554=>1000,52555=>1000,52556=>1000,52557=>1000,52558=>1000,52559=>1000,52560=>1000,52561=>1000, -52562=>1000,52563=>1000,52564=>1000,52565=>1000,52566=>1000,52567=>1000,52568=>1000,52569=>1000,52570=>1000,52571=>1000, -52572=>1000,52573=>1000,52574=>1000,52575=>1000,52576=>1000,52577=>1000,52578=>1000,52579=>1000,52580=>1000,52581=>1000, -52582=>1000,52583=>1000,52584=>1000,52585=>1000,52586=>1000,52587=>1000,52588=>1000,52589=>1000,52590=>1000,52591=>1000, -52592=>1000,52593=>1000,52594=>1000,52595=>1000,52596=>1000,52597=>1000,52598=>1000,52599=>1000,52600=>1000,52601=>1000, -52602=>1000,52603=>1000,52604=>1000,52605=>1000,52606=>1000,52607=>1000,52608=>1000,52609=>1000,52610=>1000,52611=>1000, -52612=>1000,52613=>1000,52614=>1000,52615=>1000,52616=>1000,52617=>1000,52618=>1000,52619=>1000,52620=>1000,52621=>1000, -52622=>1000,52623=>1000,52624=>1000,52625=>1000,52626=>1000,52627=>1000,52628=>1000,52629=>1000,52630=>1000,52631=>1000, -52632=>1000,52633=>1000,52634=>1000,52635=>1000,52636=>1000,52637=>1000,52638=>1000,52639=>1000,52640=>1000,52641=>1000, -52642=>1000,52643=>1000,52644=>1000,52645=>1000,52646=>1000,52647=>1000,52648=>1000,52649=>1000,52650=>1000,52651=>1000, -52652=>1000,52653=>1000,52654=>1000,52655=>1000,52656=>1000,52657=>1000,52658=>1000,52659=>1000,52660=>1000,52661=>1000, -52662=>1000,52663=>1000,52664=>1000,52665=>1000,52666=>1000,52667=>1000,52668=>1000,52669=>1000,52670=>1000,52671=>1000, -52672=>1000,52673=>1000,52674=>1000,52675=>1000,52676=>1000,52677=>1000,52678=>1000,52679=>1000,52680=>1000,52681=>1000, -52682=>1000,52683=>1000,52684=>1000,52685=>1000,52686=>1000,52687=>1000,52688=>1000,52689=>1000,52690=>1000,52691=>1000, -52692=>1000,52693=>1000,52694=>1000,52695=>1000,52696=>1000,52697=>1000,52698=>1000,52699=>1000,52700=>1000,52701=>1000, -52702=>1000,52703=>1000,52704=>1000,52705=>1000,52706=>1000,52707=>1000,52708=>1000,52709=>1000,52710=>1000,52711=>1000, -52712=>1000,52713=>1000,52714=>1000,52715=>1000,52716=>1000,52717=>1000,52718=>1000,52719=>1000,52720=>1000,52721=>1000, -52722=>1000,52723=>1000,52724=>1000,52725=>1000,52726=>1000,52727=>1000,52728=>1000,52729=>1000,52730=>1000,52731=>1000, -52732=>1000,52733=>1000,52734=>1000,52735=>1000,52736=>1000,52737=>1000,52738=>1000,52739=>1000,52740=>1000,52741=>1000, -52742=>1000,52743=>1000,52744=>1000,52745=>1000,52746=>1000,52747=>1000,52748=>1000,52749=>1000,52750=>1000,52751=>1000, -52752=>1000,52753=>1000,52754=>1000,52755=>1000,52756=>1000,52757=>1000,52758=>1000,52759=>1000,52760=>1000,52761=>1000, -52762=>1000,52763=>1000,52764=>1000,52765=>1000,52766=>1000,52767=>1000,52768=>1000,52769=>1000,52770=>1000,52771=>1000, -52772=>1000,52773=>1000,52774=>1000,52775=>1000,52776=>1000,52777=>1000,52778=>1000,52779=>1000,52780=>1000,52781=>1000, -52782=>1000,52783=>1000,52784=>1000,52785=>1000,52786=>1000,52787=>1000,52788=>1000,52789=>1000,52790=>1000,52791=>1000, -52792=>1000,52793=>1000,52794=>1000,52795=>1000,52796=>1000,52797=>1000,52798=>1000,52799=>1000,52800=>1000,52801=>1000, -52802=>1000,52803=>1000,52804=>1000,52805=>1000,52806=>1000,52807=>1000,52808=>1000,52809=>1000,52810=>1000,52811=>1000, -52812=>1000,52813=>1000,52814=>1000,52815=>1000,52816=>1000,52817=>1000,52818=>1000,52819=>1000,52820=>1000,52821=>1000, -52822=>1000,52823=>1000,52824=>1000,52825=>1000,52826=>1000,52827=>1000,52828=>1000,52829=>1000,52830=>1000,52831=>1000, -52832=>1000,52833=>1000,52834=>1000,52835=>1000,52836=>1000,52837=>1000,52838=>1000,52839=>1000,52840=>1000,52841=>1000, -52842=>1000,52843=>1000,52844=>1000,52845=>1000,52846=>1000,52847=>1000,52848=>1000,52849=>1000,52850=>1000,52851=>1000, -52852=>1000,52853=>1000,52854=>1000,52855=>1000,52856=>1000,52857=>1000,52858=>1000,52859=>1000,52860=>1000,52861=>1000, -52862=>1000,52863=>1000,52864=>1000,52865=>1000,52866=>1000,52867=>1000,52868=>1000,52869=>1000,52870=>1000,52871=>1000, -52872=>1000,52873=>1000,52874=>1000,52875=>1000,52876=>1000,52877=>1000,52878=>1000,52879=>1000,52880=>1000,52881=>1000, -52882=>1000,52883=>1000,52884=>1000,52885=>1000,52886=>1000,52887=>1000,52888=>1000,52889=>1000,52890=>1000,52891=>1000, -52892=>1000,52893=>1000,52894=>1000,52895=>1000,52896=>1000,52897=>1000,52898=>1000,52899=>1000,52900=>1000,52901=>1000, -52902=>1000,52903=>1000,52904=>1000,52905=>1000,52906=>1000,52907=>1000,52908=>1000,52909=>1000,52910=>1000,52911=>1000, -52912=>1000,52913=>1000,52914=>1000,52915=>1000,52916=>1000,52917=>1000,52918=>1000,52919=>1000,52920=>1000,52921=>1000, -52922=>1000,52923=>1000,52924=>1000,52925=>1000,52926=>1000,52927=>1000,52928=>1000,52929=>1000,52930=>1000,52931=>1000, -52932=>1000,52933=>1000,52934=>1000,52935=>1000,52936=>1000,52937=>1000,52938=>1000,52939=>1000,52940=>1000,52941=>1000, -52942=>1000,52943=>1000,52944=>1000,52945=>1000,52946=>1000,52947=>1000,52948=>1000,52949=>1000,52950=>1000,52951=>1000, -52952=>1000,52953=>1000,52954=>1000,52955=>1000,52956=>1000,52957=>1000,52958=>1000,52959=>1000,52960=>1000,52961=>1000, -52962=>1000,52963=>1000,52964=>1000,52965=>1000,52966=>1000,52967=>1000,52968=>1000,52969=>1000,52970=>1000,52971=>1000, -52972=>1000,52973=>1000,52974=>1000,52975=>1000,52976=>1000,52977=>1000,52978=>1000,52979=>1000,52980=>1000,52981=>1000, -52982=>1000,52983=>1000,52984=>1000,52985=>1000,52986=>1000,52987=>1000,52988=>1000,52989=>1000,52990=>1000,52991=>1000, -52992=>1000,52993=>1000,52994=>1000,52995=>1000,52996=>1000,52997=>1000,52998=>1000,52999=>1000,53000=>1000,53001=>1000, -53002=>1000,53003=>1000,53004=>1000,53005=>1000,53006=>1000,53007=>1000,53008=>1000,53009=>1000,53010=>1000,53011=>1000, -53012=>1000,53013=>1000,53014=>1000,53015=>1000,53016=>1000,53017=>1000,53018=>1000,53019=>1000,53020=>1000,53021=>1000, -53022=>1000,53023=>1000,53024=>1000,53025=>1000,53026=>1000,53027=>1000,53028=>1000,53029=>1000,53030=>1000,53031=>1000, -53032=>1000,53033=>1000,53034=>1000,53035=>1000,53036=>1000,53037=>1000,53038=>1000,53039=>1000,53040=>1000,53041=>1000, -53042=>1000,53043=>1000,53044=>1000,53045=>1000,53046=>1000,53047=>1000,53048=>1000,53049=>1000,53050=>1000,53051=>1000, -53052=>1000,53053=>1000,53054=>1000,53055=>1000,53056=>1000,53057=>1000,53058=>1000,53059=>1000,53060=>1000,53061=>1000, -53062=>1000,53063=>1000,53064=>1000,53065=>1000,53066=>1000,53067=>1000,53068=>1000,53069=>1000,53070=>1000,53071=>1000, -53072=>1000,53073=>1000,53074=>1000,53075=>1000,53076=>1000,53077=>1000,53078=>1000,53079=>1000,53080=>1000,53081=>1000, -53082=>1000,53083=>1000,53084=>1000,53085=>1000,53086=>1000,53087=>1000,53088=>1000,53089=>1000,53090=>1000,53091=>1000, -53092=>1000,53093=>1000,53094=>1000,53095=>1000,53096=>1000,53097=>1000,53098=>1000,53099=>1000,53100=>1000,53101=>1000, -53102=>1000,53103=>1000,53104=>1000,53105=>1000,53106=>1000,53107=>1000,53108=>1000,53109=>1000,53110=>1000,53111=>1000, -53112=>1000,53113=>1000,53114=>1000,53115=>1000,53116=>1000,53117=>1000,53118=>1000,53119=>1000,53120=>1000,53121=>1000, -53122=>1000,53123=>1000,53124=>1000,53125=>1000,53126=>1000,53127=>1000,53128=>1000,53129=>1000,53130=>1000,53131=>1000, -53132=>1000,53133=>1000,53134=>1000,53135=>1000,53136=>1000,53137=>1000,53138=>1000,53139=>1000,53140=>1000,53141=>1000, -53142=>1000,53143=>1000,53144=>1000,53145=>1000,53146=>1000,53147=>1000,53148=>1000,53149=>1000,53150=>1000,53151=>1000, -53152=>1000,53153=>1000,53154=>1000,53155=>1000,53156=>1000,53157=>1000,53158=>1000,53159=>1000,53160=>1000,53161=>1000, -53162=>1000,53163=>1000,53164=>1000,53165=>1000,53166=>1000,53167=>1000,53168=>1000,53169=>1000,53170=>1000,53171=>1000, -53172=>1000,53173=>1000,53174=>1000,53175=>1000,53176=>1000,53177=>1000,53178=>1000,53179=>1000,53180=>1000,53181=>1000, -53182=>1000,53183=>1000,53184=>1000,53185=>1000,53186=>1000,53187=>1000,53188=>1000,53189=>1000,53190=>1000,53191=>1000, -53192=>1000,53193=>1000,53194=>1000,53195=>1000,53196=>1000,53197=>1000,53198=>1000,53199=>1000,53200=>1000,53201=>1000, -53202=>1000,53203=>1000,53204=>1000,53205=>1000,53206=>1000,53207=>1000,53208=>1000,53209=>1000,53210=>1000,53211=>1000, -53212=>1000,53213=>1000,53214=>1000,53215=>1000,53216=>1000,53217=>1000,53218=>1000,53219=>1000,53220=>1000,53221=>1000, -53222=>1000,53223=>1000,53224=>1000,53225=>1000,53226=>1000,53227=>1000,53228=>1000,53229=>1000,53230=>1000,53231=>1000, -53232=>1000,53233=>1000,53234=>1000,53235=>1000,53236=>1000,53237=>1000,53238=>1000,53239=>1000,53240=>1000,53241=>1000, -53242=>1000,53243=>1000,53244=>1000,53245=>1000,53246=>1000,53247=>1000,53248=>1000,53249=>1000,53250=>1000,53251=>1000, -53252=>1000,53253=>1000,53254=>1000,53255=>1000,53256=>1000,53257=>1000,53258=>1000,53259=>1000,53260=>1000,53261=>1000, -53262=>1000,53263=>1000,53264=>1000,53265=>1000,53266=>1000,53267=>1000,53268=>1000,53269=>1000,53270=>1000,53271=>1000, -53272=>1000,53273=>1000,53274=>1000,53275=>1000,53276=>1000,53277=>1000,53278=>1000,53279=>1000,53280=>1000,53281=>1000, -53282=>1000,53283=>1000,53284=>1000,53285=>1000,53286=>1000,53287=>1000,53288=>1000,53289=>1000,53290=>1000,53291=>1000, -53292=>1000,53293=>1000,53294=>1000,53295=>1000,53296=>1000,53297=>1000,53298=>1000,53299=>1000,53300=>1000,53301=>1000, -53302=>1000,53303=>1000,53304=>1000,53305=>1000,53306=>1000,53307=>1000,53308=>1000,53309=>1000,53310=>1000,53311=>1000, -53312=>1000,53313=>1000,53314=>1000,53315=>1000,53316=>1000,53317=>1000,53318=>1000,53319=>1000,53320=>1000,53321=>1000, -53322=>1000,53323=>1000,53324=>1000,53325=>1000,53326=>1000,53327=>1000,53328=>1000,53329=>1000,53330=>1000,53331=>1000, -53332=>1000,53333=>1000,53334=>1000,53335=>1000,53336=>1000,53337=>1000,53338=>1000,53339=>1000,53340=>1000,53341=>1000, -53342=>1000,53343=>1000,53344=>1000,53345=>1000,53346=>1000,53347=>1000,53348=>1000,53349=>1000,53350=>1000,53351=>1000, -53352=>1000,53353=>1000,53354=>1000,53355=>1000,53356=>1000,53357=>1000,53358=>1000,53359=>1000,53360=>1000,53361=>1000, -53362=>1000,53363=>1000,53364=>1000,53365=>1000,53366=>1000,53367=>1000,53368=>1000,53369=>1000,53370=>1000,53371=>1000, -53372=>1000,53373=>1000,53374=>1000,53375=>1000,53376=>1000,53377=>1000,53378=>1000,53379=>1000,53380=>1000,53381=>1000, -53382=>1000,53383=>1000,53384=>1000,53385=>1000,53386=>1000,53387=>1000,53388=>1000,53389=>1000,53390=>1000,53391=>1000, -53392=>1000,53393=>1000,53394=>1000,53395=>1000,53396=>1000,53397=>1000,53398=>1000,53399=>1000,53400=>1000,53401=>1000, -53402=>1000,53403=>1000,53404=>1000,53405=>1000,53406=>1000,53407=>1000,53408=>1000,53409=>1000,53410=>1000,53411=>1000, -53412=>1000,53413=>1000,53414=>1000,53415=>1000,53416=>1000,53417=>1000,53418=>1000,53419=>1000,53420=>1000,53421=>1000, -53422=>1000,53423=>1000,53424=>1000,53425=>1000,53426=>1000,53427=>1000,53428=>1000,53429=>1000,53430=>1000,53431=>1000, -53432=>1000,53433=>1000,53434=>1000,53435=>1000,53436=>1000,53437=>1000,53438=>1000,53439=>1000,53440=>1000,53441=>1000, -53442=>1000,53443=>1000,53444=>1000,53445=>1000,53446=>1000,53447=>1000,53448=>1000,53449=>1000,53450=>1000,53451=>1000, -53452=>1000,53453=>1000,53454=>1000,53455=>1000,53456=>1000,53457=>1000,53458=>1000,53459=>1000,53460=>1000,53461=>1000, -53462=>1000,53463=>1000,53464=>1000,53465=>1000,53466=>1000,53467=>1000,53468=>1000,53469=>1000,53470=>1000,53471=>1000, -53472=>1000,53473=>1000,53474=>1000,53475=>1000,53476=>1000,53477=>1000,53478=>1000,53479=>1000,53480=>1000,53481=>1000, -53482=>1000,53483=>1000,53484=>1000,53485=>1000,53486=>1000,53487=>1000,53488=>1000,53489=>1000,53490=>1000,53491=>1000, -53492=>1000,53493=>1000,53494=>1000,53495=>1000,53496=>1000,53497=>1000,53498=>1000,53499=>1000,53500=>1000,53501=>1000, -53502=>1000,53503=>1000,53504=>1000,53505=>1000,53506=>1000,53507=>1000,53508=>1000,53509=>1000,53510=>1000,53511=>1000, -53512=>1000,53513=>1000,53514=>1000,53515=>1000,53516=>1000,53517=>1000,53518=>1000,53519=>1000,53520=>1000,53521=>1000, -53522=>1000,53523=>1000,53524=>1000,53525=>1000,53526=>1000,53527=>1000,53528=>1000,53529=>1000,53530=>1000,53531=>1000, -53532=>1000,53533=>1000,53534=>1000,53535=>1000,53536=>1000,53537=>1000,53538=>1000,53539=>1000,53540=>1000,53541=>1000, -53542=>1000,53543=>1000,53544=>1000,53545=>1000,53546=>1000,53547=>1000,53548=>1000,53549=>1000,53550=>1000,53551=>1000, -53552=>1000,53553=>1000,53554=>1000,53555=>1000,53556=>1000,53557=>1000,53558=>1000,53559=>1000,53560=>1000,53561=>1000, -53562=>1000,53563=>1000,53564=>1000,53565=>1000,53566=>1000,53567=>1000,53568=>1000,53569=>1000,53570=>1000,53571=>1000, -53572=>1000,53573=>1000,53574=>1000,53575=>1000,53576=>1000,53577=>1000,53578=>1000,53579=>1000,53580=>1000,53581=>1000, -53582=>1000,53583=>1000,53584=>1000,53585=>1000,53586=>1000,53587=>1000,53588=>1000,53589=>1000,53590=>1000,53591=>1000, -53592=>1000,53593=>1000,53594=>1000,53595=>1000,53596=>1000,53597=>1000,53598=>1000,53599=>1000,53600=>1000,53601=>1000, -53602=>1000,53603=>1000,53604=>1000,53605=>1000,53606=>1000,53607=>1000,53608=>1000,53609=>1000,53610=>1000,53611=>1000, -53612=>1000,53613=>1000,53614=>1000,53615=>1000,53616=>1000,53617=>1000,53618=>1000,53619=>1000,53620=>1000,53621=>1000, -53622=>1000,53623=>1000,53624=>1000,53625=>1000,53626=>1000,53627=>1000,53628=>1000,53629=>1000,53630=>1000,53631=>1000, -53632=>1000,53633=>1000,53634=>1000,53635=>1000,53636=>1000,53637=>1000,53638=>1000,53639=>1000,53640=>1000,53641=>1000, -53642=>1000,53643=>1000,53644=>1000,53645=>1000,53646=>1000,53647=>1000,53648=>1000,53649=>1000,53650=>1000,53651=>1000, -53652=>1000,53653=>1000,53654=>1000,53655=>1000,53656=>1000,53657=>1000,53658=>1000,53659=>1000,53660=>1000,53661=>1000, -53662=>1000,53663=>1000,53664=>1000,53665=>1000,53666=>1000,53667=>1000,53668=>1000,53669=>1000,53670=>1000,53671=>1000, -53672=>1000,53673=>1000,53674=>1000,53675=>1000,53676=>1000,53677=>1000,53678=>1000,53679=>1000,53680=>1000,53681=>1000, -53682=>1000,53683=>1000,53684=>1000,53685=>1000,53686=>1000,53687=>1000,53688=>1000,53689=>1000,53690=>1000,53691=>1000, -53692=>1000,53693=>1000,53694=>1000,53695=>1000,53696=>1000,53697=>1000,53698=>1000,53699=>1000,53700=>1000,53701=>1000, -53702=>1000,53703=>1000,53704=>1000,53705=>1000,53706=>1000,53707=>1000,53708=>1000,53709=>1000,53710=>1000,53711=>1000, -53712=>1000,53713=>1000,53714=>1000,53715=>1000,53716=>1000,53717=>1000,53718=>1000,53719=>1000,53720=>1000,53721=>1000, -53722=>1000,53723=>1000,53724=>1000,53725=>1000,53726=>1000,53727=>1000,53728=>1000,53729=>1000,53730=>1000,53731=>1000, -53732=>1000,53733=>1000,53734=>1000,53735=>1000,53736=>1000,53737=>1000,53738=>1000,53739=>1000,53740=>1000,53741=>1000, -53742=>1000,53743=>1000,53744=>1000,53745=>1000,53746=>1000,53747=>1000,53748=>1000,53749=>1000,53750=>1000,53751=>1000, -53752=>1000,53753=>1000,53754=>1000,53755=>1000,53756=>1000,53757=>1000,53758=>1000,53759=>1000,53760=>1000,53761=>1000, -53762=>1000,53763=>1000,53764=>1000,53765=>1000,53766=>1000,53767=>1000,53768=>1000,53769=>1000,53770=>1000,53771=>1000, -53772=>1000,53773=>1000,53774=>1000,53775=>1000,53776=>1000,53777=>1000,53778=>1000,53779=>1000,53780=>1000,53781=>1000, -53782=>1000,53783=>1000,53784=>1000,53785=>1000,53786=>1000,53787=>1000,53788=>1000,53789=>1000,53790=>1000,53791=>1000, -53792=>1000,53793=>1000,53794=>1000,53795=>1000,53796=>1000,53797=>1000,53798=>1000,53799=>1000,53800=>1000,53801=>1000, -53802=>1000,53803=>1000,53804=>1000,53805=>1000,53806=>1000,53807=>1000,53808=>1000,53809=>1000,53810=>1000,53811=>1000, -53812=>1000,53813=>1000,53814=>1000,53815=>1000,53816=>1000,53817=>1000,53818=>1000,53819=>1000,53820=>1000,53821=>1000, -53822=>1000,53823=>1000,53824=>1000,53825=>1000,53826=>1000,53827=>1000,53828=>1000,53829=>1000,53830=>1000,53831=>1000, -53832=>1000,53833=>1000,53834=>1000,53835=>1000,53836=>1000,53837=>1000,53838=>1000,53839=>1000,53840=>1000,53841=>1000, -53842=>1000,53843=>1000,53844=>1000,53845=>1000,53846=>1000,53847=>1000,53848=>1000,53849=>1000,53850=>1000,53851=>1000, -53852=>1000,53853=>1000,53854=>1000,53855=>1000,53856=>1000,53857=>1000,53858=>1000,53859=>1000,53860=>1000,53861=>1000, -53862=>1000,53863=>1000,53864=>1000,53865=>1000,53866=>1000,53867=>1000,53868=>1000,53869=>1000,53870=>1000,53871=>1000, -53872=>1000,53873=>1000,53874=>1000,53875=>1000,53876=>1000,53877=>1000,53878=>1000,53879=>1000,53880=>1000,53881=>1000, -53882=>1000,53883=>1000,53884=>1000,53885=>1000,53886=>1000,53887=>1000,53888=>1000,53889=>1000,53890=>1000,53891=>1000, -53892=>1000,53893=>1000,53894=>1000,53895=>1000,53896=>1000,53897=>1000,53898=>1000,53899=>1000,53900=>1000,53901=>1000, -53902=>1000,53903=>1000,53904=>1000,53905=>1000,53906=>1000,53907=>1000,53908=>1000,53909=>1000,53910=>1000,53911=>1000, -53912=>1000,53913=>1000,53914=>1000,53915=>1000,53916=>1000,53917=>1000,53918=>1000,53919=>1000,53920=>1000,53921=>1000, -53922=>1000,53923=>1000,53924=>1000,53925=>1000,53926=>1000,53927=>1000,53928=>1000,53929=>1000,53930=>1000,53931=>1000, -53932=>1000,53933=>1000,53934=>1000,53935=>1000,53936=>1000,53937=>1000,53938=>1000,53939=>1000,53940=>1000,53941=>1000, -53942=>1000,53943=>1000,53944=>1000,53945=>1000,53946=>1000,53947=>1000,53948=>1000,53949=>1000,53950=>1000,53951=>1000, -53952=>1000,53953=>1000,53954=>1000,53955=>1000,53956=>1000,53957=>1000,53958=>1000,53959=>1000,53960=>1000,53961=>1000, -53962=>1000,53963=>1000,53964=>1000,53965=>1000,53966=>1000,53967=>1000,53968=>1000,53969=>1000,53970=>1000,53971=>1000, -53972=>1000,53973=>1000,53974=>1000,53975=>1000,53976=>1000,53977=>1000,53978=>1000,53979=>1000,53980=>1000,53981=>1000, -53982=>1000,53983=>1000,53984=>1000,53985=>1000,53986=>1000,53987=>1000,53988=>1000,53989=>1000,53990=>1000,53991=>1000, -53992=>1000,53993=>1000,53994=>1000,53995=>1000,53996=>1000,53997=>1000,53998=>1000,53999=>1000,54000=>1000,54001=>1000, -54002=>1000,54003=>1000,54004=>1000,54005=>1000,54006=>1000,54007=>1000,54008=>1000,54009=>1000,54010=>1000,54011=>1000, -54012=>1000,54013=>1000,54014=>1000,54015=>1000,54016=>1000,54017=>1000,54018=>1000,54019=>1000,54020=>1000,54021=>1000, -54022=>1000,54023=>1000,54024=>1000,54025=>1000,54026=>1000,54027=>1000,54028=>1000,54029=>1000,54030=>1000,54031=>1000, -54032=>1000,54033=>1000,54034=>1000,54035=>1000,54036=>1000,54037=>1000,54038=>1000,54039=>1000,54040=>1000,54041=>1000, -54042=>1000,54043=>1000,54044=>1000,54045=>1000,54046=>1000,54047=>1000,54048=>1000,54049=>1000,54050=>1000,54051=>1000, -54052=>1000,54053=>1000,54054=>1000,54055=>1000,54056=>1000,54057=>1000,54058=>1000,54059=>1000,54060=>1000,54061=>1000, -54062=>1000,54063=>1000,54064=>1000,54065=>1000,54066=>1000,54067=>1000,54068=>1000,54069=>1000,54070=>1000,54071=>1000, -54072=>1000,54073=>1000,54074=>1000,54075=>1000,54076=>1000,54077=>1000,54078=>1000,54079=>1000,54080=>1000,54081=>1000, -54082=>1000,54083=>1000,54084=>1000,54085=>1000,54086=>1000,54087=>1000,54088=>1000,54089=>1000,54090=>1000,54091=>1000, -54092=>1000,54093=>1000,54094=>1000,54095=>1000,54096=>1000,54097=>1000,54098=>1000,54099=>1000,54100=>1000,54101=>1000, -54102=>1000,54103=>1000,54104=>1000,54105=>1000,54106=>1000,54107=>1000,54108=>1000,54109=>1000,54110=>1000,54111=>1000, -54112=>1000,54113=>1000,54114=>1000,54115=>1000,54116=>1000,54117=>1000,54118=>1000,54119=>1000,54120=>1000,54121=>1000, -54122=>1000,54123=>1000,54124=>1000,54125=>1000,54126=>1000,54127=>1000,54128=>1000,54129=>1000,54130=>1000,54131=>1000, -54132=>1000,54133=>1000,54134=>1000,54135=>1000,54136=>1000,54137=>1000,54138=>1000,54139=>1000,54140=>1000,54141=>1000, -54142=>1000,54143=>1000,54144=>1000,54145=>1000,54146=>1000,54147=>1000,54148=>1000,54149=>1000,54150=>1000,54151=>1000, -54152=>1000,54153=>1000,54154=>1000,54155=>1000,54156=>1000,54157=>1000,54158=>1000,54159=>1000,54160=>1000,54161=>1000, -54162=>1000,54163=>1000,54164=>1000,54165=>1000,54166=>1000,54167=>1000,54168=>1000,54169=>1000,54170=>1000,54171=>1000, -54172=>1000,54173=>1000,54174=>1000,54175=>1000,54176=>1000,54177=>1000,54178=>1000,54179=>1000,54180=>1000,54181=>1000, -54182=>1000,54183=>1000,54184=>1000,54185=>1000,54186=>1000,54187=>1000,54188=>1000,54189=>1000,54190=>1000,54191=>1000, -54192=>1000,54193=>1000,54194=>1000,54195=>1000,54196=>1000,54197=>1000,54198=>1000,54199=>1000,54200=>1000,54201=>1000, -54202=>1000,54203=>1000,54204=>1000,54205=>1000,54206=>1000,54207=>1000,54208=>1000,54209=>1000,54210=>1000,54211=>1000, -54212=>1000,54213=>1000,54214=>1000,54215=>1000,54216=>1000,54217=>1000,54218=>1000,54219=>1000,54220=>1000,54221=>1000, -54222=>1000,54223=>1000,54224=>1000,54225=>1000,54226=>1000,54227=>1000,54228=>1000,54229=>1000,54230=>1000,54231=>1000, -54232=>1000,54233=>1000,54234=>1000,54235=>1000,54236=>1000,54237=>1000,54238=>1000,54239=>1000,54240=>1000,54241=>1000, -54242=>1000,54243=>1000,54244=>1000,54245=>1000,54246=>1000,54247=>1000,54248=>1000,54249=>1000,54250=>1000,54251=>1000, -54252=>1000,54253=>1000,54254=>1000,54255=>1000,54256=>1000,54257=>1000,54258=>1000,54259=>1000,54260=>1000,54261=>1000, -54262=>1000,54263=>1000,54264=>1000,54265=>1000,54266=>1000,54267=>1000,54268=>1000,54269=>1000,54270=>1000,54271=>1000, -54272=>1000,54273=>1000,54274=>1000,54275=>1000,54276=>1000,54277=>1000,54278=>1000,54279=>1000,54280=>1000,54281=>1000, -54282=>1000,54283=>1000,54284=>1000,54285=>1000,54286=>1000,54287=>1000,54288=>1000,54289=>1000,54290=>1000,54291=>1000, -54292=>1000,54293=>1000,54294=>1000,54295=>1000,54296=>1000,54297=>1000,54298=>1000,54299=>1000,54300=>1000,54301=>1000, -54302=>1000,54303=>1000,54304=>1000,54305=>1000,54306=>1000,54307=>1000,54308=>1000,54309=>1000,54310=>1000,54311=>1000, -54312=>1000,54313=>1000,54314=>1000,54315=>1000,54316=>1000,54317=>1000,54318=>1000,54319=>1000,54320=>1000,54321=>1000, -54322=>1000,54323=>1000,54324=>1000,54325=>1000,54326=>1000,54327=>1000,54328=>1000,54329=>1000,54330=>1000,54331=>1000, -54332=>1000,54333=>1000,54334=>1000,54335=>1000,54336=>1000,54337=>1000,54338=>1000,54339=>1000,54340=>1000,54341=>1000, -54342=>1000,54343=>1000,54344=>1000,54345=>1000,54346=>1000,54347=>1000,54348=>1000,54349=>1000,54350=>1000,54351=>1000, -54352=>1000,54353=>1000,54354=>1000,54355=>1000,54356=>1000,54357=>1000,54358=>1000,54359=>1000,54360=>1000,54361=>1000, -54362=>1000,54363=>1000,54364=>1000,54365=>1000,54366=>1000,54367=>1000,54368=>1000,54369=>1000,54370=>1000,54371=>1000, -54372=>1000,54373=>1000,54374=>1000,54375=>1000,54376=>1000,54377=>1000,54378=>1000,54379=>1000,54380=>1000,54381=>1000, -54382=>1000,54383=>1000,54384=>1000,54385=>1000,54386=>1000,54387=>1000,54388=>1000,54389=>1000,54390=>1000,54391=>1000, -54392=>1000,54393=>1000,54394=>1000,54395=>1000,54396=>1000,54397=>1000,54398=>1000,54399=>1000,54400=>1000,54401=>1000, -54402=>1000,54403=>1000,54404=>1000,54405=>1000,54406=>1000,54407=>1000,54408=>1000,54409=>1000,54410=>1000,54411=>1000, -54412=>1000,54413=>1000,54414=>1000,54415=>1000,54416=>1000,54417=>1000,54418=>1000,54419=>1000,54420=>1000,54421=>1000, -54422=>1000,54423=>1000,54424=>1000,54425=>1000,54426=>1000,54427=>1000,54428=>1000,54429=>1000,54430=>1000,54431=>1000, -54432=>1000,54433=>1000,54434=>1000,54435=>1000,54436=>1000,54437=>1000,54438=>1000,54439=>1000,54440=>1000,54441=>1000, -54442=>1000,54443=>1000,54444=>1000,54445=>1000,54446=>1000,54447=>1000,54448=>1000,54449=>1000,54450=>1000,54451=>1000, -54452=>1000,54453=>1000,54454=>1000,54455=>1000,54456=>1000,54457=>1000,54458=>1000,54459=>1000,54460=>1000,54461=>1000, -54462=>1000,54463=>1000,54464=>1000,54465=>1000,54466=>1000,54467=>1000,54468=>1000,54469=>1000,54470=>1000,54471=>1000, -54472=>1000,54473=>1000,54474=>1000,54475=>1000,54476=>1000,54477=>1000,54478=>1000,54479=>1000,54480=>1000,54481=>1000, -54482=>1000,54483=>1000,54484=>1000,54485=>1000,54486=>1000,54487=>1000,54488=>1000,54489=>1000,54490=>1000,54491=>1000, -54492=>1000,54493=>1000,54494=>1000,54495=>1000,54496=>1000,54497=>1000,54498=>1000,54499=>1000,54500=>1000,54501=>1000, -54502=>1000,54503=>1000,54504=>1000,54505=>1000,54506=>1000,54507=>1000,54508=>1000,54509=>1000,54510=>1000,54511=>1000, -54512=>1000,54513=>1000,54514=>1000,54515=>1000,54516=>1000,54517=>1000,54518=>1000,54519=>1000,54520=>1000,54521=>1000, -54522=>1000,54523=>1000,54524=>1000,54525=>1000,54526=>1000,54527=>1000,54528=>1000,54529=>1000,54530=>1000,54531=>1000, -54532=>1000,54533=>1000,54534=>1000,54535=>1000,54536=>1000,54537=>1000,54538=>1000,54539=>1000,54540=>1000,54541=>1000, -54542=>1000,54543=>1000,54544=>1000,54545=>1000,54546=>1000,54547=>1000,54548=>1000,54549=>1000,54550=>1000,54551=>1000, -54552=>1000,54553=>1000,54554=>1000,54555=>1000,54556=>1000,54557=>1000,54558=>1000,54559=>1000,54560=>1000,54561=>1000, -54562=>1000,54563=>1000,54564=>1000,54565=>1000,54566=>1000,54567=>1000,54568=>1000,54569=>1000,54570=>1000,54571=>1000, -54572=>1000,54573=>1000,54574=>1000,54575=>1000,54576=>1000,54577=>1000,54578=>1000,54579=>1000,54580=>1000,54581=>1000, -54582=>1000,54583=>1000,54584=>1000,54585=>1000,54586=>1000,54587=>1000,54588=>1000,54589=>1000,54590=>1000,54591=>1000, -54592=>1000,54593=>1000,54594=>1000,54595=>1000,54596=>1000,54597=>1000,54598=>1000,54599=>1000,54600=>1000,54601=>1000, -54602=>1000,54603=>1000,54604=>1000,54605=>1000,54606=>1000,54607=>1000,54608=>1000,54609=>1000,54610=>1000,54611=>1000, -54612=>1000,54613=>1000,54614=>1000,54615=>1000,54616=>1000,54617=>1000,54618=>1000,54619=>1000,54620=>1000,54621=>1000, -54622=>1000,54623=>1000,54624=>1000,54625=>1000,54626=>1000,54627=>1000,54628=>1000,54629=>1000,54630=>1000,54631=>1000, -54632=>1000,54633=>1000,54634=>1000,54635=>1000,54636=>1000,54637=>1000,54638=>1000,54639=>1000,54640=>1000,54641=>1000, -54642=>1000,54643=>1000,54644=>1000,54645=>1000,54646=>1000,54647=>1000,54648=>1000,54649=>1000,54650=>1000,54651=>1000, -54652=>1000,54653=>1000,54654=>1000,54655=>1000,54656=>1000,54657=>1000,54658=>1000,54659=>1000,54660=>1000,54661=>1000, -54662=>1000,54663=>1000,54664=>1000,54665=>1000,54666=>1000,54667=>1000,54668=>1000,54669=>1000,54670=>1000,54671=>1000, -54672=>1000,54673=>1000,54674=>1000,54675=>1000,54676=>1000,54677=>1000,54678=>1000,54679=>1000,54680=>1000,54681=>1000, -54682=>1000,54683=>1000,54684=>1000,54685=>1000,54686=>1000,54687=>1000,54688=>1000,54689=>1000,54690=>1000,54691=>1000, -54692=>1000,54693=>1000,54694=>1000,54695=>1000,54696=>1000,54697=>1000,54698=>1000,54699=>1000,54700=>1000,54701=>1000, -54702=>1000,54703=>1000,54704=>1000,54705=>1000,54706=>1000,54707=>1000,54708=>1000,54709=>1000,54710=>1000,54711=>1000, -54712=>1000,54713=>1000,54714=>1000,54715=>1000,54716=>1000,54717=>1000,54718=>1000,54719=>1000,54720=>1000,54721=>1000, -54722=>1000,54723=>1000,54724=>1000,54725=>1000,54726=>1000,54727=>1000,54728=>1000,54729=>1000,54730=>1000,54731=>1000, -54732=>1000,54733=>1000,54734=>1000,54735=>1000,54736=>1000,54737=>1000,54738=>1000,54739=>1000,54740=>1000,54741=>1000, -54742=>1000,54743=>1000,54744=>1000,54745=>1000,54746=>1000,54747=>1000,54748=>1000,54749=>1000,54750=>1000,54751=>1000, -54752=>1000,54753=>1000,54754=>1000,54755=>1000,54756=>1000,54757=>1000,54758=>1000,54759=>1000,54760=>1000,54761=>1000, -54762=>1000,54763=>1000,54764=>1000,54765=>1000,54766=>1000,54767=>1000,54768=>1000,54769=>1000,54770=>1000,54771=>1000, -54772=>1000,54773=>1000,54774=>1000,54775=>1000,54776=>1000,54777=>1000,54778=>1000,54779=>1000,54780=>1000,54781=>1000, -54782=>1000,54783=>1000,54784=>1000,54785=>1000,54786=>1000,54787=>1000,54788=>1000,54789=>1000,54790=>1000,54791=>1000, -54792=>1000,54793=>1000,54794=>1000,54795=>1000,54796=>1000,54797=>1000,54798=>1000,54799=>1000,54800=>1000,54801=>1000, -54802=>1000,54803=>1000,54804=>1000,54805=>1000,54806=>1000,54807=>1000,54808=>1000,54809=>1000,54810=>1000,54811=>1000, -54812=>1000,54813=>1000,54814=>1000,54815=>1000,54816=>1000,54817=>1000,54818=>1000,54819=>1000,54820=>1000,54821=>1000, -54822=>1000,54823=>1000,54824=>1000,54825=>1000,54826=>1000,54827=>1000,54828=>1000,54829=>1000,54830=>1000,54831=>1000, -54832=>1000,54833=>1000,54834=>1000,54835=>1000,54836=>1000,54837=>1000,54838=>1000,54839=>1000,54840=>1000,54841=>1000, -54842=>1000,54843=>1000,54844=>1000,54845=>1000,54846=>1000,54847=>1000,54848=>1000,54849=>1000,54850=>1000,54851=>1000, -54852=>1000,54853=>1000,54854=>1000,54855=>1000,54856=>1000,54857=>1000,54858=>1000,54859=>1000,54860=>1000,54861=>1000, -54862=>1000,54863=>1000,54864=>1000,54865=>1000,54866=>1000,54867=>1000,54868=>1000,54869=>1000,54870=>1000,54871=>1000, -54872=>1000,54873=>1000,54874=>1000,54875=>1000,54876=>1000,54877=>1000,54878=>1000,54879=>1000,54880=>1000,54881=>1000, -54882=>1000,54883=>1000,54884=>1000,54885=>1000,54886=>1000,54887=>1000,54888=>1000,54889=>1000,54890=>1000,54891=>1000, -54892=>1000,54893=>1000,54894=>1000,54895=>1000,54896=>1000,54897=>1000,54898=>1000,54899=>1000,54900=>1000,54901=>1000, -54902=>1000,54903=>1000,54904=>1000,54905=>1000,54906=>1000,54907=>1000,54908=>1000,54909=>1000,54910=>1000,54911=>1000, -54912=>1000,54913=>1000,54914=>1000,54915=>1000,54916=>1000,54917=>1000,54918=>1000,54919=>1000,54920=>1000,54921=>1000, -54922=>1000,54923=>1000,54924=>1000,54925=>1000,54926=>1000,54927=>1000,54928=>1000,54929=>1000,54930=>1000,54931=>1000, -54932=>1000,54933=>1000,54934=>1000,54935=>1000,54936=>1000,54937=>1000,54938=>1000,54939=>1000,54940=>1000,54941=>1000, -54942=>1000,54943=>1000,54944=>1000,54945=>1000,54946=>1000,54947=>1000,54948=>1000,54949=>1000,54950=>1000,54951=>1000, -54952=>1000,54953=>1000,54954=>1000,54955=>1000,54956=>1000,54957=>1000,54958=>1000,54959=>1000,54960=>1000,54961=>1000, -54962=>1000,54963=>1000,54964=>1000,54965=>1000,54966=>1000,54967=>1000,54968=>1000,54969=>1000,54970=>1000,54971=>1000, -54972=>1000,54973=>1000,54974=>1000,54975=>1000,54976=>1000,54977=>1000,54978=>1000,54979=>1000,54980=>1000,54981=>1000, -54982=>1000,54983=>1000,54984=>1000,54985=>1000,54986=>1000,54987=>1000,54988=>1000,54989=>1000,54990=>1000,54991=>1000, -54992=>1000,54993=>1000,54994=>1000,54995=>1000,54996=>1000,54997=>1000,54998=>1000,54999=>1000,55000=>1000,55001=>1000, -55002=>1000,55003=>1000,55004=>1000,55005=>1000,55006=>1000,55007=>1000,55008=>1000,55009=>1000,55010=>1000,55011=>1000, -55012=>1000,55013=>1000,55014=>1000,55015=>1000,55016=>1000,55017=>1000,55018=>1000,55019=>1000,55020=>1000,55021=>1000, -55022=>1000,55023=>1000,55024=>1000,55025=>1000,55026=>1000,55027=>1000,55028=>1000,55029=>1000,55030=>1000,55031=>1000, -55032=>1000,55033=>1000,55034=>1000,55035=>1000,55036=>1000,55037=>1000,55038=>1000,55039=>1000,55040=>1000,55041=>1000, -55042=>1000,55043=>1000,55044=>1000,55045=>1000,55046=>1000,55047=>1000,55048=>1000,55049=>1000,55050=>1000,55051=>1000, -55052=>1000,55053=>1000,55054=>1000,55055=>1000,55056=>1000,55057=>1000,55058=>1000,55059=>1000,55060=>1000,55061=>1000, -55062=>1000,55063=>1000,55064=>1000,55065=>1000,55066=>1000,55067=>1000,55068=>1000,55069=>1000,55070=>1000,55071=>1000, -55072=>1000,55073=>1000,55074=>1000,55075=>1000,55076=>1000,55077=>1000,55078=>1000,55079=>1000,55080=>1000,55081=>1000, -55082=>1000,55083=>1000,55084=>1000,55085=>1000,55086=>1000,55087=>1000,55088=>1000,55089=>1000,55090=>1000,55091=>1000, -55092=>1000,55093=>1000,55094=>1000,55095=>1000,55096=>1000,55097=>1000,55098=>1000,55099=>1000,55100=>1000,55101=>1000, -55102=>1000,55103=>1000,55104=>1000,55105=>1000,55106=>1000,55107=>1000,55108=>1000,55109=>1000,55110=>1000,55111=>1000, -55112=>1000,55113=>1000,55114=>1000,55115=>1000,55116=>1000,55117=>1000,55118=>1000,55119=>1000,55120=>1000,55121=>1000, -55122=>1000,55123=>1000,55124=>1000,55125=>1000,55126=>1000,55127=>1000,55128=>1000,55129=>1000,55130=>1000,55131=>1000, -55132=>1000,55133=>1000,55134=>1000,55135=>1000,55136=>1000,55137=>1000,55138=>1000,55139=>1000,55140=>1000,55141=>1000, -55142=>1000,55143=>1000,55144=>1000,55145=>1000,55146=>1000,55147=>1000,55148=>1000,55149=>1000,55150=>1000,55151=>1000, -55152=>1000,55153=>1000,55154=>1000,55155=>1000,55156=>1000,55157=>1000,55158=>1000,55159=>1000,55160=>1000,55161=>1000, -55162=>1000,55163=>1000,55164=>1000,55165=>1000,55166=>1000,55167=>1000,55168=>1000,55169=>1000,55170=>1000,55171=>1000, -55172=>1000,55173=>1000,55174=>1000,55175=>1000,55176=>1000,55177=>1000,55178=>1000,55179=>1000,55180=>1000,55181=>1000, -55182=>1000,55183=>1000,55184=>1000,55185=>1000,55186=>1000,55187=>1000,55188=>1000,55189=>1000,55190=>1000,55191=>1000, -55192=>1000,55193=>1000,55194=>1000,55195=>1000,55196=>1000,55197=>1000,55198=>1000,55199=>1000,55200=>1000,55201=>1000, -55202=>1000,55203=>1000,63744=>1000,63746=>1000,63747=>1000,63748=>1000,63749=>1000,63750=>1000,63751=>1000,63752=>1000, -63753=>1000,63754=>1000,63755=>1000,63756=>1000,63757=>1000,63758=>1000,63759=>1000,63760=>1000,63761=>1000,63762=>1000, -63763=>1000,63764=>1000,63765=>1000,63766=>1000,63767=>1000,63768=>1000,63769=>1000,63770=>1000,63771=>1000,63772=>1000, -63773=>1000,63774=>1000,63775=>1000,63776=>1000,63777=>1000,63778=>1000,63779=>1000,63780=>1000,63781=>1000,63782=>1000, -63783=>1000,63784=>1000,63785=>1000,63786=>1000,63787=>1000,63788=>1000,63789=>1000,63790=>1000,63791=>1000,63792=>1000, -63793=>1000,63794=>1000,63795=>1000,63797=>1000,63798=>1000,63799=>1000,63800=>1000,63801=>1000,63802=>1000,63803=>1000, -63804=>1000,63805=>1000,63806=>1000,63807=>1000,63808=>1000,63809=>1000,63810=>1000,63811=>1000,63812=>1000,63813=>1000, -63814=>1000,63815=>1000,63816=>1000,63817=>1000,63818=>1000,63819=>1000,63820=>1000,63821=>1000,63822=>1000,63823=>1000, -63824=>1000,63825=>1000,63826=>1000,63827=>1000,63828=>1000,63829=>1000,63830=>1000,63831=>1000,63832=>1000,63833=>1000, -63834=>1000,63835=>1000,63836=>1000,63837=>1000,63839=>1000,63840=>1000,63841=>1000,63842=>1000,63844=>1000,63845=>1000, -63846=>1000,63848=>1000,63849=>1000,63850=>1000,63851=>1000,63852=>1000,63853=>1000,63854=>1000,63855=>1000,63856=>1000, -63857=>1000,63858=>1000,63859=>1000,63860=>1000,63861=>1000,63862=>1000,63863=>1000,63864=>1000,63865=>1000,63866=>1000, -63867=>1000,63868=>1000,63869=>1000,63871=>1000,63874=>1000,63875=>1000,63876=>1000,63877=>1000,63878=>1000,63879=>1000, -63880=>1000,63881=>1000,63883=>1000,63884=>1000,63885=>1000,63887=>1000,63888=>1000,63889=>1000,63890=>1000,63891=>1000, -63892=>1000,63893=>1000,63894=>1000,63895=>1000,63896=>1000,63897=>1000,63898=>1000,63899=>1000,63900=>1000,63901=>1000, -63902=>1000,63903=>1000,63904=>1000,63905=>1000,63906=>1000,63907=>1000,63908=>1000,63909=>1000,63910=>1000,63911=>1000, -63912=>1000,63913=>1000,63914=>1000,63915=>1000,63916=>1000,63917=>1000,63918=>1000,63919=>1000,63920=>1000,63921=>1000, -63922=>1000,63923=>1000,63924=>1000,63925=>1000,63926=>1000,63927=>1000,63928=>1000,63929=>1000,63931=>1000,63932=>1000, -63933=>1000,63934=>1000,63935=>1000,63936=>1000,63937=>1000,63938=>1000,63939=>1000,63940=>1000,63941=>1000,63942=>1000, -63943=>1000,63944=>1000,63945=>1000,63946=>1000,63947=>1000,63948=>1000,63949=>1000,63950=>1000,63951=>1000,63952=>1000, -63953=>1000,63954=>1000,63955=>1000,63956=>1000,63957=>1000,63958=>1000,63959=>1000,63960=>1000,63961=>1000,63962=>1000, -63963=>1000,63964=>1000,63965=>1000,63967=>1000,63968=>1000,63969=>1000,63970=>1000,63971=>1000,63972=>1000,63973=>1000, -63974=>1000,63975=>1000,63976=>1000,63977=>1000,63978=>1000,63979=>1000,63980=>1000,63981=>1000,63982=>1000,63983=>1000, -63984=>1000,63985=>1000,63986=>1000,63987=>1000,63988=>1000,63989=>1000,63990=>1000,63991=>1000,63992=>1000,63993=>1000, -63994=>1000,63995=>1000,63996=>1000,63997=>1000,63998=>1000,63999=>1000,64000=>1000,64001=>1000,64002=>1000,64003=>1000, -64004=>1000,64005=>1000,64006=>1000,64007=>1000,64008=>1000,64009=>1000,64010=>1000,64011=>1000,64012=>1000,64013=>1000, -64014=>1000,64015=>1000,64016=>1000,64017=>1000,64018=>1000,64019=>1000,64020=>1000,64021=>1000,64022=>1000,64023=>1000, -64024=>1000,64025=>1000,64026=>1000,64027=>1000,64028=>1000,64029=>1000,64030=>1000,64031=>1000,64032=>1000,64033=>1000, -64034=>1000,64035=>1000,64036=>1000,64037=>1000,64038=>1000,64039=>1000,64040=>1000,64041=>1000,64042=>1000,64043=>1000, -64044=>1000,64045=>1000,65072=>1000,65073=>1000,65075=>1000,65076=>1000,65077=>1000,65078=>1000,65079=>1000,65080=>1000, -65081=>1000,65082=>1000,65083=>1000,65084=>1000,65085=>1000,65086=>1000,65087=>1000,65088=>1000,65089=>1000,65090=>1000, -65091=>1000,65092=>1000,65097=>1000,65098=>1000,65099=>1000,65100=>1000,65101=>1000,65102=>1000,65103=>1000,65377=>500, -65378=>500,65379=>500,65380=>500,65381=>500,65382=>500,65383=>500,65384=>500,65385=>500,65386=>500,65387=>500, -65388=>500,65389=>500,65390=>500,65391=>500,65392=>500,65393=>500,65394=>500,65395=>500,65396=>500,65397=>500, -65398=>500,65399=>500,65400=>500,65401=>500,65402=>500,65403=>500,65404=>500,65405=>500,65406=>500,65407=>500, -65408=>500,65409=>500,65410=>500,65411=>500,65412=>500,65413=>500,65414=>500,65415=>500,65416=>500,65417=>500, -65418=>500,65419=>500,65420=>500,65421=>500,65422=>500,65423=>500,65424=>500,65425=>500,65426=>500,65427=>500, -65428=>500,65429=>500,65430=>500,65431=>500,65432=>500,65433=>500,65434=>500,65435=>500,65436=>500,65437=>500, -65438=>500,65439=>500); -$enc=''; -$diff=''; -$file='droidsansfallback.z'; -$ctg='droidsansfallback.ctg.z'; -$originalsize=3189464; -?> \ No newline at end of file diff --git a/lib/combodo/tcpdf/fonts/droidsansfallback.z b/lib/combodo/tcpdf/fonts/droidsansfallback.z deleted file mode 100644 index 852eafe33..000000000 Binary files a/lib/combodo/tcpdf/fonts/droidsansfallback.z and /dev/null differ diff --git a/lib/combodo/tcpdf/fonts/helvetica.php b/lib/combodo/tcpdf/fonts/helvetica.php deleted file mode 100644 index d1aa6d851..000000000 --- a/lib/combodo/tcpdf/fonts/helvetica.php +++ /dev/null @@ -1,13 +0,0 @@ -32,'FontBBox'=>'[-166 -225 1000 931]','ItalicAngle'=>0,'Ascent'=>931,'Descent'=>-225,'Leading'=>0,'CapHeight'=>718,'XHeight'=>523,'StemV'=>88,'StemH'=>76,'AvgWidth'=>513,'MaxWidth'=>1015,'MissingWidth'=>513); -$cw=array(0=>500,1=>500,2=>500,3=>500,4=>500,5=>500,6=>500,7=>500,8=>500,9=>500,10=>500,11=>500,12=>500,13=>500,14=>500,15=>500,16=>500,17=>500,18=>500,19=>500,20=>500,21=>500,22=>500,23=>500,24=>500,25=>500,26=>500,27=>500,28=>500,29=>500,30=>500,31=>500,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>277,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>500,128=>655,129=>500,130=>222,131=>278,132=>333,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>250,140=>1000,141=>500,142=>611,143=>500,144=>500,145=>222,146=>221,147=>333,148=>333,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>500,155=>250,156=>938,157=>500,158=>500,159=>667,160=>278,161=>278,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>448,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,178=>350,179=>350,180=>333,181=>556,182=>537,183=>278,184=>333,185=>350,186=>365,187=>448,188=>869,189=>869,190=>879,191=>556,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>666,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>896,231=>500,232=>556,233=>556,234=>556,235=>556,236=>251,237=>251,238=>251,239=>251,240=>556,241=>556,242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>555,255=>500); - -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/helveticab.php b/lib/combodo/tcpdf/fonts/helveticab.php deleted file mode 100644 index 8d6047f6a..000000000 --- a/lib/combodo/tcpdf/fonts/helveticab.php +++ /dev/null @@ -1,12 +0,0 @@ -32,'FontBBox'=>'[-170 -228 1003 962]','ItalicAngle'=>0,'Ascent'=>962,'Descent'=>-228,'Leading'=>0,'CapHeight'=>718,'XHeight'=>532,'StemV'=>140,'StemH'=>118,'AvgWidth'=>535,'MaxWidth'=>1000,'MissingWidth'=>535); -$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>238,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>350,128=>556,129=>350,130=>278,131=>556,132=>500,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>278,146=>278,147=>500,148=>500,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>556,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>611,182=>556,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>556,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>611,241=>611,242=>611,243=>611,244=>611,245=>611,246=>611,247=>584,248=>611,249=>611,250=>611,251=>611,252=>611,253=>556,254=>611,255=>556); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/helveticabi.php b/lib/combodo/tcpdf/fonts/helveticabi.php deleted file mode 100644 index e2ecf38df..000000000 --- a/lib/combodo/tcpdf/fonts/helveticabi.php +++ /dev/null @@ -1,12 +0,0 @@ -96,'FontBBox'=>'[-174 -228 1114 962]','ItalicAngle'=>-12,'Ascent'=>962,'Descent'=>-228,'Leading'=>0,'CapHeight'=>718,'XHeight'=>532,'StemV'=>140,'StemH'=>118,'AvgWidth'=>535,'MaxWidth'=>1000,'MissingWidth'=>535); -$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>238,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>350,128=>556,129=>350,130=>278,131=>556,132=>500,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>278,146=>278,147=>500,148=>500,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>556,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>611,182=>556,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>556,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>611,241=>611,242=>611,243=>611,244=>611,245=>611,246=>611,247=>584,248=>611,249=>611,250=>611,251=>611,252=>611,253=>556,254=>611,255=>556); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/helveticai.php b/lib/combodo/tcpdf/fonts/helveticai.php deleted file mode 100644 index 0404aebd6..000000000 --- a/lib/combodo/tcpdf/fonts/helveticai.php +++ /dev/null @@ -1,12 +0,0 @@ -96,'FontBBox'=>'[-170 -225 1116 931]','ItalicAngle'=>-12,'Ascent'=>931,'Descent'=>-225,'Leading'=>0,'CapHeight'=>718,'XHeight'=>523,'StemV'=>88,'StemH'=>76,'AvgWidth'=>513,'MaxWidth'=>1015,'MissingWidth'=>513); -$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>278,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>350,128=>556,129=>350,130=>222,131=>556,132=>333,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>222,146=>222,147=>333,148=>333,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>500,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>556,182=>537,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>500,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>556,241=>556,242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/symbol.php b/lib/combodo/tcpdf/fonts/symbol.php deleted file mode 100644 index 15f7f1ddd..000000000 --- a/lib/combodo/tcpdf/fonts/symbol.php +++ /dev/null @@ -1,12 +0,0 @@ -4,'FontBBox'=>'[-180 -293 1090 1010]','ItalicAngle'=>0,'Ascent'=>1010,'Descent'=>-293,'Leading'=>0,'CapHeight'=>1010,'StemV'=>85,'StemH'=>92,'AvgWidth'=>587,'MaxWidth'=>1042,'MissingWidth'=>587); -$cw=array(0=>587,1=>587,2=>587,3=>587,4=>587,5=>587,6=>587,7=>587,8=>587,9=>587,10=>587,11=>587,12=>587,13=>587,14=>587,15=>587,16=>587,17=>587,18=>587,19=>587,20=>587,21=>587,22=>587,23=>587,24=>587,25=>587,26=>587,27=>587,28=>587,29=>587,30=>587,31=>587,32=>250,33=>333,34=>713,35=>500,36=>549,37=>833,38=>778,39=>439,40=>333,41=>333,42=>500,43=>549,44=>250,45=>549,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>278,59=>278,60=>549,61=>549,62=>549,63=>444,64=>549,65=>722,66=>667,67=>722,68=>612,69=>611,70=>763,71=>603,72=>722,73=>333,74=>631,75=>722,76=>686,77=>889,78=>722,79=>722,80=>768,81=>741,82=>556,83=>592,84=>611,85=>690,86=>439,87=>768,88=>645,89=>795,90=>611,91=>333,92=>863,93=>333,94=>658,95=>500,96=>500,97=>631,98=>549,99=>549,100=>494,101=>439,102=>521,103=>411,104=>603,105=>329,106=>603,107=>549,108=>549,109=>576,110=>521,111=>549,112=>549,113=>521,114=>549,115=>603,116=>439,117=>576,118=>713,119=>686,120=>493,121=>686,122=>494,123=>480,124=>200,125=>480,126=>549,127=>587,128=>587,129=>587,130=>587,131=>587,132=>587,133=>587,134=>587,135=>587,136=>587,137=>587,138=>587,139=>587,140=>587,141=>587,142=>587,143=>587,144=>587,145=>587,146=>587,147=>587,148=>587,149=>587,150=>587,151=>587,152=>587,153=>587,154=>587,155=>587,156=>587,157=>587,158=>587,159=>587,160=>750,161=>620,162=>247,163=>549,164=>167,165=>713,166=>500,167=>753,168=>753,169=>753,170=>753,171=>1042,172=>987,173=>603,174=>987,175=>603,176=>400,177=>549,178=>411,179=>549,180=>549,181=>713,182=>494,183=>460,184=>549,185=>549,186=>549,187=>549,188=>1000,189=>603,190=>1000,191=>658,192=>823,193=>686,194=>795,195=>987,196=>768,197=>768,198=>823,199=>768,200=>768,201=>713,202=>713,203=>713,204=>713,205=>713,206=>713,207=>713,208=>768,209=>713,210=>790,211=>790,212=>890,213=>823,214=>549,215=>250,216=>713,217=>603,218=>603,219=>1042,220=>987,221=>603,222=>987,223=>603,224=>494,225=>329,226=>790,227=>790,228=>786,229=>713,230=>384,231=>384,232=>384,233=>384,234=>384,235=>384,236=>494,237=>494,238=>494,239=>494,240=>587,241=>329,242=>274,243=>686,244=>686,245=>686,246=>384,247=>384,248=>384,249=>384,250=>384,251=>384,252=>494,253=>494,254=>494,255=>587); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/times.php b/lib/combodo/tcpdf/fonts/times.php deleted file mode 100644 index cfcaf06cc..000000000 --- a/lib/combodo/tcpdf/fonts/times.php +++ /dev/null @@ -1,12 +0,0 @@ -32,'FontBBox'=>'[-168 -218 1000 898]','ItalicAngle'=>0,'Ascent'=>898,'Descent'=>-218,'Leading'=>0,'CapHeight'=>662,'XHeight'=>450,'StemV'=>84,'StemH'=>28,'AvgWidth'=>495,'MaxWidth'=>1000,'MissingWidth'=>495); -$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>333,34=>408,35=>500,36=>500,37=>833,38=>778,39=>180,40=>333,41=>333,42=>500,43=>564,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>278,59=>278,60=>564,61=>564,62=>564,63=>444,64=>921,65=>722,66=>667,67=>667,68=>722,69=>611,70=>556,71=>722,72=>722,73=>333,74=>389,75=>722,76=>611,77=>889,78=>722,79=>722,80=>556,81=>722,82=>667,83=>556,84=>611,85=>722,86=>722,87=>944,88=>722,89=>722,90=>611,91=>333,92=>278,93=>333,94=>469,95=>500,96=>333,97=>444,98=>500,99=>444,100=>500,101=>444,102=>333,103=>500,104=>500,105=>278,106=>278,107=>500,108=>278,109=>778,110=>500,111=>500,112=>500,113=>500,114=>333,115=>389,116=>278,117=>500,118=>500,119=>722,120=>500,121=>500,122=>444,123=>480,124=>200,125=>480,126=>541,127=>350,128=>500,129=>350,130=>333,131=>500,132=>444,133=>1000,134=>500,135=>500,136=>333,137=>1000,138=>556,139=>333,140=>889,141=>350,142=>611,143=>350,144=>350,145=>333,146=>333,147=>444,148=>444,149=>350,150=>500,151=>1000,152=>333,153=>980,154=>389,155=>333,156=>722,157=>350,158=>444,159=>722,160=>250,161=>333,162=>500,163=>500,164=>500,165=>500,166=>200,167=>500,168=>333,169=>760,170=>276,171=>500,172=>564,173=>333,174=>760,175=>333,176=>400,177=>564,178=>300,179=>300,180=>333,181=>500,182=>453,183=>250,184=>333,185=>300,186=>310,187=>500,188=>750,189=>750,190=>750,191=>444,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>889,199=>667,200=>611,201=>611,202=>611,203=>611,204=>333,205=>333,206=>333,207=>333,208=>722,209=>722,210=>722,211=>722,212=>722,213=>722,214=>722,215=>564,216=>722,217=>722,218=>722,219=>722,220=>722,221=>722,222=>556,223=>500,224=>444,225=>444,226=>444,227=>444,228=>444,229=>444,230=>667,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>500,242=>500,243=>500,244=>500,245=>500,246=>500,247=>564,248=>500,249=>500,250=>500,251=>500,252=>500,253=>500,254=>500,255=>500); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/timesb.php b/lib/combodo/tcpdf/fonts/timesb.php deleted file mode 100644 index 9c41a7b51..000000000 --- a/lib/combodo/tcpdf/fonts/timesb.php +++ /dev/null @@ -1,12 +0,0 @@ -32,'FontBBox'=>'[-168 -218 1000 935]','ItalicAngle'=>0,'Ascent'=>935,'Descent'=>-218,'Leading'=>0,'CapHeight'=>676,'XHeight'=>461,'StemV'=>139,'StemH'=>44,'AvgWidth'=>516,'MaxWidth'=>1000,'MissingWidth'=>516); -$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>333,34=>555,35=>500,36=>500,37=>1000,38=>833,39=>278,40=>333,41=>333,42=>500,43=>570,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>570,61=>570,62=>570,63=>500,64=>930,65=>722,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>778,73=>389,74=>500,75=>778,76=>667,77=>944,78=>722,79=>778,80=>611,81=>778,82=>722,83=>556,84=>667,85=>722,86=>722,87=>1000,88=>722,89=>722,90=>667,91=>333,92=>278,93=>333,94=>581,95=>500,96=>333,97=>500,98=>556,99=>444,100=>556,101=>444,102=>333,103=>500,104=>556,105=>278,106=>333,107=>556,108=>278,109=>833,110=>556,111=>500,112=>556,113=>556,114=>444,115=>389,116=>333,117=>556,118=>500,119=>722,120=>500,121=>500,122=>444,123=>394,124=>220,125=>394,126=>520,127=>350,128=>500,129=>350,130=>333,131=>500,132=>500,133=>1000,134=>500,135=>500,136=>333,137=>1000,138=>556,139=>333,140=>1000,141=>350,142=>667,143=>350,144=>350,145=>333,146=>333,147=>500,148=>500,149=>350,150=>500,151=>1000,152=>333,153=>1000,154=>389,155=>333,156=>722,157=>350,158=>444,159=>722,160=>250,161=>333,162=>500,163=>500,164=>500,165=>500,166=>220,167=>500,168=>333,169=>747,170=>300,171=>500,172=>570,173=>333,174=>747,175=>333,176=>400,177=>570,178=>300,179=>300,180=>333,181=>556,182=>540,183=>250,184=>333,185=>300,186=>330,187=>500,188=>750,189=>750,190=>750,191=>500,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>389,205=>389,206=>389,207=>389,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>570,216=>778,217=>722,218=>722,219=>722,220=>722,221=>722,222=>611,223=>556,224=>500,225=>500,226=>500,227=>500,228=>500,229=>500,230=>722,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>556,242=>500,243=>500,244=>500,245=>500,246=>500,247=>570,248=>500,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/timesbi.php b/lib/combodo/tcpdf/fonts/timesbi.php deleted file mode 100644 index 4feed7489..000000000 --- a/lib/combodo/tcpdf/fonts/timesbi.php +++ /dev/null @@ -1,12 +0,0 @@ -96,'FontBBox'=>'[-200 -218 996 921]','ItalicAngle'=>-15,'Ascent'=>921,'Descent'=>-218,'Leading'=>0,'CapHeight'=>669,'XHeight'=>462,'StemV'=>121,'StemH'=>42,'AvgWidth'=>501,'MaxWidth'=>1000,'MissingWidth'=>501); -$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>389,34=>555,35=>500,36=>500,37=>833,38=>778,39=>278,40=>333,41=>333,42=>500,43=>570,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>570,61=>570,62=>570,63=>500,64=>832,65=>667,66=>667,67=>667,68=>722,69=>667,70=>667,71=>722,72=>778,73=>389,74=>500,75=>667,76=>611,77=>889,78=>722,79=>722,80=>611,81=>722,82=>667,83=>556,84=>611,85=>722,86=>667,87=>889,88=>667,89=>611,90=>611,91=>333,92=>278,93=>333,94=>570,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,102=>333,103=>500,104=>556,105=>278,106=>278,107=>500,108=>278,109=>778,110=>556,111=>500,112=>500,113=>500,114=>389,115=>389,116=>278,117=>556,118=>444,119=>667,120=>500,121=>444,122=>389,123=>348,124=>220,125=>348,126=>570,127=>350,128=>500,129=>350,130=>333,131=>500,132=>500,133=>1000,134=>500,135=>500,136=>333,137=>1000,138=>556,139=>333,140=>944,141=>350,142=>611,143=>350,144=>350,145=>333,146=>333,147=>500,148=>500,149=>350,150=>500,151=>1000,152=>333,153=>1000,154=>389,155=>333,156=>722,157=>350,158=>389,159=>611,160=>250,161=>389,162=>500,163=>500,164=>500,165=>500,166=>220,167=>500,168=>333,169=>747,170=>266,171=>500,172=>606,173=>333,174=>747,175=>333,176=>400,177=>570,178=>300,179=>300,180=>333,181=>576,182=>500,183=>250,184=>333,185=>300,186=>300,187=>500,188=>750,189=>750,190=>750,191=>500,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>944,199=>667,200=>667,201=>667,202=>667,203=>667,204=>389,205=>389,206=>389,207=>389,208=>722,209=>722,210=>722,211=>722,212=>722,213=>722,214=>722,215=>570,216=>722,217=>722,218=>722,219=>722,220=>722,221=>611,222=>611,223=>500,224=>500,225=>500,226=>500,227=>500,228=>500,229=>500,230=>722,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>556,242=>500,243=>500,244=>500,245=>500,246=>500,247=>570,248=>500,249=>556,250=>556,251=>556,252=>556,253=>444,254=>500,255=>444); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/timesi.php b/lib/combodo/tcpdf/fonts/timesi.php deleted file mode 100644 index 1e8b67349..000000000 --- a/lib/combodo/tcpdf/fonts/timesi.php +++ /dev/null @@ -1,12 +0,0 @@ -96,'FontBBox'=>'[-169 -217 1010 883]','ItalicAngle'=>-15.5,'Ascent'=>883,'Descent'=>-217,'Leading'=>0,'CapHeight'=>653,'XHeight'=>441,'StemV'=>76,'StemH'=>32,'AvgWidth'=>491,'MaxWidth'=>1000,'MissingWidth'=>491); -$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>333,34=>420,35=>500,36=>500,37=>833,38=>778,39=>214,40=>333,41=>333,42=>500,43=>675,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>675,61=>675,62=>675,63=>500,64=>920,65=>611,66=>611,67=>667,68=>722,69=>611,70=>611,71=>722,72=>722,73=>333,74=>444,75=>667,76=>556,77=>833,78=>667,79=>722,80=>611,81=>722,82=>611,83=>500,84=>556,85=>722,86=>611,87=>833,88=>611,89=>556,90=>556,91=>389,92=>278,93=>389,94=>422,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,102=>278,103=>500,104=>500,105=>278,106=>278,107=>444,108=>278,109=>722,110=>500,111=>500,112=>500,113=>500,114=>389,115=>389,116=>278,117=>500,118=>444,119=>667,120=>444,121=>444,122=>389,123=>400,124=>275,125=>400,126=>541,127=>350,128=>500,129=>350,130=>333,131=>500,132=>556,133=>889,134=>500,135=>500,136=>333,137=>1000,138=>500,139=>333,140=>944,141=>350,142=>556,143=>350,144=>350,145=>333,146=>333,147=>556,148=>556,149=>350,150=>500,151=>889,152=>333,153=>980,154=>389,155=>333,156=>667,157=>350,158=>389,159=>556,160=>250,161=>389,162=>500,163=>500,164=>500,165=>500,166=>275,167=>500,168=>333,169=>760,170=>276,171=>500,172=>675,173=>333,174=>760,175=>333,176=>400,177=>675,178=>300,179=>300,180=>333,181=>500,182=>523,183=>250,184=>333,185=>300,186=>310,187=>500,188=>750,189=>750,190=>750,191=>500,192=>611,193=>611,194=>611,195=>611,196=>611,197=>611,198=>889,199=>667,200=>611,201=>611,202=>611,203=>611,204=>333,205=>333,206=>333,207=>333,208=>722,209=>667,210=>722,211=>722,212=>722,213=>722,214=>722,215=>675,216=>722,217=>722,218=>722,219=>722,220=>722,221=>556,222=>611,223=>500,224=>500,225=>500,226=>500,227=>500,228=>500,229=>500,230=>667,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>500,242=>500,243=>500,244=>500,245=>500,246=>500,247=>675,248=>500,249=>500,250=>500,251=>500,252=>500,253=>444,254=>500,255=>444); -// --- EOF --- diff --git a/lib/combodo/tcpdf/fonts/zapfdingbats.php b/lib/combodo/tcpdf/fonts/zapfdingbats.php deleted file mode 100644 index 4c0bd75d5..000000000 --- a/lib/combodo/tcpdf/fonts/zapfdingbats.php +++ /dev/null @@ -1,12 +0,0 @@ -4,'FontBBox'=>'[-1 -143 981 820]','ItalicAngle'=>0,'Ascent'=>820,'Descent'=>-143,'Leading'=>0,'CapHeight'=>820,'StemV'=>90,'StemH'=>28,'AvgWidth'=>746,'MaxWidth'=>1016,'MissingWidth'=>746); -$cw=array(0=>746,1=>746,2=>746,3=>746,4=>746,5=>746,6=>746,7=>746,8=>746,9=>746,10=>746,11=>746,12=>746,13=>746,14=>746,15=>746,16=>746,17=>746,18=>746,19=>746,20=>746,21=>746,22=>746,23=>746,24=>746,25=>746,26=>746,27=>746,28=>746,29=>746,30=>746,31=>746,32=>278,33=>974,34=>961,35=>974,36=>980,37=>719,38=>789,39=>790,40=>791,41=>690,42=>960,43=>939,44=>549,45=>855,46=>911,47=>933,48=>911,49=>945,50=>974,51=>755,52=>846,53=>762,54=>761,55=>571,56=>677,57=>763,58=>760,59=>759,60=>754,61=>494,62=>552,63=>537,64=>577,65=>692,66=>786,67=>788,68=>788,69=>790,70=>793,71=>794,72=>816,73=>823,74=>789,75=>841,76=>823,77=>833,78=>816,79=>831,80=>923,81=>744,82=>723,83=>749,84=>790,85=>792,86=>695,87=>776,88=>768,89=>792,90=>759,91=>707,92=>708,93=>682,94=>701,95=>826,96=>815,97=>789,98=>789,99=>707,100=>687,101=>696,102=>689,103=>786,104=>787,105=>713,106=>791,107=>785,108=>791,109=>873,110=>761,111=>762,112=>762,113=>759,114=>759,115=>892,116=>892,117=>788,118=>784,119=>438,120=>138,121=>277,122=>415,123=>392,124=>392,125=>668,126=>668,127=>746,128=>390,129=>390,130=>317,131=>317,132=>276,133=>276,134=>509,135=>509,136=>410,137=>410,138=>234,139=>234,140=>334,141=>334,142=>746,143=>746,144=>746,145=>746,146=>746,147=>746,148=>746,149=>746,150=>746,151=>746,152=>746,153=>746,154=>746,155=>746,156=>746,157=>746,158=>746,159=>746,160=>746,161=>732,162=>544,163=>544,164=>910,165=>667,166=>760,167=>760,168=>776,169=>595,170=>694,171=>626,172=>788,173=>788,174=>788,175=>788,176=>788,177=>788,178=>788,179=>788,180=>788,181=>788,182=>788,183=>788,184=>788,185=>788,186=>788,187=>788,188=>788,189=>788,190=>788,191=>788,192=>788,193=>788,194=>788,195=>788,196=>788,197=>788,198=>788,199=>788,200=>788,201=>788,202=>788,203=>788,204=>788,205=>788,206=>788,207=>788,208=>788,209=>788,210=>788,211=>788,212=>894,213=>838,214=>1016,215=>458,216=>748,217=>924,218=>748,219=>918,220=>927,221=>928,222=>928,223=>834,224=>873,225=>828,226=>924,227=>924,228=>917,229=>930,230=>931,231=>463,232=>883,233=>836,234=>836,235=>867,236=>867,237=>696,238=>696,239=>874,240=>746,241=>874,242=>760,243=>946,244=>771,245=>865,246=>771,247=>888,248=>967,249=>888,250=>831,251=>873,252=>927,253=>970,254=>918,255=>746); -// --- EOF --- diff --git a/lib/combodo/tcpdf/include/barcodes/datamatrix.php b/lib/combodo/tcpdf/include/barcodes/datamatrix.php deleted file mode 100644 index 38bd625f7..000000000 --- a/lib/combodo/tcpdf/include/barcodes/datamatrix.php +++ /dev/null @@ -1,1176 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// DESCRIPTION : -// -// Class to create DataMatrix ECC 200 barcode arrays for TCPDF class. -// DataMatrix (ISO/IEC 16022:2006) is a 2-dimensional bar code. -//============================================================+ - -/** -* @file -* Class to create DataMatrix ECC 200 barcode arrays for TCPDF class. -* DataMatrix (ISO/IEC 16022:2006) is a 2-dimensional bar code. -* -* @package com.tecnick.tcpdf -* @author Nicola Asuni -* @version 1.0.008 -*/ - -// custom definitions -if (!defined('DATAMATRIXDEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('DATAMATRIXDEFS', true); - - // ----------------------------------------------------- - -} // end of custom definitions - -// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# - - -/** -* ASCII encoding: ASCII character 0 to 127 (1 byte per CW) -*/ -define('ENC_ASCII', 0); - -/** -* C40 encoding: Upper-case alphanumeric (3/2 bytes per CW) -*/ -define('ENC_C40', 1); - -/** -* TEXT encoding: Lower-case alphanumeric (3/2 bytes per CW) -*/ -define('ENC_TXT', 2); - -/** -* X12 encoding: ANSI X12 (3/2 byte per CW) -*/ -define('ENC_X12', 3); - -/** -* EDIFACT encoding: ASCII character 32 to 94 (4/3 bytes per CW) -*/ -define('ENC_EDF', 4); - -/** -* BASE 256 encoding: ASCII character 0 to 255 (1 byte per CW) -*/ -define('ENC_BASE256', 5); - -/** -* ASCII extended encoding: ASCII character 128 to 255 (1/2 byte per CW) -*/ -define('ENC_ASCII_EXT', 6); - -/** -* ASCII number encoding: ASCII digits (2 bytes per CW) -*/ -define('ENC_ASCII_NUM', 7); - -/** -* @class Datamatrix -* Class to create DataMatrix ECC 200 barcode arrays for TCPDF class. -* DataMatrix (ISO/IEC 16022:2006) is a 2-dimensional bar code. -* -* @package com.tecnick.tcpdf -* @author Nicola Asuni -* @version 1.0.004 -*/ -class Datamatrix { - - /** - * Barcode array to be returned which is readable by TCPDF. - * @protected - */ - protected $barcode_array = array(); - - /** - * Store last used encoding for data codewords. - * @protected - */ - protected $last_enc = ENC_ASCII; - - /** - * Table of Data Matrix ECC 200 Symbol Attributes:
      - *
    • total matrix rows (including finder pattern)
    • - *
    • total matrix cols (including finder pattern)
    • - *
    • total matrix rows (without finder pattern)
    • - *
    • total matrix cols (without finder pattern)
    • - *
    • region data rows (with finder pattern)
    • - *
    • region data col (with finder pattern)
    • - *
    • region data rows (without finder pattern)
    • - *
    • region data col (without finder pattern)
    • - *
    • horizontal regions
    • - *
    • vertical regions
    • - *
    • regions
    • - *
    • data codewords
    • - *
    • error codewords
    • - *
    • blocks
    • - *
    • data codewords per block
    • - *
    • error codewords per block
    • - *
    - * @protected - */ - protected $symbattr = array( - // square form --------------------------------------------------------------------------------------- - array(0x00a,0x00a,0x008,0x008,0x00a,0x00a,0x008,0x008,0x001,0x001,0x001,0x003,0x005,0x001,0x003,0x005), // 10x10 - array(0x00c,0x00c,0x00a,0x00a,0x00c,0x00c,0x00a,0x00a,0x001,0x001,0x001,0x005,0x007,0x001,0x005,0x007), // 12x12 - array(0x00e,0x00e,0x00c,0x00c,0x00e,0x00e,0x00c,0x00c,0x001,0x001,0x001,0x008,0x00a,0x001,0x008,0x00a), // 14x14 - array(0x010,0x010,0x00e,0x00e,0x010,0x010,0x00e,0x00e,0x001,0x001,0x001,0x00c,0x00c,0x001,0x00c,0x00c), // 16x16 - array(0x012,0x012,0x010,0x010,0x012,0x012,0x010,0x010,0x001,0x001,0x001,0x012,0x00e,0x001,0x012,0x00e), // 18x18 - array(0x014,0x014,0x012,0x012,0x014,0x014,0x012,0x012,0x001,0x001,0x001,0x016,0x012,0x001,0x016,0x012), // 20x20 - array(0x016,0x016,0x014,0x014,0x016,0x016,0x014,0x014,0x001,0x001,0x001,0x01e,0x014,0x001,0x01e,0x014), // 22x22 - array(0x018,0x018,0x016,0x016,0x018,0x018,0x016,0x016,0x001,0x001,0x001,0x024,0x018,0x001,0x024,0x018), // 24x24 - array(0x01a,0x01a,0x018,0x018,0x01a,0x01a,0x018,0x018,0x001,0x001,0x001,0x02c,0x01c,0x001,0x02c,0x01c), // 26x26 - array(0x020,0x020,0x01c,0x01c,0x010,0x010,0x00e,0x00e,0x002,0x002,0x004,0x03e,0x024,0x001,0x03e,0x024), // 32x32 - array(0x024,0x024,0x020,0x020,0x012,0x012,0x010,0x010,0x002,0x002,0x004,0x056,0x02a,0x001,0x056,0x02a), // 36x36 - array(0x028,0x028,0x024,0x024,0x014,0x014,0x012,0x012,0x002,0x002,0x004,0x072,0x030,0x001,0x072,0x030), // 40x40 - array(0x02c,0x02c,0x028,0x028,0x016,0x016,0x014,0x014,0x002,0x002,0x004,0x090,0x038,0x001,0x090,0x038), // 44x44 - array(0x030,0x030,0x02c,0x02c,0x018,0x018,0x016,0x016,0x002,0x002,0x004,0x0ae,0x044,0x001,0x0ae,0x044), // 48x48 - array(0x034,0x034,0x030,0x030,0x01a,0x01a,0x018,0x018,0x002,0x002,0x004,0x0cc,0x054,0x002,0x066,0x02a), // 52x52 - array(0x040,0x040,0x038,0x038,0x010,0x010,0x00e,0x00e,0x004,0x004,0x010,0x118,0x070,0x002,0x08c,0x038), // 64x64 - array(0x048,0x048,0x040,0x040,0x012,0x012,0x010,0x010,0x004,0x004,0x010,0x170,0x090,0x004,0x05c,0x024), // 72x72 - array(0x050,0x050,0x048,0x048,0x014,0x014,0x012,0x012,0x004,0x004,0x010,0x1c8,0x0c0,0x004,0x072,0x030), // 80x80 - array(0x058,0x058,0x050,0x050,0x016,0x016,0x014,0x014,0x004,0x004,0x010,0x240,0x0e0,0x004,0x090,0x038), // 88x88 - array(0x060,0x060,0x058,0x058,0x018,0x018,0x016,0x016,0x004,0x004,0x010,0x2b8,0x110,0x004,0x0ae,0x044), // 96x96 - array(0x068,0x068,0x060,0x060,0x01a,0x01a,0x018,0x018,0x004,0x004,0x010,0x330,0x150,0x006,0x088,0x038), // 104x104 - array(0x078,0x078,0x06c,0x06c,0x014,0x014,0x012,0x012,0x006,0x006,0x024,0x41a,0x198,0x006,0x0af,0x044), // 120x120 - array(0x084,0x084,0x078,0x078,0x016,0x016,0x014,0x014,0x006,0x006,0x024,0x518,0x1f0,0x008,0x0a3,0x03e), // 132x132 - array(0x090,0x090,0x084,0x084,0x018,0x018,0x016,0x016,0x006,0x006,0x024,0x616,0x26c,0x00a,0x09c,0x03e), // 144x144 - // rectangular form (currently unused) --------------------------------------------------------------------------- - array(0x008,0x012,0x006,0x010,0x008,0x012,0x006,0x010,0x001,0x001,0x001,0x005,0x007,0x001,0x005,0x007), // 8x18 - array(0x008,0x020,0x006,0x01c,0x008,0x010,0x006,0x00e,0x001,0x002,0x002,0x00a,0x00b,0x001,0x00a,0x00b), // 8x32 - array(0x00c,0x01a,0x00a,0x018,0x00c,0x01a,0x00a,0x018,0x001,0x001,0x001,0x010,0x00e,0x001,0x010,0x00e), // 12x26 - array(0x00c,0x024,0x00a,0x020,0x00c,0x012,0x00a,0x010,0x001,0x002,0x002,0x00c,0x012,0x001,0x00c,0x012), // 12x36 - array(0x010,0x024,0x00e,0x020,0x010,0x012,0x00e,0x010,0x001,0x002,0x002,0x020,0x018,0x001,0x020,0x018), // 16x36 - array(0x010,0x030,0x00e,0x02c,0x010,0x018,0x00e,0x016,0x001,0x002,0x002,0x031,0x01c,0x001,0x031,0x01c) // 16x48 - ); - - /** - * Map encodation modes whit character sets. - * @protected - */ - protected $chset_id = array(ENC_C40 => 'C40', ENC_TXT => 'TXT', ENC_X12 =>'X12'); - - /** - * Basic set of characters for each encodation mode. - * @protected - */ - protected $chset = array( - 'C40' => array( // Basic set for C40 ---------------------------------------------------------------------------- - 'S1'=>0x00,'S2'=>0x01,'S3'=>0x02,0x20=>0x03,0x30=>0x04,0x31=>0x05,0x32=>0x06,0x33=>0x07,0x34=>0x08,0x35=>0x09, // - 0x36=>0x0a,0x37=>0x0b,0x38=>0x0c,0x39=>0x0d,0x41=>0x0e,0x42=>0x0f,0x43=>0x10,0x44=>0x11,0x45=>0x12,0x46=>0x13, // - 0x47=>0x14,0x48=>0x15,0x49=>0x16,0x4a=>0x17,0x4b=>0x18,0x4c=>0x19,0x4d=>0x1a,0x4e=>0x1b,0x4f=>0x1c,0x50=>0x1d, // - 0x51=>0x1e,0x52=>0x1f,0x53=>0x20,0x54=>0x21,0x55=>0x22,0x56=>0x23,0x57=>0x24,0x58=>0x25,0x59=>0x26,0x5a=>0x27),// - 'TXT' => array( // Basic set for TEXT --------------------------------------------------------------------------- - 'S1'=>0x00,'S2'=>0x01,'S3'=>0x02,0x20=>0x03,0x30=>0x04,0x31=>0x05,0x32=>0x06,0x33=>0x07,0x34=>0x08,0x35=>0x09, // - 0x36=>0x0a,0x37=>0x0b,0x38=>0x0c,0x39=>0x0d,0x61=>0x0e,0x62=>0x0f,0x63=>0x10,0x64=>0x11,0x65=>0x12,0x66=>0x13, // - 0x67=>0x14,0x68=>0x15,0x69=>0x16,0x6a=>0x17,0x6b=>0x18,0x6c=>0x19,0x6d=>0x1a,0x6e=>0x1b,0x6f=>0x1c,0x70=>0x1d, // - 0x71=>0x1e,0x72=>0x1f,0x73=>0x20,0x74=>0x21,0x75=>0x22,0x76=>0x23,0x77=>0x24,0x78=>0x25,0x79=>0x26,0x7a=>0x27),// - 'SH1' => array( // Shift 1 set ---------------------------------------------------------------------------------- - 0x00=>0x00,0x01=>0x01,0x02=>0x02,0x03=>0x03,0x04=>0x04,0x05=>0x05,0x06=>0x06,0x07=>0x07,0x08=>0x08,0x09=>0x09, // - 0x0a=>0x0a,0x0b=>0x0b,0x0c=>0x0c,0x0d=>0x0d,0x0e=>0x0e,0x0f=>0x0f,0x10=>0x10,0x11=>0x11,0x12=>0x12,0x13=>0x13, // - 0x14=>0x14,0x15=>0x15,0x16=>0x16,0x17=>0x17,0x18=>0x18,0x19=>0x19,0x1a=>0x1a,0x1b=>0x1b,0x1c=>0x1c,0x1d=>0x1d, // - 0x1e=>0x1e,0x1f=>0x1f), // - 'SH2' => array( // Shift 2 set ---------------------------------------------------------------------------------- - 0x21=>0x00,0x22=>0x01,0x23=>0x02,0x24=>0x03,0x25=>0x04,0x26=>0x05,0x27=>0x06,0x28=>0x07,0x29=>0x08,0x2a=>0x09, // - 0x2b=>0x0a,0x2c=>0x0b,0x2d=>0x0c,0x2e=>0x0d,0x2f=>0x0e,0x3a=>0x0f,0x3b=>0x10,0x3c=>0x11,0x3d=>0x12,0x3e=>0x13, // - 0x3f=>0x14,0x40=>0x15,0x5b=>0x16,0x5c=>0x17,0x5d=>0x18,0x5e=>0x19,0x5f=>0x1a,'F1'=>0x1b,'US'=>0x1e), // - 'S3C' => array( // Shift 3 set for C40 -------------------------------------------------------------------------- - 0x60=>0x00,0x61=>0x01,0x62=>0x02,0x63=>0x03,0x64=>0x04,0x65=>0x05,0x66=>0x06,0x67=>0x07,0x68=>0x08,0x69=>0x09, // - 0x6a=>0x0a,0x6b=>0x0b,0x6c=>0x0c,0x6d=>0x0d,0x6e=>0x0e,0x6f=>0x0f,0x70=>0x10,0x71=>0x11,0x72=>0x12,0x73=>0x13, // - 0x74=>0x14,0x75=>0x15,0x76=>0x16,0x77=>0x17,0x78=>0x18,0x79=>0x19,0x7a=>0x1a,0x7b=>0x1b,0x7c=>0x1c,0x7d=>0x1d, // - 0x7e=>0x1e,0x7f=>0x1f), - 'S3T' => array( // Shift 3 set for TEXT ------------------------------------------------------------------------- - 0x60=>0x00,0x41=>0x01,0x42=>0x02,0x43=>0x03,0x44=>0x04,0x45=>0x05,0x46=>0x06,0x47=>0x07,0x48=>0x08,0x49=>0x09, // - 0x4a=>0x0a,0x4b=>0x0b,0x4c=>0x0c,0x4d=>0x0d,0x4e=>0x0e,0x4f=>0x0f,0x50=>0x10,0x51=>0x11,0x52=>0x12,0x53=>0x13, // - 0x54=>0x14,0x55=>0x15,0x56=>0x16,0x57=>0x17,0x58=>0x18,0x59=>0x19,0x5a=>0x1a,0x7b=>0x1b,0x7c=>0x1c,0x7d=>0x1d, // - 0x7e=>0x1e,0x7f=>0x1f), // - 'X12' => array( // Set for X12 ---------------------------------------------------------------------------------- - 0x0d=>0x00,0x2a=>0x01,0x3e=>0x02,0x20=>0x03,0x30=>0x04,0x31=>0x05,0x32=>0x06,0x33=>0x07,0x34=>0x08,0x35=>0x09, // - 0x36=>0x0a,0x37=>0x0b,0x38=>0x0c,0x39=>0x0d,0x41=>0x0e,0x42=>0x0f,0x43=>0x10,0x44=>0x11,0x45=>0x12,0x46=>0x13, // - 0x47=>0x14,0x48=>0x15,0x49=>0x16,0x4a=>0x17,0x4b=>0x18,0x4c=>0x19,0x4d=>0x1a,0x4e=>0x1b,0x4f=>0x1c,0x50=>0x1d, // - 0x51=>0x1e,0x52=>0x1f,0x53=>0x20,0x54=>0x21,0x55=>0x22,0x56=>0x23,0x57=>0x24,0x58=>0x25,0x59=>0x26,0x5a=>0x27) // - ); - -// ----------------------------------------------------------------------------- - - /** - * This is the class constructor. - * Creates a datamatrix object - * @param string $code Code to represent using Datamatrix. - * @public - */ - public function __construct($code) { - $barcode_array = array(); - if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { - return false; - } - // get data codewords - $cw = $this->getHighLevelEncoding($code); - // number of data codewords - $nd = count($cw); - // check size - if ($nd > 1558) { - return false; - } - // get minimum required matrix size. - foreach ($this->symbattr as $params) { - if ($params[11] >= $nd) { - break; - } - } - if ($params[11] < $nd) { - // too much data - return false; - } elseif ($params[11] > $nd) { - // add padding - if ((($params[11] - $nd) > 1) AND ($cw[($nd - 1)] != 254)) { - if ($this->last_enc == ENC_EDF) { - // switch to ASCII encoding - $cw[] = 124; - ++$nd; - } elseif (($this->last_enc != ENC_ASCII) AND ($this->last_enc != ENC_BASE256)) { - // switch to ASCII encoding - $cw[] = 254; - ++$nd; - } - } - if ($params[11] > $nd) { - // add first pad - $cw[] = 129; - ++$nd; - // add remaining pads - for ($i = $nd; $i < $params[11]; ++$i) { - $cw[] = $this->get253StateCodeword(129, $i); - } - } - } - // add error correction codewords - $cw = $this->getErrorCorrection($cw, $params[13], $params[14], $params[15]); - // initialize empty arrays - $grid = array_fill(0, ($params[2] * $params[3]), 0); - // get placement map - $places = $this->getPlacementMap($params[2], $params[3]); - // fill the grid with data - $grid = array(); - $i = 0; - // region data row max index - $rdri = ($params[4] - 1); - // region data column max index - $rdci = ($params[5] - 1); - // for each vertical region - for ($vr = 0; $vr < $params[9]; ++$vr) { - // for each row on region - for ($r = 0; $r < $params[4]; ++$r) { - // get row - $row = (($vr * $params[4]) + $r); - // for each horizontal region - for ($hr = 0; $hr < $params[8]; ++$hr) { - // for each column on region - for ($c = 0; $c < $params[5]; ++$c) { - // get column - $col = (($hr * $params[5]) + $c); - // braw bits by case - if ($r == 0) { - // top finder pattern - if ($c % 2) { - $grid[$row][$col] = 0; - } else { - $grid[$row][$col] = 1; - } - } elseif ($r == $rdri) { - // bottom finder pattern - $grid[$row][$col] = 1; - } elseif ($c == 0) { - // left finder pattern - $grid[$row][$col] = 1; - } elseif ($c == $rdci) { - // right finder pattern - if ($r % 2) { - $grid[$row][$col] = 1; - } else { - $grid[$row][$col] = 0; - } - } else { // data bit - if ($places[$i] < 2) { - $grid[$row][$col] = $places[$i]; - } else { - // codeword ID - $cw_id = (floor($places[$i] / 10) - 1); - // codeword BIT mask - $cw_bit = pow(2, (8 - ($places[$i] % 10))); - $grid[$row][$col] = (($cw[$cw_id] & $cw_bit) == 0) ? 0 : 1; - } - ++$i; - } - } - } - } - } - $this->barcode_array['num_rows'] = $params[0]; - $this->barcode_array['num_cols'] = $params[1]; - $this->barcode_array['bcode'] = $grid; - } - - /** - * Returns a barcode array which is readable by TCPDF - * @return array barcode array readable by TCPDF; - * @public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Product of two numbers in a Power-of-Two Galois Field - * @param int $a first number to multiply. - * @param int $b second number to multiply. - * @param array $log Log table. - * @param array $alog Anti-Log table. - * @param int $gf Number of Factors of the Reed-Solomon polynomial. - * @return int product - * @protected - */ - protected function getGFProduct($a, $b, $log, $alog, $gf) { - if (($a == 0) OR ($b == 0)) { - return 0; - } - return ($alog[($log[$a] + $log[$b]) % ($gf - 1)]); - } - - /** - * Add error correction codewords to data codewords array (ANNEX E). - * @param array $wd Array of datacodewords. - * @param int $nb Number of blocks. - * @param int $nd Number of data codewords per block. - * @param int $nc Number of correction codewords per block. - * @param int $gf numner of fields on log/antilog table (power of 2). - * @param int $pp The value of its prime modulus polynomial (301 for ECC200). - * @return array data codewords + error codewords - * @protected - */ - protected function getErrorCorrection($wd, $nb, $nd, $nc, $gf=256, $pp=301) { - // generate the log ($log) and antilog ($alog) tables - $log[0] = 0; - $alog[0] = 1; - for ($i = 1; $i < $gf; ++$i) { - $alog[$i] = ($alog[($i - 1)] * 2); - if ($alog[$i] >= $gf) { - $alog[$i] ^= $pp; - } - $log[$alog[$i]] = $i; - } - ksort($log); - // generate the polynomial coefficients (c) - $c = array_fill(0, ($nc + 1), 0); - $c[0] = 1; - for ($i = 1; $i <= $nc; ++$i) { - $c[$i] = $c[($i-1)]; - for ($j = ($i - 1); $j >= 1; --$j) { - $c[$j] = $c[($j - 1)] ^ $this->getGFProduct($c[$j], $alog[$i], $log, $alog, $gf); - } - $c[0] = $this->getGFProduct($c[0], $alog[$i], $log, $alog, $gf); - } - ksort($c); - // total number of data codewords - $num_wd = ($nb * $nd); - // total number of error codewords - $num_we = ($nb * $nc); - // for each block - for ($b = 0; $b < $nb; ++$b) { - // create interleaved data block - $block = array(); - for ($n = $b; $n < $num_wd; $n += $nb) { - $block[] = $wd[$n]; - } - // initialize error codewords - $we = array_fill(0, ($nc + 1), 0); - // calculate error correction codewords for this block - for ($i = 0; $i < $nd; ++$i) { - $k = ($we[0] ^ $block[$i]); - for ($j = 0; $j < $nc; ++$j) { - $we[$j] = ($we[($j + 1)] ^ $this->getGFProduct($k, $c[($nc - $j - 1)], $log, $alog, $gf)); - } - } - // add error codewords at the end of data codewords - $j = 0; - for ($i = $b; $i < $num_we; $i += $nb) { - $wd[($num_wd + $i)] = $we[$j]; - ++$j; - } - } - // reorder codewords - ksort($wd); - return $wd; - } - - /** - * Return the 253-state codeword - * @param int $cwpad Pad codeword. - * @param int $cwpos Number of data codewords from the beginning of encoded data. - * @return int pad codeword - * @protected - */ - protected function get253StateCodeword($cwpad, $cwpos) { - $pad = ($cwpad + (((149 * $cwpos) % 253) + 1)); - if ($pad > 254) { - $pad -= 254; - } - return $pad; - } - - /** - * Return the 255-state codeword - * @param int $cwpad Pad codeword. - * @param int $cwpos Number of data codewords from the beginning of encoded data. - * @return int pad codeword - * @protected - */ - protected function get255StateCodeword($cwpad, $cwpos) { - $pad = ($cwpad + (((149 * $cwpos) % 255) + 1)); - if ($pad > 255) { - $pad -= 256; - } - return $pad; - } - - /** - * Returns true if the char belongs to the selected mode - * @param int $chr Character (byte) to check. - * @param int $mode Current encoding mode. - * @return boolean true if the char is of the selected mode. - * @protected - */ - protected function isCharMode($chr, $mode) { - $status = false; - switch ($mode) { - case ENC_ASCII: { // ASCII character 0 to 127 - $status = (($chr >= 0) AND ($chr <= 127)); - break; - } - case ENC_C40: { // Upper-case alphanumeric - $status = (($chr == 32) OR (($chr >= 48) AND ($chr <= 57)) OR (($chr >= 65) AND ($chr <= 90))); - break; - } - case ENC_TXT: { // Lower-case alphanumeric - $status = (($chr == 32) OR (($chr >= 48) AND ($chr <= 57)) OR (($chr >= 97) AND ($chr <= 122))); - break; - } - case ENC_X12: { // ANSI X12 - $status = (($chr == 13) OR ($chr == 42) OR ($chr == 62)); - break; - } - case ENC_EDF: { // ASCII character 32 to 94 - $status = (($chr >= 32) AND ($chr <= 94)); - break; - } - case ENC_BASE256: { // Function character (FNC1, Structured Append, Reader Program, or Code Page) - $status = (($chr == 232) OR ($chr == 233) OR ($chr == 234) OR ($chr == 241)); - break; - } - case ENC_ASCII_EXT: { // ASCII character 128 to 255 - $status = (($chr >= 128) AND ($chr <= 255)); - break; - } - case ENC_ASCII_NUM: { // ASCII digits - $status = (($chr >= 48) AND ($chr <= 57)); - break; - } - } - return $status; - } - - /** - * The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S). - * @param string $data data to encode - * @param int $pos current position - * @param int $mode current encoding mode - * @return int encoding mode - * @protected - */ - protected function lookAheadTest($data, $pos, $mode) { - $data_length = strlen($data); - if ($pos >= $data_length) { - return $mode; - } - $charscount = 0; // count processed chars - // STEP J - if ($mode == ENC_ASCII) { - $numch = array(0, 1, 1, 1, 1, 1.25); - } else { - $numch = array(1, 2, 2, 2, 2, 2.25); - $numch[$mode] = 0; - } - while (true) { - // STEP K - if (($pos + $charscount) == $data_length) { - if ($numch[ENC_ASCII] <= ceil(min($numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256]))) { - return ENC_ASCII; - } - if ($numch[ENC_BASE256] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF]))) { - return ENC_BASE256; - } - if ($numch[ENC_EDF] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_BASE256]))) { - return ENC_EDF; - } - if ($numch[ENC_TXT] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256]))) { - return ENC_TXT; - } - if ($numch[ENC_X12] < ceil(min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_EDF], $numch[ENC_BASE256]))) { - return ENC_X12; - } - return ENC_C40; - } - // get char - $chr = ord($data[$pos + $charscount]); - $charscount++; - // STEP L - if ($this->isCharMode($chr, ENC_ASCII_NUM)) { - $numch[ENC_ASCII] += (1 / 2); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_ASCII] = ceil($numch[ENC_ASCII]); - $numch[ENC_ASCII] += 2; - } else { - $numch[ENC_ASCII] = ceil($numch[ENC_ASCII]); - $numch[ENC_ASCII] += 1; - } - // STEP M - if ($this->isCharMode($chr, ENC_C40)) { - $numch[ENC_C40] += (2 / 3); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_C40] += (8 / 3); - } else { - $numch[ENC_C40] += (4 / 3); - } - // STEP N - if ($this->isCharMode($chr, ENC_TXT)) { - $numch[ENC_TXT] += (2 / 3); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_TXT] += (8 / 3); - } else { - $numch[ENC_TXT] += (4 / 3); - } - // STEP O - if ($this->isCharMode($chr, ENC_X12) OR $this->isCharMode($chr, ENC_C40)) { - $numch[ENC_X12] += (2 / 3); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_X12] += (13 / 3); - } else { - $numch[ENC_X12] += (10 / 3); - } - // STEP P - if ($this->isCharMode($chr, ENC_EDF)) { - $numch[ENC_EDF] += (3 / 4); - } elseif ($this->isCharMode($chr, ENC_ASCII_EXT)) { - $numch[ENC_EDF] += (17 / 4); - } else { - $numch[ENC_EDF] += (13 / 4); - } - // STEP Q - if ($this->isCharMode($chr, ENC_BASE256)) { - $numch[ENC_BASE256] += 4; - } else { - $numch[ENC_BASE256] += 1; - } - // STEP R - if ($charscount >= 4) { - if (($numch[ENC_ASCII] + 1) <= min($numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256])) { - return ENC_ASCII; - } - if ((($numch[ENC_BASE256] + 1) <= $numch[ENC_ASCII]) - OR (($numch[ENC_BASE256] + 1) < min($numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_EDF]))) { - return ENC_BASE256; - } - if (($numch[ENC_EDF] + 1) < min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_X12], $numch[ENC_BASE256])) { - return ENC_EDF; - } - if (($numch[ENC_TXT] + 1) < min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_X12], $numch[ENC_EDF], $numch[ENC_BASE256])) { - return ENC_TXT; - } - if (($numch[ENC_X12] + 1) < min($numch[ENC_ASCII], $numch[ENC_C40], $numch[ENC_TXT], $numch[ENC_EDF], $numch[ENC_BASE256])) { - return ENC_X12; - } - if (($numch[ENC_C40] + 1) < min($numch[ENC_ASCII], $numch[ENC_TXT], $numch[ENC_EDF], $numch[ENC_BASE256])) { - if ($numch[ENC_C40] < $numch[ENC_X12]) { - return ENC_C40; - } - if ($numch[ENC_C40] == $numch[ENC_X12]) { - $k = ($pos + $charscount + 1); - while ($k < $data_length) { - $tmpchr = ord($data[$k]); - if ($this->isCharMode($tmpchr, ENC_X12)) { - return ENC_X12; - } elseif (!($this->isCharMode($tmpchr, ENC_X12) OR $this->isCharMode($tmpchr, ENC_C40))) { - break; - } - ++$k; - } - return ENC_C40; - } - } - } - } // end of while - } - - /** - * Get the switching codeword to a new encoding mode (latch codeword) - * @param int $mode New encoding mode. - * @return int Switch codeword. - * @protected - */ - protected function getSwitchEncodingCodeword($mode) { - switch ($mode) { - case ENC_ASCII: { // ASCII character 0 to 127 - $cw = 254; - if ($this->last_enc == ENC_EDF) { - $cw = 124; - } - break; - } - case ENC_C40: { // Upper-case alphanumeric - $cw = 230; - break; - } - case ENC_TXT: { // Lower-case alphanumeric - $cw = 239; - break; - } - case ENC_X12: { // ANSI X12 - $cw = 238; - break; - } - case ENC_EDF: { // ASCII character 32 to 94 - $cw = 240; - break; - } - case ENC_BASE256: { // Function character (FNC1, Structured Append, Reader Program, or Code Page) - $cw = 231; - break; - } - } - return $cw; - } - - /** - * Choose the minimum matrix size and return the max number of data codewords. - * @param int $numcw Number of current codewords. - * @return int number of data codewords in matrix - * @protected - */ - protected function getMaxDataCodewords($numcw) { - foreach ($this->symbattr as $key => $matrix) { - if ($matrix[11] >= $numcw) { - return $matrix[11]; - } - } - return 0; - } - - /** - * Get high level encoding using the minimum symbol data characters for ECC 200 - * @param string $data data to encode - * @return array of codewords - * @protected - */ - protected function getHighLevelEncoding($data) { - // STEP A. Start in ASCII encodation. - $enc = ENC_ASCII; // current encoding mode - $pos = 0; // current position - $cw = array(); // array of codewords to be returned - $cw_num = 0; // number of data codewords - $data_length = strlen($data); // number of chars - while ($pos < $data_length) { - // set last used encoding - $this->last_enc = $enc; - switch ($enc) { - case ENC_ASCII: { // STEP B. While in ASCII encodation - if (($data_length > 1) AND ($pos < ($data_length - 1)) AND ($this->isCharMode(ord($data[$pos]), ENC_ASCII_NUM) AND $this->isCharMode(ord($data[$pos + 1]), ENC_ASCII_NUM))) { - // 1. If the next data sequence is at least 2 consecutive digits, encode the next two digits as a double digit in ASCII mode. - $cw[] = (intval(substr($data, $pos, 2)) + 130); - ++$cw_num; - $pos += 2; - } else { - // 2. If the look-ahead test (starting at step J) indicates another mode, switch to that mode. - $newenc = $this->lookAheadTest($data, $pos, $enc); - if ($newenc != $enc) { - // switch to new encoding - $enc = $newenc; - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - } else { - // get new byte - $chr = ord($data[$pos]); - ++$pos; - if ($this->isCharMode($chr, ENC_ASCII_EXT)) { - // 3. If the next data character is extended ASCII (greater than 127) encode it in ASCII mode first using the Upper Shift (value 235) character. - $cw[] = 235; - $cw[] = ($chr - 127); - $cw_num += 2; - } else { - // 4. Otherwise process the next data character in ASCII encodation. - $cw[] = ($chr + 1); - ++$cw_num; - } - } - } - break; - } - case ENC_C40 : // Upper-case alphanumeric - case ENC_TXT : // Lower-case alphanumeric - case ENC_X12 : { // ANSI X12 - $temp_cw = array(); - $p = 0; - $epos = $pos; - // get charset ID - $set_id = $this->chset_id[$enc]; - // get basic charset for current encoding - $charset = $this->chset[$set_id]; - do { - // 2. process the next character in C40 encodation. - $chr = ord($data[$epos]); - ++$epos; - // check for extended character - if ($chr & 0x80) { - if ($enc == ENC_X12) { - return false; - } - $chr = ($chr & 0x7f); - $temp_cw[] = 1; // shift 2 - $temp_cw[] = 30; // upper shift - $p += 2; - } - if (isset($charset[$chr])) { - $temp_cw[] = $charset[$chr]; - ++$p; - } else { - if (isset($this->chset['SH1'][$chr])) { - $temp_cw[] = 0; // shift 1 - $shiftset = $this->chset['SH1']; - } elseif (isset($chr, $this->chset['SH2'][$chr])) { - $temp_cw[] = 1; // shift 2 - $shiftset = $this->chset['SH2']; - } elseif (($enc == ENC_C40) AND isset($this->chset['S3C'][$chr])) { - $temp_cw[] = 2; // shift 3 - $shiftset = $this->chset['S3C']; - } elseif (($enc == ENC_TXT) AND isset($this->chset['S3T'][$chr])) { - $temp_cw[] = 2; // shift 3 - $shiftset = $this->chset['S3T']; - } else { - return false; - } - $temp_cw[] = $shiftset[$chr]; - $p += 2; - } - if ($p >= 3) { - $c1 = array_shift($temp_cw); - $c2 = array_shift($temp_cw); - $c3 = array_shift($temp_cw); - $p -= 3; - $tmp = ((1600 * $c1) + (40 * $c2) + $c3 + 1); - $cw[] = ($tmp >> 8); - $cw[] = ($tmp % 256); - $cw_num += 2; - $pos = $epos; - // 1. If the C40 encoding is at the point of starting a new double symbol character and if the look-ahead test (starting at step J) indicates another mode, switch to that mode. - $newenc = $this->lookAheadTest($data, $pos, $enc); - if ($newenc != $enc) { - // switch to new encoding - $enc = $newenc; - if ($enc != ENC_ASCII) { - // set unlatch character - $cw[] = $this->getSwitchEncodingCodeword(ENC_ASCII); - ++$cw_num; - } - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - $pos -= $p; - $p = 0; - break; - } - } - } while (($p > 0) AND ($epos < $data_length)); - // process last data (if any) - if ($p > 0) { - // get remaining number of data symbols - $cwr = ($this->getMaxDataCodewords($cw_num) - $cw_num); - if (($cwr == 1) AND ($p == 1)) { - // d. If one symbol character remains and one C40 value (data character) remains to be encoded - $c1 = array_shift($temp_cw); - --$p; - $cw[] = ($chr + 1); - ++$cw_num; - $pos = $epos; - $enc = ENC_ASCII; - $this->last_enc = $enc; - } elseif (($cwr == 2) AND ($p == 1)) { - // c. If two symbol characters remain and only one C40 value (data character) remains to be encoded - $c1 = array_shift($temp_cw); - --$p; - $cw[] = 254; - $cw[] = ($chr + 1); - $cw_num += 2; - $pos = $epos; - $enc = ENC_ASCII; - $this->last_enc = $enc; - } elseif (($cwr == 2) AND ($p == 2)) { - // b. If two symbol characters remain and two C40 values remain to be encoded - $c1 = array_shift($temp_cw); - $c2 = array_shift($temp_cw); - $p -= 2; - $tmp = ((1600 * $c1) + (40 * $c2) + 1); - $cw[] = ($tmp >> 8); - $cw[] = ($tmp % 256); - $cw_num += 2; - $pos = $epos; - $enc = ENC_ASCII; - $this->last_enc = $enc; - } else { - // switch to ASCII encoding - if ($enc != ENC_ASCII) { - $enc = ENC_ASCII; - $this->last_enc = $enc; - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - $pos = ($epos - $p); - } - } - } - break; - } - case ENC_EDF: { // F. While in EDIFACT (EDF) encodation - // initialize temporary array with 0 length - $temp_cw = array(); - $epos = $pos; - $field_length = 0; - $newenc = $enc; - do { - // 2. process the next character in EDIFACT encodation. - $chr = ord($data[$epos]); - if ($this->isCharMode($chr, ENC_EDF)) { - ++$epos; - $temp_cw[] = $chr; - ++$field_length; - } - if (($field_length == 4) OR ($epos == $data_length) OR !$this->isCharMode($chr, ENC_EDF)) { - if (($epos == $data_length) AND ($field_length < 3)) { - $enc = ENC_ASCII; - $cw[] = $this->getSwitchEncodingCodeword($enc); - ++$cw_num; - break; - } - if ($field_length < 4) { - // set unlatch character - $temp_cw[] = 0x1f; - ++$field_length; - // fill empty characters - for ($i = $field_length; $i < 4; ++$i) { - $temp_cw[] = 0; - } - $enc = ENC_ASCII; - $this->last_enc = $enc; - } - // encodes four data characters in three codewords - $tcw = (($temp_cw[0] & 0x3F) << 2) + (($temp_cw[1] & 0x30) >> 4); - if ($tcw > 0) { - $cw[] = $tcw; - $cw_num++; - } - $tcw= (($temp_cw[1] & 0x0F) << 4) + (($temp_cw[2] & 0x3C) >> 2); - if ($tcw > 0) { - $cw[] = $tcw; - $cw_num++; - } - $tcw = (($temp_cw[2] & 0x03) << 6) + ($temp_cw[3] & 0x3F); - if ($tcw > 0) { - $cw[] = $tcw; - $cw_num++; - } - $temp_cw = array(); - $pos = $epos; - $field_length = 0; - if ($enc == ENC_ASCII) { - break; // exit from EDIFACT mode - } - } - } while ($epos < $data_length); - break; - } - case ENC_BASE256: { // G. While in Base 256 (B256) encodation - // initialize temporary array with 0 length - $temp_cw = array(); - $field_length = 0; - while (($pos < $data_length) AND ($field_length <= 1555)) { - $newenc = $this->lookAheadTest($data, $pos, $enc); - if ($newenc != $enc) { - // 1. If the look-ahead test (starting at step J) indicates another mode, switch to that mode. - $enc = $newenc; - break; // exit from B256 mode - } else { - // 2. Otherwise, process the next character in Base 256 encodation. - $chr = ord($data[$pos]); - ++$pos; - $temp_cw[] = $chr; - ++$field_length; - } - } - // set field length - if ($field_length <= 249) { - $cw[] = $this->get255StateCodeword($field_length, ($cw_num + 1)); - ++$cw_num; - } else { - $cw[] = $this->get255StateCodeword((floor($field_length / 250) + 249), ($cw_num + 1)); - $cw[] = $this->get255StateCodeword(($field_length % 250), ($cw_num + 2)); - $cw_num += 2; - } - if (!empty($temp_cw)) { - // add B256 field - foreach ($temp_cw as $p => $cht) { - $cw[] = $this->get255StateCodeword($cht, ($cw_num + $p + 1)); - } - } - break; - } - } // end of switch enc - } // end of while - return $cw; - } - - /** - * Places "chr+bit" with appropriate wrapping within array[]. - * (Annex F - ECC 200 symbol character placement) - * @param array $marr Array of symbols. - * @param int $nrow Number of rows. - * @param int $ncol Number of columns. - * @param int $row Row number. - * @param int $col Column number. - * @param int $chr Char byte. - * @param int $bit Bit. - * @return array - * @protected - */ - protected function placeModule($marr, $nrow, $ncol, $row, $col, $chr, $bit) { - if ($row < 0) { - $row += $nrow; - $col += (4 - (($nrow + 4) % 8)); - } - if ($col < 0) { - $col += $ncol; - $row += (4 - (($ncol + 4) % 8)); - } - $marr[(($row * $ncol) + $col)] = ((10 * $chr) + $bit); - return $marr; - } - - /** - * Places the 8 bits of a utah-shaped symbol character. - * (Annex F - ECC 200 symbol character placement) - * @param array $marr Array of symbols. - * @param int $nrow Number of rows. - * @param int $ncol Number of columns. - * @param int $row Row number. - * @param int $col Column number. - * @param int $chr Char byte. - * @return array - * @protected - */ - protected function placeUtah($marr, $nrow, $ncol, $row, $col, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $row-2, $col-2, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-2, $col-1, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col-2, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col-1, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col-2, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the first special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param array $marr Array of symbols. - * @param int $nrow Number of rows. - * @param int $ncol Number of columns. - * @param int $chr Char byte. - * @return array - * @protected - */ - protected function placeCornerA($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 1, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 2, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 2, $ncol-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 3, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the second special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param array $marr Array of symbols. - * @param int $nrow Number of rows. - * @param int $ncol Number of columns. - * @param int $chr Char byte. - * @return array - * @protected - */ - protected function placeCornerB($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-3, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-2, 0, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-4, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-3, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the third special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param array $marr Array of symbols. - * @param int $nrow Number of rows. - * @param int $ncol Number of columns. - * @param int $chr Char byte. - * @return array - * @protected - */ - protected function placeCornerC($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-3, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-2, 0, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 2, $ncol-1, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 3, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Places the 8 bits of the fourth special corner case. - * (Annex F - ECC 200 symbol character placement) - * @param array $marr Array of symbols. - * @param int $nrow Number of rows. - * @param int $ncol Number of columns. - * @param int $chr Char byte. - * @return array - * @protected - */ - protected function placeCornerD($marr, $nrow, $ncol, $chr) { - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 1); - $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, $ncol-1, $chr, 2); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-3, $chr, 3); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4); - $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-3, $chr, 6); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-2, $chr, 7); - $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 8); - return $marr; - } - - /** - * Build a placement map. - * (Annex F - ECC 200 symbol character placement) - * @param int $nrow Number of rows. - * @param int $ncol Number of columns. - * @return array - * @protected - */ - protected function getPlacementMap($nrow, $ncol) { - // initialize array with zeros - $marr = array_fill(0, ($nrow * $ncol), 0); - // set starting values - $chr = 1; - $row = 4; - $col = 0; - do { - // repeatedly first check for one of the special corner cases, then - if (($row == $nrow) AND ($col == 0)) { - $marr = $this->placeCornerA($marr, $nrow, $ncol, $chr); - ++$chr; - } - if (($row == ($nrow - 2)) AND ($col == 0) AND ($ncol % 4)) { - $marr = $this->placeCornerB($marr, $nrow, $ncol, $chr); - ++$chr; - } - if (($row == ($nrow - 2)) AND ($col == 0) AND (($ncol % 8) == 4)) { - $marr = $this->placeCornerC($marr, $nrow, $ncol, $chr); - ++$chr; - } - if (($row == ($nrow + 4)) AND ($col == 2) AND (!($ncol % 8))) { - $marr = $this->placeCornerD($marr, $nrow, $ncol, $chr); - ++$chr; - } - // sweep upward diagonally, inserting successive characters, - do { - if (($row < $nrow) AND ($col >= 0) AND (!$marr[(($row * $ncol) + $col)])) { - $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr); - ++$chr; - } - $row -= 2; - $col += 2; - } while (($row >= 0) AND ($col < $ncol)); - ++$row; - $col += 3; - // & then sweep downward diagonally, inserting successive characters,... - do { - if (($row >= 0) AND ($col < $ncol) AND (!$marr[(($row * $ncol) + $col)])) { - $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr); - ++$chr; - } - $row += 2; - $col -= 2; - } while (($row < $nrow) AND ($col >= 0)); - $row += 3; - ++$col; - // ... until the entire array is scanned - } while (($row < $nrow) OR ($col < $ncol)); - // lastly, if the lower righthand corner is untouched, fill in fixed pattern - if (!$marr[(($nrow * $ncol) - 1)]) { - $marr[(($nrow * $ncol) - 1)] = 1; - $marr[(($nrow * $ncol) - $ncol - 2)] = 1; - } - return $marr; - } - -} // end DataMatrix class -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/barcodes/pdf417.php b/lib/combodo/tcpdf/include/barcodes/pdf417.php deleted file mode 100644 index 742802e1f..000000000 --- a/lib/combodo/tcpdf/include/barcodes/pdf417.php +++ /dev/null @@ -1,996 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// DESCRIPTION : -// -// Class to create PDF417 barcode arrays for TCPDF class. -// PDF417 (ISO/IEC 15438:2006) is a 2-dimensional stacked bar code created by Symbol Technologies in 1991. -// It is one of the most popular 2D codes because of its ability to be read with slightly modified handheld laser or linear CCD scanners. -// TECHNICAL DATA / FEATURES OF PDF417: -// Encodable Character Set: All 128 ASCII Characters (including extended) -// Code Type: Continuous, Multi-Row -// Symbol Height: 3 - 90 Rows -// Symbol Width: 90X - 583X -// Bidirectional Decoding: Yes -// Error Correction Characters: 2 - 512 -// Maximum Data Characters: 1850 text, 2710 digits, 1108 bytes -// -//============================================================+ - -/** - * @file - * Class to create PDF417 barcode arrays for TCPDF class. - * PDF417 (ISO/IEC 15438:2006) is a 2-dimensional stacked bar code created by Symbol Technologies in 1991. - * (requires PHP bcmath extension) - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.005 - */ - -// definitions -if (!defined('PDF417DEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('PDF417DEFS', true); - - // ----------------------------------------------------- - - /** - * Row height respect X dimension of single module - */ - define('ROWHEIGHT', 4); - - /** - * Horizontal quiet zone in modules - */ - define('QUIETH', 2); - - /** - * Vertical quiet zone in modules - */ - define('QUIETV', 2); - -} // end of definitions - -// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# - -/** - * @class PDF417 - * Class to create PDF417 barcode arrays for TCPDF class. - * PDF417 (ISO/IEC 15438:2006) is a 2-dimensional stacked bar code created by Symbol Technologies in 1991. - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.003 - */ -class PDF417 { - - /** - * Barcode array to be returned which is readable by TCPDF. - * @protected - */ - protected $barcode_array = array(); - - /** - * Start pattern. - * @protected - */ - protected $start_pattern = '11111111010101000'; - - /** - * Stop pattern. - * @protected - */ - protected $stop_pattern = '111111101000101001'; - - /** - * Array of text Compaction Sub-Modes (values 0xFB - 0xFF are used for submode changers). - * @protected - */ - protected $textsubmodes = array( - array(0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x20,0xFD,0xFE,0xFF), // Alpha - array(0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x20,0xFD,0xFE,0xFF), // Lower - array(0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x26,0x0d,0x09,0x2c,0x3a,0x23,0x2d,0x2e,0x24,0x2f,0x2b,0x25,0x2a,0x3d,0x5e,0xFB,0x20,0xFD,0xFE,0xFF), // Mixed - array(0x3b,0x3c,0x3e,0x40,0x5b,0x5c,0x5d,0x5f,0x60,0x7e,0x21,0x0d,0x09,0x2c,0x3a,0x0a,0x2d,0x2e,0x24,0x2f,0x22,0x7c,0x2a,0x28,0x29,0x3f,0x7b,0x7d,0x27,0xFF) // Puntuaction - ); - - /** - * Array of switching codes for Text Compaction Sub-Modes. - * @protected - */ - protected $textlatch = array( - '01' => array(27), '02' => array(28), '03' => array(28,25), // - '10' => array(28,28), '12' => array(28), '13' => array(28,25), // - '20' => array(28), '21' => array(27), '23' => array(25), // - '30' => array(29), '31' => array(29,27), '32' => array(29,28) // - ); - - /** - * Clusters of codewords (0, 3, 6)
    - * Values are hex equivalents of binary representation of bars (1 = bar, 0 = space).
    - * The codewords numbered from 900 to 928 have special meaning, some enable to switch between modes in order to optimise the code:
      - *
    • 900 : Switch to "Text" mode
    • - *
    • 901 : Switch to "Byte" mode
    • - *
    • 902 : Switch to "Numeric" mode
    • - *
    • 903 - 912 : Reserved
    • - *
    • 913 : Switch to "Octet" only for the next codeword
    • - *
    • 914 - 920 : Reserved
    • - *
    • 921 : Initialization
    • - *
    • 922 : Terminator codeword for Macro PDF control block
    • - *
    • 923 : Sequence tag to identify the beginning of optional fields in the Macro PDF control block
    • - *
    • 924 : Switch to "Byte" mode (If the total number of byte is multiple of 6)
    • - *
    • 925 : Identifier for a user defined Extended Channel Interpretation (ECI)
    • - *
    • 926 : Identifier for a general purpose ECI format
    • - *
    • 927 : Identifier for an ECI of a character set or code page
    • - *
    • 928 : Macro marker codeword to indicate the beginning of a Macro PDF Control Block
    • - *
    - * @protected - */ - protected $clusters = array( - array( // cluster 0 ----------------------------------------------------------------------- - 0x1d5c0,0x1eaf0,0x1f57c,0x1d4e0,0x1ea78,0x1f53e,0x1a8c0,0x1d470,0x1a860,0x15040, // 10 - 0x1a830,0x15020,0x1adc0,0x1d6f0,0x1eb7c,0x1ace0,0x1d678,0x1eb3e,0x158c0,0x1ac70, // 20 - 0x15860,0x15dc0,0x1aef0,0x1d77c,0x15ce0,0x1ae78,0x1d73e,0x15c70,0x1ae3c,0x15ef0, // 30 - 0x1af7c,0x15e78,0x1af3e,0x15f7c,0x1f5fa,0x1d2e0,0x1e978,0x1f4be,0x1a4c0,0x1d270, // 40 - 0x1e93c,0x1a460,0x1d238,0x14840,0x1a430,0x1d21c,0x14820,0x1a418,0x14810,0x1a6e0, // 50 - 0x1d378,0x1e9be,0x14cc0,0x1a670,0x1d33c,0x14c60,0x1a638,0x1d31e,0x14c30,0x1a61c, // 60 - 0x14ee0,0x1a778,0x1d3be,0x14e70,0x1a73c,0x14e38,0x1a71e,0x14f78,0x1a7be,0x14f3c, // 70 - 0x14f1e,0x1a2c0,0x1d170,0x1e8bc,0x1a260,0x1d138,0x1e89e,0x14440,0x1a230,0x1d11c, // 80 - 0x14420,0x1a218,0x14410,0x14408,0x146c0,0x1a370,0x1d1bc,0x14660,0x1a338,0x1d19e, // 90 - 0x14630,0x1a31c,0x14618,0x1460c,0x14770,0x1a3bc,0x14738,0x1a39e,0x1471c,0x147bc, // 100 - 0x1a160,0x1d0b8,0x1e85e,0x14240,0x1a130,0x1d09c,0x14220,0x1a118,0x1d08e,0x14210, // 110 - 0x1a10c,0x14208,0x1a106,0x14360,0x1a1b8,0x1d0de,0x14330,0x1a19c,0x14318,0x1a18e, // 120 - 0x1430c,0x14306,0x1a1de,0x1438e,0x14140,0x1a0b0,0x1d05c,0x14120,0x1a098,0x1d04e, // 130 - 0x14110,0x1a08c,0x14108,0x1a086,0x14104,0x141b0,0x14198,0x1418c,0x140a0,0x1d02e, // 140 - 0x1a04c,0x1a046,0x14082,0x1cae0,0x1e578,0x1f2be,0x194c0,0x1ca70,0x1e53c,0x19460, // 150 - 0x1ca38,0x1e51e,0x12840,0x19430,0x12820,0x196e0,0x1cb78,0x1e5be,0x12cc0,0x19670, // 160 - 0x1cb3c,0x12c60,0x19638,0x12c30,0x12c18,0x12ee0,0x19778,0x1cbbe,0x12e70,0x1973c, // 170 - 0x12e38,0x12e1c,0x12f78,0x197be,0x12f3c,0x12fbe,0x1dac0,0x1ed70,0x1f6bc,0x1da60, // 180 - 0x1ed38,0x1f69e,0x1b440,0x1da30,0x1ed1c,0x1b420,0x1da18,0x1ed0e,0x1b410,0x1da0c, // 190 - 0x192c0,0x1c970,0x1e4bc,0x1b6c0,0x19260,0x1c938,0x1e49e,0x1b660,0x1db38,0x1ed9e, // 200 - 0x16c40,0x12420,0x19218,0x1c90e,0x16c20,0x1b618,0x16c10,0x126c0,0x19370,0x1c9bc, // 210 - 0x16ec0,0x12660,0x19338,0x1c99e,0x16e60,0x1b738,0x1db9e,0x16e30,0x12618,0x16e18, // 220 - 0x12770,0x193bc,0x16f70,0x12738,0x1939e,0x16f38,0x1b79e,0x16f1c,0x127bc,0x16fbc, // 230 - 0x1279e,0x16f9e,0x1d960,0x1ecb8,0x1f65e,0x1b240,0x1d930,0x1ec9c,0x1b220,0x1d918, // 240 - 0x1ec8e,0x1b210,0x1d90c,0x1b208,0x1b204,0x19160,0x1c8b8,0x1e45e,0x1b360,0x19130, // 250 - 0x1c89c,0x16640,0x12220,0x1d99c,0x1c88e,0x16620,0x12210,0x1910c,0x16610,0x1b30c, // 260 - 0x19106,0x12204,0x12360,0x191b8,0x1c8de,0x16760,0x12330,0x1919c,0x16730,0x1b39c, // 270 - 0x1918e,0x16718,0x1230c,0x12306,0x123b8,0x191de,0x167b8,0x1239c,0x1679c,0x1238e, // 280 - 0x1678e,0x167de,0x1b140,0x1d8b0,0x1ec5c,0x1b120,0x1d898,0x1ec4e,0x1b110,0x1d88c, // 290 - 0x1b108,0x1d886,0x1b104,0x1b102,0x12140,0x190b0,0x1c85c,0x16340,0x12120,0x19098, // 300 - 0x1c84e,0x16320,0x1b198,0x1d8ce,0x16310,0x12108,0x19086,0x16308,0x1b186,0x16304, // 310 - 0x121b0,0x190dc,0x163b0,0x12198,0x190ce,0x16398,0x1b1ce,0x1638c,0x12186,0x16386, // 320 - 0x163dc,0x163ce,0x1b0a0,0x1d858,0x1ec2e,0x1b090,0x1d84c,0x1b088,0x1d846,0x1b084, // 330 - 0x1b082,0x120a0,0x19058,0x1c82e,0x161a0,0x12090,0x1904c,0x16190,0x1b0cc,0x19046, // 340 - 0x16188,0x12084,0x16184,0x12082,0x120d8,0x161d8,0x161cc,0x161c6,0x1d82c,0x1d826, // 350 - 0x1b042,0x1902c,0x12048,0x160c8,0x160c4,0x160c2,0x18ac0,0x1c570,0x1e2bc,0x18a60, // 360 - 0x1c538,0x11440,0x18a30,0x1c51c,0x11420,0x18a18,0x11410,0x11408,0x116c0,0x18b70, // 370 - 0x1c5bc,0x11660,0x18b38,0x1c59e,0x11630,0x18b1c,0x11618,0x1160c,0x11770,0x18bbc, // 380 - 0x11738,0x18b9e,0x1171c,0x117bc,0x1179e,0x1cd60,0x1e6b8,0x1f35e,0x19a40,0x1cd30, // 390 - 0x1e69c,0x19a20,0x1cd18,0x1e68e,0x19a10,0x1cd0c,0x19a08,0x1cd06,0x18960,0x1c4b8, // 400 - 0x1e25e,0x19b60,0x18930,0x1c49c,0x13640,0x11220,0x1cd9c,0x1c48e,0x13620,0x19b18, // 410 - 0x1890c,0x13610,0x11208,0x13608,0x11360,0x189b8,0x1c4de,0x13760,0x11330,0x1cdde, // 420 - 0x13730,0x19b9c,0x1898e,0x13718,0x1130c,0x1370c,0x113b8,0x189de,0x137b8,0x1139c, // 430 - 0x1379c,0x1138e,0x113de,0x137de,0x1dd40,0x1eeb0,0x1f75c,0x1dd20,0x1ee98,0x1f74e, // 440 - 0x1dd10,0x1ee8c,0x1dd08,0x1ee86,0x1dd04,0x19940,0x1ccb0,0x1e65c,0x1bb40,0x19920, // 450 - 0x1eedc,0x1e64e,0x1bb20,0x1dd98,0x1eece,0x1bb10,0x19908,0x1cc86,0x1bb08,0x1dd86, // 460 - 0x19902,0x11140,0x188b0,0x1c45c,0x13340,0x11120,0x18898,0x1c44e,0x17740,0x13320, // 470 - 0x19998,0x1ccce,0x17720,0x1bb98,0x1ddce,0x18886,0x17710,0x13308,0x19986,0x17708, // 480 - 0x11102,0x111b0,0x188dc,0x133b0,0x11198,0x188ce,0x177b0,0x13398,0x199ce,0x17798, // 490 - 0x1bbce,0x11186,0x13386,0x111dc,0x133dc,0x111ce,0x177dc,0x133ce,0x1dca0,0x1ee58, // 500 - 0x1f72e,0x1dc90,0x1ee4c,0x1dc88,0x1ee46,0x1dc84,0x1dc82,0x198a0,0x1cc58,0x1e62e, // 510 - 0x1b9a0,0x19890,0x1ee6e,0x1b990,0x1dccc,0x1cc46,0x1b988,0x19884,0x1b984,0x19882, // 520 - 0x1b982,0x110a0,0x18858,0x1c42e,0x131a0,0x11090,0x1884c,0x173a0,0x13190,0x198cc, // 530 - 0x18846,0x17390,0x1b9cc,0x11084,0x17388,0x13184,0x11082,0x13182,0x110d8,0x1886e, // 540 - 0x131d8,0x110cc,0x173d8,0x131cc,0x110c6,0x173cc,0x131c6,0x110ee,0x173ee,0x1dc50, // 550 - 0x1ee2c,0x1dc48,0x1ee26,0x1dc44,0x1dc42,0x19850,0x1cc2c,0x1b8d0,0x19848,0x1cc26, // 560 - 0x1b8c8,0x1dc66,0x1b8c4,0x19842,0x1b8c2,0x11050,0x1882c,0x130d0,0x11048,0x18826, // 570 - 0x171d0,0x130c8,0x19866,0x171c8,0x1b8e6,0x11042,0x171c4,0x130c2,0x171c2,0x130ec, // 580 - 0x171ec,0x171e6,0x1ee16,0x1dc22,0x1cc16,0x19824,0x19822,0x11028,0x13068,0x170e8, // 590 - 0x11022,0x13062,0x18560,0x10a40,0x18530,0x10a20,0x18518,0x1c28e,0x10a10,0x1850c, // 600 - 0x10a08,0x18506,0x10b60,0x185b8,0x1c2de,0x10b30,0x1859c,0x10b18,0x1858e,0x10b0c, // 610 - 0x10b06,0x10bb8,0x185de,0x10b9c,0x10b8e,0x10bde,0x18d40,0x1c6b0,0x1e35c,0x18d20, // 620 - 0x1c698,0x18d10,0x1c68c,0x18d08,0x1c686,0x18d04,0x10940,0x184b0,0x1c25c,0x11b40, // 630 - 0x10920,0x1c6dc,0x1c24e,0x11b20,0x18d98,0x1c6ce,0x11b10,0x10908,0x18486,0x11b08, // 640 - 0x18d86,0x10902,0x109b0,0x184dc,0x11bb0,0x10998,0x184ce,0x11b98,0x18dce,0x11b8c, // 650 - 0x10986,0x109dc,0x11bdc,0x109ce,0x11bce,0x1cea0,0x1e758,0x1f3ae,0x1ce90,0x1e74c, // 660 - 0x1ce88,0x1e746,0x1ce84,0x1ce82,0x18ca0,0x1c658,0x19da0,0x18c90,0x1c64c,0x19d90, // 670 - 0x1cecc,0x1c646,0x19d88,0x18c84,0x19d84,0x18c82,0x19d82,0x108a0,0x18458,0x119a0, // 680 - 0x10890,0x1c66e,0x13ba0,0x11990,0x18ccc,0x18446,0x13b90,0x19dcc,0x10884,0x13b88, // 690 - 0x11984,0x10882,0x11982,0x108d8,0x1846e,0x119d8,0x108cc,0x13bd8,0x119cc,0x108c6, // 700 - 0x13bcc,0x119c6,0x108ee,0x119ee,0x13bee,0x1ef50,0x1f7ac,0x1ef48,0x1f7a6,0x1ef44, // 710 - 0x1ef42,0x1ce50,0x1e72c,0x1ded0,0x1ef6c,0x1e726,0x1dec8,0x1ef66,0x1dec4,0x1ce42, // 720 - 0x1dec2,0x18c50,0x1c62c,0x19cd0,0x18c48,0x1c626,0x1bdd0,0x19cc8,0x1ce66,0x1bdc8, // 730 - 0x1dee6,0x18c42,0x1bdc4,0x19cc2,0x1bdc2,0x10850,0x1842c,0x118d0,0x10848,0x18426, // 740 - 0x139d0,0x118c8,0x18c66,0x17bd0,0x139c8,0x19ce6,0x10842,0x17bc8,0x1bde6,0x118c2, // 750 - 0x17bc4,0x1086c,0x118ec,0x10866,0x139ec,0x118e6,0x17bec,0x139e6,0x17be6,0x1ef28, // 760 - 0x1f796,0x1ef24,0x1ef22,0x1ce28,0x1e716,0x1de68,0x1ef36,0x1de64,0x1ce22,0x1de62, // 770 - 0x18c28,0x1c616,0x19c68,0x18c24,0x1bce8,0x19c64,0x18c22,0x1bce4,0x19c62,0x1bce2, // 780 - 0x10828,0x18416,0x11868,0x18c36,0x138e8,0x11864,0x10822,0x179e8,0x138e4,0x11862, // 790 - 0x179e4,0x138e2,0x179e2,0x11876,0x179f6,0x1ef12,0x1de34,0x1de32,0x19c34,0x1bc74, // 800 - 0x1bc72,0x11834,0x13874,0x178f4,0x178f2,0x10540,0x10520,0x18298,0x10510,0x10508, // 810 - 0x10504,0x105b0,0x10598,0x1058c,0x10586,0x105dc,0x105ce,0x186a0,0x18690,0x1c34c, // 820 - 0x18688,0x1c346,0x18684,0x18682,0x104a0,0x18258,0x10da0,0x186d8,0x1824c,0x10d90, // 830 - 0x186cc,0x10d88,0x186c6,0x10d84,0x10482,0x10d82,0x104d8,0x1826e,0x10dd8,0x186ee, // 840 - 0x10dcc,0x104c6,0x10dc6,0x104ee,0x10dee,0x1c750,0x1c748,0x1c744,0x1c742,0x18650, // 850 - 0x18ed0,0x1c76c,0x1c326,0x18ec8,0x1c766,0x18ec4,0x18642,0x18ec2,0x10450,0x10cd0, // 860 - 0x10448,0x18226,0x11dd0,0x10cc8,0x10444,0x11dc8,0x10cc4,0x10442,0x11dc4,0x10cc2, // 870 - 0x1046c,0x10cec,0x10466,0x11dec,0x10ce6,0x11de6,0x1e7a8,0x1e7a4,0x1e7a2,0x1c728, // 880 - 0x1cf68,0x1e7b6,0x1cf64,0x1c722,0x1cf62,0x18628,0x1c316,0x18e68,0x1c736,0x19ee8, // 890 - 0x18e64,0x18622,0x19ee4,0x18e62,0x19ee2,0x10428,0x18216,0x10c68,0x18636,0x11ce8, // 900 - 0x10c64,0x10422,0x13de8,0x11ce4,0x10c62,0x13de4,0x11ce2,0x10436,0x10c76,0x11cf6, // 910 - 0x13df6,0x1f7d4,0x1f7d2,0x1e794,0x1efb4,0x1e792,0x1efb2,0x1c714,0x1cf34,0x1c712, // 920 - 0x1df74,0x1cf32,0x1df72,0x18614,0x18e34,0x18612,0x19e74,0x18e32,0x1bef4), // 929 - array( // cluster 3 ----------------------------------------------------------------------- - 0x1f560,0x1fab8,0x1ea40,0x1f530,0x1fa9c,0x1ea20,0x1f518,0x1fa8e,0x1ea10,0x1f50c, // 10 - 0x1ea08,0x1f506,0x1ea04,0x1eb60,0x1f5b8,0x1fade,0x1d640,0x1eb30,0x1f59c,0x1d620, // 20 - 0x1eb18,0x1f58e,0x1d610,0x1eb0c,0x1d608,0x1eb06,0x1d604,0x1d760,0x1ebb8,0x1f5de, // 30 - 0x1ae40,0x1d730,0x1eb9c,0x1ae20,0x1d718,0x1eb8e,0x1ae10,0x1d70c,0x1ae08,0x1d706, // 40 - 0x1ae04,0x1af60,0x1d7b8,0x1ebde,0x15e40,0x1af30,0x1d79c,0x15e20,0x1af18,0x1d78e, // 50 - 0x15e10,0x1af0c,0x15e08,0x1af06,0x15f60,0x1afb8,0x1d7de,0x15f30,0x1af9c,0x15f18, // 60 - 0x1af8e,0x15f0c,0x15fb8,0x1afde,0x15f9c,0x15f8e,0x1e940,0x1f4b0,0x1fa5c,0x1e920, // 70 - 0x1f498,0x1fa4e,0x1e910,0x1f48c,0x1e908,0x1f486,0x1e904,0x1e902,0x1d340,0x1e9b0, // 80 - 0x1f4dc,0x1d320,0x1e998,0x1f4ce,0x1d310,0x1e98c,0x1d308,0x1e986,0x1d304,0x1d302, // 90 - 0x1a740,0x1d3b0,0x1e9dc,0x1a720,0x1d398,0x1e9ce,0x1a710,0x1d38c,0x1a708,0x1d386, // 100 - 0x1a704,0x1a702,0x14f40,0x1a7b0,0x1d3dc,0x14f20,0x1a798,0x1d3ce,0x14f10,0x1a78c, // 110 - 0x14f08,0x1a786,0x14f04,0x14fb0,0x1a7dc,0x14f98,0x1a7ce,0x14f8c,0x14f86,0x14fdc, // 120 - 0x14fce,0x1e8a0,0x1f458,0x1fa2e,0x1e890,0x1f44c,0x1e888,0x1f446,0x1e884,0x1e882, // 130 - 0x1d1a0,0x1e8d8,0x1f46e,0x1d190,0x1e8cc,0x1d188,0x1e8c6,0x1d184,0x1d182,0x1a3a0, // 140 - 0x1d1d8,0x1e8ee,0x1a390,0x1d1cc,0x1a388,0x1d1c6,0x1a384,0x1a382,0x147a0,0x1a3d8, // 150 - 0x1d1ee,0x14790,0x1a3cc,0x14788,0x1a3c6,0x14784,0x14782,0x147d8,0x1a3ee,0x147cc, // 160 - 0x147c6,0x147ee,0x1e850,0x1f42c,0x1e848,0x1f426,0x1e844,0x1e842,0x1d0d0,0x1e86c, // 170 - 0x1d0c8,0x1e866,0x1d0c4,0x1d0c2,0x1a1d0,0x1d0ec,0x1a1c8,0x1d0e6,0x1a1c4,0x1a1c2, // 180 - 0x143d0,0x1a1ec,0x143c8,0x1a1e6,0x143c4,0x143c2,0x143ec,0x143e6,0x1e828,0x1f416, // 190 - 0x1e824,0x1e822,0x1d068,0x1e836,0x1d064,0x1d062,0x1a0e8,0x1d076,0x1a0e4,0x1a0e2, // 200 - 0x141e8,0x1a0f6,0x141e4,0x141e2,0x1e814,0x1e812,0x1d034,0x1d032,0x1a074,0x1a072, // 210 - 0x1e540,0x1f2b0,0x1f95c,0x1e520,0x1f298,0x1f94e,0x1e510,0x1f28c,0x1e508,0x1f286, // 220 - 0x1e504,0x1e502,0x1cb40,0x1e5b0,0x1f2dc,0x1cb20,0x1e598,0x1f2ce,0x1cb10,0x1e58c, // 230 - 0x1cb08,0x1e586,0x1cb04,0x1cb02,0x19740,0x1cbb0,0x1e5dc,0x19720,0x1cb98,0x1e5ce, // 240 - 0x19710,0x1cb8c,0x19708,0x1cb86,0x19704,0x19702,0x12f40,0x197b0,0x1cbdc,0x12f20, // 250 - 0x19798,0x1cbce,0x12f10,0x1978c,0x12f08,0x19786,0x12f04,0x12fb0,0x197dc,0x12f98, // 260 - 0x197ce,0x12f8c,0x12f86,0x12fdc,0x12fce,0x1f6a0,0x1fb58,0x16bf0,0x1f690,0x1fb4c, // 270 - 0x169f8,0x1f688,0x1fb46,0x168fc,0x1f684,0x1f682,0x1e4a0,0x1f258,0x1f92e,0x1eda0, // 280 - 0x1e490,0x1fb6e,0x1ed90,0x1f6cc,0x1f246,0x1ed88,0x1e484,0x1ed84,0x1e482,0x1ed82, // 290 - 0x1c9a0,0x1e4d8,0x1f26e,0x1dba0,0x1c990,0x1e4cc,0x1db90,0x1edcc,0x1e4c6,0x1db88, // 300 - 0x1c984,0x1db84,0x1c982,0x1db82,0x193a0,0x1c9d8,0x1e4ee,0x1b7a0,0x19390,0x1c9cc, // 310 - 0x1b790,0x1dbcc,0x1c9c6,0x1b788,0x19384,0x1b784,0x19382,0x1b782,0x127a0,0x193d8, // 320 - 0x1c9ee,0x16fa0,0x12790,0x193cc,0x16f90,0x1b7cc,0x193c6,0x16f88,0x12784,0x16f84, // 330 - 0x12782,0x127d8,0x193ee,0x16fd8,0x127cc,0x16fcc,0x127c6,0x16fc6,0x127ee,0x1f650, // 340 - 0x1fb2c,0x165f8,0x1f648,0x1fb26,0x164fc,0x1f644,0x1647e,0x1f642,0x1e450,0x1f22c, // 350 - 0x1ecd0,0x1e448,0x1f226,0x1ecc8,0x1f666,0x1ecc4,0x1e442,0x1ecc2,0x1c8d0,0x1e46c, // 360 - 0x1d9d0,0x1c8c8,0x1e466,0x1d9c8,0x1ece6,0x1d9c4,0x1c8c2,0x1d9c2,0x191d0,0x1c8ec, // 370 - 0x1b3d0,0x191c8,0x1c8e6,0x1b3c8,0x1d9e6,0x1b3c4,0x191c2,0x1b3c2,0x123d0,0x191ec, // 380 - 0x167d0,0x123c8,0x191e6,0x167c8,0x1b3e6,0x167c4,0x123c2,0x167c2,0x123ec,0x167ec, // 390 - 0x123e6,0x167e6,0x1f628,0x1fb16,0x162fc,0x1f624,0x1627e,0x1f622,0x1e428,0x1f216, // 400 - 0x1ec68,0x1f636,0x1ec64,0x1e422,0x1ec62,0x1c868,0x1e436,0x1d8e8,0x1c864,0x1d8e4, // 410 - 0x1c862,0x1d8e2,0x190e8,0x1c876,0x1b1e8,0x1d8f6,0x1b1e4,0x190e2,0x1b1e2,0x121e8, // 420 - 0x190f6,0x163e8,0x121e4,0x163e4,0x121e2,0x163e2,0x121f6,0x163f6,0x1f614,0x1617e, // 430 - 0x1f612,0x1e414,0x1ec34,0x1e412,0x1ec32,0x1c834,0x1d874,0x1c832,0x1d872,0x19074, // 440 - 0x1b0f4,0x19072,0x1b0f2,0x120f4,0x161f4,0x120f2,0x161f2,0x1f60a,0x1e40a,0x1ec1a, // 450 - 0x1c81a,0x1d83a,0x1903a,0x1b07a,0x1e2a0,0x1f158,0x1f8ae,0x1e290,0x1f14c,0x1e288, // 460 - 0x1f146,0x1e284,0x1e282,0x1c5a0,0x1e2d8,0x1f16e,0x1c590,0x1e2cc,0x1c588,0x1e2c6, // 470 - 0x1c584,0x1c582,0x18ba0,0x1c5d8,0x1e2ee,0x18b90,0x1c5cc,0x18b88,0x1c5c6,0x18b84, // 480 - 0x18b82,0x117a0,0x18bd8,0x1c5ee,0x11790,0x18bcc,0x11788,0x18bc6,0x11784,0x11782, // 490 - 0x117d8,0x18bee,0x117cc,0x117c6,0x117ee,0x1f350,0x1f9ac,0x135f8,0x1f348,0x1f9a6, // 500 - 0x134fc,0x1f344,0x1347e,0x1f342,0x1e250,0x1f12c,0x1e6d0,0x1e248,0x1f126,0x1e6c8, // 510 - 0x1f366,0x1e6c4,0x1e242,0x1e6c2,0x1c4d0,0x1e26c,0x1cdd0,0x1c4c8,0x1e266,0x1cdc8, // 520 - 0x1e6e6,0x1cdc4,0x1c4c2,0x1cdc2,0x189d0,0x1c4ec,0x19bd0,0x189c8,0x1c4e6,0x19bc8, // 530 - 0x1cde6,0x19bc4,0x189c2,0x19bc2,0x113d0,0x189ec,0x137d0,0x113c8,0x189e6,0x137c8, // 540 - 0x19be6,0x137c4,0x113c2,0x137c2,0x113ec,0x137ec,0x113e6,0x137e6,0x1fba8,0x175f0, // 550 - 0x1bafc,0x1fba4,0x174f8,0x1ba7e,0x1fba2,0x1747c,0x1743e,0x1f328,0x1f996,0x132fc, // 560 - 0x1f768,0x1fbb6,0x176fc,0x1327e,0x1f764,0x1f322,0x1767e,0x1f762,0x1e228,0x1f116, // 570 - 0x1e668,0x1e224,0x1eee8,0x1f776,0x1e222,0x1eee4,0x1e662,0x1eee2,0x1c468,0x1e236, // 580 - 0x1cce8,0x1c464,0x1dde8,0x1cce4,0x1c462,0x1dde4,0x1cce2,0x1dde2,0x188e8,0x1c476, // 590 - 0x199e8,0x188e4,0x1bbe8,0x199e4,0x188e2,0x1bbe4,0x199e2,0x1bbe2,0x111e8,0x188f6, // 600 - 0x133e8,0x111e4,0x177e8,0x133e4,0x111e2,0x177e4,0x133e2,0x177e2,0x111f6,0x133f6, // 610 - 0x1fb94,0x172f8,0x1b97e,0x1fb92,0x1727c,0x1723e,0x1f314,0x1317e,0x1f734,0x1f312, // 620 - 0x1737e,0x1f732,0x1e214,0x1e634,0x1e212,0x1ee74,0x1e632,0x1ee72,0x1c434,0x1cc74, // 630 - 0x1c432,0x1dcf4,0x1cc72,0x1dcf2,0x18874,0x198f4,0x18872,0x1b9f4,0x198f2,0x1b9f2, // 640 - 0x110f4,0x131f4,0x110f2,0x173f4,0x131f2,0x173f2,0x1fb8a,0x1717c,0x1713e,0x1f30a, // 650 - 0x1f71a,0x1e20a,0x1e61a,0x1ee3a,0x1c41a,0x1cc3a,0x1dc7a,0x1883a,0x1987a,0x1b8fa, // 660 - 0x1107a,0x130fa,0x171fa,0x170be,0x1e150,0x1f0ac,0x1e148,0x1f0a6,0x1e144,0x1e142, // 670 - 0x1c2d0,0x1e16c,0x1c2c8,0x1e166,0x1c2c4,0x1c2c2,0x185d0,0x1c2ec,0x185c8,0x1c2e6, // 680 - 0x185c4,0x185c2,0x10bd0,0x185ec,0x10bc8,0x185e6,0x10bc4,0x10bc2,0x10bec,0x10be6, // 690 - 0x1f1a8,0x1f8d6,0x11afc,0x1f1a4,0x11a7e,0x1f1a2,0x1e128,0x1f096,0x1e368,0x1e124, // 700 - 0x1e364,0x1e122,0x1e362,0x1c268,0x1e136,0x1c6e8,0x1c264,0x1c6e4,0x1c262,0x1c6e2, // 710 - 0x184e8,0x1c276,0x18de8,0x184e4,0x18de4,0x184e2,0x18de2,0x109e8,0x184f6,0x11be8, // 720 - 0x109e4,0x11be4,0x109e2,0x11be2,0x109f6,0x11bf6,0x1f9d4,0x13af8,0x19d7e,0x1f9d2, // 730 - 0x13a7c,0x13a3e,0x1f194,0x1197e,0x1f3b4,0x1f192,0x13b7e,0x1f3b2,0x1e114,0x1e334, // 740 - 0x1e112,0x1e774,0x1e332,0x1e772,0x1c234,0x1c674,0x1c232,0x1cef4,0x1c672,0x1cef2, // 750 - 0x18474,0x18cf4,0x18472,0x19df4,0x18cf2,0x19df2,0x108f4,0x119f4,0x108f2,0x13bf4, // 760 - 0x119f2,0x13bf2,0x17af0,0x1bd7c,0x17a78,0x1bd3e,0x17a3c,0x17a1e,0x1f9ca,0x1397c, // 770 - 0x1fbda,0x17b7c,0x1393e,0x17b3e,0x1f18a,0x1f39a,0x1f7ba,0x1e10a,0x1e31a,0x1e73a, // 780 - 0x1ef7a,0x1c21a,0x1c63a,0x1ce7a,0x1defa,0x1843a,0x18c7a,0x19cfa,0x1bdfa,0x1087a, // 790 - 0x118fa,0x139fa,0x17978,0x1bcbe,0x1793c,0x1791e,0x138be,0x179be,0x178bc,0x1789e, // 800 - 0x1785e,0x1e0a8,0x1e0a4,0x1e0a2,0x1c168,0x1e0b6,0x1c164,0x1c162,0x182e8,0x1c176, // 810 - 0x182e4,0x182e2,0x105e8,0x182f6,0x105e4,0x105e2,0x105f6,0x1f0d4,0x10d7e,0x1f0d2, // 820 - 0x1e094,0x1e1b4,0x1e092,0x1e1b2,0x1c134,0x1c374,0x1c132,0x1c372,0x18274,0x186f4, // 830 - 0x18272,0x186f2,0x104f4,0x10df4,0x104f2,0x10df2,0x1f8ea,0x11d7c,0x11d3e,0x1f0ca, // 840 - 0x1f1da,0x1e08a,0x1e19a,0x1e3ba,0x1c11a,0x1c33a,0x1c77a,0x1823a,0x1867a,0x18efa, // 850 - 0x1047a,0x10cfa,0x11dfa,0x13d78,0x19ebe,0x13d3c,0x13d1e,0x11cbe,0x13dbe,0x17d70, // 860 - 0x1bebc,0x17d38,0x1be9e,0x17d1c,0x17d0e,0x13cbc,0x17dbc,0x13c9e,0x17d9e,0x17cb8, // 870 - 0x1be5e,0x17c9c,0x17c8e,0x13c5e,0x17cde,0x17c5c,0x17c4e,0x17c2e,0x1c0b4,0x1c0b2, // 880 - 0x18174,0x18172,0x102f4,0x102f2,0x1e0da,0x1c09a,0x1c1ba,0x1813a,0x1837a,0x1027a, // 890 - 0x106fa,0x10ebe,0x11ebc,0x11e9e,0x13eb8,0x19f5e,0x13e9c,0x13e8e,0x11e5e,0x13ede, // 900 - 0x17eb0,0x1bf5c,0x17e98,0x1bf4e,0x17e8c,0x17e86,0x13e5c,0x17edc,0x13e4e,0x17ece, // 910 - 0x17e58,0x1bf2e,0x17e4c,0x17e46,0x13e2e,0x17e6e,0x17e2c,0x17e26,0x10f5e,0x11f5c, // 920 - 0x11f4e,0x13f58,0x19fae,0x13f4c,0x13f46,0x11f2e,0x13f6e,0x13f2c,0x13f26), // 929 - array( // cluster 6 ----------------------------------------------------------------------- - 0x1abe0,0x1d5f8,0x153c0,0x1a9f0,0x1d4fc,0x151e0,0x1a8f8,0x1d47e,0x150f0,0x1a87c, // 10 - 0x15078,0x1fad0,0x15be0,0x1adf8,0x1fac8,0x159f0,0x1acfc,0x1fac4,0x158f8,0x1ac7e, // 20 - 0x1fac2,0x1587c,0x1f5d0,0x1faec,0x15df8,0x1f5c8,0x1fae6,0x15cfc,0x1f5c4,0x15c7e, // 30 - 0x1f5c2,0x1ebd0,0x1f5ec,0x1ebc8,0x1f5e6,0x1ebc4,0x1ebc2,0x1d7d0,0x1ebec,0x1d7c8, // 40 - 0x1ebe6,0x1d7c4,0x1d7c2,0x1afd0,0x1d7ec,0x1afc8,0x1d7e6,0x1afc4,0x14bc0,0x1a5f0, // 50 - 0x1d2fc,0x149e0,0x1a4f8,0x1d27e,0x148f0,0x1a47c,0x14878,0x1a43e,0x1483c,0x1fa68, // 60 - 0x14df0,0x1a6fc,0x1fa64,0x14cf8,0x1a67e,0x1fa62,0x14c7c,0x14c3e,0x1f4e8,0x1fa76, // 70 - 0x14efc,0x1f4e4,0x14e7e,0x1f4e2,0x1e9e8,0x1f4f6,0x1e9e4,0x1e9e2,0x1d3e8,0x1e9f6, // 80 - 0x1d3e4,0x1d3e2,0x1a7e8,0x1d3f6,0x1a7e4,0x1a7e2,0x145e0,0x1a2f8,0x1d17e,0x144f0, // 90 - 0x1a27c,0x14478,0x1a23e,0x1443c,0x1441e,0x1fa34,0x146f8,0x1a37e,0x1fa32,0x1467c, // 100 - 0x1463e,0x1f474,0x1477e,0x1f472,0x1e8f4,0x1e8f2,0x1d1f4,0x1d1f2,0x1a3f4,0x1a3f2, // 110 - 0x142f0,0x1a17c,0x14278,0x1a13e,0x1423c,0x1421e,0x1fa1a,0x1437c,0x1433e,0x1f43a, // 120 - 0x1e87a,0x1d0fa,0x14178,0x1a0be,0x1413c,0x1411e,0x141be,0x140bc,0x1409e,0x12bc0, // 130 - 0x195f0,0x1cafc,0x129e0,0x194f8,0x1ca7e,0x128f0,0x1947c,0x12878,0x1943e,0x1283c, // 140 - 0x1f968,0x12df0,0x196fc,0x1f964,0x12cf8,0x1967e,0x1f962,0x12c7c,0x12c3e,0x1f2e8, // 150 - 0x1f976,0x12efc,0x1f2e4,0x12e7e,0x1f2e2,0x1e5e8,0x1f2f6,0x1e5e4,0x1e5e2,0x1cbe8, // 160 - 0x1e5f6,0x1cbe4,0x1cbe2,0x197e8,0x1cbf6,0x197e4,0x197e2,0x1b5e0,0x1daf8,0x1ed7e, // 170 - 0x169c0,0x1b4f0,0x1da7c,0x168e0,0x1b478,0x1da3e,0x16870,0x1b43c,0x16838,0x1b41e, // 180 - 0x1681c,0x125e0,0x192f8,0x1c97e,0x16de0,0x124f0,0x1927c,0x16cf0,0x1b67c,0x1923e, // 190 - 0x16c78,0x1243c,0x16c3c,0x1241e,0x16c1e,0x1f934,0x126f8,0x1937e,0x1fb74,0x1f932, // 200 - 0x16ef8,0x1267c,0x1fb72,0x16e7c,0x1263e,0x16e3e,0x1f274,0x1277e,0x1f6f4,0x1f272, // 210 - 0x16f7e,0x1f6f2,0x1e4f4,0x1edf4,0x1e4f2,0x1edf2,0x1c9f4,0x1dbf4,0x1c9f2,0x1dbf2, // 220 - 0x193f4,0x193f2,0x165c0,0x1b2f0,0x1d97c,0x164e0,0x1b278,0x1d93e,0x16470,0x1b23c, // 230 - 0x16438,0x1b21e,0x1641c,0x1640e,0x122f0,0x1917c,0x166f0,0x12278,0x1913e,0x16678, // 240 - 0x1b33e,0x1663c,0x1221e,0x1661e,0x1f91a,0x1237c,0x1fb3a,0x1677c,0x1233e,0x1673e, // 250 - 0x1f23a,0x1f67a,0x1e47a,0x1ecfa,0x1c8fa,0x1d9fa,0x191fa,0x162e0,0x1b178,0x1d8be, // 260 - 0x16270,0x1b13c,0x16238,0x1b11e,0x1621c,0x1620e,0x12178,0x190be,0x16378,0x1213c, // 270 - 0x1633c,0x1211e,0x1631e,0x121be,0x163be,0x16170,0x1b0bc,0x16138,0x1b09e,0x1611c, // 280 - 0x1610e,0x120bc,0x161bc,0x1209e,0x1619e,0x160b8,0x1b05e,0x1609c,0x1608e,0x1205e, // 290 - 0x160de,0x1605c,0x1604e,0x115e0,0x18af8,0x1c57e,0x114f0,0x18a7c,0x11478,0x18a3e, // 300 - 0x1143c,0x1141e,0x1f8b4,0x116f8,0x18b7e,0x1f8b2,0x1167c,0x1163e,0x1f174,0x1177e, // 310 - 0x1f172,0x1e2f4,0x1e2f2,0x1c5f4,0x1c5f2,0x18bf4,0x18bf2,0x135c0,0x19af0,0x1cd7c, // 320 - 0x134e0,0x19a78,0x1cd3e,0x13470,0x19a3c,0x13438,0x19a1e,0x1341c,0x1340e,0x112f0, // 330 - 0x1897c,0x136f0,0x11278,0x1893e,0x13678,0x19b3e,0x1363c,0x1121e,0x1361e,0x1f89a, // 340 - 0x1137c,0x1f9ba,0x1377c,0x1133e,0x1373e,0x1f13a,0x1f37a,0x1e27a,0x1e6fa,0x1c4fa, // 350 - 0x1cdfa,0x189fa,0x1bae0,0x1dd78,0x1eebe,0x174c0,0x1ba70,0x1dd3c,0x17460,0x1ba38, // 360 - 0x1dd1e,0x17430,0x1ba1c,0x17418,0x1ba0e,0x1740c,0x132e0,0x19978,0x1ccbe,0x176e0, // 370 - 0x13270,0x1993c,0x17670,0x1bb3c,0x1991e,0x17638,0x1321c,0x1761c,0x1320e,0x1760e, // 380 - 0x11178,0x188be,0x13378,0x1113c,0x17778,0x1333c,0x1111e,0x1773c,0x1331e,0x1771e, // 390 - 0x111be,0x133be,0x177be,0x172c0,0x1b970,0x1dcbc,0x17260,0x1b938,0x1dc9e,0x17230, // 400 - 0x1b91c,0x17218,0x1b90e,0x1720c,0x17206,0x13170,0x198bc,0x17370,0x13138,0x1989e, // 410 - 0x17338,0x1b99e,0x1731c,0x1310e,0x1730e,0x110bc,0x131bc,0x1109e,0x173bc,0x1319e, // 420 - 0x1739e,0x17160,0x1b8b8,0x1dc5e,0x17130,0x1b89c,0x17118,0x1b88e,0x1710c,0x17106, // 430 - 0x130b8,0x1985e,0x171b8,0x1309c,0x1719c,0x1308e,0x1718e,0x1105e,0x130de,0x171de, // 440 - 0x170b0,0x1b85c,0x17098,0x1b84e,0x1708c,0x17086,0x1305c,0x170dc,0x1304e,0x170ce, // 450 - 0x17058,0x1b82e,0x1704c,0x17046,0x1302e,0x1706e,0x1702c,0x17026,0x10af0,0x1857c, // 460 - 0x10a78,0x1853e,0x10a3c,0x10a1e,0x10b7c,0x10b3e,0x1f0ba,0x1e17a,0x1c2fa,0x185fa, // 470 - 0x11ae0,0x18d78,0x1c6be,0x11a70,0x18d3c,0x11a38,0x18d1e,0x11a1c,0x11a0e,0x10978, // 480 - 0x184be,0x11b78,0x1093c,0x11b3c,0x1091e,0x11b1e,0x109be,0x11bbe,0x13ac0,0x19d70, // 490 - 0x1cebc,0x13a60,0x19d38,0x1ce9e,0x13a30,0x19d1c,0x13a18,0x19d0e,0x13a0c,0x13a06, // 500 - 0x11970,0x18cbc,0x13b70,0x11938,0x18c9e,0x13b38,0x1191c,0x13b1c,0x1190e,0x13b0e, // 510 - 0x108bc,0x119bc,0x1089e,0x13bbc,0x1199e,0x13b9e,0x1bd60,0x1deb8,0x1ef5e,0x17a40, // 520 - 0x1bd30,0x1de9c,0x17a20,0x1bd18,0x1de8e,0x17a10,0x1bd0c,0x17a08,0x1bd06,0x17a04, // 530 - 0x13960,0x19cb8,0x1ce5e,0x17b60,0x13930,0x19c9c,0x17b30,0x1bd9c,0x19c8e,0x17b18, // 540 - 0x1390c,0x17b0c,0x13906,0x17b06,0x118b8,0x18c5e,0x139b8,0x1189c,0x17bb8,0x1399c, // 550 - 0x1188e,0x17b9c,0x1398e,0x17b8e,0x1085e,0x118de,0x139de,0x17bde,0x17940,0x1bcb0, // 560 - 0x1de5c,0x17920,0x1bc98,0x1de4e,0x17910,0x1bc8c,0x17908,0x1bc86,0x17904,0x17902, // 570 - 0x138b0,0x19c5c,0x179b0,0x13898,0x19c4e,0x17998,0x1bcce,0x1798c,0x13886,0x17986, // 580 - 0x1185c,0x138dc,0x1184e,0x179dc,0x138ce,0x179ce,0x178a0,0x1bc58,0x1de2e,0x17890, // 590 - 0x1bc4c,0x17888,0x1bc46,0x17884,0x17882,0x13858,0x19c2e,0x178d8,0x1384c,0x178cc, // 600 - 0x13846,0x178c6,0x1182e,0x1386e,0x178ee,0x17850,0x1bc2c,0x17848,0x1bc26,0x17844, // 610 - 0x17842,0x1382c,0x1786c,0x13826,0x17866,0x17828,0x1bc16,0x17824,0x17822,0x13816, // 620 - 0x17836,0x10578,0x182be,0x1053c,0x1051e,0x105be,0x10d70,0x186bc,0x10d38,0x1869e, // 630 - 0x10d1c,0x10d0e,0x104bc,0x10dbc,0x1049e,0x10d9e,0x11d60,0x18eb8,0x1c75e,0x11d30, // 640 - 0x18e9c,0x11d18,0x18e8e,0x11d0c,0x11d06,0x10cb8,0x1865e,0x11db8,0x10c9c,0x11d9c, // 650 - 0x10c8e,0x11d8e,0x1045e,0x10cde,0x11dde,0x13d40,0x19eb0,0x1cf5c,0x13d20,0x19e98, // 660 - 0x1cf4e,0x13d10,0x19e8c,0x13d08,0x19e86,0x13d04,0x13d02,0x11cb0,0x18e5c,0x13db0, // 670 - 0x11c98,0x18e4e,0x13d98,0x19ece,0x13d8c,0x11c86,0x13d86,0x10c5c,0x11cdc,0x10c4e, // 680 - 0x13ddc,0x11cce,0x13dce,0x1bea0,0x1df58,0x1efae,0x1be90,0x1df4c,0x1be88,0x1df46, // 690 - 0x1be84,0x1be82,0x13ca0,0x19e58,0x1cf2e,0x17da0,0x13c90,0x19e4c,0x17d90,0x1becc, // 700 - 0x19e46,0x17d88,0x13c84,0x17d84,0x13c82,0x17d82,0x11c58,0x18e2e,0x13cd8,0x11c4c, // 710 - 0x17dd8,0x13ccc,0x11c46,0x17dcc,0x13cc6,0x17dc6,0x10c2e,0x11c6e,0x13cee,0x17dee, // 720 - 0x1be50,0x1df2c,0x1be48,0x1df26,0x1be44,0x1be42,0x13c50,0x19e2c,0x17cd0,0x13c48, // 730 - 0x19e26,0x17cc8,0x1be66,0x17cc4,0x13c42,0x17cc2,0x11c2c,0x13c6c,0x11c26,0x17cec, // 740 - 0x13c66,0x17ce6,0x1be28,0x1df16,0x1be24,0x1be22,0x13c28,0x19e16,0x17c68,0x13c24, // 750 - 0x17c64,0x13c22,0x17c62,0x11c16,0x13c36,0x17c76,0x1be14,0x1be12,0x13c14,0x17c34, // 760 - 0x13c12,0x17c32,0x102bc,0x1029e,0x106b8,0x1835e,0x1069c,0x1068e,0x1025e,0x106de, // 770 - 0x10eb0,0x1875c,0x10e98,0x1874e,0x10e8c,0x10e86,0x1065c,0x10edc,0x1064e,0x10ece, // 780 - 0x11ea0,0x18f58,0x1c7ae,0x11e90,0x18f4c,0x11e88,0x18f46,0x11e84,0x11e82,0x10e58, // 790 - 0x1872e,0x11ed8,0x18f6e,0x11ecc,0x10e46,0x11ec6,0x1062e,0x10e6e,0x11eee,0x19f50, // 800 - 0x1cfac,0x19f48,0x1cfa6,0x19f44,0x19f42,0x11e50,0x18f2c,0x13ed0,0x19f6c,0x18f26, // 810 - 0x13ec8,0x11e44,0x13ec4,0x11e42,0x13ec2,0x10e2c,0x11e6c,0x10e26,0x13eec,0x11e66, // 820 - 0x13ee6,0x1dfa8,0x1efd6,0x1dfa4,0x1dfa2,0x19f28,0x1cf96,0x1bf68,0x19f24,0x1bf64, // 830 - 0x19f22,0x1bf62,0x11e28,0x18f16,0x13e68,0x11e24,0x17ee8,0x13e64,0x11e22,0x17ee4, // 840 - 0x13e62,0x17ee2,0x10e16,0x11e36,0x13e76,0x17ef6,0x1df94,0x1df92,0x19f14,0x1bf34, // 850 - 0x19f12,0x1bf32,0x11e14,0x13e34,0x11e12,0x17e74,0x13e32,0x17e72,0x1df8a,0x19f0a, // 860 - 0x1bf1a,0x11e0a,0x13e1a,0x17e3a,0x1035c,0x1034e,0x10758,0x183ae,0x1074c,0x10746, // 870 - 0x1032e,0x1076e,0x10f50,0x187ac,0x10f48,0x187a6,0x10f44,0x10f42,0x1072c,0x10f6c, // 880 - 0x10726,0x10f66,0x18fa8,0x1c7d6,0x18fa4,0x18fa2,0x10f28,0x18796,0x11f68,0x18fb6, // 890 - 0x11f64,0x10f22,0x11f62,0x10716,0x10f36,0x11f76,0x1cfd4,0x1cfd2,0x18f94,0x19fb4, // 900 - 0x18f92,0x19fb2,0x10f14,0x11f34,0x10f12,0x13f74,0x11f32,0x13f72,0x1cfca,0x18f8a, // 910 - 0x19f9a,0x10f0a,0x11f1a,0x13f3a,0x103ac,0x103a6,0x107a8,0x183d6,0x107a4,0x107a2, // 920 - 0x10396,0x107b6,0x187d4,0x187d2,0x10794,0x10fb4,0x10792,0x10fb2,0x1c7ea) // 929 - ); // end of $clusters array - - /** - * Array of factors of the Reed-Solomon polynomial equations used for error correction; one sub array for each correction level (0-8). - * @protected - */ - protected $rsfactors = array( - array( // ECL 0 (2 factors) ------------------------------------------------------------------------------- - 0x01b,0x395), // 2 - array( // ECL 1 (4 factors) ------------------------------------------------------------------------------- - 0x20a,0x238,0x2d3,0x329), // 4 - array( // ECL 2 (8 factors) ------------------------------------------------------------------------------- - 0x0ed,0x134,0x1b4,0x11c,0x286,0x28d,0x1ac,0x17b), // 8 - array( // ECL 3 (16 factors) ------------------------------------------------------------------------------ - 0x112,0x232,0x0e8,0x2f3,0x257,0x20c,0x321,0x084,0x127,0x074,0x1ba,0x1ac,0x127,0x02a,0x0b0,0x041),// 16 - array( // ECL 4 (32 factors) ------------------------------------------------------------------------------ - 0x169,0x23f,0x39a,0x20d,0x0b0,0x24a,0x280,0x141,0x218,0x2e6,0x2a5,0x2e6,0x2af,0x11c,0x0c1,0x205, // 16 - 0x111,0x1ee,0x107,0x093,0x251,0x320,0x23b,0x140,0x323,0x085,0x0e7,0x186,0x2ad,0x14a,0x03f,0x19a),// 32 - array( // ECL 5 (64 factors) ------------------------------------------------------------------------------ - 0x21b,0x1a6,0x006,0x05d,0x35e,0x303,0x1c5,0x06a,0x262,0x11f,0x06b,0x1f9,0x2dd,0x36d,0x17d,0x264, // 16 - 0x2d3,0x1dc,0x1ce,0x0ac,0x1ae,0x261,0x35a,0x336,0x21f,0x178,0x1ff,0x190,0x2a0,0x2fa,0x11b,0x0b8, // 32 - 0x1b8,0x023,0x207,0x01f,0x1cc,0x252,0x0e1,0x217,0x205,0x160,0x25d,0x09e,0x28b,0x0c9,0x1e8,0x1f6, // 48 - 0x288,0x2dd,0x2cd,0x053,0x194,0x061,0x118,0x303,0x348,0x275,0x004,0x17d,0x34b,0x26f,0x108,0x21f),// 64 - array( // ECL 6 (128 factors) ----------------------------------------------------------------------------- - 0x209,0x136,0x360,0x223,0x35a,0x244,0x128,0x17b,0x035,0x30b,0x381,0x1bc,0x190,0x39d,0x2ed,0x19f, // 16 - 0x336,0x05d,0x0d9,0x0d0,0x3a0,0x0f4,0x247,0x26c,0x0f6,0x094,0x1bf,0x277,0x124,0x38c,0x1ea,0x2c0, // 32 - 0x204,0x102,0x1c9,0x38b,0x252,0x2d3,0x2a2,0x124,0x110,0x060,0x2ac,0x1b0,0x2ae,0x25e,0x35c,0x239, // 48 - 0x0c1,0x0db,0x081,0x0ba,0x0ec,0x11f,0x0c0,0x307,0x116,0x0ad,0x028,0x17b,0x2c8,0x1cf,0x286,0x308, // 64 - 0x0ab,0x1eb,0x129,0x2fb,0x09c,0x2dc,0x05f,0x10e,0x1bf,0x05a,0x1fb,0x030,0x0e4,0x335,0x328,0x382, // 80 - 0x310,0x297,0x273,0x17a,0x17e,0x106,0x17c,0x25a,0x2f2,0x150,0x059,0x266,0x057,0x1b0,0x29e,0x268, // 96 - 0x09d,0x176,0x0f2,0x2d6,0x258,0x10d,0x177,0x382,0x34d,0x1c6,0x162,0x082,0x32e,0x24b,0x324,0x022, // 112 - 0x0d3,0x14a,0x21b,0x129,0x33b,0x361,0x025,0x205,0x342,0x13b,0x226,0x056,0x321,0x004,0x06c,0x21b),// 128 - array( // ECL 7 (256 factors) ----------------------------------------------------------------------------- - 0x20c,0x37e,0x04b,0x2fe,0x372,0x359,0x04a,0x0cc,0x052,0x24a,0x2c4,0x0fa,0x389,0x312,0x08a,0x2d0, // 16 - 0x35a,0x0c2,0x137,0x391,0x113,0x0be,0x177,0x352,0x1b6,0x2dd,0x0c2,0x118,0x0c9,0x118,0x33c,0x2f5, // 32 - 0x2c6,0x32e,0x397,0x059,0x044,0x239,0x00b,0x0cc,0x31c,0x25d,0x21c,0x391,0x321,0x2bc,0x31f,0x089, // 48 - 0x1b7,0x1a2,0x250,0x29c,0x161,0x35b,0x172,0x2b6,0x145,0x0f0,0x0d8,0x101,0x11c,0x225,0x0d1,0x374, // 64 - 0x13b,0x046,0x149,0x319,0x1ea,0x112,0x36d,0x0a2,0x2ed,0x32c,0x2ac,0x1cd,0x14e,0x178,0x351,0x209, // 80 - 0x133,0x123,0x323,0x2c8,0x013,0x166,0x18f,0x38c,0x067,0x1ff,0x033,0x008,0x205,0x0e1,0x121,0x1d6, // 96 - 0x27d,0x2db,0x042,0x0ff,0x395,0x10d,0x1cf,0x33e,0x2da,0x1b1,0x350,0x249,0x088,0x21a,0x38a,0x05a, // 112 - 0x002,0x122,0x2e7,0x0c7,0x28f,0x387,0x149,0x031,0x322,0x244,0x163,0x24c,0x0bc,0x1ce,0x00a,0x086, // 128 - 0x274,0x140,0x1df,0x082,0x2e3,0x047,0x107,0x13e,0x176,0x259,0x0c0,0x25d,0x08e,0x2a1,0x2af,0x0ea, // 144 - 0x2d2,0x180,0x0b1,0x2f0,0x25f,0x280,0x1c7,0x0c1,0x2b1,0x2c3,0x325,0x281,0x030,0x03c,0x2dc,0x26d, // 160 - 0x37f,0x220,0x105,0x354,0x28f,0x135,0x2b9,0x2f3,0x2f4,0x03c,0x0e7,0x305,0x1b2,0x1a5,0x2d6,0x210, // 176 - 0x1f7,0x076,0x031,0x31b,0x020,0x090,0x1f4,0x0ee,0x344,0x18a,0x118,0x236,0x13f,0x009,0x287,0x226, // 192 - 0x049,0x392,0x156,0x07e,0x020,0x2a9,0x14b,0x318,0x26c,0x03c,0x261,0x1b9,0x0b4,0x317,0x37d,0x2f2, // 208 - 0x25d,0x17f,0x0e4,0x2ed,0x2f8,0x0d5,0x036,0x129,0x086,0x036,0x342,0x12b,0x39a,0x0bf,0x38e,0x214, // 224 - 0x261,0x33d,0x0bd,0x014,0x0a7,0x01d,0x368,0x1c1,0x053,0x192,0x029,0x290,0x1f9,0x243,0x1e1,0x0ad, // 240 - 0x194,0x0fb,0x2b0,0x05f,0x1f1,0x22b,0x282,0x21f,0x133,0x09f,0x39c,0x22e,0x288,0x037,0x1f1,0x00a),// 256 - array( // ECL 8 (512 factors) ----------------------------------------------------------------------------- - 0x160,0x04d,0x175,0x1f8,0x023,0x257,0x1ac,0x0cf,0x199,0x23e,0x076,0x1f2,0x11d,0x17c,0x15e,0x1ec, // 16 - 0x0c5,0x109,0x398,0x09b,0x392,0x12b,0x0e5,0x283,0x126,0x367,0x132,0x058,0x057,0x0c1,0x160,0x30d, // 32 - 0x34e,0x04b,0x147,0x208,0x1b3,0x21f,0x0cb,0x29a,0x0f9,0x15a,0x30d,0x26d,0x280,0x10c,0x31a,0x216, // 48 - 0x21b,0x30d,0x198,0x186,0x284,0x066,0x1dc,0x1f3,0x122,0x278,0x221,0x025,0x35a,0x394,0x228,0x029, // 64 - 0x21e,0x121,0x07a,0x110,0x17f,0x320,0x1e5,0x062,0x2f0,0x1d8,0x2f9,0x06b,0x310,0x35c,0x292,0x2e5, // 80 - 0x122,0x0cc,0x2a9,0x197,0x357,0x055,0x063,0x03e,0x1e2,0x0b4,0x014,0x129,0x1c3,0x251,0x391,0x08e, // 96 - 0x328,0x2ac,0x11f,0x218,0x231,0x04c,0x28d,0x383,0x2d9,0x237,0x2e8,0x186,0x201,0x0c0,0x204,0x102, // 112 - 0x0f0,0x206,0x31a,0x18b,0x300,0x350,0x033,0x262,0x180,0x0a8,0x0be,0x33a,0x148,0x254,0x312,0x12f, // 128 - 0x23a,0x17d,0x19f,0x281,0x09c,0x0ed,0x097,0x1ad,0x213,0x0cf,0x2a4,0x2c6,0x059,0x0a8,0x130,0x192, // 144 - 0x028,0x2c4,0x23f,0x0a2,0x360,0x0e5,0x041,0x35d,0x349,0x200,0x0a4,0x1dd,0x0dd,0x05c,0x166,0x311, // 160 - 0x120,0x165,0x352,0x344,0x33b,0x2e0,0x2c3,0x05e,0x008,0x1ee,0x072,0x209,0x002,0x1f3,0x353,0x21f, // 176 - 0x098,0x2d9,0x303,0x05f,0x0f8,0x169,0x242,0x143,0x358,0x31d,0x121,0x033,0x2ac,0x1d2,0x215,0x334, // 192 - 0x29d,0x02d,0x386,0x1c4,0x0a7,0x156,0x0f4,0x0ad,0x023,0x1cf,0x28b,0x033,0x2bb,0x24f,0x1c4,0x242, // 208 - 0x025,0x07c,0x12a,0x14c,0x228,0x02b,0x1ab,0x077,0x296,0x309,0x1db,0x352,0x2fc,0x16c,0x242,0x38f, // 224 - 0x11b,0x2c7,0x1d8,0x1a4,0x0f5,0x120,0x252,0x18a,0x1ff,0x147,0x24d,0x309,0x2bb,0x2b0,0x02b,0x198, // 240 - 0x34a,0x17f,0x2d1,0x209,0x230,0x284,0x2ca,0x22f,0x03e,0x091,0x369,0x297,0x2c9,0x09f,0x2a0,0x2d9, // 256 - 0x270,0x03b,0x0c1,0x1a1,0x09e,0x0d1,0x233,0x234,0x157,0x2b5,0x06d,0x260,0x233,0x16d,0x0b5,0x304, // 272 - 0x2a5,0x136,0x0f8,0x161,0x2c4,0x19a,0x243,0x366,0x269,0x349,0x278,0x35c,0x121,0x218,0x023,0x309, // 288 - 0x26a,0x24a,0x1a8,0x341,0x04d,0x255,0x15a,0x10d,0x2f5,0x278,0x2b7,0x2ef,0x14b,0x0f7,0x0b8,0x02d, // 304 - 0x313,0x2a8,0x012,0x042,0x197,0x171,0x036,0x1ec,0x0e4,0x265,0x33e,0x39a,0x1b5,0x207,0x284,0x389, // 320 - 0x315,0x1a4,0x131,0x1b9,0x0cf,0x12c,0x37c,0x33b,0x08d,0x219,0x17d,0x296,0x201,0x038,0x0fc,0x155, // 336 - 0x0f2,0x31d,0x346,0x345,0x2d0,0x0e0,0x133,0x277,0x03d,0x057,0x230,0x136,0x2f4,0x299,0x18d,0x328, // 352 - 0x353,0x135,0x1d9,0x31b,0x17a,0x01f,0x287,0x393,0x1cb,0x326,0x24e,0x2db,0x1a9,0x0d8,0x224,0x0f9, // 368 - 0x141,0x371,0x2bb,0x217,0x2a1,0x30e,0x0d2,0x32f,0x389,0x12f,0x34b,0x39a,0x119,0x049,0x1d5,0x317, // 384 - 0x294,0x0a2,0x1f2,0x134,0x09b,0x1a6,0x38b,0x331,0x0bb,0x03e,0x010,0x1a9,0x217,0x150,0x11e,0x1b5, // 400 - 0x177,0x111,0x262,0x128,0x0b7,0x39b,0x074,0x29b,0x2ef,0x161,0x03e,0x16e,0x2b3,0x17b,0x2af,0x34a, // 416 - 0x025,0x165,0x2d0,0x2e6,0x14a,0x005,0x027,0x39b,0x137,0x1a8,0x0f2,0x2ed,0x141,0x036,0x29d,0x13c, // 432 - 0x156,0x12b,0x216,0x069,0x29b,0x1e8,0x280,0x2a0,0x240,0x21c,0x13c,0x1e6,0x2d1,0x262,0x02e,0x290, // 448 - 0x1bf,0x0ab,0x268,0x1d0,0x0be,0x213,0x129,0x141,0x2fa,0x2f0,0x215,0x0af,0x086,0x00e,0x17d,0x1b1, // 464 - 0x2cd,0x02d,0x06f,0x014,0x254,0x11c,0x2e0,0x08a,0x286,0x19b,0x36d,0x29d,0x08d,0x397,0x02d,0x30c, // 480 - 0x197,0x0a4,0x14c,0x383,0x0a5,0x2d6,0x258,0x145,0x1f2,0x28f,0x165,0x2f0,0x300,0x0df,0x351,0x287, // 496 - 0x03f,0x136,0x35f,0x0fb,0x16e,0x130,0x11a,0x2e2,0x2a3,0x19a,0x185,0x0f4,0x01f,0x079,0x12f,0x107) // 512 - ); - - /** - * This is the class constructor. - * Creates a PDF417 object - * @param string $code code to represent using PDF417 - * @param int $ecl error correction level (0-8); default -1 = automatic correction level - * @param float $aspectratio the width to height of the symbol (excluding quiet zones) - * @param array $macro information for macro block - * @public - */ - public function __construct($code, $ecl=-1, $aspectratio=2, $macro=array()) { - $barcode_array = array(); - if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { - return false; - } - // get the input sequence array - $sequence = $this->getInputSequences($code); - $codewords = array(); // array of code-words - foreach($sequence as $seq) { - $cw = $this->getCompaction($seq[0], $seq[1], true); - $codewords = array_merge($codewords, $cw); - } - if ($codewords[0] == 900) { - // Text Alpha is the default mode, so remove the first code - array_shift($codewords); - } - // count number of codewords - $numcw = count($codewords); - if ($numcw > 925) { - // reached maximum data codeword capacity - return false; - } - // build macro control block codewords - if (!empty($macro)) { - $macrocw = array(); - // beginning of macro control block - $macrocw[] = 928; - // segment index - $cw = $this->getCompaction(902, sprintf('%05d', $macro['segment_index']), false); - $macrocw = array_merge($macrocw, $cw); - // file ID - $cw = $this->getCompaction(900, $macro['file_id'], false); - $macrocw = array_merge($macrocw, $cw); - // optional fields - $optmodes = array(900,902,902,900,900,902,902); - $optsize = array(-1,2,4,-1,-1,-1,2); - foreach ($optmodes as $k => $omode) { - if (isset($macro['option_'.$k])) { - $macrocw[] = 923; - $macrocw[] = $k; - if ($optsize[$k] == 2) { - $macro['option_'.$k] = sprintf('%05d', $macro['option_'.$k]); - } elseif ($optsize[$k] == 4) { - $macro['option_'.$k] = sprintf('%010d', $macro['option_'.$k]); - } - $cw = $this->getCompaction($omode, $macro['option_'.$k], false); - $macrocw = array_merge($macrocw, $cw); - } - } - if ($macro['segment_index'] == ($macro['segment_total'] - 1)) { - // end of control block - $macrocw[] = 922; - } - // update total codewords - $numcw += count($macrocw); - } - // set error correction level - $ecl = $this->getErrorCorrectionLevel($ecl, $numcw); - // number of codewords for error correction - $errsize = (2 << $ecl); - // calculate number of columns (number of codewords per row) and rows - $nce = ($numcw + $errsize + 1); - $cols = round((sqrt(4761 + (68 * $aspectratio * ROWHEIGHT * $nce)) - 69) / 34); - // adjust cols - if ($cols < 1) { - $cols = 1; - } elseif ($cols > 30) { - $cols = 30; - } - $rows = ceil($nce / $cols); - $size = ($cols * $rows); - // adjust rows - if (($rows < 3) OR ($rows > 90)) { - if ($rows < 3) { - $rows = 3; - } elseif ($rows > 90) { - $rows = 90; - } - $cols = ceil($size / $rows); - $size = ($cols * $rows); - } - if ($size > 928) { - // set dimensions to get maximum capacity - if (abs($aspectratio - (17 * 29 / 32)) < abs($aspectratio - (17 * 16 / 58))) { - $cols = 29; - $rows = 32; - } else { - $cols = 16; - $rows = 58; - } - $size = 928; - } - // calculate padding - $pad = ($size - $nce); - if ($pad > 0) { - if (($size - $rows) == $nce) { - --$rows; - $size -= $rows; - } else { - // add pading - $codewords = array_merge($codewords, array_fill(0, $pad, 900)); - } - } - if (!empty($macro)) { - // add macro section - $codewords = array_merge($codewords, $macrocw); - } - // Symbol Length Descriptor (number of data codewords including Symbol Length Descriptor and pad codewords) - $sld = $size - $errsize; - // add symbol length description - array_unshift($codewords, $sld); - // calculate error correction - $ecw = $this->getErrorCorrection($codewords, $ecl); - // add error correction codewords - $codewords = array_merge($codewords, $ecw); - // add horizontal quiet zones to start and stop patterns - $pstart = str_repeat('0', QUIETH).$this->start_pattern; - $pstop = $this->stop_pattern.str_repeat('0', QUIETH); - $barcode_array['num_rows'] = ($rows * ROWHEIGHT) + (2 * QUIETV); - $barcode_array['num_cols'] = (($cols + 2) * 17) + 35 + (2 * QUIETH); - $barcode_array['bcode'] = array(); - // build rows for vertical quiet zone - if (QUIETV > 0) { - $empty_row = array_fill(0, $barcode_array['num_cols'], 0); - for ($i = 0; $i < QUIETV; ++$i) { - // add vertical quiet rows - $barcode_array['bcode'][] = $empty_row; - } - } - $k = 0; // codeword index - $cid = 0; // initial cluster - // for each row - for ($r = 0; $r < $rows; ++$r) { - // row start code - $row = $pstart; - switch ($cid) { - case 0: { - $L = ((30 * intval($r / 3)) + intval(($rows - 1) / 3)); - break; - } - case 1: { - $L = ((30 * intval($r / 3)) + ($ecl * 3) + (($rows - 1) % 3)); - break; - } - case 2: { - $L = ((30 * intval($r / 3)) + ($cols - 1)); - break; - } - } - // left row indicator - $row .= sprintf('%17b', $this->clusters[$cid][$L]); - // for each column - for ($c = 0; $c < $cols; ++$c) { - $row .= sprintf('%17b', $this->clusters[$cid][$codewords[$k]]); - ++$k; - } - switch ($cid) { - case 0: { - $L = ((30 * intval($r / 3)) + ($cols - 1)); - break; - } - case 1: { - $L = ((30 * intval($r / 3)) + intval(($rows - 1) / 3)); - break; - } - case 2: { - $L = ((30 * intval($r / 3)) + ($ecl * 3) + (($rows - 1) % 3)); - break; - } - } - // right row indicator - $row .= sprintf('%17b', $this->clusters[$cid][$L]); - // row stop code - $row .= $pstop; - // convert the string to array - $arow = preg_split('//', $row, -1, PREG_SPLIT_NO_EMPTY); - // duplicate row to get the desired height - for ($h = 0; $h < ROWHEIGHT; ++$h) { - $barcode_array['bcode'][] = $arow; - } - ++$cid; - if ($cid > 2) { - $cid = 0; - } - } - if (QUIETV > 0) { - for ($i = 0; $i < QUIETV; ++$i) { - // add vertical quiet rows - $barcode_array['bcode'][] = $empty_row; - } - } - $this->barcode_array = $barcode_array; - } - - /** - * Returns a barcode array which is readable by TCPDF - * @return array barcode array readable by TCPDF; - * @public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Returns the error correction level (0-8) to be used - * @param int $ecl error correction level - * @param int $numcw number of data codewords - * @return int error correction level - * @protected - */ - protected function getErrorCorrectionLevel($ecl, $numcw) { - $maxecl = 8; // starting error level - // check for automatic levels - if (($ecl < 0) OR ($ecl > 8)) { - if ($numcw < 41) { - $ecl = 2; - } elseif ($numcw < 161) { - $ecl = 3; - } elseif ($numcw < 321) { - $ecl = 4; - } elseif ($numcw < 864) { - $ecl = 5; - } else { - $ecl = $maxecl; - } - } - // get maximum correction level - $maxerrsize = (928 - $numcw); // available codewords for error - while ($maxecl > 0) { - $errsize = (2 << $ecl); - if ($maxerrsize >= $errsize) { - break; - } - --$maxecl; - } - if ($ecl > $maxecl) { - $ecl = $maxecl; - } - return $ecl; - } - - /** - * Returns the error correction codewords - * @param array $cw array of codewords including Symbol Length Descriptor and pad - * @param int $ecl error correction level 0-8 - * @return array of error correction codewords - * @protected - */ - protected function getErrorCorrection($cw, $ecl) { - // get error correction coefficients - $ecc = $this->rsfactors[$ecl]; - // number of error correction factors - $eclsize = (2 << $ecl); - // maximum index for $rsfactors[$ecl] - $eclmaxid = ($eclsize - 1); - // initialize array of error correction codewords - $ecw = array_fill(0, $eclsize, 0); - // for each data codeword - foreach($cw as $k => $d) { - $t1 = ($d + $ecw[$eclmaxid]) % 929; - for ($j = $eclmaxid; $j > 0; --$j) { - $t2 = ($t1 * $ecc[$j]) % 929; - $t3 = 929 - $t2; - $ecw[$j] = ($ecw[($j - 1)] + $t3) % 929; - } - $t2 = ($t1 * $ecc[0]) % 929; - $t3 = 929 - $t2; - $ecw[0] = $t3 % 929; - } - foreach($ecw as $j => $e) { - if ($e != 0) { - $ecw[$j] = 929 - $e; - } - } - $ecw = array_reverse($ecw); - return $ecw; - } - - /** - * Create array of sequences from input - * @param string $code code - * @return array bi-dimensional array containing characters and classification - * @protected - */ - protected function getInputSequences($code) { - $sequence_array = array(); // array to be returned - $numseq = array(); - // get numeric sequences - preg_match_all('/([0-9]{13,44})/', $code, $numseq, PREG_OFFSET_CAPTURE); - $numseq[1][] = array('', strlen($code)); - $offset = 0; - foreach($numseq[1] as $seq) { - $seqlen = strlen($seq[0]); - if ($seq[1] > 0) { - // extract text sequence before the number sequence - $prevseq = substr($code, $offset, ($seq[1] - $offset)); - $textseq = array(); - // get text sequences - preg_match_all('/([\x09\x0a\x0d\x20-\x7e]{5,})/', $prevseq, $textseq, PREG_OFFSET_CAPTURE); - $textseq[1][] = array('', strlen($prevseq)); - $txtoffset = 0; - foreach($textseq[1] as $txtseq) { - $txtseqlen = strlen($txtseq[0]); - if ($txtseq[1] > 0) { - // extract byte sequence before the text sequence - $prevtxtseq = substr($prevseq, $txtoffset, ($txtseq[1] - $txtoffset)); - if (strlen($prevtxtseq) > 0) { - // add BYTE sequence - if ((strlen($prevtxtseq) == 1) AND ((count($sequence_array) > 0) AND ($sequence_array[(count($sequence_array) - 1)][0] == 900))) { - $sequence_array[] = array(913, $prevtxtseq); - } elseif ((strlen($prevtxtseq) % 6) == 0) { - $sequence_array[] = array(924, $prevtxtseq); - } else { - $sequence_array[] = array(901, $prevtxtseq); - } - } - } - if ($txtseqlen > 0) { - // add numeric sequence - $sequence_array[] = array(900, $txtseq[0]); - } - $txtoffset = $txtseq[1] + $txtseqlen; - } - } - if ($seqlen > 0) { - // add numeric sequence - $sequence_array[] = array(902, $seq[0]); - } - $offset = $seq[1] + $seqlen; - } - return $sequence_array; - } - - /** - * Compact data by mode. - * @param int $mode compaction mode number - * @param string $code data to compact - * @param boolean $addmode if true add the mode codeword at first position - * @return array of codewords - * @protected - */ - protected function getCompaction($mode, $code, $addmode=true) { - $cw = array(); // array of codewords to return - switch($mode) { - case 900: { // Text Compaction mode latch - $submode = 0; // default Alpha sub-mode - $txtarr = array(); // array of characters and sub-mode switching characters - $codelen = strlen($code); - for ($i = 0; $i < $codelen; ++$i) { - $chval = ord($code[$i]); - if (($k = array_search($chval, $this->textsubmodes[$submode])) !== false) { - // we are on the same sub-mode - $txtarr[] = $k; - } else { - // the sub-mode is changed - for ($s = 0; $s < 4; ++$s) { - // search new sub-mode - if (($s != $submode) AND (($k = array_search($chval, $this->textsubmodes[$s])) !== false)) { - // $s is the new submode - if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code[($i + 1)]), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) { - // shift (temporary change only for this char) - if ($s == 3) { - // shift to puntuaction - $txtarr[] = 29; - } else { - // shift from lower to alpha - $txtarr[] = 27; - } - } else { - // latch - $txtarr = array_merge($txtarr, $this->textlatch[''.$submode.$s]); - // set new submode - $submode = $s; - } - // add characted code to array - $txtarr[] = $k; - break; - } - } - } - } - $txtarrlen = count($txtarr); - if (($txtarrlen % 2) != 0) { - // add padding - $txtarr[] = 29; - ++$txtarrlen; - } - // calculate codewords - for ($i = 0; $i < $txtarrlen; $i += 2) { - $cw[] = (30 * $txtarr[$i]) + $txtarr[($i + 1)]; - } - break; - } - case 901: - case 924: { // Byte Compaction mode latch - while (($codelen = strlen($code)) > 0) { - if ($codelen > 6) { - $rest = substr($code, 6); - $code = substr($code, 0, 6); - $sublen = 6; - } else { - $rest = ''; - $sublen = strlen($code); - } - if ($sublen == 6) { - $t = bcmul(''.ord($code[0]), '1099511627776'); - $t = bcadd($t, bcmul(''.ord($code[1]), '4294967296')); - $t = bcadd($t, bcmul(''.ord($code[2]), '16777216')); - $t = bcadd($t, bcmul(''.ord($code[3]), '65536')); - $t = bcadd($t, bcmul(''.ord($code[4]), '256')); - $t = bcadd($t, ''.ord($code[5])); - // tmp array for the 6 bytes block - $cw6 = array(); - do { - $d = bcmod($t, '900'); - $t = bcdiv($t, '900'); - // prepend the value to the beginning of the array - array_unshift($cw6, $d); - } while ($t != '0'); - // append the result array at the end - $cw = array_merge($cw, $cw6); - } else { - for ($i = 0; $i < $sublen; ++$i) { - $cw[] = ord($code[$i]); - } - } - $code = $rest; - } - break; - } - case 902: { // Numeric Compaction mode latch - while (($codelen = strlen($code)) > 0) { - if ($codelen > 44) { - $rest = substr($code, 44); - $code = substr($code, 0, 44); - } else { - $rest = ''; - } - $t = '1'.$code; - do { - $d = bcmod($t, '900'); - $t = bcdiv($t, '900'); - array_unshift($cw, $d); - } while ($t != '0'); - $code = $rest; - } - break; - } - case 913: { // Byte Compaction mode shift - $cw[] = ord($code); - break; - } - } - if ($addmode) { - // add the compaction mode codeword at the beginning - array_unshift($cw, $mode); - } - return $cw; - } - -} // end PDF417 class - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/barcodes/qrcode.php b/lib/combodo/tcpdf/include/barcodes/qrcode.php deleted file mode 100644 index 2e7f2f576..000000000 --- a/lib/combodo/tcpdf/include/barcodes/qrcode.php +++ /dev/null @@ -1,2842 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// DESCRIPTION : -// -// Class to create QR-code arrays for TCPDF class. -// QR Code symbol is a 2D barcode that can be scanned by -// handy terminals such as a mobile phone with CCD. -// The capacity of QR Code is up to 7000 digits or 4000 -// characters, and has high robustness. -// This class supports QR Code model 2, described in -// JIS (Japanese Industrial Standards) X0510:2004 -// or ISO/IEC 18004. -// Currently the following features are not supported: -// ECI and FNC1 mode, Micro QR Code, QR Code model 1, -// Structured mode. -// -// This class is derived from the following projects: -// --------------------------------------------------------- -// "PHP QR Code encoder" -// License: GNU-LGPLv3 -// Copyright (C) 2010 by Dominik Dzienia -// http://phpqrcode.sourceforge.net/ -// https://sourceforge.net/projects/phpqrcode/ -// -// The "PHP QR Code encoder" is based on -// "C libqrencode library" (ver. 3.1.1) -// License: GNU-LGPL 2.1 -// Copyright (C) 2006-2010 by Kentaro Fukuchi -// http://megaui.net/fukuchi/works/qrencode/index.en.html -// -// Reed-Solomon code encoder is written by Phil Karn, KA9Q. -// Copyright (C) 2002-2006 Phil Karn, KA9Q -// -// QR Code is registered trademark of DENSO WAVE INCORPORATED -// http://www.denso-wave.com/qrcode/index-e.html -// --------------------------------------------------------- -//============================================================+ - -/** - * @file - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.010 - */ - -// definitions -if (!defined('QRCODEDEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('QRCODEDEFS', true); - - // ----------------------------------------------------- - - // Encoding modes (characters which can be encoded in QRcode) - - /** - * Encoding mode - */ - define('QR_MODE_NL', -1); - - /** - * Encoding mode numeric (0-9). 3 characters are encoded to 10bit length. In theory, 7089 characters or less can be stored in a QRcode. - */ - define('QR_MODE_NM', 0); - - /** - * Encoding mode alphanumeric (0-9A-Z $%*+-./:) 45characters. 2 characters are encoded to 11bit length. In theory, 4296 characters or less can be stored in a QRcode. - */ - define('QR_MODE_AN', 1); - - /** - * Encoding mode 8bit byte data. In theory, 2953 characters or less can be stored in a QRcode. - */ - define('QR_MODE_8B', 2); - - /** - * Encoding mode KANJI. A KANJI character (multibyte character) is encoded to 13bit length. In theory, 1817 characters or less can be stored in a QRcode. - */ - define('QR_MODE_KJ', 3); - - /** - * Encoding mode STRUCTURED (currently unsupported) - */ - define('QR_MODE_ST', 4); - - // ----------------------------------------------------- - - // Levels of error correction. - // QRcode has a function of an error correcting for miss reading that white is black. - // Error correcting is defined in 4 level as below. - - /** - * Error correction level L : About 7% or less errors can be corrected. - */ - define('QR_ECLEVEL_L', 0); - - /** - * Error correction level M : About 15% or less errors can be corrected. - */ - define('QR_ECLEVEL_M', 1); - - /** - * Error correction level Q : About 25% or less errors can be corrected. - */ - define('QR_ECLEVEL_Q', 2); - - /** - * Error correction level H : About 30% or less errors can be corrected. - */ - define('QR_ECLEVEL_H', 3); - - // ----------------------------------------------------- - - // Version. Size of QRcode is defined as version. - // Version is from 1 to 40. - // Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. - // So version 40 is 177*177 matrix. - - /** - * Maximum QR Code version. - */ - define('QRSPEC_VERSION_MAX', 40); - - /** - * Maximum matrix size for maximum version (version 40 is 177*177 matrix). - */ - define('QRSPEC_WIDTH_MAX', 177); - - // ----------------------------------------------------- - - /** - * Matrix index to get width from $capacity array. - */ - define('QRCAP_WIDTH', 0); - - /** - * Matrix index to get number of words from $capacity array. - */ - define('QRCAP_WORDS', 1); - - /** - * Matrix index to get remainder from $capacity array. - */ - define('QRCAP_REMINDER', 2); - - /** - * Matrix index to get error correction level from $capacity array. - */ - define('QRCAP_EC', 3); - - // ----------------------------------------------------- - - // Structure (currently usupported) - - /** - * Number of header bits for structured mode - */ - define('STRUCTURE_HEADER_BITS', 20); - - /** - * Max number of symbols for structured mode - */ - define('MAX_STRUCTURED_SYMBOLS', 16); - - // ----------------------------------------------------- - - // Masks - - /** - * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column) - */ - define('N1', 3); - - /** - * Down point base value for case 2 mask pattern (module block of same color) - */ - define('N2', 3); - - /** - * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column) - */ - define('N3', 40); - - /** - * Down point base value for case 4 mask pattern (ration of dark modules in whole) - */ - define('N4', 10); - - // ----------------------------------------------------- - - // Optimization settings - - /** - * if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - */ - define('QR_FIND_BEST_MASK', true); - - /** - * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - */ - define('QR_FIND_FROM_RANDOM', 2); - - /** - * when QR_FIND_BEST_MASK === false - */ - define('QR_DEFAULT_MASK', 2); - - // ----------------------------------------------------- - -} // end of definitions - -/** - * @class QRcode - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.010 - */ -class QRcode { - - /** - * Barcode array to be returned which is readable by TCPDF. - * @protected - */ - protected $barcode_array = array(); - - /** - * QR code version. Size of QRcode is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix. - * @protected - */ - protected $version = 0; - - /** - * Levels of error correction. See definitions for possible values. - * @protected - */ - protected $level = QR_ECLEVEL_L; - - /** - * Encoding mode. - * @protected - */ - protected $hint = QR_MODE_8B; - - /** - * Boolean flag, if true the input string will be converted to uppercase. - * @protected - */ - protected $casesensitive = true; - - /** - * Structured QR code (not supported yet). - * @protected - */ - protected $structured = 0; - - /** - * Mask data. - * @protected - */ - protected $data; - - // FrameFiller - - /** - * Width. - * @protected - */ - protected $width; - - /** - * Frame. - * @protected - */ - protected $frame; - - /** - * X position of bit. - * @protected - */ - protected $x; - - /** - * Y position of bit. - * @protected - */ - protected $y; - - /** - * Direction. - * @protected - */ - protected $dir; - - /** - * Single bit value. - * @protected - */ - protected $bit; - - // ---- QRrawcode ---- - - /** - * Data code. - * @protected - */ - protected $datacode = array(); - - /** - * Error correction code. - * @protected - */ - protected $ecccode = array(); - - /** - * Blocks. - * @protected - */ - protected $blocks; - - /** - * Reed-Solomon blocks. - * @protected - */ - protected $rsblocks = array(); //of RSblock - - /** - * Counter. - * @protected - */ - protected $count; - - /** - * Data length. - * @protected - */ - protected $dataLength; - - /** - * Error correction length. - * @protected - */ - protected $eccLength; - - /** - * Value b1. - * @protected - */ - protected $b1; - - // ---- QRmask ---- - - /** - * Run length. - * @protected - */ - protected $runLength = array(); - - // ---- QRsplit ---- - - /** - * Input data string. - * @protected - */ - protected $dataStr = ''; - - /** - * Input items. - * @protected - */ - protected $items; - - // Reed-Solomon items - - /** - * Reed-Solomon items. - * @protected - */ - protected $rsitems = array(); - - /** - * Array of frames. - * @protected - */ - protected $frames = array(); - - /** - * Alphabet-numeric convesion table. - * @protected - */ - protected $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // - ); - - /** - * Array Table of the capacity of symbols. - * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. - * @protected - */ - protected $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), // - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), // - array( 29, 70, 7, array( 15, 26, 36, 44)), // - array( 33, 100, 7, array( 20, 36, 52, 64)), // - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), // - array( 45, 196, 0, array( 40, 72, 108, 130)), // - array( 49, 242, 0, array( 48, 88, 132, 156)), // - array( 53, 292, 0, array( 60, 110, 160, 192)), // - array( 57, 346, 0, array( 72, 130, 192, 224)), // 10 - array( 61, 404, 0, array( 80, 150, 224, 264)), // - array( 65, 466, 0, array( 96, 176, 260, 308)), // - array( 69, 532, 0, array( 104, 198, 288, 352)), // - array( 73, 581, 3, array( 120, 216, 320, 384)), // - array( 77, 655, 3, array( 132, 240, 360, 432)), // 15 - array( 81, 733, 3, array( 144, 280, 408, 480)), // - array( 85, 815, 3, array( 168, 308, 448, 532)), // - array( 89, 901, 3, array( 180, 338, 504, 588)), // - array( 93, 991, 3, array( 196, 364, 546, 650)), // - array( 97, 1085, 3, array( 224, 416, 600, 700)), // 20 - array(101, 1156, 4, array( 224, 442, 644, 750)), // - array(105, 1258, 4, array( 252, 476, 690, 816)), // - array(109, 1364, 4, array( 270, 504, 750, 900)), // - array(113, 1474, 4, array( 300, 560, 810, 960)), // - array(117, 1588, 4, array( 312, 588, 870, 1050)), // 25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), // - array(125, 1828, 4, array( 360, 700, 1020, 1200)), // - array(129, 1921, 3, array( 390, 728, 1050, 1260)), // - array(133, 2051, 3, array( 420, 784, 1140, 1350)), // - array(137, 2185, 3, array( 450, 812, 1200, 1440)), // 30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), // - array(145, 2465, 3, array( 510, 924, 1350, 1620)), // - array(149, 2611, 3, array( 540, 980, 1440, 1710)), // - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), // - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), // 35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), // - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), // - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), // - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), // - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) // 40 - ); - - /** - * Array Length indicator. - * @protected - */ - protected $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - /** - * Array Table of the error correction code (Reed-Solomon block). - * See Table 12-16 (pp.30-36), JIS X0510:2004. - * @protected - */ - protected $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), // - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), // - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), // - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), // - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), // - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), // 10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), // - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), // - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), // - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), // - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), // 15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), // - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), // - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), // - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), // - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), // 20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), // - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), // - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), // - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), // - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), // 25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), // - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), // - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), // - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), // - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), // - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), // - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), // - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), // - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), // 35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), // - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), // - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), // - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), // - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)) // 40 - ); - - /** - * Array Positions of alignment patterns. - * This array includes only the second and the third position of the alignment patterns. Rest of them can be calculated from the distance between them. - * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - * @protected - */ - protected $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), // 11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), // 16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), // 21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), // 26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), // 31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58) // 35-40 - ); - - /** - * Array Version information pattern (BCH coded). - * See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - * size: [QRSPEC_VERSION_MAX - 6] - * @protected - */ - protected $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, // - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, // - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, // - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, // - 0x27541, 0x28c69 - ); - - /** - * Array Format information - * @protected - */ - protected $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), // - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), // - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), // - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) // - ); - - - // ------------------------------------------------- - // ------------------------------------------------- - - - /** - * This is the class constructor. - * Creates a QRcode object - * @param string $code code to represent using QRcode - * @param string $eclevel error level:
    • L : About 7% or less errors can be corrected.
    • M : About 15% or less errors can be corrected.
    • Q : About 25% or less errors can be corrected.
    • H : About 30% or less errors can be corrected.
    - * @public - * @since 1.0.000 - */ - public function __construct($code, $eclevel = 'L') { - $barcode_array = array(); - if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { - return false; - } - // set error correction level - $this->level = array_search($eclevel, array('L', 'M', 'Q', 'H')); - if ($this->level === false) { - $this->level = QR_ECLEVEL_L; - } - if (($this->hint != QR_MODE_8B) AND ($this->hint != QR_MODE_KJ)) { - return false; - } - if (($this->version < 0) OR ($this->version > QRSPEC_VERSION_MAX)) { - return false; - } - $this->items = array(); - $this->encodeString($code); - if (is_null($this->data)) { - return false; - } - $qrTab = $this->binarize($this->data); - $size = count($qrTab); - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach (str_split($line) as $char) { - $arrAdd[] = ($char=='1')?1:0; - } - $barcode_array['bcode'][] = $arrAdd; - } - $this->barcode_array = $barcode_array; - } - - /** - * Returns a barcode array which is readable by TCPDF - * @return array barcode array readable by TCPDF; - * @public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Convert the frame in binary form - * @param array $frame array to binarize - * @return array frame in binary form - */ - protected function binarize($frame) { - $len = count($frame); - // the frame is square (width = height) - foreach ($frame as &$frameLine) { - for ($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - return $frame; - } - - /** - * Encode the input string to QR code - * @param string $string input string to encode - */ - protected function encodeString($string) { - $this->dataStr = $string; - if (!$this->casesensitive) { - $this->toUpper(); - } - $ret = $this->splitString(); - if ($ret < 0) { - return NULL; - } - $this->encodeMask(-1); - } - - /** - * Encode mask - * @param int $mask masking mode - */ - protected function encodeMask($mask) { - $spec = array(0, 0, 0, 0, 0); - $this->datacode = $this->getByteStream($this->items); - - if (is_null($this->datacode)) { - return NULL; - } - $spec = $this->getEccSpec($this->version, $this->level, $spec); - $this->b1 = $this->rsBlockNum1($spec); - $this->dataLength = $this->rsDataLength($spec); - $this->eccLength = $this->rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = $this->rsBlockNum($spec); - $ret = $this->init($spec); - if ($ret < 0) { - return NULL; - } - $this->count = 0; - $this->width = $this->getWidth($this->version); - $this->frame = $this->newFrame($this->version); - $this->x = $this->width - 1; - $this->y = $this->width - 1; - $this->dir = -1; - $this->bit = -1; - // inteleaved data and ecc codes - for ($i=0; $i < ($this->dataLength + $this->eccLength); $i++) { - $code = $this->getCode(); - $bit = 0x80; - for ($j=0; $j<8; $j++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - // remainder bits - $j = $this->getRemainder($this->version); - for ($i=0; $i<$j; $i++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02); - } - // masking - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - if ($mask < 0) { - if (QR_FIND_BEST_MASK) { - $masked = $this->mask($this->width, $this->frame, $this->level); - } else { - $masked = $this->makeMask($this->width, $this->frame, (intval(QR_DEFAULT_MASK) % 8), $this->level); - } - } else { - $masked = $this->makeMask($this->width, $this->frame, $mask, $this->level); - } - if ($masked == NULL) { - return NULL; - } - $this->data = $masked; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // FrameFiller - - /** - * Set frame value at specified position - * @param array $at x,y position - * @param int $val value of the character to set - */ - protected function setFrameAt($at, $val) { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - /** - * Get frame value at specified position - * @param array $at x,y position - * @return value at specified position - */ - protected function getFrameAt($at) { - return ord($this->frame[$at['y']][$at['x']]); - } - - /** - * Return the next frame position - * @return array of x,y coordinates - */ - protected function getNextPosition() { - do { - if ($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - $x = $this->x; - $y = $this->y; - $w = $this->width; - if ($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - if ($this->dir < 0) { - if ($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if ($x == 6) { - $x--; - $y = 9; - } - } - } else { - if ($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if ($x == 6) { - $x--; - $y -= 8; - } - } - } - if (($x < 0) OR ($y < 0)) { - return NULL; - } - $this->x = $x; - $this->y = $y; - } while(ord($this->frame[$y][$x]) & 0x80); - return array('x'=>$x, 'y'=>$y); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrawcode - - /** - * Initialize code. - * @param array $spec array of ECC specification - * @return int 0 in case of success, -1 in case of error - */ - protected function init($spec) { - $dl = $this->rsDataCodes1($spec); - $el = $this->rsEccCodes1($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - $endfor = $this->rsBlockNum1($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - if ($this->rsBlockNum2($spec) == 0) { - return 0; - } - $dl = $this->rsDataCodes2($spec); - $el = $this->rsEccCodes2($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - if ($rs == NULL) { - return -1; - } - $endfor = $this->rsBlockNum2($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - return 0; - } - - /** - * Return Reed-Solomon block code. - * @return array rsblocks - */ - protected function getCode() { - if ($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if ($col >= $this->rsblocks[0]['dataLength']) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]['data'][$col]; - } elseif ($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]['ecc'][$col]; - } else { - return 0; - } - $this->count++; - return $ret; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRmask - - /** - * Write Format Information on frame and returns the number of black bits - * @param int $width frame width - * @param array $frame frame - * @param array $mask masking mode - * @param int $level error correction level - * @return int blacks - */ - protected function writeFormatInformation($width, &$frame, $mask, $level) { - $blacks = 0; - $format = $this->getFormatInfo($mask, $level); - for ($i=0; $i<8; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[8][$width - 1 - $i] = chr($v); - if ($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - for ($i=0; $i<7; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[$width - 7 + $i][8] = chr($v); - if ($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - $format = $format >> 1; - } - return $blacks; - } - - /** - * mask0 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask0($x, $y) { - return ($x + $y) & 1; - } - - /** - * mask1 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask1($x, $y) { - return ($y & 1); - } - - /** - * mask2 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask2($x, $y) { - return ($x % 3); - } - - /** - * mask3 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask3($x, $y) { - return ($x + $y) % 3; - } - - /** - * mask4 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask4($x, $y) { - return (((int)($y / 2)) + ((int)($x / 3))) & 1; - } - - /** - * mask5 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask5($x, $y) { - return (($x * $y) & 1) + ($x * $y) % 3; - } - - /** - * mask6 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask6($x, $y) { - return ((($x * $y) & 1) + ($x * $y) % 3) & 1; - } - - /** - * mask7 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask7($x, $y) { - return ((($x * $y) % 3) + (($x + $y) & 1)) & 1; - } - - /** - * Return bitmask - * @param int $maskNo mask number - * @param int $width width - * @param array $frame frame - * @return array bitmask - */ - protected function generateMaskNo($maskNo, $width, $frame) { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if (ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - } - } - return $bitMask; - } - - /** - * makeMaskNo - * @param int $maskNo - * @param int $width - * @param int $s - * @param int $d - * @param boolean $maskGenOnly - * @return int b - */ - protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) { - $b = 0; - $bitMask = array(); - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if ($maskGenOnly) { - return; - } - $d = $s; - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if ($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ ((int)($bitMask[$y][$x]))); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - return $b; - } - - /** - * makeMask - * @param int $width - * @param array $frame - * @param int $maskNo - * @param int $level - * @return array mask - */ - protected function makeMask($width, $frame, $maskNo, $level) { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - return $masked; - } - - /** - * calcN1N3 - * @param int $length - * @return int demerit - */ - protected function calcN1N3($length) { - $demerit = 0; - for ($i=0; $i<$length; ++$i) { - if ($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if ($i & 1) { - if (($i >= 3) AND ($i < ($length-2)) AND ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if (($this->runLength[$i-2] == $fact) - AND ($this->runLength[$i-1] == $fact) - AND ($this->runLength[$i+1] == $fact) - AND ($this->runLength[$i+2] == $fact)) { - if (($this->runLength[$i-3] < 0) OR ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } elseif ((($i+3) >= $length) OR ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - /** - * evaluateSymbol - * @param int $width - * @param array $frame - * @return int demerit - */ - protected function evaluateSymbol($width, $frame) { - $head = 0; - $demerit = 0; - for ($y=0; $y<$width; ++$y) { - $head = 0; - $this->runLength[0] = 1; - $frameY = $frame[$y]; - if ($y > 0) { - $frameYM = $frame[$y-1]; - } - for ($x=0; $x<$width; ++$x) { - if (($x > 0) AND ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - if (($b22 | ($w22 ^ 1)) & 1) { - $demerit += N2; - } - } - if (($x == 0) AND (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($x > 0) { - if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - for ($x=0; $x<$width; ++$x) { - $head = 0; - $this->runLength[0] = 1; - for ($y=0; $y<$width; ++$y) { - if (($y == 0) AND (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($y > 0) { - if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - return $demerit; - } - - /** - * mask - * @param int $width - * @param array $frame - * @param int $level - * @return array best mask - */ - protected function mask($width, $frame, $level) { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - $checked_masks = array(0, 1, 2, 3, 4, 5, 6, 7); - if (QR_FIND_FROM_RANDOM !== false) { - $howManuOut = 8 - (QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; ++$i) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - } - $bestMask = $frame; - foreach ($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - if ($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - return $bestMask; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRsplit - - /** - * Return true if the character at specified position is a number - * @param string $str string - * @param int $pos characted position - * @return boolean true of false - */ - protected function isdigitat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - /** - * Return true if the character at specified position is an alphanumeric character - * @param string $str string - * @param int $pos characted position - * @return boolean true of false - */ - protected function isalnumat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ($this->lookAnTable(ord($str[$pos])) >= 0); - } - - /** - * identifyMode - * @param int $pos - * @return int mode - */ - protected function identifyMode($pos) { - if ($pos >= strlen($this->dataStr)) { - return QR_MODE_NL; - } - $c = $this->dataStr[$pos]; - if ($this->isdigitat($this->dataStr, $pos)) { - return QR_MODE_NM; - } elseif ($this->isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } elseif ($this->hint == QR_MODE_KJ) { - if ($pos+1 < strlen($this->dataStr)) { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if (($word >= 0x8140 && $word <= 0x9ffc) OR ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KJ; - } - } - } - return QR_MODE_8B; - } - - /** - * eatNum - * @return int run - */ - protected function eatNum() { - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 0; - while($this->isdigitat($this->dataStr, $p)) { - $p++; - } - $run = $p; - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_8B) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - if ($mode == QR_MODE_AN) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsModeAn(1) // + 4 + la - - $this->estimateBitsModeAn($run + 1);// - 4 - la - if ($dif > 0) { - return $this->eatAn(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_NM, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatAn - * @return int run - */ - protected function eatAn() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p =1 ; - while($this->isalnumat($this->dataStr, $p)) { - if ($this->isdigitat($this->dataStr, $p)) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsModeAn($p) // + 4 + la - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsModeAn($q); // - 4 - la - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - if (!$this->isalnumat($this->dataStr, $p)) { - $dif = $this->estimateBitsModeAn($run) + 4 + $la - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_AN, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatKanji - * @return int run - */ - protected function eatKanji() { - $p = 0; - while($this->identifyMode($p) == QR_MODE_KJ) { - $p += 2; - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr)); - $run = $p; - return $run; - } - - /** - * eat8 - * @return int run - */ - protected function eat8() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 1; - $dataStrLen = strlen($this->dataStr); - while($p < $dataStrLen) { - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_KJ) { - break; - } - if ($mode == QR_MODE_NM) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } elseif ($mode == QR_MODE_AN) { - $q = $p; - while($this->isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeAn($q - $p) + 4 + $la - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - $this->items = $this->appendNewInputItem($this->items, QR_MODE_8B, $run, str_split($this->dataStr)); - return $run; - } - - /** - * splitString - * @return int - */ - protected function splitString() { - while (strlen($this->dataStr) > 0) { - $mode = $this->identifyMode(0); - switch ($mode) { - case QR_MODE_NM: { - $length = $this->eatNum(); - break; - } - case QR_MODE_AN: { - $length = $this->eatAn(); - break; - } - case QR_MODE_KJ: { - if ($this->hint == QR_MODE_KJ) { - $length = $this->eatKanji(); - } else { - $length = $this->eat8(); - } - break; - } - default: { - $length = $this->eat8(); - break; - } - } - if ($length == 0) { - return 0; - } - if ($length < 0) { - return -1; - } - $this->dataStr = substr($this->dataStr, $length); - } - return 0; - } - - /** - * toUpper - */ - protected function toUpper() { - $stringLen = strlen($this->dataStr); - $p = 0; - while ($p < $stringLen) { - $mode = $this->identifyMode(substr($this->dataStr, $p), $this->hint); - if ($mode == QR_MODE_KJ) { - $p += 2; - } else { - if ((ord($this->dataStr[$p]) >= ord('a')) AND (ord($this->dataStr[$p]) <= ord('z'))) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - return $this->dataStr; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinputItem - - /** - * newInputItem - * @param int $mode - * @param int $size - * @param array $data - * @param array $bstream - * @return array input item - */ - protected function newInputItem($mode, $size, $data, $bstream=null) { - $setData = array_slice($data, 0, $size); - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0, ($size - count($setData)), 0)); - } - if (!$this->check($mode, $size, $setData)) { - return NULL; - } - $inputitem = array(); - $inputitem['mode'] = $mode; - $inputitem['size'] = $size; - $inputitem['data'] = $setData; - $inputitem['bstream'] = $bstream; - return $inputitem; - } - - /** - * encodeModeNum - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeNum($inputitem, $version) { - $words = (int)($inputitem['size'] / 3); - $inputitem['bstream'] = array(); - $val = 0x1; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_NM, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (ord($inputitem['data'][$i*3 ]) - ord('0')) * 100; - $val += (ord($inputitem['data'][$i*3+1]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$i*3+2]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val); - } - if ($inputitem['size'] - $words * 3 == 1) { - $val = ord($inputitem['data'][$words*3]) - ord('0'); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - } elseif (($inputitem['size'] - ($words * 3)) == 2) { - $val = (ord($inputitem['data'][$words*3 ]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$words*3+1]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val); - } - return $inputitem; - } - - /** - * encodeModeAn - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeAn($inputitem, $version) { - $words = (int)($inputitem['size'] / 2); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (int)($this->lookAnTable(ord($inputitem['data'][$i*2])) * 45); - $val += (int)($this->lookAnTable(ord($inputitem['data'][($i*2)+1]))); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val); - } - if ($inputitem['size'] & 1) { - $val = $this->lookAnTable(ord($inputitem['data'][($words * 2)])); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 6, $val); - } - return $inputitem; - } - - /** - * encodeMode8 - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeMode8($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_8B, $version), $inputitem['size']); - for ($i=0; $i < $inputitem['size']; ++$i) { - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i])); - } - return $inputitem; - } - - /** - * encodeModeKanji - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeKanji($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_KJ, $version), (int)($inputitem['size'] / 2)); - for ($i=0; $i<$inputitem['size']; $i+=2) { - $val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i+1]); - if ($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 13, $val); - } - return $inputitem; - } - - /** - * encodeModeStructure - * @param array $inputitem - * @return array input item - */ - protected function encodeModeStructure($inputitem) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x03); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][1]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][0]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][2])); - return $inputitem; - } - - /** - * encodeBitStream - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeBitStream($inputitem, $version) { - $inputitem['bstream'] = array(); - $words = $this->maximumWords($inputitem['mode'], $version); - if ($inputitem['size'] > $words) { - $st1 = $this->newInputItem($inputitem['mode'], $words, $inputitem['data']); - $st2 = $this->newInputItem($inputitem['mode'], $inputitem['size'] - $words, array_slice($inputitem['data'], $words)); - $st1 = $this->encodeBitStream($st1, $version); - $st2 = $this->encodeBitStream($st2, $version); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']); - } else { - switch($inputitem['mode']) { - case QR_MODE_NM: { - $inputitem = $this->encodeModeNum($inputitem, $version); - break; - } - case QR_MODE_AN: { - $inputitem = $this->encodeModeAn($inputitem, $version); - break; - } - case QR_MODE_8B: { - $inputitem = $this->encodeMode8($inputitem, $version); - break; - } - case QR_MODE_KJ: { - $inputitem = $this->encodeModeKanji($inputitem, $version); - break; - } - case QR_MODE_ST: { - $inputitem = $this->encodeModeStructure($inputitem); - break; - } - default: { - break; - } - } - } - return $inputitem; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinput - - /** - * Append data to an input object. - * The data is copied and appended to the input object. - * @param array $items input items - * @param int $mode encoding mode. - * @param int $size size of data (byte). - * @param array $data array of input data. - * @return array items - * - */ - protected function appendNewInputItem($items, $mode, $size, $data) { - $newitem = $this->newInputItem($mode, $size, $data); - if (!empty($newitem)) { - $items[] = $newitem; - } - return $items; - } - - /** - * insertStructuredAppendHeader - * @param array $items - * @param int $size - * @param int $index - * @param int $parity - * @return array items - */ - protected function insertStructuredAppendHeader($items, $size, $index, $parity) { - if ($size > MAX_STRUCTURED_SYMBOLS) { - return -1; - } - if (($index <= 0) OR ($index > MAX_STRUCTURED_SYMBOLS)) { - return -1; - } - $buf = array($size, $index, $parity); - $entry = $this->newInputItem(QR_MODE_ST, 3, buf); - array_unshift($items, $entry); - return $items; - } - - /** - * calcParity - * @param array $items - * @return int parity - */ - protected function calcParity($items) { - $parity = 0; - foreach ($items as $item) { - if ($item['mode'] != QR_MODE_ST) { - for ($i=$item['size']-1; $i>=0; --$i) { - $parity ^= $item['data'][$i]; - } - } - } - return $parity; - } - - /** - * checkModeNum - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeNum($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))){ - return false; - } - } - return true; - } - - /** - * Look up the alphabet-numeric conversion table (see JIS X0510:2004, pp.19). - * @param int $c character value - * @return int value - */ - protected function lookAnTable($c) { - return (($c > 127)?-1:$this->anTable[$c]); - } - - /** - * checkModeAn - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeAn($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ($this->lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - return true; - } - - /** - * estimateBitsModeNum - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeNum($size) { - $w = (int)($size / 3); - $bits = ($w * 10); - switch($size - ($w * 3)) { - case 1: { - $bits += 4; - break; - } - case 2: { - $bits += 7; - break; - } - } - return $bits; - } - - /** - * estimateBitsModeAn - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeAn($size) { - $bits = (int)($size * 5.5); // (size / 2 ) * 11 - if ($size & 1) { - $bits += 6; - } - return $bits; - } - - /** - * estimateBitsMode8 - * @param int $size - * @return int number of bits - */ - protected function estimateBitsMode8($size) { - return (int)($size * 8); - } - - /** - * estimateBitsModeKanji - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeKanji($size) { - return (int)($size * 6.5); // (size / 2 ) * 13 - } - - /** - * checkModeKanji - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeKanji($size, $data) { - if ($size & 1) { - return false; - } - for ($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if (($val < 0x8140) OR (($val > 0x9ffc) AND ($val < 0xe040)) OR ($val > 0xebbf)) { - return false; - } - } - return true; - } - - /** - * Validate the input data. - * @param int $mode encoding mode. - * @param int $size size of data (byte). - * @param array $data data to validate - * @return boolean true in case of valid data, false otherwise - */ - protected function check($mode, $size, $data) { - if ($size <= 0) { - return false; - } - switch($mode) { - case QR_MODE_NM: { - return $this->checkModeNum($size, $data); - } - case QR_MODE_AN: { - return $this->checkModeAn($size, $data); - } - case QR_MODE_KJ: { - return $this->checkModeKanji($size, $data); - } - case QR_MODE_8B: { - return true; - } - case QR_MODE_ST: { - return true; - } - default: { - break; - } - } - return false; - } - - /** - * estimateBitStreamSize - * @param array $items - * @param int $version - * @return int bits - */ - protected function estimateBitStreamSize($items, $version) { - $bits = 0; - if ($version == 0) { - $version = 1; - } - foreach ($items as $item) { - switch($item['mode']) { - case QR_MODE_NM: { - $bits = $this->estimateBitsModeNum($item['size']); - break; - } - case QR_MODE_AN: { - $bits = $this->estimateBitsModeAn($item['size']); - break; - } - case QR_MODE_8B: { - $bits = $this->estimateBitsMode8($item['size']); - break; - } - case QR_MODE_KJ: { - $bits = $this->estimateBitsModeKanji($item['size']); - break; - } - case QR_MODE_ST: { - return STRUCTURE_HEADER_BITS; - } - default: { - return 0; - } - } - $l = $this->lengthIndicator($item['mode'], $version); - $m = 1 << $l; - $num = (int)(($item['size'] + $m - 1) / $m); - $bits += $num * (4 + $l); - } - return $bits; - } - - /** - * estimateVersion - * @param array $items - * @return int version - */ - protected function estimateVersion($items) { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($items, $prev); - $version = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - return $version; - } - - /** - * lengthOfCode - * @param int $mode - * @param int $version - * @param int $bits - * @return int size - */ - protected function lengthOfCode($mode, $version, $bits) { - $payload = $bits - 4 - $this->lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NM: { - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if ($remain >= 7) { - $size += 2; - } elseif ($remain >= 4) { - $size += 1; - } - break; - } - case QR_MODE_AN: { - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if ($remain >= 6) { - ++$size; - } - break; - } - case QR_MODE_8B: { - $size = (int)($payload / 8); - break; - } - case QR_MODE_KJ: { - $size = (int)(($payload / 13) * 2); - break; - } - case QR_MODE_ST: { - $size = (int)($payload / 8); - break; - } - default: { - $size = 0; - break; - } - } - $maxsize = $this->maximumWords($mode, $version); - if ($size < 0) { - $size = 0; - } - if ($size > $maxsize) { - $size = $maxsize; - } - return $size; - } - - /** - * createBitStream - * @param array $items - * @return array of items and total bits - */ - protected function createBitStream($items) { - $total = 0; - foreach ($items as $key => $item) { - $items[$key] = $this->encodeBitStream($item, $this->version); - $bits = count($items[$key]['bstream']); - $total += $bits; - } - return array($items, $total); - } - - /** - * convertData - * @param array $items - * @return array items - */ - protected function convertData($items) { - $ver = $this->estimateVersion($items); - if ($ver > $this->version) { - $this->version = $ver; - } - while (true) { - $cbs = $this->createBitStream($items); - $items = $cbs[0]; - $bits = $cbs[1]; - if ($bits < 0) { - return -1; - } - $ver = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($ver < 0) { - return -1; - } elseif ($ver > $this->version) { - $this->version = $ver; - } else { - break; - } - } - return $items; - } - - /** - * Append Padding Bit to bitstream - * @param array $bstream - * @return array bitstream - */ - protected function appendPaddingBit($bstream) { - if (is_null($bstream)) { - return null; - } - $bits = count($bstream); - $maxwords = $this->getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - if ($maxbits == $bits) { - return $bstream; - } - if ($maxbits - $bits < 5) { - return $this->appendNum($bstream, $maxbits - $bits, 0); - } - $bits += 4; - $words = (int)(($bits + 7) / 8); - $padding = array(); - $padding = $this->appendNum($padding, $words * 8 - $bits + 4, 0); - $padlen = $maxwords - $words; - if ($padlen > 0) { - $padbuf = array(); - for ($i=0; $i<$padlen; ++$i) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - $padding = $this->appendBytes($padding, $padlen, $padbuf); - } - return $this->appendBitstream($bstream, $padding); - } - - /** - * mergeBitStream - * @param array $items items - * @return array bitstream - */ - protected function mergeBitStream($items) { - $items = $this->convertData($items); - if (!is_array($items)) { - return null; - } - $bstream = array(); - foreach ($items as $item) { - $bstream = $this->appendBitstream($bstream, $item['bstream']); - } - return $bstream; - } - - /** - * Returns a stream of bits. - * @param int $items - * @return array padded merged byte stream - */ - protected function getBitStream($items) { - $bstream = $this->mergeBitStream($items); - return $this->appendPaddingBit($bstream); - } - - /** - * Pack all bit streams padding bits into a byte array. - * @param int $items - * @return array padded merged byte stream - */ - protected function getByteStream($items) { - $bstream = $this->getBitStream($items); - return $this->bitstreamToByte($bstream); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRbitstream - - /** - * Return an array with zeros - * @param int $setLength array size - * @return array - */ - protected function allocate($setLength) { - return array_fill(0, $setLength, 0); - } - - /** - * Return new bitstream from number - * @param int $bits number of bits - * @param int $num number - * @return array bitstream - */ - protected function newFromNum($bits, $num) { - $bstream = $this->allocate($bits); - $mask = 1 << ($bits - 1); - for ($i=0; $i<$bits; ++$i) { - if ($num & $mask) { - $bstream[$i] = 1; - } else { - $bstream[$i] = 0; - } - $mask = $mask >> 1; - } - return $bstream; - } - - /** - * Return new bitstream from bytes - * @param int $size size - * @param array $data bytes - * @return array bitstream - */ - protected function newFromBytes($size, $data) { - $bstream = $this->allocate($size * 8); - $p=0; - for ($i=0; $i<$size; ++$i) { - $mask = 0x80; - for ($j=0; $j<8; ++$j) { - if ($data[$i] & $mask) { - $bstream[$p] = 1; - } else { - $bstream[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - return $bstream; - } - - /** - * Append one bitstream to another - * @param array $bitstream original bitstream - * @param array $append bitstream to append - * @return array bitstream - */ - protected function appendBitstream($bitstream, $append) { - if ((!is_array($append)) OR (count($append) == 0)) { - return $bitstream; - } - if (count($bitstream) == 0) { - return $append; - } - return array_values(array_merge($bitstream, $append)); - } - - /** - * Append one bitstream created from number to another - * @param array $bitstream original bitstream - * @param int $bits number of bits - * @param int $num number - * @return array bitstream - */ - protected function appendNum($bitstream, $bits, $num) { - if ($bits == 0) { - return 0; - } - $b = $this->newFromNum($bits, $num); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Append one bitstream created from bytes to another - * @param array $bitstream original bitstream - * @param int $size size - * @param array $data bytes - * @return array bitstream - */ - protected function appendBytes($bitstream, $size, $data) { - if ($size == 0) { - return 0; - } - $b = $this->newFromBytes($size, $data); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Convert bitstream to bytes - * @param array $bstream original bitstream - * @return array of bytes - */ - protected function bitstreamToByte($bstream) { - if (is_null($bstream)) { - return null; - } - $size = count($bstream); - if ($size == 0) { - return array(); - } - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - $p = 0; - for ($i=0; $i<$bytes; $i++) { - $v = 0; - for ($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$i] = $v; - } - if ($size & 7) { - $v = 0; - for ($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$bytes] = $v; - } - return $data; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRspec - - /** - * Replace a value on the array at the specified position - * @param array $srctab - * @param int $x X position - * @param int $y Y position - * @param string $repl value to replace - * @param int $replLen length of the repl string - * @return array srctab - */ - protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - return $srctab; - } - - /** - * Return maximum data code length (bytes) for the version. - * @param int $version version - * @param int $level error correction level - * @return int maximum size (bytes) - */ - protected function getDataLength($version, $level) { - return $this->capacity[$version][QRCAP_WORDS] - $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return maximum error correction code length (bytes) for the version. - * @param int $version version - * @param int $level error correction level - * @return int ECC size (bytes) - */ - protected function getECCLength($version, $level){ - return $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return the width of the symbol for the version. - * @param int $version version - * @return int width - */ - protected function getWidth($version) { - return $this->capacity[$version][QRCAP_WIDTH]; - } - - /** - * Return the numer of remainder bits. - * @param int $version version - * @return int number of remainder bits - */ - protected function getRemainder($version) { - return $this->capacity[$version][QRCAP_REMINDER]; - } - - /** - * Return a version number that satisfies the input code length. - * @param int $size input code length (bytes) - * @param int $level error correction level - * @return int version number - */ - protected function getMinimumVersion($size, $level) { - for ($i = 1; $i <= QRSPEC_VERSION_MAX; ++$i) { - $words = ($this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level]); - if ($words >= $size) { - return $i; - } - } - // the size of input data is greater than QR capacity, try to lover the error correction mode - return -1; - } - - /** - * Return the size of length indicator for the mode and version. - * @param int $mode encoding mode - * @param int $version version - * @return int the size of the appropriate length indicator (bits). - */ - protected function lengthIndicator($mode, $version) { - if ($mode == QR_MODE_ST) { - return 0; - } - if ($version <= 9) { - $l = 0; - } elseif ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - return $this->lengthTableBits[$mode][$l]; - } - - /** - * Return the maximum length for the mode and version. - * @param int $mode encoding mode - * @param int $version version - * @return int the maximum length (bytes) - */ - protected function maximumWords($mode, $version) { - if ($mode == QR_MODE_ST) { - return 3; - } - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - $bits = $this->lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - if ($mode == QR_MODE_KJ) { - $words *= 2; // the number of bytes is required - } - return $words; - } - - /** - * Return an array of ECC specification. - * @param int $version version - * @param int $level error correction level - * @param array $spec an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code} - * @return array spec - */ - protected function getEccSpec($version, $level, $spec) { - if (count($spec) < 5) { - $spec = array(0, 0, 0, 0, 0); - } - $b1 = $this->eccTable[$version][$level][0]; - $b2 = $this->eccTable[$version][$level][1]; - $data = $this->getDataLength($version, $level); - $ecc = $this->getECCLength($version, $level); - if ($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - return $spec; - } - - /** - * Put an alignment marker. - * @param array $frame frame - * @param int $ox X center coordinate of the pattern - * @param int $oy Y center coordinate of the pattern - * @return array frame - */ - protected function putAlignmentMarker($frame, $ox, $oy) { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - $yStart = $oy - 2; - $xStart = $ox - 2; - for ($y=0; $y < 5; $y++) { - $frame = $this->qrstrset($frame, $xStart, $yStart+$y, $finder[$y]); - } - return $frame; - } - - /** - * Put an alignment pattern. - * @param int $version version - * @param array $frame frame - * @param int $width width - * @return array frame - */ - protected function putAlignmentPattern($version, $frame, $width) { - if ($version < 2) { - return $frame; - } - $d = $this->alignmentPattern[$version][1] - $this->alignmentPattern[$version][0]; - if ($d < 0) { - $w = 2; - } else { - $w = (int)(($width - $this->alignmentPattern[$version][0]) / $d + 2); - } - if ($w * $w - 3 == 1) { - $x = $this->alignmentPattern[$version][0]; - $y = $this->alignmentPattern[$version][0]; - $frame = $this->putAlignmentMarker($frame, $x, $y); - return $frame; - } - $cx = $this->alignmentPattern[$version][0]; - $wo = $w - 1; - for ($x=1; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, 6, $cx); - $frame = $this->putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - $cy = $this->alignmentPattern[$version][0]; - for ($y=0; $y < $wo; ++$y) { - $cx = $this->alignmentPattern[$version][0]; - for ($x=0; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - return $frame; - } - - /** - * Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits. - * @param int $version version - * @return string BCH encoded version information pattern - */ - protected function getVersionPattern($version) { - if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) { - return 0; - } - return $this->versionPattern[($version - 7)]; - } - - /** - * Return BCH encoded format information pattern. - * @param array $mask - * @param int $level error correction level - * @return string BCH encoded format information pattern - */ - protected function getFormatInfo($mask, $level) { - if (($mask < 0) OR ($mask > 7)) { - return 0; - } - if (($level < 0) OR ($level > 3)) { - return 0; - } - return $this->formatInfo[$level][$mask]; - } - - /** - * Put a finder pattern. - * @param array $frame frame - * @param int $ox X center coordinate of the pattern - * @param int $oy Y center coordinate of the pattern - * @return array frame - */ - protected function putFinderPattern($frame, $ox, $oy) { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - for ($y=0; $y < 7; $y++) { - $frame = $this->qrstrset($frame, $ox, ($oy + $y), $finder[$y]); - } - return $frame; - } - - /** - * Return a copy of initialized frame. - * @param int $version version - * @return array array of unsigned char. - */ - protected function createFrame($version) { - $width = $this->capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - // Finder pattern - $frame = $this->putFinderPattern($frame, 0, 0); - $frame = $this->putFinderPattern($frame, $width - 7, 0); - $frame = $this->putFinderPattern($frame, 0, $width - 7); - // Separator - $yOffset = $width - 7; - for ($y=0; $y < 7; ++$y) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - ++$yOffset; - } - $setPattern = str_repeat("\xc0", 8); - $frame = $this->qrstrset($frame, 0, 7, $setPattern); - $frame = $this->qrstrset($frame, $width-8, 7, $setPattern); - $frame = $this->qrstrset($frame, 0, $width - 8, $setPattern); - // Format info - $setPattern = str_repeat("\x84", 9); - $frame = $this->qrstrset($frame, 0, 8, $setPattern); - $frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8); - $yOffset = $width - 8; - for ($y=0; $y < 8; ++$y,++$yOffset) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - // Timing pattern - $wo = $width - 15; - for ($i=1; $i < $wo; ++$i) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - // Alignment pattern - $frame = $this->putAlignmentPattern($version, $frame, $width); - // Version information - if ($version >= 7) { - $vinf = $this->getVersionPattern($version); - $v = $vinf; - for ($x=0; $x<6; ++$x) { - for ($y=0; $y<3; ++$y) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - $v = $vinf; - for ($y=0; $y<6; ++$y) { - for ($x=0; $x<3; ++$x) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - // and a little bit... - $frame[$width - 8][8] = "\x81"; - return $frame; - } - - /** - * Set new frame for the specified version. - * @param int $version version - * @return array array of unsigned char. - */ - protected function newFrame($version) { - if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) { - return NULL; - } - if (!isset($this->frames[$version])) { - $this->frames[$version] = $this->createFrame($version); - } - if (is_null($this->frames[$version])) { - return NULL; - } - return $this->frames[$version]; - } - - /** - * Return block number 0 - * @param array $spec - * @return int value - */ - protected function rsBlockNum($spec) { - return ($spec[0] + $spec[3]); - } - - /** - * Return block number 1 - * @param array $spec - * @return int value - */ - protected function rsBlockNum1($spec) { - return $spec[0]; - } - - /** - * Return data codes 1 - * @param array $spec - * @return int value - */ - protected function rsDataCodes1($spec) { - return $spec[1]; - } - - /** - * Return ecc codes 1 - * @param array $spec - * @return int value - */ - protected function rsEccCodes1($spec) { - return $spec[2]; - } - - /** - * Return block number 2 - * @param array $spec - * @return int value - */ - protected function rsBlockNum2($spec) { - return $spec[3]; - } - - /** - * Return data codes 2 - * @param array $spec - * @return int value - */ - protected function rsDataCodes2($spec) { - return $spec[4]; - } - - /** - * Return ecc codes 2 - * @param array $spec - * @return int value - */ - protected function rsEccCodes2($spec) { - return $spec[2]; - } - - /** - * Return data length - * @param array $spec - * @return int value - */ - protected function rsDataLength($spec) { - return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); - } - - /** - * Return ecc length - * @param array $spec - * @return int value - */ - protected function rsEccLength($spec) { - return ($spec[0] + $spec[3]) * $spec[2]; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrs - - /** - * Initialize a Reed-Solomon codec and add it to existing rsitems - * @param int $symsize symbol size, bits - * @param int $gfpoly Field generator polynomial coefficients - * @param int $fcr first root of RS code generator polynomial, index form - * @param int $prim primitive element to generate polynomial roots - * @param int $nroots RS code generator polynomial degree (number of roots) - * @param int $pad padding bytes at front of shortened block - * @return array Array of RS values:
    • mm = Bits per symbol;
    • nn = Symbols per block;
    • alpha_to = log lookup table array;
    • index_of = Antilog lookup table array;
    • genpoly = Generator polynomial array;
    • nroots = Number of generator;
    • roots = number of parity symbols;
    • fcr = First consecutive root, index form;
    • prim = Primitive element, index form;
    • iprim = prim-th root of 1, index form;
    • pad = Padding bytes in shortened block;
    • gfpoly
    . - */ - protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - foreach ($this->rsitems as $rs) { - if (($rs['pad'] != $pad) OR ($rs['nroots'] != $nroots) OR ($rs['mm'] != $symsize) - OR ($rs['gfpoly'] != $gfpoly) OR ($rs['fcr'] != $fcr) OR ($rs['prim'] != $prim)) { - continue; - } - return $rs; - } - $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift($this->rsitems, $rs); - return $rs; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrsItem - - /** - * modnn - * @param array $rs RS values - * @param int $x X position - * @return int X osition - */ - protected function modnn($rs, $x) { - while ($x >= $rs['nn']) { - $x -= $rs['nn']; - $x = ($x >> $rs['mm']) + ($x & $rs['nn']); - } - return $x; - } - - /** - * Initialize a Reed-Solomon codec and returns an array of values. - * @param int $symsize symbol size, bits - * @param int $gfpoly Field generator polynomial coefficients - * @param int $fcr first root of RS code generator polynomial, index form - * @param int $prim primitive element to generate polynomial roots - * @param int $nroots RS code generator polynomial degree (number of roots) - * @param int $pad padding bytes at front of shortened block - * @return array Array of RS values:
    • mm = Bits per symbol;
    • nn = Symbols per block;
    • alpha_to = log lookup table array;
    • index_of = Antilog lookup table array;
    • genpoly = Generator polynomial array;
    • nroots = Number of generator;
    • roots = number of parity symbols;
    • fcr = First consecutive root, index form;
    • prim = Primitive element, index form;
    • iprim = prim-th root of 1, index form;
    • pad = Padding bytes in shortened block;
    • gfpoly
    . - */ - protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - // Based on Reed solomon encoder by Phil Karn, KA9Q (GNU-LGPLv2) - $rs = null; - // Check parameter ranges - if (($symsize < 0) OR ($symsize > 8)) { - return $rs; - } - if (($fcr < 0) OR ($fcr >= (1<<$symsize))) { - return $rs; - } - if (($prim <= 0) OR ($prim >= (1<<$symsize))) { - return $rs; - } - if (($nroots < 0) OR ($nroots >= (1<<$symsize))) { - return $rs; - } - if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) { - return $rs; - } - $rs = array(); - $rs['mm'] = $symsize; - $rs['nn'] = (1 << $symsize) - 1; - $rs['pad'] = $pad; - $rs['alpha_to'] = array_fill(0, ($rs['nn'] + 1), 0); - $rs['index_of'] = array_fill(0, ($rs['nn'] + 1), 0); - // PHP style macro replacement ;) - $NN =& $rs['nn']; - $A0 =& $NN; - // Generate Galois field lookup tables - $rs['index_of'][0] = $A0; // log(zero) = -inf - $rs['alpha_to'][$A0] = 0; // alpha**-inf = 0 - $sr = 1; - for ($i=0; $i<$rs['nn']; ++$i) { - $rs['index_of'][$sr] = $i; - $rs['alpha_to'][$i] = $sr; - $sr <<= 1; - if ($sr & (1 << $symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs['nn']; - } - if ($sr != 1) { - // field generator polynomial is not primitive! - return NULL; - } - // Form RS code generator polynomial from its roots - $rs['genpoly'] = array_fill(0, ($nroots + 1), 0); - $rs['fcr'] = $fcr; - $rs['prim'] = $prim; - $rs['nroots'] = $nroots; - $rs['gfpoly'] = $gfpoly; - // Find prim-th root of 1, used in decoding - for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) { - ; // intentional empty-body loop! - } - $rs['iprim'] = (int)($iprim / $prim); - $rs['genpoly'][0] = 1; - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs['genpoly'][$i+1] = 1; - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; --$j) { - if ($rs['genpoly'][$j] != 0) { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)]; - } else { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs['genpoly'][0] = $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][0]] + $root)]; - } - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; ++$i) { - $rs['genpoly'][$i] = $rs['index_of'][$rs['genpoly'][$i]]; - } - return $rs; - } - - /** - * Encode a Reed-Solomon codec and returns the parity array - * @param array $rs RS values - * @param array $data data - * @param array $parity parity - * @return parity array - */ - protected function encode_rs_char($rs, $data, $parity) { - $MM =& $rs['mm']; // bits per symbol - $NN =& $rs['nn']; // the total number of symbols in a RS block - $ALPHA_TO =& $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form - $INDEX_OF =& $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form - $GENPOLY =& $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form - $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block - $FCR =& $rs['fcr']; // first consecutive root, index form - $PRIM =& $rs['prim']; // primitive element, index form - $IPRIM =& $rs['iprim']; // prim-th root of 1, index form - $PAD =& $rs['pad']; // the number of pad symbols in a block - $A0 =& $NN; - $parity = array_fill(0, $NROOTS, 0); - for ($i=0; $i < ($NN - $NROOTS - $PAD); $i++) { - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if ($feedback != $A0) { - // feedback term is non-zero - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($rs, $NN - $GENPOLY[$NROOTS] + $feedback); - for ($j=1; $j < $NROOTS; ++$j) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])]; - } - } - // Shift - array_shift($parity); - if ($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - return $parity; - } - -} // end QRcode class - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/sRGB.icc b/lib/combodo/tcpdf/include/sRGB.icc deleted file mode 100644 index 1d8f7419c..000000000 Binary files a/lib/combodo/tcpdf/include/sRGB.icc and /dev/null differ diff --git a/lib/combodo/tcpdf/include/tcpdf_colors.php b/lib/combodo/tcpdf/include/tcpdf_colors.php deleted file mode 100644 index 7f337f31a..000000000 --- a/lib/combodo/tcpdf/include/tcpdf_colors.php +++ /dev/null @@ -1,462 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Array of WEB safe colors -// -//============================================================+ - -/** - * @file - * PHP color class for TCPDF - * @author Nicola Asuni - * @package com.tecnick.tcpdf - */ - -/** - * @class TCPDF_COLORS - * PHP color class for TCPDF - * @package com.tecnick.tcpdf - * @version 1.0.004 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_COLORS { - - /** - * Array of WEB safe colors - * @public static - */ - public static $webcolor = array ( - 'aliceblue' => 'f0f8ff', - 'antiquewhite' => 'faebd7', - 'aqua' => '00ffff', - 'aquamarine' => '7fffd4', - 'azure' => 'f0ffff', - 'beige' => 'f5f5dc', - 'bisque' => 'ffe4c4', - 'black' => '000000', - 'blanchedalmond' => 'ffebcd', - 'blue' => '0000ff', - 'blueviolet' => '8a2be2', - 'brown' => 'a52a2a', - 'burlywood' => 'deb887', - 'cadetblue' => '5f9ea0', - 'chartreuse' => '7fff00', - 'chocolate' => 'd2691e', - 'coral' => 'ff7f50', - 'cornflowerblue' => '6495ed', - 'cornsilk' => 'fff8dc', - 'crimson' => 'dc143c', - 'cyan' => '00ffff', - 'darkblue' => '00008b', - 'darkcyan' => '008b8b', - 'darkgoldenrod' => 'b8860b', - 'dkgray' => 'a9a9a9', - 'darkgray' => 'a9a9a9', - 'darkgrey' => 'a9a9a9', - 'darkgreen' => '006400', - 'darkkhaki' => 'bdb76b', - 'darkmagenta' => '8b008b', - 'darkolivegreen' => '556b2f', - 'darkorange' => 'ff8c00', - 'darkorchid' => '9932cc', - 'darkred' => '8b0000', - 'darksalmon' => 'e9967a', - 'darkseagreen' => '8fbc8f', - 'darkslateblue' => '483d8b', - 'darkslategray' => '2f4f4f', - 'darkslategrey' => '2f4f4f', - 'darkturquoise' => '00ced1', - 'darkviolet' => '9400d3', - 'deeppink' => 'ff1493', - 'deepskyblue' => '00bfff', - 'dimgray' => '696969', - 'dimgrey' => '696969', - 'dodgerblue' => '1e90ff', - 'firebrick' => 'b22222', - 'floralwhite' => 'fffaf0', - 'forestgreen' => '228b22', - 'fuchsia' => 'ff00ff', - 'gainsboro' => 'dcdcdc', - 'ghostwhite' => 'f8f8ff', - 'gold' => 'ffd700', - 'goldenrod' => 'daa520', - 'gray' => '808080', - 'grey' => '808080', - 'green' => '008000', - 'greenyellow' => 'adff2f', - 'honeydew' => 'f0fff0', - 'hotpink' => 'ff69b4', - 'indianred' => 'cd5c5c', - 'indigo' => '4b0082', - 'ivory' => 'fffff0', - 'khaki' => 'f0e68c', - 'lavender' => 'e6e6fa', - 'lavenderblush' => 'fff0f5', - 'lawngreen' => '7cfc00', - 'lemonchiffon' => 'fffacd', - 'lightblue' => 'add8e6', - 'lightcoral' => 'f08080', - 'lightcyan' => 'e0ffff', - 'lightgoldenrodyellow' => 'fafad2', - 'ltgray' => 'd3d3d3', - 'lightgray' => 'd3d3d3', - 'lightgrey' => 'd3d3d3', - 'lightgreen' => '90ee90', - 'lightpink' => 'ffb6c1', - 'lightsalmon' => 'ffa07a', - 'lightseagreen' => '20b2aa', - 'lightskyblue' => '87cefa', - 'lightslategray' => '778899', - 'lightslategrey' => '778899', - 'lightsteelblue' => 'b0c4de', - 'lightyellow' => 'ffffe0', - 'lime' => '00ff00', - 'limegreen' => '32cd32', - 'linen' => 'faf0e6', - 'magenta' => 'ff00ff', - 'maroon' => '800000', - 'mediumaquamarine' => '66cdaa', - 'mediumblue' => '0000cd', - 'mediumorchid' => 'ba55d3', - 'mediumpurple' => '9370d8', - 'mediumseagreen' => '3cb371', - 'mediumslateblue' => '7b68ee', - 'mediumspringgreen' => '00fa9a', - 'mediumturquoise' => '48d1cc', - 'mediumvioletred' => 'c71585', - 'midnightblue' => '191970', - 'mintcream' => 'f5fffa', - 'mistyrose' => 'ffe4e1', - 'moccasin' => 'ffe4b5', - 'navajowhite' => 'ffdead', - 'navy' => '000080', - 'oldlace' => 'fdf5e6', - 'olive' => '808000', - 'olivedrab' => '6b8e23', - 'orange' => 'ffa500', - 'orangered' => 'ff4500', - 'orchid' => 'da70d6', - 'palegoldenrod' => 'eee8aa', - 'palegreen' => '98fb98', - 'paleturquoise' => 'afeeee', - 'palevioletred' => 'd87093', - 'papayawhip' => 'ffefd5', - 'peachpuff' => 'ffdab9', - 'peru' => 'cd853f', - 'pink' => 'ffc0cb', - 'plum' => 'dda0dd', - 'powderblue' => 'b0e0e6', - 'purple' => '800080', - 'red' => 'ff0000', - 'rosybrown' => 'bc8f8f', - 'royalblue' => '4169e1', - 'saddlebrown' => '8b4513', - 'salmon' => 'fa8072', - 'sandybrown' => 'f4a460', - 'seagreen' => '2e8b57', - 'seashell' => 'fff5ee', - 'sienna' => 'a0522d', - 'silver' => 'c0c0c0', - 'skyblue' => '87ceeb', - 'slateblue' => '6a5acd', - 'slategray' => '708090', - 'slategrey' => '708090', - 'snow' => 'fffafa', - 'springgreen' => '00ff7f', - 'steelblue' => '4682b4', - 'tan' => 'd2b48c', - 'teal' => '008080', - 'thistle' => 'd8bfd8', - 'tomato' => 'ff6347', - 'turquoise' => '40e0d0', - 'violet' => 'ee82ee', - 'wheat' => 'f5deb3', - 'white' => 'ffffff', - 'whitesmoke' => 'f5f5f5', - 'yellow' => 'ffff00', - 'yellowgreen' => '9acd32' - ); // end of web colors - - /** - * Array of valid JavaScript color names - * @public static - */ - public static $jscolor = array ('transparent', 'black', 'white', 'red', 'green', 'blue', 'cyan', 'magenta', 'yellow', 'dkGray', 'gray', 'ltGray'); - - /** - * Array of Spot colors (C,M,Y,K,name) - * Color keys must be in lowercase and without spaces. - * As long as no open standard for spot colours exists, you have to buy a colour book by one of the colour manufacturers and insert the values and names of spot colours directly. - * Common industry standard spot colors are: ANPA-COLOR, DIC, FOCOLTONE, GCMI, HKS, PANTONE, TOYO, TRUMATCH. - * @public static - */ - public static $spotcolor = array ( - // special registration colors - 'none' => array( 0, 0, 0, 0, 'None'), - 'all' => array(100, 100, 100, 100, 'All'), - // standard CMYK colors - 'cyan' => array(100, 0, 0, 0, 'Cyan'), - 'magenta' => array( 0, 100, 0, 0, 'Magenta'), - 'yellow' => array( 0, 0, 100, 0, 'Yellow'), - 'key' => array( 0, 0, 0, 100, 'Key'), - // alias - 'white' => array( 0, 0, 0, 0, 'White'), - 'black' => array( 0, 0, 0, 100, 'Black'), - // standard RGB colors - 'red' => array( 0, 100, 100, 0, 'Red'), - 'green' => array(100, 0, 100, 0, 'Green'), - 'blue' => array(100, 100, 0, 0, 'Blue'), - // Add here standard spot colors or dynamically define them with AddSpotColor() - // ... - ); // end of spot colors - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Return the Spot color array. - * @param string $name Name of the spot color. - * @param array $spotc Reference to an array of spot colors. - * @return array|false Spot color array or false if not defined. - * @since 5.9.125 (2011-10-03) - * @public static - */ - public static function getSpotColor($name, &$spotc) { - if (isset($spotc[$name])) { - return $spotc[$name]; - } - $color = preg_replace('/[\s]*/', '', $name); // remove extra spaces - $color = strtolower($color); - if (isset(self::$spotcolor[$color])) { - if (!isset($spotc[$name])) { - $i = (1 + count($spotc)); - $spotc[$name] = array('C' => self::$spotcolor[$color][0], 'M' => self::$spotcolor[$color][1], 'Y' => self::$spotcolor[$color][2], 'K' => self::$spotcolor[$color][3], 'name' => self::$spotcolor[$color][4], 'i' => $i); - } - return $spotc[self::$spotcolor[$color][4]]; - } - return false; - } - - /** - * Returns an array (RGB or CMYK) from an html color name, or a six-digit (i.e. #3FE5AA), or three-digit (i.e. #7FF) hexadecimal color, or a javascript color array, or javascript color name. - * @param string $hcolor HTML color. - * @param array $spotc Reference to an array of spot colors. - * @param array $defcol Color to return in case of error. - * @return array|false RGB or CMYK color, or false in case of error. - * @public static - */ - public static function convertHTMLColorToDec($hcolor, &$spotc, $defcol=array('R'=>128,'G'=>128,'B'=>128)) { - $color = preg_replace('/[\s]*/', '', $hcolor); // remove extra spaces - $color = strtolower($color); - // check for javascript color array syntax - if (strpos($color, '[') !== false) { - if (preg_match('/[\[][\"\'](t|g|rgb|cmyk)[\"\'][\,]?([0-9\.]*)[\,]?([0-9\.]*)[\,]?([0-9\.]*)[\,]?([0-9\.]*)[\]]/', $color, $m) > 0) { - $returncolor = array(); - switch ($m[1]) { - case 'cmyk': { - // RGB - $returncolor['C'] = max(0, min(100, (floatval($m[2]) * 100))); - $returncolor['M'] = max(0, min(100, (floatval($m[3]) * 100))); - $returncolor['Y'] = max(0, min(100, (floatval($m[4]) * 100))); - $returncolor['K'] = max(0, min(100, (floatval($m[5]) * 100))); - break; - } - case 'rgb': { - // RGB - $returncolor['R'] = max(0, min(255, (floatval($m[2]) * 255))); - $returncolor['G'] = max(0, min(255, (floatval($m[3]) * 255))); - $returncolor['B'] = max(0, min(255, (floatval($m[4]) * 255))); - break; - } - case 'g': { - // grayscale - $returncolor['G'] = max(0, min(255, (floatval($m[2]) * 255))); - break; - } - case 't': - default: { - // transparent (empty array) - break; - } - } - return $returncolor; - } - } elseif ((substr($color, 0, 4) != 'cmyk') AND (substr($color, 0, 3) != 'rgb') AND (($dotpos = strpos($color, '.')) !== false)) { - // remove class parent (i.e.: color.red) - $color = substr($color, ($dotpos + 1)); - if ($color == 'transparent') { - // transparent (empty array) - return array(); - } - } - if (strlen($color) == 0) { - return $defcol; - } - // RGB ARRAY - if (substr($color, 0, 3) == 'rgb') { - $codes = substr($color, 4); - $codes = str_replace(')', '', $codes); - $returncolor = explode(',', $codes); - foreach ($returncolor as $key => $val) { - if (strpos($val, '%') > 0) { - // percentage - $returncolor[$key] = (255 * intval($val) / 100); - } else { - $returncolor[$key] = intval($val); - } - // normalize value - $returncolor[$key] = max(0, min(255, $returncolor[$key])); - } - return $returncolor; - } - // CMYK ARRAY - if (substr($color, 0, 4) == 'cmyk') { - $codes = substr($color, 5); - $codes = str_replace(')', '', $codes); - $returncolor = explode(',', $codes); - foreach ($returncolor as $key => $val) { - if (strpos($val, '%') !== false) { - // percentage - $returncolor[$key] = (100 * intval($val) / 100); - } else { - $returncolor[$key] = intval($val); - } - // normalize value - $returncolor[$key] = max(0, min(100, $returncolor[$key])); - } - return $returncolor; - } - if ($color[0] != '#') { - // COLOR NAME - if (isset(self::$webcolor[$color])) { - // web color - $color_code = self::$webcolor[$color]; - } else { - // spot color - $returncolor = self::getSpotColor($hcolor, $spotc); - if ($returncolor === false) { - $returncolor = $defcol; - } - return $returncolor; - } - } else { - $color_code = substr($color, 1); - } - // HEXADECIMAL REPRESENTATION - switch (strlen($color_code)) { - case 3: { - // 3-digit RGB hexadecimal representation - $r = substr($color_code, 0, 1); - $g = substr($color_code, 1, 1); - $b = substr($color_code, 2, 1); - $returncolor = array(); - $returncolor['R'] = max(0, min(255, hexdec($r.$r))); - $returncolor['G'] = max(0, min(255, hexdec($g.$g))); - $returncolor['B'] = max(0, min(255, hexdec($b.$b))); - break; - } - case 6: { - // 6-digit RGB hexadecimal representation - $returncolor = array(); - $returncolor['R'] = max(0, min(255, hexdec(substr($color_code, 0, 2)))); - $returncolor['G'] = max(0, min(255, hexdec(substr($color_code, 2, 2)))); - $returncolor['B'] = max(0, min(255, hexdec(substr($color_code, 4, 2)))); - break; - } - case 8: { - // 8-digit CMYK hexadecimal representation - $returncolor = array(); - $returncolor['C'] = max(0, min(100, round(hexdec(substr($color_code, 0, 2)) / 2.55))); - $returncolor['M'] = max(0, min(100, round(hexdec(substr($color_code, 2, 2)) / 2.55))); - $returncolor['Y'] = max(0, min(100, round(hexdec(substr($color_code, 4, 2)) / 2.55))); - $returncolor['K'] = max(0, min(100, round(hexdec(substr($color_code, 6, 2)) / 2.55))); - break; - } - default: { - $returncolor = $defcol; - break; - } - } - return $returncolor; - } - - /** - * Convert a color array into a string representation. - * @param array $c Array of colors. - * @return string The color array representation. - * @since 5.9.137 (2011-12-01) - * @public static - */ - public static function getColorStringFromArray($c) { - $c = array_values($c); - $color = '['; - switch (count($c)) { - case 4: { - // CMYK - $color .= sprintf('%F %F %F %F', (max(0, min(100, floatval($c[0]))) / 100), (max(0, min(100, floatval($c[1]))) / 100), (max(0, min(100, floatval($c[2]))) / 100), (max(0, min(100, floatval($c[3]))) / 100)); - break; - } - case 3: { - // RGB - $color .= sprintf('%F %F %F', (max(0, min(255, floatval($c[0]))) / 255), (max(0, min(255, floatval($c[1]))) / 255), (max(0, min(255, floatval($c[2]))) / 255)); - break; - } - case 1: { - // grayscale - $color .= sprintf('%F', (max(0, min(255, floatval($c[0]))) / 255)); - break; - } - } - $color .= ']'; - return $color; - } - - /** - * Convert color to javascript color. - * @param string $color color name or "#RRGGBB" - * @protected - * @since 2.1.002 (2008-02-12) - * @public static - */ - public static function _JScolor($color) { - if (substr($color, 0, 1) == '#') { - return sprintf("['RGB',%F,%F,%F]", (hexdec(substr($color, 1, 2)) / 255), (hexdec(substr($color, 3, 2)) / 255), (hexdec(substr($color, 5, 2)) / 255)); - } - if (!in_array($color, self::$jscolor)) { - // default transparent color - $color = self::$jscolor[0]; - } - return 'color.'.$color; - } - - -} // END OF TCPDF_COLORS CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/tcpdf_filters.php b/lib/combodo/tcpdf/include/tcpdf_filters.php deleted file mode 100644 index 3009cff7c..000000000 --- a/lib/combodo/tcpdf/include/tcpdf_filters.php +++ /dev/null @@ -1,481 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : This is a PHP class for decoding common PDF filters (PDF 32000-2008 - 7.4 Filters). -// -//============================================================+ - -/** - * @file - * This is a PHP class for decoding common PDF filters (PDF 32000-2008 - 7.4 Filters).
    - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.001 - */ - -/** - * @class TCPDF_FILTERS - * This is a PHP class for decoding common PDF filters (PDF 32000-2008 - 7.4 Filters).
    - * @package com.tecnick.tcpdf - * @brief This is a PHP class for decoding common PDF filters. - * @version 1.0.001 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_FILTERS { - - /** - * Define a list of available filter decoders. - * @private static - */ - private static $available_filters = array('ASCIIHexDecode', 'ASCII85Decode', 'LZWDecode', 'FlateDecode', 'RunLengthDecode'); - -// ----------------------------------------------------------------------------- - - /** - * Get a list of available decoding filters. - * @return array Array of available filter decoders. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function getAvailableFilters() { - return self::$available_filters; - } - - /** - * Decode data using the specified filter type. - * @param string $filter Filter name. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilter($filter, $data) { - switch ($filter) { - case 'ASCIIHexDecode': { - return self::decodeFilterASCIIHexDecode($data); - break; - } - case 'ASCII85Decode': { - return self::decodeFilterASCII85Decode($data); - break; - } - case 'LZWDecode': { - return self::decodeFilterLZWDecode($data); - break; - } - case 'FlateDecode': { - return self::decodeFilterFlateDecode($data); - break; - } - case 'RunLengthDecode': { - return self::decodeFilterRunLengthDecode($data); - break; - } - case 'CCITTFaxDecode': { - return self::decodeFilterCCITTFaxDecode($data); - break; - } - case 'JBIG2Decode': { - return self::decodeFilterJBIG2Decode($data); - break; - } - case 'DCTDecode': { - return self::decodeFilterDCTDecode($data); - break; - } - case 'JPXDecode': { - return self::decodeFilterJPXDecode($data); - break; - } - case 'Crypt': { - return self::decodeFilterCrypt($data); - break; - } - default: { - return self::decodeFilterStandard($data); - break; - } - } - } - - // --- FILTERS (PDF 32000-2008 - 7.4 Filters) ------------------------------ - - /** - * Standard - * Default decoding filter (leaves data unchanged). - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterStandard($data) { - return $data; - } - - /** - * ASCIIHexDecode - * Decodes data encoded in an ASCII hexadecimal representation, reproducing the original binary data. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterASCIIHexDecode($data) { - // initialize string to return - $decoded = ''; - // all white-space characters shall be ignored - $data = preg_replace('/[\s]/', '', $data); - // check for EOD character: GREATER-THAN SIGN (3Eh) - $eod = strpos($data, '>'); - if ($eod !== false) { - // remove EOD and extra data (if any) - $data = substr($data, 0, $eod); - $eod = true; - } - // get data length - $data_length = strlen($data); - if (($data_length % 2) != 0) { - // odd number of hexadecimal digits - if ($eod) { - // EOD shall behave as if a 0 (zero) followed the last digit - $data = substr($data, 0, -1).'0'.substr($data, -1); - } else { - self::Error('decodeFilterASCIIHexDecode: invalid code'); - } - } - // check for invalid characters - if (preg_match('/[^a-fA-F\d]/', $data) > 0) { - self::Error('decodeFilterASCIIHexDecode: invalid code'); - } - // get one byte of binary data for each pair of ASCII hexadecimal digits - $decoded = pack('H*', $data); - return $decoded; - } - - /** - * ASCII85Decode - * Decodes data encoded in an ASCII base-85 representation, reproducing the original binary data. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterASCII85Decode($data) { - // initialize string to return - $decoded = ''; - // all white-space characters shall be ignored - $data = preg_replace('/[\s]/', '', $data); - // remove start sequence 2-character sequence <~ (3Ch)(7Eh) - if (strpos($data, '<~') !== false) { - // remove EOD and extra data (if any) - $data = substr($data, 2); - } - // check for EOD: 2-character sequence ~> (7Eh)(3Eh) - $eod = strpos($data, '~>'); - if ($eod !== false) { - // remove EOD and extra data (if any) - $data = substr($data, 0, $eod); - } - // data length - $data_length = strlen($data); - // check for invalid characters - if (preg_match('/[^\x21-\x75,\x74]/', $data) > 0) { - self::Error('decodeFilterASCII85Decode: invalid code'); - } - // z sequence - $zseq = chr(0).chr(0).chr(0).chr(0); - // position inside a group of 4 bytes (0-3) - $group_pos = 0; - $tuple = 0; - $pow85 = array((85*85*85*85), (85*85*85), (85*85), 85, 1); - $last_pos = ($data_length - 1); - // for each byte - for ($i = 0; $i < $data_length; ++$i) { - // get char value - $char = ord($data[$i]); - if ($char == 122) { // 'z' - if ($group_pos == 0) { - $decoded .= $zseq; - } else { - self::Error('decodeFilterASCII85Decode: invalid code'); - } - } else { - // the value represented by a group of 5 characters should never be greater than 2^32 - 1 - $tuple += (($char - 33) * $pow85[$group_pos]); - if ($group_pos == 4) { - $decoded .= chr($tuple >> 24).chr($tuple >> 16).chr($tuple >> 8).chr($tuple); - $tuple = 0; - $group_pos = 0; - } else { - ++$group_pos; - } - } - } - if ($group_pos > 1) { - $tuple += $pow85[($group_pos - 1)]; - } - // last tuple (if any) - switch ($group_pos) { - case 4: { - $decoded .= chr($tuple >> 24).chr($tuple >> 16).chr($tuple >> 8); - break; - } - case 3: { - $decoded .= chr($tuple >> 24).chr($tuple >> 16); - break; - } - case 2: { - $decoded .= chr($tuple >> 24); - break; - } - case 1: { - self::Error('decodeFilterASCII85Decode: invalid code'); - break; - } - } - return $decoded; - } - - /** - * LZWDecode - * Decompresses data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method, reproducing the original text or binary data. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterLZWDecode($data) { - // initialize string to return - $decoded = ''; - // data length - $data_length = strlen($data); - // convert string to binary string - $bitstring = ''; - for ($i = 0; $i < $data_length; ++$i) { - $bitstring .= sprintf('%08b', ord($data[$i])); - } - // get the number of bits - $data_length = strlen($bitstring); - // initialize code length in bits - $bitlen = 9; - // initialize dictionary index - $dix = 258; - // initialize the dictionary (with the first 256 entries). - $dictionary = array(); - for ($i = 0; $i < 256; ++$i) { - $dictionary[$i] = chr($i); - } - // previous val - $prev_index = 0; - // while we encounter EOD marker (257), read code_length bits - while (($data_length > 0) AND (($index = bindec(substr($bitstring, 0, $bitlen))) != 257)) { - // remove read bits from string - $bitstring = substr($bitstring, $bitlen); - // update number of bits - $data_length -= $bitlen; - if ($index == 256) { // clear-table marker - // reset code length in bits - $bitlen = 9; - // reset dictionary index - $dix = 258; - $prev_index = 256; - // reset the dictionary (with the first 256 entries). - $dictionary = array(); - for ($i = 0; $i < 256; ++$i) { - $dictionary[$i] = chr($i); - } - } elseif ($prev_index == 256) { - // first entry - $decoded .= $dictionary[$index]; - $prev_index = $index; - } else { - // check if index exist in the dictionary - if ($index < $dix) { - // index exist on dictionary - $decoded .= $dictionary[$index]; - $dic_val = $dictionary[$prev_index].$dictionary[$index][0]; - // store current index - $prev_index = $index; - } else { - // index do not exist on dictionary - $dic_val = $dictionary[$prev_index].$dictionary[$prev_index][0]; - $decoded .= $dic_val; - } - // update dictionary - $dictionary[$dix] = $dic_val; - ++$dix; - // change bit length by case - if ($dix == 2047) { - $bitlen = 12; - } elseif ($dix == 1023) { - $bitlen = 11; - } elseif ($dix == 511) { - $bitlen = 10; - } - } - } - return $decoded; - } - - /** - * FlateDecode - * Decompresses data encoded using the zlib/deflate compression method, reproducing the original text or binary data. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterFlateDecode($data) { - // initialize string to return - $decoded = @gzuncompress($data); - if ($decoded === false) { - self::Error('decodeFilterFlateDecode: invalid code'); - } - return $decoded; - } - - /** - * RunLengthDecode - * Decompresses data encoded using a byte-oriented run-length encoding algorithm. - * @param string $data Data to decode. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterRunLengthDecode($data) { - // initialize string to return - $decoded = ''; - // data length - $data_length = strlen($data); - $i = 0; - while($i < $data_length) { - // get current byte value - $byte = ord($data[$i]); - if ($byte == 128) { - // a length value of 128 denote EOD - break; - } elseif ($byte < 128) { - // if the length byte is in the range 0 to 127 - // the following length + 1 (1 to 128) bytes shall be copied literally during decompression - $decoded .= substr($data, ($i + 1), ($byte + 1)); - // move to next block - $i += ($byte + 2); - } else { - // if length is in the range 129 to 255, - // the following single byte shall be copied 257 - length (2 to 128) times during decompression - $decoded .= str_repeat($data[($i + 1)], (257 - $byte)); - // move to next block - $i += 2; - } - } - return $decoded; - } - - /** - * CCITTFaxDecode (NOT IMPLEMETED - RETURN AN EXCEPTION) - * Decompresses data encoded using the CCITT facsimile standard, reproducing the original data (typically monochrome image data at 1 bit per pixel). - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterCCITTFaxDecode($data) { - self::Error('~decodeFilterCCITTFaxDecode: this method has not been yet implemented'); - //return $data; - } - - /** - * JBIG2Decode (NOT IMPLEMETED - RETURN AN EXCEPTION) - * Decompresses data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data). - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterJBIG2Decode($data) { - self::Error('~decodeFilterJBIG2Decode: this method has not been yet implemented'); - //return $data; - } - - /** - * DCTDecode (NOT IMPLEMETED - RETURN AN EXCEPTION) - * Decompresses data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard, reproducing image sample data that approximates the original data. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterDCTDecode($data) { - self::Error('~decodeFilterDCTDecode: this method has not been yet implemented'); - //return $data; - } - - /** - * JPXDecode (NOT IMPLEMETED - RETURN AN EXCEPTION) - * Decompresses data encoded using the wavelet-based JPEG2000 standard, reproducing the original image data. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterJPXDecode($data) { - self::Error('~decodeFilterJPXDecode: this method has not been yet implemented'); - //return $data; - } - - /** - * Crypt (NOT IMPLEMETED - RETURN AN EXCEPTION) - * Decrypts data encrypted by a security handler, reproducing the data as it was before encryption. - * @param string $data Data to decode. - * @return string Decoded data string. - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function decodeFilterCrypt($data) { - self::Error('~decodeFilterCrypt: this method has not been yet implemented'); - //return $data; - } - - // --- END FILTERS SECTION ------------------------------------------------- - - /** - * Throw an exception. - * @param string $msg The error message - * @since 1.0.000 (2011-05-23) - * @public static - */ - public static function Error($msg) { - throw new Exception('TCPDF_PARSER ERROR: '.$msg); - } - -} // END OF TCPDF_FILTERS CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/tcpdf_font_data.php b/lib/combodo/tcpdf/include/tcpdf_font_data.php deleted file mode 100644 index 974e72ec7..000000000 --- a/lib/combodo/tcpdf/include/tcpdf_font_data.php +++ /dev/null @@ -1,18447 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Unicode data and encoding maps for TCPDF. -// -//============================================================+ - -/** - * @file - * Unicode data and encoding maps for TCPDF. - * @author Nicola Asuni - * @package com.tecnick.tcpdf - */ - -/** - * @class TCPDF_FONT_DATA - * Unicode data and encoding maps for TCPDF. - * @package com.tecnick.tcpdf - * @version 1.0.001 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_FONT_DATA { - -/** - * Unicode code for Left-to-Right Mark. - * @public - */ -public static $uni_LRM = 8206; - -/** - * Unicode code for Right-to-Left Mark. - * @public - */ -public static $uni_RLM = 8207; - -/** - * Unicode code for Left-to-Right Embedding. - * @public - */ -public static $uni_LRE = 8234; - -/** - * Unicode code for Right-to-Left Embedding. - * @public - */ -public static $uni_RLE = 8235; - -/** - * Unicode code for Pop Directional Format. - * @public - */ -public static $uni_PDF = 8236; - -/** - * Unicode code for Left-to-Right Override. - * @public - */ -public static $uni_LRO = 8237; - -/** - * Unicode code for Right-to-Left Override. - * @public - */ -public static $uni_RLO = 8238; - -/** - * Pattern to test RTL (Righ-To-Left) strings using regular expressions. - * @public - */ -public static $uni_RE_PATTERN_RTL = "/( - \xD6\xBE # R - | \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4] # R - | \xDF[\x80-\xAA\xB4\xB5\xBA] # R - | \xE2\x80\x8F # R - | \xEF\xAC[\x9D\x9F\xA0-\xA8\xAA-\xB6\xB8-\xBC\xBE] # R - | \xEF\xAD[\x80\x81\x83\x84\x86-\x8F] # R - | \xF0\x90\xA0[\x80-\x85\x88\x8A-\xB5\xB7\xB8\xBC\xBF] # R - | \xF0\x90\xA4[\x80-\x99] # R - | \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3] # R - | \xF0\x90\xA9[\x80-\x87\x90-\x98] # R - | \xE2\x80[\xAB\xAE] # RLE & RLO - )/x"; - -/** - * Pattern to test Arabic strings using regular expressions. Source: http://www.w3.org/International/questions/qa-forms-utf-8 - * @public - */ -public static $uni_RE_PATTERN_ARABIC = "/( - \xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA] # AL - | \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF] # AL - | \xDA[\x80-\xBF] # AL - | \xDB[\x80-\x95\x9D\xA5\xA6\xAE\xAF\xBA-\xBF] # AL - | \xDC[\x80-\x8D\x90\x92-\xAF] # AL - | \xDD[\x8D-\xAD] # AL - | \xDE[\x80-\xA5\xB1] # AL - | \xEF\xAD[\x90-\xBF] # AL - | \xEF\xAE[\x80-\xB1] # AL - | \xEF\xAF[\x93-\xBF] # AL - | \xEF[\xB0-\xB3][\x80-\xBF] # AL - | \xEF\xB4[\x80-\xBD] # AL - | \xEF\xB5[\x90-\xBF] # AL - | \xEF\xB6[\x80-\x8F\x92-\xBF] # AL - | \xEF\xB7[\x80-\x87\xB0-\xBC] # AL - | \xEF\xB9[\xB0-\xB4\xB6-\xBF] # AL - | \xEF\xBA[\x80-\xBF] # AL - | \xEF\xBB[\x80-\xBC] # AL - | \xD9[\xA0-\xA9\xAB\xAC] # AN - )/x"; - -/** - * Array of Unicode types. - * @public - */ -public static $uni_type = array( -0=>'BN', -1=>'BN', -2=>'BN', -3=>'BN', -4=>'BN', -5=>'BN', -6=>'BN', -7=>'BN', -8=>'BN', -9=>'S', -10=>'B', -11=>'S', -12=>'WS', -13=>'B', -14=>'BN', -15=>'BN', -16=>'BN', -17=>'BN', -18=>'BN', -19=>'BN', -20=>'BN', -21=>'BN', -22=>'BN', -23=>'BN', -24=>'BN', -25=>'BN', -26=>'BN', -27=>'BN', -28=>'B', -29=>'B', -30=>'B', -31=>'S', -32=>'WS', -33=>'ON', -34=>'ON', -35=>'ET', -36=>'ET', -37=>'ET', -38=>'ON', -39=>'ON', -40=>'ON', -41=>'ON', -42=>'ON', -43=>'ES', -44=>'CS', -45=>'ES', -46=>'CS', -47=>'CS', -48=>'EN', -49=>'EN', -50=>'EN', -51=>'EN', -52=>'EN', -53=>'EN', -54=>'EN', -55=>'EN', -56=>'EN', -57=>'EN', -58=>'CS', -59=>'ON', -60=>'ON', -61=>'ON', -62=>'ON', -63=>'ON', -64=>'ON', -65=>'L', -66=>'L', -67=>'L', -68=>'L', -69=>'L', -70=>'L', -71=>'L', -72=>'L', -73=>'L', -74=>'L', -75=>'L', -76=>'L', -77=>'L', -78=>'L', -79=>'L', -80=>'L', -81=>'L', -82=>'L', -83=>'L', -84=>'L', -85=>'L', -86=>'L', -87=>'L', -88=>'L', -89=>'L', -90=>'L', -91=>'ON', -92=>'ON', -93=>'ON', -94=>'ON', -95=>'ON', -96=>'ON', -97=>'L', -98=>'L', -99=>'L', -100=>'L', -101=>'L', -102=>'L', -103=>'L', -104=>'L', -105=>'L', -106=>'L', -107=>'L', -108=>'L', -109=>'L', -110=>'L', -111=>'L', -112=>'L', -113=>'L', -114=>'L', -115=>'L', -116=>'L', -117=>'L', -118=>'L', -119=>'L', -120=>'L', -121=>'L', -122=>'L', -123=>'ON', -124=>'ON', -125=>'ON', -126=>'ON', -127=>'BN', -128=>'BN', -129=>'BN', -130=>'BN', -131=>'BN', -132=>'BN', -133=>'B', -134=>'BN', -135=>'BN', -136=>'BN', -137=>'BN', -138=>'BN', -139=>'BN', -140=>'BN', -141=>'BN', -142=>'BN', -143=>'BN', -144=>'BN', -145=>'BN', -146=>'BN', -147=>'BN', -148=>'BN', -149=>'BN', -150=>'BN', -151=>'BN', -152=>'BN', -153=>'BN', -154=>'BN', -155=>'BN', -156=>'BN', -157=>'BN', -158=>'BN', -159=>'BN', -160=>'CS', -161=>'ON', -162=>'ET', -163=>'ET', -164=>'ET', -165=>'ET', -166=>'ON', -167=>'ON', -168=>'ON', -169=>'ON', -170=>'L', -171=>'ON', -172=>'ON', -173=>'BN', -174=>'ON', -175=>'ON', -176=>'ET', -177=>'ET', -178=>'EN', -179=>'EN', -180=>'ON', -181=>'L', -182=>'ON', -183=>'ON', -184=>'ON', -185=>'EN', -186=>'L', -187=>'ON', -188=>'ON', -189=>'ON', -190=>'ON', -191=>'ON', -192=>'L', -193=>'L', -194=>'L', -195=>'L', -196=>'L', -197=>'L', -198=>'L', -199=>'L', -200=>'L', -201=>'L', -202=>'L', -203=>'L', -204=>'L', -205=>'L', -206=>'L', -207=>'L', -208=>'L', -209=>'L', -210=>'L', -211=>'L', -212=>'L', -213=>'L', -214=>'L', -215=>'ON', -216=>'L', -217=>'L', -218=>'L', -219=>'L', -220=>'L', -221=>'L', -222=>'L', -223=>'L', -224=>'L', -225=>'L', -226=>'L', -227=>'L', -228=>'L', -229=>'L', -230=>'L', -231=>'L', -232=>'L', -233=>'L', -234=>'L', -235=>'L', -236=>'L', -237=>'L', -238=>'L', -239=>'L', -240=>'L', -241=>'L', -242=>'L', -243=>'L', -244=>'L', -245=>'L', -246=>'L', -247=>'ON', -248=>'L', -249=>'L', -250=>'L', -251=>'L', -252=>'L', -253=>'L', -254=>'L', -255=>'L', -256=>'L', -257=>'L', -258=>'L', -259=>'L', -260=>'L', -261=>'L', -262=>'L', -263=>'L', -264=>'L', -265=>'L', -266=>'L', -267=>'L', -268=>'L', -269=>'L', -270=>'L', -271=>'L', -272=>'L', -273=>'L', -274=>'L', -275=>'L', -276=>'L', -277=>'L', -278=>'L', -279=>'L', -280=>'L', -281=>'L', -282=>'L', -283=>'L', -284=>'L', -285=>'L', -286=>'L', -287=>'L', -288=>'L', -289=>'L', -290=>'L', -291=>'L', -292=>'L', -293=>'L', -294=>'L', -295=>'L', -296=>'L', -297=>'L', -298=>'L', -299=>'L', -300=>'L', -301=>'L', -302=>'L', -303=>'L', -304=>'L', -305=>'L', -306=>'L', -307=>'L', -308=>'L', -309=>'L', -310=>'L', -311=>'L', -312=>'L', -313=>'L', -314=>'L', -315=>'L', -316=>'L', -317=>'L', -318=>'L', -319=>'L', -320=>'L', -321=>'L', -322=>'L', -323=>'L', -324=>'L', -325=>'L', -326=>'L', -327=>'L', -328=>'L', -329=>'L', -330=>'L', -331=>'L', -332=>'L', -333=>'L', -334=>'L', -335=>'L', -336=>'L', -337=>'L', -338=>'L', -339=>'L', -340=>'L', -341=>'L', -342=>'L', -343=>'L', -344=>'L', -345=>'L', -346=>'L', -347=>'L', -348=>'L', -349=>'L', -350=>'L', -351=>'L', -352=>'L', -353=>'L', -354=>'L', -355=>'L', -356=>'L', -357=>'L', -358=>'L', -359=>'L', -360=>'L', -361=>'L', -362=>'L', -363=>'L', -364=>'L', -365=>'L', -366=>'L', -367=>'L', -368=>'L', -369=>'L', -370=>'L', -371=>'L', -372=>'L', -373=>'L', -374=>'L', -375=>'L', -376=>'L', -377=>'L', -378=>'L', -379=>'L', -380=>'L', -381=>'L', -382=>'L', -383=>'L', -384=>'L', -385=>'L', -386=>'L', -387=>'L', -388=>'L', -389=>'L', -390=>'L', -391=>'L', -392=>'L', -393=>'L', -394=>'L', -395=>'L', -396=>'L', -397=>'L', -398=>'L', -399=>'L', -400=>'L', -401=>'L', -402=>'L', -403=>'L', -404=>'L', -405=>'L', -406=>'L', -407=>'L', -408=>'L', -409=>'L', -410=>'L', -411=>'L', -412=>'L', -413=>'L', -414=>'L', -415=>'L', -416=>'L', -417=>'L', -418=>'L', -419=>'L', -420=>'L', -421=>'L', -422=>'L', -423=>'L', -424=>'L', -425=>'L', -426=>'L', -427=>'L', -428=>'L', -429=>'L', -430=>'L', -431=>'L', -432=>'L', -433=>'L', -434=>'L', -435=>'L', -436=>'L', -437=>'L', -438=>'L', -439=>'L', -440=>'L', -441=>'L', -442=>'L', -443=>'L', -444=>'L', -445=>'L', -446=>'L', -447=>'L', -448=>'L', -449=>'L', -450=>'L', -451=>'L', -452=>'L', -453=>'L', -454=>'L', -455=>'L', -456=>'L', -457=>'L', -458=>'L', -459=>'L', -460=>'L', -461=>'L', -462=>'L', -463=>'L', -464=>'L', -465=>'L', -466=>'L', -467=>'L', -468=>'L', -469=>'L', -470=>'L', -471=>'L', -472=>'L', -473=>'L', -474=>'L', -475=>'L', -476=>'L', -477=>'L', -478=>'L', -479=>'L', -480=>'L', -481=>'L', -482=>'L', -483=>'L', -484=>'L', -485=>'L', -486=>'L', -487=>'L', -488=>'L', -489=>'L', -490=>'L', -491=>'L', -492=>'L', -493=>'L', -494=>'L', -495=>'L', -496=>'L', -497=>'L', -498=>'L', -499=>'L', -500=>'L', -501=>'L', -502=>'L', -503=>'L', -504=>'L', -505=>'L', -506=>'L', -507=>'L', -508=>'L', -509=>'L', -510=>'L', -511=>'L', -512=>'L', -513=>'L', -514=>'L', -515=>'L', -516=>'L', -517=>'L', -518=>'L', -519=>'L', -520=>'L', -521=>'L', -522=>'L', -523=>'L', -524=>'L', -525=>'L', -526=>'L', -527=>'L', -528=>'L', -529=>'L', -530=>'L', -531=>'L', -532=>'L', -533=>'L', -534=>'L', -535=>'L', -536=>'L', -537=>'L', -538=>'L', -539=>'L', -540=>'L', -541=>'L', -542=>'L', -543=>'L', -544=>'L', -545=>'L', -546=>'L', -547=>'L', -548=>'L', -549=>'L', -550=>'L', -551=>'L', -552=>'L', -553=>'L', -554=>'L', -555=>'L', -556=>'L', -557=>'L', -558=>'L', -559=>'L', -560=>'L', -561=>'L', -562=>'L', -563=>'L', -564=>'L', -565=>'L', -566=>'L', -567=>'L', -568=>'L', -569=>'L', -570=>'L', -571=>'L', -572=>'L', -573=>'L', -574=>'L', -575=>'L', -576=>'L', -577=>'L', -578=>'L', -579=>'L', -580=>'L', -581=>'L', -582=>'L', -583=>'L', -584=>'L', -585=>'L', -586=>'L', -587=>'L', -588=>'L', -589=>'L', -590=>'L', -591=>'L', -592=>'L', -593=>'L', -594=>'L', -595=>'L', -596=>'L', -597=>'L', -598=>'L', -599=>'L', -600=>'L', -601=>'L', -602=>'L', -603=>'L', -604=>'L', -605=>'L', -606=>'L', -607=>'L', -608=>'L', -609=>'L', -610=>'L', -611=>'L', -612=>'L', -613=>'L', -614=>'L', -615=>'L', -616=>'L', -617=>'L', -618=>'L', -619=>'L', -620=>'L', -621=>'L', -622=>'L', -623=>'L', -624=>'L', -625=>'L', -626=>'L', -627=>'L', -628=>'L', -629=>'L', -630=>'L', -631=>'L', -632=>'L', -633=>'L', -634=>'L', -635=>'L', -636=>'L', -637=>'L', -638=>'L', -639=>'L', -640=>'L', -641=>'L', -642=>'L', -643=>'L', -644=>'L', -645=>'L', -646=>'L', -647=>'L', -648=>'L', -649=>'L', -650=>'L', -651=>'L', -652=>'L', -653=>'L', -654=>'L', -655=>'L', -656=>'L', -657=>'L', -658=>'L', -659=>'L', -660=>'L', -661=>'L', -662=>'L', -663=>'L', -664=>'L', -665=>'L', -666=>'L', -667=>'L', -668=>'L', -669=>'L', -670=>'L', -671=>'L', -672=>'L', -673=>'L', -674=>'L', -675=>'L', -676=>'L', -677=>'L', -678=>'L', -679=>'L', -680=>'L', -681=>'L', -682=>'L', -683=>'L', -684=>'L', -685=>'L', -686=>'L', -687=>'L', -688=>'L', -689=>'L', -690=>'L', -691=>'L', -692=>'L', -693=>'L', -694=>'L', -695=>'L', -696=>'L', -697=>'ON', -698=>'ON', -699=>'L', -700=>'L', -701=>'L', -702=>'L', -703=>'L', -704=>'L', -705=>'L', -706=>'ON', -707=>'ON', -708=>'ON', -709=>'ON', -710=>'ON', -711=>'ON', -712=>'ON', -713=>'ON', -714=>'ON', -715=>'ON', -716=>'ON', -717=>'ON', -718=>'ON', -719=>'ON', -720=>'L', -721=>'L', -722=>'ON', -723=>'ON', -724=>'ON', -725=>'ON', -726=>'ON', -727=>'ON', -728=>'ON', -729=>'ON', -730=>'ON', -731=>'ON', -732=>'ON', -733=>'ON', -734=>'ON', -735=>'ON', -736=>'L', -737=>'L', -738=>'L', -739=>'L', -740=>'L', -741=>'ON', -742=>'ON', -743=>'ON', -744=>'ON', -745=>'ON', -746=>'ON', -747=>'ON', -748=>'ON', -749=>'ON', -750=>'L', -751=>'ON', -752=>'ON', -753=>'ON', -754=>'ON', -755=>'ON', -756=>'ON', -757=>'ON', -758=>'ON', -759=>'ON', -760=>'ON', -761=>'ON', -762=>'ON', -763=>'ON', -764=>'ON', -765=>'ON', -766=>'ON', -767=>'ON', -768=>'NSM', -769=>'NSM', -770=>'NSM', -771=>'NSM', -772=>'NSM', -773=>'NSM', -774=>'NSM', -775=>'NSM', -776=>'NSM', -777=>'NSM', -778=>'NSM', -779=>'NSM', -780=>'NSM', -781=>'NSM', -782=>'NSM', -783=>'NSM', -784=>'NSM', -785=>'NSM', -786=>'NSM', -787=>'NSM', -788=>'NSM', -789=>'NSM', -790=>'NSM', -791=>'NSM', -792=>'NSM', -793=>'NSM', -794=>'NSM', -795=>'NSM', -796=>'NSM', -797=>'NSM', -798=>'NSM', -799=>'NSM', -800=>'NSM', -801=>'NSM', -802=>'NSM', -803=>'NSM', -804=>'NSM', -805=>'NSM', -806=>'NSM', -807=>'NSM', -808=>'NSM', -809=>'NSM', -810=>'NSM', -811=>'NSM', -812=>'NSM', -813=>'NSM', -814=>'NSM', -815=>'NSM', -816=>'NSM', -817=>'NSM', -818=>'NSM', -819=>'NSM', -820=>'NSM', -821=>'NSM', -822=>'NSM', -823=>'NSM', -824=>'NSM', -825=>'NSM', -826=>'NSM', -827=>'NSM', -828=>'NSM', -829=>'NSM', -830=>'NSM', -831=>'NSM', -832=>'NSM', -833=>'NSM', -834=>'NSM', -835=>'NSM', -836=>'NSM', -837=>'NSM', -838=>'NSM', -839=>'NSM', -840=>'NSM', -841=>'NSM', -842=>'NSM', -843=>'NSM', -844=>'NSM', -845=>'NSM', -846=>'NSM', -847=>'NSM', -848=>'NSM', -849=>'NSM', -850=>'NSM', -851=>'NSM', -852=>'NSM', -853=>'NSM', -854=>'NSM', -855=>'NSM', -856=>'NSM', -857=>'NSM', -858=>'NSM', -859=>'NSM', -860=>'NSM', -861=>'NSM', -862=>'NSM', -863=>'NSM', -864=>'NSM', -865=>'NSM', -866=>'NSM', -867=>'NSM', -868=>'NSM', -869=>'NSM', -870=>'NSM', -871=>'NSM', -872=>'NSM', -873=>'NSM', -874=>'NSM', -875=>'NSM', -876=>'NSM', -877=>'NSM', -878=>'NSM', -879=>'NSM', -884=>'ON', -885=>'ON', -890=>'L', -891=>'L', -892=>'L', -893=>'L', -894=>'ON', -900=>'ON', -901=>'ON', -902=>'L', -903=>'ON', -904=>'L', -905=>'L', -906=>'L', -908=>'L', -910=>'L', -911=>'L', -912=>'L', -913=>'L', -914=>'L', -915=>'L', -916=>'L', -917=>'L', -918=>'L', -919=>'L', -920=>'L', -921=>'L', -922=>'L', -923=>'L', -924=>'L', -925=>'L', -926=>'L', -927=>'L', -928=>'L', -929=>'L', -931=>'L', -932=>'L', -933=>'L', -934=>'L', -935=>'L', -936=>'L', -937=>'L', -938=>'L', -939=>'L', -940=>'L', -941=>'L', -942=>'L', -943=>'L', -944=>'L', -945=>'L', -946=>'L', -947=>'L', -948=>'L', -949=>'L', -950=>'L', -951=>'L', -952=>'L', -953=>'L', -954=>'L', -955=>'L', -956=>'L', -957=>'L', -958=>'L', -959=>'L', -960=>'L', -961=>'L', -962=>'L', -963=>'L', -964=>'L', -965=>'L', -966=>'L', -967=>'L', -968=>'L', -969=>'L', -970=>'L', -971=>'L', -972=>'L', -973=>'L', -974=>'L', -976=>'L', -977=>'L', -978=>'L', -979=>'L', -980=>'L', -981=>'L', -982=>'L', -983=>'L', -984=>'L', -985=>'L', -986=>'L', -987=>'L', -988=>'L', -989=>'L', -990=>'L', -991=>'L', -992=>'L', -993=>'L', -994=>'L', -995=>'L', -996=>'L', -997=>'L', -998=>'L', -999=>'L', -1000=>'L', -1001=>'L', -1002=>'L', -1003=>'L', -1004=>'L', -1005=>'L', -1006=>'L', -1007=>'L', -1008=>'L', -1009=>'L', -1010=>'L', -1011=>'L', -1012=>'L', -1013=>'L', -1014=>'ON', -1015=>'L', -1016=>'L', -1017=>'L', -1018=>'L', -1019=>'L', -1020=>'L', -1021=>'L', -1022=>'L', -1023=>'L', -1024=>'L', -1025=>'L', -1026=>'L', -1027=>'L', -1028=>'L', -1029=>'L', -1030=>'L', -1031=>'L', -1032=>'L', -1033=>'L', -1034=>'L', -1035=>'L', -1036=>'L', -1037=>'L', -1038=>'L', -1039=>'L', -1040=>'L', -1041=>'L', -1042=>'L', -1043=>'L', -1044=>'L', -1045=>'L', -1046=>'L', -1047=>'L', -1048=>'L', -1049=>'L', -1050=>'L', -1051=>'L', -1052=>'L', -1053=>'L', -1054=>'L', -1055=>'L', -1056=>'L', -1057=>'L', -1058=>'L', -1059=>'L', -1060=>'L', -1061=>'L', -1062=>'L', -1063=>'L', -1064=>'L', -1065=>'L', -1066=>'L', -1067=>'L', -1068=>'L', -1069=>'L', -1070=>'L', -1071=>'L', -1072=>'L', -1073=>'L', -1074=>'L', -1075=>'L', -1076=>'L', -1077=>'L', -1078=>'L', -1079=>'L', -1080=>'L', -1081=>'L', -1082=>'L', -1083=>'L', -1084=>'L', -1085=>'L', -1086=>'L', -1087=>'L', -1088=>'L', -1089=>'L', -1090=>'L', -1091=>'L', -1092=>'L', -1093=>'L', -1094=>'L', -1095=>'L', -1096=>'L', -1097=>'L', -1098=>'L', -1099=>'L', -1100=>'L', -1101=>'L', -1102=>'L', -1103=>'L', -1104=>'L', -1105=>'L', -1106=>'L', -1107=>'L', -1108=>'L', -1109=>'L', -1110=>'L', -1111=>'L', -1112=>'L', -1113=>'L', -1114=>'L', -1115=>'L', -1116=>'L', -1117=>'L', -1118=>'L', -1119=>'L', -1120=>'L', -1121=>'L', -1122=>'L', -1123=>'L', -1124=>'L', -1125=>'L', -1126=>'L', -1127=>'L', -1128=>'L', -1129=>'L', -1130=>'L', -1131=>'L', -1132=>'L', -1133=>'L', -1134=>'L', -1135=>'L', -1136=>'L', -1137=>'L', -1138=>'L', -1139=>'L', -1140=>'L', -1141=>'L', -1142=>'L', -1143=>'L', -1144=>'L', -1145=>'L', -1146=>'L', -1147=>'L', -1148=>'L', -1149=>'L', -1150=>'L', -1151=>'L', -1152=>'L', -1153=>'L', -1154=>'L', -1155=>'NSM', -1156=>'NSM', -1157=>'NSM', -1158=>'NSM', -1160=>'NSM', -1161=>'NSM', -1162=>'L', -1163=>'L', -1164=>'L', -1165=>'L', -1166=>'L', -1167=>'L', -1168=>'L', -1169=>'L', -1170=>'L', -1171=>'L', -1172=>'L', -1173=>'L', -1174=>'L', -1175=>'L', -1176=>'L', -1177=>'L', -1178=>'L', -1179=>'L', -1180=>'L', -1181=>'L', -1182=>'L', -1183=>'L', -1184=>'L', -1185=>'L', -1186=>'L', -1187=>'L', -1188=>'L', -1189=>'L', -1190=>'L', -1191=>'L', -1192=>'L', -1193=>'L', -1194=>'L', -1195=>'L', -1196=>'L', -1197=>'L', -1198=>'L', -1199=>'L', -1200=>'L', -1201=>'L', -1202=>'L', -1203=>'L', -1204=>'L', -1205=>'L', -1206=>'L', -1207=>'L', -1208=>'L', -1209=>'L', -1210=>'L', -1211=>'L', -1212=>'L', -1213=>'L', -1214=>'L', -1215=>'L', -1216=>'L', -1217=>'L', -1218=>'L', -1219=>'L', -1220=>'L', -1221=>'L', -1222=>'L', -1223=>'L', -1224=>'L', -1225=>'L', -1226=>'L', -1227=>'L', -1228=>'L', -1229=>'L', -1230=>'L', -1231=>'L', -1232=>'L', -1233=>'L', -1234=>'L', -1235=>'L', -1236=>'L', -1237=>'L', -1238=>'L', -1239=>'L', -1240=>'L', -1241=>'L', -1242=>'L', -1243=>'L', -1244=>'L', -1245=>'L', -1246=>'L', -1247=>'L', -1248=>'L', -1249=>'L', -1250=>'L', -1251=>'L', -1252=>'L', -1253=>'L', -1254=>'L', -1255=>'L', -1256=>'L', -1257=>'L', -1258=>'L', -1259=>'L', -1260=>'L', -1261=>'L', -1262=>'L', -1263=>'L', -1264=>'L', -1265=>'L', -1266=>'L', -1267=>'L', -1268=>'L', -1269=>'L', -1270=>'L', -1271=>'L', -1272=>'L', -1273=>'L', -1274=>'L', -1275=>'L', -1276=>'L', -1277=>'L', -1278=>'L', -1279=>'L', -1280=>'L', -1281=>'L', -1282=>'L', -1283=>'L', -1284=>'L', -1285=>'L', -1286=>'L', -1287=>'L', -1288=>'L', -1289=>'L', -1290=>'L', -1291=>'L', -1292=>'L', -1293=>'L', -1294=>'L', -1295=>'L', -1296=>'L', -1297=>'L', -1298=>'L', -1299=>'L', -1329=>'L', -1330=>'L', -1331=>'L', -1332=>'L', -1333=>'L', -1334=>'L', -1335=>'L', -1336=>'L', -1337=>'L', -1338=>'L', -1339=>'L', -1340=>'L', -1341=>'L', -1342=>'L', -1343=>'L', -1344=>'L', -1345=>'L', -1346=>'L', -1347=>'L', -1348=>'L', -1349=>'L', -1350=>'L', -1351=>'L', -1352=>'L', -1353=>'L', -1354=>'L', -1355=>'L', -1356=>'L', -1357=>'L', -1358=>'L', -1359=>'L', -1360=>'L', -1361=>'L', -1362=>'L', -1363=>'L', -1364=>'L', -1365=>'L', -1366=>'L', -1369=>'L', -1370=>'L', -1371=>'L', -1372=>'L', -1373=>'L', -1374=>'L', -1375=>'L', -1377=>'L', -1378=>'L', -1379=>'L', -1380=>'L', -1381=>'L', -1382=>'L', -1383=>'L', -1384=>'L', -1385=>'L', -1386=>'L', -1387=>'L', -1388=>'L', -1389=>'L', -1390=>'L', -1391=>'L', -1392=>'L', -1393=>'L', -1394=>'L', -1395=>'L', -1396=>'L', -1397=>'L', -1398=>'L', -1399=>'L', -1400=>'L', -1401=>'L', -1402=>'L', -1403=>'L', -1404=>'L', -1405=>'L', -1406=>'L', -1407=>'L', -1408=>'L', -1409=>'L', -1410=>'L', -1411=>'L', -1412=>'L', -1413=>'L', -1414=>'L', -1415=>'L', -1417=>'L', -1418=>'ON', -1425=>'NSM', -1426=>'NSM', -1427=>'NSM', -1428=>'NSM', -1429=>'NSM', -1430=>'NSM', -1431=>'NSM', -1432=>'NSM', -1433=>'NSM', -1434=>'NSM', -1435=>'NSM', -1436=>'NSM', -1437=>'NSM', -1438=>'NSM', -1439=>'NSM', -1440=>'NSM', -1441=>'NSM', -1442=>'NSM', -1443=>'NSM', -1444=>'NSM', -1445=>'NSM', -1446=>'NSM', -1447=>'NSM', -1448=>'NSM', -1449=>'NSM', -1450=>'NSM', -1451=>'NSM', -1452=>'NSM', -1453=>'NSM', -1454=>'NSM', -1455=>'NSM', -1456=>'NSM', -1457=>'NSM', -1458=>'NSM', -1459=>'NSM', -1460=>'NSM', -1461=>'NSM', -1462=>'NSM', -1463=>'NSM', -1464=>'NSM', -1465=>'NSM', -1466=>'NSM', -1467=>'NSM', -1468=>'NSM', -1469=>'NSM', -1470=>'R', -1471=>'NSM', -1472=>'R', -1473=>'NSM', -1474=>'NSM', -1475=>'R', -1476=>'NSM', -1477=>'NSM', -1478=>'R', -1479=>'NSM', -1488=>'R', -1489=>'R', -1490=>'R', -1491=>'R', -1492=>'R', -1493=>'R', -1494=>'R', -1495=>'R', -1496=>'R', -1497=>'R', -1498=>'R', -1499=>'R', -1500=>'R', -1501=>'R', -1502=>'R', -1503=>'R', -1504=>'R', -1505=>'R', -1506=>'R', -1507=>'R', -1508=>'R', -1509=>'R', -1510=>'R', -1511=>'R', -1512=>'R', -1513=>'R', -1514=>'R', -1520=>'R', -1521=>'R', -1522=>'R', -1523=>'R', -1524=>'R', -1536=>'AL', -1537=>'AL', -1538=>'AL', -1539=>'AL', -1547=>'AL', -1548=>'CS', -1549=>'AL', -1550=>'ON', -1551=>'ON', -1552=>'NSM', -1553=>'NSM', -1554=>'NSM', -1555=>'NSM', -1556=>'NSM', -1557=>'NSM', -1563=>'AL', -1566=>'AL', -1567=>'AL', -1569=>'AL', -1570=>'AL', -1571=>'AL', -1572=>'AL', -1573=>'AL', -1574=>'AL', -1575=>'AL', -1576=>'AL', -1577=>'AL', -1578=>'AL', -1579=>'AL', -1580=>'AL', -1581=>'AL', -1582=>'AL', -1583=>'AL', -1584=>'AL', -1585=>'AL', -1586=>'AL', -1587=>'AL', -1588=>'AL', -1589=>'AL', -1590=>'AL', -1591=>'AL', -1592=>'AL', -1593=>'AL', -1594=>'AL', -1600=>'AL', -1601=>'AL', -1602=>'AL', -1603=>'AL', -1604=>'AL', -1605=>'AL', -1606=>'AL', -1607=>'AL', -1608=>'AL', -1609=>'AL', -1610=>'AL', -1611=>'NSM', -1612=>'NSM', -1613=>'NSM', -1614=>'NSM', -1615=>'NSM', -1616=>'NSM', -1617=>'NSM', -1618=>'NSM', -1619=>'NSM', -1620=>'NSM', -1621=>'NSM', -1622=>'NSM', -1623=>'NSM', -1624=>'NSM', -1625=>'NSM', -1626=>'NSM', -1627=>'NSM', -1628=>'NSM', -1629=>'NSM', -1630=>'NSM', -1632=>'AN', -1633=>'AN', -1634=>'AN', -1635=>'AN', -1636=>'AN', -1637=>'AN', -1638=>'AN', -1639=>'AN', -1640=>'AN', -1641=>'AN', -1642=>'ET', -1643=>'AN', -1644=>'AN', -1645=>'AL', -1646=>'AL', -1647=>'AL', -1648=>'NSM', -1649=>'AL', -1650=>'AL', -1651=>'AL', -1652=>'AL', -1653=>'AL', -1654=>'AL', -1655=>'AL', -1656=>'AL', -1657=>'AL', -1658=>'AL', -1659=>'AL', -1660=>'AL', -1661=>'AL', -1662=>'AL', -1663=>'AL', -1664=>'AL', -1665=>'AL', -1666=>'AL', -1667=>'AL', -1668=>'AL', -1669=>'AL', -1670=>'AL', -1671=>'AL', -1672=>'AL', -1673=>'AL', -1674=>'AL', -1675=>'AL', -1676=>'AL', -1677=>'AL', -1678=>'AL', -1679=>'AL', -1680=>'AL', -1681=>'AL', -1682=>'AL', -1683=>'AL', -1684=>'AL', -1685=>'AL', -1686=>'AL', -1687=>'AL', -1688=>'AL', -1689=>'AL', -1690=>'AL', -1691=>'AL', -1692=>'AL', -1693=>'AL', -1694=>'AL', -1695=>'AL', -1696=>'AL', -1697=>'AL', -1698=>'AL', -1699=>'AL', -1700=>'AL', -1701=>'AL', -1702=>'AL', -1703=>'AL', -1704=>'AL', -1705=>'AL', -1706=>'AL', -1707=>'AL', -1708=>'AL', -1709=>'AL', -1710=>'AL', -1711=>'AL', -1712=>'AL', -1713=>'AL', -1714=>'AL', -1715=>'AL', -1716=>'AL', -1717=>'AL', -1718=>'AL', -1719=>'AL', -1720=>'AL', -1721=>'AL', -1722=>'AL', -1723=>'AL', -1724=>'AL', -1725=>'AL', -1726=>'AL', -1727=>'AL', -1728=>'AL', -1729=>'AL', -1730=>'AL', -1731=>'AL', -1732=>'AL', -1733=>'AL', -1734=>'AL', -1735=>'AL', -1736=>'AL', -1737=>'AL', -1738=>'AL', -1739=>'AL', -1740=>'AL', -1741=>'AL', -1742=>'AL', -1743=>'AL', -1744=>'AL', -1745=>'AL', -1746=>'AL', -1747=>'AL', -1748=>'AL', -1749=>'AL', -1750=>'NSM', -1751=>'NSM', -1752=>'NSM', -1753=>'NSM', -1754=>'NSM', -1755=>'NSM', -1756=>'NSM', -1757=>'AL', -1758=>'NSM', -1759=>'NSM', -1760=>'NSM', -1761=>'NSM', -1762=>'NSM', -1763=>'NSM', -1764=>'NSM', -1765=>'AL', -1766=>'AL', -1767=>'NSM', -1768=>'NSM', -1769=>'ON', -1770=>'NSM', -1771=>'NSM', -1772=>'NSM', -1773=>'NSM', -1774=>'AL', -1775=>'AL', -1776=>'EN', -1777=>'EN', -1778=>'EN', -1779=>'EN', -1780=>'EN', -1781=>'EN', -1782=>'EN', -1783=>'EN', -1784=>'EN', -1785=>'EN', -1786=>'AL', -1787=>'AL', -1788=>'AL', -1789=>'AL', -1790=>'AL', -1791=>'AL', -1792=>'AL', -1793=>'AL', -1794=>'AL', -1795=>'AL', -1796=>'AL', -1797=>'AL', -1798=>'AL', -1799=>'AL', -1800=>'AL', -1801=>'AL', -1802=>'AL', -1803=>'AL', -1804=>'AL', -1805=>'AL', -1807=>'BN', -1808=>'AL', -1809=>'NSM', -1810=>'AL', -1811=>'AL', -1812=>'AL', -1813=>'AL', -1814=>'AL', -1815=>'AL', -1816=>'AL', -1817=>'AL', -1818=>'AL', -1819=>'AL', -1820=>'AL', -1821=>'AL', -1822=>'AL', -1823=>'AL', -1824=>'AL', -1825=>'AL', -1826=>'AL', -1827=>'AL', -1828=>'AL', -1829=>'AL', -1830=>'AL', -1831=>'AL', -1832=>'AL', -1833=>'AL', -1834=>'AL', -1835=>'AL', -1836=>'AL', -1837=>'AL', -1838=>'AL', -1839=>'AL', -1840=>'NSM', -1841=>'NSM', -1842=>'NSM', -1843=>'NSM', -1844=>'NSM', -1845=>'NSM', -1846=>'NSM', -1847=>'NSM', -1848=>'NSM', -1849=>'NSM', -1850=>'NSM', -1851=>'NSM', -1852=>'NSM', -1853=>'NSM', -1854=>'NSM', -1855=>'NSM', -1856=>'NSM', -1857=>'NSM', -1858=>'NSM', -1859=>'NSM', -1860=>'NSM', -1861=>'NSM', -1862=>'NSM', -1863=>'NSM', -1864=>'NSM', -1865=>'NSM', -1866=>'NSM', -1869=>'AL', -1870=>'AL', -1871=>'AL', -1872=>'AL', -1873=>'AL', -1874=>'AL', -1875=>'AL', -1876=>'AL', -1877=>'AL', -1878=>'AL', -1879=>'AL', -1880=>'AL', -1881=>'AL', -1882=>'AL', -1883=>'AL', -1884=>'AL', -1885=>'AL', -1886=>'AL', -1887=>'AL', -1888=>'AL', -1889=>'AL', -1890=>'AL', -1891=>'AL', -1892=>'AL', -1893=>'AL', -1894=>'AL', -1895=>'AL', -1896=>'AL', -1897=>'AL', -1898=>'AL', -1899=>'AL', -1900=>'AL', -1901=>'AL', -1920=>'AL', -1921=>'AL', -1922=>'AL', -1923=>'AL', -1924=>'AL', -1925=>'AL', -1926=>'AL', -1927=>'AL', -1928=>'AL', -1929=>'AL', -1930=>'AL', -1931=>'AL', -1932=>'AL', -1933=>'AL', -1934=>'AL', -1935=>'AL', -1936=>'AL', -1937=>'AL', -1938=>'AL', -1939=>'AL', -1940=>'AL', -1941=>'AL', -1942=>'AL', -1943=>'AL', -1944=>'AL', -1945=>'AL', -1946=>'AL', -1947=>'AL', -1948=>'AL', -1949=>'AL', -1950=>'AL', -1951=>'AL', -1952=>'AL', -1953=>'AL', -1954=>'AL', -1955=>'AL', -1956=>'AL', -1957=>'AL', -1958=>'NSM', -1959=>'NSM', -1960=>'NSM', -1961=>'NSM', -1962=>'NSM', -1963=>'NSM', -1964=>'NSM', -1965=>'NSM', -1966=>'NSM', -1967=>'NSM', -1968=>'NSM', -1969=>'AL', -1984=>'R', -1985=>'R', -1986=>'R', -1987=>'R', -1988=>'R', -1989=>'R', -1990=>'R', -1991=>'R', -1992=>'R', -1993=>'R', -1994=>'R', -1995=>'R', -1996=>'R', -1997=>'R', -1998=>'R', -1999=>'R', -2000=>'R', -2001=>'R', -2002=>'R', -2003=>'R', -2004=>'R', -2005=>'R', -2006=>'R', -2007=>'R', -2008=>'R', -2009=>'R', -2010=>'R', -2011=>'R', -2012=>'R', -2013=>'R', -2014=>'R', -2015=>'R', -2016=>'R', -2017=>'R', -2018=>'R', -2019=>'R', -2020=>'R', -2021=>'R', -2022=>'R', -2023=>'R', -2024=>'R', -2025=>'R', -2026=>'R', -2027=>'NSM', -2028=>'NSM', -2029=>'NSM', -2030=>'NSM', -2031=>'NSM', -2032=>'NSM', -2033=>'NSM', -2034=>'NSM', -2035=>'NSM', -2036=>'R', -2037=>'R', -2038=>'ON', -2039=>'ON', -2040=>'ON', -2041=>'ON', -2042=>'R', -2305=>'NSM', -2306=>'NSM', -2307=>'L', -2308=>'L', -2309=>'L', -2310=>'L', -2311=>'L', -2312=>'L', -2313=>'L', -2314=>'L', -2315=>'L', -2316=>'L', -2317=>'L', -2318=>'L', -2319=>'L', -2320=>'L', -2321=>'L', -2322=>'L', -2323=>'L', -2324=>'L', -2325=>'L', -2326=>'L', -2327=>'L', -2328=>'L', -2329=>'L', -2330=>'L', -2331=>'L', -2332=>'L', -2333=>'L', -2334=>'L', -2335=>'L', -2336=>'L', -2337=>'L', -2338=>'L', -2339=>'L', -2340=>'L', -2341=>'L', -2342=>'L', -2343=>'L', -2344=>'L', -2345=>'L', -2346=>'L', -2347=>'L', -2348=>'L', -2349=>'L', -2350=>'L', -2351=>'L', -2352=>'L', -2353=>'L', -2354=>'L', -2355=>'L', -2356=>'L', -2357=>'L', -2358=>'L', -2359=>'L', -2360=>'L', -2361=>'L', -2364=>'NSM', -2365=>'L', -2366=>'L', -2367=>'L', -2368=>'L', -2369=>'NSM', -2370=>'NSM', -2371=>'NSM', -2372=>'NSM', -2373=>'NSM', -2374=>'NSM', -2375=>'NSM', -2376=>'NSM', -2377=>'L', -2378=>'L', -2379=>'L', -2380=>'L', -2381=>'NSM', -2384=>'L', -2385=>'NSM', -2386=>'NSM', -2387=>'NSM', -2388=>'NSM', -2392=>'L', -2393=>'L', -2394=>'L', -2395=>'L', -2396=>'L', -2397=>'L', -2398=>'L', -2399=>'L', -2400=>'L', -2401=>'L', -2402=>'NSM', -2403=>'NSM', -2404=>'L', -2405=>'L', -2406=>'L', -2407=>'L', -2408=>'L', -2409=>'L', -2410=>'L', -2411=>'L', -2412=>'L', -2413=>'L', -2414=>'L', -2415=>'L', -2416=>'L', -2427=>'L', -2428=>'L', -2429=>'L', -2430=>'L', -2431=>'L', -2433=>'NSM', -2434=>'L', -2435=>'L', -2437=>'L', -2438=>'L', -2439=>'L', -2440=>'L', -2441=>'L', -2442=>'L', -2443=>'L', -2444=>'L', -2447=>'L', -2448=>'L', -2451=>'L', -2452=>'L', -2453=>'L', -2454=>'L', -2455=>'L', -2456=>'L', -2457=>'L', -2458=>'L', -2459=>'L', -2460=>'L', -2461=>'L', -2462=>'L', -2463=>'L', -2464=>'L', -2465=>'L', -2466=>'L', -2467=>'L', -2468=>'L', -2469=>'L', -2470=>'L', -2471=>'L', -2472=>'L', -2474=>'L', -2475=>'L', -2476=>'L', -2477=>'L', -2478=>'L', -2479=>'L', -2480=>'L', -2482=>'L', -2486=>'L', -2487=>'L', -2488=>'L', -2489=>'L', -2492=>'NSM', -2493=>'L', -2494=>'L', -2495=>'L', -2496=>'L', -2497=>'NSM', -2498=>'NSM', -2499=>'NSM', -2500=>'NSM', -2503=>'L', -2504=>'L', -2507=>'L', -2508=>'L', -2509=>'NSM', -2510=>'L', -2519=>'L', -2524=>'L', -2525=>'L', -2527=>'L', -2528=>'L', -2529=>'L', -2530=>'NSM', -2531=>'NSM', -2534=>'L', -2535=>'L', -2536=>'L', -2537=>'L', -2538=>'L', -2539=>'L', -2540=>'L', -2541=>'L', -2542=>'L', -2543=>'L', -2544=>'L', -2545=>'L', -2546=>'ET', -2547=>'ET', -2548=>'L', -2549=>'L', -2550=>'L', -2551=>'L', -2552=>'L', -2553=>'L', -2554=>'L', -2561=>'NSM', -2562=>'NSM', -2563=>'L', -2565=>'L', -2566=>'L', -2567=>'L', -2568=>'L', -2569=>'L', -2570=>'L', -2575=>'L', -2576=>'L', -2579=>'L', -2580=>'L', -2581=>'L', -2582=>'L', -2583=>'L', -2584=>'L', -2585=>'L', -2586=>'L', -2587=>'L', -2588=>'L', -2589=>'L', -2590=>'L', -2591=>'L', -2592=>'L', -2593=>'L', -2594=>'L', -2595=>'L', -2596=>'L', -2597=>'L', -2598=>'L', -2599=>'L', -2600=>'L', -2602=>'L', -2603=>'L', -2604=>'L', -2605=>'L', -2606=>'L', -2607=>'L', -2608=>'L', -2610=>'L', -2611=>'L', -2613=>'L', -2614=>'L', -2616=>'L', -2617=>'L', -2620=>'NSM', -2622=>'L', -2623=>'L', -2624=>'L', -2625=>'NSM', -2626=>'NSM', -2631=>'NSM', -2632=>'NSM', -2635=>'NSM', -2636=>'NSM', -2637=>'NSM', -2649=>'L', -2650=>'L', -2651=>'L', -2652=>'L', -2654=>'L', -2662=>'L', -2663=>'L', -2664=>'L', -2665=>'L', -2666=>'L', -2667=>'L', -2668=>'L', -2669=>'L', -2670=>'L', -2671=>'L', -2672=>'NSM', -2673=>'NSM', -2674=>'L', -2675=>'L', -2676=>'L', -2689=>'NSM', -2690=>'NSM', -2691=>'L', -2693=>'L', -2694=>'L', -2695=>'L', -2696=>'L', -2697=>'L', -2698=>'L', -2699=>'L', -2700=>'L', -2701=>'L', -2703=>'L', -2704=>'L', -2705=>'L', -2707=>'L', -2708=>'L', -2709=>'L', -2710=>'L', -2711=>'L', -2712=>'L', -2713=>'L', -2714=>'L', -2715=>'L', -2716=>'L', -2717=>'L', -2718=>'L', -2719=>'L', -2720=>'L', -2721=>'L', -2722=>'L', -2723=>'L', -2724=>'L', -2725=>'L', -2726=>'L', -2727=>'L', -2728=>'L', -2730=>'L', -2731=>'L', -2732=>'L', -2733=>'L', -2734=>'L', -2735=>'L', -2736=>'L', -2738=>'L', -2739=>'L', -2741=>'L', -2742=>'L', -2743=>'L', -2744=>'L', -2745=>'L', -2748=>'NSM', -2749=>'L', -2750=>'L', -2751=>'L', -2752=>'L', -2753=>'NSM', -2754=>'NSM', -2755=>'NSM', -2756=>'NSM', -2757=>'NSM', -2759=>'NSM', -2760=>'NSM', -2761=>'L', -2763=>'L', -2764=>'L', -2765=>'NSM', -2768=>'L', -2784=>'L', -2785=>'L', -2786=>'NSM', -2787=>'NSM', -2790=>'L', -2791=>'L', -2792=>'L', -2793=>'L', -2794=>'L', -2795=>'L', -2796=>'L', -2797=>'L', -2798=>'L', -2799=>'L', -2801=>'ET', -2817=>'NSM', -2818=>'L', -2819=>'L', -2821=>'L', -2822=>'L', -2823=>'L', -2824=>'L', -2825=>'L', -2826=>'L', -2827=>'L', -2828=>'L', -2831=>'L', -2832=>'L', -2835=>'L', -2836=>'L', -2837=>'L', -2838=>'L', -2839=>'L', -2840=>'L', -2841=>'L', -2842=>'L', -2843=>'L', -2844=>'L', -2845=>'L', -2846=>'L', -2847=>'L', -2848=>'L', -2849=>'L', -2850=>'L', -2851=>'L', -2852=>'L', -2853=>'L', -2854=>'L', -2855=>'L', -2856=>'L', -2858=>'L', -2859=>'L', -2860=>'L', -2861=>'L', -2862=>'L', -2863=>'L', -2864=>'L', -2866=>'L', -2867=>'L', -2869=>'L', -2870=>'L', -2871=>'L', -2872=>'L', -2873=>'L', -2876=>'NSM', -2877=>'L', -2878=>'L', -2879=>'NSM', -2880=>'L', -2881=>'NSM', -2882=>'NSM', -2883=>'NSM', -2887=>'L', -2888=>'L', -2891=>'L', -2892=>'L', -2893=>'NSM', -2902=>'NSM', -2903=>'L', -2908=>'L', -2909=>'L', -2911=>'L', -2912=>'L', -2913=>'L', -2918=>'L', -2919=>'L', -2920=>'L', -2921=>'L', -2922=>'L', -2923=>'L', -2924=>'L', -2925=>'L', -2926=>'L', -2927=>'L', -2928=>'L', -2929=>'L', -2946=>'NSM', -2947=>'L', -2949=>'L', -2950=>'L', -2951=>'L', -2952=>'L', -2953=>'L', -2954=>'L', -2958=>'L', -2959=>'L', -2960=>'L', -2962=>'L', -2963=>'L', -2964=>'L', -2965=>'L', -2969=>'L', -2970=>'L', -2972=>'L', -2974=>'L', -2975=>'L', -2979=>'L', -2980=>'L', -2984=>'L', -2985=>'L', -2986=>'L', -2990=>'L', -2991=>'L', -2992=>'L', -2993=>'L', -2994=>'L', -2995=>'L', -2996=>'L', -2997=>'L', -2998=>'L', -2999=>'L', -3000=>'L', -3001=>'L', -3006=>'L', -3007=>'L', -3008=>'NSM', -3009=>'L', -3010=>'L', -3014=>'L', -3015=>'L', -3016=>'L', -3018=>'L', -3019=>'L', -3020=>'L', -3021=>'NSM', -3031=>'L', -3046=>'L', -3047=>'L', -3048=>'L', -3049=>'L', -3050=>'L', -3051=>'L', -3052=>'L', -3053=>'L', -3054=>'L', -3055=>'L', -3056=>'L', -3057=>'L', -3058=>'L', -3059=>'ON', -3060=>'ON', -3061=>'ON', -3062=>'ON', -3063=>'ON', -3064=>'ON', -3065=>'ET', -3066=>'ON', -3073=>'L', -3074=>'L', -3075=>'L', -3077=>'L', -3078=>'L', -3079=>'L', -3080=>'L', -3081=>'L', -3082=>'L', -3083=>'L', -3084=>'L', -3086=>'L', -3087=>'L', -3088=>'L', -3090=>'L', -3091=>'L', -3092=>'L', -3093=>'L', -3094=>'L', -3095=>'L', -3096=>'L', -3097=>'L', -3098=>'L', -3099=>'L', -3100=>'L', -3101=>'L', -3102=>'L', -3103=>'L', -3104=>'L', -3105=>'L', -3106=>'L', -3107=>'L', -3108=>'L', -3109=>'L', -3110=>'L', -3111=>'L', -3112=>'L', -3114=>'L', -3115=>'L', -3116=>'L', -3117=>'L', -3118=>'L', -3119=>'L', -3120=>'L', -3121=>'L', -3122=>'L', -3123=>'L', -3125=>'L', -3126=>'L', -3127=>'L', -3128=>'L', -3129=>'L', -3134=>'NSM', -3135=>'NSM', -3136=>'NSM', -3137=>'L', -3138=>'L', -3139=>'L', -3140=>'L', -3142=>'NSM', -3143=>'NSM', -3144=>'NSM', -3146=>'NSM', -3147=>'NSM', -3148=>'NSM', -3149=>'NSM', -3157=>'NSM', -3158=>'NSM', -3168=>'L', -3169=>'L', -3174=>'L', -3175=>'L', -3176=>'L', -3177=>'L', -3178=>'L', -3179=>'L', -3180=>'L', -3181=>'L', -3182=>'L', -3183=>'L', -3202=>'L', -3203=>'L', -3205=>'L', -3206=>'L', -3207=>'L', -3208=>'L', -3209=>'L', -3210=>'L', -3211=>'L', -3212=>'L', -3214=>'L', -3215=>'L', -3216=>'L', -3218=>'L', -3219=>'L', -3220=>'L', -3221=>'L', -3222=>'L', -3223=>'L', -3224=>'L', -3225=>'L', -3226=>'L', -3227=>'L', -3228=>'L', -3229=>'L', -3230=>'L', -3231=>'L', -3232=>'L', -3233=>'L', -3234=>'L', -3235=>'L', -3236=>'L', -3237=>'L', -3238=>'L', -3239=>'L', -3240=>'L', -3242=>'L', -3243=>'L', -3244=>'L', -3245=>'L', -3246=>'L', -3247=>'L', -3248=>'L', -3249=>'L', -3250=>'L', -3251=>'L', -3253=>'L', -3254=>'L', -3255=>'L', -3256=>'L', -3257=>'L', -3260=>'NSM', -3261=>'L', -3262=>'L', -3263=>'L', -3264=>'L', -3265=>'L', -3266=>'L', -3267=>'L', -3268=>'L', -3270=>'L', -3271=>'L', -3272=>'L', -3274=>'L', -3275=>'L', -3276=>'NSM', -3277=>'NSM', -3285=>'L', -3286=>'L', -3294=>'L', -3296=>'L', -3297=>'L', -3298=>'NSM', -3299=>'NSM', -3302=>'L', -3303=>'L', -3304=>'L', -3305=>'L', -3306=>'L', -3307=>'L', -3308=>'L', -3309=>'L', -3310=>'L', -3311=>'L', -3313=>'ON', -3314=>'ON', -3330=>'L', -3331=>'L', -3333=>'L', -3334=>'L', -3335=>'L', -3336=>'L', -3337=>'L', -3338=>'L', -3339=>'L', -3340=>'L', -3342=>'L', -3343=>'L', -3344=>'L', -3346=>'L', -3347=>'L', -3348=>'L', -3349=>'L', -3350=>'L', -3351=>'L', -3352=>'L', -3353=>'L', -3354=>'L', -3355=>'L', -3356=>'L', -3357=>'L', -3358=>'L', -3359=>'L', -3360=>'L', -3361=>'L', -3362=>'L', -3363=>'L', -3364=>'L', -3365=>'L', -3366=>'L', -3367=>'L', -3368=>'L', -3370=>'L', -3371=>'L', -3372=>'L', -3373=>'L', -3374=>'L', -3375=>'L', -3376=>'L', -3377=>'L', -3378=>'L', -3379=>'L', -3380=>'L', -3381=>'L', -3382=>'L', -3383=>'L', -3384=>'L', -3385=>'L', -3390=>'L', -3391=>'L', -3392=>'L', -3393=>'NSM', -3394=>'NSM', -3395=>'NSM', -3398=>'L', -3399=>'L', -3400=>'L', -3402=>'L', -3403=>'L', -3404=>'L', -3405=>'NSM', -3415=>'L', -3424=>'L', -3425=>'L', -3430=>'L', -3431=>'L', -3432=>'L', -3433=>'L', -3434=>'L', -3435=>'L', -3436=>'L', -3437=>'L', -3438=>'L', -3439=>'L', -3458=>'L', -3459=>'L', -3461=>'L', -3462=>'L', -3463=>'L', -3464=>'L', -3465=>'L', -3466=>'L', -3467=>'L', -3468=>'L', -3469=>'L', -3470=>'L', -3471=>'L', -3472=>'L', -3473=>'L', -3474=>'L', -3475=>'L', -3476=>'L', -3477=>'L', -3478=>'L', -3482=>'L', -3483=>'L', -3484=>'L', -3485=>'L', -3486=>'L', -3487=>'L', -3488=>'L', -3489=>'L', -3490=>'L', -3491=>'L', -3492=>'L', -3493=>'L', -3494=>'L', -3495=>'L', -3496=>'L', -3497=>'L', -3498=>'L', -3499=>'L', -3500=>'L', -3501=>'L', -3502=>'L', -3503=>'L', -3504=>'L', -3505=>'L', -3507=>'L', -3508=>'L', -3509=>'L', -3510=>'L', -3511=>'L', -3512=>'L', -3513=>'L', -3514=>'L', -3515=>'L', -3517=>'L', -3520=>'L', -3521=>'L', -3522=>'L', -3523=>'L', -3524=>'L', -3525=>'L', -3526=>'L', -3530=>'NSM', -3535=>'L', -3536=>'L', -3537=>'L', -3538=>'NSM', -3539=>'NSM', -3540=>'NSM', -3542=>'NSM', -3544=>'L', -3545=>'L', -3546=>'L', -3547=>'L', -3548=>'L', -3549=>'L', -3550=>'L', -3551=>'L', -3570=>'L', -3571=>'L', -3572=>'L', -3585=>'L', -3586=>'L', -3587=>'L', -3588=>'L', -3589=>'L', -3590=>'L', -3591=>'L', -3592=>'L', -3593=>'L', -3594=>'L', -3595=>'L', -3596=>'L', -3597=>'L', -3598=>'L', -3599=>'L', -3600=>'L', -3601=>'L', -3602=>'L', -3603=>'L', -3604=>'L', -3605=>'L', -3606=>'L', -3607=>'L', -3608=>'L', -3609=>'L', -3610=>'L', -3611=>'L', -3612=>'L', -3613=>'L', -3614=>'L', -3615=>'L', -3616=>'L', -3617=>'L', -3618=>'L', -3619=>'L', -3620=>'L', -3621=>'L', -3622=>'L', -3623=>'L', -3624=>'L', -3625=>'L', -3626=>'L', -3627=>'L', -3628=>'L', -3629=>'L', -3630=>'L', -3631=>'L', -3632=>'L', -3633=>'NSM', -3634=>'L', -3635=>'L', -3636=>'NSM', -3637=>'NSM', -3638=>'NSM', -3639=>'NSM', -3640=>'NSM', -3641=>'NSM', -3642=>'NSM', -3647=>'ET', -3648=>'L', -3649=>'L', -3650=>'L', -3651=>'L', -3652=>'L', -3653=>'L', -3654=>'L', -3655=>'NSM', -3656=>'NSM', -3657=>'NSM', -3658=>'NSM', -3659=>'NSM', -3660=>'NSM', -3661=>'NSM', -3662=>'NSM', -3663=>'L', -3664=>'L', -3665=>'L', -3666=>'L', -3667=>'L', -3668=>'L', -3669=>'L', -3670=>'L', -3671=>'L', -3672=>'L', -3673=>'L', -3674=>'L', -3675=>'L', -3713=>'L', -3714=>'L', -3716=>'L', -3719=>'L', -3720=>'L', -3722=>'L', -3725=>'L', -3732=>'L', -3733=>'L', -3734=>'L', -3735=>'L', -3737=>'L', -3738=>'L', -3739=>'L', -3740=>'L', -3741=>'L', -3742=>'L', -3743=>'L', -3745=>'L', -3746=>'L', -3747=>'L', -3749=>'L', -3751=>'L', -3754=>'L', -3755=>'L', -3757=>'L', -3758=>'L', -3759=>'L', -3760=>'L', -3761=>'NSM', -3762=>'L', -3763=>'L', -3764=>'NSM', -3765=>'NSM', -3766=>'NSM', -3767=>'NSM', -3768=>'NSM', -3769=>'NSM', -3771=>'NSM', -3772=>'NSM', -3773=>'L', -3776=>'L', -3777=>'L', -3778=>'L', -3779=>'L', -3780=>'L', -3782=>'L', -3784=>'NSM', -3785=>'NSM', -3786=>'NSM', -3787=>'NSM', -3788=>'NSM', -3789=>'NSM', -3792=>'L', -3793=>'L', -3794=>'L', -3795=>'L', -3796=>'L', -3797=>'L', -3798=>'L', -3799=>'L', -3800=>'L', -3801=>'L', -3804=>'L', -3805=>'L', -3840=>'L', -3841=>'L', -3842=>'L', -3843=>'L', -3844=>'L', -3845=>'L', -3846=>'L', -3847=>'L', -3848=>'L', -3849=>'L', -3850=>'L', -3851=>'L', -3852=>'L', -3853=>'L', -3854=>'L', -3855=>'L', -3856=>'L', -3857=>'L', -3858=>'L', -3859=>'L', -3860=>'L', -3861=>'L', -3862=>'L', -3863=>'L', -3864=>'NSM', -3865=>'NSM', -3866=>'L', -3867=>'L', -3868=>'L', -3869=>'L', -3870=>'L', -3871=>'L', -3872=>'L', -3873=>'L', -3874=>'L', -3875=>'L', -3876=>'L', -3877=>'L', -3878=>'L', -3879=>'L', -3880=>'L', -3881=>'L', -3882=>'L', -3883=>'L', -3884=>'L', -3885=>'L', -3886=>'L', -3887=>'L', -3888=>'L', -3889=>'L', -3890=>'L', -3891=>'L', -3892=>'L', -3893=>'NSM', -3894=>'L', -3895=>'NSM', -3896=>'L', -3897=>'NSM', -3898=>'ON', -3899=>'ON', -3900=>'ON', -3901=>'ON', -3902=>'L', -3903=>'L', -3904=>'L', -3905=>'L', -3906=>'L', -3907=>'L', -3908=>'L', -3909=>'L', -3910=>'L', -3911=>'L', -3913=>'L', -3914=>'L', -3915=>'L', -3916=>'L', -3917=>'L', -3918=>'L', -3919=>'L', -3920=>'L', -3921=>'L', -3922=>'L', -3923=>'L', -3924=>'L', -3925=>'L', -3926=>'L', -3927=>'L', -3928=>'L', -3929=>'L', -3930=>'L', -3931=>'L', -3932=>'L', -3933=>'L', -3934=>'L', -3935=>'L', -3936=>'L', -3937=>'L', -3938=>'L', -3939=>'L', -3940=>'L', -3941=>'L', -3942=>'L', -3943=>'L', -3944=>'L', -3945=>'L', -3946=>'L', -3953=>'NSM', -3954=>'NSM', -3955=>'NSM', -3956=>'NSM', -3957=>'NSM', -3958=>'NSM', -3959=>'NSM', -3960=>'NSM', -3961=>'NSM', -3962=>'NSM', -3963=>'NSM', -3964=>'NSM', -3965=>'NSM', -3966=>'NSM', -3967=>'L', -3968=>'NSM', -3969=>'NSM', -3970=>'NSM', -3971=>'NSM', -3972=>'NSM', -3973=>'L', -3974=>'NSM', -3975=>'NSM', -3976=>'L', -3977=>'L', -3978=>'L', -3979=>'L', -3984=>'NSM', -3985=>'NSM', -3986=>'NSM', -3987=>'NSM', -3988=>'NSM', -3989=>'NSM', -3990=>'NSM', -3991=>'NSM', -3993=>'NSM', -3994=>'NSM', -3995=>'NSM', -3996=>'NSM', -3997=>'NSM', -3998=>'NSM', -3999=>'NSM', -4000=>'NSM', -4001=>'NSM', -4002=>'NSM', -4003=>'NSM', -4004=>'NSM', -4005=>'NSM', -4006=>'NSM', -4007=>'NSM', -4008=>'NSM', -4009=>'NSM', -4010=>'NSM', -4011=>'NSM', -4012=>'NSM', -4013=>'NSM', -4014=>'NSM', -4015=>'NSM', -4016=>'NSM', -4017=>'NSM', -4018=>'NSM', -4019=>'NSM', -4020=>'NSM', -4021=>'NSM', -4022=>'NSM', -4023=>'NSM', -4024=>'NSM', -4025=>'NSM', -4026=>'NSM', -4027=>'NSM', -4028=>'NSM', -4030=>'L', -4031=>'L', -4032=>'L', -4033=>'L', -4034=>'L', -4035=>'L', -4036=>'L', -4037=>'L', -4038=>'NSM', -4039=>'L', -4040=>'L', -4041=>'L', -4042=>'L', -4043=>'L', -4044=>'L', -4047=>'L', -4048=>'L', -4049=>'L', -4096=>'L', -4097=>'L', -4098=>'L', -4099=>'L', -4100=>'L', -4101=>'L', -4102=>'L', -4103=>'L', -4104=>'L', -4105=>'L', -4106=>'L', -4107=>'L', -4108=>'L', -4109=>'L', -4110=>'L', -4111=>'L', -4112=>'L', -4113=>'L', -4114=>'L', -4115=>'L', -4116=>'L', -4117=>'L', -4118=>'L', -4119=>'L', -4120=>'L', -4121=>'L', -4122=>'L', -4123=>'L', -4124=>'L', -4125=>'L', -4126=>'L', -4127=>'L', -4128=>'L', -4129=>'L', -4131=>'L', -4132=>'L', -4133=>'L', -4134=>'L', -4135=>'L', -4137=>'L', -4138=>'L', -4140=>'L', -4141=>'NSM', -4142=>'NSM', -4143=>'NSM', -4144=>'NSM', -4145=>'L', -4146=>'NSM', -4150=>'NSM', -4151=>'NSM', -4152=>'L', -4153=>'NSM', -4160=>'L', -4161=>'L', -4162=>'L', -4163=>'L', -4164=>'L', -4165=>'L', -4166=>'L', -4167=>'L', -4168=>'L', -4169=>'L', -4170=>'L', -4171=>'L', -4172=>'L', -4173=>'L', -4174=>'L', -4175=>'L', -4176=>'L', -4177=>'L', -4178=>'L', -4179=>'L', -4180=>'L', -4181=>'L', -4182=>'L', -4183=>'L', -4184=>'NSM', -4185=>'NSM', -4256=>'L', -4257=>'L', -4258=>'L', -4259=>'L', -4260=>'L', -4261=>'L', -4262=>'L', -4263=>'L', -4264=>'L', -4265=>'L', -4266=>'L', -4267=>'L', -4268=>'L', -4269=>'L', -4270=>'L', -4271=>'L', -4272=>'L', -4273=>'L', -4274=>'L', -4275=>'L', -4276=>'L', -4277=>'L', -4278=>'L', -4279=>'L', -4280=>'L', -4281=>'L', -4282=>'L', -4283=>'L', -4284=>'L', -4285=>'L', -4286=>'L', -4287=>'L', -4288=>'L', -4289=>'L', -4290=>'L', -4291=>'L', -4292=>'L', -4293=>'L', -4304=>'L', -4305=>'L', -4306=>'L', -4307=>'L', -4308=>'L', -4309=>'L', -4310=>'L', -4311=>'L', -4312=>'L', -4313=>'L', -4314=>'L', -4315=>'L', -4316=>'L', -4317=>'L', -4318=>'L', -4319=>'L', -4320=>'L', -4321=>'L', -4322=>'L', -4323=>'L', -4324=>'L', -4325=>'L', -4326=>'L', -4327=>'L', -4328=>'L', -4329=>'L', -4330=>'L', -4331=>'L', -4332=>'L', -4333=>'L', -4334=>'L', -4335=>'L', -4336=>'L', -4337=>'L', -4338=>'L', -4339=>'L', -4340=>'L', -4341=>'L', -4342=>'L', -4343=>'L', -4344=>'L', -4345=>'L', -4346=>'L', -4347=>'L', -4348=>'L', -4352=>'L', -4353=>'L', -4354=>'L', -4355=>'L', -4356=>'L', -4357=>'L', -4358=>'L', -4359=>'L', -4360=>'L', -4361=>'L', -4362=>'L', -4363=>'L', -4364=>'L', -4365=>'L', -4366=>'L', -4367=>'L', -4368=>'L', -4369=>'L', -4370=>'L', -4371=>'L', -4372=>'L', -4373=>'L', -4374=>'L', -4375=>'L', -4376=>'L', -4377=>'L', -4378=>'L', -4379=>'L', -4380=>'L', -4381=>'L', -4382=>'L', -4383=>'L', -4384=>'L', -4385=>'L', -4386=>'L', -4387=>'L', -4388=>'L', -4389=>'L', -4390=>'L', -4391=>'L', -4392=>'L', -4393=>'L', -4394=>'L', -4395=>'L', -4396=>'L', -4397=>'L', -4398=>'L', -4399=>'L', -4400=>'L', -4401=>'L', -4402=>'L', -4403=>'L', -4404=>'L', -4405=>'L', -4406=>'L', -4407=>'L', -4408=>'L', -4409=>'L', -4410=>'L', -4411=>'L', -4412=>'L', -4413=>'L', -4414=>'L', -4415=>'L', -4416=>'L', -4417=>'L', -4418=>'L', -4419=>'L', -4420=>'L', -4421=>'L', -4422=>'L', -4423=>'L', -4424=>'L', -4425=>'L', -4426=>'L', -4427=>'L', -4428=>'L', -4429=>'L', -4430=>'L', -4431=>'L', -4432=>'L', -4433=>'L', -4434=>'L', -4435=>'L', -4436=>'L', -4437=>'L', -4438=>'L', -4439=>'L', -4440=>'L', -4441=>'L', -4447=>'L', -4448=>'L', -4449=>'L', -4450=>'L', -4451=>'L', -4452=>'L', -4453=>'L', -4454=>'L', -4455=>'L', -4456=>'L', -4457=>'L', -4458=>'L', -4459=>'L', -4460=>'L', -4461=>'L', -4462=>'L', -4463=>'L', -4464=>'L', -4465=>'L', -4466=>'L', -4467=>'L', -4468=>'L', -4469=>'L', -4470=>'L', -4471=>'L', -4472=>'L', -4473=>'L', -4474=>'L', -4475=>'L', -4476=>'L', -4477=>'L', -4478=>'L', -4479=>'L', -4480=>'L', -4481=>'L', -4482=>'L', -4483=>'L', -4484=>'L', -4485=>'L', -4486=>'L', -4487=>'L', -4488=>'L', -4489=>'L', -4490=>'L', -4491=>'L', -4492=>'L', -4493=>'L', -4494=>'L', -4495=>'L', -4496=>'L', -4497=>'L', -4498=>'L', -4499=>'L', -4500=>'L', -4501=>'L', -4502=>'L', -4503=>'L', -4504=>'L', -4505=>'L', -4506=>'L', -4507=>'L', -4508=>'L', -4509=>'L', -4510=>'L', -4511=>'L', -4512=>'L', -4513=>'L', -4514=>'L', -4520=>'L', -4521=>'L', -4522=>'L', -4523=>'L', -4524=>'L', -4525=>'L', -4526=>'L', -4527=>'L', -4528=>'L', -4529=>'L', -4530=>'L', -4531=>'L', -4532=>'L', -4533=>'L', -4534=>'L', -4535=>'L', -4536=>'L', -4537=>'L', -4538=>'L', -4539=>'L', -4540=>'L', -4541=>'L', -4542=>'L', -4543=>'L', -4544=>'L', -4545=>'L', -4546=>'L', -4547=>'L', -4548=>'L', -4549=>'L', -4550=>'L', -4551=>'L', -4552=>'L', -4553=>'L', -4554=>'L', -4555=>'L', -4556=>'L', -4557=>'L', -4558=>'L', -4559=>'L', -4560=>'L', -4561=>'L', -4562=>'L', -4563=>'L', -4564=>'L', -4565=>'L', -4566=>'L', -4567=>'L', -4568=>'L', -4569=>'L', -4570=>'L', -4571=>'L', -4572=>'L', -4573=>'L', -4574=>'L', -4575=>'L', -4576=>'L', -4577=>'L', -4578=>'L', -4579=>'L', -4580=>'L', -4581=>'L', -4582=>'L', -4583=>'L', -4584=>'L', -4585=>'L', -4586=>'L', -4587=>'L', -4588=>'L', -4589=>'L', -4590=>'L', -4591=>'L', -4592=>'L', -4593=>'L', -4594=>'L', -4595=>'L', -4596=>'L', -4597=>'L', -4598=>'L', -4599=>'L', -4600=>'L', -4601=>'L', -4608=>'L', -4609=>'L', -4610=>'L', -4611=>'L', -4612=>'L', -4613=>'L', -4614=>'L', -4615=>'L', -4616=>'L', -4617=>'L', -4618=>'L', -4619=>'L', -4620=>'L', -4621=>'L', -4622=>'L', -4623=>'L', -4624=>'L', -4625=>'L', -4626=>'L', -4627=>'L', -4628=>'L', -4629=>'L', -4630=>'L', -4631=>'L', -4632=>'L', -4633=>'L', -4634=>'L', -4635=>'L', -4636=>'L', -4637=>'L', -4638=>'L', -4639=>'L', -4640=>'L', -4641=>'L', -4642=>'L', -4643=>'L', -4644=>'L', -4645=>'L', -4646=>'L', -4647=>'L', -4648=>'L', -4649=>'L', -4650=>'L', -4651=>'L', -4652=>'L', -4653=>'L', -4654=>'L', -4655=>'L', -4656=>'L', -4657=>'L', -4658=>'L', -4659=>'L', -4660=>'L', -4661=>'L', -4662=>'L', -4663=>'L', -4664=>'L', -4665=>'L', -4666=>'L', -4667=>'L', -4668=>'L', -4669=>'L', -4670=>'L', -4671=>'L', -4672=>'L', -4673=>'L', -4674=>'L', -4675=>'L', -4676=>'L', -4677=>'L', -4678=>'L', -4679=>'L', -4680=>'L', -4682=>'L', -4683=>'L', -4684=>'L', -4685=>'L', -4688=>'L', -4689=>'L', -4690=>'L', -4691=>'L', -4692=>'L', -4693=>'L', -4694=>'L', -4696=>'L', -4698=>'L', -4699=>'L', -4700=>'L', -4701=>'L', -4704=>'L', -4705=>'L', -4706=>'L', -4707=>'L', -4708=>'L', -4709=>'L', -4710=>'L', -4711=>'L', -4712=>'L', -4713=>'L', -4714=>'L', -4715=>'L', -4716=>'L', -4717=>'L', -4718=>'L', -4719=>'L', -4720=>'L', -4721=>'L', -4722=>'L', -4723=>'L', -4724=>'L', -4725=>'L', -4726=>'L', -4727=>'L', -4728=>'L', -4729=>'L', -4730=>'L', -4731=>'L', -4732=>'L', -4733=>'L', -4734=>'L', -4735=>'L', -4736=>'L', -4737=>'L', -4738=>'L', -4739=>'L', -4740=>'L', -4741=>'L', -4742=>'L', -4743=>'L', -4744=>'L', -4746=>'L', -4747=>'L', -4748=>'L', -4749=>'L', -4752=>'L', -4753=>'L', -4754=>'L', -4755=>'L', -4756=>'L', -4757=>'L', -4758=>'L', -4759=>'L', -4760=>'L', -4761=>'L', -4762=>'L', -4763=>'L', -4764=>'L', -4765=>'L', -4766=>'L', -4767=>'L', -4768=>'L', -4769=>'L', -4770=>'L', -4771=>'L', -4772=>'L', -4773=>'L', -4774=>'L', -4775=>'L', -4776=>'L', -4777=>'L', -4778=>'L', -4779=>'L', -4780=>'L', -4781=>'L', -4782=>'L', -4783=>'L', -4784=>'L', -4786=>'L', -4787=>'L', -4788=>'L', -4789=>'L', -4792=>'L', -4793=>'L', -4794=>'L', -4795=>'L', -4796=>'L', -4797=>'L', -4798=>'L', -4800=>'L', -4802=>'L', -4803=>'L', -4804=>'L', -4805=>'L', -4808=>'L', -4809=>'L', -4810=>'L', -4811=>'L', -4812=>'L', -4813=>'L', -4814=>'L', -4815=>'L', -4816=>'L', -4817=>'L', -4818=>'L', -4819=>'L', -4820=>'L', -4821=>'L', -4822=>'L', -4824=>'L', -4825=>'L', -4826=>'L', -4827=>'L', -4828=>'L', -4829=>'L', -4830=>'L', -4831=>'L', -4832=>'L', -4833=>'L', -4834=>'L', -4835=>'L', -4836=>'L', -4837=>'L', -4838=>'L', -4839=>'L', -4840=>'L', -4841=>'L', -4842=>'L', -4843=>'L', -4844=>'L', -4845=>'L', -4846=>'L', -4847=>'L', -4848=>'L', -4849=>'L', -4850=>'L', -4851=>'L', -4852=>'L', -4853=>'L', -4854=>'L', -4855=>'L', -4856=>'L', -4857=>'L', -4858=>'L', -4859=>'L', -4860=>'L', -4861=>'L', -4862=>'L', -4863=>'L', -4864=>'L', -4865=>'L', -4866=>'L', -4867=>'L', -4868=>'L', -4869=>'L', -4870=>'L', -4871=>'L', -4872=>'L', -4873=>'L', -4874=>'L', -4875=>'L', -4876=>'L', -4877=>'L', -4878=>'L', -4879=>'L', -4880=>'L', -4882=>'L', -4883=>'L', -4884=>'L', -4885=>'L', -4888=>'L', -4889=>'L', -4890=>'L', -4891=>'L', -4892=>'L', -4893=>'L', -4894=>'L', -4895=>'L', -4896=>'L', -4897=>'L', -4898=>'L', -4899=>'L', -4900=>'L', -4901=>'L', -4902=>'L', -4903=>'L', -4904=>'L', -4905=>'L', -4906=>'L', -4907=>'L', -4908=>'L', -4909=>'L', -4910=>'L', -4911=>'L', -4912=>'L', -4913=>'L', -4914=>'L', -4915=>'L', -4916=>'L', -4917=>'L', -4918=>'L', -4919=>'L', -4920=>'L', -4921=>'L', -4922=>'L', -4923=>'L', -4924=>'L', -4925=>'L', -4926=>'L', -4927=>'L', -4928=>'L', -4929=>'L', -4930=>'L', -4931=>'L', -4932=>'L', -4933=>'L', -4934=>'L', -4935=>'L', -4936=>'L', -4937=>'L', -4938=>'L', -4939=>'L', -4940=>'L', -4941=>'L', -4942=>'L', -4943=>'L', -4944=>'L', -4945=>'L', -4946=>'L', -4947=>'L', -4948=>'L', -4949=>'L', -4950=>'L', -4951=>'L', -4952=>'L', -4953=>'L', -4954=>'L', -4959=>'NSM', -4960=>'L', -4961=>'L', -4962=>'L', -4963=>'L', -4964=>'L', -4965=>'L', -4966=>'L', -4967=>'L', -4968=>'L', -4969=>'L', -4970=>'L', -4971=>'L', -4972=>'L', -4973=>'L', -4974=>'L', -4975=>'L', -4976=>'L', -4977=>'L', -4978=>'L', -4979=>'L', -4980=>'L', -4981=>'L', -4982=>'L', -4983=>'L', -4984=>'L', -4985=>'L', -4986=>'L', -4987=>'L', -4988=>'L', -4992=>'L', -4993=>'L', -4994=>'L', -4995=>'L', -4996=>'L', -4997=>'L', -4998=>'L', -4999=>'L', -5000=>'L', -5001=>'L', -5002=>'L', -5003=>'L', -5004=>'L', -5005=>'L', -5006=>'L', -5007=>'L', -5008=>'ON', -5009=>'ON', -5010=>'ON', -5011=>'ON', -5012=>'ON', -5013=>'ON', -5014=>'ON', -5015=>'ON', -5016=>'ON', -5017=>'ON', -5024=>'L', -5025=>'L', -5026=>'L', -5027=>'L', -5028=>'L', -5029=>'L', -5030=>'L', -5031=>'L', -5032=>'L', -5033=>'L', -5034=>'L', -5035=>'L', -5036=>'L', -5037=>'L', -5038=>'L', -5039=>'L', -5040=>'L', -5041=>'L', -5042=>'L', -5043=>'L', -5044=>'L', -5045=>'L', -5046=>'L', -5047=>'L', -5048=>'L', -5049=>'L', -5050=>'L', -5051=>'L', -5052=>'L', -5053=>'L', -5054=>'L', -5055=>'L', -5056=>'L', -5057=>'L', -5058=>'L', -5059=>'L', -5060=>'L', -5061=>'L', -5062=>'L', -5063=>'L', -5064=>'L', -5065=>'L', -5066=>'L', -5067=>'L', -5068=>'L', -5069=>'L', -5070=>'L', -5071=>'L', -5072=>'L', -5073=>'L', -5074=>'L', -5075=>'L', -5076=>'L', -5077=>'L', -5078=>'L', -5079=>'L', -5080=>'L', -5081=>'L', -5082=>'L', -5083=>'L', -5084=>'L', -5085=>'L', -5086=>'L', -5087=>'L', -5088=>'L', -5089=>'L', -5090=>'L', -5091=>'L', -5092=>'L', -5093=>'L', -5094=>'L', -5095=>'L', -5096=>'L', -5097=>'L', -5098=>'L', -5099=>'L', -5100=>'L', -5101=>'L', -5102=>'L', -5103=>'L', -5104=>'L', -5105=>'L', -5106=>'L', -5107=>'L', -5108=>'L', -5121=>'L', -5122=>'L', -5123=>'L', -5124=>'L', -5125=>'L', -5126=>'L', -5127=>'L', -5128=>'L', -5129=>'L', -5130=>'L', -5131=>'L', -5132=>'L', -5133=>'L', -5134=>'L', -5135=>'L', -5136=>'L', -5137=>'L', -5138=>'L', -5139=>'L', -5140=>'L', -5141=>'L', -5142=>'L', -5143=>'L', -5144=>'L', -5145=>'L', -5146=>'L', -5147=>'L', -5148=>'L', -5149=>'L', -5150=>'L', -5151=>'L', -5152=>'L', -5153=>'L', -5154=>'L', -5155=>'L', -5156=>'L', -5157=>'L', -5158=>'L', -5159=>'L', -5160=>'L', -5161=>'L', -5162=>'L', -5163=>'L', -5164=>'L', -5165=>'L', -5166=>'L', -5167=>'L', -5168=>'L', -5169=>'L', -5170=>'L', -5171=>'L', -5172=>'L', -5173=>'L', -5174=>'L', -5175=>'L', -5176=>'L', -5177=>'L', -5178=>'L', -5179=>'L', -5180=>'L', -5181=>'L', -5182=>'L', -5183=>'L', -5184=>'L', -5185=>'L', -5186=>'L', -5187=>'L', -5188=>'L', -5189=>'L', -5190=>'L', -5191=>'L', -5192=>'L', -5193=>'L', -5194=>'L', -5195=>'L', -5196=>'L', -5197=>'L', -5198=>'L', -5199=>'L', -5200=>'L', -5201=>'L', -5202=>'L', -5203=>'L', -5204=>'L', -5205=>'L', -5206=>'L', -5207=>'L', -5208=>'L', -5209=>'L', -5210=>'L', -5211=>'L', -5212=>'L', -5213=>'L', -5214=>'L', -5215=>'L', -5216=>'L', -5217=>'L', -5218=>'L', -5219=>'L', -5220=>'L', -5221=>'L', -5222=>'L', -5223=>'L', -5224=>'L', -5225=>'L', -5226=>'L', -5227=>'L', -5228=>'L', -5229=>'L', -5230=>'L', -5231=>'L', -5232=>'L', -5233=>'L', -5234=>'L', -5235=>'L', -5236=>'L', -5237=>'L', -5238=>'L', -5239=>'L', -5240=>'L', -5241=>'L', -5242=>'L', -5243=>'L', -5244=>'L', -5245=>'L', -5246=>'L', -5247=>'L', -5248=>'L', -5249=>'L', -5250=>'L', -5251=>'L', -5252=>'L', -5253=>'L', -5254=>'L', -5255=>'L', -5256=>'L', -5257=>'L', -5258=>'L', -5259=>'L', -5260=>'L', -5261=>'L', -5262=>'L', -5263=>'L', -5264=>'L', -5265=>'L', -5266=>'L', -5267=>'L', -5268=>'L', -5269=>'L', -5270=>'L', -5271=>'L', -5272=>'L', -5273=>'L', -5274=>'L', -5275=>'L', -5276=>'L', -5277=>'L', -5278=>'L', -5279=>'L', -5280=>'L', -5281=>'L', -5282=>'L', -5283=>'L', -5284=>'L', -5285=>'L', -5286=>'L', -5287=>'L', -5288=>'L', -5289=>'L', -5290=>'L', -5291=>'L', -5292=>'L', -5293=>'L', -5294=>'L', -5295=>'L', -5296=>'L', -5297=>'L', -5298=>'L', -5299=>'L', -5300=>'L', -5301=>'L', -5302=>'L', -5303=>'L', -5304=>'L', -5305=>'L', -5306=>'L', -5307=>'L', -5308=>'L', -5309=>'L', -5310=>'L', -5311=>'L', -5312=>'L', -5313=>'L', -5314=>'L', -5315=>'L', -5316=>'L', -5317=>'L', -5318=>'L', -5319=>'L', -5320=>'L', -5321=>'L', -5322=>'L', -5323=>'L', -5324=>'L', -5325=>'L', -5326=>'L', -5327=>'L', -5328=>'L', -5329=>'L', -5330=>'L', -5331=>'L', -5332=>'L', -5333=>'L', -5334=>'L', -5335=>'L', -5336=>'L', -5337=>'L', -5338=>'L', -5339=>'L', -5340=>'L', -5341=>'L', -5342=>'L', -5343=>'L', -5344=>'L', -5345=>'L', -5346=>'L', -5347=>'L', -5348=>'L', -5349=>'L', -5350=>'L', -5351=>'L', -5352=>'L', -5353=>'L', -5354=>'L', -5355=>'L', -5356=>'L', -5357=>'L', -5358=>'L', -5359=>'L', -5360=>'L', -5361=>'L', -5362=>'L', -5363=>'L', -5364=>'L', -5365=>'L', -5366=>'L', -5367=>'L', -5368=>'L', -5369=>'L', -5370=>'L', -5371=>'L', -5372=>'L', -5373=>'L', -5374=>'L', -5375=>'L', -5376=>'L', -5377=>'L', -5378=>'L', -5379=>'L', -5380=>'L', -5381=>'L', -5382=>'L', -5383=>'L', -5384=>'L', -5385=>'L', -5386=>'L', -5387=>'L', -5388=>'L', -5389=>'L', -5390=>'L', -5391=>'L', -5392=>'L', -5393=>'L', -5394=>'L', -5395=>'L', -5396=>'L', -5397=>'L', -5398=>'L', -5399=>'L', -5400=>'L', -5401=>'L', -5402=>'L', -5403=>'L', -5404=>'L', -5405=>'L', -5406=>'L', -5407=>'L', -5408=>'L', -5409=>'L', -5410=>'L', -5411=>'L', -5412=>'L', -5413=>'L', -5414=>'L', -5415=>'L', -5416=>'L', -5417=>'L', -5418=>'L', -5419=>'L', -5420=>'L', -5421=>'L', -5422=>'L', -5423=>'L', -5424=>'L', -5425=>'L', -5426=>'L', -5427=>'L', -5428=>'L', -5429=>'L', -5430=>'L', -5431=>'L', -5432=>'L', -5433=>'L', -5434=>'L', -5435=>'L', -5436=>'L', -5437=>'L', -5438=>'L', -5439=>'L', -5440=>'L', -5441=>'L', -5442=>'L', -5443=>'L', -5444=>'L', -5445=>'L', -5446=>'L', -5447=>'L', -5448=>'L', -5449=>'L', -5450=>'L', -5451=>'L', -5452=>'L', -5453=>'L', -5454=>'L', -5455=>'L', -5456=>'L', -5457=>'L', -5458=>'L', -5459=>'L', -5460=>'L', -5461=>'L', -5462=>'L', -5463=>'L', -5464=>'L', -5465=>'L', -5466=>'L', -5467=>'L', -5468=>'L', -5469=>'L', -5470=>'L', -5471=>'L', -5472=>'L', -5473=>'L', -5474=>'L', -5475=>'L', -5476=>'L', -5477=>'L', -5478=>'L', -5479=>'L', -5480=>'L', -5481=>'L', -5482=>'L', -5483=>'L', -5484=>'L', -5485=>'L', -5486=>'L', -5487=>'L', -5488=>'L', -5489=>'L', -5490=>'L', -5491=>'L', -5492=>'L', -5493=>'L', -5494=>'L', -5495=>'L', -5496=>'L', -5497=>'L', -5498=>'L', -5499=>'L', -5500=>'L', -5501=>'L', -5502=>'L', -5503=>'L', -5504=>'L', -5505=>'L', -5506=>'L', -5507=>'L', -5508=>'L', -5509=>'L', -5510=>'L', -5511=>'L', -5512=>'L', -5513=>'L', -5514=>'L', -5515=>'L', -5516=>'L', -5517=>'L', -5518=>'L', -5519=>'L', -5520=>'L', -5521=>'L', -5522=>'L', -5523=>'L', -5524=>'L', -5525=>'L', -5526=>'L', -5527=>'L', -5528=>'L', -5529=>'L', -5530=>'L', -5531=>'L', -5532=>'L', -5533=>'L', -5534=>'L', -5535=>'L', -5536=>'L', -5537=>'L', -5538=>'L', -5539=>'L', -5540=>'L', -5541=>'L', -5542=>'L', -5543=>'L', -5544=>'L', -5545=>'L', -5546=>'L', -5547=>'L', -5548=>'L', -5549=>'L', -5550=>'L', -5551=>'L', -5552=>'L', -5553=>'L', -5554=>'L', -5555=>'L', -5556=>'L', -5557=>'L', -5558=>'L', -5559=>'L', -5560=>'L', -5561=>'L', -5562=>'L', -5563=>'L', -5564=>'L', -5565=>'L', -5566=>'L', -5567=>'L', -5568=>'L', -5569=>'L', -5570=>'L', -5571=>'L', -5572=>'L', -5573=>'L', -5574=>'L', -5575=>'L', -5576=>'L', -5577=>'L', -5578=>'L', -5579=>'L', -5580=>'L', -5581=>'L', -5582=>'L', -5583=>'L', -5584=>'L', -5585=>'L', -5586=>'L', -5587=>'L', -5588=>'L', -5589=>'L', -5590=>'L', -5591=>'L', -5592=>'L', -5593=>'L', -5594=>'L', -5595=>'L', -5596=>'L', -5597=>'L', -5598=>'L', -5599=>'L', -5600=>'L', -5601=>'L', -5602=>'L', -5603=>'L', -5604=>'L', -5605=>'L', -5606=>'L', -5607=>'L', -5608=>'L', -5609=>'L', -5610=>'L', -5611=>'L', -5612=>'L', -5613=>'L', -5614=>'L', -5615=>'L', -5616=>'L', -5617=>'L', -5618=>'L', -5619=>'L', -5620=>'L', -5621=>'L', -5622=>'L', -5623=>'L', -5624=>'L', -5625=>'L', -5626=>'L', -5627=>'L', -5628=>'L', -5629=>'L', -5630=>'L', -5631=>'L', -5632=>'L', -5633=>'L', -5634=>'L', -5635=>'L', -5636=>'L', -5637=>'L', -5638=>'L', -5639=>'L', -5640=>'L', -5641=>'L', -5642=>'L', -5643=>'L', -5644=>'L', -5645=>'L', -5646=>'L', -5647=>'L', -5648=>'L', -5649=>'L', -5650=>'L', -5651=>'L', -5652=>'L', -5653=>'L', -5654=>'L', -5655=>'L', -5656=>'L', -5657=>'L', -5658=>'L', -5659=>'L', -5660=>'L', -5661=>'L', -5662=>'L', -5663=>'L', -5664=>'L', -5665=>'L', -5666=>'L', -5667=>'L', -5668=>'L', -5669=>'L', -5670=>'L', -5671=>'L', -5672=>'L', -5673=>'L', -5674=>'L', -5675=>'L', -5676=>'L', -5677=>'L', -5678=>'L', -5679=>'L', -5680=>'L', -5681=>'L', -5682=>'L', -5683=>'L', -5684=>'L', -5685=>'L', -5686=>'L', -5687=>'L', -5688=>'L', -5689=>'L', -5690=>'L', -5691=>'L', -5692=>'L', -5693=>'L', -5694=>'L', -5695=>'L', -5696=>'L', -5697=>'L', -5698=>'L', -5699=>'L', -5700=>'L', -5701=>'L', -5702=>'L', -5703=>'L', -5704=>'L', -5705=>'L', -5706=>'L', -5707=>'L', -5708=>'L', -5709=>'L', -5710=>'L', -5711=>'L', -5712=>'L', -5713=>'L', -5714=>'L', -5715=>'L', -5716=>'L', -5717=>'L', -5718=>'L', -5719=>'L', -5720=>'L', -5721=>'L', -5722=>'L', -5723=>'L', -5724=>'L', -5725=>'L', -5726=>'L', -5727=>'L', -5728=>'L', -5729=>'L', -5730=>'L', -5731=>'L', -5732=>'L', -5733=>'L', -5734=>'L', -5735=>'L', -5736=>'L', -5737=>'L', -5738=>'L', -5739=>'L', -5740=>'L', -5741=>'L', -5742=>'L', -5743=>'L', -5744=>'L', -5745=>'L', -5746=>'L', -5747=>'L', -5748=>'L', -5749=>'L', -5750=>'L', -5760=>'WS', -5761=>'L', -5762=>'L', -5763=>'L', -5764=>'L', -5765=>'L', -5766=>'L', -5767=>'L', -5768=>'L', -5769=>'L', -5770=>'L', -5771=>'L', -5772=>'L', -5773=>'L', -5774=>'L', -5775=>'L', -5776=>'L', -5777=>'L', -5778=>'L', -5779=>'L', -5780=>'L', -5781=>'L', -5782=>'L', -5783=>'L', -5784=>'L', -5785=>'L', -5786=>'L', -5787=>'ON', -5788=>'ON', -5792=>'L', -5793=>'L', -5794=>'L', -5795=>'L', -5796=>'L', -5797=>'L', -5798=>'L', -5799=>'L', -5800=>'L', -5801=>'L', -5802=>'L', -5803=>'L', -5804=>'L', -5805=>'L', -5806=>'L', -5807=>'L', -5808=>'L', -5809=>'L', -5810=>'L', -5811=>'L', -5812=>'L', -5813=>'L', -5814=>'L', -5815=>'L', -5816=>'L', -5817=>'L', -5818=>'L', -5819=>'L', -5820=>'L', -5821=>'L', -5822=>'L', -5823=>'L', -5824=>'L', -5825=>'L', -5826=>'L', -5827=>'L', -5828=>'L', -5829=>'L', -5830=>'L', -5831=>'L', -5832=>'L', -5833=>'L', -5834=>'L', -5835=>'L', -5836=>'L', -5837=>'L', -5838=>'L', -5839=>'L', -5840=>'L', -5841=>'L', -5842=>'L', -5843=>'L', -5844=>'L', -5845=>'L', -5846=>'L', -5847=>'L', -5848=>'L', -5849=>'L', -5850=>'L', -5851=>'L', -5852=>'L', -5853=>'L', -5854=>'L', -5855=>'L', -5856=>'L', -5857=>'L', -5858=>'L', -5859=>'L', -5860=>'L', -5861=>'L', -5862=>'L', -5863=>'L', -5864=>'L', -5865=>'L', -5866=>'L', -5867=>'L', -5868=>'L', -5869=>'L', -5870=>'L', -5871=>'L', -5872=>'L', -5888=>'L', -5889=>'L', -5890=>'L', -5891=>'L', -5892=>'L', -5893=>'L', -5894=>'L', -5895=>'L', -5896=>'L', -5897=>'L', -5898=>'L', -5899=>'L', -5900=>'L', -5902=>'L', -5903=>'L', -5904=>'L', -5905=>'L', -5906=>'NSM', -5907=>'NSM', -5908=>'NSM', -5920=>'L', -5921=>'L', -5922=>'L', -5923=>'L', -5924=>'L', -5925=>'L', -5926=>'L', -5927=>'L', -5928=>'L', -5929=>'L', -5930=>'L', -5931=>'L', -5932=>'L', -5933=>'L', -5934=>'L', -5935=>'L', -5936=>'L', -5937=>'L', -5938=>'NSM', -5939=>'NSM', -5940=>'NSM', -5941=>'L', -5942=>'L', -5952=>'L', -5953=>'L', -5954=>'L', -5955=>'L', -5956=>'L', -5957=>'L', -5958=>'L', -5959=>'L', -5960=>'L', -5961=>'L', -5962=>'L', -5963=>'L', -5964=>'L', -5965=>'L', -5966=>'L', -5967=>'L', -5968=>'L', -5969=>'L', -5970=>'NSM', -5971=>'NSM', -5984=>'L', -5985=>'L', -5986=>'L', -5987=>'L', -5988=>'L', -5989=>'L', -5990=>'L', -5991=>'L', -5992=>'L', -5993=>'L', -5994=>'L', -5995=>'L', -5996=>'L', -5998=>'L', -5999=>'L', -6000=>'L', -6002=>'NSM', -6003=>'NSM', -6016=>'L', -6017=>'L', -6018=>'L', -6019=>'L', -6020=>'L', -6021=>'L', -6022=>'L', -6023=>'L', -6024=>'L', -6025=>'L', -6026=>'L', -6027=>'L', -6028=>'L', -6029=>'L', -6030=>'L', -6031=>'L', -6032=>'L', -6033=>'L', -6034=>'L', -6035=>'L', -6036=>'L', -6037=>'L', -6038=>'L', -6039=>'L', -6040=>'L', -6041=>'L', -6042=>'L', -6043=>'L', -6044=>'L', -6045=>'L', -6046=>'L', -6047=>'L', -6048=>'L', -6049=>'L', -6050=>'L', -6051=>'L', -6052=>'L', -6053=>'L', -6054=>'L', -6055=>'L', -6056=>'L', -6057=>'L', -6058=>'L', -6059=>'L', -6060=>'L', -6061=>'L', -6062=>'L', -6063=>'L', -6064=>'L', -6065=>'L', -6066=>'L', -6067=>'L', -6068=>'L', -6069=>'L', -6070=>'L', -6071=>'NSM', -6072=>'NSM', -6073=>'NSM', -6074=>'NSM', -6075=>'NSM', -6076=>'NSM', -6077=>'NSM', -6078=>'L', -6079=>'L', -6080=>'L', -6081=>'L', -6082=>'L', -6083=>'L', -6084=>'L', -6085=>'L', -6086=>'NSM', -6087=>'L', -6088=>'L', -6089=>'NSM', -6090=>'NSM', -6091=>'NSM', -6092=>'NSM', -6093=>'NSM', -6094=>'NSM', -6095=>'NSM', -6096=>'NSM', -6097=>'NSM', -6098=>'NSM', -6099=>'NSM', -6100=>'L', -6101=>'L', -6102=>'L', -6103=>'L', -6104=>'L', -6105=>'L', -6106=>'L', -6107=>'ET', -6108=>'L', -6109=>'NSM', -6112=>'L', -6113=>'L', -6114=>'L', -6115=>'L', -6116=>'L', -6117=>'L', -6118=>'L', -6119=>'L', -6120=>'L', -6121=>'L', -6128=>'ON', -6129=>'ON', -6130=>'ON', -6131=>'ON', -6132=>'ON', -6133=>'ON', -6134=>'ON', -6135=>'ON', -6136=>'ON', -6137=>'ON', -6144=>'ON', -6145=>'ON', -6146=>'ON', -6147=>'ON', -6148=>'ON', -6149=>'ON', -6150=>'ON', -6151=>'ON', -6152=>'ON', -6153=>'ON', -6154=>'ON', -6155=>'NSM', -6156=>'NSM', -6157=>'NSM', -6158=>'WS', -6160=>'L', -6161=>'L', -6162=>'L', -6163=>'L', -6164=>'L', -6165=>'L', -6166=>'L', -6167=>'L', -6168=>'L', -6169=>'L', -6176=>'L', -6177=>'L', -6178=>'L', -6179=>'L', -6180=>'L', -6181=>'L', -6182=>'L', -6183=>'L', -6184=>'L', -6185=>'L', -6186=>'L', -6187=>'L', -6188=>'L', -6189=>'L', -6190=>'L', -6191=>'L', -6192=>'L', -6193=>'L', -6194=>'L', -6195=>'L', -6196=>'L', -6197=>'L', -6198=>'L', -6199=>'L', -6200=>'L', -6201=>'L', -6202=>'L', -6203=>'L', -6204=>'L', -6205=>'L', -6206=>'L', -6207=>'L', -6208=>'L', -6209=>'L', -6210=>'L', -6211=>'L', -6212=>'L', -6213=>'L', -6214=>'L', -6215=>'L', -6216=>'L', -6217=>'L', -6218=>'L', -6219=>'L', -6220=>'L', -6221=>'L', -6222=>'L', -6223=>'L', -6224=>'L', -6225=>'L', -6226=>'L', -6227=>'L', -6228=>'L', -6229=>'L', -6230=>'L', -6231=>'L', -6232=>'L', -6233=>'L', -6234=>'L', -6235=>'L', -6236=>'L', -6237=>'L', -6238=>'L', -6239=>'L', -6240=>'L', -6241=>'L', -6242=>'L', -6243=>'L', -6244=>'L', -6245=>'L', -6246=>'L', -6247=>'L', -6248=>'L', -6249=>'L', -6250=>'L', -6251=>'L', -6252=>'L', -6253=>'L', -6254=>'L', -6255=>'L', -6256=>'L', -6257=>'L', -6258=>'L', -6259=>'L', -6260=>'L', -6261=>'L', -6262=>'L', -6263=>'L', -6272=>'L', -6273=>'L', -6274=>'L', -6275=>'L', -6276=>'L', -6277=>'L', -6278=>'L', -6279=>'L', -6280=>'L', -6281=>'L', -6282=>'L', -6283=>'L', -6284=>'L', -6285=>'L', -6286=>'L', -6287=>'L', -6288=>'L', -6289=>'L', -6290=>'L', -6291=>'L', -6292=>'L', -6293=>'L', -6294=>'L', -6295=>'L', -6296=>'L', -6297=>'L', -6298=>'L', -6299=>'L', -6300=>'L', -6301=>'L', -6302=>'L', -6303=>'L', -6304=>'L', -6305=>'L', -6306=>'L', -6307=>'L', -6308=>'L', -6309=>'L', -6310=>'L', -6311=>'L', -6312=>'L', -6313=>'NSM', -6400=>'L', -6401=>'L', -6402=>'L', -6403=>'L', -6404=>'L', -6405=>'L', -6406=>'L', -6407=>'L', -6408=>'L', -6409=>'L', -6410=>'L', -6411=>'L', -6412=>'L', -6413=>'L', -6414=>'L', -6415=>'L', -6416=>'L', -6417=>'L', -6418=>'L', -6419=>'L', -6420=>'L', -6421=>'L', -6422=>'L', -6423=>'L', -6424=>'L', -6425=>'L', -6426=>'L', -6427=>'L', -6428=>'L', -6432=>'NSM', -6433=>'NSM', -6434=>'NSM', -6435=>'L', -6436=>'L', -6437=>'L', -6438=>'L', -6439=>'NSM', -6440=>'NSM', -6441=>'NSM', -6442=>'NSM', -6443=>'NSM', -6448=>'L', -6449=>'L', -6450=>'NSM', -6451=>'L', -6452=>'L', -6453=>'L', -6454=>'L', -6455=>'L', -6456=>'L', -6457=>'NSM', -6458=>'NSM', -6459=>'NSM', -6464=>'ON', -6468=>'ON', -6469=>'ON', -6470=>'L', -6471=>'L', -6472=>'L', -6473=>'L', -6474=>'L', -6475=>'L', -6476=>'L', -6477=>'L', -6478=>'L', -6479=>'L', -6480=>'L', -6481=>'L', -6482=>'L', -6483=>'L', -6484=>'L', -6485=>'L', -6486=>'L', -6487=>'L', -6488=>'L', -6489=>'L', -6490=>'L', -6491=>'L', -6492=>'L', -6493=>'L', -6494=>'L', -6495=>'L', -6496=>'L', -6497=>'L', -6498=>'L', -6499=>'L', -6500=>'L', -6501=>'L', -6502=>'L', -6503=>'L', -6504=>'L', -6505=>'L', -6506=>'L', -6507=>'L', -6508=>'L', -6509=>'L', -6512=>'L', -6513=>'L', -6514=>'L', -6515=>'L', -6516=>'L', -6528=>'L', -6529=>'L', -6530=>'L', -6531=>'L', -6532=>'L', -6533=>'L', -6534=>'L', -6535=>'L', -6536=>'L', -6537=>'L', -6538=>'L', -6539=>'L', -6540=>'L', -6541=>'L', -6542=>'L', -6543=>'L', -6544=>'L', -6545=>'L', -6546=>'L', -6547=>'L', -6548=>'L', -6549=>'L', -6550=>'L', -6551=>'L', -6552=>'L', -6553=>'L', -6554=>'L', -6555=>'L', -6556=>'L', -6557=>'L', -6558=>'L', -6559=>'L', -6560=>'L', -6561=>'L', -6562=>'L', -6563=>'L', -6564=>'L', -6565=>'L', -6566=>'L', -6567=>'L', -6568=>'L', -6569=>'L', -6576=>'L', -6577=>'L', -6578=>'L', -6579=>'L', -6580=>'L', -6581=>'L', -6582=>'L', -6583=>'L', -6584=>'L', -6585=>'L', -6586=>'L', -6587=>'L', -6588=>'L', -6589=>'L', -6590=>'L', -6591=>'L', -6592=>'L', -6593=>'L', -6594=>'L', -6595=>'L', -6596=>'L', -6597=>'L', -6598=>'L', -6599=>'L', -6600=>'L', -6601=>'L', -6608=>'L', -6609=>'L', -6610=>'L', -6611=>'L', -6612=>'L', -6613=>'L', -6614=>'L', -6615=>'L', -6616=>'L', -6617=>'L', -6622=>'ON', -6623=>'ON', -6624=>'ON', -6625=>'ON', -6626=>'ON', -6627=>'ON', -6628=>'ON', -6629=>'ON', -6630=>'ON', -6631=>'ON', -6632=>'ON', -6633=>'ON', -6634=>'ON', -6635=>'ON', -6636=>'ON', -6637=>'ON', -6638=>'ON', -6639=>'ON', -6640=>'ON', -6641=>'ON', -6642=>'ON', -6643=>'ON', -6644=>'ON', -6645=>'ON', -6646=>'ON', -6647=>'ON', -6648=>'ON', -6649=>'ON', -6650=>'ON', -6651=>'ON', -6652=>'ON', -6653=>'ON', -6654=>'ON', -6655=>'ON', -6656=>'L', -6657=>'L', -6658=>'L', -6659=>'L', -6660=>'L', -6661=>'L', -6662=>'L', -6663=>'L', -6664=>'L', -6665=>'L', -6666=>'L', -6667=>'L', -6668=>'L', -6669=>'L', -6670=>'L', -6671=>'L', -6672=>'L', -6673=>'L', -6674=>'L', -6675=>'L', -6676=>'L', -6677=>'L', -6678=>'L', -6679=>'NSM', -6680=>'NSM', -6681=>'L', -6682=>'L', -6683=>'L', -6686=>'L', -6687=>'L', -6912=>'NSM', -6913=>'NSM', -6914=>'NSM', -6915=>'NSM', -6916=>'L', -6917=>'L', -6918=>'L', -6919=>'L', -6920=>'L', -6921=>'L', -6922=>'L', -6923=>'L', -6924=>'L', -6925=>'L', -6926=>'L', -6927=>'L', -6928=>'L', -6929=>'L', -6930=>'L', -6931=>'L', -6932=>'L', -6933=>'L', -6934=>'L', -6935=>'L', -6936=>'L', -6937=>'L', -6938=>'L', -6939=>'L', -6940=>'L', -6941=>'L', -6942=>'L', -6943=>'L', -6944=>'L', -6945=>'L', -6946=>'L', -6947=>'L', -6948=>'L', -6949=>'L', -6950=>'L', -6951=>'L', -6952=>'L', -6953=>'L', -6954=>'L', -6955=>'L', -6956=>'L', -6957=>'L', -6958=>'L', -6959=>'L', -6960=>'L', -6961=>'L', -6962=>'L', -6963=>'L', -6964=>'NSM', -6965=>'L', -6966=>'NSM', -6967=>'NSM', -6968=>'NSM', -6969=>'NSM', -6970=>'NSM', -6971=>'L', -6972=>'NSM', -6973=>'L', -6974=>'L', -6975=>'L', -6976=>'L', -6977=>'L', -6978=>'NSM', -6979=>'L', -6980=>'L', -6981=>'L', -6982=>'L', -6983=>'L', -6984=>'L', -6985=>'L', -6986=>'L', -6987=>'L', -6992=>'L', -6993=>'L', -6994=>'L', -6995=>'L', -6996=>'L', -6997=>'L', -6998=>'L', -6999=>'L', -7000=>'L', -7001=>'L', -7002=>'L', -7003=>'L', -7004=>'L', -7005=>'L', -7006=>'L', -7007=>'L', -7008=>'L', -7009=>'L', -7010=>'L', -7011=>'L', -7012=>'L', -7013=>'L', -7014=>'L', -7015=>'L', -7016=>'L', -7017=>'L', -7018=>'L', -7019=>'NSM', -7020=>'NSM', -7021=>'NSM', -7022=>'NSM', -7023=>'NSM', -7024=>'NSM', -7025=>'NSM', -7026=>'NSM', -7027=>'NSM', -7028=>'L', -7029=>'L', -7030=>'L', -7031=>'L', -7032=>'L', -7033=>'L', -7034=>'L', -7035=>'L', -7036=>'L', -7424=>'L', -7425=>'L', -7426=>'L', -7427=>'L', -7428=>'L', -7429=>'L', -7430=>'L', -7431=>'L', -7432=>'L', -7433=>'L', -7434=>'L', -7435=>'L', -7436=>'L', -7437=>'L', -7438=>'L', -7439=>'L', -7440=>'L', -7441=>'L', -7442=>'L', -7443=>'L', -7444=>'L', -7445=>'L', -7446=>'L', -7447=>'L', -7448=>'L', -7449=>'L', -7450=>'L', -7451=>'L', -7452=>'L', -7453=>'L', -7454=>'L', -7455=>'L', -7456=>'L', -7457=>'L', -7458=>'L', -7459=>'L', -7460=>'L', -7461=>'L', -7462=>'L', -7463=>'L', -7464=>'L', -7465=>'L', -7466=>'L', -7467=>'L', -7468=>'L', -7469=>'L', -7470=>'L', -7471=>'L', -7472=>'L', -7473=>'L', -7474=>'L', -7475=>'L', -7476=>'L', -7477=>'L', -7478=>'L', -7479=>'L', -7480=>'L', -7481=>'L', -7482=>'L', -7483=>'L', -7484=>'L', -7485=>'L', -7486=>'L', -7487=>'L', -7488=>'L', -7489=>'L', -7490=>'L', -7491=>'L', -7492=>'L', -7493=>'L', -7494=>'L', -7495=>'L', -7496=>'L', -7497=>'L', -7498=>'L', -7499=>'L', -7500=>'L', -7501=>'L', -7502=>'L', -7503=>'L', -7504=>'L', -7505=>'L', -7506=>'L', -7507=>'L', -7508=>'L', -7509=>'L', -7510=>'L', -7511=>'L', -7512=>'L', -7513=>'L', -7514=>'L', -7515=>'L', -7516=>'L', -7517=>'L', -7518=>'L', -7519=>'L', -7520=>'L', -7521=>'L', -7522=>'L', -7523=>'L', -7524=>'L', -7525=>'L', -7526=>'L', -7527=>'L', -7528=>'L', -7529=>'L', -7530=>'L', -7531=>'L', -7532=>'L', -7533=>'L', -7534=>'L', -7535=>'L', -7536=>'L', -7537=>'L', -7538=>'L', -7539=>'L', -7540=>'L', -7541=>'L', -7542=>'L', -7543=>'L', -7544=>'L', -7545=>'L', -7546=>'L', -7547=>'L', -7548=>'L', -7549=>'L', -7550=>'L', -7551=>'L', -7552=>'L', -7553=>'L', -7554=>'L', -7555=>'L', -7556=>'L', -7557=>'L', -7558=>'L', -7559=>'L', -7560=>'L', -7561=>'L', -7562=>'L', -7563=>'L', -7564=>'L', -7565=>'L', -7566=>'L', -7567=>'L', -7568=>'L', -7569=>'L', -7570=>'L', -7571=>'L', -7572=>'L', -7573=>'L', -7574=>'L', -7575=>'L', -7576=>'L', -7577=>'L', -7578=>'L', -7579=>'L', -7580=>'L', -7581=>'L', -7582=>'L', -7583=>'L', -7584=>'L', -7585=>'L', -7586=>'L', -7587=>'L', -7588=>'L', -7589=>'L', -7590=>'L', -7591=>'L', -7592=>'L', -7593=>'L', -7594=>'L', -7595=>'L', -7596=>'L', -7597=>'L', -7598=>'L', -7599=>'L', -7600=>'L', -7601=>'L', -7602=>'L', -7603=>'L', -7604=>'L', -7605=>'L', -7606=>'L', -7607=>'L', -7608=>'L', -7609=>'L', -7610=>'L', -7611=>'L', -7612=>'L', -7613=>'L', -7614=>'L', -7615=>'L', -7616=>'NSM', -7617=>'NSM', -7618=>'NSM', -7619=>'NSM', -7620=>'NSM', -7621=>'NSM', -7622=>'NSM', -7623=>'NSM', -7624=>'NSM', -7625=>'NSM', -7626=>'NSM', -7678=>'NSM', -7679=>'NSM', -7680=>'L', -7681=>'L', -7682=>'L', -7683=>'L', -7684=>'L', -7685=>'L', -7686=>'L', -7687=>'L', -7688=>'L', -7689=>'L', -7690=>'L', -7691=>'L', -7692=>'L', -7693=>'L', -7694=>'L', -7695=>'L', -7696=>'L', -7697=>'L', -7698=>'L', -7699=>'L', -7700=>'L', -7701=>'L', -7702=>'L', -7703=>'L', -7704=>'L', -7705=>'L', -7706=>'L', -7707=>'L', -7708=>'L', -7709=>'L', -7710=>'L', -7711=>'L', -7712=>'L', -7713=>'L', -7714=>'L', -7715=>'L', -7716=>'L', -7717=>'L', -7718=>'L', -7719=>'L', -7720=>'L', -7721=>'L', -7722=>'L', -7723=>'L', -7724=>'L', -7725=>'L', -7726=>'L', -7727=>'L', -7728=>'L', -7729=>'L', -7730=>'L', -7731=>'L', -7732=>'L', -7733=>'L', -7734=>'L', -7735=>'L', -7736=>'L', -7737=>'L', -7738=>'L', -7739=>'L', -7740=>'L', -7741=>'L', -7742=>'L', -7743=>'L', -7744=>'L', -7745=>'L', -7746=>'L', -7747=>'L', -7748=>'L', -7749=>'L', -7750=>'L', -7751=>'L', -7752=>'L', -7753=>'L', -7754=>'L', -7755=>'L', -7756=>'L', -7757=>'L', -7758=>'L', -7759=>'L', -7760=>'L', -7761=>'L', -7762=>'L', -7763=>'L', -7764=>'L', -7765=>'L', -7766=>'L', -7767=>'L', -7768=>'L', -7769=>'L', -7770=>'L', -7771=>'L', -7772=>'L', -7773=>'L', -7774=>'L', -7775=>'L', -7776=>'L', -7777=>'L', -7778=>'L', -7779=>'L', -7780=>'L', -7781=>'L', -7782=>'L', -7783=>'L', -7784=>'L', -7785=>'L', -7786=>'L', -7787=>'L', -7788=>'L', -7789=>'L', -7790=>'L', -7791=>'L', -7792=>'L', -7793=>'L', -7794=>'L', -7795=>'L', -7796=>'L', -7797=>'L', -7798=>'L', -7799=>'L', -7800=>'L', -7801=>'L', -7802=>'L', -7803=>'L', -7804=>'L', -7805=>'L', -7806=>'L', -7807=>'L', -7808=>'L', -7809=>'L', -7810=>'L', -7811=>'L', -7812=>'L', -7813=>'L', -7814=>'L', -7815=>'L', -7816=>'L', -7817=>'L', -7818=>'L', -7819=>'L', -7820=>'L', -7821=>'L', -7822=>'L', -7823=>'L', -7824=>'L', -7825=>'L', -7826=>'L', -7827=>'L', -7828=>'L', -7829=>'L', -7830=>'L', -7831=>'L', -7832=>'L', -7833=>'L', -7834=>'L', -7835=>'L', -7840=>'L', -7841=>'L', -7842=>'L', -7843=>'L', -7844=>'L', -7845=>'L', -7846=>'L', -7847=>'L', -7848=>'L', -7849=>'L', -7850=>'L', -7851=>'L', -7852=>'L', -7853=>'L', -7854=>'L', -7855=>'L', -7856=>'L', -7857=>'L', -7858=>'L', -7859=>'L', -7860=>'L', -7861=>'L', -7862=>'L', -7863=>'L', -7864=>'L', -7865=>'L', -7866=>'L', -7867=>'L', -7868=>'L', -7869=>'L', -7870=>'L', -7871=>'L', -7872=>'L', -7873=>'L', -7874=>'L', -7875=>'L', -7876=>'L', -7877=>'L', -7878=>'L', -7879=>'L', -7880=>'L', -7881=>'L', -7882=>'L', -7883=>'L', -7884=>'L', -7885=>'L', -7886=>'L', -7887=>'L', -7888=>'L', -7889=>'L', -7890=>'L', -7891=>'L', -7892=>'L', -7893=>'L', -7894=>'L', -7895=>'L', -7896=>'L', -7897=>'L', -7898=>'L', -7899=>'L', -7900=>'L', -7901=>'L', -7902=>'L', -7903=>'L', -7904=>'L', -7905=>'L', -7906=>'L', -7907=>'L', -7908=>'L', -7909=>'L', -7910=>'L', -7911=>'L', -7912=>'L', -7913=>'L', -7914=>'L', -7915=>'L', -7916=>'L', -7917=>'L', -7918=>'L', -7919=>'L', -7920=>'L', -7921=>'L', -7922=>'L', -7923=>'L', -7924=>'L', -7925=>'L', -7926=>'L', -7927=>'L', -7928=>'L', -7929=>'L', -7936=>'L', -7937=>'L', -7938=>'L', -7939=>'L', -7940=>'L', -7941=>'L', -7942=>'L', -7943=>'L', -7944=>'L', -7945=>'L', -7946=>'L', -7947=>'L', -7948=>'L', -7949=>'L', -7950=>'L', -7951=>'L', -7952=>'L', -7953=>'L', -7954=>'L', -7955=>'L', -7956=>'L', -7957=>'L', -7960=>'L', -7961=>'L', -7962=>'L', -7963=>'L', -7964=>'L', -7965=>'L', -7968=>'L', -7969=>'L', -7970=>'L', -7971=>'L', -7972=>'L', -7973=>'L', -7974=>'L', -7975=>'L', -7976=>'L', -7977=>'L', -7978=>'L', -7979=>'L', -7980=>'L', -7981=>'L', -7982=>'L', -7983=>'L', -7984=>'L', -7985=>'L', -7986=>'L', -7987=>'L', -7988=>'L', -7989=>'L', -7990=>'L', -7991=>'L', -7992=>'L', -7993=>'L', -7994=>'L', -7995=>'L', -7996=>'L', -7997=>'L', -7998=>'L', -7999=>'L', -8000=>'L', -8001=>'L', -8002=>'L', -8003=>'L', -8004=>'L', -8005=>'L', -8008=>'L', -8009=>'L', -8010=>'L', -8011=>'L', -8012=>'L', -8013=>'L', -8016=>'L', -8017=>'L', -8018=>'L', -8019=>'L', -8020=>'L', -8021=>'L', -8022=>'L', -8023=>'L', -8025=>'L', -8027=>'L', -8029=>'L', -8031=>'L', -8032=>'L', -8033=>'L', -8034=>'L', -8035=>'L', -8036=>'L', -8037=>'L', -8038=>'L', -8039=>'L', -8040=>'L', -8041=>'L', -8042=>'L', -8043=>'L', -8044=>'L', -8045=>'L', -8046=>'L', -8047=>'L', -8048=>'L', -8049=>'L', -8050=>'L', -8051=>'L', -8052=>'L', -8053=>'L', -8054=>'L', -8055=>'L', -8056=>'L', -8057=>'L', -8058=>'L', -8059=>'L', -8060=>'L', -8061=>'L', -8064=>'L', -8065=>'L', -8066=>'L', -8067=>'L', -8068=>'L', -8069=>'L', -8070=>'L', -8071=>'L', -8072=>'L', -8073=>'L', -8074=>'L', -8075=>'L', -8076=>'L', -8077=>'L', -8078=>'L', -8079=>'L', -8080=>'L', -8081=>'L', -8082=>'L', -8083=>'L', -8084=>'L', -8085=>'L', -8086=>'L', -8087=>'L', -8088=>'L', -8089=>'L', -8090=>'L', -8091=>'L', -8092=>'L', -8093=>'L', -8094=>'L', -8095=>'L', -8096=>'L', -8097=>'L', -8098=>'L', -8099=>'L', -8100=>'L', -8101=>'L', -8102=>'L', -8103=>'L', -8104=>'L', -8105=>'L', -8106=>'L', -8107=>'L', -8108=>'L', -8109=>'L', -8110=>'L', -8111=>'L', -8112=>'L', -8113=>'L', -8114=>'L', -8115=>'L', -8116=>'L', -8118=>'L', -8119=>'L', -8120=>'L', -8121=>'L', -8122=>'L', -8123=>'L', -8124=>'L', -8125=>'ON', -8126=>'L', -8127=>'ON', -8128=>'ON', -8129=>'ON', -8130=>'L', -8131=>'L', -8132=>'L', -8134=>'L', -8135=>'L', -8136=>'L', -8137=>'L', -8138=>'L', -8139=>'L', -8140=>'L', -8141=>'ON', -8142=>'ON', -8143=>'ON', -8144=>'L', -8145=>'L', -8146=>'L', -8147=>'L', -8150=>'L', -8151=>'L', -8152=>'L', -8153=>'L', -8154=>'L', -8155=>'L', -8157=>'ON', -8158=>'ON', -8159=>'ON', -8160=>'L', -8161=>'L', -8162=>'L', -8163=>'L', -8164=>'L', -8165=>'L', -8166=>'L', -8167=>'L', -8168=>'L', -8169=>'L', -8170=>'L', -8171=>'L', -8172=>'L', -8173=>'ON', -8174=>'ON', -8175=>'ON', -8178=>'L', -8179=>'L', -8180=>'L', -8182=>'L', -8183=>'L', -8184=>'L', -8185=>'L', -8186=>'L', -8187=>'L', -8188=>'L', -8189=>'ON', -8190=>'ON', -8192=>'WS', -8193=>'WS', -8194=>'WS', -8195=>'WS', -8196=>'WS', -8197=>'WS', -8198=>'WS', -8199=>'WS', -8200=>'WS', -8201=>'WS', -8202=>'WS', -8203=>'BN', -8204=>'BN', -8205=>'BN', -8206=>'L', -8207=>'R', -8208=>'ON', -8209=>'ON', -8210=>'ON', -8211=>'ON', -8212=>'ON', -8213=>'ON', -8214=>'ON', -8215=>'ON', -8216=>'ON', -8217=>'ON', -8218=>'ON', -8219=>'ON', -8220=>'ON', -8221=>'ON', -8222=>'ON', -8223=>'ON', -8224=>'ON', -8225=>'ON', -8226=>'ON', -8227=>'ON', -8228=>'ON', -8229=>'ON', -8230=>'ON', -8231=>'ON', -8232=>'WS', -8233=>'B', -8234=>'LRE', -8235=>'RLE', -8236=>'PDF', -8237=>'LRO', -8238=>'RLO', -8239=>'CS', -8240=>'ET', -8241=>'ET', -8242=>'ET', -8243=>'ET', -8244=>'ET', -8245=>'ON', -8246=>'ON', -8247=>'ON', -8248=>'ON', -8249=>'ON', -8250=>'ON', -8251=>'ON', -8252=>'ON', -8253=>'ON', -8254=>'ON', -8255=>'ON', -8256=>'ON', -8257=>'ON', -8258=>'ON', -8259=>'ON', -8260=>'CS', -8261=>'ON', -8262=>'ON', -8263=>'ON', -8264=>'ON', -8265=>'ON', -8266=>'ON', -8267=>'ON', -8268=>'ON', -8269=>'ON', -8270=>'ON', -8271=>'ON', -8272=>'ON', -8273=>'ON', -8274=>'ON', -8275=>'ON', -8276=>'ON', -8277=>'ON', -8278=>'ON', -8279=>'ON', -8280=>'ON', -8281=>'ON', -8282=>'ON', -8283=>'ON', -8284=>'ON', -8285=>'ON', -8286=>'ON', -8287=>'WS', -8288=>'BN', -8289=>'BN', -8290=>'BN', -8291=>'BN', -8298=>'BN', -8299=>'BN', -8300=>'BN', -8301=>'BN', -8302=>'BN', -8303=>'BN', -8304=>'EN', -8305=>'L', -8308=>'EN', -8309=>'EN', -8310=>'EN', -8311=>'EN', -8312=>'EN', -8313=>'EN', -8314=>'ES', -8315=>'ES', -8316=>'ON', -8317=>'ON', -8318=>'ON', -8319=>'L', -8320=>'EN', -8321=>'EN', -8322=>'EN', -8323=>'EN', -8324=>'EN', -8325=>'EN', -8326=>'EN', -8327=>'EN', -8328=>'EN', -8329=>'EN', -8330=>'ES', -8331=>'ES', -8332=>'ON', -8333=>'ON', -8334=>'ON', -8336=>'L', -8337=>'L', -8338=>'L', -8339=>'L', -8340=>'L', -8352=>'ET', -8353=>'ET', -8354=>'ET', -8355=>'ET', -8356=>'ET', -8357=>'ET', -8358=>'ET', -8359=>'ET', -8360=>'ET', -8361=>'ET', -8362=>'ET', -8363=>'ET', -8364=>'ET', -8365=>'ET', -8366=>'ET', -8367=>'ET', -8368=>'ET', -8369=>'ET', -8370=>'ET', -8371=>'ET', -8372=>'ET', -8373=>'ET', -8400=>'NSM', -8401=>'NSM', -8402=>'NSM', -8403=>'NSM', -8404=>'NSM', -8405=>'NSM', -8406=>'NSM', -8407=>'NSM', -8408=>'NSM', -8409=>'NSM', -8410=>'NSM', -8411=>'NSM', -8412=>'NSM', -8413=>'NSM', -8414=>'NSM', -8415=>'NSM', -8416=>'NSM', -8417=>'NSM', -8418=>'NSM', -8419=>'NSM', -8420=>'NSM', -8421=>'NSM', -8422=>'NSM', -8423=>'NSM', -8424=>'NSM', -8425=>'NSM', -8426=>'NSM', -8427=>'NSM', -8428=>'NSM', -8429=>'NSM', -8430=>'NSM', -8431=>'NSM', -8448=>'ON', -8449=>'ON', -8450=>'L', -8451=>'ON', -8452=>'ON', -8453=>'ON', -8454=>'ON', -8455=>'L', -8456=>'ON', -8457=>'ON', -8458=>'L', -8459=>'L', -8460=>'L', -8461=>'L', -8462=>'L', -8463=>'L', -8464=>'L', -8465=>'L', -8466=>'L', -8467=>'L', -8468=>'ON', -8469=>'L', -8470=>'ON', -8471=>'ON', -8472=>'ON', -8473=>'L', -8474=>'L', -8475=>'L', -8476=>'L', -8477=>'L', -8478=>'ON', -8479=>'ON', -8480=>'ON', -8481=>'ON', -8482=>'ON', -8483=>'ON', -8484=>'L', -8485=>'ON', -8486=>'L', -8487=>'ON', -8488=>'L', -8489=>'ON', -8490=>'L', -8491=>'L', -8492=>'L', -8493=>'L', -8494=>'ET', -8495=>'L', -8496=>'L', -8497=>'L', -8498=>'L', -8499=>'L', -8500=>'L', -8501=>'L', -8502=>'L', -8503=>'L', -8504=>'L', -8505=>'L', -8506=>'ON', -8507=>'ON', -8508=>'L', -8509=>'L', -8510=>'L', -8511=>'L', -8512=>'ON', -8513=>'ON', -8514=>'ON', -8515=>'ON', -8516=>'ON', -8517=>'L', -8518=>'L', -8519=>'L', -8520=>'L', -8521=>'L', -8522=>'ON', -8523=>'ON', -8524=>'ON', -8525=>'ON', -8526=>'L', -8531=>'ON', -8532=>'ON', -8533=>'ON', -8534=>'ON', -8535=>'ON', -8536=>'ON', -8537=>'ON', -8538=>'ON', -8539=>'ON', -8540=>'ON', -8541=>'ON', -8542=>'ON', -8543=>'ON', -8544=>'L', -8545=>'L', -8546=>'L', -8547=>'L', -8548=>'L', -8549=>'L', -8550=>'L', -8551=>'L', -8552=>'L', -8553=>'L', -8554=>'L', -8555=>'L', -8556=>'L', -8557=>'L', -8558=>'L', -8559=>'L', -8560=>'L', -8561=>'L', -8562=>'L', -8563=>'L', -8564=>'L', -8565=>'L', -8566=>'L', -8567=>'L', -8568=>'L', -8569=>'L', -8570=>'L', -8571=>'L', -8572=>'L', -8573=>'L', -8574=>'L', -8575=>'L', -8576=>'L', -8577=>'L', -8578=>'L', -8579=>'L', -8580=>'L', -8592=>'ON', -8593=>'ON', -8594=>'ON', -8595=>'ON', -8596=>'ON', -8597=>'ON', -8598=>'ON', -8599=>'ON', -8600=>'ON', -8601=>'ON', -8602=>'ON', -8603=>'ON', -8604=>'ON', -8605=>'ON', -8606=>'ON', -8607=>'ON', -8608=>'ON', -8609=>'ON', -8610=>'ON', -8611=>'ON', -8612=>'ON', -8613=>'ON', -8614=>'ON', -8615=>'ON', -8616=>'ON', -8617=>'ON', -8618=>'ON', -8619=>'ON', -8620=>'ON', -8621=>'ON', -8622=>'ON', -8623=>'ON', -8624=>'ON', -8625=>'ON', -8626=>'ON', -8627=>'ON', -8628=>'ON', -8629=>'ON', -8630=>'ON', -8631=>'ON', -8632=>'ON', -8633=>'ON', -8634=>'ON', -8635=>'ON', -8636=>'ON', -8637=>'ON', -8638=>'ON', -8639=>'ON', -8640=>'ON', -8641=>'ON', -8642=>'ON', -8643=>'ON', -8644=>'ON', -8645=>'ON', -8646=>'ON', -8647=>'ON', -8648=>'ON', -8649=>'ON', -8650=>'ON', -8651=>'ON', -8652=>'ON', -8653=>'ON', -8654=>'ON', -8655=>'ON', -8656=>'ON', -8657=>'ON', -8658=>'ON', -8659=>'ON', -8660=>'ON', -8661=>'ON', -8662=>'ON', -8663=>'ON', -8664=>'ON', -8665=>'ON', -8666=>'ON', -8667=>'ON', -8668=>'ON', -8669=>'ON', -8670=>'ON', -8671=>'ON', -8672=>'ON', -8673=>'ON', -8674=>'ON', -8675=>'ON', -8676=>'ON', -8677=>'ON', -8678=>'ON', -8679=>'ON', -8680=>'ON', -8681=>'ON', -8682=>'ON', -8683=>'ON', -8684=>'ON', -8685=>'ON', -8686=>'ON', -8687=>'ON', -8688=>'ON', -8689=>'ON', -8690=>'ON', -8691=>'ON', -8692=>'ON', -8693=>'ON', -8694=>'ON', -8695=>'ON', -8696=>'ON', -8697=>'ON', -8698=>'ON', -8699=>'ON', -8700=>'ON', -8701=>'ON', -8702=>'ON', -8703=>'ON', -8704=>'ON', -8705=>'ON', -8706=>'ON', -8707=>'ON', -8708=>'ON', -8709=>'ON', -8710=>'ON', -8711=>'ON', -8712=>'ON', -8713=>'ON', -8714=>'ON', -8715=>'ON', -8716=>'ON', -8717=>'ON', -8718=>'ON', -8719=>'ON', -8720=>'ON', -8721=>'ON', -8722=>'ES', -8723=>'ET', -8724=>'ON', -8725=>'ON', -8726=>'ON', -8727=>'ON', -8728=>'ON', -8729=>'ON', -8730=>'ON', -8731=>'ON', -8732=>'ON', -8733=>'ON', -8734=>'ON', -8735=>'ON', -8736=>'ON', -8737=>'ON', -8738=>'ON', -8739=>'ON', -8740=>'ON', -8741=>'ON', -8742=>'ON', -8743=>'ON', -8744=>'ON', -8745=>'ON', -8746=>'ON', -8747=>'ON', -8748=>'ON', -8749=>'ON', -8750=>'ON', -8751=>'ON', -8752=>'ON', -8753=>'ON', -8754=>'ON', -8755=>'ON', -8756=>'ON', -8757=>'ON', -8758=>'ON', -8759=>'ON', -8760=>'ON', -8761=>'ON', -8762=>'ON', -8763=>'ON', -8764=>'ON', -8765=>'ON', -8766=>'ON', -8767=>'ON', -8768=>'ON', -8769=>'ON', -8770=>'ON', -8771=>'ON', -8772=>'ON', -8773=>'ON', -8774=>'ON', -8775=>'ON', -8776=>'ON', -8777=>'ON', -8778=>'ON', -8779=>'ON', -8780=>'ON', -8781=>'ON', -8782=>'ON', -8783=>'ON', -8784=>'ON', -8785=>'ON', -8786=>'ON', -8787=>'ON', -8788=>'ON', -8789=>'ON', -8790=>'ON', -8791=>'ON', -8792=>'ON', -8793=>'ON', -8794=>'ON', -8795=>'ON', -8796=>'ON', -8797=>'ON', -8798=>'ON', -8799=>'ON', -8800=>'ON', -8801=>'ON', -8802=>'ON', -8803=>'ON', -8804=>'ON', -8805=>'ON', -8806=>'ON', -8807=>'ON', -8808=>'ON', -8809=>'ON', -8810=>'ON', -8811=>'ON', -8812=>'ON', -8813=>'ON', -8814=>'ON', -8815=>'ON', -8816=>'ON', -8817=>'ON', -8818=>'ON', -8819=>'ON', -8820=>'ON', -8821=>'ON', -8822=>'ON', -8823=>'ON', -8824=>'ON', -8825=>'ON', -8826=>'ON', -8827=>'ON', -8828=>'ON', -8829=>'ON', -8830=>'ON', -8831=>'ON', -8832=>'ON', -8833=>'ON', -8834=>'ON', -8835=>'ON', -8836=>'ON', -8837=>'ON', -8838=>'ON', -8839=>'ON', -8840=>'ON', -8841=>'ON', -8842=>'ON', -8843=>'ON', -8844=>'ON', -8845=>'ON', -8846=>'ON', -8847=>'ON', -8848=>'ON', -8849=>'ON', -8850=>'ON', -8851=>'ON', -8852=>'ON', -8853=>'ON', -8854=>'ON', -8855=>'ON', -8856=>'ON', -8857=>'ON', -8858=>'ON', -8859=>'ON', -8860=>'ON', -8861=>'ON', -8862=>'ON', -8863=>'ON', -8864=>'ON', -8865=>'ON', -8866=>'ON', -8867=>'ON', -8868=>'ON', -8869=>'ON', -8870=>'ON', -8871=>'ON', -8872=>'ON', -8873=>'ON', -8874=>'ON', -8875=>'ON', -8876=>'ON', -8877=>'ON', -8878=>'ON', -8879=>'ON', -8880=>'ON', -8881=>'ON', -8882=>'ON', -8883=>'ON', -8884=>'ON', -8885=>'ON', -8886=>'ON', -8887=>'ON', -8888=>'ON', -8889=>'ON', -8890=>'ON', -8891=>'ON', -8892=>'ON', -8893=>'ON', -8894=>'ON', -8895=>'ON', -8896=>'ON', -8897=>'ON', -8898=>'ON', -8899=>'ON', -8900=>'ON', -8901=>'ON', -8902=>'ON', -8903=>'ON', -8904=>'ON', -8905=>'ON', -8906=>'ON', -8907=>'ON', -8908=>'ON', -8909=>'ON', -8910=>'ON', -8911=>'ON', -8912=>'ON', -8913=>'ON', -8914=>'ON', -8915=>'ON', -8916=>'ON', -8917=>'ON', -8918=>'ON', -8919=>'ON', -8920=>'ON', -8921=>'ON', -8922=>'ON', -8923=>'ON', -8924=>'ON', -8925=>'ON', -8926=>'ON', -8927=>'ON', -8928=>'ON', -8929=>'ON', -8930=>'ON', -8931=>'ON', -8932=>'ON', -8933=>'ON', -8934=>'ON', -8935=>'ON', -8936=>'ON', -8937=>'ON', -8938=>'ON', -8939=>'ON', -8940=>'ON', -8941=>'ON', -8942=>'ON', -8943=>'ON', -8944=>'ON', -8945=>'ON', -8946=>'ON', -8947=>'ON', -8948=>'ON', -8949=>'ON', -8950=>'ON', -8951=>'ON', -8952=>'ON', -8953=>'ON', -8954=>'ON', -8955=>'ON', -8956=>'ON', -8957=>'ON', -8958=>'ON', -8959=>'ON', -8960=>'ON', -8961=>'ON', -8962=>'ON', -8963=>'ON', -8964=>'ON', -8965=>'ON', -8966=>'ON', -8967=>'ON', -8968=>'ON', -8969=>'ON', -8970=>'ON', -8971=>'ON', -8972=>'ON', -8973=>'ON', -8974=>'ON', -8975=>'ON', -8976=>'ON', -8977=>'ON', -8978=>'ON', -8979=>'ON', -8980=>'ON', -8981=>'ON', -8982=>'ON', -8983=>'ON', -8984=>'ON', -8985=>'ON', -8986=>'ON', -8987=>'ON', -8988=>'ON', -8989=>'ON', -8990=>'ON', -8991=>'ON', -8992=>'ON', -8993=>'ON', -8994=>'ON', -8995=>'ON', -8996=>'ON', -8997=>'ON', -8998=>'ON', -8999=>'ON', -9000=>'ON', -9001=>'ON', -9002=>'ON', -9003=>'ON', -9004=>'ON', -9005=>'ON', -9006=>'ON', -9007=>'ON', -9008=>'ON', -9009=>'ON', -9010=>'ON', -9011=>'ON', -9012=>'ON', -9013=>'ON', -9014=>'L', -9015=>'L', -9016=>'L', -9017=>'L', -9018=>'L', -9019=>'L', -9020=>'L', -9021=>'L', -9022=>'L', -9023=>'L', -9024=>'L', -9025=>'L', -9026=>'L', -9027=>'L', -9028=>'L', -9029=>'L', -9030=>'L', -9031=>'L', -9032=>'L', -9033=>'L', -9034=>'L', -9035=>'L', -9036=>'L', -9037=>'L', -9038=>'L', -9039=>'L', -9040=>'L', -9041=>'L', -9042=>'L', -9043=>'L', -9044=>'L', -9045=>'L', -9046=>'L', -9047=>'L', -9048=>'L', -9049=>'L', -9050=>'L', -9051=>'L', -9052=>'L', -9053=>'L', -9054=>'L', -9055=>'L', -9056=>'L', -9057=>'L', -9058=>'L', -9059=>'L', -9060=>'L', -9061=>'L', -9062=>'L', -9063=>'L', -9064=>'L', -9065=>'L', -9066=>'L', -9067=>'L', -9068=>'L', -9069=>'L', -9070=>'L', -9071=>'L', -9072=>'L', -9073=>'L', -9074=>'L', -9075=>'L', -9076=>'L', -9077=>'L', -9078=>'L', -9079=>'L', -9080=>'L', -9081=>'L', -9082=>'L', -9083=>'ON', -9084=>'ON', -9085=>'ON', -9086=>'ON', -9087=>'ON', -9088=>'ON', -9089=>'ON', -9090=>'ON', -9091=>'ON', -9092=>'ON', -9093=>'ON', -9094=>'ON', -9095=>'ON', -9096=>'ON', -9097=>'ON', -9098=>'ON', -9099=>'ON', -9100=>'ON', -9101=>'ON', -9102=>'ON', -9103=>'ON', -9104=>'ON', -9105=>'ON', -9106=>'ON', -9107=>'ON', -9108=>'ON', -9109=>'L', -9110=>'ON', -9111=>'ON', -9112=>'ON', -9113=>'ON', -9114=>'ON', -9115=>'ON', -9116=>'ON', -9117=>'ON', -9118=>'ON', -9119=>'ON', -9120=>'ON', -9121=>'ON', -9122=>'ON', -9123=>'ON', -9124=>'ON', -9125=>'ON', -9126=>'ON', -9127=>'ON', -9128=>'ON', -9129=>'ON', -9130=>'ON', -9131=>'ON', -9132=>'ON', -9133=>'ON', -9134=>'ON', -9135=>'ON', -9136=>'ON', -9137=>'ON', -9138=>'ON', -9139=>'ON', -9140=>'ON', -9141=>'ON', -9142=>'ON', -9143=>'ON', -9144=>'ON', -9145=>'ON', -9146=>'ON', -9147=>'ON', -9148=>'ON', -9149=>'ON', -9150=>'ON', -9151=>'ON', -9152=>'ON', -9153=>'ON', -9154=>'ON', -9155=>'ON', -9156=>'ON', -9157=>'ON', -9158=>'ON', -9159=>'ON', -9160=>'ON', -9161=>'ON', -9162=>'ON', -9163=>'ON', -9164=>'ON', -9165=>'ON', -9166=>'ON', -9167=>'ON', -9168=>'ON', -9169=>'ON', -9170=>'ON', -9171=>'ON', -9172=>'ON', -9173=>'ON', -9174=>'ON', -9175=>'ON', -9176=>'ON', -9177=>'ON', -9178=>'ON', -9179=>'ON', -9180=>'ON', -9181=>'ON', -9182=>'ON', -9183=>'ON', -9184=>'ON', -9185=>'ON', -9186=>'ON', -9187=>'ON', -9188=>'ON', -9189=>'ON', -9190=>'ON', -9191=>'ON', -9216=>'ON', -9217=>'ON', -9218=>'ON', -9219=>'ON', -9220=>'ON', -9221=>'ON', -9222=>'ON', -9223=>'ON', -9224=>'ON', -9225=>'ON', -9226=>'ON', -9227=>'ON', -9228=>'ON', -9229=>'ON', -9230=>'ON', -9231=>'ON', -9232=>'ON', -9233=>'ON', -9234=>'ON', -9235=>'ON', -9236=>'ON', -9237=>'ON', -9238=>'ON', -9239=>'ON', -9240=>'ON', -9241=>'ON', -9242=>'ON', -9243=>'ON', -9244=>'ON', -9245=>'ON', -9246=>'ON', -9247=>'ON', -9248=>'ON', -9249=>'ON', -9250=>'ON', -9251=>'ON', -9252=>'ON', -9253=>'ON', -9254=>'ON', -9280=>'ON', -9281=>'ON', -9282=>'ON', -9283=>'ON', -9284=>'ON', -9285=>'ON', -9286=>'ON', -9287=>'ON', -9288=>'ON', -9289=>'ON', -9290=>'ON', -9312=>'ON', -9313=>'ON', -9314=>'ON', -9315=>'ON', -9316=>'ON', -9317=>'ON', -9318=>'ON', -9319=>'ON', -9320=>'ON', -9321=>'ON', -9322=>'ON', -9323=>'ON', -9324=>'ON', -9325=>'ON', -9326=>'ON', -9327=>'ON', -9328=>'ON', -9329=>'ON', -9330=>'ON', -9331=>'ON', -9332=>'ON', -9333=>'ON', -9334=>'ON', -9335=>'ON', -9336=>'ON', -9337=>'ON', -9338=>'ON', -9339=>'ON', -9340=>'ON', -9341=>'ON', -9342=>'ON', -9343=>'ON', -9344=>'ON', -9345=>'ON', -9346=>'ON', -9347=>'ON', -9348=>'ON', -9349=>'ON', -9350=>'ON', -9351=>'ON', -9352=>'EN', -9353=>'EN', -9354=>'EN', -9355=>'EN', -9356=>'EN', -9357=>'EN', -9358=>'EN', -9359=>'EN', -9360=>'EN', -9361=>'EN', -9362=>'EN', -9363=>'EN', -9364=>'EN', -9365=>'EN', -9366=>'EN', -9367=>'EN', -9368=>'EN', -9369=>'EN', -9370=>'EN', -9371=>'EN', -9372=>'L', -9373=>'L', -9374=>'L', -9375=>'L', -9376=>'L', -9377=>'L', -9378=>'L', -9379=>'L', -9380=>'L', -9381=>'L', -9382=>'L', -9383=>'L', -9384=>'L', -9385=>'L', -9386=>'L', -9387=>'L', -9388=>'L', -9389=>'L', -9390=>'L', -9391=>'L', -9392=>'L', -9393=>'L', -9394=>'L', -9395=>'L', -9396=>'L', -9397=>'L', -9398=>'L', -9399=>'L', -9400=>'L', -9401=>'L', -9402=>'L', -9403=>'L', -9404=>'L', -9405=>'L', -9406=>'L', -9407=>'L', -9408=>'L', -9409=>'L', -9410=>'L', -9411=>'L', -9412=>'L', -9413=>'L', -9414=>'L', -9415=>'L', -9416=>'L', -9417=>'L', -9418=>'L', -9419=>'L', -9420=>'L', -9421=>'L', -9422=>'L', -9423=>'L', -9424=>'L', -9425=>'L', -9426=>'L', -9427=>'L', -9428=>'L', -9429=>'L', -9430=>'L', -9431=>'L', -9432=>'L', -9433=>'L', -9434=>'L', -9435=>'L', -9436=>'L', -9437=>'L', -9438=>'L', -9439=>'L', -9440=>'L', -9441=>'L', -9442=>'L', -9443=>'L', -9444=>'L', -9445=>'L', -9446=>'L', -9447=>'L', -9448=>'L', -9449=>'L', -9450=>'ON', -9451=>'ON', -9452=>'ON', -9453=>'ON', -9454=>'ON', -9455=>'ON', -9456=>'ON', -9457=>'ON', -9458=>'ON', -9459=>'ON', -9460=>'ON', -9461=>'ON', -9462=>'ON', -9463=>'ON', -9464=>'ON', -9465=>'ON', -9466=>'ON', -9467=>'ON', -9468=>'ON', -9469=>'ON', -9470=>'ON', -9471=>'ON', -9472=>'ON', -9473=>'ON', -9474=>'ON', -9475=>'ON', -9476=>'ON', -9477=>'ON', -9478=>'ON', -9479=>'ON', -9480=>'ON', -9481=>'ON', -9482=>'ON', -9483=>'ON', -9484=>'ON', -9485=>'ON', -9486=>'ON', -9487=>'ON', -9488=>'ON', -9489=>'ON', -9490=>'ON', -9491=>'ON', -9492=>'ON', -9493=>'ON', -9494=>'ON', -9495=>'ON', -9496=>'ON', -9497=>'ON', -9498=>'ON', -9499=>'ON', -9500=>'ON', -9501=>'ON', -9502=>'ON', -9503=>'ON', -9504=>'ON', -9505=>'ON', -9506=>'ON', -9507=>'ON', -9508=>'ON', -9509=>'ON', -9510=>'ON', -9511=>'ON', -9512=>'ON', -9513=>'ON', -9514=>'ON', -9515=>'ON', -9516=>'ON', -9517=>'ON', -9518=>'ON', -9519=>'ON', -9520=>'ON', -9521=>'ON', -9522=>'ON', -9523=>'ON', -9524=>'ON', -9525=>'ON', -9526=>'ON', -9527=>'ON', -9528=>'ON', -9529=>'ON', -9530=>'ON', -9531=>'ON', -9532=>'ON', -9533=>'ON', -9534=>'ON', -9535=>'ON', -9536=>'ON', -9537=>'ON', -9538=>'ON', -9539=>'ON', -9540=>'ON', -9541=>'ON', -9542=>'ON', -9543=>'ON', -9544=>'ON', -9545=>'ON', -9546=>'ON', -9547=>'ON', -9548=>'ON', -9549=>'ON', -9550=>'ON', -9551=>'ON', -9552=>'ON', -9553=>'ON', -9554=>'ON', -9555=>'ON', -9556=>'ON', -9557=>'ON', -9558=>'ON', -9559=>'ON', -9560=>'ON', -9561=>'ON', -9562=>'ON', -9563=>'ON', -9564=>'ON', -9565=>'ON', -9566=>'ON', -9567=>'ON', -9568=>'ON', -9569=>'ON', -9570=>'ON', -9571=>'ON', -9572=>'ON', -9573=>'ON', -9574=>'ON', -9575=>'ON', -9576=>'ON', -9577=>'ON', -9578=>'ON', -9579=>'ON', -9580=>'ON', -9581=>'ON', -9582=>'ON', -9583=>'ON', -9584=>'ON', -9585=>'ON', -9586=>'ON', -9587=>'ON', -9588=>'ON', -9589=>'ON', -9590=>'ON', -9591=>'ON', -9592=>'ON', -9593=>'ON', -9594=>'ON', -9595=>'ON', -9596=>'ON', -9597=>'ON', -9598=>'ON', -9599=>'ON', -9600=>'ON', -9601=>'ON', -9602=>'ON', -9603=>'ON', -9604=>'ON', -9605=>'ON', -9606=>'ON', -9607=>'ON', -9608=>'ON', -9609=>'ON', -9610=>'ON', -9611=>'ON', -9612=>'ON', -9613=>'ON', -9614=>'ON', -9615=>'ON', -9616=>'ON', -9617=>'ON', -9618=>'ON', -9619=>'ON', -9620=>'ON', -9621=>'ON', -9622=>'ON', -9623=>'ON', -9624=>'ON', -9625=>'ON', -9626=>'ON', -9627=>'ON', -9628=>'ON', -9629=>'ON', -9630=>'ON', -9631=>'ON', -9632=>'ON', -9633=>'ON', -9634=>'ON', -9635=>'ON', -9636=>'ON', -9637=>'ON', -9638=>'ON', -9639=>'ON', -9640=>'ON', -9641=>'ON', -9642=>'ON', -9643=>'ON', -9644=>'ON', -9645=>'ON', -9646=>'ON', -9647=>'ON', -9648=>'ON', -9649=>'ON', -9650=>'ON', -9651=>'ON', -9652=>'ON', -9653=>'ON', -9654=>'ON', -9655=>'ON', -9656=>'ON', -9657=>'ON', -9658=>'ON', -9659=>'ON', -9660=>'ON', -9661=>'ON', -9662=>'ON', -9663=>'ON', -9664=>'ON', -9665=>'ON', -9666=>'ON', -9667=>'ON', -9668=>'ON', -9669=>'ON', -9670=>'ON', -9671=>'ON', -9672=>'ON', -9673=>'ON', -9674=>'ON', -9675=>'ON', -9676=>'ON', -9677=>'ON', -9678=>'ON', -9679=>'ON', -9680=>'ON', -9681=>'ON', -9682=>'ON', -9683=>'ON', -9684=>'ON', -9685=>'ON', -9686=>'ON', -9687=>'ON', -9688=>'ON', -9689=>'ON', -9690=>'ON', -9691=>'ON', -9692=>'ON', -9693=>'ON', -9694=>'ON', -9695=>'ON', -9696=>'ON', -9697=>'ON', -9698=>'ON', -9699=>'ON', -9700=>'ON', -9701=>'ON', -9702=>'ON', -9703=>'ON', -9704=>'ON', -9705=>'ON', -9706=>'ON', -9707=>'ON', -9708=>'ON', -9709=>'ON', -9710=>'ON', -9711=>'ON', -9712=>'ON', -9713=>'ON', -9714=>'ON', -9715=>'ON', -9716=>'ON', -9717=>'ON', -9718=>'ON', -9719=>'ON', -9720=>'ON', -9721=>'ON', -9722=>'ON', -9723=>'ON', -9724=>'ON', -9725=>'ON', -9726=>'ON', -9727=>'ON', -9728=>'ON', -9729=>'ON', -9730=>'ON', -9731=>'ON', -9732=>'ON', -9733=>'ON', -9734=>'ON', -9735=>'ON', -9736=>'ON', -9737=>'ON', -9738=>'ON', -9739=>'ON', -9740=>'ON', -9741=>'ON', -9742=>'ON', -9743=>'ON', -9744=>'ON', -9745=>'ON', -9746=>'ON', -9747=>'ON', -9748=>'ON', -9749=>'ON', -9750=>'ON', -9751=>'ON', -9752=>'ON', -9753=>'ON', -9754=>'ON', -9755=>'ON', -9756=>'ON', -9757=>'ON', -9758=>'ON', -9759=>'ON', -9760=>'ON', -9761=>'ON', -9762=>'ON', -9763=>'ON', -9764=>'ON', -9765=>'ON', -9766=>'ON', -9767=>'ON', -9768=>'ON', -9769=>'ON', -9770=>'ON', -9771=>'ON', -9772=>'ON', -9773=>'ON', -9774=>'ON', -9775=>'ON', -9776=>'ON', -9777=>'ON', -9778=>'ON', -9779=>'ON', -9780=>'ON', -9781=>'ON', -9782=>'ON', -9783=>'ON', -9784=>'ON', -9785=>'ON', -9786=>'ON', -9787=>'ON', -9788=>'ON', -9789=>'ON', -9790=>'ON', -9791=>'ON', -9792=>'ON', -9793=>'ON', -9794=>'ON', -9795=>'ON', -9796=>'ON', -9797=>'ON', -9798=>'ON', -9799=>'ON', -9800=>'ON', -9801=>'ON', -9802=>'ON', -9803=>'ON', -9804=>'ON', -9805=>'ON', -9806=>'ON', -9807=>'ON', -9808=>'ON', -9809=>'ON', -9810=>'ON', -9811=>'ON', -9812=>'ON', -9813=>'ON', -9814=>'ON', -9815=>'ON', -9816=>'ON', -9817=>'ON', -9818=>'ON', -9819=>'ON', -9820=>'ON', -9821=>'ON', -9822=>'ON', -9823=>'ON', -9824=>'ON', -9825=>'ON', -9826=>'ON', -9827=>'ON', -9828=>'ON', -9829=>'ON', -9830=>'ON', -9831=>'ON', -9832=>'ON', -9833=>'ON', -9834=>'ON', -9835=>'ON', -9836=>'ON', -9837=>'ON', -9838=>'ON', -9839=>'ON', -9840=>'ON', -9841=>'ON', -9842=>'ON', -9843=>'ON', -9844=>'ON', -9845=>'ON', -9846=>'ON', -9847=>'ON', -9848=>'ON', -9849=>'ON', -9850=>'ON', -9851=>'ON', -9852=>'ON', -9853=>'ON', -9854=>'ON', -9855=>'ON', -9856=>'ON', -9857=>'ON', -9858=>'ON', -9859=>'ON', -9860=>'ON', -9861=>'ON', -9862=>'ON', -9863=>'ON', -9864=>'ON', -9865=>'ON', -9866=>'ON', -9867=>'ON', -9868=>'ON', -9869=>'ON', -9870=>'ON', -9871=>'ON', -9872=>'ON', -9873=>'ON', -9874=>'ON', -9875=>'ON', -9876=>'ON', -9877=>'ON', -9878=>'ON', -9879=>'ON', -9880=>'ON', -9881=>'ON', -9882=>'ON', -9883=>'ON', -9884=>'ON', -9888=>'ON', -9889=>'ON', -9890=>'ON', -9891=>'ON', -9892=>'ON', -9893=>'ON', -9894=>'ON', -9895=>'ON', -9896=>'ON', -9897=>'ON', -9898=>'ON', -9899=>'ON', -9900=>'L', -9901=>'ON', -9902=>'ON', -9903=>'ON', -9904=>'ON', -9905=>'ON', -9906=>'ON', -9985=>'ON', -9986=>'ON', -9987=>'ON', -9988=>'ON', -9990=>'ON', -9991=>'ON', -9992=>'ON', -9993=>'ON', -9996=>'ON', -9997=>'ON', -9998=>'ON', -9999=>'ON', -10000=>'ON', -10001=>'ON', -10002=>'ON', -10003=>'ON', -10004=>'ON', -10005=>'ON', -10006=>'ON', -10007=>'ON', -10008=>'ON', -10009=>'ON', -10010=>'ON', -10011=>'ON', -10012=>'ON', -10013=>'ON', -10014=>'ON', -10015=>'ON', -10016=>'ON', -10017=>'ON', -10018=>'ON', -10019=>'ON', -10020=>'ON', -10021=>'ON', -10022=>'ON', -10023=>'ON', -10025=>'ON', -10026=>'ON', -10027=>'ON', -10028=>'ON', -10029=>'ON', -10030=>'ON', -10031=>'ON', -10032=>'ON', -10033=>'ON', -10034=>'ON', -10035=>'ON', -10036=>'ON', -10037=>'ON', -10038=>'ON', -10039=>'ON', -10040=>'ON', -10041=>'ON', -10042=>'ON', -10043=>'ON', -10044=>'ON', -10045=>'ON', -10046=>'ON', -10047=>'ON', -10048=>'ON', -10049=>'ON', -10050=>'ON', -10051=>'ON', -10052=>'ON', -10053=>'ON', -10054=>'ON', -10055=>'ON', -10056=>'ON', -10057=>'ON', -10058=>'ON', -10059=>'ON', -10061=>'ON', -10063=>'ON', -10064=>'ON', -10065=>'ON', -10066=>'ON', -10070=>'ON', -10072=>'ON', -10073=>'ON', -10074=>'ON', -10075=>'ON', -10076=>'ON', -10077=>'ON', -10078=>'ON', -10081=>'ON', -10082=>'ON', -10083=>'ON', -10084=>'ON', -10085=>'ON', -10086=>'ON', -10087=>'ON', -10088=>'ON', -10089=>'ON', -10090=>'ON', -10091=>'ON', -10092=>'ON', -10093=>'ON', -10094=>'ON', -10095=>'ON', -10096=>'ON', -10097=>'ON', -10098=>'ON', -10099=>'ON', -10100=>'ON', -10101=>'ON', -10102=>'ON', -10103=>'ON', -10104=>'ON', -10105=>'ON', -10106=>'ON', -10107=>'ON', -10108=>'ON', -10109=>'ON', -10110=>'ON', -10111=>'ON', -10112=>'ON', -10113=>'ON', -10114=>'ON', -10115=>'ON', -10116=>'ON', -10117=>'ON', -10118=>'ON', -10119=>'ON', -10120=>'ON', -10121=>'ON', -10122=>'ON', -10123=>'ON', -10124=>'ON', -10125=>'ON', -10126=>'ON', -10127=>'ON', -10128=>'ON', -10129=>'ON', -10130=>'ON', -10131=>'ON', -10132=>'ON', -10136=>'ON', -10137=>'ON', -10138=>'ON', -10139=>'ON', -10140=>'ON', -10141=>'ON', -10142=>'ON', -10143=>'ON', -10144=>'ON', -10145=>'ON', -10146=>'ON', -10147=>'ON', -10148=>'ON', -10149=>'ON', -10150=>'ON', -10151=>'ON', -10152=>'ON', -10153=>'ON', -10154=>'ON', -10155=>'ON', -10156=>'ON', -10157=>'ON', -10158=>'ON', -10159=>'ON', -10161=>'ON', -10162=>'ON', -10163=>'ON', -10164=>'ON', -10165=>'ON', -10166=>'ON', -10167=>'ON', -10168=>'ON', -10169=>'ON', -10170=>'ON', -10171=>'ON', -10172=>'ON', -10173=>'ON', -10174=>'ON', -10176=>'ON', -10177=>'ON', -10178=>'ON', -10179=>'ON', -10180=>'ON', -10181=>'ON', -10182=>'ON', -10183=>'ON', -10184=>'ON', -10185=>'ON', -10186=>'ON', -10192=>'ON', -10193=>'ON', -10194=>'ON', -10195=>'ON', -10196=>'ON', -10197=>'ON', -10198=>'ON', -10199=>'ON', -10200=>'ON', -10201=>'ON', -10202=>'ON', -10203=>'ON', -10204=>'ON', -10205=>'ON', -10206=>'ON', -10207=>'ON', -10208=>'ON', -10209=>'ON', -10210=>'ON', -10211=>'ON', -10212=>'ON', -10213=>'ON', -10214=>'ON', -10215=>'ON', -10216=>'ON', -10217=>'ON', -10218=>'ON', -10219=>'ON', -10224=>'ON', -10225=>'ON', -10226=>'ON', -10227=>'ON', -10228=>'ON', -10229=>'ON', -10230=>'ON', -10231=>'ON', -10232=>'ON', -10233=>'ON', -10234=>'ON', -10235=>'ON', -10236=>'ON', -10237=>'ON', -10238=>'ON', -10239=>'ON', -10240=>'L', -10241=>'L', -10242=>'L', -10243=>'L', -10244=>'L', -10245=>'L', -10246=>'L', -10247=>'L', -10248=>'L', -10249=>'L', -10250=>'L', -10251=>'L', -10252=>'L', -10253=>'L', -10254=>'L', -10255=>'L', -10256=>'L', -10257=>'L', -10258=>'L', -10259=>'L', -10260=>'L', -10261=>'L', -10262=>'L', -10263=>'L', -10264=>'L', -10265=>'L', -10266=>'L', -10267=>'L', -10268=>'L', -10269=>'L', -10270=>'L', -10271=>'L', -10272=>'L', -10273=>'L', -10274=>'L', -10275=>'L', -10276=>'L', -10277=>'L', -10278=>'L', -10279=>'L', -10280=>'L', -10281=>'L', -10282=>'L', -10283=>'L', -10284=>'L', -10285=>'L', -10286=>'L', -10287=>'L', -10288=>'L', -10289=>'L', -10290=>'L', -10291=>'L', -10292=>'L', -10293=>'L', -10294=>'L', -10295=>'L', -10296=>'L', -10297=>'L', -10298=>'L', -10299=>'L', -10300=>'L', -10301=>'L', -10302=>'L', -10303=>'L', -10304=>'L', -10305=>'L', -10306=>'L', -10307=>'L', -10308=>'L', -10309=>'L', -10310=>'L', -10311=>'L', -10312=>'L', -10313=>'L', -10314=>'L', -10315=>'L', -10316=>'L', -10317=>'L', -10318=>'L', -10319=>'L', -10320=>'L', -10321=>'L', -10322=>'L', -10323=>'L', -10324=>'L', -10325=>'L', -10326=>'L', -10327=>'L', -10328=>'L', -10329=>'L', -10330=>'L', -10331=>'L', -10332=>'L', -10333=>'L', -10334=>'L', -10335=>'L', -10336=>'L', -10337=>'L', -10338=>'L', -10339=>'L', -10340=>'L', -10341=>'L', -10342=>'L', -10343=>'L', -10344=>'L', -10345=>'L', -10346=>'L', -10347=>'L', -10348=>'L', -10349=>'L', -10350=>'L', -10351=>'L', -10352=>'L', -10353=>'L', -10354=>'L', -10355=>'L', -10356=>'L', -10357=>'L', -10358=>'L', -10359=>'L', -10360=>'L', -10361=>'L', -10362=>'L', -10363=>'L', -10364=>'L', -10365=>'L', -10366=>'L', -10367=>'L', -10368=>'L', -10369=>'L', -10370=>'L', -10371=>'L', -10372=>'L', -10373=>'L', -10374=>'L', -10375=>'L', -10376=>'L', -10377=>'L', -10378=>'L', -10379=>'L', -10380=>'L', -10381=>'L', -10382=>'L', -10383=>'L', -10384=>'L', -10385=>'L', -10386=>'L', -10387=>'L', -10388=>'L', -10389=>'L', -10390=>'L', -10391=>'L', -10392=>'L', -10393=>'L', -10394=>'L', -10395=>'L', -10396=>'L', -10397=>'L', -10398=>'L', -10399=>'L', -10400=>'L', -10401=>'L', -10402=>'L', -10403=>'L', -10404=>'L', -10405=>'L', -10406=>'L', -10407=>'L', -10408=>'L', -10409=>'L', -10410=>'L', -10411=>'L', -10412=>'L', -10413=>'L', -10414=>'L', -10415=>'L', -10416=>'L', -10417=>'L', -10418=>'L', -10419=>'L', -10420=>'L', -10421=>'L', -10422=>'L', -10423=>'L', -10424=>'L', -10425=>'L', -10426=>'L', -10427=>'L', -10428=>'L', -10429=>'L', -10430=>'L', -10431=>'L', -10432=>'L', -10433=>'L', -10434=>'L', -10435=>'L', -10436=>'L', -10437=>'L', -10438=>'L', -10439=>'L', -10440=>'L', -10441=>'L', -10442=>'L', -10443=>'L', -10444=>'L', -10445=>'L', -10446=>'L', -10447=>'L', -10448=>'L', -10449=>'L', -10450=>'L', -10451=>'L', -10452=>'L', -10453=>'L', -10454=>'L', -10455=>'L', -10456=>'L', -10457=>'L', -10458=>'L', -10459=>'L', -10460=>'L', -10461=>'L', -10462=>'L', -10463=>'L', -10464=>'L', -10465=>'L', -10466=>'L', -10467=>'L', -10468=>'L', -10469=>'L', -10470=>'L', -10471=>'L', -10472=>'L', -10473=>'L', -10474=>'L', -10475=>'L', -10476=>'L', -10477=>'L', -10478=>'L', -10479=>'L', -10480=>'L', -10481=>'L', -10482=>'L', -10483=>'L', -10484=>'L', -10485=>'L', -10486=>'L', -10487=>'L', -10488=>'L', -10489=>'L', -10490=>'L', -10491=>'L', -10492=>'L', -10493=>'L', -10494=>'L', -10495=>'L', -10496=>'ON', -10497=>'ON', -10498=>'ON', -10499=>'ON', -10500=>'ON', -10501=>'ON', -10502=>'ON', -10503=>'ON', -10504=>'ON', -10505=>'ON', -10506=>'ON', -10507=>'ON', -10508=>'ON', -10509=>'ON', -10510=>'ON', -10511=>'ON', -10512=>'ON', -10513=>'ON', -10514=>'ON', -10515=>'ON', -10516=>'ON', -10517=>'ON', -10518=>'ON', -10519=>'ON', -10520=>'ON', -10521=>'ON', -10522=>'ON', -10523=>'ON', -10524=>'ON', -10525=>'ON', -10526=>'ON', -10527=>'ON', -10528=>'ON', -10529=>'ON', -10530=>'ON', -10531=>'ON', -10532=>'ON', -10533=>'ON', -10534=>'ON', -10535=>'ON', -10536=>'ON', -10537=>'ON', -10538=>'ON', -10539=>'ON', -10540=>'ON', -10541=>'ON', -10542=>'ON', -10543=>'ON', -10544=>'ON', -10545=>'ON', -10546=>'ON', -10547=>'ON', -10548=>'ON', -10549=>'ON', -10550=>'ON', -10551=>'ON', -10552=>'ON', -10553=>'ON', -10554=>'ON', -10555=>'ON', -10556=>'ON', -10557=>'ON', -10558=>'ON', -10559=>'ON', -10560=>'ON', -10561=>'ON', -10562=>'ON', -10563=>'ON', -10564=>'ON', -10565=>'ON', -10566=>'ON', -10567=>'ON', -10568=>'ON', -10569=>'ON', -10570=>'ON', -10571=>'ON', -10572=>'ON', -10573=>'ON', -10574=>'ON', -10575=>'ON', -10576=>'ON', -10577=>'ON', -10578=>'ON', -10579=>'ON', -10580=>'ON', -10581=>'ON', -10582=>'ON', -10583=>'ON', -10584=>'ON', -10585=>'ON', -10586=>'ON', -10587=>'ON', -10588=>'ON', -10589=>'ON', -10590=>'ON', -10591=>'ON', -10592=>'ON', -10593=>'ON', -10594=>'ON', -10595=>'ON', -10596=>'ON', -10597=>'ON', -10598=>'ON', -10599=>'ON', -10600=>'ON', -10601=>'ON', -10602=>'ON', -10603=>'ON', -10604=>'ON', -10605=>'ON', -10606=>'ON', -10607=>'ON', -10608=>'ON', -10609=>'ON', -10610=>'ON', -10611=>'ON', -10612=>'ON', -10613=>'ON', -10614=>'ON', -10615=>'ON', -10616=>'ON', -10617=>'ON', -10618=>'ON', -10619=>'ON', -10620=>'ON', -10621=>'ON', -10622=>'ON', -10623=>'ON', -10624=>'ON', -10625=>'ON', -10626=>'ON', -10627=>'ON', -10628=>'ON', -10629=>'ON', -10630=>'ON', -10631=>'ON', -10632=>'ON', -10633=>'ON', -10634=>'ON', -10635=>'ON', -10636=>'ON', -10637=>'ON', -10638=>'ON', -10639=>'ON', -10640=>'ON', -10641=>'ON', -10642=>'ON', -10643=>'ON', -10644=>'ON', -10645=>'ON', -10646=>'ON', -10647=>'ON', -10648=>'ON', -10649=>'ON', -10650=>'ON', -10651=>'ON', -10652=>'ON', -10653=>'ON', -10654=>'ON', -10655=>'ON', -10656=>'ON', -10657=>'ON', -10658=>'ON', -10659=>'ON', -10660=>'ON', -10661=>'ON', -10662=>'ON', -10663=>'ON', -10664=>'ON', -10665=>'ON', -10666=>'ON', -10667=>'ON', -10668=>'ON', -10669=>'ON', -10670=>'ON', -10671=>'ON', -10672=>'ON', -10673=>'ON', -10674=>'ON', -10675=>'ON', -10676=>'ON', -10677=>'ON', -10678=>'ON', -10679=>'ON', -10680=>'ON', -10681=>'ON', -10682=>'ON', -10683=>'ON', -10684=>'ON', -10685=>'ON', -10686=>'ON', -10687=>'ON', -10688=>'ON', -10689=>'ON', -10690=>'ON', -10691=>'ON', -10692=>'ON', -10693=>'ON', -10694=>'ON', -10695=>'ON', -10696=>'ON', -10697=>'ON', -10698=>'ON', -10699=>'ON', -10700=>'ON', -10701=>'ON', -10702=>'ON', -10703=>'ON', -10704=>'ON', -10705=>'ON', -10706=>'ON', -10707=>'ON', -10708=>'ON', -10709=>'ON', -10710=>'ON', -10711=>'ON', -10712=>'ON', -10713=>'ON', -10714=>'ON', -10715=>'ON', -10716=>'ON', -10717=>'ON', -10718=>'ON', -10719=>'ON', -10720=>'ON', -10721=>'ON', -10722=>'ON', -10723=>'ON', -10724=>'ON', -10725=>'ON', -10726=>'ON', -10727=>'ON', -10728=>'ON', -10729=>'ON', -10730=>'ON', -10731=>'ON', -10732=>'ON', -10733=>'ON', -10734=>'ON', -10735=>'ON', -10736=>'ON', -10737=>'ON', -10738=>'ON', -10739=>'ON', -10740=>'ON', -10741=>'ON', -10742=>'ON', -10743=>'ON', -10744=>'ON', -10745=>'ON', -10746=>'ON', -10747=>'ON', -10748=>'ON', -10749=>'ON', -10750=>'ON', -10751=>'ON', -10752=>'ON', -10753=>'ON', -10754=>'ON', -10755=>'ON', -10756=>'ON', -10757=>'ON', -10758=>'ON', -10759=>'ON', -10760=>'ON', -10761=>'ON', -10762=>'ON', -10763=>'ON', -10764=>'ON', -10765=>'ON', -10766=>'ON', -10767=>'ON', -10768=>'ON', -10769=>'ON', -10770=>'ON', -10771=>'ON', -10772=>'ON', -10773=>'ON', -10774=>'ON', -10775=>'ON', -10776=>'ON', -10777=>'ON', -10778=>'ON', -10779=>'ON', -10780=>'ON', -10781=>'ON', -10782=>'ON', -10783=>'ON', -10784=>'ON', -10785=>'ON', -10786=>'ON', -10787=>'ON', -10788=>'ON', -10789=>'ON', -10790=>'ON', -10791=>'ON', -10792=>'ON', -10793=>'ON', -10794=>'ON', -10795=>'ON', -10796=>'ON', -10797=>'ON', -10798=>'ON', -10799=>'ON', -10800=>'ON', -10801=>'ON', -10802=>'ON', -10803=>'ON', -10804=>'ON', -10805=>'ON', -10806=>'ON', -10807=>'ON', -10808=>'ON', -10809=>'ON', -10810=>'ON', -10811=>'ON', -10812=>'ON', -10813=>'ON', -10814=>'ON', -10815=>'ON', -10816=>'ON', -10817=>'ON', -10818=>'ON', -10819=>'ON', -10820=>'ON', -10821=>'ON', -10822=>'ON', -10823=>'ON', -10824=>'ON', -10825=>'ON', -10826=>'ON', -10827=>'ON', -10828=>'ON', -10829=>'ON', -10830=>'ON', -10831=>'ON', -10832=>'ON', -10833=>'ON', -10834=>'ON', -10835=>'ON', -10836=>'ON', -10837=>'ON', -10838=>'ON', -10839=>'ON', -10840=>'ON', -10841=>'ON', -10842=>'ON', -10843=>'ON', -10844=>'ON', -10845=>'ON', -10846=>'ON', -10847=>'ON', -10848=>'ON', -10849=>'ON', -10850=>'ON', -10851=>'ON', -10852=>'ON', -10853=>'ON', -10854=>'ON', -10855=>'ON', -10856=>'ON', -10857=>'ON', -10858=>'ON', -10859=>'ON', -10860=>'ON', -10861=>'ON', -10862=>'ON', -10863=>'ON', -10864=>'ON', -10865=>'ON', -10866=>'ON', -10867=>'ON', -10868=>'ON', -10869=>'ON', -10870=>'ON', -10871=>'ON', -10872=>'ON', -10873=>'ON', -10874=>'ON', -10875=>'ON', -10876=>'ON', -10877=>'ON', -10878=>'ON', -10879=>'ON', -10880=>'ON', -10881=>'ON', -10882=>'ON', -10883=>'ON', -10884=>'ON', -10885=>'ON', -10886=>'ON', -10887=>'ON', -10888=>'ON', -10889=>'ON', -10890=>'ON', -10891=>'ON', -10892=>'ON', -10893=>'ON', -10894=>'ON', -10895=>'ON', -10896=>'ON', -10897=>'ON', -10898=>'ON', -10899=>'ON', -10900=>'ON', -10901=>'ON', -10902=>'ON', -10903=>'ON', -10904=>'ON', -10905=>'ON', -10906=>'ON', -10907=>'ON', -10908=>'ON', -10909=>'ON', -10910=>'ON', -10911=>'ON', -10912=>'ON', -10913=>'ON', -10914=>'ON', -10915=>'ON', -10916=>'ON', -10917=>'ON', -10918=>'ON', -10919=>'ON', -10920=>'ON', -10921=>'ON', -10922=>'ON', -10923=>'ON', -10924=>'ON', -10925=>'ON', -10926=>'ON', -10927=>'ON', -10928=>'ON', -10929=>'ON', -10930=>'ON', -10931=>'ON', -10932=>'ON', -10933=>'ON', -10934=>'ON', -10935=>'ON', -10936=>'ON', -10937=>'ON', -10938=>'ON', -10939=>'ON', -10940=>'ON', -10941=>'ON', -10942=>'ON', -10943=>'ON', -10944=>'ON', -10945=>'ON', -10946=>'ON', -10947=>'ON', -10948=>'ON', -10949=>'ON', -10950=>'ON', -10951=>'ON', -10952=>'ON', -10953=>'ON', -10954=>'ON', -10955=>'ON', -10956=>'ON', -10957=>'ON', -10958=>'ON', -10959=>'ON', -10960=>'ON', -10961=>'ON', -10962=>'ON', -10963=>'ON', -10964=>'ON', -10965=>'ON', -10966=>'ON', -10967=>'ON', -10968=>'ON', -10969=>'ON', -10970=>'ON', -10971=>'ON', -10972=>'ON', -10973=>'ON', -10974=>'ON', -10975=>'ON', -10976=>'ON', -10977=>'ON', -10978=>'ON', -10979=>'ON', -10980=>'ON', -10981=>'ON', -10982=>'ON', -10983=>'ON', -10984=>'ON', -10985=>'ON', -10986=>'ON', -10987=>'ON', -10988=>'ON', -10989=>'ON', -10990=>'ON', -10991=>'ON', -10992=>'ON', -10993=>'ON', -10994=>'ON', -10995=>'ON', -10996=>'ON', -10997=>'ON', -10998=>'ON', -10999=>'ON', -11000=>'ON', -11001=>'ON', -11002=>'ON', -11003=>'ON', -11004=>'ON', -11005=>'ON', -11006=>'ON', -11007=>'ON', -11008=>'ON', -11009=>'ON', -11010=>'ON', -11011=>'ON', -11012=>'ON', -11013=>'ON', -11014=>'ON', -11015=>'ON', -11016=>'ON', -11017=>'ON', -11018=>'ON', -11019=>'ON', -11020=>'ON', -11021=>'ON', -11022=>'ON', -11023=>'ON', -11024=>'ON', -11025=>'ON', -11026=>'ON', -11027=>'ON', -11028=>'ON', -11029=>'ON', -11030=>'ON', -11031=>'ON', -11032=>'ON', -11033=>'ON', -11034=>'ON', -11040=>'ON', -11041=>'ON', -11042=>'ON', -11043=>'ON', -11264=>'L', -11265=>'L', -11266=>'L', -11267=>'L', -11268=>'L', -11269=>'L', -11270=>'L', -11271=>'L', -11272=>'L', -11273=>'L', -11274=>'L', -11275=>'L', -11276=>'L', -11277=>'L', -11278=>'L', -11279=>'L', -11280=>'L', -11281=>'L', -11282=>'L', -11283=>'L', -11284=>'L', -11285=>'L', -11286=>'L', -11287=>'L', -11288=>'L', -11289=>'L', -11290=>'L', -11291=>'L', -11292=>'L', -11293=>'L', -11294=>'L', -11295=>'L', -11296=>'L', -11297=>'L', -11298=>'L', -11299=>'L', -11300=>'L', -11301=>'L', -11302=>'L', -11303=>'L', -11304=>'L', -11305=>'L', -11306=>'L', -11307=>'L', -11308=>'L', -11309=>'L', -11310=>'L', -11312=>'L', -11313=>'L', -11314=>'L', -11315=>'L', -11316=>'L', -11317=>'L', -11318=>'L', -11319=>'L', -11320=>'L', -11321=>'L', -11322=>'L', -11323=>'L', -11324=>'L', -11325=>'L', -11326=>'L', -11327=>'L', -11328=>'L', -11329=>'L', -11330=>'L', -11331=>'L', -11332=>'L', -11333=>'L', -11334=>'L', -11335=>'L', -11336=>'L', -11337=>'L', -11338=>'L', -11339=>'L', -11340=>'L', -11341=>'L', -11342=>'L', -11343=>'L', -11344=>'L', -11345=>'L', -11346=>'L', -11347=>'L', -11348=>'L', -11349=>'L', -11350=>'L', -11351=>'L', -11352=>'L', -11353=>'L', -11354=>'L', -11355=>'L', -11356=>'L', -11357=>'L', -11358=>'L', -11360=>'L', -11361=>'L', -11362=>'L', -11363=>'L', -11364=>'L', -11365=>'L', -11366=>'L', -11367=>'L', -11368=>'L', -11369=>'L', -11370=>'L', -11371=>'L', -11372=>'L', -11380=>'L', -11381=>'L', -11382=>'L', -11383=>'L', -11392=>'L', -11393=>'L', -11394=>'L', -11395=>'L', -11396=>'L', -11397=>'L', -11398=>'L', -11399=>'L', -11400=>'L', -11401=>'L', -11402=>'L', -11403=>'L', -11404=>'L', -11405=>'L', -11406=>'L', -11407=>'L', -11408=>'L', -11409=>'L', -11410=>'L', -11411=>'L', -11412=>'L', -11413=>'L', -11414=>'L', -11415=>'L', -11416=>'L', -11417=>'L', -11418=>'L', -11419=>'L', -11420=>'L', -11421=>'L', -11422=>'L', -11423=>'L', -11424=>'L', -11425=>'L', -11426=>'L', -11427=>'L', -11428=>'L', -11429=>'L', -11430=>'L', -11431=>'L', -11432=>'L', -11433=>'L', -11434=>'L', -11435=>'L', -11436=>'L', -11437=>'L', -11438=>'L', -11439=>'L', -11440=>'L', -11441=>'L', -11442=>'L', -11443=>'L', -11444=>'L', -11445=>'L', -11446=>'L', -11447=>'L', -11448=>'L', -11449=>'L', -11450=>'L', -11451=>'L', -11452=>'L', -11453=>'L', -11454=>'L', -11455=>'L', -11456=>'L', -11457=>'L', -11458=>'L', -11459=>'L', -11460=>'L', -11461=>'L', -11462=>'L', -11463=>'L', -11464=>'L', -11465=>'L', -11466=>'L', -11467=>'L', -11468=>'L', -11469=>'L', -11470=>'L', -11471=>'L', -11472=>'L', -11473=>'L', -11474=>'L', -11475=>'L', -11476=>'L', -11477=>'L', -11478=>'L', -11479=>'L', -11480=>'L', -11481=>'L', -11482=>'L', -11483=>'L', -11484=>'L', -11485=>'L', -11486=>'L', -11487=>'L', -11488=>'L', -11489=>'L', -11490=>'L', -11491=>'L', -11492=>'L', -11493=>'ON', -11494=>'ON', -11495=>'ON', -11496=>'ON', -11497=>'ON', -11498=>'ON', -11513=>'ON', -11514=>'ON', -11515=>'ON', -11516=>'ON', -11517=>'ON', -11518=>'ON', -11519=>'ON', -11520=>'L', -11521=>'L', -11522=>'L', -11523=>'L', -11524=>'L', -11525=>'L', -11526=>'L', -11527=>'L', -11528=>'L', -11529=>'L', -11530=>'L', -11531=>'L', -11532=>'L', -11533=>'L', -11534=>'L', -11535=>'L', -11536=>'L', -11537=>'L', -11538=>'L', -11539=>'L', -11540=>'L', -11541=>'L', -11542=>'L', -11543=>'L', -11544=>'L', -11545=>'L', -11546=>'L', -11547=>'L', -11548=>'L', -11549=>'L', -11550=>'L', -11551=>'L', -11552=>'L', -11553=>'L', -11554=>'L', -11555=>'L', -11556=>'L', -11557=>'L', -11568=>'L', -11569=>'L', -11570=>'L', -11571=>'L', -11572=>'L', -11573=>'L', -11574=>'L', -11575=>'L', -11576=>'L', -11577=>'L', -11578=>'L', -11579=>'L', -11580=>'L', -11581=>'L', -11582=>'L', -11583=>'L', -11584=>'L', -11585=>'L', -11586=>'L', -11587=>'L', -11588=>'L', -11589=>'L', -11590=>'L', -11591=>'L', -11592=>'L', -11593=>'L', -11594=>'L', -11595=>'L', -11596=>'L', -11597=>'L', -11598=>'L', -11599=>'L', -11600=>'L', -11601=>'L', -11602=>'L', -11603=>'L', -11604=>'L', -11605=>'L', -11606=>'L', -11607=>'L', -11608=>'L', -11609=>'L', -11610=>'L', -11611=>'L', -11612=>'L', -11613=>'L', -11614=>'L', -11615=>'L', -11616=>'L', -11617=>'L', -11618=>'L', -11619=>'L', -11620=>'L', -11621=>'L', -11631=>'L', -11648=>'L', -11649=>'L', -11650=>'L', -11651=>'L', -11652=>'L', -11653=>'L', -11654=>'L', -11655=>'L', -11656=>'L', -11657=>'L', -11658=>'L', -11659=>'L', -11660=>'L', -11661=>'L', -11662=>'L', -11663=>'L', -11664=>'L', -11665=>'L', -11666=>'L', -11667=>'L', -11668=>'L', -11669=>'L', -11670=>'L', -11680=>'L', -11681=>'L', -11682=>'L', -11683=>'L', -11684=>'L', -11685=>'L', -11686=>'L', -11688=>'L', -11689=>'L', -11690=>'L', -11691=>'L', -11692=>'L', -11693=>'L', -11694=>'L', -11696=>'L', -11697=>'L', -11698=>'L', -11699=>'L', -11700=>'L', -11701=>'L', -11702=>'L', -11704=>'L', -11705=>'L', -11706=>'L', -11707=>'L', -11708=>'L', -11709=>'L', -11710=>'L', -11712=>'L', -11713=>'L', -11714=>'L', -11715=>'L', -11716=>'L', -11717=>'L', -11718=>'L', -11720=>'L', -11721=>'L', -11722=>'L', -11723=>'L', -11724=>'L', -11725=>'L', -11726=>'L', -11728=>'L', -11729=>'L', -11730=>'L', -11731=>'L', -11732=>'L', -11733=>'L', -11734=>'L', -11736=>'L', -11737=>'L', -11738=>'L', -11739=>'L', -11740=>'L', -11741=>'L', -11742=>'L', -11776=>'ON', -11777=>'ON', -11778=>'ON', -11779=>'ON', -11780=>'ON', -11781=>'ON', -11782=>'ON', -11783=>'ON', -11784=>'ON', -11785=>'ON', -11786=>'ON', -11787=>'ON', -11788=>'ON', -11789=>'ON', -11790=>'ON', -11791=>'ON', -11792=>'ON', -11793=>'ON', -11794=>'ON', -11795=>'ON', -11796=>'ON', -11797=>'ON', -11798=>'ON', -11799=>'ON', -11804=>'ON', -11805=>'ON', -11904=>'ON', -11905=>'ON', -11906=>'ON', -11907=>'ON', -11908=>'ON', -11909=>'ON', -11910=>'ON', -11911=>'ON', -11912=>'ON', -11913=>'ON', -11914=>'ON', -11915=>'ON', -11916=>'ON', -11917=>'ON', -11918=>'ON', -11919=>'ON', -11920=>'ON', -11921=>'ON', -11922=>'ON', -11923=>'ON', -11924=>'ON', -11925=>'ON', -11926=>'ON', -11927=>'ON', -11928=>'ON', -11929=>'ON', -11931=>'ON', -11932=>'ON', -11933=>'ON', -11934=>'ON', -11935=>'ON', -11936=>'ON', -11937=>'ON', -11938=>'ON', -11939=>'ON', -11940=>'ON', -11941=>'ON', -11942=>'ON', -11943=>'ON', -11944=>'ON', -11945=>'ON', -11946=>'ON', -11947=>'ON', -11948=>'ON', -11949=>'ON', -11950=>'ON', -11951=>'ON', -11952=>'ON', -11953=>'ON', -11954=>'ON', -11955=>'ON', -11956=>'ON', -11957=>'ON', -11958=>'ON', -11959=>'ON', -11960=>'ON', -11961=>'ON', -11962=>'ON', -11963=>'ON', -11964=>'ON', -11965=>'ON', -11966=>'ON', -11967=>'ON', -11968=>'ON', -11969=>'ON', -11970=>'ON', -11971=>'ON', -11972=>'ON', -11973=>'ON', -11974=>'ON', -11975=>'ON', -11976=>'ON', -11977=>'ON', -11978=>'ON', -11979=>'ON', -11980=>'ON', -11981=>'ON', -11982=>'ON', -11983=>'ON', -11984=>'ON', -11985=>'ON', -11986=>'ON', -11987=>'ON', -11988=>'ON', -11989=>'ON', -11990=>'ON', -11991=>'ON', -11992=>'ON', -11993=>'ON', -11994=>'ON', -11995=>'ON', -11996=>'ON', -11997=>'ON', -11998=>'ON', -11999=>'ON', -12000=>'ON', -12001=>'ON', -12002=>'ON', -12003=>'ON', -12004=>'ON', -12005=>'ON', -12006=>'ON', -12007=>'ON', -12008=>'ON', -12009=>'ON', -12010=>'ON', -12011=>'ON', -12012=>'ON', -12013=>'ON', -12014=>'ON', -12015=>'ON', -12016=>'ON', -12017=>'ON', -12018=>'ON', -12019=>'ON', -12032=>'ON', -12033=>'ON', -12034=>'ON', -12035=>'ON', -12036=>'ON', -12037=>'ON', -12038=>'ON', -12039=>'ON', -12040=>'ON', -12041=>'ON', -12042=>'ON', -12043=>'ON', -12044=>'ON', -12045=>'ON', -12046=>'ON', -12047=>'ON', -12048=>'ON', -12049=>'ON', -12050=>'ON', -12051=>'ON', -12052=>'ON', -12053=>'ON', -12054=>'ON', -12055=>'ON', -12056=>'ON', -12057=>'ON', -12058=>'ON', -12059=>'ON', -12060=>'ON', -12061=>'ON', -12062=>'ON', -12063=>'ON', -12064=>'ON', -12065=>'ON', -12066=>'ON', -12067=>'ON', -12068=>'ON', -12069=>'ON', -12070=>'ON', -12071=>'ON', -12072=>'ON', -12073=>'ON', -12074=>'ON', -12075=>'ON', -12076=>'ON', -12077=>'ON', -12078=>'ON', -12079=>'ON', -12080=>'ON', -12081=>'ON', -12082=>'ON', -12083=>'ON', -12084=>'ON', -12085=>'ON', -12086=>'ON', -12087=>'ON', -12088=>'ON', -12089=>'ON', -12090=>'ON', -12091=>'ON', -12092=>'ON', -12093=>'ON', -12094=>'ON', -12095=>'ON', -12096=>'ON', -12097=>'ON', -12098=>'ON', -12099=>'ON', -12100=>'ON', -12101=>'ON', -12102=>'ON', -12103=>'ON', -12104=>'ON', -12105=>'ON', -12106=>'ON', -12107=>'ON', -12108=>'ON', -12109=>'ON', -12110=>'ON', -12111=>'ON', -12112=>'ON', -12113=>'ON', -12114=>'ON', -12115=>'ON', -12116=>'ON', -12117=>'ON', -12118=>'ON', -12119=>'ON', -12120=>'ON', -12121=>'ON', -12122=>'ON', -12123=>'ON', -12124=>'ON', -12125=>'ON', -12126=>'ON', -12127=>'ON', -12128=>'ON', -12129=>'ON', -12130=>'ON', -12131=>'ON', -12132=>'ON', -12133=>'ON', -12134=>'ON', -12135=>'ON', -12136=>'ON', -12137=>'ON', -12138=>'ON', -12139=>'ON', -12140=>'ON', -12141=>'ON', -12142=>'ON', -12143=>'ON', -12144=>'ON', -12145=>'ON', -12146=>'ON', -12147=>'ON', -12148=>'ON', -12149=>'ON', -12150=>'ON', -12151=>'ON', -12152=>'ON', -12153=>'ON', -12154=>'ON', -12155=>'ON', -12156=>'ON', -12157=>'ON', -12158=>'ON', -12159=>'ON', -12160=>'ON', -12161=>'ON', -12162=>'ON', -12163=>'ON', -12164=>'ON', -12165=>'ON', -12166=>'ON', -12167=>'ON', -12168=>'ON', -12169=>'ON', -12170=>'ON', -12171=>'ON', -12172=>'ON', -12173=>'ON', -12174=>'ON', -12175=>'ON', -12176=>'ON', -12177=>'ON', -12178=>'ON', -12179=>'ON', -12180=>'ON', -12181=>'ON', -12182=>'ON', -12183=>'ON', -12184=>'ON', -12185=>'ON', -12186=>'ON', -12187=>'ON', -12188=>'ON', -12189=>'ON', -12190=>'ON', -12191=>'ON', -12192=>'ON', -12193=>'ON', -12194=>'ON', -12195=>'ON', -12196=>'ON', -12197=>'ON', -12198=>'ON', -12199=>'ON', -12200=>'ON', -12201=>'ON', -12202=>'ON', -12203=>'ON', -12204=>'ON', -12205=>'ON', -12206=>'ON', -12207=>'ON', -12208=>'ON', -12209=>'ON', -12210=>'ON', -12211=>'ON', -12212=>'ON', -12213=>'ON', -12214=>'ON', -12215=>'ON', -12216=>'ON', -12217=>'ON', -12218=>'ON', -12219=>'ON', -12220=>'ON', -12221=>'ON', -12222=>'ON', -12223=>'ON', -12224=>'ON', -12225=>'ON', -12226=>'ON', -12227=>'ON', -12228=>'ON', -12229=>'ON', -12230=>'ON', -12231=>'ON', -12232=>'ON', -12233=>'ON', -12234=>'ON', -12235=>'ON', -12236=>'ON', -12237=>'ON', -12238=>'ON', -12239=>'ON', -12240=>'ON', -12241=>'ON', -12242=>'ON', -12243=>'ON', -12244=>'ON', -12245=>'ON', -12272=>'ON', -12273=>'ON', -12274=>'ON', -12275=>'ON', -12276=>'ON', -12277=>'ON', -12278=>'ON', -12279=>'ON', -12280=>'ON', -12281=>'ON', -12282=>'ON', -12283=>'ON', -12288=>'WS', -12289=>'ON', -12290=>'ON', -12291=>'ON', -12292=>'ON', -12293=>'L', -12294=>'L', -12295=>'L', -12296=>'ON', -12297=>'ON', -12298=>'ON', -12299=>'ON', -12300=>'ON', -12301=>'ON', -12302=>'ON', -12303=>'ON', -12304=>'ON', -12305=>'ON', -12306=>'ON', -12307=>'ON', -12308=>'ON', -12309=>'ON', -12310=>'ON', -12311=>'ON', -12312=>'ON', -12313=>'ON', -12314=>'ON', -12315=>'ON', -12316=>'ON', -12317=>'ON', -12318=>'ON', -12319=>'ON', -12320=>'ON', -12321=>'L', -12322=>'L', -12323=>'L', -12324=>'L', -12325=>'L', -12326=>'L', -12327=>'L', -12328=>'L', -12329=>'L', -12330=>'NSM', -12331=>'NSM', -12332=>'NSM', -12333=>'NSM', -12334=>'NSM', -12335=>'NSM', -12336=>'ON', -12337=>'L', -12338=>'L', -12339=>'L', -12340=>'L', -12341=>'L', -12342=>'ON', -12343=>'ON', -12344=>'L', -12345=>'L', -12346=>'L', -12347=>'L', -12348=>'L', -12349=>'ON', -12350=>'ON', -12351=>'ON', -12353=>'L', -12354=>'L', -12355=>'L', -12356=>'L', -12357=>'L', -12358=>'L', -12359=>'L', -12360=>'L', -12361=>'L', -12362=>'L', -12363=>'L', -12364=>'L', -12365=>'L', -12366=>'L', -12367=>'L', -12368=>'L', -12369=>'L', -12370=>'L', -12371=>'L', -12372=>'L', -12373=>'L', -12374=>'L', -12375=>'L', -12376=>'L', -12377=>'L', -12378=>'L', -12379=>'L', -12380=>'L', -12381=>'L', -12382=>'L', -12383=>'L', -12384=>'L', -12385=>'L', -12386=>'L', -12387=>'L', -12388=>'L', -12389=>'L', -12390=>'L', -12391=>'L', -12392=>'L', -12393=>'L', -12394=>'L', -12395=>'L', -12396=>'L', -12397=>'L', -12398=>'L', -12399=>'L', -12400=>'L', -12401=>'L', -12402=>'L', -12403=>'L', -12404=>'L', -12405=>'L', -12406=>'L', -12407=>'L', -12408=>'L', -12409=>'L', -12410=>'L', -12411=>'L', -12412=>'L', -12413=>'L', -12414=>'L', -12415=>'L', -12416=>'L', -12417=>'L', -12418=>'L', -12419=>'L', -12420=>'L', -12421=>'L', -12422=>'L', -12423=>'L', -12424=>'L', -12425=>'L', -12426=>'L', -12427=>'L', -12428=>'L', -12429=>'L', -12430=>'L', -12431=>'L', -12432=>'L', -12433=>'L', -12434=>'L', -12435=>'L', -12436=>'L', -12437=>'L', -12438=>'L', -12441=>'NSM', -12442=>'NSM', -12443=>'ON', -12444=>'ON', -12445=>'L', -12446=>'L', -12447=>'L', -12448=>'ON', -12449=>'L', -12450=>'L', -12451=>'L', -12452=>'L', -12453=>'L', -12454=>'L', -12455=>'L', -12456=>'L', -12457=>'L', -12458=>'L', -12459=>'L', -12460=>'L', -12461=>'L', -12462=>'L', -12463=>'L', -12464=>'L', -12465=>'L', -12466=>'L', -12467=>'L', -12468=>'L', -12469=>'L', -12470=>'L', -12471=>'L', -12472=>'L', -12473=>'L', -12474=>'L', -12475=>'L', -12476=>'L', -12477=>'L', -12478=>'L', -12479=>'L', -12480=>'L', -12481=>'L', -12482=>'L', -12483=>'L', -12484=>'L', -12485=>'L', -12486=>'L', -12487=>'L', -12488=>'L', -12489=>'L', -12490=>'L', -12491=>'L', -12492=>'L', -12493=>'L', -12494=>'L', -12495=>'L', -12496=>'L', -12497=>'L', -12498=>'L', -12499=>'L', -12500=>'L', -12501=>'L', -12502=>'L', -12503=>'L', -12504=>'L', -12505=>'L', -12506=>'L', -12507=>'L', -12508=>'L', -12509=>'L', -12510=>'L', -12511=>'L', -12512=>'L', -12513=>'L', -12514=>'L', -12515=>'L', -12516=>'L', -12517=>'L', -12518=>'L', -12519=>'L', -12520=>'L', -12521=>'L', -12522=>'L', -12523=>'L', -12524=>'L', -12525=>'L', -12526=>'L', -12527=>'L', -12528=>'L', -12529=>'L', -12530=>'L', -12531=>'L', -12532=>'L', -12533=>'L', -12534=>'L', -12535=>'L', -12536=>'L', -12537=>'L', -12538=>'L', -12539=>'ON', -12540=>'L', -12541=>'L', -12542=>'L', -12543=>'L', -12549=>'L', -12550=>'L', -12551=>'L', -12552=>'L', -12553=>'L', -12554=>'L', -12555=>'L', -12556=>'L', -12557=>'L', -12558=>'L', -12559=>'L', -12560=>'L', -12561=>'L', -12562=>'L', -12563=>'L', -12564=>'L', -12565=>'L', -12566=>'L', -12567=>'L', -12568=>'L', -12569=>'L', -12570=>'L', -12571=>'L', -12572=>'L', -12573=>'L', -12574=>'L', -12575=>'L', -12576=>'L', -12577=>'L', -12578=>'L', -12579=>'L', -12580=>'L', -12581=>'L', -12582=>'L', -12583=>'L', -12584=>'L', -12585=>'L', -12586=>'L', -12587=>'L', -12588=>'L', -12593=>'L', -12594=>'L', -12595=>'L', -12596=>'L', -12597=>'L', -12598=>'L', -12599=>'L', -12600=>'L', -12601=>'L', -12602=>'L', -12603=>'L', -12604=>'L', -12605=>'L', -12606=>'L', -12607=>'L', -12608=>'L', -12609=>'L', -12610=>'L', -12611=>'L', -12612=>'L', -12613=>'L', -12614=>'L', -12615=>'L', -12616=>'L', -12617=>'L', -12618=>'L', -12619=>'L', -12620=>'L', -12621=>'L', -12622=>'L', -12623=>'L', -12624=>'L', -12625=>'L', -12626=>'L', -12627=>'L', -12628=>'L', -12629=>'L', -12630=>'L', -12631=>'L', -12632=>'L', -12633=>'L', -12634=>'L', -12635=>'L', -12636=>'L', -12637=>'L', -12638=>'L', -12639=>'L', -12640=>'L', -12641=>'L', -12642=>'L', -12643=>'L', -12644=>'L', -12645=>'L', -12646=>'L', -12647=>'L', -12648=>'L', -12649=>'L', -12650=>'L', -12651=>'L', -12652=>'L', -12653=>'L', -12654=>'L', -12655=>'L', -12656=>'L', -12657=>'L', -12658=>'L', -12659=>'L', -12660=>'L', -12661=>'L', -12662=>'L', -12663=>'L', -12664=>'L', -12665=>'L', -12666=>'L', -12667=>'L', -12668=>'L', -12669=>'L', -12670=>'L', -12671=>'L', -12672=>'L', -12673=>'L', -12674=>'L', -12675=>'L', -12676=>'L', -12677=>'L', -12678=>'L', -12679=>'L', -12680=>'L', -12681=>'L', -12682=>'L', -12683=>'L', -12684=>'L', -12685=>'L', -12686=>'L', -12688=>'L', -12689=>'L', -12690=>'L', -12691=>'L', -12692=>'L', -12693=>'L', -12694=>'L', -12695=>'L', -12696=>'L', -12697=>'L', -12698=>'L', -12699=>'L', -12700=>'L', -12701=>'L', -12702=>'L', -12703=>'L', -12704=>'L', -12705=>'L', -12706=>'L', -12707=>'L', -12708=>'L', -12709=>'L', -12710=>'L', -12711=>'L', -12712=>'L', -12713=>'L', -12714=>'L', -12715=>'L', -12716=>'L', -12717=>'L', -12718=>'L', -12719=>'L', -12720=>'L', -12721=>'L', -12722=>'L', -12723=>'L', -12724=>'L', -12725=>'L', -12726=>'L', -12727=>'L', -12736=>'ON', -12737=>'ON', -12738=>'ON', -12739=>'ON', -12740=>'ON', -12741=>'ON', -12742=>'ON', -12743=>'ON', -12744=>'ON', -12745=>'ON', -12746=>'ON', -12747=>'ON', -12748=>'ON', -12749=>'ON', -12750=>'ON', -12751=>'ON', -12784=>'L', -12785=>'L', -12786=>'L', -12787=>'L', -12788=>'L', -12789=>'L', -12790=>'L', -12791=>'L', -12792=>'L', -12793=>'L', -12794=>'L', -12795=>'L', -12796=>'L', -12797=>'L', -12798=>'L', -12799=>'L', -12800=>'L', -12801=>'L', -12802=>'L', -12803=>'L', -12804=>'L', -12805=>'L', -12806=>'L', -12807=>'L', -12808=>'L', -12809=>'L', -12810=>'L', -12811=>'L', -12812=>'L', -12813=>'L', -12814=>'L', -12815=>'L', -12816=>'L', -12817=>'L', -12818=>'L', -12819=>'L', -12820=>'L', -12821=>'L', -12822=>'L', -12823=>'L', -12824=>'L', -12825=>'L', -12826=>'L', -12827=>'L', -12828=>'L', -12829=>'ON', -12830=>'ON', -12832=>'L', -12833=>'L', -12834=>'L', -12835=>'L', -12836=>'L', -12837=>'L', -12838=>'L', -12839=>'L', -12840=>'L', -12841=>'L', -12842=>'L', -12843=>'L', -12844=>'L', -12845=>'L', -12846=>'L', -12847=>'L', -12848=>'L', -12849=>'L', -12850=>'L', -12851=>'L', -12852=>'L', -12853=>'L', -12854=>'L', -12855=>'L', -12856=>'L', -12857=>'L', -12858=>'L', -12859=>'L', -12860=>'L', -12861=>'L', -12862=>'L', -12863=>'L', -12864=>'L', -12865=>'L', -12866=>'L', -12867=>'L', -12880=>'ON', -12881=>'ON', -12882=>'ON', -12883=>'ON', -12884=>'ON', -12885=>'ON', -12886=>'ON', -12887=>'ON', -12888=>'ON', -12889=>'ON', -12890=>'ON', -12891=>'ON', -12892=>'ON', -12893=>'ON', -12894=>'ON', -12895=>'ON', -12896=>'L', -12897=>'L', -12898=>'L', -12899=>'L', -12900=>'L', -12901=>'L', -12902=>'L', -12903=>'L', -12904=>'L', -12905=>'L', -12906=>'L', -12907=>'L', -12908=>'L', -12909=>'L', -12910=>'L', -12911=>'L', -12912=>'L', -12913=>'L', -12914=>'L', -12915=>'L', -12916=>'L', -12917=>'L', -12918=>'L', -12919=>'L', -12920=>'L', -12921=>'L', -12922=>'L', -12923=>'L', -12924=>'ON', -12925=>'ON', -12926=>'ON', -12927=>'L', -12928=>'L', -12929=>'L', -12930=>'L', -12931=>'L', -12932=>'L', -12933=>'L', -12934=>'L', -12935=>'L', -12936=>'L', -12937=>'L', -12938=>'L', -12939=>'L', -12940=>'L', -12941=>'L', -12942=>'L', -12943=>'L', -12944=>'L', -12945=>'L', -12946=>'L', -12947=>'L', -12948=>'L', -12949=>'L', -12950=>'L', -12951=>'L', -12952=>'L', -12953=>'L', -12954=>'L', -12955=>'L', -12956=>'L', -12957=>'L', -12958=>'L', -12959=>'L', -12960=>'L', -12961=>'L', -12962=>'L', -12963=>'L', -12964=>'L', -12965=>'L', -12966=>'L', -12967=>'L', -12968=>'L', -12969=>'L', -12970=>'L', -12971=>'L', -12972=>'L', -12973=>'L', -12974=>'L', -12975=>'L', -12976=>'L', -12977=>'ON', -12978=>'ON', -12979=>'ON', -12980=>'ON', -12981=>'ON', -12982=>'ON', -12983=>'ON', -12984=>'ON', -12985=>'ON', -12986=>'ON', -12987=>'ON', -12988=>'ON', -12989=>'ON', -12990=>'ON', -12991=>'ON', -12992=>'L', -12993=>'L', -12994=>'L', -12995=>'L', -12996=>'L', -12997=>'L', -12998=>'L', -12999=>'L', -13000=>'L', -13001=>'L', -13002=>'L', -13003=>'L', -13004=>'ON', -13005=>'ON', -13006=>'ON', -13007=>'ON', -13008=>'L', -13009=>'L', -13010=>'L', -13011=>'L', -13012=>'L', -13013=>'L', -13014=>'L', -13015=>'L', -13016=>'L', -13017=>'L', -13018=>'L', -13019=>'L', -13020=>'L', -13021=>'L', -13022=>'L', -13023=>'L', -13024=>'L', -13025=>'L', -13026=>'L', -13027=>'L', -13028=>'L', -13029=>'L', -13030=>'L', -13031=>'L', -13032=>'L', -13033=>'L', -13034=>'L', -13035=>'L', -13036=>'L', -13037=>'L', -13038=>'L', -13039=>'L', -13040=>'L', -13041=>'L', -13042=>'L', -13043=>'L', -13044=>'L', -13045=>'L', -13046=>'L', -13047=>'L', -13048=>'L', -13049=>'L', -13050=>'L', -13051=>'L', -13052=>'L', -13053=>'L', -13054=>'L', -13056=>'L', -13057=>'L', -13058=>'L', -13059=>'L', -13060=>'L', -13061=>'L', -13062=>'L', -13063=>'L', -13064=>'L', -13065=>'L', -13066=>'L', -13067=>'L', -13068=>'L', -13069=>'L', -13070=>'L', -13071=>'L', -13072=>'L', -13073=>'L', -13074=>'L', -13075=>'L', -13076=>'L', -13077=>'L', -13078=>'L', -13079=>'L', -13080=>'L', -13081=>'L', -13082=>'L', -13083=>'L', -13084=>'L', -13085=>'L', -13086=>'L', -13087=>'L', -13088=>'L', -13089=>'L', -13090=>'L', -13091=>'L', -13092=>'L', -13093=>'L', -13094=>'L', -13095=>'L', -13096=>'L', -13097=>'L', -13098=>'L', -13099=>'L', -13100=>'L', -13101=>'L', -13102=>'L', -13103=>'L', -13104=>'L', -13105=>'L', -13106=>'L', -13107=>'L', -13108=>'L', -13109=>'L', -13110=>'L', -13111=>'L', -13112=>'L', -13113=>'L', -13114=>'L', -13115=>'L', -13116=>'L', -13117=>'L', -13118=>'L', -13119=>'L', -13120=>'L', -13121=>'L', -13122=>'L', -13123=>'L', -13124=>'L', -13125=>'L', -13126=>'L', -13127=>'L', -13128=>'L', -13129=>'L', -13130=>'L', -13131=>'L', -13132=>'L', -13133=>'L', -13134=>'L', -13135=>'L', -13136=>'L', -13137=>'L', -13138=>'L', -13139=>'L', -13140=>'L', -13141=>'L', -13142=>'L', -13143=>'L', -13144=>'L', -13145=>'L', -13146=>'L', -13147=>'L', -13148=>'L', -13149=>'L', -13150=>'L', -13151=>'L', -13152=>'L', -13153=>'L', -13154=>'L', -13155=>'L', -13156=>'L', -13157=>'L', -13158=>'L', -13159=>'L', -13160=>'L', -13161=>'L', -13162=>'L', -13163=>'L', -13164=>'L', -13165=>'L', -13166=>'L', -13167=>'L', -13168=>'L', -13169=>'L', -13170=>'L', -13171=>'L', -13172=>'L', -13173=>'L', -13174=>'L', -13175=>'ON', -13176=>'ON', -13177=>'ON', -13178=>'ON', -13179=>'L', -13180=>'L', -13181=>'L', -13182=>'L', -13183=>'L', -13184=>'L', -13185=>'L', -13186=>'L', -13187=>'L', -13188=>'L', -13189=>'L', -13190=>'L', -13191=>'L', -13192=>'L', -13193=>'L', -13194=>'L', -13195=>'L', -13196=>'L', -13197=>'L', -13198=>'L', -13199=>'L', -13200=>'L', -13201=>'L', -13202=>'L', -13203=>'L', -13204=>'L', -13205=>'L', -13206=>'L', -13207=>'L', -13208=>'L', -13209=>'L', -13210=>'L', -13211=>'L', -13212=>'L', -13213=>'L', -13214=>'L', -13215=>'L', -13216=>'L', -13217=>'L', -13218=>'L', -13219=>'L', -13220=>'L', -13221=>'L', -13222=>'L', -13223=>'L', -13224=>'L', -13225=>'L', -13226=>'L', -13227=>'L', -13228=>'L', -13229=>'L', -13230=>'L', -13231=>'L', -13232=>'L', -13233=>'L', -13234=>'L', -13235=>'L', -13236=>'L', -13237=>'L', -13238=>'L', -13239=>'L', -13240=>'L', -13241=>'L', -13242=>'L', -13243=>'L', -13244=>'L', -13245=>'L', -13246=>'L', -13247=>'L', -13248=>'L', -13249=>'L', -13250=>'L', -13251=>'L', -13252=>'L', -13253=>'L', -13254=>'L', -13255=>'L', -13256=>'L', -13257=>'L', -13258=>'L', -13259=>'L', -13260=>'L', -13261=>'L', -13262=>'L', -13263=>'L', -13264=>'L', -13265=>'L', -13266=>'L', -13267=>'L', -13268=>'L', -13269=>'L', -13270=>'L', -13271=>'L', -13272=>'L', -13273=>'L', -13274=>'L', -13275=>'L', -13276=>'L', -13277=>'L', -13278=>'ON', -13279=>'ON', -13280=>'L', -13281=>'L', -13282=>'L', -13283=>'L', -13284=>'L', -13285=>'L', -13286=>'L', -13287=>'L', -13288=>'L', -13289=>'L', -13290=>'L', -13291=>'L', -13292=>'L', -13293=>'L', -13294=>'L', -13295=>'L', -13296=>'L', -13297=>'L', -13298=>'L', -13299=>'L', -13300=>'L', -13301=>'L', -13302=>'L', -13303=>'L', -13304=>'L', -13305=>'L', -13306=>'L', -13307=>'L', -13308=>'L', -13309=>'L', -13310=>'L', -13311=>'ON', -13312=>'L', -19893=>'L', -19904=>'ON', -19905=>'ON', -19906=>'ON', -19907=>'ON', -19908=>'ON', -19909=>'ON', -19910=>'ON', -19911=>'ON', -19912=>'ON', -19913=>'ON', -19914=>'ON', -19915=>'ON', -19916=>'ON', -19917=>'ON', -19918=>'ON', -19919=>'ON', -19920=>'ON', -19921=>'ON', -19922=>'ON', -19923=>'ON', -19924=>'ON', -19925=>'ON', -19926=>'ON', -19927=>'ON', -19928=>'ON', -19929=>'ON', -19930=>'ON', -19931=>'ON', -19932=>'ON', -19933=>'ON', -19934=>'ON', -19935=>'ON', -19936=>'ON', -19937=>'ON', -19938=>'ON', -19939=>'ON', -19940=>'ON', -19941=>'ON', -19942=>'ON', -19943=>'ON', -19944=>'ON', -19945=>'ON', -19946=>'ON', -19947=>'ON', -19948=>'ON', -19949=>'ON', -19950=>'ON', -19951=>'ON', -19952=>'ON', -19953=>'ON', -19954=>'ON', -19955=>'ON', -19956=>'ON', -19957=>'ON', -19958=>'ON', -19959=>'ON', -19960=>'ON', -19961=>'ON', -19962=>'ON', -19963=>'ON', -19964=>'ON', -19965=>'ON', -19966=>'ON', -19967=>'ON', -19968=>'L', -40891=>'L', -40960=>'L', -40961=>'L', -40962=>'L', -40963=>'L', -40964=>'L', -40965=>'L', -40966=>'L', -40967=>'L', -40968=>'L', -40969=>'L', -40970=>'L', -40971=>'L', -40972=>'L', -40973=>'L', -40974=>'L', -40975=>'L', -40976=>'L', -40977=>'L', -40978=>'L', -40979=>'L', -40980=>'L', -40981=>'L', -40982=>'L', -40983=>'L', -40984=>'L', -40985=>'L', -40986=>'L', -40987=>'L', -40988=>'L', -40989=>'L', -40990=>'L', -40991=>'L', -40992=>'L', -40993=>'L', -40994=>'L', -40995=>'L', -40996=>'L', -40997=>'L', -40998=>'L', -40999=>'L', -41000=>'L', -41001=>'L', -41002=>'L', -41003=>'L', -41004=>'L', -41005=>'L', -41006=>'L', -41007=>'L', -41008=>'L', -41009=>'L', -41010=>'L', -41011=>'L', -41012=>'L', -41013=>'L', -41014=>'L', -41015=>'L', -41016=>'L', -41017=>'L', -41018=>'L', -41019=>'L', -41020=>'L', -41021=>'L', -41022=>'L', -41023=>'L', -41024=>'L', -41025=>'L', -41026=>'L', -41027=>'L', -41028=>'L', -41029=>'L', -41030=>'L', -41031=>'L', -41032=>'L', -41033=>'L', -41034=>'L', -41035=>'L', -41036=>'L', -41037=>'L', -41038=>'L', -41039=>'L', -41040=>'L', -41041=>'L', -41042=>'L', -41043=>'L', -41044=>'L', -41045=>'L', -41046=>'L', -41047=>'L', -41048=>'L', -41049=>'L', -41050=>'L', -41051=>'L', -41052=>'L', -41053=>'L', -41054=>'L', -41055=>'L', -41056=>'L', -41057=>'L', -41058=>'L', -41059=>'L', -41060=>'L', -41061=>'L', -41062=>'L', -41063=>'L', -41064=>'L', -41065=>'L', -41066=>'L', -41067=>'L', -41068=>'L', -41069=>'L', -41070=>'L', -41071=>'L', -41072=>'L', -41073=>'L', -41074=>'L', -41075=>'L', -41076=>'L', -41077=>'L', -41078=>'L', -41079=>'L', -41080=>'L', -41081=>'L', -41082=>'L', -41083=>'L', -41084=>'L', -41085=>'L', -41086=>'L', -41087=>'L', -41088=>'L', -41089=>'L', -41090=>'L', -41091=>'L', -41092=>'L', -41093=>'L', -41094=>'L', -41095=>'L', -41096=>'L', -41097=>'L', -41098=>'L', -41099=>'L', -41100=>'L', -41101=>'L', -41102=>'L', -41103=>'L', -41104=>'L', -41105=>'L', -41106=>'L', -41107=>'L', -41108=>'L', -41109=>'L', -41110=>'L', -41111=>'L', -41112=>'L', -41113=>'L', -41114=>'L', -41115=>'L', -41116=>'L', -41117=>'L', -41118=>'L', -41119=>'L', -41120=>'L', -41121=>'L', -41122=>'L', -41123=>'L', -41124=>'L', -41125=>'L', -41126=>'L', -41127=>'L', -41128=>'L', -41129=>'L', -41130=>'L', -41131=>'L', -41132=>'L', -41133=>'L', -41134=>'L', -41135=>'L', -41136=>'L', -41137=>'L', -41138=>'L', -41139=>'L', -41140=>'L', -41141=>'L', -41142=>'L', -41143=>'L', -41144=>'L', -41145=>'L', -41146=>'L', -41147=>'L', -41148=>'L', -41149=>'L', -41150=>'L', -41151=>'L', -41152=>'L', -41153=>'L', -41154=>'L', -41155=>'L', -41156=>'L', -41157=>'L', -41158=>'L', -41159=>'L', -41160=>'L', -41161=>'L', -41162=>'L', -41163=>'L', -41164=>'L', -41165=>'L', -41166=>'L', -41167=>'L', -41168=>'L', -41169=>'L', -41170=>'L', -41171=>'L', -41172=>'L', -41173=>'L', -41174=>'L', -41175=>'L', -41176=>'L', -41177=>'L', -41178=>'L', -41179=>'L', -41180=>'L', -41181=>'L', -41182=>'L', -41183=>'L', -41184=>'L', -41185=>'L', -41186=>'L', -41187=>'L', -41188=>'L', -41189=>'L', -41190=>'L', -41191=>'L', -41192=>'L', -41193=>'L', -41194=>'L', -41195=>'L', -41196=>'L', -41197=>'L', -41198=>'L', -41199=>'L', -41200=>'L', -41201=>'L', -41202=>'L', -41203=>'L', -41204=>'L', -41205=>'L', -41206=>'L', -41207=>'L', -41208=>'L', -41209=>'L', -41210=>'L', -41211=>'L', -41212=>'L', -41213=>'L', -41214=>'L', -41215=>'L', -41216=>'L', -41217=>'L', -41218=>'L', -41219=>'L', -41220=>'L', -41221=>'L', -41222=>'L', -41223=>'L', -41224=>'L', -41225=>'L', -41226=>'L', -41227=>'L', -41228=>'L', -41229=>'L', -41230=>'L', -41231=>'L', -41232=>'L', -41233=>'L', -41234=>'L', -41235=>'L', -41236=>'L', -41237=>'L', -41238=>'L', -41239=>'L', -41240=>'L', -41241=>'L', -41242=>'L', -41243=>'L', -41244=>'L', -41245=>'L', -41246=>'L', -41247=>'L', -41248=>'L', -41249=>'L', -41250=>'L', -41251=>'L', -41252=>'L', -41253=>'L', -41254=>'L', -41255=>'L', -41256=>'L', -41257=>'L', -41258=>'L', -41259=>'L', -41260=>'L', -41261=>'L', -41262=>'L', -41263=>'L', -41264=>'L', -41265=>'L', -41266=>'L', -41267=>'L', -41268=>'L', -41269=>'L', -41270=>'L', -41271=>'L', -41272=>'L', -41273=>'L', -41274=>'L', -41275=>'L', -41276=>'L', -41277=>'L', -41278=>'L', -41279=>'L', -41280=>'L', -41281=>'L', -41282=>'L', -41283=>'L', -41284=>'L', -41285=>'L', -41286=>'L', -41287=>'L', -41288=>'L', -41289=>'L', -41290=>'L', -41291=>'L', -41292=>'L', -41293=>'L', -41294=>'L', -41295=>'L', -41296=>'L', -41297=>'L', -41298=>'L', -41299=>'L', -41300=>'L', -41301=>'L', -41302=>'L', -41303=>'L', -41304=>'L', -41305=>'L', -41306=>'L', -41307=>'L', -41308=>'L', -41309=>'L', -41310=>'L', -41311=>'L', -41312=>'L', -41313=>'L', -41314=>'L', -41315=>'L', -41316=>'L', -41317=>'L', -41318=>'L', -41319=>'L', -41320=>'L', -41321=>'L', -41322=>'L', -41323=>'L', -41324=>'L', -41325=>'L', -41326=>'L', -41327=>'L', -41328=>'L', -41329=>'L', -41330=>'L', -41331=>'L', -41332=>'L', -41333=>'L', -41334=>'L', -41335=>'L', -41336=>'L', -41337=>'L', -41338=>'L', -41339=>'L', -41340=>'L', -41341=>'L', -41342=>'L', -41343=>'L', -41344=>'L', -41345=>'L', -41346=>'L', -41347=>'L', -41348=>'L', -41349=>'L', -41350=>'L', -41351=>'L', -41352=>'L', -41353=>'L', -41354=>'L', -41355=>'L', -41356=>'L', -41357=>'L', -41358=>'L', -41359=>'L', -41360=>'L', -41361=>'L', -41362=>'L', -41363=>'L', -41364=>'L', -41365=>'L', -41366=>'L', -41367=>'L', -41368=>'L', -41369=>'L', -41370=>'L', -41371=>'L', -41372=>'L', -41373=>'L', -41374=>'L', -41375=>'L', -41376=>'L', -41377=>'L', -41378=>'L', -41379=>'L', -41380=>'L', -41381=>'L', -41382=>'L', -41383=>'L', -41384=>'L', -41385=>'L', -41386=>'L', -41387=>'L', -41388=>'L', -41389=>'L', -41390=>'L', -41391=>'L', -41392=>'L', -41393=>'L', -41394=>'L', -41395=>'L', -41396=>'L', -41397=>'L', -41398=>'L', -41399=>'L', -41400=>'L', -41401=>'L', -41402=>'L', -41403=>'L', -41404=>'L', -41405=>'L', -41406=>'L', -41407=>'L', -41408=>'L', -41409=>'L', -41410=>'L', -41411=>'L', -41412=>'L', -41413=>'L', -41414=>'L', -41415=>'L', -41416=>'L', -41417=>'L', -41418=>'L', -41419=>'L', -41420=>'L', -41421=>'L', -41422=>'L', -41423=>'L', -41424=>'L', -41425=>'L', -41426=>'L', -41427=>'L', -41428=>'L', -41429=>'L', -41430=>'L', -41431=>'L', -41432=>'L', -41433=>'L', -41434=>'L', -41435=>'L', -41436=>'L', -41437=>'L', -41438=>'L', -41439=>'L', -41440=>'L', -41441=>'L', -41442=>'L', -41443=>'L', -41444=>'L', -41445=>'L', -41446=>'L', -41447=>'L', -41448=>'L', -41449=>'L', -41450=>'L', -41451=>'L', -41452=>'L', -41453=>'L', -41454=>'L', -41455=>'L', -41456=>'L', -41457=>'L', -41458=>'L', -41459=>'L', -41460=>'L', -41461=>'L', -41462=>'L', -41463=>'L', -41464=>'L', -41465=>'L', -41466=>'L', -41467=>'L', -41468=>'L', -41469=>'L', -41470=>'L', -41471=>'L', -41472=>'L', -41473=>'L', -41474=>'L', -41475=>'L', -41476=>'L', -41477=>'L', -41478=>'L', -41479=>'L', -41480=>'L', -41481=>'L', -41482=>'L', -41483=>'L', -41484=>'L', -41485=>'L', -41486=>'L', -41487=>'L', -41488=>'L', -41489=>'L', -41490=>'L', -41491=>'L', -41492=>'L', -41493=>'L', -41494=>'L', -41495=>'L', -41496=>'L', -41497=>'L', -41498=>'L', -41499=>'L', -41500=>'L', -41501=>'L', -41502=>'L', -41503=>'L', -41504=>'L', -41505=>'L', -41506=>'L', -41507=>'L', -41508=>'L', -41509=>'L', -41510=>'L', -41511=>'L', -41512=>'L', -41513=>'L', -41514=>'L', -41515=>'L', -41516=>'L', -41517=>'L', -41518=>'L', -41519=>'L', -41520=>'L', -41521=>'L', -41522=>'L', -41523=>'L', -41524=>'L', -41525=>'L', -41526=>'L', -41527=>'L', -41528=>'L', -41529=>'L', -41530=>'L', -41531=>'L', -41532=>'L', -41533=>'L', -41534=>'L', -41535=>'L', -41536=>'L', -41537=>'L', -41538=>'L', -41539=>'L', -41540=>'L', -41541=>'L', -41542=>'L', -41543=>'L', -41544=>'L', -41545=>'L', -41546=>'L', -41547=>'L', -41548=>'L', -41549=>'L', -41550=>'L', -41551=>'L', -41552=>'L', -41553=>'L', -41554=>'L', -41555=>'L', -41556=>'L', -41557=>'L', -41558=>'L', -41559=>'L', -41560=>'L', -41561=>'L', -41562=>'L', -41563=>'L', -41564=>'L', -41565=>'L', -41566=>'L', -41567=>'L', -41568=>'L', -41569=>'L', -41570=>'L', -41571=>'L', -41572=>'L', -41573=>'L', -41574=>'L', -41575=>'L', -41576=>'L', -41577=>'L', -41578=>'L', -41579=>'L', -41580=>'L', -41581=>'L', -41582=>'L', -41583=>'L', -41584=>'L', -41585=>'L', -41586=>'L', -41587=>'L', -41588=>'L', -41589=>'L', -41590=>'L', -41591=>'L', -41592=>'L', -41593=>'L', -41594=>'L', -41595=>'L', -41596=>'L', -41597=>'L', -41598=>'L', -41599=>'L', -41600=>'L', -41601=>'L', -41602=>'L', -41603=>'L', -41604=>'L', -41605=>'L', -41606=>'L', -41607=>'L', -41608=>'L', -41609=>'L', -41610=>'L', -41611=>'L', -41612=>'L', -41613=>'L', -41614=>'L', -41615=>'L', -41616=>'L', -41617=>'L', -41618=>'L', -41619=>'L', -41620=>'L', -41621=>'L', -41622=>'L', -41623=>'L', -41624=>'L', -41625=>'L', -41626=>'L', -41627=>'L', -41628=>'L', -41629=>'L', -41630=>'L', -41631=>'L', -41632=>'L', -41633=>'L', -41634=>'L', -41635=>'L', -41636=>'L', -41637=>'L', -41638=>'L', -41639=>'L', -41640=>'L', -41641=>'L', -41642=>'L', -41643=>'L', -41644=>'L', -41645=>'L', -41646=>'L', -41647=>'L', -41648=>'L', -41649=>'L', -41650=>'L', -41651=>'L', -41652=>'L', -41653=>'L', -41654=>'L', -41655=>'L', -41656=>'L', -41657=>'L', -41658=>'L', -41659=>'L', -41660=>'L', -41661=>'L', -41662=>'L', -41663=>'L', -41664=>'L', -41665=>'L', -41666=>'L', -41667=>'L', -41668=>'L', -41669=>'L', -41670=>'L', -41671=>'L', -41672=>'L', -41673=>'L', -41674=>'L', -41675=>'L', -41676=>'L', -41677=>'L', -41678=>'L', -41679=>'L', -41680=>'L', -41681=>'L', -41682=>'L', -41683=>'L', -41684=>'L', -41685=>'L', -41686=>'L', -41687=>'L', -41688=>'L', -41689=>'L', -41690=>'L', -41691=>'L', -41692=>'L', -41693=>'L', -41694=>'L', -41695=>'L', -41696=>'L', -41697=>'L', -41698=>'L', -41699=>'L', -41700=>'L', -41701=>'L', -41702=>'L', -41703=>'L', -41704=>'L', -41705=>'L', -41706=>'L', -41707=>'L', -41708=>'L', -41709=>'L', -41710=>'L', -41711=>'L', -41712=>'L', -41713=>'L', -41714=>'L', -41715=>'L', -41716=>'L', -41717=>'L', -41718=>'L', -41719=>'L', -41720=>'L', -41721=>'L', -41722=>'L', -41723=>'L', -41724=>'L', -41725=>'L', -41726=>'L', -41727=>'L', -41728=>'L', -41729=>'L', -41730=>'L', -41731=>'L', -41732=>'L', -41733=>'L', -41734=>'L', -41735=>'L', -41736=>'L', -41737=>'L', -41738=>'L', -41739=>'L', -41740=>'L', -41741=>'L', -41742=>'L', -41743=>'L', -41744=>'L', -41745=>'L', -41746=>'L', -41747=>'L', -41748=>'L', -41749=>'L', -41750=>'L', -41751=>'L', -41752=>'L', -41753=>'L', -41754=>'L', -41755=>'L', -41756=>'L', -41757=>'L', -41758=>'L', -41759=>'L', -41760=>'L', -41761=>'L', -41762=>'L', -41763=>'L', -41764=>'L', -41765=>'L', -41766=>'L', -41767=>'L', -41768=>'L', -41769=>'L', -41770=>'L', -41771=>'L', -41772=>'L', -41773=>'L', -41774=>'L', -41775=>'L', -41776=>'L', -41777=>'L', -41778=>'L', -41779=>'L', -41780=>'L', -41781=>'L', -41782=>'L', -41783=>'L', -41784=>'L', -41785=>'L', -41786=>'L', -41787=>'L', -41788=>'L', -41789=>'L', -41790=>'L', -41791=>'L', -41792=>'L', -41793=>'L', -41794=>'L', -41795=>'L', -41796=>'L', -41797=>'L', -41798=>'L', -41799=>'L', -41800=>'L', -41801=>'L', -41802=>'L', -41803=>'L', -41804=>'L', -41805=>'L', -41806=>'L', -41807=>'L', -41808=>'L', -41809=>'L', -41810=>'L', -41811=>'L', -41812=>'L', -41813=>'L', -41814=>'L', -41815=>'L', -41816=>'L', -41817=>'L', -41818=>'L', -41819=>'L', -41820=>'L', -41821=>'L', -41822=>'L', -41823=>'L', -41824=>'L', -41825=>'L', -41826=>'L', -41827=>'L', -41828=>'L', -41829=>'L', -41830=>'L', -41831=>'L', -41832=>'L', -41833=>'L', -41834=>'L', -41835=>'L', -41836=>'L', -41837=>'L', -41838=>'L', -41839=>'L', -41840=>'L', -41841=>'L', -41842=>'L', -41843=>'L', -41844=>'L', -41845=>'L', -41846=>'L', -41847=>'L', -41848=>'L', -41849=>'L', -41850=>'L', -41851=>'L', -41852=>'L', -41853=>'L', -41854=>'L', -41855=>'L', -41856=>'L', -41857=>'L', -41858=>'L', -41859=>'L', -41860=>'L', -41861=>'L', -41862=>'L', -41863=>'L', -41864=>'L', -41865=>'L', -41866=>'L', -41867=>'L', -41868=>'L', -41869=>'L', -41870=>'L', -41871=>'L', -41872=>'L', -41873=>'L', -41874=>'L', -41875=>'L', -41876=>'L', -41877=>'L', -41878=>'L', -41879=>'L', -41880=>'L', -41881=>'L', -41882=>'L', -41883=>'L', -41884=>'L', -41885=>'L', -41886=>'L', -41887=>'L', -41888=>'L', -41889=>'L', -41890=>'L', -41891=>'L', -41892=>'L', -41893=>'L', -41894=>'L', -41895=>'L', -41896=>'L', -41897=>'L', -41898=>'L', -41899=>'L', -41900=>'L', -41901=>'L', -41902=>'L', -41903=>'L', -41904=>'L', -41905=>'L', -41906=>'L', -41907=>'L', -41908=>'L', -41909=>'L', -41910=>'L', -41911=>'L', -41912=>'L', -41913=>'L', -41914=>'L', -41915=>'L', -41916=>'L', -41917=>'L', -41918=>'L', -41919=>'L', -41920=>'L', -41921=>'L', -41922=>'L', -41923=>'L', -41924=>'L', -41925=>'L', -41926=>'L', -41927=>'L', -41928=>'L', -41929=>'L', -41930=>'L', -41931=>'L', -41932=>'L', -41933=>'L', -41934=>'L', -41935=>'L', -41936=>'L', -41937=>'L', -41938=>'L', -41939=>'L', -41940=>'L', -41941=>'L', -41942=>'L', -41943=>'L', -41944=>'L', -41945=>'L', -41946=>'L', -41947=>'L', -41948=>'L', -41949=>'L', -41950=>'L', -41951=>'L', -41952=>'L', -41953=>'L', -41954=>'L', -41955=>'L', -41956=>'L', -41957=>'L', -41958=>'L', -41959=>'L', -41960=>'L', -41961=>'L', -41962=>'L', -41963=>'L', -41964=>'L', -41965=>'L', -41966=>'L', -41967=>'L', -41968=>'L', -41969=>'L', -41970=>'L', -41971=>'L', -41972=>'L', -41973=>'L', -41974=>'L', -41975=>'L', -41976=>'L', -41977=>'L', -41978=>'L', -41979=>'L', -41980=>'L', -41981=>'L', -41982=>'L', -41983=>'L', -41984=>'L', -41985=>'L', -41986=>'L', -41987=>'L', -41988=>'L', -41989=>'L', -41990=>'L', -41991=>'L', -41992=>'L', -41993=>'L', -41994=>'L', -41995=>'L', -41996=>'L', -41997=>'L', -41998=>'L', -41999=>'L', -42000=>'L', -42001=>'L', -42002=>'L', -42003=>'L', -42004=>'L', -42005=>'L', -42006=>'L', -42007=>'L', -42008=>'L', -42009=>'L', -42010=>'L', -42011=>'L', -42012=>'L', -42013=>'L', -42014=>'L', -42015=>'L', -42016=>'L', -42017=>'L', -42018=>'L', -42019=>'L', -42020=>'L', -42021=>'L', -42022=>'L', -42023=>'L', -42024=>'L', -42025=>'L', -42026=>'L', -42027=>'L', -42028=>'L', -42029=>'L', -42030=>'L', -42031=>'L', -42032=>'L', -42033=>'L', -42034=>'L', -42035=>'L', -42036=>'L', -42037=>'L', -42038=>'L', -42039=>'L', -42040=>'L', -42041=>'L', -42042=>'L', -42043=>'L', -42044=>'L', -42045=>'L', -42046=>'L', -42047=>'L', -42048=>'L', -42049=>'L', -42050=>'L', -42051=>'L', -42052=>'L', -42053=>'L', -42054=>'L', -42055=>'L', -42056=>'L', -42057=>'L', -42058=>'L', -42059=>'L', -42060=>'L', -42061=>'L', -42062=>'L', -42063=>'L', -42064=>'L', -42065=>'L', -42066=>'L', -42067=>'L', -42068=>'L', -42069=>'L', -42070=>'L', -42071=>'L', -42072=>'L', -42073=>'L', -42074=>'L', -42075=>'L', -42076=>'L', -42077=>'L', -42078=>'L', -42079=>'L', -42080=>'L', -42081=>'L', -42082=>'L', -42083=>'L', -42084=>'L', -42085=>'L', -42086=>'L', -42087=>'L', -42088=>'L', -42089=>'L', -42090=>'L', -42091=>'L', -42092=>'L', -42093=>'L', -42094=>'L', -42095=>'L', -42096=>'L', -42097=>'L', -42098=>'L', -42099=>'L', -42100=>'L', -42101=>'L', -42102=>'L', -42103=>'L', -42104=>'L', -42105=>'L', -42106=>'L', -42107=>'L', -42108=>'L', -42109=>'L', -42110=>'L', -42111=>'L', -42112=>'L', -42113=>'L', -42114=>'L', -42115=>'L', -42116=>'L', -42117=>'L', -42118=>'L', -42119=>'L', -42120=>'L', -42121=>'L', -42122=>'L', -42123=>'L', -42124=>'L', -42128=>'ON', -42129=>'ON', -42130=>'ON', -42131=>'ON', -42132=>'ON', -42133=>'ON', -42134=>'ON', -42135=>'ON', -42136=>'ON', -42137=>'ON', -42138=>'ON', -42139=>'ON', -42140=>'ON', -42141=>'ON', -42142=>'ON', -42143=>'ON', -42144=>'ON', -42145=>'ON', -42146=>'ON', -42147=>'ON', -42148=>'ON', -42149=>'ON', -42150=>'ON', -42151=>'ON', -42152=>'ON', -42153=>'ON', -42154=>'ON', -42155=>'ON', -42156=>'ON', -42157=>'ON', -42158=>'ON', -42159=>'ON', -42160=>'ON', -42161=>'ON', -42162=>'ON', -42163=>'ON', -42164=>'ON', -42165=>'ON', -42166=>'ON', -42167=>'ON', -42168=>'ON', -42169=>'ON', -42170=>'ON', -42171=>'ON', -42172=>'ON', -42173=>'ON', -42174=>'ON', -42175=>'ON', -42176=>'ON', -42177=>'ON', -42178=>'ON', -42179=>'ON', -42180=>'ON', -42181=>'ON', -42182=>'ON', -42752=>'ON', -42753=>'ON', -42754=>'ON', -42755=>'ON', -42756=>'ON', -42757=>'ON', -42758=>'ON', -42759=>'ON', -42760=>'ON', -42761=>'ON', -42762=>'ON', -42763=>'ON', -42764=>'ON', -42765=>'ON', -42766=>'ON', -42767=>'ON', -42768=>'ON', -42769=>'ON', -42770=>'ON', -42771=>'ON', -42772=>'ON', -42773=>'ON', -42774=>'ON', -42775=>'ON', -42776=>'ON', -42777=>'ON', -42778=>'ON', -42784=>'ON', -42785=>'ON', -43008=>'L', -43009=>'L', -43010=>'NSM', -43011=>'L', -43012=>'L', -43013=>'L', -43014=>'NSM', -43015=>'L', -43016=>'L', -43017=>'L', -43018=>'L', -43019=>'NSM', -43020=>'L', -43021=>'L', -43022=>'L', -43023=>'L', -43024=>'L', -43025=>'L', -43026=>'L', -43027=>'L', -43028=>'L', -43029=>'L', -43030=>'L', -43031=>'L', -43032=>'L', -43033=>'L', -43034=>'L', -43035=>'L', -43036=>'L', -43037=>'L', -43038=>'L', -43039=>'L', -43040=>'L', -43041=>'L', -43042=>'L', -43043=>'L', -43044=>'L', -43045=>'NSM', -43046=>'NSM', -43047=>'L', -43048=>'ON', -43049=>'ON', -43050=>'ON', -43051=>'ON', -43072=>'L', -43073=>'L', -43074=>'L', -43075=>'L', -43076=>'L', -43077=>'L', -43078=>'L', -43079=>'L', -43080=>'L', -43081=>'L', -43082=>'L', -43083=>'L', -43084=>'L', -43085=>'L', -43086=>'L', -43087=>'L', -43088=>'L', -43089=>'L', -43090=>'L', -43091=>'L', -43092=>'L', -43093=>'L', -43094=>'L', -43095=>'L', -43096=>'L', -43097=>'L', -43098=>'L', -43099=>'L', -43100=>'L', -43101=>'L', -43102=>'L', -43103=>'L', -43104=>'L', -43105=>'L', -43106=>'L', -43107=>'L', -43108=>'L', -43109=>'L', -43110=>'L', -43111=>'L', -43112=>'L', -43113=>'L', -43114=>'L', -43115=>'L', -43116=>'L', -43117=>'L', -43118=>'L', -43119=>'L', -43120=>'L', -43121=>'L', -43122=>'L', -43123=>'L', -43124=>'ON', -43125=>'ON', -43126=>'ON', -43127=>'ON', -44032=>'L', -55203=>'L', -55296=>'L', -56191=>'L', -56192=>'L', -56319=>'L', -56320=>'L', -57343=>'L', -57344=>'L', -63743=>'L', -63744=>'L', -63745=>'L', -63746=>'L', -63747=>'L', -63748=>'L', -63749=>'L', -63750=>'L', -63751=>'L', -63752=>'L', -63753=>'L', -63754=>'L', -63755=>'L', -63756=>'L', -63757=>'L', -63758=>'L', -63759=>'L', -63760=>'L', -63761=>'L', -63762=>'L', -63763=>'L', -63764=>'L', -63765=>'L', -63766=>'L', -63767=>'L', -63768=>'L', -63769=>'L', -63770=>'L', -63771=>'L', -63772=>'L', -63773=>'L', -63774=>'L', -63775=>'L', -63776=>'L', -63777=>'L', -63778=>'L', -63779=>'L', -63780=>'L', -63781=>'L', -63782=>'L', -63783=>'L', -63784=>'L', -63785=>'L', -63786=>'L', -63787=>'L', -63788=>'L', -63789=>'L', -63790=>'L', -63791=>'L', -63792=>'L', -63793=>'L', -63794=>'L', -63795=>'L', -63796=>'L', -63797=>'L', -63798=>'L', -63799=>'L', -63800=>'L', -63801=>'L', -63802=>'L', -63803=>'L', -63804=>'L', -63805=>'L', -63806=>'L', -63807=>'L', -63808=>'L', -63809=>'L', -63810=>'L', -63811=>'L', -63812=>'L', -63813=>'L', -63814=>'L', -63815=>'L', -63816=>'L', -63817=>'L', -63818=>'L', -63819=>'L', -63820=>'L', -63821=>'L', -63822=>'L', -63823=>'L', -63824=>'L', -63825=>'L', -63826=>'L', -63827=>'L', -63828=>'L', -63829=>'L', -63830=>'L', -63831=>'L', -63832=>'L', -63833=>'L', -63834=>'L', -63835=>'L', -63836=>'L', -63837=>'L', -63838=>'L', -63839=>'L', -63840=>'L', -63841=>'L', -63842=>'L', -63843=>'L', -63844=>'L', -63845=>'L', -63846=>'L', -63847=>'L', -63848=>'L', -63849=>'L', -63850=>'L', -63851=>'L', -63852=>'L', -63853=>'L', -63854=>'L', -63855=>'L', -63856=>'L', -63857=>'L', -63858=>'L', -63859=>'L', -63860=>'L', -63861=>'L', -63862=>'L', -63863=>'L', -63864=>'L', -63865=>'L', -63866=>'L', -63867=>'L', -63868=>'L', -63869=>'L', -63870=>'L', -63871=>'L', -63872=>'L', -63873=>'L', -63874=>'L', -63875=>'L', -63876=>'L', -63877=>'L', -63878=>'L', -63879=>'L', -63880=>'L', -63881=>'L', -63882=>'L', -63883=>'L', -63884=>'L', -63885=>'L', -63886=>'L', -63887=>'L', -63888=>'L', -63889=>'L', -63890=>'L', -63891=>'L', -63892=>'L', -63893=>'L', -63894=>'L', -63895=>'L', -63896=>'L', -63897=>'L', -63898=>'L', -63899=>'L', -63900=>'L', -63901=>'L', -63902=>'L', -63903=>'L', -63904=>'L', -63905=>'L', -63906=>'L', -63907=>'L', -63908=>'L', -63909=>'L', -63910=>'L', -63911=>'L', -63912=>'L', -63913=>'L', -63914=>'L', -63915=>'L', -63916=>'L', -63917=>'L', -63918=>'L', -63919=>'L', -63920=>'L', -63921=>'L', -63922=>'L', -63923=>'L', -63924=>'L', -63925=>'L', -63926=>'L', -63927=>'L', -63928=>'L', -63929=>'L', -63930=>'L', -63931=>'L', -63932=>'L', -63933=>'L', -63934=>'L', -63935=>'L', -63936=>'L', -63937=>'L', -63938=>'L', -63939=>'L', -63940=>'L', -63941=>'L', -63942=>'L', -63943=>'L', -63944=>'L', -63945=>'L', -63946=>'L', -63947=>'L', -63948=>'L', -63949=>'L', -63950=>'L', -63951=>'L', -63952=>'L', -63953=>'L', -63954=>'L', -63955=>'L', -63956=>'L', -63957=>'L', -63958=>'L', -63959=>'L', -63960=>'L', -63961=>'L', -63962=>'L', -63963=>'L', -63964=>'L', -63965=>'L', -63966=>'L', -63967=>'L', -63968=>'L', -63969=>'L', -63970=>'L', -63971=>'L', -63972=>'L', -63973=>'L', -63974=>'L', -63975=>'L', -63976=>'L', -63977=>'L', -63978=>'L', -63979=>'L', -63980=>'L', -63981=>'L', -63982=>'L', -63983=>'L', -63984=>'L', -63985=>'L', -63986=>'L', -63987=>'L', -63988=>'L', -63989=>'L', -63990=>'L', -63991=>'L', -63992=>'L', -63993=>'L', -63994=>'L', -63995=>'L', -63996=>'L', -63997=>'L', -63998=>'L', -63999=>'L', -64000=>'L', -64001=>'L', -64002=>'L', -64003=>'L', -64004=>'L', -64005=>'L', -64006=>'L', -64007=>'L', -64008=>'L', -64009=>'L', -64010=>'L', -64011=>'L', -64012=>'L', -64013=>'L', -64014=>'L', -64015=>'L', -64016=>'L', -64017=>'L', -64018=>'L', -64019=>'L', -64020=>'L', -64021=>'L', -64022=>'L', -64023=>'L', -64024=>'L', -64025=>'L', -64026=>'L', -64027=>'L', -64028=>'L', -64029=>'L', -64030=>'L', -64031=>'L', -64032=>'L', -64033=>'L', -64034=>'L', -64035=>'L', -64036=>'L', -64037=>'L', -64038=>'L', -64039=>'L', -64040=>'L', -64041=>'L', -64042=>'L', -64043=>'L', -64044=>'L', -64045=>'L', -64048=>'L', -64049=>'L', -64050=>'L', -64051=>'L', -64052=>'L', -64053=>'L', -64054=>'L', -64055=>'L', -64056=>'L', -64057=>'L', -64058=>'L', -64059=>'L', -64060=>'L', -64061=>'L', -64062=>'L', -64063=>'L', -64064=>'L', -64065=>'L', -64066=>'L', -64067=>'L', -64068=>'L', -64069=>'L', -64070=>'L', -64071=>'L', -64072=>'L', -64073=>'L', -64074=>'L', -64075=>'L', -64076=>'L', -64077=>'L', -64078=>'L', -64079=>'L', -64080=>'L', -64081=>'L', -64082=>'L', -64083=>'L', -64084=>'L', -64085=>'L', -64086=>'L', -64087=>'L', -64088=>'L', -64089=>'L', -64090=>'L', -64091=>'L', -64092=>'L', -64093=>'L', -64094=>'L', -64095=>'L', -64096=>'L', -64097=>'L', -64098=>'L', -64099=>'L', -64100=>'L', -64101=>'L', -64102=>'L', -64103=>'L', -64104=>'L', -64105=>'L', -64106=>'L', -64112=>'L', -64113=>'L', -64114=>'L', -64115=>'L', -64116=>'L', -64117=>'L', -64118=>'L', -64119=>'L', -64120=>'L', -64121=>'L', -64122=>'L', -64123=>'L', -64124=>'L', -64125=>'L', -64126=>'L', -64127=>'L', -64128=>'L', -64129=>'L', -64130=>'L', -64131=>'L', -64132=>'L', -64133=>'L', -64134=>'L', -64135=>'L', -64136=>'L', -64137=>'L', -64138=>'L', -64139=>'L', -64140=>'L', -64141=>'L', -64142=>'L', -64143=>'L', -64144=>'L', -64145=>'L', -64146=>'L', -64147=>'L', -64148=>'L', -64149=>'L', -64150=>'L', -64151=>'L', -64152=>'L', -64153=>'L', -64154=>'L', -64155=>'L', -64156=>'L', -64157=>'L', -64158=>'L', -64159=>'L', -64160=>'L', -64161=>'L', -64162=>'L', -64163=>'L', -64164=>'L', -64165=>'L', -64166=>'L', -64167=>'L', -64168=>'L', -64169=>'L', -64170=>'L', -64171=>'L', -64172=>'L', -64173=>'L', -64174=>'L', -64175=>'L', -64176=>'L', -64177=>'L', -64178=>'L', -64179=>'L', -64180=>'L', -64181=>'L', -64182=>'L', -64183=>'L', -64184=>'L', -64185=>'L', -64186=>'L', -64187=>'L', -64188=>'L', -64189=>'L', -64190=>'L', -64191=>'L', -64192=>'L', -64193=>'L', -64194=>'L', -64195=>'L', -64196=>'L', -64197=>'L', -64198=>'L', -64199=>'L', -64200=>'L', -64201=>'L', -64202=>'L', -64203=>'L', -64204=>'L', -64205=>'L', -64206=>'L', -64207=>'L', -64208=>'L', -64209=>'L', -64210=>'L', -64211=>'L', -64212=>'L', -64213=>'L', -64214=>'L', -64215=>'L', -64216=>'L', -64217=>'L', -64256=>'L', -64257=>'L', -64258=>'L', -64259=>'L', -64260=>'L', -64261=>'L', -64262=>'L', -64275=>'L', -64276=>'L', -64277=>'L', -64278=>'L', -64279=>'L', -64285=>'R', -64286=>'NSM', -64287=>'R', -64288=>'R', -64289=>'R', -64290=>'R', -64291=>'R', -64292=>'R', -64293=>'R', -64294=>'R', -64295=>'R', -64296=>'R', -64297=>'ES', -64298=>'R', -64299=>'R', -64300=>'R', -64301=>'R', -64302=>'R', -64303=>'R', -64304=>'R', -64305=>'R', -64306=>'R', -64307=>'R', -64308=>'R', -64309=>'R', -64310=>'R', -64312=>'R', -64313=>'R', -64314=>'R', -64315=>'R', -64316=>'R', -64318=>'R', -64320=>'R', -64321=>'R', -64323=>'R', -64324=>'R', -64326=>'R', -64327=>'R', -64328=>'R', -64329=>'R', -64330=>'R', -64331=>'R', -64332=>'R', -64333=>'R', -64334=>'R', -64335=>'R', -64336=>'AL', -64337=>'AL', -64338=>'AL', -64339=>'AL', -64340=>'AL', -64341=>'AL', -64342=>'AL', -64343=>'AL', -64344=>'AL', -64345=>'AL', -64346=>'AL', -64347=>'AL', -64348=>'AL', -64349=>'AL', -64350=>'AL', -64351=>'AL', -64352=>'AL', -64353=>'AL', -64354=>'AL', -64355=>'AL', -64356=>'AL', -64357=>'AL', -64358=>'AL', -64359=>'AL', -64360=>'AL', -64361=>'AL', -64362=>'AL', -64363=>'AL', -64364=>'AL', -64365=>'AL', -64366=>'AL', -64367=>'AL', -64368=>'AL', -64369=>'AL', -64370=>'AL', -64371=>'AL', -64372=>'AL', -64373=>'AL', -64374=>'AL', -64375=>'AL', -64376=>'AL', -64377=>'AL', -64378=>'AL', -64379=>'AL', -64380=>'AL', -64381=>'AL', -64382=>'AL', -64383=>'AL', -64384=>'AL', -64385=>'AL', -64386=>'AL', -64387=>'AL', -64388=>'AL', -64389=>'AL', -64390=>'AL', -64391=>'AL', -64392=>'AL', -64393=>'AL', -64394=>'AL', -64395=>'AL', -64396=>'AL', -64397=>'AL', -64398=>'AL', -64399=>'AL', -64400=>'AL', -64401=>'AL', -64402=>'AL', -64403=>'AL', -64404=>'AL', -64405=>'AL', -64406=>'AL', -64407=>'AL', -64408=>'AL', -64409=>'AL', -64410=>'AL', -64411=>'AL', -64412=>'AL', -64413=>'AL', -64414=>'AL', -64415=>'AL', -64416=>'AL', -64417=>'AL', -64418=>'AL', -64419=>'AL', -64420=>'AL', -64421=>'AL', -64422=>'AL', -64423=>'AL', -64424=>'AL', -64425=>'AL', -64426=>'AL', -64427=>'AL', -64428=>'AL', -64429=>'AL', -64430=>'AL', -64431=>'AL', -64432=>'AL', -64433=>'AL', -64467=>'AL', -64468=>'AL', -64469=>'AL', -64470=>'AL', -64471=>'AL', -64472=>'AL', -64473=>'AL', -64474=>'AL', -64475=>'AL', -64476=>'AL', -64477=>'AL', -64478=>'AL', -64479=>'AL', -64480=>'AL', -64481=>'AL', -64482=>'AL', -64483=>'AL', -64484=>'AL', -64485=>'AL', -64486=>'AL', -64487=>'AL', -64488=>'AL', -64489=>'AL', -64490=>'AL', -64491=>'AL', -64492=>'AL', -64493=>'AL', -64494=>'AL', -64495=>'AL', -64496=>'AL', -64497=>'AL', -64498=>'AL', -64499=>'AL', -64500=>'AL', -64501=>'AL', -64502=>'AL', -64503=>'AL', -64504=>'AL', -64505=>'AL', -64506=>'AL', -64507=>'AL', -64508=>'AL', -64509=>'AL', -64510=>'AL', -64511=>'AL', -64512=>'AL', -64513=>'AL', -64514=>'AL', -64515=>'AL', -64516=>'AL', -64517=>'AL', -64518=>'AL', -64519=>'AL', -64520=>'AL', -64521=>'AL', -64522=>'AL', -64523=>'AL', -64524=>'AL', -64525=>'AL', -64526=>'AL', -64527=>'AL', -64528=>'AL', -64529=>'AL', -64530=>'AL', -64531=>'AL', -64532=>'AL', -64533=>'AL', -64534=>'AL', -64535=>'AL', -64536=>'AL', -64537=>'AL', -64538=>'AL', -64539=>'AL', -64540=>'AL', -64541=>'AL', -64542=>'AL', -64543=>'AL', -64544=>'AL', -64545=>'AL', -64546=>'AL', -64547=>'AL', -64548=>'AL', -64549=>'AL', -64550=>'AL', -64551=>'AL', -64552=>'AL', -64553=>'AL', -64554=>'AL', -64555=>'AL', -64556=>'AL', -64557=>'AL', -64558=>'AL', -64559=>'AL', -64560=>'AL', -64561=>'AL', -64562=>'AL', -64563=>'AL', -64564=>'AL', -64565=>'AL', -64566=>'AL', -64567=>'AL', -64568=>'AL', -64569=>'AL', -64570=>'AL', -64571=>'AL', -64572=>'AL', -64573=>'AL', -64574=>'AL', -64575=>'AL', -64576=>'AL', -64577=>'AL', -64578=>'AL', -64579=>'AL', -64580=>'AL', -64581=>'AL', -64582=>'AL', -64583=>'AL', -64584=>'AL', -64585=>'AL', -64586=>'AL', -64587=>'AL', -64588=>'AL', -64589=>'AL', -64590=>'AL', -64591=>'AL', -64592=>'AL', -64593=>'AL', -64594=>'AL', -64595=>'AL', -64596=>'AL', -64597=>'AL', -64598=>'AL', -64599=>'AL', -64600=>'AL', -64601=>'AL', -64602=>'AL', -64603=>'AL', -64604=>'AL', -64605=>'AL', -64606=>'AL', -64607=>'AL', -64608=>'AL', -64609=>'AL', -64610=>'AL', -64611=>'AL', -64612=>'AL', -64613=>'AL', -64614=>'AL', -64615=>'AL', -64616=>'AL', -64617=>'AL', -64618=>'AL', -64619=>'AL', -64620=>'AL', -64621=>'AL', -64622=>'AL', -64623=>'AL', -64624=>'AL', -64625=>'AL', -64626=>'AL', -64627=>'AL', -64628=>'AL', -64629=>'AL', -64630=>'AL', -64631=>'AL', -64632=>'AL', -64633=>'AL', -64634=>'AL', -64635=>'AL', -64636=>'AL', -64637=>'AL', -64638=>'AL', -64639=>'AL', -64640=>'AL', -64641=>'AL', -64642=>'AL', -64643=>'AL', -64644=>'AL', -64645=>'AL', -64646=>'AL', -64647=>'AL', -64648=>'AL', -64649=>'AL', -64650=>'AL', -64651=>'AL', -64652=>'AL', -64653=>'AL', -64654=>'AL', -64655=>'AL', -64656=>'AL', -64657=>'AL', -64658=>'AL', -64659=>'AL', -64660=>'AL', -64661=>'AL', -64662=>'AL', -64663=>'AL', -64664=>'AL', -64665=>'AL', -64666=>'AL', -64667=>'AL', -64668=>'AL', -64669=>'AL', -64670=>'AL', -64671=>'AL', -64672=>'AL', -64673=>'AL', -64674=>'AL', -64675=>'AL', -64676=>'AL', -64677=>'AL', -64678=>'AL', -64679=>'AL', -64680=>'AL', -64681=>'AL', -64682=>'AL', -64683=>'AL', -64684=>'AL', -64685=>'AL', -64686=>'AL', -64687=>'AL', -64688=>'AL', -64689=>'AL', -64690=>'AL', -64691=>'AL', -64692=>'AL', -64693=>'AL', -64694=>'AL', -64695=>'AL', -64696=>'AL', -64697=>'AL', -64698=>'AL', -64699=>'AL', -64700=>'AL', -64701=>'AL', -64702=>'AL', -64703=>'AL', -64704=>'AL', -64705=>'AL', -64706=>'AL', -64707=>'AL', -64708=>'AL', -64709=>'AL', -64710=>'AL', -64711=>'AL', -64712=>'AL', -64713=>'AL', -64714=>'AL', -64715=>'AL', -64716=>'AL', -64717=>'AL', -64718=>'AL', -64719=>'AL', -64720=>'AL', -64721=>'AL', -64722=>'AL', -64723=>'AL', -64724=>'AL', -64725=>'AL', -64726=>'AL', -64727=>'AL', -64728=>'AL', -64729=>'AL', -64730=>'AL', -64731=>'AL', -64732=>'AL', -64733=>'AL', -64734=>'AL', -64735=>'AL', -64736=>'AL', -64737=>'AL', -64738=>'AL', -64739=>'AL', -64740=>'AL', -64741=>'AL', -64742=>'AL', -64743=>'AL', -64744=>'AL', -64745=>'AL', -64746=>'AL', -64747=>'AL', -64748=>'AL', -64749=>'AL', -64750=>'AL', -64751=>'AL', -64752=>'AL', -64753=>'AL', -64754=>'AL', -64755=>'AL', -64756=>'AL', -64757=>'AL', -64758=>'AL', -64759=>'AL', -64760=>'AL', -64761=>'AL', -64762=>'AL', -64763=>'AL', -64764=>'AL', -64765=>'AL', -64766=>'AL', -64767=>'AL', -64768=>'AL', -64769=>'AL', -64770=>'AL', -64771=>'AL', -64772=>'AL', -64773=>'AL', -64774=>'AL', -64775=>'AL', -64776=>'AL', -64777=>'AL', -64778=>'AL', -64779=>'AL', -64780=>'AL', -64781=>'AL', -64782=>'AL', -64783=>'AL', -64784=>'AL', -64785=>'AL', -64786=>'AL', -64787=>'AL', -64788=>'AL', -64789=>'AL', -64790=>'AL', -64791=>'AL', -64792=>'AL', -64793=>'AL', -64794=>'AL', -64795=>'AL', -64796=>'AL', -64797=>'AL', -64798=>'AL', -64799=>'AL', -64800=>'AL', -64801=>'AL', -64802=>'AL', -64803=>'AL', -64804=>'AL', -64805=>'AL', -64806=>'AL', -64807=>'AL', -64808=>'AL', -64809=>'AL', -64810=>'AL', -64811=>'AL', -64812=>'AL', -64813=>'AL', -64814=>'AL', -64815=>'AL', -64816=>'AL', -64817=>'AL', -64818=>'AL', -64819=>'AL', -64820=>'AL', -64821=>'AL', -64822=>'AL', -64823=>'AL', -64824=>'AL', -64825=>'AL', -64826=>'AL', -64827=>'AL', -64828=>'AL', -64829=>'AL', -64830=>'ON', -64831=>'ON', -64848=>'AL', -64849=>'AL', -64850=>'AL', -64851=>'AL', -64852=>'AL', -64853=>'AL', -64854=>'AL', -64855=>'AL', -64856=>'AL', -64857=>'AL', -64858=>'AL', -64859=>'AL', -64860=>'AL', -64861=>'AL', -64862=>'AL', -64863=>'AL', -64864=>'AL', -64865=>'AL', -64866=>'AL', -64867=>'AL', -64868=>'AL', -64869=>'AL', -64870=>'AL', -64871=>'AL', -64872=>'AL', -64873=>'AL', -64874=>'AL', -64875=>'AL', -64876=>'AL', -64877=>'AL', -64878=>'AL', -64879=>'AL', -64880=>'AL', -64881=>'AL', -64882=>'AL', -64883=>'AL', -64884=>'AL', -64885=>'AL', -64886=>'AL', -64887=>'AL', -64888=>'AL', -64889=>'AL', -64890=>'AL', -64891=>'AL', -64892=>'AL', -64893=>'AL', -64894=>'AL', -64895=>'AL', -64896=>'AL', -64897=>'AL', -64898=>'AL', -64899=>'AL', -64900=>'AL', -64901=>'AL', -64902=>'AL', -64903=>'AL', -64904=>'AL', -64905=>'AL', -64906=>'AL', -64907=>'AL', -64908=>'AL', -64909=>'AL', -64910=>'AL', -64911=>'AL', -64914=>'AL', -64915=>'AL', -64916=>'AL', -64917=>'AL', -64918=>'AL', -64919=>'AL', -64920=>'AL', -64921=>'AL', -64922=>'AL', -64923=>'AL', -64924=>'AL', -64925=>'AL', -64926=>'AL', -64927=>'AL', -64928=>'AL', -64929=>'AL', -64930=>'AL', -64931=>'AL', -64932=>'AL', -64933=>'AL', -64934=>'AL', -64935=>'AL', -64936=>'AL', -64937=>'AL', -64938=>'AL', -64939=>'AL', -64940=>'AL', -64941=>'AL', -64942=>'AL', -64943=>'AL', -64944=>'AL', -64945=>'AL', -64946=>'AL', -64947=>'AL', -64948=>'AL', -64949=>'AL', -64950=>'AL', -64951=>'AL', -64952=>'AL', -64953=>'AL', -64954=>'AL', -64955=>'AL', -64956=>'AL', -64957=>'AL', -64958=>'AL', -64959=>'AL', -64960=>'AL', -64961=>'AL', -64962=>'AL', -64963=>'AL', -64964=>'AL', -64965=>'AL', -64966=>'AL', -64967=>'AL', -65008=>'AL', -65009=>'AL', -65010=>'AL', -65011=>'AL', -65012=>'AL', -65013=>'AL', -65014=>'AL', -65015=>'AL', -65016=>'AL', -65017=>'AL', -65018=>'AL', -65019=>'AL', -65020=>'AL', -65021=>'ON', -65024=>'NSM', -65025=>'NSM', -65026=>'NSM', -65027=>'NSM', -65028=>'NSM', -65029=>'NSM', -65030=>'NSM', -65031=>'NSM', -65032=>'NSM', -65033=>'NSM', -65034=>'NSM', -65035=>'NSM', -65036=>'NSM', -65037=>'NSM', -65038=>'NSM', -65039=>'NSM', -65040=>'ON', -65041=>'ON', -65042=>'ON', -65043=>'ON', -65044=>'ON', -65045=>'ON', -65046=>'ON', -65047=>'ON', -65048=>'ON', -65049=>'ON', -65056=>'NSM', -65057=>'NSM', -65058=>'NSM', -65059=>'NSM', -65072=>'ON', -65073=>'ON', -65074=>'ON', -65075=>'ON', -65076=>'ON', -65077=>'ON', -65078=>'ON', -65079=>'ON', -65080=>'ON', -65081=>'ON', -65082=>'ON', -65083=>'ON', -65084=>'ON', -65085=>'ON', -65086=>'ON', -65087=>'ON', -65088=>'ON', -65089=>'ON', -65090=>'ON', -65091=>'ON', -65092=>'ON', -65093=>'ON', -65094=>'ON', -65095=>'ON', -65096=>'ON', -65097=>'ON', -65098=>'ON', -65099=>'ON', -65100=>'ON', -65101=>'ON', -65102=>'ON', -65103=>'ON', -65104=>'CS', -65105=>'ON', -65106=>'CS', -65108=>'ON', -65109=>'CS', -65110=>'ON', -65111=>'ON', -65112=>'ON', -65113=>'ON', -65114=>'ON', -65115=>'ON', -65116=>'ON', -65117=>'ON', -65118=>'ON', -65119=>'ET', -65120=>'ON', -65121=>'ON', -65122=>'ES', -65123=>'ES', -65124=>'ON', -65125=>'ON', -65126=>'ON', -65128=>'ON', -65129=>'ET', -65130=>'ET', -65131=>'ON', -65136=>'AL', -65137=>'AL', -65138=>'AL', -65139=>'AL', -65140=>'AL', -65142=>'AL', -65143=>'AL', -65144=>'AL', -65145=>'AL', -65146=>'AL', -65147=>'AL', -65148=>'AL', -65149=>'AL', -65150=>'AL', -65151=>'AL', -65152=>'AL', -65153=>'AL', -65154=>'AL', -65155=>'AL', -65156=>'AL', -65157=>'AL', -65158=>'AL', -65159=>'AL', -65160=>'AL', -65161=>'AL', -65162=>'AL', -65163=>'AL', -65164=>'AL', -65165=>'AL', -65166=>'AL', -65167=>'AL', -65168=>'AL', -65169=>'AL', -65170=>'AL', -65171=>'AL', -65172=>'AL', -65173=>'AL', -65174=>'AL', -65175=>'AL', -65176=>'AL', -65177=>'AL', -65178=>'AL', -65179=>'AL', -65180=>'AL', -65181=>'AL', -65182=>'AL', -65183=>'AL', -65184=>'AL', -65185=>'AL', -65186=>'AL', -65187=>'AL', -65188=>'AL', -65189=>'AL', -65190=>'AL', -65191=>'AL', -65192=>'AL', -65193=>'AL', -65194=>'AL', -65195=>'AL', -65196=>'AL', -65197=>'AL', -65198=>'AL', -65199=>'AL', -65200=>'AL', -65201=>'AL', -65202=>'AL', -65203=>'AL', -65204=>'AL', -65205=>'AL', -65206=>'AL', -65207=>'AL', -65208=>'AL', -65209=>'AL', -65210=>'AL', -65211=>'AL', -65212=>'AL', -65213=>'AL', -65214=>'AL', -65215=>'AL', -65216=>'AL', -65217=>'AL', -65218=>'AL', -65219=>'AL', -65220=>'AL', -65221=>'AL', -65222=>'AL', -65223=>'AL', -65224=>'AL', -65225=>'AL', -65226=>'AL', -65227=>'AL', -65228=>'AL', -65229=>'AL', -65230=>'AL', -65231=>'AL', -65232=>'AL', -65233=>'AL', -65234=>'AL', -65235=>'AL', -65236=>'AL', -65237=>'AL', -65238=>'AL', -65239=>'AL', -65240=>'AL', -65241=>'AL', -65242=>'AL', -65243=>'AL', -65244=>'AL', -65245=>'AL', -65246=>'AL', -65247=>'AL', -65248=>'AL', -65249=>'AL', -65250=>'AL', -65251=>'AL', -65252=>'AL', -65253=>'AL', -65254=>'AL', -65255=>'AL', -65256=>'AL', -65257=>'AL', -65258=>'AL', -65259=>'AL', -65260=>'AL', -65261=>'AL', -65262=>'AL', -65263=>'AL', -65264=>'AL', -65265=>'AL', -65266=>'AL', -65267=>'AL', -65268=>'AL', -65269=>'AL', -65270=>'AL', -65271=>'AL', -65272=>'AL', -65273=>'AL', -65274=>'AL', -65275=>'AL', -65276=>'AL', -65279=>'BN', -65281=>'ON', -65282=>'ON', -65283=>'ET', -65284=>'ET', -65285=>'ET', -65286=>'ON', -65287=>'ON', -65288=>'ON', -65289=>'ON', -65290=>'ON', -65291=>'ES', -65292=>'CS', -65293=>'ES', -65294=>'CS', -65295=>'CS', -65296=>'EN', -65297=>'EN', -65298=>'EN', -65299=>'EN', -65300=>'EN', -65301=>'EN', -65302=>'EN', -65303=>'EN', -65304=>'EN', -65305=>'EN', -65306=>'CS', -65307=>'ON', -65308=>'ON', -65309=>'ON', -65310=>'ON', -65311=>'ON', -65312=>'ON', -65313=>'L', -65314=>'L', -65315=>'L', -65316=>'L', -65317=>'L', -65318=>'L', -65319=>'L', -65320=>'L', -65321=>'L', -65322=>'L', -65323=>'L', -65324=>'L', -65325=>'L', -65326=>'L', -65327=>'L', -65328=>'L', -65329=>'L', -65330=>'L', -65331=>'L', -65332=>'L', -65333=>'L', -65334=>'L', -65335=>'L', -65336=>'L', -65337=>'L', -65338=>'L', -65339=>'ON', -65340=>'ON', -65341=>'ON', -65342=>'ON', -65343=>'ON', -65344=>'ON', -65345=>'L', -65346=>'L', -65347=>'L', -65348=>'L', -65349=>'L', -65350=>'L', -65351=>'L', -65352=>'L', -65353=>'L', -65354=>'L', -65355=>'L', -65356=>'L', -65357=>'L', -65358=>'L', -65359=>'L', -65360=>'L', -65361=>'L', -65362=>'L', -65363=>'L', -65364=>'L', -65365=>'L', -65366=>'L', -65367=>'L', -65368=>'L', -65369=>'L', -65370=>'L', -65371=>'ON', -65372=>'ON', -65373=>'ON', -65374=>'ON', -65375=>'ON', -65376=>'ON', -65377=>'ON', -65378=>'ON', -65379=>'ON', -65380=>'ON', -65381=>'ON', -65382=>'L', -65383=>'L', -65384=>'L', -65385=>'L', -65386=>'L', -65387=>'L', -65388=>'L', -65389=>'L', -65390=>'L', -65391=>'L', -65392=>'L', -65393=>'L', -65394=>'L', -65395=>'L', -65396=>'L', -65397=>'L', -65398=>'L', -65399=>'L', -65400=>'L', -65401=>'L', -65402=>'L', -65403=>'L', -65404=>'L', -65405=>'L', -65406=>'L', -65407=>'L', -65408=>'L', -65409=>'L', -65410=>'L', -65411=>'L', -65412=>'L', -65413=>'L', -65414=>'L', -65415=>'L', -65416=>'L', -65417=>'L', -65418=>'L', -65419=>'L', -65420=>'L', -65421=>'L', -65422=>'L', -65423=>'L', -65424=>'L', -65425=>'L', -65426=>'L', -65427=>'L', -65428=>'L', -65429=>'L', -65430=>'L', -65431=>'L', -65432=>'L', -65433=>'L', -65434=>'L', -65435=>'L', -65436=>'L', -65437=>'L', -65438=>'L', -65439=>'L', -65440=>'L', -65441=>'L', -65442=>'L', -65443=>'L', -65444=>'L', -65445=>'L', -65446=>'L', -65447=>'L', -65448=>'L', -65449=>'L', -65450=>'L', -65451=>'L', -65452=>'L', -65453=>'L', -65454=>'L', -65455=>'L', -65456=>'L', -65457=>'L', -65458=>'L', -65459=>'L', -65460=>'L', -65461=>'L', -65462=>'L', -65463=>'L', -65464=>'L', -65465=>'L', -65466=>'L', -65467=>'L', -65468=>'L', -65469=>'L', -65470=>'L', -65474=>'L', -65475=>'L', -65476=>'L', -65477=>'L', -65478=>'L', -65479=>'L', -65482=>'L', -65483=>'L', -65484=>'L', -65485=>'L', -65486=>'L', -65487=>'L', -65490=>'L', -65491=>'L', -65492=>'L', -65493=>'L', -65494=>'L', -65495=>'L', -65498=>'L', -65499=>'L', -65500=>'L', -65504=>'ET', -65505=>'ET', -65506=>'ON', -65507=>'ON', -65508=>'ON', -65509=>'ET', -65510=>'ET', -65512=>'ON', -65513=>'ON', -65514=>'ON', -65515=>'ON', -65516=>'ON', -65517=>'ON', -65518=>'ON', -65529=>'ON', -65530=>'ON', -65531=>'ON', -65532=>'ON', -65533=>'ON', -65536=>'L', -65537=>'L', -65538=>'L', -65539=>'L', -65540=>'L', -65541=>'L', -65542=>'L', -65543=>'L', -65544=>'L', -65545=>'L', -65546=>'L', -65547=>'L', -65549=>'L', -65550=>'L', -65551=>'L', -65552=>'L', -65553=>'L', -65554=>'L', -65555=>'L', -65556=>'L', -65557=>'L', -65558=>'L', -65559=>'L', -65560=>'L', -65561=>'L', -65562=>'L', -65563=>'L', -65564=>'L', -65565=>'L', -65566=>'L', -65567=>'L', -65568=>'L', -65569=>'L', -65570=>'L', -65571=>'L', -65572=>'L', -65573=>'L', -65574=>'L', -65576=>'L', -65577=>'L', -65578=>'L', -65579=>'L', -65580=>'L', -65581=>'L', -65582=>'L', -65583=>'L', -65584=>'L', -65585=>'L', -65586=>'L', -65587=>'L', -65588=>'L', -65589=>'L', -65590=>'L', -65591=>'L', -65592=>'L', -65593=>'L', -65594=>'L', -65596=>'L', -65597=>'L', -65599=>'L', -65600=>'L', -65601=>'L', -65602=>'L', -65603=>'L', -65604=>'L', -65605=>'L', -65606=>'L', -65607=>'L', -65608=>'L', -65609=>'L', -65610=>'L', -65611=>'L', -65612=>'L', -65613=>'L', -65616=>'L', -65617=>'L', -65618=>'L', -65619=>'L', -65620=>'L', -65621=>'L', -65622=>'L', -65623=>'L', -65624=>'L', -65625=>'L', -65626=>'L', -65627=>'L', -65628=>'L', -65629=>'L', -65664=>'L', -65665=>'L', -65666=>'L', -65667=>'L', -65668=>'L', -65669=>'L', -65670=>'L', -65671=>'L', -65672=>'L', -65673=>'L', -65674=>'L', -65675=>'L', -65676=>'L', -65677=>'L', -65678=>'L', -65679=>'L', -65680=>'L', -65681=>'L', -65682=>'L', -65683=>'L', -65684=>'L', -65685=>'L', -65686=>'L', -65687=>'L', -65688=>'L', -65689=>'L', -65690=>'L', -65691=>'L', -65692=>'L', -65693=>'L', -65694=>'L', -65695=>'L', -65696=>'L', -65697=>'L', -65698=>'L', -65699=>'L', -65700=>'L', -65701=>'L', -65702=>'L', -65703=>'L', -65704=>'L', -65705=>'L', -65706=>'L', -65707=>'L', -65708=>'L', -65709=>'L', -65710=>'L', -65711=>'L', -65712=>'L', -65713=>'L', -65714=>'L', -65715=>'L', -65716=>'L', -65717=>'L', -65718=>'L', -65719=>'L', -65720=>'L', -65721=>'L', -65722=>'L', -65723=>'L', -65724=>'L', -65725=>'L', -65726=>'L', -65727=>'L', -65728=>'L', -65729=>'L', -65730=>'L', -65731=>'L', -65732=>'L', -65733=>'L', -65734=>'L', -65735=>'L', -65736=>'L', -65737=>'L', -65738=>'L', -65739=>'L', -65740=>'L', -65741=>'L', -65742=>'L', -65743=>'L', -65744=>'L', -65745=>'L', -65746=>'L', -65747=>'L', -65748=>'L', -65749=>'L', -65750=>'L', -65751=>'L', -65752=>'L', -65753=>'L', -65754=>'L', -65755=>'L', -65756=>'L', -65757=>'L', -65758=>'L', -65759=>'L', -65760=>'L', -65761=>'L', -65762=>'L', -65763=>'L', -65764=>'L', -65765=>'L', -65766=>'L', -65767=>'L', -65768=>'L', -65769=>'L', -65770=>'L', -65771=>'L', -65772=>'L', -65773=>'L', -65774=>'L', -65775=>'L', -65776=>'L', -65777=>'L', -65778=>'L', -65779=>'L', -65780=>'L', -65781=>'L', -65782=>'L', -65783=>'L', -65784=>'L', -65785=>'L', -65786=>'L', -65792=>'L', -65793=>'ON', -65794=>'L', -65799=>'L', -65800=>'L', -65801=>'L', -65802=>'L', -65803=>'L', -65804=>'L', -65805=>'L', -65806=>'L', -65807=>'L', -65808=>'L', -65809=>'L', -65810=>'L', -65811=>'L', -65812=>'L', -65813=>'L', -65814=>'L', -65815=>'L', -65816=>'L', -65817=>'L', -65818=>'L', -65819=>'L', -65820=>'L', -65821=>'L', -65822=>'L', -65823=>'L', -65824=>'L', -65825=>'L', -65826=>'L', -65827=>'L', -65828=>'L', -65829=>'L', -65830=>'L', -65831=>'L', -65832=>'L', -65833=>'L', -65834=>'L', -65835=>'L', -65836=>'L', -65837=>'L', -65838=>'L', -65839=>'L', -65840=>'L', -65841=>'L', -65842=>'L', -65843=>'L', -65847=>'L', -65848=>'L', -65849=>'L', -65850=>'L', -65851=>'L', -65852=>'L', -65853=>'L', -65854=>'L', -65855=>'L', -65856=>'ON', -65857=>'ON', -65858=>'ON', -65859=>'ON', -65860=>'ON', -65861=>'ON', -65862=>'ON', -65863=>'ON', -65864=>'ON', -65865=>'ON', -65866=>'ON', -65867=>'ON', -65868=>'ON', -65869=>'ON', -65870=>'ON', -65871=>'ON', -65872=>'ON', -65873=>'ON', -65874=>'ON', -65875=>'ON', -65876=>'ON', -65877=>'ON', -65878=>'ON', -65879=>'ON', -65880=>'ON', -65881=>'ON', -65882=>'ON', -65883=>'ON', -65884=>'ON', -65885=>'ON', -65886=>'ON', -65887=>'ON', -65888=>'ON', -65889=>'ON', -65890=>'ON', -65891=>'ON', -65892=>'ON', -65893=>'ON', -65894=>'ON', -65895=>'ON', -65896=>'ON', -65897=>'ON', -65898=>'ON', -65899=>'ON', -65900=>'ON', -65901=>'ON', -65902=>'ON', -65903=>'ON', -65904=>'ON', -65905=>'ON', -65906=>'ON', -65907=>'ON', -65908=>'ON', -65909=>'ON', -65910=>'ON', -65911=>'ON', -65912=>'ON', -65913=>'ON', -65914=>'ON', -65915=>'ON', -65916=>'ON', -65917=>'ON', -65918=>'ON', -65919=>'ON', -65920=>'ON', -65921=>'ON', -65922=>'ON', -65923=>'ON', -65924=>'ON', -65925=>'ON', -65926=>'ON', -65927=>'ON', -65928=>'ON', -65929=>'ON', -65930=>'ON', -66304=>'L', -66305=>'L', -66306=>'L', -66307=>'L', -66308=>'L', -66309=>'L', -66310=>'L', -66311=>'L', -66312=>'L', -66313=>'L', -66314=>'L', -66315=>'L', -66316=>'L', -66317=>'L', -66318=>'L', -66319=>'L', -66320=>'L', -66321=>'L', -66322=>'L', -66323=>'L', -66324=>'L', -66325=>'L', -66326=>'L', -66327=>'L', -66328=>'L', -66329=>'L', -66330=>'L', -66331=>'L', -66332=>'L', -66333=>'L', -66334=>'L', -66336=>'L', -66337=>'L', -66338=>'L', -66339=>'L', -66352=>'L', -66353=>'L', -66354=>'L', -66355=>'L', -66356=>'L', -66357=>'L', -66358=>'L', -66359=>'L', -66360=>'L', -66361=>'L', -66362=>'L', -66363=>'L', -66364=>'L', -66365=>'L', -66366=>'L', -66367=>'L', -66368=>'L', -66369=>'L', -66370=>'L', -66371=>'L', -66372=>'L', -66373=>'L', -66374=>'L', -66375=>'L', -66376=>'L', -66377=>'L', -66378=>'L', -66432=>'L', -66433=>'L', -66434=>'L', -66435=>'L', -66436=>'L', -66437=>'L', -66438=>'L', -66439=>'L', -66440=>'L', -66441=>'L', -66442=>'L', -66443=>'L', -66444=>'L', -66445=>'L', -66446=>'L', -66447=>'L', -66448=>'L', -66449=>'L', -66450=>'L', -66451=>'L', -66452=>'L', -66453=>'L', -66454=>'L', -66455=>'L', -66456=>'L', -66457=>'L', -66458=>'L', -66459=>'L', -66460=>'L', -66461=>'L', -66463=>'L', -66464=>'L', -66465=>'L', -66466=>'L', -66467=>'L', -66468=>'L', -66469=>'L', -66470=>'L', -66471=>'L', -66472=>'L', -66473=>'L', -66474=>'L', -66475=>'L', -66476=>'L', -66477=>'L', -66478=>'L', -66479=>'L', -66480=>'L', -66481=>'L', -66482=>'L', -66483=>'L', -66484=>'L', -66485=>'L', -66486=>'L', -66487=>'L', -66488=>'L', -66489=>'L', -66490=>'L', -66491=>'L', -66492=>'L', -66493=>'L', -66494=>'L', -66495=>'L', -66496=>'L', -66497=>'L', -66498=>'L', -66499=>'L', -66504=>'L', -66505=>'L', -66506=>'L', -66507=>'L', -66508=>'L', -66509=>'L', -66510=>'L', -66511=>'L', -66512=>'L', -66513=>'L', -66514=>'L', -66515=>'L', -66516=>'L', -66517=>'L', -66560=>'L', -66561=>'L', -66562=>'L', -66563=>'L', -66564=>'L', -66565=>'L', -66566=>'L', -66567=>'L', -66568=>'L', -66569=>'L', -66570=>'L', -66571=>'L', -66572=>'L', -66573=>'L', -66574=>'L', -66575=>'L', -66576=>'L', -66577=>'L', -66578=>'L', -66579=>'L', -66580=>'L', -66581=>'L', -66582=>'L', -66583=>'L', -66584=>'L', -66585=>'L', -66586=>'L', -66587=>'L', -66588=>'L', -66589=>'L', -66590=>'L', -66591=>'L', -66592=>'L', -66593=>'L', -66594=>'L', -66595=>'L', -66596=>'L', -66597=>'L', -66598=>'L', -66599=>'L', -66600=>'L', -66601=>'L', -66602=>'L', -66603=>'L', -66604=>'L', -66605=>'L', -66606=>'L', -66607=>'L', -66608=>'L', -66609=>'L', -66610=>'L', -66611=>'L', -66612=>'L', -66613=>'L', -66614=>'L', -66615=>'L', -66616=>'L', -66617=>'L', -66618=>'L', -66619=>'L', -66620=>'L', -66621=>'L', -66622=>'L', -66623=>'L', -66624=>'L', -66625=>'L', -66626=>'L', -66627=>'L', -66628=>'L', -66629=>'L', -66630=>'L', -66631=>'L', -66632=>'L', -66633=>'L', -66634=>'L', -66635=>'L', -66636=>'L', -66637=>'L', -66638=>'L', -66639=>'L', -66640=>'L', -66641=>'L', -66642=>'L', -66643=>'L', -66644=>'L', -66645=>'L', -66646=>'L', -66647=>'L', -66648=>'L', -66649=>'L', -66650=>'L', -66651=>'L', -66652=>'L', -66653=>'L', -66654=>'L', -66655=>'L', -66656=>'L', -66657=>'L', -66658=>'L', -66659=>'L', -66660=>'L', -66661=>'L', -66662=>'L', -66663=>'L', -66664=>'L', -66665=>'L', -66666=>'L', -66667=>'L', -66668=>'L', -66669=>'L', -66670=>'L', -66671=>'L', -66672=>'L', -66673=>'L', -66674=>'L', -66675=>'L', -66676=>'L', -66677=>'L', -66678=>'L', -66679=>'L', -66680=>'L', -66681=>'L', -66682=>'L', -66683=>'L', -66684=>'L', -66685=>'L', -66686=>'L', -66687=>'L', -66688=>'L', -66689=>'L', -66690=>'L', -66691=>'L', -66692=>'L', -66693=>'L', -66694=>'L', -66695=>'L', -66696=>'L', -66697=>'L', -66698=>'L', -66699=>'L', -66700=>'L', -66701=>'L', -66702=>'L', -66703=>'L', -66704=>'L', -66705=>'L', -66706=>'L', -66707=>'L', -66708=>'L', -66709=>'L', -66710=>'L', -66711=>'L', -66712=>'L', -66713=>'L', -66714=>'L', -66715=>'L', -66716=>'L', -66717=>'L', -66720=>'L', -66721=>'L', -66722=>'L', -66723=>'L', -66724=>'L', -66725=>'L', -66726=>'L', -66727=>'L', -66728=>'L', -66729=>'L', -67584=>'R', -67585=>'R', -67586=>'R', -67587=>'R', -67588=>'R', -67589=>'R', -67592=>'R', -67594=>'R', -67595=>'R', -67596=>'R', -67597=>'R', -67598=>'R', -67599=>'R', -67600=>'R', -67601=>'R', -67602=>'R', -67603=>'R', -67604=>'R', -67605=>'R', -67606=>'R', -67607=>'R', -67608=>'R', -67609=>'R', -67610=>'R', -67611=>'R', -67612=>'R', -67613=>'R', -67614=>'R', -67615=>'R', -67616=>'R', -67617=>'R', -67618=>'R', -67619=>'R', -67620=>'R', -67621=>'R', -67622=>'R', -67623=>'R', -67624=>'R', -67625=>'R', -67626=>'R', -67627=>'R', -67628=>'R', -67629=>'R', -67630=>'R', -67631=>'R', -67632=>'R', -67633=>'R', -67634=>'R', -67635=>'R', -67636=>'R', -67637=>'R', -67639=>'R', -67640=>'R', -67644=>'R', -67647=>'R', -67840=>'R', -67841=>'R', -67842=>'R', -67843=>'R', -67844=>'R', -67845=>'R', -67846=>'R', -67847=>'R', -67848=>'R', -67849=>'R', -67850=>'R', -67851=>'R', -67852=>'R', -67853=>'R', -67854=>'R', -67855=>'R', -67856=>'R', -67857=>'R', -67858=>'R', -67859=>'R', -67860=>'R', -67861=>'R', -67862=>'R', -67863=>'R', -67864=>'R', -67865=>'R', -67871=>'ON', -68096=>'R', -68097=>'NSM', -68098=>'NSM', -68099=>'NSM', -68101=>'NSM', -68102=>'NSM', -68108=>'NSM', -68109=>'NSM', -68110=>'NSM', -68111=>'NSM', -68112=>'R', -68113=>'R', -68114=>'R', -68115=>'R', -68117=>'R', -68118=>'R', -68119=>'R', -68121=>'R', -68122=>'R', -68123=>'R', -68124=>'R', -68125=>'R', -68126=>'R', -68127=>'R', -68128=>'R', -68129=>'R', -68130=>'R', -68131=>'R', -68132=>'R', -68133=>'R', -68134=>'R', -68135=>'R', -68136=>'R', -68137=>'R', -68138=>'R', -68139=>'R', -68140=>'R', -68141=>'R', -68142=>'R', -68143=>'R', -68144=>'R', -68145=>'R', -68146=>'R', -68147=>'R', -68152=>'NSM', -68153=>'NSM', -68154=>'NSM', -68159=>'NSM', -68160=>'R', -68161=>'R', -68162=>'R', -68163=>'R', -68164=>'R', -68165=>'R', -68166=>'R', -68167=>'R', -68176=>'R', -68177=>'R', -68178=>'R', -68179=>'R', -68180=>'R', -68181=>'R', -68182=>'R', -68183=>'R', -68184=>'R', -73728=>'L', -73729=>'L', -73730=>'L', -73731=>'L', -73732=>'L', -73733=>'L', -73734=>'L', -73735=>'L', -73736=>'L', -73737=>'L', -73738=>'L', -73739=>'L', -73740=>'L', -73741=>'L', -73742=>'L', -73743=>'L', -73744=>'L', -73745=>'L', -73746=>'L', -73747=>'L', -73748=>'L', -73749=>'L', -73750=>'L', -73751=>'L', -73752=>'L', -73753=>'L', -73754=>'L', -73755=>'L', -73756=>'L', -73757=>'L', -73758=>'L', -73759=>'L', -73760=>'L', -73761=>'L', -73762=>'L', -73763=>'L', -73764=>'L', -73765=>'L', -73766=>'L', -73767=>'L', -73768=>'L', -73769=>'L', -73770=>'L', -73771=>'L', -73772=>'L', -73773=>'L', -73774=>'L', -73775=>'L', -73776=>'L', -73777=>'L', -73778=>'L', -73779=>'L', -73780=>'L', -73781=>'L', -73782=>'L', -73783=>'L', -73784=>'L', -73785=>'L', -73786=>'L', -73787=>'L', -73788=>'L', -73789=>'L', -73790=>'L', -73791=>'L', -73792=>'L', -73793=>'L', -73794=>'L', -73795=>'L', -73796=>'L', -73797=>'L', -73798=>'L', -73799=>'L', -73800=>'L', -73801=>'L', -73802=>'L', -73803=>'L', -73804=>'L', -73805=>'L', -73806=>'L', -73807=>'L', -73808=>'L', -73809=>'L', -73810=>'L', -73811=>'L', -73812=>'L', -73813=>'L', -73814=>'L', -73815=>'L', -73816=>'L', -73817=>'L', -73818=>'L', -73819=>'L', -73820=>'L', -73821=>'L', -73822=>'L', -73823=>'L', -73824=>'L', -73825=>'L', -73826=>'L', -73827=>'L', -73828=>'L', -73829=>'L', -73830=>'L', -73831=>'L', -73832=>'L', -73833=>'L', -73834=>'L', -73835=>'L', -73836=>'L', -73837=>'L', -73838=>'L', -73839=>'L', -73840=>'L', -73841=>'L', -73842=>'L', -73843=>'L', -73844=>'L', -73845=>'L', -73846=>'L', -73847=>'L', -73848=>'L', -73849=>'L', -73850=>'L', -73851=>'L', -73852=>'L', -73853=>'L', -73854=>'L', -73855=>'L', -73856=>'L', -73857=>'L', -73858=>'L', -73859=>'L', -73860=>'L', -73861=>'L', -73862=>'L', -73863=>'L', -73864=>'L', -73865=>'L', -73866=>'L', -73867=>'L', -73868=>'L', -73869=>'L', -73870=>'L', -73871=>'L', -73872=>'L', -73873=>'L', -73874=>'L', -73875=>'L', -73876=>'L', -73877=>'L', -73878=>'L', -73879=>'L', -73880=>'L', -73881=>'L', -73882=>'L', -73883=>'L', -73884=>'L', -73885=>'L', -73886=>'L', -73887=>'L', -73888=>'L', -73889=>'L', -73890=>'L', -73891=>'L', -73892=>'L', -73893=>'L', -73894=>'L', -73895=>'L', -73896=>'L', -73897=>'L', -73898=>'L', -73899=>'L', -73900=>'L', -73901=>'L', -73902=>'L', -73903=>'L', -73904=>'L', -73905=>'L', -73906=>'L', -73907=>'L', -73908=>'L', -73909=>'L', -73910=>'L', -73911=>'L', -73912=>'L', -73913=>'L', -73914=>'L', -73915=>'L', -73916=>'L', -73917=>'L', -73918=>'L', -73919=>'L', -73920=>'L', -73921=>'L', -73922=>'L', -73923=>'L', -73924=>'L', -73925=>'L', -73926=>'L', -73927=>'L', -73928=>'L', -73929=>'L', -73930=>'L', -73931=>'L', -73932=>'L', -73933=>'L', -73934=>'L', -73935=>'L', -73936=>'L', -73937=>'L', -73938=>'L', -73939=>'L', -73940=>'L', -73941=>'L', -73942=>'L', -73943=>'L', -73944=>'L', -73945=>'L', -73946=>'L', -73947=>'L', -73948=>'L', -73949=>'L', -73950=>'L', -73951=>'L', -73952=>'L', -73953=>'L', -73954=>'L', -73955=>'L', -73956=>'L', -73957=>'L', -73958=>'L', -73959=>'L', -73960=>'L', -73961=>'L', -73962=>'L', -73963=>'L', -73964=>'L', -73965=>'L', -73966=>'L', -73967=>'L', -73968=>'L', -73969=>'L', -73970=>'L', -73971=>'L', -73972=>'L', -73973=>'L', -73974=>'L', -73975=>'L', -73976=>'L', -73977=>'L', -73978=>'L', -73979=>'L', -73980=>'L', -73981=>'L', -73982=>'L', -73983=>'L', -73984=>'L', -73985=>'L', -73986=>'L', -73987=>'L', -73988=>'L', -73989=>'L', -73990=>'L', -73991=>'L', -73992=>'L', -73993=>'L', -73994=>'L', -73995=>'L', -73996=>'L', -73997=>'L', -73998=>'L', -73999=>'L', -74000=>'L', -74001=>'L', -74002=>'L', -74003=>'L', -74004=>'L', -74005=>'L', -74006=>'L', -74007=>'L', -74008=>'L', -74009=>'L', -74010=>'L', -74011=>'L', -74012=>'L', -74013=>'L', -74014=>'L', -74015=>'L', -74016=>'L', -74017=>'L', -74018=>'L', -74019=>'L', -74020=>'L', -74021=>'L', -74022=>'L', -74023=>'L', -74024=>'L', -74025=>'L', -74026=>'L', -74027=>'L', -74028=>'L', -74029=>'L', -74030=>'L', -74031=>'L', -74032=>'L', -74033=>'L', -74034=>'L', -74035=>'L', -74036=>'L', -74037=>'L', -74038=>'L', -74039=>'L', -74040=>'L', -74041=>'L', -74042=>'L', -74043=>'L', -74044=>'L', -74045=>'L', -74046=>'L', -74047=>'L', -74048=>'L', -74049=>'L', -74050=>'L', -74051=>'L', -74052=>'L', -74053=>'L', -74054=>'L', -74055=>'L', -74056=>'L', -74057=>'L', -74058=>'L', -74059=>'L', -74060=>'L', -74061=>'L', -74062=>'L', -74063=>'L', -74064=>'L', -74065=>'L', -74066=>'L', -74067=>'L', -74068=>'L', -74069=>'L', -74070=>'L', -74071=>'L', -74072=>'L', -74073=>'L', -74074=>'L', -74075=>'L', -74076=>'L', -74077=>'L', -74078=>'L', -74079=>'L', -74080=>'L', -74081=>'L', -74082=>'L', -74083=>'L', -74084=>'L', -74085=>'L', -74086=>'L', -74087=>'L', -74088=>'L', -74089=>'L', -74090=>'L', -74091=>'L', -74092=>'L', -74093=>'L', -74094=>'L', -74095=>'L', -74096=>'L', -74097=>'L', -74098=>'L', -74099=>'L', -74100=>'L', -74101=>'L', -74102=>'L', -74103=>'L', -74104=>'L', -74105=>'L', -74106=>'L', -74107=>'L', -74108=>'L', -74109=>'L', -74110=>'L', -74111=>'L', -74112=>'L', -74113=>'L', -74114=>'L', -74115=>'L', -74116=>'L', -74117=>'L', -74118=>'L', -74119=>'L', -74120=>'L', -74121=>'L', -74122=>'L', -74123=>'L', -74124=>'L', -74125=>'L', -74126=>'L', -74127=>'L', -74128=>'L', -74129=>'L', -74130=>'L', -74131=>'L', -74132=>'L', -74133=>'L', -74134=>'L', -74135=>'L', -74136=>'L', -74137=>'L', -74138=>'L', -74139=>'L', -74140=>'L', -74141=>'L', -74142=>'L', -74143=>'L', -74144=>'L', -74145=>'L', -74146=>'L', -74147=>'L', -74148=>'L', -74149=>'L', -74150=>'L', -74151=>'L', -74152=>'L', -74153=>'L', -74154=>'L', -74155=>'L', -74156=>'L', -74157=>'L', -74158=>'L', -74159=>'L', -74160=>'L', -74161=>'L', -74162=>'L', -74163=>'L', -74164=>'L', -74165=>'L', -74166=>'L', -74167=>'L', -74168=>'L', -74169=>'L', -74170=>'L', -74171=>'L', -74172=>'L', -74173=>'L', -74174=>'L', -74175=>'L', -74176=>'L', -74177=>'L', -74178=>'L', -74179=>'L', -74180=>'L', -74181=>'L', -74182=>'L', -74183=>'L', -74184=>'L', -74185=>'L', -74186=>'L', -74187=>'L', -74188=>'L', -74189=>'L', -74190=>'L', -74191=>'L', -74192=>'L', -74193=>'L', -74194=>'L', -74195=>'L', -74196=>'L', -74197=>'L', -74198=>'L', -74199=>'L', -74200=>'L', -74201=>'L', -74202=>'L', -74203=>'L', -74204=>'L', -74205=>'L', -74206=>'L', -74207=>'L', -74208=>'L', -74209=>'L', -74210=>'L', -74211=>'L', -74212=>'L', -74213=>'L', -74214=>'L', -74215=>'L', -74216=>'L', -74217=>'L', -74218=>'L', -74219=>'L', -74220=>'L', -74221=>'L', -74222=>'L', -74223=>'L', -74224=>'L', -74225=>'L', -74226=>'L', -74227=>'L', -74228=>'L', -74229=>'L', -74230=>'L', -74231=>'L', -74232=>'L', -74233=>'L', -74234=>'L', -74235=>'L', -74236=>'L', -74237=>'L', -74238=>'L', -74239=>'L', -74240=>'L', -74241=>'L', -74242=>'L', -74243=>'L', -74244=>'L', -74245=>'L', -74246=>'L', -74247=>'L', -74248=>'L', -74249=>'L', -74250=>'L', -74251=>'L', -74252=>'L', -74253=>'L', -74254=>'L', -74255=>'L', -74256=>'L', -74257=>'L', -74258=>'L', -74259=>'L', -74260=>'L', -74261=>'L', -74262=>'L', -74263=>'L', -74264=>'L', -74265=>'L', -74266=>'L', -74267=>'L', -74268=>'L', -74269=>'L', -74270=>'L', -74271=>'L', -74272=>'L', -74273=>'L', -74274=>'L', -74275=>'L', -74276=>'L', -74277=>'L', -74278=>'L', -74279=>'L', -74280=>'L', -74281=>'L', -74282=>'L', -74283=>'L', -74284=>'L', -74285=>'L', -74286=>'L', -74287=>'L', -74288=>'L', -74289=>'L', -74290=>'L', -74291=>'L', -74292=>'L', -74293=>'L', -74294=>'L', -74295=>'L', -74296=>'L', -74297=>'L', -74298=>'L', -74299=>'L', -74300=>'L', -74301=>'L', -74302=>'L', -74303=>'L', -74304=>'L', -74305=>'L', -74306=>'L', -74307=>'L', -74308=>'L', -74309=>'L', -74310=>'L', -74311=>'L', -74312=>'L', -74313=>'L', -74314=>'L', -74315=>'L', -74316=>'L', -74317=>'L', -74318=>'L', -74319=>'L', -74320=>'L', -74321=>'L', -74322=>'L', -74323=>'L', -74324=>'L', -74325=>'L', -74326=>'L', -74327=>'L', -74328=>'L', -74329=>'L', -74330=>'L', -74331=>'L', -74332=>'L', -74333=>'L', -74334=>'L', -74335=>'L', -74336=>'L', -74337=>'L', -74338=>'L', -74339=>'L', -74340=>'L', -74341=>'L', -74342=>'L', -74343=>'L', -74344=>'L', -74345=>'L', -74346=>'L', -74347=>'L', -74348=>'L', -74349=>'L', -74350=>'L', -74351=>'L', -74352=>'L', -74353=>'L', -74354=>'L', -74355=>'L', -74356=>'L', -74357=>'L', -74358=>'L', -74359=>'L', -74360=>'L', -74361=>'L', -74362=>'L', -74363=>'L', -74364=>'L', -74365=>'L', -74366=>'L', -74367=>'L', -74368=>'L', -74369=>'L', -74370=>'L', -74371=>'L', -74372=>'L', -74373=>'L', -74374=>'L', -74375=>'L', -74376=>'L', -74377=>'L', -74378=>'L', -74379=>'L', -74380=>'L', -74381=>'L', -74382=>'L', -74383=>'L', -74384=>'L', -74385=>'L', -74386=>'L', -74387=>'L', -74388=>'L', -74389=>'L', -74390=>'L', -74391=>'L', -74392=>'L', -74393=>'L', -74394=>'L', -74395=>'L', -74396=>'L', -74397=>'L', -74398=>'L', -74399=>'L', -74400=>'L', -74401=>'L', -74402=>'L', -74403=>'L', -74404=>'L', -74405=>'L', -74406=>'L', -74407=>'L', -74408=>'L', -74409=>'L', -74410=>'L', -74411=>'L', -74412=>'L', -74413=>'L', -74414=>'L', -74415=>'L', -74416=>'L', -74417=>'L', -74418=>'L', -74419=>'L', -74420=>'L', -74421=>'L', -74422=>'L', -74423=>'L', -74424=>'L', -74425=>'L', -74426=>'L', -74427=>'L', -74428=>'L', -74429=>'L', -74430=>'L', -74431=>'L', -74432=>'L', -74433=>'L', -74434=>'L', -74435=>'L', -74436=>'L', -74437=>'L', -74438=>'L', -74439=>'L', -74440=>'L', -74441=>'L', -74442=>'L', -74443=>'L', -74444=>'L', -74445=>'L', -74446=>'L', -74447=>'L', -74448=>'L', -74449=>'L', -74450=>'L', -74451=>'L', -74452=>'L', -74453=>'L', -74454=>'L', -74455=>'L', -74456=>'L', -74457=>'L', -74458=>'L', -74459=>'L', -74460=>'L', -74461=>'L', -74462=>'L', -74463=>'L', -74464=>'L', -74465=>'L', -74466=>'L', -74467=>'L', -74468=>'L', -74469=>'L', -74470=>'L', -74471=>'L', -74472=>'L', -74473=>'L', -74474=>'L', -74475=>'L', -74476=>'L', -74477=>'L', -74478=>'L', -74479=>'L', -74480=>'L', -74481=>'L', -74482=>'L', -74483=>'L', -74484=>'L', -74485=>'L', -74486=>'L', -74487=>'L', -74488=>'L', -74489=>'L', -74490=>'L', -74491=>'L', -74492=>'L', -74493=>'L', -74494=>'L', -74495=>'L', -74496=>'L', -74497=>'L', -74498=>'L', -74499=>'L', -74500=>'L', -74501=>'L', -74502=>'L', -74503=>'L', -74504=>'L', -74505=>'L', -74506=>'L', -74507=>'L', -74508=>'L', -74509=>'L', -74510=>'L', -74511=>'L', -74512=>'L', -74513=>'L', -74514=>'L', -74515=>'L', -74516=>'L', -74517=>'L', -74518=>'L', -74519=>'L', -74520=>'L', -74521=>'L', -74522=>'L', -74523=>'L', -74524=>'L', -74525=>'L', -74526=>'L', -74527=>'L', -74528=>'L', -74529=>'L', -74530=>'L', -74531=>'L', -74532=>'L', -74533=>'L', -74534=>'L', -74535=>'L', -74536=>'L', -74537=>'L', -74538=>'L', -74539=>'L', -74540=>'L', -74541=>'L', -74542=>'L', -74543=>'L', -74544=>'L', -74545=>'L', -74546=>'L', -74547=>'L', -74548=>'L', -74549=>'L', -74550=>'L', -74551=>'L', -74552=>'L', -74553=>'L', -74554=>'L', -74555=>'L', -74556=>'L', -74557=>'L', -74558=>'L', -74559=>'L', -74560=>'L', -74561=>'L', -74562=>'L', -74563=>'L', -74564=>'L', -74565=>'L', -74566=>'L', -74567=>'L', -74568=>'L', -74569=>'L', -74570=>'L', -74571=>'L', -74572=>'L', -74573=>'L', -74574=>'L', -74575=>'L', -74576=>'L', -74577=>'L', -74578=>'L', -74579=>'L', -74580=>'L', -74581=>'L', -74582=>'L', -74583=>'L', -74584=>'L', -74585=>'L', -74586=>'L', -74587=>'L', -74588=>'L', -74589=>'L', -74590=>'L', -74591=>'L', -74592=>'L', -74593=>'L', -74594=>'L', -74595=>'L', -74596=>'L', -74597=>'L', -74598=>'L', -74599=>'L', -74600=>'L', -74601=>'L', -74602=>'L', -74603=>'L', -74604=>'L', -74605=>'L', -74606=>'L', -74752=>'L', -74753=>'L', -74754=>'L', -74755=>'L', -74756=>'L', -74757=>'L', -74758=>'L', -74759=>'L', -74760=>'L', -74761=>'L', -74762=>'L', -74763=>'L', -74764=>'L', -74765=>'L', -74766=>'L', -74767=>'L', -74768=>'L', -74769=>'L', -74770=>'L', -74771=>'L', -74772=>'L', -74773=>'L', -74774=>'L', -74775=>'L', -74776=>'L', -74777=>'L', -74778=>'L', -74779=>'L', -74780=>'L', -74781=>'L', -74782=>'L', -74783=>'L', -74784=>'L', -74785=>'L', -74786=>'L', -74787=>'L', -74788=>'L', -74789=>'L', -74790=>'L', -74791=>'L', -74792=>'L', -74793=>'L', -74794=>'L', -74795=>'L', -74796=>'L', -74797=>'L', -74798=>'L', -74799=>'L', -74800=>'L', -74801=>'L', -74802=>'L', -74803=>'L', -74804=>'L', -74805=>'L', -74806=>'L', -74807=>'L', -74808=>'L', -74809=>'L', -74810=>'L', -74811=>'L', -74812=>'L', -74813=>'L', -74814=>'L', -74815=>'L', -74816=>'L', -74817=>'L', -74818=>'L', -74819=>'L', -74820=>'L', -74821=>'L', -74822=>'L', -74823=>'L', -74824=>'L', -74825=>'L', -74826=>'L', -74827=>'L', -74828=>'L', -74829=>'L', -74830=>'L', -74831=>'L', -74832=>'L', -74833=>'L', -74834=>'L', -74835=>'L', -74836=>'L', -74837=>'L', -74838=>'L', -74839=>'L', -74840=>'L', -74841=>'L', -74842=>'L', -74843=>'L', -74844=>'L', -74845=>'L', -74846=>'L', -74847=>'L', -74848=>'L', -74849=>'L', -74850=>'L', -74864=>'L', -74865=>'L', -74866=>'L', -74867=>'L', -118784=>'L', -118785=>'L', -118786=>'L', -118787=>'L', -118788=>'L', -118789=>'L', -118790=>'L', -118791=>'L', -118792=>'L', -118793=>'L', -118794=>'L', -118795=>'L', -118796=>'L', -118797=>'L', -118798=>'L', -118799=>'L', -118800=>'L', -118801=>'L', -118802=>'L', -118803=>'L', -118804=>'L', -118805=>'L', -118806=>'L', -118807=>'L', -118808=>'L', -118809=>'L', -118810=>'L', -118811=>'L', -118812=>'L', -118813=>'L', -118814=>'L', -118815=>'L', -118816=>'L', -118817=>'L', -118818=>'L', -118819=>'L', -118820=>'L', -118821=>'L', -118822=>'L', -118823=>'L', -118824=>'L', -118825=>'L', -118826=>'L', -118827=>'L', -118828=>'L', -118829=>'L', -118830=>'L', -118831=>'L', -118832=>'L', -118833=>'L', -118834=>'L', -118835=>'L', -118836=>'L', -118837=>'L', -118838=>'L', -118839=>'L', -118840=>'L', -118841=>'L', -118842=>'L', -118843=>'L', -118844=>'L', -118845=>'L', -118846=>'L', -118847=>'L', -118848=>'L', -118849=>'L', -118850=>'L', -118851=>'L', -118852=>'L', -118853=>'L', -118854=>'L', -118855=>'L', -118856=>'L', -118857=>'L', -118858=>'L', -118859=>'L', -118860=>'L', -118861=>'L', -118862=>'L', -118863=>'L', -118864=>'L', -118865=>'L', -118866=>'L', -118867=>'L', -118868=>'L', -118869=>'L', -118870=>'L', -118871=>'L', -118872=>'L', -118873=>'L', -118874=>'L', -118875=>'L', -118876=>'L', -118877=>'L', -118878=>'L', -118879=>'L', -118880=>'L', -118881=>'L', -118882=>'L', -118883=>'L', -118884=>'L', -118885=>'L', -118886=>'L', -118887=>'L', -118888=>'L', -118889=>'L', -118890=>'L', -118891=>'L', -118892=>'L', -118893=>'L', -118894=>'L', -118895=>'L', -118896=>'L', -118897=>'L', -118898=>'L', -118899=>'L', -118900=>'L', -118901=>'L', -118902=>'L', -118903=>'L', -118904=>'L', -118905=>'L', -118906=>'L', -118907=>'L', -118908=>'L', -118909=>'L', -118910=>'L', -118911=>'L', -118912=>'L', -118913=>'L', -118914=>'L', -118915=>'L', -118916=>'L', -118917=>'L', -118918=>'L', -118919=>'L', -118920=>'L', -118921=>'L', -118922=>'L', -118923=>'L', -118924=>'L', -118925=>'L', -118926=>'L', -118927=>'L', -118928=>'L', -118929=>'L', -118930=>'L', -118931=>'L', -118932=>'L', -118933=>'L', -118934=>'L', -118935=>'L', -118936=>'L', -118937=>'L', -118938=>'L', -118939=>'L', -118940=>'L', -118941=>'L', -118942=>'L', -118943=>'L', -118944=>'L', -118945=>'L', -118946=>'L', -118947=>'L', -118948=>'L', -118949=>'L', -118950=>'L', -118951=>'L', -118952=>'L', -118953=>'L', -118954=>'L', -118955=>'L', -118956=>'L', -118957=>'L', -118958=>'L', -118959=>'L', -118960=>'L', -118961=>'L', -118962=>'L', -118963=>'L', -118964=>'L', -118965=>'L', -118966=>'L', -118967=>'L', -118968=>'L', -118969=>'L', -118970=>'L', -118971=>'L', -118972=>'L', -118973=>'L', -118974=>'L', -118975=>'L', -118976=>'L', -118977=>'L', -118978=>'L', -118979=>'L', -118980=>'L', -118981=>'L', -118982=>'L', -118983=>'L', -118984=>'L', -118985=>'L', -118986=>'L', -118987=>'L', -118988=>'L', -118989=>'L', -118990=>'L', -118991=>'L', -118992=>'L', -118993=>'L', -118994=>'L', -118995=>'L', -118996=>'L', -118997=>'L', -118998=>'L', -118999=>'L', -119000=>'L', -119001=>'L', -119002=>'L', -119003=>'L', -119004=>'L', -119005=>'L', -119006=>'L', -119007=>'L', -119008=>'L', -119009=>'L', -119010=>'L', -119011=>'L', -119012=>'L', -119013=>'L', -119014=>'L', -119015=>'L', -119016=>'L', -119017=>'L', -119018=>'L', -119019=>'L', -119020=>'L', -119021=>'L', -119022=>'L', -119023=>'L', -119024=>'L', -119025=>'L', -119026=>'L', -119027=>'L', -119028=>'L', -119029=>'L', -119040=>'L', -119041=>'L', -119042=>'L', -119043=>'L', -119044=>'L', -119045=>'L', -119046=>'L', -119047=>'L', -119048=>'L', -119049=>'L', -119050=>'L', -119051=>'L', -119052=>'L', -119053=>'L', -119054=>'L', -119055=>'L', -119056=>'L', -119057=>'L', -119058=>'L', -119059=>'L', -119060=>'L', -119061=>'L', -119062=>'L', -119063=>'L', -119064=>'L', -119065=>'L', -119066=>'L', -119067=>'L', -119068=>'L', -119069=>'L', -119070=>'L', -119071=>'L', -119072=>'L', -119073=>'L', -119074=>'L', -119075=>'L', -119076=>'L', -119077=>'L', -119078=>'L', -119082=>'L', -119083=>'L', -119084=>'L', -119085=>'L', -119086=>'L', -119087=>'L', -119088=>'L', -119089=>'L', -119090=>'L', -119091=>'L', -119092=>'L', -119093=>'L', -119094=>'L', -119095=>'L', -119096=>'L', -119097=>'L', -119098=>'L', -119099=>'L', -119100=>'L', -119101=>'L', -119102=>'L', -119103=>'L', -119104=>'L', -119105=>'L', -119106=>'L', -119107=>'L', -119108=>'L', -119109=>'L', -119110=>'L', -119111=>'L', -119112=>'L', -119113=>'L', -119114=>'L', -119115=>'L', -119116=>'L', -119117=>'L', -119118=>'L', -119119=>'L', -119120=>'L', -119121=>'L', -119122=>'L', -119123=>'L', -119124=>'L', -119125=>'L', -119126=>'L', -119127=>'L', -119128=>'L', -119129=>'L', -119130=>'L', -119131=>'L', -119132=>'L', -119133=>'L', -119134=>'L', -119135=>'L', -119136=>'L', -119137=>'L', -119138=>'L', -119139=>'L', -119140=>'L', -119141=>'L', -119142=>'L', -119143=>'NSM', -119144=>'NSM', -119145=>'NSM', -119146=>'L', -119147=>'L', -119148=>'L', -119149=>'L', -119150=>'L', -119151=>'L', -119152=>'L', -119153=>'L', -119154=>'L', -119155=>'BN', -119156=>'BN', -119157=>'BN', -119158=>'BN', -119159=>'BN', -119160=>'BN', -119161=>'BN', -119162=>'BN', -119163=>'NSM', -119164=>'NSM', -119165=>'NSM', -119166=>'NSM', -119167=>'NSM', -119168=>'NSM', -119169=>'NSM', -119170=>'NSM', -119171=>'L', -119172=>'L', -119173=>'NSM', -119174=>'NSM', -119175=>'NSM', -119176=>'NSM', -119177=>'NSM', -119178=>'NSM', -119179=>'NSM', -119180=>'L', -119181=>'L', -119182=>'L', -119183=>'L', -119184=>'L', -119185=>'L', -119186=>'L', -119187=>'L', -119188=>'L', -119189=>'L', -119190=>'L', -119191=>'L', -119192=>'L', -119193=>'L', -119194=>'L', -119195=>'L', -119196=>'L', -119197=>'L', -119198=>'L', -119199=>'L', -119200=>'L', -119201=>'L', -119202=>'L', -119203=>'L', -119204=>'L', -119205=>'L', -119206=>'L', -119207=>'L', -119208=>'L', -119209=>'L', -119210=>'NSM', -119211=>'NSM', -119212=>'NSM', -119213=>'NSM', -119214=>'L', -119215=>'L', -119216=>'L', -119217=>'L', -119218=>'L', -119219=>'L', -119220=>'L', -119221=>'L', -119222=>'L', -119223=>'L', -119224=>'L', -119225=>'L', -119226=>'L', -119227=>'L', -119228=>'L', -119229=>'L', -119230=>'L', -119231=>'L', -119232=>'L', -119233=>'L', -119234=>'L', -119235=>'L', -119236=>'L', -119237=>'L', -119238=>'L', -119239=>'L', -119240=>'L', -119241=>'L', -119242=>'L', -119243=>'L', -119244=>'L', -119245=>'L', -119246=>'L', -119247=>'L', -119248=>'L', -119249=>'L', -119250=>'L', -119251=>'L', -119252=>'L', -119253=>'L', -119254=>'L', -119255=>'L', -119256=>'L', -119257=>'L', -119258=>'L', -119259=>'L', -119260=>'L', -119261=>'L', -119296=>'ON', -119297=>'ON', -119298=>'ON', -119299=>'ON', -119300=>'ON', -119301=>'ON', -119302=>'ON', -119303=>'ON', -119304=>'ON', -119305=>'ON', -119306=>'ON', -119307=>'ON', -119308=>'ON', -119309=>'ON', -119310=>'ON', -119311=>'ON', -119312=>'ON', -119313=>'ON', -119314=>'ON', -119315=>'ON', -119316=>'ON', -119317=>'ON', -119318=>'ON', -119319=>'ON', -119320=>'ON', -119321=>'ON', -119322=>'ON', -119323=>'ON', -119324=>'ON', -119325=>'ON', -119326=>'ON', -119327=>'ON', -119328=>'ON', -119329=>'ON', -119330=>'ON', -119331=>'ON', -119332=>'ON', -119333=>'ON', -119334=>'ON', -119335=>'ON', -119336=>'ON', -119337=>'ON', -119338=>'ON', -119339=>'ON', -119340=>'ON', -119341=>'ON', -119342=>'ON', -119343=>'ON', -119344=>'ON', -119345=>'ON', -119346=>'ON', -119347=>'ON', -119348=>'ON', -119349=>'ON', -119350=>'ON', -119351=>'ON', -119352=>'ON', -119353=>'ON', -119354=>'ON', -119355=>'ON', -119356=>'ON', -119357=>'ON', -119358=>'ON', -119359=>'ON', -119360=>'ON', -119361=>'ON', -119362=>'NSM', -119363=>'NSM', -119364=>'NSM', -119365=>'ON', -119552=>'ON', -119553=>'ON', -119554=>'ON', -119555=>'ON', -119556=>'ON', -119557=>'ON', -119558=>'ON', -119559=>'ON', -119560=>'ON', -119561=>'ON', -119562=>'ON', -119563=>'ON', -119564=>'ON', -119565=>'ON', -119566=>'ON', -119567=>'ON', -119568=>'ON', -119569=>'ON', -119570=>'ON', -119571=>'ON', -119572=>'ON', -119573=>'ON', -119574=>'ON', -119575=>'ON', -119576=>'ON', -119577=>'ON', -119578=>'ON', -119579=>'ON', -119580=>'ON', -119581=>'ON', -119582=>'ON', -119583=>'ON', -119584=>'ON', -119585=>'ON', -119586=>'ON', -119587=>'ON', -119588=>'ON', -119589=>'ON', -119590=>'ON', -119591=>'ON', -119592=>'ON', -119593=>'ON', -119594=>'ON', -119595=>'ON', -119596=>'ON', -119597=>'ON', -119598=>'ON', -119599=>'ON', -119600=>'ON', -119601=>'ON', -119602=>'ON', -119603=>'ON', -119604=>'ON', -119605=>'ON', -119606=>'ON', -119607=>'ON', -119608=>'ON', -119609=>'ON', -119610=>'ON', -119611=>'ON', -119612=>'ON', -119613=>'ON', -119614=>'ON', -119615=>'ON', -119616=>'ON', -119617=>'ON', -119618=>'ON', -119619=>'ON', -119620=>'ON', -119621=>'ON', -119622=>'ON', -119623=>'ON', -119624=>'ON', -119625=>'ON', -119626=>'ON', -119627=>'ON', -119628=>'ON', -119629=>'ON', -119630=>'ON', -119631=>'ON', -119632=>'ON', -119633=>'ON', -119634=>'ON', -119635=>'ON', -119636=>'ON', -119637=>'ON', -119638=>'ON', -119648=>'L', -119649=>'L', -119650=>'L', -119651=>'L', -119652=>'L', -119653=>'L', -119654=>'L', -119655=>'L', -119656=>'L', -119657=>'L', -119658=>'L', -119659=>'L', -119660=>'L', -119661=>'L', -119662=>'L', -119663=>'L', -119664=>'L', -119665=>'L', -119808=>'L', -119809=>'L', -119810=>'L', -119811=>'L', -119812=>'L', -119813=>'L', -119814=>'L', -119815=>'L', -119816=>'L', -119817=>'L', -119818=>'L', -119819=>'L', -119820=>'L', -119821=>'L', -119822=>'L', -119823=>'L', -119824=>'L', -119825=>'L', -119826=>'L', -119827=>'L', -119828=>'L', -119829=>'L', -119830=>'L', -119831=>'L', -119832=>'L', -119833=>'L', -119834=>'L', -119835=>'L', -119836=>'L', -119837=>'L', -119838=>'L', -119839=>'L', -119840=>'L', -119841=>'L', -119842=>'L', -119843=>'L', -119844=>'L', -119845=>'L', -119846=>'L', -119847=>'L', -119848=>'L', -119849=>'L', -119850=>'L', -119851=>'L', -119852=>'L', -119853=>'L', -119854=>'L', -119855=>'L', -119856=>'L', -119857=>'L', -119858=>'L', -119859=>'L', -119860=>'L', -119861=>'L', -119862=>'L', -119863=>'L', -119864=>'L', -119865=>'L', -119866=>'L', -119867=>'L', -119868=>'L', -119869=>'L', -119870=>'L', -119871=>'L', -119872=>'L', -119873=>'L', -119874=>'L', -119875=>'L', -119876=>'L', -119877=>'L', -119878=>'L', -119879=>'L', -119880=>'L', -119881=>'L', -119882=>'L', -119883=>'L', -119884=>'L', -119885=>'L', -119886=>'L', -119887=>'L', -119888=>'L', -119889=>'L', -119890=>'L', -119891=>'L', -119892=>'L', -119894=>'L', -119895=>'L', -119896=>'L', -119897=>'L', -119898=>'L', -119899=>'L', -119900=>'L', -119901=>'L', -119902=>'L', -119903=>'L', -119904=>'L', -119905=>'L', -119906=>'L', -119907=>'L', -119908=>'L', -119909=>'L', -119910=>'L', -119911=>'L', -119912=>'L', -119913=>'L', -119914=>'L', -119915=>'L', -119916=>'L', -119917=>'L', -119918=>'L', -119919=>'L', -119920=>'L', -119921=>'L', -119922=>'L', -119923=>'L', -119924=>'L', -119925=>'L', -119926=>'L', -119927=>'L', -119928=>'L', -119929=>'L', -119930=>'L', -119931=>'L', -119932=>'L', -119933=>'L', -119934=>'L', -119935=>'L', -119936=>'L', -119937=>'L', -119938=>'L', -119939=>'L', -119940=>'L', -119941=>'L', -119942=>'L', -119943=>'L', -119944=>'L', -119945=>'L', -119946=>'L', -119947=>'L', -119948=>'L', -119949=>'L', -119950=>'L', -119951=>'L', -119952=>'L', -119953=>'L', -119954=>'L', -119955=>'L', -119956=>'L', -119957=>'L', -119958=>'L', -119959=>'L', -119960=>'L', -119961=>'L', -119962=>'L', -119963=>'L', -119964=>'L', -119966=>'L', -119967=>'L', -119970=>'L', -119973=>'L', -119974=>'L', -119977=>'L', -119978=>'L', -119979=>'L', -119980=>'L', -119982=>'L', -119983=>'L', -119984=>'L', -119985=>'L', -119986=>'L', -119987=>'L', -119988=>'L', -119989=>'L', -119990=>'L', -119991=>'L', -119992=>'L', -119993=>'L', -119995=>'L', -119997=>'L', -119998=>'L', -119999=>'L', -120000=>'L', -120001=>'L', -120002=>'L', -120003=>'L', -120005=>'L', -120006=>'L', -120007=>'L', -120008=>'L', -120009=>'L', -120010=>'L', -120011=>'L', -120012=>'L', -120013=>'L', -120014=>'L', -120015=>'L', -120016=>'L', -120017=>'L', -120018=>'L', -120019=>'L', -120020=>'L', -120021=>'L', -120022=>'L', -120023=>'L', -120024=>'L', -120025=>'L', -120026=>'L', -120027=>'L', -120028=>'L', -120029=>'L', -120030=>'L', -120031=>'L', -120032=>'L', -120033=>'L', -120034=>'L', -120035=>'L', -120036=>'L', -120037=>'L', -120038=>'L', -120039=>'L', -120040=>'L', -120041=>'L', -120042=>'L', -120043=>'L', -120044=>'L', -120045=>'L', -120046=>'L', -120047=>'L', -120048=>'L', -120049=>'L', -120050=>'L', -120051=>'L', -120052=>'L', -120053=>'L', -120054=>'L', -120055=>'L', -120056=>'L', -120057=>'L', -120058=>'L', -120059=>'L', -120060=>'L', -120061=>'L', -120062=>'L', -120063=>'L', -120064=>'L', -120065=>'L', -120066=>'L', -120067=>'L', -120068=>'L', -120069=>'L', -120071=>'L', -120072=>'L', -120073=>'L', -120074=>'L', -120077=>'L', -120078=>'L', -120079=>'L', -120080=>'L', -120081=>'L', -120082=>'L', -120083=>'L', -120084=>'L', -120086=>'L', -120087=>'L', -120088=>'L', -120089=>'L', -120090=>'L', -120091=>'L', -120092=>'L', -120094=>'L', -120095=>'L', -120096=>'L', -120097=>'L', -120098=>'L', -120099=>'L', -120100=>'L', -120101=>'L', -120102=>'L', -120103=>'L', -120104=>'L', -120105=>'L', -120106=>'L', -120107=>'L', -120108=>'L', -120109=>'L', -120110=>'L', -120111=>'L', -120112=>'L', -120113=>'L', -120114=>'L', -120115=>'L', -120116=>'L', -120117=>'L', -120118=>'L', -120119=>'L', -120120=>'L', -120121=>'L', -120123=>'L', -120124=>'L', -120125=>'L', -120126=>'L', -120128=>'L', -120129=>'L', -120130=>'L', -120131=>'L', -120132=>'L', -120134=>'L', -120138=>'L', -120139=>'L', -120140=>'L', -120141=>'L', -120142=>'L', -120143=>'L', -120144=>'L', -120146=>'L', -120147=>'L', -120148=>'L', -120149=>'L', -120150=>'L', -120151=>'L', -120152=>'L', -120153=>'L', -120154=>'L', -120155=>'L', -120156=>'L', -120157=>'L', -120158=>'L', -120159=>'L', -120160=>'L', -120161=>'L', -120162=>'L', -120163=>'L', -120164=>'L', -120165=>'L', -120166=>'L', -120167=>'L', -120168=>'L', -120169=>'L', -120170=>'L', -120171=>'L', -120172=>'L', -120173=>'L', -120174=>'L', -120175=>'L', -120176=>'L', -120177=>'L', -120178=>'L', -120179=>'L', -120180=>'L', -120181=>'L', -120182=>'L', -120183=>'L', -120184=>'L', -120185=>'L', -120186=>'L', -120187=>'L', -120188=>'L', -120189=>'L', -120190=>'L', -120191=>'L', -120192=>'L', -120193=>'L', -120194=>'L', -120195=>'L', -120196=>'L', -120197=>'L', -120198=>'L', -120199=>'L', -120200=>'L', -120201=>'L', -120202=>'L', -120203=>'L', -120204=>'L', -120205=>'L', -120206=>'L', -120207=>'L', -120208=>'L', -120209=>'L', -120210=>'L', -120211=>'L', -120212=>'L', -120213=>'L', -120214=>'L', -120215=>'L', -120216=>'L', -120217=>'L', -120218=>'L', -120219=>'L', -120220=>'L', -120221=>'L', -120222=>'L', -120223=>'L', -120224=>'L', -120225=>'L', -120226=>'L', -120227=>'L', -120228=>'L', -120229=>'L', -120230=>'L', -120231=>'L', -120232=>'L', -120233=>'L', -120234=>'L', -120235=>'L', -120236=>'L', -120237=>'L', -120238=>'L', -120239=>'L', -120240=>'L', -120241=>'L', -120242=>'L', -120243=>'L', -120244=>'L', -120245=>'L', -120246=>'L', -120247=>'L', -120248=>'L', -120249=>'L', -120250=>'L', -120251=>'L', -120252=>'L', -120253=>'L', -120254=>'L', -120255=>'L', -120256=>'L', -120257=>'L', -120258=>'L', -120259=>'L', -120260=>'L', -120261=>'L', -120262=>'L', -120263=>'L', -120264=>'L', -120265=>'L', -120266=>'L', -120267=>'L', -120268=>'L', -120269=>'L', -120270=>'L', -120271=>'L', -120272=>'L', -120273=>'L', -120274=>'L', -120275=>'L', -120276=>'L', -120277=>'L', -120278=>'L', -120279=>'L', -120280=>'L', -120281=>'L', -120282=>'L', -120283=>'L', -120284=>'L', -120285=>'L', -120286=>'L', -120287=>'L', -120288=>'L', -120289=>'L', -120290=>'L', -120291=>'L', -120292=>'L', -120293=>'L', -120294=>'L', -120295=>'L', -120296=>'L', -120297=>'L', -120298=>'L', -120299=>'L', -120300=>'L', -120301=>'L', -120302=>'L', -120303=>'L', -120304=>'L', -120305=>'L', -120306=>'L', -120307=>'L', -120308=>'L', -120309=>'L', -120310=>'L', -120311=>'L', -120312=>'L', -120313=>'L', -120314=>'L', -120315=>'L', -120316=>'L', -120317=>'L', -120318=>'L', -120319=>'L', -120320=>'L', -120321=>'L', -120322=>'L', -120323=>'L', -120324=>'L', -120325=>'L', -120326=>'L', -120327=>'L', -120328=>'L', -120329=>'L', -120330=>'L', -120331=>'L', -120332=>'L', -120333=>'L', -120334=>'L', -120335=>'L', -120336=>'L', -120337=>'L', -120338=>'L', -120339=>'L', -120340=>'L', -120341=>'L', -120342=>'L', -120343=>'L', -120344=>'L', -120345=>'L', -120346=>'L', -120347=>'L', -120348=>'L', -120349=>'L', -120350=>'L', -120351=>'L', -120352=>'L', -120353=>'L', -120354=>'L', -120355=>'L', -120356=>'L', -120357=>'L', -120358=>'L', -120359=>'L', -120360=>'L', -120361=>'L', -120362=>'L', -120363=>'L', -120364=>'L', -120365=>'L', -120366=>'L', -120367=>'L', -120368=>'L', -120369=>'L', -120370=>'L', -120371=>'L', -120372=>'L', -120373=>'L', -120374=>'L', -120375=>'L', -120376=>'L', -120377=>'L', -120378=>'L', -120379=>'L', -120380=>'L', -120381=>'L', -120382=>'L', -120383=>'L', -120384=>'L', -120385=>'L', -120386=>'L', -120387=>'L', -120388=>'L', -120389=>'L', -120390=>'L', -120391=>'L', -120392=>'L', -120393=>'L', -120394=>'L', -120395=>'L', -120396=>'L', -120397=>'L', -120398=>'L', -120399=>'L', -120400=>'L', -120401=>'L', -120402=>'L', -120403=>'L', -120404=>'L', -120405=>'L', -120406=>'L', -120407=>'L', -120408=>'L', -120409=>'L', -120410=>'L', -120411=>'L', -120412=>'L', -120413=>'L', -120414=>'L', -120415=>'L', -120416=>'L', -120417=>'L', -120418=>'L', -120419=>'L', -120420=>'L', -120421=>'L', -120422=>'L', -120423=>'L', -120424=>'L', -120425=>'L', -120426=>'L', -120427=>'L', -120428=>'L', -120429=>'L', -120430=>'L', -120431=>'L', -120432=>'L', -120433=>'L', -120434=>'L', -120435=>'L', -120436=>'L', -120437=>'L', -120438=>'L', -120439=>'L', -120440=>'L', -120441=>'L', -120442=>'L', -120443=>'L', -120444=>'L', -120445=>'L', -120446=>'L', -120447=>'L', -120448=>'L', -120449=>'L', -120450=>'L', -120451=>'L', -120452=>'L', -120453=>'L', -120454=>'L', -120455=>'L', -120456=>'L', -120457=>'L', -120458=>'L', -120459=>'L', -120460=>'L', -120461=>'L', -120462=>'L', -120463=>'L', -120464=>'L', -120465=>'L', -120466=>'L', -120467=>'L', -120468=>'L', -120469=>'L', -120470=>'L', -120471=>'L', -120472=>'L', -120473=>'L', -120474=>'L', -120475=>'L', -120476=>'L', -120477=>'L', -120478=>'L', -120479=>'L', -120480=>'L', -120481=>'L', -120482=>'L', -120483=>'L', -120484=>'L', -120485=>'L', -120488=>'L', -120489=>'L', -120490=>'L', -120491=>'L', -120492=>'L', -120493=>'L', -120494=>'L', -120495=>'L', -120496=>'L', -120497=>'L', -120498=>'L', -120499=>'L', -120500=>'L', -120501=>'L', -120502=>'L', -120503=>'L', -120504=>'L', -120505=>'L', -120506=>'L', -120507=>'L', -120508=>'L', -120509=>'L', -120510=>'L', -120511=>'L', -120512=>'L', -120513=>'L', -120514=>'L', -120515=>'L', -120516=>'L', -120517=>'L', -120518=>'L', -120519=>'L', -120520=>'L', -120521=>'L', -120522=>'L', -120523=>'L', -120524=>'L', -120525=>'L', -120526=>'L', -120527=>'L', -120528=>'L', -120529=>'L', -120530=>'L', -120531=>'L', -120532=>'L', -120533=>'L', -120534=>'L', -120535=>'L', -120536=>'L', -120537=>'L', -120538=>'L', -120539=>'L', -120540=>'L', -120541=>'L', -120542=>'L', -120543=>'L', -120544=>'L', -120545=>'L', -120546=>'L', -120547=>'L', -120548=>'L', -120549=>'L', -120550=>'L', -120551=>'L', -120552=>'L', -120553=>'L', -120554=>'L', -120555=>'L', -120556=>'L', -120557=>'L', -120558=>'L', -120559=>'L', -120560=>'L', -120561=>'L', -120562=>'L', -120563=>'L', -120564=>'L', -120565=>'L', -120566=>'L', -120567=>'L', -120568=>'L', -120569=>'L', -120570=>'L', -120571=>'L', -120572=>'L', -120573=>'L', -120574=>'L', -120575=>'L', -120576=>'L', -120577=>'L', -120578=>'L', -120579=>'L', -120580=>'L', -120581=>'L', -120582=>'L', -120583=>'L', -120584=>'L', -120585=>'L', -120586=>'L', -120587=>'L', -120588=>'L', -120589=>'L', -120590=>'L', -120591=>'L', -120592=>'L', -120593=>'L', -120594=>'L', -120595=>'L', -120596=>'L', -120597=>'L', -120598=>'L', -120599=>'L', -120600=>'L', -120601=>'L', -120602=>'L', -120603=>'L', -120604=>'L', -120605=>'L', -120606=>'L', -120607=>'L', -120608=>'L', -120609=>'L', -120610=>'L', -120611=>'L', -120612=>'L', -120613=>'L', -120614=>'L', -120615=>'L', -120616=>'L', -120617=>'L', -120618=>'L', -120619=>'L', -120620=>'L', -120621=>'L', -120622=>'L', -120623=>'L', -120624=>'L', -120625=>'L', -120626=>'L', -120627=>'L', -120628=>'L', -120629=>'L', -120630=>'L', -120631=>'L', -120632=>'L', -120633=>'L', -120634=>'L', -120635=>'L', -120636=>'L', -120637=>'L', -120638=>'L', -120639=>'L', -120640=>'L', -120641=>'L', -120642=>'L', -120643=>'L', -120644=>'L', -120645=>'L', -120646=>'L', -120647=>'L', -120648=>'L', -120649=>'L', -120650=>'L', -120651=>'L', -120652=>'L', -120653=>'L', -120654=>'L', -120655=>'L', -120656=>'L', -120657=>'L', -120658=>'L', -120659=>'L', -120660=>'L', -120661=>'L', -120662=>'L', -120663=>'L', -120664=>'L', -120665=>'L', -120666=>'L', -120667=>'L', -120668=>'L', -120669=>'L', -120670=>'L', -120671=>'L', -120672=>'L', -120673=>'L', -120674=>'L', -120675=>'L', -120676=>'L', -120677=>'L', -120678=>'L', -120679=>'L', -120680=>'L', -120681=>'L', -120682=>'L', -120683=>'L', -120684=>'L', -120685=>'L', -120686=>'L', -120687=>'L', -120688=>'L', -120689=>'L', -120690=>'L', -120691=>'L', -120692=>'L', -120693=>'L', -120694=>'L', -120695=>'L', -120696=>'L', -120697=>'L', -120698=>'L', -120699=>'L', -120700=>'L', -120701=>'L', -120702=>'L', -120703=>'L', -120704=>'L', -120705=>'L', -120706=>'L', -120707=>'L', -120708=>'L', -120709=>'L', -120710=>'L', -120711=>'L', -120712=>'L', -120713=>'L', -120714=>'L', -120715=>'L', -120716=>'L', -120717=>'L', -120718=>'L', -120719=>'L', -120720=>'L', -120721=>'L', -120722=>'L', -120723=>'L', -120724=>'L', -120725=>'L', -120726=>'L', -120727=>'L', -120728=>'L', -120729=>'L', -120730=>'L', -120731=>'L', -120732=>'L', -120733=>'L', -120734=>'L', -120735=>'L', -120736=>'L', -120737=>'L', -120738=>'L', -120739=>'L', -120740=>'L', -120741=>'L', -120742=>'L', -120743=>'L', -120744=>'L', -120745=>'L', -120746=>'L', -120747=>'L', -120748=>'L', -120749=>'L', -120750=>'L', -120751=>'L', -120752=>'L', -120753=>'L', -120754=>'L', -120755=>'L', -120756=>'L', -120757=>'L', -120758=>'L', -120759=>'L', -120760=>'L', -120761=>'L', -120762=>'L', -120763=>'L', -120764=>'L', -120765=>'L', -120766=>'L', -120767=>'L', -120768=>'L', -120769=>'L', -120770=>'L', -120771=>'L', -120772=>'L', -120773=>'L', -120774=>'L', -120775=>'L', -120776=>'L', -120777=>'L', -120778=>'L', -120779=>'L', -120782=>'EN', -120783=>'EN', -120784=>'EN', -120785=>'EN', -120786=>'EN', -120787=>'EN', -120788=>'EN', -120789=>'EN', -120790=>'EN', -120791=>'EN', -120792=>'EN', -120793=>'EN', -120794=>'EN', -120795=>'EN', -120796=>'EN', -120797=>'EN', -120798=>'EN', -120799=>'EN', -120800=>'EN', -120801=>'EN', -120802=>'EN', -120803=>'EN', -120804=>'EN', -120805=>'EN', -120806=>'EN', -120807=>'EN', -120808=>'EN', -120809=>'EN', -120810=>'EN', -120811=>'EN', -120812=>'EN', -120813=>'EN', -120814=>'EN', -120815=>'EN', -120816=>'EN', -120817=>'EN', -120818=>'EN', -120819=>'EN', -120820=>'EN', -120821=>'EN', -120822=>'EN', -120823=>'EN', -120824=>'EN', -120825=>'EN', -120826=>'EN', -120827=>'EN', -120828=>'EN', -120829=>'EN', -120830=>'EN', -120831=>'EN', -131072=>'L', -173782=>'L', -194560=>'L', -194561=>'L', -194562=>'L', -194563=>'L', -194564=>'L', -194565=>'L', -194566=>'L', -194567=>'L', -194568=>'L', -194569=>'L', -194570=>'L', -194571=>'L', -194572=>'L', -194573=>'L', -194574=>'L', -194575=>'L', -194576=>'L', -194577=>'L', -194578=>'L', -194579=>'L', -194580=>'L', -194581=>'L', -194582=>'L', -194583=>'L', -194584=>'L', -194585=>'L', -194586=>'L', -194587=>'L', -194588=>'L', -194589=>'L', -194590=>'L', -194591=>'L', -194592=>'L', -194593=>'L', -194594=>'L', -194595=>'L', -194596=>'L', -194597=>'L', -194598=>'L', -194599=>'L', -194600=>'L', -194601=>'L', -194602=>'L', -194603=>'L', -194604=>'L', -194605=>'L', -194606=>'L', -194607=>'L', -194608=>'L', -194609=>'L', -194610=>'L', -194611=>'L', -194612=>'L', -194613=>'L', -194614=>'L', -194615=>'L', -194616=>'L', -194617=>'L', -194618=>'L', -194619=>'L', -194620=>'L', -194621=>'L', -194622=>'L', -194623=>'L', -194624=>'L', -194625=>'L', -194626=>'L', -194627=>'L', -194628=>'L', -194629=>'L', -194630=>'L', -194631=>'L', -194632=>'L', -194633=>'L', -194634=>'L', -194635=>'L', -194636=>'L', -194637=>'L', -194638=>'L', -194639=>'L', -194640=>'L', -194641=>'L', -194642=>'L', -194643=>'L', -194644=>'L', -194645=>'L', -194646=>'L', -194647=>'L', -194648=>'L', -194649=>'L', -194650=>'L', -194651=>'L', -194652=>'L', -194653=>'L', -194654=>'L', -194655=>'L', -194656=>'L', -194657=>'L', -194658=>'L', -194659=>'L', -194660=>'L', -194661=>'L', -194662=>'L', -194663=>'L', -194664=>'L', -194665=>'L', -194666=>'L', -194667=>'L', -194668=>'L', -194669=>'L', -194670=>'L', -194671=>'L', -194672=>'L', -194673=>'L', -194674=>'L', -194675=>'L', -194676=>'L', -194677=>'L', -194678=>'L', -194679=>'L', -194680=>'L', -194681=>'L', -194682=>'L', -194683=>'L', -194684=>'L', -194685=>'L', -194686=>'L', -194687=>'L', -194688=>'L', -194689=>'L', -194690=>'L', -194691=>'L', -194692=>'L', -194693=>'L', -194694=>'L', -194695=>'L', -194696=>'L', -194697=>'L', -194698=>'L', -194699=>'L', -194700=>'L', -194701=>'L', -194702=>'L', -194703=>'L', -194704=>'L', -194705=>'L', -194706=>'L', -194707=>'L', -194708=>'L', -194709=>'L', -194710=>'L', -194711=>'L', -194712=>'L', -194713=>'L', -194714=>'L', -194715=>'L', -194716=>'L', -194717=>'L', -194718=>'L', -194719=>'L', -194720=>'L', -194721=>'L', -194722=>'L', -194723=>'L', -194724=>'L', -194725=>'L', -194726=>'L', -194727=>'L', -194728=>'L', -194729=>'L', -194730=>'L', -194731=>'L', -194732=>'L', -194733=>'L', -194734=>'L', -194735=>'L', -194736=>'L', -194737=>'L', -194738=>'L', -194739=>'L', -194740=>'L', -194741=>'L', -194742=>'L', -194743=>'L', -194744=>'L', -194745=>'L', -194746=>'L', -194747=>'L', -194748=>'L', -194749=>'L', -194750=>'L', -194751=>'L', -194752=>'L', -194753=>'L', -194754=>'L', -194755=>'L', -194756=>'L', -194757=>'L', -194758=>'L', -194759=>'L', -194760=>'L', -194761=>'L', -194762=>'L', -194763=>'L', -194764=>'L', -194765=>'L', -194766=>'L', -194767=>'L', -194768=>'L', -194769=>'L', -194770=>'L', -194771=>'L', -194772=>'L', -194773=>'L', -194774=>'L', -194775=>'L', -194776=>'L', -194777=>'L', -194778=>'L', -194779=>'L', -194780=>'L', -194781=>'L', -194782=>'L', -194783=>'L', -194784=>'L', -194785=>'L', -194786=>'L', -194787=>'L', -194788=>'L', -194789=>'L', -194790=>'L', -194791=>'L', -194792=>'L', -194793=>'L', -194794=>'L', -194795=>'L', -194796=>'L', -194797=>'L', -194798=>'L', -194799=>'L', -194800=>'L', -194801=>'L', -194802=>'L', -194803=>'L', -194804=>'L', -194805=>'L', -194806=>'L', -194807=>'L', -194808=>'L', -194809=>'L', -194810=>'L', -194811=>'L', -194812=>'L', -194813=>'L', -194814=>'L', -194815=>'L', -194816=>'L', -194817=>'L', -194818=>'L', -194819=>'L', -194820=>'L', -194821=>'L', -194822=>'L', -194823=>'L', -194824=>'L', -194825=>'L', -194826=>'L', -194827=>'L', -194828=>'L', -194829=>'L', -194830=>'L', -194831=>'L', -194832=>'L', -194833=>'L', -194834=>'L', -194835=>'L', -194836=>'L', -194837=>'L', -194838=>'L', -194839=>'L', -194840=>'L', -194841=>'L', -194842=>'L', -194843=>'L', -194844=>'L', -194845=>'L', -194846=>'L', -194847=>'L', -194848=>'L', -194849=>'L', -194850=>'L', -194851=>'L', -194852=>'L', -194853=>'L', -194854=>'L', -194855=>'L', -194856=>'L', -194857=>'L', -194858=>'L', -194859=>'L', -194860=>'L', -194861=>'L', -194862=>'L', -194863=>'L', -194864=>'L', -194865=>'L', -194866=>'L', -194867=>'L', -194868=>'L', -194869=>'L', -194870=>'L', -194871=>'L', -194872=>'L', -194873=>'L', -194874=>'L', -194875=>'L', -194876=>'L', -194877=>'L', -194878=>'L', -194879=>'L', -194880=>'L', -194881=>'L', -194882=>'L', -194883=>'L', -194884=>'L', -194885=>'L', -194886=>'L', -194887=>'L', -194888=>'L', -194889=>'L', -194890=>'L', -194891=>'L', -194892=>'L', -194893=>'L', -194894=>'L', -194895=>'L', -194896=>'L', -194897=>'L', -194898=>'L', -194899=>'L', -194900=>'L', -194901=>'L', -194902=>'L', -194903=>'L', -194904=>'L', -194905=>'L', -194906=>'L', -194907=>'L', -194908=>'L', -194909=>'L', -194910=>'L', -194911=>'L', -194912=>'L', -194913=>'L', -194914=>'L', -194915=>'L', -194916=>'L', -194917=>'L', -194918=>'L', -194919=>'L', -194920=>'L', -194921=>'L', -194922=>'L', -194923=>'L', -194924=>'L', -194925=>'L', -194926=>'L', -194927=>'L', -194928=>'L', -194929=>'L', -194930=>'L', -194931=>'L', -194932=>'L', -194933=>'L', -194934=>'L', -194935=>'L', -194936=>'L', -194937=>'L', -194938=>'L', -194939=>'L', -194940=>'L', -194941=>'L', -194942=>'L', -194943=>'L', -194944=>'L', -194945=>'L', -194946=>'L', -194947=>'L', -194948=>'L', -194949=>'L', -194950=>'L', -194951=>'L', -194952=>'L', -194953=>'L', -194954=>'L', -194955=>'L', -194956=>'L', -194957=>'L', -194958=>'L', -194959=>'L', -194960=>'L', -194961=>'L', -194962=>'L', -194963=>'L', -194964=>'L', -194965=>'L', -194966=>'L', -194967=>'L', -194968=>'L', -194969=>'L', -194970=>'L', -194971=>'L', -194972=>'L', -194973=>'L', -194974=>'L', -194975=>'L', -194976=>'L', -194977=>'L', -194978=>'L', -194979=>'L', -194980=>'L', -194981=>'L', -194982=>'L', -194983=>'L', -194984=>'L', -194985=>'L', -194986=>'L', -194987=>'L', -194988=>'L', -194989=>'L', -194990=>'L', -194991=>'L', -194992=>'L', -194993=>'L', -194994=>'L', -194995=>'L', -194996=>'L', -194997=>'L', -194998=>'L', -194999=>'L', -195000=>'L', -195001=>'L', -195002=>'L', -195003=>'L', -195004=>'L', -195005=>'L', -195006=>'L', -195007=>'L', -195008=>'L', -195009=>'L', -195010=>'L', -195011=>'L', -195012=>'L', -195013=>'L', -195014=>'L', -195015=>'L', -195016=>'L', -195017=>'L', -195018=>'L', -195019=>'L', -195020=>'L', -195021=>'L', -195022=>'L', -195023=>'L', -195024=>'L', -195025=>'L', -195026=>'L', -195027=>'L', -195028=>'L', -195029=>'L', -195030=>'L', -195031=>'L', -195032=>'L', -195033=>'L', -195034=>'L', -195035=>'L', -195036=>'L', -195037=>'L', -195038=>'L', -195039=>'L', -195040=>'L', -195041=>'L', -195042=>'L', -195043=>'L', -195044=>'L', -195045=>'L', -195046=>'L', -195047=>'L', -195048=>'L', -195049=>'L', -195050=>'L', -195051=>'L', -195052=>'L', -195053=>'L', -195054=>'L', -195055=>'L', -195056=>'L', -195057=>'L', -195058=>'L', -195059=>'L', -195060=>'L', -195061=>'L', -195062=>'L', -195063=>'L', -195064=>'L', -195065=>'L', -195066=>'L', -195067=>'L', -195068=>'L', -195069=>'L', -195070=>'L', -195071=>'L', -195072=>'L', -195073=>'L', -195074=>'L', -195075=>'L', -195076=>'L', -195077=>'L', -195078=>'L', -195079=>'L', -195080=>'L', -195081=>'L', -195082=>'L', -195083=>'L', -195084=>'L', -195085=>'L', -195086=>'L', -195087=>'L', -195088=>'L', -195089=>'L', -195090=>'L', -195091=>'L', -195092=>'L', -195093=>'L', -195094=>'L', -195095=>'L', -195096=>'L', -195097=>'L', -195098=>'L', -195099=>'L', -195100=>'L', -195101=>'L', -917505=>'BN', -917536=>'BN', -917537=>'BN', -917538=>'BN', -917539=>'BN', -917540=>'BN', -917541=>'BN', -917542=>'BN', -917543=>'BN', -917544=>'BN', -917545=>'BN', -917546=>'BN', -917547=>'BN', -917548=>'BN', -917549=>'BN', -917550=>'BN', -917551=>'BN', -917552=>'BN', -917553=>'BN', -917554=>'BN', -917555=>'BN', -917556=>'BN', -917557=>'BN', -917558=>'BN', -917559=>'BN', -917560=>'BN', -917561=>'BN', -917562=>'BN', -917563=>'BN', -917564=>'BN', -917565=>'BN', -917566=>'BN', -917567=>'BN', -917568=>'BN', -917569=>'BN', -917570=>'BN', -917571=>'BN', -917572=>'BN', -917573=>'BN', -917574=>'BN', -917575=>'BN', -917576=>'BN', -917577=>'BN', -917578=>'BN', -917579=>'BN', -917580=>'BN', -917581=>'BN', -917582=>'BN', -917583=>'BN', -917584=>'BN', -917585=>'BN', -917586=>'BN', -917587=>'BN', -917588=>'BN', -917589=>'BN', -917590=>'BN', -917591=>'BN', -917592=>'BN', -917593=>'BN', -917594=>'BN', -917595=>'BN', -917596=>'BN', -917597=>'BN', -917598=>'BN', -917599=>'BN', -917600=>'BN', -917601=>'BN', -917602=>'BN', -917603=>'BN', -917604=>'BN', -917605=>'BN', -917606=>'BN', -917607=>'BN', -917608=>'BN', -917609=>'BN', -917610=>'BN', -917611=>'BN', -917612=>'BN', -917613=>'BN', -917614=>'BN', -917615=>'BN', -917616=>'BN', -917617=>'BN', -917618=>'BN', -917619=>'BN', -917620=>'BN', -917621=>'BN', -917622=>'BN', -917623=>'BN', -917624=>'BN', -917625=>'BN', -917626=>'BN', -917627=>'BN', -917628=>'BN', -917629=>'BN', -917630=>'BN', -917631=>'BN', -917760=>'NSM', -917761=>'NSM', -917762=>'NSM', -917763=>'NSM', -917764=>'NSM', -917765=>'NSM', -917766=>'NSM', -917767=>'NSM', -917768=>'NSM', -917769=>'NSM', -917770=>'NSM', -917771=>'NSM', -917772=>'NSM', -917773=>'NSM', -917774=>'NSM', -917775=>'NSM', -917776=>'NSM', -917777=>'NSM', -917778=>'NSM', -917779=>'NSM', -917780=>'NSM', -917781=>'NSM', -917782=>'NSM', -917783=>'NSM', -917784=>'NSM', -917785=>'NSM', -917786=>'NSM', -917787=>'NSM', -917788=>'NSM', -917789=>'NSM', -917790=>'NSM', -917791=>'NSM', -917792=>'NSM', -917793=>'NSM', -917794=>'NSM', -917795=>'NSM', -917796=>'NSM', -917797=>'NSM', -917798=>'NSM', -917799=>'NSM', -917800=>'NSM', -917801=>'NSM', -917802=>'NSM', -917803=>'NSM', -917804=>'NSM', -917805=>'NSM', -917806=>'NSM', -917807=>'NSM', -917808=>'NSM', -917809=>'NSM', -917810=>'NSM', -917811=>'NSM', -917812=>'NSM', -917813=>'NSM', -917814=>'NSM', -917815=>'NSM', -917816=>'NSM', -917817=>'NSM', -917818=>'NSM', -917819=>'NSM', -917820=>'NSM', -917821=>'NSM', -917822=>'NSM', -917823=>'NSM', -917824=>'NSM', -917825=>'NSM', -917826=>'NSM', -917827=>'NSM', -917828=>'NSM', -917829=>'NSM', -917830=>'NSM', -917831=>'NSM', -917832=>'NSM', -917833=>'NSM', -917834=>'NSM', -917835=>'NSM', -917836=>'NSM', -917837=>'NSM', -917838=>'NSM', -917839=>'NSM', -917840=>'NSM', -917841=>'NSM', -917842=>'NSM', -917843=>'NSM', -917844=>'NSM', -917845=>'NSM', -917846=>'NSM', -917847=>'NSM', -917848=>'NSM', -917849=>'NSM', -917850=>'NSM', -917851=>'NSM', -917852=>'NSM', -917853=>'NSM', -917854=>'NSM', -917855=>'NSM', -917856=>'NSM', -917857=>'NSM', -917858=>'NSM', -917859=>'NSM', -917860=>'NSM', -917861=>'NSM', -917862=>'NSM', -917863=>'NSM', -917864=>'NSM', -917865=>'NSM', -917866=>'NSM', -917867=>'NSM', -917868=>'NSM', -917869=>'NSM', -917870=>'NSM', -917871=>'NSM', -917872=>'NSM', -917873=>'NSM', -917874=>'NSM', -917875=>'NSM', -917876=>'NSM', -917877=>'NSM', -917878=>'NSM', -917879=>'NSM', -917880=>'NSM', -917881=>'NSM', -917882=>'NSM', -917883=>'NSM', -917884=>'NSM', -917885=>'NSM', -917886=>'NSM', -917887=>'NSM', -917888=>'NSM', -917889=>'NSM', -917890=>'NSM', -917891=>'NSM', -917892=>'NSM', -917893=>'NSM', -917894=>'NSM', -917895=>'NSM', -917896=>'NSM', -917897=>'NSM', -917898=>'NSM', -917899=>'NSM', -917900=>'NSM', -917901=>'NSM', -917902=>'NSM', -917903=>'NSM', -917904=>'NSM', -917905=>'NSM', -917906=>'NSM', -917907=>'NSM', -917908=>'NSM', -917909=>'NSM', -917910=>'NSM', -917911=>'NSM', -917912=>'NSM', -917913=>'NSM', -917914=>'NSM', -917915=>'NSM', -917916=>'NSM', -917917=>'NSM', -917918=>'NSM', -917919=>'NSM', -917920=>'NSM', -917921=>'NSM', -917922=>'NSM', -917923=>'NSM', -917924=>'NSM', -917925=>'NSM', -917926=>'NSM', -917927=>'NSM', -917928=>'NSM', -917929=>'NSM', -917930=>'NSM', -917931=>'NSM', -917932=>'NSM', -917933=>'NSM', -917934=>'NSM', -917935=>'NSM', -917936=>'NSM', -917937=>'NSM', -917938=>'NSM', -917939=>'NSM', -917940=>'NSM', -917941=>'NSM', -917942=>'NSM', -917943=>'NSM', -917944=>'NSM', -917945=>'NSM', -917946=>'NSM', -917947=>'NSM', -917948=>'NSM', -917949=>'NSM', -917950=>'NSM', -917951=>'NSM', -917952=>'NSM', -917953=>'NSM', -917954=>'NSM', -917955=>'NSM', -917956=>'NSM', -917957=>'NSM', -917958=>'NSM', -917959=>'NSM', -917960=>'NSM', -917961=>'NSM', -917962=>'NSM', -917963=>'NSM', -917964=>'NSM', -917965=>'NSM', -917966=>'NSM', -917967=>'NSM', -917968=>'NSM', -917969=>'NSM', -917970=>'NSM', -917971=>'NSM', -917972=>'NSM', -917973=>'NSM', -917974=>'NSM', -917975=>'NSM', -917976=>'NSM', -917977=>'NSM', -917978=>'NSM', -917979=>'NSM', -917980=>'NSM', -917981=>'NSM', -917982=>'NSM', -917983=>'NSM', -917984=>'NSM', -917985=>'NSM', -917986=>'NSM', -917987=>'NSM', -917988=>'NSM', -917989=>'NSM', -917990=>'NSM', -917991=>'NSM', -917992=>'NSM', -917993=>'NSM', -917994=>'NSM', -917995=>'NSM', -917996=>'NSM', -917997=>'NSM', -917998=>'NSM', -917999=>'NSM', -983040=>'L', -1048573=>'L', -1048576=>'L', -1114109=>'L' -); - -/** - * Mirror unicode characters. For information on bidi mirroring, see UAX #9: Bidirectional Algorithm, at http://www.unicode.org/unicode/reports/tr9/ - * @public - */ -public static $uni_mirror = array ( -0x0028=>0x0029, -0x0029=>0x0028, -0x003C=>0x003E, -0x003E=>0x003C, -0x005B=>0x005D, -0x005D=>0x005B, -0x007B=>0x007D, -0x007D=>0x007B, -0x00AB=>0x00BB, -0x00BB=>0x00AB, -0x0F3A=>0x0F3B, -0x0F3B=>0x0F3A, -0x0F3C=>0x0F3D, -0x0F3D=>0x0F3C, -0x169B=>0x169C, -0x169C=>0x169B, -0x2018=>0x2019, -0x2019=>0x2018, -0x201C=>0x201D, -0x201D=>0x201C, -0x2039=>0x203A, -0x203A=>0x2039, -0x2045=>0x2046, -0x2046=>0x2045, -0x207D=>0x207E, -0x207E=>0x207D, -0x208D=>0x208E, -0x208E=>0x208D, -0x2208=>0x220B, -0x2209=>0x220C, -0x220A=>0x220D, -0x220B=>0x2208, -0x220C=>0x2209, -0x220D=>0x220A, -0x2215=>0x29F5, -0x223C=>0x223D, -0x223D=>0x223C, -0x2243=>0x22CD, -0x2252=>0x2253, -0x2253=>0x2252, -0x2254=>0x2255, -0x2255=>0x2254, -0x2264=>0x2265, -0x2265=>0x2264, -0x2266=>0x2267, -0x2267=>0x2266, -0x2268=>0x2269, -0x2269=>0x2268, -0x226A=>0x226B, -0x226B=>0x226A, -0x226E=>0x226F, -0x226F=>0x226E, -0x2270=>0x2271, -0x2271=>0x2270, -0x2272=>0x2273, -0x2273=>0x2272, -0x2274=>0x2275, -0x2275=>0x2274, -0x2276=>0x2277, -0x2277=>0x2276, -0x2278=>0x2279, -0x2279=>0x2278, -0x227A=>0x227B, -0x227B=>0x227A, -0x227C=>0x227D, -0x227D=>0x227C, -0x227E=>0x227F, -0x227F=>0x227E, -0x2280=>0x2281, -0x2281=>0x2280, -0x2282=>0x2283, -0x2283=>0x2282, -0x2284=>0x2285, -0x2285=>0x2284, -0x2286=>0x2287, -0x2287=>0x2286, -0x2288=>0x2289, -0x2289=>0x2288, -0x228A=>0x228B, -0x228B=>0x228A, -0x228F=>0x2290, -0x2290=>0x228F, -0x2291=>0x2292, -0x2292=>0x2291, -0x2298=>0x29B8, -0x22A2=>0x22A3, -0x22A3=>0x22A2, -0x22A6=>0x2ADE, -0x22A8=>0x2AE4, -0x22A9=>0x2AE3, -0x22AB=>0x2AE5, -0x22B0=>0x22B1, -0x22B1=>0x22B0, -0x22B2=>0x22B3, -0x22B3=>0x22B2, -0x22B4=>0x22B5, -0x22B5=>0x22B4, -0x22B6=>0x22B7, -0x22B7=>0x22B6, -0x22C9=>0x22CA, -0x22CA=>0x22C9, -0x22CB=>0x22CC, -0x22CC=>0x22CB, -0x22CD=>0x2243, -0x22D0=>0x22D1, -0x22D1=>0x22D0, -0x22D6=>0x22D7, -0x22D7=>0x22D6, -0x22D8=>0x22D9, -0x22D9=>0x22D8, -0x22DA=>0x22DB, -0x22DB=>0x22DA, -0x22DC=>0x22DD, -0x22DD=>0x22DC, -0x22DE=>0x22DF, -0x22DF=>0x22DE, -0x22E0=>0x22E1, -0x22E1=>0x22E0, -0x22E2=>0x22E3, -0x22E3=>0x22E2, -0x22E4=>0x22E5, -0x22E5=>0x22E4, -0x22E6=>0x22E7, -0x22E7=>0x22E6, -0x22E8=>0x22E9, -0x22E9=>0x22E8, -0x22EA=>0x22EB, -0x22EB=>0x22EA, -0x22EC=>0x22ED, -0x22ED=>0x22EC, -0x22F0=>0x22F1, -0x22F1=>0x22F0, -0x22F2=>0x22FA, -0x22F3=>0x22FB, -0x22F4=>0x22FC, -0x22F6=>0x22FD, -0x22F7=>0x22FE, -0x22FA=>0x22F2, -0x22FB=>0x22F3, -0x22FC=>0x22F4, -0x22FD=>0x22F6, -0x22FE=>0x22F7, -0x2308=>0x2309, -0x2309=>0x2308, -0x230A=>0x230B, -0x230B=>0x230A, -0x2329=>0x232A, -0x232A=>0x2329, -0x2768=>0x2769, -0x2769=>0x2768, -0x276A=>0x276B, -0x276B=>0x276A, -0x276C=>0x276D, -0x276D=>0x276C, -0x276E=>0x276F, -0x276F=>0x276E, -0x2770=>0x2771, -0x2771=>0x2770, -0x2772=>0x2773, -0x2773=>0x2772, -0x2774=>0x2775, -0x2775=>0x2774, -0x27C3=>0x27C4, -0x27C4=>0x27C3, -0x27C5=>0x27C6, -0x27C6=>0x27C5, -0x27D5=>0x27D6, -0x27D6=>0x27D5, -0x27DD=>0x27DE, -0x27DE=>0x27DD, -0x27E2=>0x27E3, -0x27E3=>0x27E2, -0x27E4=>0x27E5, -0x27E5=>0x27E4, -0x27E6=>0x27E7, -0x27E7=>0x27E6, -0x27E8=>0x27E9, -0x27E9=>0x27E8, -0x27EA=>0x27EB, -0x27EB=>0x27EA, -0x2983=>0x2984, -0x2984=>0x2983, -0x2985=>0x2986, -0x2986=>0x2985, -0x2987=>0x2988, -0x2988=>0x2987, -0x2989=>0x298A, -0x298A=>0x2989, -0x298B=>0x298C, -0x298C=>0x298B, -0x298D=>0x2990, -0x298E=>0x298F, -0x298F=>0x298E, -0x2990=>0x298D, -0x2991=>0x2992, -0x2992=>0x2991, -0x2993=>0x2994, -0x2994=>0x2993, -0x2995=>0x2996, -0x2996=>0x2995, -0x2997=>0x2998, -0x2998=>0x2997, -0x29B8=>0x2298, -0x29C0=>0x29C1, -0x29C1=>0x29C0, -0x29C4=>0x29C5, -0x29C5=>0x29C4, -0x29CF=>0x29D0, -0x29D0=>0x29CF, -0x29D1=>0x29D2, -0x29D2=>0x29D1, -0x29D4=>0x29D5, -0x29D5=>0x29D4, -0x29D8=>0x29D9, -0x29D9=>0x29D8, -0x29DA=>0x29DB, -0x29DB=>0x29DA, -0x29F5=>0x2215, -0x29F8=>0x29F9, -0x29F9=>0x29F8, -0x29FC=>0x29FD, -0x29FD=>0x29FC, -0x2A2B=>0x2A2C, -0x2A2C=>0x2A2B, -0x2A2D=>0x2A2E, -0x2A2E=>0x2A2D, -0x2A34=>0x2A35, -0x2A35=>0x2A34, -0x2A3C=>0x2A3D, -0x2A3D=>0x2A3C, -0x2A64=>0x2A65, -0x2A65=>0x2A64, -0x2A79=>0x2A7A, -0x2A7A=>0x2A79, -0x2A7D=>0x2A7E, -0x2A7E=>0x2A7D, -0x2A7F=>0x2A80, -0x2A80=>0x2A7F, -0x2A81=>0x2A82, -0x2A82=>0x2A81, -0x2A83=>0x2A84, -0x2A84=>0x2A83, -0x2A8B=>0x2A8C, -0x2A8C=>0x2A8B, -0x2A91=>0x2A92, -0x2A92=>0x2A91, -0x2A93=>0x2A94, -0x2A94=>0x2A93, -0x2A95=>0x2A96, -0x2A96=>0x2A95, -0x2A97=>0x2A98, -0x2A98=>0x2A97, -0x2A99=>0x2A9A, -0x2A9A=>0x2A99, -0x2A9B=>0x2A9C, -0x2A9C=>0x2A9B, -0x2AA1=>0x2AA2, -0x2AA2=>0x2AA1, -0x2AA6=>0x2AA7, -0x2AA7=>0x2AA6, -0x2AA8=>0x2AA9, -0x2AA9=>0x2AA8, -0x2AAA=>0x2AAB, -0x2AAB=>0x2AAA, -0x2AAC=>0x2AAD, -0x2AAD=>0x2AAC, -0x2AAF=>0x2AB0, -0x2AB0=>0x2AAF, -0x2AB3=>0x2AB4, -0x2AB4=>0x2AB3, -0x2ABB=>0x2ABC, -0x2ABC=>0x2ABB, -0x2ABD=>0x2ABE, -0x2ABE=>0x2ABD, -0x2ABF=>0x2AC0, -0x2AC0=>0x2ABF, -0x2AC1=>0x2AC2, -0x2AC2=>0x2AC1, -0x2AC3=>0x2AC4, -0x2AC4=>0x2AC3, -0x2AC5=>0x2AC6, -0x2AC6=>0x2AC5, -0x2ACD=>0x2ACE, -0x2ACE=>0x2ACD, -0x2ACF=>0x2AD0, -0x2AD0=>0x2ACF, -0x2AD1=>0x2AD2, -0x2AD2=>0x2AD1, -0x2AD3=>0x2AD4, -0x2AD4=>0x2AD3, -0x2AD5=>0x2AD6, -0x2AD6=>0x2AD5, -0x2ADE=>0x22A6, -0x2AE3=>0x22A9, -0x2AE4=>0x22A8, -0x2AE5=>0x22AB, -0x2AEC=>0x2AED, -0x2AED=>0x2AEC, -0x2AF7=>0x2AF8, -0x2AF8=>0x2AF7, -0x2AF9=>0x2AFA, -0x2AFA=>0x2AF9, -0x2E02=>0x2E03, -0x2E03=>0x2E02, -0x2E04=>0x2E05, -0x2E05=>0x2E04, -0x2E09=>0x2E0A, -0x2E0A=>0x2E09, -0x2E0C=>0x2E0D, -0x2E0D=>0x2E0C, -0x2E1C=>0x2E1D, -0x2E1D=>0x2E1C, -0x3008=>0x3009, -0x3009=>0x3008, -0x300A=>0x300B, -0x300B=>0x300A, -0x300C=>0x300D, -0x300D=>0x300C, -0x300E=>0x300F, -0x300F=>0x300E, -0x3010=>0x3011, -0x3011=>0x3010, -0x3014=>0x3015, -0x3015=>0x3014, -0x3016=>0x3017, -0x3017=>0x3016, -0x3018=>0x3019, -0x3019=>0x3018, -0x301A=>0x301B, -0x301B=>0x301A, -0x301D=>0x301E, -0x301E=>0x301D, -0xFE59=>0xFE5A, -0xFE5A=>0xFE59, -0xFE5B=>0xFE5C, -0xFE5C=>0xFE5B, -0xFE5D=>0xFE5E, -0xFE5E=>0xFE5D, -0xFE64=>0xFE65, -0xFE65=>0xFE64, -0xFF08=>0xFF09, -0xFF09=>0xFF08, -0xFF1C=>0xFF1E, -0xFF1E=>0xFF1C, -0xFF3B=>0xFF3D, -0xFF3D=>0xFF3B, -0xFF5B=>0xFF5D, -0xFF5D=>0xFF5B, -0xFF5F=>0xFF60, -0xFF60=>0xFF5F, -0xFF62=>0xFF63, -0xFF63=>0xFF62); - -/** - * Arabic shape substitutions: char code => (isolated, final, initial, medial). - * @public - */ -public static $uni_arabicsubst = array( -1569=>array(65152), -1570=>array(65153, 65154, 65153, 65154), -1571=>array(65155, 65156, 65155, 65156), -1572=>array(65157, 65158), -1573=>array(65159, 65160, 65159, 65160), -1574=>array(65161, 65162, 65163, 65164), -1575=>array(65165, 65166, 65165, 65166), -1576=>array(65167, 65168, 65169, 65170), -1577=>array(65171, 65172), -1578=>array(65173, 65174, 65175, 65176), -1579=>array(65177, 65178, 65179, 65180), -1580=>array(65181, 65182, 65183, 65184), -1581=>array(65185, 65186, 65187, 65188), -1582=>array(65189, 65190, 65191, 65192), -1583=>array(65193, 65194, 65193, 65194), -1584=>array(65195, 65196, 65195, 65196), -1585=>array(65197, 65198, 65197, 65198), -1586=>array(65199, 65200, 65199, 65200), -1587=>array(65201, 65202, 65203, 65204), -1588=>array(65205, 65206, 65207, 65208), -1589=>array(65209, 65210, 65211, 65212), -1590=>array(65213, 65214, 65215, 65216), -1591=>array(65217, 65218, 65219, 65220), -1592=>array(65221, 65222, 65223, 65224), -1593=>array(65225, 65226, 65227, 65228), -1594=>array(65229, 65230, 65231, 65232), -1601=>array(65233, 65234, 65235, 65236), -1602=>array(65237, 65238, 65239, 65240), -1603=>array(65241, 65242, 65243, 65244), -1604=>array(65245, 65246, 65247, 65248), -1605=>array(65249, 65250, 65251, 65252), -1606=>array(65253, 65254, 65255, 65256), -1607=>array(65257, 65258, 65259, 65260), -1608=>array(65261, 65262, 65261, 65262), -1609=>array(65263, 65264, 64488, 64489), -1610=>array(65265, 65266, 65267, 65268), -1649=>array(64336, 64337), -1655=>array(64477), -1657=>array(64358, 64359, 64360, 64361), -1658=>array(64350, 64351, 64352, 64353), -1659=>array(64338, 64339, 64340, 64341), -1662=>array(64342, 64343, 64344, 64345), -1663=>array(64354, 64355, 64356, 64357), -1664=>array(64346, 64347, 64348, 64349), -1667=>array(64374, 64375, 64376, 64377), -1668=>array(64370, 64371, 64372, 64373), -1670=>array(64378, 64379, 64380, 64381), -1671=>array(64382, 64383, 64384, 64385), -1672=>array(64392, 64393), -1676=>array(64388, 64389), -1677=>array(64386, 64387), -1678=>array(64390, 64391), -1681=>array(64396, 64397), -1688=>array(64394, 64395, 64394, 64395), -1700=>array(64362, 64363, 64364, 64365), -1702=>array(64366, 64367, 64368, 64369), -1705=>array(64398, 64399, 64400, 64401), -1709=>array(64467, 64468, 64469, 64470), -1711=>array(64402, 64403, 64404, 64405), -1713=>array(64410, 64411, 64412, 64413), -1715=>array(64406, 64407, 64408, 64409), -1722=>array(64414, 64415), -1723=>array(64416, 64417, 64418, 64419), -1726=>array(64426, 64427, 64428, 64429), -1728=>array(64420, 64421), -1729=>array(64422, 64423, 64424, 64425), -1733=>array(64480, 64481), -1734=>array(64473, 64474), -1735=>array(64471, 64472), -1736=>array(64475, 64476), -1737=>array(64482, 64483), -1739=>array(64478, 64479), -1740=>array(64508, 64509, 64510, 64511), -1744=>array(64484, 64485, 64486, 64487), -1746=>array(64430, 64431), -1747=>array(64432, 64433) -); - -/** - * Arabic laa letter: (char code => isolated, final, initial, medial). - * @public - */ -public static $uni_laa_array = array ( -1570 =>array(65269, 65270, 65269, 65270), -1571 =>array(65271, 65272, 65271, 65272), -1573 =>array(65273, 65274, 65273, 65274), -1575 =>array(65275, 65276, 65275, 65276) -); - -/** - * Array of character substitutions for sequences of two diacritics symbols. - * Putting the combining mark and character in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner. - * second NSM char code => substitution char - * @public - */ -public static $uni_diacritics = array ( -1612=>64606, # Shadda + Dammatan -1613=>64607, # Shadda + Kasratan -1614=>64608, # Shadda + Fatha -1615=>64609, # Shadda + Damma -1616=>64610 # Shadda + Kasra -); - -/** - * Array of character substitutions from UTF-8 Unicode to Latin1. - * @public - */ -public static $uni_utf8tolatin = array ( -8364=>128, # Euro1 -338=>140, # OE -352=>138, # Scaron -376=>159, # Ydieresis -381=>142, # Zcaron2 -8226=>149, # bullet3 -710=>136, # circumflex -8224=>134, # dagger -8225=>135, # daggerdbl -8230=>133, # ellipsis -8212=>151, # emdash -8211=>150, # endash -402=>131, # florin -8249=>139, # guilsinglleft -8250=>155, # guilsinglright -339=>156, # oe -8240=>137, # perthousand -8222=>132, # quotedblbase -8220=>147, # quotedblleft -8221=>148, # quotedblright -8216=>145, # quoteleft -8217=>146, # quoteright -8218=>130, # quotesinglbase -353=>154, # scaron -732=>152, # tilde -8482=>153, # trademark -382=>158 # zcaron2 -); - -/** - * Array of Encoding Maps. - * @public static - */ -public static $encmap = array( - -// encoding map for: cp874 -'cp874' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'ellipsis',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'kokaithai',162=>'khokhaithai',163=>'khokhuatthai',164=>'khokhwaithai',165=>'khokhonthai',166=>'khorakhangthai',167=>'ngonguthai',168=>'chochanthai',169=>'chochingthai',170=>'chochangthai',171=>'sosothai',172=>'chochoethai',173=>'yoyingthai',174=>'dochadathai',175=>'topatakthai',176=>'thothanthai',177=>'thonangmonthothai',178=>'thophuthaothai',179=>'nonenthai',180=>'dodekthai',181=>'totaothai',182=>'thothungthai',183=>'thothahanthai',184=>'thothongthai',185=>'nonuthai',186=>'bobaimaithai',187=>'poplathai',188=>'phophungthai',189=>'fofathai',190=>'phophanthai',191=>'fofanthai',192=>'phosamphaothai',193=>'momathai',194=>'yoyakthai',195=>'roruathai',196=>'ruthai',197=>'lolingthai',198=>'luthai',199=>'wowaenthai',200=>'sosalathai',201=>'sorusithai',202=>'sosuathai',203=>'hohipthai',204=>'lochulathai',205=>'oangthai',206=>'honokhukthai',207=>'paiyannoithai',208=>'saraathai',209=>'maihanakatthai',210=>'saraaathai',211=>'saraamthai',212=>'saraithai',213=>'saraiithai',214=>'sarauethai',215=>'saraueethai',216=>'sarauthai',217=>'sarauuthai',218=>'phinthuthai',219=>'.notdef',220=>'.notdef',221=>'.notdef',222=>'.notdef',223=>'bahtthai',224=>'saraethai',225=>'saraaethai',226=>'saraothai',227=>'saraaimaimuanthai',228=>'saraaimaimalaithai',229=>'lakkhangyaothai',230=>'maiyamokthai',231=>'maitaikhuthai',232=>'maiekthai',233=>'maithothai',234=>'maitrithai',235=>'maichattawathai',236=>'thanthakhatthai',237=>'nikhahitthai',238=>'yamakkanthai',239=>'fongmanthai',240=>'zerothai',241=>'onethai',242=>'twothai',243=>'threethai',244=>'fourthai',245=>'fivethai',246=>'sixthai',247=>'seventhai',248=>'eightthai',249=>'ninethai',250=>'angkhankhuthai',251=>'khomutthai',252=>'.notdef',253=>'.notdef',254=>'.notdef',255=>'.notdef'), - -// encoding map for: cp1250 -'cp1250' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'.notdef',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'.notdef',137=>'perthousand',138=>'Scaron',139=>'guilsinglleft',140=>'Sacute',141=>'Tcaron',142=>'Zcaron',143=>'Zacute',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'.notdef',153=>'trademark',154=>'scaron',155=>'guilsinglright',156=>'sacute',157=>'tcaron',158=>'zcaron',159=>'zacute',160=>'space',161=>'caron',162=>'breve',163=>'Lslash',164=>'currency',165=>'Aogonek',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'Scedilla',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'Zdotaccent',176=>'degree',177=>'plusminus',178=>'ogonek',179=>'lslash',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'cedilla',185=>'aogonek',186=>'scedilla',187=>'guillemotright',188=>'Lcaron',189=>'hungarumlaut',190=>'lcaron',191=>'zdotaccent',192=>'Racute',193=>'Aacute',194=>'Acircumflex',195=>'Abreve',196=>'Adieresis',197=>'Lacute',198=>'Cacute',199=>'Ccedilla',200=>'Ccaron',201=>'Eacute',202=>'Eogonek',203=>'Edieresis',204=>'Ecaron',205=>'Iacute',206=>'Icircumflex',207=>'Dcaron',208=>'Dcroat',209=>'Nacute',210=>'Ncaron',211=>'Oacute',212=>'Ocircumflex',213=>'Ohungarumlaut',214=>'Odieresis',215=>'multiply',216=>'Rcaron',217=>'Uring',218=>'Uacute',219=>'Uhungarumlaut',220=>'Udieresis',221=>'Yacute',222=>'Tcommaaccent',223=>'germandbls',224=>'racute',225=>'aacute',226=>'acircumflex',227=>'abreve',228=>'adieresis',229=>'lacute',230=>'cacute',231=>'ccedilla',232=>'ccaron',233=>'eacute',234=>'eogonek',235=>'edieresis',236=>'ecaron',237=>'iacute',238=>'icircumflex',239=>'dcaron',240=>'dcroat',241=>'nacute',242=>'ncaron',243=>'oacute',244=>'ocircumflex',245=>'ohungarumlaut',246=>'odieresis',247=>'divide',248=>'rcaron',249=>'uring',250=>'uacute',251=>'uhungarumlaut',252=>'udieresis',253=>'yacute',254=>'tcommaaccent',255=>'dotaccent'), - -// encoding map for: cp1251 -'cp1251' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'afii10051',129=>'afii10052',130=>'quotesinglbase',131=>'afii10100',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'Euro',137=>'perthousand',138=>'afii10058',139=>'guilsinglleft',140=>'afii10059',141=>'afii10061',142=>'afii10060',143=>'afii10145',144=>'afii10099',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'.notdef',153=>'trademark',154=>'afii10106',155=>'guilsinglright',156=>'afii10107',157=>'afii10109',158=>'afii10108',159=>'afii10193',160=>'space',161=>'afii10062',162=>'afii10110',163=>'afii10057',164=>'currency',165=>'afii10050',166=>'brokenbar',167=>'section',168=>'afii10023',169=>'copyright',170=>'afii10053',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'afii10056',176=>'degree',177=>'plusminus',178=>'afii10055',179=>'afii10103',180=>'afii10098',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'afii10071',185=>'afii61352',186=>'afii10101',187=>'guillemotright',188=>'afii10105',189=>'afii10054',190=>'afii10102',191=>'afii10104',192=>'afii10017',193=>'afii10018',194=>'afii10019',195=>'afii10020',196=>'afii10021',197=>'afii10022',198=>'afii10024',199=>'afii10025',200=>'afii10026',201=>'afii10027',202=>'afii10028',203=>'afii10029',204=>'afii10030',205=>'afii10031',206=>'afii10032',207=>'afii10033',208=>'afii10034',209=>'afii10035',210=>'afii10036',211=>'afii10037',212=>'afii10038',213=>'afii10039',214=>'afii10040',215=>'afii10041',216=>'afii10042',217=>'afii10043',218=>'afii10044',219=>'afii10045',220=>'afii10046',221=>'afii10047',222=>'afii10048',223=>'afii10049',224=>'afii10065',225=>'afii10066',226=>'afii10067',227=>'afii10068',228=>'afii10069',229=>'afii10070',230=>'afii10072',231=>'afii10073',232=>'afii10074',233=>'afii10075',234=>'afii10076',235=>'afii10077',236=>'afii10078',237=>'afii10079',238=>'afii10080',239=>'afii10081',240=>'afii10082',241=>'afii10083',242=>'afii10084',243=>'afii10085',244=>'afii10086',245=>'afii10087',246=>'afii10088',247=>'afii10089',248=>'afii10090',249=>'afii10091',250=>'afii10092',251=>'afii10093',252=>'afii10094',253=>'afii10095',254=>'afii10096',255=>'afii10097'), - -// encoding map for: cp1252 -'cp1252' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'circumflex',137=>'perthousand',138=>'Scaron',139=>'guilsinglleft',140=>'OE',141=>'.notdef',142=>'Zcaron',143=>'.notdef',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'tilde',153=>'trademark',154=>'scaron',155=>'guilsinglright',156=>'oe',157=>'.notdef',158=>'zcaron',159=>'Ydieresis',160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'cedilla',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',208=>'Eth',209=>'Ntilde',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Yacute',222=>'Thorn',223=>'germandbls',224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',240=>'eth',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'yacute',254=>'thorn',255=>'ydieresis'), - -// encoding map for: cp1253 -'cp1253' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'.notdef',137=>'perthousand',138=>'.notdef',139=>'guilsinglleft',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'.notdef',153=>'trademark',154=>'.notdef',155=>'guilsinglright',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'dieresistonos',162=>'Alphatonos',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'.notdef',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'afii00208',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'tonos',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'Epsilontonos',185=>'Etatonos',186=>'Iotatonos',187=>'guillemotright',188=>'Omicrontonos',189=>'onehalf',190=>'Upsilontonos',191=>'Omegatonos',192=>'iotadieresistonos',193=>'Alpha',194=>'Beta',195=>'Gamma',196=>'Delta',197=>'Epsilon',198=>'Zeta',199=>'Eta',200=>'Theta',201=>'Iota',202=>'Kappa',203=>'Lambda',204=>'Mu',205=>'Nu',206=>'Xi',207=>'Omicron',208=>'Pi',209=>'Rho',210=>'.notdef',211=>'Sigma',212=>'Tau',213=>'Upsilon',214=>'Phi',215=>'Chi',216=>'Psi',217=>'Omega',218=>'Iotadieresis',219=>'Upsilondieresis',220=>'alphatonos',221=>'epsilontonos',222=>'etatonos',223=>'iotatonos',224=>'upsilondieresistonos',225=>'alpha',226=>'beta',227=>'gamma',228=>'delta',229=>'epsilon',230=>'zeta',231=>'eta',232=>'theta',233=>'iota',234=>'kappa',235=>'lambda',236=>'mu',237=>'nu',238=>'xi',239=>'omicron',240=>'pi',241=>'rho',242=>'sigma1',243=>'sigma',244=>'tau',245=>'upsilon',246=>'phi',247=>'chi',248=>'psi',249=>'omega',250=>'iotadieresis',251=>'upsilondieresis',252=>'omicrontonos',253=>'upsilontonos',254=>'omegatonos',255=>'.notdef'), - -// encoding map for: cp1254 -'cp1254' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'circumflex',137=>'perthousand',138=>'Scaron',139=>'guilsinglleft',140=>'OE',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'tilde',153=>'trademark',154=>'scaron',155=>'guilsinglright',156=>'oe',157=>'.notdef',158=>'.notdef',159=>'Ydieresis',160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'cedilla',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',208=>'Gbreve',209=>'Ntilde',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Idotaccent',222=>'Scedilla',223=>'germandbls',224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',240=>'gbreve',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'dotlessi',254=>'scedilla',255=>'ydieresis'), - -// encoding map for: cp1255 -'cp1255' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'circumflex',137=>'perthousand',138=>'.notdef',139=>'guilsinglleft',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'tilde',153=>'trademark',154=>'.notdef',155=>'guilsinglright',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'afii57636',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'multiply',171=>'guillemotleft',172=>'logicalnot',173=>'sfthyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'middot',184=>'cedilla',185=>'onesuperior',186=>'divide',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',192=>'afii57799',193=>'afii57801',194=>'afii57800',195=>'afii57802',196=>'afii57793',197=>'afii57794',198=>'afii57795',199=>'afii57798',200=>'afii57797',201=>'afii57806',202=>'.notdef',203=>'afii57796',204=>'afii57807',205=>'afii57839',206=>'afii57645',207=>'afii57841',208=>'afii57842',209=>'afii57804',210=>'afii57803',211=>'afii57658',212=>'afii57716',213=>'afii57717',214=>'afii57718',215=>'gereshhebrew',216=>'gershayimhebrew',217=>'.notdef',218=>'.notdef',219=>'.notdef',220=>'.notdef',221=>'.notdef',222=>'.notdef',223=>'.notdef',224=>'afii57664',225=>'afii57665',226=>'afii57666',227=>'afii57667',228=>'afii57668',229=>'afii57669',230=>'afii57670',231=>'afii57671',232=>'afii57672',233=>'afii57673',234=>'afii57674',235=>'afii57675',236=>'afii57676',237=>'afii57677',238=>'afii57678',239=>'afii57679',240=>'afii57680',241=>'afii57681',242=>'afii57682',243=>'afii57683',244=>'afii57684',245=>'afii57685',246=>'afii57686',247=>'afii57687',248=>'afii57688',249=>'afii57689',250=>'afii57690',251=>'.notdef',252=>'.notdef',253=>'afii299',254=>'afii300',255=>'.notdef'), - -// encoding map for: cp1256 -'cp1256' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'afii57506',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'circumflex',137=>'perthousand',138=>'afii57511',139=>'guilsinglleft',140=>'OE',141=>'afii57507',142=>'afii57508',143=>'afii57512',144=>'afii57509',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'.notdef',153=>'trademark',154=>'afii57513',155=>'guilsinglright',156=>'oe',157=>'afii61664',158=>'afii301',159=>'afii57514',160=>'space',161=>'afii57388',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'.notdef',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'cedilla',185=>'onesuperior',186=>'afii57403',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'afii57407',192=>'.notdef',193=>'afii57409',194=>'afii57410',195=>'afii57411',196=>'afii57412',197=>'afii57413',198=>'afii57414',199=>'afii57415',200=>'afii57416',201=>'afii57417',202=>'afii57418',203=>'afii57419',204=>'afii57420',205=>'afii57421',206=>'afii57422',207=>'afii57423',208=>'afii57424',209=>'afii57425',210=>'afii57426',211=>'afii57427',212=>'afii57428',213=>'afii57429',214=>'afii57430',215=>'multiply',216=>'afii57431',217=>'afii57432',218=>'afii57433',219=>'afii57434',220=>'afii57440',221=>'afii57441',222=>'afii57442',223=>'afii57443',224=>'agrave',225=>'afii57444',226=>'acircumflex',227=>'afii57445',228=>'afii57446',229=>'afii57470',230=>'afii57448',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'afii57449',237=>'afii57450',238=>'icircumflex',239=>'idieresis',240=>'afii57451',241=>'afii57452',242=>'afii57453',243=>'afii57454',244=>'ocircumflex',245=>'afii57455',246=>'afii57456',247=>'divide',248=>'afii57457',249=>'ugrave',250=>'afii57458',251=>'ucircumflex',252=>'udieresis',253=>'afii299',254=>'afii300',255=>'afii57519'), - -// encoding map for: cp1257 -'cp1257' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'.notdef',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'.notdef',137=>'perthousand',138=>'.notdef',139=>'guilsinglleft',140=>'.notdef',141=>'dieresis',142=>'caron',143=>'cedilla',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'.notdef',153=>'trademark',154=>'.notdef',155=>'guilsinglright',156=>'.notdef',157=>'macron',158=>'ogonek',159=>'.notdef',160=>'space',161=>'.notdef',162=>'cent',163=>'sterling',164=>'currency',165=>'.notdef',166=>'brokenbar',167=>'section',168=>'Oslash',169=>'copyright',170=>'Rcommaaccent',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'AE',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'oslash',185=>'onesuperior',186=>'rcommaaccent',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'ae',192=>'Aogonek',193=>'Iogonek',194=>'Amacron',195=>'Cacute',196=>'Adieresis',197=>'Aring',198=>'Eogonek',199=>'Emacron',200=>'Ccaron',201=>'Eacute',202=>'Zacute',203=>'Edotaccent',204=>'Gcommaaccent',205=>'Kcommaaccent',206=>'Imacron',207=>'Lcommaaccent',208=>'Scaron',209=>'Nacute',210=>'Ncommaaccent',211=>'Oacute',212=>'Omacron',213=>'Otilde',214=>'Odieresis',215=>'multiply',216=>'Uogonek',217=>'Lslash',218=>'Sacute',219=>'Umacron',220=>'Udieresis',221=>'Zdotaccent',222=>'Zcaron',223=>'germandbls',224=>'aogonek',225=>'iogonek',226=>'amacron',227=>'cacute',228=>'adieresis',229=>'aring',230=>'eogonek',231=>'emacron',232=>'ccaron',233=>'eacute',234=>'zacute',235=>'edotaccent',236=>'gcommaaccent',237=>'kcommaaccent',238=>'imacron',239=>'lcommaaccent',240=>'scaron',241=>'nacute',242=>'ncommaaccent',243=>'oacute',244=>'omacron',245=>'otilde',246=>'odieresis',247=>'divide',248=>'uogonek',249=>'lslash',250=>'sacute',251=>'umacron',252=>'udieresis',253=>'zdotaccent',254=>'zcaron',255=>'dotaccent'), - -// encoding map for: cp1258 -'cp1258' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',136=>'circumflex',137=>'perthousand',138=>'.notdef',139=>'guilsinglleft',140=>'OE',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',152=>'tilde',153=>'trademark',154=>'.notdef',155=>'guilsinglright',156=>'oe',157=>'.notdef',158=>'.notdef',159=>'Ydieresis',160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'cedilla',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Abreve',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'gravecomb',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',208=>'Dcroat',209=>'Ntilde',210=>'hookabovecomb',211=>'Oacute',212=>'Ocircumflex',213=>'Ohorn',214=>'Odieresis',215=>'multiply',216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Uhorn',222=>'tildecomb',223=>'germandbls',224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'abreve',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'acutecomb',237=>'iacute',238=>'icircumflex',239=>'idieresis',240=>'dcroat',241=>'ntilde',242=>'dotbelowcomb',243=>'oacute',244=>'ocircumflex',245=>'ohorn',246=>'odieresis',247=>'divide',248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'uhorn',254=>'dong',255=>'ydieresis'), - -// encoding map for: iso-8859-1 -'iso-8859-1' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'cedilla',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',208=>'Eth',209=>'Ntilde',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Yacute',222=>'Thorn',223=>'germandbls',224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',240=>'eth',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'yacute',254=>'thorn',255=>'ydieresis'), - -// encoding map for: iso-8859-2 -'iso-8859-2' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'Aogonek',162=>'breve',163=>'Lslash',164=>'currency',165=>'Lcaron',166=>'Sacute',167=>'section',168=>'dieresis',169=>'Scaron',170=>'Scedilla',171=>'Tcaron',172=>'Zacute',173=>'hyphen',174=>'Zcaron',175=>'Zdotaccent',176=>'degree',177=>'aogonek',178=>'ogonek',179=>'lslash',180=>'acute',181=>'lcaron',182=>'sacute',183=>'caron',184=>'cedilla',185=>'scaron',186=>'scedilla',187=>'tcaron',188=>'zacute',189=>'hungarumlaut',190=>'zcaron',191=>'zdotaccent',192=>'Racute',193=>'Aacute',194=>'Acircumflex',195=>'Abreve',196=>'Adieresis',197=>'Lacute',198=>'Cacute',199=>'Ccedilla',200=>'Ccaron',201=>'Eacute',202=>'Eogonek',203=>'Edieresis',204=>'Ecaron',205=>'Iacute',206=>'Icircumflex',207=>'Dcaron',208=>'Dcroat',209=>'Nacute',210=>'Ncaron',211=>'Oacute',212=>'Ocircumflex',213=>'Ohungarumlaut',214=>'Odieresis',215=>'multiply',216=>'Rcaron',217=>'Uring',218=>'Uacute',219=>'Uhungarumlaut',220=>'Udieresis',221=>'Yacute',222=>'Tcommaaccent',223=>'germandbls',224=>'racute',225=>'aacute',226=>'acircumflex',227=>'abreve',228=>'adieresis',229=>'lacute',230=>'cacute',231=>'ccedilla',232=>'ccaron',233=>'eacute',234=>'eogonek',235=>'edieresis',236=>'ecaron',237=>'iacute',238=>'icircumflex',239=>'dcaron',240=>'dcroat',241=>'nacute',242=>'ncaron',243=>'oacute',244=>'ocircumflex',245=>'ohungarumlaut',246=>'odieresis',247=>'divide',248=>'rcaron',249=>'uring',250=>'uacute',251=>'uhungarumlaut',252=>'udieresis',253=>'yacute',254=>'tcommaaccent',255=>'dotaccent'), - -// encoding map for: iso-8859-4 -'iso-8859-4' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'Aogonek',162=>'kgreenlandic',163=>'Rcommaaccent',164=>'currency',165=>'Itilde',166=>'Lcommaaccent',167=>'section',168=>'dieresis',169=>'Scaron',170=>'Emacron',171=>'Gcommaaccent',172=>'Tbar',173=>'hyphen',174=>'Zcaron',175=>'macron',176=>'degree',177=>'aogonek',178=>'ogonek',179=>'rcommaaccent',180=>'acute',181=>'itilde',182=>'lcommaaccent',183=>'caron',184=>'cedilla',185=>'scaron',186=>'emacron',187=>'gcommaaccent',188=>'tbar',189=>'Eng',190=>'zcaron',191=>'eng',192=>'Amacron',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Iogonek',200=>'Ccaron',201=>'Eacute',202=>'Eogonek',203=>'Edieresis',204=>'Edotaccent',205=>'Iacute',206=>'Icircumflex',207=>'Imacron',208=>'Dcroat',209=>'Ncommaaccent',210=>'Omacron',211=>'Kcommaaccent',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',216=>'Oslash',217=>'Uogonek',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Utilde',222=>'Umacron',223=>'germandbls',224=>'amacron',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'iogonek',232=>'ccaron',233=>'eacute',234=>'eogonek',235=>'edieresis',236=>'edotaccent',237=>'iacute',238=>'icircumflex',239=>'imacron',240=>'dcroat',241=>'ncommaaccent',242=>'omacron',243=>'kcommaaccent',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',248=>'oslash',249=>'uogonek',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'utilde',254=>'umacron',255=>'dotaccent'), - -// encoding map for: iso-8859-5 -'iso-8859-5' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'afii10023',162=>'afii10051',163=>'afii10052',164=>'afii10053',165=>'afii10054',166=>'afii10055',167=>'afii10056',168=>'afii10057',169=>'afii10058',170=>'afii10059',171=>'afii10060',172=>'afii10061',173=>'hyphen',174=>'afii10062',175=>'afii10145',176=>'afii10017',177=>'afii10018',178=>'afii10019',179=>'afii10020',180=>'afii10021',181=>'afii10022',182=>'afii10024',183=>'afii10025',184=>'afii10026',185=>'afii10027',186=>'afii10028',187=>'afii10029',188=>'afii10030',189=>'afii10031',190=>'afii10032',191=>'afii10033',192=>'afii10034',193=>'afii10035',194=>'afii10036',195=>'afii10037',196=>'afii10038',197=>'afii10039',198=>'afii10040',199=>'afii10041',200=>'afii10042',201=>'afii10043',202=>'afii10044',203=>'afii10045',204=>'afii10046',205=>'afii10047',206=>'afii10048',207=>'afii10049',208=>'afii10065',209=>'afii10066',210=>'afii10067',211=>'afii10068',212=>'afii10069',213=>'afii10070',214=>'afii10072',215=>'afii10073',216=>'afii10074',217=>'afii10075',218=>'afii10076',219=>'afii10077',220=>'afii10078',221=>'afii10079',222=>'afii10080',223=>'afii10081',224=>'afii10082',225=>'afii10083',226=>'afii10084',227=>'afii10085',228=>'afii10086',229=>'afii10087',230=>'afii10088',231=>'afii10089',232=>'afii10090',233=>'afii10091',234=>'afii10092',235=>'afii10093',236=>'afii10094',237=>'afii10095',238=>'afii10096',239=>'afii10097',240=>'afii61352',241=>'afii10071',242=>'afii10099',243=>'afii10100',244=>'afii10101',245=>'afii10102',246=>'afii10103',247=>'afii10104',248=>'afii10105',249=>'afii10106',250=>'afii10107',251=>'afii10108',252=>'afii10109',253=>'section',254=>'afii10110',255=>'afii10193'), - -// encoding map for: iso-8859-7 -'iso-8859-7' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'quoteleft',162=>'quoteright',163=>'sterling',164=>'.notdef',165=>'.notdef',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'.notdef',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'.notdef',175=>'afii00208',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'tonos',181=>'dieresistonos',182=>'Alphatonos',183=>'periodcentered',184=>'Epsilontonos',185=>'Etatonos',186=>'Iotatonos',187=>'guillemotright',188=>'Omicrontonos',189=>'onehalf',190=>'Upsilontonos',191=>'Omegatonos',192=>'iotadieresistonos',193=>'Alpha',194=>'Beta',195=>'Gamma',196=>'Delta',197=>'Epsilon',198=>'Zeta',199=>'Eta',200=>'Theta',201=>'Iota',202=>'Kappa',203=>'Lambda',204=>'Mu',205=>'Nu',206=>'Xi',207=>'Omicron',208=>'Pi',209=>'Rho',210=>'.notdef',211=>'Sigma',212=>'Tau',213=>'Upsilon',214=>'Phi',215=>'Chi',216=>'Psi',217=>'Omega',218=>'Iotadieresis',219=>'Upsilondieresis',220=>'alphatonos',221=>'epsilontonos',222=>'etatonos',223=>'iotatonos',224=>'upsilondieresistonos',225=>'alpha',226=>'beta',227=>'gamma',228=>'delta',229=>'epsilon',230=>'zeta',231=>'eta',232=>'theta',233=>'iota',234=>'kappa',235=>'lambda',236=>'mu',237=>'nu',238=>'xi',239=>'omicron',240=>'pi',241=>'rho',242=>'sigma1',243=>'sigma',244=>'tau',245=>'upsilon',246=>'phi',247=>'chi',248=>'psi',249=>'omega',250=>'iotadieresis',251=>'upsilondieresis',252=>'omicrontonos',253=>'upsilontonos',254=>'omegatonos',255=>'.notdef'), - -// encoding map for: iso-8859-9 -'iso-8859-9' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',168=>'dieresis',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'cedilla',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',208=>'Gbreve',209=>'Ntilde',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Idotaccent',222=>'Scedilla',223=>'germandbls',224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',240=>'gbreve',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'dotlessi',254=>'scedilla',255=>'ydieresis'), - -// encoding map for: iso-8859-11 -'iso-8859-11' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'kokaithai',162=>'khokhaithai',163=>'khokhuatthai',164=>'khokhwaithai',165=>'khokhonthai',166=>'khorakhangthai',167=>'ngonguthai',168=>'chochanthai',169=>'chochingthai',170=>'chochangthai',171=>'sosothai',172=>'chochoethai',173=>'yoyingthai',174=>'dochadathai',175=>'topatakthai',176=>'thothanthai',177=>'thonangmonthothai',178=>'thophuthaothai',179=>'nonenthai',180=>'dodekthai',181=>'totaothai',182=>'thothungthai',183=>'thothahanthai',184=>'thothongthai',185=>'nonuthai',186=>'bobaimaithai',187=>'poplathai',188=>'phophungthai',189=>'fofathai',190=>'phophanthai',191=>'fofanthai',192=>'phosamphaothai',193=>'momathai',194=>'yoyakthai',195=>'roruathai',196=>'ruthai',197=>'lolingthai',198=>'luthai',199=>'wowaenthai',200=>'sosalathai',201=>'sorusithai',202=>'sosuathai',203=>'hohipthai',204=>'lochulathai',205=>'oangthai',206=>'honokhukthai',207=>'paiyannoithai',208=>'saraathai',209=>'maihanakatthai',210=>'saraaathai',211=>'saraamthai',212=>'saraithai',213=>'saraiithai',214=>'sarauethai',215=>'saraueethai',216=>'sarauthai',217=>'sarauuthai',218=>'phinthuthai',219=>'.notdef',220=>'.notdef',221=>'.notdef',222=>'.notdef',223=>'bahtthai',224=>'saraethai',225=>'saraaethai',226=>'saraothai',227=>'saraaimaimuanthai',228=>'saraaimaimalaithai',229=>'lakkhangyaothai',230=>'maiyamokthai',231=>'maitaikhuthai',232=>'maiekthai',233=>'maithothai',234=>'maitrithai',235=>'maichattawathai',236=>'thanthakhatthai',237=>'nikhahitthai',238=>'yamakkanthai',239=>'fongmanthai',240=>'zerothai',241=>'onethai',242=>'twothai',243=>'threethai',244=>'fourthai',245=>'fivethai',246=>'sixthai',247=>'seventhai',248=>'eightthai',249=>'ninethai',250=>'angkhankhuthai',251=>'khomutthai',252=>'.notdef',253=>'.notdef',254=>'.notdef',255=>'.notdef'), - -// encoding map for: iso-8859-15 -'iso-8859-15' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'Euro',165=>'yen',166=>'Scaron',167=>'section',168=>'scaron',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'Zcaron',181=>'mu',182=>'paragraph',183=>'periodcentered',184=>'zcaron',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'OE',189=>'oe',190=>'Ydieresis',191=>'questiondown',192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',208=>'Eth',209=>'Ntilde',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Yacute',222=>'Thorn',223=>'germandbls',224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',240=>'eth',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'yacute',254=>'thorn',255=>'ydieresis'), - -// encoding map for: iso-8859-16 -'iso-8859-16' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'space',161=>'Aogonek',162=>'aogonek',163=>'Lslash',164=>'Euro',165=>'quotedblbase',166=>'Scaron',167=>'section',168=>'scaron',169=>'copyright',170=>'Scommaaccent',171=>'guillemotleft',172=>'Zacute',173=>'hyphen',174=>'zacute',175=>'Zdotaccent',176=>'degree',177=>'plusminus',178=>'Ccaron',179=>'lslash',180=>'Zcaron',181=>'quotedblright',182=>'paragraph',183=>'periodcentered',184=>'zcaron',185=>'ccaron',186=>'scommaaccent',187=>'guillemotright',188=>'OE',189=>'oe',190=>'Ydieresis',191=>'zdotaccent',192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Abreve',196=>'Adieresis',197=>'Cacute',198=>'AE',199=>'Ccedilla',200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',208=>'Dcroat',209=>'Nacute',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Ohungarumlaut',214=>'Odieresis',215=>'Sacute',216=>'Uhungarumlaut',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Eogonek',222=>'Tcommaaccent',223=>'germandbls',224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'abreve',228=>'adieresis',229=>'cacute',230=>'ae',231=>'ccedilla',232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',240=>'dcroat',241=>'nacute',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'ohungarumlaut',246=>'odieresis',247=>'sacute',248=>'uhungarumlaut',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'eogonek',254=>'tcommaaccent',255=>'ydieresis'), - -// encoding map for: koi8-r -'koi8-r' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'SF100000',129=>'SF110000',130=>'SF010000',131=>'SF030000',132=>'SF020000',133=>'SF040000',134=>'SF080000',135=>'SF090000',136=>'SF060000',137=>'SF070000',138=>'SF050000',139=>'upblock',140=>'dnblock',141=>'block',142=>'lfblock',143=>'rtblock',144=>'ltshade',145=>'shade',146=>'dkshade',147=>'integraltp',148=>'filledbox',149=>'periodcentered',150=>'radical',151=>'approxequal',152=>'lessequal',153=>'greaterequal',154=>'space',155=>'integralbt',156=>'degree',157=>'twosuperior',158=>'periodcentered',159=>'divide',160=>'SF430000',161=>'SF240000',162=>'SF510000',163=>'afii10071',164=>'SF520000',165=>'SF390000',166=>'SF220000',167=>'SF210000',168=>'SF250000',169=>'SF500000',170=>'SF490000',171=>'SF380000',172=>'SF280000',173=>'SF270000',174=>'SF260000',175=>'SF360000',176=>'SF370000',177=>'SF420000',178=>'SF190000',179=>'afii10023',180=>'SF200000',181=>'SF230000',182=>'SF470000',183=>'SF480000',184=>'SF410000',185=>'SF450000',186=>'SF460000',187=>'SF400000',188=>'SF540000',189=>'SF530000',190=>'SF440000',191=>'copyright',192=>'afii10096',193=>'afii10065',194=>'afii10066',195=>'afii10088',196=>'afii10069',197=>'afii10070',198=>'afii10086',199=>'afii10068',200=>'afii10087',201=>'afii10074',202=>'afii10075',203=>'afii10076',204=>'afii10077',205=>'afii10078',206=>'afii10079',207=>'afii10080',208=>'afii10081',209=>'afii10097',210=>'afii10082',211=>'afii10083',212=>'afii10084',213=>'afii10085',214=>'afii10072',215=>'afii10067',216=>'afii10094',217=>'afii10093',218=>'afii10073',219=>'afii10090',220=>'afii10095',221=>'afii10091',222=>'afii10089',223=>'afii10092',224=>'afii10048',225=>'afii10017',226=>'afii10018',227=>'afii10040',228=>'afii10021',229=>'afii10022',230=>'afii10038',231=>'afii10020',232=>'afii10039',233=>'afii10026',234=>'afii10027',235=>'afii10028',236=>'afii10029',237=>'afii10030',238=>'afii10031',239=>'afii10032',240=>'afii10033',241=>'afii10049',242=>'afii10034',243=>'afii10035',244=>'afii10036',245=>'afii10037',246=>'afii10024',247=>'afii10019',248=>'afii10046',249=>'afii10045',250=>'afii10025',251=>'afii10042',252=>'afii10047',253=>'afii10043',254=>'afii10041',255=>'afii10044'), - -// encoding map for: koi8-u -'koi8-u' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',128=>'SF100000',129=>'SF110000',130=>'SF010000',131=>'SF030000',132=>'SF020000',133=>'SF040000',134=>'SF080000',135=>'SF090000',136=>'SF060000',137=>'SF070000',138=>'SF050000',139=>'upblock',140=>'dnblock',141=>'block',142=>'lfblock',143=>'rtblock',144=>'ltshade',145=>'shade',146=>'dkshade',147=>'integraltp',148=>'filledbox',149=>'bullet',150=>'radical',151=>'approxequal',152=>'lessequal',153=>'greaterequal',154=>'space',155=>'integralbt',156=>'degree',157=>'twosuperior',158=>'periodcentered',159=>'divide',160=>'SF430000',161=>'SF240000',162=>'SF510000',163=>'afii10071',164=>'afii10101',165=>'SF390000',166=>'afii10103',167=>'afii10104',168=>'SF250000',169=>'SF500000',170=>'SF490000',171=>'SF380000',172=>'SF280000',173=>'afii10098',174=>'SF260000',175=>'SF360000',176=>'SF370000',177=>'SF420000',178=>'SF190000',179=>'afii10023',180=>'afii10053',181=>'SF230000',182=>'afii10055',183=>'afii10056',184=>'SF410000',185=>'SF450000',186=>'SF460000',187=>'SF400000',188=>'SF540000',189=>'afii10050',190=>'SF440000',191=>'copyright',192=>'afii10096',193=>'afii10065',194=>'afii10066',195=>'afii10088',196=>'afii10069',197=>'afii10070',198=>'afii10086',199=>'afii10068',200=>'afii10087',201=>'afii10074',202=>'afii10075',203=>'afii10076',204=>'afii10077',205=>'afii10078',206=>'afii10079',207=>'afii10080',208=>'afii10081',209=>'afii10097',210=>'afii10082',211=>'afii10083',212=>'afii10084',213=>'afii10085',214=>'afii10072',215=>'afii10067',216=>'afii10094',217=>'afii10093',218=>'afii10073',219=>'afii10090',220=>'afii10095',221=>'afii10091',222=>'afii10089',223=>'afii10092',224=>'afii10048',225=>'afii10017',226=>'afii10018',227=>'afii10040',228=>'afii10021',229=>'afii10022',230=>'afii10038',231=>'afii10020',232=>'afii10039',233=>'afii10026',234=>'afii10027',235=>'afii10028',236=>'afii10029',237=>'afii10030',238=>'afii10031',239=>'afii10032',240=>'afii10033',241=>'afii10049',242=>'afii10034',243=>'afii10035',244=>'afii10036',245=>'afii10037',246=>'afii10024',247=>'afii10019',248=>'afii10046',249=>'afii10045',250=>'afii10025',251=>'afii10042',252=>'afii10047',253=>'afii10043',254=>'afii10041',255=>'afii10044'), - -// encoding map for: symbol -'symbol' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',32=>'space',33=>'exclam',34=>'universal',35=>'numbersign',36=>'existential',37=>'percent',38=>'ampersand',39=>'suchthat',40=>'parenleft',41=>'parenright',42=>'asteriskmath',43=>'plus',44=>'comma',45=>'minus',46=>'period',47=>'slash',48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',64=>'congruent',65=>'Alpha',66=>'Beta',67=>'Chi',68=>'Delta',69=>'Epsilon',70=>'Phi',71=>'Gamma',72=>'Eta',73=>'Iota',74=>'theta1',75=>'Kappa',76=>'Lambda',77=>'Mu',78=>'Nu',79=>'Omicron',80=>'Pi',81=>'Theta',82=>'Rho',83=>'Sigma',84=>'Tau',85=>'Upsilon',86=>'sigma1',87=>'Omega',88=>'Xi',89=>'Psi',90=>'Zeta',91=>'bracketleft',92=>'therefore',93=>'bracketright',94=>'perpendicular',95=>'underscore',96=>'radicalex',97=>'alpha',98=>'beta',99=>'chi',100=>'delta',101=>'epsilon',102=>'phi',103=>'gamma',104=>'eta',105=>'iota',106=>'phi1',107=>'kappa',108=>'lambda',109=>'mu',110=>'nu',111=>'omicron',112=>'pi',113=>'theta',114=>'rho',115=>'sigma',116=>'tau',117=>'upsilon',118=>'omega1',119=>'omega',120=>'xi',121=>'psi',122=>'zeta',123=>'braceleft',124=>'bar',125=>'braceright',126=>'similar',127=>'.notdef',128=>'.notdef',129=>'.notdef',130=>'.notdef',131=>'.notdef',132=>'.notdef',133=>'.notdef',134=>'.notdef',135=>'.notdef',136=>'.notdef',137=>'.notdef',138=>'.notdef',139=>'.notdef',140=>'.notdef',141=>'.notdef',142=>'.notdef',143=>'.notdef',144=>'.notdef',145=>'.notdef',146=>'.notdef',147=>'.notdef',148=>'.notdef',149=>'.notdef',150=>'.notdef',151=>'.notdef',152=>'.notdef',153=>'.notdef',154=>'.notdef',155=>'.notdef',156=>'.notdef',157=>'.notdef',158=>'.notdef',159=>'.notdef',160=>'Euro',161=>'Upsilon1',162=>'minute',163=>'lessequal',164=>'fraction',165=>'infinity',166=>'florin',167=>'club',168=>'diamond',169=>'heart',170=>'spade',171=>'arrowboth',172=>'arrowleft',173=>'arrowup',174=>'arrowright',175=>'arrowdown',176=>'degree',177=>'plusminus',178=>'second',179=>'greaterequal',180=>'multiply',181=>'proportional',182=>'partialdiff',183=>'bullet',184=>'divide',185=>'notequal',186=>'equivalence',187=>'approxequal',188=>'ellipsis',189=>'arrowvertex',190=>'arrowhorizex',191=>'carriagereturn',192=>'aleph',193=>'Ifraktur',194=>'Rfraktur',195=>'weierstrass',196=>'circlemultiply',197=>'circleplus',198=>'emptyset',199=>'intersection',200=>'union',201=>'propersuperset',202=>'reflexsuperset',203=>'notsubset',204=>'propersubset',205=>'reflexsubset',206=>'element',207=>'notelement',208=>'angle',209=>'gradient',210=>'registerserif',211=>'copyrightserif',212=>'trademarkserif',213=>'product',214=>'radical',215=>'dotmath',216=>'logicalnot',217=>'logicaland',218=>'logicalor',219=>'arrowdblboth',220=>'arrowdblleft',221=>'arrowdblup',222=>'arrowdblright',223=>'arrowdbldown',224=>'lozenge',225=>'angleleft',226=>'registersans',227=>'copyrightsans',228=>'trademarksans',229=>'summation',230=>'parenlefttp',231=>'parenleftex',232=>'parenleftbt',233=>'bracketlefttp',234=>'bracketleftex',235=>'bracketleftbt',236=>'bracelefttp',237=>'braceleftmid',238=>'braceleftbt',239=>'braceex',240=>'.notdef',241=>'angleright',242=>'integral',243=>'integraltp',244=>'integralex',245=>'integralbt',246=>'parenrighttp',247=>'parenrightex',248=>'parenrightbt',249=>'bracketrighttp',250=>'bracketrightex',251=>'bracketrightbt',252=>'bracerighttp',253=>'bracerightmid',254=>'bracerightbt',255=>'.notdef',1226=>'registered',1227=>'copyright',1228=>'trademark') - -); // end of encoding maps - -/** - * ToUnicode map for Identity-H stream - * @public static - */ -public static $uni_identity_h = "/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo << /Registry (Adobe) /Ordering (UCS) /Supplement 0 >> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n/WMode 0 def\n1 begincodespacerange\n<0000> \nendcodespacerange\n100 beginbfrange\n<0000> <00ff> <0000>\n<0100> <01ff> <0100>\n<0200> <02ff> <0200>\n<0300> <03ff> <0300>\n<0400> <04ff> <0400>\n<0500> <05ff> <0500>\n<0600> <06ff> <0600>\n<0700> <07ff> <0700>\n<0800> <08ff> <0800>\n<0900> <09ff> <0900>\n<0a00> <0aff> <0a00>\n<0b00> <0bff> <0b00>\n<0c00> <0cff> <0c00>\n<0d00> <0dff> <0d00>\n<0e00> <0eff> <0e00>\n<0f00> <0fff> <0f00>\n<1000> <10ff> <1000>\n<1100> <11ff> <1100>\n<1200> <12ff> <1200>\n<1300> <13ff> <1300>\n<1400> <14ff> <1400>\n<1500> <15ff> <1500>\n<1600> <16ff> <1600>\n<1700> <17ff> <1700>\n<1800> <18ff> <1800>\n<1900> <19ff> <1900>\n<1a00> <1aff> <1a00>\n<1b00> <1bff> <1b00>\n<1c00> <1cff> <1c00>\n<1d00> <1dff> <1d00>\n<1e00> <1eff> <1e00>\n<1f00> <1fff> <1f00>\n<2000> <20ff> <2000>\n<2100> <21ff> <2100>\n<2200> <22ff> <2200>\n<2300> <23ff> <2300>\n<2400> <24ff> <2400>\n<2500> <25ff> <2500>\n<2600> <26ff> <2600>\n<2700> <27ff> <2700>\n<2800> <28ff> <2800>\n<2900> <29ff> <2900>\n<2a00> <2aff> <2a00>\n<2b00> <2bff> <2b00>\n<2c00> <2cff> <2c00>\n<2d00> <2dff> <2d00>\n<2e00> <2eff> <2e00>\n<2f00> <2fff> <2f00>\n<3000> <30ff> <3000>\n<3100> <31ff> <3100>\n<3200> <32ff> <3200>\n<3300> <33ff> <3300>\n<3400> <34ff> <3400>\n<3500> <35ff> <3500>\n<3600> <36ff> <3600>\n<3700> <37ff> <3700>\n<3800> <38ff> <3800>\n<3900> <39ff> <3900>\n<3a00> <3aff> <3a00>\n<3b00> <3bff> <3b00>\n<3c00> <3cff> <3c00>\n<3d00> <3dff> <3d00>\n<3e00> <3eff> <3e00>\n<3f00> <3fff> <3f00>\n<4000> <40ff> <4000>\n<4100> <41ff> <4100>\n<4200> <42ff> <4200>\n<4300> <43ff> <4300>\n<4400> <44ff> <4400>\n<4500> <45ff> <4500>\n<4600> <46ff> <4600>\n<4700> <47ff> <4700>\n<4800> <48ff> <4800>\n<4900> <49ff> <4900>\n<4a00> <4aff> <4a00>\n<4b00> <4bff> <4b00>\n<4c00> <4cff> <4c00>\n<4d00> <4dff> <4d00>\n<4e00> <4eff> <4e00>\n<4f00> <4fff> <4f00>\n<5000> <50ff> <5000>\n<5100> <51ff> <5100>\n<5200> <52ff> <5200>\n<5300> <53ff> <5300>\n<5400> <54ff> <5400>\n<5500> <55ff> <5500>\n<5600> <56ff> <5600>\n<5700> <57ff> <5700>\n<5800> <58ff> <5800>\n<5900> <59ff> <5900>\n<5a00> <5aff> <5a00>\n<5b00> <5bff> <5b00>\n<5c00> <5cff> <5c00>\n<5d00> <5dff> <5d00>\n<5e00> <5eff> <5e00>\n<5f00> <5fff> <5f00>\n<6000> <60ff> <6000>\n<6100> <61ff> <6100>\n<6200> <62ff> <6200>\n<6300> <63ff> <6300>\nendbfrange\n100 beginbfrange\n<6400> <64ff> <6400>\n<6500> <65ff> <6500>\n<6600> <66ff> <6600>\n<6700> <67ff> <6700>\n<6800> <68ff> <6800>\n<6900> <69ff> <6900>\n<6a00> <6aff> <6a00>\n<6b00> <6bff> <6b00>\n<6c00> <6cff> <6c00>\n<6d00> <6dff> <6d00>\n<6e00> <6eff> <6e00>\n<6f00> <6fff> <6f00>\n<7000> <70ff> <7000>\n<7100> <71ff> <7100>\n<7200> <72ff> <7200>\n<7300> <73ff> <7300>\n<7400> <74ff> <7400>\n<7500> <75ff> <7500>\n<7600> <76ff> <7600>\n<7700> <77ff> <7700>\n<7800> <78ff> <7800>\n<7900> <79ff> <7900>\n<7a00> <7aff> <7a00>\n<7b00> <7bff> <7b00>\n<7c00> <7cff> <7c00>\n<7d00> <7dff> <7d00>\n<7e00> <7eff> <7e00>\n<7f00> <7fff> <7f00>\n<8000> <80ff> <8000>\n<8100> <81ff> <8100>\n<8200> <82ff> <8200>\n<8300> <83ff> <8300>\n<8400> <84ff> <8400>\n<8500> <85ff> <8500>\n<8600> <86ff> <8600>\n<8700> <87ff> <8700>\n<8800> <88ff> <8800>\n<8900> <89ff> <8900>\n<8a00> <8aff> <8a00>\n<8b00> <8bff> <8b00>\n<8c00> <8cff> <8c00>\n<8d00> <8dff> <8d00>\n<8e00> <8eff> <8e00>\n<8f00> <8fff> <8f00>\n<9000> <90ff> <9000>\n<9100> <91ff> <9100>\n<9200> <92ff> <9200>\n<9300> <93ff> <9300>\n<9400> <94ff> <9400>\n<9500> <95ff> <9500>\n<9600> <96ff> <9600>\n<9700> <97ff> <9700>\n<9800> <98ff> <9800>\n<9900> <99ff> <9900>\n<9a00> <9aff> <9a00>\n<9b00> <9bff> <9b00>\n<9c00> <9cff> <9c00>\n<9d00> <9dff> <9d00>\n<9e00> <9eff> <9e00>\n<9f00> <9fff> <9f00>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nendbfrange\n56 beginbfrange\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"; - -} // END OF TCPDF_FONT_DATA CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/tcpdf_fonts.php b/lib/combodo/tcpdf/include/tcpdf_fonts.php deleted file mode 100644 index c692ef87d..000000000 --- a/lib/combodo/tcpdf/include/tcpdf_fonts.php +++ /dev/null @@ -1,2656 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description :Font methods for TCPDF library. -// -//============================================================+ - -/** - * @file - * Unicode data and font methods for TCPDF library. - * @author Nicola Asuni - * @package com.tecnick.tcpdf - */ - -/** - * @class TCPDF_FONTS - * Font methods for TCPDF library. - * @package com.tecnick.tcpdf - * @version 1.1.0 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_FONTS { - - /** - * Static cache used for speed up uniord performances - * @protected - */ - protected static $cache_uniord = array(); - - /** - * Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable). - * @param string $fontfile Font file (full path). - * @param string $fonttype Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional. - * @param string $enc Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats. - * @param int $flags Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font. - * @param string $outpath Output path for generated font files (must be writeable by the web server). Leave empty for default font folder. - * @param int $platid Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1). - * @param int $encid Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4. - * @param boolean $addcbbox If true includes the character bounding box information on the php font file. - * @param boolean $link If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts. - * @return string|false TCPDF font name or boolean false in case of error. - * @author Nicola Asuni - * @since 5.9.123 (2010-09-30) - * @public static - */ - public static function addTTFfont($fontfile, $fonttype='', $enc='', $flags=32, $outpath='', $platid=3, $encid=1, $addcbbox=false, $link=false) { - if (!TCPDF_STATIC::file_exists($fontfile)) { - // Could not find file - return false; - } - // font metrics - $fmetric = array(); - // build new font name for TCPDF compatibility - $font_path_parts = pathinfo($fontfile); - if (!isset($font_path_parts['filename'])) { - $font_path_parts['filename'] = substr($font_path_parts['basename'], 0, -(strlen($font_path_parts['extension']) + 1)); - } - $font_name = strtolower($font_path_parts['filename']); - $font_name = preg_replace('/[^a-z0-9_]/', '', $font_name); - $search = array('bold', 'oblique', 'italic', 'regular'); - $replace = array('b', 'i', 'i', ''); - $font_name = str_replace($search, $replace, $font_name); - if (empty($font_name)) { - // set generic name - $font_name = 'tcpdffont'; - } - // set output path - if (empty($outpath)) { - $outpath = self::_getfontpath(); - } - // check if this font already exist - if (@TCPDF_STATIC::file_exists($outpath.$font_name.'.php')) { - // this font already exist (delete it from fonts folder to rebuild it) - return $font_name; - } - $fmetric['file'] = $font_name; - $fmetric['ctg'] = $font_name.'.ctg.z'; - // get font data - $font = file_get_contents($fontfile); - $fmetric['originalsize'] = strlen($font); - // autodetect font type - if (empty($fonttype)) { - if (TCPDF_STATIC::_getULONG($font, 0) == 0x10000) { - // True Type (Unicode or not) - $fonttype = 'TrueTypeUnicode'; - } elseif (substr($font, 0, 4) == 'OTTO') { - // Open Type (Unicode or not) - //Unsupported font format: OpenType with CFF data - return false; - } else { - // Type 1 - $fonttype = 'Type1'; - } - } - // set font type - switch ($fonttype) { - case 'CID0CT': - case 'CID0CS': - case 'CID0KR': - case 'CID0JP': { - $fmetric['type'] = 'cidfont0'; - break; - } - case 'Type1': { - $fmetric['type'] = 'Type1'; - if (empty($enc) AND (($flags & 4) == 0)) { - $enc = 'cp1252'; - } - break; - } - case 'TrueType': { - $fmetric['type'] = 'TrueType'; - break; - } - case 'TrueTypeUnicode': - default: { - $fmetric['type'] = 'TrueTypeUnicode'; - break; - } - } - // set encoding maps (if any) - $fmetric['enc'] = preg_replace('/[^A-Za-z0-9_\-]/', '', $enc); - $fmetric['diff'] = ''; - if (($fmetric['type'] == 'TrueType') OR ($fmetric['type'] == 'Type1')) { - if (!empty($enc) AND ($enc != 'cp1252') AND isset(TCPDF_FONT_DATA::$encmap[$enc])) { - // build differences from reference encoding - $enc_ref = TCPDF_FONT_DATA::$encmap['cp1252']; - $enc_target = TCPDF_FONT_DATA::$encmap[$enc]; - $last = 0; - for ($i = 32; $i <= 255; ++$i) { - if ($enc_target[$i] != $enc_ref[$i]) { - if ($i != ($last + 1)) { - $fmetric['diff'] .= $i.' '; - } - $last = $i; - $fmetric['diff'] .= '/'.$enc_target[$i].' '; - } - } - } - } - // parse the font by type - if ($fmetric['type'] == 'Type1') { - // ---------- TYPE 1 ---------- - // read first segment - $a = unpack('Cmarker/Ctype/Vsize', substr($font, 0, 6)); - if ($a['marker'] != 128) { - // Font file is not a valid binary Type1 - return false; - } - $fmetric['size1'] = $a['size']; - $data = substr($font, 6, $fmetric['size1']); - // read second segment - $a = unpack('Cmarker/Ctype/Vsize', substr($font, (6 + $fmetric['size1']), 6)); - if ($a['marker'] != 128) { - // Font file is not a valid binary Type1 - return false; - } - $fmetric['size2'] = $a['size']; - $encrypted = substr($font, (12 + $fmetric['size1']), $fmetric['size2']); - $data .= $encrypted; - // store compressed font - $fmetric['file'] .= '.z'; - $fp = TCPDF_STATIC::fopenLocal($outpath.$fmetric['file'], 'wb'); - fwrite($fp, gzcompress($data)); - fclose($fp); - // get font info - $fmetric['Flags'] = $flags; - preg_match ('#/FullName[\s]*\(([^\)]*)#', $font, $matches); - $fmetric['name'] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $matches[1]); - preg_match('#/FontBBox[\s]*{([^}]*)#', $font, $matches); - $fmetric['bbox'] = trim($matches[1]); - $bv = explode(' ', $fmetric['bbox']); - $fmetric['Ascent'] = intval($bv[3]); - $fmetric['Descent'] = intval($bv[1]); - preg_match('#/ItalicAngle[\s]*([0-9\+\-]*)#', $font, $matches); - $fmetric['italicAngle'] = intval($matches[1]); - if ($fmetric['italicAngle'] != 0) { - $fmetric['Flags'] |= 64; - } - preg_match('#/UnderlinePosition[\s]*([0-9\+\-]*)#', $font, $matches); - $fmetric['underlinePosition'] = intval($matches[1]); - preg_match('#/UnderlineThickness[\s]*([0-9\+\-]*)#', $font, $matches); - $fmetric['underlineThickness'] = intval($matches[1]); - preg_match('#/isFixedPitch[\s]*([^\s]*)#', $font, $matches); - if ($matches[1] == 'true') { - $fmetric['Flags'] |= 1; - } - // get internal map - $imap = array(); - if (preg_match_all('#dup[\s]([0-9]+)[\s]*/([^\s]*)[\s]put#sU', $font, $fmap, PREG_SET_ORDER) > 0) { - foreach ($fmap as $v) { - $imap[$v[2]] = $v[1]; - } - } - // decrypt eexec encrypted part - $r = 55665; // eexec encryption constant - $c1 = 52845; - $c2 = 22719; - $elen = strlen($encrypted); - $eplain = ''; - for ($i = 0; $i < $elen; ++$i) { - $chr = ord($encrypted[$i]); - $eplain .= chr($chr ^ ($r >> 8)); - $r = ((($chr + $r) * $c1 + $c2) % 65536); - } - if (preg_match('#/ForceBold[\s]*([^\s]*)#', $eplain, $matches) > 0) { - if ($matches[1] == 'true') { - $fmetric['Flags'] |= 0x40000; - } - } - if (preg_match('#/StdVW[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { - $fmetric['StemV'] = intval($matches[1]); - } else { - $fmetric['StemV'] = 70; - } - if (preg_match('#/StdHW[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { - $fmetric['StemH'] = intval($matches[1]); - } else { - $fmetric['StemH'] = 30; - } - if (preg_match('#/BlueValues[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { - $bv = explode(' ', $matches[1]); - if (count($bv) >= 6) { - $v1 = intval($bv[2]); - $v2 = intval($bv[4]); - if ($v1 <= $v2) { - $fmetric['XHeight'] = $v1; - $fmetric['CapHeight'] = $v2; - } else { - $fmetric['XHeight'] = $v2; - $fmetric['CapHeight'] = $v1; - } - } else { - $fmetric['XHeight'] = 450; - $fmetric['CapHeight'] = 700; - } - } else { - $fmetric['XHeight'] = 450; - $fmetric['CapHeight'] = 700; - } - // get the number of random bytes at the beginning of charstrings - if (preg_match('#/lenIV[\s]*([0-9]*)#', $eplain, $matches) > 0) { - $lenIV = intval($matches[1]); - } else { - $lenIV = 4; - } - $fmetric['Leading'] = 0; - // get charstring data - $eplain = substr($eplain, (strpos($eplain, '/CharStrings') + 1)); - preg_match_all('#/([A-Za-z0-9\.]*)[\s][0-9]+[\s]RD[\s](.*)[\s]ND#sU', $eplain, $matches, PREG_SET_ORDER); - if (!empty($enc) AND isset(TCPDF_FONT_DATA::$encmap[$enc])) { - $enc_map = TCPDF_FONT_DATA::$encmap[$enc]; - } else { - $enc_map = false; - } - $fmetric['cw'] = ''; - $fmetric['MaxWidth'] = 0; - $cwidths = array(); - foreach ($matches as $k => $v) { - $cid = 0; - if (isset($imap[$v[1]])) { - $cid = $imap[$v[1]]; - } elseif ($enc_map !== false) { - $cid = array_search($v[1], $enc_map); - if ($cid === false) { - $cid = 0; - } elseif ($cid > 1000) { - $cid -= 1000; - } - } - // decrypt charstring encrypted part - $r = 4330; // charstring encryption constant - $c1 = 52845; - $c2 = 22719; - $cd = $v[2]; - $clen = strlen($cd); - $ccom = array(); - for ($i = 0; $i < $clen; ++$i) { - $chr = ord($cd[$i]); - $ccom[] = ($chr ^ ($r >> 8)); - $r = ((($chr + $r) * $c1 + $c2) % 65536); - } - // decode numbers - $cdec = array(); - $ck = 0; - $i = $lenIV; - while ($i < $clen) { - if ($ccom[$i] < 32) { - $cdec[$ck] = $ccom[$i]; - if (($ck > 0) AND ($cdec[$ck] == 13)) { - // hsbw command: update width - $cwidths[$cid] = $cdec[($ck - 1)]; - } - ++$i; - } elseif (($ccom[$i] >= 32) AND ($ccom[$i] <= 246)) { - $cdec[$ck] = ($ccom[$i] - 139); - ++$i; - } elseif (($ccom[$i] >= 247) AND ($ccom[$i] <= 250)) { - $cdec[$ck] = ((($ccom[$i] - 247) * 256) + $ccom[($i + 1)] + 108); - $i += 2; - } elseif (($ccom[$i] >= 251) AND ($ccom[$i] <= 254)) { - $cdec[$ck] = ((-($ccom[$i] - 251) * 256) - $ccom[($i + 1)] - 108); - $i += 2; - } elseif ($ccom[$i] == 255) { - $sval = chr($ccom[($i + 1)]).chr($ccom[($i + 2)]).chr($ccom[($i + 3)]).chr($ccom[($i + 4)]); - $vsval = unpack('li', $sval); - $cdec[$ck] = $vsval['i']; - $i += 5; - } - ++$ck; - } - } // end for each matches - $fmetric['MissingWidth'] = $cwidths[0]; - $fmetric['MaxWidth'] = $fmetric['MissingWidth']; - $fmetric['AvgWidth'] = 0; - // set chars widths - for ($cid = 0; $cid <= 255; ++$cid) { - if (isset($cwidths[$cid])) { - if ($cwidths[$cid] > $fmetric['MaxWidth']) { - $fmetric['MaxWidth'] = $cwidths[$cid]; - } - $fmetric['AvgWidth'] += $cwidths[$cid]; - $fmetric['cw'] .= ','.$cid.'=>'.$cwidths[$cid]; - } else { - $fmetric['cw'] .= ','.$cid.'=>'.$fmetric['MissingWidth']; - } - } - $fmetric['AvgWidth'] = round($fmetric['AvgWidth'] / count($cwidths)); - } else { - // ---------- TRUE TYPE ---------- - $offset = 0; // offset position of the font data - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x10000) { - // sfnt version must be 0x00010000 for TrueType version 1.0. - return false; - } - if ($fmetric['type'] != 'cidfont0') { - if ($link) { - // creates a symbolic link to the existing font - symlink($fontfile, $outpath.$fmetric['file']); - } else { - // store compressed font - $fmetric['file'] .= '.z'; - $fp = TCPDF_STATIC::fopenLocal($outpath.$fmetric['file'], 'wb'); - fwrite($fp, gzcompress($font)); - fclose($fp); - } - } - $offset += 4; - // get number of tables - $numTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // skip searchRange, entrySelector and rangeShift - $offset += 6; - // tables array - $table = array(); - // ---------- get tables ---------- - for ($i = 0; $i < $numTables; ++$i) { - // get table info - $tag = substr($font, $offset, 4); - $offset += 4; - $table[$tag] = array(); - $table[$tag]['checkSum'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['length'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - // check magicNumber - $offset = $table['head']['offset'] + 12; - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x5F0F3CF5) { - // magicNumber must be 0x5F0F3CF5 - return false; - } - $offset += 4; - $offset += 2; // skip flags - // get FUnits - $fmetric['unitsPerEm'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // units ratio constant - $urk = (1000 / $fmetric['unitsPerEm']); - $offset += 16; // skip created, modified - $xMin = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $yMin = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $xMax = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $yMax = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $fmetric['bbox'] = ''.$xMin.' '.$yMin.' '.$xMax.' '.$yMax.''; - $macStyle = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // PDF font flags - $fmetric['Flags'] = $flags; - if (($macStyle & 2) == 2) { - // italic flag - $fmetric['Flags'] |= 64; - } - // get offset mode (indexToLocFormat : 0 = short, 1 = long) - $offset = $table['head']['offset'] + 50; - $short_offset = (TCPDF_STATIC::_getSHORT($font, $offset) == 0); - $offset += 2; - // get the offsets to the locations of the glyphs in the font, relative to the beginning of the glyphData table - $indexToLoc = array(); - $offset = $table['loca']['offset']; - if ($short_offset) { - // short version - $tot_num_glyphs = floor($table['loca']['length'] / 2); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getUSHORT($font, $offset) * 2; - if (isset($indexToLoc[($i - 1)]) && ($indexToLoc[$i] == $indexToLoc[($i - 1)])) { - // the last glyph didn't have an outline - unset($indexToLoc[($i - 1)]); - } - $offset += 2; - } - } else { - // long version - $tot_num_glyphs = floor($table['loca']['length'] / 4); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getULONG($font, $offset); - if (isset($indexToLoc[($i - 1)]) && ($indexToLoc[$i] == $indexToLoc[($i - 1)])) { - // the last glyph didn't have an outline - unset($indexToLoc[($i - 1)]); - } - $offset += 4; - } - } - // get glyphs indexes of chars from cmap table - $offset = $table['cmap']['offset'] + 2; - $numEncodingTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables = array(); - for ($i = 0; $i < $numEncodingTables; ++$i) { - $encodingTables[$i]['platformID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['encodingID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - // ---------- get os/2 metrics ---------- - $offset = $table['OS/2']['offset']; - $offset += 2; // skip version - // xAvgCharWidth - $fmetric['AvgWidth'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // usWeightClass - $usWeightClass = round(TCPDF_STATIC::_getUFWORD($font, $offset) * $urk); - // estimate StemV and StemH (400 = usWeightClass for Normal - Regular font) - $fmetric['StemV'] = round((70 * $usWeightClass) / 400); - $fmetric['StemH'] = round((30 * $usWeightClass) / 400); - $offset += 2; - $offset += 2; // usWidthClass - $fsType = TCPDF_STATIC::_getSHORT($font, $offset); - $offset += 2; - if ($fsType == 2) { - // This Font cannot be modified, embedded or exchanged in any manner without first obtaining permission of the legal owner. - return false; - } - // ---------- get font name ---------- - $fmetric['name'] = ''; - $offset = $table['name']['offset']; - $offset += 2; // skip Format selector (=0). - // Number of NameRecords that follow n. - $numNameRecords = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // Offset to start of string storage (from start of table). - $stringStorageOffset = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - for ($i = 0; $i < $numNameRecords; ++$i) { - $offset += 6; // skip Platform ID, Platform-specific encoding ID, Language ID. - // Name ID. - $nameID = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - if ($nameID == 6) { - // String length (in bytes). - $stringLength = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // String offset from start of storage area (in bytes). - $stringOffset = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $offset = ($table['name']['offset'] + $stringStorageOffset + $stringOffset); - $fmetric['name'] = substr($font, $offset, $stringLength); - $fmetric['name'] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $fmetric['name']); - break; - } else { - $offset += 4; // skip String length, String offset - } - } - if (empty($fmetric['name'])) { - $fmetric['name'] = $font_name; - } - // ---------- get post data ---------- - $offset = $table['post']['offset']; - $offset += 4; // skip Format Type - $fmetric['italicAngle'] = TCPDF_STATIC::_getFIXED($font, $offset); - $offset += 4; - $fmetric['underlinePosition'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $fmetric['underlineThickness'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - $isFixedPitch = (TCPDF_STATIC::_getULONG($font, $offset) == 0) ? false : true; - $offset += 2; - if ($isFixedPitch) { - $fmetric['Flags'] |= 1; - } - // ---------- get hhea data ---------- - $offset = $table['hhea']['offset']; - $offset += 4; // skip Table version number - // Ascender - $fmetric['Ascent'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // Descender - $fmetric['Descent'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // LineGap - $fmetric['Leading'] = round(TCPDF_STATIC::_getFWORD($font, $offset) * $urk); - $offset += 2; - // advanceWidthMax - $fmetric['MaxWidth'] = round(TCPDF_STATIC::_getUFWORD($font, $offset) * $urk); - $offset += 2; - $offset += 22; // skip some values - // get the number of hMetric entries in hmtx table - $numberOfHMetrics = TCPDF_STATIC::_getUSHORT($font, $offset); - // ---------- get maxp data ---------- - $offset = $table['maxp']['offset']; - $offset += 4; // skip Table version number - // get the the number of glyphs in the font. - $numGlyphs = TCPDF_STATIC::_getUSHORT($font, $offset); - // ---------- get CIDToGIDMap ---------- - $ctg = array(); - $c = 0; - foreach ($encodingTables as $enctable) { - // get only specified Platform ID and Encoding ID - if (($enctable['platformID'] == $platid) AND ($enctable['encodingID'] == $encid)) { - $offset = $table['cmap']['offset'] + $enctable['offset']; - $format = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - switch ($format) { - case 0: { // Format 0: Byte encoding table - $offset += 4; // skip length and version/language - for ($c = 0; $c < 256; ++$c) { - $g = TCPDF_STATIC::_getBYTE($font, $offset); - $ctg[$c] = $g; - ++$offset; - } - break; - } - case 2: { // Format 2: High-byte mapping through table - $offset += 4; // skip length and version/language - $numSubHeaders = 0; - for ($i = 0; $i < 256; ++$i) { - // Array that maps high bytes to subHeaders: value is subHeader index * 8. - $subHeaderKeys[$i] = (TCPDF_STATIC::_getUSHORT($font, $offset) / 8); - $offset += 2; - if ($numSubHeaders < $subHeaderKeys[$i]) { - $numSubHeaders = $subHeaderKeys[$i]; - } - } - // the number of subHeaders is equal to the max of subHeaderKeys + 1 - ++$numSubHeaders; - // read subHeader structures - $subHeaders = array(); - $numGlyphIndexArray = 0; - for ($k = 0; $k < $numSubHeaders; ++$k) { - $subHeaders[$k]['firstCode'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['entryCount'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idDelta'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] -= (2 + (($numSubHeaders - $k - 1) * 8)); - $subHeaders[$k]['idRangeOffset'] /= 2; - $numGlyphIndexArray += $subHeaders[$k]['entryCount']; - } - for ($k = 0; $k < $numGlyphIndexArray; ++$k) { - $glyphIndexArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($i = 0; $i < 256; ++$i) { - $k = $subHeaderKeys[$i]; - if ($k == 0) { - // one byte code - $c = $i; - $g = $glyphIndexArray[0]; - $ctg[$c] = $g; - } else { - // two bytes code - $start_byte = $subHeaders[$k]['firstCode']; - $end_byte = $start_byte + $subHeaders[$k]['entryCount']; - for ($j = $start_byte; $j < $end_byte; ++$j) { - // combine high and low bytes - $c = (($i << 8) + $j); - $idRangeOffset = ($subHeaders[$k]['idRangeOffset'] + $j - $subHeaders[$k]['firstCode']); - $g = ($glyphIndexArray[$idRangeOffset] + $subHeaders[$k]['idDelta']) % 65536; - if ($g < 0) { - $g = 0; - } - $ctg[$c] = $g; - } - } - } - break; - } - case 4: { // Format 4: Segment mapping to delta values - $length = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $offset += 2; // skip version/language - $segCount = floor(TCPDF_STATIC::_getUSHORT($font, $offset) / 2); - $offset += 2; - $offset += 6; // skip searchRange, entrySelector, rangeShift - $endCount = array(); // array of end character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $endCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $offset += 2; // skip reservedPad - $startCount = array(); // array of start character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $startCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idDelta = array(); // delta for all character codes in segment - for ($k = 0; $k < $segCount; ++$k) { - $idDelta[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idRangeOffset = array(); // Offsets into glyphIdArray or 0 - for ($k = 0; $k < $segCount; ++$k) { - $idRangeOffset[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $gidlen = (floor($length / 2) - 8 - (4 * $segCount)); - $glyphIdArray = array(); // glyph index array - for ($k = 0; $k < $gidlen; ++$k) { - $glyphIdArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($k = 0; $k < $segCount - 1; ++$k) { - for ($c = $startCount[$k]; $c <= $endCount[$k]; ++$c) { - if ($idRangeOffset[$k] == 0) { - $g = ($idDelta[$k] + $c) % 65536; - } else { - $gid = (floor($idRangeOffset[$k] / 2) + ($c - $startCount[$k]) - ($segCount - $k)); - $g = ($glyphIdArray[$gid] + $idDelta[$k]) % 65536; - } - if ($g < 0) { - $g = 0; - } - $ctg[$c] = $g; - } - } - break; - } - case 6: { // Format 6: Trimmed table mapping - $offset += 4; // skip length and version/language - $firstCode = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $entryCount = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - for ($k = 0; $k < $entryCount; ++$k) { - $c = ($k + $firstCode); - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $ctg[$c] = $g; - } - break; - } - case 8: { // Format 8: Mixed 16-bit and 32-bit coverage - $offset += 10; // skip reserved, length and version/language - for ($k = 0; $k < 8192; ++$k) { - $is32[$k] = TCPDF_STATIC::_getBYTE($font, $offset); - ++$offset; - } - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($i = 0; $i < $nGroups; ++$i) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphID = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = $startCharCode; $k <= $endCharCode; ++$k) { - $is32idx = floor($c / 8); - if ((isset($is32[$is32idx])) AND (($is32[$is32idx] & (1 << (7 - ($c % 8)))) == 0)) { - $c = $k; - } else { - // 32 bit format - // convert to decimal (http://www.unicode.org/faq//utf_bom.html#utf16-4) - //LEAD_OFFSET = (0xD800 - (0x10000 >> 10)) = 55232 - //SURROGATE_OFFSET = (0x10000 - (0xD800 << 10) - 0xDC00) = -56613888 - $c = ((55232 + ($k >> 10)) << 10) + (0xDC00 + ($k & 0x3FF)) -56613888; - } - $ctg[$c] = 0; - ++$startGlyphID; - } - } - break; - } - case 10: { // Format 10: Trimmed array - $offset += 10; // skip reserved, length and version/language - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $numChars = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $numChars; ++$k) { - $c = ($k + $startCharCode); - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $ctg[$c] = $g; - $offset += 2; - } - break; - } - case 12: { // Format 12: Segmented coverage - $offset += 10; // skip length and version/language - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $nGroups; ++$k) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($c = $startCharCode; $c <= $endCharCode; ++$c) { - $ctg[$c] = $startGlyphCode; - ++$startGlyphCode; - } - } - break; - } - case 13: { // Format 13: Many-to-one range mappings - // to be implemented ... - break; - } - case 14: { // Format 14: Unicode Variation Sequences - // to be implemented ... - break; - } - } - } - } - if (!isset($ctg[0])) { - $ctg[0] = 0; - } - // get xHeight (height of x) - $offset = ($table['glyf']['offset'] + $indexToLoc[$ctg[120]] + 4); - $yMin = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 4; - $yMax = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 2; - $fmetric['XHeight'] = round(($yMax - $yMin) * $urk); - // get CapHeight (height of H) - $offset = ($table['glyf']['offset'] + $indexToLoc[$ctg[72]] + 4); - $yMin = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 4; - $yMax = TCPDF_STATIC::_getFWORD($font, $offset); - $offset += 2; - $fmetric['CapHeight'] = round(($yMax - $yMin) * $urk); - // ceate widths array - $cw = array(); - $offset = $table['hmtx']['offset']; - for ($i = 0 ; $i < $numberOfHMetrics; ++$i) { - $cw[$i] = round(TCPDF_STATIC::_getUFWORD($font, $offset) * $urk); - $offset += 4; // skip lsb - } - if ($numberOfHMetrics < $numGlyphs) { - // fill missing widths with the last value - $cw = array_pad($cw, $numGlyphs, $cw[($numberOfHMetrics - 1)]); - } - $fmetric['MissingWidth'] = $cw[0]; - $fmetric['cw'] = ''; - $fmetric['cbbox'] = ''; - for ($cid = 0; $cid <= 65535; ++$cid) { - if (isset($ctg[$cid])) { - if (isset($cw[$ctg[$cid]])) { - $fmetric['cw'] .= ','.$cid.'=>'.$cw[$ctg[$cid]]; - } - if ($addcbbox AND isset($indexToLoc[$ctg[$cid]])) { - $offset = ($table['glyf']['offset'] + $indexToLoc[$ctg[$cid]]); - $xMin = round(TCPDF_STATIC::_getFWORD($font, $offset + 2) * $urk); - $yMin = round(TCPDF_STATIC::_getFWORD($font, $offset + 4) * $urk); - $xMax = round(TCPDF_STATIC::_getFWORD($font, $offset + 6) * $urk); - $yMax = round(TCPDF_STATIC::_getFWORD($font, $offset + 8) * $urk); - $fmetric['cbbox'] .= ','.$cid.'=>array('.$xMin.','.$yMin.','.$xMax.','.$yMax.')'; - } - } - } - } // end of true type - if (($fmetric['type'] == 'TrueTypeUnicode') AND (count($ctg) == 256)) { - $fmetric['type'] = 'TrueType'; - } - // ---------- create php font file ---------- - $pfile = '<'.'?'.'php'."\n"; - $pfile .= '// TCPDF FONT FILE DESCRIPTION'."\n"; - $pfile .= '$type=\''.$fmetric['type'].'\';'."\n"; - $pfile .= '$name=\''.$fmetric['name'].'\';'."\n"; - $pfile .= '$up='.$fmetric['underlinePosition'].';'."\n"; - $pfile .= '$ut='.$fmetric['underlineThickness'].';'."\n"; - if ($fmetric['MissingWidth'] > 0) { - $pfile .= '$dw='.$fmetric['MissingWidth'].';'."\n"; - } else { - $pfile .= '$dw='.$fmetric['AvgWidth'].';'."\n"; - } - $pfile .= '$diff=\''.$fmetric['diff'].'\';'."\n"; - if ($fmetric['type'] == 'Type1') { - // Type 1 - $pfile .= '$enc=\''.$fmetric['enc'].'\';'."\n"; - $pfile .= '$file=\''.$fmetric['file'].'\';'."\n"; - $pfile .= '$size1='.$fmetric['size1'].';'."\n"; - $pfile .= '$size2='.$fmetric['size2'].';'."\n"; - } else { - $pfile .= '$originalsize='.$fmetric['originalsize'].';'."\n"; - if ($fmetric['type'] == 'cidfont0') { - // CID-0 - switch ($fonttype) { - case 'CID0JP': { - $pfile .= '// Japanese'."\n"; - $pfile .= '$enc=\'UniJIS-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Japan1\',\'Supplement\'=>5);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_aj16.php\');'."\n"; - break; - } - case 'CID0KR': { - $pfile .= '// Korean'."\n"; - $pfile .= '$enc=\'UniKS-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Korea1\',\'Supplement\'=>0);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_ak12.php\');'."\n"; - break; - } - case 'CID0CS': { - $pfile .= '// Chinese Simplified'."\n"; - $pfile .= '$enc=\'UniGB-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'GB1\',\'Supplement\'=>2);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_ag15.php\');'."\n"; - break; - } - case 'CID0CT': - default: { - $pfile .= '// Chinese Traditional'."\n"; - $pfile .= '$enc=\'UniCNS-UTF16-H\';'."\n"; - $pfile .= '$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'CNS1\',\'Supplement\'=>0);'."\n"; - $pfile .= 'include(dirname(__FILE__).\'/uni2cid_aj16.php\');'."\n"; - break; - } - } - } else { - // TrueType - $pfile .= '$enc=\''.$fmetric['enc'].'\';'."\n"; - $pfile .= '$file=\''.$fmetric['file'].'\';'."\n"; - $pfile .= '$ctg=\''.$fmetric['ctg'].'\';'."\n"; - // create CIDToGIDMap - $cidtogidmap = str_pad('', 131072, "\x00"); // (256 * 256 * 2) = 131072 - foreach ($ctg as $cid => $gid) { - $cidtogidmap = self::updateCIDtoGIDmap($cidtogidmap, $cid, $ctg[$cid]); - } - // store compressed CIDToGIDMap - $fp = TCPDF_STATIC::fopenLocal($outpath.$fmetric['ctg'], 'wb'); - fwrite($fp, gzcompress($cidtogidmap)); - fclose($fp); - } - } - $pfile .= '$desc=array('; - $pfile .= '\'Flags\'=>'.$fmetric['Flags'].','; - $pfile .= '\'FontBBox\'=>\'['.$fmetric['bbox'].']\','; - $pfile .= '\'ItalicAngle\'=>'.$fmetric['italicAngle'].','; - $pfile .= '\'Ascent\'=>'.$fmetric['Ascent'].','; - $pfile .= '\'Descent\'=>'.$fmetric['Descent'].','; - $pfile .= '\'Leading\'=>'.$fmetric['Leading'].','; - $pfile .= '\'CapHeight\'=>'.$fmetric['CapHeight'].','; - $pfile .= '\'XHeight\'=>'.$fmetric['XHeight'].','; - $pfile .= '\'StemV\'=>'.$fmetric['StemV'].','; - $pfile .= '\'StemH\'=>'.$fmetric['StemH'].','; - $pfile .= '\'AvgWidth\'=>'.$fmetric['AvgWidth'].','; - $pfile .= '\'MaxWidth\'=>'.$fmetric['MaxWidth'].','; - $pfile .= '\'MissingWidth\'=>'.$fmetric['MissingWidth'].''; - $pfile .= ');'."\n"; - if (!empty($fmetric['cbbox'])) { - $pfile .= '$cbbox=array('.substr($fmetric['cbbox'], 1).');'."\n"; - } - $pfile .= '$cw=array('.substr($fmetric['cw'], 1).');'."\n"; - $pfile .= '// --- EOF ---'."\n"; - // store file - $fp = TCPDF_STATIC::fopenLocal($outpath.$font_name.'.php', 'w'); - fwrite($fp, $pfile); - fclose($fp); - // return TCPDF font name - return $font_name; - } - - /** - * Returs the checksum of a TTF table. - * @param string $table table to check - * @param int $length length of table in bytes - * @return int checksum - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getTTFtableChecksum($table, $length) { - $sum = 0; - $tlen = ($length / 4); - $offset = 0; - for ($i = 0; $i < $tlen; ++$i) { - $v = unpack('Ni', substr($table, $offset, 4)); - $sum += $v['i']; - $offset += 4; - } - $sum = unpack('Ni', pack('N', $sum)); - return $sum['i']; - } - - /** - * Returns a subset of the TrueType font data without the unused glyphs. - * @param string $font TrueType font data. - * @param array $subsetchars Array of used characters (the glyphs to keep). - * @return string A subset of TrueType font data without the unused glyphs. - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getTrueTypeFontSubset($font, $subsetchars) { - ksort($subsetchars); - $offset = 0; // offset position of the font data - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x10000) { - // sfnt version must be 0x00010000 for TrueType version 1.0. - return $font; - } - $c = 0; - $offset += 4; - // get number of tables - $numTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - // skip searchRange, entrySelector and rangeShift - $offset += 6; - // tables array - $table = array(); - // for each table - for ($i = 0; $i < $numTables; ++$i) { - // get table info - $tag = substr($font, $offset, 4); - $offset += 4; - $table[$tag] = array(); - $table[$tag]['checkSum'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $table[$tag]['length'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - // check magicNumber - $offset = $table['head']['offset'] + 12; - if (TCPDF_STATIC::_getULONG($font, $offset) != 0x5F0F3CF5) { - // magicNumber must be 0x5F0F3CF5 - return $font; - } - $offset += 4; - // get offset mode (indexToLocFormat : 0 = short, 1 = long) - $offset = $table['head']['offset'] + 50; - $short_offset = (TCPDF_STATIC::_getSHORT($font, $offset) == 0); - $offset += 2; - // get the offsets to the locations of the glyphs in the font, relative to the beginning of the glyphData table - $indexToLoc = array(); - $offset = $table['loca']['offset']; - if ($short_offset) { - // short version - $tot_num_glyphs = floor($table['loca']['length'] / 2); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getUSHORT($font, $offset) * 2; - $offset += 2; - } - } else { - // long version - $tot_num_glyphs = ($table['loca']['length'] / 4); // numGlyphs + 1 - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - $indexToLoc[$i] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - } - // get glyphs indexes of chars from cmap table - $subsetglyphs = array(); // glyph IDs on key - $subsetglyphs[0] = true; // character codes that do not correspond to any glyph in the font should be mapped to glyph index 0 - $offset = $table['cmap']['offset'] + 2; - $numEncodingTables = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables = array(); - for ($i = 0; $i < $numEncodingTables; ++$i) { - $encodingTables[$i]['platformID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['encodingID'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $encodingTables[$i]['offset'] = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - } - foreach ($encodingTables as $enctable) { - // get all platforms and encodings - $offset = $table['cmap']['offset'] + $enctable['offset']; - $format = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - switch ($format) { - case 0: { // Format 0: Byte encoding table - $offset += 4; // skip length and version/language - for ($c = 0; $c < 256; ++$c) { - if (isset($subsetchars[$c])) { - $g = TCPDF_STATIC::_getBYTE($font, $offset); - $subsetglyphs[$g] = true; - } - ++$offset; - } - break; - } - case 2: { // Format 2: High-byte mapping through table - $offset += 4; // skip length and version/language - $numSubHeaders = 0; - for ($i = 0; $i < 256; ++$i) { - // Array that maps high bytes to subHeaders: value is subHeader index * 8. - $subHeaderKeys[$i] = (TCPDF_STATIC::_getUSHORT($font, $offset) / 8); - $offset += 2; - if ($numSubHeaders < $subHeaderKeys[$i]) { - $numSubHeaders = $subHeaderKeys[$i]; - } - } - // the number of subHeaders is equal to the max of subHeaderKeys + 1 - ++$numSubHeaders; - // read subHeader structures - $subHeaders = array(); - $numGlyphIndexArray = 0; - for ($k = 0; $k < $numSubHeaders; ++$k) { - $subHeaders[$k]['firstCode'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['entryCount'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idDelta'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $subHeaders[$k]['idRangeOffset'] -= (2 + (($numSubHeaders - $k - 1) * 8)); - $subHeaders[$k]['idRangeOffset'] /= 2; - $numGlyphIndexArray += $subHeaders[$k]['entryCount']; - } - for ($k = 0; $k < $numGlyphIndexArray; ++$k) { - $glyphIndexArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($i = 0; $i < 256; ++$i) { - $k = $subHeaderKeys[$i]; - if ($k == 0) { - // one byte code - $c = $i; - if (isset($subsetchars[$c])) { - $g = $glyphIndexArray[0]; - $subsetglyphs[$g] = true; - } - } else { - // two bytes code - $start_byte = $subHeaders[$k]['firstCode']; - $end_byte = $start_byte + $subHeaders[$k]['entryCount']; - for ($j = $start_byte; $j < $end_byte; ++$j) { - // combine high and low bytes - $c = (($i << 8) + $j); - if (isset($subsetchars[$c])) { - $idRangeOffset = ($subHeaders[$k]['idRangeOffset'] + $j - $subHeaders[$k]['firstCode']); - $g = ($glyphIndexArray[$idRangeOffset] + $subHeaders[$k]['idDelta']) % 65536; - if ($g < 0) { - $g = 0; - } - $subsetglyphs[$g] = true; - } - } - } - } - break; - } - case 4: { // Format 4: Segment mapping to delta values - $length = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $offset += 2; // skip version/language - $segCount = floor(TCPDF_STATIC::_getUSHORT($font, $offset) / 2); - $offset += 2; - $offset += 6; // skip searchRange, entrySelector, rangeShift - $endCount = array(); // array of end character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $endCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $offset += 2; // skip reservedPad - $startCount = array(); // array of start character codes for each segment - for ($k = 0; $k < $segCount; ++$k) { - $startCount[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idDelta = array(); // delta for all character codes in segment - for ($k = 0; $k < $segCount; ++$k) { - $idDelta[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $idRangeOffset = array(); // Offsets into glyphIdArray or 0 - for ($k = 0; $k < $segCount; ++$k) { - $idRangeOffset[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - $gidlen = (floor($length / 2) - 8 - (4 * $segCount)); - $glyphIdArray = array(); // glyph index array - for ($k = 0; $k < $gidlen; ++$k) { - $glyphIdArray[$k] = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - } - for ($k = 0; $k < $segCount; ++$k) { - for ($c = $startCount[$k]; $c <= $endCount[$k]; ++$c) { - if (isset($subsetchars[$c])) { - if ($idRangeOffset[$k] == 0) { - $g = ($idDelta[$k] + $c) % 65536; - } else { - $gid = (floor($idRangeOffset[$k] / 2) + ($c - $startCount[$k]) - ($segCount - $k)); - $g = ($glyphIdArray[$gid] + $idDelta[$k]) % 65536; - } - if ($g < 0) { - $g = 0; - } - $subsetglyphs[$g] = true; - } - } - } - break; - } - case 6: { // Format 6: Trimmed table mapping - $offset += 4; // skip length and version/language - $firstCode = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $entryCount = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - for ($k = 0; $k < $entryCount; ++$k) { - $c = ($k + $firstCode); - if (isset($subsetchars[$c])) { - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $subsetglyphs[$g] = true; - } - $offset += 2; - } - break; - } - case 8: { // Format 8: Mixed 16-bit and 32-bit coverage - $offset += 10; // skip reserved, length and version/language - for ($k = 0; $k < 8192; ++$k) { - $is32[$k] = TCPDF_STATIC::_getBYTE($font, $offset); - ++$offset; - } - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($i = 0; $i < $nGroups; ++$i) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphID = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = $startCharCode; $k <= $endCharCode; ++$k) { - $is32idx = floor($c / 8); - if ((isset($is32[$is32idx])) AND (($is32[$is32idx] & (1 << (7 - ($c % 8)))) == 0)) { - $c = $k; - } else { - // 32 bit format - // convert to decimal (http://www.unicode.org/faq//utf_bom.html#utf16-4) - //LEAD_OFFSET = (0xD800 - (0x10000 >> 10)) = 55232 - //SURROGATE_OFFSET = (0x10000 - (0xD800 << 10) - 0xDC00) = -56613888 - $c = ((55232 + ($k >> 10)) << 10) + (0xDC00 + ($k & 0x3FF)) -56613888; - } - if (isset($subsetchars[$c])) { - $subsetglyphs[$startGlyphID] = true; - } - ++$startGlyphID; - } - } - break; - } - case 10: { // Format 10: Trimmed array - $offset += 10; // skip reserved, length and version/language - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $numChars = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $numChars; ++$k) { - $c = ($k + $startCharCode); - if (isset($subsetchars[$c])) { - $g = TCPDF_STATIC::_getUSHORT($font, $offset); - $subsetglyphs[$g] = true; - } - $offset += 2; - } - break; - } - case 12: { // Format 12: Segmented coverage - $offset += 10; // skip length and version/language - $nGroups = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($k = 0; $k < $nGroups; ++$k) { - $startCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $endCharCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - $startGlyphCode = TCPDF_STATIC::_getULONG($font, $offset); - $offset += 4; - for ($c = $startCharCode; $c <= $endCharCode; ++$c) { - if (isset($subsetchars[$c])) { - $subsetglyphs[$startGlyphCode] = true; - } - ++$startGlyphCode; - } - } - break; - } - case 13: { // Format 13: Many-to-one range mappings - // to be implemented ... - break; - } - case 14: { // Format 14: Unicode Variation Sequences - // to be implemented ... - break; - } - } - } - // include all parts of composite glyphs - $new_sga = $subsetglyphs; - while (!empty($new_sga)) { - $sga = $new_sga; - $new_sga = array(); - foreach ($sga as $key => $val) { - if (isset($indexToLoc[$key])) { - $offset = ($table['glyf']['offset'] + $indexToLoc[$key]); - $numberOfContours = TCPDF_STATIC::_getSHORT($font, $offset); - $offset += 2; - if ($numberOfContours < 0) { // composite glyph - $offset += 8; // skip xMin, yMin, xMax, yMax - do { - $flags = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - $glyphIndex = TCPDF_STATIC::_getUSHORT($font, $offset); - $offset += 2; - if (!isset($subsetglyphs[$glyphIndex])) { - // add missing glyphs - $new_sga[$glyphIndex] = true; - } - // skip some bytes by case - if ($flags & 1) { - $offset += 4; - } else { - $offset += 2; - } - if ($flags & 8) { - $offset += 2; - } elseif ($flags & 64) { - $offset += 4; - } elseif ($flags & 128) { - $offset += 8; - } - } while ($flags & 32); - } - } - } - $subsetglyphs += $new_sga; - } - // sort glyphs by key (and remove duplicates) - ksort($subsetglyphs); - // build new glyf and loca tables - $glyf = ''; - $loca = ''; - $offset = 0; - $glyf_offset = $table['glyf']['offset']; - for ($i = 0; $i < $tot_num_glyphs; ++$i) { - if (isset($subsetglyphs[$i])) { - $length = ($indexToLoc[($i + 1)] - $indexToLoc[$i]); - $glyf .= substr($font, ($glyf_offset + $indexToLoc[$i]), $length); - } else { - $length = 0; - } - if ($short_offset) { - $loca .= pack('n', floor($offset / 2)); - } else { - $loca .= pack('N', $offset); - } - $offset += $length; - } - // array of table names to preserve (loca and glyf tables will be added later) - // the cmap table is not needed and shall not be present, since the mapping from character codes to glyph descriptions is provided separately - $table_names = array ('head', 'hhea', 'hmtx', 'maxp', 'cvt ', 'fpgm', 'prep'); // minimum required table names - // get the tables to preserve - $offset = 12; - foreach ($table as $tag => $val) { - if (in_array($tag, $table_names)) { - $table[$tag]['data'] = substr($font, $table[$tag]['offset'], $table[$tag]['length']); - if ($tag == 'head') { - // set the checkSumAdjustment to 0 - $table[$tag]['data'] = substr($table[$tag]['data'], 0, 8)."\x0\x0\x0\x0".substr($table[$tag]['data'], 12); - } - $pad = 4 - ($table[$tag]['length'] % 4); - if ($pad != 4) { - // the length of a table must be a multiple of four bytes - $table[$tag]['length'] += $pad; - $table[$tag]['data'] .= str_repeat("\x0", $pad); - } - $table[$tag]['offset'] = $offset; - $offset += $table[$tag]['length']; - // check sum is not changed (so keep the following line commented) - //$table[$tag]['checkSum'] = self::_getTTFtableChecksum($table[$tag]['data'], $table[$tag]['length']); - } else { - unset($table[$tag]); - } - } - // add loca - $table['loca']['data'] = $loca; - $table['loca']['length'] = strlen($loca); - $pad = 4 - ($table['loca']['length'] % 4); - if ($pad != 4) { - // the length of a table must be a multiple of four bytes - $table['loca']['length'] += $pad; - $table['loca']['data'] .= str_repeat("\x0", $pad); - } - $table['loca']['offset'] = $offset; - $table['loca']['checkSum'] = self::_getTTFtableChecksum($table['loca']['data'], $table['loca']['length']); - $offset += $table['loca']['length']; - // add glyf - $table['glyf']['data'] = $glyf; - $table['glyf']['length'] = strlen($glyf); - $pad = 4 - ($table['glyf']['length'] % 4); - if ($pad != 4) { - // the length of a table must be a multiple of four bytes - $table['glyf']['length'] += $pad; - $table['glyf']['data'] .= str_repeat("\x0", $pad); - } - $table['glyf']['offset'] = $offset; - $table['glyf']['checkSum'] = self::_getTTFtableChecksum($table['glyf']['data'], $table['glyf']['length']); - // rebuild font - $font = ''; - $font .= pack('N', 0x10000); // sfnt version - $numTables = count($table); - $font .= pack('n', $numTables); // numTables - $entrySelector = floor(log($numTables, 2)); - $searchRange = pow(2, $entrySelector) * 16; - $rangeShift = ($numTables * 16) - $searchRange; - $font .= pack('n', $searchRange); // searchRange - $font .= pack('n', $entrySelector); // entrySelector - $font .= pack('n', $rangeShift); // rangeShift - $offset = ($numTables * 16); - foreach ($table as $tag => $data) { - $font .= $tag; // tag - $font .= pack('N', $data['checkSum']); // checkSum - $font .= pack('N', ($data['offset'] + $offset)); // offset - $font .= pack('N', $data['length']); // length - } - foreach ($table as $data) { - $font .= $data['data']; - } - // set checkSumAdjustment on head table - $checkSumAdjustment = 0xB1B0AFBA - self::_getTTFtableChecksum($font, strlen($font)); - $font = substr($font, 0, $table['head']['offset'] + 8).pack('N', $checkSumAdjustment).substr($font, $table['head']['offset'] + 12); - return $font; - } - - /** - * Outputs font widths - * @param array $font font data - * @param int $cidoffset offset for CID values - * @return string PDF command string for font widths - * @author Nicola Asuni - * @since 4.4.000 (2008-12-07) - * @public static - */ - public static function _putfontwidths($font, $cidoffset=0) { - ksort($font['cw']); - $rangeid = 0; - $range = array(); - $prevcid = -2; - $prevwidth = -1; - $interval = false; - // for each character - foreach ($font['cw'] as $cid => $width) { - $cid -= $cidoffset; - if ($font['subset'] AND (!isset($font['subsetchars'][$cid]))) { - // ignore the unused characters (font subsetting) - continue; - } - if ($width != $font['dw']) { - if ($cid == ($prevcid + 1)) { - // consecutive CID - if ($width == $prevwidth) { - if ($width == $range[$rangeid][0]) { - $range[$rangeid][] = $width; - } else { - array_pop($range[$rangeid]); - // new range - $rangeid = $prevcid; - $range[$rangeid] = array(); - $range[$rangeid][] = $prevwidth; - $range[$rangeid][] = $width; - } - $interval = true; - $range[$rangeid]['interval'] = true; - } else { - if ($interval) { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - } else { - $range[$rangeid][] = $width; - } - $interval = false; - } - } else { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - $interval = false; - } - $prevcid = $cid; - $prevwidth = $width; - } - } - // optimize ranges - $prevk = -1; - $nextk = -1; - $prevint = false; - foreach ($range as $k => $ws) { - $cws = count($ws); - if (($k == $nextk) AND (!$prevint) AND ((!isset($ws['interval'])) OR ($cws < 4))) { - if (isset($range[$k]['interval'])) { - unset($range[$k]['interval']); - } - $range[$prevk] = array_merge($range[$prevk], $range[$k]); - unset($range[$k]); - } else { - $prevk = $k; - } - $nextk = $k + $cws; - if (isset($ws['interval'])) { - if ($cws > 3) { - $prevint = true; - } else { - $prevint = false; - } - if (isset($range[$k]['interval'])) { - unset($range[$k]['interval']); - } - --$nextk; - } else { - $prevint = false; - } - } - // output data - $w = ''; - foreach ($range as $k => $ws) { - if (count(array_count_values($ws)) == 1) { - // interval mode is more compact - $w .= ' '.$k.' '.($k + count($ws) - 1).' '.$ws[0]; - } else { - // range mode - $w .= ' '.$k.' [ '.implode(' ', $ws).' ]'; - } - } - return '/W ['.$w.' ]'; - } - - - - - /** - * Update the CIDToGIDMap string with a new value. - * @param string $map CIDToGIDMap. - * @param int $cid CID value. - * @param int $gid GID value. - * @return string CIDToGIDMap. - * @author Nicola Asuni - * @since 5.9.123 (2011-09-29) - * @public static - */ - public static function updateCIDtoGIDmap($map, $cid, $gid) { - if (($cid >= 0) AND ($cid <= 0xFFFF) AND ($gid >= 0)) { - if ($gid > 0xFFFF) { - $gid -= 0x10000; - } - $map[($cid * 2)] = chr($gid >> 8); - $map[(($cid * 2) + 1)] = chr($gid & 0xFF); - } - return $map; - } - - /** - * Return fonts path - * @return string - * @public static - */ - public static function _getfontpath() { - if (!defined('K_PATH_FONTS') AND is_dir($fdir = realpath(dirname(__FILE__).'/../fonts'))) { - if (substr($fdir, -1) != '/') { - $fdir .= '/'; - } - define('K_PATH_FONTS', $fdir); - } - return defined('K_PATH_FONTS') ? K_PATH_FONTS : ''; - } - - - - /** - * Return font full path - * @param string $file Font file name. - * @param string $fontdir Font directory (set to false fto search on default directories) - * @return string Font full path or empty string - * @author Nicola Asuni - * @since 6.0.025 - * @public static - */ - public static function getFontFullPath($file, $fontdir=false) { - $fontfile = ''; - // search files on various directories - if (($fontdir !== false) AND @TCPDF_STATIC::file_exists($fontdir.$file)) { - $fontfile = $fontdir.$file; - } elseif (@TCPDF_STATIC::file_exists(self::_getfontpath().$file)) { - $fontfile = self::_getfontpath().$file; - } elseif (@TCPDF_STATIC::file_exists($file)) { - $fontfile = $file; - } - return $fontfile; - } - - - - - /** - * Get a reference font size. - * @param string $size String containing font size value. - * @param float $refsize Reference font size in points. - * @return float value in points - * @public static - */ - public static function getFontRefSize($size, $refsize=12) { - switch ($size) { - case 'xx-small': { - $size = ($refsize - 4); - break; - } - case 'x-small': { - $size = ($refsize - 3); - break; - } - case 'small': { - $size = ($refsize - 2); - break; - } - case 'medium': { - $size = $refsize; - break; - } - case 'large': { - $size = ($refsize + 2); - break; - } - case 'x-large': { - $size = ($refsize + 4); - break; - } - case 'xx-large': { - $size = ($refsize + 6); - break; - } - case 'smaller': { - $size = ($refsize - 3); - break; - } - case 'larger': { - $size = ($refsize + 3); - break; - } - } - return $size; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// ==================================================================================================================== -// REIMPLEMENTED -// ==================================================================================================================== - - - - - - - - - /** - * Returns the unicode caracter specified by the value - * @param int $c UTF-8 value - * @param boolean $unicode True if we are in unicode mode, false otherwise. - * @return string Returns the specified character. - * @since 2.3.000 (2008-03-05) - * @public static - */ - public static function unichr($c, $unicode=true) { - $c = intval($c); - if (!$unicode) { - return chr($c); - } elseif ($c <= 0x7F) { - // one byte - return chr($c); - } elseif ($c <= 0x7FF) { - // two bytes - return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); - } elseif ($c <= 0xFFFF) { - // three bytes - return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); - } elseif ($c <= 0x10FFFF) { - // four bytes - return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); - } else { - return ''; - } - } - - /** - * Returns the unicode caracter specified by UTF-8 value - * @param int $c UTF-8 value - * @return string Returns the specified character. - * @public static - */ - public static function unichrUnicode($c) { - return self::unichr($c, true); - } - - /** - * Returns the unicode caracter specified by ASCII value - * @param int $c UTF-8 value - * @return string Returns the specified character. - * @public static - */ - public static function unichrASCII($c) { - return self::unichr($c, false); - } - - /** - * Converts array of UTF-8 characters to UTF16-BE string.
    - * Based on: http://www.faqs.org/rfcs/rfc2781.html - *
    -	 *   Encoding UTF-16:
    -	 *
    -	 *   Encoding of a single character from an ISO 10646 character value to
    -	 *    UTF-16 proceeds as follows. Let U be the character number, no greater
    -	 *    than 0x10FFFF.
    -	 *
    -	 *    1) If U < 0x10000, encode U as a 16-bit unsigned integer and
    -	 *       terminate.
    -	 *
    -	 *    2) Let U' = U - 0x10000. Because U is less than or equal to 0x10FFFF,
    -	 *       U' must be less than or equal to 0xFFFFF. That is, U' can be
    -	 *       represented in 20 bits.
    -	 *
    -	 *    3) Initialize two 16-bit unsigned integers, W1 and W2, to 0xD800 and
    -	 *       0xDC00, respectively. These integers each have 10 bits free to
    -	 *       encode the character value, for a total of 20 bits.
    -	 *
    -	 *    4) Assign the 10 high-order bits of the 20-bit U' to the 10 low-order
    -	 *       bits of W1 and the 10 low-order bits of U' to the 10 low-order
    -	 *       bits of W2. Terminate.
    -	 *
    -	 *    Graphically, steps 2 through 4 look like:
    -	 *    U' = yyyyyyyyyyxxxxxxxxxx
    -	 *    W1 = 110110yyyyyyyyyy
    -	 *    W2 = 110111xxxxxxxxxx
    -	 * 
    - * @param array $unicode array containing UTF-8 unicode values - * @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF) - * @return string - * @protected - * @author Nicola Asuni - * @since 2.1.000 (2008-01-08) - * @public static - */ - public static function arrUTF8ToUTF16BE($unicode, $setbom=false) { - $outstr = ''; // string to be returned - if ($setbom) { - $outstr .= "\xFE\xFF"; // Byte Order Mark (BOM) - } - foreach ($unicode as $char) { - if ($char == 0x200b) { - // skip Unicode Character 'ZERO WIDTH SPACE' (DEC:8203, U+200B) - } elseif ($char == 0xFFFD) { - $outstr .= "\xFF\xFD"; // replacement character - } elseif ($char < 0x10000) { - $outstr .= chr($char >> 0x08); - $outstr .= chr($char & 0xFF); - } else { - $char -= 0x10000; - $w1 = 0xD800 | ($char >> 0x0a); - $w2 = 0xDC00 | ($char & 0x3FF); - $outstr .= chr($w1 >> 0x08); - $outstr .= chr($w1 & 0xFF); - $outstr .= chr($w2 >> 0x08); - $outstr .= chr($w2 & 0xFF); - } - } - return $outstr; - } - - /** - * Convert an array of UTF8 values to array of unicode characters - * @param array $ta The input array of UTF8 values. - * @param boolean $isunicode True for Unicode mode, false otherwise. - * @return array Return array of unicode characters - * @since 4.5.037 (2009-04-07) - * @public static - */ - public static function UTF8ArrayToUniArray($ta, $isunicode=true) { - if ($isunicode) { - return array_map(array('TCPDF_FONTS', 'unichrUnicode'), $ta); - } - return array_map(array('TCPDF_FONTS', 'unichrASCII'), $ta); - } - - /** - * Extract a slice of the $strarr array and return it as string. - * @param string[] $strarr The input array of characters. - * @param int $start the starting element of $strarr. - * @param int $end first element that will not be returned. - * @param boolean $unicode True if we are in unicode mode, false otherwise. - * @return string Return part of a string - * @public static - */ - public static function UTF8ArrSubString($strarr, $start='', $end='', $unicode=true) { - if (strlen($start) == 0) { - $start = 0; - } - if (strlen($end) == 0) { - $end = count($strarr); - } - $string = ''; - for ($i = $start; $i < $end; ++$i) { - $string .= self::unichr($strarr[$i], $unicode); - } - return $string; - } - - /** - * Extract a slice of the $uniarr array and return it as string. - * @param string[] $uniarr The input array of characters. - * @param int $start the starting element of $strarr. - * @param int $end first element that will not be returned. - * @return string Return part of a string - * @since 4.5.037 (2009-04-07) - * @public static - */ - public static function UniArrSubString($uniarr, $start='', $end='') { - if (strlen($start) == 0) { - $start = 0; - } - if (strlen($end) == 0) { - $end = count($uniarr); - } - $string = ''; - for ($i=$start; $i < $end; ++$i) { - $string .= $uniarr[$i]; - } - return $string; - } - - /** - * Converts UTF-8 characters array to array of Latin1 characters array
    - * @param array $unicode array containing UTF-8 unicode values - * @return array - * @author Nicola Asuni - * @since 4.8.023 (2010-01-15) - * @public static - */ - public static function UTF8ArrToLatin1Arr($unicode) { - $outarr = array(); // array to be returned - foreach ($unicode as $char) { - if ($char < 256) { - $outarr[] = $char; - } elseif (array_key_exists($char, TCPDF_FONT_DATA::$uni_utf8tolatin)) { - // map from UTF-8 - $outarr[] = TCPDF_FONT_DATA::$uni_utf8tolatin[$char]; - } elseif ($char == 0xFFFD) { - // skip - } else { - $outarr[] = 63; // '?' character - } - } - return $outarr; - } - - /** - * Converts UTF-8 characters array to Latin1 string
    - * @param array $unicode array containing UTF-8 unicode values - * @return string - * @author Nicola Asuni - * @since 4.8.023 (2010-01-15) - * @public static - */ - public static function UTF8ArrToLatin1($unicode) { - $outstr = ''; // string to be returned - foreach ($unicode as $char) { - if ($char < 256) { - $outstr .= chr($char); - } elseif (array_key_exists($char, TCPDF_FONT_DATA::$uni_utf8tolatin)) { - // map from UTF-8 - $outstr .= chr(TCPDF_FONT_DATA::$uni_utf8tolatin[$char]); - } elseif ($char == 0xFFFD) { - // skip - } else { - $outstr .= '?'; - } - } - return $outstr; - } - - /** - * Converts UTF-8 character to integer value.
    - * Uses the getUniord() method if the value is not cached. - * @param string $uch character string to process. - * @return int Unicode value - * @public static - */ - public static function uniord($uch) { - if (!isset(self::$cache_uniord[$uch])) { - self::$cache_uniord[$uch] = self::getUniord($uch); - } - return self::$cache_uniord[$uch]; - } - - /** - * Converts UTF-8 character to integer value.
    - * Invalid byte sequences will be replaced with 0xFFFD (replacement character)
    - * Based on: http://www.faqs.org/rfcs/rfc3629.html - *
    -	 *    Char. number range  |        UTF-8 octet sequence
    -	 *       (hexadecimal)    |              (binary)
    -	 *    --------------------+-----------------------------------------------
    -	 *    0000 0000-0000 007F | 0xxxxxxx
    -	 *    0000 0080-0000 07FF | 110xxxxx 10xxxxxx
    -	 *    0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
    -	 *    0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
    -	 *    ---------------------------------------------------------------------
    -	 *
    -	 *   ABFN notation:
    -	 *   ---------------------------------------------------------------------
    -	 *   UTF8-octets = *( UTF8-char )
    -	 *   UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
    -	 *   UTF8-1      = %x00-7F
    -	 *   UTF8-2      = %xC2-DF UTF8-tail
    -	 *
    -	 *   UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
    -	 *                 %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
    -	 *   UTF8-4      = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
    -	 *                 %xF4 %x80-8F 2( UTF8-tail )
    -	 *   UTF8-tail   = %x80-BF
    -	 *   ---------------------------------------------------------------------
    -	 * 
    - * @param string $uch character string to process. - * @return int Unicode value - * @author Nicola Asuni - * @public static - */ - public static function getUniord($uch) { - if (function_exists('mb_convert_encoding')) { - list(, $char) = @unpack('N', mb_convert_encoding($uch, 'UCS-4BE', 'UTF-8')); - if ($char >= 0) { - return $char; - } - } - $bytes = array(); // array containing single character byte sequences - $countbytes = 0; - $numbytes = 1; // number of octetc needed to represent the UTF-8 character - $length = strlen($uch); - for ($i = 0; $i < $length; ++$i) { - $char = ord($uch[$i]); // get one string character at time - if ($countbytes == 0) { // get starting octect - if ($char <= 0x7F) { - return $char; // use the character "as is" because is ASCII - } elseif (($char >> 0x05) == 0x06) { // 2 bytes character (0x06 = 110 BIN) - $bytes[] = ($char - 0xC0) << 0x06; - ++$countbytes; - $numbytes = 2; - } elseif (($char >> 0x04) == 0x0E) { // 3 bytes character (0x0E = 1110 BIN) - $bytes[] = ($char - 0xE0) << 0x0C; - ++$countbytes; - $numbytes = 3; - } elseif (($char >> 0x03) == 0x1E) { // 4 bytes character (0x1E = 11110 BIN) - $bytes[] = ($char - 0xF0) << 0x12; - ++$countbytes; - $numbytes = 4; - } else { - // use replacement character for other invalid sequences - return 0xFFFD; - } - } elseif (($char >> 0x06) == 0x02) { // bytes 2, 3 and 4 must start with 0x02 = 10 BIN - $bytes[] = $char - 0x80; - ++$countbytes; - if ($countbytes == $numbytes) { - // compose UTF-8 bytes to a single unicode value - $char = $bytes[0]; - for ($j = 1; $j < $numbytes; ++$j) { - $char += ($bytes[$j] << (($numbytes - $j - 1) * 0x06)); - } - if ((($char >= 0xD800) AND ($char <= 0xDFFF)) OR ($char >= 0x10FFFF)) { - // The definition of UTF-8 prohibits encoding character numbers between - // U+D800 and U+DFFF, which are reserved for use with the UTF-16 - // encoding form (as surrogate pairs) and do not directly represent - // characters. - return 0xFFFD; // use replacement character - } else { - return $char; - } - } - } else { - // use replacement character for other invalid sequences - return 0xFFFD; - } - } - return 0xFFFD; - } - - /** - * Converts UTF-8 strings to codepoints array.
    - * Invalid byte sequences will be replaced with 0xFFFD (replacement character)
    - * @param string $str string to process. - * @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise. - * @param array $currentfont Reference to current font array. - * @return array containing codepoints (UTF-8 characters values) - * @author Nicola Asuni - * @public static - */ - public static function UTF8StringToArray($str, $isunicode, &$currentfont) { - if ($isunicode) { - // requires PCRE unicode support turned on - $chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY); - $carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars); - } else { - $chars = str_split($str); - $carr = array_map('ord', $chars); - } - if (is_array($currentfont['subsetchars']) && is_array($carr)) { - $currentfont['subsetchars'] += array_fill_keys($carr, true); - } else { - $currentfont['subsetchars'] = array_merge($currentfont['subsetchars'], $carr); - } - return $carr; - } - - /** - * Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.
    - * @param string $str string to process. - * @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise. - * @param array $currentfont Reference to current font array. - * @return string - * @since 3.2.000 (2008-06-23) - * @public static - */ - public static function UTF8ToLatin1($str, $isunicode, &$currentfont) { - $unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values - return self::UTF8ArrToLatin1($unicode); - } - - /** - * Converts UTF-8 strings to UTF16-BE.
    - * @param string $str string to process. - * @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF) - * @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise. - * @param array $currentfont Reference to current font array. - * @return string - * @author Nicola Asuni - * @since 1.53.0.TC005 (2005-01-05) - * @public static - */ - public static function UTF8ToUTF16BE($str, $setbom, $isunicode, &$currentfont) { - if (!$isunicode) { - return $str; // string is not in unicode - } - $unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values - return self::arrUTF8ToUTF16BE($unicode, $setbom); - } - - /** - * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). - * @param string $str string to manipulate. - * @param bool $setbom if true set the Byte Order Mark (BOM = 0xFEFF) - * @param bool $forcertl if true forces RTL text direction - * @param boolean $isunicode True if the document is in Unicode mode, false otherwise. - * @param array $currentfont Reference to current font array. - * @return string - * @author Nicola Asuni - * @since 2.1.000 (2008-01-08) - * @public static - */ - public static function utf8StrRev($str, $setbom, $forcertl, $isunicode, &$currentfont) { - return self::utf8StrArrRev(self::UTF8StringToArray($str, $isunicode, $currentfont), $str, $setbom, $forcertl, $isunicode, $currentfont); - } - - /** - * Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). - * @param array $arr array of unicode values. - * @param string $str string to manipulate (or empty value). - * @param bool $setbom if true set the Byte Order Mark (BOM = 0xFEFF) - * @param bool $forcertl if true forces RTL text direction - * @param boolean $isunicode True if the document is in Unicode mode, false otherwise. - * @param array $currentfont Reference to current font array. - * @return string - * @author Nicola Asuni - * @since 4.9.000 (2010-03-27) - * @public static - */ - public static function utf8StrArrRev($arr, $str, $setbom, $forcertl, $isunicode, &$currentfont) { - return self::arrUTF8ToUTF16BE(self::utf8Bidi($arr, $str, $forcertl, $isunicode, $currentfont), $setbom); - } - - /** - * Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/). - * @param array $ta array of characters composing the string. - * @param string $str string to process - * @param bool $forcertl if 'R' forces RTL, if 'L' forces LTR - * @param boolean $isunicode True if the document is in Unicode mode, false otherwise. - * @param array $currentfont Reference to current font array. - * @return array of unicode chars - * @author Nicola Asuni - * @since 2.4.000 (2008-03-06) - * @public static - */ - public static function utf8Bidi($ta, $str, $forcertl, $isunicode, &$currentfont) { - // paragraph embedding level - $pel = 0; - // max level - $maxlevel = 0; - if (TCPDF_STATIC::empty_string($str)) { - // create string from array - $str = self::UTF8ArrSubString($ta, '', '', $isunicode); - } - // check if string contains arabic text - if (preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $str)) { - $arabic = true; - } else { - $arabic = false; - } - // check if string contains RTL text - if (!($forcertl OR $arabic OR preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $str))) { - return $ta; - } - - // get number of chars - $numchars = count($ta); - - if ($forcertl == 'R') { - $pel = 1; - } elseif ($forcertl == 'L') { - $pel = 0; - } else { - // P2. In each paragraph, find the first character of type L, AL, or R. - // P3. If a character is found in P2 and it is of type AL or R, then set the paragraph embedding level to one; otherwise, set it to zero. - for ($i=0; $i < $numchars; ++$i) { - $type = TCPDF_FONT_DATA::$uni_type[$ta[$i]]; - if ($type == 'L') { - $pel = 0; - break; - } elseif (($type == 'AL') OR ($type == 'R')) { - $pel = 1; - break; - } - } - } - - // Current Embedding Level - $cel = $pel; - // directional override status - $dos = 'N'; - $remember = array(); - // start-of-level-run - $sor = $pel % 2 ? 'R' : 'L'; - $eor = $sor; - - // Array of characters data - $chardata = Array(); - - // X1. Begin by setting the current embedding level to the paragraph embedding level. Set the directional override status to neutral. Process each character iteratively, applying rules X2 through X9. Only embedding levels from 0 to 61 are valid in this phase. - // In the resolution of levels in rules I1 and I2, the maximum embedding level of 62 can be reached. - for ($i=0; $i < $numchars; ++$i) { - if ($ta[$i] == TCPDF_FONT_DATA::$uni_RLE) { - // X2. With each RLE, compute the least greater odd embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + ($cel % 2) + 1; - if ($next_level < 62) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_RLE, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'N'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_LRE) { - // X3. With each LRE, compute the least greater even embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + 2 - ($cel % 2); - if ( $next_level < 62 ) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_LRE, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'N'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_RLO) { - // X4. With each RLO, compute the least greater odd embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to right-to-left. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + ($cel % 2) + 1; - if ($next_level < 62) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_RLO, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'R'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_LRO) { - // X5. With each LRO, compute the least greater even embedding level. - // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to left-to-right. - // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. - $next_level = $cel + 2 - ($cel % 2); - if ( $next_level < 62 ) { - $remember[] = array('num' => TCPDF_FONT_DATA::$uni_LRO, 'cel' => $cel, 'dos' => $dos); - $cel = $next_level; - $dos = 'L'; - $sor = $eor; - $eor = $cel % 2 ? 'R' : 'L'; - } - } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_PDF) { - // X7. With each PDF, determine the matching embedding or override code. If there was a valid matching code, restore (pop) the last remembered (pushed) embedding level and directional override. - if (count($remember)) { - $last = count($remember ) - 1; - if (($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_RLE) OR - ($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_LRE) OR - ($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_RLO) OR - ($remember[$last]['num'] == TCPDF_FONT_DATA::$uni_LRO)) { - $match = array_pop($remember); - $cel = $match['cel']; - $dos = $match['dos']; - $sor = $eor; - $eor = ($cel > $match['cel'] ? $cel : $match['cel']) % 2 ? 'R' : 'L'; - } - } - } elseif (($ta[$i] != TCPDF_FONT_DATA::$uni_RLE) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_LRE) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_RLO) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_LRO) AND - ($ta[$i] != TCPDF_FONT_DATA::$uni_PDF)) { - // X6. For all types besides RLE, LRE, RLO, LRO, and PDF: - // a. Set the level of the current character to the current embedding level. - // b. Whenever the directional override status is not neutral, reset the current character type to the directional override status. - if ($dos != 'N') { - $chardir = $dos; - } else { - if (isset(TCPDF_FONT_DATA::$uni_type[$ta[$i]])) { - $chardir = TCPDF_FONT_DATA::$uni_type[$ta[$i]]; - } else { - $chardir = 'L'; - } - } - // stores string characters and other information - $chardata[] = array('char' => $ta[$i], 'level' => $cel, 'type' => $chardir, 'sor' => $sor, 'eor' => $eor); - } - } // end for each char - - // X8. All explicit directional embeddings and overrides are completely terminated at the end of each paragraph. Paragraph separators are not included in the embedding. - // X9. Remove all RLE, LRE, RLO, LRO, PDF, and BN codes. - // X10. The remaining rules are applied to each run of characters at the same level. For each run, determine the start-of-level-run (sor) and end-of-level-run (eor) type, either L or R. This depends on the higher of the two levels on either side of the boundary (at the start or end of the paragraph, the level of the 'other' run is the base embedding level). If the higher level is odd, the type is R; otherwise, it is L. - - // 3.3.3 Resolving Weak Types - // Weak types are now resolved one level run at a time. At level run boundaries where the type of the character on the other side of the boundary is required, the type assigned to sor or eor is used. - // Nonspacing marks are now resolved based on the previous characters. - $numchars = count($chardata); - - // W1. Examine each nonspacing mark (NSM) in the level run, and change the type of the NSM to the type of the previous character. If the NSM is at the start of the level run, it will get the type of sor. - $prevlevel = -1; // track level changes - $levcount = 0; // counts consecutive chars at the same level - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['type'] == 'NSM') { - if ($levcount) { - $chardata[$i]['type'] = $chardata[$i]['sor']; - } elseif ($i > 0) { - $chardata[$i]['type'] = $chardata[($i-1)]['type']; - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sor) is found. If an AL is found, change the type of the European number to Arabic number. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['char'] == 'EN') { - for ($j=$levcount; $j >= 0; $j--) { - if ($chardata[$j]['type'] == 'AL') { - $chardata[$i]['type'] = 'AN'; - } elseif (($chardata[$j]['type'] == 'L') OR ($chardata[$j]['type'] == 'R')) { - break; - } - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W3. Change all ALs to R. - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['type'] == 'AL') { - $chardata[$i]['type'] = 'R'; - } - } - - // W4. A single European separator between two European numbers changes to a European number. A single common separator between two numbers of the same type changes to that type. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) { - if (($chardata[$i]['type'] == 'ES') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) { - $chardata[$i]['type'] = 'EN'; - } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'EN') AND ($chardata[($i+1)]['type'] == 'EN')) { - $chardata[$i]['type'] = 'EN'; - } elseif (($chardata[$i]['type'] == 'CS') AND ($chardata[($i-1)]['type'] == 'AN') AND ($chardata[($i+1)]['type'] == 'AN')) { - $chardata[$i]['type'] = 'AN'; - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W5. A sequence of European terminators adjacent to European numbers changes to all European numbers. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['type'] == 'ET') { - if (($levcount > 0) AND ($chardata[($i-1)]['type'] == 'EN')) { - $chardata[$i]['type'] = 'EN'; - } else { - $j = $i+1; - while (($j < $numchars) AND ($chardata[$j]['level'] == $prevlevel)) { - if ($chardata[$j]['type'] == 'EN') { - $chardata[$i]['type'] = 'EN'; - break; - } elseif ($chardata[$j]['type'] != 'ET') { - break; - } - ++$j; - } - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // W6. Otherwise, separators and terminators change to Other Neutral. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if (($chardata[$i]['type'] == 'ET') OR ($chardata[$i]['type'] == 'ES') OR ($chardata[$i]['type'] == 'CS')) { - $chardata[$i]['type'] = 'ON'; - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - //W7. Search backward from each instance of a European number until the first strong type (R, L, or sor) is found. If an L is found, then change the type of the European number to L. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['char'] == 'EN') { - for ($j=$levcount; $j >= 0; $j--) { - if ($chardata[$j]['type'] == 'L') { - $chardata[$i]['type'] = 'L'; - } elseif ($chardata[$j]['type'] == 'R') { - break; - } - } - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // N1. A sequence of neutrals takes the direction of the surrounding strong text if the text on both sides has the same direction. European and Arabic numbers act as if they were R in terms of their influence on neutrals. Start-of-level-run (sor) and end-of-level-run (eor) are used at level run boundaries. - $prevlevel = -1; - $levcount = 0; - for ($i=0; $i < $numchars; ++$i) { - if (($levcount > 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) { - if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) { - $chardata[$i]['type'] = 'L'; - } elseif (($chardata[$i]['type'] == 'N') AND - (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND - (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) { - $chardata[$i]['type'] = 'R'; - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - } elseif (($levcount == 0) AND (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] == $prevlevel)) { - // first char - if (($chardata[$i]['type'] == 'N') AND ($chardata[$i]['sor'] == 'L') AND ($chardata[($i+1)]['type'] == 'L')) { - $chardata[$i]['type'] = 'L'; - } elseif (($chardata[$i]['type'] == 'N') AND - (($chardata[$i]['sor'] == 'R') OR ($chardata[$i]['sor'] == 'EN') OR ($chardata[$i]['sor'] == 'AN')) AND - (($chardata[($i+1)]['type'] == 'R') OR ($chardata[($i+1)]['type'] == 'EN') OR ($chardata[($i+1)]['type'] == 'AN'))) { - $chardata[$i]['type'] = 'R'; - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - } elseif (($levcount > 0) AND ((($i+1) == $numchars) OR (($i+1) < $numchars) AND ($chardata[($i+1)]['level'] != $prevlevel))) { - //last char - if (($chardata[$i]['type'] == 'N') AND ($chardata[($i-1)]['type'] == 'L') AND ($chardata[$i]['eor'] == 'L')) { - $chardata[$i]['type'] = 'L'; - } elseif (($chardata[$i]['type'] == 'N') AND - (($chardata[($i-1)]['type'] == 'R') OR ($chardata[($i-1)]['type'] == 'EN') OR ($chardata[($i-1)]['type'] == 'AN')) AND - (($chardata[$i]['eor'] == 'R') OR ($chardata[$i]['eor'] == 'EN') OR ($chardata[$i]['eor'] == 'AN'))) { - $chardata[$i]['type'] = 'R'; - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - } elseif ($chardata[$i]['type'] == 'N') { - // N2. Any remaining neutrals take the embedding direction - $chardata[$i]['type'] = $chardata[$i]['sor']; - } - if ($chardata[$i]['level'] != $prevlevel) { - $levcount = 0; - } else { - ++$levcount; - } - $prevlevel = $chardata[$i]['level']; - } - - // I1. For all characters with an even (left-to-right) embedding direction, those of type R go up one level and those of type AN or EN go up two levels. - // I2. For all characters with an odd (right-to-left) embedding direction, those of type L, EN or AN go up one level. - for ($i=0; $i < $numchars; ++$i) { - $odd = $chardata[$i]['level'] % 2; - if ($odd) { - if (($chardata[$i]['type'] == 'L') OR ($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) { - $chardata[$i]['level'] += 1; - } - } else { - if ($chardata[$i]['type'] == 'R') { - $chardata[$i]['level'] += 1; - } elseif (($chardata[$i]['type'] == 'AN') OR ($chardata[$i]['type'] == 'EN')) { - $chardata[$i]['level'] += 2; - } - } - $maxlevel = max($chardata[$i]['level'],$maxlevel); - } - - // L1. On each line, reset the embedding level of the following characters to the paragraph embedding level: - // 1. Segment separators, - // 2. Paragraph separators, - // 3. Any sequence of whitespace characters preceding a segment separator or paragraph separator, and - // 4. Any sequence of white space characters at the end of the line. - for ($i=0; $i < $numchars; ++$i) { - if (($chardata[$i]['type'] == 'B') OR ($chardata[$i]['type'] == 'S')) { - $chardata[$i]['level'] = $pel; - } elseif ($chardata[$i]['type'] == 'WS') { - $j = $i+1; - while ($j < $numchars) { - if ((($chardata[$j]['type'] == 'B') OR ($chardata[$j]['type'] == 'S')) OR - (($j == ($numchars-1)) AND ($chardata[$j]['type'] == 'WS'))) { - $chardata[$i]['level'] = $pel; - break; - } elseif ($chardata[$j]['type'] != 'WS') { - break; - } - ++$j; - } - } - } - - // Arabic Shaping - // Cursively connected scripts, such as Arabic or Syriac, require the selection of positional character shapes that depend on adjacent characters. Shaping is logically applied after the Bidirectional Algorithm is used and is limited to characters within the same directional run. - if ($arabic) { - $endedletter = array(1569,1570,1571,1572,1573,1575,1577,1583,1584,1585,1586,1608,1688); - $alfletter = array(1570,1571,1573,1575); - $chardata2 = $chardata; - $laaletter = false; - $charAL = array(); - $x = 0; - for ($i=0; $i < $numchars; ++$i) { - if ((TCPDF_FONT_DATA::$uni_type[$chardata[$i]['char']] == 'AL') OR ($chardata[$i]['char'] == 32) OR ($chardata[$i]['char'] == 8204)) { - $charAL[$x] = $chardata[$i]; - $charAL[$x]['i'] = $i; - $chardata[$i]['x'] = $x; - ++$x; - } - } - $numAL = $x; - for ($i=0; $i < $numchars; ++$i) { - $thischar = $chardata[$i]; - if ($i > 0) { - $prevchar = $chardata[($i-1)]; - } else { - $prevchar = false; - } - if (($i+1) < $numchars) { - $nextchar = $chardata[($i+1)]; - } else { - $nextchar = false; - } - if (TCPDF_FONT_DATA::$uni_type[$thischar['char']] == 'AL') { - $x = $thischar['x']; - if ($x > 0) { - $prevchar = $charAL[($x-1)]; - } else { - $prevchar = false; - } - if (($x+1) < $numAL) { - $nextchar = $charAL[($x+1)]; - } else { - $nextchar = false; - } - // if laa letter - if (($prevchar !== false) AND ($prevchar['char'] == 1604) AND (in_array($thischar['char'], $alfletter))) { - $arabicarr = TCPDF_FONT_DATA::$uni_laa_array; - $laaletter = true; - if ($x > 1) { - $prevchar = $charAL[($x-2)]; - } else { - $prevchar = false; - } - } else { - $arabicarr = TCPDF_FONT_DATA::$uni_arabicsubst; - $laaletter = false; - } - if (($prevchar !== false) AND ($nextchar !== false) AND - ((TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'NSM')) AND - ((TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'NSM')) AND - ($prevchar['type'] == $thischar['type']) AND - ($nextchar['type'] == $thischar['type']) AND - ($nextchar['char'] != 1567)) { - if (in_array($prevchar['char'], $endedletter)) { - if (isset($arabicarr[$thischar['char']][2])) { - // initial - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2]; - } - } else { - if (isset($arabicarr[$thischar['char']][3])) { - // medial - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][3]; - } - } - } elseif (($nextchar !== false) AND - ((TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$nextchar['char']] == 'NSM')) AND - ($nextchar['type'] == $thischar['type']) AND - ($nextchar['char'] != 1567)) { - if (isset($arabicarr[$chardata[$i]['char']][2])) { - // initial - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][2]; - } - } elseif ((($prevchar !== false) AND - ((TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'AL') OR (TCPDF_FONT_DATA::$uni_type[$prevchar['char']] == 'NSM')) AND - ($prevchar['type'] == $thischar['type'])) OR - (($nextchar !== false) AND ($nextchar['char'] == 1567))) { - // final - if (($i > 1) AND ($thischar['char'] == 1607) AND - ($chardata[$i-1]['char'] == 1604) AND - ($chardata[$i-2]['char'] == 1604)) { - //Allah Word - // mark characters to delete with false - $chardata2[$i-2]['char'] = false; - $chardata2[$i-1]['char'] = false; - $chardata2[$i]['char'] = 65010; - } else { - if (($prevchar !== false) AND in_array($prevchar['char'], $endedletter)) { - if (isset($arabicarr[$thischar['char']][0])) { - // isolated - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0]; - } - } else { - if (isset($arabicarr[$thischar['char']][1])) { - // final - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][1]; - } - } - } - } elseif (isset($arabicarr[$thischar['char']][0])) { - // isolated - $chardata2[$i]['char'] = $arabicarr[$thischar['char']][0]; - } - // if laa letter - if ($laaletter) { - // mark characters to delete with false - $chardata2[($charAL[($x-1)]['i'])]['char'] = false; - } - } // end if AL (Arabic Letter) - } // end for each char - /* - * Combining characters that can occur with Arabic Shadda (0651 HEX, 1617 DEC) are replaced. - * Putting the combining mark and shadda in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner. - */ - for ($i = 0; $i < ($numchars-1); ++$i) { - if (($chardata2[$i]['char'] == 1617) AND (isset(TCPDF_FONT_DATA::$uni_diacritics[($chardata2[$i+1]['char'])]))) { - // check if the subtitution font is defined on current font - if (isset($currentfont['cw'][(TCPDF_FONT_DATA::$uni_diacritics[($chardata2[$i+1]['char'])])])) { - $chardata2[$i]['char'] = false; - $chardata2[$i+1]['char'] = TCPDF_FONT_DATA::$uni_diacritics[($chardata2[$i+1]['char'])]; - } - } - } - // remove marked characters - foreach ($chardata2 as $key => $value) { - if ($value['char'] === false) { - unset($chardata2[$key]); - } - } - $chardata = array_values($chardata2); - $numchars = count($chardata); - unset($chardata2); - unset($arabicarr); - unset($laaletter); - unset($charAL); - } - - // L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher. - for ($j=$maxlevel; $j > 0; $j--) { - $ordarray = Array(); - $revarr = Array(); - $onlevel = false; - for ($i=0; $i < $numchars; ++$i) { - if ($chardata[$i]['level'] >= $j) { - $onlevel = true; - if (isset(TCPDF_FONT_DATA::$uni_mirror[$chardata[$i]['char']])) { - // L4. A character is depicted by a mirrored glyph if and only if (a) the resolved directionality of that character is R, and (b) the Bidi_Mirrored property value of that character is true. - $chardata[$i]['char'] = TCPDF_FONT_DATA::$uni_mirror[$chardata[$i]['char']]; - } - $revarr[] = $chardata[$i]; - } else { - if ($onlevel) { - $revarr = array_reverse($revarr); - $ordarray = array_merge($ordarray, $revarr); - $revarr = Array(); - $onlevel = false; - } - $ordarray[] = $chardata[$i]; - } - } - if ($onlevel) { - $revarr = array_reverse($revarr); - $ordarray = array_merge($ordarray, $revarr); - } - $chardata = $ordarray; - } - $ordarray = array(); - foreach ($chardata as $cd) { - $ordarray[] = $cd['char']; - // store char values for subsetting - $currentfont['subsetchars'][$cd['char']] = true; - } - return $ordarray; - } - -} // END OF TCPDF_FONTS CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/tcpdf_images.php b/lib/combodo/tcpdf/include/tcpdf_images.php deleted file mode 100644 index 6f2860c60..000000000 --- a/lib/combodo/tcpdf/include/tcpdf_images.php +++ /dev/null @@ -1,359 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : -// Static image methods used by the TCPDF class. -// -//============================================================+ - -/** - * @file - * This is a PHP class that contains static image methods for the TCPDF class.
    - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.005 - */ - -/** - * @class TCPDF_IMAGES - * Static image methods used by the TCPDF class. - * @package com.tecnick.tcpdf - * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 1.0.005 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_IMAGES { - - /** - * Array of hinheritable SVG properties. - * @since 5.0.000 (2010-05-02) - * @public static - * - * @var string[] - */ - public static $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Return the image type given the file name or array returned by getimagesize() function. - * @param string $imgfile image file name - * @param array $iminfo array of image information returned by getimagesize() function. - * @return string image type - * @since 4.8.017 (2009-11-27) - * @public static - */ - public static function getImageFileType($imgfile, $iminfo=array()) { - $type = ''; - if (isset($iminfo['mime']) AND !empty($iminfo['mime'])) { - $mime = explode('/', $iminfo['mime']); - if ((count($mime) > 1) AND ($mime[0] == 'image') AND (!empty($mime[1]))) { - $type = strtolower(trim($mime[1])); - } - } - if (empty($type)) { - $type = strtolower(trim(pathinfo(parse_url($imgfile, PHP_URL_PATH), PATHINFO_EXTENSION))); - } - if ($type == 'jpg') { - $type = 'jpeg'; - } - return $type; - } - - /** - * Set the transparency for the given GD image. - * @param resource $new_image GD image object - * @param resource $image GD image object. - * @return resource GD image object $new_image - * @since 4.9.016 (2010-04-20) - * @public static - */ - public static function setGDImageTransparency($new_image, $image) { - // default transparency color (white) - $tcol = array('red' => 255, 'green' => 255, 'blue' => 255); - // transparency index - $tid = imagecolortransparent($image); - $palletsize = imagecolorstotal($image); - if (($tid >= 0) AND ($tid < $palletsize)) { - // get the colors for the transparency index - $tcol = imagecolorsforindex($image, $tid); - } - $tid = imagecolorallocate($new_image, $tcol['red'], $tcol['green'], $tcol['blue']); - imagefill($new_image, 0, 0, $tid); - imagecolortransparent($new_image, $tid); - return $new_image; - } - - /** - * Convert the loaded image to a PNG and then return a structure for the PDF creator. - * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant. - * @param resource $image Image object. - * @param string $tempfile Temporary file name. - * return image PNG image object. - * @since 4.9.016 (2010-04-20) - * @public static - */ - public static function _toPNG($image, $tempfile) { - // turn off interlaced mode - imageinterlace($image, 0); - // create temporary PNG image - imagepng($image, $tempfile); - // remove image from memory - imagedestroy($image); - // get PNG image data - $retvars = self::_parsepng($tempfile); - // tidy up by removing temporary image - unlink($tempfile); - return $retvars; - } - - /** - * Convert the loaded image to a JPEG and then return a structure for the PDF creator. - * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant. - * @param resource $image Image object. - * @param int $quality JPEG quality. - * @param string $tempfile Temporary file name. - * return array|false image JPEG image object. - * @public static - */ - public static function _toJPEG($image, $quality, $tempfile) { - imagejpeg($image, $tempfile, $quality); - imagedestroy($image); - $retvars = self::_parsejpeg($tempfile); - // tidy up by removing temporary image - unlink($tempfile); - return $retvars; - } - - /** - * Extract info from a JPEG file without using the GD library. - * @param string $file image file to parse - * @return array|false structure containing the image data - * @public static - */ - public static function _parsejpeg($file) { - // check if is a local file - if (!@TCPDF_STATIC::file_exists($file)) { - return false; - } - $a = getimagesize($file); - if (empty($a)) { - //Missing or incorrect image file - return false; - } - if ($a[2] != 2) { - // Not a JPEG file - return false; - } - // bits per pixel - $bpc = isset($a['bits']) ? intval($a['bits']) : 8; - // number of image channels - if (!isset($a['channels'])) { - $channels = 3; - } else { - $channels = intval($a['channels']); - } - // default colour space - switch ($channels) { - case 1: { - $colspace = 'DeviceGray'; - break; - } - case 3: { - $colspace = 'DeviceRGB'; - break; - } - case 4: { - $colspace = 'DeviceCMYK'; - break; - } - default: { - $channels = 3; - $colspace = 'DeviceRGB'; - break; - } - } - // get file content - $data = file_get_contents($file); - // check for embedded ICC profile - $icc = array(); - $offset = 0; - while (($pos = strpos($data, "ICC_PROFILE\0", $offset)) !== false) { - // get ICC sequence length - $length = (TCPDF_STATIC::_getUSHORT($data, ($pos - 2)) - 16); - // marker sequence number - $msn = max(1, ord($data[($pos + 12)])); - // number of markers (total of APP2 used) - $nom = max(1, ord($data[($pos + 13)])); - // get sequence segment - $icc[($msn - 1)] = substr($data, ($pos + 14), $length); - // move forward to next sequence - $offset = ($pos + 14 + $length); - } - // order and compact ICC segments - if (count($icc) > 0) { - ksort($icc); - $icc = implode('', $icc); - if ((ord($icc[36]) != 0x61) OR (ord($icc[37]) != 0x63) OR (ord($icc[38]) != 0x73) OR (ord($icc[39]) != 0x70)) { - // invalid ICC profile - $icc = false; - } - } else { - $icc = false; - } - return array('w' => $a[0], 'h' => $a[1], 'ch' => $channels, 'icc' => $icc, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'DCTDecode', 'data' => $data); - } - - /** - * Extract info from a PNG file without using the GD library. - * @param string $file image file to parse - * @return array|false structure containing the image data - * @public static - */ - public static function _parsepng($file) { - $f = @fopen($file, 'rb'); - if ($f === false) { - // Can't open image file - return false; - } - //Check signature - if (fread($f, 8) != chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) { - // Not a PNG file - return false; - } - //Read header chunk - fread($f, 4); - if (fread($f, 4) != 'IHDR') { - //Incorrect PNG file - return false; - } - $w = TCPDF_STATIC::_freadint($f); - $h = TCPDF_STATIC::_freadint($f); - $bpc = ord(fread($f, 1)); - $ct = ord(fread($f, 1)); - if ($ct == 0) { - $colspace = 'DeviceGray'; - } elseif ($ct == 2) { - $colspace = 'DeviceRGB'; - } elseif ($ct == 3) { - $colspace = 'Indexed'; - } else { - // alpha channel - fclose($f); - return 'pngalpha'; - } - if (ord(fread($f, 1)) != 0) { - // Unknown compression method - fclose($f); - return false; - } - if (ord(fread($f, 1)) != 0) { - // Unknown filter method - fclose($f); - return false; - } - if (ord(fread($f, 1)) != 0) { - // Interlacing not supported - fclose($f); - return false; - } - fread($f, 4); - $channels = ($ct == 2 ? 3 : 1); - $parms = '/DecodeParms << /Predictor 15 /Colors '.$channels.' /BitsPerComponent '.$bpc.' /Columns '.$w.' >>'; - //Scan chunks looking for palette, transparency and image data - $pal = ''; - $trns = ''; - $data = ''; - $icc = false; - $n = TCPDF_STATIC::_freadint($f); - do { - $type = fread($f, 4); - if ($type == 'PLTE') { - // read palette - $pal = TCPDF_STATIC::rfread($f, $n); - fread($f, 4); - } elseif ($type == 'tRNS') { - // read transparency info - $t = TCPDF_STATIC::rfread($f, $n); - if ($ct == 0) { // DeviceGray - $trns = array(ord($t[1])); - } elseif ($ct == 2) { // DeviceRGB - $trns = array(ord($t[1]), ord($t[3]), ord($t[5])); - } else { // Indexed - if ($n > 0) { - $trns = array(); - for ($i = 0; $i < $n; ++ $i) { - $trns[] = ord($t[$i]); - } - } - } - fread($f, 4); - } elseif ($type == 'IDAT') { - // read image data block - $data .= TCPDF_STATIC::rfread($f, $n); - fread($f, 4); - } elseif ($type == 'iCCP') { - // skip profile name - $len = 0; - while ((ord(fread($f, 1)) != 0) AND ($len < 80)) { - ++$len; - } - // get compression method - if (ord(fread($f, 1)) != 0) { - // Unknown filter method - fclose($f); - return false; - } - // read ICC Color Profile - $icc = TCPDF_STATIC::rfread($f, ($n - $len - 2)); - // decompress profile - $icc = gzuncompress($icc); - fread($f, 4); - } elseif ($type == 'IEND') { - break; - } else { - TCPDF_STATIC::rfread($f, $n + 4); - } - $n = TCPDF_STATIC::_freadint($f); - } while ($n); - if (($colspace == 'Indexed') AND (empty($pal))) { - // Missing palette - fclose($f); - return false; - } - fclose($f); - return array('w' => $w, 'h' => $h, 'ch' => $channels, 'icc' => $icc, 'cs' => $colspace, 'bpc' => $bpc, 'f' => 'FlateDecode', 'parms' => $parms, 'pal' => $pal, 'trns' => $trns, 'data' => $data); - } - -} // END OF TCPDF_IMAGES CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/include/tcpdf_static.php b/lib/combodo/tcpdf/include/tcpdf_static.php deleted file mode 100644 index a118d0588..000000000 --- a/lib/combodo/tcpdf/include/tcpdf_static.php +++ /dev/null @@ -1,2669 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : -// Static methods used by the TCPDF class. -// -//============================================================+ - -/** - * @file - * This is a PHP class that contains static methods for the TCPDF class.
    - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.1.2 - */ - -/** - * @class TCPDF_STATIC - * Static methods used by the TCPDF class. - * @package com.tecnick.tcpdf - * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 1.1.1 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_STATIC { - - /** - * Current TCPDF version. - * @private static - */ - private static $tcpdf_version = '6.4.4'; - - /** - * String alias for total number of pages. - * @public static - */ - public static $alias_tot_pages = '{:ptp:}'; - - /** - * String alias for page number. - * @public static - */ - public static $alias_num_page = '{:pnp:}'; - - /** - * String alias for total number of pages in a single group. - * @public static - */ - public static $alias_group_tot_pages = '{:ptg:}'; - - /** - * String alias for group page number. - * @public static - */ - public static $alias_group_num_page = '{:png:}'; - - /** - * String alias for right shift compensation used to correctly align page numbers on the right. - * @public static - */ - public static $alias_right_shift = '{rsc:'; - - /** - * Encryption padding string. - * @public static - */ - public static $enc_padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A"; - - /** - * ByteRange placemark used during digital signature process. - * @since 4.6.028 (2009-08-25) - * @public static - */ - public static $byterange_string = '/ByteRange[0 ********** ********** **********]'; - - /** - * Array page boxes names - * @public static - */ - public static $pageboxes = array('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox'); - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** - * Return the current TCPDF version. - * @return string TCPDF version string - * @since 5.9.012 (2010-11-10) - * @public static - */ - public static function getTCPDFVersion() { - return self::$tcpdf_version; - } - - /** - * Return the current TCPDF producer. - * @return string TCPDF producer string - * @since 6.0.000 (2013-03-16) - * @public static - */ - public static function getTCPDFProducer() { - return "\x54\x43\x50\x44\x46\x20".self::getTCPDFVersion()."\x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29"; - } - - /** - * Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist) - * @param boolean $mqr FALSE for off, TRUE for on. - * @since 4.6.025 (2009-08-17) - * @public static - */ - public static function set_mqr($mqr) { - if (!defined('PHP_VERSION_ID')) { - $version = PHP_VERSION; - define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); - } - if (PHP_VERSION_ID < 50300) { - @set_magic_quotes_runtime($mqr); - } - } - - /** - * Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist) - * @return int Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise. - * @since 4.6.025 (2009-08-17) - * @public static - */ - public static function get_mqr() { - if (!defined('PHP_VERSION_ID')) { - $version = PHP_VERSION; - define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); - } - if (PHP_VERSION_ID < 50300) { - return @get_magic_quotes_runtime(); - } - return 0; - } - - /** - * Check if the URL exist. - * @param string $url URL to check. - * @return boolean true if the URl exist, false otherwise. - * @since 5.9.204 (2013-01-28) - * @public static - */ - public static function isValidURL($url) { - $headers = @get_headers($url); - if ($headers === false) { - return false; - } - return (strpos($headers[0], '200') !== false); - } - - /** - * Removes SHY characters from text. - * Unicode Data:
      - *
    • Name : SOFT HYPHEN, commonly abbreviated as SHY
    • - *
    • HTML Entity (decimal): "&#173;"
    • - *
    • HTML Entity (hex): "&#xad;"
    • - *
    • HTML Entity (named): "&shy;"
    • - *
    • How to type in Microsoft Windows: [Alt +00AD] or [Alt 0173]
    • - *
    • UTF-8 (hex): 0xC2 0xAD (c2ad)
    • - *
    • UTF-8 character: chr(194).chr(173)
    • - *
    - * @param string $txt input string - * @param boolean $unicode True if we are in unicode mode, false otherwise. - * @return string without SHY characters. - * @since (4.5.019) 2009-02-28 - * @public static - */ - public static function removeSHY($txt='', $unicode=true) { - $txt = preg_replace('/([\\xc2]{1}[\\xad]{1})/', '', $txt); - if (!$unicode) { - $txt = preg_replace('/([\\xad]{1})/', '', $txt); - } - return $txt; - } - - - /** - * Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages) - * @param string|array|int $brd Indicates if borders must be drawn around the cell block. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param string $position multicell position: 'start', 'middle', 'end' - * @param boolean $opencell True when the cell is left open at the page bottom, false otherwise. - * @return array border mode array - * @since 4.4.002 (2008-12-09) - * @public static - */ - public static function getBorderMode($brd, $position='start', $opencell=true) { - if ((!$opencell) OR empty($brd)) { - return $brd; - } - if ($brd == 1) { - $brd = 'LTRB'; - } - if (is_string($brd)) { - // convert string to array - $slen = strlen($brd); - $newbrd = array(); - for ($i = 0; $i < $slen; ++$i) { - $newbrd[$brd[$i]] = array('cap' => 'square', 'join' => 'miter'); - } - $brd = $newbrd; - } - foreach ($brd as $border => $style) { - switch ($position) { - case 'start': { - if (strpos($border, 'B') !== false) { - // remove bottom line - $newkey = str_replace('B', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - } - break; - } - case 'middle': { - if (strpos($border, 'B') !== false) { - // remove bottom line - $newkey = str_replace('B', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - $border = $newkey; - } - if (strpos($border, 'T') !== false) { - // remove bottom line - $newkey = str_replace('T', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - } - break; - } - case 'end': { - if (strpos($border, 'T') !== false) { - // remove bottom line - $newkey = str_replace('T', '', $border); - if (strlen($newkey) > 0) { - $brd[$newkey] = $style; - } - unset($brd[$border]); - } - break; - } - } - } - return $brd; - } - - /** - * Determine whether a string is empty. - * @param string $str string to be checked - * @return bool true if string is empty - * @since 4.5.044 (2009-04-16) - * @public static - */ - public static function empty_string($str) { - return (is_null($str) OR (is_string($str) AND (strlen($str) == 0))); - } - - /** - * Returns a temporary filename for caching object on filesystem. - * @param string $type Type of file (name of the subdir on the tcpdf cache folder). - * @param string $file_id TCPDF file_id. - * @return string filename. - * @since 4.5.000 (2008-12-31) - * @public static - */ - public static function getObjFilename($type='tmp', $file_id='') { - return tempnam(K_PATH_CACHE, '__tcpdf_'.$file_id.'_'.$type.'_'.md5(TCPDF_STATIC::getRandomSeed()).'_'); - } - - /** - * Add "\" before "\", "(" and ")" - * @param string $s string to escape. - * @return string escaped string. - * @public static - */ - public static function _escape($s) { - // the chr(13) substitution fixes the Bugs item #1421290. - return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', chr(13) => '\r')); - } - - /** - * Escape some special characters (< > &) for XML output. - * @param string $str Input string to convert. - * @return string converted string - * @since 5.9.121 (2011-09-28) - * @public static - */ - public static function _escapeXML($str) { - $replaceTable = array("\0" => '', '&' => '&', '<' => '<', '>' => '>'); - $str = strtr($str, $replaceTable); - return $str; - } - - /** - * Creates a copy of a class object - * @param object $object class object to be cloned - * @return object cloned object - * @since 4.5.029 (2009-03-19) - * @public static - */ - public static function objclone($object) { - if (($object instanceof Imagick) AND (version_compare(phpversion('imagick'), '3.0.1') !== 1)) { - // on the versions after 3.0.1 the clone() method was deprecated in favour of clone keyword - return @$object->clone(); - } - return @clone($object); - } - - /** - * Output input data and compress it if possible. - * @param string $data Data to output. - * @param int $length Data length in bytes. - * @since 5.9.086 - * @public static - */ - public static function sendOutputData($data, $length) { - if (!isset($_SERVER['HTTP_ACCEPT_ENCODING']) OR empty($_SERVER['HTTP_ACCEPT_ENCODING'])) { - // the content length may vary if the server is using compression - header('Content-Length: '.$length); - } - echo $data; - } - - /** - * Replace page number aliases with number. - * @param string $page Page content. - * @param array $replace Array of replacements (array keys are replacement strings, values are alias arrays). - * @param int $diff If passed, this will be set to the total char number difference between alias and replacements. - * @return array replaced page content and updated $diff parameter as array. - * @public static - */ - public static function replacePageNumAliases($page, $replace, $diff=0) { - foreach ($replace as $rep) { - foreach ($rep[3] as $a) { - if (strpos($page, $a) !== false) { - $page = str_replace($a, $rep[0], $page); - $diff += ($rep[2] - $rep[1]); - } - } - } - return array($page, $diff); - } - - /** - * Returns timestamp in seconds from formatted date-time. - * @param string $date Formatted date-time. - * @return int seconds. - * @since 5.9.152 (2012-03-23) - * @public static - */ - public static function getTimestamp($date) { - if (($date[0] == 'D') AND ($date[1] == ':')) { - // remove date prefix if present - $date = substr($date, 2); - } - return strtotime($date); - } - - /** - * Returns a formatted date-time. - * @param int $time Time in seconds. - * @return string escaped date string. - * @since 5.9.152 (2012-03-23) - * @public static - */ - public static function getFormattedDate($time) { - return substr_replace(date('YmdHisO', intval($time)), '\'', (0 - 2), 0).'\''; - } - - /** - * Returns a string containing random data to be used as a seed for encryption methods. - * @param string $seed starting seed value - * @return string containing random data - * @author Nicola Asuni - * @since 5.9.006 (2010-10-19) - * @public static - */ - public static function getRandomSeed($seed='') { - $rnd = uniqid(rand().microtime(true), true); - if (function_exists('posix_getpid')) { - $rnd .= posix_getpid(); - } - if (function_exists('openssl_random_pseudo_bytes') AND (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')) { - // this is not used on windows systems because it is very slow for a know bug - $rnd .= openssl_random_pseudo_bytes(512); - } else { - for ($i = 0; $i < 23; ++$i) { - $rnd .= uniqid('', true); - } - } - return $rnd.$seed.__FILE__.serialize($_SERVER).microtime(true); - } - - /** - * Encrypts a string using MD5 and returns it's value as a binary string. - * @param string $str input string - * @return string MD5 encrypted binary string - * @since 2.0.000 (2008-01-02) - * @public static - */ - public static function _md5_16($str) { - return pack('H*', md5($str)); - } - - /** - * Returns the input text encrypted using AES algorithm and the specified key. - * This method requires openssl or mcrypt. Text is padded to 16bytes blocks - * @param string $key encryption key - * @param string $text input text to be encrypted - * @return string encrypted text - * @author Nicola Asuni - * @since 5.0.005 (2010-05-11) - * @public static - */ - public static function _AES($key, $text) { - // padding (RFC 2898, PKCS #5: Password-Based Cryptography Specification Version 2.0) - $padding = 16 - (strlen($text) % 16); - $text .= str_repeat(chr($padding), $padding); - if (extension_loaded('openssl')) { - $algo = 'aes-256-cbc'; - if (strlen($key) == 16) { - $algo = 'aes-128-cbc'; - } - $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($algo)); - $text = openssl_encrypt($text, $algo, $key, OPENSSL_RAW_DATA, $iv); - return $iv.substr($text, 0, -16); - } - $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC), MCRYPT_RAND); - $text = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $text, MCRYPT_MODE_CBC, $iv); - $text = $iv.$text; - return $text; - } - - /** - * Returns the input text encrypted using AES algorithm and the specified key. - * This method requires openssl or mcrypt. Text is not padded - * @param string $key encryption key - * @param string $text input text to be encrypted - * @return string encrypted text - * @author Nicola Asuni - * @since TODO - * @public static - */ - public static function _AESnopad($key, $text) { - if (extension_loaded('openssl')) { - $algo = 'aes-256-cbc'; - if (strlen($key) == 16) { - $algo = 'aes-128-cbc'; - } - $iv = str_repeat("\x00", openssl_cipher_iv_length($algo)); - $text = openssl_encrypt($text, $algo, $key, OPENSSL_RAW_DATA, $iv); - return substr($text, 0, -16); - } - $iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)); - $text = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $text, MCRYPT_MODE_CBC, $iv); - return $text; - } - - /** - * Returns the input text encrypted using RC4 algorithm and the specified key. - * RC4 is the standard encryption algorithm used in PDF format - * @param string $key Encryption key. - * @param string $text Input text to be encrypted. - * @param string $last_enc_key Reference to last RC4 key encrypted. - * @param string $last_enc_key_c Reference to last RC4 computed key. - * @return string encrypted text - * @since 2.0.000 (2008-01-02) - * @author Klemen Vodopivec, Nicola Asuni - * @public static - */ - public static function _RC4($key, $text, &$last_enc_key, &$last_enc_key_c) { - if (function_exists('mcrypt_encrypt') AND ($out = @mcrypt_encrypt(MCRYPT_ARCFOUR, $key, $text, MCRYPT_MODE_STREAM, ''))) { - // try to use mcrypt function if exist - return $out; - } - if ($last_enc_key != $key) { - $k = str_repeat($key, (int) ((256 / strlen($key)) + 1)); - $rc4 = range(0, 255); - $j = 0; - for ($i = 0; $i < 256; ++$i) { - $t = $rc4[$i]; - $j = ($j + $t + ord($k[$i])) % 256; - $rc4[$i] = $rc4[$j]; - $rc4[$j] = $t; - } - $last_enc_key = $key; - $last_enc_key_c = $rc4; - } else { - $rc4 = $last_enc_key_c; - } - $len = strlen($text); - $a = 0; - $b = 0; - $out = ''; - for ($i = 0; $i < $len; ++$i) { - $a = ($a + 1) % 256; - $t = $rc4[$a]; - $b = ($b + $t) % 256; - $rc4[$a] = $rc4[$b]; - $rc4[$b] = $t; - $k = $rc4[($rc4[$a] + $rc4[$b]) % 256]; - $out .= chr(ord($text[$i]) ^ $k); - } - return $out; - } - - /** - * Return the permission code used on encryption (P value). - * @param array $permissions the set of permissions (specify the ones you want to block). - * @param int $mode encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit. - * @since 5.0.005 (2010-05-12) - * @author Nicola Asuni - * @public static - */ - public static function getUserPermissionCode($permissions, $mode=0) { - $options = array( - 'owner' => 2, // bit 2 -- inverted logic: cleared by default - 'print' => 4, // bit 3 - 'modify' => 8, // bit 4 - 'copy' => 16, // bit 5 - 'annot-forms' => 32, // bit 6 - 'fill-forms' => 256, // bit 9 - 'extract' => 512, // bit 10 - 'assemble' => 1024,// bit 11 - 'print-high' => 2048 // bit 12 - ); - $protection = 2147422012; // 32 bit: (01111111 11111111 00001111 00111100) - foreach ($permissions as $permission) { - if (isset($options[$permission])) { - if (($mode > 0) OR ($options[$permission] <= 32)) { - // set only valid permissions - if ($options[$permission] == 2) { - // the logic for bit 2 is inverted (cleared by default) - $protection += $options[$permission]; - } else { - $protection -= $options[$permission]; - } - } - } - } - return $protection; - } - - /** - * Convert hexadecimal string to string - * @param string $bs byte-string to convert - * @return string - * @since 5.0.005 (2010-05-12) - * @author Nicola Asuni - * @public static - */ - public static function convertHexStringToString($bs) { - $string = ''; // string to be returned - $bslength = strlen($bs); - if (($bslength % 2) != 0) { - // padding - $bs .= '0'; - ++$bslength; - } - for ($i = 0; $i < $bslength; $i += 2) { - $string .= chr(hexdec($bs[$i].$bs[($i + 1)])); - } - return $string; - } - - /** - * Convert string to hexadecimal string (byte string) - * @param string $s string to convert - * @return string byte string - * @since 5.0.010 (2010-05-17) - * @author Nicola Asuni - * @public static - */ - public static function convertStringToHexString($s) { - $bs = ''; - $chars = preg_split('//', $s, -1, PREG_SPLIT_NO_EMPTY); - foreach ($chars as $c) { - $bs .= sprintf('%02s', dechex(ord($c))); - } - return $bs; - } - - /** - * Convert encryption P value to a string of bytes, low-order byte first. - * @param string $protection 32bit encryption permission value (P value) - * @return string - * @since 5.0.005 (2010-05-12) - * @author Nicola Asuni - * @public static - */ - public static function getEncPermissionsString($protection) { - $binprot = sprintf('%032b', $protection); - $str = chr(bindec(substr($binprot, 24, 8))); - $str .= chr(bindec(substr($binprot, 16, 8))); - $str .= chr(bindec(substr($binprot, 8, 8))); - $str .= chr(bindec(substr($binprot, 0, 8))); - return $str; - } - - /** - * Encode a name object. - * @param string $name Name object to encode. - * @return string Encoded name object. - * @author Nicola Asuni - * @since 5.9.097 (2011-06-23) - * @public static - */ - public static function encodeNameObject($name) { - $escname = ''; - $length = strlen($name); - for ($i = 0; $i < $length; ++$i) { - $chr = $name[$i]; - if (preg_match('/[0-9a-zA-Z#_=-]/', $chr) == 1) { - $escname .= $chr; - } else { - $escname .= sprintf('#%02X', ord($chr)); - } - } - return $escname; - } - - /** - * Convert JavaScript form fields properties array to Annotation Properties array. - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param array $spot_colors Reference to spot colors array. - * @param boolean $rtl True if in Right-To-Left text direction mode, false otherwise. - * @return array of annotation properties - * @author Nicola Asuni - * @since 4.8.000 (2009-09-06) - * @public static - */ - public static function getAnnotOptFromJSProp($prop, &$spot_colors, $rtl=false) { - if (isset($prop['aopt']) AND is_array($prop['aopt'])) { - // the annotation options are already defined - return $prop['aopt']; - } - $opt = array(); // value to be returned - // alignment: Controls how the text is laid out within the text field. - if (isset($prop['alignment'])) { - switch ($prop['alignment']) { - case 'left': { - $opt['q'] = 0; - break; - } - case 'center': { - $opt['q'] = 1; - break; - } - case 'right': { - $opt['q'] = 2; - break; - } - default: { - $opt['q'] = ($rtl)?2:0; - break; - } - } - } - // lineWidth: Specifies the thickness of the border when stroking the perimeter of a field's rectangle. - if (isset($prop['lineWidth'])) { - $linewidth = intval($prop['lineWidth']); - } else { - $linewidth = 1; - } - // borderStyle: The border style for a field. - if (isset($prop['borderStyle'])) { - switch ($prop['borderStyle']) { - case 'border.d': - case 'dashed': { - $opt['border'] = array(0, 0, $linewidth, array(3, 2)); - $opt['bs'] = array('w'=>$linewidth, 's'=>'D', 'd'=>array(3, 2)); - break; - } - case 'border.b': - case 'beveled': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'B'); - break; - } - case 'border.i': - case 'inset': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'I'); - break; - } - case 'border.u': - case 'underline': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'U'); - break; - } - case 'border.s': - case 'solid': { - $opt['border'] = array(0, 0, $linewidth); - $opt['bs'] = array('w'=>$linewidth, 's'=>'S'); - break; - } - default: { - break; - } - } - } - if (isset($prop['border']) AND is_array($prop['border'])) { - $opt['border'] = $prop['border']; - } - if (!isset($opt['mk'])) { - $opt['mk'] = array(); - } - if (!isset($opt['mk']['if'])) { - $opt['mk']['if'] = array(); - } - $opt['mk']['if']['a'] = array(0.5, 0.5); - // buttonAlignX: Controls how space is distributed from the left of the button face with respect to the icon. - if (isset($prop['buttonAlignX'])) { - $opt['mk']['if']['a'][0] = $prop['buttonAlignX']; - } - // buttonAlignY: Controls how unused space is distributed from the bottom of the button face with respect to the icon. - if (isset($prop['buttonAlignY'])) { - $opt['mk']['if']['a'][1] = $prop['buttonAlignY']; - } - // buttonFitBounds: If true, the extent to which the icon may be scaled is set to the bounds of the button field. - if (isset($prop['buttonFitBounds']) AND ($prop['buttonFitBounds'] == 'true')) { - $opt['mk']['if']['fb'] = true; - } - // buttonScaleHow: Controls how the icon is scaled (if necessary) to fit inside the button face. - if (isset($prop['buttonScaleHow'])) { - switch ($prop['buttonScaleHow']) { - case 'scaleHow.proportional': { - $opt['mk']['if']['s'] = 'P'; - break; - } - case 'scaleHow.anamorphic': { - $opt['mk']['if']['s'] = 'A'; - break; - } - } - } - // buttonScaleWhen: Controls when an icon is scaled to fit inside the button face. - if (isset($prop['buttonScaleWhen'])) { - switch ($prop['buttonScaleWhen']) { - case 'scaleWhen.always': { - $opt['mk']['if']['sw'] = 'A'; - break; - } - case 'scaleWhen.never': { - $opt['mk']['if']['sw'] = 'N'; - break; - } - case 'scaleWhen.tooBig': { - $opt['mk']['if']['sw'] = 'B'; - break; - } - case 'scaleWhen.tooSmall': { - $opt['mk']['if']['sw'] = 'S'; - break; - } - } - } - // buttonPosition: Controls how the text and the icon of the button are positioned with respect to each other within the button face. - if (isset($prop['buttonPosition'])) { - switch ($prop['buttonPosition']) { - case 0: - case 'position.textOnly': { - $opt['mk']['tp'] = 0; - break; - } - case 1: - case 'position.iconOnly': { - $opt['mk']['tp'] = 1; - break; - } - case 2: - case 'position.iconTextV': { - $opt['mk']['tp'] = 2; - break; - } - case 3: - case 'position.textIconV': { - $opt['mk']['tp'] = 3; - break; - } - case 4: - case 'position.iconTextH': { - $opt['mk']['tp'] = 4; - break; - } - case 5: - case 'position.textIconH': { - $opt['mk']['tp'] = 5; - break; - } - case 6: - case 'position.overlay': { - $opt['mk']['tp'] = 6; - break; - } - } - } - // fillColor: Specifies the background color for a field. - if (isset($prop['fillColor'])) { - if (is_array($prop['fillColor'])) { - $opt['mk']['bg'] = $prop['fillColor']; - } else { - $opt['mk']['bg'] = TCPDF_COLORS::convertHTMLColorToDec($prop['fillColor'], $spot_colors); - } - } - // strokeColor: Specifies the stroke color for a field that is used to stroke the rectangle of the field with a line as large as the line width. - if (isset($prop['strokeColor'])) { - if (is_array($prop['strokeColor'])) { - $opt['mk']['bc'] = $prop['strokeColor']; - } else { - $opt['mk']['bc'] = TCPDF_COLORS::convertHTMLColorToDec($prop['strokeColor'], $spot_colors); - } - } - // rotation: The rotation of a widget in counterclockwise increments. - if (isset($prop['rotation'])) { - $opt['mk']['r'] = $prop['rotation']; - } - // charLimit: Limits the number of characters that a user can type into a text field. - if (isset($prop['charLimit'])) { - $opt['maxlen'] = intval($prop['charLimit']); - } - if (!isset($ff)) { - $ff = 0; // default value - } - // readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it. - if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) { - $ff += 1 << 0; - } - // required: Specifies whether a field requires a value. - if (isset($prop['required']) AND ($prop['required'] == 'true')) { - $ff += 1 << 1; - } - // multiline: Controls how text is wrapped within the field. - if (isset($prop['multiline']) AND ($prop['multiline'] == 'true')) { - $ff += 1 << 12; - } - // password: Specifies whether the field should display asterisks when data is entered in the field. - if (isset($prop['password']) AND ($prop['password'] == 'true')) { - $ff += 1 << 13; - } - // NoToggleToOff: If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. - if (isset($prop['NoToggleToOff']) AND ($prop['NoToggleToOff'] == 'true')) { - $ff += 1 << 14; - } - // Radio: If set, the field is a set of radio buttons. - if (isset($prop['Radio']) AND ($prop['Radio'] == 'true')) { - $ff += 1 << 15; - } - // Pushbutton: If set, the field is a pushbutton that does not retain a permanent value. - if (isset($prop['Pushbutton']) AND ($prop['Pushbutton'] == 'true')) { - $ff += 1 << 16; - } - // Combo: If set, the field is a combo box; if clear, the field is a list box. - if (isset($prop['Combo']) AND ($prop['Combo'] == 'true')) { - $ff += 1 << 17; - } - // editable: Controls whether a combo box is editable. - if (isset($prop['editable']) AND ($prop['editable'] == 'true')) { - $ff += 1 << 18; - } - // Sort: If set, the field's option items shall be sorted alphabetically. - if (isset($prop['Sort']) AND ($prop['Sort'] == 'true')) { - $ff += 1 << 19; - } - // fileSelect: If true, sets the file-select flag in the Options tab of the text field (Field is Used for File Selection). - if (isset($prop['fileSelect']) AND ($prop['fileSelect'] == 'true')) { - $ff += 1 << 20; - } - // multipleSelection: If true, indicates that a list box allows a multiple selection of items. - if (isset($prop['multipleSelection']) AND ($prop['multipleSelection'] == 'true')) { - $ff += 1 << 21; - } - // doNotSpellCheck: If true, spell checking is not performed on this editable text field. - if (isset($prop['doNotSpellCheck']) AND ($prop['doNotSpellCheck'] == 'true')) { - $ff += 1 << 22; - } - // doNotScroll: If true, the text field does not scroll and the user, therefore, is limited by the rectangular region designed for the field. - if (isset($prop['doNotScroll']) AND ($prop['doNotScroll'] == 'true')) { - $ff += 1 << 23; - } - // comb: If set to true, the field background is drawn as series of boxes (one for each character in the value of the field) and each character of the content is drawn within those boxes. The number of boxes drawn is determined from the charLimit property. It applies only to text fields. The setter will also raise if any of the following field properties are also set multiline, password, and fileSelect. A side-effect of setting this property is that the doNotScroll property is also set. - if (isset($prop['comb']) AND ($prop['comb'] == 'true')) { - $ff += 1 << 24; - } - // radiosInUnison: If false, even if a group of radio buttons have the same name and export value, they behave in a mutually exclusive fashion, like HTML radio buttons. - if (isset($prop['radiosInUnison']) AND ($prop['radiosInUnison'] == 'true')) { - $ff += 1 << 25; - } - // richText: If true, the field allows rich text formatting. - if (isset($prop['richText']) AND ($prop['richText'] == 'true')) { - $ff += 1 << 25; - } - // commitOnSelChange: Controls whether a field value is committed after a selection change. - if (isset($prop['commitOnSelChange']) AND ($prop['commitOnSelChange'] == 'true')) { - $ff += 1 << 26; - } - $opt['ff'] = $ff; - // defaultValue: The default value of a field - that is, the value that the field is set to when the form is reset. - if (isset($prop['defaultValue'])) { - $opt['dv'] = $prop['defaultValue']; - } - $f = 4; // default value for annotation flags - // readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it. - if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) { - $f += 1 << 6; - } - // display: Controls whether the field is hidden or visible on screen and in print. - if (isset($prop['display'])) { - if ($prop['display'] == 'display.visible') { - // - } elseif ($prop['display'] == 'display.hidden') { - $f += 1 << 1; - } elseif ($prop['display'] == 'display.noPrint') { - $f -= 1 << 2; - } elseif ($prop['display'] == 'display.noView') { - $f += 1 << 5; - } - } - $opt['f'] = $f; - // currentValueIndices: Reads and writes single or multiple values of a list box or combo box. - if (isset($prop['currentValueIndices']) AND is_array($prop['currentValueIndices'])) { - $opt['i'] = $prop['currentValueIndices']; - } - // value: The value of the field data that the user has entered. - if (isset($prop['value'])) { - if (is_array($prop['value'])) { - $opt['opt'] = array(); - foreach ($prop['value'] AS $key => $optval) { - // exportValues: An array of strings representing the export values for the field. - if (isset($prop['exportValues'][$key])) { - $opt['opt'][$key] = array($prop['exportValues'][$key], $prop['value'][$key]); - } else { - $opt['opt'][$key] = $prop['value'][$key]; - } - } - } else { - $opt['v'] = $prop['value']; - } - } - // richValue: This property specifies the text contents and formatting of a rich text field. - if (isset($prop['richValue'])) { - $opt['rv'] = $prop['richValue']; - } - // submitName: If nonempty, used during form submission instead of name. Only applicable if submitting in HTML format (that is, URL-encoded). - if (isset($prop['submitName'])) { - $opt['tm'] = $prop['submitName']; - } - // name: Fully qualified field name. - if (isset($prop['name'])) { - $opt['t'] = $prop['name']; - } - // userName: The user name (short description string) of the field. - if (isset($prop['userName'])) { - $opt['tu'] = $prop['userName']; - } - // highlight: Defines how a button reacts when a user clicks it. - if (isset($prop['highlight'])) { - switch ($prop['highlight']) { - case 'none': - case 'highlight.n': { - $opt['h'] = 'N'; - break; - } - case 'invert': - case 'highlight.i': { - $opt['h'] = 'i'; - break; - } - case 'push': - case 'highlight.p': { - $opt['h'] = 'P'; - break; - } - case 'outline': - case 'highlight.o': { - $opt['h'] = 'O'; - break; - } - } - } - // Unsupported options: - // - calcOrderIndex: Changes the calculation order of fields in the document. - // - delay: Delays the redrawing of a field's appearance. - // - defaultStyle: This property defines the default style attributes for the form field. - // - style: Allows the user to set the glyph style of a check box or radio button. - // - textColor, textFont, textSize - return $opt; - } - - /** - * Format the page numbers. - * This method can be overridden for custom formats. - * @param int $num page number - * @return string - * @since 4.2.005 (2008-11-06) - * @public static - */ - public static function formatPageNumber($num) { - return number_format((float)$num, 0, '', '.'); - } - - /** - * Format the page numbers on the Table Of Content. - * This method can be overridden for custom formats. - * @param int $num page number - * @return string - * @since 4.5.001 (2009-01-04) - * @see addTOC(), addHTMLTOC() - * @public static - */ - public static function formatTOCPageNumber($num) { - return number_format((float)$num, 0, '', '.'); - } - - /** - * Extracts the CSS properties from a CSS string. - * @param string $cssdata string containing CSS definitions. - * @return array An array where the keys are the CSS selectors and the values are the CSS properties. - * @author Nicola Asuni - * @since 5.1.000 (2010-05-25) - * @public static - */ - public static function extractCSSproperties($cssdata) { - if (empty($cssdata)) { - return array(); - } - // remove comments - $cssdata = preg_replace('/\/\*[^\*]*\*\//', '', $cssdata); - // remove newlines and multiple spaces - $cssdata = preg_replace('/[\s]+/', ' ', $cssdata); - // remove some spaces - $cssdata = preg_replace('/[\s]*([;:\{\}]{1})[\s]*/', '\\1', $cssdata); - // remove empty blocks - $cssdata = preg_replace('/([^\}\{]+)\{\}/', '', $cssdata); - // replace media type parenthesis - $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1§', $cssdata); - $cssdata = preg_replace('/\}\}/si', '}§', $cssdata); - // trim string - $cssdata = trim($cssdata); - // find media blocks (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) - $cssblocks = array(); - $matches = array(); - if (preg_match_all('/@media[\s]+([^\§]*)§([^§]*)§/i', $cssdata, $matches) > 0) { - foreach ($matches[1] as $key => $type) { - $cssblocks[$type] = $matches[2][$key]; - } - // remove media blocks - $cssdata = preg_replace('/@media[\s]+([^\§]*)§([^§]*)§/i', '', $cssdata); - } - // keep 'all' and 'print' media, other media types are discarded - if (isset($cssblocks['all']) AND !empty($cssblocks['all'])) { - $cssdata .= $cssblocks['all']; - } - if (isset($cssblocks['print']) AND !empty($cssblocks['print'])) { - $cssdata .= $cssblocks['print']; - } - // reset css blocks array - $cssblocks = array(); - $matches = array(); - // explode css data string into array - if (substr($cssdata, -1) == '}') { - // remove last parethesis - $cssdata = substr($cssdata, 0, -1); - } - $matches = explode('}', $cssdata); - foreach ($matches as $key => $block) { - // index 0 contains the CSS selector, index 1 contains CSS properties - $cssblocks[$key] = explode('{', $block); - if (!isset($cssblocks[$key][1])) { - // remove empty definitions - unset($cssblocks[$key]); - } - } - // split groups of selectors (comma-separated list of selectors) - foreach ($cssblocks as $key => $block) { - if (strpos($block[0], ',') > 0) { - $selectors = explode(',', $block[0]); - foreach ($selectors as $sel) { - $cssblocks[] = array(0 => trim($sel), 1 => $block[1]); - } - unset($cssblocks[$key]); - } - } - // covert array to selector => properties - $cssdata = array(); - foreach ($cssblocks as $block) { - $selector = $block[0]; - // calculate selector's specificity - $matches = array(); - $a = 0; // the declaration is not from is a 'style' attribute - $b = intval(preg_match_all('/[\#]/', $selector, $matches)); // number of ID attributes - $c = intval(preg_match_all('/[\[\.]/', $selector, $matches)); // number of other attributes - $c += intval(preg_match_all('/[\:]link|visited|hover|active|focus|target|lang|enabled|disabled|checked|indeterminate|root|nth|first|last|only|empty|contains|not/i', $selector, $matches)); // number of pseudo-classes - $d = intval(preg_match_all('/[\>\+\~\s]{1}[a-zA-Z0-9]+/', ' '.$selector, $matches)); // number of element names - $d += intval(preg_match_all('/[\:][\:]/', $selector, $matches)); // number of pseudo-elements - $specificity = $a.$b.$c.$d; - // add specificity to the beginning of the selector - $cssdata[$specificity.' '.$selector] = $block[1]; - } - // sort selectors alphabetically to account for specificity - ksort($cssdata, SORT_STRING); - // return array - return $cssdata; - } - - /** - * Cleanup HTML code (requires HTML Tidy library). - * @param string $html htmlcode to fix - * @param string $default_css CSS commands to add - * @param array|null $tagvs parameters for setHtmlVSpace method - * @param array|null $tidy_options options for tidy_parse_string function - * @param array $tagvspaces Array of vertical spaces for tags. - * @return string XHTML code cleaned up - * @author Nicola Asuni - * @since 5.9.017 (2010-11-16) - * @see setHtmlVSpace() - * @public static - */ - public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) { - // configure parameters for HTML Tidy - if (TCPDF_STATIC::empty_string($tidy_options)) { - $tidy_options = array ( - 'clean' => 1, - 'drop-empty-paras' => 0, - 'drop-proprietary-attributes' => 1, - 'fix-backslash' => 1, - 'hide-comments' => 1, - 'join-styles' => 1, - 'lower-literals' => 1, - 'merge-divs' => 1, - 'merge-spans' => 1, - 'output-xhtml' => 1, - 'word-2000' => 1, - 'wrap' => 0, - 'output-bom' => 0, - //'char-encoding' => 'utf8', - //'input-encoding' => 'utf8', - //'output-encoding' => 'utf8' - ); - } - // clean up the HTML code - $tidy = tidy_parse_string($html, $tidy_options); - // fix the HTML - $tidy->cleanRepair(); - // get the CSS part - $tidy_head = tidy_get_head($tidy); - $css = $tidy_head->value; - $css = preg_replace('/]+)>/ims', ''; - // get the body part - $tidy_body = tidy_get_body($tidy); - $html = $tidy_body->value; - // fix some self-closing tags - $html = str_replace('
    ', '
    ', $html); - // remove some empty tag blocks - $html = preg_replace('/]*)><\/div>/', '', $html); - $html = preg_replace('/]*)><\/p>/', '', $html); - if (!TCPDF_STATIC::empty_string($tagvs)) { - // set vertical space for some XHTML tags - $tagvspaces = $tagvs; - } - // return the cleaned XHTML code + CSS - return $css.$html; - } - - /** - * Returns true if the CSS selector is valid for the selected HTML tag - * @param array $dom array of HTML tags and properties - * @param int $key key of the current HTML tag - * @param string $selector CSS selector string - * @return true if the selector is valid, false otherwise - * @since 5.1.000 (2010-05-25) - * @public static - */ - public static function isValidCSSSelectorForTag($dom, $key, $selector) { - $valid = false; // value to be returned - $tag = $dom[$key]['value']; - $class = array(); - if (isset($dom[$key]['attribute']['class']) AND !empty($dom[$key]['attribute']['class'])) { - $class = explode(' ', strtolower($dom[$key]['attribute']['class'])); - } - $id = ''; - if (isset($dom[$key]['attribute']['id']) AND !empty($dom[$key]['attribute']['id'])) { - $id = strtolower($dom[$key]['attribute']['id']); - } - $selector = preg_replace('/([\>\+\~\s]{1})([\.]{1})([^\>\+\~\s]*)/si', '\\1*.\\3', $selector); - $matches = array(); - if (preg_match_all('/([\>\+\~\s]{1})([a-zA-Z0-9\*]+)([^\>\+\~\s]*)/si', $selector, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE) > 0) { - $parentop = array_pop($matches[1]); - $operator = $parentop[0]; - $offset = $parentop[1]; - $lasttag = array_pop($matches[2]); - $lasttag = strtolower(trim($lasttag[0])); - if (($lasttag == '*') OR ($lasttag == $tag)) { - // the last element on selector is our tag or 'any tag' - $attrib = array_pop($matches[3]); - $attrib = strtolower(trim($attrib[0])); - if (!empty($attrib)) { - // check if matches class, id, attribute, pseudo-class or pseudo-element - switch ($attrib[0]) { - case '.': { // class - if (in_array(substr($attrib, 1), $class)) { - $valid = true; - } - break; - } - case '#': { // ID - if (substr($attrib, 1) == $id) { - $valid = true; - } - break; - } - case '[': { // attribute - $attrmatch = array(); - if (preg_match('/\[([a-zA-Z0-9]*)[\s]*([\~\^\$\*\|\=]*)[\s]*["]?([^"\]]*)["]?\]/i', $attrib, $attrmatch) > 0) { - $att = strtolower($attrmatch[1]); - $val = $attrmatch[3]; - if (isset($dom[$key]['attribute'][$att])) { - switch ($attrmatch[2]) { - case '=': { - if ($dom[$key]['attribute'][$att] == $val) { - $valid = true; - } - break; - } - case '~=': { - if (in_array($val, explode(' ', $dom[$key]['attribute'][$att]))) { - $valid = true; - } - break; - } - case '^=': { - if ($val == substr($dom[$key]['attribute'][$att], 0, strlen($val))) { - $valid = true; - } - break; - } - case '$=': { - if ($val == substr($dom[$key]['attribute'][$att], -strlen($val))) { - $valid = true; - } - break; - } - case '*=': { - if (strpos($dom[$key]['attribute'][$att], $val) !== false) { - $valid = true; - } - break; - } - case '|=': { - if ($dom[$key]['attribute'][$att] == $val) { - $valid = true; - } elseif (preg_match('/'.$val.'[\-]{1}/i', $dom[$key]['attribute'][$att]) > 0) { - $valid = true; - } - break; - } - default: { - $valid = true; - } - } - } - } - break; - } - case ':': { // pseudo-class or pseudo-element - if ($attrib[1] == ':') { // pseudo-element - // pseudo-elements are not supported! - // (::first-line, ::first-letter, ::before, ::after) - } else { // pseudo-class - // pseudo-classes are not supported! - // (:root, :nth-child(n), :nth-last-child(n), :nth-of-type(n), :nth-last-of-type(n), :first-child, :last-child, :first-of-type, :last-of-type, :only-child, :only-of-type, :empty, :link, :visited, :active, :hover, :focus, :target, :lang(fr), :enabled, :disabled, :checked) - } - break; - } - } // end of switch - } else { - $valid = true; - } - if ($valid AND ($offset > 0)) { - $valid = false; - // check remaining selector part - $selector = substr($selector, 0, $offset); - switch ($operator) { - case ' ': { // descendant of an element - while ($dom[$key]['parent'] > 0) { - if (self::isValidCSSSelectorForTag($dom, $dom[$key]['parent'], $selector)) { - $valid = true; - break; - } else { - $key = $dom[$key]['parent']; - } - } - break; - } - case '>': { // child of an element - $valid = self::isValidCSSSelectorForTag($dom, $dom[$key]['parent'], $selector); - break; - } - case '+': { // immediately preceded by an element - for ($i = ($key - 1); $i > $dom[$key]['parent']; --$i) { - if ($dom[$i]['tag'] AND $dom[$i]['opening']) { - $valid = self::isValidCSSSelectorForTag($dom, $i, $selector); - break; - } - } - break; - } - case '~': { // preceded by an element - for ($i = ($key - 1); $i > $dom[$key]['parent']; --$i) { - if ($dom[$i]['tag'] AND $dom[$i]['opening']) { - if (self::isValidCSSSelectorForTag($dom, $i, $selector)) { - break; - } - } - } - break; - } - } - } - } - } - return $valid; - } - - /** - * Returns the styles array that apply for the selected HTML tag. - * @param array $dom array of HTML tags and properties - * @param int $key key of the current HTML tag - * @param array $css array of CSS properties - * @return array containing CSS properties - * @since 5.1.000 (2010-05-25) - * @public static - */ - public static function getCSSdataArray($dom, $key, $css) { - $cssarray = array(); // style to be returned - // get parent CSS selectors - $selectors = array(); - if (isset($dom[($dom[$key]['parent'])]['csssel'])) { - $selectors = $dom[($dom[$key]['parent'])]['csssel']; - } - // get all styles that apply - foreach($css as $selector => $style) { - $pos = strpos($selector, ' '); - // get specificity - $specificity = substr($selector, 0, $pos); - // remove specificity - $selector = substr($selector, $pos); - // check if this selector apply to current tag - if (self::isValidCSSSelectorForTag($dom, $key, $selector)) { - if (!in_array($selector, $selectors)) { - // add style if not already added on parent selector - $cssarray[] = array('k' => $selector, 's' => $specificity, 'c' => $style); - $selectors[] = $selector; - } - } - } - if (isset($dom[$key]['attribute']['style'])) { - // attach inline style (latest properties have high priority) - $cssarray[] = array('k' => '', 's' => '1000', 'c' => $dom[$key]['attribute']['style']); - } - // order the css array to account for specificity - $cssordered = array(); - foreach ($cssarray as $key => $val) { - $skey = sprintf('%04d', $key); - $cssordered[$val['s'].'_'.$skey] = $val; - } - // sort selectors alphabetically to account for specificity - ksort($cssordered, SORT_STRING); - return array($selectors, $cssordered); - } - - /** - * Compact CSS data array into single string. - * @param array $css array of CSS properties - * @return string containing merged CSS properties - * @since 5.9.070 (2011-04-19) - * @public static - */ - public static function getTagStyleFromCSSarray($css) { - $tagstyle = ''; // value to be returned - foreach ($css as $style) { - // split single css commands - $csscmds = explode(';', $style['c']); - foreach ($csscmds as $cmd) { - if (!empty($cmd)) { - $pos = strpos($cmd, ':'); - if ($pos !== false) { - $cmd = substr($cmd, 0, ($pos + 1)); - if (strpos($tagstyle, $cmd) !== false) { - // remove duplicate commands (last commands have high priority) - $tagstyle = preg_replace('/'.$cmd.'[^;]+/i', '', $tagstyle); - } - } - } - } - $tagstyle .= ';'.$style['c']; - } - // remove multiple semicolons - $tagstyle = preg_replace('/[;]+/', ';', $tagstyle); - return $tagstyle; - } - - /** - * Returns the Roman representation of an integer number - * @param int $number number to convert - * @return string roman representation of the specified number - * @since 4.4.004 (2008-12-10) - * @public static - */ - public static function intToRoman($number) { - $roman = ''; - if ($number >= 4000) { - // do not represent numbers above 4000 in Roman numerals - return strval($number); - } - while ($number >= 1000) { - $roman .= 'M'; - $number -= 1000; - } - while ($number >= 900) { - $roman .= 'CM'; - $number -= 900; - } - while ($number >= 500) { - $roman .= 'D'; - $number -= 500; - } - while ($number >= 400) { - $roman .= 'CD'; - $number -= 400; - } - while ($number >= 100) { - $roman .= 'C'; - $number -= 100; - } - while ($number >= 90) { - $roman .= 'XC'; - $number -= 90; - } - while ($number >= 50) { - $roman .= 'L'; - $number -= 50; - } - while ($number >= 40) { - $roman .= 'XL'; - $number -= 40; - } - while ($number >= 10) { - $roman .= 'X'; - $number -= 10; - } - while ($number >= 9) { - $roman .= 'IX'; - $number -= 9; - } - while ($number >= 5) { - $roman .= 'V'; - $number -= 5; - } - while ($number >= 4) { - $roman .= 'IV'; - $number -= 4; - } - while ($number >= 1) { - $roman .= 'I'; - --$number; - } - return $roman; - } - - /** - * Find position of last occurrence of a substring in a string - * @param string $haystack The string to search in. - * @param string $needle substring to search. - * @param int $offset May be specified to begin searching an arbitrary number of characters into the string. - * @return int|false Returns the position where the needle exists. Returns FALSE if the needle was not found. - * @since 4.8.038 (2010-03-13) - * @public static - */ - public static function revstrpos($haystack, $needle, $offset = 0) { - $length = strlen($haystack); - $offset = ($offset > 0)?($length - $offset):abs($offset); - $pos = strpos(strrev($haystack), strrev($needle), $offset); - return ($pos === false)?false:($length - $pos - strlen($needle)); - } - - /** - * Returns an array of hyphenation patterns. - * @param string $file TEX file containing hypenation patterns. TEX patterns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ - * @return array of hyphenation patterns - * @author Nicola Asuni - * @since 4.9.012 (2010-04-12) - * @public static - */ - public static function getHyphenPatternsFromTEX($file) { - // TEX patterns are available at: - // http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ - $data = file_get_contents($file); - $patterns = array(); - // remove comments - $data = preg_replace('/\%[^\n]*/', '', $data); - // extract the patterns part - preg_match('/\\\\patterns\{([^\}]*)\}/i', $data, $matches); - $data = trim(substr($matches[0], 10, -1)); - // extract each pattern - $patterns_array = preg_split('/[\s]+/', $data); - // create new language array of patterns - $patterns = array(); - foreach($patterns_array as $val) { - if (!TCPDF_STATIC::empty_string($val)) { - $val = trim($val); - $val = str_replace('\'', '\\\'', $val); - $key = preg_replace('/[0-9]+/', '', $val); - $patterns[$key] = $val; - } - } - return $patterns; - } - - /** - * Get the Path-Painting Operators. - * @param string $style Style of rendering. Possible values are: - *
      - *
    • S or D: Stroke the path.
    • - *
    • s or d: Close and stroke the path.
    • - *
    • f or F: Fill the path, using the nonzero winding number rule to determine the region to fill.
    • - *
    • f* or F*: Fill the path, using the even-odd rule to determine the region to fill.
    • - *
    • B or FD or DF: Fill and then stroke the path, using the nonzero winding number rule to determine the region to fill.
    • - *
    • B* or F*D or DF*: Fill and then stroke the path, using the even-odd rule to determine the region to fill.
    • - *
    • b or fd or df: Close, fill, and then stroke the path, using the nonzero winding number rule to determine the region to fill.
    • - *
    • b or f*d or df*: Close, fill, and then stroke the path, using the even-odd rule to determine the region to fill.
    • - *
    • CNZ: Clipping mode using the even-odd rule to determine which regions lie inside the clipping path.
    • - *
    • CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path
    • - *
    • n: End the path object without filling or stroking it.
    • - *
    - * @param string $default default style - * @return string - * @author Nicola Asuni - * @since 5.0.000 (2010-04-30) - * @public static - */ - public static function getPathPaintOperator($style, $default='S') { - $op = ''; - switch($style) { - case 'S': - case 'D': { - $op = 'S'; - break; - } - case 's': - case 'd': { - $op = 's'; - break; - } - case 'f': - case 'F': { - $op = 'f'; - break; - } - case 'f*': - case 'F*': { - $op = 'f*'; - break; - } - case 'B': - case 'FD': - case 'DF': { - $op = 'B'; - break; - } - case 'B*': - case 'F*D': - case 'DF*': { - $op = 'B*'; - break; - } - case 'b': - case 'fd': - case 'df': { - $op = 'b'; - break; - } - case 'b*': - case 'f*d': - case 'df*': { - $op = 'b*'; - break; - } - case 'CNZ': { - $op = 'W n'; - break; - } - case 'CEO': { - $op = 'W* n'; - break; - } - case 'n': { - $op = 'n'; - break; - } - default: { - if (!empty($default)) { - $op = self::getPathPaintOperator($default, ''); - } else { - $op = ''; - } - } - } - return $op; - } - - /** - * Get the product of two SVG tranformation matrices - * @param array $ta first SVG tranformation matrix - * @param array $tb second SVG tranformation matrix - * @return array transformation array - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @public static - */ - public static function getTransformationMatrixProduct($ta, $tb) { - $tm = array(); - $tm[0] = ($ta[0] * $tb[0]) + ($ta[2] * $tb[1]); - $tm[1] = ($ta[1] * $tb[0]) + ($ta[3] * $tb[1]); - $tm[2] = ($ta[0] * $tb[2]) + ($ta[2] * $tb[3]); - $tm[3] = ($ta[1] * $tb[2]) + ($ta[3] * $tb[3]); - $tm[4] = ($ta[0] * $tb[4]) + ($ta[2] * $tb[5]) + $ta[4]; - $tm[5] = ($ta[1] * $tb[4]) + ($ta[3] * $tb[5]) + $ta[5]; - return $tm; - } - - /** - * Get the tranformation matrix from SVG transform attribute - * @param string $attribute transformation - * @return array of transformations - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @public static - */ - public static function getSVGTransformMatrix($attribute) { - // identity matrix - $tm = array(1, 0, 0, 1, 0, 0); - $transform = array(); - if (preg_match_all('/(matrix|translate|scale|rotate|skewX|skewY)[\s]*\(([^\)]+)\)/si', $attribute, $transform, PREG_SET_ORDER) > 0) { - foreach ($transform as $key => $data) { - if (!empty($data[2])) { - $a = 1; - $b = 0; - $c = 0; - $d = 1; - $e = 0; - $f = 0; - $regs = array(); - switch ($data[1]) { - case 'matrix': { - if (preg_match('/([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $a = $regs[1]; - $b = $regs[2]; - $c = $regs[3]; - $d = $regs[4]; - $e = $regs[5]; - $f = $regs[6]; - } - break; - } - case 'translate': { - if (preg_match('/([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $e = $regs[1]; - $f = $regs[2]; - } elseif (preg_match('/([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $e = $regs[1]; - } - break; - } - case 'scale': { - if (preg_match('/([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $a = $regs[1]; - $d = $regs[2]; - } elseif (preg_match('/([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $a = $regs[1]; - $d = $a; - } - break; - } - case 'rotate': { - if (preg_match('/([0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)[\,\s]+([a-z0-9\-\.]+)/si', $data[2], $regs)) { - $ang = deg2rad($regs[1]); - $x = $regs[2]; - $y = $regs[3]; - $a = cos($ang); - $b = sin($ang); - $c = -$b; - $d = $a; - $e = ($x * (1 - $a)) - ($y * $c); - $f = ($y * (1 - $d)) - ($x * $b); - } elseif (preg_match('/([0-9\-\.]+)/si', $data[2], $regs)) { - $ang = deg2rad($regs[1]); - $a = cos($ang); - $b = sin($ang); - $c = -$b; - $d = $a; - $e = 0; - $f = 0; - } - break; - } - case 'skewX': { - if (preg_match('/([0-9\-\.]+)/si', $data[2], $regs)) { - $c = tan(deg2rad($regs[1])); - } - break; - } - case 'skewY': { - if (preg_match('/([0-9\-\.]+)/si', $data[2], $regs)) { - $b = tan(deg2rad($regs[1])); - } - break; - } - } - $tm = self::getTransformationMatrixProduct($tm, array($a, $b, $c, $d, $e, $f)); - } - } - } - return $tm; - } - - /** - * Returns the angle in radiants between two vectors - * @param int $x1 X coordinate of first vector point - * @param int $y1 Y coordinate of first vector point - * @param int $x2 X coordinate of second vector point - * @param int $y2 Y coordinate of second vector point - * @author Nicola Asuni - * @since 5.0.000 (2010-05-04) - * @public static - */ - public static function getVectorsAngle($x1, $y1, $x2, $y2) { - $dprod = ($x1 * $x2) + ($y1 * $y2); - $dist1 = sqrt(($x1 * $x1) + ($y1 * $y1)); - $dist2 = sqrt(($x2 * $x2) + ($y2 * $y2)); - $angle = acos($dprod / ($dist1 * $dist2)); - if (is_nan($angle)) { - $angle = M_PI; - } - if ((($x1 * $y2) - ($x2 * $y1)) < 0) { - $angle *= -1; - } - return $angle; - } - - /** - * Split string by a regular expression. - * This is a wrapper for the preg_split function to avoid the bug: https://bugs.php.net/bug.php?id=45850 - * @param string $pattern The regular expression pattern to search for without the modifiers, as a string. - * @param string $modifiers The modifiers part of the pattern, - * @param string $subject The input string. - * @param int $limit If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or NULL means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter. - * @param int $flags The flags as specified on the preg_split PHP function. - * @return array Returns an array containing substrings of subject split along boundaries matched by pattern.modifier - * @author Nicola Asuni - * @since 6.0.023 - * @public static - */ - public static function pregSplit($pattern, $modifiers, $subject, $limit=NULL, $flags=NULL) { - // PHP 8.1 deprecates nulls for $limit and $flags - $limit = $limit === null ? -1 : $limit; - $flags = $flags === null ? 0 : $flags; - // the bug only happens on PHP 5.2 when using the u modifier - if ((strpos($modifiers, 'u') === FALSE) OR (count(preg_split('//u', "\n\t", -1, PREG_SPLIT_NO_EMPTY)) == 2)) { - return preg_split($pattern.$modifiers, $subject, $limit, $flags); - } - // preg_split is bugged - try alternative solution - $ret = array(); - while (($nl = strpos($subject, "\n")) !== FALSE) { - $ret = array_merge($ret, preg_split($pattern.$modifiers, substr($subject, 0, $nl), $limit, $flags)); - $ret[] = "\n"; - $subject = substr($subject, ($nl + 1)); - } - if (strlen($subject) > 0) { - $ret = array_merge($ret, preg_split($pattern.$modifiers, $subject, $limit, $flags)); - } - return $ret; - } - - /** - * Wrapper to use fopen only with local files - * @param string $filename Name of the file to open - * @param string $mode - * @return resource|false Returns a file pointer resource on success, or FALSE on error. - * @public static - */ - public static function fopenLocal($filename, $mode) { - if (strpos($filename, '://') === false) { - $filename = 'file://'.$filename; - } elseif (stream_is_local($filename) !== true) { - return false; - } - return fopen($filename, $mode); - } - - /** - * Check if the URL exist. - * @param string $url URL to check. - * @return bool Returns TRUE if the URL exists; FALSE otherwise. - * @public static - * @since 6.2.25 - */ - public static function url_exists($url) { - $crs = curl_init(); - // encode query params in URL to get right response form the server - $url = self::encodeUrlQuery($url); - curl_setopt($crs, CURLOPT_URL, $url); - curl_setopt($crs, CURLOPT_NOBODY, true); - curl_setopt($crs, CURLOPT_FAILONERROR, true); - if ((ini_get('open_basedir') == '') && (!ini_get('safe_mode'))) { - curl_setopt($crs, CURLOPT_FOLLOWLOCATION, true); - } - curl_setopt($crs, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($crs, CURLOPT_TIMEOUT, 30); - curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file'); - curl_setopt($crs, CURLOPT_MAXREDIRS, 5); - if (defined('CURLOPT_PROTOCOLS')) { - curl_setopt($crs, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP | CURLPROTO_FTP | CURLPROTO_FTPS); - } - curl_exec($crs); - $code = curl_getinfo($crs, CURLINFO_HTTP_CODE); - curl_close($crs); - return ($code == 200); - } - - /** - * Encode query params in URL - * - * @param string $url - * @return string - * @since 6.3.3 (2019-11-01) - * @public static - */ - public static function encodeUrlQuery($url) { - $urlData = parse_url($url); - if (isset($urlData['query']) && $urlData['query']) { - $urlQueryData = array(); - parse_str(urldecode($urlData['query']), $urlQueryData); - $updatedUrl = $urlData['scheme'] . '://' . $urlData['host'] . $urlData['path'] . '?' . http_build_query($urlQueryData); - } else { - $updatedUrl = $url; - } - return $updatedUrl; - } - - /** - * Wrapper for file_exists. - * Checks whether a file or directory exists. - * Only allows some protocols and local files. - * @param string $filename Path to the file or directory. - * @return bool Returns TRUE if the file or directory specified by filename exists; FALSE otherwise. - * @public static - */ - public static function file_exists($filename) { - if (preg_match('|^https?://|', $filename) == 1) { - return self::url_exists($filename); - } - if (strpos($filename, '://')) { - return false; // only support http and https wrappers for security reasons - } - return @file_exists($filename); - } - - /** - * Reads entire file into a string. - * The file can be also an URL. - * @param string $file Name of the file or URL to read. - * @return string|false The function returns the read data or FALSE on failure. - * @author Nicola Asuni - * @since 6.0.025 - * @public static - */ - public static function fileGetContents($file) { - $alt = array($file); - // - if ((strlen($file) > 1) - && ($file[0] === '/') - && ($file[1] !== '/') - && !empty($_SERVER['DOCUMENT_ROOT']) - && ($_SERVER['DOCUMENT_ROOT'] !== '/') - ) { - $findroot = strpos($file, $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) || ($findroot > 1)) { - $alt[] = htmlspecialchars_decode(urldecode($_SERVER['DOCUMENT_ROOT'].$file)); - } - } - // - $protocol = 'http'; - if (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) != 'off')) { - $protocol .= 's'; - } - // - $url = $file; - if (preg_match('%^//%', $url) && !empty($_SERVER['HTTP_HOST'])) { - $url = $protocol.':'.str_replace(' ', '%20', $url); - } - $url = htmlspecialchars_decode($url); - $alt[] = $url; - // - if (preg_match('%^(https?)://%', $url) - && empty($_SERVER['HTTP_HOST']) - && empty($_SERVER['DOCUMENT_ROOT']) - ) { - $urldata = parse_url($url); - if (empty($urldata['query'])) { - $host = $protocol.'://'.$_SERVER['HTTP_HOST']; - if (strpos($url, $host) === 0) { - // convert URL to full server path - $tmp = str_replace($host, $_SERVER['DOCUMENT_ROOT'], $url); - $alt[] = htmlspecialchars_decode(urldecode($tmp)); - } - } - } - // - if (isset($_SERVER['SCRIPT_URI']) - && !preg_match('%^(https?|ftp)://%', $file) - && !preg_match('%^//%', $file) - ) { - $urldata = @parse_url($_SERVER['SCRIPT_URI']); - $alt[] = $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file; - } - // - $alt = array_unique($alt); - foreach ($alt as $path) { - if (!self::file_exists($path)) { - continue; - } - $ret = @file_get_contents($path); - if ( $ret != false ) { - return $ret; - } - // try to use CURL for URLs - if (!ini_get('allow_url_fopen') - && function_exists('curl_init') - && preg_match('%^(https?|ftp)://%', $path) - ) { - // try to get remote file data using cURL - $crs = curl_init(); - curl_setopt($crs, CURLOPT_URL, $path); - curl_setopt($crs, CURLOPT_BINARYTRANSFER, true); - curl_setopt($crs, CURLOPT_FAILONERROR, true); - curl_setopt($crs, CURLOPT_RETURNTRANSFER, true); - if ((ini_get('open_basedir') == '') && (!ini_get('safe_mode'))) { - curl_setopt($crs, CURLOPT_FOLLOWLOCATION, true); - } - curl_setopt($crs, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($crs, CURLOPT_TIMEOUT, 30); - curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file'); - curl_setopt($crs, CURLOPT_MAXREDIRS, 5); - if (defined('CURLOPT_PROTOCOLS')) { - curl_setopt($crs, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP | CURLPROTO_FTP | CURLPROTO_FTPS); - } - $ret = curl_exec($crs); - curl_close($crs); - if ($ret !== false) { - return $ret; - } - } - } - return false; - } - - /** - * Get ULONG from string (Big Endian 32-bit unsigned integer). - * @param string $str string from where to extract value - * @param int $offset point from where to read the data - * @return int 32 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getULONG($str, $offset) { - $v = unpack('Ni', substr($str, $offset, 4)); - return $v['i']; - } - - /** - * Get USHORT from string (Big Endian 16-bit unsigned integer). - * @param string $str string from where to extract value - * @param int $offset point from where to read the data - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getUSHORT($str, $offset) { - $v = unpack('ni', substr($str, $offset, 2)); - return $v['i']; - } - - /** - * Get SHORT from string (Big Endian 16-bit signed integer). - * @param string $str String from where to extract value. - * @param int $offset Point from where to read the data. - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getSHORT($str, $offset) { - $v = unpack('si', substr($str, $offset, 2)); - return $v['i']; - } - - /** - * Get FWORD from string (Big Endian 16-bit signed integer). - * @param string $str String from where to extract value. - * @param int $offset Point from where to read the data. - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.9.123 (2011-09-30) - * @public static - */ - public static function _getFWORD($str, $offset) { - $v = self::_getUSHORT($str, $offset); - if ($v > 0x7fff) { - $v -= 0x10000; - } - return $v; - } - - /** - * Get UFWORD from string (Big Endian 16-bit unsigned integer). - * @param string $str string from where to extract value - * @param int $offset point from where to read the data - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.9.123 (2011-09-30) - * @public static - */ - public static function _getUFWORD($str, $offset) { - $v = self::_getUSHORT($str, $offset); - return $v; - } - - /** - * Get FIXED from string (32-bit signed fixed-point number (16.16). - * @param string $str string from where to extract value - * @param int $offset point from where to read the data - * @return int 16 bit value - * @author Nicola Asuni - * @since 5.9.123 (2011-09-30) - * @public static - */ - public static function _getFIXED($str, $offset) { - // mantissa - $m = self::_getFWORD($str, $offset); - // fraction - $f = self::_getUSHORT($str, ($offset + 2)); - $v = floatval(''.$m.'.'.$f.''); - return $v; - } - - /** - * Get BYTE from string (8-bit unsigned integer). - * @param string $str String from where to extract value. - * @param int $offset Point from where to read the data. - * @return int 8 bit value - * @author Nicola Asuni - * @since 5.2.000 (2010-06-02) - * @public static - */ - public static function _getBYTE($str, $offset) { - $v = unpack('Ci', substr($str, $offset, 1)); - return $v['i']; - } - /** - * Binary-safe and URL-safe file read. - * Reads up to length bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached. - * @param resource $handle - * @param int $length - * @return string|false Returns the read string or FALSE in case of error. - * @author Nicola Asuni - * @since 4.5.027 (2009-03-16) - * @public static - */ - public static function rfread($handle, $length) { - $data = fread($handle, $length); - if ($data === false) { - return false; - } - $rest = ($length - strlen($data)); - if (($rest > 0) && !feof($handle)) { - $data .= self::rfread($handle, $rest); - } - return $data; - } - - /** - * Read a 4-byte (32 bit) integer from file. - * @param resource $f file resource. - * @return int 4-byte integer - * @public static - */ - public static function _freadint($f) { - $a = unpack('Ni', fread($f, 4)); - return $a['i']; - } - - /** - * Array of page formats - * measures are calculated in this way: (inches * 72) or (millimeters * 72 / 25.4) - * @public static - * - * @var array - */ - public static $page_formats = array( - // ISO 216 A Series + 2 SIS 014711 extensions - 'A0' => array( 2383.937, 3370.394), // = ( 841 x 1189 ) mm = ( 33.11 x 46.81 ) in - 'A1' => array( 1683.780, 2383.937), // = ( 594 x 841 ) mm = ( 23.39 x 33.11 ) in - 'A2' => array( 1190.551, 1683.780), // = ( 420 x 594 ) mm = ( 16.54 x 23.39 ) in - 'A3' => array( 841.890, 1190.551), // = ( 297 x 420 ) mm = ( 11.69 x 16.54 ) in - 'A4' => array( 595.276, 841.890), // = ( 210 x 297 ) mm = ( 8.27 x 11.69 ) in - 'A5' => array( 419.528, 595.276), // = ( 148 x 210 ) mm = ( 5.83 x 8.27 ) in - 'A6' => array( 297.638, 419.528), // = ( 105 x 148 ) mm = ( 4.13 x 5.83 ) in - 'A7' => array( 209.764, 297.638), // = ( 74 x 105 ) mm = ( 2.91 x 4.13 ) in - 'A8' => array( 147.402, 209.764), // = ( 52 x 74 ) mm = ( 2.05 x 2.91 ) in - 'A9' => array( 104.882, 147.402), // = ( 37 x 52 ) mm = ( 1.46 x 2.05 ) in - 'A10' => array( 73.701, 104.882), // = ( 26 x 37 ) mm = ( 1.02 x 1.46 ) in - 'A11' => array( 51.024, 73.701), // = ( 18 x 26 ) mm = ( 0.71 x 1.02 ) in - 'A12' => array( 36.850, 51.024), // = ( 13 x 18 ) mm = ( 0.51 x 0.71 ) in - // ISO 216 B Series + 2 SIS 014711 extensions - 'B0' => array( 2834.646, 4008.189), // = ( 1000 x 1414 ) mm = ( 39.37 x 55.67 ) in - 'B1' => array( 2004.094, 2834.646), // = ( 707 x 1000 ) mm = ( 27.83 x 39.37 ) in - 'B2' => array( 1417.323, 2004.094), // = ( 500 x 707 ) mm = ( 19.69 x 27.83 ) in - 'B3' => array( 1000.630, 1417.323), // = ( 353 x 500 ) mm = ( 13.90 x 19.69 ) in - 'B4' => array( 708.661, 1000.630), // = ( 250 x 353 ) mm = ( 9.84 x 13.90 ) in - 'B5' => array( 498.898, 708.661), // = ( 176 x 250 ) mm = ( 6.93 x 9.84 ) in - 'B6' => array( 354.331, 498.898), // = ( 125 x 176 ) mm = ( 4.92 x 6.93 ) in - 'B7' => array( 249.449, 354.331), // = ( 88 x 125 ) mm = ( 3.46 x 4.92 ) in - 'B8' => array( 175.748, 249.449), // = ( 62 x 88 ) mm = ( 2.44 x 3.46 ) in - 'B9' => array( 124.724, 175.748), // = ( 44 x 62 ) mm = ( 1.73 x 2.44 ) in - 'B10' => array( 87.874, 124.724), // = ( 31 x 44 ) mm = ( 1.22 x 1.73 ) in - 'B11' => array( 62.362, 87.874), // = ( 22 x 31 ) mm = ( 0.87 x 1.22 ) in - 'B12' => array( 42.520, 62.362), // = ( 15 x 22 ) mm = ( 0.59 x 0.87 ) in - // ISO 216 C Series + 2 SIS 014711 extensions + 5 EXTENSION - 'C0' => array( 2599.370, 3676.535), // = ( 917 x 1297 ) mm = ( 36.10 x 51.06 ) in - 'C1' => array( 1836.850, 2599.370), // = ( 648 x 917 ) mm = ( 25.51 x 36.10 ) in - 'C2' => array( 1298.268, 1836.850), // = ( 458 x 648 ) mm = ( 18.03 x 25.51 ) in - 'C3' => array( 918.425, 1298.268), // = ( 324 x 458 ) mm = ( 12.76 x 18.03 ) in - 'C4' => array( 649.134, 918.425), // = ( 229 x 324 ) mm = ( 9.02 x 12.76 ) in - 'C5' => array( 459.213, 649.134), // = ( 162 x 229 ) mm = ( 6.38 x 9.02 ) in - 'C6' => array( 323.150, 459.213), // = ( 114 x 162 ) mm = ( 4.49 x 6.38 ) in - 'C7' => array( 229.606, 323.150), // = ( 81 x 114 ) mm = ( 3.19 x 4.49 ) in - 'C8' => array( 161.575, 229.606), // = ( 57 x 81 ) mm = ( 2.24 x 3.19 ) in - 'C9' => array( 113.386, 161.575), // = ( 40 x 57 ) mm = ( 1.57 x 2.24 ) in - 'C10' => array( 79.370, 113.386), // = ( 28 x 40 ) mm = ( 1.10 x 1.57 ) in - 'C11' => array( 56.693, 79.370), // = ( 20 x 28 ) mm = ( 0.79 x 1.10 ) in - 'C12' => array( 39.685, 56.693), // = ( 14 x 20 ) mm = ( 0.55 x 0.79 ) in - 'C76' => array( 229.606, 459.213), // = ( 81 x 162 ) mm = ( 3.19 x 6.38 ) in - 'DL' => array( 311.811, 623.622), // = ( 110 x 220 ) mm = ( 4.33 x 8.66 ) in - 'DLE' => array( 323.150, 637.795), // = ( 114 x 225 ) mm = ( 4.49 x 8.86 ) in - 'DLX' => array( 340.158, 666.142), // = ( 120 x 235 ) mm = ( 4.72 x 9.25 ) in - 'DLP' => array( 280.630, 595.276), // = ( 99 x 210 ) mm = ( 3.90 x 8.27 ) in (1/3 A4) - // SIS 014711 E Series - 'E0' => array( 2491.654, 3517.795), // = ( 879 x 1241 ) mm = ( 34.61 x 48.86 ) in - 'E1' => array( 1757.480, 2491.654), // = ( 620 x 879 ) mm = ( 24.41 x 34.61 ) in - 'E2' => array( 1247.244, 1757.480), // = ( 440 x 620 ) mm = ( 17.32 x 24.41 ) in - 'E3' => array( 878.740, 1247.244), // = ( 310 x 440 ) mm = ( 12.20 x 17.32 ) in - 'E4' => array( 623.622, 878.740), // = ( 220 x 310 ) mm = ( 8.66 x 12.20 ) in - 'E5' => array( 439.370, 623.622), // = ( 155 x 220 ) mm = ( 6.10 x 8.66 ) in - 'E6' => array( 311.811, 439.370), // = ( 110 x 155 ) mm = ( 4.33 x 6.10 ) in - 'E7' => array( 221.102, 311.811), // = ( 78 x 110 ) mm = ( 3.07 x 4.33 ) in - 'E8' => array( 155.906, 221.102), // = ( 55 x 78 ) mm = ( 2.17 x 3.07 ) in - 'E9' => array( 110.551, 155.906), // = ( 39 x 55 ) mm = ( 1.54 x 2.17 ) in - 'E10' => array( 76.535, 110.551), // = ( 27 x 39 ) mm = ( 1.06 x 1.54 ) in - 'E11' => array( 53.858, 76.535), // = ( 19 x 27 ) mm = ( 0.75 x 1.06 ) in - 'E12' => array( 36.850, 53.858), // = ( 13 x 19 ) mm = ( 0.51 x 0.75 ) in - // SIS 014711 G Series - 'G0' => array( 2715.591, 3838.110), // = ( 958 x 1354 ) mm = ( 37.72 x 53.31 ) in - 'G1' => array( 1919.055, 2715.591), // = ( 677 x 958 ) mm = ( 26.65 x 37.72 ) in - 'G2' => array( 1357.795, 1919.055), // = ( 479 x 677 ) mm = ( 18.86 x 26.65 ) in - 'G3' => array( 958.110, 1357.795), // = ( 338 x 479 ) mm = ( 13.31 x 18.86 ) in - 'G4' => array( 677.480, 958.110), // = ( 239 x 338 ) mm = ( 9.41 x 13.31 ) in - 'G5' => array( 479.055, 677.480), // = ( 169 x 239 ) mm = ( 6.65 x 9.41 ) in - 'G6' => array( 337.323, 479.055), // = ( 119 x 169 ) mm = ( 4.69 x 6.65 ) in - 'G7' => array( 238.110, 337.323), // = ( 84 x 119 ) mm = ( 3.31 x 4.69 ) in - 'G8' => array( 167.244, 238.110), // = ( 59 x 84 ) mm = ( 2.32 x 3.31 ) in - 'G9' => array( 119.055, 167.244), // = ( 42 x 59 ) mm = ( 1.65 x 2.32 ) in - 'G10' => array( 82.205, 119.055), // = ( 29 x 42 ) mm = ( 1.14 x 1.65 ) in - 'G11' => array( 59.528, 82.205), // = ( 21 x 29 ) mm = ( 0.83 x 1.14 ) in - 'G12' => array( 39.685, 59.528), // = ( 14 x 21 ) mm = ( 0.55 x 0.83 ) in - // ISO Press - 'RA0' => array( 2437.795, 3458.268), // = ( 860 x 1220 ) mm = ( 33.86 x 48.03 ) in - 'RA1' => array( 1729.134, 2437.795), // = ( 610 x 860 ) mm = ( 24.02 x 33.86 ) in - 'RA2' => array( 1218.898, 1729.134), // = ( 430 x 610 ) mm = ( 16.93 x 24.02 ) in - 'RA3' => array( 864.567, 1218.898), // = ( 305 x 430 ) mm = ( 12.01 x 16.93 ) in - 'RA4' => array( 609.449, 864.567), // = ( 215 x 305 ) mm = ( 8.46 x 12.01 ) in - 'SRA0' => array( 2551.181, 3628.346), // = ( 900 x 1280 ) mm = ( 35.43 x 50.39 ) in - 'SRA1' => array( 1814.173, 2551.181), // = ( 640 x 900 ) mm = ( 25.20 x 35.43 ) in - 'SRA2' => array( 1275.591, 1814.173), // = ( 450 x 640 ) mm = ( 17.72 x 25.20 ) in - 'SRA3' => array( 907.087, 1275.591), // = ( 320 x 450 ) mm = ( 12.60 x 17.72 ) in - 'SRA4' => array( 637.795, 907.087), // = ( 225 x 320 ) mm = ( 8.86 x 12.60 ) in - // German DIN 476 - '4A0' => array( 4767.874, 6740.787), // = ( 1682 x 2378 ) mm = ( 66.22 x 93.62 ) in - '2A0' => array( 3370.394, 4767.874), // = ( 1189 x 1682 ) mm = ( 46.81 x 66.22 ) in - // Variations on the ISO Standard - 'A2_EXTRA' => array( 1261.417, 1754.646), // = ( 445 x 619 ) mm = ( 17.52 x 24.37 ) in - 'A3+' => array( 932.598, 1369.134), // = ( 329 x 483 ) mm = ( 12.95 x 19.02 ) in - 'A3_EXTRA' => array( 912.756, 1261.417), // = ( 322 x 445 ) mm = ( 12.68 x 17.52 ) in - 'A3_SUPER' => array( 864.567, 1440.000), // = ( 305 x 508 ) mm = ( 12.01 x 20.00 ) in - 'SUPER_A3' => array( 864.567, 1380.472), // = ( 305 x 487 ) mm = ( 12.01 x 19.17 ) in - 'A4_EXTRA' => array( 666.142, 912.756), // = ( 235 x 322 ) mm = ( 9.25 x 12.68 ) in - 'A4_SUPER' => array( 649.134, 912.756), // = ( 229 x 322 ) mm = ( 9.02 x 12.68 ) in - 'SUPER_A4' => array( 643.465, 1009.134), // = ( 227 x 356 ) mm = ( 8.94 x 14.02 ) in - 'A4_LONG' => array( 595.276, 986.457), // = ( 210 x 348 ) mm = ( 8.27 x 13.70 ) in - 'F4' => array( 595.276, 935.433), // = ( 210 x 330 ) mm = ( 8.27 x 12.99 ) in - 'SO_B5_EXTRA' => array( 572.598, 782.362), // = ( 202 x 276 ) mm = ( 7.95 x 10.87 ) in - 'A5_EXTRA' => array( 490.394, 666.142), // = ( 173 x 235 ) mm = ( 6.81 x 9.25 ) in - // ANSI Series - 'ANSI_E' => array( 2448.000, 3168.000), // = ( 864 x 1118 ) mm = ( 34.00 x 44.00 ) in - 'ANSI_D' => array( 1584.000, 2448.000), // = ( 559 x 864 ) mm = ( 22.00 x 34.00 ) in - 'ANSI_C' => array( 1224.000, 1584.000), // = ( 432 x 559 ) mm = ( 17.00 x 22.00 ) in - 'ANSI_B' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'ANSI_A' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - // Traditional 'Loose' North American Paper Sizes - 'USLEDGER' => array( 1224.000, 792.000), // = ( 432 x 279 ) mm = ( 17.00 x 11.00 ) in - 'LEDGER' => array( 1224.000, 792.000), // = ( 432 x 279 ) mm = ( 17.00 x 11.00 ) in - 'ORGANIZERK' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'BIBLE' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'USTABLOID' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'TABLOID' => array( 792.000, 1224.000), // = ( 279 x 432 ) mm = ( 11.00 x 17.00 ) in - 'ORGANIZERM' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - 'USLETTER' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - 'LETTER' => array( 612.000, 792.000), // = ( 216 x 279 ) mm = ( 8.50 x 11.00 ) in - 'USLEGAL' => array( 612.000, 1008.000), // = ( 216 x 356 ) mm = ( 8.50 x 14.00 ) in - 'LEGAL' => array( 612.000, 1008.000), // = ( 216 x 356 ) mm = ( 8.50 x 14.00 ) in - 'GOVERNMENTLETTER' => array( 576.000, 756.000), // = ( 203 x 267 ) mm = ( 8.00 x 10.50 ) in - 'GLETTER' => array( 576.000, 756.000), // = ( 203 x 267 ) mm = ( 8.00 x 10.50 ) in - 'JUNIORLEGAL' => array( 576.000, 360.000), // = ( 203 x 127 ) mm = ( 8.00 x 5.00 ) in - 'JLEGAL' => array( 576.000, 360.000), // = ( 203 x 127 ) mm = ( 8.00 x 5.00 ) in - // Other North American Paper Sizes - 'QUADDEMY' => array( 2520.000, 3240.000), // = ( 889 x 1143 ) mm = ( 35.00 x 45.00 ) in - 'SUPER_B' => array( 936.000, 1368.000), // = ( 330 x 483 ) mm = ( 13.00 x 19.00 ) in - 'QUARTO' => array( 648.000, 792.000), // = ( 229 x 279 ) mm = ( 9.00 x 11.00 ) in - 'GOVERNMENTLEGAL' => array( 612.000, 936.000), // = ( 216 x 330 ) mm = ( 8.50 x 13.00 ) in - 'FOLIO' => array( 612.000, 936.000), // = ( 216 x 330 ) mm = ( 8.50 x 13.00 ) in - 'MONARCH' => array( 522.000, 756.000), // = ( 184 x 267 ) mm = ( 7.25 x 10.50 ) in - 'EXECUTIVE' => array( 522.000, 756.000), // = ( 184 x 267 ) mm = ( 7.25 x 10.50 ) in - 'ORGANIZERL' => array( 396.000, 612.000), // = ( 140 x 216 ) mm = ( 5.50 x 8.50 ) in - 'STATEMENT' => array( 396.000, 612.000), // = ( 140 x 216 ) mm = ( 5.50 x 8.50 ) in - 'MEMO' => array( 396.000, 612.000), // = ( 140 x 216 ) mm = ( 5.50 x 8.50 ) in - 'FOOLSCAP' => array( 595.440, 936.000), // = ( 210 x 330 ) mm = ( 8.27 x 13.00 ) in - 'COMPACT' => array( 306.000, 486.000), // = ( 108 x 171 ) mm = ( 4.25 x 6.75 ) in - 'ORGANIZERJ' => array( 198.000, 360.000), // = ( 70 x 127 ) mm = ( 2.75 x 5.00 ) in - // Canadian standard CAN 2-9.60M - 'P1' => array( 1587.402, 2437.795), // = ( 560 x 860 ) mm = ( 22.05 x 33.86 ) in - 'P2' => array( 1218.898, 1587.402), // = ( 430 x 560 ) mm = ( 16.93 x 22.05 ) in - 'P3' => array( 793.701, 1218.898), // = ( 280 x 430 ) mm = ( 11.02 x 16.93 ) in - 'P4' => array( 609.449, 793.701), // = ( 215 x 280 ) mm = ( 8.46 x 11.02 ) in - 'P5' => array( 396.850, 609.449), // = ( 140 x 215 ) mm = ( 5.51 x 8.46 ) in - 'P6' => array( 303.307, 396.850), // = ( 107 x 140 ) mm = ( 4.21 x 5.51 ) in - // North American Architectural Sizes - 'ARCH_E' => array( 2592.000, 3456.000), // = ( 914 x 1219 ) mm = ( 36.00 x 48.00 ) in - 'ARCH_E1' => array( 2160.000, 3024.000), // = ( 762 x 1067 ) mm = ( 30.00 x 42.00 ) in - 'ARCH_D' => array( 1728.000, 2592.000), // = ( 610 x 914 ) mm = ( 24.00 x 36.00 ) in - 'BROADSHEET' => array( 1296.000, 1728.000), // = ( 457 x 610 ) mm = ( 18.00 x 24.00 ) in - 'ARCH_C' => array( 1296.000, 1728.000), // = ( 457 x 610 ) mm = ( 18.00 x 24.00 ) in - 'ARCH_B' => array( 864.000, 1296.000), // = ( 305 x 457 ) mm = ( 12.00 x 18.00 ) in - 'ARCH_A' => array( 648.000, 864.000), // = ( 229 x 305 ) mm = ( 9.00 x 12.00 ) in - // -- North American Envelope Sizes - // - Announcement Envelopes - 'ANNENV_A2' => array( 314.640, 414.000), // = ( 111 x 146 ) mm = ( 4.37 x 5.75 ) in - 'ANNENV_A6' => array( 342.000, 468.000), // = ( 121 x 165 ) mm = ( 4.75 x 6.50 ) in - 'ANNENV_A7' => array( 378.000, 522.000), // = ( 133 x 184 ) mm = ( 5.25 x 7.25 ) in - 'ANNENV_A8' => array( 396.000, 584.640), // = ( 140 x 206 ) mm = ( 5.50 x 8.12 ) in - 'ANNENV_A10' => array( 450.000, 692.640), // = ( 159 x 244 ) mm = ( 6.25 x 9.62 ) in - 'ANNENV_SLIM' => array( 278.640, 638.640), // = ( 98 x 225 ) mm = ( 3.87 x 8.87 ) in - // - Commercial Envelopes - 'COMMENV_N6_1/4' => array( 252.000, 432.000), // = ( 89 x 152 ) mm = ( 3.50 x 6.00 ) in - 'COMMENV_N6_3/4' => array( 260.640, 468.000), // = ( 92 x 165 ) mm = ( 3.62 x 6.50 ) in - 'COMMENV_N8' => array( 278.640, 540.000), // = ( 98 x 191 ) mm = ( 3.87 x 7.50 ) in - 'COMMENV_N9' => array( 278.640, 638.640), // = ( 98 x 225 ) mm = ( 3.87 x 8.87 ) in - 'COMMENV_N10' => array( 296.640, 684.000), // = ( 105 x 241 ) mm = ( 4.12 x 9.50 ) in - 'COMMENV_N11' => array( 324.000, 746.640), // = ( 114 x 263 ) mm = ( 4.50 x 10.37 ) in - 'COMMENV_N12' => array( 342.000, 792.000), // = ( 121 x 279 ) mm = ( 4.75 x 11.00 ) in - 'COMMENV_N14' => array( 360.000, 828.000), // = ( 127 x 292 ) mm = ( 5.00 x 11.50 ) in - // - Catalogue Envelopes - 'CATENV_N1' => array( 432.000, 648.000), // = ( 152 x 229 ) mm = ( 6.00 x 9.00 ) in - 'CATENV_N1_3/4' => array( 468.000, 684.000), // = ( 165 x 241 ) mm = ( 6.50 x 9.50 ) in - 'CATENV_N2' => array( 468.000, 720.000), // = ( 165 x 254 ) mm = ( 6.50 x 10.00 ) in - 'CATENV_N3' => array( 504.000, 720.000), // = ( 178 x 254 ) mm = ( 7.00 x 10.00 ) in - 'CATENV_N6' => array( 540.000, 756.000), // = ( 191 x 267 ) mm = ( 7.50 x 10.50 ) in - 'CATENV_N7' => array( 576.000, 792.000), // = ( 203 x 279 ) mm = ( 8.00 x 11.00 ) in - 'CATENV_N8' => array( 594.000, 810.000), // = ( 210 x 286 ) mm = ( 8.25 x 11.25 ) in - 'CATENV_N9_1/2' => array( 612.000, 756.000), // = ( 216 x 267 ) mm = ( 8.50 x 10.50 ) in - 'CATENV_N9_3/4' => array( 630.000, 810.000), // = ( 222 x 286 ) mm = ( 8.75 x 11.25 ) in - 'CATENV_N10_1/2' => array( 648.000, 864.000), // = ( 229 x 305 ) mm = ( 9.00 x 12.00 ) in - 'CATENV_N12_1/2' => array( 684.000, 900.000), // = ( 241 x 318 ) mm = ( 9.50 x 12.50 ) in - 'CATENV_N13_1/2' => array( 720.000, 936.000), // = ( 254 x 330 ) mm = ( 10.00 x 13.00 ) in - 'CATENV_N14_1/4' => array( 810.000, 882.000), // = ( 286 x 311 ) mm = ( 11.25 x 12.25 ) in - 'CATENV_N14_1/2' => array( 828.000, 1044.000), // = ( 292 x 368 ) mm = ( 11.50 x 14.50 ) in - // Japanese (JIS P 0138-61) Standard B-Series - 'JIS_B0' => array( 2919.685, 4127.244), // = ( 1030 x 1456 ) mm = ( 40.55 x 57.32 ) in - 'JIS_B1' => array( 2063.622, 2919.685), // = ( 728 x 1030 ) mm = ( 28.66 x 40.55 ) in - 'JIS_B2' => array( 1459.843, 2063.622), // = ( 515 x 728 ) mm = ( 20.28 x 28.66 ) in - 'JIS_B3' => array( 1031.811, 1459.843), // = ( 364 x 515 ) mm = ( 14.33 x 20.28 ) in - 'JIS_B4' => array( 728.504, 1031.811), // = ( 257 x 364 ) mm = ( 10.12 x 14.33 ) in - 'JIS_B5' => array( 515.906, 728.504), // = ( 182 x 257 ) mm = ( 7.17 x 10.12 ) in - 'JIS_B6' => array( 362.835, 515.906), // = ( 128 x 182 ) mm = ( 5.04 x 7.17 ) in - 'JIS_B7' => array( 257.953, 362.835), // = ( 91 x 128 ) mm = ( 3.58 x 5.04 ) in - 'JIS_B8' => array( 181.417, 257.953), // = ( 64 x 91 ) mm = ( 2.52 x 3.58 ) in - 'JIS_B9' => array( 127.559, 181.417), // = ( 45 x 64 ) mm = ( 1.77 x 2.52 ) in - 'JIS_B10' => array( 90.709, 127.559), // = ( 32 x 45 ) mm = ( 1.26 x 1.77 ) in - 'JIS_B11' => array( 62.362, 90.709), // = ( 22 x 32 ) mm = ( 0.87 x 1.26 ) in - 'JIS_B12' => array( 45.354, 62.362), // = ( 16 x 22 ) mm = ( 0.63 x 0.87 ) in - // PA Series - 'PA0' => array( 2381.102, 3174.803), // = ( 840 x 1120 ) mm = ( 33.07 x 44.09 ) in - 'PA1' => array( 1587.402, 2381.102), // = ( 560 x 840 ) mm = ( 22.05 x 33.07 ) in - 'PA2' => array( 1190.551, 1587.402), // = ( 420 x 560 ) mm = ( 16.54 x 22.05 ) in - 'PA3' => array( 793.701, 1190.551), // = ( 280 x 420 ) mm = ( 11.02 x 16.54 ) in - 'PA4' => array( 595.276, 793.701), // = ( 210 x 280 ) mm = ( 8.27 x 11.02 ) in - 'PA5' => array( 396.850, 595.276), // = ( 140 x 210 ) mm = ( 5.51 x 8.27 ) in - 'PA6' => array( 297.638, 396.850), // = ( 105 x 140 ) mm = ( 4.13 x 5.51 ) in - 'PA7' => array( 198.425, 297.638), // = ( 70 x 105 ) mm = ( 2.76 x 4.13 ) in - 'PA8' => array( 147.402, 198.425), // = ( 52 x 70 ) mm = ( 2.05 x 2.76 ) in - 'PA9' => array( 99.213, 147.402), // = ( 35 x 52 ) mm = ( 1.38 x 2.05 ) in - 'PA10' => array( 73.701, 99.213), // = ( 26 x 35 ) mm = ( 1.02 x 1.38 ) in - // Standard Photographic Print Sizes - 'PASSPORT_PHOTO' => array( 99.213, 127.559), // = ( 35 x 45 ) mm = ( 1.38 x 1.77 ) in - 'E' => array( 233.858, 340.157), // = ( 82 x 120 ) mm = ( 3.25 x 4.72 ) in - 'L' => array( 252.283, 360.000), // = ( 89 x 127 ) mm = ( 3.50 x 5.00 ) in - '3R' => array( 252.283, 360.000), // = ( 89 x 127 ) mm = ( 3.50 x 5.00 ) in - 'KG' => array( 289.134, 430.866), // = ( 102 x 152 ) mm = ( 4.02 x 5.98 ) in - '4R' => array( 289.134, 430.866), // = ( 102 x 152 ) mm = ( 4.02 x 5.98 ) in - '4D' => array( 340.157, 430.866), // = ( 120 x 152 ) mm = ( 4.72 x 5.98 ) in - '2L' => array( 360.000, 504.567), // = ( 127 x 178 ) mm = ( 5.00 x 7.01 ) in - '5R' => array( 360.000, 504.567), // = ( 127 x 178 ) mm = ( 5.00 x 7.01 ) in - '8P' => array( 430.866, 575.433), // = ( 152 x 203 ) mm = ( 5.98 x 7.99 ) in - '6R' => array( 430.866, 575.433), // = ( 152 x 203 ) mm = ( 5.98 x 7.99 ) in - '6P' => array( 575.433, 720.000), // = ( 203 x 254 ) mm = ( 7.99 x 10.00 ) in - '8R' => array( 575.433, 720.000), // = ( 203 x 254 ) mm = ( 7.99 x 10.00 ) in - '6PW' => array( 575.433, 864.567), // = ( 203 x 305 ) mm = ( 7.99 x 12.01 ) in - 'S8R' => array( 575.433, 864.567), // = ( 203 x 305 ) mm = ( 7.99 x 12.01 ) in - '4P' => array( 720.000, 864.567), // = ( 254 x 305 ) mm = ( 10.00 x 12.01 ) in - '10R' => array( 720.000, 864.567), // = ( 254 x 305 ) mm = ( 10.00 x 12.01 ) in - '4PW' => array( 720.000, 1080.000), // = ( 254 x 381 ) mm = ( 10.00 x 15.00 ) in - 'S10R' => array( 720.000, 1080.000), // = ( 254 x 381 ) mm = ( 10.00 x 15.00 ) in - '11R' => array( 790.866, 1009.134), // = ( 279 x 356 ) mm = ( 10.98 x 14.02 ) in - 'S11R' => array( 790.866, 1224.567), // = ( 279 x 432 ) mm = ( 10.98 x 17.01 ) in - '12R' => array( 864.567, 1080.000), // = ( 305 x 381 ) mm = ( 12.01 x 15.00 ) in - 'S12R' => array( 864.567, 1292.598), // = ( 305 x 456 ) mm = ( 12.01 x 17.95 ) in - // Common Newspaper Sizes - 'NEWSPAPER_BROADSHEET' => array( 2125.984, 1700.787), // = ( 750 x 600 ) mm = ( 29.53 x 23.62 ) in - 'NEWSPAPER_BERLINER' => array( 1332.283, 892.913), // = ( 470 x 315 ) mm = ( 18.50 x 12.40 ) in - 'NEWSPAPER_TABLOID' => array( 1218.898, 793.701), // = ( 430 x 280 ) mm = ( 16.93 x 11.02 ) in - 'NEWSPAPER_COMPACT' => array( 1218.898, 793.701), // = ( 430 x 280 ) mm = ( 16.93 x 11.02 ) in - // Business Cards - 'CREDIT_CARD' => array( 153.014, 242.646), // = ( 54 x 86 ) mm = ( 2.13 x 3.37 ) in - 'BUSINESS_CARD' => array( 153.014, 242.646), // = ( 54 x 86 ) mm = ( 2.13 x 3.37 ) in - 'BUSINESS_CARD_ISO7810' => array( 153.014, 242.646), // = ( 54 x 86 ) mm = ( 2.13 x 3.37 ) in - 'BUSINESS_CARD_ISO216' => array( 147.402, 209.764), // = ( 52 x 74 ) mm = ( 2.05 x 2.91 ) in - 'BUSINESS_CARD_IT' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_UK' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_FR' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_DE' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_ES' => array( 155.906, 240.945), // = ( 55 x 85 ) mm = ( 2.17 x 3.35 ) in - 'BUSINESS_CARD_CA' => array( 144.567, 252.283), // = ( 51 x 89 ) mm = ( 2.01 x 3.50 ) in - 'BUSINESS_CARD_US' => array( 144.567, 252.283), // = ( 51 x 89 ) mm = ( 2.01 x 3.50 ) in - 'BUSINESS_CARD_JP' => array( 155.906, 257.953), // = ( 55 x 91 ) mm = ( 2.17 x 3.58 ) in - 'BUSINESS_CARD_HK' => array( 153.071, 255.118), // = ( 54 x 90 ) mm = ( 2.13 x 3.54 ) in - 'BUSINESS_CARD_AU' => array( 155.906, 255.118), // = ( 55 x 90 ) mm = ( 2.17 x 3.54 ) in - 'BUSINESS_CARD_DK' => array( 155.906, 255.118), // = ( 55 x 90 ) mm = ( 2.17 x 3.54 ) in - 'BUSINESS_CARD_SE' => array( 155.906, 255.118), // = ( 55 x 90 ) mm = ( 2.17 x 3.54 ) in - 'BUSINESS_CARD_RU' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_CZ' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_FI' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_HU' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - 'BUSINESS_CARD_IL' => array( 141.732, 255.118), // = ( 50 x 90 ) mm = ( 1.97 x 3.54 ) in - // Billboards - '4SHEET' => array( 2880.000, 4320.000), // = ( 1016 x 1524 ) mm = ( 40.00 x 60.00 ) in - '6SHEET' => array( 3401.575, 5102.362), // = ( 1200 x 1800 ) mm = ( 47.24 x 70.87 ) in - '12SHEET' => array( 8640.000, 4320.000), // = ( 3048 x 1524 ) mm = (120.00 x 60.00 ) in - '16SHEET' => array( 5760.000, 8640.000), // = ( 2032 x 3048 ) mm = ( 80.00 x 120.00) in - '32SHEET' => array(11520.000, 8640.000), // = ( 4064 x 3048 ) mm = (160.00 x 120.00) in - '48SHEET' => array(17280.000, 8640.000), // = ( 6096 x 3048 ) mm = (240.00 x 120.00) in - '64SHEET' => array(23040.000, 8640.000), // = ( 8128 x 3048 ) mm = (320.00 x 120.00) in - '96SHEET' => array(34560.000, 8640.000), // = (12192 x 3048 ) mm = (480.00 x 120.00) in - // -- Old European Sizes - // - Old Imperial English Sizes - 'EN_EMPEROR' => array( 3456.000, 5184.000), // = ( 1219 x 1829 ) mm = ( 48.00 x 72.00 ) in - 'EN_ANTIQUARIAN' => array( 2232.000, 3816.000), // = ( 787 x 1346 ) mm = ( 31.00 x 53.00 ) in - 'EN_GRAND_EAGLE' => array( 2070.000, 3024.000), // = ( 730 x 1067 ) mm = ( 28.75 x 42.00 ) in - 'EN_DOUBLE_ELEPHANT' => array( 1926.000, 2880.000), // = ( 679 x 1016 ) mm = ( 26.75 x 40.00 ) in - 'EN_ATLAS' => array( 1872.000, 2448.000), // = ( 660 x 864 ) mm = ( 26.00 x 34.00 ) in - 'EN_COLOMBIER' => array( 1692.000, 2484.000), // = ( 597 x 876 ) mm = ( 23.50 x 34.50 ) in - 'EN_ELEPHANT' => array( 1656.000, 2016.000), // = ( 584 x 711 ) mm = ( 23.00 x 28.00 ) in - 'EN_DOUBLE_DEMY' => array( 1620.000, 2556.000), // = ( 572 x 902 ) mm = ( 22.50 x 35.50 ) in - 'EN_IMPERIAL' => array( 1584.000, 2160.000), // = ( 559 x 762 ) mm = ( 22.00 x 30.00 ) in - 'EN_PRINCESS' => array( 1548.000, 2016.000), // = ( 546 x 711 ) mm = ( 21.50 x 28.00 ) in - 'EN_CARTRIDGE' => array( 1512.000, 1872.000), // = ( 533 x 660 ) mm = ( 21.00 x 26.00 ) in - 'EN_DOUBLE_LARGE_POST' => array( 1512.000, 2376.000), // = ( 533 x 838 ) mm = ( 21.00 x 33.00 ) in - 'EN_ROYAL' => array( 1440.000, 1800.000), // = ( 508 x 635 ) mm = ( 20.00 x 25.00 ) in - 'EN_SHEET' => array( 1404.000, 1692.000), // = ( 495 x 597 ) mm = ( 19.50 x 23.50 ) in - 'EN_HALF_POST' => array( 1404.000, 1692.000), // = ( 495 x 597 ) mm = ( 19.50 x 23.50 ) in - 'EN_SUPER_ROYAL' => array( 1368.000, 1944.000), // = ( 483 x 686 ) mm = ( 19.00 x 27.00 ) in - 'EN_DOUBLE_POST' => array( 1368.000, 2196.000), // = ( 483 x 775 ) mm = ( 19.00 x 30.50 ) in - 'EN_MEDIUM' => array( 1260.000, 1656.000), // = ( 445 x 584 ) mm = ( 17.50 x 23.00 ) in - 'EN_DEMY' => array( 1260.000, 1620.000), // = ( 445 x 572 ) mm = ( 17.50 x 22.50 ) in - 'EN_LARGE_POST' => array( 1188.000, 1512.000), // = ( 419 x 533 ) mm = ( 16.50 x 21.00 ) in - 'EN_COPY_DRAUGHT' => array( 1152.000, 1440.000), // = ( 406 x 508 ) mm = ( 16.00 x 20.00 ) in - 'EN_POST' => array( 1116.000, 1386.000), // = ( 394 x 489 ) mm = ( 15.50 x 19.25 ) in - 'EN_CROWN' => array( 1080.000, 1440.000), // = ( 381 x 508 ) mm = ( 15.00 x 20.00 ) in - 'EN_PINCHED_POST' => array( 1062.000, 1332.000), // = ( 375 x 470 ) mm = ( 14.75 x 18.50 ) in - 'EN_BRIEF' => array( 972.000, 1152.000), // = ( 343 x 406 ) mm = ( 13.50 x 16.00 ) in - 'EN_FOOLSCAP' => array( 972.000, 1224.000), // = ( 343 x 432 ) mm = ( 13.50 x 17.00 ) in - 'EN_SMALL_FOOLSCAP' => array( 954.000, 1188.000), // = ( 337 x 419 ) mm = ( 13.25 x 16.50 ) in - 'EN_POTT' => array( 900.000, 1080.000), // = ( 318 x 381 ) mm = ( 12.50 x 15.00 ) in - // - Old Imperial Belgian Sizes - 'BE_GRAND_AIGLE' => array( 1984.252, 2948.031), // = ( 700 x 1040 ) mm = ( 27.56 x 40.94 ) in - 'BE_COLOMBIER' => array( 1757.480, 2409.449), // = ( 620 x 850 ) mm = ( 24.41 x 33.46 ) in - 'BE_DOUBLE_CARRE' => array( 1757.480, 2607.874), // = ( 620 x 920 ) mm = ( 24.41 x 36.22 ) in - 'BE_ELEPHANT' => array( 1746.142, 2182.677), // = ( 616 x 770 ) mm = ( 24.25 x 30.31 ) in - 'BE_PETIT_AIGLE' => array( 1700.787, 2381.102), // = ( 600 x 840 ) mm = ( 23.62 x 33.07 ) in - 'BE_GRAND_JESUS' => array( 1559.055, 2069.291), // = ( 550 x 730 ) mm = ( 21.65 x 28.74 ) in - 'BE_JESUS' => array( 1530.709, 2069.291), // = ( 540 x 730 ) mm = ( 21.26 x 28.74 ) in - 'BE_RAISIN' => array( 1417.323, 1842.520), // = ( 500 x 650 ) mm = ( 19.69 x 25.59 ) in - 'BE_GRAND_MEDIAN' => array( 1303.937, 1714.961), // = ( 460 x 605 ) mm = ( 18.11 x 23.82 ) in - 'BE_DOUBLE_POSTE' => array( 1233.071, 1601.575), // = ( 435 x 565 ) mm = ( 17.13 x 22.24 ) in - 'BE_COQUILLE' => array( 1218.898, 1587.402), // = ( 430 x 560 ) mm = ( 16.93 x 22.05 ) in - 'BE_PETIT_MEDIAN' => array( 1176.378, 1502.362), // = ( 415 x 530 ) mm = ( 16.34 x 20.87 ) in - 'BE_RUCHE' => array( 1020.472, 1303.937), // = ( 360 x 460 ) mm = ( 14.17 x 18.11 ) in - 'BE_PROPATRIA' => array( 977.953, 1218.898), // = ( 345 x 430 ) mm = ( 13.58 x 16.93 ) in - 'BE_LYS' => array( 898.583, 1125.354), // = ( 317 x 397 ) mm = ( 12.48 x 15.63 ) in - 'BE_POT' => array( 870.236, 1088.504), // = ( 307 x 384 ) mm = ( 12.09 x 15.12 ) in - 'BE_ROSETTE' => array( 765.354, 983.622), // = ( 270 x 347 ) mm = ( 10.63 x 13.66 ) in - // - Old Imperial French Sizes - 'FR_UNIVERS' => array( 2834.646, 3685.039), // = ( 1000 x 1300 ) mm = ( 39.37 x 51.18 ) in - 'FR_DOUBLE_COLOMBIER' => array( 2551.181, 3571.654), // = ( 900 x 1260 ) mm = ( 35.43 x 49.61 ) in - 'FR_GRANDE_MONDE' => array( 2551.181, 3571.654), // = ( 900 x 1260 ) mm = ( 35.43 x 49.61 ) in - 'FR_DOUBLE_SOLEIL' => array( 2267.717, 3401.575), // = ( 800 x 1200 ) mm = ( 31.50 x 47.24 ) in - 'FR_DOUBLE_JESUS' => array( 2154.331, 3174.803), // = ( 760 x 1120 ) mm = ( 29.92 x 44.09 ) in - 'FR_GRAND_AIGLE' => array( 2125.984, 3004.724), // = ( 750 x 1060 ) mm = ( 29.53 x 41.73 ) in - 'FR_PETIT_AIGLE' => array( 1984.252, 2664.567), // = ( 700 x 940 ) mm = ( 27.56 x 37.01 ) in - 'FR_DOUBLE_RAISIN' => array( 1842.520, 2834.646), // = ( 650 x 1000 ) mm = ( 25.59 x 39.37 ) in - 'FR_JOURNAL' => array( 1842.520, 2664.567), // = ( 650 x 940 ) mm = ( 25.59 x 37.01 ) in - 'FR_COLOMBIER_AFFICHE' => array( 1785.827, 2551.181), // = ( 630 x 900 ) mm = ( 24.80 x 35.43 ) in - 'FR_DOUBLE_CAVALIER' => array( 1757.480, 2607.874), // = ( 620 x 920 ) mm = ( 24.41 x 36.22 ) in - 'FR_CLOCHE' => array( 1700.787, 2267.717), // = ( 600 x 800 ) mm = ( 23.62 x 31.50 ) in - 'FR_SOLEIL' => array( 1700.787, 2267.717), // = ( 600 x 800 ) mm = ( 23.62 x 31.50 ) in - 'FR_DOUBLE_CARRE' => array( 1587.402, 2551.181), // = ( 560 x 900 ) mm = ( 22.05 x 35.43 ) in - 'FR_DOUBLE_COQUILLE' => array( 1587.402, 2494.488), // = ( 560 x 880 ) mm = ( 22.05 x 34.65 ) in - 'FR_JESUS' => array( 1587.402, 2154.331), // = ( 560 x 760 ) mm = ( 22.05 x 29.92 ) in - 'FR_RAISIN' => array( 1417.323, 1842.520), // = ( 500 x 650 ) mm = ( 19.69 x 25.59 ) in - 'FR_CAVALIER' => array( 1303.937, 1757.480), // = ( 460 x 620 ) mm = ( 18.11 x 24.41 ) in - 'FR_DOUBLE_COURONNE' => array( 1303.937, 2040.945), // = ( 460 x 720 ) mm = ( 18.11 x 28.35 ) in - 'FR_CARRE' => array( 1275.591, 1587.402), // = ( 450 x 560 ) mm = ( 17.72 x 22.05 ) in - 'FR_COQUILLE' => array( 1247.244, 1587.402), // = ( 440 x 560 ) mm = ( 17.32 x 22.05 ) in - 'FR_DOUBLE_TELLIERE' => array( 1247.244, 1927.559), // = ( 440 x 680 ) mm = ( 17.32 x 26.77 ) in - 'FR_DOUBLE_CLOCHE' => array( 1133.858, 1700.787), // = ( 400 x 600 ) mm = ( 15.75 x 23.62 ) in - 'FR_DOUBLE_POT' => array( 1133.858, 1757.480), // = ( 400 x 620 ) mm = ( 15.75 x 24.41 ) in - 'FR_ECU' => array( 1133.858, 1474.016), // = ( 400 x 520 ) mm = ( 15.75 x 20.47 ) in - 'FR_COURONNE' => array( 1020.472, 1303.937), // = ( 360 x 460 ) mm = ( 14.17 x 18.11 ) in - 'FR_TELLIERE' => array( 963.780, 1247.244), // = ( 340 x 440 ) mm = ( 13.39 x 17.32 ) in - 'FR_POT' => array( 878.740, 1133.858), // = ( 310 x 400 ) mm = ( 12.20 x 15.75 ) in - ); - - - /** - * Get page dimensions from format name. - * @param mixed $format The format name @see self::$page_format
      - * @return array containing page width and height in points - * @since 5.0.010 (2010-05-17) - * @public static - */ - public static function getPageSizeFromFormat($format) { - if (isset(self::$page_formats[$format])) { - return self::$page_formats[$format]; - } - return self::$page_formats['A4']; - } - - /** - * Set page boundaries. - * @param int $page page number - * @param string $type valid values are:
      • 'MediaBox' : the boundaries of the physical medium on which the page shall be displayed or printed;
      • 'CropBox' : the visible region of default user space;
      • 'BleedBox' : the region to which the contents of the page shall be clipped when output in a production environment;
      • 'TrimBox' : the intended dimensions of the finished page after trimming;
      • 'ArtBox' : the page's meaningful content (including potential white space).
      - * @param float $llx lower-left x coordinate in user units. - * @param float $lly lower-left y coordinate in user units. - * @param float $urx upper-right x coordinate in user units. - * @param float $ury upper-right y coordinate in user units. - * @param boolean $points If true uses user units as unit of measure, otherwise uses PDF points. - * @param float $k Scale factor (number of points in user unit). - * @param array $pagedim Array of page dimensions. - * @return array pagedim array of page dimensions. - * @since 5.0.010 (2010-05-17) - * @public static - */ - public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points, $k, $pagedim=array()) { - if (!isset($pagedim[$page])) { - // initialize array - $pagedim[$page] = array(); - } - if (!in_array($type, self::$pageboxes)) { - return; - } - if ($points) { - $k = 1; - } - $pagedim[$page][$type]['llx'] = ($llx * $k); - $pagedim[$page][$type]['lly'] = ($lly * $k); - $pagedim[$page][$type]['urx'] = ($urx * $k); - $pagedim[$page][$type]['ury'] = ($ury * $k); - return $pagedim; - } - - /** - * Swap X and Y coordinates of page boxes (change page boxes orientation). - * @param int $page page number - * @param array $pagedim Array of page dimensions. - * @return array pagedim array of page dimensions. - * @since 5.0.010 (2010-05-17) - * @public static - */ - public static function swapPageBoxCoordinates($page, $pagedim) { - foreach (self::$pageboxes as $type) { - // swap X and Y coordinates - if (isset($pagedim[$page][$type])) { - $tmp = $pagedim[$page][$type]['llx']; - $pagedim[$page][$type]['llx'] = $pagedim[$page][$type]['lly']; - $pagedim[$page][$type]['lly'] = $tmp; - $tmp = $pagedim[$page][$type]['urx']; - $pagedim[$page][$type]['urx'] = $pagedim[$page][$type]['ury']; - $pagedim[$page][$type]['ury'] = $tmp; - } - } - return $pagedim; - } - - /** - * Get the canonical page layout mode. - * @param string $layout The page layout. Possible values are:
      • SinglePage Display one page at a time
      • OneColumn Display the pages in one column
      • TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left
      • TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right
      • TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left
      • TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right
      - * @return string Canonical page layout name. - * @public static - */ - public static function getPageLayoutMode($layout='SinglePage') { - switch ($layout) { - case 'default': - case 'single': - case 'SinglePage': { - $layout_mode = 'SinglePage'; - break; - } - case 'continuous': - case 'OneColumn': { - $layout_mode = 'OneColumn'; - break; - } - case 'two': - case 'TwoColumnLeft': { - $layout_mode = 'TwoColumnLeft'; - break; - } - case 'TwoColumnRight': { - $layout_mode = 'TwoColumnRight'; - break; - } - case 'TwoPageLeft': { - $layout_mode = 'TwoPageLeft'; - break; - } - case 'TwoPageRight': { - $layout_mode = 'TwoPageRight'; - break; - } - default: { - $layout_mode = 'SinglePage'; - } - } - return $layout_mode; - } - - /** - * Get the canonical page layout mode. - * @param string $mode A name object specifying how the document should be displayed when opened:
      • UseNone Neither document outline nor thumbnail images visible
      • UseOutlines Document outline visible
      • UseThumbs Thumbnail images visible
      • FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible
      • UseOC (PDF 1.5) Optional content group panel visible
      • UseAttachments (PDF 1.6) Attachments panel visible
      - * @return string Canonical page mode name. - * @public static - */ - public static function getPageMode($mode='UseNone') { - switch ($mode) { - case 'UseNone': { - $page_mode = 'UseNone'; - break; - } - case 'UseOutlines': { - $page_mode = 'UseOutlines'; - break; - } - case 'UseThumbs': { - $page_mode = 'UseThumbs'; - break; - } - case 'FullScreen': { - $page_mode = 'FullScreen'; - break; - } - case 'UseOC': { - $page_mode = 'UseOC'; - break; - } - case '': { - $page_mode = 'UseAttachments'; - break; - } - default: { - $page_mode = 'UseNone'; - } - } - return $page_mode; - } - - -} // END OF TCPDF_STATIC CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/tcpdf.php b/lib/combodo/tcpdf/tcpdf.php deleted file mode 100644 index 400434730..000000000 --- a/lib/combodo/tcpdf/tcpdf.php +++ /dev/null @@ -1,24729 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : -// This is a PHP class for generating PDF documents without requiring external extensions. -// -// NOTE: -// This class was originally derived in 2002 from the Public -// Domain FPDF class by Olivier Plathey (http://www.fpdf.org), -// but now is almost entirely rewritten and contains thousands of -// new lines of code and hundreds new features. -// -// Main features: -// * no external libraries are required for the basic functions; -// * all standard page formats, custom page formats, custom margins and units of measure; -// * UTF-8 Unicode and Right-To-Left languages; -// * TrueTypeUnicode, TrueType, Type1 and CID-0 fonts; -// * font subsetting; -// * methods to publish some XHTML + CSS code, Javascript and Forms; -// * images, graphic (geometric figures) and transformation methods; -// * supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImageMagick (http://www.imagemagick.org/www/formats.html) -// * 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417; -// * JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies; -// * automatic page header and footer management; -// * document encryption up to 256 bit and digital signature certifications; -// * transactions to UNDO commands; -// * PDF annotations, including links, text and file attachments; -// * text rendering modes (fill, stroke and clipping); -// * multiple columns mode; -// * no-write page regions; -// * bookmarks, named destinations and table of content; -// * text hyphenation; -// * text stretching and spacing (tracking); -// * automatic page break, line break and text alignments including justification; -// * automatic page numbering and page groups; -// * move and delete pages; -// * page compression (requires php-zlib extension); -// * XOBject Templates; -// * Layers and object visibility. -// * PDF/A-1b support -//============================================================+ - -/** - * @file - * This is a PHP class for generating PDF documents without requiring external extensions.
      - * TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
      - *

      TCPDF main features are:

      - *
        - *
      • no external libraries are required for the basic functions;
      • - *
      • all standard page formats, custom page formats, custom margins and units of measure;
      • - *
      • UTF-8 Unicode and Right-To-Left languages;
      • - *
      • TrueTypeUnicode, TrueType, Type1 and CID-0 fonts;
      • - *
      • font subsetting;
      • - *
      • methods to publish some XHTML + CSS code, Javascript and Forms;
      • - *
      • images, graphic (geometric figures) and transformation methods; - *
      • supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImageMagick (http://www.imagemagick.org/www/formats.html)
      • - *
      • 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
      • - *
      • JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
      • - *
      • automatic page header and footer management;
      • - *
      • document encryption up to 256 bit and digital signature certifications;
      • - *
      • transactions to UNDO commands;
      • - *
      • PDF annotations, including links, text and file attachments;
      • - *
      • text rendering modes (fill, stroke and clipping);
      • - *
      • multiple columns mode;
      • - *
      • no-write page regions;
      • - *
      • bookmarks, named destinations and table of content;
      • - *
      • text hyphenation;
      • - *
      • text stretching and spacing (tracking);
      • - *
      • automatic page break, line break and text alignments including justification;
      • - *
      • automatic page numbering and page groups;
      • - *
      • move and delete pages;
      • - *
      • page compression (requires php-zlib extension);
      • - *
      • XOBject Templates;
      • - *
      • Layers and object visibility;
      • - *
      • PDF/A-1b support.
      • - *
      - * Tools to encode your unicode fonts are on fonts/utils directory.

      - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 6.3.2 - */ - -// TCPDF configuration -require_once(dirname(__FILE__).'/tcpdf_autoconfig.php'); -// TCPDF static font methods and data -require_once(dirname(__FILE__).'/include/tcpdf_font_data.php'); -// TCPDF static font methods and data -require_once(dirname(__FILE__).'/include/tcpdf_fonts.php'); -// TCPDF static color methods and data -require_once(dirname(__FILE__).'/include/tcpdf_colors.php'); -// TCPDF static image methods and data -require_once(dirname(__FILE__).'/include/tcpdf_images.php'); -// TCPDF static methods and data -require_once(dirname(__FILE__).'/include/tcpdf_static.php'); - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/** - * @class TCPDF - * PHP class for generating PDF documents without requiring external extensions. - * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
      - * @package com.tecnick.tcpdf - * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.3.2 - * @author Nicola Asuni - info@tecnick.com - * @IgnoreAnnotation("protected") - * @IgnoreAnnotation("public") - * @IgnoreAnnotation("pre") - */ -class TCPDF { - - // Protected properties - - /** - * Current page number. - * @protected - */ - protected $page; - - /** - * Current object number. - * @protected - */ - protected $n; - - /** - * Array of object offsets. - * @protected - */ - protected $offsets = array(); - - /** - * Array of object IDs for each page. - * @protected - */ - protected $pageobjects = array(); - - /** - * Buffer holding in-memory PDF. - * @protected - */ - protected $buffer; - - /** - * Array containing pages. - * @protected - */ - protected $pages = array(); - - /** - * Current document state. - * @protected - */ - protected $state; - - /** - * Compression flag. - * @protected - */ - protected $compress; - - /** - * Current page orientation (P = Portrait, L = Landscape). - * @protected - */ - protected $CurOrientation; - - /** - * Page dimensions. - * @protected - */ - protected $pagedim = array(); - - /** - * Scale factor (number of points in user unit). - * @protected - */ - protected $k; - - /** - * Width of page format in points. - * @protected - */ - protected $fwPt; - - /** - * Height of page format in points. - * @protected - */ - protected $fhPt; - - /** - * Current width of page in points. - * @protected - */ - protected $wPt; - - /** - * Current height of page in points. - * @protected - */ - protected $hPt; - - /** - * Current width of page in user unit. - * @protected - */ - protected $w; - - /** - * Current height of page in user unit. - * @protected - */ - protected $h; - - /** - * Left margin. - * @protected - */ - protected $lMargin; - - /** - * Right margin. - * @protected - */ - protected $rMargin; - - /** - * Cell left margin (used by regions). - * @protected - */ - protected $clMargin; - - /** - * Cell right margin (used by regions). - * @protected - */ - protected $crMargin; - - /** - * Top margin. - * @protected - */ - protected $tMargin; - - /** - * Page break margin. - * @protected - */ - protected $bMargin; - - /** - * Array of cell internal paddings ('T' => top, 'R' => right, 'B' => bottom, 'L' => left). - * @since 5.9.000 (2010-10-03) - * @protected - */ - protected $cell_padding = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0); - - /** - * Array of cell margins ('T' => top, 'R' => right, 'B' => bottom, 'L' => left). - * @since 5.9.000 (2010-10-04) - * @protected - */ - protected $cell_margin = array('T' => 0, 'R' => 0, 'B' => 0, 'L' => 0); - - /** - * Current horizontal position in user unit for cell positioning. - * @protected - */ - protected $x; - - /** - * Current vertical position in user unit for cell positioning. - * @protected - */ - protected $y; - - /** - * Height of last cell printed. - * @protected - */ - protected $lasth; - - /** - * Line width in user unit. - * @protected - */ - protected $LineWidth; - - /** - * Array of standard font names. - * @protected - */ - protected $CoreFonts; - - /** - * Array of used fonts. - * @protected - */ - protected $fonts = array(); - - /** - * Array of font files. - * @protected - */ - protected $FontFiles = array(); - - /** - * Array of encoding differences. - * @protected - */ - protected $diffs = array(); - - /** - * Array of used images. - * @protected - */ - protected $images = array(); - - /** - * Depth of the svg tag, to keep track if the svg tag is a subtag or the root tag. - * @protected - */ - protected $svg_tag_depth = 0; - - /** - * Array of Annotations in pages. - * @protected - */ - protected $PageAnnots = array(); - - /** - * Array of internal links. - * @protected - */ - protected $links = array(); - - /** - * Current font family. - * @protected - */ - protected $FontFamily; - - /** - * Current font style. - * @protected - */ - protected $FontStyle; - - /** - * Current font ascent (distance between font top and baseline). - * @protected - * @since 2.8.000 (2007-03-29) - */ - protected $FontAscent; - - /** - * Current font descent (distance between font bottom and baseline). - * @protected - * @since 2.8.000 (2007-03-29) - */ - protected $FontDescent; - - /** - * Underlining flag. - * @protected - */ - protected $underline; - - /** - * Overlining flag. - * @protected - */ - protected $overline; - - /** - * Current font info. - * @protected - */ - protected $CurrentFont; - - /** - * Current font size in points. - * @protected - */ - protected $FontSizePt; - - /** - * Current font size in user unit. - * @protected - */ - protected $FontSize; - - /** - * Commands for drawing color. - * @protected - */ - protected $DrawColor; - - /** - * Commands for filling color. - * @protected - */ - protected $FillColor; - - /** - * Commands for text color. - * @protected - */ - protected $TextColor; - - /** - * Indicates whether fill and text colors are different. - * @protected - */ - protected $ColorFlag; - - /** - * Automatic page breaking. - * @protected - */ - protected $AutoPageBreak; - - /** - * Threshold used to trigger page breaks. - * @protected - */ - protected $PageBreakTrigger; - - /** - * Flag set when processing page header. - * @protected - */ - protected $InHeader = false; - - /** - * Flag set when processing page footer. - * @protected - */ - protected $InFooter = false; - - /** - * Zoom display mode. - * @protected - */ - protected $ZoomMode; - - /** - * Layout display mode. - * @protected - */ - protected $LayoutMode; - - /** - * If true set the document information dictionary in Unicode. - * @protected - */ - protected $docinfounicode = true; - - /** - * Document title. - * @protected - */ - protected $title = ''; - - /** - * Document subject. - * @protected - */ - protected $subject = ''; - - /** - * Document author. - * @protected - */ - protected $author = ''; - - /** - * Document keywords. - * @protected - */ - protected $keywords = ''; - - /** - * Document creator. - * @protected - */ - protected $creator = ''; - - /** - * Starting page number. - * @protected - */ - protected $starting_page_number = 1; - - /** - * The right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image. - * @since 2002-07-31 - * @author Nicola Asuni - * @protected - */ - protected $img_rb_x; - - /** - * The right-bottom corner Y coordinate of last inserted image. - * @since 2002-07-31 - * @author Nicola Asuni - * @protected - */ - protected $img_rb_y; - - /** - * Adjusting factor to convert pixels to user units. - * @since 2004-06-14 - * @author Nicola Asuni - * @protected - */ - protected $imgscale = 1; - - /** - * Boolean flag set to true when the input text is unicode (require unicode fonts). - * @since 2005-01-02 - * @author Nicola Asuni - * @protected - */ - protected $isunicode = false; - - /** - * PDF version. - * @since 1.5.3 - * @protected - */ - protected $PDFVersion = '1.7'; - - /** - * ID of the stored default header template (-1 = not set). - * @protected - */ - protected $header_xobjid = false; - - /** - * If true reset the Header Xobject template at each page - * @protected - */ - protected $header_xobj_autoreset = false; - - /** - * Minimum distance between header and top page margin. - * @protected - */ - protected $header_margin; - - /** - * Minimum distance between footer and bottom page margin. - * @protected - */ - protected $footer_margin; - - /** - * Original left margin value. - * @protected - * @since 1.53.0.TC013 - */ - protected $original_lMargin; - - /** - * Original right margin value. - * @protected - * @since 1.53.0.TC013 - */ - protected $original_rMargin; - - /** - * Default font used on page header. - * @protected - * @var array - * @phpstan-var array{0: string, 1: string, 2: float|null} - */ - protected $header_font; - - /** - * Default font used on page footer. - * @protected - * @var array - * @phpstan-var array{0: string, 1: string, 2: float|null} - */ - protected $footer_font; - - /** - * Language templates. - * @protected - */ - protected $l; - - /** - * Barcode to print on page footer (only if set). - * @protected - */ - protected $barcode = false; - - /** - * Boolean flag to print/hide page header. - * @protected - */ - protected $print_header = true; - - /** - * Boolean flag to print/hide page footer. - * @protected - */ - protected $print_footer = true; - - /** - * Header image logo. - * @protected - */ - protected $header_logo = ''; - - /** - * Width of header image logo in user units. - * @protected - */ - protected $header_logo_width = 30; - - /** - * Title to be printed on default page header. - * @protected - */ - protected $header_title = ''; - - /** - * String to print on page header after title. - * @protected - */ - protected $header_string = ''; - - /** - * Color for header text (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - * @var int[] - * @phpstan-var array{0: int, 1: int, 2: int} - */ - protected $header_text_color = array(0,0,0); - - /** - * Color for header line (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - * @var int[] - * @phpstan-var array{0: int, 1: int, 2: int} - */ - protected $header_line_color = array(0,0,0); - - /** - * Color for footer text (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - * @var int[] - * @phpstan-var array{0: int, 1: int, 2: int} - */ - protected $footer_text_color = array(0,0,0); - - /** - * Color for footer line (RGB array). - * @since 5.9.174 (2012-07-25) - * @protected - * @var int[] - * @phpstan-var array{0: int, 1: int, 2: int} - */ - protected $footer_line_color = array(0,0,0); - - /** - * Text shadow data array. - * @since 5.9.174 (2012-07-25) - * @protected - */ - protected $txtshadow = array('enabled'=>false, 'depth_w'=>0, 'depth_h'=>0, 'color'=>false, 'opacity'=>1, 'blend_mode'=>'Normal'); - - /** - * Default number of columns for html table. - * @protected - */ - protected $default_table_columns = 4; - - // variables for html parser - - /** - * HTML PARSER: array to store current link and rendering styles. - * @protected - */ - protected $HREF = array(); - - /** - * List of available fonts on filesystem. - * @protected - */ - protected $fontlist = array(); - - /** - * Current foreground color. - * @protected - */ - protected $fgcolor; - - /** - * HTML PARSER: array of boolean values, true in case of ordered list (OL), false otherwise. - * @protected - */ - protected $listordered = array(); - - /** - * HTML PARSER: array count list items on nested lists. - * @protected - */ - protected $listcount = array(); - - /** - * HTML PARSER: current list nesting level. - * @protected - */ - protected $listnum = 0; - - /** - * HTML PARSER: indent amount for lists. - * @protected - */ - protected $listindent = 0; - - /** - * HTML PARSER: current list indententation level. - * @protected - */ - protected $listindentlevel = 0; - - /** - * Current background color. - * @protected - */ - protected $bgcolor; - - /** - * Temporary font size in points. - * @protected - */ - protected $tempfontsize = 10; - - /** - * Spacer string for LI tags. - * @protected - */ - protected $lispacer = ''; - - /** - * Default encoding. - * @protected - * @since 1.53.0.TC010 - */ - protected $encoding = 'UTF-8'; - - /** - * Boolean flag to indicate if the document language is Right-To-Left. - * @protected - * @since 2.0.000 - */ - protected $rtl = false; - - /** - * Boolean flag used to force RTL or LTR string direction. - * @protected - * @since 2.0.000 - */ - protected $tmprtl = false; - - // --- Variables used for document encryption: - - /** - * IBoolean flag indicating whether document is protected. - * @protected - * @since 2.0.000 (2008-01-02) - */ - protected $encrypted; - - /** - * Array containing encryption settings. - * @protected - * @since 5.0.005 (2010-05-11) - */ - protected $encryptdata = array(); - - /** - * Last RC4 key encrypted (cached for optimisation). - * @protected - * @since 2.0.000 (2008-01-02) - */ - protected $last_enc_key; - - /** - * Last RC4 computed key. - * @protected - * @since 2.0.000 (2008-01-02) - */ - protected $last_enc_key_c; - - /** - * File ID (used on document trailer). - * @protected - * @since 5.0.005 (2010-05-12) - */ - protected $file_id; - - // --- bookmark --- - - /** - * Outlines for bookmark. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $outlines = array(); - - /** - * Outline root for bookmark. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $OutlineRoot; - - // --- javascript and form --- - - /** - * Javascript code. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $javascript = ''; - - /** - * Javascript counter. - * @protected - * @since 2.1.002 (2008-02-12) - */ - protected $n_js; - - /** - * line through state - * @protected - * @since 2.8.000 (2008-03-19) - */ - protected $linethrough; - - /** - * Array with additional document-wide usage rights for the document. - * @protected - * @since 5.8.014 (2010-08-23) - */ - protected $ur = array(); - - /** - * DPI (Dot Per Inch) Document Resolution (do not change). - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $dpi = 72; - - /** - * Array of page numbers were a new page group was started (the page numbers are the keys of the array). - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $newpagegroup = array(); - - /** - * Array that contains the number of pages in each page group. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $pagegroups = array(); - - /** - * Current page group number. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $currpagegroup = 0; - - /** - * Array of transparency objects and parameters. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $extgstates; - - /** - * Set the default JPEG compression quality (1-100). - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected $jpeg_quality; - - /** - * Default cell height ratio. - * @protected - * @since 3.0.014 (2008-05-23) - * @var float - */ - protected $cell_height_ratio = K_CELL_HEIGHT_RATIO; - - /** - * PDF viewer preferences. - * @protected - * @since 3.1.000 (2008-06-09) - */ - protected $viewer_preferences; - - /** - * A name object specifying how the document should be displayed when opened. - * @protected - * @since 3.1.000 (2008-06-09) - */ - protected $PageMode; - - /** - * Array for storing gradient information. - * @protected - * @since 3.1.000 (2008-06-09) - */ - protected $gradients = array(); - - /** - * Array used to store positions inside the pages buffer (keys are the page numbers). - * @protected - * @since 3.2.000 (2008-06-26) - */ - protected $intmrk = array(); - - /** - * Array used to store positions inside the pages buffer (keys are the page numbers). - * @protected - * @since 5.7.000 (2010-08-03) - */ - protected $bordermrk = array(); - - /** - * Array used to store page positions to track empty pages (keys are the page numbers). - * @protected - * @since 5.8.007 (2010-08-18) - */ - protected $emptypagemrk = array(); - - /** - * Array used to store content positions inside the pages buffer (keys are the page numbers). - * @protected - * @since 4.6.021 (2009-07-20) - */ - protected $cntmrk = array(); - - /** - * Array used to store footer positions of each page. - * @protected - * @since 3.2.000 (2008-07-01) - */ - protected $footerpos = array(); - - /** - * Array used to store footer length of each page. - * @protected - * @since 4.0.014 (2008-07-29) - */ - protected $footerlen = array(); - - /** - * Boolean flag to indicate if a new line is created. - * @protected - * @since 3.2.000 (2008-07-01) - */ - protected $newline = true; - - /** - * End position of the latest inserted line. - * @protected - * @since 3.2.000 (2008-07-01) - */ - protected $endlinex = 0; - - /** - * PDF string for width value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleWidth = ''; - - /** - * PDF string for CAP value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleCap = '0 J'; - - /** - * PDF string for join value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleJoin = '0 j'; - - /** - * PDF string for dash value of the last line. - * @protected - * @since 4.0.006 (2008-07-16) - */ - protected $linestyleDash = '[] 0 d'; - - /** - * Boolean flag to indicate if marked-content sequence is open. - * @protected - * @since 4.0.013 (2008-07-28) - */ - protected $openMarkedContent = false; - - /** - * Count the latest inserted vertical spaces on HTML. - * @protected - * @since 4.0.021 (2008-08-24) - */ - protected $htmlvspace = 0; - - /** - * Array of Spot colors. - * @protected - * @since 4.0.024 (2008-09-12) - */ - protected $spot_colors = array(); - - /** - * Symbol used for HTML unordered list items. - * @protected - * @since 4.0.028 (2008-09-26) - */ - protected $lisymbol = ''; - - /** - * String used to mark the beginning and end of EPS image blocks. - * @protected - * @since 4.1.000 (2008-10-18) - */ - protected $epsmarker = 'x#!#EPS#!#x'; - - /** - * Array of transformation matrix. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected $transfmatrix = array(); - - /** - * Current key for transformation matrix. - * @protected - * @since 4.8.005 (2009-09-17) - */ - protected $transfmatrix_key = 0; - - /** - * Booklet mode for double-sided pages. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected $booklet = false; - - /** - * Epsilon value used for float calculations. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected $feps = 0.005; - - /** - * Array used for custom vertical spaces for HTML tags. - * @protected - * @since 4.2.001 (2008-10-30) - */ - protected $tagvspaces = array(); - - /** - * HTML PARSER: custom indent amount for lists. Negative value means disabled. - * @protected - * @since 4.2.007 (2008-11-12) - */ - protected $customlistindent = -1; - - /** - * Boolean flag to indicate if the border of the cell sides that cross the page should be removed. - * @protected - * @since 4.2.010 (2008-11-14) - */ - protected $opencell = true; - - /** - * Array of files to embedd. - * @protected - * @since 4.4.000 (2008-12-07) - */ - protected $embeddedfiles = array(); - - /** - * Boolean flag to indicate if we are inside a PRE tag. - * @protected - * @since 4.4.001 (2008-12-08) - */ - protected $premode = false; - - /** - * Array used to store positions of graphics transformation blocks inside the page buffer. - * keys are the page numbers - * @protected - * @since 4.4.002 (2008-12-09) - */ - protected $transfmrk = array(); - - /** - * Default color for html links. - * @protected - * @since 4.4.003 (2008-12-09) - */ - protected $htmlLinkColorArray = array(0, 0, 255); - - /** - * Default font style to add to html links. - * @protected - * @since 4.4.003 (2008-12-09) - */ - protected $htmlLinkFontStyle = 'U'; - - /** - * Counts the number of pages. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $numpages = 0; - - /** - * Array containing page lengths in bytes. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $pagelen = array(); - - /** - * Counts the number of pages. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $numimages = 0; - - /** - * Store the image keys. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $imagekeys = array(); - - /** - * Length of the buffer in bytes. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected $bufferlen = 0; - - /** - * Counts the number of fonts. - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected $numfonts = 0; - - /** - * Store the font keys. - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected $fontkeys = array(); - - /** - * Store the font object IDs. - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $font_obj_ids = array(); - - /** - * Store the fage status (true when opened, false when closed). - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected $pageopen = array(); - - /** - * Default monospace font. - * @protected - * @since 4.5.025 (2009-03-10) - */ - protected $default_monospaced_font = 'courier'; - - /** - * Cloned copy of the current class object. - * @protected - * @since 4.5.029 (2009-03-19) - */ - protected $objcopy; - - /** - * Array used to store the lengths of cache files. - * @protected - * @since 4.5.029 (2009-03-19) - */ - protected $cache_file_length = array(); - - /** - * Table header content to be repeated on each new page. - * @protected - * @since 4.5.030 (2009-03-20) - */ - protected $thead = ''; - - /** - * Margins used for table header. - * @protected - * @since 4.5.030 (2009-03-20) - */ - protected $theadMargins = array(); - - /** - * Boolean flag to enable document digital signature. - * @protected - * @since 4.6.005 (2009-04-24) - */ - protected $sign = false; - - /** - * Digital signature data. - * @protected - * @since 4.6.005 (2009-04-24) - */ - protected $signature_data = array(); - - /** - * Digital signature max length. - * @protected - * @since 4.6.005 (2009-04-24) - */ - protected $signature_max_length = 11742; - - /** - * Data for digital signature appearance. - * @protected - * @since 5.3.011 (2010-06-16) - */ - protected $signature_appearance = array('page' => 1, 'rect' => '0 0 0 0'); - - /** - * Array of empty digital signature appearances. - * @protected - * @since 5.9.101 (2011-07-06) - */ - protected $empty_signature_appearance = array(); - - /** - * Boolean flag to enable document timestamping with TSA. - * @protected - * @since 6.0.085 (2014-06-19) - */ - protected $tsa_timestamp = false; - - /** - * Timestamping data. - * @protected - * @since 6.0.085 (2014-06-19) - */ - protected $tsa_data = array(); - - /** - * Regular expression used to find blank characters (required for word-wrapping). - * @protected - * @since 4.6.006 (2009-04-28) - */ - protected $re_spaces = '/[^\S\xa0]/'; - - /** - * Array of $re_spaces parts. - * @protected - * @since 5.5.011 (2010-07-09) - */ - protected $re_space = array('p' => '[^\S\xa0]', 'm' => ''); - - /** - * Digital signature object ID. - * @protected - * @since 4.6.022 (2009-06-23) - */ - protected $sig_obj_id = 0; - - /** - * ID of page objects. - * @protected - * @since 4.7.000 (2009-08-29) - */ - protected $page_obj_id = array(); - - /** - * List of form annotations IDs. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_obj_id = array(); - - /** - * Deafult Javascript field properties. Possible values are described on official Javascript for Acrobat API reference. Annotation options can be directly specified using the 'aopt' entry. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128)); - - /** - * Javascript objects array. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $js_objects = array(); - - /** - * Current form action (used during XHTML rendering). - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_action = ''; - - /** - * Current form encryption type (used during XHTML rendering). - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_enctype = 'application/x-www-form-urlencoded'; - - /** - * Current method to submit forms. - * @protected - * @since 4.8.000 (2009-09-07) - */ - protected $form_mode = 'post'; - - /** - * List of fonts used on form fields (fontname => fontkey). - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $annotation_fonts = array(); - - /** - * List of radio buttons parent objects. - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $radiobutton_groups = array(); - - /** - * List of radio group objects IDs. - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected $radio_groups = array(); - - /** - * Text indentation value (used for text-indent CSS attribute). - * @protected - * @since 4.8.006 (2009-09-23) - */ - protected $textindent = 0; - - /** - * Store page number when startTransaction() is called. - * @protected - * @since 4.8.006 (2009-09-23) - */ - protected $start_transaction_page = 0; - - /** - * Store Y position when startTransaction() is called. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $start_transaction_y = 0; - - /** - * True when we are printing the thead section on a new page. - * @protected - * @since 4.8.027 (2010-01-25) - */ - protected $inthead = false; - - /** - * Array of column measures (width, space, starting Y position). - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $columns = array(); - - /** - * Number of colums. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $num_columns = 1; - - /** - * Current column number. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $current_column = 0; - - /** - * Starting page for columns. - * @protected - * @since 4.9.001 (2010-03-28) - */ - protected $column_start_page = 0; - - /** - * Maximum page and column selected. - * @protected - * @since 5.8.000 (2010-08-11) - */ - protected $maxselcol = array('page' => 0, 'column' => 0); - - /** - * Array of: X difference between table cell x start and starting page margin, cellspacing, cellpadding. - * @protected - * @since 5.8.000 (2010-08-11) - */ - protected $colxshift = array('x' => 0, 's' => array('H' => 0, 'V' => 0), 'p' => array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0)); - - /** - * Text rendering mode: 0 = Fill text; 1 = Stroke text; 2 = Fill, then stroke text; 3 = Neither fill nor stroke text (invisible); 4 = Fill text and add to path for clipping; 5 = Stroke text and add to path for clipping; 6 = Fill, then stroke text and add to path for clipping; 7 = Add text to path for clipping. - * @protected - * @since 4.9.008 (2010-04-03) - */ - protected $textrendermode = 0; - - /** - * Text stroke width in doc units. - * @protected - * @since 4.9.008 (2010-04-03) - */ - protected $textstrokewidth = 0; - - /** - * Current stroke color. - * @protected - * @since 4.9.008 (2010-04-03) - */ - protected $strokecolor; - - /** - * Default unit of measure for document. - * @protected - * @since 5.0.000 (2010-04-22) - */ - protected $pdfunit = 'mm'; - - /** - * Boolean flag true when we are on TOC (Table Of Content) page. - * @protected - */ - protected $tocpage = false; - - /** - * Boolean flag: if true convert vector images (SVG, EPS) to raster image using GD or ImageMagick library. - * @protected - * @since 5.0.000 (2010-04-26) - */ - protected $rasterize_vector_images = false; - - /** - * Boolean flag: if true enables font subsetting by default. - * @protected - * @since 5.3.002 (2010-06-07) - */ - protected $font_subsetting = true; - - /** - * Array of default graphic settings. - * @protected - * @since 5.5.008 (2010-07-02) - */ - protected $default_graphic_vars = array(); - - /** - * Array of XObjects. - * @protected - * @since 5.8.014 (2010-08-23) - */ - protected $xobjects = array(); - - /** - * Boolean value true when we are inside an XObject. - * @protected - * @since 5.8.017 (2010-08-24) - */ - protected $inxobj = false; - - /** - * Current XObject ID. - * @protected - * @since 5.8.017 (2010-08-24) - */ - protected $xobjid = ''; - - /** - * Percentage of character stretching. - * @protected - * @since 5.9.000 (2010-09-29) - */ - protected $font_stretching = 100; - - /** - * Increases or decreases the space between characters in a text by the specified amount (tracking). - * @protected - * @since 5.9.000 (2010-09-29) - */ - protected $font_spacing = 0; - - /** - * Array of no-write regions. - * ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right) - * @protected - * @since 5.9.003 (2010-10-14) - */ - protected $page_regions = array(); - - /** - * Boolean value true when page region check is active. - * @protected - */ - protected $check_page_regions = true; - - /** - * Array of PDF layers data. - * @protected - * @since 5.9.102 (2011-07-13) - */ - protected $pdflayers = array(); - - /** - * A dictionary of names and corresponding destinations (Dests key on document Catalog). - * @protected - * @since 5.9.097 (2011-06-23) - */ - protected $dests = array(); - - /** - * Object ID for Named Destinations - * @protected - * @since 5.9.097 (2011-06-23) - */ - protected $n_dests; - - /** - * Embedded Files Names - * @protected - * @since 5.9.204 (2013-01-23) - */ - protected $efnames = array(); - - /** - * Directory used for the last SVG image. - * @protected - * @since 5.0.000 (2010-05-05) - */ - protected $svgdir = ''; - - /** - * Deafult unit of measure for SVG. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgunit = 'px'; - - /** - * Array of SVG gradients. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svggradients = array(); - - /** - * ID of last SVG gradient. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svggradientid = 0; - - /** - * Boolean value true when in SVG defs group. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgdefsmode = false; - - /** - * Array of SVG defs. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgdefs = array(); - - /** - * Boolean value true when in SVG clipPath tag. - * @protected - * @since 5.0.000 (2010-04-26) - */ - protected $svgclipmode = false; - - /** - * Array of SVG clipPath commands. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgclippaths = array(); - - /** - * Array of SVG clipPath tranformation matrix. - * @protected - * @since 5.8.022 (2010-08-31) - */ - protected $svgcliptm = array(); - - /** - * ID of last SVG clipPath. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgclipid = 0; - - /** - * SVG text. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgtext = ''; - - /** - * SVG text properties. - * @protected - * @since 5.8.013 (2010-08-23) - */ - protected $svgtextmode = array(); - - /** - * Array of SVG properties. - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected $svgstyles = array(array( - 'alignment-baseline' => 'auto', - 'baseline-shift' => 'baseline', - 'clip' => 'auto', - 'clip-path' => 'none', - 'clip-rule' => 'nonzero', - 'color' => 'black', - 'color-interpolation' => 'sRGB', - 'color-interpolation-filters' => 'linearRGB', - 'color-profile' => 'auto', - 'color-rendering' => 'auto', - 'cursor' => 'auto', - 'direction' => 'ltr', - 'display' => 'inline', - 'dominant-baseline' => 'auto', - 'enable-background' => 'accumulate', - 'fill' => 'black', - 'fill-opacity' => 1, - 'fill-rule' => 'nonzero', - 'filter' => 'none', - 'flood-color' => 'black', - 'flood-opacity' => 1, - 'font' => '', - 'font-family' => 'helvetica', - 'font-size' => 'medium', - 'font-size-adjust' => 'none', - 'font-stretch' => 'normal', - 'font-style' => 'normal', - 'font-variant' => 'normal', - 'font-weight' => 'normal', - 'glyph-orientation-horizontal' => '0deg', - 'glyph-orientation-vertical' => 'auto', - 'image-rendering' => 'auto', - 'kerning' => 'auto', - 'letter-spacing' => 'normal', - 'lighting-color' => 'white', - 'marker' => '', - 'marker-end' => 'none', - 'marker-mid' => 'none', - 'marker-start' => 'none', - 'mask' => 'none', - 'opacity' => 1, - 'overflow' => 'auto', - 'pointer-events' => 'visiblePainted', - 'shape-rendering' => 'auto', - 'stop-color' => 'black', - 'stop-opacity' => 1, - 'stroke' => 'none', - 'stroke-dasharray' => 'none', - 'stroke-dashoffset' => 0, - 'stroke-linecap' => 'butt', - 'stroke-linejoin' => 'miter', - 'stroke-miterlimit' => 4, - 'stroke-opacity' => 1, - 'stroke-width' => 1, - 'text-anchor' => 'start', - 'text-decoration' => 'none', - 'text-rendering' => 'auto', - 'unicode-bidi' => 'normal', - 'visibility' => 'visible', - 'word-spacing' => 'normal', - 'writing-mode' => 'lr-tb', - 'text-color' => 'black', - 'transfmatrix' => array(1, 0, 0, 1, 0, 0) - )); - - /** - * If true force sRGB color profile for all document. - * @protected - * @since 5.9.121 (2011-09-28) - */ - protected $force_srgb = false; - - /** - * If true set the document to PDF/A mode. - * @protected - * @since 5.9.121 (2011-09-27) - */ - protected $pdfa_mode = false; - - /** - * version of PDF/A mode (1 - 3). - * @protected - * @since 6.2.26 (2019-03-12) - */ - protected $pdfa_version = 1; - - /** - * Document creation date-time - * @protected - * @since 5.9.152 (2012-03-22) - */ - protected $doc_creation_timestamp; - - /** - * Document modification date-time - * @protected - * @since 5.9.152 (2012-03-22) - */ - protected $doc_modification_timestamp; - - /** - * Custom XMP data. - * @protected - * @since 5.9.128 (2011-10-06) - */ - protected $custom_xmp = ''; - - /** - * Custom XMP RDF data. - * @protected - * @since 6.3.0 (2019-09-19) - */ - protected $custom_xmp_rdf = ''; - - /** - * Overprint mode array. - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @protected - * @since 5.9.152 (2012-03-23) - * @var array - */ - protected $overprint = array('OP' => false, 'op' => false, 'OPM' => 0); - - /** - * Alpha mode array. - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @protected - * @since 5.9.152 (2012-03-23) - */ - protected $alpha = array('CA' => 1, 'ca' => 1, 'BM' => '/Normal', 'AIS' => false); - - /** - * Define the page boundaries boxes to be set on document. - * @protected - * @since 5.9.152 (2012-03-23) - */ - protected $page_boxes = array('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox'); - - /** - * If true print TCPDF meta link. - * @protected - * @since 5.9.152 (2012-03-23) - */ - protected $tcpdflink = true; - - /** - * Cache array for computed GD gamma values. - * @protected - * @since 5.9.1632 (2012-06-05) - */ - protected $gdgammacache = array(); - - /** - * Cache array for file content - * @protected - * @var array - * @since 6.3.5 (2020-09-28) - */ - protected $fileContentCache = array(); - - /** - * Whether to allow local file path in image html tags, when prefixed with file:// - * - * @var bool - * @protected - * @since 6.4 (2020-07-23) - */ - protected $allowLocalFiles = false; - - //------------------------------------------------------------ - // METHODS - //------------------------------------------------------------ - - /** - * This is the class constructor. - * It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes). - * - * @param string $orientation page orientation. Possible values are (case insensitive):
      • P or Portrait (default)
      • L or Landscape
      • '' (empty string) for automatic orientation
      - * @param string $unit User measure unit. Possible values are:
      • pt: point
      • mm: millimeter (default)
      • cm: centimeter
      • in: inch

      A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. - * @param mixed $format The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param boolean $unicode TRUE means that the input text is unicode (default = true) - * @param string $encoding Charset encoding (used only when converting back html entities); default is UTF-8. - * @param boolean $diskcache DEPRECATED FEATURE - * @param false|integer $pdfa If not false, set the document to PDF/A mode and the good version (1 or 3). - * @public - * @see getPageSizeFromFormat(), setPageFormat() - */ - public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false, $pdfa=false) { - // set file ID for trailer - $serformat = (is_array($format) ? json_encode($format) : $format); - $this->file_id = md5(TCPDF_STATIC::getRandomSeed('TCPDF'.$orientation.$unit.$serformat.$encoding)); - $this->font_obj_ids = array(); - $this->page_obj_id = array(); - $this->form_obj_id = array(); - - // set pdf/a mode - if ($pdfa != false) { - $this->pdfa_mode = true; - $this->pdfa_version = $pdfa; // 1 or 3 - } else - $this->pdfa_mode = false; - - $this->force_srgb = false; - // set language direction - $this->rtl = false; - $this->tmprtl = false; - // some checks - $this->_dochecks(); - // initialization of properties - $this->isunicode = $unicode; - $this->page = 0; - $this->transfmrk[0] = array(); - $this->pagedim = array(); - $this->n = 2; - $this->buffer = ''; - $this->pages = array(); - $this->state = 0; - $this->fonts = array(); - $this->FontFiles = array(); - $this->diffs = array(); - $this->images = array(); - $this->links = array(); - $this->gradients = array(); - $this->InFooter = false; - $this->lasth = 0; - $this->FontFamily = defined('PDF_FONT_NAME_MAIN')?PDF_FONT_NAME_MAIN:'helvetica'; - $this->FontStyle = ''; - $this->FontSizePt = 12; - $this->underline = false; - $this->overline = false; - $this->linethrough = false; - $this->DrawColor = '0 G'; - $this->FillColor = '0 g'; - $this->TextColor = '0 g'; - $this->ColorFlag = false; - $this->pdflayers = array(); - // encryption values - $this->encrypted = false; - $this->last_enc_key = ''; - // standard Unicode fonts - $this->CoreFonts = array( - 'courier'=>'Courier', - 'courierB'=>'Courier-Bold', - 'courierI'=>'Courier-Oblique', - 'courierBI'=>'Courier-BoldOblique', - 'helvetica'=>'Helvetica', - 'helveticaB'=>'Helvetica-Bold', - 'helveticaI'=>'Helvetica-Oblique', - 'helveticaBI'=>'Helvetica-BoldOblique', - 'times'=>'Times-Roman', - 'timesB'=>'Times-Bold', - 'timesI'=>'Times-Italic', - 'timesBI'=>'Times-BoldItalic', - 'symbol'=>'Symbol', - 'zapfdingbats'=>'ZapfDingbats' - ); - // set scale factor - $this->setPageUnit($unit); - // set page format and orientation - $this->setPageFormat($format, $orientation); - // page margins (1 cm) - $margin = 28.35 / $this->k; - $this->setMargins($margin, $margin); - $this->clMargin = $this->lMargin; - $this->crMargin = $this->rMargin; - // internal cell padding - $cpadding = $margin / 10; - $this->setCellPaddings($cpadding, 0, $cpadding, 0); - // cell margins - $this->setCellMargins(0, 0, 0, 0); - // line width (0.2 mm) - $this->LineWidth = 0.57 / $this->k; - $this->linestyleWidth = sprintf('%F w', ($this->LineWidth * $this->k)); - $this->linestyleCap = '0 J'; - $this->linestyleJoin = '0 j'; - $this->linestyleDash = '[] 0 d'; - // automatic page break - $this->setAutoPageBreak(true, (2 * $margin)); - // full width display mode - $this->setDisplayMode('fullwidth'); - // compression - $this->setCompression(); - // set default PDF version number - $this->setPDFVersion(); - $this->tcpdflink = true; - $this->encoding = $encoding; - $this->HREF = array(); - $this->getFontsList(); - $this->fgcolor = array('R' => 0, 'G' => 0, 'B' => 0); - $this->strokecolor = array('R' => 0, 'G' => 0, 'B' => 0); - $this->bgcolor = array('R' => 255, 'G' => 255, 'B' => 255); - $this->extgstates = array(); - $this->setTextShadow(); - // signature - $this->sign = false; - $this->tsa_timestamp = false; - $this->tsa_data = array(); - $this->signature_appearance = array('page' => 1, 'rect' => '0 0 0 0', 'name' => 'Signature'); - $this->empty_signature_appearance = array(); - // user's rights - $this->ur['enabled'] = false; - $this->ur['document'] = '/FullSave'; - $this->ur['annots'] = '/Create/Delete/Modify/Copy/Import/Export'; - $this->ur['form'] = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate'; - $this->ur['signature'] = '/Modify'; - $this->ur['ef'] = '/Create/Delete/Modify/Import'; - $this->ur['formex'] = ''; - // set default JPEG quality - $this->jpeg_quality = 75; - // initialize some settings - TCPDF_FONTS::utf8Bidi(array(), '', false, $this->isunicode, $this->CurrentFont); - // set default font - $this->setFont($this->FontFamily, $this->FontStyle, $this->FontSizePt); - $this->setHeaderFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt)); - $this->setFooterFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt)); - // check if PCRE Unicode support is enabled - if ($this->isunicode AND (@preg_match('/\pL/u', 'a') == 1)) { - // PCRE unicode support is turned ON - // \s : any whitespace character - // \p{Z} : any separator - // \p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words. - // \xa0 : Unicode Character 'NO-BREAK SPACE' (U+00A0) - //$this->setSpacesRE('/(?!\xa0)[\s\p{Z}\p{Lo}]/u'); - $this->setSpacesRE('/(?!\xa0)[\s\p{Z}]/u'); - } else { - // PCRE unicode support is turned OFF - $this->setSpacesRE('/[^\S\xa0]/'); - } - $this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128)); - // set document creation and modification timestamp - $this->doc_creation_timestamp = time(); - $this->doc_modification_timestamp = $this->doc_creation_timestamp; - // get default graphic vars - $this->default_graphic_vars = $this->getGraphicVars(); - $this->header_xobj_autoreset = false; - $this->custom_xmp = ''; - $this->custom_xmp_rdf = ''; - // Call cleanup method after script execution finishes or exit() is called. - // NOTE: This will not be executed if the process is killed with a SIGTERM or SIGKILL signal. - register_shutdown_function(array($this, '_destroy'), true); - } - - /** - * Default destructor. - * @public - * @since 1.53.0.TC016 - */ - public function __destruct() { - // cleanup - $this->_destroy(true); - } - - /** - * Set the units of measure for the document. - * @param string $unit User measure unit. Possible values are:
      • pt: point
      • mm: millimeter (default)
      • cm: centimeter
      • in: inch

      A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. - * @public - * @since 3.0.015 (2008-06-06) - */ - public function setPageUnit($unit) { - $unit = strtolower($unit); - //Set scale factor - switch ($unit) { - // points - case 'px': - case 'pt': { - $this->k = 1; - break; - } - // millimeters - case 'mm': { - $this->k = $this->dpi / 25.4; - break; - } - // centimeters - case 'cm': { - $this->k = $this->dpi / 2.54; - break; - } - // inches - case 'in': { - $this->k = $this->dpi; - break; - } - // unsupported unit - default : { - $this->Error('Incorrect unit: '.$unit); - break; - } - } - $this->pdfunit = $unit; - if (isset($this->CurOrientation)) { - $this->setPageOrientation($this->CurOrientation); - } - } - - /** - * Change the format of the current page - * @param mixed $format The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() documentation or an array of two numbers (width, height) or an array containing the following measures and options:
        - *
      • ['format'] = page format name (one of the above);
      • - *
      • ['Rotate'] : The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90.
      • - *
      • ['PZ'] : The page's preferred zoom (magnification) factor.
      • - *
      • ['MediaBox'] : the boundaries of the physical medium on which the page shall be displayed or printed:
      • - *
      • ['MediaBox']['llx'] : lower-left x coordinate
      • - *
      • ['MediaBox']['lly'] : lower-left y coordinate
      • - *
      • ['MediaBox']['urx'] : upper-right x coordinate
      • - *
      • ['MediaBox']['ury'] : upper-right y coordinate
      • - *
      • ['CropBox'] : the visible region of default user space:
      • - *
      • ['CropBox']['llx'] : lower-left x coordinate
      • - *
      • ['CropBox']['lly'] : lower-left y coordinate
      • - *
      • ['CropBox']['urx'] : upper-right x coordinate
      • - *
      • ['CropBox']['ury'] : upper-right y coordinate
      • - *
      • ['BleedBox'] : the region to which the contents of the page shall be clipped when output in a production environment:
      • - *
      • ['BleedBox']['llx'] : lower-left x coordinate
      • - *
      • ['BleedBox']['lly'] : lower-left y coordinate
      • - *
      • ['BleedBox']['urx'] : upper-right x coordinate
      • - *
      • ['BleedBox']['ury'] : upper-right y coordinate
      • - *
      • ['TrimBox'] : the intended dimensions of the finished page after trimming:
      • - *
      • ['TrimBox']['llx'] : lower-left x coordinate
      • - *
      • ['TrimBox']['lly'] : lower-left y coordinate
      • - *
      • ['TrimBox']['urx'] : upper-right x coordinate
      • - *
      • ['TrimBox']['ury'] : upper-right y coordinate
      • - *
      • ['ArtBox'] : the extent of the page's meaningful content:
      • - *
      • ['ArtBox']['llx'] : lower-left x coordinate
      • - *
      • ['ArtBox']['lly'] : lower-left y coordinate
      • - *
      • ['ArtBox']['urx'] : upper-right x coordinate
      • - *
      • ['ArtBox']['ury'] : upper-right y coordinate
      • - *
      • ['BoxColorInfo'] :specify the colours and other visual characteristics that should be used in displaying guidelines on the screen for each of the possible page boundaries other than the MediaBox:
      • - *
      • ['BoxColorInfo'][BOXTYPE]['C'] : an array of three numbers in the range 0-255, representing the components in the DeviceRGB colour space.
      • - *
      • ['BoxColorInfo'][BOXTYPE]['W'] : the guideline width in default user units
      • - *
      • ['BoxColorInfo'][BOXTYPE]['S'] : the guideline style: S = Solid; D = Dashed
      • - *
      • ['BoxColorInfo'][BOXTYPE]['D'] : dash array defining a pattern of dashes and gaps to be used in drawing dashed guidelines
      • - *
      • ['trans'] : the style and duration of the visual transition to use when moving from another page to the given page during a presentation
      • - *
      • ['trans']['Dur'] : The page's display duration (also called its advance timing): the maximum length of time, in seconds, that the page shall be displayed during presentations before the viewer application shall automatically advance to the next page.
      • - *
      • ['trans']['S'] : transition style : Split, Blinds, Box, Wipe, Dissolve, Glitter, R, Fly, Push, Cover, Uncover, Fade
      • - *
      • ['trans']['D'] : The duration of the transition effect, in seconds.
      • - *
      • ['trans']['Dm'] : (Split and Blinds transition styles only) The dimension in which the specified transition effect shall occur: H = Horizontal, V = Vertical. Default value: H.
      • - *
      • ['trans']['M'] : (Split, Box and Fly transition styles only) The direction of motion for the specified transition effect: I = Inward from the edges of the page, O = Outward from the center of the pageDefault value: I.
      • - *
      • ['trans']['Di'] : (Wipe, Glitter, Fly, Cover, Uncover and Push transition styles only) The direction in which the specified transition effect shall moves, expressed in degrees counterclockwise starting from a left-to-right direction. If the value is a number, it shall be one of: 0 = Left to right, 90 = Bottom to top (Wipe only), 180 = Right to left (Wipe only), 270 = Top to bottom, 315 = Top-left to bottom-right (Glitter only). If the value is a name, it shall be None, which is relevant only for the Fly transition when the value of SS is not 1.0. Default value: 0.
      • - *
      • ['trans']['SS'] : (Fly transition style only) The starting or ending scale at which the changes shall be drawn. If M specifies an inward transition, the scale of the changes drawn shall progress from SS to 1.0 over the course of the transition. If M specifies an outward transition, the scale of the changes drawn shall progress from 1.0 to SS over the course of the transition. Default: 1.0.
      • - *
      • ['trans']['B'] : (Fly transition style only) If true, the area that shall be flown in is rectangular and opaque. Default: false.
      • - *
      - * @param string $orientation page orientation. Possible values are (case insensitive):
        - *
      • P or Portrait (default)
      • - *
      • L or Landscape
      • - *
      • '' (empty string) for automatic orientation
      • - *
      - * @protected - * @since 3.0.015 (2008-06-06) - * @see getPageSizeFromFormat() - */ - protected function setPageFormat($format, $orientation='P') { - if (!empty($format) AND isset($this->pagedim[$this->page])) { - // remove inherited values - unset($this->pagedim[$this->page]); - } - if (is_string($format)) { - // get page measures from format name - $pf = TCPDF_STATIC::getPageSizeFromFormat($format); - $this->fwPt = $pf[0]; - $this->fhPt = $pf[1]; - } else { - // the boundaries of the physical medium on which the page shall be displayed or printed - if (isset($format['MediaBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'MediaBox', $format['MediaBox']['llx'], $format['MediaBox']['lly'], $format['MediaBox']['urx'], $format['MediaBox']['ury'], false, $this->k, $this->pagedim); - $this->fwPt = (($format['MediaBox']['urx'] - $format['MediaBox']['llx']) * $this->k); - $this->fhPt = (($format['MediaBox']['ury'] - $format['MediaBox']['lly']) * $this->k); - } else { - if (isset($format[0]) AND is_numeric($format[0]) AND isset($format[1]) AND is_numeric($format[1])) { - $pf = array(($format[0] * $this->k), ($format[1] * $this->k)); - } else { - if (!isset($format['format'])) { - // default value - $format['format'] = 'A4'; - } - $pf = TCPDF_STATIC::getPageSizeFromFormat($format['format']); - } - $this->fwPt = $pf[0]; - $this->fhPt = $pf[1]; - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'MediaBox', 0, 0, $this->fwPt, $this->fhPt, true, $this->k, $this->pagedim); - } - // the visible region of default user space - if (isset($format['CropBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'CropBox', $format['CropBox']['llx'], $format['CropBox']['lly'], $format['CropBox']['urx'], $format['CropBox']['ury'], false, $this->k, $this->pagedim); - } - // the region to which the contents of the page shall be clipped when output in a production environment - if (isset($format['BleedBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'BleedBox', $format['BleedBox']['llx'], $format['BleedBox']['lly'], $format['BleedBox']['urx'], $format['BleedBox']['ury'], false, $this->k, $this->pagedim); - } - // the intended dimensions of the finished page after trimming - if (isset($format['TrimBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'TrimBox', $format['TrimBox']['llx'], $format['TrimBox']['lly'], $format['TrimBox']['urx'], $format['TrimBox']['ury'], false, $this->k, $this->pagedim); - } - // the page's meaningful content (including potential white space) - if (isset($format['ArtBox'])) { - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'ArtBox', $format['ArtBox']['llx'], $format['ArtBox']['lly'], $format['ArtBox']['urx'], $format['ArtBox']['ury'], false, $this->k, $this->pagedim); - } - // specify the colours and other visual characteristics that should be used in displaying guidelines on the screen for the various page boundaries - if (isset($format['BoxColorInfo'])) { - $this->pagedim[$this->page]['BoxColorInfo'] = $format['BoxColorInfo']; - } - if (isset($format['Rotate']) AND (($format['Rotate'] % 90) == 0)) { - // The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90. - $this->pagedim[$this->page]['Rotate'] = intval($format['Rotate']); - } - if (isset($format['PZ'])) { - // The page's preferred zoom (magnification) factor - $this->pagedim[$this->page]['PZ'] = floatval($format['PZ']); - } - if (isset($format['trans'])) { - // The style and duration of the visual transition to use when moving from another page to the given page during a presentation - if (isset($format['trans']['Dur'])) { - // The page's display duration - $this->pagedim[$this->page]['trans']['Dur'] = floatval($format['trans']['Dur']); - } - $stansition_styles = array('Split', 'Blinds', 'Box', 'Wipe', 'Dissolve', 'Glitter', 'R', 'Fly', 'Push', 'Cover', 'Uncover', 'Fade'); - if (isset($format['trans']['S']) AND in_array($format['trans']['S'], $stansition_styles)) { - // The transition style that shall be used when moving to this page from another during a presentation - $this->pagedim[$this->page]['trans']['S'] = $format['trans']['S']; - $valid_effect = array('Split', 'Blinds'); - $valid_vals = array('H', 'V'); - if (isset($format['trans']['Dm']) AND in_array($format['trans']['S'], $valid_effect) AND in_array($format['trans']['Dm'], $valid_vals)) { - $this->pagedim[$this->page]['trans']['Dm'] = $format['trans']['Dm']; - } - $valid_effect = array('Split', 'Box', 'Fly'); - $valid_vals = array('I', 'O'); - if (isset($format['trans']['M']) AND in_array($format['trans']['S'], $valid_effect) AND in_array($format['trans']['M'], $valid_vals)) { - $this->pagedim[$this->page]['trans']['M'] = $format['trans']['M']; - } - $valid_effect = array('Wipe', 'Glitter', 'Fly', 'Cover', 'Uncover', 'Push'); - if (isset($format['trans']['Di']) AND in_array($format['trans']['S'], $valid_effect)) { - if (((($format['trans']['Di'] == 90) OR ($format['trans']['Di'] == 180)) AND ($format['trans']['S'] == 'Wipe')) - OR (($format['trans']['Di'] == 315) AND ($format['trans']['S'] == 'Glitter')) - OR (($format['trans']['Di'] == 0) OR ($format['trans']['Di'] == 270))) { - $this->pagedim[$this->page]['trans']['Di'] = intval($format['trans']['Di']); - } - } - if (isset($format['trans']['SS']) AND ($format['trans']['S'] == 'Fly')) { - $this->pagedim[$this->page]['trans']['SS'] = floatval($format['trans']['SS']); - } - if (isset($format['trans']['B']) AND ($format['trans']['B'] === true) AND ($format['trans']['S'] == 'Fly')) { - $this->pagedim[$this->page]['trans']['B'] = 'true'; - } - } else { - $this->pagedim[$this->page]['trans']['S'] = 'R'; - } - if (isset($format['trans']['D'])) { - // The duration of the transition effect, in seconds - $this->pagedim[$this->page]['trans']['D'] = floatval($format['trans']['D']); - } else { - $this->pagedim[$this->page]['trans']['D'] = 1; - } - } - } - $this->setPageOrientation($orientation); - } - - /** - * Set page orientation. - * @param string $orientation page orientation. Possible values are (case insensitive):
      • P or Portrait (default)
      • L or Landscape
      • '' (empty string) for automatic orientation
      - * @param boolean|null $autopagebreak Boolean indicating if auto-page-break mode should be on or off. - * @param float|null $bottommargin bottom margin of the page. - * @public - * @since 3.0.015 (2008-06-06) - */ - public function setPageOrientation($orientation, $autopagebreak=null, $bottommargin=null) { - if (!isset($this->pagedim[$this->page]['MediaBox'])) { - // the boundaries of the physical medium on which the page shall be displayed or printed - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'MediaBox', 0, 0, $this->fwPt, $this->fhPt, true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['CropBox'])) { - // the visible region of default user space - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'CropBox', $this->pagedim[$this->page]['MediaBox']['llx'], $this->pagedim[$this->page]['MediaBox']['lly'], $this->pagedim[$this->page]['MediaBox']['urx'], $this->pagedim[$this->page]['MediaBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['BleedBox'])) { - // the region to which the contents of the page shall be clipped when output in a production environment - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'BleedBox', $this->pagedim[$this->page]['CropBox']['llx'], $this->pagedim[$this->page]['CropBox']['lly'], $this->pagedim[$this->page]['CropBox']['urx'], $this->pagedim[$this->page]['CropBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['TrimBox'])) { - // the intended dimensions of the finished page after trimming - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'TrimBox', $this->pagedim[$this->page]['CropBox']['llx'], $this->pagedim[$this->page]['CropBox']['lly'], $this->pagedim[$this->page]['CropBox']['urx'], $this->pagedim[$this->page]['CropBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['ArtBox'])) { - // the page's meaningful content (including potential white space) - $this->pagedim = TCPDF_STATIC::setPageBoxes($this->page, 'ArtBox', $this->pagedim[$this->page]['CropBox']['llx'], $this->pagedim[$this->page]['CropBox']['lly'], $this->pagedim[$this->page]['CropBox']['urx'], $this->pagedim[$this->page]['CropBox']['ury'], true, $this->k, $this->pagedim); - } - if (!isset($this->pagedim[$this->page]['Rotate'])) { - // The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90. - $this->pagedim[$this->page]['Rotate'] = 0; - } - if (!isset($this->pagedim[$this->page]['PZ'])) { - // The page's preferred zoom (magnification) factor - $this->pagedim[$this->page]['PZ'] = 1; - } - if ($this->fwPt > $this->fhPt) { - // landscape - $default_orientation = 'L'; - } else { - // portrait - $default_orientation = 'P'; - } - $valid_orientations = array('P', 'L'); - if (empty($orientation)) { - $orientation = $default_orientation; - } else { - $orientation = strtoupper($orientation[0]); - } - if (in_array($orientation, $valid_orientations) AND ($orientation != $default_orientation)) { - $this->CurOrientation = $orientation; - $this->wPt = $this->fhPt; - $this->hPt = $this->fwPt; - } else { - $this->CurOrientation = $default_orientation; - $this->wPt = $this->fwPt; - $this->hPt = $this->fhPt; - } - if ((abs($this->pagedim[$this->page]['MediaBox']['urx'] - $this->hPt) < $this->feps) AND (abs($this->pagedim[$this->page]['MediaBox']['ury'] - $this->wPt) < $this->feps)){ - // swap X and Y coordinates (change page orientation) - $this->pagedim = TCPDF_STATIC::swapPageBoxCoordinates($this->page, $this->pagedim); - } - $this->w = ($this->wPt / $this->k); - $this->h = ($this->hPt / $this->k); - if (TCPDF_STATIC::empty_string($autopagebreak)) { - if (isset($this->AutoPageBreak)) { - $autopagebreak = $this->AutoPageBreak; - } else { - $autopagebreak = true; - } - } - if (TCPDF_STATIC::empty_string($bottommargin)) { - if (isset($this->bMargin)) { - $bottommargin = $this->bMargin; - } else { - // default value = 2 cm - $bottommargin = 2 * 28.35 / $this->k; - } - } - $this->setAutoPageBreak($autopagebreak, $bottommargin); - // store page dimensions - $this->pagedim[$this->page]['w'] = $this->wPt; - $this->pagedim[$this->page]['h'] = $this->hPt; - $this->pagedim[$this->page]['wk'] = $this->w; - $this->pagedim[$this->page]['hk'] = $this->h; - $this->pagedim[$this->page]['tm'] = $this->tMargin; - $this->pagedim[$this->page]['bm'] = $bottommargin; - $this->pagedim[$this->page]['lm'] = $this->lMargin; - $this->pagedim[$this->page]['rm'] = $this->rMargin; - $this->pagedim[$this->page]['pb'] = $autopagebreak; - $this->pagedim[$this->page]['or'] = $this->CurOrientation; - $this->pagedim[$this->page]['olm'] = $this->original_lMargin; - $this->pagedim[$this->page]['orm'] = $this->original_rMargin; - } - - /** - * Set regular expression to detect withespaces or word separators. - * The pattern delimiter must be the forward-slash character "/". - * Some example patterns are: - *
      -	 * Non-Unicode or missing PCRE unicode support: "/[^\S\xa0]/"
      -	 * Unicode and PCRE unicode support: "/(?!\xa0)[\s\p{Z}]/u"
      -	 * Unicode and PCRE unicode support in Chinese mode: "/(?!\xa0)[\s\p{Z}\p{Lo}]/u"
      -	 * if PCRE unicode support is turned ON ("\P" is the negate class of "\p"):
      -	 *      \s     : any whitespace character
      -	 *      \p{Z}  : any separator
      -	 *      \p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words.
      -	 *      \xa0   : Unicode Character 'NO-BREAK SPACE' (U+00A0)
      -	 * 
      - * @param string $re regular expression (leave empty for default). - * @public - * @since 4.6.016 (2009-06-15) - */ - public function setSpacesRE($re='/[^\S\xa0]/') { - $this->re_spaces = $re; - $re_parts = explode('/', $re); - // get pattern parts - $this->re_space = array(); - if (isset($re_parts[1]) AND !empty($re_parts[1])) { - $this->re_space['p'] = $re_parts[1]; - } else { - $this->re_space['p'] = '[\s]'; - } - // set pattern modifiers - if (isset($re_parts[2]) AND !empty($re_parts[2])) { - $this->re_space['m'] = $re_parts[2]; - } else { - $this->re_space['m'] = ''; - } - } - - /** - * Enable or disable Right-To-Left language mode - * @param boolean $enable if true enable Right-To-Left language mode. - * @param boolean $resetx if true reset the X position on direction change. - * @public - * @since 2.0.000 (2008-01-03) - */ - public function setRTL($enable, $resetx=true) { - $enable = $enable ? true : false; - $resetx = ($resetx AND ($enable != $this->rtl)); - $this->rtl = $enable; - $this->tmprtl = false; - if ($resetx) { - $this->Ln(0); - } - } - - /** - * Return the RTL status - * @return bool - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getRTL() { - return $this->rtl; - } - - /** - * Force temporary RTL language direction - * @param false|string $mode can be false, 'L' for LTR or 'R' for RTL - * @public - * @since 2.1.000 (2008-01-09) - */ - public function setTempRTL($mode) { - $newmode = false; - switch (strtoupper($mode)) { - case 'LTR': - case 'L': { - if ($this->rtl) { - $newmode = 'L'; - } - break; - } - case 'RTL': - case 'R': { - if (!$this->rtl) { - $newmode = 'R'; - } - break; - } - case false: - default: { - $newmode = false; - break; - } - } - $this->tmprtl = $newmode; - } - - /** - * Return the current temporary RTL status - * @return bool - * @public - * @since 4.8.014 (2009-11-04) - */ - public function isRTLTextDir() { - return ($this->rtl OR ($this->tmprtl == 'R')); - } - - /** - * Set the last cell height. - * @param float $h cell height. - * @author Nicola Asuni - * @public - * @since 1.53.0.TC034 - */ - public function setLastH($h) { - $this->lasth = $h; - } - - /** - * Return the cell height - * @param int $fontsize Font size in internal units - * @param boolean $padding If true add cell padding - * @public - * @return float - */ - public function getCellHeight($fontsize, $padding=TRUE) { - $height = ($fontsize * $this->cell_height_ratio); - if ($padding) { - $height += ($this->cell_padding['T'] + $this->cell_padding['B']); - } - return round($height, 6); - } - - /** - * Reset the last cell height. - * @public - * @since 5.9.000 (2010-10-03) - */ - public function resetLastH() { - $this->lasth = $this->getCellHeight($this->FontSize); - } - - /** - * Get the last cell height. - * @return float last cell height - * @public - * @since 4.0.017 (2008-08-05) - */ - public function getLastH() { - return $this->lasth; - } - - /** - * Set the adjusting factor to convert pixels to user units. - * @param float $scale adjusting factor to convert pixels to user units. - * @author Nicola Asuni - * @public - * @since 1.5.2 - */ - public function setImageScale($scale) { - $this->imgscale = $scale; - } - - /** - * Returns the adjusting factor to convert pixels to user units. - * @return float adjusting factor to convert pixels to user units. - * @author Nicola Asuni - * @public - * @since 1.5.2 - */ - public function getImageScale() { - return $this->imgscale; - } - - /** - * Returns an array of page dimensions: - *
      • $this->pagedim[$this->page]['w'] = page width in points
      • $this->pagedim[$this->page]['h'] = height in points
      • $this->pagedim[$this->page]['wk'] = page width in user units
      • $this->pagedim[$this->page]['hk'] = page height in user units
      • $this->pagedim[$this->page]['tm'] = top margin
      • $this->pagedim[$this->page]['bm'] = bottom margin
      • $this->pagedim[$this->page]['lm'] = left margin
      • $this->pagedim[$this->page]['rm'] = right margin
      • $this->pagedim[$this->page]['pb'] = auto page break
      • $this->pagedim[$this->page]['or'] = page orientation
      • $this->pagedim[$this->page]['olm'] = original left margin
      • $this->pagedim[$this->page]['orm'] = original right margin
      • $this->pagedim[$this->page]['Rotate'] = The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90.
      • $this->pagedim[$this->page]['PZ'] = The page's preferred zoom (magnification) factor.
      • $this->pagedim[$this->page]['trans'] : the style and duration of the visual transition to use when moving from another page to the given page during a presentation
        • $this->pagedim[$this->page]['trans']['Dur'] = The page's display duration (also called its advance timing): the maximum length of time, in seconds, that the page shall be displayed during presentations before the viewer application shall automatically advance to the next page.
        • $this->pagedim[$this->page]['trans']['S'] = transition style : Split, Blinds, Box, Wipe, Dissolve, Glitter, R, Fly, Push, Cover, Uncover, Fade
        • $this->pagedim[$this->page]['trans']['D'] = The duration of the transition effect, in seconds.
        • $this->pagedim[$this->page]['trans']['Dm'] = (Split and Blinds transition styles only) The dimension in which the specified transition effect shall occur: H = Horizontal, V = Vertical. Default value: H.
        • $this->pagedim[$this->page]['trans']['M'] = (Split, Box and Fly transition styles only) The direction of motion for the specified transition effect: I = Inward from the edges of the page, O = Outward from the center of the pageDefault value: I.
        • $this->pagedim[$this->page]['trans']['Di'] = (Wipe, Glitter, Fly, Cover, Uncover and Push transition styles only) The direction in which the specified transition effect shall moves, expressed in degrees counterclockwise starting from a left-to-right direction. If the value is a number, it shall be one of: 0 = Left to right, 90 = Bottom to top (Wipe only), 180 = Right to left (Wipe only), 270 = Top to bottom, 315 = Top-left to bottom-right (Glitter only). If the value is a name, it shall be None, which is relevant only for the Fly transition when the value of SS is not 1.0. Default value: 0.
        • $this->pagedim[$this->page]['trans']['SS'] = (Fly transition style only) The starting or ending scale at which the changes shall be drawn. If M specifies an inward transition, the scale of the changes drawn shall progress from SS to 1.0 over the course of the transition. If M specifies an outward transition, the scale of the changes drawn shall progress from 1.0 to SS over the course of the transition. Default: 1.0.
        • $this->pagedim[$this->page]['trans']['B'] = (Fly transition style only) If true, the area that shall be flown in is rectangular and opaque. Default: false.
      • $this->pagedim[$this->page]['MediaBox'] : the boundaries of the physical medium on which the page shall be displayed or printed
        • $this->pagedim[$this->page]['MediaBox']['llx'] = lower-left x coordinate in points
        • $this->pagedim[$this->page]['MediaBox']['lly'] = lower-left y coordinate in points
        • $this->pagedim[$this->page]['MediaBox']['urx'] = upper-right x coordinate in points
        • $this->pagedim[$this->page]['MediaBox']['ury'] = upper-right y coordinate in points
      • $this->pagedim[$this->page]['CropBox'] : the visible region of default user space
        • $this->pagedim[$this->page]['CropBox']['llx'] = lower-left x coordinate in points
        • $this->pagedim[$this->page]['CropBox']['lly'] = lower-left y coordinate in points
        • $this->pagedim[$this->page]['CropBox']['urx'] = upper-right x coordinate in points
        • $this->pagedim[$this->page]['CropBox']['ury'] = upper-right y coordinate in points
      • $this->pagedim[$this->page]['BleedBox'] : the region to which the contents of the page shall be clipped when output in a production environment
        • $this->pagedim[$this->page]['BleedBox']['llx'] = lower-left x coordinate in points
        • $this->pagedim[$this->page]['BleedBox']['lly'] = lower-left y coordinate in points
        • $this->pagedim[$this->page]['BleedBox']['urx'] = upper-right x coordinate in points
        • $this->pagedim[$this->page]['BleedBox']['ury'] = upper-right y coordinate in points
      • $this->pagedim[$this->page]['TrimBox'] : the intended dimensions of the finished page after trimming
        • $this->pagedim[$this->page]['TrimBox']['llx'] = lower-left x coordinate in points
        • $this->pagedim[$this->page]['TrimBox']['lly'] = lower-left y coordinate in points
        • $this->pagedim[$this->page]['TrimBox']['urx'] = upper-right x coordinate in points
        • $this->pagedim[$this->page]['TrimBox']['ury'] = upper-right y coordinate in points
      • $this->pagedim[$this->page]['ArtBox'] : the extent of the page's meaningful content
        • $this->pagedim[$this->page]['ArtBox']['llx'] = lower-left x coordinate in points
        • $this->pagedim[$this->page]['ArtBox']['lly'] = lower-left y coordinate in points
        • $this->pagedim[$this->page]['ArtBox']['urx'] = upper-right x coordinate in points
        • $this->pagedim[$this->page]['ArtBox']['ury'] = upper-right y coordinate in points
      - * @param int|null $pagenum page number (empty = current page) - * @return array of page dimensions. - * @author Nicola Asuni - * @public - * @since 4.5.027 (2009-03-16) - */ - public function getPageDimensions($pagenum=null) { - if (empty($pagenum)) { - $pagenum = $this->page; - } - return $this->pagedim[$pagenum]; - } - - /** - * Returns the page width in units. - * @param int|null $pagenum page number (empty = current page) - * @return int page width. - * @author Nicola Asuni - * @public - * @since 1.5.2 - * @see getPageDimensions() - */ - public function getPageWidth($pagenum=null) { - if (empty($pagenum)) { - return $this->w; - } - return $this->pagedim[$pagenum]['w']; - } - - /** - * Returns the page height in units. - * @param int|null $pagenum page number (empty = current page) - * @return int page height. - * @author Nicola Asuni - * @public - * @since 1.5.2 - * @see getPageDimensions() - */ - public function getPageHeight($pagenum=null) { - if (empty($pagenum)) { - return $this->h; - } - return $this->pagedim[$pagenum]['h']; - } - - /** - * Returns the page break margin. - * @param int|null $pagenum page number (empty = current page) - * @return int page break margin. - * @author Nicola Asuni - * @public - * @since 1.5.2 - * @see getPageDimensions() - */ - public function getBreakMargin($pagenum=null) { - if (empty($pagenum)) { - return $this->bMargin; - } - return $this->pagedim[$pagenum]['bm']; - } - - /** - * Returns the scale factor (number of points in user unit). - * @return int scale factor. - * @author Nicola Asuni - * @public - * @since 1.5.2 - */ - public function getScaleFactor() { - return $this->k; - } - - /** - * Defines the left, top and right margins. - * @param float $left Left margin. - * @param float $top Top margin. - * @param float $right Right margin. Default value is the left one. - * @param boolean $keepmargins if true overwrites the default page margins - * @public - * @since 1.0 - * @see SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak() - */ - public function setMargins($left, $top, $right=null, $keepmargins=false) { - //Set left, top and right margins - $this->lMargin = $left; - $this->tMargin = $top; - if ($right == -1 OR $right === null) { - $right = $left; - } - $this->rMargin = $right; - if ($keepmargins) { - // overwrite original values - $this->original_lMargin = $this->lMargin; - $this->original_rMargin = $this->rMargin; - } - } - - /** - * Defines the left margin. The method can be called before creating the first page. If the current abscissa gets out of page, it is brought back to the margin. - * @param float $margin The margin. - * @public - * @since 1.4 - * @see SetTopMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins() - */ - public function setLeftMargin($margin) { - //Set left margin - $this->lMargin = $margin; - if (($this->page > 0) AND ($this->x < $margin)) { - $this->x = $margin; - } - } - - /** - * Defines the top margin. The method can be called before creating the first page. - * @param float $margin The margin. - * @public - * @since 1.5 - * @see SetLeftMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins() - */ - public function setTopMargin($margin) { - //Set top margin - $this->tMargin = $margin; - if (($this->page > 0) AND ($this->y < $margin)) { - $this->y = $margin; - } - } - - /** - * Defines the right margin. The method can be called before creating the first page. - * @param float $margin The margin. - * @public - * @since 1.5 - * @see SetLeftMargin(), SetTopMargin(), SetAutoPageBreak(), SetMargins() - */ - public function setRightMargin($margin) { - $this->rMargin = $margin; - if (($this->page > 0) AND ($this->x > ($this->w - $margin))) { - $this->x = $this->w - $margin; - } - } - - /** - * Set the same internal Cell padding for top, right, bottom, left- - * @param float $pad internal padding. - * @public - * @since 2.1.000 (2008-01-09) - * @see getCellPaddings(), setCellPaddings() - */ - public function setCellPadding($pad) { - if ($pad >= 0) { - $this->cell_padding['L'] = $pad; - $this->cell_padding['T'] = $pad; - $this->cell_padding['R'] = $pad; - $this->cell_padding['B'] = $pad; - } - } - - /** - * Set the internal Cell paddings. - * @param float|null $left left padding - * @param float|null $top top padding - * @param float|null $right right padding - * @param float|null $bottom bottom padding - * @public - * @since 5.9.000 (2010-10-03) - * @see getCellPaddings(), SetCellPadding() - */ - public function setCellPaddings($left=null, $top=null, $right=null, $bottom=null) { - if (!TCPDF_STATIC::empty_string($left) AND ($left >= 0)) { - $this->cell_padding['L'] = $left; - } - if (!TCPDF_STATIC::empty_string($top) AND ($top >= 0)) { - $this->cell_padding['T'] = $top; - } - if (!TCPDF_STATIC::empty_string($right) AND ($right >= 0)) { - $this->cell_padding['R'] = $right; - } - if (!TCPDF_STATIC::empty_string($bottom) AND ($bottom >= 0)) { - $this->cell_padding['B'] = $bottom; - } - } - - /** - * Get the internal Cell padding array. - * @return array of padding values - * @public - * @since 5.9.000 (2010-10-03) - * @see setCellPaddings(), SetCellPadding() - */ - public function getCellPaddings() { - return $this->cell_padding; - } - - /** - * Set the internal Cell margins. - * @param float|null $left left margin - * @param float|null $top top margin - * @param float|null $right right margin - * @param float|null $bottom bottom margin - * @public - * @since 5.9.000 (2010-10-03) - * @see getCellMargins() - */ - public function setCellMargins($left=null, $top=null, $right=null, $bottom=null) { - if (!TCPDF_STATIC::empty_string($left) AND ($left >= 0)) { - $this->cell_margin['L'] = $left; - } - if (!TCPDF_STATIC::empty_string($top) AND ($top >= 0)) { - $this->cell_margin['T'] = $top; - } - if (!TCPDF_STATIC::empty_string($right) AND ($right >= 0)) { - $this->cell_margin['R'] = $right; - } - if (!TCPDF_STATIC::empty_string($bottom) AND ($bottom >= 0)) { - $this->cell_margin['B'] = $bottom; - } - } - - /** - * Get the internal Cell margin array. - * @return array of margin values - * @public - * @since 5.9.000 (2010-10-03) - * @see setCellMargins() - */ - public function getCellMargins() { - return $this->cell_margin; - } - - /** - * Adjust the internal Cell padding array to take account of the line width. - * @param string|array|int $brd Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return void|array array of adjustments - * @public - * @since 5.9.000 (2010-10-03) - */ - protected function adjustCellPadding($brd=0) { - if (empty($brd)) { - return; - } - if (is_string($brd)) { - // convert string to array - $slen = strlen($brd); - $newbrd = array(); - for ($i = 0; $i < $slen; ++$i) { - $newbrd[$brd[$i]] = true; - } - $brd = $newbrd; - } elseif ( - ($brd === 1) - || ($brd === true) - || (is_numeric($brd) && ((int)$brd > 0)) - ) { - $brd = array('LRTB' => true); - } - if (!is_array($brd)) { - return; - } - // store current cell padding - $cp = $this->cell_padding; - // select border mode - if (isset($brd['mode'])) { - $mode = $brd['mode']; - unset($brd['mode']); - } else { - $mode = 'normal'; - } - // process borders - foreach ($brd as $border => $style) { - $line_width = $this->LineWidth; - if (is_array($style) && isset($style['width'])) { - // get border width - $line_width = $style['width']; - } - $adj = 0; // line width inside the cell - switch ($mode) { - case 'ext': { - $adj = 0; - break; - } - case 'int': { - $adj = $line_width; - break; - } - case 'normal': - default: { - $adj = ($line_width / 2); - break; - } - } - // correct internal cell padding if required to avoid overlap between text and lines - if ( - is_numeric($this->cell_padding['T']) - && ($this->cell_padding['T'] < $adj) - && (strpos($border, 'T') !== false) - ) { - $this->cell_padding['T'] = $adj; - } - if ( - is_numeric($this->cell_padding['R']) - && ($this->cell_padding['R'] < $adj) - && (strpos($border, 'R') !== false) - ) { - $this->cell_padding['R'] = $adj; - } - if ( - is_numeric($this->cell_padding['B']) - && ($this->cell_padding['B'] < $adj) - && (strpos($border, 'B') !== false) - ) { - $this->cell_padding['B'] = $adj; - } - if ( - is_numeric($this->cell_padding['L']) - && ($this->cell_padding['L'] < $adj) - && (strpos($border, 'L') !== false) - ) { - $this->cell_padding['L'] = $adj; - } - - } - - return array( - 'T' => ($this->cell_padding['T'] - $cp['T']), - 'R' => ($this->cell_padding['R'] - $cp['R']), - 'B' => ($this->cell_padding['B'] - $cp['B']), - 'L' => ($this->cell_padding['L'] - $cp['L']), - ); - } - - /** - * Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm. - * @param boolean $auto Boolean indicating if mode should be on or off. - * @param float $margin Distance from the bottom of the page. - * @public - * @since 1.0 - * @see Cell(), MultiCell(), AcceptPageBreak() - */ - public function setAutoPageBreak($auto, $margin=0) { - $this->AutoPageBreak = $auto ? true : false; - $this->bMargin = $margin; - $this->PageBreakTrigger = $this->h - $margin; - } - - /** - * Return the auto-page-break mode (true or false). - * @return bool auto-page-break mode - * @public - * @since 5.9.088 - */ - public function getAutoPageBreak() { - return $this->AutoPageBreak; - } - - /** - * Defines the way the document is to be displayed by the viewer. - * @param mixed $zoom The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use.
      • fullpage: displays the entire page on screen
      • fullwidth: uses maximum width of window
      • real: uses real size (equivalent to 100% zoom)
      • default: uses viewer default mode
      - * @param string $layout The page layout. Possible values are:
      • SinglePage Display one page at a time
      • OneColumn Display the pages in one column
      • TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left
      • TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right
      • TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left
      • TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right
      - * @param string $mode A name object specifying how the document should be displayed when opened:
      • UseNone Neither document outline nor thumbnail images visible
      • UseOutlines Document outline visible
      • UseThumbs Thumbnail images visible
      • FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible
      • UseOC (PDF 1.5) Optional content group panel visible
      • UseAttachments (PDF 1.6) Attachments panel visible
      - * @public - * @since 1.2 - */ - public function setDisplayMode($zoom, $layout='SinglePage', $mode='UseNone') { - if (($zoom == 'fullpage') OR ($zoom == 'fullwidth') OR ($zoom == 'real') OR ($zoom == 'default') OR (!is_string($zoom))) { - $this->ZoomMode = $zoom; - } else { - $this->Error('Incorrect zoom display mode: '.$zoom); - } - $this->LayoutMode = TCPDF_STATIC::getPageLayoutMode($layout); - $this->PageMode = TCPDF_STATIC::getPageMode($mode); - } - - /** - * Activates or deactivates page compression. When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document. Compression is on by default. - * Note: the Zlib extension is required for this feature. If not present, compression will be turned off. - * @param boolean $compress Boolean indicating if compression must be enabled. - * @public - * @since 1.4 - */ - public function setCompression($compress=true) { - $this->compress = false; - if (function_exists('gzcompress')) { - if ($compress) { - if ( !$this->pdfa_mode) { - $this->compress = true; - } - } - } - } - - /** - * Set flag to force sRGB_IEC61966-2.1 black scaled ICC color profile for the whole document. - * @param boolean $mode If true force sRGB output intent. - * @public - * @since 5.9.121 (2011-09-28) - */ - public function setSRGBmode($mode=false) { - $this->force_srgb = $mode ? true : false; - } - - /** - * Turn on/off Unicode mode for document information dictionary (meta tags). - * This has effect only when unicode mode is set to false. - * @param boolean $unicode if true set the meta information in Unicode - * @since 5.9.027 (2010-12-01) - * @public - */ - public function setDocInfoUnicode($unicode=true) { - $this->docinfounicode = $unicode ? true : false; - } - - /** - * Defines the title of the document. - * @param string $title The title. - * @public - * @since 1.2 - * @see SetAuthor(), SetCreator(), SetKeywords(), SetSubject() - */ - public function setTitle($title) { - $this->title = $title; - } - - /** - * Defines the subject of the document. - * @param string $subject The subject. - * @public - * @since 1.2 - * @see SetAuthor(), SetCreator(), SetKeywords(), SetTitle() - */ - public function setSubject($subject) { - $this->subject = $subject; - } - - /** - * Defines the author of the document. - * @param string $author The name of the author. - * @public - * @since 1.2 - * @see SetCreator(), SetKeywords(), SetSubject(), SetTitle() - */ - public function setAuthor($author) { - $this->author = $author; - } - - /** - * Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. - * @param string $keywords The list of keywords. - * @public - * @since 1.2 - * @see SetAuthor(), SetCreator(), SetSubject(), SetTitle() - */ - public function setKeywords($keywords) { - $this->keywords = $keywords; - } - - /** - * Defines the creator of the document. This is typically the name of the application that generates the PDF. - * @param string $creator The name of the creator. - * @public - * @since 1.2 - * @see SetAuthor(), SetKeywords(), SetSubject(), SetTitle() - */ - public function setCreator($creator) { - $this->creator = $creator; - } - - /** - * Whether to allow local file path in image html tags, when prefixed with file:// - * - * @param bool $allowLocalFiles true, when local files should be allowed. Otherwise false. - * @public - * @since 6.4 - */ - public function setAllowLocalFiles($allowLocalFiles) { - $this->allowLocalFiles = (bool) $allowLocalFiles; - } - - - /** - * Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true. - * @param string $msg The error message - * @public - * @since 1.0 - */ - public function Error($msg) { - // unset all class variables - $this->_destroy(true); - if (defined('K_TCPDF_THROW_EXCEPTION_ERROR') AND !K_TCPDF_THROW_EXCEPTION_ERROR) { - die('TCPDF ERROR: '.$msg); - } else { - throw new Exception('TCPDF ERROR: '.$msg); - } - } - - /** - * This method begins the generation of the PDF document. - * It is not necessary to call it explicitly because AddPage() does it automatically. - * Note: no page is created by this method - * @public - * @since 1.0 - * @see AddPage(), Close() - */ - public function Open() { - $this->state = 1; - } - - /** - * Terminates the PDF document. - * It is not necessary to call this method explicitly because Output() does it automatically. - * If the document contains no page, AddPage() is called to prevent from getting an invalid document. - * @public - * @since 1.0 - * @see Open(), Output() - */ - public function Close() { - if ($this->state == 3) { - return; - } - if ($this->page == 0) { - $this->AddPage(); - } - $this->endLayer(); - if ($this->tcpdflink) { - // save current graphic settings - $gvars = $this->getGraphicVars(); - $this->setEqualColumns(); - $this->lastpage(true); - $this->setAutoPageBreak(false); - $this->x = 0; - $this->y = $this->h - (1 / $this->k); - $this->lMargin = 0; - $this->_outSaveGraphicsState(); - $font = defined('PDF_FONT_NAME_MAIN')?PDF_FONT_NAME_MAIN:'helvetica'; - $this->setFont($font, '', 1); - $this->setTextRenderingMode(0, false, false); - $msg = "\x50\x6f\x77\x65\x72\x65\x64\x20\x62\x79\x20\x54\x43\x50\x44\x46\x20\x28\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29"; - $lnk = "\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67"; - $this->Cell(0, 0, $msg, 0, 0, 'L', 0, $lnk, 0, false, 'D', 'B'); - $this->_outRestoreGraphicsState(); - // restore graphic settings - $this->setGraphicVars($gvars); - } - // close page - $this->endPage(); - // close document - $this->_enddoc(); - // unset all class variables (except critical ones) - $this->_destroy(false); - } - - /** - * Move pointer at the specified document page and update page dimensions. - * @param int $pnum page number (1 ... numpages) - * @param boolean $resetmargins if true reset left, right, top margins and Y position. - * @public - * @since 2.1.000 (2008-01-07) - * @see getPage(), lastpage(), getNumPages() - */ - public function setPage($pnum, $resetmargins=false) { - if (($pnum == $this->page) AND ($this->state == 2)) { - return; - } - if (($pnum > 0) AND ($pnum <= $this->numpages)) { - $this->state = 2; - // save current graphic settings - //$gvars = $this->getGraphicVars(); - $oldpage = $this->page; - $this->page = $pnum; - $this->wPt = $this->pagedim[$this->page]['w']; - $this->hPt = $this->pagedim[$this->page]['h']; - $this->w = $this->pagedim[$this->page]['wk']; - $this->h = $this->pagedim[$this->page]['hk']; - $this->tMargin = $this->pagedim[$this->page]['tm']; - $this->bMargin = $this->pagedim[$this->page]['bm']; - $this->original_lMargin = $this->pagedim[$this->page]['olm']; - $this->original_rMargin = $this->pagedim[$this->page]['orm']; - $this->AutoPageBreak = $this->pagedim[$this->page]['pb']; - $this->CurOrientation = $this->pagedim[$this->page]['or']; - $this->setAutoPageBreak($this->AutoPageBreak, $this->bMargin); - // restore graphic settings - //$this->setGraphicVars($gvars); - if ($resetmargins) { - $this->lMargin = $this->pagedim[$this->page]['olm']; - $this->rMargin = $this->pagedim[$this->page]['orm']; - $this->setY($this->tMargin); - } else { - // account for booklet mode - if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) { - $deltam = $this->pagedim[$this->page]['olm'] - $this->pagedim[$this->page]['orm']; - $this->lMargin += $deltam; - $this->rMargin -= $deltam; - } - } - } else { - $this->Error('Wrong page number on setPage() function: '.$pnum); - } - } - - /** - * Reset pointer to the last document page. - * @param boolean $resetmargins if true reset left, right, top margins and Y position. - * @public - * @since 2.0.000 (2008-01-04) - * @see setPage(), getPage(), getNumPages() - */ - public function lastPage($resetmargins=false) { - $this->setPage($this->getNumPages(), $resetmargins); - } - - /** - * Get current document page number. - * @return int page number - * @public - * @since 2.1.000 (2008-01-07) - * @see setPage(), lastpage(), getNumPages() - */ - public function getPage() { - return $this->page; - } - - /** - * Get the total number of insered pages. - * @return int number of pages - * @public - * @since 2.1.000 (2008-01-07) - * @see setPage(), getPage(), lastpage() - */ - public function getNumPages() { - return $this->numpages; - } - - /** - * Adds a new TOC (Table Of Content) page to the document. - * @param string $orientation page orientation. - * @param mixed $format The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param boolean $keepmargins if true overwrites the default page margins with the current margins - * @public - * @since 5.0.001 (2010-05-06) - * @see AddPage(), startPage(), endPage(), endTOCPage() - */ - public function addTOCPage($orientation='', $format='', $keepmargins=false) { - $this->AddPage($orientation, $format, $keepmargins, true); - } - - /** - * Terminate the current TOC (Table Of Content) page - * @public - * @since 5.0.001 (2010-05-06) - * @see AddPage(), startPage(), endPage(), addTOCPage() - */ - public function endTOCPage() { - $this->endPage(true); - } - - /** - * Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer (if enabled). Then the page is added, the current position set to the top-left corner according to the left and top margins (or top-right if in RTL mode), and Header() is called to display the header (if enabled). - * The origin of the coordinate system is at the top-left corner (or top-right for RTL) and increasing ordinates go downwards. - * @param string $orientation page orientation. Possible values are (case insensitive):
      • P or PORTRAIT (default)
      • L or LANDSCAPE
      - * @param mixed $format The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param boolean $keepmargins if true overwrites the default page margins with the current margins - * @param boolean $tocpage if true set the tocpage state to true (the added page will be used to display Table Of Content). - * @public - * @since 1.0 - * @see startPage(), endPage(), addTOCPage(), endTOCPage(), getPageSizeFromFormat(), setPageFormat() - */ - public function AddPage($orientation='', $format='', $keepmargins=false, $tocpage=false) { - if ($this->inxobj) { - // we are inside an XObject template - return; - } - if (!isset($this->original_lMargin) OR $keepmargins) { - $this->original_lMargin = $this->lMargin; - } - if (!isset($this->original_rMargin) OR $keepmargins) { - $this->original_rMargin = $this->rMargin; - } - // terminate previous page - $this->endPage(); - // start new page - $this->startPage($orientation, $format, $tocpage); - } - - /** - * Terminate the current page - * @param boolean $tocpage if true set the tocpage state to false (end the page used to display Table Of Content). - * @public - * @since 4.2.010 (2008-11-14) - * @see AddPage(), startPage(), addTOCPage(), endTOCPage() - */ - public function endPage($tocpage=false) { - // check if page is already closed - if (($this->page == 0) OR ($this->numpages > $this->page) OR (!$this->pageopen[$this->page])) { - return; - } - // print page footer - $this->setFooter(); - // close page - $this->_endpage(); - // mark page as closed - $this->pageopen[$this->page] = false; - if ($tocpage) { - $this->tocpage = false; - } - } - - /** - * Starts a new page to the document. The page must be closed using the endPage() function. - * The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards. - * @param string $orientation page orientation. Possible values are (case insensitive):
      • P or PORTRAIT (default)
      • L or LANDSCAPE
      - * @param mixed $format The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @param boolean $tocpage if true the page is designated to contain the Table-Of-Content. - * @since 4.2.010 (2008-11-14) - * @see AddPage(), endPage(), addTOCPage(), endTOCPage(), getPageSizeFromFormat(), setPageFormat() - * @public - */ - public function startPage($orientation='', $format='', $tocpage=false) { - if ($tocpage) { - $this->tocpage = true; - } - // move page numbers of documents to be attached - if ($this->tocpage) { - // move reference to unexistent pages (used for page attachments) - // adjust outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if (!$outline['f'] AND ($outline['p'] > $this->numpages)) { - $this->outlines[$key]['p'] = ($outline['p'] + 1); - } - } - // adjust dests - $tmpdests = $this->dests; - foreach ($tmpdests as $key => $dest) { - if (!$dest['f'] AND ($dest['p'] > $this->numpages)) { - $this->dests[$key]['p'] = ($dest['p'] + 1); - } - } - // adjust links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if (!$link['f'] AND ($link['p'] > $this->numpages)) { - $this->links[$key]['p'] = ($link['p'] + 1); - } - } - } - if ($this->numpages > $this->page) { - // this page has been already added - $this->setPage($this->page + 1); - $this->setY($this->tMargin); - return; - } - // start a new page - if ($this->state == 0) { - $this->Open(); - } - ++$this->numpages; - $this->swapMargins($this->booklet); - // save current graphic settings - $gvars = $this->getGraphicVars(); - // start new page - $this->_beginpage($orientation, $format); - // mark page as open - $this->pageopen[$this->page] = true; - // restore graphic settings - $this->setGraphicVars($gvars); - // mark this point - $this->setPageMark(); - // print page header - $this->setHeader(); - // restore graphic settings - $this->setGraphicVars($gvars); - // mark this point - $this->setPageMark(); - // print table header (if any) - $this->setTableHeader(); - // set mark for empty page check - $this->emptypagemrk[$this->page]= $this->pagelen[$this->page]; - } - - /** - * Set start-writing mark on current page stream used to put borders and fills. - * Borders and fills are always created after content and inserted on the position marked by this method. - * This function must be called after calling Image() function for a background image. - * Background images must be always inserted before calling Multicell() or WriteHTMLCell() or WriteHTML() functions. - * @public - * @since 4.0.016 (2008-07-30) - */ - public function setPageMark() { - $this->intmrk[$this->page] = $this->pagelen[$this->page]; - $this->bordermrk[$this->page] = $this->intmrk[$this->page]; - $this->setContentMark(); - } - - /** - * Set start-writing mark on selected page. - * Borders and fills are always created after content and inserted on the position marked by this method. - * @param int $page page number (default is the current page) - * @protected - * @since 4.6.021 (2009-07-20) - */ - protected function setContentMark($page=0) { - if ($page <= 0) { - $page = $this->page; - } - if (isset($this->footerlen[$page])) { - $this->cntmrk[$page] = $this->pagelen[$page] - $this->footerlen[$page]; - } else { - $this->cntmrk[$page] = $this->pagelen[$page]; - } - } - - /** - * Set header data. - * @param string $ln header image logo - * @param int $lw header image logo width in mm - * @param string $ht string to print as title on document header - * @param string $hs string to print on document header - * @param int[] $tc RGB array color for text. - * @param int[] $lc RGB array color for line. - * @public - */ - public function setHeaderData($ln='', $lw=0, $ht='', $hs='', $tc=array(0,0,0), $lc=array(0,0,0)) { - $this->header_logo = $ln; - $this->header_logo_width = $lw; - $this->header_title = $ht; - $this->header_string = $hs; - $this->header_text_color = $tc; - $this->header_line_color = $lc; - } - - /** - * Set footer data. - * @param int[] $tc RGB array color for text. - * @param int[] $lc RGB array color for line. - * @public - */ - public function setFooterData($tc=array(0,0,0), $lc=array(0,0,0)) { - $this->footer_text_color = $tc; - $this->footer_line_color = $lc; - } - - /** - * Returns header data: - *
      • $ret['logo'] = logo image
      • $ret['logo_width'] = width of the image logo in user units
      • $ret['title'] = header title
      • $ret['string'] = header description string
      - * @return array - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getHeaderData() { - $ret = array(); - $ret['logo'] = $this->header_logo; - $ret['logo_width'] = $this->header_logo_width; - $ret['title'] = $this->header_title; - $ret['string'] = $this->header_string; - $ret['text_color'] = $this->header_text_color; - $ret['line_color'] = $this->header_line_color; - return $ret; - } - - /** - * Set header margin. - * (minimum distance between header and top page margin) - * @param int $hm distance in user units - * @public - */ - public function setHeaderMargin($hm=10) { - $this->header_margin = $hm; - } - - /** - * Returns header margin in user units. - * @return float - * @since 4.0.012 (2008-07-24) - * @public - */ - public function getHeaderMargin() { - return $this->header_margin; - } - - /** - * Set footer margin. - * (minimum distance between footer and bottom page margin) - * @param int $fm distance in user units - * @public - */ - public function setFooterMargin($fm=10) { - $this->footer_margin = $fm; - } - - /** - * Returns footer margin in user units. - * @return float - * @since 4.0.012 (2008-07-24) - * @public - */ - public function getFooterMargin() { - return $this->footer_margin; - } - /** - * Set a flag to print page header. - * @param boolean $val set to true to print the page header (default), false otherwise. - * @public - */ - public function setPrintHeader($val=true) { - $this->print_header = $val ? true : false; - } - - /** - * Set a flag to print page footer. - * @param boolean $val set to true to print the page footer (default), false otherwise. - * @public - */ - public function setPrintFooter($val=true) { - $this->print_footer = $val ? true : false; - } - - /** - * Return the right-bottom (or left-bottom for RTL) corner X coordinate of last inserted image - * @return float - * @public - */ - public function getImageRBX() { - return $this->img_rb_x; - } - - /** - * Return the right-bottom (or left-bottom for RTL) corner Y coordinate of last inserted image - * @return float - * @public - */ - public function getImageRBY() { - return $this->img_rb_y; - } - - /** - * Reset the xobject template used by Header() method. - * @public - */ - public function resetHeaderTemplate() { - $this->header_xobjid = false; - } - - /** - * Set a flag to automatically reset the xobject template used by Header() method at each page. - * @param boolean $val set to true to reset Header xobject template at each page, false otherwise. - * @public - */ - public function setHeaderTemplateAutoreset($val=true) { - $this->header_xobj_autoreset = $val ? true : false; - } - - /** - * This method is used to render the page header. - * It is automatically called by AddPage() and could be overwritten in your own inherited class. - * @public - */ - public function Header() { - if ($this->header_xobjid === false) { - // start a new XObject Template - $this->header_xobjid = $this->startTemplate($this->w, $this->tMargin); - $headerfont = $this->getHeaderFont(); - $headerdata = $this->getHeaderData(); - $this->y = $this->header_margin; - if ($this->rtl) { - $this->x = $this->w - $this->original_rMargin; - } else { - $this->x = $this->original_lMargin; - } - if (($headerdata['logo']) AND ($headerdata['logo'] != K_BLANK_IMAGE)) { - $imgtype = TCPDF_IMAGES::getImageFileType(K_PATH_IMAGES.$headerdata['logo']); - if (($imgtype == 'eps') OR ($imgtype == 'ai')) { - $this->ImageEps(K_PATH_IMAGES.$headerdata['logo'], '', '', $headerdata['logo_width']); - } elseif ($imgtype == 'svg') { - $this->ImageSVG(K_PATH_IMAGES.$headerdata['logo'], '', '', $headerdata['logo_width']); - } else { - $this->Image(K_PATH_IMAGES.$headerdata['logo'], '', '', $headerdata['logo_width']); - } - $imgy = $this->getImageRBY(); - } else { - $imgy = $this->y; - } - $cell_height = $this->getCellHeight($headerfont[2] / $this->k); - // set starting margin for text data cell - if ($this->getRTL()) { - $header_x = $this->original_rMargin + ($headerdata['logo_width'] * 1.1); - } else { - $header_x = $this->original_lMargin + ($headerdata['logo_width'] * 1.1); - } - $cw = $this->w - $this->original_lMargin - $this->original_rMargin - ($headerdata['logo_width'] * 1.1); - $this->setTextColorArray($this->header_text_color); - // header title - $this->setFont($headerfont[0], 'B', $headerfont[2] + 1); - $this->setX($header_x); - $this->Cell($cw, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0); - // header string - $this->setFont($headerfont[0], $headerfont[1], $headerfont[2]); - $this->setX($header_x); - $this->MultiCell($cw, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false, true, 0, 'T', false); - // print an ending header line - $this->setLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $headerdata['line_color'])); - $this->setY((2.835 / $this->k) + max($imgy, $this->y)); - if ($this->rtl) { - $this->setX($this->original_rMargin); - } else { - $this->setX($this->original_lMargin); - } - $this->Cell(($this->w - $this->original_lMargin - $this->original_rMargin), 0, '', 'T', 0, 'C'); - $this->endTemplate(); - } - // print header template - $x = 0; - $dx = 0; - if (!$this->header_xobj_autoreset AND $this->booklet AND (($this->page % 2) == 0)) { - // adjust margins for booklet mode - $dx = ($this->original_lMargin - $this->original_rMargin); - } - if ($this->rtl) { - $x = $this->w + $dx; - } else { - $x = 0 + $dx; - } - $this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false); - if ($this->header_xobj_autoreset) { - // reset header xobject template at each page - $this->header_xobjid = false; - } - } - - /** - * This method is used to render the page footer. - * It is automatically called by AddPage() and could be overwritten in your own inherited class. - * @public - */ - public function Footer() { - $cur_y = $this->y; - $this->setTextColorArray($this->footer_text_color); - //set style for cell border - $line_width = (0.85 / $this->k); - $this->setLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $this->footer_line_color)); - //print document barcode - $barcode = $this->getBarcode(); - if (!empty($barcode)) { - $this->Ln($line_width); - $barcode_width = round(($this->w - $this->original_lMargin - $this->original_rMargin) / 3); - $style = array( - 'position' => $this->rtl?'R':'L', - 'align' => $this->rtl?'R':'L', - 'stretch' => false, - 'fitwidth' => true, - 'cellfitalign' => '', - 'border' => false, - 'padding' => 0, - 'fgcolor' => array(0,0,0), - 'bgcolor' => false, - 'text' => false - ); - $this->write1DBarcode($barcode, 'C128', '', $cur_y + $line_width, '', (($this->footer_margin / 3) - $line_width), 0.3, $style, ''); - } - $w_page = isset($this->l['w_page']) ? $this->l['w_page'].' ' : ''; - if (empty($this->pagegroups)) { - $pagenumtxt = $w_page.$this->getAliasNumPage().' / '.$this->getAliasNbPages(); - } else { - $pagenumtxt = $w_page.$this->getPageNumGroupAlias().' / '.$this->getPageGroupAlias(); - } - $this->setY($cur_y); - //Print page number - if ($this->getRTL()) { - $this->setX($this->original_rMargin); - $this->Cell(0, 0, $pagenumtxt, 'T', 0, 'L'); - } else { - $this->setX($this->original_lMargin); - $this->Cell(0, 0, $this->getAliasRightShift().$pagenumtxt, 'T', 0, 'R'); - } - } - - /** - * This method is used to render the page header. - * @protected - * @since 4.0.012 (2008-07-24) - */ - protected function setHeader() { - if (!$this->print_header OR ($this->state != 2)) { - return; - } - $this->InHeader = true; - $this->setGraphicVars($this->default_graphic_vars); - $temp_thead = $this->thead; - $temp_theadMargins = $this->theadMargins; - $lasth = $this->lasth; - $newline = $this->newline; - $this->_outSaveGraphicsState(); - $this->rMargin = $this->original_rMargin; - $this->lMargin = $this->original_lMargin; - $this->setCellPadding(0); - //set current position - if ($this->rtl) { - $this->setXY($this->original_rMargin, $this->header_margin); - } else { - $this->setXY($this->original_lMargin, $this->header_margin); - } - $this->setFont($this->header_font[0], $this->header_font[1], $this->header_font[2]); - $this->Header(); - //restore position - if ($this->rtl) { - $this->setXY($this->original_rMargin, $this->tMargin); - } else { - $this->setXY($this->original_lMargin, $this->tMargin); - } - $this->_outRestoreGraphicsState(); - $this->lasth = $lasth; - $this->thead = $temp_thead; - $this->theadMargins = $temp_theadMargins; - $this->newline = $newline; - $this->InHeader = false; - } - - /** - * This method is used to render the page footer. - * @protected - * @since 4.0.012 (2008-07-24) - */ - protected function setFooter() { - if ($this->state != 2) { - return; - } - $this->InFooter = true; - // save current graphic settings - $gvars = $this->getGraphicVars(); - // mark this point - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - $this->_out("\n"); - if ($this->print_footer) { - $this->setGraphicVars($this->default_graphic_vars); - $this->current_column = 0; - $this->num_columns = 1; - $temp_thead = $this->thead; - $temp_theadMargins = $this->theadMargins; - $lasth = $this->lasth; - $this->_outSaveGraphicsState(); - $this->rMargin = $this->original_rMargin; - $this->lMargin = $this->original_lMargin; - $this->setCellPadding(0); - //set current position - $footer_y = $this->h - $this->footer_margin; - if ($this->rtl) { - $this->setXY($this->original_rMargin, $footer_y); - } else { - $this->setXY($this->original_lMargin, $footer_y); - } - $this->setFont($this->footer_font[0], $this->footer_font[1], $this->footer_font[2]); - $this->Footer(); - //restore position - if ($this->rtl) { - $this->setXY($this->original_rMargin, $this->tMargin); - } else { - $this->setXY($this->original_lMargin, $this->tMargin); - } - $this->_outRestoreGraphicsState(); - $this->lasth = $lasth; - $this->thead = $temp_thead; - $this->theadMargins = $temp_theadMargins; - } - // restore graphic settings - $this->setGraphicVars($gvars); - $this->current_column = $gvars['current_column']; - $this->num_columns = $gvars['num_columns']; - // calculate footer length - $this->footerlen[$this->page] = $this->pagelen[$this->page] - $this->footerpos[$this->page] + 1; - $this->InFooter = false; - } - - /** - * Check if we are on the page body (excluding page header and footer). - * @return bool true if we are not in page header nor in page footer, false otherwise. - * @protected - * @since 5.9.091 (2011-06-15) - */ - protected function inPageBody() { - return (($this->InHeader === false) AND ($this->InFooter === false)); - } - - /** - * This method is used to render the table header on new page (if any). - * @protected - * @since 4.5.030 (2009-03-25) - */ - protected function setTableHeader() { - if ($this->num_columns > 1) { - // multi column mode - return; - } - if (isset($this->theadMargins['top'])) { - // restore the original top-margin - $this->tMargin = $this->theadMargins['top']; - $this->pagedim[$this->page]['tm'] = $this->tMargin; - $this->y = $this->tMargin; - } - if (!TCPDF_STATIC::empty_string($this->thead) AND (!$this->inthead)) { - // set margins - $prev_lMargin = $this->lMargin; - $prev_rMargin = $this->rMargin; - $prev_cell_padding = $this->cell_padding; - $this->lMargin = $this->theadMargins['lmargin'] + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$this->theadMargins['page']]['olm']); - $this->rMargin = $this->theadMargins['rmargin'] + ($this->pagedim[$this->page]['orm'] - $this->pagedim[$this->theadMargins['page']]['orm']); - $this->cell_padding = $this->theadMargins['cell_padding']; - if ($this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - // account for special "cell" mode - if ($this->theadMargins['cell']) { - if ($this->rtl) { - $this->x -= $this->cell_padding['R']; - } else { - $this->x += $this->cell_padding['L']; - } - } - $gvars = $this->getGraphicVars(); - if (!empty($this->theadMargins['gvars'])) { - // set the correct graphic style - $this->setGraphicVars($this->theadMargins['gvars']); - $this->rMargin = $gvars['rMargin']; - $this->lMargin = $gvars['lMargin']; - } - // print table header - $this->writeHTML($this->thead, false, false, false, false, ''); - $this->setGraphicVars($gvars); - // set new top margin to skip the table headers - if (!isset($this->theadMargins['top'])) { - $this->theadMargins['top'] = $this->tMargin; - } - // store end of header position - if (!isset($this->columns[0]['th'])) { - $this->columns[0]['th'] = array(); - } - $this->columns[0]['th']['\''.$this->page.'\''] = $this->y; - $this->tMargin = $this->y; - $this->pagedim[$this->page]['tm'] = $this->tMargin; - $this->lasth = 0; - $this->lMargin = $prev_lMargin; - $this->rMargin = $prev_rMargin; - $this->cell_padding = $prev_cell_padding; - } - } - - /** - * Returns the current page number. - * @return int page number - * @public - * @since 1.0 - * @see getAliasNbPages() - */ - public function PageNo() { - return $this->page; - } - - /** - * Returns the array of spot colors. - * @return array Spot colors array. - * @public - * @since 6.0.038 (2013-09-30) - */ - public function getAllSpotColors() { - return $this->spot_colors; - } - - /** - * Defines a new spot color. - * It can be expressed in RGB components or gray scale. - * The method can be called before the first page is created and the value is retained from page to page. - * @param string $name Full name of the spot color. - * @param float $c Cyan color for CMYK. Value between 0 and 100. - * @param float $m Magenta color for CMYK. Value between 0 and 100. - * @param float $y Yellow color for CMYK. Value between 0 and 100. - * @param float $k Key (Black) color for CMYK. Value between 0 and 100. - * @public - * @since 4.0.024 (2008-09-12) - * @see SetDrawSpotColor(), SetFillSpotColor(), SetTextSpotColor() - */ - public function AddSpotColor($name, $c, $m, $y, $k) { - if (!isset($this->spot_colors[$name])) { - $i = (1 + count($this->spot_colors)); - $this->spot_colors[$name] = array('C' => $c, 'M' => $m, 'Y' => $y, 'K' => $k, 'name' => $name, 'i' => $i); - } - } - - /** - * Set the spot color for the specified type ('draw', 'fill', 'text'). - * @param string $type Type of object affected by this color: ('draw', 'fill', 'text'). - * @param string $name Name of the spot color. - * @param float $tint Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @return string PDF color command. - * @public - * @since 5.9.125 (2011-10-03) - */ - public function setSpotColor($type, $name, $tint=100) { - $spotcolor = TCPDF_COLORS::getSpotColor($name, $this->spot_colors); - if ($spotcolor === false) { - $this->Error('Undefined spot color: '.$name.', you must add it using the AddSpotColor() method.'); - } - $tint = (max(0, min(100, $tint)) / 100); - $pdfcolor = sprintf('/CS%d ', $this->spot_colors[$name]['i']); - switch ($type) { - case 'draw': { - $pdfcolor .= sprintf('CS %F SCN', $tint); - $this->DrawColor = $pdfcolor; - $this->strokecolor = $spotcolor; - break; - } - case 'fill': { - $pdfcolor .= sprintf('cs %F scn', $tint); - $this->FillColor = $pdfcolor; - $this->bgcolor = $spotcolor; - break; - } - case 'text': { - $pdfcolor .= sprintf('cs %F scn', $tint); - $this->TextColor = $pdfcolor; - $this->fgcolor = $spotcolor; - break; - } - } - $this->ColorFlag = ($this->FillColor != $this->TextColor); - if ($this->state == 2) { - $this->_out($pdfcolor); - } - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['spot_colors'][$name] = $this->spot_colors[$name]; - } - return $pdfcolor; - } - - /** - * Defines the spot color used for all drawing operations (lines, rectangles and cell borders). - * @param string $name Name of the spot color. - * @param float $tint Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @public - * @since 4.0.024 (2008-09-12) - * @see AddSpotColor(), SetFillSpotColor(), SetTextSpotColor() - */ - public function setDrawSpotColor($name, $tint=100) { - $this->setSpotColor('draw', $name, $tint); - } - - /** - * Defines the spot color used for all filling operations (filled rectangles and cell backgrounds). - * @param string $name Name of the spot color. - * @param float $tint Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @public - * @since 4.0.024 (2008-09-12) - * @see AddSpotColor(), SetDrawSpotColor(), SetTextSpotColor() - */ - public function setFillSpotColor($name, $tint=100) { - $this->setSpotColor('fill', $name, $tint); - } - - /** - * Defines the spot color used for text. - * @param string $name Name of the spot color. - * @param int $tint Intensity of the color (from 0 to 100 ; 100 = full intensity by default). - * @public - * @since 4.0.024 (2008-09-12) - * @see AddSpotColor(), SetDrawSpotColor(), SetFillSpotColor() - */ - public function setTextSpotColor($name, $tint=100) { - $this->setSpotColor('text', $name, $tint); - } - - /** - * Set the color array for the specified type ('draw', 'fill', 'text'). - * It can be expressed in RGB, CMYK or GRAY SCALE components. - * The method can be called before the first page is created and the value is retained from page to page. - * @param string $type Type of object affected by this color: ('draw', 'fill', 'text'). - * @param array $color Array of colors (1=gray, 3=RGB, 4=CMYK or 5=spotcolor=CMYK+name values). - * @param boolean $ret If true do not send the PDF command. - * @return string The PDF command or empty string. - * @public - * @since 3.1.000 (2008-06-11) - */ - public function setColorArray($type, $color, $ret=false) { - if (is_array($color)) { - $color = array_values($color); - // component: grey, RGB red or CMYK cyan - $c = isset($color[0]) ? $color[0] : -1; - // component: RGB green or CMYK magenta - $m = isset($color[1]) ? $color[1] : -1; - // component: RGB blue or CMYK yellow - $y = isset($color[2]) ? $color[2] : -1; - // component: CMYK black - $k = isset($color[3]) ? $color[3] : -1; - // color name - $name = isset($color[4]) ? $color[4] : ''; - if ($c >= 0) { - return $this->setColor($type, $c, $m, $y, $k, $ret, $name); - } - } - return ''; - } - - /** - * Defines the color used for all drawing operations (lines, rectangles and cell borders). - * It can be expressed in RGB, CMYK or GRAY SCALE components. - * The method can be called before the first page is created and the value is retained from page to page. - * @param array $color Array of colors (1, 3 or 4 values). - * @param boolean $ret If true do not send the PDF command. - * @return string the PDF command - * @public - * @since 3.1.000 (2008-06-11) - * @see SetDrawColor() - */ - public function setDrawColorArray($color, $ret=false) { - return $this->setColorArray('draw', $color, $ret); - } - - /** - * Defines the color used for all filling operations (filled rectangles and cell backgrounds). - * It can be expressed in RGB, CMYK or GRAY SCALE components. - * The method can be called before the first page is created and the value is retained from page to page. - * @param array $color Array of colors (1, 3 or 4 values). - * @param boolean $ret If true do not send the PDF command. - * @public - * @since 3.1.000 (2008-6-11) - * @see SetFillColor() - */ - public function setFillColorArray($color, $ret=false) { - return $this->setColorArray('fill', $color, $ret); - } - - /** - * Defines the color used for text. It can be expressed in RGB components or gray scale. - * The method can be called before the first page is created and the value is retained from page to page. - * @param array $color Array of colors (1, 3 or 4 values). - * @param boolean $ret If true do not send the PDF command. - * @public - * @since 3.1.000 (2008-6-11) - * @see SetFillColor() - */ - public function setTextColorArray($color, $ret=false) { - return $this->setColorArray('text', $color, $ret); - } - - /** - * Defines the color used by the specified type ('draw', 'fill', 'text'). - * @param string $type Type of object affected by this color: ('draw', 'fill', 'text'). - * @param float $col1 GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param float $col2 GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param float $col3 BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param float $col4 KEY (BLACK) color for CMYK (0-100). - * @param boolean $ret If true do not send the command. - * @param string $name spot color name (if any) - * @return string The PDF command or empty string. - * @public - * @since 5.9.125 (2011-10-03) - */ - public function setColor($type, $col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - // set default values - if (!is_numeric($col1)) { - $col1 = 0; - } - if (!is_numeric($col2)) { - $col2 = -1; - } - if (!is_numeric($col3)) { - $col3 = -1; - } - if (!is_numeric($col4)) { - $col4 = -1; - } - // set color by case - $suffix = ''; - if (($col2 == -1) AND ($col3 == -1) AND ($col4 == -1)) { - // Grey scale - $col1 = max(0, min(255, $col1)); - $intcolor = array('G' => $col1); - $pdfcolor = sprintf('%F ', ($col1 / 255)); - $suffix = 'g'; - } elseif ($col4 == -1) { - // RGB - $col1 = max(0, min(255, $col1)); - $col2 = max(0, min(255, $col2)); - $col3 = max(0, min(255, $col3)); - $intcolor = array('R' => $col1, 'G' => $col2, 'B' => $col3); - $pdfcolor = sprintf('%F %F %F ', ($col1 / 255), ($col2 / 255), ($col3 / 255)); - $suffix = 'rg'; - } else { - $col1 = max(0, min(100, $col1)); - $col2 = max(0, min(100, $col2)); - $col3 = max(0, min(100, $col3)); - $col4 = max(0, min(100, $col4)); - if (empty($name)) { - // CMYK - $intcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4); - $pdfcolor = sprintf('%F %F %F %F ', ($col1 / 100), ($col2 / 100), ($col3 / 100), ($col4 / 100)); - $suffix = 'k'; - } else { - // SPOT COLOR - $intcolor = array('C' => $col1, 'M' => $col2, 'Y' => $col3, 'K' => $col4, 'name' => $name); - $this->AddSpotColor($name, $col1, $col2, $col3, $col4); - $pdfcolor = $this->setSpotColor($type, $name, 100); - } - } - switch ($type) { - case 'draw': { - $pdfcolor .= strtoupper($suffix); - $this->DrawColor = $pdfcolor; - $this->strokecolor = $intcolor; - break; - } - case 'fill': { - $pdfcolor .= $suffix; - $this->FillColor = $pdfcolor; - $this->bgcolor = $intcolor; - break; - } - case 'text': { - $pdfcolor .= $suffix; - $this->TextColor = $pdfcolor; - $this->fgcolor = $intcolor; - break; - } - } - $this->ColorFlag = ($this->FillColor != $this->TextColor); - if (($type != 'text') AND ($this->state == 2) AND $type !== 0) { - if (!$ret) { - $this->_out($pdfcolor); - } - return $pdfcolor; - } - return ''; - } - - /** - * Defines the color used for all drawing operations (lines, rectangles and cell borders). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page. - * @param float $col1 GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param float $col2 GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param float $col3 BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param float $col4 KEY (BLACK) color for CMYK (0-100). - * @param boolean $ret If true do not send the command. - * @param string $name spot color name (if any) - * @return string the PDF command - * @public - * @since 1.3 - * @see SetDrawColorArray(), SetFillColor(), SetTextColor(), Line(), Rect(), Cell(), MultiCell() - */ - public function setDrawColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - return $this->setColor('draw', $col1, $col2, $col3, $col4, $ret, $name); - } - - /** - * Defines the color used for all filling operations (filled rectangles and cell backgrounds). It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page. - * @param float $col1 GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param float $col2 GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param float $col3 BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param float $col4 KEY (BLACK) color for CMYK (0-100). - * @param boolean $ret If true do not send the command. - * @param string $name Spot color name (if any). - * @return string The PDF command. - * @public - * @since 1.3 - * @see SetFillColorArray(), SetDrawColor(), SetTextColor(), Rect(), Cell(), MultiCell() - */ - public function setFillColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - return $this->setColor('fill', $col1, $col2, $col3, $col4, $ret, $name); - } - - /** - * Defines the color used for text. It can be expressed in RGB components or gray scale. The method can be called before the first page is created and the value is retained from page to page. - * @param float $col1 GRAY level for single color, or Red color for RGB (0-255), or CYAN color for CMYK (0-100). - * @param float $col2 GREEN color for RGB (0-255), or MAGENTA color for CMYK (0-100). - * @param float $col3 BLUE color for RGB (0-255), or YELLOW color for CMYK (0-100). - * @param float $col4 KEY (BLACK) color for CMYK (0-100). - * @param boolean $ret If true do not send the command. - * @param string $name Spot color name (if any). - * @return string Empty string. - * @public - * @since 1.3 - * @see SetTextColorArray(), SetDrawColor(), SetFillColor(), Text(), Cell(), MultiCell() - */ - public function setTextColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false, $name='') { - return $this->setColor('text', $col1, $col2, $col3, $col4, $ret, $name); - } - - /** - * Returns the length of a string in user unit. A font must be selected.
      - * @param string $s The string whose length is to be computed - * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. - * @param string $fontstyle Font style. Possible values are (case insensitive):
      • empty string: regular
      • B: bold
      • I: italic
      • U: underline
      • D: line-through
      • O: overline
      or any combination. The default value is regular. - * @param float $fontsize Font size in points. The default value is the current size. - * @param boolean $getarray if true returns an array of characters widths, if false returns the total length. - * @return float[]|float total string length or array of characted widths - * @author Nicola Asuni - * @public - * @since 1.2 - */ - public function GetStringWidth($s, $fontname='', $fontstyle='', $fontsize=0, $getarray=false) { - return $this->GetArrStringWidth(TCPDF_FONTS::utf8Bidi(TCPDF_FONTS::UTF8StringToArray($s, $this->isunicode, $this->CurrentFont), $s, $this->tmprtl, $this->isunicode, $this->CurrentFont), $fontname, $fontstyle, $fontsize, $getarray); - } - - /** - * Returns the string length of an array of chars in user unit or an array of characters widths. A font must be selected.
      - * @param array $sa The array of chars whose total length is to be computed - * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. - * @param string $fontstyle Font style. Possible values are (case insensitive):
      • empty string: regular
      • B: bold
      • I: italic
      • U: underline
      • D: line through
      • O: overline
      or any combination. The default value is regular. - * @param float $fontsize Font size in points. The default value is the current size. - * @param boolean $getarray if true returns an array of characters widths, if false returns the total length. - * @return float[]|float total string length or array of characted widths - * @author Nicola Asuni - * @public - * @since 2.4.000 (2008-03-06) - */ - public function GetArrStringWidth($sa, $fontname='', $fontstyle='', $fontsize=0, $getarray=false) { - // store current values - if (!TCPDF_STATIC::empty_string($fontname)) { - $prev_FontFamily = $this->FontFamily; - $prev_FontStyle = $this->FontStyle; - $prev_FontSizePt = $this->FontSizePt; - $this->setFont($fontname, $fontstyle, $fontsize, '', 'default', false); - } - // convert UTF-8 array to Latin1 if required - if ($this->isunicode AND (!$this->isUnicodeFont())) { - $sa = TCPDF_FONTS::UTF8ArrToLatin1Arr($sa); - } - $w = 0; // total width - $wa = array(); // array of characters widths - foreach ($sa as $ck => $char) { - // character width - $cw = $this->GetCharWidth($char, isset($sa[($ck + 1)])); - $wa[] = $cw; - $w += $cw; - } - // restore previous values - if (!TCPDF_STATIC::empty_string($fontname)) { - $this->setFont($prev_FontFamily, $prev_FontStyle, $prev_FontSizePt, '', 'default', false); - } - if ($getarray) { - return $wa; - } - return $w; - } - - /** - * Returns the length of the char in user unit for the current font considering current stretching and spacing (tracking). - * @param int $char The char code whose length is to be returned - * @param boolean $notlast If false ignore the font-spacing. - * @return float char width - * @author Nicola Asuni - * @public - * @since 2.4.000 (2008-03-06) - */ - public function GetCharWidth($char, $notlast=true) { - // get raw width - $chw = $this->getRawCharWidth($char); - if (($this->font_spacing < 0) OR (($this->font_spacing > 0) AND $notlast)) { - // increase/decrease font spacing - $chw += $this->font_spacing; - } - if ($this->font_stretching != 100) { - // fixed stretching mode - $chw *= ($this->font_stretching / 100); - } - return $chw; - } - - /** - * Returns the length of the char in user unit for the current font. - * @param int $char The char code whose length is to be returned - * @return float char width - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-28) - */ - public function getRawCharWidth($char) { - if ($char == 173) { - // SHY character will not be printed - return (0); - } - if (isset($this->CurrentFont['cw'][intval($char)])) { - $w = $this->CurrentFont['cw'][intval($char)]; - } elseif (isset($this->CurrentFont['dw'])) { - // default width - $w = $this->CurrentFont['dw']; - } elseif (isset($this->CurrentFont['cw'][32])) { - // default width - $w = $this->CurrentFont['cw'][32]; - } else { - $w = 600; - } - return $this->getAbsFontMeasure($w); - } - - /** - * Returns the numbero of characters in a string. - * @param string $s The input string. - * @return int number of characters - * @public - * @since 2.0.0001 (2008-01-07) - */ - public function GetNumChars($s) { - if ($this->isUnicodeFont()) { - return count(TCPDF_FONTS::UTF8StringToArray($s, $this->isunicode, $this->CurrentFont)); - } - return strlen($s); - } - - /** - * Fill the list of available fonts ($this->fontlist). - * @protected - * @since 4.0.013 (2008-07-28) - */ - protected function getFontsList() { - if (($fontsdir = opendir(TCPDF_FONTS::_getfontpath())) !== false) { - while (($file = readdir($fontsdir)) !== false) { - if (substr($file, -4) == '.php') { - array_push($this->fontlist, strtolower(basename($file, '.php'))); - } - } - closedir($fontsdir); - } - } - - /** - * Imports a TrueType, Type1, core, or CID0 font and makes it available. - * It is necessary to generate a font definition file first (read /fonts/utils/README.TXT). - * The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined. If it could not be found, the error "Could not include font definition file" is generated. - * @param string $family Font family. The name can be chosen arbitrarily. If it is a standard family name, it will override the corresponding font. - * @param string $style Font style. Possible values are (case insensitive):
      • empty string: regular (default)
      • B: bold
      • I: italic
      • BI or IB: bold italic
      - * @param string $fontfile The font definition file. By default, the name is built from the family and style, in lower case with no spaces. - * @return array|false array containing the font data, or false in case of error. - * @param mixed $subset if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font. - * @public - * @since 1.5 - * @see SetFont(), setFontSubsetting() - */ - public function AddFont($family, $style='', $fontfile='', $subset='default') { - if ($subset === 'default') { - $subset = $this->font_subsetting; - } - if ($this->pdfa_mode) { - $subset = false; - } - if (TCPDF_STATIC::empty_string($family)) { - if (!TCPDF_STATIC::empty_string($this->FontFamily)) { - $family = $this->FontFamily; - } else { - $this->Error('Empty font family'); - } - } - // move embedded styles on $style - if (substr($family, -1) == 'I') { - $style .= 'I'; - $family = substr($family, 0, -1); - } - if (substr($family, -1) == 'B') { - $style .= 'B'; - $family = substr($family, 0, -1); - } - // normalize family name - $family = strtolower($family); - if ((!$this->isunicode) AND ($family == 'arial')) { - $family = 'helvetica'; - } - if (($family == 'symbol') OR ($family == 'zapfdingbats')) { - $style = ''; - } - if ($this->pdfa_mode AND (isset($this->CoreFonts[$family]))) { - // all fonts must be embedded - $family = 'pdfa'.$family; - } - $tempstyle = strtoupper($style); - $style = ''; - // underline - if (strpos($tempstyle, 'U') !== false) { - $this->underline = true; - } else { - $this->underline = false; - } - // line-through (deleted) - if (strpos($tempstyle, 'D') !== false) { - $this->linethrough = true; - } else { - $this->linethrough = false; - } - // overline - if (strpos($tempstyle, 'O') !== false) { - $this->overline = true; - } else { - $this->overline = false; - } - // bold - if (strpos($tempstyle, 'B') !== false) { - $style .= 'B'; - } - // oblique - if (strpos($tempstyle, 'I') !== false) { - $style .= 'I'; - } - $bistyle = $style; - $fontkey = $family.$style; - $font_style = $style.($this->underline ? 'U' : '').($this->linethrough ? 'D' : '').($this->overline ? 'O' : ''); - $fontdata = array('fontkey' => $fontkey, 'family' => $family, 'style' => $font_style); - // check if the font has been already added - $fb = $this->getFontBuffer($fontkey); - if ($fb !== false) { - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['fonts'][$fontkey] = $fb['i']; - } - return $fontdata; - } - // get specified font directory (if any) - $fontdir = false; - if (!TCPDF_STATIC::empty_string($fontfile)) { - $fontdir = dirname($fontfile); - if (TCPDF_STATIC::empty_string($fontdir) OR ($fontdir == '.')) { - $fontdir = ''; - } else { - $fontdir .= '/'; - } - } - // true when the font style variation is missing - $missing_style = false; - // search and include font file - if (TCPDF_STATIC::empty_string($fontfile) OR (!@TCPDF_STATIC::file_exists($fontfile))) { - // build a standard filenames for specified font - $tmp_fontfile = str_replace(' ', '', $family).strtolower($style).'.php'; - $fontfile = TCPDF_FONTS::getFontFullPath($tmp_fontfile, $fontdir); - if (TCPDF_STATIC::empty_string($fontfile)) { - $missing_style = true; - // try to remove the style part - $tmp_fontfile = str_replace(' ', '', $family).'.php'; - $fontfile = TCPDF_FONTS::getFontFullPath($tmp_fontfile, $fontdir); - } - } - // include font file - if (!TCPDF_STATIC::empty_string($fontfile) AND (@TCPDF_STATIC::file_exists($fontfile))) { - include($fontfile); - } else { - $this->Error('Could not include font definition file: '.$family.''); - } - // check font parameters - if ((!isset($type)) OR (!isset($cw))) { - $this->Error('The font definition file has a bad format: '.$fontfile.''); - } - // SET default parameters - if (!isset($file) OR TCPDF_STATIC::empty_string($file)) { - $file = ''; - } - if (!isset($enc) OR TCPDF_STATIC::empty_string($enc)) { - $enc = ''; - } - if (!isset($cidinfo) OR TCPDF_STATIC::empty_string($cidinfo)) { - $cidinfo = array('Registry'=>'Adobe', 'Ordering'=>'Identity', 'Supplement'=>0); - $cidinfo['uni2cid'] = array(); - } - if (!isset($ctg) OR TCPDF_STATIC::empty_string($ctg)) { - $ctg = ''; - } - if (!isset($desc) OR TCPDF_STATIC::empty_string($desc)) { - $desc = array(); - } - if (!isset($up) OR TCPDF_STATIC::empty_string($up)) { - $up = -100; - } - if (!isset($ut) OR TCPDF_STATIC::empty_string($ut)) { - $ut = 50; - } - if (!isset($cw) OR TCPDF_STATIC::empty_string($cw)) { - $cw = array(); - } - if (!isset($dw) OR TCPDF_STATIC::empty_string($dw)) { - // set default width - if (isset($desc['MissingWidth']) AND ($desc['MissingWidth'] > 0)) { - $dw = $desc['MissingWidth']; - } elseif (isset($cw[32])) { - $dw = $cw[32]; - } else { - $dw = 600; - } - } - ++$this->numfonts; - if ($type == 'core') { - $name = $this->CoreFonts[$fontkey]; - $subset = false; - } elseif (($type == 'TrueType') OR ($type == 'Type1')) { - $subset = false; - } elseif ($type == 'TrueTypeUnicode') { - $enc = 'Identity-H'; - } elseif ($type == 'cidfont0') { - if ($this->pdfa_mode) { - $this->Error('All fonts must be embedded in PDF/A mode!'); - } - } else { - $this->Error('Unknow font type: '.$type.''); - } - // set name if unset - if (!isset($name) OR empty($name)) { - $name = $fontkey; - } - // create artificial font style variations if missing (only works with non-embedded fonts) - if (($type != 'core') AND $missing_style) { - // style variations - $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic'); - $name .= $styles[$bistyle]; - // artificial bold - if (strpos($bistyle, 'B') !== false) { - if (isset($desc['StemV'])) { - // from normal to bold - $desc['StemV'] = round($desc['StemV'] * 1.75); - } else { - // bold - $desc['StemV'] = 123; - } - } - // artificial italic - if (strpos($bistyle, 'I') !== false) { - if (isset($desc['ItalicAngle'])) { - $desc['ItalicAngle'] -= 11; - } else { - $desc['ItalicAngle'] = -11; - } - if (isset($desc['Flags'])) { - $desc['Flags'] |= 64; //bit 7 - } else { - $desc['Flags'] = 64; - } - } - } - // check if the array of characters bounding boxes is defined - if (!isset($cbbox)) { - $cbbox = array(); - } - // initialize subsetchars - $subsetchars = array_fill(0, 255, true); - $this->setFontBuffer($fontkey, array('fontkey' => $fontkey, 'i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'cbbox' => $cbbox, 'dw' => $dw, 'enc' => $enc, 'cidinfo' => $cidinfo, 'file' => $file, 'ctg' => $ctg, 'subset' => $subset, 'subsetchars' => $subsetchars)); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['fonts'][$fontkey] = $this->numfonts; - } - if (isset($diff) AND (!empty($diff))) { - //Search existing encodings - $d = 0; - $nb = count($this->diffs); - for ($i=1; $i <= $nb; ++$i) { - if ($this->diffs[$i] == $diff) { - $d = $i; - break; - } - } - if ($d == 0) { - $d = $nb + 1; - $this->diffs[$d] = $diff; - } - $this->setFontSubBuffer($fontkey, 'diff', $d); - } - if (!TCPDF_STATIC::empty_string($file)) { - if (!isset($this->FontFiles[$file])) { - if ((strcasecmp($type,'TrueType') == 0) OR (strcasecmp($type, 'TrueTypeUnicode') == 0)) { - $this->FontFiles[$file] = array('length1' => $originalsize, 'fontdir' => $fontdir, 'subset' => $subset, 'fontkeys' => array($fontkey)); - } elseif ($type != 'core') { - $this->FontFiles[$file] = array('length1' => $size1, 'length2' => $size2, 'fontdir' => $fontdir, 'subset' => $subset, 'fontkeys' => array($fontkey)); - } - } else { - // update fontkeys that are sharing this font file - $this->FontFiles[$file]['subset'] = ($this->FontFiles[$file]['subset'] AND $subset); - if (!in_array($fontkey, $this->FontFiles[$file]['fontkeys'])) { - $this->FontFiles[$file]['fontkeys'][] = $fontkey; - } - } - } - return $fontdata; - } - - /** - * Sets the font used to print character strings. - * The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe). - * The method can be called before the first page is created and the font is retained from page to page. - * If you just wish to change the current font size, it is simpler to call SetFontSize(). - * Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:
      • They are in the current directory (the one where the running script lies)
      • They are in one of the directories defined by the include_path parameter
      • They are in the directory defined by the K_PATH_FONTS constant

      - * @param string $family Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):
      • times (Times-Roman)
      • timesb (Times-Bold)
      • timesi (Times-Italic)
      • timesbi (Times-BoldItalic)
      • helvetica (Helvetica)
      • helveticab (Helvetica-Bold)
      • helveticai (Helvetica-Oblique)
      • helveticabi (Helvetica-BoldOblique)
      • courier (Courier)
      • courierb (Courier-Bold)
      • courieri (Courier-Oblique)
      • courierbi (Courier-BoldOblique)
      • symbol (Symbol)
      • zapfdingbats (ZapfDingbats)
      It is also possible to pass an empty string. In that case, the current family is retained. - * @param string $style Font style. Possible values are (case insensitive):
      • empty string: regular
      • B: bold
      • I: italic
      • U: underline
      • D: line through
      • O: overline
      or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined. - * @param float|null $size Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12 - * @param string $fontfile The font definition file. By default, the name is built from the family and style, in lower case with no spaces. - * @param mixed $subset if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font. - * @param boolean $out if true output the font size command, otherwise only set the font properties. - * @author Nicola Asuni - * @public - * @since 1.0 - * @see AddFont(), SetFontSize() - */ - public function setFont($family, $style='', $size=null, $fontfile='', $subset='default', $out=true) { - //Select a font; size given in points - if ($size === null) { - $size = $this->FontSizePt; - } - if ($size < 0) { - $size = 0; - } - // try to add font (if not already added) - $fontdata = $this->AddFont($family, $style, $fontfile, $subset); - $this->FontFamily = $fontdata['family']; - $this->FontStyle = $fontdata['style']; - if (isset($this->CurrentFont['fontkey']) AND isset($this->CurrentFont['subsetchars'])) { - // save subset chars of the previous font - $this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']); - } - $this->CurrentFont = $this->getFontBuffer($fontdata['fontkey']); - $this->setFontSize($size, $out); - } - - /** - * Defines the size of the current font. - * @param float $size The font size in points. - * @param boolean $out if true output the font size command, otherwise only set the font properties. - * @public - * @since 1.0 - * @see SetFont() - */ - public function setFontSize($size, $out=true) { - $size = (float)$size; - // font size in points - $this->FontSizePt = $size; - // font size in user units - $this->FontSize = $size / $this->k; - // calculate some font metrics - if (isset($this->CurrentFont['desc']['FontBBox'])) { - $bbox = explode(' ', substr($this->CurrentFont['desc']['FontBBox'], 1, -1)); - $font_height = ((intval($bbox[3]) - intval($bbox[1])) * $size / 1000); - } else { - $font_height = $size * 1.219; - } - if (isset($this->CurrentFont['desc']['Ascent']) AND ($this->CurrentFont['desc']['Ascent'] > 0)) { - $font_ascent = ($this->CurrentFont['desc']['Ascent'] * $size / 1000); - } - if (isset($this->CurrentFont['desc']['Descent']) AND ($this->CurrentFont['desc']['Descent'] <= 0)) { - $font_descent = (- $this->CurrentFont['desc']['Descent'] * $size / 1000); - } - if (!isset($font_ascent) AND !isset($font_descent)) { - // core font - $font_ascent = 0.76 * $font_height; - $font_descent = $font_height - $font_ascent; - } elseif (!isset($font_descent)) { - $font_descent = $font_height - $font_ascent; - } elseif (!isset($font_ascent)) { - $font_ascent = $font_height - $font_descent; - } - $this->FontAscent = ($font_ascent / $this->k); - $this->FontDescent = ($font_descent / $this->k); - if ($out AND ($this->page > 0) AND (isset($this->CurrentFont['i'])) AND ($this->state == 2)) { - $this->_out(sprintf('BT /F%d %F Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); - } - } - - /** - * Returns the bounding box of the current font in user units. - * @return array - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getFontBBox() { - $fbbox = array(); - if (isset($this->CurrentFont['desc']['FontBBox'])) { - $tmpbbox = explode(' ', substr($this->CurrentFont['desc']['FontBBox'], 1, -1)); - $fbbox = array_map(array($this,'getAbsFontMeasure'), $tmpbbox); - } else { - // Find max width - if (isset($this->CurrentFont['desc']['MaxWidth'])) { - $maxw = $this->getAbsFontMeasure(intval($this->CurrentFont['desc']['MaxWidth'])); - } else { - $maxw = 0; - if (isset($this->CurrentFont['desc']['MissingWidth'])) { - $maxw = max($maxw, $this->CurrentFont['desc']['MissingWidth']); - } - if (isset($this->CurrentFont['desc']['AvgWidth'])) { - $maxw = max($maxw, $this->CurrentFont['desc']['AvgWidth']); - } - if (isset($this->CurrentFont['dw'])) { - $maxw = max($maxw, $this->CurrentFont['dw']); - } - foreach ($this->CurrentFont['cw'] as $char => $w) { - $maxw = max($maxw, $w); - } - if ($maxw == 0) { - $maxw = 600; - } - $maxw = $this->getAbsFontMeasure($maxw); - } - $fbbox = array(0, (0 - $this->FontDescent), $maxw, $this->FontAscent); - } - return $fbbox; - } - - /** - * Convert a relative font measure into absolute value. - * @param int $s Font measure. - * @return float Absolute measure. - * @since 5.9.186 (2012-09-13) - */ - public function getAbsFontMeasure($s) { - return ($s * $this->FontSize / 1000); - } - - /** - * Returns the glyph bounding box of the specified character in the current font in user units. - * @param int $char Input character code. - * @return false|array array(xMin, yMin, xMax, yMax) or FALSE if not defined. - * @since 5.9.186 (2012-09-13) - */ - public function getCharBBox($char) { - $c = intval($char); - if (isset($this->CurrentFont['cw'][$c])) { - // glyph is defined ... use zero width & height for glyphs without outlines - $result = array(0,0,0,0); - if (isset($this->CurrentFont['cbbox'][$c])) { - $result = $this->CurrentFont['cbbox'][$c]; - } - return array_map(array($this,'getAbsFontMeasure'), $result); - } - return false; - } - - /** - * Return the font descent value - * @param string $font font name - * @param string $style font style - * @param float $size The size (in points) - * @return int font descent - * @public - * @author Nicola Asuni - * @since 4.9.003 (2010-03-30) - */ - public function getFontDescent($font, $style='', $size=0) { - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - if (isset($fontinfo['desc']['Descent']) AND ($fontinfo['desc']['Descent'] <= 0)) { - $descent = (- $fontinfo['desc']['Descent'] * $size / 1000); - } else { - $descent = (1.219 * 0.24 * $size); - } - return ($descent / $this->k); - } - - /** - * Return the font ascent value. - * @param string $font font name - * @param string $style font style - * @param float $size The size (in points) - * @return int font ascent - * @public - * @author Nicola Asuni - * @since 4.9.003 (2010-03-30) - */ - public function getFontAscent($font, $style='', $size=0) { - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - if (isset($fontinfo['desc']['Ascent']) AND ($fontinfo['desc']['Ascent'] > 0)) { - $ascent = ($fontinfo['desc']['Ascent'] * $size / 1000); - } else { - $ascent = 1.219 * 0.76 * $size; - } - return ($ascent / $this->k); - } - - /** - * Return true in the character is present in the specified font. - * @param mixed $char Character to check (integer value or string) - * @param string $font Font name (family name). - * @param string $style Font style. - * @return bool true if the char is defined, false otherwise. - * @public - * @since 5.9.153 (2012-03-28) - */ - public function isCharDefined($char, $font='', $style='') { - if (is_string($char)) { - // get character code - $char = TCPDF_FONTS::UTF8StringToArray($char, $this->isunicode, $this->CurrentFont); - $char = $char[0]; - } - if (TCPDF_STATIC::empty_string($font)) { - if (TCPDF_STATIC::empty_string($style)) { - return (isset($this->CurrentFont['cw'][intval($char)])); - } - $font = $this->FontFamily; - } - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - return (isset($fontinfo['cw'][intval($char)])); - } - - /** - * Replace missing font characters on selected font with specified substitutions. - * @param string $text Text to process. - * @param string $font Font name (family name). - * @param string $style Font style. - * @param array $subs Array of possible character substitutions. The key is the character to check (integer value) and the value is a single intege value or an array of possible substitutes. - * @return string Processed text. - * @public - * @since 5.9.153 (2012-03-28) - */ - public function replaceMissingChars($text, $font='', $style='', $subs=array()) { - if (empty($subs)) { - return $text; - } - if (TCPDF_STATIC::empty_string($font)) { - $font = $this->FontFamily; - } - $fontdata = $this->AddFont($font, $style); - $fontinfo = $this->getFontBuffer($fontdata['fontkey']); - $uniarr = TCPDF_FONTS::UTF8StringToArray($text, $this->isunicode, $this->CurrentFont); - foreach ($uniarr as $k => $chr) { - if (!isset($fontinfo['cw'][$chr])) { - // this character is missing on the selected font - if (isset($subs[$chr])) { - // we have available substitutions - if (is_array($subs[$chr])) { - foreach($subs[$chr] as $s) { - if (isset($fontinfo['cw'][$s])) { - $uniarr[$k] = $s; - break; - } - } - } elseif (isset($fontinfo['cw'][$subs[$chr]])) { - $uniarr[$k] = $subs[$chr]; - } - } - } - } - return TCPDF_FONTS::UniArrSubString(TCPDF_FONTS::UTF8ArrayToUniArray($uniarr, $this->isunicode)); - } - - /** - * Defines the default monospaced font. - * @param string $font Font name. - * @public - * @since 4.5.025 - */ - public function setDefaultMonospacedFont($font) { - $this->default_monospaced_font = $font; - } - - /** - * Creates a new internal link and returns its identifier. An internal link is a clickable area which directs to another place within the document.
      - * The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is defined with SetLink(). - * @public - * @since 1.5 - * @see Cell(), Write(), Image(), Link(), SetLink() - */ - public function AddLink() { - // create a new internal link - $n = count($this->links) + 1; - $this->links[$n] = array('p' => 0, 'y' => 0, 'f' => false); - return $n; - } - - /** - * Defines the page and position a link points to. - * @param int $link The link identifier returned by AddLink() - * @param float $y Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page) - * @param int|string $page Number of target page; -1 indicates the current page (default value). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @public - * @since 1.5 - * @see AddLink() - */ - public function setLink($link, $y=0, $page=-1) { - $fixed = false; - if (!empty($page) AND (substr($page, 0, 1) == '*')) { - $page = intval(substr($page, 1)); - // this page number will not be changed when moving/add/deleting pages - $fixed = true; - } - if ($page < 0) { - $page = $this->page; - } - if ($y == -1) { - $y = $this->y; - } - $this->links[$link] = array('p' => $page, 'y' => $y, 'f' => $fixed); - } - - /** - * Puts a link on a rectangular area of the page. - * Text or image links are generally put via Cell(), Write() or Image(), but this method can be useful for instance to define a clickable area inside an image. - * @param float $x Abscissa of the upper-left corner of the rectangle - * @param float $y Ordinate of the upper-left corner of the rectangle - * @param float $w Width of the rectangle - * @param float $h Height of the rectangle - * @param mixed $link URL or identifier returned by AddLink() - * @param int $spaces number of spaces on the text to link - * @public - * @since 1.5 - * @see AddLink(), Annotation(), Cell(), Write(), Image() - */ - public function Link($x, $y, $w, $h, $link, $spaces=0) { - $this->Annotation($x, $y, $w, $h, $link, array('Subtype'=>'Link'), $spaces); - } - - /** - * Puts a markup annotation on a rectangular area of the page. - * !!!!THE ANNOTATION SUPPORT IS NOT YET FULLY IMPLEMENTED !!!! - * @param float $x Abscissa of the upper-left corner of the rectangle - * @param float $y Ordinate of the upper-left corner of the rectangle - * @param float $w Width of the rectangle - * @param float $h Height of the rectangle - * @param string $text annotation text or alternate content - * @param array $opt array of options (see section 8.4 of PDF reference 1.7). - * @param int $spaces number of spaces on the text to link - * @public - * @since 4.0.018 (2008-08-06) - */ - public function Annotation($x, $y, $w, $h, $text, $opt=array('Subtype'=>'Text'), $spaces=0) { - if ($this->inxobj) { - // store parameters for later use on template - $this->xobjects[$this->xobjid]['annotations'][] = array('x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'text' => $text, 'opt' => $opt, 'spaces' => $spaces); - return; - } - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - // recalculate coordinates to account for graphic transformations - if (isset($this->transfmatrix) AND !empty($this->transfmatrix)) { - for ($i=$this->transfmatrix_key; $i > 0; --$i) { - $maxid = count($this->transfmatrix[$i]) - 1; - for ($j=$maxid; $j >= 0; --$j) { - $ctm = $this->transfmatrix[$i][$j]; - if (isset($ctm['a'])) { - $x = $x * $this->k; - $y = ($this->h - $y) * $this->k; - $w = $w * $this->k; - $h = $h * $this->k; - // top left - $xt = $x; - $yt = $y; - $x1 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y1 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // top right - $xt = $x + $w; - $yt = $y; - $x2 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y2 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // bottom left - $xt = $x; - $yt = $y - $h; - $x3 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y3 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // bottom right - $xt = $x + $w; - $yt = $y - $h; - $x4 = ($ctm['a'] * $xt) + ($ctm['c'] * $yt) + $ctm['e']; - $y4 = ($ctm['b'] * $xt) + ($ctm['d'] * $yt) + $ctm['f']; - // new coordinates (rectangle area) - $x = min($x1, $x2, $x3, $x4); - $y = max($y1, $y2, $y3, $y4); - $w = (max($x1, $x2, $x3, $x4) - $x) / $this->k; - $h = ($y - min($y1, $y2, $y3, $y4)) / $this->k; - $x = $x / $this->k; - $y = $this->h - ($y / $this->k); - } - } - } - } - if ($this->page <= 0) { - $page = 1; - } else { - $page = $this->page; - } - if (!isset($this->PageAnnots[$page])) { - $this->PageAnnots[$page] = array(); - } - $this->PageAnnots[$page][] = array('n' => ++$this->n, 'x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'txt' => $text, 'opt' => $opt, 'numspaces' => $spaces); - if (!$this->pdfa_mode || ($this->pdfa_mode && $this->pdfa_version == 3)) { - if ((($opt['Subtype'] == 'FileAttachment') OR ($opt['Subtype'] == 'Sound')) AND (!TCPDF_STATIC::empty_string($opt['FS'])) - AND (@TCPDF_STATIC::file_exists($opt['FS']) OR TCPDF_STATIC::isValidURL($opt['FS'])) - AND (!isset($this->embeddedfiles[basename($opt['FS'])]))) { - $this->embeddedfiles[basename($opt['FS'])] = array('f' => ++$this->n, 'n' => ++$this->n, 'file' => $opt['FS']); - } - } - // Add widgets annotation's icons - if (isset($opt['mk']['i']) AND @TCPDF_STATIC::file_exists($opt['mk']['i'])) { - $this->Image($opt['mk']['i'], '', '', 10, 10, '', '', '', false, 300, '', false, false, 0, false, true); - } - if (isset($opt['mk']['ri']) AND @TCPDF_STATIC::file_exists($opt['mk']['ri'])) { - $this->Image($opt['mk']['ri'], '', '', 0, 0, '', '', '', false, 300, '', false, false, 0, false, true); - } - if (isset($opt['mk']['ix']) AND @TCPDF_STATIC::file_exists($opt['mk']['ix'])) { - $this->Image($opt['mk']['ix'], '', '', 0, 0, '', '', '', false, 300, '', false, false, 0, false, true); - } - } - - /** - * Embedd the attached files. - * @since 4.4.000 (2008-12-07) - * @protected - * @see Annotation() - */ - protected function _putEmbeddedFiles() { - if ($this->pdfa_mode && $this->pdfa_version != 3) { - // embedded files are not allowed in PDF/A mode version 1 and 2 - return; - } - reset($this->embeddedfiles); - foreach ($this->embeddedfiles as $filename => $filedata) { - $data = $this->getCachedFileContents($filedata['file']); - if ($data !== FALSE) { - $rawsize = strlen($data); - if ($rawsize > 0) { - // update name tree - $this->efnames[$filename] = $filedata['f'].' 0 R'; - // embedded file specification object - $out = $this->_getobj($filedata['f'])."\n"; - $out .= '<_datastring($filename, $filedata['f']); - $out .= ' /UF '.$this->_datastring($filename, $filedata['f']); - $out .= ' /AFRelationship /Source'; - $out .= ' /EF <> >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // embedded file object - $filter = ''; - if ($this->compress) { - $data = gzcompress($data); - $filter = ' /Filter /FlateDecode'; - } - - if ($this->pdfa_version == 3) { - $filter = ' /Subtype /text#2Fxml'; - } - - $stream = $this->_getrawstream($data, $filedata['n']); - $out = $this->_getobj($filedata['n'])."\n"; - $out .= '<< /Type /EmbeddedFile'.$filter.' /Length '.strlen($stream).' /Params <> >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - } - } - - /** - * Prints a text cell at the specified position. - * This method allows to place a string precisely on the page. - * @param float $x Abscissa of the cell origin - * @param float $y Ordinate of the cell origin - * @param string $txt String to print - * @param int $fstroke outline size in user units (0 = disable) - * @param boolean $fclip if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation). - * @param boolean $ffill if true fills the text - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param int $ln Indicates where the current position should go after the call. Possible values are:
      • 0: to the right (or left for RTL languages)
      • 1: to the beginning of the next line
      • 2: below
      Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param string $align Allows to center or align the text. Possible values are:
      • L or empty string: left align (default value)
      • C: center
      • R: right align
      • J: justify
      - * @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false). - * @param mixed $link URL or identifier returned by AddLink(). - * @param int $stretch font stretch mode:
      • 0 = disabled
      • 1 = horizontal scaling only if text is larger than cell width
      • 2 = forced horizontal scaling to fit cell width
      • 3 = character spacing only if text is larger than cell width
      • 4 = forced character spacing to fit cell width
      General font stretching and scaling values will be preserved when possible. - * @param boolean $ignore_min_height if true ignore automatic minimum height value. - * @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:
      • T : cell top
      • A : font top
      • L : font baseline
      • D : font bottom
      • B : cell bottom
      - * @param string $valign text vertical alignment inside the cell. Possible values are:
      • T : top
      • C : center
      • B : bottom
      - * @param boolean $rtloff if true uses the page top-left corner as origin of axis for $x and $y initial position. - * @public - * @since 1.0 - * @see Cell(), Write(), MultiCell(), WriteHTML(), WriteHTMLCell() - */ - public function Text($x, $y, $txt, $fstroke=0, $fclip=false, $ffill=true, $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M', $rtloff=false) { - $textrendermode = $this->textrendermode; - $textstrokewidth = $this->textstrokewidth; - $this->setTextRenderingMode($fstroke, $ffill, $fclip); - $this->setXY($x, $y, $rtloff); - $this->Cell(0, 0, $txt, $border, $ln, $align, $fill, $link, $stretch, $ignore_min_height, $calign, $valign); - // restore previous rendering mode - $this->textrendermode = $textrendermode; - $this->textstrokewidth = $textstrokewidth; - } - - /** - * Whenever a page break condition is met, the method is called, and the break is issued or not depending on the returned value. - * The default implementation returns a value according to the mode selected by SetAutoPageBreak().
      - * This method is called automatically and should not be called directly by the application. - * @return bool - * @public - * @since 1.4 - * @see SetAutoPageBreak() - */ - public function AcceptPageBreak() { - if ($this->num_columns > 1) { - // multi column mode - if ($this->current_column < ($this->num_columns - 1)) { - // go to next column - $this->selectColumn($this->current_column + 1); - } elseif ($this->AutoPageBreak) { - // add a new page - $this->AddPage(); - // set first column - $this->selectColumn(0); - } - // avoid page breaking from checkPageBreak() - return false; - } - return $this->AutoPageBreak; - } - - /** - * Add page if needed. - * @param float $h Cell height. Default value: 0. - * @param float|null $y starting y position, leave empty for current position. - * @param bool $addpage if true add a page, otherwise only return the true/false state - * @return bool true in case of page break, false otherwise. - * @since 3.2.000 (2008-07-01) - * @protected - */ - protected function checkPageBreak($h=0, $y=null, $addpage=true) { - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - $current_page = $this->page; - if ((($y + $h) > $this->PageBreakTrigger) AND ($this->inPageBody()) AND ($this->AcceptPageBreak())) { - if ($addpage) { - //Automatic page break - $x = $this->x; - $this->AddPage($this->CurOrientation); - $this->y = $this->tMargin; - $oldpage = $this->page - 1; - if ($this->rtl) { - if ($this->pagedim[$this->page]['orm'] != $this->pagedim[$oldpage]['orm']) { - $this->x = $x - ($this->pagedim[$this->page]['orm'] - $this->pagedim[$oldpage]['orm']); - } else { - $this->x = $x; - } - } else { - if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) { - $this->x = $x + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$oldpage]['olm']); - } else { - $this->x = $x; - } - } - } - return true; - } - if ($current_page != $this->page) { - // account for columns mode - return true; - } - return false; - } - - /** - * Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
      - * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. - * @param float $w Cell width. If 0, the cell extends up to the right margin. - * @param float $h Cell height. Default value: 0. - * @param string $txt String to print. Default value: empty string. - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param int $ln Indicates where the current position should go after the call. Possible values are:
      • 0: to the right (or left for RTL languages)
      • 1: to the beginning of the next line
      • 2: below
      Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param string $align Allows to center or align the text. Possible values are:
      • L or empty string: left align (default value)
      • C: center
      • R: right align
      • J: justify
      - * @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false). - * @param mixed $link URL or identifier returned by AddLink(). - * @param int $stretch font stretch mode:
      • 0 = disabled
      • 1 = horizontal scaling only if text is larger than cell width
      • 2 = forced horizontal scaling to fit cell width
      • 3 = character spacing only if text is larger than cell width
      • 4 = forced character spacing to fit cell width
      General font stretching and scaling values will be preserved when possible. - * @param boolean $ignore_min_height if true ignore automatic minimum height value. - * @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:
      • T : cell top
      • C : center
      • B : cell bottom
      • A : font top
      • L : font baseline
      • D : font bottom
      - * @param string $valign text vertical alignment inside the cell. Possible values are:
      • T : top
      • C : center
      • B : bottom
      - * @public - * @since 1.0 - * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), AddLink(), Ln(), MultiCell(), Write(), SetAutoPageBreak() - */ - public function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') { - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - $this->adjustCellPadding($border); - if (!$ignore_min_height) { - $min_cell_height = $this->getCellHeight($this->FontSize); - if ($h < $min_cell_height) { - $h = $min_cell_height; - } - } - $this->checkPageBreak($h + $this->cell_margin['T'] + $this->cell_margin['B']); - // apply text shadow if enabled - if ($this->txtshadow['enabled']) { - // save data - $x = $this->x; - $y = $this->y; - $bc = $this->bgcolor; - $fc = $this->fgcolor; - $sc = $this->strokecolor; - $alpha = $this->alpha; - // print shadow - $this->x += $this->txtshadow['depth_w']; - $this->y += $this->txtshadow['depth_h']; - $this->setFillColorArray($this->txtshadow['color']); - $this->setTextColorArray($this->txtshadow['color']); - $this->setDrawColorArray($this->txtshadow['color']); - if ($this->txtshadow['opacity'] != $alpha['CA']) { - $this->setAlpha($this->txtshadow['opacity'], $this->txtshadow['blend_mode']); - } - if ($this->state == 2) { - $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, true, $calign, $valign)); - } - //restore data - $this->x = $x; - $this->y = $y; - $this->setFillColorArray($bc); - $this->setTextColorArray($fc); - $this->setDrawColorArray($sc); - if ($this->txtshadow['opacity'] != $alpha['CA']) { - $this->setAlpha($alpha['CA'], $alpha['BM'], $alpha['ca'], $alpha['AIS']); - } - } - if ($this->state == 2) { - $this->_out($this->getCellCode($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, true, $calign, $valign)); - } - $this->cell_padding = $prev_cell_padding; - $this->cell_margin = $prev_cell_margin; - } - - /** - * Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
      - * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. - * @param float $w Cell width. If 0, the cell extends up to the right margin. - * @param float $h Cell height. Default value: 0. - * @param string $txt String to print. Default value: empty string. - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param int $ln Indicates where the current position should go after the call. Possible values are:
      • 0: to the right (or left for RTL languages)
      • 1: to the beginning of the next line
      • 2: below
      Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param string $align Allows to center or align the text. Possible values are:
      • L or empty string: left align (default value)
      • C: center
      • R: right align
      • J: justify
      - * @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false). - * @param mixed $link URL or identifier returned by AddLink(). - * @param int $stretch font stretch mode:
      • 0 = disabled
      • 1 = horizontal scaling only if text is larger than cell width
      • 2 = forced horizontal scaling to fit cell width
      • 3 = character spacing only if text is larger than cell width
      • 4 = forced character spacing to fit cell width
      General font stretching and scaling values will be preserved when possible. - * @param boolean $ignore_min_height if true ignore automatic minimum height value. - * @param string $calign cell vertical alignment relative to the specified Y value. Possible values are:
      • T : cell top
      • C : center
      • B : cell bottom
      • A : font top
      • L : font baseline
      • D : font bottom
      - * @param string $valign text vertical alignment inside the cell. Possible values are:
      • T : top
      • M : middle
      • B : bottom
      - * @return string containing cell code - * @protected - * @since 1.0 - * @see Cell() - */ - protected function getCellCode($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') { - // replace 'NO-BREAK SPACE' (U+00A0) character with a simple space - $txt = str_replace(TCPDF_FONTS::unichr(160, $this->isunicode), ' ', $txt); - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - $txt = TCPDF_STATIC::removeSHY($txt, $this->isunicode); - $rs = ''; //string to be returned - $this->adjustCellPadding($border); - if (!$ignore_min_height) { - $min_cell_height = $this->getCellHeight($this->FontSize); - if ($h < $min_cell_height) { - $h = $min_cell_height; - } - } - $k = $this->k; - // check page for no-write regions and adapt page margins if necessary - list($this->x, $this->y) = $this->checkPageRegions($h, $this->x, $this->y); - if ($this->rtl) { - $x = $this->x - $this->cell_margin['R']; - } else { - $x = $this->x + $this->cell_margin['L']; - } - $y = $this->y + $this->cell_margin['T']; - $prev_font_stretching = $this->font_stretching; - $prev_font_spacing = $this->font_spacing; - // cell vertical alignment - switch ($calign) { - case 'A': { - // font top - switch ($valign) { - case 'T': { - // top - $y -= $this->cell_padding['T']; - break; - } - case 'B': { - // bottom - $y -= ($h - $this->cell_padding['B'] - $this->FontAscent - $this->FontDescent); - break; - } - default: - case 'C': - case 'M': { - // center - $y -= (($h - $this->FontAscent - $this->FontDescent) / 2); - break; - } - } - break; - } - case 'L': { - // font baseline - switch ($valign) { - case 'T': { - // top - $y -= ($this->cell_padding['T'] + $this->FontAscent); - break; - } - case 'B': { - // bottom - $y -= ($h - $this->cell_padding['B'] - $this->FontDescent); - break; - } - default: - case 'C': - case 'M': { - // center - $y -= (($h + $this->FontAscent - $this->FontDescent) / 2); - break; - } - } - break; - } - case 'D': { - // font bottom - switch ($valign) { - case 'T': { - // top - $y -= ($this->cell_padding['T'] + $this->FontAscent + $this->FontDescent); - break; - } - case 'B': { - // bottom - $y -= ($h - $this->cell_padding['B']); - break; - } - default: - case 'C': - case 'M': { - // center - $y -= (($h + $this->FontAscent + $this->FontDescent) / 2); - break; - } - } - break; - } - case 'B': { - // cell bottom - $y -= $h; - break; - } - case 'C': - case 'M': { - // cell center - $y -= ($h / 2); - break; - } - default: - case 'T': { - // cell top - break; - } - } - // text vertical alignment - switch ($valign) { - case 'T': { - // top - $yt = $y + $this->cell_padding['T']; - break; - } - case 'B': { - // bottom - $yt = $y + $h - $this->cell_padding['B'] - $this->FontAscent - $this->FontDescent; - break; - } - default: - case 'C': - case 'M': { - // center - $yt = $y + (($h - $this->FontAscent - $this->FontDescent) / 2); - break; - } - } - $basefonty = $yt + $this->FontAscent; - if (TCPDF_STATIC::empty_string($w) OR ($w <= 0)) { - if ($this->rtl) { - $w = $x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $x; - } - } - $s = ''; - // fill and borders - if (is_string($border) AND (strlen($border) == 4)) { - // full border - $border = 1; - } - if ($fill OR ($border == 1)) { - if ($fill) { - $op = ($border == 1) ? 'B' : 'f'; - } else { - $op = 'S'; - } - if ($this->rtl) { - $xk = (($x - $w) * $k); - } else { - $xk = ($x * $k); - } - $s .= sprintf('%F %F %F %F re %s ', $xk, (($this->h - $y) * $k), ($w * $k), (-$h * $k), $op); - } - // draw borders - $s .= $this->getCellBorder($x, $y, $w, $h, $border); - if ($txt != '') { - $txt2 = $txt; - if ($this->isunicode) { - if (($this->CurrentFont['type'] == 'core') OR ($this->CurrentFont['type'] == 'TrueType') OR ($this->CurrentFont['type'] == 'Type1')) { - $txt2 = TCPDF_FONTS::UTF8ToLatin1($txt2, $this->isunicode, $this->CurrentFont); - } else { - $unicode = TCPDF_FONTS::UTF8StringToArray($txt, $this->isunicode, $this->CurrentFont); // array of UTF-8 unicode values - $unicode = TCPDF_FONTS::utf8Bidi($unicode, '', $this->tmprtl, $this->isunicode, $this->CurrentFont); - // replace thai chars (if any) - if (defined('K_THAI_TOPCHARS') AND (K_THAI_TOPCHARS == true)) { - // number of chars - $numchars = count($unicode); - // po pla, for far, for fan - $longtail = array(0x0e1b, 0x0e1d, 0x0e1f); - // do chada, to patak - $lowtail = array(0x0e0e, 0x0e0f); - // mai hun arkad, sara i, sara ii, sara ue, sara uee - $upvowel = array(0x0e31, 0x0e34, 0x0e35, 0x0e36, 0x0e37); - // mai ek, mai tho, mai tri, mai chattawa, karan - $tonemark = array(0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c); - // sara u, sara uu, pinthu - $lowvowel = array(0x0e38, 0x0e39, 0x0e3a); - $output = array(); - for ($i = 0; $i < $numchars; $i++) { - if (($unicode[$i] >= 0x0e00) && ($unicode[$i] <= 0x0e5b)) { - $ch0 = $unicode[$i]; - $ch1 = ($i > 0) ? $unicode[($i - 1)] : 0; - $ch2 = ($i > 1) ? $unicode[($i - 2)] : 0; - $chn = ($i < ($numchars - 1)) ? $unicode[($i + 1)] : 0; - if (in_array($ch0, $tonemark)) { - if ($chn == 0x0e33) { - // sara um - if (in_array($ch1, $longtail)) { - // tonemark at upper left - $output[] = $this->replaceChar($ch0, (0xf713 + $ch0 - 0x0e48)); - } else { - // tonemark at upper right (normal position) - $output[] = $ch0; - } - } elseif (in_array($ch1, $longtail) OR (in_array($ch2, $longtail) AND in_array($ch1, $lowvowel))) { - // tonemark at lower left - $output[] = $this->replaceChar($ch0, (0xf705 + $ch0 - 0x0e48)); - } elseif (in_array($ch1, $upvowel)) { - if (in_array($ch2, $longtail)) { - // tonemark at upper left - $output[] = $this->replaceChar($ch0, (0xf713 + $ch0 - 0x0e48)); - } else { - // tonemark at upper right (normal position) - $output[] = $ch0; - } - } else { - // tonemark at lower right - $output[] = $this->replaceChar($ch0, (0xf70a + $ch0 - 0x0e48)); - } - } elseif (($ch0 == 0x0e33) AND (in_array($ch1, $longtail) OR (in_array($ch2, $longtail) AND in_array($ch1, $tonemark)))) { - // add lower left nikhahit and sara aa - if ($this->isCharDefined(0xf711) AND $this->isCharDefined(0x0e32)) { - $output[] = 0xf711; - $this->CurrentFont['subsetchars'][0xf711] = true; - $output[] = 0x0e32; - $this->CurrentFont['subsetchars'][0x0e32] = true; - } else { - $output[] = $ch0; - } - } elseif (in_array($ch1, $longtail)) { - if ($ch0 == 0x0e31) { - // lower left mai hun arkad - $output[] = $this->replaceChar($ch0, 0xf710); - } elseif (in_array($ch0, $upvowel)) { - // lower left - $output[] = $this->replaceChar($ch0, (0xf701 + $ch0 - 0x0e34)); - } elseif ($ch0 == 0x0e47) { - // lower left mai tai koo - $output[] = $this->replaceChar($ch0, 0xf712); - } else { - // normal character - $output[] = $ch0; - } - } elseif (in_array($ch1, $lowtail) AND in_array($ch0, $lowvowel)) { - // lower vowel - $output[] = $this->replaceChar($ch0, (0xf718 + $ch0 - 0x0e38)); - } elseif (($ch0 == 0x0e0d) AND in_array($chn, $lowvowel)) { - // yo ying without lower part - $output[] = $this->replaceChar($ch0, 0xf70f); - } elseif (($ch0 == 0x0e10) AND in_array($chn, $lowvowel)) { - // tho santan without lower part - $output[] = $this->replaceChar($ch0, 0xf700); - } else { - $output[] = $ch0; - } - } else { - // non-thai character - $output[] = $unicode[$i]; - } - } - $unicode = $output; - // update font subsetchars - $this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']); - } // end of K_THAI_TOPCHARS - $txt2 = TCPDF_FONTS::arrUTF8ToUTF16BE($unicode, false); - } - } - $txt2 = TCPDF_STATIC::_escape($txt2); - // get current text width (considering general font stretching and spacing) - $txwidth = $this->GetStringWidth($txt); - $width = $txwidth; - // check for stretch mode - if ($stretch > 0) { - // calculate ratio between cell width and text width - if ($width <= 0) { - $ratio = 1; - } else { - $ratio = (($w - $this->cell_padding['L'] - $this->cell_padding['R']) / $width); - } - // check if stretching is required - if (($ratio < 1) OR (($ratio > 1) AND (($stretch % 2) == 0))) { - // the text will be stretched to fit cell width - if ($stretch > 2) { - // set new character spacing - $this->font_spacing += ($w - $this->cell_padding['L'] - $this->cell_padding['R'] - $width) / (max(($this->GetNumChars($txt) - 1), 1) * ($this->font_stretching / 100)); - } else { - // set new horizontal stretching - $this->font_stretching *= $ratio; - } - // recalculate text width (the text fills the entire cell) - $width = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - // reset alignment - $align = ''; - } - } - if ($this->font_stretching != 100) { - // apply font stretching - $rs .= sprintf('BT %F Tz ET ', $this->font_stretching); - } - if ($this->font_spacing != 0) { - // increase/decrease font spacing - $rs .= sprintf('BT %F Tc ET ', ($this->font_spacing * $this->k)); - } - if ($this->ColorFlag AND ($this->textrendermode < 4)) { - $s .= 'q '.$this->TextColor.' '; - } - // rendering mode - $s .= sprintf('BT %d Tr %F w ET ', $this->textrendermode, ($this->textstrokewidth * $this->k)); - // count number of spaces - $ns = substr_count($txt, chr(32)); - // Justification - $spacewidth = 0; - if (($align == 'J') AND ($ns > 0)) { - if ($this->isUnicodeFont()) { - // get string width without spaces - $width = $this->GetStringWidth(str_replace(' ', '', $txt)); - // calculate average space width - $spacewidth = -1000 * ($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1) / ($this->FontSize?$this->FontSize:1); - if ($this->font_stretching != 100) { - // word spacing is affected by stretching - $spacewidth /= ($this->font_stretching / 100); - } - // set word position to be used with TJ operator - $txt2 = str_replace(chr(0).chr(32), ') '.sprintf('%F', $spacewidth).' (', $txt2); - $unicode_justification = true; - } else { - // get string width - $width = $txwidth; - // new space width - $spacewidth = (($w - $width - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1)) * $this->k; - if ($this->font_stretching != 100) { - // word spacing (Tw) is affected by stretching - $spacewidth /= ($this->font_stretching / 100); - } - // set word spacing - $rs .= sprintf('BT %F Tw ET ', $spacewidth); - } - $width = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - } - // replace carriage return characters - $txt2 = str_replace("\r", ' ', $txt2); - switch ($align) { - case 'C': { - $dx = ($w - $width) / 2; - break; - } - case 'R': { - if ($this->rtl) { - $dx = $this->cell_padding['R']; - } else { - $dx = $w - $width - $this->cell_padding['R']; - } - break; - } - case 'L': { - if ($this->rtl) { - $dx = $w - $width - $this->cell_padding['L']; - } else { - $dx = $this->cell_padding['L']; - } - break; - } - case 'J': - default: { - if ($this->rtl) { - $dx = $this->cell_padding['R']; - } else { - $dx = $this->cell_padding['L']; - } - break; - } - } - if ($this->rtl) { - $xdx = $x - $dx - $width; - } else { - $xdx = $x + $dx; - } - $xdk = $xdx * $k; - // print text - $s .= sprintf('BT %F %F Td [(%s)] TJ ET', $xdk, (($this->h - $basefonty) * $k), $txt2); - if (isset($uniblock)) { - // print overlapping characters as separate string - $xshift = 0; // horizontal shift - $ty = (($this->h - $basefonty + (0.2 * $this->FontSize)) * $k); - $spw = (($w - $txwidth - $this->cell_padding['L'] - $this->cell_padding['R']) / ($ns?$ns:1)); - foreach ($uniblock as $uk => $uniarr) { - if (($uk % 2) == 0) { - // x space to skip - if ($spacewidth != 0) { - // justification shift - $xshift += (count(array_keys($uniarr, 32)) * $spw); - } - $xshift += $this->GetArrStringWidth($uniarr); // + shift justification - } else { - // character to print - $topchr = TCPDF_FONTS::arrUTF8ToUTF16BE($uniarr, false); - $topchr = TCPDF_STATIC::_escape($topchr); - $s .= sprintf(' BT %F %F Td [(%s)] TJ ET', ($xdk + ($xshift * $k)), $ty, $topchr); - } - } - } - if ($this->underline) { - $s .= ' '.$this->_dounderlinew($xdx, $basefonty, $width); - } - if ($this->linethrough) { - $s .= ' '.$this->_dolinethroughw($xdx, $basefonty, $width); - } - if ($this->overline) { - $s .= ' '.$this->_dooverlinew($xdx, $basefonty, $width); - } - if ($this->ColorFlag AND ($this->textrendermode < 4)) { - $s .= ' Q'; - } - if ($link) { - $this->Link($xdx, $yt, $width, ($this->FontAscent + $this->FontDescent), $link, $ns); - } - } - // output cell - if ($s) { - // output cell - $rs .= $s; - if ($this->font_spacing != 0) { - // reset font spacing mode - $rs .= ' BT 0 Tc ET'; - } - if ($this->font_stretching != 100) { - // reset font stretching mode - $rs .= ' BT 100 Tz ET'; - } - } - // reset word spacing - if (!$this->isUnicodeFont() AND ($align == 'J')) { - $rs .= ' BT 0 Tw ET'; - } - // reset stretching and spacing - $this->font_stretching = $prev_font_stretching; - $this->font_spacing = $prev_font_spacing; - $this->lasth = $h; - if ($ln > 0) { - //Go to the beginning of the next line - $this->y = $y + $h + $this->cell_margin['B']; - if ($ln == 1) { - if ($this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - } - } else { - // go left or right by case - if ($this->rtl) { - $this->x = $x - $w - $this->cell_margin['L']; - } else { - $this->x = $x + $w + $this->cell_margin['R']; - } - } - $gstyles = ''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor."\n"; - $rs = $gstyles.$rs; - $this->cell_padding = $prev_cell_padding; - $this->cell_margin = $prev_cell_margin; - return $rs; - } - - /** - * Replace a char if is defined on the current font. - * @param int $oldchar Integer code (unicode) of the character to replace. - * @param int $newchar Integer code (unicode) of the new character. - * @return int the replaced char or the old char in case the new char i not defined - * @protected - * @since 5.9.167 (2012-06-22) - */ - protected function replaceChar($oldchar, $newchar) { - if ($this->isCharDefined($newchar)) { - // add the new char on the subset list - $this->CurrentFont['subsetchars'][$newchar] = true; - // return the new character - return $newchar; - } - // return the old char - return $oldchar; - } - - /** - * Returns the code to draw the cell border - * @param float $x X coordinate. - * @param float $y Y coordinate. - * @param float $w Cell width. - * @param float $h Cell height. - * @param string|array|int $brd Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return string containing cell border code - * @protected - * @see SetLineStyle() - * @since 5.7.000 (2010-08-02) - */ - protected function getCellBorder($x, $y, $w, $h, $brd) { - $s = ''; // string to be returned - if (empty($brd)) { - return $s; - } - if ($brd == 1) { - $brd = array('LRTB' => true); - } - // calculate coordinates for border - $k = $this->k; - if ($this->rtl) { - $xeL = ($x - $w) * $k; - $xeR = $x * $k; - } else { - $xeL = $x * $k; - $xeR = ($x + $w) * $k; - } - $yeL = (($this->h - ($y + $h)) * $k); - $yeT = (($this->h - $y) * $k); - $xeT = $xeL; - $xeB = $xeR; - $yeR = $yeT; - $yeB = $yeL; - if (is_string($brd)) { - // convert string to array - $slen = strlen($brd); - $newbrd = array(); - for ($i = 0; $i < $slen; ++$i) { - $newbrd[$brd[$i]] = array('cap' => 'square', 'join' => 'miter'); - } - $brd = $newbrd; - } - if (isset($brd['mode'])) { - $mode = $brd['mode']; - unset($brd['mode']); - } else { - $mode = 'normal'; - } - foreach ($brd as $border => $style) { - if (is_array($style) AND !empty($style)) { - // apply border style - $prev_style = $this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '; - $s .= $this->setLineStyle($style, true)."\n"; - } - switch ($mode) { - case 'ext': { - $off = (($this->LineWidth / 2) * $k); - $xL = $xeL - $off; - $xR = $xeR + $off; - $yT = $yeT + $off; - $yL = $yeL - $off; - $xT = $xL; - $xB = $xR; - $yR = $yT; - $yB = $yL; - $w += $this->LineWidth; - $h += $this->LineWidth; - break; - } - case 'int': { - $off = ($this->LineWidth / 2) * $k; - $xL = $xeL + $off; - $xR = $xeR - $off; - $yT = $yeT - $off; - $yL = $yeL + $off; - $xT = $xL; - $xB = $xR; - $yR = $yT; - $yB = $yL; - $w -= $this->LineWidth; - $h -= $this->LineWidth; - break; - } - case 'normal': - default: { - $xL = $xeL; - $xT = $xeT; - $xB = $xeB; - $xR = $xeR; - $yL = $yeL; - $yT = $yeT; - $yB = $yeB; - $yR = $yeR; - break; - } - } - // draw borders by case - if (strlen($border) == 4) { - $s .= sprintf('%F %F %F %F re S ', $xT, $yT, ($w * $k), (-$h * $k)); - } elseif (strlen($border) == 3) { - if (strpos($border,'B') === false) { // LTR - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif (strpos($border,'L') === false) { // TRB - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } elseif (strpos($border,'T') === false) { // RBL - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - } elseif (strpos($border,'R') === false) { // BLT - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - } - } elseif (strlen($border) == 2) { - if ((strpos($border,'L') !== false) AND (strpos($border,'T') !== false)) { // LT - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - } elseif ((strpos($border,'T') !== false) AND (strpos($border,'R') !== false)) { // TR - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif ((strpos($border,'R') !== false) AND (strpos($border,'B') !== false)) { // RB - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } elseif ((strpos($border,'B') !== false) AND (strpos($border,'L') !== false)) { // BL - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - } elseif ((strpos($border,'L') !== false) AND (strpos($border,'R') !== false)) { // LR - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif ((strpos($border,'T') !== false) AND (strpos($border,'B') !== false)) { // TB - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } - } else { // strlen($border) == 1 - if (strpos($border,'L') !== false) { // L - $s .= sprintf('%F %F m ', $xL, $yL); - $s .= sprintf('%F %F l ', $xT, $yT); - $s .= 'S '; - } elseif (strpos($border,'T') !== false) { // T - $s .= sprintf('%F %F m ', $xT, $yT); - $s .= sprintf('%F %F l ', $xR, $yR); - $s .= 'S '; - } elseif (strpos($border,'R') !== false) { // R - $s .= sprintf('%F %F m ', $xR, $yR); - $s .= sprintf('%F %F l ', $xB, $yB); - $s .= 'S '; - } elseif (strpos($border,'B') !== false) { // B - $s .= sprintf('%F %F m ', $xB, $yB); - $s .= sprintf('%F %F l ', $xL, $yL); - $s .= 'S '; - } - } - if (is_array($style) AND !empty($style)) { - // reset border style to previous value - $s .= "\n".$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor."\n"; - } - } - return $s; - } - - /** - * This method allows printing text with line breaks. - * They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the \n character). As many cells as necessary are output, one below the other.
      - * Text can be aligned, centered or justified. The cell block can be framed and the background painted. - * @param float $w Width of cells. If 0, they extend up to the right margin of the page. - * @param float $h Cell minimum height. The cell extends automatically if needed. - * @param string $txt String to print - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param string $align Allows to center or align the text. Possible values are:
      • L or empty string: left align
      • C: center
      • R: right align
      • J: justification (default value when $ishtml=false)
      - * @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false). - * @param int $ln Indicates where the current position should go after the call. Possible values are:
      • 0: to the right
      • 1: to the beginning of the next line [DEFAULT]
      • 2: below
      - * @param float|null $x x position in user units - * @param float|null $y y position in user units - * @param boolean $reseth if true reset the last cell height (default true). - * @param int $stretch font stretch mode:
      • 0 = disabled
      • 1 = horizontal scaling only if text is larger than cell width
      • 2 = forced horizontal scaling to fit cell width
      • 3 = character spacing only if text is larger than cell width
      • 4 = forced character spacing to fit cell width
      General font stretching and scaling values will be preserved when possible. - * @param boolean $ishtml INTERNAL USE ONLY -- set to true if $txt is HTML content (default = false). Never set this parameter to true, use instead writeHTMLCell() or writeHTML() methods. - * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width. - * @param float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false. - * @param string $valign Vertical alignment of text (requires $maxh = $h > 0). Possible values are:
      • T: TOP
      • M: middle
      • B: bottom
      . This feature works only when $ishtml=false and the cell must fit in a single page. - * @param boolean $fitcell if true attempt to fit all the text within the cell by reducing the font size (do not work in HTML mode). $maxh must be greater than 0 and equal to $h. - * @return int Return the number of cells or 1 for html mode. - * @public - * @since 1.3 - * @see SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Cell(), Write(), SetAutoPageBreak() - */ - public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x=null, $y=null, $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $valign='T', $fitcell=false) { - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - // adjust internal padding - $this->adjustCellPadding($border); - $mc_padding = $this->cell_padding; - $mc_margin = $this->cell_margin; - $this->cell_padding['T'] = 0; - $this->cell_padding['B'] = 0; - $this->setCellMargins(0, 0, 0, 0); - if (TCPDF_STATIC::empty_string($this->lasth) OR $reseth) { - // reset row height - $this->resetLastH(); - } - if (!TCPDF_STATIC::empty_string($y)) { - $this->setY($y); // set y in order to convert negative y values to positive ones - } - $y = $this->GetY(); - $resth = 0; - if (($h > 0) AND $this->inPageBody() AND (($y + $h + $mc_margin['T'] + $mc_margin['B']) > $this->PageBreakTrigger)) { - // spit cell in more pages/columns - $newh = ($this->PageBreakTrigger - $y); - $resth = ($h - $newh); // cell to be printed on the next page/column - $h = $newh; - } - // get current page number - $startpage = $this->page; - // get current column - $startcolumn = $this->current_column; - if (!TCPDF_STATIC::empty_string($x)) { - $this->setX($x); - } else { - $x = $this->GetX(); - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions(0, $x, $y); - // apply margins - $oy = $y + $mc_margin['T']; - if ($this->rtl) { - $ox = ($this->w - $x - $mc_margin['R']); - } else { - $ox = ($x + $mc_margin['L']); - } - $this->x = $ox; - $this->y = $oy; - // set width - if (TCPDF_STATIC::empty_string($w) OR ($w <= 0)) { - if ($this->rtl) { - $w = ($this->x - $this->lMargin - $mc_margin['L']); - } else { - $w = ($this->w - $this->x - $this->rMargin - $mc_margin['R']); - } - } - // store original margin values - $lMargin = $this->lMargin; - $rMargin = $this->rMargin; - if ($this->rtl) { - $this->rMargin = ($this->w - $this->x); - $this->lMargin = ($this->x - $w); - } else { - $this->lMargin = ($this->x); - $this->rMargin = ($this->w - $this->x - $w); - } - $this->clMargin = $this->lMargin; - $this->crMargin = $this->rMargin; - if ($autopadding) { - // add top padding - $this->y += $mc_padding['T']; - } - if ($ishtml) { // ******* Write HTML text - $this->writeHTML($txt, true, false, $reseth, true, $align); - $nl = 1; - } else { // ******* Write simple text - $prev_FontSizePt = $this->FontSizePt; - if ($fitcell) { - // ajust height values - $tobottom = ($this->h - $this->y - $this->bMargin - $this->cell_padding['T'] - $this->cell_padding['B']); - $h = $maxh = max(min($h, $tobottom), min($maxh, $tobottom)); - } - // vertical alignment - if ($maxh > 0) { - // get text height - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); - if ($fitcell AND ($text_height > $maxh) AND ($this->FontSizePt > 1)) { - // try to reduce font size to fit text on cell (use a quick search algorithm) - $fmin = 1; - $fmax = $this->FontSizePt; - $diff_epsilon = (1 / $this->k); // one point (min resolution) - $maxit = (2 * min(100, max(10, intval($fmax)))); // max number of iterations - while ($maxit >= 0) { - $fmid = (($fmax + $fmin) / 2); - $this->setFontSize($fmid, false); - $this->resetLastH(); - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); - $diff = ($maxh - $text_height); - if ($diff >= 0) { - if ($diff <= $diff_epsilon) { - break; - } - $fmin = $fmid; - } else { - $fmax = $fmid; - } - --$maxit; - } - if ($maxit < 0) { - // premature exit, we get the minimum font value to fit the cell - $this->setFontSize($fmin); - $this->resetLastH(); - $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border); - } else { - $this->setFontSize($fmid); - $this->resetLastH(); - } - } - if ($text_height < $maxh) { - if ($valign == 'M') { - // text vertically centered - $this->y += (($maxh - $text_height) / 2); - } elseif ($valign == 'B') { - // text vertically aligned on bottom - $this->y += ($maxh - $text_height); - } - } - } - $nl = $this->Write($this->lasth, $txt, '', 0, $align, true, $stretch, false, true, $maxh, 0, $mc_margin); - if ($fitcell) { - // restore font size - $this->setFontSize($prev_FontSizePt); - } - } - if ($autopadding) { - // add bottom padding - $this->y += $mc_padding['B']; - } - // Get end-of-text Y position - $currentY = $this->y; - // get latest page number - $endpage = $this->page; - if ($resth > 0) { - $skip = ($endpage - $startpage); - $tmpresth = $resth; - while ($tmpresth > 0) { - if ($skip <= 0) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - if ($this->num_columns > 1) { - $tmpresth -= ($this->h - $this->y - $this->bMargin); - } else { - $tmpresth -= ($this->h - $this->tMargin - $this->bMargin); - } - --$skip; - } - $currentY = $this->y; - $endpage = $this->page; - } - // get latest column - $endcolumn = $this->current_column; - if ($this->num_columns == 0) { - $this->num_columns = 1; - } - // disable page regions check - $check_page_regions = $this->check_page_regions; - $this->check_page_regions = false; - // get border modes - $border_start = TCPDF_STATIC::getBorderMode($border, $position='start', $this->opencell); - $border_end = TCPDF_STATIC::getBorderMode($border, $position='end', $this->opencell); - $border_middle = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - // design borders around HTML cells. - for ($page = $startpage; $page <= $endpage; ++$page) { // for each page - $ccode = ''; - $this->setPage($page); - if ($this->num_columns < 2) { - // single-column mode - $this->setX($x); - $this->y = $this->tMargin; - } - // account for margin changes - if ($page > $startpage) { - if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x -= ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - if ($startpage == $endpage) { - // single page - for ($column = $startcolumn; $column <= $endcolumn; ++$column) { // for each column - if ($column != $this->current_column) { - $this->selectColumn($column); - } - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - if ($startcolumn == $endcolumn) { // single column - $cborder = $border; - $h = max($h, ($currentY - $oy)); - $this->y = $oy; - } elseif ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $oy; - $h = $this->h - $this->y - $this->bMargin; - } elseif ($column == $endcolumn) { // end column - $cborder = $border_end; - $h = $currentY - $this->y; - if ($resth > $h) { - $h = $resth; - } - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $startpage) { // first page - for ($column = $startcolumn; $column < $this->num_columns; ++$column) { // for each column - if ($column != $this->current_column) { - $this->selectColumn($column); - } - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - if ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $oy; - $h = $this->h - $this->y - $this->bMargin; - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $endpage) { // last page - for ($column = 0; $column <= $endcolumn; ++$column) { // for each column - if ($column != $this->current_column) { - $this->selectColumn($column); - } - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - if ($column == $endcolumn) { - // end column - $cborder = $border_end; - $h = $currentY - $this->y; - if ($resth > $h) { - $h = $resth; - } - } else { - // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } else { // middle page - for ($column = 0; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - if ($this->rtl) { - $this->x -= $mc_margin['R']; - } else { - $this->x += $mc_margin['L']; - } - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $resth -= $h; - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } - if ($cborder OR $fill) { - $offsetlen = strlen($ccode); - // draw border and fill - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); - $pagemark = $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; - $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey] += $offsetlen; - } else { - $pagemark = $this->xobjects[$this->xobjid]['intmrk']; - $this->xobjects[$this->xobjid]['intmrk'] += $offsetlen; - } - $pagebuff = $this->xobjects[$this->xobjid]['outdata']; - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; - } else { - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = $this->transfmrk[$this->page][$pagemarkkey]; - $this->transfmrk[$this->page][$pagemarkkey] += $offsetlen; - } elseif ($this->InFooter) { - $pagemark = $this->footerpos[$this->page]; - $this->footerpos[$this->page] += $offsetlen; - } else { - $pagemark = $this->intmrk[$this->page]; - $this->intmrk[$this->page] += $offsetlen; - } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - } - } - } // end for each page - // restore page regions check - $this->check_page_regions = $check_page_regions; - // Get end-of-cell Y position - $currentY = $this->GetY(); - // restore previous values - if ($this->num_columns > 1) { - $this->selectColumn(); - } else { - // restore original margins - $this->lMargin = $lMargin; - $this->rMargin = $rMargin; - if ($this->page > $startpage) { - // check for margin variations between pages (i.e. booklet mode) - $dl = ($this->pagedim[$this->page]['olm'] - $this->pagedim[$startpage]['olm']); - $dr = ($this->pagedim[$this->page]['orm'] - $this->pagedim[$startpage]['orm']); - if (($dl != 0) OR ($dr != 0)) { - $this->lMargin += $dl; - $this->rMargin += $dr; - } - } - } - if ($ln > 0) { - //Go to the beginning of the next line - $this->setY($currentY + $mc_margin['B']); - if ($ln == 2) { - $this->setX($x + $w + $mc_margin['L'] + $mc_margin['R']); - } - } else { - // go left or right by case - $this->setPage($startpage); - $this->y = $y; - $this->setX($x + $w + $mc_margin['L'] + $mc_margin['R']); - } - $this->setContentMark(); - $this->cell_padding = $prev_cell_padding; - $this->cell_margin = $prev_cell_margin; - $this->clMargin = $this->lMargin; - $this->crMargin = $this->rMargin; - return $nl; - } - - /** - * This method return the estimated number of lines for print a simple text string using Multicell() method. - * @param string $txt String for calculating his height - * @param float $w Width of cells. If 0, they extend up to the right margin of the page. - * @param boolean $reseth if true reset the last cell height (default false). - * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width (default true). - * @param array|null $cellpadding Internal cell padding, if empty uses default cell padding. - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Alexander Escalona Fern\E1ndez, Nicola Asuni - * @public - * @since 4.5.011 - */ - public function getNumLines($txt, $w=0, $reseth=false, $autopadding=true, $cellpadding=null, $border=0) { - if ($txt === NULL) { - return 0; - } - if ($txt === '') { - // empty string - return 1; - } - // adjust internal padding - $prev_cell_padding = $this->cell_padding; - $prev_lasth = $this->lasth; - if (is_array($cellpadding)) { - $this->cell_padding = $cellpadding; - } - $this->adjustCellPadding($border); - if (TCPDF_STATIC::empty_string($w) OR ($w <= 0)) { - if ($this->rtl) { - $w = $this->x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $this->x; - } - } - $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - if ($reseth) { - // reset row height - $this->resetLastH(); - } - $lines = 1; - $sum = 0; - $chars = TCPDF_FONTS::utf8Bidi(TCPDF_FONTS::UTF8StringToArray($txt, $this->isunicode, $this->CurrentFont), $txt, $this->tmprtl, $this->isunicode, $this->CurrentFont); - $charsWidth = $this->GetArrStringWidth($chars, '', '', 0, true); - $length = count($chars); - $lastSeparator = -1; - for ($i = 0; $i < $length; ++$i) { - $c = $chars[$i]; - $charWidth = $charsWidth[$i]; - if (($c != 160) - AND (($c == 173) - OR preg_match($this->re_spaces, TCPDF_FONTS::unichr($c, $this->isunicode)) - OR (($c == 45) - AND ($i > 0) AND ($i < ($length - 1)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($chars[($i - 1)], $this->isunicode)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($chars[($i + 1)], $this->isunicode)) - ) - ) - ) { - $lastSeparator = $i; - } - if ((($sum + $charWidth) > $wmax) OR ($c == 10)) { - ++$lines; - if ($c == 10) { - $lastSeparator = -1; - $sum = 0; - } elseif ($lastSeparator != -1) { - $i = $lastSeparator; - $lastSeparator = -1; - $sum = 0; - } else { - $sum = $charWidth; - } - } else { - $sum += $charWidth; - } - } - if ($chars[($length - 1)] == 10) { - --$lines; - } - $this->cell_padding = $prev_cell_padding; - $this->lasth = $prev_lasth; - return $lines; - } - - /** - * This method return the estimated height needed for printing a simple text string using the Multicell() method. - * Generally, if you want to know the exact height for a block of content you can use the following alternative technique: - * @pre - * // store current object - * $pdf->startTransaction(); - * // store starting values - * $start_y = $pdf->GetY(); - * $start_page = $pdf->getPage(); - * // call your printing functions with your parameters - * // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * $pdf->MultiCell($w=0, $h=0, $txt, $border=1, $align='L', $fill=false, $ln=1, $x=null, $y=null, $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0); - * // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * // get the new Y - * $end_y = $pdf->GetY(); - * $end_page = $pdf->getPage(); - * // calculate height - * $height = 0; - * if ($end_page == $start_page) { - * $height = $end_y - $start_y; - * } else { - * for ($page=$start_page; $page <= $end_page; ++$page) { - * $this->setPage($page); - * if ($page == $start_page) { - * // first page - * $height += $this->h - $start_y - $this->bMargin; - * } elseif ($page == $end_page) { - * // last page - * $height += $end_y - $this->tMargin; - * } else { - * $height += $this->h - $this->tMargin - $this->bMargin; - * } - * } - * } - * // restore previous object - * $pdf = $pdf->rollbackTransaction(); - * - * @param float $w Width of cells. If 0, they extend up to the right margin of the page. - * @param string $txt String for calculating his height - * @param boolean $reseth if true reset the last cell height (default false). - * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width (default true). - * @param array|null $cellpadding Internal cell padding, if empty uses default cell padding. - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Nicola Asuni, Alexander Escalona Fern\E1ndez - * @public - */ - public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellpadding=null, $border=0) { - // adjust internal padding - $prev_cell_padding = $this->cell_padding; - $prev_lasth = $this->lasth; - if (is_array($cellpadding)) { - $this->cell_padding = $cellpadding; - } - $this->adjustCellPadding($border); - $lines = $this->getNumLines($txt, $w, $reseth, $autopadding, $cellpadding, $border); - $height = $this->getCellHeight(($lines * $this->FontSize), $autopadding); - $this->cell_padding = $prev_cell_padding; - $this->lasth = $prev_lasth; - return $height; - } - - /** - * This method prints text from the current position.
      - * @param float $h Line height - * @param string $txt String to print - * @param mixed $link URL or identifier returned by AddLink() - * @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false). - * @param string $align Allows to center or align the text. Possible values are:
      • L or empty string: left align (default value)
      • C: center
      • R: right align
      • J: justify
      - * @param boolean $ln if true set cursor at the bottom of the line, otherwise set cursor at the top of the line. - * @param int $stretch font stretch mode:
      • 0 = disabled
      • 1 = horizontal scaling only if text is larger than cell width
      • 2 = forced horizontal scaling to fit cell width
      • 3 = character spacing only if text is larger than cell width
      • 4 = forced character spacing to fit cell width
      General font stretching and scaling values will be preserved when possible. - * @param boolean $firstline if true prints only the first line and return the remaining string. - * @param boolean $firstblock if true the string is the starting of a line. - * @param float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. - * @param float $wadj first line width will be reduced by this amount (used in HTML mode). - * @param array|null $margin margin array of the parent container - * @return mixed Return the number of cells or the remaining string if $firstline = true. - * @public - * @since 1.5 - */ - public function Write($h, $txt, $link='', $fill=false, $align='', $ln=false, $stretch=0, $firstline=false, $firstblock=false, $maxh=0, $wadj=0, $margin=null) { - // check page for no-write regions and adapt page margins if necessary - list($this->x, $this->y) = $this->checkPageRegions($h, $this->x, $this->y); - if (strlen($txt) == 0) { - // fix empty text - $txt = ' '; - } - if (!is_array($margin)) { - // set default margins - $margin = $this->cell_margin; - } - // remove carriage returns - $s = str_replace("\r", '', $txt); - // check if string contains arabic text - if (preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $s)) { - $arabic = true; - } else { - $arabic = false; - } - // check if string contains RTL text - if ($arabic OR ($this->tmprtl == 'R') OR preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $s)) { - $rtlmode = true; - } else { - $rtlmode = false; - } - // get a char width - $chrwidth = $this->GetCharWidth(46); // dot character - // get array of unicode values - $chars = TCPDF_FONTS::UTF8StringToArray($s, $this->isunicode, $this->CurrentFont); - // calculate maximum width for a single character on string - $chrw = $this->GetArrStringWidth($chars, '', '', 0, true); - array_walk($chrw, array($this, 'getRawCharWidth')); - $maxchwidth = max($chrw); - // get array of chars - $uchars = TCPDF_FONTS::UTF8ArrayToUniArray($chars, $this->isunicode); - // get the number of characters - $nb = count($chars); - // replacement for SHY character (minus symbol) - $shy_replacement = 45; - $shy_replacement_char = TCPDF_FONTS::unichr($shy_replacement, $this->isunicode); - // widht for SHY replacement - $shy_replacement_width = $this->GetCharWidth($shy_replacement); - // page width - $pw = $w = $this->w - $this->lMargin - $this->rMargin; - // calculate remaining line width ($w) - if ($this->rtl) { - $w = $this->x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $this->x; - } - // max column width - $wmax = ($w - $wadj); - if (!$firstline) { - $wmax -= ($this->cell_padding['L'] + $this->cell_padding['R']); - } - if ((!$firstline) AND (($chrwidth > $wmax) OR ($maxchwidth > $wmax))) { - // the maximum width character do not fit on column - return ''; - } - // minimum row height - $row_height = max($h, $this->getCellHeight($this->FontSize)); - // max Y - $maxy = $this->y + $maxh - max($row_height, $h); - $start_page = $this->page; - $i = 0; // character position - $j = 0; // current starting position - $sep = -1; // position of the last blank space - $prevsep = $sep; // previous separator - $shy = false; // true if the last blank is a soft hypen (SHY) - $prevshy = $shy; // previous shy mode - $l = 0; // current string length - $nl = 0; //number of lines - $linebreak = false; - $pc = 0; // previous character - // for each character - while ($i < $nb) { - if (($maxh > 0) AND ($this->y > $maxy) ) { - break; - } - //Get the current character - $c = $chars[$i]; - if ($c == 10) { // 10 = "\n" = new line - //Explicit line break - if ($align == 'J') { - if ($this->rtl) { - $talign = 'R'; - } else { - $talign = 'L'; - } - } else { - $talign = $align; - } - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($i - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew; - } else { - $this->endlinex = $startx + $linew; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->setCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - // Skip newlines at the beginning of a page or column - if (!empty($tmpstr) OR ($this->y < ($this->PageBreakTrigger - $row_height))) { - $this->Cell($w, $h, $tmpstr, 0, 1, $talign, $fill, $link, $stretch); - } - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $i)); - } - ++$nl; - $j = $i + 1; - $l = 0; - $sep = -1; - $prevsep = $sep; - $shy = false; - // account for margin changes - if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND ($this->inPageBody())) { - $this->AcceptPageBreak(); - if ($this->rtl) { - $this->x -= $margin['R']; - } else { - $this->x += $margin['L']; - } - $this->lMargin += $margin['L']; - $this->rMargin += $margin['R']; - } - $w = $this->getRemainingWidth(); - $wmax = ($w - $this->cell_padding['L'] - $this->cell_padding['R']); - } else { - // 160 is the non-breaking space. - // 173 is SHY (Soft Hypen). - // \p{Z} or \p{Separator}: any kind of Unicode whitespace or invisible separator. - // \p{Lo} or \p{Other_Letter}: a Unicode letter or ideograph that does not have lowercase and uppercase variants. - // \p{Lo} is needed because Chinese characters are packed next to each other without spaces in between. - if (($c != 160) - AND (($c == 173) - OR preg_match($this->re_spaces, TCPDF_FONTS::unichr($c, $this->isunicode)) - OR (($c == 45) - AND ($i < ($nb - 1)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($pc, $this->isunicode)) - AND @preg_match('/[\p{L}]/'.$this->re_space['m'], TCPDF_FONTS::unichr($chars[($i + 1)], $this->isunicode)) - ) - ) - ) { - // update last blank space position - $prevsep = $sep; - $sep = $i; - // check if is a SHY - if (($c == 173) OR ($c == 45)) { - $prevshy = $shy; - $shy = true; - if ($pc == 45) { - $tmp_shy_replacement_width = 0; - $tmp_shy_replacement_char = ''; - } else { - $tmp_shy_replacement_width = $shy_replacement_width; - $tmp_shy_replacement_char = $shy_replacement_char; - } - } else { - $shy = false; - } - } - // update string length - if ($this->isUnicodeFont() AND ($arabic)) { - // with bidirectional algorithm some chars may be changed affecting the line length - // *** very slow *** - $l = $this->GetArrStringWidth(TCPDF_FONTS::utf8Bidi(array_slice($chars, $j, ($i - $j)), '', $this->tmprtl, $this->isunicode, $this->CurrentFont)); - } else { - $l += $this->GetCharWidth($c, ($i+1 < $nb)); - } - if (($l > $wmax) OR (($c == 173) AND (($l + $tmp_shy_replacement_width) >= $wmax))) { - if (($c == 173) AND (($l + $tmp_shy_replacement_width) > $wmax)) { - $sep = $prevsep; - $shy = $prevshy; - } - // we have reached the end of column - if ($sep == -1) { - // check if the line was already started - if (($this->rtl AND ($this->x <= ($this->w - $this->rMargin - $this->cell_padding['R'] - $margin['R'] - $chrwidth))) - OR ((!$this->rtl) AND ($this->x >= ($this->lMargin + $this->cell_padding['L'] + $margin['L'] + $chrwidth)))) { - // print a void cell and go to next line - $this->Cell($w, $h, '', 0, 1); - $linebreak = true; - if ($firstline) { - return (TCPDF_FONTS::UniArrSubString($uchars, $j)); - } - } else { - // truncate the word because do not fit on column - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($i - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew; - } else { - $this->endlinex = $startx + $linew; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->setCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $tmpstr, 0, 1, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $i)); - } - $j = $i; - --$i; - } - } else { - // word wrapping - if ($this->rtl AND (!$firstblock) AND ($sep < $i)) { - $endspace = 1; - } else { - $endspace = 0; - } - // check the length of the next string - $strrest = TCPDF_FONTS::UniArrSubString($uchars, ($sep + $endspace)); - $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'/', $this->re_space['m'], $this->stringTrim($strrest)); - if (isset($nextstr[0]) AND ($this->GetStringWidth($nextstr[0]) > $pw)) { - // truncate the word because do not fit on a full page width - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($i - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = ($startx - $linew); - } else { - $this->endlinex = ($startx + $linew); - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->setCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $tmpstr, 0, 1, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $i)); - } - $j = $i; - --$i; - } else { - // word wrapping - if ($shy) { - // add hypen (minus symbol) at the end of the line - $shy_width = $tmp_shy_replacement_width; - if ($this->rtl) { - $shy_char_left = $tmp_shy_replacement_char; - $shy_char_right = ''; - } else { - $shy_char_left = ''; - $shy_char_right = $tmp_shy_replacement_char; - } - } else { - $shy_width = 0; - $shy_char_left = ''; - $shy_char_right = ''; - } - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, ($sep + $endspace)); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, (($sep + $endspace) - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew - $shy_width; - } else { - $this->endlinex = $startx + $linew + $shy_width; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->setCellPadding(0); - } - } - // print the line - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $shy_char_left.$tmpstr.$shy_char_right, 0, 1, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - if ($chars[$sep] == 45) { - $endspace += 1; - } - // return the remaining text - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, ($sep + $endspace))); - } - $i = $sep; - $sep = -1; - $shy = false; - $j = ($i + 1); - } - } - // account for margin changes - if ((($this->y + $this->lasth) > $this->PageBreakTrigger) AND ($this->inPageBody())) { - $this->AcceptPageBreak(); - if ($this->rtl) { - $this->x -= $margin['R']; - } else { - $this->x += $margin['L']; - } - $this->lMargin += $margin['L']; - $this->rMargin += $margin['R']; - } - $w = $this->getRemainingWidth(); - $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; - if ($linebreak) { - $linebreak = false; - } else { - ++$nl; - $l = 0; - } - } - } - // save last character - $pc = $c; - ++$i; - } // end while i < nb - // print last substring (if any) - if ($l > 0) { - switch ($align) { - case 'J': - case 'C': { - break; - } - case 'L': { - if (!$this->rtl) { - $w = $l; - } - break; - } - case 'R': { - if ($this->rtl) { - $w = $l; - } - break; - } - default: { - $w = $l; - break; - } - } - $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $nb); - if ($firstline) { - $startx = $this->x; - $tmparr = array_slice($chars, $j, ($nb - $j)); - if ($rtlmode) { - $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont); - } - $linew = $this->GetArrStringWidth($tmparr); - unset($tmparr); - if ($this->rtl) { - $this->endlinex = $startx - $linew; - } else { - $this->endlinex = $startx + $linew; - } - $w = $linew; - $tmpcellpadding = $this->cell_padding; - if ($maxh == 0) { - $this->setCellPadding(0); - } - } - if ($firstblock AND $this->isRTLTextDir()) { - $tmpstr = $this->stringRightTrim($tmpstr); - } - $this->Cell($w, $h, $tmpstr, 0, $ln, $align, $fill, $link, $stretch); - unset($tmpstr); - if ($firstline) { - $this->cell_padding = $tmpcellpadding; - return (TCPDF_FONTS::UniArrSubString($uchars, $nb)); - } - ++$nl; - } - if ($firstline) { - return ''; - } - return $nl; - } - - /** - * Returns the remaining width between the current position and margins. - * @return float Return the remaining width - * @protected - */ - protected function getRemainingWidth() { - list($this->x, $this->y) = $this->checkPageRegions(0, $this->x, $this->y); - if ($this->rtl) { - return ($this->x - $this->lMargin); - } else { - return ($this->w - $this->rMargin - $this->x); - } - } - - /** - * Set the block dimensions accounting for page breaks and page/column fitting - * @param float $w width - * @param float $h height - * @param float $x X coordinate - * @param float $y Y coodiante - * @param boolean $fitonpage if true the block is resized to not exceed page dimensions. - * @return array array($w, $h, $x, $y) - * @protected - * @since 5.5.009 (2010-07-05) - */ - protected function fitBlock($w, $h, $x, $y, $fitonpage=false) { - if ($w <= 0) { - // set maximum width - $w = ($this->w - $this->lMargin - $this->rMargin); - if ($w <= 0) { - $w = 1; - } - } - if ($h <= 0) { - // set maximum height - $h = ($this->PageBreakTrigger - $this->tMargin); - if ($h <= 0) { - $h = 1; - } - } - // resize the block to be vertically contained on a single page or single column - if ($fitonpage OR $this->AutoPageBreak) { - $ratio_wh = ($w / $h); - if ($h > ($this->PageBreakTrigger - $this->tMargin)) { - $h = $this->PageBreakTrigger - $this->tMargin; - $w = ($h * $ratio_wh); - } - // resize the block to be horizontally contained on a single page or single column - if ($fitonpage) { - $maxw = ($this->w - $this->lMargin - $this->rMargin); - if ($w > $maxw) { - $w = $maxw; - $h = ($w / $ratio_wh); - } - } - } - // Check whether we need a new page or new column first as this does not fit - $prev_x = $this->x; - $prev_y = $this->y; - if ($this->checkPageBreak($h, $y) OR ($this->y < $prev_y)) { - $y = $this->y; - if ($this->rtl) { - $x += ($prev_x - $this->x); - } else { - $x += ($this->x - $prev_x); - } - $this->newline = true; - } - // resize the block to be contained on the remaining available page or column space - if ($fitonpage) { - $ratio_wh = ($w / $h); - if (($y + $h) > $this->PageBreakTrigger) { - $h = $this->PageBreakTrigger - $y; - $w = ($h * $ratio_wh); - } - if ((!$this->rtl) AND (($x + $w) > ($this->w - $this->rMargin))) { - $w = $this->w - $this->rMargin - $x; - $h = ($w / $ratio_wh); - } elseif (($this->rtl) AND (($x - $w) < ($this->lMargin))) { - $w = $x - $this->lMargin; - $h = ($w / $ratio_wh); - } - } - return array($w, $h, $x, $y); - } - - /** - * Puts an image in the page. - * The upper-left corner must be given. - * The dimensions can be specified in different ways:
        - *
      • explicit width and height (expressed in user unit)
      • - *
      • one explicit dimension, the other being calculated automatically in order to keep the original proportions
      • - *
      • no explicit dimension, in which case the image is put at 72 dpi
      - * Supported formats are JPEG and PNG images whitout GD library and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM; - * The format can be specified explicitly or inferred from the file extension.
      - * It is possible to put a link on the image.
      - * Remark: if an image is used several times, only one copy will be embedded in the file.
      - * @param string $file Name of the file containing the image or a '@' character followed by the image data string. To link an image without embedding it on the document, set an asterisk character before the URL (i.e.: '*http://www.example.com/image.jpg'). - * @param float|null $x Abscissa of the upper-left corner (LTR) or upper-right corner (RTL). - * @param float|null $y Ordinate of the upper-left corner (LTR) or upper-right corner (RTL). - * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension. - * @param mixed $link URL or identifier returned by AddLink(). - * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
      • T: top-right for LTR or top-left for RTL
      • M: middle-right for LTR or middle-left for RTL
      • B: bottom-right for LTR or bottom-left for RTL
      • N: next line
      - * @param mixed $resize If true resize (reduce) the image to fit $w and $h (requires GD or ImageMagick library); if false do not resize; if 2 force resize in all cases (upscaling and downscaling). - * @param int $dpi dot-per-inch resolution used on resize - * @param string $palign Allows to center or align the image on the current line. Possible values are:
      • L : left align
      • C : center
      • R : right align
      • '' : empty string : left for LTR or right for RTL
      - * @param boolean $ismask true if this image is a mask, false otherwise - * @param mixed $imgmask image object returned by this function or false - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param mixed $fitbox If not false scale image dimensions proportionally to fit within the ($w, $h) box. $fitbox can be true or a 2 characters string indicating the image alignment inside the box. The first character indicate the horizontal alignment (L = left, C = center, R = right) the second character indicate the vertical algnment (T = top, M = middle, B = bottom). - * @param boolean $hidden If true do not display the image. - * @param boolean $fitonpage If true the image is resized to not exceed page dimensions. - * @param boolean $alt If true the image will be added as alternative and not directly printed (the ID of the image will be returned). - * @param array $altimgs Array of alternate images IDs. Each alternative image must be an array with two values: an integer representing the image ID (the value returned by the Image method) and a boolean value to indicate if the image is the default for printing. - * @return mixed|false image information - * @public - * @since 1.1 - */ - public function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false, $alt=false, $altimgs=array()) { - if ($this->state != 2) { - return false; - } - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $exurl = ''; // external streams - $imsize = FALSE; - - // Make sure the file variable is not empty or null because accessing $file[0] later - // results in error when running PHP 7.4 - if (empty($file)) { - return false; - } - // check if we are passing an image as file or string - if ($file[0] === '@') { - // image from string - $imgdata = substr($file, 1); - } else { // image file - if ($file[0] === '*') { - // image as external stream - $file = substr($file, 1); - $exurl = $file; - } - // check if file exist and it is valid - if (!@$this->fileExists($file)) { - return false; - } - if (false !== $info = $this->getImageBuffer($file)) { - $imsize = array($info['w'], $info['h']); - } elseif (($imsize = @getimagesize($file)) === FALSE && strpos($file, '__tcpdf_'.$this->file_id.'_img') === FALSE){ - $imgdata = $this->getCachedFileContents($file); - } - } - if (!empty($imgdata)) { - // copy image to cache - $original_file = $file; - $file = TCPDF_STATIC::getObjFilename('img', $this->file_id); - $fp = TCPDF_STATIC::fopenLocal($file, 'w'); - if (!$fp) { - $this->Error('Unable to write file: '.$file); - } - fwrite($fp, $imgdata); - fclose($fp); - unset($imgdata); - $imsize = @getimagesize($file); - if ($imsize === FALSE) { - unlink($file); - $file = $original_file; - } - } - if ($imsize === FALSE) { - if (($w > 0) AND ($h > 0)) { - // get measures from specified data - $pw = $this->getHTMLUnitToUnits($w, 0, $this->pdfunit, true) * $this->imgscale * $this->k; - $ph = $this->getHTMLUnitToUnits($h, 0, $this->pdfunit, true) * $this->imgscale * $this->k; - $imsize = array($pw, $ph); - } else { - $this->Error('[Image] Unable to get the size of the image: '.$file); - } - } - // file hash - $filehash = md5($file); - // get original image width and height in pixels - list($pixw, $pixh) = $imsize; - // calculate image width and height on document - if (($w <= 0) AND ($h <= 0)) { - // convert image size to document unit - $w = $this->pixelsToUnits($pixw); - $h = $this->pixelsToUnits($pixh); - } elseif ($w <= 0) { - $w = $h * $pixw / $pixh; - } elseif ($h <= 0) { - $h = $w * $pixh / $pixw; - } elseif (($fitbox !== false) AND ($w > 0) AND ($h > 0)) { - if (strlen($fitbox) !== 2) { - // set default alignment - $fitbox = '--'; - } - // scale image dimensions proportionally to fit within the ($w, $h) box - if ((($w * $pixh) / ($h * $pixw)) < 1) { - // store current height - $oldh = $h; - // calculate new height - $h = $w * $pixh / $pixw; - // height difference - $hdiff = ($oldh - $h); - // vertical alignment - switch (strtoupper($fitbox[1])) { - case 'T': { - break; - } - case 'M': { - $y += ($hdiff / 2); - break; - } - case 'B': { - $y += $hdiff; - break; - } - } - } else { - // store current width - $oldw = $w; - // calculate new width - $w = $h * $pixw / $pixh; - // width difference - $wdiff = ($oldw - $w); - // horizontal alignment - switch (strtoupper($fitbox[0])) { - case 'L': { - if ($this->rtl) { - $x -= $wdiff; - } - break; - } - case 'C': { - if ($this->rtl) { - $x -= ($wdiff / 2); - } else { - $x += ($wdiff / 2); - } - break; - } - case 'R': { - if (!$this->rtl) { - $x += $wdiff; - } - break; - } - } - } - } - // fit the image on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - // calculate new minimum dimensions in pixels - $neww = round($w * $this->k * $dpi / $this->dpi); - $newh = round($h * $this->k * $dpi / $this->dpi); - // check if resize is necessary (resize is used only to reduce the image) - $newsize = ($neww * $newh); - $pixsize = ($pixw * $pixh); - if (intval($resize) == 2) { - $resize = true; - } elseif ($newsize >= $pixsize) { - $resize = false; - } - // check if image has been already added on document - $newimage = true; - if (in_array($file, $this->imagekeys)) { - $newimage = false; - // get existing image data - $info = $this->getImageBuffer($file); - if (strpos($file, '__tcpdf_'.$this->file_id.'_imgmask_') === FALSE) { - // check if the newer image is larger - $oldsize = ($info['w'] * $info['h']); - if ((($oldsize < $newsize) AND ($resize)) OR (($oldsize < $pixsize) AND (!$resize))) { - $newimage = true; - } - } - } elseif (($ismask === false) AND ($imgmask === false) AND (strpos($file, '__tcpdf_'.$this->file_id.'_imgmask_') === FALSE)) { - // create temp image file (without alpha channel) - $tempfile_plain = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_plain_'.$filehash; - // create temp alpha file - $tempfile_alpha = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_alpha_'.$filehash; - // check for cached images - if (in_array($tempfile_plain, $this->imagekeys)) { - // get existing image data - $info = $this->getImageBuffer($tempfile_plain); - // check if the newer image is larger - $oldsize = ($info['w'] * $info['h']); - if ((($oldsize < $newsize) AND ($resize)) OR (($oldsize < $pixsize) AND (!$resize))) { - $newimage = true; - } else { - $newimage = false; - // embed mask image - $imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false); - // embed image, masked with previously embedded mask - return $this->Image($tempfile_plain, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, false, $imgmask); - } - } - } - if ($newimage) { - //First use of image, get info - $type = strtolower($type); - if ($type == '') { - $type = TCPDF_IMAGES::getImageFileType($file, $imsize); - } elseif ($type == 'jpg') { - $type = 'jpeg'; - } - $mqr = TCPDF_STATIC::get_mqr(); - TCPDF_STATIC::set_mqr(false); - // Specific image handlers (defined on TCPDF_IMAGES CLASS) - $mtd = '_parse'.$type; - // GD image handler function - $gdfunction = 'imagecreatefrom'.$type; - $info = false; - if ((method_exists('TCPDF_IMAGES', $mtd)) AND (!($resize AND (function_exists($gdfunction) OR extension_loaded('imagick'))))) { - // TCPDF image functions - $info = TCPDF_IMAGES::$mtd($file); - if (($ismask === false) AND ($imgmask === false) AND (strpos($file, '__tcpdf_'.$this->file_id.'_imgmask_') === FALSE) - AND (($info === 'pngalpha') OR (isset($info['trns']) AND !empty($info['trns'])))) { - return $this->ImagePngAlpha($file, $x, $y, $pixw, $pixh, $w, $h, 'PNG', $link, $align, $resize, $dpi, $palign, $filehash); - } - } - if (($info === false) AND function_exists($gdfunction)) { - try { - // GD library - $img = $gdfunction($file); - if ($img !== false) { - if ($resize) { - $imgr = imagecreatetruecolor($neww, $newh); - if (($type == 'gif') OR ($type == 'png')) { - $imgr = TCPDF_IMAGES::setGDImageTransparency($imgr, $img); - } - imagecopyresampled($imgr, $img, 0, 0, 0, 0, $neww, $newh, $pixw, $pixh); - $img = $imgr; - } - if (($type == 'gif') OR ($type == 'png')) { - $info = TCPDF_IMAGES::_toPNG($img, TCPDF_STATIC::getObjFilename('img', $this->file_id)); - } else { - $info = TCPDF_IMAGES::_toJPEG($img, $this->jpeg_quality, TCPDF_STATIC::getObjFilename('img', $this->file_id)); - } - } - } catch(Exception $e) { - $info = false; - } - } - if (($info === false) AND extension_loaded('imagick')) { - try { - // ImageMagick library - $img = new Imagick(); - if ($type == 'svg') { - if ($file[0] === '@') { - // image from string - $svgimg = substr($file, 1); - } else { - // get SVG file content - $svgimg = $this->getCachedFileContents($file); - } - if ($svgimg !== FALSE) { - // get width and height - $regs = array(); - if (preg_match('/]*)>/si', $svgimg, $regs)) { - $svgtag = $regs[1]; - $tmp = array(); - if (preg_match('/[\s]+width[\s]*=[\s]*"([^"]*)"/si', $svgtag, $tmp)) { - $ow = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - $owu = sprintf('%F', ($ow * $dpi / 72)).$this->pdfunit; - $svgtag = preg_replace('/[\s]+width[\s]*=[\s]*"[^"]*"/si', ' width="'.$owu.'"', $svgtag, 1); - } else { - $ow = $w; - } - $tmp = array(); - if (preg_match('/[\s]+height[\s]*=[\s]*"([^"]*)"/si', $svgtag, $tmp)) { - $oh = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - $ohu = sprintf('%F', ($oh * $dpi / 72)).$this->pdfunit; - $svgtag = preg_replace('/[\s]+height[\s]*=[\s]*"[^"]*"/si', ' height="'.$ohu.'"', $svgtag, 1); - } else { - $oh = $h; - } - $tmp = array(); - if (!preg_match('/[\s]+viewBox[\s]*=[\s]*"[\s]*([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]*"/si', $svgtag, $tmp)) { - $vbw = ($ow * $this->imgscale * $this->k); - $vbh = ($oh * $this->imgscale * $this->k); - $vbox = sprintf(' viewBox="0 0 %F %F" ', $vbw, $vbh); - $svgtag = $vbox.$svgtag; - } - $svgimg = preg_replace('/]*)>/si', '', $svgimg, 1); - } - $img->readImageBlob($svgimg); - } - } else { - $img->readImage($file); - } - if ($resize) { - $img->resizeImage($neww, $newh, 10, 1, false); - } - $img->setCompressionQuality($this->jpeg_quality); - $img->setImageFormat('jpeg'); - $tempname = TCPDF_STATIC::getObjFilename('img', $this->file_id); - $img->writeImage($tempname); - $info = TCPDF_IMAGES::_parsejpeg($tempname); - unlink($tempname); - $img->destroy(); - } catch(Exception $e) { - $info = false; - } - } - if ($info === false) { - // unable to process image - return false; - } - TCPDF_STATIC::set_mqr($mqr); - if ($ismask) { - // force grayscale - $info['cs'] = 'DeviceGray'; - } - if ($imgmask !== false) { - $info['masked'] = $imgmask; - } - if (!empty($exurl)) { - $info['exurl'] = $exurl; - } - // array of alternative images - $info['altimgs'] = $altimgs; - // add image to document - $info['i'] = $this->setImageBuffer($file, $info); - } - // set alignment - $this->img_rb_x = $x + $w; - $this->img_rb_y = $y + $h; - - // set alignment - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x; - } - - if ($ismask OR $hidden) { - // image is not displayed - return $info['i']; - } - $xkimg = $ximg * $this->k; - if (!$alt) { - // only non-alternative immages will be set - $this->_out(sprintf('q %F 0 0 %F %F %F cm /I%u Do Q', ($w * $this->k), ($h * $this->k), $xkimg, (($this->h - ($y + $h)) * $this->k), $info['i'])); - } - if (!empty($border)) { - $bx = $this->x; - $by = $this->y; - $this->x = $ximg; - if ($this->rtl) { - $this->x += $w; - } - $this->y = $y; - $this->Cell($w, $h, '', $border, 0, '', 0, '', 0, true); - $this->x = $bx; - $this->y = $by; - } - if ($link) { - $this->Link($ximg, $y, $w, $h, $link, 0); - } - // set pointer to align the next text/objects - switch($align) { - case 'T': { - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M': { - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B': { - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N': { - $this->setY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['images'][] = $info['i']; - } - return $info['i']; - } - - /** - * Extract info from a PNG image with alpha channel using the Imagick or GD library. - * @param string $file Name of the file containing the image. - * @param float $x Abscissa of the upper-left corner. - * @param float $y Ordinate of the upper-left corner. - * @param float $wpx Original width of the image in pixels. - * @param float $hpx original height of the image in pixels. - * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension. - * @param mixed $link URL or identifier returned by AddLink(). - * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
      • T: top-right for LTR or top-left for RTL
      • M: middle-right for LTR or middle-left for RTL
      • B: bottom-right for LTR or bottom-left for RTL
      • N: next line
      - * @param boolean $resize If true resize (reduce) the image to fit $w and $h (requires GD library). - * @param int $dpi dot-per-inch resolution used on resize - * @param string $palign Allows to center or align the image on the current line. Possible values are:
      • L : left align
      • C : center
      • R : right align
      • '' : empty string : left for LTR or right for RTL
      - * @param string $filehash File hash used to build unique file names. - * @author Nicola Asuni - * @protected - * @since 4.3.007 (2008-12-04) - * @see Image() - */ - protected function ImagePngAlpha($file, $x, $y, $wpx, $hpx, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $filehash='') { - // create temp images - if (empty($filehash)) { - $filehash = md5($file); - } - // create temp image file (without alpha channel) - $tempfile_plain = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_plain_'.$filehash; - // create temp alpha file - $tempfile_alpha = K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_imgmask_alpha_'.$filehash; - $parsed = false; - $parse_error = ''; - // ImageMagick extension - if (($parsed === false) AND extension_loaded('imagick')) { - try { - // ImageMagick library - $img = new Imagick(); - $img->readImage($file); - // clone image object - $imga = TCPDF_STATIC::objclone($img); - // extract alpha channel - if (method_exists($img, 'setImageAlphaChannel') AND defined('Imagick::ALPHACHANNEL_EXTRACT')) { - $img->setImageAlphaChannel(Imagick::ALPHACHANNEL_EXTRACT); - } else { - $img->separateImageChannel(8); // 8 = (imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE); - $img->negateImage(true); - } - $img->setImageFormat('png'); - $img->writeImage($tempfile_alpha); - // remove alpha channel - if (method_exists($imga, 'setImageMatte')) { - $imga->setImageMatte(false); - } else { - $imga->separateImageChannel(39); // 39 = (imagick::CHANNEL_ALL & ~(imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE)); - } - $imga->setImageFormat('png'); - $imga->writeImage($tempfile_plain); - $parsed = true; - } catch (Exception $e) { - // Imagemagick fails, try with GD - $parse_error = 'Imagick library error: '.$e->getMessage(); - } - } - // GD extension - if (($parsed === false) AND function_exists('imagecreatefrompng')) { - try { - // generate images - $img = imagecreatefrompng($file); - $imgalpha = imagecreate($wpx, $hpx); - // generate gray scale palette (0 -> 255) - for ($c = 0; $c < 256; ++$c) { - ImageColorAllocate($imgalpha, $c, $c, $c); - } - // extract alpha channel - for ($xpx = 0; $xpx < $wpx; ++$xpx) { - for ($ypx = 0; $ypx < $hpx; ++$ypx) { - $color = imagecolorat($img, $xpx, $ypx); - // get and correct gamma color - $alpha = $this->getGDgamma($img, $color); - imagesetpixel($imgalpha, (int) $xpx, (int) $ypx, (int) $alpha); - } - } - imagepng($imgalpha, $tempfile_alpha); - imagedestroy($imgalpha); - // extract image without alpha channel - $imgplain = imagecreatetruecolor($wpx, $hpx); - imagecopy($imgplain, $img, 0, 0, 0, 0, $wpx, $hpx); - imagepng($imgplain, $tempfile_plain); - imagedestroy($imgplain); - $parsed = true; - } catch (Exception $e) { - // GD fails - $parse_error = 'GD library error: '.$e->getMessage(); - } - } - if ($parsed === false) { - if (empty($parse_error)) { - $this->Error('TCPDF requires the Imagick or GD extension to handle PNG images with alpha channel.'); - } else { - $this->Error($parse_error); - } - } - // embed mask image - $imgmask = $this->Image($tempfile_alpha, $x, $y, $w, $h, 'PNG', '', '', $resize, $dpi, '', true, false); - // embed image, masked with previously embedded mask - $this->Image($tempfile_plain, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, false, $imgmask); - } - - /** - * Get the GD-corrected PNG gamma value from alpha color - * @param resource $img GD image Resource ID. - * @param int $c alpha color - * @protected - * @since 4.3.007 (2008-12-04) - */ - protected function getGDgamma($img, $c) { - if (!isset($this->gdgammacache['#'.$c])) { - $colors = imagecolorsforindex($img, $c); - // GD alpha is only 7 bit (0 -> 127) - $this->gdgammacache['#'.$c] = (int) (((127 - $colors['alpha']) / 127) * 255); - // correct gamma - $this->gdgammacache['#'.$c] = (int) (pow(($this->gdgammacache['#'.$c] / 255), 2.2) * 255); - // store the latest values on cache to improve performances - if (count($this->gdgammacache) > 8) { - // remove one element from the cache array - array_shift($this->gdgammacache); - } - } - return $this->gdgammacache['#'.$c]; - } - - /** - * Performs a line break. - * The current abscissa goes back to the left margin and the ordinate increases by the amount passed in parameter. - * @param float|null $h The height of the break. By default, the value equals the height of the last printed cell. - * @param boolean $cell if true add the current left (or right o for RTL) padding to the X coordinate - * @public - * @since 1.0 - * @see Cell() - */ - public function Ln($h=null, $cell=false) { - if (($this->num_columns > 1) AND ($this->y == $this->columns[$this->current_column]['y']) AND isset($this->columns[$this->current_column]['x']) AND ($this->x == $this->columns[$this->current_column]['x'])) { - // revove vertical space from the top of the column - return; - } - if ($cell) { - if ($this->rtl) { - $cellpadding = $this->cell_padding['R']; - } else { - $cellpadding = $this->cell_padding['L']; - } - } else { - $cellpadding = 0; - } - if ($this->rtl) { - $this->x = $this->w - $this->rMargin - $cellpadding; - } else { - $this->x = $this->lMargin + $cellpadding; - } - if (TCPDF_STATIC::empty_string($h)) { - $h = $this->lasth; - } - $this->y += $h; - $this->newline = true; - } - - /** - * Returns the relative X value of current position. - * The value is relative to the left border for LTR languages and to the right border for RTL languages. - * @return float - * @public - * @since 1.2 - * @see SetX(), GetY(), SetY() - */ - public function GetX() { - //Get x position - if ($this->rtl) { - return ($this->w - $this->x); - } else { - return $this->x; - } - } - - /** - * Returns the absolute X value of current position. - * @return float - * @public - * @since 1.2 - * @see SetX(), GetY(), SetY() - */ - public function GetAbsX() { - return $this->x; - } - - /** - * Returns the ordinate of the current position. - * @return float - * @public - * @since 1.0 - * @see SetY(), GetX(), SetX() - */ - public function GetY() { - return $this->y; - } - - /** - * Defines the abscissa of the current position. - * If the passed value is negative, it is relative to the right of the page (or left if language is RTL). - * @param float $x The value of the abscissa in user units. - * @param boolean $rtloff if true always uses the page top-left corner as origin of axis. - * @public - * @since 1.2 - * @see GetX(), GetY(), SetY(), SetXY() - */ - public function setX($x, $rtloff=false) { - $x = floatval($x); - if (!$rtloff AND $this->rtl) { - if ($x >= 0) { - $this->x = $this->w - $x; - } else { - $this->x = abs($x); - } - } else { - if ($x >= 0) { - $this->x = $x; - } else { - $this->x = $this->w + $x; - } - } - if ($this->x < 0) { - $this->x = 0; - } - if ($this->x > $this->w) { - $this->x = $this->w; - } - } - - /** - * Moves the current abscissa back to the left margin and sets the ordinate. - * If the passed value is negative, it is relative to the bottom of the page. - * @param float $y The value of the ordinate in user units. - * @param bool $resetx if true (default) reset the X position. - * @param boolean $rtloff if true always uses the page top-left corner as origin of axis. - * @public - * @since 1.0 - * @see GetX(), GetY(), SetY(), SetXY() - */ - public function setY($y, $resetx=true, $rtloff=false) { - $y = floatval($y); - if ($resetx) { - //reset x - if (!$rtloff AND $this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - } - if ($y >= 0) { - $this->y = $y; - } else { - $this->y = $this->h + $y; - } - if ($this->y < 0) { - $this->y = 0; - } - if ($this->y > $this->h) { - $this->y = $this->h; - } - } - - /** - * Defines the abscissa and ordinate of the current position. - * If the passed values are negative, they are relative respectively to the right and bottom of the page. - * @param float $x The value of the abscissa. - * @param float $y The value of the ordinate. - * @param boolean $rtloff if true always uses the page top-left corner as origin of axis. - * @public - * @since 1.2 - * @see SetX(), SetY() - */ - public function setXY($x, $y, $rtloff=false) { - $this->setY($y, false, $rtloff); - $this->setX($x, $rtloff); - } - - /** - * Set the absolute X coordinate of the current pointer. - * @param float $x The value of the abscissa in user units. - * @public - * @since 5.9.186 (2012-09-13) - * @see setAbsX(), setAbsY(), SetAbsXY() - */ - public function setAbsX($x) { - $this->x = floatval($x); - } - - /** - * Set the absolute Y coordinate of the current pointer. - * @param float $y (float) The value of the ordinate in user units. - * @public - * @since 5.9.186 (2012-09-13) - * @see setAbsX(), setAbsY(), SetAbsXY() - */ - public function setAbsY($y) { - $this->y = floatval($y); - } - - /** - * Set the absolute X and Y coordinates of the current pointer. - * @param float $x The value of the abscissa in user units. - * @param float $y (float) The value of the ordinate in user units. - * @public - * @since 5.9.186 (2012-09-13) - * @see setAbsX(), setAbsY(), SetAbsXY() - */ - public function setAbsXY($x, $y) { - $this->setAbsX($x); - $this->setAbsY($y); - } - - /** - * Send the document to a given destination: string, local file or browser. - * In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.
      - * The method first calls Close() if necessary to terminate the document. - * @param string $name The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character. - * @param string $dest Destination where to send the document. It can take one of the following values:
      • I: send the file inline to the browser (default). The plug-in is used if available. The name given by name is used when one selects the "Save as" option on the link generating the PDF.
      • D: send to the browser and force a file download with the name given by name.
      • F: save to a local server file with the name given by name.
      • S: return the document as a string (name is ignored).
      • FI: equivalent to F + I option
      • FD: equivalent to F + D option
      • E: return the document as base64 mime multi-part email attachment (RFC 2045)
      - * @return string - * @public - * @since 1.0 - * @see Close() - */ - public function Output($name='doc.pdf', $dest='I') { - //Output PDF to some destination - //Finish document if necessary - if ($this->state < 3) { - $this->Close(); - } - //Normalize parameters - if (is_bool($dest)) { - $dest = $dest ? 'D' : 'F'; - } - $dest = strtoupper($dest); - if ($dest[0] != 'F') { - $name = preg_replace('/[\s]+/', '_', $name); - $name = preg_replace('/[^a-zA-Z0-9_\.-]/', '', $name); - } - if ($this->sign) { - // *** apply digital signature to the document *** - // get the document content - $pdfdoc = $this->getBuffer(); - // remove last newline - $pdfdoc = substr($pdfdoc, 0, -1); - // remove filler space - $byterange_string_len = strlen(TCPDF_STATIC::$byterange_string); - // define the ByteRange - $byte_range = array(); - $byte_range[0] = 0; - $byte_range[1] = strpos($pdfdoc, TCPDF_STATIC::$byterange_string) + $byterange_string_len + 10; - $byte_range[2] = $byte_range[1] + $this->signature_max_length + 2; - $byte_range[3] = strlen($pdfdoc) - $byte_range[2]; - $pdfdoc = substr($pdfdoc, 0, $byte_range[1]).substr($pdfdoc, $byte_range[2]); - // replace the ByteRange - $byterange = sprintf('/ByteRange[0 %u %u %u]', $byte_range[1], $byte_range[2], $byte_range[3]); - $byterange .= str_repeat(' ', ($byterange_string_len - strlen($byterange))); - $pdfdoc = str_replace(TCPDF_STATIC::$byterange_string, $byterange, $pdfdoc); - // write the document to a temporary folder - $tempdoc = TCPDF_STATIC::getObjFilename('doc', $this->file_id); - $f = TCPDF_STATIC::fopenLocal($tempdoc, 'wb'); - if (!$f) { - $this->Error('Unable to create temporary file: '.$tempdoc); - } - $pdfdoc_length = strlen($pdfdoc); - fwrite($f, $pdfdoc, $pdfdoc_length); - fclose($f); - // get digital signature via openssl library - $tempsign = TCPDF_STATIC::getObjFilename('sig', $this->file_id); - if (empty($this->signature_data['extracerts'])) { - openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED); - } else { - openssl_pkcs7_sign($tempdoc, $tempsign, $this->signature_data['signcert'], array($this->signature_data['privkey'], $this->signature_data['password']), array(), PKCS7_BINARY | PKCS7_DETACHED, $this->signature_data['extracerts']); - } - // read signature - $signature = file_get_contents($tempsign); - // extract signature - $signature = substr($signature, $pdfdoc_length); - $signature = substr($signature, (strpos($signature, "%%EOF\n\n------") + 13)); - $tmparr = explode("\n\n", $signature); - $signature = $tmparr[1]; - // decode signature - $signature = base64_decode(trim($signature)); - // add TSA timestamp to signature - $signature = $this->applyTSA($signature); - // convert signature to hex - $signature = current(unpack('H*', $signature)); - $signature = str_pad($signature, $this->signature_max_length, '0'); - // Add signature to the document - $this->buffer = substr($pdfdoc, 0, $byte_range[1]).'<'.$signature.'>'.substr($pdfdoc, $byte_range[1]); - $this->bufferlen = strlen($this->buffer); - } - switch($dest) { - case 'I': { - // Send PDF to the standard output - if (ob_get_contents()) { - $this->Error('Some data has already been output, can\'t send PDF file'); - } - if (php_sapi_name() != 'cli') { - // send output to a browser - header('Content-Type: application/pdf'); - if (headers_sent()) { - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - } - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - //header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: inline; filename="'.basename($name).'"'); - TCPDF_STATIC::sendOutputData($this->getBuffer(), $this->bufferlen); - } else { - echo $this->getBuffer(); - } - break; - } - case 'D': { - // download PDF as file - if (ob_get_contents()) { - $this->Error('Some data has already been output, can\'t send PDF file'); - } - header('Content-Description: File Transfer'); - if (headers_sent()) { - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - } - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - //header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - // force download dialog - if (strpos(php_sapi_name(), 'cgi') === false) { - header('Content-Type: application/force-download'); - header('Content-Type: application/octet-stream', false); - header('Content-Type: application/download', false); - header('Content-Type: application/pdf', false); - } else { - header('Content-Type: application/pdf'); - } - // use the Content-Disposition header to supply a recommended filename - header('Content-Disposition: attachment; filename="'.basename($name).'"'); - header('Content-Transfer-Encoding: binary'); - TCPDF_STATIC::sendOutputData($this->getBuffer(), $this->bufferlen); - break; - } - case 'F': - case 'FI': - case 'FD': { - // save PDF to a local file - $f = TCPDF_STATIC::fopenLocal($name, 'wb'); - if (!$f) { - $this->Error('Unable to create output file: '.$name); - } - fwrite($f, $this->getBuffer(), $this->bufferlen); - fclose($f); - if ($dest == 'FI') { - // send headers to browser - header('Content-Type: application/pdf'); - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - //header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: inline; filename="'.basename($name).'"'); - TCPDF_STATIC::sendOutputData(file_get_contents($name), filesize($name)); - } elseif ($dest == 'FD') { - // send headers to browser - if (ob_get_contents()) { - $this->Error('Some data has already been output, can\'t send PDF file'); - } - header('Content-Description: File Transfer'); - if (headers_sent()) { - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - } - header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - // force download dialog - if (strpos(php_sapi_name(), 'cgi') === false) { - header('Content-Type: application/force-download'); - header('Content-Type: application/octet-stream', false); - header('Content-Type: application/download', false); - header('Content-Type: application/pdf', false); - } else { - header('Content-Type: application/pdf'); - } - // use the Content-Disposition header to supply a recommended filename - header('Content-Disposition: attachment; filename="'.basename($name).'"'); - header('Content-Transfer-Encoding: binary'); - TCPDF_STATIC::sendOutputData(file_get_contents($name), filesize($name)); - } - break; - } - case 'E': { - // return PDF as base64 mime multi-part email attachment (RFC 2045) - $retval = 'Content-Type: application/pdf;'."\r\n"; - $retval .= ' name="'.$name.'"'."\r\n"; - $retval .= 'Content-Transfer-Encoding: base64'."\r\n"; - $retval .= 'Content-Disposition: attachment;'."\r\n"; - $retval .= ' filename="'.$name.'"'."\r\n\r\n"; - $retval .= chunk_split(base64_encode($this->getBuffer()), 76, "\r\n"); - return $retval; - } - case 'S': { - // returns PDF as a string - return $this->getBuffer(); - } - default: { - $this->Error('Incorrect output destination: '.$dest); - } - } - return ''; - } - - protected static $cleaned_ids = array(); - /** - * Unset all class variables except the following critical variables. - * @param boolean $destroyall if true destroys all class variables, otherwise preserves critical variables. - * @param boolean $preserve_objcopy if true preserves the objcopy variable - * @public - * @since 4.5.016 (2009-02-24) - */ - public function _destroy($destroyall=false, $preserve_objcopy=false) { - if (isset(self::$cleaned_ids[$this->file_id])) { - $destroyall = false; - } - if ($destroyall AND !$preserve_objcopy && isset($this->file_id)) { - self::$cleaned_ids[$this->file_id] = true; - // remove all temporary files - if ($handle = @opendir(K_PATH_CACHE)) { - while ( false !== ( $file_name = readdir( $handle ) ) ) { - if (strpos($file_name, '__tcpdf_'.$this->file_id.'_') === 0) { - unlink(K_PATH_CACHE.$file_name); - } - } - closedir($handle); - } - if (isset($this->imagekeys)) { - foreach($this->imagekeys as $file) { - if (strpos($file, K_PATH_CACHE) === 0 && TCPDF_STATIC::file_exists($file)) { - @unlink($file); - } - } - } - } - $preserve = array( - 'file_id', - 'state', - 'bufferlen', - 'buffer', - 'cached_files', - 'imagekeys', - 'sign', - 'signature_data', - 'signature_max_length', - 'byterange_string', - 'tsa_timestamp', - 'tsa_data' - ); - foreach (array_keys(get_object_vars($this)) as $val) { - if ($destroyall OR !in_array($val, $preserve)) { - if ((!$preserve_objcopy OR ($val != 'objcopy')) AND ($val != 'file_id') AND isset($this->$val)) { - unset($this->$val); - } - } - } - } - - /** - * Check for locale-related bug - * @protected - */ - protected function _dochecks() { - //Check for locale-related bug - if (1.1 == 1) { - $this->Error('Don\'t alter the locale before including class file'); - } - //Check for decimal separator - if (sprintf('%.1F', 1.0) != '1.0') { - setlocale(LC_NUMERIC, 'C'); - } - } - - /** - * Return an array containing variations for the basic page number alias. - * @param string $a Base alias. - * @return array of page number aliases - * @protected - */ - protected function getInternalPageNumberAliases($a= '') { - $alias = array(); - // build array of Unicode + ASCII variants (the order is important) - $alias = array('u' => array(), 'a' => array()); - $u = '{'.$a.'}'; - $alias['u'][] = TCPDF_STATIC::_escape($u); - if ($this->isunicode) { - $alias['u'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::UTF8ToLatin1($u, $this->isunicode, $this->CurrentFont)); - $alias['u'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::utf8StrRev($u, false, $this->tmprtl, $this->isunicode, $this->CurrentFont)); - $alias['a'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::UTF8ToLatin1($a, $this->isunicode, $this->CurrentFont)); - $alias['a'][] = TCPDF_STATIC::_escape(TCPDF_FONTS::utf8StrRev($a, false, $this->tmprtl, $this->isunicode, $this->CurrentFont)); - } - $alias['a'][] = TCPDF_STATIC::_escape($a); - return $alias; - } - - /** - * Return an array containing all internal page aliases. - * @return array of page number aliases - * @protected - */ - protected function getAllInternalPageNumberAliases() { - $basic_alias = array(TCPDF_STATIC::$alias_tot_pages, TCPDF_STATIC::$alias_num_page, TCPDF_STATIC::$alias_group_tot_pages, TCPDF_STATIC::$alias_group_num_page, TCPDF_STATIC::$alias_right_shift); - $pnalias = array(); - foreach($basic_alias as $k => $a) { - $pnalias[$k] = $this->getInternalPageNumberAliases($a); - } - return $pnalias; - } - - /** - * Replace right shift page number aliases with spaces to correct right alignment. - * This works perfectly only when using monospaced fonts. - * @param string $page Page content. - * @param array $aliases Array of page aliases. - * @param int $diff initial difference to add. - * @return string replaced page content. - * @protected - */ - protected function replaceRightShiftPageNumAliases($page, $aliases, $diff) { - foreach ($aliases as $type => $alias) { - foreach ($alias as $a) { - // find position of compensation factor - $startnum = (strpos($a, ':') + 1); - $a = substr($a, 0, $startnum); - if (($pos = strpos($page, $a)) !== false) { - // end of alias - $endnum = strpos($page, '}', $pos); - // string to be replaced - $aa = substr($page, $pos, ($endnum - $pos + 1)); - // get compensation factor - $ratio = substr($page, ($pos + $startnum), ($endnum - $pos - $startnum)); - $ratio = preg_replace('/[^0-9\.]/', '', $ratio); - $ratio = floatval($ratio); - if ($type == 'u') { - $chrdiff = floor(($diff + 12) * $ratio); - $shift = str_repeat(' ', $chrdiff); - $shift = TCPDF_FONTS::UTF8ToUTF16BE($shift, false, $this->isunicode, $this->CurrentFont); - } else { - $chrdiff = floor(($diff + 11) * $ratio); - $shift = str_repeat(' ', $chrdiff); - } - $page = str_replace($aa, $shift, $page); - } - } - } - return $page; - } - - /** - * Set page boxes to be included on page descriptions. - * @param array $boxes Array of page boxes to set on document: ('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox'). - * @protected - */ - protected function setPageBoxTypes($boxes) { - $this->page_boxes = array(); - foreach ($boxes as $box) { - if (in_array($box, TCPDF_STATIC::$pageboxes)) { - $this->page_boxes[] = $box; - } - } - } - - /** - * Output pages (and replace page number aliases). - * @protected - */ - protected function _putpages() { - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - // get internal aliases for page numbers - $pnalias = $this->getAllInternalPageNumberAliases(); - $num_pages = $this->numpages; - $ptpa = TCPDF_STATIC::formatPageNumber(($this->starting_page_number + $num_pages - 1)); - $ptpu = TCPDF_FONTS::UTF8ToUTF16BE($ptpa, false, $this->isunicode, $this->CurrentFont); - $ptp_num_chars = $this->GetNumChars($ptpa); - $pagegroupnum = 0; - $groupnum = 0; - $ptgu = 1; - $ptga = 1; - $ptg_num_chars = 1; - for ($n = 1; $n <= $num_pages; ++$n) { - // get current page - $temppage = $this->getPageBuffer($n); - $pagelen = strlen($temppage); - // set replacements for total pages number - $pnpa = TCPDF_STATIC::formatPageNumber(($this->starting_page_number + $n - 1)); - $pnpu = TCPDF_FONTS::UTF8ToUTF16BE($pnpa, false, $this->isunicode, $this->CurrentFont); - $pnp_num_chars = $this->GetNumChars($pnpa); - $pdiff = 0; // difference used for right shift alignment of page numbers - $gdiff = 0; // difference used for right shift alignment of page group numbers - if (!empty($this->pagegroups)) { - if (isset($this->newpagegroup[$n])) { - $pagegroupnum = 0; - ++$groupnum; - $ptga = TCPDF_STATIC::formatPageNumber($this->pagegroups[$groupnum]); - $ptgu = TCPDF_FONTS::UTF8ToUTF16BE($ptga, false, $this->isunicode, $this->CurrentFont); - $ptg_num_chars = $this->GetNumChars($ptga); - } - ++$pagegroupnum; - $pnga = TCPDF_STATIC::formatPageNumber($pagegroupnum); - $pngu = TCPDF_FONTS::UTF8ToUTF16BE($pnga, false, $this->isunicode, $this->CurrentFont); - $png_num_chars = $this->GetNumChars($pnga); - // replace page numbers - $replace = array(); - $replace[] = array($ptgu, $ptg_num_chars, 9, $pnalias[2]['u']); - $replace[] = array($ptga, $ptg_num_chars, 7, $pnalias[2]['a']); - $replace[] = array($pngu, $png_num_chars, 9, $pnalias[3]['u']); - $replace[] = array($pnga, $png_num_chars, 7, $pnalias[3]['a']); - list($temppage, $gdiff) = TCPDF_STATIC::replacePageNumAliases($temppage, $replace, $gdiff); - } - // replace page numbers - $replace = array(); - $replace[] = array($ptpu, $ptp_num_chars, 9, $pnalias[0]['u']); - $replace[] = array($ptpa, $ptp_num_chars, 7, $pnalias[0]['a']); - $replace[] = array($pnpu, $pnp_num_chars, 9, $pnalias[1]['u']); - $replace[] = array($pnpa, $pnp_num_chars, 7, $pnalias[1]['a']); - list($temppage, $pdiff) = TCPDF_STATIC::replacePageNumAliases($temppage, $replace, $pdiff); - // replace right shift alias - $temppage = $this->replaceRightShiftPageNumAliases($temppage, $pnalias[4], max($pdiff, $gdiff)); - // replace EPS marker - $temppage = str_replace($this->epsmarker, '', $temppage); - //Page - $this->page_obj_id[$n] = $this->_newobj(); - $out = '<<'; - $out .= ' /Type /Page'; - $out .= ' /Parent 1 0 R'; - if (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A')) { - $out .= ' /LastModified '.$this->_datestring(0, $this->doc_modification_timestamp); - } - $out .= ' /Resources 2 0 R'; - foreach ($this->page_boxes as $box) { - $out .= ' /'.$box; - $out .= sprintf(' [%F %F %F %F]', $this->pagedim[$n][$box]['llx'], $this->pagedim[$n][$box]['lly'], $this->pagedim[$n][$box]['urx'], $this->pagedim[$n][$box]['ury']); - } - if (isset($this->pagedim[$n]['BoxColorInfo']) AND !empty($this->pagedim[$n]['BoxColorInfo'])) { - $out .= ' /BoxColorInfo <<'; - foreach ($this->page_boxes as $box) { - if (isset($this->pagedim[$n]['BoxColorInfo'][$box])) { - $out .= ' /'.$box.' <<'; - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['C'])) { - $color = $this->pagedim[$n]['BoxColorInfo'][$box]['C']; - $out .= ' /C ['; - $out .= sprintf(' %F %F %F', ($color[0] / 255), ($color[1] / 255), ($color[2] / 255)); - $out .= ' ]'; - } - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['W'])) { - $out .= ' /W '.($this->pagedim[$n]['BoxColorInfo'][$box]['W'] * $this->k); - } - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['S'])) { - $out .= ' /S /'.$this->pagedim[$n]['BoxColorInfo'][$box]['S']; - } - if (isset($this->pagedim[$n]['BoxColorInfo'][$box]['D'])) { - $dashes = $this->pagedim[$n]['BoxColorInfo'][$box]['D']; - $out .= ' /D ['; - foreach ($dashes as $dash) { - $out .= sprintf(' %F', ($dash * $this->k)); - } - $out .= ' ]'; - } - $out .= ' >>'; - } - } - $out .= ' >>'; - } - $out .= ' /Contents '.($this->n + 1).' 0 R'; - $out .= ' /Rotate '.$this->pagedim[$n]['Rotate']; - if (!$this->pdfa_mode || $this->pdfa_version >= 2) { - $out .= ' /Group << /Type /Group /S /Transparency /CS /DeviceRGB >>'; - } - if (isset($this->pagedim[$n]['trans']) AND !empty($this->pagedim[$n]['trans'])) { - // page transitions - if (isset($this->pagedim[$n]['trans']['Dur'])) { - $out .= ' /Dur '.$this->pagedim[$n]['trans']['Dur']; - } - $out .= ' /Trans <<'; - $out .= ' /Type /Trans'; - if (isset($this->pagedim[$n]['trans']['S'])) { - $out .= ' /S /'.$this->pagedim[$n]['trans']['S']; - } - if (isset($this->pagedim[$n]['trans']['D'])) { - $out .= ' /D '.$this->pagedim[$n]['trans']['D']; - } - if (isset($this->pagedim[$n]['trans']['Dm'])) { - $out .= ' /Dm /'.$this->pagedim[$n]['trans']['Dm']; - } - if (isset($this->pagedim[$n]['trans']['M'])) { - $out .= ' /M /'.$this->pagedim[$n]['trans']['M']; - } - if (isset($this->pagedim[$n]['trans']['Di'])) { - $out .= ' /Di '.$this->pagedim[$n]['trans']['Di']; - } - if (isset($this->pagedim[$n]['trans']['SS'])) { - $out .= ' /SS '.$this->pagedim[$n]['trans']['SS']; - } - if (isset($this->pagedim[$n]['trans']['B'])) { - $out .= ' /B '.$this->pagedim[$n]['trans']['B']; - } - $out .= ' >>'; - } - $out .= $this->_getannotsrefs($n); - $out .= ' /PZ '.$this->pagedim[$n]['PZ']; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - //Page content - $p = ($this->compress) ? gzcompress($temppage) : $temppage; - $this->_newobj(); - $p = $this->_getrawstream($p); - $this->_out('<<'.$filter.'/Length '.strlen($p).'>> stream'."\n".$p."\n".'endstream'."\n".'endobj'); - } - //Pages root - $out = $this->_getobj(1)."\n"; - $out .= '<< /Type /Pages /Kids ['; - foreach($this->page_obj_id as $page_obj) { - $out .= ' '.$page_obj.' 0 R'; - } - $out .= ' ] /Count '.$num_pages.' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Get references to page annotations. - * @param int $n page number - * @return string - * @protected - * @author Nicola Asuni - * @since 5.0.010 (2010-05-17) - */ - protected function _getannotsrefs($n) { - if (!(isset($this->PageAnnots[$n]) OR ($this->sign AND isset($this->signature_data['cert_type'])))) { - return ''; - } - $out = ' /Annots ['; - if (isset($this->PageAnnots[$n])) { - foreach ($this->PageAnnots[$n] as $key => $val) { - if (!in_array($val['n'], $this->radio_groups)) { - $out .= ' '.$val['n'].' 0 R'; - } - } - // add radiobutton groups - if (isset($this->radiobutton_groups[$n])) { - foreach ($this->radiobutton_groups[$n] as $key => $data) { - if (isset($data['n'])) { - $out .= ' '.$data['n'].' 0 R'; - } - } - } - } - if ($this->sign AND ($n == $this->signature_appearance['page']) AND isset($this->signature_data['cert_type'])) { - // set reference for signature object - $out .= ' '.$this->sig_obj_id.' 0 R'; - } - if (!empty($this->empty_signature_appearance)) { - foreach ($this->empty_signature_appearance as $esa) { - if ($esa['page'] == $n) { - // set reference for empty signature objects - $out .= ' '.$esa['objid'].' 0 R'; - } - } - } - $out .= ' ]'; - return $out; - } - - /** - * Output annotations objects for all pages. - * !!! THIS METHOD IS NOT YET COMPLETED !!! - * See section 12.5 of PDF 32000_2008 reference. - * @protected - * @author Nicola Asuni - * @since 4.0.018 (2008-08-06) - */ - protected function _putannotsobjs() { - // reset object counter - for ($n=1; $n <= $this->numpages; ++$n) { - if (isset($this->PageAnnots[$n])) { - // set page annotations - foreach ($this->PageAnnots[$n] as $key => $pl) { - $annot_obj_id = $this->PageAnnots[$n][$key]['n']; - // create annotation object for grouping radiobuttons - if (isset($this->radiobutton_groups[$n][$pl['txt']]) AND is_array($this->radiobutton_groups[$n][$pl['txt']])) { - $radio_button_obj_id = $this->radiobutton_groups[$n][$pl['txt']]['n']; - $annots = '<<'; - $annots .= ' /Type /Annot'; - $annots .= ' /Subtype /Widget'; - $annots .= ' /Rect [0 0 0 0]'; - if ($this->radiobutton_groups[$n][$pl['txt']]['#readonly#']) { - // read only - $annots .= ' /F 68'; - $annots .= ' /Ff 49153'; - } else { - $annots .= ' /F 4'; // default print for PDF/A - $annots .= ' /Ff 49152'; - } - $annots .= ' /T '.$this->_datastring($pl['txt'], $radio_button_obj_id); - if (isset($pl['opt']['tu']) AND is_string($pl['opt']['tu'])) { - $annots .= ' /TU '.$this->_datastring($pl['opt']['tu'], $radio_button_obj_id); - } - $annots .= ' /FT /Btn'; - $annots .= ' /Kids ['; - $defval = ''; - foreach ($this->radiobutton_groups[$n][$pl['txt']] as $key => $data) { - if (isset($data['kid'])) { - $annots .= ' '.$data['kid'].' 0 R'; - if ($data['def'] !== 'Off') { - $defval = $data['def']; - } - } - } - $annots .= ' ]'; - if (!empty($defval)) { - $annots .= ' /V /'.$defval; - } - $annots .= ' >>'; - $this->_out($this->_getobj($radio_button_obj_id)."\n".$annots."\n".'endobj'); - $this->form_obj_id[] = $radio_button_obj_id; - // store object id to be used on Parent entry of Kids - $this->radiobutton_groups[$n][$pl['txt']] = $radio_button_obj_id; - } - $formfield = false; - $pl['opt'] = array_change_key_case($pl['opt'], CASE_LOWER); - $a = $pl['x'] * $this->k; - $b = $this->pagedim[$n]['h'] - (($pl['y'] + $pl['h']) * $this->k); - $c = $pl['w'] * $this->k; - $d = $pl['h'] * $this->k; - $rect = sprintf('%F %F %F %F', $a, $b, $a+$c, $b+$d); - // create new annotation object - $annots = '<_textstring($pl['txt'], $annot_obj_id); - } - $annots .= ' /P '.$this->page_obj_id[$n].' 0 R'; - $annots .= ' /NM '.$this->_datastring(sprintf('%04u-%04u', $n, $key), $annot_obj_id); - $annots .= ' /M '.$this->_datestring($annot_obj_id, $this->doc_modification_timestamp); - if (isset($pl['opt']['f'])) { - $fval = 0; - if (is_array($pl['opt']['f'])) { - foreach ($pl['opt']['f'] as $f) { - switch (strtolower($f)) { - case 'invisible': { - $fval += 1 << 0; - break; - } - case 'hidden': { - $fval += 1 << 1; - break; - } - case 'print': { - $fval += 1 << 2; - break; - } - case 'nozoom': { - $fval += 1 << 3; - break; - } - case 'norotate': { - $fval += 1 << 4; - break; - } - case 'noview': { - $fval += 1 << 5; - break; - } - case 'readonly': { - $fval += 1 << 6; - break; - } - case 'locked': { - $fval += 1 << 8; - break; - } - case 'togglenoview': { - $fval += 1 << 9; - break; - } - case 'lockedcontents': { - $fval += 1 << 10; - break; - } - default: { - break; - } - } - } - } else { - $fval = intval($pl['opt']['f']); - } - } else { - $fval = 4; - } - if ($this->pdfa_mode) { - // force print flag for PDF/A mode - $fval |= 4; - } - $annots .= ' /F '.intval($fval); - if (isset($pl['opt']['as']) AND is_string($pl['opt']['as'])) { - $annots .= ' /AS /'.$pl['opt']['as']; - } - if (isset($pl['opt']['ap'])) { - // appearance stream - $annots .= ' /AP <<'; - if (is_array($pl['opt']['ap'])) { - foreach ($pl['opt']['ap'] as $apmode => $apdef) { - // $apmode can be: n = normal; r = rollover; d = down; - $annots .= ' /'.strtoupper($apmode); - if (is_array($apdef)) { - $annots .= ' <<'; - foreach ($apdef as $apstate => $stream) { - // reference to XObject that define the appearance for this mode-state - $apsobjid = $this->_putAPXObject($c, $d, $stream); - $annots .= ' /'.$apstate.' '.$apsobjid.' 0 R'; - } - $annots .= ' >>'; - } else { - // reference to XObject that define the appearance for this mode - $apsobjid = $this->_putAPXObject($c, $d, $apdef); - $annots .= ' '.$apsobjid.' 0 R'; - } - } - } else { - $annots .= $pl['opt']['ap']; - } - $annots .= ' >>'; - } - if (isset($pl['opt']['bs']) AND (is_array($pl['opt']['bs']))) { - $annots .= ' /BS <<'; - $annots .= ' /Type /Border'; - if (isset($pl['opt']['bs']['w'])) { - $annots .= ' /W '.intval($pl['opt']['bs']['w']); - } - $bstyles = array('S', 'D', 'B', 'I', 'U'); - if (isset($pl['opt']['bs']['s']) AND in_array($pl['opt']['bs']['s'], $bstyles)) { - $annots .= ' /S /'.$pl['opt']['bs']['s']; - } - if (isset($pl['opt']['bs']['d']) AND (is_array($pl['opt']['bs']['d']))) { - $annots .= ' /D ['; - foreach ($pl['opt']['bs']['d'] as $cord) { - $annots .= ' '.intval($cord); - } - $annots .= ']'; - } - $annots .= ' >>'; - } else { - $annots .= ' /Border ['; - if (isset($pl['opt']['border']) AND (count($pl['opt']['border']) >= 3)) { - $annots .= intval($pl['opt']['border'][0]).' '; - $annots .= intval($pl['opt']['border'][1]).' '; - $annots .= intval($pl['opt']['border'][2]); - if (isset($pl['opt']['border'][3]) AND is_array($pl['opt']['border'][3])) { - $annots .= ' ['; - foreach ($pl['opt']['border'][3] as $dash) { - $annots .= intval($dash).' '; - } - $annots .= ']'; - } - } else { - $annots .= '0 0 0'; - } - $annots .= ']'; - } - if (isset($pl['opt']['be']) AND (is_array($pl['opt']['be']))) { - $annots .= ' /BE <<'; - $bstyles = array('S', 'C'); - if (isset($pl['opt']['be']['s']) AND in_array($pl['opt']['be']['s'], $bstyles)) { - $annots .= ' /S /'.$pl['opt']['bs']['s']; - } else { - $annots .= ' /S /S'; - } - if (isset($pl['opt']['be']['i']) AND ($pl['opt']['be']['i'] >= 0) AND ($pl['opt']['be']['i'] <= 2)) { - $annots .= ' /I '.sprintf(' %F', $pl['opt']['be']['i']); - } - $annots .= '>>'; - } - if (isset($pl['opt']['c']) AND (is_array($pl['opt']['c'])) AND !empty($pl['opt']['c'])) { - $annots .= ' /C '.TCPDF_COLORS::getColorStringFromArray($pl['opt']['c']); - } - //$annots .= ' /StructParent '; - //$annots .= ' /OC '; - $markups = array('text', 'freetext', 'line', 'square', 'circle', 'polygon', 'polyline', 'highlight', 'underline', 'squiggly', 'strikeout', 'stamp', 'caret', 'ink', 'fileattachment', 'sound'); - if (in_array(strtolower($pl['opt']['subtype']), $markups)) { - // this is a markup type - if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) { - $annots .= ' /T '.$this->_textstring($pl['opt']['t'], $annot_obj_id); - } - //$annots .= ' /Popup '; - if (isset($pl['opt']['ca'])) { - $annots .= ' /CA '.sprintf('%F', floatval($pl['opt']['ca'])); - } - if (isset($pl['opt']['rc'])) { - $annots .= ' /RC '.$this->_textstring($pl['opt']['rc'], $annot_obj_id); - } - $annots .= ' /CreationDate '.$this->_datestring($annot_obj_id, $this->doc_creation_timestamp); - //$annots .= ' /IRT '; - if (isset($pl['opt']['subj'])) { - $annots .= ' /Subj '.$this->_textstring($pl['opt']['subj'], $annot_obj_id); - } - //$annots .= ' /RT '; - //$annots .= ' /IT '; - //$annots .= ' /ExData '; - } - $lineendings = array('Square', 'Circle', 'Diamond', 'OpenArrow', 'ClosedArrow', 'None', 'Butt', 'ROpenArrow', 'RClosedArrow', 'Slash'); - // Annotation types - switch (strtolower($pl['opt']['subtype'])) { - case 'text': { - if (isset($pl['opt']['open'])) { - $annots .= ' /Open '. (strtolower($pl['opt']['open']) == 'true' ? 'true' : 'false'); - } - $iconsapp = array('Comment', 'Help', 'Insert', 'Key', 'NewParagraph', 'Note', 'Paragraph'); - if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) { - $annots .= ' /Name /'.$pl['opt']['name']; - } else { - $annots .= ' /Name /Note'; - } - $hasStateModel = isset($pl['opt']['statemodel']); - $hasState = isset($pl['opt']['state']); - $statemodels = array('Marked', 'Review'); - if (!$hasStateModel && !$hasState) { - break; - } - if ($hasStateModel AND in_array($pl['opt']['statemodel'], $statemodels)) { - $annots .= ' /StateModel /'.$pl['opt']['statemodel']; - } else { - $pl['opt']['statemodel'] = 'Marked'; - $annots .= ' /StateModel /'.$pl['opt']['statemodel']; - } - if ($pl['opt']['statemodel'] == 'Marked') { - $states = array('Accepted', 'Unmarked'); - } else { - $states = array('Accepted', 'Rejected', 'Cancelled', 'Completed', 'None'); - } - if ($hasState AND in_array($pl['opt']['state'], $states)) { - $annots .= ' /State /'.$pl['opt']['state']; - } else { - if ($pl['opt']['statemodel'] == 'Marked') { - $annots .= ' /State /Unmarked'; - } else { - $annots .= ' /State /None'; - } - } - break; - } - case 'link': { - if (is_string($pl['txt']) && !empty($pl['txt'])) { - if ($pl['txt'][0] == '#') { - // internal destination - $annots .= ' /A <>'; - } elseif ($pl['txt'][0] == '%') { - // embedded PDF file - $filename = basename(substr($pl['txt'], 1)); - $annots .= ' /A << /S /GoToE /D [0 /Fit] /NewWindow true /T << /R /C /P '.($n - 1).' /A '.$this->embeddedfiles[$filename]['a'].' >> >>'; - } elseif ($pl['txt'][0] == '*') { - // embedded generic file - $filename = basename(substr($pl['txt'], 1)); - $jsa = 'var D=event.target.doc;var MyData=D.dataObjects;for (var i in MyData) if (MyData[i].path=="'.$filename.'") D.exportDataObject( { cName : MyData[i].name, nLaunch : 2});'; - $annots .= ' /A << /S /JavaScript /JS '.$this->_textstring($jsa, $annot_obj_id).'>>'; - } else { - $parsedUrl = parse_url($pl['txt']); - if (empty($parsedUrl['scheme']) AND (!empty($parsedUrl['path']) && strtolower(substr($parsedUrl['path'], -4)) == '.pdf')) { - // relative link to a PDF file - $dest = '[0 /Fit]'; // default page 0 - if (!empty($parsedUrl['fragment'])) { - // check for named destination - $tmp = explode('=', $parsedUrl['fragment']); - $dest = '('.((count($tmp) == 2) ? $tmp[1] : $tmp[0]).')'; - } - $annots .= ' /A <_datastring($this->unhtmlentities($parsedUrl['path']), $annot_obj_id).' /NewWindow true>>'; - } else { - // external URI link - $annots .= ' /A <_datastring($this->unhtmlentities($pl['txt']), $annot_obj_id).'>>'; - } - } - } elseif (isset($this->links[$pl['txt']])) { - // internal link ID - $l = $this->links[$pl['txt']]; - if (isset($this->page_obj_id[($l['p'])])) { - $annots .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l['p'])], ($this->pagedim[$l['p']]['h'] - ($l['y'] * $this->k))); - } - } - $hmodes = array('N', 'I', 'O', 'P'); - if (isset($pl['opt']['h']) AND in_array($pl['opt']['h'], $hmodes)) { - $annots .= ' /H /'.$pl['opt']['h']; - } else { - $annots .= ' /H /I'; - } - //$annots .= ' /PA '; - //$annots .= ' /Quadpoints '; - break; - } - case 'freetext': { - if (isset($pl['opt']['da']) AND !empty($pl['opt']['da'])) { - $annots .= ' /DA ('.$pl['opt']['da'].')'; - } - if (isset($pl['opt']['q']) AND ($pl['opt']['q'] >= 0) AND ($pl['opt']['q'] <= 2)) { - $annots .= ' /Q '.intval($pl['opt']['q']); - } - if (isset($pl['opt']['rc'])) { - $annots .= ' /RC '.$this->_textstring($pl['opt']['rc'], $annot_obj_id); - } - if (isset($pl['opt']['ds'])) { - $annots .= ' /DS '.$this->_textstring($pl['opt']['ds'], $annot_obj_id); - } - if (isset($pl['opt']['cl']) AND is_array($pl['opt']['cl'])) { - $annots .= ' /CL ['; - foreach ($pl['opt']['cl'] as $cl) { - $annots .= sprintf('%F ', $cl * $this->k); - } - $annots .= ']'; - } - $tfit = array('FreeText', 'FreeTextCallout', 'FreeTextTypeWriter'); - if (isset($pl['opt']['it']) AND in_array($pl['opt']['it'], $tfit)) { - $annots .= ' /IT /'.$pl['opt']['it']; - } - if (isset($pl['opt']['rd']) AND is_array($pl['opt']['rd'])) { - $l = $pl['opt']['rd'][0] * $this->k; - $r = $pl['opt']['rd'][1] * $this->k; - $t = $pl['opt']['rd'][2] * $this->k; - $b = $pl['opt']['rd'][3] * $this->k; - $annots .= ' /RD ['.sprintf('%F %F %F %F', $l, $r, $t, $b).']'; - } - if (isset($pl['opt']['le']) AND in_array($pl['opt']['le'], $lineendings)) { - $annots .= ' /LE /'.$pl['opt']['le']; - } - break; - } - case 'line': { - break; - } - case 'square': { - break; - } - case 'circle': { - break; - } - case 'polygon': { - break; - } - case 'polyline': { - break; - } - case 'highlight': { - break; - } - case 'underline': { - break; - } - case 'squiggly': { - break; - } - case 'strikeout': { - break; - } - case 'stamp': { - break; - } - case 'caret': { - break; - } - case 'ink': { - break; - } - case 'popup': { - break; - } - case 'fileattachment': { - if ($this->pdfa_mode && $this->pdfa_version != 3) { - // embedded files are not allowed in PDF/A mode version 1 and 2 - break; - } - if (!isset($pl['opt']['fs'])) { - break; - } - $filename = basename($pl['opt']['fs']); - if (isset($this->embeddedfiles[$filename]['f'])) { - $annots .= ' /FS '.$this->embeddedfiles[$filename]['f'].' 0 R'; - $iconsapp = array('Graph', 'Paperclip', 'PushPin', 'Tag'); - if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) { - $annots .= ' /Name /'.$pl['opt']['name']; - } else { - $annots .= ' /Name /PushPin'; - } - // index (zero-based) of the annotation in the Annots array of this page - $this->embeddedfiles[$filename]['a'] = $key; - } - break; - } - case 'sound': { - if (!isset($pl['opt']['fs'])) { - break; - } - $filename = basename($pl['opt']['fs']); - if (isset($this->embeddedfiles[$filename]['f'])) { - // ... TO BE COMPLETED ... - // /R /C /B /E /CO /CP - $annots .= ' /Sound '.$this->embeddedfiles[$filename]['f'].' 0 R'; - $iconsapp = array('Speaker', 'Mic'); - if (isset($pl['opt']['name']) AND in_array($pl['opt']['name'], $iconsapp)) { - $annots .= ' /Name /'.$pl['opt']['name']; - } else { - $annots .= ' /Name /Speaker'; - } - } - break; - } - case 'movie': { - break; - } - case 'widget': { - $hmode = array('N', 'I', 'O', 'P', 'T'); - if (isset($pl['opt']['h']) AND in_array($pl['opt']['h'], $hmode)) { - $annots .= ' /H /'.$pl['opt']['h']; - } - if (isset($pl['opt']['mk']) AND (is_array($pl['opt']['mk'])) AND !empty($pl['opt']['mk'])) { - $annots .= ' /MK <<'; - if (isset($pl['opt']['mk']['r'])) { - $annots .= ' /R '.$pl['opt']['mk']['r']; - } - if (isset($pl['opt']['mk']['bc']) AND (is_array($pl['opt']['mk']['bc']))) { - $annots .= ' /BC '.TCPDF_COLORS::getColorStringFromArray($pl['opt']['mk']['bc']); - } - if (isset($pl['opt']['mk']['bg']) AND (is_array($pl['opt']['mk']['bg']))) { - $annots .= ' /BG '.TCPDF_COLORS::getColorStringFromArray($pl['opt']['mk']['bg']); - } - if (isset($pl['opt']['mk']['ca'])) { - $annots .= ' /CA '.$pl['opt']['mk']['ca']; - } - if (isset($pl['opt']['mk']['rc'])) { - $annots .= ' /RC '.$pl['opt']['mk']['rc']; - } - if (isset($pl['opt']['mk']['ac'])) { - $annots .= ' /AC '.$pl['opt']['mk']['ac']; - } - if (isset($pl['opt']['mk']['i'])) { - $info = $this->getImageBuffer($pl['opt']['mk']['i']); - if ($info !== false) { - $annots .= ' /I '.$info['n'].' 0 R'; - } - } - if (isset($pl['opt']['mk']['ri'])) { - $info = $this->getImageBuffer($pl['opt']['mk']['ri']); - if ($info !== false) { - $annots .= ' /RI '.$info['n'].' 0 R'; - } - } - if (isset($pl['opt']['mk']['ix'])) { - $info = $this->getImageBuffer($pl['opt']['mk']['ix']); - if ($info !== false) { - $annots .= ' /IX '.$info['n'].' 0 R'; - } - } - if (isset($pl['opt']['mk']['if']) AND (is_array($pl['opt']['mk']['if'])) AND !empty($pl['opt']['mk']['if'])) { - $annots .= ' /IF <<'; - $if_sw = array('A', 'B', 'S', 'N'); - if (isset($pl['opt']['mk']['if']['sw']) AND in_array($pl['opt']['mk']['if']['sw'], $if_sw)) { - $annots .= ' /SW /'.$pl['opt']['mk']['if']['sw']; - } - $if_s = array('A', 'P'); - if (isset($pl['opt']['mk']['if']['s']) AND in_array($pl['opt']['mk']['if']['s'], $if_s)) { - $annots .= ' /S /'.$pl['opt']['mk']['if']['s']; - } - if (isset($pl['opt']['mk']['if']['a']) AND (is_array($pl['opt']['mk']['if']['a'])) AND !empty($pl['opt']['mk']['if']['a'])) { - $annots .= sprintf(' /A [%F %F]', $pl['opt']['mk']['if']['a'][0], $pl['opt']['mk']['if']['a'][1]); - } - if (isset($pl['opt']['mk']['if']['fb']) AND ($pl['opt']['mk']['if']['fb'])) { - $annots .= ' /FB true'; - } - $annots .= '>>'; - } - if (isset($pl['opt']['mk']['tp']) AND ($pl['opt']['mk']['tp'] >= 0) AND ($pl['opt']['mk']['tp'] <= 6)) { - $annots .= ' /TP '.intval($pl['opt']['mk']['tp']); - } - $annots .= '>>'; - } // end MK - // --- Entries for field dictionaries --- - if (isset($this->radiobutton_groups[$n][$pl['txt']])) { - // set parent - $annots .= ' /Parent '.$this->radiobutton_groups[$n][$pl['txt']].' 0 R'; - } - if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) { - $annots .= ' /T '.$this->_datastring($pl['opt']['t'], $annot_obj_id); - } - if (isset($pl['opt']['tu']) AND is_string($pl['opt']['tu'])) { - $annots .= ' /TU '.$this->_datastring($pl['opt']['tu'], $annot_obj_id); - } - if (isset($pl['opt']['tm']) AND is_string($pl['opt']['tm'])) { - $annots .= ' /TM '.$this->_datastring($pl['opt']['tm'], $annot_obj_id); - } - if (isset($pl['opt']['ff'])) { - if (is_array($pl['opt']['ff'])) { - // array of bit settings - $flag = 0; - foreach($pl['opt']['ff'] as $val) { - $flag += 1 << ($val - 1); - } - } else { - $flag = intval($pl['opt']['ff']); - } - $annots .= ' /Ff '.$flag; - } - if (isset($pl['opt']['maxlen'])) { - $annots .= ' /MaxLen '.intval($pl['opt']['maxlen']); - } - if (isset($pl['opt']['v'])) { - $annots .= ' /V'; - if (is_array($pl['opt']['v'])) { - foreach ($pl['opt']['v'] AS $optval) { - if (is_float($optval)) { - $optval = sprintf('%F', $optval); - } - $annots .= ' '.$optval; - } - } else { - $annots .= ' '.$this->_textstring($pl['opt']['v'], $annot_obj_id); - } - } - if (isset($pl['opt']['dv'])) { - $annots .= ' /DV'; - if (is_array($pl['opt']['dv'])) { - foreach ($pl['opt']['dv'] AS $optval) { - if (is_float($optval)) { - $optval = sprintf('%F', $optval); - } - $annots .= ' '.$optval; - } - } else { - $annots .= ' '.$this->_textstring($pl['opt']['dv'], $annot_obj_id); - } - } - if (isset($pl['opt']['rv'])) { - $annots .= ' /RV'; - if (is_array($pl['opt']['rv'])) { - foreach ($pl['opt']['rv'] AS $optval) { - if (is_float($optval)) { - $optval = sprintf('%F', $optval); - } - $annots .= ' '.$optval; - } - } else { - $annots .= ' '.$this->_textstring($pl['opt']['rv'], $annot_obj_id); - } - } - if (isset($pl['opt']['a']) AND !empty($pl['opt']['a'])) { - $annots .= ' /A << '.$pl['opt']['a'].' >>'; - } - if (isset($pl['opt']['aa']) AND !empty($pl['opt']['aa'])) { - $annots .= ' /AA << '.$pl['opt']['aa'].' >>'; - } - if (isset($pl['opt']['da']) AND !empty($pl['opt']['da'])) { - $annots .= ' /DA ('.$pl['opt']['da'].')'; - } - if (isset($pl['opt']['q']) AND ($pl['opt']['q'] >= 0) AND ($pl['opt']['q'] <= 2)) { - $annots .= ' /Q '.intval($pl['opt']['q']); - } - if (isset($pl['opt']['opt']) AND (is_array($pl['opt']['opt'])) AND !empty($pl['opt']['opt'])) { - $annots .= ' /Opt ['; - foreach($pl['opt']['opt'] AS $copt) { - if (is_array($copt)) { - $annots .= ' ['.$this->_textstring($copt[0], $annot_obj_id).' '.$this->_textstring($copt[1], $annot_obj_id).']'; - } else { - $annots .= ' '.$this->_textstring($copt, $annot_obj_id); - } - } - $annots .= ']'; - } - if (isset($pl['opt']['ti'])) { - $annots .= ' /TI '.intval($pl['opt']['ti']); - } - if (isset($pl['opt']['i']) AND (is_array($pl['opt']['i'])) AND !empty($pl['opt']['i'])) { - $annots .= ' /I ['; - foreach($pl['opt']['i'] AS $copt) { - $annots .= intval($copt).' '; - } - $annots .= ']'; - } - break; - } - case 'screen': { - break; - } - case 'printermark': { - break; - } - case 'trapnet': { - break; - } - case 'watermark': { - break; - } - case '3d': { - break; - } - default: { - break; - } - } - $annots .= '>>'; - // create new annotation object - $this->_out($this->_getobj($annot_obj_id)."\n".$annots."\n".'endobj'); - if ($formfield AND !isset($this->radiobutton_groups[$n][$pl['txt']])) { - // store reference of form object - $this->form_obj_id[] = $annot_obj_id; - } - } - } - } // end for each page - } - - /** - * Put appearance streams XObject used to define annotation's appearance states. - * @param int $w annotation width - * @param int $h annotation height - * @param string $stream appearance stream - * @return int object ID - * @protected - * @since 4.8.001 (2009-09-09) - */ - protected function _putAPXObject($w=0, $h=0, $stream='') { - $stream = trim($stream); - $out = $this->_getobj()."\n"; - $this->xobjects['AX'.$this->n] = array('n' => $this->n); - $out .= '<<'; - $out .= ' /Type /XObject'; - $out .= ' /Subtype /Form'; - $out .= ' /FormType 1'; - if ($this->compress) { - $stream = gzcompress($stream); - $out .= ' /Filter /FlateDecode'; - } - $rect = sprintf('%F %F', $w, $h); - $out .= ' /BBox [0 0 '.$rect.']'; - $out .= ' /Matrix [1 0 0 1 0 0]'; - $out .= ' /Resources 2 0 R'; - $stream = $this->_getrawstream($stream); - $out .= ' /Length '.strlen($stream); - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - return $this->n; - } - - /** - * Output fonts. - * @author Nicola Asuni - * @protected - */ - protected function _putfonts() { - $nf = $this->n; - foreach ($this->diffs as $diff) { - //Encodings - $this->_newobj(); - $this->_out('<< /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.'] >>'."\n".'endobj'); - } - $mqr = TCPDF_STATIC::get_mqr(); - TCPDF_STATIC::set_mqr(false); - foreach ($this->FontFiles as $file => $info) { - // search and get font file to embedd - $fontfile = TCPDF_FONTS::getFontFullPath($file, $info['fontdir']); - if (!TCPDF_STATIC::empty_string($fontfile)) { - $font = file_get_contents($fontfile); - $compressed = (substr($file, -2) == '.z'); - if ((!$compressed) AND (isset($info['length2']))) { - $header = (ord($font[0]) == 128); - if ($header) { - // strip first binary header - $font = substr($font, 6); - } - if ($header AND (ord($font[$info['length1']]) == 128)) { - // strip second binary header - $font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6)); - } - } elseif ($info['subset'] AND ((!$compressed) OR ($compressed AND function_exists('gzcompress')))) { - if ($compressed) { - // uncompress font - $font = gzuncompress($font); - } - // merge subset characters - $subsetchars = array(); // used chars - foreach ($info['fontkeys'] as $fontkey) { - $fontinfo = $this->getFontBuffer($fontkey); - $subsetchars += $fontinfo['subsetchars']; - } - // rebuild a font subset - $font = TCPDF_FONTS::_getTrueTypeFontSubset($font, $subsetchars); - // calculate new font length - $info['length1'] = strlen($font); - if ($compressed) { - // recompress font - $font = gzcompress($font); - } - } - $this->_newobj(); - $this->FontFiles[$file]['n'] = $this->n; - $stream = $this->_getrawstream($font); - $out = '<< /Length '.strlen($stream); - if ($compressed) { - $out .= ' /Filter /FlateDecode'; - } - $out .= ' /Length1 '.$info['length1']; - if (isset($info['length2'])) { - $out .= ' /Length2 '.$info['length2'].' /Length3 0'; - } - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - TCPDF_STATIC::set_mqr($mqr); - foreach ($this->fontkeys as $k) { - //Font objects - $font = $this->getFontBuffer($k); - $type = $font['type']; - $name = $font['name']; - if ($type == 'core') { - // standard core font - $out = $this->_getobj($this->font_obj_ids[$k])."\n"; - $out .= '<annotation_fonts[$k] = $font['i']; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } elseif (($type == 'Type1') OR ($type == 'TrueType')) { - // additional Type1 or TrueType font - $out = $this->_getobj($this->font_obj_ids[$k])."\n"; - $out .= '<n + 1).' 0 R'; - $out .= ' /FontDescriptor '.($this->n + 2).' 0 R'; - if ($font['enc']) { - if (isset($font['diff'])) { - $out .= ' /Encoding '.($nf + $font['diff']).' 0 R'; - } else { - $out .= ' /Encoding /WinAnsiEncoding'; - } - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // Widths - $this->_newobj(); - $s = '['; - for ($i = 32; $i < 256; ++$i) { - if (isset($font['cw'][$i])) { - $s .= $font['cw'][$i].' '; - } else { - $s .= $font['dw'].' '; - } - } - $s .= ']'; - $s .= "\n".'endobj'; - $this->_out($s); - //Descriptor - $this->_newobj(); - $s = '< $fdv) { - if (is_float($fdv)) { - $fdv = sprintf('%F', $fdv); - } - $s .= ' /'.$fdk.' '.$fdv.''; - } - if (!TCPDF_STATIC::empty_string($font['file'])) { - $s .= ' /FontFile'.($type == 'Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R'; - } - $s .= '>>'; - $s .= "\n".'endobj'; - $this->_out($s); - } else { - // additional types - $mtd = '_put'.strtolower($type); - if (!method_exists($this, $mtd)) { - $this->Error('Unsupported font type: '.$type); - } - $this->$mtd($font); - } - } - } - - /** - * Adds unicode fonts.
      - * Based on PDF Reference 1.3 (section 5) - * @param array $font font data - * @protected - * @author Nicola Asuni - * @since 1.52.0.TC005 (2005-01-05) - */ - protected function _puttruetypeunicode($font) { - $fontname = ''; - if ($font['subset']) { - // change name for font subsetting - $subtag = sprintf('%06u', $font['i']); - $subtag = strtr($subtag, '0123456789', 'ABCDEFGHIJ'); - $fontname .= $subtag.'+'; - } - $fontname .= $font['name']; - // Type0 Font - // A composite font composed of other fonts, organized hierarchically - $out = $this->_getobj($this->font_obj_ids[$font['fontkey']])."\n"; - $out .= '<< /Type /Font'; - $out .= ' /Subtype /Type0'; - $out .= ' /BaseFont /'.$fontname; - $out .= ' /Name /F'.$font['i']; - $out .= ' /Encoding /'.$font['enc']; - $out .= ' /ToUnicode '.($this->n + 1).' 0 R'; - $out .= ' /DescendantFonts ['.($this->n + 2).' 0 R]'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // ToUnicode map for Identity-H - $stream = TCPDF_FONT_DATA::$uni_identity_h; - // ToUnicode Object - $this->_newobj(); - $stream = ($this->compress) ? gzcompress($stream) : $stream; - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - $stream = $this->_getrawstream($stream); - $this->_out('<<'.$filter.'/Length '.strlen($stream).'>> stream'."\n".$stream."\n".'endstream'."\n".'endobj'); - // CIDFontType2 - // A CIDFont whose glyph descriptions are based on TrueType font technology - $oid = $this->_newobj(); - $out = '<< /Type /Font'; - $out .= ' /Subtype /CIDFontType2'; - $out .= ' /BaseFont /'.$fontname; - // A dictionary containing entries that define the character collection of the CIDFont. - $cidinfo = '/Registry '.$this->_datastring($font['cidinfo']['Registry'], $oid); - $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering'], $oid); - $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement']; - $out .= ' /CIDSystemInfo << '.$cidinfo.' >>'; - $out .= ' /FontDescriptor '.($this->n + 1).' 0 R'; - $out .= ' /DW '.$font['dw']; // default width - $out .= "\n".TCPDF_FONTS::_putfontwidths($font, 0); - if (isset($font['ctg']) AND (!TCPDF_STATIC::empty_string($font['ctg']))) { - $out .= "\n".'/CIDToGIDMap '.($this->n + 2).' 0 R'; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // Font descriptor - // A font descriptor describing the CIDFont default metrics other than its glyph widths - $this->_newobj(); - $out = '<< /Type /FontDescriptor'; - $out .= ' /FontName /'.$fontname; - foreach ($font['desc'] as $key => $value) { - if (is_float($value)) { - $value = sprintf('%F', $value); - } - $out .= ' /'.$key.' '.$value; - } - $fontdir = false; - if (!TCPDF_STATIC::empty_string($font['file'])) { - // A stream containing a TrueType font - $out .= ' /FontFile2 '.$this->FontFiles[$font['file']]['n'].' 0 R'; - $fontdir = $this->FontFiles[$font['file']]['fontdir']; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - if (isset($font['ctg']) AND (!TCPDF_STATIC::empty_string($font['ctg']))) { - $this->_newobj(); - // Embed CIDToGIDMap - // A specification of the mapping from CIDs to glyph indices - // search and get CTG font file to embedd - $ctgfile = strtolower($font['ctg']); - // search and get ctg font file to embedd - $fontfile = TCPDF_FONTS::getFontFullPath($ctgfile, $fontdir); - if (TCPDF_STATIC::empty_string($fontfile)) { - $this->Error('Font file not found: '.$ctgfile); - } - $stream = $this->_getrawstream(file_get_contents($fontfile)); - $out = '<< /Length '.strlen($stream).''; - if (substr($fontfile, -2) == '.z') { // check file extension - // Decompresses data encoded using the public-domain - // zlib/deflate compression method, reproducing the - // original text or binary data - $out .= ' /Filter /FlateDecode'; - } - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Output CID-0 fonts. - * A Type 0 CIDFont contains glyph descriptions based on the Adobe Type 1 font format - * @param array $font font data - * @protected - * @author Andrew Whitehead, Nicola Asuni, Yukihiro Nakadaira - * @since 3.2.000 (2008-06-23) - */ - protected function _putcidfont0($font) { - $cidoffset = 0; - if (!isset($font['cw'][1])) { - $cidoffset = 31; - } - if (isset($font['cidinfo']['uni2cid'])) { - // convert unicode to cid. - $uni2cid = $font['cidinfo']['uni2cid']; - $cw = array(); - foreach ($font['cw'] as $uni => $width) { - if (isset($uni2cid[$uni])) { - $cw[($uni2cid[$uni] + $cidoffset)] = $width; - } elseif ($uni < 256) { - $cw[$uni] = $width; - } // else unknown character - } - $font = array_merge($font, array('cw' => $cw)); - } - $name = $font['name']; - $enc = $font['enc']; - if ($enc) { - $longname = $name.'-'.$enc; - } else { - $longname = $name; - } - $out = $this->_getobj($this->font_obj_ids[$font['fontkey']])."\n"; - $out .= '<n + 1).' 0 R]'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $oid = $this->_newobj(); - $out = '<_datastring($font['cidinfo']['Registry'], $oid); - $cidinfo .= ' /Ordering '.$this->_datastring($font['cidinfo']['Ordering'], $oid); - $cidinfo .= ' /Supplement '.$font['cidinfo']['Supplement']; - $out .= ' /CIDSystemInfo <<'.$cidinfo.'>>'; - $out .= ' /FontDescriptor '.($this->n + 1).' 0 R'; - $out .= ' /DW '.$font['dw']; - $out .= "\n".TCPDF_FONTS::_putfontwidths($font, $cidoffset); - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $this->_newobj(); - $s = '< $v) { - if ($k != 'Style') { - if (is_float($v)) { - $v = sprintf('%F', $v); - } - $s .= ' /'.$k.' '.$v.''; - } - } - $s .= '>>'; - $s .= "\n".'endobj'; - $this->_out($s); - } - - /** - * Output images. - * @protected - */ - protected function _putimages() { - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - foreach ($this->imagekeys as $file) { - $info = $this->getImageBuffer($file); - // set object for alternate images array - if ((!$this->pdfa_mode) AND isset($info['altimgs']) AND !empty($info['altimgs'])) { - $altoid = $this->_newobj(); - $out = '['; - foreach ($info['altimgs'] as $altimage) { - if (isset($this->xobjects['I'.$altimage[0]]['n'])) { - $out .= ' << /Image '.$this->xobjects['I'.$altimage[0]]['n'].' 0 R'; - $out .= ' /DefaultForPrinting'; - if ($altimage[1] === true) { - $out .= ' true'; - } else { - $out .= ' false'; - } - $out .= ' >>'; - } - } - $out .= ' ]'; - $out .= "\n".'endobj'; - $this->_out($out); - } - // set image object - $oid = $this->_newobj(); - $this->xobjects['I'.$info['i']] = array('n' => $oid); - $this->setImageSubBuffer($file, 'n', $this->n); - $out = '<n - 1).' 0 R'; - } - // set color space - $icc = false; - if (isset($info['icc']) AND ($info['icc'] !== false)) { - // ICC Colour Space - $icc = true; - $out .= ' /ColorSpace [/ICCBased '.($this->n + 1).' 0 R]'; - } elseif ($info['cs'] == 'Indexed') { - // Indexed Colour Space - $out .= ' /ColorSpace [/Indexed /DeviceRGB '.((strlen($info['pal']) / 3) - 1).' '.($this->n + 1).' 0 R]'; - } else { - // Device Colour Space - $out .= ' /ColorSpace /'.$info['cs']; - } - if ($info['cs'] == 'DeviceCMYK') { - $out .= ' /Decode [1 0 1 0 1 0 1 0]'; - } - $out .= ' /BitsPerComponent '.$info['bpc']; - if (isset($altoid) AND ($altoid > 0)) { - // reference to alternate images dictionary - $out .= ' /Alternates '.$altoid.' 0 R'; - } - if (isset($info['exurl']) AND !empty($info['exurl'])) { - // external stream - $out .= ' /Length 0'; - $out .= ' /F << /FS /URL /F '.$this->_datastring($info['exurl'], $oid).' >>'; - if (isset($info['f'])) { - $out .= ' /FFilter /'.$info['f']; - } - $out .= ' >>'; - $out .= ' stream'."\n".'endstream'; - } else { - if (isset($info['f'])) { - $out .= ' /Filter /'.$info['f']; - } - if (isset($info['parms'])) { - $out .= ' '.$info['parms']; - } - if (isset($info['trns']) AND is_array($info['trns'])) { - $trns = ''; - $count_info = count($info['trns']); - if ($info['cs'] == 'Indexed') { - $maxval =(pow(2, $info['bpc']) - 1); - for ($i = 0; $i < $count_info; ++$i) { - if (($info['trns'][$i] != 0) AND ($info['trns'][$i] != $maxval)) { - // this is not a binary type mask @TODO: create a SMask - $trns = ''; - break; - } elseif (empty($trns) AND ($info['trns'][$i] == 0)) { - // store the first fully transparent value - $trns .= $i.' '.$i.' '; - } - } - } else { - // grayscale or RGB - for ($i = 0; $i < $count_info; ++$i) { - if ($info['trns'][$i] == 0) { - $trns .= $info['trns'][$i].' '.$info['trns'][$i].' '; - } - } - } - // Colour Key Masking - if (!empty($trns)) { - $out .= ' /Mask ['.$trns.']'; - } - } - $stream = $this->_getrawstream($info['data']); - $out .= ' /Length '.strlen($stream).' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - } - $out .= "\n".'endobj'; - $this->_out($out); - if ($icc) { - // ICC colour profile - $this->_newobj(); - $icc = ($this->compress) ? gzcompress($info['icc']) : $info['icc']; - $icc = $this->_getrawstream($icc); - $this->_out('<> stream'."\n".$icc."\n".'endstream'."\n".'endobj'); - } elseif ($info['cs'] == 'Indexed') { - // colour palette - $this->_newobj(); - $pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal']; - $pal = $this->_getrawstream($pal); - $this->_out('<<'.$filter.'/Length '.strlen($pal).'>> stream'."\n".$pal."\n".'endstream'."\n".'endobj'); - } - } - } - - /** - * Output Form XObjects Templates. - * @author Nicola Asuni - * @since 5.8.017 (2010-08-24) - * @protected - * @see startTemplate(), endTemplate(), printTemplate() - */ - protected function _putxobjects() { - foreach ($this->xobjects as $key => $data) { - if (isset($data['outdata'])) { - $stream = str_replace($this->epsmarker, '', trim($data['outdata'])); - $out = $this->_getobj($data['n'])."\n"; - $out .= '<<'; - $out .= ' /Type /XObject'; - $out .= ' /Subtype /Form'; - $out .= ' /FormType 1'; - if ($this->compress) { - $stream = gzcompress($stream); - $out .= ' /Filter /FlateDecode'; - } - $out .= sprintf(' /BBox [%F %F %F %F]', ($data['x'] * $this->k), (-$data['y'] * $this->k), (($data['w'] + $data['x']) * $this->k), (($data['h'] - $data['y']) * $this->k)); - $out .= ' /Matrix [1 0 0 1 0 0]'; - $out .= ' /Resources <<'; - $out .= ' /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'; - if (!$this->pdfa_mode || $this->pdfa_version >= 2) { - // transparency - if (isset($data['extgstates']) AND !empty($data['extgstates'])) { - $out .= ' /ExtGState <<'; - foreach ($data['extgstates'] as $k => $extgstate) { - if (isset($this->extgstates[$k]['name'])) { - $out .= ' /'.$this->extgstates[$k]['name']; - } else { - $out .= ' /GS'.$k; - } - $out .= ' '.$this->extgstates[$k]['n'].' 0 R'; - } - $out .= ' >>'; - } - if (isset($data['gradients']) AND !empty($data['gradients'])) { - $gp = ''; - $gs = ''; - foreach ($data['gradients'] as $id => $grad) { - // gradient patterns - $gp .= ' /p'.$id.' '.$this->gradients[$id]['pattern'].' 0 R'; - // gradient shadings - $gs .= ' /Sh'.$id.' '.$this->gradients[$id]['id'].' 0 R'; - } - $out .= ' /Pattern <<'.$gp.' >>'; - $out .= ' /Shading <<'.$gs.' >>'; - } - } - // spot colors - if (isset($data['spot_colors']) AND !empty($data['spot_colors'])) { - $out .= ' /ColorSpace <<'; - foreach ($data['spot_colors'] as $name => $color) { - $out .= ' /CS'.$color['i'].' '.$this->spot_colors[$name]['n'].' 0 R'; - } - $out .= ' >>'; - } - // fonts - if (!empty($data['fonts'])) { - $out .= ' /Font <<'; - foreach ($data['fonts'] as $fontkey => $fontid) { - $out .= ' /F'.$fontid.' '.$this->font_obj_ids[$fontkey].' 0 R'; - } - $out .= ' >>'; - } - // images or nested xobjects - if (!empty($data['images']) OR !empty($data['xobjects'])) { - $out .= ' /XObject <<'; - foreach ($data['images'] as $imgid) { - $out .= ' /I'.$imgid.' '.$this->xobjects['I'.$imgid]['n'].' 0 R'; - } - foreach ($data['xobjects'] as $sub_id => $sub_objid) { - $out .= ' /'.$sub_id.' '.$sub_objid['n'].' 0 R'; - } - $out .= ' >>'; - } - $out .= ' >>'; //end resources - if (isset($data['group']) AND ($data['group'] !== false)) { - // set transparency group - $out .= ' /Group << /Type /Group /S /Transparency'; - if (is_array($data['group'])) { - if (isset($data['group']['CS']) AND !empty($data['group']['CS'])) { - $out .= ' /CS /'.$data['group']['CS']; - } - if (isset($data['group']['I'])) { - $out .= ' /I /'.($data['group']['I']===true?'true':'false'); - } - if (isset($data['group']['K'])) { - $out .= ' /K /'.($data['group']['K']===true?'true':'false'); - } - } - $out .= ' >>'; - } - $stream = $this->_getrawstream($stream, $data['n']); - $out .= ' /Length '.strlen($stream); - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - } - - /** - * Output Spot Colors Resources. - * @protected - * @since 4.0.024 (2008-09-12) - */ - protected function _putspotcolors() { - foreach ($this->spot_colors as $name => $color) { - $this->_newobj(); - $this->spot_colors[$name]['n'] = $this->n; - $out = '[/Separation /'.str_replace(' ', '#20', $name); - $out .= ' /DeviceCMYK <<'; - $out .= ' /Range [0 1 0 1 0 1 0 1] /C0 [0 0 0 0]'; - $out .= ' '.sprintf('/C1 [%F %F %F %F] ', ($color['C'] / 100), ($color['M'] / 100), ($color['Y'] / 100), ($color['K'] / 100)); - $out .= ' /FunctionType 2 /Domain [0 1] /N 1>>]'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Return XObjects Dictionary. - * @return string XObjects dictionary - * @protected - * @since 5.8.014 (2010-08-23) - */ - protected function _getxobjectdict() { - $out = ''; - foreach ($this->xobjects as $id => $objid) { - $out .= ' /'.$id.' '.$objid['n'].' 0 R'; - } - return $out; - } - - /** - * Output Resources Dictionary. - * @protected - */ - protected function _putresourcedict() { - $out = $this->_getobj(2)."\n"; - $out .= '<< /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'; - $out .= ' /Font <<'; - foreach ($this->fontkeys as $fontkey) { - $font = $this->getFontBuffer($fontkey); - $out .= ' /F'.$font['i'].' '.$font['n'].' 0 R'; - } - $out .= ' >>'; - $out .= ' /XObject <<'; - $out .= $this->_getxobjectdict(); - $out .= ' >>'; - // layers - if (!empty($this->pdflayers)) { - $out .= ' /Properties <<'; - foreach ($this->pdflayers as $layer) { - $out .= ' /'.$layer['layer'].' '.$layer['objid'].' 0 R'; - } - $out .= ' >>'; - } - if (!$this->pdfa_mode || $this->pdfa_version >= 2) { - // transparency - if (isset($this->extgstates) AND !empty($this->extgstates)) { - $out .= ' /ExtGState <<'; - foreach ($this->extgstates as $k => $extgstate) { - if (isset($extgstate['name'])) { - $out .= ' /'.$extgstate['name']; - } else { - $out .= ' /GS'.$k; - } - $out .= ' '.$extgstate['n'].' 0 R'; - } - $out .= ' >>'; - } - if (isset($this->gradients) AND !empty($this->gradients)) { - $gp = ''; - $gs = ''; - foreach ($this->gradients as $id => $grad) { - // gradient patterns - $gp .= ' /p'.$id.' '.$grad['pattern'].' 0 R'; - // gradient shadings - $gs .= ' /Sh'.$id.' '.$grad['id'].' 0 R'; - } - $out .= ' /Pattern <<'.$gp.' >>'; - $out .= ' /Shading <<'.$gs.' >>'; - } - } - // spot colors - if (isset($this->spot_colors) AND !empty($this->spot_colors)) { - $out .= ' /ColorSpace <<'; - foreach ($this->spot_colors as $color) { - $out .= ' /CS'.$color['i'].' '.$color['n'].' 0 R'; - } - $out .= ' >>'; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Output Resources. - * @protected - */ - protected function _putresources() { - $this->_putextgstates(); - $this->_putocg(); - $this->_putfonts(); - $this->_putimages(); - $this->_putspotcolors(); - $this->_putshaders(); - $this->_putxobjects(); - $this->_putresourcedict(); - $this->_putdests(); - $this->_putEmbeddedFiles(); - $this->_putannotsobjs(); - $this->_putjavascript(); - $this->_putbookmarks(); - $this->_putencryption(); - } - - /** - * Adds some Metadata information (Document Information Dictionary) - * (see Chapter 14.3.3 Document Information Dictionary of PDF32000_2008.pdf Reference) - * @return int object id - * @protected - */ - protected function _putinfo() { - $oid = $this->_newobj(); - $out = '<<'; - // store current isunicode value - $prev_isunicode = $this->isunicode; - if ($this->docinfounicode) { - $this->isunicode = true; - } - if (!TCPDF_STATIC::empty_string($this->title)) { - // The document's title. - $out .= ' /Title '.$this->_textstring($this->title, $oid); - } - if (!TCPDF_STATIC::empty_string($this->author)) { - // The name of the person who created the document. - $out .= ' /Author '.$this->_textstring($this->author, $oid); - } - if (!TCPDF_STATIC::empty_string($this->subject)) { - // The subject of the document. - $out .= ' /Subject '.$this->_textstring($this->subject, $oid); - } - if (!TCPDF_STATIC::empty_string($this->keywords)) { - // Keywords associated with the document. - $out .= ' /Keywords '.$this->_textstring($this->keywords, $oid); - } - if (!TCPDF_STATIC::empty_string($this->creator)) { - // If the document was converted to PDF from another format, the name of the conforming product that created the original document from which it was converted. - $out .= ' /Creator '.$this->_textstring($this->creator, $oid); - } - // restore previous isunicode value - $this->isunicode = $prev_isunicode; - // default producer - $out .= ' /Producer '.$this->_textstring(TCPDF_STATIC::getTCPDFProducer(), $oid); - // The date and time the document was created, in human-readable form - $out .= ' /CreationDate '.$this->_datestring(0, $this->doc_creation_timestamp); - // The date and time the document was most recently modified, in human-readable form - $out .= ' /ModDate '.$this->_datestring(0, $this->doc_modification_timestamp); - // A name object indicating whether the document has been modified to include trapping information - $out .= ' /Trapped /False'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - return $oid; - } - - /** - * Set additional XMP data to be added on the default XMP data just before the end of "x:xmpmeta" tag. - * IMPORTANT: This data is added as-is without controls, so you have to validate your data before using this method! - * @param string $xmp Custom XMP data. - * @since 5.9.128 (2011-10-06) - * @public - */ - public function setExtraXMP($xmp) { - $this->custom_xmp = $xmp; - } - - /** - * Set additional XMP data to be added on the default XMP data just before the end of "rdf:RDF" tag. - * IMPORTANT: This data is added as-is without controls, so you have to validate your data before using this method! - * @param string $xmp Custom XMP RDF data. - * @since 6.3.0 (2019-09-19) - * @public - */ - public function setExtraXMPRDF($xmp) { - $this->custom_xmp_rdf = $xmp; - } - - /** - * Put XMP data object and return ID. - * @return int The object ID. - * @since 5.9.121 (2011-09-28) - * @protected - */ - protected function _putXMP() { - $oid = $this->_newobj(); - // store current isunicode value - $prev_isunicode = $this->isunicode; - $this->isunicode = true; - $prev_encrypted = $this->encrypted; - $this->encrypted = false; - // set XMP data - $xmp = 'isunicode).'" id="W5M0MpCehiHzreSzNTczkc9d"?>'."\n"; - $xmp .= ''."\n"; - $xmp .= "\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".'application/pdf'."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->title).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->author).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->subject).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''.TCPDF_STATIC::_escapeXML($this->keywords).''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - // convert doc creation date format - $dcdate = TCPDF_STATIC::getFormattedDate($this->doc_creation_timestamp); - $doccreationdate = substr($dcdate, 0, 4).'-'.substr($dcdate, 4, 2).'-'.substr($dcdate, 6, 2); - $doccreationdate .= 'T'.substr($dcdate, 8, 2).':'.substr($dcdate, 10, 2).':'.substr($dcdate, 12, 2); - $doccreationdate .= substr($dcdate, 14, 3).':'.substr($dcdate, 18, 2); - $doccreationdate = TCPDF_STATIC::_escapeXML($doccreationdate); - // convert doc modification date format - $dmdate = TCPDF_STATIC::getFormattedDate($this->doc_modification_timestamp); - $docmoddate = substr($dmdate, 0, 4).'-'.substr($dmdate, 4, 2).'-'.substr($dmdate, 6, 2); - $docmoddate .= 'T'.substr($dmdate, 8, 2).':'.substr($dmdate, 10, 2).':'.substr($dmdate, 12, 2); - $docmoddate .= substr($dmdate, 14, 3).':'.substr($dmdate, 18, 2); - $docmoddate = TCPDF_STATIC::_escapeXML($docmoddate); - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".''.$doccreationdate.''."\n"; - $xmp .= "\t\t\t".''.$this->creator.''."\n"; - $xmp .= "\t\t\t".''.$docmoddate.''."\n"; - $xmp .= "\t\t\t".''.$doccreationdate.''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".''.TCPDF_STATIC::_escapeXML($this->keywords).''."\n"; - $xmp .= "\t\t\t".''.TCPDF_STATIC::_escapeXML(TCPDF_STATIC::getTCPDFProducer()).''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $uuid = 'uuid:'.substr($this->file_id, 0, 8).'-'.substr($this->file_id, 8, 4).'-'.substr($this->file_id, 12, 4).'-'.substr($this->file_id, 16, 4).'-'.substr($this->file_id, 20, 12); - $xmp .= "\t\t\t".''.$uuid.''."\n"; - $xmp .= "\t\t\t".''.$uuid.''."\n"; - $xmp .= "\t\t".''."\n"; - if ($this->pdfa_mode) { - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".''.$this->pdfa_version.''."\n"; - $xmp .= "\t\t\t".'B'."\n"; - $xmp .= "\t\t".''."\n"; - } - // XMP extension schemas - $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".'http://ns.adobe.com/pdf/1.3/'."\n"; - $xmp .= "\t\t\t\t\t\t".'pdf'."\n"; - $xmp .= "\t\t\t\t\t\t".'Adobe PDF Schema'."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Adobe PDF Schema'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'InstanceID'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'URI'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".'http://ns.adobe.com/xap/1.0/mm/'."\n"; - $xmp .= "\t\t\t\t\t\t".'xmpMM'."\n"; - $xmp .= "\t\t\t\t\t\t".'XMP Media Management Schema'."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'UUID based identifier for specific incarnation of a document'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'InstanceID'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'URI'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".'http://www.aiim.org/pdfa/ns/id/'."\n"; - $xmp .= "\t\t\t\t\t\t".'pdfaid'."\n"; - $xmp .= "\t\t\t\t\t\t".'PDF/A ID Schema'."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Part of PDF/A standard'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'part'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Integer'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Amendment of PDF/A standard'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'amd'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Text'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Conformance level of PDF/A standard'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'conformance'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t\t".'Text'."\n"; - $xmp .= "\t\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t\t".''."\n"; - $xmp .= "\t\t\t\t".''."\n"; - $xmp .= "\t\t\t".''."\n"; - $xmp .= "\t\t".''."\n"; - $xmp .= $this->custom_xmp_rdf; - $xmp .= "\t".''."\n"; - $xmp .= $this->custom_xmp; - $xmp .= ''."\n"; - $xmp .= ''; - $out = '<< /Type /Metadata /Subtype /XML /Length '.strlen($xmp).' >> stream'."\n".$xmp."\n".'endstream'."\n".'endobj'; - // restore previous isunicode value - $this->isunicode = $prev_isunicode; - $this->encrypted = $prev_encrypted; - $this->_out($out); - return $oid; - } - - /** - * Output Catalog. - * @return int object id - * @protected - */ - protected function _putcatalog() { - // put XMP - $xmpobj = $this->_putXMP(); - // if required, add standard sRGB ICC colour profile - if ($this->pdfa_mode OR $this->force_srgb) { - $iccobj = $this->_newobj(); - $icc = file_get_contents(dirname(__FILE__).'/include/sRGB.icc'); - $filter = ''; - if ($this->compress) { - $filter = ' /Filter /FlateDecode'; - $icc = gzcompress($icc); - } - $icc = $this->_getrawstream($icc); - $this->_out('<> stream'."\n".$icc."\n".'endstream'."\n".'endobj'); - } - // start catalog - $oid = $this->_newobj(); - $out = '<< /Type /Catalog'; - $out .= ' /Version /'.$this->PDFVersion; - //$out .= ' /Extensions <<>>'; - $out .= ' /Pages 1 0 R'; - //$out .= ' /PageLabels ' //...; - $out .= ' /Names <<'; - if ((!$this->pdfa_mode) AND !empty($this->n_js)) { - $out .= ' /JavaScript '.$this->n_js; - } - if (!empty($this->efnames)) { - $out .= ' /EmbeddedFiles <efnames AS $fn => $fref) { - $out .= ' '.$this->_datastring($fn).' '.$fref; - } - $out .= ' ]>>'; - } - $out .= ' >>'; - if (!empty($this->dests)) { - $out .= ' /Dests '.($this->n_dests).' 0 R'; - } - $out .= $this->_putviewerpreferences(); - if (isset($this->LayoutMode) AND (!TCPDF_STATIC::empty_string($this->LayoutMode))) { - $out .= ' /PageLayout /'.$this->LayoutMode; - } - if (isset($this->PageMode) AND (!TCPDF_STATIC::empty_string($this->PageMode))) { - $out .= ' /PageMode /'.$this->PageMode; - } - if (count($this->outlines) > 0) { - $out .= ' /Outlines '.$this->OutlineRoot.' 0 R'; - $out .= ' /PageMode /UseOutlines'; - } - //$out .= ' /Threads []'; - if ($this->ZoomMode == 'fullpage') { - $out .= ' /OpenAction ['.$this->page_obj_id[1].' 0 R /Fit]'; - } elseif ($this->ZoomMode == 'fullwidth') { - $out .= ' /OpenAction ['.$this->page_obj_id[1].' 0 R /FitH null]'; - } elseif ($this->ZoomMode == 'real') { - $out .= ' /OpenAction ['.$this->page_obj_id[1].' 0 R /XYZ null null 1]'; - } elseif (!is_string($this->ZoomMode)) { - $out .= sprintf(' /OpenAction ['.$this->page_obj_id[1].' 0 R /XYZ null null %F]', ($this->ZoomMode / 100)); - } - //$out .= ' /AA <<>>'; - //$out .= ' /URI <<>>'; - $out .= ' /Metadata '.$xmpobj.' 0 R'; - //$out .= ' /StructTreeRoot <<>>'; - //$out .= ' /MarkInfo <<>>'; - if (isset($this->l['a_meta_language'])) { - $out .= ' /Lang '.$this->_textstring($this->l['a_meta_language'], $oid); - } - //$out .= ' /SpiderInfo <<>>'; - // set OutputIntent to sRGB IEC61966-2.1 if required - if ($this->pdfa_mode OR $this->force_srgb) { - $out .= ' /OutputIntents [<<'; - $out .= ' /Type /OutputIntent'; - $out .= ' /S /GTS_PDFA1'; - $out .= ' /OutputCondition '.$this->_textstring('sRGB IEC61966-2.1', $oid); - $out .= ' /OutputConditionIdentifier '.$this->_textstring('sRGB IEC61966-2.1', $oid); - $out .= ' /RegistryName '.$this->_textstring('http://www.color.org', $oid); - $out .= ' /Info '.$this->_textstring('sRGB IEC61966-2.1', $oid); - $out .= ' /DestOutputProfile '.$iccobj.' 0 R'; - $out .= ' >>]'; - } - //$out .= ' /PieceInfo <<>>'; - if (!empty($this->pdflayers)) { - $lyrobjs = ''; - $lyrobjs_off = ''; - $lyrobjs_lock = ''; - foreach ($this->pdflayers as $layer) { - $layer_obj_ref = ' '.$layer['objid'].' 0 R'; - $lyrobjs .= $layer_obj_ref; - if ($layer['view'] === false) { - $lyrobjs_off .= $layer_obj_ref; - } - if ($layer['lock']) { - $lyrobjs_lock .= $layer_obj_ref; - } - } - $out .= ' /OCProperties << /OCGs ['.$lyrobjs.']'; - $out .= ' /D <<'; - $out .= ' /Name '.$this->_textstring('Layers', $oid); - $out .= ' /Creator '.$this->_textstring('TCPDF', $oid); - $out .= ' /BaseState /ON'; - $out .= ' /OFF ['.$lyrobjs_off.']'; - $out .= ' /Locked ['.$lyrobjs_lock.']'; - $out .= ' /Intent /View'; - $out .= ' /AS ['; - $out .= ' << /Event /Print /OCGs ['.$lyrobjs.'] /Category [/Print] >>'; - $out .= ' << /Event /View /OCGs ['.$lyrobjs.'] /Category [/View] >>'; - $out .= ' ]'; - $out .= ' /Order ['.$lyrobjs.']'; - $out .= ' /ListMode /AllPages'; - //$out .= ' /RBGroups ['..']'; - //$out .= ' /Locked ['..']'; - $out .= ' >>'; - $out .= ' >>'; - } - // AcroForm - if (!empty($this->form_obj_id) - OR ($this->sign AND isset($this->signature_data['cert_type'])) - OR !empty($this->empty_signature_appearance)) { - $out .= ' /AcroForm <<'; - $objrefs = ''; - if ($this->sign AND isset($this->signature_data['cert_type'])) { - // set reference for signature object - $objrefs .= $this->sig_obj_id.' 0 R'; - } - if (!empty($this->empty_signature_appearance)) { - foreach ($this->empty_signature_appearance as $esa) { - // set reference for empty signature objects - $objrefs .= ' '.$esa['objid'].' 0 R'; - } - } - if (!empty($this->form_obj_id)) { - foreach($this->form_obj_id as $objid) { - $objrefs .= ' '.$objid.' 0 R'; - } - } - $out .= ' /Fields ['.$objrefs.']'; - // It's better to turn off this value and set the appearance stream for each annotation (/AP) to avoid conflicts with signature fields. - if (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A')) { - $out .= ' /NeedAppearances false'; - } - if ($this->sign AND isset($this->signature_data['cert_type'])) { - if ($this->signature_data['cert_type'] > 0) { - $out .= ' /SigFlags 3'; - } else { - $out .= ' /SigFlags 1'; - } - } - //$out .= ' /CO '; - if (isset($this->annotation_fonts) AND !empty($this->annotation_fonts)) { - $out .= ' /DR <<'; - $out .= ' /Font <<'; - foreach ($this->annotation_fonts as $fontkey => $fontid) { - $out .= ' /F'.$fontid.' '.$this->font_obj_ids[$fontkey].' 0 R'; - } - $out .= ' >> >>'; - } - $font = $this->getFontBuffer('helvetica'); - $out .= ' /DA (/F'.$font['i'].' 0 Tf 0 g)'; - $out .= ' /Q '.(($this->rtl)?'2':'0'); - //$out .= ' /XFA '; - $out .= ' >>'; - // signatures - if ($this->sign AND isset($this->signature_data['cert_type']) - AND (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A'))) { - if ($this->signature_data['cert_type'] > 0) { - $out .= ' /Perms << /DocMDP '.($this->sig_obj_id + 1).' 0 R >>'; - } else { - $out .= ' /Perms << /UR3 '.($this->sig_obj_id + 1).' 0 R >>'; - } - } - } - //$out .= ' /Legal <<>>'; - //$out .= ' /Requirements []'; - //$out .= ' /Collection <<>>'; - //$out .= ' /NeedsRendering true'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - return $oid; - } - - /** - * Output viewer preferences. - * @return string for viewer preferences - * @author Nicola asuni - * @since 3.1.000 (2008-06-09) - * @protected - */ - protected function _putviewerpreferences() { - $vp = $this->viewer_preferences; - $out = ' /ViewerPreferences <<'; - if ($this->rtl) { - $out .= ' /Direction /R2L'; - } else { - $out .= ' /Direction /L2R'; - } - if (isset($vp['HideToolbar']) AND ($vp['HideToolbar'])) { - $out .= ' /HideToolbar true'; - } - if (isset($vp['HideMenubar']) AND ($vp['HideMenubar'])) { - $out .= ' /HideMenubar true'; - } - if (isset($vp['HideWindowUI']) AND ($vp['HideWindowUI'])) { - $out .= ' /HideWindowUI true'; - } - if (isset($vp['FitWindow']) AND ($vp['FitWindow'])) { - $out .= ' /FitWindow true'; - } - if (isset($vp['CenterWindow']) AND ($vp['CenterWindow'])) { - $out .= ' /CenterWindow true'; - } - if (isset($vp['DisplayDocTitle']) AND ($vp['DisplayDocTitle'])) { - $out .= ' /DisplayDocTitle true'; - } - if (isset($vp['NonFullScreenPageMode'])) { - $out .= ' /NonFullScreenPageMode /'.$vp['NonFullScreenPageMode']; - } - if (isset($vp['ViewArea'])) { - $out .= ' /ViewArea /'.$vp['ViewArea']; - } - if (isset($vp['ViewClip'])) { - $out .= ' /ViewClip /'.$vp['ViewClip']; - } - if (isset($vp['PrintArea'])) { - $out .= ' /PrintArea /'.$vp['PrintArea']; - } - if (isset($vp['PrintClip'])) { - $out .= ' /PrintClip /'.$vp['PrintClip']; - } - if (isset($vp['PrintScaling'])) { - $out .= ' /PrintScaling /'.$vp['PrintScaling']; - } - if (isset($vp['Duplex']) AND (!TCPDF_STATIC::empty_string($vp['Duplex']))) { - $out .= ' /Duplex /'.$vp['Duplex']; - } - if (isset($vp['PickTrayByPDFSize'])) { - if ($vp['PickTrayByPDFSize']) { - $out .= ' /PickTrayByPDFSize true'; - } else { - $out .= ' /PickTrayByPDFSize false'; - } - } - if (isset($vp['PrintPageRange'])) { - $PrintPageRangeNum = ''; - foreach ($vp['PrintPageRange'] as $k => $v) { - $PrintPageRangeNum .= ' '.($v - 1).''; - } - $out .= ' /PrintPageRange ['.substr($PrintPageRangeNum,1).']'; - } - if (isset($vp['NumCopies'])) { - $out .= ' /NumCopies '.intval($vp['NumCopies']); - } - $out .= ' >>'; - return $out; - } - - /** - * Output PDF File Header (7.5.2). - * @protected - */ - protected function _putheader() { - $this->_out('%PDF-'.$this->PDFVersion); - $this->_out('%'.chr(0xe2).chr(0xe3).chr(0xcf).chr(0xd3)); - } - - /** - * Output end of document (EOF). - * @protected - */ - protected function _enddoc() { - if (isset($this->CurrentFont['fontkey']) AND isset($this->CurrentFont['subsetchars'])) { - // save subset chars of the previous font - $this->setFontSubBuffer($this->CurrentFont['fontkey'], 'subsetchars', $this->CurrentFont['subsetchars']); - } - $this->state = 1; - $this->_putheader(); - $this->_putpages(); - $this->_putresources(); - // empty signature fields - if (!empty($this->empty_signature_appearance)) { - foreach ($this->empty_signature_appearance as $key => $esa) { - // widget annotation for empty signature - $out = $this->_getobj($esa['objid'])."\n"; - $out .= '<< /Type /Annot'; - $out .= ' /Subtype /Widget'; - $out .= ' /Rect ['.$esa['rect'].']'; - $out .= ' /P '.$this->page_obj_id[($esa['page'])].' 0 R'; // link to signature appearance page - $out .= ' /F 4'; - $out .= ' /FT /Sig'; - $signame = $esa['name'].sprintf(' [%03d]', ($key + 1)); - $out .= ' /T '.$this->_textstring($signame, $esa['objid']); - $out .= ' /Ff 0'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - // Signature - if ($this->sign AND isset($this->signature_data['cert_type'])) { - // widget annotation for signature - $out = $this->_getobj($this->sig_obj_id)."\n"; - $out .= '<< /Type /Annot'; - $out .= ' /Subtype /Widget'; - $out .= ' /Rect ['.$this->signature_appearance['rect'].']'; - $out .= ' /P '.$this->page_obj_id[($this->signature_appearance['page'])].' 0 R'; // link to signature appearance page - $out .= ' /F 4'; - $out .= ' /FT /Sig'; - $out .= ' /T '.$this->_textstring($this->signature_appearance['name'], $this->sig_obj_id); - $out .= ' /Ff 0'; - $out .= ' /V '.($this->sig_obj_id + 1).' 0 R'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - // signature - $this->_putsignature(); - } - // Info - $objid_info = $this->_putinfo(); - // Catalog - $objid_catalog = $this->_putcatalog(); - // Cross-ref - $o = $this->bufferlen; - // XREF section - $this->_out('xref'); - $this->_out('0 '.($this->n + 1)); - $this->_out('0000000000 65535 f '); - $freegen = ($this->n + 2); - for ($i=1; $i <= $this->n; ++$i) { - if (!isset($this->offsets[$i]) AND ($i > 1)) { - $this->_out(sprintf('0000000000 %05d f ', $freegen)); - ++$freegen; - } else { - $this->_out(sprintf('%010d 00000 n ', $this->offsets[$i])); - } - } - // TRAILER - $out = 'trailer'."\n"; - $out .= '<<'; - $out .= ' /Size '.($this->n + 1); - $out .= ' /Root '.$objid_catalog.' 0 R'; - $out .= ' /Info '.$objid_info.' 0 R'; - if ($this->encrypted) { - $out .= ' /Encrypt '.$this->encryptdata['objid'].' 0 R'; - } - $out .= ' /ID [ <'.$this->file_id.'> <'.$this->file_id.'> ]'; - $out .= ' >>'; - $this->_out($out); - $this->_out('startxref'); - $this->_out($o); - $this->_out('%%EOF'); - $this->state = 3; // end-of-doc - } - - /** - * Initialize a new page. - * @param string $orientation page orientation. Possible values are (case insensitive):
      • P or PORTRAIT (default)
      • L or LANDSCAPE
      - * @param mixed $format The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). - * @protected - * @see getPageSizeFromFormat(), setPageFormat() - */ - protected function _beginpage($orientation='', $format='') { - ++$this->page; - $this->pageobjects[$this->page] = array(); - $this->setPageBuffer($this->page, ''); - // initialize array for graphics tranformation positions inside a page buffer - $this->transfmrk[$this->page] = array(); - $this->state = 2; - if (TCPDF_STATIC::empty_string($orientation)) { - if (isset($this->CurOrientation)) { - $orientation = $this->CurOrientation; - } elseif ($this->fwPt > $this->fhPt) { - // landscape - $orientation = 'L'; - } else { - // portrait - $orientation = 'P'; - } - } - if (TCPDF_STATIC::empty_string($format)) { - $this->pagedim[$this->page] = $this->pagedim[($this->page - 1)]; - $this->setPageOrientation($orientation); - } else { - $this->setPageFormat($format, $orientation); - } - if ($this->rtl) { - $this->x = $this->w - $this->rMargin; - } else { - $this->x = $this->lMargin; - } - $this->y = $this->tMargin; - if (isset($this->newpagegroup[$this->page])) { - // start a new group - $this->currpagegroup = $this->newpagegroup[$this->page]; - $this->pagegroups[$this->currpagegroup] = 1; - } elseif (isset($this->currpagegroup) AND ($this->currpagegroup > 0)) { - ++$this->pagegroups[$this->currpagegroup]; - } - } - - /** - * Mark end of page. - * @protected - */ - protected function _endpage() { - $this->setVisibility('all'); - $this->state = 1; - } - - /** - * Begin a new object and return the object number. - * @return int object number - * @protected - */ - protected function _newobj() { - $this->_out($this->_getobj()); - return $this->n; - } - - /** - * Return the starting object string for the selected object ID. - * @param int|null $objid Object ID (leave empty to get a new ID). - * @return string the starting object string - * @protected - * @since 5.8.009 (2010-08-20) - */ - protected function _getobj($objid=null) { - if (TCPDF_STATIC::empty_string($objid)) { - ++$this->n; - $objid = $this->n; - } - $this->offsets[$objid] = $this->bufferlen; - $this->pageobjects[$this->page][] = $objid; - return $objid.' 0 obj'; - } - - /** - * Underline text. - * @param int $x X coordinate - * @param int $y Y coordinate - * @param string $txt text to underline - * @protected - */ - protected function _dounderline($x, $y, $txt) { - $w = $this->GetStringWidth($txt); - return $this->_dounderlinew($x, $y, $w); - } - - /** - * Underline for rectangular text area. - * @param int $x X coordinate - * @param int $y Y coordinate - * @param int $w width to underline - * @protected - * @since 4.8.008 (2009-09-29) - */ - protected function _dounderlinew($x, $y, $w) { - $linew = - $this->CurrentFont['ut'] / 1000 * $this->FontSizePt; - return sprintf('%F %F %F %F re f', $x * $this->k, ((($this->h - $y) * $this->k) + $linew), $w * $this->k, $linew); - } - - /** - * Line through text. - * @param int $x X coordinate - * @param int $y Y coordinate - * @param string $txt text to linethrough - * @protected - */ - protected function _dolinethrough($x, $y, $txt) { - $w = $this->GetStringWidth($txt); - return $this->_dolinethroughw($x, $y, $w); - } - - /** - * Line through for rectangular text area. - * @param int $x X coordinate - * @param int $y Y coordinate - * @param int $w line length (width) - * @protected - * @since 4.9.008 (2009-09-29) - */ - protected function _dolinethroughw($x, $y, $w) { - $linew = - $this->CurrentFont['ut'] / 1000 * $this->FontSizePt; - return sprintf('%F %F %F %F re f', $x * $this->k, ((($this->h - $y) * $this->k) + $linew + ($this->FontSizePt / 3)), $w * $this->k, $linew); - } - - /** - * Overline text. - * @param int $x X coordinate - * @param int $y Y coordinate - * @param string $txt text to overline - * @protected - * @since 4.9.015 (2010-04-19) - */ - protected function _dooverline($x, $y, $txt) { - $w = $this->GetStringWidth($txt); - return $this->_dooverlinew($x, $y, $w); - } - - /** - * Overline for rectangular text area. - * @param int $x X coordinate - * @param int $y Y coordinate - * @param int $w width to overline - * @protected - * @since 4.9.015 (2010-04-19) - */ - protected function _dooverlinew($x, $y, $w) { - $linew = - $this->CurrentFont['ut'] / 1000 * $this->FontSizePt; - return sprintf('%F %F %F %F re f', $x * $this->k, (($this->h - $y + $this->FontAscent) * $this->k) - $linew, $w * $this->k, $linew); - - } - - /** - * Format a data string for meta information - * @param string $s data string to escape. - * @param int $n object ID - * @return string escaped string. - * @protected - */ - protected function _datastring($s, $n=0) { - if ($n == 0) { - $n = $this->n; - } - $s = $this->_encrypt_data($n, $s); - return '('. TCPDF_STATIC::_escape($s).')'; - } - - /** - * Set the document creation timestamp - * @param mixed $time Document creation timestamp in seconds or date-time string. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function setDocCreationTimestamp($time) { - if (is_string($time)) { - $time = TCPDF_STATIC::getTimestamp($time); - } - $this->doc_creation_timestamp = intval($time); - } - - /** - * Set the document modification timestamp - * @param mixed $time Document modification timestamp in seconds or date-time string. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function setDocModificationTimestamp($time) { - if (is_string($time)) { - $time = TCPDF_STATIC::getTimestamp($time); - } - $this->doc_modification_timestamp = intval($time); - } - - /** - * Returns document creation timestamp in seconds. - * @return int Creation timestamp in seconds. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getDocCreationTimestamp() { - return $this->doc_creation_timestamp; - } - - /** - * Returns document modification timestamp in seconds. - * @return int Modfication timestamp in seconds. - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getDocModificationTimestamp() { - return $this->doc_modification_timestamp; - } - - /** - * Returns a formatted date for meta information - * @param int $n Object ID. - * @param int $timestamp Timestamp to convert. - * @return string escaped date string. - * @protected - * @since 4.6.028 (2009-08-25) - */ - protected function _datestring($n=0, $timestamp=0) { - if ((empty($timestamp)) OR ($timestamp < 0)) { - $timestamp = $this->doc_creation_timestamp; - } - return $this->_datastring('D:'.TCPDF_STATIC::getFormattedDate($timestamp), $n); - } - - /** - * Format a text string for meta information - * @param string $s string to escape. - * @param int $n object ID - * @return string escaped string. - * @protected - */ - protected function _textstring($s, $n=0) { - if ($this->isunicode) { - //Convert string to UTF-16BE - $s = TCPDF_FONTS::UTF8ToUTF16BE($s, true, $this->isunicode, $this->CurrentFont); - } - return $this->_datastring($s, $n); - } - - /** - * get raw output stream. - * @param string $s string to output. - * @param int $n object reference for encryption mode - * @protected - * @author Nicola Asuni - * @since 5.5.000 (2010-06-22) - */ - protected function _getrawstream($s, $n=0) { - if ($n <= 0) { - // default to current object - $n = $this->n; - } - return $this->_encrypt_data($n, $s); - } - - /** - * Output a string to the document. - * @param string $s string to output. - * @protected - */ - protected function _out($s) { - if ($this->state == 2) { - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] .= $s."\n"; - } elseif ((!$this->InFooter) AND isset($this->footerlen[$this->page]) AND ($this->footerlen[$this->page] > 0)) { - // puts data before page footer - $pagebuff = $this->getPageBuffer($this->page); - $page = substr($pagebuff, 0, -$this->footerlen[$this->page]); - $footer = substr($pagebuff, -$this->footerlen[$this->page]); - $this->setPageBuffer($this->page, $page.$s."\n".$footer); - // update footer position - $this->footerpos[$this->page] += strlen($s."\n"); - } else { - // set page data - $this->setPageBuffer($this->page, $s."\n", true); - } - } elseif ($this->state > 0) { - // set general data - $this->setBuffer($s."\n"); - } - } - - /** - * Set header font. - * @param array $font Array describing the basic font parameters: (family, style, size). - * @phpstan-param array{0: string, 1: string, 2: float|null} $font - * @public - * @since 1.1 - */ - public function setHeaderFont($font) { - $this->header_font = $font; - } - - /** - * Get header font. - * @return array Array describing the basic font parameters: (family, style, size). - * @phpstan-return array{0: string, 1: string, 2: float|null} - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getHeaderFont() { - return $this->header_font; - } - - /** - * Set footer font. - * @param array $font Array describing the basic font parameters: (family, style, size). - * @phpstan-param array{0: string, 1: string, 2: float|null} $font - * @public - * @since 1.1 - */ - public function setFooterFont($font) { - $this->footer_font = $font; - } - - /** - * Get Footer font. - * @return array Array describing the basic font parameters: (family, style, size). - * @phpstan-return array{0: string, 1: string, 2: float|null} $font - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getFooterFont() { - return $this->footer_font; - } - - /** - * Set language array. - * @param array $language - * @public - * @since 1.1 - */ - public function setLanguageArray($language) { - $this->l = $language; - if (isset($this->l['a_meta_dir'])) { - $this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false; - } else { - $this->rtl = false; - } - } - - /** - * Returns the PDF data. - * @public - */ - public function getPDFData() { - if ($this->state < 3) { - $this->Close(); - } - return $this->buffer; - } - - /** - * Output anchor link. - * @param string $url link URL or internal link (i.e.: <a href="#23,4.5">link to page 23 at 4.5 Y position</a>) - * @param string $name link name - * @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false). - * @param boolean $firstline if true prints only the first line and return the remaining string. - * @param array|null $color array of RGB text color - * @param string $style font style (U, D, B, I) - * @param boolean $firstblock if true the string is the starting of a line. - * @return int the number of cells used or the remaining text if $firstline = true; - * @public - */ - public function addHtmlLink($url, $name, $fill=false, $firstline=false, $color=null, $style=-1, $firstblock=false) { - if (isset($url[1]) AND ($url[0] == '#') AND is_numeric($url[1])) { - // convert url to internal link - $lnkdata = explode(',', $url); - if (isset($lnkdata[0]) ) { - $page = substr($lnkdata[0], 1); - if (isset($lnkdata[1]) AND (strlen($lnkdata[1]) > 0)) { - $lnky = floatval($lnkdata[1]); - } else { - $lnky = 0; - } - $url = $this->AddLink(); - $this->setLink($url, $lnky, $page); - } - } - // store current settings - $prevcolor = $this->fgcolor; - $prevstyle = $this->FontStyle; - if (empty($color)) { - $this->setTextColorArray($this->htmlLinkColorArray); - } else { - $this->setTextColorArray($color); - } - if ($style == -1) { - $this->setFont('', $this->FontStyle.$this->htmlLinkFontStyle); - } else { - $this->setFont('', $this->FontStyle.$style); - } - $ret = $this->Write($this->lasth, $name, $url, $fill, '', false, 0, $firstline, $firstblock, 0); - // restore settings - $this->setFont('', $prevstyle); - $this->setTextColorArray($prevcolor); - return $ret; - } - - /** - * Converts pixels to User's Units. - * @param int $px pixels - * @return float value in user's unit - * @public - * @see setImageScale(), getImageScale() - */ - public function pixelsToUnits($px) { - return ($px / ($this->imgscale * $this->k)); - } - - /** - * Reverse function for htmlentities. - * Convert entities in UTF-8. - * @param string $text_to_convert Text to convert. - * @return string converted text string - * @public - */ - public function unhtmlentities($text_to_convert) { - return @html_entity_decode($text_to_convert, ENT_QUOTES, $this->encoding); - } - - // ENCRYPTION METHODS ---------------------------------- - - /** - * Compute encryption key depending on object number where the encrypted data is stored. - * This is used for all strings and streams without crypt filter specifier. - * @param int $n object number - * @return int object key - * @protected - * @author Nicola Asuni - * @since 2.0.000 (2008-01-02) - */ - protected function _objectkey($n) { - $objkey = $this->encryptdata['key'].pack('VXxx', $n); - if ($this->encryptdata['mode'] == 2) { // AES-128 - // AES padding - $objkey .= "\x73\x41\x6C\x54"; // sAlT - } - $objkey = substr(TCPDF_STATIC::_md5_16($objkey), 0, (($this->encryptdata['Length'] / 8) + 5)); - $objkey = substr($objkey, 0, 16); - return $objkey; - } - - /** - * Encrypt the input string. - * @param int $n object number - * @param string $s data string to encrypt - * @return string encrypted string - * @protected - * @author Nicola Asuni - * @since 5.0.005 (2010-05-11) - */ - protected function _encrypt_data($n, $s) { - if (!$this->encrypted) { - return $s; - } - switch ($this->encryptdata['mode']) { - case 0: // RC4-40 - case 1: { // RC4-128 - $s = TCPDF_STATIC::_RC4($this->_objectkey($n), $s, $this->last_enc_key, $this->last_enc_key_c); - break; - } - case 2: { // AES-128 - $s = TCPDF_STATIC::_AES($this->_objectkey($n), $s); - break; - } - case 3: { // AES-256 - $s = TCPDF_STATIC::_AES($this->encryptdata['key'], $s); - break; - } - } - return $s; - } - - /** - * Put encryption on PDF document. - * @protected - * @author Nicola Asuni - * @since 2.0.000 (2008-01-02) - */ - protected function _putencryption() { - if (!$this->encrypted) { - return; - } - $this->encryptdata['objid'] = $this->_newobj(); - $out = '<<'; - if (!isset($this->encryptdata['Filter']) OR empty($this->encryptdata['Filter'])) { - $this->encryptdata['Filter'] = 'Standard'; - } - $out .= ' /Filter /'.$this->encryptdata['Filter']; - if (isset($this->encryptdata['SubFilter']) AND !empty($this->encryptdata['SubFilter'])) { - $out .= ' /SubFilter /'.$this->encryptdata['SubFilter']; - } - if (!isset($this->encryptdata['V']) OR empty($this->encryptdata['V'])) { - $this->encryptdata['V'] = 1; - } - // V is a code specifying the algorithm to be used in encrypting and decrypting the document - $out .= ' /V '.$this->encryptdata['V']; - if (isset($this->encryptdata['Length']) AND !empty($this->encryptdata['Length'])) { - // The length of the encryption key, in bits. The value shall be a multiple of 8, in the range 40 to 256 - $out .= ' /Length '.$this->encryptdata['Length']; - } else { - $out .= ' /Length 40'; - } - if ($this->encryptdata['V'] >= 4) { - if (!isset($this->encryptdata['StmF']) OR empty($this->encryptdata['StmF'])) { - $this->encryptdata['StmF'] = 'Identity'; - } - if (!isset($this->encryptdata['StrF']) OR empty($this->encryptdata['StrF'])) { - // The name of the crypt filter that shall be used when decrypting all strings in the document. - $this->encryptdata['StrF'] = 'Identity'; - } - // A dictionary whose keys shall be crypt filter names and whose values shall be the corresponding crypt filter dictionaries. - if (isset($this->encryptdata['CF']) AND !empty($this->encryptdata['CF'])) { - $out .= ' /CF <<'; - $out .= ' /'.$this->encryptdata['StmF'].' <<'; - $out .= ' /Type /CryptFilter'; - if (isset($this->encryptdata['CF']['CFM']) AND !empty($this->encryptdata['CF']['CFM'])) { - // The method used - $out .= ' /CFM /'.$this->encryptdata['CF']['CFM']; - if ($this->encryptdata['pubkey']) { - $out .= ' /Recipients ['; - foreach ($this->encryptdata['Recipients'] as $rec) { - $out .= ' <'.$rec.'>'; - } - $out .= ' ]'; - if (isset($this->encryptdata['CF']['EncryptMetadata']) AND (!$this->encryptdata['CF']['EncryptMetadata'])) { - $out .= ' /EncryptMetadata false'; - } else { - $out .= ' /EncryptMetadata true'; - } - } - } else { - $out .= ' /CFM /None'; - } - if (isset($this->encryptdata['CF']['AuthEvent']) AND !empty($this->encryptdata['CF']['AuthEvent'])) { - // The event to be used to trigger the authorization that is required to access encryption keys used by this filter. - $out .= ' /AuthEvent /'.$this->encryptdata['CF']['AuthEvent']; - } else { - $out .= ' /AuthEvent /DocOpen'; - } - if (isset($this->encryptdata['CF']['Length']) AND !empty($this->encryptdata['CF']['Length'])) { - // The bit length of the encryption key. - $out .= ' /Length '.$this->encryptdata['CF']['Length']; - } - $out .= ' >> >>'; - } - // The name of the crypt filter that shall be used by default when decrypting streams. - $out .= ' /StmF /'.$this->encryptdata['StmF']; - // The name of the crypt filter that shall be used when decrypting all strings in the document. - $out .= ' /StrF /'.$this->encryptdata['StrF']; - if (isset($this->encryptdata['EFF']) AND !empty($this->encryptdata['EFF'])) { - // The name of the crypt filter that shall be used when encrypting embedded file streams that do not have their own crypt filter specifier. - $out .= ' /EFF /'.$this->encryptdata['']; - } - } - // Additional encryption dictionary entries for the standard security handler - if ($this->encryptdata['pubkey']) { - if (($this->encryptdata['V'] < 4) AND isset($this->encryptdata['Recipients']) AND !empty($this->encryptdata['Recipients'])) { - $out .= ' /Recipients ['; - foreach ($this->encryptdata['Recipients'] as $rec) { - $out .= ' <'.$rec.'>'; - } - $out .= ' ]'; - } - } else { - $out .= ' /R'; - if ($this->encryptdata['V'] == 5) { // AES-256 - $out .= ' 5'; - $out .= ' /OE ('.TCPDF_STATIC::_escape($this->encryptdata['OE']).')'; - $out .= ' /UE ('.TCPDF_STATIC::_escape($this->encryptdata['UE']).')'; - $out .= ' /Perms ('.TCPDF_STATIC::_escape($this->encryptdata['perms']).')'; - } elseif ($this->encryptdata['V'] == 4) { // AES-128 - $out .= ' 4'; - } elseif ($this->encryptdata['V'] < 2) { // RC-40 - $out .= ' 2'; - } else { // RC-128 - $out .= ' 3'; - } - $out .= ' /O ('.TCPDF_STATIC::_escape($this->encryptdata['O']).')'; - $out .= ' /U ('.TCPDF_STATIC::_escape($this->encryptdata['U']).')'; - $out .= ' /P '.$this->encryptdata['P']; - if (isset($this->encryptdata['EncryptMetadata']) AND (!$this->encryptdata['EncryptMetadata'])) { - $out .= ' /EncryptMetadata false'; - } else { - $out .= ' /EncryptMetadata true'; - } - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Compute U value (used for encryption) - * @return string U value - * @protected - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - protected function _Uvalue() { - if ($this->encryptdata['mode'] == 0) { // RC4-40 - return TCPDF_STATIC::_RC4($this->encryptdata['key'], TCPDF_STATIC::$enc_padding, $this->last_enc_key, $this->last_enc_key_c); - } elseif ($this->encryptdata['mode'] < 3) { // RC4-128, AES-128 - $tmp = TCPDF_STATIC::_md5_16(TCPDF_STATIC::$enc_padding.$this->encryptdata['fileid']); - $enc = TCPDF_STATIC::_RC4($this->encryptdata['key'], $tmp, $this->last_enc_key, $this->last_enc_key_c); - $len = strlen($tmp); - for ($i = 1; $i <= 19; ++$i) { - $ek = ''; - for ($j = 0; $j < $len; ++$j) { - $ek .= chr(ord($this->encryptdata['key'][$j]) ^ $i); - } - $enc = TCPDF_STATIC::_RC4($ek, $enc, $this->last_enc_key, $this->last_enc_key_c); - } - $enc .= str_repeat("\x00", 16); - return substr($enc, 0, 32); - } elseif ($this->encryptdata['mode'] == 3) { // AES-256 - $seed = TCPDF_STATIC::_md5_16(TCPDF_STATIC::getRandomSeed()); - // User Validation Salt - $this->encryptdata['UVS'] = substr($seed, 0, 8); - // User Key Salt - $this->encryptdata['UKS'] = substr($seed, 8, 16); - return hash('sha256', $this->encryptdata['user_password'].$this->encryptdata['UVS'], true).$this->encryptdata['UVS'].$this->encryptdata['UKS']; - } - } - - /** - * Compute UE value (used for encryption) - * @return string UE value - * @protected - * @since 5.9.006 (2010-10-19) - * @author Nicola Asuni - */ - protected function _UEvalue() { - $hashkey = hash('sha256', $this->encryptdata['user_password'].$this->encryptdata['UKS'], true); - return TCPDF_STATIC::_AESnopad($hashkey, $this->encryptdata['key']); - } - - /** - * Compute O value (used for encryption) - * @return string O value - * @protected - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - protected function _Ovalue() { - if ($this->encryptdata['mode'] < 3) { // RC4-40, RC4-128, AES-128 - $tmp = TCPDF_STATIC::_md5_16($this->encryptdata['owner_password']); - if ($this->encryptdata['mode'] > 0) { - for ($i = 0; $i < 50; ++$i) { - $tmp = TCPDF_STATIC::_md5_16($tmp); - } - } - $owner_key = substr($tmp, 0, ($this->encryptdata['Length'] / 8)); - $enc = TCPDF_STATIC::_RC4($owner_key, $this->encryptdata['user_password'], $this->last_enc_key, $this->last_enc_key_c); - if ($this->encryptdata['mode'] > 0) { - $len = strlen($owner_key); - for ($i = 1; $i <= 19; ++$i) { - $ek = ''; - for ($j = 0; $j < $len; ++$j) { - $ek .= chr(ord($owner_key[$j]) ^ $i); - } - $enc = TCPDF_STATIC::_RC4($ek, $enc, $this->last_enc_key, $this->last_enc_key_c); - } - } - return $enc; - } elseif ($this->encryptdata['mode'] == 3) { // AES-256 - $seed = TCPDF_STATIC::_md5_16(TCPDF_STATIC::getRandomSeed()); - // Owner Validation Salt - $this->encryptdata['OVS'] = substr($seed, 0, 8); - // Owner Key Salt - $this->encryptdata['OKS'] = substr($seed, 8, 16); - return hash('sha256', $this->encryptdata['owner_password'].$this->encryptdata['OVS'].$this->encryptdata['U'], true).$this->encryptdata['OVS'].$this->encryptdata['OKS']; - } - } - - /** - * Compute OE value (used for encryption) - * @return string OE value - * @protected - * @since 5.9.006 (2010-10-19) - * @author Nicola Asuni - */ - protected function _OEvalue() { - $hashkey = hash('sha256', $this->encryptdata['owner_password'].$this->encryptdata['OKS'].$this->encryptdata['U'], true); - return TCPDF_STATIC::_AESnopad($hashkey, $this->encryptdata['key']); - } - - /** - * Convert password for AES-256 encryption mode - * @param string $password password - * @return string password - * @protected - * @since 5.9.006 (2010-10-19) - * @author Nicola Asuni - */ - protected function _fixAES256Password($password) { - $psw = ''; // password to be returned - $psw_array = TCPDF_FONTS::utf8Bidi(TCPDF_FONTS::UTF8StringToArray($password, $this->isunicode, $this->CurrentFont), $password, $this->rtl, $this->isunicode, $this->CurrentFont); - foreach ($psw_array as $c) { - $psw .= TCPDF_FONTS::unichr($c, $this->isunicode); - } - return substr($psw, 0, 127); - } - - /** - * Compute encryption key - * @protected - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - protected function _generateencryptionkey() { - $keybytelen = ($this->encryptdata['Length'] / 8); - if (!$this->encryptdata['pubkey']) { // standard mode - if ($this->encryptdata['mode'] == 3) { // AES-256 - // generate 256 bit random key - $this->encryptdata['key'] = substr(hash('sha256', TCPDF_STATIC::getRandomSeed(), true), 0, $keybytelen); - // truncate passwords - $this->encryptdata['user_password'] = $this->_fixAES256Password($this->encryptdata['user_password']); - $this->encryptdata['owner_password'] = $this->_fixAES256Password($this->encryptdata['owner_password']); - // Compute U value - $this->encryptdata['U'] = $this->_Uvalue(); - // Compute UE value - $this->encryptdata['UE'] = $this->_UEvalue(); - // Compute O value - $this->encryptdata['O'] = $this->_Ovalue(); - // Compute OE value - $this->encryptdata['OE'] = $this->_OEvalue(); - // Compute P value - $this->encryptdata['P'] = $this->encryptdata['protection']; - // Computing the encryption dictionary's Perms (permissions) value - $perms = TCPDF_STATIC::getEncPermissionsString($this->encryptdata['protection']); // bytes 0-3 - $perms .= chr(255).chr(255).chr(255).chr(255); // bytes 4-7 - if (isset($this->encryptdata['CF']['EncryptMetadata']) AND (!$this->encryptdata['CF']['EncryptMetadata'])) { // byte 8 - $perms .= 'F'; - } else { - $perms .= 'T'; - } - $perms .= 'adb'; // bytes 9-11 - $perms .= 'nick'; // bytes 12-15 - $this->encryptdata['perms'] = TCPDF_STATIC::_AESnopad($this->encryptdata['key'], $perms); - } else { // RC4-40, RC4-128, AES-128 - // Pad passwords - $this->encryptdata['user_password'] = substr($this->encryptdata['user_password'].TCPDF_STATIC::$enc_padding, 0, 32); - $this->encryptdata['owner_password'] = substr($this->encryptdata['owner_password'].TCPDF_STATIC::$enc_padding, 0, 32); - // Compute O value - $this->encryptdata['O'] = $this->_Ovalue(); - // get default permissions (reverse byte order) - $permissions = TCPDF_STATIC::getEncPermissionsString($this->encryptdata['protection']); - // Compute encryption key - $tmp = TCPDF_STATIC::_md5_16($this->encryptdata['user_password'].$this->encryptdata['O'].$permissions.$this->encryptdata['fileid']); - if ($this->encryptdata['mode'] > 0) { - for ($i = 0; $i < 50; ++$i) { - $tmp = TCPDF_STATIC::_md5_16(substr($tmp, 0, $keybytelen)); - } - } - $this->encryptdata['key'] = substr($tmp, 0, $keybytelen); - // Compute U value - $this->encryptdata['U'] = $this->_Uvalue(); - // Compute P value - $this->encryptdata['P'] = $this->encryptdata['protection']; - } - } else { // Public-Key mode - // random 20-byte seed - $seed = sha1(TCPDF_STATIC::getRandomSeed(), true); - $recipient_bytes = ''; - foreach ($this->encryptdata['pubkeys'] as $pubkey) { - // for each public certificate - if (isset($pubkey['p'])) { - $pkprotection = TCPDF_STATIC::getUserPermissionCode($pubkey['p'], $this->encryptdata['mode']); - } else { - $pkprotection = $this->encryptdata['protection']; - } - // get default permissions (reverse byte order) - $pkpermissions = TCPDF_STATIC::getEncPermissionsString($pkprotection); - // envelope data - $envelope = $seed.$pkpermissions; - // write the envelope data to a temporary file - $tempkeyfile = TCPDF_STATIC::getObjFilename('key', $this->file_id); - $f = TCPDF_STATIC::fopenLocal($tempkeyfile, 'wb'); - if (!$f) { - $this->Error('Unable to create temporary key file: '.$tempkeyfile); - } - $envelope_length = strlen($envelope); - fwrite($f, $envelope, $envelope_length); - fclose($f); - $tempencfile = TCPDF_STATIC::getObjFilename('enc', $this->file_id); - if (!openssl_pkcs7_encrypt($tempkeyfile, $tempencfile, $pubkey['c'], array(), PKCS7_BINARY | PKCS7_DETACHED)) { - $this->Error('Unable to encrypt the file: '.$tempkeyfile); - } - // read encryption signature - $signature = file_get_contents($tempencfile, false, null, $envelope_length); - // extract signature - $signature = substr($signature, strpos($signature, 'Content-Disposition')); - $tmparr = explode("\n\n", $signature); - $signature = trim($tmparr[1]); - unset($tmparr); - // decode signature - $signature = base64_decode($signature); - // convert signature to hex - $hexsignature = current(unpack('H*', $signature)); - // store signature on recipients array - $this->encryptdata['Recipients'][] = $hexsignature; - // The bytes of each item in the Recipients array of PKCS#7 objects in the order in which they appear in the array - $recipient_bytes .= $signature; - } - // calculate encryption key - if ($this->encryptdata['mode'] == 3) { // AES-256 - $this->encryptdata['key'] = substr(hash('sha256', $seed.$recipient_bytes, true), 0, $keybytelen); - } else { // RC4-40, RC4-128, AES-128 - $this->encryptdata['key'] = substr(sha1($seed.$recipient_bytes, true), 0, $keybytelen); - } - } - } - - /** - * Set document protection - * Remark: the protection against modification is for people who have the full Acrobat product. - * If you don't set any password, the document will open as usual. If you set a user password, the PDF viewer will ask for it before displaying the document. The master password, if different from the user one, can be used to get full access. - * Note: protecting a document requires to encrypt it, which increases the processing time a lot. This can cause a PHP time-out in some cases, especially if the document contains images or fonts. - * @param array $permissions the set of permissions (specify the ones you want to block):
      • print : Print the document;
      • modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble';
      • copy : Copy or otherwise extract text and graphics from the document;
      • annot-forms : Add or modify text annotations, fill in interactive form fields, and, if 'modify' is also set, create or modify interactive form fields (including signature fields);
      • fill-forms : Fill in existing interactive form fields (including signature fields), even if 'annot-forms' is not specified;
      • extract : Extract text and graphics (in support of accessibility to users with disabilities or for other purposes);
      • assemble : Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if 'modify' is not set;
      • print-high : Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this is not set, printing is limited to a low-level representation of the appearance, possibly of degraded quality.
      • owner : (inverted logic - only for public-key) when set permits change of encryption and enables all other permissions.
      - * @param string $user_pass user password. Empty by default. - * @param string|null $owner_pass owner password. If not specified, a random value is used. - * @param int $mode encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit. - * @param array|null $pubkeys array of recipients containing public-key certificates ('c') and permissions ('p'). For example: array(array('c' => 'file://../examples/data/cert/tcpdf.crt', 'p' => array('print'))) - * @public - * @since 2.0.000 (2008-01-02) - * @author Nicola Asuni - */ - public function setProtection($permissions=array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), $user_pass='', $owner_pass=null, $mode=0, $pubkeys=null) { - if ($this->pdfa_mode) { - // encryption is not allowed in PDF/A mode - return; - } - $this->encryptdata['protection'] = TCPDF_STATIC::getUserPermissionCode($permissions, $mode); - if (($pubkeys !== null) AND (is_array($pubkeys))) { - // public-key mode - $this->encryptdata['pubkeys'] = $pubkeys; - if ($mode == 0) { - // public-Key Security requires at least 128 bit - $mode = 1; - } - if (!function_exists('openssl_pkcs7_encrypt')) { - $this->Error('Public-Key Security requires openssl library.'); - } - // Set Public-Key filter (available are: Entrust.PPKEF, Adobe.PPKLite, Adobe.PubSec) - $this->encryptdata['pubkey'] = true; - $this->encryptdata['Filter'] = 'Adobe.PubSec'; - $this->encryptdata['StmF'] = 'DefaultCryptFilter'; - $this->encryptdata['StrF'] = 'DefaultCryptFilter'; - } else { - // standard mode (password mode) - $this->encryptdata['pubkey'] = false; - $this->encryptdata['Filter'] = 'Standard'; - $this->encryptdata['StmF'] = 'StdCF'; - $this->encryptdata['StrF'] = 'StdCF'; - } - if ($mode > 1) { // AES - if (!extension_loaded('openssl') && !extension_loaded('mcrypt')) { - $this->Error('AES encryption requires openssl or mcrypt extension (http://www.php.net/manual/en/mcrypt.requirements.php).'); - } - if (extension_loaded('openssl') && !in_array('aes-256-cbc', openssl_get_cipher_methods())) { - $this->Error('AES encryption requires openssl/aes-256-cbc cypher.'); - } - if (extension_loaded('mcrypt') && mcrypt_get_cipher_name(MCRYPT_RIJNDAEL_128) === false) { - $this->Error('AES encryption requires MCRYPT_RIJNDAEL_128 cypher.'); - } - if (($mode == 3) AND !function_exists('hash')) { - // the Hash extension requires no external libraries and is enabled by default as of PHP 5.1.2. - $this->Error('AES 256 encryption requires HASH Message Digest Framework (http://www.php.net/manual/en/book.hash.php).'); - } - } - if ($owner_pass === null) { - $owner_pass = md5(TCPDF_STATIC::getRandomSeed()); - } - $this->encryptdata['user_password'] = $user_pass; - $this->encryptdata['owner_password'] = $owner_pass; - $this->encryptdata['mode'] = $mode; - switch ($mode) { - case 0: { // RC4 40 bit - $this->encryptdata['V'] = 1; - $this->encryptdata['Length'] = 40; - $this->encryptdata['CF']['CFM'] = 'V2'; - break; - } - case 1: { // RC4 128 bit - $this->encryptdata['V'] = 2; - $this->encryptdata['Length'] = 128; - $this->encryptdata['CF']['CFM'] = 'V2'; - if ($this->encryptdata['pubkey']) { - $this->encryptdata['SubFilter'] = 'adbe.pkcs7.s4'; - $this->encryptdata['Recipients'] = array(); - } - break; - } - case 2: { // AES 128 bit - $this->encryptdata['V'] = 4; - $this->encryptdata['Length'] = 128; - $this->encryptdata['CF']['CFM'] = 'AESV2'; - $this->encryptdata['CF']['Length'] = 128; - if ($this->encryptdata['pubkey']) { - $this->encryptdata['SubFilter'] = 'adbe.pkcs7.s5'; - $this->encryptdata['Recipients'] = array(); - } - break; - } - case 3: { // AES 256 bit - $this->encryptdata['V'] = 5; - $this->encryptdata['Length'] = 256; - $this->encryptdata['CF']['CFM'] = 'AESV3'; - $this->encryptdata['CF']['Length'] = 256; - if ($this->encryptdata['pubkey']) { - $this->encryptdata['SubFilter'] = 'adbe.pkcs7.s5'; - $this->encryptdata['Recipients'] = array(); - } - break; - } - } - $this->encrypted = true; - $this->encryptdata['fileid'] = TCPDF_STATIC::convertHexStringToString($this->file_id); - $this->_generateencryptionkey(); - } - - // END OF ENCRYPTION FUNCTIONS ------------------------- - - // START TRANSFORMATIONS SECTION ----------------------- - - /** - * Starts a 2D tranformation saving current graphic state. - * This function must be called before scaling, mirroring, translation, rotation and skewing. - * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior. - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function StartTransform() { - if ($this->state != 2) { - return; - } - $this->_outSaveGraphicsState(); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['transfmrk'][] = strlen($this->xobjects[$this->xobjid]['outdata']); - } else { - $this->transfmrk[$this->page][] = $this->pagelen[$this->page]; - } - ++$this->transfmatrix_key; - $this->transfmatrix[$this->transfmatrix_key] = array(); - } - - /** - * Stops a 2D tranformation restoring previous graphic state. - * This function must be called after scaling, mirroring, translation, rotation and skewing. - * Use StartTransform() before, and StopTransform() after the transformations to restore the normal behavior. - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function StopTransform() { - if ($this->state != 2) { - return; - } - $this->_outRestoreGraphicsState(); - if (isset($this->transfmatrix[$this->transfmatrix_key])) { - array_pop($this->transfmatrix[$this->transfmatrix_key]); - --$this->transfmatrix_key; - } - if ($this->inxobj) { - // we are inside an XObject template - array_pop($this->xobjects[$this->xobjid]['transfmrk']); - } else { - array_pop($this->transfmrk[$this->page]); - } - } - /** - * Horizontal Scaling. - * @param float $s_x scaling factor for width as percent. 0 is not allowed. - * @param int $x abscissa of the scaling center. Default is current x position - * @param int $y ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function ScaleX($s_x, $x='', $y='') { - $this->Scale($s_x, 100, $x, $y); - } - - /** - * Vertical Scaling. - * @param float $s_y scaling factor for height as percent. 0 is not allowed. - * @param int $x abscissa of the scaling center. Default is current x position - * @param int $y ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function ScaleY($s_y, $x='', $y='') { - $this->Scale(100, $s_y, $x, $y); - } - - /** - * Vertical and horizontal proportional Scaling. - * @param float $s scaling factor for width and height as percent. 0 is not allowed. - * @param int $x abscissa of the scaling center. Default is current x position - * @param int $y ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function ScaleXY($s, $x='', $y='') { - $this->Scale($s, $s, $x, $y); - } - - /** - * Vertical and horizontal non-proportional Scaling. - * @param float $s_x scaling factor for width as percent. 0 is not allowed. - * @param float $s_y scaling factor for height as percent. 0 is not allowed. - * @param float|null $x abscissa of the scaling center. Default is current x position - * @param float|null $y ordinate of the scaling center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Scale($s_x, $s_y, $x=null, $y=null) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - if (($s_x == 0) OR ($s_y == 0)) { - $this->Error('Please do not use values equal to zero for scaling'); - } - $y = ($this->h - $y) * $this->k; - $x *= $this->k; - //calculate elements of transformation matrix - $s_x /= 100; - $s_y /= 100; - $tm = array(); - $tm[0] = $s_x; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = $s_y; - $tm[4] = $x * (1 - $s_x); - $tm[5] = $y * (1 - $s_y); - //scale the coordinate system - $this->Transform($tm); - } - - /** - * Horizontal Mirroring. - * @param float|null $x abscissa of the point. Default is current x position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorH($x=null) { - $this->Scale(-100, 100, $x); - } - - /** - * Verical Mirroring. - * @param float|null $y ordinate of the point. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorV($y=null) { - $this->Scale(100, -100, null, $y); - } - - /** - * Point reflection mirroring. - * @param float|null $x abscissa of the point. Default is current x position - * @param float|null $y ordinate of the point. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorP($x=null,$y=null) { - $this->Scale(-100, -100, $x, $y); - } - - /** - * Reflection against a straight line through point (x, y) with the gradient angle (angle). - * @param float $angle gradient angle of the straight line. Default is 0 (horizontal line). - * @param float|null $x abscissa of the point. Default is current x position - * @param float|null $y ordinate of the point. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function MirrorL($angle=0, $x=null,$y=null) { - $this->Scale(-100, 100, $x, $y); - $this->Rotate(-2*($angle-90), $x, $y); - } - - /** - * Translate graphic object horizontally. - * @param int $t_x movement to the right (or left for RTL) - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function TranslateX($t_x) { - $this->Translate($t_x, 0); - } - - /** - * Translate graphic object vertically. - * @param int $t_y movement to the bottom - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function TranslateY($t_y) { - $this->Translate(0, $t_y); - } - - /** - * Translate graphic object horizontally and vertically. - * @param int $t_x movement to the right - * @param int $t_y movement to the bottom - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Translate($t_x, $t_y) { - //calculate elements of transformation matrix - $tm = array(); - $tm[0] = 1; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = 1; - $tm[4] = $t_x * $this->k; - $tm[5] = -$t_y * $this->k; - //translate the coordinate system - $this->Transform($tm); - } - - /** - * Rotate object. - * @param float $angle angle in degrees for counter-clockwise rotation - * @param float|null $x abscissa of the rotation center. Default is current x position - * @param float|null $y ordinate of the rotation center. Default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Rotate($angle, $x=null, $y=null) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - $y = ($this->h - $y) * $this->k; - $x *= $this->k; - //calculate elements of transformation matrix - $tm = array(); - $tm[0] = cos(deg2rad($angle)); - $tm[1] = sin(deg2rad($angle)); - $tm[2] = -$tm[1]; - $tm[3] = $tm[0]; - $tm[4] = $x + ($tm[1] * $y) - ($tm[0] * $x); - $tm[5] = $y - ($tm[0] * $y) - ($tm[1] * $x); - //rotate the coordinate system around ($x,$y) - $this->Transform($tm); - } - - /** - * Skew horizontally. - * @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right) - * @param float|null $x abscissa of the skewing center. default is current x position - * @param float|null $y ordinate of the skewing center. default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function SkewX($angle_x, $x=null, $y=null) { - $this->Skew($angle_x, 0, $x, $y); - } - - /** - * Skew vertically. - * @param float $angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) - * @param float|null $x abscissa of the skewing center. default is current x position - * @param float|null $y ordinate of the skewing center. default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function SkewY($angle_y, $x=null, $y=null) { - $this->Skew(0, $angle_y, $x, $y); - } - - /** - * Skew. - * @param float $angle_x angle in degrees between -90 (skew to the left) and 90 (skew to the right) - * @param float $angle_y angle in degrees between -90 (skew to the bottom) and 90 (skew to the top) - * @param float|null $x abscissa of the skewing center. default is current x position - * @param float|null $y ordinate of the skewing center. default is current y position - * @public - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - public function Skew($angle_x, $angle_y, $x=null, $y=null) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - if (($angle_x <= -90) OR ($angle_x >= 90) OR ($angle_y <= -90) OR ($angle_y >= 90)) { - $this->Error('Please use values between -90 and +90 degrees for Skewing.'); - } - $x *= $this->k; - $y = ($this->h - $y) * $this->k; - //calculate elements of transformation matrix - $tm = array(); - $tm[0] = 1; - $tm[1] = tan(deg2rad($angle_y)); - $tm[2] = tan(deg2rad($angle_x)); - $tm[3] = 1; - $tm[4] = -$tm[2] * $y; - $tm[5] = -$tm[1] * $x; - //skew the coordinate system - $this->Transform($tm); - } - - /** - * Apply graphic transformations. - * @param array $tm transformation matrix - * @protected - * @since 2.1.000 (2008-01-07) - * @see StartTransform(), StopTransform() - */ - protected function Transform($tm) { - if ($this->state != 2) { - return; - } - $this->_out(sprintf('%F %F %F %F %F %F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5])); - // add tranformation matrix - $this->transfmatrix[$this->transfmatrix_key][] = array('a' => $tm[0], 'b' => $tm[1], 'c' => $tm[2], 'd' => $tm[3], 'e' => $tm[4], 'f' => $tm[5]); - // update transformation mark - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $key = key($this->xobjects[$this->xobjid]['transfmrk']); - $this->xobjects[$this->xobjid]['transfmrk'][$key] = strlen($this->xobjects[$this->xobjid]['outdata']); - } - } elseif (end($this->transfmrk[$this->page]) !== false) { - $key = key($this->transfmrk[$this->page]); - $this->transfmrk[$this->page][$key] = $this->pagelen[$this->page]; - } - } - - // END TRANSFORMATIONS SECTION ------------------------- - - // START GRAPHIC FUNCTIONS SECTION --------------------- - // The following section is based on the code provided by David Hernandez Sanz - - /** - * Defines the line width. By default, the value equals 0.2 mm. The method can be called before the first page is created and the value is retained from page to page. - * @param float $width The width. - * @public - * @since 1.0 - * @see Line(), Rect(), Cell(), MultiCell() - */ - public function setLineWidth($width) { - //Set line width - $this->LineWidth = $width; - $this->linestyleWidth = sprintf('%F w', ($width * $this->k)); - if ($this->state == 2) { - $this->_out($this->linestyleWidth); - } - } - - /** - * Returns the current the line width. - * @return int Line width - * @public - * @since 2.1.000 (2008-01-07) - * @see Line(), SetLineWidth() - */ - public function GetLineWidth() { - return $this->LineWidth; - } - - /** - * Set line style. - * @param array $style Line style. Array with keys among the following: - *
        - *
      • width (float): Width of the line in user units.
      • - *
      • cap (string): Type of cap to put on the line. Possible values are: - * butt, round, square. The difference between "square" and "butt" is that - * "square" projects a flat end past the end of the line.
      • - *
      • join (string): Type of join. Possible values are: miter, round, - * bevel.
      • - *
      • dash (mixed): Dash pattern. Is 0 (without dash) or string with - * series of length values, which are the lengths of the on and off dashes. - * For example: "2" represents 2 on, 2 off, 2 on, 2 off, ...; "2,1" is 2 on, - * 1 off, 2 on, 1 off, ...
      • - *
      • phase (integer): Modifier on the dash pattern which is used to shift - * the point at which the pattern starts.
      • - *
      • color (array): Draw color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName).
      • - *
      - * @param boolean $ret if true do not send the command. - * @return string the PDF command - * @public - * @since 2.1.000 (2008-01-08) - */ - public function setLineStyle($style, $ret=false) { - $s = ''; // string to be returned - if (!is_array($style)) { - return $s; - } - if (isset($style['width'])) { - $this->LineWidth = $style['width']; - $this->linestyleWidth = sprintf('%F w', ($style['width'] * $this->k)); - $s .= $this->linestyleWidth.' '; - } - if (isset($style['cap'])) { - $ca = array('butt' => 0, 'round'=> 1, 'square' => 2); - if (isset($ca[$style['cap']])) { - $this->linestyleCap = $ca[$style['cap']].' J'; - $s .= $this->linestyleCap.' '; - } - } - if (isset($style['join'])) { - $ja = array('miter' => 0, 'round' => 1, 'bevel' => 2); - if (isset($ja[$style['join']])) { - $this->linestyleJoin = $ja[$style['join']].' j'; - $s .= $this->linestyleJoin.' '; - } - } - if (isset($style['dash'])) { - $dash_string = ''; - if ($style['dash']) { - if (preg_match('/^.+,/', $style['dash']) > 0) { - $tab = explode(',', $style['dash']); - } else { - $tab = array($style['dash']); - } - $dash_string = ''; - foreach ($tab as $i => $v) { - if ($i) { - $dash_string .= ' '; - } - $dash_string .= sprintf('%F', $v); - } - } - if (!isset($style['phase']) OR !$style['dash']) { - $style['phase'] = 0; - } - $this->linestyleDash = sprintf('[%s] %F d', $dash_string, $style['phase']); - $s .= $this->linestyleDash.' '; - } - if (isset($style['color'])) { - $s .= $this->setDrawColorArray($style['color'], true).' '; - } - if (!$ret AND ($this->state == 2)) { - $this->_out($s); - } - return $s; - } - - /** - * Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment. - * @param float $x Abscissa of point. - * @param float $y Ordinate of point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outPoint($x, $y) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F m', ($x * $this->k), (($this->h - $y) * $this->k))); - } - } - - /** - * Append a straight line segment from the current point to the point (x, y). - * The new current point shall be (x, y). - * @param float $x Abscissa of end point. - * @param float $y Ordinate of end point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outLine($x, $y) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F l', ($x * $this->k), (($this->h - $y) * $this->k))); - } - } - - /** - * Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions widthand height in user space. - * @param float $x Abscissa of upper-left corner. - * @param float $y Ordinate of upper-left corner. - * @param float $w Width. - * @param float $h Height. - * @param string $op options - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outRect($x, $y, $w, $h, $op) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F re %s', ($x * $this->k), (($this->h - $y) * $this->k), ($w * $this->k), (-$h * $this->k), $op)); - } - } - - /** - * Append a cubic Bezier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bezier control points. - * The new current point shall be (x3, y3). - * @param float $x1 Abscissa of control point 1. - * @param float $y1 Ordinate of control point 1. - * @param float $x2 Abscissa of control point 2. - * @param float $y2 Ordinate of control point 2. - * @param float $x3 Abscissa of end point. - * @param float $y3 Ordinate of end point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outCurve($x1, $y1, $x2, $y2, $x3, $y3) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F %F %F c', ($x1 * $this->k), (($this->h - $y1) * $this->k), ($x2 * $this->k), (($this->h - $y2) * $this->k), ($x3 * $this->k), (($this->h - $y3) * $this->k))); - } - } - - /** - * Append a cubic Bezier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bezier control points. - * The new current point shall be (x3, y3). - * @param float $x2 Abscissa of control point 2. - * @param float $y2 Ordinate of control point 2. - * @param float $x3 Abscissa of end point. - * @param float $y3 Ordinate of end point. - * @protected - * @since 4.9.019 (2010-04-26) - */ - protected function _outCurveV($x2, $y2, $x3, $y3) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F v', ($x2 * $this->k), (($this->h - $y2) * $this->k), ($x3 * $this->k), (($this->h - $y3) * $this->k))); - } - } - - /** - * Append a cubic Bezier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bezier control points. - * The new current point shall be (x3, y3). - * @param float $x1 Abscissa of control point 1. - * @param float $y1 Ordinate of control point 1. - * @param float $x3 Abscissa of end point. - * @param float $y3 Ordinate of end point. - * @protected - * @since 2.1.000 (2008-01-08) - */ - protected function _outCurveY($x1, $y1, $x3, $y3) { - if ($this->state == 2) { - $this->_out(sprintf('%F %F %F %F y', ($x1 * $this->k), (($this->h - $y1) * $this->k), ($x3 * $this->k), (($this->h - $y3) * $this->k))); - } - } - - /** - * Draws a line between two points. - * @param float $x1 Abscissa of first point. - * @param float $y1 Ordinate of first point. - * @param float $x2 Abscissa of second point. - * @param float $y2 Ordinate of second point. - * @param array $style Line style. Array like for SetLineStyle(). Default value: default line style (empty array). - * @public - * @since 1.0 - * @see SetLineWidth(), SetDrawColor(), SetLineStyle() - */ - public function Line($x1, $y1, $x2, $y2, $style=array()) { - if ($this->state != 2) { - return; - } - if (is_array($style)) { - $this->setLineStyle($style); - } - $this->_outPoint($x1, $y1); - $this->_outLine($x2, $y2); - $this->_out('S'); - } - - /** - * Draws a rectangle. - * @param float $x Abscissa of upper-left corner. - * @param float $y Ordinate of upper-left corner. - * @param float $w Width. - * @param float $h Height. - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $border_style Border style of rectangle. Array with keys among the following: - *
        - *
      • all: Line style of all borders. Array like for SetLineStyle().
      • - *
      • L, T, R, B or combinations: Line style of left, top, right or bottom border. Array like for SetLineStyle().
      • - *
      - * If a key is not present or is null, the correspondent border is not drawn. Default value: default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @since 1.0 - * @see SetLineStyle() - */ - public function Rect($x, $y, $w, $h, $style='', $border_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (empty($style)) { - $style = 'S'; - } - if (!(strpos($style, 'F') === false) AND !empty($fill_color)) { - // set background color - $this->setFillColorArray($fill_color); - } - if (!empty($border_style)) { - if (isset($border_style['all']) AND !empty($border_style['all'])) { - //set global style for border - $this->setLineStyle($border_style['all']); - $border_style = array(); - } else { - // remove stroke operator from style - $opnostroke = array('S' => '', 'D' => '', 's' => '', 'd' => '', 'B' => 'F', 'FD' => 'F', 'DF' => 'F', 'B*' => 'F*', 'F*D' => 'F*', 'DF*' => 'F*', 'b' => 'f', 'fd' => 'f', 'df' => 'f', 'b*' => 'f*', 'f*d' => 'f*', 'df*' => 'f*' ); - if (isset($opnostroke[$style])) { - $style = $opnostroke[$style]; - } - } - } - if (!empty($style)) { - $op = TCPDF_STATIC::getPathPaintOperator($style); - $this->_outRect($x, $y, $w, $h, $op); - } - if (!empty($border_style)) { - $border_style2 = array(); - foreach ($border_style as $line => $value) { - $length = strlen($line); - for ($i = 0; $i < $length; ++$i) { - $border_style2[$line[$i]] = $value; - } - } - $border_style = $border_style2; - if (isset($border_style['L']) AND $border_style['L']) { - $this->Line($x, $y, $x, $y + $h, $border_style['L']); - } - if (isset($border_style['T']) AND $border_style['T']) { - $this->Line($x, $y, $x + $w, $y, $border_style['T']); - } - if (isset($border_style['R']) AND $border_style['R']) { - $this->Line($x + $w, $y, $x + $w, $y + $h, $border_style['R']); - } - if (isset($border_style['B']) AND $border_style['B']) { - $this->Line($x, $y + $h, $x + $w, $y + $h, $border_style['B']); - } - } - } - - /** - * Draws a Bezier curve. - * The Bezier curve is a tangent to the line between the control points at - * either end of the curve. - * @param float $x0 Abscissa of start point. - * @param float $y0 Ordinate of start point. - * @param float $x1 Abscissa of control point 1. - * @param float $y1 Ordinate of control point 1. - * @param float $x2 Abscissa of control point 2. - * @param float $y2 Ordinate of control point 2. - * @param float $x3 Abscissa of end point. - * @param float $y3 Ordinate of end point. - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of curve. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @see SetLineStyle() - * @since 2.1.000 (2008-01-08) - */ - public function Curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3, $style='', $line_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->setFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($line_style) { - $this->setLineStyle($line_style); - } - $this->_outPoint($x0, $y0); - $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3); - $this->_out($op); - } - - /** - * Draws a poly-Bezier curve. - * Each Bezier curve segment is a tangent to the line between the control points at - * either end of the curve. - * @param float $x0 Abscissa of start point. - * @param float $y0 Ordinate of start point. - * @param float[] $segments An array of bezier descriptions. Format: array(x1, y1, x2, y2, x3, y3). - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of curve. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @see SetLineStyle() - * @since 3.0008 (2008-05-12) - */ - public function Polycurve($x0, $y0, $segments, $style='', $line_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->setFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - if ($line_style) { - $this->setLineStyle($line_style); - } - $this->_outPoint($x0, $y0); - foreach ($segments as $segment) { - list($x1, $y1, $x2, $y2, $x3, $y3) = $segment; - $this->_outCurve($x1, $y1, $x2, $y2, $x3, $y3); - } - $this->_out($op); - } - - /** - * Draws an ellipse. - * An ellipse is formed from n Bezier curves. - * @param float $x0 Abscissa of center point. - * @param float $y0 Ordinate of center point. - * @param float $rx Horizontal radius. - * @param float $ry Vertical radius (if ry = 0 then is a circle, see Circle()). Default value: 0. - * @param float $angle Angle oriented (anti-clockwise). Default value: 0. - * @param float $astart Angle start of draw line. Default value: 0. - * @param float $afinish Angle finish of draw line. Default value: 360. - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of ellipse. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @param integer $nc Number of curves used to draw a 90 degrees portion of ellipse. - * @author Nicola Asuni - * @public - * @since 2.1.000 (2008-01-08) - */ - public function Ellipse($x0, $y0, $rx, $ry=0, $angle=0, $astart=0, $afinish=360, $style='', $line_style=array(), $fill_color=array(), $nc=2) { - if ($this->state != 2) { - return; - } - if (TCPDF_STATIC::empty_string($ry) OR ($ry == 0)) { - $ry = $rx; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->setFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - if ($line_style) { - $this->setLineStyle($line_style); - } - $this->_outellipticalarc($x0, $y0, $rx, $ry, $angle, $astart, $afinish, false, $nc, true, true, false); - $this->_out($op); - } - - /** - * Append an elliptical arc to the current path. - * An ellipse is formed from n Bezier curves. - * @param float $xc Abscissa of center point. - * @param float $yc Ordinate of center point. - * @param float $rx Horizontal radius. - * @param float $ry Vertical radius (if ry = 0 then is a circle, see Circle()). Default value: 0. - * @param float $xang Angle between the X-axis and the major axis of the ellipse. Default value: 0. - * @param float $angs Angle start of draw line. Default value: 0. - * @param float $angf Angle finish of draw line. Default value: 360. - * @param boolean $pie if true do not mark the border point (used to draw pie sectors). - * @param integer $nc Number of curves used to draw a 90 degrees portion of ellipse. - * @param boolean $startpoint if true output a starting point. - * @param boolean $ccw if true draws in counter-clockwise. - * @param boolean $svg if true the angles are in svg mode (already calculated). - * @return array bounding box coordinates (x min, y min, x max, y max) - * @author Nicola Asuni - * @protected - * @since 4.9.019 (2010-04-26) - */ - protected function _outellipticalarc($xc, $yc, $rx, $ry, $xang=0, $angs=0, $angf=360, $pie=false, $nc=2, $startpoint=true, $ccw=true, $svg=false) { - if (($rx <= 0) OR ($ry < 0)) { - return; - } - $k = $this->k; - if ($nc < 2) { - $nc = 2; - } - $xmin = 2147483647; - $ymin = 2147483647; - $xmax = 0; - $ymax = 0; - if ($pie) { - // center of the arc - $this->_outPoint($xc, $yc); - } - $xang = deg2rad((float) $xang); - $angs = deg2rad((float) $angs); - $angf = deg2rad((float) $angf); - if ($svg) { - $as = $angs; - $af = $angf; - } else { - $as = atan2((sin($angs) / $ry), (cos($angs) / $rx)); - $af = atan2((sin($angf) / $ry), (cos($angf) / $rx)); - } - if ($as < 0) { - $as += (2 * M_PI); - } - if ($af < 0) { - $af += (2 * M_PI); - } - if ($ccw AND ($as > $af)) { - // reverse rotation - $as -= (2 * M_PI); - } elseif (!$ccw AND ($as < $af)) { - // reverse rotation - $af -= (2 * M_PI); - } - $total_angle = ($af - $as); - if ($nc < 2) { - $nc = 2; - } - // total arcs to draw - $nc *= (2 * abs($total_angle) / M_PI); - $nc = round($nc) + 1; - // angle of each arc - $arcang = ($total_angle / $nc); - // center point in PDF coordinates - $x0 = $xc; - $y0 = ($this->h - $yc); - // starting angle - $ang = $as; - $alpha = sin($arcang) * ((sqrt(4 + (3 * pow(tan(($arcang) / 2), 2))) - 1) / 3); - $cos_xang = cos($xang); - $sin_xang = sin($xang); - $cos_ang = cos($ang); - $sin_ang = sin($ang); - // first arc point - $px1 = $x0 + ($rx * $cos_xang * $cos_ang) - ($ry * $sin_xang * $sin_ang); - $py1 = $y0 + ($rx * $sin_xang * $cos_ang) + ($ry * $cos_xang * $sin_ang); - // first Bezier control point - $qx1 = ($alpha * ((-$rx * $cos_xang * $sin_ang) - ($ry * $sin_xang * $cos_ang))); - $qy1 = ($alpha * ((-$rx * $sin_xang * $sin_ang) + ($ry * $cos_xang * $cos_ang))); - if ($pie) { - // line from center to arc starting point - $this->_outLine($px1, $this->h - $py1); - } elseif ($startpoint) { - // arc starting point - $this->_outPoint($px1, $this->h - $py1); - } - // draw arcs - for ($i = 1; $i <= $nc; ++$i) { - // starting angle - $ang = $as + ($i * $arcang); - if ($i == $nc) { - $ang = $af; - } - $cos_ang = cos($ang); - $sin_ang = sin($ang); - // second arc point - $px2 = $x0 + ($rx * $cos_xang * $cos_ang) - ($ry * $sin_xang * $sin_ang); - $py2 = $y0 + ($rx * $sin_xang * $cos_ang) + ($ry * $cos_xang * $sin_ang); - // second Bezier control point - $qx2 = ($alpha * ((-$rx * $cos_xang * $sin_ang) - ($ry * $sin_xang * $cos_ang))); - $qy2 = ($alpha * ((-$rx * $sin_xang * $sin_ang) + ($ry * $cos_xang * $cos_ang))); - // draw arc - $cx1 = ($px1 + $qx1); - $cy1 = ($this->h - ($py1 + $qy1)); - $cx2 = ($px2 - $qx2); - $cy2 = ($this->h - ($py2 - $qy2)); - $cx3 = $px2; - $cy3 = ($this->h - $py2); - $this->_outCurve($cx1, $cy1, $cx2, $cy2, $cx3, $cy3); - // get bounding box coordinates - $xmin = min($xmin, $cx1, $cx2, $cx3); - $ymin = min($ymin, $cy1, $cy2, $cy3); - $xmax = max($xmax, $cx1, $cx2, $cx3); - $ymax = max($ymax, $cy1, $cy2, $cy3); - // move to next point - $px1 = $px2; - $py1 = $py2; - $qx1 = $qx2; - $qy1 = $qy2; - } - if ($pie) { - $this->_outLine($xc, $yc); - // get bounding box coordinates - $xmin = min($xmin, $xc); - $ymin = min($ymin, $yc); - $xmax = max($xmax, $xc); - $ymax = max($ymax, $yc); - } - return array($xmin, $ymin, $xmax, $ymax); - } - - /** - * Draws a circle. - * A circle is formed from n Bezier curves. - * @param float $x0 Abscissa of center point. - * @param float $y0 Ordinate of center point. - * @param float $r Radius. - * @param float $angstr Angle start of draw line. Default value: 0. - * @param float $angend Angle finish of draw line. Default value: 360. - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of circle. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array). - * @param integer $nc Number of curves used to draw a 90 degrees portion of circle. - * @public - * @since 2.1.000 (2008-01-08) - */ - public function Circle($x0, $y0, $r, $angstr=0, $angend=360, $style='', $line_style=array(), $fill_color=array(), $nc=2) { - $this->Ellipse($x0, $y0, $r, $r, 0, $angstr, $angend, $style, $line_style, $fill_color, $nc); - } - - /** - * Draws a polygonal line - * @param array $p Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1)) - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of polygon. Array with keys among the following: - *
        - *
      • all: Line style of all lines. Array like for SetLineStyle().
      • - *
      • 0 to ($np - 1): Line style of each line. Array like for SetLineStyle().
      • - *
      - * If a key is not present or is null, not draws the line. Default value is default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @since 4.8.003 (2009-09-15) - * @public - */ - public function PolyLine($p, $style='', $line_style=array(), $fill_color=array()) { - $this->Polygon($p, $style, $line_style, $fill_color, false); - } - - /** - * Draws a polygon. - * @param array $p Points 0 to ($np - 1). Array with values (x0, y0, x1, y1,..., x(np-1), y(np - 1)) - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of polygon. Array with keys among the following: - *
        - *
      • all: Line style of all lines. Array like for SetLineStyle().
      • - *
      • 0 to ($np - 1): Line style of each line. Array like for SetLineStyle().
      • - *
      - * If a key is not present or is null, not draws the line. Default value is default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @param boolean $closed if true the polygon is closes, otherwise will remain open - * @public - * @since 2.1.000 (2008-01-08) - */ - public function Polygon($p, $style='', $line_style=array(), $fill_color=array(), $closed=true) { - if ($this->state != 2) { - return; - } - $nc = count($p); // number of coordinates - $np = $nc / 2; // number of points - if ($closed) { - // close polygon by adding the first 2 points at the end (one line) - for ($i = 0; $i < 4; ++$i) { - $p[$nc + $i] = $p[$i]; - } - // copy style for the last added line - if (isset($line_style[0])) { - $line_style[$np] = $line_style[0]; - } - $nc += 4; - } - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->setFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - $draw = true; - if ($line_style) { - if (isset($line_style['all'])) { - $this->setLineStyle($line_style['all']); - } else { - $draw = false; - if ($op == 'B') { - // draw fill - $op = 'f'; - $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < $nc; $i = $i + 2) { - $this->_outLine($p[$i], $p[$i + 1]); - } - $this->_out($op); - } - // draw outline - $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < $nc; $i = $i + 2) { - $line_num = ($i / 2) - 1; - if (isset($line_style[$line_num])) { - if ($line_style[$line_num] != 0) { - if (is_array($line_style[$line_num])) { - $this->_out('S'); - $this->setLineStyle($line_style[$line_num]); - $this->_outPoint($p[$i - 2], $p[$i - 1]); - $this->_outLine($p[$i], $p[$i + 1]); - $this->_out('S'); - $this->_outPoint($p[$i], $p[$i + 1]); - } else { - $this->_outLine($p[$i], $p[$i + 1]); - } - } - } else { - $this->_outLine($p[$i], $p[$i + 1]); - } - } - $this->_out($op); - } - } - if ($draw) { - $this->_outPoint($p[0], $p[1]); - for ($i = 2; $i < $nc; $i = $i + 2) { - $this->_outLine($p[$i], $p[$i + 1]); - } - $this->_out($op); - } - } - - /** - * Draws a regular polygon. - * @param float $x0 Abscissa of center point. - * @param float $y0 Ordinate of center point. - * @param float $r Radius of inscribed circle. - * @param integer $ns Number of sides. - * @param float $angle Angle oriented (anti-clockwise). Default value: 0. - * @param boolean $draw_circle Draw inscribed circle or not. Default value: false. - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of polygon sides. Array with keys among the following: - *
        - *
      • all: Line style of all sides. Array like for SetLineStyle().
      • - *
      • 0 to ($ns - 1): Line style of each side. Array like for SetLineStyle().
      • - *
      - * If a key is not present or is null, not draws the side. Default value is default line style (empty array). - * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array). - * @param string $circle_style Style of rendering of inscribed circle (if draws). Possible values are: - *
        - *
      • D or empty string: Draw (default).
      • - *
      • F: Fill.
      • - *
      • DF or FD: Draw and fill.
      • - *
      • CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
      • - *
      • CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).
      • - *
      - * @param array $circle_outLine_style Line style of inscribed circle (if draws). Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $circle_fill_color Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array). - * @public - * @since 2.1.000 (2008-01-08) - */ - public function RegularPolygon($x0, $y0, $r, $ns, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) { - if (3 > $ns) { - $ns = 3; - } - if ($draw_circle) { - $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color); - } - $p = array(); - for ($i = 0; $i < $ns; ++$i) { - $a = $angle + ($i * 360 / $ns); - $a_rad = deg2rad((float) $a); - $p[] = $x0 + ($r * sin($a_rad)); - $p[] = $y0 + ($r * cos($a_rad)); - } - $this->Polygon($p, $style, $line_style, $fill_color); - } - - /** - * Draws a star polygon - * @param float $x0 Abscissa of center point. - * @param float $y0 Ordinate of center point. - * @param float $r Radius of inscribed circle. - * @param integer $nv Number of vertices. - * @param integer $ng Number of gap (if ($ng % $nv = 1) then is a regular polygon). - * @param float $angle Angle oriented (anti-clockwise). Default value: 0. - * @param boolean $draw_circle Draw inscribed circle or not. Default value is false. - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $line_style Line style of polygon sides. Array with keys among the following: - *
        - *
      • all: Line style of all sides. Array like for - * SetLineStyle().
      • - *
      • 0 to (n - 1): Line style of each side. Array like for SetLineStyle().
      • - *
      - * If a key is not present or is null, not draws the side. Default value is default line style (empty array). - * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array). - * @param string $circle_style Style of rendering of inscribed circle (if draws). Possible values are: - *
        - *
      • D or empty string: Draw (default).
      • - *
      • F: Fill.
      • - *
      • DF or FD: Draw and fill.
      • - *
      • CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
      • - *
      • CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).
      • - *
      - * @param array $circle_outLine_style Line style of inscribed circle (if draws). Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $circle_fill_color Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array). - * @public - * @since 2.1.000 (2008-01-08) - */ - public function StarPolygon($x0, $y0, $r, $nv, $ng, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) { - if ($nv < 2) { - $nv = 2; - } - if ($draw_circle) { - $this->Circle($x0, $y0, $r, 0, 360, $circle_style, $circle_outLine_style, $circle_fill_color); - } - $p2 = array(); - $visited = array(); - for ($i = 0; $i < $nv; ++$i) { - $a = $angle + ($i * 360 / $nv); - $a_rad = deg2rad((float) $a); - $p2[] = $x0 + ($r * sin($a_rad)); - $p2[] = $y0 + ($r * cos($a_rad)); - $visited[] = false; - } - $p = array(); - $i = 0; - do { - $p[] = $p2[$i * 2]; - $p[] = $p2[($i * 2) + 1]; - $visited[$i] = true; - $i += $ng; - $i %= $nv; - } while (!$visited[$i]); - $this->Polygon($p, $style, $line_style, $fill_color); - } - - /** - * Draws a rounded rectangle. - * @param float $x Abscissa of upper-left corner. - * @param float $y Ordinate of upper-left corner. - * @param float $w Width. - * @param float $h Height. - * @param float $r the radius of the circle used to round off the corners of the rectangle. - * @param string $round_corner Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top right, bottom right, bottom left and top left. Default value: all rounded corner ("1111"). - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $border_style Border style of rectangle. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @since 2.1.000 (2008-01-08) - */ - public function RoundedRect($x, $y, $w, $h, $r, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) { - $this->RoundedRectXY($x, $y, $w, $h, $r, $r, $round_corner, $style, $border_style, $fill_color); - } - - /** - * Draws a rounded rectangle. - * @param float $x Abscissa of upper-left corner. - * @param float $y Ordinate of upper-left corner. - * @param float $w Width. - * @param float $h Height. - * @param float $rx the x-axis radius of the ellipse used to round off the corners of the rectangle. - * @param float $ry the y-axis radius of the ellipse used to round off the corners of the rectangle. - * @param string $round_corner Draws rounded corner or not. String with a 0 (not rounded i-corner) or 1 (rounded i-corner) in i-position. Positions are, in order and begin to 0: top right, bottom right, bottom left and top left. Default value: all rounded corner ("1111"). - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param array $border_style Border style of rectangle. Array like for SetLineStyle(). Default value: default line style (empty array). - * @param array $fill_color Fill color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName). Default value: default color (empty array). - * @public - * @since 4.9.019 (2010-04-22) - */ - public function RoundedRectXY($x, $y, $w, $h, $rx, $ry, $round_corner='1111', $style='', $border_style=array(), $fill_color=array()) { - if ($this->state != 2) { - return; - } - if (($round_corner == '0000') OR (($rx == $ry) AND ($rx == 0))) { - // Not rounded - $this->Rect($x, $y, $w, $h, $style, $border_style, $fill_color); - return; - } - // Rounded - if (!(false === strpos($style, 'F')) AND isset($fill_color)) { - $this->setFillColorArray($fill_color); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $border_style = array(); - } - if ($border_style) { - $this->setLineStyle($border_style); - } - $MyArc = 4 / 3 * (sqrt(2) - 1); - $this->_outPoint($x + $rx, $y); - $xc = $x + $w - $rx; - $yc = $y + $ry; - $this->_outLine($xc, $y); - if ($round_corner[0]) { - $this->_outCurve($xc + ($rx * $MyArc), $yc - $ry, $xc + $rx, $yc - ($ry * $MyArc), $xc + $rx, $yc); - } else { - $this->_outLine($x + $w, $y); - } - $xc = $x + $w - $rx; - $yc = $y + $h - $ry; - $this->_outLine($x + $w, $yc); - if ($round_corner[1]) { - $this->_outCurve($xc + $rx, $yc + ($ry * $MyArc), $xc + ($rx * $MyArc), $yc + $ry, $xc, $yc + $ry); - } else { - $this->_outLine($x + $w, $y + $h); - } - $xc = $x + $rx; - $yc = $y + $h - $ry; - $this->_outLine($xc, $y + $h); - if ($round_corner[2]) { - $this->_outCurve($xc - ($rx * $MyArc), $yc + $ry, $xc - $rx, $yc + ($ry * $MyArc), $xc - $rx, $yc); - } else { - $this->_outLine($x, $y + $h); - } - $xc = $x + $rx; - $yc = $y + $ry; - $this->_outLine($x, $yc); - if ($round_corner[3]) { - $this->_outCurve($xc - $rx, $yc - ($ry * $MyArc), $xc - ($rx * $MyArc), $yc - $ry, $xc, $yc - $ry); - } else { - $this->_outLine($x, $y); - $this->_outLine($x + $rx, $y); - } - $this->_out($op); - } - - /** - * Draws a grahic arrow. - * @param float $x0 Abscissa of first point. - * @param float $y0 Ordinate of first point. - * @param float $x1 Abscissa of second point. - * @param float $y1 Ordinate of second point. - * @param int $head_style (0 = draw only arrowhead arms, 1 = draw closed arrowhead, but no fill, 2 = closed and filled arrowhead, 3 = filled arrowhead) - * @param float $arm_size length of arrowhead arms - * @param int $arm_angle angle between an arm and the shaft - * @author Piotr Galecki, Nicola Asuni, Andy Meier - * @since 4.6.018 (2009-07-10) - */ - public function Arrow($x0, $y0, $x1, $y1, $head_style=0, $arm_size=5, $arm_angle=15) { - // getting arrow direction angle - // 0 deg angle is when both arms go along X axis. angle grows clockwise. - $dir_angle = atan2(($y0 - $y1), ($x0 - $x1)); - if ($dir_angle < 0) { - $dir_angle += (2 * M_PI); - } - $arm_angle = deg2rad($arm_angle); - $sx1 = $x1; - $sy1 = $y1; - if ($head_style > 0) { - // calculate the stopping point for the arrow shaft - $sx1 = $x1 + (($arm_size - $this->LineWidth) * cos($dir_angle)); - $sy1 = $y1 + (($arm_size - $this->LineWidth) * sin($dir_angle)); - } - // main arrow line / shaft - $this->Line($x0, $y0, $sx1, $sy1); - // left arrowhead arm tip - $x2L = $x1 + ($arm_size * cos($dir_angle + $arm_angle)); - $y2L = $y1 + ($arm_size * sin($dir_angle + $arm_angle)); - // right arrowhead arm tip - $x2R = $x1 + ($arm_size * cos($dir_angle - $arm_angle)); - $y2R = $y1 + ($arm_size * sin($dir_angle - $arm_angle)); - $mode = 'D'; - $style = array(); - switch ($head_style) { - case 0: { - // draw only arrowhead arms - $mode = 'D'; - $style = array(1, 1, 0); - break; - } - case 1: { - // draw closed arrowhead, but no fill - $mode = 'D'; - break; - } - case 2: { - // closed and filled arrowhead - $mode = 'DF'; - break; - } - case 3: { - // filled arrowhead - $mode = 'F'; - break; - } - } - $this->Polygon(array($x2L, $y2L, $x1, $y1, $x2R, $y2R), $mode, $style, array()); - } - - // END GRAPHIC FUNCTIONS SECTION ----------------------- - - /** - * Add a Named Destination. - * NOTE: destination names are unique, so only last entry will be saved. - * @param string $name Destination name. - * @param float $y Y position in user units of the destiantion on the selected page (default = -1 = current position; 0 = page start;). - * @param int|string $page Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @param float $x X position in user units of the destiantion on the selected page (default = -1 = current position;). - * @return string|false Stripped named destination identifier or false in case of error. - * @public - * @author Christian Deligant, Nicola Asuni - * @since 5.9.097 (2011-06-23) - */ - public function setDestination($name, $y=-1, $page='', $x=-1) { - // remove unsupported characters - $name = TCPDF_STATIC::encodeNameObject($name); - if (TCPDF_STATIC::empty_string($name)) { - return false; - } - if ($y == -1) { - $y = $this->GetY(); - } elseif ($y < 0) { - $y = 0; - } elseif ($y > $this->h) { - $y = $this->h; - } - if ($x == -1) { - $x = $this->GetX(); - } elseif ($x < 0) { - $x = 0; - } elseif ($x > $this->w) { - $x = $this->w; - } - $fixed = false; - if (!empty($page) AND (substr($page, 0, 1) == '*')) { - $page = intval(substr($page, 1)); - // this page number will not be changed when moving/add/deleting pages - $fixed = true; - } - if (empty($page)) { - $page = $this->PageNo(); - if (empty($page)) { - return; - } - } - $this->dests[$name] = array('x' => $x, 'y' => $y, 'p' => $page, 'f' => $fixed); - return $name; - } - - /** - * Return the Named Destination array. - * @return array Named Destination array. - * @public - * @author Nicola Asuni - * @since 5.9.097 (2011-06-23) - */ - public function getDestination() { - return $this->dests; - } - - /** - * Insert Named Destinations. - * @protected - * @author Johannes G\FCntert, Nicola Asuni - * @since 5.9.098 (2011-06-23) - */ - protected function _putdests() { - if (empty($this->dests)) { - return; - } - $this->n_dests = $this->_newobj(); - $out = ' <<'; - foreach($this->dests as $name => $o) { - $out .= ' /'.$name.' '.sprintf('[%u 0 R /XYZ %F %F null]', $this->page_obj_id[($o['p'])], ($o['x'] * $this->k), ($this->pagedim[$o['p']]['h'] - ($o['y'] * $this->k))); - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Adds a bookmark - alias for Bookmark(). - * @param string $txt Bookmark description. - * @param int $level Bookmark level (minimum value is 0). - * @param float $y Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;). - * @param int|string $page Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @param string $style Font style: B = Bold, I = Italic, BI = Bold + Italic. - * @param array $color RGB color array (values from 0 to 255). - * @param float $x X position in user units of the bookmark on the selected page (default = -1 = current position;). - * @param mixed $link URL, or numerical link ID, or named destination (# character followed by the destination name), or embedded file (* character followed by the file name). - * @public - */ - public function setBookmark($txt, $level=0, $y=-1, $page='', $style='', $color=array(0,0,0), $x=-1, $link='') { - $this->Bookmark($txt, $level, $y, $page, $style, $color, $x, $link); - } - - /** - * Adds a bookmark. - * @param string $txt Bookmark description. - * @param int $level Bookmark level (minimum value is 0). - * @param float $y Y position in user units of the bookmark on the selected page (default = -1 = current position; 0 = page start;). - * @param int|string $page Target page number (leave empty for current page). If you prefix a page number with the * character, then this page will not be changed when adding/deleting/moving pages. - * @param string $style Font style: B = Bold, I = Italic, BI = Bold + Italic. - * @param array $color RGB color array (values from 0 to 255). - * @param float $x X position in user units of the bookmark on the selected page (default = -1 = current position;). - * @param mixed $link URL, or numerical link ID, or named destination (# character followed by the destination name), or embedded file (* character followed by the file name). - * @public - * @since 2.1.002 (2008-02-12) - */ - public function Bookmark($txt, $level=0, $y=-1, $page='', $style='', $color=array(0,0,0), $x=-1, $link='') { - if ($level < 0) { - $level = 0; - } - if (isset($this->outlines[0])) { - $lastoutline = end($this->outlines); - $maxlevel = $lastoutline['l'] + 1; - } else { - $maxlevel = 0; - } - if ($level > $maxlevel) { - $level = $maxlevel; - } - if ($y == -1) { - $y = $this->GetY(); - } elseif ($y < 0) { - $y = 0; - } elseif ($y > $this->h) { - $y = $this->h; - } - if ($x == -1) { - $x = $this->GetX(); - } elseif ($x < 0) { - $x = 0; - } elseif ($x > $this->w) { - $x = $this->w; - } - $fixed = false; - $pageAsString = (string) $page; - if ($pageAsString && $pageAsString[0] == '*') { - $page = intval(substr($page, 1)); - // this page number will not be changed when moving/add/deleting pages - $fixed = true; - } - if (empty($page)) { - $page = $this->PageNo(); - if (empty($page)) { - return; - } - } - $this->outlines[] = array('t' => $txt, 'l' => $level, 'x' => $x, 'y' => $y, 'p' => $page, 'f' => $fixed, 's' => strtoupper($style), 'c' => $color, 'u' => $link); - } - - /** - * Sort bookmarks for page and key. - * @protected - * @since 5.9.119 (2011-09-19) - */ - protected function sortBookmarks() { - // get sorting columns - $outline_p = array(); - $outline_y = array(); - foreach ($this->outlines as $key => $row) { - $outline_p[$key] = $row['p']; - $outline_k[$key] = $key; - } - // sort outlines by page and original position - array_multisort($outline_p, SORT_NUMERIC, SORT_ASC, $outline_k, SORT_NUMERIC, SORT_ASC, $this->outlines); - } - - /** - * Create a bookmark PDF string. - * @protected - * @author Olivier Plathey, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - protected function _putbookmarks() { - $nb = count($this->outlines); - if ($nb == 0) { - return; - } - // sort bookmarks - $this->sortBookmarks(); - $lru = array(); - $level = 0; - foreach ($this->outlines as $i => $o) { - if ($o['l'] > 0) { - $parent = $lru[($o['l'] - 1)]; - //Set parent and last pointers - $this->outlines[$i]['parent'] = $parent; - $this->outlines[$parent]['last'] = $i; - if ($o['l'] > $level) { - //Level increasing: set first pointer - $this->outlines[$parent]['first'] = $i; - } - } else { - $this->outlines[$i]['parent'] = $nb; - } - if (($o['l'] <= $level) AND ($i > 0)) { - //Set prev and next pointers - $prev = $lru[$o['l']]; - $this->outlines[$prev]['next'] = $i; - $this->outlines[$i]['prev'] = $prev; - } - $lru[$o['l']] = $i; - $level = $o['l']; - } - //Outline items - $n = $this->n + 1; - $nltags = '/|<\/(blockquote|dd|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|p|pre|ul|tcpdf|table|tr|td)>/si'; - foreach ($this->outlines as $i => $o) { - $oid = $this->_newobj(); - // covert HTML title to string - $title = preg_replace($nltags, "\n", $o['t']); - $title = preg_replace("/[\r]+/si", '', $title); - $title = preg_replace("/[\n]+/si", "\n", $title); - $title = strip_tags($title); - $title = $this->stringTrim($title); - $out = '<_textstring($title, $oid); - $out .= ' /Parent '.($n + $o['parent']).' 0 R'; - if (isset($o['prev'])) { - $out .= ' /Prev '.($n + $o['prev']).' 0 R'; - } - if (isset($o['next'])) { - $out .= ' /Next '.($n + $o['next']).' 0 R'; - } - if (isset($o['first'])) { - $out .= ' /First '.($n + $o['first']).' 0 R'; - } - if (isset($o['last'])) { - $out .= ' /Last '.($n + $o['last']).' 0 R'; - } - if (isset($o['u']) AND !empty($o['u'])) { - // link - if (is_string($o['u'])) { - if ($o['u'][0] == '#') { - // internal destination - $out .= ' /Dest /'.TCPDF_STATIC::encodeNameObject(substr($o['u'], 1)); - } elseif ($o['u'][0] == '%') { - // embedded PDF file - $filename = basename(substr($o['u'], 1)); - $out .= ' /A <embeddedfiles[$filename]['a'].' >> >>'; - } elseif ($o['u'][0] == '*') { - // embedded generic file - $filename = basename(substr($o['u'], 1)); - $jsa = 'var D=event.target.doc;var MyData=D.dataObjects;for (var i in MyData) if (MyData[i].path=="'.$filename.'") D.exportDataObject( { cName : MyData[i].name, nLaunch : 2});'; - $out .= ' /A <_textstring($jsa, $oid).'>>'; - } else { - // external URI link - $out .= ' /A <_datastring($this->unhtmlentities($o['u']), $oid).'>>'; - } - } elseif (isset($this->links[$o['u']])) { - // internal link ID - $l = $this->links[$o['u']]; - if (isset($this->page_obj_id[($l['p'])])) { - $out .= sprintf(' /Dest [%u 0 R /XYZ 0 %F null]', $this->page_obj_id[($l['p'])], ($this->pagedim[$l['p']]['h'] - ($l['y'] * $this->k))); - } - } - } elseif (isset($this->page_obj_id[($o['p'])])) { - // link to a page - $out .= ' '.sprintf('/Dest [%u 0 R /XYZ %F %F null]', $this->page_obj_id[($o['p'])], ($o['x'] * $this->k), ($this->pagedim[$o['p']]['h'] - ($o['y'] * $this->k))); - } - // set font style - $style = 0; - if (!empty($o['s'])) { - // bold - if (strpos($o['s'], 'B') !== false) { - $style |= 2; - } - // oblique - if (strpos($o['s'], 'I') !== false) { - $style |= 1; - } - } - $out .= sprintf(' /F %d', $style); - // set bookmark color - if (isset($o['c']) AND is_array($o['c']) AND (count($o['c']) == 3)) { - $color = array_values($o['c']); - $out .= sprintf(' /C [%F %F %F]', ($color[0] / 255), ($color[1] / 255), ($color[2] / 255)); - } else { - // black - $out .= ' /C [0.0 0.0 0.0]'; - } - $out .= ' /Count 0'; // normally closed item - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - //Outline root - $this->OutlineRoot = $this->_newobj(); - $this->_out('<< /Type /Outlines /First '.$n.' 0 R /Last '.($n + $lru[0]).' 0 R >>'."\n".'endobj'); - } - - // --- JAVASCRIPT ------------------------------------------------------ - - /** - * Adds a javascript - * @param string $script Javascript code - * @public - * @author Johannes G\FCntert, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - public function IncludeJS($script) { - $this->javascript .= $script; - } - - /** - * Adds a javascript object and return object ID - * @param string $script Javascript code - * @param boolean $onload if true executes this object when opening the document - * @return int internal object ID - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function addJavascriptObject($script, $onload=false) { - if ($this->pdfa_mode) { - // javascript is not allowed in PDF/A mode - return false; - } - ++$this->n; - $this->js_objects[$this->n] = array('n' => $this->n, 'js' => $script, 'onload' => $onload); - return $this->n; - } - - /** - * Create a javascript PDF string. - * @protected - * @author Johannes G\FCntert, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - protected function _putjavascript() { - if ($this->pdfa_mode OR (empty($this->javascript) AND empty($this->js_objects))) { - return; - } - if (strpos($this->javascript, 'this.addField') > 0) { - if (!$this->ur['enabled']) { - //$this->setUserRights(); - } - // the following two lines are used to avoid form fields duplication after saving - // The addField method only works when releasing user rights (UR3) - $jsa = sprintf("ftcpdfdocsaved=this.addField('%s','%s',%d,[%F,%F,%F,%F]);", 'tcpdfdocsaved', 'text', 0, 0, 1, 0, 1); - $jsb = "getField('tcpdfdocsaved').value='saved';"; - $this->javascript = $jsa."\n".$this->javascript."\n".$jsb; - } - // name tree for javascript - $this->n_js = '<< /Names ['; - if (!empty($this->javascript)) { - $this->n_js .= ' (EmbeddedJS) '.($this->n + 1).' 0 R'; - } - if (!empty($this->js_objects)) { - foreach ($this->js_objects as $key => $val) { - if ($val['onload']) { - $this->n_js .= ' (JS'.$key.') '.$key.' 0 R'; - } - } - } - $this->n_js .= ' ] >>'; - // default Javascript object - if (!empty($this->javascript)) { - $obj_id = $this->_newobj(); - $out = '<< /S /JavaScript'; - $out .= ' /JS '.$this->_textstring($this->javascript, $obj_id); - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - // additional Javascript objects - if (!empty($this->js_objects)) { - foreach ($this->js_objects as $key => $val) { - $out = $this->_getobj($key)."\n".' << /S /JavaScript /JS '.$this->_textstring($val['js'], $key).' >>'."\n".'endobj'; - $this->_out($out); - } - } - } - - /** - * Adds a javascript form field. - * @param string $type field type - * @param string $name field name - * @param int $x horizontal position - * @param int $y vertical position - * @param int $w width - * @param int $h height - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @protected - * @author Denis Van Nuffelen, Nicola Asuni - * @since 2.1.002 (2008-02-12) - */ - protected function _addfield($type, $name, $x, $y, $w, $h, $prop) { - if ($this->rtl) { - $x = $x - $w; - } - // the followind avoid fields duplication after saving the document - $this->javascript .= "if (getField('tcpdfdocsaved').value != 'saved') {"; - $k = $this->k; - $this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%u,[%F,%F,%F,%F]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n"; - $this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n"; - foreach($prop as $key => $val) { - if (strcmp(substr($key, -5), 'Color') == 0) { - $val = TCPDF_COLORS::_JScolor($val); - } else { - $val = "'".$val."'"; - } - $this->javascript .= 'f'.$name.'.'.$key.'='.$val.";\n"; - } - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - $this->javascript .= '}'; - } - - // --- FORM FIELDS ----------------------------------------------------- - - - - /** - * Set default properties for form fields. - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-06) - */ - public function setFormDefaultProp($prop=array()) { - $this->default_form_prop = $prop; - } - - /** - * Return the default properties for form fields. - * @return array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-06) - */ - public function getFormDefaultProp() { - return $this->default_form_prop; - } - - /** - * Creates a text field - * @param string $name field name - * @param float $w Width of the rectangle - * @param float $h Height of the rectangle - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param float|null $x Abscissa of the upper-left corner of the rectangle - * @param float|null $y Ordinate of the upper-left corner of the rectangle - * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function TextField($name, $w, $h, $prop=array(), $opt=array(), $x=null, $y=null, $js=false) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('text', $name, $x, $y, $w, $h, $prop); - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set default appearance stream - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $text = ''; - if (isset($prop['value']) AND !empty($prop['value'])) { - $text = $prop['value']; - } elseif (isset($opt['v']) AND !empty($opt['v'])) { - $text = $opt['v']; - } - $tmpid = $this->startTemplate($w, $h, false); - $align = ''; - if (isset($popt['q'])) { - switch ($popt['q']) { - case 0: { - $align = 'L'; - break; - } - case 1: { - $align = 'C'; - break; - } - case 2: { - $align = 'R'; - break; - } - default: { - $align = ''; - break; - } - } - } - $this->MultiCell($w, $h, $text, 0, $align, false, 0, 0, 0, true, 0, false, true, 0, 'T', false); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // merge options - $opt = array_merge($popt, $opt); - // remove some conflicting options - unset($opt['bs']); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Tx'; - $opt['t'] = $name; - // Additional annotation's parameters (check _putannotsobj() method): - //$opt['f'] - //$opt['as'] - //$opt['bs'] - //$opt['be'] - //$opt['c'] - //$opt['border'] - //$opt['h'] - //$opt['mk']; - //$opt['mk']['r'] - //$opt['mk']['bc']; - //$opt['mk']['bg']; - unset($opt['mk']['ca']); - unset($opt['mk']['rc']); - unset($opt['mk']['ac']); - unset($opt['mk']['i']); - unset($opt['mk']['ri']); - unset($opt['mk']['ix']); - unset($opt['mk']['if']); - //$opt['mk']['if']['sw']; - //$opt['mk']['if']['s']; - //$opt['mk']['if']['a']; - //$opt['mk']['if']['fb']; - unset($opt['mk']['tp']); - //$opt['tu'] - //$opt['tm'] - //$opt['ff'] - //$opt['v'] - //$opt['dv'] - //$opt['a'] - //$opt['aa'] - //$opt['q'] - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a RadioButton field. - * @param string $name Field name. - * @param int $w Width of the radio button. - * @param array $prop Javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param array $opt Annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param string $onvalue Value to be returned if selected. - * @param boolean $checked Define the initial state. - * @param float|null $x Abscissa of the upper-left corner of the rectangle - * @param float|null $y Ordinate of the upper-left corner of the rectangle - * @param boolean $js If true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function RadioButton($name, $w, $prop=array(), $opt=array(), $onvalue='On', $checked=false, $x=null, $y=null, $js=false) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($w, $x, $y); - if ($js) { - $this->_addfield('radiobutton', $name, $x, $y, $w, $w, $prop); - return; - } - if (TCPDF_STATIC::empty_string($onvalue)) { - $onvalue = 'On'; - } - if ($checked) { - $defval = $onvalue; - } else { - $defval = 'Off'; - } - // set font - $font = 'zapfdingbats'; - if ($this->pdfa_mode) { - // all fonts must be embedded - $font = 'pdfa'.$font; - } - $this->AddFont($font); - $tmpfont = $this->getFontBuffer($font); - // set data for parent group - if (!isset($this->radiobutton_groups[$this->page])) { - $this->radiobutton_groups[$this->page] = array(); - } - if (!isset($this->radiobutton_groups[$this->page][$name])) { - $this->radiobutton_groups[$this->page][$name] = array(); - ++$this->n; - $this->radiobutton_groups[$this->page][$name]['n'] = $this->n; - $this->radio_groups[] = $this->n; - } - $kid = ($this->n + 1); - // save object ID to be added on Kids entry on parent object - $this->radiobutton_groups[$this->page][$name][] = array('kid' => $kid, 'def' => $defval); - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['NoToggleToOff'] = 'true'; - $prop['Radio'] = 'true'; - $prop['borderStyle'] = 'inset'; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default options - $this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = array(); - $fx = ((($w - $this->getAbsFontMeasure($tmpfont['cw'][108])) / 2) * $this->k); - $fy = (($w - ((($tmpfont['desc']['Ascent'] - $tmpfont['desc']['Descent']) * $this->FontSizePt / 1000) / $this->k)) * $this->k); - $popt['ap']['n'][$onvalue] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(108).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - $popt['ap']['n']['Off'] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(109).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - if (!isset($popt['mk'])) { - $popt['mk'] = array(); - } - $popt['mk']['ca'] = '(l)'; - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Btn'; - if ($checked) { - $opt['v'] = array('/'.$onvalue); - $opt['as'] = $onvalue; - } else { - $opt['as'] = 'Off'; - } - // store readonly flag - if (!isset($this->radiobutton_groups[$this->page][$name]['#readonly#'])) { - $this->radiobutton_groups[$this->page][$name]['#readonly#'] = false; - } - $this->radiobutton_groups[$this->page][$name]['#readonly#'] |= ($opt['f'] & 64); - $this->Annotation($x, $y, $w, $w, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a List-box field - * @param string $name field name - * @param int $w width - * @param int $h height - * @param array $values array containing the list of values. - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param float|null $x Abscissa of the upper-left corner of the rectangle - * @param float|null $y Ordinate of the upper-left corner of the rectangle - * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function ListBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x=null, $y=null, $js=false) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('listbox', $name, $x, $y, $w, $h, $prop); - $s = ''; - foreach ($values as $value) { - if (is_array($value)) { - $s .= ',[\''.addslashes($value[1]).'\',\''.addslashes($value[0]).'\']'; - } else { - $s .= ',[\''.addslashes($value).'\',\''.addslashes($value).'\']'; - } - } - $this->javascript .= 'f'.$name.'.setItems('.substr($s, 1).');'."\n"; - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default values - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $text = ''; - foreach($values as $item) { - if (is_array($item)) { - $text .= $item[1]."\n"; - } else { - $text .= $item."\n"; - } - } - $tmpid = $this->startTemplate($w, $h, false); - $this->MultiCell($w, $h, $text, 0, '', false, 0, 0, 0, true, 0, false, true, 0, 'T', false); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Ch'; - $opt['t'] = $name; - $opt['opt'] = $values; - unset($opt['mk']['ca']); - unset($opt['mk']['rc']); - unset($opt['mk']['ac']); - unset($opt['mk']['i']); - unset($opt['mk']['ri']); - unset($opt['mk']['ix']); - unset($opt['mk']['if']); - unset($opt['mk']['tp']); - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a Combo-box field - * @param string $name field name - * @param int $w width - * @param int $h height - * @param array $values array containing the list of values. - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param float|null $x Abscissa of the upper-left corner of the rectangle - * @param float|null $y Ordinate of the upper-left corner of the rectangle - * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function ComboBox($name, $w, $h, $values, $prop=array(), $opt=array(), $x=null, $y=null, $js=false) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('combobox', $name, $x, $y, $w, $h, $prop); - $s = ''; - foreach ($values as $value) { - if (is_array($value)) { - $s .= ',[\''.addslashes($value[1]).'\',\''.addslashes($value[0]).'\']'; - } else { - $s .= ',[\''.addslashes($value).'\',\''.addslashes($value).'\']'; - } - } - $this->javascript .= 'f'.$name.'.setItems('.substr($s, 1).');'."\n"; - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['Combo'] = true; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default options - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $text = ''; - foreach($values as $item) { - if (is_array($item)) { - $text .= $item[1]."\n"; - } else { - $text .= $item."\n"; - } - } - $tmpid = $this->startTemplate($w, $h, false); - $this->MultiCell($w, $h, $text, 0, '', false, 0, 0, 0, true, 0, false, true, 0, 'T', false); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Ch'; - $opt['t'] = $name; - $opt['opt'] = $values; - unset($opt['mk']['ca']); - unset($opt['mk']['rc']); - unset($opt['mk']['ac']); - unset($opt['mk']['i']); - unset($opt['mk']['ri']); - unset($opt['mk']['ix']); - unset($opt['mk']['if']); - unset($opt['mk']['tp']); - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a CheckBox field - * @param string $name field name - * @param int $w width - * @param boolean $checked define the initial state. - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param string $onvalue value to be returned if selected. - * @param float|null $x Abscissa of the upper-left corner of the rectangle - * @param float|null $y Ordinate of the upper-left corner of the rectangle - * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function CheckBox($name, $w, $checked=false, $prop=array(), $opt=array(), $onvalue='Yes', $x=null, $y=null, $js=false) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($w, $x, $y); - if ($js) { - $this->_addfield('checkbox', $name, $x, $y, $w, $w, $prop); - return; - } - if (!isset($prop['value'])) { - $prop['value'] = array('Yes'); - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['borderStyle'] = 'inset'; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - // set additional default options - $font = 'zapfdingbats'; - if ($this->pdfa_mode) { - // all fonts must be embedded - $font = 'pdfa'.$font; - } - $this->AddFont($font); - $tmpfont = $this->getFontBuffer($font); - $this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = array(); - $fx = ((($w - $this->getAbsFontMeasure($tmpfont['cw'][110])) / 2) * $this->k); - $fy = (($w - ((($tmpfont['desc']['Ascent'] - $tmpfont['desc']['Descent']) * $this->FontSizePt / 1000) / $this->k)) * $this->k); - $popt['ap']['n']['Yes'] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(110).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - $popt['ap']['n']['Off'] = sprintf('q %s BT /F%d %F Tf %F %F Td ('.chr(111).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, $fx, $fy); - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Btn'; - $opt['t'] = $name; - if (TCPDF_STATIC::empty_string($onvalue)) { - $onvalue = 'Yes'; - } - $opt['opt'] = array($onvalue); - if ($checked) { - $opt['v'] = array('/Yes'); - $opt['as'] = 'Yes'; - } else { - $opt['v'] = array('/Off'); - $opt['as'] = 'Off'; - } - $this->Annotation($x, $y, $w, $w, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - /** - * Creates a button field - * @param string $name field name - * @param int $w width - * @param int $h height - * @param string $caption caption. - * @param mixed $action action triggered by pressing the button. Use a string to specify a javascript action. Use an array to specify a form action options as on section 12.7.5 of PDF32000_2008. - * @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference. - * @param array $opt annotation parameters. Possible values are described on official PDF32000_2008 reference. - * @param float|null $x Abscissa of the upper-left corner of the rectangle - * @param float|null $y Ordinate of the upper-left corner of the rectangle - * @param boolean $js if true put the field using JavaScript (requires Acrobat Writer to be rendered). - * @public - * @author Nicola Asuni - * @since 4.8.000 (2009-09-07) - */ - public function Button($name, $w, $h, $caption, $action, $prop=array(), $opt=array(), $x=null, $y=null, $js=false) { - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if ($js) { - $this->_addfield('button', $name, $this->x, $this->y, $w, $h, $prop); - $this->javascript .= 'f'.$name.".buttonSetCaption('".addslashes($caption)."');\n"; - $this->javascript .= 'f'.$name.".setAction('MouseUp','".addslashes($action)."');\n"; - $this->javascript .= 'f'.$name.".highlight='push';\n"; - $this->javascript .= 'f'.$name.".print=false;\n"; - return; - } - // get default style - $prop = array_merge($this->getFormDefaultProp(), $prop); - $prop['Pushbutton'] = 'true'; - $prop['highlight'] = 'push'; - $prop['display'] = 'display.noPrint'; - // get annotation data - $popt = TCPDF_STATIC::getAnnotOptFromJSProp($prop, $this->spot_colors, $this->rtl); - $this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i']; - $fontstyle = sprintf('/F%d %F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor); - $popt['da'] = $fontstyle; - // build appearance stream - $popt['ap'] = array(); - $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' '; - $tmpid = $this->startTemplate($w, $h, false); - $bw = (2 / $this->k); // border width - $border = array( - 'L' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(231)), - 'R' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(51)), - 'T' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(231)), - 'B' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(51))); - $this->setFillColor(204); - $this->Cell($w, $h, $caption, $border, 0, 'C', true, '', 1, false, 'T', 'M'); - $this->endTemplate(); - --$this->n; - $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata']; - unset($this->xobjects[$tmpid]); - $popt['ap']['n'] .= 'Q EMC'; - // set additional default options - if (!isset($popt['mk'])) { - $popt['mk'] = array(); - } - $ann_obj_id = ($this->n + 1); - if (!empty($action) AND !is_array($action)) { - $ann_obj_id = ($this->n + 2); - } - $popt['mk']['ca'] = $this->_textstring($caption, $ann_obj_id); - $popt['mk']['rc'] = $this->_textstring($caption, $ann_obj_id); - $popt['mk']['ac'] = $this->_textstring($caption, $ann_obj_id); - // merge options - $opt = array_merge($popt, $opt); - // set remaining annotation data - $opt['Subtype'] = 'Widget'; - $opt['ft'] = 'Btn'; - $opt['t'] = $caption; - $opt['v'] = $name; - if (!empty($action)) { - if (is_array($action)) { - // form action options as on section 12.7.5 of PDF32000_2008. - $opt['aa'] = '/D <<'; - $bmode = array('SubmitForm', 'ResetForm', 'ImportData'); - foreach ($action AS $key => $val) { - if (($key == 'S') AND in_array($val, $bmode)) { - $opt['aa'] .= ' /S /'.$val; - } elseif (($key == 'F') AND (!empty($val))) { - $opt['aa'] .= ' /F '.$this->_datastring($val, $ann_obj_id); - } elseif (($key == 'Fields') AND is_array($val) AND !empty($val)) { - $opt['aa'] .= ' /Fields ['; - foreach ($val AS $field) { - $opt['aa'] .= ' '.$this->_textstring($field, $ann_obj_id); - } - $opt['aa'] .= ']'; - } elseif (($key == 'Flags')) { - $ff = 0; - if (is_array($val)) { - foreach ($val AS $flag) { - switch ($flag) { - case 'Include/Exclude': { - $ff += 1 << 0; - break; - } - case 'IncludeNoValueFields': { - $ff += 1 << 1; - break; - } - case 'ExportFormat': { - $ff += 1 << 2; - break; - } - case 'GetMethod': { - $ff += 1 << 3; - break; - } - case 'SubmitCoordinates': { - $ff += 1 << 4; - break; - } - case 'XFDF': { - $ff += 1 << 5; - break; - } - case 'IncludeAppendSaves': { - $ff += 1 << 6; - break; - } - case 'IncludeAnnotations': { - $ff += 1 << 7; - break; - } - case 'SubmitPDF': { - $ff += 1 << 8; - break; - } - case 'CanonicalFormat': { - $ff += 1 << 9; - break; - } - case 'ExclNonUserAnnots': { - $ff += 1 << 10; - break; - } - case 'ExclFKey': { - $ff += 1 << 11; - break; - } - case 'EmbedForm': { - $ff += 1 << 13; - break; - } - } - } - } else { - $ff = intval($val); - } - $opt['aa'] .= ' /Flags '.$ff; - } - } - $opt['aa'] .= ' >>'; - } else { - // Javascript action or raw action command - $js_obj_id = $this->addJavascriptObject($action); - $opt['aa'] = '/D '.$js_obj_id.' 0 R'; - } - } - $this->Annotation($x, $y, $w, $h, $name, $opt, 0); - if ($this->rtl) { - $this->x -= $w; - } else { - $this->x += $w; - } - } - - // --- END FORMS FIELDS ------------------------------------------------ - - /** - * Add certification signature (DocMDP or UR3) - * You can set only one signature type - * @protected - * @author Nicola Asuni - * @since 4.6.008 (2009-05-07) - */ - protected function _putsignature() { - if ((!$this->sign) OR (!isset($this->signature_data['cert_type']))) { - return; - } - $sigobjid = ($this->sig_obj_id + 1); - $out = $this->_getobj($sigobjid)."\n"; - $out .= '<< /Type /Sig'; - $out .= ' /Filter /Adobe.PPKLite'; - $out .= ' /SubFilter /adbe.pkcs7.detached'; - $out .= ' '.TCPDF_STATIC::$byterange_string; - $out .= ' /Contents<'.str_repeat('0', $this->signature_max_length).'>'; - if (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A')) { - $out .= ' /Reference ['; // array of signature reference dictionaries - $out .= ' << /Type /SigRef'; - if ($this->signature_data['cert_type'] > 0) { - $out .= ' /TransformMethod /DocMDP'; - $out .= ' /TransformParams <<'; - $out .= ' /Type /TransformParams'; - $out .= ' /P '.$this->signature_data['cert_type']; - $out .= ' /V /1.2'; - } else { - $out .= ' /TransformMethod /UR3'; - $out .= ' /TransformParams <<'; - $out .= ' /Type /TransformParams'; - $out .= ' /V /2.2'; - if (!TCPDF_STATIC::empty_string($this->ur['document'])) { - $out .= ' /Document['.$this->ur['document'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['form'])) { - $out .= ' /Form['.$this->ur['form'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['signature'])) { - $out .= ' /Signature['.$this->ur['signature'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['annots'])) { - $out .= ' /Annots['.$this->ur['annots'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['ef'])) { - $out .= ' /EF['.$this->ur['ef'].']'; - } - if (!TCPDF_STATIC::empty_string($this->ur['formex'])) { - $out .= ' /FormEX['.$this->ur['formex'].']'; - } - } - $out .= ' >>'; // close TransformParams - // optional digest data (values must be calculated and replaced later) - //$out .= ' /Data ********** 0 R'; - //$out .= ' /DigestMethod/MD5'; - //$out .= ' /DigestLocation[********** 34]'; - //$out .= ' /DigestValue<********************************>'; - $out .= ' >>'; - $out .= ' ]'; // end of reference - } - if (isset($this->signature_data['info']['Name']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Name'])) { - $out .= ' /Name '.$this->_textstring($this->signature_data['info']['Name'], $sigobjid); - } - if (isset($this->signature_data['info']['Location']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Location'])) { - $out .= ' /Location '.$this->_textstring($this->signature_data['info']['Location'], $sigobjid); - } - if (isset($this->signature_data['info']['Reason']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Reason'])) { - $out .= ' /Reason '.$this->_textstring($this->signature_data['info']['Reason'], $sigobjid); - } - if (isset($this->signature_data['info']['ContactInfo']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['ContactInfo'])) { - $out .= ' /ContactInfo '.$this->_textstring($this->signature_data['info']['ContactInfo'], $sigobjid); - } - $out .= ' /M '.$this->_datestring($sigobjid, $this->doc_modification_timestamp); - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - - /** - * Set User's Rights for PDF Reader - * WARNING: This is experimental and currently do not work. - * Check the PDF Reference 8.7.1 Transform Methods, - * Table 8.105 Entries in the UR transform parameters dictionary - * @param boolean $enable if true enable user's rights on PDF reader - * @param string $document Names specifying additional document-wide usage rights for the document. The only defined value is "/FullSave", which permits a user to save the document along with modified form and/or annotation data. - * @param string $annots Names specifying additional annotation-related usage rights for the document. Valid names in PDF 1.5 and later are /Create/Delete/Modify/Copy/Import/Export, which permit the user to perform the named operation on annotations. - * @param string $form Names specifying additional form-field-related usage rights for the document. Valid names are: /Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate - * @param string $signature Names specifying additional signature-related usage rights for the document. The only defined value is /Modify, which permits a user to apply a digital signature to an existing signature form field or clear a signed signature form field. - * @param string $ef Names specifying additional usage rights for named embedded files in the document. Valid names are /Create/Delete/Modify/Import, which permit the user to perform the named operation on named embedded files - Names specifying additional embedded-files-related usage rights for the document. - * @param string $formex Names specifying additional form-field-related usage rights. The only valid name is BarcodePlaintext, which permits text form field data to be encoded as a plaintext two-dimensional barcode. - * @public - * @author Nicola Asuni - * @since 2.9.000 (2008-03-26) - */ - public function setUserRights( - $enable=true, - $document='/FullSave', - $annots='/Create/Delete/Modify/Copy/Import/Export', - $form='/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate', - $signature='/Modify', - $ef='/Create/Delete/Modify/Import', - $formex='') { - $this->ur['enabled'] = $enable; - $this->ur['document'] = $document; - $this->ur['annots'] = $annots; - $this->ur['form'] = $form; - $this->ur['signature'] = $signature; - $this->ur['ef'] = $ef; - $this->ur['formex'] = $formex; - if (!$this->sign) { - $this->setSignature('', '', '', '', 0, array()); - } - } - - /** - * Enable document signature (requires the OpenSSL Library). - * The digital signature improve document authenticity and integrity and allows o enable extra features on Acrobat Reader. - * To create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt - * To export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12 - * To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes - * @param mixed $signing_cert signing certificate (string or filename prefixed with 'file://') - * @param mixed $private_key private key (string or filename prefixed with 'file://') - * @param string $private_key_password password - * @param string $extracerts specifies the name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used. - * @param int $cert_type The access permissions granted for this document. Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature. - * @param array $info array of option information: Name, Location, Reason, ContactInfo. - * @param string $approval Enable approval signature eg. for PDF incremental update - * @public - * @author Nicola Asuni - * @since 4.6.005 (2009-04-24) - */ - public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array(), $approval='') { - // to create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt - // to export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12 - // to convert pfx certificate to pem: openssl - // OpenSSL> pkcs12 -in -out -nodes - $this->sign = true; - ++$this->n; - $this->sig_obj_id = $this->n; // signature widget - ++$this->n; // signature object ($this->sig_obj_id + 1) - $this->signature_data = array(); - if (strlen($signing_cert) == 0) { - $this->Error('Please provide a certificate file and password!'); - } - if (strlen($private_key) == 0) { - $private_key = $signing_cert; - } - $this->signature_data['signcert'] = $signing_cert; - $this->signature_data['privkey'] = $private_key; - $this->signature_data['password'] = $private_key_password; - $this->signature_data['extracerts'] = $extracerts; - $this->signature_data['cert_type'] = $cert_type; - $this->signature_data['info'] = $info; - $this->signature_data['approval'] = $approval; - } - - /** - * Set the digital signature appearance (a cliccable rectangle area to get signature properties) - * @param float $x Abscissa of the upper-left corner. - * @param float $y Ordinate of the upper-left corner. - * @param float $w Width of the signature area. - * @param float $h Height of the signature area. - * @param int $page option page number (if < 0 the current page is used). - * @param string $name Name of the signature. - * @public - * @author Nicola Asuni - * @since 5.3.011 (2010-06-17) - */ - public function setSignatureAppearance($x=0, $y=0, $w=0, $h=0, $page=-1, $name='') { - $this->signature_appearance = $this->getSignatureAppearanceArray($x, $y, $w, $h, $page, $name); - } - - /** - * Add an empty digital signature appearance (a cliccable rectangle area to get signature properties) - * @param float $x Abscissa of the upper-left corner. - * @param float $y Ordinate of the upper-left corner. - * @param float $w Width of the signature area. - * @param float $h Height of the signature area. - * @param int $page option page number (if < 0 the current page is used). - * @param string $name Name of the signature. - * @public - * @author Nicola Asuni - * @since 5.9.101 (2011-07-06) - */ - public function addEmptySignatureAppearance($x=0, $y=0, $w=0, $h=0, $page=-1, $name='') { - ++$this->n; - $this->empty_signature_appearance[] = array('objid' => $this->n) + $this->getSignatureAppearanceArray($x, $y, $w, $h, $page, $name); - } - - /** - * Get the array that defines the signature appearance (page and rectangle coordinates). - * @param float $x Abscissa of the upper-left corner. - * @param float $y Ordinate of the upper-left corner. - * @param float $w Width of the signature area. - * @param float $h Height of the signature area. - * @param int $page option page number (if < 0 the current page is used). - * @param string $name Name of the signature. - * @return array Array defining page and rectangle coordinates of signature appearance. - * @protected - * @author Nicola Asuni - * @since 5.9.101 (2011-07-06) - */ - protected function getSignatureAppearanceArray($x=0, $y=0, $w=0, $h=0, $page=-1, $name='') { - $sigapp = array(); - if (($page < 1) OR ($page > $this->numpages)) { - $sigapp['page'] = $this->page; - } else { - $sigapp['page'] = intval($page); - } - if (empty($name)) { - $sigapp['name'] = 'Signature'; - } else { - $sigapp['name'] = $name; - } - $a = $x * $this->k; - $b = $this->pagedim[($sigapp['page'])]['h'] - (($y + $h) * $this->k); - $c = $w * $this->k; - $d = $h * $this->k; - $sigapp['rect'] = sprintf('%F %F %F %F', $a, $b, ($a + $c), ($b + $d)); - return $sigapp; - } - - /** - * Enable document timestamping (requires the OpenSSL Library). - * The trusted timestamping improve document security that means that no one should be able to change the document once it has been recorded. - * Use with digital signature only! - * @param string $tsa_host Time Stamping Authority (TSA) server (prefixed with 'https://') - * @param string $tsa_username Specifies the username for TSA authorization (optional) OR specifies the TSA authorization PEM file (see: example_66.php, optional) - * @param string $tsa_password Specifies the password for TSA authorization (optional) - * @param string $tsa_cert Specifies the location of TSA certificate for authorization (optional for cURL) - * @public - * @author Richard Stockinger - * @since 6.0.090 (2014-06-16) - */ - public function setTimeStamp($tsa_host='', $tsa_username='', $tsa_password='', $tsa_cert='') { - $this->tsa_data = array(); - if (!function_exists('curl_init')) { - $this->Error('Please enable cURL PHP extension!'); - } - if (strlen($tsa_host) == 0) { - $this->Error('Please specify the host of Time Stamping Authority (TSA)!'); - } - $this->tsa_data['tsa_host'] = $tsa_host; - if (is_file($tsa_username)) { - $this->tsa_data['tsa_auth'] = $tsa_username; - } else { - $this->tsa_data['tsa_username'] = $tsa_username; - } - $this->tsa_data['tsa_password'] = $tsa_password; - $this->tsa_data['tsa_cert'] = $tsa_cert; - $this->tsa_timestamp = true; - } - - /** - * NOT YET IMPLEMENTED - * Request TSA for a timestamp - * @param string $signature Digital signature as binary string - * @return string Timestamped digital signature - * @protected - * @author Richard Stockinger - * @since 6.0.090 (2014-06-16) - */ - protected function applyTSA($signature) { - if (!$this->tsa_timestamp) { - return $signature; - } - //@TODO: implement this feature - return $signature; - } - - /** - * Create a new page group. - * NOTE: call this function before calling AddPage() - * @param int|null $page starting group page (leave empty for next page). - * @public - * @since 3.0.000 (2008-03-27) - */ - public function startPageGroup($page=null) { - if (empty($page)) { - $page = $this->page + 1; - } - $this->newpagegroup[$page] = sizeof($this->newpagegroup) + 1; - } - - /** - * Set the starting page number. - * @param int $num Starting page number. - * @since 5.9.093 (2011-06-16) - * @public - */ - public function setStartingPageNumber($num=1) { - $this->starting_page_number = max(0, intval($num)); - } - - /** - * Returns the string alias used right align page numbers. - * If the current font is unicode type, the returned string wil contain an additional open curly brace. - * @return string - * @since 5.9.099 (2011-06-27) - * @public - */ - public function getAliasRightShift() { - // calculate aproximatively the ratio between widths of aliases and replacements. - $ref = '{'.TCPDF_STATIC::$alias_right_shift.'}{'.TCPDF_STATIC::$alias_tot_pages.'}{'.TCPDF_STATIC::$alias_num_page.'}'; - $rep = str_repeat(' ', $this->GetNumChars($ref)); - $wrep = $this->GetStringWidth($rep); - if ($wrep > 0) { - $wdiff = max(1, ($this->GetStringWidth($ref) / $wrep)); - } else { - $wdiff = 1; - } - $sdiff = sprintf('%F', $wdiff); - $alias = TCPDF_STATIC::$alias_right_shift.$sdiff.'}'; - if ($this->isUnicodeFont()) { - $alias = '{'.$alias; - } - return $alias; - } - - /** - * Returns the string alias used for the total number of pages. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the total number of pages in the document. - * @return string - * @since 4.0.018 (2008-08-08) - * @public - */ - public function getAliasNbPages() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_tot_pages.'}'; - } - return TCPDF_STATIC::$alias_tot_pages; - } - - /** - * Returns the string alias used for the page number. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the page number. - * @return string - * @since 4.5.000 (2009-01-02) - * @public - */ - public function getAliasNumPage() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_num_page.'}'; - } - return TCPDF_STATIC::$alias_num_page; - } - - /** - * Return the alias for the total number of pages in the current page group. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the total number of pages in this group. - * @return string alias of the current page group - * @public - * @since 3.0.000 (2008-03-27) - */ - public function getPageGroupAlias() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_group_tot_pages.'}'; - } - return TCPDF_STATIC::$alias_group_tot_pages; - } - - /** - * Return the alias for the page number on the current page group. - * If the current font is unicode type, the returned string is surrounded by additional curly braces. - * This alias will be replaced by the page number (relative to the belonging group). - * @return string alias of the current page group - * @public - * @since 4.5.000 (2009-01-02) - */ - public function getPageNumGroupAlias() { - if ($this->isUnicodeFont()) { - return '{'.TCPDF_STATIC::$alias_group_num_page.'}'; - } - return TCPDF_STATIC::$alias_group_num_page; - } - - /** - * Return the current page in the group. - * @return int current page in the group - * @public - * @since 3.0.000 (2008-03-27) - */ - public function getGroupPageNo() { - return $this->pagegroups[$this->currpagegroup]; - } - - /** - * Returns the current group page number formatted as a string. - * @public - * @since 4.3.003 (2008-11-18) - * @see PaneNo(), formatPageNumber() - */ - public function getGroupPageNoFormatted() { - return TCPDF_STATIC::formatPageNumber($this->getGroupPageNo()); - } - - /** - * Returns the current page number formatted as a string. - * @public - * @since 4.2.005 (2008-11-06) - * @see PaneNo(), formatPageNumber() - */ - public function PageNoFormatted() { - return TCPDF_STATIC::formatPageNumber($this->PageNo()); - } - - /** - * Put pdf layers. - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function _putocg() { - if (empty($this->pdflayers)) { - return; - } - foreach ($this->pdflayers as $key => $layer) { - $this->pdflayers[$key]['objid'] = $this->_newobj(); - $out = '<< /Type /OCG'; - $out .= ' /Name '.$this->_textstring($layer['name'], $this->pdflayers[$key]['objid']); - $out .= ' /Usage <<'; - if (isset($layer['print']) AND ($layer['print'] !== NULL)) { - $out .= ' /Print <>'; - } - $out .= ' /View <>'; - $out .= ' >> >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Start a new pdf layer. - * @param string $name Layer name (only a-z letters and numbers). Leave empty for automatic name. - * @param boolean|null $print Set to TRUE to print this layer, FALSE to not print and NULL to not set this option - * @param boolean $view Set to true to view this layer. - * @param boolean $lock If true lock the layer - * @public - * @since 5.9.102 (2011-07-13) - */ - public function startLayer($name='', $print=true, $view=true, $lock=true) { - if ($this->state != 2) { - return; - } - $layer = sprintf('LYR%03d', (count($this->pdflayers) + 1)); - if (empty($name)) { - $name = $layer; - } else { - $name = preg_replace('/[^a-zA-Z0-9_\-]/', '', $name); - } - $this->pdflayers[] = array('layer' => $layer, 'name' => $name, 'print' => $print, 'view' => $view, 'lock' => $lock); - $this->openMarkedContent = true; - $this->_out('/OC /'.$layer.' BDC'); - } - - /** - * End the current PDF layer. - * @public - * @since 5.9.102 (2011-07-13) - */ - public function endLayer() { - if ($this->state != 2) { - return; - } - if ($this->openMarkedContent) { - // close existing open marked-content layer - $this->_out('EMC'); - $this->openMarkedContent = false; - } - } - - /** - * Set the visibility of the successive elements. - * This can be useful, for instance, to put a background - * image or color that will show on screen but won't print. - * @param string $v visibility mode. Legal values are: all, print, screen or view. - * @public - * @since 3.0.000 (2008-03-27) - */ - public function setVisibility($v) { - if ($this->state != 2) { - return; - } - $this->endLayer(); - switch($v) { - case 'print': { - $this->startLayer('Print', true, false); - break; - } - case 'view': - case 'screen': { - $this->startLayer('View', false, true); - break; - } - case 'all': { - $this->_out(''); - break; - } - default: { - $this->Error('Incorrect visibility: '.$v); - break; - } - } - } - - /** - * Add transparency parameters to the current extgstate - * @param array $parms parameters - * @return int|void the number of extgstates - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function addExtGState($parms) { - if ($this->pdfa_mode || $this->pdfa_version >= 2) { - // transparencies are not allowed in PDF/A mode - return; - } - // check if this ExtGState already exist - foreach ($this->extgstates as $i => $ext) { - if ($ext['parms'] == $parms) { - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['extgstates'][$i] = $ext; - } - // return reference to existing ExtGState - return $i; - } - } - $n = (count($this->extgstates) + 1); - $this->extgstates[$n] = array('parms' => $parms); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['extgstates'][$n] = $this->extgstates[$n]; - } - return $n; - } - - /** - * Add an extgstate - * @param int $gs extgstate - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function setExtGState($gs) { - if (($this->pdfa_mode && $this->pdfa_version < 2) OR ($this->state != 2)) { - // transparency is not allowed in PDF/A-1 mode - return; - } - $this->_out(sprintf('/GS%d gs', $gs)); - } - - /** - * Put extgstates for object transparency - * @protected - * @since 3.0.000 (2008-03-27) - */ - protected function _putextgstates() { - foreach ($this->extgstates as $i => $ext) { - $this->extgstates[$i]['n'] = $this->_newobj(); - $out = '<< /Type /ExtGState'; - foreach ($ext['parms'] as $k => $v) { - if (is_float($v)) { - $v = sprintf('%F', $v); - } elseif ($v === true) { - $v = 'true'; - } elseif ($v === false) { - $v = 'false'; - } - $out .= ' /'.$k.' '.$v; - } - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - - /** - * Set overprint mode for stroking (OP) and non-stroking (op) painting operations. - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @param boolean $stroking If true apply overprint for stroking operations. - * @param boolean|null $nonstroking If true apply overprint for painting operations other than stroking. - * @param integer $mode Overprint mode: (0 = each source colour component value replaces the value previously painted for the corresponding device colorant; 1 = a tint value of 0.0 for a source colour component shall leave the corresponding component of the previously painted colour unchanged). - * @public - * @since 5.9.152 (2012-03-23) - */ - public function setOverprint($stroking=true, $nonstroking=null, $mode=0) { - if ($this->state != 2) { - return; - } - $stroking = $stroking ? true : false; - if (TCPDF_STATIC::empty_string($nonstroking)) { - // default value if not set - $nonstroking = $stroking; - } else { - $nonstroking = $nonstroking ? true : false; - } - if (($mode != 0) AND ($mode != 1)) { - $mode = 0; - } - $this->overprint = array('OP' => $stroking, 'op' => $nonstroking, 'OPM' => $mode); - $gs = $this->addExtGState($this->overprint); - $this->setExtGState($gs); - } - - /** - * Get the overprint mode array (OP, op, OPM). - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @return array - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getOverprint() { - return $this->overprint; - } - - /** - * Set alpha for stroking (CA) and non-stroking (ca) operations. - * @param float $stroking Alpha value for stroking operations: real value from 0 (transparent) to 1 (opaque). - * @param string $bm blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity - * @param float|null $nonstroking Alpha value for non-stroking operations: real value from 0 (transparent) to 1 (opaque). - * @param boolean $ais - * @public - * @since 3.0.000 (2008-03-27) - */ - public function setAlpha($stroking=1, $bm='Normal', $nonstroking=null, $ais=false) { - if ($this->pdfa_mode && $this->pdfa_version < 2) { - // transparency is not allowed in PDF/A-1 mode - return; - } - $stroking = floatval($stroking); - if (TCPDF_STATIC::empty_string($nonstroking)) { - // default value if not set - $nonstroking = $stroking; - } else { - $nonstroking = floatval($nonstroking); - } - if ($bm[0] == '/') { - // remove trailing slash - $bm = substr($bm, 1); - } - if (!in_array($bm, array('Normal', 'Multiply', 'Screen', 'Overlay', 'Darken', 'Lighten', 'ColorDodge', 'ColorBurn', 'HardLight', 'SoftLight', 'Difference', 'Exclusion', 'Hue', 'Saturation', 'Color', 'Luminosity'))) { - $bm = 'Normal'; - } - $ais = $ais ? true : false; - $this->alpha = array('CA' => $stroking, 'ca' => $nonstroking, 'BM' => '/'.$bm, 'AIS' => $ais); - $gs = $this->addExtGState($this->alpha); - $this->setExtGState($gs); - } - - /** - * Get the alpha mode array (CA, ca, BM, AIS). - * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). - * @return array - * @public - * @since 5.9.152 (2012-03-23) - */ - public function getAlpha() { - return $this->alpha; - } - - /** - * Set the default JPEG compression quality (1-100) - * @param int $quality JPEG quality, integer between 1 and 100 - * @public - * @since 3.0.000 (2008-03-27) - */ - public function setJPEGQuality($quality) { - if (($quality < 1) OR ($quality > 100)) { - $quality = 75; - } - $this->jpeg_quality = intval($quality); - } - - /** - * Set the default number of columns in a row for HTML tables. - * @param int $cols number of columns - * @public - * @since 3.0.014 (2008-06-04) - */ - public function setDefaultTableColumns($cols=4) { - $this->default_table_columns = intval($cols); - } - - /** - * Set the height of the cell (line height) respect the font height. - * @param float $h cell proportion respect font height (typical value = 1.25). - * @public - * @since 3.0.014 (2008-06-04) - */ - public function setCellHeightRatio($h) { - $this->cell_height_ratio = $h; - } - - /** - * return the height of cell repect font height. - * @public - * @return float - * @since 4.0.012 (2008-07-24) - */ - public function getCellHeightRatio() { - return $this->cell_height_ratio; - } - - /** - * Set the PDF version (check PDF reference for valid values). - * @param string $version PDF document version. - * @public - * @since 3.1.000 (2008-06-09) - */ - public function setPDFVersion($version='1.7') { - if ($this->pdfa_mode && $this->pdfa_version == 1 ) { - // PDF/A-1 mode - $this->PDFVersion = '1.4'; - } elseif ($this->pdfa_mode && $this->pdfa_version >= 2 ) { - // PDF/A-2 mode - $this->PDFVersion = '1.7'; - } else { - $this->PDFVersion = $version; - } - } - - /** - * Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print. - * (see Section 8.1 of PDF reference, "Viewer Preferences"). - *
      • HideToolbar boolean (Optional) A flag specifying whether to hide the viewer application's tool bars when the document is active. Default value: false.
      • HideMenubar boolean (Optional) A flag specifying whether to hide the viewer application's menu bar when the document is active. Default value: false.
      • HideWindowUI boolean (Optional) A flag specifying whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed. Default value: false.
      • FitWindow boolean (Optional) A flag specifying whether to resize the document's window to fit the size of the first displayed page. Default value: false.
      • CenterWindow boolean (Optional) A flag specifying whether to position the document's window in the center of the screen. Default value: false.
      • DisplayDocTitle boolean (Optional; PDF 1.4) A flag specifying whether the window's title bar should display the document title taken from the Title entry of the document information dictionary (see Section 10.2.1, "Document Information Dictionary"). If false, the title bar should instead display the name of the PDF file containing the document. Default value: false.
      • NonFullScreenPageMode name (Optional) The document's page mode, specifying how to display the document on exiting full-screen mode:
        • UseNone Neither document outline nor thumbnail images visible
        • UseOutlines Document outline visible
        • UseThumbs Thumbnail images visible
        • UseOC Optional content group panel visible
        This entry is meaningful only if the value of the PageMode entry in the catalog dictionary (see Section 3.6.1, "Document Catalog") is FullScreen; it is ignored otherwise. Default value: UseNone.
      • ViewArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be displayed when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:
        • MediaBox
        • CropBox (default)
        • BleedBox
        • TrimBox
        • ArtBox
      • ViewClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. Valid values are (see Section 10.10.1, "Page Boundaries").:
        • MediaBox
        • CropBox (default)
        • BleedBox
        • TrimBox
        • ArtBox
      • PrintArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be rendered when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:
        • MediaBox
        • CropBox (default)
        • BleedBox
        • TrimBox
        • ArtBox
      • PrintClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when printing the document. Valid values are (see Section 10.10.1, "Page Boundaries").:
        • MediaBox
        • CropBox (default)
        • BleedBox
        • TrimBox
        • ArtBox
      • PrintScaling name (Optional; PDF 1.6) The page scaling option to be selected when a print dialog is displayed for this document. Valid values are:
        • None, which indicates that the print dialog should reflect no page scaling
        • AppDefault (default), which indicates that applications should use the current print scaling
      • Duplex name (Optional; PDF 1.7) The paper handling option to use when printing the file from the print dialog. The following values are valid:
        • Simplex - Print single-sided
        • DuplexFlipShortEdge - Duplex and flip on the short edge of the sheet
        • DuplexFlipLongEdge - Duplex and flip on the long edge of the sheet
        Default value: none
      • PickTrayByPDFSize boolean (Optional; PDF 1.7) A flag specifying whether the PDF page size is used to select the input paper tray. This setting influences only the preset values used to populate the print dialog presented by a PDF viewer application. If PickTrayByPDFSize is true, the check box in the print dialog associated with input paper tray is checked. Note: This setting has no effect on Mac OS systems, which do not provide the ability to pick the input tray by size.
      • PrintPageRange array (Optional; PDF 1.7) The page numbers used to initialize the print dialog box when the file is printed. The first page of the PDF file is denoted by 1. Each pair consists of the first and last pages in the sub-range. An odd number of integers causes this entry to be ignored. Negative numbers cause the entire array to be ignored. Default value: as defined by PDF viewer application
      • NumCopies integer (Optional; PDF 1.7) The number of copies to be printed when the print dialog is opened for this file. Supported values are the integers 2 through 5. Values outside this range are ignored. Default value: as defined by PDF viewer application, but typically 1
      - * @param array $preferences array of options. - * @author Nicola Asuni - * @public - * @since 3.1.000 (2008-06-09) - */ - public function setViewerPreferences($preferences) { - $this->viewer_preferences = $preferences; - } - - /** - * Paints color transition registration bars - * @param float $x abscissa of the top left corner of the rectangle. - * @param float $y ordinate of the top left corner of the rectangle. - * @param float $w width of the rectangle. - * @param float $h height of the rectangle. - * @param boolean $transition if true prints tcolor transitions to white. - * @param boolean $vertical if true prints bar vertically. - * @param string $colors colors to print separated by comma. Valid values are: A,W,R,G,B,C,M,Y,K,RGB,CMYK,ALL,ALLSPOT,. Where: A = grayscale black, W = grayscale white, R = RGB red, G RGB green, B RGB blue, C = CMYK cyan, M = CMYK magenta, Y = CMYK yellow, K = CMYK key/black, RGB = RGB registration color, CMYK = CMYK registration color, ALL = Spot registration color, ALLSPOT = print all defined spot colors, = name of the spot color to print. - * @author Nicola Asuni - * @since 4.9.000 (2010-03-26) - * @public - */ - public function colorRegistrationBar($x, $y, $w, $h, $transition=true, $vertical=false, $colors='A,R,G,B,C,M,Y,K') { - if (strpos($colors, 'ALLSPOT') !== false) { - // expand spot colors - $spot_colors = ''; - foreach ($this->spot_colors as $spot_color_name => $v) { - $spot_colors .= ','.$spot_color_name; - } - if (!empty($spot_colors)) { - $spot_colors = substr($spot_colors, 1); - $colors = str_replace('ALLSPOT', $spot_colors, $colors); - } else { - $colors = str_replace('ALLSPOT', 'NONE', $colors); - } - } - $bars = explode(',', $colors); - $numbars = count($bars); // number of bars to print - if ($numbars <= 0) { - return; - } - // set bar measures - if ($vertical) { - $coords = array(0, 0, 0, 1); - $wb = $w / $numbars; // bar width - $hb = $h; // bar height - $xd = $wb; // delta x - $yd = 0; // delta y - } else { - $coords = array(1, 0, 0, 0); - $wb = $w; // bar width - $hb = $h / $numbars; // bar height - $xd = 0; // delta x - $yd = $hb; // delta y - } - $xb = $x; - $yb = $y; - foreach ($bars as $col) { - switch ($col) { - // set transition colors - case 'A': { // BLACK (GRAYSCALE) - $col_a = array(255); - $col_b = array(0); - break; - } - case 'W': { // WHITE (GRAYSCALE) - $col_a = array(0); - $col_b = array(255); - break; - } - case 'R': { // RED (RGB) - $col_a = array(255,255,255); - $col_b = array(255,0,0); - break; - } - case 'G': { // GREEN (RGB) - $col_a = array(255,255,255); - $col_b = array(0,255,0); - break; - } - case 'B': { // BLUE (RGB) - $col_a = array(255,255,255); - $col_b = array(0,0,255); - break; - } - case 'C': { // CYAN (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(100,0,0,0); - break; - } - case 'M': { // MAGENTA (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(0,100,0,0); - break; - } - case 'Y': { // YELLOW (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(0,0,100,0); - break; - } - case 'K': { // KEY - BLACK (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(0,0,0,100); - break; - } - case 'RGB': { // BLACK REGISTRATION (RGB) - $col_a = array(255,255,255); - $col_b = array(0,0,0); - break; - } - case 'CMYK': { // BLACK REGISTRATION (CMYK) - $col_a = array(0,0,0,0); - $col_b = array(100,100,100,100); - break; - } - case 'ALL': { // SPOT COLOR REGISTRATION - $col_a = array(0,0,0,0,'None'); - $col_b = array(100,100,100,100,'All'); - break; - } - case 'NONE': { // SKIP THIS COLOR - $col_a = array(0,0,0,0,'None'); - $col_b = array(0,0,0,0,'None'); - break; - } - default: { // SPECIFIC SPOT COLOR NAME - $col_a = array(0,0,0,0,'None'); - $col_b = TCPDF_COLORS::getSpotColor($col, $this->spot_colors); - if ($col_b === false) { - // in case of error defaults to the registration color - $col_b = array(100,100,100,100,'All'); - } - break; - } - } - if ($col != 'NONE') { - if ($transition) { - // color gradient - $this->LinearGradient($xb, $yb, $wb, $hb, $col_a, $col_b, $coords); - } else { - $this->setFillColorArray($col_b); - // colored rectangle - $this->Rect($xb, $yb, $wb, $hb, 'F', array()); - } - $xb += $xd; - $yb += $yd; - } - } - } - - /** - * Paints crop marks. - * @param float $x abscissa of the crop mark center. - * @param float $y ordinate of the crop mark center. - * @param float $w width of the crop mark. - * @param float $h height of the crop mark. - * @param string $type type of crop mark, one symbol per type separated by comma: T = TOP, F = BOTTOM, L = LEFT, R = RIGHT, TL = A = TOP-LEFT, TR = B = TOP-RIGHT, BL = C = BOTTOM-LEFT, BR = D = BOTTOM-RIGHT. - * @param array $color crop mark color (default spot registration color). - * @author Nicola Asuni - * @since 4.9.000 (2010-03-26) - * @public - */ - public function cropMark($x, $y, $w, $h, $type='T,R,B,L', $color=array(100,100,100,100,'All')) { - $this->setLineStyle(array('width' => (0.5 / $this->k), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $color)); - $type = strtoupper($type); - $type = preg_replace('/[^A-Z\-\,]*/', '', $type); - // split type in single components - $type = str_replace('-', ',', $type); - $type = str_replace('TL', 'T,L', $type); - $type = str_replace('TR', 'T,R', $type); - $type = str_replace('BL', 'F,L', $type); - $type = str_replace('BR', 'F,R', $type); - $type = str_replace('A', 'T,L', $type); - $type = str_replace('B', 'T,R', $type); - $type = str_replace('T,RO', 'BO', $type); - $type = str_replace('C', 'F,L', $type); - $type = str_replace('D', 'F,R', $type); - $crops = explode(',', strtoupper($type)); - // remove duplicates - $crops = array_unique($crops); - $dw = ($w / 4); // horizontal space to leave before the intersection point - $dh = ($h / 4); // vertical space to leave before the intersection point - foreach ($crops as $crop) { - switch ($crop) { - case 'T': - case 'TOP': { - $x1 = $x; - $y1 = ($y - $h); - $x2 = $x; - $y2 = ($y - $dh); - break; - } - case 'F': - case 'BOTTOM': { - $x1 = $x; - $y1 = ($y + $dh); - $x2 = $x; - $y2 = ($y + $h); - break; - } - case 'L': - case 'LEFT': { - $x1 = ($x - $w); - $y1 = $y; - $x2 = ($x - $dw); - $y2 = $y; - break; - } - case 'R': - case 'RIGHT': { - $x1 = ($x + $dw); - $y1 = $y; - $x2 = ($x + $w); - $y2 = $y; - break; - } - } - $this->Line($x1, $y1, $x2, $y2); - } - } - - /** - * Paints a registration mark - * @param float $x abscissa of the registration mark center. - * @param float $y ordinate of the registration mark center. - * @param float $r radius of the crop mark. - * @param boolean $double if true print two concentric crop marks. - * @param array $cola crop mark color (default spot registration color 'All'). - * @param array $colb second crop mark color (default spot registration color 'None'). - * @author Nicola Asuni - * @since 4.9.000 (2010-03-26) - * @public - */ - public function registrationMark($x, $y, $r, $double=false, $cola=array(100,100,100,100,'All'), $colb=array(0,0,0,0,'None')) { - $line_style = array('width' => max((0.5 / $this->k),($r / 30)), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $cola); - $this->setFillColorArray($cola); - $this->PieSector($x, $y, $r, 90, 180, 'F'); - $this->PieSector($x, $y, $r, 270, 360, 'F'); - $this->Circle($x, $y, $r, 0, 360, 'C', $line_style, array(), 8); - if ($double) { - $ri = $r * 0.5; - $this->setFillColorArray($colb); - $this->PieSector($x, $y, $ri, 90, 180, 'F'); - $this->PieSector($x, $y, $ri, 270, 360, 'F'); - $this->setFillColorArray($cola); - $this->PieSector($x, $y, $ri, 0, 90, 'F'); - $this->PieSector($x, $y, $ri, 180, 270, 'F'); - $this->Circle($x, $y, $ri, 0, 360, 'C', $line_style, array(), 8); - } - } - - /** - * Paints a CMYK registration mark - * @param float $x abscissa of the registration mark center. - * @param float $y ordinate of the registration mark center. - * @param float $r radius of the crop mark. - * @author Nicola Asuni - * @since 6.0.038 (2013-09-30) - * @public - */ - public function registrationMarkCMYK($x, $y, $r) { - // line width - $lw = max((0.5 / $this->k),($r / 8)); - // internal radius - $ri = ($r * 0.6); - // external radius - $re = ($r * 1.3); - // Cyan - $this->setFillColorArray(array(100,0,0,0)); - $this->PieSector($x, $y, $ri, 270, 360, 'F'); - // Magenta - $this->setFillColorArray(array(0,100,0,0)); - $this->PieSector($x, $y, $ri, 0, 90, 'F'); - // Yellow - $this->setFillColorArray(array(0,0,100,0)); - $this->PieSector($x, $y, $ri, 90, 180, 'F'); - // Key - black - $this->setFillColorArray(array(0,0,0,100)); - $this->PieSector($x, $y, $ri, 180, 270, 'F'); - // registration color - $line_style = array('width' => $lw, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(100,100,100,100,'All')); - $this->setFillColorArray(array(100,100,100,100,'All')); - // external circle - $this->Circle($x, $y, $r, 0, 360, 'C', $line_style, array(), 8); - // cross lines - $this->Line($x, ($y - $re), $x, ($y - $ri)); - $this->Line($x, ($y + $ri), $x, ($y + $re)); - $this->Line(($x - $re), $y, ($x - $ri), $y); - $this->Line(($x + $ri), $y, ($x + $re), $y); - } - - /** - * Paints a linear colour gradient. - * @param float $x abscissa of the top left corner of the rectangle. - * @param float $y ordinate of the top left corner of the rectangle. - * @param float $w width of the rectangle. - * @param float $h height of the rectangle. - * @param array $col1 first color (Grayscale, RGB or CMYK components). - * @param array $col2 second color (Grayscale, RGB or CMYK components). - * @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0). - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function LinearGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0,0,1,0)) { - $this->Clip($x, $y, $w, $h); - $this->Gradient(2, $coords, array(array('color' => $col1, 'offset' => 0, 'exponent' => 1), array('color' => $col2, 'offset' => 1, 'exponent' => 1)), array(), false); - } - - /** - * Paints a radial colour gradient. - * @param float $x abscissa of the top left corner of the rectangle. - * @param float $y ordinate of the top left corner of the rectangle. - * @param float $w width of the rectangle. - * @param float $h height of the rectangle. - * @param array $col1 first color (Grayscale, RGB or CMYK components). - * @param array $col2 second color (Grayscale, RGB or CMYK components). - * @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined. - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function RadialGradient($x, $y, $w, $h, $col1=array(), $col2=array(), $coords=array(0.5,0.5,0.5,0.5,1)) { - $this->Clip($x, $y, $w, $h); - $this->Gradient(3, $coords, array(array('color' => $col1, 'offset' => 0, 'exponent' => 1), array('color' => $col2, 'offset' => 1, 'exponent' => 1)), array(), false); - } - - /** - * Paints a coons patch mesh. - * @param float $x abscissa of the top left corner of the rectangle. - * @param float $y ordinate of the top left corner of the rectangle. - * @param float $w width of the rectangle. - * @param float $h height of the rectangle. - * @param array $col1 first color (lower left corner) (RGB components). - * @param array $col2 second color (lower right corner) (RGB components). - * @param array $col3 third color (upper right corner) (RGB components). - * @param array $col4 fourth color (upper left corner) (RGB components). - * @param array $coords
      • for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).
      • for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches
      - * @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 - * @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 - * @param boolean $antialias A flag indicating whether to filter the shading function to prevent aliasing artifacts. - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function CoonsPatchMesh($x, $y, $w, $h, $col1=array(), $col2=array(), $col3=array(), $col4=array(), $coords=array(0.00,0.0,0.33,0.00,0.67,0.00,1.00,0.00,1.00,0.33,1.00,0.67,1.00,1.00,0.67,1.00,0.33,1.00,0.00,1.00,0.00,0.67,0.00,0.33), $coords_min=0, $coords_max=1, $antialias=false) { - if (($this->pdfa_mode && $this->pdfa_version < 2) OR ($this->state != 2)) { - return; - } - $this->Clip($x, $y, $w, $h); - $n = count($this->gradients) + 1; - $this->gradients[$n] = array(); - $this->gradients[$n]['type'] = 6; //coons patch mesh - $this->gradients[$n]['coords'] = array(); - $this->gradients[$n]['antialias'] = $antialias; - $this->gradients[$n]['colors'] = array(); - $this->gradients[$n]['transparency'] = false; - //check the coords array if it is the simple array or the multi patch array - if (!isset($coords[0]['f'])) { - //simple array -> convert to multi patch array - if (!isset($col1[1])) { - $col1[1] = $col1[2] = $col1[0]; - } - if (!isset($col2[1])) { - $col2[1] = $col2[2] = $col2[0]; - } - if (!isset($col3[1])) { - $col3[1] = $col3[2] = $col3[0]; - } - if (!isset($col4[1])) { - $col4[1] = $col4[2] = $col4[0]; - } - $patch_array[0]['f'] = 0; - $patch_array[0]['points'] = $coords; - $patch_array[0]['colors'][0]['r'] = $col1[0]; - $patch_array[0]['colors'][0]['g'] = $col1[1]; - $patch_array[0]['colors'][0]['b'] = $col1[2]; - $patch_array[0]['colors'][1]['r'] = $col2[0]; - $patch_array[0]['colors'][1]['g'] = $col2[1]; - $patch_array[0]['colors'][1]['b'] = $col2[2]; - $patch_array[0]['colors'][2]['r'] = $col3[0]; - $patch_array[0]['colors'][2]['g'] = $col3[1]; - $patch_array[0]['colors'][2]['b'] = $col3[2]; - $patch_array[0]['colors'][3]['r'] = $col4[0]; - $patch_array[0]['colors'][3]['g'] = $col4[1]; - $patch_array[0]['colors'][3]['b'] = $col4[2]; - } else { - //multi patch array - $patch_array = $coords; - } - $bpcd = 65535; //16 bits per coordinate - //build the data stream - $this->gradients[$n]['stream'] = ''; - $count_patch = count($patch_array); - for ($i=0; $i < $count_patch; ++$i) { - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['f']); //start with the edge flag as 8 bit - $count_points = count($patch_array[$i]['points']); - for ($j=0; $j < $count_points; ++$j) { - //each point as 16 bit - $patch_array[$i]['points'][$j] = (($patch_array[$i]['points'][$j] - $coords_min) / ($coords_max - $coords_min)) * $bpcd; - if ($patch_array[$i]['points'][$j] < 0) { - $patch_array[$i]['points'][$j] = 0; - } - if ($patch_array[$i]['points'][$j] > $bpcd) { - $patch_array[$i]['points'][$j] = $bpcd; - } - $this->gradients[$n]['stream'] .= chr((int) floor($patch_array[$i]['points'][$j] / 256)); - $this->gradients[$n]['stream'] .= chr((int) floor(intval($patch_array[$i]['points'][$j]) % 256)); - } - $count_cols = count($patch_array[$i]['colors']); - for ($j=0; $j < $count_cols; ++$j) { - //each color component as 8 bit - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['r']); - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['g']); - $this->gradients[$n]['stream'] .= chr($patch_array[$i]['colors'][$j]['b']); - } - } - //paint the gradient - $this->_out('/Sh'.$n.' sh'); - //restore previous Graphic State - $this->_outRestoreGraphicsState(); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['gradients'][$n] = $this->gradients[$n]; - } - } - - /** - * Set a rectangular clipping area. - * @param float $x abscissa of the top left corner of the rectangle (or top right corner for RTL mode). - * @param float $y ordinate of the top left corner of the rectangle. - * @param float $w width of the rectangle. - * @param float $h height of the rectangle. - * @author Andreas W\FCrmser, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @protected - */ - protected function Clip($x, $y, $w, $h) { - if ($this->state != 2) { - return; - } - if ($this->rtl) { - $x = $this->w - $x - $w; - } - //save current Graphic State - $s = 'q'; - //set clipping area - $s .= sprintf(' %F %F %F %F re W n', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k); - //set up transformation matrix for gradient - $s .= sprintf(' %F 0 0 %F %F %F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k); - $this->_out($s); - } - - /** - * Output gradient. - * @param int $type type of gradient (1 Function-based shading; 2 Axial shading; 3 Radial shading; 4 Free-form Gouraud-shaded triangle mesh; 5 Lattice-form Gouraud-shaded triangle mesh; 6 Coons patch mesh; 7 Tensor-product patch mesh). (Not all types are currently supported) - * @param array $coords array of coordinates. - * @param array $stops array gradient color components: color = array of GRAY, RGB or CMYK color components; offset = (0 to 1) represents a location along the gradient vector; exponent = exponent of the exponential interpolation function (default = 1). - * @param array $background An array of colour components appropriate to the colour space, specifying a single background colour value. - * @param boolean $antialias A flag indicating whether to filter the shading function to prevent aliasing artifacts. - * @author Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function Gradient($type, $coords, $stops, $background=array(), $antialias=false) { - if (($this->pdfa_mode && $this->pdfa_version < 2) OR ($this->state != 2)) { - return; - } - $n = count($this->gradients) + 1; - $this->gradients[$n] = array(); - $this->gradients[$n]['type'] = $type; - $this->gradients[$n]['coords'] = $coords; - $this->gradients[$n]['antialias'] = $antialias; - $this->gradients[$n]['colors'] = array(); - $this->gradients[$n]['transparency'] = false; - // color space - $numcolspace = count($stops[0]['color']); - $bcolor = array_values($background); - switch($numcolspace) { - case 5: // SPOT - case 4: { // CMYK - $this->gradients[$n]['colspace'] = 'DeviceCMYK'; - if (!empty($background)) { - $this->gradients[$n]['background'] = sprintf('%F %F %F %F', $bcolor[0]/100, $bcolor[1]/100, $bcolor[2]/100, $bcolor[3]/100); - } - break; - } - case 3: { // RGB - $this->gradients[$n]['colspace'] = 'DeviceRGB'; - if (!empty($background)) { - $this->gradients[$n]['background'] = sprintf('%F %F %F', $bcolor[0]/255, $bcolor[1]/255, $bcolor[2]/255); - } - break; - } - case 1: { // GRAY SCALE - $this->gradients[$n]['colspace'] = 'DeviceGray'; - if (!empty($background)) { - $this->gradients[$n]['background'] = sprintf('%F', $bcolor[0]/255); - } - break; - } - } - $num_stops = count($stops); - $last_stop_id = $num_stops - 1; - foreach ($stops as $key => $stop) { - $this->gradients[$n]['colors'][$key] = array(); - // offset represents a location along the gradient vector - if (isset($stop['offset'])) { - $this->gradients[$n]['colors'][$key]['offset'] = $stop['offset']; - } else { - if ($key == 0) { - $this->gradients[$n]['colors'][$key]['offset'] = 0; - } elseif ($key == $last_stop_id) { - $this->gradients[$n]['colors'][$key]['offset'] = 1; - } else { - $offsetstep = (1 - $this->gradients[$n]['colors'][($key - 1)]['offset']) / ($num_stops - $key); - $this->gradients[$n]['colors'][$key]['offset'] = $this->gradients[$n]['colors'][($key - 1)]['offset'] + $offsetstep; - } - } - if (isset($stop['opacity'])) { - $this->gradients[$n]['colors'][$key]['opacity'] = $stop['opacity']; - if ((!($this->pdfa_mode && $this->pdfa_version < 2)) AND ($stop['opacity'] < 1)) { - $this->gradients[$n]['transparency'] = true; - } - } else { - $this->gradients[$n]['colors'][$key]['opacity'] = 1; - } - // exponent for the exponential interpolation function - if (isset($stop['exponent'])) { - $this->gradients[$n]['colors'][$key]['exponent'] = $stop['exponent']; - } else { - $this->gradients[$n]['colors'][$key]['exponent'] = 1; - } - // set colors - $color = array_values($stop['color']); - switch($numcolspace) { - case 5: // SPOT - case 4: { // CMYK - $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F %F %F %F', $color[0]/100, $color[1]/100, $color[2]/100, $color[3]/100); - break; - } - case 3: { // RGB - $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F %F %F', $color[0]/255, $color[1]/255, $color[2]/255); - break; - } - case 1: { // GRAY SCALE - $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F', $color[0]/255); - break; - } - } - } - if ($this->gradients[$n]['transparency']) { - // paint luminosity gradient - $this->_out('/TGS'.$n.' gs'); - } - //paint the gradient - $this->_out('/Sh'.$n.' sh'); - //restore previous Graphic State - $this->_outRestoreGraphicsState(); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['gradients'][$n] = $this->gradients[$n]; - } - } - - /** - * Output gradient shaders. - * @author Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @protected - */ - function _putshaders() { - if ($this->pdfa_mode && $this->pdfa_version < 2) { - return; - } - $idt = count($this->gradients); //index for transparency gradients - foreach ($this->gradients as $id => $grad) { - if (($grad['type'] == 2) OR ($grad['type'] == 3)) { - $fc = $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 3'; - $out .= ' /Domain [0 1]'; - $functions = ''; - $bounds = ''; - $encode = ''; - $i = 1; - $num_cols = count($grad['colors']); - $lastcols = $num_cols - 1; - for ($i = 1; $i < $num_cols; ++$i) { - $functions .= ($fc + $i).' 0 R '; - if ($i < $lastcols) { - $bounds .= sprintf('%F ', $grad['colors'][$i]['offset']); - } - $encode .= '0 1 '; - } - $out .= ' /Functions ['.trim($functions).']'; - $out .= ' /Bounds ['.trim($bounds).']'; - $out .= ' /Encode ['.trim($encode).']'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - for ($i = 1; $i < $num_cols; ++$i) { - $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 2'; - $out .= ' /Domain [0 1]'; - $out .= ' /C0 ['.$grad['colors'][($i - 1)]['color'].']'; - $out .= ' /C1 ['.$grad['colors'][$i]['color'].']'; - $out .= ' /N '.$grad['colors'][$i]['exponent']; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - // set transparency functions - if ($grad['transparency']) { - $ft = $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 3'; - $out .= ' /Domain [0 1]'; - $functions = ''; - $i = 1; - $num_cols = count($grad['colors']); - for ($i = 1; $i < $num_cols; ++$i) { - $functions .= ($ft + $i).' 0 R '; - } - $out .= ' /Functions ['.trim($functions).']'; - $out .= ' /Bounds ['.trim($bounds).']'; - $out .= ' /Encode ['.trim($encode).']'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - for ($i = 1; $i < $num_cols; ++$i) { - $this->_newobj(); - $out = '<<'; - $out .= ' /FunctionType 2'; - $out .= ' /Domain [0 1]'; - $out .= ' /C0 ['.$grad['colors'][($i - 1)]['opacity'].']'; - $out .= ' /C1 ['.$grad['colors'][$i]['opacity'].']'; - $out .= ' /N '.$grad['colors'][$i]['exponent']; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - } - } - } - // set shading object - $this->_newobj(); - $out = '<< /ShadingType '.$grad['type']; - if (isset($grad['colspace'])) { - $out .= ' /ColorSpace /'.$grad['colspace']; - } else { - $out .= ' /ColorSpace /DeviceRGB'; - } - if (isset($grad['background']) AND !empty($grad['background'])) { - $out .= ' /Background ['.$grad['background'].']'; - } - if (isset($grad['antialias']) AND ($grad['antialias'] === true)) { - $out .= ' /AntiAlias true'; - } - if ($grad['type'] == 2) { - $out .= ' '.sprintf('/Coords [%F %F %F %F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3]); - $out .= ' /Domain [0 1]'; - $out .= ' /Function '.$fc.' 0 R'; - $out .= ' /Extend [true true]'; - $out .= ' >>'; - } elseif ($grad['type'] == 3) { - //x0, y0, r0, x1, y1, r1 - //at this this time radius of inner circle is 0 - $out .= ' '.sprintf('/Coords [%F %F 0 %F %F %F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3], $grad['coords'][4]); - $out .= ' /Domain [0 1]'; - $out .= ' /Function '.$fc.' 0 R'; - $out .= ' /Extend [true true]'; - $out .= ' >>'; - } elseif ($grad['type'] == 6) { - $out .= ' /BitsPerCoordinate 16'; - $out .= ' /BitsPerComponent 8'; - $out .= ' /Decode[0 1 0 1 0 1 0 1 0 1]'; - $out .= ' /BitsPerFlag 8'; - $stream = $this->_getrawstream($grad['stream']); - $out .= ' /Length '.strlen($stream); - $out .= ' >>'; - $out .= ' stream'."\n".$stream."\n".'endstream'; - } - $out .= "\n".'endobj'; - $this->_out($out); - if ($grad['transparency']) { - $shading_transparency = preg_replace('/\/ColorSpace \/[^\s]+/si', '/ColorSpace /DeviceGray', $out); - $shading_transparency = preg_replace('/\/Function [0-9]+ /si', '/Function '.$ft.' ', $shading_transparency); - } - $this->gradients[$id]['id'] = $this->n; - // set pattern object - $this->_newobj(); - $out = '<< /Type /Pattern /PatternType 2'; - $out .= ' /Shading '.$this->gradients[$id]['id'].' 0 R'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $this->gradients[$id]['pattern'] = $this->n; - // set shading and pattern for transparency mask - if ($grad['transparency']) { - // luminosity pattern - $idgs = $id + $idt; - $this->_newobj(); - $this->_out($shading_transparency); - $this->gradients[$idgs]['id'] = $this->n; - $this->_newobj(); - $out = '<< /Type /Pattern /PatternType 2'; - $out .= ' /Shading '.$this->gradients[$idgs]['id'].' 0 R'; - $out .= ' >>'; - $out .= "\n".'endobj'; - $this->_out($out); - $this->gradients[$idgs]['pattern'] = $this->n; - // luminosity XObject - $oid = $this->_newobj(); - $this->xobjects['LX'.$oid] = array('n' => $oid); - $filter = ''; - $stream = 'q /a0 gs /Pattern cs /p'.$idgs.' scn 0 0 '.$this->wPt.' '.$this->hPt.' re f Q'; - if ($this->compress) { - $filter = ' /Filter /FlateDecode'; - $stream = gzcompress($stream); - } - $stream = $this->_getrawstream($stream); - $out = '<< /Type /XObject /Subtype /Form /FormType 1'.$filter; - $out .= ' /Length '.strlen($stream); - $rect = sprintf('%F %F', $this->wPt, $this->hPt); - $out .= ' /BBox [0 0 '.$rect.']'; - $out .= ' /Group << /Type /Group /S /Transparency /CS /DeviceGray >>'; - $out .= ' /Resources <<'; - $out .= ' /ExtGState << /a0 << /ca 1 /CA 1 >> >>'; - $out .= ' /Pattern << /p'.$idgs.' '.$this->gradients[$idgs]['pattern'].' 0 R >>'; - $out .= ' >>'; - $out .= ' >> '; - $out .= ' stream'."\n".$stream."\n".'endstream'; - $out .= "\n".'endobj'; - $this->_out($out); - // SMask - $this->_newobj(); - $out = '<< /Type /Mask /S /Luminosity /G '.($this->n - 1).' 0 R >>'."\n".'endobj'; - $this->_out($out); - // ExtGState - $this->_newobj(); - $out = '<< /Type /ExtGState /SMask '.($this->n - 1).' 0 R /AIS false >>'."\n".'endobj'; - $this->_out($out); - $this->extgstates[] = array('n' => $this->n, 'name' => 'TGS'.$id); - } - } - } - - /** - * Draw the sector of a circle. - * It can be used for instance to render pie charts. - * @param float $xc abscissa of the center. - * @param float $yc ordinate of the center. - * @param float $r radius. - * @param float $a start angle (in degrees). - * @param float $b end angle (in degrees). - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param float $cw indicates whether to go clockwise (default: true). - * @param float $o origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). Default: 90. - * @author Maxime Delorme, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function PieSector($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90) { - $this->PieSectorXY($xc, $yc, $r, $r, $a, $b, $style, $cw, $o); - } - - /** - * Draw the sector of an ellipse. - * It can be used for instance to render pie charts. - * @param float $xc abscissa of the center. - * @param float $yc ordinate of the center. - * @param float $rx the x-axis radius. - * @param float $ry the y-axis radius. - * @param float $a start angle (in degrees). - * @param float $b end angle (in degrees). - * @param string $style Style of rendering. See the getPathPaintOperator() function for more information. - * @param float $cw indicates whether to go clockwise. - * @param float $o origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). - * @param integer $nc Number of curves used to draw a 90 degrees portion of arc. - * @author Maxime Delorme, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function PieSectorXY($xc, $yc, $rx, $ry, $a, $b, $style='FD', $cw=false, $o=0, $nc=2) { - if ($this->state != 2) { - return; - } - if ($this->rtl) { - $xc = ($this->w - $xc); - } - $op = TCPDF_STATIC::getPathPaintOperator($style); - if ($op == 'f') { - $line_style = array(); - } - if ($cw) { - $d = $b; - $b = (360 - $a + $o); - $a = (360 - $d + $o); - } else { - $b += $o; - $a += $o; - } - $this->_outellipticalarc($xc, $yc, $rx, $ry, 0, $a, $b, true, $nc); - $this->_out($op); - } - - /** - * Embed vector-based Adobe Illustrator (AI) or AI-compatible EPS files. - * NOTE: EPS is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library. - * Only vector drawing is supported, not text or bitmap. - * Although the script was successfully tested with various AI format versions, best results are probably achieved with files that were exported in the AI3 format (tested with Illustrator CS2, Freehand MX and Photoshop CS2). - * @param string $file Name of the file containing the image or a '@' character followed by the EPS/AI data string. - * @param float|null $x Abscissa of the upper-left corner. - * @param float|null $y Ordinate of the upper-left corner. - * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param mixed $link URL or identifier returned by AddLink(). - * @param boolean $useBoundingBox specifies whether to position the bounding box (true) or the complete canvas (false) at location (x,y). Default value is true. - * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
      • T: top-right for LTR or top-left for RTL
      • M: middle-right for LTR or middle-left for RTL
      • B: bottom-right for LTR or bottom-left for RTL
      • N: next line
      - * @param string $palign Allows to center or align the image on the current line. Possible values are:
      • L : left align
      • C : center
      • R : right align
      • '' : empty string : left for LTR or right for RTL
      - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
      • 0: no border (default)
      • 1: frame
      or a string containing some or all of the following characters (in any order):
      • L: left
      • T: top
      • R: right
      • B: bottom
      or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param boolean $fitonpage if true the image is resized to not exceed page dimensions. - * @param boolean $fixoutvals if true remove values outside the bounding box. - * @author Valentin Schmidt, Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function ImageEps($file, $x=null, $y=null, $w=0, $h=0, $link='', $useBoundingBox=true, $align='', $palign='', $border=0, $fitonpage=false, $fixoutvals=false) { - if ($this->state != 2) { - return; - } - if ($this->rasterize_vector_images AND ($w > 0) AND ($h > 0)) { - // convert EPS to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'EPS', $link, $align, true, 300, $palign, false, false, $border, false, false, $fitonpage); - } - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $k = $this->k; - if ($file[0] === '@') { // image from string - $data = substr($file, 1); - } else { // EPS/AI file - $data = $this->getCachedFileContents($file); - } - if ($data === FALSE) { - $this->Error('EPS file not found: '.$file); - } - $regs = array(); - // EPS/AI compatibility check (only checks files created by Adobe Illustrator!) - preg_match("/%%Creator:([^\r\n]+)/", $data, $regs); # find Creator - if (count($regs) > 1) { - $version_str = trim($regs[1]); # e.g. "Adobe Illustrator(R) 8.0" - if (strpos($version_str, 'Adobe Illustrator') !== false) { - $versexp = explode(' ', $version_str); - $version = (float)array_pop($versexp); - if ($version >= 9) { - $this->Error('This version of Adobe Illustrator file is not supported: '.$file); - } - } - } - // strip binary bytes in front of PS-header - $start = strpos($data, '%!PS-Adobe'); - if ($start > 0) { - $data = substr($data, $start); - } - // find BoundingBox params - preg_match("/%%BoundingBox:([^\r\n]+)/", $data, $regs); - if (count($regs) > 1) { - list($x1, $y1, $x2, $y2) = explode(' ', trim($regs[1])); - } else { - $this->Error('No BoundingBox found in EPS/AI file: '.$file); - } - $start = strpos($data, '%%EndSetup'); - if ($start === false) { - $start = strpos($data, '%%EndProlog'); - } - if ($start === false) { - $start = strpos($data, '%%BoundingBox'); - } - $data = substr($data, $start); - $end = strpos($data, '%%PageTrailer'); - if ($end===false) { - $end = strpos($data, 'showpage'); - } - if ($end) { - $data = substr($data, 0, $end); - } - // calculate image width and height on document - if (($w <= 0) AND ($h <= 0)) { - $w = ($x2 - $x1) / $k; - $h = ($y2 - $y1) / $k; - } elseif ($w <= 0) { - $w = ($x2-$x1) / $k * ($h / (($y2 - $y1) / $k)); - } elseif ($h <= 0) { - $h = ($y2 - $y1) / $k * ($w / (($x2 - $x1) / $k)); - } - // fit the image on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - if ($this->rasterize_vector_images) { - // convert EPS to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'EPS', $link, $align, true, 300, $palign, false, false, $border, false, false, $fitonpage); - } - // set scaling factors - $scale_x = $w / (($x2 - $x1) / $k); - $scale_y = $h / (($y2 - $y1) / $k); - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x - $w; - } - $this->img_rb_x = $ximg; - } else { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x; - } - $this->img_rb_x = $ximg + $w; - } - if ($useBoundingBox) { - $dx = $ximg * $k - $x1; - $dy = $y * $k - $y1; - } else { - $dx = $ximg * $k; - $dy = $y * $k; - } - // save the current graphic state - $this->_out('q'.$this->epsmarker); - // translate - $this->_out(sprintf('%F %F %F %F %F %F cm', 1, 0, 0, 1, $dx, $dy + ($this->hPt - (2 * $y * $k) - ($y2 - $y1)))); - // scale - if (isset($scale_x)) { - $this->_out(sprintf('%F %F %F %F %F %F cm', $scale_x, 0, 0, $scale_y, $x1 * (1 - $scale_x), $y2 * (1 - $scale_y))); - } - // handle pc/unix/mac line endings - $lines = preg_split('/[\r\n]+/si', $data, -1, PREG_SPLIT_NO_EMPTY); - $u=0; - $cnt = count($lines); - for ($i=0; $i < $cnt; ++$i) { - $line = $lines[$i]; - if (($line == '') OR ($line[0] == '%')) { - continue; - } - $len = strlen($line); - // check for spot color names - $color_name = ''; - if (strcasecmp('x', substr(trim($line), -1)) == 0) { - if (preg_match('/\([^\)]*\)/', $line, $matches) > 0) { - // extract spot color name - $color_name = $matches[0]; - // remove color name from string - $line = str_replace(' '.$color_name, '', $line); - // remove pharentesis from color name - $color_name = substr($color_name, 1, -1); - } - } - $chunks = explode(' ', $line); - $cmd = trim(array_pop($chunks)); - // RGB - if (($cmd == 'Xa') OR ($cmd == 'XA')) { - $b = array_pop($chunks); - $g = array_pop($chunks); - $r = array_pop($chunks); - $this->_out(''.$r.' '.$g.' '.$b.' '.($cmd=='Xa'?'rg':'RG')); //substr($line, 0, -2).'rg' -> in EPS (AI8): c m y k r g b rg! - continue; - } - $skip = false; - if ($fixoutvals) { - // check for values outside the bounding box - switch ($cmd) { - case 'm': - case 'l': - case 'L': { - // skip values outside bounding box - foreach ($chunks as $key => $val) { - if ((($key % 2) == 0) AND (($val < $x1) OR ($val > $x2))) { - $skip = true; - } elseif ((($key % 2) != 0) AND (($val < $y1) OR ($val > $y2))) { - $skip = true; - } - } - } - } - } - switch ($cmd) { - case 'm': - case 'l': - case 'v': - case 'y': - case 'c': - case 'k': - case 'K': - case 'g': - case 'G': - case 's': - case 'S': - case 'J': - case 'j': - case 'w': - case 'M': - case 'd': - case 'n': { - if ($skip) { - break; - } - $this->_out($line); - break; - } - case 'x': {// custom fill color - if (empty($color_name)) { - // CMYK color - list($col_c, $col_m, $col_y, $col_k) = $chunks; - $this->_out(''.$col_c.' '.$col_m.' '.$col_y.' '.$col_k.' k'); - } else { - // Spot Color (CMYK + tint) - list($col_c, $col_m, $col_y, $col_k, $col_t) = $chunks; - $this->AddSpotColor($color_name, ($col_c * 100), ($col_m * 100), ($col_y * 100), ($col_k * 100)); - $color_cmd = sprintf('/CS%d cs %F scn', $this->spot_colors[$color_name]['i'], (1 - $col_t)); - $this->_out($color_cmd); - } - break; - } - case 'X': { // custom stroke color - if (empty($color_name)) { - // CMYK color - list($col_c, $col_m, $col_y, $col_k) = $chunks; - $this->_out(''.$col_c.' '.$col_m.' '.$col_y.' '.$col_k.' K'); - } else { - // Spot Color (CMYK + tint) - list($col_c, $col_m, $col_y, $col_k, $col_t) = $chunks; - $this->AddSpotColor($color_name, ($col_c * 100), ($col_m * 100), ($col_y * 100), ($col_k * 100)); - $color_cmd = sprintf('/CS%d CS %F SCN', $this->spot_colors[$color_name]['i'], (1 - $col_t)); - $this->_out($color_cmd); - } - break; - } - case 'Y': - case 'N': - case 'V': - case 'L': - case 'C': { - if ($skip) { - break; - } - $line[($len - 1)] = strtolower($cmd); - $this->_out($line); - break; - } - case 'b': - case 'B': { - $this->_out($cmd . '*'); - break; - } - case 'f': - case 'F': { - if ($u > 0) { - $isU = false; - $max = min(($i + 5), $cnt); - for ($j = ($i + 1); $j < $max; ++$j) { - $isU = ($isU OR (($lines[$j] == 'U') OR ($lines[$j] == '*U'))); - } - if ($isU) { - $this->_out('f*'); - } - } else { - $this->_out('f*'); - } - break; - } - case '*u': { - ++$u; - break; - } - case '*U': { - --$u; - break; - } - } - } - // restore previous graphic state - $this->_out($this->epsmarker.'Q'); - if (!empty($border)) { - $bx = $this->x; - $by = $this->y; - $this->x = $ximg; - if ($this->rtl) { - $this->x += $w; - } - $this->y = $y; - $this->Cell($w, $h, '', $border, 0, '', 0, '', 0, true); - $this->x = $bx; - $this->y = $by; - } - if ($link) { - $this->Link($ximg, $y, $w, $h, $link, 0); - } - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->setY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - } - - /** - * Set document barcode. - * @param string $bc barcode - * @public - */ - public function setBarcode($bc='') { - $this->barcode = $bc; - } - - /** - * Get current barcode. - * @return string - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getBarcode() { - return $this->barcode; - } - - /** - * Print a Linear Barcode. - * @param string $code code to print - * @param string $type type of barcode (see tcpdf_barcodes_1d.php for supported formats). - * @param float|null $x x position in user units (null = current x position) - * @param float|null $y y position in user units (null = current y position) - * @param float|null $w width in user units (null = remaining page width) - * @param float|null $h height in user units (null = remaining page height) - * @param float|null $xres width of the smallest bar in user units (null = default value = 0.4mm) - * @param array $style array of options:
        - *
      • boolean $style['border'] if true prints a border
      • - *
      • int $style['padding'] padding to leave around the barcode in user units (set to 'auto' for automatic padding)
      • - *
      • int $style['hpadding'] horizontal padding in user units (set to 'auto' for automatic padding)
      • - *
      • int $style['vpadding'] vertical padding in user units (set to 'auto' for automatic padding)
      • - *
      • array $style['fgcolor'] color array for bars and text
      • - *
      • mixed $style['bgcolor'] color array for background (set to false for transparent)
      • - *
      • boolean $style['text'] if true prints text below the barcode
      • - *
      • string $style['label'] override default label
      • - *
      • string $style['font'] font name for text
      • int $style['fontsize'] font size for text
      • - *
      • int $style['stretchtext']: 0 = disabled; 1 = horizontal scaling only if necessary; 2 = forced horizontal scaling; 3 = character spacing only if necessary; 4 = forced character spacing.
      • - *
      • string $style['position'] horizontal position of the containing barcode cell on the page: L = left margin; C = center; R = right margin.
      • - *
      • string $style['align'] horizontal position of the barcode on the containing rectangle: L = left; C = center; R = right.
      • - *
      • string $style['stretch'] if true stretch the barcode to best fit the available width, otherwise uses $xres resolution for a single bar.
      • - *
      • string $style['fitwidth'] if true reduce the width to fit the barcode width + padding. When this option is enabled the 'stretch' option is automatically disabled.
      • - *
      • string $style['cellfitalign'] this option works only when 'fitwidth' is true and 'position' is unset or empty. Set the horizontal position of the containing barcode cell inside the specified rectangle: L = left; C = center; R = right.
      - * @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
      • T: top-right for LTR or top-left for RTL
      • M: middle-right for LTR or middle-left for RTL
      • B: bottom-right for LTR or bottom-left for RTL
      • N: next line
      - * @author Nicola Asuni - * @since 3.1.000 (2008-06-09) - * @public - */ - public function write1DBarcode($code, $type, $x=null, $y=null, $w=null, $h=null, $xres=null, $style=array(), $align='') { - if (TCPDF_STATIC::empty_string(trim($code))) { - return; - } - require_once(dirname(__FILE__).'/tcpdf_barcodes_1d.php'); - // save current graphic settings - $gvars = $this->getGraphicVars(); - // create new barcode object - $barcodeobj = new TCPDFBarcode($code, $type); - $arrcode = $barcodeobj->getBarcodeArray(); - if (empty($arrcode) OR ($arrcode['maxw'] <= 0)) { - $this->Error('Error in 1D barcode string'); - } - if ($arrcode['maxh'] <= 0) { - $arrcode['maxh'] = 1; - } - // set default values - if (!isset($style['position'])) { - $style['position'] = ''; - } elseif ($style['position'] == 'S') { - // keep this for backward compatibility - $style['position'] = ''; - $style['stretch'] = true; - } - if (!isset($style['fitwidth'])) { - if (!isset($style['stretch'])) { - $style['fitwidth'] = true; - } else { - $style['fitwidth'] = false; - } - } - if ($style['fitwidth']) { - // disable stretch - $style['stretch'] = false; - } - if (!isset($style['stretch'])) { - if (($w === '') OR ($w <= 0)) { - $style['stretch'] = false; - } else { - $style['stretch'] = true; - } - } - if (!isset($style['fgcolor'])) { - $style['fgcolor'] = array(0,0,0); // default black - } - if (!isset($style['bgcolor'])) { - $style['bgcolor'] = false; // default transparent - } - if (!isset($style['border'])) { - $style['border'] = false; - } - $fontsize = 0; - if (!isset($style['text'])) { - $style['text'] = false; - } - if ($style['text'] AND isset($style['font'])) { - if (isset($style['fontsize'])) { - $fontsize = $style['fontsize']; - } - $this->setFont($style['font'], '', $fontsize); - } - if (!isset($style['stretchtext'])) { - $style['stretchtext'] = 4; - } - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - if (TCPDF_STATIC::empty_string($w) OR ($w <= 0)) { - if ($this->rtl) { - $w = $x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $x; - } - } - // padding - if (!isset($style['padding'])) { - $padding = 0; - } elseif ($style['padding'] === 'auto') { - $padding = 10 * ($w / ($arrcode['maxw'] + 20)); - } else { - $padding = floatval($style['padding']); - } - // horizontal padding - if (!isset($style['hpadding'])) { - $hpadding = $padding; - } elseif ($style['hpadding'] === 'auto') { - $hpadding = 10 * ($w / ($arrcode['maxw'] + 20)); - } else { - $hpadding = floatval($style['hpadding']); - } - // vertical padding - if (!isset($style['vpadding'])) { - $vpadding = $padding; - } elseif ($style['vpadding'] === 'auto') { - $vpadding = ($hpadding / 2); - } else { - $vpadding = floatval($style['vpadding']); - } - // calculate xres (single bar width) - $max_xres = ($w - (2 * $hpadding)) / $arrcode['maxw']; - if ($style['stretch']) { - $xres = $max_xres; - } else { - if (TCPDF_STATIC::empty_string($xres)) { - $xres = (0.141 * $this->k); // default bar width = 0.4 mm - } - if ($xres > $max_xres) { - // correct xres to fit on $w - $xres = $max_xres; - } - if ((isset($style['padding']) AND ($style['padding'] === 'auto')) - OR (isset($style['hpadding']) AND ($style['hpadding'] === 'auto'))) { - $hpadding = 10 * $xres; - if (isset($style['vpadding']) AND ($style['vpadding'] === 'auto')) { - $vpadding = ($hpadding / 2); - } - } - } - if ($style['fitwidth']) { - $wold = $w; - $w = (($arrcode['maxw'] * $xres) + (2 * $hpadding)); - if (isset($style['cellfitalign'])) { - switch ($style['cellfitalign']) { - case 'L': { - if ($this->rtl) { - $x -= ($wold - $w); - } - break; - } - case 'R': { - if (!$this->rtl) { - $x += ($wold - $w); - } - break; - } - case 'C': { - if ($this->rtl) { - $x -= (($wold - $w) / 2); - } else { - $x += (($wold - $w) / 2); - } - break; - } - default : { - break; - } - } - } - } - $text_height = $this->getCellHeight($fontsize / $this->k); - // height - if (TCPDF_STATIC::empty_string($h) OR ($h <= 0)) { - // set default height - $h = (($arrcode['maxw'] * $xres) / 3) + (2 * $vpadding) + $text_height; - } - $barh = $h - $text_height - (2 * $vpadding); - if ($barh <=0) { - // try to reduce font or padding to fit barcode on available height - if ($text_height > $h) { - $fontsize = (($h * $this->k) / (4 * $this->cell_height_ratio)); - $text_height = $this->getCellHeight($fontsize / $this->k); - $this->setFont($style['font'], '', $fontsize); - } - if ($vpadding > 0) { - $vpadding = (($h - $text_height) / 4); - } - $barh = $h - $text_height - (2 * $vpadding); - } - // fit the barcode on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, false); - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x - $w; - } - $this->img_rb_x = $xpos; - } else { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x; - } - $this->img_rb_x = $xpos + $w; - } - $xpos_rect = $xpos; - if (!isset($style['align'])) { - $style['align'] = 'C'; - } - switch ($style['align']) { - case 'L': { - $xpos = $xpos_rect + $hpadding; - break; - } - case 'R': { - $xpos = $xpos_rect + ($w - ($arrcode['maxw'] * $xres)) - $hpadding; - break; - } - case 'C': - default : { - $xpos = $xpos_rect + (($w - ($arrcode['maxw'] * $xres)) / 2); - break; - } - } - $xpos_text = $xpos; - // barcode is always printed in LTR direction - $tempRTL = $this->rtl; - $this->rtl = false; - // print background color - if ($style['bgcolor']) { - $this->Rect($xpos_rect, $y, $w, $h, $style['border'] ? 'DF' : 'F', '', $style['bgcolor']); - } elseif ($style['border']) { - $this->Rect($xpos_rect, $y, $w, $h, 'D'); - } - // set foreground color - $this->setDrawColorArray($style['fgcolor']); - $this->setTextColorArray($style['fgcolor']); - // print bars - foreach ($arrcode['bcode'] as $k => $v) { - $bw = ($v['w'] * $xres); - if ($v['t']) { - // draw a vertical bar - $ypos = $y + $vpadding + ($v['p'] * $barh / $arrcode['maxh']); - $this->Rect($xpos, $ypos, $bw, ($v['h'] * $barh / $arrcode['maxh']), 'F', array(), $style['fgcolor']); - } - $xpos += $bw; - } - // print text - if ($style['text']) { - if (isset($style['label']) AND !TCPDF_STATIC::empty_string($style['label'])) { - $label = $style['label']; - } else { - $label = $code; - } - $txtwidth = ($arrcode['maxw'] * $xres); - if ($this->GetStringWidth($label) > $txtwidth) { - $style['stretchtext'] = 2; - } - // print text - $this->x = $xpos_text; - $this->y = $y + $vpadding + $barh; - $cellpadding = $this->cell_padding; - $this->setCellPadding(0); - $this->Cell($txtwidth, 0, $label, 0, 0, 'C', false, '', $style['stretchtext'], false, 'T', 'T'); - $this->cell_padding = $cellpadding; - } - // restore original direction - $this->rtl = $tempRTL; - // restore previous settings - $this->setGraphicVars($gvars); - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h / 2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->setY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - } - - /** - * Print 2D Barcode. - * @param string $code code to print - * @param string $type type of barcode (see tcpdf_barcodes_2d.php for supported formats). - * @param float|null $x x position in user units - * @param float|null $y y position in user units - * @param float|null $w width in user units - * @param float|null $h height in user units - * @param array $style array of options:
        - *
      • boolean $style['border'] if true prints a border around the barcode
      • - *
      • int $style['padding'] padding to leave around the barcode in barcode units (set to 'auto' for automatic padding)
      • - *
      • int $style['hpadding'] horizontal padding in barcode units (set to 'auto' for automatic padding)
      • - *
      • int $style['vpadding'] vertical padding in barcode units (set to 'auto' for automatic padding)
      • - *
      • int $style['module_width'] width of a single module in points
      • - *
      • int $style['module_height'] height of a single module in points
      • - *
      • array $style['fgcolor'] color array for bars and text
      • - *
      • mixed $style['bgcolor'] color array for background or false for transparent
      • - *
      • string $style['position'] barcode position on the page: L = left margin; C = center; R = right margin; S = stretch
      • - * @param string $align Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
        • T: top-right for LTR or top-left for RTL
        • M: middle-right for LTR or middle-left for RTL
        • B: bottom-right for LTR or bottom-left for RTL
        • N: next line
        - * @param boolean $distort if true distort the barcode to fit width and height, otherwise preserve aspect ratio - * @author Nicola Asuni - * @since 4.5.037 (2009-04-07) - * @public - */ - public function write2DBarcode($code, $type, $x=null, $y=null, $w=null, $h=null, $style=array(), $align='', $distort=false) { - if (TCPDF_STATIC::empty_string(trim($code))) { - return; - } - require_once(dirname(__FILE__).'/tcpdf_barcodes_2d.php'); - // save current graphic settings - $gvars = $this->getGraphicVars(); - // create new barcode object - $barcodeobj = new TCPDF2DBarcode($code, $type); - $arrcode = $barcodeobj->getBarcodeArray(); - if (empty($arrcode) OR !isset($arrcode['num_rows']) OR ($arrcode['num_rows'] == 0) OR !isset($arrcode['num_cols']) OR ($arrcode['num_cols'] == 0)) { - $this->Error('Error in 2D barcode string'); - } - // set default values - if (!isset($style['position'])) { - $style['position'] = ''; - } - if (!isset($style['fgcolor'])) { - $style['fgcolor'] = array(0,0,0); // default black - } - if (!isset($style['bgcolor'])) { - $style['bgcolor'] = false; // default transparent - } - if (!isset($style['border'])) { - $style['border'] = false; - } - // padding - if (!isset($style['padding'])) { - $style['padding'] = 0; - } elseif ($style['padding'] === 'auto') { - $style['padding'] = 4; - } - if (!isset($style['hpadding'])) { - $style['hpadding'] = $style['padding']; - } elseif ($style['hpadding'] === 'auto') { - $style['hpadding'] = 4; - } - if (!isset($style['vpadding'])) { - $style['vpadding'] = $style['padding']; - } elseif ($style['vpadding'] === 'auto') { - $style['vpadding'] = 4; - } - $hpad = (2 * $style['hpadding']); - $vpad = (2 * $style['vpadding']); - // cell (module) dimension - if (!isset($style['module_width'])) { - $style['module_width'] = 1; // width of a single module in points - } - if (!isset($style['module_height'])) { - $style['module_height'] = 1; // height of a single module in points - } - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - // number of barcode columns and rows - $rows = $arrcode['num_rows']; - $cols = $arrcode['num_cols']; - if (($rows <= 0) || ($cols <= 0)){ - $this->Error('Error in 2D barcode string'); - } - // module width and height - $mw = $style['module_width']; - $mh = $style['module_height']; - if (($mw <= 0) OR ($mh <= 0)) { - $this->Error('Error in 2D barcode string'); - } - // get max dimensions - if ($this->rtl) { - $maxw = $x - $this->lMargin; - } else { - $maxw = $this->w - $this->rMargin - $x; - } - $maxh = ($this->h - $this->tMargin - $this->bMargin); - $ratioHW = ((($rows * $mh) + $hpad) / (($cols * $mw) + $vpad)); - $ratioWH = ((($cols * $mw) + $vpad) / (($rows * $mh) + $hpad)); - if (!$distort) { - if (($maxw * $ratioHW) > $maxh) { - $maxw = $maxh * $ratioWH; - } - if (($maxh * $ratioWH) > $maxw) { - $maxh = $maxw * $ratioHW; - } - } - // set maximum dimensions - if ($w > $maxw) { - $w = $maxw; - } - if ($h > $maxh) { - $h = $maxh; - } - // set dimensions - if ((TCPDF_STATIC::empty_string($w) OR ($w <= 0)) AND (TCPDF_STATIC::empty_string($h) OR ($h <= 0))) { - $w = ($cols + $hpad) * ($mw / $this->k); - $h = ($rows + $vpad) * ($mh / $this->k); - } elseif (($w === '') OR ($w <= 0)) { - $w = $h * $ratioWH; - } elseif (($h === '') OR ($h <= 0)) { - $h = $w * $ratioHW; - } - // barcode size (excluding padding) - $bw = ($w * $cols) / ($cols + $hpad); - $bh = ($h * $rows) / ($rows + $vpad); - // dimension of single barcode cell unit - $cw = $bw / $cols; - $ch = $bh / $rows; - if (!$distort) { - if (($cw / $ch) > ($mw / $mh)) { - // correct horizontal distortion - $cw = $ch * $mw / $mh; - $bw = $cw * $cols; - $style['hpadding'] = ($w - $bw) / (2 * $cw); - } else { - // correct vertical distortion - $ch = $cw * $mh / $mw; - $bh = $ch * $rows; - $style['vpadding'] = ($h - $bh) / (2 * $ch); - } - } - // fit the barcode on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, false); - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x - $w; - } - $this->img_rb_x = $xpos; - } else { - if ($style['position'] == 'L') { - $xpos = $this->lMargin; - } elseif ($style['position'] == 'C') { - $xpos = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($style['position'] == 'R') { - $xpos = $this->w - $this->rMargin - $w; - } else { - $xpos = $x; - } - $this->img_rb_x = $xpos + $w; - } - $xstart = $xpos + ($style['hpadding'] * $cw); - $ystart = $y + ($style['vpadding'] * $ch); - // barcode is always printed in LTR direction - $tempRTL = $this->rtl; - $this->rtl = false; - // print background color - if ($style['bgcolor']) { - $this->Rect($xpos, $y, $w, $h, $style['border'] ? 'DF' : 'F', '', $style['bgcolor']); - } elseif ($style['border']) { - $this->Rect($xpos, $y, $w, $h, 'D'); - } - // set foreground color - $this->setDrawColorArray($style['fgcolor']); - // print barcode cells - // for each row - for ($r = 0; $r < $rows; ++$r) { - $xr = $xstart; - // for each column - for ($c = 0; $c < $cols; ++$c) { - if ($arrcode['bcode'][$r][$c] == 1) { - // draw a single barcode cell - $this->Rect($xr, $ystart, $cw, $ch, 'F', array(), $style['fgcolor']); - } - $xr += $cw; - } - $ystart += $ch; - } - // restore original direction - $this->rtl = $tempRTL; - // restore previous settings - $this->setGraphicVars($gvars); - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->setY($this->img_rb_y); - break; - } - default:{ - break; - } - } - $this->endlinex = $this->img_rb_x; - } - - /** - * Returns an array containing current margins: - *
          -
        • $ret['left'] = left margin
        • -
        • $ret['right'] = right margin
        • -
        • $ret['top'] = top margin
        • -
        • $ret['bottom'] = bottom margin
        • -
        • $ret['header'] = header margin
        • -
        • $ret['footer'] = footer margin
        • -
        • $ret['cell'] = cell padding array
        • -
        • $ret['padding_left'] = cell left padding
        • -
        • $ret['padding_top'] = cell top padding
        • -
        • $ret['padding_right'] = cell right padding
        • -
        • $ret['padding_bottom'] = cell bottom padding
        • - *
        - * @return array containing all margins measures - * @public - * @since 3.2.000 (2008-06-23) - */ - public function getMargins() { - $ret = array( - 'left' => $this->lMargin, - 'right' => $this->rMargin, - 'top' => $this->tMargin, - 'bottom' => $this->bMargin, - 'header' => $this->header_margin, - 'footer' => $this->footer_margin, - 'cell' => $this->cell_padding, - 'padding_left' => $this->cell_padding['L'], - 'padding_top' => $this->cell_padding['T'], - 'padding_right' => $this->cell_padding['R'], - 'padding_bottom' => $this->cell_padding['B'] - ); - return $ret; - } - - /** - * Returns an array containing original margins: - *
          -
        • $ret['left'] = left margin
        • -
        • $ret['right'] = right margin
        • - *
        - * @return array containing all margins measures - * @public - * @since 4.0.012 (2008-07-24) - */ - public function getOriginalMargins() { - $ret = array( - 'left' => $this->original_lMargin, - 'right' => $this->original_rMargin - ); - return $ret; - } - - /** - * Returns the current font size. - * @return float current font size - * @public - * @since 3.2.000 (2008-06-23) - */ - public function getFontSize() { - return $this->FontSize; - } - - /** - * Returns the current font size in points unit. - * @return int current font size in points unit - * @public - * @since 3.2.000 (2008-06-23) - */ - public function getFontSizePt() { - return $this->FontSizePt; - } - - /** - * Returns the current font family name. - * @return string current font family name - * @public - * @since 4.3.008 (2008-12-05) - */ - public function getFontFamily() { - return $this->FontFamily; - } - - /** - * Returns the current font style. - * @return string current font style - * @public - * @since 4.3.008 (2008-12-05) - */ - public function getFontStyle() { - return $this->FontStyle; - } - - /** - * Cleanup HTML code (requires HTML Tidy library). - * @param string $html htmlcode to fix - * @param string $default_css CSS commands to add - * @param array|null $tagvs parameters for setHtmlVSpace method - * @param array|null $tidy_options options for tidy_parse_string function - * @return string XHTML code cleaned up - * @author Nicola Asuni - * @public - * @since 5.9.017 (2010-11-16) - * @see setHtmlVSpace() - */ - public function fixHTMLCode($html, $default_css='', $tagvs=null, $tidy_options=null) { - return TCPDF_STATIC::fixHTMLCode($html, $default_css, $tagvs, $tidy_options, $this->tagvspaces); - } - - /** - * Returns the border width from CSS property - * @param string $width border width - * @return int with in user units - * @protected - * @since 5.7.000 (2010-08-02) - */ - protected function getCSSBorderWidth($width) { - if ($width == 'thin') { - $width = (2 / $this->k); - } elseif ($width == 'medium') { - $width = (4 / $this->k); - } elseif ($width == 'thick') { - $width = (6 / $this->k); - } else { - $width = $this->getHTMLUnitToUnits($width, 1, 'px', false); - } - return $width; - } - - /** - * Returns the border dash style from CSS property - * @param string $style border style to convert - * @return int sash style (return -1 in case of none or hidden border) - * @protected - * @since 5.7.000 (2010-08-02) - */ - protected function getCSSBorderDashStyle($style) { - switch (strtolower($style)) { - case 'none': - case 'hidden': { - $dash = -1; - break; - } - case 'dotted': { - $dash = 1; - break; - } - case 'dashed': { - $dash = 3; - break; - } - case 'double': - case 'groove': - case 'ridge': - case 'inset': - case 'outset': - case 'solid': - default: { - $dash = 0; - break; - } - } - return $dash; - } - - /** - * Returns the border style array from CSS border properties - * @param string $cssborder border properties - * @return array containing border properties - * @protected - * @since 5.7.000 (2010-08-02) - */ - protected function getCSSBorderStyle($cssborder) { - $bprop = preg_split('/[\s]+/', trim($cssborder)); - $border = array(); // value to be returned - switch (count($bprop)) { - case 3: { - $width = $bprop[0]; - $style = $bprop[1]; - $color = $bprop[2]; - break; - } - case 2: { - $width = 'medium'; - $style = $bprop[0]; - $color = $bprop[1]; - break; - } - case 1: { - $width = 'medium'; - $style = $bprop[0]; - $color = 'black'; - break; - } - default: { - $width = 'medium'; - $style = 'solid'; - $color = 'black'; - break; - } - } - if ($style == 'none') { - return array(); - } - $border['cap'] = 'square'; - $border['join'] = 'miter'; - $border['dash'] = $this->getCSSBorderDashStyle($style); - if ($border['dash'] < 0) { - return array(); - } - $border['width'] = $this->getCSSBorderWidth($width); - $border['color'] = TCPDF_COLORS::convertHTMLColorToDec($color, $this->spot_colors); - return $border; - } - - /** - * Get the internal Cell padding from CSS attribute. - * @param string $csspadding padding properties - * @param float $width width of the containing element - * @return array of cell paddings - * @public - * @since 5.9.000 (2010-10-04) - */ - public function getCSSPadding($csspadding, $width=0) { - $padding = preg_split('/[\s]+/', trim($csspadding)); - $cell_padding = array(); // value to be returned - switch (count($padding)) { - case 4: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[1]; - $cell_padding['B'] = $padding[2]; - $cell_padding['L'] = $padding[3]; - break; - } - case 3: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[1]; - $cell_padding['B'] = $padding[2]; - $cell_padding['L'] = $padding[1]; - break; - } - case 2: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[1]; - $cell_padding['B'] = $padding[0]; - $cell_padding['L'] = $padding[1]; - break; - } - case 1: { - $cell_padding['T'] = $padding[0]; - $cell_padding['R'] = $padding[0]; - $cell_padding['B'] = $padding[0]; - $cell_padding['L'] = $padding[0]; - break; - } - default: { - return $this->cell_padding; - } - } - if ($width == 0) { - $width = $this->w - $this->lMargin - $this->rMargin; - } - $cell_padding['T'] = $this->getHTMLUnitToUnits($cell_padding['T'], $width, 'px', false); - $cell_padding['R'] = $this->getHTMLUnitToUnits($cell_padding['R'], $width, 'px', false); - $cell_padding['B'] = $this->getHTMLUnitToUnits($cell_padding['B'], $width, 'px', false); - $cell_padding['L'] = $this->getHTMLUnitToUnits($cell_padding['L'], $width, 'px', false); - return $cell_padding; - } - - /** - * Get the internal Cell margin from CSS attribute. - * @param string $cssmargin margin properties - * @param float $width width of the containing element - * @return array of cell margins - * @public - * @since 5.9.000 (2010-10-04) - */ - public function getCSSMargin($cssmargin, $width=0) { - $margin = preg_split('/[\s]+/', trim($cssmargin)); - $cell_margin = array(); // value to be returned - switch (count($margin)) { - case 4: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[1]; - $cell_margin['B'] = $margin[2]; - $cell_margin['L'] = $margin[3]; - break; - } - case 3: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[1]; - $cell_margin['B'] = $margin[2]; - $cell_margin['L'] = $margin[1]; - break; - } - case 2: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[1]; - $cell_margin['B'] = $margin[0]; - $cell_margin['L'] = $margin[1]; - break; - } - case 1: { - $cell_margin['T'] = $margin[0]; - $cell_margin['R'] = $margin[0]; - $cell_margin['B'] = $margin[0]; - $cell_margin['L'] = $margin[0]; - break; - } - default: { - return $this->cell_margin; - } - } - if ($width == 0) { - $width = $this->w - $this->lMargin - $this->rMargin; - } - $cell_margin['T'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['T']), $width, 'px', false); - $cell_margin['R'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['R']), $width, 'px', false); - $cell_margin['B'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['B']), $width, 'px', false); - $cell_margin['L'] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $cell_margin['L']), $width, 'px', false); - return $cell_margin; - } - - /** - * Get the border-spacing from CSS attribute. - * @param string $cssbspace border-spacing CSS properties - * @param float $width width of the containing element - * @return array of border spacings - * @public - * @since 5.9.010 (2010-10-27) - */ - public function getCSSBorderMargin($cssbspace, $width=0) { - $space = preg_split('/[\s]+/', trim($cssbspace)); - $border_spacing = array(); // value to be returned - switch (count($space)) { - case 2: { - $border_spacing['H'] = $space[0]; - $border_spacing['V'] = $space[1]; - break; - } - case 1: { - $border_spacing['H'] = $space[0]; - $border_spacing['V'] = $space[0]; - break; - } - default: { - return array('H' => 0, 'V' => 0); - } - } - if ($width == 0) { - $width = $this->w - $this->lMargin - $this->rMargin; - } - $border_spacing['H'] = $this->getHTMLUnitToUnits($border_spacing['H'], $width, 'px', false); - $border_spacing['V'] = $this->getHTMLUnitToUnits($border_spacing['V'], $width, 'px', false); - return $border_spacing; - } - - /** - * Returns the letter-spacing value from CSS value - * @param string $spacing letter-spacing value - * @param float $parent font spacing (tracking) value of the parent element - * @return float quantity to increases or decreases the space between characters in a text. - * @protected - * @since 5.9.000 (2010-10-02) - */ - protected function getCSSFontSpacing($spacing, $parent=0) { - $val = 0; // value to be returned - $spacing = trim($spacing); - switch ($spacing) { - case 'normal': { - $val = 0; - break; - } - case 'inherit': { - if ($parent == 'normal') { - $val = 0; - } else { - $val = $parent; - } - break; - } - default: { - $val = $this->getHTMLUnitToUnits($spacing, 0, 'px', false); - } - } - return $val; - } - - /** - * Returns the percentage of font stretching from CSS value - * @param string $stretch stretch mode - * @param float $parent stretch value of the parent element - * @return float font stretching percentage - * @protected - * @since 5.9.000 (2010-10-02) - */ - protected function getCSSFontStretching($stretch, $parent=100) { - $val = 100; // value to be returned - $stretch = trim($stretch); - switch ($stretch) { - case 'ultra-condensed': { - $val = 40; - break; - } - case 'extra-condensed': { - $val = 55; - break; - } - case 'condensed': { - $val = 70; - break; - } - case 'semi-condensed': { - $val = 85; - break; - } - case 'normal': { - $val = 100; - break; - } - case 'semi-expanded': { - $val = 115; - break; - } - case 'expanded': { - $val = 130; - break; - } - case 'extra-expanded': { - $val = 145; - break; - } - case 'ultra-expanded': { - $val = 160; - break; - } - case 'wider': { - $val = ($parent + 10); - break; - } - case 'narrower': { - $val = ($parent - 10); - break; - } - case 'inherit': { - if ($parent == 'normal') { - $val = 100; - } else { - $val = $parent; - } - break; - } - default: { - $val = $this->getHTMLUnitToUnits($stretch, 100, '%', false); - } - } - return $val; - } - - /** - * Convert HTML string containing font size value to points - * @param string $val String containing font size value and unit. - * @param float $refsize Reference font size in points. - * @param float $parent_size Parent font size in points. - * @param string $defaultunit Default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt). - * @return float value in points - * @public - */ - public function getHTMLFontUnits($val, $refsize=12, $parent_size=12, $defaultunit='pt') { - $refsize = TCPDF_FONTS::getFontRefSize($refsize); - $parent_size = TCPDF_FONTS::getFontRefSize($parent_size, $refsize); - switch ($val) { - case 'xx-small': { - $size = ($refsize - 4); - break; - } - case 'x-small': { - $size = ($refsize - 3); - break; - } - case 'small': { - $size = ($refsize - 2); - break; - } - case 'medium': { - $size = $refsize; - break; - } - case 'large': { - $size = ($refsize + 2); - break; - } - case 'x-large': { - $size = ($refsize + 4); - break; - } - case 'xx-large': { - $size = ($refsize + 6); - break; - } - case 'smaller': { - $size = ($parent_size - 3); - break; - } - case 'larger': { - $size = ($parent_size + 3); - break; - } - default: { - $size = $this->getHTMLUnitToUnits($val, $parent_size, $defaultunit, true); - } - } - return $size; - } - - /** - * Returns the HTML DOM array. - * @param string $html html code - * @return array - * @protected - * @since 3.2.000 (2008-06-20) - */ - protected function getHtmlDomArray($html) { - // array of CSS styles ( selector => properties). - $css = array(); - // get CSS array defined at previous call - $matches = array(); - if (preg_match_all('/([^\<]*?)<\/cssarray>/is', $html, $matches) > 0) { - if (isset($matches[1][0])) { - $css = array_merge($css, json_decode($this->unhtmlentities($matches[1][0]), true)); - } - $html = preg_replace('/(.*?)<\/cssarray>/is', '', $html); - } - // extract external CSS files - $matches = array(); - if (preg_match_all('/]*?)>/is', $html, $matches) > 0) { - foreach ($matches[1] as $key => $link) { - $type = array(); - if (preg_match('/type[\s]*=[\s]*"text\/css"/', $link, $type)) { - $type = array(); - preg_match('/media[\s]*=[\s]*"([^"]*)"/', $link, $type); - // get 'all' and 'print' media, other media types are discarded - // (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) - if (empty($type) OR (isset($type[1]) AND (($type[1] == 'all') OR ($type[1] == 'print')))) { - $type = array(); - if (preg_match('/href[\s]*=[\s]*"([^"]*)"/', $link, $type) > 0) { - // read CSS data file - $cssdata = $this->getCachedFileContents(trim($type[1])); - if (($cssdata !== FALSE) AND (strlen($cssdata) > 0)) { - $css = array_merge($css, TCPDF_STATIC::extractCSSproperties($cssdata)); - } - } - } - } - } - } - // extract style tags - $matches = array(); - if (preg_match_all('/]*?)>([^\<]*?)<\/style>/is', $html, $matches) > 0) { - foreach ($matches[1] as $key => $media) { - $type = array(); - preg_match('/media[\s]*=[\s]*"([^"]*)"/', $media, $type); - // get 'all' and 'print' media, other media types are discarded - // (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) - if (empty($type) OR (isset($type[1]) AND (($type[1] == 'all') OR ($type[1] == 'print')))) { - $cssdata = $matches[2][$key]; - $css = array_merge($css, TCPDF_STATIC::extractCSSproperties($cssdata)); - } - } - } - // create a special tag to contain the CSS array (used for table content) - $csstagarray = ''.htmlentities(json_encode($css)).''; - // remove head and style blocks - $html = preg_replace('/]*?)>(.*?)<\/head>/is', '', $html); - $html = preg_replace('/]*?)>([^\<]*?)<\/style>/is', '', $html); - // define block tags - $blocktags = array('blockquote','br','dd','dl','div','dt','h1','h2','h3','h4','h5','h6','hr','li','ol','p','pre','ul','tcpdf','table','tr','td'); - // define self-closing tags - $selfclosingtags = array('area','base','basefont','br','hr','input','img','link','meta'); - // remove all unsupported tags (the line below lists all supported tags) - $html = strip_tags($html, '




  • ', $offset)) !== false) { - $html_a = substr($html, 0, $offset); - $html_b = substr($html, $offset, ($pos - $offset + 11)); - while (preg_match("']*)>(.*?)\n(.*?)'si", $html_b)) { - // preserve newlines on 'si", "\\2\\3", $html_b); - $html_b = preg_replace("']*)>(.*?)[\"](.*?)'si", "\\2''\\3", $html_b); - } - $html = $html_a.$html_b.substr($html, $pos + 11); - $offset = strlen($html_a.$html_b); - } - $html = preg_replace('/([\s]*)', $html); - $offset = 0; - while (($offset < strlen($html)) AND ($pos = strpos($html, '', $offset)) !== false) { - $html_a = substr($html, 0, $offset); - $html_b = substr($html, $offset, ($pos - $offset + 9)); - while (preg_match("']*)>(.*?)'si", $html_b)) { - $html_b = preg_replace("']*)>(.*?)'si", "\\2#!TaB!#\\4#!NwL!#", $html_b); - $html_b = preg_replace("']*)>(.*?)'si", "\\2#!NwL!#", $html_b); - } - $html = $html_a.$html_b.substr($html, $pos + 9); - $offset = strlen($html_a.$html_b); - } - if (preg_match("']*)>'si", "'si", "\" />", $html); - } - $html = str_replace("\n", ' ', $html); - // restore textarea newlines - $html = str_replace('', "\n", $html); - // remove extra spaces from code - $html = preg_replace('/[\s]+<\/(table|tr|ul|ol|dl)>/', '', $html); - $html = preg_replace('/'.$this->re_space['p'].'+<\/(td|th|li|dt|dd)>/'.$this->re_space['m'], '', $html); - $html = preg_replace('/[\s]+<(tr|td|th|li|dt|dd)/', '<\\1', $html); - $html = preg_replace('/'.$this->re_space['p'].'+<(ul|ol|dl|br)/'.$this->re_space['m'], '<\\1', $html); - $html = preg_replace('/<\/(table|tr|td|th|blockquote|dd|dt|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|ul|p)>[\s]+<', $html); - $html = preg_replace('/<\/(td|th)>/', '', $html); - $html = preg_replace('/<\/table>([\s]*)/', '
    ', $html); - $html = preg_replace('/'.$this->re_space['p'].'+re_space['m'], chr(32).']*)>[\s]+([^\<])/xi', ' \\2', $html); - $html = preg_replace('/]*)>/xi', '', $html); - $html = preg_replace('/]*)>([^\<]*)<\/textarea>/xi', '', $html); - $html = preg_replace('/]*)><\/li>/', ' 
  • ', $html); - $html = preg_replace('/]*)>'.$this->re_space['p'].'*re_space['m'], ' \/]*)>[\s]/', '<\\1> ', $html); // preserve some spaces - $html = preg_replace('/[\s]<\/([^\>]*)>/', ' ', $html); // preserve some spaces - $html = preg_replace('//', '', $html); // fix sub/sup alignment - $html = preg_replace('/'.$this->re_space['p'].'+/'.$this->re_space['m'], chr(32), $html); // replace multiple spaces with a single space - // trim string - $html = $this->stringTrim($html); - // fix br tag after li - $html = preg_replace('/
  • ]*)>/', '
  • ', $html); - // fix first image tag alignment - $html = preg_replace('/^
    FontFamily; - $dom[$key]['fontstyle'] = $this->FontStyle; - $dom[$key]['fontsize'] = $this->FontSizePt; - $dom[$key]['font-stretch'] = $this->font_stretching; - $dom[$key]['letter-spacing'] = $this->font_spacing; - $dom[$key]['stroke'] = $this->textstrokewidth; - $dom[$key]['fill'] = (($this->textrendermode % 2) == 0); - $dom[$key]['clip'] = ($this->textrendermode > 3); - $dom[$key]['line-height'] = $this->cell_height_ratio; - $dom[$key]['bgcolor'] = false; - $dom[$key]['fgcolor'] = $this->fgcolor; // color - $dom[$key]['strokecolor'] = $this->strokecolor; - $dom[$key]['align'] = ''; - $dom[$key]['listtype'] = ''; - $dom[$key]['text-indent'] = 0; - $dom[$key]['text-transform'] = ''; - $dom[$key]['border'] = array(); - $dom[$key]['dir'] = $this->rtl?'rtl':'ltr'; - $thead = false; // true when we are inside the THEAD tag - ++$key; - $level = array(); - array_push($level, 0); // root - while ($elkey < $maxel) { - $dom[$key] = array(); - $element = $a[$elkey]; - $dom[$key]['elkey'] = $elkey; - if (preg_match($tagpattern, $element)) { - // html tag - $element = substr($element, 1, -1); - // get tag name - preg_match('/[\/]?([a-zA-Z0-9]*)/', $element, $tag); - $tagname = strtolower($tag[1]); - // check if we are inside a table header - if ($tagname == 'thead') { - if ($element[0] == '/') { - $thead = false; - } else { - $thead = true; - } - ++$elkey; - continue; - } - $dom[$key]['tag'] = true; - $dom[$key]['value'] = $tagname; - if (in_array($dom[$key]['value'], $blocktags)) { - $dom[$key]['block'] = true; - } else { - $dom[$key]['block'] = false; - } - if ($element[0] == '/') { - // *** closing html tag - $dom[$key]['opening'] = false; - $dom[$key]['parent'] = end($level); - array_pop($level); - $dom[$key]['hide'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['hide']; - $dom[$key]['fontname'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontname']; - $dom[$key]['fontstyle'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontstyle']; - $dom[$key]['fontsize'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fontsize']; - $dom[$key]['font-stretch'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['font-stretch']; - $dom[$key]['letter-spacing'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['letter-spacing']; - $dom[$key]['stroke'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['stroke']; - $dom[$key]['fill'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fill']; - $dom[$key]['clip'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['clip']; - $dom[$key]['line-height'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['line-height']; - $dom[$key]['bgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['bgcolor']; - $dom[$key]['fgcolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['fgcolor']; - $dom[$key]['strokecolor'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['strokecolor']; - $dom[$key]['align'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['align']; - $dom[$key]['text-transform'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['text-transform']; - $dom[$key]['dir'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['dir']; - if (isset($dom[($dom[($dom[$key]['parent'])]['parent'])]['listtype'])) { - $dom[$key]['listtype'] = $dom[($dom[($dom[$key]['parent'])]['parent'])]['listtype']; - } - // set the number of columns in table tag - if (($dom[$key]['value'] == 'tr') AND (!isset($dom[($dom[($dom[$key]['parent'])]['parent'])]['cols']))) { - $dom[($dom[($dom[$key]['parent'])]['parent'])]['cols'] = $dom[($dom[$key]['parent'])]['cols']; - } - if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) { - $dom[($dom[$key]['parent'])]['content'] = $csstagarray; - for ($i = ($dom[$key]['parent'] + 1); $i < $key; ++$i) { - $dom[($dom[$key]['parent'])]['content'] .= stripslashes($a[$dom[$i]['elkey']]); - } - $key = $i; - // mark nested tables - $dom[($dom[$key]['parent'])]['content'] = str_replace('', '', $dom[($dom[$key]['parent'])]['content']); - $dom[($dom[$key]['parent'])]['content'] = str_replace('', '', $dom[($dom[$key]['parent'])]['content']); - } - // store header rows on a new table - if ( - ($dom[$key]['value'] === 'tr') - && !empty($dom[($dom[$key]['parent'])]['thead']) - && ($dom[($dom[$key]['parent'])]['thead'] === true) - ) { - if (TCPDF_STATIC::empty_string($dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'])) { - $dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'] = $csstagarray.$a[$dom[($dom[($dom[$key]['parent'])]['parent'])]['elkey']]; - } - for ($i = $dom[$key]['parent']; $i <= $key; ++$i) { - $dom[($dom[($dom[$key]['parent'])]['parent'])]['thead'] .= $a[$dom[$i]['elkey']]; - } - if (!isset($dom[($dom[$key]['parent'])]['attribute'])) { - $dom[($dom[$key]['parent'])]['attribute'] = array(); - } - // header elements must be always contained in a single page - $dom[($dom[$key]['parent'])]['attribute']['nobr'] = 'true'; - } - if (($dom[$key]['value'] == 'table') AND (!TCPDF_STATIC::empty_string($dom[($dom[$key]['parent'])]['thead']))) { - // remove the nobr attributes from the table header - $dom[($dom[$key]['parent'])]['thead'] = str_replace(' nobr="true"', '', $dom[($dom[$key]['parent'])]['thead']); - $dom[($dom[$key]['parent'])]['thead'] .= ''; - } - } else { - // *** opening or self-closing html tag - $dom[$key]['opening'] = true; - $dom[$key]['parent'] = end($level); - if ((substr($element, -1, 1) == '/') OR (in_array($dom[$key]['value'], $selfclosingtags))) { - // self-closing tag - $dom[$key]['self'] = true; - } else { - // opening tag - array_push($level, $key); - $dom[$key]['self'] = false; - } - // copy some values from parent - $parentkey = 0; - if ($key > 0) { - $parentkey = $dom[$key]['parent']; - $dom[$key]['hide'] = $dom[$parentkey]['hide']; - $dom[$key]['fontname'] = $dom[$parentkey]['fontname']; - $dom[$key]['fontstyle'] = $dom[$parentkey]['fontstyle']; - $dom[$key]['fontsize'] = $dom[$parentkey]['fontsize']; - $dom[$key]['font-stretch'] = $dom[$parentkey]['font-stretch']; - $dom[$key]['letter-spacing'] = $dom[$parentkey]['letter-spacing']; - $dom[$key]['stroke'] = $dom[$parentkey]['stroke']; - $dom[$key]['fill'] = $dom[$parentkey]['fill']; - $dom[$key]['clip'] = $dom[$parentkey]['clip']; - $dom[$key]['line-height'] = $dom[$parentkey]['line-height']; - $dom[$key]['bgcolor'] = $dom[$parentkey]['bgcolor']; - $dom[$key]['fgcolor'] = $dom[$parentkey]['fgcolor']; - $dom[$key]['strokecolor'] = $dom[$parentkey]['strokecolor']; - $dom[$key]['align'] = $dom[$parentkey]['align']; - $dom[$key]['listtype'] = $dom[$parentkey]['listtype']; - $dom[$key]['text-indent'] = $dom[$parentkey]['text-indent']; - $dom[$key]['text-transform'] = $dom[$parentkey]['text-transform']; - $dom[$key]['border'] = array(); - $dom[$key]['dir'] = $dom[$parentkey]['dir']; - } - // get attributes - preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER); - $dom[$key]['attribute'] = array(); // reset attribute array - foreach($attr_array[1] as $id => $name) { - $dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id]; - } - if (!empty($css)) { - // merge CSS style to current style - list($dom[$key]['csssel'], $dom[$key]['cssdata']) = TCPDF_STATIC::getCSSdataArray($dom, $key, $css); - $dom[$key]['attribute']['style'] = TCPDF_STATIC::getTagStyleFromCSSarray($dom[$key]['cssdata']); - } - // split style attributes - if (isset($dom[$key]['attribute']['style']) AND !empty($dom[$key]['attribute']['style'])) { - // get style attributes - preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER); - $dom[$key]['style'] = array(); // reset style attribute array - foreach($style_array[1] as $id => $name) { - // in case of duplicate attribute the last replace the previous - $dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]); - } - // --- get some style attributes --- - // text direction - if (isset($dom[$key]['style']['direction'])) { - $dom[$key]['dir'] = $dom[$key]['style']['direction']; - } - // display - if (isset($dom[$key]['style']['display'])) { - $dom[$key]['hide'] = (trim(strtolower($dom[$key]['style']['display'])) == 'none'); - } - // font family - if (isset($dom[$key]['style']['font-family'])) { - $dom[$key]['fontname'] = $this->getFontFamilyName($dom[$key]['style']['font-family']); - } - // list-style-type - if (isset($dom[$key]['style']['list-style-type'])) { - $dom[$key]['listtype'] = trim(strtolower($dom[$key]['style']['list-style-type'])); - if ($dom[$key]['listtype'] == 'inherit') { - $dom[$key]['listtype'] = $dom[$parentkey]['listtype']; - } - } - // text-indent - if (isset($dom[$key]['style']['text-indent'])) { - $dom[$key]['text-indent'] = $this->getHTMLUnitToUnits($dom[$key]['style']['text-indent']); - if ($dom[$key]['text-indent'] == 'inherit') { - $dom[$key]['text-indent'] = $dom[$parentkey]['text-indent']; - } - } - // text-transform - if (isset($dom[$key]['style']['text-transform'])) { - $dom[$key]['text-transform'] = $dom[$key]['style']['text-transform']; - } - // font size - if (isset($dom[$key]['style']['font-size'])) { - $fsize = trim($dom[$key]['style']['font-size']); - $dom[$key]['fontsize'] = $this->getHTMLFontUnits($fsize, $dom[0]['fontsize'], $dom[$parentkey]['fontsize'], 'pt'); - } - // font-stretch - if (isset($dom[$key]['style']['font-stretch'])) { - $dom[$key]['font-stretch'] = $this->getCSSFontStretching($dom[$key]['style']['font-stretch'], $dom[$parentkey]['font-stretch']); - } - // letter-spacing - if (isset($dom[$key]['style']['letter-spacing'])) { - $dom[$key]['letter-spacing'] = $this->getCSSFontSpacing($dom[$key]['style']['letter-spacing'], $dom[$parentkey]['letter-spacing']); - } - // line-height (internally is the cell height ratio) - if (isset($dom[$key]['style']['line-height'])) { - $lineheight = trim($dom[$key]['style']['line-height']); - switch ($lineheight) { - // A normal line height. This is default - case 'normal': { - $dom[$key]['line-height'] = $dom[0]['line-height']; - break; - } - case 'inherit': { - $dom[$key]['line-height'] = $dom[$parentkey]['line-height']; - } - default: { - if (is_numeric($lineheight)) { - // convert to percentage of font height - $lineheight = ($lineheight * 100).'%'; - } - $dom[$key]['line-height'] = $this->getHTMLUnitToUnits($lineheight, 1, '%', true); - if (substr($lineheight, -1) !== '%') { - if ($dom[$key]['fontsize'] <= 0) { - $dom[$key]['line-height'] = 1; - } else { - $dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']); - } - } - } - } - } - // font style - if (isset($dom[$key]['style']['font-weight'])) { - if (strtolower($dom[$key]['style']['font-weight'][0]) == 'n') { - if (strpos($dom[$key]['fontstyle'], 'B') !== false) { - $dom[$key]['fontstyle'] = str_replace('B', '', $dom[$key]['fontstyle']); - } - } elseif (strtolower($dom[$key]['style']['font-weight'][0]) == 'b') { - $dom[$key]['fontstyle'] .= 'B'; - } - } - if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style'][0]) == 'i')) { - $dom[$key]['fontstyle'] .= 'I'; - } - // font color - if (isset($dom[$key]['style']['color']) AND (!TCPDF_STATIC::empty_string($dom[$key]['style']['color']))) { - $dom[$key]['fgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['style']['color'], $this->spot_colors); - } elseif ($dom[$key]['value'] == 'a') { - $dom[$key]['fgcolor'] = $this->htmlLinkColorArray; - } - // background color - if (isset($dom[$key]['style']['background-color']) AND (!TCPDF_STATIC::empty_string($dom[$key]['style']['background-color']))) { - $dom[$key]['bgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['style']['background-color'], $this->spot_colors); - } - // text-decoration - if (isset($dom[$key]['style']['text-decoration'])) { - $decors = explode(' ', strtolower($dom[$key]['style']['text-decoration'])); - foreach ($decors as $dec) { - $dec = trim($dec); - if (!TCPDF_STATIC::empty_string($dec)) { - if ($dec[0] == 'u') { - // underline - $dom[$key]['fontstyle'] .= 'U'; - } elseif ($dec[0] == 'l') { - // line-through - $dom[$key]['fontstyle'] .= 'D'; - } elseif ($dec[0] == 'o') { - // overline - $dom[$key]['fontstyle'] .= 'O'; - } - } - } - } elseif ($dom[$key]['value'] == 'a') { - $dom[$key]['fontstyle'] = $this->htmlLinkFontStyle; - } - // check for width attribute - if (isset($dom[$key]['style']['width'])) { - $dom[$key]['width'] = $dom[$key]['style']['width']; - } - // check for height attribute - if (isset($dom[$key]['style']['height'])) { - $dom[$key]['height'] = $dom[$key]['style']['height']; - } - // check for text alignment - if (isset($dom[$key]['style']['text-align'])) { - $dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align'][0]); - } - // check for CSS border properties - if (isset($dom[$key]['style']['border'])) { - $borderstyle = $this->getCSSBorderStyle($dom[$key]['style']['border']); - if (!empty($borderstyle)) { - $dom[$key]['border']['LTRB'] = $borderstyle; - } - } - if (isset($dom[$key]['style']['border-color'])) { - $brd_colors = preg_split('/[\s]+/', trim($dom[$key]['style']['border-color'])); - if (isset($brd_colors[3])) { - $dom[$key]['border']['L']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[3], $this->spot_colors); - } - if (isset($brd_colors[1])) { - $dom[$key]['border']['R']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[1], $this->spot_colors); - } - if (isset($brd_colors[0])) { - $dom[$key]['border']['T']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[0], $this->spot_colors); - } - if (isset($brd_colors[2])) { - $dom[$key]['border']['B']['color'] = TCPDF_COLORS::convertHTMLColorToDec($brd_colors[2], $this->spot_colors); - } - } - if (isset($dom[$key]['style']['border-width'])) { - $brd_widths = preg_split('/[\s]+/', trim($dom[$key]['style']['border-width'])); - if (isset($brd_widths[3])) { - $dom[$key]['border']['L']['width'] = $this->getCSSBorderWidth($brd_widths[3]); - } - if (isset($brd_widths[1])) { - $dom[$key]['border']['R']['width'] = $this->getCSSBorderWidth($brd_widths[1]); - } - if (isset($brd_widths[0])) { - $dom[$key]['border']['T']['width'] = $this->getCSSBorderWidth($brd_widths[0]); - } - if (isset($brd_widths[2])) { - $dom[$key]['border']['B']['width'] = $this->getCSSBorderWidth($brd_widths[2]); - } - } - if (isset($dom[$key]['style']['border-style'])) { - $brd_styles = preg_split('/[\s]+/', trim($dom[$key]['style']['border-style'])); - if (isset($brd_styles[3]) AND ($brd_styles[3]!='none')) { - $dom[$key]['border']['L']['cap'] = 'square'; - $dom[$key]['border']['L']['join'] = 'miter'; - $dom[$key]['border']['L']['dash'] = $this->getCSSBorderDashStyle($brd_styles[3]); - if ($dom[$key]['border']['L']['dash'] < 0) { - $dom[$key]['border']['L'] = array(); - } - } - if (isset($brd_styles[1])) { - $dom[$key]['border']['R']['cap'] = 'square'; - $dom[$key]['border']['R']['join'] = 'miter'; - $dom[$key]['border']['R']['dash'] = $this->getCSSBorderDashStyle($brd_styles[1]); - if ($dom[$key]['border']['R']['dash'] < 0) { - $dom[$key]['border']['R'] = array(); - } - } - if (isset($brd_styles[0])) { - $dom[$key]['border']['T']['cap'] = 'square'; - $dom[$key]['border']['T']['join'] = 'miter'; - $dom[$key]['border']['T']['dash'] = $this->getCSSBorderDashStyle($brd_styles[0]); - if ($dom[$key]['border']['T']['dash'] < 0) { - $dom[$key]['border']['T'] = array(); - } - } - if (isset($brd_styles[2])) { - $dom[$key]['border']['B']['cap'] = 'square'; - $dom[$key]['border']['B']['join'] = 'miter'; - $dom[$key]['border']['B']['dash'] = $this->getCSSBorderDashStyle($brd_styles[2]); - if ($dom[$key]['border']['B']['dash'] < 0) { - $dom[$key]['border']['B'] = array(); - } - } - } - $cellside = array('L' => 'left', 'R' => 'right', 'T' => 'top', 'B' => 'bottom'); - foreach ($cellside as $bsk => $bsv) { - if (isset($dom[$key]['style']['border-'.$bsv])) { - $borderstyle = $this->getCSSBorderStyle($dom[$key]['style']['border-'.$bsv]); - if (!empty($borderstyle)) { - $dom[$key]['border'][$bsk] = $borderstyle; - } - } - if (isset($dom[$key]['style']['border-'.$bsv.'-color'])) { - $dom[$key]['border'][$bsk]['color'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['style']['border-'.$bsv.'-color'], $this->spot_colors); - } - if (isset($dom[$key]['style']['border-'.$bsv.'-width'])) { - $dom[$key]['border'][$bsk]['width'] = $this->getCSSBorderWidth($dom[$key]['style']['border-'.$bsv.'-width']); - } - if (isset($dom[$key]['style']['border-'.$bsv.'-style'])) { - $dom[$key]['border'][$bsk]['dash'] = $this->getCSSBorderDashStyle($dom[$key]['style']['border-'.$bsv.'-style']); - if ($dom[$key]['border'][$bsk]['dash'] < 0) { - $dom[$key]['border'][$bsk] = array(); - } - } - } - // check for CSS padding properties - if (isset($dom[$key]['style']['padding'])) { - $dom[$key]['padding'] = $this->getCSSPadding($dom[$key]['style']['padding']); - } else { - $dom[$key]['padding'] = $this->cell_padding; - } - foreach ($cellside as $psk => $psv) { - if (isset($dom[$key]['style']['padding-'.$psv])) { - $dom[$key]['padding'][$psk] = $this->getHTMLUnitToUnits($dom[$key]['style']['padding-'.$psv], 0, 'px', false); - } - } - // check for CSS margin properties - if (isset($dom[$key]['style']['margin'])) { - $dom[$key]['margin'] = $this->getCSSMargin($dom[$key]['style']['margin']); - } else { - $dom[$key]['margin'] = $this->cell_margin; - } - foreach ($cellside as $psk => $psv) { - if (isset($dom[$key]['style']['margin-'.$psv])) { - $dom[$key]['margin'][$psk] = $this->getHTMLUnitToUnits(str_replace('auto', '0', $dom[$key]['style']['margin-'.$psv]), 0, 'px', false); - } - } - // check for CSS border-spacing properties - if (isset($dom[$key]['style']['border-spacing'])) { - $dom[$key]['border-spacing'] = $this->getCSSBorderMargin($dom[$key]['style']['border-spacing']); - } - // page-break-inside - if (isset($dom[$key]['style']['page-break-inside']) AND ($dom[$key]['style']['page-break-inside'] == 'avoid')) { - $dom[$key]['attribute']['nobr'] = 'true'; - } - // page-break-before - if (isset($dom[$key]['style']['page-break-before'])) { - if ($dom[$key]['style']['page-break-before'] == 'always') { - $dom[$key]['attribute']['pagebreak'] = 'true'; - } elseif ($dom[$key]['style']['page-break-before'] == 'left') { - $dom[$key]['attribute']['pagebreak'] = 'left'; - } elseif ($dom[$key]['style']['page-break-before'] == 'right') { - $dom[$key]['attribute']['pagebreak'] = 'right'; - } - } - // page-break-after - if (isset($dom[$key]['style']['page-break-after'])) { - if ($dom[$key]['style']['page-break-after'] == 'always') { - $dom[$key]['attribute']['pagebreakafter'] = 'true'; - } elseif ($dom[$key]['style']['page-break-after'] == 'left') { - $dom[$key]['attribute']['pagebreakafter'] = 'left'; - } elseif ($dom[$key]['style']['page-break-after'] == 'right') { - $dom[$key]['attribute']['pagebreakafter'] = 'right'; - } - } - } - if (isset($dom[$key]['attribute']['display'])) { - $dom[$key]['hide'] = (trim(strtolower($dom[$key]['attribute']['display'])) == 'none'); - } - if (isset($dom[$key]['attribute']['border']) AND ($dom[$key]['attribute']['border'] != 0)) { - $borderstyle = $this->getCSSBorderStyle($dom[$key]['attribute']['border'].' solid black'); - if (!empty($borderstyle)) { - $dom[$key]['border']['LTRB'] = $borderstyle; - } - } - // check for font tag - if ($dom[$key]['value'] == 'font') { - // font family - if (isset($dom[$key]['attribute']['face'])) { - $dom[$key]['fontname'] = $this->getFontFamilyName($dom[$key]['attribute']['face']); - } - // font size - if (isset($dom[$key]['attribute']['size'])) { - if ($key > 0) { - if ($dom[$key]['attribute']['size'][0] == '+') { - $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1)); - } elseif ($dom[$key]['attribute']['size'][0] == '-') { - $dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1)); - } else { - $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']); - } - } else { - $dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']); - } - } - } - // force natural alignment for lists - if ((($dom[$key]['value'] == 'ul') OR ($dom[$key]['value'] == 'ol') OR ($dom[$key]['value'] == 'dl')) - AND (!isset($dom[$key]['align']) OR TCPDF_STATIC::empty_string($dom[$key]['align']) OR ($dom[$key]['align'] != 'J'))) { - if ($this->rtl) { - $dom[$key]['align'] = 'R'; - } else { - $dom[$key]['align'] = 'L'; - } - } - if (($dom[$key]['value'] == 'small') OR ($dom[$key]['value'] == 'sup') OR ($dom[$key]['value'] == 'sub')) { - if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) { - $dom[$key]['fontsize'] = $dom[$key]['fontsize'] * K_SMALL_RATIO; - } - } - if (($dom[$key]['value'] == 'strong') OR ($dom[$key]['value'] == 'b')) { - $dom[$key]['fontstyle'] .= 'B'; - } - if (($dom[$key]['value'] == 'em') OR ($dom[$key]['value'] == 'i')) { - $dom[$key]['fontstyle'] .= 'I'; - } - if ($dom[$key]['value'] == 'u') { - $dom[$key]['fontstyle'] .= 'U'; - } - if (($dom[$key]['value'] == 'del') OR ($dom[$key]['value'] == 's') OR ($dom[$key]['value'] == 'strike')) { - $dom[$key]['fontstyle'] .= 'D'; - } - if (!isset($dom[$key]['style']['text-decoration']) AND ($dom[$key]['value'] == 'a')) { - $dom[$key]['fontstyle'] = $this->htmlLinkFontStyle; - } - if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) { - $dom[$key]['fontname'] = $this->default_monospaced_font; - } - if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1]) > 0) AND (intval($dom[$key]['value'][1]) < 7)) { - // headings h1, h2, h3, h4, h5, h6 - if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) { - $headsize = (4 - intval($dom[$key]['value'][1])) * 2; - $dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize; - } - if (!isset($dom[$key]['style']['font-weight'])) { - $dom[$key]['fontstyle'] .= 'B'; - } - } - if (($dom[$key]['value'] == 'table')) { - $dom[$key]['rows'] = 0; // number of rows - $dom[$key]['trids'] = array(); // IDs of TR elements - $dom[$key]['thead'] = ''; // table header rows - } - if (($dom[$key]['value'] == 'tr')) { - $dom[$key]['cols'] = 0; - if ($thead) { - $dom[$key]['thead'] = true; - // rows on thead block are printed as a separate table - } else { - $dom[$key]['thead'] = false; - $parent = $dom[$key]['parent']; - - if (!isset($dom[$parent]['rows'])) { - $dom[$parent]['rows'] = 0; - } - // store the number of rows on table element - ++$dom[$parent]['rows']; - - if (!isset($dom[$parent]['trids'])) { - $dom[$parent]['trids'] = array(); - } - - // store the TR elements IDs on table element - array_push($dom[$parent]['trids'], $key); - } - } - if (($dom[$key]['value'] == 'th') OR ($dom[$key]['value'] == 'td')) { - if (isset($dom[$key]['attribute']['colspan'])) { - $colspan = intval($dom[$key]['attribute']['colspan']); - } else { - $colspan = 1; - } - $dom[$key]['attribute']['colspan'] = $colspan; - $dom[($dom[$key]['parent'])]['cols'] += $colspan; - } - // text direction - if (isset($dom[$key]['attribute']['dir'])) { - $dom[$key]['dir'] = $dom[$key]['attribute']['dir']; - } - // set foreground color attribute - if (isset($dom[$key]['attribute']['color']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['color']))) { - $dom[$key]['fgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['attribute']['color'], $this->spot_colors); - } elseif (!isset($dom[$key]['style']['color']) AND ($dom[$key]['value'] == 'a')) { - $dom[$key]['fgcolor'] = $this->htmlLinkColorArray; - } - // set background color attribute - if (isset($dom[$key]['attribute']['bgcolor']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['bgcolor']))) { - $dom[$key]['bgcolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['attribute']['bgcolor'], $this->spot_colors); - } - // set stroke color attribute - if (isset($dom[$key]['attribute']['strokecolor']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['strokecolor']))) { - $dom[$key]['strokecolor'] = TCPDF_COLORS::convertHTMLColorToDec($dom[$key]['attribute']['strokecolor'], $this->spot_colors); - } - // check for width attribute - if (isset($dom[$key]['attribute']['width'])) { - $dom[$key]['width'] = $dom[$key]['attribute']['width']; - } - // check for height attribute - if (isset($dom[$key]['attribute']['height'])) { - $dom[$key]['height'] = $dom[$key]['attribute']['height']; - } - // check for text alignment - if (isset($dom[$key]['attribute']['align']) AND (!TCPDF_STATIC::empty_string($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) { - $dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align'][0]); - } - // check for text rendering mode (the following attributes do not exist in HTML) - if (isset($dom[$key]['attribute']['stroke'])) { - // font stroke width - $dom[$key]['stroke'] = $this->getHTMLUnitToUnits($dom[$key]['attribute']['stroke'], $dom[$key]['fontsize'], 'pt', true); - } - if (isset($dom[$key]['attribute']['fill'])) { - // font fill - if ($dom[$key]['attribute']['fill'] == 'true') { - $dom[$key]['fill'] = true; - } else { - $dom[$key]['fill'] = false; - } - } - if (isset($dom[$key]['attribute']['clip'])) { - // clipping mode - if ($dom[$key]['attribute']['clip'] == 'true') { - $dom[$key]['clip'] = true; - } else { - $dom[$key]['clip'] = false; - } - } - } // end opening tag - } else { - // text - $dom[$key]['tag'] = false; - $dom[$key]['block'] = false; - $dom[$key]['parent'] = end($level); - $dom[$key]['dir'] = $dom[$dom[$key]['parent']]['dir']; - if (!empty($dom[$dom[$key]['parent']]['text-transform'])) { - // text-transform for unicode requires mb_convert_case (Multibyte String Functions) - if (function_exists('mb_convert_case')) { - $ttm = array('capitalize' => MB_CASE_TITLE, 'uppercase' => MB_CASE_UPPER, 'lowercase' => MB_CASE_LOWER); - if (isset($ttm[$dom[$dom[$key]['parent']]['text-transform']])) { - $element = mb_convert_case($element, $ttm[$dom[$dom[$key]['parent']]['text-transform']], $this->encoding); - } - } elseif (!$this->isunicode) { - switch ($dom[$dom[$key]['parent']]['text-transform']) { - case 'capitalize': { - $element = ucwords(strtolower($element)); - break; - } - case 'uppercase': { - $element = strtoupper($element); - break; - } - case 'lowercase': { - $element = strtolower($element); - break; - } - } - } - $element = preg_replace("/&NBSP;/i", " ", $element); - } - $dom[$key]['value'] = stripslashes($this->unhtmlentities($element)); - } - ++$elkey; - ++$key; - } - return $dom; - } - - /** - * Returns the string used to find spaces - * @return string - * @protected - * @author Nicola Asuni - * @since 4.8.024 (2010-01-15) - */ - protected function getSpaceString() { - $spacestr = chr(32); - if ($this->isUnicodeFont()) { - $spacestr = chr(0).chr(32); - } - return $spacestr; - } - - /** - * Return an hash code used to ensure that the serialized data has been generated by this TCPDF instance. - * @param string $data serialized data - * @return string - * @public static - */ - protected function getHashForTCPDFtagParams($data) { - return md5(strlen($data).$this->file_id.$data); - } - - /** - * Serialize an array of parameters to be used with TCPDF tag in HTML code. - * @param array $data parameters array - * @return string containing serialized data - * @public static - */ - public function serializeTCPDFtagParameters($data) { - $encoded = urlencode(json_encode($data)); - return $this->getHashForTCPDFtagParams($encoded).$encoded; - } - - /** - * Unserialize parameters to be used with TCPDF tag in HTML code. - * @param string $data serialized data - * @return array containing unserialized data - * @protected static - */ - protected function unserializeTCPDFtagParameters($data) { - $hash = substr($data, 0, 32); - $encoded = substr($data, 32); - if ($hash != $this->getHashForTCPDFtagParams($encoded)) { - $this->Error('Invalid parameters'); - } - return json_decode(urldecode($encoded), true); - } - - /** - * Prints a cell (rectangular area) with optional borders, background color and html text string. - * The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.
    - * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. - * IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting. - * Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul - * NOTE: all the HTML attributes must be enclosed in double-quote. - * @param float $w Cell width. If 0, the cell extends up to the right margin. - * @param float $h Cell minimum height. The cell extends automatically if needed. - * @param float|null $x upper-left corner X coordinate - * @param float|null $y upper-left corner Y coordinate - * @param string $html html text to print. Default value: empty string. - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param int $ln Indicates where the current position should go after the call. Possible values are:
    • 0: to the right (or left for RTL language)
    • 1: to the beginning of the next line
    • 2: below
    -Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. - * @param boolean $fill Indicates if the cell background must be painted (true) or transparent (false). - * @param boolean $reseth if true reset the last cell height (default true). - * @param string $align Allows to center or align the text. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    - * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width. - * @see Multicell(), writeHTML() - * @public - */ - public function writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true) { - return $this->MultiCell($w, $h, $html, $border, $align, $fill, $ln, $x, $y, $reseth, 0, true, $autopadding, 0, 'T', false); - } - - /** - * Allows to preserve some HTML formatting (limited support).
    - * IMPORTANT: The HTML must be well formatted - try to clean-up it using an application like HTML-Tidy before submitting. - * Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul - * NOTE: all the HTML attributes must be enclosed in double-quote. - * @param string $html text to display - * @param boolean $ln if true add a new line after text (default = true) - * @param boolean $fill Indicates if the background must be painted (true) or transparent (false). - * @param boolean $reseth if true reset the last cell height (default false). - * @param boolean $cell if true add the current left (or right for RTL) padding to each Write (default false). - * @param string $align Allows to center or align the text. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    - * @public - */ - public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='') { - $gvars = $this->getGraphicVars(); - // store current values - $prev_cell_margin = $this->cell_margin; - $prev_cell_padding = $this->cell_padding; - $prevPage = $this->page; - $prevlMargin = $this->lMargin; - $prevrMargin = $this->rMargin; - $curfontname = $this->FontFamily; - $curfontstyle = $this->FontStyle; - $curfontsize = $this->FontSizePt; - $curfontascent = $this->getFontAscent($curfontname, $curfontstyle, $curfontsize); - $curfontdescent = $this->getFontDescent($curfontname, $curfontstyle, $curfontsize); - $curfontstretcing = $this->font_stretching; - $curfonttracking = $this->font_spacing; - $this->newline = true; - $newline = true; - $startlinepage = $this->page; - $minstartliney = $this->y; - $maxbottomliney = 0; - $startlinex = $this->x; - $startliney = $this->y; - $yshift = 0; - $loop = 0; - $curpos = 0; - $this_method_vars = array(); - $undo = false; - $fontaligned = false; - $reverse_dir = false; // true when the text direction is reversed - $this->premode = false; - if ($this->inxobj) { - // we are inside an XObject template - $pask = count($this->xobjects[$this->xobjid]['annotations']); - } elseif (isset($this->PageAnnots[$this->page])) { - $pask = count($this->PageAnnots[$this->page]); - } else { - $pask = 0; - } - if ($this->inxobj) { - // we are inside an XObject template - $startlinepos = strlen($this->xobjects[$this->xobjid]['outdata']); - } elseif (!$this->InFooter) { - if (isset($this->footerlen[$this->page])) { - $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; - } else { - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - } - $startlinepos = $this->footerpos[$this->page]; - } else { - // we are inside the footer - $startlinepos = $this->pagelen[$this->page]; - } - $lalign = $align; - $plalign = $align; - if ($this->rtl) { - $w = $this->x - $this->lMargin; - } else { - $w = $this->w - $this->rMargin - $this->x; - } - $w -= ($this->cell_padding['L'] + $this->cell_padding['R']); - if ($cell) { - if ($this->rtl) { - $this->x -= $this->cell_padding['R']; - $this->lMargin += $this->cell_padding['L']; - } else { - $this->x += $this->cell_padding['L']; - $this->rMargin += $this->cell_padding['R']; - } - } - if ($this->customlistindent >= 0) { - $this->listindent = $this->customlistindent; - } else { - $this->listindent = $this->GetStringWidth('000000'); - } - $this->listindentlevel = 0; - // save previous states - $prev_cell_height_ratio = $this->cell_height_ratio; - $prev_listnum = $this->listnum; - $prev_listordered = $this->listordered; - $prev_listcount = $this->listcount; - $prev_lispacer = $this->lispacer; - $this->listnum = 0; - $this->listordered = array(); - $this->listcount = array(); - $this->lispacer = ''; - if ((TCPDF_STATIC::empty_string($this->lasth)) OR ($reseth)) { - // reset row height - $this->resetLastH(); - } - $dom = $this->getHtmlDomArray($html); - $maxel = count($dom); - $key = 0; - while ($key < $maxel) { - if ($dom[$key]['tag'] AND $dom[$key]['opening'] AND $dom[$key]['hide']) { - // store the node key - $hidden_node_key = $key; - if ($dom[$key]['self']) { - // skip just this self-closing tag - ++$key; - } else { - // skip this and all children tags - while (($key < $maxel) AND (!$dom[$key]['tag'] OR $dom[$key]['opening'] OR ($dom[$key]['parent'] != $hidden_node_key))) { - // skip hidden objects - ++$key; - } - ++$key; - } - } - if ($dom[$key]['tag'] AND isset($dom[$key]['attribute']['pagebreak'])) { - // check for pagebreak - if (($dom[$key]['attribute']['pagebreak'] == 'true') OR ($dom[$key]['attribute']['pagebreak'] == 'left') OR ($dom[$key]['attribute']['pagebreak'] == 'right')) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - $this->htmlvspace = ($this->PageBreakTrigger + 1); - } - if ((($dom[$key]['attribute']['pagebreak'] == 'left') AND (((!$this->rtl) AND (($this->page % 2) == 0)) OR (($this->rtl) AND (($this->page % 2) != 0)))) - OR (($dom[$key]['attribute']['pagebreak'] == 'right') AND (((!$this->rtl) AND (($this->page % 2) != 0)) OR (($this->rtl) AND (($this->page % 2) == 0))))) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - $this->htmlvspace = ($this->PageBreakTrigger + 1); - } - } - if ($dom[$key]['tag'] AND $dom[$key]['opening'] AND isset($dom[$key]['attribute']['nobr']) AND ($dom[$key]['attribute']['nobr'] == 'true')) { - if (isset($dom[($dom[$key]['parent'])]['attribute']['nobr']) AND ($dom[($dom[$key]['parent'])]['attribute']['nobr'] == 'true')) { - $dom[$key]['attribute']['nobr'] = false; - } else { - // store current object - $this->startTransaction(); - // save this method vars - $this_method_vars['html'] = $html; - $this_method_vars['ln'] = $ln; - $this_method_vars['fill'] = $fill; - $this_method_vars['reseth'] = $reseth; - $this_method_vars['cell'] = $cell; - $this_method_vars['align'] = $align; - $this_method_vars['gvars'] = $gvars; - $this_method_vars['prevPage'] = $prevPage; - $this_method_vars['prev_cell_margin'] = $prev_cell_margin; - $this_method_vars['prev_cell_padding'] = $prev_cell_padding; - $this_method_vars['prevlMargin'] = $prevlMargin; - $this_method_vars['prevrMargin'] = $prevrMargin; - $this_method_vars['curfontname'] = $curfontname; - $this_method_vars['curfontstyle'] = $curfontstyle; - $this_method_vars['curfontsize'] = $curfontsize; - $this_method_vars['curfontascent'] = $curfontascent; - $this_method_vars['curfontdescent'] = $curfontdescent; - $this_method_vars['curfontstretcing'] = $curfontstretcing; - $this_method_vars['curfonttracking'] = $curfonttracking; - $this_method_vars['minstartliney'] = $minstartliney; - $this_method_vars['maxbottomliney'] = $maxbottomliney; - $this_method_vars['yshift'] = $yshift; - $this_method_vars['startlinepage'] = $startlinepage; - $this_method_vars['startlinepos'] = $startlinepos; - $this_method_vars['startlinex'] = $startlinex; - $this_method_vars['startliney'] = $startliney; - $this_method_vars['newline'] = $newline; - $this_method_vars['loop'] = $loop; - $this_method_vars['curpos'] = $curpos; - $this_method_vars['pask'] = $pask; - $this_method_vars['lalign'] = $lalign; - $this_method_vars['plalign'] = $plalign; - $this_method_vars['w'] = $w; - $this_method_vars['prev_cell_height_ratio'] = $prev_cell_height_ratio; - $this_method_vars['prev_listnum'] = $prev_listnum; - $this_method_vars['prev_listordered'] = $prev_listordered; - $this_method_vars['prev_listcount'] = $prev_listcount; - $this_method_vars['prev_lispacer'] = $prev_lispacer; - $this_method_vars['fontaligned'] = $fontaligned; - $this_method_vars['key'] = $key; - $this_method_vars['dom'] = $dom; - } - } - // print THEAD block - if (($dom[$key]['value'] == 'tr') AND isset($dom[$key]['thead']) AND $dom[$key]['thead']) { - if (isset($dom[$key]['parent']) AND isset($dom[$dom[$key]['parent']]['thead']) AND !TCPDF_STATIC::empty_string($dom[$dom[$key]['parent']]['thead'])) { - $this->inthead = true; - // print table header (thead) - $this->writeHTML($this->thead, false, false, false, false, ''); - // check if we are on a new page or on a new column - if (($this->y < $this->start_transaction_y) OR ($this->checkPageBreak($this->lasth, '', false))) { - // we are on a new page or on a new column and the total object height is less than the available vertical space. - // restore previous object - $this->rollbackTransaction(true); - // restore previous values - foreach ($this_method_vars as $vkey => $vval) { - $$vkey = $vval; - } - // disable table header - $tmp_thead = $this->thead; - $this->thead = ''; - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $pre_y = $this->y; - if ((!$this->checkPageBreak($this->PageBreakTrigger + 1)) AND ($this->y < $pre_y)) { - // fix for multicolumn mode - $startliney = $this->y; - } - $this->start_transaction_page = $this->page; - $this->start_transaction_y = $this->y; - // restore table header - $this->thead = $tmp_thead; - // fix table border properties - if (isset($dom[$dom[$key]['parent']]['attribute']['cellspacing'])) { - $tmp_cellspacing = $this->getHTMLUnitToUnits($dom[$dom[$key]['parent']]['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($dom[$dom[$key]['parent']]['border-spacing'])) { - $tmp_cellspacing = $dom[$dom[$key]['parent']]['border-spacing']['V']; - } else { - $tmp_cellspacing = 0; - } - $dom[$dom[$key]['parent']]['borderposition']['page'] = $this->page; - $dom[$dom[$key]['parent']]['borderposition']['column'] = $this->current_column; - $dom[$dom[$key]['parent']]['borderposition']['y'] = $this->y + $tmp_cellspacing; - $xoffset = ($this->x - $dom[$dom[$key]['parent']]['borderposition']['x']); - $dom[$dom[$key]['parent']]['borderposition']['x'] += $xoffset; - $dom[$dom[$key]['parent']]['borderposition']['xmax'] += $xoffset; - // print table header (thead) - $this->writeHTML($this->thead, false, false, false, false, ''); - } - } - // move $key index forward to skip THEAD block - while ( ($key < $maxel) AND (!( - ($dom[$key]['tag'] AND $dom[$key]['opening'] AND ($dom[$key]['value'] == 'tr') AND (!isset($dom[$key]['thead']) OR !$dom[$key]['thead'])) - OR ($dom[$key]['tag'] AND (!$dom[$key]['opening']) AND ($dom[$key]['value'] == 'table'))) )) { - ++$key; - } - } - if ($dom[$key]['tag'] OR ($key == 0)) { - if ((($dom[$key]['value'] == 'table') OR ($dom[$key]['value'] == 'tr')) AND (isset($dom[$key]['align']))) { - $dom[$key]['align'] = ($this->rtl) ? 'R' : 'L'; - } - // vertically align image in line - if ((!$this->newline) AND ($dom[$key]['value'] == 'img') AND (isset($dom[$key]['height'])) AND ($dom[$key]['height'] > 0)) { - // get image height - $imgh = $this->getHTMLUnitToUnits($dom[$key]['height'], ($dom[$key]['fontsize'] / $this->k), 'px'); - $autolinebreak = false; - if (!empty($dom[$key]['width'])) { - $imgw = $this->getHTMLUnitToUnits($dom[$key]['width'], ($dom[$key]['fontsize'] / $this->k), 'px', false); - if (($imgw <= ($this->w - $this->lMargin - $this->rMargin - $this->cell_padding['L'] - $this->cell_padding['R'])) - AND ((($this->rtl) AND (($this->x - $imgw) < ($this->lMargin + $this->cell_padding['L']))) - OR ((!$this->rtl) AND (($this->x + $imgw) > ($this->w - $this->rMargin - $this->cell_padding['R']))))) { - // add automatic line break - $autolinebreak = true; - $this->Ln('', $cell); - if ((!$dom[($key-1)]['tag']) AND ($dom[($key-1)]['value'] == ' ')) { - // go back to evaluate this line break - --$key; - } - } - } - if (!$autolinebreak) { - if ($this->inPageBody()) { - $pre_y = $this->y; - // check for page break - if ((!$this->checkPageBreak($imgh)) AND ($this->y < $pre_y)) { - // fix for multicolumn mode - $startliney = $this->y; - } - } - if ($this->page > $startlinepage) { - // fix line splitted over two pages - if (isset($this->footerlen[$startlinepage])) { - $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - } - // line to be moved one page forward - $pagebuff = $this->getPageBuffer($startlinepage); - $linebeg = substr($pagebuff, $startlinepos, ($curpos - $startlinepos)); - $tstart = substr($pagebuff, 0, $startlinepos); - $tend = substr($this->getPageBuffer($startlinepage), $curpos); - // remove line from previous page - $this->setPageBuffer($startlinepage, $tstart.''.$tend); - $pagebuff = $this->getPageBuffer($this->page); - $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]); - $tend = substr($pagebuff, $this->cntmrk[$this->page]); - // add line start to current page - $yshift = ($minstartliney - $this->y); - if ($fontaligned) { - $yshift += ($curfontsize / $this->k); - } - $try = sprintf('1 0 0 1 0 %F cm', ($yshift * $this->k)); - $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - $next_pask = count($this->PageAnnots[$this->page]); - } else { - $next_pask = 0; - } - if (isset($this->PageAnnots[$startlinepage])) { - foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][] = $pac; - unset($this->PageAnnots[$startlinepage][$pak]); - $npak = count($this->PageAnnots[$this->page]) - 1; - $this->PageAnnots[$this->page][$npak]['y'] -= $yshift; - } - } - } - $pask = $next_pask; - $startlinepos = $this->cntmrk[$this->page]; - $startlinepage = $this->page; - $startliney = $this->y; - $this->newline = false; - } - $this->y += ($this->getCellHeight($curfontsize / $this->k) - ($curfontdescent * $this->cell_height_ratio) - $imgh); - $minstartliney = min($this->y, $minstartliney); - $maxbottomliney = ($startliney + $this->getCellHeight($curfontsize / $this->k)); - } - } elseif (isset($dom[$key]['fontname']) OR isset($dom[$key]['fontstyle']) OR isset($dom[$key]['fontsize']) OR isset($dom[$key]['line-height'])) { - // account for different font size - $pfontname = $curfontname; - $pfontstyle = $curfontstyle; - $pfontsize = $curfontsize; - $fontname = (isset($dom[$key]['fontname']) ? $dom[$key]['fontname'] : $curfontname); - $fontstyle = (isset($dom[$key]['fontstyle']) ? $dom[$key]['fontstyle'] : $curfontstyle); - $fontsize = (isset($dom[$key]['fontsize']) ? $dom[$key]['fontsize'] : $curfontsize); - $fontascent = $this->getFontAscent($fontname, $fontstyle, $fontsize); - $fontdescent = $this->getFontDescent($fontname, $fontstyle, $fontsize); - if (($fontname != $curfontname) OR ($fontstyle != $curfontstyle) OR ($fontsize != $curfontsize) - OR ($this->cell_height_ratio != $dom[$key]['line-height']) - OR ($dom[$key]['tag'] AND $dom[$key]['opening'] AND ($dom[$key]['value'] == 'li')) ) { - if (($key < ($maxel - 1)) AND ( - ($dom[$key]['tag'] AND $dom[$key]['opening'] AND ($dom[$key]['value'] == 'li')) - OR ($this->cell_height_ratio != $dom[$key]['line-height']) - OR (!$this->newline AND is_numeric($fontsize) AND is_numeric($curfontsize) - AND ($fontsize >= 0) AND ($curfontsize >= 0) - AND (($fontsize != $curfontsize) OR ($fontstyle != $curfontstyle) OR ($fontname != $curfontname))) - )) { - if ($this->page > $startlinepage) { - // fix lines splitted over two pages - if (isset($this->footerlen[$startlinepage])) { - $curpos = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - } - // line to be moved one page forward - $pagebuff = $this->getPageBuffer($startlinepage); - $linebeg = substr($pagebuff, $startlinepos, ($curpos - $startlinepos)); - $tstart = substr($pagebuff, 0, $startlinepos); - $tend = substr($this->getPageBuffer($startlinepage), $curpos); - // remove line start from previous page - $this->setPageBuffer($startlinepage, $tstart.''.$tend); - $pagebuff = $this->getPageBuffer($this->page); - $tstart = substr($pagebuff, 0, $this->cntmrk[$this->page]); - $tend = substr($pagebuff, $this->cntmrk[$this->page]); - // add line start to current page - $yshift = ($minstartliney - $this->y); - $try = sprintf('1 0 0 1 0 %F cm', ($yshift * $this->k)); - $this->setPageBuffer($this->page, $tstart."\nq\n".$try."\n".$linebeg."\nQ\n".$tend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - $next_pask = count($this->PageAnnots[$this->page]); - } else { - $next_pask = 0; - } - if (isset($this->PageAnnots[$startlinepage])) { - foreach ($this->PageAnnots[$startlinepage] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][] = $pac; - unset($this->PageAnnots[$startlinepage][$pak]); - $npak = count($this->PageAnnots[$this->page]) - 1; - $this->PageAnnots[$this->page][$npak]['y'] -= $yshift; - } - } - } - $pask = $next_pask; - $startlinepos = $this->cntmrk[$this->page]; - $startlinepage = $this->page; - $startliney = $this->y; - } - if (!isset($dom[$key]['line-height'])) { - $dom[$key]['line-height'] = $this->cell_height_ratio; - } - if (!$dom[$key]['block']) { - if (!(isset($dom[($key + 1)]) AND $dom[($key + 1)]['tag'] AND (!$dom[($key + 1)]['opening']) AND ($dom[($key + 1)]['value'] != 'li') AND $dom[$key]['tag'] AND (!$dom[$key]['opening']))) { - $this->y += (((($curfontsize * $this->cell_height_ratio) - ($fontsize * $dom[$key]['line-height'])) / $this->k) + $curfontascent - $fontascent - $curfontdescent + $fontdescent) / 2; - } - if (($dom[$key]['value'] != 'sup') AND ($dom[$key]['value'] != 'sub')) { - $current_line_align_data = array($key, $minstartliney, $maxbottomliney); - if (isset($line_align_data) AND (($line_align_data[0] == ($key - 1)) OR (($line_align_data[0] == ($key - 2)) AND (isset($dom[($key - 1)])) AND (preg_match('/^([\s]+)$/', $dom[($key - 1)]['value']) > 0)))) { - $minstartliney = min($this->y, $line_align_data[1]); - $maxbottomliney = max(($this->y + $this->getCellHeight($fontsize / $this->k)), $line_align_data[2]); - } else { - $minstartliney = min($this->y, $minstartliney); - $maxbottomliney = max(($this->y + $this->getCellHeight($fontsize / $this->k)), $maxbottomliney); - } - $line_align_data = $current_line_align_data; - } - } - $this->cell_height_ratio = $dom[$key]['line-height']; - $fontaligned = true; - } - $this->setFont($fontname, $fontstyle, $fontsize); - // reset row height - $this->resetLastH(); - $curfontname = $fontname; - $curfontstyle = $fontstyle; - $curfontsize = $fontsize; - $curfontascent = $fontascent; - $curfontdescent = $fontdescent; - } - } - // set text rendering mode - $textstroke = isset($dom[$key]['stroke']) ? $dom[$key]['stroke'] : $this->textstrokewidth; - $textfill = isset($dom[$key]['fill']) ? $dom[$key]['fill'] : (($this->textrendermode % 2) == 0); - $textclip = isset($dom[$key]['clip']) ? $dom[$key]['clip'] : ($this->textrendermode > 3); - $this->setTextRenderingMode($textstroke, $textfill, $textclip); - if (isset($dom[$key]['font-stretch']) AND ($dom[$key]['font-stretch'] !== false)) { - $this->setFontStretching($dom[$key]['font-stretch']); - } - if (isset($dom[$key]['letter-spacing']) AND ($dom[$key]['letter-spacing'] !== false)) { - $this->setFontSpacing($dom[$key]['letter-spacing']); - } - if (($plalign == 'J') AND $dom[$key]['block']) { - $plalign = ''; - } - // get current position on page buffer - $curpos = $this->pagelen[$startlinepage]; - if (isset($dom[$key]['bgcolor']) AND ($dom[$key]['bgcolor'] !== false)) { - $this->setFillColorArray($dom[$key]['bgcolor']); - $wfill = true; - } else { - $wfill = $fill | false; - } - if (isset($dom[$key]['fgcolor']) AND ($dom[$key]['fgcolor'] !== false)) { - $this->setTextColorArray($dom[$key]['fgcolor']); - } - if (isset($dom[$key]['strokecolor']) AND ($dom[$key]['strokecolor'] !== false)) { - $this->setDrawColorArray($dom[$key]['strokecolor']); - } - if (isset($dom[$key]['align'])) { - $lalign = $dom[$key]['align']; - } - if (TCPDF_STATIC::empty_string($lalign)) { - $lalign = $align; - } - } - // align lines - if ($this->newline AND (strlen($dom[$key]['value']) > 0) AND ($dom[$key]['value'] != 'td') AND ($dom[$key]['value'] != 'th')) { - $newline = true; - $fontaligned = false; - // we are at the beginning of a new line - if (isset($startlinex)) { - $yshift = ($minstartliney - $startliney); - if (($yshift > 0) OR ($this->page > $startlinepage)) { - $yshift = 0; - } - $t_x = 0; - // the last line must be shifted to be aligned as requested - $linew = abs($this->endlinex - $startlinex); - if ($this->inxobj) { - // we are inside an XObject template - $pstart = substr($this->xobjects[$this->xobjid]['outdata'], 0, $startlinepos); - if (isset($opentagpos)) { - $midpos = $opentagpos; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->xobjects[$this->xobjid]['outdata'], $midpos); - } else { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos); - $pend = ''; - } - } else { - $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); - if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = min($opentagpos, $this->footerpos[$startlinepage]); - } elseif (isset($opentagpos)) { - $midpos = $opentagpos; - } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = $this->footerpos[$startlinepage]; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->getPageBuffer($startlinepage), $midpos); - } else { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); - $pend = ''; - } - } - if ((isset($plalign) AND ((($plalign == 'C') OR ($plalign == 'J') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl)))))) { - // calculate shifting amount - $tw = $w; - if (($plalign == 'J') AND $this->isRTLTextDir() AND ($this->num_columns > 1)) { - $tw += $this->cell_padding['R']; - } - if ($this->lMargin != $prevlMargin) { - $tw += ($prevlMargin - $this->lMargin); - } - if ($this->rMargin != $prevrMargin) { - $tw += ($prevrMargin - $this->rMargin); - } - $one_space_width = $this->GetStringWidth(chr(32)); - $no = 0; // number of spaces on a line contained on a single block - if ($this->isRTLTextDir()) { // RTL - // remove left space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, '[('); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(0).chr(32))); - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(32))); - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 + 2)).substr($pmid, ($pos1 + 2 + $spacelen)); - if (substr($pmid, $pos1, 4) == '[()]') { - $linew -= $one_space_width; - } elseif ($pos1 == strpos($pmid, '[(')) { - $no = 1; - } - } - } - } else { // LTR - // remove right space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, ')]'); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(0).chr(32).')]')) + 2; - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(32).')]')) + 1; - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 - $spacelen)).substr($pmid, $pos1); - $linew -= $one_space_width; - } - } - } - $mdiff = ($tw - $linew); - if ($plalign == 'C') { - if ($this->rtl) { - $t_x = -($mdiff / 2); - } else { - $t_x = ($mdiff / 2); - } - } elseif ($plalign == 'R') { - // right alignment on LTR document - $t_x = $mdiff; - } elseif ($plalign == 'L') { - // left alignment on RTL document - $t_x = -$mdiff; - } elseif (($plalign == 'J') AND ($plalign == $lalign)) { - // Justification - if ($this->isRTLTextDir()) { - // align text on the left - $t_x = -$mdiff; - } - $ns = 0; // number of spaces - $pmidtemp = $pmid; - // escape special characters - $pmidtemp = preg_replace('/[\\\][\(]/x', '\\#!#OP#!#', $pmidtemp); - $pmidtemp = preg_replace('/[\\\][\)]/x', '\\#!#CP#!#', $pmidtemp); - // search spaces - if (preg_match_all('/\[\(([^\)]*)\)\]/x', $pmidtemp, $lnstring, PREG_PATTERN_ORDER)) { - $spacestr = $this->getSpaceString(); - $maxkk = count($lnstring[1]) - 1; - for ($kk=0; $kk <= $maxkk; ++$kk) { - // restore special characters - $lnstring[1][$kk] = str_replace('#!#OP#!#', '(', $lnstring[1][$kk]); - $lnstring[1][$kk] = str_replace('#!#CP#!#', ')', $lnstring[1][$kk]); - // store number of spaces on the strings - $lnstring[2][$kk] = substr_count($lnstring[1][$kk], $spacestr); - // count total spaces on line - $ns += $lnstring[2][$kk]; - $lnstring[3][$kk] = $ns; - } - if ($ns == 0) { - $ns = 1; - } - // calculate additional space to add to each existing space - $spacewidth = ($mdiff / ($ns - $no)) * $this->k; - if ($this->FontSize <= 0) { - $this->FontSize = 1; - } - $spacewidthu = -1000 * ($mdiff + (($ns + $no) * $one_space_width)) / $ns / $this->FontSize; - if ($this->font_spacing != 0) { - // fixed spacing mode - $osw = -1000 * $this->font_spacing / $this->FontSize; - $spacewidthu += $osw; - } - $nsmax = $ns; - $ns = 0; - reset($lnstring); - $offset = 0; - $strcount = 0; - $prev_epsposbeg = 0; - $textpos = 0; - if ($this->isRTLTextDir()) { - $textpos = $this->wPt; - } - while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) { - // check if we are inside a string section '[( ... )]' - $stroffset = strpos($pmid, '[(', $offset); - if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) { - // set offset to the end of string section - $offset = strpos($pmid, ')]', $stroffset); - while (($offset !== false) AND ($pmid[($offset - 1)] == '\\')) { - $offset = strpos($pmid, ')]', ($offset + 1)); - } - if ($offset === false) { - $this->Error('HTML Justification: malformed PDF code.'); - } - continue; - } - if ($this->isRTLTextDir()) { - $spacew = ($spacewidth * ($nsmax - $ns)); - } else { - $spacew = ($spacewidth * $ns); - } - $offset = $strpiece[2][1] + strlen($strpiece[2][0]); - $epsposend = strpos($pmid, $this->epsmarker.'Q', $offset); - if ($epsposend !== null) { - $epsposend += strlen($this->epsmarker.'Q'); - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, $offset); - if ($epsposbeg === null) { - $epsposbeg = strpos($pmid, 'q'.$this->epsmarker, ($prev_epsposbeg - 6)); - $prev_epsposbeg = $epsposbeg; - } - if (($epsposbeg > 0) AND ($epsposend > 0) AND ($offset > $epsposbeg) AND ($offset < $epsposend)) { - // shift EPS images - $trx = sprintf('1 0 0 1 %F 0 cm', $spacew); - $pmid_b = substr($pmid, 0, $epsposbeg); - $pmid_m = substr($pmid, $epsposbeg, ($epsposend - $epsposbeg)); - $pmid_e = substr($pmid, $epsposend); - $pmid = $pmid_b."\nq\n".$trx."\n".$pmid_m."\nQ\n".$pmid_e; - $offset = $epsposend; - continue; - } - } - $currentxpos = 0; - // shift blocks of code - switch ($strpiece[2][0]) { - case 'Td': - case 'cm': - case 'm': - case 'l': { - // get current X position - preg_match('/([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s]('.$strpiece[2][0].')([\s]*)/x', $pmid, $xmatches); - if (!isset($xmatches[1])) { - break; - } - $currentxpos = $xmatches[1]; - $textpos = $currentxpos; - if (($strcount <= $maxkk) AND ($strpiece[2][0] == 'Td')) { - $ns = $lnstring[3][$strcount]; - if ($this->isRTLTextDir()) { - $spacew = ($spacewidth * ($nsmax - $ns)); - } - ++$strcount; - } - // justify block - if (preg_match('/([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s]('.$strpiece[2][0].')([\s]*)/x', $pmid, $pmatch) == 1) { - $newpmid = sprintf('%F',(floatval($pmatch[1]) + $spacew)).' '.$pmatch[2].' x*#!#*x'.$pmatch[3].$pmatch[4]; - $pmid = str_replace($pmatch[0], $newpmid, $pmid); - unset($pmatch, $newpmid); - } - break; - } - case 're': { - // justify block - if (!TCPDF_STATIC::empty_string($this->lispacer)) { - $this->lispacer = ''; - break; - } - preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches); - if (!isset($xmatches[1])) { - break; - } - $currentxpos = $xmatches[1]; - $x_diff = 0; - $w_diff = 0; - if ($this->isRTLTextDir()) { // RTL - if ($currentxpos < $textpos) { - $x_diff = ($spacewidth * ($nsmax - $lnstring[3][$strcount])); - $w_diff = ($spacewidth * $lnstring[2][$strcount]); - } else { - if ($strcount > 0) { - $x_diff = ($spacewidth * ($nsmax - $lnstring[3][($strcount - 1)])); - $w_diff = ($spacewidth * $lnstring[2][($strcount - 1)]); - } - } - } else { // LTR - if ($currentxpos > $textpos) { - if ($strcount > 0) { - $x_diff = ($spacewidth * $lnstring[3][($strcount - 1)]); - } - $w_diff = ($spacewidth * $lnstring[2][$strcount]); - } else { - if ($strcount > 1) { - $x_diff = ($spacewidth * $lnstring[3][($strcount - 2)]); - } - if ($strcount > 0) { - $w_diff = ($spacewidth * $lnstring[2][($strcount - 1)]); - } - } - } - if (preg_match('/('.$xmatches[1].')[\s]('.$xmatches[2].')[\s]('.$xmatches[3].')[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $pmatch) == 1) { - $newx = sprintf('%F',(floatval($pmatch[1]) + $x_diff)); - $neww = sprintf('%F',(floatval($pmatch[3]) + $w_diff)); - $newpmid = $newx.' '.$pmatch[2].' '.$neww.' '.$pmatch[4].' x*#!#*x'.$pmatch[5].$pmatch[6]; - $pmid = str_replace($pmatch[0], $newpmid, $pmid); - unset($pmatch, $newpmid, $newx, $neww); - } - break; - } - case 'c': { - // get current X position - preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](c)([\s]*)/x', $pmid, $xmatches); - if (!isset($xmatches[1])) { - break; - } - $currentxpos = $xmatches[1]; - // justify block - if (preg_match('/('.$xmatches[1].')[\s]('.$xmatches[2].')[\s]('.$xmatches[3].')[\s]('.$xmatches[4].')[\s]('.$xmatches[5].')[\s]('.$strpiece[1][0].')[\s](c)([\s]*)/x', $pmid, $pmatch) == 1) { - $newx1 = sprintf('%F',(floatval($pmatch[1]) + $spacew)); - $newx2 = sprintf('%F',(floatval($pmatch[3]) + $spacew)); - $newx3 = sprintf('%F',(floatval($pmatch[5]) + $spacew)); - $newpmid = $newx1.' '.$pmatch[2].' '.$newx2.' '.$pmatch[4].' '.$newx3.' '.$pmatch[6].' x*#!#*x'.$pmatch[7].$pmatch[8]; - $pmid = str_replace($pmatch[0], $newpmid, $pmid); - unset($pmatch, $newpmid, $newx1, $newx2, $newx3); - } - break; - } - } - // shift the annotations and links - $cxpos = ($currentxpos / $this->k); - $lmpos = ($this->lMargin + $this->cell_padding['L'] + $this->feps); - if ($this->inxobj) { - // we are inside an XObject template - foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { - if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) { - if ($cxpos > $lmpos) { - $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += ($spacew / $this->k); - $this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } else { - $this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } - break; - } - } - } elseif (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { - if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) { - if ($cxpos > $lmpos) { - $this->PageAnnots[$this->page][$pak]['x'] += ($spacew / $this->k); - $this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } else { - $this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k); - } - break; - } - } - } - } // end of while - // remove markers - $pmid = str_replace('x*#!#*x', '', $pmid); - if ($this->isUnicodeFont()) { - // multibyte characters - $spacew = $spacewidthu; - if ($this->font_stretching != 100) { - // word spacing is affected by stretching - $spacew /= ($this->font_stretching / 100); - } - // escape special characters - $pos = 0; - $pmid = preg_replace('/[\\\][\(]/x', '\\#!#OP#!#', $pmid); - $pmid = preg_replace('/[\\\][\)]/x', '\\#!#CP#!#', $pmid); - if (preg_match_all('/\[\(([^\)]*)\)\]/x', $pmid, $pamatch) > 0) { - foreach($pamatch[0] as $pk => $pmatch) { - $replace = $pamatch[1][$pk]; - $replace = str_replace('#!#OP#!#', '(', $replace); - $replace = str_replace('#!#CP#!#', ')', $replace); - $newpmid = '[('.str_replace(chr(0).chr(32), ') '.sprintf('%F', $spacew).' (', $replace).')]'; - $pos = strpos($pmid, $pmatch, $pos); - if ($pos !== FALSE) { - $pmid = substr_replace($pmid, $newpmid, $pos, strlen($pmatch)); - } - ++$pos; - } - unset($pamatch); - } - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart."\n".$pmid."\n".$pend; - } else { - $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\n".$pend); - } - $endlinepos = strlen($pstart."\n".$pmid."\n"); - } else { - // non-unicode (single-byte characters) - if ($this->font_stretching != 100) { - // word spacing (Tw) is affected by stretching - $spacewidth /= ($this->font_stretching / 100); - } - $rs = sprintf('%F Tw', $spacewidth); - $pmid = preg_replace("/\[\(/x", $rs.' [(', $pmid); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend; - } else { - $this->setPageBuffer($startlinepage, $pstart."\n".$pmid."\nBT 0 Tw ET\n".$pend); - } - $endlinepos = strlen($pstart."\n".$pmid."\nBT 0 Tw ET\n"); - } - } - } // end of J - } // end if $startlinex - if (($t_x != 0) OR ($yshift < 0)) { - // shift the line - $trx = sprintf('1 0 0 1 %F %F cm', ($t_x * $this->k), ($yshift * $this->k)); - $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; - $endlinepos = strlen($pstart); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$pend; - foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { - if ($pak >= $pask) { - $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += $t_x; - $this->xobjects[$this->xobjid]['annotations'][$pak]['y'] -= $yshift; - } - } - } else { - $this->setPageBuffer($startlinepage, $pstart.$pend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][$pak]['x'] += $t_x; - $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; - } - } - } - } - $this->y -= $yshift; - } - } - $pbrk = $this->checkPageBreak($this->lasth); - $this->newline = false; - $startlinex = $this->x; - $startliney = $this->y; - if ($dom[$dom[$key]['parent']]['value'] == 'sup') { - $startliney -= ((0.3 * $this->FontSizePt) / $this->k); - } elseif ($dom[$dom[$key]['parent']]['value'] == 'sub') { - $startliney -= (($this->FontSizePt / 0.7) / $this->k); - } else { - $minstartliney = $startliney; - $maxbottomliney = ($this->y + $this->getCellHeight($fontsize / $this->k)); - } - $startlinepage = $this->page; - if (isset($endlinepos) AND (!$pbrk)) { - $startlinepos = $endlinepos; - } else { - if ($this->inxobj) { - // we are inside an XObject template - $startlinepos = strlen($this->xobjects[$this->xobjid]['outdata']); - } elseif (!$this->InFooter) { - if (isset($this->footerlen[$this->page])) { - $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; - } else { - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - } - $startlinepos = $this->footerpos[$this->page]; - } else { - $startlinepos = $this->pagelen[$this->page]; - } - } - unset($endlinepos); - $plalign = $lalign; - if (isset($this->PageAnnots[$this->page])) { - $pask = count($this->PageAnnots[$this->page]); - } else { - $pask = 0; - } - if (!($dom[$key]['tag'] AND !$dom[$key]['opening'] AND ($dom[$key]['value'] == 'table') - AND (isset($this->emptypagemrk[$this->page])) - AND ($this->emptypagemrk[$this->page] == $this->pagelen[$this->page]))) { - $this->setFont($fontname, $fontstyle, $fontsize); - if ($wfill) { - $this->setFillColorArray($this->bgcolor); - } - } - } // end newline - if (isset($opentagpos)) { - unset($opentagpos); - } - if ($dom[$key]['tag']) { - if ($dom[$key]['opening']) { - // get text indentation (if any) - if (isset($dom[$key]['text-indent']) AND $dom[$key]['block']) { - $this->textindent = $dom[$key]['text-indent']; - $this->newline = true; - } - // table - if (($dom[$key]['value'] == 'table') AND isset($dom[$key]['cols']) AND ($dom[$key]['cols'] > 0)) { - // available page width - if ($this->rtl) { - $wtmp = $this->x - $this->lMargin; - } else { - $wtmp = $this->w - $this->rMargin - $this->x; - } - // get cell spacing - if (isset($dom[$key]['attribute']['cellspacing'])) { - $clsp = $this->getHTMLUnitToUnits($dom[$key]['attribute']['cellspacing'], 1, 'px'); - $cellspacing = array('H' => $clsp, 'V' => $clsp); - } elseif (isset($dom[$key]['border-spacing'])) { - $cellspacing = $dom[$key]['border-spacing']; - } else { - $cellspacing = array('H' => 0, 'V' => 0); - } - // table width - if (isset($dom[$key]['width'])) { - $table_width = $this->getHTMLUnitToUnits($dom[$key]['width'], $wtmp, 'px'); - } else { - $table_width = $wtmp; - } - $table_width -= (2 * $cellspacing['H']); - if (!$this->inthead) { - $this->y += $cellspacing['V']; - } - if ($this->rtl) { - $cellspacingx = -$cellspacing['H']; - } else { - $cellspacingx = $cellspacing['H']; - } - // total table width without cellspaces - $table_columns_width = ($table_width - ($cellspacing['H'] * ($dom[$key]['cols'] - 1))); - // minimum column width - $table_min_column_width = ($table_columns_width / $dom[$key]['cols']); - // array of custom column widths - $table_colwidths = array_fill(0, $dom[$key]['cols'], $table_min_column_width); - } - // table row - if ($dom[$key]['value'] == 'tr') { - // reset column counter - $colid = 0; - } - // table cell - if (($dom[$key]['value'] == 'td') OR ($dom[$key]['value'] == 'th')) { - $trid = $dom[$key]['parent']; - $table_el = $dom[$trid]['parent']; - if (!isset($dom[$table_el]['cols'])) { - $dom[$table_el]['cols'] = $dom[$trid]['cols']; - } - // store border info - $tdborder = 0; - if (isset($dom[$key]['border']) AND !empty($dom[$key]['border'])) { - $tdborder = $dom[$key]['border']; - } - $colspan = intval($dom[$key]['attribute']['colspan']); - if ($colspan <= 0) { - $colspan = 1; - } - $old_cell_padding = $this->cell_padding; - if (isset($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'])) { - $crclpd = $this->getHTMLUnitToUnits($dom[($dom[$trid]['parent'])]['attribute']['cellpadding'], 1, 'px'); - $current_cell_padding = array('L' => $crclpd, 'T' => $crclpd, 'R' => $crclpd, 'B' => $crclpd); - } elseif (isset($dom[($dom[$trid]['parent'])]['padding'])) { - $current_cell_padding = $dom[($dom[$trid]['parent'])]['padding']; - } else { - $current_cell_padding = array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0); - } - $this->cell_padding = $current_cell_padding; - if (isset($dom[$key]['height'])) { - // minimum cell height - $cellh = $this->getHTMLUnitToUnits($dom[$key]['height'], 0, 'px'); - } else { - $cellh = 0; - } - if (isset($dom[$key]['content'])) { - $cell_content = $dom[$key]['content']; - } else { - $cell_content = ' '; - } - $tagtype = $dom[$key]['value']; - $parentid = $key; - while (($key < $maxel) AND (!(($dom[$key]['tag']) AND (!$dom[$key]['opening']) AND ($dom[$key]['value'] == $tagtype) AND ($dom[$key]['parent'] == $parentid)))) { - // move $key index forward - ++$key; - } - if (!isset($dom[$trid]['startpage'])) { - $dom[$trid]['startpage'] = $this->page; - } else { - $this->setPage($dom[$trid]['startpage']); - } - if (!isset($dom[$trid]['startcolumn'])) { - $dom[$trid]['startcolumn'] = $this->current_column; - } elseif ($this->current_column != $dom[$trid]['startcolumn']) { - $tmpx = $this->x; - $this->selectColumn($dom[$trid]['startcolumn']); - $this->x = $tmpx; - } - if (!isset($dom[$trid]['starty'])) { - $dom[$trid]['starty'] = $this->y; - } else { - $this->y = $dom[$trid]['starty']; - } - if (!isset($dom[$trid]['startx'])) { - $dom[$trid]['startx'] = $this->x; - $this->x += $cellspacingx; - } else { - $this->x += ($cellspacingx / 2); - } - if (isset($dom[$parentid]['attribute']['rowspan'])) { - $rowspan = intval($dom[$parentid]['attribute']['rowspan']); - } else { - $rowspan = 1; - } - // skip row-spanned cells started on the previous rows - if (isset($dom[$table_el]['rowspans'])) { - $rsk = 0; - $rskmax = count($dom[$table_el]['rowspans']); - while ($rsk < $rskmax) { - $trwsp = $dom[$table_el]['rowspans'][$rsk]; - $rsstartx = $trwsp['startx']; - $rsendx = $trwsp['endx']; - // account for margin changes - if ($trwsp['startpage'] < $this->page) { - if (($this->rtl) AND ($this->pagedim[$this->page]['orm'] != $this->pagedim[$trwsp['startpage']]['orm'])) { - $dl = ($this->pagedim[$this->page]['orm'] - $this->pagedim[$trwsp['startpage']]['orm']); - $rsstartx -= $dl; - $rsendx -= $dl; - } elseif ((!$this->rtl) AND ($this->pagedim[$this->page]['olm'] != $this->pagedim[$trwsp['startpage']]['olm'])) { - $dl = ($this->pagedim[$this->page]['olm'] - $this->pagedim[$trwsp['startpage']]['olm']); - $rsstartx += $dl; - $rsendx += $dl; - } - } - if (($trwsp['rowspan'] > 0) - AND ($rsstartx > ($this->x - $cellspacing['H'] - $current_cell_padding['L'] - $this->feps)) - AND ($rsstartx < ($this->x + $cellspacing['H'] + $current_cell_padding['R'] + $this->feps)) - AND (($trwsp['starty'] < ($this->y - $this->feps)) OR ($trwsp['startpage'] < $this->page) OR ($trwsp['startcolumn'] < $this->current_column))) { - // set the starting X position of the current cell - $this->x = $rsendx + $cellspacingx; - // increment column indicator - $colid += $trwsp['colspan']; - if (($trwsp['rowspan'] == 1) - AND (isset($dom[$trid]['endy'])) - AND (isset($dom[$trid]['endpage'])) - AND (isset($dom[$trid]['endcolumn'])) - AND ($trwsp['endpage'] == $dom[$trid]['endpage']) - AND ($trwsp['endcolumn'] == $dom[$trid]['endcolumn'])) { - // set ending Y position for row - $dom[$table_el]['rowspans'][$rsk]['endy'] = max($dom[$trid]['endy'], $trwsp['endy']); - $dom[$trid]['endy'] = $dom[$table_el]['rowspans'][$rsk]['endy']; - } - $rsk = 0; - } else { - ++$rsk; - } - } - } - if (isset($dom[$parentid]['width'])) { - // user specified width - $cellw = $this->getHTMLUnitToUnits($dom[$parentid]['width'], $table_columns_width, 'px'); - $tmpcw = ($cellw / $colspan); - for ($i = 0; $i < $colspan; ++$i) { - $table_colwidths[($colid + $i)] = $tmpcw; - } - } else { - // inherit column width - $cellw = 0; - for ($i = 0; $i < $colspan; ++$i) { - $cellw += (isset($table_colwidths[($colid + $i)]) ? $table_colwidths[($colid + $i)] : 0); - } - } - $cellw += (($colspan - 1) * $cellspacing['H']); - // increment column indicator - $colid += $colspan; - // add rowspan information to table element - if ($rowspan > 1) { - $trsid = array_push($dom[$table_el]['rowspans'], array('trid' => $trid, 'rowspan' => $rowspan, 'mrowspan' => $rowspan, 'colspan' => $colspan, 'startpage' => $this->page, 'startcolumn' => $this->current_column, 'startx' => $this->x, 'starty' => $this->y)); - } - $cellid = array_push($dom[$trid]['cellpos'], array('startx' => $this->x)); - if ($rowspan > 1) { - $dom[$trid]['cellpos'][($cellid - 1)]['rowspanid'] = ($trsid - 1); - } - // push background colors - if (isset($dom[$parentid]['bgcolor']) AND ($dom[$parentid]['bgcolor'] !== false)) { - $dom[$trid]['cellpos'][($cellid - 1)]['bgcolor'] = $dom[$parentid]['bgcolor']; - } - // store border info - if (isset($tdborder) AND !empty($tdborder)) { - $dom[$trid]['cellpos'][($cellid - 1)]['border'] = $tdborder; - } - $prevLastH = $this->lasth; - // store some info for multicolumn mode - if ($this->rtl) { - $this->colxshift['x'] = $this->w - $this->x - $this->rMargin; - } else { - $this->colxshift['x'] = $this->x - $this->lMargin; - } - $this->colxshift['s'] = $cellspacing; - $this->colxshift['p'] = $current_cell_padding; - // ****** write the cell content ****** - $this->MultiCell($cellw, $cellh, $cell_content, false, $lalign, false, 2, '', '', true, 0, true, true, 0, 'T', false); - // restore some values - $this->colxshift = array('x' => 0, 's' => array('H' => 0, 'V' => 0), 'p' => array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0)); - $this->lasth = $prevLastH; - $this->cell_padding = $old_cell_padding; - $dom[$trid]['cellpos'][($cellid - 1)]['endx'] = $this->x; - // update the end of row position - if ($rowspan <= 1) { - if (isset($dom[$trid]['endy'])) { - if (($this->page == $dom[$trid]['endpage']) AND ($this->current_column == $dom[$trid]['endcolumn'])) { - $dom[$trid]['endy'] = max($this->y, $dom[$trid]['endy']); - } elseif (($this->page > $dom[$trid]['endpage']) OR ($this->current_column > $dom[$trid]['endcolumn'])) { - $dom[$trid]['endy'] = $this->y; - } - } else { - $dom[$trid]['endy'] = $this->y; - } - if (isset($dom[$trid]['endpage'])) { - $dom[$trid]['endpage'] = max($this->page, $dom[$trid]['endpage']); - } else { - $dom[$trid]['endpage'] = $this->page; - } - if (isset($dom[$trid]['endcolumn'])) { - $dom[$trid]['endcolumn'] = max($this->current_column, $dom[$trid]['endcolumn']); - } else { - $dom[$trid]['endcolumn'] = $this->current_column; - } - } else { - // account for row-spanned cells - $dom[$table_el]['rowspans'][($trsid - 1)]['endx'] = $this->x; - $dom[$table_el]['rowspans'][($trsid - 1)]['endy'] = $this->y; - $dom[$table_el]['rowspans'][($trsid - 1)]['endpage'] = $this->page; - $dom[$table_el]['rowspans'][($trsid - 1)]['endcolumn'] = $this->current_column; - } - if (isset($dom[$table_el]['rowspans'])) { - // update endy and endpage on rowspanned cells - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - if ($trwsp['rowspan'] > 0) { - if (isset($dom[$trid]['endpage'])) { - if (($trwsp['endpage'] == $dom[$trid]['endpage']) AND ($trwsp['endcolumn'] == $dom[$trid]['endcolumn'])) { - $dom[$table_el]['rowspans'][$k]['endy'] = max($dom[$trid]['endy'], $trwsp['endy']); - } elseif (($trwsp['endpage'] < $dom[$trid]['endpage']) OR ($trwsp['endcolumn'] < $dom[$trid]['endcolumn'])) { - $dom[$table_el]['rowspans'][$k]['endy'] = $dom[$trid]['endy']; - $dom[$table_el]['rowspans'][$k]['endpage'] = $dom[$trid]['endpage']; - $dom[$table_el]['rowspans'][$k]['endcolumn'] = $dom[$trid]['endcolumn']; - } else { - $dom[$trid]['endy'] = $this->pagedim[$dom[$trid]['endpage']]['hk'] - $this->pagedim[$dom[$trid]['endpage']]['bm']; - } - } - } - } - } - $this->x += ($cellspacingx / 2); - } else { - // opening tag (or self-closing tag) - if (!isset($opentagpos)) { - if ($this->inxobj) { - // we are inside an XObject template - $opentagpos = strlen($this->xobjects[$this->xobjid]['outdata']); - } elseif (!$this->InFooter) { - if (isset($this->footerlen[$this->page])) { - $this->footerpos[$this->page] = $this->pagelen[$this->page] - $this->footerlen[$this->page]; - } else { - $this->footerpos[$this->page] = $this->pagelen[$this->page]; - } - $opentagpos = $this->footerpos[$this->page]; - } - } - $dom = $this->openHTMLTagHandler($dom, $key, $cell); - } - } else { // closing tag - $prev_numpages = $this->numpages; - $old_bordermrk = $this->bordermrk[$this->page]; - $dom = $this->closeHTMLTagHandler($dom, $key, $cell, $maxbottomliney); - if ($this->bordermrk[$this->page] > $old_bordermrk) { - $startlinepos += ($this->bordermrk[$this->page] - $old_bordermrk); - } - if ($prev_numpages > $this->numpages) { - $startlinepage = $this->page; - } - } - } elseif (strlen($dom[$key]['value']) > 0) { - // print list-item - if (!TCPDF_STATIC::empty_string($this->lispacer) AND ($this->lispacer != '^')) { - $this->setFont($pfontname, $pfontstyle, $pfontsize); - $this->resetLastH(); - $minstartliney = $this->y; - $maxbottomliney = ($startliney + $this->getCellHeight($this->FontSize)); - if (is_numeric($pfontsize) AND ($pfontsize > 0)) { - $this->putHtmlListBullet($this->listnum, $this->lispacer, $pfontsize); - } - $this->setFont($curfontname, $curfontstyle, $curfontsize); - $this->resetLastH(); - if (is_numeric($pfontsize) AND ($pfontsize > 0) AND is_numeric($curfontsize) AND ($curfontsize > 0) AND ($pfontsize != $curfontsize)) { - $pfontascent = $this->getFontAscent($pfontname, $pfontstyle, $pfontsize); - $pfontdescent = $this->getFontDescent($pfontname, $pfontstyle, $pfontsize); - $this->y += ($this->getCellHeight(($pfontsize - $curfontsize) / $this->k) + $pfontascent - $curfontascent - $pfontdescent + $curfontdescent) / 2; - $minstartliney = min($this->y, $minstartliney); - $maxbottomliney = max(($this->y + $this->getCellHeight($pfontsize / $this->k)), $maxbottomliney); - } - } - // text - $this->htmlvspace = 0; - $isRTLString = preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $dom[$key]['value']) || preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $dom[$key]['value']); - if ((!$this->premode) AND $this->isRTLTextDir() AND !$isRTLString) { - // reverse spaces order - $lsp = ''; // left spaces - $rsp = ''; // right spaces - if (preg_match('/^('.$this->re_space['p'].'+)/'.$this->re_space['m'], $dom[$key]['value'], $matches)) { - $lsp = $matches[1]; - } - if (preg_match('/('.$this->re_space['p'].'+)$/'.$this->re_space['m'], $dom[$key]['value'], $matches)) { - $rsp = $matches[1]; - } - $dom[$key]['value'] = $rsp.$this->stringTrim($dom[$key]['value']).$lsp; - } - if ($newline) { - if (!$this->premode) { - $prelen = strlen($dom[$key]['value']); - if ($this->isRTLTextDir() AND !$isRTLString) { - // right trim except non-breaking space - $dom[$key]['value'] = $this->stringRightTrim($dom[$key]['value']); - } else { - // left trim except non-breaking space - $dom[$key]['value'] = $this->stringLeftTrim($dom[$key]['value']); - } - $postlen = strlen($dom[$key]['value']); - if (($postlen == 0) AND ($prelen > 0)) { - $dom[$key]['trimmed_space'] = true; - } - } - $newline = false; - $firstblock = true; - } else { - $firstblock = false; - // replace empty multiple spaces string with a single space - $dom[$key]['value'] = preg_replace('/^'.$this->re_space['p'].'+$/'.$this->re_space['m'], chr(32), $dom[$key]['value']); - } - $strrest = ''; - if ($this->rtl) { - $this->x -= $this->textindent; - } else { - $this->x += $this->textindent; - } - if (!isset($dom[$key]['trimmed_space']) OR !$dom[$key]['trimmed_space']) { - $strlinelen = $this->GetStringWidth($dom[$key]['value']); - if (!empty($this->HREF) AND (isset($this->HREF['url']))) { - // HTML
    Link - $hrefcolor = ''; - if (isset($dom[($dom[$key]['parent'])]['fgcolor']) AND ($dom[($dom[$key]['parent'])]['fgcolor'] !== false)) { - $hrefcolor = $dom[($dom[$key]['parent'])]['fgcolor']; - } - $hrefstyle = -1; - if (isset($dom[($dom[$key]['parent'])]['fontstyle']) AND ($dom[($dom[$key]['parent'])]['fontstyle'] !== false)) { - $hrefstyle = $dom[($dom[$key]['parent'])]['fontstyle']; - } - $strrest = $this->addHtmlLink($this->HREF['url'], $dom[$key]['value'], $wfill, true, $hrefcolor, $hrefstyle, true); - } else { - $wadj = 0; // space to leave for block continuity - if ($this->rtl) { - $cwa = ($this->x - $this->lMargin); - } else { - $cwa = ($this->w - $this->rMargin - $this->x); - } - if (($strlinelen < $cwa) AND (isset($dom[($key + 1)])) AND ($dom[($key + 1)]['tag']) AND (!$dom[($key + 1)]['block'])) { - // check the next text blocks for continuity - $nkey = ($key + 1); - $write_block = true; - $same_textdir = true; - $tmp_fontname = $this->FontFamily; - $tmp_fontstyle = $this->FontStyle; - $tmp_fontsize = $this->FontSizePt; - while ($write_block AND isset($dom[$nkey])) { - if ($dom[$nkey]['tag']) { - if ($dom[$nkey]['block']) { - // end of block - $write_block = false; - } - $tmp_fontname = isset($dom[$nkey]['fontname']) ? $dom[$nkey]['fontname'] : $this->FontFamily; - $tmp_fontstyle = isset($dom[$nkey]['fontstyle']) ? $dom[$nkey]['fontstyle'] : $this->FontStyle; - $tmp_fontsize = isset($dom[$nkey]['fontsize']) ? $dom[$nkey]['fontsize'] : $this->FontSizePt; - $same_textdir = ($dom[$nkey]['dir'] == $dom[$key]['dir']); - } else { - $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'+/', $this->re_space['m'], $dom[$nkey]['value']); - if (isset($nextstr[0]) AND $same_textdir) { - $wadj += $this->GetStringWidth($nextstr[0], $tmp_fontname, $tmp_fontstyle, $tmp_fontsize); - if (isset($nextstr[1])) { - $write_block = false; - } - } - } - ++$nkey; - } - } - if (($wadj > 0) AND (($strlinelen + $wadj) >= $cwa)) { - $wadj = 0; - $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'/', $this->re_space['m'], $dom[$key]['value']); - $numblks = count($nextstr); - if ($numblks > 1) { - // try to split on blank spaces - $wadj = ($cwa - $strlinelen + $this->GetStringWidth($nextstr[($numblks - 1)])); - } else { - // set the entire block on new line - $wadj = $this->GetStringWidth($nextstr[0]); - } - } - // check for reversed text direction - if (($wadj > 0) AND (($this->rtl AND ($this->tmprtl === 'L')) OR (!$this->rtl AND ($this->tmprtl === 'R')))) { - // LTR text on RTL direction or RTL text on LTR direction - $reverse_dir = true; - $this->rtl = !$this->rtl; - $revshift = ($strlinelen + $wadj + 0.000001); // add little quantity for rounding problems - if ($this->rtl) { - $this->x += $revshift; - } else { - $this->x -= $revshift; - } - $xws = $this->x; - } - // ****** write only until the end of the line and get the rest ****** - $strrest = $this->Write($this->lasth, $dom[$key]['value'], '', $wfill, '', false, 0, true, $firstblock, 0, $wadj); - // restore default direction - if ($reverse_dir AND ($wadj == 0)) { - $this->x = $xws; - $this->rtl = !$this->rtl; - $reverse_dir = false; - } - } - } - $this->textindent = 0; - if (strlen($strrest) > 0) { - // store the remaining string on the previous $key position - $this->newline = true; - if ($strrest == $dom[$key]['value']) { - // used to avoid infinite loop - ++$loop; - } else { - $loop = 0; - } - $dom[$key]['value'] = $strrest; - if ($cell) { - if ($this->rtl) { - $this->x -= $this->cell_padding['R']; - } else { - $this->x += $this->cell_padding['L']; - } - } - if ($loop < 3) { - --$key; - } - } else { - $loop = 0; - // add the positive font spacing of the last character (if any) - if ($this->font_spacing > 0) { - if ($this->rtl) { - $this->x -= $this->font_spacing; - } else { - $this->x += $this->font_spacing; - } - } - } - } - ++$key; - if (isset($dom[$key]['tag']) AND $dom[$key]['tag'] AND (!isset($dom[$key]['opening']) OR !$dom[$key]['opening']) AND isset($dom[($dom[$key]['parent'])]['attribute']['nobr']) AND ($dom[($dom[$key]['parent'])]['attribute']['nobr'] == 'true')) { - // check if we are on a new page or on a new column - if ((!$undo) AND (($this->y < $this->start_transaction_y) OR (($dom[$key]['value'] == 'tr') AND ($dom[($dom[$key]['parent'])]['endy'] < $this->start_transaction_y)))) { - // we are on a new page or on a new column and the total object height is less than the available vertical space. - // restore previous object - $this->rollbackTransaction(true); - // restore previous values - foreach ($this_method_vars as $vkey => $vval) { - $$vkey = $vval; - } - if (!empty($dom[$key]['thead'])) { - $this->inthead = true; - } - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $pre_y = $this->y; - if ((!$this->checkPageBreak($this->PageBreakTrigger + 1)) AND ($this->y < $pre_y)) { - $startliney = $this->y; - } - $undo = true; // avoid infinite loop - } else { - $undo = false; - } - } - } // end for each $key - // align the last line - if (isset($startlinex)) { - $yshift = ($minstartliney - $startliney); - if (($yshift > 0) OR ($this->page > $startlinepage)) { - $yshift = 0; - } - $t_x = 0; - // the last line must be shifted to be aligned as requested - $linew = abs($this->endlinex - $startlinex); - if ($this->inxobj) { - // we are inside an XObject template - $pstart = substr($this->xobjects[$this->xobjid]['outdata'], 0, $startlinepos); - if (isset($opentagpos)) { - $midpos = $opentagpos; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->xobjects[$this->xobjid]['outdata'], $midpos); - } else { - $pmid = substr($this->xobjects[$this->xobjid]['outdata'], $startlinepos); - $pend = ''; - } - } else { - $pstart = substr($this->getPageBuffer($startlinepage), 0, $startlinepos); - if (isset($opentagpos) AND isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = min($opentagpos, $this->footerpos[$startlinepage]); - } elseif (isset($opentagpos)) { - $midpos = $opentagpos; - } elseif (isset($this->footerlen[$startlinepage]) AND (!$this->InFooter)) { - $this->footerpos[$startlinepage] = $this->pagelen[$startlinepage] - $this->footerlen[$startlinepage]; - $midpos = $this->footerpos[$startlinepage]; - } else { - $midpos = 0; - } - if ($midpos > 0) { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos, ($midpos - $startlinepos)); - $pend = substr($this->getPageBuffer($startlinepage), $midpos); - } else { - $pmid = substr($this->getPageBuffer($startlinepage), $startlinepos); - $pend = ''; - } - } - if ((isset($plalign) AND ((($plalign == 'C') OR (($plalign == 'R') AND (!$this->rtl)) OR (($plalign == 'L') AND ($this->rtl)))))) { - // calculate shifting amount - $tw = $w; - if ($this->lMargin != $prevlMargin) { - $tw += ($prevlMargin - $this->lMargin); - } - if ($this->rMargin != $prevrMargin) { - $tw += ($prevrMargin - $this->rMargin); - } - $one_space_width = $this->GetStringWidth(chr(32)); - $no = 0; // number of spaces on a line contained on a single block - if ($this->isRTLTextDir()) { // RTL - // remove left space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, '[('); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(0).chr(32))); - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, '[('.chr(32))); - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 + 2)).substr($pmid, ($pos1 + 2 + $spacelen)); - if (substr($pmid, $pos1, 4) == '[()]') { - $linew -= $one_space_width; - } elseif ($pos1 == strpos($pmid, '[(')) { - $no = 1; - } - } - } - } else { // LTR - // remove right space if exist - $pos1 = TCPDF_STATIC::revstrpos($pmid, ')]'); - if ($pos1 > 0) { - $pos1 = intval($pos1); - if ($this->isUnicodeFont()) { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(0).chr(32).')]')) + 2; - $spacelen = 2; - } else { - $pos2 = intval(TCPDF_STATIC::revstrpos($pmid, chr(32).')]')) + 1; - $spacelen = 1; - } - if ($pos1 == $pos2) { - $pmid = substr($pmid, 0, ($pos1 - $spacelen)).substr($pmid, $pos1); - $linew -= $one_space_width; - } - } - } - $mdiff = ($tw - $linew); - if ($plalign == 'C') { - if ($this->rtl) { - $t_x = -($mdiff / 2); - } else { - $t_x = ($mdiff / 2); - } - } elseif ($plalign == 'R') { - // right alignment on LTR document - $t_x = $mdiff; - } elseif ($plalign == 'L') { - // left alignment on RTL document - $t_x = -$mdiff; - } - } // end if startlinex - if (($t_x != 0) OR ($yshift < 0)) { - // shift the line - $trx = sprintf('1 0 0 1 %F %F cm', ($t_x * $this->k), ($yshift * $this->k)); - $pstart .= "\nq\n".$trx."\n".$pmid."\nQ\n"; - $endlinepos = strlen($pstart); - if ($this->inxobj) { - // we are inside an XObject template - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$pend; - foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) { - if ($pak >= $pask) { - $this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += $t_x; - $this->xobjects[$this->xobjid]['annotations'][$pak]['y'] -= $yshift; - } - } - } else { - $this->setPageBuffer($startlinepage, $pstart.$pend); - // shift the annotations and links - if (isset($this->PageAnnots[$this->page])) { - foreach ($this->PageAnnots[$this->page] as $pak => $pac) { - if ($pak >= $pask) { - $this->PageAnnots[$this->page][$pak]['x'] += $t_x; - $this->PageAnnots[$this->page][$pak]['y'] -= $yshift; - } - } - } - } - $this->y -= $yshift; - $yshift = 0; - } - } - // restore previous values - $this->setGraphicVars($gvars); - if ($this->num_columns > 1) { - $this->selectColumn(); - } elseif ($this->page > $prevPage) { - $this->lMargin = $this->pagedim[$this->page]['olm']; - $this->rMargin = $this->pagedim[$this->page]['orm']; - } - // restore previous list state - $this->cell_height_ratio = $prev_cell_height_ratio; - $this->listnum = $prev_listnum; - $this->listordered = $prev_listordered; - $this->listcount = $prev_listcount; - $this->lispacer = $prev_lispacer; - if ($ln AND (!($cell AND ($dom[$key-1]['value'] == 'table')))) { - $this->Ln($this->lasth); - if (($this->y < $maxbottomliney) AND ($startlinepage == $this->page)) { - $this->y = $maxbottomliney; - } - } - unset($dom); - } - - /** - * Process opening tags. - * @param array $dom html dom array - * @param int $key current element id - * @param boolean $cell if true add the default left (or right if RTL) padding to each new line (default false). - * @return array $dom - * @protected - */ - protected function openHTMLTagHandler($dom, $key, $cell) { - $tag = $dom[$key]; - $parent = $dom[($dom[$key]['parent'])]; - $firsttag = ($key == 1); - // check for text direction attribute - if (isset($tag['dir'])) { - $this->setTempRTL($tag['dir']); - } else { - $this->tmprtl = false; - } - if ($tag['block']) { - $hbz = 0; // distance from y to line bottom - $hb = 0; // vertical space between block tags - // calculate vertical space for block tags - if (isset($this->tagvspaces[$tag['value']][0]['h']) && !empty($this->tagvspaces[$tag['value']][0]['h']) && ($this->tagvspaces[$tag['value']][0]['h'] >= 0)) { - $cur_h = $this->tagvspaces[$tag['value']][0]['h']; - } elseif (isset($tag['fontsize'])) { - $cur_h = $this->getCellHeight($tag['fontsize'] / $this->k); - } else { - $cur_h = $this->getCellHeight($this->FontSize); - } - if (isset($this->tagvspaces[$tag['value']][0]['n'])) { - $on = $this->tagvspaces[$tag['value']][0]['n']; - } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { - $on = 0.6; - } else { - $on = 1; - } - if ((!isset($this->tagvspaces[$tag['value']])) AND (in_array($tag['value'], array('div', 'dt', 'dd', 'li', 'br', 'hr')))) { - $hb = 0; - } else { - $hb = ($on * $cur_h); - } - if (($this->htmlvspace <= 0) AND ($on > 0)) { - if (isset($parent['fontsize'])) { - $hbz = (($parent['fontsize'] / $this->k) * $this->cell_height_ratio); - } else { - $hbz = $this->getCellHeight($this->FontSize); - } - } - if (isset($dom[($key - 1)]) AND ($dom[($key - 1)]['value'] == 'table')) { - // fix vertical space after table - $hbz = 0; - } - // closing vertical space - $hbc = 0; - if (isset($this->tagvspaces[$tag['value']][1]['h']) && !empty($this->tagvspaces[$tag['value']][1]['h']) && ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { - $pre_h = $this->tagvspaces[$tag['value']][1]['h']; - } elseif (isset($parent['fontsize'])) { - $pre_h = $this->getCellHeight($parent['fontsize'] / $this->k); - } else { - $pre_h = $this->getCellHeight($this->FontSize); - } - if (isset($this->tagvspaces[$tag['value']][1]['n'])) { - $cn = $this->tagvspaces[$tag['value']][1]['n']; - } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { - $cn = 0.6; - } else { - $cn = 1; - } - if (isset($this->tagvspaces[$tag['value']][1])) { - $hbc = ($cn * $pre_h); - } - } - // Opening tag - switch($tag['value']) { - case 'table': { - $cp = 0; - $cs = 0; - $dom[$key]['rowspans'] = array(); - if (!isset($dom[$key]['attribute']['nested']) OR ($dom[$key]['attribute']['nested'] != 'true')) { - $this->htmlvspace = 0; - // set table header - if (!TCPDF_STATIC::empty_string($dom[$key]['thead'])) { - // set table header - $this->thead = $dom[$key]['thead']; - if (!isset($this->theadMargins) OR (empty($this->theadMargins))) { - $this->theadMargins = array(); - $this->theadMargins['cell_padding'] = $this->cell_padding; - $this->theadMargins['lmargin'] = $this->lMargin; - $this->theadMargins['rmargin'] = $this->rMargin; - $this->theadMargins['page'] = $this->page; - $this->theadMargins['cell'] = $cell; - $this->theadMargins['gvars'] = $this->getGraphicVars(); - } - } - } - // store current margins and page - $dom[$key]['old_cell_padding'] = $this->cell_padding; - if (isset($tag['attribute']['cellpadding'])) { - $pad = $this->getHTMLUnitToUnits($tag['attribute']['cellpadding'], 1, 'px'); - $this->setCellPadding($pad); - } elseif (isset($tag['padding'])) { - $this->cell_padding = $tag['padding']; - } - if (isset($tag['attribute']['cellspacing'])) { - $cs = $this->getHTMLUnitToUnits($tag['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($tag['border-spacing'])) { - $cs = $tag['border-spacing']['V']; - } - $prev_y = $this->y; - if ($this->checkPageBreak(((2 * $cp) + (2 * $cs) + $this->lasth), '', false) OR ($this->y < $prev_y)) { - $this->inthead = true; - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - break; - } - case 'tr': { - // array of columns positions - $dom[$key]['cellpos'] = array(); - break; - } - case 'hr': { - if ((isset($tag['height'])) AND ($tag['height'] != '')) { - $hrHeight = $this->getHTMLUnitToUnits($tag['height'], 1, 'px'); - } else { - $hrHeight = $this->GetLineWidth(); - } - $this->addHTMLVertSpace($hbz, max($hb, ($hrHeight / 2)), $cell, $firsttag); - $x = $this->GetX(); - $y = $this->GetY(); - $wtmp = $this->w - $this->lMargin - $this->rMargin; - if ($cell) { - $wtmp -= ($this->cell_padding['L'] + $this->cell_padding['R']); - } - if ((isset($tag['width'])) AND ($tag['width'] != '')) { - $hrWidth = $this->getHTMLUnitToUnits($tag['width'], $wtmp, 'px'); - } else { - $hrWidth = $wtmp; - } - $prevlinewidth = $this->GetLineWidth(); - $this->setLineWidth($hrHeight); - - $lineStyle = array(); - if (isset($tag['fgcolor'])) { - $lineStyle['color'] = $tag['fgcolor']; - } - - if (isset($tag['fgcolor'])) { - $lineStyle['color'] = $tag['fgcolor']; - } - - if (isset($tag['style']['cap'])) { - $lineStyle['cap'] = $tag['style']['cap']; - } - - if (isset($tag['style']['join'])) { - $lineStyle['join'] = $tag['style']['join']; - } - - if (isset($tag['style']['dash'])) { - $lineStyle['dash'] = $tag['style']['dash']; - } - - if (isset($tag['style']['phase'])) { - $lineStyle['phase'] = $tag['style']['phase']; - } - - $lineStyle = array_filter($lineStyle); - - $this->Line($x, $y, $x + $hrWidth, $y, $lineStyle); - $this->setLineWidth($prevlinewidth); - $this->addHTMLVertSpace(max($hbc, ($hrHeight / 2)), 0, $cell, !isset($dom[($key + 1)])); - break; - } - case 'a': { - if (array_key_exists('href', $tag['attribute'])) { - $this->HREF['url'] = $tag['attribute']['href']; - } - break; - } - case 'img': { - if (empty($tag['attribute']['src'])) { - break; - } - $imgsrc = $tag['attribute']['src']; - if ($imgsrc[0] === '@') { - // data stream - $imgsrc = '@'.base64_decode(substr($imgsrc, 1)); - $type = ''; - } elseif ( $this->allowLocalFiles && substr($imgsrc, 0, 7) === 'file://') { - // get image type from a local file path - $imgsrc = substr($imgsrc, 7); - $type = TCPDF_IMAGES::getImageFileType($imgsrc); - } else { - if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { - // fix image path - $findroot = strpos($imgsrc, $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) OR ($findroot > 1)) { - if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { - $imgsrc = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$imgsrc; - } else { - $imgsrc = $_SERVER['DOCUMENT_ROOT'].$imgsrc; - } - } - $imgsrc = urldecode($imgsrc); - $testscrtype = @parse_url($imgsrc); - if (empty($testscrtype['query'])) { - // convert URL to server path - $imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc); - } elseif (preg_match('|^https?://|', $imgsrc) !== 1) { - // convert URL to server path - $imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc); - } - } - // get image type - $type = TCPDF_IMAGES::getImageFileType($imgsrc); - } - if (!isset($tag['width'])) { - $tag['width'] = 0; - } - if (!isset($tag['height'])) { - $tag['height'] = 0; - } - //if (!isset($tag['attribute']['align'])) { - // the only alignment supported is "bottom" - // further development is required for other modes. - $tag['attribute']['align'] = 'bottom'; - //} - switch($tag['attribute']['align']) { - case 'top': { - $align = 'T'; - break; - } - case 'middle': { - $align = 'M'; - break; - } - case 'bottom': { - $align = 'B'; - break; - } - default: { - $align = 'B'; - break; - } - } - $prevy = $this->y; - $xpos = $this->x; - $imglink = ''; - if (isset($this->HREF['url']) AND !TCPDF_STATIC::empty_string($this->HREF['url'])) { - $imglink = $this->HREF['url']; - if ($imglink[0] == '#') { - // convert url to internal link - $lnkdata = explode(',', $imglink); - if (isset($lnkdata[0])) { - $page = intval(substr($lnkdata[0], 1)); - if (empty($page) OR ($page <= 0)) { - $page = $this->page; - } - if (isset($lnkdata[1]) AND (strlen($lnkdata[1]) > 0)) { - $lnky = floatval($lnkdata[1]); - } else { - $lnky = 0; - } - $imglink = $this->AddLink(); - $this->setLink($imglink, $lnky, $page); - } - } - } - $border = 0; - if (isset($tag['border']) AND !empty($tag['border'])) { - // currently only support 1 (frame) or a combination of 'LTRB' - $border = $tag['border']; - } - $iw = ''; - if (isset($tag['width'])) { - $iw = $this->getHTMLUnitToUnits($tag['width'], ($tag['fontsize'] / $this->k), 'px', false); - } - $ih = ''; - if (isset($tag['height'])) { - $ih = $this->getHTMLUnitToUnits($tag['height'], ($tag['fontsize'] / $this->k), 'px', false); - } - if (($type == 'eps') OR ($type == 'ai')) { - $this->ImageEps($imgsrc, $xpos, $this->y, $iw, $ih, $imglink, true, $align, '', $border, true); - } elseif ($type == 'svg') { - $this->ImageSVG($imgsrc, $xpos, $this->y, $iw, $ih, $imglink, $align, '', $border, true); - } else { - $this->Image($imgsrc, $xpos, $this->y, $iw, $ih, '', $imglink, $align, false, 300, '', false, false, $border, false, false, true); - } - switch($align) { - case 'T': { - $this->y = $prevy; - break; - } - case 'M': { - $this->y = (($this->img_rb_y + $prevy - ($this->getCellHeight($tag['fontsize'] / $this->k))) / 2); - break; - } - case 'B': { - $this->y = $this->img_rb_y - ($this->getCellHeight($tag['fontsize'] / $this->k) - ($this->getFontDescent($tag['fontname'], $tag['fontstyle'], $tag['fontsize']) * $this->cell_height_ratio)); - break; - } - } - break; - } - case 'dl': { - ++$this->listnum; - if ($this->listnum == 1) { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - } else { - $this->addHTMLVertSpace(0, 0, $cell, $firsttag); - } - break; - } - case 'dt': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'dd': { - if ($this->rtl) { - $this->rMargin += $this->listindent; - } else { - $this->lMargin += $this->listindent; - } - ++$this->listindentlevel; - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'ul': - case 'ol': { - ++$this->listnum; - if ($tag['value'] == 'ol') { - $this->listordered[$this->listnum] = true; - } else { - $this->listordered[$this->listnum] = false; - } - if (isset($tag['attribute']['start'])) { - $this->listcount[$this->listnum] = intval($tag['attribute']['start']) - 1; - } else { - $this->listcount[$this->listnum] = 0; - } - if ($this->rtl) { - $this->rMargin += $this->listindent; - $this->x -= $this->listindent; - } else { - $this->lMargin += $this->listindent; - $this->x += $this->listindent; - } - ++$this->listindentlevel; - if ($this->listnum == 1) { - if ($key > 1) { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - } - } else { - $this->addHTMLVertSpace(0, 0, $cell, $firsttag); - } - break; - } - case 'li': { - if ($key > 2) { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - } - if ($this->listordered[$this->listnum]) { - // ordered item - if (isset($parent['attribute']['type']) AND !TCPDF_STATIC::empty_string($parent['attribute']['type'])) { - $this->lispacer = $parent['attribute']['type']; - } elseif (isset($parent['listtype']) AND !TCPDF_STATIC::empty_string($parent['listtype'])) { - $this->lispacer = $parent['listtype']; - } elseif (isset($this->lisymbol) AND !TCPDF_STATIC::empty_string($this->lisymbol)) { - $this->lispacer = $this->lisymbol; - } else { - $this->lispacer = '#'; - } - ++$this->listcount[$this->listnum]; - if (isset($tag['attribute']['value'])) { - $this->listcount[$this->listnum] = intval($tag['attribute']['value']); - } - } else { - // unordered item - if (isset($parent['attribute']['type']) AND !TCPDF_STATIC::empty_string($parent['attribute']['type'])) { - $this->lispacer = $parent['attribute']['type']; - } elseif (isset($parent['listtype']) AND !TCPDF_STATIC::empty_string($parent['listtype'])) { - $this->lispacer = $parent['listtype']; - } elseif (isset($this->lisymbol) AND !TCPDF_STATIC::empty_string($this->lisymbol)) { - $this->lispacer = $this->lisymbol; - } else { - $this->lispacer = '!'; - } - } - break; - } - case 'blockquote': { - if ($this->rtl) { - $this->rMargin += $this->listindent; - } else { - $this->lMargin += $this->listindent; - } - ++$this->listindentlevel; - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'br': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'div': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'p': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - case 'pre': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - $this->premode = true; - break; - } - case 'sup': { - $this->setXY($this->GetX(), $this->GetY() - ((0.7 * $this->FontSizePt) / $this->k)); - break; - } - case 'sub': { - $this->setXY($this->GetX(), $this->GetY() + ((0.3 * $this->FontSizePt) / $this->k)); - break; - } - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': { - $this->addHTMLVertSpace($hbz, $hb, $cell, $firsttag); - break; - } - // Form fields (since 4.8.000 - 2009-09-07) - case 'form': { - if (isset($tag['attribute']['action'])) { - $this->form_action = $tag['attribute']['action']; - } else { - $this->Error('Please explicitly set action attribute path!'); - } - if (isset($tag['attribute']['enctype'])) { - $this->form_enctype = $tag['attribute']['enctype']; - } else { - $this->form_enctype = 'application/x-www-form-urlencoded'; - } - if (isset($tag['attribute']['method'])) { - $this->form_mode = $tag['attribute']['method']; - } else { - $this->form_mode = 'post'; - } - break; - } - case 'input': { - if (isset($tag['attribute']['name']) AND !TCPDF_STATIC::empty_string($tag['attribute']['name'])) { - $name = $tag['attribute']['name']; - } else { - break; - } - $prop = array(); - $opt = array(); - if (isset($tag['attribute']['readonly']) AND !TCPDF_STATIC::empty_string($tag['attribute']['readonly'])) { - $prop['readonly'] = true; - } - if (isset($tag['attribute']['value']) AND !TCPDF_STATIC::empty_string($tag['attribute']['value'])) { - $value = $tag['attribute']['value']; - } - if (isset($tag['attribute']['maxlength']) AND !TCPDF_STATIC::empty_string($tag['attribute']['maxlength'])) { - $opt['maxlen'] = intval($tag['attribute']['maxlength']); - } - $h = $this->getCellHeight($this->FontSize); - if (isset($tag['attribute']['size']) AND !TCPDF_STATIC::empty_string($tag['attribute']['size'])) { - $w = intval($tag['attribute']['size']) * $this->GetStringWidth(chr(32)) * 2; - } else { - $w = $h; - } - if (isset($tag['attribute']['checked']) AND (($tag['attribute']['checked'] == 'checked') OR ($tag['attribute']['checked'] == 'true'))) { - $checked = true; - } else { - $checked = false; - } - if (isset($tag['align'])) { - switch ($tag['align']) { - case 'C': { - $opt['q'] = 1; - break; - } - case 'R': { - $opt['q'] = 2; - break; - } - case 'L': - default: { - break; - } - } - } - switch ($tag['attribute']['type']) { - case 'text': { - if (isset($value)) { - $opt['v'] = $value; - } - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - break; - } - case 'password': { - if (isset($value)) { - $opt['v'] = $value; - } - $prop['password'] = 'true'; - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - break; - } - case 'checkbox': { - if (!isset($value)) { - break; - } - $this->CheckBox($name, $w, $checked, $prop, $opt, $value, '', '', false); - break; - } - case 'radio': { - if (!isset($value)) { - break; - } - $this->RadioButton($name, $w, $prop, $opt, $value, $checked, '', '', false); - break; - } - case 'submit': { - if (!isset($value)) { - $value = 'submit'; - } - $w = $this->GetStringWidth($value) * 1.5; - $h *= 1.6; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - $action = array(); - $action['S'] = 'SubmitForm'; - $action['F'] = $this->form_action; - if ($this->form_enctype != 'FDF') { - $action['Flags'] = array('ExportFormat'); - } - if ($this->form_mode == 'get') { - $action['Flags'] = array('GetMethod'); - } - $this->Button($name, $w, $h, $value, $action, $prop, $opt, '', '', false); - break; - } - case 'reset': { - if (!isset($value)) { - $value = 'reset'; - } - $w = $this->GetStringWidth($value) * 1.5; - $h *= 1.6; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - $this->Button($name, $w, $h, $value, array('S'=>'ResetForm'), $prop, $opt, '', '', false); - break; - } - case 'file': { - $prop['fileSelect'] = 'true'; - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - if (!isset($value)) { - $value = '*'; - } - $w = $this->GetStringWidth($value) * 2; - $h *= 1.2; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - $jsaction = 'var f=this.getField(\''.$name.'\'); f.browseForFileToSubmit();'; - $this->Button('FB_'.$name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false); - break; - } - case 'hidden': { - if (isset($value)) { - $opt['v'] = $value; - } - $opt['f'] = array('invisible', 'hidden'); - $this->TextField($name, 0, 0, $prop, $opt, '', '', false); - break; - } - case 'image': { - // THIS TYPE MUST BE FIXED - if (isset($tag['attribute']['src']) AND !TCPDF_STATIC::empty_string($tag['attribute']['src'])) { - $img = $tag['attribute']['src']; - } else { - break; - } - $value = 'img'; - //$opt['mk'] = array('i'=>$img, 'tp'=>1, 'if'=>array('sw'=>'A', 's'=>'A', 'fb'=>false)); - if (isset($tag['attribute']['onclick']) AND !empty($tag['attribute']['onclick'])) { - $jsaction = $tag['attribute']['onclick']; - } else { - $jsaction = ''; - } - $this->Button($name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false); - break; - } - case 'button': { - if (!isset($value)) { - $value = ' '; - } - $w = $this->GetStringWidth($value) * 1.5; - $h *= 1.6; - $prop = array('lineWidth'=>1, 'borderStyle'=>'beveled', 'fillColor'=>array(196, 196, 196), 'strokeColor'=>array(255, 255, 255)); - if (isset($tag['attribute']['onclick']) AND !empty($tag['attribute']['onclick'])) { - $jsaction = $tag['attribute']['onclick']; - } else { - $jsaction = ''; - } - $this->Button($name, $w, $h, $value, $jsaction, $prop, $opt, '', '', false); - break; - } - } - break; - } - case 'textarea': { - $prop = array(); - $opt = array(); - if (isset($tag['attribute']['readonly']) AND !TCPDF_STATIC::empty_string($tag['attribute']['readonly'])) { - $prop['readonly'] = true; - } - if (isset($tag['attribute']['name']) AND !TCPDF_STATIC::empty_string($tag['attribute']['name'])) { - $name = $tag['attribute']['name']; - } else { - break; - } - if (isset($tag['attribute']['value']) AND !TCPDF_STATIC::empty_string($tag['attribute']['value'])) { - $opt['v'] = $tag['attribute']['value']; - } - if (isset($tag['attribute']['cols']) AND !TCPDF_STATIC::empty_string($tag['attribute']['cols'])) { - $w = intval($tag['attribute']['cols']) * $this->GetStringWidth(chr(32)) * 2; - } else { - $w = 40; - } - if (isset($tag['attribute']['rows']) AND !TCPDF_STATIC::empty_string($tag['attribute']['rows'])) { - $h = intval($tag['attribute']['rows']) * $this->getCellHeight($this->FontSize); - } else { - $h = 10; - } - $prop['multiline'] = 'true'; - $this->TextField($name, $w, $h, $prop, $opt, '', '', false); - break; - } - case 'select': { - $h = $this->getCellHeight($this->FontSize); - if (isset($tag['attribute']['size']) AND !TCPDF_STATIC::empty_string($tag['attribute']['size'])) { - $h *= ($tag['attribute']['size'] + 1); - } - $prop = array(); - $opt = array(); - if (isset($tag['attribute']['name']) AND !TCPDF_STATIC::empty_string($tag['attribute']['name'])) { - $name = $tag['attribute']['name']; - } else { - break; - } - $w = 0; - if (isset($tag['attribute']['opt']) AND !TCPDF_STATIC::empty_string($tag['attribute']['opt'])) { - $options = explode('#!NwL!#', $tag['attribute']['opt']); - $values = array(); - foreach ($options as $val) { - if (strpos($val, '#!TaB!#') !== false) { - $opts = explode('#!TaB!#', $val); - $values[] = $opts; - $w = max($w, $this->GetStringWidth($opts[1])); - } else { - $values[] = $val; - $w = max($w, $this->GetStringWidth($val)); - } - } - } else { - break; - } - $w *= 2; - if (isset($tag['attribute']['multiple']) AND ($tag['attribute']['multiple']='multiple')) { - $prop['multipleSelection'] = 'true'; - $this->ListBox($name, $w, $h, $values, $prop, $opt, '', '', false); - } else { - $this->ComboBox($name, $w, $h, $values, $prop, $opt, '', '', false); - } - break; - } - case 'tcpdf': { - if (defined('K_TCPDF_CALLS_IN_HTML') AND (K_TCPDF_CALLS_IN_HTML === true)) { - // Special tag used to call TCPDF methods - if (isset($tag['attribute']['method'])) { - $tcpdf_method = $tag['attribute']['method']; - if (method_exists($this, $tcpdf_method)) { - if (isset($tag['attribute']['params']) AND (!empty($tag['attribute']['params']))) { - $params = $this->unserializeTCPDFtagParameters($tag['attribute']['params']); - call_user_func_array(array($this, $tcpdf_method), $params); - } else { - $this->$tcpdf_method(); - } - $this->newline = true; - } - } - } - break; - } - default: { - break; - } - } - // define tags that support borders and background colors - $bordertags = array('blockquote','br','dd','dl','div','dt','h1','h2','h3','h4','h5','h6','hr','li','ol','p','pre','ul','tcpdf','table'); - if (in_array($tag['value'], $bordertags)) { - // set border - $dom[$key]['borderposition'] = $this->getBorderStartPosition(); - } - if ($dom[$key]['self'] AND isset($dom[$key]['attribute']['pagebreakafter'])) { - $pba = $dom[$key]['attribute']['pagebreakafter']; - // check for pagebreak - if (($pba == 'true') OR ($pba == 'left') OR ($pba == 'right')) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - if ((($pba == 'left') AND (((!$this->rtl) AND (($this->page % 2) == 0)) OR (($this->rtl) AND (($this->page % 2) != 0)))) - OR (($pba == 'right') AND (((!$this->rtl) AND (($this->page % 2) != 0)) OR (($this->rtl) AND (($this->page % 2) == 0))))) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - } - return $dom; - } - - /** - * Process closing tags. - * @param array $dom html dom array - * @param int $key current element id - * @param boolean $cell if true add the default left (or right if RTL) padding to each new line (default false). - * @param int $maxbottomliney maximum y value of current line - * @return array $dom - * @protected - */ - protected function closeHTMLTagHandler($dom, $key, $cell, $maxbottomliney=0) { - $tag = $dom[$key]; - $parent = $dom[($dom[$key]['parent'])]; - $lasttag = ((!isset($dom[($key + 1)])) OR ((!isset($dom[($key + 2)])) AND ($dom[($key + 1)]['value'] == 'marker'))); - $in_table_head = false; - // maximum x position (used to draw borders) - if ($this->rtl) { - $xmax = $this->w; - } else { - $xmax = 0; - } - if ($tag['block']) { - $hbz = 0; // distance from y to line bottom - $hb = 0; // vertical space between block tags - // calculate vertical space for block tags - if (isset($this->tagvspaces[$tag['value']][1]['h']) && !empty($this->tagvspaces[$tag['value']][1]['h']) && ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { - $pre_h = $this->tagvspaces[$tag['value']][1]['h']; - } elseif (isset($parent['fontsize'])) { - $pre_h = $this->getCellHeight($parent['fontsize'] / $this->k); - } else { - $pre_h = $this->getCellHeight($this->FontSize); - } - if (isset($this->tagvspaces[$tag['value']][1]['n'])) { - $cn = $this->tagvspaces[$tag['value']][1]['n']; - } elseif (preg_match('/[h][0-9]/', $tag['value']) > 0) { - $cn = 0.6; - } else { - $cn = 1; - } - if ((!isset($this->tagvspaces[$tag['value']])) AND ($tag['value'] == 'div')) { - $hb = 0; - } else { - $hb = ($cn * $pre_h); - } - if ($maxbottomliney > $this->PageBreakTrigger) { - $hbz = $this->getCellHeight($this->FontSize); - } elseif ($this->y < $maxbottomliney) { - $hbz = ($maxbottomliney - $this->y); - } - } - // Closing tag - switch($tag['value']) { - case 'tr': { - $table_el = $dom[($dom[$key]['parent'])]['parent']; - if (!isset($parent['endy'])) { - $dom[($dom[$key]['parent'])]['endy'] = $this->y; - $parent['endy'] = $this->y; - } - if (!isset($parent['endpage'])) { - $dom[($dom[$key]['parent'])]['endpage'] = $this->page; - $parent['endpage'] = $this->page; - } - if (!isset($parent['endcolumn'])) { - $dom[($dom[$key]['parent'])]['endcolumn'] = $this->current_column; - $parent['endcolumn'] = $this->current_column; - } - // update row-spanned cells - if (isset($dom[$table_el]['rowspans'])) { - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - $dom[$table_el]['rowspans'][$k]['rowspan'] -= 1; - if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) { - if (($dom[$table_el]['rowspans'][$k]['endpage'] == $parent['endpage']) AND ($dom[$table_el]['rowspans'][$k]['endcolumn'] == $parent['endcolumn'])) { - $dom[($dom[$key]['parent'])]['endy'] = max($dom[$table_el]['rowspans'][$k]['endy'], $parent['endy']); - } elseif (($dom[$table_el]['rowspans'][$k]['endpage'] > $parent['endpage']) OR ($dom[$table_el]['rowspans'][$k]['endcolumn'] > $parent['endcolumn'])) { - $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy']; - $dom[($dom[$key]['parent'])]['endpage'] = $dom[$table_el]['rowspans'][$k]['endpage']; - $dom[($dom[$key]['parent'])]['endcolumn'] = $dom[$table_el]['rowspans'][$k]['endcolumn']; - } - } - } - // report new endy and endpage to the rowspanned cells - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) { - $dom[$table_el]['rowspans'][$k]['endpage'] = max($dom[$table_el]['rowspans'][$k]['endpage'], $dom[($dom[$key]['parent'])]['endpage']); - $dom[($dom[$key]['parent'])]['endpage'] = $dom[$table_el]['rowspans'][$k]['endpage']; - $dom[$table_el]['rowspans'][$k]['endcolumn'] = max($dom[$table_el]['rowspans'][$k]['endcolumn'], $dom[($dom[$key]['parent'])]['endcolumn']); - $dom[($dom[$key]['parent'])]['endcolumn'] = $dom[$table_el]['rowspans'][$k]['endcolumn']; - $dom[$table_el]['rowspans'][$k]['endy'] = max($dom[$table_el]['rowspans'][$k]['endy'], $dom[($dom[$key]['parent'])]['endy']); - $dom[($dom[$key]['parent'])]['endy'] = $dom[$table_el]['rowspans'][$k]['endy']; - } - } - // update remaining rowspanned cells - foreach ($dom[$table_el]['rowspans'] as $k => $trwsp) { - if ($dom[$table_el]['rowspans'][$k]['rowspan'] == 0) { - $dom[$table_el]['rowspans'][$k]['endpage'] = $dom[($dom[$key]['parent'])]['endpage']; - $dom[$table_el]['rowspans'][$k]['endcolumn'] = $dom[($dom[$key]['parent'])]['endcolumn']; - $dom[$table_el]['rowspans'][$k]['endy'] = $dom[($dom[$key]['parent'])]['endy']; - } - } - } - $prev_page = $this->page; - $this->setPage($dom[($dom[$key]['parent'])]['endpage']); - if ($this->num_columns > 1) { - if (($prev_page < $this->page) - AND ((($this->current_column == 0) AND ($dom[($dom[$key]['parent'])]['endcolumn'] == ($this->num_columns - 1))) - OR ($this->current_column == $dom[($dom[$key]['parent'])]['endcolumn']))) { - // page jump - $this->selectColumn(0); - $dom[($dom[$key]['parent'])]['endcolumn'] = 0; - $dom[($dom[$key]['parent'])]['endy'] = $this->y; - } else { - $this->selectColumn($dom[($dom[$key]['parent'])]['endcolumn']); - $this->y = $dom[($dom[$key]['parent'])]['endy']; - } - } else { - $this->y = $dom[($dom[$key]['parent'])]['endy']; - } - if (isset($dom[$table_el]['attribute']['cellspacing'])) { - $this->y += $this->getHTMLUnitToUnits($dom[$table_el]['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($dom[$table_el]['border-spacing'])) { - $this->y += $dom[$table_el]['border-spacing']['V']; - } - $this->Ln(0, $cell); - if ($this->current_column == $parent['startcolumn']) { - $this->x = $parent['startx']; - } - // account for booklet mode - if ($this->page > $parent['startpage']) { - if (($this->rtl) AND ($this->pagedim[$this->page]['orm'] != $this->pagedim[$parent['startpage']]['orm'])) { - $this->x -= ($this->pagedim[$this->page]['orm'] - $this->pagedim[$parent['startpage']]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$this->page]['olm'] != $this->pagedim[$parent['startpage']]['olm'])) { - $this->x += ($this->pagedim[$this->page]['olm'] - $this->pagedim[$parent['startpage']]['olm']); - } - } - break; - } - case 'tablehead': - // closing tag used for the thead part - $in_table_head = true; - $this->inthead = false; - case 'table': { - $table_el = $parent; - // set default border - if (isset($table_el['attribute']['border']) AND ($table_el['attribute']['border'] > 0)) { - // set default border - $border = array('LTRB' => array('width' => $this->getCSSBorderWidth($table_el['attribute']['border']), 'cap'=>'square', 'join'=>'miter', 'dash'=> 0, 'color'=>array(0,0,0))); - } else { - $border = 0; - } - $default_border = $border; - // fix bottom line alignment of last line before page break - foreach ($dom[($dom[$key]['parent'])]['trids'] as $j => $trkey) { - // update row-spanned cells - if (isset($dom[($dom[$key]['parent'])]['rowspans'])) { - foreach ($dom[($dom[$key]['parent'])]['rowspans'] as $k => $trwsp) { - if (isset($prevtrkey) AND ($trwsp['trid'] == $prevtrkey) AND ($trwsp['mrowspan'] > 0)) { - $dom[($dom[$key]['parent'])]['rowspans'][$k]['trid'] = $trkey; - } - if ($dom[($dom[$key]['parent'])]['rowspans'][$k]['trid'] == $trkey) { - $dom[($dom[$key]['parent'])]['rowspans'][$k]['mrowspan'] -= 1; - } - } - } - if (isset($prevtrkey) AND ($dom[$trkey]['startpage'] > $dom[$prevtrkey]['endpage'])) { - $pgendy = $this->pagedim[$dom[$prevtrkey]['endpage']]['hk'] - $this->pagedim[$dom[$prevtrkey]['endpage']]['bm']; - $dom[$prevtrkey]['endy'] = $pgendy; - // update row-spanned cells - if (isset($dom[($dom[$key]['parent'])]['rowspans'])) { - foreach ($dom[($dom[$key]['parent'])]['rowspans'] as $k => $trwsp) { - if (($trwsp['trid'] == $prevtrkey) AND ($trwsp['mrowspan'] >= 0) AND ($trwsp['endpage'] == $dom[$prevtrkey]['endpage'])) { - $dom[($dom[$key]['parent'])]['rowspans'][$k]['endy'] = $pgendy; - $dom[($dom[$key]['parent'])]['rowspans'][$k]['mrowspan'] = -1; - } - } - } - } - $prevtrkey = $trkey; - $table_el = $dom[($dom[$key]['parent'])]; - } - // for each row - if (count($table_el['trids']) > 0) { - unset($xmax); - } - foreach ($table_el['trids'] as $j => $trkey) { - $parent = $dom[$trkey]; - if (!isset($xmax)) { - $xmax = $parent['cellpos'][(count($parent['cellpos']) - 1)]['endx']; - } - // for each cell on the row - foreach ($parent['cellpos'] as $k => $cellpos) { - if (isset($cellpos['rowspanid']) AND ($cellpos['rowspanid'] >= 0)) { - $cellpos['startx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['startx']; - $cellpos['endx'] = $table_el['rowspans'][($cellpos['rowspanid'])]['endx']; - $endy = $table_el['rowspans'][($cellpos['rowspanid'])]['endy']; - $startpage = $table_el['rowspans'][($cellpos['rowspanid'])]['startpage']; - $endpage = $table_el['rowspans'][($cellpos['rowspanid'])]['endpage']; - $startcolumn = $table_el['rowspans'][($cellpos['rowspanid'])]['startcolumn']; - $endcolumn = $table_el['rowspans'][($cellpos['rowspanid'])]['endcolumn']; - } else { - $endy = $parent['endy']; - $startpage = $parent['startpage']; - $endpage = $parent['endpage']; - $startcolumn = $parent['startcolumn']; - $endcolumn = $parent['endcolumn']; - } - if ($this->num_columns == 0) { - $this->num_columns = 1; - } - if (isset($cellpos['border'])) { - $border = $cellpos['border']; - } - if (isset($cellpos['bgcolor']) AND ($cellpos['bgcolor']) !== false) { - $this->setFillColorArray($cellpos['bgcolor']); - $fill = true; - } else { - $fill = false; - } - $x = $cellpos['startx']; - $y = $parent['starty']; - $starty = $y; - $w = abs($cellpos['endx'] - $cellpos['startx']); - // get border modes - $border_start = TCPDF_STATIC::getBorderMode($border, $position='start', $this->opencell); - $border_end = TCPDF_STATIC::getBorderMode($border, $position='end', $this->opencell); - $border_middle = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - // design borders around HTML cells. - for ($page = $startpage; $page <= $endpage; ++$page) { // for each page - $ccode = ''; - $this->setPage($page); - if ($this->num_columns < 2) { - // single-column mode - $this->x = $x; - $this->y = $this->tMargin; - } - // account for margin changes - if ($page > $startpage) { - if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x -= ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - if ($startpage == $endpage) { // single page - $deltacol = 0; - $deltath = 0; - for ($column = $startcolumn; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($startcolumn == $endcolumn) { // single column - $cborder = $border; - $h = $endy - $parent['starty']; - $this->y = $y; - $this->x = $x; - } elseif ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $this->x = $x; - $h = $this->h - $this->y - $this->bMargin; - if ($this->rtl) { - $deltacol = $this->x + $this->rMargin - $this->w; - } else { - $deltacol = $this->x - $this->lMargin; - } - } elseif ($column == $endcolumn) { // end column - $cborder = $border_end; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $endy - $this->y; - } else { // middle column - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $startpage) { // first page - $deltacol = 0; - $deltath = 0; - for ($column = $startcolumn; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $this->x = $x; - $h = $this->h - $this->y - $this->bMargin; - if ($this->rtl) { - $deltacol = $this->x + $this->rMargin - $this->w; - } else { - $deltacol = $this->x - $this->lMargin; - } - } else { // middle column - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $endpage) { // last page - $deltacol = 0; - $deltath = 0; - for ($column = 0; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $endcolumn) { // end column - $cborder = $border_end; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $endy - $this->y; - } else { // middle column - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } else { // middle page - $deltacol = 0; - $deltath = 0; - for ($column = 0; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - $cborder = $border_middle; - if (isset($this->columns[$column]['th']['\''.$page.'\''])) { - $this->y = $this->columns[$column]['th']['\''.$page.'\'']; - } - $this->x += $deltacol; - $h = $this->h - $this->y - $this->bMargin; - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } - if (!empty($cborder) OR !empty($fill)) { - $offsetlen = strlen($ccode); - // draw border and fill - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); - $pagemark = $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; - $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey] += $offsetlen; - } else { - $pagemark = $this->xobjects[$this->xobjid]['intmrk']; - $this->xobjects[$this->xobjid]['intmrk'] += $offsetlen; - } - $pagebuff = $this->xobjects[$this->xobjid]['outdata']; - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; - } else { - // draw border and fill - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = $this->transfmrk[$this->page][$pagemarkkey]; - } elseif ($this->InFooter) { - $pagemark = $this->footerpos[$this->page]; - } else { - $pagemark = $this->intmrk[$this->page]; - } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - } - } - } // end for each page - // restore default border - $border = $default_border; - } // end for each cell on the row - if (isset($table_el['attribute']['cellspacing'])) { - $this->y += $this->getHTMLUnitToUnits($table_el['attribute']['cellspacing'], 1, 'px'); - } elseif (isset($table_el['border-spacing'])) { - $this->y += $table_el['border-spacing']['V']; - } - $this->Ln(0, $cell); - $this->x = $parent['startx']; - if ($endpage > $startpage) { - if (($this->rtl) AND ($this->pagedim[$endpage]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x += ($this->pagedim[$endpage]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$endpage]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$endpage]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - } - if (!$in_table_head) { // we are not inside a thead section - $this->cell_padding = isset($table_el['old_cell_padding']) ? $table_el['old_cell_padding'] : null; - // reset row height - $this->resetLastH(); - if (($this->page == ($this->numpages - 1)) AND ($this->pageopen[$this->numpages])) { - $plendiff = ($this->pagelen[$this->numpages] - $this->emptypagemrk[$this->numpages]); - if (($plendiff > 0) AND ($plendiff < 60)) { - $pagediff = substr($this->getPageBuffer($this->numpages), $this->emptypagemrk[$this->numpages], $plendiff); - if (substr($pagediff, 0, 5) == 'BT /F') { - // the difference is only a font setting - $plendiff = 0; - } - } - if ($plendiff == 0) { - // remove last blank page - $this->deletePage($this->numpages); - } - } - if (isset($this->theadMargins['top'])) { - // restore top margin - $this->tMargin = $this->theadMargins['top']; - } - if (!isset($table_el['attribute']['nested']) OR ($table_el['attribute']['nested'] != 'true')) { - // reset main table header - $this->thead = ''; - $this->theadMargins = array(); - $this->pagedim[$this->page]['tm'] = $this->tMargin; - } - } - $parent = $table_el; - break; - } - case 'a': { - $this->HREF = array(); - break; - } - case 'sup': { - $this->setXY($this->GetX(), $this->GetY() + ((0.7 * $parent['fontsize']) / $this->k)); - break; - } - case 'sub': { - $this->setXY($this->GetX(), $this->GetY() - ((0.3 * $parent['fontsize']) / $this->k)); - break; - } - case 'div': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - case 'blockquote': { - if ($this->rtl) { - $this->rMargin -= $this->listindent; - } else { - $this->lMargin -= $this->listindent; - } - --$this->listindentlevel; - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - case 'p': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - case 'pre': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - $this->premode = false; - break; - } - case 'dl': { - --$this->listnum; - if ($this->listnum <= 0) { - $this->listnum = 0; - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - } else { - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - } - $this->resetLastH(); - break; - } - case 'dt': { - $this->lispacer = ''; - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - break; - } - case 'dd': { - $this->lispacer = ''; - if ($this->rtl) { - $this->rMargin -= $this->listindent; - } else { - $this->lMargin -= $this->listindent; - } - --$this->listindentlevel; - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - break; - } - case 'ul': - case 'ol': { - --$this->listnum; - $this->lispacer = ''; - if ($this->rtl) { - $this->rMargin -= $this->listindent; - } else { - $this->lMargin -= $this->listindent; - } - --$this->listindentlevel; - if ($this->listnum <= 0) { - $this->listnum = 0; - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - } else { - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - } - $this->resetLastH(); - break; - } - case 'li': { - $this->lispacer = ''; - $this->addHTMLVertSpace(0, 0, $cell, false, $lasttag); - break; - } - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': { - $this->addHTMLVertSpace($hbz, $hb, $cell, false, $lasttag); - break; - } - // Form fields (since 4.8.000 - 2009-09-07) - case 'form': { - $this->form_action = ''; - $this->form_enctype = 'application/x-www-form-urlencoded'; - break; - } - default : { - break; - } - } - // draw border and background (if any) - $this->drawHTMLTagBorder($parent, $xmax); - if (isset($dom[($dom[$key]['parent'])]['attribute']['pagebreakafter'])) { - $pba = $dom[($dom[$key]['parent'])]['attribute']['pagebreakafter']; - // check for pagebreak - if (($pba == 'true') OR ($pba == 'left') OR ($pba == 'right')) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - if ((($pba == 'left') AND (((!$this->rtl) AND (($this->page % 2) == 0)) OR (($this->rtl) AND (($this->page % 2) != 0)))) - OR (($pba == 'right') AND (((!$this->rtl) AND (($this->page % 2) != 0)) OR (($this->rtl) AND (($this->page % 2) == 0))))) { - // add a page (or trig AcceptPageBreak() for multicolumn mode) - $this->checkPageBreak($this->PageBreakTrigger + 1); - } - } - $this->tmprtl = false; - return $dom; - } - - /** - * Add vertical spaces if needed. - * @param string $hbz Distance between current y and line bottom. - * @param string $hb The height of the break. - * @param boolean $cell if true add the default left (or right if RTL) padding to each new line (default false). - * @param boolean $firsttag set to true when the tag is the first. - * @param boolean $lasttag set to true when the tag is the last. - * @protected - */ - protected function addHTMLVertSpace($hbz=0, $hb=0, $cell=false, $firsttag=false, $lasttag=false) { - if ($firsttag) { - $this->Ln(0, $cell); - $this->htmlvspace = 0; - return; - } - if ($lasttag) { - $this->Ln($hbz, $cell); - $this->htmlvspace = 0; - return; - } - if ($hb < $this->htmlvspace) { - $hd = 0; - } else { - $hd = $hb - $this->htmlvspace; - $this->htmlvspace = $hb; - } - $this->Ln(($hbz + $hd), $cell); - } - - /** - * Return the starting coordinates to draw an html border - * @return array containing top-left border coordinates - * @protected - * @since 5.7.000 (2010-08-03) - */ - protected function getBorderStartPosition() { - if ($this->rtl) { - $xmax = $this->lMargin; - } else { - $xmax = $this->w - $this->rMargin; - } - return array('page' => $this->page, 'column' => $this->current_column, 'x' => $this->x, 'y' => $this->y, 'xmax' => $xmax); - } - - /** - * Draw an HTML block border and fill - * @param array $tag array of tag properties. - * @param int $xmax end X coordinate for border. - * @protected - * @since 5.7.000 (2010-08-03) - */ - protected function drawHTMLTagBorder($tag, $xmax) { - if (!isset($tag['borderposition'])) { - // nothing to draw - return; - } - $prev_x = $this->x; - $prev_y = $this->y; - $prev_lasth = $this->lasth; - $border = 0; - $fill = false; - $this->lasth = 0; - if (isset($tag['border']) AND !empty($tag['border'])) { - // get border style - $border = $tag['border']; - if (!TCPDF_STATIC::empty_string($this->thead) AND (!$this->inthead)) { - // border for table header - $border = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - } - } - if (isset($tag['bgcolor']) AND ($tag['bgcolor'] !== false)) { - // get background color - $old_bgcolor = $this->bgcolor; - $this->setFillColorArray($tag['bgcolor']); - $fill = true; - } - if (!$border AND !$fill) { - // nothing to draw - return; - } - if (isset($tag['attribute']['cellspacing'])) { - $clsp = $this->getHTMLUnitToUnits($tag['attribute']['cellspacing'], 1, 'px'); - $cellspacing = array('H' => $clsp, 'V' => $clsp); - } elseif (isset($tag['border-spacing'])) { - $cellspacing = $tag['border-spacing']; - } else { - $cellspacing = array('H' => 0, 'V' => 0); - } - if (($tag['value'] != 'table') AND (is_array($border)) AND (!empty($border))) { - // draw the border externally respect the sqare edge. - $border['mode'] = 'ext'; - } - if ($this->rtl) { - if ($xmax >= $tag['borderposition']['x']) { - $xmax = $tag['borderposition']['xmax']; - } - $w = ($tag['borderposition']['x'] - $xmax); - } else { - if ($xmax <= $tag['borderposition']['x']) { - $xmax = $tag['borderposition']['xmax']; - } - $w = ($xmax - $tag['borderposition']['x']); - } - if ($w <= 0) { - return; - } - $w += $cellspacing['H']; - $startpage = $tag['borderposition']['page']; - $startcolumn = $tag['borderposition']['column']; - $x = $tag['borderposition']['x']; - $y = $tag['borderposition']['y']; - $endpage = $this->page; - $starty = $tag['borderposition']['y'] - $cellspacing['V']; - $currentY = $this->y; - $this->x = $x; - // get latest column - $endcolumn = $this->current_column; - if ($this->num_columns == 0) { - $this->num_columns = 1; - } - // get border modes - $border_start = TCPDF_STATIC::getBorderMode($border, $position='start', $this->opencell); - $border_end = TCPDF_STATIC::getBorderMode($border, $position='end', $this->opencell); - $border_middle = TCPDF_STATIC::getBorderMode($border, $position='middle', $this->opencell); - // temporary disable page regions - $temp_page_regions = $this->page_regions; - $this->page_regions = array(); - // design borders around HTML cells. - for ($page = $startpage; $page <= $endpage; ++$page) { // for each page - $ccode = ''; - $this->setPage($page); - if ($this->num_columns < 2) { - // single-column mode - $this->x = $x; - $this->y = $this->tMargin; - } - // account for margin changes - if ($page > $startpage) { - if (($this->rtl) AND ($this->pagedim[$page]['orm'] != $this->pagedim[$startpage]['orm'])) { - $this->x -= ($this->pagedim[$page]['orm'] - $this->pagedim[$startpage]['orm']); - } elseif ((!$this->rtl) AND ($this->pagedim[$page]['olm'] != $this->pagedim[$startpage]['olm'])) { - $this->x += ($this->pagedim[$page]['olm'] - $this->pagedim[$startpage]['olm']); - } - } - if ($startpage == $endpage) { - // single page - for ($column = $startcolumn; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($startcolumn == $endcolumn) { // single column - $cborder = $border; - $h = ($currentY - $y) + $cellspacing['V']; - $this->y = $starty; - } elseif ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $h = $this->h - $this->y - $this->bMargin; - } elseif ($column == $endcolumn) { // end column - $cborder = $border_end; - $h = $currentY - $this->y; - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $startpage) { // first page - for ($column = $startcolumn; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $startcolumn) { // first column - $cborder = $border_start; - $this->y = $starty; - $h = $this->h - $this->y - $this->bMargin; - } else { // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } elseif ($page == $endpage) { // last page - for ($column = 0; $column <= $endcolumn; ++$column) { // for each column - $this->selectColumn($column); - if ($column == $endcolumn) { - // end column - $cborder = $border_end; - $h = $currentY - $this->y; - } else { - // middle column - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - } - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } else { // middle page - for ($column = 0; $column < $this->num_columns; ++$column) { // for each column - $this->selectColumn($column); - $cborder = $border_middle; - $h = $this->h - $this->y - $this->bMargin; - $ccode .= $this->getCellCode($w, $h, '', $cborder, 1, '', $fill, '', 0, true)."\n"; - } // end for each column - } - if ($cborder OR $fill) { - $offsetlen = strlen($ccode); - // draw border and fill - if ($this->inxobj) { - // we are inside an XObject template - if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) { - $pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']); - $pagemark = $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey]; - $this->xobjects[$this->xobjid]['transfmrk'][$pagemarkkey] += $offsetlen; - } else { - $pagemark = $this->xobjects[$this->xobjid]['intmrk']; - $this->xobjects[$this->xobjid]['intmrk'] += $offsetlen; - } - $pagebuff = $this->xobjects[$this->xobjid]['outdata']; - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->xobjects[$this->xobjid]['outdata'] = $pstart.$ccode.$pend; - } else { - if (end($this->transfmrk[$this->page]) !== false) { - $pagemarkkey = key($this->transfmrk[$this->page]); - $pagemark = $this->transfmrk[$this->page][$pagemarkkey]; - } elseif ($this->InFooter) { - $pagemark = $this->footerpos[$this->page]; - } else { - $pagemark = $this->intmrk[$this->page]; - } - $pagebuff = $this->getPageBuffer($this->page); - $pstart = substr($pagebuff, 0, $pagemark); - $pend = substr($pagebuff, $pagemark); - $this->setPageBuffer($this->page, $pstart.$ccode.$pend); - $this->bordermrk[$this->page] += $offsetlen; - $this->cntmrk[$this->page] += $offsetlen; - } - } - } // end for each page - // restore page regions - $this->page_regions = $temp_page_regions; - if (isset($old_bgcolor)) { - // restore background color - $this->setFillColorArray($old_bgcolor); - } - // restore pointer position - $this->x = $prev_x; - $this->y = $prev_y; - $this->lasth = $prev_lasth; - } - - /** - * Set the default bullet to be used as LI bullet symbol - * @param string $symbol character or string to be used (legal values are: '' = automatic, '!' = auto bullet, '#' = auto numbering, 'disc', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek', 'img|type|width|height|image.ext') - * @public - * @since 4.0.028 (2008-09-26) - */ - public function setLIsymbol($symbol='!') { - // check for custom image symbol - if (substr($symbol, 0, 4) == 'img|') { - $this->lisymbol = $symbol; - return; - } - $symbol = strtolower($symbol); - $valid_symbols = array('!', '#', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek'); - if (in_array($symbol, $valid_symbols)) { - $this->lisymbol = $symbol; - } else { - $this->lisymbol = ''; - } - } - - /** - * Set the booklet mode for double-sided pages. - * @param boolean $booklet true set the booklet mode on, false otherwise. - * @param float $inner Inner page margin. - * @param float $outer Outer page margin. - * @public - * @since 4.2.000 (2008-10-29) - */ - public function setBooklet($booklet=true, $inner=-1, $outer=-1) { - $this->booklet = $booklet; - if ($inner >= 0) { - $this->lMargin = $inner; - } - if ($outer >= 0) { - $this->rMargin = $outer; - } - } - - /** - * Swap the left and right margins. - * @param boolean $reverse if true swap left and right margins. - * @protected - * @since 4.2.000 (2008-10-29) - */ - protected function swapMargins($reverse=true) { - if ($reverse) { - // swap left and right margins - $mtemp = $this->original_lMargin; - $this->original_lMargin = $this->original_rMargin; - $this->original_rMargin = $mtemp; - $deltam = $this->original_lMargin - $this->original_rMargin; - $this->lMargin += $deltam; - $this->rMargin -= $deltam; - } - } - - /** - * Set the vertical spaces for HTML tags. - * The array must have the following structure (example): - * $tagvs = array('h1' => array(0 => array('h' => '', 'n' => 2), 1 => array('h' => 1.3, 'n' => 1))); - * The first array level contains the tag names, - * the second level contains 0 for opening tags or 1 for closing tags, - * the third level contains the vertical space unit (h) and the number spaces to add (n). - * If the h parameter is not specified, default values are used. - * @param array $tagvs array of tags and relative vertical spaces. - * @public - * @since 4.2.001 (2008-10-30) - */ - public function setHtmlVSpace($tagvs) { - $this->tagvspaces = $tagvs; - } - - /** - * Set custom width for list indentation. - * @param float $width width of the indentation. Use negative value to disable it. - * @public - * @since 4.2.007 (2008-11-12) - */ - public function setListIndentWidth($width) { - return $this->customlistindent = floatval($width); - } - - /** - * Set the top/bottom cell sides to be open or closed when the cell cross the page. - * @param boolean $isopen if true keeps the top/bottom border open for the cell sides that cross the page. - * @public - * @since 4.2.010 (2008-11-14) - */ - public function setOpenCell($isopen) { - $this->opencell = $isopen; - } - - /** - * Set the color and font style for HTML links. - * @param array $color RGB array of colors - * @param string $fontstyle additional font styles to add - * @public - * @since 4.4.003 (2008-12-09) - */ - public function setHtmlLinksStyle($color=array(0,0,255), $fontstyle='U') { - $this->htmlLinkColorArray = $color; - $this->htmlLinkFontStyle = $fontstyle; - } - - /** - * Convert HTML string containing value and unit of measure to user's units or points. - * @param string $htmlval String containing values and unit. - * @param string $refsize Reference value in points. - * @param string $defaultunit Default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt). - * @param boolean $points If true returns points, otherwise returns value in user's units. - * @return float value in user's unit or point if $points=true - * @public - * @since 4.4.004 (2008-12-10) - */ - public function getHTMLUnitToUnits($htmlval, $refsize=1, $defaultunit='px', $points=false) { - $supportedunits = array('%', 'em', 'ex', 'px', 'in', 'cm', 'mm', 'pc', 'pt'); - $retval = 0; - $value = 0; - $unit = 'px'; - if ($points) { - $k = 1; - } else { - $k = $this->k; - } - if (in_array($defaultunit, $supportedunits)) { - $unit = $defaultunit; - } - if (is_numeric($htmlval)) { - $value = floatval($htmlval); - } elseif (preg_match('/([0-9\.\-\+]+)/', $htmlval, $mnum)) { - $value = floatval($mnum[1]); - if (preg_match('/([a-z%]+)/', $htmlval, $munit)) { - if (in_array($munit[1], $supportedunits)) { - $unit = $munit[1]; - } - } - } - switch ($unit) { - // percentage - case '%': { - $retval = (($value * $refsize) / 100); - break; - } - // relative-size - case 'em': { - $retval = ($value * $refsize); - break; - } - // height of lower case 'x' (about half the font-size) - case 'ex': { - $retval = ($value * ($refsize / 2)); - break; - } - // absolute-size - case 'in': { - $retval = (($value * $this->dpi) / $k); - break; - } - // centimeters - case 'cm': { - $retval = (($value / 2.54 * $this->dpi) / $k); - break; - } - // millimeters - case 'mm': { - $retval = (($value / 25.4 * $this->dpi) / $k); - break; - } - // one pica is 12 points - case 'pc': { - $retval = (($value * 12) / $k); - break; - } - // points - case 'pt': { - $retval = ($value / $k); - break; - } - // pixels - case 'px': { - $retval = $this->pixelsToUnits($value); - if ($points) { - $retval *= $this->k; - } - break; - } - } - return $retval; - } - - /** - * Output an HTML list bullet or ordered item symbol - * @param int $listdepth list nesting level - * @param string $listtype type of list - * @param float $size current font size - * @protected - * @since 4.4.004 (2008-12-10) - */ - protected function putHtmlListBullet($listdepth, $listtype='', $size=10) { - if ($this->state != 2) { - return; - } - $size /= $this->k; - $fill = ''; - $bgcolor = $this->bgcolor; - $color = $this->fgcolor; - $strokecolor = $this->strokecolor; - $width = 0; - $textitem = ''; - $tmpx = $this->x; - $lspace = $this->GetStringWidth(' '); - if ($listtype == '^') { - // special symbol used for avoid justification of rect bullet - $this->lispacer = ''; - return; - } elseif ($listtype == '!') { - // set default list type for unordered list - $deftypes = array('disc', 'circle', 'square'); - $listtype = $deftypes[($listdepth - 1) % 3]; - } elseif ($listtype == '#') { - // set default list type for ordered list - $listtype = 'decimal'; - } elseif (substr($listtype, 0, 4) == 'img|') { - // custom image type ('img|type|width|height|image.ext') - $img = explode('|', $listtype); - $listtype = 'img'; - } - switch ($listtype) { - // unordered types - case 'none': { - break; - } - case 'disc': { - $r = $size / 6; - $lspace += (2 * $r); - if ($this->rtl) { - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $this->Circle(($this->x + $r), ($this->y + ($this->lasth / 2)), $r, 0, 360, 'F', array(), $color, 8); - break; - } - case 'circle': { - $r = $size / 6; - $lspace += (2 * $r); - if ($this->rtl) { - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $prev_line_style = $this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor; - $new_line_style = array('width' => ($r / 3), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'phase' => 0, 'color'=>$color); - $this->Circle(($this->x + $r), ($this->y + ($this->lasth / 2)), ($r * (1 - (1/6))), 0, 360, 'D', $new_line_style, array(), 8); - $this->_out($prev_line_style); // restore line settings - break; - } - case 'square': { - $l = $size / 3; - $lspace += $l; - if ($this->rtl) {; - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $this->Rect($this->x, ($this->y + (($this->lasth - $l) / 2)), $l, $l, 'F', array(), $color); - break; - } - case 'img': { - // 1=>type, 2=>width, 3=>height, 4=>image.ext - $lspace += $img[2]; - if ($this->rtl) {; - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $imgtype = strtolower($img[1]); - $prev_y = $this->y; - switch ($imgtype) { - case 'svg': { - $this->ImageSVG($img[4], $this->x, ($this->y + (($this->lasth - $img[3]) / 2)), $img[2], $img[3], '', 'T', '', 0, false); - break; - } - case 'ai': - case 'eps': { - $this->ImageEps($img[4], $this->x, ($this->y + (($this->lasth - $img[3]) / 2)), $img[2], $img[3], '', true, 'T', '', 0, false); - break; - } - default: { - $this->Image($img[4], $this->x, ($this->y + (($this->lasth - $img[3]) / 2)), $img[2], $img[3], $img[1], '', 'T', false, 300, '', false, false, 0, false, false, false); - break; - } - } - $this->y = $prev_y; - break; - } - // ordered types - // $this->listcount[$this->listnum]; - // $textitem - case '1': - case 'decimal': { - $textitem = $this->listcount[$this->listnum]; - break; - } - case 'decimal-leading-zero': { - $textitem = sprintf('%02d', $this->listcount[$this->listnum]); - break; - } - case 'i': - case 'lower-roman': { - $textitem = strtolower(TCPDF_STATIC::intToRoman($this->listcount[$this->listnum])); - break; - } - case 'I': - case 'upper-roman': { - $textitem = TCPDF_STATIC::intToRoman($this->listcount[$this->listnum]); - break; - } - case 'a': - case 'lower-alpha': - case 'lower-latin': { - $textitem = chr(97 + $this->listcount[$this->listnum] - 1); - break; - } - case 'A': - case 'upper-alpha': - case 'upper-latin': { - $textitem = chr(65 + $this->listcount[$this->listnum] - 1); - break; - } - case 'lower-greek': { - $textitem = TCPDF_FONTS::unichr((945 + $this->listcount[$this->listnum] - 1), $this->isunicode); - break; - } - /* - // Types to be implemented (special handling) - case 'hebrew': { - break; - } - case 'armenian': { - break; - } - case 'georgian': { - break; - } - case 'cjk-ideographic': { - break; - } - case 'hiragana': { - break; - } - case 'katakana': { - break; - } - case 'hiragana-iroha': { - break; - } - case 'katakana-iroha': { - break; - } - */ - default: { - $textitem = $this->listcount[$this->listnum]; - } - } - if (!TCPDF_STATIC::empty_string($textitem)) { - // Check whether we need a new page or new column - $prev_y = $this->y; - $h = $this->getCellHeight($this->FontSize); - if ($this->checkPageBreak($h) OR ($this->y < $prev_y)) { - $tmpx = $this->x; - } - // print ordered item - if ($this->rtl) { - $textitem = '.'.$textitem; - } else { - $textitem = $textitem.'.'; - } - $lspace += $this->GetStringWidth($textitem); - if ($this->rtl) { - $this->x += $lspace; - } else { - $this->x -= $lspace; - } - $this->Write($this->lasth, $textitem, '', false, '', false, 0, false); - } - $this->x = $tmpx; - $this->lispacer = '^'; - // restore colors - $this->setFillColorArray($bgcolor); - $this->setDrawColorArray($strokecolor); - $this->settextColorArray($color); - } - - /** - * Returns current graphic variables as array. - * @return array of graphic variables - * @protected - * @since 4.2.010 (2008-11-14) - */ - protected function getGraphicVars() { - $grapvars = array( - 'FontFamily' => $this->FontFamily, - 'FontStyle' => $this->FontStyle, - 'FontSizePt' => $this->FontSizePt, - 'rMargin' => $this->rMargin, - 'lMargin' => $this->lMargin, - 'cell_padding' => $this->cell_padding, - 'cell_margin' => $this->cell_margin, - 'LineWidth' => $this->LineWidth, - 'linestyleWidth' => $this->linestyleWidth, - 'linestyleCap' => $this->linestyleCap, - 'linestyleJoin' => $this->linestyleJoin, - 'linestyleDash' => $this->linestyleDash, - 'textrendermode' => $this->textrendermode, - 'textstrokewidth' => $this->textstrokewidth, - 'DrawColor' => $this->DrawColor, - 'FillColor' => $this->FillColor, - 'TextColor' => $this->TextColor, - 'ColorFlag' => $this->ColorFlag, - 'bgcolor' => $this->bgcolor, - 'fgcolor' => $this->fgcolor, - 'htmlvspace' => $this->htmlvspace, - 'listindent' => $this->listindent, - 'listindentlevel' => $this->listindentlevel, - 'listnum' => $this->listnum, - 'listordered' => $this->listordered, - 'listcount' => $this->listcount, - 'lispacer' => $this->lispacer, - 'cell_height_ratio' => $this->cell_height_ratio, - 'font_stretching' => $this->font_stretching, - 'font_spacing' => $this->font_spacing, - 'alpha' => $this->alpha, - // extended - 'lasth' => $this->lasth, - 'tMargin' => $this->tMargin, - 'bMargin' => $this->bMargin, - 'AutoPageBreak' => $this->AutoPageBreak, - 'PageBreakTrigger' => $this->PageBreakTrigger, - 'x' => $this->x, - 'y' => $this->y, - 'w' => $this->w, - 'h' => $this->h, - 'wPt' => $this->wPt, - 'hPt' => $this->hPt, - 'fwPt' => $this->fwPt, - 'fhPt' => $this->fhPt, - 'page' => $this->page, - 'current_column' => $this->current_column, - 'num_columns' => $this->num_columns - ); - return $grapvars; - } - - /** - * Set graphic variables. - * @param array $gvars array of graphic variablesto restore - * @param boolean $extended if true restore extended graphic variables - * @protected - * @since 4.2.010 (2008-11-14) - */ - protected function setGraphicVars($gvars, $extended=false) { - if ($this->state != 2) { - return; - } - $this->FontFamily = $gvars['FontFamily']; - $this->FontStyle = $gvars['FontStyle']; - $this->FontSizePt = $gvars['FontSizePt']; - $this->rMargin = $gvars['rMargin']; - $this->lMargin = $gvars['lMargin']; - $this->cell_padding = $gvars['cell_padding']; - $this->cell_margin = $gvars['cell_margin']; - $this->LineWidth = $gvars['LineWidth']; - $this->linestyleWidth = $gvars['linestyleWidth']; - $this->linestyleCap = $gvars['linestyleCap']; - $this->linestyleJoin = $gvars['linestyleJoin']; - $this->linestyleDash = $gvars['linestyleDash']; - $this->textrendermode = $gvars['textrendermode']; - $this->textstrokewidth = $gvars['textstrokewidth']; - $this->DrawColor = $gvars['DrawColor']; - $this->FillColor = $gvars['FillColor']; - $this->TextColor = $gvars['TextColor']; - $this->ColorFlag = $gvars['ColorFlag']; - $this->bgcolor = $gvars['bgcolor']; - $this->fgcolor = $gvars['fgcolor']; - $this->htmlvspace = $gvars['htmlvspace']; - $this->listindent = $gvars['listindent']; - $this->listindentlevel = $gvars['listindentlevel']; - $this->listnum = $gvars['listnum']; - $this->listordered = $gvars['listordered']; - $this->listcount = $gvars['listcount']; - $this->lispacer = $gvars['lispacer']; - $this->cell_height_ratio = $gvars['cell_height_ratio']; - $this->font_stretching = $gvars['font_stretching']; - $this->font_spacing = $gvars['font_spacing']; - $this->alpha = $gvars['alpha']; - if ($extended) { - // restore extended values - $this->lasth = $gvars['lasth']; - $this->tMargin = $gvars['tMargin']; - $this->bMargin = $gvars['bMargin']; - $this->AutoPageBreak = $gvars['AutoPageBreak']; - $this->PageBreakTrigger = $gvars['PageBreakTrigger']; - $this->x = $gvars['x']; - $this->y = $gvars['y']; - $this->w = $gvars['w']; - $this->h = $gvars['h']; - $this->wPt = $gvars['wPt']; - $this->hPt = $gvars['hPt']; - $this->fwPt = $gvars['fwPt']; - $this->fhPt = $gvars['fhPt']; - $this->page = $gvars['page']; - $this->current_column = $gvars['current_column']; - $this->num_columns = $gvars['num_columns']; - } - $this->_out(''.$this->linestyleWidth.' '.$this->linestyleCap.' '.$this->linestyleJoin.' '.$this->linestyleDash.' '.$this->DrawColor.' '.$this->FillColor.''); - if (!TCPDF_STATIC::empty_string($this->FontFamily)) { - $this->setFont($this->FontFamily, $this->FontStyle, $this->FontSizePt); - } - } - - /** - * Outputs the "save graphics state" operator 'q' - * @protected - */ - protected function _outSaveGraphicsState() { - $this->_out('q'); - } - - /** - * Outputs the "restore graphics state" operator 'Q' - * @protected - */ - protected function _outRestoreGraphicsState() { - $this->_out('Q'); - } - - /** - * Set buffer content (always append data). - * @param string $data data - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function setBuffer($data) { - $this->bufferlen += strlen($data); - $this->buffer .= $data; - } - - /** - * Replace the buffer content - * @param string $data data - * @protected - * @since 5.5.000 (2010-06-22) - */ - protected function replaceBuffer($data) { - $this->bufferlen = strlen($data); - $this->buffer = $data; - } - - /** - * Get buffer content. - * @return string buffer content - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function getBuffer() { - return $this->buffer; - } - - /** - * Set page buffer content. - * @param int $page page number - * @param string $data page data - * @param boolean $append if true append data, false replace. - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function setPageBuffer($page, $data, $append=false) { - if ($append) { - $this->pages[$page] .= $data; - } else { - $this->pages[$page] = $data; - } - if ($append AND isset($this->pagelen[$page])) { - $this->pagelen[$page] += strlen($data); - } else { - $this->pagelen[$page] = strlen($data); - } - } - - /** - * Get page buffer content. - * @param int $page page number - * @return string page buffer content or false in case of error - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function getPageBuffer($page) { - if (isset($this->pages[$page])) { - return $this->pages[$page]; - } - return false; - } - - /** - * Set image buffer content. - * @param string $image image key - * @param array $data image data - * @return int image index number - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function setImageBuffer($image, $data) { - if (($data['i'] = array_search($image, $this->imagekeys)) === FALSE) { - $this->imagekeys[$this->numimages] = $image; - $data['i'] = $this->numimages; - ++$this->numimages; - } - $this->images[$image] = $data; - return $data['i']; - } - - /** - * Set image buffer content for a specified sub-key. - * @param string $image image key - * @param string $key image sub-key - * @param array $data image data - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function setImageSubBuffer($image, $key, $data) { - if (!isset($this->images[$image])) { - $this->setImageBuffer($image, array()); - } - $this->images[$image][$key] = $data; - } - - /** - * Get image buffer content. - * @param string $image image key - * @return string|false image buffer content or false in case of error - * @protected - * @since 4.5.000 (2008-12-31) - */ - protected function getImageBuffer($image) { - if (isset($this->images[$image])) { - return $this->images[$image]; - } - return false; - } - - /** - * Set font buffer content. - * @param string $font font key - * @param array $data font data - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function setFontBuffer($font, $data) { - $this->fonts[$font] = $data; - if (!in_array($font, $this->fontkeys)) { - $this->fontkeys[] = $font; - // store object ID for current font - ++$this->n; - $this->font_obj_ids[$font] = $this->n; - $this->setFontSubBuffer($font, 'n', $this->n); - } - } - - /** - * Set font buffer content. - * @param string $font font key - * @param string $key font sub-key - * @param mixed $data font data - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function setFontSubBuffer($font, $key, $data) { - if (!isset($this->fonts[$font])) { - $this->setFontBuffer($font, array()); - } - $this->fonts[$font][$key] = $data; - } - - /** - * Get font buffer content. - * @param string $font font key - * @return string|false font buffer content or false in case of error - * @protected - * @since 4.5.000 (2009-01-02) - */ - protected function getFontBuffer($font) { - if (isset($this->fonts[$font])) { - return $this->fonts[$font]; - } - return false; - } - - /** - * Move a page to a previous position. - * @param int $frompage number of the source page - * @param int $topage number of the destination page (must be less than $frompage) - * @return bool true in case of success, false in case of error. - * @public - * @since 4.5.000 (2009-01-02) - */ - public function movePage($frompage, $topage) { - if (($frompage > $this->numpages) OR ($frompage <= $topage)) { - return false; - } - if ($frompage == $this->page) { - // close the page before moving it - $this->endPage(); - } - // move all page-related states - $tmppage = $this->getPageBuffer($frompage); - $tmppagedim = $this->pagedim[$frompage]; - $tmppagelen = $this->pagelen[$frompage]; - $tmpintmrk = $this->intmrk[$frompage]; - $tmpbordermrk = $this->bordermrk[$frompage]; - $tmpcntmrk = $this->cntmrk[$frompage]; - $tmppageobjects = $this->pageobjects[$frompage]; - if (isset($this->footerpos[$frompage])) { - $tmpfooterpos = $this->footerpos[$frompage]; - } - if (isset($this->footerlen[$frompage])) { - $tmpfooterlen = $this->footerlen[$frompage]; - } - if (isset($this->transfmrk[$frompage])) { - $tmptransfmrk = $this->transfmrk[$frompage]; - } - if (isset($this->PageAnnots[$frompage])) { - $tmpannots = $this->PageAnnots[$frompage]; - } - if (isset($this->newpagegroup) AND !empty($this->newpagegroup)) { - for ($i = $frompage; $i > $topage; --$i) { - if (isset($this->newpagegroup[$i]) AND (($i + $this->pagegroups[$this->newpagegroup[$i]]) > $frompage)) { - --$this->pagegroups[$this->newpagegroup[$i]]; - break; - } - } - for ($i = $topage; $i > 0; --$i) { - if (isset($this->newpagegroup[$i]) AND (($i + $this->pagegroups[$this->newpagegroup[$i]]) > $topage)) { - ++$this->pagegroups[$this->newpagegroup[$i]]; - break; - } - } - } - for ($i = $frompage; $i > $topage; --$i) { - $j = $i - 1; - // shift pages down - $this->setPageBuffer($i, $this->getPageBuffer($j)); - $this->pagedim[$i] = $this->pagedim[$j]; - $this->pagelen[$i] = $this->pagelen[$j]; - $this->intmrk[$i] = $this->intmrk[$j]; - $this->bordermrk[$i] = $this->bordermrk[$j]; - $this->cntmrk[$i] = $this->cntmrk[$j]; - $this->pageobjects[$i] = $this->pageobjects[$j]; - if (isset($this->footerpos[$j])) { - $this->footerpos[$i] = $this->footerpos[$j]; - } elseif (isset($this->footerpos[$i])) { - unset($this->footerpos[$i]); - } - if (isset($this->footerlen[$j])) { - $this->footerlen[$i] = $this->footerlen[$j]; - } elseif (isset($this->footerlen[$i])) { - unset($this->footerlen[$i]); - } - if (isset($this->transfmrk[$j])) { - $this->transfmrk[$i] = $this->transfmrk[$j]; - } elseif (isset($this->transfmrk[$i])) { - unset($this->transfmrk[$i]); - } - if (isset($this->PageAnnots[$j])) { - $this->PageAnnots[$i] = $this->PageAnnots[$j]; - } elseif (isset($this->PageAnnots[$i])) { - unset($this->PageAnnots[$i]); - } - if (isset($this->newpagegroup[$j])) { - $this->newpagegroup[$i] = $this->newpagegroup[$j]; - unset($this->newpagegroup[$j]); - } - if ($this->currpagegroup == $j) { - $this->currpagegroup = $i; - } - } - $this->setPageBuffer($topage, $tmppage); - $this->pagedim[$topage] = $tmppagedim; - $this->pagelen[$topage] = $tmppagelen; - $this->intmrk[$topage] = $tmpintmrk; - $this->bordermrk[$topage] = $tmpbordermrk; - $this->cntmrk[$topage] = $tmpcntmrk; - $this->pageobjects[$topage] = $tmppageobjects; - if (isset($tmpfooterpos)) { - $this->footerpos[$topage] = $tmpfooterpos; - } elseif (isset($this->footerpos[$topage])) { - unset($this->footerpos[$topage]); - } - if (isset($tmpfooterlen)) { - $this->footerlen[$topage] = $tmpfooterlen; - } elseif (isset($this->footerlen[$topage])) { - unset($this->footerlen[$topage]); - } - if (isset($tmptransfmrk)) { - $this->transfmrk[$topage] = $tmptransfmrk; - } elseif (isset($this->transfmrk[$topage])) { - unset($this->transfmrk[$topage]); - } - if (isset($tmpannots)) { - $this->PageAnnots[$topage] = $tmpannots; - } elseif (isset($this->PageAnnots[$topage])) { - unset($this->PageAnnots[$topage]); - } - // adjust outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if (!$outline['f']) { - if (($outline['p'] >= $topage) AND ($outline['p'] < $frompage)) { - $this->outlines[$key]['p'] = ($outline['p'] + 1); - } elseif ($outline['p'] == $frompage) { - $this->outlines[$key]['p'] = $topage; - } - } - } - // adjust dests - $tmpdests = $this->dests; - foreach ($tmpdests as $key => $dest) { - if (!$dest['f']) { - if (($dest['p'] >= $topage) AND ($dest['p'] < $frompage)) { - $this->dests[$key]['p'] = ($dest['p'] + 1); - } elseif ($dest['p'] == $frompage) { - $this->dests[$key]['p'] = $topage; - } - } - } - // adjust links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if (!$link['f']) { - if (($link['p'] >= $topage) AND ($link['p'] < $frompage)) { - $this->links[$key]['p'] = ($link['p'] + 1); - } elseif ($link['p'] == $frompage) { - $this->links[$key]['p'] = $topage; - } - } - } - // adjust javascript - $jfrompage = $frompage; - $jtopage = $topage; - if (preg_match_all('/this\.addField\(\'([^\']*)\',\'([^\']*)\',([0-9]+)/', $this->javascript, $pamatch) > 0) { - foreach($pamatch[0] as $pk => $pmatch) { - $pagenum = intval($pamatch[3][$pk]) + 1; - if (($pagenum >= $jtopage) AND ($pagenum < $jfrompage)) { - $newpage = ($pagenum + 1); - } elseif ($pagenum == $jfrompage) { - $newpage = $jtopage; - } else { - $newpage = $pagenum; - } - --$newpage; - $newjs = "this.addField(\'".$pamatch[1][$pk]."\',\'".$pamatch[2][$pk]."\',".$newpage; - $this->javascript = str_replace($pmatch, $newjs, $this->javascript); - } - unset($pamatch); - } - // return to last page - $this->lastPage(true); - return true; - } - - /** - * Remove the specified page. - * @param int $page page to remove - * @return bool true in case of success, false in case of error. - * @public - * @since 4.6.004 (2009-04-23) - */ - public function deletePage($page) { - if (($page < 1) OR ($page > $this->numpages)) { - return false; - } - // delete current page - unset($this->pages[$page]); - unset($this->pagedim[$page]); - unset($this->pagelen[$page]); - unset($this->intmrk[$page]); - unset($this->bordermrk[$page]); - unset($this->cntmrk[$page]); - foreach ($this->pageobjects[$page] as $oid) { - if (isset($this->offsets[$oid])){ - unset($this->offsets[$oid]); - } - } - unset($this->pageobjects[$page]); - if (isset($this->footerpos[$page])) { - unset($this->footerpos[$page]); - } - if (isset($this->footerlen[$page])) { - unset($this->footerlen[$page]); - } - if (isset($this->transfmrk[$page])) { - unset($this->transfmrk[$page]); - } - if (isset($this->PageAnnots[$page])) { - unset($this->PageAnnots[$page]); - } - if (isset($this->newpagegroup) AND !empty($this->newpagegroup)) { - for ($i = $page; $i > 0; --$i) { - if (isset($this->newpagegroup[$i]) AND (($i + $this->pagegroups[$this->newpagegroup[$i]]) > $page)) { - --$this->pagegroups[$this->newpagegroup[$i]]; - break; - } - } - } - if (isset($this->pageopen[$page])) { - unset($this->pageopen[$page]); - } - if ($page < $this->numpages) { - // update remaining pages - for ($i = $page; $i < $this->numpages; ++$i) { - $j = $i + 1; - // shift pages - $this->setPageBuffer($i, $this->getPageBuffer($j)); - $this->pagedim[$i] = $this->pagedim[$j]; - $this->pagelen[$i] = $this->pagelen[$j]; - $this->intmrk[$i] = $this->intmrk[$j]; - $this->bordermrk[$i] = $this->bordermrk[$j]; - $this->cntmrk[$i] = $this->cntmrk[$j]; - $this->pageobjects[$i] = $this->pageobjects[$j]; - if (isset($this->footerpos[$j])) { - $this->footerpos[$i] = $this->footerpos[$j]; - } elseif (isset($this->footerpos[$i])) { - unset($this->footerpos[$i]); - } - if (isset($this->footerlen[$j])) { - $this->footerlen[$i] = $this->footerlen[$j]; - } elseif (isset($this->footerlen[$i])) { - unset($this->footerlen[$i]); - } - if (isset($this->transfmrk[$j])) { - $this->transfmrk[$i] = $this->transfmrk[$j]; - } elseif (isset($this->transfmrk[$i])) { - unset($this->transfmrk[$i]); - } - if (isset($this->PageAnnots[$j])) { - $this->PageAnnots[$i] = $this->PageAnnots[$j]; - } elseif (isset($this->PageAnnots[$i])) { - unset($this->PageAnnots[$i]); - } - if (isset($this->newpagegroup[$j])) { - $this->newpagegroup[$i] = $this->newpagegroup[$j]; - unset($this->newpagegroup[$j]); - } - if ($this->currpagegroup == $j) { - $this->currpagegroup = $i; - } - if (isset($this->pageopen[$j])) { - $this->pageopen[$i] = $this->pageopen[$j]; - } elseif (isset($this->pageopen[$i])) { - unset($this->pageopen[$i]); - } - } - // remove last page - unset($this->pages[$this->numpages]); - unset($this->pagedim[$this->numpages]); - unset($this->pagelen[$this->numpages]); - unset($this->intmrk[$this->numpages]); - unset($this->bordermrk[$this->numpages]); - unset($this->cntmrk[$this->numpages]); - foreach ($this->pageobjects[$this->numpages] as $oid) { - if (isset($this->offsets[$oid])){ - unset($this->offsets[$oid]); - } - } - unset($this->pageobjects[$this->numpages]); - if (isset($this->footerpos[$this->numpages])) { - unset($this->footerpos[$this->numpages]); - } - if (isset($this->footerlen[$this->numpages])) { - unset($this->footerlen[$this->numpages]); - } - if (isset($this->transfmrk[$this->numpages])) { - unset($this->transfmrk[$this->numpages]); - } - if (isset($this->PageAnnots[$this->numpages])) { - unset($this->PageAnnots[$this->numpages]); - } - if (isset($this->newpagegroup[$this->numpages])) { - unset($this->newpagegroup[$this->numpages]); - } - if ($this->currpagegroup == $this->numpages) { - $this->currpagegroup = ($this->numpages - 1); - } - if (isset($this->pagegroups[$this->numpages])) { - unset($this->pagegroups[$this->numpages]); - } - if (isset($this->pageopen[$this->numpages])) { - unset($this->pageopen[$this->numpages]); - } - } - --$this->numpages; - $this->page = $this->numpages; - // adjust outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if (!$outline['f']) { - if ($outline['p'] > $page) { - $this->outlines[$key]['p'] = $outline['p'] - 1; - } elseif ($outline['p'] == $page) { - unset($this->outlines[$key]); - } - } - } - // adjust dests - $tmpdests = $this->dests; - foreach ($tmpdests as $key => $dest) { - if (!$dest['f']) { - if ($dest['p'] > $page) { - $this->dests[$key]['p'] = $dest['p'] - 1; - } elseif ($dest['p'] == $page) { - unset($this->dests[$key]); - } - } - } - // adjust links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if (!$link['f']) { - if ($link['p'] > $page) { - $this->links[$key]['p'] = $link['p'] - 1; - } elseif ($link['p'] == $page) { - unset($this->links[$key]); - } - } - } - // adjust javascript - $jpage = $page; - if (preg_match_all('/this\.addField\(\'([^\']*)\',\'([^\']*)\',([0-9]+)/', $this->javascript, $pamatch) > 0) { - foreach($pamatch[0] as $pk => $pmatch) { - $pagenum = intval($pamatch[3][$pk]) + 1; - if ($pagenum >= $jpage) { - $newpage = ($pagenum - 1); - } elseif ($pagenum == $jpage) { - $newpage = 1; - } else { - $newpage = $pagenum; - } - --$newpage; - $newjs = "this.addField(\'".$pamatch[1][$pk]."\',\'".$pamatch[2][$pk]."\',".$newpage; - $this->javascript = str_replace($pmatch, $newjs, $this->javascript); - } - unset($pamatch); - } - // return to last page - if ($this->numpages > 0) { - $this->lastPage(true); - } - return true; - } - - /** - * Clone the specified page to a new page. - * @param int $page number of page to copy (0 = current page) - * @return bool true in case of success, false in case of error. - * @public - * @since 4.9.015 (2010-04-20) - */ - public function copyPage($page=0) { - if ($page == 0) { - // default value - $page = $this->page; - } - if (($page < 1) OR ($page > $this->numpages)) { - return false; - } - // close the last page - $this->endPage(); - // copy all page-related states - ++$this->numpages; - $this->page = $this->numpages; - $this->setPageBuffer($this->page, $this->getPageBuffer($page)); - $this->pagedim[$this->page] = $this->pagedim[$page]; - $this->pagelen[$this->page] = $this->pagelen[$page]; - $this->intmrk[$this->page] = $this->intmrk[$page]; - $this->bordermrk[$this->page] = $this->bordermrk[$page]; - $this->cntmrk[$this->page] = $this->cntmrk[$page]; - $this->pageobjects[$this->page] = $this->pageobjects[$page]; - $this->pageopen[$this->page] = false; - if (isset($this->footerpos[$page])) { - $this->footerpos[$this->page] = $this->footerpos[$page]; - } - if (isset($this->footerlen[$page])) { - $this->footerlen[$this->page] = $this->footerlen[$page]; - } - if (isset($this->transfmrk[$page])) { - $this->transfmrk[$this->page] = $this->transfmrk[$page]; - } - if (isset($this->PageAnnots[$page])) { - $this->PageAnnots[$this->page] = $this->PageAnnots[$page]; - } - if (isset($this->newpagegroup[$page])) { - // start a new group - $this->newpagegroup[$this->page] = sizeof($this->newpagegroup) + 1; - $this->currpagegroup = $this->newpagegroup[$this->page]; - $this->pagegroups[$this->currpagegroup] = 1; - } elseif (isset($this->currpagegroup) AND ($this->currpagegroup > 0)) { - ++$this->pagegroups[$this->currpagegroup]; - } - // copy outlines - $tmpoutlines = $this->outlines; - foreach ($tmpoutlines as $key => $outline) { - if ($outline['p'] == $page) { - $this->outlines[] = array('t' => $outline['t'], 'l' => $outline['l'], 'x' => $outline['x'], 'y' => $outline['y'], 'p' => $this->page, 'f' => $outline['f'], 's' => $outline['s'], 'c' => $outline['c']); - } - } - // copy links - $tmplinks = $this->links; - foreach ($tmplinks as $key => $link) { - if ($link['p'] == $page) { - $this->links[] = array('p' => $this->page, 'y' => $link['y'], 'f' => $link['f']); - } - } - // return to last page - $this->lastPage(true); - return true; - } - - /** - * Output a Table of Content Index (TOC). - * This method must be called after all Bookmarks were set. - * Before calling this method you have to open the page using the addTOCPage() method. - * After calling this method you have to call endTOCPage() to close the TOC page. - * You can override this method to achieve different styles. - * @param int|null $page page number where this TOC should be inserted (leave empty for current page). - * @param string $numbersfont set the font for page numbers (please use monospaced font for better alignment). - * @param string $filler string used to fill the space between text and page number. - * @param string $toc_name name to use for TOC bookmark. - * @param string $style Font style for title: B = Bold, I = Italic, BI = Bold + Italic. - * @param array $color RGB color array for bookmark title (values from 0 to 255). - * @public - * @author Nicola Asuni - * @since 4.5.000 (2009-01-02) - * @see addTOCPage(), endTOCPage(), addHTMLTOC() - */ - public function addTOC($page=null, $numbersfont='', $filler='.', $toc_name='TOC', $style='', $color=array(0,0,0)) { - $fontsize = $this->FontSizePt; - $fontfamily = $this->FontFamily; - $fontstyle = $this->FontStyle; - $w = $this->w - $this->lMargin - $this->rMargin; - $spacer = $this->GetStringWidth(chr(32)) * 4; - $lmargin = $this->lMargin; - $rmargin = $this->rMargin; - $x_start = $this->GetX(); - $page_first = $this->page; - $current_page = $this->page; - $page_fill_start = false; - $page_fill_end = false; - $current_column = $this->current_column; - if (TCPDF_STATIC::empty_string($numbersfont)) { - $numbersfont = $this->default_monospaced_font; - } - if (TCPDF_STATIC::empty_string($filler)) { - $filler = ' '; - } - if (TCPDF_STATIC::empty_string($page)) { - $gap = ' '; - } else { - $gap = ''; - if ($page < 1) { - $page = 1; - } - } - $this->setFont($numbersfont, $fontstyle, $fontsize); - $numwidth = $this->GetStringWidth('00000'); - $maxpage = 0; //used for pages on attached documents - foreach ($this->outlines as $key => $outline) { - // check for extra pages (used for attachments) - if (($this->page > $page_first) AND ($outline['p'] >= $this->numpages)) { - $outline['p'] += ($this->page - $page_first); - } - if ($this->rtl) { - $aligntext = 'R'; - $alignnum = 'L'; - } else { - $aligntext = 'L'; - $alignnum = 'R'; - } - if ($outline['l'] == 0) { - $this->setFont($fontfamily, $outline['s'].'B', $fontsize); - } else { - $this->setFont($fontfamily, $outline['s'], $fontsize - $outline['l']); - } - $this->setTextColorArray($outline['c']); - // check for page break - $this->checkPageBreak(2 * $this->getCellHeight($this->FontSize)); - // set margins and X position - if (($this->page == $current_page) AND ($this->current_column == $current_column)) { - $this->lMargin = $lmargin; - $this->rMargin = $rmargin; - } else { - if ($this->current_column != $current_column) { - if ($this->rtl) { - $x_start = $this->w - $this->columns[$this->current_column]['x']; - } else { - $x_start = $this->columns[$this->current_column]['x']; - } - } - $lmargin = $this->lMargin; - $rmargin = $this->rMargin; - $current_page = $this->page; - $current_column = $this->current_column; - } - $this->setX($x_start); - $indent = ($spacer * $outline['l']); - if ($this->rtl) { - $this->x -= $indent; - $this->rMargin = $this->w - $this->x; - } else { - $this->x += $indent; - $this->lMargin = $this->x; - } - $link = $this->AddLink(); - $this->setLink($link, $outline['y'], $outline['p']); - // write the text - if ($this->rtl) { - $txt = ' '.$outline['t']; - } else { - $txt = $outline['t'].' '; - } - $this->Write(0, $txt, $link, false, $aligntext, false, 0, false, false, 0, $numwidth, ''); - if ($this->rtl) { - $tw = $this->x - $this->lMargin; - } else { - $tw = $this->w - $this->rMargin - $this->x; - } - $this->setFont($numbersfont, $fontstyle, $fontsize); - if (TCPDF_STATIC::empty_string($page)) { - $pagenum = $outline['p']; - } else { - // placemark to be replaced with the correct number - $pagenum = '{#'.($outline['p']).'}'; - if ($this->isUnicodeFont()) { - $pagenum = '{'.$pagenum.'}'; - } - $maxpage = max($maxpage, $outline['p']); - } - $fw = ($tw - $this->GetStringWidth($pagenum.$filler)); - $wfiller = $this->GetStringWidth($filler); - if ($wfiller > 0) { - $numfills = floor($fw / $wfiller); - } else { - $numfills = 0; - } - if ($numfills > 0) { - $rowfill = str_repeat($filler, $numfills); - } else { - $rowfill = ''; - } - if ($this->rtl) { - $pagenum = $pagenum.$gap.$rowfill; - } else { - $pagenum = $rowfill.$gap.$pagenum; - } - // write the number - $this->Cell($tw, 0, $pagenum, 0, 1, $alignnum, 0, $link, 0); - } - $page_last = $this->getPage(); - $numpages = ($page_last - $page_first + 1); - // account for booklet mode - if ($this->booklet) { - // check if a blank page is required before TOC - $page_fill_start = ((($page_first % 2) == 0) XOR (($page % 2) == 0)); - $page_fill_end = (!((($numpages % 2) == 0) XOR ($page_fill_start))); - if ($page_fill_start) { - // add a page at the end (to be moved before TOC) - $this->addPage(); - ++$page_last; - ++$numpages; - } - if ($page_fill_end) { - // add a page at the end - $this->addPage(); - ++$page_last; - ++$numpages; - } - } - $maxpage = max($maxpage, $page_last); - if (!TCPDF_STATIC::empty_string($page)) { - for ($p = $page_first; $p <= $page_last; ++$p) { - // get page data - $temppage = $this->getPageBuffer($p); - for ($n = 1; $n <= $maxpage; ++$n) { - // update page numbers - $a = '{#'.$n.'}'; - // get page number aliases - $pnalias = $this->getInternalPageNumberAliases($a); - // calculate replacement number - if (($n >= $page) AND ($n <= $this->numpages)) { - $np = $n + $numpages; - } else { - $np = $n; - } - $na = TCPDF_STATIC::formatTOCPageNumber(($this->starting_page_number + $np - 1)); - $nu = TCPDF_FONTS::UTF8ToUTF16BE($na, false, $this->isunicode, $this->CurrentFont); - // replace aliases with numbers - foreach ($pnalias['u'] as $u) { - $sfill = str_repeat($filler, max(0, (strlen($u) - strlen($nu.' ')))); - if ($this->rtl) { - $nr = $nu.TCPDF_FONTS::UTF8ToUTF16BE(' '.$sfill, false, $this->isunicode, $this->CurrentFont); - } else { - $nr = TCPDF_FONTS::UTF8ToUTF16BE($sfill.' ', false, $this->isunicode, $this->CurrentFont).$nu; - } - $temppage = str_replace($u, $nr, $temppage); - } - foreach ($pnalias['a'] as $a) { - $sfill = str_repeat($filler, max(0, (strlen($a) - strlen($na.' ')))); - if ($this->rtl) { - $nr = $na.' '.$sfill; - } else { - $nr = $sfill.' '.$na; - } - $temppage = str_replace($a, $nr, $temppage); - } - } - // save changes - $this->setPageBuffer($p, $temppage); - } - // move pages - $this->Bookmark($toc_name, 0, 0, $page_first, $style, $color); - if ($page_fill_start) { - $this->movePage($page_last, $page_first); - } - for ($i = 0; $i < $numpages; ++$i) { - $this->movePage($page_last, $page); - } - } - } - - /** - * Output a Table Of Content Index (TOC) using HTML templates. - * This method must be called after all Bookmarks were set. - * Before calling this method you have to open the page using the addTOCPage() method. - * After calling this method you have to call endTOCPage() to close the TOC page. - * @param int|null $page page number where this TOC should be inserted (leave empty for current page). - * @param string $toc_name name to use for TOC bookmark. - * @param array $templates array of html templates. Use: "#TOC_DESCRIPTION#" for bookmark title, "#TOC_PAGE_NUMBER#" for page number. - * @param boolean $correct_align if true correct the number alignment (numbers must be in monospaced font like courier and right aligned on LTR, or left aligned on RTL) - * @param string $style Font style for title: B = Bold, I = Italic, BI = Bold + Italic. - * @param array $color RGB color array for title (values from 0 to 255). - * @public - * @author Nicola Asuni - * @since 5.0.001 (2010-05-06) - * @see addTOCPage(), endTOCPage(), addTOC() - */ - public function addHTMLTOC($page=null, $toc_name='TOC', $templates=array(), $correct_align=true, $style='', $color=array(0,0,0)) { - $filler = ' '; - $prev_htmlLinkColorArray = $this->htmlLinkColorArray; - $prev_htmlLinkFontStyle = $this->htmlLinkFontStyle; - // set new style for link - $this->htmlLinkColorArray = array(); - $this->htmlLinkFontStyle = ''; - $page_first = $this->getPage(); - $page_fill_start = false; - $page_fill_end = false; - // get the font type used for numbers in each template - $current_font = $this->FontFamily; - foreach ($templates as $level => $html) { - $dom = $this->getHtmlDomArray($html); - foreach ($dom as $key => $value) { - if ($value['value'] == '#TOC_PAGE_NUMBER#') { - $this->setFont($dom[($key - 1)]['fontname']); - $templates['F'.$level] = $this->isUnicodeFont(); - } - } - } - $this->setFont($current_font); - $maxpage = 0; //used for pages on attached documents - foreach ($this->outlines as $key => $outline) { - // get HTML template - $row = $templates[$outline['l']]; - if (TCPDF_STATIC::empty_string($page)) { - $pagenum = $outline['p']; - } else { - // placemark to be replaced with the correct number - $pagenum = '{#'.($outline['p']).'}'; - if (isset($templates['F'.$outline['l']]) && $templates['F'.$outline['l']]) { - $pagenum = '{'.$pagenum.'}'; - } - $maxpage = max($maxpage, $outline['p']); - } - // replace templates with current values - $row = str_replace('#TOC_DESCRIPTION#', $outline['t'], $row); - $row = str_replace('#TOC_PAGE_NUMBER#', $pagenum, $row); - // add link to page - $row = ''.$row.''; - // write bookmark entry - $this->writeHTML($row, false, false, true, false, ''); - } - // restore link styles - $this->htmlLinkColorArray = $prev_htmlLinkColorArray; - $this->htmlLinkFontStyle = $prev_htmlLinkFontStyle; - // move TOC page and replace numbers - $page_last = $this->getPage(); - $numpages = ($page_last - $page_first + 1); - // account for booklet mode - if ($this->booklet) { - // check if a blank page is required before TOC - $page_fill_start = ((($page_first % 2) == 0) XOR (($page % 2) == 0)); - $page_fill_end = (!((($numpages % 2) == 0) XOR ($page_fill_start))); - if ($page_fill_start) { - // add a page at the end (to be moved before TOC) - $this->addPage(); - ++$page_last; - ++$numpages; - } - if ($page_fill_end) { - // add a page at the end - $this->addPage(); - ++$page_last; - ++$numpages; - } - } - $maxpage = max($maxpage, $page_last); - if (!TCPDF_STATIC::empty_string($page)) { - for ($p = $page_first; $p <= $page_last; ++$p) { - // get page data - $temppage = $this->getPageBuffer($p); - for ($n = 1; $n <= $maxpage; ++$n) { - // update page numbers - $a = '{#'.$n.'}'; - // get page number aliases - $pnalias = $this->getInternalPageNumberAliases($a); - // calculate replacement number - if ($n >= $page) { - $np = $n + $numpages; - } else { - $np = $n; - } - $na = TCPDF_STATIC::formatTOCPageNumber(($this->starting_page_number + $np - 1)); - $nu = TCPDF_FONTS::UTF8ToUTF16BE($na, false, $this->isunicode, $this->CurrentFont); - // replace aliases with numbers - foreach ($pnalias['u'] as $u) { - if ($correct_align) { - $sfill = str_repeat($filler, (strlen($u) - strlen($nu.' '))); - if ($this->rtl) { - $nr = $nu.TCPDF_FONTS::UTF8ToUTF16BE(' '.$sfill, false, $this->isunicode, $this->CurrentFont); - } else { - $nr = TCPDF_FONTS::UTF8ToUTF16BE($sfill.' ', false, $this->isunicode, $this->CurrentFont).$nu; - } - } else { - $nr = $nu; - } - $temppage = str_replace($u, $nr, $temppage); - } - foreach ($pnalias['a'] as $a) { - if ($correct_align) { - $sfill = str_repeat($filler, (strlen($a) - strlen($na.' '))); - if ($this->rtl) { - $nr = $na.' '.$sfill; - } else { - $nr = $sfill.' '.$na; - } - } else { - $nr = $na; - } - $temppage = str_replace($a, $nr, $temppage); - } - } - // save changes - $this->setPageBuffer($p, $temppage); - } - // move pages - $this->Bookmark($toc_name, 0, 0, $page_first, $style, $color); - if ($page_fill_start) { - $this->movePage($page_last, $page_first); - } - for ($i = 0; $i < $numpages; ++$i) { - $this->movePage($page_last, $page); - } - } - } - - /** - * Stores a copy of the current TCPDF object used for undo operation. - * @public - * @since 4.5.029 (2009-03-19) - */ - public function startTransaction() { - if (isset($this->objcopy)) { - // remove previous copy - $this->commitTransaction(); - } - // record current page number and Y position - $this->start_transaction_page = $this->page; - $this->start_transaction_y = $this->y; - // clone current object - $this->objcopy = TCPDF_STATIC::objclone($this); - } - - /** - * Delete the copy of the current TCPDF object used for undo operation. - * @public - * @since 4.5.029 (2009-03-19) - */ - public function commitTransaction() { - if (isset($this->objcopy)) { - $this->objcopy->_destroy(true, true); - /* The unique file_id should not be used during cleanup again */ - $this->objcopy->file_id = NULL; - unset($this->objcopy); - } - } - - /** - * This method allows to undo the latest transaction by returning the latest saved TCPDF object with startTransaction(). - * @param boolean $self if true restores current class object to previous state without the need of reassignment via the returned value. - * @return TCPDF object. - * @public - * @since 4.5.029 (2009-03-19) - */ - public function rollbackTransaction($self=false) { - if (isset($this->objcopy)) { - $objcopy = $this->objcopy; - $this->_destroy(true, true); - if ($self) { - $objvars = get_object_vars($objcopy); - foreach ($objvars as $key => $value) { - $this->$key = $value; - } - $objcopy->_destroy(true, true); - /* The unique file_id should not be used during cleanup again */ - $objcopy->file_id = NULL; - unset($objcopy); - return $this; - } - /* The unique file_id should not be used during cleanup again */ - $this->file_id = NULL; - return $objcopy; - } - return $this; - } - - // --- MULTI COLUMNS METHODS ----------------------- - - /** - * Set multiple columns of the same size - * @param int $numcols number of columns (set to zero to disable columns mode) - * @param int $width column width - * @param int|null $y column starting Y position (leave empty for current Y position) - * @public - * @since 4.9.001 (2010-03-28) - */ - public function setEqualColumns($numcols=0, $width=0, $y=null) { - $this->columns = array(); - if ($numcols < 2) { - $numcols = 0; - $this->columns = array(); - } else { - // maximum column width - $maxwidth = ($this->w - $this->original_lMargin - $this->original_rMargin) / $numcols; - if (($width == 0) OR ($width > $maxwidth)) { - $width = $maxwidth; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // space between columns - $space = (($this->w - $this->original_lMargin - $this->original_rMargin - ($numcols * $width)) / ($numcols - 1)); - // fill the columns array (with, space, starting Y position) - for ($i = 0; $i < $numcols; ++$i) { - $this->columns[$i] = array('w' => $width, 's' => $space, 'y' => $y); - } - } - $this->num_columns = $numcols; - $this->current_column = 0; - $this->column_start_page = $this->page; - $this->selectColumn(0); - } - - /** - * Remove columns and reset page margins. - * @public - * @since 5.9.072 (2011-04-26) - */ - public function resetColumns() { - $this->lMargin = $this->original_lMargin; - $this->rMargin = $this->original_rMargin; - $this->setEqualColumns(); - } - - /** - * Set columns array. - * Each column is represented by an array of arrays with the following keys: (w = width, s = space between columns, y = column top position). - * @param array $columns - * @public - * @since 4.9.001 (2010-03-28) - */ - public function setColumnsArray($columns) { - $this->columns = $columns; - $this->num_columns = count($columns); - $this->current_column = 0; - $this->column_start_page = $this->page; - $this->selectColumn(0); - } - - /** - * Set position at a given column - * @param int|null $col column number (from 0 to getNumberOfColumns()-1); empty string = current column. - * @public - * @since 4.9.001 (2010-03-28) - */ - public function selectColumn($col=null) { - if (TCPDF_STATIC::empty_string($col)) { - $col = $this->current_column; - } elseif ($col >= $this->num_columns) { - $col = 0; - } - $xshift = array('x' => 0, 's' => array('H' => 0, 'V' => 0), 'p' => array('L' => 0, 'T' => 0, 'R' => 0, 'B' => 0)); - $enable_thead = false; - if ($this->num_columns > 1) { - if ($col != $this->current_column) { - // move Y pointer at the top of the column - if ($this->column_start_page == $this->page) { - $this->y = $this->columns[$col]['y']; - } else { - $this->y = $this->tMargin; - } - // Avoid to write table headers more than once - if (($this->page > $this->maxselcol['page']) OR (($this->page == $this->maxselcol['page']) AND ($col > $this->maxselcol['column']))) { - $enable_thead = true; - $this->maxselcol['page'] = $this->page; - $this->maxselcol['column'] = $col; - } - } - $xshift = $this->colxshift; - // set X position of the current column by case - $listindent = ($this->listindentlevel * $this->listindent); - // calculate column X position - $colpos = 0; - for ($i = 0; $i < $col; ++$i) { - $colpos += ($this->columns[$i]['w'] + $this->columns[$i]['s']); - } - if ($this->rtl) { - $x = $this->w - $this->original_rMargin - $colpos; - $this->rMargin = ($this->w - $x + $listindent); - $this->lMargin = ($x - $this->columns[$col]['w']); - $this->x = $x - $listindent; - } else { - $x = $this->original_lMargin + $colpos; - $this->lMargin = ($x + $listindent); - $this->rMargin = ($this->w - $x - $this->columns[$col]['w']); - $this->x = $x + $listindent; - } - $this->columns[$col]['x'] = $x; - } - $this->current_column = $col; - // fix for HTML mode - $this->newline = true; - // print HTML table header (if any) - if ((!TCPDF_STATIC::empty_string($this->thead)) AND (!$this->inthead)) { - if ($enable_thead) { - // print table header - $this->writeHTML($this->thead, false, false, false, false, ''); - $this->y += $xshift['s']['V']; - // store end of header position - if (!isset($this->columns[$col]['th'])) { - $this->columns[$col]['th'] = array(); - } - $this->columns[$col]['th']['\''.$this->page.'\''] = $this->y; - $this->lasth = 0; - } elseif (isset($this->columns[$col]['th']['\''.$this->page.'\''])) { - $this->y = $this->columns[$col]['th']['\''.$this->page.'\'']; - } - } - // account for an html table cell over multiple columns - if ($this->rtl) { - $this->rMargin += $xshift['x']; - $this->x -= ($xshift['x'] + $xshift['p']['R']); - } else { - $this->lMargin += $xshift['x']; - $this->x += $xshift['x'] + $xshift['p']['L']; - } - } - - /** - * Return the current column number - * @return int current column number - * @public - * @since 5.5.011 (2010-07-08) - */ - public function getColumn() { - return $this->current_column; - } - - /** - * Return the current number of columns. - * @return int number of columns - * @public - * @since 5.8.018 (2010-08-25) - */ - public function getNumberOfColumns() { - return $this->num_columns; - } - - /** - * Set Text rendering mode. - * @param int $stroke outline size in user units (0 = disable). - * @param boolean $fill if true fills the text (default). - * @param boolean $clip if true activate clipping mode - * @public - * @since 4.9.008 (2009-04-02) - */ - public function setTextRenderingMode($stroke=0, $fill=true, $clip=false) { - // Ref.: PDF 32000-1:2008 - 9.3.6 Text Rendering Mode - // convert text rendering parameters - if ($stroke < 0) { - $stroke = 0; - } - if ($fill === true) { - if ($stroke > 0) { - if ($clip === true) { - // Fill, then stroke text and add to path for clipping - $textrendermode = 6; - } else { - // Fill, then stroke text - $textrendermode = 2; - } - $textstrokewidth = $stroke; - } else { - if ($clip === true) { - // Fill text and add to path for clipping - $textrendermode = 4; - } else { - // Fill text - $textrendermode = 0; - } - } - } else { - if ($stroke > 0) { - if ($clip === true) { - // Stroke text and add to path for clipping - $textrendermode = 5; - } else { - // Stroke text - $textrendermode = 1; - } - $textstrokewidth = $stroke; - } else { - if ($clip === true) { - // Add text to path for clipping - $textrendermode = 7; - } else { - // Neither fill nor stroke text (invisible) - $textrendermode = 3; - } - } - } - $this->textrendermode = $textrendermode; - $this->textstrokewidth = $stroke; - } - - /** - * Set parameters for drop shadow effect for text. - * @param array $params Array of parameters: enabled (boolean) set to true to enable shadow; depth_w (float) shadow width in user units; depth_h (float) shadow height in user units; color (array) shadow color or false to use the stroke color; opacity (float) Alpha value: real value from 0 (transparent) to 1 (opaque); blend_mode (string) blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity. - * @since 5.9.174 (2012-07-25) - * @public - */ - public function setTextShadow($params=array('enabled'=>false, 'depth_w'=>0, 'depth_h'=>0, 'color'=>false, 'opacity'=>1, 'blend_mode'=>'Normal')) { - if (isset($params['enabled'])) { - $this->txtshadow['enabled'] = $params['enabled']?true:false; - } else { - $this->txtshadow['enabled'] = false; - } - if (isset($params['depth_w'])) { - $this->txtshadow['depth_w'] = floatval($params['depth_w']); - } else { - $this->txtshadow['depth_w'] = 0; - } - if (isset($params['depth_h'])) { - $this->txtshadow['depth_h'] = floatval($params['depth_h']); - } else { - $this->txtshadow['depth_h'] = 0; - } - if (isset($params['color']) AND ($params['color'] !== false) AND is_array($params['color'])) { - $this->txtshadow['color'] = $params['color']; - } else { - $this->txtshadow['color'] = $this->strokecolor; - } - if (isset($params['opacity'])) { - $this->txtshadow['opacity'] = min(1, max(0, floatval($params['opacity']))); - } else { - $this->txtshadow['opacity'] = 1; - } - if (isset($params['blend_mode']) AND in_array($params['blend_mode'], array('Normal', 'Multiply', 'Screen', 'Overlay', 'Darken', 'Lighten', 'ColorDodge', 'ColorBurn', 'HardLight', 'SoftLight', 'Difference', 'Exclusion', 'Hue', 'Saturation', 'Color', 'Luminosity'))) { - $this->txtshadow['blend_mode'] = $params['blend_mode']; - } else { - $this->txtshadow['blend_mode'] = 'Normal'; - } - if ((($this->txtshadow['depth_w'] == 0) AND ($this->txtshadow['depth_h'] == 0)) OR ($this->txtshadow['opacity'] == 0)) { - $this->txtshadow['enabled'] = false; - } - } - - /** - * Return the text shadow parameters array. - * @return array array of parameters. - * @since 5.9.174 (2012-07-25) - * @public - */ - public function getTextShadow() { - return $this->txtshadow; - } - - /** - * Returns an array of chars containing soft hyphens. - * @param array $word array of chars - * @param array $patterns Array of hypenation patterns. - * @param array $dictionary Array of words to be returned without applying the hyphenation algorithm. - * @param int $leftmin Minimum number of character to leave on the left of the word without applying the hyphens. - * @param int $rightmin Minimum number of character to leave on the right of the word without applying the hyphens. - * @param int $charmin Minimum word length to apply the hyphenation algorithm. - * @param int $charmax Maximum length of broken piece of word. - * @return array text with soft hyphens - * @author Nicola Asuni - * @since 4.9.012 (2010-04-12) - * @protected - */ - protected function hyphenateWord($word, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8) { - $hyphenword = array(); // hyphens positions - $numchars = count($word); - if ($numchars <= $charmin) { - return $word; - } - $word_string = TCPDF_FONTS::UTF8ArrSubString($word, '', '', $this->isunicode); - // some words will be returned as-is - $pattern = '/^([a-zA-Z0-9_\.\-]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/'; - if (preg_match($pattern, $word_string) > 0) { - // email - return $word; - } - $pattern = '/(([a-zA-Z0-9\-]+\.)?)((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/'; - if (preg_match($pattern, $word_string) > 0) { - // URL - return $word; - } - if (isset($dictionary[$word_string])) { - return TCPDF_FONTS::UTF8StringToArray($dictionary[$word_string], $this->isunicode, $this->CurrentFont); - } - // surround word with '_' characters - $tmpword = array_merge(array(46), $word, array(46)); - $tmpnumchars = $numchars + 2; - $maxpos = $tmpnumchars - 1; - for ($pos = 0; $pos < $maxpos; ++$pos) { - $imax = min(($tmpnumchars - $pos), $charmax); - for ($i = 1; $i <= $imax; ++$i) { - $subword = strtolower(TCPDF_FONTS::UTF8ArrSubString($tmpword, $pos, ($pos + $i), $this->isunicode)); - if (isset($patterns[$subword])) { - $pattern = TCPDF_FONTS::UTF8StringToArray($patterns[$subword], $this->isunicode, $this->CurrentFont); - $pattern_length = count($pattern); - $digits = 1; - for ($j = 0; $j < $pattern_length; ++$j) { - // check if $pattern[$j] is a number = hyphenation level (only numbers from 1 to 5 are valid) - if (($pattern[$j] >= 48) AND ($pattern[$j] <= 57)) { - if ($j == 0) { - $zero = $pos - 1; - } else { - $zero = $pos + $j - $digits; - } - // get hyphenation level - $level = ($pattern[$j] - 48); - // if two levels from two different patterns match at the same point, the higher one is selected. - if (!isset($hyphenword[$zero]) OR ($hyphenword[$zero] < $level)) { - $hyphenword[$zero] = $level; - } - ++$digits; - } - } - } - } - } - $inserted = 0; - $maxpos = $numchars - $rightmin; - for ($i = $leftmin; $i <= $maxpos; ++$i) { - // only odd levels indicate allowed hyphenation points - if (isset($hyphenword[$i]) AND (($hyphenword[$i] % 2) != 0)) { - // 173 = soft hyphen character - array_splice($word, $i + $inserted, 0, 173); - ++$inserted; - } - } - return $word; - } - - /** - * Returns text with soft hyphens. - * @param string $text text to process - * @param mixed $patterns Array of hypenation patterns or a TEX file containing hypenation patterns. TEX patterns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/ - * @param array $dictionary Array of words to be returned without applying the hyphenation algorithm. - * @param int $leftmin Minimum number of character to leave on the left of the word without applying the hyphens. - * @param int $rightmin Minimum number of character to leave on the right of the word without applying the hyphens. - * @param int $charmin Minimum word length to apply the hyphenation algorithm. - * @param int $charmax Maximum length of broken piece of word. - * @return string text with soft hyphens - * @author Nicola Asuni - * @since 4.9.012 (2010-04-12) - * @public - */ - public function hyphenateText($text, $patterns, $dictionary=array(), $leftmin=1, $rightmin=2, $charmin=1, $charmax=8) { - $text = $this->unhtmlentities($text); - $word = array(); // last word - $txtarr = array(); // text to be returned - $intag = false; // true if we are inside an HTML tag - $skip = false; // true to skip hyphenation - if (!is_array($patterns)) { - $patterns = TCPDF_STATIC::getHyphenPatternsFromTEX($patterns); - } - // get array of characters - $unichars = TCPDF_FONTS::UTF8StringToArray($text, $this->isunicode, $this->CurrentFont); - // for each char - foreach ($unichars as $char) { - if ((!$intag) AND (!$skip) AND TCPDF_FONT_DATA::$uni_type[$char] == 'L') { - // letter character - $word[] = $char; - } else { - // other type of character - if (!TCPDF_STATIC::empty_string($word)) { - // hypenate the word - $txtarr = array_merge($txtarr, $this->hyphenateWord($word, $patterns, $dictionary, $leftmin, $rightmin, $charmin, $charmax)); - $word = array(); - } - $txtarr[] = $char; - if (chr($char) == '<') { - // we are inside an HTML tag - $intag = true; - } elseif ($intag AND (chr($char) == '>')) { - // end of HTML tag - $intag = false; - // check for style tag - $expected = array(115, 116, 121, 108, 101); // = 'style' - $current = array_slice($txtarr, -6, 5); // last 5 chars - $compare = array_diff($expected, $current); - if (empty($compare)) { - // check if it is a closing tag - $expected = array(47); // = '/' - $current = array_slice($txtarr, -7, 1); - $compare = array_diff($expected, $current); - if (empty($compare)) { - // closing style tag - $skip = false; - } else { - // opening style tag - $skip = true; - } - } - } - } - } - if (!TCPDF_STATIC::empty_string($word)) { - // hypenate the word - $txtarr = array_merge($txtarr, $this->hyphenateWord($word, $patterns, $dictionary, $leftmin, $rightmin, $charmin, $charmax)); - } - // convert char array to string and return - return TCPDF_FONTS::UTF8ArrSubString($txtarr, '', '', $this->isunicode); - } - - /** - * Enable/disable rasterization of vector images using ImageMagick library. - * @param boolean $mode if true enable rasterization, false otherwise. - * @public - * @since 5.0.000 (2010-04-27) - */ - public function setRasterizeVectorImages($mode) { - $this->rasterize_vector_images = $mode; - } - - /** - * Enable or disable default option for font subsetting. - * @param boolean $enable if true enable font subsetting by default. - * @author Nicola Asuni - * @public - * @since 5.3.002 (2010-06-07) - */ - public function setFontSubsetting($enable=true) { - if ($this->pdfa_mode) { - $this->font_subsetting = false; - } else { - $this->font_subsetting = $enable ? true : false; - } - } - - /** - * Return the default option for font subsetting. - * @return bool default font subsetting state. - * @author Nicola Asuni - * @public - * @since 5.3.002 (2010-06-07) - */ - public function getFontSubsetting() { - return $this->font_subsetting; - } - - /** - * Left trim the input string - * @param string $str string to trim - * @param string $replace string that replace spaces. - * @return string left trimmed string - * @author Nicola Asuni - * @public - * @since 5.8.000 (2010-08-11) - */ - public function stringLeftTrim($str, $replace='') { - return preg_replace('/^'.$this->re_space['p'].'+/'.$this->re_space['m'], $replace, $str); - } - - /** - * Right trim the input string - * @param string $str string to trim - * @param string $replace string that replace spaces. - * @return string right trimmed string - * @author Nicola Asuni - * @public - * @since 5.8.000 (2010-08-11) - */ - public function stringRightTrim($str, $replace='') { - return preg_replace('/'.$this->re_space['p'].'+$/'.$this->re_space['m'], $replace, $str); - } - - /** - * Trim the input string - * @param string $str string to trim - * @param string $replace string that replace spaces. - * @return string trimmed string - * @author Nicola Asuni - * @public - * @since 5.8.000 (2010-08-11) - */ - public function stringTrim($str, $replace='') { - $str = $this->stringLeftTrim($str, $replace); - $str = $this->stringRightTrim($str, $replace); - return $str; - } - - /** - * Return true if the current font is unicode type. - * @return bool true for unicode font, false otherwise. - * @author Nicola Asuni - * @public - * @since 5.8.002 (2010-08-14) - */ - public function isUnicodeFont() { - return (($this->CurrentFont['type'] == 'TrueTypeUnicode') OR ($this->CurrentFont['type'] == 'cidfont0')); - } - - /** - * Return normalized font name - * @param string $fontfamily property string containing font family names - * @return string normalized font name - * @author Nicola Asuni - * @public - * @since 5.8.004 (2010-08-17) - */ - public function getFontFamilyName($fontfamily) { - // remove spaces and symbols - $fontfamily = preg_replace('/[^a-z0-9_\,]/', '', strtolower($fontfamily)); - // extract all font names - $fontslist = preg_split('/[,]/', $fontfamily); - // find first valid font name - foreach ($fontslist as $font) { - // replace font variations - $font = preg_replace('/regular$/', '', $font); - $font = preg_replace('/italic$/', 'I', $font); - $font = preg_replace('/oblique$/', 'I', $font); - $font = preg_replace('/bold([I]?)$/', 'B\\1', $font); - // replace common family names and core fonts - $pattern = array(); - $replacement = array(); - $pattern[] = '/^serif|^cursive|^fantasy|^timesnewroman/'; - $replacement[] = 'times'; - $pattern[] = '/^sansserif/'; - $replacement[] = 'helvetica'; - $pattern[] = '/^monospace/'; - $replacement[] = 'courier'; - $font = preg_replace($pattern, $replacement, $font); - if (in_array(strtolower($font), $this->fontlist) OR in_array($font, $this->fontkeys)) { - return $font; - } - } - // return current font as default - return $this->CurrentFont['fontkey']; - } - - /** - * Start a new XObject Template. - * An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). - * An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. - * Note: X,Y coordinates will be reset to 0,0. - * @param int $w Template width in user units (empty string or zero = page width less margins). - * @param int $h Template height in user units (empty string or zero = page height less margins). - * @param mixed $group Set transparency group. Can be a boolean value or an array specifying optional parameters: 'CS' (solour space name), 'I' (boolean flag to indicate isolated group) and 'K' (boolean flag to indicate knockout group). - * @return string|false the XObject Template ID in case of success or false in case of error. - * @author Nicola Asuni - * @public - * @since 5.8.017 (2010-08-24) - * @see endTemplate(), printTemplate() - */ - public function startTemplate($w=0, $h=0, $group=false) { - if ($this->inxobj) { - // we are already inside an XObject template - return false; - } - $this->inxobj = true; - ++$this->n; - // XObject ID - $this->xobjid = 'XT'.$this->n; - // object ID - $this->xobjects[$this->xobjid] = array('n' => $this->n); - // store current graphic state - $this->xobjects[$this->xobjid]['gvars'] = $this->getGraphicVars(); - // initialize data - $this->xobjects[$this->xobjid]['intmrk'] = 0; - $this->xobjects[$this->xobjid]['transfmrk'] = array(); - $this->xobjects[$this->xobjid]['outdata'] = ''; - $this->xobjects[$this->xobjid]['xobjects'] = array(); - $this->xobjects[$this->xobjid]['images'] = array(); - $this->xobjects[$this->xobjid]['fonts'] = array(); - $this->xobjects[$this->xobjid]['annotations'] = array(); - $this->xobjects[$this->xobjid]['extgstates'] = array(); - $this->xobjects[$this->xobjid]['gradients'] = array(); - $this->xobjects[$this->xobjid]['spot_colors'] = array(); - // set new environment - $this->num_columns = 1; - $this->current_column = 0; - $this->setAutoPageBreak(false); - if (($w === '') OR ($w <= 0)) { - $w = $this->w - $this->lMargin - $this->rMargin; - } - if (($h === '') OR ($h <= 0)) { - $h = $this->h - $this->tMargin - $this->bMargin; - } - $this->xobjects[$this->xobjid]['x'] = 0; - $this->xobjects[$this->xobjid]['y'] = 0; - $this->xobjects[$this->xobjid]['w'] = $w; - $this->xobjects[$this->xobjid]['h'] = $h; - $this->w = $w; - $this->h = $h; - $this->wPt = $this->w * $this->k; - $this->hPt = $this->h * $this->k; - $this->fwPt = $this->wPt; - $this->fhPt = $this->hPt; - $this->x = 0; - $this->y = 0; - $this->lMargin = 0; - $this->rMargin = 0; - $this->tMargin = 0; - $this->bMargin = 0; - // set group mode - $this->xobjects[$this->xobjid]['group'] = $group; - return $this->xobjid; - } - - /** - * End the current XObject Template started with startTemplate() and restore the previous graphic state. - * An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). - * An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. - * @return string|false the XObject Template ID in case of success or false in case of error. - * @author Nicola Asuni - * @public - * @since 5.8.017 (2010-08-24) - * @see startTemplate(), printTemplate() - */ - public function endTemplate() { - if (!$this->inxobj) { - // we are not inside a template - return false; - } - $this->inxobj = false; - // restore previous graphic state - $this->setGraphicVars($this->xobjects[$this->xobjid]['gvars'], true); - return $this->xobjid; - } - - /** - * Print an XObject Template. - * You can print an XObject Template inside the currently opened Template. - * An XObject Template is a PDF block that is a self-contained description of any sequence of graphics objects (including path objects, text objects, and sampled images). - * An XObject Template may be painted multiple times, either on several pages or at several locations on the same page and produces the same results each time, subject only to the graphics state at the time it is invoked. - * @param string $id The ID of XObject Template to print. - * @param float|null $x X position in user units (empty string = current x position) - * @param float|null $y Y position in user units (empty string = current y position) - * @param float $w Width in user units (zero = remaining page width) - * @param float $h Height in user units (zero = remaining page height) - * @param string $align Indicates the alignment of the pointer next to template insertion relative to template height. The value can be:
    • T: top-right for LTR or top-left for RTL
    • M: middle-right for LTR or middle-left for RTL
    • B: bottom-right for LTR or bottom-left for RTL
    • N: next line
    - * @param string $palign Allows to center or align the template on the current line. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    - * @param boolean $fitonpage If true the template is resized to not exceed page dimensions. - * @author Nicola Asuni - * @public - * @since 5.8.017 (2010-08-24) - * @see startTemplate(), endTemplate() - */ - public function printTemplate($id, $x=null, $y=null, $w=0, $h=0, $align='', $palign='', $fitonpage=false) { - if ($this->state != 2) { - return; - } - if (!isset($this->xobjects[$id])) { - $this->Error('The XObject Template \''.$id.'\' doesn\'t exist!'); - } - if ($this->inxobj) { - if ($id == $this->xobjid) { - // close current template - $this->endTemplate(); - } else { - // use the template as resource for the template currently opened - $this->xobjects[$this->xobjid]['xobjects'][$id] = $this->xobjects[$id]; - } - } - // set default values - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $ow = $this->xobjects[$id]['w']; - if ($ow <= 0) { - $ow = 1; - } - $oh = $this->xobjects[$id]['h']; - if ($oh <= 0) { - $oh = 1; - } - // calculate template width and height on document - if (($w <= 0) AND ($h <= 0)) { - $w = $ow; - $h = $oh; - } elseif ($w <= 0) { - $w = $h * $ow / $oh; - } elseif ($h <= 0) { - $h = $w * $oh / $ow; - } - // fit the template on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - // set page alignment - $rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($palign == 'L') { - $xt = $this->lMargin; - } elseif ($palign == 'C') { - $xt = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $xt = $this->w - $this->rMargin - $w; - } else { - $xt = $x - $w; - } - $rb_x = $xt; - } else { - if ($palign == 'L') { - $xt = $this->lMargin; - } elseif ($palign == 'C') { - $xt = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $xt = $this->w - $this->rMargin - $w; - } else { - $xt = $x; - } - $rb_x = $xt + $w; - } - // print XObject Template + Transformation matrix - $this->StartTransform(); - // translate and scale - $sx = ($w / $ow); - $sy = ($h / $oh); - $tm = array(); - $tm[0] = $sx; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = $sy; - $tm[4] = $xt * $this->k; - $tm[5] = ($this->h - $h - $y) * $this->k; - $this->Transform($tm); - // set object - $this->_out('/'.$id.' Do'); - $this->StopTransform(); - // add annotations - if (!empty($this->xobjects[$id]['annotations'])) { - foreach ($this->xobjects[$id]['annotations'] as $annot) { - // transform original coordinates - $coordlt = TCPDF_STATIC::getTransformationMatrixProduct($tm, array(1, 0, 0, 1, ($annot['x'] * $this->k), (-$annot['y'] * $this->k))); - $ax = ($coordlt[4] / $this->k); - $ay = ($this->h - $h - ($coordlt[5] / $this->k)); - $coordrb = TCPDF_STATIC::getTransformationMatrixProduct($tm, array(1, 0, 0, 1, (($annot['x'] + $annot['w']) * $this->k), ((-$annot['y'] - $annot['h']) * $this->k))); - $aw = ($coordrb[4] / $this->k) - $ax; - $ah = ($this->h - $h - ($coordrb[5] / $this->k)) - $ay; - $this->Annotation($ax, $ay, $aw, $ah, $annot['text'], $annot['opt'], $annot['spaces']); - } - } - // set pointer to align the next text/objects - switch($align) { - case 'T': { - $this->y = $y; - $this->x = $rb_x; - break; - } - case 'M': { - $this->y = $y + round($h/2); - $this->x = $rb_x; - break; - } - case 'B': { - $this->y = $rb_y; - $this->x = $rb_x; - break; - } - case 'N': { - $this->setY($rb_y); - break; - } - default:{ - break; - } - } - } - - /** - * Set the percentage of character stretching. - * @param int $perc percentage of stretching (100 = no stretching) - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function setFontStretching($perc=100) { - $this->font_stretching = $perc; - } - - /** - * Get the percentage of character stretching. - * @return float stretching value - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function getFontStretching() { - return $this->font_stretching; - } - - /** - * Set the amount to increase or decrease the space between characters in a text. - * @param float $spacing amount to increase or decrease the space between characters in a text (0 = default spacing) - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function setFontSpacing($spacing=0) { - $this->font_spacing = $spacing; - } - - /** - * Get the amount to increase or decrease the space between characters in a text. - * @return int font spacing (tracking) value - * @author Nicola Asuni - * @public - * @since 5.9.000 (2010-09-29) - */ - public function getFontSpacing() { - return $this->font_spacing; - } - - /** - * Return an array of no-write page regions - * @return array of no-write page regions - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see setPageRegions(), addPageRegion() - */ - public function getPageRegions() { - return $this->page_regions; - } - - /** - * Set no-write regions on page. - * A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. - * A region is always aligned on the left or right side of the page ad is defined using a vertical segment. - * You can set multiple regions for the same page. - * @param array $regions array of no-write regions. For each region you can define an array as follow: ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right). Omit this parameter to remove all regions. - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see addPageRegion(), getPageRegions() - */ - public function setPageRegions($regions=array()) { - // empty current regions array - $this->page_regions = array(); - // add regions - foreach ($regions as $data) { - $this->addPageRegion($data); - } - } - - /** - * Add a single no-write region on selected page. - * A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. - * A region is always aligned on the left or right side of the page ad is defined using a vertical segment. - * You can set multiple regions for the same page. - * @param array $region array of a single no-write region array: ('page' => page number or empy for current page, 'xt' => X top, 'yt' => Y top, 'xb' => X bottom, 'yb' => Y bottom, 'side' => page side 'L' = left or 'R' = right). - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see setPageRegions(), getPageRegions() - */ - public function addPageRegion($region) { - if (!isset($region['page']) OR empty($region['page'])) { - $region['page'] = $this->page; - } - if (isset($region['xt']) AND isset($region['xb']) AND ($region['xt'] > 0) AND ($region['xb'] > 0) - AND isset($region['yt']) AND isset($region['yb']) AND ($region['yt'] >= 0) AND ($region['yt'] < $region['yb']) - AND isset($region['side']) AND (($region['side'] == 'L') OR ($region['side'] == 'R'))) { - $this->page_regions[] = $region; - } - } - - /** - * Remove a single no-write region. - * @param int $key region key - * @author Nicola Asuni - * @public - * @since 5.9.003 (2010-10-13) - * @see setPageRegions(), getPageRegions() - */ - public function removePageRegion($key) { - if (isset($this->page_regions[$key])) { - unset($this->page_regions[$key]); - } - } - - /** - * Check page for no-write regions and adapt current coordinates and page margins if necessary. - * A no-write region is a portion of the page with a rectangular or trapezium shape that will not be covered when writing text or html code. - * A region is always aligned on the left or right side of the page ad is defined using a vertical segment. - * @param float $h height of the text/image/object to print in user units - * @param float $x current X coordinate in user units - * @param float $y current Y coordinate in user units - * @return float[] array($x, $y) - * @author Nicola Asuni - * @protected - * @since 5.9.003 (2010-10-13) - */ - protected function checkPageRegions($h, $x, $y) { - // set default values - if ($x === '') { - $x = $this->x; - } - if ($y === '') { - $y = $this->y; - } - if (!$this->check_page_regions OR empty($this->page_regions)) { - // no page regions defined - return array($x, $y); - } - if (empty($h)) { - $h = $this->getCellHeight($this->FontSize); - } - // check for page break - if ($this->checkPageBreak($h, $y)) { - // the content will be printed on a new page - $x = $this->x; - $y = $this->y; - } - if ($this->num_columns > 1) { - if ($this->rtl) { - $this->lMargin = ($this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w']); - } else { - $this->rMargin = ($this->w - $this->columns[$this->current_column]['x'] - $this->columns[$this->current_column]['w']); - } - } else { - if ($this->rtl) { - $this->lMargin = max($this->clMargin, $this->original_lMargin); - } else { - $this->rMargin = max($this->crMargin, $this->original_rMargin); - } - } - // adjust coordinates and page margins - foreach ($this->page_regions as $regid => $regdata) { - if ($regdata['page'] == $this->page) { - // check region boundaries - if (($y > ($regdata['yt'] - $h)) AND ($y <= $regdata['yb'])) { - // Y is inside the region - $minv = ($regdata['xb'] - $regdata['xt']) / ($regdata['yb'] - $regdata['yt']); // inverse of angular coefficient - $yt = max($y, $regdata['yt']); - $yb = min(($yt + $h), $regdata['yb']); - $xt = (($yt - $regdata['yt']) * $minv) + $regdata['xt']; - $xb = (($yb - $regdata['yt']) * $minv) + $regdata['xt']; - if ($regdata['side'] == 'L') { // left side - $new_margin = max($xt, $xb); - if ($this->lMargin < $new_margin) { - if ($this->rtl) { - // adjust left page margin - $this->lMargin = max(0, $new_margin); - } - if ($x < $new_margin) { - // adjust x position - $x = $new_margin; - if ($new_margin > ($this->w - $this->rMargin)) { - // adjust y position - $y = $regdata['yb'] - $h; - } - } - } - } elseif ($regdata['side'] == 'R') { // right side - $new_margin = min($xt, $xb); - if (($this->w - $this->rMargin) > $new_margin) { - if (!$this->rtl) { - // adjust right page margin - $this->rMargin = max(0, ($this->w - $new_margin)); - } - if ($x > $new_margin) { - // adjust x position - $x = $new_margin; - if ($new_margin > $this->lMargin) { - // adjust y position - $y = $regdata['yb'] - $h; - } - } - } - } - } - } - } - return array($x, $y); - } - - // --- SVG METHODS --------------------------------------------------------- - - /** - * Embedd a Scalable Vector Graphics (SVG) image. - * NOTE: SVG standard is not yet fully implemented, use the setRasterizeVectorImages() method to enable/disable rasterization of vector images using ImageMagick library. - * @param string $file Name of the SVG file or a '@' character followed by the SVG data string. - * @param float|null $x Abscissa of the upper-left corner. - * @param float|null $y Ordinate of the upper-left corner. - * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. - * @param mixed $link URL or identifier returned by AddLink(). - * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
    • T: top-right for LTR or top-left for RTL
    • M: middle-right for LTR or middle-left for RTL
    • B: bottom-right for LTR or bottom-left for RTL
    • N: next line
    If the alignment is an empty string, then the pointer will be restored on the starting SVG position. - * @param string $palign Allows to center or align the image on the current line. Possible values are:
    • L : left align
    • C : center
    • R : right align
    • '' : empty string : left for LTR or right for RTL
    - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) - * @param boolean $fitonpage if true the image is resized to not exceed page dimensions. - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @public - */ - public function ImageSVG($file, $x=null, $y=null, $w=0, $h=0, $link='', $align='', $palign='', $border=0, $fitonpage=false) { - if ($this->state != 2) { - return; - } - // reset SVG vars - $this->svggradients = array(); - $this->svggradientid = 0; - $this->svgdefsmode = false; - $this->svgdefs = array(); - $this->svgclipmode = false; - $this->svgclippaths = array(); - $this->svgcliptm = array(); - $this->svgclipid = 0; - $this->svgtext = ''; - $this->svgtextmode = array(); - if ($this->rasterize_vector_images AND ($w > 0) AND ($h > 0)) { - // convert SVG to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'SVG', $link, $align, true, 300, $palign, false, false, $border, false, false, false); - } - if ($file[0] === '@') { // image from string - $this->svgdir = ''; - $svgdata = substr($file, 1); - } else { // SVG file - $this->svgdir = dirname($file); - $svgdata = $this->getCachedFileContents($file); - } - if ($svgdata === FALSE) { - $this->Error('SVG file not found: '.$file); - } - if (TCPDF_STATIC::empty_string($x)) { - $x = $this->x; - } - if (TCPDF_STATIC::empty_string($y)) { - $y = $this->y; - } - // check page for no-write regions and adapt page margins if necessary - list($x, $y) = $this->checkPageRegions($h, $x, $y); - $k = $this->k; - $ox = 0; - $oy = 0; - $ow = $w; - $oh = $h; - $aspect_ratio_align = 'xMidYMid'; - $aspect_ratio_ms = 'meet'; - $regs = array(); - // get original image width and height - preg_match('/]*)>/si', $svgdata, $regs); - if (isset($regs[1]) AND !empty($regs[1])) { - $tmp = array(); - if (preg_match('/[\s]+x[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $ox = $this->getHTMLUnitToUnits($tmp[1], 0, $this->svgunit, false); - } - $tmp = array(); - if (preg_match('/[\s]+y[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $oy = $this->getHTMLUnitToUnits($tmp[1], 0, $this->svgunit, false); - } - $tmp = array(); - if (preg_match('/[\s]+width[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $ow = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - } - $tmp = array(); - if (preg_match('/[\s]+height[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $oh = $this->getHTMLUnitToUnits($tmp[1], 1, $this->svgunit, false); - } - $tmp = array(); - $view_box = array(); - if (preg_match('/[\s]+viewBox[\s]*=[\s]*"[\s]*([0-9\.\-]+)[\s]+([0-9\.\-]+)[\s]+([0-9\.]+)[\s]+([0-9\.]+)[\s]*"/si', $regs[1], $tmp)) { - if (count($tmp) == 5) { - array_shift($tmp); - foreach ($tmp as $key => $val) { - $view_box[$key] = $this->getHTMLUnitToUnits($val, 0, $this->svgunit, false); - } - $ox = $view_box[0]; - $oy = $view_box[1]; - } - // get aspect ratio - $tmp = array(); - if (preg_match('/[\s]+preserveAspectRatio[\s]*=[\s]*"([^"]*)"/si', $regs[1], $tmp)) { - $aspect_ratio = preg_split('/[\s]+/si', $tmp[1]); - switch (count($aspect_ratio)) { - case 3: { - $aspect_ratio_align = $aspect_ratio[1]; - $aspect_ratio_ms = $aspect_ratio[2]; - break; - } - case 2: { - $aspect_ratio_align = $aspect_ratio[0]; - $aspect_ratio_ms = $aspect_ratio[1]; - break; - } - case 1: { - $aspect_ratio_align = $aspect_ratio[0]; - $aspect_ratio_ms = 'meet'; - break; - } - } - } - } - } - if ($ow <= 0) { - $ow = 1; - } - if ($oh <= 0) { - $oh = 1; - } - // calculate image width and height on document - if (($w <= 0) AND ($h <= 0)) { - // convert image size to document unit - $w = $ow; - $h = $oh; - } elseif ($w <= 0) { - $w = $h * $ow / $oh; - } elseif ($h <= 0) { - $h = $w * $oh / $ow; - } - // fit the image on available space - list($w, $h, $x, $y) = $this->fitBlock($w, $h, $x, $y, $fitonpage); - if ($this->rasterize_vector_images) { - // convert SVG to raster image using GD or ImageMagick libraries - return $this->Image($file, $x, $y, $w, $h, 'SVG', $link, $align, true, 300, $palign, false, false, $border, false, false, false); - } - // set alignment - $this->img_rb_y = $y + $h; - // set alignment - if ($this->rtl) { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x - $w; - } - $this->img_rb_x = $ximg; - } else { - if ($palign == 'L') { - $ximg = $this->lMargin; - } elseif ($palign == 'C') { - $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2; - } elseif ($palign == 'R') { - $ximg = $this->w - $this->rMargin - $w; - } else { - $ximg = $x; - } - $this->img_rb_x = $ximg + $w; - } - // store current graphic vars - $gvars = $this->getGraphicVars(); - // store SVG position and scale factors - $svgoffset_x = ($ximg - $ox) * $this->k; - $svgoffset_y = -($y - $oy) * $this->k; - if (isset($view_box[2]) AND ($view_box[2] > 0) AND ($view_box[3] > 0)) { - $ow = $view_box[2]; - $oh = $view_box[3]; - } else { - if ($ow <= 0) { - $ow = $w; - } - if ($oh <= 0) { - $oh = $h; - } - } - $svgscale_x = $w / $ow; - $svgscale_y = $h / $oh; - // scaling and alignment - if ($aspect_ratio_align != 'none') { - // store current scaling values - $svgscale_old_x = $svgscale_x; - $svgscale_old_y = $svgscale_y; - // force uniform scaling - if ($aspect_ratio_ms == 'slice') { - // the entire viewport is covered by the viewBox - if ($svgscale_x > $svgscale_y) { - $svgscale_y = $svgscale_x; - } elseif ($svgscale_x < $svgscale_y) { - $svgscale_x = $svgscale_y; - } - } else { // meet - // the entire viewBox is visible within the viewport - if ($svgscale_x < $svgscale_y) { - $svgscale_y = $svgscale_x; - } elseif ($svgscale_x > $svgscale_y) { - $svgscale_x = $svgscale_y; - } - } - // correct X alignment - switch (substr($aspect_ratio_align, 1, 3)) { - case 'Min': { - // do nothing - break; - } - case 'Max': { - $svgoffset_x += (($w * $this->k) - ($ow * $this->k * $svgscale_x)); - break; - } - default: - case 'Mid': { - $svgoffset_x += ((($w * $this->k) - ($ow * $this->k * $svgscale_x)) / 2); - break; - } - } - // correct Y alignment - switch (substr($aspect_ratio_align, 5)) { - case 'Min': { - // do nothing - break; - } - case 'Max': { - $svgoffset_y -= (($h * $this->k) - ($oh * $this->k * $svgscale_y)); - break; - } - default: - case 'Mid': { - $svgoffset_y -= ((($h * $this->k) - ($oh * $this->k * $svgscale_y)) / 2); - break; - } - } - } - // store current page break mode - $page_break_mode = $this->AutoPageBreak; - $page_break_margin = $this->getBreakMargin(); - $cell_padding = $this->cell_padding; - $this->setCellPadding(0); - $this->setAutoPageBreak(false); - // save the current graphic state - $this->_out('q'.$this->epsmarker); - // set initial clipping mask - $this->Rect($ximg, $y, $w, $h, 'CNZ', array(), array()); - // scale and translate - $e = $ox * $this->k * (1 - $svgscale_x); - $f = ($this->h - $oy) * $this->k * (1 - $svgscale_y); - $this->_out(sprintf('%F %F %F %F %F %F cm', $svgscale_x, 0, 0, $svgscale_y, ($e + $svgoffset_x), ($f + $svgoffset_y))); - // creates a new XML parser to be used by the other XML functions - $parser = xml_parser_create('UTF-8'); - // the following function allows to use parser inside object - xml_set_object($parser, $this); - // disable case-folding for this XML parser - xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); - // sets the element handler functions for the XML parser - xml_set_element_handler($parser, 'startSVGElementHandler', 'endSVGElementHandler'); - // sets the character data handler function for the XML parser - xml_set_character_data_handler($parser, 'segSVGContentHandler'); - // start parsing an XML document - if (!xml_parse($parser, $svgdata)) { - $error_message = sprintf('SVG Error: %s at line %d', xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser)); - $this->Error($error_message); - } - // free this XML parser - xml_parser_free($parser); - - // >= PHP 7.0.0 "explicitly unset the reference to parser to avoid memory leaks" - unset($parser); - - // restore previous graphic state - $this->_out($this->epsmarker.'Q'); - // restore graphic vars - $this->setGraphicVars($gvars); - $this->lasth = $gvars['lasth']; - if (!empty($border)) { - $bx = $this->x; - $by = $this->y; - $this->x = $ximg; - if ($this->rtl) { - $this->x += $w; - } - $this->y = $y; - $this->Cell($w, $h, '', $border, 0, '', 0, '', 0, true); - $this->x = $bx; - $this->y = $by; - } - if ($link) { - $this->Link($ximg, $y, $w, $h, $link, 0); - } - // set pointer to align the next text/objects - switch($align) { - case 'T':{ - $this->y = $y; - $this->x = $this->img_rb_x; - break; - } - case 'M':{ - $this->y = $y + round($h/2); - $this->x = $this->img_rb_x; - break; - } - case 'B':{ - $this->y = $this->img_rb_y; - $this->x = $this->img_rb_x; - break; - } - case 'N':{ - $this->setY($this->img_rb_y); - break; - } - default:{ - // restore pointer to starting position - $this->x = $gvars['x']; - $this->y = $gvars['y']; - $this->page = $gvars['page']; - $this->current_column = $gvars['current_column']; - $this->tMargin = $gvars['tMargin']; - $this->bMargin = $gvars['bMargin']; - $this->w = $gvars['w']; - $this->h = $gvars['h']; - $this->wPt = $gvars['wPt']; - $this->hPt = $gvars['hPt']; - $this->fwPt = $gvars['fwPt']; - $this->fhPt = $gvars['fhPt']; - break; - } - } - $this->endlinex = $this->img_rb_x; - // restore page break - $this->setAutoPageBreak($page_break_mode, $page_break_margin); - $this->cell_padding = $cell_padding; - } - - /** - * Convert SVG transformation matrix to PDF. - * @param array $tm original SVG transformation matrix - * @return array transformation matrix - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected function convertSVGtMatrix($tm) { - $a = $tm[0]; - $b = -$tm[1]; - $c = -$tm[2]; - $d = $tm[3]; - $e = $this->getHTMLUnitToUnits($tm[4], 1, $this->svgunit, false) * $this->k; - $f = -$this->getHTMLUnitToUnits($tm[5], 1, $this->svgunit, false) * $this->k; - $x = 0; - $y = $this->h * $this->k; - $e = ($x * (1 - $a)) - ($y * $c) + $e; - $f = ($y * (1 - $d)) - ($x * $b) + $f; - return array($a, $b, $c, $d, $e, $f); - } - - /** - * Apply SVG graphic transformation matrix. - * @param array $tm original SVG transformation matrix - * @protected - * @since 5.0.000 (2010-05-02) - */ - protected function SVGTransform($tm) { - $this->Transform($this->convertSVGtMatrix($tm)); - } - - /** - * Apply the requested SVG styles (*** TO BE COMPLETED ***) - * @param array $svgstyle array of SVG styles to apply - * @param array $prevsvgstyle array of previous SVG style - * @param int $x X origin of the bounding box - * @param int $y Y origin of the bounding box - * @param int $w width of the bounding box - * @param int $h height of the bounding box - * @param string $clip_function clip function - * @param array $clip_params array of parameters for clipping function - * @return string style - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function setSVGStyles($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1, $clip_function='', $clip_params=array()) { - if ($this->state != 2) { - return; - } - $objstyle = ''; - $minlen = (0.01 / $this->k); // minimum acceptable length - if (!isset($svgstyle['opacity'])) { - return $objstyle; - } - // clip-path - $regs = array(); - if (preg_match('/url\([\s]*\#([^\)]*)\)/si', $svgstyle['clip-path'], $regs)) { - $clip_path = $this->svgclippaths[$regs[1]]; - foreach ($clip_path as $cp) { - $this->startSVGElementHandler('clip-path', $cp['name'], $cp['attribs'], $cp['tm']); - } - } - // opacity - if ($svgstyle['opacity'] != 1) { - $this->setAlpha($svgstyle['opacity'], 'Normal', $svgstyle['opacity'], false); - } - // color - $fill_color = TCPDF_COLORS::convertHTMLColorToDec($svgstyle['color'], $this->spot_colors); - $this->setFillColorArray($fill_color); - // text color - $text_color = TCPDF_COLORS::convertHTMLColorToDec($svgstyle['text-color'], $this->spot_colors); - $this->setTextColorArray($text_color); - // clip - if (preg_match('/rect\(([a-z0-9\-\.]*)[\s]*([a-z0-9\-\.]*)[\s]*([a-z0-9\-\.]*)[\s]*([a-z0-9\-\.]*)\)/si', $svgstyle['clip'], $regs)) { - $top = (isset($regs[1])?$this->getHTMLUnitToUnits($regs[1], 0, $this->svgunit, false):0); - $right = (isset($regs[2])?$this->getHTMLUnitToUnits($regs[2], 0, $this->svgunit, false):0); - $bottom = (isset($regs[3])?$this->getHTMLUnitToUnits($regs[3], 0, $this->svgunit, false):0); - $left = (isset($regs[4])?$this->getHTMLUnitToUnits($regs[4], 0, $this->svgunit, false):0); - $cx = $x + $left; - $cy = $y + $top; - $cw = $w - $left - $right; - $ch = $h - $top - $bottom; - if ($svgstyle['clip-rule'] == 'evenodd') { - $clip_rule = 'CNZ'; - } else { - $clip_rule = 'CEO'; - } - $this->Rect($cx, $cy, $cw, $ch, $clip_rule, array(), array()); - } - // fill - $regs = array(); - if (preg_match('/url\([\s]*\#([^\)]*)\)/si', $svgstyle['fill'], $regs)) { - // gradient - $gradient = $this->svggradients[$regs[1]]; - if (isset($gradient['xref'])) { - // reference to another gradient definition - $newgradient = $this->svggradients[$gradient['xref']]; - $newgradient['coords'] = $gradient['coords']; - $newgradient['mode'] = $gradient['mode']; - $newgradient['type'] = $gradient['type']; - $newgradient['gradientUnits'] = $gradient['gradientUnits']; - if (isset($gradient['gradientTransform'])) { - $newgradient['gradientTransform'] = $gradient['gradientTransform']; - } - $gradient = $newgradient; - } - //save current Graphic State - $this->_outSaveGraphicsState(); - //set clipping area - if (!empty($clip_function) AND method_exists($this, $clip_function)) { - $bbox = call_user_func_array(array($this, $clip_function), $clip_params); - if ((!isset($gradient['type']) OR ($gradient['type'] != 3)) AND is_array($bbox) AND (count($bbox) == 4)) { - list($x, $y, $w, $h) = $bbox; - } - } - if ($gradient['mode'] == 'measure') { - if (!isset($gradient['coords'][4])) { - $gradient['coords'][4] = 0.5; - } - if (isset($gradient['gradientTransform']) AND !empty($gradient['gradientTransform'])) { - $gtm = $gradient['gradientTransform']; - // apply transformation matrix - $xa = ($gtm[0] * $gradient['coords'][0]) + ($gtm[2] * $gradient['coords'][1]) + $gtm[4]; - $ya = ($gtm[1] * $gradient['coords'][0]) + ($gtm[3] * $gradient['coords'][1]) + $gtm[5]; - $xb = ($gtm[0] * $gradient['coords'][2]) + ($gtm[2] * $gradient['coords'][3]) + $gtm[4]; - $yb = ($gtm[1] * $gradient['coords'][2]) + ($gtm[3] * $gradient['coords'][3]) + $gtm[5]; - $r = sqrt(pow(($gtm[0] * $gradient['coords'][4]), 2) + pow(($gtm[1] * $gradient['coords'][4]), 2)); - $gradient['coords'][0] = $xa; - $gradient['coords'][1] = $ya; - $gradient['coords'][2] = $xb; - $gradient['coords'][3] = $yb; - $gradient['coords'][4] = $r; - } - // convert SVG coordinates to user units - $gradient['coords'][0] = $this->getHTMLUnitToUnits($gradient['coords'][0], 0, $this->svgunit, false); - $gradient['coords'][1] = $this->getHTMLUnitToUnits($gradient['coords'][1], 0, $this->svgunit, false); - $gradient['coords'][2] = $this->getHTMLUnitToUnits($gradient['coords'][2], 0, $this->svgunit, false); - $gradient['coords'][3] = $this->getHTMLUnitToUnits($gradient['coords'][3], 0, $this->svgunit, false); - $gradient['coords'][4] = $this->getHTMLUnitToUnits($gradient['coords'][4], 0, $this->svgunit, false); - if ($w <= $minlen) { - $w = $minlen; - } - if ($h <= $minlen) { - $h = $minlen; - } - // shift units - if ($gradient['gradientUnits'] == 'objectBoundingBox') { - // convert to SVG coordinate system - $gradient['coords'][0] += $x; - $gradient['coords'][1] += $y; - $gradient['coords'][2] += $x; - $gradient['coords'][3] += $y; - } - // calculate percentages - $gradient['coords'][0] = (($gradient['coords'][0] - $x) / $w); - $gradient['coords'][1] = (($gradient['coords'][1] - $y) / $h); - $gradient['coords'][2] = (($gradient['coords'][2] - $x) / $w); - $gradient['coords'][3] = (($gradient['coords'][3] - $y) / $h); - $gradient['coords'][4] /= $w; - } elseif ($gradient['mode'] == 'percentage') { - foreach($gradient['coords'] as $key => $val) { - $gradient['coords'][$key] = (intval($val) / 100); - if ($val < 0) { - $gradient['coords'][$key] = 0; - } elseif ($val > 1) { - $gradient['coords'][$key] = 1; - } - } - } - if (($gradient['type'] == 2) AND ($gradient['coords'][0] == $gradient['coords'][2]) AND ($gradient['coords'][1] == $gradient['coords'][3])) { - // single color (no shading) - $gradient['coords'][0] = 1; - $gradient['coords'][1] = 0; - $gradient['coords'][2] = 0.999; - $gradient['coords'][3] = 0; - } - // swap Y coordinates - $tmp = $gradient['coords'][1]; - $gradient['coords'][1] = $gradient['coords'][3]; - $gradient['coords'][3] = $tmp; - // set transformation map for gradient - $cy = ($this->h - $y); - if ($gradient['type'] == 3) { - // circular gradient - $cy -= ($gradient['coords'][1] * ($w + $h)); - $h = $w = max($w, $h); - } else { - $cy -= $h; - } - $this->_out(sprintf('%F 0 0 %F %F %F cm', ($w * $this->k), ($h * $this->k), ($x * $this->k), ($cy * $this->k))); - if (count($gradient['stops']) > 1) { - $this->Gradient($gradient['type'], $gradient['coords'], $gradient['stops'], array(), false); - } - } elseif ($svgstyle['fill'] != 'none') { - $fill_color = TCPDF_COLORS::convertHTMLColorToDec($svgstyle['fill'], $this->spot_colors); - if ($svgstyle['fill-opacity'] != 1) { - $this->setAlpha($this->alpha['CA'], 'Normal', $svgstyle['fill-opacity'], false); - } - $this->setFillColorArray($fill_color); - if ($svgstyle['fill-rule'] == 'evenodd') { - $objstyle .= 'F*'; - } else { - $objstyle .= 'F'; - } - } - // stroke - if ($svgstyle['stroke'] != 'none') { - if ($svgstyle['stroke-opacity'] != 1) { - $this->setAlpha($svgstyle['stroke-opacity'], 'Normal', $this->alpha['ca'], false); - } elseif (preg_match('/rgba\(\d+%?,\s*\d+%?,\s*\d+%?,\s*(\d+(?:\.\d+)?)\)/i', $svgstyle['stroke'], $rgba_matches)) { - $this->setAlpha($rgba_matches[1], 'Normal', $this->alpha['ca'], false); - } - $stroke_style = array( - 'color' => TCPDF_COLORS::convertHTMLColorToDec($svgstyle['stroke'], $this->spot_colors), - 'width' => $this->getHTMLUnitToUnits($svgstyle['stroke-width'], 0, $this->svgunit, false), - 'cap' => $svgstyle['stroke-linecap'], - 'join' => $svgstyle['stroke-linejoin'] - ); - if (isset($svgstyle['stroke-dasharray']) AND !empty($svgstyle['stroke-dasharray']) AND ($svgstyle['stroke-dasharray'] != 'none')) { - $stroke_style['dash'] = $svgstyle['stroke-dasharray']; - } - $this->setLineStyle($stroke_style); - $objstyle .= 'D'; - } - // font - $regs = array(); - if (!empty($svgstyle['font'])) { - if (preg_match('/font-family[\s]*:[\s]*([^\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_family = $this->getFontFamilyName($regs[1]); - } else { - $font_family = $svgstyle['font-family']; - } - if (preg_match('/font-size[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_size = trim($regs[1]); - } else { - $font_size = $svgstyle['font-size']; - } - if (preg_match('/font-style[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_style = trim($regs[1]); - } else { - $font_style = $svgstyle['font-style']; - } - if (preg_match('/font-weight[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_weight = trim($regs[1]); - } else { - $font_weight = $svgstyle['font-weight']; - } - if (preg_match('/font-stretch[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_stretch = trim($regs[1]); - } else { - $font_stretch = $svgstyle['font-stretch']; - } - if (preg_match('/letter-spacing[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { - $font_spacing = trim($regs[1]); - } else { - $font_spacing = $svgstyle['letter-spacing']; - } - } else { - $font_family = $this->getFontFamilyName($svgstyle['font-family']); - $font_size = $svgstyle['font-size']; - $font_style = $svgstyle['font-style']; - $font_weight = $svgstyle['font-weight']; - $font_stretch = $svgstyle['font-stretch']; - $font_spacing = $svgstyle['letter-spacing']; - } - $font_size = $this->getHTMLFontUnits($font_size, $this->svgstyles[0]['font-size'], $prevsvgstyle['font-size'], $this->svgunit); - $font_stretch = $this->getCSSFontStretching($font_stretch, $svgstyle['font-stretch']); - $font_spacing = $this->getCSSFontSpacing($font_spacing, $svgstyle['letter-spacing']); - switch ($font_style) { - case 'italic': { - $font_style = 'I'; - break; - } - case 'oblique': { - $font_style = 'I'; - break; - } - default: - case 'normal': { - $font_style = ''; - break; - } - } - switch ($font_weight) { - case 'bold': - case 'bolder': { - $font_style .= 'B'; - break; - } - case 'normal': { - if ((substr($font_family, -1) == 'I') AND (substr($font_family, -2, 1) == 'B')) { - $font_family = substr($font_family, 0, -2).'I'; - } elseif (substr($font_family, -1) == 'B') { - $font_family = substr($font_family, 0, -1); - } - break; - } - } - switch ($svgstyle['text-decoration']) { - case 'underline': { - $font_style .= 'U'; - break; - } - case 'overline': { - $font_style .= 'O'; - break; - } - case 'line-through': { - $font_style .= 'D'; - break; - } - default: - case 'none': { - break; - } - } - $this->setFont($font_family, $font_style, $font_size); - $this->setFontStretching($font_stretch); - $this->setFontSpacing($font_spacing); - return $objstyle; - } - - /** - * Draws an SVG path - * @param string $d attribute d of the path SVG element - * @param string $style Style of rendering. Possible values are: - *
      - *
    • D or empty string: Draw (default).
    • - *
    • F: Fill.
    • - *
    • F*: Fill using the even-odd rule to determine which regions lie inside the clipping path.
    • - *
    • DF or FD: Draw and fill.
    • - *
    • DF* or FD*: Draw and fill using the even-odd rule to determine which regions lie inside the clipping path.
    • - *
    • CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
    • - *
    • CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).
    • - *
    - * @return array of container box measures (x, y, w, h) - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function SVGPath($d, $style='') { - if ($this->state != 2) { - return; - } - // set fill/stroke style - $op = TCPDF_STATIC::getPathPaintOperator($style, ''); - if (empty($op)) { - return; - } - $paths = array(); - $d = preg_replace('/([0-9ACHLMQSTVZ])([\-\+])/si', '\\1 \\2', $d); - $d = preg_replace('/(\.[0-9]+)(\.)/s', '\\1 \\2', $d); - preg_match_all('/([ACHLMQSTVZ])[\s]*([^ACHLMQSTVZ\"]*)/si', $d, $paths, PREG_SET_ORDER); - $x = 0; - $y = 0; - $x1 = 0; - $y1 = 0; - $x2 = 0; - $y2 = 0; - $xmin = 2147483647; - $xmax = 0; - $ymin = 2147483647; - $ymax = 0; - $xinitial = 0; - $yinitial = 0; - $relcoord = false; - $minlen = (0.01 / $this->k); // minimum acceptable length (3 point) - $firstcmd = true; // used to print first point - // draw curve pieces - foreach ($paths as $key => $val) { - // get curve type - $cmd = trim($val[1]); - if (strtolower($cmd) == $cmd) { - // use relative coordinated instead of absolute - $relcoord = true; - $xoffset = $x; - $yoffset = $y; - } else { - $relcoord = false; - $xoffset = 0; - $yoffset = 0; - } - $params = array(); - if (isset($val[2])) { - // get curve parameters - $rawparams = preg_split('/([\,\s]+)/si', trim($val[2])); - $params = array(); - foreach ($rawparams as $ck => $cp) { - $params[$ck] = $this->getHTMLUnitToUnits($cp, 0, $this->svgunit, false); - if (abs($params[$ck]) < $minlen) { - // approximate little values to zero - $params[$ck] = 0; - } - } - } - // store current origin point - $x0 = $x; - $y0 = $y; - switch (strtoupper($cmd)) { - case 'M': { // moveto - foreach ($params as $ck => $cp) { - if (($ck % 2) == 0) { - $x = $cp + $xoffset; - } else { - $y = $cp + $yoffset; - if ($firstcmd OR (abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - if ($ck == 1) { - $this->_outPoint($x, $y); - $firstcmd = false; - $xinitial = $x; - $yinitial = $y; - } else { - $this->_outLine($x, $y); - } - $x0 = $x; - $y0 = $y; - } - $xmin = min($xmin, $x); - $ymin = min($ymin, $y); - $xmax = max($xmax, $x); - $ymax = max($ymax, $y); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'L': { // lineto - foreach ($params as $ck => $cp) { - if (($ck % 2) == 0) { - $x = $cp + $xoffset; - } else { - $y = $cp + $yoffset; - if ((abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - $this->_outLine($x, $y); - $x0 = $x; - $y0 = $y; - } - $xmin = min($xmin, $x); - $ymin = min($ymin, $y); - $xmax = max($xmax, $x); - $ymax = max($ymax, $y); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'H': { // horizontal lineto - foreach ($params as $ck => $cp) { - $x = $cp + $xoffset; - if ((abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - $this->_outLine($x, $y); - $x0 = $x; - $y0 = $y; - } - $xmin = min($xmin, $x); - $xmax = max($xmax, $x); - if ($relcoord) { - $xoffset = $x; - } - } - break; - } - case 'V': { // vertical lineto - foreach ($params as $ck => $cp) { - $y = $cp + $yoffset; - if ((abs($x0 - $x) >= $minlen) OR (abs($y0 - $y) >= $minlen)) { - $this->_outLine($x, $y); - $x0 = $x; - $y0 = $y; - } - $ymin = min($ymin, $y); - $ymax = max($ymax, $y); - if ($relcoord) { - $yoffset = $y; - } - } - break; - } - case 'C': { // curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 6) == 0) { - $x1 = $params[($ck - 5)] + $xoffset; - $y1 = $params[($ck - 4)] + $yoffset; - $x2 = $params[($ck - 3)] + $xoffset; - $y2 = $params[($ck - 2)] + $yoffset; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $this->_outCurve($x1, $y1, $x2, $y2, $x, $y); - $xmin = min($xmin, $x, $x1, $x2); - $ymin = min($ymin, $y, $y1, $y2); - $xmax = max($xmax, $x, $x1, $x2); - $ymax = max($ymax, $y, $y1, $y2); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'S': { // shorthand/smooth curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 4) == 0) { - if (($key > 0) AND ((strtoupper($paths[($key - 1)][1]) == 'C') OR (strtoupper($paths[($key - 1)][1]) == 'S'))) { - $x1 = (2 * $x) - $x2; - $y1 = (2 * $y) - $y2; - } else { - $x1 = $x; - $y1 = $y; - } - $x2 = $params[($ck - 3)] + $xoffset; - $y2 = $params[($ck - 2)] + $yoffset; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $this->_outCurve($x1, $y1, $x2, $y2, $x, $y); - $xmin = min($xmin, $x, $x1, $x2); - $ymin = min($ymin, $y, $y1, $y2); - $xmax = max($xmax, $x, $x1, $x2); - $ymax = max($ymax, $y, $y1, $y2); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'Q': { // quadratic Bezier curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 4) == 0) { - // convert quadratic points to cubic points - $x1 = $params[($ck - 3)] + $xoffset; - $y1 = $params[($ck - 2)] + $yoffset; - $xa = ($x + (2 * $x1)) / 3; - $ya = ($y + (2 * $y1)) / 3; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $xb = ($x + (2 * $x1)) / 3; - $yb = ($y + (2 * $y1)) / 3; - $this->_outCurve($xa, $ya, $xb, $yb, $x, $y); - $xmin = min($xmin, $x, $xa, $xb); - $ymin = min($ymin, $y, $ya, $yb); - $xmax = max($xmax, $x, $xa, $xb); - $ymax = max($ymax, $y, $ya, $yb); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'T': { // shorthand/smooth quadratic Bezier curveto - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if (($ck % 2) != 0) { - if (($key > 0) AND ((strtoupper($paths[($key - 1)][1]) == 'Q') OR (strtoupper($paths[($key - 1)][1]) == 'T'))) { - $x1 = (2 * $x) - $x1; - $y1 = (2 * $y) - $y1; - } else { - $x1 = $x; - $y1 = $y; - } - // convert quadratic points to cubic points - $xa = ($x + (2 * $x1)) / 3; - $ya = ($y + (2 * $y1)) / 3; - $x = $params[($ck - 1)] + $xoffset; - $y = $params[($ck)] + $yoffset; - $xb = ($x + (2 * $x1)) / 3; - $yb = ($y + (2 * $y1)) / 3; - $this->_outCurve($xa, $ya, $xb, $yb, $x, $y); - $xmin = min($xmin, $x, $xa, $xb); - $ymin = min($ymin, $y, $ya, $yb); - $xmax = max($xmax, $x, $xa, $xb); - $ymax = max($ymax, $y, $ya, $yb); - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'A': { // elliptical arc - foreach ($params as $ck => $cp) { - $params[$ck] = $cp; - if ((($ck + 1) % 7) == 0) { - $x0 = $x; - $y0 = $y; - $rx = max(abs($params[($ck - 6)]), .000000001); - $ry = max(abs($params[($ck - 5)]), .000000001); - $ang = -$rawparams[($ck - 4)]; - $angle = deg2rad($ang); - $fa = $rawparams[($ck - 3)]; // large-arc-flag - $fs = $rawparams[($ck - 2)]; // sweep-flag - $x = $params[($ck - 1)] + $xoffset; - $y = $params[$ck] + $yoffset; - if ((abs($x0 - $x) < $minlen) AND (abs($y0 - $y) < $minlen)) { - // endpoints are almost identical - $xmin = min($xmin, $x); - $ymin = min($ymin, $y); - $xmax = max($xmax, $x); - $ymax = max($ymax, $y); - } else { - $cos_ang = cos($angle); - $sin_ang = sin($angle); - $a = (($x0 - $x) / 2); - $b = (($y0 - $y) / 2); - $xa = ($a * $cos_ang) - ($b * $sin_ang); - $ya = ($a * $sin_ang) + ($b * $cos_ang); - $rx2 = $rx * $rx; - $ry2 = $ry * $ry; - $xa2 = $xa * $xa; - $ya2 = $ya * $ya; - $delta = ($xa2 / $rx2) + ($ya2 / $ry2); - if ($delta > 1) { - $rx *= sqrt($delta); - $ry *= sqrt($delta); - $rx2 = $rx * $rx; - $ry2 = $ry * $ry; - } - $numerator = (($rx2 * $ry2) - ($rx2 * $ya2) - ($ry2 * $xa2)); - if ($numerator < 0) { - $root = 0; - } else { - $root = sqrt($numerator / (($rx2 * $ya2) + ($ry2 * $xa2))); - } - if ($fa == $fs){ - $root *= -1; - } - $cax = $root * (($rx * $ya) / $ry); - $cay = -$root * (($ry * $xa) / $rx); - // coordinates of ellipse center - $cx = ($cax * $cos_ang) - ($cay * $sin_ang) + (($x0 + $x) / 2); - $cy = ($cax * $sin_ang) + ($cay * $cos_ang) + (($y0 + $y) / 2); - // get angles - $angs = TCPDF_STATIC::getVectorsAngle(1, 0, (($xa - $cax) / $rx), (($cay - $ya) / $ry)); - $dang = TCPDF_STATIC::getVectorsAngle((($xa - $cax) / $rx), (($ya - $cay) / $ry), ((-$xa - $cax) / $rx), ((-$ya - $cay) / $ry)); - if (($fs == 0) AND ($dang > 0)) { - $dang -= (2 * M_PI); - } elseif (($fs == 1) AND ($dang < 0)) { - $dang += (2 * M_PI); - } - $angf = $angs - $dang; - if ((($fs == 0) AND ($angs > $angf)) OR (($fs == 1) AND ($angs < $angf))) { - // reverse angles - $tmp = $angs; - $angs = $angf; - $angf = $tmp; - } - $angs = round(rad2deg($angs), 6); - $angf = round(rad2deg($angf), 6); - // covent angles to positive values - if (($angs < 0) AND ($angf < 0)) { - $angs += 360; - $angf += 360; - } - $pie = false; - if (($key == 0) AND (isset($paths[($key + 1)][1])) AND (trim($paths[($key + 1)][1]) == 'z')) { - $pie = true; - } - list($axmin, $aymin, $axmax, $aymax) = $this->_outellipticalarc($cx, $cy, $rx, $ry, $ang, $angs, $angf, $pie, 2, false, ($fs == 0), true); - $xmin = min($xmin, $x, $axmin); - $ymin = min($ymin, $y, $aymin); - $xmax = max($xmax, $x, $axmax); - $ymax = max($ymax, $y, $aymax); - } - if ($relcoord) { - $xoffset = $x; - $yoffset = $y; - } - } - } - break; - } - case 'Z': { - $this->_out('h'); - $x = $x0 = $xinitial; - $y = $y0 = $yinitial; - break; - } - } - $firstcmd = false; - } // end foreach - if (!empty($op)) { - $this->_out($op); - } - return array($xmin, $ymin, ($xmax - $xmin), ($ymax - $ymin)); - } - - /** - * Return the tag name without the namespace - * @param string $name Tag name - * @protected - */ - protected function removeTagNamespace($name) { - if(strpos($name, ':') !== false) { - $parts = explode(':', $name); - return $parts[(sizeof($parts) - 1)]; - } - return $name; - } - - /** - * Sets the opening SVG element handler function for the XML parser. (*** TO BE COMPLETED ***) - * @param resource|string $parser The first parameter, parser, is a reference to the XML parser calling the handler. - * @param string $name The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. - * @param array $attribs The third parameter, attribs, contains an associative array with the element's attributes (if any). The keys of this array are the attribute names, the values are the attribute values. Attribute names are case-folded on the same criteria as element names. Attribute values are not case-folded. The original order of the attributes can be retrieved by walking through attribs the normal way, using each(). The first key in the array was the first attribute, and so on. - * @param array $ctm tranformation matrix for clipping mode (starting transformation matrix). - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function startSVGElementHandler($parser, $name, $attribs, $ctm=array()) { - $name = $this->removeTagNamespace($name); - // check if we are in clip mode - if ($this->svgclipmode) { - $this->svgclippaths[$this->svgclipid][] = array('name' => $name, 'attribs' => $attribs, 'tm' => $this->svgcliptm[$this->svgclipid]); - return; - } - if ($this->svgdefsmode AND !in_array($name, array('clipPath', 'linearGradient', 'radialGradient', 'stop'))) { - if (isset($attribs['id'])) { - $attribs['child_elements'] = array(); - $this->svgdefs[$attribs['id']] = array('name' => $name, 'attribs' => $attribs); - return; - } - if (end($this->svgdefs) !== FALSE) { - $last_svgdefs_id = key($this->svgdefs); - if (isset($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'])) { - $attribs['id'] = 'DF_'.(count($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements']) + 1); - $this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$attribs['id']] = array('name' => $name, 'attribs' => $attribs); - return; - } - } - return; - } - $clipping = false; - if ($parser == 'clip-path') { - // set clipping mode - $clipping = true; - } - // get styling properties - $prev_svgstyle = $this->svgstyles[max(0,(count($this->svgstyles) - 1))]; // previous style - $svgstyle = $this->svgstyles[0]; // set default style - if ($clipping AND !isset($attribs['fill']) AND (!isset($attribs['style']) OR (!preg_match('/[;\"\s]{1}fill[\s]*:[\s]*([^;\"]*)/si', $attribs['style'], $attrval)))) { - // default fill attribute for clipping - $attribs['fill'] = 'none'; - } - if (isset($attribs['style']) AND !TCPDF_STATIC::empty_string($attribs['style']) AND ($attribs['style'][0] != ';')) { - // fix style for regular expression - $attribs['style'] = ';'.$attribs['style']; - } - foreach ($prev_svgstyle as $key => $val) { - if (in_array($key, TCPDF_IMAGES::$svginheritprop)) { - // inherit previous value - $svgstyle[$key] = $val; - } - if (isset($attribs[$key]) AND !TCPDF_STATIC::empty_string($attribs[$key])) { - // specific attribute settings - if ($attribs[$key] == 'inherit') { - $svgstyle[$key] = $val; - } else { - $svgstyle[$key] = $attribs[$key]; - } - } elseif (isset($attribs['style']) AND !TCPDF_STATIC::empty_string($attribs['style'])) { - // CSS style syntax - $attrval = array(); - if (preg_match('/[;\"\s]{1}'.$key.'[\s]*:[\s]*([^;\"]*)/si', $attribs['style'], $attrval) AND isset($attrval[1])) { - if ($attrval[1] == 'inherit') { - $svgstyle[$key] = $val; - } else { - $svgstyle[$key] = $attrval[1]; - } - } - } - } - // transformation matrix - if (!empty($ctm)) { - $tm = $ctm; - } else { - $tm = array(1,0,0,1,0,0); - } - if (isset($attribs['transform']) AND !empty($attribs['transform'])) { - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, TCPDF_STATIC::getSVGTransformMatrix($attribs['transform'])); - } - $svgstyle['transfmatrix'] = $tm; - $invisible = false; - if (($svgstyle['visibility'] == 'hidden') OR ($svgstyle['visibility'] == 'collapse') OR ($svgstyle['display'] == 'none')) { - // the current graphics element is invisible (nothing is painted) - $invisible = true; - } - // process tag - switch($name) { - case 'defs': { - $this->svgdefsmode = true; - break; - } - // clipPath - case 'clipPath': { - if ($invisible) { - break; - } - $this->svgclipmode = true; - if (!isset($attribs['id'])) { - $attribs['id'] = 'CP_'.(count($this->svgcliptm) + 1); - } - $this->svgclipid = $attribs['id']; - $this->svgclippaths[$this->svgclipid] = array(); - $this->svgcliptm[$this->svgclipid] = $tm; - break; - } - case 'svg': { - // start of SVG object - if(++$this->svg_tag_depth <= 1) { - break; - } - // inner SVG - array_push($this->svgstyles, $svgstyle); - $this->StartTransform(); - $svgX = (isset($attribs['x'])?$attribs['x']:0); - $svgY = (isset($attribs['y'])?$attribs['y']:0); - $svgW = (isset($attribs['width'])?$attribs['width']:0); - $svgH = (isset($attribs['height'])?$attribs['height']:0); - // set x, y position using transform matrix - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array( 1, 0, 0, 1, $svgX, $svgY)); - $this->SVGTransform($tm); - // set clipping for width and height - $x = 0; - $y = 0; - $w = (isset($attribs['width'])?$this->getHTMLUnitToUnits($attribs['width'], 0, $this->svgunit, false):$this->w); - $h = (isset($attribs['height'])?$this->getHTMLUnitToUnits($attribs['height'], 0, $this->svgunit, false):$this->h); - // draw clipping rect - $this->Rect($x, $y, $w, $h, 'CNZ', array(), array()); - // parse viewbox, calculate extra transformation matrix - if (isset($attribs['viewBox'])) { - $tmp = array(); - preg_match_all("/[0-9]+/", $attribs['viewBox'], $tmp); - $tmp = $tmp[0]; - if (sizeof($tmp) == 4) { - $vx = $tmp[0]; - $vy = $tmp[1]; - $vw = $tmp[2]; - $vh = $tmp[3]; - // get aspect ratio - $tmp = array(); - $aspectX = 'xMid'; - $aspectY = 'YMid'; - $fit = 'meet'; - if (isset($attribs['preserveAspectRatio'])) { - if($attribs['preserveAspectRatio'] == 'none') { - $fit = 'none'; - } else { - preg_match_all('/[a-zA-Z]+/', $attribs['preserveAspectRatio'], $tmp); - $tmp = $tmp[0]; - if ((sizeof($tmp) == 2) AND (strlen($tmp[0]) == 8) AND (in_array($tmp[1], array('meet', 'slice', 'none')))) { - $aspectX = substr($tmp[0], 0, 4); - $aspectY = substr($tmp[0], 4, 4); - $fit = $tmp[1]; - } - } - } - $wr = ($svgW / $vw); - $hr = ($svgH / $vh); - $ax = $ay = 0; - if ((($fit == 'meet') AND ($hr < $wr)) OR (($fit == 'slice') AND ($hr > $wr))) { - if ($aspectX == 'xMax') { - $ax = (($vw * ($wr / $hr)) - $vw); - } - if ($aspectX == 'xMid') { - $ax = ((($vw * ($wr / $hr)) - $vw) / 2); - } - $wr = $hr; - } elseif ((($fit == 'meet') AND ($hr > $wr)) OR (($fit == 'slice') AND ($hr < $wr))) { - if ($aspectY == 'YMax') { - $ay = (($vh * ($hr / $wr)) - $vh); - } - if ($aspectY == 'YMid') { - $ay = ((($vh * ($hr / $wr)) - $vh) / 2); - } - $hr = $wr; - } - $newtm = array($wr, 0, 0, $hr, (($wr * ($ax - $vx)) - $svgX), (($hr * ($ay - $vy)) - $svgY)); - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, $newtm); - $this->SVGTransform($tm); - } - } - $this->setSVGStyles($svgstyle, $prev_svgstyle); - break; - } - case 'g': { - // group together related graphics elements - array_push($this->svgstyles, $svgstyle); - $this->StartTransform(); - $x = (isset($attribs['x'])?$attribs['x']:0); - $y = (isset($attribs['y'])?$attribs['y']:0); - $w = 1;//(isset($attribs['width'])?$attribs['width']:1); - $h = 1;//(isset($attribs['height'])?$attribs['height']:1); - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array($w, 0, 0, $h, $x, $y)); - $this->SVGTransform($tm); - $this->setSVGStyles($svgstyle, $prev_svgstyle); - break; - } - case 'linearGradient': { - if ($this->pdfa_mode && $this->pdfa_version < 2) { - break; - } - if (!isset($attribs['id'])) { - $attribs['id'] = 'GR_'.(count($this->svggradients) + 1); - } - $this->svggradientid = $attribs['id']; - $this->svggradients[$this->svggradientid] = array(); - $this->svggradients[$this->svggradientid]['type'] = 2; - $this->svggradients[$this->svggradientid]['stops'] = array(); - if (isset($attribs['gradientUnits'])) { - $this->svggradients[$this->svggradientid]['gradientUnits'] = $attribs['gradientUnits']; - } else { - $this->svggradients[$this->svggradientid]['gradientUnits'] = 'objectBoundingBox'; - } - //$attribs['spreadMethod'] - if (((!isset($attribs['x1'])) AND (!isset($attribs['y1'])) AND (!isset($attribs['x2'])) AND (!isset($attribs['y2']))) - OR ((isset($attribs['x1']) AND (substr($attribs['x1'], -1) == '%')) - OR (isset($attribs['y1']) AND (substr($attribs['y1'], -1) == '%')) - OR (isset($attribs['x2']) AND (substr($attribs['x2'], -1) == '%')) - OR (isset($attribs['y2']) AND (substr($attribs['y2'], -1) == '%')))) { - $this->svggradients[$this->svggradientid]['mode'] = 'percentage'; - } else { - $this->svggradients[$this->svggradientid]['mode'] = 'measure'; - } - $x1 = (isset($attribs['x1'])?$attribs['x1']:'0'); - $y1 = (isset($attribs['y1'])?$attribs['y1']:'0'); - $x2 = (isset($attribs['x2'])?$attribs['x2']:'100'); - $y2 = (isset($attribs['y2'])?$attribs['y2']:'0'); - if (isset($attribs['gradientTransform'])) { - $this->svggradients[$this->svggradientid]['gradientTransform'] = TCPDF_STATIC::getSVGTransformMatrix($attribs['gradientTransform']); - } - $this->svggradients[$this->svggradientid]['coords'] = array($x1, $y1, $x2, $y2); - if (isset($attribs['xlink:href']) AND !empty($attribs['xlink:href'])) { - // gradient is defined on another place - $this->svggradients[$this->svggradientid]['xref'] = substr($attribs['xlink:href'], 1); - } - break; - } - case 'radialGradient': { - if ($this->pdfa_mode && $this->pdfa_version < 2) { - break; - } - if (!isset($attribs['id'])) { - $attribs['id'] = 'GR_'.(count($this->svggradients) + 1); - } - $this->svggradientid = $attribs['id']; - $this->svggradients[$this->svggradientid] = array(); - $this->svggradients[$this->svggradientid]['type'] = 3; - $this->svggradients[$this->svggradientid]['stops'] = array(); - if (isset($attribs['gradientUnits'])) { - $this->svggradients[$this->svggradientid]['gradientUnits'] = $attribs['gradientUnits']; - } else { - $this->svggradients[$this->svggradientid]['gradientUnits'] = 'objectBoundingBox'; - } - //$attribs['spreadMethod'] - if (((!isset($attribs['cx'])) AND (!isset($attribs['cy']))) - OR ((isset($attribs['cx']) AND (substr($attribs['cx'], -1) == '%')) - OR (isset($attribs['cy']) AND (substr($attribs['cy'], -1) == '%')))) { - $this->svggradients[$this->svggradientid]['mode'] = 'percentage'; - } elseif (isset($attribs['r']) AND is_numeric($attribs['r']) AND ($attribs['r']) <= 1) { - $this->svggradients[$this->svggradientid]['mode'] = 'ratio'; - } else { - $this->svggradients[$this->svggradientid]['mode'] = 'measure'; - } - $cx = (isset($attribs['cx']) ? $attribs['cx'] : 0.5); - $cy = (isset($attribs['cy']) ? $attribs['cy'] : 0.5); - $fx = (isset($attribs['fx']) ? $attribs['fx'] : $cx); - $fy = (isset($attribs['fy']) ? $attribs['fy'] : $cy); - $r = (isset($attribs['r']) ? $attribs['r'] : 0.5); - if (isset($attribs['gradientTransform'])) { - $this->svggradients[$this->svggradientid]['gradientTransform'] = TCPDF_STATIC::getSVGTransformMatrix($attribs['gradientTransform']); - } - $this->svggradients[$this->svggradientid]['coords'] = array($cx, $cy, $fx, $fy, $r); - if (isset($attribs['xlink:href']) AND !empty($attribs['xlink:href'])) { - // gradient is defined on another place - $this->svggradients[$this->svggradientid]['xref'] = substr($attribs['xlink:href'], 1); - } - break; - } - case 'stop': { - // gradient stops - if (substr($attribs['offset'], -1) == '%') { - $offset = floatval(substr($attribs['offset'], 0, -1)) / 100; - } else { - $offset = floatval($attribs['offset']); - if ($offset > 1) { - $offset /= 100; - } - } - $stop_color = isset($svgstyle['stop-color'])?TCPDF_COLORS::convertHTMLColorToDec($svgstyle['stop-color'], $this->spot_colors):'black'; - $opacity = isset($svgstyle['stop-opacity'])?$svgstyle['stop-opacity']:1; - $this->svggradients[$this->svggradientid]['stops'][] = array('offset' => $offset, 'color' => $stop_color, 'opacity' => $opacity); - break; - } - // paths - case 'path': { - if ($invisible) { - break; - } - if (isset($attribs['d'])) { - $d = trim($attribs['d']); - if (!empty($d)) { - $x = (isset($attribs['x'])?$attribs['x']:0); - $y = (isset($attribs['y'])?$attribs['y']:0); - $w = (isset($attribs['width'])?$attribs['width']:1); - $h = (isset($attribs['height'])?$attribs['height']:1); - $tm = TCPDF_STATIC::getTransformationMatrixProduct($tm, array($w, 0, 0, $h, $x, $y)); - if ($clipping) { - $this->SVGTransform($tm); - $this->SVGPath($d, 'CNZ'); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'SVGPath', array($d, 'CNZ')); - if (!empty($obstyle)) { - $this->SVGPath($d, $obstyle); - } - $this->StopTransform(); - } - } - } - break; - } - // shapes - case 'rect': { - if ($invisible) { - break; - } - $x = (isset($attribs['x'])?$this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false):0); - $y = (isset($attribs['y'])?$this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false):0); - $w = (isset($attribs['width'])?$this->getHTMLUnitToUnits($attribs['width'], 0, $this->svgunit, false):0); - $h = (isset($attribs['height'])?$this->getHTMLUnitToUnits($attribs['height'], 0, $this->svgunit, false):0); - $rx = (isset($attribs['rx'])?$this->getHTMLUnitToUnits($attribs['rx'], 0, $this->svgunit, false):0); - $ry = (isset($attribs['ry'])?$this->getHTMLUnitToUnits($attribs['ry'], 0, $this->svgunit, false):$rx); - if ($clipping) { - $this->SVGTransform($tm); - $this->RoundedRectXY($x, $y, $w, $h, $rx, $ry, '1111', 'CNZ', array(), array()); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'RoundedRectXY', array($x, $y, $w, $h, $rx, $ry, '1111', 'CNZ')); - if (!empty($obstyle)) { - $this->RoundedRectXY($x, $y, $w, $h, $rx, $ry, '1111', $obstyle, array(), array()); - } - $this->StopTransform(); - } - break; - } - case 'circle': { - if ($invisible) { - break; - } - $r = (isset($attribs['r']) ? $this->getHTMLUnitToUnits($attribs['r'], 0, $this->svgunit, false) : 0); - $cx = (isset($attribs['cx']) ? $this->getHTMLUnitToUnits($attribs['cx'], 0, $this->svgunit, false) : (isset($attribs['x']) ? $this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false) : 0)); - $cy = (isset($attribs['cy']) ? $this->getHTMLUnitToUnits($attribs['cy'], 0, $this->svgunit, false) : (isset($attribs['y']) ? $this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false) : 0)); - $x = ($cx - $r); - $y = ($cy - $r); - $w = (2 * $r); - $h = $w; - if ($clipping) { - $this->SVGTransform($tm); - $this->Circle($cx, $cy, $r, 0, 360, 'CNZ', array(), array(), 8); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Circle', array($cx, $cy, $r, 0, 360, 'CNZ')); - if (!empty($obstyle)) { - $this->Circle($cx, $cy, $r, 0, 360, $obstyle, array(), array(), 8); - } - $this->StopTransform(); - } - break; - } - case 'ellipse': { - if ($invisible) { - break; - } - $rx = (isset($attribs['rx']) ? $this->getHTMLUnitToUnits($attribs['rx'], 0, $this->svgunit, false) : 0); - $ry = (isset($attribs['ry']) ? $this->getHTMLUnitToUnits($attribs['ry'], 0, $this->svgunit, false) : 0); - $cx = (isset($attribs['cx']) ? $this->getHTMLUnitToUnits($attribs['cx'], 0, $this->svgunit, false) : (isset($attribs['x']) ? $this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false) : 0)); - $cy = (isset($attribs['cy']) ? $this->getHTMLUnitToUnits($attribs['cy'], 0, $this->svgunit, false) : (isset($attribs['y']) ? $this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false) : 0)); - $x = ($cx - $rx); - $y = ($cy - $ry); - $w = (2 * $rx); - $h = (2 * $ry); - if ($clipping) { - $this->SVGTransform($tm); - $this->Ellipse($cx, $cy, $rx, $ry, 0, 0, 360, 'CNZ', array(), array(), 8); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Ellipse', array($cx, $cy, $rx, $ry, 0, 0, 360, 'CNZ')); - if (!empty($obstyle)) { - $this->Ellipse($cx, $cy, $rx, $ry, 0, 0, 360, $obstyle, array(), array(), 8); - } - $this->StopTransform(); - } - break; - } - case 'line': { - if ($invisible) { - break; - } - $x1 = (isset($attribs['x1'])?$this->getHTMLUnitToUnits($attribs['x1'], 0, $this->svgunit, false):0); - $y1 = (isset($attribs['y1'])?$this->getHTMLUnitToUnits($attribs['y1'], 0, $this->svgunit, false):0); - $x2 = (isset($attribs['x2'])?$this->getHTMLUnitToUnits($attribs['x2'], 0, $this->svgunit, false):0); - $y2 = (isset($attribs['y2'])?$this->getHTMLUnitToUnits($attribs['y2'], 0, $this->svgunit, false):0); - $x = $x1; - $y = $y1; - $w = abs($x2 - $x1); - $h = abs($y2 - $y1); - if (!$clipping) { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Line', array($x1, $y1, $x2, $y2)); - $this->Line($x1, $y1, $x2, $y2); - $this->StopTransform(); - } - break; - } - case 'polyline': - case 'polygon': { - if ($invisible) { - break; - } - $points = (isset($attribs['points'])?$attribs['points']:'0 0'); - $points = trim($points); - // note that point may use a complex syntax not covered here - $points = preg_split('/[\,\s]+/si', $points); - if (count($points) < 4) { - break; - } - $p = array(); - $xmin = 2147483647; - $xmax = 0; - $ymin = 2147483647; - $ymax = 0; - foreach ($points as $key => $val) { - $p[$key] = $this->getHTMLUnitToUnits($val, 0, $this->svgunit, false); - if (($key % 2) == 0) { - // X coordinate - $xmin = min($xmin, $p[$key]); - $xmax = max($xmax, $p[$key]); - } else { - // Y coordinate - $ymin = min($ymin, $p[$key]); - $ymax = max($ymax, $p[$key]); - } - } - $x = $xmin; - $y = $ymin; - $w = ($xmax - $xmin); - $h = ($ymax - $ymin); - if ($name == 'polyline') { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'PolyLine', array($p, 'CNZ')); - if (!empty($obstyle)) { - $this->PolyLine($p, $obstyle, array(), array()); - } - $this->StopTransform(); - } else { // polygon - if ($clipping) { - $this->SVGTransform($tm); - $this->Polygon($p, 'CNZ', array(), array(), true); - } else { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h, 'Polygon', array($p, 'CNZ')); - if (!empty($obstyle)) { - $this->Polygon($p, $obstyle, array(), array(), true); - } - $this->StopTransform(); - } - } - break; - } - // image - case 'image': { - if ($invisible) { - break; - } - if (!isset($attribs['xlink:href']) OR empty($attribs['xlink:href'])) { - break; - } - $x = (isset($attribs['x'])?$this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false):0); - $y = (isset($attribs['y'])?$this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false):0); - $w = (isset($attribs['width'])?$this->getHTMLUnitToUnits($attribs['width'], 0, $this->svgunit, false):0); - $h = (isset($attribs['height'])?$this->getHTMLUnitToUnits($attribs['height'], 0, $this->svgunit, false):0); - $img = $attribs['xlink:href']; - if (!$clipping) { - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, $w, $h); - if (preg_match('/^data:image\/[^;]+;base64,/', $img, $m) > 0) { - // embedded image encoded as base64 - $img = '@'.base64_decode(substr($img, strlen($m[0]))); - } else { - // fix image path - if (!TCPDF_STATIC::empty_string($this->svgdir) AND (($img[0] == '.') OR (basename($img) == $img))) { - // replace relative path with full server path - $img = $this->svgdir.'/'.$img; - } - if (($img[0] == '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { - $findroot = strpos($img, $_SERVER['DOCUMENT_ROOT']); - if (($findroot === false) OR ($findroot > 1)) { - if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') { - $img = substr($_SERVER['DOCUMENT_ROOT'], 0, -1).$img; - } else { - $img = $_SERVER['DOCUMENT_ROOT'].$img; - } - } - } - $img = urldecode($img); - $testscrtype = @parse_url($img); - if (empty($testscrtype['query'])) { - // convert URL to server path - $img = str_replace(K_PATH_URL, K_PATH_MAIN, $img); - } elseif (preg_match('|^https?://|', $img) !== 1) { - // convert server path to URL - $img = str_replace(K_PATH_MAIN, K_PATH_URL, $img); - } - } - // get image type - $imgtype = TCPDF_IMAGES::getImageFileType($img); - if (($imgtype == 'eps') OR ($imgtype == 'ai')) { - $this->ImageEps($img, $x, $y, $w, $h); - } elseif ($imgtype == 'svg') { - // store SVG vars - $svggradients = $this->svggradients; - $svggradientid = $this->svggradientid; - $svgdefsmode = $this->svgdefsmode; - $svgdefs = $this->svgdefs; - $svgclipmode = $this->svgclipmode; - $svgclippaths = $this->svgclippaths; - $svgcliptm = $this->svgcliptm; - $svgclipid = $this->svgclipid; - $svgtext = $this->svgtext; - $svgtextmode = $this->svgtextmode; - $this->ImageSVG($img, $x, $y, $w, $h); - // restore SVG vars - $this->svggradients = $svggradients; - $this->svggradientid = $svggradientid; - $this->svgdefsmode = $svgdefsmode; - $this->svgdefs = $svgdefs; - $this->svgclipmode = $svgclipmode; - $this->svgclippaths = $svgclippaths; - $this->svgcliptm = $svgcliptm; - $this->svgclipid = $svgclipid; - $this->svgtext = $svgtext; - $this->svgtextmode = $svgtextmode; - } else { - $this->Image($img, $x, $y, $w, $h); - } - $this->StopTransform(); - } - break; - } - // text - case 'text': - case 'tspan': { - if (isset($this->svgtextmode['text-anchor']) AND !empty($this->svgtext)) { - // @TODO: unsupported feature - } - // only basic support - advanced features must be implemented - $this->svgtextmode['invisible'] = $invisible; - if ($invisible) { - break; - } - array_push($this->svgstyles, $svgstyle); - if (isset($attribs['x'])) { - $x = $this->getHTMLUnitToUnits($attribs['x'], 0, $this->svgunit, false); - } elseif ($name == 'tspan') { - $x = $this->x; - } else { - $x = 0; - } - if (isset($attribs['dx'])) { - $x += $this->getHTMLUnitToUnits($attribs['dx'], 0, $this->svgunit, false); - } - if (isset($attribs['y'])) { - $y = $this->getHTMLUnitToUnits($attribs['y'], 0, $this->svgunit, false); - } elseif ($name == 'tspan') { - $y = $this->y; - } else { - $y = 0; - } - if (isset($attribs['dy'])) { - $y += $this->getHTMLUnitToUnits($attribs['dy'], 0, $this->svgunit, false); - } - $svgstyle['text-color'] = $svgstyle['fill']; - $this->svgtext = ''; - if (isset($svgstyle['text-anchor'])) { - $this->svgtextmode['text-anchor'] = $svgstyle['text-anchor']; - } else { - $this->svgtextmode['text-anchor'] = 'start'; - } - if (isset($svgstyle['direction'])) { - if ($svgstyle['direction'] == 'rtl') { - $this->svgtextmode['rtl'] = true; - } else { - $this->svgtextmode['rtl'] = false; - } - } else { - $this->svgtextmode['rtl'] = false; - } - if (isset($svgstyle['stroke']) AND ($svgstyle['stroke'] != 'none') AND isset($svgstyle['stroke-width']) AND ($svgstyle['stroke-width'] > 0)) { - $this->svgtextmode['stroke'] = $this->getHTMLUnitToUnits($svgstyle['stroke-width'], 0, $this->svgunit, false); - } else { - $this->svgtextmode['stroke'] = false; - } - $this->StartTransform(); - $this->SVGTransform($tm); - $obstyle = $this->setSVGStyles($svgstyle, $prev_svgstyle, $x, $y, 1, 1); - $this->x = $x; - $this->y = $y; - break; - } - // use - case 'use': { - if (isset($attribs['xlink:href']) AND !empty($attribs['xlink:href'])) { - $svgdefid = substr($attribs['xlink:href'], 1); - if (isset($this->svgdefs[$svgdefid])) { - $use = $this->svgdefs[$svgdefid]; - if (isset($attribs['xlink:href'])) { - unset($attribs['xlink:href']); - } - if (isset($attribs['id'])) { - unset($attribs['id']); - } - if (isset($use['attribs']['x']) AND isset($attribs['x'])) { - $attribs['x'] += $use['attribs']['x']; - } - if (isset($use['attribs']['y']) AND isset($attribs['y'])) { - $attribs['y'] += $use['attribs']['y']; - } - if (empty($attribs['style'])) { - $attribs['style'] = ''; - } - if (!empty($use['attribs']['style'])) { - // merge styles - $attribs['style'] = str_replace(';;',';',';'.$use['attribs']['style'].$attribs['style']); - } - $attribs = array_merge($use['attribs'], $attribs); - $this->startSVGElementHandler($parser, $use['name'], $attribs); - return; - } - } - break; - } - default: { - break; - } - } // end of switch - // process child elements - if (!empty($attribs['child_elements'])) { - $child_elements = $attribs['child_elements']; - unset($attribs['child_elements']); - foreach($child_elements as $child_element) { - if (empty($child_element['attribs']['closing_tag'])) { - $this->startSVGElementHandler('child-tag', $child_element['name'], $child_element['attribs']); - } else { - if (isset($child_element['attribs']['content'])) { - $this->svgtext = $child_element['attribs']['content']; - } - $this->endSVGElementHandler('child-tag', $child_element['name']); - } - } - } - } - - /** - * Sets the closing SVG element handler function for the XML parser. - * @param resource|string $parser The first parameter, parser, is a reference to the XML parser calling the handler. - * @param string $name The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function endSVGElementHandler($parser, $name) { - $name = $this->removeTagNamespace($name); - if ($this->svgdefsmode AND !in_array($name, array('defs', 'clipPath', 'linearGradient', 'radialGradient', 'stop'))) {; - if (end($this->svgdefs) !== FALSE) { - $last_svgdefs_id = key($this->svgdefs); - if (isset($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'])) { - foreach($this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'] as $child_element) { - if (isset($child_element['attribs']['id']) AND ($child_element['name'] == $name)) { - $this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$child_element['attribs']['id'].'_CLOSE'] = array('name' => $name, 'attribs' => array('closing_tag' => TRUE, 'content' => $this->svgtext)); - return; - } - } - if ($this->svgdefs[$last_svgdefs_id]['name'] == $name) { - $this->svgdefs[$last_svgdefs_id]['attribs']['child_elements'][$last_svgdefs_id.'_CLOSE'] = array('name' => $name, 'attribs' => array('closing_tag' => TRUE, 'content' => $this->svgtext)); - return; - } - } - } - return; - } - switch($name) { - case 'defs': { - $this->svgdefsmode = false; - break; - } - // clipPath - case 'clipPath': { - $this->svgclipmode = false; - break; - } - case 'svg': { - if (--$this->svg_tag_depth <= 0) { - break; - } - } - case 'g': { - // ungroup: remove last style from array - array_pop($this->svgstyles); - $this->StopTransform(); - break; - } - case 'text': - case 'tspan': { - if ($this->svgtextmode['invisible']) { - // This implementation must be fixed to following the rule: - // If the 'visibility' property is set to hidden on a 'tspan', 'tref' or 'altGlyph' element, then the text is invisible but still takes up space in text layout calculations. - break; - } - // print text - $text = $this->svgtext; - //$text = $this->stringTrim($text); - $textlen = $this->GetStringWidth($text); - if ($this->svgtextmode['text-anchor'] != 'start') { - // check if string is RTL text - if ($this->svgtextmode['text-anchor'] == 'end') { - if ($this->svgtextmode['rtl']) { - $this->x += $textlen; - } else { - $this->x -= $textlen; - } - } elseif ($this->svgtextmode['text-anchor'] == 'middle') { - if ($this->svgtextmode['rtl']) { - $this->x += ($textlen / 2); - } else { - $this->x -= ($textlen / 2); - } - } - } - $textrendermode = $this->textrendermode; - $textstrokewidth = $this->textstrokewidth; - $this->setTextRenderingMode($this->svgtextmode['stroke'], true, false); - if ($name == 'text') { - // store current coordinates - $tmpx = $this->x; - $tmpy = $this->y; - } - // print the text - $this->Cell($textlen, 0, $text, 0, 0, '', false, '', 0, false, 'L', 'T'); - if ($name == 'text') { - // restore coordinates - $this->x = $tmpx; - $this->y = $tmpy; - } - // restore previous rendering mode - $this->textrendermode = $textrendermode; - $this->textstrokewidth = $textstrokewidth; - $this->svgtext = ''; - $this->StopTransform(); - if (!$this->svgdefsmode) { - array_pop($this->svgstyles); - } - break; - } - default: { - break; - } - } - } - - /** - * Sets the character data handler function for the XML parser. - * @param resource $parser The first parameter, parser, is a reference to the XML parser calling the handler. - * @param string $data The second parameter, data, contains the character data as a string. - * @author Nicola Asuni - * @since 5.0.000 (2010-05-02) - * @protected - */ - protected function segSVGContentHandler($parser, $data) { - $this->svgtext .= $data; - } - - // --- END SVG METHODS ----------------------------------------------------- - - /** - * Keeps files in memory, so it doesn't need to downloaded everytime in a loop - * @param string $file - * @return string - */ - protected function getCachedFileContents($file) - { - if (!isset($this->fileContentCache[$file])) { - $this->fileContentCache[$file] = TCPDF_STATIC::fileGetContents($file); - } - return $this->fileContentCache[$file]; - } - - /** - * Avoid multiple calls to an external server to see if a file exists - * @param string $file - * @return bool - */ - protected function fileExists($file) - { - if (isset($this->fileContentCache[$file]) || false !== $this->getImageBuffer($file)) { - return true; - } - - return TCPDF_STATIC::file_exists($file); - } - -} // END OF TCPDF CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/tcpdf_autoconfig.php b/lib/combodo/tcpdf/tcpdf_autoconfig.php deleted file mode 100644 index 6ec9ce83b..000000000 --- a/lib/combodo/tcpdf/tcpdf_autoconfig.php +++ /dev/null @@ -1,241 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : Try to automatically configure some TCPDF -// constants if not defined. -// -//============================================================+ - -/** - * @file - * Try to automatically configure some TCPDF constants if not defined. - * @package com.tecnick.tcpdf - * @version 1.1.1 - */ - -// DOCUMENT_ROOT fix for IIS Webserver -if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) { - if(isset($_SERVER['SCRIPT_FILENAME'])) { - $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))); - } elseif(isset($_SERVER['PATH_TRANSLATED'])) { - $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))); - } else { - // define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www') - $_SERVER['DOCUMENT_ROOT'] = '/'; - } -} -$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT']); -if (substr($_SERVER['DOCUMENT_ROOT'], -1) != '/') { - $_SERVER['DOCUMENT_ROOT'] .= '/'; -} - -// Load main configuration file only if the K_TCPDF_EXTERNAL_CONFIG constant is set to false. -if (!defined('K_TCPDF_EXTERNAL_CONFIG') OR !K_TCPDF_EXTERNAL_CONFIG) { - // define a list of default config files in order of priority - $tcpdf_config_files = array(dirname(__FILE__).'/config/tcpdf_config.php', '/etc/php-tcpdf/tcpdf_config.php', '/etc/tcpdf/tcpdf_config.php', '/etc/tcpdf_config.php'); - foreach ($tcpdf_config_files as $tcpdf_config) { - if (@file_exists($tcpdf_config) AND is_readable($tcpdf_config)) { - require_once($tcpdf_config); - break; - } - } -} - -if (!defined('K_PATH_MAIN')) { - define ('K_PATH_MAIN', dirname(__FILE__).'/'); -} - -if (!defined('K_PATH_FONTS')) { - define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/'); -} - -if (!defined('K_PATH_URL')) { - $k_path_url = K_PATH_MAIN; // default value for console mode - if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) { - if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND (strtolower($_SERVER['HTTPS']) != 'off')) { - $k_path_url = 'https://'; - } else { - $k_path_url = 'http://'; - } - $k_path_url .= $_SERVER['HTTP_HOST']; - $k_path_url .= str_replace( '\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1))); - } - define ('K_PATH_URL', $k_path_url); -} - -if (!defined('K_PATH_IMAGES')) { - $tcpdf_images_dirs = array(K_PATH_MAIN.'examples/images/', K_PATH_MAIN.'images/', '/usr/share/doc/php-tcpdf/examples/images/', '/usr/share/doc/tcpdf/examples/images/', '/usr/share/doc/php/tcpdf/examples/images/', '/var/www/tcpdf/images/', '/var/www/html/tcpdf/images/', '/usr/local/apache2/htdocs/tcpdf/images/', K_PATH_MAIN); - foreach ($tcpdf_images_dirs as $tcpdf_images_path) { - if (@file_exists($tcpdf_images_path)) { - define ('K_PATH_IMAGES', $tcpdf_images_path); - break; - } - } -} - -if (!defined('PDF_HEADER_LOGO')) { - $tcpdf_header_logo = ''; - if (@file_exists(K_PATH_IMAGES.'tcpdf_logo.jpg')) { - $tcpdf_header_logo = 'tcpdf_logo.jpg'; - } - define ('PDF_HEADER_LOGO', $tcpdf_header_logo); -} - -if (!defined('PDF_HEADER_LOGO_WIDTH')) { - if (!empty($tcpdf_header_logo)) { - define ('PDF_HEADER_LOGO_WIDTH', 30); - } else { - define ('PDF_HEADER_LOGO_WIDTH', 0); - } -} - -if (!defined('K_PATH_CACHE')) { - $K_PATH_CACHE = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); - if (substr($K_PATH_CACHE, -1) != '/') { - $K_PATH_CACHE .= '/'; - } - define ('K_PATH_CACHE', $K_PATH_CACHE); -} - -if (!defined('K_BLANK_IMAGE')) { - define ('K_BLANK_IMAGE', '_blank.png'); -} - -if (!defined('PDF_PAGE_FORMAT')) { - define ('PDF_PAGE_FORMAT', 'A4'); -} - -if (!defined('PDF_PAGE_ORIENTATION')) { - define ('PDF_PAGE_ORIENTATION', 'P'); -} - -if (!defined('PDF_CREATOR')) { - define ('PDF_CREATOR', 'TCPDF'); -} - -if (!defined('PDF_AUTHOR')) { - define ('PDF_AUTHOR', 'TCPDF'); -} - -if (!defined('PDF_HEADER_TITLE')) { - define ('PDF_HEADER_TITLE', 'TCPDF Example'); -} - -if (!defined('PDF_HEADER_STRING')) { - define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org"); -} - -if (!defined('PDF_UNIT')) { - define ('PDF_UNIT', 'mm'); -} - -if (!defined('PDF_MARGIN_HEADER')) { - define ('PDF_MARGIN_HEADER', 5); -} - -if (!defined('PDF_MARGIN_FOOTER')) { - define ('PDF_MARGIN_FOOTER', 10); -} - -if (!defined('PDF_MARGIN_TOP')) { - define ('PDF_MARGIN_TOP', 27); -} - -if (!defined('PDF_MARGIN_BOTTOM')) { - define ('PDF_MARGIN_BOTTOM', 25); -} - -if (!defined('PDF_MARGIN_LEFT')) { - define ('PDF_MARGIN_LEFT', 15); -} - -if (!defined('PDF_MARGIN_RIGHT')) { - define ('PDF_MARGIN_RIGHT', 15); -} - -if (!defined('PDF_FONT_NAME_MAIN')) { - define ('PDF_FONT_NAME_MAIN', 'helvetica'); -} - -if (!defined('PDF_FONT_SIZE_MAIN')) { - define ('PDF_FONT_SIZE_MAIN', 10); -} - -if (!defined('PDF_FONT_NAME_DATA')) { - define ('PDF_FONT_NAME_DATA', 'helvetica'); -} - -if (!defined('PDF_FONT_SIZE_DATA')) { - define ('PDF_FONT_SIZE_DATA', 8); -} - -if (!defined('PDF_FONT_MONOSPACED')) { - define ('PDF_FONT_MONOSPACED', 'courier'); -} - -if (!defined('PDF_IMAGE_SCALE_RATIO')) { - define ('PDF_IMAGE_SCALE_RATIO', 1.25); -} - -if (!defined('HEAD_MAGNIFICATION')) { - define('HEAD_MAGNIFICATION', 1.1); -} - -if (!defined('K_CELL_HEIGHT_RATIO')) { - define('K_CELL_HEIGHT_RATIO', 1.25); -} - -if (!defined('K_TITLE_MAGNIFICATION')) { - define('K_TITLE_MAGNIFICATION', 1.3); -} - -if (!defined('K_SMALL_RATIO')) { - define('K_SMALL_RATIO', 2/3); -} - -if (!defined('K_THAI_TOPCHARS')) { - define('K_THAI_TOPCHARS', true); -} - -if (!defined('K_TCPDF_CALLS_IN_HTML')) { - define('K_TCPDF_CALLS_IN_HTML', false); -} - -if (!defined('K_TCPDF_THROW_EXCEPTION_ERROR')) { - define('K_TCPDF_THROW_EXCEPTION_ERROR', false); -} - -if (!defined('K_TIMEZONE')) { - define('K_TIMEZONE', @date_default_timezone_get()); -} - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/tcpdf_barcodes_1d.php b/lib/combodo/tcpdf/tcpdf_barcodes_1d.php deleted file mode 100644 index 10a79a72e..000000000 --- a/lib/combodo/tcpdf/tcpdf_barcodes_1d.php +++ /dev/null @@ -1,2356 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : PHP class to creates array representations for -// common 1D barcodes to be used with TCPDF. -// -//============================================================+ - -/** - * @file - * PHP class to creates array representations for common 1D barcodes to be used with TCPDF. - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.027 - */ - -/** - * @class TCPDFBarcode - * PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).
    - * @package com.tecnick.tcpdf - * @version 1.0.027 - * @author Nicola Asuni - */ -class TCPDFBarcode { - - /** - * Array representation of barcode. - * @protected - */ - protected $barcode_array = array(); - - /** - * This is the class constructor. - * Return an array representations for common 1D barcodes:
      - *
    • $arrcode['code'] code to be printed on text label
    • - *
    • $arrcode['maxh'] max barcode height
    • - *
    • $arrcode['maxw'] max barcode width
    • - *
    • $arrcode['bcode'][$k] single bar or space in $k position
    • - *
    • $arrcode['bcode'][$k]['t'] bar type: true = bar, false = space.
    • - *
    • $arrcode['bcode'][$k]['w'] bar width in units.
    • - *
    • $arrcode['bcode'][$k]['h'] bar height in units.
    • - *
    • $arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)
    - * @param string $code code to print - * @param string $type type of barcode:
    • C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
    • C39+ : CODE 39 with checksum
    • C39E : CODE 39 EXTENDED
    • C39E+ : CODE 39 EXTENDED + CHECKSUM
    • C93 : CODE 93 - USS-93
    • S25 : Standard 2 of 5
    • S25+ : Standard 2 of 5 + CHECKSUM
    • I25 : Interleaved 2 of 5
    • I25+ : Interleaved 2 of 5 + CHECKSUM
    • C128 : CODE 128
    • C128A : CODE 128 A
    • C128B : CODE 128 B
    • C128C : CODE 128 C
    • EAN2 : 2-Digits UPC-Based Extension
    • EAN5 : 5-Digits UPC-Based Extension
    • EAN8 : EAN 8
    • EAN13 : EAN 13
    • UPCA : UPC-A
    • UPCE : UPC-E
    • MSI : MSI (Variation of Plessey code)
    • MSI+ : MSI + CHECKSUM (modulo 11)
    • POSTNET : POSTNET
    • PLANET : PLANET
    • RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
    • KIX : KIX (Klant index - Customer index)
    • IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200
    • CODABAR : CODABAR
    • CODE11 : CODE 11
    • PHARMA : PHARMACODE
    • PHARMA2T : PHARMACODE TWO-TRACKS
    - * @public - */ - public function __construct($code, $type) { - $this->setBarcode($code, $type); - } - - /** - * Return an array representations of barcode. - * @return array - * @public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Send barcode as SVG image object to the standard output. - * @param int $w Minimum width of a single bar in user units. - * @param int $h Height of barcode in user units. - * @param string $color Foreground color (in SVG format) for bar elements (background is transparent). - * @public - */ - public function getBarcodeSVG($w=2, $h=30, $color='black') { - // send headers - $code = $this->getBarcodeSVGcode($w, $h, $color); - header('Content-Type: application/svg+xml'); - header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: inline; filename="'.md5($code).'.svg";'); - //header('Content-Length: '.strlen($code)); - echo $code; - } - - /** - * Return a SVG string representation of barcode. - * @param int $w Minimum width of a single bar in user units. - * @param int $h Height of barcode in user units. - * @param string $color Foreground color (in SVG format) for bar elements (background is transparent). - * @return string SVG code. - * @public - */ - public function getBarcodeSVGcode($w=2, $h=30, $color='black') { - // replace table for special characters - $repstr = array("\0" => '', '&' => '&', '<' => '<', '>' => '>'); - $svg = '<'.'?'.'xml version="1.0" standalone="no"'.'?'.'>'."\n"; - $svg .= ''."\n"; - $svg .= ''."\n"; - $svg .= "\t".''.strtr($this->barcode_array['code'], $repstr).''."\n"; - $svg .= "\t".''."\n"; - // print bars - $x = 0; - foreach ($this->barcode_array['bcode'] as $k => $v) { - $bw = round(($v['w'] * $w), 3); - $bh = round(($v['h'] * $h / $this->barcode_array['maxh']), 3); - if ($v['t']) { - $y = round(($v['p'] * $h / $this->barcode_array['maxh']), 3); - // draw a vertical bar - $svg .= "\t\t".''."\n"; - } - $x += $bw; - } - $svg .= "\t".''."\n"; - $svg .= ''."\n"; - return $svg; - } - - /** - * Return an HTML representation of barcode. - * @param int $w Width of a single bar element in pixels. - * @param int $h Height of a single bar element in pixels. - * @param string $color Foreground color for bar elements (background is transparent). - * @return string HTML code. - * @public - */ - public function getBarcodeHTML($w=2, $h=30, $color='black') { - $html = '
    '."\n"; - // print bars - $x = 0; - foreach ($this->barcode_array['bcode'] as $k => $v) { - $bw = round(($v['w'] * $w), 3); - $bh = round(($v['h'] * $h / $this->barcode_array['maxh']), 3); - if ($v['t']) { - $y = round(($v['p'] * $h / $this->barcode_array['maxh']), 3); - // draw a vertical bar - $html .= '
     
    '."\n"; - } - $x += $bw; - } - $html .= '
    '."\n"; - return $html; - } - - /** - * Send a PNG image representation of barcode (requires GD or Imagick library). - * @param int $w Width of a single bar element in pixels. - * @param int $h Height of a single bar element in pixels. - * @param array $color RGB (0-255) foreground color for bar elements (background is transparent). - * @public - */ - public function getBarcodePNG($w=2, $h=30, $color=array(0,0,0)) { - $data = $this->getBarcodePngData($w, $h, $color); - // send headers - header('Content-Type: image/png'); - header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - //header('Content-Length: '.strlen($data)); - echo $data; - } - - /** - * Return a PNG image representation of barcode (requires GD or Imagick library). - * @param int $w Width of a single bar element in pixels. - * @param int $h Height of a single bar element in pixels. - * @param array $color RGB (0-255) foreground color for bar elements (background is transparent). - * @return string|Imagick|false image or false in case of error. - * @public - */ - public function getBarcodePngData($w=2, $h=30, $color=array(0,0,0)) { - // calculate image size - $width = ($this->barcode_array['maxw'] * $w); - $height = $h; - if (function_exists('imagecreate')) { - // GD library - $imagick = false; - $png = imagecreate($width, $height); - $bgcol = imagecolorallocate($png, 255, 255, 255); - imagecolortransparent($png, $bgcol); - $fgcol = imagecolorallocate($png, $color[0], $color[1], $color[2]); - } elseif (extension_loaded('imagick')) { - $imagick = true; - $bgcol = new imagickpixel('rgb(255,255,255'); - $fgcol = new imagickpixel('rgb('.$color[0].','.$color[1].','.$color[2].')'); - $png = new Imagick(); - $png->newImage($width, $height, 'none', 'png'); - $bar = new imagickdraw(); - $bar->setfillcolor($fgcol); - } else { - return false; - } - // print bars - $x = 0; - foreach ($this->barcode_array['bcode'] as $k => $v) { - $bw = round(($v['w'] * $w), 3); - $bh = round(($v['h'] * $h / $this->barcode_array['maxh']), 3); - if ($v['t']) { - $y = round(($v['p'] * $h / $this->barcode_array['maxh']), 3); - // draw a vertical bar - if ($imagick) { - $bar->rectangle($x, $y, ($x + $bw - 1), ($y + $bh - 1)); - } else { - imagefilledrectangle($png, $x, $y, ($x + $bw - 1), ($y + $bh - 1), $fgcol); - } - } - $x += $bw; - } - if ($imagick) { - $png->drawimage($bar); - return $png; - } else { - ob_start(); - imagepng($png); - $imagedata = ob_get_clean(); - imagedestroy($png); - return $imagedata; - } - } - - /** - * Set the barcode. - * @param string $code code to print - * @param string $type type of barcode:
    • C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
    • C39+ : CODE 39 with checksum
    • C39E : CODE 39 EXTENDED
    • C39E+ : CODE 39 EXTENDED + CHECKSUM
    • C93 : CODE 93 - USS-93
    • S25 : Standard 2 of 5
    • S25+ : Standard 2 of 5 + CHECKSUM
    • I25 : Interleaved 2 of 5
    • I25+ : Interleaved 2 of 5 + CHECKSUM
    • C128 : CODE 128
    • C128A : CODE 128 A
    • C128B : CODE 128 B
    • C128C : CODE 128 C
    • EAN2 : 2-Digits UPC-Based Extension
    • EAN5 : 5-Digits UPC-Based Extension
    • EAN8 : EAN 8
    • EAN13 : EAN 13
    • UPCA : UPC-A
    • UPCE : UPC-E
    • MSI : MSI (Variation of Plessey code)
    • MSI+ : MSI + CHECKSUM (modulo 11)
    • POSTNET : POSTNET
    • PLANET : PLANET
    • RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
    • KIX : KIX (Klant index - Customer index)
    • IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200
    • IMBPRE: Pre-processed Intelligent Mail Barcode - Onecode - USPS-B-3200, using only F,A,D,T letters
    • CODABAR : CODABAR
    • CODE11 : CODE 11
    • PHARMA : PHARMACODE
    • PHARMA2T : PHARMACODE TWO-TRACKS
    - * @return void - * @public - */ - public function setBarcode($code, $type) { - switch (strtoupper($type)) { - case 'C39': { // CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. - $arrcode = $this->barcode_code39($code, false, false); - break; - } - case 'C39+': { // CODE 39 with checksum - $arrcode = $this->barcode_code39($code, false, true); - break; - } - case 'C39E': { // CODE 39 EXTENDED - $arrcode = $this->barcode_code39($code, true, false); - break; - } - case 'C39E+': { // CODE 39 EXTENDED + CHECKSUM - $arrcode = $this->barcode_code39($code, true, true); - break; - } - case 'C93': { // CODE 93 - USS-93 - $arrcode = $this->barcode_code93($code); - break; - } - case 'S25': { // Standard 2 of 5 - $arrcode = $this->barcode_s25($code, false); - break; - } - case 'S25+': { // Standard 2 of 5 + CHECKSUM - $arrcode = $this->barcode_s25($code, true); - break; - } - case 'I25': { // Interleaved 2 of 5 - $arrcode = $this->barcode_i25($code, false); - break; - } - case 'I25+': { // Interleaved 2 of 5 + CHECKSUM - $arrcode = $this->barcode_i25($code, true); - break; - } - case 'C128': { // CODE 128 - $arrcode = $this->barcode_c128($code, ''); - break; - } - case 'C128A': { // CODE 128 A - $arrcode = $this->barcode_c128($code, 'A'); - break; - } - case 'C128B': { // CODE 128 B - $arrcode = $this->barcode_c128($code, 'B'); - break; - } - case 'C128C': { // CODE 128 C - $arrcode = $this->barcode_c128($code, 'C'); - break; - } - case 'EAN2': { // 2-Digits UPC-Based Extension - $arrcode = $this->barcode_eanext($code, 2); - break; - } - case 'EAN5': { // 5-Digits UPC-Based Extension - $arrcode = $this->barcode_eanext($code, 5); - break; - } - case 'EAN8': { // EAN 8 - $arrcode = $this->barcode_eanupc($code, 8); - break; - } - case 'EAN13': { // EAN 13 - $arrcode = $this->barcode_eanupc($code, 13); - break; - } - case 'UPCA': { // UPC-A - $arrcode = $this->barcode_eanupc($code, 12); - break; - } - case 'UPCE': { // UPC-E - $arrcode = $this->barcode_eanupc($code, 6); - break; - } - case 'MSI': { // MSI (Variation of Plessey code) - $arrcode = $this->barcode_msi($code, false); - break; - } - case 'MSI+': { // MSI + CHECKSUM (modulo 11) - $arrcode = $this->barcode_msi($code, true); - break; - } - case 'POSTNET': { // POSTNET - $arrcode = $this->barcode_postnet($code, false); - break; - } - case 'PLANET': { // PLANET - $arrcode = $this->barcode_postnet($code, true); - break; - } - case 'RMS4CC': { // RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - $arrcode = $this->barcode_rms4cc($code, false); - break; - } - case 'KIX': { // KIX (Klant index - Customer index) - $arrcode = $this->barcode_rms4cc($code, true); - break; - } - case 'IMB': { // IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200 - $arrcode = $this->barcode_imb($code); - break; - } - case 'IMBPRE': { // IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200- pre-processed - $arrcode = $this->barcode_imb_pre($code); - break; - } - case 'CODABAR': { // CODABAR - $arrcode = $this->barcode_codabar($code); - break; - } - case 'CODE11': { // CODE 11 - $arrcode = $this->barcode_code11($code); - break; - } - case 'PHARMA': { // PHARMACODE - $arrcode = $this->barcode_pharmacode($code); - break; - } - case 'PHARMA2T': { // PHARMACODE TWO-TRACKS - $arrcode = $this->barcode_pharmacode2t($code); - break; - } - default: { - $this->barcode_array = array(); - $arrcode = false; - break; - } - } - $this->barcode_array = $arrcode; - } - - /** - * CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. - * General-purpose code in very wide use world-wide - * @param string $code code to represent. - * @param boolean $extended if true uses the extended mode. - * @param boolean $checksum if true add a checksum to the code. - * @return array barcode representation. - * @protected - */ - protected function barcode_code39($code, $extended=false, $checksum=false) { - $chr['0'] = '111331311'; - $chr['1'] = '311311113'; - $chr['2'] = '113311113'; - $chr['3'] = '313311111'; - $chr['4'] = '111331113'; - $chr['5'] = '311331111'; - $chr['6'] = '113331111'; - $chr['7'] = '111311313'; - $chr['8'] = '311311311'; - $chr['9'] = '113311311'; - $chr['A'] = '311113113'; - $chr['B'] = '113113113'; - $chr['C'] = '313113111'; - $chr['D'] = '111133113'; - $chr['E'] = '311133111'; - $chr['F'] = '113133111'; - $chr['G'] = '111113313'; - $chr['H'] = '311113311'; - $chr['I'] = '113113311'; - $chr['J'] = '111133311'; - $chr['K'] = '311111133'; - $chr['L'] = '113111133'; - $chr['M'] = '313111131'; - $chr['N'] = '111131133'; - $chr['O'] = '311131131'; - $chr['P'] = '113131131'; - $chr['Q'] = '111111333'; - $chr['R'] = '311111331'; - $chr['S'] = '113111331'; - $chr['T'] = '111131331'; - $chr['U'] = '331111113'; - $chr['V'] = '133111113'; - $chr['W'] = '333111111'; - $chr['X'] = '131131113'; - $chr['Y'] = '331131111'; - $chr['Z'] = '133131111'; - $chr['-'] = '131111313'; - $chr['.'] = '331111311'; - $chr[' '] = '133111311'; - $chr['$'] = '131313111'; - $chr['/'] = '131311131'; - $chr['+'] = '131113131'; - $chr['%'] = '111313131'; - $chr['*'] = '131131311'; - $code = strtoupper($code); - if ($extended) { - // extended mode - $code = $this->encode_code39_ext($code); - } - if ($code === false) { - return false; - } - if ($checksum) { - // checksum - $code .= $this->checksum_code39($code); - } - // add start and stop codes - $code = '*'.$code.'*'; - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $k = 0; - $clen = strlen($code); - for ($i = 0; $i < $clen; ++$i) { - $char = $code[$i]; - if(!isset($chr[$char])) { - // invalid character - return false; - } - for ($j = 0; $j < 9; ++$j) { - if (($j % 2) == 0) { - $t = true; // bar - } else { - $t = false; // space - } - $w = $chr[$char][$j]; - $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - ++$k; - } - // intercharacter gap - $bararray['bcode'][$k] = array('t' => false, 'w' => 1, 'h' => 1, 'p' => 0); - $bararray['maxw'] += 1; - ++$k; - } - return $bararray; - } - - /** - * Encode a string to be used for CODE 39 Extended mode. - * @param string $code code to represent. - * @return string encoded string. - * @protected - */ - protected function encode_code39_ext($code) { - $encode = array( - chr(0) => '%U', chr(1) => '$A', chr(2) => '$B', chr(3) => '$C', - chr(4) => '$D', chr(5) => '$E', chr(6) => '$F', chr(7) => '$G', - chr(8) => '$H', chr(9) => '$I', chr(10) => '$J', chr(11) => '£K', - chr(12) => '$L', chr(13) => '$M', chr(14) => '$N', chr(15) => '$O', - chr(16) => '$P', chr(17) => '$Q', chr(18) => '$R', chr(19) => '$S', - chr(20) => '$T', chr(21) => '$U', chr(22) => '$V', chr(23) => '$W', - chr(24) => '$X', chr(25) => '$Y', chr(26) => '$Z', chr(27) => '%A', - chr(28) => '%B', chr(29) => '%C', chr(30) => '%D', chr(31) => '%E', - chr(32) => ' ', chr(33) => '/A', chr(34) => '/B', chr(35) => '/C', - chr(36) => '/D', chr(37) => '/E', chr(38) => '/F', chr(39) => '/G', - chr(40) => '/H', chr(41) => '/I', chr(42) => '/J', chr(43) => '/K', - chr(44) => '/L', chr(45) => '-', chr(46) => '.', chr(47) => '/O', - chr(48) => '0', chr(49) => '1', chr(50) => '2', chr(51) => '3', - chr(52) => '4', chr(53) => '5', chr(54) => '6', chr(55) => '7', - chr(56) => '8', chr(57) => '9', chr(58) => '/Z', chr(59) => '%F', - chr(60) => '%G', chr(61) => '%H', chr(62) => '%I', chr(63) => '%J', - chr(64) => '%V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C', - chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G', - chr(72) => 'H', chr(73) => 'I', chr(74) => 'J', chr(75) => 'K', - chr(76) => 'L', chr(77) => 'M', chr(78) => 'N', chr(79) => 'O', - chr(80) => 'P', chr(81) => 'Q', chr(82) => 'R', chr(83) => 'S', - chr(84) => 'T', chr(85) => 'U', chr(86) => 'V', chr(87) => 'W', - chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => '%K', - chr(92) => '%L', chr(93) => '%M', chr(94) => '%N', chr(95) => '%O', - chr(96) => '%W', chr(97) => '+A', chr(98) => '+B', chr(99) => '+C', - chr(100) => '+D', chr(101) => '+E', chr(102) => '+F', chr(103) => '+G', - chr(104) => '+H', chr(105) => '+I', chr(106) => '+J', chr(107) => '+K', - chr(108) => '+L', chr(109) => '+M', chr(110) => '+N', chr(111) => '+O', - chr(112) => '+P', chr(113) => '+Q', chr(114) => '+R', chr(115) => '+S', - chr(116) => '+T', chr(117) => '+U', chr(118) => '+V', chr(119) => '+W', - chr(120) => '+X', chr(121) => '+Y', chr(122) => '+Z', chr(123) => '%P', - chr(124) => '%Q', chr(125) => '%R', chr(126) => '%S', chr(127) => '%T'); - $code_ext = ''; - $clen = strlen($code); - for ($i = 0 ; $i < $clen; ++$i) { - if (ord($code[$i]) > 127) { - return false; - } - $code_ext .= $encode[$code[$i]]; - } - return $code_ext; - } - - /** - * Calculate CODE 39 checksum (modulo 43). - * @param string $code code to represent. - * @return string char checksum. - * @protected - */ - protected function checksum_code39($code) { - $chars = array( - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', - 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%'); - $sum = 0; - $clen = strlen($code); - for ($i = 0 ; $i < $clen; ++$i) { - $k = array_keys($chars, $code[$i]); - $sum += $k[0]; - } - $j = ($sum % 43); - return $chars[$j]; - } - - /** - * CODE 93 - USS-93 - * Compact code similar to Code 39 - * @param string $code code to represent. - * @return array barcode representation. - * @protected - */ - protected function barcode_code93($code) { - $chr[48] = '131112'; // 0 - $chr[49] = '111213'; // 1 - $chr[50] = '111312'; // 2 - $chr[51] = '111411'; // 3 - $chr[52] = '121113'; // 4 - $chr[53] = '121212'; // 5 - $chr[54] = '121311'; // 6 - $chr[55] = '111114'; // 7 - $chr[56] = '131211'; // 8 - $chr[57] = '141111'; // 9 - $chr[65] = '211113'; // A - $chr[66] = '211212'; // B - $chr[67] = '211311'; // C - $chr[68] = '221112'; // D - $chr[69] = '221211'; // E - $chr[70] = '231111'; // F - $chr[71] = '112113'; // G - $chr[72] = '112212'; // H - $chr[73] = '112311'; // I - $chr[74] = '122112'; // J - $chr[75] = '132111'; // K - $chr[76] = '111123'; // L - $chr[77] = '111222'; // M - $chr[78] = '111321'; // N - $chr[79] = '121122'; // O - $chr[80] = '131121'; // P - $chr[81] = '212112'; // Q - $chr[82] = '212211'; // R - $chr[83] = '211122'; // S - $chr[84] = '211221'; // T - $chr[85] = '221121'; // U - $chr[86] = '222111'; // V - $chr[87] = '112122'; // W - $chr[88] = '112221'; // X - $chr[89] = '122121'; // Y - $chr[90] = '123111'; // Z - $chr[45] = '121131'; // - - $chr[46] = '311112'; // . - $chr[32] = '311211'; // - $chr[36] = '321111'; // $ - $chr[47] = '112131'; // / - $chr[43] = '113121'; // + - $chr[37] = '211131'; // % - $chr[128] = '121221'; // ($) - $chr[129] = '311121'; // (/) - $chr[130] = '122211'; // (+) - $chr[131] = '312111'; // (%) - $chr[42] = '111141'; // start-stop - $code = strtoupper($code); - $encode = array( - chr(0) => chr(131).'U', chr(1) => chr(128).'A', chr(2) => chr(128).'B', chr(3) => chr(128).'C', - chr(4) => chr(128).'D', chr(5) => chr(128).'E', chr(6) => chr(128).'F', chr(7) => chr(128).'G', - chr(8) => chr(128).'H', chr(9) => chr(128).'I', chr(10) => chr(128).'J', chr(11) => '£K', - chr(12) => chr(128).'L', chr(13) => chr(128).'M', chr(14) => chr(128).'N', chr(15) => chr(128).'O', - chr(16) => chr(128).'P', chr(17) => chr(128).'Q', chr(18) => chr(128).'R', chr(19) => chr(128).'S', - chr(20) => chr(128).'T', chr(21) => chr(128).'U', chr(22) => chr(128).'V', chr(23) => chr(128).'W', - chr(24) => chr(128).'X', chr(25) => chr(128).'Y', chr(26) => chr(128).'Z', chr(27) => chr(131).'A', - chr(28) => chr(131).'B', chr(29) => chr(131).'C', chr(30) => chr(131).'D', chr(31) => chr(131).'E', - chr(32) => ' ', chr(33) => chr(129).'A', chr(34) => chr(129).'B', chr(35) => chr(129).'C', - chr(36) => chr(129).'D', chr(37) => chr(129).'E', chr(38) => chr(129).'F', chr(39) => chr(129).'G', - chr(40) => chr(129).'H', chr(41) => chr(129).'I', chr(42) => chr(129).'J', chr(43) => chr(129).'K', - chr(44) => chr(129).'L', chr(45) => '-', chr(46) => '.', chr(47) => chr(129).'O', - chr(48) => '0', chr(49) => '1', chr(50) => '2', chr(51) => '3', - chr(52) => '4', chr(53) => '5', chr(54) => '6', chr(55) => '7', - chr(56) => '8', chr(57) => '9', chr(58) => chr(129).'Z', chr(59) => chr(131).'F', - chr(60) => chr(131).'G', chr(61) => chr(131).'H', chr(62) => chr(131).'I', chr(63) => chr(131).'J', - chr(64) => chr(131).'V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C', - chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G', - chr(72) => 'H', chr(73) => 'I', chr(74) => 'J', chr(75) => 'K', - chr(76) => 'L', chr(77) => 'M', chr(78) => 'N', chr(79) => 'O', - chr(80) => 'P', chr(81) => 'Q', chr(82) => 'R', chr(83) => 'S', - chr(84) => 'T', chr(85) => 'U', chr(86) => 'V', chr(87) => 'W', - chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => chr(131).'K', - chr(92) => chr(131).'L', chr(93) => chr(131).'M', chr(94) => chr(131).'N', chr(95) => chr(131).'O', - chr(96) => chr(131).'W', chr(97) => chr(130).'A', chr(98) => chr(130).'B', chr(99) => chr(130).'C', - chr(100) => chr(130).'D', chr(101) => chr(130).'E', chr(102) => chr(130).'F', chr(103) => chr(130).'G', - chr(104) => chr(130).'H', chr(105) => chr(130).'I', chr(106) => chr(130).'J', chr(107) => chr(130).'K', - chr(108) => chr(130).'L', chr(109) => chr(130).'M', chr(110) => chr(130).'N', chr(111) => chr(130).'O', - chr(112) => chr(130).'P', chr(113) => chr(130).'Q', chr(114) => chr(130).'R', chr(115) => chr(130).'S', - chr(116) => chr(130).'T', chr(117) => chr(130).'U', chr(118) => chr(130).'V', chr(119) => chr(130).'W', - chr(120) => chr(130).'X', chr(121) => chr(130).'Y', chr(122) => chr(130).'Z', chr(123) => chr(131).'P', - chr(124) => chr(131).'Q', chr(125) => chr(131).'R', chr(126) => chr(131).'S', chr(127) => chr(131).'T'); - $code_ext = ''; - $clen = strlen($code); - for ($i = 0 ; $i < $clen; ++$i) { - if (ord($code[$i]) > 127) { - return false; - } - $code_ext .= $encode[$code[$i]]; - } - // checksum - $code_ext .= $this->checksum_code93($code_ext); - // add start and stop codes - $code = '*'.$code_ext.'*'; - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $k = 0; - $clen = strlen($code); - for ($i = 0; $i < $clen; ++$i) { - $char = ord($code[$i]); - if(!isset($chr[$char])) { - // invalid character - return false; - } - for ($j = 0; $j < 6; ++$j) { - if (($j % 2) == 0) { - $t = true; // bar - } else { - $t = false; // space - } - $w = $chr[$char][$j]; - $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - ++$k; - } - } - $bararray['bcode'][$k] = array('t' => true, 'w' => 1, 'h' => 1, 'p' => 0); - $bararray['maxw'] += 1; - ++$k; - return $bararray; - } - - /** - * Calculate CODE 93 checksum (modulo 47). - * @param string $code code to represent. - * @return string checksum code. - * @protected - */ - protected function checksum_code93($code) { - $chars = array( - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', - 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%', - '<', '=', '>', '?'); - // translate special characters - $code = strtr($code, chr(128).chr(131).chr(129).chr(130), '<=>?'); - $len = strlen($code); - // calculate check digit C - $p = 1; - $check = 0; - for ($i = ($len - 1); $i >= 0; --$i) { - $k = array_keys($chars, $code[$i]); - $check += ($k[0] * $p); - ++$p; - if ($p > 20) { - $p = 1; - } - } - $check %= 47; - $c = $chars[$check]; - $code .= $c; - // calculate check digit K - $p = 1; - $check = 0; - for ($i = $len; $i >= 0; --$i) { - $k = array_keys($chars, $code[$i]); - $check += ($k[0] * $p); - ++$p; - if ($p > 15) { - $p = 1; - } - } - $check %= 47; - $k = $chars[$check]; - $checksum = $c.$k; - // resto respecial characters - $checksum = strtr($checksum, '<=>?', chr(128).chr(131).chr(129).chr(130)); - return $checksum; - } - - /** - * Checksum for standard 2 of 5 barcodes. - * @param string $code code to process. - * @return int checksum. - * @protected - */ - protected function checksum_s25($code) { - $len = strlen($code); - $sum = 0; - for ($i = 0; $i < $len; $i+=2) { - $sum += $code[$i]; - } - $sum *= 3; - for ($i = 1; $i < $len; $i+=2) { - $sum += ($code[$i]); - } - $r = $sum % 10; - if($r > 0) { - $r = (10 - $r); - } - return $r; - } - - /** - * MSI. - * Variation of Plessey code, with similar applications - * Contains digits (0 to 9) and encodes the data only in the width of bars. - * @param string $code code to represent. - * @param boolean $checksum if true add a checksum to the code (modulo 11) - * @return array barcode representation. - * @protected - */ - protected function barcode_msi($code, $checksum=false) { - $chr['0'] = '100100100100'; - $chr['1'] = '100100100110'; - $chr['2'] = '100100110100'; - $chr['3'] = '100100110110'; - $chr['4'] = '100110100100'; - $chr['5'] = '100110100110'; - $chr['6'] = '100110110100'; - $chr['7'] = '100110110110'; - $chr['8'] = '110100100100'; - $chr['9'] = '110100100110'; - $chr['A'] = '110100110100'; - $chr['B'] = '110100110110'; - $chr['C'] = '110110100100'; - $chr['D'] = '110110100110'; - $chr['E'] = '110110110100'; - $chr['F'] = '110110110110'; - if ($checksum) { - // add checksum - $clen = strlen($code); - $p = 2; - $check = 0; - for ($i = ($clen - 1); $i >= 0; --$i) { - $check += (hexdec($code[$i]) * $p); - ++$p; - if ($p > 7) { - $p = 2; - } - } - $check %= 11; - if ($check > 0) { - $check = 11 - $check; - } - $code .= $check; - } - $seq = '110'; // left guard - $clen = strlen($code); - for ($i = 0; $i < $clen; ++$i) { - $digit = $code[$i]; - if (!isset($chr[$digit])) { - // invalid character - return false; - } - $seq .= $chr[$digit]; - } - $seq .= '1001'; // right guard - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - return $this->binseq_to_array($seq, $bararray); - } - - /** - * Standard 2 of 5 barcodes. - * Used in airline ticket marking, photofinishing - * Contains digits (0 to 9) and encodes the data only in the width of bars. - * @param string $code code to represent. - * @param boolean $checksum if true add a checksum to the code - * @return array barcode representation. - * @protected - */ - protected function barcode_s25($code, $checksum=false) { - $chr['0'] = '10101110111010'; - $chr['1'] = '11101010101110'; - $chr['2'] = '10111010101110'; - $chr['3'] = '11101110101010'; - $chr['4'] = '10101110101110'; - $chr['5'] = '11101011101010'; - $chr['6'] = '10111011101010'; - $chr['7'] = '10101011101110'; - $chr['8'] = '10101110111010'; - $chr['9'] = '10111010111010'; - if ($checksum) { - // add checksum - $code .= $this->checksum_s25($code); - } - if((strlen($code) % 2) != 0) { - // add leading zero if code-length is odd - $code = '0'.$code; - } - $seq = '11011010'; - $clen = strlen($code); - for ($i = 0; $i < $clen; ++$i) { - $digit = $code[$i]; - if (!isset($chr[$digit])) { - // invalid character - return false; - } - $seq .= $chr[$digit]; - } - $seq .= '1101011'; - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - return $this->binseq_to_array($seq, $bararray); - } - - /** - * Convert binary barcode sequence to WarnockPDF barcode array. - * @param string $seq barcode as binary sequence. - * @param array $bararray barcode array to fill up - * @return array barcode representation. - * @protected - */ - protected function binseq_to_array($seq, $bararray) { - $len = strlen($seq); - $w = 0; - $k = 0; - for ($i = 0; $i < $len; ++$i) { - $w += 1; - if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq[$i] != $seq[($i+1)]))) { - if ($seq[$i] == '1') { - $t = true; // bar - } else { - $t = false; // space - } - $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - ++$k; - $w = 0; - } - } - return $bararray; - } - - /** - * Interleaved 2 of 5 barcodes. - * Compact numeric code, widely used in industry, air cargo - * Contains digits (0 to 9) and encodes the data in the width of both bars and spaces. - * @param string $code code to represent. - * @param boolean $checksum if true add a checksum to the code - * @return array barcode representation. - * @protected - */ - protected function barcode_i25($code, $checksum=false) { - $chr['0'] = '11221'; - $chr['1'] = '21112'; - $chr['2'] = '12112'; - $chr['3'] = '22111'; - $chr['4'] = '11212'; - $chr['5'] = '21211'; - $chr['6'] = '12211'; - $chr['7'] = '11122'; - $chr['8'] = '21121'; - $chr['9'] = '12121'; - $chr['A'] = '11'; - $chr['Z'] = '21'; - if ($checksum) { - // add checksum - $code .= $this->checksum_s25($code); - } - if((strlen($code) % 2) != 0) { - // add leading zero if code-length is odd - $code = '0'.$code; - } - // add start and stop codes - $code = 'AA'.strtolower($code).'ZA'; - - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $k = 0; - $clen = strlen($code); - for ($i = 0; $i < $clen; $i = ($i + 2)) { - $char_bar = $code[$i]; - $char_space = $code[$i+1]; - if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) { - // invalid character - return false; - } - // create a bar-space sequence - $seq = ''; - $chrlen = strlen($chr[$char_bar]); - for ($s = 0; $s < $chrlen; $s++){ - $seq .= $chr[$char_bar][$s] . $chr[$char_space][$s]; - } - $seqlen = strlen($seq); - for ($j = 0; $j < $seqlen; ++$j) { - if (($j % 2) == 0) { - $t = true; // bar - } else { - $t = false; // space - } - $w = (float)$seq[$j]; - $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - ++$k; - } - } - return $bararray; - } - - /** - * C128 barcodes. - * Very capable code, excellent density, high reliability; in very wide use world-wide - * @param string $code code to represent. - * @param string $type barcode type: A, B, C or empty for automatic switch (AUTO mode) - * @return array barcode representation. - * @protected - */ - protected function barcode_c128($code, $type='') { - $chr = array( - '212222', /* 00 */ - '222122', /* 01 */ - '222221', /* 02 */ - '121223', /* 03 */ - '121322', /* 04 */ - '131222', /* 05 */ - '122213', /* 06 */ - '122312', /* 07 */ - '132212', /* 08 */ - '221213', /* 09 */ - '221312', /* 10 */ - '231212', /* 11 */ - '112232', /* 12 */ - '122132', /* 13 */ - '122231', /* 14 */ - '113222', /* 15 */ - '123122', /* 16 */ - '123221', /* 17 */ - '223211', /* 18 */ - '221132', /* 19 */ - '221231', /* 20 */ - '213212', /* 21 */ - '223112', /* 22 */ - '312131', /* 23 */ - '311222', /* 24 */ - '321122', /* 25 */ - '321221', /* 26 */ - '312212', /* 27 */ - '322112', /* 28 */ - '322211', /* 29 */ - '212123', /* 30 */ - '212321', /* 31 */ - '232121', /* 32 */ - '111323', /* 33 */ - '131123', /* 34 */ - '131321', /* 35 */ - '112313', /* 36 */ - '132113', /* 37 */ - '132311', /* 38 */ - '211313', /* 39 */ - '231113', /* 40 */ - '231311', /* 41 */ - '112133', /* 42 */ - '112331', /* 43 */ - '132131', /* 44 */ - '113123', /* 45 */ - '113321', /* 46 */ - '133121', /* 47 */ - '313121', /* 48 */ - '211331', /* 49 */ - '231131', /* 50 */ - '213113', /* 51 */ - '213311', /* 52 */ - '213131', /* 53 */ - '311123', /* 54 */ - '311321', /* 55 */ - '331121', /* 56 */ - '312113', /* 57 */ - '312311', /* 58 */ - '332111', /* 59 */ - '314111', /* 60 */ - '221411', /* 61 */ - '431111', /* 62 */ - '111224', /* 63 */ - '111422', /* 64 */ - '121124', /* 65 */ - '121421', /* 66 */ - '141122', /* 67 */ - '141221', /* 68 */ - '112214', /* 69 */ - '112412', /* 70 */ - '122114', /* 71 */ - '122411', /* 72 */ - '142112', /* 73 */ - '142211', /* 74 */ - '241211', /* 75 */ - '221114', /* 76 */ - '413111', /* 77 */ - '241112', /* 78 */ - '134111', /* 79 */ - '111242', /* 80 */ - '121142', /* 81 */ - '121241', /* 82 */ - '114212', /* 83 */ - '124112', /* 84 */ - '124211', /* 85 */ - '411212', /* 86 */ - '421112', /* 87 */ - '421211', /* 88 */ - '212141', /* 89 */ - '214121', /* 90 */ - '412121', /* 91 */ - '111143', /* 92 */ - '111341', /* 93 */ - '131141', /* 94 */ - '114113', /* 95 */ - '114311', /* 96 */ - '411113', /* 97 */ - '411311', /* 98 */ - '113141', /* 99 */ - '114131', /* 100 */ - '311141', /* 101 */ - '411131', /* 102 */ - '211412', /* 103 START A */ - '211214', /* 104 START B */ - '211232', /* 105 START C */ - '233111', /* STOP */ - '200000' /* END */ - ); - // ASCII characters for code A (ASCII 00 - 95) - $keys_a = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'; - $keys_a .= chr(0).chr(1).chr(2).chr(3).chr(4).chr(5).chr(6).chr(7).chr(8).chr(9); - $keys_a .= chr(10).chr(11).chr(12).chr(13).chr(14).chr(15).chr(16).chr(17).chr(18).chr(19); - $keys_a .= chr(20).chr(21).chr(22).chr(23).chr(24).chr(25).chr(26).chr(27).chr(28).chr(29); - $keys_a .= chr(30).chr(31); - // ASCII characters for code B (ASCII 32 - 127) - $keys_b = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.chr(127); - // special codes - $fnc_a = array(241 => 102, 242 => 97, 243 => 96, 244 => 101); - $fnc_b = array(241 => 102, 242 => 97, 243 => 96, 244 => 100); - // array of symbols - $code_data = array(); - // length of the code - $len = strlen($code); - switch(strtoupper($type)) { - case 'A': { // MODE A - $startid = 103; - for ($i = 0; $i < $len; ++$i) { - $char = $code[$i]; - $char_id = ord($char); - if (($char_id >= 241) AND ($char_id <= 244)) { - $code_data[] = $fnc_a[$char_id]; - } elseif (($char_id >= 0) AND ($char_id <= 95)) { - $code_data[] = strpos($keys_a, $char); - } else { - return false; - } - } - break; - } - case 'B': { // MODE B - $startid = 104; - for ($i = 0; $i < $len; ++$i) { - $char = $code[$i]; - $char_id = ord($char); - if (($char_id >= 241) AND ($char_id <= 244)) { - $code_data[] = $fnc_b[$char_id]; - } elseif (($char_id >= 32) AND ($char_id <= 127)) { - $code_data[] = strpos($keys_b, $char); - } else { - return false; - } - } - break; - } - case 'C': { // MODE C - $startid = 105; - if (ord($code[0]) == 241) { - $code_data[] = 102; - $code = substr($code, 1); - --$len; - } - if (($len % 2) != 0) { - // the length must be even - return false; - } - for ($i = 0; $i < $len; $i+=2) { - $chrnum = $code[$i].$code[$i+1]; - if (preg_match('/([0-9]{2})/', $chrnum) > 0) { - $code_data[] = intval($chrnum); - } else { - return false; - } - } - break; - } - default: { // MODE AUTO - // split code into sequences - $sequence = array(); - // get numeric sequences (if any) - $numseq = array(); - preg_match_all('/([0-9]{4,})/', $code, $numseq, PREG_OFFSET_CAPTURE); - if (isset($numseq[1]) AND !empty($numseq[1])) { - $end_offset = 0; - foreach ($numseq[1] as $val) { - $offset = $val[1]; - if ($offset > $end_offset) { - // non numeric sequence - $sequence = array_merge($sequence, $this->get128ABsequence(substr($code, $end_offset, ($offset - $end_offset)))); - } - // numeric sequence - $slen = strlen($val[0]); - if (($slen % 2) != 0) { - // the length must be even - --$slen; - } - $sequence[] = array('C', substr($code, $offset, $slen), $slen); - $end_offset = $offset + $slen; - } - if ($end_offset < $len) { - $sequence = array_merge($sequence, $this->get128ABsequence(substr($code, $end_offset))); - } - } else { - // text code (non C mode) - $sequence = array_merge($sequence, $this->get128ABsequence($code)); - } - // process the sequence - foreach ($sequence as $key => $seq) { - switch($seq[0]) { - case 'A': { - if ($key == 0) { - $startid = 103; - } elseif ($sequence[($key - 1)][0] != 'A') { - if (($seq[2] == 1) AND ($key > 0) AND ($sequence[($key - 1)][0] == 'B') AND (!isset($sequence[($key - 1)][3]))) { - // single character shift - $code_data[] = 98; - // mark shift - $sequence[$key][3] = true; - } elseif (!isset($sequence[($key - 1)][3])) { - $code_data[] = 101; - } - } - for ($i = 0; $i < $seq[2]; ++$i) { - $char = $seq[1][$i]; - $char_id = ord($char); - if (($char_id >= 241) AND ($char_id <= 244)) { - $code_data[] = $fnc_a[$char_id]; - } else { - $code_data[] = strpos($keys_a, $char); - } - } - break; - } - case 'B': { - if ($key == 0) { - $tmpchr = ord($seq[1][0]); - if (($seq[2] == 1) AND ($tmpchr >= 241) AND ($tmpchr <= 244) AND isset($sequence[($key + 1)]) AND ($sequence[($key + 1)][0] != 'B')) { - switch ($sequence[($key + 1)][0]) { - case 'A': { - $startid = 103; - $sequence[$key][0] = 'A'; - $code_data[] = $fnc_a[$tmpchr]; - break; - } - case 'C': { - $startid = 105; - $sequence[$key][0] = 'C'; - $code_data[] = $fnc_a[$tmpchr]; - break; - } - } - break; - } else { - $startid = 104; - } - } elseif ($sequence[($key - 1)][0] != 'B') { - if (($seq[2] == 1) AND ($key > 0) AND ($sequence[($key - 1)][0] == 'A') AND (!isset($sequence[($key - 1)][3]))) { - // single character shift - $code_data[] = 98; - // mark shift - $sequence[$key][3] = true; - } elseif (!isset($sequence[($key - 1)][3])) { - $code_data[] = 100; - } - } - for ($i = 0; $i < $seq[2]; ++$i) { - $char = $seq[1][$i]; - $char_id = ord($char); - if (($char_id >= 241) AND ($char_id <= 244)) { - $code_data[] = $fnc_b[$char_id]; - } else { - $code_data[] = strpos($keys_b, $char); - } - } - break; - } - case 'C': { - if ($key == 0) { - $startid = 105; - } elseif ($sequence[($key - 1)][0] != 'C') { - $code_data[] = 99; - } - for ($i = 0; $i < $seq[2]; $i+=2) { - $chrnum = $seq[1][$i].$seq[1][$i+1]; - $code_data[] = intval($chrnum); - } - break; - } - } - } - } - } - // calculate check character - $sum = $startid; - foreach ($code_data as $key => $val) { - $sum += ($val * ($key + 1)); - } - // add check character - $code_data[] = ($sum % 103); - // add stop sequence - $code_data[] = 106; - $code_data[] = 107; - // add start code at the beginning - array_unshift($code_data, $startid); - // build barcode array - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - foreach ($code_data as $val) { - $seq = $chr[$val]; - for ($j = 0; $j < 6; ++$j) { - if (($j % 2) == 0) { - $t = true; // bar - } else { - $t = false; // space - } - $w = (float)$seq[$j]; - $bararray['bcode'][] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - } - } - return $bararray; - } - - /** - * Split text code in A/B sequence for 128 code - * @param string $code code to split. - * @return array sequence - * @protected - */ - protected function get128ABsequence($code) { - $len = strlen($code); - $sequence = array(); - // get A sequences (if any) - $numseq = array(); - preg_match_all('/([\0-\31])/', $code, $numseq, PREG_OFFSET_CAPTURE); - if (isset($numseq[1]) AND !empty($numseq[1])) { - $end_offset = 0; - foreach ($numseq[1] as $val) { - $offset = $val[1]; - if ($offset > $end_offset) { - // B sequence - $sequence[] = array('B', substr($code, $end_offset, ($offset - $end_offset)), ($offset - $end_offset)); - } - // A sequence - $slen = strlen($val[0]); - $sequence[] = array('A', substr($code, $offset, $slen), $slen); - $end_offset = $offset + $slen; - } - if ($end_offset < $len) { - $sequence[] = array('B', substr($code, $end_offset), ($len - $end_offset)); - } - } else { - // only B sequence - $sequence[] = array('B', $code, $len); - } - return $sequence; - } - - /** - * EAN13 and UPC-A barcodes. - * EAN13: European Article Numbering international retail product code - * UPC-A: Universal product code seen on almost all retail products in the USA and Canada - * UPC-E: Short version of UPC symbol - * @param string $code code to represent. - * @param string $len barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A - * @return array barcode representation. - * @protected - */ - protected function barcode_eanupc($code, $len=13) { - $upce = false; - if ($len == 6) { - $len = 12; // UPC-A - $upce = true; // UPC-E mode - } - $data_len = $len - 1; - //Padding - $code = str_pad($code, $data_len, '0', STR_PAD_LEFT); - $code_len = strlen($code); - // calculate check digit - $sum_a = 0; - for ($i = 1; $i < $data_len; $i+=2) { - $sum_a += $code[$i]; - } - if ($len > 12) { - $sum_a *= 3; - } - $sum_b = 0; - for ($i = 0; $i < $data_len; $i+=2) { - $sum_b += ($code[$i]); - } - if ($len < 13) { - $sum_b *= 3; - } - $r = ($sum_a + $sum_b) % 10; - if($r > 0) { - $r = (10 - $r); - } - if ($code_len == $data_len) { - // add check digit - $code .= $r; - } elseif ($r !== intval($code[$data_len])) { - // wrong checkdigit - return false; - } - if ($len == 12) { - // UPC-A - $code = '0'.$code; - ++$len; - } - if ($upce) { - // convert UPC-A to UPC-E - $tmp = substr($code, 4, 3); - if (($tmp == '000') OR ($tmp == '100') OR ($tmp == '200')) { - // manufacturer code ends in 000, 100, or 200 - $upce_code = substr($code, 2, 2).substr($code, 9, 3).substr($code, 4, 1); - } else { - $tmp = substr($code, 5, 2); - if ($tmp == '00') { - // manufacturer code ends in 00 - $upce_code = substr($code, 2, 3).substr($code, 10, 2).'3'; - } else { - $tmp = substr($code, 6, 1); - if ($tmp == '0') { - // manufacturer code ends in 0 - $upce_code = substr($code, 2, 4).substr($code, 11, 1).'4'; - } else { - // manufacturer code does not end in zero - $upce_code = substr($code, 2, 5).substr($code, 11, 1); - } - } - } - } - //Convert digits to bars - $codes = array( - 'A'=>array( // left odd parity - '0'=>'0001101', - '1'=>'0011001', - '2'=>'0010011', - '3'=>'0111101', - '4'=>'0100011', - '5'=>'0110001', - '6'=>'0101111', - '7'=>'0111011', - '8'=>'0110111', - '9'=>'0001011'), - 'B'=>array( // left even parity - '0'=>'0100111', - '1'=>'0110011', - '2'=>'0011011', - '3'=>'0100001', - '4'=>'0011101', - '5'=>'0111001', - '6'=>'0000101', - '7'=>'0010001', - '8'=>'0001001', - '9'=>'0010111'), - 'C'=>array( // right - '0'=>'1110010', - '1'=>'1100110', - '2'=>'1101100', - '3'=>'1000010', - '4'=>'1011100', - '5'=>'1001110', - '6'=>'1010000', - '7'=>'1000100', - '8'=>'1001000', - '9'=>'1110100') - ); - $parities = array( - '0'=>array('A','A','A','A','A','A'), - '1'=>array('A','A','B','A','B','B'), - '2'=>array('A','A','B','B','A','B'), - '3'=>array('A','A','B','B','B','A'), - '4'=>array('A','B','A','A','B','B'), - '5'=>array('A','B','B','A','A','B'), - '6'=>array('A','B','B','B','A','A'), - '7'=>array('A','B','A','B','A','B'), - '8'=>array('A','B','A','B','B','A'), - '9'=>array('A','B','B','A','B','A') - ); - $upce_parities = array(); - $upce_parities[0] = array( - '0'=>array('B','B','B','A','A','A'), - '1'=>array('B','B','A','B','A','A'), - '2'=>array('B','B','A','A','B','A'), - '3'=>array('B','B','A','A','A','B'), - '4'=>array('B','A','B','B','A','A'), - '5'=>array('B','A','A','B','B','A'), - '6'=>array('B','A','A','A','B','B'), - '7'=>array('B','A','B','A','B','A'), - '8'=>array('B','A','B','A','A','B'), - '9'=>array('B','A','A','B','A','B') - ); - $upce_parities[1] = array( - '0'=>array('A','A','A','B','B','B'), - '1'=>array('A','A','B','A','B','B'), - '2'=>array('A','A','B','B','A','B'), - '3'=>array('A','A','B','B','B','A'), - '4'=>array('A','B','A','A','B','B'), - '5'=>array('A','B','B','A','A','B'), - '6'=>array('A','B','B','B','A','A'), - '7'=>array('A','B','A','B','A','B'), - '8'=>array('A','B','A','B','B','A'), - '9'=>array('A','B','B','A','B','A') - ); - $k = 0; - $seq = '101'; // left guard bar - if ($upce) { - $bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $p = $upce_parities[$code[1]][$r]; - for ($i = 0; $i < 6; ++$i) { - $seq .= $codes[$p[$i]][$upce_code[$i]]; - } - $seq .= '010101'; // right guard bar - } else { - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $half_len = intval(ceil($len / 2)); - if ($len == 8) { - for ($i = 0; $i < $half_len; ++$i) { - $seq .= $codes['A'][$code[$i]]; - } - } else { - $p = $parities[$code[0]]; - for ($i = 1; $i < $half_len; ++$i) { - $seq .= $codes[$p[$i-1]][$code[$i]]; - } - } - $seq .= '01010'; // center guard bar - for ($i = $half_len; $i < $len; ++$i) { - $seq .= $codes['C'][$code[$i]]; - } - $seq .= '101'; // right guard bar - } - $clen = strlen($seq); - $w = 0; - for ($i = 0; $i < $clen; ++$i) { - $w += 1; - if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq[$i] != $seq[$i+1]))) { - if ($seq[$i] == '1') { - $t = true; // bar - } else { - $t = false; // space - } - $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - ++$k; - $w = 0; - } - } - return $bararray; - } - - /** - * UPC-Based Extensions - * 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers - * 5-Digit Ext.: Used to mark suggested retail price of books - * @param string $code code to represent. - * @param string $len barcode type: 2 = 2-Digit, 5 = 5-Digit - * @return array barcode representation. - * @protected - */ - protected function barcode_eanext($code, $len=5) { - //Padding - $code = str_pad($code, $len, '0', STR_PAD_LEFT); - // calculate check digit - if ($len == 2) { - $r = $code % 4; - } elseif ($len == 5) { - $r = (3 * ($code[0] + $code[2] + $code[4])) + (9 * ($code[1] + $code[3])); - $r %= 10; - } else { - return false; - } - //Convert digits to bars - $codes = array( - 'A'=>array( // left odd parity - '0'=>'0001101', - '1'=>'0011001', - '2'=>'0010011', - '3'=>'0111101', - '4'=>'0100011', - '5'=>'0110001', - '6'=>'0101111', - '7'=>'0111011', - '8'=>'0110111', - '9'=>'0001011'), - 'B'=>array( // left even parity - '0'=>'0100111', - '1'=>'0110011', - '2'=>'0011011', - '3'=>'0100001', - '4'=>'0011101', - '5'=>'0111001', - '6'=>'0000101', - '7'=>'0010001', - '8'=>'0001001', - '9'=>'0010111') - ); - $parities = array(); - $parities[2] = array( - '0'=>array('A','A'), - '1'=>array('A','B'), - '2'=>array('B','A'), - '3'=>array('B','B') - ); - $parities[5] = array( - '0'=>array('B','B','A','A','A'), - '1'=>array('B','A','B','A','A'), - '2'=>array('B','A','A','B','A'), - '3'=>array('B','A','A','A','B'), - '4'=>array('A','B','B','A','A'), - '5'=>array('A','A','B','B','A'), - '6'=>array('A','A','A','B','B'), - '7'=>array('A','B','A','B','A'), - '8'=>array('A','B','A','A','B'), - '9'=>array('A','A','B','A','B') - ); - $p = $parities[$len][$r]; - $seq = '1011'; // left guard bar - $seq .= $codes[$p[0]][$code[0]]; - for ($i = 1; $i < $len; ++$i) { - $seq .= '01'; // separator - $seq .= $codes[$p[$i]][$code[$i]]; - } - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - return $this->binseq_to_array($seq, $bararray); - } - - /** - * POSTNET and PLANET barcodes. - * Used by U.S. Postal Service for automated mail sorting - * @param string $code zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD. - * @param boolean $planet if true print the PLANET barcode, otherwise print POSTNET - * @return array barcode representation. - * @protected - */ - protected function barcode_postnet($code, $planet=false) { - // bar length - if ($planet) { - $barlen = Array( - 0 => Array(1,1,2,2,2), - 1 => Array(2,2,2,1,1), - 2 => Array(2,2,1,2,1), - 3 => Array(2,2,1,1,2), - 4 => Array(2,1,2,2,1), - 5 => Array(2,1,2,1,2), - 6 => Array(2,1,1,2,2), - 7 => Array(1,2,2,2,1), - 8 => Array(1,2,2,1,2), - 9 => Array(1,2,1,2,2) - ); - } else { - $barlen = Array( - 0 => Array(2,2,1,1,1), - 1 => Array(1,1,1,2,2), - 2 => Array(1,1,2,1,2), - 3 => Array(1,1,2,2,1), - 4 => Array(1,2,1,1,2), - 5 => Array(1,2,1,2,1), - 6 => Array(1,2,2,1,1), - 7 => Array(2,1,1,1,2), - 8 => Array(2,1,1,2,1), - 9 => Array(2,1,2,1,1) - ); - } - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array()); - $k = 0; - $code = str_replace('-', '', $code); - $code = str_replace(' ', '', $code); - $len = strlen($code); - // calculate checksum - $sum = 0; - for ($i = 0; $i < $len; ++$i) { - $sum += intval($code[$i]); - } - $chkd = ($sum % 10); - if($chkd > 0) { - $chkd = (10 - $chkd); - } - $code .= $chkd; - $len = strlen($code); - // start bar - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 2; - for ($i = 0; $i < $len; ++$i) { - for ($j = 0; $j < 5; ++$j) { - $h = $barlen[$code[$i]][$j]; - $p = floor(1 / $h); - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); - $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 2; - } - } - // end bar - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 1; - return $bararray; - } - - /** - * RMS4CC - CBC - KIX - * RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index) - * RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service. - * @param string $code code to print - * @param boolean $kix if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code. - * @return array barcode representation. - * @protected - */ - protected function barcode_rms4cc($code, $kix=false) { - $notkix = !$kix; - // bar mode - // 1 = pos 1, length 2 - // 2 = pos 1, length 3 - // 3 = pos 2, length 1 - // 4 = pos 2, length 2 - $barmode = array( - '0' => array(3,3,2,2), - '1' => array(3,4,1,2), - '2' => array(3,4,2,1), - '3' => array(4,3,1,2), - '4' => array(4,3,2,1), - '5' => array(4,4,1,1), - '6' => array(3,1,4,2), - '7' => array(3,2,3,2), - '8' => array(3,2,4,1), - '9' => array(4,1,3,2), - 'A' => array(4,1,4,1), - 'B' => array(4,2,3,1), - 'C' => array(3,1,2,4), - 'D' => array(3,2,1,4), - 'E' => array(3,2,2,3), - 'F' => array(4,1,1,4), - 'G' => array(4,1,2,3), - 'H' => array(4,2,1,3), - 'I' => array(1,3,4,2), - 'J' => array(1,4,3,2), - 'K' => array(1,4,4,1), - 'L' => array(2,3,3,2), - 'M' => array(2,3,4,1), - 'N' => array(2,4,3,1), - 'O' => array(1,3,2,4), - 'P' => array(1,4,1,4), - 'Q' => array(1,4,2,3), - 'R' => array(2,3,1,4), - 'S' => array(2,3,2,3), - 'T' => array(2,4,1,3), - 'U' => array(1,1,4,4), - 'V' => array(1,2,3,4), - 'W' => array(1,2,4,3), - 'X' => array(2,1,3,4), - 'Y' => array(2,1,4,3), - 'Z' => array(2,2,3,3) - ); - $code = strtoupper($code); - $len = strlen($code); - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 3, 'bcode' => array()); - if ($notkix) { - // table for checksum calculation (row,col) - $checktable = array( - '0' => array(1,1), - '1' => array(1,2), - '2' => array(1,3), - '3' => array(1,4), - '4' => array(1,5), - '5' => array(1,0), - '6' => array(2,1), - '7' => array(2,2), - '8' => array(2,3), - '9' => array(2,4), - 'A' => array(2,5), - 'B' => array(2,0), - 'C' => array(3,1), - 'D' => array(3,2), - 'E' => array(3,3), - 'F' => array(3,4), - 'G' => array(3,5), - 'H' => array(3,0), - 'I' => array(4,1), - 'J' => array(4,2), - 'K' => array(4,3), - 'L' => array(4,4), - 'M' => array(4,5), - 'N' => array(4,0), - 'O' => array(5,1), - 'P' => array(5,2), - 'Q' => array(5,3), - 'R' => array(5,4), - 'S' => array(5,5), - 'T' => array(5,0), - 'U' => array(0,1), - 'V' => array(0,2), - 'W' => array(0,3), - 'X' => array(0,4), - 'Y' => array(0,5), - 'Z' => array(0,0) - ); - $row = 0; - $col = 0; - for ($i = 0; $i < $len; ++$i) { - $row += $checktable[$code[$i]][0]; - $col += $checktable[$code[$i]][1]; - } - $row %= 6; - $col %= 6; - $chk = array_keys($checktable, array($row,$col)); - $code .= $chk[0]; - ++$len; - } - $k = 0; - if ($notkix) { - // start bar - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 2; - } - for ($i = 0; $i < $len; ++$i) { - for ($j = 0; $j < 4; ++$j) { - switch ($barmode[$code[$i]][$j]) { - case 1: { - $p = 0; - $h = 2; - break; - } - case 2: { - $p = 0; - $h = 3; - break; - } - case 3: { - $p = 1; - $h = 1; - break; - } - case 4: { - $p = 1; - $h = 2; - break; - } - } - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); - $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 2; - } - } - if ($notkix) { - // stop bar - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => 3, 'p' => 0); - $bararray['maxw'] += 1; - } - return $bararray; - } - - /** - * CODABAR barcodes. - * Older code often used in library systems, sometimes in blood banks - * @param string $code code to represent. - * @return array barcode representation. - * @protected - */ - protected function barcode_codabar($code) { - $chr = array( - '0' => '11111221', - '1' => '11112211', - '2' => '11121121', - '3' => '22111111', - '4' => '11211211', - '5' => '21111211', - '6' => '12111121', - '7' => '12112111', - '8' => '12211111', - '9' => '21121111', - '-' => '11122111', - '$' => '11221111', - ':' => '21112121', - '/' => '21211121', - '.' => '21212111', - '+' => '11222221', - 'A' => '11221211', - 'B' => '12121121', - 'C' => '11121221', - 'D' => '11122211' - ); - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $k = 0; - $w = 0; - $seq = ''; - $code = 'A'.strtoupper($code).'A'; - $len = strlen($code); - for ($i = 0; $i < $len; ++$i) { - if (!isset($chr[$code[$i]])) { - return false; - } - $seq = $chr[$code[$i]]; - for ($j = 0; $j < 8; ++$j) { - if (($j % 2) == 0) { - $t = true; // bar - } else { - $t = false; // space - } - $w = (float)$seq[$j]; - $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - ++$k; - } - } - return $bararray; - } - - /** - * CODE11 barcodes. - * Used primarily for labeling telecommunications equipment - * @param string $code code to represent. - * @return array barcode representation. - * @protected - */ - protected function barcode_code11($code) { - $chr = array( - '0' => '111121', - '1' => '211121', - '2' => '121121', - '3' => '221111', - '4' => '112121', - '5' => '212111', - '6' => '122111', - '7' => '111221', - '8' => '211211', - '9' => '211111', - '-' => '112111', - 'S' => '112211' - ); - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $k = 0; - $w = 0; - $seq = ''; - $len = strlen($code); - // calculate check digit C - $p = 1; - $check = 0; - for ($i = ($len - 1); $i >= 0; --$i) { - $digit = $code[$i]; - if ($digit == '-') { - $dval = 10; - } else { - $dval = intval($digit); - } - $check += ($dval * $p); - ++$p; - if ($p > 10) { - $p = 1; - } - } - $check %= 11; - if ($check == 10) { - $check = '-'; - } - $code .= $check; - if ($len > 10) { - // calculate check digit K - $p = 1; - $check = 0; - for ($i = $len; $i >= 0; --$i) { - $digit = $code[$i]; - if ($digit == '-') { - $dval = 10; - } else { - $dval = intval($digit); - } - $check += ($dval * $p); - ++$p; - if ($p > 9) { - $p = 1; - } - } - $check %= 11; - $code .= $check; - ++$len; - } - $code = 'S'.$code.'S'; - $len += 3; - for ($i = 0; $i < $len; ++$i) { - if (!isset($chr[$code[$i]])) { - return false; - } - $seq = $chr[$code[$i]]; - for ($j = 0; $j < 6; ++$j) { - if (($j % 2) == 0) { - $t = true; // bar - } else { - $t = false; // space - } - $w = (float)$seq[$j]; - $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); - $bararray['maxw'] += $w; - ++$k; - } - } - return $bararray; - } - - /** - * Pharmacode - * Contains digits (0 to 9) - * @param string $code code to represent. - * @return array barcode representation. - * @protected - */ - protected function barcode_pharmacode($code) { - $seq = ''; - $code = intval($code); - while ($code > 0) { - if (($code % 2) == 0) { - $seq .= '11100'; - $code -= 2; - } else { - $seq .= '100'; - $code -= 1; - } - $code /= 2; - } - $seq = substr($seq, 0, -2); - $seq = strrev($seq); - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - return $this->binseq_to_array($seq, $bararray); - } - - /** - * Pharmacode two-track - * Contains digits (0 to 9) - * @param string $code code to represent. - * @return array barcode representation. - * @protected - */ - protected function barcode_pharmacode2t($code) { - $seq = ''; - $code = intval($code); - do { - switch ($code % 3) { - case 0: { - $seq .= '3'; - $code = ($code - 3) / 3; - break; - } - case 1: { - $seq .= '1'; - $code = ($code - 1) / 3; - break; - } - case 2: { - $seq .= '2'; - $code = ($code - 2) / 3; - break; - } - } - } while($code != 0); - $seq = strrev($seq); - $k = 0; - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array()); - $len = strlen($seq); - for ($i = 0; $i < $len; ++$i) { - switch ($seq[$i]) { - case '1': { - $p = 1; - $h = 1; - break; - } - case '2': { - $p = 0; - $h = 1; - break; - } - case '3': { - $p = 0; - $h = 2; - break; - } - } - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); - $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 2; - } - unset($bararray['bcode'][($k - 1)]); - --$bararray['maxw']; - return $bararray; - } - - /** - * IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200 - * (requires PHP bcmath extension) - * Intelligent Mail barcode is a 65-bar code for use on mail in the United States. - * The fields are described as follows:
    • The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 0–4. The allowable encoding ranges shall be 00–04, 10–14, 20–24, 30–34, 40–44, 50–54, 60–64, 70–74, 80–84, and 90–94.
    • The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php–999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.
    • The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999.
    • The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000–999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 00000–99999, 000000000–999999999, and 00000000000–99999999999.
    - * @param string $code code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode) - * @return array barcode representation. - * @protected - */ - protected function barcode_imb($code) { - $asc_chr = array(4,0,2,6,3,5,1,9,8,7,1,2,0,6,4,8,2,9,5,3,0,1,3,7,4,6,8,9,2,0,5,1,9,4,3,8,6,7,1,2,4,3,9,5,7,8,3,0,2,1,4,0,9,1,7,0,2,4,6,3,7,1,9,5,8); - $dsc_chr = array(7,1,9,5,8,0,2,4,6,3,5,8,9,7,3,0,6,1,7,4,6,8,9,2,5,1,7,5,4,3,8,7,6,0,2,5,4,9,3,0,1,6,8,2,0,4,5,9,6,7,5,2,6,3,8,5,1,9,8,7,4,0,2,6,3); - $asc_pos = array(3,0,8,11,1,12,8,11,10,6,4,12,2,7,9,6,7,9,2,8,4,0,12,7,10,9,0,7,10,5,7,9,6,8,2,12,1,4,2,0,1,5,4,6,12,1,0,9,4,7,5,10,2,6,9,11,2,12,6,7,5,11,0,3,2); - $dsc_pos = array(2,10,12,5,9,1,5,4,3,9,11,5,10,1,6,3,4,1,10,0,2,11,8,6,1,12,3,8,6,4,4,11,0,6,1,9,11,5,3,7,3,10,7,11,8,2,10,3,5,8,0,3,12,11,8,4,5,1,3,0,7,12,9,8,10); - $code_arr = explode('-', $code); - $tracking_number = $code_arr[0]; - if (isset($code_arr[1])) { - $routing_code = $code_arr[1]; - } else { - $routing_code = ''; - } - // Conversion of Routing Code - switch (strlen($routing_code)) { - case 0: { - $binary_code = 0; - break; - } - case 5: { - $binary_code = bcadd($routing_code, '1'); - break; - } - case 9: { - $binary_code = bcadd($routing_code, '100001'); - break; - } - case 11: { - $binary_code = bcadd($routing_code, '1000100001'); - break; - } - default: { - return false; - break; - } - } - $binary_code = bcmul($binary_code, 10); - $binary_code = bcadd($binary_code, $tracking_number[0]); - $binary_code = bcmul($binary_code, 5); - $binary_code = bcadd($binary_code, $tracking_number[1]); - $binary_code .= substr($tracking_number, 2, 18); - // convert to hexadecimal - $binary_code = $this->dec_to_hex($binary_code); - // pad to get 13 bytes - $binary_code = str_pad($binary_code, 26, '0', STR_PAD_LEFT); - // convert string to array of bytes - $binary_code_arr = chunk_split($binary_code, 2, "\r"); - $binary_code_arr = substr($binary_code_arr, 0, -1); - $binary_code_arr = explode("\r", $binary_code_arr); - // calculate frame check sequence - $fcs = $this->imb_crc11fcs($binary_code_arr); - // exclude first 2 bits from first byte - $first_byte = sprintf('%2s', dechex((hexdec($binary_code_arr[0]) << 2) >> 2)); - $binary_code_102bit = $first_byte.substr($binary_code, 2); - // convert binary data to codewords - $codewords = array(); - $data = $this->hex_to_dec($binary_code_102bit); - $codewords[0] = bcmod($data, 636) * 2; - $data = bcdiv($data, 636); - for ($i = 1; $i < 9; ++$i) { - $codewords[$i] = bcmod($data, 1365); - $data = bcdiv($data, 1365); - } - $codewords[9] = $data; - if (($fcs >> 10) == 1) { - $codewords[9] += 659; - } - // generate lookup tables - $table2of13 = $this->imb_tables(2, 78); - $table5of13 = $this->imb_tables(5, 1287); - // convert codewords to characters - $characters = array(); - $bitmask = 512; - foreach($codewords as $k => $val) { - if ($val <= 1286) { - $chrcode = $table5of13[$val]; - } else { - $chrcode = $table2of13[($val - 1287)]; - } - if (($fcs & $bitmask) > 0) { - // bitwise invert - $chrcode = ((~$chrcode) & 8191); - } - $characters[] = $chrcode; - $bitmask /= 2; - } - $characters = array_reverse($characters); - // build bars - $k = 0; - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 3, 'bcode' => array()); - for ($i = 0; $i < 65; ++$i) { - $asc = (($characters[$asc_chr[$i]] & pow(2, $asc_pos[$i])) > 0); - $dsc = (($characters[$dsc_chr[$i]] & pow(2, $dsc_pos[$i])) > 0); - if ($asc AND $dsc) { - // full bar (F) - $p = 0; - $h = 3; - } elseif ($asc) { - // ascender (A) - $p = 0; - $h = 2; - } elseif ($dsc) { - // descender (D) - $p = 1; - $h = 2; - } else { - // tracker (T) - $p = 1; - $h = 1; - } - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); - $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 2; - } - unset($bararray['bcode'][($k - 1)]); - --$bararray['maxw']; - return $bararray; - } - - /** - * IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200 - * - * @param string $code pre-formatted IMB barcode (65 chars "FADT") - * @return array barcode representation. - * @protected - */ - protected function barcode_imb_pre($code) { - if (!preg_match('/^[fadtFADT]{65}$/', $code) == 1) { - return false; - } - $characters = str_split(strtolower($code), 1); - // build bars - $k = 0; - $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 3, 'bcode' => array()); - for ($i = 0; $i < 65; ++$i) { - switch($characters[$i]) { - case 'f': { - // full bar - $p = 0; - $h = 3; - break; - } - case 'a': { - // ascender - $p = 0; - $h = 2; - break; - } - case 'd': { - // descender - $p = 1; - $h = 2; - break; - } - case 't': { - // tracker (short) - $p = 1; - $h = 1; - break; - } - } - $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); - $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); - $bararray['maxw'] += 2; - } - unset($bararray['bcode'][($k - 1)]); - --$bararray['maxw']; - return $bararray; - } - - /** - * Convert large integer number to hexadecimal representation. - * (requires PHP bcmath extension) - * @param string $number number to convert specified as a string - * @return string hexadecimal representation - */ - public function dec_to_hex($number) { - $i = 0; - $hex = array(); - if($number == 0) { - return '00'; - } - while($number > 0) { - if($number == 0) { - array_push($hex, '0'); - } else { - array_push($hex, strtoupper(dechex(bcmod($number, '16')))); - $number = bcdiv($number, '16', 0); - } - } - $hex = array_reverse($hex); - return implode($hex); - } - - /** - * Convert large hexadecimal number to decimal representation (string). - * (requires PHP bcmath extension) - * @param string $hex hexadecimal number to convert specified as a string - * @return string hexadecimal representation - */ - public function hex_to_dec($hex) { - $dec = 0; - $bitval = 1; - $len = strlen($hex); - for($pos = ($len - 1); $pos >= 0; --$pos) { - $dec = bcadd($dec, bcmul(hexdec($hex[$pos]), $bitval)); - $bitval = bcmul($bitval, 16); - } - return $dec; - } - - /** - * Intelligent Mail Barcode calculation of Frame Check Sequence - * @param string $code_arr array of hexadecimal values (13 bytes holding 102 bits right justified). - * @return int 11 bit Frame Check Sequence as integer (decimal base) - * @protected - */ - protected function imb_crc11fcs($code_arr) { - $genpoly = 0x0F35; // generator polynomial - $fcs = 0x07FF; // Frame Check Sequence - // do most significant byte skipping the 2 most significant bits - $data = hexdec($code_arr[0]) << 5; - for ($bit = 2; $bit < 8; ++$bit) { - if (($fcs ^ $data) & 0x400) { - $fcs = ($fcs << 1) ^ $genpoly; - } else { - $fcs = ($fcs << 1); - } - $fcs &= 0x7FF; - $data <<= 1; - } - // do rest of bytes - for ($byte = 1; $byte < 13; ++$byte) { - $data = hexdec($code_arr[$byte]) << 3; - for ($bit = 0; $bit < 8; ++$bit) { - if (($fcs ^ $data) & 0x400) { - $fcs = ($fcs << 1) ^ $genpoly; - } else { - $fcs = ($fcs << 1); - } - $fcs &= 0x7FF; - $data <<= 1; - } - } - return $fcs; - } - - /** - * Reverse unsigned short value - * @param int $num value to reversr - * @return int reversed value - * @protected - */ - protected function imb_reverse_us($num) { - $rev = 0; - for ($i = 0; $i < 16; ++$i) { - $rev <<= 1; - $rev |= ($num & 1); - $num >>= 1; - } - return $rev; - } - - /** - * generate Nof13 tables used for Intelligent Mail Barcode - * @param int $n is the type of table: 2 for 2of13 table, 5 for 5of13table - * @param int $size size of table (78 for n=2 and 1287 for n=5) - * @return array requested table - * @protected - */ - protected function imb_tables($n, $size) { - $table = array(); - $lli = 0; // LUT lower index - $lui = $size - 1; // LUT upper index - for ($count = 0; $count < 8192; ++$count) { - $bit_count = 0; - for ($bit_index = 0; $bit_index < 13; ++$bit_index) { - $bit_count += intval(($count & (1 << $bit_index)) != 0); - } - // if we don't have the right number of bits on, go on to the next value - if ($bit_count == $n) { - $reverse = ($this->imb_reverse_us($count) >> 3); - // if the reverse is less than count, we have already visited this pair before - if ($reverse >= $count) { - // If count is symmetric, place it at the first free slot from the end of the list. - // Otherwise, place it at the first free slot from the beginning of the list AND place $reverse ath the next free slot from the beginning of the list - if ($reverse == $count) { - $table[$lui] = $count; - --$lui; - } else { - $table[$lli] = $count; - ++$lli; - $table[$lli] = $reverse; - ++$lli; - } - } - } - } - return $table; - } - -} // end of class -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/tcpdf_barcodes_2d.php b/lib/combodo/tcpdf/tcpdf_barcodes_2d.php deleted file mode 100644 index 730361bd8..000000000 --- a/lib/combodo/tcpdf/tcpdf_barcodes_2d.php +++ /dev/null @@ -1,349 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : PHP class to creates array representations for -// 2D barcodes to be used with TCPDF. -// -//============================================================+ - -/** - * @file - * PHP class to creates array representations for 2D barcodes to be used with TCPDF. - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.015 - */ - -/** - * @class TCPDF2DBarcode - * PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org). - * @package com.tecnick.tcpdf - * @version 1.0.015 - * @author Nicola Asuni - */ -class TCPDF2DBarcode { - - /** - * Array representation of barcode. - * @protected - */ - protected $barcode_array = array(); - - /** - * This is the class constructor. - * Return an array representations for 2D barcodes:
      - *
    • $arrcode['code'] code to be printed on text label
    • - *
    • $arrcode['num_rows'] required number of rows
    • - *
    • $arrcode['num_cols'] required number of columns
    • - *
    • $arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)
    - * @param string $code code to print - * @param string $type type of barcode:
    • DATAMATRIX : Datamatrix (ISO/IEC 16022)
    • PDF417 : PDF417 (ISO/IEC 15438:2006)
    • PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parameters are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".
    • QRCODE : QRcode Low error correction
    • QRCODE,L : QRcode Low error correction
    • QRCODE,M : QRcode Medium error correction
    • QRCODE,Q : QRcode Better error correction
    • QRCODE,H : QR-CODE Best error correction
    • RAW: raw mode - comma-separad list of array rows
    • RAW2: raw mode - array rows are surrounded by square parenthesis.
    • TEST : Test matrix
    - */ - public function __construct($code, $type) { - $this->setBarcode($code, $type); - } - - /** - * Return an array representations of barcode. - * @return array - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Send barcode as SVG image object to the standard output. - * @param int $w Width of a single rectangle element in user units. - * @param int $h Height of a single rectangle element in user units. - * @param string $color Foreground color (in SVG format) for bar elements (background is transparent). - * @public - */ - public function getBarcodeSVG($w=3, $h=3, $color='black') { - // send headers - $code = $this->getBarcodeSVGcode($w, $h, $color); - header('Content-Type: application/svg+xml'); - header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: inline; filename="'.md5($code).'.svg";'); - //header('Content-Length: '.strlen($code)); - echo $code; - } - - /** - * Return a SVG string representation of barcode. - * @param int $w Width of a single rectangle element in user units. - * @param int $h Height of a single rectangle element in user units. - * @param string $color Foreground color (in SVG format) for bar elements (background is transparent). - * @return string SVG code. - * @public - */ - public function getBarcodeSVGcode($w=3, $h=3, $color='black') { - // replace table for special characters - $repstr = array("\0" => '', '&' => '&', '<' => '<', '>' => '>'); - $svg = '<'.'?'.'xml version="1.0" standalone="no"'.'?'.'>'."\n"; - $svg .= ''."\n"; - $svg .= ''."\n"; - $svg .= "\t".''.strtr($this->barcode_array['code'], $repstr).''."\n"; - $svg .= "\t".''."\n"; - // print barcode elements - $y = 0; - // for each row - for ($r = 0; $r < $this->barcode_array['num_rows']; ++$r) { - $x = 0; - // for each column - for ($c = 0; $c < $this->barcode_array['num_cols']; ++$c) { - if ($this->barcode_array['bcode'][$r][$c] == 1) { - // draw a single barcode cell - $svg .= "\t\t".''."\n"; - } - $x += $w; - } - $y += $h; - } - $svg .= "\t".''."\n"; - $svg .= ''."\n"; - return $svg; - } - - /** - * Return an HTML representation of barcode. - * @param int $w Width of a single rectangle element in pixels. - * @param int $h Height of a single rectangle element in pixels. - * @param string $color Foreground color for bar elements (background is transparent). - * @return string HTML code. - * @public - */ - public function getBarcodeHTML($w=10, $h=10, $color='black') { - $html = '
    '."\n"; - // print barcode elements - $y = 0; - // for each row - for ($r = 0; $r < $this->barcode_array['num_rows']; ++$r) { - $x = 0; - // for each column - for ($c = 0; $c < $this->barcode_array['num_cols']; ++$c) { - if ($this->barcode_array['bcode'][$r][$c] == 1) { - // draw a single barcode cell - $html .= '
     
    '."\n"; - } - $x += $w; - } - $y += $h; - } - $html .= '
    '."\n"; - return $html; - } - - /** - * Send a PNG image representation of barcode (requires GD or Imagick library). - * @param int $w Width of a single rectangle element in pixels. - * @param int $h Height of a single rectangle element in pixels. - * @param array $color RGB (0-255) foreground color for bar elements (background is transparent). - * @public - */ - public function getBarcodePNG($w=3, $h=3, $color=array(0,0,0)) { - $data = $this->getBarcodePngData($w, $h, $color); - // send headers - header('Content-Type: image/png'); - header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 - header('Pragma: public'); - header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - //header('Content-Length: '.strlen($data)); - echo $data; - - } - - /** - * Return a PNG image representation of barcode (requires GD or Imagick library). - * @param int $w Width of a single rectangle element in pixels. - * @param int $h Height of a single rectangle element in pixels. - * @param array $color RGB (0-255) foreground color for bar elements (background is transparent). - * @return string|Imagick|false image or false in case of error. - * @public - */ - public function getBarcodePngData($w=3, $h=3, $color=array(0,0,0)) { - // calculate image size - $width = ($this->barcode_array['num_cols'] * $w); - $height = ($this->barcode_array['num_rows'] * $h); - if (function_exists('imagecreate')) { - // GD library - $imagick = false; - $png = imagecreate($width, $height); - $bgcol = imagecolorallocate($png, 255, 255, 255); - imagecolortransparent($png, $bgcol); - $fgcol = imagecolorallocate($png, $color[0], $color[1], $color[2]); - } elseif (extension_loaded('imagick')) { - $imagick = true; - $bgcol = new imagickpixel('rgb(255,255,255'); - $fgcol = new imagickpixel('rgb('.$color[0].','.$color[1].','.$color[2].')'); - $png = new Imagick(); - $png->newImage($width, $height, 'none', 'png'); - $bar = new imagickdraw(); - $bar->setfillcolor($fgcol); - } else { - return false; - } - // print barcode elements - $y = 0; - // for each row - for ($r = 0; $r < $this->barcode_array['num_rows']; ++$r) { - $x = 0; - // for each column - for ($c = 0; $c < $this->barcode_array['num_cols']; ++$c) { - if ($this->barcode_array['bcode'][$r][$c] == 1) { - // draw a single barcode cell - if ($imagick) { - $bar->rectangle($x, $y, ($x + $w - 1), ($y + $h - 1)); - } else { - imagefilledrectangle($png, $x, $y, ($x + $w - 1), ($y + $h - 1), $fgcol); - } - } - $x += $w; - } - $y += $h; - } - if ($imagick) { - $png->drawimage($bar); - return $png; - } else { - ob_start(); - imagepng($png); - $imagedata = ob_get_clean(); - imagedestroy($png); - return $imagedata; - } - } - - /** - * Set the barcode. - * @param string $code code to print - * @param string $type type of barcode:
    • DATAMATRIX : Datamatrix (ISO/IEC 16022)
    • PDF417 : PDF417 (ISO/IEC 15438:2006)
    • PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parameters are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".
    • QRCODE : QRcode Low error correction
    • QRCODE,L : QRcode Low error correction
    • QRCODE,M : QRcode Medium error correction
    • QRCODE,Q : QRcode Better error correction
    • QRCODE,H : QR-CODE Best error correction
    • RAW: raw mode - comma-separad list of array rows
    • RAW2: raw mode - array rows are surrounded by square parenthesis.
    • TEST : Test matrix
    - * @return void - */ - public function setBarcode($code, $type) { - $mode = explode(',', $type); - $qrtype = strtoupper($mode[0]); - switch ($qrtype) { - case 'DATAMATRIX': { // DATAMATRIX (ISO/IEC 16022) - require_once(dirname(__FILE__).'/include/barcodes/datamatrix.php'); - $qrcode = new Datamatrix($code); - $this->barcode_array = $qrcode->getBarcodeArray(); - $this->barcode_array['code'] = $code; - break; - } - case 'PDF417': { // PDF417 (ISO/IEC 15438:2006) - require_once(dirname(__FILE__).'/include/barcodes/pdf417.php'); - if (!isset($mode[1]) OR ($mode[1] === '')) { - $aspectratio = 2; // default aspect ratio (width / height) - } else { - $aspectratio = floatval($mode[1]); - } - if (!isset($mode[2]) OR ($mode[2] === '')) { - $ecl = -1; // default error correction level (auto) - } else { - $ecl = intval($mode[2]); - } - // set macro block - $macro = array(); - if (isset($mode[3]) AND ($mode[3] !== '') AND isset($mode[4]) AND ($mode[4] !== '') AND isset($mode[5]) AND ($mode[5] !== '')) { - $macro['segment_total'] = intval($mode[3]); - $macro['segment_index'] = intval($mode[4]); - $macro['file_id'] = strtr($mode[5], "\xff", ','); - for ($i = 0; $i < 7; ++$i) { - $o = $i + 6; - if (isset($mode[$o]) AND ($mode[$o] !== '')) { - // add option - $macro['option_'.$i] = strtr($mode[$o], "\xff", ','); - } - } - } - $qrcode = new PDF417($code, $ecl, $aspectratio, $macro); - $this->barcode_array = $qrcode->getBarcodeArray(); - $this->barcode_array['code'] = $code; - break; - } - case 'QRCODE': { // QR-CODE - require_once(dirname(__FILE__).'/include/barcodes/qrcode.php'); - if (!isset($mode[1]) OR (!in_array($mode[1],array('L','M','Q','H')))) { - $mode[1] = 'L'; // Ddefault: Low error correction - } - $qrcode = new QRcode($code, strtoupper($mode[1])); - $this->barcode_array = $qrcode->getBarcodeArray(); - $this->barcode_array['code'] = $code; - break; - } - case 'RAW': - case 'RAW2': { // RAW MODE - // remove spaces - $code = preg_replace('/[\s]*/si', '', $code); - if (strlen($code) < 3) { - break; - } - if ($qrtype == 'RAW') { - // comma-separated rows - $rows = explode(',', $code); - } else { // RAW2 - // rows enclosed in square parentheses - $code = substr($code, 1, -1); - $rows = explode('][', $code); - } - $this->barcode_array['num_rows'] = count($rows); - $this->barcode_array['num_cols'] = strlen($rows[0]); - $this->barcode_array['bcode'] = array(); - foreach ($rows as $r) { - $this->barcode_array['bcode'][] = str_split($r, 1); - } - $this->barcode_array['code'] = $code; - break; - } - case 'TEST': { // TEST MODE - $this->barcode_array['num_rows'] = 5; - $this->barcode_array['num_cols'] = 15; - $this->barcode_array['bcode'] = array( - array(1,1,1,0,1,1,1,0,1,1,1,0,1,1,1), - array(0,1,0,0,1,0,0,0,1,0,0,0,0,1,0), - array(0,1,0,0,1,1,0,0,1,1,1,0,0,1,0), - array(0,1,0,0,1,0,0,0,0,0,1,0,0,1,0), - array(0,1,0,0,1,1,1,0,1,1,1,0,0,1,0)); - $this->barcode_array['code'] = $code; - break; - } - default: { - $this->barcode_array = array(); - } - } - } -} // end of class - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/tcpdf_import.php b/lib/combodo/tcpdf/tcpdf_import.php deleted file mode 100644 index cc6fda780..000000000 --- a/lib/combodo/tcpdf/tcpdf_import.php +++ /dev/null @@ -1,104 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : This is a PHP class extension of the TCPDF library to -// import existing PDF documents. -// -//============================================================+ - -/** - * @file - * !!! THIS CLASS IS UNDER DEVELOPMENT !!! - * This is a PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.
    - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.001 - */ - -// include the TCPDF class -require_once(dirname(__FILE__).'/tcpdf.php'); -// include PDF parser class -require_once(dirname(__FILE__).'/tcpdf_parser.php'); - -/** - * @class TCPDF_IMPORT - * !!! THIS CLASS IS UNDER DEVELOPMENT !!! - * PHP class extension of the TCPDF (http://www.tcpdf.org) library to import existing PDF documents.
    - * @package com.tecnick.tcpdf - * @brief PHP class extension of the TCPDF library to import existing PDF documents. - * @version 1.0.001 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_IMPORT extends TCPDF { - - /** - * Import an existing PDF document - * @param string $filename Filename of the PDF document to import. - * @return true in case of success, false otherwise - * @public - * @since 1.0.000 (2011-05-24) - */ - public function importPDF($filename) { - // load document - $rawdata = file_get_contents($filename); - if ($rawdata === false) { - $this->Error('Unable to get the content of the file: '.$filename); - } - // configuration parameters for parser - $cfg = array( - 'die_for_errors' => false, - 'ignore_filter_decoding_errors' => true, - 'ignore_missing_filter_decoders' => true, - ); - try { - // parse PDF data - $pdf = new TCPDF_PARSER($rawdata, $cfg); - } catch (Exception $e) { - die($e->getMessage()); - } - // get the parsed data - $data = $pdf->getParsedData(); - // release some memory - unset($rawdata); - - // ... - - - print_r($data); // DEBUG - - - unset($pdf); - } - -} // END OF CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/combodo/tcpdf/tcpdf_parser.php b/lib/combodo/tcpdf/tcpdf_parser.php deleted file mode 100644 index 4156230a3..000000000 --- a/lib/combodo/tcpdf/tcpdf_parser.php +++ /dev/null @@ -1,815 +0,0 @@ -. -// -// See LICENSE.TXT file for more information. -// ------------------------------------------------------------------- -// -// Description : This is a PHP class for parsing PDF documents. -// -//============================================================+ - -/** - * @file - * This is a PHP class for parsing PDF documents.
    - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @version 1.0.15 - */ - -// include class for decoding filters -require_once(dirname(__FILE__).'/include/tcpdf_filters.php'); - -/** - * @class TCPDF_PARSER - * This is a PHP class for parsing PDF documents.
    - * @package com.tecnick.tcpdf - * @brief This is a PHP class for parsing PDF documents.. - * @version 1.0.15 - * @author Nicola Asuni - info@tecnick.com - */ -class TCPDF_PARSER { - - /** - * Raw content of the PDF document. - * @private - */ - private $pdfdata = ''; - - /** - * XREF data. - * @protected - */ - protected $xref = array(); - - /** - * Array of PDF objects. - * @protected - */ - protected $objects = array(); - - /** - * Class object for decoding filters. - * @private - */ - private $FilterDecoders; - - /** - * Array of configuration parameters. - * @private - */ - private $cfg = array( - 'die_for_errors' => false, - 'ignore_filter_decoding_errors' => true, - 'ignore_missing_filter_decoders' => true, - ); - -// ----------------------------------------------------------------------------- - - /** - * Parse a PDF document an return an array of objects. - * @param string $data PDF data to parse. - * @param array $cfg Array of configuration parameters: - * 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception; - * 'ignore_filter_decoding_errors' : if true ignore filter decoding errors; - * 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors. - * @public - * @since 1.0.000 (2011-05-24) - */ - public function __construct($data, $cfg=array()) { - if (empty($data)) { - $this->Error('Empty PDF data.'); - } - // find the pdf header starting position - if (($trimpos = strpos($data, '%PDF-')) === FALSE) { - $this->Error('Invalid PDF data: missing %PDF header.'); - } - // get PDF content string - $this->pdfdata = substr($data, $trimpos); - // get length - $pdflen = strlen($this->pdfdata); - // set configuration parameters - $this->setConfig($cfg); - // get xref and trailer data - $this->xref = $this->getXrefData(); - // parse all document objects - $this->objects = array(); - foreach ($this->xref['xref'] as $obj => $offset) { - if (!isset($this->objects[$obj]) AND ($offset > 0)) { - // decode objects with positive offset - $this->objects[$obj] = $this->getIndirectObject($obj, $offset, true); - } - } - // release some memory - unset($this->pdfdata); - $this->pdfdata = ''; - } - - /** - * Set the configuration parameters. - * @param array $cfg Array of configuration parameters: - * 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception; - * 'ignore_filter_decoding_errors' : if true ignore filter decoding errors; - * 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors. - * @public - */ - protected function setConfig($cfg) { - if (isset($cfg['die_for_errors'])) { - $this->cfg['die_for_errors'] = !!$cfg['die_for_errors']; - } - if (isset($cfg['ignore_filter_decoding_errors'])) { - $this->cfg['ignore_filter_decoding_errors'] = !!$cfg['ignore_filter_decoding_errors']; - } - if (isset($cfg['ignore_missing_filter_decoders'])) { - $this->cfg['ignore_missing_filter_decoders'] = !!$cfg['ignore_missing_filter_decoders']; - } - } - - /** - * Return an array of parsed PDF document objects. - * @return array Array of parsed PDF document objects. - * @public - * @since 1.0.000 (2011-06-26) - */ - public function getParsedData() { - return array($this->xref, $this->objects); - } - - /** - * Get Cross-Reference (xref) table and trailer data from PDF document data. - * @param int $offset xref offset (if know). - * @param array $xref previous xref array (if any). - * @return array containing xref and trailer data. - * @protected - * @since 1.0.000 (2011-05-24) - */ - protected function getXrefData($offset=0, $xref=array()) { - if ($offset == 0) { - // find last startxref - if (preg_match_all('/[\r\n]startxref[\s]*[\r\n]+([0-9]+)[\s]*[\r\n]+%%EOF/i', $this->pdfdata, $matches, PREG_SET_ORDER, $offset) == 0) { - $this->Error('Unable to find startxref'); - } - $matches = array_pop($matches); - $startxref = $matches[1]; - } elseif (strpos($this->pdfdata, 'xref', $offset) == $offset) { - // Already pointing at the xref table - $startxref = $offset; - } elseif (preg_match('/([0-9]+[\s][0-9]+[\s]obj)/i', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset)) { - // Cross-Reference Stream object - $startxref = $offset; - } elseif (preg_match('/[\r\n]startxref[\s]*[\r\n]+([0-9]+)[\s]*[\r\n]+%%EOF/i', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset)) { - // startxref found - $startxref = $matches[1][0]; - } else { - $this->Error('Unable to find startxref'); - } - // check xref position - if (strpos($this->pdfdata, 'xref', $startxref) == $startxref) { - // Cross-Reference - $xref = $this->decodeXref($startxref, $xref); - } else { - // Cross-Reference Stream - $xref = $this->decodeXrefStream($startxref, $xref); - } - if (empty($xref)) { - $this->Error('Unable to find xref'); - } - return $xref; - } - - /** - * Decode the Cross-Reference section - * @param int $startxref Offset at which the xref section starts (position of the 'xref' keyword). - * @param array $xref Previous xref array (if any). - * @return array containing xref and trailer data. - * @protected - * @since 1.0.000 (2011-06-20) - */ - protected function decodeXref($startxref, $xref=array()) { - $startxref += 4; // 4 is the length of the word 'xref' - // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) - $offset = $startxref + strspn($this->pdfdata, "\x00\x09\x0a\x0c\x0d\x20", $startxref); - // initialize object number - $obj_num = 0; - // search for cross-reference entries or subsection - while (preg_match('/([0-9]+)[\x20]([0-9]+)[\x20]?([nf]?)(\r\n|[\x20]?[\r\n])/', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { - if ($matches[0][1] != $offset) { - // we are on another section - break; - } - $offset += strlen($matches[0][0]); - if ($matches[3][0] == 'n') { - // create unique object index: [object number]_[generation number] - $index = $obj_num.'_'.intval($matches[2][0]); - // check if object already exist - if (!isset($xref['xref'][$index])) { - // store object offset position - $xref['xref'][$index] = intval($matches[1][0]); - } - ++$obj_num; - } elseif ($matches[3][0] == 'f') { - ++$obj_num; - } else { - // object number (index) - $obj_num = intval($matches[1][0]); - } - } - // get trailer data - if (preg_match('/trailer[\s]*<<(.*)>>/isU', $this->pdfdata, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { - $trailer_data = $matches[1][0]; - if (!isset($xref['trailer']) OR empty($xref['trailer'])) { - // get only the last updated version - $xref['trailer'] = array(); - // parse trailer_data - if (preg_match('/Size[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { - $xref['trailer']['size'] = intval($matches[1]); - } - if (preg_match('/Root[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { - $xref['trailer']['root'] = intval($matches[1]).'_'.intval($matches[2]); - } - if (preg_match('/Encrypt[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { - $xref['trailer']['encrypt'] = intval($matches[1]).'_'.intval($matches[2]); - } - if (preg_match('/Info[\s]+([0-9]+)[\s]+([0-9]+)[\s]+R/i', $trailer_data, $matches) > 0) { - $xref['trailer']['info'] = intval($matches[1]).'_'.intval($matches[2]); - } - if (preg_match('/ID[\s]*[\[][\s]*[<]([^>]*)[>][\s]*[<]([^>]*)[>]/i', $trailer_data, $matches) > 0) { - $xref['trailer']['id'] = array(); - $xref['trailer']['id'][0] = $matches[1]; - $xref['trailer']['id'][1] = $matches[2]; - } - } - if (preg_match('/Prev[\s]+([0-9]+)/i', $trailer_data, $matches) > 0) { - // get previous xref - $xref = $this->getXrefData(intval($matches[1]), $xref); - } - } else { - $this->Error('Unable to find trailer'); - } - return $xref; - } - - /** - * Decode the Cross-Reference Stream section - * @param int $startxref Offset at which the xref section starts. - * @param array $xref Previous xref array (if any). - * @return array containing xref and trailer data. - * @protected - * @since 1.0.003 (2013-03-16) - */ - protected function decodeXrefStream($startxref, $xref=array()) { - // try to read Cross-Reference Stream - $xrefobj = $this->getRawObject($startxref); - $xrefcrs = $this->getIndirectObject($xrefobj[1], $startxref, true); - if (!isset($xref['trailer']) OR empty($xref['trailer'])) { - // get only the last updated version - $xref['trailer'] = array(); - $filltrailer = true; - } else { - $filltrailer = false; - } - if (!isset($xref['xref'])) { - $xref['xref'] = array(); - } - $valid_crs = false; - $columns = 0; - $sarr = $xrefcrs[0][1]; - if (!is_array($sarr)) { - $sarr = array(); - } - foreach ($sarr as $k => $v) { - if (($v[0] == '/') AND ($v[1] == 'Type') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == '/') AND ($sarr[($k +1)][1] == 'XRef'))) { - $valid_crs = true; - } elseif (($v[0] == '/') AND ($v[1] == 'Index') AND (isset($sarr[($k +1)]))) { - // first object number in the subsection - $index_first = intval($sarr[($k +1)][1][0][1]); - // number of entries in the subsection - $index_entries = intval($sarr[($k +1)][1][1][1]); - } elseif (($v[0] == '/') AND ($v[1] == 'Prev') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'numeric'))) { - // get previous xref offset - $prevxref = intval($sarr[($k +1)][1]); - } elseif (($v[0] == '/') AND ($v[1] == 'W') AND (isset($sarr[($k +1)]))) { - // number of bytes (in the decoded stream) of the corresponding field - $wb = array(); - $wb[0] = intval($sarr[($k +1)][1][0][1]); - $wb[1] = intval($sarr[($k +1)][1][1][1]); - $wb[2] = intval($sarr[($k +1)][1][2][1]); - } elseif (($v[0] == '/') AND ($v[1] == 'DecodeParms') AND (isset($sarr[($k +1)][1]))) { - $decpar = $sarr[($k +1)][1]; - foreach ($decpar as $kdc => $vdc) { - if (($vdc[0] == '/') AND ($vdc[1] == 'Columns') AND (isset($decpar[($kdc +1)]) AND ($decpar[($kdc +1)][0] == 'numeric'))) { - $columns = intval($decpar[($kdc +1)][1]); - } elseif (($vdc[0] == '/') AND ($vdc[1] == 'Predictor') AND (isset($decpar[($kdc +1)]) AND ($decpar[($kdc +1)][0] == 'numeric'))) { - $predictor = intval($decpar[($kdc +1)][1]); - } - } - } elseif ($filltrailer) { - if (($v[0] == '/') AND ($v[1] == 'Size') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'numeric'))) { - $xref['trailer']['size'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'Root') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'objref'))) { - $xref['trailer']['root'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'Info') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'objref'))) { - $xref['trailer']['info'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'Encrypt') AND (isset($sarr[($k +1)]) AND ($sarr[($k +1)][0] == 'objref'))) { - $xref['trailer']['encrypt'] = $sarr[($k +1)][1]; - } elseif (($v[0] == '/') AND ($v[1] == 'ID') AND (isset($sarr[($k +1)]))) { - $xref['trailer']['id'] = array(); - $xref['trailer']['id'][0] = $sarr[($k +1)][1][0][1]; - $xref['trailer']['id'][1] = $sarr[($k +1)][1][1][1]; - } - } - } - // decode data - if ($valid_crs AND isset($xrefcrs[1][3][0])) { - // number of bytes in a row - $rowlen = ($columns + 1); - // convert the stream into an array of integers - $sdata = unpack('C*', $xrefcrs[1][3][0]); - // split the rows - $sdata = array_chunk($sdata, $rowlen); - // initialize decoded array - $ddata = array(); - // initialize first row with zeros - $prev_row = array_fill (0, $rowlen, 0); - // for each row apply PNG unpredictor - foreach ($sdata as $k => $row) { - // initialize new row - $ddata[$k] = array(); - // get PNG predictor value - $predictor = (10 + $row[0]); - // for each byte on the row - for ($i=1; $i<=$columns; ++$i) { - // new index - $j = ($i - 1); - $row_up = $prev_row[$j]; - if ($i == 1) { - $row_left = 0; - $row_upleft = 0; - } else { - $row_left = $row[($i - 1)]; - $row_upleft = $prev_row[($j - 1)]; - } - switch ($predictor) { - case 10: { // PNG prediction (on encoding, PNG None on all rows) - $ddata[$k][$j] = $row[$i]; - break; - } - case 11: { // PNG prediction (on encoding, PNG Sub on all rows) - $ddata[$k][$j] = (($row[$i] + $row_left) & 0xff); - break; - } - case 12: { // PNG prediction (on encoding, PNG Up on all rows) - $ddata[$k][$j] = (($row[$i] + $row_up) & 0xff); - break; - } - case 13: { // PNG prediction (on encoding, PNG Average on all rows) - $ddata[$k][$j] = (($row[$i] + (($row_left + $row_up) / 2)) & 0xff); - break; - } - case 14: { // PNG prediction (on encoding, PNG Paeth on all rows) - // initial estimate - $p = ($row_left + $row_up - $row_upleft); - // distances - $pa = abs($p - $row_left); - $pb = abs($p - $row_up); - $pc = abs($p - $row_upleft); - $pmin = min($pa, $pb, $pc); - // return minimum distance - switch ($pmin) { - case $pa: { - $ddata[$k][$j] = (($row[$i] + $row_left) & 0xff); - break; - } - case $pb: { - $ddata[$k][$j] = (($row[$i] + $row_up) & 0xff); - break; - } - case $pc: { - $ddata[$k][$j] = (($row[$i] + $row_upleft) & 0xff); - break; - } - } - break; - } - default: { // PNG prediction (on encoding, PNG optimum) - $this->Error('Unknown PNG predictor'); - break; - } - } - } - $prev_row = $ddata[$k]; - } // end for each row - // complete decoding - $sdata = array(); - // for every row - foreach ($ddata as $k => $row) { - // initialize new row - $sdata[$k] = array(0, 0, 0); - if ($wb[0] == 0) { - // default type field - $sdata[$k][0] = 1; - } - $i = 0; // count bytes in the row - // for every column - for ($c = 0; $c < 3; ++$c) { - // for every byte on the column - for ($b = 0; $b < $wb[$c]; ++$b) { - if (isset($row[$i])) { - $sdata[$k][$c] += ($row[$i] << (($wb[$c] - 1 - $b) * 8)); - } - ++$i; - } - } - } - $ddata = array(); - // fill xref - if (isset($index_first)) { - $obj_num = $index_first; - } else { - $obj_num = 0; - } - foreach ($sdata as $k => $row) { - switch ($row[0]) { - case 0: { // (f) linked list of free objects - break; - } - case 1: { // (n) objects that are in use but are not compressed - // create unique object index: [object number]_[generation number] - $index = $obj_num.'_'.$row[2]; - // check if object already exist - if (!isset($xref['xref'][$index])) { - // store object offset position - $xref['xref'][$index] = $row[1]; - } - break; - } - case 2: { // compressed objects - // $row[1] = object number of the object stream in which this object is stored - // $row[2] = index of this object within the object stream - $index = $row[1].'_0_'.$row[2]; - $xref['xref'][$index] = -1; - break; - } - default: { // null objects - break; - } - } - ++$obj_num; - } - } // end decoding data - if (isset($prevxref)) { - // get previous xref - $xref = $this->getXrefData($prevxref, $xref); - } - return $xref; - } - - /** - * Get object type, raw value and offset to next object - * @param int $offset Object offset. - * @return array containing object type, raw value and offset to next object - * @protected - * @since 1.0.000 (2011-06-20) - */ - protected function getRawObject($offset=0) { - $objtype = ''; // object type to be returned - $objval = ''; // object value to be returned - // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) - $offset += strspn($this->pdfdata, "\x00\x09\x0a\x0c\x0d\x20", $offset); - // get first char - $char = $this->pdfdata[$offset]; - // get object type - switch ($char) { - case '%': { // \x25 PERCENT SIGN - // skip comment and search for next token - $next = strcspn($this->pdfdata, "\r\n", $offset); - if ($next > 0) { - $offset += $next; - return $this->getRawObject($offset); - } - break; - } - case '/': { // \x2F SOLIDUS - // name object - $objtype = $char; - ++$offset; - if (preg_match('/^([^\x00\x09\x0a\x0c\x0d\x20\s\x28\x29\x3c\x3e\x5b\x5d\x7b\x7d\x2f\x25]+)/', substr($this->pdfdata, $offset, 256), $matches) == 1) { - $objval = $matches[1]; // unescaped value - $offset += strlen($objval); - } - break; - } - case '(': // \x28 LEFT PARENTHESIS - case ')': { // \x29 RIGHT PARENTHESIS - // literal string object - $objtype = $char; - ++$offset; - $strpos = $offset; - if ($char == '(') { - $open_bracket = 1; - while ($open_bracket > 0) { - if (!isset($this->pdfdata[$strpos])) { - break; - } - $ch = $this->pdfdata[$strpos]; - switch ($ch) { - case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash) - // skip next character - ++$strpos; - break; - } - case '(': { // LEFT PARENHESIS (28h) - ++$open_bracket; - break; - } - case ')': { // RIGHT PARENTHESIS (29h) - --$open_bracket; - break; - } - } - ++$strpos; - } - $objval = substr($this->pdfdata, $offset, ($strpos - $offset - 1)); - $offset = $strpos; - } - break; - } - case '[': // \x5B LEFT SQUARE BRACKET - case ']': { // \x5D RIGHT SQUARE BRACKET - // array object - $objtype = $char; - ++$offset; - if ($char == '[') { - // get array content - $objval = array(); - do { - // get element - $element = $this->getRawObject($offset); - $offset = $element[2]; - $objval[] = $element; - } while ($element[0] != ']'); - // remove closing delimiter - array_pop($objval); - } - break; - } - case '<': // \x3C LESS-THAN SIGN - case '>': { // \x3E GREATER-THAN SIGN - if (isset($this->pdfdata[($offset + 1)]) AND ($this->pdfdata[($offset + 1)] == $char)) { - // dictionary object - $objtype = $char.$char; - $offset += 2; - if ($char == '<') { - // get array content - $objval = array(); - do { - // get element - $element = $this->getRawObject($offset); - $offset = $element[2]; - $objval[] = $element; - } while ($element[0] != '>>'); - // remove closing delimiter - array_pop($objval); - } - } else { - // hexadecimal string object - $objtype = $char; - ++$offset; - if (($char == '<') AND (preg_match('/^([0-9A-Fa-f\x09\x0a\x0c\x0d\x20]+)>/iU', substr($this->pdfdata, $offset), $matches) == 1)) { - // remove white space characters - $objval = strtr($matches[1], "\x09\x0a\x0c\x0d\x20", ''); - $offset += strlen($matches[0]); - } elseif (($endpos = strpos($this->pdfdata, '>', $offset)) !== FALSE) { - $offset = $endpos + 1; - } - } - break; - } - default: { - if (substr($this->pdfdata, $offset, 6) == 'endobj') { - // indirect object - $objtype = 'endobj'; - $offset += 6; - } elseif (substr($this->pdfdata, $offset, 4) == 'null') { - // null object - $objtype = 'null'; - $offset += 4; - $objval = 'null'; - } elseif (substr($this->pdfdata, $offset, 4) == 'true') { - // boolean true object - $objtype = 'boolean'; - $offset += 4; - $objval = 'true'; - } elseif (substr($this->pdfdata, $offset, 5) == 'false') { - // boolean false object - $objtype = 'boolean'; - $offset += 5; - $objval = 'false'; - } elseif (substr($this->pdfdata, $offset, 6) == 'stream') { - // start stream object - $objtype = 'stream'; - $offset += 6; - if (preg_match('/^([\r]?[\n])/isU', substr($this->pdfdata, $offset), $matches) == 1) { - $offset += strlen($matches[0]); - if (preg_match('/(endstream)[\x09\x0a\x0c\x0d\x20]/isU', substr($this->pdfdata, $offset), $matches, PREG_OFFSET_CAPTURE) == 1) { - $objval = substr($this->pdfdata, $offset, $matches[0][1]); - $offset += $matches[1][1]; - } - } - } elseif (substr($this->pdfdata, $offset, 9) == 'endstream') { - // end stream object - $objtype = 'endstream'; - $offset += 9; - } elseif (preg_match('/^([0-9]+)[\s]+([0-9]+)[\s]+R/iU', substr($this->pdfdata, $offset, 33), $matches) == 1) { - // indirect object reference - $objtype = 'objref'; - $offset += strlen($matches[0]); - $objval = intval($matches[1]).'_'.intval($matches[2]); - } elseif (preg_match('/^([0-9]+)[\s]+([0-9]+)[\s]+obj/iU', substr($this->pdfdata, $offset, 33), $matches) == 1) { - // object start - $objtype = 'obj'; - $objval = intval($matches[1]).'_'.intval($matches[2]); - $offset += strlen ($matches[0]); - } elseif (($numlen = strspn($this->pdfdata, '+-.0123456789', $offset)) > 0) { - // numeric object - $objtype = 'numeric'; - $objval = substr($this->pdfdata, $offset, $numlen); - $offset += $numlen; - } - break; - } - } - return array($objtype, $objval, $offset); - } - - /** - * Get content of indirect object. - * @param string $obj_ref Object number and generation number separated by underscore character. - * @param int $offset Object offset. - * @param boolean $decoding If true decode streams. - * @return array containing object data. - * @protected - * @since 1.0.000 (2011-05-24) - */ - protected function getIndirectObject($obj_ref, $offset=0, $decoding=true) { - $obj = explode('_', $obj_ref); - if (($obj === false) OR (count($obj) != 2)) { - $this->Error('Invalid object reference: '.$obj); - return; - } - $objref = $obj[0].' '.$obj[1].' obj'; - // ignore leading zeros - $offset += strspn($this->pdfdata, '0', $offset); - if (strpos($this->pdfdata, $objref, $offset) != $offset) { - // an indirect reference to an undefined object shall be considered a reference to the null object - return array('null', 'null', $offset); - } - // starting position of object content - $offset += strlen($objref); - // get array of object content - $objdata = array(); - $i = 0; // object main index - do { - $oldoffset = $offset; - // get element - $element = $this->getRawObject($offset); - $offset = $element[2]; - // decode stream using stream's dictionary information - if ($decoding AND ($element[0] == 'stream') AND (isset($objdata[($i - 1)][0])) AND ($objdata[($i - 1)][0] == '<<')) { - $element[3] = $this->decodeStream($objdata[($i - 1)][1], $element[1]); - } - $objdata[$i] = $element; - ++$i; - } while (($element[0] != 'endobj') AND ($offset != $oldoffset)); - // remove closing delimiter - array_pop($objdata); - // return raw object content - return $objdata; - } - - /** - * Get the content of object, resolving indect object reference if necessary. - * @param string $obj Object value. - * @return array containing object data. - * @protected - * @since 1.0.000 (2011-06-26) - */ - protected function getObjectVal($obj) { - if ($obj[0] == 'objref') { - // reference to indirect object - if (isset($this->objects[$obj[1]])) { - // this object has been already parsed - return $this->objects[$obj[1]]; - } elseif (isset($this->xref[$obj[1]])) { - // parse new object - $this->objects[$obj[1]] = $this->getIndirectObject($obj[1], $this->xref[$obj[1]], false); - return $this->objects[$obj[1]]; - } - } - return $obj; - } - - /** - * Decode the specified stream. - * @param array $sdic Stream's dictionary array. - * @param string $stream Stream to decode. - * @return array containing decoded stream data and remaining filters. - * @protected - * @since 1.0.000 (2011-06-22) - */ - protected function decodeStream($sdic, $stream) { - // get stream length and filters - $slength = strlen($stream); - if ($slength <= 0) { - return array('', array()); - } - $filters = array(); - foreach ($sdic as $k => $v) { - if ($v[0] == '/') { - if (($v[1] == 'Length') AND (isset($sdic[($k + 1)])) AND ($sdic[($k + 1)][0] == 'numeric')) { - // get declared stream length - $declength = intval($sdic[($k + 1)][1]); - if ($declength < $slength) { - $stream = substr($stream, 0, $declength); - $slength = $declength; - } - } elseif (($v[1] == 'Filter') AND (isset($sdic[($k + 1)]))) { - // resolve indirect object - $objval = $this->getObjectVal($sdic[($k + 1)]); - if ($objval[0] == '/') { - // single filter - $filters[] = $objval[1]; - } elseif ($objval[0] == '[') { - // array of filters - foreach ($objval[1] as $flt) { - if ($flt[0] == '/') { - $filters[] = $flt[1]; - } - } - } - } - } - } - // decode the stream - $remaining_filters = array(); - foreach ($filters as $filter) { - if (in_array($filter, TCPDF_FILTERS::getAvailableFilters())) { - try { - $stream = TCPDF_FILTERS::decodeFilter($filter, $stream); - } catch (Exception $e) { - $emsg = $e->getMessage(); - if ((($emsg[0] == '~') AND !$this->cfg['ignore_missing_filter_decoders']) - OR (($emsg[0] != '~') AND !$this->cfg['ignore_filter_decoding_errors'])) { - $this->Error($e->getMessage()); - } - } - } else { - // add missing filter to array - $remaining_filters[] = $filter; - } - } - return array($stream, $remaining_filters); - } - - /** - * Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true. - * @param string $msg The error message - * @public - * @since 1.0.000 (2011-05-23) - */ - public function Error($msg) { - if ($this->cfg['die_for_errors']) { - die('TCPDF_PARSER ERROR: '.$msg); - } else { - throw new Exception('TCPDF_PARSER ERROR: '.$msg); - } - } - -} // END OF TCPDF_PARSER CLASS - -//============================================================+ -// END OF FILE -//============================================================+ diff --git a/lib/composer/ClassLoader.php b/lib/composer/ClassLoader.php deleted file mode 100644 index 0cd6055d1..000000000 --- a/lib/composer/ClassLoader.php +++ /dev/null @@ -1,572 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - /** @var ?string */ - private $vendorDir; - - // PSR-4 - /** - * @var array[] - * @psalm-var array> - */ - private $prefixLengthsPsr4 = array(); - /** - * @var array[] - * @psalm-var array> - */ - private $prefixDirsPsr4 = array(); - /** - * @var array[] - * @psalm-var array - */ - private $fallbackDirsPsr4 = array(); - - // PSR-0 - /** - * @var array[] - * @psalm-var array> - */ - private $prefixesPsr0 = array(); - /** - * @var array[] - * @psalm-var array - */ - private $fallbackDirsPsr0 = array(); - - /** @var bool */ - private $useIncludePath = false; - - /** - * @var string[] - * @psalm-var array - */ - private $classMap = array(); - - /** @var bool */ - private $classMapAuthoritative = false; - - /** - * @var bool[] - * @psalm-var array - */ - private $missingClasses = array(); - - /** @var ?string */ - private $apcuPrefix; - - /** - * @var self[] - */ - private static $registeredLoaders = array(); - - /** - * @param ?string $vendorDir - */ - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - } - - /** - * @return string[] - */ - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - /** - * @return array[] - * @psalm-return array> - */ - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - /** - * @return array[] - * @psalm-return array - */ - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - /** - * @return array[] - * @psalm-return array - */ - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - /** - * @return string[] Array of classname => path - * @psalm-var array - */ - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param string[] $classMap Class to filename map - * @psalm-param array $classMap - * - * @return void - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 base directories - * - * @return void - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - * - * @return void - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - * - * @return void - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - * - * @return void - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. - * - * @return self[] - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - /** - * @param string $class - * @param string $ext - * @return string|false - */ - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - * @private - */ -function includeFile($file) -{ - include $file; -} diff --git a/lib/composer/InstalledVersions.php b/lib/composer/InstalledVersions.php deleted file mode 100644 index d50e0c9fc..000000000 --- a/lib/composer/InstalledVersions.php +++ /dev/null @@ -1,350 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require its presence, you can require `composer-runtime-api ^2.0` - */ -class InstalledVersions -{ - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null - */ - private static $installed; - - /** - * @var bool|null - */ - private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints($constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - $installed[] = self::$installed; - - return $installed; - } -} diff --git a/lib/composer/LICENSE b/lib/composer/LICENSE deleted file mode 100644 index f27399a04..000000000 --- a/lib/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php deleted file mode 100644 index 4027b2b92..000000000 --- a/lib/composer/autoload_classmap.php +++ /dev/null @@ -1,3378 +0,0 @@ - $baseDir . '/application/applicationextension.inc.php', - 'AbstractApplicationUIExtension' => $baseDir . '/application/applicationextension.inc.php', - 'AbstractLoginFSMExtension' => $baseDir . '/application/applicationextension.inc.php', - 'AbstractPageUIBlockExtension' => $baseDir . '/application/applicationextension.inc.php', - 'AbstractPageUIExtension' => $baseDir . '/application/applicationextension.inc.php', - 'AbstractPortalUIExtension' => $baseDir . '/application/applicationextension.inc.php', - 'AbstractPreferencesExtension' => $baseDir . '/application/applicationextension.inc.php', - 'AbstractWeeklyScheduledProcess' => $baseDir . '/core/backgroundprocess.inc.php', - 'Action' => $baseDir . '/core/action.class.inc.php', - 'ActionChecker' => $baseDir . '/core/userrights.class.inc.php', - 'ActionEmail' => $baseDir . '/core/action.class.inc.php', - 'ActionNotification' => $baseDir . '/core/action.class.inc.php', - 'AjaxPage' => $baseDir . '/sources/Application/WebPage/AjaxPage.php', - 'ApcService' => $baseDir . '/core/apc-service.class.inc.php', - 'ApplicationContext' => $baseDir . '/application/applicationcontext.class.inc.php', - 'ApplicationException' => $baseDir . '/application/exceptions/ApplicationException.php', - 'ApplicationMenu' => $baseDir . '/application/menunode.class.inc.php', - 'ApplicationPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php', - 'Archive_Tar' => $vendorDir . '/pear/archive_tar/Archive/Tar.php', - 'ArchivedObjectException' => $baseDir . '/application/exceptions/ArchivedObjectException.php', - 'AsyncSendEmail' => $baseDir . '/core/asynctask.class.inc.php', - 'AsyncTask' => $baseDir . '/core/asynctask.class.inc.php', - 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', - 'AttributeApplicationLanguage' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeArchiveDate' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeArchiveFlag' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeBlob' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeBoolean' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeCaseLog' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeClass' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeClassAttCodeSet' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeClassState' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeCustomFields' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDBField' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDBFieldVoid' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDashboard' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDate' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDateTime' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDeadline' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDecimal' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDefinition' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeDuration' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeEmailAddress' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeEncryptedString' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeEnum' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeEnumSet' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeExternalField' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeExternalKey' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeFinalClass' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeFriendlyName' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeHTML' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeHierarchicalKey' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeIPAddress' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeImage' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeInteger' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeLinkedSet' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeLinkedSetIndirect' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeLongText' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeMetaEnum' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeOQL' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeObjectKey' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeObsolescenceDate' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeObsolescenceFlag' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeOneWayPassword' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributePassword' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributePercentage' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributePhoneNumber' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributePropertySet' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeQueryAttCodeSet' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeRedundancySettings' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeSet' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeStopWatch' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeString' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeSubItem' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeTable' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeTagSet' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeTemplateHTML' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeTemplateString' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeTemplateText' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeText' => $baseDir . '/core/attributedef.class.inc.php', - 'AttributeURL' => $baseDir . '/core/attributedef.class.inc.php', - 'AuditCategory' => $baseDir . '/application/audit.category.class.inc.php', - 'AuditDomain' => $baseDir . '/application/audit.domain.class.inc.php', - 'AuditRule' => $baseDir . '/application/audit.rule.class.inc.php', - 'BackgroundTask' => $baseDir . '/core/backgroundtask.class.inc.php', - 'BinaryExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'BinaryOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'BulkChange' => $baseDir . '/core/bulkchange.class.inc.php', - 'BulkChangeException' => $baseDir . '/application/exceptions/BulkChangeException.php', - 'BulkExport' => $baseDir . '/core/bulkexport.class.inc.php', - 'BulkExportException' => $baseDir . '/core/bulkexport.class.inc.php', - 'BulkExportMissingParameterException' => $baseDir . '/core/bulkexport.class.inc.php', - 'BulkExportResult' => $baseDir . '/core/bulkexport.class.inc.php', - 'BulkExportResultGC' => $baseDir . '/core/bulkexport.class.inc.php', - 'CAS_AuthenticationException' => $vendorDir . '/apereo/phpcas/source/CAS/AuthenticationException.php', - 'CAS_Client' => $vendorDir . '/apereo/phpcas/source/CAS/Client.php', - 'CAS_CookieJar' => $vendorDir . '/apereo/phpcas/source/CAS/CookieJar.php', - 'CAS_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/Exception.php', - 'CAS_GracefullTerminationException' => $vendorDir . '/apereo/phpcas/source/CAS/GracefullTerminationException.php', - 'CAS_InvalidArgumentException' => $vendorDir . '/apereo/phpcas/source/CAS/InvalidArgumentException.php', - 'CAS_Languages_Catalan' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Catalan.php', - 'CAS_Languages_ChineseSimplified' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php', - 'CAS_Languages_English' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/English.php', - 'CAS_Languages_French' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/French.php', - 'CAS_Languages_Galego' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Galego.php', - 'CAS_Languages_German' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/German.php', - 'CAS_Languages_Greek' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Greek.php', - 'CAS_Languages_Japanese' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Japanese.php', - 'CAS_Languages_LanguageInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/LanguageInterface.php', - 'CAS_Languages_Portuguese' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Portuguese.php', - 'CAS_Languages_Spanish' => $vendorDir . '/apereo/phpcas/source/CAS/Languages/Spanish.php', - 'CAS_OutOfSequenceBeforeAuthenticationCallException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php', - 'CAS_OutOfSequenceBeforeClientException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php', - 'CAS_OutOfSequenceBeforeProxyException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php', - 'CAS_OutOfSequenceException' => $vendorDir . '/apereo/phpcas/source/CAS/OutOfSequenceException.php', - 'CAS_PGTStorage_AbstractStorage' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php', - 'CAS_PGTStorage_Db' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/Db.php', - 'CAS_PGTStorage_File' => $vendorDir . '/apereo/phpcas/source/CAS/PGTStorage/File.php', - 'CAS_ProxiedService' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService.php', - 'CAS_ProxiedService_Abstract' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Abstract.php', - 'CAS_ProxiedService_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Exception.php', - 'CAS_ProxiedService_Http' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http.php', - 'CAS_ProxiedService_Http_Abstract' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php', - 'CAS_ProxiedService_Http_Get' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php', - 'CAS_ProxiedService_Http_Post' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php', - 'CAS_ProxiedService_Imap' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Imap.php', - 'CAS_ProxiedService_Testable' => $vendorDir . '/apereo/phpcas/source/CAS/ProxiedService/Testable.php', - 'CAS_ProxyChain' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain.php', - 'CAS_ProxyChain_AllowedList' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php', - 'CAS_ProxyChain_Any' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Any.php', - 'CAS_ProxyChain_Interface' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Interface.php', - 'CAS_ProxyChain_Trusted' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyChain/Trusted.php', - 'CAS_ProxyTicketException' => $vendorDir . '/apereo/phpcas/source/CAS/ProxyTicketException.php', - 'CAS_Request_AbstractRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/AbstractRequest.php', - 'CAS_Request_CurlMultiRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php', - 'CAS_Request_CurlRequest' => $vendorDir . '/apereo/phpcas/source/CAS/Request/CurlRequest.php', - 'CAS_Request_Exception' => $vendorDir . '/apereo/phpcas/source/CAS/Request/Exception.php', - 'CAS_Request_MultiRequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php', - 'CAS_Request_RequestInterface' => $vendorDir . '/apereo/phpcas/source/CAS/Request/RequestInterface.php', - 'CAS_Session_PhpSession' => $vendorDir . '/apereo/phpcas/source/CAS/Session/PhpSession.php', - 'CAS_TypeMismatchException' => $vendorDir . '/apereo/phpcas/source/CAS/TypeMismatchException.php', - 'CLILikeWebPage' => $baseDir . '/sources/Application/WebPage/CLILikeWebPage.php', - 'CLIPage' => $baseDir . '/sources/Application/WebPage/CLIPage.php', - 'CMDBChange' => $baseDir . '/core/cmdbchange.class.inc.php', - 'CMDBChangeOp' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpCreate' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpDelete' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpPlugin' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttribute' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeBlob' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeCaseLog' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeCustomFields' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeEncrypted' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeHTML' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLinks' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLinksAddRemove' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLinksTune' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLongText' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeOneWayPassword' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeScalar' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeTagSet' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeText' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeURL' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'CMDBObject' => $baseDir . '/core/cmdbobject.class.inc.php', - 'CMDBObjectSet' => $baseDir . '/core/cmdbobject.class.inc.php', - 'CMDBSource' => $baseDir . '/core/cmdbsource.class.inc.php', - 'CSVBulkExport' => $baseDir . '/core/csvbulkexport.class.inc.php', - 'CSVPage' => $baseDir . '/sources/Application/WebPage/CSVPage.php', - 'CSVParser' => $baseDir . '/core/csvparser.class.inc.php', - 'CSVParserException' => $baseDir . '/application/exceptions/CSVParserException.php', - 'CaptureWebPage' => $baseDir . '/sources/Application/WebPage/CaptureWebPage.php', - 'CellChangeSpec' => $baseDir . '/core/bulkchange.class.inc.php', - 'CellStatus_Ambiguous' => $baseDir . '/core/bulkchange.class.inc.php', - 'CellStatus_Issue' => $baseDir . '/core/bulkchange.class.inc.php', - 'CellStatus_Modify' => $baseDir . '/core/bulkchange.class.inc.php', - 'CellStatus_NullIssue' => $baseDir . '/core/bulkchange.class.inc.php', - 'CellStatus_SearchIssue' => $baseDir . '/core/bulkchange.class.inc.php', - 'CellStatus_Void' => $baseDir . '/core/bulkchange.class.inc.php', - 'CharConcatExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'CharConcatWSExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'CheckStopWatchThresholds' => $baseDir . '/core/ormstopwatch.class.inc.php', - 'CheckableExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php', - 'Combodo\\iTop\\Application\\Branding' => $baseDir . '/sources/Application/Branding.php', - 'Combodo\\iTop\\Application\\EventRegister\\ApplicationEvents' => $baseDir . '/sources/Application/EventRegister/ApplicationEvents.php', - 'Combodo\\iTop\\Application\\Helper\\FormHelper' => $baseDir . '/sources/Application/Helper/FormHelper.php', - 'Combodo\\iTop\\Application\\Helper\\Session' => $baseDir . '/sources/Application/Helper/Session.php', - 'Combodo\\iTop\\Application\\Helper\\WebResourcesHelper' => $baseDir . '/sources/Application/Helper/WebResourcesHelper.php', - 'Combodo\\iTop\\Application\\Search\\AjaxSearchException' => $baseDir . '/sources/Application/Search/ajaxsearchexception.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionConversionAbstract' => $baseDir . '/sources/Application/Search/criterionconversionabstract.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionConversion\\CriterionToOQL' => $baseDir . '/sources/Application/Search/CriterionConversion/criteriontooql.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionConversion\\CriterionToSearchForm' => $baseDir . '/sources/Application/Search/CriterionConversion/criteriontosearchform.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionParser' => $baseDir . '/sources/Application/Search/criterionparser.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\SearchForm' => $baseDir . '/sources/Application/Search/searchform.class.inc.php', - 'Combodo\\iTop\\Application\\Status\\Status' => $baseDir . '/sources/Application/Status/Status.php', - 'Combodo\\iTop\\Application\\TwigBase\\Controller\\Controller' => $baseDir . '/sources/Application/TwigBase/Controller/Controller.php', - 'Combodo\\iTop\\Application\\TwigBase\\Controller\\PageNotFoundException' => $baseDir . '/application/exceptions/PageNotFoundException.php', - 'Combodo\\iTop\\Application\\TwigBase\\Twig\\Extension' => $baseDir . '/sources/Application/TwigBase/Twig/Extension.php', - 'Combodo\\iTop\\Application\\TwigBase\\Twig\\TwigHelper' => $baseDir . '/sources/Application/TwigBase/Twig/TwigHelper.php', - 'Combodo\\iTop\\Application\\TwigBase\\UI\\UIBlockExtension' => $baseDir . '/sources/Application/TwigBase/UI/UIBlockExtension.php', - 'Combodo\\iTop\\Application\\TwigBase\\UI\\UIBlockNode' => $baseDir . '/sources/Application/TwigBase/UI/UIBlockNode.php', - 'Combodo\\iTop\\Application\\TwigBase\\UI\\UIBlockParser' => $baseDir . '/sources/Application/TwigBase/UI/UIBlockParser.php', - 'Combodo\\iTop\\Application\\UI\\Base\\AbstractUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/AbstractUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Alert\\Alert' => $baseDir . '/sources/Application/UI/Base/Component/Alert/Alert.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Alert\\AlertUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Alert/AlertUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Breadcrumbs\\Breadcrumbs' => $baseDir . '/sources/Application/UI/Base/Component/Breadcrumbs/Breadcrumbs.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\ButtonGroup\\ButtonGroup' => $baseDir . '/sources/Application/UI/Base/Component/ButtonGroup/ButtonGroup.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\ButtonGroup\\ButtonGroupUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/ButtonGroup/ButtonGroupUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\Button' => $baseDir . '/sources/Application/UI/Base/Component/Button/Button.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\ButtonJS' => $baseDir . '/sources/Application/UI/Base/Component/Button/ButtonJS.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\ButtonUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Button/ButtonUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\ButtonURL' => $baseDir . '/sources/Application/UI/Base/Component/Button/ButtonURL.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\CollapsibleSection\\CollapsibleSection' => $baseDir . '/sources/Application/UI/Base/Component/CollapsibleSection/CollapsibleSection.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\CollapsibleSection\\CollapsibleSectionUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/CollapsibleSection/CollapsibleSectionUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletBadge' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletBadge.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletContainer' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletContainer.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletFactory' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletHeaderStatic' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletHeaderStatic.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletPlainText' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletPlainText.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTable' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/DataTable.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableSettings' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/DataTableSettings.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/DataTableUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\StaticTable\\FormTableRow\\FormTableRow' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/StaticTable/FormTableRow/FormTableRow.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\StaticTable\\FormTable\\FormTable' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/StaticTable/FormTable/FormTable.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\StaticTable\\StaticTable' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/StaticTable/StaticTable.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\tTableRowActions' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/tTableRowActions.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldBadge\\FieldBadge' => $baseDir . '/sources/Application/UI/Base/Component/FieldBadge/FieldBadge.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldBadge\\FieldBadgeUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/FieldBadge/FieldBadgeUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldSet\\FieldSet' => $baseDir . '/sources/Application/UI/Base/Component/FieldSet/FieldSet.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldSet\\FieldSetUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/FieldSet/FieldSetUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Field\\Field' => $baseDir . '/sources/Application/UI/Base/Component/Field/Field.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Field\\FieldUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Field/FieldUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Form\\Form' => $baseDir . '/sources/Application/UI/Base/Component/Form/Form.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Form\\FormUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Form/FormUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\GlobalSearch\\GlobalSearch' => $baseDir . '/sources/Application/UI/Base/Component/GlobalSearch/GlobalSearch.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\GlobalSearch\\GlobalSearchFactory' => $baseDir . '/sources/Application/UI/Base/Component/GlobalSearch/GlobalSearchFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\GlobalSearch\\GlobalSearchHelper' => $baseDir . '/sources/Application/UI/Base/Component/GlobalSearch/GlobalSearchHelper.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Html\\Html' => $baseDir . '/sources/Application/UI/Base/Component/Html/Html.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Html\\HtmlFactory' => $baseDir . '/sources/Application/UI/Base/Component/Html/HtmlFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\AbstractInput' => $baseDir . '/sources/Application/UI/Base/Component/Input/AbstractInput.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\FileSelect\\FileSelect' => $baseDir . '/sources/Application/UI/Base/Component/Input/FileSelect/FileSelect.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\FileSelect\\FileSelectUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Input/FileSelect/FileSelectUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Input' => $baseDir . '/sources/Application/UI/Base/Component/Input/Input.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\InputUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Input/InputUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\InputWithLabel' => $baseDir . '/sources/Application/UI/Base/Component/Input/InputWithLabel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\RichText\\RichText' => $baseDir . '/sources/Application/UI/Base/Component/Input/RichText/RichText.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\SelectUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Input/Select/SelectUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Select\\Select' => $baseDir . '/sources/Application/UI/Base/Component/Input/Select/Select.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Select\\SelectOption' => $baseDir . '/sources/Application/UI/Base/Component/Input/Select/SelectOption.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Select\\SelectOptionUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Input/Select/SelectOptionUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\AbstractDataProvider' => $baseDir . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/AbstractDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\AjaxDataProvider' => $baseDir . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/AjaxDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\AjaxDataProviderForOQL' => $baseDir . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/AjaxDataProviderForOql.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\SimpleDataProvider' => $baseDir . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/SimpleDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\iDataProvider' => $baseDir . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/iDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\Set' => $baseDir . '/sources/Application/UI/Base/Component/Input/Set/Set.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\SetUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Input/Set/SetUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\TextArea' => $baseDir . '/sources/Application/UI/Base/Component/Input/TextArea.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\tInputLabel' => $baseDir . '/sources/Application/UI/Base/Component/Input/tInputLabel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\MedallionIcon\\MedallionIcon' => $baseDir . '/sources/Application/UI/Base/Component/MedallionIcon/MedallionIcon.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Modal\\DoNotShowAgainOptionBlock' => $baseDir . '/sources/Application/UI/Base/Component/Modal/DoNotShowAgainOptionBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Panel\\Panel' => $baseDir . '/sources/Application/UI/Base/Component/Panel/Panel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Panel\\PanelUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Panel/PanelUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Pill\\Pill' => $baseDir . '/sources/Application/UI/Base/Component/Pill/Pill.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Pill\\PillFactory' => $baseDir . '/sources/Application/UI/Base/Component/Pill/PillFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenu' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenu.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenuFactory' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenu' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenu.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuFactory' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\JsPopoverMenuItem' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/JsPopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\PopoverMenuItem' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\PopoverMenuItemFactory' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItemFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\SeparatorPopoverMenuItem' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/SeparatorPopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\UrlPopoverMenuItem' => $baseDir . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/UrlPopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\QuickCreate\\QuickCreate' => $baseDir . '/sources/Application/UI/Base/Component/QuickCreate/QuickCreate.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\QuickCreate\\QuickCreateFactory' => $baseDir . '/sources/Application/UI/Base/Component/QuickCreate/QuickCreateFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\QuickCreate\\QuickCreateHelper' => $baseDir . '/sources/Application/UI/Base/Component/QuickCreate/QuickCreateHelper.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Spinner\\Spinner' => $baseDir . '/sources/Application/UI/Base/Component/Spinner/Spinner.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Spinner\\SpinnerUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Spinner/SpinnerUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Template\\Template' => $baseDir . '/sources/Application/UI/Base/Component/Template/Template.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Template\\TemplateUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Template/TemplateUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Text\\Text' => $baseDir . '/sources/Application/UI/Base/Component/Text/Text.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Title\\Title' => $baseDir . '/sources/Application/UI/Base/Component/Title/Title.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Title\\TitleUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Title/TitleUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Separator\\AbstractSeparator' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/Separator/AbstractSeparator.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Separator\\ToolbarSeparatorUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/Separator/ToolbarSeparatorUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Separator\\VerticalSeparator' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/Separator/VerticalSeparator.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Toolbar' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/Toolbar.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacer' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacerUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacerUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntry' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntryFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntryFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentAddedFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentAddedFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentRemovedFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentRemovedFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpCreateFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpCreateFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpDeleteFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpDeleteFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpSetAttributeFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpSetAttributeFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpSetAttributeScalarFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpSetAttributeScalarFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CaseLogEntry' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CaseLogEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\EditsEntry' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/EditsEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\EventNotification\\EventNotificationEmailFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/EventNotification/EventNotificationEmailFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\EventNotification\\EventNotificationFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/EventNotification/EventNotificationFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\NotificationEntry' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/NotificationEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\TransitionEntry' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/TransitionEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanel' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanelFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanelFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanelHelper' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanelHelper.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanelPrint' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanelPrint.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryFormFactory\\CaseLogEntryFormFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryFormFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryForm\\CaseLogEntryForm' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardColumn' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardColumn.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardLayout' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardLayout.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardRow' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardRow.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\Column' => $baseDir . '/sources/Application/UI/Base/Layout/MultiColumn/Column/Column.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\ColumnUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Layout/MultiColumn/Column/ColumnUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\MultiColumn' => $baseDir . '/sources/Application/UI/Base/Layout/MultiColumn/MultiColumn.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\MultiColumnUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Layout/MultiColumn/MultiColumnUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\NavigationMenu\\NavigationMenu' => $baseDir . '/sources/Application/UI/Base/Layout/NavigationMenu/NavigationMenu.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\NavigationMenu\\NavigationMenuFactory' => $baseDir . '/sources/Application/UI/Base/Layout/NavigationMenu/NavigationMenuFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Object\\ObjectDetails' => $baseDir . '/sources/Application/UI/Base/Layout/Object/ObjectDetails.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Object\\ObjectFactory' => $baseDir . '/sources/Application/UI/Base/Layout/Object/ObjectFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Object\\ObjectSummary' => $baseDir . '/sources/Application/UI/Base/Layout/Object/ObjectSummary.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\PageContent\\PageContent' => $baseDir . '/sources/Application/UI/Base/Layout/PageContent/PageContent.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\PageContent\\PageContentFactory' => $baseDir . '/sources/Application/UI/Base/Layout/PageContent/PageContentFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\PageContent\\PageContentWithSideContent' => $baseDir . '/sources/Application/UI/Base/Layout/PageContent/PageContentWithSideContent.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TabContainer\\TabContainer' => $baseDir . '/sources/Application/UI/Base/Layout/TabContainer/TabContainer.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TabContainer\\Tab\\AjaxTab' => $baseDir . '/sources/Application/UI/Base/Layout/TabContainer/Tab/AjaxTab.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TabContainer\\Tab\\Tab' => $baseDir . '/sources/Application/UI/Base/Layout/TabContainer/Tab/Tab.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TopBar\\TopBar' => $baseDir . '/sources/Application/UI/Base/Layout/TopBar/TopBar.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TopBar\\TopBarFactory' => $baseDir . '/sources/Application/UI/Base/Layout/TopBar/TopBarFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\UIContentBlock' => $baseDir . '/sources/Application/UI/Base/Layout/UIContentBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\UIContentBlockUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Layout/UIContentBlockUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\UIContentBlockWithJSRefreshCallback' => $baseDir . '/sources/Application/UI/Base/Layout/UIContentBlockWithJSRefreshCallback .php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\iUIContentBlock' => $baseDir . '/sources/Application/UI/Base/Layout/iUIContentBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\UIBlock' => $baseDir . '/sources/Application/UI/Base/UIBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\UIException' => $baseDir . '/sources/Application/UI/Base/UIException.php', - 'Combodo\\iTop\\Application\\UI\\Base\\iUIBlock' => $baseDir . '/sources/Application/UI/Base/iUIBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\iUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/iUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\tJSRefreshCallback' => $baseDir . '/sources/Application/UI/Base/tJSRefreshCallback.php', - 'Combodo\\iTop\\Application\\UI\\Base\\tUIContentAreas' => $baseDir . '/sources/Application/UI/Base/tUIContentAreas.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockChartAjaxBars\\BlockChartAjaxBars' => $baseDir . '/sources/Application/UI/DisplayBlock/BlockChartAjaxBars/BlockChartAjaxBars.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockChartAjaxPie\\BlockChartAjaxPie' => $baseDir . '/sources/Application/UI/DisplayBlock/BlockChartAjaxPie/BlockChartAjaxPie.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockChart\\BlockChart' => $baseDir . '/sources/Application/UI/DisplayBlock/BlockChart/BlockChart.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockCsv\\BlockCsv' => $baseDir . '/sources/Application/UI/DisplayBlock/BlockCsv/BlockCsv.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockList\\BlockList' => $baseDir . '/sources/Application/UI/DisplayBlock/BlockList/BlockList.php', - 'Combodo\\iTop\\Application\\UI\\Helper\\UIHelper' => $baseDir . '/sources/Application/UI/Helper/UIHelper.php', - 'Combodo\\iTop\\Application\\UI\\Links\\AbstractBlockLinkSetViewTable' => $baseDir . '/sources/Application/UI/Links/AbstractBlockLinkSetViewTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Direct\\BlockDirectLinkSetEditTable' => $baseDir . '/sources/Application/UI/Links/Direct/BlockDirectLinkSetEditTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Direct\\BlockDirectLinkSetViewTable' => $baseDir . '/sources/Application/UI/Links/Direct/BlockDirectLinkSetViewTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Indirect\\BlockIndirectLinkSetEditTable' => $baseDir . '/sources/Application/UI/Links/Indirect/BlockIndirectLinkSetEditTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Indirect\\BlockIndirectLinkSetViewTable' => $baseDir . '/sources/Application/UI/Links/Indirect/BlockIndirectLinkSetViewTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Indirect\\BlockObjectPickerDialog' => $baseDir . '/sources/Application/UI/Links/Indirect/BlockObjectPickerDialog.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Set\\BlockLinkSetDisplayAsProperty' => $baseDir . '/sources/Application/UI/Links/Set/BlockLinksSetDisplayAsProperty.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Set\\LinkSetUIBlockFactory' => $baseDir . '/sources/Application/UI/Links/Set/LinksSetUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Preferences\\BlockShortcuts\\BlockShortcuts' => $baseDir . '/sources/Application/UI/Preferences/BlockShortcuts/BlockShortcuts.php', - 'Combodo\\iTop\\Application\\UI\\Printable\\BlockPrintHeader\\BlockPrintHeader' => $baseDir . '/sources/Application/UI/Printable/BlockPrintHeader/BlockPrintHeader.php', - 'Combodo\\iTop\\Composer\\iTopComposer' => $baseDir . '/sources/Composer/iTopComposer.php', - 'Combodo\\iTop\\Controller\\AbstractController' => $baseDir . '/sources/Controller/AbstractController.php', - 'Combodo\\iTop\\Controller\\AjaxRenderController' => $baseDir . '/sources/Controller/AjaxRenderController.php', - 'Combodo\\iTop\\Controller\\Base\\Layout\\ActivityPanelController' => $baseDir . '/sources/Controller/Base/Layout/ActivityPanelController.php', - 'Combodo\\iTop\\Controller\\Base\\Layout\\ObjectController' => $baseDir . '/sources/Controller/Base/Layout/ObjectController.php', - 'Combodo\\iTop\\Controller\\Links\\LinkSetController' => $baseDir . '/sources/Controller/Links/LinkSetController.php', - 'Combodo\\iTop\\Controller\\OAuth\\OAuthLandingController' => $baseDir . '/sources/Controller/OAuth/OAuthLandingController.php', - 'Combodo\\iTop\\Controller\\PreferencesController' => $baseDir . '/sources/Controller/PreferencesController.php', - 'Combodo\\iTop\\Controller\\TemporaryObjects\\TemporaryObjectController' => $baseDir . '/sources/Controller/TemporaryObjects/TemporaryObjectController.php', - 'Combodo\\iTop\\Controller\\iController' => $baseDir . '/sources/Controller/iController.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\IOAuthClientProvider' => $baseDir . '/sources/Core/Authentication/Client/OAuth/IOAuthClientProvider.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderAbstract' => $baseDir . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderAzure' => $baseDir . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAzure.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderFactory' => $baseDir . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderGoogle' => $baseDir . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderGoogle.php', - 'Combodo\\iTop\\Core\\CMDBChange\\CMDBChangeOrigin' => $baseDir . '/sources/Core/CMDBChange/CMDBChangeOrigin.php', - 'Combodo\\iTop\\Core\\DbConnectionWrapper' => $baseDir . '/core/DbConnectionWrapper.php', - 'Combodo\\iTop\\Core\\Email\\EmailFactory' => $baseDir . '/sources/Core/Email/EmailFactory.php', - 'Combodo\\iTop\\Core\\Email\\iEMail' => $baseDir . '/sources/Core/Email/iEMail.php', - 'Combodo\\iTop\\Core\\EventListener\\AttributeBlobEventListener' => $baseDir . '/sources/Core/EventListener/AttributeBlobEventListener.php', - 'Combodo\\iTop\\Core\\Kpi\\KpiLogData' => $baseDir . '/sources/Core/Kpi/KpiLogData.php', - 'Combodo\\iTop\\Core\\MetaModel\\FriendlyNameType' => $baseDir . '/sources/Core/MetaModel/FriendlyNameType.php', - 'Combodo\\iTop\\Core\\MetaModel\\HierarchicalKey' => $baseDir . '/sources/Core/MetaModel/HierarchicalKey.php', - 'Combodo\\iTop\\DI\\Controller\\Controller' => $baseDir . '/sources/DI/Controller/Controller.php', - 'Combodo\\iTop\\DI\\Form\\Listener\\IFormTypeOptionModifier' => $baseDir . '/sources/DI/Form/Listener/IFormTypeOptionModifier.php', - 'Combodo\\iTop\\DI\\Form\\Listener\\ObjectFormListener' => $baseDir . '/sources/DI/Form/Listener/ObjectFormListener.php', - 'Combodo\\iTop\\DI\\Form\\Type\\ConfigurationType' => $baseDir . '/sources/DI/Form/Type/ConfigurationType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\AbstractContainerType' => $baseDir . '/sources/DI/Form/Type/Layout/AbstractContainerType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\ColumnType' => $baseDir . '/sources/DI/Form/Type/Layout/ColumnType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\FieldSetType' => $baseDir . '/sources/DI/Form/Type/Layout/FieldSetType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\RowType' => $baseDir . '/sources/DI/Form/Type/Layout/RowType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\ObjectSingleAttributeType' => $baseDir . '/sources/DI/Form/Type/ObjectSingleAttributeType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\ObjectType' => $baseDir . '/sources/DI/Form/Type/ObjectType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Simple\\DocumentType' => $baseDir . '/sources/DI/Form/Type/Simple/DocumentType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Simple\\ExternalKeyType' => $baseDir . '/sources/DI/Form/Type/Simple/ExternalKeyType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Simple\\LinkSetType' => $baseDir . '/sources/DI/Form/Type/Simple/LinkSetType.php', - 'Combodo\\iTop\\DI\\ITopKernel' => $baseDir . '/sources/DI/ITopKernel.php', - 'Combodo\\iTop\\DI\\Services\\ObjectPresentationService' => $baseDir . '/sources/DI/Services/ObjectPresentationService.php', - 'Combodo\\iTop\\DI\\Services\\ObjectService' => $baseDir . '/sources/DI/Services/ObjectService.php', - 'Combodo\\iTop\\DI\\Services\\TwigHelper' => $baseDir . '/sources/DI/Services/TwigHelper.php', - 'Combodo\\iTop\\DesignDocument' => $baseDir . '/core/designdocument.class.inc.php', - 'Combodo\\iTop\\DesignElement' => $baseDir . '/core/designdocument.class.inc.php', - 'Combodo\\iTop\\Form\\Field\\AbstractSimpleField' => $baseDir . '/sources/Form/Field/AbstractSimpleField.php', - 'Combodo\\iTop\\Form\\Field\\BlobField' => $baseDir . '/sources/Form/Field/BlobField.php', - 'Combodo\\iTop\\Form\\Field\\CaseLogField' => $baseDir . '/sources/Form/Field/CaseLogField.php', - 'Combodo\\iTop\\Form\\Field\\CheckboxField' => $baseDir . '/sources/Form/Field/CheckboxField.php', - 'Combodo\\iTop\\Form\\Field\\DateField' => $baseDir . '/sources/Form/Field/DateField.php', - 'Combodo\\iTop\\Form\\Field\\DateTimeField' => $baseDir . '/sources/Form/Field/DateTimeField.php', - 'Combodo\\iTop\\Form\\Field\\DurationField' => $baseDir . '/sources/Form/Field/DurationField.php', - 'Combodo\\iTop\\Form\\Field\\EmailField' => $baseDir . '/sources/Form/Field/EmailField.php', - 'Combodo\\iTop\\Form\\Field\\Field' => $baseDir . '/sources/Form/Field/Field.php', - 'Combodo\\iTop\\Form\\Field\\FileUploadField' => $baseDir . '/sources/Form/Field/FileUploadField.php', - 'Combodo\\iTop\\Form\\Field\\HiddenField' => $baseDir . '/sources/Form/Field/HiddenField.php', - 'Combodo\\iTop\\Form\\Field\\ImageField' => $baseDir . '/sources/Form/Field/ImageField.php', - 'Combodo\\iTop\\Form\\Field\\LabelField' => $baseDir . '/sources/Form/Field/LabelField.php', - 'Combodo\\iTop\\Form\\Field\\LinkedSetField' => $baseDir . '/sources/Form/Field/LinkedSetField.php', - 'Combodo\\iTop\\Form\\Field\\MultipleChoicesField' => $baseDir . '/sources/Form/Field/MultipleChoicesField.php', - 'Combodo\\iTop\\Form\\Field\\MultipleSelectField' => $baseDir . '/sources/Form/Field/MultipleSelectField.php', - 'Combodo\\iTop\\Form\\Field\\PasswordField' => $baseDir . '/sources/Form/Field/PasswordField.php', - 'Combodo\\iTop\\Form\\Field\\PhoneField' => $baseDir . '/sources/Form/Field/PhoneField.php', - 'Combodo\\iTop\\Form\\Field\\RadioField' => $baseDir . '/sources/Form/Field/RadioField.php', - 'Combodo\\iTop\\Form\\Field\\SelectField' => $baseDir . '/sources/Form/Field/SelectField.php', - 'Combodo\\iTop\\Form\\Field\\SelectObjectField' => $baseDir . '/sources/Form/Field/SelectObjectField.php', - 'Combodo\\iTop\\Form\\Field\\SetField' => $baseDir . '/sources/Form/Field/SetField.php', - 'Combodo\\iTop\\Form\\Field\\StringField' => $baseDir . '/sources/Form/Field/StringField.php', - 'Combodo\\iTop\\Form\\Field\\SubFormField' => $baseDir . '/sources/Form/Field/SubFormField.php', - 'Combodo\\iTop\\Form\\Field\\TagSetField' => $baseDir . '/sources/Form/Field/TagSetField.php', - 'Combodo\\iTop\\Form\\Field\\TextAreaField' => $baseDir . '/sources/Form/Field/TextAreaField.php', - 'Combodo\\iTop\\Form\\Field\\TextField' => $baseDir . '/sources/Form/Field/TextField.php', - 'Combodo\\iTop\\Form\\Field\\UrlField' => $baseDir . '/sources/Form/Field/UrlField.php', - 'Combodo\\iTop\\Form\\Form' => $baseDir . '/sources/Form/Form.php', - 'Combodo\\iTop\\Form\\FormManager' => $baseDir . '/sources/Form/FormManager.php', - 'Combodo\\iTop\\Form\\Helper\\FieldHelper' => $baseDir . '/sources/Form/Helper/FieldHelper.php', - 'Combodo\\iTop\\Form\\Validator\\AbstractRegexpValidator' => $baseDir . '/sources/Form/Validator/AbstractRegexpValidator.php', - 'Combodo\\iTop\\Form\\Validator\\AbstractValidator' => $baseDir . '/sources/Form/Validator/AbstractValidator.php', - 'Combodo\\iTop\\Form\\Validator\\CustomRegexpValidator' => $baseDir . '/sources/Form/Validator/CustomRegexpValidator.php', - 'Combodo\\iTop\\Form\\Validator\\IntegerValidator' => $baseDir . '/sources/Form/Validator/IntegerValidator.php', - 'Combodo\\iTop\\Form\\Validator\\LinkedSetValidator' => $baseDir . '/sources/Form/Validator/LinkedSetValidator.php', - 'Combodo\\iTop\\Form\\Validator\\MandatoryValidator' => $baseDir . '/sources/Form/Validator/MandatoryValidator.php', - 'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => $baseDir . '/sources/Form/Validator/MultipleChoicesValidator.php', - 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => $baseDir . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', - 'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => $baseDir . '/sources/Form/Validator/SelectObjectValidator.php', - 'Combodo\\iTop\\Form\\Validator\\Validator' => $baseDir . '/sources/Form/Validator/Validator.php', - 'Combodo\\iTop\\Renderer\\BlockRenderer' => $baseDir . '/sources/Renderer/BlockRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => $baseDir . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFormRenderer' => $baseDir . '/sources/Renderer/Bootstrap/BsFormRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsFieldRenderer' => $baseDir . '/sources/Renderer/Bootstrap/FieldRenderer/BsFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsFileUploadFieldRenderer' => $baseDir . '/sources/Renderer/Bootstrap/FieldRenderer/BsFileUploadFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsLinkedSetFieldRenderer' => $baseDir . '/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSelectObjectFieldRenderer' => $baseDir . '/sources/Renderer/Bootstrap/FieldRenderer/BsSelectObjectFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSetFieldRenderer' => $baseDir . '/sources/Renderer/Bootstrap/FieldRenderer/BsSetFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSimpleFieldRenderer' => $baseDir . '/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSubFormFieldRenderer' => $baseDir . '/sources/Renderer/Bootstrap/FieldRenderer/BsSubFormFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\ConsoleBlockRenderer' => $baseDir . '/sources/Renderer/Console/ConsoleBlockRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\ConsoleFieldRendererMappings' => $baseDir . '/sources/Renderer/Console/ConsoleFieldRendererMappings.php', - 'Combodo\\iTop\\Renderer\\Console\\ConsoleFormRenderer' => $baseDir . '/sources/Renderer/Console/ConsoleFormRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\FieldRenderer\\ConsoleSelectObjectFieldRenderer' => $baseDir . '/sources/Renderer/Console/FieldRenderer/ConsoleSelectObjectFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\FieldRenderer\\ConsoleSimpleFieldRenderer' => $baseDir . '/sources/Renderer/Console/FieldRenderer/ConsoleSimpleFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\FieldRenderer\\ConsoleSubFormFieldRenderer' => $baseDir . '/sources/Renderer/Console/FieldRenderer/ConsoleSubFormFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\FieldRenderer' => $baseDir . '/sources/Renderer/FieldRenderer.php', - 'Combodo\\iTop\\Renderer\\FormRenderer' => $baseDir . '/sources/Renderer/FormRenderer.php', - 'Combodo\\iTop\\Renderer\\RenderingOutput' => $baseDir . '/sources/Renderer/RenderingOutput.php', - 'Combodo\\iTop\\Service\\Base\\ObjectRepository' => $baseDir . '/sources/Service/Base/ObjectRepository.php', - 'Combodo\\iTop\\Service\\Base\\iDataPostProcessor' => $baseDir . '/sources/Service/Base/iDataPostProcessor.php', - 'Combodo\\iTop\\Service\\Events\\Description\\EventDataDescription' => $baseDir . '/sources/Service/Events/Description/EventDataDescription.php', - 'Combodo\\iTop\\Service\\Events\\Description\\EventDescription' => $baseDir . '/sources/Service/Events/Description/EventDescription.php', - 'Combodo\\iTop\\Service\\Events\\EventData' => $baseDir . '/sources/Service/Events/EventData.php', - 'Combodo\\iTop\\Service\\Events\\EventException' => $baseDir . '/sources/Service/Events/EventException.php', - 'Combodo\\iTop\\Service\\Events\\EventHelper' => $baseDir . '/sources/Service/Events/EventHelper.php', - 'Combodo\\iTop\\Service\\Events\\EventService' => $baseDir . '/sources/Service/Events/EventService.php', - 'Combodo\\iTop\\Service\\Events\\EventServiceLog' => $baseDir . '/sources/Service/Events/EventServiceLog.php', - 'Combodo\\iTop\\Service\\Events\\iEventServiceSetup' => $baseDir . '/sources/Service/Events/iEventServiceSetup.php', - 'Combodo\\iTop\\Service\\Links\\LinkSetDataTransformer' => $baseDir . '/sources/Service/Links/LinkSetDataTransformer.php', - 'Combodo\\iTop\\Service\\Links\\LinkSetModel' => $baseDir . '/sources/Service/Links/LinkSetModel.php', - 'Combodo\\iTop\\Service\\Links\\LinkSetRepository' => $baseDir . '/sources/Service/Links/LinkSetRepository.php', - 'Combodo\\iTop\\Service\\Links\\LinksBulkDataPostProcessor' => $baseDir . '/sources/Service/Links/LinksBulkDataPostProcessor.php', - 'Combodo\\iTop\\Service\\Module\\ModuleService' => $baseDir . '/sources/Service/Module/ModuleService.php', - 'Combodo\\iTop\\Service\\Router\\Exception\\RouteNotFoundException' => $baseDir . '/sources/Service/Router/Exception/RouteNotFoundException.php', - 'Combodo\\iTop\\Service\\Router\\Exception\\RouterException' => $baseDir . '/sources/Service/Router/Exception/RouterException.php', - 'Combodo\\iTop\\Service\\Router\\Router' => $baseDir . '/sources/Service/Router/Router.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectConfig' => $baseDir . '/sources/Service/TemporaryObjects/TemporaryObjectConfig.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectGC' => $baseDir . '/sources/Service/TemporaryObjects/TemporaryObjectGC.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectHelper' => $baseDir . '/sources/Service/TemporaryObjects/TemporaryObjectHelper.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectManager' => $baseDir . '/sources/Service/TemporaryObjects/TemporaryObjectManager.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectRepository' => $baseDir . '/sources/Service/TemporaryObjects/TemporaryObjectRepository.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectsEvents' => $baseDir . '/sources/Service/TemporaryObjects/TemporaryObjectsEvents.php', - 'CompileCSSService' => $baseDir . '/application/compilecssservice.class.inc.php', - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'Config' => $baseDir . '/core/config.class.inc.php', - 'ConfigException' => $baseDir . '/application/exceptions/ConfigException.php', - 'ConfigPlaceholdersResolver' => $baseDir . '/core/config.class.inc.php', - 'Console_Getopt' => $vendorDir . '/pear/console_getopt/Console/Getopt.php', - 'ContextTag' => $baseDir . '/core/contexttag.class.inc.php', - 'CoreCannotSaveObjectException' => $baseDir . '/application/exceptions/CoreCannotSaveObjectException.php', - 'CoreException' => $baseDir . '/application/exceptions/CoreException.php', - 'CoreOqlException' => $baseDir . '/application/exceptions/oql/CoreOqlException.php', - 'CoreOqlMultipleResultsForbiddenException' => $baseDir . '/application/exceptions/oql/CoreOqlMultipleResultsForbiddenException.php', - 'CorePortalInvalidActionRuleException' => $baseDir . '/application/exceptions/CorePortalInvalidActionRuleException.php', - 'CoreServices' => $baseDir . '/core/restservices.class.inc.php', - 'CoreTemplateException' => $baseDir . '/application/exceptions/CoreTemplateException.php', - 'CoreUnexpectedValue' => $baseDir . '/application/exceptions/CoreUnexpectedValue.php', - 'CoreWarning' => $baseDir . '/application/exceptions/CoreWarning.php', - 'CryptEngine' => $baseDir . '/core/simplecrypt.class.inc.php', - 'CustomFieldsHandler' => $baseDir . '/core/customfieldshandler.class.inc.php', - 'DBObject' => $baseDir . '/core/dbobject.class.php', - 'DBObjectSearch' => $baseDir . '/core/dbobjectsearch.class.php', - 'DBObjectSet' => $baseDir . '/core/dbobjectset.class.php', - 'DBObjectSetComparator' => $baseDir . '/core/dbobjectset.class.php', - 'DBProperty' => $baseDir . '/core/dbproperty.class.inc.php', - 'DBSearch' => $baseDir . '/core/dbsearch.class.php', - 'DBSearchHelper' => $baseDir . '/application/DBSearchHelper.php', - 'DBUnionSearch' => $baseDir . '/core/dbunionsearch.class.php', - 'DOMSanitizer' => $baseDir . '/core/htmlsanitizer.class.inc.php', - 'DailyRotatingLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php', - 'Dashboard' => $baseDir . '/application/dashboard.class.inc.php', - 'DashboardLayout' => $baseDir . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutMultiCol' => $baseDir . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutOneCol' => $baseDir . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutThreeCols' => $baseDir . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutTwoCols' => $baseDir . '/application/dashboardlayout.class.inc.php', - 'DashboardMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'Dashlet' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletBadge' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletEmptyCell' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletGroupBy' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletGroupByBars' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletGroupByPie' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletGroupByTable' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletHeaderDynamic' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletHeaderStatic' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletObjectList' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletPlainText' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletProxy' => $baseDir . '/application/dashlet.class.inc.php', - 'DashletUnknown' => $baseDir . '/application/dashlet.class.inc.php', - 'DataTable' => $baseDir . '/application/datatable.class.inc.php', - 'DataTableConfig' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/DataTableConfig/DataTableConfig.php', - 'Datamatrix' => $vendorDir . '/combodo/tcpdf/include/barcodes/datamatrix.php', - 'DateTimeFormat' => $baseDir . '/core/datetimeformat.class.inc.php', - 'DeadLockLog' => $baseDir . '/core/log.class.inc.php', - 'DefaultLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php', - 'DefaultMetricComputer' => $baseDir . '/core/computing.inc.php', - 'DefaultWorkingTimeComputer' => $baseDir . '/core/computing.inc.php', - 'DeleteException' => $baseDir . '/application/exceptions/DeleteException.php', - 'DeletionPlan' => $baseDir . '/core/deletionplan.class.inc.php', - 'DeprecatedCallsLog' => $baseDir . '/core/log.class.inc.php', - 'DesignerBooleanField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerComboField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerForm' => $baseDir . '/application/forms.class.inc.php', - 'DesignerFormField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerFormSelectorField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerHiddenField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerIconSelectionField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerIntegerField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerLabelField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerLongTextField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerSortableField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerStaticTextField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerSubFormField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerTabularForm' => $baseDir . '/application/forms.class.inc.php', - 'DesignerTextField' => $baseDir . '/application/forms.class.inc.php', - 'DesignerXMLField' => $baseDir . '/application/forms.class.inc.php', - 'Dict' => $baseDir . '/core/dict.class.inc.php', - 'DictException' => $baseDir . '/application/exceptions/dict/DictException.php', - 'DictExceptionMissingString' => $baseDir . '/application/exceptions/dict/DictExceptionMissingString.php', - 'DictExceptionUnknownLanguage' => $baseDir . '/application/exceptions/dict/DictExceptionUnknownLanguage.php', - 'DisplayBlock' => $baseDir . '/application/displayblock.class.inc.php', - 'DisplayTemplate' => $baseDir . '/application/template.class.inc.php', - 'DisplayableEdge' => $baseDir . '/core/displayablegraph.class.inc.php', - 'DisplayableGraph' => $baseDir . '/core/displayablegraph.class.inc.php', - 'DisplayableGroupNode' => $baseDir . '/core/displayablegraph.class.inc.php', - 'DisplayableNode' => $baseDir . '/core/displayablegraph.class.inc.php', - 'DisplayableRedundancyNode' => $baseDir . '/core/displayablegraph.class.inc.php', - 'Doctrine\\Common\\Annotations\\Annotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', - 'Doctrine\\Common\\Annotations\\AnnotationException' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', - 'Doctrine\\Common\\Annotations\\AnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', - 'Doctrine\\Common\\Annotations\\AnnotationRegistry' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attribute' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attributes' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Enum' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php', - 'Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php', - 'Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Required' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Target' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php', - 'Doctrine\\Common\\Annotations\\DocLexer' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php', - 'Doctrine\\Common\\Annotations\\DocParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php', - 'Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php', - 'Doctrine\\Common\\Annotations\\IndexedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php', - 'Doctrine\\Common\\Annotations\\PhpParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php', - 'Doctrine\\Common\\Annotations\\PsrCachedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php', - 'Doctrine\\Common\\Annotations\\Reader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php', - 'Doctrine\\Common\\Annotations\\TokenParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php', - 'Doctrine\\Common\\Cache\\Cache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php', - 'Doctrine\\Common\\Cache\\CacheProvider' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php', - 'Doctrine\\Common\\Cache\\ClearableCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php', - 'Doctrine\\Common\\Cache\\FlushableCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php', - 'Doctrine\\Common\\Cache\\MultiDeleteCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php', - 'Doctrine\\Common\\Cache\\MultiGetCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php', - 'Doctrine\\Common\\Cache\\MultiOperationCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiOperationCache.php', - 'Doctrine\\Common\\Cache\\MultiPutCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php', - 'Doctrine\\Common\\Cache\\Psr6\\CacheAdapter' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php', - 'Doctrine\\Common\\Cache\\Psr6\\CacheItem' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php', - 'Doctrine\\Common\\Cache\\Psr6\\DoctrineProvider' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php', - 'Doctrine\\Common\\Cache\\Psr6\\InvalidArgument' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php', - 'Doctrine\\Common\\Cache\\Psr6\\TypedCacheItem' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php', - 'Doctrine\\Common\\Lexer\\AbstractLexer' => $vendorDir . '/doctrine/lexer/src/AbstractLexer.php', - 'Doctrine\\Common\\Lexer\\Token' => $vendorDir . '/doctrine/lexer/src/Token.php', - 'Doctrine\\Deprecations\\Deprecation' => $vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php', - 'Doctrine\\Deprecations\\PHPUnit\\VerifyDeprecations' => $vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php', - 'DownloadPage' => $baseDir . '/sources/Application/WebPage/DownloadPage.php', - 'EMail' => $baseDir . '/core/email.class.inc.php', - 'EMailLaminas' => $baseDir . '/sources/Core/Email/EmailLaminas.php', - 'ErrorPage' => $baseDir . '/sources/Application/WebPage/ErrorPage.php', - 'Event' => $baseDir . '/core/event.class.inc.php', - 'EventIssue' => $baseDir . '/core/event.class.inc.php', - 'EventLoginUsage' => $baseDir . '/core/event.class.inc.php', - 'EventNotification' => $baseDir . '/core/event.class.inc.php', - 'EventNotificationEmail' => $baseDir . '/core/event.class.inc.php', - 'EventOnObject' => $baseDir . '/core/event.class.inc.php', - 'EventRestService' => $baseDir . '/core/event.class.inc.php', - 'EventWebService' => $baseDir . '/core/event.class.inc.php', - 'ExcelBulkExport' => $baseDir . '/core/excelbulkexport.class.inc.php', - 'ExcelExporter' => $baseDir . '/application/excelexporter.class.inc.php', - 'ExceptionLog' => $baseDir . '/core/log.class.inc.php', - 'ExecAsyncTask' => $baseDir . '/core/asynctask.class.inc.php', - 'ExecutionKPI' => $baseDir . '/core/kpi.class.inc.php', - 'Expression' => $baseDir . '/core/oql/expression.class.inc.php', - 'ExpressionCache' => $baseDir . '/core/expressioncache.class.inc.php', - 'ExpressionHelper' => $baseDir . '/core/oql/expression.class.inc.php', - 'FalseExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'FieldExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'FieldExpressionResolved' => $baseDir . '/core/oql/expression.class.inc.php', - 'FieldOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'FileLog' => $baseDir . '/core/log.class.inc.php', - 'FileUploadException' => $baseDir . '/application/utils.inc.php', - 'FilterDefinition' => $baseDir . '/core/filterdef.class.inc.php', - 'FilterFromAttribute' => $baseDir . '/core/filterdef.class.inc.php', - 'FilterPrivateKey' => $baseDir . '/core/filterdef.class.inc.php', - 'FindStylesheetObject' => $baseDir . '/application/findstylesheetobject.class.inc.php', - 'Firebase\\JWT\\BeforeValidException' => $vendorDir . '/firebase/php-jwt/src/BeforeValidException.php', - 'Firebase\\JWT\\CachedKeySet' => $vendorDir . '/firebase/php-jwt/src/CachedKeySet.php', - 'Firebase\\JWT\\ExpiredException' => $vendorDir . '/firebase/php-jwt/src/ExpiredException.php', - 'Firebase\\JWT\\JWK' => $vendorDir . '/firebase/php-jwt/src/JWK.php', - 'Firebase\\JWT\\JWT' => $vendorDir . '/firebase/php-jwt/src/JWT.php', - 'Firebase\\JWT\\Key' => $vendorDir . '/firebase/php-jwt/src/Key.php', - 'Firebase\\JWT\\SignatureInvalidException' => $vendorDir . '/firebase/php-jwt/src/SignatureInvalidException.php', - 'FunctionExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'FunctionOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'GraphEdge' => $baseDir . '/core/simplegraph.class.inc.php', - 'GraphElement' => $baseDir . '/core/simplegraph.class.inc.php', - 'GraphNode' => $baseDir . '/core/simplegraph.class.inc.php', - 'GuzzleHttp\\BodySummarizer' => $vendorDir . '/guzzlehttp/guzzle/src/BodySummarizer.php', - 'GuzzleHttp\\BodySummarizerInterface' => $vendorDir . '/guzzlehttp/guzzle/src/BodySummarizerInterface.php', - 'GuzzleHttp\\Client' => $vendorDir . '/guzzlehttp/guzzle/src/Client.php', - 'GuzzleHttp\\ClientInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ClientInterface.php', - 'GuzzleHttp\\ClientTrait' => $vendorDir . '/guzzlehttp/guzzle/src/ClientTrait.php', - 'GuzzleHttp\\Cookie\\CookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php', - 'GuzzleHttp\\Cookie\\CookieJarInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', - 'GuzzleHttp\\Cookie\\FileCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', - 'GuzzleHttp\\Cookie\\SessionCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', - 'GuzzleHttp\\Cookie\\SetCookie' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php', - 'GuzzleHttp\\Exception\\BadResponseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php', - 'GuzzleHttp\\Exception\\ClientException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ClientException.php', - 'GuzzleHttp\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ConnectException.php', - 'GuzzleHttp\\Exception\\GuzzleException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php', - 'GuzzleHttp\\Exception\\InvalidArgumentException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php', - 'GuzzleHttp\\Exception\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php', - 'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php', - 'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', - 'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php', - 'GuzzleHttp\\HandlerStack' => $vendorDir . '/guzzlehttp/guzzle/src/HandlerStack.php', - 'GuzzleHttp\\Handler\\CurlFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', - 'GuzzleHttp\\Handler\\CurlFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', - 'GuzzleHttp\\Handler\\CurlHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', - 'GuzzleHttp\\Handler\\CurlMultiHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', - 'GuzzleHttp\\Handler\\EasyHandle' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php', - 'GuzzleHttp\\Handler\\HeaderProcessor' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php', - 'GuzzleHttp\\Handler\\MockHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/MockHandler.php', - 'GuzzleHttp\\Handler\\Proxy' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/Proxy.php', - 'GuzzleHttp\\Handler\\StreamHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php', - 'GuzzleHttp\\MessageFormatter' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatter.php', - 'GuzzleHttp\\MessageFormatterInterface' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatterInterface.php', - 'GuzzleHttp\\Middleware' => $vendorDir . '/guzzlehttp/guzzle/src/Middleware.php', - 'GuzzleHttp\\Pool' => $vendorDir . '/guzzlehttp/guzzle/src/Pool.php', - 'GuzzleHttp\\PrepareBodyMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', - 'GuzzleHttp\\Promise\\AggregateException' => $vendorDir . '/guzzlehttp/promises/src/AggregateException.php', - 'GuzzleHttp\\Promise\\CancellationException' => $vendorDir . '/guzzlehttp/promises/src/CancellationException.php', - 'GuzzleHttp\\Promise\\Coroutine' => $vendorDir . '/guzzlehttp/promises/src/Coroutine.php', - 'GuzzleHttp\\Promise\\Create' => $vendorDir . '/guzzlehttp/promises/src/Create.php', - 'GuzzleHttp\\Promise\\Each' => $vendorDir . '/guzzlehttp/promises/src/Each.php', - 'GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php', - 'GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php', - 'GuzzleHttp\\Promise\\Is' => $vendorDir . '/guzzlehttp/promises/src/Is.php', - 'GuzzleHttp\\Promise\\Promise' => $vendorDir . '/guzzlehttp/promises/src/Promise.php', - 'GuzzleHttp\\Promise\\PromiseInterface' => $vendorDir . '/guzzlehttp/promises/src/PromiseInterface.php', - 'GuzzleHttp\\Promise\\PromisorInterface' => $vendorDir . '/guzzlehttp/promises/src/PromisorInterface.php', - 'GuzzleHttp\\Promise\\RejectedPromise' => $vendorDir . '/guzzlehttp/promises/src/RejectedPromise.php', - 'GuzzleHttp\\Promise\\RejectionException' => $vendorDir . '/guzzlehttp/promises/src/RejectionException.php', - 'GuzzleHttp\\Promise\\TaskQueue' => $vendorDir . '/guzzlehttp/promises/src/TaskQueue.php', - 'GuzzleHttp\\Promise\\TaskQueueInterface' => $vendorDir . '/guzzlehttp/promises/src/TaskQueueInterface.php', - 'GuzzleHttp\\Promise\\Utils' => $vendorDir . '/guzzlehttp/promises/src/Utils.php', - 'GuzzleHttp\\Psr7\\AppendStream' => $vendorDir . '/guzzlehttp/psr7/src/AppendStream.php', - 'GuzzleHttp\\Psr7\\BufferStream' => $vendorDir . '/guzzlehttp/psr7/src/BufferStream.php', - 'GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php', - 'GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php', - 'GuzzleHttp\\Psr7\\Exception\\MalformedUriException' => $vendorDir . '/guzzlehttp/psr7/src/Exception/MalformedUriException.php', - 'GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php', - 'GuzzleHttp\\Psr7\\Header' => $vendorDir . '/guzzlehttp/psr7/src/Header.php', - 'GuzzleHttp\\Psr7\\HttpFactory' => $vendorDir . '/guzzlehttp/psr7/src/HttpFactory.php', - 'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php', - 'GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php', - 'GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php', - 'GuzzleHttp\\Psr7\\Message' => $vendorDir . '/guzzlehttp/psr7/src/Message.php', - 'GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php', - 'GuzzleHttp\\Psr7\\MimeType' => $vendorDir . '/guzzlehttp/psr7/src/MimeType.php', - 'GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php', - 'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php', - 'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php', - 'GuzzleHttp\\Psr7\\Query' => $vendorDir . '/guzzlehttp/psr7/src/Query.php', - 'GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php', - 'GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php', - 'GuzzleHttp\\Psr7\\Rfc7230' => $vendorDir . '/guzzlehttp/psr7/src/Rfc7230.php', - 'GuzzleHttp\\Psr7\\ServerRequest' => $vendorDir . '/guzzlehttp/psr7/src/ServerRequest.php', - 'GuzzleHttp\\Psr7\\Stream' => $vendorDir . '/guzzlehttp/psr7/src/Stream.php', - 'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php', - 'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php', - 'GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php', - 'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php', - 'GuzzleHttp\\Psr7\\UriComparator' => $vendorDir . '/guzzlehttp/psr7/src/UriComparator.php', - 'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php', - 'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php', - 'GuzzleHttp\\Psr7\\Utils' => $vendorDir . '/guzzlehttp/psr7/src/Utils.php', - 'GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php', - 'GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php', - 'GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php', - 'GuzzleHttp\\TransferStats' => $vendorDir . '/guzzlehttp/guzzle/src/TransferStats.php', - 'GuzzleHttp\\Utils' => $vendorDir . '/guzzlehttp/guzzle/src/Utils.php', - 'HTMLBulkExport' => $baseDir . '/core/htmlbulkexport.class.inc.php', - 'HTMLDOMSanitizer' => $baseDir . '/core/htmlsanitizer.class.inc.php', - 'HTMLNullSanitizer' => $baseDir . '/core/htmlsanitizer.class.inc.php', - 'HTMLSanitizer' => $baseDir . '/core/htmlsanitizer.class.inc.php', - 'Html2Text\\Html2Text' => $baseDir . '/application/Html2Text.php', - 'Html2Text\\Html2TextException' => $baseDir . '/application/Html2TextException.php', - 'ITopArchiveTar' => $baseDir . '/core/tar-itop.class.inc.php', - 'InlineImage' => $baseDir . '/core/inlineimage.class.inc.php', - 'InlineImageGC' => $baseDir . '/core/inlineimage.class.inc.php', - 'InputOutputTask' => $baseDir . '/application/iotask.class.inc.php', - 'IntervalExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'IntervalOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'IntlDateFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php', - 'Introspection' => $baseDir . '/core/introspection.class.inc.php', - 'InvalidConfigParamException' => $baseDir . '/application/exceptions/InvalidConfigParamException.php', - 'InvalidPasswordAttributeOneWayPassword' => $baseDir . '/application/exceptions/InvalidPasswordAttributeOneWayPassword.php', - 'IssueLog' => $baseDir . '/core/log.class.inc.php', - 'ItopCounter' => $baseDir . '/core/counter.class.inc.php', - 'JSButtonItem' => $baseDir . '/application/applicationextension.inc.php', - 'JSPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php', - 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', - 'JsonPPage' => $baseDir . '/sources/Application/WebPage/JsonPPage.php', - 'JsonPage' => $baseDir . '/sources/Application/WebPage/JsonPage.php', - 'KeyValueStore' => $baseDir . '/core/counter.class.inc.php', - 'Laminas\\Loader\\AutoloaderFactory' => $vendorDir . '/laminas/laminas-loader/src/AutoloaderFactory.php', - 'Laminas\\Loader\\ClassMapAutoloader' => $vendorDir . '/laminas/laminas-loader/src/ClassMapAutoloader.php', - 'Laminas\\Loader\\Exception\\BadMethodCallException' => $vendorDir . '/laminas/laminas-loader/src/Exception/BadMethodCallException.php', - 'Laminas\\Loader\\Exception\\DomainException' => $vendorDir . '/laminas/laminas-loader/src/Exception/DomainException.php', - 'Laminas\\Loader\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-loader/src/Exception/ExceptionInterface.php', - 'Laminas\\Loader\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-loader/src/Exception/InvalidArgumentException.php', - 'Laminas\\Loader\\Exception\\InvalidPathException' => $vendorDir . '/laminas/laminas-loader/src/Exception/InvalidPathException.php', - 'Laminas\\Loader\\Exception\\MissingResourceNamespaceException' => $vendorDir . '/laminas/laminas-loader/src/Exception/MissingResourceNamespaceException.php', - 'Laminas\\Loader\\Exception\\PluginLoaderException' => $vendorDir . '/laminas/laminas-loader/src/Exception/PluginLoaderException.php', - 'Laminas\\Loader\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-loader/src/Exception/RuntimeException.php', - 'Laminas\\Loader\\Exception\\SecurityException' => $vendorDir . '/laminas/laminas-loader/src/Exception/SecurityException.php', - 'Laminas\\Loader\\ModuleAutoloader' => $vendorDir . '/laminas/laminas-loader/src/ModuleAutoloader.php', - 'Laminas\\Loader\\PluginClassLoader' => $vendorDir . '/laminas/laminas-loader/src/PluginClassLoader.php', - 'Laminas\\Loader\\PluginClassLocator' => $vendorDir . '/laminas/laminas-loader/src/PluginClassLocator.php', - 'Laminas\\Loader\\ShortNameLocator' => $vendorDir . '/laminas/laminas-loader/src/ShortNameLocator.php', - 'Laminas\\Loader\\SplAutoloader' => $vendorDir . '/laminas/laminas-loader/src/SplAutoloader.php', - 'Laminas\\Loader\\StandardAutoloader' => $vendorDir . '/laminas/laminas-loader/src/StandardAutoloader.php', - 'Laminas\\Mail\\Address' => $vendorDir . '/laminas/laminas-mail/src/Address.php', - 'Laminas\\Mail\\AddressList' => $vendorDir . '/laminas/laminas-mail/src/AddressList.php', - 'Laminas\\Mail\\Address\\AddressInterface' => $vendorDir . '/laminas/laminas-mail/src/Address/AddressInterface.php', - 'Laminas\\Mail\\ConfigProvider' => $vendorDir . '/laminas/laminas-mail/src/ConfigProvider.php', - 'Laminas\\Mail\\Exception\\BadMethodCallException' => $vendorDir . '/laminas/laminas-mail/src/Exception/BadMethodCallException.php', - 'Laminas\\Mail\\Exception\\DomainException' => $vendorDir . '/laminas/laminas-mail/src/Exception/DomainException.php', - 'Laminas\\Mail\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-mail/src/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-mail/src/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Exception\\OutOfBoundsException' => $vendorDir . '/laminas/laminas-mail/src/Exception/OutOfBoundsException.php', - 'Laminas\\Mail\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-mail/src/Exception/RuntimeException.php', - 'Laminas\\Mail\\Header\\AbstractAddressList' => $vendorDir . '/laminas/laminas-mail/src/Header/AbstractAddressList.php', - 'Laminas\\Mail\\Header\\Bcc' => $vendorDir . '/laminas/laminas-mail/src/Header/Bcc.php', - 'Laminas\\Mail\\Header\\Cc' => $vendorDir . '/laminas/laminas-mail/src/Header/Cc.php', - 'Laminas\\Mail\\Header\\ContentDisposition' => $vendorDir . '/laminas/laminas-mail/src/Header/ContentDisposition.php', - 'Laminas\\Mail\\Header\\ContentTransferEncoding' => $vendorDir . '/laminas/laminas-mail/src/Header/ContentTransferEncoding.php', - 'Laminas\\Mail\\Header\\ContentType' => $vendorDir . '/laminas/laminas-mail/src/Header/ContentType.php', - 'Laminas\\Mail\\Header\\Date' => $vendorDir . '/laminas/laminas-mail/src/Header/Date.php', - 'Laminas\\Mail\\Header\\Exception\\BadMethodCallException' => $vendorDir . '/laminas/laminas-mail/src/Header/Exception/BadMethodCallException.php', - 'Laminas\\Mail\\Header\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-mail/src/Header/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Header\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-mail/src/Header/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Header\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-mail/src/Header/Exception/RuntimeException.php', - 'Laminas\\Mail\\Header\\From' => $vendorDir . '/laminas/laminas-mail/src/Header/From.php', - 'Laminas\\Mail\\Header\\GenericHeader' => $vendorDir . '/laminas/laminas-mail/src/Header/GenericHeader.php', - 'Laminas\\Mail\\Header\\GenericMultiHeader' => $vendorDir . '/laminas/laminas-mail/src/Header/GenericMultiHeader.php', - 'Laminas\\Mail\\Header\\HeaderInterface' => $vendorDir . '/laminas/laminas-mail/src/Header/HeaderInterface.php', - 'Laminas\\Mail\\Header\\HeaderLoader' => $vendorDir . '/laminas/laminas-mail/src/Header/HeaderLoader.php', - 'Laminas\\Mail\\Header\\HeaderLocator' => $vendorDir . '/laminas/laminas-mail/src/Header/HeaderLocator.php', - 'Laminas\\Mail\\Header\\HeaderLocatorInterface' => $vendorDir . '/laminas/laminas-mail/src/Header/HeaderLocatorInterface.php', - 'Laminas\\Mail\\Header\\HeaderName' => $vendorDir . '/laminas/laminas-mail/src/Header/HeaderName.php', - 'Laminas\\Mail\\Header\\HeaderValue' => $vendorDir . '/laminas/laminas-mail/src/Header/HeaderValue.php', - 'Laminas\\Mail\\Header\\HeaderWrap' => $vendorDir . '/laminas/laminas-mail/src/Header/HeaderWrap.php', - 'Laminas\\Mail\\Header\\IdentificationField' => $vendorDir . '/laminas/laminas-mail/src/Header/IdentificationField.php', - 'Laminas\\Mail\\Header\\InReplyTo' => $vendorDir . '/laminas/laminas-mail/src/Header/InReplyTo.php', - 'Laminas\\Mail\\Header\\ListParser' => $vendorDir . '/laminas/laminas-mail/src/Header/ListParser.php', - 'Laminas\\Mail\\Header\\MessageId' => $vendorDir . '/laminas/laminas-mail/src/Header/MessageId.php', - 'Laminas\\Mail\\Header\\MimeVersion' => $vendorDir . '/laminas/laminas-mail/src/Header/MimeVersion.php', - 'Laminas\\Mail\\Header\\MultipleHeadersInterface' => $vendorDir . '/laminas/laminas-mail/src/Header/MultipleHeadersInterface.php', - 'Laminas\\Mail\\Header\\Received' => $vendorDir . '/laminas/laminas-mail/src/Header/Received.php', - 'Laminas\\Mail\\Header\\References' => $vendorDir . '/laminas/laminas-mail/src/Header/References.php', - 'Laminas\\Mail\\Header\\ReplyTo' => $vendorDir . '/laminas/laminas-mail/src/Header/ReplyTo.php', - 'Laminas\\Mail\\Header\\Sender' => $vendorDir . '/laminas/laminas-mail/src/Header/Sender.php', - 'Laminas\\Mail\\Header\\StructuredInterface' => $vendorDir . '/laminas/laminas-mail/src/Header/StructuredInterface.php', - 'Laminas\\Mail\\Header\\Subject' => $vendorDir . '/laminas/laminas-mail/src/Header/Subject.php', - 'Laminas\\Mail\\Header\\To' => $vendorDir . '/laminas/laminas-mail/src/Header/To.php', - 'Laminas\\Mail\\Header\\UnstructuredInterface' => $vendorDir . '/laminas/laminas-mail/src/Header/UnstructuredInterface.php', - 'Laminas\\Mail\\Headers' => $vendorDir . '/laminas/laminas-mail/src/Headers.php', - 'Laminas\\Mail\\Message' => $vendorDir . '/laminas/laminas-mail/src/Message.php', - 'Laminas\\Mail\\MessageFactory' => $vendorDir . '/laminas/laminas-mail/src/MessageFactory.php', - 'Laminas\\Mail\\Module' => $vendorDir . '/laminas/laminas-mail/src/Module.php', - 'Laminas\\Mail\\Protocol\\AbstractProtocol' => $vendorDir . '/laminas/laminas-mail/src/Protocol/AbstractProtocol.php', - 'Laminas\\Mail\\Protocol\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Protocol\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Protocol\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Exception/RuntimeException.php', - 'Laminas\\Mail\\Protocol\\Imap' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Imap.php', - 'Laminas\\Mail\\Protocol\\Pop3' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Pop3.php', - 'Laminas\\Mail\\Protocol\\ProtocolTrait' => $vendorDir . '/laminas/laminas-mail/src/Protocol/ProtocolTrait.php', - 'Laminas\\Mail\\Protocol\\Smtp' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Smtp.php', - 'Laminas\\Mail\\Protocol\\SmtpPluginManager' => $vendorDir . '/laminas/laminas-mail/src/Protocol/SmtpPluginManager.php', - 'Laminas\\Mail\\Protocol\\SmtpPluginManagerFactory' => $vendorDir . '/laminas/laminas-mail/src/Protocol/SmtpPluginManagerFactory.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Crammd5' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Smtp/Auth/Crammd5.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Login' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Smtp/Auth/Login.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Oauth' => $baseDir . '/sources/Core/Authentication/Client/Smtp/SmtpOAuthLogin.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Plain' => $vendorDir . '/laminas/laminas-mail/src/Protocol/Smtp/Auth/Plain.php', - 'Laminas\\Mail\\Storage' => $vendorDir . '/laminas/laminas-mail/src/Storage.php', - 'Laminas\\Mail\\Storage\\AbstractStorage' => $vendorDir . '/laminas/laminas-mail/src/Storage/AbstractStorage.php', - 'Laminas\\Mail\\Storage\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-mail/src/Storage/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Storage\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-mail/src/Storage/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Storage\\Exception\\OutOfBoundsException' => $vendorDir . '/laminas/laminas-mail/src/Storage/Exception/OutOfBoundsException.php', - 'Laminas\\Mail\\Storage\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-mail/src/Storage/Exception/RuntimeException.php', - 'Laminas\\Mail\\Storage\\Folder' => $vendorDir . '/laminas/laminas-mail/src/Storage/Folder.php', - 'Laminas\\Mail\\Storage\\Folder\\FolderInterface' => $vendorDir . '/laminas/laminas-mail/src/Storage/Folder/FolderInterface.php', - 'Laminas\\Mail\\Storage\\Folder\\Maildir' => $vendorDir . '/laminas/laminas-mail/src/Storage/Folder/Maildir.php', - 'Laminas\\Mail\\Storage\\Folder\\Mbox' => $vendorDir . '/laminas/laminas-mail/src/Storage/Folder/Mbox.php', - 'Laminas\\Mail\\Storage\\Imap' => $vendorDir . '/laminas/laminas-mail/src/Storage/Imap.php', - 'Laminas\\Mail\\Storage\\Maildir' => $vendorDir . '/laminas/laminas-mail/src/Storage/Maildir.php', - 'Laminas\\Mail\\Storage\\Mbox' => $vendorDir . '/laminas/laminas-mail/src/Storage/Mbox.php', - 'Laminas\\Mail\\Storage\\Message' => $vendorDir . '/laminas/laminas-mail/src/Storage/Message.php', - 'Laminas\\Mail\\Storage\\Message\\File' => $vendorDir . '/laminas/laminas-mail/src/Storage/Message/File.php', - 'Laminas\\Mail\\Storage\\Message\\MessageInterface' => $vendorDir . '/laminas/laminas-mail/src/Storage/Message/MessageInterface.php', - 'Laminas\\Mail\\Storage\\ParamsNormalizer' => $vendorDir . '/laminas/laminas-mail/src/Storage/ParamsNormalizer.php', - 'Laminas\\Mail\\Storage\\Part' => $vendorDir . '/laminas/laminas-mail/src/Storage/Part.php', - 'Laminas\\Mail\\Storage\\Part\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-mail/src/Storage/Part/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Storage\\Part\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-mail/src/Storage/Part/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Storage\\Part\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-mail/src/Storage/Part/Exception/RuntimeException.php', - 'Laminas\\Mail\\Storage\\Part\\File' => $vendorDir . '/laminas/laminas-mail/src/Storage/Part/File.php', - 'Laminas\\Mail\\Storage\\Part\\PartInterface' => $vendorDir . '/laminas/laminas-mail/src/Storage/Part/PartInterface.php', - 'Laminas\\Mail\\Storage\\Pop3' => $vendorDir . '/laminas/laminas-mail/src/Storage/Pop3.php', - 'Laminas\\Mail\\Storage\\Writable\\Maildir' => $vendorDir . '/laminas/laminas-mail/src/Storage/Writable/Maildir.php', - 'Laminas\\Mail\\Storage\\Writable\\WritableInterface' => $vendorDir . '/laminas/laminas-mail/src/Storage/Writable/WritableInterface.php', - 'Laminas\\Mail\\Transport\\Envelope' => $vendorDir . '/laminas/laminas-mail/src/Transport/Envelope.php', - 'Laminas\\Mail\\Transport\\Exception\\DomainException' => $vendorDir . '/laminas/laminas-mail/src/Transport/Exception/DomainException.php', - 'Laminas\\Mail\\Transport\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-mail/src/Transport/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Transport\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-mail/src/Transport/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Transport\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-mail/src/Transport/Exception/RuntimeException.php', - 'Laminas\\Mail\\Transport\\Factory' => $vendorDir . '/laminas/laminas-mail/src/Transport/Factory.php', - 'Laminas\\Mail\\Transport\\File' => $vendorDir . '/laminas/laminas-mail/src/Transport/File.php', - 'Laminas\\Mail\\Transport\\FileOptions' => $vendorDir . '/laminas/laminas-mail/src/Transport/FileOptions.php', - 'Laminas\\Mail\\Transport\\InMemory' => $vendorDir . '/laminas/laminas-mail/src/Transport/InMemory.php', - 'Laminas\\Mail\\Transport\\Sendmail' => $vendorDir . '/laminas/laminas-mail/src/Transport/Sendmail.php', - 'Laminas\\Mail\\Transport\\Smtp' => $vendorDir . '/laminas/laminas-mail/src/Transport/Smtp.php', - 'Laminas\\Mail\\Transport\\SmtpOptions' => $vendorDir . '/laminas/laminas-mail/src/Transport/SmtpOptions.php', - 'Laminas\\Mail\\Transport\\TransportInterface' => $vendorDir . '/laminas/laminas-mail/src/Transport/TransportInterface.php', - 'Laminas\\Mime\\Decode' => $vendorDir . '/laminas/laminas-mime/src/Decode.php', - 'Laminas\\Mime\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-mime/src/Exception/ExceptionInterface.php', - 'Laminas\\Mime\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-mime/src/Exception/InvalidArgumentException.php', - 'Laminas\\Mime\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-mime/src/Exception/RuntimeException.php', - 'Laminas\\Mime\\Message' => $vendorDir . '/laminas/laminas-mime/src/Message.php', - 'Laminas\\Mime\\Mime' => $vendorDir . '/laminas/laminas-mime/src/Mime.php', - 'Laminas\\Mime\\Part' => $vendorDir . '/laminas/laminas-mime/src/Part.php', - 'Laminas\\ServiceManager\\AbstractFactoryInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/AbstractFactoryInterface.php', - 'Laminas\\ServiceManager\\AbstractFactory\\ConfigAbstractFactory' => $vendorDir . '/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php', - 'Laminas\\ServiceManager\\AbstractFactory\\ReflectionBasedAbstractFactory' => $vendorDir . '/laminas/laminas-servicemanager/src/AbstractFactory/ReflectionBasedAbstractFactory.php', - 'Laminas\\ServiceManager\\AbstractPluginManager' => $vendorDir . '/laminas/laminas-servicemanager/src/AbstractPluginManager.php', - 'Laminas\\ServiceManager\\Config' => $vendorDir . '/laminas/laminas-servicemanager/src/Config.php', - 'Laminas\\ServiceManager\\ConfigInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/ConfigInterface.php', - 'Laminas\\ServiceManager\\DelegatorFactoryInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/DelegatorFactoryInterface.php', - 'Laminas\\ServiceManager\\Exception\\ContainerModificationsNotAllowedException' => $vendorDir . '/laminas/laminas-servicemanager/src/Exception/ContainerModificationsNotAllowedException.php', - 'Laminas\\ServiceManager\\Exception\\CyclicAliasException' => $vendorDir . '/laminas/laminas-servicemanager/src/Exception/CyclicAliasException.php', - 'Laminas\\ServiceManager\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/Exception/ExceptionInterface.php', - 'Laminas\\ServiceManager\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-servicemanager/src/Exception/InvalidArgumentException.php', - 'Laminas\\ServiceManager\\Exception\\InvalidServiceException' => $vendorDir . '/laminas/laminas-servicemanager/src/Exception/InvalidServiceException.php', - 'Laminas\\ServiceManager\\Exception\\ServiceNotCreatedException' => $vendorDir . '/laminas/laminas-servicemanager/src/Exception/ServiceNotCreatedException.php', - 'Laminas\\ServiceManager\\Exception\\ServiceNotFoundException' => $vendorDir . '/laminas/laminas-servicemanager/src/Exception/ServiceNotFoundException.php', - 'Laminas\\ServiceManager\\FactoryInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/FactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\AbstractFactoryInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/Factory/AbstractFactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\DelegatorFactoryInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/Factory/DelegatorFactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\FactoryInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/Factory/FactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\InvokableFactory' => $vendorDir . '/laminas/laminas-servicemanager/src/Factory/InvokableFactory.php', - 'Laminas\\ServiceManager\\InitializerInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/InitializerInterface.php', - 'Laminas\\ServiceManager\\Initializer\\InitializerInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/Initializer/InitializerInterface.php', - 'Laminas\\ServiceManager\\PluginManagerInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/PluginManagerInterface.php', - 'Laminas\\ServiceManager\\Proxy\\LazyServiceFactory' => $vendorDir . '/laminas/laminas-servicemanager/src/Proxy/LazyServiceFactory.php', - 'Laminas\\ServiceManager\\ServiceLocatorInterface' => $vendorDir . '/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php', - 'Laminas\\ServiceManager\\ServiceManager' => $vendorDir . '/laminas/laminas-servicemanager/src/ServiceManager.php', - 'Laminas\\ServiceManager\\Tool\\ConfigDumper' => $vendorDir . '/laminas/laminas-servicemanager/src/Tool/ConfigDumper.php', - 'Laminas\\ServiceManager\\Tool\\ConfigDumperCommand' => $vendorDir . '/laminas/laminas-servicemanager/src/Tool/ConfigDumperCommand.php', - 'Laminas\\ServiceManager\\Tool\\FactoryCreator' => $vendorDir . '/laminas/laminas-servicemanager/src/Tool/FactoryCreator.php', - 'Laminas\\ServiceManager\\Tool\\FactoryCreatorCommand' => $vendorDir . '/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php', - 'Laminas\\Stdlib\\AbstractOptions' => $vendorDir . '/laminas/laminas-stdlib/src/AbstractOptions.php', - 'Laminas\\Stdlib\\ArrayObject' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayObject.php', - 'Laminas\\Stdlib\\ArraySerializableInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ArraySerializableInterface.php', - 'Laminas\\Stdlib\\ArrayStack' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayStack.php', - 'Laminas\\Stdlib\\ArrayUtils' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils.php', - 'Laminas\\Stdlib\\ArrayUtils\\MergeRemoveKey' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php', - 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKey' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKey.php', - 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKeyInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php', - 'Laminas\\Stdlib\\ConsoleHelper' => $vendorDir . '/laminas/laminas-stdlib/src/ConsoleHelper.php', - 'Laminas\\Stdlib\\DispatchableInterface' => $vendorDir . '/laminas/laminas-stdlib/src/DispatchableInterface.php', - 'Laminas\\Stdlib\\ErrorHandler' => $vendorDir . '/laminas/laminas-stdlib/src/ErrorHandler.php', - 'Laminas\\Stdlib\\Exception\\BadMethodCallException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/BadMethodCallException.php', - 'Laminas\\Stdlib\\Exception\\DomainException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/DomainException.php', - 'Laminas\\Stdlib\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/ExceptionInterface.php', - 'Laminas\\Stdlib\\Exception\\ExtensionNotLoadedException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/ExtensionNotLoadedException.php', - 'Laminas\\Stdlib\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/InvalidArgumentException.php', - 'Laminas\\Stdlib\\Exception\\LogicException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/LogicException.php', - 'Laminas\\Stdlib\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/RuntimeException.php', - 'Laminas\\Stdlib\\FastPriorityQueue' => $vendorDir . '/laminas/laminas-stdlib/src/FastPriorityQueue.php', - 'Laminas\\Stdlib\\Glob' => $vendorDir . '/laminas/laminas-stdlib/src/Glob.php', - 'Laminas\\Stdlib\\Guard\\AllGuardsTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/AllGuardsTrait.php', - 'Laminas\\Stdlib\\Guard\\ArrayOrTraversableGuardTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php', - 'Laminas\\Stdlib\\Guard\\EmptyGuardTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/EmptyGuardTrait.php', - 'Laminas\\Stdlib\\Guard\\NullGuardTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/NullGuardTrait.php', - 'Laminas\\Stdlib\\InitializableInterface' => $vendorDir . '/laminas/laminas-stdlib/src/InitializableInterface.php', - 'Laminas\\Stdlib\\JsonSerializable' => $vendorDir . '/laminas/laminas-stdlib/src/JsonSerializable.php', - 'Laminas\\Stdlib\\Message' => $vendorDir . '/laminas/laminas-stdlib/src/Message.php', - 'Laminas\\Stdlib\\MessageInterface' => $vendorDir . '/laminas/laminas-stdlib/src/MessageInterface.php', - 'Laminas\\Stdlib\\ParameterObjectInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ParameterObjectInterface.php', - 'Laminas\\Stdlib\\Parameters' => $vendorDir . '/laminas/laminas-stdlib/src/Parameters.php', - 'Laminas\\Stdlib\\ParametersInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ParametersInterface.php', - 'Laminas\\Stdlib\\PriorityList' => $vendorDir . '/laminas/laminas-stdlib/src/PriorityList.php', - 'Laminas\\Stdlib\\PriorityQueue' => $vendorDir . '/laminas/laminas-stdlib/src/PriorityQueue.php', - 'Laminas\\Stdlib\\Request' => $vendorDir . '/laminas/laminas-stdlib/src/Request.php', - 'Laminas\\Stdlib\\RequestInterface' => $vendorDir . '/laminas/laminas-stdlib/src/RequestInterface.php', - 'Laminas\\Stdlib\\Response' => $vendorDir . '/laminas/laminas-stdlib/src/Response.php', - 'Laminas\\Stdlib\\ResponseInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ResponseInterface.php', - 'Laminas\\Stdlib\\SplPriorityQueue' => $vendorDir . '/laminas/laminas-stdlib/src/SplPriorityQueue.php', - 'Laminas\\Stdlib\\SplQueue' => $vendorDir . '/laminas/laminas-stdlib/src/SplQueue.php', - 'Laminas\\Stdlib\\SplStack' => $vendorDir . '/laminas/laminas-stdlib/src/SplStack.php', - 'Laminas\\Stdlib\\StringUtils' => $vendorDir . '/laminas/laminas-stdlib/src/StringUtils.php', - 'Laminas\\Stdlib\\StringWrapper\\AbstractStringWrapper' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php', - 'Laminas\\Stdlib\\StringWrapper\\Iconv' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/Iconv.php', - 'Laminas\\Stdlib\\StringWrapper\\Intl' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/Intl.php', - 'Laminas\\Stdlib\\StringWrapper\\MbString' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/MbString.php', - 'Laminas\\Stdlib\\StringWrapper\\Native' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/Native.php', - 'Laminas\\Stdlib\\StringWrapper\\StringWrapperInterface' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/StringWrapperInterface.php', - 'Laminas\\Validator\\AbstractValidator' => $vendorDir . '/laminas/laminas-validator/src/AbstractValidator.php', - 'Laminas\\Validator\\Barcode' => $vendorDir . '/laminas/laminas-validator/src/Barcode.php', - 'Laminas\\Validator\\Barcode\\AbstractAdapter' => $vendorDir . '/laminas/laminas-validator/src/Barcode/AbstractAdapter.php', - 'Laminas\\Validator\\Barcode\\AdapterInterface' => $vendorDir . '/laminas/laminas-validator/src/Barcode/AdapterInterface.php', - 'Laminas\\Validator\\Barcode\\Codabar' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Codabar.php', - 'Laminas\\Validator\\Barcode\\Code128' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Code128.php', - 'Laminas\\Validator\\Barcode\\Code25' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Code25.php', - 'Laminas\\Validator\\Barcode\\Code25interleaved' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Code25interleaved.php', - 'Laminas\\Validator\\Barcode\\Code39' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Code39.php', - 'Laminas\\Validator\\Barcode\\Code39ext' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Code39ext.php', - 'Laminas\\Validator\\Barcode\\Code93' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Code93.php', - 'Laminas\\Validator\\Barcode\\Code93ext' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Code93ext.php', - 'Laminas\\Validator\\Barcode\\Ean12' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Ean12.php', - 'Laminas\\Validator\\Barcode\\Ean13' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Ean13.php', - 'Laminas\\Validator\\Barcode\\Ean14' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Ean14.php', - 'Laminas\\Validator\\Barcode\\Ean18' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Ean18.php', - 'Laminas\\Validator\\Barcode\\Ean2' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Ean2.php', - 'Laminas\\Validator\\Barcode\\Ean5' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Ean5.php', - 'Laminas\\Validator\\Barcode\\Ean8' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Ean8.php', - 'Laminas\\Validator\\Barcode\\Gtin12' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Gtin12.php', - 'Laminas\\Validator\\Barcode\\Gtin13' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Gtin13.php', - 'Laminas\\Validator\\Barcode\\Gtin14' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Gtin14.php', - 'Laminas\\Validator\\Barcode\\Identcode' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Identcode.php', - 'Laminas\\Validator\\Barcode\\Intelligentmail' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Intelligentmail.php', - 'Laminas\\Validator\\Barcode\\Issn' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Issn.php', - 'Laminas\\Validator\\Barcode\\Itf14' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Itf14.php', - 'Laminas\\Validator\\Barcode\\Leitcode' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Leitcode.php', - 'Laminas\\Validator\\Barcode\\Planet' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Planet.php', - 'Laminas\\Validator\\Barcode\\Postnet' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Postnet.php', - 'Laminas\\Validator\\Barcode\\Royalmail' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Royalmail.php', - 'Laminas\\Validator\\Barcode\\Sscc' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Sscc.php', - 'Laminas\\Validator\\Barcode\\Upca' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Upca.php', - 'Laminas\\Validator\\Barcode\\Upce' => $vendorDir . '/laminas/laminas-validator/src/Barcode/Upce.php', - 'Laminas\\Validator\\Between' => $vendorDir . '/laminas/laminas-validator/src/Between.php', - 'Laminas\\Validator\\Bitwise' => $vendorDir . '/laminas/laminas-validator/src/Bitwise.php', - 'Laminas\\Validator\\BusinessIdentifierCode' => $vendorDir . '/laminas/laminas-validator/src/BusinessIdentifierCode.php', - 'Laminas\\Validator\\Callback' => $vendorDir . '/laminas/laminas-validator/src/Callback.php', - 'Laminas\\Validator\\ConfigProvider' => $vendorDir . '/laminas/laminas-validator/src/ConfigProvider.php', - 'Laminas\\Validator\\CreditCard' => $vendorDir . '/laminas/laminas-validator/src/CreditCard.php', - 'Laminas\\Validator\\Csrf' => $vendorDir . '/laminas/laminas-validator/src/Csrf.php', - 'Laminas\\Validator\\Date' => $vendorDir . '/laminas/laminas-validator/src/Date.php', - 'Laminas\\Validator\\DateStep' => $vendorDir . '/laminas/laminas-validator/src/DateStep.php', - 'Laminas\\Validator\\Db\\AbstractDb' => $vendorDir . '/laminas/laminas-validator/src/Db/AbstractDb.php', - 'Laminas\\Validator\\Db\\NoRecordExists' => $vendorDir . '/laminas/laminas-validator/src/Db/NoRecordExists.php', - 'Laminas\\Validator\\Db\\RecordExists' => $vendorDir . '/laminas/laminas-validator/src/Db/RecordExists.php', - 'Laminas\\Validator\\Digits' => $vendorDir . '/laminas/laminas-validator/src/Digits.php', - 'Laminas\\Validator\\EmailAddress' => $vendorDir . '/laminas/laminas-validator/src/EmailAddress.php', - 'Laminas\\Validator\\Exception\\BadMethodCallException' => $vendorDir . '/laminas/laminas-validator/src/Exception/BadMethodCallException.php', - 'Laminas\\Validator\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-validator/src/Exception/ExceptionInterface.php', - 'Laminas\\Validator\\Exception\\ExtensionNotLoadedException' => $vendorDir . '/laminas/laminas-validator/src/Exception/ExtensionNotLoadedException.php', - 'Laminas\\Validator\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-validator/src/Exception/InvalidArgumentException.php', - 'Laminas\\Validator\\Exception\\InvalidMagicMimeFileException' => $vendorDir . '/laminas/laminas-validator/src/Exception/InvalidMagicMimeFileException.php', - 'Laminas\\Validator\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-validator/src/Exception/RuntimeException.php', - 'Laminas\\Validator\\Explode' => $vendorDir . '/laminas/laminas-validator/src/Explode.php', - 'Laminas\\Validator\\File\\Count' => $vendorDir . '/laminas/laminas-validator/src/File/Count.php', - 'Laminas\\Validator\\File\\Crc32' => $vendorDir . '/laminas/laminas-validator/src/File/Crc32.php', - 'Laminas\\Validator\\File\\ExcludeExtension' => $vendorDir . '/laminas/laminas-validator/src/File/ExcludeExtension.php', - 'Laminas\\Validator\\File\\ExcludeMimeType' => $vendorDir . '/laminas/laminas-validator/src/File/ExcludeMimeType.php', - 'Laminas\\Validator\\File\\Exists' => $vendorDir . '/laminas/laminas-validator/src/File/Exists.php', - 'Laminas\\Validator\\File\\Extension' => $vendorDir . '/laminas/laminas-validator/src/File/Extension.php', - 'Laminas\\Validator\\File\\FileInformationTrait' => $vendorDir . '/laminas/laminas-validator/src/File/FileInformationTrait.php', - 'Laminas\\Validator\\File\\FilesSize' => $vendorDir . '/laminas/laminas-validator/src/File/FilesSize.php', - 'Laminas\\Validator\\File\\Hash' => $vendorDir . '/laminas/laminas-validator/src/File/Hash.php', - 'Laminas\\Validator\\File\\ImageSize' => $vendorDir . '/laminas/laminas-validator/src/File/ImageSize.php', - 'Laminas\\Validator\\File\\IsCompressed' => $vendorDir . '/laminas/laminas-validator/src/File/IsCompressed.php', - 'Laminas\\Validator\\File\\IsImage' => $vendorDir . '/laminas/laminas-validator/src/File/IsImage.php', - 'Laminas\\Validator\\File\\Md5' => $vendorDir . '/laminas/laminas-validator/src/File/Md5.php', - 'Laminas\\Validator\\File\\MimeType' => $vendorDir . '/laminas/laminas-validator/src/File/MimeType.php', - 'Laminas\\Validator\\File\\NotExists' => $vendorDir . '/laminas/laminas-validator/src/File/NotExists.php', - 'Laminas\\Validator\\File\\Sha1' => $vendorDir . '/laminas/laminas-validator/src/File/Sha1.php', - 'Laminas\\Validator\\File\\Size' => $vendorDir . '/laminas/laminas-validator/src/File/Size.php', - 'Laminas\\Validator\\File\\Upload' => $vendorDir . '/laminas/laminas-validator/src/File/Upload.php', - 'Laminas\\Validator\\File\\UploadFile' => $vendorDir . '/laminas/laminas-validator/src/File/UploadFile.php', - 'Laminas\\Validator\\File\\WordCount' => $vendorDir . '/laminas/laminas-validator/src/File/WordCount.php', - 'Laminas\\Validator\\GpsPoint' => $vendorDir . '/laminas/laminas-validator/src/GpsPoint.php', - 'Laminas\\Validator\\GreaterThan' => $vendorDir . '/laminas/laminas-validator/src/GreaterThan.php', - 'Laminas\\Validator\\Hex' => $vendorDir . '/laminas/laminas-validator/src/Hex.php', - 'Laminas\\Validator\\Hostname' => $vendorDir . '/laminas/laminas-validator/src/Hostname.php', - 'Laminas\\Validator\\Iban' => $vendorDir . '/laminas/laminas-validator/src/Iban.php', - 'Laminas\\Validator\\Identical' => $vendorDir . '/laminas/laminas-validator/src/Identical.php', - 'Laminas\\Validator\\InArray' => $vendorDir . '/laminas/laminas-validator/src/InArray.php', - 'Laminas\\Validator\\Ip' => $vendorDir . '/laminas/laminas-validator/src/Ip.php', - 'Laminas\\Validator\\IsCountable' => $vendorDir . '/laminas/laminas-validator/src/IsCountable.php', - 'Laminas\\Validator\\IsInstanceOf' => $vendorDir . '/laminas/laminas-validator/src/IsInstanceOf.php', - 'Laminas\\Validator\\Isbn' => $vendorDir . '/laminas/laminas-validator/src/Isbn.php', - 'Laminas\\Validator\\Isbn\\Isbn10' => $vendorDir . '/laminas/laminas-validator/src/Isbn/Isbn10.php', - 'Laminas\\Validator\\Isbn\\Isbn13' => $vendorDir . '/laminas/laminas-validator/src/Isbn/Isbn13.php', - 'Laminas\\Validator\\LessThan' => $vendorDir . '/laminas/laminas-validator/src/LessThan.php', - 'Laminas\\Validator\\Module' => $vendorDir . '/laminas/laminas-validator/src/Module.php', - 'Laminas\\Validator\\NotEmpty' => $vendorDir . '/laminas/laminas-validator/src/NotEmpty.php', - 'Laminas\\Validator\\Regex' => $vendorDir . '/laminas/laminas-validator/src/Regex.php', - 'Laminas\\Validator\\Sitemap\\Changefreq' => $vendorDir . '/laminas/laminas-validator/src/Sitemap/Changefreq.php', - 'Laminas\\Validator\\Sitemap\\Lastmod' => $vendorDir . '/laminas/laminas-validator/src/Sitemap/Lastmod.php', - 'Laminas\\Validator\\Sitemap\\Loc' => $vendorDir . '/laminas/laminas-validator/src/Sitemap/Loc.php', - 'Laminas\\Validator\\Sitemap\\Priority' => $vendorDir . '/laminas/laminas-validator/src/Sitemap/Priority.php', - 'Laminas\\Validator\\StaticValidator' => $vendorDir . '/laminas/laminas-validator/src/StaticValidator.php', - 'Laminas\\Validator\\Step' => $vendorDir . '/laminas/laminas-validator/src/Step.php', - 'Laminas\\Validator\\StringLength' => $vendorDir . '/laminas/laminas-validator/src/StringLength.php', - 'Laminas\\Validator\\Timezone' => $vendorDir . '/laminas/laminas-validator/src/Timezone.php', - 'Laminas\\Validator\\Translator\\TranslatorAwareInterface' => $vendorDir . '/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php', - 'Laminas\\Validator\\Translator\\TranslatorInterface' => $vendorDir . '/laminas/laminas-validator/src/Translator/TranslatorInterface.php', - 'Laminas\\Validator\\UndisclosedPassword' => $vendorDir . '/laminas/laminas-validator/src/UndisclosedPassword.php', - 'Laminas\\Validator\\Uri' => $vendorDir . '/laminas/laminas-validator/src/Uri.php', - 'Laminas\\Validator\\Uuid' => $vendorDir . '/laminas/laminas-validator/src/Uuid.php', - 'Laminas\\Validator\\ValidatorChain' => $vendorDir . '/laminas/laminas-validator/src/ValidatorChain.php', - 'Laminas\\Validator\\ValidatorInterface' => $vendorDir . '/laminas/laminas-validator/src/ValidatorInterface.php', - 'Laminas\\Validator\\ValidatorPluginManager' => $vendorDir . '/laminas/laminas-validator/src/ValidatorPluginManager.php', - 'Laminas\\Validator\\ValidatorPluginManagerAwareInterface' => $vendorDir . '/laminas/laminas-validator/src/ValidatorPluginManagerAwareInterface.php', - 'Laminas\\Validator\\ValidatorPluginManagerFactory' => $vendorDir . '/laminas/laminas-validator/src/ValidatorPluginManagerFactory.php', - 'Laminas\\Validator\\ValidatorProviderInterface' => $vendorDir . '/laminas/laminas-validator/src/ValidatorProviderInterface.php', - 'League\\OAuth2\\Client\\Exception\\HostedDomainException' => $vendorDir . '/league/oauth2-google/src/Exception/HostedDomainException.php', - 'League\\OAuth2\\Client\\Grant\\AbstractGrant' => $vendorDir . '/league/oauth2-client/src/Grant/AbstractGrant.php', - 'League\\OAuth2\\Client\\Grant\\AuthorizationCode' => $vendorDir . '/league/oauth2-client/src/Grant/AuthorizationCode.php', - 'League\\OAuth2\\Client\\Grant\\ClientCredentials' => $vendorDir . '/league/oauth2-client/src/Grant/ClientCredentials.php', - 'League\\OAuth2\\Client\\Grant\\Exception\\InvalidGrantException' => $vendorDir . '/league/oauth2-client/src/Grant/Exception/InvalidGrantException.php', - 'League\\OAuth2\\Client\\Grant\\GrantFactory' => $vendorDir . '/league/oauth2-client/src/Grant/GrantFactory.php', - 'League\\OAuth2\\Client\\Grant\\Password' => $vendorDir . '/league/oauth2-client/src/Grant/Password.php', - 'League\\OAuth2\\Client\\Grant\\RefreshToken' => $vendorDir . '/league/oauth2-client/src/Grant/RefreshToken.php', - 'League\\OAuth2\\Client\\OptionProvider\\HttpBasicAuthOptionProvider' => $vendorDir . '/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php', - 'League\\OAuth2\\Client\\OptionProvider\\OptionProviderInterface' => $vendorDir . '/league/oauth2-client/src/OptionProvider/OptionProviderInterface.php', - 'League\\OAuth2\\Client\\OptionProvider\\PostAuthOptionProvider' => $vendorDir . '/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php', - 'League\\OAuth2\\Client\\Provider\\AbstractProvider' => $vendorDir . '/league/oauth2-client/src/Provider/AbstractProvider.php', - 'League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException' => $vendorDir . '/league/oauth2-client/src/Provider/Exception/IdentityProviderException.php', - 'League\\OAuth2\\Client\\Provider\\GenericProvider' => $vendorDir . '/league/oauth2-client/src/Provider/GenericProvider.php', - 'League\\OAuth2\\Client\\Provider\\GenericResourceOwner' => $vendorDir . '/league/oauth2-client/src/Provider/GenericResourceOwner.php', - 'League\\OAuth2\\Client\\Provider\\Google' => $vendorDir . '/league/oauth2-google/src/Provider/Google.php', - 'League\\OAuth2\\Client\\Provider\\GoogleUser' => $vendorDir . '/league/oauth2-google/src/Provider/GoogleUser.php', - 'League\\OAuth2\\Client\\Provider\\ResourceOwnerInterface' => $vendorDir . '/league/oauth2-client/src/Provider/ResourceOwnerInterface.php', - 'League\\OAuth2\\Client\\Token\\AccessToken' => $vendorDir . '/league/oauth2-client/src/Token/AccessToken.php', - 'League\\OAuth2\\Client\\Token\\AccessTokenInterface' => $vendorDir . '/league/oauth2-client/src/Token/AccessTokenInterface.php', - 'League\\OAuth2\\Client\\Token\\ResourceOwnerAccessTokenInterface' => $vendorDir . '/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php', - 'League\\OAuth2\\Client\\Tool\\ArrayAccessorTrait' => $vendorDir . '/league/oauth2-client/src/Tool/ArrayAccessorTrait.php', - 'League\\OAuth2\\Client\\Tool\\BearerAuthorizationTrait' => $vendorDir . '/league/oauth2-client/src/Tool/BearerAuthorizationTrait.php', - 'League\\OAuth2\\Client\\Tool\\GuardedPropertyTrait' => $vendorDir . '/league/oauth2-client/src/Tool/GuardedPropertyTrait.php', - 'League\\OAuth2\\Client\\Tool\\MacAuthorizationTrait' => $vendorDir . '/league/oauth2-client/src/Tool/MacAuthorizationTrait.php', - 'League\\OAuth2\\Client\\Tool\\ProviderRedirectTrait' => $vendorDir . '/league/oauth2-client/src/Tool/ProviderRedirectTrait.php', - 'League\\OAuth2\\Client\\Tool\\QueryBuilderTrait' => $vendorDir . '/league/oauth2-client/src/Tool/QueryBuilderTrait.php', - 'League\\OAuth2\\Client\\Tool\\RequestFactory' => $vendorDir . '/league/oauth2-client/src/Tool/RequestFactory.php', - 'League\\OAuth2\\Client\\Tool\\RequiredParameterTrait' => $vendorDir . '/league/oauth2-client/src/Tool/RequiredParameterTrait.php', - 'ListExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'ListOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'Locale' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Locale.php', - 'LogAPI' => $baseDir . '/core/log.class.inc.php', - 'LogChannels' => $baseDir . '/core/log.class.inc.php', - 'LogFileNameBuilderFactory' => $baseDir . '/core/log.class.inc.php', - 'LogFileRotationProcess' => $baseDir . '/core/log.class.inc.php', - 'LoginBlockExtension' => $baseDir . '/application/logintwig.class.inc.php', - 'LoginTwigContext' => $baseDir . '/application/logintwig.class.inc.php', - 'LoginTwigRenderer' => $baseDir . '/application/logintwig.class.inc.php', - 'LoginWebPage' => $baseDir . '/application/loginwebpage.class.inc.php', - 'MatchExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'MatchOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'MenuBlock' => $baseDir . '/application/displayblock.class.inc.php', - 'MenuGroup' => $baseDir . '/application/menunode.class.inc.php', - 'MenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'MetaModel' => $baseDir . '/core/metamodel.class.php', - 'MissingColumnException' => $baseDir . '/core/attributedef.class.inc.php', - 'MissingQueryArgument' => $baseDir . '/core/oql/expression.class.inc.php', - 'ModelReflection' => $baseDir . '/core/modelreflection.class.inc.php', - 'ModelReflectionRuntime' => $baseDir . '/core/modelreflection.class.inc.php', - 'ModuleDesign' => $baseDir . '/core/moduledesign.class.inc.php', - 'ModuleHandlerAPI' => $baseDir . '/core/modulehandler.class.inc.php', - 'ModuleHandlerApiInterface' => $baseDir . '/core/modulehandler.class.inc.php', - 'MonthlyRotatingLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php', - 'MyHelpers' => $baseDir . '/core/MyHelpers.class.inc.php', - 'MySQLException' => $baseDir . '/application/exceptions/mysql/MySQLException.php', - 'MySQLHasGoneAwayException' => $baseDir . '/application/exceptions/mysql/MySQLHasGoneAwayException.php', - 'MySQLNoTransactionException' => $baseDir . '/application/exceptions/mysql/MySQLNoTransactionException.php', - 'MySQLQueryHasNoResultException' => $baseDir . '/application/exceptions/mysql/MySQLQueryHasNoResultException.php', - 'MySQLTransactionNotClosedException' => $baseDir . '/application/exceptions/mysql/MySQLTransactionNotClosedException.php', - 'NestedQueryExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'NestedQueryOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'NewObjectMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'NewsroomProviderBase' => $baseDir . '/application/newsroomprovider.class.inc.php', - 'NiceWebPage' => $baseDir . '/sources/Application/WebPage/NiceWebPage.php', - 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', - 'NotYetEvaluatedExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'NumberFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php', - 'OQLActualClassTreeResolver' => $baseDir . '/core/oqlactualclasstreeresolver.class.inc.php', - 'OQLClassNode' => $baseDir . '/core/oqlclassnode.class.inc.php', - 'OQLClassTreeBuilder' => $baseDir . '/core/oqlclasstreebuilder.class.inc.php', - 'OQLClassTreeOptimizer' => $baseDir . '/core/oqlclasstreeoptimizer.class.inc.php', - 'OQLException' => $baseDir . '/core/oql/oqlexception.class.inc.php', - 'OQLJoin' => $baseDir . '/core/oqlclassnode.class.inc.php', - 'OQLLexer' => $baseDir . '/core/oql/oql-lexer.php', - 'OQLLexerException' => $baseDir . '/core/oql/oql-lexer.php', - 'OQLLexerRaw' => $baseDir . '/core/oql/oql-lexer.php', - 'OQLMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'OQLParser' => $baseDir . '/core/oql/oql-parser.php', - 'OQLParserException' => $baseDir . '/core/oql/oql-parser.php', - 'OQLParserParseFailureException' => $baseDir . '/core/oql/oql-parser.php', - 'OQLParserRaw' => $baseDir . '/core/oql/oql-parser.php', - 'OQLParserStackOverFlowException' => $baseDir . '/core/oql/oql-parser.php', - 'OQLParserSyntaxErrorException' => $baseDir . '/core/oql/oql-parser.php', - 'OQLParser_yyStackEntry' => $baseDir . '/core/oql/oql-parser.php', - 'OQLParser_yyToken' => $baseDir . '/core/oql/oql-parser.php', - 'OS_Guess' => $vendorDir . '/pear/pear-core-minimal/src/OS/Guess.php', - 'ObjectDetailsTemplate' => $baseDir . '/application/template.class.inc.php', - 'ObjectResult' => $baseDir . '/core/restservices.class.inc.php', - 'ObjectStimulus' => $baseDir . '/core/stimulus.class.inc.php', - 'ObsolescenceDateUpdater' => $baseDir . '/core/background.inc.php', - 'OqlHexValue' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'OqlInterpreter' => $baseDir . '/core/oql/oqlinterpreter.class.inc.php', - 'OqlInterpreterException' => $baseDir . '/core/oql/oqlinterpreter.class.inc.php', - 'OqlJoinSpec' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'OqlName' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'OqlNormalizeException' => $baseDir . '/core/oql/oqlinterpreter.class.inc.php', - 'OqlObjectQuery' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'OqlQuery' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'OqlUnionQuery' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'PDF417' => $vendorDir . '/combodo/tcpdf/include/barcodes/pdf417.php', - 'PDFBulkExport' => $baseDir . '/core/pdfbulkexport.class.inc.php', - 'PDFPage' => $baseDir . '/sources/Application/WebPage/PDFPage.php', - 'PEAR' => $vendorDir . '/pear/pear-core-minimal/src/PEAR.php', - 'PEAR_ErrorStack' => $vendorDir . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php', - 'PEAR_Exception' => $vendorDir . '/pear/pear_exception/PEAR/Exception.php', - 'Page' => $baseDir . '/sources/Application/WebPage/Page.php', - 'Pelago\\Emogrifier\\Caching\\SimpleStringCache' => $vendorDir . '/pelago/emogrifier/src/Caching/SimpleStringCache.php', - 'Pelago\\Emogrifier\\CssInliner' => $vendorDir . '/pelago/emogrifier/src/CssInliner.php', - 'Pelago\\Emogrifier\\Css\\CssDocument' => $vendorDir . '/pelago/emogrifier/src/Css/CssDocument.php', - 'Pelago\\Emogrifier\\Css\\StyleRule' => $vendorDir . '/pelago/emogrifier/src/Css/StyleRule.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/AbstractHtmlProcessor.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\CssToAttributeConverter' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/CssToAttributeConverter.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\HtmlNormalizer' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/HtmlNormalizer.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\HtmlPruner' => $vendorDir . '/pelago/emogrifier/src/HtmlProcessor/HtmlPruner.php', - 'Pelago\\Emogrifier\\Utilities\\ArrayIntersector' => $vendorDir . '/pelago/emogrifier/src/Utilities/ArrayIntersector.php', - 'Pelago\\Emogrifier\\Utilities\\CssConcatenator' => $vendorDir . '/pelago/emogrifier/src/Utilities/CssConcatenator.php', - 'PhpParser\\Builder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder.php', - 'PhpParser\\BuilderFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', - 'PhpParser\\BuilderHelpers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', - 'PhpParser\\Builder\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', - 'PhpParser\\Builder\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', - 'PhpParser\\Builder\\Declaration' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', - 'PhpParser\\Builder\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', - 'PhpParser\\Builder\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', - 'PhpParser\\Builder\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', - 'PhpParser\\Builder\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', - 'PhpParser\\Builder\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', - 'PhpParser\\Builder\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', - 'PhpParser\\Builder\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', - 'PhpParser\\Builder\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', - 'PhpParser\\Builder\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', - 'PhpParser\\Builder\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', - 'PhpParser\\Builder\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', - 'PhpParser\\Builder\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', - 'PhpParser\\Builder\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', - 'PhpParser\\Comment' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment.php', - 'PhpParser\\Comment\\Doc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', - 'PhpParser\\ConstExprEvaluationException' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', - 'PhpParser\\ConstExprEvaluator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', - 'PhpParser\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Error.php', - 'PhpParser\\ErrorHandler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', - 'PhpParser\\ErrorHandler\\Collecting' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', - 'PhpParser\\ErrorHandler\\Throwing' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', - 'PhpParser\\Internal\\DiffElem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', - 'PhpParser\\Internal\\Differ' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', - 'PhpParser\\Internal\\PrintableNewAnonClassNode' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', - 'PhpParser\\Internal\\TokenStream' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', - 'PhpParser\\JsonDecoder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', - 'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', - 'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', - 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', - 'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php', - 'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php', - 'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', - 'PhpParser\\NodeDumper' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', - 'PhpParser\\NodeFinder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', - 'PhpParser\\NodeTraverser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', - 'PhpParser\\NodeTraverserInterface' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', - 'PhpParser\\NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', - 'PhpParser\\NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', - 'PhpParser\\NodeVisitor\\CloningVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', - 'PhpParser\\NodeVisitor\\FindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', - 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', - 'PhpParser\\NodeVisitor\\NameResolver' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', - 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', - 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', - 'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', - 'PhpParser\\Node\\Attribute' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', - 'PhpParser\\Node\\AttributeGroup' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', - 'PhpParser\\Node\\ComplexType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', - 'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', - 'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', - 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', - 'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', - 'PhpParser\\Node\\Expr\\ArrowFunction' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', - 'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', - 'PhpParser\\Node\\Expr\\AssignOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\AssignRef' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', - 'PhpParser\\Node\\Expr\\BinaryOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', - 'PhpParser\\Node\\Expr\\BitwiseNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', - 'PhpParser\\Node\\Expr\\BooleanNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', - 'PhpParser\\Node\\Expr\\CallLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', - 'PhpParser\\Node\\Expr\\Cast' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', - 'PhpParser\\Node\\Expr\\Cast\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', - 'PhpParser\\Node\\Expr\\Cast\\Bool_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', - 'PhpParser\\Node\\Expr\\Cast\\Double' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', - 'PhpParser\\Node\\Expr\\Cast\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', - 'PhpParser\\Node\\Expr\\Cast\\Object_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', - 'PhpParser\\Node\\Expr\\Cast\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', - 'PhpParser\\Node\\Expr\\Cast\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', - 'PhpParser\\Node\\Expr\\ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', - 'PhpParser\\Node\\Expr\\Clone_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', - 'PhpParser\\Node\\Expr\\Closure' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', - 'PhpParser\\Node\\Expr\\ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', - 'PhpParser\\Node\\Expr\\Empty_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', - 'PhpParser\\Node\\Expr\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', - 'PhpParser\\Node\\Expr\\ErrorSuppress' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', - 'PhpParser\\Node\\Expr\\Eval_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', - 'PhpParser\\Node\\Expr\\Exit_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', - 'PhpParser\\Node\\Expr\\FuncCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', - 'PhpParser\\Node\\Expr\\Include_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', - 'PhpParser\\Node\\Expr\\Instanceof_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', - 'PhpParser\\Node\\Expr\\Isset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', - 'PhpParser\\Node\\Expr\\List_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', - 'PhpParser\\Node\\Expr\\Match_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', - 'PhpParser\\Node\\Expr\\MethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', - 'PhpParser\\Node\\Expr\\New_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', - 'PhpParser\\Node\\Expr\\NullsafeMethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', - 'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', - 'PhpParser\\Node\\Expr\\PostDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', - 'PhpParser\\Node\\Expr\\PostInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', - 'PhpParser\\Node\\Expr\\PreDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', - 'PhpParser\\Node\\Expr\\PreInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', - 'PhpParser\\Node\\Expr\\Print_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', - 'PhpParser\\Node\\Expr\\PropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', - 'PhpParser\\Node\\Expr\\ShellExec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', - 'PhpParser\\Node\\Expr\\StaticCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', - 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', - 'PhpParser\\Node\\Expr\\Ternary' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', - 'PhpParser\\Node\\Expr\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', - 'PhpParser\\Node\\Expr\\UnaryMinus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', - 'PhpParser\\Node\\Expr\\UnaryPlus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', - 'PhpParser\\Node\\Expr\\Variable' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', - 'PhpParser\\Node\\Expr\\YieldFrom' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', - 'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', - 'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', - 'PhpParser\\Node\\Identifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', - 'PhpParser\\Node\\IntersectionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', - 'PhpParser\\Node\\MatchArm' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', - 'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', - 'PhpParser\\Node\\Name\\FullyQualified' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', - 'PhpParser\\Node\\Name\\Relative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', - 'PhpParser\\Node\\NullableType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', - 'PhpParser\\Node\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php', - 'PhpParser\\Node\\Scalar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\LNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', - 'PhpParser\\Node\\Scalar\\MagicConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\File' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', - 'PhpParser\\Node\\Scalar\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', - 'PhpParser\\Node\\Stmt' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', - 'PhpParser\\Node\\Stmt\\Break_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', - 'PhpParser\\Node\\Stmt\\Case_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', - 'PhpParser\\Node\\Stmt\\Catch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', - 'PhpParser\\Node\\Stmt\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', - 'PhpParser\\Node\\Stmt\\ClassLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', - 'PhpParser\\Node\\Stmt\\ClassMethod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', - 'PhpParser\\Node\\Stmt\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', - 'PhpParser\\Node\\Stmt\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', - 'PhpParser\\Node\\Stmt\\Continue_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', - 'PhpParser\\Node\\Stmt\\Declare_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', - 'PhpParser\\Node\\Stmt\\Do_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', - 'PhpParser\\Node\\Stmt\\Echo_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', - 'PhpParser\\Node\\Stmt\\ElseIf_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', - 'PhpParser\\Node\\Stmt\\Else_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', - 'PhpParser\\Node\\Stmt\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', - 'PhpParser\\Node\\Stmt\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', - 'PhpParser\\Node\\Stmt\\Expression' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', - 'PhpParser\\Node\\Stmt\\Finally_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', - 'PhpParser\\Node\\Stmt\\For_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', - 'PhpParser\\Node\\Stmt\\Foreach_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', - 'PhpParser\\Node\\Stmt\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', - 'PhpParser\\Node\\Stmt\\Global_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', - 'PhpParser\\Node\\Stmt\\Goto_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', - 'PhpParser\\Node\\Stmt\\GroupUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', - 'PhpParser\\Node\\Stmt\\HaltCompiler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', - 'PhpParser\\Node\\Stmt\\If_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', - 'PhpParser\\Node\\Stmt\\InlineHTML' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', - 'PhpParser\\Node\\Stmt\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', - 'PhpParser\\Node\\Stmt\\Label' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', - 'PhpParser\\Node\\Stmt\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', - 'PhpParser\\Node\\Stmt\\Nop' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', - 'PhpParser\\Node\\Stmt\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', - 'PhpParser\\Node\\Stmt\\Return_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', - 'PhpParser\\Node\\Stmt\\Static_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', - 'PhpParser\\Node\\Stmt\\Switch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', - 'PhpParser\\Node\\Stmt\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', - 'PhpParser\\Node\\Stmt\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', - 'PhpParser\\Node\\Stmt\\TryCatch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', - 'PhpParser\\Node\\Stmt\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', - 'PhpParser\\Node\\Stmt\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', - 'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', - 'PhpParser\\Node\\UnionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', - 'PhpParser\\Node\\VarLikeIdentifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', - 'PhpParser\\Node\\VariadicPlaceholder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', - 'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php', - 'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', - 'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Multiple' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', - 'PhpParser\\Parser\\Php5' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', - 'PhpParser\\Parser\\Php7' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Tokens' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', - 'PhpParser\\PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', - 'PhpParser\\PrettyPrinter\\Standard' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', - 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', - 'PluginInstanciationManager' => $baseDir . '/core/plugininstanciationmanager.class.inc.php', - 'PluginManager' => $baseDir . '/core/pluginmanager.class.inc.php', - 'PortalDispatcher' => $baseDir . '/application/portaldispatcher.class.inc.php', - 'PortalURLMaker' => $baseDir . '/application/applicationcontext.class.inc.php', - 'PrintableDataTable' => $baseDir . '/application/datatable.class.inc.php', - 'ProcessException' => $baseDir . '/application/exceptions/process/ProcessException.php', - 'ProcessFatalException' => $baseDir . '/application/exceptions/process/ProcessFatalException.php', - 'ProcessInvalidConfigException' => $baseDir . '/application/exceptions/process/ProcessInvalidConfigException.php', - 'Psr\\Cache\\CacheException' => $vendorDir . '/psr/cache/src/CacheException.php', - 'Psr\\Cache\\CacheItemInterface' => $vendorDir . '/psr/cache/src/CacheItemInterface.php', - 'Psr\\Cache\\CacheItemPoolInterface' => $vendorDir . '/psr/cache/src/CacheItemPoolInterface.php', - 'Psr\\Cache\\InvalidArgumentException' => $vendorDir . '/psr/cache/src/InvalidArgumentException.php', - 'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php', - 'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php', - 'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php', - 'Psr\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/psr/event-dispatcher/src/EventDispatcherInterface.php', - 'Psr\\EventDispatcher\\ListenerProviderInterface' => $vendorDir . '/psr/event-dispatcher/src/ListenerProviderInterface.php', - 'Psr\\EventDispatcher\\StoppableEventInterface' => $vendorDir . '/psr/event-dispatcher/src/StoppableEventInterface.php', - 'Psr\\Http\\Client\\ClientExceptionInterface' => $vendorDir . '/psr/http-client/src/ClientExceptionInterface.php', - 'Psr\\Http\\Client\\ClientInterface' => $vendorDir . '/psr/http-client/src/ClientInterface.php', - 'Psr\\Http\\Client\\NetworkExceptionInterface' => $vendorDir . '/psr/http-client/src/NetworkExceptionInterface.php', - 'Psr\\Http\\Client\\RequestExceptionInterface' => $vendorDir . '/psr/http-client/src/RequestExceptionInterface.php', - 'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php', - 'Psr\\Http\\Message\\RequestFactoryInterface' => $vendorDir . '/psr/http-factory/src/RequestFactoryInterface.php', - 'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php', - 'Psr\\Http\\Message\\ResponseFactoryInterface' => $vendorDir . '/psr/http-factory/src/ResponseFactoryInterface.php', - 'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php', - 'Psr\\Http\\Message\\ServerRequestFactoryInterface' => $vendorDir . '/psr/http-factory/src/ServerRequestFactoryInterface.php', - 'Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php', - 'Psr\\Http\\Message\\StreamFactoryInterface' => $vendorDir . '/psr/http-factory/src/StreamFactoryInterface.php', - 'Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php', - 'Psr\\Http\\Message\\UploadedFileFactoryInterface' => $vendorDir . '/psr/http-factory/src/UploadedFileFactoryInterface.php', - 'Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php', - 'Psr\\Http\\Message\\UriFactoryInterface' => $vendorDir . '/psr/http-factory/src/UriFactoryInterface.php', - 'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php', - 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php', - 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php', - 'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php', - 'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php', - 'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php', - 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', - 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', - 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', - 'QRcode' => $vendorDir . '/combodo/tcpdf/include/barcodes/qrcode.php', - 'Query' => $baseDir . '/application/query.class.inc.php', - 'QueryBuilderContext' => $baseDir . '/core/querybuildercontext.class.inc.php', - 'QueryBuilderExpressions' => $baseDir . '/core/querybuilderexpressions.class.inc.php', - 'QueryOQL' => $baseDir . '/application/query.class.inc.php', - 'QueryReflection' => $baseDir . '/core/modelreflection.class.inc.php', - 'QueryReflectionRuntime' => $baseDir . '/core/modelreflection.class.inc.php', - 'RelationEdge' => $baseDir . '/core/relationgraph.class.inc.php', - 'RelationGraph' => $baseDir . '/core/relationgraph.class.inc.php', - 'RelationObjectNode' => $baseDir . '/core/relationgraph.class.inc.php', - 'RelationRedundancyNode' => $baseDir . '/core/relationgraph.class.inc.php', - 'RelationTypeIterator' => $baseDir . '/core/simplegraph.class.inc.php', - 'RestDelete' => $baseDir . '/core/restservices.class.inc.php', - 'RestResult' => $baseDir . '/application/applicationextension.inc.php', - 'RestResultWithObjects' => $baseDir . '/core/restservices.class.inc.php', - 'RestResultWithRelations' => $baseDir . '/core/restservices.class.inc.php', - 'RestUtils' => $baseDir . '/application/applicationextension.inc.php', - 'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', - 'RotatingLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php', - 'RowStatus' => $baseDir . '/core/bulkchange.class.inc.php', - 'RowStatus_Disappeared' => $baseDir . '/core/bulkchange.class.inc.php', - 'RowStatus_Error' => $baseDir . '/core/bulkchange.class.inc.php', - 'RowStatus_Issue' => $baseDir . '/core/bulkchange.class.inc.php', - 'RowStatus_Modify' => $baseDir . '/core/bulkchange.class.inc.php', - 'RowStatus_NewObj' => $baseDir . '/core/bulkchange.class.inc.php', - 'RowStatus_NoChange' => $baseDir . '/core/bulkchange.class.inc.php', - 'RunTimeIconSelectionField' => $baseDir . '/application/forms.class.inc.php', - 'RuntimeDashboard' => $baseDir . '/application/dashboard.class.inc.php', - 'SQLExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'SQLObjectQuery' => $baseDir . '/core/sqlobjectquery.class.inc.php', - 'SQLObjectQueryBuilder' => $baseDir . '/core/sqlobjectquerybuilder.class.inc.php', - 'SQLQuery' => $baseDir . '/core/sqlquery.class.inc.php', - 'SQLUnionQuery' => $baseDir . '/core/sqlunionquery.class.inc.php', - 'SVGDOMSanitizer' => $baseDir . '/core/htmlsanitizer.class.inc.php', - 'Sabberworm\\CSS\\CSSList\\AtRuleBlockList' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php', - 'Sabberworm\\CSS\\CSSList\\CSSBlockList' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php', - 'Sabberworm\\CSS\\CSSList\\CSSList' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/CSSList.php', - 'Sabberworm\\CSS\\CSSList\\Document' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/Document.php', - 'Sabberworm\\CSS\\CSSList\\KeyFrame' => $vendorDir . '/sabberworm/php-css-parser/src/CSSList/KeyFrame.php', - 'Sabberworm\\CSS\\Comment\\Comment' => $vendorDir . '/sabberworm/php-css-parser/src/Comment/Comment.php', - 'Sabberworm\\CSS\\Comment\\Commentable' => $vendorDir . '/sabberworm/php-css-parser/src/Comment/Commentable.php', - 'Sabberworm\\CSS\\OutputFormat' => $vendorDir . '/sabberworm/php-css-parser/src/OutputFormat.php', - 'Sabberworm\\CSS\\OutputFormatter' => $vendorDir . '/sabberworm/php-css-parser/src/OutputFormatter.php', - 'Sabberworm\\CSS\\Parser' => $vendorDir . '/sabberworm/php-css-parser/src/Parser.php', - 'Sabberworm\\CSS\\Parsing\\OutputException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/OutputException.php', - 'Sabberworm\\CSS\\Parsing\\ParserState' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/ParserState.php', - 'Sabberworm\\CSS\\Parsing\\SourceException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/SourceException.php', - 'Sabberworm\\CSS\\Parsing\\UnexpectedEOFException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php', - 'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' => $vendorDir . '/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php', - 'Sabberworm\\CSS\\Property\\AtRule' => $vendorDir . '/sabberworm/php-css-parser/src/Property/AtRule.php', - 'Sabberworm\\CSS\\Property\\CSSNamespace' => $vendorDir . '/sabberworm/php-css-parser/src/Property/CSSNamespace.php', - 'Sabberworm\\CSS\\Property\\Charset' => $vendorDir . '/sabberworm/php-css-parser/src/Property/Charset.php', - 'Sabberworm\\CSS\\Property\\Import' => $vendorDir . '/sabberworm/php-css-parser/src/Property/Import.php', - 'Sabberworm\\CSS\\Property\\KeyframeSelector' => $vendorDir . '/sabberworm/php-css-parser/src/Property/KeyframeSelector.php', - 'Sabberworm\\CSS\\Property\\Selector' => $vendorDir . '/sabberworm/php-css-parser/src/Property/Selector.php', - 'Sabberworm\\CSS\\Renderable' => $vendorDir . '/sabberworm/php-css-parser/src/Renderable.php', - 'Sabberworm\\CSS\\RuleSet\\AtRuleSet' => $vendorDir . '/sabberworm/php-css-parser/src/RuleSet/AtRuleSet.php', - 'Sabberworm\\CSS\\RuleSet\\DeclarationBlock' => $vendorDir . '/sabberworm/php-css-parser/src/RuleSet/DeclarationBlock.php', - 'Sabberworm\\CSS\\RuleSet\\RuleSet' => $vendorDir . '/sabberworm/php-css-parser/src/RuleSet/RuleSet.php', - 'Sabberworm\\CSS\\Rule\\Rule' => $vendorDir . '/sabberworm/php-css-parser/src/Rule/Rule.php', - 'Sabberworm\\CSS\\Settings' => $vendorDir . '/sabberworm/php-css-parser/src/Settings.php', - 'Sabberworm\\CSS\\Value\\CSSFunction' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CSSFunction.php', - 'Sabberworm\\CSS\\Value\\CSSString' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CSSString.php', - 'Sabberworm\\CSS\\Value\\CalcFunction' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CalcFunction.php', - 'Sabberworm\\CSS\\Value\\CalcRuleValueList' => $vendorDir . '/sabberworm/php-css-parser/src/Value/CalcRuleValueList.php', - 'Sabberworm\\CSS\\Value\\Color' => $vendorDir . '/sabberworm/php-css-parser/src/Value/Color.php', - 'Sabberworm\\CSS\\Value\\LineName' => $vendorDir . '/sabberworm/php-css-parser/src/Value/LineName.php', - 'Sabberworm\\CSS\\Value\\PrimitiveValue' => $vendorDir . '/sabberworm/php-css-parser/src/Value/PrimitiveValue.php', - 'Sabberworm\\CSS\\Value\\RuleValueList' => $vendorDir . '/sabberworm/php-css-parser/src/Value/RuleValueList.php', - 'Sabberworm\\CSS\\Value\\Size' => $vendorDir . '/sabberworm/php-css-parser/src/Value/Size.php', - 'Sabberworm\\CSS\\Value\\URL' => $vendorDir . '/sabberworm/php-css-parser/src/Value/URL.php', - 'Sabberworm\\CSS\\Value\\Value' => $vendorDir . '/sabberworm/php-css-parser/src/Value/Value.php', - 'Sabberworm\\CSS\\Value\\ValueList' => $vendorDir . '/sabberworm/php-css-parser/src/Value/ValueList.php', - 'ScalarExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'ScalarOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'ScssPhp\\ScssPhp\\Base\\Range' => $vendorDir . '/scssphp/scssphp/src/Base/Range.php', - 'ScssPhp\\ScssPhp\\Block' => $vendorDir . '/scssphp/scssphp/src/Block.php', - 'ScssPhp\\ScssPhp\\Block\\AtRootBlock' => $vendorDir . '/scssphp/scssphp/src/Block/AtRootBlock.php', - 'ScssPhp\\ScssPhp\\Block\\CallableBlock' => $vendorDir . '/scssphp/scssphp/src/Block/CallableBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ContentBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ContentBlock.php', - 'ScssPhp\\ScssPhp\\Block\\DirectiveBlock' => $vendorDir . '/scssphp/scssphp/src/Block/DirectiveBlock.php', - 'ScssPhp\\ScssPhp\\Block\\EachBlock' => $vendorDir . '/scssphp/scssphp/src/Block/EachBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ElseBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ElseBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ElseifBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ElseifBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ForBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ForBlock.php', - 'ScssPhp\\ScssPhp\\Block\\IfBlock' => $vendorDir . '/scssphp/scssphp/src/Block/IfBlock.php', - 'ScssPhp\\ScssPhp\\Block\\MediaBlock' => $vendorDir . '/scssphp/scssphp/src/Block/MediaBlock.php', - 'ScssPhp\\ScssPhp\\Block\\NestedPropertyBlock' => $vendorDir . '/scssphp/scssphp/src/Block/NestedPropertyBlock.php', - 'ScssPhp\\ScssPhp\\Block\\WhileBlock' => $vendorDir . '/scssphp/scssphp/src/Block/WhileBlock.php', - 'ScssPhp\\ScssPhp\\Cache' => $vendorDir . '/scssphp/scssphp/src/Cache.php', - 'ScssPhp\\ScssPhp\\Colors' => $vendorDir . '/scssphp/scssphp/src/Colors.php', - 'ScssPhp\\ScssPhp\\CompilationResult' => $vendorDir . '/scssphp/scssphp/src/CompilationResult.php', - 'ScssPhp\\ScssPhp\\Compiler' => $vendorDir . '/scssphp/scssphp/src/Compiler.php', - 'ScssPhp\\ScssPhp\\Compiler\\CachedResult' => $vendorDir . '/scssphp/scssphp/src/Compiler/CachedResult.php', - 'ScssPhp\\ScssPhp\\Compiler\\Environment' => $vendorDir . '/scssphp/scssphp/src/Compiler/Environment.php', - 'ScssPhp\\ScssPhp\\Exception\\CompilerException' => $vendorDir . '/scssphp/scssphp/src/Exception/CompilerException.php', - 'ScssPhp\\ScssPhp\\Exception\\ParserException' => $vendorDir . '/scssphp/scssphp/src/Exception/ParserException.php', - 'ScssPhp\\ScssPhp\\Exception\\RangeException' => $vendorDir . '/scssphp/scssphp/src/Exception/RangeException.php', - 'ScssPhp\\ScssPhp\\Exception\\SassException' => $vendorDir . '/scssphp/scssphp/src/Exception/SassException.php', - 'ScssPhp\\ScssPhp\\Exception\\SassScriptException' => $vendorDir . '/scssphp/scssphp/src/Exception/SassScriptException.php', - 'ScssPhp\\ScssPhp\\Exception\\ServerException' => $vendorDir . '/scssphp/scssphp/src/Exception/ServerException.php', - 'ScssPhp\\ScssPhp\\Formatter' => $vendorDir . '/scssphp/scssphp/src/Formatter.php', - 'ScssPhp\\ScssPhp\\Formatter\\Compact' => $vendorDir . '/scssphp/scssphp/src/Formatter/Compact.php', - 'ScssPhp\\ScssPhp\\Formatter\\Compressed' => $vendorDir . '/scssphp/scssphp/src/Formatter/Compressed.php', - 'ScssPhp\\ScssPhp\\Formatter\\Crunched' => $vendorDir . '/scssphp/scssphp/src/Formatter/Crunched.php', - 'ScssPhp\\ScssPhp\\Formatter\\Debug' => $vendorDir . '/scssphp/scssphp/src/Formatter/Debug.php', - 'ScssPhp\\ScssPhp\\Formatter\\Expanded' => $vendorDir . '/scssphp/scssphp/src/Formatter/Expanded.php', - 'ScssPhp\\ScssPhp\\Formatter\\Nested' => $vendorDir . '/scssphp/scssphp/src/Formatter/Nested.php', - 'ScssPhp\\ScssPhp\\Formatter\\OutputBlock' => $vendorDir . '/scssphp/scssphp/src/Formatter/OutputBlock.php', - 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' => $vendorDir . '/scssphp/scssphp/src/Logger/LoggerInterface.php', - 'ScssPhp\\ScssPhp\\Logger\\QuietLogger' => $vendorDir . '/scssphp/scssphp/src/Logger/QuietLogger.php', - 'ScssPhp\\ScssPhp\\Logger\\StreamLogger' => $vendorDir . '/scssphp/scssphp/src/Logger/StreamLogger.php', - 'ScssPhp\\ScssPhp\\Node' => $vendorDir . '/scssphp/scssphp/src/Node.php', - 'ScssPhp\\ScssPhp\\Node\\Number' => $vendorDir . '/scssphp/scssphp/src/Node/Number.php', - 'ScssPhp\\ScssPhp\\OutputStyle' => $vendorDir . '/scssphp/scssphp/src/OutputStyle.php', - 'ScssPhp\\ScssPhp\\Parser' => $vendorDir . '/scssphp/scssphp/src/Parser.php', - 'ScssPhp\\ScssPhp\\SourceMap\\Base64' => $vendorDir . '/scssphp/scssphp/src/SourceMap/Base64.php', - 'ScssPhp\\ScssPhp\\SourceMap\\Base64VLQ' => $vendorDir . '/scssphp/scssphp/src/SourceMap/Base64VLQ.php', - 'ScssPhp\\ScssPhp\\SourceMap\\SourceMapGenerator' => $vendorDir . '/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php', - 'ScssPhp\\ScssPhp\\Type' => $vendorDir . '/scssphp/scssphp/src/Type.php', - 'ScssPhp\\ScssPhp\\Util' => $vendorDir . '/scssphp/scssphp/src/Util.php', - 'ScssPhp\\ScssPhp\\Util\\Path' => $vendorDir . '/scssphp/scssphp/src/Util/Path.php', - 'ScssPhp\\ScssPhp\\ValueConverter' => $vendorDir . '/scssphp/scssphp/src/ValueConverter.php', - 'ScssPhp\\ScssPhp\\Version' => $vendorDir . '/scssphp/scssphp/src/Version.php', - 'ScssPhp\\ScssPhp\\Warn' => $vendorDir . '/scssphp/scssphp/src/Warn.php', - 'SearchMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'SecurityException' => $baseDir . '/application/exceptions/SecurityException.php', - 'SeparatorPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php', - 'SetupLog' => $baseDir . '/core/log.class.inc.php', - 'Shortcut' => $baseDir . '/application/shortcut.class.inc.php', - 'ShortcutContainerMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'ShortcutMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'ShortcutOQL' => $baseDir . '/application/shortcut.class.inc.php', - 'SimpleCrypt' => $baseDir . '/core/simplecrypt.class.inc.php', - 'SimpleCryptMcryptEngine' => $baseDir . '/core/simplecrypt.class.inc.php', - 'SimpleCryptOpenSSLEngine' => $baseDir . '/core/simplecrypt.class.inc.php', - 'SimpleCryptOpenSSLMcryptCompatibilityEngine' => $baseDir . '/core/simplecrypt.class.inc.php', - 'SimpleCryptSimpleEngine' => $baseDir . '/core/simplecrypt.class.inc.php', - 'SimpleCryptSodiumEngine' => $baseDir . '/core/simplecrypt.class.inc.php', - 'SimpleGraph' => $baseDir . '/core/simplegraph.class.inc.php', - 'SimpleGraphException' => $baseDir . '/core/simplegraph.class.inc.php', - 'SpreadsheetBulkExport' => $baseDir . '/core/spreadsheetbulkexport.class.inc.php', - 'StimulusChecker' => $baseDir . '/core/userrights.class.inc.php', - 'StimulusInternal' => $baseDir . '/core/stimulus.class.inc.php', - 'StimulusUserAction' => $baseDir . '/core/stimulus.class.inc.php', - 'Str' => $baseDir . '/core/MyHelpers.class.inc.php', - 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', - 'SummaryCardService' => $baseDir . '/sources/Service/SummaryCard/SummaryCardService.php', - 'Symfony\\Bridge\\Twig\\AppVariable' => $vendorDir . '/symfony/twig-bridge/AppVariable.php', - 'Symfony\\Bridge\\Twig\\Command\\DebugCommand' => $vendorDir . '/symfony/twig-bridge/Command/DebugCommand.php', - 'Symfony\\Bridge\\Twig\\Command\\LintCommand' => $vendorDir . '/symfony/twig-bridge/Command/LintCommand.php', - 'Symfony\\Bridge\\Twig\\DataCollector\\TwigDataCollector' => $vendorDir . '/symfony/twig-bridge/DataCollector/TwigDataCollector.php', - 'Symfony\\Bridge\\Twig\\ErrorRenderer\\TwigErrorRenderer' => $vendorDir . '/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php', - 'Symfony\\Bridge\\Twig\\Extension\\AssetExtension' => $vendorDir . '/symfony/twig-bridge/Extension/AssetExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CodeExtension' => $vendorDir . '/symfony/twig-bridge/Extension/CodeExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfExtension' => $vendorDir . '/symfony/twig-bridge/Extension/CsrfExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfRuntime' => $vendorDir . '/symfony/twig-bridge/Extension/CsrfRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\DumpExtension' => $vendorDir . '/symfony/twig-bridge/Extension/DumpExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ExpressionExtension' => $vendorDir . '/symfony/twig-bridge/Extension/ExpressionExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\FormExtension' => $vendorDir . '/symfony/twig-bridge/Extension/FormExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpFoundationExtension' => $vendorDir . '/symfony/twig-bridge/Extension/HttpFoundationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelExtension' => $vendorDir . '/symfony/twig-bridge/Extension/HttpKernelExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelRuntime' => $vendorDir . '/symfony/twig-bridge/Extension/HttpKernelRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\LogoutUrlExtension' => $vendorDir . '/symfony/twig-bridge/Extension/LogoutUrlExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension' => $vendorDir . '/symfony/twig-bridge/Extension/ProfilerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\RoutingExtension' => $vendorDir . '/symfony/twig-bridge/Extension/RoutingExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SecurityExtension' => $vendorDir . '/symfony/twig-bridge/Extension/SecurityExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerExtension' => $vendorDir . '/symfony/twig-bridge/Extension/SerializerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerRuntime' => $vendorDir . '/symfony/twig-bridge/Extension/SerializerRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\StopwatchExtension' => $vendorDir . '/symfony/twig-bridge/Extension/StopwatchExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\TranslationExtension' => $vendorDir . '/symfony/twig-bridge/Extension/TranslationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WebLinkExtension' => $vendorDir . '/symfony/twig-bridge/Extension/WebLinkExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WorkflowExtension' => $vendorDir . '/symfony/twig-bridge/Extension/WorkflowExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\YamlExtension' => $vendorDir . '/symfony/twig-bridge/Extension/YamlExtension.php', - 'Symfony\\Bridge\\Twig\\Form\\TwigRendererEngine' => $vendorDir . '/symfony/twig-bridge/Form/TwigRendererEngine.php', - 'Symfony\\Bridge\\Twig\\Mime\\BodyRenderer' => $vendorDir . '/symfony/twig-bridge/Mime/BodyRenderer.php', - 'Symfony\\Bridge\\Twig\\Mime\\NotificationEmail' => $vendorDir . '/symfony/twig-bridge/Mime/NotificationEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail' => $vendorDir . '/symfony/twig-bridge/Mime/TemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\WrappedTemplatedEmail' => $vendorDir . '/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\Scope' => $vendorDir . '/symfony/twig-bridge/NodeVisitor/Scope.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationDefaultDomainNodeVisitor' => $vendorDir . '/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationNodeVisitor' => $vendorDir . '/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\Node\\DumpNode' => $vendorDir . '/symfony/twig-bridge/Node/DumpNode.php', - 'Symfony\\Bridge\\Twig\\Node\\FormThemeNode' => $vendorDir . '/symfony/twig-bridge/Node/FormThemeNode.php', - 'Symfony\\Bridge\\Twig\\Node\\RenderBlockNode' => $vendorDir . '/symfony/twig-bridge/Node/RenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\SearchAndRenderBlockNode' => $vendorDir . '/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\StopwatchNode' => $vendorDir . '/symfony/twig-bridge/Node/StopwatchNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransDefaultDomainNode' => $vendorDir . '/symfony/twig-bridge/Node/TransDefaultDomainNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransNode' => $vendorDir . '/symfony/twig-bridge/Node/TransNode.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\DumpTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/DumpTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\FormThemeTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\StopwatchTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransDefaultDomainTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/TransTokenParser.php', - 'Symfony\\Bridge\\Twig\\Translation\\TwigExtractor' => $vendorDir . '/symfony/twig-bridge/Translation/TwigExtractor.php', - 'Symfony\\Bridge\\Twig\\UndefinedCallableHandler' => $vendorDir . '/symfony/twig-bridge/UndefinedCallableHandler.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AbstractPhpFileCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AnnotationsCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\CachePoolClearerCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ConfigBuilderCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\SerializerCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TranslationsCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ValidatorCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AboutCommand' => $vendorDir . '/symfony/framework-bundle/Command/AboutCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AbstractConfigCommand' => $vendorDir . '/symfony/framework-bundle/Command/AbstractConfigCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AssetsInstallCommand' => $vendorDir . '/symfony/framework-bundle/Command/AssetsInstallCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\BuildDebugContainerTrait' => $vendorDir . '/symfony/framework-bundle/Command/BuildDebugContainerTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand' => $vendorDir . '/symfony/framework-bundle/Command/CacheClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolClearCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolDeleteCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolDeleteCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolListCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolPruneCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolPruneCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheWarmupCommand' => $vendorDir . '/symfony/framework-bundle/Command/CacheWarmupCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/ConfigDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDumpReferenceCommand' => $vendorDir . '/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/ContainerDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerLintCommand' => $vendorDir . '/symfony/framework-bundle/Command/ContainerLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\DebugAutowiringCommand' => $vendorDir . '/symfony/framework-bundle/Command/DebugAutowiringCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\EventDispatcherDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/RouterDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterMatchCommand' => $vendorDir . '/symfony/framework-bundle/Command/RouterMatchCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsDecryptToLocalCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsEncryptFromLocalCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsGenerateKeysCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsListCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRemoveCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsRemoveCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsSetCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsSetCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/TranslationDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationUpdateCommand' => $vendorDir . '/symfony/framework-bundle/Command/TranslationUpdateCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\WorkflowDumpCommand' => $vendorDir . '/symfony/framework-bundle/Command/WorkflowDumpCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\XliffLintCommand' => $vendorDir . '/symfony/framework-bundle/Command/XliffLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\YamlLintCommand' => $vendorDir . '/symfony/framework-bundle/Command/YamlLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Application' => $vendorDir . '/symfony/framework-bundle/Console/Application.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/Descriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/framework-bundle/Console/Helper/DescriptorHelper.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController' => $vendorDir . '/symfony/framework-bundle/Controller/AbstractController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver' => $vendorDir . '/symfony/framework-bundle/Controller/ControllerResolver.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController' => $vendorDir . '/symfony/framework-bundle/Controller/RedirectController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController' => $vendorDir . '/symfony/framework-bundle/Controller/TemplateController.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\AbstractDataCollector' => $vendorDir . '/symfony/framework-bundle/DataCollector/AbstractDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector' => $vendorDir . '/symfony/framework-bundle/DataCollector/RouterDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\TemplateAwareDataCollectorInterface' => $vendorDir . '/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddAnnotationsCachedReaderPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddDebugLogProcessorPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddExpressionLanguageProvidersPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AssetsContextPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ContainerBuilderDebugDumpPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\DataCollectorTranslatorPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\LoggingTranslatorPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ProfilerPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\RemoveUnusedSessionMarshallingHandlerPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\SessionPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerRealRefPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerWeakRefPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\UnusedTagsPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\WorkflowGuardListenerPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Configuration' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\FrameworkExtension' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php', - 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SuggestMissingPackageSubscriber' => $vendorDir . '/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php', - 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' => $vendorDir . '/symfony/framework-bundle/FrameworkBundle.php', - 'Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache' => $vendorDir . '/symfony/framework-bundle/HttpCache/HttpCache.php', - 'Symfony\\Bundle\\FrameworkBundle\\KernelBrowser' => $vendorDir . '/symfony/framework-bundle/KernelBrowser.php', - 'Symfony\\Bundle\\FrameworkBundle\\Kernel\\MicroKernelTrait' => $vendorDir . '/symfony/framework-bundle/Kernel/MicroKernelTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\AnnotatedRouteControllerLoader' => $vendorDir . '/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader' => $vendorDir . '/symfony/framework-bundle/Routing/DelegatingLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableCompiledUrlMatcher' => $vendorDir . '/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RouteLoaderInterface' => $vendorDir . '/symfony/framework-bundle/Routing/RouteLoaderInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\Router' => $vendorDir . '/symfony/framework-bundle/Routing/Router.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\AbstractVault' => $vendorDir . '/symfony/framework-bundle/Secrets/AbstractVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\DotenvVault' => $vendorDir . '/symfony/framework-bundle/Secrets/DotenvVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\SodiumVault' => $vendorDir . '/symfony/framework-bundle/Secrets/SodiumVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\DeprecatedSessionFactory' => $vendorDir . '/symfony/framework-bundle/Session/DeprecatedSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\ServiceSessionFactory' => $vendorDir . '/symfony/framework-bundle/Session/ServiceSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator' => $vendorDir . '/symfony/framework-bundle/Translation/Translator.php', - 'Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer' => $vendorDir . '/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php', - 'Symfony\\Bundle\\TwigBundle\\Command\\LintCommand' => $vendorDir . '/symfony/twig-bundle/Command/LintCommand.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\ExtensionPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\RuntimeLoaderPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigEnvironmentPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigLoaderPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configuration' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configurator\\EnvironmentConfigurator' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\TwigExtension' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/TwigExtension.php', - 'Symfony\\Bundle\\TwigBundle\\TemplateIterator' => $vendorDir . '/symfony/twig-bundle/TemplateIterator.php', - 'Symfony\\Bundle\\TwigBundle\\TwigBundle' => $vendorDir . '/symfony/twig-bundle/TwigBundle.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ExceptionPanelController' => $vendorDir . '/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController' => $vendorDir . '/symfony/web-profiler-bundle/Controller/ProfilerController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\RouterController' => $vendorDir . '/symfony/web-profiler-bundle/Controller/RouterController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\ContentSecurityPolicyHandler' => $vendorDir . '/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\NonceGenerator' => $vendorDir . '/symfony/web-profiler-bundle/Csp/NonceGenerator.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\Configuration' => $vendorDir . '/symfony/web-profiler-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\WebProfilerExtension' => $vendorDir . '/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\EventListener\\WebDebugToolbarListener' => $vendorDir . '/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Profiler\\TemplateManager' => $vendorDir . '/symfony/web-profiler-bundle/Profiler/TemplateManager.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension' => $vendorDir . '/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\WebProfilerBundle' => $vendorDir . '/symfony/web-profiler-bundle/WebProfilerBundle.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractAdapter' => $vendorDir . '/symfony/cache/Adapter/AbstractAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/AbstractTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AdapterInterface' => $vendorDir . '/symfony/cache/Adapter/AdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\ApcuAdapter' => $vendorDir . '/symfony/cache/Adapter/ApcuAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ArrayAdapter' => $vendorDir . '/symfony/cache/Adapter/ArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ChainAdapter' => $vendorDir . '/symfony/cache/Adapter/ChainAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseBucketAdapter' => $vendorDir . '/symfony/cache/Adapter/CouchbaseBucketAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseCollectionAdapter' => $vendorDir . '/symfony/cache/Adapter/CouchbaseCollectionAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineAdapter' => $vendorDir . '/symfony/cache/Adapter/DoctrineAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineDbalAdapter' => $vendorDir . '/symfony/cache/Adapter/DoctrineDbalAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter' => $vendorDir . '/symfony/cache/Adapter/FilesystemAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/FilesystemTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\MemcachedAdapter' => $vendorDir . '/symfony/cache/Adapter/MemcachedAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\NullAdapter' => $vendorDir . '/symfony/cache/Adapter/NullAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ParameterNormalizer' => $vendorDir . '/symfony/cache/Adapter/ParameterNormalizer.php', - 'Symfony\\Component\\Cache\\Adapter\\PdoAdapter' => $vendorDir . '/symfony/cache/Adapter/PdoAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter' => $vendorDir . '/symfony/cache/Adapter/PhpArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpFilesAdapter' => $vendorDir . '/symfony/cache/Adapter/PhpFilesAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ProxyAdapter' => $vendorDir . '/symfony/cache/Adapter/ProxyAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\Psr16Adapter' => $vendorDir . '/symfony/cache/Adapter/Psr16Adapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisAdapter' => $vendorDir . '/symfony/cache/Adapter/RedisAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/RedisTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/TagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapterInterface' => $vendorDir . '/symfony/cache/Adapter/TagAwareAdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableAdapter' => $vendorDir . '/symfony/cache/Adapter/TraceableAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/TraceableTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\CacheItem' => $vendorDir . '/symfony/cache/CacheItem.php', - 'Symfony\\Component\\Cache\\DataCollector\\CacheDataCollector' => $vendorDir . '/symfony/cache/DataCollector/CacheDataCollector.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CacheCollectorPass' => $vendorDir . '/symfony/cache/DependencyInjection/CacheCollectorPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolClearerPass' => $vendorDir . '/symfony/cache/DependencyInjection/CachePoolClearerPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPass' => $vendorDir . '/symfony/cache/DependencyInjection/CachePoolPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPrunerPass' => $vendorDir . '/symfony/cache/DependencyInjection/CachePoolPrunerPass.php', - 'Symfony\\Component\\Cache\\DoctrineProvider' => $vendorDir . '/symfony/cache/DoctrineProvider.php', - 'Symfony\\Component\\Cache\\Exception\\CacheException' => $vendorDir . '/symfony/cache/Exception/CacheException.php', - 'Symfony\\Component\\Cache\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/cache/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Cache\\Exception\\LogicException' => $vendorDir . '/symfony/cache/Exception/LogicException.php', - 'Symfony\\Component\\Cache\\LockRegistry' => $vendorDir . '/symfony/cache/LockRegistry.php', - 'Symfony\\Component\\Cache\\Marshaller\\DefaultMarshaller' => $vendorDir . '/symfony/cache/Marshaller/DefaultMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\DeflateMarshaller' => $vendorDir . '/symfony/cache/Marshaller/DeflateMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\MarshallerInterface' => $vendorDir . '/symfony/cache/Marshaller/MarshallerInterface.php', - 'Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller' => $vendorDir . '/symfony/cache/Marshaller/SodiumMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\TagAwareMarshaller' => $vendorDir . '/symfony/cache/Marshaller/TagAwareMarshaller.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationDispatcher' => $vendorDir . '/symfony/cache/Messenger/EarlyExpirationDispatcher.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationHandler' => $vendorDir . '/symfony/cache/Messenger/EarlyExpirationHandler.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationMessage' => $vendorDir . '/symfony/cache/Messenger/EarlyExpirationMessage.php', - 'Symfony\\Component\\Cache\\PruneableInterface' => $vendorDir . '/symfony/cache/PruneableInterface.php', - 'Symfony\\Component\\Cache\\Psr16Cache' => $vendorDir . '/symfony/cache/Psr16Cache.php', - 'Symfony\\Component\\Cache\\ResettableInterface' => $vendorDir . '/symfony/cache/ResettableInterface.php', - 'Symfony\\Component\\Cache\\Traits\\AbstractAdapterTrait' => $vendorDir . '/symfony/cache/Traits/AbstractAdapterTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ContractsTrait' => $vendorDir . '/symfony/cache/Traits/ContractsTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemCommonTrait' => $vendorDir . '/symfony/cache/Traits/FilesystemCommonTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemTrait' => $vendorDir . '/symfony/cache/Traits/FilesystemTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ProxyTrait' => $vendorDir . '/symfony/cache/Traits/ProxyTrait.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterNodeProxy' => $vendorDir . '/symfony/cache/Traits/RedisClusterNodeProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterProxy' => $vendorDir . '/symfony/cache/Traits/RedisClusterProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisProxy' => $vendorDir . '/symfony/cache/Traits/RedisProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisTrait' => $vendorDir . '/symfony/cache/Traits/RedisTrait.php', - 'Symfony\\Component\\Config\\Builder\\ClassBuilder' => $vendorDir . '/symfony/config/Builder/ClassBuilder.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGenerator' => $vendorDir . '/symfony/config/Builder/ConfigBuilderGenerator.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGeneratorInterface' => $vendorDir . '/symfony/config/Builder/ConfigBuilderGeneratorInterface.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderInterface' => $vendorDir . '/symfony/config/Builder/ConfigBuilderInterface.php', - 'Symfony\\Component\\Config\\Builder\\Method' => $vendorDir . '/symfony/config/Builder/Method.php', - 'Symfony\\Component\\Config\\Builder\\Property' => $vendorDir . '/symfony/config/Builder/Property.php', - 'Symfony\\Component\\Config\\ConfigCache' => $vendorDir . '/symfony/config/ConfigCache.php', - 'Symfony\\Component\\Config\\ConfigCacheFactory' => $vendorDir . '/symfony/config/ConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ConfigCacheFactoryInterface' => $vendorDir . '/symfony/config/ConfigCacheFactoryInterface.php', - 'Symfony\\Component\\Config\\ConfigCacheInterface' => $vendorDir . '/symfony/config/ConfigCacheInterface.php', - 'Symfony\\Component\\Config\\Definition\\ArrayNode' => $vendorDir . '/symfony/config/Definition/ArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\BaseNode' => $vendorDir . '/symfony/config/Definition/BaseNode.php', - 'Symfony\\Component\\Config\\Definition\\BooleanNode' => $vendorDir . '/symfony/config/Definition/BooleanNode.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/ArrayNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BooleanNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/BooleanNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BuilderAwareInterface' => $vendorDir . '/symfony/config/Definition/Builder/BuilderAwareInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\EnumNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/EnumNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ExprBuilder' => $vendorDir . '/symfony/config/Definition/Builder/ExprBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\FloatNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/FloatNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\IntegerNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/IntegerNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\MergeBuilder' => $vendorDir . '/symfony/config/Definition/Builder/MergeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeBuilder' => $vendorDir . '/symfony/config/Definition/Builder/NodeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/NodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface' => $vendorDir . '/symfony/config/Definition/Builder/NodeParentInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NormalizationBuilder' => $vendorDir . '/symfony/config/Definition/Builder/NormalizationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NumericNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/NumericNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ParentNodeDefinitionInterface' => $vendorDir . '/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ScalarNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/ScalarNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder' => $vendorDir . '/symfony/config/Definition/Builder/TreeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ValidationBuilder' => $vendorDir . '/symfony/config/Definition/Builder/ValidationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\VariableNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/VariableNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\ConfigurationInterface' => $vendorDir . '/symfony/config/Definition/ConfigurationInterface.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\XmlReferenceDumper' => $vendorDir . '/symfony/config/Definition/Dumper/XmlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\YamlReferenceDumper' => $vendorDir . '/symfony/config/Definition/Dumper/YamlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\EnumNode' => $vendorDir . '/symfony/config/Definition/EnumNode.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\DuplicateKeyException' => $vendorDir . '/symfony/config/Definition/Exception/DuplicateKeyException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\Exception' => $vendorDir . '/symfony/config/Definition/Exception/Exception.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\ForbiddenOverwriteException' => $vendorDir . '/symfony/config/Definition/Exception/ForbiddenOverwriteException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException' => $vendorDir . '/symfony/config/Definition/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidDefinitionException' => $vendorDir . '/symfony/config/Definition/Exception/InvalidDefinitionException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException' => $vendorDir . '/symfony/config/Definition/Exception/InvalidTypeException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\UnsetKeyException' => $vendorDir . '/symfony/config/Definition/Exception/UnsetKeyException.php', - 'Symfony\\Component\\Config\\Definition\\FloatNode' => $vendorDir . '/symfony/config/Definition/FloatNode.php', - 'Symfony\\Component\\Config\\Definition\\IntegerNode' => $vendorDir . '/symfony/config/Definition/IntegerNode.php', - 'Symfony\\Component\\Config\\Definition\\NodeInterface' => $vendorDir . '/symfony/config/Definition/NodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\NumericNode' => $vendorDir . '/symfony/config/Definition/NumericNode.php', - 'Symfony\\Component\\Config\\Definition\\Processor' => $vendorDir . '/symfony/config/Definition/Processor.php', - 'Symfony\\Component\\Config\\Definition\\PrototypeNodeInterface' => $vendorDir . '/symfony/config/Definition/PrototypeNodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\PrototypedArrayNode' => $vendorDir . '/symfony/config/Definition/PrototypedArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\ScalarNode' => $vendorDir . '/symfony/config/Definition/ScalarNode.php', - 'Symfony\\Component\\Config\\Definition\\VariableNode' => $vendorDir . '/symfony/config/Definition/VariableNode.php', - 'Symfony\\Component\\Config\\Exception\\FileLoaderImportCircularReferenceException' => $vendorDir . '/symfony/config/Exception/FileLoaderImportCircularReferenceException.php', - 'Symfony\\Component\\Config\\Exception\\FileLocatorFileNotFoundException' => $vendorDir . '/symfony/config/Exception/FileLocatorFileNotFoundException.php', - 'Symfony\\Component\\Config\\Exception\\LoaderLoadException' => $vendorDir . '/symfony/config/Exception/LoaderLoadException.php', - 'Symfony\\Component\\Config\\FileLocator' => $vendorDir . '/symfony/config/FileLocator.php', - 'Symfony\\Component\\Config\\FileLocatorInterface' => $vendorDir . '/symfony/config/FileLocatorInterface.php', - 'Symfony\\Component\\Config\\Loader\\DelegatingLoader' => $vendorDir . '/symfony/config/Loader/DelegatingLoader.php', - 'Symfony\\Component\\Config\\Loader\\FileLoader' => $vendorDir . '/symfony/config/Loader/FileLoader.php', - 'Symfony\\Component\\Config\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/config/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Config\\Loader\\Loader' => $vendorDir . '/symfony/config/Loader/Loader.php', - 'Symfony\\Component\\Config\\Loader\\LoaderInterface' => $vendorDir . '/symfony/config/Loader/LoaderInterface.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolver' => $vendorDir . '/symfony/config/Loader/LoaderResolver.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolverInterface' => $vendorDir . '/symfony/config/Loader/LoaderResolverInterface.php', - 'Symfony\\Component\\Config\\Loader\\ParamConfigurator' => $vendorDir . '/symfony/config/Loader/ParamConfigurator.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCache' => $vendorDir . '/symfony/config/ResourceCheckerConfigCache.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory' => $vendorDir . '/symfony/config/ResourceCheckerConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ResourceCheckerInterface' => $vendorDir . '/symfony/config/ResourceCheckerInterface.php', - 'Symfony\\Component\\Config\\Resource\\ClassExistenceResource' => $vendorDir . '/symfony/config/Resource/ClassExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\ComposerResource' => $vendorDir . '/symfony/config/Resource/ComposerResource.php', - 'Symfony\\Component\\Config\\Resource\\DirectoryResource' => $vendorDir . '/symfony/config/Resource/DirectoryResource.php', - 'Symfony\\Component\\Config\\Resource\\FileExistenceResource' => $vendorDir . '/symfony/config/Resource/FileExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\FileResource' => $vendorDir . '/symfony/config/Resource/FileResource.php', - 'Symfony\\Component\\Config\\Resource\\GlobResource' => $vendorDir . '/symfony/config/Resource/GlobResource.php', - 'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php', - 'Symfony\\Component\\Config\\Resource\\ResourceInterface' => $vendorDir . '/symfony/config/Resource/ResourceInterface.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceChecker.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceInterface.php', - 'Symfony\\Component\\Config\\Util\\Exception\\InvalidXmlException' => $vendorDir . '/symfony/config/Util/Exception/InvalidXmlException.php', - 'Symfony\\Component\\Config\\Util\\Exception\\XmlParsingException' => $vendorDir . '/symfony/config/Util/Exception/XmlParsingException.php', - 'Symfony\\Component\\Config\\Util\\XmlUtils' => $vendorDir . '/symfony/config/Util/XmlUtils.php', - 'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php', - 'Symfony\\Component\\Console\\Attribute\\AsCommand' => $vendorDir . '/symfony/console/Attribute/AsCommand.php', - 'Symfony\\Component\\Console\\CI\\GithubActionReporter' => $vendorDir . '/symfony/console/CI/GithubActionReporter.php', - 'Symfony\\Component\\Console\\Color' => $vendorDir . '/symfony/console/Color.php', - 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php', - 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php', - 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/FactoryCommandLoader.php', - 'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php', - 'Symfony\\Component\\Console\\Command\\CompleteCommand' => $vendorDir . '/symfony/console/Command/CompleteCommand.php', - 'Symfony\\Component\\Console\\Command\\DumpCompletionCommand' => $vendorDir . '/symfony/console/Command/DumpCompletionCommand.php', - 'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php', - 'Symfony\\Component\\Console\\Command\\LazyCommand' => $vendorDir . '/symfony/console/Command/LazyCommand.php', - 'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php', - 'Symfony\\Component\\Console\\Command\\LockableTrait' => $vendorDir . '/symfony/console/Command/LockableTrait.php', - 'Symfony\\Component\\Console\\Command\\SignalableCommandInterface' => $vendorDir . '/symfony/console/Command/SignalableCommandInterface.php', - 'Symfony\\Component\\Console\\Completion\\CompletionInput' => $vendorDir . '/symfony/console/Completion/CompletionInput.php', - 'Symfony\\Component\\Console\\Completion\\CompletionSuggestions' => $vendorDir . '/symfony/console/Completion/CompletionSuggestions.php', - 'Symfony\\Component\\Console\\Completion\\Output\\BashCompletionOutput' => $vendorDir . '/symfony/console/Completion/Output/BashCompletionOutput.php', - 'Symfony\\Component\\Console\\Completion\\Output\\CompletionOutputInterface' => $vendorDir . '/symfony/console/Completion/Output/CompletionOutputInterface.php', - 'Symfony\\Component\\Console\\Completion\\Suggestion' => $vendorDir . '/symfony/console/Completion/Suggestion.php', - 'Symfony\\Component\\Console\\ConsoleEvents' => $vendorDir . '/symfony/console/ConsoleEvents.php', - 'Symfony\\Component\\Console\\Cursor' => $vendorDir . '/symfony/console/Cursor.php', - 'Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => $vendorDir . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php', - 'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => $vendorDir . '/symfony/console/Descriptor/ApplicationDescription.php', - 'Symfony\\Component\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => $vendorDir . '/symfony/console/Descriptor/DescriptorInterface.php', - 'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/console/Descriptor/XmlDescriptor.php', - 'Symfony\\Component\\Console\\EventListener\\ErrorListener' => $vendorDir . '/symfony/console/EventListener/ErrorListener.php', - 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => $vendorDir . '/symfony/console/Event/ConsoleCommandEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => $vendorDir . '/symfony/console/Event/ConsoleErrorEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleEvent' => $vendorDir . '/symfony/console/Event/ConsoleEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => $vendorDir . '/symfony/console/Event/ConsoleSignalEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => $vendorDir . '/symfony/console/Event/ConsoleTerminateEvent.php', - 'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => $vendorDir . '/symfony/console/Exception/CommandNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/console/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/console/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => $vendorDir . '/symfony/console/Exception/InvalidOptionException.php', - 'Symfony\\Component\\Console\\Exception\\LogicException' => $vendorDir . '/symfony/console/Exception/LogicException.php', - 'Symfony\\Component\\Console\\Exception\\MissingInputException' => $vendorDir . '/symfony/console/Exception/MissingInputException.php', - 'Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => $vendorDir . '/symfony/console/Exception/NamespaceNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\RuntimeException' => $vendorDir . '/symfony/console/Exception/RuntimeException.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatter' => $vendorDir . '/symfony/console/Formatter/NullOutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/NullOutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => $vendorDir . '/symfony/console/Formatter/OutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleStack.php', - 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => $vendorDir . '/symfony/console/Helper/DebugFormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Console\\Helper\\Dumper' => $vendorDir . '/symfony/console/Helper/Dumper.php', - 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\Helper' => $vendorDir . '/symfony/console/Helper/Helper.php', - 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php', - 'Symfony\\Component\\Console\\Helper\\HelperSet' => $vendorDir . '/symfony/console/Helper/HelperSet.php', - 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Helper/InputAwareHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => $vendorDir . '/symfony/console/Helper/ProcessHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Helper/ProgressBar.php', - 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => $vendorDir . '/symfony/console/Helper/ProgressIndicator.php', - 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => $vendorDir . '/symfony/console/Helper/QuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => $vendorDir . '/symfony/console/Helper/SymfonyQuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\Table' => $vendorDir . '/symfony/console/Helper/Table.php', - 'Symfony\\Component\\Console\\Helper\\TableCell' => $vendorDir . '/symfony/console/Helper/TableCell.php', - 'Symfony\\Component\\Console\\Helper\\TableCellStyle' => $vendorDir . '/symfony/console/Helper/TableCellStyle.php', - 'Symfony\\Component\\Console\\Helper\\TableRows' => $vendorDir . '/symfony/console/Helper/TableRows.php', - 'Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Helper/TableSeparator.php', - 'Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Helper/TableStyle.php', - 'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Input/ArgvInput.php', - 'Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Input/ArrayInput.php', - 'Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Input/Input.php', - 'Symfony\\Component\\Console\\Input\\InputArgument' => $vendorDir . '/symfony/console/Input/InputArgument.php', - 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => $vendorDir . '/symfony/console/Input/InputAwareInterface.php', - 'Symfony\\Component\\Console\\Input\\InputDefinition' => $vendorDir . '/symfony/console/Input/InputDefinition.php', - 'Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Input/InputInterface.php', - 'Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Input/InputOption.php', - 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => $vendorDir . '/symfony/console/Input/StreamableInputInterface.php', - 'Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Input/StringInput.php', - 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => $vendorDir . '/symfony/console/Logger/ConsoleLogger.php', - 'Symfony\\Component\\Console\\Output\\BufferedOutput' => $vendorDir . '/symfony/console/Output/BufferedOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Output/ConsoleOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Output/ConsoleOutputInterface.php', - 'Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => $vendorDir . '/symfony/console/Output/ConsoleSectionOutput.php', - 'Symfony\\Component\\Console\\Output\\NullOutput' => $vendorDir . '/symfony/console/Output/NullOutput.php', - 'Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Output/Output.php', - 'Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Output/OutputInterface.php', - 'Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Output/StreamOutput.php', - 'Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => $vendorDir . '/symfony/console/Output/TrimmedBufferOutput.php', - 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => $vendorDir . '/symfony/console/Question/ChoiceQuestion.php', - 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => $vendorDir . '/symfony/console/Question/ConfirmationQuestion.php', - 'Symfony\\Component\\Console\\Question\\Question' => $vendorDir . '/symfony/console/Question/Question.php', - 'Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry' => $vendorDir . '/symfony/console/SignalRegistry/SignalRegistry.php', - 'Symfony\\Component\\Console\\SingleCommandApplication' => $vendorDir . '/symfony/console/SingleCommandApplication.php', - 'Symfony\\Component\\Console\\Style\\OutputStyle' => $vendorDir . '/symfony/console/Style/OutputStyle.php', - 'Symfony\\Component\\Console\\Style\\StyleInterface' => $vendorDir . '/symfony/console/Style/StyleInterface.php', - 'Symfony\\Component\\Console\\Style\\SymfonyStyle' => $vendorDir . '/symfony/console/Style/SymfonyStyle.php', - 'Symfony\\Component\\Console\\Terminal' => $vendorDir . '/symfony/console/Terminal.php', - 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Tester/ApplicationTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandCompletionTester' => $vendorDir . '/symfony/console/Tester/CommandCompletionTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Tester/CommandTester.php', - 'Symfony\\Component\\Console\\Tester\\Constraint\\CommandIsSuccessful' => $vendorDir . '/symfony/console/Tester/Constraint/CommandIsSuccessful.php', - 'Symfony\\Component\\Console\\Tester\\TesterTrait' => $vendorDir . '/symfony/console/Tester/TesterTrait.php', - 'Symfony\\Component\\CssSelector\\CssSelectorConverter' => $vendorDir . '/symfony/css-selector/CssSelectorConverter.php', - 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/css-selector/Exception/ExceptionInterface.php', - 'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => $vendorDir . '/symfony/css-selector/Exception/ExpressionErrorException.php', - 'Symfony\\Component\\CssSelector\\Exception\\InternalErrorException' => $vendorDir . '/symfony/css-selector/Exception/InternalErrorException.php', - 'Symfony\\Component\\CssSelector\\Exception\\ParseException' => $vendorDir . '/symfony/css-selector/Exception/ParseException.php', - 'Symfony\\Component\\CssSelector\\Exception\\SyntaxErrorException' => $vendorDir . '/symfony/css-selector/Exception/SyntaxErrorException.php', - 'Symfony\\Component\\CssSelector\\Node\\AbstractNode' => $vendorDir . '/symfony/css-selector/Node/AbstractNode.php', - 'Symfony\\Component\\CssSelector\\Node\\AttributeNode' => $vendorDir . '/symfony/css-selector/Node/AttributeNode.php', - 'Symfony\\Component\\CssSelector\\Node\\ClassNode' => $vendorDir . '/symfony/css-selector/Node/ClassNode.php', - 'Symfony\\Component\\CssSelector\\Node\\CombinedSelectorNode' => $vendorDir . '/symfony/css-selector/Node/CombinedSelectorNode.php', - 'Symfony\\Component\\CssSelector\\Node\\ElementNode' => $vendorDir . '/symfony/css-selector/Node/ElementNode.php', - 'Symfony\\Component\\CssSelector\\Node\\FunctionNode' => $vendorDir . '/symfony/css-selector/Node/FunctionNode.php', - 'Symfony\\Component\\CssSelector\\Node\\HashNode' => $vendorDir . '/symfony/css-selector/Node/HashNode.php', - 'Symfony\\Component\\CssSelector\\Node\\NegationNode' => $vendorDir . '/symfony/css-selector/Node/NegationNode.php', - 'Symfony\\Component\\CssSelector\\Node\\NodeInterface' => $vendorDir . '/symfony/css-selector/Node/NodeInterface.php', - 'Symfony\\Component\\CssSelector\\Node\\PseudoNode' => $vendorDir . '/symfony/css-selector/Node/PseudoNode.php', - 'Symfony\\Component\\CssSelector\\Node\\SelectorNode' => $vendorDir . '/symfony/css-selector/Node/SelectorNode.php', - 'Symfony\\Component\\CssSelector\\Node\\Specificity' => $vendorDir . '/symfony/css-selector/Node/Specificity.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\CommentHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/CommentHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' => $vendorDir . '/symfony/css-selector/Parser/Handler/HandlerInterface.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HashHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/HashHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\IdentifierHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/IdentifierHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\NumberHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/NumberHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\StringHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/StringHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\WhitespaceHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/WhitespaceHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Parser' => $vendorDir . '/symfony/css-selector/Parser/Parser.php', - 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' => $vendorDir . '/symfony/css-selector/Parser/ParserInterface.php', - 'Symfony\\Component\\CssSelector\\Parser\\Reader' => $vendorDir . '/symfony/css-selector/Parser/Reader.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ClassParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/ClassParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ElementParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/ElementParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\EmptyStringParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\HashParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/HashParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Token' => $vendorDir . '/symfony/css-selector/Parser/Token.php', - 'Symfony\\Component\\CssSelector\\Parser\\TokenStream' => $vendorDir . '/symfony/css-selector/Parser/TokenStream.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\Tokenizer' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/Tokenizer.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerEscaping' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerPatterns' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/AbstractExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AttributeMatchingExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\CombinationExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/CombinationExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' => $vendorDir . '/symfony/css-selector/XPath/Extension/ExtensionInterface.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\FunctionExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/FunctionExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\HtmlExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/HtmlExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\NodeExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/NodeExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\PseudoClassExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/PseudoClassExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Translator' => $vendorDir . '/symfony/css-selector/XPath/Translator.php', - 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' => $vendorDir . '/symfony/css-selector/XPath/TranslatorInterface.php', - 'Symfony\\Component\\CssSelector\\XPath\\XPathExpr' => $vendorDir . '/symfony/css-selector/XPath/XPathExpr.php', - 'Symfony\\Component\\DependencyInjection\\Alias' => $vendorDir . '/symfony/dependency-injection/Alias.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\AbstractArgument' => $vendorDir . '/symfony/dependency-injection/Argument/AbstractArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ArgumentInterface' => $vendorDir . '/symfony/dependency-injection/Argument/ArgumentInterface.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\BoundArgument' => $vendorDir . '/symfony/dependency-injection/Argument/BoundArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\IteratorArgument' => $vendorDir . '/symfony/dependency-injection/Argument/IteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ReferenceSetArgumentTrait' => $vendorDir . '/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\RewindableGenerator' => $vendorDir . '/symfony/dependency-injection/Argument/RewindableGenerator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceClosureArgument' => $vendorDir . '/symfony/dependency-injection/Argument/ServiceClosureArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator' => $vendorDir . '/symfony/dependency-injection/Argument/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocatorArgument' => $vendorDir . '/symfony/dependency-injection/Argument/ServiceLocatorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\TaggedIteratorArgument' => $vendorDir . '/symfony/dependency-injection/Argument/TaggedIteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AsTaggedItem' => $vendorDir . '/symfony/dependency-injection/Attribute/AsTaggedItem.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Autoconfigure' => $vendorDir . '/symfony/dependency-injection/Attribute/Autoconfigure.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AutoconfigureTag' => $vendorDir . '/symfony/dependency-injection/Attribute/AutoconfigureTag.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator' => $vendorDir . '/symfony/dependency-injection/Attribute/TaggedIterator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator' => $vendorDir . '/symfony/dependency-injection/Attribute/TaggedLocator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Target' => $vendorDir . '/symfony/dependency-injection/Attribute/Target.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\When' => $vendorDir . '/symfony/dependency-injection/Attribute/When.php', - 'Symfony\\Component\\DependencyInjection\\ChildDefinition' => $vendorDir . '/symfony/dependency-injection/ChildDefinition.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' => $vendorDir . '/symfony/dependency-injection/Compiler/AbstractRecursivePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AliasDeprecatedPublicServicesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AnalyzeServiceReferencesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AttributeAutoconfigurationPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutoAliasServicePass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutoAliasServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowirePass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutowirePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredMethodsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredPropertiesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckArgumentsValidityPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckCircularReferencesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckDefinitionValidityPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckReferenceValidityPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckTypeDeclarationsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\Compiler' => $vendorDir . '/symfony/dependency-injection/Compiler/Compiler.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface' => $vendorDir . '/symfony/dependency-injection/Compiler/CompilerPassInterface.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DecoratorServicePass' => $vendorDir . '/symfony/dependency-injection/Compiler/DecoratorServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DefinitionErrorExceptionPass' => $vendorDir . '/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ExtensionCompilerPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => $vendorDir . '/symfony/dependency-injection/Compiler/PassConfig.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => $vendorDir . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterAutoconfigureAttributesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterEnvVarProcessorsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterReverseContainerPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterServiceSubscribersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveAbstractDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemovePrivateAliasesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveUnusedDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ReplaceAliasByActualDefinitionPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveBindingsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveBindingsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveChildDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveClassPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveDecoratorStackPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveEnvPlaceholdersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveFactoryClassPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveHotPathPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveHotPathPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInstanceofConditionalsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInvalidReferencesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNamedArgumentsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNoPreloadPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveParameterPlaceHoldersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolvePrivatesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveReferencesToAliasesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveServiceSubscribersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveTaggedIteratorArgumentPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceLocatorTagPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraph' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphEdge' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphNode' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ValidateEnvPlaceholdersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResource' => $vendorDir . '/symfony/dependency-injection/Config/ContainerParametersResource.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResourceChecker' => $vendorDir . '/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php', - 'Symfony\\Component\\DependencyInjection\\Container' => $vendorDir . '/symfony/dependency-injection/Container.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface' => $vendorDir . '/symfony/dependency-injection/ContainerAwareInterface.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareTrait' => $vendorDir . '/symfony/dependency-injection/ContainerAwareTrait.php', - 'Symfony\\Component\\DependencyInjection\\ContainerBuilder' => $vendorDir . '/symfony/dependency-injection/ContainerBuilder.php', - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => $vendorDir . '/symfony/dependency-injection/ContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\Definition' => $vendorDir . '/symfony/dependency-injection/Definition.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Dumper' => $vendorDir . '/symfony/dependency-injection/Dumper/Dumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\DumperInterface' => $vendorDir . '/symfony/dependency-injection/Dumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\GraphvizDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/GraphvizDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\PhpDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/PhpDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Preloader' => $vendorDir . '/symfony/dependency-injection/Dumper/Preloader.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\XmlDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/XmlDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\YamlDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/YamlDumper.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarLoaderInterface' => $vendorDir . '/symfony/dependency-injection/EnvVarLoaderInterface.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessor' => $vendorDir . '/symfony/dependency-injection/EnvVarProcessor.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessorInterface' => $vendorDir . '/symfony/dependency-injection/EnvVarProcessorInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException' => $vendorDir . '/symfony/dependency-injection/Exception/AutowiringFailedException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\BadMethodCallException' => $vendorDir . '/symfony/dependency-injection/Exception/BadMethodCallException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvNotFoundException' => $vendorDir . '/symfony/dependency-injection/Exception/EnvNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvParameterException' => $vendorDir . '/symfony/dependency-injection/Exception/EnvParameterException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/dependency-injection/Exception/ExceptionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/dependency-injection/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidParameterTypeException' => $vendorDir . '/symfony/dependency-injection/Exception/InvalidParameterTypeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\LogicException' => $vendorDir . '/symfony/dependency-injection/Exception/LogicException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/dependency-injection/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterCircularReferenceException' => $vendorDir . '/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException' => $vendorDir . '/symfony/dependency-injection/Exception/ParameterNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException' => $vendorDir . '/symfony/dependency-injection/Exception/RuntimeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException' => $vendorDir . '/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException' => $vendorDir . '/symfony/dependency-injection/Exception/ServiceNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguage' => $vendorDir . '/symfony/dependency-injection/ExpressionLanguage.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguageProvider' => $vendorDir . '/symfony/dependency-injection/ExpressionLanguageProvider.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ConfigurationExtensionInterface' => $vendorDir . '/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\Extension' => $vendorDir . '/symfony/dependency-injection/Extension/Extension.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface' => $vendorDir . '/symfony/dependency-injection/Extension/ExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\PrependExtensionInterface' => $vendorDir . '/symfony/dependency-injection/Extension/PrependExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\InstantiatorInterface' => $vendorDir . '/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\RealServiceInstantiator' => $vendorDir . '/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\DumperInterface' => $vendorDir . '/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\NullDumper' => $vendorDir . '/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\ProxyHelper' => $vendorDir . '/symfony/dependency-injection/LazyProxy/ProxyHelper.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\ClosureLoader' => $vendorDir . '/symfony/dependency-injection/Loader/ClosureLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractServiceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AliasConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ClosureReferenceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\DefaultsConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\EnvConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InlineServiceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InstanceofConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ParametersConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\PrototypeConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ReferenceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServiceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServicesConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AbstractTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ArgumentTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutoconfigureTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutowireTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\BindTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\CallTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ClassTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ConfiguratorTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DecorateTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DeprecateTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FactoryTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FileTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\LazyTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ParentTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PropertyTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PublicTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ShareTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\SyntheticTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\TagTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\DirectoryLoader' => $vendorDir . '/symfony/dependency-injection/Loader/DirectoryLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\FileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/FileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/GlobFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/IniFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/PhpFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/XmlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/YamlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Parameter' => $vendorDir . '/symfony/dependency-injection/Parameter.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ContainerBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBagInterface' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\EnvPlaceholderParameterBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\Reference' => $vendorDir . '/symfony/dependency-injection/Reference.php', - 'Symfony\\Component\\DependencyInjection\\ReverseContainer' => $vendorDir . '/symfony/dependency-injection/ReverseContainer.php', - 'Symfony\\Component\\DependencyInjection\\ServiceLocator' => $vendorDir . '/symfony/dependency-injection/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\TaggedContainerInterface' => $vendorDir . '/symfony/dependency-injection/TaggedContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\TypedReference' => $vendorDir . '/symfony/dependency-injection/TypedReference.php', - 'Symfony\\Component\\DependencyInjection\\Variable' => $vendorDir . '/symfony/dependency-injection/Variable.php', - 'Symfony\\Component\\Dotenv\\Command\\DebugCommand' => $vendorDir . '/symfony/dotenv/Command/DebugCommand.php', - 'Symfony\\Component\\Dotenv\\Command\\DotenvDumpCommand' => $vendorDir . '/symfony/dotenv/Command/DotenvDumpCommand.php', - 'Symfony\\Component\\Dotenv\\Dotenv' => $vendorDir . '/symfony/dotenv/Dotenv.php', - 'Symfony\\Component\\Dotenv\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/dotenv/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatException' => $vendorDir . '/symfony/dotenv/Exception/FormatException.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatExceptionContext' => $vendorDir . '/symfony/dotenv/Exception/FormatExceptionContext.php', - 'Symfony\\Component\\Dotenv\\Exception\\PathException' => $vendorDir . '/symfony/dotenv/Exception/PathException.php', - 'Symfony\\Component\\ErrorHandler\\BufferingLogger' => $vendorDir . '/symfony/error-handler/BufferingLogger.php', - 'Symfony\\Component\\ErrorHandler\\Debug' => $vendorDir . '/symfony/error-handler/Debug.php', - 'Symfony\\Component\\ErrorHandler\\DebugClassLoader' => $vendorDir . '/symfony/error-handler/DebugClassLoader.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ClassNotFoundErrorEnhancer' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ErrorEnhancerInterface' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedFunctionErrorEnhancer' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedMethodErrorEnhancer' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorHandler' => $vendorDir . '/symfony/error-handler/ErrorHandler.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer' => $vendorDir . '/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\ErrorRendererInterface' => $vendorDir . '/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer' => $vendorDir . '/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\SerializerErrorRenderer' => $vendorDir . '/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\Error\\ClassNotFoundError' => $vendorDir . '/symfony/error-handler/Error/ClassNotFoundError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\FatalError' => $vendorDir . '/symfony/error-handler/Error/FatalError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\OutOfMemoryError' => $vendorDir . '/symfony/error-handler/Error/OutOfMemoryError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedFunctionError' => $vendorDir . '/symfony/error-handler/Error/UndefinedFunctionError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedMethodError' => $vendorDir . '/symfony/error-handler/Error/UndefinedMethodError.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\FlattenException' => $vendorDir . '/symfony/error-handler/Exception/FlattenException.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\SilencedErrorContext' => $vendorDir . '/symfony/error-handler/Exception/SilencedErrorContext.php', - 'Symfony\\Component\\ErrorHandler\\Internal\\TentativeTypes' => $vendorDir . '/symfony/error-handler/Internal/TentativeTypes.php', - 'Symfony\\Component\\ErrorHandler\\ThrowableUtils' => $vendorDir . '/symfony/error-handler/ThrowableUtils.php', - 'Symfony\\Component\\EventDispatcher\\Attribute\\AsEventListener' => $vendorDir . '/symfony/event-dispatcher/Attribute/AsEventListener.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => $vendorDir . '/symfony/event-dispatcher/Debug/WrappedListener.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\AddEventAliasesPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/EventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/EventDispatcherInterface.php', - 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => $vendorDir . '/symfony/event-dispatcher/EventSubscriberInterface.php', - 'Symfony\\Component\\EventDispatcher\\GenericEvent' => $vendorDir . '/symfony/event-dispatcher/GenericEvent.php', - 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => $vendorDir . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php', - 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/filesystem/Exception/FileNotFoundException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOException' => $vendorDir . '/symfony/filesystem/Exception/IOException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/IOExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/filesystem/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Filesystem\\Exception\\RuntimeException' => $vendorDir . '/symfony/filesystem/Exception/RuntimeException.php', - 'Symfony\\Component\\Filesystem\\Filesystem' => $vendorDir . '/symfony/filesystem/Filesystem.php', - 'Symfony\\Component\\Filesystem\\Path' => $vendorDir . '/symfony/filesystem/Path.php', - 'Symfony\\Component\\Finder\\Comparator\\Comparator' => $vendorDir . '/symfony/finder/Comparator/Comparator.php', - 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => $vendorDir . '/symfony/finder/Comparator/DateComparator.php', - 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Comparator/NumberComparator.php', - 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Exception/AccessDeniedException.php', - 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => $vendorDir . '/symfony/finder/Exception/DirectoryNotFoundException.php', - 'Symfony\\Component\\Finder\\Finder' => $vendorDir . '/symfony/finder/Finder.php', - 'Symfony\\Component\\Finder\\Gitignore' => $vendorDir . '/symfony/finder/Gitignore.php', - 'Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Glob.php', - 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Iterator/CustomFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DateRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $vendorDir . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FileTypeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilecontentFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilenameFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\LazyIterator' => $vendorDir . '/symfony/finder/Iterator/LazyIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $vendorDir . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $vendorDir . '/symfony/finder/Iterator/PathFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $vendorDir . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $vendorDir . '/symfony/finder/Iterator/SortableIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => $vendorDir . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php', - 'Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/SplFileInfo.php', - 'Symfony\\Component\\Form\\AbstractExtension' => $vendorDir . '/symfony/form/AbstractExtension.php', - 'Symfony\\Component\\Form\\AbstractRendererEngine' => $vendorDir . '/symfony/form/AbstractRendererEngine.php', - 'Symfony\\Component\\Form\\AbstractType' => $vendorDir . '/symfony/form/AbstractType.php', - 'Symfony\\Component\\Form\\AbstractTypeExtension' => $vendorDir . '/symfony/form/AbstractTypeExtension.php', - 'Symfony\\Component\\Form\\Button' => $vendorDir . '/symfony/form/Button.php', - 'Symfony\\Component\\Form\\ButtonBuilder' => $vendorDir . '/symfony/form/ButtonBuilder.php', - 'Symfony\\Component\\Form\\ButtonTypeInterface' => $vendorDir . '/symfony/form/ButtonTypeInterface.php', - 'Symfony\\Component\\Form\\CallbackTransformer' => $vendorDir . '/symfony/form/CallbackTransformer.php', - 'Symfony\\Component\\Form\\ChoiceList\\ArrayChoiceList' => $vendorDir . '/symfony/form/ChoiceList/ArrayChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceList' => $vendorDir . '/symfony/form/ChoiceList/ChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceListInterface' => $vendorDir . '/symfony/form/ChoiceList/ChoiceListInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\AbstractStaticOption' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceAttr' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFieldName' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFilter' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLabel' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceTranslationParameters' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceValue' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\GroupBy' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/GroupBy.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\PreferredChoice' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\CachingFactoryDecorator' => $vendorDir . '/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\ChoiceListFactoryInterface' => $vendorDir . '/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\DefaultChoiceListFactory' => $vendorDir . '/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\PropertyAccessDecorator' => $vendorDir . '/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\LazyChoiceList' => $vendorDir . '/symfony/form/ChoiceList/LazyChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\AbstractChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface' => $vendorDir . '/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\FilterChoiceLoaderDecorator' => $vendorDir . '/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\IntlCallbackChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceGroupView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceGroupView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceListView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceListView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceView.php', - 'Symfony\\Component\\Form\\ClearableErrorsInterface' => $vendorDir . '/symfony/form/ClearableErrorsInterface.php', - 'Symfony\\Component\\Form\\ClickableInterface' => $vendorDir . '/symfony/form/ClickableInterface.php', - 'Symfony\\Component\\Form\\Command\\DebugCommand' => $vendorDir . '/symfony/form/Command/DebugCommand.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/form/Console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/form/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/form/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/form/Console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Form\\DataAccessorInterface' => $vendorDir . '/symfony/form/DataAccessorInterface.php', - 'Symfony\\Component\\Form\\DataMapperInterface' => $vendorDir . '/symfony/form/DataMapperInterface.php', - 'Symfony\\Component\\Form\\DataTransformerInterface' => $vendorDir . '/symfony/form/DataTransformerInterface.php', - 'Symfony\\Component\\Form\\DependencyInjection\\FormPass' => $vendorDir . '/symfony/form/DependencyInjection/FormPass.php', - 'Symfony\\Component\\Form\\Event\\PostSetDataEvent' => $vendorDir . '/symfony/form/Event/PostSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PostSubmitEvent' => $vendorDir . '/symfony/form/Event/PostSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSetDataEvent' => $vendorDir . '/symfony/form/Event/PreSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSubmitEvent' => $vendorDir . '/symfony/form/Event/PreSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\SubmitEvent' => $vendorDir . '/symfony/form/Event/SubmitEvent.php', - 'Symfony\\Component\\Form\\Exception\\AccessException' => $vendorDir . '/symfony/form/Exception/AccessException.php', - 'Symfony\\Component\\Form\\Exception\\AlreadySubmittedException' => $vendorDir . '/symfony/form/Exception/AlreadySubmittedException.php', - 'Symfony\\Component\\Form\\Exception\\BadMethodCallException' => $vendorDir . '/symfony/form/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Form\\Exception\\ErrorMappingException' => $vendorDir . '/symfony/form/Exception/ErrorMappingException.php', - 'Symfony\\Component\\Form\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/form/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Form\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/form/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Form\\Exception\\InvalidConfigurationException' => $vendorDir . '/symfony/form/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Form\\Exception\\LogicException' => $vendorDir . '/symfony/form/Exception/LogicException.php', - 'Symfony\\Component\\Form\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/form/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Form\\Exception\\RuntimeException' => $vendorDir . '/symfony/form/Exception/RuntimeException.php', - 'Symfony\\Component\\Form\\Exception\\StringCastException' => $vendorDir . '/symfony/form/Exception/StringCastException.php', - 'Symfony\\Component\\Form\\Exception\\TransformationFailedException' => $vendorDir . '/symfony/form/Exception/TransformationFailedException.php', - 'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/form/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Form\\Extension\\Core\\CoreExtension' => $vendorDir . '/symfony/form/Extension/Core/CoreExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\CallbackAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\ChainAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\PropertyPathAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\CheckboxListMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\DataMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/DataMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\PropertyPathMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\RadioListMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/RadioListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ArrayToPartsTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BaseDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BooleanToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoiceToValueTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoicesToValuesTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DataTransformerChain' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeImmutableToDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToHtml5LocalDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToRfc3339Transformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToTimestampTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeZoneToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntegerToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntlTimeZoneToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\MoneyToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\PercentToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\StringToFloatTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UlidToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UuidToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ValueToDuplicatesTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\WeekToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\FixUrlProtocolListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\MergeCollectionListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/ResizeFormListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TransformationFailureListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TrimListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/TrimListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType' => $vendorDir . '/symfony/form/Extension/Core/Type/BaseType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType' => $vendorDir . '/symfony/form/Extension/Core/Type/BirthdayType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType' => $vendorDir . '/symfony/form/Extension/Core/Type/ButtonType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType' => $vendorDir . '/symfony/form/Extension/Core/Type/CheckboxType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType' => $vendorDir . '/symfony/form/Extension/Core/Type/ChoiceType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType' => $vendorDir . '/symfony/form/Extension/Core/Type/CollectionType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType' => $vendorDir . '/symfony/form/Extension/Core/Type/ColorType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType' => $vendorDir . '/symfony/form/Extension/Core/Type/CountryType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType' => $vendorDir . '/symfony/form/Extension/Core/Type/CurrencyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateIntervalType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateTimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType' => $vendorDir . '/symfony/form/Extension/Core/Type/EmailType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EnumType' => $vendorDir . '/symfony/form/Extension/Core/Type/EnumType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType' => $vendorDir . '/symfony/form/Extension/Core/Type/FileType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType' => $vendorDir . '/symfony/form/Extension/Core/Type/FormType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType' => $vendorDir . '/symfony/form/Extension/Core/Type/HiddenType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType' => $vendorDir . '/symfony/form/Extension/Core/Type/IntegerType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType' => $vendorDir . '/symfony/form/Extension/Core/Type/LanguageType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType' => $vendorDir . '/symfony/form/Extension/Core/Type/LocaleType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType' => $vendorDir . '/symfony/form/Extension/Core/Type/MoneyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType' => $vendorDir . '/symfony/form/Extension/Core/Type/NumberType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType' => $vendorDir . '/symfony/form/Extension/Core/Type/PasswordType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType' => $vendorDir . '/symfony/form/Extension/Core/Type/PercentType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType' => $vendorDir . '/symfony/form/Extension/Core/Type/RadioType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RangeType' => $vendorDir . '/symfony/form/Extension/Core/Type/RangeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RepeatedType' => $vendorDir . '/symfony/form/Extension/Core/Type/RepeatedType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ResetType' => $vendorDir . '/symfony/form/Extension/Core/Type/ResetType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SearchType' => $vendorDir . '/symfony/form/Extension/Core/Type/SearchType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType' => $vendorDir . '/symfony/form/Extension/Core/Type/SubmitType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TelType' => $vendorDir . '/symfony/form/Extension/Core/Type/TelType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType' => $vendorDir . '/symfony/form/Extension/Core/Type/TextType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType' => $vendorDir . '/symfony/form/Extension/Core/Type/TextareaType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType' => $vendorDir . '/symfony/form/Extension/Core/Type/TimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimezoneType' => $vendorDir . '/symfony/form/Extension/Core/Type/TimezoneType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TransformationFailureExtension' => $vendorDir . '/symfony/form/Extension/Core/Type/TransformationFailureExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UlidType' => $vendorDir . '/symfony/form/Extension/Core/Type/UlidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType' => $vendorDir . '/symfony/form/Extension/Core/Type/UrlType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UuidType' => $vendorDir . '/symfony/form/Extension/Core/Type/UuidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\WeekType' => $vendorDir . '/symfony/form/Extension/Core/Type/WeekType.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfExtension' => $vendorDir . '/symfony/form/Extension/Csrf/CsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\EventListener\\CsrfValidationListener' => $vendorDir . '/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\Type\\FormTypeCsrfExtension' => $vendorDir . '/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\DataCollectorExtension' => $vendorDir . '/symfony/form/Extension/DataCollector/DataCollectorExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener' => $vendorDir . '/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollector' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataCollector.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollectorInterface' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractor' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataExtractor.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractorInterface' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeDataCollectorProxy' => $vendorDir . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeFactoryDataCollectorProxy' => $vendorDir . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Type\\DataCollectorTypeExtension' => $vendorDir . '/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php', - 'Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension' => $vendorDir . '/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationExtension' => $vendorDir . '/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationRequestHandler' => $vendorDir . '/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\Type\\FormTypeHttpFoundationExtension' => $vendorDir . '/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form' => $vendorDir . '/symfony/form/Extension/Validator/Constraints/Form.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\FormValidator' => $vendorDir . '/symfony/form/Extension/Validator/Constraints/FormValidator.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener' => $vendorDir . '/symfony/form/Extension/Validator/EventListener/ValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\BaseValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\RepeatedTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\UploadValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Util\\ServerParams' => $vendorDir . '/symfony/form/Extension/Validator/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/ValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser' => $vendorDir . '/symfony/form/Extension/Validator/ValidatorTypeGuesser.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\MappingRule' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\RelativePath' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapper' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapperInterface' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPath' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPathIterator' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php', - 'Symfony\\Component\\Form\\FileUploadError' => $vendorDir . '/symfony/form/FileUploadError.php', - 'Symfony\\Component\\Form\\Form' => $vendorDir . '/symfony/form/Form.php', - 'Symfony\\Component\\Form\\FormBuilder' => $vendorDir . '/symfony/form/FormBuilder.php', - 'Symfony\\Component\\Form\\FormBuilderInterface' => $vendorDir . '/symfony/form/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigBuilder' => $vendorDir . '/symfony/form/FormConfigBuilder.php', - 'Symfony\\Component\\Form\\FormConfigBuilderInterface' => $vendorDir . '/symfony/form/FormConfigBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigInterface' => $vendorDir . '/symfony/form/FormConfigInterface.php', - 'Symfony\\Component\\Form\\FormError' => $vendorDir . '/symfony/form/FormError.php', - 'Symfony\\Component\\Form\\FormErrorIterator' => $vendorDir . '/symfony/form/FormErrorIterator.php', - 'Symfony\\Component\\Form\\FormEvent' => $vendorDir . '/symfony/form/FormEvent.php', - 'Symfony\\Component\\Form\\FormEvents' => $vendorDir . '/symfony/form/FormEvents.php', - 'Symfony\\Component\\Form\\FormExtensionInterface' => $vendorDir . '/symfony/form/FormExtensionInterface.php', - 'Symfony\\Component\\Form\\FormFactory' => $vendorDir . '/symfony/form/FormFactory.php', - 'Symfony\\Component\\Form\\FormFactoryBuilder' => $vendorDir . '/symfony/form/FormFactoryBuilder.php', - 'Symfony\\Component\\Form\\FormFactoryBuilderInterface' => $vendorDir . '/symfony/form/FormFactoryBuilderInterface.php', - 'Symfony\\Component\\Form\\FormFactoryInterface' => $vendorDir . '/symfony/form/FormFactoryInterface.php', - 'Symfony\\Component\\Form\\FormInterface' => $vendorDir . '/symfony/form/FormInterface.php', - 'Symfony\\Component\\Form\\FormRegistry' => $vendorDir . '/symfony/form/FormRegistry.php', - 'Symfony\\Component\\Form\\FormRegistryInterface' => $vendorDir . '/symfony/form/FormRegistryInterface.php', - 'Symfony\\Component\\Form\\FormRenderer' => $vendorDir . '/symfony/form/FormRenderer.php', - 'Symfony\\Component\\Form\\FormRendererEngineInterface' => $vendorDir . '/symfony/form/FormRendererEngineInterface.php', - 'Symfony\\Component\\Form\\FormRendererInterface' => $vendorDir . '/symfony/form/FormRendererInterface.php', - 'Symfony\\Component\\Form\\FormTypeExtensionInterface' => $vendorDir . '/symfony/form/FormTypeExtensionInterface.php', - 'Symfony\\Component\\Form\\FormTypeGuesserChain' => $vendorDir . '/symfony/form/FormTypeGuesserChain.php', - 'Symfony\\Component\\Form\\FormTypeGuesserInterface' => $vendorDir . '/symfony/form/FormTypeGuesserInterface.php', - 'Symfony\\Component\\Form\\FormTypeInterface' => $vendorDir . '/symfony/form/FormTypeInterface.php', - 'Symfony\\Component\\Form\\FormView' => $vendorDir . '/symfony/form/FormView.php', - 'Symfony\\Component\\Form\\Forms' => $vendorDir . '/symfony/form/Forms.php', - 'Symfony\\Component\\Form\\Guess\\Guess' => $vendorDir . '/symfony/form/Guess/Guess.php', - 'Symfony\\Component\\Form\\Guess\\TypeGuess' => $vendorDir . '/symfony/form/Guess/TypeGuess.php', - 'Symfony\\Component\\Form\\Guess\\ValueGuess' => $vendorDir . '/symfony/form/Guess/ValueGuess.php', - 'Symfony\\Component\\Form\\NativeRequestHandler' => $vendorDir . '/symfony/form/NativeRequestHandler.php', - 'Symfony\\Component\\Form\\PreloadedExtension' => $vendorDir . '/symfony/form/PreloadedExtension.php', - 'Symfony\\Component\\Form\\RequestHandlerInterface' => $vendorDir . '/symfony/form/RequestHandlerInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormType' => $vendorDir . '/symfony/form/ResolvedFormType.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactory' => $vendorDir . '/symfony/form/ResolvedFormTypeFactory.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactoryInterface' => $vendorDir . '/symfony/form/ResolvedFormTypeFactoryInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeInterface' => $vendorDir . '/symfony/form/ResolvedFormTypeInterface.php', - 'Symfony\\Component\\Form\\ReversedTransformer' => $vendorDir . '/symfony/form/ReversedTransformer.php', - 'Symfony\\Component\\Form\\SubmitButton' => $vendorDir . '/symfony/form/SubmitButton.php', - 'Symfony\\Component\\Form\\SubmitButtonBuilder' => $vendorDir . '/symfony/form/SubmitButtonBuilder.php', - 'Symfony\\Component\\Form\\SubmitButtonTypeInterface' => $vendorDir . '/symfony/form/SubmitButtonTypeInterface.php', - 'Symfony\\Component\\Form\\Test\\FormBuilderInterface' => $vendorDir . '/symfony/form/Test/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\Test\\FormIntegrationTestCase' => $vendorDir . '/symfony/form/Test/FormIntegrationTestCase.php', - 'Symfony\\Component\\Form\\Test\\FormInterface' => $vendorDir . '/symfony/form/Test/FormInterface.php', - 'Symfony\\Component\\Form\\Test\\FormPerformanceTestCase' => $vendorDir . '/symfony/form/Test/FormPerformanceTestCase.php', - 'Symfony\\Component\\Form\\Test\\Traits\\ValidatorExtensionTrait' => $vendorDir . '/symfony/form/Test/Traits/ValidatorExtensionTrait.php', - 'Symfony\\Component\\Form\\Test\\TypeTestCase' => $vendorDir . '/symfony/form/Test/TypeTestCase.php', - 'Symfony\\Component\\Form\\Util\\FormUtil' => $vendorDir . '/symfony/form/Util/FormUtil.php', - 'Symfony\\Component\\Form\\Util\\InheritDataAwareIterator' => $vendorDir . '/symfony/form/Util/InheritDataAwareIterator.php', - 'Symfony\\Component\\Form\\Util\\OptionsResolverWrapper' => $vendorDir . '/symfony/form/Util/OptionsResolverWrapper.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMap' => $vendorDir . '/symfony/form/Util/OrderedHashMap.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMapIterator' => $vendorDir . '/symfony/form/Util/OrderedHashMapIterator.php', - 'Symfony\\Component\\Form\\Util\\ServerParams' => $vendorDir . '/symfony/form/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Util\\StringUtil' => $vendorDir . '/symfony/form/Util/StringUtil.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $vendorDir . '/symfony/http-foundation/AcceptHeader.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => $vendorDir . '/symfony/http-foundation/AcceptHeaderItem.php', - 'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => $vendorDir . '/symfony/http-foundation/BinaryFileResponse.php', - 'Symfony\\Component\\HttpFoundation\\Cookie' => $vendorDir . '/symfony/http-foundation/Cookie.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\BadRequestException' => $vendorDir . '/symfony/http-foundation/Exception/BadRequestException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => $vendorDir . '/symfony/http-foundation/Exception/ConflictingHeadersException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\JsonException' => $vendorDir . '/symfony/http-foundation/Exception/JsonException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => $vendorDir . '/symfony/http-foundation/Exception/RequestExceptionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SessionNotFoundException' => $vendorDir . '/symfony/http-foundation/Exception/SessionNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => $vendorDir . '/symfony/http-foundation/Exception/SuspiciousOperationException.php', - 'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => $vendorDir . '/symfony/http-foundation/ExpressionRequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\FileBag' => $vendorDir . '/symfony/http-foundation/FileBag.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/http-foundation/File/Exception/AccessDeniedException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\CannotWriteFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/CannotWriteFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\ExtensionFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/ExtensionFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FormSizeFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/FormSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\IniSizeFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/IniSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/NoFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoTmpDirFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/NoTmpDirFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\PartialFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/PartialFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => $vendorDir . '/symfony/http-foundation/File/Exception/UploadException.php', - 'Symfony\\Component\\HttpFoundation\\File\\File' => $vendorDir . '/symfony/http-foundation/File/File.php', - 'Symfony\\Component\\HttpFoundation\\File\\Stream' => $vendorDir . '/symfony/http-foundation/File/Stream.php', - 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => $vendorDir . '/symfony/http-foundation/File/UploadedFile.php', - 'Symfony\\Component\\HttpFoundation\\HeaderBag' => $vendorDir . '/symfony/http-foundation/HeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\HeaderUtils' => $vendorDir . '/symfony/http-foundation/HeaderUtils.php', - 'Symfony\\Component\\HttpFoundation\\InputBag' => $vendorDir . '/symfony/http-foundation/InputBag.php', - 'Symfony\\Component\\HttpFoundation\\IpUtils' => $vendorDir . '/symfony/http-foundation/IpUtils.php', - 'Symfony\\Component\\HttpFoundation\\JsonResponse' => $vendorDir . '/symfony/http-foundation/JsonResponse.php', - 'Symfony\\Component\\HttpFoundation\\ParameterBag' => $vendorDir . '/symfony/http-foundation/ParameterBag.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\AbstractRequestRateLimiter' => $vendorDir . '/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\RequestRateLimiterInterface' => $vendorDir . '/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php', - 'Symfony\\Component\\HttpFoundation\\RedirectResponse' => $vendorDir . '/symfony/http-foundation/RedirectResponse.php', - 'Symfony\\Component\\HttpFoundation\\Request' => $vendorDir . '/symfony/http-foundation/Request.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcher' => $vendorDir . '/symfony/http-foundation/RequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => $vendorDir . '/symfony/http-foundation/RequestMatcherInterface.php', - 'Symfony\\Component\\HttpFoundation\\RequestStack' => $vendorDir . '/symfony/http-foundation/RequestStack.php', - 'Symfony\\Component\\HttpFoundation\\Response' => $vendorDir . '/symfony/http-foundation/Response.php', - 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => $vendorDir . '/symfony/http-foundation/ResponseHeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\ServerBag' => $vendorDir . '/symfony/http-foundation/ServerBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Session' => $vendorDir . '/symfony/http-foundation/Session/Session.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagProxy' => $vendorDir . '/symfony/http-foundation/Session/SessionBagProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactory' => $vendorDir . '/symfony/http-foundation/Session/SessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactoryInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionUtils' => $vendorDir . '/symfony/http-foundation/Session/SessionUtils.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\IdentityMarshaller' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MarshallingSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MigratingSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\RedisSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\SessionHandlerFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\StrictSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => $vendorDir . '/symfony/http-foundation/Session/Storage/MetadataBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorageFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorageFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorageFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\ServiceSessionFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageFactoryInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', - 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php', - 'Symfony\\Component\\HttpFoundation\\UrlHelper' => $vendorDir . '/symfony/http-foundation/UrlHelper.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\ArgumentInterface' => $vendorDir . '/symfony/http-kernel/Attribute/ArgumentInterface.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\AsController' => $vendorDir . '/symfony/http-kernel/Attribute/AsController.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => $vendorDir . '/symfony/http-kernel/Bundle/Bundle.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => $vendorDir . '/symfony/http-kernel/Bundle/BundleInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => $vendorDir . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer' => $vendorDir . '/symfony/http-kernel/CacheClearer/ChainCacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer' => $vendorDir . '/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmer' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => $vendorDir . '/symfony/http-kernel/CacheWarmer/WarmableInterface.php', - 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => $vendorDir . '/symfony/http-kernel/Config/FileLocator.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactoryInterface' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\NotTaggedControllerValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\TraceableValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ContainerControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/ContainerControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => $vendorDir . '/symfony/http-kernel/Controller/ControllerReference.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/ControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ControllerResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ErrorController' => $vendorDir . '/symfony/http-kernel/Controller/ErrorController.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableArgumentResolver' => $vendorDir . '/symfony/http-kernel/Controller/TraceableArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/TraceableControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\AjaxDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/AjaxDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ConfigDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/ConfigDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/DataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface' => $vendorDir . '/symfony/http-kernel/DataCollector/DataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DumpDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/DumpDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\EventDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/EventDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ExceptionDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/ExceptionDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface' => $vendorDir . '/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LoggerDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/LoggerDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\MemoryDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/MemoryDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/RequestDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RouterDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/RouterDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\TimeDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/TimeDataCollector.php', - 'Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter' => $vendorDir . '/symfony/http-kernel/Debug/FileLinkFormatter.php', - 'Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/http-kernel/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\AddAnnotatedClassesToCachePass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ControllerArgumentValueResolverPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => $vendorDir . '/symfony/http-kernel/DependencyInjection/Extension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\FragmentRendererPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LazyLoadingFragmentHandler' => $vendorDir . '/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LoggerPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/LoggerPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterControllerArgumentLocatorsPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterLocaleAwareServicesPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RemoveEmptyControllerArgumentLocatorsPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ResettableServicePass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ResettableServicePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetter' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ServicesResetter.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/AbstractSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractTestSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/AbstractTestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => $vendorDir . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => $vendorDir . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener' => $vendorDir . '/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => $vendorDir . '/symfony/http-kernel/EventListener/DumpListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener' => $vendorDir . '/symfony/http-kernel/EventListener/ErrorListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => $vendorDir . '/symfony/http-kernel/EventListener/FragmentListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener' => $vendorDir . '/symfony/http-kernel/EventListener/LocaleAwareListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => $vendorDir . '/symfony/http-kernel/EventListener/LocaleListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => $vendorDir . '/symfony/http-kernel/EventListener/ProfilerListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => $vendorDir . '/symfony/http-kernel/EventListener/ResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener' => $vendorDir . '/symfony/http-kernel/EventListener/RouterListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/SessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener' => $vendorDir . '/symfony/http-kernel/EventListener/StreamedResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SurrogateListener' => $vendorDir . '/symfony/http-kernel/EventListener/SurrogateListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/TestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => $vendorDir . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => $vendorDir . '/symfony/http-kernel/Event/ControllerArgumentsEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => $vendorDir . '/symfony/http-kernel/Event/ControllerEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => $vendorDir . '/symfony/http-kernel/Event/ExceptionEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => $vendorDir . '/symfony/http-kernel/Event/FinishRequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => $vendorDir . '/symfony/http-kernel/Event/KernelEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => $vendorDir . '/symfony/http-kernel/Event/RequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/ResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => $vendorDir . '/symfony/http-kernel/Event/TerminateEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => $vendorDir . '/symfony/http-kernel/Event/ViewEvent.php', - 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => $vendorDir . '/symfony/http-kernel/Exception/BadRequestHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ConflictHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ControllerDoesNotReturnResponseException' => $vendorDir . '/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => $vendorDir . '/symfony/http-kernel/Exception/GoneHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => $vendorDir . '/symfony/http-kernel/Exception/HttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', - 'Symfony\\Component\\HttpKernel\\Exception\\InvalidMetadataException' => $vendorDir . '/symfony/http-kernel/Exception/InvalidMetadataException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotFoundHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => $vendorDir . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnexpectedSessionUsageException' => $vendorDir . '/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/EsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentRendererInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGenerator' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentUriGenerator.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGeneratorInterface' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\HIncludeFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\InlineFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/InlineFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\RoutableFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/SsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\AbstractSurrogate' => $vendorDir . '/symfony/http-kernel/HttpCache/AbstractSurrogate.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi' => $vendorDir . '/symfony/http-kernel/HttpCache/Esi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache' => $vendorDir . '/symfony/http-kernel/HttpCache/HttpCache.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => $vendorDir . '/symfony/http-kernel/HttpCache/Ssi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => $vendorDir . '/symfony/http-kernel/HttpCache/Store.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/StoreInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => $vendorDir . '/symfony/http-kernel/HttpCache/SubRequestHandler.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpClientKernel' => $vendorDir . '/symfony/http-kernel/HttpClientKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernel' => $vendorDir . '/symfony/http-kernel/HttpKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelBrowser' => $vendorDir . '/symfony/http-kernel/HttpKernelBrowser.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => $vendorDir . '/symfony/http-kernel/HttpKernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Kernel' => $vendorDir . '/symfony/http-kernel/Kernel.php', - 'Symfony\\Component\\HttpKernel\\KernelEvents' => $vendorDir . '/symfony/http-kernel/KernelEvents.php', - 'Symfony\\Component\\HttpKernel\\KernelInterface' => $vendorDir . '/symfony/http-kernel/KernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\DebugLoggerInterface' => $vendorDir . '/symfony/http-kernel/Log/DebugLoggerInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\Logger' => $vendorDir . '/symfony/http-kernel/Log/Logger.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage' => $vendorDir . '/symfony/http-kernel/Profiler/FileProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profile' => $vendorDir . '/symfony/http-kernel/Profiler/Profile.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profiler' => $vendorDir . '/symfony/http-kernel/Profiler/Profiler.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => $vendorDir . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php', - 'Symfony\\Component\\HttpKernel\\RebootableInterface' => $vendorDir . '/symfony/http-kernel/RebootableInterface.php', - 'Symfony\\Component\\HttpKernel\\TerminableInterface' => $vendorDir . '/symfony/http-kernel/TerminableInterface.php', - 'Symfony\\Component\\HttpKernel\\UriSigner' => $vendorDir . '/symfony/http-kernel/UriSigner.php', - 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/MissingOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/options-resolver/Exception/NoConfigurationException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => $vendorDir . '/symfony/options-resolver/Exception/NoSuchOptionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => $vendorDir . '/symfony/options-resolver/Exception/OptionDefinitionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/UndefinedOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => $vendorDir . '/symfony/options-resolver/OptionConfigurator.php', - 'Symfony\\Component\\OptionsResolver\\Options' => $vendorDir . '/symfony/options-resolver/Options.php', - 'Symfony\\Component\\OptionsResolver\\OptionsResolver' => $vendorDir . '/symfony/options-resolver/OptionsResolver.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' => $vendorDir . '/symfony/property-access/Exception/AccessException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/property-access/Exception/ExceptionInterface.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/property-access/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidPropertyPathException' => $vendorDir . '/symfony/property-access/Exception/InvalidPropertyPathException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchIndexException' => $vendorDir . '/symfony/property-access/Exception/NoSuchIndexException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException' => $vendorDir . '/symfony/property-access/Exception/NoSuchPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/property-access/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\RuntimeException' => $vendorDir . '/symfony/property-access/Exception/RuntimeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/property-access/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UninitializedPropertyException' => $vendorDir . '/symfony/property-access/Exception/UninitializedPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccess' => $vendorDir . '/symfony/property-access/PropertyAccess.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessor' => $vendorDir . '/symfony/property-access/PropertyAccessor.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder' => $vendorDir . '/symfony/property-access/PropertyAccessorBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorInterface' => $vendorDir . '/symfony/property-access/PropertyAccessorInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPath' => $vendorDir . '/symfony/property-access/PropertyPath.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathBuilder' => $vendorDir . '/symfony/property-access/PropertyPathBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathInterface' => $vendorDir . '/symfony/property-access/PropertyPathInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIterator' => $vendorDir . '/symfony/property-access/PropertyPathIterator.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIteratorInterface' => $vendorDir . '/symfony/property-access/PropertyPathIteratorInterface.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoConstructorPass' => $vendorDir . '/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoPass' => $vendorDir . '/symfony/property-info/DependencyInjection/PropertyInfoPass.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorArgumentTypeExtractorInterface' => $vendorDir . '/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorExtractor' => $vendorDir . '/symfony/property-info/Extractor/ConstructorExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor' => $vendorDir . '/symfony/property-info/Extractor/PhpDocExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor' => $vendorDir . '/symfony/property-info/Extractor/PhpStanExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor' => $vendorDir . '/symfony/property-info/Extractor/ReflectionExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor' => $vendorDir . '/symfony/property-info/Extractor/SerializerExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScope' => $vendorDir . '/symfony/property-info/PhpStan/NameScope.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScopeFactory' => $vendorDir . '/symfony/property-info/PhpStan/NameScopeFactory.php', - 'Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyAccessExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyDescriptionExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoCacheExtractor' => $vendorDir . '/symfony/property-info/PropertyInfoCacheExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor' => $vendorDir . '/symfony/property-info/PropertyInfoExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyInitializableExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyListExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfo' => $vendorDir . '/symfony/property-info/PropertyReadInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyReadInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfo' => $vendorDir . '/symfony/property-info/PropertyWriteInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyWriteInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Type' => $vendorDir . '/symfony/property-info/Type.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpDocTypeHelper' => $vendorDir . '/symfony/property-info/Util/PhpDocTypeHelper.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpStanTypeHelper' => $vendorDir . '/symfony/property-info/Util/PhpStanTypeHelper.php', - 'Symfony\\Component\\Routing\\Alias' => $vendorDir . '/symfony/routing/Alias.php', - 'Symfony\\Component\\Routing\\Annotation\\Route' => $vendorDir . '/symfony/routing/Annotation/Route.php', - 'Symfony\\Component\\Routing\\CompiledRoute' => $vendorDir . '/symfony/routing/CompiledRoute.php', - 'Symfony\\Component\\Routing\\DependencyInjection\\RoutingResolverPass' => $vendorDir . '/symfony/routing/DependencyInjection/RoutingResolverPass.php', - 'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/routing/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/routing/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => $vendorDir . '/symfony/routing/Exception/InvalidParameterException.php', - 'Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException' => $vendorDir . '/symfony/routing/Exception/MethodNotAllowedException.php', - 'Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException' => $vendorDir . '/symfony/routing/Exception/MissingMandatoryParametersException.php', - 'Symfony\\Component\\Routing\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/routing/Exception/NoConfigurationException.php', - 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => $vendorDir . '/symfony/routing/Exception/ResourceNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteCircularReferenceException' => $vendorDir . '/symfony/routing/Exception/RouteCircularReferenceException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => $vendorDir . '/symfony/routing/Exception/RouteNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RuntimeException' => $vendorDir . '/symfony/routing/Exception/RuntimeException.php', - 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator' => $vendorDir . '/symfony/routing/Generator/CompiledUrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => $vendorDir . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGenerator' => $vendorDir . '/symfony/routing/Generator/UrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => $vendorDir . '/symfony/routing/Generator/UrlGeneratorInterface.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationClassLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationClassLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationDirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ClosureLoader' => $vendorDir . '/symfony/routing/Loader/ClosureLoader.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\AliasConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\CollectionConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/CollectionConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\ImportConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/ImportConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RouteConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/RouteConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RoutingConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/RoutingConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\AddTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/AddTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\HostTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/HostTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\LocalizedRouteTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\PrefixTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\RouteTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/RouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\ContainerLoader' => $vendorDir . '/symfony/routing/Loader/ContainerLoader.php', - 'Symfony\\Component\\Routing\\Loader\\DirectoryLoader' => $vendorDir . '/symfony/routing/Loader/DirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/routing/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ObjectLoader' => $vendorDir . '/symfony/routing/Loader/ObjectLoader.php', - 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/routing/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/routing/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Routing\\Matcher\\CompiledUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/CompiledUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherTrait' => $vendorDir . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\StaticPrefixCollection' => $vendorDir . '/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php', - 'Symfony\\Component\\Routing\\Matcher\\ExpressionLanguageProvider' => $vendorDir . '/symfony/routing/Matcher/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/RequestMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\TraceableUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/TraceableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher' => $vendorDir . '/symfony/routing/Matcher/UrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/UrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\RequestContext' => $vendorDir . '/symfony/routing/RequestContext.php', - 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => $vendorDir . '/symfony/routing/RequestContextAwareInterface.php', - 'Symfony\\Component\\Routing\\Route' => $vendorDir . '/symfony/routing/Route.php', - 'Symfony\\Component\\Routing\\RouteCollection' => $vendorDir . '/symfony/routing/RouteCollection.php', - 'Symfony\\Component\\Routing\\RouteCollectionBuilder' => $vendorDir . '/symfony/routing/RouteCollectionBuilder.php', - 'Symfony\\Component\\Routing\\RouteCompiler' => $vendorDir . '/symfony/routing/RouteCompiler.php', - 'Symfony\\Component\\Routing\\RouteCompilerInterface' => $vendorDir . '/symfony/routing/RouteCompilerInterface.php', - 'Symfony\\Component\\Routing\\Router' => $vendorDir . '/symfony/routing/Router.php', - 'Symfony\\Component\\Routing\\RouterInterface' => $vendorDir . '/symfony/routing/RouterInterface.php', - 'Symfony\\Component\\Stopwatch\\Section' => $vendorDir . '/symfony/stopwatch/Section.php', - 'Symfony\\Component\\Stopwatch\\Stopwatch' => $vendorDir . '/symfony/stopwatch/Stopwatch.php', - 'Symfony\\Component\\Stopwatch\\StopwatchEvent' => $vendorDir . '/symfony/stopwatch/StopwatchEvent.php', - 'Symfony\\Component\\Stopwatch\\StopwatchPeriod' => $vendorDir . '/symfony/stopwatch/StopwatchPeriod.php', - 'Symfony\\Component\\String\\AbstractString' => $vendorDir . '/symfony/string/AbstractString.php', - 'Symfony\\Component\\String\\AbstractUnicodeString' => $vendorDir . '/symfony/string/AbstractUnicodeString.php', - 'Symfony\\Component\\String\\ByteString' => $vendorDir . '/symfony/string/ByteString.php', - 'Symfony\\Component\\String\\CodePointString' => $vendorDir . '/symfony/string/CodePointString.php', - 'Symfony\\Component\\String\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/string/Exception/ExceptionInterface.php', - 'Symfony\\Component\\String\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/string/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\String\\Exception\\RuntimeException' => $vendorDir . '/symfony/string/Exception/RuntimeException.php', - 'Symfony\\Component\\String\\Inflector\\EnglishInflector' => $vendorDir . '/symfony/string/Inflector/EnglishInflector.php', - 'Symfony\\Component\\String\\Inflector\\FrenchInflector' => $vendorDir . '/symfony/string/Inflector/FrenchInflector.php', - 'Symfony\\Component\\String\\Inflector\\InflectorInterface' => $vendorDir . '/symfony/string/Inflector/InflectorInterface.php', - 'Symfony\\Component\\String\\LazyString' => $vendorDir . '/symfony/string/LazyString.php', - 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => $vendorDir . '/symfony/string/Slugger/AsciiSlugger.php', - 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => $vendorDir . '/symfony/string/Slugger/SluggerInterface.php', - 'Symfony\\Component\\String\\UnicodeString' => $vendorDir . '/symfony/string/UnicodeString.php', - 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => $vendorDir . '/symfony/var-dumper/Caster/AmqpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => $vendorDir . '/symfony/var-dumper/Caster/ArgsStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\Caster' => $vendorDir . '/symfony/var-dumper/Caster/Caster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => $vendorDir . '/symfony/var-dumper/Caster/ClassStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => $vendorDir . '/symfony/var-dumper/Caster/ConstStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => $vendorDir . '/symfony/var-dumper/Caster/CutArrayStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => $vendorDir . '/symfony/var-dumper/Caster/CutStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => $vendorDir . '/symfony/var-dumper/Caster/DOMCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => $vendorDir . '/symfony/var-dumper/Caster/DateCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => $vendorDir . '/symfony/var-dumper/Caster/DoctrineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => $vendorDir . '/symfony/var-dumper/Caster/DsCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => $vendorDir . '/symfony/var-dumper/Caster/DsPairStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => $vendorDir . '/symfony/var-dumper/Caster/EnumStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ExceptionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FiberCaster' => $vendorDir . '/symfony/var-dumper/Caster/FiberCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => $vendorDir . '/symfony/var-dumper/Caster/FrameStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => $vendorDir . '/symfony/var-dumper/Caster/GmpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => $vendorDir . '/symfony/var-dumper/Caster/ImagineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImgStub' => $vendorDir . '/symfony/var-dumper/Caster/ImgStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => $vendorDir . '/symfony/var-dumper/Caster/IntlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => $vendorDir . '/symfony/var-dumper/Caster/LinkStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => $vendorDir . '/symfony/var-dumper/Caster/MemcachedCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\MysqliCaster' => $vendorDir . '/symfony/var-dumper/Caster/MysqliCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => $vendorDir . '/symfony/var-dumper/Caster/PdoCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => $vendorDir . '/symfony/var-dumper/Caster/PgSqlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => $vendorDir . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => $vendorDir . '/symfony/var-dumper/Caster/RdKafkaCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => $vendorDir . '/symfony/var-dumper/Caster/RedisCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ReflectionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/ResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => $vendorDir . '/symfony/var-dumper/Caster/SplCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => $vendorDir . '/symfony/var-dumper/Caster/StubCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => $vendorDir . '/symfony/var-dumper/Caster/SymfonyCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => $vendorDir . '/symfony/var-dumper/Caster/TraceStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => $vendorDir . '/symfony/var-dumper/Caster/UuidCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlReaderCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => $vendorDir . '/symfony/var-dumper/Cloner/AbstractCloner.php', - 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => $vendorDir . '/symfony/var-dumper/Cloner/ClonerInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => $vendorDir . '/symfony/var-dumper/Cloner/Cursor.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Data' => $vendorDir . '/symfony/var-dumper/Cloner/Data.php', - 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => $vendorDir . '/symfony/var-dumper/Cloner/DumperInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => $vendorDir . '/symfony/var-dumper/Cloner/Stub.php', - 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => $vendorDir . '/symfony/var-dumper/Cloner/VarCloner.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => $vendorDir . '/symfony/var-dumper/Command/ServerDumpCommand.php', - 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => $vendorDir . '/symfony/var-dumper/Dumper/AbstractDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => $vendorDir . '/symfony/var-dumper/Dumper/CliDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => $vendorDir . '/symfony/var-dumper/Dumper/DataDumperInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => $vendorDir . '/symfony/var-dumper/Dumper/HtmlDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ServerDumper.php', - 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => $vendorDir . '/symfony/var-dumper/Exception/ThrowingCasterException.php', - 'Symfony\\Component\\VarDumper\\Server\\Connection' => $vendorDir . '/symfony/var-dumper/Server/Connection.php', - 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => $vendorDir . '/symfony/var-dumper/Server/DumpServer.php', - 'Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php', - 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/var-exporter/Exception/ClassNotFoundException.php', - 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/var-exporter/Exception/ExceptionInterface.php', - 'Symfony\\Component\\VarExporter\\Exception\\NotInstantiableTypeException' => $vendorDir . '/symfony/var-exporter/Exception/NotInstantiableTypeException.php', - 'Symfony\\Component\\VarExporter\\Instantiator' => $vendorDir . '/symfony/var-exporter/Instantiator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Exporter' => $vendorDir . '/symfony/var-exporter/Internal/Exporter.php', - 'Symfony\\Component\\VarExporter\\Internal\\Hydrator' => $vendorDir . '/symfony/var-exporter/Internal/Hydrator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Reference' => $vendorDir . '/symfony/var-exporter/Internal/Reference.php', - 'Symfony\\Component\\VarExporter\\Internal\\Registry' => $vendorDir . '/symfony/var-exporter/Internal/Registry.php', - 'Symfony\\Component\\VarExporter\\Internal\\Values' => $vendorDir . '/symfony/var-exporter/Internal/Values.php', - 'Symfony\\Component\\VarExporter\\VarExporter' => $vendorDir . '/symfony/var-exporter/VarExporter.php', - 'Symfony\\Component\\Yaml\\Command\\LintCommand' => $vendorDir . '/symfony/yaml/Command/LintCommand.php', - 'Symfony\\Component\\Yaml\\Dumper' => $vendorDir . '/symfony/yaml/Dumper.php', - 'Symfony\\Component\\Yaml\\Escaper' => $vendorDir . '/symfony/yaml/Escaper.php', - 'Symfony\\Component\\Yaml\\Exception\\DumpException' => $vendorDir . '/symfony/yaml/Exception/DumpException.php', - 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/yaml/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Yaml\\Exception\\ParseException' => $vendorDir . '/symfony/yaml/Exception/ParseException.php', - 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => $vendorDir . '/symfony/yaml/Exception/RuntimeException.php', - 'Symfony\\Component\\Yaml\\Inline' => $vendorDir . '/symfony/yaml/Inline.php', - 'Symfony\\Component\\Yaml\\Parser' => $vendorDir . '/symfony/yaml/Parser.php', - 'Symfony\\Component\\Yaml\\Tag\\TaggedValue' => $vendorDir . '/symfony/yaml/Tag/TaggedValue.php', - 'Symfony\\Component\\Yaml\\Unescaper' => $vendorDir . '/symfony/yaml/Unescaper.php', - 'Symfony\\Component\\Yaml\\Yaml' => $vendorDir . '/symfony/yaml/Yaml.php', - 'Symfony\\Contracts\\Cache\\CacheInterface' => $vendorDir . '/symfony/cache-contracts/CacheInterface.php', - 'Symfony\\Contracts\\Cache\\CacheTrait' => $vendorDir . '/symfony/cache-contracts/CacheTrait.php', - 'Symfony\\Contracts\\Cache\\CallbackInterface' => $vendorDir . '/symfony/cache-contracts/CallbackInterface.php', - 'Symfony\\Contracts\\Cache\\ItemInterface' => $vendorDir . '/symfony/cache-contracts/ItemInterface.php', - 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => $vendorDir . '/symfony/cache-contracts/TagAwareCacheInterface.php', - 'Symfony\\Contracts\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher-contracts/Event.php', - 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php', - 'Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php', - 'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => $vendorDir . '/symfony/service-contracts/Attribute/SubscribedService.php', - 'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php', - 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php', - 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/translation-contracts/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatableInterface' => $vendorDir . '/symfony/translation-contracts/TranslatableInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation-contracts/TranslatorInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/translation-contracts/TranslatorTrait.php', - 'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php', - 'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => $vendorDir . '/symfony/polyfill-intl-grapheme/Grapheme.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Collator.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Currencies' => $vendorDir . '/symfony/polyfill-intl-icu/Currencies.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\AmPmTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfWeekTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfYearTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\FullTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1200Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1201Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2400Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2401Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\HourTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MinuteTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MonthTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\QuarterTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\SecondTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\TimezoneTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\YearTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\NotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/NotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\RuntimeException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/RuntimeException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Icu' => $vendorDir . '/symfony/polyfill-intl-icu/Icu.php', - 'Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/IntlDateFormatter.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Locale' => $vendorDir . '/symfony/polyfill-intl-icu/Locale.php', - 'Symfony\\Polyfill\\Intl\\Icu\\NumberFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/NumberFormatter.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Info' => $vendorDir . '/symfony/polyfill-intl-idn/Info.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php', - 'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php', - 'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php', - 'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php', - 'Symfony\\Polyfill\\Php73\\Php73' => $vendorDir . '/symfony/polyfill-php73/Php73.php', - 'Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php', - 'Symfony\\Polyfill\\Php80\\PhpToken' => $vendorDir . '/symfony/polyfill-php80/PhpToken.php', - 'Symfony\\Polyfill\\Php81\\Php81' => $vendorDir . '/symfony/polyfill-php81/Php81.php', - 'SynchroExceptionNotStarted' => $baseDir . '/application/exceptions/SynchroExceptionNotStarted.php', - 'System' => $vendorDir . '/pear/pear-core-minimal/src/System.php', - 'TCPDF' => $vendorDir . '/combodo/tcpdf/tcpdf.php', - 'TCPDF2DBarcode' => $vendorDir . '/combodo/tcpdf/tcpdf_barcodes_2d.php', - 'TCPDFBarcode' => $vendorDir . '/combodo/tcpdf/tcpdf_barcodes_1d.php', - 'TCPDF_COLORS' => $vendorDir . '/combodo/tcpdf/include/tcpdf_colors.php', - 'TCPDF_FILTERS' => $vendorDir . '/combodo/tcpdf/include/tcpdf_filters.php', - 'TCPDF_FONTS' => $vendorDir . '/combodo/tcpdf/include/tcpdf_fonts.php', - 'TCPDF_FONT_DATA' => $vendorDir . '/combodo/tcpdf/include/tcpdf_font_data.php', - 'TCPDF_IMAGES' => $vendorDir . '/combodo/tcpdf/include/tcpdf_images.php', - 'TCPDF_IMPORT' => $vendorDir . '/combodo/tcpdf/tcpdf_import.php', - 'TCPDF_PARSER' => $vendorDir . '/combodo/tcpdf/tcpdf_parser.php', - 'TCPDF_STATIC' => $vendorDir . '/combodo/tcpdf/include/tcpdf_static.php', - 'TabManager' => $baseDir . '/sources/Application/WebPage/TabManager.php', - 'TabularBulkExport' => $baseDir . '/core/tabularbulkexport.class.inc.php', - 'TagSetFieldData' => $baseDir . '/core/tagsetfield.class.inc.php', - 'TemplateMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'TemplateString' => $baseDir . '/core/templatestring.class.inc.php', - 'TemplateStringPlaceholder' => $baseDir . '/core/templatestring.class.inc.php', - 'TemporaryObjectDescriptor' => $baseDir . '/core/TemporaryObjectDescriptor.php', - 'TheNetworg\\OAuth2\\Client\\Grant\\JwtBearer' => $vendorDir . '/thenetworg/oauth2-azure/src/Grant/JwtBearer.php', - 'TheNetworg\\OAuth2\\Client\\Provider\\Azure' => $vendorDir . '/thenetworg/oauth2-azure/src/Provider/Azure.php', - 'TheNetworg\\OAuth2\\Client\\Provider\\AzureResourceOwner' => $vendorDir . '/thenetworg/oauth2-azure/src/Provider/AzureResourceOwner.php', - 'TheNetworg\\OAuth2\\Client\\Token\\AccessToken' => $vendorDir . '/thenetworg/oauth2-azure/src/Token/AccessToken.php', - 'ThemeHandler' => $baseDir . '/application/themehandler.class.inc.php', - 'ThemeHandlerService' => $baseDir . '/application/themehandlerservice.class.inc.php', - 'ToolsLog' => $baseDir . '/core/log.class.inc.php', - 'Trigger' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnAttributeBlobDownload' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnObject' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnObjectCreate' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnObjectDelete' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnObjectMention' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnObjectUpdate' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnPortalUpdate' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnStateChange' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnStateEnter' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnStateLeave' => $baseDir . '/core/trigger.class.inc.php', - 'TriggerOnThresholdReached' => $baseDir . '/core/trigger.class.inc.php', - 'TrueExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'Twig\\Cache\\CacheInterface' => $vendorDir . '/twig/twig/src/Cache/CacheInterface.php', - 'Twig\\Cache\\FilesystemCache' => $vendorDir . '/twig/twig/src/Cache/FilesystemCache.php', - 'Twig\\Cache\\NullCache' => $vendorDir . '/twig/twig/src/Cache/NullCache.php', - 'Twig\\Compiler' => $vendorDir . '/twig/twig/src/Compiler.php', - 'Twig\\Environment' => $vendorDir . '/twig/twig/src/Environment.php', - 'Twig\\Error\\Error' => $vendorDir . '/twig/twig/src/Error/Error.php', - 'Twig\\Error\\LoaderError' => $vendorDir . '/twig/twig/src/Error/LoaderError.php', - 'Twig\\Error\\RuntimeError' => $vendorDir . '/twig/twig/src/Error/RuntimeError.php', - 'Twig\\Error\\SyntaxError' => $vendorDir . '/twig/twig/src/Error/SyntaxError.php', - 'Twig\\ExpressionParser' => $vendorDir . '/twig/twig/src/ExpressionParser.php', - 'Twig\\ExtensionSet' => $vendorDir . '/twig/twig/src/ExtensionSet.php', - 'Twig\\Extension\\AbstractExtension' => $vendorDir . '/twig/twig/src/Extension/AbstractExtension.php', - 'Twig\\Extension\\CoreExtension' => $vendorDir . '/twig/twig/src/Extension/CoreExtension.php', - 'Twig\\Extension\\DebugExtension' => $vendorDir . '/twig/twig/src/Extension/DebugExtension.php', - 'Twig\\Extension\\EscaperExtension' => $vendorDir . '/twig/twig/src/Extension/EscaperExtension.php', - 'Twig\\Extension\\ExtensionInterface' => $vendorDir . '/twig/twig/src/Extension/ExtensionInterface.php', - 'Twig\\Extension\\GlobalsInterface' => $vendorDir . '/twig/twig/src/Extension/GlobalsInterface.php', - 'Twig\\Extension\\OptimizerExtension' => $vendorDir . '/twig/twig/src/Extension/OptimizerExtension.php', - 'Twig\\Extension\\ProfilerExtension' => $vendorDir . '/twig/twig/src/Extension/ProfilerExtension.php', - 'Twig\\Extension\\RuntimeExtensionInterface' => $vendorDir . '/twig/twig/src/Extension/RuntimeExtensionInterface.php', - 'Twig\\Extension\\SandboxExtension' => $vendorDir . '/twig/twig/src/Extension/SandboxExtension.php', - 'Twig\\Extension\\StagingExtension' => $vendorDir . '/twig/twig/src/Extension/StagingExtension.php', - 'Twig\\Extension\\StringLoaderExtension' => $vendorDir . '/twig/twig/src/Extension/StringLoaderExtension.php', - 'Twig\\FileExtensionEscapingStrategy' => $vendorDir . '/twig/twig/src/FileExtensionEscapingStrategy.php', - 'Twig\\Lexer' => $vendorDir . '/twig/twig/src/Lexer.php', - 'Twig\\Loader\\ArrayLoader' => $vendorDir . '/twig/twig/src/Loader/ArrayLoader.php', - 'Twig\\Loader\\ChainLoader' => $vendorDir . '/twig/twig/src/Loader/ChainLoader.php', - 'Twig\\Loader\\FilesystemLoader' => $vendorDir . '/twig/twig/src/Loader/FilesystemLoader.php', - 'Twig\\Loader\\LoaderInterface' => $vendorDir . '/twig/twig/src/Loader/LoaderInterface.php', - 'Twig\\Markup' => $vendorDir . '/twig/twig/src/Markup.php', - 'Twig\\NodeTraverser' => $vendorDir . '/twig/twig/src/NodeTraverser.php', - 'Twig\\NodeVisitor\\AbstractNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php', - 'Twig\\NodeVisitor\\EscaperNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php', - 'Twig\\NodeVisitor\\MacroAutoImportNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php', - 'Twig\\NodeVisitor\\NodeVisitorInterface' => $vendorDir . '/twig/twig/src/NodeVisitor/NodeVisitorInterface.php', - 'Twig\\NodeVisitor\\OptimizerNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php', - 'Twig\\NodeVisitor\\SafeAnalysisNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php', - 'Twig\\NodeVisitor\\SandboxNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php', - 'Twig\\Node\\AutoEscapeNode' => $vendorDir . '/twig/twig/src/Node/AutoEscapeNode.php', - 'Twig\\Node\\BlockNode' => $vendorDir . '/twig/twig/src/Node/BlockNode.php', - 'Twig\\Node\\BlockReferenceNode' => $vendorDir . '/twig/twig/src/Node/BlockReferenceNode.php', - 'Twig\\Node\\BodyNode' => $vendorDir . '/twig/twig/src/Node/BodyNode.php', - 'Twig\\Node\\CheckSecurityCallNode' => $vendorDir . '/twig/twig/src/Node/CheckSecurityCallNode.php', - 'Twig\\Node\\CheckSecurityNode' => $vendorDir . '/twig/twig/src/Node/CheckSecurityNode.php', - 'Twig\\Node\\CheckToStringNode' => $vendorDir . '/twig/twig/src/Node/CheckToStringNode.php', - 'Twig\\Node\\DeprecatedNode' => $vendorDir . '/twig/twig/src/Node/DeprecatedNode.php', - 'Twig\\Node\\DoNode' => $vendorDir . '/twig/twig/src/Node/DoNode.php', - 'Twig\\Node\\EmbedNode' => $vendorDir . '/twig/twig/src/Node/EmbedNode.php', - 'Twig\\Node\\Expression\\AbstractExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AbstractExpression.php', - 'Twig\\Node\\Expression\\ArrayExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrayExpression.php', - 'Twig\\Node\\Expression\\ArrowFunctionExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php', - 'Twig\\Node\\Expression\\AssignNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AssignNameExpression.php', - 'Twig\\Node\\Expression\\Binary\\AbstractBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php', - 'Twig\\Node\\Expression\\Binary\\AddBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AddBinary.php', - 'Twig\\Node\\Expression\\Binary\\AndBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseAndBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseOrBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseXorBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php', - 'Twig\\Node\\Expression\\Binary\\ConcatBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/ConcatBinary.php', - 'Twig\\Node\\Expression\\Binary\\DivBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/DivBinary.php', - 'Twig\\Node\\Expression\\Binary\\EndsWithBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\EqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/EqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\FloorDivBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/GreaterBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\InBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/InBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/LessBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\MatchesBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/MatchesBinary.php', - 'Twig\\Node\\Expression\\Binary\\ModBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/ModBinary.php', - 'Twig\\Node\\Expression\\Binary\\MulBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/MulBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotInBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/NotInBinary.php', - 'Twig\\Node\\Expression\\Binary\\OrBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/OrBinary.php', - 'Twig\\Node\\Expression\\Binary\\PowerBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/PowerBinary.php', - 'Twig\\Node\\Expression\\Binary\\RangeBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/RangeBinary.php', - 'Twig\\Node\\Expression\\Binary\\SpaceshipBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php', - 'Twig\\Node\\Expression\\Binary\\StartsWithBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\SubBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/SubBinary.php', - 'Twig\\Node\\Expression\\BlockReferenceExpression' => $vendorDir . '/twig/twig/src/Node/Expression/BlockReferenceExpression.php', - 'Twig\\Node\\Expression\\CallExpression' => $vendorDir . '/twig/twig/src/Node/Expression/CallExpression.php', - 'Twig\\Node\\Expression\\ConditionalExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ConditionalExpression.php', - 'Twig\\Node\\Expression\\ConstantExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ConstantExpression.php', - 'Twig\\Node\\Expression\\FilterExpression' => $vendorDir . '/twig/twig/src/Node/Expression/FilterExpression.php', - 'Twig\\Node\\Expression\\Filter\\DefaultFilter' => $vendorDir . '/twig/twig/src/Node/Expression/Filter/DefaultFilter.php', - 'Twig\\Node\\Expression\\FunctionExpression' => $vendorDir . '/twig/twig/src/Node/Expression/FunctionExpression.php', - 'Twig\\Node\\Expression\\GetAttrExpression' => $vendorDir . '/twig/twig/src/Node/Expression/GetAttrExpression.php', - 'Twig\\Node\\Expression\\InlinePrint' => $vendorDir . '/twig/twig/src/Node/Expression/InlinePrint.php', - 'Twig\\Node\\Expression\\MethodCallExpression' => $vendorDir . '/twig/twig/src/Node/Expression/MethodCallExpression.php', - 'Twig\\Node\\Expression\\NameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/NameExpression.php', - 'Twig\\Node\\Expression\\NullCoalesceExpression' => $vendorDir . '/twig/twig/src/Node/Expression/NullCoalesceExpression.php', - 'Twig\\Node\\Expression\\ParentExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ParentExpression.php', - 'Twig\\Node\\Expression\\TempNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/TempNameExpression.php', - 'Twig\\Node\\Expression\\TestExpression' => $vendorDir . '/twig/twig/src/Node/Expression/TestExpression.php', - 'Twig\\Node\\Expression\\Test\\ConstantTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/ConstantTest.php', - 'Twig\\Node\\Expression\\Test\\DefinedTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/DefinedTest.php', - 'Twig\\Node\\Expression\\Test\\DivisiblebyTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php', - 'Twig\\Node\\Expression\\Test\\EvenTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/EvenTest.php', - 'Twig\\Node\\Expression\\Test\\NullTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/NullTest.php', - 'Twig\\Node\\Expression\\Test\\OddTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/OddTest.php', - 'Twig\\Node\\Expression\\Test\\SameasTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/SameasTest.php', - 'Twig\\Node\\Expression\\Unary\\AbstractUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/AbstractUnary.php', - 'Twig\\Node\\Expression\\Unary\\NegUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/NegUnary.php', - 'Twig\\Node\\Expression\\Unary\\NotUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/NotUnary.php', - 'Twig\\Node\\Expression\\Unary\\PosUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/PosUnary.php', - 'Twig\\Node\\Expression\\VariadicExpression' => $vendorDir . '/twig/twig/src/Node/Expression/VariadicExpression.php', - 'Twig\\Node\\FlushNode' => $vendorDir . '/twig/twig/src/Node/FlushNode.php', - 'Twig\\Node\\ForLoopNode' => $vendorDir . '/twig/twig/src/Node/ForLoopNode.php', - 'Twig\\Node\\ForNode' => $vendorDir . '/twig/twig/src/Node/ForNode.php', - 'Twig\\Node\\IfNode' => $vendorDir . '/twig/twig/src/Node/IfNode.php', - 'Twig\\Node\\ImportNode' => $vendorDir . '/twig/twig/src/Node/ImportNode.php', - 'Twig\\Node\\IncludeNode' => $vendorDir . '/twig/twig/src/Node/IncludeNode.php', - 'Twig\\Node\\MacroNode' => $vendorDir . '/twig/twig/src/Node/MacroNode.php', - 'Twig\\Node\\ModuleNode' => $vendorDir . '/twig/twig/src/Node/ModuleNode.php', - 'Twig\\Node\\Node' => $vendorDir . '/twig/twig/src/Node/Node.php', - 'Twig\\Node\\NodeCaptureInterface' => $vendorDir . '/twig/twig/src/Node/NodeCaptureInterface.php', - 'Twig\\Node\\NodeOutputInterface' => $vendorDir . '/twig/twig/src/Node/NodeOutputInterface.php', - 'Twig\\Node\\PrintNode' => $vendorDir . '/twig/twig/src/Node/PrintNode.php', - 'Twig\\Node\\SandboxNode' => $vendorDir . '/twig/twig/src/Node/SandboxNode.php', - 'Twig\\Node\\SetNode' => $vendorDir . '/twig/twig/src/Node/SetNode.php', - 'Twig\\Node\\TextNode' => $vendorDir . '/twig/twig/src/Node/TextNode.php', - 'Twig\\Node\\WithNode' => $vendorDir . '/twig/twig/src/Node/WithNode.php', - 'Twig\\Parser' => $vendorDir . '/twig/twig/src/Parser.php', - 'Twig\\Profiler\\Dumper\\BaseDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/BaseDumper.php', - 'Twig\\Profiler\\Dumper\\BlackfireDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/BlackfireDumper.php', - 'Twig\\Profiler\\Dumper\\HtmlDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/HtmlDumper.php', - 'Twig\\Profiler\\Dumper\\TextDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/TextDumper.php', - 'Twig\\Profiler\\NodeVisitor\\ProfilerNodeVisitor' => $vendorDir . '/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php', - 'Twig\\Profiler\\Node\\EnterProfileNode' => $vendorDir . '/twig/twig/src/Profiler/Node/EnterProfileNode.php', - 'Twig\\Profiler\\Node\\LeaveProfileNode' => $vendorDir . '/twig/twig/src/Profiler/Node/LeaveProfileNode.php', - 'Twig\\Profiler\\Profile' => $vendorDir . '/twig/twig/src/Profiler/Profile.php', - 'Twig\\RuntimeLoader\\ContainerRuntimeLoader' => $vendorDir . '/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php', - 'Twig\\RuntimeLoader\\FactoryRuntimeLoader' => $vendorDir . '/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php', - 'Twig\\RuntimeLoader\\RuntimeLoaderInterface' => $vendorDir . '/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php', - 'Twig\\Sandbox\\SecurityError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFilterError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFunctionError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php', - 'Twig\\Sandbox\\SecurityNotAllowedMethodError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php', - 'Twig\\Sandbox\\SecurityNotAllowedPropertyError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php', - 'Twig\\Sandbox\\SecurityNotAllowedTagError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php', - 'Twig\\Sandbox\\SecurityPolicy' => $vendorDir . '/twig/twig/src/Sandbox/SecurityPolicy.php', - 'Twig\\Sandbox\\SecurityPolicyInterface' => $vendorDir . '/twig/twig/src/Sandbox/SecurityPolicyInterface.php', - 'Twig\\Source' => $vendorDir . '/twig/twig/src/Source.php', - 'Twig\\Template' => $vendorDir . '/twig/twig/src/Template.php', - 'Twig\\TemplateWrapper' => $vendorDir . '/twig/twig/src/TemplateWrapper.php', - 'Twig\\Token' => $vendorDir . '/twig/twig/src/Token.php', - 'Twig\\TokenParser\\AbstractTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AbstractTokenParser.php', - 'Twig\\TokenParser\\ApplyTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ApplyTokenParser.php', - 'Twig\\TokenParser\\AutoEscapeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php', - 'Twig\\TokenParser\\BlockTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/BlockTokenParser.php', - 'Twig\\TokenParser\\DeprecatedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php', - 'Twig\\TokenParser\\DoTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DoTokenParser.php', - 'Twig\\TokenParser\\EmbedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/EmbedTokenParser.php', - 'Twig\\TokenParser\\ExtendsTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ExtendsTokenParser.php', - 'Twig\\TokenParser\\FlushTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/FlushTokenParser.php', - 'Twig\\TokenParser\\ForTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ForTokenParser.php', - 'Twig\\TokenParser\\FromTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/FromTokenParser.php', - 'Twig\\TokenParser\\IfTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/IfTokenParser.php', - 'Twig\\TokenParser\\ImportTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ImportTokenParser.php', - 'Twig\\TokenParser\\IncludeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/IncludeTokenParser.php', - 'Twig\\TokenParser\\MacroTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/MacroTokenParser.php', - 'Twig\\TokenParser\\SandboxTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/SandboxTokenParser.php', - 'Twig\\TokenParser\\SetTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/SetTokenParser.php', - 'Twig\\TokenParser\\TokenParserInterface' => $vendorDir . '/twig/twig/src/TokenParser/TokenParserInterface.php', - 'Twig\\TokenParser\\UseTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/UseTokenParser.php', - 'Twig\\TokenParser\\WithTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/WithTokenParser.php', - 'Twig\\TokenStream' => $vendorDir . '/twig/twig/src/TokenStream.php', - 'Twig\\TwigFilter' => $vendorDir . '/twig/twig/src/TwigFilter.php', - 'Twig\\TwigFunction' => $vendorDir . '/twig/twig/src/TwigFunction.php', - 'Twig\\TwigTest' => $vendorDir . '/twig/twig/src/TwigTest.php', - 'Twig\\Util\\DeprecationCollector' => $vendorDir . '/twig/twig/src/Util/DeprecationCollector.php', - 'Twig\\Util\\TemplateDirIterator' => $vendorDir . '/twig/twig/src/Util/TemplateDirIterator.php', - 'UIExtKeyWidget' => $baseDir . '/application/ui.extkeywidget.class.inc.php', - 'UIHTMLEditorWidget' => $baseDir . '/application/ui.htmleditorwidget.class.inc.php', - 'UILinksWidget' => $baseDir . '/application/ui.linkswidget.class.inc.php', - 'UILinksWidgetDirect' => $baseDir . '/application/ui.linksdirectwidget.class.inc.php', - 'UIPasswordWidget' => $baseDir . '/application/ui.passwordwidget.class.inc.php', - 'UISearchFormForeignKeys' => $baseDir . '/application/ui.searchformforeignkeys.class.inc.php', - 'UIWizard' => $baseDir . '/application/uiwizard.class.inc.php', - 'URLButtonItem' => $baseDir . '/application/applicationextension.inc.php', - 'URLPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php', - 'UnaryExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'UnauthenticatedWebPage' => $baseDir . '/sources/Application/WebPage/UnauthenticatedWebPage.php', - 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', - 'UnknownClassOqlException' => $baseDir . '/core/oql/oqlinterpreter.class.inc.php', - 'User' => $baseDir . '/core/userrights.class.inc.php', - 'UserDashboard' => $baseDir . '/application/user.dashboard.class.inc.php', - 'UserInternal' => $baseDir . '/core/userrights.class.inc.php', - 'UserRightException' => $baseDir . '/application/exceptions/UserRightException.php', - 'UserRights' => $baseDir . '/core/userrights.class.inc.php', - 'UserRightsAddOnAPI' => $baseDir . '/core/userrights.class.inc.php', - 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', - 'ValueSetDefinition' => $baseDir . '/core/valuesetdef.class.inc.php', - 'ValueSetEnum' => $baseDir . '/core/valuesetdef.class.inc.php', - 'ValueSetEnumClasses' => $baseDir . '/core/valuesetdef.class.inc.php', - 'ValueSetEnumPadded' => $baseDir . '/core/valuesetdef.class.inc.php', - 'ValueSetObjects' => $baseDir . '/core/valuesetdef.class.inc.php', - 'ValueSetRange' => $baseDir . '/core/valuesetdef.class.inc.php', - 'VariableExpression' => $baseDir . '/core/oql/expression.class.inc.php', - 'VariableOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', - 'WebPage' => $baseDir . '/sources/Application/WebPage/WebPage.php', - 'WebPageMenuNode' => $baseDir . '/application/menunode.class.inc.php', - 'Webmozart\\Assert\\Assert' => $vendorDir . '/webmozart/assert/src/Assert.php', - 'Webmozart\\Assert\\InvalidArgumentException' => $vendorDir . '/webmozart/assert/src/InvalidArgumentException.php', - 'Webmozart\\Assert\\Mixin' => $vendorDir . '/webmozart/assert/src/Mixin.php', - 'WeeklyRotatingLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php', - 'WizardHelper' => $baseDir . '/application/wizardhelper.class.inc.php', - 'XLSXWriter' => $baseDir . '/application/xlsxwriter.class.php', - 'XMLBulkExport' => $baseDir . '/core/xmlbulkexport.class.inc.php', - 'XMLPage' => $baseDir . '/sources/Application/WebPage/XMLPage.php', - 'ajax_page' => $baseDir . '/application/ajaxwebpage.class.inc.php', - 'appUserPreferences' => $baseDir . '/application/user.preferences.class.inc.php', - 'cmdbAbstractObject' => $baseDir . '/application/cmdbabstract.class.inc.php', - 'cmdbDataGenerator' => $baseDir . '/core/data.generator.class.inc.php', - 'iApplicationObjectExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iApplicationUIExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iAttributeNoGroupBy' => $baseDir . '/core/attributedef.class.inc.php', - 'iBackgroundProcess' => $baseDir . '/core/backgroundprocess.inc.php', - 'iBackofficeDictEntriesExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeDictEntriesPrefixesExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeEarlyScriptExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeInitScriptExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeLinkedScriptsExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeLinkedStylesheetsExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeReadyScriptExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeScriptExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iBackofficeStyleExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iCMDBChangeOp' => $baseDir . '/core/cmdbchangeop.class.inc.php', - 'iDBObjectSetIterator' => $baseDir . '/core/dbobjectiterator.php', - 'iDBObjectURLMaker' => $baseDir . '/application/applicationcontext.class.inc.php', - 'iDisplay' => $baseDir . '/core/dbobject.class.php', - 'iFieldRendererMappingsExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iKPILoggerExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iKeyboardShortcut' => $baseDir . '/sources/Application/UI/Hook/iKeyboardShortcut.php', - 'iLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php', - 'iLoginExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iLoginFSMExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iLoginUIExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iLogoutExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iMetricComputer' => $baseDir . '/core/computing.inc.php', - 'iModuleExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iNewsroomProvider' => $baseDir . '/application/newsroomprovider.class.inc.php', - 'iOnClassInitialization' => $baseDir . '/core/metamodelmodifier.inc.php', - 'iPageUIBlockExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iPageUIExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iPopupMenuExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iPortalUIExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iPreferencesExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iProcess' => $baseDir . '/core/backgroundprocess.inc.php', - 'iQueryModifier' => $baseDir . '/core/querymodifier.class.inc.php', - 'iRestServiceProvider' => $baseDir . '/application/applicationextension.inc.php', - 'iScheduledProcess' => $baseDir . '/core/backgroundprocess.inc.php', - 'iSelfRegister' => $baseDir . '/core/userrights.class.inc.php', - 'iTabbedPage' => $baseDir . '/sources/Application/WebPage/iTabbedPage.php', - 'iTopConfigParser' => $baseDir . '/core/iTopConfigParser.php', - 'iTopMutex' => $baseDir . '/core/mutex.class.inc.php', - 'iTopOwnershipLock' => $baseDir . '/core/ownershiplock.class.inc.php', - 'iTopOwnershipToken' => $baseDir . '/core/ownershiplock.class.inc.php', - 'iTopPDF' => $baseDir . '/sources/Application/WebPage/iTopPDF.php', - 'iTopStandardURLMaker' => $baseDir . '/application/applicationcontext.class.inc.php', - 'iTopWebPage' => $baseDir . '/sources/Application/WebPage/iTopWebPage.php', - 'iTopWizardWebPage' => $baseDir . '/sources/Application/WebPage/iTopWizardWebPage.php', - 'iTopXmlException' => $baseDir . '/application/exceptions/iTopXmlException.php', - 'iWorkingTimeComputer' => $baseDir . '/core/computing.inc.php', - 'lnkAuditCategoryToAuditDomain' => $baseDir . '/application/audit.domain.class.inc.php', - 'lnkTriggerAction' => $baseDir . '/core/trigger.class.inc.php', - 'ormCaseLog' => $baseDir . '/core/ormcaselog.class.inc.php', - 'ormCustomFieldsValue' => $baseDir . '/core/ormcustomfieldsvalue.class.inc.php', - 'ormDocument' => $baseDir . '/core/ormdocument.class.inc.php', - 'ormLinkSet' => $baseDir . '/core/ormlinkset.class.inc.php', - 'ormPassword' => $baseDir . '/core/ormpassword.class.inc.php', - 'ormSet' => $baseDir . '/core/ormset.class.inc.php', - 'ormStopWatch' => $baseDir . '/core/ormstopwatch.class.inc.php', - 'ormStyle' => $baseDir . '/core/ormStyle.class.inc.php', - 'ormTagSet' => $baseDir . '/core/ormtagset.class.inc.php', - 'phpCAS' => $vendorDir . '/apereo/phpcas/source/CAS.php', - 'privUITransaction' => $baseDir . '/application/transaction.class.inc.php', - 'privUITransactionFile' => $baseDir . '/application/transaction.class.inc.php', - 'privUITransactionSession' => $baseDir . '/application/transaction.class.inc.php', - 'utils' => $baseDir . '/application/utils.inc.php', -); diff --git a/lib/composer/autoload_files.php b/lib/composer/autoload_files.php deleted file mode 100644 index c561b4630..000000000 --- a/lib/composer/autoload_files.php +++ /dev/null @@ -1,25 +0,0 @@ - $vendorDir . '/symfony/deprecation-contracts/function.php', - 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', - '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', - 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', - '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', - 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', - '6a47392539ca2329373e0d33e1dba053' => $vendorDir . '/symfony/polyfill-intl-icu/bootstrap.php', - 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => $vendorDir . '/laminas/laminas-servicemanager/src/autoload.php', - '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', - '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', - 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', -); diff --git a/lib/composer/autoload_namespaces.php b/lib/composer/autoload_namespaces.php deleted file mode 100644 index 1db5bf646..000000000 --- a/lib/composer/autoload_namespaces.php +++ /dev/null @@ -1,12 +0,0 @@ - array($vendorDir . '/pear/console_getopt'), - 'Archive_Tar' => array($vendorDir . '/pear/archive_tar'), - '' => array($vendorDir . '/pear/pear-core-minimal/src'), -); diff --git a/lib/composer/autoload_psr4.php b/lib/composer/autoload_psr4.php deleted file mode 100644 index 577d0ac10..000000000 --- a/lib/composer/autoload_psr4.php +++ /dev/null @@ -1,77 +0,0 @@ - array($vendorDir . '/webmozart/assert/src'), - 'Twig\\' => array($vendorDir . '/twig/twig/src'), - 'TheNetworg\\OAuth2\\Client\\' => array($vendorDir . '/thenetworg/oauth2-azure/src'), - 'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'), - 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), - 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), - 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), - 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), - 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), - 'Symfony\\Polyfill\\Intl\\Icu\\' => array($vendorDir . '/symfony/polyfill-intl-icu'), - 'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'), - 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), - 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), - 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), - 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'), - 'Symfony\\Contracts\\Cache\\' => array($vendorDir . '/symfony/cache-contracts'), - 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), - 'Symfony\\Component\\VarExporter\\' => array($vendorDir . '/symfony/var-exporter'), - 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), - 'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'), - 'Symfony\\Component\\Stopwatch\\' => array($vendorDir . '/symfony/stopwatch'), - 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), - 'Symfony\\Component\\PropertyInfo\\' => array($vendorDir . '/symfony/property-info'), - 'Symfony\\Component\\PropertyAccess\\' => array($vendorDir . '/symfony/property-access'), - 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'), - 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), - 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), - 'Symfony\\Component\\Form\\' => array($vendorDir . '/symfony/form'), - 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), - 'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'), - 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), - 'Symfony\\Component\\ErrorHandler\\' => array($vendorDir . '/symfony/error-handler'), - 'Symfony\\Component\\Dotenv\\' => array($vendorDir . '/symfony/dotenv'), - 'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'), - 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), - 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), - 'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'), - 'Symfony\\Component\\Cache\\' => array($vendorDir . '/symfony/cache'), - 'Symfony\\Bundle\\WebProfilerBundle\\' => array($vendorDir . '/symfony/web-profiler-bundle'), - 'Symfony\\Bundle\\TwigBundle\\' => array($vendorDir . '/symfony/twig-bundle'), - 'Symfony\\Bundle\\FrameworkBundle\\' => array($vendorDir . '/symfony/framework-bundle'), - 'Symfony\\Bridge\\Twig\\' => array($vendorDir . '/symfony/twig-bridge'), - 'ScssPhp\\ScssPhp\\' => array($vendorDir . '/scssphp/scssphp/src'), - 'Sabberworm\\CSS\\' => array($vendorDir . '/sabberworm/php-css-parser/src'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), - 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), - 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), - 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), - 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), - 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), - 'Pelago\\Emogrifier\\' => array($vendorDir . '/pelago/emogrifier/src'), - 'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-client/src', $vendorDir . '/league/oauth2-google/src'), - 'Laminas\\Validator\\' => array($vendorDir . '/laminas/laminas-validator/src'), - 'Laminas\\Stdlib\\' => array($vendorDir . '/laminas/laminas-stdlib/src'), - 'Laminas\\ServiceManager\\' => array($vendorDir . '/laminas/laminas-servicemanager/src'), - 'Laminas\\Mime\\' => array($vendorDir . '/laminas/laminas-mime/src'), - 'Laminas\\Mail\\' => array($vendorDir . '/laminas/laminas-mail/src'), - 'Laminas\\Loader\\' => array($vendorDir . '/laminas/laminas-loader/src'), - 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), - 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), - 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), - 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'), - 'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'), - 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'), - 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'), -); diff --git a/lib/composer/autoload_real.php b/lib/composer/autoload_real.php deleted file mode 100644 index cc554d8d1..000000000 --- a/lib/composer/autoload_real.php +++ /dev/null @@ -1,70 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::getInitializer($loader)); - } else { - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->setClassMapAuthoritative(true); - $loader->register(true); - - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire7f81b4a2a468a061c306af5e447a9a9f($fileIdentifier, $file); - } - - return $loader; - } -} - -function composerRequire7f81b4a2a468a061c306af5e447a9a9f($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php deleted file mode 100644 index 566579a38..000000000 --- a/lib/composer/autoload_static.php +++ /dev/null @@ -1,3804 +0,0 @@ - __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', - 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', - '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', - 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', - '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', - 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', - '6a47392539ca2329373e0d33e1dba053' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/bootstrap.php', - 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/autoload.php', - '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', - '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', - 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'W' => - array ( - 'Webmozart\\Assert\\' => 17, - ), - 'T' => - array ( - 'Twig\\' => 5, - 'TheNetworg\\OAuth2\\Client\\' => 25, - ), - 'S' => - array ( - 'Symfony\\Polyfill\\Php81\\' => 23, - 'Symfony\\Polyfill\\Php80\\' => 23, - 'Symfony\\Polyfill\\Php73\\' => 23, - 'Symfony\\Polyfill\\Php72\\' => 23, - 'Symfony\\Polyfill\\Mbstring\\' => 26, - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, - 'Symfony\\Polyfill\\Intl\\Idn\\' => 26, - 'Symfony\\Polyfill\\Intl\\Icu\\' => 26, - 'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31, - 'Symfony\\Polyfill\\Ctype\\' => 23, - 'Symfony\\Contracts\\Translation\\' => 30, - 'Symfony\\Contracts\\Service\\' => 26, - 'Symfony\\Contracts\\EventDispatcher\\' => 34, - 'Symfony\\Contracts\\Cache\\' => 24, - 'Symfony\\Component\\Yaml\\' => 23, - 'Symfony\\Component\\VarExporter\\' => 30, - 'Symfony\\Component\\VarDumper\\' => 28, - 'Symfony\\Component\\String\\' => 25, - 'Symfony\\Component\\Stopwatch\\' => 28, - 'Symfony\\Component\\Routing\\' => 26, - 'Symfony\\Component\\PropertyInfo\\' => 31, - 'Symfony\\Component\\PropertyAccess\\' => 33, - 'Symfony\\Component\\OptionsResolver\\' => 34, - 'Symfony\\Component\\HttpKernel\\' => 29, - 'Symfony\\Component\\HttpFoundation\\' => 33, - 'Symfony\\Component\\Form\\' => 23, - 'Symfony\\Component\\Finder\\' => 25, - 'Symfony\\Component\\Filesystem\\' => 29, - 'Symfony\\Component\\EventDispatcher\\' => 34, - 'Symfony\\Component\\ErrorHandler\\' => 31, - 'Symfony\\Component\\Dotenv\\' => 25, - 'Symfony\\Component\\DependencyInjection\\' => 38, - 'Symfony\\Component\\CssSelector\\' => 30, - 'Symfony\\Component\\Console\\' => 26, - 'Symfony\\Component\\Config\\' => 25, - 'Symfony\\Component\\Cache\\' => 24, - 'Symfony\\Bundle\\WebProfilerBundle\\' => 33, - 'Symfony\\Bundle\\TwigBundle\\' => 26, - 'Symfony\\Bundle\\FrameworkBundle\\' => 31, - 'Symfony\\Bridge\\Twig\\' => 20, - 'ScssPhp\\ScssPhp\\' => 16, - 'Sabberworm\\CSS\\' => 15, - ), - 'P' => - array ( - 'Psr\\Log\\' => 8, - 'Psr\\Http\\Message\\' => 17, - 'Psr\\Http\\Client\\' => 16, - 'Psr\\EventDispatcher\\' => 20, - 'Psr\\Container\\' => 14, - 'Psr\\Cache\\' => 10, - 'PhpParser\\' => 10, - 'Pelago\\Emogrifier\\' => 18, - ), - 'L' => - array ( - 'League\\OAuth2\\Client\\' => 21, - 'Laminas\\Validator\\' => 18, - 'Laminas\\Stdlib\\' => 15, - 'Laminas\\ServiceManager\\' => 23, - 'Laminas\\Mime\\' => 13, - 'Laminas\\Mail\\' => 13, - 'Laminas\\Loader\\' => 15, - ), - 'G' => - array ( - 'GuzzleHttp\\Psr7\\' => 16, - 'GuzzleHttp\\Promise\\' => 19, - 'GuzzleHttp\\' => 11, - ), - 'F' => - array ( - 'Firebase\\JWT\\' => 13, - ), - 'D' => - array ( - 'Doctrine\\Deprecations\\' => 22, - 'Doctrine\\Common\\Lexer\\' => 22, - 'Doctrine\\Common\\Cache\\' => 22, - 'Doctrine\\Common\\Annotations\\' => 28, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Webmozart\\Assert\\' => - array ( - 0 => __DIR__ . '/..' . '/webmozart/assert/src', - ), - 'Twig\\' => - array ( - 0 => __DIR__ . '/..' . '/twig/twig/src', - ), - 'TheNetworg\\OAuth2\\Client\\' => - array ( - 0 => __DIR__ . '/..' . '/thenetworg/oauth2-azure/src', - ), - 'Symfony\\Polyfill\\Php81\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php81', - ), - 'Symfony\\Polyfill\\Php80\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', - ), - 'Symfony\\Polyfill\\Php73\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php73', - ), - 'Symfony\\Polyfill\\Php72\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', - ), - 'Symfony\\Polyfill\\Mbstring\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', - ), - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', - ), - 'Symfony\\Polyfill\\Intl\\Idn\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', - ), - 'Symfony\\Polyfill\\Intl\\Icu\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-icu', - ), - 'Symfony\\Polyfill\\Intl\\Grapheme\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme', - ), - 'Symfony\\Polyfill\\Ctype\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', - ), - 'Symfony\\Contracts\\Translation\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/translation-contracts', - ), - 'Symfony\\Contracts\\Service\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/service-contracts', - ), - 'Symfony\\Contracts\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', - ), - 'Symfony\\Contracts\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/cache-contracts', - ), - 'Symfony\\Component\\Yaml\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/yaml', - ), - 'Symfony\\Component\\VarExporter\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/var-exporter', - ), - 'Symfony\\Component\\VarDumper\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/var-dumper', - ), - 'Symfony\\Component\\String\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/string', - ), - 'Symfony\\Component\\Stopwatch\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/stopwatch', - ), - 'Symfony\\Component\\Routing\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/routing', - ), - 'Symfony\\Component\\PropertyInfo\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/property-info', - ), - 'Symfony\\Component\\PropertyAccess\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/property-access', - ), - 'Symfony\\Component\\OptionsResolver\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/options-resolver', - ), - 'Symfony\\Component\\HttpKernel\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-kernel', - ), - 'Symfony\\Component\\HttpFoundation\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-foundation', - ), - 'Symfony\\Component\\Form\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/form', - ), - 'Symfony\\Component\\Finder\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/finder', - ), - 'Symfony\\Component\\Filesystem\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/filesystem', - ), - 'Symfony\\Component\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', - ), - 'Symfony\\Component\\ErrorHandler\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/error-handler', - ), - 'Symfony\\Component\\Dotenv\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/dotenv', - ), - 'Symfony\\Component\\DependencyInjection\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/dependency-injection', - ), - 'Symfony\\Component\\CssSelector\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/css-selector', - ), - 'Symfony\\Component\\Console\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/console', - ), - 'Symfony\\Component\\Config\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/config', - ), - 'Symfony\\Component\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/cache', - ), - 'Symfony\\Bundle\\WebProfilerBundle\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/web-profiler-bundle', - ), - 'Symfony\\Bundle\\TwigBundle\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/twig-bundle', - ), - 'Symfony\\Bundle\\FrameworkBundle\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/framework-bundle', - ), - 'Symfony\\Bridge\\Twig\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/twig-bridge', - ), - 'ScssPhp\\ScssPhp\\' => - array ( - 0 => __DIR__ . '/..' . '/scssphp/scssphp/src', - ), - 'Sabberworm\\CSS\\' => - array ( - 0 => __DIR__ . '/..' . '/sabberworm/php-css-parser/src', - ), - 'Psr\\Log\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', - ), - 'Psr\\Http\\Message\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-factory/src', - 1 => __DIR__ . '/..' . '/psr/http-message/src', - ), - 'Psr\\Http\\Client\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-client/src', - ), - 'Psr\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/event-dispatcher/src', - ), - 'Psr\\Container\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/container/src', - ), - 'Psr\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/cache/src', - ), - 'PhpParser\\' => - array ( - 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', - ), - 'Pelago\\Emogrifier\\' => - array ( - 0 => __DIR__ . '/..' . '/pelago/emogrifier/src', - ), - 'League\\OAuth2\\Client\\' => - array ( - 0 => __DIR__ . '/..' . '/league/oauth2-client/src', - 1 => __DIR__ . '/..' . '/league/oauth2-google/src', - ), - 'Laminas\\Validator\\' => - array ( - 0 => __DIR__ . '/..' . '/laminas/laminas-validator/src', - ), - 'Laminas\\Stdlib\\' => - array ( - 0 => __DIR__ . '/..' . '/laminas/laminas-stdlib/src', - ), - 'Laminas\\ServiceManager\\' => - array ( - 0 => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src', - ), - 'Laminas\\Mime\\' => - array ( - 0 => __DIR__ . '/..' . '/laminas/laminas-mime/src', - ), - 'Laminas\\Mail\\' => - array ( - 0 => __DIR__ . '/..' . '/laminas/laminas-mail/src', - ), - 'Laminas\\Loader\\' => - array ( - 0 => __DIR__ . '/..' . '/laminas/laminas-loader/src', - ), - 'GuzzleHttp\\Psr7\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', - ), - 'GuzzleHttp\\Promise\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', - ), - 'GuzzleHttp\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', - ), - 'Firebase\\JWT\\' => - array ( - 0 => __DIR__ . '/..' . '/firebase/php-jwt/src', - ), - 'Doctrine\\Deprecations\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/deprecations/lib/Doctrine/Deprecations', - ), - 'Doctrine\\Common\\Lexer\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/lexer/src', - ), - 'Doctrine\\Common\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache', - ), - 'Doctrine\\Common\\Annotations\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', - ), - ); - - public static $prefixesPsr0 = array ( - 'C' => - array ( - 'Console' => - array ( - 0 => __DIR__ . '/..' . '/pear/console_getopt', - ), - ), - 'A' => - array ( - 'Archive_Tar' => - array ( - 0 => __DIR__ . '/..' . '/pear/archive_tar', - ), - ), - ); - - public static $fallbackDirsPsr0 = array ( - 0 => __DIR__ . '/..' . '/pear/pear-core-minimal/src', - ); - - public static $classMap = array ( - 'AbstractApplicationObjectExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractPageUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractWeeklyScheduledProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php', - 'Action' => __DIR__ . '/../..' . '/core/action.class.inc.php', - 'ActionChecker' => __DIR__ . '/../..' . '/core/userrights.class.inc.php', - 'ActionEmail' => __DIR__ . '/../..' . '/core/action.class.inc.php', - 'ActionNotification' => __DIR__ . '/../..' . '/core/action.class.inc.php', - 'AjaxPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/AjaxPage.php', - 'ApcService' => __DIR__ . '/../..' . '/core/apc-service.class.inc.php', - 'ApplicationContext' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php', - 'ApplicationException' => __DIR__ . '/../..' . '/application/exceptions/ApplicationException.php', - 'ApplicationMenu' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'ApplicationPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'Archive_Tar' => __DIR__ . '/..' . '/pear/archive_tar/Archive/Tar.php', - 'ArchivedObjectException' => __DIR__ . '/../..' . '/application/exceptions/ArchivedObjectException.php', - 'AsyncSendEmail' => __DIR__ . '/../..' . '/core/asynctask.class.inc.php', - 'AsyncTask' => __DIR__ . '/../..' . '/core/asynctask.class.inc.php', - 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', - 'AttributeApplicationLanguage' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeArchiveDate' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeArchiveFlag' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeBlob' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeBoolean' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeCaseLog' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeClass' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeClassAttCodeSet' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeClassState' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeCustomFields' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDBField' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDBFieldVoid' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDashboard' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDate' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDateTime' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDeadline' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDecimal' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDefinition' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeDuration' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeEmailAddress' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeEncryptedString' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeEnum' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeEnumSet' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeExternalField' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeExternalKey' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeFinalClass' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeFriendlyName' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeHTML' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeHierarchicalKey' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeIPAddress' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeImage' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeInteger' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeLinkedSet' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeLinkedSetIndirect' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeLongText' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeMetaEnum' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeOQL' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeObjectKey' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeObsolescenceDate' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeObsolescenceFlag' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeOneWayPassword' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributePassword' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributePercentage' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributePhoneNumber' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributePropertySet' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeQueryAttCodeSet' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeRedundancySettings' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeSet' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeStopWatch' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeString' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeSubItem' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeTable' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeTagSet' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeTemplateHTML' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeTemplateString' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeTemplateText' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeText' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AttributeURL' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'AuditCategory' => __DIR__ . '/../..' . '/application/audit.category.class.inc.php', - 'AuditDomain' => __DIR__ . '/../..' . '/application/audit.domain.class.inc.php', - 'AuditRule' => __DIR__ . '/../..' . '/application/audit.rule.class.inc.php', - 'BackgroundTask' => __DIR__ . '/../..' . '/core/backgroundtask.class.inc.php', - 'BinaryExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'BinaryOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'BulkChange' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'BulkChangeException' => __DIR__ . '/../..' . '/application/exceptions/BulkChangeException.php', - 'BulkExport' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', - 'BulkExportException' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', - 'BulkExportMissingParameterException' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', - 'BulkExportResult' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', - 'BulkExportResultGC' => __DIR__ . '/../..' . '/core/bulkexport.class.inc.php', - 'CAS_AuthenticationException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/AuthenticationException.php', - 'CAS_Client' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Client.php', - 'CAS_CookieJar' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/CookieJar.php', - 'CAS_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Exception.php', - 'CAS_GracefullTerminationException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/GracefullTerminationException.php', - 'CAS_InvalidArgumentException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/InvalidArgumentException.php', - 'CAS_Languages_Catalan' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Catalan.php', - 'CAS_Languages_ChineseSimplified' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/ChineseSimplified.php', - 'CAS_Languages_English' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/English.php', - 'CAS_Languages_French' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/French.php', - 'CAS_Languages_Galego' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Galego.php', - 'CAS_Languages_German' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/German.php', - 'CAS_Languages_Greek' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Greek.php', - 'CAS_Languages_Japanese' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Japanese.php', - 'CAS_Languages_LanguageInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/LanguageInterface.php', - 'CAS_Languages_Portuguese' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Portuguese.php', - 'CAS_Languages_Spanish' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Languages/Spanish.php', - 'CAS_OutOfSequenceBeforeAuthenticationCallException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeAuthenticationCallException.php', - 'CAS_OutOfSequenceBeforeClientException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeClientException.php', - 'CAS_OutOfSequenceBeforeProxyException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceBeforeProxyException.php', - 'CAS_OutOfSequenceException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/OutOfSequenceException.php', - 'CAS_PGTStorage_AbstractStorage' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/AbstractStorage.php', - 'CAS_PGTStorage_Db' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/Db.php', - 'CAS_PGTStorage_File' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/PGTStorage/File.php', - 'CAS_ProxiedService' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService.php', - 'CAS_ProxiedService_Abstract' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Abstract.php', - 'CAS_ProxiedService_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Exception.php', - 'CAS_ProxiedService_Http' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http.php', - 'CAS_ProxiedService_Http_Abstract' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Abstract.php', - 'CAS_ProxiedService_Http_Get' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Get.php', - 'CAS_ProxiedService_Http_Post' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Http/Post.php', - 'CAS_ProxiedService_Imap' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Imap.php', - 'CAS_ProxiedService_Testable' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxiedService/Testable.php', - 'CAS_ProxyChain' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain.php', - 'CAS_ProxyChain_AllowedList' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/AllowedList.php', - 'CAS_ProxyChain_Any' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Any.php', - 'CAS_ProxyChain_Interface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Interface.php', - 'CAS_ProxyChain_Trusted' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyChain/Trusted.php', - 'CAS_ProxyTicketException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/ProxyTicketException.php', - 'CAS_Request_AbstractRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/AbstractRequest.php', - 'CAS_Request_CurlMultiRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/CurlMultiRequest.php', - 'CAS_Request_CurlRequest' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/CurlRequest.php', - 'CAS_Request_Exception' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/Exception.php', - 'CAS_Request_MultiRequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/MultiRequestInterface.php', - 'CAS_Request_RequestInterface' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Request/RequestInterface.php', - 'CAS_Session_PhpSession' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/Session/PhpSession.php', - 'CAS_TypeMismatchException' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS/TypeMismatchException.php', - 'CLILikeWebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/CLILikeWebPage.php', - 'CLIPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/CLIPage.php', - 'CMDBChange' => __DIR__ . '/../..' . '/core/cmdbchange.class.inc.php', - 'CMDBChangeOp' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpCreate' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpDelete' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpPlugin' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttribute' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeBlob' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeCaseLog' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeCustomFields' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeEncrypted' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeHTML' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLinks' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLinksAddRemove' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLinksTune' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeLongText' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeOneWayPassword' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeScalar' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeTagSet' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeText' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBChangeOpSetAttributeURL' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'CMDBObject' => __DIR__ . '/../..' . '/core/cmdbobject.class.inc.php', - 'CMDBObjectSet' => __DIR__ . '/../..' . '/core/cmdbobject.class.inc.php', - 'CMDBSource' => __DIR__ . '/../..' . '/core/cmdbsource.class.inc.php', - 'CSVBulkExport' => __DIR__ . '/../..' . '/core/csvbulkexport.class.inc.php', - 'CSVPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/CSVPage.php', - 'CSVParser' => __DIR__ . '/../..' . '/core/csvparser.class.inc.php', - 'CSVParserException' => __DIR__ . '/../..' . '/application/exceptions/CSVParserException.php', - 'CaptureWebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/CaptureWebPage.php', - 'CellChangeSpec' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'CellStatus_Ambiguous' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'CellStatus_Issue' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'CellStatus_Modify' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'CellStatus_NullIssue' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'CellStatus_SearchIssue' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'CellStatus_Void' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'CharConcatExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'CharConcatWSExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'CheckStopWatchThresholds' => __DIR__ . '/../..' . '/core/ormstopwatch.class.inc.php', - 'CheckableExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php', - 'Combodo\\iTop\\Application\\Branding' => __DIR__ . '/../..' . '/sources/Application/Branding.php', - 'Combodo\\iTop\\Application\\EventRegister\\ApplicationEvents' => __DIR__ . '/../..' . '/sources/Application/EventRegister/ApplicationEvents.php', - 'Combodo\\iTop\\Application\\Helper\\FormHelper' => __DIR__ . '/../..' . '/sources/Application/Helper/FormHelper.php', - 'Combodo\\iTop\\Application\\Helper\\Session' => __DIR__ . '/../..' . '/sources/Application/Helper/Session.php', - 'Combodo\\iTop\\Application\\Helper\\WebResourcesHelper' => __DIR__ . '/../..' . '/sources/Application/Helper/WebResourcesHelper.php', - 'Combodo\\iTop\\Application\\Search\\AjaxSearchException' => __DIR__ . '/../..' . '/sources/Application/Search/ajaxsearchexception.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionConversionAbstract' => __DIR__ . '/../..' . '/sources/Application/Search/criterionconversionabstract.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionConversion\\CriterionToOQL' => __DIR__ . '/../..' . '/sources/Application/Search/CriterionConversion/criteriontooql.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionConversion\\CriterionToSearchForm' => __DIR__ . '/../..' . '/sources/Application/Search/CriterionConversion/criteriontosearchform.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\CriterionParser' => __DIR__ . '/../..' . '/sources/Application/Search/criterionparser.class.inc.php', - 'Combodo\\iTop\\Application\\Search\\SearchForm' => __DIR__ . '/../..' . '/sources/Application/Search/searchform.class.inc.php', - 'Combodo\\iTop\\Application\\Status\\Status' => __DIR__ . '/../..' . '/sources/Application/Status/Status.php', - 'Combodo\\iTop\\Application\\TwigBase\\Controller\\Controller' => __DIR__ . '/../..' . '/sources/Application/TwigBase/Controller/Controller.php', - 'Combodo\\iTop\\Application\\TwigBase\\Controller\\PageNotFoundException' => __DIR__ . '/../..' . '/application/exceptions/PageNotFoundException.php', - 'Combodo\\iTop\\Application\\TwigBase\\Twig\\Extension' => __DIR__ . '/../..' . '/sources/Application/TwigBase/Twig/Extension.php', - 'Combodo\\iTop\\Application\\TwigBase\\Twig\\TwigHelper' => __DIR__ . '/../..' . '/sources/Application/TwigBase/Twig/TwigHelper.php', - 'Combodo\\iTop\\Application\\TwigBase\\UI\\UIBlockExtension' => __DIR__ . '/../..' . '/sources/Application/TwigBase/UI/UIBlockExtension.php', - 'Combodo\\iTop\\Application\\TwigBase\\UI\\UIBlockNode' => __DIR__ . '/../..' . '/sources/Application/TwigBase/UI/UIBlockNode.php', - 'Combodo\\iTop\\Application\\TwigBase\\UI\\UIBlockParser' => __DIR__ . '/../..' . '/sources/Application/TwigBase/UI/UIBlockParser.php', - 'Combodo\\iTop\\Application\\UI\\Base\\AbstractUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/AbstractUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Alert\\Alert' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Alert/Alert.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Alert\\AlertUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Alert/AlertUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Breadcrumbs\\Breadcrumbs' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Breadcrumbs/Breadcrumbs.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\ButtonGroup\\ButtonGroup' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/ButtonGroup/ButtonGroup.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\ButtonGroup\\ButtonGroupUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/ButtonGroup/ButtonGroupUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\Button' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Button/Button.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\ButtonJS' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Button/ButtonJS.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\ButtonUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Button/ButtonUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Button\\ButtonURL' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Button/ButtonURL.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\CollapsibleSection\\CollapsibleSection' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/CollapsibleSection/CollapsibleSection.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\CollapsibleSection\\CollapsibleSectionUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/CollapsibleSection/CollapsibleSectionUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletBadge' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletBadge.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletContainer' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletContainer.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletHeaderStatic' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletHeaderStatic.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletPlainText' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletPlainText.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTable' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/DataTable.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableSettings' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/DataTableSettings.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/DataTableUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\StaticTable\\FormTableRow\\FormTableRow' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/StaticTable/FormTableRow/FormTableRow.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\StaticTable\\FormTable\\FormTable' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/StaticTable/FormTable/FormTable.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\StaticTable\\StaticTable' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/StaticTable/StaticTable.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\tTableRowActions' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/tTableRowActions.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldBadge\\FieldBadge' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/FieldBadge/FieldBadge.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldBadge\\FieldBadgeUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/FieldBadge/FieldBadgeUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldSet\\FieldSet' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/FieldSet/FieldSet.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\FieldSet\\FieldSetUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/FieldSet/FieldSetUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Field\\Field' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Field/Field.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Field\\FieldUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Field/FieldUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Form\\Form' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Form/Form.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Form\\FormUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Form/FormUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\GlobalSearch\\GlobalSearch' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/GlobalSearch/GlobalSearch.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\GlobalSearch\\GlobalSearchFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/GlobalSearch/GlobalSearchFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\GlobalSearch\\GlobalSearchHelper' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/GlobalSearch/GlobalSearchHelper.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Html\\Html' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Html/Html.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Html\\HtmlFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Html/HtmlFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\AbstractInput' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/AbstractInput.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\FileSelect\\FileSelect' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/FileSelect/FileSelect.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\FileSelect\\FileSelectUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/FileSelect/FileSelectUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Input' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Input.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\InputUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/InputUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\InputWithLabel' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/InputWithLabel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\RichText\\RichText' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/RichText/RichText.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\SelectUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Select/SelectUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Select\\Select' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Select/Select.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Select\\SelectOption' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Select/SelectOption.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Select\\SelectOptionUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Select/SelectOptionUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\AbstractDataProvider' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/AbstractDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\AjaxDataProvider' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/AjaxDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\AjaxDataProviderForOQL' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/AjaxDataProviderForOql.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\SimpleDataProvider' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/SimpleDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\DataProvider\\iDataProvider' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Set/DataProvider/iDataProvider.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\Set' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Set/Set.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\Set\\SetUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/Set/SetUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\TextArea' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/TextArea.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Input\\tInputLabel' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Input/tInputLabel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\MedallionIcon\\MedallionIcon' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/MedallionIcon/MedallionIcon.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Modal\\DoNotShowAgainOptionBlock' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Modal/DoNotShowAgainOptionBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Panel\\Panel' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Panel/Panel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Panel\\PanelUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Panel/PanelUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Pill\\Pill' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Pill/Pill.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Pill\\PillFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Pill/PillFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenu' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenu.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\NewsroomMenu\\NewsroomMenuFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/NewsroomMenu/NewsroomMenuFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenu' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenu.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\JsPopoverMenuItem' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/JsPopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\PopoverMenuItem' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\PopoverMenuItemFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItemFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\SeparatorPopoverMenuItem' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/SeparatorPopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\PopoverMenu\\PopoverMenuItem\\UrlPopoverMenuItem' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/PopoverMenu/PopoverMenuItem/UrlPopoverMenuItem.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\QuickCreate\\QuickCreate' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/QuickCreate/QuickCreate.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\QuickCreate\\QuickCreateFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/QuickCreate/QuickCreateFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\QuickCreate\\QuickCreateHelper' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/QuickCreate/QuickCreateHelper.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Spinner\\Spinner' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Spinner/Spinner.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Spinner\\SpinnerUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Spinner/SpinnerUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Template\\Template' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Template/Template.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Template\\TemplateUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Template/TemplateUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Text\\Text' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Text/Text.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Title\\Title' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Title/Title.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Title\\TitleUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Title/TitleUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Separator\\AbstractSeparator' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/Separator/AbstractSeparator.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Separator\\ToolbarSeparatorUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/Separator/ToolbarSeparatorUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Separator\\VerticalSeparator' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/Separator/VerticalSeparator.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\Toolbar' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/Toolbar.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacer' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacerUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacerUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntryFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntryFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentAddedFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentAddedFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentRemovedFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentRemovedFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpCreateFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpCreateFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpDeleteFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpDeleteFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpSetAttributeFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpSetAttributeFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpSetAttributeScalarFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpSetAttributeScalarFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CaseLogEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CaseLogEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\EditsEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/EditsEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\EventNotification\\EventNotificationEmailFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/EventNotification/EventNotificationEmailFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\EventNotification\\EventNotificationFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/EventNotification/EventNotificationFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\NotificationEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/NotificationEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\TransitionEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/TransitionEntry.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanel' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanel.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanelFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanelFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanelHelper' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanelHelper.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityPanelPrint' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanelPrint.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryFormFactory\\CaseLogEntryFormFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryFormFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryForm\\CaseLogEntryForm' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardColumn' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardColumn.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardLayout' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardLayout.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardRow' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardRow.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\Column' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/MultiColumn/Column/Column.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\ColumnUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/MultiColumn/Column/ColumnUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\MultiColumn' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/MultiColumn/MultiColumn.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\MultiColumnUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/MultiColumn/MultiColumnUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\NavigationMenu\\NavigationMenu' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/NavigationMenu/NavigationMenu.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\NavigationMenu\\NavigationMenuFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/NavigationMenu/NavigationMenuFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Object\\ObjectDetails' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Object/ObjectDetails.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Object\\ObjectFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Object/ObjectFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Object\\ObjectSummary' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Object/ObjectSummary.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\PageContent\\PageContent' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/PageContent/PageContent.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\PageContent\\PageContentFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/PageContent/PageContentFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\PageContent\\PageContentWithSideContent' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/PageContent/PageContentWithSideContent.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TabContainer\\TabContainer' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/TabContainer/TabContainer.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TabContainer\\Tab\\AjaxTab' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/TabContainer/Tab/AjaxTab.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TabContainer\\Tab\\Tab' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/TabContainer/Tab/Tab.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TopBar\\TopBar' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/TopBar/TopBar.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\TopBar\\TopBarFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/TopBar/TopBarFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\UIContentBlock' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/UIContentBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\UIContentBlockUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/UIContentBlockUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\UIContentBlockWithJSRefreshCallback' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/UIContentBlockWithJSRefreshCallback .php', - 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\iUIContentBlock' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/iUIContentBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\UIBlock' => __DIR__ . '/../..' . '/sources/Application/UI/Base/UIBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\UIException' => __DIR__ . '/../..' . '/sources/Application/UI/Base/UIException.php', - 'Combodo\\iTop\\Application\\UI\\Base\\iUIBlock' => __DIR__ . '/../..' . '/sources/Application/UI/Base/iUIBlock.php', - 'Combodo\\iTop\\Application\\UI\\Base\\iUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/iUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\tJSRefreshCallback' => __DIR__ . '/../..' . '/sources/Application/UI/Base/tJSRefreshCallback.php', - 'Combodo\\iTop\\Application\\UI\\Base\\tUIContentAreas' => __DIR__ . '/../..' . '/sources/Application/UI/Base/tUIContentAreas.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockChartAjaxBars\\BlockChartAjaxBars' => __DIR__ . '/../..' . '/sources/Application/UI/DisplayBlock/BlockChartAjaxBars/BlockChartAjaxBars.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockChartAjaxPie\\BlockChartAjaxPie' => __DIR__ . '/../..' . '/sources/Application/UI/DisplayBlock/BlockChartAjaxPie/BlockChartAjaxPie.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockChart\\BlockChart' => __DIR__ . '/../..' . '/sources/Application/UI/DisplayBlock/BlockChart/BlockChart.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockCsv\\BlockCsv' => __DIR__ . '/../..' . '/sources/Application/UI/DisplayBlock/BlockCsv/BlockCsv.php', - 'Combodo\\iTop\\Application\\UI\\DisplayBlock\\BlockList\\BlockList' => __DIR__ . '/../..' . '/sources/Application/UI/DisplayBlock/BlockList/BlockList.php', - 'Combodo\\iTop\\Application\\UI\\Helper\\UIHelper' => __DIR__ . '/../..' . '/sources/Application/UI/Helper/UIHelper.php', - 'Combodo\\iTop\\Application\\UI\\Links\\AbstractBlockLinkSetViewTable' => __DIR__ . '/../..' . '/sources/Application/UI/Links/AbstractBlockLinkSetViewTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Direct\\BlockDirectLinkSetEditTable' => __DIR__ . '/../..' . '/sources/Application/UI/Links/Direct/BlockDirectLinkSetEditTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Direct\\BlockDirectLinkSetViewTable' => __DIR__ . '/../..' . '/sources/Application/UI/Links/Direct/BlockDirectLinkSetViewTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Indirect\\BlockIndirectLinkSetEditTable' => __DIR__ . '/../..' . '/sources/Application/UI/Links/Indirect/BlockIndirectLinkSetEditTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Indirect\\BlockIndirectLinkSetViewTable' => __DIR__ . '/../..' . '/sources/Application/UI/Links/Indirect/BlockIndirectLinkSetViewTable.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Indirect\\BlockObjectPickerDialog' => __DIR__ . '/../..' . '/sources/Application/UI/Links/Indirect/BlockObjectPickerDialog.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Set\\BlockLinkSetDisplayAsProperty' => __DIR__ . '/../..' . '/sources/Application/UI/Links/Set/BlockLinksSetDisplayAsProperty.php', - 'Combodo\\iTop\\Application\\UI\\Links\\Set\\LinkSetUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Links/Set/LinksSetUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Preferences\\BlockShortcuts\\BlockShortcuts' => __DIR__ . '/../..' . '/sources/Application/UI/Preferences/BlockShortcuts/BlockShortcuts.php', - 'Combodo\\iTop\\Application\\UI\\Printable\\BlockPrintHeader\\BlockPrintHeader' => __DIR__ . '/../..' . '/sources/Application/UI/Printable/BlockPrintHeader/BlockPrintHeader.php', - 'Combodo\\iTop\\Composer\\iTopComposer' => __DIR__ . '/../..' . '/sources/Composer/iTopComposer.php', - 'Combodo\\iTop\\Controller\\AbstractController' => __DIR__ . '/../..' . '/sources/Controller/AbstractController.php', - 'Combodo\\iTop\\Controller\\AjaxRenderController' => __DIR__ . '/../..' . '/sources/Controller/AjaxRenderController.php', - 'Combodo\\iTop\\Controller\\Base\\Layout\\ActivityPanelController' => __DIR__ . '/../..' . '/sources/Controller/Base/Layout/ActivityPanelController.php', - 'Combodo\\iTop\\Controller\\Base\\Layout\\ObjectController' => __DIR__ . '/../..' . '/sources/Controller/Base/Layout/ObjectController.php', - 'Combodo\\iTop\\Controller\\Links\\LinkSetController' => __DIR__ . '/../..' . '/sources/Controller/Links/LinkSetController.php', - 'Combodo\\iTop\\Controller\\OAuth\\OAuthLandingController' => __DIR__ . '/../..' . '/sources/Controller/OAuth/OAuthLandingController.php', - 'Combodo\\iTop\\Controller\\PreferencesController' => __DIR__ . '/../..' . '/sources/Controller/PreferencesController.php', - 'Combodo\\iTop\\Controller\\TemporaryObjects\\TemporaryObjectController' => __DIR__ . '/../..' . '/sources/Controller/TemporaryObjects/TemporaryObjectController.php', - 'Combodo\\iTop\\Controller\\iController' => __DIR__ . '/../..' . '/sources/Controller/iController.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\IOAuthClientProvider' => __DIR__ . '/../..' . '/sources/Core/Authentication/Client/OAuth/IOAuthClientProvider.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderAbstract' => __DIR__ . '/../..' . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderAzure' => __DIR__ . '/../..' . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAzure.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderFactory' => __DIR__ . '/../..' . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php', - 'Combodo\\iTop\\Core\\Authentication\\Client\\OAuth\\OAuthClientProviderGoogle' => __DIR__ . '/../..' . '/sources/Core/Authentication/Client/OAuth/OAuthClientProviderGoogle.php', - 'Combodo\\iTop\\Core\\CMDBChange\\CMDBChangeOrigin' => __DIR__ . '/../..' . '/sources/Core/CMDBChange/CMDBChangeOrigin.php', - 'Combodo\\iTop\\Core\\DbConnectionWrapper' => __DIR__ . '/../..' . '/core/DbConnectionWrapper.php', - 'Combodo\\iTop\\Core\\Email\\EmailFactory' => __DIR__ . '/../..' . '/sources/Core/Email/EmailFactory.php', - 'Combodo\\iTop\\Core\\Email\\iEMail' => __DIR__ . '/../..' . '/sources/Core/Email/iEMail.php', - 'Combodo\\iTop\\Core\\EventListener\\AttributeBlobEventListener' => __DIR__ . '/../..' . '/sources/Core/EventListener/AttributeBlobEventListener.php', - 'Combodo\\iTop\\Core\\Kpi\\KpiLogData' => __DIR__ . '/../..' . '/sources/Core/Kpi/KpiLogData.php', - 'Combodo\\iTop\\Core\\MetaModel\\FriendlyNameType' => __DIR__ . '/../..' . '/sources/Core/MetaModel/FriendlyNameType.php', - 'Combodo\\iTop\\Core\\MetaModel\\HierarchicalKey' => __DIR__ . '/../..' . '/sources/Core/MetaModel/HierarchicalKey.php', - 'Combodo\\iTop\\DI\\Controller\\Controller' => __DIR__ . '/../..' . '/sources/DI/Controller/Controller.php', - 'Combodo\\iTop\\DI\\Form\\Listener\\IFormTypeOptionModifier' => __DIR__ . '/../..' . '/sources/DI/Form/Listener/IFormTypeOptionModifier.php', - 'Combodo\\iTop\\DI\\Form\\Listener\\ObjectFormListener' => __DIR__ . '/../..' . '/sources/DI/Form/Listener/ObjectFormListener.php', - 'Combodo\\iTop\\DI\\Form\\Type\\ConfigurationType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/ConfigurationType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\AbstractContainerType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/Layout/AbstractContainerType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\ColumnType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/Layout/ColumnType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\FieldSetType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/Layout/FieldSetType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Layout\\RowType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/Layout/RowType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\ObjectSingleAttributeType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/ObjectSingleAttributeType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\ObjectType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/ObjectType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Simple\\DocumentType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/Simple/DocumentType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Simple\\ExternalKeyType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/Simple/ExternalKeyType.php', - 'Combodo\\iTop\\DI\\Form\\Type\\Simple\\LinkSetType' => __DIR__ . '/../..' . '/sources/DI/Form/Type/Simple/LinkSetType.php', - 'Combodo\\iTop\\DI\\ITopKernel' => __DIR__ . '/../..' . '/sources/DI/ITopKernel.php', - 'Combodo\\iTop\\DI\\Services\\ObjectPresentationService' => __DIR__ . '/../..' . '/sources/DI/Services/ObjectPresentationService.php', - 'Combodo\\iTop\\DI\\Services\\ObjectService' => __DIR__ . '/../..' . '/sources/DI/Services/ObjectService.php', - 'Combodo\\iTop\\DI\\Services\\TwigHelper' => __DIR__ . '/../..' . '/sources/DI/Services/TwigHelper.php', - 'Combodo\\iTop\\DesignDocument' => __DIR__ . '/../..' . '/core/designdocument.class.inc.php', - 'Combodo\\iTop\\DesignElement' => __DIR__ . '/../..' . '/core/designdocument.class.inc.php', - 'Combodo\\iTop\\Form\\Field\\AbstractSimpleField' => __DIR__ . '/../..' . '/sources/Form/Field/AbstractSimpleField.php', - 'Combodo\\iTop\\Form\\Field\\BlobField' => __DIR__ . '/../..' . '/sources/Form/Field/BlobField.php', - 'Combodo\\iTop\\Form\\Field\\CaseLogField' => __DIR__ . '/../..' . '/sources/Form/Field/CaseLogField.php', - 'Combodo\\iTop\\Form\\Field\\CheckboxField' => __DIR__ . '/../..' . '/sources/Form/Field/CheckboxField.php', - 'Combodo\\iTop\\Form\\Field\\DateField' => __DIR__ . '/../..' . '/sources/Form/Field/DateField.php', - 'Combodo\\iTop\\Form\\Field\\DateTimeField' => __DIR__ . '/../..' . '/sources/Form/Field/DateTimeField.php', - 'Combodo\\iTop\\Form\\Field\\DurationField' => __DIR__ . '/../..' . '/sources/Form/Field/DurationField.php', - 'Combodo\\iTop\\Form\\Field\\EmailField' => __DIR__ . '/../..' . '/sources/Form/Field/EmailField.php', - 'Combodo\\iTop\\Form\\Field\\Field' => __DIR__ . '/../..' . '/sources/Form/Field/Field.php', - 'Combodo\\iTop\\Form\\Field\\FileUploadField' => __DIR__ . '/../..' . '/sources/Form/Field/FileUploadField.php', - 'Combodo\\iTop\\Form\\Field\\HiddenField' => __DIR__ . '/../..' . '/sources/Form/Field/HiddenField.php', - 'Combodo\\iTop\\Form\\Field\\ImageField' => __DIR__ . '/../..' . '/sources/Form/Field/ImageField.php', - 'Combodo\\iTop\\Form\\Field\\LabelField' => __DIR__ . '/../..' . '/sources/Form/Field/LabelField.php', - 'Combodo\\iTop\\Form\\Field\\LinkedSetField' => __DIR__ . '/../..' . '/sources/Form/Field/LinkedSetField.php', - 'Combodo\\iTop\\Form\\Field\\MultipleChoicesField' => __DIR__ . '/../..' . '/sources/Form/Field/MultipleChoicesField.php', - 'Combodo\\iTop\\Form\\Field\\MultipleSelectField' => __DIR__ . '/../..' . '/sources/Form/Field/MultipleSelectField.php', - 'Combodo\\iTop\\Form\\Field\\PasswordField' => __DIR__ . '/../..' . '/sources/Form/Field/PasswordField.php', - 'Combodo\\iTop\\Form\\Field\\PhoneField' => __DIR__ . '/../..' . '/sources/Form/Field/PhoneField.php', - 'Combodo\\iTop\\Form\\Field\\RadioField' => __DIR__ . '/../..' . '/sources/Form/Field/RadioField.php', - 'Combodo\\iTop\\Form\\Field\\SelectField' => __DIR__ . '/../..' . '/sources/Form/Field/SelectField.php', - 'Combodo\\iTop\\Form\\Field\\SelectObjectField' => __DIR__ . '/../..' . '/sources/Form/Field/SelectObjectField.php', - 'Combodo\\iTop\\Form\\Field\\SetField' => __DIR__ . '/../..' . '/sources/Form/Field/SetField.php', - 'Combodo\\iTop\\Form\\Field\\StringField' => __DIR__ . '/../..' . '/sources/Form/Field/StringField.php', - 'Combodo\\iTop\\Form\\Field\\SubFormField' => __DIR__ . '/../..' . '/sources/Form/Field/SubFormField.php', - 'Combodo\\iTop\\Form\\Field\\TagSetField' => __DIR__ . '/../..' . '/sources/Form/Field/TagSetField.php', - 'Combodo\\iTop\\Form\\Field\\TextAreaField' => __DIR__ . '/../..' . '/sources/Form/Field/TextAreaField.php', - 'Combodo\\iTop\\Form\\Field\\TextField' => __DIR__ . '/../..' . '/sources/Form/Field/TextField.php', - 'Combodo\\iTop\\Form\\Field\\UrlField' => __DIR__ . '/../..' . '/sources/Form/Field/UrlField.php', - 'Combodo\\iTop\\Form\\Form' => __DIR__ . '/../..' . '/sources/Form/Form.php', - 'Combodo\\iTop\\Form\\FormManager' => __DIR__ . '/../..' . '/sources/Form/FormManager.php', - 'Combodo\\iTop\\Form\\Helper\\FieldHelper' => __DIR__ . '/../..' . '/sources/Form/Helper/FieldHelper.php', - 'Combodo\\iTop\\Form\\Validator\\AbstractRegexpValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/AbstractRegexpValidator.php', - 'Combodo\\iTop\\Form\\Validator\\AbstractValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/AbstractValidator.php', - 'Combodo\\iTop\\Form\\Validator\\CustomRegexpValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/CustomRegexpValidator.php', - 'Combodo\\iTop\\Form\\Validator\\IntegerValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/IntegerValidator.php', - 'Combodo\\iTop\\Form\\Validator\\LinkedSetValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/LinkedSetValidator.php', - 'Combodo\\iTop\\Form\\Validator\\MandatoryValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/MandatoryValidator.php', - 'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/MultipleChoicesValidator.php', - 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', - 'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/SelectObjectValidator.php', - 'Combodo\\iTop\\Form\\Validator\\Validator' => __DIR__ . '/../..' . '/sources/Form/Validator/Validator.php', - 'Combodo\\iTop\\Renderer\\BlockRenderer' => __DIR__ . '/../..' . '/sources/Renderer/BlockRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFormRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/BsFormRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/FieldRenderer/BsFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsFileUploadFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/FieldRenderer/BsFileUploadFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsLinkedSetFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSelectObjectFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/FieldRenderer/BsSelectObjectFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSetFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/FieldRenderer/BsSetFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSimpleFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Bootstrap\\FieldRenderer\\BsSubFormFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/FieldRenderer/BsSubFormFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\ConsoleBlockRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Console/ConsoleBlockRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\ConsoleFieldRendererMappings' => __DIR__ . '/../..' . '/sources/Renderer/Console/ConsoleFieldRendererMappings.php', - 'Combodo\\iTop\\Renderer\\Console\\ConsoleFormRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Console/ConsoleFormRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\FieldRenderer\\ConsoleSelectObjectFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Console/FieldRenderer/ConsoleSelectObjectFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\FieldRenderer\\ConsoleSimpleFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Console/FieldRenderer/ConsoleSimpleFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\Console\\FieldRenderer\\ConsoleSubFormFieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Console/FieldRenderer/ConsoleSubFormFieldRenderer.php', - 'Combodo\\iTop\\Renderer\\FieldRenderer' => __DIR__ . '/../..' . '/sources/Renderer/FieldRenderer.php', - 'Combodo\\iTop\\Renderer\\FormRenderer' => __DIR__ . '/../..' . '/sources/Renderer/FormRenderer.php', - 'Combodo\\iTop\\Renderer\\RenderingOutput' => __DIR__ . '/../..' . '/sources/Renderer/RenderingOutput.php', - 'Combodo\\iTop\\Service\\Base\\ObjectRepository' => __DIR__ . '/../..' . '/sources/Service/Base/ObjectRepository.php', - 'Combodo\\iTop\\Service\\Base\\iDataPostProcessor' => __DIR__ . '/../..' . '/sources/Service/Base/iDataPostProcessor.php', - 'Combodo\\iTop\\Service\\Events\\Description\\EventDataDescription' => __DIR__ . '/../..' . '/sources/Service/Events/Description/EventDataDescription.php', - 'Combodo\\iTop\\Service\\Events\\Description\\EventDescription' => __DIR__ . '/../..' . '/sources/Service/Events/Description/EventDescription.php', - 'Combodo\\iTop\\Service\\Events\\EventData' => __DIR__ . '/../..' . '/sources/Service/Events/EventData.php', - 'Combodo\\iTop\\Service\\Events\\EventException' => __DIR__ . '/../..' . '/sources/Service/Events/EventException.php', - 'Combodo\\iTop\\Service\\Events\\EventHelper' => __DIR__ . '/../..' . '/sources/Service/Events/EventHelper.php', - 'Combodo\\iTop\\Service\\Events\\EventService' => __DIR__ . '/../..' . '/sources/Service/Events/EventService.php', - 'Combodo\\iTop\\Service\\Events\\EventServiceLog' => __DIR__ . '/../..' . '/sources/Service/Events/EventServiceLog.php', - 'Combodo\\iTop\\Service\\Events\\iEventServiceSetup' => __DIR__ . '/../..' . '/sources/Service/Events/iEventServiceSetup.php', - 'Combodo\\iTop\\Service\\Links\\LinkSetDataTransformer' => __DIR__ . '/../..' . '/sources/Service/Links/LinkSetDataTransformer.php', - 'Combodo\\iTop\\Service\\Links\\LinkSetModel' => __DIR__ . '/../..' . '/sources/Service/Links/LinkSetModel.php', - 'Combodo\\iTop\\Service\\Links\\LinkSetRepository' => __DIR__ . '/../..' . '/sources/Service/Links/LinkSetRepository.php', - 'Combodo\\iTop\\Service\\Links\\LinksBulkDataPostProcessor' => __DIR__ . '/../..' . '/sources/Service/Links/LinksBulkDataPostProcessor.php', - 'Combodo\\iTop\\Service\\Module\\ModuleService' => __DIR__ . '/../..' . '/sources/Service/Module/ModuleService.php', - 'Combodo\\iTop\\Service\\Router\\Exception\\RouteNotFoundException' => __DIR__ . '/../..' . '/sources/Service/Router/Exception/RouteNotFoundException.php', - 'Combodo\\iTop\\Service\\Router\\Exception\\RouterException' => __DIR__ . '/../..' . '/sources/Service/Router/Exception/RouterException.php', - 'Combodo\\iTop\\Service\\Router\\Router' => __DIR__ . '/../..' . '/sources/Service/Router/Router.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectConfig' => __DIR__ . '/../..' . '/sources/Service/TemporaryObjects/TemporaryObjectConfig.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectGC' => __DIR__ . '/../..' . '/sources/Service/TemporaryObjects/TemporaryObjectGC.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectHelper' => __DIR__ . '/../..' . '/sources/Service/TemporaryObjects/TemporaryObjectHelper.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectManager' => __DIR__ . '/../..' . '/sources/Service/TemporaryObjects/TemporaryObjectManager.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectRepository' => __DIR__ . '/../..' . '/sources/Service/TemporaryObjects/TemporaryObjectRepository.php', - 'Combodo\\iTop\\Service\\TemporaryObjects\\TemporaryObjectsEvents' => __DIR__ . '/../..' . '/sources/Service/TemporaryObjects/TemporaryObjectsEvents.php', - 'CompileCSSService' => __DIR__ . '/../..' . '/application/compilecssservice.class.inc.php', - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'Config' => __DIR__ . '/../..' . '/core/config.class.inc.php', - 'ConfigException' => __DIR__ . '/../..' . '/application/exceptions/ConfigException.php', - 'ConfigPlaceholdersResolver' => __DIR__ . '/../..' . '/core/config.class.inc.php', - 'Console_Getopt' => __DIR__ . '/..' . '/pear/console_getopt/Console/Getopt.php', - 'ContextTag' => __DIR__ . '/../..' . '/core/contexttag.class.inc.php', - 'CoreCannotSaveObjectException' => __DIR__ . '/../..' . '/application/exceptions/CoreCannotSaveObjectException.php', - 'CoreException' => __DIR__ . '/../..' . '/application/exceptions/CoreException.php', - 'CoreOqlException' => __DIR__ . '/../..' . '/application/exceptions/oql/CoreOqlException.php', - 'CoreOqlMultipleResultsForbiddenException' => __DIR__ . '/../..' . '/application/exceptions/oql/CoreOqlMultipleResultsForbiddenException.php', - 'CorePortalInvalidActionRuleException' => __DIR__ . '/../..' . '/application/exceptions/CorePortalInvalidActionRuleException.php', - 'CoreServices' => __DIR__ . '/../..' . '/core/restservices.class.inc.php', - 'CoreTemplateException' => __DIR__ . '/../..' . '/application/exceptions/CoreTemplateException.php', - 'CoreUnexpectedValue' => __DIR__ . '/../..' . '/application/exceptions/CoreUnexpectedValue.php', - 'CoreWarning' => __DIR__ . '/../..' . '/application/exceptions/CoreWarning.php', - 'CryptEngine' => __DIR__ . '/../..' . '/core/simplecrypt.class.inc.php', - 'CustomFieldsHandler' => __DIR__ . '/../..' . '/core/customfieldshandler.class.inc.php', - 'DBObject' => __DIR__ . '/../..' . '/core/dbobject.class.php', - 'DBObjectSearch' => __DIR__ . '/../..' . '/core/dbobjectsearch.class.php', - 'DBObjectSet' => __DIR__ . '/../..' . '/core/dbobjectset.class.php', - 'DBObjectSetComparator' => __DIR__ . '/../..' . '/core/dbobjectset.class.php', - 'DBProperty' => __DIR__ . '/../..' . '/core/dbproperty.class.inc.php', - 'DBSearch' => __DIR__ . '/../..' . '/core/dbsearch.class.php', - 'DBSearchHelper' => __DIR__ . '/../..' . '/application/DBSearchHelper.php', - 'DBUnionSearch' => __DIR__ . '/../..' . '/core/dbunionsearch.class.php', - 'DOMSanitizer' => __DIR__ . '/../..' . '/core/htmlsanitizer.class.inc.php', - 'DailyRotatingLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'Dashboard' => __DIR__ . '/../..' . '/application/dashboard.class.inc.php', - 'DashboardLayout' => __DIR__ . '/../..' . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutMultiCol' => __DIR__ . '/../..' . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutOneCol' => __DIR__ . '/../..' . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutThreeCols' => __DIR__ . '/../..' . '/application/dashboardlayout.class.inc.php', - 'DashboardLayoutTwoCols' => __DIR__ . '/../..' . '/application/dashboardlayout.class.inc.php', - 'DashboardMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'Dashlet' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletBadge' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletEmptyCell' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletGroupBy' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletGroupByBars' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletGroupByPie' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletGroupByTable' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletHeaderDynamic' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletHeaderStatic' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletObjectList' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletPlainText' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletProxy' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DashletUnknown' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DataTable' => __DIR__ . '/../..' . '/application/datatable.class.inc.php', - 'DataTableConfig' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/DataTableConfig/DataTableConfig.php', - 'Datamatrix' => __DIR__ . '/..' . '/combodo/tcpdf/include/barcodes/datamatrix.php', - 'DateTimeFormat' => __DIR__ . '/../..' . '/core/datetimeformat.class.inc.php', - 'DeadLockLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'DefaultLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'DefaultMetricComputer' => __DIR__ . '/../..' . '/core/computing.inc.php', - 'DefaultWorkingTimeComputer' => __DIR__ . '/../..' . '/core/computing.inc.php', - 'DeleteException' => __DIR__ . '/../..' . '/application/exceptions/DeleteException.php', - 'DeletionPlan' => __DIR__ . '/../..' . '/core/deletionplan.class.inc.php', - 'DeprecatedCallsLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'DesignerBooleanField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerComboField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerForm' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerFormField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerFormSelectorField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerHiddenField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerIconSelectionField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerIntegerField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerLabelField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerLongTextField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerSortableField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerStaticTextField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerSubFormField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerTabularForm' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerTextField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'DesignerXMLField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'Dict' => __DIR__ . '/../..' . '/core/dict.class.inc.php', - 'DictException' => __DIR__ . '/../..' . '/application/exceptions/dict/DictException.php', - 'DictExceptionMissingString' => __DIR__ . '/../..' . '/application/exceptions/dict/DictExceptionMissingString.php', - 'DictExceptionUnknownLanguage' => __DIR__ . '/../..' . '/application/exceptions/dict/DictExceptionUnknownLanguage.php', - 'DisplayBlock' => __DIR__ . '/../..' . '/application/displayblock.class.inc.php', - 'DisplayTemplate' => __DIR__ . '/../..' . '/application/template.class.inc.php', - 'DisplayableEdge' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', - 'DisplayableGraph' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', - 'DisplayableGroupNode' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', - 'DisplayableNode' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', - 'DisplayableRedundancyNode' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', - 'Doctrine\\Common\\Annotations\\Annotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', - 'Doctrine\\Common\\Annotations\\AnnotationException' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', - 'Doctrine\\Common\\Annotations\\AnnotationReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', - 'Doctrine\\Common\\Annotations\\AnnotationRegistry' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attribute' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attributes' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Enum' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php', - 'Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php', - 'Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Required' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Target' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php', - 'Doctrine\\Common\\Annotations\\DocLexer' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php', - 'Doctrine\\Common\\Annotations\\DocParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php', - 'Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php', - 'Doctrine\\Common\\Annotations\\IndexedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php', - 'Doctrine\\Common\\Annotations\\PhpParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php', - 'Doctrine\\Common\\Annotations\\PsrCachedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php', - 'Doctrine\\Common\\Annotations\\Reader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php', - 'Doctrine\\Common\\Annotations\\TokenParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php', - 'Doctrine\\Common\\Cache\\Cache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php', - 'Doctrine\\Common\\Cache\\CacheProvider' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php', - 'Doctrine\\Common\\Cache\\ClearableCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php', - 'Doctrine\\Common\\Cache\\FlushableCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php', - 'Doctrine\\Common\\Cache\\MultiDeleteCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php', - 'Doctrine\\Common\\Cache\\MultiGetCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php', - 'Doctrine\\Common\\Cache\\MultiOperationCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiOperationCache.php', - 'Doctrine\\Common\\Cache\\MultiPutCache' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php', - 'Doctrine\\Common\\Cache\\Psr6\\CacheAdapter' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php', - 'Doctrine\\Common\\Cache\\Psr6\\CacheItem' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php', - 'Doctrine\\Common\\Cache\\Psr6\\DoctrineProvider' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php', - 'Doctrine\\Common\\Cache\\Psr6\\InvalidArgument' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php', - 'Doctrine\\Common\\Cache\\Psr6\\TypedCacheItem' => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php', - 'Doctrine\\Common\\Lexer\\AbstractLexer' => __DIR__ . '/..' . '/doctrine/lexer/src/AbstractLexer.php', - 'Doctrine\\Common\\Lexer\\Token' => __DIR__ . '/..' . '/doctrine/lexer/src/Token.php', - 'Doctrine\\Deprecations\\Deprecation' => __DIR__ . '/..' . '/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php', - 'Doctrine\\Deprecations\\PHPUnit\\VerifyDeprecations' => __DIR__ . '/..' . '/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php', - 'DownloadPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/DownloadPage.php', - 'EMail' => __DIR__ . '/../..' . '/core/email.class.inc.php', - 'EMailLaminas' => __DIR__ . '/../..' . '/sources/Core/Email/EmailLaminas.php', - 'ErrorPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/ErrorPage.php', - 'Event' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'EventIssue' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'EventLoginUsage' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'EventNotification' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'EventNotificationEmail' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'EventOnObject' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'EventRestService' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'EventWebService' => __DIR__ . '/../..' . '/core/event.class.inc.php', - 'ExcelBulkExport' => __DIR__ . '/../..' . '/core/excelbulkexport.class.inc.php', - 'ExcelExporter' => __DIR__ . '/../..' . '/application/excelexporter.class.inc.php', - 'ExceptionLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'ExecAsyncTask' => __DIR__ . '/../..' . '/core/asynctask.class.inc.php', - 'ExecutionKPI' => __DIR__ . '/../..' . '/core/kpi.class.inc.php', - 'Expression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'ExpressionCache' => __DIR__ . '/../..' . '/core/expressioncache.class.inc.php', - 'ExpressionHelper' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'FalseExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'FieldExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'FieldExpressionResolved' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'FieldOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'FileLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'FileUploadException' => __DIR__ . '/../..' . '/application/utils.inc.php', - 'FilterDefinition' => __DIR__ . '/../..' . '/core/filterdef.class.inc.php', - 'FilterFromAttribute' => __DIR__ . '/../..' . '/core/filterdef.class.inc.php', - 'FilterPrivateKey' => __DIR__ . '/../..' . '/core/filterdef.class.inc.php', - 'FindStylesheetObject' => __DIR__ . '/../..' . '/application/findstylesheetobject.class.inc.php', - 'Firebase\\JWT\\BeforeValidException' => __DIR__ . '/..' . '/firebase/php-jwt/src/BeforeValidException.php', - 'Firebase\\JWT\\CachedKeySet' => __DIR__ . '/..' . '/firebase/php-jwt/src/CachedKeySet.php', - 'Firebase\\JWT\\ExpiredException' => __DIR__ . '/..' . '/firebase/php-jwt/src/ExpiredException.php', - 'Firebase\\JWT\\JWK' => __DIR__ . '/..' . '/firebase/php-jwt/src/JWK.php', - 'Firebase\\JWT\\JWT' => __DIR__ . '/..' . '/firebase/php-jwt/src/JWT.php', - 'Firebase\\JWT\\Key' => __DIR__ . '/..' . '/firebase/php-jwt/src/Key.php', - 'Firebase\\JWT\\SignatureInvalidException' => __DIR__ . '/..' . '/firebase/php-jwt/src/SignatureInvalidException.php', - 'FunctionExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'FunctionOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'GraphEdge' => __DIR__ . '/../..' . '/core/simplegraph.class.inc.php', - 'GraphElement' => __DIR__ . '/../..' . '/core/simplegraph.class.inc.php', - 'GraphNode' => __DIR__ . '/../..' . '/core/simplegraph.class.inc.php', - 'GuzzleHttp\\BodySummarizer' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/BodySummarizer.php', - 'GuzzleHttp\\BodySummarizerInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/BodySummarizerInterface.php', - 'GuzzleHttp\\Client' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Client.php', - 'GuzzleHttp\\ClientInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientInterface.php', - 'GuzzleHttp\\ClientTrait' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientTrait.php', - 'GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php', - 'GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', - 'GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', - 'GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', - 'GuzzleHttp\\Cookie\\SetCookie' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php', - 'GuzzleHttp\\Exception\\BadResponseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php', - 'GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ClientException.php', - 'GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ConnectException.php', - 'GuzzleHttp\\Exception\\GuzzleException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php', - 'GuzzleHttp\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php', - 'GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/RequestException.php', - 'GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php', - 'GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', - 'GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TransferException.php', - 'GuzzleHttp\\HandlerStack' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/HandlerStack.php', - 'GuzzleHttp\\Handler\\CurlFactory' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', - 'GuzzleHttp\\Handler\\CurlFactoryInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', - 'GuzzleHttp\\Handler\\CurlHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', - 'GuzzleHttp\\Handler\\CurlMultiHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', - 'GuzzleHttp\\Handler\\EasyHandle' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php', - 'GuzzleHttp\\Handler\\HeaderProcessor' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php', - 'GuzzleHttp\\Handler\\MockHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/MockHandler.php', - 'GuzzleHttp\\Handler\\Proxy' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/Proxy.php', - 'GuzzleHttp\\Handler\\StreamHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php', - 'GuzzleHttp\\MessageFormatter' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/MessageFormatter.php', - 'GuzzleHttp\\MessageFormatterInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/MessageFormatterInterface.php', - 'GuzzleHttp\\Middleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Middleware.php', - 'GuzzleHttp\\Pool' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Pool.php', - 'GuzzleHttp\\PrepareBodyMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', - 'GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/AggregateException.php', - 'GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/CancellationException.php', - 'GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Coroutine.php', - 'GuzzleHttp\\Promise\\Create' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Create.php', - 'GuzzleHttp\\Promise\\Each' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Each.php', - 'GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/EachPromise.php', - 'GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/FulfilledPromise.php', - 'GuzzleHttp\\Promise\\Is' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Is.php', - 'GuzzleHttp\\Promise\\Promise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Promise.php', - 'GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromiseInterface.php', - 'GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromisorInterface.php', - 'GuzzleHttp\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectedPromise.php', - 'GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectionException.php', - 'GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueue.php', - 'GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueueInterface.php', - 'GuzzleHttp\\Promise\\Utils' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Utils.php', - 'GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/AppendStream.php', - 'GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/BufferStream.php', - 'GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/CachingStream.php', - 'GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/DroppingStream.php', - 'GuzzleHttp\\Psr7\\Exception\\MalformedUriException' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Exception/MalformedUriException.php', - 'GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/FnStream.php', - 'GuzzleHttp\\Psr7\\Header' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Header.php', - 'GuzzleHttp\\Psr7\\HttpFactory' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/HttpFactory.php', - 'GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php', - 'GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LazyOpenStream.php', - 'GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LimitStream.php', - 'GuzzleHttp\\Psr7\\Message' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Message.php', - 'GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MessageTrait.php', - 'GuzzleHttp\\Psr7\\MimeType' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MimeType.php', - 'GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MultipartStream.php', - 'GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php', - 'GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php', - 'GuzzleHttp\\Psr7\\Query' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Query.php', - 'GuzzleHttp\\Psr7\\Request' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Request.php', - 'GuzzleHttp\\Psr7\\Response' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Response.php', - 'GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Rfc7230.php', - 'GuzzleHttp\\Psr7\\ServerRequest' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/ServerRequest.php', - 'GuzzleHttp\\Psr7\\Stream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Stream.php', - 'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php', - 'GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php', - 'GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php', - 'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php', - 'GuzzleHttp\\Psr7\\UriComparator' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriComparator.php', - 'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php', - 'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php', - 'GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Utils.php', - 'GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RedirectMiddleware.php', - 'GuzzleHttp\\RequestOptions' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestOptions.php', - 'GuzzleHttp\\RetryMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RetryMiddleware.php', - 'GuzzleHttp\\TransferStats' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/TransferStats.php', - 'GuzzleHttp\\Utils' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Utils.php', - 'HTMLBulkExport' => __DIR__ . '/../..' . '/core/htmlbulkexport.class.inc.php', - 'HTMLDOMSanitizer' => __DIR__ . '/../..' . '/core/htmlsanitizer.class.inc.php', - 'HTMLNullSanitizer' => __DIR__ . '/../..' . '/core/htmlsanitizer.class.inc.php', - 'HTMLSanitizer' => __DIR__ . '/../..' . '/core/htmlsanitizer.class.inc.php', - 'Html2Text\\Html2Text' => __DIR__ . '/../..' . '/application/Html2Text.php', - 'Html2Text\\Html2TextException' => __DIR__ . '/../..' . '/application/Html2TextException.php', - 'ITopArchiveTar' => __DIR__ . '/../..' . '/core/tar-itop.class.inc.php', - 'InlineImage' => __DIR__ . '/../..' . '/core/inlineimage.class.inc.php', - 'InlineImageGC' => __DIR__ . '/../..' . '/core/inlineimage.class.inc.php', - 'InputOutputTask' => __DIR__ . '/../..' . '/application/iotask.class.inc.php', - 'IntervalExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'IntervalOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'IntlDateFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php', - 'Introspection' => __DIR__ . '/../..' . '/core/introspection.class.inc.php', - 'InvalidConfigParamException' => __DIR__ . '/../..' . '/application/exceptions/InvalidConfigParamException.php', - 'InvalidPasswordAttributeOneWayPassword' => __DIR__ . '/../..' . '/application/exceptions/InvalidPasswordAttributeOneWayPassword.php', - 'IssueLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'ItopCounter' => __DIR__ . '/../..' . '/core/counter.class.inc.php', - 'JSButtonItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'JSPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', - 'JsonPPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/JsonPPage.php', - 'JsonPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/JsonPage.php', - 'KeyValueStore' => __DIR__ . '/../..' . '/core/counter.class.inc.php', - 'Laminas\\Loader\\AutoloaderFactory' => __DIR__ . '/..' . '/laminas/laminas-loader/src/AutoloaderFactory.php', - 'Laminas\\Loader\\ClassMapAutoloader' => __DIR__ . '/..' . '/laminas/laminas-loader/src/ClassMapAutoloader.php', - 'Laminas\\Loader\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/BadMethodCallException.php', - 'Laminas\\Loader\\Exception\\DomainException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/DomainException.php', - 'Laminas\\Loader\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/ExceptionInterface.php', - 'Laminas\\Loader\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/InvalidArgumentException.php', - 'Laminas\\Loader\\Exception\\InvalidPathException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/InvalidPathException.php', - 'Laminas\\Loader\\Exception\\MissingResourceNamespaceException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/MissingResourceNamespaceException.php', - 'Laminas\\Loader\\Exception\\PluginLoaderException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/PluginLoaderException.php', - 'Laminas\\Loader\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/RuntimeException.php', - 'Laminas\\Loader\\Exception\\SecurityException' => __DIR__ . '/..' . '/laminas/laminas-loader/src/Exception/SecurityException.php', - 'Laminas\\Loader\\ModuleAutoloader' => __DIR__ . '/..' . '/laminas/laminas-loader/src/ModuleAutoloader.php', - 'Laminas\\Loader\\PluginClassLoader' => __DIR__ . '/..' . '/laminas/laminas-loader/src/PluginClassLoader.php', - 'Laminas\\Loader\\PluginClassLocator' => __DIR__ . '/..' . '/laminas/laminas-loader/src/PluginClassLocator.php', - 'Laminas\\Loader\\ShortNameLocator' => __DIR__ . '/..' . '/laminas/laminas-loader/src/ShortNameLocator.php', - 'Laminas\\Loader\\SplAutoloader' => __DIR__ . '/..' . '/laminas/laminas-loader/src/SplAutoloader.php', - 'Laminas\\Loader\\StandardAutoloader' => __DIR__ . '/..' . '/laminas/laminas-loader/src/StandardAutoloader.php', - 'Laminas\\Mail\\Address' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Address.php', - 'Laminas\\Mail\\AddressList' => __DIR__ . '/..' . '/laminas/laminas-mail/src/AddressList.php', - 'Laminas\\Mail\\Address\\AddressInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Address/AddressInterface.php', - 'Laminas\\Mail\\ConfigProvider' => __DIR__ . '/..' . '/laminas/laminas-mail/src/ConfigProvider.php', - 'Laminas\\Mail\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Exception/BadMethodCallException.php', - 'Laminas\\Mail\\Exception\\DomainException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Exception/DomainException.php', - 'Laminas\\Mail\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Exception/OutOfBoundsException.php', - 'Laminas\\Mail\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Exception/RuntimeException.php', - 'Laminas\\Mail\\Header\\AbstractAddressList' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/AbstractAddressList.php', - 'Laminas\\Mail\\Header\\Bcc' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Bcc.php', - 'Laminas\\Mail\\Header\\Cc' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Cc.php', - 'Laminas\\Mail\\Header\\ContentDisposition' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/ContentDisposition.php', - 'Laminas\\Mail\\Header\\ContentTransferEncoding' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/ContentTransferEncoding.php', - 'Laminas\\Mail\\Header\\ContentType' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/ContentType.php', - 'Laminas\\Mail\\Header\\Date' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Date.php', - 'Laminas\\Mail\\Header\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Exception/BadMethodCallException.php', - 'Laminas\\Mail\\Header\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Header\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Header\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Exception/RuntimeException.php', - 'Laminas\\Mail\\Header\\From' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/From.php', - 'Laminas\\Mail\\Header\\GenericHeader' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/GenericHeader.php', - 'Laminas\\Mail\\Header\\GenericMultiHeader' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/GenericMultiHeader.php', - 'Laminas\\Mail\\Header\\HeaderInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/HeaderInterface.php', - 'Laminas\\Mail\\Header\\HeaderLoader' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/HeaderLoader.php', - 'Laminas\\Mail\\Header\\HeaderLocator' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/HeaderLocator.php', - 'Laminas\\Mail\\Header\\HeaderLocatorInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/HeaderLocatorInterface.php', - 'Laminas\\Mail\\Header\\HeaderName' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/HeaderName.php', - 'Laminas\\Mail\\Header\\HeaderValue' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/HeaderValue.php', - 'Laminas\\Mail\\Header\\HeaderWrap' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/HeaderWrap.php', - 'Laminas\\Mail\\Header\\IdentificationField' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/IdentificationField.php', - 'Laminas\\Mail\\Header\\InReplyTo' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/InReplyTo.php', - 'Laminas\\Mail\\Header\\ListParser' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/ListParser.php', - 'Laminas\\Mail\\Header\\MessageId' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/MessageId.php', - 'Laminas\\Mail\\Header\\MimeVersion' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/MimeVersion.php', - 'Laminas\\Mail\\Header\\MultipleHeadersInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/MultipleHeadersInterface.php', - 'Laminas\\Mail\\Header\\Received' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Received.php', - 'Laminas\\Mail\\Header\\References' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/References.php', - 'Laminas\\Mail\\Header\\ReplyTo' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/ReplyTo.php', - 'Laminas\\Mail\\Header\\Sender' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Sender.php', - 'Laminas\\Mail\\Header\\StructuredInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/StructuredInterface.php', - 'Laminas\\Mail\\Header\\Subject' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/Subject.php', - 'Laminas\\Mail\\Header\\To' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/To.php', - 'Laminas\\Mail\\Header\\UnstructuredInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Header/UnstructuredInterface.php', - 'Laminas\\Mail\\Headers' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Headers.php', - 'Laminas\\Mail\\Message' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Message.php', - 'Laminas\\Mail\\MessageFactory' => __DIR__ . '/..' . '/laminas/laminas-mail/src/MessageFactory.php', - 'Laminas\\Mail\\Module' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Module.php', - 'Laminas\\Mail\\Protocol\\AbstractProtocol' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/AbstractProtocol.php', - 'Laminas\\Mail\\Protocol\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Protocol\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Protocol\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Exception/RuntimeException.php', - 'Laminas\\Mail\\Protocol\\Imap' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Imap.php', - 'Laminas\\Mail\\Protocol\\Pop3' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Pop3.php', - 'Laminas\\Mail\\Protocol\\ProtocolTrait' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/ProtocolTrait.php', - 'Laminas\\Mail\\Protocol\\Smtp' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Smtp.php', - 'Laminas\\Mail\\Protocol\\SmtpPluginManager' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/SmtpPluginManager.php', - 'Laminas\\Mail\\Protocol\\SmtpPluginManagerFactory' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/SmtpPluginManagerFactory.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Crammd5' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Smtp/Auth/Crammd5.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Login' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Smtp/Auth/Login.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Oauth' => __DIR__ . '/../..' . '/sources/Core/Authentication/Client/Smtp/SmtpOAuthLogin.php', - 'Laminas\\Mail\\Protocol\\Smtp\\Auth\\Plain' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Protocol/Smtp/Auth/Plain.php', - 'Laminas\\Mail\\Storage' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage.php', - 'Laminas\\Mail\\Storage\\AbstractStorage' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/AbstractStorage.php', - 'Laminas\\Mail\\Storage\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Storage\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Storage\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Exception/OutOfBoundsException.php', - 'Laminas\\Mail\\Storage\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Exception/RuntimeException.php', - 'Laminas\\Mail\\Storage\\Folder' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Folder.php', - 'Laminas\\Mail\\Storage\\Folder\\FolderInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Folder/FolderInterface.php', - 'Laminas\\Mail\\Storage\\Folder\\Maildir' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Folder/Maildir.php', - 'Laminas\\Mail\\Storage\\Folder\\Mbox' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Folder/Mbox.php', - 'Laminas\\Mail\\Storage\\Imap' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Imap.php', - 'Laminas\\Mail\\Storage\\Maildir' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Maildir.php', - 'Laminas\\Mail\\Storage\\Mbox' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Mbox.php', - 'Laminas\\Mail\\Storage\\Message' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Message.php', - 'Laminas\\Mail\\Storage\\Message\\File' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Message/File.php', - 'Laminas\\Mail\\Storage\\Message\\MessageInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Message/MessageInterface.php', - 'Laminas\\Mail\\Storage\\ParamsNormalizer' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/ParamsNormalizer.php', - 'Laminas\\Mail\\Storage\\Part' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Part.php', - 'Laminas\\Mail\\Storage\\Part\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Part/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Storage\\Part\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Part/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Storage\\Part\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Part/Exception/RuntimeException.php', - 'Laminas\\Mail\\Storage\\Part\\File' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Part/File.php', - 'Laminas\\Mail\\Storage\\Part\\PartInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Part/PartInterface.php', - 'Laminas\\Mail\\Storage\\Pop3' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Pop3.php', - 'Laminas\\Mail\\Storage\\Writable\\Maildir' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Writable/Maildir.php', - 'Laminas\\Mail\\Storage\\Writable\\WritableInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Storage/Writable/WritableInterface.php', - 'Laminas\\Mail\\Transport\\Envelope' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Envelope.php', - 'Laminas\\Mail\\Transport\\Exception\\DomainException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Exception/DomainException.php', - 'Laminas\\Mail\\Transport\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Exception/ExceptionInterface.php', - 'Laminas\\Mail\\Transport\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Exception/InvalidArgumentException.php', - 'Laminas\\Mail\\Transport\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Exception/RuntimeException.php', - 'Laminas\\Mail\\Transport\\Factory' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Factory.php', - 'Laminas\\Mail\\Transport\\File' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/File.php', - 'Laminas\\Mail\\Transport\\FileOptions' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/FileOptions.php', - 'Laminas\\Mail\\Transport\\InMemory' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/InMemory.php', - 'Laminas\\Mail\\Transport\\Sendmail' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Sendmail.php', - 'Laminas\\Mail\\Transport\\Smtp' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/Smtp.php', - 'Laminas\\Mail\\Transport\\SmtpOptions' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/SmtpOptions.php', - 'Laminas\\Mail\\Transport\\TransportInterface' => __DIR__ . '/..' . '/laminas/laminas-mail/src/Transport/TransportInterface.php', - 'Laminas\\Mime\\Decode' => __DIR__ . '/..' . '/laminas/laminas-mime/src/Decode.php', - 'Laminas\\Mime\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-mime/src/Exception/ExceptionInterface.php', - 'Laminas\\Mime\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-mime/src/Exception/InvalidArgumentException.php', - 'Laminas\\Mime\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-mime/src/Exception/RuntimeException.php', - 'Laminas\\Mime\\Message' => __DIR__ . '/..' . '/laminas/laminas-mime/src/Message.php', - 'Laminas\\Mime\\Mime' => __DIR__ . '/..' . '/laminas/laminas-mime/src/Mime.php', - 'Laminas\\Mime\\Part' => __DIR__ . '/..' . '/laminas/laminas-mime/src/Part.php', - 'Laminas\\ServiceManager\\AbstractFactoryInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/AbstractFactoryInterface.php', - 'Laminas\\ServiceManager\\AbstractFactory\\ConfigAbstractFactory' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php', - 'Laminas\\ServiceManager\\AbstractFactory\\ReflectionBasedAbstractFactory' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/AbstractFactory/ReflectionBasedAbstractFactory.php', - 'Laminas\\ServiceManager\\AbstractPluginManager' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/AbstractPluginManager.php', - 'Laminas\\ServiceManager\\Config' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Config.php', - 'Laminas\\ServiceManager\\ConfigInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/ConfigInterface.php', - 'Laminas\\ServiceManager\\DelegatorFactoryInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/DelegatorFactoryInterface.php', - 'Laminas\\ServiceManager\\Exception\\ContainerModificationsNotAllowedException' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Exception/ContainerModificationsNotAllowedException.php', - 'Laminas\\ServiceManager\\Exception\\CyclicAliasException' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Exception/CyclicAliasException.php', - 'Laminas\\ServiceManager\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Exception/ExceptionInterface.php', - 'Laminas\\ServiceManager\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Exception/InvalidArgumentException.php', - 'Laminas\\ServiceManager\\Exception\\InvalidServiceException' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Exception/InvalidServiceException.php', - 'Laminas\\ServiceManager\\Exception\\ServiceNotCreatedException' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Exception/ServiceNotCreatedException.php', - 'Laminas\\ServiceManager\\Exception\\ServiceNotFoundException' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Exception/ServiceNotFoundException.php', - 'Laminas\\ServiceManager\\FactoryInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/FactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\AbstractFactoryInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Factory/AbstractFactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\DelegatorFactoryInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Factory/DelegatorFactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\FactoryInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Factory/FactoryInterface.php', - 'Laminas\\ServiceManager\\Factory\\InvokableFactory' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Factory/InvokableFactory.php', - 'Laminas\\ServiceManager\\InitializerInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/InitializerInterface.php', - 'Laminas\\ServiceManager\\Initializer\\InitializerInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Initializer/InitializerInterface.php', - 'Laminas\\ServiceManager\\PluginManagerInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/PluginManagerInterface.php', - 'Laminas\\ServiceManager\\Proxy\\LazyServiceFactory' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Proxy/LazyServiceFactory.php', - 'Laminas\\ServiceManager\\ServiceLocatorInterface' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php', - 'Laminas\\ServiceManager\\ServiceManager' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/ServiceManager.php', - 'Laminas\\ServiceManager\\Tool\\ConfigDumper' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Tool/ConfigDumper.php', - 'Laminas\\ServiceManager\\Tool\\ConfigDumperCommand' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Tool/ConfigDumperCommand.php', - 'Laminas\\ServiceManager\\Tool\\FactoryCreator' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Tool/FactoryCreator.php', - 'Laminas\\ServiceManager\\Tool\\FactoryCreatorCommand' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php', - 'Laminas\\Stdlib\\AbstractOptions' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/AbstractOptions.php', - 'Laminas\\Stdlib\\ArrayObject' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayObject.php', - 'Laminas\\Stdlib\\ArraySerializableInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArraySerializableInterface.php', - 'Laminas\\Stdlib\\ArrayStack' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayStack.php', - 'Laminas\\Stdlib\\ArrayUtils' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils.php', - 'Laminas\\Stdlib\\ArrayUtils\\MergeRemoveKey' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php', - 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKey' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKey.php', - 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKeyInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php', - 'Laminas\\Stdlib\\ConsoleHelper' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ConsoleHelper.php', - 'Laminas\\Stdlib\\DispatchableInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/DispatchableInterface.php', - 'Laminas\\Stdlib\\ErrorHandler' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ErrorHandler.php', - 'Laminas\\Stdlib\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/BadMethodCallException.php', - 'Laminas\\Stdlib\\Exception\\DomainException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/DomainException.php', - 'Laminas\\Stdlib\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/ExceptionInterface.php', - 'Laminas\\Stdlib\\Exception\\ExtensionNotLoadedException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/ExtensionNotLoadedException.php', - 'Laminas\\Stdlib\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/InvalidArgumentException.php', - 'Laminas\\Stdlib\\Exception\\LogicException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/LogicException.php', - 'Laminas\\Stdlib\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/RuntimeException.php', - 'Laminas\\Stdlib\\FastPriorityQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/FastPriorityQueue.php', - 'Laminas\\Stdlib\\Glob' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Glob.php', - 'Laminas\\Stdlib\\Guard\\AllGuardsTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/AllGuardsTrait.php', - 'Laminas\\Stdlib\\Guard\\ArrayOrTraversableGuardTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php', - 'Laminas\\Stdlib\\Guard\\EmptyGuardTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/EmptyGuardTrait.php', - 'Laminas\\Stdlib\\Guard\\NullGuardTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/NullGuardTrait.php', - 'Laminas\\Stdlib\\InitializableInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/InitializableInterface.php', - 'Laminas\\Stdlib\\JsonSerializable' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/JsonSerializable.php', - 'Laminas\\Stdlib\\Message' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Message.php', - 'Laminas\\Stdlib\\MessageInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/MessageInterface.php', - 'Laminas\\Stdlib\\ParameterObjectInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ParameterObjectInterface.php', - 'Laminas\\Stdlib\\Parameters' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Parameters.php', - 'Laminas\\Stdlib\\ParametersInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ParametersInterface.php', - 'Laminas\\Stdlib\\PriorityList' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/PriorityList.php', - 'Laminas\\Stdlib\\PriorityQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/PriorityQueue.php', - 'Laminas\\Stdlib\\Request' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Request.php', - 'Laminas\\Stdlib\\RequestInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/RequestInterface.php', - 'Laminas\\Stdlib\\Response' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Response.php', - 'Laminas\\Stdlib\\ResponseInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ResponseInterface.php', - 'Laminas\\Stdlib\\SplPriorityQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/SplPriorityQueue.php', - 'Laminas\\Stdlib\\SplQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/SplQueue.php', - 'Laminas\\Stdlib\\SplStack' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/SplStack.php', - 'Laminas\\Stdlib\\StringUtils' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringUtils.php', - 'Laminas\\Stdlib\\StringWrapper\\AbstractStringWrapper' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php', - 'Laminas\\Stdlib\\StringWrapper\\Iconv' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/Iconv.php', - 'Laminas\\Stdlib\\StringWrapper\\Intl' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/Intl.php', - 'Laminas\\Stdlib\\StringWrapper\\MbString' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/MbString.php', - 'Laminas\\Stdlib\\StringWrapper\\Native' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/Native.php', - 'Laminas\\Stdlib\\StringWrapper\\StringWrapperInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/StringWrapperInterface.php', - 'Laminas\\Validator\\AbstractValidator' => __DIR__ . '/..' . '/laminas/laminas-validator/src/AbstractValidator.php', - 'Laminas\\Validator\\Barcode' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode.php', - 'Laminas\\Validator\\Barcode\\AbstractAdapter' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/AbstractAdapter.php', - 'Laminas\\Validator\\Barcode\\AdapterInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/AdapterInterface.php', - 'Laminas\\Validator\\Barcode\\Codabar' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Codabar.php', - 'Laminas\\Validator\\Barcode\\Code128' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Code128.php', - 'Laminas\\Validator\\Barcode\\Code25' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Code25.php', - 'Laminas\\Validator\\Barcode\\Code25interleaved' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Code25interleaved.php', - 'Laminas\\Validator\\Barcode\\Code39' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Code39.php', - 'Laminas\\Validator\\Barcode\\Code39ext' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Code39ext.php', - 'Laminas\\Validator\\Barcode\\Code93' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Code93.php', - 'Laminas\\Validator\\Barcode\\Code93ext' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Code93ext.php', - 'Laminas\\Validator\\Barcode\\Ean12' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Ean12.php', - 'Laminas\\Validator\\Barcode\\Ean13' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Ean13.php', - 'Laminas\\Validator\\Barcode\\Ean14' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Ean14.php', - 'Laminas\\Validator\\Barcode\\Ean18' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Ean18.php', - 'Laminas\\Validator\\Barcode\\Ean2' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Ean2.php', - 'Laminas\\Validator\\Barcode\\Ean5' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Ean5.php', - 'Laminas\\Validator\\Barcode\\Ean8' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Ean8.php', - 'Laminas\\Validator\\Barcode\\Gtin12' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Gtin12.php', - 'Laminas\\Validator\\Barcode\\Gtin13' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Gtin13.php', - 'Laminas\\Validator\\Barcode\\Gtin14' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Gtin14.php', - 'Laminas\\Validator\\Barcode\\Identcode' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Identcode.php', - 'Laminas\\Validator\\Barcode\\Intelligentmail' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Intelligentmail.php', - 'Laminas\\Validator\\Barcode\\Issn' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Issn.php', - 'Laminas\\Validator\\Barcode\\Itf14' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Itf14.php', - 'Laminas\\Validator\\Barcode\\Leitcode' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Leitcode.php', - 'Laminas\\Validator\\Barcode\\Planet' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Planet.php', - 'Laminas\\Validator\\Barcode\\Postnet' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Postnet.php', - 'Laminas\\Validator\\Barcode\\Royalmail' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Royalmail.php', - 'Laminas\\Validator\\Barcode\\Sscc' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Sscc.php', - 'Laminas\\Validator\\Barcode\\Upca' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Upca.php', - 'Laminas\\Validator\\Barcode\\Upce' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Barcode/Upce.php', - 'Laminas\\Validator\\Between' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Between.php', - 'Laminas\\Validator\\Bitwise' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Bitwise.php', - 'Laminas\\Validator\\BusinessIdentifierCode' => __DIR__ . '/..' . '/laminas/laminas-validator/src/BusinessIdentifierCode.php', - 'Laminas\\Validator\\Callback' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Callback.php', - 'Laminas\\Validator\\ConfigProvider' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ConfigProvider.php', - 'Laminas\\Validator\\CreditCard' => __DIR__ . '/..' . '/laminas/laminas-validator/src/CreditCard.php', - 'Laminas\\Validator\\Csrf' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Csrf.php', - 'Laminas\\Validator\\Date' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Date.php', - 'Laminas\\Validator\\DateStep' => __DIR__ . '/..' . '/laminas/laminas-validator/src/DateStep.php', - 'Laminas\\Validator\\Db\\AbstractDb' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Db/AbstractDb.php', - 'Laminas\\Validator\\Db\\NoRecordExists' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Db/NoRecordExists.php', - 'Laminas\\Validator\\Db\\RecordExists' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Db/RecordExists.php', - 'Laminas\\Validator\\Digits' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Digits.php', - 'Laminas\\Validator\\EmailAddress' => __DIR__ . '/..' . '/laminas/laminas-validator/src/EmailAddress.php', - 'Laminas\\Validator\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Exception/BadMethodCallException.php', - 'Laminas\\Validator\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Exception/ExceptionInterface.php', - 'Laminas\\Validator\\Exception\\ExtensionNotLoadedException' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Exception/ExtensionNotLoadedException.php', - 'Laminas\\Validator\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Exception/InvalidArgumentException.php', - 'Laminas\\Validator\\Exception\\InvalidMagicMimeFileException' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Exception/InvalidMagicMimeFileException.php', - 'Laminas\\Validator\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Exception/RuntimeException.php', - 'Laminas\\Validator\\Explode' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Explode.php', - 'Laminas\\Validator\\File\\Count' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Count.php', - 'Laminas\\Validator\\File\\Crc32' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Crc32.php', - 'Laminas\\Validator\\File\\ExcludeExtension' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/ExcludeExtension.php', - 'Laminas\\Validator\\File\\ExcludeMimeType' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/ExcludeMimeType.php', - 'Laminas\\Validator\\File\\Exists' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Exists.php', - 'Laminas\\Validator\\File\\Extension' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Extension.php', - 'Laminas\\Validator\\File\\FileInformationTrait' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/FileInformationTrait.php', - 'Laminas\\Validator\\File\\FilesSize' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/FilesSize.php', - 'Laminas\\Validator\\File\\Hash' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Hash.php', - 'Laminas\\Validator\\File\\ImageSize' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/ImageSize.php', - 'Laminas\\Validator\\File\\IsCompressed' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/IsCompressed.php', - 'Laminas\\Validator\\File\\IsImage' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/IsImage.php', - 'Laminas\\Validator\\File\\Md5' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Md5.php', - 'Laminas\\Validator\\File\\MimeType' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/MimeType.php', - 'Laminas\\Validator\\File\\NotExists' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/NotExists.php', - 'Laminas\\Validator\\File\\Sha1' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Sha1.php', - 'Laminas\\Validator\\File\\Size' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Size.php', - 'Laminas\\Validator\\File\\Upload' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/Upload.php', - 'Laminas\\Validator\\File\\UploadFile' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/UploadFile.php', - 'Laminas\\Validator\\File\\WordCount' => __DIR__ . '/..' . '/laminas/laminas-validator/src/File/WordCount.php', - 'Laminas\\Validator\\GpsPoint' => __DIR__ . '/..' . '/laminas/laminas-validator/src/GpsPoint.php', - 'Laminas\\Validator\\GreaterThan' => __DIR__ . '/..' . '/laminas/laminas-validator/src/GreaterThan.php', - 'Laminas\\Validator\\Hex' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Hex.php', - 'Laminas\\Validator\\Hostname' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Hostname.php', - 'Laminas\\Validator\\Iban' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Iban.php', - 'Laminas\\Validator\\Identical' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Identical.php', - 'Laminas\\Validator\\InArray' => __DIR__ . '/..' . '/laminas/laminas-validator/src/InArray.php', - 'Laminas\\Validator\\Ip' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Ip.php', - 'Laminas\\Validator\\IsCountable' => __DIR__ . '/..' . '/laminas/laminas-validator/src/IsCountable.php', - 'Laminas\\Validator\\IsInstanceOf' => __DIR__ . '/..' . '/laminas/laminas-validator/src/IsInstanceOf.php', - 'Laminas\\Validator\\Isbn' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Isbn.php', - 'Laminas\\Validator\\Isbn\\Isbn10' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Isbn/Isbn10.php', - 'Laminas\\Validator\\Isbn\\Isbn13' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Isbn/Isbn13.php', - 'Laminas\\Validator\\LessThan' => __DIR__ . '/..' . '/laminas/laminas-validator/src/LessThan.php', - 'Laminas\\Validator\\Module' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Module.php', - 'Laminas\\Validator\\NotEmpty' => __DIR__ . '/..' . '/laminas/laminas-validator/src/NotEmpty.php', - 'Laminas\\Validator\\Regex' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Regex.php', - 'Laminas\\Validator\\Sitemap\\Changefreq' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Sitemap/Changefreq.php', - 'Laminas\\Validator\\Sitemap\\Lastmod' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Sitemap/Lastmod.php', - 'Laminas\\Validator\\Sitemap\\Loc' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Sitemap/Loc.php', - 'Laminas\\Validator\\Sitemap\\Priority' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Sitemap/Priority.php', - 'Laminas\\Validator\\StaticValidator' => __DIR__ . '/..' . '/laminas/laminas-validator/src/StaticValidator.php', - 'Laminas\\Validator\\Step' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Step.php', - 'Laminas\\Validator\\StringLength' => __DIR__ . '/..' . '/laminas/laminas-validator/src/StringLength.php', - 'Laminas\\Validator\\Timezone' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Timezone.php', - 'Laminas\\Validator\\Translator\\TranslatorAwareInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php', - 'Laminas\\Validator\\Translator\\TranslatorInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Translator/TranslatorInterface.php', - 'Laminas\\Validator\\UndisclosedPassword' => __DIR__ . '/..' . '/laminas/laminas-validator/src/UndisclosedPassword.php', - 'Laminas\\Validator\\Uri' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Uri.php', - 'Laminas\\Validator\\Uuid' => __DIR__ . '/..' . '/laminas/laminas-validator/src/Uuid.php', - 'Laminas\\Validator\\ValidatorChain' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ValidatorChain.php', - 'Laminas\\Validator\\ValidatorInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ValidatorInterface.php', - 'Laminas\\Validator\\ValidatorPluginManager' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ValidatorPluginManager.php', - 'Laminas\\Validator\\ValidatorPluginManagerAwareInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ValidatorPluginManagerAwareInterface.php', - 'Laminas\\Validator\\ValidatorPluginManagerFactory' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ValidatorPluginManagerFactory.php', - 'Laminas\\Validator\\ValidatorProviderInterface' => __DIR__ . '/..' . '/laminas/laminas-validator/src/ValidatorProviderInterface.php', - 'League\\OAuth2\\Client\\Exception\\HostedDomainException' => __DIR__ . '/..' . '/league/oauth2-google/src/Exception/HostedDomainException.php', - 'League\\OAuth2\\Client\\Grant\\AbstractGrant' => __DIR__ . '/..' . '/league/oauth2-client/src/Grant/AbstractGrant.php', - 'League\\OAuth2\\Client\\Grant\\AuthorizationCode' => __DIR__ . '/..' . '/league/oauth2-client/src/Grant/AuthorizationCode.php', - 'League\\OAuth2\\Client\\Grant\\ClientCredentials' => __DIR__ . '/..' . '/league/oauth2-client/src/Grant/ClientCredentials.php', - 'League\\OAuth2\\Client\\Grant\\Exception\\InvalidGrantException' => __DIR__ . '/..' . '/league/oauth2-client/src/Grant/Exception/InvalidGrantException.php', - 'League\\OAuth2\\Client\\Grant\\GrantFactory' => __DIR__ . '/..' . '/league/oauth2-client/src/Grant/GrantFactory.php', - 'League\\OAuth2\\Client\\Grant\\Password' => __DIR__ . '/..' . '/league/oauth2-client/src/Grant/Password.php', - 'League\\OAuth2\\Client\\Grant\\RefreshToken' => __DIR__ . '/..' . '/league/oauth2-client/src/Grant/RefreshToken.php', - 'League\\OAuth2\\Client\\OptionProvider\\HttpBasicAuthOptionProvider' => __DIR__ . '/..' . '/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php', - 'League\\OAuth2\\Client\\OptionProvider\\OptionProviderInterface' => __DIR__ . '/..' . '/league/oauth2-client/src/OptionProvider/OptionProviderInterface.php', - 'League\\OAuth2\\Client\\OptionProvider\\PostAuthOptionProvider' => __DIR__ . '/..' . '/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php', - 'League\\OAuth2\\Client\\Provider\\AbstractProvider' => __DIR__ . '/..' . '/league/oauth2-client/src/Provider/AbstractProvider.php', - 'League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException' => __DIR__ . '/..' . '/league/oauth2-client/src/Provider/Exception/IdentityProviderException.php', - 'League\\OAuth2\\Client\\Provider\\GenericProvider' => __DIR__ . '/..' . '/league/oauth2-client/src/Provider/GenericProvider.php', - 'League\\OAuth2\\Client\\Provider\\GenericResourceOwner' => __DIR__ . '/..' . '/league/oauth2-client/src/Provider/GenericResourceOwner.php', - 'League\\OAuth2\\Client\\Provider\\Google' => __DIR__ . '/..' . '/league/oauth2-google/src/Provider/Google.php', - 'League\\OAuth2\\Client\\Provider\\GoogleUser' => __DIR__ . '/..' . '/league/oauth2-google/src/Provider/GoogleUser.php', - 'League\\OAuth2\\Client\\Provider\\ResourceOwnerInterface' => __DIR__ . '/..' . '/league/oauth2-client/src/Provider/ResourceOwnerInterface.php', - 'League\\OAuth2\\Client\\Token\\AccessToken' => __DIR__ . '/..' . '/league/oauth2-client/src/Token/AccessToken.php', - 'League\\OAuth2\\Client\\Token\\AccessTokenInterface' => __DIR__ . '/..' . '/league/oauth2-client/src/Token/AccessTokenInterface.php', - 'League\\OAuth2\\Client\\Token\\ResourceOwnerAccessTokenInterface' => __DIR__ . '/..' . '/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php', - 'League\\OAuth2\\Client\\Tool\\ArrayAccessorTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/ArrayAccessorTrait.php', - 'League\\OAuth2\\Client\\Tool\\BearerAuthorizationTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/BearerAuthorizationTrait.php', - 'League\\OAuth2\\Client\\Tool\\GuardedPropertyTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/GuardedPropertyTrait.php', - 'League\\OAuth2\\Client\\Tool\\MacAuthorizationTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/MacAuthorizationTrait.php', - 'League\\OAuth2\\Client\\Tool\\ProviderRedirectTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/ProviderRedirectTrait.php', - 'League\\OAuth2\\Client\\Tool\\QueryBuilderTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/QueryBuilderTrait.php', - 'League\\OAuth2\\Client\\Tool\\RequestFactory' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/RequestFactory.php', - 'League\\OAuth2\\Client\\Tool\\RequiredParameterTrait' => __DIR__ . '/..' . '/league/oauth2-client/src/Tool/RequiredParameterTrait.php', - 'ListExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'ListOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'Locale' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Locale.php', - 'LogAPI' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'LogChannels' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'LogFileNameBuilderFactory' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'LogFileRotationProcess' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'LoginBlockExtension' => __DIR__ . '/../..' . '/application/logintwig.class.inc.php', - 'LoginTwigContext' => __DIR__ . '/../..' . '/application/logintwig.class.inc.php', - 'LoginTwigRenderer' => __DIR__ . '/../..' . '/application/logintwig.class.inc.php', - 'LoginWebPage' => __DIR__ . '/../..' . '/application/loginwebpage.class.inc.php', - 'MatchExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'MatchOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'MenuBlock' => __DIR__ . '/../..' . '/application/displayblock.class.inc.php', - 'MenuGroup' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'MenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'MetaModel' => __DIR__ . '/../..' . '/core/metamodel.class.php', - 'MissingColumnException' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'MissingQueryArgument' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'ModelReflection' => __DIR__ . '/../..' . '/core/modelreflection.class.inc.php', - 'ModelReflectionRuntime' => __DIR__ . '/../..' . '/core/modelreflection.class.inc.php', - 'ModuleDesign' => __DIR__ . '/../..' . '/core/moduledesign.class.inc.php', - 'ModuleHandlerAPI' => __DIR__ . '/../..' . '/core/modulehandler.class.inc.php', - 'ModuleHandlerApiInterface' => __DIR__ . '/../..' . '/core/modulehandler.class.inc.php', - 'MonthlyRotatingLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'MyHelpers' => __DIR__ . '/../..' . '/core/MyHelpers.class.inc.php', - 'MySQLException' => __DIR__ . '/../..' . '/application/exceptions/mysql/MySQLException.php', - 'MySQLHasGoneAwayException' => __DIR__ . '/../..' . '/application/exceptions/mysql/MySQLHasGoneAwayException.php', - 'MySQLNoTransactionException' => __DIR__ . '/../..' . '/application/exceptions/mysql/MySQLNoTransactionException.php', - 'MySQLQueryHasNoResultException' => __DIR__ . '/../..' . '/application/exceptions/mysql/MySQLQueryHasNoResultException.php', - 'MySQLTransactionNotClosedException' => __DIR__ . '/../..' . '/application/exceptions/mysql/MySQLTransactionNotClosedException.php', - 'NestedQueryExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'NestedQueryOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'NewObjectMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'NewsroomProviderBase' => __DIR__ . '/../..' . '/application/newsroomprovider.class.inc.php', - 'NiceWebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/NiceWebPage.php', - 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', - 'NotYetEvaluatedExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'NumberFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php', - 'OQLActualClassTreeResolver' => __DIR__ . '/../..' . '/core/oqlactualclasstreeresolver.class.inc.php', - 'OQLClassNode' => __DIR__ . '/../..' . '/core/oqlclassnode.class.inc.php', - 'OQLClassTreeBuilder' => __DIR__ . '/../..' . '/core/oqlclasstreebuilder.class.inc.php', - 'OQLClassTreeOptimizer' => __DIR__ . '/../..' . '/core/oqlclasstreeoptimizer.class.inc.php', - 'OQLException' => __DIR__ . '/../..' . '/core/oql/oqlexception.class.inc.php', - 'OQLJoin' => __DIR__ . '/../..' . '/core/oqlclassnode.class.inc.php', - 'OQLLexer' => __DIR__ . '/../..' . '/core/oql/oql-lexer.php', - 'OQLLexerException' => __DIR__ . '/../..' . '/core/oql/oql-lexer.php', - 'OQLLexerRaw' => __DIR__ . '/../..' . '/core/oql/oql-lexer.php', - 'OQLMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'OQLParser' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OQLParserException' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OQLParserParseFailureException' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OQLParserRaw' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OQLParserStackOverFlowException' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OQLParserSyntaxErrorException' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OQLParser_yyStackEntry' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OQLParser_yyToken' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', - 'OS_Guess' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/OS/Guess.php', - 'ObjectDetailsTemplate' => __DIR__ . '/../..' . '/application/template.class.inc.php', - 'ObjectResult' => __DIR__ . '/../..' . '/core/restservices.class.inc.php', - 'ObjectStimulus' => __DIR__ . '/../..' . '/core/stimulus.class.inc.php', - 'ObsolescenceDateUpdater' => __DIR__ . '/../..' . '/core/background.inc.php', - 'OqlHexValue' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'OqlInterpreter' => __DIR__ . '/../..' . '/core/oql/oqlinterpreter.class.inc.php', - 'OqlInterpreterException' => __DIR__ . '/../..' . '/core/oql/oqlinterpreter.class.inc.php', - 'OqlJoinSpec' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'OqlName' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'OqlNormalizeException' => __DIR__ . '/../..' . '/core/oql/oqlinterpreter.class.inc.php', - 'OqlObjectQuery' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'OqlQuery' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'OqlUnionQuery' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'PDF417' => __DIR__ . '/..' . '/combodo/tcpdf/include/barcodes/pdf417.php', - 'PDFBulkExport' => __DIR__ . '/../..' . '/core/pdfbulkexport.class.inc.php', - 'PDFPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/PDFPage.php', - 'PEAR' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR.php', - 'PEAR_ErrorStack' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php', - 'PEAR_Exception' => __DIR__ . '/..' . '/pear/pear_exception/PEAR/Exception.php', - 'Page' => __DIR__ . '/../..' . '/sources/Application/WebPage/Page.php', - 'Pelago\\Emogrifier\\Caching\\SimpleStringCache' => __DIR__ . '/..' . '/pelago/emogrifier/src/Caching/SimpleStringCache.php', - 'Pelago\\Emogrifier\\CssInliner' => __DIR__ . '/..' . '/pelago/emogrifier/src/CssInliner.php', - 'Pelago\\Emogrifier\\Css\\CssDocument' => __DIR__ . '/..' . '/pelago/emogrifier/src/Css/CssDocument.php', - 'Pelago\\Emogrifier\\Css\\StyleRule' => __DIR__ . '/..' . '/pelago/emogrifier/src/Css/StyleRule.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' => __DIR__ . '/..' . '/pelago/emogrifier/src/HtmlProcessor/AbstractHtmlProcessor.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\CssToAttributeConverter' => __DIR__ . '/..' . '/pelago/emogrifier/src/HtmlProcessor/CssToAttributeConverter.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\HtmlNormalizer' => __DIR__ . '/..' . '/pelago/emogrifier/src/HtmlProcessor/HtmlNormalizer.php', - 'Pelago\\Emogrifier\\HtmlProcessor\\HtmlPruner' => __DIR__ . '/..' . '/pelago/emogrifier/src/HtmlProcessor/HtmlPruner.php', - 'Pelago\\Emogrifier\\Utilities\\ArrayIntersector' => __DIR__ . '/..' . '/pelago/emogrifier/src/Utilities/ArrayIntersector.php', - 'Pelago\\Emogrifier\\Utilities\\CssConcatenator' => __DIR__ . '/..' . '/pelago/emogrifier/src/Utilities/CssConcatenator.php', - 'PhpParser\\Builder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder.php', - 'PhpParser\\BuilderFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', - 'PhpParser\\BuilderHelpers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', - 'PhpParser\\Builder\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', - 'PhpParser\\Builder\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', - 'PhpParser\\Builder\\Declaration' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', - 'PhpParser\\Builder\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', - 'PhpParser\\Builder\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', - 'PhpParser\\Builder\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', - 'PhpParser\\Builder\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', - 'PhpParser\\Builder\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', - 'PhpParser\\Builder\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', - 'PhpParser\\Builder\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', - 'PhpParser\\Builder\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', - 'PhpParser\\Builder\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', - 'PhpParser\\Builder\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', - 'PhpParser\\Builder\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', - 'PhpParser\\Builder\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', - 'PhpParser\\Builder\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', - 'PhpParser\\Comment' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment.php', - 'PhpParser\\Comment\\Doc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', - 'PhpParser\\ConstExprEvaluationException' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', - 'PhpParser\\ConstExprEvaluator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', - 'PhpParser\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Error.php', - 'PhpParser\\ErrorHandler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', - 'PhpParser\\ErrorHandler\\Collecting' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', - 'PhpParser\\ErrorHandler\\Throwing' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', - 'PhpParser\\Internal\\DiffElem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', - 'PhpParser\\Internal\\Differ' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', - 'PhpParser\\Internal\\PrintableNewAnonClassNode' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', - 'PhpParser\\Internal\\TokenStream' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', - 'PhpParser\\JsonDecoder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', - 'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', - 'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', - 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', - 'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php', - 'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php', - 'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', - 'PhpParser\\NodeDumper' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', - 'PhpParser\\NodeFinder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', - 'PhpParser\\NodeTraverser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', - 'PhpParser\\NodeTraverserInterface' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', - 'PhpParser\\NodeVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', - 'PhpParser\\NodeVisitorAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', - 'PhpParser\\NodeVisitor\\CloningVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', - 'PhpParser\\NodeVisitor\\FindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', - 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', - 'PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', - 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', - 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', - 'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', - 'PhpParser\\Node\\Attribute' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', - 'PhpParser\\Node\\AttributeGroup' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', - 'PhpParser\\Node\\ComplexType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', - 'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', - 'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', - 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', - 'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', - 'PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', - 'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', - 'PhpParser\\Node\\Expr\\AssignOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\AssignRef' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', - 'PhpParser\\Node\\Expr\\BinaryOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', - 'PhpParser\\Node\\Expr\\BitwiseNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', - 'PhpParser\\Node\\Expr\\BooleanNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', - 'PhpParser\\Node\\Expr\\CallLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', - 'PhpParser\\Node\\Expr\\Cast' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', - 'PhpParser\\Node\\Expr\\Cast\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', - 'PhpParser\\Node\\Expr\\Cast\\Bool_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', - 'PhpParser\\Node\\Expr\\Cast\\Double' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', - 'PhpParser\\Node\\Expr\\Cast\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', - 'PhpParser\\Node\\Expr\\Cast\\Object_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', - 'PhpParser\\Node\\Expr\\Cast\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', - 'PhpParser\\Node\\Expr\\Cast\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', - 'PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', - 'PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', - 'PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', - 'PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', - 'PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', - 'PhpParser\\Node\\Expr\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', - 'PhpParser\\Node\\Expr\\ErrorSuppress' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', - 'PhpParser\\Node\\Expr\\Eval_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', - 'PhpParser\\Node\\Expr\\Exit_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', - 'PhpParser\\Node\\Expr\\FuncCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', - 'PhpParser\\Node\\Expr\\Include_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', - 'PhpParser\\Node\\Expr\\Instanceof_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', - 'PhpParser\\Node\\Expr\\Isset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', - 'PhpParser\\Node\\Expr\\List_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', - 'PhpParser\\Node\\Expr\\Match_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', - 'PhpParser\\Node\\Expr\\MethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', - 'PhpParser\\Node\\Expr\\New_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', - 'PhpParser\\Node\\Expr\\NullsafeMethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', - 'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', - 'PhpParser\\Node\\Expr\\PostDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', - 'PhpParser\\Node\\Expr\\PostInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', - 'PhpParser\\Node\\Expr\\PreDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', - 'PhpParser\\Node\\Expr\\PreInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', - 'PhpParser\\Node\\Expr\\Print_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', - 'PhpParser\\Node\\Expr\\PropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', - 'PhpParser\\Node\\Expr\\ShellExec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', - 'PhpParser\\Node\\Expr\\StaticCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', - 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', - 'PhpParser\\Node\\Expr\\Ternary' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', - 'PhpParser\\Node\\Expr\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', - 'PhpParser\\Node\\Expr\\UnaryMinus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', - 'PhpParser\\Node\\Expr\\UnaryPlus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', - 'PhpParser\\Node\\Expr\\Variable' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', - 'PhpParser\\Node\\Expr\\YieldFrom' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', - 'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', - 'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', - 'PhpParser\\Node\\Identifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', - 'PhpParser\\Node\\IntersectionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', - 'PhpParser\\Node\\MatchArm' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', - 'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', - 'PhpParser\\Node\\Name\\FullyQualified' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', - 'PhpParser\\Node\\Name\\Relative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', - 'PhpParser\\Node\\NullableType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', - 'PhpParser\\Node\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php', - 'PhpParser\\Node\\Scalar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', - 'PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\File' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', - 'PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', - 'PhpParser\\Node\\Stmt' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', - 'PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', - 'PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', - 'PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', - 'PhpParser\\Node\\Stmt\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', - 'PhpParser\\Node\\Stmt\\ClassLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', - 'PhpParser\\Node\\Stmt\\ClassMethod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', - 'PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', - 'PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', - 'PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', - 'PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', - 'PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', - 'PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', - 'PhpParser\\Node\\Stmt\\ElseIf_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', - 'PhpParser\\Node\\Stmt\\Else_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', - 'PhpParser\\Node\\Stmt\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', - 'PhpParser\\Node\\Stmt\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', - 'PhpParser\\Node\\Stmt\\Expression' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', - 'PhpParser\\Node\\Stmt\\Finally_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', - 'PhpParser\\Node\\Stmt\\For_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', - 'PhpParser\\Node\\Stmt\\Foreach_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', - 'PhpParser\\Node\\Stmt\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', - 'PhpParser\\Node\\Stmt\\Global_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', - 'PhpParser\\Node\\Stmt\\Goto_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', - 'PhpParser\\Node\\Stmt\\GroupUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', - 'PhpParser\\Node\\Stmt\\HaltCompiler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', - 'PhpParser\\Node\\Stmt\\If_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', - 'PhpParser\\Node\\Stmt\\InlineHTML' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', - 'PhpParser\\Node\\Stmt\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', - 'PhpParser\\Node\\Stmt\\Label' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', - 'PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', - 'PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', - 'PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', - 'PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', - 'PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', - 'PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', - 'PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', - 'PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', - 'PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', - 'PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', - 'PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', - 'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', - 'PhpParser\\Node\\UnionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', - 'PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', - 'PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', - 'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php', - 'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', - 'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Multiple' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', - 'PhpParser\\Parser\\Php5' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', - 'PhpParser\\Parser\\Php7' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Tokens' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', - 'PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', - 'PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', - 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', - 'PluginInstanciationManager' => __DIR__ . '/../..' . '/core/plugininstanciationmanager.class.inc.php', - 'PluginManager' => __DIR__ . '/../..' . '/core/pluginmanager.class.inc.php', - 'PortalDispatcher' => __DIR__ . '/../..' . '/application/portaldispatcher.class.inc.php', - 'PortalURLMaker' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php', - 'PrintableDataTable' => __DIR__ . '/../..' . '/application/datatable.class.inc.php', - 'ProcessException' => __DIR__ . '/../..' . '/application/exceptions/process/ProcessException.php', - 'ProcessFatalException' => __DIR__ . '/../..' . '/application/exceptions/process/ProcessFatalException.php', - 'ProcessInvalidConfigException' => __DIR__ . '/../..' . '/application/exceptions/process/ProcessInvalidConfigException.php', - 'Psr\\Cache\\CacheException' => __DIR__ . '/..' . '/psr/cache/src/CacheException.php', - 'Psr\\Cache\\CacheItemInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemInterface.php', - 'Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemPoolInterface.php', - 'Psr\\Cache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/cache/src/InvalidArgumentException.php', - 'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php', - 'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php', - 'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php', - 'Psr\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/psr/event-dispatcher/src/EventDispatcherInterface.php', - 'Psr\\EventDispatcher\\ListenerProviderInterface' => __DIR__ . '/..' . '/psr/event-dispatcher/src/ListenerProviderInterface.php', - 'Psr\\EventDispatcher\\StoppableEventInterface' => __DIR__ . '/..' . '/psr/event-dispatcher/src/StoppableEventInterface.php', - 'Psr\\Http\\Client\\ClientExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientExceptionInterface.php', - 'Psr\\Http\\Client\\ClientInterface' => __DIR__ . '/..' . '/psr/http-client/src/ClientInterface.php', - 'Psr\\Http\\Client\\NetworkExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/NetworkExceptionInterface.php', - 'Psr\\Http\\Client\\RequestExceptionInterface' => __DIR__ . '/..' . '/psr/http-client/src/RequestExceptionInterface.php', - 'Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php', - 'Psr\\Http\\Message\\RequestFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/RequestFactoryInterface.php', - 'Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php', - 'Psr\\Http\\Message\\ResponseFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/ResponseFactoryInterface.php', - 'Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php', - 'Psr\\Http\\Message\\ServerRequestFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/ServerRequestFactoryInterface.php', - 'Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/ServerRequestInterface.php', - 'Psr\\Http\\Message\\StreamFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/StreamFactoryInterface.php', - 'Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php', - 'Psr\\Http\\Message\\UploadedFileFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UploadedFileFactoryInterface.php', - 'Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php', - 'Psr\\Http\\Message\\UriFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UriFactoryInterface.php', - 'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php', - 'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php', - 'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php', - 'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php', - 'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php', - 'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php', - 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', - 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', - 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', - 'QRcode' => __DIR__ . '/..' . '/combodo/tcpdf/include/barcodes/qrcode.php', - 'Query' => __DIR__ . '/../..' . '/application/query.class.inc.php', - 'QueryBuilderContext' => __DIR__ . '/../..' . '/core/querybuildercontext.class.inc.php', - 'QueryBuilderExpressions' => __DIR__ . '/../..' . '/core/querybuilderexpressions.class.inc.php', - 'QueryOQL' => __DIR__ . '/../..' . '/application/query.class.inc.php', - 'QueryReflection' => __DIR__ . '/../..' . '/core/modelreflection.class.inc.php', - 'QueryReflectionRuntime' => __DIR__ . '/../..' . '/core/modelreflection.class.inc.php', - 'RelationEdge' => __DIR__ . '/../..' . '/core/relationgraph.class.inc.php', - 'RelationGraph' => __DIR__ . '/../..' . '/core/relationgraph.class.inc.php', - 'RelationObjectNode' => __DIR__ . '/../..' . '/core/relationgraph.class.inc.php', - 'RelationRedundancyNode' => __DIR__ . '/../..' . '/core/relationgraph.class.inc.php', - 'RelationTypeIterator' => __DIR__ . '/../..' . '/core/simplegraph.class.inc.php', - 'RestDelete' => __DIR__ . '/../..' . '/core/restservices.class.inc.php', - 'RestResult' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'RestResultWithObjects' => __DIR__ . '/../..' . '/core/restservices.class.inc.php', - 'RestResultWithRelations' => __DIR__ . '/../..' . '/core/restservices.class.inc.php', - 'RestUtils' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', - 'RotatingLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'RowStatus' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'RowStatus_Disappeared' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'RowStatus_Error' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'RowStatus_Issue' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'RowStatus_Modify' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'RowStatus_NewObj' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'RowStatus_NoChange' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php', - 'RunTimeIconSelectionField' => __DIR__ . '/../..' . '/application/forms.class.inc.php', - 'RuntimeDashboard' => __DIR__ . '/../..' . '/application/dashboard.class.inc.php', - 'SQLExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'SQLObjectQuery' => __DIR__ . '/../..' . '/core/sqlobjectquery.class.inc.php', - 'SQLObjectQueryBuilder' => __DIR__ . '/../..' . '/core/sqlobjectquerybuilder.class.inc.php', - 'SQLQuery' => __DIR__ . '/../..' . '/core/sqlquery.class.inc.php', - 'SQLUnionQuery' => __DIR__ . '/../..' . '/core/sqlunionquery.class.inc.php', - 'SVGDOMSanitizer' => __DIR__ . '/../..' . '/core/htmlsanitizer.class.inc.php', - 'Sabberworm\\CSS\\CSSList\\AtRuleBlockList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php', - 'Sabberworm\\CSS\\CSSList\\CSSBlockList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/CSSBlockList.php', - 'Sabberworm\\CSS\\CSSList\\CSSList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/CSSList.php', - 'Sabberworm\\CSS\\CSSList\\Document' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/Document.php', - 'Sabberworm\\CSS\\CSSList\\KeyFrame' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/CSSList/KeyFrame.php', - 'Sabberworm\\CSS\\Comment\\Comment' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Comment/Comment.php', - 'Sabberworm\\CSS\\Comment\\Commentable' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Comment/Commentable.php', - 'Sabberworm\\CSS\\OutputFormat' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/OutputFormat.php', - 'Sabberworm\\CSS\\OutputFormatter' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/OutputFormatter.php', - 'Sabberworm\\CSS\\Parser' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parser.php', - 'Sabberworm\\CSS\\Parsing\\OutputException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/OutputException.php', - 'Sabberworm\\CSS\\Parsing\\ParserState' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/ParserState.php', - 'Sabberworm\\CSS\\Parsing\\SourceException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/SourceException.php', - 'Sabberworm\\CSS\\Parsing\\UnexpectedEOFException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php', - 'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php', - 'Sabberworm\\CSS\\Property\\AtRule' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/AtRule.php', - 'Sabberworm\\CSS\\Property\\CSSNamespace' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/CSSNamespace.php', - 'Sabberworm\\CSS\\Property\\Charset' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/Charset.php', - 'Sabberworm\\CSS\\Property\\Import' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/Import.php', - 'Sabberworm\\CSS\\Property\\KeyframeSelector' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/KeyframeSelector.php', - 'Sabberworm\\CSS\\Property\\Selector' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Property/Selector.php', - 'Sabberworm\\CSS\\Renderable' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Renderable.php', - 'Sabberworm\\CSS\\RuleSet\\AtRuleSet' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/RuleSet/AtRuleSet.php', - 'Sabberworm\\CSS\\RuleSet\\DeclarationBlock' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/RuleSet/DeclarationBlock.php', - 'Sabberworm\\CSS\\RuleSet\\RuleSet' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/RuleSet/RuleSet.php', - 'Sabberworm\\CSS\\Rule\\Rule' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Rule/Rule.php', - 'Sabberworm\\CSS\\Settings' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Settings.php', - 'Sabberworm\\CSS\\Value\\CSSFunction' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/CSSFunction.php', - 'Sabberworm\\CSS\\Value\\CSSString' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/CSSString.php', - 'Sabberworm\\CSS\\Value\\CalcFunction' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/CalcFunction.php', - 'Sabberworm\\CSS\\Value\\CalcRuleValueList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/CalcRuleValueList.php', - 'Sabberworm\\CSS\\Value\\Color' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/Color.php', - 'Sabberworm\\CSS\\Value\\LineName' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/LineName.php', - 'Sabberworm\\CSS\\Value\\PrimitiveValue' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/PrimitiveValue.php', - 'Sabberworm\\CSS\\Value\\RuleValueList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/RuleValueList.php', - 'Sabberworm\\CSS\\Value\\Size' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/Size.php', - 'Sabberworm\\CSS\\Value\\URL' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/URL.php', - 'Sabberworm\\CSS\\Value\\Value' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/Value.php', - 'Sabberworm\\CSS\\Value\\ValueList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/ValueList.php', - 'ScalarExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'ScalarOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'ScssPhp\\ScssPhp\\Base\\Range' => __DIR__ . '/..' . '/scssphp/scssphp/src/Base/Range.php', - 'ScssPhp\\ScssPhp\\Block' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block.php', - 'ScssPhp\\ScssPhp\\Block\\AtRootBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/AtRootBlock.php', - 'ScssPhp\\ScssPhp\\Block\\CallableBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/CallableBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ContentBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ContentBlock.php', - 'ScssPhp\\ScssPhp\\Block\\DirectiveBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/DirectiveBlock.php', - 'ScssPhp\\ScssPhp\\Block\\EachBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/EachBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ElseBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ElseBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ElseifBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ElseifBlock.php', - 'ScssPhp\\ScssPhp\\Block\\ForBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ForBlock.php', - 'ScssPhp\\ScssPhp\\Block\\IfBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/IfBlock.php', - 'ScssPhp\\ScssPhp\\Block\\MediaBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/MediaBlock.php', - 'ScssPhp\\ScssPhp\\Block\\NestedPropertyBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/NestedPropertyBlock.php', - 'ScssPhp\\ScssPhp\\Block\\WhileBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/WhileBlock.php', - 'ScssPhp\\ScssPhp\\Cache' => __DIR__ . '/..' . '/scssphp/scssphp/src/Cache.php', - 'ScssPhp\\ScssPhp\\Colors' => __DIR__ . '/..' . '/scssphp/scssphp/src/Colors.php', - 'ScssPhp\\ScssPhp\\CompilationResult' => __DIR__ . '/..' . '/scssphp/scssphp/src/CompilationResult.php', - 'ScssPhp\\ScssPhp\\Compiler' => __DIR__ . '/..' . '/scssphp/scssphp/src/Compiler.php', - 'ScssPhp\\ScssPhp\\Compiler\\CachedResult' => __DIR__ . '/..' . '/scssphp/scssphp/src/Compiler/CachedResult.php', - 'ScssPhp\\ScssPhp\\Compiler\\Environment' => __DIR__ . '/..' . '/scssphp/scssphp/src/Compiler/Environment.php', - 'ScssPhp\\ScssPhp\\Exception\\CompilerException' => __DIR__ . '/..' . '/scssphp/scssphp/src/Exception/CompilerException.php', - 'ScssPhp\\ScssPhp\\Exception\\ParserException' => __DIR__ . '/..' . '/scssphp/scssphp/src/Exception/ParserException.php', - 'ScssPhp\\ScssPhp\\Exception\\RangeException' => __DIR__ . '/..' . '/scssphp/scssphp/src/Exception/RangeException.php', - 'ScssPhp\\ScssPhp\\Exception\\SassException' => __DIR__ . '/..' . '/scssphp/scssphp/src/Exception/SassException.php', - 'ScssPhp\\ScssPhp\\Exception\\SassScriptException' => __DIR__ . '/..' . '/scssphp/scssphp/src/Exception/SassScriptException.php', - 'ScssPhp\\ScssPhp\\Exception\\ServerException' => __DIR__ . '/..' . '/scssphp/scssphp/src/Exception/ServerException.php', - 'ScssPhp\\ScssPhp\\Formatter' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter.php', - 'ScssPhp\\ScssPhp\\Formatter\\Compact' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter/Compact.php', - 'ScssPhp\\ScssPhp\\Formatter\\Compressed' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter/Compressed.php', - 'ScssPhp\\ScssPhp\\Formatter\\Crunched' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter/Crunched.php', - 'ScssPhp\\ScssPhp\\Formatter\\Debug' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter/Debug.php', - 'ScssPhp\\ScssPhp\\Formatter\\Expanded' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter/Expanded.php', - 'ScssPhp\\ScssPhp\\Formatter\\Nested' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter/Nested.php', - 'ScssPhp\\ScssPhp\\Formatter\\OutputBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Formatter/OutputBlock.php', - 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' => __DIR__ . '/..' . '/scssphp/scssphp/src/Logger/LoggerInterface.php', - 'ScssPhp\\ScssPhp\\Logger\\QuietLogger' => __DIR__ . '/..' . '/scssphp/scssphp/src/Logger/QuietLogger.php', - 'ScssPhp\\ScssPhp\\Logger\\StreamLogger' => __DIR__ . '/..' . '/scssphp/scssphp/src/Logger/StreamLogger.php', - 'ScssPhp\\ScssPhp\\Node' => __DIR__ . '/..' . '/scssphp/scssphp/src/Node.php', - 'ScssPhp\\ScssPhp\\Node\\Number' => __DIR__ . '/..' . '/scssphp/scssphp/src/Node/Number.php', - 'ScssPhp\\ScssPhp\\OutputStyle' => __DIR__ . '/..' . '/scssphp/scssphp/src/OutputStyle.php', - 'ScssPhp\\ScssPhp\\Parser' => __DIR__ . '/..' . '/scssphp/scssphp/src/Parser.php', - 'ScssPhp\\ScssPhp\\SourceMap\\Base64' => __DIR__ . '/..' . '/scssphp/scssphp/src/SourceMap/Base64.php', - 'ScssPhp\\ScssPhp\\SourceMap\\Base64VLQ' => __DIR__ . '/..' . '/scssphp/scssphp/src/SourceMap/Base64VLQ.php', - 'ScssPhp\\ScssPhp\\SourceMap\\SourceMapGenerator' => __DIR__ . '/..' . '/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php', - 'ScssPhp\\ScssPhp\\Type' => __DIR__ . '/..' . '/scssphp/scssphp/src/Type.php', - 'ScssPhp\\ScssPhp\\Util' => __DIR__ . '/..' . '/scssphp/scssphp/src/Util.php', - 'ScssPhp\\ScssPhp\\Util\\Path' => __DIR__ . '/..' . '/scssphp/scssphp/src/Util/Path.php', - 'ScssPhp\\ScssPhp\\ValueConverter' => __DIR__ . '/..' . '/scssphp/scssphp/src/ValueConverter.php', - 'ScssPhp\\ScssPhp\\Version' => __DIR__ . '/..' . '/scssphp/scssphp/src/Version.php', - 'ScssPhp\\ScssPhp\\Warn' => __DIR__ . '/..' . '/scssphp/scssphp/src/Warn.php', - 'SearchMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'SecurityException' => __DIR__ . '/../..' . '/application/exceptions/SecurityException.php', - 'SeparatorPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'SetupLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'Shortcut' => __DIR__ . '/../..' . '/application/shortcut.class.inc.php', - 'ShortcutContainerMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'ShortcutMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'ShortcutOQL' => __DIR__ . '/../..' . '/application/shortcut.class.inc.php', - 'SimpleCrypt' => __DIR__ . '/../..' . '/core/simplecrypt.class.inc.php', - 'SimpleCryptMcryptEngine' => __DIR__ . '/../..' . '/core/simplecrypt.class.inc.php', - 'SimpleCryptOpenSSLEngine' => __DIR__ . '/../..' . '/core/simplecrypt.class.inc.php', - 'SimpleCryptOpenSSLMcryptCompatibilityEngine' => __DIR__ . '/../..' . '/core/simplecrypt.class.inc.php', - 'SimpleCryptSimpleEngine' => __DIR__ . '/../..' . '/core/simplecrypt.class.inc.php', - 'SimpleCryptSodiumEngine' => __DIR__ . '/../..' . '/core/simplecrypt.class.inc.php', - 'SimpleGraph' => __DIR__ . '/../..' . '/core/simplegraph.class.inc.php', - 'SimpleGraphException' => __DIR__ . '/../..' . '/core/simplegraph.class.inc.php', - 'SpreadsheetBulkExport' => __DIR__ . '/../..' . '/core/spreadsheetbulkexport.class.inc.php', - 'StimulusChecker' => __DIR__ . '/../..' . '/core/userrights.class.inc.php', - 'StimulusInternal' => __DIR__ . '/../..' . '/core/stimulus.class.inc.php', - 'StimulusUserAction' => __DIR__ . '/../..' . '/core/stimulus.class.inc.php', - 'Str' => __DIR__ . '/../..' . '/core/MyHelpers.class.inc.php', - 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', - 'SummaryCardService' => __DIR__ . '/../..' . '/sources/Service/SummaryCard/SummaryCardService.php', - 'Symfony\\Bridge\\Twig\\AppVariable' => __DIR__ . '/..' . '/symfony/twig-bridge/AppVariable.php', - 'Symfony\\Bridge\\Twig\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/twig-bridge/Command/DebugCommand.php', - 'Symfony\\Bridge\\Twig\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/twig-bridge/Command/LintCommand.php', - 'Symfony\\Bridge\\Twig\\DataCollector\\TwigDataCollector' => __DIR__ . '/..' . '/symfony/twig-bridge/DataCollector/TwigDataCollector.php', - 'Symfony\\Bridge\\Twig\\ErrorRenderer\\TwigErrorRenderer' => __DIR__ . '/..' . '/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php', - 'Symfony\\Bridge\\Twig\\Extension\\AssetExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/AssetExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CodeExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/CodeExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/CsrfExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfRuntime' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/CsrfRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\DumpExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/DumpExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ExpressionExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/ExpressionExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\FormExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/FormExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpFoundationExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/HttpFoundationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/HttpKernelExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelRuntime' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/HttpKernelRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\LogoutUrlExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/LogoutUrlExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/ProfilerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\RoutingExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/RoutingExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SecurityExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/SecurityExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/SerializerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerRuntime' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/SerializerRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\StopwatchExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/StopwatchExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\TranslationExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/TranslationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WebLinkExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/WebLinkExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WorkflowExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/WorkflowExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\YamlExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/YamlExtension.php', - 'Symfony\\Bridge\\Twig\\Form\\TwigRendererEngine' => __DIR__ . '/..' . '/symfony/twig-bridge/Form/TwigRendererEngine.php', - 'Symfony\\Bridge\\Twig\\Mime\\BodyRenderer' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/BodyRenderer.php', - 'Symfony\\Bridge\\Twig\\Mime\\NotificationEmail' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/NotificationEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/TemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\WrappedTemplatedEmail' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\Scope' => __DIR__ . '/..' . '/symfony/twig-bridge/NodeVisitor/Scope.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationDefaultDomainNodeVisitor' => __DIR__ . '/..' . '/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationNodeVisitor' => __DIR__ . '/..' . '/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\Node\\DumpNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/DumpNode.php', - 'Symfony\\Bridge\\Twig\\Node\\FormThemeNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/FormThemeNode.php', - 'Symfony\\Bridge\\Twig\\Node\\RenderBlockNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/RenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\SearchAndRenderBlockNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\StopwatchNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/StopwatchNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransDefaultDomainNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/TransDefaultDomainNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/TransNode.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\DumpTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/DumpTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\FormThemeTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\StopwatchTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransDefaultDomainTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/TransTokenParser.php', - 'Symfony\\Bridge\\Twig\\Translation\\TwigExtractor' => __DIR__ . '/..' . '/symfony/twig-bridge/Translation/TwigExtractor.php', - 'Symfony\\Bridge\\Twig\\UndefinedCallableHandler' => __DIR__ . '/..' . '/symfony/twig-bridge/UndefinedCallableHandler.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AbstractPhpFileCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AnnotationsCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\CachePoolClearerCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ConfigBuilderCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\SerializerCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TranslationsCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ValidatorCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AboutCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/AboutCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AbstractConfigCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/AbstractConfigCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AssetsInstallCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/AssetsInstallCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\BuildDebugContainerTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/BuildDebugContainerTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CacheClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolClearCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolDeleteCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolDeleteCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolListCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolPruneCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolPruneCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheWarmupCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CacheWarmupCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ConfigDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDumpReferenceCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ContainerDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerLintCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ContainerLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\DebugAutowiringCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/DebugAutowiringCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\EventDispatcherDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/RouterDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterMatchCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/RouterMatchCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsDecryptToLocalCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsEncryptFromLocalCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsGenerateKeysCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsListCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRemoveCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsRemoveCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsSetCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsSetCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/TranslationDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationUpdateCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/TranslationUpdateCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\WorkflowDumpCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/WorkflowDumpCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\XliffLintCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/XliffLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\YamlLintCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/YamlLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Application' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Application.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/Descriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Helper/DescriptorHelper.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/AbstractController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/ControllerResolver.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/RedirectController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/TemplateController.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\AbstractDataCollector' => __DIR__ . '/..' . '/symfony/framework-bundle/DataCollector/AbstractDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector' => __DIR__ . '/..' . '/symfony/framework-bundle/DataCollector/RouterDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\TemplateAwareDataCollectorInterface' => __DIR__ . '/..' . '/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddAnnotationsCachedReaderPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddDebugLogProcessorPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddExpressionLanguageProvidersPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AssetsContextPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ContainerBuilderDebugDumpPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\DataCollectorTranslatorPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\LoggingTranslatorPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ProfilerPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\RemoveUnusedSessionMarshallingHandlerPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\SessionPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerRealRefPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerWeakRefPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\UnusedTagsPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\WorkflowGuardListenerPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\FrameworkExtension' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php', - 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SuggestMissingPackageSubscriber' => __DIR__ . '/..' . '/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php', - 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' => __DIR__ . '/..' . '/symfony/framework-bundle/FrameworkBundle.php', - 'Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache' => __DIR__ . '/..' . '/symfony/framework-bundle/HttpCache/HttpCache.php', - 'Symfony\\Bundle\\FrameworkBundle\\KernelBrowser' => __DIR__ . '/..' . '/symfony/framework-bundle/KernelBrowser.php', - 'Symfony\\Bundle\\FrameworkBundle\\Kernel\\MicroKernelTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Kernel/MicroKernelTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\AnnotatedRouteControllerLoader' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/DelegatingLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableCompiledUrlMatcher' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RouteLoaderInterface' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/RouteLoaderInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\Router' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/Router.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\AbstractVault' => __DIR__ . '/..' . '/symfony/framework-bundle/Secrets/AbstractVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\DotenvVault' => __DIR__ . '/..' . '/symfony/framework-bundle/Secrets/DotenvVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\SodiumVault' => __DIR__ . '/..' . '/symfony/framework-bundle/Secrets/SodiumVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\DeprecatedSessionFactory' => __DIR__ . '/..' . '/symfony/framework-bundle/Session/DeprecatedSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\ServiceSessionFactory' => __DIR__ . '/..' . '/symfony/framework-bundle/Session/ServiceSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator' => __DIR__ . '/..' . '/symfony/framework-bundle/Translation/Translator.php', - 'Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer' => __DIR__ . '/..' . '/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php', - 'Symfony\\Bundle\\TwigBundle\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/twig-bundle/Command/LintCommand.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\ExtensionPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\RuntimeLoaderPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigEnvironmentPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigLoaderPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configurator\\EnvironmentConfigurator' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\TwigExtension' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/TwigExtension.php', - 'Symfony\\Bundle\\TwigBundle\\TemplateIterator' => __DIR__ . '/..' . '/symfony/twig-bundle/TemplateIterator.php', - 'Symfony\\Bundle\\TwigBundle\\TwigBundle' => __DIR__ . '/..' . '/symfony/twig-bundle/TwigBundle.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ExceptionPanelController' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Controller/ProfilerController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\RouterController' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Controller/RouterController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\ContentSecurityPolicyHandler' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\NonceGenerator' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Csp/NonceGenerator.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\WebProfilerExtension' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\EventListener\\WebDebugToolbarListener' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Profiler\\TemplateManager' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Profiler/TemplateManager.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\WebProfilerBundle' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/WebProfilerBundle.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/AbstractAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/AbstractTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AdapterInterface' => __DIR__ . '/..' . '/symfony/cache/Adapter/AdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\ApcuAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ApcuAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ArrayAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ChainAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ChainAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseBucketAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/CouchbaseBucketAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseCollectionAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/CouchbaseCollectionAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/DoctrineAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineDbalAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/DoctrineDbalAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/FilesystemAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/FilesystemTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\MemcachedAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/MemcachedAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\NullAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/NullAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ParameterNormalizer' => __DIR__ . '/..' . '/symfony/cache/Adapter/ParameterNormalizer.php', - 'Symfony\\Component\\Cache\\Adapter\\PdoAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/PdoAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/PhpArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpFilesAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/PhpFilesAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ProxyAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ProxyAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\Psr16Adapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/Psr16Adapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/RedisAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/RedisTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapterInterface' => __DIR__ . '/..' . '/symfony/cache/Adapter/TagAwareAdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TraceableAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TraceableTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\CacheItem' => __DIR__ . '/..' . '/symfony/cache/CacheItem.php', - 'Symfony\\Component\\Cache\\DataCollector\\CacheDataCollector' => __DIR__ . '/..' . '/symfony/cache/DataCollector/CacheDataCollector.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CacheCollectorPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CacheCollectorPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolClearerPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CachePoolClearerPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CachePoolPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPrunerPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CachePoolPrunerPass.php', - 'Symfony\\Component\\Cache\\DoctrineProvider' => __DIR__ . '/..' . '/symfony/cache/DoctrineProvider.php', - 'Symfony\\Component\\Cache\\Exception\\CacheException' => __DIR__ . '/..' . '/symfony/cache/Exception/CacheException.php', - 'Symfony\\Component\\Cache\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/cache/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Cache\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/cache/Exception/LogicException.php', - 'Symfony\\Component\\Cache\\LockRegistry' => __DIR__ . '/..' . '/symfony/cache/LockRegistry.php', - 'Symfony\\Component\\Cache\\Marshaller\\DefaultMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/DefaultMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\DeflateMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/DeflateMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\MarshallerInterface' => __DIR__ . '/..' . '/symfony/cache/Marshaller/MarshallerInterface.php', - 'Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/SodiumMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\TagAwareMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/TagAwareMarshaller.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationDispatcher' => __DIR__ . '/..' . '/symfony/cache/Messenger/EarlyExpirationDispatcher.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationHandler' => __DIR__ . '/..' . '/symfony/cache/Messenger/EarlyExpirationHandler.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationMessage' => __DIR__ . '/..' . '/symfony/cache/Messenger/EarlyExpirationMessage.php', - 'Symfony\\Component\\Cache\\PruneableInterface' => __DIR__ . '/..' . '/symfony/cache/PruneableInterface.php', - 'Symfony\\Component\\Cache\\Psr16Cache' => __DIR__ . '/..' . '/symfony/cache/Psr16Cache.php', - 'Symfony\\Component\\Cache\\ResettableInterface' => __DIR__ . '/..' . '/symfony/cache/ResettableInterface.php', - 'Symfony\\Component\\Cache\\Traits\\AbstractAdapterTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/AbstractAdapterTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ContractsTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/ContractsTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemCommonTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/FilesystemCommonTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/FilesystemTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ProxyTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/ProxyTrait.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterNodeProxy' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisClusterNodeProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterProxy' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisClusterProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisProxy' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisTrait.php', - 'Symfony\\Component\\Config\\Builder\\ClassBuilder' => __DIR__ . '/..' . '/symfony/config/Builder/ClassBuilder.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGenerator' => __DIR__ . '/..' . '/symfony/config/Builder/ConfigBuilderGenerator.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGeneratorInterface' => __DIR__ . '/..' . '/symfony/config/Builder/ConfigBuilderGeneratorInterface.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderInterface' => __DIR__ . '/..' . '/symfony/config/Builder/ConfigBuilderInterface.php', - 'Symfony\\Component\\Config\\Builder\\Method' => __DIR__ . '/..' . '/symfony/config/Builder/Method.php', - 'Symfony\\Component\\Config\\Builder\\Property' => __DIR__ . '/..' . '/symfony/config/Builder/Property.php', - 'Symfony\\Component\\Config\\ConfigCache' => __DIR__ . '/..' . '/symfony/config/ConfigCache.php', - 'Symfony\\Component\\Config\\ConfigCacheFactory' => __DIR__ . '/..' . '/symfony/config/ConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ConfigCacheFactoryInterface' => __DIR__ . '/..' . '/symfony/config/ConfigCacheFactoryInterface.php', - 'Symfony\\Component\\Config\\ConfigCacheInterface' => __DIR__ . '/..' . '/symfony/config/ConfigCacheInterface.php', - 'Symfony\\Component\\Config\\Definition\\ArrayNode' => __DIR__ . '/..' . '/symfony/config/Definition/ArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\BaseNode' => __DIR__ . '/..' . '/symfony/config/Definition/BaseNode.php', - 'Symfony\\Component\\Config\\Definition\\BooleanNode' => __DIR__ . '/..' . '/symfony/config/Definition/BooleanNode.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ArrayNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BooleanNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/BooleanNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BuilderAwareInterface' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/BuilderAwareInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\EnumNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/EnumNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ExprBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ExprBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\FloatNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/FloatNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\IntegerNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/IntegerNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\MergeBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/MergeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NodeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NodeParentInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NormalizationBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NormalizationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NumericNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NumericNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ParentNodeDefinitionInterface' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ScalarNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ScalarNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/TreeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ValidationBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ValidationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\VariableNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/VariableNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\ConfigurationInterface' => __DIR__ . '/..' . '/symfony/config/Definition/ConfigurationInterface.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\XmlReferenceDumper' => __DIR__ . '/..' . '/symfony/config/Definition/Dumper/XmlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\YamlReferenceDumper' => __DIR__ . '/..' . '/symfony/config/Definition/Dumper/YamlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\EnumNode' => __DIR__ . '/..' . '/symfony/config/Definition/EnumNode.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\DuplicateKeyException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/DuplicateKeyException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\Exception' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/Exception.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\ForbiddenOverwriteException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/ForbiddenOverwriteException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidDefinitionException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/InvalidDefinitionException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/InvalidTypeException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\UnsetKeyException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/UnsetKeyException.php', - 'Symfony\\Component\\Config\\Definition\\FloatNode' => __DIR__ . '/..' . '/symfony/config/Definition/FloatNode.php', - 'Symfony\\Component\\Config\\Definition\\IntegerNode' => __DIR__ . '/..' . '/symfony/config/Definition/IntegerNode.php', - 'Symfony\\Component\\Config\\Definition\\NodeInterface' => __DIR__ . '/..' . '/symfony/config/Definition/NodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\NumericNode' => __DIR__ . '/..' . '/symfony/config/Definition/NumericNode.php', - 'Symfony\\Component\\Config\\Definition\\Processor' => __DIR__ . '/..' . '/symfony/config/Definition/Processor.php', - 'Symfony\\Component\\Config\\Definition\\PrototypeNodeInterface' => __DIR__ . '/..' . '/symfony/config/Definition/PrototypeNodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\PrototypedArrayNode' => __DIR__ . '/..' . '/symfony/config/Definition/PrototypedArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\ScalarNode' => __DIR__ . '/..' . '/symfony/config/Definition/ScalarNode.php', - 'Symfony\\Component\\Config\\Definition\\VariableNode' => __DIR__ . '/..' . '/symfony/config/Definition/VariableNode.php', - 'Symfony\\Component\\Config\\Exception\\FileLoaderImportCircularReferenceException' => __DIR__ . '/..' . '/symfony/config/Exception/FileLoaderImportCircularReferenceException.php', - 'Symfony\\Component\\Config\\Exception\\FileLocatorFileNotFoundException' => __DIR__ . '/..' . '/symfony/config/Exception/FileLocatorFileNotFoundException.php', - 'Symfony\\Component\\Config\\Exception\\LoaderLoadException' => __DIR__ . '/..' . '/symfony/config/Exception/LoaderLoadException.php', - 'Symfony\\Component\\Config\\FileLocator' => __DIR__ . '/..' . '/symfony/config/FileLocator.php', - 'Symfony\\Component\\Config\\FileLocatorInterface' => __DIR__ . '/..' . '/symfony/config/FileLocatorInterface.php', - 'Symfony\\Component\\Config\\Loader\\DelegatingLoader' => __DIR__ . '/..' . '/symfony/config/Loader/DelegatingLoader.php', - 'Symfony\\Component\\Config\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/config/Loader/FileLoader.php', - 'Symfony\\Component\\Config\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/config/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Config\\Loader\\Loader' => __DIR__ . '/..' . '/symfony/config/Loader/Loader.php', - 'Symfony\\Component\\Config\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/symfony/config/Loader/LoaderInterface.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolver' => __DIR__ . '/..' . '/symfony/config/Loader/LoaderResolver.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolverInterface' => __DIR__ . '/..' . '/symfony/config/Loader/LoaderResolverInterface.php', - 'Symfony\\Component\\Config\\Loader\\ParamConfigurator' => __DIR__ . '/..' . '/symfony/config/Loader/ParamConfigurator.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCache' => __DIR__ . '/..' . '/symfony/config/ResourceCheckerConfigCache.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory' => __DIR__ . '/..' . '/symfony/config/ResourceCheckerConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ResourceCheckerInterface' => __DIR__ . '/..' . '/symfony/config/ResourceCheckerInterface.php', - 'Symfony\\Component\\Config\\Resource\\ClassExistenceResource' => __DIR__ . '/..' . '/symfony/config/Resource/ClassExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\ComposerResource' => __DIR__ . '/..' . '/symfony/config/Resource/ComposerResource.php', - 'Symfony\\Component\\Config\\Resource\\DirectoryResource' => __DIR__ . '/..' . '/symfony/config/Resource/DirectoryResource.php', - 'Symfony\\Component\\Config\\Resource\\FileExistenceResource' => __DIR__ . '/..' . '/symfony/config/Resource/FileExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\FileResource' => __DIR__ . '/..' . '/symfony/config/Resource/FileResource.php', - 'Symfony\\Component\\Config\\Resource\\GlobResource' => __DIR__ . '/..' . '/symfony/config/Resource/GlobResource.php', - 'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php', - 'Symfony\\Component\\Config\\Resource\\ResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/ResourceInterface.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceChecker.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceInterface.php', - 'Symfony\\Component\\Config\\Util\\Exception\\InvalidXmlException' => __DIR__ . '/..' . '/symfony/config/Util/Exception/InvalidXmlException.php', - 'Symfony\\Component\\Config\\Util\\Exception\\XmlParsingException' => __DIR__ . '/..' . '/symfony/config/Util/Exception/XmlParsingException.php', - 'Symfony\\Component\\Config\\Util\\XmlUtils' => __DIR__ . '/..' . '/symfony/config/Util/XmlUtils.php', - 'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php', - 'Symfony\\Component\\Console\\Attribute\\AsCommand' => __DIR__ . '/..' . '/symfony/console/Attribute/AsCommand.php', - 'Symfony\\Component\\Console\\CI\\GithubActionReporter' => __DIR__ . '/..' . '/symfony/console/CI/GithubActionReporter.php', - 'Symfony\\Component\\Console\\Color' => __DIR__ . '/..' . '/symfony/console/Color.php', - 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php', - 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php', - 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/FactoryCommandLoader.php', - 'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php', - 'Symfony\\Component\\Console\\Command\\CompleteCommand' => __DIR__ . '/..' . '/symfony/console/Command/CompleteCommand.php', - 'Symfony\\Component\\Console\\Command\\DumpCompletionCommand' => __DIR__ . '/..' . '/symfony/console/Command/DumpCompletionCommand.php', - 'Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php', - 'Symfony\\Component\\Console\\Command\\LazyCommand' => __DIR__ . '/..' . '/symfony/console/Command/LazyCommand.php', - 'Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php', - 'Symfony\\Component\\Console\\Command\\LockableTrait' => __DIR__ . '/..' . '/symfony/console/Command/LockableTrait.php', - 'Symfony\\Component\\Console\\Command\\SignalableCommandInterface' => __DIR__ . '/..' . '/symfony/console/Command/SignalableCommandInterface.php', - 'Symfony\\Component\\Console\\Completion\\CompletionInput' => __DIR__ . '/..' . '/symfony/console/Completion/CompletionInput.php', - 'Symfony\\Component\\Console\\Completion\\CompletionSuggestions' => __DIR__ . '/..' . '/symfony/console/Completion/CompletionSuggestions.php', - 'Symfony\\Component\\Console\\Completion\\Output\\BashCompletionOutput' => __DIR__ . '/..' . '/symfony/console/Completion/Output/BashCompletionOutput.php', - 'Symfony\\Component\\Console\\Completion\\Output\\CompletionOutputInterface' => __DIR__ . '/..' . '/symfony/console/Completion/Output/CompletionOutputInterface.php', - 'Symfony\\Component\\Console\\Completion\\Suggestion' => __DIR__ . '/..' . '/symfony/console/Completion/Suggestion.php', - 'Symfony\\Component\\Console\\ConsoleEvents' => __DIR__ . '/..' . '/symfony/console/ConsoleEvents.php', - 'Symfony\\Component\\Console\\Cursor' => __DIR__ . '/..' . '/symfony/console/Cursor.php', - 'Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => __DIR__ . '/..' . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php', - 'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => __DIR__ . '/..' . '/symfony/console/Descriptor/ApplicationDescription.php', - 'Symfony\\Component\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => __DIR__ . '/..' . '/symfony/console/Descriptor/DescriptorInterface.php', - 'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/XmlDescriptor.php', - 'Symfony\\Component\\Console\\EventListener\\ErrorListener' => __DIR__ . '/..' . '/symfony/console/EventListener/ErrorListener.php', - 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleCommandEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleErrorEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleSignalEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleTerminateEvent.php', - 'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/CommandNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/console/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidOptionException.php', - 'Symfony\\Component\\Console\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/console/Exception/LogicException.php', - 'Symfony\\Component\\Console\\Exception\\MissingInputException' => __DIR__ . '/..' . '/symfony/console/Exception/MissingInputException.php', - 'Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/NamespaceNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/console/Exception/RuntimeException.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/NullOutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/NullOutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleStack.php', - 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DebugFormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Console\\Helper\\Dumper' => __DIR__ . '/..' . '/symfony/console/Helper/Dumper.php', - 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/..' . '/symfony/console/Helper/Helper.php', - 'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php', - 'Symfony\\Component\\Console\\Helper\\HelperSet' => __DIR__ . '/..' . '/symfony/console/Helper/HelperSet.php', - 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => __DIR__ . '/..' . '/symfony/console/Helper/InputAwareHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => __DIR__ . '/..' . '/symfony/console/Helper/ProcessHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProgressBar' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressBar.php', - 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressIndicator.php', - 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/QuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/SymfonyQuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\Table' => __DIR__ . '/..' . '/symfony/console/Helper/Table.php', - 'Symfony\\Component\\Console\\Helper\\TableCell' => __DIR__ . '/..' . '/symfony/console/Helper/TableCell.php', - 'Symfony\\Component\\Console\\Helper\\TableCellStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableCellStyle.php', - 'Symfony\\Component\\Console\\Helper\\TableRows' => __DIR__ . '/..' . '/symfony/console/Helper/TableRows.php', - 'Symfony\\Component\\Console\\Helper\\TableSeparator' => __DIR__ . '/..' . '/symfony/console/Helper/TableSeparator.php', - 'Symfony\\Component\\Console\\Helper\\TableStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableStyle.php', - 'Symfony\\Component\\Console\\Input\\ArgvInput' => __DIR__ . '/..' . '/symfony/console/Input/ArgvInput.php', - 'Symfony\\Component\\Console\\Input\\ArrayInput' => __DIR__ . '/..' . '/symfony/console/Input/ArrayInput.php', - 'Symfony\\Component\\Console\\Input\\Input' => __DIR__ . '/..' . '/symfony/console/Input/Input.php', - 'Symfony\\Component\\Console\\Input\\InputArgument' => __DIR__ . '/..' . '/symfony/console/Input/InputArgument.php', - 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputAwareInterface.php', - 'Symfony\\Component\\Console\\Input\\InputDefinition' => __DIR__ . '/..' . '/symfony/console/Input/InputDefinition.php', - 'Symfony\\Component\\Console\\Input\\InputInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputInterface.php', - 'Symfony\\Component\\Console\\Input\\InputOption' => __DIR__ . '/..' . '/symfony/console/Input/InputOption.php', - 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => __DIR__ . '/..' . '/symfony/console/Input/StreamableInputInterface.php', - 'Symfony\\Component\\Console\\Input\\StringInput' => __DIR__ . '/..' . '/symfony/console/Input/StringInput.php', - 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => __DIR__ . '/..' . '/symfony/console/Logger/ConsoleLogger.php', - 'Symfony\\Component\\Console\\Output\\BufferedOutput' => __DIR__ . '/..' . '/symfony/console/Output/BufferedOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutputInterface.php', - 'Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleSectionOutput.php', - 'Symfony\\Component\\Console\\Output\\NullOutput' => __DIR__ . '/..' . '/symfony/console/Output/NullOutput.php', - 'Symfony\\Component\\Console\\Output\\Output' => __DIR__ . '/..' . '/symfony/console/Output/Output.php', - 'Symfony\\Component\\Console\\Output\\OutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/OutputInterface.php', - 'Symfony\\Component\\Console\\Output\\StreamOutput' => __DIR__ . '/..' . '/symfony/console/Output/StreamOutput.php', - 'Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => __DIR__ . '/..' . '/symfony/console/Output/TrimmedBufferOutput.php', - 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ChoiceQuestion.php', - 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ConfirmationQuestion.php', - 'Symfony\\Component\\Console\\Question\\Question' => __DIR__ . '/..' . '/symfony/console/Question/Question.php', - 'Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry' => __DIR__ . '/..' . '/symfony/console/SignalRegistry/SignalRegistry.php', - 'Symfony\\Component\\Console\\SingleCommandApplication' => __DIR__ . '/..' . '/symfony/console/SingleCommandApplication.php', - 'Symfony\\Component\\Console\\Style\\OutputStyle' => __DIR__ . '/..' . '/symfony/console/Style/OutputStyle.php', - 'Symfony\\Component\\Console\\Style\\StyleInterface' => __DIR__ . '/..' . '/symfony/console/Style/StyleInterface.php', - 'Symfony\\Component\\Console\\Style\\SymfonyStyle' => __DIR__ . '/..' . '/symfony/console/Style/SymfonyStyle.php', - 'Symfony\\Component\\Console\\Terminal' => __DIR__ . '/..' . '/symfony/console/Terminal.php', - 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => __DIR__ . '/..' . '/symfony/console/Tester/ApplicationTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandCompletionTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandCompletionTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandTester.php', - 'Symfony\\Component\\Console\\Tester\\Constraint\\CommandIsSuccessful' => __DIR__ . '/..' . '/symfony/console/Tester/Constraint/CommandIsSuccessful.php', - 'Symfony\\Component\\Console\\Tester\\TesterTrait' => __DIR__ . '/..' . '/symfony/console/Tester/TesterTrait.php', - 'Symfony\\Component\\CssSelector\\CssSelectorConverter' => __DIR__ . '/..' . '/symfony/css-selector/CssSelectorConverter.php', - 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/css-selector/Exception/ExceptionInterface.php', - 'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/ExpressionErrorException.php', - 'Symfony\\Component\\CssSelector\\Exception\\InternalErrorException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/InternalErrorException.php', - 'Symfony\\Component\\CssSelector\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/ParseException.php', - 'Symfony\\Component\\CssSelector\\Exception\\SyntaxErrorException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/SyntaxErrorException.php', - 'Symfony\\Component\\CssSelector\\Node\\AbstractNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/AbstractNode.php', - 'Symfony\\Component\\CssSelector\\Node\\AttributeNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/AttributeNode.php', - 'Symfony\\Component\\CssSelector\\Node\\ClassNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/ClassNode.php', - 'Symfony\\Component\\CssSelector\\Node\\CombinedSelectorNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/CombinedSelectorNode.php', - 'Symfony\\Component\\CssSelector\\Node\\ElementNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/ElementNode.php', - 'Symfony\\Component\\CssSelector\\Node\\FunctionNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/FunctionNode.php', - 'Symfony\\Component\\CssSelector\\Node\\HashNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/HashNode.php', - 'Symfony\\Component\\CssSelector\\Node\\NegationNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/NegationNode.php', - 'Symfony\\Component\\CssSelector\\Node\\NodeInterface' => __DIR__ . '/..' . '/symfony/css-selector/Node/NodeInterface.php', - 'Symfony\\Component\\CssSelector\\Node\\PseudoNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/PseudoNode.php', - 'Symfony\\Component\\CssSelector\\Node\\SelectorNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/SelectorNode.php', - 'Symfony\\Component\\CssSelector\\Node\\Specificity' => __DIR__ . '/..' . '/symfony/css-selector/Node/Specificity.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\CommentHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/CommentHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/HandlerInterface.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HashHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/HashHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\IdentifierHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/IdentifierHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\NumberHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/NumberHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\StringHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/StringHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\WhitespaceHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/WhitespaceHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Parser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Parser.php', - 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' => __DIR__ . '/..' . '/symfony/css-selector/Parser/ParserInterface.php', - 'Symfony\\Component\\CssSelector\\Parser\\Reader' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Reader.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ClassParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/ClassParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ElementParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/ElementParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\EmptyStringParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\HashParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/HashParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Token' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Token.php', - 'Symfony\\Component\\CssSelector\\Parser\\TokenStream' => __DIR__ . '/..' . '/symfony/css-selector/Parser/TokenStream.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Tokenizer/Tokenizer.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerEscaping' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerPatterns' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/AbstractExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AttributeMatchingExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\CombinationExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/CombinationExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/ExtensionInterface.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\FunctionExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/FunctionExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\HtmlExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/HtmlExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\NodeExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/NodeExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\PseudoClassExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/PseudoClassExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Translator' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Translator.php', - 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/css-selector/XPath/TranslatorInterface.php', - 'Symfony\\Component\\CssSelector\\XPath\\XPathExpr' => __DIR__ . '/..' . '/symfony/css-selector/XPath/XPathExpr.php', - 'Symfony\\Component\\DependencyInjection\\Alias' => __DIR__ . '/..' . '/symfony/dependency-injection/Alias.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\AbstractArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/AbstractArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ArgumentInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ArgumentInterface.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\BoundArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/BoundArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\IteratorArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/IteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ReferenceSetArgumentTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\RewindableGenerator' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/RewindableGenerator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceClosureArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ServiceClosureArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocatorArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ServiceLocatorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\TaggedIteratorArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/TaggedIteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AsTaggedItem' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/AsTaggedItem.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Autoconfigure' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/Autoconfigure.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AutoconfigureTag' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/AutoconfigureTag.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/TaggedIterator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/TaggedLocator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Target' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/Target.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\When' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/When.php', - 'Symfony\\Component\\DependencyInjection\\ChildDefinition' => __DIR__ . '/..' . '/symfony/dependency-injection/ChildDefinition.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AbstractRecursivePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AliasDeprecatedPublicServicesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AnalyzeServiceReferencesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AttributeAutoconfigurationPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutoAliasServicePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutoAliasServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowirePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutowirePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredMethodsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredPropertiesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckArgumentsValidityPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckCircularReferencesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckDefinitionValidityPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckReferenceValidityPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckTypeDeclarationsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\Compiler' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/Compiler.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CompilerPassInterface.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DecoratorServicePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/DecoratorServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DefinitionErrorExceptionPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ExtensionCompilerPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PassConfig.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterAutoconfigureAttributesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterEnvVarProcessorsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterReverseContainerPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterServiceSubscribersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveAbstractDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemovePrivateAliasesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveUnusedDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ReplaceAliasByActualDefinitionPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveBindingsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveBindingsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveChildDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveClassPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveDecoratorStackPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveEnvPlaceholdersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveFactoryClassPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveHotPathPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveHotPathPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInstanceofConditionalsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInvalidReferencesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNamedArgumentsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNoPreloadPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveParameterPlaceHoldersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolvePrivatesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveReferencesToAliasesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveServiceSubscribersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveTaggedIteratorArgumentPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceLocatorTagPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraph' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphEdge' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphNode' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ValidateEnvPlaceholdersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResource' => __DIR__ . '/..' . '/symfony/dependency-injection/Config/ContainerParametersResource.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResourceChecker' => __DIR__ . '/..' . '/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php', - 'Symfony\\Component\\DependencyInjection\\Container' => __DIR__ . '/..' . '/symfony/dependency-injection/Container.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerAwareInterface.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerAwareTrait.php', - 'Symfony\\Component\\DependencyInjection\\ContainerBuilder' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerBuilder.php', - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\Definition' => __DIR__ . '/..' . '/symfony/dependency-injection/Definition.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Dumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/Dumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\DumperInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\GraphvizDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/GraphvizDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\PhpDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/PhpDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Preloader' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/Preloader.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\XmlDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/XmlDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\YamlDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/YamlDumper.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarLoaderInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/EnvVarLoaderInterface.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessor' => __DIR__ . '/..' . '/symfony/dependency-injection/EnvVarProcessor.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessorInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/EnvVarProcessorInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/AutowiringFailedException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/BadMethodCallException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvNotFoundException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/EnvNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvParameterException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/EnvParameterException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ExceptionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidParameterTypeException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/InvalidParameterTypeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/LogicException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterCircularReferenceException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ParameterNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/RuntimeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ServiceNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguage' => __DIR__ . '/..' . '/symfony/dependency-injection/ExpressionLanguage.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguageProvider' => __DIR__ . '/..' . '/symfony/dependency-injection/ExpressionLanguageProvider.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ConfigurationExtensionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\Extension' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/Extension.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/ExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\PrependExtensionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/PrependExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\InstantiatorInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\RealServiceInstantiator' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\DumperInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\NullDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\ProxyHelper' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/ProxyHelper.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\ClosureLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/ClosureLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractServiceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AliasConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ClosureReferenceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\DefaultsConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\EnvConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InlineServiceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InstanceofConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ParametersConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\PrototypeConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ReferenceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServiceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServicesConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AbstractTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ArgumentTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutoconfigureTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutowireTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\BindTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\CallTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ClassTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ConfiguratorTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DecorateTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DeprecateTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FactoryTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FileTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\LazyTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ParentTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PropertyTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PublicTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ShareTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\SyntheticTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\TagTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\DirectoryLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/DirectoryLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/FileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/GlobFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/IniFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/PhpFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/XmlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/YamlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Parameter' => __DIR__ . '/..' . '/symfony/dependency-injection/Parameter.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ContainerBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBagInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\EnvPlaceholderParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\Reference' => __DIR__ . '/..' . '/symfony/dependency-injection/Reference.php', - 'Symfony\\Component\\DependencyInjection\\ReverseContainer' => __DIR__ . '/..' . '/symfony/dependency-injection/ReverseContainer.php', - 'Symfony\\Component\\DependencyInjection\\ServiceLocator' => __DIR__ . '/..' . '/symfony/dependency-injection/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\TaggedContainerInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/TaggedContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\TypedReference' => __DIR__ . '/..' . '/symfony/dependency-injection/TypedReference.php', - 'Symfony\\Component\\DependencyInjection\\Variable' => __DIR__ . '/..' . '/symfony/dependency-injection/Variable.php', - 'Symfony\\Component\\Dotenv\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/dotenv/Command/DebugCommand.php', - 'Symfony\\Component\\Dotenv\\Command\\DotenvDumpCommand' => __DIR__ . '/..' . '/symfony/dotenv/Command/DotenvDumpCommand.php', - 'Symfony\\Component\\Dotenv\\Dotenv' => __DIR__ . '/..' . '/symfony/dotenv/Dotenv.php', - 'Symfony\\Component\\Dotenv\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/dotenv/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatException' => __DIR__ . '/..' . '/symfony/dotenv/Exception/FormatException.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatExceptionContext' => __DIR__ . '/..' . '/symfony/dotenv/Exception/FormatExceptionContext.php', - 'Symfony\\Component\\Dotenv\\Exception\\PathException' => __DIR__ . '/..' . '/symfony/dotenv/Exception/PathException.php', - 'Symfony\\Component\\ErrorHandler\\BufferingLogger' => __DIR__ . '/..' . '/symfony/error-handler/BufferingLogger.php', - 'Symfony\\Component\\ErrorHandler\\Debug' => __DIR__ . '/..' . '/symfony/error-handler/Debug.php', - 'Symfony\\Component\\ErrorHandler\\DebugClassLoader' => __DIR__ . '/..' . '/symfony/error-handler/DebugClassLoader.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ClassNotFoundErrorEnhancer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ErrorEnhancerInterface' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedFunctionErrorEnhancer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedMethodErrorEnhancer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorHandler' => __DIR__ . '/..' . '/symfony/error-handler/ErrorHandler.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\ErrorRendererInterface' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\SerializerErrorRenderer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\Error\\ClassNotFoundError' => __DIR__ . '/..' . '/symfony/error-handler/Error/ClassNotFoundError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\FatalError' => __DIR__ . '/..' . '/symfony/error-handler/Error/FatalError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\OutOfMemoryError' => __DIR__ . '/..' . '/symfony/error-handler/Error/OutOfMemoryError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedFunctionError' => __DIR__ . '/..' . '/symfony/error-handler/Error/UndefinedFunctionError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedMethodError' => __DIR__ . '/..' . '/symfony/error-handler/Error/UndefinedMethodError.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\FlattenException' => __DIR__ . '/..' . '/symfony/error-handler/Exception/FlattenException.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\SilencedErrorContext' => __DIR__ . '/..' . '/symfony/error-handler/Exception/SilencedErrorContext.php', - 'Symfony\\Component\\ErrorHandler\\Internal\\TentativeTypes' => __DIR__ . '/..' . '/symfony/error-handler/Internal/TentativeTypes.php', - 'Symfony\\Component\\ErrorHandler\\ThrowableUtils' => __DIR__ . '/..' . '/symfony/error-handler/ThrowableUtils.php', - 'Symfony\\Component\\EventDispatcher\\Attribute\\AsEventListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Attribute/AsEventListener.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/WrappedListener.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\AddEventAliasesPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcherInterface.php', - 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventSubscriberInterface.php', - 'Symfony\\Component\\EventDispatcher\\GenericEvent' => __DIR__ . '/..' . '/symfony/event-dispatcher/GenericEvent.php', - 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => __DIR__ . '/..' . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php', - 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/FileNotFoundException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/IOException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/IOExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Filesystem\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/RuntimeException.php', - 'Symfony\\Component\\Filesystem\\Filesystem' => __DIR__ . '/..' . '/symfony/filesystem/Filesystem.php', - 'Symfony\\Component\\Filesystem\\Path' => __DIR__ . '/..' . '/symfony/filesystem/Path.php', - 'Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/Comparator.php', - 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/DateComparator.php', - 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/NumberComparator.php', - 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/finder/Exception/AccessDeniedException.php', - 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => __DIR__ . '/..' . '/symfony/finder/Exception/DirectoryNotFoundException.php', - 'Symfony\\Component\\Finder\\Finder' => __DIR__ . '/..' . '/symfony/finder/Finder.php', - 'Symfony\\Component\\Finder\\Gitignore' => __DIR__ . '/..' . '/symfony/finder/Gitignore.php', - 'Symfony\\Component\\Finder\\Glob' => __DIR__ . '/..' . '/symfony/finder/Glob.php', - 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/CustomFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DateRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FileTypeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilecontentFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilenameFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\LazyIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/LazyIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/PathFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SortableIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php', - 'Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/..' . '/symfony/finder/SplFileInfo.php', - 'Symfony\\Component\\Form\\AbstractExtension' => __DIR__ . '/..' . '/symfony/form/AbstractExtension.php', - 'Symfony\\Component\\Form\\AbstractRendererEngine' => __DIR__ . '/..' . '/symfony/form/AbstractRendererEngine.php', - 'Symfony\\Component\\Form\\AbstractType' => __DIR__ . '/..' . '/symfony/form/AbstractType.php', - 'Symfony\\Component\\Form\\AbstractTypeExtension' => __DIR__ . '/..' . '/symfony/form/AbstractTypeExtension.php', - 'Symfony\\Component\\Form\\Button' => __DIR__ . '/..' . '/symfony/form/Button.php', - 'Symfony\\Component\\Form\\ButtonBuilder' => __DIR__ . '/..' . '/symfony/form/ButtonBuilder.php', - 'Symfony\\Component\\Form\\ButtonTypeInterface' => __DIR__ . '/..' . '/symfony/form/ButtonTypeInterface.php', - 'Symfony\\Component\\Form\\CallbackTransformer' => __DIR__ . '/..' . '/symfony/form/CallbackTransformer.php', - 'Symfony\\Component\\Form\\ChoiceList\\ArrayChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ArrayChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceListInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ChoiceListInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\AbstractStaticOption' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceAttr' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFieldName' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFilter' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLabel' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceTranslationParameters' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceValue' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\GroupBy' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/GroupBy.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\PreferredChoice' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\CachingFactoryDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\ChoiceListFactoryInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\DefaultChoiceListFactory' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\PropertyAccessDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\LazyChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/LazyChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\AbstractChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\FilterChoiceLoaderDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\IntlCallbackChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceGroupView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceGroupView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceListView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceListView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceView.php', - 'Symfony\\Component\\Form\\ClearableErrorsInterface' => __DIR__ . '/..' . '/symfony/form/ClearableErrorsInterface.php', - 'Symfony\\Component\\Form\\ClickableInterface' => __DIR__ . '/..' . '/symfony/form/ClickableInterface.php', - 'Symfony\\Component\\Form\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/form/Command/DebugCommand.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/form/Console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Form\\DataAccessorInterface' => __DIR__ . '/..' . '/symfony/form/DataAccessorInterface.php', - 'Symfony\\Component\\Form\\DataMapperInterface' => __DIR__ . '/..' . '/symfony/form/DataMapperInterface.php', - 'Symfony\\Component\\Form\\DataTransformerInterface' => __DIR__ . '/..' . '/symfony/form/DataTransformerInterface.php', - 'Symfony\\Component\\Form\\DependencyInjection\\FormPass' => __DIR__ . '/..' . '/symfony/form/DependencyInjection/FormPass.php', - 'Symfony\\Component\\Form\\Event\\PostSetDataEvent' => __DIR__ . '/..' . '/symfony/form/Event/PostSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PostSubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/PostSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSetDataEvent' => __DIR__ . '/..' . '/symfony/form/Event/PreSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/PreSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\SubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/SubmitEvent.php', - 'Symfony\\Component\\Form\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/form/Exception/AccessException.php', - 'Symfony\\Component\\Form\\Exception\\AlreadySubmittedException' => __DIR__ . '/..' . '/symfony/form/Exception/AlreadySubmittedException.php', - 'Symfony\\Component\\Form\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/symfony/form/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Form\\Exception\\ErrorMappingException' => __DIR__ . '/..' . '/symfony/form/Exception/ErrorMappingException.php', - 'Symfony\\Component\\Form\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/form/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Form\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/form/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Form\\Exception\\InvalidConfigurationException' => __DIR__ . '/..' . '/symfony/form/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Form\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/form/Exception/LogicException.php', - 'Symfony\\Component\\Form\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/form/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Form\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/form/Exception/RuntimeException.php', - 'Symfony\\Component\\Form\\Exception\\StringCastException' => __DIR__ . '/..' . '/symfony/form/Exception/StringCastException.php', - 'Symfony\\Component\\Form\\Exception\\TransformationFailedException' => __DIR__ . '/..' . '/symfony/form/Exception/TransformationFailedException.php', - 'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/form/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Form\\Extension\\Core\\CoreExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Core/CoreExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\CallbackAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\ChainAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\PropertyPathAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\CheckboxListMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\DataMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/DataMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\PropertyPathMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\RadioListMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/RadioListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ArrayToPartsTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BaseDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BooleanToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoiceToValueTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoicesToValuesTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DataTransformerChain' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeImmutableToDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToHtml5LocalDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToRfc3339Transformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToTimestampTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeZoneToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntegerToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntlTimeZoneToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\MoneyToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\PercentToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\StringToFloatTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UlidToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UuidToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ValueToDuplicatesTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\WeekToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\FixUrlProtocolListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\MergeCollectionListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/ResizeFormListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TransformationFailureListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TrimListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/TrimListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/BaseType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/BirthdayType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ButtonType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CheckboxType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ChoiceType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CollectionType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ColorType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CountryType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CurrencyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateIntervalType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateTimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/EmailType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EnumType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/EnumType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/FileType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/FormType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/HiddenType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/IntegerType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/LanguageType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/LocaleType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/MoneyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/NumberType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/PasswordType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/PercentType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RadioType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RangeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RangeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RepeatedType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RepeatedType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ResetType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ResetType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SearchType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/SearchType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/SubmitType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TelType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TelType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TextType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TextareaType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimezoneType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TimezoneType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TransformationFailureExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TransformationFailureExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UlidType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UlidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UrlType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UuidType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UuidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\WeekType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/WeekType.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/CsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\EventListener\\CsrfValidationListener' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\Type\\FormTypeCsrfExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\DataCollectorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/DataCollectorExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollector' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataCollector.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollectorInterface' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractor' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataExtractor.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractorInterface' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeDataCollectorProxy' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeFactoryDataCollectorProxy' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Type\\DataCollectorTypeExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php', - 'Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationRequestHandler' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\Type\\FormTypeHttpFoundationExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Constraints/Form.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\FormValidator' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Constraints/FormValidator.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/EventListener/ValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\BaseValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\RepeatedTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\UploadValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Util\\ServerParams' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ValidatorTypeGuesser.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\MappingRule' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\RelativePath' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapperInterface' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPath' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPathIterator' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php', - 'Symfony\\Component\\Form\\FileUploadError' => __DIR__ . '/..' . '/symfony/form/FileUploadError.php', - 'Symfony\\Component\\Form\\Form' => __DIR__ . '/..' . '/symfony/form/Form.php', - 'Symfony\\Component\\Form\\FormBuilder' => __DIR__ . '/..' . '/symfony/form/FormBuilder.php', - 'Symfony\\Component\\Form\\FormBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigBuilder' => __DIR__ . '/..' . '/symfony/form/FormConfigBuilder.php', - 'Symfony\\Component\\Form\\FormConfigBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormConfigBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigInterface' => __DIR__ . '/..' . '/symfony/form/FormConfigInterface.php', - 'Symfony\\Component\\Form\\FormError' => __DIR__ . '/..' . '/symfony/form/FormError.php', - 'Symfony\\Component\\Form\\FormErrorIterator' => __DIR__ . '/..' . '/symfony/form/FormErrorIterator.php', - 'Symfony\\Component\\Form\\FormEvent' => __DIR__ . '/..' . '/symfony/form/FormEvent.php', - 'Symfony\\Component\\Form\\FormEvents' => __DIR__ . '/..' . '/symfony/form/FormEvents.php', - 'Symfony\\Component\\Form\\FormExtensionInterface' => __DIR__ . '/..' . '/symfony/form/FormExtensionInterface.php', - 'Symfony\\Component\\Form\\FormFactory' => __DIR__ . '/..' . '/symfony/form/FormFactory.php', - 'Symfony\\Component\\Form\\FormFactoryBuilder' => __DIR__ . '/..' . '/symfony/form/FormFactoryBuilder.php', - 'Symfony\\Component\\Form\\FormFactoryBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormFactoryBuilderInterface.php', - 'Symfony\\Component\\Form\\FormFactoryInterface' => __DIR__ . '/..' . '/symfony/form/FormFactoryInterface.php', - 'Symfony\\Component\\Form\\FormInterface' => __DIR__ . '/..' . '/symfony/form/FormInterface.php', - 'Symfony\\Component\\Form\\FormRegistry' => __DIR__ . '/..' . '/symfony/form/FormRegistry.php', - 'Symfony\\Component\\Form\\FormRegistryInterface' => __DIR__ . '/..' . '/symfony/form/FormRegistryInterface.php', - 'Symfony\\Component\\Form\\FormRenderer' => __DIR__ . '/..' . '/symfony/form/FormRenderer.php', - 'Symfony\\Component\\Form\\FormRendererEngineInterface' => __DIR__ . '/..' . '/symfony/form/FormRendererEngineInterface.php', - 'Symfony\\Component\\Form\\FormRendererInterface' => __DIR__ . '/..' . '/symfony/form/FormRendererInterface.php', - 'Symfony\\Component\\Form\\FormTypeExtensionInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeExtensionInterface.php', - 'Symfony\\Component\\Form\\FormTypeGuesserChain' => __DIR__ . '/..' . '/symfony/form/FormTypeGuesserChain.php', - 'Symfony\\Component\\Form\\FormTypeGuesserInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeGuesserInterface.php', - 'Symfony\\Component\\Form\\FormTypeInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeInterface.php', - 'Symfony\\Component\\Form\\FormView' => __DIR__ . '/..' . '/symfony/form/FormView.php', - 'Symfony\\Component\\Form\\Forms' => __DIR__ . '/..' . '/symfony/form/Forms.php', - 'Symfony\\Component\\Form\\Guess\\Guess' => __DIR__ . '/..' . '/symfony/form/Guess/Guess.php', - 'Symfony\\Component\\Form\\Guess\\TypeGuess' => __DIR__ . '/..' . '/symfony/form/Guess/TypeGuess.php', - 'Symfony\\Component\\Form\\Guess\\ValueGuess' => __DIR__ . '/..' . '/symfony/form/Guess/ValueGuess.php', - 'Symfony\\Component\\Form\\NativeRequestHandler' => __DIR__ . '/..' . '/symfony/form/NativeRequestHandler.php', - 'Symfony\\Component\\Form\\PreloadedExtension' => __DIR__ . '/..' . '/symfony/form/PreloadedExtension.php', - 'Symfony\\Component\\Form\\RequestHandlerInterface' => __DIR__ . '/..' . '/symfony/form/RequestHandlerInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormType' => __DIR__ . '/..' . '/symfony/form/ResolvedFormType.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactory' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeFactory.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactoryInterface' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeFactoryInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeInterface' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeInterface.php', - 'Symfony\\Component\\Form\\ReversedTransformer' => __DIR__ . '/..' . '/symfony/form/ReversedTransformer.php', - 'Symfony\\Component\\Form\\SubmitButton' => __DIR__ . '/..' . '/symfony/form/SubmitButton.php', - 'Symfony\\Component\\Form\\SubmitButtonBuilder' => __DIR__ . '/..' . '/symfony/form/SubmitButtonBuilder.php', - 'Symfony\\Component\\Form\\SubmitButtonTypeInterface' => __DIR__ . '/..' . '/symfony/form/SubmitButtonTypeInterface.php', - 'Symfony\\Component\\Form\\Test\\FormBuilderInterface' => __DIR__ . '/..' . '/symfony/form/Test/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\Test\\FormIntegrationTestCase' => __DIR__ . '/..' . '/symfony/form/Test/FormIntegrationTestCase.php', - 'Symfony\\Component\\Form\\Test\\FormInterface' => __DIR__ . '/..' . '/symfony/form/Test/FormInterface.php', - 'Symfony\\Component\\Form\\Test\\FormPerformanceTestCase' => __DIR__ . '/..' . '/symfony/form/Test/FormPerformanceTestCase.php', - 'Symfony\\Component\\Form\\Test\\Traits\\ValidatorExtensionTrait' => __DIR__ . '/..' . '/symfony/form/Test/Traits/ValidatorExtensionTrait.php', - 'Symfony\\Component\\Form\\Test\\TypeTestCase' => __DIR__ . '/..' . '/symfony/form/Test/TypeTestCase.php', - 'Symfony\\Component\\Form\\Util\\FormUtil' => __DIR__ . '/..' . '/symfony/form/Util/FormUtil.php', - 'Symfony\\Component\\Form\\Util\\InheritDataAwareIterator' => __DIR__ . '/..' . '/symfony/form/Util/InheritDataAwareIterator.php', - 'Symfony\\Component\\Form\\Util\\OptionsResolverWrapper' => __DIR__ . '/..' . '/symfony/form/Util/OptionsResolverWrapper.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMap' => __DIR__ . '/..' . '/symfony/form/Util/OrderedHashMap.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMapIterator' => __DIR__ . '/..' . '/symfony/form/Util/OrderedHashMapIterator.php', - 'Symfony\\Component\\Form\\Util\\ServerParams' => __DIR__ . '/..' . '/symfony/form/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Util\\StringUtil' => __DIR__ . '/..' . '/symfony/form/Util/StringUtil.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeader' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeader.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeaderItem.php', - 'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => __DIR__ . '/..' . '/symfony/http-foundation/BinaryFileResponse.php', - 'Symfony\\Component\\HttpFoundation\\Cookie' => __DIR__ . '/..' . '/symfony/http-foundation/Cookie.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\BadRequestException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/BadRequestException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/ConflictingHeadersException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\JsonException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/JsonException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/RequestExceptionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SessionNotFoundException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/SessionNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/SuspiciousOperationException.php', - 'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/ExpressionRequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\FileBag' => __DIR__ . '/..' . '/symfony/http-foundation/FileBag.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/AccessDeniedException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\CannotWriteFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/CannotWriteFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\ExtensionFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/ExtensionFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FormSizeFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FormSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\IniSizeFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/IniSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/NoFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoTmpDirFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/NoTmpDirFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\PartialFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/PartialFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UploadException.php', - 'Symfony\\Component\\HttpFoundation\\File\\File' => __DIR__ . '/..' . '/symfony/http-foundation/File/File.php', - 'Symfony\\Component\\HttpFoundation\\File\\Stream' => __DIR__ . '/..' . '/symfony/http-foundation/File/Stream.php', - 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => __DIR__ . '/..' . '/symfony/http-foundation/File/UploadedFile.php', - 'Symfony\\Component\\HttpFoundation\\HeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/HeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\HeaderUtils' => __DIR__ . '/..' . '/symfony/http-foundation/HeaderUtils.php', - 'Symfony\\Component\\HttpFoundation\\InputBag' => __DIR__ . '/..' . '/symfony/http-foundation/InputBag.php', - 'Symfony\\Component\\HttpFoundation\\IpUtils' => __DIR__ . '/..' . '/symfony/http-foundation/IpUtils.php', - 'Symfony\\Component\\HttpFoundation\\JsonResponse' => __DIR__ . '/..' . '/symfony/http-foundation/JsonResponse.php', - 'Symfony\\Component\\HttpFoundation\\ParameterBag' => __DIR__ . '/..' . '/symfony/http-foundation/ParameterBag.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\AbstractRequestRateLimiter' => __DIR__ . '/..' . '/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\RequestRateLimiterInterface' => __DIR__ . '/..' . '/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php', - 'Symfony\\Component\\HttpFoundation\\RedirectResponse' => __DIR__ . '/..' . '/symfony/http-foundation/RedirectResponse.php', - 'Symfony\\Component\\HttpFoundation\\Request' => __DIR__ . '/..' . '/symfony/http-foundation/Request.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcherInterface.php', - 'Symfony\\Component\\HttpFoundation\\RequestStack' => __DIR__ . '/..' . '/symfony/http-foundation/RequestStack.php', - 'Symfony\\Component\\HttpFoundation\\Response' => __DIR__ . '/..' . '/symfony/http-foundation/Response.php', - 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/ResponseHeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\ServerBag' => __DIR__ . '/..' . '/symfony/http-foundation/ServerBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Session' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Session.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionBagProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactoryInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionUtils' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionUtils.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\IdentityMarshaller' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MarshallingSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MigratingSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\RedisSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\SessionHandlerFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\StrictSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MetadataBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorageFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorageFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorageFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\ServiceSessionFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageFactoryInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', - 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php', - 'Symfony\\Component\\HttpFoundation\\UrlHelper' => __DIR__ . '/..' . '/symfony/http-foundation/UrlHelper.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\ArgumentInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Attribute/ArgumentInterface.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\AsController' => __DIR__ . '/..' . '/symfony/http-kernel/Attribute/AsController.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/Bundle.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/BundleInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/ChainCacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/WarmableInterface.php', - 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => __DIR__ . '/..' . '/symfony/http-kernel/Config/FileLocator.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactoryInterface' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\NotTaggedControllerValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\TraceableValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ContainerControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ContainerControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerReference.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ErrorController' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ErrorController.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableArgumentResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/TraceableArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/TraceableControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\AjaxDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/AjaxDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ConfigDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/ConfigDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DumpDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DumpDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\EventDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/EventDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ExceptionDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/ExceptionDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LoggerDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/LoggerDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\MemoryDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/MemoryDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/RequestDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RouterDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/RouterDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\TimeDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/TimeDataCollector.php', - 'Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter' => __DIR__ . '/..' . '/symfony/http-kernel/Debug/FileLinkFormatter.php', - 'Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/http-kernel/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\AddAnnotatedClassesToCachePass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ControllerArgumentValueResolverPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/Extension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\FragmentRendererPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LazyLoadingFragmentHandler' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LoggerPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/LoggerPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterControllerArgumentLocatorsPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterLocaleAwareServicesPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RemoveEmptyControllerArgumentLocatorsPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ResettableServicePass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ResettableServicePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetter' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ServicesResetter.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AbstractSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractTestSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AbstractTestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DumpListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ErrorListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/FragmentListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/LocaleAwareListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/LocaleListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ProfilerListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/RouterListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/SessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/StreamedResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SurrogateListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/SurrogateListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/TestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ControllerArgumentsEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ControllerEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ExceptionEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FinishRequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/KernelEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/RequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/TerminateEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ViewEvent.php', - 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/BadRequestHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ConflictHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ControllerDoesNotReturnResponseException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/GoneHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', - 'Symfony\\Component\\HttpKernel\\Exception\\InvalidMetadataException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/InvalidMetadataException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotFoundHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnexpectedSessionUsageException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/EsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentRendererInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGenerator' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentUriGenerator.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGeneratorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\HIncludeFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\InlineFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/InlineFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\RoutableFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/SsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\AbstractSurrogate' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/AbstractSurrogate.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Esi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/HttpCache.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Ssi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Store.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/StoreInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SubRequestHandler.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpClientKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpClientKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelBrowser' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelBrowser.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Kernel' => __DIR__ . '/..' . '/symfony/http-kernel/Kernel.php', - 'Symfony\\Component\\HttpKernel\\KernelEvents' => __DIR__ . '/..' . '/symfony/http-kernel/KernelEvents.php', - 'Symfony\\Component\\HttpKernel\\KernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/KernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\DebugLoggerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Log/DebugLoggerInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\Logger' => __DIR__ . '/..' . '/symfony/http-kernel/Log/Logger.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/FileProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profile' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/Profile.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profiler' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/Profiler.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php', - 'Symfony\\Component\\HttpKernel\\RebootableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/RebootableInterface.php', - 'Symfony\\Component\\HttpKernel\\TerminableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/TerminableInterface.php', - 'Symfony\\Component\\HttpKernel\\UriSigner' => __DIR__ . '/..' . '/symfony/http-kernel/UriSigner.php', - 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/MissingOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoConfigurationException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoSuchOptionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/OptionDefinitionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/UndefinedOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => __DIR__ . '/..' . '/symfony/options-resolver/OptionConfigurator.php', - 'Symfony\\Component\\OptionsResolver\\Options' => __DIR__ . '/..' . '/symfony/options-resolver/Options.php', - 'Symfony\\Component\\OptionsResolver\\OptionsResolver' => __DIR__ . '/..' . '/symfony/options-resolver/OptionsResolver.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/property-access/Exception/AccessException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/property-access/Exception/ExceptionInterface.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/property-access/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidPropertyPathException' => __DIR__ . '/..' . '/symfony/property-access/Exception/InvalidPropertyPathException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchIndexException' => __DIR__ . '/..' . '/symfony/property-access/Exception/NoSuchIndexException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException' => __DIR__ . '/..' . '/symfony/property-access/Exception/NoSuchPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/property-access/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/property-access/Exception/RuntimeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/property-access/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UninitializedPropertyException' => __DIR__ . '/..' . '/symfony/property-access/Exception/UninitializedPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccess' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccess.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessor' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessor.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessorBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessorInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPath' => __DIR__ . '/..' . '/symfony/property-access/PropertyPath.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathBuilder' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIterator' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathIterator.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIteratorInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathIteratorInterface.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoConstructorPass' => __DIR__ . '/..' . '/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoPass' => __DIR__ . '/..' . '/symfony/property-info/DependencyInjection/PropertyInfoPass.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorArgumentTypeExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ConstructorExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/PhpDocExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/PhpStanExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ReflectionExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/SerializerExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScope' => __DIR__ . '/..' . '/symfony/property-info/PhpStan/NameScope.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScopeFactory' => __DIR__ . '/..' . '/symfony/property-info/PhpStan/NameScopeFactory.php', - 'Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyAccessExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyDescriptionExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoCacheExtractor' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoCacheExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyInitializableExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyListExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfo' => __DIR__ . '/..' . '/symfony/property-info/PropertyReadInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyReadInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfo' => __DIR__ . '/..' . '/symfony/property-info/PropertyWriteInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyWriteInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Type' => __DIR__ . '/..' . '/symfony/property-info/Type.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpDocTypeHelper' => __DIR__ . '/..' . '/symfony/property-info/Util/PhpDocTypeHelper.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpStanTypeHelper' => __DIR__ . '/..' . '/symfony/property-info/Util/PhpStanTypeHelper.php', - 'Symfony\\Component\\Routing\\Alias' => __DIR__ . '/..' . '/symfony/routing/Alias.php', - 'Symfony\\Component\\Routing\\Annotation\\Route' => __DIR__ . '/..' . '/symfony/routing/Annotation/Route.php', - 'Symfony\\Component\\Routing\\CompiledRoute' => __DIR__ . '/..' . '/symfony/routing/CompiledRoute.php', - 'Symfony\\Component\\Routing\\DependencyInjection\\RoutingResolverPass' => __DIR__ . '/..' . '/symfony/routing/DependencyInjection/RoutingResolverPass.php', - 'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/routing/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/routing/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => __DIR__ . '/..' . '/symfony/routing/Exception/InvalidParameterException.php', - 'Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException' => __DIR__ . '/..' . '/symfony/routing/Exception/MethodNotAllowedException.php', - 'Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException' => __DIR__ . '/..' . '/symfony/routing/Exception/MissingMandatoryParametersException.php', - 'Symfony\\Component\\Routing\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/routing/Exception/NoConfigurationException.php', - 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/ResourceNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteCircularReferenceException' => __DIR__ . '/..' . '/symfony/routing/Exception/RouteCircularReferenceException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/RouteNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/routing/Exception/RuntimeException.php', - 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator' => __DIR__ . '/..' . '/symfony/routing/Generator/CompiledUrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGenerator' => __DIR__ . '/..' . '/symfony/routing/Generator/UrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/UrlGeneratorInterface.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationClassLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationClassLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationDirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ClosureLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ClosureLoader.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\AliasConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\CollectionConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/CollectionConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\ImportConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/ImportConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RouteConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/RouteConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RoutingConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/RoutingConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\AddTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/AddTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\HostTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/HostTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\LocalizedRouteTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\PrefixTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\RouteTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/RouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\ContainerLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ContainerLoader.php', - 'Symfony\\Component\\Routing\\Loader\\DirectoryLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/DirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ObjectLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ObjectLoader.php', - 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Routing\\Matcher\\CompiledUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/CompiledUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherTrait' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\StaticPrefixCollection' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php', - 'Symfony\\Component\\Routing\\Matcher\\ExpressionLanguageProvider' => __DIR__ . '/..' . '/symfony/routing/Matcher/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/RequestMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\TraceableUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/TraceableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/UrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/UrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\RequestContext' => __DIR__ . '/..' . '/symfony/routing/RequestContext.php', - 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => __DIR__ . '/..' . '/symfony/routing/RequestContextAwareInterface.php', - 'Symfony\\Component\\Routing\\Route' => __DIR__ . '/..' . '/symfony/routing/Route.php', - 'Symfony\\Component\\Routing\\RouteCollection' => __DIR__ . '/..' . '/symfony/routing/RouteCollection.php', - 'Symfony\\Component\\Routing\\RouteCollectionBuilder' => __DIR__ . '/..' . '/symfony/routing/RouteCollectionBuilder.php', - 'Symfony\\Component\\Routing\\RouteCompiler' => __DIR__ . '/..' . '/symfony/routing/RouteCompiler.php', - 'Symfony\\Component\\Routing\\RouteCompilerInterface' => __DIR__ . '/..' . '/symfony/routing/RouteCompilerInterface.php', - 'Symfony\\Component\\Routing\\Router' => __DIR__ . '/..' . '/symfony/routing/Router.php', - 'Symfony\\Component\\Routing\\RouterInterface' => __DIR__ . '/..' . '/symfony/routing/RouterInterface.php', - 'Symfony\\Component\\Stopwatch\\Section' => __DIR__ . '/..' . '/symfony/stopwatch/Section.php', - 'Symfony\\Component\\Stopwatch\\Stopwatch' => __DIR__ . '/..' . '/symfony/stopwatch/Stopwatch.php', - 'Symfony\\Component\\Stopwatch\\StopwatchEvent' => __DIR__ . '/..' . '/symfony/stopwatch/StopwatchEvent.php', - 'Symfony\\Component\\Stopwatch\\StopwatchPeriod' => __DIR__ . '/..' . '/symfony/stopwatch/StopwatchPeriod.php', - 'Symfony\\Component\\String\\AbstractString' => __DIR__ . '/..' . '/symfony/string/AbstractString.php', - 'Symfony\\Component\\String\\AbstractUnicodeString' => __DIR__ . '/..' . '/symfony/string/AbstractUnicodeString.php', - 'Symfony\\Component\\String\\ByteString' => __DIR__ . '/..' . '/symfony/string/ByteString.php', - 'Symfony\\Component\\String\\CodePointString' => __DIR__ . '/..' . '/symfony/string/CodePointString.php', - 'Symfony\\Component\\String\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/string/Exception/ExceptionInterface.php', - 'Symfony\\Component\\String\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/string/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\String\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/string/Exception/RuntimeException.php', - 'Symfony\\Component\\String\\Inflector\\EnglishInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/EnglishInflector.php', - 'Symfony\\Component\\String\\Inflector\\FrenchInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/FrenchInflector.php', - 'Symfony\\Component\\String\\Inflector\\InflectorInterface' => __DIR__ . '/..' . '/symfony/string/Inflector/InflectorInterface.php', - 'Symfony\\Component\\String\\LazyString' => __DIR__ . '/..' . '/symfony/string/LazyString.php', - 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => __DIR__ . '/..' . '/symfony/string/Slugger/AsciiSlugger.php', - 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => __DIR__ . '/..' . '/symfony/string/Slugger/SluggerInterface.php', - 'Symfony\\Component\\String\\UnicodeString' => __DIR__ . '/..' . '/symfony/string/UnicodeString.php', - 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/AmqpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ArgsStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\Caster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/Caster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ClassStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ConstStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutArrayStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DOMCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DateCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DoctrineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsPairStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/EnumStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ExceptionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FiberCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FiberCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FrameStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/GmpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImagineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImgStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImgStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/IntlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/LinkStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MemcachedCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\MysqliCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MysqliCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PdoCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PgSqlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RdKafkaCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RedisCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ReflectionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SplCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/StubCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SymfonyCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/TraceStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/UuidCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlReaderCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/AbstractCloner.php', - 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/ClonerInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Cursor.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Data' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Data.php', - 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/DumperInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Stub.php', - 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/VarCloner.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => __DIR__ . '/..' . '/symfony/var-dumper/Command/ServerDumpCommand.php', - 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/AbstractDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/CliDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/DataDumperInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/HtmlDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ServerDumper.php', - 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => __DIR__ . '/..' . '/symfony/var-dumper/Exception/ThrowingCasterException.php', - 'Symfony\\Component\\VarDumper\\Server\\Connection' => __DIR__ . '/..' . '/symfony/var-dumper/Server/Connection.php', - 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => __DIR__ . '/..' . '/symfony/var-dumper/Server/DumpServer.php', - 'Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php', - 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ClassNotFoundException.php', - 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ExceptionInterface.php', - 'Symfony\\Component\\VarExporter\\Exception\\NotInstantiableTypeException' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/NotInstantiableTypeException.php', - 'Symfony\\Component\\VarExporter\\Instantiator' => __DIR__ . '/..' . '/symfony/var-exporter/Instantiator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Exporter' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Exporter.php', - 'Symfony\\Component\\VarExporter\\Internal\\Hydrator' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Hydrator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Reference' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Reference.php', - 'Symfony\\Component\\VarExporter\\Internal\\Registry' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Registry.php', - 'Symfony\\Component\\VarExporter\\Internal\\Values' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Values.php', - 'Symfony\\Component\\VarExporter\\VarExporter' => __DIR__ . '/..' . '/symfony/var-exporter/VarExporter.php', - 'Symfony\\Component\\Yaml\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/yaml/Command/LintCommand.php', - 'Symfony\\Component\\Yaml\\Dumper' => __DIR__ . '/..' . '/symfony/yaml/Dumper.php', - 'Symfony\\Component\\Yaml\\Escaper' => __DIR__ . '/..' . '/symfony/yaml/Escaper.php', - 'Symfony\\Component\\Yaml\\Exception\\DumpException' => __DIR__ . '/..' . '/symfony/yaml/Exception/DumpException.php', - 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/yaml/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Yaml\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/yaml/Exception/ParseException.php', - 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/yaml/Exception/RuntimeException.php', - 'Symfony\\Component\\Yaml\\Inline' => __DIR__ . '/..' . '/symfony/yaml/Inline.php', - 'Symfony\\Component\\Yaml\\Parser' => __DIR__ . '/..' . '/symfony/yaml/Parser.php', - 'Symfony\\Component\\Yaml\\Tag\\TaggedValue' => __DIR__ . '/..' . '/symfony/yaml/Tag/TaggedValue.php', - 'Symfony\\Component\\Yaml\\Unescaper' => __DIR__ . '/..' . '/symfony/yaml/Unescaper.php', - 'Symfony\\Component\\Yaml\\Yaml' => __DIR__ . '/..' . '/symfony/yaml/Yaml.php', - 'Symfony\\Contracts\\Cache\\CacheInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/CacheInterface.php', - 'Symfony\\Contracts\\Cache\\CacheTrait' => __DIR__ . '/..' . '/symfony/cache-contracts/CacheTrait.php', - 'Symfony\\Contracts\\Cache\\CallbackInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/CallbackInterface.php', - 'Symfony\\Contracts\\Cache\\ItemInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/ItemInterface.php', - 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/TagAwareCacheInterface.php', - 'Symfony\\Contracts\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/Event.php', - 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php', - 'Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php', - 'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/SubscribedService.php', - 'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php', - 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php', - 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatableInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatableInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorTrait.php', - 'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php', - 'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/Grapheme.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Collator.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Currencies' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Currencies.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\AmPmTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfWeekTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfYearTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\FullTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1200Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1201Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2400Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2401Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\HourTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MinuteTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MonthTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\QuarterTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\SecondTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\TimezoneTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\YearTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\NotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/NotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/RuntimeException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Icu' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Icu.php', - 'Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/IntlDateFormatter.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Locale' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Locale.php', - 'Symfony\\Polyfill\\Intl\\Icu\\NumberFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/NumberFormatter.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Info.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php', - 'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php', - 'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php', - 'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php', - 'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php', - 'Symfony\\Polyfill\\Php73\\Php73' => __DIR__ . '/..' . '/symfony/polyfill-php73/Php73.php', - 'Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php', - 'Symfony\\Polyfill\\Php80\\PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/PhpToken.php', - 'Symfony\\Polyfill\\Php81\\Php81' => __DIR__ . '/..' . '/symfony/polyfill-php81/Php81.php', - 'SynchroExceptionNotStarted' => __DIR__ . '/../..' . '/application/exceptions/SynchroExceptionNotStarted.php', - 'System' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/System.php', - 'TCPDF' => __DIR__ . '/..' . '/combodo/tcpdf/tcpdf.php', - 'TCPDF2DBarcode' => __DIR__ . '/..' . '/combodo/tcpdf/tcpdf_barcodes_2d.php', - 'TCPDFBarcode' => __DIR__ . '/..' . '/combodo/tcpdf/tcpdf_barcodes_1d.php', - 'TCPDF_COLORS' => __DIR__ . '/..' . '/combodo/tcpdf/include/tcpdf_colors.php', - 'TCPDF_FILTERS' => __DIR__ . '/..' . '/combodo/tcpdf/include/tcpdf_filters.php', - 'TCPDF_FONTS' => __DIR__ . '/..' . '/combodo/tcpdf/include/tcpdf_fonts.php', - 'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/combodo/tcpdf/include/tcpdf_font_data.php', - 'TCPDF_IMAGES' => __DIR__ . '/..' . '/combodo/tcpdf/include/tcpdf_images.php', - 'TCPDF_IMPORT' => __DIR__ . '/..' . '/combodo/tcpdf/tcpdf_import.php', - 'TCPDF_PARSER' => __DIR__ . '/..' . '/combodo/tcpdf/tcpdf_parser.php', - 'TCPDF_STATIC' => __DIR__ . '/..' . '/combodo/tcpdf/include/tcpdf_static.php', - 'TabManager' => __DIR__ . '/../..' . '/sources/Application/WebPage/TabManager.php', - 'TabularBulkExport' => __DIR__ . '/../..' . '/core/tabularbulkexport.class.inc.php', - 'TagSetFieldData' => __DIR__ . '/../..' . '/core/tagsetfield.class.inc.php', - 'TemplateMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'TemplateString' => __DIR__ . '/../..' . '/core/templatestring.class.inc.php', - 'TemplateStringPlaceholder' => __DIR__ . '/../..' . '/core/templatestring.class.inc.php', - 'TemporaryObjectDescriptor' => __DIR__ . '/../..' . '/core/TemporaryObjectDescriptor.php', - 'TheNetworg\\OAuth2\\Client\\Grant\\JwtBearer' => __DIR__ . '/..' . '/thenetworg/oauth2-azure/src/Grant/JwtBearer.php', - 'TheNetworg\\OAuth2\\Client\\Provider\\Azure' => __DIR__ . '/..' . '/thenetworg/oauth2-azure/src/Provider/Azure.php', - 'TheNetworg\\OAuth2\\Client\\Provider\\AzureResourceOwner' => __DIR__ . '/..' . '/thenetworg/oauth2-azure/src/Provider/AzureResourceOwner.php', - 'TheNetworg\\OAuth2\\Client\\Token\\AccessToken' => __DIR__ . '/..' . '/thenetworg/oauth2-azure/src/Token/AccessToken.php', - 'ThemeHandler' => __DIR__ . '/../..' . '/application/themehandler.class.inc.php', - 'ThemeHandlerService' => __DIR__ . '/../..' . '/application/themehandlerservice.class.inc.php', - 'ToolsLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'Trigger' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnAttributeBlobDownload' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnObject' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnObjectCreate' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnObjectDelete' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnObjectMention' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnObjectUpdate' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnPortalUpdate' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnStateChange' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnStateEnter' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnStateLeave' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TriggerOnThresholdReached' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'TrueExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'Twig\\Cache\\CacheInterface' => __DIR__ . '/..' . '/twig/twig/src/Cache/CacheInterface.php', - 'Twig\\Cache\\FilesystemCache' => __DIR__ . '/..' . '/twig/twig/src/Cache/FilesystemCache.php', - 'Twig\\Cache\\NullCache' => __DIR__ . '/..' . '/twig/twig/src/Cache/NullCache.php', - 'Twig\\Compiler' => __DIR__ . '/..' . '/twig/twig/src/Compiler.php', - 'Twig\\Environment' => __DIR__ . '/..' . '/twig/twig/src/Environment.php', - 'Twig\\Error\\Error' => __DIR__ . '/..' . '/twig/twig/src/Error/Error.php', - 'Twig\\Error\\LoaderError' => __DIR__ . '/..' . '/twig/twig/src/Error/LoaderError.php', - 'Twig\\Error\\RuntimeError' => __DIR__ . '/..' . '/twig/twig/src/Error/RuntimeError.php', - 'Twig\\Error\\SyntaxError' => __DIR__ . '/..' . '/twig/twig/src/Error/SyntaxError.php', - 'Twig\\ExpressionParser' => __DIR__ . '/..' . '/twig/twig/src/ExpressionParser.php', - 'Twig\\ExtensionSet' => __DIR__ . '/..' . '/twig/twig/src/ExtensionSet.php', - 'Twig\\Extension\\AbstractExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/AbstractExtension.php', - 'Twig\\Extension\\CoreExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/CoreExtension.php', - 'Twig\\Extension\\DebugExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/DebugExtension.php', - 'Twig\\Extension\\EscaperExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/EscaperExtension.php', - 'Twig\\Extension\\ExtensionInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/ExtensionInterface.php', - 'Twig\\Extension\\GlobalsInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/GlobalsInterface.php', - 'Twig\\Extension\\OptimizerExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/OptimizerExtension.php', - 'Twig\\Extension\\ProfilerExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/ProfilerExtension.php', - 'Twig\\Extension\\RuntimeExtensionInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/RuntimeExtensionInterface.php', - 'Twig\\Extension\\SandboxExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/SandboxExtension.php', - 'Twig\\Extension\\StagingExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/StagingExtension.php', - 'Twig\\Extension\\StringLoaderExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/StringLoaderExtension.php', - 'Twig\\FileExtensionEscapingStrategy' => __DIR__ . '/..' . '/twig/twig/src/FileExtensionEscapingStrategy.php', - 'Twig\\Lexer' => __DIR__ . '/..' . '/twig/twig/src/Lexer.php', - 'Twig\\Loader\\ArrayLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/ArrayLoader.php', - 'Twig\\Loader\\ChainLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/ChainLoader.php', - 'Twig\\Loader\\FilesystemLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/FilesystemLoader.php', - 'Twig\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/Loader/LoaderInterface.php', - 'Twig\\Markup' => __DIR__ . '/..' . '/twig/twig/src/Markup.php', - 'Twig\\NodeTraverser' => __DIR__ . '/..' . '/twig/twig/src/NodeTraverser.php', - 'Twig\\NodeVisitor\\AbstractNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php', - 'Twig\\NodeVisitor\\EscaperNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php', - 'Twig\\NodeVisitor\\MacroAutoImportNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php', - 'Twig\\NodeVisitor\\NodeVisitorInterface' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/NodeVisitorInterface.php', - 'Twig\\NodeVisitor\\OptimizerNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php', - 'Twig\\NodeVisitor\\SafeAnalysisNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php', - 'Twig\\NodeVisitor\\SandboxNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php', - 'Twig\\Node\\AutoEscapeNode' => __DIR__ . '/..' . '/twig/twig/src/Node/AutoEscapeNode.php', - 'Twig\\Node\\BlockNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BlockNode.php', - 'Twig\\Node\\BlockReferenceNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BlockReferenceNode.php', - 'Twig\\Node\\BodyNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BodyNode.php', - 'Twig\\Node\\CheckSecurityCallNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckSecurityCallNode.php', - 'Twig\\Node\\CheckSecurityNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckSecurityNode.php', - 'Twig\\Node\\CheckToStringNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckToStringNode.php', - 'Twig\\Node\\DeprecatedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/DeprecatedNode.php', - 'Twig\\Node\\DoNode' => __DIR__ . '/..' . '/twig/twig/src/Node/DoNode.php', - 'Twig\\Node\\EmbedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/EmbedNode.php', - 'Twig\\Node\\Expression\\AbstractExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AbstractExpression.php', - 'Twig\\Node\\Expression\\ArrayExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrayExpression.php', - 'Twig\\Node\\Expression\\ArrowFunctionExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php', - 'Twig\\Node\\Expression\\AssignNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AssignNameExpression.php', - 'Twig\\Node\\Expression\\Binary\\AbstractBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php', - 'Twig\\Node\\Expression\\Binary\\AddBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AddBinary.php', - 'Twig\\Node\\Expression\\Binary\\AndBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseAndBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseOrBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseXorBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php', - 'Twig\\Node\\Expression\\Binary\\ConcatBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/ConcatBinary.php', - 'Twig\\Node\\Expression\\Binary\\DivBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/DivBinary.php', - 'Twig\\Node\\Expression\\Binary\\EndsWithBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\EqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/EqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\FloorDivBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/GreaterBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\InBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/InBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/LessBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\MatchesBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/MatchesBinary.php', - 'Twig\\Node\\Expression\\Binary\\ModBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/ModBinary.php', - 'Twig\\Node\\Expression\\Binary\\MulBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/MulBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotInBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/NotInBinary.php', - 'Twig\\Node\\Expression\\Binary\\OrBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/OrBinary.php', - 'Twig\\Node\\Expression\\Binary\\PowerBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/PowerBinary.php', - 'Twig\\Node\\Expression\\Binary\\RangeBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/RangeBinary.php', - 'Twig\\Node\\Expression\\Binary\\SpaceshipBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php', - 'Twig\\Node\\Expression\\Binary\\StartsWithBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\SubBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/SubBinary.php', - 'Twig\\Node\\Expression\\BlockReferenceExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/BlockReferenceExpression.php', - 'Twig\\Node\\Expression\\CallExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/CallExpression.php', - 'Twig\\Node\\Expression\\ConditionalExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ConditionalExpression.php', - 'Twig\\Node\\Expression\\ConstantExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ConstantExpression.php', - 'Twig\\Node\\Expression\\FilterExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/FilterExpression.php', - 'Twig\\Node\\Expression\\Filter\\DefaultFilter' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Filter/DefaultFilter.php', - 'Twig\\Node\\Expression\\FunctionExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/FunctionExpression.php', - 'Twig\\Node\\Expression\\GetAttrExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/GetAttrExpression.php', - 'Twig\\Node\\Expression\\InlinePrint' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/InlinePrint.php', - 'Twig\\Node\\Expression\\MethodCallExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/MethodCallExpression.php', - 'Twig\\Node\\Expression\\NameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/NameExpression.php', - 'Twig\\Node\\Expression\\NullCoalesceExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/NullCoalesceExpression.php', - 'Twig\\Node\\Expression\\ParentExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ParentExpression.php', - 'Twig\\Node\\Expression\\TempNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/TempNameExpression.php', - 'Twig\\Node\\Expression\\TestExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/TestExpression.php', - 'Twig\\Node\\Expression\\Test\\ConstantTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/ConstantTest.php', - 'Twig\\Node\\Expression\\Test\\DefinedTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/DefinedTest.php', - 'Twig\\Node\\Expression\\Test\\DivisiblebyTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php', - 'Twig\\Node\\Expression\\Test\\EvenTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/EvenTest.php', - 'Twig\\Node\\Expression\\Test\\NullTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/NullTest.php', - 'Twig\\Node\\Expression\\Test\\OddTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/OddTest.php', - 'Twig\\Node\\Expression\\Test\\SameasTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/SameasTest.php', - 'Twig\\Node\\Expression\\Unary\\AbstractUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/AbstractUnary.php', - 'Twig\\Node\\Expression\\Unary\\NegUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/NegUnary.php', - 'Twig\\Node\\Expression\\Unary\\NotUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/NotUnary.php', - 'Twig\\Node\\Expression\\Unary\\PosUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/PosUnary.php', - 'Twig\\Node\\Expression\\VariadicExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/VariadicExpression.php', - 'Twig\\Node\\FlushNode' => __DIR__ . '/..' . '/twig/twig/src/Node/FlushNode.php', - 'Twig\\Node\\ForLoopNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ForLoopNode.php', - 'Twig\\Node\\ForNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ForNode.php', - 'Twig\\Node\\IfNode' => __DIR__ . '/..' . '/twig/twig/src/Node/IfNode.php', - 'Twig\\Node\\ImportNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ImportNode.php', - 'Twig\\Node\\IncludeNode' => __DIR__ . '/..' . '/twig/twig/src/Node/IncludeNode.php', - 'Twig\\Node\\MacroNode' => __DIR__ . '/..' . '/twig/twig/src/Node/MacroNode.php', - 'Twig\\Node\\ModuleNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ModuleNode.php', - 'Twig\\Node\\Node' => __DIR__ . '/..' . '/twig/twig/src/Node/Node.php', - 'Twig\\Node\\NodeCaptureInterface' => __DIR__ . '/..' . '/twig/twig/src/Node/NodeCaptureInterface.php', - 'Twig\\Node\\NodeOutputInterface' => __DIR__ . '/..' . '/twig/twig/src/Node/NodeOutputInterface.php', - 'Twig\\Node\\PrintNode' => __DIR__ . '/..' . '/twig/twig/src/Node/PrintNode.php', - 'Twig\\Node\\SandboxNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SandboxNode.php', - 'Twig\\Node\\SetNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SetNode.php', - 'Twig\\Node\\TextNode' => __DIR__ . '/..' . '/twig/twig/src/Node/TextNode.php', - 'Twig\\Node\\WithNode' => __DIR__ . '/..' . '/twig/twig/src/Node/WithNode.php', - 'Twig\\Parser' => __DIR__ . '/..' . '/twig/twig/src/Parser.php', - 'Twig\\Profiler\\Dumper\\BaseDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/BaseDumper.php', - 'Twig\\Profiler\\Dumper\\BlackfireDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/BlackfireDumper.php', - 'Twig\\Profiler\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/HtmlDumper.php', - 'Twig\\Profiler\\Dumper\\TextDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/TextDumper.php', - 'Twig\\Profiler\\NodeVisitor\\ProfilerNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php', - 'Twig\\Profiler\\Node\\EnterProfileNode' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Node/EnterProfileNode.php', - 'Twig\\Profiler\\Node\\LeaveProfileNode' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Node/LeaveProfileNode.php', - 'Twig\\Profiler\\Profile' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Profile.php', - 'Twig\\RuntimeLoader\\ContainerRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php', - 'Twig\\RuntimeLoader\\FactoryRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php', - 'Twig\\RuntimeLoader\\RuntimeLoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php', - 'Twig\\Sandbox\\SecurityError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFilterError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFunctionError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php', - 'Twig\\Sandbox\\SecurityNotAllowedMethodError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php', - 'Twig\\Sandbox\\SecurityNotAllowedPropertyError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php', - 'Twig\\Sandbox\\SecurityNotAllowedTagError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php', - 'Twig\\Sandbox\\SecurityPolicy' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityPolicy.php', - 'Twig\\Sandbox\\SecurityPolicyInterface' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityPolicyInterface.php', - 'Twig\\Source' => __DIR__ . '/..' . '/twig/twig/src/Source.php', - 'Twig\\Template' => __DIR__ . '/..' . '/twig/twig/src/Template.php', - 'Twig\\TemplateWrapper' => __DIR__ . '/..' . '/twig/twig/src/TemplateWrapper.php', - 'Twig\\Token' => __DIR__ . '/..' . '/twig/twig/src/Token.php', - 'Twig\\TokenParser\\AbstractTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AbstractTokenParser.php', - 'Twig\\TokenParser\\ApplyTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ApplyTokenParser.php', - 'Twig\\TokenParser\\AutoEscapeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php', - 'Twig\\TokenParser\\BlockTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/BlockTokenParser.php', - 'Twig\\TokenParser\\DeprecatedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php', - 'Twig\\TokenParser\\DoTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DoTokenParser.php', - 'Twig\\TokenParser\\EmbedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/EmbedTokenParser.php', - 'Twig\\TokenParser\\ExtendsTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ExtendsTokenParser.php', - 'Twig\\TokenParser\\FlushTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/FlushTokenParser.php', - 'Twig\\TokenParser\\ForTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ForTokenParser.php', - 'Twig\\TokenParser\\FromTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/FromTokenParser.php', - 'Twig\\TokenParser\\IfTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/IfTokenParser.php', - 'Twig\\TokenParser\\ImportTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ImportTokenParser.php', - 'Twig\\TokenParser\\IncludeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/IncludeTokenParser.php', - 'Twig\\TokenParser\\MacroTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/MacroTokenParser.php', - 'Twig\\TokenParser\\SandboxTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/SandboxTokenParser.php', - 'Twig\\TokenParser\\SetTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/SetTokenParser.php', - 'Twig\\TokenParser\\TokenParserInterface' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/TokenParserInterface.php', - 'Twig\\TokenParser\\UseTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/UseTokenParser.php', - 'Twig\\TokenParser\\WithTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/WithTokenParser.php', - 'Twig\\TokenStream' => __DIR__ . '/..' . '/twig/twig/src/TokenStream.php', - 'Twig\\TwigFilter' => __DIR__ . '/..' . '/twig/twig/src/TwigFilter.php', - 'Twig\\TwigFunction' => __DIR__ . '/..' . '/twig/twig/src/TwigFunction.php', - 'Twig\\TwigTest' => __DIR__ . '/..' . '/twig/twig/src/TwigTest.php', - 'Twig\\Util\\DeprecationCollector' => __DIR__ . '/..' . '/twig/twig/src/Util/DeprecationCollector.php', - 'Twig\\Util\\TemplateDirIterator' => __DIR__ . '/..' . '/twig/twig/src/Util/TemplateDirIterator.php', - 'UIExtKeyWidget' => __DIR__ . '/../..' . '/application/ui.extkeywidget.class.inc.php', - 'UIHTMLEditorWidget' => __DIR__ . '/../..' . '/application/ui.htmleditorwidget.class.inc.php', - 'UILinksWidget' => __DIR__ . '/../..' . '/application/ui.linkswidget.class.inc.php', - 'UILinksWidgetDirect' => __DIR__ . '/../..' . '/application/ui.linksdirectwidget.class.inc.php', - 'UIPasswordWidget' => __DIR__ . '/../..' . '/application/ui.passwordwidget.class.inc.php', - 'UISearchFormForeignKeys' => __DIR__ . '/../..' . '/application/ui.searchformforeignkeys.class.inc.php', - 'UIWizard' => __DIR__ . '/../..' . '/application/uiwizard.class.inc.php', - 'URLButtonItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'URLPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'UnaryExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'UnauthenticatedWebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/UnauthenticatedWebPage.php', - 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', - 'UnknownClassOqlException' => __DIR__ . '/../..' . '/core/oql/oqlinterpreter.class.inc.php', - 'User' => __DIR__ . '/../..' . '/core/userrights.class.inc.php', - 'UserDashboard' => __DIR__ . '/../..' . '/application/user.dashboard.class.inc.php', - 'UserInternal' => __DIR__ . '/../..' . '/core/userrights.class.inc.php', - 'UserRightException' => __DIR__ . '/../..' . '/application/exceptions/UserRightException.php', - 'UserRights' => __DIR__ . '/../..' . '/core/userrights.class.inc.php', - 'UserRightsAddOnAPI' => __DIR__ . '/../..' . '/core/userrights.class.inc.php', - 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', - 'ValueSetDefinition' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php', - 'ValueSetEnum' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php', - 'ValueSetEnumClasses' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php', - 'ValueSetEnumPadded' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php', - 'ValueSetObjects' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php', - 'ValueSetRange' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php', - 'VariableExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php', - 'VariableOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', - 'WebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/WebPage.php', - 'WebPageMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php', - 'Webmozart\\Assert\\Assert' => __DIR__ . '/..' . '/webmozart/assert/src/Assert.php', - 'Webmozart\\Assert\\InvalidArgumentException' => __DIR__ . '/..' . '/webmozart/assert/src/InvalidArgumentException.php', - 'Webmozart\\Assert\\Mixin' => __DIR__ . '/..' . '/webmozart/assert/src/Mixin.php', - 'WeeklyRotatingLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'WizardHelper' => __DIR__ . '/../..' . '/application/wizardhelper.class.inc.php', - 'XLSXWriter' => __DIR__ . '/../..' . '/application/xlsxwriter.class.php', - 'XMLBulkExport' => __DIR__ . '/../..' . '/core/xmlbulkexport.class.inc.php', - 'XMLPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/XMLPage.php', - 'ajax_page' => __DIR__ . '/../..' . '/application/ajaxwebpage.class.inc.php', - 'appUserPreferences' => __DIR__ . '/../..' . '/application/user.preferences.class.inc.php', - 'cmdbAbstractObject' => __DIR__ . '/../..' . '/application/cmdbabstract.class.inc.php', - 'cmdbDataGenerator' => __DIR__ . '/../..' . '/core/data.generator.class.inc.php', - 'iApplicationObjectExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iAttributeNoGroupBy' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', - 'iBackgroundProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php', - 'iBackofficeDictEntriesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeDictEntriesPrefixesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeEarlyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeInitScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeLinkedScriptsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeLinkedStylesheetsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeReadyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iBackofficeStyleExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iCMDBChangeOp' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php', - 'iDBObjectSetIterator' => __DIR__ . '/../..' . '/core/dbobjectiterator.php', - 'iDBObjectURLMaker' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php', - 'iDisplay' => __DIR__ . '/../..' . '/core/dbobject.class.php', - 'iFieldRendererMappingsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iKPILoggerExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iKeyboardShortcut' => __DIR__ . '/../..' . '/sources/Application/UI/Hook/iKeyboardShortcut.php', - 'iLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php', - 'iLoginExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iLoginUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iLogoutExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iMetricComputer' => __DIR__ . '/../..' . '/core/computing.inc.php', - 'iModuleExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iNewsroomProvider' => __DIR__ . '/../..' . '/application/newsroomprovider.class.inc.php', - 'iOnClassInitialization' => __DIR__ . '/../..' . '/core/metamodelmodifier.inc.php', - 'iPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iPageUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iPopupMenuExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php', - 'iQueryModifier' => __DIR__ . '/../..' . '/core/querymodifier.class.inc.php', - 'iRestServiceProvider' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iScheduledProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php', - 'iSelfRegister' => __DIR__ . '/../..' . '/core/userrights.class.inc.php', - 'iTabbedPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/iTabbedPage.php', - 'iTopConfigParser' => __DIR__ . '/../..' . '/core/iTopConfigParser.php', - 'iTopMutex' => __DIR__ . '/../..' . '/core/mutex.class.inc.php', - 'iTopOwnershipLock' => __DIR__ . '/../..' . '/core/ownershiplock.class.inc.php', - 'iTopOwnershipToken' => __DIR__ . '/../..' . '/core/ownershiplock.class.inc.php', - 'iTopPDF' => __DIR__ . '/../..' . '/sources/Application/WebPage/iTopPDF.php', - 'iTopStandardURLMaker' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php', - 'iTopWebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/iTopWebPage.php', - 'iTopWizardWebPage' => __DIR__ . '/../..' . '/sources/Application/WebPage/iTopWizardWebPage.php', - 'iTopXmlException' => __DIR__ . '/../..' . '/application/exceptions/iTopXmlException.php', - 'iWorkingTimeComputer' => __DIR__ . '/../..' . '/core/computing.inc.php', - 'lnkAuditCategoryToAuditDomain' => __DIR__ . '/../..' . '/application/audit.domain.class.inc.php', - 'lnkTriggerAction' => __DIR__ . '/../..' . '/core/trigger.class.inc.php', - 'ormCaseLog' => __DIR__ . '/../..' . '/core/ormcaselog.class.inc.php', - 'ormCustomFieldsValue' => __DIR__ . '/../..' . '/core/ormcustomfieldsvalue.class.inc.php', - 'ormDocument' => __DIR__ . '/../..' . '/core/ormdocument.class.inc.php', - 'ormLinkSet' => __DIR__ . '/../..' . '/core/ormlinkset.class.inc.php', - 'ormPassword' => __DIR__ . '/../..' . '/core/ormpassword.class.inc.php', - 'ormSet' => __DIR__ . '/../..' . '/core/ormset.class.inc.php', - 'ormStopWatch' => __DIR__ . '/../..' . '/core/ormstopwatch.class.inc.php', - 'ormStyle' => __DIR__ . '/../..' . '/core/ormStyle.class.inc.php', - 'ormTagSet' => __DIR__ . '/../..' . '/core/ormtagset.class.inc.php', - 'phpCAS' => __DIR__ . '/..' . '/apereo/phpcas/source/CAS.php', - 'privUITransaction' => __DIR__ . '/../..' . '/application/transaction.class.inc.php', - 'privUITransactionFile' => __DIR__ . '/../..' . '/application/transaction.class.inc.php', - 'privUITransactionSession' => __DIR__ . '/../..' . '/application/transaction.class.inc.php', - 'utils' => __DIR__ . '/../..' . '/application/utils.inc.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$prefixesPsr0; - $loader->fallbackDirsPsr0 = ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$fallbackDirsPsr0; - $loader->classMap = ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/lib/composer/include_paths.php b/lib/composer/include_paths.php deleted file mode 100644 index d4fb96718..000000000 --- a/lib/composer/include_paths.php +++ /dev/null @@ -1,13 +0,0 @@ -=7.1.0", - "psr/log": "^1.0 || ^2.0 || ^3.0" - }, - "require-dev": { - "monolog/monolog": "^1.0.0 || ^2.0.0", - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": ">=7.5" - }, - "time": "2022-10-31T20:39:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "source/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Joachim Fritschi", - "email": "jfritschi@freenet.de", - "homepage": "https://github.com/jfritschi" - }, - { - "name": "Adam Franco", - "homepage": "https://github.com/adamfranco" - }, - { - "name": "Henry Pan", - "homepage": "https://github.com/phy25" - } - ], - "description": "Provides a simple API for authenticating users against a CAS server", - "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", - "keywords": [ - "apereo", - "cas", - "jasig" - ], - "support": { - "issues": "https://github.com/apereo/phpCAS/issues", - "source": "https://github.com/apereo/phpCAS/tree/1.6.0" - }, - "install-path": "../apereo/phpcas" - }, - { - "name": "combodo/tcpdf", - "version": "6.4.4", - "version_normalized": "6.4.4.0", - "source": { - "type": "git", - "url": "https://github.com/combodo-itop-libs/TCPDF.git", - "reference": "0e31c013ccd000aa6762e9186778aa6e259ac8e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/0e31c013ccd000aa6762e9186778aa6e259ac8e8", - "reference": "0e31c013ccd000aa6762e9186778aa6e259ac8e8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "replace": { - "tecnickcom/tcpdf": "self.version" - }, - "time": "2022-03-10T14:36:39+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-only" - ], - "authors": [ - { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "role": "lead" - }, - { - "name": "Combodo", - "email": "contact@combodo.com" - } - ], - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "homepage": "https://github.com/combodo-itop-libs/TCPDF", - "keywords": [ - "PDFD32000-2008", - "TCPDF", - "barcodes", - "datamatrix", - "pdf", - "pdf417", - "qrcode" - ], - "support": { - "source": "https://github.com/combodo-itop-libs/TCPDF/tree/6.4.4" - }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project", - "type": "custom" - } - ], - "install-path": "../combodo/tcpdf" - }, - { - "name": "doctrine/annotations", - "version": "2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "time": "2023-02-02T22:02:53+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "install-path": "../doctrine/annotations" - }, - { - "name": "doctrine/cache", - "version": "2.2.0", - "version_normalized": "2.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "1ca8f21980e770095a31456042471a57bc4c68fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb", - "reference": "1ca8f21980e770095a31456042471a57bc4c68fb", - "shasum": "" - }, - "require": { - "php": "~7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "symfony/var-exporter": "^4.4 || ^5.4 || ^6" - }, - "time": "2022-05-20T20:07:39+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "keywords": [ - "abstraction", - "apcu", - "cache", - "caching", - "couchdb", - "memcached", - "php", - "redis", - "xcache" - ], - "support": { - "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/2.2.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", - "type": "tidelift" - } - ], - "install-path": "../doctrine/cache" - }, - { - "name": "doctrine/deprecations", - "version": "v1.1.1", - "version_normalized": "1.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "time": "2023-06-03T09:27:29+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" - }, - "install-path": "../doctrine/deprecations" - }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "version_normalized": "2.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "time": "2022-12-14T08:49:07+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "install-path": "../doctrine/lexer" - }, - { - "name": "firebase/php-jwt", - "version": "v6.4.0", - "version_normalized": "6.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/firebase/php-jwt.git", - "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/4dd1e007f22a927ac77da5a3fbb067b42d3bc224", - "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224", - "shasum": "" - }, - "require": { - "php": "^7.1||^8.0" - }, - "require-dev": { - "guzzlehttp/guzzle": "^6.5||^7.4", - "phpspec/prophecy-phpunit": "^1.1", - "phpunit/phpunit": "^7.5||^9.5", - "psr/cache": "^1.0||^2.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0" - }, - "suggest": { - "ext-sodium": "Support EdDSA (Ed25519) signatures", - "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" - }, - "time": "2023-02-09T21:01:23+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Firebase\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Neuman Vong", - "email": "neuman+pear@twilio.com", - "role": "Developer" - }, - { - "name": "Anant Narayanan", - "email": "anant@php.net", - "role": "Developer" - } - ], - "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", - "homepage": "https://github.com/firebase/php-jwt", - "keywords": [ - "jwt", - "php" - ], - "support": { - "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.4.0" - }, - "install-path": "../firebase/php-jwt" - }, - { - "name": "guzzlehttp/guzzle", - "version": "7.7.0", - "version_normalized": "7.7.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "time": "2023-05-21T14:04:53+00:00", - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.7.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "install-path": "../guzzlehttp/guzzle" - }, - { - "name": "guzzlehttp/promises", - "version": "2.0.0", - "version_normalized": "2.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" - }, - "time": "2023-05-21T13:50:22+00:00", - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "install-path": "../guzzlehttp/promises" - }, - { - "name": "guzzlehttp/psr7", - "version": "2.5.0", - "version_normalized": "2.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "time": "2023-04-17T16:11:26+00:00", - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "install-path": "../guzzlehttp/psr7" - }, - { - "name": "laminas/laminas-loader", - "version": "2.8.0", - "version_normalized": "2.8.0.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-loader.git", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-loader": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.3" - }, - "time": "2021-09-02T18:30:53+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Laminas\\Loader\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Autoloading and plugin loading strategies", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "loader" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-loader/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-loader/issues", - "rss": "https://github.com/laminas/laminas-loader/releases.atom", - "source": "https://github.com/laminas/laminas-loader" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "install-path": "../laminas/laminas-loader" - }, - { - "name": "laminas/laminas-mail", - "version": "2.16.0", - "version_normalized": "2.16.0.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-mail.git", - "reference": "1ee1a384b96c8af29ecad9b3a7adc27a150ebc49" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/1ee1a384b96c8af29ecad9b3a7adc27a150ebc49", - "reference": "1ee1a384b96c8af29ecad9b3a7adc27a150ebc49", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "laminas/laminas-loader": "^2.8", - "laminas/laminas-mime": "^2.9.1", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-validator": "^2.15", - "php": "^7.3 || ~8.0.0 || ~8.1.0", - "symfony/polyfill-intl-idn": "^1.24.0", - "symfony/polyfill-mbstring": "^1.12.0", - "webmozart/assert": "^1.10" - }, - "conflict": { - "zendframework/zend-mail": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-crypt": "^2.6 || ^3.4", - "laminas/laminas-db": "^2.13.3", - "laminas/laminas-servicemanager": "^3.7", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.1", - "symfony/process": "^5.3.7", - "vimeo/psalm": "^4.7" - }, - "suggest": { - "laminas/laminas-crypt": "Crammd5 support in SMTP Auth", - "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" - }, - "time": "2022-02-23T21:08:17+00:00", - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Mail", - "config-provider": "Laminas\\Mail\\ConfigProvider" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Laminas\\Mail\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "mail" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-mail/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-mail/issues", - "rss": "https://github.com/laminas/laminas-mail/releases.atom", - "source": "https://github.com/laminas/laminas-mail" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "install-path": "../laminas/laminas-mail" - }, - { - "name": "laminas/laminas-mime", - "version": "2.9.1", - "version_normalized": "2.9.1.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-mime.git", - "reference": "72d21a1b4bb7086d4a4d7058c0abca180b209184" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mime/zipball/72d21a1b4bb7086d4a4d7058c0abca180b209184", - "reference": "72d21a1b4bb7086d4a4d7058c0abca180b209184", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^2.7 || ^3.0", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-mime": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-mail": "^2.12", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "laminas/laminas-mail": "Laminas\\Mail component" - }, - "time": "2021-09-20T21:19:24+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Laminas\\Mime\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Create and parse MIME messages and parts", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "mime" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-mime/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-mime/issues", - "rss": "https://github.com/laminas/laminas-mime/releases.atom", - "source": "https://github.com/laminas/laminas-mime" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "install-path": "../laminas/laminas-mime" - }, - { - "name": "laminas/laminas-servicemanager", - "version": "3.16.0", - "version_normalized": "3.16.0.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "863c66733740cd36ebf5e700f4258ef2c68a2a24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/863c66733740cd36ebf5e700f4258ef2c68a2a24", - "reference": "863c66733740cd36ebf5e700f4258ef2c68a2a24", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.2.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0", - "psr/container": "^1.0" - }, - "conflict": { - "ext-psr": "*", - "laminas/laminas-code": "<3.3.1", - "zendframework/zend-code": "<3.3.1", - "zendframework/zend-servicemanager": "*" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "replace": { - "container-interop/container-interop": "^1.2.0" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.0", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-container-config-test": "^0.7", - "laminas/laminas-dependency-plugin": "^2.1.2", - "mikey179/vfsstream": "^1.6.10@alpha", - "ocramius/proxy-manager": "^2.11", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.8" - }, - "suggest": { - "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" - }, - "time": "2022-07-27T14:58:17+00:00", - "bin": [ - "bin/generate-deps-for-config-factory", - "bin/generate-factory-for-class" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Factory-Driven Dependency Injection Container", - "homepage": "https://laminas.dev", - "keywords": [ - "PSR-11", - "dependency-injection", - "di", - "dic", - "laminas", - "service-manager", - "servicemanager" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-servicemanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-servicemanager/issues", - "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", - "source": "https://github.com/laminas/laminas-servicemanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "install-path": "../laminas/laminas-servicemanager" - }, - { - "name": "laminas/laminas-stdlib", - "version": "3.12.0", - "version_normalized": "3.12.0.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "c5aed3c798018e31fbb7b1e421b8d96bf2cda453" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/c5aed3c798018e31fbb7b1e421b8d96bf2cda453", - "reference": "c5aed3c798018e31fbb7b1e421b8d96bf2cda453", - "shasum": "" - }, - "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-stdlib": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^1.2.6", - "phpstan/phpdoc-parser": "^0.5.4", - "phpunit/phpunit": "^9.5.23", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.26" - }, - "time": "2022-08-22T22:55:58+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Laminas\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "source": "https://github.com/laminas/laminas-stdlib" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "install-path": "../laminas/laminas-stdlib" - }, - { - "name": "laminas/laminas-validator", - "version": "2.23.0", - "version_normalized": "2.23.0.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-validator.git", - "reference": "6d61b6cc3b222f13807a18d9247cdfb084958b03" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/6d61b6cc3b222f13807a18d9247cdfb084958b03", - "reference": "6d61b6cc3b222f13807a18d9247cdfb084958b03", - "shasum": "" - }, - "require": { - "laminas/laminas-servicemanager": "^3.12.0", - "laminas/laminas-stdlib": "^3.10", - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-validator": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.14.0", - "laminas/laminas-http": "^2.14.2", - "laminas/laminas-i18n": "^2.15.0", - "laminas/laminas-session": "^2.12.1", - "laminas/laminas-uri": "^2.9.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.21", - "psalm/plugin-phpunit": "^0.17.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "vimeo/psalm": "^4.24.0" - }, - "suggest": { - "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", - "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", - "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", - "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", - "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", - "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" - }, - "time": "2022-07-27T19:17:59+00:00", - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Validator", - "config-provider": "Laminas\\Validator\\ConfigProvider" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Laminas\\Validator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "validator" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-validator/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-validator/issues", - "rss": "https://github.com/laminas/laminas-validator/releases.atom", - "source": "https://github.com/laminas/laminas-validator" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "install-path": "../laminas/laminas-validator" - }, - { - "name": "league/oauth2-client", - "version": "2.6.1", - "version_normalized": "2.6.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/oauth2-client.git", - "reference": "2334c249907190c132364f5dae0287ab8666aa19" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/2334c249907190c132364f5dae0287ab8666aa19", - "reference": "2334c249907190c132364f5dae0287ab8666aa19", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0 || ^7.0", - "paragonie/random_compat": "^1 || ^2 || ^9.99", - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.3.5", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpunit/phpunit": "^5.7 || ^6.0 || ^9.5", - "squizlabs/php_codesniffer": "^2.3 || ^3.0" - }, - "time": "2021-12-22T16:42:49+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "League\\OAuth2\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alex Bilbie", - "email": "hello@alexbilbie.com", - "homepage": "http://www.alexbilbie.com", - "role": "Developer" - }, - { - "name": "Woody Gilk", - "homepage": "https://github.com/shadowhand", - "role": "Contributor" - } - ], - "description": "OAuth 2.0 Client Library", - "keywords": [ - "Authentication", - "SSO", - "authorization", - "identity", - "idp", - "oauth", - "oauth2", - "single sign on" - ], - "support": { - "issues": "https://github.com/thephpleague/oauth2-client/issues", - "source": "https://github.com/thephpleague/oauth2-client/tree/2.6.1" - }, - "install-path": "../league/oauth2-client" - }, - { - "name": "league/oauth2-google", - "version": "3.0.4", - "version_normalized": "3.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/oauth2-google.git", - "reference": "6b79441f244040760bed5fdcd092a2bda7cf34c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-google/zipball/6b79441f244040760bed5fdcd092a2bda7cf34c6", - "reference": "6b79441f244040760bed5fdcd092a2bda7cf34c6", - "shasum": "" - }, - "require": { - "league/oauth2-client": "^2.0" - }, - "require-dev": { - "eloquent/phony-phpunit": "^2.0", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^6.0", - "squizlabs/php_codesniffer": "^2.0" - }, - "time": "2021-01-27T16:09:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "League\\OAuth2\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Woody Gilk", - "email": "woody.gilk@gmail.com", - "homepage": "http://shadowhand.me" - } - ], - "description": "Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client", - "keywords": [ - "Authentication", - "authorization", - "client", - "google", - "oauth", - "oauth2" - ], - "support": { - "issues": "https://github.com/thephpleague/oauth2-google/issues", - "source": "https://github.com/thephpleague/oauth2-google/tree/3.0.4" - }, - "install-path": "../league/oauth2-google" - }, - { - "name": "nikic/php-parser", - "version": "v4.14.0", - "version_normalized": "4.14.0.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "time": "2022-05-31T20:59:12+00:00", - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" - }, - "install-path": "../nikic/php-parser" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.100", - "version_normalized": "9.99.100.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", - "shasum": "" - }, - "require": { - "php": ">= 7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "time": "2020-10-15T08:29:30+00:00", - "type": "library", - "installation-source": "dist", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "install-path": "../paragonie/random_compat" - }, - { - "name": "pear/archive_tar", - "version": "1.4.14", - "version_normalized": "1.4.14.0", - "source": { - "type": "git", - "url": "https://github.com/pear/Archive_Tar.git", - "reference": "4d761c5334c790e45ef3245f0864b8955c562caa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/4d761c5334c790e45ef3245f0864b8955c562caa", - "reference": "4d761c5334c790e45ef3245f0864b8955c562caa", - "shasum": "" - }, - "require": { - "pear/pear-core-minimal": "^1.10.0alpha2", - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "suggest": { - "ext-bz2": "Bz2 compression support.", - "ext-xz": "Lzma2 compression support.", - "ext-zlib": "Gzip compression support." - }, - "time": "2021-07-20T13:53:39+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Archive_Tar": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "./" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Vincent Blavet", - "email": "vincent@phpconcept.net" - }, - { - "name": "Greg Beaver", - "email": "greg@chiaraquartet.net" - }, - { - "name": "Michiel Rook", - "email": "mrook@php.net" - } - ], - "description": "Tar file management class with compression support (gzip, bzip2, lzma2)", - "homepage": "https://github.com/pear/Archive_Tar", - "keywords": [ - "archive", - "tar" - ], - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Archive_Tar", - "source": "https://github.com/pear/Archive_Tar" - }, - "funding": [ - { - "url": "https://github.com/mrook", - "type": "github" - }, - { - "url": "https://www.patreon.com/michielrook", - "type": "patreon" - } - ], - "install-path": "../pear/archive_tar" - }, - { - "name": "pear/console_getopt", - "version": "v1.4.3", - "version_normalized": "1.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/pear/Console_Getopt.git", - "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/a41f8d3e668987609178c7c4a9fe48fecac53fa0", - "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0", - "shasum": "" - }, - "time": "2019-11-20T18:27:48+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Console": "./" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "./" - ], - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Andrei Zmievski", - "email": "andrei@php.net", - "role": "Lead" - }, - { - "name": "Stig Bakken", - "email": "stig@php.net", - "role": "Developer" - }, - { - "name": "Greg Beaver", - "email": "cellog@php.net", - "role": "Helper" - } - ], - "description": "More info available on: http://pear.php.net/package/Console_Getopt", - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Getopt", - "source": "https://github.com/pear/Console_Getopt" - }, - "install-path": "../pear/console_getopt" - }, - { - "name": "pear/pear-core-minimal", - "version": "v1.10.11", - "version_normalized": "1.10.11.0", - "source": { - "type": "git", - "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/68d0d32ada737153b7e93b8d3c710ebe70ac867d", - "reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d", - "shasum": "" - }, - "require": { - "pear/console_getopt": "~1.4", - "pear/pear_exception": "~1.0" - }, - "replace": { - "rsky/pear-core-min": "self.version" - }, - "time": "2021-08-10T22:31:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "src/" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@php.net", - "role": "Lead" - } - ], - "description": "Minimal set of PEAR core files to be used as composer dependency", - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", - "source": "https://github.com/pear/pear-core-minimal" - }, - "install-path": "../pear/pear-core-minimal" - }, - { - "name": "pear/pear_exception", - "version": "v1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/pear/PEAR_Exception.git", - "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", - "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "<9" - }, - "time": "2021-03-21T15:43:46+00:00", - "type": "class", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "PEAR/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "." - ], - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Helgi Thormar", - "email": "dufuz@php.net" - }, - { - "name": "Greg Beaver", - "email": "cellog@php.net" - } - ], - "description": "The PEAR Exception base class.", - "homepage": "https://github.com/pear/PEAR_Exception", - "keywords": [ - "exception" - ], - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception", - "source": "https://github.com/pear/PEAR_Exception" - }, - "install-path": "../pear/pear_exception" - }, - { - "name": "pelago/emogrifier", - "version": "v6.0.0", - "version_normalized": "6.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/MyIntervals/emogrifier.git", - "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/aa72d5407efac118f3896bcb995a2cba793df0ae", - "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0", - "sabberworm/php-css-parser": "^8.3.1", - "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.3 || ^6.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.3.0", - "phpunit/phpunit": "^8.5.16", - "rawr/cross-data-providers": "^2.3.0" - }, - "time": "2021-09-16T16:22:04+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Pelago\\Emogrifier\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oliver Klee", - "email": "github@oliverklee.de" - }, - { - "name": "Zoli Szabó", - "email": "zoli.szabo+github@gmail.com" - }, - { - "name": "John Reeve", - "email": "jreeve@pelagodesign.com" - }, - { - "name": "Jake Hotson", - "email": "jake@qzdesign.co.uk" - }, - { - "name": "Cameron Brooks" - }, - { - "name": "Jaime Prado" - } - ], - "description": "Converts CSS styles into inline style attributes in your HTML code", - "homepage": "https://www.myintervals.com/emogrifier.php", - "keywords": [ - "css", - "email", - "pre-processing" - ], - "support": { - "issues": "https://github.com/MyIntervals/emogrifier/issues", - "source": "https://github.com/MyIntervals/emogrifier" - }, - "install-path": "../pelago/emogrifier" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T20:24:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "install-path": "../psr/cache" - }, - { - "name": "psr/container", - "version": "1.1.2", - "version_normalized": "1.1.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "time": "2021-11-05T16:50:12+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" - }, - "install-path": "../psr/container" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "time": "2019-01-08T18:20:26+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "install-path": "../psr/event-dispatcher" - }, - { - "name": "psr/http-client", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "time": "2023-04-10T20:12:12+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" - }, - "install-path": "../psr/http-client" - }, - { - "name": "psr/http-factory", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "time": "2023-04-10T20:10:41+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" - }, - "install-path": "../psr/http-factory" - }, - { - "name": "psr/http-message", - "version": "2.0", - "version_normalized": "2.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "time": "2023-04-04T09:54:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "install-path": "../psr/http-message" - }, - { - "name": "psr/log", - "version": "1.1.4", - "version_normalized": "1.1.4.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2021-05-03T11:20:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "install-path": "../psr/log" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "version_normalized": "3.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "time": "2019-03-08T08:55:37+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "install-path": "../ralouphie/getallheaders" - }, - { - "name": "sabberworm/php-css-parser", - "version": "8.4.0", - "version_normalized": "8.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", - "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30", - "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "php": ">=5.6.20" - }, - "require-dev": { - "codacy/coverage": "^1.4", - "phpunit/phpunit": "^4.8.36" - }, - "suggest": { - "ext-mbstring": "for parsing UTF-8 CSS" - }, - "time": "2021-12-11T13:40:54+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Sabberworm\\CSS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Raphael Schweikert" - } - ], - "description": "Parser for CSS Files written in PHP", - "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", - "keywords": [ - "css", - "parser", - "stylesheet" - ], - "support": { - "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", - "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0" - }, - "install-path": "../sabberworm/php-css-parser" - }, - { - "name": "scssphp/scssphp", - "version": "v1.10.5", - "version_normalized": "1.10.5.0", - "source": { - "type": "git", - "url": "https://github.com/scssphp/scssphp.git", - "reference": "6d44282ccf283e133ab70b6282f8e068ff2f9bf9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/6d44282ccf283e133ab70b6282f8e068ff2f9bf9", - "reference": "6d44282ccf283e133ab70b6282f8e068ff2f9bf9", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "php": ">=5.6.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4", - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4", - "sass/sass-spec": "*", - "squizlabs/php_codesniffer": "~3.5", - "symfony/phpunit-bridge": "^5.1", - "thoughtbot/bourbon": "^7.0", - "twbs/bootstrap": "~5.0", - "twbs/bootstrap4": "4.6.1", - "zurb/foundation": "~6.5" - }, - "suggest": { - "ext-iconv": "Can be used as fallback when ext-mbstring is not available", - "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv" - }, - "time": "2022-07-27T15:52:39+00:00", - "bin": [ - "bin/pscss" - ], - "type": "library", - "extra": { - "bamarni-bin": { - "forward-command": false, - "bin-links": false - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "ScssPhp\\ScssPhp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthon Pang", - "email": "apang@softwaredevelopment.ca", - "homepage": "https://github.com/robocoder" - }, - { - "name": "Cédric Morin", - "email": "cedric@yterium.com", - "homepage": "https://github.com/Cerdic" - } - ], - "description": "scssphp is a compiler for SCSS written in PHP.", - "homepage": "http://scssphp.github.io/scssphp/", - "keywords": [ - "css", - "less", - "sass", - "scss", - "stylesheet" - ], - "support": { - "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.10.5" - }, - "install-path": "../scssphp/scssphp" - }, - { - "name": "symfony/cache", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "5a0fff46df349f0db3fe242263451fddf5277362" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/5a0fff46df349f0db3fe242263451fddf5277362", - "reference": "5a0fff46df349f0db3fe242263451fddf5277362", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "conflict": { - "doctrine/dbal": "<2.13.1", - "symfony/dependency-injection": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/var-dumper": "<4.4" - }, - "provide": { - "psr/cache-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6|^2.0", - "doctrine/dbal": "^2.13.1|^3.0", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "time": "2022-07-28T15:25:17+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an extended PSR-6, PSR-16 (and tags) implementation", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/cache" - }, - { - "name": "symfony/cache-contracts", - "version": "v2.5.2", - "version_normalized": "2.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/cache-contracts" - }, - { - "name": "symfony/config", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "ec79e03125c1d2477e43dde8528535d90cc78379" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/ec79e03125c1d2477e43dde8528535d90cc78379", - "reference": "ec79e03125c1d2477e43dde8528535d90cc78379", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22" - }, - "conflict": { - "symfony/finder": "<4.4" - }, - "require-dev": { - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "time": "2022-07-20T13:00:38+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/config/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/config" - }, - { - "name": "symfony/console", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/dccb8d251a9017d5994c988b034d3e18aaabf740", - "reference": "dccb8d251a9017d5994c988b034d3e18aaabf740", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "time": "2023-01-01T08:32:19+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/console" - }, - { - "name": "symfony/css-selector", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "c1681789f059ab756001052164726ae88512ae3d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/c1681789f059ab756001052164726ae88512ae3d", - "reference": "c1681789f059ab756001052164726ae88512ae3d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "time": "2022-06-27T16:58:25+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\CssSelector\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Converts CSS selectors to XPath expressions", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/css-selector" - }, - { - "name": "symfony/dependency-injection", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "a8b9251016e9476db73e25fa836904bc0bf74c62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a8b9251016e9476db73e25fa836904bc0bf74c62", - "reference": "a8b9251016e9476db73e25fa836904bc0bf74c62", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/service-contracts": "^1.1.6|^2" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<5.3", - "symfony/finder": "<4.4", - "symfony/proxy-manager-bridge": "<4.4", - "symfony/yaml": "<4.4.26" - }, - "provide": { - "psr/container-implementation": "1.0", - "symfony/service-implementation": "1.0|2.0" - }, - "require-dev": { - "symfony/config": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4.26|^5.0|^6.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "time": "2022-07-20T13:00:38+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows you to standardize and centralize the way objects are constructed in your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/dependency-injection" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.2", - "version_normalized": "2.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/deprecation-contracts" - }, - { - "name": "symfony/dotenv", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dotenv.git", - "reference": "38190ba62566afa26ca723a795d0a004e061bd2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/38190ba62566afa26ca723a795d0a004e061bd2a", - "reference": "38190ba62566afa26ca723a795d0a004e061bd2a", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "require-dev": { - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0" - }, - "time": "2023-01-01T08:32:19+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Dotenv\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Registers environment variables from a .env file", - "homepage": "https://symfony.com", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "source": "https://github.com/symfony/dotenv/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/dotenv" - }, - { - "name": "symfony/error-handler", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/f75d17cb4769eb38cd5fccbda95cd80a054d35c8", - "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" - }, - "time": "2022-07-29T07:37:50+00:00", - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\ErrorHandler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to manage errors and ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/error-handler" - }, - { - "name": "symfony/event-dispatcher", - "version": "v5.4.9", - "version_normalized": "5.4.9.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2022-05-05T16:45:39+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.9" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/event-dispatcher" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", - "version_normalized": "2.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/event-dispatcher-contracts" - }, - { - "name": "symfony/filesystem", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "6699fb0228d1bc35b12aed6dd5e7455457609ddd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6699fb0228d1bc35b12aed6dd5e7455457609ddd", - "reference": "6699fb0228d1bc35b12aed6dd5e7455457609ddd", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "time": "2022-07-20T13:00:38+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/filesystem" - }, - { - "name": "symfony/finder", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "time": "2022-07-29T07:37:50+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/finder" - }, - { - "name": "symfony/form", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/form.git", - "reference": "c29e6cccee469ca93db2dbc02a39c29312c5e362" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/form/zipball/c29e6cccee469ca93db2dbc02a39c29312c5e362", - "reference": "c29e6cccee469ca93db2dbc02a39c29312c5e362", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/options-resolver": "^5.1|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.23", - "symfony/property-access": "^5.0.8|^6.0", - "symfony/service-contracts": "^1.1|^2|^3" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<4.4", - "symfony/doctrine-bridge": "<4.4", - "symfony/error-handler": "<4.4.5", - "symfony/framework-bundle": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<4.4", - "symfony/translation-contracts": "<1.1.7", - "symfony/twig-bridge": "<4.4" - }, - "require-dev": { - "doctrine/collections": "^1.0|^2.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "symfony/validator": "^4.4.17|^5.1.9|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/security-csrf": "For protecting forms against CSRF attacks.", - "symfony/twig-bridge": "For templating with Twig.", - "symfony/validator": "For form validation." - }, - "time": "2023-01-01T08:32:19+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Form\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows to easily create, process and reuse HTML forms", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/form/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/form" - }, - { - "name": "symfony/framework-bundle", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/framework-bundle.git", - "reference": "a208ee578000f9dedcb50a9784ec7ff8706a7bf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/a208ee578000f9dedcb50a9784ec7ff8706a7bf1", - "reference": "a208ee578000f9dedcb50a9784ec7ff8706a7bf1", - "shasum": "" - }, - "require": { - "ext-xml": "*", - "php": ">=7.2.5", - "symfony/cache": "^5.2|^6.0", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^5.4.5|^6.0.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4.1|^5.0.1|^6.0", - "symfony/event-dispatcher": "^5.1|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/routing": "^5.3|^6.0" - }, - "conflict": { - "doctrine/annotations": "<1.13.1", - "doctrine/cache": "<1.11", - "doctrine/persistence": "<1.3", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "phpunit/phpunit": "<5.4.3", - "symfony/asset": "<5.3", - "symfony/console": "<5.2.5", - "symfony/dom-crawler": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/form": "<5.2", - "symfony/http-client": "<4.4", - "symfony/lock": "<4.4", - "symfony/mailer": "<5.2", - "symfony/messenger": "<5.4", - "symfony/mime": "<4.4", - "symfony/property-access": "<5.3", - "symfony/property-info": "<4.4", - "symfony/security-csrf": "<5.3", - "symfony/serializer": "<5.2", - "symfony/service-contracts": ">=3.0", - "symfony/stopwatch": "<4.4", - "symfony/translation": "<5.3", - "symfony/twig-bridge": "<4.4", - "symfony/twig-bundle": "<4.4", - "symfony/validator": "<5.2", - "symfony/web-profiler-bundle": "<4.4", - "symfony/workflow": "<5.2" - }, - "require-dev": { - "doctrine/annotations": "^1.13.1|^2", - "doctrine/cache": "^1.11|^2.0", - "doctrine/persistence": "^1.3|^2|^3", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/asset": "^5.3|^6.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/console": "^5.4.9|^6.0.9", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dom-crawler": "^4.4.30|^5.3.7|^6.0", - "symfony/dotenv": "^5.1|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/form": "^5.2|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/mailer": "^5.2|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/notifier": "^5.4|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/property-info": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/security-bundle": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/string": "^5.0|^6.0", - "symfony/translation": "^5.3|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/workflow": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "twig/twig": "^2.10|^3.0" - }, - "suggest": { - "ext-apcu": "For best performance of the system caches", - "symfony/console": "For using the console commands", - "symfony/form": "For using forms", - "symfony/property-info": "For using the property_info service", - "symfony/serializer": "For using the serializer service", - "symfony/validator": "For using validation", - "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", - "symfony/yaml": "For using the debug:config and lint:yaml commands" - }, - "time": "2023-01-10T17:40:25+00:00", - "type": "symfony-bundle", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\FrameworkBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/framework-bundle" - }, - { - "name": "symfony/http-foundation", - "version": "v5.4.20", - "version_normalized": "5.4.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0435363362a47c14e9cf50663cb8ffbf491875a", - "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" - }, - "suggest": { - "symfony/mime": "To use the file extension guesser" - }, - "time": "2023-01-29T11:11:52+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.20" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-foundation" - }, - { - "name": "symfony/http-kernel", - "version": "v5.4.20", - "version_normalized": "5.4.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "aaeec341582d3c160cc9ecfa8b2419ba6c69954e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aaeec341582d3c160cc9ecfa8b2419ba6c69954e", - "reference": "aaeec341582d3c160cc9ecfa8b2419ba6c69954e", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/form": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", - "twig/twig": "<2.13" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" - }, - "time": "2023-02-01T08:18:48+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a structured process for converting a Request into a Response", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.20" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-kernel" - }, - { - "name": "symfony/options-resolver", - "version": "v5.4.21", - "version_normalized": "5.4.21.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "time": "2023-02-14T08:03:56+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.21" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/options-resolver" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-ctype" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-grapheme" - }, - { - "name": "symfony/polyfill-intl-icu", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "a3d9148e2c363588e05abbdd4ee4f971f0a5330c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/a3d9148e2c363588e05abbdd4ee4f971f0a5330c", - "reference": "a3d9148e2c363588e05abbdd4ee4f971f0a5330c", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance and support of other locales than \"en\"" - }, - "time": "2022-11-03T14:55:06+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Icu\\": "" - }, - "classmap": [ - "Resources/stubs" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's ICU-related data and classes", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "icu", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-icu" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-idn" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-normalizer" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-mbstring" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php72" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php73" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2022-05-10T07:21:04+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php80" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.26.0", - "version_normalized": "1.26.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2022-05-24T11:49:31+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php81" - }, - { - "name": "symfony/property-access", - "version": "v5.4.22", - "version_normalized": "5.4.22.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/property-access.git", - "reference": "ffee082889586b5718347b291e04071f4d07b38f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/ffee082889586b5718347b291e04071f4d07b38f", - "reference": "ffee082889586b5718347b291e04071f4d07b38f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/property-info": "^5.2|^6.0" - }, - "require-dev": { - "symfony/cache": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/cache-implementation": "To cache access methods." - }, - "time": "2023-03-14T14:59:20+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\PropertyAccess\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides functions to read and write from/to an object or array using a simple string notation", - "homepage": "https://symfony.com", - "keywords": [ - "access", - "array", - "extraction", - "index", - "injection", - "object", - "property", - "property-path", - "reflection" - ], - "support": { - "source": "https://github.com/symfony/property-access/tree/v5.4.22" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/property-access" - }, - { - "name": "symfony/property-info", - "version": "v5.4.24", - "version_normalized": "5.4.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/property-info.git", - "reference": "d43b85b00699b4484964c297575b5c6f9dc5f6e1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/d43b85b00699b4484964c297575b5c6f9dc5f6e1", - "reference": "d43b85b00699b4484964c297575b5c6f9dc5f6e1", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/dependency-injection": "<4.4" - }, - "require-dev": { - "doctrine/annotations": "^1.10.4|^2", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "phpstan/phpdoc-parser": "^1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" - }, - "suggest": { - "phpdocumentor/reflection-docblock": "To use the PHPDoc", - "psr/cache-implementation": "To cache results", - "symfony/doctrine-bridge": "To use Doctrine metadata", - "symfony/serializer": "To use Serializer metadata" - }, - "time": "2023-05-15T20:11:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\PropertyInfo\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Extracts information about PHP class' properties using metadata of popular sources", - "homepage": "https://symfony.com", - "keywords": [ - "doctrine", - "phpdoc", - "property", - "symfony", - "type", - "validator" - ], - "support": { - "source": "https://github.com/symfony/property-info/tree/v5.4.24" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/property-info" - }, - { - "name": "symfony/routing", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/3e01ccd9b2a3a4167ba2b3c53612762300300226", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<5.3", - "symfony/dependency-injection": "<4.4", - "symfony/yaml": "<4.4" - }, - "require-dev": { - "doctrine/annotations": "^1.12", - "psr/log": "^1|^2|^3", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" - }, - "time": "2022-07-20T13:00:38+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Maps an HTTP request to a set of configuration variables", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/routing" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.2", - "version_normalized": "2.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "time": "2022-05-30T19:17:29+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/service-contracts" - }, - { - "name": "symfony/stopwatch", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "bd2b066090fd6a67039371098fa25a84cb2679ec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/bd2b066090fd6a67039371098fa25a84cb2679ec", - "reference": "bd2b066090fd6a67039371098fa25a84cb2679ec", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" - }, - "time": "2023-01-01T08:32:19+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a way to profile code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/stopwatch" - }, - { - "name": "symfony/string", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5eb661e49ad389e4ae2b6e4df8d783a8a6548322", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "time": "2022-07-24T16:15:25+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/string" - }, - { - "name": "symfony/translation-contracts", - "version": "v2.5.2", - "version_normalized": "2.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", - "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "time": "2022-06-27T16:58:25+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/translation-contracts" - }, - { - "name": "symfony/twig-bridge", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/twig-bridge.git", - "reference": "63b8a50d48c9fe3d04e77307d4f1771dd848baa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/63b8a50d48c9fe3d04e77307d4f1771dd848baa8", - "reference": "63b8a50d48c9fe3d04e77307d4f1771dd848baa8", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/console": "<5.3", - "symfony/form": "<5.3", - "symfony/http-foundation": "<5.3", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<5.2", - "symfony/workflow": "<5.2" - }, - "require-dev": { - "doctrine/annotations": "^1.12", - "egulias/email-validator": "^2.1.10|^3", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/console": "^5.3|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^5.3|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/mime": "^5.2|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/security-acl": "^2.8|^3.0", - "symfony/security-core": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/security-http": "^4.4|^5.0|^6.0", - "symfony/serializer": "^5.2|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.2|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/workflow": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "twig/cssinliner-extra": "^2.12|^3", - "twig/inky-extra": "^2.12|^3", - "twig/markdown-extra": "^2.12|^3" - }, - "suggest": { - "symfony/asset": "For using the AssetExtension", - "symfony/expression-language": "For using the ExpressionExtension", - "symfony/finder": "", - "symfony/form": "For using the FormExtension", - "symfony/http-kernel": "For using the HttpKernelExtension", - "symfony/routing": "For using the RoutingExtension", - "symfony/security-core": "For using the SecurityExtension", - "symfony/security-csrf": "For using the CsrfExtension", - "symfony/security-http": "For using the LogoutUrlExtension", - "symfony/stopwatch": "For using the StopwatchExtension", - "symfony/translation": "For using the TranslationExtension", - "symfony/var-dumper": "For using the DumpExtension", - "symfony/web-link": "For using the WebLinkExtension", - "symfony/yaml": "For using the YamlExtension" - }, - "time": "2022-07-20T13:00:38+00:00", - "type": "symfony-bridge", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bridge\\Twig\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides integration for Twig with various Symfony components", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/twig-bridge" - }, - { - "name": "symfony/twig-bundle", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/twig-bundle.git", - "reference": "286bd9e38b9bcb142f1eda0a75b0bbeb49ff34bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/286bd9e38b9bcb142f1eda0a75b0bbeb49ff34bd", - "reference": "286bd9e38b9bcb142f1eda0a75b0bbeb49ff34bd", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/twig-bridge": "^5.3|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "symfony/dependency-injection": "<5.3", - "symfony/framework-bundle": "<5.0", - "symfony/service-contracts": ">=3.0", - "symfony/translation": "<5.0" - }, - "require-dev": { - "doctrine/annotations": "^1.10.4|^2", - "doctrine/cache": "^1.0|^2.0", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "time": "2023-01-01T08:32:19+00:00", - "type": "symfony-bundle", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\TwigBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a tight integration of Twig into the Symfony full-stack framework", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/twig-bundle/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/twig-bundle" - }, - { - "name": "symfony/var-dumper", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "time": "2022-07-20T13:00:38+00:00", - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/var-dumper" - }, - { - "name": "symfony/var-exporter", - "version": "v5.4.10", - "version_normalized": "5.4.10.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "8fc03ee75eeece3d9be1ef47d26d79bea1afb340" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/8fc03ee75eeece3d9be1ef47d26d79bea1afb340", - "reference": "8fc03ee75eeece3d9be1ef47d26d79bea1afb340", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "time": "2022-05-27T12:56:18+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "serialize" - ], - "support": { - "source": "https://github.com/symfony/var-exporter/tree/v5.4.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/var-exporter" - }, - { - "name": "symfony/web-profiler-bundle", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/web-profiler-bundle.git", - "reference": "cd83822071f2bc05583af1e53c1bc46be625a56d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/cd83822071f2bc05583af1e53c1bc46be625a56d", - "reference": "cd83822071f2bc05583af1e53c1bc46be625a56d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.3|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/polyfill-php80": "^1.16", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "symfony/dependency-injection": "<5.2", - "symfony/form": "<4.4", - "symfony/mailer": "<5.4", - "symfony/messenger": "<4.4" - }, - "require-dev": { - "symfony/browser-kit": "^4.4|^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "time": "2023-01-01T08:32:19+00:00", - "type": "symfony-bundle", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\WebProfilerBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a development tool that gives detailed information about the execution of any request", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/web-profiler-bundle/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/web-profiler-bundle" - }, - { - "name": "symfony/yaml", - "version": "v5.4.19", - "version_normalized": "5.4.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "71c05db20cb9b54d381a28255f17580e2b7e36a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/71c05db20cb9b54d381a28255f17580e2b7e36a5", - "reference": "71c05db20cb9b54d381a28255f17580e2b7e36a5", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "time": "2023-01-10T18:51:14+00:00", - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.19" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/yaml" - }, - { - "name": "thenetworg/oauth2-azure", - "version": "v2.1.1", - "version_normalized": "2.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/TheNetworg/oauth2-azure.git", - "reference": "06fb2d620fb6e6c934f632c7ec7c5ea2e978a844" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/TheNetworg/oauth2-azure/zipball/06fb2d620fb6e6c934f632c7ec7c5ea2e978a844", - "reference": "06fb2d620fb6e6c934f632c7ec7c5ea2e978a844", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-openssl": "*", - "firebase/php-jwt": "~3.0||~4.0||~5.0||~6.0", - "league/oauth2-client": "~2.0", - "php": "^7.1|^8.0" - }, - "time": "2022-06-23T10:35:36+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "TheNetworg\\OAuth2\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Hajek", - "email": "jan.hajek@thenetw.org", - "homepage": "https://thenetw.org" - } - ], - "description": "Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client", - "keywords": [ - "SSO", - "aad", - "authorization", - "azure", - "azure active directory", - "client", - "microsoft", - "oauth", - "oauth2", - "windows azure" - ], - "support": { - "issues": "https://github.com/TheNetworg/oauth2-azure/issues", - "source": "https://github.com/TheNetworg/oauth2-azure/tree/v2.1.1" - }, - "install-path": "../thenetworg/oauth2-azure" - }, - { - "name": "twig/twig", - "version": "v3.4.3", - "version_normalized": "3.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c38fd6b0b7f370c198db91ffd02e23b517426b58", - "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "time": "2022-09-28T08:42:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.4.3" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "install-path": "../twig/twig" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "version_normalized": "1.11.0.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "time": "2022-06-03T18:03:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "install-path": "../webmozart/assert" - } - ], - "dev": true, - "dev-package-names": [ - "symfony/stopwatch", - "symfony/web-profiler-bundle" - ] -} diff --git a/lib/composer/installed.php b/lib/composer/installed.php deleted file mode 100644 index 75145242e..000000000 --- a/lib/composer/installed.php +++ /dev/null @@ -1,819 +0,0 @@ - array( - 'pretty_version' => 'dev-develop', - 'version' => 'dev-develop', - 'type' => 'project', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => '960ce4efcd62c8ca3378b81414b33742bde1d568', - 'name' => 'combodo/itop', - 'dev' => true, - ), - 'versions' => array( - 'apereo/phpcas' => array( - 'pretty_version' => '1.6.0', - 'version' => '1.6.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../apereo/phpcas', - 'aliases' => array(), - 'reference' => 'f817c72a961484afef95ac64a9257c8e31f063b9', - 'dev_requirement' => false, - ), - 'combodo/itop' => array( - 'pretty_version' => 'dev-develop', - 'version' => 'dev-develop', - 'type' => 'project', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => '960ce4efcd62c8ca3378b81414b33742bde1d568', - 'dev_requirement' => false, - ), - 'combodo/tcpdf' => array( - 'pretty_version' => '6.4.4', - 'version' => '6.4.4.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../combodo/tcpdf', - 'aliases' => array(), - 'reference' => '0e31c013ccd000aa6762e9186778aa6e259ac8e8', - 'dev_requirement' => false, - ), - 'container-interop/container-interop' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => '^1.2.0', - ), - ), - 'doctrine/annotations' => array( - 'pretty_version' => '2.0.1', - 'version' => '2.0.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/annotations', - 'aliases' => array(), - 'reference' => 'e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f', - 'dev_requirement' => false, - ), - 'doctrine/cache' => array( - 'pretty_version' => '2.2.0', - 'version' => '2.2.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/cache', - 'aliases' => array(), - 'reference' => '1ca8f21980e770095a31456042471a57bc4c68fb', - 'dev_requirement' => false, - ), - 'doctrine/deprecations' => array( - 'pretty_version' => 'v1.1.1', - 'version' => '1.1.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/deprecations', - 'aliases' => array(), - 'reference' => '612a3ee5ab0d5dd97b7cf3874a6efe24325efac3', - 'dev_requirement' => false, - ), - 'doctrine/lexer' => array( - 'pretty_version' => '2.1.0', - 'version' => '2.1.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/lexer', - 'aliases' => array(), - 'reference' => '39ab8fcf5a51ce4b85ca97c7a7d033eb12831124', - 'dev_requirement' => false, - ), - 'firebase/php-jwt' => array( - 'pretty_version' => 'v6.4.0', - 'version' => '6.4.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../firebase/php-jwt', - 'aliases' => array(), - 'reference' => '4dd1e007f22a927ac77da5a3fbb067b42d3bc224', - 'dev_requirement' => false, - ), - 'guzzlehttp/guzzle' => array( - 'pretty_version' => '7.7.0', - 'version' => '7.7.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', - 'aliases' => array(), - 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5', - 'dev_requirement' => false, - ), - 'guzzlehttp/promises' => array( - 'pretty_version' => '2.0.0', - 'version' => '2.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/promises', - 'aliases' => array(), - 'reference' => '3a494dc7dc1d7d12e511890177ae2d0e6c107da6', - 'dev_requirement' => false, - ), - 'guzzlehttp/psr7' => array( - 'pretty_version' => '2.5.0', - 'version' => '2.5.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/psr7', - 'aliases' => array(), - 'reference' => 'b635f279edd83fc275f822a1188157ffea568ff6', - 'dev_requirement' => false, - ), - 'laminas/laminas-loader' => array( - 'pretty_version' => '2.8.0', - 'version' => '2.8.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../laminas/laminas-loader', - 'aliases' => array(), - 'reference' => 'd0589ec9dd48365fd95ad10d1c906efd7711c16b', - 'dev_requirement' => false, - ), - 'laminas/laminas-mail' => array( - 'pretty_version' => '2.16.0', - 'version' => '2.16.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../laminas/laminas-mail', - 'aliases' => array(), - 'reference' => '1ee1a384b96c8af29ecad9b3a7adc27a150ebc49', - 'dev_requirement' => false, - ), - 'laminas/laminas-mime' => array( - 'pretty_version' => '2.9.1', - 'version' => '2.9.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../laminas/laminas-mime', - 'aliases' => array(), - 'reference' => '72d21a1b4bb7086d4a4d7058c0abca180b209184', - 'dev_requirement' => false, - ), - 'laminas/laminas-servicemanager' => array( - 'pretty_version' => '3.16.0', - 'version' => '3.16.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../laminas/laminas-servicemanager', - 'aliases' => array(), - 'reference' => '863c66733740cd36ebf5e700f4258ef2c68a2a24', - 'dev_requirement' => false, - ), - 'laminas/laminas-stdlib' => array( - 'pretty_version' => '3.12.0', - 'version' => '3.12.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../laminas/laminas-stdlib', - 'aliases' => array(), - 'reference' => 'c5aed3c798018e31fbb7b1e421b8d96bf2cda453', - 'dev_requirement' => false, - ), - 'laminas/laminas-validator' => array( - 'pretty_version' => '2.23.0', - 'version' => '2.23.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../laminas/laminas-validator', - 'aliases' => array(), - 'reference' => '6d61b6cc3b222f13807a18d9247cdfb084958b03', - 'dev_requirement' => false, - ), - 'league/oauth2-client' => array( - 'pretty_version' => '2.6.1', - 'version' => '2.6.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../league/oauth2-client', - 'aliases' => array(), - 'reference' => '2334c249907190c132364f5dae0287ab8666aa19', - 'dev_requirement' => false, - ), - 'league/oauth2-google' => array( - 'pretty_version' => '3.0.4', - 'version' => '3.0.4.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../league/oauth2-google', - 'aliases' => array(), - 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6', - 'dev_requirement' => false, - ), - 'nikic/php-parser' => array( - 'pretty_version' => 'v4.14.0', - 'version' => '4.14.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../nikic/php-parser', - 'aliases' => array(), - 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1', - 'dev_requirement' => false, - ), - 'paragonie/random_compat' => array( - 'pretty_version' => 'v9.99.100', - 'version' => '9.99.100.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../paragonie/random_compat', - 'aliases' => array(), - 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', - 'dev_requirement' => false, - ), - 'pear/archive_tar' => array( - 'pretty_version' => '1.4.14', - 'version' => '1.4.14.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../pear/archive_tar', - 'aliases' => array(), - 'reference' => '4d761c5334c790e45ef3245f0864b8955c562caa', - 'dev_requirement' => false, - ), - 'pear/console_getopt' => array( - 'pretty_version' => 'v1.4.3', - 'version' => '1.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../pear/console_getopt', - 'aliases' => array(), - 'reference' => 'a41f8d3e668987609178c7c4a9fe48fecac53fa0', - 'dev_requirement' => false, - ), - 'pear/pear-core-minimal' => array( - 'pretty_version' => 'v1.10.11', - 'version' => '1.10.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../pear/pear-core-minimal', - 'aliases' => array(), - 'reference' => '68d0d32ada737153b7e93b8d3c710ebe70ac867d', - 'dev_requirement' => false, - ), - 'pear/pear_exception' => array( - 'pretty_version' => 'v1.0.2', - 'version' => '1.0.2.0', - 'type' => 'class', - 'install_path' => __DIR__ . '/../pear/pear_exception', - 'aliases' => array(), - 'reference' => 'b14fbe2ddb0b9f94f5b24cf08783d599f776fff0', - 'dev_requirement' => false, - ), - 'pelago/emogrifier' => array( - 'pretty_version' => 'v6.0.0', - 'version' => '6.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../pelago/emogrifier', - 'aliases' => array(), - 'reference' => 'aa72d5407efac118f3896bcb995a2cba793df0ae', - 'dev_requirement' => false, - ), - 'psr/cache' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/cache', - 'aliases' => array(), - 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', - 'dev_requirement' => false, - ), - 'psr/cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'psr/container' => array( - 'pretty_version' => '1.1.2', - 'version' => '1.1.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/container', - 'aliases' => array(), - 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', - 'dev_requirement' => false, - ), - 'psr/container-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '^1.0', - 1 => '1.0', - ), - ), - 'psr/event-dispatcher' => array( - 'pretty_version' => '1.0.0', - 'version' => '1.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/event-dispatcher', - 'aliases' => array(), - 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', - 'dev_requirement' => false, - ), - 'psr/event-dispatcher-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/http-client' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-client', - 'aliases' => array(), - 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31', - 'dev_requirement' => false, - ), - 'psr/http-client-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/http-factory' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-factory', - 'aliases' => array(), - 'reference' => 'e616d01114759c4c489f93b099585439f795fe35', - 'dev_requirement' => false, - ), - 'psr/http-factory-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/http-message' => array( - 'pretty_version' => '2.0', - 'version' => '2.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-message', - 'aliases' => array(), - 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', - 'dev_requirement' => false, - ), - 'psr/http-message-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/log' => array( - 'pretty_version' => '1.1.4', - 'version' => '1.1.4.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/log', - 'aliases' => array(), - 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', - 'dev_requirement' => false, - ), - 'psr/log-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'psr/simple-cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'ralouphie/getallheaders' => array( - 'pretty_version' => '3.0.3', - 'version' => '3.0.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../ralouphie/getallheaders', - 'aliases' => array(), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', - 'dev_requirement' => false, - ), - 'rsky/pear-core-min' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => 'v1.10.11', - ), - ), - 'sabberworm/php-css-parser' => array( - 'pretty_version' => '8.4.0', - 'version' => '8.4.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', - 'aliases' => array(), - 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30', - 'dev_requirement' => false, - ), - 'scssphp/scssphp' => array( - 'pretty_version' => 'v1.10.5', - 'version' => '1.10.5.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../scssphp/scssphp', - 'aliases' => array(), - 'reference' => '6d44282ccf283e133ab70b6282f8e068ff2f9bf9', - 'dev_requirement' => false, - ), - 'symfony/cache' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/cache', - 'aliases' => array(), - 'reference' => '5a0fff46df349f0db3fe242263451fddf5277362', - 'dev_requirement' => false, - ), - 'symfony/cache-contracts' => array( - 'pretty_version' => 'v2.5.2', - 'version' => '2.5.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/cache-contracts', - 'aliases' => array(), - 'reference' => '64be4a7acb83b6f2bf6de9a02cee6dad41277ebc', - 'dev_requirement' => false, - ), - 'symfony/cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'symfony/config' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/config', - 'aliases' => array(), - 'reference' => 'ec79e03125c1d2477e43dde8528535d90cc78379', - 'dev_requirement' => false, - ), - 'symfony/console' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/console', - 'aliases' => array(), - 'reference' => 'dccb8d251a9017d5994c988b034d3e18aaabf740', - 'dev_requirement' => false, - ), - 'symfony/css-selector' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/css-selector', - 'aliases' => array(), - 'reference' => 'c1681789f059ab756001052164726ae88512ae3d', - 'dev_requirement' => false, - ), - 'symfony/dependency-injection' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/dependency-injection', - 'aliases' => array(), - 'reference' => 'a8b9251016e9476db73e25fa836904bc0bf74c62', - 'dev_requirement' => false, - ), - 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v2.5.2', - 'version' => '2.5.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', - 'aliases' => array(), - 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', - 'dev_requirement' => false, - ), - 'symfony/dotenv' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/dotenv', - 'aliases' => array(), - 'reference' => '38190ba62566afa26ca723a795d0a004e061bd2a', - 'dev_requirement' => false, - ), - 'symfony/error-handler' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/error-handler', - 'aliases' => array(), - 'reference' => 'f75d17cb4769eb38cd5fccbda95cd80a054d35c8', - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher' => array( - 'pretty_version' => 'v5.4.9', - 'version' => '5.4.9.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/event-dispatcher', - 'aliases' => array(), - 'reference' => '8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc', - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher-contracts' => array( - 'pretty_version' => 'v2.5.2', - 'version' => '2.5.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', - 'aliases' => array(), - 'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1', - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '2.0', - ), - ), - 'symfony/filesystem' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/filesystem', - 'aliases' => array(), - 'reference' => '6699fb0228d1bc35b12aed6dd5e7455457609ddd', - 'dev_requirement' => false, - ), - 'symfony/finder' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/finder', - 'aliases' => array(), - 'reference' => '7872a66f57caffa2916a584db1aa7f12adc76f8c', - 'dev_requirement' => false, - ), - 'symfony/form' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/form', - 'aliases' => array(), - 'reference' => 'c29e6cccee469ca93db2dbc02a39c29312c5e362', - 'dev_requirement' => false, - ), - 'symfony/framework-bundle' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'symfony-bundle', - 'install_path' => __DIR__ . '/../symfony/framework-bundle', - 'aliases' => array(), - 'reference' => 'a208ee578000f9dedcb50a9784ec7ff8706a7bf1', - 'dev_requirement' => false, - ), - 'symfony/http-foundation' => array( - 'pretty_version' => 'v5.4.20', - 'version' => '5.4.20.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-foundation', - 'aliases' => array(), - 'reference' => 'd0435363362a47c14e9cf50663cb8ffbf491875a', - 'dev_requirement' => false, - ), - 'symfony/http-kernel' => array( - 'pretty_version' => 'v5.4.20', - 'version' => '5.4.20.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-kernel', - 'aliases' => array(), - 'reference' => 'aaeec341582d3c160cc9ecfa8b2419ba6c69954e', - 'dev_requirement' => false, - ), - 'symfony/options-resolver' => array( - 'pretty_version' => 'v5.4.21', - 'version' => '5.4.21.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/options-resolver', - 'aliases' => array(), - 'reference' => '4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9', - 'dev_requirement' => false, - ), - 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', - 'aliases' => array(), - 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4', - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-grapheme' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', - 'aliases' => array(), - 'reference' => '433d05519ce6990bf3530fba6957499d327395c2', - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-icu' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-icu', - 'aliases' => array(), - 'reference' => 'a3d9148e2c363588e05abbdd4ee4f971f0a5330c', - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', - 'aliases' => array(), - 'reference' => '59a8d271f00dd0e4c2e518104cc7963f655a1aa8', - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', - 'aliases' => array(), - 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', - 'dev_requirement' => false, - ), - 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', - 'aliases' => array(), - 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php72' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php72', - 'aliases' => array(), - 'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php73' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php73', - 'aliases' => array(), - 'reference' => 'e440d35fa0286f77fb45b79a03fedbeda9307e85', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php80', - 'aliases' => array(), - 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php81' => array( - 'pretty_version' => 'v1.26.0', - 'version' => '1.26.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php81', - 'aliases' => array(), - 'reference' => '13f6d1271c663dc5ae9fb843a8f16521db7687a1', - 'dev_requirement' => false, - ), - 'symfony/property-access' => array( - 'pretty_version' => 'v5.4.22', - 'version' => '5.4.22.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/property-access', - 'aliases' => array(), - 'reference' => 'ffee082889586b5718347b291e04071f4d07b38f', - 'dev_requirement' => false, - ), - 'symfony/property-info' => array( - 'pretty_version' => 'v5.4.24', - 'version' => '5.4.24.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/property-info', - 'aliases' => array(), - 'reference' => 'd43b85b00699b4484964c297575b5c6f9dc5f6e1', - 'dev_requirement' => false, - ), - 'symfony/routing' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/routing', - 'aliases' => array(), - 'reference' => '3e01ccd9b2a3a4167ba2b3c53612762300300226', - 'dev_requirement' => false, - ), - 'symfony/service-contracts' => array( - 'pretty_version' => 'v2.5.2', - 'version' => '2.5.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/service-contracts', - 'aliases' => array(), - 'reference' => '4b426aac47d6427cc1a1d0f7e2ac724627f5966c', - 'dev_requirement' => false, - ), - 'symfony/service-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'symfony/stopwatch' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/stopwatch', - 'aliases' => array(), - 'reference' => 'bd2b066090fd6a67039371098fa25a84cb2679ec', - 'dev_requirement' => true, - ), - 'symfony/string' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/string', - 'aliases' => array(), - 'reference' => '5eb661e49ad389e4ae2b6e4df8d783a8a6548322', - 'dev_requirement' => false, - ), - 'symfony/translation-contracts' => array( - 'pretty_version' => 'v2.5.2', - 'version' => '2.5.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/translation-contracts', - 'aliases' => array(), - 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', - 'dev_requirement' => false, - ), - 'symfony/twig-bridge' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'symfony-bridge', - 'install_path' => __DIR__ . '/../symfony/twig-bridge', - 'aliases' => array(), - 'reference' => '63b8a50d48c9fe3d04e77307d4f1771dd848baa8', - 'dev_requirement' => false, - ), - 'symfony/twig-bundle' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'symfony-bundle', - 'install_path' => __DIR__ . '/../symfony/twig-bundle', - 'aliases' => array(), - 'reference' => '286bd9e38b9bcb142f1eda0a75b0bbeb49ff34bd', - 'dev_requirement' => false, - ), - 'symfony/var-dumper' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/var-dumper', - 'aliases' => array(), - 'reference' => 'b8f306d7b8ef34fb3db3305be97ba8e088fb4861', - 'dev_requirement' => false, - ), - 'symfony/var-exporter' => array( - 'pretty_version' => 'v5.4.10', - 'version' => '5.4.10.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/var-exporter', - 'aliases' => array(), - 'reference' => '8fc03ee75eeece3d9be1ef47d26d79bea1afb340', - 'dev_requirement' => false, - ), - 'symfony/web-profiler-bundle' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'symfony-bundle', - 'install_path' => __DIR__ . '/../symfony/web-profiler-bundle', - 'aliases' => array(), - 'reference' => 'cd83822071f2bc05583af1e53c1bc46be625a56d', - 'dev_requirement' => true, - ), - 'symfony/yaml' => array( - 'pretty_version' => 'v5.4.19', - 'version' => '5.4.19.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/yaml', - 'aliases' => array(), - 'reference' => '71c05db20cb9b54d381a28255f17580e2b7e36a5', - 'dev_requirement' => false, - ), - 'tecnickcom/tcpdf' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => '6.4.4', - ), - ), - 'thenetworg/oauth2-azure' => array( - 'pretty_version' => 'v2.1.1', - 'version' => '2.1.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../thenetworg/oauth2-azure', - 'aliases' => array(), - 'reference' => '06fb2d620fb6e6c934f632c7ec7c5ea2e978a844', - 'dev_requirement' => false, - ), - 'twig/twig' => array( - 'pretty_version' => 'v3.4.3', - 'version' => '3.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../twig/twig', - 'aliases' => array(), - 'reference' => 'c38fd6b0b7f370c198db91ffd02e23b517426b58', - 'dev_requirement' => false, - ), - 'webmozart/assert' => array( - 'pretty_version' => '1.11.0', - 'version' => '1.11.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../webmozart/assert', - 'aliases' => array(), - 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', - 'dev_requirement' => false, - ), - ), -); diff --git a/lib/composer/platform_check.php b/lib/composer/platform_check.php deleted file mode 100644 index 2e6a23f9c..000000000 --- a/lib/composer/platform_check.php +++ /dev/null @@ -1,43 +0,0 @@ -= 70400)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; -} - -$missingExtensions = array(); -extension_loaded('curl') || $missingExtensions[] = 'curl'; -extension_loaded('dom') || $missingExtensions[] = 'dom'; -extension_loaded('gd') || $missingExtensions[] = 'gd'; -extension_loaded('iconv') || $missingExtensions[] = 'iconv'; -extension_loaded('json') || $missingExtensions[] = 'json'; -extension_loaded('libxml') || $missingExtensions[] = 'libxml'; -extension_loaded('mysqli') || $missingExtensions[] = 'mysqli'; -extension_loaded('openssl') || $missingExtensions[] = 'openssl'; -extension_loaded('soap') || $missingExtensions[] = 'soap'; -extension_loaded('tokenizer') || $missingExtensions[] = 'tokenizer'; -extension_loaded('xml') || $missingExtensions[] = 'xml'; - -if ($missingExtensions) { - $issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions) . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/lib/doctrine/annotations/LICENSE b/lib/doctrine/annotations/LICENSE deleted file mode 100644 index 5e781fce4..000000000 --- a/lib/doctrine/annotations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/lib/doctrine/annotations/README.md b/lib/doctrine/annotations/README.md deleted file mode 100644 index 6b8c0359b..000000000 --- a/lib/doctrine/annotations/README.md +++ /dev/null @@ -1,24 +0,0 @@ -⚠️ PHP 8 introduced -[attributes](https://www.php.net/manual/en/language.attributes.overview.php), -which are a native replacement for annotations. As such, this library is -considered feature complete, and should receive exclusively bugfixes and -security fixes. - -# Doctrine Annotations - -[![Build Status](https://github.com/doctrine/annotations/workflows/Continuous%20Integration/badge.svg?label=build)](https://github.com/doctrine/persistence/actions) -[![Dependency Status](https://www.versioneye.com/package/php--doctrine--annotations/badge.png)](https://www.versioneye.com/package/php--doctrine--annotations) -[![Reference Status](https://www.versioneye.com/php/doctrine:annotations/reference_badge.svg)](https://www.versioneye.com/php/doctrine:annotations/references) -[![Total Downloads](https://poser.pugx.org/doctrine/annotations/downloads.png)](https://packagist.org/packages/doctrine/annotations) -[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/annotations.svg?label=stable)](https://packagist.org/packages/doctrine/annotations) - -Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). - -## Documentation - -See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html). - -## Contributing - -When making a pull request, make sure your changes follow the -[Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction). diff --git a/lib/doctrine/annotations/UPGRADE.md b/lib/doctrine/annotations/UPGRADE.md deleted file mode 100644 index 4172708f0..000000000 --- a/lib/doctrine/annotations/UPGRADE.md +++ /dev/null @@ -1,18 +0,0 @@ -# Upgrade from 1.0.x to 2.0.x - -- The `NamedArgumentConstructorAnnotation` has been removed. Use the `@NamedArgumentConstructor` - annotation instead. -- `SimpleAnnotationReader` has been removed. -- `DocLexer::peek()` and `DocLexer::glimpse` now return -`Doctrine\Common\Lexer\Token` objects. When using `doctrine/lexer` 2, these -implement `ArrayAccess` as a way for you to still be able to treat them as -arrays in some ways. -- `CachedReader` and `FileCacheReader` have been removed. -- `AnnotationRegistry` methods related to registering annotations instead of - using autoloading have been removed. -- Parameter type declarations have been added to all methods of all classes. If -you have classes inheriting from classes inside this package, you should add -parameter and return type declarations. -- Support for PHP < 7.2 has been removed -- `PhpParser::parseClass()` has been removed. Use - `PhpParser::parseUseStatements()` instead. diff --git a/lib/doctrine/annotations/composer.json b/lib/doctrine/annotations/composer.json deleted file mode 100644 index d1d3d8db1..000000000 --- a/lib/doctrine/annotations/composer.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "doctrine/annotations", - "description": "Docblock Annotations Parser", - "license": "MIT", - "type": "library", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "require": { - "php": "^7.2 || ^8.0", - "ext-tokenizer": "*", - "doctrine/lexer": "^2 || ^3", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Performance\\Common\\Annotations\\": "tests/Doctrine/Performance/Common/Annotations", - "Doctrine\\Tests\\Common\\Annotations\\": "tests/Doctrine/Tests/Common/Annotations" - }, - "files": [ - "tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php", - "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php" - ] - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/lib/doctrine/annotations/docs/en/annotations.rst b/lib/doctrine/annotations/docs/en/annotations.rst deleted file mode 100644 index d32b15d12..000000000 --- a/lib/doctrine/annotations/docs/en/annotations.rst +++ /dev/null @@ -1,189 +0,0 @@ -Handling Annotations -==================== - -There are several different approaches to handling annotations in PHP. -Doctrine Annotations maps docblock annotations to PHP classes. Because -not all docblock annotations are used for metadata purposes a filter is -applied to ignore or skip classes that are not Doctrine annotations. - -Take a look at the following code snippet: - -.. code-block:: php - - namespace MyProject\Entities; - - use Doctrine\ORM\Mapping AS ORM; - use Symfony\Component\Validator\Constraints AS Assert; - - /** - * @author Benjamin Eberlei - * @ORM\Entity - * @MyProject\Annotations\Foobarable - */ - class User - { - /** - * @ORM\Id @ORM\Column @ORM\GeneratedValue - * @dummy - * @var int - */ - private $id; - - /** - * @ORM\Column(type="string") - * @Assert\NotEmpty - * @Assert\Email - * @var string - */ - private $email; - } - -In this snippet you can see a variety of different docblock annotations: - -- Documentation annotations such as ``@var`` and ``@author``. These - annotations are ignored and never considered for throwing an - exception due to wrongly used annotations. -- Annotations imported through use statements. The statement ``use - Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace - available as ``@ORM\ClassName``. Same goes for the import of - ``@Assert``. -- The ``@dummy`` annotation. It is not a documentation annotation and - not ignored. For Doctrine Annotations it is not entirely clear how - to handle this annotation. Depending on the configuration an exception - (unknown annotation) will be thrown when parsing this annotation. -- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. - This is transformed directly into the given class name. - -How are these annotations loaded? From looking at the code you could -guess that the ORM Mapping, Assert Validation and the fully qualified -annotation can just be loaded using -the defined PHP autoloaders. This is not the case however: For error -handling reasons every check for class existence inside the -``AnnotationReader`` sets the second parameter $autoload -of ``class_exists($name, $autoload)`` to false. To work flawlessly the -``AnnotationReader`` requires silent autoloaders which many autoloaders are -not. Silent autoloading is NOT part of the `PSR-0 specification -`_ -for autoloading. - -This is why Doctrine Annotations uses its own autoloading mechanism -through a global registry. If you are wondering about the annotation -registry being global, there is no other way to solve the architectural -problems of autoloading annotation classes in a straightforward fashion. -Additionally if you think about PHP autoloading then you recognize it is -a global as well. - -To anticipate the configuration section, making the above PHP class work -with Doctrine Annotations requires this setup: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - - $reader = new AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('dummy'); - -We create the actual ``AnnotationReader`` instance. -Note that we also add ``dummy`` to the global list of ignored -annotations for which we do not throw exceptions. Setting this is -necessary in our example case, otherwise ``@dummy`` would trigger an -exception to be thrown during the parsing of the docblock of -``MyProject\Entities\User#id``. - -Setup and Configuration ------------------------ - -To use the annotations library is simple, you just need to create a new -``AnnotationReader`` instance: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - -This creates a simple annotation reader with no caching other than in -memory (in php arrays). Since parsing docblocks can be expensive you -should cache this process by using a caching reader. - -To cache annotations, you can create a ``Doctrine\Common\Annotations\PsrCachedReader``. -This reader decorates the original reader and stores all annotations in a PSR-6 -cache: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\PsrCachedReader; - - $cache = ... // instantiate a PSR-6 Cache pool - - $reader = new PsrCachedReader( - new AnnotationReader(), - $cache, - $debug = true - ); - -The ``debug`` flag is used here as well to invalidate the cache files -when the PHP class with annotations changed and should be used during -development. - -.. warning :: - - The ``AnnotationReader`` works and caches under the - assumption that all annotations of a doc-block are processed at - once. That means that annotation classes that do not exist and - aren't loaded and cannot be autoloaded (using the - AnnotationRegistry) would never be visible and not accessible if a - cache is used unless the cache is cleared and the annotations - requested again, this time with all annotations defined. - -By default the annotation reader returns a list of annotations with -numeric indexes. If you want your annotations to be indexed by their -class name you can wrap the reader in an ``IndexedReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\IndexedReader; - - $reader = new IndexedReader(new AnnotationReader()); - -.. warning:: - - You should never wrap the indexed reader inside a cached reader, - only the other way around. This way you can re-use the cache with - indexed or numeric keys, otherwise your code may experience failures - due to caching in a numerical or indexed format. - -Ignoring missing exceptions -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default an exception is thrown from the ``AnnotationReader`` if an -annotation was found that: - -- is not part of the list of ignored "documentation annotations"; -- was not imported through a use statement; -- is not a fully qualified class that exists. - -You can disable this behavior for specific names if your docblocks do -not follow strict requirements: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('foo'); - -PHP Imports -~~~~~~~~~~~ - -By default the annotation reader parses the use-statement of a php file -to gain access to the import rules and register them for the annotation -processing. Only if you are using PHP Imports can you validate the -correct usage of annotations and throw exceptions if you misspelled an -annotation. This mechanism is enabled by default. - -To ease the upgrade path, we still allow you to disable this mechanism. -Note however that we will remove this in future versions: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setEnabledPhpImports(false); diff --git a/lib/doctrine/annotations/docs/en/custom.rst b/lib/doctrine/annotations/docs/en/custom.rst deleted file mode 100644 index 300516625..000000000 --- a/lib/doctrine/annotations/docs/en/custom.rst +++ /dev/null @@ -1,443 +0,0 @@ -Custom Annotation Classes -========================= - -If you want to define your own annotations, you just have to group them -in a namespace. -Annotation classes have to contain a class-level docblock with the text -``@Annotation``: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** @Annotation */ - class Bar - { - // some code - } - -Inject annotation values ------------------------- - -The annotation parser checks if the annotation constructor has arguments, -if so then it will pass the value array, otherwise it will try to inject -values into public properties directly: - - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * - * Some Annotation using a constructor - */ - class Bar - { - private $foo; - - public function __construct(array $values) - { - $this->foo = $values['foo']; - } - } - - /** - * @Annotation - * - * Some Annotation without a constructor - */ - class Foo - { - public $bar; - } - -Optional: Constructors with Named Parameters --------------------------------------------- - -Starting with Annotations v1.11 a new annotation instantiation strategy -is available that aims at compatibility of Annotation classes with the PHP 8 -attribute feature. You need to declare a constructor with regular parameter -names that match the named arguments in the annotation syntax. - -To enable this feature, you can tag your annotation class with -``@NamedArgumentConstructor`` (available from v1.12) or implement the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface -(available from v1.11 and deprecated as of v1.12). -When using the ``@NamedArgumentConstructor`` tag, the first argument of the -constructor is considered as the default one. - - -Usage with the ``@NamedArgumentConstructor`` tag - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(string $foo) - { - $this->foo = $foo; - } - } - - /** Usable with @Bar(foo="baz") */ - /** Usable with @Bar("baz") */ - -In combination with PHP 8's constructor property promotion feature -you can simplify this to: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - public function __construct(private string $foo) {} - } - - -Usage with the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` -interface (v1.11, deprecated as of v1.12): -.. code-block:: php - - namespace MyCompany\Annotations; - - use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; - - /** @Annotation */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(private string $foo) {} - } - - /** Usable with @Bar(foo="baz") */ - -Annotation Target ------------------ - -``@Target`` indicates the kinds of class elements to which an annotation -type is applicable. Then you could define one or more targets: - -- ``CLASS`` Allowed in class docblocks -- ``PROPERTY`` Allowed in property docblocks -- ``METHOD`` Allowed in the method docblocks -- ``FUNCTION`` Allowed in function dockblocks -- ``ALL`` Allowed in class, property, method and function docblocks -- ``ANNOTATION`` Allowed inside other annotations - -If the annotations is not allowed in the current context, an -``AnnotationException`` is thrown. - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - // some code - } - - /** - * @Annotation - * @Target("CLASS") - */ - class Foo - { - // some code - } - -Attribute types ---------------- - -The annotation parser checks the given parameters using the phpdoc -annotation ``@var``, The data type could be validated using the ``@var`` -annotation on the annotation properties or using the ``@Attributes`` and -``@Attribute`` annotations. - -If the data type does not match you get an ``AnnotationException`` - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - /** @var mixed */ - public $mixed; - - /** @var boolean */ - public $boolean; - - /** @var bool */ - public $bool; - - /** @var float */ - public $float; - - /** @var string */ - public $string; - - /** @var integer */ - public $integer; - - /** @var array */ - public $array; - - /** @var SomeAnnotationClass */ - public $annotation; - - /** @var array */ - public $arrayOfIntegers; - - /** @var array */ - public $arrayOfAnnotations; - } - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - * @Attributes({ - * @Attribute("stringProperty", type = "string"), - * @Attribute("annotProperty", type = "SomeAnnotationClass"), - * }) - */ - class Foo - { - public function __construct(array $values) - { - $this->stringProperty = $values['stringProperty']; - $this->annotProperty = $values['annotProperty']; - } - - // some code - } - -Annotation Required -------------------- - -``@Required`` indicates that the field must be specified when the -annotation is used. If it is not used you get an ``AnnotationException`` -stating that this value can not be null. - -Declaring a required field: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Foo - { - /** @Required */ - public $requiredField; - } - -Usage: - -.. code-block:: php - - /** @Foo(requiredField="value") */ - public $direction; // Valid - - /** @Foo */ - public $direction; // Required field missing, throws an AnnotationException - - -Enumerated values ------------------ - -- An annotation property marked with ``@Enum`` is a field that accepts a - fixed set of scalar values. -- You should use ``@Enum`` fields any time you need to represent fixed - values. -- The annotation parser checks the given value and throws an - ``AnnotationException`` if the value does not match. - - -Declaring an enumerated property: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Direction - { - /** - * @Enum({"NORTH", "SOUTH", "EAST", "WEST"}) - */ - public $value; - } - -Annotation usage: - -.. code-block:: php - - /** @Direction("NORTH") */ - public $direction; // Valid value - - /** @Direction("NORTHEAST") */ - public $direction; // Invalid value, throws an AnnotationException - - -Constants ---------- - -The use of constants and class constants is available on the annotations -parser. - -The following usages are allowed: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - use MyCompany\Entity\SomeClass; - - /** - * @Foo(PHP_EOL) - * @Bar(Bar::FOO) - * @Foo({SomeClass::FOO, SomeClass::BAR}) - * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE}) - */ - class User - { - } - - -Be careful with constants and the cache ! - -.. note:: - - The cached reader will not re-evaluate each time an annotation is - loaded from cache. When a constant is changed the cache must be - cleaned. - - -Usage ------ - -Using the library API is simple. Using the annotations described in the -previous section, you can now annotate other classes with your -annotations: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - - /** - * @Foo(bar="foo") - * @Bar(foo="bar") - */ - class User - { - } - -Now we can write a script to get the annotations above: - -.. code-block:: php - - $reflClass = new ReflectionClass('MyCompany\Entity\User'); - $classAnnotations = $reader->getClassAnnotations($reflClass); - - foreach ($classAnnotations AS $annot) { - if ($annot instanceof \MyCompany\Annotations\Foo) { - echo $annot->bar; // prints "foo"; - } else if ($annot instanceof \MyCompany\Annotations\Bar) { - echo $annot->foo; // prints "bar"; - } - } - -You have a complete API for retrieving annotation class instances from a -class, property or method docblock: - - -Reader API -~~~~~~~~~~ - -Access all annotations of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotations(\ReflectionClass $class); - -Access one annotation of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotation(\ReflectionClass $class, $annotationName); - -Access all annotations of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotations(\ReflectionMethod $method); - -Access one annotation of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName); - -Access all annotations of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotations(\ReflectionProperty $property); - -Access one annotation of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); - -Access all annotations of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotations(\ReflectionFunction $property); - -Access one annotation of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName); diff --git a/lib/doctrine/annotations/docs/en/index.rst b/lib/doctrine/annotations/docs/en/index.rst deleted file mode 100644 index a6e338333..000000000 --- a/lib/doctrine/annotations/docs/en/index.rst +++ /dev/null @@ -1,102 +0,0 @@ -Deprecation notice -================== - -PHP 8 introduced `attributes -`_, -which are a native replacement for annotations. As such, this library is -considered feature complete, and should receive exclusively bugfixes and -security fixes. - -Introduction -============ - -Doctrine Annotations allows to implement custom annotation -functionality for PHP classes and functions. - -.. code-block:: php - - class Foo - { - /** - * @MyAnnotation(myProperty="value") - */ - private $bar; - } - -Annotations aren't implemented in PHP itself which is why this component -offers a way to use the PHP doc-blocks as a place for the well known -annotation syntax using the ``@`` char. - -Annotations in Doctrine are used for the ORM configuration to build the -class mapping, but it can be used in other projects for other purposes -too. - -Installation -============ - -You can install the Annotation component with composer: - -.. code-block:: - -   $ composer require doctrine/annotations - -Create an annotation class -========================== - -An annotation class is a representation of the later used annotation -configuration in classes. The annotation class of the previous example -looks like this: - -.. code-block:: php - - /** - * @Annotation - */ - final class MyAnnotation - { - public $myProperty; - } - -The annotation class is declared as an annotation by ``@Annotation``. - -:ref:`Read more about custom annotations. ` - -Reading annotations -=================== - -The access to the annotations happens by reflection of the class or function -containing them. There are multiple reader-classes implementing the -``Doctrine\Common\Annotations\Reader`` interface, that can access the -annotations of a class. A common one is -``Doctrine\Common\Annotations\AnnotationReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - - $reflectionClass = new ReflectionClass(Foo::class); - $property = $reflectionClass->getProperty('bar'); - - $reader = new AnnotationReader(); - $myAnnotation = $reader->getPropertyAnnotation( - $property, - MyAnnotation::class - ); - - echo $myAnnotation->myProperty; // result: "value" - -A reader has multiple methods to access the annotations of a class or -function. - -:ref:`Read more about handling annotations. ` - -IDE Support ------------ - -Some IDEs already provide support for annotations: - -- Eclipse via the `Symfony2 Plugin `_ -- PhpStorm via the `PHP Annotations Plugin `_ or the `Symfony Plugin `_ - -.. _Read more about handling annotations.: annotations -.. _Read more about custom annotations.: custom diff --git a/lib/doctrine/annotations/docs/en/sidebar.rst b/lib/doctrine/annotations/docs/en/sidebar.rst deleted file mode 100644 index 6f5d13c46..000000000 --- a/lib/doctrine/annotations/docs/en/sidebar.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. toctree:: - :depth: 3 - - index - annotations - custom diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php deleted file mode 100644 index fba23e9f1..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ /dev/null @@ -1,54 +0,0 @@ - $data Key-value for properties to be defined in this class. */ - final public function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - /** - * Error handler for unknown property accessor in Annotation class. - * - * @throws BadMethodCallException - */ - public function __get(string $name) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } - - /** - * Error handler for unknown property mutator in Annotation class. - * - * @param mixed $value Property value. - * - * @throws BadMethodCallException - */ - public function __set(string $name, $value) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php deleted file mode 100644 index b1f851400..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ /dev/null @@ -1,21 +0,0 @@ - */ - public $value; -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php deleted file mode 100644 index 6f24d9f1b..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ /dev/null @@ -1,69 +0,0 @@ - */ - public $value; - - /** - * Literal target declaration. - * - * @var mixed[] - */ - public $literal; - - /** - * @phpstan-param array{literal?: mixed[], value: list} $values - * - * @throws InvalidArgumentException - */ - public function __construct(array $values) - { - if (! isset($values['literal'])) { - $values['literal'] = []; - } - - foreach ($values['value'] as $var) { - if (! is_scalar($var)) { - throw new InvalidArgumentException(sprintf( - '@Enum supports only scalar values "%s" given.', - is_object($var) ? get_class($var) : gettype($var) - )); - } - } - - foreach ($values['literal'] as $key => $var) { - if (! in_array($key, $values['value'])) { - throw new InvalidArgumentException(sprintf( - 'Undefined enumerator value "%s" for literal "%s".', - $key, - $var - )); - } - } - - $this->value = $values['value']; - $this->literal = $values['literal']; - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php deleted file mode 100644 index 97a15c257..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ /dev/null @@ -1,43 +0,0 @@ - */ - public $names; - - /** - * @phpstan-param array{value: string|list} $values - * - * @throws RuntimeException - */ - public function __construct(array $values) - { - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new RuntimeException(sprintf( - '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', - json_encode($values['value']) - )); - } - - $this->names = $values['value']; - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php deleted file mode 100644 index 169060103..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php +++ /dev/null @@ -1,13 +0,0 @@ - */ - private static $map = [ - 'ALL' => self::TARGET_ALL, - 'CLASS' => self::TARGET_CLASS, - 'METHOD' => self::TARGET_METHOD, - 'PROPERTY' => self::TARGET_PROPERTY, - 'FUNCTION' => self::TARGET_FUNCTION, - 'ANNOTATION' => self::TARGET_ANNOTATION, - ]; - - /** @phpstan-var list */ - public $value; - - /** - * Targets as bitmask. - * - * @var int - */ - public $targets; - - /** - * Literal target declaration. - * - * @var string - */ - public $literal; - - /** - * @phpstan-param array{value?: string|list} $values - * - * @throws InvalidArgumentException - */ - public function __construct(array $values) - { - if (! isset($values['value'])) { - $values['value'] = null; - } - - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new InvalidArgumentException( - sprintf( - '@Target expects either a string value, or an array of strings, "%s" given.', - is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) - ) - ); - } - - $bitmask = 0; - foreach ($values['value'] as $literal) { - if (! isset(self::$map[$literal])) { - throw new InvalidArgumentException( - sprintf( - 'Invalid Target "%s". Available targets: [%s]', - $literal, - implode(', ', array_keys(self::$map)) - ) - ); - } - - $bitmask |= self::$map[$literal]; - } - - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php deleted file mode 100644 index 002ee0491..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ /dev/null @@ -1,158 +0,0 @@ - $available - * - * @return AnnotationException - */ - public static function enumeratorError( - string $attributeName, - string $annotationName, - string $context, - array $available, - $given - ) { - return new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', - $attributeName, - $annotationName, - $context, - implode(', ', $available), - is_object($given) ? get_class($given) : $given - )); - } - - /** @return AnnotationException */ - public static function optimizerPlusSaveComments() - { - return new self( - 'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.' - ); - } - - /** @return AnnotationException */ - public static function optimizerPlusLoadComments() - { - return new self( - 'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.' - ); - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php deleted file mode 100644 index 31f3777a8..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ /dev/null @@ -1,385 +0,0 @@ - - */ - private static $globalImports = [ - 'ignoreannotation' => Annotation\IgnoreAnnotation::class, - ]; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNamespaces = []; - - /** - * Add a new annotation to the globally ignored annotation names with regard to exception handling. - */ - public static function addGlobalIgnoredName(string $name) - { - self::$globalIgnoredNames[$name] = true; - } - - /** - * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling. - */ - public static function addGlobalIgnoredNamespace(string $namespace) - { - self::$globalIgnoredNamespaces[$namespace] = true; - } - - /** - * Annotations parser. - * - * @var DocParser - */ - private $parser; - - /** - * Annotations parser used to collect parsing metadata. - * - * @var DocParser - */ - private $preParser; - - /** - * PHP parser used to collect imports. - * - * @var PhpParser - */ - private $phpParser; - - /** - * In-memory cache mechanism to store imported annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $imports = []; - - /** - * In-memory cache mechanism to store ignored annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $ignoredAnnotationNames = []; - - /** - * Initializes a new AnnotationReader. - * - * @throws AnnotationException - */ - public function __construct(?DocParser $parser = null) - { - if ( - extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === '0' || - ini_get('opcache.save_comments') === '0') - ) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') === 0) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - // Make sure that the IgnoreAnnotation annotation is loaded - class_exists(IgnoreAnnotation::class); - - $this->parser = $parser ?: new DocParser(); - - $this->preParser = new DocParser(); - - $this->preParser->setImports(self::$globalImports); - $this->preParser->setIgnoreNotImportedAnnotations(true); - $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames); - - $this->phpParser = new PhpParser(); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . '::$' . $property->getName(); - - $this->parser->setTarget(Target::TARGET_PROPERTY); - $this->parser->setImports($this->getPropertyImports($property)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($property->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $this->parser->setTarget(Target::TARGET_METHOD); - $this->parser->setImports($this->getMethodImports($method)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($method->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets the annotations applied to a function. - * - * @phpstan-return list An array of Annotations. - */ - public function getFunctionAnnotations(ReflectionFunction $function): array - { - $context = 'function ' . $function->getName(); - - $this->parser->setTarget(Target::TARGET_FUNCTION); - $this->parser->setImports($this->getImports($function)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($function->getDocComment(), $context); - } - - /** - * Gets a function annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName) - { - $annotations = $this->getFunctionAnnotations($function); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Returns the ignored annotations for the given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getIgnoredAnnotationNames($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->ignoredAnnotationNames[$type][$name])) { - return $this->ignoredAnnotationNames[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->ignoredAnnotationNames[$type][$name]; - } - - /** - * Retrieves imports for a class or a function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getImports($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->imports[$type][$name])) { - return $this->imports[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->imports[$type][$name]; - } - - /** - * Retrieves imports for methods. - * - * @return array - */ - private function getMethodImports(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if ( - ! $trait->hasMethod($method->getName()) - || $trait->getFileName() !== $method->getFileName() - ) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Retrieves imports for properties. - * - * @return array - */ - private function getPropertyImports(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if (! $trait->hasProperty($property->getName())) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Collects parsing metadata for a given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - */ - private function collectParsingMetadata($reflection): void - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - $ignoredAnnotationNames = self::$globalIgnoredNames; - $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name); - - foreach ($annotations as $annotation) { - if (! ($annotation instanceof IgnoreAnnotation)) { - continue; - } - - foreach ($annotation->names as $annot) { - $ignoredAnnotationNames[$annot] = true; - } - } - - $this->imports[$type][$name] = array_merge( - self::$globalImports, - $this->phpParser->parseUseStatements($reflection), - [ - '__NAMESPACE__' => $reflection->getNamespaceName(), - 'self' => $name, - ] - ); - - $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames; - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php deleted file mode 100644 index 290e60aba..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -final class DocLexer extends AbstractLexer -{ - public const T_NONE = 1; - public const T_INTEGER = 2; - public const T_STRING = 3; - public const T_FLOAT = 4; - - // All tokens that are also identifiers should be >= 100 - public const T_IDENTIFIER = 100; - public const T_AT = 101; - public const T_CLOSE_CURLY_BRACES = 102; - public const T_CLOSE_PARENTHESIS = 103; - public const T_COMMA = 104; - public const T_EQUALS = 105; - public const T_FALSE = 106; - public const T_NAMESPACE_SEPARATOR = 107; - public const T_OPEN_CURLY_BRACES = 108; - public const T_OPEN_PARENTHESIS = 109; - public const T_TRUE = 110; - public const T_NULL = 111; - public const T_COLON = 112; - public const T_MINUS = 113; - - /** @var array */ - protected $noCase = [ - '@' => self::T_AT, - ',' => self::T_COMMA, - '(' => self::T_OPEN_PARENTHESIS, - ')' => self::T_CLOSE_PARENTHESIS, - '{' => self::T_OPEN_CURLY_BRACES, - '}' => self::T_CLOSE_CURLY_BRACES, - '=' => self::T_EQUALS, - ':' => self::T_COLON, - '-' => self::T_MINUS, - '\\' => self::T_NAMESPACE_SEPARATOR, - ]; - - /** @var array */ - protected $withCase = [ - 'true' => self::T_TRUE, - 'false' => self::T_FALSE, - 'null' => self::T_NULL, - ]; - - /** - * Whether the next token starts immediately, or if there were - * non-captured symbols before that - */ - public function nextTokenIsAdjacent(): bool - { - return $this->token === null - || ($this->lookahead !== null - && ($this->lookahead->position - $this->token->position) === strlen($this->token->value)); - } - - /** - * {@inheritdoc} - */ - protected function getCatchablePatterns() - { - return [ - '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*', - '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', - '"(?:""|[^"])*+"', - ]; - } - - /** - * {@inheritdoc} - */ - protected function getNonCatchablePatterns() - { - return ['\s+', '\*+', '(.)']; - } - - /** - * {@inheritdoc} - */ - protected function getType(&$value) - { - $type = self::T_NONE; - - if ($value[0] === '"') { - $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); - - return self::T_STRING; - } - - if (isset($this->noCase[$value])) { - return $this->noCase[$value]; - } - - if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { - return self::T_IDENTIFIER; - } - - $lowerValue = strtolower($value); - - if (isset($this->withCase[$lowerValue])) { - return $this->withCase[$lowerValue]; - } - - // Checking numeric value - if (is_numeric($value)) { - return strpos($value, '.') !== false || stripos($value, 'e') !== false - ? self::T_FLOAT : self::T_INTEGER; - } - - return $type; - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php deleted file mode 100644 index a12c15e74..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ /dev/null @@ -1,1494 +0,0 @@ - - */ - private static $classIdentifiers = [ - DocLexer::T_IDENTIFIER, - DocLexer::T_TRUE, - DocLexer::T_FALSE, - DocLexer::T_NULL, - ]; - - /** - * The lexer. - * - * @var DocLexer - */ - private $lexer; - - /** - * Current target context. - * - * @var int - */ - private $target; - - /** - * Doc parser used to collect annotation target. - * - * @var DocParser - */ - private static $metadataParser; - - /** - * Flag to control if the current annotation is nested or not. - * - * @var bool - */ - private $isNestedAnnotation = false; - - /** - * Hashmap containing all use-statements that are to be used when parsing - * the given doc block. - * - * @var array - */ - private $imports = []; - - /** - * This hashmap is used internally to cache results of class_exists() - * look-ups. - * - * @var array - */ - private $classExists = []; - - /** - * Whether annotations that have not been imported should be ignored. - * - * @var bool - */ - private $ignoreNotImportedAnnotations = false; - - /** - * An array of default namespaces if operating in simple mode. - * - * @var string[] - */ - private $namespaces = []; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names must be the raw names as used in the class, not the fully qualified - * - * @var bool[] indexed by annotation name - */ - private $ignoredAnnotationNames = []; - - /** - * A list with annotations in namespaced format - * that are not causing exceptions when not resolved to an annotation class. - * - * @var bool[] indexed by namespace name - */ - private $ignoredAnnotationNamespaces = []; - - /** @var string */ - private $context = ''; - - /** - * Hash-map for caching annotation metadata. - * - * @var array - */ - private static $annotationMetadata = [ - Annotation\Target::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'properties' => [], - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => [ - 'value' => [ - 'required' => false, - 'type' => 'array', - 'array_type' => 'string', - 'value' => 'array', - ], - ], - ], - Annotation\Attribute::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => [ - 'name' => 'name', - 'type' => 'type', - 'required' => 'required', - ], - 'attribute_types' => [ - 'value' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'type' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'required' => [ - 'required' => false, - 'type' => 'boolean', - 'value' => 'boolean', - ], - ], - ], - Annotation\Attributes::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - 'array_type' => Annotation\Attribute::class, - 'value' => 'array<' . Annotation\Attribute::class . '>', - ], - ], - ], - Annotation\Enum::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - ], - 'literal' => [ - 'type' => 'array', - 'required' => false, - ], - ], - ], - Annotation\NamedArgumentConstructor::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => null, - 'properties' => [], - 'attribute_types' => [], - ], - ]; - - /** - * Hash-map for handle types declaration. - * - * @var array - */ - private static $typeMap = [ - 'float' => 'double', - 'bool' => 'boolean', - // allow uppercase Boolean in honor of George Boole - 'Boolean' => 'boolean', - 'int' => 'integer', - ]; - - /** - * Constructs a new DocParser. - */ - public function __construct() - { - $this->lexer = new DocLexer(); - } - - /** - * Sets the annotation names that are ignored during the parsing process. - * - * The names are supposed to be the raw names as used in the class, not the - * fully qualified class names. - * - * @param bool[] $names indexed by annotation name - * - * @return void - */ - public function setIgnoredAnnotationNames(array $names) - { - $this->ignoredAnnotationNames = $names; - } - - /** - * Sets the annotation namespaces that are ignored during the parsing process. - * - * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name - * - * @return void - */ - public function setIgnoredAnnotationNamespaces(array $ignoredAnnotationNamespaces) - { - $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces; - } - - /** - * Sets ignore on not-imported annotations. - * - * @return void - */ - public function setIgnoreNotImportedAnnotations(bool $bool) - { - $this->ignoreNotImportedAnnotations = $bool; - } - - /** - * Sets the default namespaces. - * - * @return void - * - * @throws RuntimeException - */ - public function addNamespace(string $namespace) - { - if ($this->imports) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->namespaces[] = $namespace; - } - - /** - * Sets the imports. - * - * @param array $imports - * - * @return void - * - * @throws RuntimeException - */ - public function setImports(array $imports) - { - if ($this->namespaces) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->imports = $imports; - } - - /** - * Sets current target context as bitmask. - * - * @return void - */ - public function setTarget(int $target) - { - $this->target = $target; - } - - /** - * Parses the given docblock string for annotations. - * - * @phpstan-return list Array of annotations. If no annotations are found, an empty array is returned. - * - * @throws AnnotationException - * @throws ReflectionException - */ - public function parse(string $input, string $context = '') - { - $pos = $this->findInitialTokenPosition($input); - if ($pos === null) { - return []; - } - - $this->context = $context; - - $this->lexer->setInput(trim(substr($input, $pos), '* /')); - $this->lexer->moveNext(); - - return $this->Annotations(); - } - - /** - * Finds the first valid annotation - */ - private function findInitialTokenPosition(string $input): ?int - { - $pos = 0; - - // search for first valid annotation - while (($pos = strpos($input, '@', $pos)) !== false) { - $preceding = substr($input, $pos - 1, 1); - - // if the @ is preceded by a space, a tab or * it is valid - if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === "\t") { - return $pos; - } - - $pos++; - } - - return null; - } - - /** - * Attempts to match the given token with the current lookahead token. - * If they match, updates the lookahead token; otherwise raises a syntax error. - * - * @param int $token Type of token. - * - * @return bool True if tokens match; false otherwise. - * - * @throws AnnotationException - */ - private function match(int $token): bool - { - if (! $this->lexer->isNextToken($token)) { - throw $this->syntaxError($this->lexer->getLiteral($token)); - } - - return $this->lexer->moveNext(); - } - - /** - * Attempts to match the current lookahead token with any of the given tokens. - * - * If any of them matches, this method updates the lookahead token; otherwise - * a syntax error is raised. - * - * @phpstan-param list $tokens - * - * @throws AnnotationException - */ - private function matchAny(array $tokens): bool - { - if (! $this->lexer->isNextTokenAny($tokens)) { - throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); - } - - return $this->lexer->moveNext(); - } - - /** - * Generates a new syntax error. - * - * @param string $expected Expected string. - * @param mixed[]|null $token Optional token. - */ - private function syntaxError(string $expected, ?array $token = null): AnnotationException - { - if ($token === null) { - $token = $this->lexer->lookahead; - } - - $message = sprintf('Expected %s, got ', $expected); - $message .= $this->lexer->lookahead === null - ? 'end of string' - : sprintf("'%s' at position %s", $token->value, $token->position); - - if (strlen($this->context)) { - $message .= ' in ' . $this->context; - } - - $message .= '.'; - - return AnnotationException::syntaxError($message); - } - - /** - * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism - * but uses the {@link AnnotationRegistry} to load classes. - * - * @param class-string $fqcn - */ - private function classExists(string $fqcn): bool - { - if (isset($this->classExists[$fqcn])) { - return $this->classExists[$fqcn]; - } - - // first check if the class already exists, maybe loaded through another AnnotationReader - if (class_exists($fqcn, false)) { - return $this->classExists[$fqcn] = true; - } - - // final check, does this class exist? - return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); - } - - /** - * Collects parsing metadata for a given annotation class - * - * @param class-string $name The annotation name - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function collectAnnotationMetadata(string $name): void - { - if (self::$metadataParser === null) { - self::$metadataParser = new self(); - - self::$metadataParser->setIgnoreNotImportedAnnotations(true); - self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); - self::$metadataParser->setImports([ - 'enum' => Enum::class, - 'target' => Target::class, - 'attribute' => Attribute::class, - 'attributes' => Attributes::class, - 'namedargumentconstructor' => NamedArgumentConstructor::class, - ]); - - // Make sure that annotations from metadata are loaded - class_exists(Enum::class); - class_exists(Target::class); - class_exists(Attribute::class); - class_exists(Attributes::class); - class_exists(NamedArgumentConstructor::class); - } - - $class = new ReflectionClass($name); - $docComment = $class->getDocComment(); - - // Sets default values for annotation metadata - $constructor = $class->getConstructor(); - $metadata = [ - 'default_property' => null, - 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0, - 'constructor_args' => [], - 'properties' => [], - 'property_types' => [], - 'attribute_types' => [], - 'targets_literal' => null, - 'targets' => Target::TARGET_ALL, - 'is_annotation' => strpos($docComment, '@Annotation') !== false, - ]; - - $metadata['has_named_argument_constructor'] = false; - - // verify that the class is really meant to be an annotation - if ($metadata['is_annotation']) { - self::$metadataParser->setTarget(Target::TARGET_CLASS); - - foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { - if ($annotation instanceof Target) { - $metadata['targets'] = $annotation->targets; - $metadata['targets_literal'] = $annotation->literal; - - continue; - } - - if ($annotation instanceof NamedArgumentConstructor) { - $metadata['has_named_argument_constructor'] = $metadata['has_constructor']; - if ($metadata['has_named_argument_constructor']) { - // choose the first argument as the default property - $metadata['default_property'] = $constructor->getParameters()[0]->getName(); - } - } - - if (! ($annotation instanceof Attributes)) { - continue; - } - - foreach ($annotation->value as $attribute) { - $this->collectAttributeTypeMetadata($metadata, $attribute); - } - } - - // if not has a constructor will inject values into public properties - if ($metadata['has_constructor'] === false) { - // collect all public properties - foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - $metadata['properties'][$property->name] = $property->name; - - $propertyComment = $property->getDocComment(); - if ($propertyComment === false) { - continue; - } - - $attribute = new Attribute(); - - $attribute->required = (strpos($propertyComment, '@Required') !== false); - $attribute->name = $property->name; - $attribute->type = (strpos($propertyComment, '@var') !== false && - preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches)) - ? $matches[1] - : 'mixed'; - - $this->collectAttributeTypeMetadata($metadata, $attribute); - - // checks if the property has @Enum - if (strpos($propertyComment, '@Enum') === false) { - continue; - } - - $context = 'property ' . $class->name . '::$' . $property->name; - - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if (! $annotation instanceof Enum) { - continue; - } - - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal)) - ? $annotation->literal - : $annotation->value; - } - } - - // choose the first property as default property - $metadata['default_property'] = reset($metadata['properties']); - } elseif ($metadata['has_named_argument_constructor']) { - foreach ($constructor->getParameters() as $parameter) { - if ($parameter->isVariadic()) { - break; - } - - $metadata['constructor_args'][$parameter->getName()] = [ - 'position' => $parameter->getPosition(), - 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null, - ]; - } - } - } - - self::$annotationMetadata[$name] = $metadata; - } - - /** - * Collects parsing metadata for a given attribute. - * - * @param mixed[] $metadata - */ - private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void - { - // handle internal type declaration - $type = self::$typeMap[$attribute->type] ?? $attribute->type; - - // handle the case if the property type is mixed - if ($type === 'mixed') { - return; - } - - // Evaluate type - $pos = strpos($type, '<'); - if ($pos !== false) { - // Checks if the property has array - $arrayType = substr($type, $pos + 1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } else { - // Checks if the property has type[] - $pos = strrpos($type, '['); - if ($pos !== false) { - $arrayType = substr($type, 0, $pos); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } - } - - $metadata['attribute_types'][$attribute->name]['type'] = $type; - $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; - $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; - } - - /** - * Annotations ::= Annotation {[ "*" ]* [Annotation]}* - * - * @phpstan-return list - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotations(): array - { - $annotations = []; - - while ($this->lexer->lookahead !== null) { - if ($this->lexer->lookahead->type !== DocLexer::T_AT) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is preceded by non-catchable pattern - if ( - $this->lexer->token !== null && - $this->lexer->lookahead->position === $this->lexer->token->position + strlen( - $this->lexer->token->value - ) - ) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is followed by either a namespace separator, or - // an identifier token - $peek = $this->lexer->glimpse(); - if ( - ($peek === null) - || ($peek->type !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array( - $peek->type, - self::$classIdentifiers, - true - )) - || $peek->position !== $this->lexer->lookahead->position + 1 - ) { - $this->lexer->moveNext(); - continue; - } - - $this->isNestedAnnotation = false; - $annot = $this->Annotation(); - if ($annot === false) { - continue; - } - - $annotations[] = $annot; - } - - return $annotations; - } - - /** - * Annotation ::= "@" AnnotationName MethodCall - * AnnotationName ::= QualifiedName | SimpleName - * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName - * NameSpacePart ::= identifier | null | false | true - * SimpleName ::= identifier | null | false | true - * - * @return object|false False if it is not a valid annotation. - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotation() - { - $this->match(DocLexer::T_AT); - - // check if we have an annotation - $name = $this->Identifier(); - - if ( - $this->lexer->isNextToken(DocLexer::T_MINUS) - && $this->lexer->nextTokenIsAdjacent() - ) { - // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded - return false; - } - - // only process names which are not fully qualified, yet - // fully qualified names must start with a \ - $originalName = $name; - - if ($name[0] !== '\\') { - $pos = strpos($name, '\\'); - $alias = ($pos === false) ? $name : substr($name, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - if ($this->namespaces) { - foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace . '\\' . $name)) { - $name = $namespace . '\\' . $name; - $found = true; - break; - } - } - } elseif (isset($this->imports[$loweredAlias])) { - $namespace = ltrim($this->imports[$loweredAlias], '\\'); - $name = ($pos !== false) - ? $namespace . substr($name, $pos) - : $namespace; - $found = $this->classExists($name); - } elseif ( - ! isset($this->ignoredAnnotationNames[$name]) - && isset($this->imports['__NAMESPACE__']) - && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) - ) { - $name = $this->imports['__NAMESPACE__'] . '\\' . $name; - $found = true; - } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { - $found = true; - } - - if (! $found) { - if ($this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation? -EXCEPTION - , - $name, - $this->context - )); - } - } - - $name = ltrim($name, '\\'); - - if (! $this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf( - 'The annotation "@%s" in %s does not exist, or could not be auto-loaded.', - $name, - $this->context - )); - } - - // at this point, $name contains the fully qualified class name of the - // annotation, and it is also guaranteed that this class exists, and - // that it is loaded - - // collects the metadata annotation only if there is not yet - if (! isset(self::$annotationMetadata[$name])) { - $this->collectAnnotationMetadata($name); - } - - // verify that the class is really meant to be an annotation and not just any ordinary class - if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The class "%s" is not annotated with @Annotation. -Are you sure this class can be used as annotation? -If so, then you need to add @Annotation to the _class_ doc comment of "%s". -If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s. -EXCEPTION - , - $name, - $name, - $originalName, - $this->context - )); - } - - //if target is nested annotation - $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; - - // Next will be nested - $this->isNestedAnnotation = true; - - //if annotation does not support current target - if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) { - throw AnnotationException::semanticalError( - sprintf( - <<<'EXCEPTION' -Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s. -EXCEPTION - , - $originalName, - $this->context, - self::$annotationMetadata[$name]['targets_literal'] - ) - ); - } - - $arguments = $this->MethodCall(); - $values = $this->resolvePositionalValues($arguments, $name); - - if (isset(self::$annotationMetadata[$name]['enum'])) { - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { - // checks if the attribute is a valid enumerator - if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError( - $property, - $name, - $this->context, - $enum['literal'], - $values[$property] - ); - } - } - } - - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ( - $property === self::$annotationMetadata[$name]['default_property'] - && ! isset($values[$property]) && isset($values['value']) - ) { - $property = 'value'; - } - - // handle a not given attribute or null value - if (! isset($values[$property])) { - if ($type['required']) { - throw AnnotationException::requiredError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'] - ); - } - - continue; - } - - if ($type['type'] === 'array') { - // handle the case of a single value - if (! is_array($values[$property])) { - $values[$property] = [$values[$property]]; - } - - // checks if the attribute has array type declaration, such as "array" - if (isset($type['array_type'])) { - foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's', - $item - ); - } - } - } - } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'], - $values[$property] - ); - } - } - - if (self::$annotationMetadata[$name]['has_named_argument_constructor']) { - if (PHP_VERSION_ID >= 80000) { - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - } - - return $this->instantiateAnnotiation($originalName, $this->context, $name, $values); - } - - $positionalValues = []; - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $positionalValues[$parameter['position']] = $parameter['default']; - } - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - - $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value; - } - - return $this->instantiateAnnotiation($originalName, $this->context, $name, $positionalValues); - } - - // check if the annotation expects values via the constructor, - // or directly injected into public properties - if (self::$annotationMetadata[$name]['has_constructor'] === true) { - return $this->instantiateAnnotiation($originalName, $this->context, $name, [$values]); - } - - $instance = $this->instantiateAnnotiation($originalName, $this->context, $name, []); - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ($property !== 'value') { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s". -Available properties: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', self::$annotationMetadata[$name]['properties']) - )); - } - - // handle the case if the property has no annotations - $property = self::$annotationMetadata[$name]['default_property']; - if (! $property) { - throw AnnotationException::creationError(sprintf( - 'The annotation @%s declared on %s does not accept any values, but got %s.', - $originalName, - $this->context, - json_encode($values) - )); - } - } - - $instance->{$property} = $value; - } - - return $instance; - } - - /** - * MethodCall ::= ["(" [Values] ")"] - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function MethodCall(): array - { - $values = []; - - if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { - return $values; - } - - $this->match(DocLexer::T_OPEN_PARENTHESIS); - - if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - $values = $this->Values(); - } - - $this->match(DocLexer::T_CLOSE_PARENTHESIS); - - return $values; - } - - /** - * Values ::= Array | Value {"," Value}* [","] - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Values(): array - { - $values = [$this->Value()]; - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - break; - } - - $token = $this->lexer->lookahead; - $value = $this->Value(); - - $values[] = $value; - } - - $namedArguments = []; - $positionalArguments = []; - foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof stdClass) { - $namedArguments[$value->name] = $value->value; - } else { - $positionalArguments[$k] = $value; - } - } - - return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments]; - } - - /** - * Constant ::= integer | string | float | boolean - * - * @return mixed - * - * @throws AnnotationException - */ - private function Constant() - { - $identifier = $this->Identifier(); - - if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\') { - [$className, $const] = explode('::', $identifier); - - $pos = strpos($className, '\\'); - $alias = ($pos === false) ? $className : substr($className, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - switch (true) { - case ! empty($this->namespaces): - foreach ($this->namespaces as $ns) { - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - break; - } - } - - break; - - case isset($this->imports[$loweredAlias]): - $found = true; - $className = ($pos !== false) - ? $this->imports[$loweredAlias] . substr($className, $pos) - : $this->imports[$loweredAlias]; - break; - - default: - if (isset($this->imports['__NAMESPACE__'])) { - $ns = $this->imports['__NAMESPACE__']; - - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - } - } - - break; - } - - if ($found) { - $identifier = $className . '::' . $const; - } - } - - /** - * Checks if identifier ends with ::class and remove the leading backslash if it exists. - */ - if ( - $this->identifierEndsWithClassConstant($identifier) && - ! $this->identifierStartsWithBackslash($identifier) - ) { - return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier)); - } - - if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) { - return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1); - } - - if (! defined($identifier)) { - throw AnnotationException::semanticalErrorConstants($identifier, $this->context); - } - - return constant($identifier); - } - - private function identifierStartsWithBackslash(string $identifier): bool - { - return $identifier[0] === '\\'; - } - - private function identifierEndsWithClassConstant(string $identifier): bool - { - return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class'); - } - - /** @return int|false */ - private function getClassConstantPositionInIdentifier(string $identifier) - { - return stripos($identifier, '::class'); - } - - /** - * Identifier ::= string - * - * @throws AnnotationException - */ - private function Identifier(): string - { - // check if we have an annotation - if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { - throw $this->syntaxError('namespace separator or identifier'); - } - - $this->lexer->moveNext(); - - $className = $this->lexer->token->value; - - while ( - $this->lexer->lookahead !== null && - $this->lexer->lookahead->position === ($this->lexer->token->position + - strlen($this->lexer->token->value)) && - $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR) - ) { - $this->match(DocLexer::T_NAMESPACE_SEPARATOR); - $this->matchAny(self::$classIdentifiers); - - $className .= '\\' . $this->lexer->token->value; - } - - return $className; - } - - /** - * Value ::= PlainValue | FieldAssignment - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Value() - { - $peek = $this->lexer->glimpse(); - - if ($peek->type === DocLexer::T_EQUALS) { - return $this->FieldAssignment(); - } - - return $this->PlainValue(); - } - - /** - * PlainValue ::= integer | string | float | boolean | Array | Annotation - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function PlainValue() - { - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); - } - - if ($this->lexer->isNextToken(DocLexer::T_AT)) { - return $this->Annotation(); - } - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - return $this->Constant(); - } - - switch ($this->lexer->lookahead->type) { - case DocLexer::T_STRING: - $this->match(DocLexer::T_STRING); - - return $this->lexer->token->value; - - case DocLexer::T_INTEGER: - $this->match(DocLexer::T_INTEGER); - - return (int) $this->lexer->token->value; - - case DocLexer::T_FLOAT: - $this->match(DocLexer::T_FLOAT); - - return (float) $this->lexer->token->value; - - case DocLexer::T_TRUE: - $this->match(DocLexer::T_TRUE); - - return true; - - case DocLexer::T_FALSE: - $this->match(DocLexer::T_FALSE); - - return false; - - case DocLexer::T_NULL: - $this->match(DocLexer::T_NULL); - - return null; - - default: - throw $this->syntaxError('PlainValue'); - } - } - - /** - * FieldAssignment ::= FieldName "=" PlainValue - * FieldName ::= identifier - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function FieldAssignment(): stdClass - { - $this->match(DocLexer::T_IDENTIFIER); - $fieldName = $this->lexer->token->value; - - $this->match(DocLexer::T_EQUALS); - - $item = new stdClass(); - $item->name = $fieldName; - $item->value = $this->PlainValue(); - - return $item; - } - - /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Arrayx(): array - { - $array = $values = []; - - $this->match(DocLexer::T_OPEN_CURLY_BRACES); - - // If the array is empty, stop parsing and return. - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - return $array; - } - - $values[] = $this->ArrayEntry(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - // optional trailing comma - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - break; - } - - $values[] = $this->ArrayEntry(); - } - - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - foreach ($values as $value) { - [$key, $val] = $value; - - if ($key !== null) { - $array[$key] = $val; - } else { - $array[] = $val; - } - } - - return $array; - } - - /** - * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant - * Key ::= string | integer | Constant - * - * @phpstan-return array{mixed, mixed} - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function ArrayEntry(): array - { - $peek = $this->lexer->glimpse(); - - if ( - $peek->type === DocLexer::T_EQUALS - || $peek->type === DocLexer::T_COLON - ) { - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - $key = $this->Constant(); - } else { - $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]); - $key = $this->lexer->token->value; - } - - $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]); - - return [$key, $this->PlainValue()]; - } - - return [null, $this->Value()]; - } - - /** - * Checks whether the given $name matches any ignored annotation name or namespace - */ - private function isIgnoredAnnotation(string $name): bool - { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { - return true; - } - - foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) { - $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\'; - - if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) { - return true; - } - } - - return false; - } - - /** - * Resolve positional arguments (without name) to named ones - * - * @param array $arguments - * - * @return array - */ - private function resolvePositionalValues(array $arguments, string $name): array - { - $positionalArguments = $arguments['positional_arguments'] ?? []; - $values = $arguments['named_arguments'] ?? []; - - if ( - self::$annotationMetadata[$name]['has_named_argument_constructor'] - && self::$annotationMetadata[$name]['default_property'] !== null - ) { - // We must ensure that we don't have positional arguments after named ones - $positions = array_keys($positionalArguments); - $lastPosition = null; - foreach ($positions as $position) { - if ( - ($lastPosition === null && $position !== 0) || - ($lastPosition !== null && $position !== $lastPosition + 1) - ) { - throw $this->syntaxError('Positional arguments after named arguments is not allowed'); - } - - $lastPosition = $position; - } - - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $position = $parameter['position']; - if (isset($values[$property]) || ! isset($positionalArguments[$position])) { - continue; - } - - $values[$property] = $positionalArguments[$position]; - } - } else { - if (count($positionalArguments) > 0 && ! isset($values['value'])) { - if (count($positionalArguments) === 1) { - $value = array_pop($positionalArguments); - } else { - $value = array_values($positionalArguments); - } - - $values['value'] = $value; - } - } - - return $values; - } - - /** - * Try to instantiate the annotation and catch and process any exceptions related to failure - * - * @param class-string $name - * @param array $arguments - * - * @return object - * - * @throws AnnotationException - */ - private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments) - { - try { - return new $name(...$arguments); - } catch (Throwable $exception) { - throw AnnotationException::creationError( - sprintf( - 'An error occurred while instantiating the annotation @%s declared on %s: "%s".', - $originalName, - $context, - $exception->getMessage() - ), - $exception - ); - } - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php deleted file mode 100644 index ab27f8a5c..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php +++ /dev/null @@ -1,178 +0,0 @@ - true, - 'Attribute' => true, - 'Attributes' => true, - /* Can we enable this? 'Enum' => true, */ - 'Required' => true, - 'Target' => true, - 'NamedArgumentConstructor' => true, - ]; - - private const WidelyUsedNonStandard = [ - 'fix' => true, - 'fixme' => true, - 'override' => true, - ]; - - private const PhpDocumentor1 = [ - 'abstract' => true, - 'access' => true, - 'code' => true, - 'deprec' => true, - 'endcode' => true, - 'exception' => true, - 'final' => true, - 'ingroup' => true, - 'inheritdoc' => true, - 'inheritDoc' => true, - 'magic' => true, - 'name' => true, - 'private' => true, - 'static' => true, - 'staticvar' => true, - 'staticVar' => true, - 'toc' => true, - 'tutorial' => true, - 'throw' => true, - ]; - - private const PhpDocumentor2 = [ - 'api' => true, - 'author' => true, - 'category' => true, - 'copyright' => true, - 'deprecated' => true, - 'example' => true, - 'filesource' => true, - 'global' => true, - 'ignore' => true, - /* Can we enable this? 'index' => true, */ - 'internal' => true, - 'license' => true, - 'link' => true, - 'method' => true, - 'package' => true, - 'param' => true, - 'property' => true, - 'property-read' => true, - 'property-write' => true, - 'return' => true, - 'see' => true, - 'since' => true, - 'source' => true, - 'subpackage' => true, - 'throws' => true, - 'todo' => true, - 'TODO' => true, - 'usedby' => true, - 'uses' => true, - 'var' => true, - 'version' => true, - ]; - - private const PHPUnit = [ - 'author' => true, - 'after' => true, - 'afterClass' => true, - 'backupGlobals' => true, - 'backupStaticAttributes' => true, - 'before' => true, - 'beforeClass' => true, - 'codeCoverageIgnore' => true, - 'codeCoverageIgnoreStart' => true, - 'codeCoverageIgnoreEnd' => true, - 'covers' => true, - 'coversDefaultClass' => true, - 'coversNothing' => true, - 'dataProvider' => true, - 'depends' => true, - 'doesNotPerformAssertions' => true, - 'expectedException' => true, - 'expectedExceptionCode' => true, - 'expectedExceptionMessage' => true, - 'expectedExceptionMessageRegExp' => true, - 'group' => true, - 'large' => true, - 'medium' => true, - 'preserveGlobalState' => true, - 'requires' => true, - 'runTestsInSeparateProcesses' => true, - 'runInSeparateProcess' => true, - 'small' => true, - 'test' => true, - 'testdox' => true, - 'testWith' => true, - 'ticket' => true, - 'uses' => true, - ]; - - private const PhpCheckStyle = ['SuppressWarnings' => true]; - - private const PhpStorm = ['noinspection' => true]; - - private const PEAR = ['package_version' => true]; - - private const PlainUML = [ - 'startuml' => true, - 'enduml' => true, - ]; - - private const Symfony = ['experimental' => true]; - - private const PhpCodeSniffer = [ - 'codingStandardsIgnoreStart' => true, - 'codingStandardsIgnoreEnd' => true, - ]; - - private const SlevomatCodingStandard = ['phpcsSuppress' => true]; - - private const Phan = ['suppress' => true]; - - private const Rector = ['noRector' => true]; - - private const StaticAnalysis = [ - // PHPStan, Psalm - 'extends' => true, - 'implements' => true, - 'readonly' => true, - 'template' => true, - 'use' => true, - - // Psalm - 'pure' => true, - 'immutable' => true, - ]; - - public const LIST = self::Reserved - + self::WidelyUsedNonStandard - + self::PhpDocumentor1 - + self::PhpDocumentor2 - + self::PHPUnit - + self::PhpCheckStyle - + self::PhpStorm - + self::PEAR - + self::PlainUML - + self::Symfony - + self::SlevomatCodingStandard - + self::PhpCodeSniffer - + self::Phan - + self::Rector - + self::StaticAnalysis; - - private function __construct() - { - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php deleted file mode 100644 index 77b5b9cb2..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ /dev/null @@ -1,99 +0,0 @@ -delegate = $reader; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $annotations = []; - foreach ($this->delegate->getClassAnnotations($class) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - return $this->delegate->getClassAnnotation($class, $annotationName); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $annotations = []; - foreach ($this->delegate->getMethodAnnotations($method) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - return $this->delegate->getMethodAnnotation($method, $annotationName); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $annotations = []; - foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - return $this->delegate->getPropertyAnnotation($property, $annotationName); - } - - /** - * Proxies all methods to the delegate. - * - * @param mixed[] $args - * - * @return mixed - */ - public function __call(string $method, array $args) - { - return call_user_func_array([$this->delegate, $method], $args); - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php deleted file mode 100644 index 312a2ab1f..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php +++ /dev/null @@ -1,78 +0,0 @@ - a list with use statements in the form (Alias => FQN). - */ - public function parseUseStatements($reflection): array - { - if (method_exists($reflection, 'getUseStatements')) { - return $reflection->getUseStatements(); - } - - $filename = $reflection->getFileName(); - - if ($filename === false) { - return []; - } - - $content = $this->getFileContent($filename, $reflection->getStartLine()); - - if ($content === null) { - return []; - } - - $namespace = preg_quote($reflection->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); - $tokenizer = new TokenParser('parseUseStatements($reflection->getNamespaceName()); - } - - /** - * Gets the content of the file right up to the given line number. - * - * @param string $filename The name of the file to load. - * @param int $lineNumber The number of lines to read from file. - * - * @return string|null The content of the file or null if the file does not exist. - */ - private function getFileContent(string $filename, $lineNumber) - { - if (! is_file($filename)) { - return null; - } - - $content = ''; - $lineCnt = 0; - $file = new SplFileObject($filename); - while (! $file->eof()) { - if ($lineCnt++ === $lineNumber) { - break; - } - - $content .= $file->fgets(); - } - - return $content; - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php deleted file mode 100644 index a7099d579..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php +++ /dev/null @@ -1,232 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var int[] */ - private $loadedFilemtimes = []; - - public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (bool) $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName() . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName() . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - public function clearLoadedAnnotations(): void - { - $this->loadedAnnotations = []; - $this->loadedFilemtimes = []; - } - - /** @return mixed[] */ - private function fetchFromCache( - string $cacheKey, - ReflectionClass $class, - string $method, - Reflector $reflector - ): array { - $cacheKey = rawurlencode($cacheKey); - - $item = $this->cache->getItem($cacheKey); - if (($this->debug && ! $this->refresh($cacheKey, $class)) || ! $item->isHit()) { - $this->cache->save($item->set($this->delegate->{$method}($reflector))); - } - - return $item->get(); - } - - /** - * Used in debug mode to check if the cache is fresh. - * - * @return bool Returns true if the cache was fresh, or false if the class - * being read was modified since writing to the cache. - */ - private function refresh(string $cacheKey, ReflectionClass $class): bool - { - $lastModification = $this->getLastModification($class); - if ($lastModification === 0) { - return true; - } - - $item = $this->cache->getItem('[C]' . $cacheKey); - if ($item->isHit() && $item->get() >= $lastModification) { - return true; - } - - $this->cache->save($item->set(time())); - - return false; - } - - /** - * Returns the time the class was last modified, testing traits and parents - */ - private function getLastModification(ReflectionClass $class): int - { - $filename = $class->getFileName(); - - if (isset($this->loadedFilemtimes[$filename])) { - return $this->loadedFilemtimes[$filename]; - } - - $parent = $class->getParentClass(); - - $lastModification = max(array_merge( - [$filename ? filemtime($filename) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $class->getTraits()), - array_map(function (ReflectionClass $class): int { - return $this->getLastModification($class); - }, $class->getInterfaces()), - $parent ? [$this->getLastModification($parent)] : [] - )); - - assert($lastModification !== false); - - return $this->loadedFilemtimes[$filename] = $lastModification; - } - - private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int - { - $fileName = $reflectionTrait->getFileName(); - - if (isset($this->loadedFilemtimes[$fileName])) { - return $this->loadedFilemtimes[$fileName]; - } - - $lastModificationTime = max(array_merge( - [$fileName ? filemtime($fileName) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $reflectionTrait->getTraits()) - )); - - assert($lastModificationTime !== false); - - return $this->loadedFilemtimes[$fileName] = $lastModificationTime; - } -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php deleted file mode 100644 index 0663ffda0..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ /dev/null @@ -1,80 +0,0 @@ - An array of Annotations. - */ - public function getClassAnnotations(ReflectionClass $class); - - /** - * Gets a class annotation. - * - * @param ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName); - - /** - * Gets the annotations applied to a method. - * - * @param ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getMethodAnnotations(ReflectionMethod $method); - - /** - * Gets a method annotation. - * - * @param ReflectionMethod $method The ReflectionMethod to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName); - - /** - * Gets the annotations applied to a property. - * - * @param ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getPropertyAnnotations(ReflectionProperty $property); - - /** - * Gets a property annotation. - * - * @param ReflectionProperty $property The ReflectionProperty to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName); -} diff --git a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php deleted file mode 100644 index 0534fd17c..000000000 --- a/lib/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ /dev/null @@ -1,205 +0,0 @@ - - */ - private $tokens; - - /** - * The number of tokens. - * - * @var int - */ - private $numTokens; - - /** - * The current array pointer. - * - * @var int - */ - private $pointer = 0; - - public function __construct(string $contents) - { - $this->tokens = token_get_all($contents); - - // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it - // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored - // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a - // docblock. If the first thing in the file is a class without a doc block this would cause calls to - // getDocBlock() on said class to return our long lost doc_comment. Argh. - // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least - // it's harmless to us. - token_get_all("numTokens = count($this->tokens); - } - - /** - * Gets the next non whitespace and non comment token. - * - * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. - * - * @return mixed[]|string|null The token if exists, null otherwise. - */ - public function next(bool $docCommentIsComment = true) - { - for ($i = $this->pointer; $i < $this->numTokens; $i++) { - $this->pointer++; - if ( - $this->tokens[$i][0] === T_WHITESPACE || - $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) - ) { - continue; - } - - return $this->tokens[$i]; - } - - return null; - } - - /** - * Parses a single use statement. - * - * @return array A list with all found class names for a use statement. - */ - public function parseUseStatement() - { - $groupRoot = ''; - $class = ''; - $alias = ''; - $statements = []; - $explicitAlias = false; - while (($token = $this->next())) { - if (! $explicitAlias && $token[0] === T_STRING) { - $class .= $token[1]; - $alias = $token[1]; - } elseif ($explicitAlias && $token[0] === T_STRING) { - $alias = $token[1]; - } elseif ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - ) { - $class .= $token[1]; - - $classSplit = explode('\\', $token[1]); - $alias = $classSplit[count($classSplit) - 1]; - } elseif ($token[0] === T_NS_SEPARATOR) { - $class .= '\\'; - $alias = ''; - } elseif ($token[0] === T_AS) { - $explicitAlias = true; - $alias = ''; - } elseif ($token === ',') { - $statements[strtolower($alias)] = $groupRoot . $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } elseif ($token === ';') { - $statements[strtolower($alias)] = $groupRoot . $class; - break; - } elseif ($token === '{') { - $groupRoot = $class; - $class = ''; - } elseif ($token === '}') { - continue; - } else { - break; - } - } - - return $statements; - } - - /** - * Gets all use statements. - * - * @param string $namespaceName The namespace name of the reflected class. - * - * @return array A list with all found use statements. - */ - public function parseUseStatements(string $namespaceName) - { - $statements = []; - while (($token = $this->next())) { - if ($token[0] === T_USE) { - $statements = array_merge($statements, $this->parseUseStatement()); - continue; - } - - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) { - continue; - } - - // Get fresh array for new namespace. This is to prevent the parser to collect the use statements - // for a previous namespace with the same name. This is the case if a namespace is defined twice - // or if a namespace with the same name is commented out. - $statements = []; - } - - return $statements; - } - - /** - * Gets the namespace. - * - * @return string The found namespace. - */ - public function parseNamespace() - { - $name = ''; - while ( - ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - )) - ) { - $name .= $token[1]; - } - - return $name; - } - - /** - * Gets the class name. - * - * @return string The found class name. - */ - public function parseClass() - { - // Namespaces and class names are tokenized the same: T_STRINGs - // separated by T_NS_SEPARATOR so we can use one function to provide - // both. - return $this->parseNamespace(); - } -} diff --git a/lib/doctrine/annotations/psalm.xml b/lib/doctrine/annotations/psalm.xml deleted file mode 100644 index e6af38923..000000000 --- a/lib/doctrine/annotations/psalm.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/lib/doctrine/cache/LICENSE b/lib/doctrine/cache/LICENSE deleted file mode 100644 index 8c38cc1bc..000000000 --- a/lib/doctrine/cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/lib/doctrine/cache/README.md b/lib/doctrine/cache/README.md deleted file mode 100644 index a13196d15..000000000 --- a/lib/doctrine/cache/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Doctrine Cache - -[![Build Status](https://github.com/doctrine/cache/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/cache/actions) -[![Code Coverage](https://codecov.io/gh/doctrine/cache/branch/1.10.x/graph/badge.svg)](https://codecov.io/gh/doctrine/cache/branch/1.10.x) - -[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/cache.svg?style=flat-square)](https://packagist.org/packages/doctrine/cache) -[![Total Downloads](https://img.shields.io/packagist/dt/doctrine/cache.svg?style=flat-square)](https://packagist.org/packages/doctrine/cache) - -Cache component extracted from the Doctrine Common project. [Documentation](https://www.doctrine-project.org/projects/doctrine-cache/en/current/index.html) - -This library is deprecated and will no longer receive bug fixes from the -Doctrine Project. Please use a different cache library, preferably PSR-6 or -PSR-16 instead. diff --git a/lib/doctrine/cache/UPGRADE-1.11.md b/lib/doctrine/cache/UPGRADE-1.11.md deleted file mode 100644 index 6c5ddb559..000000000 --- a/lib/doctrine/cache/UPGRADE-1.11.md +++ /dev/null @@ -1,27 +0,0 @@ -# Upgrade to 1.11 - -doctrine/cache will no longer be maintained and all cache implementations have -been marked as deprecated. These implementations will be removed in 2.0, which -will only contain interfaces to provide a lightweight package for backward -compatibility. - -There are two new classes to use in the `Doctrine\Common\Cache\Psr6` namespace: -* The `CacheAdapter` class allows using any Doctrine Cache as PSR-6 cache. This - is useful to provide a forward compatibility layer in libraries that accept - Doctrine cache implementations and switch to PSR-6. -* The `DoctrineProvider` class allows using any PSR-6 cache as Doctrine cache. - This implementation is designed for libraries that leak the cache and want to - switch to allowing PSR-6 implementations. This class is design to be used - during the transition phase of sunsetting doctrine/cache support. - -A full example to setup a filesystem based PSR-6 cache with symfony/cache -using the `DoctrineProvider` to convert back to Doctrine's `Cache` interface: - -```php -use Doctrine\Common\Cache\Psr6\DoctrineProvider; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; - -$cachePool = new FilesystemAdapter(); -$cache = DoctrineProvider::wrap($cachePool); -// $cache instanceof \Doctrine\Common\Cache\Cache -``` diff --git a/lib/doctrine/cache/UPGRADE-1.4.md b/lib/doctrine/cache/UPGRADE-1.4.md deleted file mode 100644 index e1f8a503e..000000000 --- a/lib/doctrine/cache/UPGRADE-1.4.md +++ /dev/null @@ -1,16 +0,0 @@ -# Upgrade to 1.4 - -## Minor BC Break: `Doctrine\Common\Cache\FileCache#$extension` is now `private`. - -If you need to override the value of `Doctrine\Common\Cache\FileCache#$extension`, then use the -second parameter of `Doctrine\Common\Cache\FileCache#__construct()` instead of overriding -the property in your own implementation. - -## Minor BC Break: file based caches paths changed - -`Doctrine\Common\Cache\FileCache`, `Doctrine\Common\Cache\PhpFileCache` and -`Doctrine\Common\Cache\FilesystemCache` are using a different cache paths structure. - -If you rely on warmed up caches for deployments, consider that caches generated -with `doctrine/cache` `<1.4` are not compatible with the new directory structure, -and will be ignored. diff --git a/lib/doctrine/cache/composer.json b/lib/doctrine/cache/composer.json deleted file mode 100644 index 3c8ca971e..000000000 --- a/lib/doctrine/cache/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "doctrine/cache", - "type": "library", - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "keywords": [ - "php", - "cache", - "caching", - "abstraction", - "redis", - "memcached", - "couchdb", - "xcache", - "apcu" - ], - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": "~7.1 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "doctrine/coding-standard": "^9", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "cache/integration-tests": "dev-master", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "symfony/var-exporter": "^4.4 || ^5.4 || ^6" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "autoload": { - "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } - }, - "autoload-dev": { - "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" } - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/lib/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php deleted file mode 100644 index 4cfab6c0f..000000000 --- a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php +++ /dev/null @@ -1,90 +0,0 @@ -hits - * Number of keys that have been requested and found present. - * - * - misses - * Number of items that have been requested and not found. - * - * - uptime - * Time that the server is running. - * - * - memory_usage - * Memory used by this server to store items. - * - * - memory_available - * Memory allowed to use for storage. - * - * @return mixed[]|null An associative array with server's statistics if available, NULL otherwise. - */ - public function getStats(); -} diff --git a/lib/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/lib/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php deleted file mode 100644 index 180482a7b..000000000 --- a/lib/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php +++ /dev/null @@ -1,325 +0,0 @@ -namespace = (string) $namespace; - $this->namespaceVersion = null; - } - - /** - * Retrieves the namespace that prefixes all cache ids. - * - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * {@inheritdoc} - */ - public function fetch($id) - { - return $this->doFetch($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function fetchMultiple(array $keys) - { - if (empty($keys)) { - return []; - } - - // note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys - $namespacedKeys = array_combine($keys, array_map([$this, 'getNamespacedId'], $keys)); - $items = $this->doFetchMultiple($namespacedKeys); - $foundItems = []; - - // no internal array function supports this sort of mapping: needs to be iterative - // this filters and combines keys in one pass - foreach ($namespacedKeys as $requestedKey => $namespacedKey) { - if (! isset($items[$namespacedKey]) && ! array_key_exists($namespacedKey, $items)) { - continue; - } - - $foundItems[$requestedKey] = $items[$namespacedKey]; - } - - return $foundItems; - } - - /** - * {@inheritdoc} - */ - public function saveMultiple(array $keysAndValues, $lifetime = 0) - { - $namespacedKeysAndValues = []; - foreach ($keysAndValues as $key => $value) { - $namespacedKeysAndValues[$this->getNamespacedId($key)] = $value; - } - - return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function contains($id) - { - return $this->doContains($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function save($id, $data, $lifeTime = 0) - { - return $this->doSave($this->getNamespacedId($id), $data, $lifeTime); - } - - /** - * {@inheritdoc} - */ - public function deleteMultiple(array $keys) - { - return $this->doDeleteMultiple(array_map([$this, 'getNamespacedId'], $keys)); - } - - /** - * {@inheritdoc} - */ - public function delete($id) - { - return $this->doDelete($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function getStats() - { - return $this->doGetStats(); - } - - /** - * {@inheritDoc} - */ - public function flushAll() - { - return $this->doFlush(); - } - - /** - * {@inheritDoc} - */ - public function deleteAll() - { - $namespaceCacheKey = $this->getNamespaceCacheKey(); - $namespaceVersion = $this->getNamespaceVersion() + 1; - - if ($this->doSave($namespaceCacheKey, $namespaceVersion)) { - $this->namespaceVersion = $namespaceVersion; - - return true; - } - - return false; - } - - /** - * Prefixes the passed id with the configured namespace value. - * - * @param string $id The id to namespace. - * - * @return string The namespaced id. - */ - private function getNamespacedId(string $id): string - { - $namespaceVersion = $this->getNamespaceVersion(); - - return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion); - } - - /** - * Returns the namespace cache key. - */ - private function getNamespaceCacheKey(): string - { - return sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); - } - - /** - * Returns the namespace version. - */ - private function getNamespaceVersion(): int - { - if ($this->namespaceVersion !== null) { - return $this->namespaceVersion; - } - - $namespaceCacheKey = $this->getNamespaceCacheKey(); - $this->namespaceVersion = (int) $this->doFetch($namespaceCacheKey) ?: 1; - - return $this->namespaceVersion; - } - - /** - * Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it. - * - * @param string[] $keys Array of keys to retrieve from cache - * - * @return mixed[] Array of values retrieved for the given keys. - */ - protected function doFetchMultiple(array $keys) - { - $returnValues = []; - - foreach ($keys as $key) { - $item = $this->doFetch($key); - if ($item === false && ! $this->doContains($key)) { - continue; - } - - $returnValues[$key] = $item; - } - - return $returnValues; - } - - /** - * Fetches an entry from the cache. - * - * @param string $id The id of the cache entry to fetch. - * - * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id. - */ - abstract protected function doFetch($id); - - /** - * Tests if an entry exists in the cache. - * - * @param string $id The cache id of the entry to check for. - * - * @return bool TRUE if a cache entry exists for the given cache id, FALSE otherwise. - */ - abstract protected function doContains($id); - - /** - * Default implementation of doSaveMultiple. Each driver that supports multi-put should override it. - * - * @param mixed[] $keysAndValues Array of keys and values to save in cache - * @param int $lifetime The lifetime. If != 0, sets a specific lifetime for these - * cache entries (0 => infinite lifeTime). - * - * @return bool TRUE if the operation was successful, FALSE if it wasn't. - */ - protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) - { - $success = true; - - foreach ($keysAndValues as $key => $value) { - if ($this->doSave($key, $value, $lifetime)) { - continue; - } - - $success = false; - } - - return $success; - } - - /** - * Puts data into the cache. - * - * @param string $id The cache id. - * @param string $data The cache entry/data. - * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this - * cache entry (0 => infinite lifeTime). - * - * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise. - */ - abstract protected function doSave($id, $data, $lifeTime = 0); - - /** - * Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it. - * - * @param string[] $keys Array of keys to delete from cache - * - * @return bool TRUE if the operation was successful, FALSE if it wasn't - */ - protected function doDeleteMultiple(array $keys) - { - $success = true; - - foreach ($keys as $key) { - if ($this->doDelete($key)) { - continue; - } - - $success = false; - } - - return $success; - } - - /** - * Deletes a cache entry. - * - * @param string $id The cache id. - * - * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise. - */ - abstract protected function doDelete($id); - - /** - * Flushes all cache entries. - * - * @return bool TRUE if the cache entries were successfully flushed, FALSE otherwise. - */ - abstract protected function doFlush(); - - /** - * Retrieves cached information from the data store. - * - * @return mixed[]|null An associative array with server's statistics if available, NULL otherwise. - */ - abstract protected function doGetStats(); -} diff --git a/lib/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php b/lib/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php deleted file mode 100644 index b94618e46..000000000 --- a/lib/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php +++ /dev/null @@ -1,21 +0,0 @@ - infinite lifeTime). - * - * @return bool TRUE if the operation was successful, FALSE if it wasn't. - */ - public function saveMultiple(array $keysAndValues, $lifetime = 0); -} diff --git a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php b/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php deleted file mode 100644 index d3693b7c6..000000000 --- a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php +++ /dev/null @@ -1,340 +0,0 @@ - */ - private $deferredItems = []; - - public static function wrap(Cache $cache): CacheItemPoolInterface - { - if ($cache instanceof DoctrineProvider && ! $cache->getNamespace()) { - return $cache->getPool(); - } - - if ($cache instanceof SymfonyDoctrineProvider && ! $cache->getNamespace()) { - $getPool = function () { - // phpcs:ignore Squiz.Scope.StaticThisUsage.Found - return $this->pool; - }; - - return $getPool->bindTo($cache, SymfonyDoctrineProvider::class)(); - } - - return new self($cache); - } - - private function __construct(Cache $cache) - { - $this->cache = $cache; - } - - /** @internal */ - public function getCache(): Cache - { - return $this->cache; - } - - /** - * {@inheritDoc} - */ - public function getItem($key): CacheItemInterface - { - assert(self::validKey($key)); - - if (isset($this->deferredItems[$key])) { - $this->commit(); - } - - $value = $this->cache->fetch($key); - - if (PHP_VERSION_ID >= 80000) { - if ($value !== false) { - return new TypedCacheItem($key, $value, true); - } - - return new TypedCacheItem($key, null, false); - } - - if ($value !== false) { - return new CacheItem($key, $value, true); - } - - return new CacheItem($key, null, false); - } - - /** - * {@inheritDoc} - */ - public function getItems(array $keys = []): array - { - if ($this->deferredItems) { - $this->commit(); - } - - assert(self::validKeys($keys)); - - $values = $this->doFetchMultiple($keys); - $items = []; - - if (PHP_VERSION_ID >= 80000) { - foreach ($keys as $key) { - if (array_key_exists($key, $values)) { - $items[$key] = new TypedCacheItem($key, $values[$key], true); - } else { - $items[$key] = new TypedCacheItem($key, null, false); - } - } - - return $items; - } - - foreach ($keys as $key) { - if (array_key_exists($key, $values)) { - $items[$key] = new CacheItem($key, $values[$key], true); - } else { - $items[$key] = new CacheItem($key, null, false); - } - } - - return $items; - } - - /** - * {@inheritDoc} - */ - public function hasItem($key): bool - { - assert(self::validKey($key)); - - if (isset($this->deferredItems[$key])) { - $this->commit(); - } - - return $this->cache->contains($key); - } - - public function clear(): bool - { - $this->deferredItems = []; - - if (! $this->cache instanceof ClearableCache) { - return false; - } - - return $this->cache->deleteAll(); - } - - /** - * {@inheritDoc} - */ - public function deleteItem($key): bool - { - assert(self::validKey($key)); - unset($this->deferredItems[$key]); - - return $this->cache->delete($key); - } - - /** - * {@inheritDoc} - */ - public function deleteItems(array $keys): bool - { - foreach ($keys as $key) { - assert(self::validKey($key)); - unset($this->deferredItems[$key]); - } - - return $this->doDeleteMultiple($keys); - } - - public function save(CacheItemInterface $item): bool - { - return $this->saveDeferred($item) && $this->commit(); - } - - public function saveDeferred(CacheItemInterface $item): bool - { - if (! $item instanceof CacheItem && ! $item instanceof TypedCacheItem) { - return false; - } - - $this->deferredItems[$item->getKey()] = $item; - - return true; - } - - public function commit(): bool - { - if (! $this->deferredItems) { - return true; - } - - $now = microtime(true); - $itemsCount = 0; - $byLifetime = []; - $expiredKeys = []; - - foreach ($this->deferredItems as $key => $item) { - $lifetime = ($item->getExpiry() ?? $now) - $now; - - if ($lifetime < 0) { - $expiredKeys[] = $key; - - continue; - } - - ++$itemsCount; - $byLifetime[(int) $lifetime][$key] = $item->get(); - } - - $this->deferredItems = []; - - switch (count($expiredKeys)) { - case 0: - break; - case 1: - $this->cache->delete(current($expiredKeys)); - break; - default: - $this->doDeleteMultiple($expiredKeys); - break; - } - - if ($itemsCount === 1) { - return $this->cache->save($key, $item->get(), (int) $lifetime); - } - - $success = true; - foreach ($byLifetime as $lifetime => $values) { - $success = $this->doSaveMultiple($values, $lifetime) && $success; - } - - return $success; - } - - public function __destruct() - { - $this->commit(); - } - - /** - * @param mixed $key - */ - private static function validKey($key): bool - { - if (! is_string($key)) { - throw new InvalidArgument(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key))); - } - - if ($key === '') { - throw new InvalidArgument('Cache key length must be greater than zero.'); - } - - if (strpbrk($key, self::RESERVED_CHARACTERS) !== false) { - throw new InvalidArgument(sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS)); - } - - return true; - } - - /** - * @param mixed[] $keys - */ - private static function validKeys(array $keys): bool - { - foreach ($keys as $key) { - self::validKey($key); - } - - return true; - } - - /** - * @param mixed[] $keys - */ - private function doDeleteMultiple(array $keys): bool - { - if ($this->cache instanceof MultiDeleteCache) { - return $this->cache->deleteMultiple($keys); - } - - $success = true; - foreach ($keys as $key) { - $success = $this->cache->delete($key) && $success; - } - - return $success; - } - - /** - * @param mixed[] $keys - * - * @return mixed[] - */ - private function doFetchMultiple(array $keys): array - { - if ($this->cache instanceof MultiGetCache) { - return $this->cache->fetchMultiple($keys); - } - - $values = []; - foreach ($keys as $key) { - $value = $this->cache->fetch($key); - if (! $value) { - continue; - } - - $values[$key] = $value; - } - - return $values; - } - - /** - * @param mixed[] $keysAndValues - */ - private function doSaveMultiple(array $keysAndValues, int $lifetime = 0): bool - { - if ($this->cache instanceof MultiPutCache) { - return $this->cache->saveMultiple($keysAndValues, $lifetime); - } - - $success = true; - foreach ($keysAndValues as $key => $value) { - $success = $this->cache->save($key, $value, $lifetime) && $success; - } - - return $success; - } -} diff --git a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php b/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php deleted file mode 100644 index 0b6f0a28d..000000000 --- a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php +++ /dev/null @@ -1,118 +0,0 @@ -key = $key; - $this->value = $data; - $this->isHit = $isHit; - } - - public function getKey(): string - { - return $this->key; - } - - /** - * {@inheritDoc} - * - * @return mixed - */ - public function get() - { - return $this->value; - } - - public function isHit(): bool - { - return $this->isHit; - } - - /** - * {@inheritDoc} - */ - public function set($value): self - { - $this->value = $value; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function expiresAt($expiration): self - { - if ($expiration === null) { - $this->expiry = null; - } elseif ($expiration instanceof DateTimeInterface) { - $this->expiry = (float) $expiration->format('U.u'); - } else { - throw new TypeError(sprintf( - 'Expected $expiration to be an instance of DateTimeInterface or null, got %s', - is_object($expiration) ? get_class($expiration) : gettype($expiration) - )); - } - - return $this; - } - - /** - * {@inheritDoc} - */ - public function expiresAfter($time): self - { - if ($time === null) { - $this->expiry = null; - } elseif ($time instanceof DateInterval) { - $this->expiry = microtime(true) + DateTime::createFromFormat('U', 0)->add($time)->format('U.u'); - } elseif (is_int($time)) { - $this->expiry = $time + microtime(true); - } else { - throw new TypeError(sprintf( - 'Expected $time to be either an integer, an instance of DateInterval or null, got %s', - is_object($time) ? get_class($time) : gettype($time) - )); - } - - return $this; - } - - /** - * @internal - */ - public function getExpiry(): ?float - { - return $this->expiry; - } -} diff --git a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php b/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php deleted file mode 100644 index 3b0f416c1..000000000 --- a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Doctrine\Common\Cache\Psr6; - -use Doctrine\Common\Cache\Cache; -use Doctrine\Common\Cache\CacheProvider; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\DoctrineAdapter as SymfonyDoctrineAdapter; -use Symfony\Contracts\Service\ResetInterface; - -use function rawurlencode; - -/** - * This class was copied from the Symfony Framework, see the original copyright - * notice above. The code is distributed subject to the license terms in - * https://github.com/symfony/symfony/blob/ff0cf61278982539c49e467db9ab13cbd342f76d/LICENSE - */ -final class DoctrineProvider extends CacheProvider -{ - /** @var CacheItemPoolInterface */ - private $pool; - - public static function wrap(CacheItemPoolInterface $pool): Cache - { - if ($pool instanceof CacheAdapter) { - return $pool->getCache(); - } - - if ($pool instanceof SymfonyDoctrineAdapter) { - $getCache = function () { - // phpcs:ignore Squiz.Scope.StaticThisUsage.Found - return $this->provider; - }; - - return $getCache->bindTo($pool, SymfonyDoctrineAdapter::class)(); - } - - return new self($pool); - } - - private function __construct(CacheItemPoolInterface $pool) - { - $this->pool = $pool; - } - - /** @internal */ - public function getPool(): CacheItemPoolInterface - { - return $this->pool; - } - - public function reset(): void - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - - $this->setNamespace($this->getNamespace()); - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $item = $this->pool->getItem(rawurlencode($id)); - - return $item->isHit() ? $item->get() : false; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doContains($id) - { - return $this->pool->hasItem(rawurlencode($id)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $item = $this->pool->getItem(rawurlencode($id)); - - if (0 < $lifeTime) { - $item->expiresAfter($lifeTime); - } - - return $this->pool->save($item->set($data)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doDelete($id) - { - return $this->pool->deleteItem(rawurlencode($id)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doFlush() - { - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return array|null - */ - protected function doGetStats() - { - return null; - } -} diff --git a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php b/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php deleted file mode 100644 index 196f1bca9..000000000 --- a/lib/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php +++ /dev/null @@ -1,13 +0,0 @@ -key; - } - - public function get(): mixed - { - return $this->value; - } - - public function isHit(): bool - { - return $this->isHit; - } - - public function set(mixed $value): static - { - $this->value = $value; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function expiresAt($expiration): static - { - if ($expiration === null) { - $this->expiry = null; - } elseif ($expiration instanceof DateTimeInterface) { - $this->expiry = (float) $expiration->format('U.u'); - } else { - throw new TypeError(sprintf( - 'Expected $expiration to be an instance of DateTimeInterface or null, got %s', - get_debug_type($expiration) - )); - } - - return $this; - } - - /** - * {@inheritDoc} - */ - public function expiresAfter($time): static - { - if ($time === null) { - $this->expiry = null; - } elseif ($time instanceof DateInterval) { - $this->expiry = microtime(true) + DateTime::createFromFormat('U', 0)->add($time)->format('U.u'); - } elseif (is_int($time)) { - $this->expiry = $time + microtime(true); - } else { - throw new TypeError(sprintf( - 'Expected $time to be either an integer, an instance of DateInterval or null, got %s', - get_debug_type($time) - )); - } - - return $this; - } - - /** - * @internal - */ - public function getExpiry(): ?float - { - return $this->expiry; - } -} diff --git a/lib/doctrine/deprecations/LICENSE b/lib/doctrine/deprecations/LICENSE deleted file mode 100644 index 156905cdd..000000000 --- a/lib/doctrine/deprecations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020-2021 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/lib/doctrine/deprecations/README.md b/lib/doctrine/deprecations/README.md deleted file mode 100644 index 93caf83f8..000000000 --- a/lib/doctrine/deprecations/README.md +++ /dev/null @@ -1,157 +0,0 @@ -# Doctrine Deprecations - -A small (side-effect free by default) layer on top of -`trigger_error(E_USER_DEPRECATED)` or PSR-3 logging. - -- no side-effects by default, making it a perfect fit for libraries that don't know how the error handler works they operate under -- options to avoid having to rely on error handlers global state by using PSR-3 logging -- deduplicate deprecation messages to avoid excessive triggering and reduce overhead - -We recommend to collect Deprecations using a PSR logger instead of relying on -the global error handler. - -## Usage from consumer perspective: - -Enable Doctrine deprecations to be sent to a PSR3 logger: - -```php -\Doctrine\Deprecations\Deprecation::enableWithPsrLogger($logger); -``` - -Enable Doctrine deprecations to be sent as `@trigger_error($message, E_USER_DEPRECATED)` -messages by setting the `DOCTRINE_DEPRECATIONS` environment variable to `trigger`. -Alternatively, call: - -```php -\Doctrine\Deprecations\Deprecation::enableWithTriggerError(); -``` - -If you only want to enable deprecation tracking, without logging or calling `trigger_error` -then set the `DOCTRINE_DEPRECATIONS` environment variable to `track`. -Alternatively, call: - -```php -\Doctrine\Deprecations\Deprecation::enableTrackingDeprecations(); -``` - -Tracking is enabled with all three modes and provides access to all triggered -deprecations and their individual count: - -```php -$deprecations = \Doctrine\Deprecations\Deprecation::getTriggeredDeprecations(); - -foreach ($deprecations as $identifier => $count) { - echo $identifier . " was triggered " . $count . " times\n"; -} -``` - -### Suppressing Specific Deprecations - -Disable triggering about specific deprecations: - -```php -\Doctrine\Deprecations\Deprecation::ignoreDeprecations("https://link/to/deprecations-description-identifier"); -``` - -Disable all deprecations from a package - -```php -\Doctrine\Deprecations\Deprecation::ignorePackage("doctrine/orm"); -``` - -### Other Operations - -When used within PHPUnit or other tools that could collect multiple instances of the same deprecations -the deduplication can be disabled: - -```php -\Doctrine\Deprecations\Deprecation::withoutDeduplication(); -``` - -Disable deprecation tracking again: - -```php -\Doctrine\Deprecations\Deprecation::disable(); -``` - -## Usage from a library/producer perspective: - -When you want to unconditionally trigger a deprecation even when called -from the library itself then the `trigger` method is the way to go: - -```php -\Doctrine\Deprecations\Deprecation::trigger( - "doctrine/orm", - "https://link/to/deprecations-description", - "message" -); -``` - -If variable arguments are provided at the end, they are used with `sprintf` on -the message. - -```php -\Doctrine\Deprecations\Deprecation::trigger( - "doctrine/orm", - "https://github.com/doctrine/orm/issue/1234", - "message %s %d", - "foo", - 1234 -); -``` - -When you want to trigger a deprecation only when it is called by a function -outside of the current package, but not trigger when the package itself is the cause, -then use: - -```php -\Doctrine\Deprecations\Deprecation::triggerIfCalledFromOutside( - "doctrine/orm", - "https://link/to/deprecations-description", - "message" -); -``` - -Based on the issue link each deprecation message is only triggered once per -request. - -A limited stacktrace is included in the deprecation message to find the -offending location. - -Note: A producer/library should never call `Deprecation::enableWith` methods -and leave the decision how to handle deprecations to application and -frameworks. - -## Usage in PHPUnit tests - -There is a `VerifyDeprecations` trait that you can use to make assertions on -the occurrence of deprecations within a test. - -```php -use Doctrine\Deprecations\PHPUnit\VerifyDeprecations; - -class MyTest extends TestCase -{ - use VerifyDeprecations; - - public function testSomethingDeprecation() - { - $this->expectDeprecationWithIdentifier('https://github.com/doctrine/orm/issue/1234'); - - triggerTheCodeWithDeprecation(); - } - - public function testSomethingDeprecationFixed() - { - $this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/orm/issue/1234'); - - triggerTheCodeWithoutDeprecation(); - } -} -``` - -## What is a deprecation identifier? - -An identifier for deprecations is just a link to any resource, most often a -Github Issue or Pull Request explaining the deprecation and potentially its -alternative. diff --git a/lib/doctrine/deprecations/composer.json b/lib/doctrine/deprecations/composer.json deleted file mode 100644 index f8319f9a2..000000000 --- a/lib/doctrine/deprecations/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "doctrine/deprecations", - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "license": "MIT", - "type": "library", - "homepage": "https://www.doctrine-project.org/", - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "autoload-dev": { - "psr-4": { - "DeprecationTests\\": "test_fixtures/src", - "Doctrine\\Foo\\": "test_fixtures/vendor/doctrine/foo" - } - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} diff --git a/lib/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php b/lib/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php deleted file mode 100644 index 07cb43b6c..000000000 --- a/lib/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php +++ /dev/null @@ -1,312 +0,0 @@ -|null */ - private static $type; - - /** @var LoggerInterface|null */ - private static $logger; - - /** @var array */ - private static $ignoredPackages = []; - - /** @var array */ - private static $triggeredDeprecations = []; - - /** @var array */ - private static $ignoredLinks = []; - - /** @var bool */ - private static $deduplication = true; - - /** - * Trigger a deprecation for the given package and identfier. - * - * The link should point to a Github issue or Wiki entry detailing the - * deprecation. It is additionally used to de-duplicate the trigger of the - * same deprecation during a request. - * - * @param float|int|string $args - */ - public static function trigger(string $package, string $link, string $message, ...$args): void - { - $type = self::$type ?? self::getTypeFromEnv(); - - if ($type === self::TYPE_NONE) { - return; - } - - if (isset(self::$ignoredLinks[$link])) { - return; - } - - if (array_key_exists($link, self::$triggeredDeprecations)) { - self::$triggeredDeprecations[$link]++; - } else { - self::$triggeredDeprecations[$link] = 1; - } - - if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) { - return; - } - - if (isset(self::$ignoredPackages[$package])) { - return; - } - - $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); - - $message = sprintf($message, ...$args); - - self::delegateTriggerToBackend($message, $backtrace, $link, $package); - } - - /** - * Trigger a deprecation for the given package and identifier when called from outside. - * - * "Outside" means we assume that $package is currently installed as a - * dependency and the caller is not a file in that package. When $package - * is installed as a root package then deprecations triggered from the - * tests folder are also considered "outside". - * - * This deprecation method assumes that you are using Composer to install - * the dependency and are using the default /vendor/ folder and not a - * Composer plugin to change the install location. The assumption is also - * that $package is the exact composer packge name. - * - * Compared to {@link trigger()} this method causes some overhead when - * deprecation tracking is enabled even during deduplication, because it - * needs to call {@link debug_backtrace()} - * - * @param float|int|string $args - */ - public static function triggerIfCalledFromOutside(string $package, string $link, string $message, ...$args): void - { - $type = self::$type ?? self::getTypeFromEnv(); - - if ($type === self::TYPE_NONE) { - return; - } - - $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); - - // first check that the caller is not from a tests folder, in which case we always let deprecations pass - if (isset($backtrace[1]['file'], $backtrace[0]['file']) && strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) { - $path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR; - - if (strpos($backtrace[0]['file'], $path) === false) { - return; - } - - if (strpos($backtrace[1]['file'], $path) !== false) { - return; - } - } - - if (isset(self::$ignoredLinks[$link])) { - return; - } - - if (array_key_exists($link, self::$triggeredDeprecations)) { - self::$triggeredDeprecations[$link]++; - } else { - self::$triggeredDeprecations[$link] = 1; - } - - if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) { - return; - } - - if (isset(self::$ignoredPackages[$package])) { - return; - } - - $message = sprintf($message, ...$args); - - self::delegateTriggerToBackend($message, $backtrace, $link, $package); - } - - /** - * @param list $backtrace - */ - private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package): void - { - $type = self::$type ?? self::getTypeFromEnv(); - - if (($type & self::TYPE_PSR_LOGGER) > 0) { - $context = [ - 'file' => $backtrace[0]['file'] ?? null, - 'line' => $backtrace[0]['line'] ?? null, - 'package' => $package, - 'link' => $link, - ]; - - assert(self::$logger !== null); - - self::$logger->notice($message, $context); - } - - if (! (($type & self::TYPE_TRIGGER_ERROR) > 0)) { - return; - } - - $message .= sprintf( - ' (%s:%d called by %s:%d, %s, package %s)', - self::basename($backtrace[0]['file'] ?? 'native code'), - $backtrace[0]['line'] ?? 0, - self::basename($backtrace[1]['file'] ?? 'native code'), - $backtrace[1]['line'] ?? 0, - $link, - $package - ); - - @trigger_error($message, E_USER_DEPRECATED); - } - - /** - * A non-local-aware version of PHPs basename function. - */ - private static function basename(string $filename): string - { - $pos = strrpos($filename, DIRECTORY_SEPARATOR); - - if ($pos === false) { - return $filename; - } - - return substr($filename, $pos + 1); - } - - public static function enableTrackingDeprecations(): void - { - self::$type = self::$type ?? 0; - self::$type |= self::TYPE_TRACK_DEPRECATIONS; - } - - public static function enableWithTriggerError(): void - { - self::$type = self::$type ?? 0; - self::$type |= self::TYPE_TRIGGER_ERROR; - } - - public static function enableWithPsrLogger(LoggerInterface $logger): void - { - self::$type = self::$type ?? 0; - self::$type |= self::TYPE_PSR_LOGGER; - self::$logger = $logger; - } - - public static function withoutDeduplication(): void - { - self::$deduplication = false; - } - - public static function disable(): void - { - self::$type = self::TYPE_NONE; - self::$logger = null; - self::$deduplication = true; - self::$ignoredLinks = []; - - foreach (self::$triggeredDeprecations as $link => $count) { - self::$triggeredDeprecations[$link] = 0; - } - } - - public static function ignorePackage(string $packageName): void - { - self::$ignoredPackages[$packageName] = true; - } - - public static function ignoreDeprecations(string ...$links): void - { - foreach ($links as $link) { - self::$ignoredLinks[$link] = true; - } - } - - public static function getUniqueTriggeredDeprecationsCount(): int - { - return array_reduce(self::$triggeredDeprecations, static function (int $carry, int $count) { - return $carry + $count; - }, 0); - } - - /** - * Returns each triggered deprecation link identifier and the amount of occurrences. - * - * @return array - */ - public static function getTriggeredDeprecations(): array - { - return self::$triggeredDeprecations; - } - - /** - * @return int-mask-of - */ - private static function getTypeFromEnv(): int - { - switch ($_SERVER['DOCTRINE_DEPRECATIONS'] ?? $_ENV['DOCTRINE_DEPRECATIONS'] ?? null) { - case 'trigger': - self::$type = self::TYPE_TRIGGER_ERROR; - break; - - case 'track': - self::$type = self::TYPE_TRACK_DEPRECATIONS; - break; - - default: - self::$type = self::TYPE_NONE; - break; - } - - return self::$type; - } -} diff --git a/lib/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php b/lib/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php deleted file mode 100644 index 4c3366a97..000000000 --- a/lib/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php +++ /dev/null @@ -1,66 +0,0 @@ - */ - private $doctrineDeprecationsExpectations = []; - - /** @var array */ - private $doctrineNoDeprecationsExpectations = []; - - public function expectDeprecationWithIdentifier(string $identifier): void - { - $this->doctrineDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; - } - - public function expectNoDeprecationWithIdentifier(string $identifier): void - { - $this->doctrineNoDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; - } - - /** - * @before - */ - public function enableDeprecationTracking(): void - { - Deprecation::enableTrackingDeprecations(); - } - - /** - * @after - */ - public function verifyDeprecationsAreTriggered(): void - { - foreach ($this->doctrineDeprecationsExpectations as $identifier => $expectation) { - $actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; - - $this->assertTrue( - $actualCount > $expectation, - sprintf( - "Expected deprecation with identifier '%s' was not triggered by code executed in test.", - $identifier - ) - ); - } - - foreach ($this->doctrineNoDeprecationsExpectations as $identifier => $expectation) { - $actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; - - $this->assertTrue( - $actualCount === $expectation, - sprintf( - "Expected deprecation with identifier '%s' was triggered by code executed in test, but expected not to.", - $identifier - ) - ); - } - } -} diff --git a/lib/doctrine/deprecations/phpcs.xml b/lib/doctrine/deprecations/phpcs.xml deleted file mode 100644 index f115e43dd..000000000 --- a/lib/doctrine/deprecations/phpcs.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - lib - tests - - - - - - diff --git a/lib/doctrine/deprecations/phpstan.neon b/lib/doctrine/deprecations/phpstan.neon deleted file mode 100644 index 4ee286b8a..000000000 --- a/lib/doctrine/deprecations/phpstan.neon +++ /dev/null @@ -1,9 +0,0 @@ -parameters: - level: 6 - paths: - - lib - - tests - -includes: - - vendor/phpstan/phpstan-phpunit/extension.neon - - vendor/phpstan/phpstan-phpunit/rules.neon diff --git a/lib/doctrine/deprecations/psalm.xml b/lib/doctrine/deprecations/psalm.xml deleted file mode 100644 index ad76e32e3..000000000 --- a/lib/doctrine/deprecations/psalm.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/doctrine/lexer/LICENSE b/lib/doctrine/lexer/LICENSE deleted file mode 100644 index e8fdec4af..000000000 --- a/lib/doctrine/lexer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2018 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/lib/doctrine/lexer/README.md b/lib/doctrine/lexer/README.md deleted file mode 100644 index 784f2a271..000000000 --- a/lib/doctrine/lexer/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Doctrine Lexer - -[![Build Status](https://github.com/doctrine/lexer/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/lexer/actions) - -Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. - -This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). - -https://www.doctrine-project.org/projects/lexer.html diff --git a/lib/doctrine/lexer/UPGRADE.md b/lib/doctrine/lexer/UPGRADE.md deleted file mode 100644 index 42b85b373..000000000 --- a/lib/doctrine/lexer/UPGRADE.md +++ /dev/null @@ -1,14 +0,0 @@ -Note about upgrading: Doctrine uses static and runtime mechanisms to raise -awareness about deprecated code. - -- Use of `@deprecated` docblock that is detected by IDEs (like PHPStorm) or - Static Analysis tools (like Psalm, phpstan) -- Use of our low-overhead runtime deprecation API, details: - https://github.com/doctrine/deprecations/ - -# Upgrade to 2.0.0 - -`AbstractLexer::glimpse()` and `AbstractLexer::peek()` now return -instances of `Doctrine\Common\Lexer\Token`, which is an array-like class -Using it as an array is deprecated in favor of using properties of that class. -Using `count()` on it is deprecated with no replacement. diff --git a/lib/doctrine/lexer/composer.json b/lib/doctrine/lexer/composer.json deleted file mode 100644 index be3013cff..000000000 --- a/lib/doctrine/lexer/composer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "doctrine/lexer", - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "license": "MIT", - "type": "library", - "keywords": [ - "php", - "parser", - "lexer", - "annotations", - "docblock" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "require": { - "php": "^7.1 || ^8.0", - "doctrine/deprecations": "^1.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\Common\\Lexer\\": "tests" - } - }, - "config": { - "allow-plugins": { - "composer/package-versions-deprecated": true, - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/lib/doctrine/lexer/src/AbstractLexer.php b/lib/doctrine/lexer/src/AbstractLexer.php deleted file mode 100644 index eed4c5139..000000000 --- a/lib/doctrine/lexer/src/AbstractLexer.php +++ /dev/null @@ -1,346 +0,0 @@ -> - */ - private $tokens = []; - - /** - * Current lexer position in input string. - * - * @var int - */ - private $position = 0; - - /** - * Current peek of current lexer position. - * - * @var int - */ - private $peek = 0; - - /** - * The next token in the input. - * - * @var mixed[]|null - * @psalm-var Token|null - */ - public $lookahead; - - /** - * The last matched/seen token. - * - * @var mixed[]|null - * @psalm-var Token|null - */ - public $token; - - /** - * Composed regex for input parsing. - * - * @var string|null - */ - private $regex; - - /** - * Sets the input data to be tokenized. - * - * The Lexer is immediately reset and the new input tokenized. - * Any unprocessed tokens from any previous input are lost. - * - * @param string $input The input to be tokenized. - * - * @return void - */ - public function setInput($input) - { - $this->input = $input; - $this->tokens = []; - - $this->reset(); - $this->scan($input); - } - - /** - * Resets the lexer. - * - * @return void - */ - public function reset() - { - $this->lookahead = null; - $this->token = null; - $this->peek = 0; - $this->position = 0; - } - - /** - * Resets the peek pointer to 0. - * - * @return void - */ - public function resetPeek() - { - $this->peek = 0; - } - - /** - * Resets the lexer position on the input to the given position. - * - * @param int $position Position to place the lexical scanner. - * - * @return void - */ - public function resetPosition($position = 0) - { - $this->position = $position; - } - - /** - * Retrieve the original lexer's input until a given position. - * - * @param int $position - * - * @return string - */ - public function getInputUntilPosition($position) - { - return substr($this->input, 0, $position); - } - - /** - * Checks whether a given token matches the current lookahead. - * - * @param T $type - * - * @return bool - * - * @psalm-assert-if-true !=null $this->lookahead - */ - public function isNextToken($type) - { - return $this->lookahead !== null && $this->lookahead->isA($type); - } - - /** - * Checks whether any of the given tokens matches the current lookahead. - * - * @param list $types - * - * @return bool - * - * @psalm-assert-if-true !=null $this->lookahead - */ - public function isNextTokenAny(array $types) - { - return $this->lookahead !== null && $this->lookahead->isA(...$types); - } - - /** - * Moves to the next token in the input string. - * - * @return bool - * - * @psalm-assert-if-true !null $this->lookahead - */ - public function moveNext() - { - $this->peek = 0; - $this->token = $this->lookahead; - $this->lookahead = isset($this->tokens[$this->position]) - ? $this->tokens[$this->position++] : null; - - return $this->lookahead !== null; - } - - /** - * Tells the lexer to skip input tokens until it sees a token with the given value. - * - * @param T $type The token type to skip until. - * - * @return void - */ - public function skipUntil($type) - { - while ($this->lookahead !== null && ! $this->lookahead->isA($type)) { - $this->moveNext(); - } - } - - /** - * Checks if given value is identical to the given token. - * - * @param string $value - * @param int|string $token - * - * @return bool - */ - public function isA($value, $token) - { - return $this->getType($value) === $token; - } - - /** - * Moves the lookahead token forward. - * - * @return mixed[]|null The next token or NULL if there are no more tokens ahead. - * @psalm-return Token|null - */ - public function peek() - { - if (isset($this->tokens[$this->position + $this->peek])) { - return $this->tokens[$this->position + $this->peek++]; - } - - return null; - } - - /** - * Peeks at the next token, returns it and immediately resets the peek. - * - * @return mixed[]|null The next token or NULL if there are no more tokens ahead. - * @psalm-return Token|null - */ - public function glimpse() - { - $peek = $this->peek(); - $this->peek = 0; - - return $peek; - } - - /** - * Scans the input string for tokens. - * - * @param string $input A query string. - * - * @return void - */ - protected function scan($input) - { - if (! isset($this->regex)) { - $this->regex = sprintf( - '/(%s)|%s/%s', - implode(')|(', $this->getCatchablePatterns()), - implode('|', $this->getNonCatchablePatterns()), - $this->getModifiers() - ); - } - - $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; - $matches = preg_split($this->regex, $input, -1, $flags); - - if ($matches === false) { - // Work around https://bugs.php.net/78122 - $matches = [[$input, 0]]; - } - - foreach ($matches as $match) { - // Must remain before 'value' assignment since it can change content - $firstMatch = $match[0]; - $type = $this->getType($firstMatch); - - $this->tokens[] = new Token( - $firstMatch, - $type, - $match[1] - ); - } - } - - /** - * Gets the literal for a given token. - * - * @param T $token - * - * @return int|string - */ - public function getLiteral($token) - { - if ($token instanceof UnitEnum) { - return get_class($token) . '::' . $token->name; - } - - $className = static::class; - - $reflClass = new ReflectionClass($className); - $constants = $reflClass->getConstants(); - - foreach ($constants as $name => $value) { - if ($value === $token) { - return $className . '::' . $name; - } - } - - return $token; - } - - /** - * Regex modifiers - * - * @return string - */ - protected function getModifiers() - { - return 'iu'; - } - - /** - * Lexical catchable patterns. - * - * @return string[] - */ - abstract protected function getCatchablePatterns(); - - /** - * Lexical non-catchable patterns. - * - * @return string[] - */ - abstract protected function getNonCatchablePatterns(); - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @param string $value - * - * @return T|null - * - * @param-out V $value - */ - abstract protected function getType(&$value); -} diff --git a/lib/doctrine/lexer/src/Token.php b/lib/doctrine/lexer/src/Token.php deleted file mode 100644 index 4fbbf4e40..000000000 --- a/lib/doctrine/lexer/src/Token.php +++ /dev/null @@ -1,145 +0,0 @@ - - */ -final class Token implements ArrayAccess -{ - /** - * The string value of the token in the input string - * - * @readonly - * @var V - */ - public $value; - - /** - * The type of the token (identifier, numeric, string, input parameter, none) - * - * @readonly - * @var T|null - */ - public $type; - - /** - * The position of the token in the input string - * - * @readonly - * @var int - */ - public $position; - - /** - * @param V $value - * @param T|null $type - */ - public function __construct($value, $type, int $position) - { - $this->value = $value; - $this->type = $type; - $this->position = $position; - } - - /** @param T ...$types */ - public function isA(...$types): bool - { - return in_array($this->type, $types, true); - } - - /** - * @deprecated Use the value, type or position property instead - * {@inheritDoc} - */ - public function offsetExists($offset): bool - { - Deprecation::trigger( - 'doctrine/lexer', - 'https://github.com/doctrine/lexer/pull/79', - 'Accessing %s properties via ArrayAccess is deprecated, use the value, type or position property instead', - self::class - ); - - return in_array($offset, ['value', 'type', 'position'], true); - } - - /** - * @deprecated Use the value, type or position property instead - * {@inheritDoc} - * - * @param O $offset - * - * @return mixed - * @psalm-return ( - * O is 'value' - * ? V - * : ( - * O is 'type' - * ? T|null - * : ( - * O is 'position' - * ? int - * : mixed - * ) - * ) - * ) - * - * @template O of array-key - */ - #[ReturnTypeWillChange] - public function offsetGet($offset) - { - Deprecation::trigger( - 'doctrine/lexer', - 'https://github.com/doctrine/lexer/pull/79', - 'Accessing %s properties via ArrayAccess is deprecated, use the value, type or position property instead', - self::class - ); - - return $this->$offset; - } - - /** - * @deprecated no replacement planned - * {@inheritDoc} - */ - public function offsetSet($offset, $value): void - { - Deprecation::trigger( - 'doctrine/lexer', - 'https://github.com/doctrine/lexer/pull/79', - 'Setting %s properties via ArrayAccess is deprecated', - self::class - ); - - $this->$offset = $value; - } - - /** - * @deprecated no replacement planned - * {@inheritDoc} - */ - public function offsetUnset($offset): void - { - Deprecation::trigger( - 'doctrine/lexer', - 'https://github.com/doctrine/lexer/pull/79', - 'Setting %s properties via ArrayAccess is deprecated', - self::class - ); - - $this->$offset = null; - } -} diff --git a/lib/firebase/php-jwt/CHANGELOG.md b/lib/firebase/php-jwt/CHANGELOG.md deleted file mode 100644 index 9242bd30d..000000000 --- a/lib/firebase/php-jwt/CHANGELOG.md +++ /dev/null @@ -1,105 +0,0 @@ -# Changelog - -## [6.4.0](https://github.com/firebase/php-jwt/compare/v6.3.2...v6.4.0) (2023-02-08) - - -### Features - -* add support for W3C ES256K ([#462](https://github.com/firebase/php-jwt/issues/462)) ([213924f](https://github.com/firebase/php-jwt/commit/213924f51936291fbbca99158b11bd4ae56c2c95)) -* improve caching by only decoding jwks when necessary ([#486](https://github.com/firebase/php-jwt/issues/486)) ([78d3ed1](https://github.com/firebase/php-jwt/commit/78d3ed1073553f7d0bbffa6c2010009a0d483d5c)) - -## [6.3.2](https://github.com/firebase/php-jwt/compare/v6.3.1...v6.3.2) (2022-11-01) - - -### Bug Fixes - -* check kid before using as array index ([bad1b04](https://github.com/firebase/php-jwt/commit/bad1b040d0c736bbf86814c6b5ae614f517cf7bd)) - -## [6.3.1](https://github.com/firebase/php-jwt/compare/v6.3.0...v6.3.1) (2022-11-01) - - -### Bug Fixes - -* casing of GET for PSR compat ([#451](https://github.com/firebase/php-jwt/issues/451)) ([60b52b7](https://github.com/firebase/php-jwt/commit/60b52b71978790eafcf3b95cfbd83db0439e8d22)) -* string interpolation format for php 8.2 ([#446](https://github.com/firebase/php-jwt/issues/446)) ([2e07d8a](https://github.com/firebase/php-jwt/commit/2e07d8a1524d12b69b110ad649f17461d068b8f2)) - -## 6.3.0 / 2022-07-15 - - - Added ES256 support to JWK parsing ([#399](https://github.com/firebase/php-jwt/pull/399)) - - Fixed potential caching error in `CachedKeySet` by caching jwks as strings ([#435](https://github.com/firebase/php-jwt/pull/435)) - -## 6.2.0 / 2022-05-14 - - - Added `CachedKeySet` ([#397](https://github.com/firebase/php-jwt/pull/397)) - - Added `$defaultAlg` parameter to `JWT::parseKey` and `JWT::parseKeySet` ([#426](https://github.com/firebase/php-jwt/pull/426)). - -## 6.1.0 / 2022-03-23 - - - Drop support for PHP 5.3, 5.4, 5.5, 5.6, and 7.0 - - Add parameter typing and return types where possible - -## 6.0.0 / 2022-01-24 - - - **Backwards-Compatibility Breaking Changes**: See the [Release Notes](https://github.com/firebase/php-jwt/releases/tag/v6.0.0) for more information. - - New Key object to prevent key/algorithm type confusion (#365) - - Add JWK support (#273) - - Add ES256 support (#256) - - Add ES384 support (#324) - - Add Ed25519 support (#343) - -## 5.0.0 / 2017-06-26 -- Support RS384 and RS512. - See [#117](https://github.com/firebase/php-jwt/pull/117). Thanks [@joostfaassen](https://github.com/joostfaassen)! -- Add an example for RS256 openssl. - See [#125](https://github.com/firebase/php-jwt/pull/125). Thanks [@akeeman](https://github.com/akeeman)! -- Detect invalid Base64 encoding in signature. - See [#162](https://github.com/firebase/php-jwt/pull/162). Thanks [@psignoret](https://github.com/psignoret)! -- Update `JWT::verify` to handle OpenSSL errors. - See [#159](https://github.com/firebase/php-jwt/pull/159). Thanks [@bshaffer](https://github.com/bshaffer)! -- Add `array` type hinting to `decode` method - See [#101](https://github.com/firebase/php-jwt/pull/101). Thanks [@hywak](https://github.com/hywak)! -- Add all JSON error types. - See [#110](https://github.com/firebase/php-jwt/pull/110). Thanks [@gbalduzzi](https://github.com/gbalduzzi)! -- Bugfix 'kid' not in given key list. - See [#129](https://github.com/firebase/php-jwt/pull/129). Thanks [@stampycode](https://github.com/stampycode)! -- Miscellaneous cleanup, documentation and test fixes. - See [#107](https://github.com/firebase/php-jwt/pull/107), [#115](https://github.com/firebase/php-jwt/pull/115), - [#160](https://github.com/firebase/php-jwt/pull/160), [#161](https://github.com/firebase/php-jwt/pull/161), and - [#165](https://github.com/firebase/php-jwt/pull/165). Thanks [@akeeman](https://github.com/akeeman), - [@chinedufn](https://github.com/chinedufn), and [@bshaffer](https://github.com/bshaffer)! - -## 4.0.0 / 2016-07-17 -- Add support for late static binding. See [#88](https://github.com/firebase/php-jwt/pull/88) for details. Thanks to [@chappy84](https://github.com/chappy84)! -- Use static `$timestamp` instead of `time()` to improve unit testing. See [#93](https://github.com/firebase/php-jwt/pull/93) for details. Thanks to [@josephmcdermott](https://github.com/josephmcdermott)! -- Fixes to exceptions classes. See [#81](https://github.com/firebase/php-jwt/pull/81) for details. Thanks to [@Maks3w](https://github.com/Maks3w)! -- Fixes to PHPDoc. See [#76](https://github.com/firebase/php-jwt/pull/76) for details. Thanks to [@akeeman](https://github.com/akeeman)! - -## 3.0.0 / 2015-07-22 -- Minimum PHP version updated from `5.2.0` to `5.3.0`. -- Add `\Firebase\JWT` namespace. See -[#59](https://github.com/firebase/php-jwt/pull/59) for details. Thanks to -[@Dashron](https://github.com/Dashron)! -- Require a non-empty key to decode and verify a JWT. See -[#60](https://github.com/firebase/php-jwt/pull/60) for details. Thanks to -[@sjones608](https://github.com/sjones608)! -- Cleaner documentation blocks in the code. See -[#62](https://github.com/firebase/php-jwt/pull/62) for details. Thanks to -[@johanderuijter](https://github.com/johanderuijter)! - -## 2.2.0 / 2015-06-22 -- Add support for adding custom, optional JWT headers to `JWT::encode()`. See -[#53](https://github.com/firebase/php-jwt/pull/53/files) for details. Thanks to -[@mcocaro](https://github.com/mcocaro)! - -## 2.1.0 / 2015-05-20 -- Add support for adding a leeway to `JWT:decode()` that accounts for clock skew -between signing and verifying entities. Thanks to [@lcabral](https://github.com/lcabral)! -- Add support for passing an object implementing the `ArrayAccess` interface for -`$keys` argument in `JWT::decode()`. Thanks to [@aztech-dev](https://github.com/aztech-dev)! - -## 2.0.0 / 2015-04-01 -- **Note**: It is strongly recommended that you update to > v2.0.0 to address - known security vulnerabilities in prior versions when both symmetric and - asymmetric keys are used together. -- Update signature for `JWT::decode(...)` to require an array of supported - algorithms to use when verifying token signatures. diff --git a/lib/firebase/php-jwt/LICENSE b/lib/firebase/php-jwt/LICENSE deleted file mode 100644 index 11c014665..000000000 --- a/lib/firebase/php-jwt/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (c) 2011, Neuman Vong - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of other - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/firebase/php-jwt/README.md b/lib/firebase/php-jwt/README.md deleted file mode 100644 index ae2b38956..000000000 --- a/lib/firebase/php-jwt/README.md +++ /dev/null @@ -1,332 +0,0 @@ -![Build Status](https://github.com/firebase/php-jwt/actions/workflows/tests.yml/badge.svg) -[![Latest Stable Version](https://poser.pugx.org/firebase/php-jwt/v/stable)](https://packagist.org/packages/firebase/php-jwt) -[![Total Downloads](https://poser.pugx.org/firebase/php-jwt/downloads)](https://packagist.org/packages/firebase/php-jwt) -[![License](https://poser.pugx.org/firebase/php-jwt/license)](https://packagist.org/packages/firebase/php-jwt) - -PHP-JWT -======= -A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to [RFC 7519](https://tools.ietf.org/html/rfc7519). - -Installation ------------- - -Use composer to manage your dependencies and download PHP-JWT: - -```bash -composer require firebase/php-jwt -``` - -Optionally, install the `paragonie/sodium_compat` package from composer if your -php is < 7.2 or does not have libsodium installed: - -```bash -composer require paragonie/sodium_compat -``` - -Example -------- -```php -use Firebase\JWT\JWT; -use Firebase\JWT\Key; - -$key = 'example_key'; -$payload = [ - 'iss' => 'http://example.org', - 'aud' => 'http://example.com', - 'iat' => 1356999524, - 'nbf' => 1357000000 -]; - -/** - * IMPORTANT: - * You must specify supported algorithms for your application. See - * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40 - * for a list of spec-compliant algorithms. - */ -$jwt = JWT::encode($payload, $key, 'HS256'); -$decoded = JWT::decode($jwt, new Key($key, 'HS256')); - -print_r($decoded); - -/* - NOTE: This will now be an object instead of an associative array. To get - an associative array, you will need to cast it as such: -*/ - -$decoded_array = (array) $decoded; - -/** - * You can add a leeway to account for when there is a clock skew times between - * the signing and verifying servers. It is recommended that this leeway should - * not be bigger than a few minutes. - * - * Source: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#nbfDef - */ -JWT::$leeway = 60; // $leeway in seconds -$decoded = JWT::decode($jwt, new Key($key, 'HS256')); -``` -Example with RS256 (openssl) ----------------------------- -```php -use Firebase\JWT\JWT; -use Firebase\JWT\Key; - -$privateKey = << 'example.org', - 'aud' => 'example.com', - 'iat' => 1356999524, - 'nbf' => 1357000000 -]; - -$jwt = JWT::encode($payload, $privateKey, 'RS256'); -echo "Encode:\n" . print_r($jwt, true) . "\n"; - -$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256')); - -/* - NOTE: This will now be an object instead of an associative array. To get - an associative array, you will need to cast it as such: -*/ - -$decoded_array = (array) $decoded; -echo "Decode:\n" . print_r($decoded_array, true) . "\n"; -``` - -Example with a passphrase -------------------------- - -```php -use Firebase\JWT\JWT; -use Firebase\JWT\Key; - -// Your passphrase -$passphrase = '[YOUR_PASSPHRASE]'; - -// Your private key file with passphrase -// Can be generated with "ssh-keygen -t rsa -m pem" -$privateKeyFile = '/path/to/key-with-passphrase.pem'; - -// Create a private key of type "resource" -$privateKey = openssl_pkey_get_private( - file_get_contents($privateKeyFile), - $passphrase -); - -$payload = [ - 'iss' => 'example.org', - 'aud' => 'example.com', - 'iat' => 1356999524, - 'nbf' => 1357000000 -]; - -$jwt = JWT::encode($payload, $privateKey, 'RS256'); -echo "Encode:\n" . print_r($jwt, true) . "\n"; - -// Get public key from the private key, or pull from from a file. -$publicKey = openssl_pkey_get_details($privateKey)['key']; - -$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256')); -echo "Decode:\n" . print_r((array) $decoded, true) . "\n"; -``` - -Example with EdDSA (libsodium and Ed25519 signature) ----------------------------- -```php -use Firebase\JWT\JWT; -use Firebase\JWT\Key; - -// Public and private keys are expected to be Base64 encoded. The last -// non-empty line is used so that keys can be generated with -// sodium_crypto_sign_keypair(). The secret keys generated by other tools may -// need to be adjusted to match the input expected by libsodium. - -$keyPair = sodium_crypto_sign_keypair(); - -$privateKey = base64_encode(sodium_crypto_sign_secretkey($keyPair)); - -$publicKey = base64_encode(sodium_crypto_sign_publickey($keyPair)); - -$payload = [ - 'iss' => 'example.org', - 'aud' => 'example.com', - 'iat' => 1356999524, - 'nbf' => 1357000000 -]; - -$jwt = JWT::encode($payload, $privateKey, 'EdDSA'); -echo "Encode:\n" . print_r($jwt, true) . "\n"; - -$decoded = JWT::decode($jwt, new Key($publicKey, 'EdDSA')); -echo "Decode:\n" . print_r((array) $decoded, true) . "\n"; -```` - -Using JWKs ----------- - -```php -use Firebase\JWT\JWK; -use Firebase\JWT\JWT; - -// Set of keys. The "keys" key is required. For example, the JSON response to -// this endpoint: https://www.gstatic.com/iap/verify/public_key-jwk -$jwks = ['keys' => []]; - -// JWK::parseKeySet($jwks) returns an associative array of **kid** to Firebase\JWT\Key -// objects. Pass this as the second parameter to JWT::decode. -JWT::decode($payload, JWK::parseKeySet($jwks)); -``` - -Using Cached Key Sets ---------------------- - -The `CachedKeySet` class can be used to fetch and cache JWKS (JSON Web Key Sets) from a public URI. -This has the following advantages: - -1. The results are cached for performance. -2. If an unrecognized key is requested, the cache is refreshed, to accomodate for key rotation. -3. If rate limiting is enabled, the JWKS URI will not make more than 10 requests a second. - -```php -use Firebase\JWT\CachedKeySet; -use Firebase\JWT\JWT; - -// The URI for the JWKS you wish to cache the results from -$jwksUri = 'https://www.gstatic.com/iap/verify/public_key-jwk'; - -// Create an HTTP client (can be any PSR-7 compatible HTTP client) -$httpClient = new GuzzleHttp\Client(); - -// Create an HTTP request factory (can be any PSR-17 compatible HTTP request factory) -$httpFactory = new GuzzleHttp\Psr\HttpFactory(); - -// Create a cache item pool (can be any PSR-6 compatible cache item pool) -$cacheItemPool = Phpfastcache\CacheManager::getInstance('files'); - -$keySet = new CachedKeySet( - $jwksUri, - $httpClient, - $httpFactory, - $cacheItemPool, - null, // $expiresAfter int seconds to set the JWKS to expire - true // $rateLimit true to enable rate limit of 10 RPS on lookup of invalid keys -); - -$jwt = 'eyJhbGci...'; // Some JWT signed by a key from the $jwkUri above -$decoded = JWT::decode($jwt, $keySet); -``` - -Miscellaneous -------------- - -#### Exception Handling - -When a call to `JWT::decode` is invalid, it will throw one of the following exceptions: - -```php -use Firebase\JWT\JWT; -use Firebase\JWT\SignatureInvalidException; -use Firebase\JWT\BeforeValidException; -use Firebase\JWT\ExpiredException; -use DomainException; -use InvalidArgumentException; -use UnexpectedValueException; - -try { - $decoded = JWT::decode($payload, $keys); -} catch (InvalidArgumentException $e) { - // provided key/key-array is empty or malformed. -} catch (DomainException $e) { - // provided algorithm is unsupported OR - // provided key is invalid OR - // unknown error thrown in openSSL or libsodium OR - // libsodium is required but not available. -} catch (SignatureInvalidException $e) { - // provided JWT signature verification failed. -} catch (BeforeValidException $e) { - // provided JWT is trying to be used before "nbf" claim OR - // provided JWT is trying to be used before "iat" claim. -} catch (ExpiredException $e) { - // provided JWT is trying to be used after "exp" claim. -} catch (UnexpectedValueException $e) { - // provided JWT is malformed OR - // provided JWT is missing an algorithm / using an unsupported algorithm OR - // provided JWT algorithm does not match provided key OR - // provided key ID in key/key-array is empty or invalid. -} -``` - -All exceptions in the `Firebase\JWT` namespace extend `UnexpectedValueException`, and can be simplified -like this: - -```php -try { - $decoded = JWT::decode($payload, $keys); -} catch (LogicException $e) { - // errors having to do with environmental setup or malformed JWT Keys -} catch (UnexpectedValueException $e) { - // errors having to do with JWT signature and claims -} -``` - -#### Casting to array - -The return value of `JWT::decode` is the generic PHP object `stdClass`. If you'd like to handle with arrays -instead, you can do the following: - -```php -// return type is stdClass -$decoded = JWT::decode($payload, $keys); - -// cast to array -$decoded = json_decode(json_encode($decoded), true); -``` - -Tests ------ -Run the tests using phpunit: - -```bash -$ pear install PHPUnit -$ phpunit --configuration phpunit.xml.dist -PHPUnit 3.7.10 by Sebastian Bergmann. -..... -Time: 0 seconds, Memory: 2.50Mb -OK (5 tests, 5 assertions) -``` - -New Lines in private keys ------ - -If your private key contains `\n` characters, be sure to wrap it in double quotes `""` -and not single quotes `''` in order to properly interpret the escaped characters. - -License -------- -[3-Clause BSD](http://opensource.org/licenses/BSD-3-Clause). diff --git a/lib/firebase/php-jwt/composer.json b/lib/firebase/php-jwt/composer.json deleted file mode 100644 index c9aa3dbbc..000000000 --- a/lib/firebase/php-jwt/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "firebase/php-jwt", - "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", - "homepage": "https://github.com/firebase/php-jwt", - "keywords": [ - "php", - "jwt" - ], - "authors": [ - { - "name": "Neuman Vong", - "email": "neuman+pear@twilio.com", - "role": "Developer" - }, - { - "name": "Anant Narayanan", - "email": "anant@php.net", - "role": "Developer" - } - ], - "license": "BSD-3-Clause", - "require": { - "php": "^7.1||^8.0" - }, - "suggest": { - "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present", - "ext-sodium": "Support EdDSA (Ed25519) signatures" - }, - "autoload": { - "psr-4": { - "Firebase\\JWT\\": "src" - } - }, - "require-dev": { - "guzzlehttp/guzzle": "^6.5||^7.4", - "phpspec/prophecy-phpunit": "^1.1", - "phpunit/phpunit": "^7.5||^9.5", - "psr/cache": "^1.0||^2.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0" - } -} diff --git a/lib/firebase/php-jwt/src/BeforeValidException.php b/lib/firebase/php-jwt/src/BeforeValidException.php deleted file mode 100644 index c147852b9..000000000 --- a/lib/firebase/php-jwt/src/BeforeValidException.php +++ /dev/null @@ -1,7 +0,0 @@ - - */ -class CachedKeySet implements ArrayAccess -{ - /** - * @var string - */ - private $jwksUri; - /** - * @var ClientInterface - */ - private $httpClient; - /** - * @var RequestFactoryInterface - */ - private $httpFactory; - /** - * @var CacheItemPoolInterface - */ - private $cache; - /** - * @var ?int - */ - private $expiresAfter; - /** - * @var ?CacheItemInterface - */ - private $cacheItem; - /** - * @var array> - */ - private $keySet; - /** - * @var string - */ - private $cacheKey; - /** - * @var string - */ - private $cacheKeyPrefix = 'jwks'; - /** - * @var int - */ - private $maxKeyLength = 64; - /** - * @var bool - */ - private $rateLimit; - /** - * @var string - */ - private $rateLimitCacheKey; - /** - * @var int - */ - private $maxCallsPerMinute = 10; - /** - * @var string|null - */ - private $defaultAlg; - - public function __construct( - string $jwksUri, - ClientInterface $httpClient, - RequestFactoryInterface $httpFactory, - CacheItemPoolInterface $cache, - int $expiresAfter = null, - bool $rateLimit = false, - string $defaultAlg = null - ) { - $this->jwksUri = $jwksUri; - $this->httpClient = $httpClient; - $this->httpFactory = $httpFactory; - $this->cache = $cache; - $this->expiresAfter = $expiresAfter; - $this->rateLimit = $rateLimit; - $this->defaultAlg = $defaultAlg; - $this->setCacheKeys(); - } - - /** - * @param string $keyId - * @return Key - */ - public function offsetGet($keyId): Key - { - if (!$this->keyIdExists($keyId)) { - throw new OutOfBoundsException('Key ID not found'); - } - return JWK::parseKey($this->keySet[$keyId], $this->defaultAlg); - } - - /** - * @param string $keyId - * @return bool - */ - public function offsetExists($keyId): bool - { - return $this->keyIdExists($keyId); - } - - /** - * @param string $offset - * @param Key $value - */ - public function offsetSet($offset, $value): void - { - throw new LogicException('Method not implemented'); - } - - /** - * @param string $offset - */ - public function offsetUnset($offset): void - { - throw new LogicException('Method not implemented'); - } - - /** - * @return array - */ - private function formatJwksForCache(string $jwks): array - { - $jwks = json_decode($jwks, true); - - if (!isset($jwks['keys'])) { - throw new UnexpectedValueException('"keys" member must exist in the JWK Set'); - } - - if (empty($jwks['keys'])) { - throw new InvalidArgumentException('JWK Set did not contain any keys'); - } - - $keys = []; - foreach ($jwks['keys'] as $k => $v) { - $kid = isset($v['kid']) ? $v['kid'] : $k; - $keys[(string) $kid] = $v; - } - - return $keys; - } - - private function keyIdExists(string $keyId): bool - { - if (null === $this->keySet) { - $item = $this->getCacheItem(); - // Try to load keys from cache - if ($item->isHit()) { - // item found! retrieve it - $this->keySet = $item->get(); - // If the cached item is a string, the JWKS response was cached (previous behavior). - // Parse this into expected format array instead. - if (\is_string($this->keySet)) { - $this->keySet = $this->formatJwksForCache($this->keySet); - } - } - } - - if (!isset($this->keySet[$keyId])) { - if ($this->rateLimitExceeded()) { - return false; - } - $request = $this->httpFactory->createRequest('GET', $this->jwksUri); - $jwksResponse = $this->httpClient->sendRequest($request); - $this->keySet = $this->formatJwksForCache((string) $jwksResponse->getBody()); - - if (!isset($this->keySet[$keyId])) { - return false; - } - - $item = $this->getCacheItem(); - $item->set($this->keySet); - if ($this->expiresAfter) { - $item->expiresAfter($this->expiresAfter); - } - $this->cache->save($item); - } - - return true; - } - - private function rateLimitExceeded(): bool - { - if (!$this->rateLimit) { - return false; - } - - $cacheItem = $this->cache->getItem($this->rateLimitCacheKey); - if (!$cacheItem->isHit()) { - $cacheItem->expiresAfter(1); // # of calls are cached each minute - } - - $callsPerMinute = (int) $cacheItem->get(); - if (++$callsPerMinute > $this->maxCallsPerMinute) { - return true; - } - $cacheItem->set($callsPerMinute); - $this->cache->save($cacheItem); - return false; - } - - private function getCacheItem(): CacheItemInterface - { - if (\is_null($this->cacheItem)) { - $this->cacheItem = $this->cache->getItem($this->cacheKey); - } - - return $this->cacheItem; - } - - private function setCacheKeys(): void - { - if (empty($this->jwksUri)) { - throw new RuntimeException('JWKS URI is empty'); - } - - // ensure we do not have illegal characters - $key = preg_replace('|[^a-zA-Z0-9_\.!]|', '', $this->jwksUri); - - // add prefix - $key = $this->cacheKeyPrefix . $key; - - // Hash keys if they exceed $maxKeyLength of 64 - if (\strlen($key) > $this->maxKeyLength) { - $key = substr(hash('sha256', $key), 0, $this->maxKeyLength); - } - - $this->cacheKey = $key; - - if ($this->rateLimit) { - // add prefix - $rateLimitKey = $this->cacheKeyPrefix . 'ratelimit' . $key; - - // Hash keys if they exceed $maxKeyLength of 64 - if (\strlen($rateLimitKey) > $this->maxKeyLength) { - $rateLimitKey = substr(hash('sha256', $rateLimitKey), 0, $this->maxKeyLength); - } - - $this->rateLimitCacheKey = $rateLimitKey; - } - } -} diff --git a/lib/firebase/php-jwt/src/ExpiredException.php b/lib/firebase/php-jwt/src/ExpiredException.php deleted file mode 100644 index 81ba52d43..000000000 --- a/lib/firebase/php-jwt/src/ExpiredException.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD - * @link https://github.com/firebase/php-jwt - */ -class JWK -{ - private const OID = '1.2.840.10045.2.1'; - private const ASN1_OBJECT_IDENTIFIER = 0x06; - private const ASN1_SEQUENCE = 0x10; // also defined in JWT - private const ASN1_BIT_STRING = 0x03; - private const EC_CURVES = [ - 'P-256' => '1.2.840.10045.3.1.7', // Len: 64 - 'secp256k1' => '1.3.132.0.10', // Len: 64 - // 'P-384' => '1.3.132.0.34', // Len: 96 (not yet supported) - // 'P-521' => '1.3.132.0.35', // Len: 132 (not supported) - ]; - - /** - * Parse a set of JWK keys - * - * @param array $jwks The JSON Web Key Set as an associative array - * @param string $defaultAlg The algorithm for the Key object if "alg" is not set in the - * JSON Web Key Set - * - * @return array An associative array of key IDs (kid) to Key objects - * - * @throws InvalidArgumentException Provided JWK Set is empty - * @throws UnexpectedValueException Provided JWK Set was invalid - * @throws DomainException OpenSSL failure - * - * @uses parseKey - */ - public static function parseKeySet(array $jwks, string $defaultAlg = null): array - { - $keys = []; - - if (!isset($jwks['keys'])) { - throw new UnexpectedValueException('"keys" member must exist in the JWK Set'); - } - - if (empty($jwks['keys'])) { - throw new InvalidArgumentException('JWK Set did not contain any keys'); - } - - foreach ($jwks['keys'] as $k => $v) { - $kid = isset($v['kid']) ? $v['kid'] : $k; - if ($key = self::parseKey($v, $defaultAlg)) { - $keys[(string) $kid] = $key; - } - } - - if (0 === \count($keys)) { - throw new UnexpectedValueException('No supported algorithms found in JWK Set'); - } - - return $keys; - } - - /** - * Parse a JWK key - * - * @param array $jwk An individual JWK - * @param string $defaultAlg The algorithm for the Key object if "alg" is not set in the - * JSON Web Key Set - * - * @return Key The key object for the JWK - * - * @throws InvalidArgumentException Provided JWK is empty - * @throws UnexpectedValueException Provided JWK was invalid - * @throws DomainException OpenSSL failure - * - * @uses createPemFromModulusAndExponent - */ - public static function parseKey(array $jwk, string $defaultAlg = null): ?Key - { - if (empty($jwk)) { - throw new InvalidArgumentException('JWK must not be empty'); - } - - if (!isset($jwk['kty'])) { - throw new UnexpectedValueException('JWK must contain a "kty" parameter'); - } - - if (!isset($jwk['alg'])) { - if (\is_null($defaultAlg)) { - // The "alg" parameter is optional in a KTY, but an algorithm is required - // for parsing in this library. Use the $defaultAlg parameter when parsing the - // key set in order to prevent this error. - // @see https://datatracker.ietf.org/doc/html/rfc7517#section-4.4 - throw new UnexpectedValueException('JWK must contain an "alg" parameter'); - } - $jwk['alg'] = $defaultAlg; - } - - switch ($jwk['kty']) { - case 'RSA': - if (!empty($jwk['d'])) { - throw new UnexpectedValueException('RSA private keys are not supported'); - } - if (!isset($jwk['n']) || !isset($jwk['e'])) { - throw new UnexpectedValueException('RSA keys must contain values for both "n" and "e"'); - } - - $pem = self::createPemFromModulusAndExponent($jwk['n'], $jwk['e']); - $publicKey = \openssl_pkey_get_public($pem); - if (false === $publicKey) { - throw new DomainException( - 'OpenSSL error: ' . \openssl_error_string() - ); - } - return new Key($publicKey, $jwk['alg']); - case 'EC': - if (isset($jwk['d'])) { - // The key is actually a private key - throw new UnexpectedValueException('Key data must be for a public key'); - } - - if (empty($jwk['crv'])) { - throw new UnexpectedValueException('crv not set'); - } - - if (!isset(self::EC_CURVES[$jwk['crv']])) { - throw new DomainException('Unrecognised or unsupported EC curve'); - } - - if (empty($jwk['x']) || empty($jwk['y'])) { - throw new UnexpectedValueException('x and y not set'); - } - - $publicKey = self::createPemFromCrvAndXYCoordinates($jwk['crv'], $jwk['x'], $jwk['y']); - return new Key($publicKey, $jwk['alg']); - default: - // Currently only RSA is supported - break; - } - - return null; - } - - /** - * Converts the EC JWK values to pem format. - * - * @param string $crv The EC curve (only P-256 is supported) - * @param string $x The EC x-coordinate - * @param string $y The EC y-coordinate - * - * @return string - */ - private static function createPemFromCrvAndXYCoordinates(string $crv, string $x, string $y): string - { - $pem = - self::encodeDER( - self::ASN1_SEQUENCE, - self::encodeDER( - self::ASN1_SEQUENCE, - self::encodeDER( - self::ASN1_OBJECT_IDENTIFIER, - self::encodeOID(self::OID) - ) - . self::encodeDER( - self::ASN1_OBJECT_IDENTIFIER, - self::encodeOID(self::EC_CURVES[$crv]) - ) - ) . - self::encodeDER( - self::ASN1_BIT_STRING, - \chr(0x00) . \chr(0x04) - . JWT::urlsafeB64Decode($x) - . JWT::urlsafeB64Decode($y) - ) - ); - - return sprintf( - "-----BEGIN PUBLIC KEY-----\n%s\n-----END PUBLIC KEY-----\n", - wordwrap(base64_encode($pem), 64, "\n", true) - ); - } - - /** - * Create a public key represented in PEM format from RSA modulus and exponent information - * - * @param string $n The RSA modulus encoded in Base64 - * @param string $e The RSA exponent encoded in Base64 - * - * @return string The RSA public key represented in PEM format - * - * @uses encodeLength - */ - private static function createPemFromModulusAndExponent( - string $n, - string $e - ): string { - $mod = JWT::urlsafeB64Decode($n); - $exp = JWT::urlsafeB64Decode($e); - - $modulus = \pack('Ca*a*', 2, self::encodeLength(\strlen($mod)), $mod); - $publicExponent = \pack('Ca*a*', 2, self::encodeLength(\strlen($exp)), $exp); - - $rsaPublicKey = \pack( - 'Ca*a*a*', - 48, - self::encodeLength(\strlen($modulus) + \strlen($publicExponent)), - $modulus, - $publicExponent - ); - - // sequence(oid(1.2.840.113549.1.1.1), null)) = rsaEncryption. - $rsaOID = \pack('H*', '300d06092a864886f70d0101010500'); // hex version of MA0GCSqGSIb3DQEBAQUA - $rsaPublicKey = \chr(0) . $rsaPublicKey; - $rsaPublicKey = \chr(3) . self::encodeLength(\strlen($rsaPublicKey)) . $rsaPublicKey; - - $rsaPublicKey = \pack( - 'Ca*a*', - 48, - self::encodeLength(\strlen($rsaOID . $rsaPublicKey)), - $rsaOID . $rsaPublicKey - ); - - return "-----BEGIN PUBLIC KEY-----\r\n" . - \chunk_split(\base64_encode($rsaPublicKey), 64) . - '-----END PUBLIC KEY-----'; - } - - /** - * DER-encode the length - * - * DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See - * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. - * - * @param int $length - * @return string - */ - private static function encodeLength(int $length): string - { - if ($length <= 0x7F) { - return \chr($length); - } - - $temp = \ltrim(\pack('N', $length), \chr(0)); - - return \pack('Ca*', 0x80 | \strlen($temp), $temp); - } - - /** - * Encodes a value into a DER object. - * Also defined in Firebase\JWT\JWT - * - * @param int $type DER tag - * @param string $value the value to encode - * @return string the encoded object - */ - private static function encodeDER(int $type, string $value): string - { - $tag_header = 0; - if ($type === self::ASN1_SEQUENCE) { - $tag_header |= 0x20; - } - - // Type - $der = \chr($tag_header | $type); - - // Length - $der .= \chr(\strlen($value)); - - return $der . $value; - } - - /** - * Encodes a string into a DER-encoded OID. - * - * @param string $oid the OID string - * @return string the binary DER-encoded OID - */ - private static function encodeOID(string $oid): string - { - $octets = explode('.', $oid); - - // Get the first octet - $first = (int) array_shift($octets); - $second = (int) array_shift($octets); - $oid = \chr($first * 40 + $second); - - // Iterate over subsequent octets - foreach ($octets as $octet) { - if ($octet == 0) { - $oid .= \chr(0x00); - continue; - } - $bin = ''; - - while ($octet) { - $bin .= \chr(0x80 | ($octet & 0x7f)); - $octet >>= 7; - } - $bin[0] = $bin[0] & \chr(0x7f); - - // Convert to big endian if necessary - if (pack('V', 65534) == pack('L', 65534)) { - $oid .= strrev($bin); - } else { - $oid .= $bin; - } - } - - return $oid; - } -} diff --git a/lib/firebase/php-jwt/src/JWT.php b/lib/firebase/php-jwt/src/JWT.php deleted file mode 100644 index 269e8caf0..000000000 --- a/lib/firebase/php-jwt/src/JWT.php +++ /dev/null @@ -1,638 +0,0 @@ - - * @author Anant Narayanan - * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD - * @link https://github.com/firebase/php-jwt - */ -class JWT -{ - private const ASN1_INTEGER = 0x02; - private const ASN1_SEQUENCE = 0x10; - private const ASN1_BIT_STRING = 0x03; - - /** - * When checking nbf, iat or expiration times, - * we want to provide some extra leeway time to - * account for clock skew. - * - * @var int - */ - public static $leeway = 0; - - /** - * Allow the current timestamp to be specified. - * Useful for fixing a value within unit testing. - * Will default to PHP time() value if null. - * - * @var ?int - */ - public static $timestamp = null; - - /** - * @var array - */ - public static $supported_algs = [ - 'ES384' => ['openssl', 'SHA384'], - 'ES256' => ['openssl', 'SHA256'], - 'ES256K' => ['openssl', 'SHA256'], - 'HS256' => ['hash_hmac', 'SHA256'], - 'HS384' => ['hash_hmac', 'SHA384'], - 'HS512' => ['hash_hmac', 'SHA512'], - 'RS256' => ['openssl', 'SHA256'], - 'RS384' => ['openssl', 'SHA384'], - 'RS512' => ['openssl', 'SHA512'], - 'EdDSA' => ['sodium_crypto', 'EdDSA'], - ]; - - /** - * Decodes a JWT string into a PHP object. - * - * @param string $jwt The JWT - * @param Key|array $keyOrKeyArray The Key or associative array of key IDs (kid) to Key objects. - * If the algorithm used is asymmetric, this is the public key - * Each Key object contains an algorithm and matching key. - * Supported algorithms are 'ES384','ES256', 'HS256', 'HS384', - * 'HS512', 'RS256', 'RS384', and 'RS512' - * - * @return stdClass The JWT's payload as a PHP object - * - * @throws InvalidArgumentException Provided key/key-array was empty or malformed - * @throws DomainException Provided JWT is malformed - * @throws UnexpectedValueException Provided JWT was invalid - * @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed - * @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf' - * @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat' - * @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim - * - * @uses jsonDecode - * @uses urlsafeB64Decode - */ - public static function decode( - string $jwt, - $keyOrKeyArray - ): stdClass { - // Validate JWT - $timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp; - - if (empty($keyOrKeyArray)) { - throw new InvalidArgumentException('Key may not be empty'); - } - $tks = \explode('.', $jwt); - if (\count($tks) !== 3) { - throw new UnexpectedValueException('Wrong number of segments'); - } - list($headb64, $bodyb64, $cryptob64) = $tks; - $headerRaw = static::urlsafeB64Decode($headb64); - if (null === ($header = static::jsonDecode($headerRaw))) { - throw new UnexpectedValueException('Invalid header encoding'); - } - $payloadRaw = static::urlsafeB64Decode($bodyb64); - if (null === ($payload = static::jsonDecode($payloadRaw))) { - throw new UnexpectedValueException('Invalid claims encoding'); - } - if (\is_array($payload)) { - // prevent PHP Fatal Error in edge-cases when payload is empty array - $payload = (object) $payload; - } - if (!$payload instanceof stdClass) { - throw new UnexpectedValueException('Payload must be a JSON object'); - } - $sig = static::urlsafeB64Decode($cryptob64); - if (empty($header->alg)) { - throw new UnexpectedValueException('Empty algorithm'); - } - if (empty(static::$supported_algs[$header->alg])) { - throw new UnexpectedValueException('Algorithm not supported'); - } - - $key = self::getKey($keyOrKeyArray, property_exists($header, 'kid') ? $header->kid : null); - - // Check the algorithm - if (!self::constantTimeEquals($key->getAlgorithm(), $header->alg)) { - // See issue #351 - throw new UnexpectedValueException('Incorrect key for this algorithm'); - } - if (\in_array($header->alg, ['ES256', 'ES256K', 'ES384'], true)) { - // OpenSSL expects an ASN.1 DER sequence for ES256/ES256K/ES384 signatures - $sig = self::signatureToDER($sig); - } - if (!self::verify("{$headb64}.{$bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) { - throw new SignatureInvalidException('Signature verification failed'); - } - - // Check the nbf if it is defined. This is the time that the - // token can actually be used. If it's not yet that time, abort. - if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) { - throw new BeforeValidException( - 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->nbf) - ); - } - - // Check that this token has been created before 'now'. This prevents - // using tokens that have been created for later use (and haven't - // correctly used the nbf claim). - if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) { - throw new BeforeValidException( - 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->iat) - ); - } - - // Check if this token has expired. - if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) { - throw new ExpiredException('Expired token'); - } - - return $payload; - } - - /** - * Converts and signs a PHP array into a JWT string. - * - * @param array $payload PHP array - * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key. - * @param string $alg Supported algorithms are 'ES384','ES256', 'ES256K', 'HS256', - * 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512' - * @param string $keyId - * @param array $head An array with header elements to attach - * - * @return string A signed JWT - * - * @uses jsonEncode - * @uses urlsafeB64Encode - */ - public static function encode( - array $payload, - $key, - string $alg, - string $keyId = null, - array $head = null - ): string { - $header = ['typ' => 'JWT', 'alg' => $alg]; - if ($keyId !== null) { - $header['kid'] = $keyId; - } - if (isset($head) && \is_array($head)) { - $header = \array_merge($head, $header); - } - $segments = []; - $segments[] = static::urlsafeB64Encode((string) static::jsonEncode($header)); - $segments[] = static::urlsafeB64Encode((string) static::jsonEncode($payload)); - $signing_input = \implode('.', $segments); - - $signature = static::sign($signing_input, $key, $alg); - $segments[] = static::urlsafeB64Encode($signature); - - return \implode('.', $segments); - } - - /** - * Sign a string with a given key and algorithm. - * - * @param string $msg The message to sign - * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key. - * @param string $alg Supported algorithms are 'ES384','ES256', 'ES256K', 'HS256', - * 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512' - * - * @return string An encrypted message - * - * @throws DomainException Unsupported algorithm or bad key was specified - */ - public static function sign( - string $msg, - $key, - string $alg - ): string { - if (empty(static::$supported_algs[$alg])) { - throw new DomainException('Algorithm not supported'); - } - list($function, $algorithm) = static::$supported_algs[$alg]; - switch ($function) { - case 'hash_hmac': - if (!\is_string($key)) { - throw new InvalidArgumentException('key must be a string when using hmac'); - } - return \hash_hmac($algorithm, $msg, $key, true); - case 'openssl': - $signature = ''; - $success = \openssl_sign($msg, $signature, $key, $algorithm); // @phpstan-ignore-line - if (!$success) { - throw new DomainException('OpenSSL unable to sign data'); - } - if ($alg === 'ES256' || $alg === 'ES256K') { - $signature = self::signatureFromDER($signature, 256); - } elseif ($alg === 'ES384') { - $signature = self::signatureFromDER($signature, 384); - } - return $signature; - case 'sodium_crypto': - if (!\function_exists('sodium_crypto_sign_detached')) { - throw new DomainException('libsodium is not available'); - } - if (!\is_string($key)) { - throw new InvalidArgumentException('key must be a string when using EdDSA'); - } - try { - // The last non-empty line is used as the key. - $lines = array_filter(explode("\n", $key)); - $key = base64_decode((string) end($lines)); - if (\strlen($key) === 0) { - throw new DomainException('Key cannot be empty string'); - } - return sodium_crypto_sign_detached($msg, $key); - } catch (Exception $e) { - throw new DomainException($e->getMessage(), 0, $e); - } - } - - throw new DomainException('Algorithm not supported'); - } - - /** - * Verify a signature with the message, key and method. Not all methods - * are symmetric, so we must have a separate verify and sign method. - * - * @param string $msg The original message (header and body) - * @param string $signature The original signature - * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial For HS*, a string key works. for RS*, must be an instance of OpenSSLAsymmetricKey - * @param string $alg The algorithm - * - * @return bool - * - * @throws DomainException Invalid Algorithm, bad key, or OpenSSL failure - */ - private static function verify( - string $msg, - string $signature, - $keyMaterial, - string $alg - ): bool { - if (empty(static::$supported_algs[$alg])) { - throw new DomainException('Algorithm not supported'); - } - - list($function, $algorithm) = static::$supported_algs[$alg]; - switch ($function) { - case 'openssl': - $success = \openssl_verify($msg, $signature, $keyMaterial, $algorithm); // @phpstan-ignore-line - if ($success === 1) { - return true; - } - if ($success === 0) { - return false; - } - // returns 1 on success, 0 on failure, -1 on error. - throw new DomainException( - 'OpenSSL error: ' . \openssl_error_string() - ); - case 'sodium_crypto': - if (!\function_exists('sodium_crypto_sign_verify_detached')) { - throw new DomainException('libsodium is not available'); - } - if (!\is_string($keyMaterial)) { - throw new InvalidArgumentException('key must be a string when using EdDSA'); - } - try { - // The last non-empty line is used as the key. - $lines = array_filter(explode("\n", $keyMaterial)); - $key = base64_decode((string) end($lines)); - if (\strlen($key) === 0) { - throw new DomainException('Key cannot be empty string'); - } - if (\strlen($signature) === 0) { - throw new DomainException('Signature cannot be empty string'); - } - return sodium_crypto_sign_verify_detached($signature, $msg, $key); - } catch (Exception $e) { - throw new DomainException($e->getMessage(), 0, $e); - } - case 'hash_hmac': - default: - if (!\is_string($keyMaterial)) { - throw new InvalidArgumentException('key must be a string when using hmac'); - } - $hash = \hash_hmac($algorithm, $msg, $keyMaterial, true); - return self::constantTimeEquals($hash, $signature); - } - } - - /** - * Decode a JSON string into a PHP object. - * - * @param string $input JSON string - * - * @return mixed The decoded JSON string - * - * @throws DomainException Provided string was invalid JSON - */ - public static function jsonDecode(string $input) - { - $obj = \json_decode($input, false, 512, JSON_BIGINT_AS_STRING); - - if ($errno = \json_last_error()) { - self::handleJsonError($errno); - } elseif ($obj === null && $input !== 'null') { - throw new DomainException('Null result with non-null input'); - } - return $obj; - } - - /** - * Encode a PHP array into a JSON string. - * - * @param array $input A PHP array - * - * @return string JSON representation of the PHP array - * - * @throws DomainException Provided object could not be encoded to valid JSON - */ - public static function jsonEncode(array $input): string - { - if (PHP_VERSION_ID >= 50400) { - $json = \json_encode($input, \JSON_UNESCAPED_SLASHES); - } else { - // PHP 5.3 only - $json = \json_encode($input); - } - if ($errno = \json_last_error()) { - self::handleJsonError($errno); - } elseif ($json === 'null' && $input !== null) { - throw new DomainException('Null result with non-null input'); - } - if ($json === false) { - throw new DomainException('Provided object could not be encoded to valid JSON'); - } - return $json; - } - - /** - * Decode a string with URL-safe Base64. - * - * @param string $input A Base64 encoded string - * - * @return string A decoded string - * - * @throws InvalidArgumentException invalid base64 characters - */ - public static function urlsafeB64Decode(string $input): string - { - $remainder = \strlen($input) % 4; - if ($remainder) { - $padlen = 4 - $remainder; - $input .= \str_repeat('=', $padlen); - } - return \base64_decode(\strtr($input, '-_', '+/')); - } - - /** - * Encode a string with URL-safe Base64. - * - * @param string $input The string you want encoded - * - * @return string The base64 encode of what you passed in - */ - public static function urlsafeB64Encode(string $input): string - { - return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_')); - } - - - /** - * Determine if an algorithm has been provided for each Key - * - * @param Key|ArrayAccess|array $keyOrKeyArray - * @param string|null $kid - * - * @throws UnexpectedValueException - * - * @return Key - */ - private static function getKey( - $keyOrKeyArray, - ?string $kid - ): Key { - if ($keyOrKeyArray instanceof Key) { - return $keyOrKeyArray; - } - - if (empty($kid)) { - throw new UnexpectedValueException('"kid" empty, unable to lookup correct key'); - } - - if ($keyOrKeyArray instanceof CachedKeySet) { - // Skip "isset" check, as this will automatically refresh if not set - return $keyOrKeyArray[$kid]; - } - - if (!isset($keyOrKeyArray[$kid])) { - throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key'); - } - - return $keyOrKeyArray[$kid]; - } - - /** - * @param string $left The string of known length to compare against - * @param string $right The user-supplied string - * @return bool - */ - public static function constantTimeEquals(string $left, string $right): bool - { - if (\function_exists('hash_equals')) { - return \hash_equals($left, $right); - } - $len = \min(self::safeStrlen($left), self::safeStrlen($right)); - - $status = 0; - for ($i = 0; $i < $len; $i++) { - $status |= (\ord($left[$i]) ^ \ord($right[$i])); - } - $status |= (self::safeStrlen($left) ^ self::safeStrlen($right)); - - return ($status === 0); - } - - /** - * Helper method to create a JSON error. - * - * @param int $errno An error number from json_last_error() - * - * @throws DomainException - * - * @return void - */ - private static function handleJsonError(int $errno): void - { - $messages = [ - JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', - JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON', - JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', - JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', - JSON_ERROR_UTF8 => 'Malformed UTF-8 characters' //PHP >= 5.3.3 - ]; - throw new DomainException( - isset($messages[$errno]) - ? $messages[$errno] - : 'Unknown JSON error: ' . $errno - ); - } - - /** - * Get the number of bytes in cryptographic strings. - * - * @param string $str - * - * @return int - */ - private static function safeStrlen(string $str): int - { - if (\function_exists('mb_strlen')) { - return \mb_strlen($str, '8bit'); - } - return \strlen($str); - } - - /** - * Convert an ECDSA signature to an ASN.1 DER sequence - * - * @param string $sig The ECDSA signature to convert - * @return string The encoded DER object - */ - private static function signatureToDER(string $sig): string - { - // Separate the signature into r-value and s-value - $length = max(1, (int) (\strlen($sig) / 2)); - list($r, $s) = \str_split($sig, $length); - - // Trim leading zeros - $r = \ltrim($r, "\x00"); - $s = \ltrim($s, "\x00"); - - // Convert r-value and s-value from unsigned big-endian integers to - // signed two's complement - if (\ord($r[0]) > 0x7f) { - $r = "\x00" . $r; - } - if (\ord($s[0]) > 0x7f) { - $s = "\x00" . $s; - } - - return self::encodeDER( - self::ASN1_SEQUENCE, - self::encodeDER(self::ASN1_INTEGER, $r) . - self::encodeDER(self::ASN1_INTEGER, $s) - ); - } - - /** - * Encodes a value into a DER object. - * - * @param int $type DER tag - * @param string $value the value to encode - * - * @return string the encoded object - */ - private static function encodeDER(int $type, string $value): string - { - $tag_header = 0; - if ($type === self::ASN1_SEQUENCE) { - $tag_header |= 0x20; - } - - // Type - $der = \chr($tag_header | $type); - - // Length - $der .= \chr(\strlen($value)); - - return $der . $value; - } - - /** - * Encodes signature from a DER object. - * - * @param string $der binary signature in DER format - * @param int $keySize the number of bits in the key - * - * @return string the signature - */ - private static function signatureFromDER(string $der, int $keySize): string - { - // OpenSSL returns the ECDSA signatures as a binary ASN.1 DER SEQUENCE - list($offset, $_) = self::readDER($der); - list($offset, $r) = self::readDER($der, $offset); - list($offset, $s) = self::readDER($der, $offset); - - // Convert r-value and s-value from signed two's compliment to unsigned - // big-endian integers - $r = \ltrim($r, "\x00"); - $s = \ltrim($s, "\x00"); - - // Pad out r and s so that they are $keySize bits long - $r = \str_pad($r, $keySize / 8, "\x00", STR_PAD_LEFT); - $s = \str_pad($s, $keySize / 8, "\x00", STR_PAD_LEFT); - - return $r . $s; - } - - /** - * Reads binary DER-encoded data and decodes into a single object - * - * @param string $der the binary data in DER format - * @param int $offset the offset of the data stream containing the object - * to decode - * - * @return array{int, string|null} the new offset and the decoded object - */ - private static function readDER(string $der, int $offset = 0): array - { - $pos = $offset; - $size = \strlen($der); - $constructed = (\ord($der[$pos]) >> 5) & 0x01; - $type = \ord($der[$pos++]) & 0x1f; - - // Length - $len = \ord($der[$pos++]); - if ($len & 0x80) { - $n = $len & 0x1f; - $len = 0; - while ($n-- && $pos < $size) { - $len = ($len << 8) | \ord($der[$pos++]); - } - } - - // Value - if ($type === self::ASN1_BIT_STRING) { - $pos++; // Skip the first contents octet (padding indicator) - $data = \substr($der, $pos, $len - 1); - $pos += $len - 1; - } elseif (!$constructed) { - $data = \substr($der, $pos, $len); - $pos += $len; - } else { - $data = null; - } - - return [$pos, $data]; - } -} diff --git a/lib/firebase/php-jwt/src/Key.php b/lib/firebase/php-jwt/src/Key.php deleted file mode 100644 index 00cf7f2ed..000000000 --- a/lib/firebase/php-jwt/src/Key.php +++ /dev/null @@ -1,64 +0,0 @@ -keyMaterial = $keyMaterial; - $this->algorithm = $algorithm; - } - - /** - * Return the algorithm valid for this key - * - * @return string - */ - public function getAlgorithm(): string - { - return $this->algorithm; - } - - /** - * @return string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate - */ - public function getKeyMaterial() - { - return $this->keyMaterial; - } -} diff --git a/lib/firebase/php-jwt/src/SignatureInvalidException.php b/lib/firebase/php-jwt/src/SignatureInvalidException.php deleted file mode 100644 index d35dee9f1..000000000 --- a/lib/firebase/php-jwt/src/SignatureInvalidException.php +++ /dev/null @@ -1,7 +0,0 @@ -= 5.5 -* Updated to use PSR-7 - * Requires immutable messages, which basically means an event based system - owned by a request instance is no longer possible. - * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). - * Removed the dependency on `guzzlehttp/streams`. These stream abstractions - are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` - namespace. -* Added middleware and handler system - * Replaced the Guzzle event and subscriber system with a middleware system. - * No longer depends on RingPHP, but rather places the HTTP handlers directly - in Guzzle, operating on PSR-7 messages. - * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which - means the `guzzlehttp/retry-subscriber` is now obsolete. - * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. -* Asynchronous responses - * No longer supports the `future` request option to send an async request. - Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, - `getAsync`, etc.). - * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid - recursion required by chaining and forwarding react promises. See - https://github.com/guzzle/promises - * Added `requestAsync` and `sendAsync` to send request asynchronously. - * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests - asynchronously. -* Request options - * POST and form updates - * Added the `form_fields` and `form_files` request options. - * Removed the `GuzzleHttp\Post` namespace. - * The `body` request option no longer accepts an array for POST requests. - * The `exceptions` request option has been deprecated in favor of the - `http_errors` request options. - * The `save_to` request option has been deprecated in favor of `sink` request - option. -* Clients no longer accept an array of URI template string and variables for - URI variables. You will need to expand URI templates before passing them - into a client constructor or request method. -* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are - now magic methods that will send synchronous requests. -* Replaced `Utils.php` with plain functions in `functions.php`. -* Removed `GuzzleHttp\Collection`. -* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as - an array. -* Removed `GuzzleHttp\Query`. Query string handling is now handled using an - associative array passed into the `query` request option. The query string - is serialized using PHP's `http_build_query`. If you need more control, you - can pass the query string in as a string. -* `GuzzleHttp\QueryParser` has been replaced with the - `GuzzleHttp\Psr7\parse_query`. - - -## 5.2.0 - 2015-01-27 - -* Added `AppliesHeadersInterface` to make applying headers to a request based - on the body more generic and not specific to `PostBodyInterface`. -* Reduced the number of stack frames needed to send requests. -* Nested futures are now resolved in the client rather than the RequestFsm -* Finishing state transitions is now handled in the RequestFsm rather than the - RingBridge. -* Added a guard in the Pool class to not use recursion for request retries. - - -## 5.1.0 - 2014-12-19 - -* Pool class no longer uses recursion when a request is intercepted. -* The size of a Pool can now be dynamically adjusted using a callback. - See https://github.com/guzzle/guzzle/pull/943. -* Setting a request option to `null` when creating a request with a client will - ensure that the option is not set. This allows you to overwrite default - request options on a per-request basis. - See https://github.com/guzzle/guzzle/pull/937. -* Added the ability to limit which protocols are allowed for redirects by - specifying a `protocols` array in the `allow_redirects` request option. -* Nested futures due to retries are now resolved when waiting for synchronous - responses. See https://github.com/guzzle/guzzle/pull/947. -* `"0"` is now an allowed URI path. See - https://github.com/guzzle/guzzle/pull/935. -* `Query` no longer typehints on the `$query` argument in the constructor, - allowing for strings and arrays. -* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle - specific exceptions if necessary. - - -## 5.0.3 - 2014-11-03 - -This change updates query strings so that they are treated as un-encoded values -by default where the value represents an un-encoded value to send over the -wire. A Query object then encodes the value before sending over the wire. This -means that even value query string values (e.g., ":") are url encoded. This -makes the Query class match PHP's http_build_query function. However, if you -want to send requests over the wire using valid query string characters that do -not need to be encoded, then you can provide a string to Url::setQuery() and -pass true as the second argument to specify that the query string is a raw -string that should not be parsed or encoded (unless a call to getQuery() is -subsequently made, forcing the query-string to be converted into a Query -object). - - -## 5.0.2 - 2014-10-30 - -* Added a trailing `\r\n` to multipart/form-data payloads. See - https://github.com/guzzle/guzzle/pull/871 -* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. -* Status codes are now returned as integers. See - https://github.com/guzzle/guzzle/issues/881 -* No longer overwriting an existing `application/x-www-form-urlencoded` header - when sending POST requests, allowing for customized headers. See - https://github.com/guzzle/guzzle/issues/877 -* Improved path URL serialization. - - * No longer double percent-encoding characters in the path or query string if - they are already encoded. - * Now properly encoding the supplied path to a URL object, instead of only - encoding ' ' and '?'. - * Note: This has been changed in 5.0.3 to now encode query string values by - default unless the `rawString` argument is provided when setting the query - string on a URL: Now allowing many more characters to be present in the - query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A - - -## 5.0.1 - 2014-10-16 - -Bugfix release. - -* Fixed an issue where connection errors still returned response object in - error and end events event though the response is unusable. This has been - corrected so that a response is not returned in the `getResponse` method of - these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 -* Fixed an issue where transfer statistics were not being populated in the - RingBridge. https://github.com/guzzle/guzzle/issues/866 - - -## 5.0.0 - 2014-10-12 - -Adding support for non-blocking responses and some minor API cleanup. - -### New Features - -* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. -* Added a public API for creating a default HTTP adapter. -* Updated the redirect plugin to be non-blocking so that redirects are sent - concurrently. Other plugins like this can now be updated to be non-blocking. -* Added a "progress" event so that you can get upload and download progress - events. -* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers - requests concurrently using a capped pool size as efficiently as possible. -* Added `hasListeners()` to EmitterInterface. -* Removed `GuzzleHttp\ClientInterface::sendAll` and marked - `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the - recommended way). - -### Breaking changes - -The breaking changes in this release are relatively minor. The biggest thing to -look out for is that request and response objects no longer implement fluent -interfaces. - -* Removed the fluent interfaces (i.e., `return $this`) from requests, - responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, - `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and - `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of - why I did this: https://ocramius.github.io/blog/fluent-interfaces-are-evil/. - This also makes the Guzzle message interfaces compatible with the current - PSR-7 message proposal. -* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except - for the HTTP request functions from function.php, these functions are now - implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` - moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to - `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to - `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be - `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php - caused problems for many users: they aren't PSR-4 compliant, require an - explicit include, and needed an if-guard to ensure that the functions are not - declared multiple times. -* Rewrote adapter layer. - * Removing all classes from `GuzzleHttp\Adapter`, these are now - implemented as callables that are stored in `GuzzleHttp\Ring\Client`. - * Removed the concept of "parallel adapters". Sending requests serially or - concurrently is now handled using a single adapter. - * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The - Transaction object now exposes the request, response, and client as public - properties. The getters and setters have been removed. -* Removed the "headers" event. This event was only useful for changing the - body a response once the headers of the response were known. You can implement - a similar behavior in a number of ways. One example might be to use a - FnStream that has access to the transaction being sent. For example, when the - first byte is written, you could check if the response headers match your - expectations, and if so, change the actual stream body that is being - written to. -* Removed the `asArray` parameter from - `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header - value as an array, then use the newly added `getHeaderAsArray()` method of - `MessageInterface`. This change makes the Guzzle interfaces compatible with - the PSR-7 interfaces. -* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add - custom request options using double-dispatch (this was an implementation - detail). Instead, you should now provide an associative array to the - constructor which is a mapping of the request option name mapping to a - function that applies the option value to a request. -* Removed the concept of "throwImmediately" from exceptions and error events. - This control mechanism was used to stop a transfer of concurrent requests - from completing. This can now be handled by throwing the exception or by - cancelling a pool of requests or each outstanding future request individually. -* Updated to "GuzzleHttp\Streams" 3.0. - * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a - `maxLen` parameter. This update makes the Guzzle streams project - compatible with the current PSR-7 proposal. - * `GuzzleHttp\Stream\Stream::__construct`, - `GuzzleHttp\Stream\Stream::factory`, and - `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second - argument. They now accept an associative array of options, including the - "size" key and "metadata" key which can be used to provide custom metadata. - - -## 4.2.2 - 2014-09-08 - -* Fixed a memory leak in the CurlAdapter when reusing cURL handles. -* No longer using `request_fulluri` in stream adapter proxies. -* Relative redirects are now based on the last response, not the first response. - -## 4.2.1 - 2014-08-19 - -* Ensuring that the StreamAdapter does not always add a Content-Type header -* Adding automated github releases with a phar and zip - -## 4.2.0 - 2014-08-17 - -* Now merging in default options using a case-insensitive comparison. - Closes https://github.com/guzzle/guzzle/issues/767 -* Added the ability to automatically decode `Content-Encoding` response bodies - using the `decode_content` request option. This is set to `true` by default - to decode the response body if it comes over the wire with a - `Content-Encoding`. Set this value to `false` to disable decoding the - response content, and pass a string to provide a request `Accept-Encoding` - header and turn on automatic response decoding. This feature now allows you - to pass an `Accept-Encoding` header in the headers of a request but still - disable automatic response decoding. - Closes https://github.com/guzzle/guzzle/issues/764 -* Added the ability to throw an exception immediately when transferring - requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 -* Updating guzzlehttp/streams dependency to ~2.1 -* No longer utilizing the now deprecated namespaced methods from the stream - package. - -## 4.1.8 - 2014-08-14 - -* Fixed an issue in the CurlFactory that caused setting the `stream=false` - request option to throw an exception. - See: https://github.com/guzzle/guzzle/issues/769 -* TransactionIterator now calls rewind on the inner iterator. - See: https://github.com/guzzle/guzzle/pull/765 -* You can now set the `Content-Type` header to `multipart/form-data` - when creating POST requests to force multipart bodies. - See https://github.com/guzzle/guzzle/issues/768 - -## 4.1.7 - 2014-08-07 - -* Fixed an error in the HistoryPlugin that caused the same request and response - to be logged multiple times when an HTTP protocol error occurs. -* Ensuring that cURL does not add a default Content-Type when no Content-Type - has been supplied by the user. This prevents the adapter layer from modifying - the request that is sent over the wire after any listeners may have already - put the request in a desired state (e.g., signed the request). -* Throwing an exception when you attempt to send requests that have the - "stream" set to true in parallel using the MultiAdapter. -* Only calling curl_multi_select when there are active cURL handles. This was - previously changed and caused performance problems on some systems due to PHP - always selecting until the maximum select timeout. -* Fixed a bug where multipart/form-data POST fields were not correctly - aggregated (e.g., values with "&"). - -## 4.1.6 - 2014-08-03 - -* Added helper methods to make it easier to represent messages as strings, - including getting the start line and getting headers as a string. - -## 4.1.5 - 2014-08-02 - -* Automatically retrying cURL "Connection died, retrying a fresh connect" - errors when possible. -* cURL implementation cleanup -* Allowing multiple event subscriber listeners to be registered per event by - passing an array of arrays of listener configuration. - -## 4.1.4 - 2014-07-22 - -* Fixed a bug that caused multi-part POST requests with more than one field to - serialize incorrectly. -* Paths can now be set to "0" -* `ResponseInterface::xml` now accepts a `libxml_options` option and added a - missing default argument that was required when parsing XML response bodies. -* A `save_to` stream is now created lazily, which means that files are not - created on disk unless a request succeeds. - -## 4.1.3 - 2014-07-15 - -* Various fixes to multipart/form-data POST uploads -* Wrapping function.php in an if-statement to ensure Guzzle can be used - globally and in a Composer install -* Fixed an issue with generating and merging in events to an event array -* POST headers are only applied before sending a request to allow you to change - the query aggregator used before uploading -* Added much more robust query string parsing -* Fixed various parsing and normalization issues with URLs -* Fixing an issue where multi-valued headers were not being utilized correctly - in the StreamAdapter - -## 4.1.2 - 2014-06-18 - -* Added support for sending payloads with GET requests - -## 4.1.1 - 2014-06-08 - -* Fixed an issue related to using custom message factory options in subclasses -* Fixed an issue with nested form fields in a multi-part POST -* Fixed an issue with using the `json` request option for POST requests -* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` - -## 4.1.0 - 2014-05-27 - -* Added a `json` request option to easily serialize JSON payloads. -* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. -* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. -* Added the ability to provide an emitter to a client in the client constructor. -* Added the ability to persist a cookie session using $_SESSION. -* Added a trait that can be used to add event listeners to an iterator. -* Removed request method constants from RequestInterface. -* Fixed warning when invalid request start-lines are received. -* Updated MessageFactory to work with custom request option methods. -* Updated cacert bundle to latest build. - -4.0.2 (2014-04-16) ------------------- - -* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) -* Added the ability to set scalars as POST fields (#628) - -## 4.0.1 - 2014-04-04 - -* The HTTP status code of a response is now set as the exception code of - RequestException objects. -* 303 redirects will now correctly switch from POST to GET requests. -* The default parallel adapter of a client now correctly uses the MultiAdapter. -* HasDataTrait now initializes the internal data array as an empty array so - that the toArray() method always returns an array. - -## 4.0.0 - 2014-03-29 - -* For information on changes and upgrading, see: - https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 -* Added `GuzzleHttp\batch()` as a convenience function for sending requests in - parallel without needing to write asynchronous code. -* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. - You can now pass a callable or an array of associative arrays where each - associative array contains the "fn", "priority", and "once" keys. - -## 4.0.0.rc-2 - 2014-03-25 - -* Removed `getConfig()` and `setConfig()` from clients to avoid confusion - around whether things like base_url, message_factory, etc. should be able to - be retrieved or modified. -* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface -* functions.php functions were renamed using snake_case to match PHP idioms -* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and - `GUZZLE_CURL_SELECT_TIMEOUT` environment variables -* Added the ability to specify custom `sendAll()` event priorities -* Added the ability to specify custom stream context options to the stream - adapter. -* Added a functions.php function for `get_path()` and `set_path()` -* CurlAdapter and MultiAdapter now use a callable to generate curl resources -* MockAdapter now properly reads a body and emits a `headers` event -* Updated Url class to check if a scheme and host are set before adding ":" - and "//". This allows empty Url (e.g., "") to be serialized as "". -* Parsing invalid XML no longer emits warnings -* Curl classes now properly throw AdapterExceptions -* Various performance optimizations -* Streams are created with the faster `Stream\create()` function -* Marked deprecation_proxy() as internal -* Test server is now a collection of static methods on a class - -## 4.0.0-rc.1 - 2014-03-15 - -* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 - -## 3.8.1 - 2014-01-28 - -* Bug: Always using GET requests when redirecting from a 303 response -* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in - `Guzzle\Http\ClientInterface::setSslVerification()` -* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL -* Bug: The body of a request can now be set to `"0"` -* Sending PHP stream requests no longer forces `HTTP/1.0` -* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of - each sub-exception -* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than - clobbering everything). -* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) -* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. - For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. -* Now properly escaping the regular expression delimiter when matching Cookie domains. -* Network access is now disabled when loading XML documents - -## 3.8.0 - 2013-12-05 - -* Added the ability to define a POST name for a file -* JSON response parsing now properly walks additionalProperties -* cURL error code 18 is now retried automatically in the BackoffPlugin -* Fixed a cURL error when URLs contain fragments -* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were - CurlExceptions -* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) -* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` -* Fixed a bug that was encountered when parsing empty header parameters -* UriTemplate now has a `setRegex()` method to match the docs -* The `debug` request parameter now checks if it is truthy rather than if it exists -* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin -* Added the ability to combine URLs using strict RFC 3986 compliance -* Command objects can now return the validation errors encountered by the command -* Various fixes to cache revalidation (#437 and 29797e5) -* Various fixes to the AsyncPlugin -* Cleaned up build scripts - -## 3.7.4 - 2013-10-02 - -* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) -* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp - (see https://github.com/aws/aws-sdk-php/issues/147) -* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots -* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) -* Updated the bundled cacert.pem (#419) -* OauthPlugin now supports adding authentication to headers or query string (#425) - -## 3.7.3 - 2013-09-08 - -* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and - `CommandTransferException`. -* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description -* Schemas are only injected into response models when explicitly configured. -* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of - an EntityBody. -* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. -* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. -* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() -* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin -* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests -* Bug fix: Properly parsing headers that contain commas contained in quotes -* Bug fix: mimetype guessing based on a filename is now case-insensitive - -## 3.7.2 - 2013-08-02 - -* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander - See https://github.com/guzzle/guzzle/issues/371 -* Bug fix: Cookie domains are now matched correctly according to RFC 6265 - See https://github.com/guzzle/guzzle/issues/377 -* Bug fix: GET parameters are now used when calculating an OAuth signature -* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted -* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched -* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. - See https://github.com/guzzle/guzzle/issues/379 -* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See - https://github.com/guzzle/guzzle/pull/380 -* cURL multi cleanup and optimizations - -## 3.7.1 - 2013-07-05 - -* Bug fix: Setting default options on a client now works -* Bug fix: Setting options on HEAD requests now works. See #352 -* Bug fix: Moving stream factory before send event to before building the stream. See #353 -* Bug fix: Cookies no longer match on IP addresses per RFC 6265 -* Bug fix: Correctly parsing header parameters that are in `<>` and quotes -* Added `cert` and `ssl_key` as request options -* `Host` header can now diverge from the host part of a URL if the header is set manually -* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter -* OAuth parameters are only added via the plugin if they aren't already set -* Exceptions are now thrown when a URL cannot be parsed -* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails -* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin - -## 3.7.0 - 2013-06-10 - -* See UPGRADING.md for more information on how to upgrade. -* Requests now support the ability to specify an array of $options when creating a request to more easily modify a - request. You can pass a 'request.options' configuration setting to a client to apply default request options to - every request created by a client (e.g. default query string variables, headers, curl options, etc.). -* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. - See `Guzzle\Http\StaticClient::mount`. -* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests - created by a command (e.g. custom headers, query string variables, timeout settings, etc.). -* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the - headers of a response -* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key - (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) -* ServiceBuilders now support storing and retrieving arbitrary data -* CachePlugin can now purge all resources for a given URI -* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource -* CachePlugin now uses the Vary header to determine if a resource is a cache hit -* `Guzzle\Http\Message\Response` now implements `\Serializable` -* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters -* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable -* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` -* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size -* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message -* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older - Symfony users can still use the old version of Monolog. -* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. - Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. -* Several performance improvements to `Guzzle\Common\Collection` -* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -* Added `Guzzle\Stream\StreamInterface::isRepeatable` -* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. -* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. -* Removed `Guzzle\Http\ClientInterface::expandTemplate()` -* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` -* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` -* Removed `Guzzle\Http\Message\RequestInterface::canCache` -* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` -* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` -* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. -* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting - `Guzzle\Common\Version::$emitWarnings` to true. -* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use - `$request->getResponseBody()->isRepeatable()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. - These will work through Guzzle 4.0 -* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. -* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. -* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. -* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -* Marked `Guzzle\Common\Collection::inject()` as deprecated. -* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` -* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -* Always setting X-cache headers on cached responses -* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -* Added `CacheStorageInterface::purge($url)` -* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -## 3.6.0 - 2013-05-29 - -* ServiceDescription now implements ToArrayInterface -* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters -* Guzzle can now correctly parse incomplete URLs -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess -* Added the ability to cast Model objects to a string to view debug information. - -## 3.5.0 - 2013-05-13 - -* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times -* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove - itself from the EventDispatcher) -* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values -* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too -* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a - non-existent key -* Bug: All __call() method arguments are now required (helps with mocking frameworks) -* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference - to help with refcount based garbage collection of resources created by sending a request -* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. -* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the - HistoryPlugin for a history. -* Added a `responseBody` alias for the `response_body` location -* Refactored internals to no longer rely on Response::getRequest() -* HistoryPlugin can now be cast to a string -* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests - and responses that are sent over the wire -* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects - -## 3.4.3 - 2013-04-30 - -* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response -* Added a check to re-extract the temp cacert bundle from the phar before sending each request - -## 3.4.2 - 2013-04-29 - -* Bug fix: Stream objects now work correctly with "a" and "a+" modes -* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present -* Bug fix: AsyncPlugin no longer forces HEAD requests -* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter -* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails -* Setting a response on a request will write to the custom request body from the response body if one is specified -* LogPlugin now writes to php://output when STDERR is undefined -* Added the ability to set multiple POST files for the same key in a single call -* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default -* Added the ability to queue CurlExceptions to the MockPlugin -* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) -* Configuration loading now allows remote files - -## 3.4.1 - 2013-04-16 - -* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti - handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. -* Exceptions are now properly grouped when sending requests in parallel -* Redirects are now properly aggregated when a multi transaction fails -* Redirects now set the response on the original object even in the event of a failure -* Bug fix: Model names are now properly set even when using $refs -* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax -* Added support for oauth_callback in OAuth signatures -* Added support for oauth_verifier in OAuth signatures -* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection - -## 3.4.0 - 2013-04-11 - -* Bug fix: URLs are now resolved correctly based on https://tools.ietf.org/html/rfc3986#section-5.2. #289 -* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 -* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 -* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. -* Bug fix: Added `number` type to service descriptions. -* Bug fix: empty parameters are removed from an OAuth signature -* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header -* Bug fix: Fixed "array to string" error when validating a union of types in a service description -* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream -* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. -* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. -* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. -* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if - the Content-Type can be determined based on the entity body or the path of the request. -* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. -* Added support for a PSR-3 LogAdapter. -* Added a `command.after_prepare` event -* Added `oauth_callback` parameter to the OauthPlugin -* Added the ability to create a custom stream class when using a stream factory -* Added a CachingEntityBody decorator -* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. -* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. -* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies -* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This - means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use - POST fields or files (the latter is only used when emulating a form POST in the browser). -* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest - -## 3.3.1 - 2013-03-10 - -* Added the ability to create PHP streaming responses from HTTP requests -* Bug fix: Running any filters when parsing response headers with service descriptions -* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing -* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across - response location visitors. -* Bug fix: Removed the possibility of creating configuration files with circular dependencies -* RequestFactory::create() now uses the key of a POST file when setting the POST file name -* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set - -## 3.3.0 - 2013-03-03 - -* A large number of performance optimizations have been made -* Bug fix: Added 'wb' as a valid write mode for streams -* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned -* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` -* BC: Removed `Guzzle\Http\Utils` class -* BC: Setting a service description on a client will no longer modify the client's command factories. -* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using - the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' -* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to - lowercase -* Operation parameter objects are now lazy loaded internally -* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses -* Added support for instantiating responseType=class responseClass classes. Classes must implement - `Guzzle\Service\Command\ResponseClassInterface` -* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These - additional properties also support locations and can be used to parse JSON responses where the outermost part of the - JSON is an array -* Added support for nested renaming of JSON models (rename sentAs to name) -* CachePlugin - * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error - * Debug headers can now added to cached response in the CachePlugin - -## 3.2.0 - 2013-02-14 - -* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. -* URLs with no path no longer contain a "/" by default -* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. -* BadResponseException no longer includes the full request and response message -* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface -* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface -* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription -* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list -* xmlEncoding can now be customized for the XML declaration of a XML service description operation -* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value - aggregation and no longer uses callbacks -* The URL encoding implementation of Guzzle\Http\QueryString can now be customized -* Bug fix: Filters were not always invoked for array service description parameters -* Bug fix: Redirects now use a target response body rather than a temporary response body -* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded -* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives - -## 3.1.2 - 2013-01-27 - -* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the - response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. -* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent -* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) -* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() -* Setting default headers on a client after setting the user-agent will not erase the user-agent setting - -## 3.1.1 - 2013-01-20 - -* Adding wildcard support to Guzzle\Common\Collection::getPath() -* Adding alias support to ServiceBuilder configs -* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface - -## 3.1.0 - 2013-01-12 - -* BC: CurlException now extends from RequestException rather than BadResponseException -* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() -* Added getData to ServiceDescriptionInterface -* Added context array to RequestInterface::setState() -* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http -* Bug: Adding required content-type when JSON request visitor adds JSON to a command -* Bug: Fixing the serialization of a service description with custom data -* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing - an array of successful and failed responses -* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection -* Added Guzzle\Http\IoEmittingEntityBody -* Moved command filtration from validators to location visitors -* Added `extends` attributes to service description parameters -* Added getModels to ServiceDescriptionInterface - -## 3.0.7 - 2012-12-19 - -* Fixing phar detection when forcing a cacert to system if null or true -* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` -* Cleaning up `Guzzle\Common\Collection::inject` method -* Adding a response_body location to service descriptions - -## 3.0.6 - 2012-12-09 - -* CurlMulti performance improvements -* Adding setErrorResponses() to Operation -* composer.json tweaks - -## 3.0.5 - 2012-11-18 - -* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin -* Bug: Response body can now be a string containing "0" -* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert -* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs -* Added support for XML attributes in service description responses -* DefaultRequestSerializer now supports array URI parameter values for URI template expansion -* Added better mimetype guessing to requests and post files - -## 3.0.4 - 2012-11-11 - -* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value -* Bug: Cookies can now be added that have a name, domain, or value set to "0" -* Bug: Using the system cacert bundle when using the Phar -* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures -* Enhanced cookie jar de-duplication -* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added -* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies -* Added the ability to create any sort of hash for a stream rather than just an MD5 hash - -## 3.0.3 - 2012-11-04 - -* Implementing redirects in PHP rather than cURL -* Added PECL URI template extension and using as default parser if available -* Bug: Fixed Content-Length parsing of Response factory -* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. -* Adding ToArrayInterface throughout library -* Fixing OauthPlugin to create unique nonce values per request - -## 3.0.2 - 2012-10-25 - -* Magic methods are enabled by default on clients -* Magic methods return the result of a command -* Service clients no longer require a base_url option in the factory -* Bug: Fixed an issue with URI templates where null template variables were being expanded - -## 3.0.1 - 2012-10-22 - -* Models can now be used like regular collection objects by calling filter, map, etc. -* Models no longer require a Parameter structure or initial data in the constructor -* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` - -## 3.0.0 - 2012-10-15 - -* Rewrote service description format to be based on Swagger - * Now based on JSON schema - * Added nested input structures and nested response models - * Support for JSON and XML input and output models - * Renamed `commands` to `operations` - * Removed dot class notation - * Removed custom types -* Broke the project into smaller top-level namespaces to be more component friendly -* Removed support for XML configs and descriptions. Use arrays or JSON files. -* Removed the Validation component and Inspector -* Moved all cookie code to Guzzle\Plugin\Cookie -* Magic methods on a Guzzle\Service\Client now return the command un-executed. -* Calling getResult() or getResponse() on a command will lazily execute the command if needed. -* Now shipping with cURL's CA certs and using it by default -* Added previousResponse() method to response objects -* No longer sending Accept and Accept-Encoding headers on every request -* Only sending an Expect header by default when a payload is greater than 1MB -* Added/moved client options: - * curl.blacklist to curl.option.blacklist - * Added ssl.certificate_authority -* Added a Guzzle\Iterator component -* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin -* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) -* Added a more robust caching plugin -* Added setBody to response objects -* Updating LogPlugin to use a more flexible MessageFormatter -* Added a completely revamped build process -* Cleaning up Collection class and removing default values from the get method -* Fixed ZF2 cache adapters - -## 2.8.8 - 2012-10-15 - -* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did - -## 2.8.7 - 2012-09-30 - -* Bug: Fixed config file aliases for JSON includes -* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests -* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload -* Bug: Hardening request and response parsing to account for missing parts -* Bug: Fixed PEAR packaging -* Bug: Fixed Request::getInfo -* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail -* Adding the ability for the namespace Iterator factory to look in multiple directories -* Added more getters/setters/removers from service descriptions -* Added the ability to remove POST fields from OAuth signatures -* OAuth plugin now supports 2-legged OAuth - -## 2.8.6 - 2012-09-05 - -* Added the ability to modify and build service descriptions -* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command -* Added a `json` parameter location -* Now allowing dot notation for classes in the CacheAdapterFactory -* Using the union of two arrays rather than an array_merge when extending service builder services and service params -* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references - in service builder config files. -* Services defined in two different config files that include one another will by default replace the previously - defined service, but you can now create services that extend themselves and merge their settings over the previous -* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like - '_default' with a default JSON configuration file. - -## 2.8.5 - 2012-08-29 - -* Bug: Suppressed empty arrays from URI templates -* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching -* Added support for HTTP responses that do not contain a reason phrase in the start-line -* AbstractCommand commands are now invokable -* Added a way to get the data used when signing an Oauth request before a request is sent - -## 2.8.4 - 2012-08-15 - -* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin -* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. -* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream -* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream -* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) -* Added additional response status codes -* Removed SSL information from the default User-Agent header -* DELETE requests can now send an entity body -* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries -* Added the ability of the MockPlugin to consume mocked request bodies -* LogPlugin now exposes request and response objects in the extras array - -## 2.8.3 - 2012-07-30 - -* Bug: Fixed a case where empty POST requests were sent as GET requests -* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body -* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new -* Added multiple inheritance to service description commands -* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` -* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything -* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles - -## 2.8.2 - 2012-07-24 - -* Bug: Query string values set to 0 are no longer dropped from the query string -* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` -* Bug: `+` is now treated as an encoded space when parsing query strings -* QueryString and Collection performance improvements -* Allowing dot notation for class paths in filters attribute of a service descriptions - -## 2.8.1 - 2012-07-16 - -* Loosening Event Dispatcher dependency -* POST redirects can now be customized using CURLOPT_POSTREDIR - -## 2.8.0 - 2012-07-15 - -* BC: Guzzle\Http\Query - * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) - * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() - * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) - * Changed the aggregation functions of QueryString to be static methods - * Can now use fromString() with querystrings that have a leading ? -* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters -* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body -* Cookies are no longer URL decoded by default -* Bug: URI template variables set to null are no longer expanded - -## 2.7.2 - 2012-07-02 - -* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. -* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() -* CachePlugin now allows for a custom request parameter function to check if a request can be cached -* Bug fix: CachePlugin now only caches GET and HEAD requests by default -* Bug fix: Using header glue when transferring headers over the wire -* Allowing deeply nested arrays for composite variables in URI templates -* Batch divisors can now return iterators or arrays - -## 2.7.1 - 2012-06-26 - -* Minor patch to update version number in UA string -* Updating build process - -## 2.7.0 - 2012-06-25 - -* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. -* BC: Removed magic setX methods from commands -* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method -* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. -* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) -* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace -* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin -* Added the ability to set POST fields and files in a service description -* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method -* Adding a command.before_prepare event to clients -* Added BatchClosureTransfer and BatchClosureDivisor -* BatchTransferException now includes references to the batch divisor and transfer strategies -* Fixed some tests so that they pass more reliably -* Added Guzzle\Common\Log\ArrayLogAdapter - -## 2.6.6 - 2012-06-10 - -* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin -* BC: Removing Guzzle\Service\Command\CommandSet -* Adding generic batching system (replaces the batch queue plugin and command set) -* Updating ZF cache and log adapters and now using ZF's composer repository -* Bug: Setting the name of each ApiParam when creating through an ApiCommand -* Adding result_type, result_doc, deprecated, and doc_url to service descriptions -* Bug: Changed the default cookie header casing back to 'Cookie' - -## 2.6.5 - 2012-06-03 - -* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() -* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from -* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data -* BC: Renaming methods in the CookieJarInterface -* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations -* Making the default glue for HTTP headers ';' instead of ',' -* Adding a removeValue to Guzzle\Http\Message\Header -* Adding getCookies() to request interface. -* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() - -## 2.6.4 - 2012-05-30 - -* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. -* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand -* Bug: Fixing magic method command calls on clients -* Bug: Email constraint only validates strings -* Bug: Aggregate POST fields when POST files are present in curl handle -* Bug: Fixing default User-Agent header -* Bug: Only appending or prepending parameters in commands if they are specified -* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes -* Allowing the use of dot notation for class namespaces when using instance_of constraint -* Added any_match validation constraint -* Added an AsyncPlugin -* Passing request object to the calculateWait method of the ExponentialBackoffPlugin -* Allowing the result of a command object to be changed -* Parsing location and type sub values when instantiating a service description rather than over and over at runtime - -## 2.6.3 - 2012-05-23 - -* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. -* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. -* You can now use an array of data when creating PUT request bodies in the request factory. -* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. -* [Http] Adding support for Content-Type in multipart POST uploads per upload -* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) -* Adding more POST data operations for easier manipulation of POST data. -* You can now set empty POST fields. -* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. -* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. -* CS updates - -## 2.6.2 - 2012-05-19 - -* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. - -## 2.6.1 - 2012-05-19 - -* [BC] Removing 'path' support in service descriptions. Use 'uri'. -* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. -* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. -* [BC] Removing Guzzle\Common\XmlElement. -* All commands, both dynamic and concrete, have ApiCommand objects. -* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. -* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. -* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. - -## 2.6.0 - 2012-05-15 - -* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder -* [BC] Executing a Command returns the result of the command rather than the command -* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. -* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. -* [BC] Moving ResourceIterator* to Guzzle\Service\Resource -* [BC] Completely refactored ResourceIterators to iterate over a cloned command object -* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate -* [BC] Guzzle\Guzzle is now deprecated -* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject -* Adding Guzzle\Version class to give version information about Guzzle -* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() -* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data -* ServiceDescription and ServiceBuilder are now cacheable using similar configs -* Changing the format of XML and JSON service builder configs. Backwards compatible. -* Cleaned up Cookie parsing -* Trimming the default Guzzle User-Agent header -* Adding a setOnComplete() method to Commands that is called when a command completes -* Keeping track of requests that were mocked in the MockPlugin -* Fixed a caching bug in the CacheAdapterFactory -* Inspector objects can be injected into a Command object -* Refactoring a lot of code and tests to be case insensitive when dealing with headers -* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL -* Adding the ability to set global option overrides to service builder configs -* Adding the ability to include other service builder config files from within XML and JSON files -* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. - -## 2.5.0 - 2012-05-08 - -* Major performance improvements -* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. -* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. -* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" -* Added the ability to passed parameters to all requests created by a client -* Added callback functionality to the ExponentialBackoffPlugin -* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. -* Rewinding request stream bodies when retrying requests -* Exception is thrown when JSON response body cannot be decoded -* Added configurable magic method calls to clients and commands. This is off by default. -* Fixed a defect that added a hash to every parsed URL part -* Fixed duplicate none generation for OauthPlugin. -* Emitting an event each time a client is generated by a ServiceBuilder -* Using an ApiParams object instead of a Collection for parameters of an ApiCommand -* cache.* request parameters should be renamed to params.cache.* -* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. -* Added the ability to disable type validation of service descriptions -* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/lib/guzzlehttp/guzzle/LICENSE b/lib/guzzlehttp/guzzle/LICENSE deleted file mode 100644 index fd2375d88..000000000 --- a/lib/guzzlehttp/guzzle/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2011 Michael Dowling -Copyright (c) 2012 Jeremy Lindblom -Copyright (c) 2014 Graham Campbell -Copyright (c) 2015 Márk Sági-Kazár -Copyright (c) 2015 Tobias Schultze -Copyright (c) 2016 Tobias Nyholm -Copyright (c) 2016 George Mponos - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/guzzlehttp/guzzle/README.md b/lib/guzzlehttp/guzzle/README.md deleted file mode 100644 index 0786462b3..000000000 --- a/lib/guzzlehttp/guzzle/README.md +++ /dev/null @@ -1,94 +0,0 @@ -![Guzzle](.github/logo.png?raw=true) - -# Guzzle, PHP HTTP client - -[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) -[![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) -[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) - -Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and -trivial to integrate with web services. - -- Simple interface for building query strings, POST requests, streaming large - uploads, streaming large downloads, using HTTP cookies, uploading JSON data, - etc... -- Can send both synchronous and asynchronous requests using the same interface. -- Uses PSR-7 interfaces for requests, responses, and streams. This allows you - to utilize other PSR-7 compatible libraries with Guzzle. -- Supports PSR-18 allowing interoperability between other PSR-18 HTTP Clients. -- Abstracts away the underlying HTTP transport, allowing you to write - environment and transport agnostic code; i.e., no hard dependency on cURL, - PHP streams, sockets, or non-blocking event loops. -- Middleware system allows you to augment and compose client behavior. - -```php -$client = new \GuzzleHttp\Client(); -$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); - -echo $response->getStatusCode(); // 200 -echo $response->getHeaderLine('content-type'); // 'application/json; charset=utf8' -echo $response->getBody(); // '{"id": 1420053, "name": "guzzle", ...}' - -// Send an asynchronous request. -$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); -$promise = $client->sendAsync($request)->then(function ($response) { - echo 'I completed! ' . $response->getBody(); -}); - -$promise->wait(); -``` - -## Help and docs - -We use GitHub issues only to discuss bugs and new features. For support please refer to: - -- [Documentation](https://docs.guzzlephp.org) -- [Stack Overflow](https://stackoverflow.com/questions/tagged/guzzle) -- [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](https://slack.httplug.io/) -- [Gitter](https://gitter.im/guzzle/guzzle) - - -## Installing Guzzle - -The recommended way to install Guzzle is through -[Composer](https://getcomposer.org/). - -```bash -composer require guzzlehttp/guzzle -``` - - -## Version Guidance - -| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | -|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------| -| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | -| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | -| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | -| 6.x | Security fixes only | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | -| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.3 | - -[guzzle-3-repo]: https://github.com/guzzle/guzzle3 -[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x -[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 -[guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5 -[guzzle-7-repo]: https://github.com/guzzle/guzzle -[guzzle-3-docs]: https://guzzle3.readthedocs.io/ -[guzzle-5-docs]: https://docs.guzzlephp.org/en/5.3/ -[guzzle-6-docs]: https://docs.guzzlephp.org/en/6.5/ -[guzzle-7-docs]: https://docs.guzzlephp.org/en/latest/ - - -## Security - -If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/guzzle/security/policy) for more information. - -## License - -Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. - -## For Enterprise - -Available as part of the Tidelift Subscription - -The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-guzzle?utm_source=packagist-guzzlehttp-guzzle&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/lib/guzzlehttp/guzzle/UPGRADING.md b/lib/guzzlehttp/guzzle/UPGRADING.md deleted file mode 100644 index 45417a7e1..000000000 --- a/lib/guzzlehttp/guzzle/UPGRADING.md +++ /dev/null @@ -1,1253 +0,0 @@ -Guzzle Upgrade Guide -==================== - -6.0 to 7.0 ----------- - -In order to take advantage of the new features of PHP, Guzzle dropped the support -of PHP 5. The minimum supported PHP version is now PHP 7.2. Type hints and return -types for functions and methods have been added wherever possible. - -Please make sure: -- You are calling a function or a method with the correct type. -- If you extend a class of Guzzle; update all signatures on methods you override. - -#### Other backwards compatibility breaking changes - -- Class `GuzzleHttp\UriTemplate` is removed. -- Class `GuzzleHttp\Exception\SeekException` is removed. -- Classes `GuzzleHttp\Exception\BadResponseException`, `GuzzleHttp\Exception\ClientException`, - `GuzzleHttp\Exception\ServerException` can no longer be initialized with an empty - Response as argument. -- Class `GuzzleHttp\Exception\ConnectException` now extends `GuzzleHttp\Exception\TransferException` - instead of `GuzzleHttp\Exception\RequestException`. -- Function `GuzzleHttp\Exception\ConnectException::getResponse()` is removed. -- Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed. -- Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead. -- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed. - Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative. -- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed. -- Request option `exception` is removed. Please use `http_errors`. -- Request option `save_to` is removed. Please use `sink`. -- Pool option `pool_size` is removed. Please use `concurrency`. -- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility. -- The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation. -- The `log` middleware will log the errors with level `error` instead of `notice` -- Support for international domain names (IDN) is now disabled by default, and enabling it requires installing ext-intl, linked against a modern version of the C library (ICU 4.6 or higher). - -#### Native functions calls - -All internal native functions calls of Guzzle are now prefixed with a slash. This -change makes it impossible for method overloading by other libraries or applications. -Example: - -```php -// Before: -curl_version(); - -// After: -\curl_version(); -``` - -For the full diff you can check [here](https://github.com/guzzle/guzzle/compare/6.5.4..master). - -5.0 to 6.0 ----------- - -Guzzle now uses [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages. -Due to the fact that these messages are immutable, this prompted a refactoring -of Guzzle to use a middleware based system rather than an event system. Any -HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be -updated to work with the new immutable PSR-7 request and response objects. Any -event listeners or subscribers need to be updated to become middleware -functions that wrap handlers (or are injected into a -`GuzzleHttp\HandlerStack`). - -- Removed `GuzzleHttp\BatchResults` -- Removed `GuzzleHttp\Collection` -- Removed `GuzzleHttp\HasDataTrait` -- Removed `GuzzleHttp\ToArrayInterface` -- The `guzzlehttp/streams` dependency has been removed. Stream functionality - is now present in the `GuzzleHttp\Psr7` namespace provided by the - `guzzlehttp/psr7` package. -- Guzzle no longer uses ReactPHP promises and now uses the - `guzzlehttp/promises` library. We use a custom promise library for three - significant reasons: - 1. React promises (at the time of writing this) are recursive. Promise - chaining and promise resolution will eventually blow the stack. Guzzle - promises are not recursive as they use a sort of trampolining technique. - Note: there has been movement in the React project to modify promises to - no longer utilize recursion. - 2. Guzzle needs to have the ability to synchronously block on a promise to - wait for a result. Guzzle promises allows this functionality (and does - not require the use of recursion). - 3. Because we need to be able to wait on a result, doing so using React - promises requires wrapping react promises with RingPHP futures. This - overhead is no longer needed, reducing stack sizes, reducing complexity, - and improving performance. -- `GuzzleHttp\Mimetypes` has been moved to a function in - `GuzzleHttp\Psr7\mimetype_from_extension` and - `GuzzleHttp\Psr7\mimetype_from_filename`. -- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query - strings must now be passed into request objects as strings, or provided to - the `query` request option when creating requests with clients. The `query` - option uses PHP's `http_build_query` to convert an array to a string. If you - need a different serialization technique, you will need to pass the query - string in as a string. There are a couple helper functions that will make - working with query strings easier: `GuzzleHttp\Psr7\parse_query` and - `GuzzleHttp\Psr7\build_query`. -- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware - system based on PSR-7, using RingPHP and it's middleware system as well adds - more complexity than the benefits it provides. All HTTP handlers that were - present in RingPHP have been modified to work directly with PSR-7 messages - and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces - complexity in Guzzle, removes a dependency, and improves performance. RingPHP - will be maintained for Guzzle 5 support, but will no longer be a part of - Guzzle 6. -- As Guzzle now uses a middleware based systems the event system and RingPHP - integration has been removed. Note: while the event system has been removed, - it is possible to add your own type of event system that is powered by the - middleware system. - - Removed the `Event` namespace. - - Removed the `Subscriber` namespace. - - Removed `Transaction` class - - Removed `RequestFsm` - - Removed `RingBridge` - - `GuzzleHttp\Subscriber\Cookie` is now provided by - `GuzzleHttp\Middleware::cookies` - - `GuzzleHttp\Subscriber\HttpError` is now provided by - `GuzzleHttp\Middleware::httpError` - - `GuzzleHttp\Subscriber\History` is now provided by - `GuzzleHttp\Middleware::history` - - `GuzzleHttp\Subscriber\Mock` is now provided by - `GuzzleHttp\Handler\MockHandler` - - `GuzzleHttp\Subscriber\Prepare` is now provided by - `GuzzleHttp\PrepareBodyMiddleware` - - `GuzzleHttp\Subscriber\Redirect` is now provided by - `GuzzleHttp\RedirectMiddleware` -- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in - `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. -- Static functions in `GuzzleHttp\Utils` have been moved to namespaced - functions under the `GuzzleHttp` namespace. This requires either a Composer - based autoloader or you to include functions.php. -- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to - `GuzzleHttp\ClientInterface::getConfig`. -- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. -- The `json` and `xml` methods of response objects has been removed. With the - migration to strictly adhering to PSR-7 as the interface for Guzzle messages, - adding methods to message interfaces would actually require Guzzle messages - to extend from PSR-7 messages rather then work with them directly. - -## Migrating to middleware - -The change to PSR-7 unfortunately required significant refactoring to Guzzle -due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event -system from plugins. The event system relied on mutability of HTTP messages and -side effects in order to work. With immutable messages, you have to change your -workflow to become more about either returning a value (e.g., functional -middlewares) or setting a value on an object. Guzzle v6 has chosen the -functional middleware approach. - -Instead of using the event system to listen for things like the `before` event, -you now create a stack based middleware function that intercepts a request on -the way in and the promise of the response on the way out. This is a much -simpler and more predictable approach than the event system and works nicely -with PSR-7 middleware. Due to the use of promises, the middleware system is -also asynchronous. - -v5: - -```php -use GuzzleHttp\Event\BeforeEvent; -$client = new GuzzleHttp\Client(); -// Get the emitter and listen to the before event. -$client->getEmitter()->on('before', function (BeforeEvent $e) { - // Guzzle v5 events relied on mutation - $e->getRequest()->setHeader('X-Foo', 'Bar'); -}); -``` - -v6: - -In v6, you can modify the request before it is sent using the `mapRequest` -middleware. The idiomatic way in v6 to modify the request/response lifecycle is -to setup a handler middleware stack up front and inject the handler into a -client. - -```php -use GuzzleHttp\Middleware; -// Create a handler stack that has all of the default middlewares attached -$handler = GuzzleHttp\HandlerStack::create(); -// Push the handler onto the handler stack -$handler->push(Middleware::mapRequest(function (RequestInterface $request) { - // Notice that we have to return a request object - return $request->withHeader('X-Foo', 'Bar'); -})); -// Inject the handler into the client -$client = new GuzzleHttp\Client(['handler' => $handler]); -``` - -## POST Requests - -This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) -and `multipart` request options. `form_params` is an associative array of -strings or array of strings and is used to serialize an -`application/x-www-form-urlencoded` POST request. The -[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) -option is now used to send a multipart/form-data POST request. - -`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add -POST files to a multipart/form-data request. - -The `body` option no longer accepts an array to send POST requests. Please use -`multipart` or `form_params` instead. - -The `base_url` option has been renamed to `base_uri`. - -4.x to 5.0 ----------- - -## Rewritten Adapter Layer - -Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send -HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor -is still supported, but it has now been renamed to `handler`. Instead of -passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP -`callable` that follows the RingPHP specification. - -## Removed Fluent Interfaces - -[Fluent interfaces were removed](https://ocramius.github.io/blog/fluent-interfaces-are-evil/) -from the following classes: - -- `GuzzleHttp\Collection` -- `GuzzleHttp\Url` -- `GuzzleHttp\Query` -- `GuzzleHttp\Post\PostBody` -- `GuzzleHttp\Cookie\SetCookie` - -## Removed functions.php - -Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following -functions can be used as replacements. - -- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` -- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` -- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` -- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, - deprecated in favor of using `GuzzleHttp\Pool::batch()`. - -The "procedural" global client has been removed with no replacement (e.g., -`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` -object as a replacement. - -## `throwImmediately` has been removed - -The concept of "throwImmediately" has been removed from exceptions and error -events. This control mechanism was used to stop a transfer of concurrent -requests from completing. This can now be handled by throwing the exception or -by cancelling a pool of requests or each outstanding future request -individually. - -## headers event has been removed - -Removed the "headers" event. This event was only useful for changing the -body a response once the headers of the response were known. You can implement -a similar behavior in a number of ways. One example might be to use a -FnStream that has access to the transaction being sent. For example, when the -first byte is written, you could check if the response headers match your -expectations, and if so, change the actual stream body that is being -written to. - -## Updates to HTTP Messages - -Removed the `asArray` parameter from -`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header -value as an array, then use the newly added `getHeaderAsArray()` method of -`MessageInterface`. This change makes the Guzzle interfaces compatible with -the PSR-7 interfaces. - -3.x to 4.0 ----------- - -## Overarching changes: - -- Now requires PHP 5.4 or greater. -- No longer requires cURL to send requests. -- Guzzle no longer wraps every exception it throws. Only exceptions that are - recoverable are now wrapped by Guzzle. -- Various namespaces have been removed or renamed. -- No longer requiring the Symfony EventDispatcher. A custom event dispatcher - based on the Symfony EventDispatcher is - now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant - speed and functionality improvements). - -Changes per Guzzle 3.x namespace are described below. - -## Batch - -The `Guzzle\Batch` namespace has been removed. This is best left to -third-parties to implement on top of Guzzle's core HTTP library. - -## Cache - -The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement -has been implemented yet, but hoping to utilize a PSR cache interface). - -## Common - -- Removed all of the wrapped exceptions. It's better to use the standard PHP - library for unrecoverable exceptions. -- `FromConfigInterface` has been removed. -- `Guzzle\Common\Version` has been removed. The VERSION constant can be found - at `GuzzleHttp\ClientInterface::VERSION`. - -### Collection - -- `getAll` has been removed. Use `toArray` to convert a collection to an array. -- `inject` has been removed. -- `keySearch` has been removed. -- `getPath` no longer supports wildcard expressions. Use something better like - JMESPath for this. -- `setPath` now supports appending to an existing array via the `[]` notation. - -### Events - -Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses -`GuzzleHttp\Event\Emitter`. - -- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by - `GuzzleHttp\Event\EmitterInterface`. -- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by - `GuzzleHttp\Event\Emitter`. -- `Symfony\Component\EventDispatcher\Event` is replaced by - `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in - `GuzzleHttp\Event\EventInterface`. -- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and - `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the - event emitter of a request, client, etc. now uses the `getEmitter` method - rather than the `getDispatcher` method. - -#### Emitter - -- Use the `once()` method to add a listener that automatically removes itself - the first time it is invoked. -- Use the `listeners()` method to retrieve a list of event listeners rather than - the `getListeners()` method. -- Use `emit()` instead of `dispatch()` to emit an event from an emitter. -- Use `attach()` instead of `addSubscriber()` and `detach()` instead of - `removeSubscriber()`. - -```php -$mock = new Mock(); -// 3.x -$request->getEventDispatcher()->addSubscriber($mock); -$request->getEventDispatcher()->removeSubscriber($mock); -// 4.x -$request->getEmitter()->attach($mock); -$request->getEmitter()->detach($mock); -``` - -Use the `on()` method to add a listener rather than the `addListener()` method. - -```php -// 3.x -$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); -// 4.x -$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); -``` - -## Http - -### General changes - -- The cacert.pem certificate has been moved to `src/cacert.pem`. -- Added the concept of adapters that are used to transfer requests over the - wire. -- Simplified the event system. -- Sending requests in parallel is still possible, but batching is no longer a - concept of the HTTP layer. Instead, you must use the `complete` and `error` - events to asynchronously manage parallel request transfers. -- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. -- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. -- QueryAggregators have been rewritten so that they are simply callable - functions. -- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in - `functions.php` for an easy to use static client instance. -- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from - `GuzzleHttp\Exception\TransferException`. - -### Client - -Calling methods like `get()`, `post()`, `head()`, etc. no longer create and -return a request, but rather creates a request, sends the request, and returns -the response. - -```php -// 3.0 -$request = $client->get('/'); -$response = $request->send(); - -// 4.0 -$response = $client->get('/'); - -// or, to mirror the previous behavior -$request = $client->createRequest('GET', '/'); -$response = $client->send($request); -``` - -`GuzzleHttp\ClientInterface` has changed. - -- The `send` method no longer accepts more than one request. Use `sendAll` to - send multiple requests in parallel. -- `setUserAgent()` has been removed. Use a default request option instead. You - could, for example, do something like: - `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. -- `setSslVerification()` has been removed. Use default request options instead, - like `$client->setConfig('defaults/verify', true)`. - -`GuzzleHttp\Client` has changed. - -- The constructor now accepts only an associative array. You can include a - `base_url` string or array to use a URI template as the base URL of a client. - You can also specify a `defaults` key that is an associative array of default - request options. You can pass an `adapter` to use a custom adapter, - `batch_adapter` to use a custom adapter for sending requests in parallel, or - a `message_factory` to change the factory used to create HTTP requests and - responses. -- The client no longer emits a `client.create_request` event. -- Creating requests with a client no longer automatically utilize a URI - template. You must pass an array into a creational method (e.g., - `createRequest`, `get`, `put`, etc.) in order to expand a URI template. - -### Messages - -Messages no longer have references to their counterparts (i.e., a request no -longer has a reference to it's response, and a response no loger has a -reference to its request). This association is now managed through a -`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to -these transaction objects using request events that are emitted over the -lifecycle of a request. - -#### Requests with a body - -- `GuzzleHttp\Message\EntityEnclosingRequest` and - `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The - separation between requests that contain a body and requests that do not - contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` - handles both use cases. -- Any method that previously accepts a `GuzzleHttp\Response` object now accept a - `GuzzleHttp\Message\ResponseInterface`. -- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to - `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create - both requests and responses and is implemented in - `GuzzleHttp\Message\MessageFactory`. -- POST field and file methods have been removed from the request object. You - must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` - to control the format of a POST body. Requests that are created using a - standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use - a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if - the method is POST and no body is provided. - -```php -$request = $client->createRequest('POST', '/'); -$request->getBody()->setField('foo', 'bar'); -$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); -``` - -#### Headers - -- `GuzzleHttp\Message\Header` has been removed. Header values are now simply - represented by an array of values or as a string. Header values are returned - as a string by default when retrieving a header value from a message. You can - pass an optional argument of `true` to retrieve a header value as an array - of strings instead of a single concatenated string. -- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to - `GuzzleHttp\Post`. This interface has been simplified and now allows the - addition of arbitrary headers. -- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most - of the custom headers are now handled separately in specific - subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has - been updated to properly handle headers that contain parameters (like the - `Link` header). - -#### Responses - -- `GuzzleHttp\Message\Response::getInfo()` and - `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event - system to retrieve this type of information. -- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. -- `GuzzleHttp\Message\Response::getMessage()` has been removed. -- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific - methods have moved to the CacheSubscriber. -- Header specific helper functions like `getContentMd5()` have been removed. - Just use `getHeader('Content-MD5')` instead. -- `GuzzleHttp\Message\Response::setRequest()` and - `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event - system to work with request and response objects as a transaction. -- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the - Redirect subscriber instead. -- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have - been removed. Use `getStatusCode()` instead. - -#### Streaming responses - -Streaming requests can now be created by a client directly, returning a -`GuzzleHttp\Message\ResponseInterface` object that contains a body stream -referencing an open PHP HTTP stream. - -```php -// 3.0 -use Guzzle\Stream\PhpStreamRequestFactory; -$request = $client->get('/'); -$factory = new PhpStreamRequestFactory(); -$stream = $factory->fromRequest($request); -$data = $stream->read(1024); - -// 4.0 -$response = $client->get('/', ['stream' => true]); -// Read some data off of the stream in the response body -$data = $response->getBody()->read(1024); -``` - -#### Redirects - -The `configureRedirects()` method has been removed in favor of a -`allow_redirects` request option. - -```php -// Standard redirects with a default of a max of 5 redirects -$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); - -// Strict redirects with a custom number of redirects -$request = $client->createRequest('GET', '/', [ - 'allow_redirects' => ['max' => 5, 'strict' => true] -]); -``` - -#### EntityBody - -EntityBody interfaces and classes have been removed or moved to -`GuzzleHttp\Stream`. All classes and interfaces that once required -`GuzzleHttp\EntityBodyInterface` now require -`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no -longer uses `GuzzleHttp\EntityBody::factory` but now uses -`GuzzleHttp\Stream\Stream::factory` or even better: -`GuzzleHttp\Stream\create()`. - -- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` -- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` -- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` -- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` -- `Guzzle\Http\IoEmittyinEntityBody` has been removed. - -#### Request lifecycle events - -Requests previously submitted a large number of requests. The number of events -emitted over the lifecycle of a request has been significantly reduced to make -it easier to understand how to extend the behavior of a request. All events -emitted during the lifecycle of a request now emit a custom -`GuzzleHttp\Event\EventInterface` object that contains context providing -methods and a way in which to modify the transaction at that specific point in -time (e.g., intercept the request and set a response on the transaction). - -- `request.before_send` has been renamed to `before` and now emits a - `GuzzleHttp\Event\BeforeEvent` -- `request.complete` has been renamed to `complete` and now emits a - `GuzzleHttp\Event\CompleteEvent`. -- `request.sent` has been removed. Use `complete`. -- `request.success` has been removed. Use `complete`. -- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. -- `request.exception` has been removed. Use `error`. -- `request.receive.status_line` has been removed. -- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to - maintain a status update. -- `curl.callback.write` has been removed. Use a custom `StreamInterface` to - intercept writes. -- `curl.callback.read` has been removed. Use a custom `StreamInterface` to - intercept reads. - -`headers` is a new event that is emitted after the response headers of a -request have been received before the body of the response is downloaded. This -event emits a `GuzzleHttp\Event\HeadersEvent`. - -You can intercept a request and inject a response using the `intercept()` event -of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and -`GuzzleHttp\Event\ErrorEvent` event. - -See: http://docs.guzzlephp.org/en/latest/events.html - -## Inflection - -The `Guzzle\Inflection` namespace has been removed. This is not a core concern -of Guzzle. - -## Iterator - -The `Guzzle\Iterator` namespace has been removed. - -- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and - `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of - Guzzle itself. -- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent - class is shipped with PHP 5.4. -- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because - it's easier to just wrap an iterator in a generator that maps values. - -For a replacement of these iterators, see https://github.com/nikic/iter - -## Log - -The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The -`Guzzle\Log` namespace has been removed. Guzzle now relies on -`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been -moved to `GuzzleHttp\Subscriber\Log\Formatter`. - -## Parser - -The `Guzzle\Parser` namespace has been removed. This was previously used to -make it possible to plug in custom parsers for cookies, messages, URI -templates, and URLs; however, this level of complexity is not needed in Guzzle -so it has been removed. - -- Cookie: Cookie parsing logic has been moved to - `GuzzleHttp\Cookie\SetCookie::fromString`. -- Message: Message parsing logic for both requests and responses has been moved - to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only - used in debugging or deserializing messages, so it doesn't make sense for - Guzzle as a library to add this level of complexity to parsing messages. -- UriTemplate: URI template parsing has been moved to - `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL - URI template library if it is installed. -- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously - it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, - then developers are free to subclass `GuzzleHttp\Url`. - -## Plugin - -The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. -Several plugins are shipping with the core Guzzle library under this namespace. - -- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar - code has moved to `GuzzleHttp\Cookie`. -- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. -- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is - received. -- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. -- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before - sending. This subscriber is attached to all requests by default. -- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. - -The following plugins have been removed (third-parties are free to re-implement -these if needed): - -- `GuzzleHttp\Plugin\Async` has been removed. -- `GuzzleHttp\Plugin\CurlAuth` has been removed. -- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This - functionality should instead be implemented with event listeners that occur - after normal response parsing occurs in the guzzle/command package. - -The following plugins are not part of the core Guzzle package, but are provided -in separate repositories: - -- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler - to build custom retry policies using simple functions rather than various - chained classes. See: https://github.com/guzzle/retry-subscriber -- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to - https://github.com/guzzle/cache-subscriber -- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to - https://github.com/guzzle/log-subscriber -- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to - https://github.com/guzzle/message-integrity-subscriber -- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to - `GuzzleHttp\Subscriber\MockSubscriber`. -- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to - https://github.com/guzzle/oauth-subscriber - -## Service - -The service description layer of Guzzle has moved into two separate packages: - -- http://github.com/guzzle/command Provides a high level abstraction over web - services by representing web service operations using commands. -- http://github.com/guzzle/guzzle-services Provides an implementation of - guzzle/command that provides request serialization and response parsing using - Guzzle service descriptions. - -## Stream - -Stream have moved to a separate package available at -https://github.com/guzzle/streams. - -`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take -on the responsibilities of `Guzzle\Http\EntityBody` and -`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number -of methods implemented by the `StreamInterface` has been drastically reduced to -allow developers to more easily extend and decorate stream behavior. - -## Removed methods from StreamInterface - -- `getStream` and `setStream` have been removed to better encapsulate streams. -- `getMetadata` and `setMetadata` have been removed in favor of - `GuzzleHttp\Stream\MetadataStreamInterface`. -- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been - removed. This data is accessible when - using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. -- `rewind` has been removed. Use `seek(0)` for a similar behavior. - -## Renamed methods - -- `detachStream` has been renamed to `detach`. -- `feof` has been renamed to `eof`. -- `ftell` has been renamed to `tell`. -- `readLine` has moved from an instance method to a static class method of - `GuzzleHttp\Stream\Stream`. - -## Metadata streams - -`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams -that contain additional metadata accessible via `getMetadata()`. -`GuzzleHttp\Stream\StreamInterface::getMetadata` and -`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. - -## StreamRequestFactory - -The entire concept of the StreamRequestFactory has been removed. The way this -was used in Guzzle 3 broke the actual interface of sending streaming requests -(instead of getting back a Response, you got a StreamInterface). Streaming -PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. - -3.6 to 3.7 ----------- - -### Deprecations - -- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: - -```php -\Guzzle\Common\Version::$emitWarnings = true; -``` - -The following APIs and options have been marked as deprecated: - -- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -- Marked `Guzzle\Common\Collection::inject()` as deprecated. -- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use - `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or - `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` - -3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational -request methods. When paired with a client's configuration settings, these options allow you to specify default settings -for various aspects of a request. Because these options make other previous configuration options redundant, several -configuration options and methods of a client and AbstractCommand have been deprecated. - -- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. -- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. -- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` -- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 - - $command = $client->getCommand('foo', array( - 'command.headers' => array('Test' => '123'), - 'command.response_body' => '/path/to/file' - )); - - // Should be changed to: - - $command = $client->getCommand('foo', array( - 'command.request_options' => array( - 'headers' => array('Test' => '123'), - 'save_as' => '/path/to/file' - ) - )); - -### Interface changes - -Additions and changes (you will need to update any implementations or subclasses you may have created): - -- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -- Added `Guzzle\Stream\StreamInterface::isRepeatable` -- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. - -The following methods were removed from interfaces. All of these methods are still available in the concrete classes -that implement them, but you should update your code to use alternative methods: - -- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or - `$client->setDefaultOption('headers/{header_name}', 'value')`. or - `$client->setDefaultOption('headers', array('header_name' => 'value'))`. -- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. -- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. -- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. -- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. -- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. - -### Cache plugin breaking changes - -- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -- Always setting X-cache headers on cached responses -- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -- Added `CacheStorageInterface::purge($url)` -- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -3.5 to 3.6 ----------- - -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). - For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). - Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Moved getLinks() from Response to just be used on a Link header object. - -If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the -HeaderInterface (e.g. toArray(), getAll(), etc.). - -### Interface changes - -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() - -### Removed deprecated functions - -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). - -### Deprecations - -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. - -### Other changes - -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess - -3.3 to 3.4 ----------- - -Base URLs of a client now follow the rules of https://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. - -3.2 to 3.3 ----------- - -### Response::getEtag() quote stripping removed - -`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header - -### Removed `Guzzle\Http\Utils` - -The `Guzzle\Http\Utils` class was removed. This class was only used for testing. - -### Stream wrapper and type - -`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. - -### curl.emit_io became emit_io - -Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the -'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' - -3.1 to 3.2 ----------- - -### CurlMulti is no longer reused globally - -Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added -to a single client can pollute requests dispatched from other clients. - -If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the -ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is -created. - -```php -$multi = new Guzzle\Http\Curl\CurlMulti(); -$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); -$builder->addListener('service_builder.create_client', function ($event) use ($multi) { - $event['client']->setCurlMulti($multi); -} -}); -``` - -### No default path - -URLs no longer have a default path value of '/' if no path was specified. - -Before: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com/ -``` - -After: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com -``` - -### Less verbose BadResponseException - -The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and -response information. You can, however, get access to the request and response object by calling `getRequest()` or -`getResponse()` on the exception object. - -### Query parameter aggregation - -Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a -setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is -responsible for handling the aggregation of multi-valued query string variables into a flattened hash. - -2.8 to 3.x ----------- - -### Guzzle\Service\Inspector - -Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` - -**Before** - -```php -use Guzzle\Service\Inspector; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Inspector::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -**After** - -```php -use Guzzle\Common\Collection; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Collection::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -### Convert XML Service Descriptions to JSON - -**Before** - -```xml - - - - - - Get a list of groups - - - Uses a search query to get a list of groups - - - - Create a group - - - - - Delete a group by ID - - - - - - - Update a group - - - - - - -``` - -**After** - -```json -{ - "name": "Zendesk REST API v2", - "apiVersion": "2012-12-31", - "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", - "operations": { - "list_groups": { - "httpMethod":"GET", - "uri": "groups.json", - "summary": "Get a list of groups" - }, - "search_groups":{ - "httpMethod":"GET", - "uri": "search.json?query=\"{query} type:group\"", - "summary": "Uses a search query to get a list of groups", - "parameters":{ - "query":{ - "location": "uri", - "description":"Zendesk Search Query", - "type": "string", - "required": true - } - } - }, - "create_group": { - "httpMethod":"POST", - "uri": "groups.json", - "summary": "Create a group", - "parameters":{ - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - }, - "delete_group": { - "httpMethod":"DELETE", - "uri": "groups/{id}.json", - "summary": "Delete a group", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to delete by ID", - "type": "integer", - "required": true - } - } - }, - "get_group": { - "httpMethod":"GET", - "uri": "groups/{id}.json", - "summary": "Get a ticket", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to get by ID", - "type": "integer", - "required": true - } - } - }, - "update_group": { - "httpMethod":"PUT", - "uri": "groups/{id}.json", - "summary": "Update a group", - "parameters":{ - "id": { - "location": "uri", - "description":"Group to update by ID", - "type": "integer", - "required": true - }, - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - } -} -``` - -### Guzzle\Service\Description\ServiceDescription - -Commands are now called Operations - -**Before** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getCommands(); // @returns ApiCommandInterface[] -$sd->hasCommand($name); -$sd->getCommand($name); // @returns ApiCommandInterface|null -$sd->addCommand($command); // @param ApiCommandInterface $command -``` - -**After** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getOperations(); // @returns OperationInterface[] -$sd->hasOperation($name); -$sd->getOperation($name); // @returns OperationInterface|null -$sd->addOperation($operation); // @param OperationInterface $operation -``` - -### Guzzle\Common\Inflection\Inflector - -Namespace is now `Guzzle\Inflection\Inflector` - -### Guzzle\Http\Plugin - -Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. - -### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log - -Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. - -**Before** - -```php -use Guzzle\Common\Log\ClosureLogAdapter; -use Guzzle\Http\Plugin\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $verbosity is an integer indicating desired message verbosity level -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); -``` - -**After** - -```php -use Guzzle\Log\ClosureLogAdapter; -use Guzzle\Log\MessageFormatter; -use Guzzle\Plugin\Log\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $format is a string indicating desired message format -- @see MessageFormatter -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); -``` - -### Guzzle\Http\Plugin\CurlAuthPlugin - -Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. - -### Guzzle\Http\Plugin\ExponentialBackoffPlugin - -Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. - -**Before** - -```php -use Guzzle\Http\Plugin\ExponentialBackoffPlugin; - -$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( - ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) - )); - -$client->addSubscriber($backoffPlugin); -``` - -**After** - -```php -use Guzzle\Plugin\Backoff\BackoffPlugin; -use Guzzle\Plugin\Backoff\HttpBackoffStrategy; - -// Use convenient factory method instead -- see implementation for ideas of what -// you can do with chaining backoff strategies -$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( - HttpBackoffStrategy::getDefaultFailureCodes(), array(429) - )); -$client->addSubscriber($backoffPlugin); -``` - -### Known Issues - -#### [BUG] Accept-Encoding header behavior changed unintentionally. - -(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) - -In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to -properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. -See issue #217 for a workaround, or use a version containing the fix. diff --git a/lib/guzzlehttp/guzzle/composer.json b/lib/guzzlehttp/guzzle/composer.json deleted file mode 100644 index 3207f8c3a..000000000 --- a/lib/guzzlehttp/guzzle/composer.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "guzzlehttp/guzzle", - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "framework", - "http", - "rest", - "web service", - "curl", - "client", - "HTTP client", - "PSR-7", - "PSR-18" - ], - "license": "MIT", - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "require": { - "php": "^7.2.5 || ^8.0", - "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "bamarni/composer-bin-plugin": "^1.8.1", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "config": { - "allow-plugins": { - "bamarni/composer-bin-plugin": true - }, - "preferred-install": "dist", - "sort-packages": true - }, - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Tests\\": "tests/" - } - } -} diff --git a/lib/guzzlehttp/guzzle/src/BodySummarizer.php b/lib/guzzlehttp/guzzle/src/BodySummarizer.php deleted file mode 100644 index 6eca94ef9..000000000 --- a/lib/guzzlehttp/guzzle/src/BodySummarizer.php +++ /dev/null @@ -1,28 +0,0 @@ -truncateAt = $truncateAt; - } - - /** - * Returns a summarized message body. - */ - public function summarize(MessageInterface $message): ?string - { - return $this->truncateAt === null - ? \GuzzleHttp\Psr7\Message::bodySummary($message) - : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt); - } -} diff --git a/lib/guzzlehttp/guzzle/src/BodySummarizerInterface.php b/lib/guzzlehttp/guzzle/src/BodySummarizerInterface.php deleted file mode 100644 index 3e02e036e..000000000 --- a/lib/guzzlehttp/guzzle/src/BodySummarizerInterface.php +++ /dev/null @@ -1,13 +0,0 @@ - 'http://www.foo.com/1.0/', - * 'timeout' => 0, - * 'allow_redirects' => false, - * 'proxy' => '192.168.16.1:10' - * ]); - * - * Client configuration settings include the following options: - * - * - handler: (callable) Function that transfers HTTP requests over the - * wire. The function is called with a Psr7\Http\Message\RequestInterface - * and array of transfer options, and must return a - * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a - * Psr7\Http\Message\ResponseInterface on success. - * If no handler is provided, a default handler will be created - * that enables all of the request options below by attaching all of the - * default middleware to the handler. - * - base_uri: (string|UriInterface) Base URI of the client that is merged - * into relative URIs. Can be a string or instance of UriInterface. - * - **: any request option - * - * @param array $config Client configuration settings. - * - * @see \GuzzleHttp\RequestOptions for a list of available request options. - */ - public function __construct(array $config = []) - { - if (!isset($config['handler'])) { - $config['handler'] = HandlerStack::create(); - } elseif (!\is_callable($config['handler'])) { - throw new InvalidArgumentException('handler must be a callable'); - } - - // Convert the base_uri to a UriInterface - if (isset($config['base_uri'])) { - $config['base_uri'] = Psr7\Utils::uriFor($config['base_uri']); - } - - $this->configureDefaults($config); - } - - /** - * @param string $method - * @param array $args - * - * @return PromiseInterface|ResponseInterface - * - * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0. - */ - public function __call($method, $args) - { - if (\count($args) < 1) { - throw new InvalidArgumentException('Magic request methods require a URI and optional options array'); - } - - $uri = $args[0]; - $opts = $args[1] ?? []; - - return \substr($method, -5) === 'Async' - ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) - : $this->request($method, $uri, $opts); - } - - /** - * Asynchronously send an HTTP request. - * - * @param array $options Request options to apply to the given - * request and to the transfer. See \GuzzleHttp\RequestOptions. - */ - public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface - { - // Merge the base URI into the request URI if needed. - $options = $this->prepareDefaults($options); - - return $this->transfer( - $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), - $options - ); - } - - /** - * Send an HTTP request. - * - * @param array $options Request options to apply to the given - * request and to the transfer. See \GuzzleHttp\RequestOptions. - * - * @throws GuzzleException - */ - public function send(RequestInterface $request, array $options = []): ResponseInterface - { - $options[RequestOptions::SYNCHRONOUS] = true; - - return $this->sendAsync($request, $options)->wait(); - } - - /** - * The HttpClient PSR (PSR-18) specify this method. - * - * {@inheritDoc} - */ - public function sendRequest(RequestInterface $request): ResponseInterface - { - $options[RequestOptions::SYNCHRONOUS] = true; - $options[RequestOptions::ALLOW_REDIRECTS] = false; - $options[RequestOptions::HTTP_ERRORS] = false; - - return $this->sendAsync($request, $options)->wait(); - } - - /** - * Create and send an asynchronous HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string $method HTTP method - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. - */ - public function requestAsync(string $method, $uri = '', array $options = []): PromiseInterface - { - $options = $this->prepareDefaults($options); - // Remove request modifying parameter because it can be done up-front. - $headers = $options['headers'] ?? []; - $body = $options['body'] ?? null; - $version = $options['version'] ?? '1.1'; - // Merge the URI into the base URI. - $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options); - if (\is_array($body)) { - throw $this->invalidBody(); - } - $request = new Psr7\Request($method, $uri, $headers, $body, $version); - // Remove the option so that they are not doubly-applied. - unset($options['headers'], $options['body'], $options['version']); - - return $this->transfer($request, $options); - } - - /** - * Create and send an HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string $method HTTP method. - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. - * - * @throws GuzzleException - */ - public function request(string $method, $uri = '', array $options = []): ResponseInterface - { - $options[RequestOptions::SYNCHRONOUS] = true; - - return $this->requestAsync($method, $uri, $options)->wait(); - } - - /** - * Get a client configuration option. - * - * These options include default request options of the client, a "handler" - * (if utilized by the concrete client), and a "base_uri" if utilized by - * the concrete client. - * - * @param string|null $option The config option to retrieve. - * - * @return mixed - * - * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. - */ - public function getConfig(?string $option = null) - { - return $option === null - ? $this->config - : ($this->config[$option] ?? null); - } - - private function buildUri(UriInterface $uri, array $config): UriInterface - { - if (isset($config['base_uri'])) { - $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($config['base_uri']), $uri); - } - - if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) { - $idnOptions = ($config['idn_conversion'] === true) ? \IDNA_DEFAULT : $config['idn_conversion']; - $uri = Utils::idnUriConvert($uri, $idnOptions); - } - - return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; - } - - /** - * Configures the default options for a client. - */ - private function configureDefaults(array $config): void - { - $defaults = [ - 'allow_redirects' => RedirectMiddleware::$defaultSettings, - 'http_errors' => true, - 'decode_content' => true, - 'verify' => true, - 'cookies' => false, - 'idn_conversion' => false, - ]; - - // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. - - // We can only trust the HTTP_PROXY environment variable in a CLI - // process due to the fact that PHP has no reliable mechanism to - // get environment variables that start with "HTTP_". - if (\PHP_SAPI === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) { - $defaults['proxy']['http'] = $proxy; - } - - if ($proxy = Utils::getenv('HTTPS_PROXY')) { - $defaults['proxy']['https'] = $proxy; - } - - if ($noProxy = Utils::getenv('NO_PROXY')) { - $cleanedNoProxy = \str_replace(' ', '', $noProxy); - $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy); - } - - $this->config = $config + $defaults; - - if (!empty($config['cookies']) && $config['cookies'] === true) { - $this->config['cookies'] = new CookieJar(); - } - - // Add the default user-agent header. - if (!isset($this->config['headers'])) { - $this->config['headers'] = ['User-Agent' => Utils::defaultUserAgent()]; - } else { - // Add the User-Agent header if one was not already set. - foreach (\array_keys($this->config['headers']) as $name) { - if (\strtolower($name) === 'user-agent') { - return; - } - } - $this->config['headers']['User-Agent'] = Utils::defaultUserAgent(); - } - } - - /** - * Merges default options into the array. - * - * @param array $options Options to modify by reference - */ - private function prepareDefaults(array $options): array - { - $defaults = $this->config; - - if (!empty($defaults['headers'])) { - // Default headers are only added if they are not present. - $defaults['_conditional'] = $defaults['headers']; - unset($defaults['headers']); - } - - // Special handling for headers is required as they are added as - // conditional headers and as headers passed to a request ctor. - if (\array_key_exists('headers', $options)) { - // Allows default headers to be unset. - if ($options['headers'] === null) { - $defaults['_conditional'] = []; - unset($options['headers']); - } elseif (!\is_array($options['headers'])) { - throw new InvalidArgumentException('headers must be an array'); - } - } - - // Shallow merge defaults underneath options. - $result = $options + $defaults; - - // Remove null values. - foreach ($result as $k => $v) { - if ($v === null) { - unset($result[$k]); - } - } - - return $result; - } - - /** - * Transfers the given request and applies request options. - * - * The URI of the request is not modified and the request options are used - * as-is without merging in default options. - * - * @param array $options See \GuzzleHttp\RequestOptions. - */ - private function transfer(RequestInterface $request, array $options): PromiseInterface - { - $request = $this->applyOptions($request, $options); - /** @var HandlerStack $handler */ - $handler = $options['handler']; - - try { - return P\Create::promiseFor($handler($request, $options)); - } catch (\Exception $e) { - return P\Create::rejectionFor($e); - } - } - - /** - * Applies the array of request options to a request. - */ - private function applyOptions(RequestInterface $request, array &$options): RequestInterface - { - $modify = [ - 'set_headers' => [], - ]; - - if (isset($options['headers'])) { - if (array_keys($options['headers']) === range(0, count($options['headers']) - 1)) { - throw new InvalidArgumentException('The headers array must have header name as keys.'); - } - $modify['set_headers'] = $options['headers']; - unset($options['headers']); - } - - if (isset($options['form_params'])) { - if (isset($options['multipart'])) { - throw new InvalidArgumentException('You cannot use ' - .'form_params and multipart at the same time. Use the ' - .'form_params option if you want to send application/' - .'x-www-form-urlencoded requests, and the multipart ' - .'option to send multipart/form-data requests.'); - } - $options['body'] = \http_build_query($options['form_params'], '', '&'); - unset($options['form_params']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; - } - - if (isset($options['multipart'])) { - $options['body'] = new Psr7\MultipartStream($options['multipart']); - unset($options['multipart']); - } - - if (isset($options['json'])) { - $options['body'] = Utils::jsonEncode($options['json']); - unset($options['json']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/json'; - } - - if (!empty($options['decode_content']) - && $options['decode_content'] !== true - ) { - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']); - $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; - } - - if (isset($options['body'])) { - if (\is_array($options['body'])) { - throw $this->invalidBody(); - } - $modify['body'] = Psr7\Utils::streamFor($options['body']); - unset($options['body']); - } - - if (!empty($options['auth']) && \is_array($options['auth'])) { - $value = $options['auth']; - $type = isset($value[2]) ? \strtolower($value[2]) : 'basic'; - switch ($type) { - case 'basic': - // Ensure that we don't have the header in different case and set the new value. - $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']); - $modify['set_headers']['Authorization'] = 'Basic ' - .\base64_encode("$value[0]:$value[1]"); - break; - case 'digest': - // @todo: Do not rely on curl - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST; - $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; - break; - case 'ntlm': - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; - $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; - break; - } - } - - if (isset($options['query'])) { - $value = $options['query']; - if (\is_array($value)) { - $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986); - } - if (!\is_string($value)) { - throw new InvalidArgumentException('query must be a string or array'); - } - $modify['query'] = $value; - unset($options['query']); - } - - // Ensure that sink is not an invalid value. - if (isset($options['sink'])) { - // TODO: Add more sink validation? - if (\is_bool($options['sink'])) { - throw new InvalidArgumentException('sink must not be a boolean'); - } - } - - if (isset($options['version'])) { - $modify['version'] = $options['version']; - } - - $request = Psr7\Utils::modifyRequest($request, $modify); - if ($request->getBody() instanceof Psr7\MultipartStream) { - // Use a multipart/form-data POST if a Content-Type is not set. - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' - .$request->getBody()->getBoundary(); - } - - // Merge in conditional headers if they are not present. - if (isset($options['_conditional'])) { - // Build up the changes so it's in a single clone of the message. - $modify = []; - foreach ($options['_conditional'] as $k => $v) { - if (!$request->hasHeader($k)) { - $modify['set_headers'][$k] = $v; - } - } - $request = Psr7\Utils::modifyRequest($request, $modify); - // Don't pass this internal value along to middleware/handlers. - unset($options['_conditional']); - } - - return $request; - } - - /** - * Return an InvalidArgumentException with pre-set message. - */ - private function invalidBody(): InvalidArgumentException - { - return new InvalidArgumentException('Passing in the "body" request ' - .'option as an array to send a request is not supported. ' - .'Please use the "form_params" request option to send a ' - .'application/x-www-form-urlencoded request, or the "multipart" ' - .'request option to send a multipart/form-data request.'); - } -} diff --git a/lib/guzzlehttp/guzzle/src/ClientInterface.php b/lib/guzzlehttp/guzzle/src/ClientInterface.php deleted file mode 100644 index 6aaee61af..000000000 --- a/lib/guzzlehttp/guzzle/src/ClientInterface.php +++ /dev/null @@ -1,84 +0,0 @@ -request('GET', $uri, $options); - } - - /** - * Create and send an HTTP HEAD request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function head($uri, array $options = []): ResponseInterface - { - return $this->request('HEAD', $uri, $options); - } - - /** - * Create and send an HTTP PUT request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function put($uri, array $options = []): ResponseInterface - { - return $this->request('PUT', $uri, $options); - } - - /** - * Create and send an HTTP POST request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function post($uri, array $options = []): ResponseInterface - { - return $this->request('POST', $uri, $options); - } - - /** - * Create and send an HTTP PATCH request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function patch($uri, array $options = []): ResponseInterface - { - return $this->request('PATCH', $uri, $options); - } - - /** - * Create and send an HTTP DELETE request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function delete($uri, array $options = []): ResponseInterface - { - return $this->request('DELETE', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string $method HTTP method - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface; - - /** - * Create and send an asynchronous HTTP GET request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function getAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('GET', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP HEAD request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function headAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('HEAD', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP PUT request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function putAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('PUT', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP POST request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function postAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('POST', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP PATCH request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function patchAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('PATCH', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP DELETE request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function deleteAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('DELETE', $uri, $options); - } -} diff --git a/lib/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/lib/guzzlehttp/guzzle/src/Cookie/CookieJar.php deleted file mode 100644 index b4ced5a1a..000000000 --- a/lib/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ /dev/null @@ -1,319 +0,0 @@ -strictMode = $strictMode; - - foreach ($cookieArray as $cookie) { - if (!($cookie instanceof SetCookie)) { - $cookie = new SetCookie($cookie); - } - $this->setCookie($cookie); - } - } - - /** - * Create a new Cookie jar from an associative array and domain. - * - * @param array $cookies Cookies to create the jar from - * @param string $domain Domain to set the cookies to - */ - public static function fromArray(array $cookies, string $domain): self - { - $cookieJar = new self(); - foreach ($cookies as $name => $value) { - $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true, - ])); - } - - return $cookieJar; - } - - /** - * Evaluate if this cookie should be persisted to storage - * that survives between requests. - * - * @param SetCookie $cookie Being evaluated. - * @param bool $allowSessionCookies If we should persist session cookies - */ - public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = false): bool - { - if ($cookie->getExpires() || $allowSessionCookies) { - if (!$cookie->getDiscard()) { - return true; - } - } - - return false; - } - - /** - * Finds and returns the cookie based on the name - * - * @param string $name cookie name to search for - * - * @return SetCookie|null cookie that was found or null if not found - */ - public function getCookieByName(string $name): ?SetCookie - { - foreach ($this->cookies as $cookie) { - if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) { - return $cookie; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function toArray(): array - { - return \array_map(static function (SetCookie $cookie): array { - return $cookie->toArray(); - }, $this->getIterator()->getArrayCopy()); - } - - /** - * {@inheritDoc} - */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void - { - if (!$domain) { - $this->cookies = []; - - return; - } elseif (!$path) { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie) use ($domain): bool { - return !$cookie->matchesDomain($domain); - } - ); - } elseif (!$name) { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie) use ($path, $domain): bool { - return !($cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } else { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name && - $cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } - } - - /** - * {@inheritDoc} - */ - public function clearSessionCookies(): void - { - $this->cookies = \array_filter( - $this->cookies, - static function (SetCookie $cookie): bool { - return !$cookie->getDiscard() && $cookie->getExpires(); - } - ); - } - - /** - * {@inheritDoc} - */ - public function setCookie(SetCookie $cookie): bool - { - // If the name string is empty (but not 0), ignore the set-cookie - // string entirely. - $name = $cookie->getName(); - if (!$name && $name !== '0') { - return false; - } - - // Only allow cookies with set and valid domain, name, value - $result = $cookie->validate(); - if ($result !== true) { - if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: '.$result); - } - $this->removeCookieIfEmpty($cookie); - - return false; - } - - // Resolve conflicts with previously set cookies - foreach ($this->cookies as $i => $c) { - // Two cookies are identical, when their path, and domain are - // identical. - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getName() != $cookie->getName() - ) { - continue; - } - - // The previously set cookie is a discard cookie and this one is - // not so allow the new cookie to be set - if (!$cookie->getDiscard() && $c->getDiscard()) { - unset($this->cookies[$i]); - continue; - } - - // If the new cookie's expiration is further into the future, then - // replace the old cookie - if ($cookie->getExpires() > $c->getExpires()) { - unset($this->cookies[$i]); - continue; - } - - // If the value has changed, we better change it - if ($cookie->getValue() !== $c->getValue()) { - unset($this->cookies[$i]); - continue; - } - - // The cookie exists, so no need to continue - return false; - } - - $this->cookies[] = $cookie; - - return true; - } - - public function count(): int - { - return \count($this->cookies); - } - - /** - * @return \ArrayIterator - */ - public function getIterator(): \ArrayIterator - { - return new \ArrayIterator(\array_values($this->cookies)); - } - - public function extractCookies(RequestInterface $request, ResponseInterface $response): void - { - if ($cookieHeader = $response->getHeader('Set-Cookie')) { - foreach ($cookieHeader as $cookie) { - $sc = SetCookie::fromString($cookie); - if (!$sc->getDomain()) { - $sc->setDomain($request->getUri()->getHost()); - } - if (0 !== \strpos($sc->getPath(), '/')) { - $sc->setPath($this->getCookiePathFromRequest($request)); - } - if (!$sc->matchesDomain($request->getUri()->getHost())) { - continue; - } - // Note: At this point `$sc->getDomain()` being a public suffix should - // be rejected, but we don't want to pull in the full PSL dependency. - $this->setCookie($sc); - } - } - } - - /** - * Computes cookie path following RFC 6265 section 5.1.4 - * - * @see https://tools.ietf.org/html/rfc6265#section-5.1.4 - */ - private function getCookiePathFromRequest(RequestInterface $request): string - { - $uriPath = $request->getUri()->getPath(); - if ('' === $uriPath) { - return '/'; - } - if (0 !== \strpos($uriPath, '/')) { - return '/'; - } - if ('/' === $uriPath) { - return '/'; - } - $lastSlashPos = \strrpos($uriPath, '/'); - if (0 === $lastSlashPos || false === $lastSlashPos) { - return '/'; - } - - return \substr($uriPath, 0, $lastSlashPos); - } - - public function withCookieHeader(RequestInterface $request): RequestInterface - { - $values = []; - $uri = $request->getUri(); - $scheme = $uri->getScheme(); - $host = $uri->getHost(); - $path = $uri->getPath() ?: '/'; - - foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && - $cookie->matchesDomain($host) && - !$cookie->isExpired() && - (!$cookie->getSecure() || $scheme === 'https') - ) { - $values[] = $cookie->getName().'=' - .$cookie->getValue(); - } - } - - return $values - ? $request->withHeader('Cookie', \implode('; ', $values)) - : $request; - } - - /** - * If a cookie already exists and the server asks to set it again with a - * null value, the cookie must be deleted. - */ - private function removeCookieIfEmpty(SetCookie $cookie): void - { - $cookieValue = $cookie->getValue(); - if ($cookieValue === null || $cookieValue === '') { - $this->clear( - $cookie->getDomain(), - $cookie->getPath(), - $cookie->getName() - ); - } - } -} diff --git a/lib/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/lib/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php deleted file mode 100644 index 50bc36398..000000000 --- a/lib/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ /dev/null @@ -1,79 +0,0 @@ - - */ -interface CookieJarInterface extends \Countable, \IteratorAggregate -{ - /** - * Create a request with added cookie headers. - * - * If no matching cookies are found in the cookie jar, then no Cookie - * header is added to the request and the same request is returned. - * - * @param RequestInterface $request Request object to modify. - * - * @return RequestInterface returns the modified request. - */ - public function withCookieHeader(RequestInterface $request): RequestInterface; - - /** - * Extract cookies from an HTTP response and store them in the CookieJar. - * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface $response Response that was received - */ - public function extractCookies(RequestInterface $request, ResponseInterface $response): void; - - /** - * Sets a cookie in the cookie jar. - * - * @param SetCookie $cookie Cookie to set. - * - * @return bool Returns true on success or false on failure - */ - public function setCookie(SetCookie $cookie): bool; - - /** - * Remove cookies currently held in the cookie jar. - * - * Invoking this method without arguments will empty the whole cookie jar. - * If given a $domain argument only cookies belonging to that domain will - * be removed. If given a $domain and $path argument, cookies belonging to - * the specified path within that domain are removed. If given all three - * arguments, then the cookie with the specified name, path and domain is - * removed. - * - * @param string|null $domain Clears cookies matching a domain - * @param string|null $path Clears cookies matching a domain and path - * @param string|null $name Clears cookies matching a domain, path, and name - */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; - - /** - * Discard all sessions cookies. - * - * Removes cookies that don't have an expire field or a have a discard - * field set to true. To be called when the user agent shuts down according - * to RFC 2965. - */ - public function clearSessionCookies(): void; - - /** - * Converts the cookie jar to an array. - */ - public function toArray(): array; -} diff --git a/lib/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php b/lib/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php deleted file mode 100644 index 290236d54..000000000 --- a/lib/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +++ /dev/null @@ -1,101 +0,0 @@ -filename = $cookieFile; - $this->storeSessionCookies = $storeSessionCookies; - - if (\file_exists($cookieFile)) { - $this->load($cookieFile); - } - } - - /** - * Saves the file when shutting down - */ - public function __destruct() - { - $this->save($this->filename); - } - - /** - * Saves the cookies to a file. - * - * @param string $filename File to save - * - * @throws \RuntimeException if the file cannot be found or created - */ - public function save(string $filename): void - { - $json = []; - /** @var SetCookie $cookie */ - foreach ($this as $cookie) { - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $jsonStr = Utils::jsonEncode($json); - if (false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) { - throw new \RuntimeException("Unable to save file {$filename}"); - } - } - - /** - * Load cookies from a JSON formatted file. - * - * Old cookies are kept unless overwritten by newly loaded ones. - * - * @param string $filename Cookie file to load. - * - * @throws \RuntimeException if the file cannot be loaded. - */ - public function load(string $filename): void - { - $json = \file_get_contents($filename); - if (false === $json) { - throw new \RuntimeException("Unable to load file {$filename}"); - } - if ($json === '') { - return; - } - - $data = Utils::jsonDecode($json, true); - if (\is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (\is_scalar($data) && !empty($data)) { - throw new \RuntimeException("Invalid cookie file: {$filename}"); - } - } -} diff --git a/lib/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/lib/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php deleted file mode 100644 index cb3e67c6a..000000000 --- a/lib/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ /dev/null @@ -1,77 +0,0 @@ -sessionKey = $sessionKey; - $this->storeSessionCookies = $storeSessionCookies; - $this->load(); - } - - /** - * Saves cookies to session when shutting down - */ - public function __destruct() - { - $this->save(); - } - - /** - * Save cookies to the client session - */ - public function save(): void - { - $json = []; - /** @var SetCookie $cookie */ - foreach ($this as $cookie) { - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $_SESSION[$this->sessionKey] = \json_encode($json); - } - - /** - * Load the contents of the client session into the data array - */ - protected function load(): void - { - if (!isset($_SESSION[$this->sessionKey])) { - return; - } - $data = \json_decode($_SESSION[$this->sessionKey], true); - if (\is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (\strlen($data)) { - throw new \RuntimeException('Invalid cookie data'); - } - } -} diff --git a/lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php deleted file mode 100644 index d74915bed..000000000 --- a/lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ /dev/null @@ -1,488 +0,0 @@ - null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false, - ]; - - /** - * @var array Cookie data - */ - private $data; - - /** - * Create a new SetCookie object from a string. - * - * @param string $cookie Set-Cookie header string - */ - public static function fromString(string $cookie): self - { - // Create the default return array - $data = self::$defaults; - // Explode the cookie string using a series of semicolons - $pieces = \array_filter(\array_map('trim', \explode(';', $cookie))); - // The name of the cookie (first kvp) must exist and include an equal sign. - if (!isset($pieces[0]) || \strpos($pieces[0], '=') === false) { - return new self($data); - } - - // Add the cookie pieces into the parsed data array - foreach ($pieces as $part) { - $cookieParts = \explode('=', $part, 2); - $key = \trim($cookieParts[0]); - $value = isset($cookieParts[1]) - ? \trim($cookieParts[1], " \n\r\t\0\x0B") - : true; - - // Only check for non-cookies when cookies have been found - if (!isset($data['Name'])) { - $data['Name'] = $key; - $data['Value'] = $value; - } else { - foreach (\array_keys(self::$defaults) as $search) { - if (!\strcasecmp($search, $key)) { - if ($search === 'Max-Age') { - if (is_numeric($value)) { - $data[$search] = (int) $value; - } - } else { - $data[$search] = $value; - } - continue 2; - } - } - $data[$key] = $value; - } - } - - return new self($data); - } - - /** - * @param array $data Array of cookie data provided by a Cookie parser - */ - public function __construct(array $data = []) - { - $this->data = self::$defaults; - - if (isset($data['Name'])) { - $this->setName($data['Name']); - } - - if (isset($data['Value'])) { - $this->setValue($data['Value']); - } - - if (isset($data['Domain'])) { - $this->setDomain($data['Domain']); - } - - if (isset($data['Path'])) { - $this->setPath($data['Path']); - } - - if (isset($data['Max-Age'])) { - $this->setMaxAge($data['Max-Age']); - } - - if (isset($data['Expires'])) { - $this->setExpires($data['Expires']); - } - - if (isset($data['Secure'])) { - $this->setSecure($data['Secure']); - } - - if (isset($data['Discard'])) { - $this->setDiscard($data['Discard']); - } - - if (isset($data['HttpOnly'])) { - $this->setHttpOnly($data['HttpOnly']); - } - - // Set the remaining values that don't have extra validation logic - foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) { - $this->data[$key] = $data[$key]; - } - - // Extract the Expires value and turn it into a UNIX timestamp if needed - if (!$this->getExpires() && $this->getMaxAge()) { - // Calculate the Expires date - $this->setExpires(\time() + $this->getMaxAge()); - } elseif (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) { - $this->setExpires($expires); - } - } - - public function __toString() - { - $str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; '; - foreach ($this->data as $k => $v) { - if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { - if ($k === 'Expires') { - $str .= 'Expires='.\gmdate('D, d M Y H:i:s \G\M\T', $v).'; '; - } else { - $str .= ($v === true ? $k : "{$k}={$v}").'; '; - } - } - } - - return \rtrim($str, '; '); - } - - public function toArray(): array - { - return $this->data; - } - - /** - * Get the cookie name. - * - * @return string - */ - public function getName() - { - return $this->data['Name']; - } - - /** - * Set the cookie name. - * - * @param string $name Cookie name - */ - public function setName($name): void - { - if (!is_string($name)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Name'] = (string) $name; - } - - /** - * Get the cookie value. - * - * @return string|null - */ - public function getValue() - { - return $this->data['Value']; - } - - /** - * Set the cookie value. - * - * @param string $value Cookie value - */ - public function setValue($value): void - { - if (!is_string($value)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Value'] = (string) $value; - } - - /** - * Get the domain. - * - * @return string|null - */ - public function getDomain() - { - return $this->data['Domain']; - } - - /** - * Set the domain of the cookie. - * - * @param string|null $domain - */ - public function setDomain($domain): void - { - if (!is_string($domain) && null !== $domain) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Domain'] = null === $domain ? null : (string) $domain; - } - - /** - * Get the path. - * - * @return string - */ - public function getPath() - { - return $this->data['Path']; - } - - /** - * Set the path of the cookie. - * - * @param string $path Path of the cookie - */ - public function setPath($path): void - { - if (!is_string($path)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Path'] = (string) $path; - } - - /** - * Maximum lifetime of the cookie in seconds. - * - * @return int|null - */ - public function getMaxAge() - { - return null === $this->data['Max-Age'] ? null : (int) $this->data['Max-Age']; - } - - /** - * Set the max-age of the cookie. - * - * @param int|null $maxAge Max age of the cookie in seconds - */ - public function setMaxAge($maxAge): void - { - if (!is_int($maxAge) && null !== $maxAge) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Max-Age'] = $maxAge === null ? null : (int) $maxAge; - } - - /** - * The UNIX timestamp when the cookie Expires. - * - * @return string|int|null - */ - public function getExpires() - { - return $this->data['Expires']; - } - - /** - * Set the unix timestamp for which the cookie will expire. - * - * @param int|string|null $timestamp Unix timestamp or any English textual datetime description. - */ - public function setExpires($timestamp): void - { - if (!is_int($timestamp) && !is_string($timestamp) && null !== $timestamp) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int, string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Expires'] = null === $timestamp ? null : (\is_numeric($timestamp) ? (int) $timestamp : \strtotime((string) $timestamp)); - } - - /** - * Get whether or not this is a secure cookie. - * - * @return bool - */ - public function getSecure() - { - return $this->data['Secure']; - } - - /** - * Set whether or not the cookie is secure. - * - * @param bool $secure Set to true or false if secure - */ - public function setSecure($secure): void - { - if (!is_bool($secure)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Secure'] = (bool) $secure; - } - - /** - * Get whether or not this is a session cookie. - * - * @return bool|null - */ - public function getDiscard() - { - return $this->data['Discard']; - } - - /** - * Set whether or not this is a session cookie. - * - * @param bool $discard Set to true or false if this is a session cookie - */ - public function setDiscard($discard): void - { - if (!is_bool($discard)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Discard'] = (bool) $discard; - } - - /** - * Get whether or not this is an HTTP only cookie. - * - * @return bool - */ - public function getHttpOnly() - { - return $this->data['HttpOnly']; - } - - /** - * Set whether or not this is an HTTP only cookie. - * - * @param bool $httpOnly Set to true or false if this is HTTP only - */ - public function setHttpOnly($httpOnly): void - { - if (!is_bool($httpOnly)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['HttpOnly'] = (bool) $httpOnly; - } - - /** - * Check if the cookie matches a path value. - * - * A request-path path-matches a given cookie-path if at least one of - * the following conditions holds: - * - * - The cookie-path and the request-path are identical. - * - The cookie-path is a prefix of the request-path, and the last - * character of the cookie-path is %x2F ("/"). - * - The cookie-path is a prefix of the request-path, and the first - * character of the request-path that is not included in the cookie- - * path is a %x2F ("/") character. - * - * @param string $requestPath Path to check against - */ - public function matchesPath(string $requestPath): bool - { - $cookiePath = $this->getPath(); - - // Match on exact matches or when path is the default empty "/" - if ($cookiePath === '/' || $cookiePath == $requestPath) { - return true; - } - - // Ensure that the cookie-path is a prefix of the request path. - if (0 !== \strpos($requestPath, $cookiePath)) { - return false; - } - - // Match if the last character of the cookie-path is "/" - if (\substr($cookiePath, -1, 1) === '/') { - return true; - } - - // Match if the first character not included in cookie path is "/" - return \substr($requestPath, \strlen($cookiePath), 1) === '/'; - } - - /** - * Check if the cookie matches a domain value. - * - * @param string $domain Domain to check against - */ - public function matchesDomain(string $domain): bool - { - $cookieDomain = $this->getDomain(); - if (null === $cookieDomain) { - return true; - } - - // Remove the leading '.' as per spec in RFC 6265. - // https://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = \ltrim(\strtolower($cookieDomain), '.'); - - $domain = \strtolower($domain); - - // Domain not set or exact match. - if ('' === $cookieDomain || $domain === $cookieDomain) { - return true; - } - - // Matching the subdomain according to RFC 6265. - // https://tools.ietf.org/html/rfc6265#section-5.1.3 - if (\filter_var($domain, \FILTER_VALIDATE_IP)) { - return false; - } - - return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain); - } - - /** - * Check if the cookie is expired. - */ - public function isExpired(): bool - { - return $this->getExpires() !== null && \time() > $this->getExpires(); - } - - /** - * Check if the cookie is valid according to RFC 6265. - * - * @return bool|string Returns true if valid or an error message if invalid - */ - public function validate() - { - $name = $this->getName(); - if ($name === '') { - return 'The cookie name must not be empty'; - } - - // Check if any of the invalid characters are present in the cookie name - if (\preg_match( - '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', - $name - )) { - return 'Cookie name must not contain invalid characters: ASCII ' - .'Control characters (0-31;127), space, tab and the ' - .'following characters: ()<>@,;:\"/?={}'; - } - - // Value must not be null. 0 and empty string are valid. Empty strings - // are technically against RFC 6265, but known to happen in the wild. - $value = $this->getValue(); - if ($value === null) { - return 'The cookie value must not be empty'; - } - - // Domains must not be empty, but can be 0. "0" is not a valid internet - // domain, but may be used as server name in a private network. - $domain = $this->getDomain(); - if ($domain === null || $domain === '') { - return 'The cookie domain must not be empty'; - } - - return true; - } -} diff --git a/lib/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/lib/guzzlehttp/guzzle/src/Exception/BadResponseException.php deleted file mode 100644 index a80956c9d..000000000 --- a/lib/guzzlehttp/guzzle/src/Exception/BadResponseException.php +++ /dev/null @@ -1,39 +0,0 @@ -request = $request; - $this->handlerContext = $handlerContext; - } - - /** - * Get the request that caused the exception - */ - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. - */ - public function getHandlerContext(): array - { - return $this->handlerContext; - } -} diff --git a/lib/guzzlehttp/guzzle/src/Exception/GuzzleException.php b/lib/guzzlehttp/guzzle/src/Exception/GuzzleException.php deleted file mode 100644 index fa3ed6998..000000000 --- a/lib/guzzlehttp/guzzle/src/Exception/GuzzleException.php +++ /dev/null @@ -1,9 +0,0 @@ -getStatusCode() : 0; - parent::__construct($message, $code, $previous); - $this->request = $request; - $this->response = $response; - $this->handlerContext = $handlerContext; - } - - /** - * Wrap non-RequestExceptions with a RequestException - */ - public static function wrapException(RequestInterface $request, \Throwable $e): RequestException - { - return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e); - } - - /** - * Factory method to create a new exception with a normalized error message - * - * @param RequestInterface $request Request sent - * @param ResponseInterface $response Response received - * @param \Throwable|null $previous Previous exception - * @param array $handlerContext Optional handler context - * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer - */ - public static function create( - RequestInterface $request, - ResponseInterface $response = null, - \Throwable $previous = null, - array $handlerContext = [], - BodySummarizerInterface $bodySummarizer = null - ): self { - if (!$response) { - return new self( - 'Error completing request', - $request, - null, - $previous, - $handlerContext - ); - } - - $level = (int) \floor($response->getStatusCode() / 100); - if ($level === 4) { - $label = 'Client error'; - $className = ClientException::class; - } elseif ($level === 5) { - $label = 'Server error'; - $className = ServerException::class; - } else { - $label = 'Unsuccessful request'; - $className = __CLASS__; - } - - $uri = $request->getUri(); - $uri = static::obfuscateUri($uri); - - // Client Error: `GET /` resulted in a `404 Not Found` response: - // ... (truncated) - $message = \sprintf( - '%s: `%s %s` resulted in a `%s %s` response', - $label, - $request->getMethod(), - $uri->__toString(), - $response->getStatusCode(), - $response->getReasonPhrase() - ); - - $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response); - - if ($summary !== null) { - $message .= ":\n{$summary}\n"; - } - - return new $className($message, $request, $response, $previous, $handlerContext); - } - - /** - * Obfuscates URI if there is a username and a password present - */ - private static function obfuscateUri(UriInterface $uri): UriInterface - { - $userInfo = $uri->getUserInfo(); - - if (false !== ($pos = \strpos($userInfo, ':'))) { - return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); - } - - return $uri; - } - - /** - * Get the request that caused the exception - */ - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * Get the associated response - */ - public function getResponse(): ?ResponseInterface - { - return $this->response; - } - - /** - * Check if a response was received - */ - public function hasResponse(): bool - { - return $this->response !== null; - } - - /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. - */ - public function getHandlerContext(): array - { - return $this->handlerContext; - } -} diff --git a/lib/guzzlehttp/guzzle/src/Exception/ServerException.php b/lib/guzzlehttp/guzzle/src/Exception/ServerException.php deleted file mode 100644 index 8055e067c..000000000 --- a/lib/guzzlehttp/guzzle/src/Exception/ServerException.php +++ /dev/null @@ -1,10 +0,0 @@ -maxHandles = $maxHandles; - } - - public function create(RequestInterface $request, array $options): EasyHandle - { - if (isset($options['curl']['body_as_string'])) { - $options['_body_as_string'] = $options['curl']['body_as_string']; - unset($options['curl']['body_as_string']); - } - - $easy = new EasyHandle(); - $easy->request = $request; - $easy->options = $options; - $conf = $this->getDefaultConf($easy); - $this->applyMethod($easy, $conf); - $this->applyHandlerOptions($easy, $conf); - $this->applyHeaders($easy, $conf); - unset($conf['_headers']); - - // Add handler options from the request configuration options - if (isset($options['curl'])) { - $conf = \array_replace($conf, $options['curl']); - } - - $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); - $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init(); - curl_setopt_array($easy->handle, $conf); - - return $easy; - } - - public function release(EasyHandle $easy): void - { - $resource = $easy->handle; - unset($easy->handle); - - if (\count($this->handles) >= $this->maxHandles) { - \curl_close($resource); - } else { - // Remove all callback functions as they can hold onto references - // and are not cleaned up by curl_reset. Using curl_setopt_array - // does not work for some reason, so removing each one - // individually. - \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null); - \curl_setopt($resource, \CURLOPT_READFUNCTION, null); - \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null); - \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null); - \curl_reset($resource); - $this->handles[] = $resource; - } - } - - /** - * Completes a cURL transaction, either returning a response promise or a - * rejected promise. - * - * @param callable(RequestInterface, array): PromiseInterface $handler - * @param CurlFactoryInterface $factory Dictates how the handle is released - */ - public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface - { - if (isset($easy->options['on_stats'])) { - self::invokeStats($easy); - } - - if (!$easy->response || $easy->errno) { - return self::finishError($handler, $easy, $factory); - } - - // Return the response if it is present and there is no error. - $factory->release($easy); - - // Rewind the body of the response if possible. - $body = $easy->response->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - - return new FulfilledPromise($easy->response); - } - - private static function invokeStats(EasyHandle $easy): void - { - $curlStats = \curl_getinfo($easy->handle); - $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME); - $stats = new TransferStats( - $easy->request, - $easy->response, - $curlStats['total_time'], - $easy->errno, - $curlStats - ); - ($easy->options['on_stats'])($stats); - } - - /** - * @param callable(RequestInterface, array): PromiseInterface $handler - */ - private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface - { - // Get error information and release the handle to the factory. - $ctx = [ - 'errno' => $easy->errno, - 'error' => \curl_error($easy->handle), - 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME), - ] + \curl_getinfo($easy->handle); - $ctx[self::CURL_VERSION_STR] = \curl_version()['version']; - $factory->release($easy); - - // Retry when nothing is present or when curl failed to rewind. - if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) { - return self::retryFailedRewind($handler, $easy, $ctx); - } - - return self::createRejection($easy, $ctx); - } - - private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface - { - static $connectionErrors = [ - \CURLE_OPERATION_TIMEOUTED => true, - \CURLE_COULDNT_RESOLVE_HOST => true, - \CURLE_COULDNT_CONNECT => true, - \CURLE_SSL_CONNECT_ERROR => true, - \CURLE_GOT_NOTHING => true, - ]; - - if ($easy->createResponseException) { - return P\Create::rejectionFor( - new RequestException( - 'An error was encountered while creating the response', - $easy->request, - $easy->response, - $easy->createResponseException, - $ctx - ) - ); - } - - // If an exception was encountered during the onHeaders event, then - // return a rejected promise that wraps that exception. - if ($easy->onHeadersException) { - return P\Create::rejectionFor( - new RequestException( - 'An error was encountered during the on_headers event', - $easy->request, - $easy->response, - $easy->onHeadersException, - $ctx - ) - ); - } - - $message = \sprintf( - 'cURL error %s: %s (%s)', - $ctx['errno'], - $ctx['error'], - 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' - ); - $uriString = (string) $easy->request->getUri(); - if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) { - $message .= \sprintf(' for %s', $uriString); - } - - // Create a connection exception if it was a specific error code. - $error = isset($connectionErrors[$easy->errno]) - ? new ConnectException($message, $easy->request, null, $ctx) - : new RequestException($message, $easy->request, $easy->response, null, $ctx); - - return P\Create::rejectionFor($error); - } - - /** - * @return array - */ - private function getDefaultConf(EasyHandle $easy): array - { - $conf = [ - '_headers' => $easy->request->getHeaders(), - \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), - \CURLOPT_RETURNTRANSFER => false, - \CURLOPT_HEADER => false, - \CURLOPT_CONNECTTIMEOUT => 300, - ]; - - if (\defined('CURLOPT_PROTOCOLS')) { - $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS; - } - - $version = $easy->request->getProtocolVersion(); - if ($version == 1.1) { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; - } elseif ($version == 2.0) { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; - } else { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; - } - - return $conf; - } - - private function applyMethod(EasyHandle $easy, array &$conf): void - { - $body = $easy->request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size > 0) { - $this->applyBody($easy->request, $easy->options, $conf); - - return; - } - - $method = $easy->request->getMethod(); - if ($method === 'PUT' || $method === 'POST') { - // See https://tools.ietf.org/html/rfc7230#section-3.3.2 - if (!$easy->request->hasHeader('Content-Length')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; - } - } elseif ($method === 'HEAD') { - $conf[\CURLOPT_NOBODY] = true; - unset( - $conf[\CURLOPT_WRITEFUNCTION], - $conf[\CURLOPT_READFUNCTION], - $conf[\CURLOPT_FILE], - $conf[\CURLOPT_INFILE] - ); - } - } - - private function applyBody(RequestInterface $request, array $options, array &$conf): void - { - $size = $request->hasHeader('Content-Length') - ? (int) $request->getHeaderLine('Content-Length') - : null; - - // Send the body as a string if the size is less than 1MB OR if the - // [curl][body_as_string] request value is set. - if (($size !== null && $size < 1000000) || !empty($options['_body_as_string'])) { - $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody(); - // Don't duplicate the Content-Length header - $this->removeHeader('Content-Length', $conf); - $this->removeHeader('Transfer-Encoding', $conf); - } else { - $conf[\CURLOPT_UPLOAD] = true; - if ($size !== null) { - $conf[\CURLOPT_INFILESIZE] = $size; - $this->removeHeader('Content-Length', $conf); - } - $body = $request->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - $conf[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body) { - return $body->read($length); - }; - } - - // If the Expect header is not present, prevent curl from adding it - if (!$request->hasHeader('Expect')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Expect:'; - } - - // cURL sometimes adds a content-type by default. Prevent this. - if (!$request->hasHeader('Content-Type')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:'; - } - } - - private function applyHeaders(EasyHandle $easy, array &$conf): void - { - foreach ($conf['_headers'] as $name => $values) { - foreach ($values as $value) { - $value = (string) $value; - if ($value === '') { - // cURL requires a special format for empty headers. - // See https://github.com/guzzle/guzzle/issues/1882 for more details. - $conf[\CURLOPT_HTTPHEADER][] = "$name;"; - } else { - $conf[\CURLOPT_HTTPHEADER][] = "$name: $value"; - } - } - } - - // Remove the Accept header if one was not set - if (!$easy->request->hasHeader('Accept')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Accept:'; - } - } - - /** - * Remove a header from the options array. - * - * @param string $name Case-insensitive header to remove - * @param array $options Array of options to modify - */ - private function removeHeader(string $name, array &$options): void - { - foreach (\array_keys($options['_headers']) as $key) { - if (!\strcasecmp($key, $name)) { - unset($options['_headers'][$key]); - - return; - } - } - } - - private function applyHandlerOptions(EasyHandle $easy, array &$conf): void - { - $options = $easy->options; - if (isset($options['verify'])) { - if ($options['verify'] === false) { - unset($conf[\CURLOPT_CAINFO]); - $conf[\CURLOPT_SSL_VERIFYHOST] = 0; - $conf[\CURLOPT_SSL_VERIFYPEER] = false; - } else { - $conf[\CURLOPT_SSL_VERIFYHOST] = 2; - $conf[\CURLOPT_SSL_VERIFYPEER] = true; - if (\is_string($options['verify'])) { - // Throw an error if the file/folder/link path is not valid or doesn't exist. - if (!\file_exists($options['verify'])) { - throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}"); - } - // If it's a directory or a link to a directory use CURLOPT_CAPATH. - // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. - if ( - \is_dir($options['verify']) || - ( - \is_link($options['verify']) === true && - ($verifyLink = \readlink($options['verify'])) !== false && - \is_dir($verifyLink) - ) - ) { - $conf[\CURLOPT_CAPATH] = $options['verify']; - } else { - $conf[\CURLOPT_CAINFO] = $options['verify']; - } - } - } - } - - if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) { - $accept = $easy->request->getHeaderLine('Accept-Encoding'); - if ($accept) { - $conf[\CURLOPT_ENCODING] = $accept; - } else { - // The empty string enables all available decoders and implicitly - // sets a matching 'Accept-Encoding' header. - $conf[\CURLOPT_ENCODING] = ''; - // But as the user did not specify any acceptable encodings we need - // to overwrite this implicit header with an empty one. - $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; - } - } - - if (!isset($options['sink'])) { - // Use a default temp stream if no sink was set. - $options['sink'] = \GuzzleHttp\Psr7\Utils::tryFopen('php://temp', 'w+'); - } - $sink = $options['sink']; - if (!\is_string($sink)) { - $sink = \GuzzleHttp\Psr7\Utils::streamFor($sink); - } elseif (!\is_dir(\dirname($sink))) { - // Ensure that the directory exists before failing in curl. - throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink)); - } else { - $sink = new LazyOpenStream($sink, 'w+'); - } - $easy->sink = $sink; - $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int { - return $sink->write($write); - }; - - $timeoutRequiresNoSignal = false; - if (isset($options['timeout'])) { - $timeoutRequiresNoSignal |= $options['timeout'] < 1; - $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; - } - - // CURL default value is CURL_IPRESOLVE_WHATEVER - if (isset($options['force_ip_resolve'])) { - if ('v4' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; - } elseif ('v6' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6; - } - } - - if (isset($options['connect_timeout'])) { - $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; - $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; - } - - if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') { - $conf[\CURLOPT_NOSIGNAL] = true; - } - - if (isset($options['proxy'])) { - if (!\is_array($options['proxy'])) { - $conf[\CURLOPT_PROXY] = $options['proxy']; - } else { - $scheme = $easy->request->getUri()->getScheme(); - if (isset($options['proxy'][$scheme])) { - $host = $easy->request->getUri()->getHost(); - if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) { - unset($conf[\CURLOPT_PROXY]); - } else { - $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; - } - } - } - } - - if (isset($options['crypto_method'])) { - if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { - if (!defined('CURL_SSLVERSION_TLSv1_0')) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; - } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { - if (!defined('CURL_SSLVERSION_TLSv1_1')) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; - } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { - if (!defined('CURL_SSLVERSION_TLSv1_2')) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; - } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { - if (!defined('CURL_SSLVERSION_TLSv1_3')) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; - } else { - throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); - } - } - - if (isset($options['cert'])) { - $cert = $options['cert']; - if (\is_array($cert)) { - $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1]; - $cert = $cert[0]; - } - if (!\file_exists($cert)) { - throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); - } - // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. - // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html - $ext = pathinfo($cert, \PATHINFO_EXTENSION); - if (preg_match('#^(der|p12)$#i', $ext)) { - $conf[\CURLOPT_SSLCERTTYPE] = strtoupper($ext); - } - $conf[\CURLOPT_SSLCERT] = $cert; - } - - if (isset($options['ssl_key'])) { - if (\is_array($options['ssl_key'])) { - if (\count($options['ssl_key']) === 2) { - [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key']; - } else { - [$sslKey] = $options['ssl_key']; - } - } - - $sslKey = $sslKey ?? $options['ssl_key']; - - if (!\file_exists($sslKey)) { - throw new \InvalidArgumentException("SSL private key not found: {$sslKey}"); - } - $conf[\CURLOPT_SSLKEY] = $sslKey; - } - - if (isset($options['progress'])) { - $progress = $options['progress']; - if (!\is_callable($progress)) { - throw new \InvalidArgumentException('progress client option must be callable'); - } - $conf[\CURLOPT_NOPROGRESS] = false; - $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) { - $progress($downloadSize, $downloaded, $uploadSize, $uploaded); - }; - } - - if (!empty($options['debug'])) { - $conf[\CURLOPT_STDERR] = Utils::debugResource($options['debug']); - $conf[\CURLOPT_VERBOSE] = true; - } - } - - /** - * This function ensures that a response was set on a transaction. If one - * was not set, then the request is retried if possible. This error - * typically means you are sending a payload, curl encountered a - * "Connection died, retrying a fresh connect" error, tried to rewind the - * stream, and then encountered a "necessary data rewind wasn't possible" - * error, causing the request to be sent through curl_multi_info_read() - * without an error status. - * - * @param callable(RequestInterface, array): PromiseInterface $handler - */ - private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx): PromiseInterface - { - try { - // Only rewind if the body has been read from. - $body = $easy->request->getBody(); - if ($body->tell() > 0) { - $body->rewind(); - } - } catch (\RuntimeException $e) { - $ctx['error'] = 'The connection unexpectedly failed without ' - .'providing an error. The request would have been retried, ' - .'but attempting to rewind the request body failed. ' - .'Exception: '.$e; - - return self::createRejection($easy, $ctx); - } - - // Retry no more than 3 times before giving up. - if (!isset($easy->options['_curl_retries'])) { - $easy->options['_curl_retries'] = 1; - } elseif ($easy->options['_curl_retries'] == 2) { - $ctx['error'] = 'The cURL request was retried 3 times ' - .'and did not succeed. The most likely reason for the failure ' - .'is that cURL was unable to rewind the body of the request ' - .'and subsequent retries resulted in the same error. Turn on ' - .'the debug option to see what went wrong. See ' - .'https://bugs.php.net/bug.php?id=47204 for more information.'; - - return self::createRejection($easy, $ctx); - } else { - ++$easy->options['_curl_retries']; - } - - return $handler($easy->request, $easy->options); - } - - private function createHeaderFn(EasyHandle $easy): callable - { - if (isset($easy->options['on_headers'])) { - $onHeaders = $easy->options['on_headers']; - - if (!\is_callable($onHeaders)) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - } else { - $onHeaders = null; - } - - return static function ($ch, $h) use ( - $onHeaders, - $easy, - &$startingResponse - ) { - $value = \trim($h); - if ($value === '') { - $startingResponse = true; - try { - $easy->createResponse(); - } catch (\Exception $e) { - $easy->createResponseException = $e; - - return -1; - } - if ($onHeaders !== null) { - try { - $onHeaders($easy->response); - } catch (\Exception $e) { - // Associate the exception with the handle and trigger - // a curl header write error by returning 0. - $easy->onHeadersException = $e; - - return -1; - } - } - } elseif ($startingResponse) { - $startingResponse = false; - $easy->headers = [$value]; - } else { - $easy->headers[] = $value; - } - - return \strlen($h); - }; - } -} diff --git a/lib/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/lib/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php deleted file mode 100644 index fe57ed5d5..000000000 --- a/lib/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -factory = $options['handle_factory'] - ?? new CurlFactory(3); - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - if (isset($options['delay'])) { - \usleep($options['delay'] * 1000); - } - - $easy = $this->factory->create($request, $options); - \curl_exec($easy->handle); - $easy->errno = \curl_errno($easy->handle); - - return CurlFactory::finish($this, $easy, $this->factory); - } -} diff --git a/lib/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/lib/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php deleted file mode 100644 index f0acde145..000000000 --- a/lib/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ /dev/null @@ -1,263 +0,0 @@ - An array of delay times, indexed by handle id in `addRequest`. - * - * @see CurlMultiHandler::addRequest - */ - private $delays = []; - - /** - * @var array An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt() - */ - private $options = []; - - /** - * This handler accepts the following options: - * - * - handle_factory: An optional factory used to create curl handles - * - select_timeout: Optional timeout (in seconds) to block before timing - * out while selecting curl handles. Defaults to 1 second. - * - options: An associative array of CURLMOPT_* options and - * corresponding values for curl_multi_setopt() - */ - public function __construct(array $options = []) - { - $this->factory = $options['handle_factory'] ?? new CurlFactory(50); - - if (isset($options['select_timeout'])) { - $this->selectTimeout = $options['select_timeout']; - } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { - @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED); - $this->selectTimeout = (int) $selectTimeout; - } else { - $this->selectTimeout = 1; - } - - $this->options = $options['options'] ?? []; - } - - /** - * @param string $name - * - * @return resource|\CurlMultiHandle - * - * @throws \BadMethodCallException when another field as `_mh` will be gotten - * @throws \RuntimeException when curl can not initialize a multi handle - */ - public function __get($name) - { - if ($name !== '_mh') { - throw new \BadMethodCallException("Can not get other property as '_mh'."); - } - - $multiHandle = \curl_multi_init(); - - if (false === $multiHandle) { - throw new \RuntimeException('Can not initialize curl multi handle.'); - } - - $this->_mh = $multiHandle; - - foreach ($this->options as $option => $value) { - // A warning is raised in case of a wrong option. - curl_multi_setopt($this->_mh, $option, $value); - } - - return $this->_mh; - } - - public function __destruct() - { - if (isset($this->_mh)) { - \curl_multi_close($this->_mh); - unset($this->_mh); - } - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - $easy = $this->factory->create($request, $options); - $id = (int) $easy->handle; - - $promise = new Promise( - [$this, 'execute'], - function () use ($id) { - return $this->cancel($id); - } - ); - - $this->addRequest(['easy' => $easy, 'deferred' => $promise]); - - return $promise; - } - - /** - * Ticks the curl event loop. - */ - public function tick(): void - { - // Add any delayed handles if needed. - if ($this->delays) { - $currentTime = Utils::currentTime(); - foreach ($this->delays as $id => $delay) { - if ($currentTime >= $delay) { - unset($this->delays[$id]); - \curl_multi_add_handle( - $this->_mh, - $this->handles[$id]['easy']->handle - ); - } - } - } - - // Step through the task queue which may add additional requests. - P\Utils::queue()->run(); - - if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) { - // Perform a usleep if a select returns -1. - // See: https://bugs.php.net/bug.php?id=61141 - \usleep(250); - } - - while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { - } - - $this->processMessages(); - } - - /** - * Runs until all outstanding connections have completed. - */ - public function execute(): void - { - $queue = P\Utils::queue(); - - while ($this->handles || !$queue->isEmpty()) { - // If there are no transfers, then sleep for the next delay - if (!$this->active && $this->delays) { - \usleep($this->timeToNext()); - } - $this->tick(); - } - } - - private function addRequest(array $entry): void - { - $easy = $entry['easy']; - $id = (int) $easy->handle; - $this->handles[$id] = $entry; - if (empty($easy->options['delay'])) { - \curl_multi_add_handle($this->_mh, $easy->handle); - } else { - $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000); - } - } - - /** - * Cancels a handle from sending and removes references to it. - * - * @param int $id Handle ID to cancel and remove. - * - * @return bool True on success, false on failure. - */ - private function cancel($id): bool - { - if (!is_int($id)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an integer to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - // Cannot cancel if it has been processed. - if (!isset($this->handles[$id])) { - return false; - } - - $handle = $this->handles[$id]['easy']->handle; - unset($this->delays[$id], $this->handles[$id]); - \curl_multi_remove_handle($this->_mh, $handle); - \curl_close($handle); - - return true; - } - - private function processMessages(): void - { - while ($done = \curl_multi_info_read($this->_mh)) { - if ($done['msg'] !== \CURLMSG_DONE) { - // if it's not done, then it would be premature to remove the handle. ref https://github.com/guzzle/guzzle/pull/2892#issuecomment-945150216 - continue; - } - $id = (int) $done['handle']; - \curl_multi_remove_handle($this->_mh, $done['handle']); - - if (!isset($this->handles[$id])) { - // Probably was cancelled. - continue; - } - - $entry = $this->handles[$id]; - unset($this->handles[$id], $this->delays[$id]); - $entry['easy']->errno = $done['result']; - $entry['deferred']->resolve( - CurlFactory::finish($this, $entry['easy'], $this->factory) - ); - } - } - - private function timeToNext(): int - { - $currentTime = Utils::currentTime(); - $nextTime = \PHP_INT_MAX; - foreach ($this->delays as $time) { - if ($time < $nextTime) { - $nextTime = $time; - } - } - - return ((int) \max(0, $nextTime - $currentTime)) * 1000000; - } -} diff --git a/lib/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/lib/guzzlehttp/guzzle/src/Handler/EasyHandle.php deleted file mode 100644 index 1bc39f4b4..000000000 --- a/lib/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ /dev/null @@ -1,112 +0,0 @@ -headers); - - $normalizedKeys = Utils::normalizeHeaderKeys($headers); - - if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) { - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; - unset($headers[$normalizedKeys['content-encoding']]); - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; - - $bodyLength = (int) $this->sink->getSize(); - if ($bodyLength) { - $headers[$normalizedKeys['content-length']] = $bodyLength; - } else { - unset($headers[$normalizedKeys['content-length']]); - } - } - } - - // Attach a response to the easy handle with the parsed headers. - $this->response = new Response( - $status, - $headers, - $this->sink, - $ver, - $reason - ); - } - - /** - * @param string $name - * - * @return void - * - * @throws \BadMethodCallException - */ - public function __get($name) - { - $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: '.$name; - throw new \BadMethodCallException($msg); - } -} diff --git a/lib/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php b/lib/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php deleted file mode 100644 index 5554b8fa9..000000000 --- a/lib/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php +++ /dev/null @@ -1,42 +0,0 @@ -|null $queue The parameters to be passed to the append function, as an indexed array. - * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. - * @param callable|null $onRejected Callback to invoke when the return value is rejected. - */ - public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) - { - $this->onFulfilled = $onFulfilled; - $this->onRejected = $onRejected; - - if ($queue) { - // array_values included for BC - $this->append(...array_values($queue)); - } - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - if (!$this->queue) { - throw new \OutOfBoundsException('Mock queue is empty'); - } - - if (isset($options['delay']) && \is_numeric($options['delay'])) { - \usleep((int) $options['delay'] * 1000); - } - - $this->lastRequest = $request; - $this->lastOptions = $options; - $response = \array_shift($this->queue); - - if (isset($options['on_headers'])) { - if (!\is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $response = new RequestException($msg, $request, $response, $e); - } - } - - if (\is_callable($response)) { - $response = $response($request, $options); - } - - $response = $response instanceof \Throwable - ? P\Create::rejectionFor($response) - : P\Create::promiseFor($response); - - return $response->then( - function (?ResponseInterface $value) use ($request, $options) { - $this->invokeStats($request, $options, $value); - if ($this->onFulfilled) { - ($this->onFulfilled)($value); - } - - if ($value !== null && isset($options['sink'])) { - $contents = (string) $value->getBody(); - $sink = $options['sink']; - - if (\is_resource($sink)) { - \fwrite($sink, $contents); - } elseif (\is_string($sink)) { - \file_put_contents($sink, $contents); - } elseif ($sink instanceof StreamInterface) { - $sink->write($contents); - } - } - - return $value; - }, - function ($reason) use ($request, $options) { - $this->invokeStats($request, $options, null, $reason); - if ($this->onRejected) { - ($this->onRejected)($reason); - } - - return P\Create::rejectionFor($reason); - } - ); - } - - /** - * Adds one or more variadic requests, exceptions, callables, or promises - * to the queue. - * - * @param mixed ...$values - */ - public function append(...$values): void - { - foreach ($values as $value) { - if ($value instanceof ResponseInterface - || $value instanceof \Throwable - || $value instanceof PromiseInterface - || \is_callable($value) - ) { - $this->queue[] = $value; - } else { - throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value)); - } - } - } - - /** - * Get the last received request. - */ - public function getLastRequest(): ?RequestInterface - { - return $this->lastRequest; - } - - /** - * Get the last received request options. - */ - public function getLastOptions(): array - { - return $this->lastOptions; - } - - /** - * Returns the number of remaining items in the queue. - */ - public function count(): int - { - return \count($this->queue); - } - - public function reset(): void - { - $this->queue = []; - } - - /** - * @param mixed $reason Promise or reason. - */ - private function invokeStats( - RequestInterface $request, - array $options, - ResponseInterface $response = null, - $reason = null - ): void { - if (isset($options['on_stats'])) { - $transferTime = $options['transfer_time'] ?? 0; - $stats = new TransferStats($request, $response, $transferTime, $reason); - ($options['on_stats'])($stats); - } - } -} diff --git a/lib/guzzlehttp/guzzle/src/Handler/Proxy.php b/lib/guzzlehttp/guzzle/src/Handler/Proxy.php deleted file mode 100644 index f045b526c..000000000 --- a/lib/guzzlehttp/guzzle/src/Handler/Proxy.php +++ /dev/null @@ -1,51 +0,0 @@ -withoutHeader('Expect'); - - // Append a content-length header if body size is zero to match - // cURL's behavior. - if (0 === $request->getBody()->getSize()) { - $request = $request->withHeader('Content-Length', '0'); - } - - return $this->createResponse( - $request, - $options, - $this->createStream($request, $options), - $startTime - ); - } catch (\InvalidArgumentException $e) { - throw $e; - } catch (\Exception $e) { - // Determine if the error was a networking error. - $message = $e->getMessage(); - // This list can probably get more comprehensive. - if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed - || false !== \strpos($message, 'Connection refused') - || false !== \strpos($message, "couldn't connect to host") // error on HHVM - || false !== \strpos($message, 'connection attempt failed') - ) { - $e = new ConnectException($e->getMessage(), $request, $e); - } else { - $e = RequestException::wrapException($request, $e); - } - $this->invokeStats($options, $request, $startTime, null, $e); - - return P\Create::rejectionFor($e); - } - } - - private function invokeStats( - array $options, - RequestInterface $request, - ?float $startTime, - ResponseInterface $response = null, - \Throwable $error = null - ): void { - if (isset($options['on_stats'])) { - $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []); - ($options['on_stats'])($stats); - } - } - - /** - * @param resource $stream - */ - private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime): PromiseInterface - { - $hdrs = $this->lastHeaders; - $this->lastHeaders = []; - - try { - [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($hdrs); - } catch (\Exception $e) { - return P\Create::rejectionFor( - new RequestException('An error was encountered while creating the response', $request, null, $e) - ); - } - - [$stream, $headers] = $this->checkDecode($options, $headers, $stream); - $stream = Psr7\Utils::streamFor($stream); - $sink = $stream; - - if (\strcasecmp('HEAD', $request->getMethod())) { - $sink = $this->createSink($stream, $options); - } - - try { - $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); - } catch (\Exception $e) { - return P\Create::rejectionFor( - new RequestException('An error was encountered while creating the response', $request, null, $e) - ); - } - - if (isset($options['on_headers'])) { - try { - $options['on_headers']($response); - } catch (\Exception $e) { - return P\Create::rejectionFor( - new RequestException('An error was encountered during the on_headers event', $request, $response, $e) - ); - } - } - - // Do not drain when the request is a HEAD request because they have - // no body. - if ($sink !== $stream) { - $this->drain($stream, $sink, $response->getHeaderLine('Content-Length')); - } - - $this->invokeStats($options, $request, $startTime, $response, null); - - return new FulfilledPromise($response); - } - - private function createSink(StreamInterface $stream, array $options): StreamInterface - { - if (!empty($options['stream'])) { - return $stream; - } - - $sink = $options['sink'] ?? Psr7\Utils::tryFopen('php://temp', 'r+'); - - return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink); - } - - /** - * @param resource $stream - */ - private function checkDecode(array $options, array $headers, $stream): array - { - // Automatically decode responses when instructed. - if (!empty($options['decode_content'])) { - $normalizedKeys = Utils::normalizeHeaderKeys($headers); - if (isset($normalizedKeys['content-encoding'])) { - $encoding = $headers[$normalizedKeys['content-encoding']]; - if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { - $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($stream)); - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; - - // Remove content-encoding header - unset($headers[$normalizedKeys['content-encoding']]); - - // Fix content-length header - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; - $length = (int) $stream->getSize(); - if ($length === 0) { - unset($headers[$normalizedKeys['content-length']]); - } else { - $headers[$normalizedKeys['content-length']] = [$length]; - } - } - } - } - } - - return [$stream, $headers]; - } - - /** - * Drains the source stream into the "sink" client option. - * - * @param string $contentLength Header specifying the amount of - * data to read. - * - * @throws \RuntimeException when the sink option is invalid. - */ - private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength): StreamInterface - { - // If a content-length header is provided, then stop reading once - // that number of bytes has been read. This can prevent infinitely - // reading from a stream when dealing with servers that do not honor - // Connection: Close headers. - Psr7\Utils::copyToStream( - $source, - $sink, - (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 - ); - - $sink->seek(0); - $source->close(); - - return $sink; - } - - /** - * Create a resource and check to ensure it was created successfully - * - * @param callable $callback Callable that returns stream resource - * - * @return resource - * - * @throws \RuntimeException on error - */ - private function createResource(callable $callback) - { - $errors = []; - \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool { - $errors[] = [ - 'message' => $msg, - 'file' => $file, - 'line' => $line, - ]; - - return true; - }); - - try { - $resource = $callback(); - } finally { - \restore_error_handler(); - } - - if (!$resource) { - $message = 'Error creating resource: '; - foreach ($errors as $err) { - foreach ($err as $key => $value) { - $message .= "[$key] $value".\PHP_EOL; - } - } - throw new \RuntimeException(\trim($message)); - } - - return $resource; - } - - /** - * @return resource - */ - private function createStream(RequestInterface $request, array $options) - { - static $methods; - if (!$methods) { - $methods = \array_flip(\get_class_methods(__CLASS__)); - } - - if (!\in_array($request->getUri()->getScheme(), ['http', 'https'])) { - throw new RequestException(\sprintf("The scheme '%s' is not supported.", $request->getUri()->getScheme()), $request); - } - - // HTTP/1.1 streams using the PHP stream wrapper require a - // Connection: close header - if ($request->getProtocolVersion() == '1.1' - && !$request->hasHeader('Connection') - ) { - $request = $request->withHeader('Connection', 'close'); - } - - // Ensure SSL is verified by default - if (!isset($options['verify'])) { - $options['verify'] = true; - } - - $params = []; - $context = $this->getDefaultContext($request); - - if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - - if (!empty($options)) { - foreach ($options as $key => $value) { - $method = "add_{$key}"; - if (isset($methods[$method])) { - $this->{$method}($request, $context, $value, $params); - } - } - } - - if (isset($options['stream_context'])) { - if (!\is_array($options['stream_context'])) { - throw new \InvalidArgumentException('stream_context must be an array'); - } - $context = \array_replace_recursive($context, $options['stream_context']); - } - - // Microsoft NTLM authentication only supported with curl handler - if (isset($options['auth'][2]) && 'ntlm' === $options['auth'][2]) { - throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); - } - - $uri = $this->resolveHost($request, $options); - - $contextResource = $this->createResource( - static function () use ($context, $params) { - return \stream_context_create($context, $params); - } - ); - - return $this->createResource( - function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) { - $resource = @\fopen((string) $uri, 'r', false, $contextResource); - $this->lastHeaders = $http_response_header ?? []; - - if (false === $resource) { - throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context); - } - - if (isset($options['read_timeout'])) { - $readTimeout = $options['read_timeout']; - $sec = (int) $readTimeout; - $usec = ($readTimeout - $sec) * 100000; - \stream_set_timeout($resource, $sec, $usec); - } - - return $resource; - } - ); - } - - private function resolveHost(RequestInterface $request, array $options): UriInterface - { - $uri = $request->getUri(); - - if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) { - if ('v4' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_A); - if (false === $records || !isset($records[0]['ip'])) { - throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); - } - - return $uri->withHost($records[0]['ip']); - } - if ('v6' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_AAAA); - if (false === $records || !isset($records[0]['ipv6'])) { - throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); - } - - return $uri->withHost('['.$records[0]['ipv6'].']'); - } - } - - return $uri; - } - - private function getDefaultContext(RequestInterface $request): array - { - $headers = ''; - foreach ($request->getHeaders() as $name => $value) { - foreach ($value as $val) { - $headers .= "$name: $val\r\n"; - } - } - - $context = [ - 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, - 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, - ], - 'ssl' => [ - 'peer_name' => $request->getUri()->getHost(), - ], - ]; - - $body = (string) $request->getBody(); - - if ('' !== $body) { - $context['http']['content'] = $body; - // Prevent the HTTP handler from adding a Content-Type header. - if (!$request->hasHeader('Content-Type')) { - $context['http']['header'] .= "Content-Type:\r\n"; - } - } - - $context['http']['header'] = \rtrim($context['http']['header']); - - return $context; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void - { - $uri = null; - - if (!\is_array($value)) { - $uri = $value; - } else { - $scheme = $request->getUri()->getScheme(); - if (isset($value[$scheme])) { - if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) { - $uri = $value[$scheme]; - } - } - } - - if (!$uri) { - return; - } - - $parsed = $this->parse_proxy($uri); - $options['http']['proxy'] = $parsed['proxy']; - - if ($parsed['auth']) { - if (!isset($options['http']['header'])) { - $options['http']['header'] = []; - } - $options['http']['header'] .= "\r\nProxy-Authorization: {$parsed['auth']}"; - } - } - - /** - * Parses the given proxy URL to make it compatible with the format PHP's stream context expects. - */ - private function parse_proxy(string $url): array - { - $parsed = \parse_url($url); - - if ($parsed !== false && isset($parsed['scheme']) && $parsed['scheme'] === 'http') { - if (isset($parsed['host']) && isset($parsed['port'])) { - $auth = null; - if (isset($parsed['user']) && isset($parsed['pass'])) { - $auth = \base64_encode("{$parsed['user']}:{$parsed['pass']}"); - } - - return [ - 'proxy' => "tcp://{$parsed['host']}:{$parsed['port']}", - 'auth' => $auth ? "Basic {$auth}" : null, - ]; - } - } - - // Return proxy as-is. - return [ - 'proxy' => $url, - 'auth' => null, - ]; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_timeout(RequestInterface $request, array &$options, $value, array &$params): void - { - if ($value > 0) { - $options['http']['timeout'] = $value; - } - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void - { - if ( - $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT - || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT - || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT - || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT) - ) { - $options['http']['crypto_method'] = $value; - - return; - } - - throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void - { - if ($value === false) { - $options['ssl']['verify_peer'] = false; - $options['ssl']['verify_peer_name'] = false; - - return; - } - - if (\is_string($value)) { - $options['ssl']['cafile'] = $value; - if (!\file_exists($value)) { - throw new \RuntimeException("SSL CA bundle not found: $value"); - } - } elseif ($value !== true) { - throw new \InvalidArgumentException('Invalid verify request option'); - } - - $options['ssl']['verify_peer'] = true; - $options['ssl']['verify_peer_name'] = true; - $options['ssl']['allow_self_signed'] = false; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_cert(RequestInterface $request, array &$options, $value, array &$params): void - { - if (\is_array($value)) { - $options['ssl']['passphrase'] = $value[1]; - $value = $value[0]; - } - - if (!\file_exists($value)) { - throw new \RuntimeException("SSL certificate not found: {$value}"); - } - - $options['ssl']['local_cert'] = $value; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_progress(RequestInterface $request, array &$options, $value, array &$params): void - { - self::addNotification( - $params, - static function ($code, $a, $b, $c, $transferred, $total) use ($value) { - if ($code == \STREAM_NOTIFY_PROGRESS) { - // The upload progress cannot be determined. Use 0 for cURL compatibility: - // https://curl.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html - $value($total, $transferred, 0, 0); - } - } - ); - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_debug(RequestInterface $request, array &$options, $value, array &$params): void - { - if ($value === false) { - return; - } - - static $map = [ - \STREAM_NOTIFY_CONNECT => 'CONNECT', - \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - \STREAM_NOTIFY_PROGRESS => 'PROGRESS', - \STREAM_NOTIFY_FAILURE => 'FAILURE', - \STREAM_NOTIFY_COMPLETED => 'COMPLETED', - \STREAM_NOTIFY_RESOLVE => 'RESOLVE', - ]; - static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; - - $value = Utils::debugResource($value); - $ident = $request->getMethod().' '.$request->getUri()->withFragment(''); - self::addNotification( - $params, - static function (int $code, ...$passed) use ($ident, $value, $map, $args): void { - \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); - foreach (\array_filter($passed) as $i => $v) { - \fwrite($value, $args[$i].': "'.$v.'" '); - } - \fwrite($value, "\n"); - } - ); - } - - private static function addNotification(array &$params, callable $notify): void - { - // Wrap the existing function if needed. - if (!isset($params['notification'])) { - $params['notification'] = $notify; - } else { - $params['notification'] = self::callArray([ - $params['notification'], - $notify, - ]); - } - } - - private static function callArray(array $functions): callable - { - return static function (...$args) use ($functions) { - foreach ($functions as $fn) { - $fn(...$args); - } - }; - } -} diff --git a/lib/guzzlehttp/guzzle/src/HandlerStack.php b/lib/guzzlehttp/guzzle/src/HandlerStack.php deleted file mode 100644 index 1ce9c4b19..000000000 --- a/lib/guzzlehttp/guzzle/src/HandlerStack.php +++ /dev/null @@ -1,275 +0,0 @@ -push(Middleware::httpErrors(), 'http_errors'); - $stack->push(Middleware::redirect(), 'allow_redirects'); - $stack->push(Middleware::cookies(), 'cookies'); - $stack->push(Middleware::prepareBody(), 'prepare_body'); - - return $stack; - } - - /** - * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. - */ - public function __construct(callable $handler = null) - { - $this->handler = $handler; - } - - /** - * Invokes the handler stack as a composed handler - * - * @return ResponseInterface|PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $handler = $this->resolve(); - - return $handler($request, $options); - } - - /** - * Dumps a string representation of the stack. - * - * @return string - */ - public function __toString() - { - $depth = 0; - $stack = []; - - if ($this->handler !== null) { - $stack[] = '0) Handler: '.$this->debugCallable($this->handler); - } - - $result = ''; - foreach (\array_reverse($this->stack) as $tuple) { - ++$depth; - $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= 'Function: '.$this->debugCallable($tuple[0]); - $result = "> {$str}\n{$result}"; - $stack[] = $str; - } - - foreach (\array_keys($stack) as $k) { - $result .= "< {$stack[$k]}\n"; - } - - return $result; - } - - /** - * Set the HTTP handler that actually returns a promise. - * - * @param callable(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and - * returns a Promise. - */ - public function setHandler(callable $handler): void - { - $this->handler = $handler; - $this->cached = null; - } - - /** - * Returns true if the builder has a handler. - */ - public function hasHandler(): bool - { - return $this->handler !== null; - } - - /** - * Unshift a middleware to the bottom of the stack. - * - * @param callable(callable): callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function unshift(callable $middleware, ?string $name = null): void - { - \array_unshift($this->stack, [$middleware, $name]); - $this->cached = null; - } - - /** - * Push a middleware to the top of the stack. - * - * @param callable(callable): callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function push(callable $middleware, string $name = ''): void - { - $this->stack[] = [$middleware, $name]; - $this->cached = null; - } - - /** - * Add a middleware before another middleware by name. - * - * @param string $findName Middleware to find - * @param callable(callable): callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function before(string $findName, callable $middleware, string $withName = ''): void - { - $this->splice($findName, $withName, $middleware, true); - } - - /** - * Add a middleware after another middleware by name. - * - * @param string $findName Middleware to find - * @param callable(callable): callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function after(string $findName, callable $middleware, string $withName = ''): void - { - $this->splice($findName, $withName, $middleware, false); - } - - /** - * Remove a middleware by instance or name from the stack. - * - * @param callable|string $remove Middleware to remove by instance or name. - */ - public function remove($remove): void - { - if (!is_string($remove) && !is_callable($remove)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a callable or string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->cached = null; - $idx = \is_callable($remove) ? 0 : 1; - $this->stack = \array_values(\array_filter( - $this->stack, - static function ($tuple) use ($idx, $remove) { - return $tuple[$idx] !== $remove; - } - )); - } - - /** - * Compose the middleware and handler into a single callable function. - * - * @return callable(RequestInterface, array): PromiseInterface - */ - public function resolve(): callable - { - if ($this->cached === null) { - if (($prev = $this->handler) === null) { - throw new \LogicException('No handler has been specified'); - } - - foreach (\array_reverse($this->stack) as $fn) { - /** @var callable(RequestInterface, array): PromiseInterface $prev */ - $prev = $fn[0]($prev); - } - - $this->cached = $prev; - } - - return $this->cached; - } - - private function findByName(string $name): int - { - foreach ($this->stack as $k => $v) { - if ($v[1] === $name) { - return $k; - } - } - - throw new \InvalidArgumentException("Middleware not found: $name"); - } - - /** - * Splices a function into the middleware list at a specific position. - */ - private function splice(string $findName, string $withName, callable $middleware, bool $before): void - { - $this->cached = null; - $idx = $this->findByName($findName); - $tuple = [$middleware, $withName]; - - if ($before) { - if ($idx === 0) { - \array_unshift($this->stack, $tuple); - } else { - $replacement = [$tuple, $this->stack[$idx]]; - \array_splice($this->stack, $idx, 1, $replacement); - } - } elseif ($idx === \count($this->stack) - 1) { - $this->stack[] = $tuple; - } else { - $replacement = [$this->stack[$idx], $tuple]; - \array_splice($this->stack, $idx, 1, $replacement); - } - } - - /** - * Provides a debug string for a given callable. - * - * @param callable|string $fn Function to write as a string. - */ - private function debugCallable($fn): string - { - if (\is_string($fn)) { - return "callable({$fn})"; - } - - if (\is_array($fn)) { - return \is_string($fn[0]) - ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['".\get_class($fn[0])."', '{$fn[1]}'])"; - } - - /** @var object $fn */ - return 'callable('.\spl_object_hash($fn).')'; - } -} diff --git a/lib/guzzlehttp/guzzle/src/MessageFormatter.php b/lib/guzzlehttp/guzzle/src/MessageFormatter.php deleted file mode 100644 index 9b77eee83..000000000 --- a/lib/guzzlehttp/guzzle/src/MessageFormatter.php +++ /dev/null @@ -1,199 +0,0 @@ ->>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; - public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; - - /** - * @var string Template used to format log messages - */ - private $template; - - /** - * @param string $template Log message template - */ - public function __construct(?string $template = self::CLF) - { - $this->template = $template ?: self::CLF; - } - - /** - * Returns a formatted message string. - * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface|null $response Response that was received - * @param \Throwable|null $error Exception that was received - */ - public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string - { - $cache = []; - - /** @var string */ - return \preg_replace_callback( - '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', - function (array $matches) use ($request, $response, $error, &$cache) { - if (isset($cache[$matches[1]])) { - return $cache[$matches[1]]; - } - - $result = ''; - switch ($matches[1]) { - case 'request': - $result = Psr7\Message::toString($request); - break; - case 'response': - $result = $response ? Psr7\Message::toString($response) : ''; - break; - case 'req_headers': - $result = \trim($request->getMethod() - .' '.$request->getRequestTarget()) - .' HTTP/'.$request->getProtocolVersion()."\r\n" - .$this->headers($request); - break; - case 'res_headers': - $result = $response ? - \sprintf( - 'HTTP/%s %d %s', - $response->getProtocolVersion(), - $response->getStatusCode(), - $response->getReasonPhrase() - )."\r\n".$this->headers($response) - : 'NULL'; - break; - case 'req_body': - $result = $request->getBody()->__toString(); - break; - case 'res_body': - if (!$response instanceof ResponseInterface) { - $result = 'NULL'; - break; - } - - $body = $response->getBody(); - - if (!$body->isSeekable()) { - $result = 'RESPONSE_NOT_LOGGEABLE'; - break; - } - - $result = $response->getBody()->__toString(); - break; - case 'ts': - case 'date_iso_8601': - $result = \gmdate('c'); - break; - case 'date_common_log': - $result = \date('d/M/Y:H:i:s O'); - break; - case 'method': - $result = $request->getMethod(); - break; - case 'version': - $result = $request->getProtocolVersion(); - break; - case 'uri': - case 'url': - $result = $request->getUri()->__toString(); - break; - case 'target': - $result = $request->getRequestTarget(); - break; - case 'req_version': - $result = $request->getProtocolVersion(); - break; - case 'res_version': - $result = $response - ? $response->getProtocolVersion() - : 'NULL'; - break; - case 'host': - $result = $request->getHeaderLine('Host'); - break; - case 'hostname': - $result = \gethostname(); - break; - case 'code': - $result = $response ? $response->getStatusCode() : 'NULL'; - break; - case 'phrase': - $result = $response ? $response->getReasonPhrase() : 'NULL'; - break; - case 'error': - $result = $error ? $error->getMessage() : 'NULL'; - break; - default: - // handle prefixed dynamic headers - if (\strpos($matches[1], 'req_header_') === 0) { - $result = $request->getHeaderLine(\substr($matches[1], 11)); - } elseif (\strpos($matches[1], 'res_header_') === 0) { - $result = $response - ? $response->getHeaderLine(\substr($matches[1], 11)) - : 'NULL'; - } - } - - $cache[$matches[1]] = $result; - - return $result; - }, - $this->template - ); - } - - /** - * Get headers from message as string - */ - private function headers(MessageInterface $message): string - { - $result = ''; - foreach ($message->getHeaders() as $name => $values) { - $result .= $name.': '.\implode(', ', $values)."\r\n"; - } - - return \trim($result); - } -} diff --git a/lib/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/lib/guzzlehttp/guzzle/src/MessageFormatterInterface.php deleted file mode 100644 index a39ac248e..000000000 --- a/lib/guzzlehttp/guzzle/src/MessageFormatterInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -withCookieHeader($request); - - return $handler($request, $options) - ->then( - static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface { - $cookieJar->extractCookies($request, $response); - - return $response; - } - ); - }; - }; - } - - /** - * Middleware that throws exceptions for 4xx or 5xx responses when the - * "http_errors" request option is set to true. - * - * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages. - * - * @return callable(callable): callable Returns a function that accepts the next handler. - */ - public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable - { - return static function (callable $handler) use ($bodySummarizer): callable { - return static function ($request, array $options) use ($handler, $bodySummarizer) { - if (empty($options['http_errors'])) { - return $handler($request, $options); - } - - return $handler($request, $options)->then( - static function (ResponseInterface $response) use ($request, $bodySummarizer) { - $code = $response->getStatusCode(); - if ($code < 400) { - return $response; - } - throw RequestException::create($request, $response, null, [], $bodySummarizer); - } - ); - }; - }; - } - - /** - * Middleware that pushes history data to an ArrayAccess container. - * - * @param array|\ArrayAccess $container Container to hold the history (by reference). - * - * @return callable(callable): callable Returns a function that accepts the next handler. - * - * @throws \InvalidArgumentException if container is not an array or ArrayAccess. - */ - public static function history(&$container): callable - { - if (!\is_array($container) && !$container instanceof \ArrayAccess) { - throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); - } - - return static function (callable $handler) use (&$container): callable { - return static function (RequestInterface $request, array $options) use ($handler, &$container) { - return $handler($request, $options)->then( - static function ($value) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => $value, - 'error' => null, - 'options' => $options, - ]; - - return $value; - }, - static function ($reason) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => null, - 'error' => $reason, - 'options' => $options, - ]; - - return P\Create::rejectionFor($reason); - } - ); - }; - }; - } - - /** - * Middleware that invokes a callback before and after sending a request. - * - * The provided listener cannot modify or alter the response. It simply - * "taps" into the chain to be notified before returning the promise. The - * before listener accepts a request and options array, and the after - * listener accepts a request, options array, and response promise. - * - * @param callable $before Function to invoke before forwarding the request. - * @param callable $after Function invoked after forwarding. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function tap(callable $before = null, callable $after = null): callable - { - return static function (callable $handler) use ($before, $after): callable { - return static function (RequestInterface $request, array $options) use ($handler, $before, $after) { - if ($before) { - $before($request, $options); - } - $response = $handler($request, $options); - if ($after) { - $after($request, $options, $response); - } - - return $response; - }; - }; - } - - /** - * Middleware that handles request redirects. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function redirect(): callable - { - return static function (callable $handler): RedirectMiddleware { - return new RedirectMiddleware($handler); - }; - } - - /** - * Middleware that retries requests based on the boolean result of - * invoking the provided "decider" function. - * - * If no delay function is provided, a simple implementation of exponential - * backoff will be utilized. - * - * @param callable $decider Function that accepts the number of retries, - * a request, [response], and [exception] and - * returns true if the request is to be retried. - * @param callable $delay Function that accepts the number of retries and - * returns the number of milliseconds to delay. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function retry(callable $decider, callable $delay = null): callable - { - return static function (callable $handler) use ($decider, $delay): RetryMiddleware { - return new RetryMiddleware($decider, $handler, $delay); - }; - } - - /** - * Middleware that logs requests, responses, and errors using a message - * formatter. - * - * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests. - * - * @param LoggerInterface $logger Logs messages. - * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. - * @param string $logLevel Level at which to log requests. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable - { - // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter - if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) { - throw new \LogicException(sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class)); - } - - return static function (callable $handler) use ($logger, $formatter, $logLevel): callable { - return static function (RequestInterface $request, array $options = []) use ($handler, $logger, $formatter, $logLevel) { - return $handler($request, $options)->then( - static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface { - $message = $formatter->format($request, $response); - $logger->log($logLevel, $message); - - return $response; - }, - static function ($reason) use ($logger, $request, $formatter): PromiseInterface { - $response = $reason instanceof RequestException ? $reason->getResponse() : null; - $message = $formatter->format($request, $response, P\Create::exceptionFor($reason)); - $logger->error($message); - - return P\Create::rejectionFor($reason); - } - ); - }; - }; - } - - /** - * This middleware adds a default content-type if possible, a default - * content-length or transfer-encoding header, and the expect header. - */ - public static function prepareBody(): callable - { - return static function (callable $handler): PrepareBodyMiddleware { - return new PrepareBodyMiddleware($handler); - }; - } - - /** - * Middleware that applies a map function to the request before passing to - * the next handler. - * - * @param callable $fn Function that accepts a RequestInterface and returns - * a RequestInterface. - */ - public static function mapRequest(callable $fn): callable - { - return static function (callable $handler) use ($fn): callable { - return static function (RequestInterface $request, array $options) use ($handler, $fn) { - return $handler($fn($request), $options); - }; - }; - } - - /** - * Middleware that applies a map function to the resolved promise's - * response. - * - * @param callable $fn Function that accepts a ResponseInterface and - * returns a ResponseInterface. - */ - public static function mapResponse(callable $fn): callable - { - return static function (callable $handler) use ($fn): callable { - return static function (RequestInterface $request, array $options) use ($handler, $fn) { - return $handler($request, $options)->then($fn); - }; - }; - } -} diff --git a/lib/guzzlehttp/guzzle/src/Pool.php b/lib/guzzlehttp/guzzle/src/Pool.php deleted file mode 100644 index 6277c61fb..000000000 --- a/lib/guzzlehttp/guzzle/src/Pool.php +++ /dev/null @@ -1,125 +0,0 @@ - $rfn) { - if ($rfn instanceof RequestInterface) { - yield $key => $client->sendAsync($rfn, $opts); - } elseif (\is_callable($rfn)) { - yield $key => $rfn($opts); - } else { - throw new \InvalidArgumentException('Each value yielded by the iterator must be a Psr7\Http\Message\RequestInterface or a callable that returns a promise that fulfills with a Psr7\Message\Http\ResponseInterface object.'); - } - } - }; - - $this->each = new EachPromise($requests(), $config); - } - - /** - * Get promise - */ - public function promise(): PromiseInterface - { - return $this->each->promise(); - } - - /** - * Sends multiple requests concurrently and returns an array of responses - * and exceptions that uses the same ordering as the provided requests. - * - * IMPORTANT: This method keeps every request and response in memory, and - * as such, is NOT recommended when sending a large number or an - * indeterminate number of requests concurrently. - * - * @param ClientInterface $client Client used to send the requests - * @param array|\Iterator $requests Requests to send concurrently. - * @param array $options Passes through the options available in - * {@see \GuzzleHttp\Pool::__construct} - * - * @return array Returns an array containing the response or an exception - * in the same order that the requests were sent. - * - * @throws \InvalidArgumentException if the event format is incorrect. - */ - public static function batch(ClientInterface $client, $requests, array $options = []): array - { - $res = []; - self::cmpCallback($options, 'fulfilled', $res); - self::cmpCallback($options, 'rejected', $res); - $pool = new static($client, $requests, $options); - $pool->promise()->wait(); - \ksort($res); - - return $res; - } - - /** - * Execute callback(s) - */ - private static function cmpCallback(array &$options, string $name, array &$results): void - { - if (!isset($options[$name])) { - $options[$name] = static function ($v, $k) use (&$results) { - $results[$k] = $v; - }; - } else { - $currentFn = $options[$name]; - $options[$name] = static function ($v, $k) use (&$results, $currentFn) { - $currentFn($v, $k); - $results[$k] = $v; - }; - } - } -} diff --git a/lib/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/lib/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php deleted file mode 100644 index 0a8de8128..000000000 --- a/lib/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ /dev/null @@ -1,105 +0,0 @@ -nextHandler = $nextHandler; - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - $fn = $this->nextHandler; - - // Don't do anything if the request has no body. - if ($request->getBody()->getSize() === 0) { - return $fn($request, $options); - } - - $modify = []; - - // Add a default content-type if possible. - if (!$request->hasHeader('Content-Type')) { - if ($uri = $request->getBody()->getMetadata('uri')) { - if (is_string($uri) && $type = Psr7\MimeType::fromFilename($uri)) { - $modify['set_headers']['Content-Type'] = $type; - } - } - } - - // Add a default content-length or transfer-encoding header. - if (!$request->hasHeader('Content-Length') - && !$request->hasHeader('Transfer-Encoding') - ) { - $size = $request->getBody()->getSize(); - if ($size !== null) { - $modify['set_headers']['Content-Length'] = $size; - } else { - $modify['set_headers']['Transfer-Encoding'] = 'chunked'; - } - } - - // Add the expect header if needed. - $this->addExpectHeader($request, $options, $modify); - - return $fn(Psr7\Utils::modifyRequest($request, $modify), $options); - } - - /** - * Add expect header - */ - private function addExpectHeader(RequestInterface $request, array $options, array &$modify): void - { - // Determine if the Expect header should be used - if ($request->hasHeader('Expect')) { - return; - } - - $expect = $options['expect'] ?? null; - - // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 - if ($expect === false || $request->getProtocolVersion() < 1.1) { - return; - } - - // The expect header is unconditionally enabled - if ($expect === true) { - $modify['set_headers']['Expect'] = '100-Continue'; - - return; - } - - // By default, send the expect header when the payload is > 1mb - if ($expect === null) { - $expect = 1048576; - } - - // Always add if the body cannot be rewound, the size cannot be - // determined, or the size is greater than the cutoff threshold - $body = $request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { - $modify['set_headers']['Expect'] = '100-Continue'; - } - } -} diff --git a/lib/guzzlehttp/guzzle/src/RedirectMiddleware.php b/lib/guzzlehttp/guzzle/src/RedirectMiddleware.php deleted file mode 100644 index f32808a75..000000000 --- a/lib/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ /dev/null @@ -1,228 +0,0 @@ - 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, - 'track_redirects' => false, - ]; - - /** - * @var callable(RequestInterface, array): PromiseInterface - */ - private $nextHandler; - - /** - * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke. - */ - public function __construct(callable $nextHandler) - { - $this->nextHandler = $nextHandler; - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - $fn = $this->nextHandler; - - if (empty($options['allow_redirects'])) { - return $fn($request, $options); - } - - if ($options['allow_redirects'] === true) { - $options['allow_redirects'] = self::$defaultSettings; - } elseif (!\is_array($options['allow_redirects'])) { - throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); - } else { - // Merge the default settings with the provided settings - $options['allow_redirects'] += self::$defaultSettings; - } - - if (empty($options['allow_redirects']['max'])) { - return $fn($request, $options); - } - - return $fn($request, $options) - ->then(function (ResponseInterface $response) use ($request, $options) { - return $this->checkRedirect($request, $options, $response); - }); - } - - /** - * @return ResponseInterface|PromiseInterface - */ - public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response) - { - if (\strpos((string) $response->getStatusCode(), '3') !== 0 - || !$response->hasHeader('Location') - ) { - return $response; - } - - $this->guardMax($request, $response, $options); - $nextRequest = $this->modifyRequest($request, $options, $response); - - // If authorization is handled by curl, unset it if URI is cross-origin. - if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && defined('\CURLOPT_HTTPAUTH')) { - unset( - $options['curl'][\CURLOPT_HTTPAUTH], - $options['curl'][\CURLOPT_USERPWD] - ); - } - - if (isset($options['allow_redirects']['on_redirect'])) { - ($options['allow_redirects']['on_redirect'])( - $request, - $response, - $nextRequest->getUri() - ); - } - - $promise = $this($nextRequest, $options); - - // Add headers to be able to track history of redirects. - if (!empty($options['allow_redirects']['track_redirects'])) { - return $this->withTracking( - $promise, - (string) $nextRequest->getUri(), - $response->getStatusCode() - ); - } - - return $promise; - } - - /** - * Enable tracking on promise. - */ - private function withTracking(PromiseInterface $promise, string $uri, int $statusCode): PromiseInterface - { - return $promise->then( - static function (ResponseInterface $response) use ($uri, $statusCode) { - // Note that we are pushing to the front of the list as this - // would be an earlier response than what is currently present - // in the history header. - $historyHeader = $response->getHeader(self::HISTORY_HEADER); - $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); - \array_unshift($historyHeader, $uri); - \array_unshift($statusHeader, (string) $statusCode); - - return $response->withHeader(self::HISTORY_HEADER, $historyHeader) - ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); - } - ); - } - - /** - * Check for too many redirects. - * - * @throws TooManyRedirectsException Too many redirects. - */ - private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options): void - { - $current = $options['__redirect_count'] - ?? 0; - $options['__redirect_count'] = $current + 1; - $max = $options['allow_redirects']['max']; - - if ($options['__redirect_count'] > $max) { - throw new TooManyRedirectsException("Will not follow more than {$max} redirects", $request, $response); - } - } - - public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response): RequestInterface - { - // Request modifications to apply. - $modify = []; - $protocols = $options['allow_redirects']['protocols']; - - // Use a GET request if this is an entity enclosing request and we are - // not forcing RFC compliance, but rather emulating what all browsers - // would do. - $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || - ($statusCode <= 302 && !$options['allow_redirects']['strict']) - ) { - $safeMethods = ['GET', 'HEAD', 'OPTIONS']; - $requestMethod = $request->getMethod(); - - $modify['method'] = in_array($requestMethod, $safeMethods) ? $requestMethod : 'GET'; - $modify['body'] = ''; - } - - $uri = self::redirectUri($request, $response, $protocols); - if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { - $idnOptions = ($options['idn_conversion'] === true) ? \IDNA_DEFAULT : $options['idn_conversion']; - $uri = Utils::idnUriConvert($uri, $idnOptions); - } - - $modify['uri'] = $uri; - Psr7\Message::rewindBody($request); - - // Add the Referer header if it is told to do so and only - // add the header if we are not redirecting from https to http. - if ($options['allow_redirects']['referer'] - && $modify['uri']->getScheme() === $request->getUri()->getScheme() - ) { - $uri = $request->getUri()->withUserInfo(''); - $modify['set_headers']['Referer'] = (string) $uri; - } else { - $modify['remove_headers'][] = 'Referer'; - } - - // Remove Authorization and Cookie headers if URI is cross-origin. - if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $modify['uri'])) { - $modify['remove_headers'][] = 'Authorization'; - $modify['remove_headers'][] = 'Cookie'; - } - - return Psr7\Utils::modifyRequest($request, $modify); - } - - /** - * Set the appropriate URL on the request based on the location header. - */ - private static function redirectUri( - RequestInterface $request, - ResponseInterface $response, - array $protocols - ): UriInterface { - $location = Psr7\UriResolver::resolve( - $request->getUri(), - new Psr7\Uri($response->getHeaderLine('Location')) - ); - - // Ensure that the redirect URI is allowed based on the protocols. - if (!\in_array($location->getScheme(), $protocols)) { - throw new BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response); - } - - return $location; - } -} diff --git a/lib/guzzlehttp/guzzle/src/RequestOptions.php b/lib/guzzlehttp/guzzle/src/RequestOptions.php deleted file mode 100644 index bf3b02b6b..000000000 --- a/lib/guzzlehttp/guzzle/src/RequestOptions.php +++ /dev/null @@ -1,276 +0,0 @@ -decider = $decider; - $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__.'::exponentialDelay'; - } - - /** - * Default exponential backoff delay function. - * - * @return int milliseconds. - */ - public static function exponentialDelay(int $retries): int - { - return (int) 2 ** ($retries - 1) * 1000; - } - - public function __invoke(RequestInterface $request, array $options): PromiseInterface - { - if (!isset($options['retries'])) { - $options['retries'] = 0; - } - - $fn = $this->nextHandler; - - return $fn($request, $options) - ->then( - $this->onFulfilled($request, $options), - $this->onRejected($request, $options) - ); - } - - /** - * Execute fulfilled closure - */ - private function onFulfilled(RequestInterface $request, array $options): callable - { - return function ($value) use ($request, $options) { - if (!($this->decider)( - $options['retries'], - $request, - $value, - null - )) { - return $value; - } - - return $this->doRetry($request, $options, $value); - }; - } - - /** - * Execute rejected closure - */ - private function onRejected(RequestInterface $req, array $options): callable - { - return function ($reason) use ($req, $options) { - if (!($this->decider)( - $options['retries'], - $req, - null, - $reason - )) { - return P\Create::rejectionFor($reason); - } - - return $this->doRetry($req, $options); - }; - } - - private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface - { - $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); - - return $this($request, $options); - } -} diff --git a/lib/guzzlehttp/guzzle/src/TransferStats.php b/lib/guzzlehttp/guzzle/src/TransferStats.php deleted file mode 100644 index 93fa334c8..000000000 --- a/lib/guzzlehttp/guzzle/src/TransferStats.php +++ /dev/null @@ -1,133 +0,0 @@ -request = $request; - $this->response = $response; - $this->transferTime = $transferTime; - $this->handlerErrorData = $handlerErrorData; - $this->handlerStats = $handlerStats; - } - - public function getRequest(): RequestInterface - { - return $this->request; - } - - /** - * Returns the response that was received (if any). - */ - public function getResponse(): ?ResponseInterface - { - return $this->response; - } - - /** - * Returns true if a response was received. - */ - public function hasResponse(): bool - { - return $this->response !== null; - } - - /** - * Gets handler specific error data. - * - * This might be an exception, a integer representing an error code, or - * anything else. Relying on this value assumes that you know what handler - * you are using. - * - * @return mixed - */ - public function getHandlerErrorData() - { - return $this->handlerErrorData; - } - - /** - * Get the effective URI the request was sent to. - */ - public function getEffectiveUri(): UriInterface - { - return $this->request->getUri(); - } - - /** - * Get the estimated time the request was being transferred by the handler. - * - * @return float|null Time in seconds. - */ - public function getTransferTime(): ?float - { - return $this->transferTime; - } - - /** - * Gets an array of all of the handler specific transfer data. - */ - public function getHandlerStats(): array - { - return $this->handlerStats; - } - - /** - * Get a specific handler statistic from the handler by name. - * - * @param string $stat Handler specific transfer stat to retrieve. - * - * @return mixed|null - */ - public function getHandlerStat(string $stat) - { - return $this->handlerStats[$stat] ?? null; - } -} diff --git a/lib/guzzlehttp/guzzle/src/Utils.php b/lib/guzzlehttp/guzzle/src/Utils.php deleted file mode 100644 index fcf571d6b..000000000 --- a/lib/guzzlehttp/guzzle/src/Utils.php +++ /dev/null @@ -1,385 +0,0 @@ -getHost()) { - $asciiHost = self::idnToAsci($uri->getHost(), $options, $info); - if ($asciiHost === false) { - $errorBitSet = $info['errors'] ?? 0; - - $errorConstants = array_filter(array_keys(get_defined_constants()), static function (string $name): bool { - return substr($name, 0, 11) === 'IDNA_ERROR_'; - }); - - $errors = []; - foreach ($errorConstants as $errorConstant) { - if ($errorBitSet & constant($errorConstant)) { - $errors[] = $errorConstant; - } - } - - $errorMessage = 'IDN conversion failed'; - if ($errors) { - $errorMessage .= ' (errors: '.implode(', ', $errors).')'; - } - - throw new InvalidArgumentException($errorMessage); - } - if ($uri->getHost() !== $asciiHost) { - // Replace URI only if the ASCII version is different - $uri = $uri->withHost($asciiHost); - } - } - - return $uri; - } - - /** - * @internal - */ - public static function getenv(string $name): ?string - { - if (isset($_SERVER[$name])) { - return (string) $_SERVER[$name]; - } - - if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== false && $value !== null) { - return (string) $value; - } - - return null; - } - - /** - * @return string|false - */ - private static function idnToAsci(string $domain, int $options, ?array &$info = []) - { - if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) { - return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info); - } - - throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old'); - } -} diff --git a/lib/guzzlehttp/guzzle/src/functions.php b/lib/guzzlehttp/guzzle/src/functions.php deleted file mode 100644 index 5edc66ab1..000000000 --- a/lib/guzzlehttp/guzzle/src/functions.php +++ /dev/null @@ -1,167 +0,0 @@ - -Copyright (c) 2015 Graham Campbell -Copyright (c) 2017 Tobias Schultze -Copyright (c) 2020 Tobias Nyholm - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/guzzlehttp/promises/README.md b/lib/guzzlehttp/promises/README.md deleted file mode 100644 index 4dc7b6a1d..000000000 --- a/lib/guzzlehttp/promises/README.md +++ /dev/null @@ -1,559 +0,0 @@ -# Guzzle Promises - -[Promises/A+](https://promisesaplus.com/) implementation that handles promise -chaining and resolution iteratively, allowing for "infinite" promise chaining -while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) -for a general introduction to promises. - -- [Features](#features) -- [Quick start](#quick-start) -- [Synchronous wait](#synchronous-wait) -- [Cancellation](#cancellation) -- [API](#api) - - [Promise](#promise) - - [FulfilledPromise](#fulfilledpromise) - - [RejectedPromise](#rejectedpromise) -- [Promise interop](#promise-interop) -- [Implementation notes](#implementation-notes) - - -## Features - -- [Promises/A+](https://promisesaplus.com/) implementation. -- Promise resolution and chaining is handled iteratively, allowing for - "infinite" promise chaining. -- Promises have a synchronous `wait` method. -- Promises can be cancelled. -- Works with any object that has a `then` function. -- C# style async/await coroutine promises using - `GuzzleHttp\Promise\Coroutine::of()`. - - -## Installation - -```shell -composer require guzzlehttp/promises -``` - - -## Version Guidance - -| Version | Status | PHP Version | -|---------|------------------------|--------------| -| 1.x | Bug and security fixes | >=5.5,<8.3 | -| 2.x | Latest | >=7.2.5,<8.3 | - - -## Quick Start - -A *promise* represents the eventual result of an asynchronous operation. The -primary way of interacting with a promise is through its `then` method, which -registers callbacks to receive either a promise's eventual value or the reason -why the promise cannot be fulfilled. - -### Callbacks - -Callbacks are registered with the `then` method by providing an optional -`$onFulfilled` followed by an optional `$onRejected` function. - - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then( - // $onFulfilled - function ($value) { - echo 'The promise was fulfilled.'; - }, - // $onRejected - function ($reason) { - echo 'The promise was rejected.'; - } -); -``` - -*Resolving* a promise means that you either fulfill a promise with a *value* or -reject a promise with a *reason*. Resolving a promise triggers callbacks -registered with the promise's `then` method. These callbacks are triggered -only once and in the order in which they were added. - -### Resolving a Promise - -Promises are fulfilled using the `resolve($value)` method. Resolving a promise -with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger -all of the onFulfilled callbacks (resolving a promise with a rejected promise -will reject the promise and trigger the `$onRejected` callbacks). - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise - ->then(function ($value) { - // Return a value and don't break the chain - return "Hello, " . $value; - }) - // This then is executed after the first then and receives the value - // returned from the first then. - ->then(function ($value) { - echo $value; - }); - -// Resolving the promise triggers the $onFulfilled callbacks and outputs -// "Hello, reader." -$promise->resolve('reader.'); -``` - -### Promise Forwarding - -Promises can be chained one after the other. Each then in the chain is a new -promise. The return value of a promise is what's forwarded to the next -promise in the chain. Returning a promise in a `then` callback will cause the -subsequent promises in the chain to only be fulfilled when the returned promise -has been fulfilled. The next promise in the chain will be invoked with the -resolved value of the promise. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$nextPromise = new Promise(); - -$promise - ->then(function ($value) use ($nextPromise) { - echo $value; - return $nextPromise; - }) - ->then(function ($value) { - echo $value; - }); - -// Triggers the first callback and outputs "A" -$promise->resolve('A'); -// Triggers the second callback and outputs "B" -$nextPromise->resolve('B'); -``` - -### Promise Rejection - -When a promise is rejected, the `$onRejected` callbacks are invoked with the -rejection reason. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - echo $reason; -}); - -$promise->reject('Error!'); -// Outputs "Error!" -``` - -### Rejection Forwarding - -If an exception is thrown in an `$onRejected` callback, subsequent -`$onRejected` callbacks are invoked with the thrown exception as the reason. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - throw new Exception($reason); -})->then(null, function ($reason) { - assert($reason->getMessage() === 'Error!'); -}); - -$promise->reject('Error!'); -``` - -You can also forward a rejection down the promise chain by returning a -`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or -`$onRejected` callback. - -```php -use GuzzleHttp\Promise\Promise; -use GuzzleHttp\Promise\RejectedPromise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - return new RejectedPromise($reason); -})->then(null, function ($reason) { - assert($reason === 'Error!'); -}); - -$promise->reject('Error!'); -``` - -If an exception is not thrown in a `$onRejected` callback and the callback -does not return a rejected promise, downstream `$onFulfilled` callbacks are -invoked using the value returned from the `$onRejected` callback. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise - ->then(null, function ($reason) { - return "It's ok"; - }) - ->then(function ($value) { - assert($value === "It's ok"); - }); - -$promise->reject('Error!'); -``` - - -## Synchronous Wait - -You can synchronously force promises to complete using a promise's `wait` -method. When creating a promise, you can provide a wait function that is used -to synchronously force a promise to complete. When a wait function is invoked -it is expected to deliver a value to the promise or reject the promise. If the -wait function does not deliver a value, then an exception is thrown. The wait -function provided to a promise constructor is invoked when the `wait` function -of the promise is called. - -```php -$promise = new Promise(function () use (&$promise) { - $promise->resolve('foo'); -}); - -// Calling wait will return the value of the promise. -echo $promise->wait(); // outputs "foo" -``` - -If an exception is encountered while invoking the wait function of a promise, -the promise is rejected with the exception and the exception is thrown. - -```php -$promise = new Promise(function () use (&$promise) { - throw new Exception('foo'); -}); - -$promise->wait(); // throws the exception. -``` - -Calling `wait` on a promise that has been fulfilled will not trigger the wait -function. It will simply return the previously resolved value. - -```php -$promise = new Promise(function () { die('this is not called!'); }); -$promise->resolve('foo'); -echo $promise->wait(); // outputs "foo" -``` - -Calling `wait` on a promise that has been rejected will throw an exception. If -the rejection reason is an instance of `\Exception` the reason is thrown. -Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason -can be obtained by calling the `getReason` method of the exception. - -```php -$promise = new Promise(); -$promise->reject('foo'); -$promise->wait(); -``` - -> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' - -### Unwrapping a Promise - -When synchronously waiting on a promise, you are joining the state of the -promise into the current state of execution (i.e., return the value of the -promise if it was fulfilled or throw an exception if it was rejected). This is -called "unwrapping" the promise. Waiting on a promise will by default unwrap -the promise state. - -You can force a promise to resolve and *not* unwrap the state of the promise -by passing `false` to the first argument of the `wait` function: - -```php -$promise = new Promise(); -$promise->reject('foo'); -// This will not throw an exception. It simply ensures the promise has -// been resolved. -$promise->wait(false); -``` - -When unwrapping a promise, the resolved value of the promise will be waited -upon until the unwrapped value is not a promise. This means that if you resolve -promise A with a promise B and unwrap promise A, the value returned by the -wait function will be the value delivered to promise B. - -**Note**: when you do not unwrap the promise, no value is returned. - - -## Cancellation - -You can cancel a promise that has not yet been fulfilled using the `cancel()` -method of a promise. When creating a promise you can provide an optional -cancel function that when invoked cancels the action of computing a resolution -of the promise. - - -## API - -### Promise - -When creating a promise object, you can provide an optional `$waitFn` and -`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is -expected to resolve the promise. `$cancelFn` is a function with no arguments -that is expected to cancel the computation of a promise. It is invoked when the -`cancel()` method of a promise is called. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise( - function () use (&$promise) { - $promise->resolve('waited'); - }, - function () { - // do something that will cancel the promise computation (e.g., close - // a socket, cancel a database query, etc...) - } -); - -assert('waited' === $promise->wait()); -``` - -A promise has the following methods: - -- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` - - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. - -- `otherwise(callable $onRejected) : PromiseInterface` - - Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. - -- `wait($unwrap = true) : mixed` - - Synchronously waits on the promise to complete. - - `$unwrap` controls whether or not the value of the promise is returned for a - fulfilled promise or if an exception is thrown if the promise is rejected. - This is set to `true` by default. - -- `cancel()` - - Attempts to cancel the promise if possible. The promise being cancelled and - the parent most ancestor that has not yet been resolved will also be - cancelled. Any promises waiting on the cancelled promise to resolve will also - be cancelled. - -- `getState() : string` - - Returns the state of the promise. One of `pending`, `fulfilled`, or - `rejected`. - -- `resolve($value)` - - Fulfills the promise with the given `$value`. - -- `reject($reason)` - - Rejects the promise with the given `$reason`. - - -### FulfilledPromise - -A fulfilled promise can be created to represent a promise that has been -fulfilled. - -```php -use GuzzleHttp\Promise\FulfilledPromise; - -$promise = new FulfilledPromise('value'); - -// Fulfilled callbacks are immediately invoked. -$promise->then(function ($value) { - echo $value; -}); -``` - - -### RejectedPromise - -A rejected promise can be created to represent a promise that has been -rejected. - -```php -use GuzzleHttp\Promise\RejectedPromise; - -$promise = new RejectedPromise('Error'); - -// Rejected callbacks are immediately invoked. -$promise->then(null, function ($reason) { - echo $reason; -}); -``` - - -## Promise Interoperability - -This library works with foreign promises that have a `then` method. This means -you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) -for example. When a foreign promise is returned inside of a then method -callback, promise resolution will occur recursively. - -```php -// Create a React promise -$deferred = new React\Promise\Deferred(); -$reactPromise = $deferred->promise(); - -// Create a Guzzle promise that is fulfilled with a React promise. -$guzzlePromise = new GuzzleHttp\Promise\Promise(); -$guzzlePromise->then(function ($value) use ($reactPromise) { - // Do something something with the value... - // Return the React promise - return $reactPromise; -}); -``` - -Please note that wait and cancel chaining is no longer possible when forwarding -a foreign promise. You will need to wrap a third-party promise with a Guzzle -promise in order to utilize wait and cancel functions with foreign promises. - - -### Event Loop Integration - -In order to keep the stack size constant, Guzzle promises are resolved -asynchronously using a task queue. When waiting on promises synchronously, the -task queue will be automatically run to ensure that the blocking promise and -any forwarded promises are resolved. When using promises asynchronously in an -event loop, you will need to run the task queue on each tick of the loop. If -you do not run the task queue, then promises will not be resolved. - -You can run the task queue using the `run()` method of the global task queue -instance. - -```php -// Get the global task queue -$queue = GuzzleHttp\Promise\Utils::queue(); -$queue->run(); -``` - -For example, you could use Guzzle promises with React using a periodic timer: - -```php -$loop = React\EventLoop\Factory::create(); -$loop->addPeriodicTimer(0, [$queue, 'run']); -``` - - -## Implementation Notes - -### Promise Resolution and Chaining is Handled Iteratively - -By shuffling pending handlers from one owner to another, promises are -resolved iteratively, allowing for "infinite" then chaining. - -```php -then(function ($v) { - // The stack size remains constant (a good thing) - echo xdebug_get_stack_depth() . ', '; - return $v + 1; - }); -} - -$parent->resolve(0); -var_dump($p->wait()); // int(1000) - -``` - -When a promise is fulfilled or rejected with a non-promise value, the promise -then takes ownership of the handlers of each child promise and delivers values -down the chain without using recursion. - -When a promise is resolved with another promise, the original promise transfers -all of its pending handlers to the new promise. When the new promise is -eventually resolved, all of the pending handlers are delivered the forwarded -value. - -### A Promise is the Deferred - -Some promise libraries implement promises using a deferred object to represent -a computation and a promise object to represent the delivery of the result of -the computation. This is a nice separation of computation and delivery because -consumers of the promise cannot modify the value that will be eventually -delivered. - -One side effect of being able to implement promise resolution and chaining -iteratively is that you need to be able for one promise to reach into the state -of another promise to shuffle around ownership of handlers. In order to achieve -this without making the handlers of a promise publicly mutable, a promise is -also the deferred value, allowing promises of the same parent class to reach -into and modify the private properties of promises of the same type. While this -does allow consumers of the value to modify the resolution or rejection of the -deferred, it is a small price to pay for keeping the stack size constant. - -```php -$promise = new Promise(); -$promise->then(function ($value) { echo $value; }); -// The promise is the deferred value, so you can deliver a value to it. -$promise->resolve('foo'); -// prints "foo" -``` - - -## Upgrading from Function API - -A static API was first introduced in 1.4.0, in order to mitigate problems with -functions conflicting between global and local copies of the package. The -function API was removed in 2.0.0. A migration table has been provided here for -your convenience: - -| Original Function | Replacement Method | -|----------------|----------------| -| `queue` | `Utils::queue` | -| `task` | `Utils::task` | -| `promise_for` | `Create::promiseFor` | -| `rejection_for` | `Create::rejectionFor` | -| `exception_for` | `Create::exceptionFor` | -| `iter_for` | `Create::iterFor` | -| `inspect` | `Utils::inspect` | -| `inspect_all` | `Utils::inspectAll` | -| `unwrap` | `Utils::unwrap` | -| `all` | `Utils::all` | -| `some` | `Utils::some` | -| `any` | `Utils::any` | -| `settle` | `Utils::settle` | -| `each` | `Each::of` | -| `each_limit` | `Each::ofLimit` | -| `each_limit_all` | `Each::ofLimitAll` | -| `!is_fulfilled` | `Is::pending` | -| `is_fulfilled` | `Is::fulfilled` | -| `is_rejected` | `Is::rejected` | -| `is_settled` | `Is::settled` | -| `coroutine` | `Coroutine::of` | - - -## Security - -If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information. - - -## License - -Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. - - -## For Enterprise - -Available as part of the Tidelift Subscription - -The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-promises?utm_source=packagist-guzzlehttp-promises&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/lib/guzzlehttp/promises/composer.json b/lib/guzzlehttp/promises/composer.json deleted file mode 100644 index fc1989ec1..000000000 --- a/lib/guzzlehttp/promises/composer.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "guzzlehttp/promises", - "description": "Guzzle promises library", - "keywords": ["promise"], - "license": "MIT", - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Promise\\Tests\\": "tests/" - } - }, - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "config": { - "allow-plugins": { - "bamarni/composer-bin-plugin": true - }, - "preferred-install": "dist", - "sort-packages": true - } -} diff --git a/lib/guzzlehttp/promises/src/AggregateException.php b/lib/guzzlehttp/promises/src/AggregateException.php deleted file mode 100644 index 40ffdbcf1..000000000 --- a/lib/guzzlehttp/promises/src/AggregateException.php +++ /dev/null @@ -1,19 +0,0 @@ -then(function ($v) { echo $v; }); - * - * @param callable $generatorFn Generator function to wrap into a promise. - * - * @return Promise - * - * @see https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration - */ -final class Coroutine implements PromiseInterface -{ - /** - * @var PromiseInterface|null - */ - private $currentPromise; - - /** - * @var Generator - */ - private $generator; - - /** - * @var Promise - */ - private $result; - - public function __construct(callable $generatorFn) - { - $this->generator = $generatorFn(); - $this->result = new Promise(function (): void { - while (isset($this->currentPromise)) { - $this->currentPromise->wait(); - } - }); - try { - $this->nextCoroutine($this->generator->current()); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } - - /** - * Create a new coroutine. - */ - public static function of(callable $generatorFn): self - { - return new self($generatorFn); - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ): PromiseInterface { - return $this->result->then($onFulfilled, $onRejected); - } - - public function otherwise(callable $onRejected): PromiseInterface - { - return $this->result->otherwise($onRejected); - } - - public function wait(bool $unwrap = true) - { - return $this->result->wait($unwrap); - } - - public function getState(): string - { - return $this->result->getState(); - } - - public function resolve($value): void - { - $this->result->resolve($value); - } - - public function reject($reason): void - { - $this->result->reject($reason); - } - - public function cancel(): void - { - $this->currentPromise->cancel(); - $this->result->cancel(); - } - - private function nextCoroutine($yielded): void - { - $this->currentPromise = Create::promiseFor($yielded) - ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); - } - - /** - * @internal - */ - public function _handleSuccess($value): void - { - unset($this->currentPromise); - try { - $next = $this->generator->send($value); - if ($this->generator->valid()) { - $this->nextCoroutine($next); - } else { - $this->result->resolve($value); - } - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } - - /** - * @internal - */ - public function _handleFailure($reason): void - { - unset($this->currentPromise); - try { - $nextYield = $this->generator->throw(Create::exceptionFor($reason)); - // The throw was caught, so keep iterating on the coroutine - $this->nextCoroutine($nextYield); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } -} diff --git a/lib/guzzlehttp/promises/src/Create.php b/lib/guzzlehttp/promises/src/Create.php deleted file mode 100644 index 9d3fc4a1e..000000000 --- a/lib/guzzlehttp/promises/src/Create.php +++ /dev/null @@ -1,79 +0,0 @@ -then([$promise, 'resolve'], [$promise, 'reject']); - - return $promise; - } - - return new FulfilledPromise($value); - } - - /** - * Creates a rejected promise for a reason if the reason is not a promise. - * If the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - */ - public static function rejectionFor($reason): PromiseInterface - { - if ($reason instanceof PromiseInterface) { - return $reason; - } - - return new RejectedPromise($reason); - } - - /** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - */ - public static function exceptionFor($reason): \Throwable - { - if ($reason instanceof \Throwable) { - return $reason; - } - - return new RejectionException($reason); - } - - /** - * Returns an iterator for the given value. - * - * @param mixed $value - */ - public static function iterFor($value): \Iterator - { - if ($value instanceof \Iterator) { - return $value; - } - - if (is_array($value)) { - return new \ArrayIterator($value); - } - - return new \ArrayIterator([$value]); - } -} diff --git a/lib/guzzlehttp/promises/src/Each.php b/lib/guzzlehttp/promises/src/Each.php deleted file mode 100644 index 1a7aa0fb6..000000000 --- a/lib/guzzlehttp/promises/src/Each.php +++ /dev/null @@ -1,86 +0,0 @@ - $onFulfilled, - 'rejected' => $onRejected, - ]))->promise(); - } - - /** - * Like of, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow - * for dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - */ - public static function ofLimit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null - ): PromiseInterface { - return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected, - 'concurrency' => $concurrency, - ]))->promise(); - } - - /** - * Like limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - */ - public static function ofLimitAll( - $iterable, - $concurrency, - callable $onFulfilled = null - ): PromiseInterface { - return self::ofLimit( - $iterable, - $concurrency, - $onFulfilled, - function ($reason, $idx, PromiseInterface $aggregate): void { - $aggregate->reject($reason); - } - ); - } -} diff --git a/lib/guzzlehttp/promises/src/EachPromise.php b/lib/guzzlehttp/promises/src/EachPromise.php deleted file mode 100644 index 28dd9793a..000000000 --- a/lib/guzzlehttp/promises/src/EachPromise.php +++ /dev/null @@ -1,250 +0,0 @@ -iterable = Create::iterFor($iterable); - - if (isset($config['concurrency'])) { - $this->concurrency = $config['concurrency']; - } - - if (isset($config['fulfilled'])) { - $this->onFulfilled = $config['fulfilled']; - } - - if (isset($config['rejected'])) { - $this->onRejected = $config['rejected']; - } - } - - /** @psalm-suppress InvalidNullableReturnType */ - public function promise(): PromiseInterface - { - if ($this->aggregate) { - return $this->aggregate; - } - - try { - $this->createPromise(); - /** @psalm-assert Promise $this->aggregate */ - $this->iterable->rewind(); - $this->refillPending(); - } catch (\Throwable $e) { - $this->aggregate->reject($e); - } - - /** - * @psalm-suppress NullableReturnStatement - */ - return $this->aggregate; - } - - private function createPromise(): void - { - $this->mutex = false; - $this->aggregate = new Promise(function (): void { - if ($this->checkIfFinished()) { - return; - } - reset($this->pending); - // Consume a potentially fluctuating list of promises while - // ensuring that indexes are maintained (precluding array_shift). - while ($promise = current($this->pending)) { - next($this->pending); - $promise->wait(); - if (Is::settled($this->aggregate)) { - return; - } - } - }); - - // Clear the references when the promise is resolved. - $clearFn = function (): void { - $this->iterable = $this->concurrency = $this->pending = null; - $this->onFulfilled = $this->onRejected = null; - $this->nextPendingIndex = 0; - }; - - $this->aggregate->then($clearFn, $clearFn); - } - - private function refillPending(): void - { - if (!$this->concurrency) { - // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()) { - } - - return; - } - - // Add only up to N pending promises. - $concurrency = is_callable($this->concurrency) - ? call_user_func($this->concurrency, count($this->pending)) - : $this->concurrency; - $concurrency = max($concurrency - count($this->pending), 0); - // Concurrency may be set to 0 to disallow new promises. - if (!$concurrency) { - return; - } - // Add the first pending promise. - $this->addPending(); - // Note this is special handling for concurrency=1 so that we do - // not advance the iterator after adding the first promise. This - // helps work around issues with generators that might not have the - // next value to yield until promise callbacks are called. - while (--$concurrency - && $this->advanceIterator() - && $this->addPending()) { - } - } - - private function addPending(): bool - { - if (!$this->iterable || !$this->iterable->valid()) { - return false; - } - - $promise = Create::promiseFor($this->iterable->current()); - $key = $this->iterable->key(); - - // Iterable keys may not be unique, so we use a counter to - // guarantee uniqueness - $idx = $this->nextPendingIndex++; - - $this->pending[$idx] = $promise->then( - function ($value) use ($idx, $key): void { - if ($this->onFulfilled) { - call_user_func( - $this->onFulfilled, - $value, - $key, - $this->aggregate - ); - } - $this->step($idx); - }, - function ($reason) use ($idx, $key): void { - if ($this->onRejected) { - call_user_func( - $this->onRejected, - $reason, - $key, - $this->aggregate - ); - } - $this->step($idx); - } - ); - - return true; - } - - private function advanceIterator(): bool - { - // Place a lock on the iterator so that we ensure to not recurse, - // preventing fatal generator errors. - if ($this->mutex) { - return false; - } - - $this->mutex = true; - - try { - $this->iterable->next(); - $this->mutex = false; - - return true; - } catch (\Throwable $e) { - $this->aggregate->reject($e); - $this->mutex = false; - - return false; - } - } - - private function step(int $idx): void - { - // If the promise was already resolved, then ignore this step. - if (Is::settled($this->aggregate)) { - return; - } - - unset($this->pending[$idx]); - - // Only refill pending promises if we are not locked, preventing the - // EachPromise to recursively invoke the provided iterator, which - // cause a fatal error: "Cannot resume an already running generator" - if ($this->advanceIterator() && !$this->checkIfFinished()) { - // Add more pending promises if possible. - $this->refillPending(); - } - } - - private function checkIfFinished(): bool - { - if (!$this->pending && !$this->iterable->valid()) { - // Resolve the promise if there's nothing left to do. - $this->aggregate->resolve(null); - - return true; - } - - return false; - } -} diff --git a/lib/guzzlehttp/promises/src/FulfilledPromise.php b/lib/guzzlehttp/promises/src/FulfilledPromise.php deleted file mode 100644 index ab7129659..000000000 --- a/lib/guzzlehttp/promises/src/FulfilledPromise.php +++ /dev/null @@ -1,89 +0,0 @@ -value = $value; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ): PromiseInterface { - // Return itself if there is no onFulfilled function. - if (!$onFulfilled) { - return $this; - } - - $queue = Utils::queue(); - $p = new Promise([$queue, 'run']); - $value = $this->value; - $queue->add(static function () use ($p, $value, $onFulfilled): void { - if (Is::pending($p)) { - try { - $p->resolve($onFulfilled($value)); - } catch (\Throwable $e) { - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected): PromiseInterface - { - return $this->then(null, $onRejected); - } - - public function wait(bool $unwrap = true) - { - return $unwrap ? $this->value : null; - } - - public function getState(): string - { - return self::FULFILLED; - } - - public function resolve($value): void - { - if ($value !== $this->value) { - throw new \LogicException('Cannot resolve a fulfilled promise'); - } - } - - public function reject($reason): void - { - throw new \LogicException('Cannot reject a fulfilled promise'); - } - - public function cancel(): void - { - // pass - } -} diff --git a/lib/guzzlehttp/promises/src/Is.php b/lib/guzzlehttp/promises/src/Is.php deleted file mode 100644 index f3f050384..000000000 --- a/lib/guzzlehttp/promises/src/Is.php +++ /dev/null @@ -1,40 +0,0 @@ -getState() === PromiseInterface::PENDING; - } - - /** - * Returns true if a promise is fulfilled or rejected. - */ - public static function settled(PromiseInterface $promise): bool - { - return $promise->getState() !== PromiseInterface::PENDING; - } - - /** - * Returns true if a promise is fulfilled. - */ - public static function fulfilled(PromiseInterface $promise): bool - { - return $promise->getState() === PromiseInterface::FULFILLED; - } - - /** - * Returns true if a promise is rejected. - */ - public static function rejected(PromiseInterface $promise): bool - { - return $promise->getState() === PromiseInterface::REJECTED; - } -} diff --git a/lib/guzzlehttp/promises/src/Promise.php b/lib/guzzlehttp/promises/src/Promise.php deleted file mode 100644 index 1b07bdc9a..000000000 --- a/lib/guzzlehttp/promises/src/Promise.php +++ /dev/null @@ -1,281 +0,0 @@ -waitFn = $waitFn; - $this->cancelFn = $cancelFn; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ): PromiseInterface { - if ($this->state === self::PENDING) { - $p = new Promise(null, [$this, 'cancel']); - $this->handlers[] = [$p, $onFulfilled, $onRejected]; - $p->waitList = $this->waitList; - $p->waitList[] = $this; - - return $p; - } - - // Return a fulfilled promise and immediately invoke any callbacks. - if ($this->state === self::FULFILLED) { - $promise = Create::promiseFor($this->result); - - return $onFulfilled ? $promise->then($onFulfilled) : $promise; - } - - // It's either cancelled or rejected, so return a rejected promise - // and immediately invoke any callbacks. - $rejection = Create::rejectionFor($this->result); - - return $onRejected ? $rejection->then(null, $onRejected) : $rejection; - } - - public function otherwise(callable $onRejected): PromiseInterface - { - return $this->then(null, $onRejected); - } - - public function wait(bool $unwrap = true) - { - $this->waitIfPending(); - - if ($this->result instanceof PromiseInterface) { - return $this->result->wait($unwrap); - } - if ($unwrap) { - if ($this->state === self::FULFILLED) { - return $this->result; - } - // It's rejected so "unwrap" and throw an exception. - throw Create::exceptionFor($this->result); - } - } - - public function getState(): string - { - return $this->state; - } - - public function cancel(): void - { - if ($this->state !== self::PENDING) { - return; - } - - $this->waitFn = $this->waitList = null; - - if ($this->cancelFn) { - $fn = $this->cancelFn; - $this->cancelFn = null; - try { - $fn(); - } catch (\Throwable $e) { - $this->reject($e); - } - } - - // Reject the promise only if it wasn't rejected in a then callback. - /** @psalm-suppress RedundantCondition */ - if ($this->state === self::PENDING) { - $this->reject(new CancellationException('Promise has been cancelled')); - } - } - - public function resolve($value): void - { - $this->settle(self::FULFILLED, $value); - } - - public function reject($reason): void - { - $this->settle(self::REJECTED, $reason); - } - - private function settle(string $state, $value): void - { - if ($this->state !== self::PENDING) { - // Ignore calls with the same resolution. - if ($state === $this->state && $value === $this->result) { - return; - } - throw $this->state === $state - ? new \LogicException("The promise is already {$state}.") - : new \LogicException("Cannot change a {$this->state} promise to {$state}"); - } - - if ($value === $this) { - throw new \LogicException('Cannot fulfill or reject a promise with itself'); - } - - // Clear out the state of the promise but stash the handlers. - $this->state = $state; - $this->result = $value; - $handlers = $this->handlers; - $this->handlers = null; - $this->waitList = $this->waitFn = null; - $this->cancelFn = null; - - if (!$handlers) { - return; - } - - // If the value was not a settled promise or a thenable, then resolve - // it in the task queue using the correct ID. - if (!is_object($value) || !method_exists($value, 'then')) { - $id = $state === self::FULFILLED ? 1 : 2; - // It's a success, so resolve the handlers in the queue. - Utils::queue()->add(static function () use ($id, $value, $handlers): void { - foreach ($handlers as $handler) { - self::callHandler($id, $value, $handler); - } - }); - } elseif ($value instanceof Promise && Is::pending($value)) { - // We can just merge our handlers onto the next promise. - $value->handlers = array_merge($value->handlers, $handlers); - } else { - // Resolve the handlers when the forwarded promise is resolved. - $value->then( - static function ($value) use ($handlers): void { - foreach ($handlers as $handler) { - self::callHandler(1, $value, $handler); - } - }, - static function ($reason) use ($handlers): void { - foreach ($handlers as $handler) { - self::callHandler(2, $reason, $handler); - } - } - ); - } - } - - /** - * Call a stack of handlers using a specific callback index and value. - * - * @param int $index 1 (resolve) or 2 (reject). - * @param mixed $value Value to pass to the callback. - * @param array $handler Array of handler data (promise and callbacks). - */ - private static function callHandler(int $index, $value, array $handler): void - { - /** @var PromiseInterface $promise */ - $promise = $handler[0]; - - // The promise may have been cancelled or resolved before placing - // this thunk in the queue. - if (Is::settled($promise)) { - return; - } - - try { - if (isset($handler[$index])) { - /* - * If $f throws an exception, then $handler will be in the exception - * stack trace. Since $handler contains a reference to the callable - * itself we get a circular reference. We clear the $handler - * here to avoid that memory leak. - */ - $f = $handler[$index]; - unset($handler); - $promise->resolve($f($value)); - } elseif ($index === 1) { - // Forward resolution values as-is. - $promise->resolve($value); - } else { - // Forward rejections down the chain. - $promise->reject($value); - } - } catch (\Throwable $reason) { - $promise->reject($reason); - } - } - - private function waitIfPending(): void - { - if ($this->state !== self::PENDING) { - return; - } elseif ($this->waitFn) { - $this->invokeWaitFn(); - } elseif ($this->waitList) { - $this->invokeWaitList(); - } else { - // If there's no wait function, then reject the promise. - $this->reject('Cannot wait on a promise that has ' - .'no internal wait function. You must provide a wait ' - .'function when constructing the promise to be able to ' - .'wait on a promise.'); - } - - Utils::queue()->run(); - - /** @psalm-suppress RedundantCondition */ - if ($this->state === self::PENDING) { - $this->reject('Invoking the wait callback did not resolve the promise'); - } - } - - private function invokeWaitFn(): void - { - try { - $wfn = $this->waitFn; - $this->waitFn = null; - $wfn(true); - } catch (\Throwable $reason) { - if ($this->state === self::PENDING) { - // The promise has not been resolved yet, so reject the promise - // with the exception. - $this->reject($reason); - } else { - // The promise was already resolved, so there's a problem in - // the application. - throw $reason; - } - } - } - - private function invokeWaitList(): void - { - $waitList = $this->waitList; - $this->waitList = null; - - foreach ($waitList as $result) { - do { - $result->waitIfPending(); - $result = $result->result; - } while ($result instanceof Promise); - - if ($result instanceof PromiseInterface) { - $result->wait(false); - } - } - } -} diff --git a/lib/guzzlehttp/promises/src/PromiseInterface.php b/lib/guzzlehttp/promises/src/PromiseInterface.php deleted file mode 100644 index 2824802bb..000000000 --- a/lib/guzzlehttp/promises/src/PromiseInterface.php +++ /dev/null @@ -1,91 +0,0 @@ -reason = $reason; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ): PromiseInterface { - // If there's no onRejected callback then just return self. - if (!$onRejected) { - return $this; - } - - $queue = Utils::queue(); - $reason = $this->reason; - $p = new Promise([$queue, 'run']); - $queue->add(static function () use ($p, $reason, $onRejected): void { - if (Is::pending($p)) { - try { - // Return a resolved promise if onRejected does not throw. - $p->resolve($onRejected($reason)); - } catch (\Throwable $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected): PromiseInterface - { - return $this->then(null, $onRejected); - } - - public function wait(bool $unwrap = true) - { - if ($unwrap) { - throw Create::exceptionFor($this->reason); - } - - return null; - } - - public function getState(): string - { - return self::REJECTED; - } - - public function resolve($value): void - { - throw new \LogicException('Cannot resolve a rejected promise'); - } - - public function reject($reason): void - { - if ($reason !== $this->reason) { - throw new \LogicException('Cannot reject a rejected promise'); - } - } - - public function cancel(): void - { - // pass - } -} diff --git a/lib/guzzlehttp/promises/src/RejectionException.php b/lib/guzzlehttp/promises/src/RejectionException.php deleted file mode 100644 index 0db98ffb9..000000000 --- a/lib/guzzlehttp/promises/src/RejectionException.php +++ /dev/null @@ -1,49 +0,0 @@ -reason = $reason; - - $message = 'The promise was rejected'; - - if ($description) { - $message .= ' with reason: '.$description; - } elseif (is_string($reason) - || (is_object($reason) && method_exists($reason, '__toString')) - ) { - $message .= ' with reason: '.$this->reason; - } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT); - } - - parent::__construct($message); - } - - /** - * Returns the rejection reason. - * - * @return mixed - */ - public function getReason() - { - return $this->reason; - } -} diff --git a/lib/guzzlehttp/promises/src/TaskQueue.php b/lib/guzzlehttp/promises/src/TaskQueue.php deleted file mode 100644 index 503e0b2da..000000000 --- a/lib/guzzlehttp/promises/src/TaskQueue.php +++ /dev/null @@ -1,71 +0,0 @@ -run(); - * - * @final - */ -class TaskQueue implements TaskQueueInterface -{ - private $enableShutdown = true; - private $queue = []; - - public function __construct(bool $withShutdown = true) - { - if ($withShutdown) { - register_shutdown_function(function (): void { - if ($this->enableShutdown) { - // Only run the tasks if an E_ERROR didn't occur. - $err = error_get_last(); - if (!$err || ($err['type'] ^ E_ERROR)) { - $this->run(); - } - } - }); - } - } - - public function isEmpty(): bool - { - return !$this->queue; - } - - public function add(callable $task): void - { - $this->queue[] = $task; - } - - public function run(): void - { - while ($task = array_shift($this->queue)) { - /** @var callable $task */ - $task(); - } - } - - /** - * The task queue will be run and exhausted by default when the process - * exits IFF the exit is not the result of a PHP E_ERROR error. - * - * You can disable running the automatic shutdown of the queue by calling - * this function. If you disable the task queue shutdown process, then you - * MUST either run the task queue (as a result of running your event loop - * or manually using the run() method) or wait on each outstanding promise. - * - * Note: This shutdown will occur before any destructors are triggered. - */ - public function disableShutdown(): void - { - $this->enableShutdown = false; - } -} diff --git a/lib/guzzlehttp/promises/src/TaskQueueInterface.php b/lib/guzzlehttp/promises/src/TaskQueueInterface.php deleted file mode 100644 index 34c561a48..000000000 --- a/lib/guzzlehttp/promises/src/TaskQueueInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * GuzzleHttp\Promise\Utils::queue()->run(); - * } - * - * - * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. - */ - public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface - { - static $queue; - - if ($assign) { - $queue = $assign; - } elseif (!$queue) { - $queue = new TaskQueue(); - } - - return $queue; - } - - /** - * Adds a function to run in the task queue when it is next `run()` and - * returns a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - */ - public static function task(callable $task): PromiseInterface - { - $queue = self::queue(); - $promise = new Promise([$queue, 'run']); - $queue->add(function () use ($task, $promise): void { - try { - if (Is::pending($promise)) { - $promise->resolve($task()); - } - } catch (\Throwable $e) { - $promise->reject($e); - } - }); - - return $promise; - } - - /** - * Synchronously waits on a promise to resolve and returns an inspection - * state array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the - * array will contain a "value" key mapping to the fulfilled value of the - * promise. If the promise is rejected, the array will contain a "reason" - * key mapping to the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - */ - public static function inspect(PromiseInterface $promise): array - { - try { - return [ - 'state' => PromiseInterface::FULFILLED, - 'value' => $promise->wait(), - ]; - } catch (RejectionException $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; - } catch (\Throwable $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } - } - - /** - * Waits on all of the provided promises, but does not unwrap rejected - * promises as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - */ - public static function inspectAll($promises): array - { - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = self::inspect($promise); - } - - return $results; - } - - /** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same - * order the promises were provided). An exception is thrown if any of the - * promises are rejected. - * - * @param iterable $promises Iterable of PromiseInterface objects to wait on. - * - * @throws \Throwable on error - */ - public static function unwrap($promises): array - { - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = $promise->wait(); - } - - return $results; - } - - /** - * Given an array of promises, return a promise that is fulfilled when all - * the items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - */ - public static function all($promises, bool $recursive = false): PromiseInterface - { - $results = []; - $promise = Each::of( - $promises, - function ($value, $idx) use (&$results): void { - $results[$idx] = $value; - }, - function ($reason, $idx, Promise $aggregate): void { - $aggregate->reject($reason); - } - )->then(function () use (&$results) { - ksort($results); - - return $results; - }); - - if (true === $recursive) { - $promise = $promise->then(function ($results) use ($recursive, &$promises) { - foreach ($promises as $promise) { - if (Is::pending($promise)) { - return self::all($promises, $recursive); - } - } - - return $results; - }); - } - - return $promise; - } - - /** - * Initiate a competitive race between multiple promises or values (values - * will become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise - * is fulfilled with an array that contains the fulfillment values of the - * winners in order of resolution. - * - * This promise is rejected with a {@see AggregateException} if the number - * of fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - */ - public static function some(int $count, $promises): PromiseInterface - { - $results = []; - $rejections = []; - - return Each::of( - $promises, - function ($value, $idx, PromiseInterface $p) use (&$results, $count): void { - if (Is::settled($p)) { - return; - } - $results[$idx] = $value; - if (count($results) >= $count) { - $p->resolve(null); - } - }, - function ($reason) use (&$rejections): void { - $rejections[] = $reason; - } - )->then( - function () use (&$results, &$rejections, $count) { - if (count($results) !== $count) { - throw new AggregateException( - 'Not enough promises to fulfill count', - $rejections - ); - } - ksort($results); - - return array_values($results); - } - ); - } - - /** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - */ - public static function any($promises): PromiseInterface - { - return self::some(1, $promises)->then(function ($values) { - return $values[0]; - }); - } - - /** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param mixed $promises Promises or values. - */ - public static function settle($promises): PromiseInterface - { - $results = []; - - return Each::of( - $promises, - function ($value, $idx) use (&$results): void { - $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; - }, - function ($reason, $idx) use (&$results): void { - $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; - } - )->then(function () use (&$results) { - ksort($results); - - return $results; - }); - } -} diff --git a/lib/guzzlehttp/promises/vendor-bin/php-cs-fixer/composer.json b/lib/guzzlehttp/promises/vendor-bin/php-cs-fixer/composer.json deleted file mode 100644 index c9dd5ee42..000000000 --- a/lib/guzzlehttp/promises/vendor-bin/php-cs-fixer/composer.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "require": { - "php": "^7.4 || ^8.0", - "friendsofphp/php-cs-fixer": "3.16.0" - }, - "config": { - "preferred-install": "dist" - } -} diff --git a/lib/guzzlehttp/promises/vendor-bin/phpstan/composer.json b/lib/guzzlehttp/promises/vendor-bin/phpstan/composer.json deleted file mode 100644 index 711507cba..000000000 --- a/lib/guzzlehttp/promises/vendor-bin/phpstan/composer.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "require": { - "php": "^7.4 || ^8.0", - "phpstan/phpstan": "1.10.11", - "phpstan/phpstan-deprecation-rules": "1.1.3" - }, - "config": { - "preferred-install": "dist" - } -} diff --git a/lib/guzzlehttp/promises/vendor-bin/psalm/composer.json b/lib/guzzlehttp/promises/vendor-bin/psalm/composer.json deleted file mode 100644 index ab96f2caf..000000000 --- a/lib/guzzlehttp/promises/vendor-bin/psalm/composer.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "require": { - "php": "^7.4 || ^8.0", - "psalm/phar": "5.9.0" - }, - "config": { - "preferred-install": "dist" - } -} diff --git a/lib/guzzlehttp/psr7/CHANGELOG.md b/lib/guzzlehttp/psr7/CHANGELOG.md deleted file mode 100644 index fa716c094..000000000 --- a/lib/guzzlehttp/psr7/CHANGELOG.md +++ /dev/null @@ -1,416 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## Unreleased - -## 2.5.0 - 2023-04-17 - -### Changed - -- Adjusted `psr/http-message` version constraint to `^1.1 || ^2.0` - -## 2.4.5 - 2023-04-17 - -### Fixed - -- Prevent possible warnings on unset variables in `ServerRequest::normalizeNestedFileSpec` -- Fixed `Message::bodySummary` when `preg_match` fails -- Fixed header validation issue - -## 2.4.4 - 2023-03-09 - -### Changed - -- Removed the need for `AllowDynamicProperties` in `LazyOpenStream` - -## 2.4.3 - 2022-10-26 - -### Changed - -- Replaced `sha1(uniqid())` by `bin2hex(random_bytes(20))` - -## 2.4.2 - 2022-10-25 - -### Fixed - -- Fixed erroneous behaviour when combining host and relative path - -## 2.4.1 - 2022-08-28 - -### Fixed - -- Rewind body before reading in `Message::bodySummary` - -## 2.4.0 - 2022-06-20 - -### Added - -- Added provisional PHP 8.2 support -- Added `UriComparator::isCrossOrigin` method - -## 2.3.0 - 2022-06-09 - -### Fixed - -- Added `Header::splitList` method -- Added `Utils::tryGetContents` method -- Improved `Stream::getContents` method -- Updated mimetype mappings - -## 2.2.2 - 2022-06-08 - -### Fixed - -- Fix `Message::parseRequestUri` for numeric headers -- Re-wrap exceptions thrown in `fread` into runtime exceptions -- Throw an exception when multipart options is misformatted - -## 2.2.1 - 2022-03-20 - -### Fixed - -- Correct header value validation - -## 2.2.0 - 2022-03-20 - -### Added - -- A more compressive list of mime types -- Add JsonSerializable to Uri -- Missing return types - -### Fixed - -- Bug MultipartStream no `uri` metadata -- Bug MultipartStream with filename for `data://` streams -- Fixed new line handling in MultipartStream -- Reduced RAM usage when copying streams -- Updated parsing in `Header::normalize()` - -## 2.1.1 - 2022-03-20 - -### Fixed - -- Validate header values properly - -## 2.1.0 - 2021-10-06 - -### Changed - -- Attempting to create a `Uri` object from a malformed URI will no longer throw a generic - `InvalidArgumentException`, but rather a `MalformedUriException`, which inherits from the former - for backwards compatibility. Callers relying on the exception being thrown to detect invalid - URIs should catch the new exception. - -### Fixed - -- Return `null` in caching stream size if remote size is `null` - -## 2.0.0 - 2021-06-30 - -Identical to the RC release. - -## 2.0.0@RC-1 - 2021-04-29 - -### Fixed - -- Handle possibly unset `url` in `stream_get_meta_data` - -## 2.0.0@beta-1 - 2021-03-21 - -### Added - -- PSR-17 factories -- Made classes final -- PHP7 type hints - -### Changed - -- When building a query string, booleans are represented as 1 and 0. - -### Removed - -- PHP < 7.2 support -- All functions in the `GuzzleHttp\Psr7` namespace - -## 1.8.1 - 2021-03-21 - -### Fixed - -- Issue parsing IPv6 URLs -- Issue modifying ServerRequest lost all its attributes - -## 1.8.0 - 2021-03-21 - -### Added - -- Locale independent URL parsing -- Most classes got a `@final` annotation to prepare for 2.0 - -### Fixed - -- Issue when creating stream from `php://input` and curl-ext is not installed -- Broken `Utils::tryFopen()` on PHP 8 - -## 1.7.0 - 2020-09-30 - -### Added - -- Replaced functions by static methods - -### Fixed - -- Converting a non-seekable stream to a string -- Handle multiple Set-Cookie correctly -- Ignore array keys in header values when merging -- Allow multibyte characters to be parsed in `Message:bodySummary()` - -### Changed - -- Restored partial HHVM 3 support - - -## [1.6.1] - 2019-07-02 - -### Fixed - -- Accept null and bool header values again - - -## [1.6.0] - 2019-06-30 - -### Added - -- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244) -- Added MIME type for WEBP image format (#246) -- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272) - -### Changed - -- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262) -- Accept port number 0 to be valid (#270) - -### Fixed - -- Fixed subsequent reads from `php://input` in ServerRequest (#247) -- Fixed readable/writable detection for certain stream modes (#248) -- Fixed encoding of special characters in the `userInfo` component of an URI (#253) - - -## [1.5.2] - 2018-12-04 - -### Fixed - -- Check body size when getting the message summary - - -## [1.5.1] - 2018-12-04 - -### Fixed - -- Get the summary of a body only if it is readable - - -## [1.5.0] - 2018-12-03 - -### Added - -- Response first-line to response string exception (fixes #145) -- A test for #129 behavior -- `get_message_body_summary` function in order to get the message summary -- `3gp` and `mkv` mime types - -### Changed - -- Clarify exception message when stream is detached - -### Deprecated - -- Deprecated parsing folded header lines as per RFC 7230 - -### Fixed - -- Fix `AppendStream::detach` to not close streams -- `InflateStream` preserves `isSeekable` attribute of the underlying stream -- `ServerRequest::getUriFromGlobals` to support URLs in query parameters - - -Several other fixes and improvements. - - -## [1.4.2] - 2017-03-20 - -### Fixed - -- Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing - calls to `trigger_error` when deprecated methods are invoked. - - -## [1.4.1] - 2017-02-27 - -### Added - -- Rriggering of silenced deprecation warnings. - -### Fixed - -- Reverted BC break by reintroducing behavior to automagically fix a URI with a - relative path and an authority by adding a leading slash to the path. It's only - deprecated now. - - -## [1.4.0] - 2017-02-21 - -### Added - -- Added common URI utility methods based on RFC 3986 (see documentation in the readme): - - `Uri::isDefaultPort` - - `Uri::isAbsolute` - - `Uri::isNetworkPathReference` - - `Uri::isAbsolutePathReference` - - `Uri::isRelativePathReference` - - `Uri::isSameDocumentReference` - - `Uri::composeComponents` - - `UriNormalizer::normalize` - - `UriNormalizer::isEquivalent` - - `UriResolver::relativize` - -### Changed - -- Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form. -- Allow `parse_response` to parse a response without delimiting space and reason. -- Ensure each URI modification results in a valid URI according to PSR-7 discussions. - Invalid modifications will throw an exception instead of returning a wrong URI or - doing some magic. - - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception - because the path of a URI with an authority must start with a slash "/" or be empty - - `(new Uri())->withScheme('http')` will return `'http://localhost'` - -### Deprecated - -- `Uri::resolve` in favor of `UriResolver::resolve` -- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` - -### Fixed - -- `Stream::read` when length parameter <= 0. -- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. -- `ServerRequest::getUriFromGlobals` when `Host` header contains port. -- Compatibility of URIs with `file` scheme and empty host. - - -## [1.3.1] - 2016-06-25 - -### Fixed - -- `Uri::__toString` for network path references, e.g. `//example.org`. -- Missing lowercase normalization for host. -- Handling of URI components in case they are `'0'` in a lot of places, - e.g. as a user info password. -- `Uri::withAddedHeader` to correctly merge headers with different case. -- Trimming of header values in `Uri::withAddedHeader`. Header values may - be surrounded by whitespace which should be ignored according to RFC 7230 - Section 3.2.4. This does not apply to header names. -- `Uri::withAddedHeader` with an array of header values. -- `Uri::resolve` when base path has no slash and handling of fragment. -- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the - key/value both in encoded as well as decoded form to those methods. This is - consistent with withPath, withQuery etc. -- `ServerRequest::withoutAttribute` when attribute value is null. - - -## [1.3.0] - 2016-04-13 - -### Added - -- Remaining interfaces needed for full PSR7 compatibility - (ServerRequestInterface, UploadedFileInterface, etc.). -- Support for stream_for from scalars. - -### Changed - -- Can now extend Uri. - -### Fixed -- A bug in validating request methods by making it more permissive. - - -## [1.2.3] - 2016-02-18 - -### Fixed - -- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote - streams, which can sometimes return fewer bytes than requested with `fread`. -- Handling of gzipped responses with FNAME headers. - - -## [1.2.2] - 2016-01-22 - -### Added - -- Support for URIs without any authority. -- Support for HTTP 451 'Unavailable For Legal Reasons.' -- Support for using '0' as a filename. -- Support for including non-standard ports in Host headers. - - -## [1.2.1] - 2015-11-02 - -### Changes - -- Now supporting negative offsets when seeking to SEEK_END. - - -## [1.2.0] - 2015-08-15 - -### Changed - -- Body as `"0"` is now properly added to a response. -- Now allowing forward seeking in CachingStream. -- Now properly parsing HTTP requests that contain proxy targets in - `parse_request`. -- functions.php is now conditionally required. -- user-info is no longer dropped when resolving URIs. - - -## [1.1.0] - 2015-06-24 - -### Changed - -- URIs can now be relative. -- `multipart/form-data` headers are now overridden case-insensitively. -- URI paths no longer encode the following characters because they are allowed - in URIs: "(", ")", "*", "!", "'" -- A port is no longer added to a URI when the scheme is missing and no port is - present. - - -## 1.0.0 - 2015-05-19 - -Initial release. - -Currently unsupported: - -- `Psr\Http\Message\ServerRequestInterface` -- `Psr\Http\Message\UploadedFileInterface` - - - -[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 -[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 -[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 -[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 -[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 -[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 -[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 -[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 -[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 -[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 -[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 -[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 -[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 -[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 diff --git a/lib/guzzlehttp/psr7/LICENSE b/lib/guzzlehttp/psr7/LICENSE deleted file mode 100644 index 51c7ec81c..000000000 --- a/lib/guzzlehttp/psr7/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Michael Dowling -Copyright (c) 2015 Márk Sági-Kazár -Copyright (c) 2015 Graham Campbell -Copyright (c) 2016 Tobias Schultze -Copyright (c) 2016 George Mponos -Copyright (c) 2018 Tobias Nyholm - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/guzzlehttp/psr7/README.md b/lib/guzzlehttp/psr7/README.md deleted file mode 100644 index 9566a7d47..000000000 --- a/lib/guzzlehttp/psr7/README.md +++ /dev/null @@ -1,880 +0,0 @@ -# PSR-7 Message Implementation - -This repository contains a full [PSR-7](https://www.php-fig.org/psr/psr-7/) -message implementation, several stream decorators, and some helpful -functionality like query string parsing. - -![CI](https://github.com/guzzle/psr7/workflows/CI/badge.svg) -![Static analysis](https://github.com/guzzle/psr7/workflows/Static%20analysis/badge.svg) - - -# Installation - -```shell -composer require guzzlehttp/psr7 -``` - -# Stream implementation - -This package comes with a number of stream implementations and stream -decorators. - - -## AppendStream - -`GuzzleHttp\Psr7\AppendStream` - -Reads from multiple streams, one after the other. - -```php -use GuzzleHttp\Psr7; - -$a = Psr7\Utils::streamFor('abc, '); -$b = Psr7\Utils::streamFor('123.'); -$composed = new Psr7\AppendStream([$a, $b]); - -$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me')); - -echo $composed; // abc, 123. Above all listen to me. -``` - - -## BufferStream - -`GuzzleHttp\Psr7\BufferStream` - -Provides a buffer stream that can be written to fill a buffer, and read -from to remove bytes from the buffer. - -This stream returns a "hwm" metadata value that tells upstream consumers -what the configured high water mark of the stream is, or the maximum -preferred size of the buffer. - -```php -use GuzzleHttp\Psr7; - -// When more than 1024 bytes are in the buffer, it will begin returning -// false to writes. This is an indication that writers should slow down. -$buffer = new Psr7\BufferStream(1024); -``` - - -## CachingStream - -The CachingStream is used to allow seeking over previously read bytes on -non-seekable streams. This can be useful when transferring a non-seekable -entity body fails due to needing to rewind the stream (for example, resulting -from a redirect). Data that is read from the remote stream will be buffered in -a PHP temp stream so that previously read bytes are cached first in memory, -then on disk. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r')); -$stream = new Psr7\CachingStream($original); - -$stream->read(1024); -echo $stream->tell(); -// 1024 - -$stream->seek(0); -echo $stream->tell(); -// 0 -``` - - -## DroppingStream - -`GuzzleHttp\Psr7\DroppingStream` - -Stream decorator that begins dropping data once the size of the underlying -stream becomes too full. - -```php -use GuzzleHttp\Psr7; - -// Create an empty stream -$stream = Psr7\Utils::streamFor(); - -// Start dropping data when the stream has more than 10 bytes -$dropping = new Psr7\DroppingStream($stream, 10); - -$dropping->write('01234567890123456789'); -echo $stream; // 0123456789 -``` - - -## FnStream - -`GuzzleHttp\Psr7\FnStream` - -Compose stream implementations based on a hash of functions. - -Allows for easy testing and extension of a provided stream without needing -to create a concrete class for a simple extension point. - -```php - -use GuzzleHttp\Psr7; - -$stream = Psr7\Utils::streamFor('hi'); -$fnStream = Psr7\FnStream::decorate($stream, [ - 'rewind' => function () use ($stream) { - echo 'About to rewind - '; - $stream->rewind(); - echo 'rewound!'; - } -]); - -$fnStream->rewind(); -// Outputs: About to rewind - rewound! -``` - - -## InflateStream - -`GuzzleHttp\Psr7\InflateStream` - -Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content. - -This stream decorator converts the provided stream to a PHP stream resource, -then appends the zlib.inflate filter. The stream is then converted back -to a Guzzle stream resource to be used as a Guzzle stream. - - -## LazyOpenStream - -`GuzzleHttp\Psr7\LazyOpenStream` - -Lazily reads or writes to a file that is opened only after an IO operation -take place on the stream. - -```php -use GuzzleHttp\Psr7; - -$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); -// The file has not yet been opened... - -echo $stream->read(10); -// The file is opened and read from only when needed. -``` - - -## LimitStream - -`GuzzleHttp\Psr7\LimitStream` - -LimitStream can be used to read a subset or slice of an existing stream object. -This can be useful for breaking a large file into smaller pieces to be sent in -chunks (e.g. Amazon S3's multipart upload API). - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+')); -echo $original->getSize(); -// >>> 1048576 - -// Limit the size of the body to 1024 bytes and start reading from byte 2048 -$stream = new Psr7\LimitStream($original, 1024, 2048); -echo $stream->getSize(); -// >>> 1024 -echo $stream->tell(); -// >>> 0 -``` - - -## MultipartStream - -`GuzzleHttp\Psr7\MultipartStream` - -Stream that when read returns bytes for a streaming multipart or -multipart/form-data stream. - - -## NoSeekStream - -`GuzzleHttp\Psr7\NoSeekStream` - -NoSeekStream wraps a stream and does not allow seeking. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor('foo'); -$noSeek = new Psr7\NoSeekStream($original); - -echo $noSeek->read(3); -// foo -var_export($noSeek->isSeekable()); -// false -$noSeek->seek(0); -var_export($noSeek->read(3)); -// NULL -``` - - -## PumpStream - -`GuzzleHttp\Psr7\PumpStream` - -Provides a read only stream that pumps data from a PHP callable. - -When invoking the provided callable, the PumpStream will pass the amount of -data requested to read to the callable. The callable can choose to ignore -this value and return fewer or more bytes than requested. Any extra data -returned by the provided callable is buffered internally until drained using -the read() function of the PumpStream. The provided callable MUST return -false when there is no more data to read. - - -## Implementing stream decorators - -Creating a stream decorator is very easy thanks to the -`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that -implement `Psr\Http\Message\StreamInterface` by proxying to an underlying -stream. Just `use` the `StreamDecoratorTrait` and implement your custom -methods. - -For example, let's say we wanted to call a specific function each time the last -byte is read from a stream. This could be implemented by overriding the -`read()` method. - -```php -use Psr\Http\Message\StreamInterface; -use GuzzleHttp\Psr7\StreamDecoratorTrait; - -class EofCallbackStream implements StreamInterface -{ - use StreamDecoratorTrait; - - private $callback; - - private $stream; - - public function __construct(StreamInterface $stream, callable $cb) - { - $this->stream = $stream; - $this->callback = $cb; - } - - public function read($length) - { - $result = $this->stream->read($length); - - // Invoke the callback when EOF is hit. - if ($this->eof()) { - call_user_func($this->callback); - } - - return $result; - } -} -``` - -This decorator could be added to any existing stream and used like so: - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor('foo'); - -$eofStream = new EofCallbackStream($original, function () { - echo 'EOF!'; -}); - -$eofStream->read(2); -$eofStream->read(1); -// echoes "EOF!" -$eofStream->seek(0); -$eofStream->read(3); -// echoes "EOF!" -``` - - -## PHP StreamWrapper - -You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a -PSR-7 stream as a PHP stream resource. - -Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP -stream from a PSR-7 stream. - -```php -use GuzzleHttp\Psr7\StreamWrapper; - -$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!'); -$resource = StreamWrapper::getResource($stream); -echo fread($resource, 6); // outputs hello! -``` - - -# Static API - -There are various static methods available under the `GuzzleHttp\Psr7` namespace. - - -## `GuzzleHttp\Psr7\Message::toString` - -`public static function toString(MessageInterface $message): string` - -Returns the string representation of an HTTP message. - -```php -$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); -echo GuzzleHttp\Psr7\Message::toString($request); -``` - - -## `GuzzleHttp\Psr7\Message::bodySummary` - -`public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null` - -Get a short summary of the message body. - -Will return `null` if the response is not printable. - - -## `GuzzleHttp\Psr7\Message::rewindBody` - -`public static function rewindBody(MessageInterface $message): void` - -Attempts to rewind a message body and throws an exception on failure. - -The body of the message will only be rewound if a call to `tell()` -returns a value other than `0`. - - -## `GuzzleHttp\Psr7\Message::parseMessage` - -`public static function parseMessage(string $message): array` - -Parses an HTTP message into an associative array. - -The array contains the "start-line" key containing the start line of -the message, "headers" key containing an associative array of header -array values, and a "body" key containing the body of the message. - - -## `GuzzleHttp\Psr7\Message::parseRequestUri` - -`public static function parseRequestUri(string $path, array $headers): string` - -Constructs a URI for an HTTP request message. - - -## `GuzzleHttp\Psr7\Message::parseRequest` - -`public static function parseRequest(string $message): Request` - -Parses a request message string into a request object. - - -## `GuzzleHttp\Psr7\Message::parseResponse` - -`public static function parseResponse(string $message): Response` - -Parses a response message string into a response object. - - -## `GuzzleHttp\Psr7\Header::parse` - -`public static function parse(string|array $header): array` - -Parse an array of header values containing ";" separated data into an -array of associative arrays representing the header key value pair data -of the header. When a parameter does not contain a value, but just -contains a key, this function will inject a key with a '' string value. - - -## `GuzzleHttp\Psr7\Header::splitList` - -`public static function splitList(string|string[] $header): string[]` - -Splits a HTTP header defined to contain a comma-separated list into -each individual value: - -``` -$knownEtags = Header::splitList($request->getHeader('if-none-match')); -``` - -Example headers include `accept`, `cache-control` and `if-none-match`. - - -## `GuzzleHttp\Psr7\Header::normalize` (deprecated) - -`public static function normalize(string|array $header): array` - -`Header::normalize()` is deprecated in favor of [`Header::splitList()`](README.md#guzzlehttppsr7headersplitlist) -which performs the same operation with a cleaned up API and improved -documentation. - -Converts an array of header values that may contain comma separated -headers into an array of headers with no comma separated values. - - -## `GuzzleHttp\Psr7\Query::parse` - -`public static function parse(string $str, int|bool $urlEncoding = true): array` - -Parse a query string into an associative array. - -If multiple values are found for the same key, the value of that key -value pair will become an array. This function does not parse nested -PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` -will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. - - -## `GuzzleHttp\Psr7\Query::build` - -`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string` - -Build a query string from an array of key value pairs. - -This function can use the return value of `parse()` to build a query -string. This function does not modify the provided keys when an array is -encountered (like `http_build_query()` would). - - -## `GuzzleHttp\Psr7\Utils::caselessRemove` - -`public static function caselessRemove(iterable $keys, $keys, array $data): array` - -Remove the items given by the keys, case insensitively from the data. - - -## `GuzzleHttp\Psr7\Utils::copyToStream` - -`public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void` - -Copy the contents of a stream into another stream until the given number -of bytes have been read. - - -## `GuzzleHttp\Psr7\Utils::copyToString` - -`public static function copyToString(StreamInterface $stream, int $maxLen = -1): string` - -Copy the contents of a stream into a string until the given number of -bytes have been read. - - -## `GuzzleHttp\Psr7\Utils::hash` - -`public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string` - -Calculate a hash of a stream. - -This method reads the entire stream to calculate a rolling hash, based on -PHP's `hash_init` functions. - - -## `GuzzleHttp\Psr7\Utils::modifyRequest` - -`public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface` - -Clone and modify a request with the given changes. - -This method is useful for reducing the number of clones needed to mutate -a message. - -- method: (string) Changes the HTTP method. -- set_headers: (array) Sets the given headers. -- remove_headers: (array) Remove the given headers. -- body: (mixed) Sets the given body. -- uri: (UriInterface) Set the URI. -- query: (string) Set the query string value of the URI. -- version: (string) Set the protocol version. - - -## `GuzzleHttp\Psr7\Utils::readLine` - -`public static function readLine(StreamInterface $stream, int $maxLength = null): string` - -Read a line from the stream up to the maximum allowed buffer length. - - -## `GuzzleHttp\Psr7\Utils::streamFor` - -`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface` - -Create a new stream based on the input type. - -Options is an associative array that can contain the following keys: - -- metadata: Array of custom metadata. -- size: Size of the stream. - -This method accepts the following `$resource` types: - -- `Psr\Http\Message\StreamInterface`: Returns the value as-is. -- `string`: Creates a stream object that uses the given string as the contents. -- `resource`: Creates a stream object that wraps the given PHP stream resource. -- `Iterator`: If the provided value implements `Iterator`, then a read-only - stream object will be created that wraps the given iterable. Each time the - stream is read from, data from the iterator will fill a buffer and will be - continuously called until the buffer is equal to the requested read size. - Subsequent read calls will first read from the buffer and then call `next` - on the underlying iterator until it is exhausted. -- `object` with `__toString()`: If the object has the `__toString()` method, - the object will be cast to a string and then a stream will be returned that - uses the string value. -- `NULL`: When `null` is passed, an empty stream object is returned. -- `callable` When a callable is passed, a read-only stream object will be - created that invokes the given callable. The callable is invoked with the - number of suggested bytes to read. The callable can return any number of - bytes, but MUST return `false` when there is no more data to return. The - stream object that wraps the callable will invoke the callable until the - number of requested bytes are available. Any additional bytes will be - buffered and used in subsequent reads. - -```php -$stream = GuzzleHttp\Psr7\Utils::streamFor('foo'); -$stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r')); - -$generator = function ($bytes) { - for ($i = 0; $i < $bytes; $i++) { - yield ' '; - } -} - -$stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100)); -``` - - -## `GuzzleHttp\Psr7\Utils::tryFopen` - -`public static function tryFopen(string $filename, string $mode): resource` - -Safely opens a PHP stream resource using a filename. - -When fopen fails, PHP normally raises a warning. This function adds an -error handler that checks for errors and throws an exception instead. - - -## `GuzzleHttp\Psr7\Utils::tryGetContents` - -`public static function tryGetContents(resource $stream): string` - -Safely gets the contents of a given stream. - -When stream_get_contents fails, PHP normally raises a warning. This -function adds an error handler that checks for errors and throws an -exception instead. - - -## `GuzzleHttp\Psr7\Utils::uriFor` - -`public static function uriFor(string|UriInterface $uri): UriInterface` - -Returns a UriInterface for the given value. - -This function accepts a string or UriInterface and returns a -UriInterface for the given value. If the value is already a -UriInterface, it is returned as-is. - - -## `GuzzleHttp\Psr7\MimeType::fromFilename` - -`public static function fromFilename(string $filename): string|null` - -Determines the mimetype of a file by looking at its extension. - - -## `GuzzleHttp\Psr7\MimeType::fromExtension` - -`public static function fromExtension(string $extension): string|null` - -Maps a file extensions to a mimetype. - - -## Upgrading from Function API - -The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API was removed in 2.0.0. A migration table has been provided here for your convenience: - -| Original Function | Replacement Method | -|----------------|----------------| -| `str` | `Message::toString` | -| `uri_for` | `Utils::uriFor` | -| `stream_for` | `Utils::streamFor` | -| `parse_header` | `Header::parse` | -| `normalize_header` | `Header::normalize` | -| `modify_request` | `Utils::modifyRequest` | -| `rewind_body` | `Message::rewindBody` | -| `try_fopen` | `Utils::tryFopen` | -| `copy_to_string` | `Utils::copyToString` | -| `copy_to_stream` | `Utils::copyToStream` | -| `hash` | `Utils::hash` | -| `readline` | `Utils::readLine` | -| `parse_request` | `Message::parseRequest` | -| `parse_response` | `Message::parseResponse` | -| `parse_query` | `Query::parse` | -| `build_query` | `Query::build` | -| `mimetype_from_filename` | `MimeType::fromFilename` | -| `mimetype_from_extension` | `MimeType::fromExtension` | -| `_parse_message` | `Message::parseMessage` | -| `_parse_request_uri` | `Message::parseRequestUri` | -| `get_message_body_summary` | `Message::bodySummary` | -| `_caseless_remove` | `Utils::caselessRemove` | - - -# Additional URI Methods - -Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, -this library also provides additional functionality when working with URIs as static methods. - -## URI Types - -An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. -An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, -the base URI. Relative references can be divided into several forms according to -[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): - -- network-path references, e.g. `//example.com/path` -- absolute-path references, e.g. `/path` -- relative-path references, e.g. `subpath` - -The following methods can be used to identify the type of the URI. - -### `GuzzleHttp\Psr7\Uri::isAbsolute` - -`public static function isAbsolute(UriInterface $uri): bool` - -Whether the URI is absolute, i.e. it has a scheme. - -### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` - -`public static function isNetworkPathReference(UriInterface $uri): bool` - -Whether the URI is a network-path reference. A relative reference that begins with two slash characters is -termed an network-path reference. - -### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` - -`public static function isAbsolutePathReference(UriInterface $uri): bool` - -Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is -termed an absolute-path reference. - -### `GuzzleHttp\Psr7\Uri::isRelativePathReference` - -`public static function isRelativePathReference(UriInterface $uri): bool` - -Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is -termed a relative-path reference. - -### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` - -`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` - -Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its -fragment component, identical to the base URI. When no base URI is given, only an empty URI reference -(apart from its fragment) is considered a same-document reference. - -## URI Components - -Additional methods to work with URI components. - -### `GuzzleHttp\Psr7\Uri::isDefaultPort` - -`public static function isDefaultPort(UriInterface $uri): bool` - -Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null -or the standard port. This method can be used independently of the implementation. - -### `GuzzleHttp\Psr7\Uri::composeComponents` - -`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` - -Composes a URI reference string from its various components according to -[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called -manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. - -### `GuzzleHttp\Psr7\Uri::fromParts` - -`public static function fromParts(array $parts): UriInterface` - -Creates a URI from a hash of [`parse_url`](https://www.php.net/manual/en/function.parse-url.php) components. - - -### `GuzzleHttp\Psr7\Uri::withQueryValue` - -`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` - -Creates a new URI with a specific query string value. Any existing query string values that exactly match the -provided key are removed and replaced with the given key value pair. A value of null will set the query string -key without a value, e.g. "key" instead of "key=value". - -### `GuzzleHttp\Psr7\Uri::withQueryValues` - -`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` - -Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an -associative array of key => value. - -### `GuzzleHttp\Psr7\Uri::withoutQueryValue` - -`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` - -Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the -provided key are removed. - -## Cross-Origin Detection - -`GuzzleHttp\Psr7\UriComparator` provides methods to determine if a modified URL should be considered cross-origin. - -### `GuzzleHttp\Psr7\UriComparator::isCrossOrigin` - -`public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool` - -Determines if a modified URL should be considered cross-origin with respect to an original URL. - -## Reference Resolution - -`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according -to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers -do when resolving a link in a website based on the current request URI. - -### `GuzzleHttp\Psr7\UriResolver::resolve` - -`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` - -Converts the relative URI into a new URI that is resolved against the base URI. - -### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` - -`public static function removeDotSegments(string $path): string` - -Removes dot segments from a path and returns the new path according to -[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). - -### `GuzzleHttp\Psr7\UriResolver::relativize` - -`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` - -Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): - -```php -(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) -``` - -One use-case is to use the current request URI as base URI and then generate relative links in your documents -to reduce the document size or offer self-contained downloadable document archives. - -```php -$base = new Uri('http://example.com/a/b/'); -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. -echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. -``` - -## Normalization and Comparison - -`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to -[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). - -### `GuzzleHttp\Psr7\UriNormalizer::normalize` - -`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` - -Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. -This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask -of normalizations to apply. The following normalizations are available: - -- `UriNormalizer::PRESERVING_NORMALIZATIONS` - - Default normalizations which only include the ones that preserve semantics. - -- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` - - All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. - - Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` - -- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` - - Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of - ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should - not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved - characters by URI normalizers. - - Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` - -- `UriNormalizer::CONVERT_EMPTY_PATH` - - Converts the empty path to "/" for http and https URIs. - - Example: `http://example.org` → `http://example.org/` - -- `UriNormalizer::REMOVE_DEFAULT_HOST` - - Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host - "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to - RFC 3986. - - Example: `file://localhost/myfile` → `file:///myfile` - -- `UriNormalizer::REMOVE_DEFAULT_PORT` - - Removes the default port of the given URI scheme from the URI. - - Example: `http://example.org:80/` → `http://example.org/` - -- `UriNormalizer::REMOVE_DOT_SEGMENTS` - - Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would - change the semantics of the URI reference. - - Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` - -- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` - - Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes - and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization - may change the semantics. Encoded slashes (%2F) are not removed. - - Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` - -- `UriNormalizer::SORT_QUERY_PARAMETERS` - - Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be - significant (this is not defined by the standard). So this normalization is not safe and may change the semantics - of the URI. - - Example: `?lang=en&article=fred` → `?article=fred&lang=en` - -### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` - -`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` - -Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given -`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. -This of course assumes they will be resolved against the same base URI. If this is not the case, determination of -equivalence or difference of relative references does not mean anything. - - -## Version Guidance - -| Version | Status | PHP Version | -|---------|----------------|------------------| -| 1.x | Security fixes | >=5.4,<8.1 | -| 2.x | Latest | ^7.2.5 \|\| ^8.0 | - - -## Security - -If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information. - - -## License - -Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. - - -## For Enterprise - -Available as part of the Tidelift Subscription - -The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-psr7?utm_source=packagist-guzzlehttp-psr7&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/lib/guzzlehttp/psr7/composer.json b/lib/guzzlehttp/psr7/composer.json deleted file mode 100644 index d51dd622e..000000000 --- a/lib/guzzlehttp/psr7/composer.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "guzzlehttp/psr7", - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "request", - "response", - "message", - "stream", - "http", - "uri", - "url", - "psr-7" - ], - "license": "MIT", - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Tests\\Psr7\\": "tests/" - } - }, - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "config": { - "allow-plugins": { - "bamarni/composer-bin-plugin": true - }, - "preferred-install": "dist", - "sort-packages": true - } -} diff --git a/lib/guzzlehttp/psr7/src/AppendStream.php b/lib/guzzlehttp/psr7/src/AppendStream.php deleted file mode 100644 index cbcfaee65..000000000 --- a/lib/guzzlehttp/psr7/src/AppendStream.php +++ /dev/null @@ -1,248 +0,0 @@ -addStream($stream); - } - } - - public function __toString(): string - { - try { - $this->rewind(); - return $this->getContents(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - return ''; - } - } - - /** - * Add a stream to the AppendStream - * - * @param StreamInterface $stream Stream to append. Must be readable. - * - * @throws \InvalidArgumentException if the stream is not readable - */ - public function addStream(StreamInterface $stream): void - { - if (!$stream->isReadable()) { - throw new \InvalidArgumentException('Each stream must be readable'); - } - - // The stream is only seekable if all streams are seekable - if (!$stream->isSeekable()) { - $this->seekable = false; - } - - $this->streams[] = $stream; - } - - public function getContents(): string - { - return Utils::copyToString($this); - } - - /** - * Closes each attached stream. - */ - public function close(): void - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->close(); - } - - $this->streams = []; - } - - /** - * Detaches each attached stream. - * - * Returns null as it's not clear which underlying stream resource to return. - */ - public function detach() - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->detach(); - } - - $this->streams = []; - - return null; - } - - public function tell(): int - { - return $this->pos; - } - - /** - * Tries to calculate the size by adding the size of each stream. - * - * If any of the streams do not return a valid number, then the size of the - * append stream cannot be determined and null is returned. - */ - public function getSize(): ?int - { - $size = 0; - - foreach ($this->streams as $stream) { - $s = $stream->getSize(); - if ($s === null) { - return null; - } - $size += $s; - } - - return $size; - } - - public function eof(): bool - { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); - } - - public function rewind(): void - { - $this->seek(0); - } - - /** - * Attempts to seek to the given position. Only supports SEEK_SET. - */ - public function seek($offset, $whence = SEEK_SET): void - { - if (!$this->seekable) { - throw new \RuntimeException('This AppendStream is not seekable'); - } elseif ($whence !== SEEK_SET) { - throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); - } - - $this->pos = $this->current = 0; - - // Rewind each stream - foreach ($this->streams as $i => $stream) { - try { - $stream->rewind(); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to seek stream ' - . $i . ' of the AppendStream', 0, $e); - } - } - - // Seek to the actual position by reading from each stream - while ($this->pos < $offset && !$this->eof()) { - $result = $this->read(min(8096, $offset - $this->pos)); - if ($result === '') { - break; - } - } - } - - /** - * Reads from all of the appended streams until the length is met or EOF. - */ - public function read($length): string - { - $buffer = ''; - $total = count($this->streams) - 1; - $remaining = $length; - $progressToNext = false; - - while ($remaining > 0) { - // Progress to the next stream if needed. - if ($progressToNext || $this->streams[$this->current]->eof()) { - $progressToNext = false; - if ($this->current === $total) { - break; - } - $this->current++; - } - - $result = $this->streams[$this->current]->read($remaining); - - if ($result === '') { - $progressToNext = true; - continue; - } - - $buffer .= $result; - $remaining = $length - strlen($buffer); - } - - $this->pos += strlen($buffer); - - return $buffer; - } - - public function isReadable(): bool - { - return true; - } - - public function isWritable(): bool - { - return false; - } - - public function isSeekable(): bool - { - return $this->seekable; - } - - public function write($string): int - { - throw new \RuntimeException('Cannot write to an AppendStream'); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function getMetadata($key = null) - { - return $key ? null : []; - } -} diff --git a/lib/guzzlehttp/psr7/src/BufferStream.php b/lib/guzzlehttp/psr7/src/BufferStream.php deleted file mode 100644 index 21be8c0a9..000000000 --- a/lib/guzzlehttp/psr7/src/BufferStream.php +++ /dev/null @@ -1,149 +0,0 @@ -hwm = $hwm; - } - - public function __toString(): string - { - return $this->getContents(); - } - - public function getContents(): string - { - $buffer = $this->buffer; - $this->buffer = ''; - - return $buffer; - } - - public function close(): void - { - $this->buffer = ''; - } - - public function detach() - { - $this->close(); - - return null; - } - - public function getSize(): ?int - { - return strlen($this->buffer); - } - - public function isReadable(): bool - { - return true; - } - - public function isWritable(): bool - { - return true; - } - - public function isSeekable(): bool - { - return false; - } - - public function rewind(): void - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET): void - { - throw new \RuntimeException('Cannot seek a BufferStream'); - } - - public function eof(): bool - { - return strlen($this->buffer) === 0; - } - - public function tell(): int - { - throw new \RuntimeException('Cannot determine the position of a BufferStream'); - } - - /** - * Reads data from the buffer. - */ - public function read($length): string - { - $currentLength = strlen($this->buffer); - - if ($length >= $currentLength) { - // No need to slice the buffer because we don't have enough data. - $result = $this->buffer; - $this->buffer = ''; - } else { - // Slice up the result to provide a subset of the buffer. - $result = substr($this->buffer, 0, $length); - $this->buffer = substr($this->buffer, $length); - } - - return $result; - } - - /** - * Writes data to the buffer. - */ - public function write($string): int - { - $this->buffer .= $string; - - if (strlen($this->buffer) >= $this->hwm) { - return 0; - } - - return strlen($string); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function getMetadata($key = null) - { - if ($key === 'hwm') { - return $this->hwm; - } - - return $key ? null : []; - } -} diff --git a/lib/guzzlehttp/psr7/src/CachingStream.php b/lib/guzzlehttp/psr7/src/CachingStream.php deleted file mode 100644 index f34722cff..000000000 --- a/lib/guzzlehttp/psr7/src/CachingStream.php +++ /dev/null @@ -1,153 +0,0 @@ -remoteStream = $stream; - $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); - } - - public function getSize(): ?int - { - $remoteSize = $this->remoteStream->getSize(); - - if (null === $remoteSize) { - return null; - } - - return max($this->stream->getSize(), $remoteSize); - } - - public function rewind(): void - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET): void - { - if ($whence === SEEK_SET) { - $byte = $offset; - } elseif ($whence === SEEK_CUR) { - $byte = $offset + $this->tell(); - } elseif ($whence === SEEK_END) { - $size = $this->remoteStream->getSize(); - if ($size === null) { - $size = $this->cacheEntireStream(); - } - $byte = $size + $offset; - } else { - throw new \InvalidArgumentException('Invalid whence'); - } - - $diff = $byte - $this->stream->getSize(); - - if ($diff > 0) { - // Read the remoteStream until we have read in at least the amount - // of bytes requested, or we reach the end of the file. - while ($diff > 0 && !$this->remoteStream->eof()) { - $this->read($diff); - $diff = $byte - $this->stream->getSize(); - } - } else { - // We can just do a normal seek since we've already seen this byte. - $this->stream->seek($byte); - } - } - - public function read($length): string - { - // Perform a regular read on any previously read data from the buffer - $data = $this->stream->read($length); - $remaining = $length - strlen($data); - - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have - // been filled from the remote stream, then we must skip bytes on - // the remote stream to emulate overwriting bytes from that - // position. This mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read( - $remaining + $this->skipReadBytes - ); - - if ($this->skipReadBytes) { - $len = strlen($remoteData); - $remoteData = substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = max(0, $this->skipReadBytes - $len); - } - - $data .= $remoteData; - $this->stream->write($remoteData); - } - - return $data; - } - - public function write($string): int - { - // When appending to the end of the currently read stream, you'll want - // to skip bytes from being read from the remote stream to emulate - // other stream wrappers. Basically replacing bytes of data of a fixed - // length. - $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - - return $this->stream->write($string); - } - - public function eof(): bool - { - return $this->stream->eof() && $this->remoteStream->eof(); - } - - /** - * Close both the remote stream and buffer stream - */ - public function close(): void - { - $this->remoteStream->close(); - $this->stream->close(); - } - - private function cacheEntireStream(): int - { - $target = new FnStream(['write' => 'strlen']); - Utils::copyToStream($this, $target); - - return $this->tell(); - } -} diff --git a/lib/guzzlehttp/psr7/src/DroppingStream.php b/lib/guzzlehttp/psr7/src/DroppingStream.php deleted file mode 100644 index 6e3d209d0..000000000 --- a/lib/guzzlehttp/psr7/src/DroppingStream.php +++ /dev/null @@ -1,49 +0,0 @@ -stream = $stream; - $this->maxLength = $maxLength; - } - - public function write($string): int - { - $diff = $this->maxLength - $this->stream->getSize(); - - // Begin returning 0 when the underlying stream is too large. - if ($diff <= 0) { - return 0; - } - - // Write the stream or a subset of the stream if needed. - if (strlen($string) < $diff) { - return $this->stream->write($string); - } - - return $this->stream->write(substr($string, 0, $diff)); - } -} diff --git a/lib/guzzlehttp/psr7/src/Exception/MalformedUriException.php b/lib/guzzlehttp/psr7/src/Exception/MalformedUriException.php deleted file mode 100644 index 3a084779a..000000000 --- a/lib/guzzlehttp/psr7/src/Exception/MalformedUriException.php +++ /dev/null @@ -1,14 +0,0 @@ - */ - private $methods; - - /** - * @param array $methods Hash of method name to a callable. - */ - public function __construct(array $methods) - { - $this->methods = $methods; - - // Create the functions on the class - foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; - } - } - - /** - * Lazily determine which methods are not implemented. - * - * @throws \BadMethodCallException - */ - public function __get(string $name): void - { - throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); - } - - /** - * The close method is called on the underlying stream only if possible. - */ - public function __destruct() - { - if (isset($this->_fn_close)) { - call_user_func($this->_fn_close); - } - } - - /** - * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. - * - * @throws \LogicException - */ - public function __wakeup(): void - { - throw new \LogicException('FnStream should never be unserialized'); - } - - /** - * Adds custom functionality to an underlying stream by intercepting - * specific method calls. - * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure - * - * @return FnStream - */ - public static function decorate(StreamInterface $stream, array $methods) - { - // If any of the required methods were not provided, then simply - // proxy to the decorated stream. - foreach (array_diff(self::SLOTS, array_keys($methods)) as $diff) { - /** @var callable $callable */ - $callable = [$stream, $diff]; - $methods[$diff] = $callable; - } - - return new self($methods); - } - - public function __toString(): string - { - try { - return call_user_func($this->_fn___toString); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - return ''; - } - } - - public function close(): void - { - call_user_func($this->_fn_close); - } - - public function detach() - { - return call_user_func($this->_fn_detach); - } - - public function getSize(): ?int - { - return call_user_func($this->_fn_getSize); - } - - public function tell(): int - { - return call_user_func($this->_fn_tell); - } - - public function eof(): bool - { - return call_user_func($this->_fn_eof); - } - - public function isSeekable(): bool - { - return call_user_func($this->_fn_isSeekable); - } - - public function rewind(): void - { - call_user_func($this->_fn_rewind); - } - - public function seek($offset, $whence = SEEK_SET): void - { - call_user_func($this->_fn_seek, $offset, $whence); - } - - public function isWritable(): bool - { - return call_user_func($this->_fn_isWritable); - } - - public function write($string): int - { - return call_user_func($this->_fn_write, $string); - } - - public function isReadable(): bool - { - return call_user_func($this->_fn_isReadable); - } - - public function read($length): string - { - return call_user_func($this->_fn_read, $length); - } - - public function getContents(): string - { - return call_user_func($this->_fn_getContents); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function getMetadata($key = null) - { - return call_user_func($this->_fn_getMetadata, $key); - } -} diff --git a/lib/guzzlehttp/psr7/src/Header.php b/lib/guzzlehttp/psr7/src/Header.php deleted file mode 100644 index 4d7005b22..000000000 --- a/lib/guzzlehttp/psr7/src/Header.php +++ /dev/null @@ -1,134 +0,0 @@ -]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); - } - } - } - if ($part) { - $params[] = $part; - } - } - } - - return $params; - } - - /** - * Converts an array of header values that may contain comma separated - * headers into an array of headers with no comma separated values. - * - * @param string|array $header Header to normalize. - * - * @deprecated Use self::splitList() instead. - */ - public static function normalize($header): array - { - $result = []; - foreach ((array) $header as $value) { - foreach (self::splitList($value) as $parsed) { - $result[] = $parsed; - } - } - - return $result; - } - - /** - * Splits a HTTP header defined to contain a comma-separated list into - * each individual value. Empty values will be removed. - * - * Example headers include 'accept', 'cache-control' and 'if-none-match'. - * - * This method must not be used to parse headers that are not defined as - * a list, such as 'user-agent' or 'set-cookie'. - * - * @param string|string[] $values Header value as returned by MessageInterface::getHeader() - * - * @return string[] - */ - public static function splitList($values): array - { - if (!\is_array($values)) { - $values = [$values]; - } - - $result = []; - foreach ($values as $value) { - if (!\is_string($value)) { - throw new \TypeError('$header must either be a string or an array containing strings.'); - } - - $v = ''; - $isQuoted = false; - $isEscaped = false; - for ($i = 0, $max = \strlen($value); $i < $max; $i++) { - if ($isEscaped) { - $v .= $value[$i]; - $isEscaped = false; - - continue; - } - - if (!$isQuoted && $value[$i] === ',') { - $v = \trim($v); - if ($v !== '') { - $result[] = $v; - } - - $v = ''; - continue; - } - - if ($isQuoted && $value[$i] === '\\') { - $isEscaped = true; - $v .= $value[$i]; - - continue; - } - if ($value[$i] === '"') { - $isQuoted = !$isQuoted; - $v .= $value[$i]; - - continue; - } - - $v .= $value[$i]; - } - - $v = \trim($v); - if ($v !== '') { - $result[] = $v; - } - } - - return $result; - } -} diff --git a/lib/guzzlehttp/psr7/src/HttpFactory.php b/lib/guzzlehttp/psr7/src/HttpFactory.php deleted file mode 100644 index 30be222fc..000000000 --- a/lib/guzzlehttp/psr7/src/HttpFactory.php +++ /dev/null @@ -1,100 +0,0 @@ -getSize(); - } - - return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); - } - - public function createStream(string $content = ''): StreamInterface - { - return Utils::streamFor($content); - } - - public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface - { - try { - $resource = Utils::tryFopen($file, $mode); - } catch (\RuntimeException $e) { - if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) { - throw new \InvalidArgumentException(sprintf('Invalid file opening mode "%s"', $mode), 0, $e); - } - - throw $e; - } - - return Utils::streamFor($resource); - } - - public function createStreamFromResource($resource): StreamInterface - { - return Utils::streamFor($resource); - } - - public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface - { - if (empty($method)) { - if (!empty($serverParams['REQUEST_METHOD'])) { - $method = $serverParams['REQUEST_METHOD']; - } else { - throw new \InvalidArgumentException('Cannot determine HTTP method'); - } - } - - return new ServerRequest($method, $uri, [], null, '1.1', $serverParams); - } - - public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface - { - return new Response($code, [], null, '1.1', $reasonPhrase); - } - - public function createRequest(string $method, $uri): RequestInterface - { - return new Request($method, $uri); - } - - public function createUri(string $uri = ''): UriInterface - { - return new Uri($uri); - } -} diff --git a/lib/guzzlehttp/psr7/src/InflateStream.php b/lib/guzzlehttp/psr7/src/InflateStream.php deleted file mode 100644 index 8e00f1c32..000000000 --- a/lib/guzzlehttp/psr7/src/InflateStream.php +++ /dev/null @@ -1,37 +0,0 @@ - 15 + 32]); - $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); - } -} diff --git a/lib/guzzlehttp/psr7/src/LazyOpenStream.php b/lib/guzzlehttp/psr7/src/LazyOpenStream.php deleted file mode 100644 index f6c84904e..000000000 --- a/lib/guzzlehttp/psr7/src/LazyOpenStream.php +++ /dev/null @@ -1,49 +0,0 @@ -filename = $filename; - $this->mode = $mode; - - // unsetting the property forces the first access to go through - // __get(). - unset($this->stream); - } - - /** - * Creates the underlying stream lazily when required. - */ - protected function createStream(): StreamInterface - { - return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); - } -} diff --git a/lib/guzzlehttp/psr7/src/LimitStream.php b/lib/guzzlehttp/psr7/src/LimitStream.php deleted file mode 100644 index fb2232557..000000000 --- a/lib/guzzlehttp/psr7/src/LimitStream.php +++ /dev/null @@ -1,157 +0,0 @@ -stream = $stream; - $this->setLimit($limit); - $this->setOffset($offset); - } - - public function eof(): bool - { - // Always return true if the underlying stream is EOF - if ($this->stream->eof()) { - return true; - } - - // No limit and the underlying stream is not at EOF - if ($this->limit === -1) { - return false; - } - - return $this->stream->tell() >= $this->offset + $this->limit; - } - - /** - * Returns the size of the limited subset of data - */ - public function getSize(): ?int - { - if (null === ($length = $this->stream->getSize())) { - return null; - } elseif ($this->limit === -1) { - return $length - $this->offset; - } else { - return min($this->limit, $length - $this->offset); - } - } - - /** - * Allow for a bounded seek on the read limited stream - */ - public function seek($offset, $whence = SEEK_SET): void - { - if ($whence !== SEEK_SET || $offset < 0) { - throw new \RuntimeException(sprintf( - 'Cannot seek to offset %s with whence %s', - $offset, - $whence - )); - } - - $offset += $this->offset; - - if ($this->limit !== -1) { - if ($offset > $this->offset + $this->limit) { - $offset = $this->offset + $this->limit; - } - } - - $this->stream->seek($offset); - } - - /** - * Give a relative tell() - */ - public function tell(): int - { - return $this->stream->tell() - $this->offset; - } - - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @throws \RuntimeException if the stream cannot be seeked. - */ - public function setOffset(int $offset): void - { - $current = $this->stream->tell(); - - if ($current !== $offset) { - // If the stream cannot seek to the offset position, then read to it - if ($this->stream->isSeekable()) { - $this->stream->seek($offset); - } elseif ($current > $offset) { - throw new \RuntimeException("Could not seek to stream offset $offset"); - } else { - $this->stream->read($offset - $current); - } - } - - $this->offset = $offset; - } - - /** - * Set the limit of bytes that the decorator allows to be read from the - * stream. - * - * @param int $limit Number of bytes to allow to be read from the stream. - * Use -1 for no limit. - */ - public function setLimit(int $limit): void - { - $this->limit = $limit; - } - - public function read($length): string - { - if ($this->limit === -1) { - return $this->stream->read($length); - } - - // Check if the current position is less than the total allowed - // bytes + original offset - $remaining = ($this->offset + $this->limit) - $this->stream->tell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte - // limit is not exceeded - return $this->stream->read(min($remaining, $length)); - } - - return ''; - } -} diff --git a/lib/guzzlehttp/psr7/src/Message.php b/lib/guzzlehttp/psr7/src/Message.php deleted file mode 100644 index c1e15f826..000000000 --- a/lib/guzzlehttp/psr7/src/Message.php +++ /dev/null @@ -1,246 +0,0 @@ -getMethod() . ' ' - . $message->getRequestTarget()) - . ' HTTP/' . $message->getProtocolVersion(); - if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); - } - } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); - } else { - throw new \InvalidArgumentException('Unknown message type'); - } - - foreach ($message->getHeaders() as $name => $values) { - if (strtolower($name) === 'set-cookie') { - foreach ($values as $value) { - $msg .= "\r\n{$name}: " . $value; - } - } else { - $msg .= "\r\n{$name}: " . implode(', ', $values); - } - } - - return "{$msg}\r\n\r\n" . $message->getBody(); - } - - /** - * Get a short summary of the message body. - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - */ - public static function bodySummary(MessageInterface $message, int $truncateAt = 120): ?string - { - $body = $message->getBody(); - - if (!$body->isSeekable() || !$body->isReadable()) { - return null; - } - - $size = $body->getSize(); - - if ($size === 0) { - return null; - } - - $body->rewind(); - $summary = $body->read($truncateAt); - $body->rewind(); - - if ($size > $truncateAt) { - $summary .= ' (truncated...)'; - } - - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) { - return null; - } - - return $summary; - } - - /** - * Attempts to rewind a message body and throws an exception on failure. - * - * The body of the message will only be rewound if a call to `tell()` - * returns a value other than `0`. - * - * @param MessageInterface $message Message to rewind - * - * @throws \RuntimeException - */ - public static function rewindBody(MessageInterface $message): void - { - $body = $message->getBody(); - - if ($body->tell()) { - $body->rewind(); - } - } - - /** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - */ - public static function parseMessage(string $message): array - { - if (!$message) { - throw new \InvalidArgumentException('Invalid message'); - } - - $message = ltrim($message, "\r\n"); - - $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); - - if ($messageParts === false || count($messageParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); - } - - [$rawHeaders, $body] = $messageParts; - $rawHeaders .= "\r\n"; // Put back the delimiter we split previously - $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); - - if ($headerParts === false || count($headerParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing status line'); - } - - [$startLine, $rawHeaders] = $headerParts; - - if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { - // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 - $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); - } - - /** @var array[] $headerLines */ - $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); - - // If these aren't the same, then one line didn't match and there's an invalid header. - if ($count !== substr_count($rawHeaders, "\n")) { - // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 - if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { - throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); - } - - throw new \InvalidArgumentException('Invalid header syntax'); - } - - $headers = []; - - foreach ($headerLines as $headerLine) { - $headers[$headerLine[1]][] = $headerLine[2]; - } - - return [ - 'start-line' => $startLine, - 'headers' => $headers, - 'body' => $body, - ]; - } - - /** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - */ - public static function parseRequestUri(string $path, array $headers): string - { - $hostKey = array_filter(array_keys($headers), function ($k) { - // Numeric array keys are converted to int by PHP. - $k = (string) $k; - - return strtolower($k) === 'host'; - }); - - // If no host is found, then a full URI cannot be constructed. - if (!$hostKey) { - return $path; - } - - $host = $headers[reset($hostKey)][0]; - $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - - return $scheme . '://' . $host . '/' . ltrim($path, '/'); - } - - /** - * Parses a request message string into a request object. - * - * @param string $message Request message string. - */ - public static function parseRequest(string $message): RequestInterface - { - $data = self::parseMessage($message); - $matches = []; - if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { - throw new \InvalidArgumentException('Invalid request string'); - } - $parts = explode(' ', $data['start-line'], 3); - $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; - - $request = new Request( - $parts[0], - $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], - $data['headers'], - $data['body'], - $version - ); - - return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); - } - - /** - * Parses a response message string into a response object. - * - * @param string $message Response message string. - */ - public static function parseResponse(string $message): ResponseInterface - { - $data = self::parseMessage($message); - // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space - // between status-code and reason-phrase is required. But browsers accept - // responses without space and reason as well. - if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); - } - $parts = explode(' ', $data['start-line'], 3); - - return new Response( - (int) $parts[1], - $data['headers'], - $data['body'], - explode('/', $parts[0])[1], - $parts[2] ?? null - ); - } -} diff --git a/lib/guzzlehttp/psr7/src/MessageTrait.php b/lib/guzzlehttp/psr7/src/MessageTrait.php deleted file mode 100644 index 464bdfaa4..000000000 --- a/lib/guzzlehttp/psr7/src/MessageTrait.php +++ /dev/null @@ -1,263 +0,0 @@ - Map of all registered headers, as original name => array of values */ - private $headers = []; - - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; - - /** @var string */ - private $protocol = '1.1'; - - /** @var StreamInterface|null */ - private $stream; - - public function getProtocolVersion(): string - { - return $this->protocol; - } - - public function withProtocolVersion($version): MessageInterface - { - if ($this->protocol === $version) { - return $this; - } - - $new = clone $this; - $new->protocol = $version; - return $new; - } - - public function getHeaders(): array - { - return $this->headers; - } - - public function hasHeader($header): bool - { - return isset($this->headerNames[strtolower($header)]); - } - - public function getHeader($header): array - { - $header = strtolower($header); - - if (!isset($this->headerNames[$header])) { - return []; - } - - $header = $this->headerNames[$header]; - - return $this->headers[$header]; - } - - public function getHeaderLine($header): string - { - return implode(', ', $this->getHeader($header)); - } - - public function withHeader($header, $value): MessageInterface - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - unset($new->headers[$new->headerNames[$normalized]]); - } - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - - return $new; - } - - public function withAddedHeader($header, $value): MessageInterface - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $new->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - } - - return $new; - } - - public function withoutHeader($header): MessageInterface - { - $normalized = strtolower($header); - - if (!isset($this->headerNames[$normalized])) { - return $this; - } - - $header = $this->headerNames[$normalized]; - - $new = clone $this; - unset($new->headers[$header], $new->headerNames[$normalized]); - - return $new; - } - - public function getBody(): StreamInterface - { - if (!$this->stream) { - $this->stream = Utils::streamFor(''); - } - - return $this->stream; - } - - public function withBody(StreamInterface $body): MessageInterface - { - if ($body === $this->stream) { - return $this; - } - - $new = clone $this; - $new->stream = $body; - return $new; - } - - /** - * @param array $headers - */ - private function setHeaders(array $headers): void - { - $this->headerNames = $this->headers = []; - foreach ($headers as $header => $value) { - // Numeric array keys are converted to int by PHP. - $header = (string) $header; - - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - if (isset($this->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $this->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $this->headerNames[$normalized] = $header; - $this->headers[$header] = $value; - } - } - } - - /** - * @param mixed $value - * - * @return string[] - */ - private function normalizeHeaderValue($value): array - { - if (!is_array($value)) { - return $this->trimAndValidateHeaderValues([$value]); - } - - if (count($value) === 0) { - throw new \InvalidArgumentException('Header value can not be an empty array.'); - } - - return $this->trimAndValidateHeaderValues($value); - } - - /** - * Trims whitespace from the header values. - * - * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. - * - * header-field = field-name ":" OWS field-value OWS - * OWS = *( SP / HTAB ) - * - * @param mixed[] $values Header values - * - * @return string[] Trimmed header values - * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 - */ - private function trimAndValidateHeaderValues(array $values): array - { - return array_map(function ($value) { - if (!is_scalar($value) && null !== $value) { - throw new \InvalidArgumentException(sprintf( - 'Header value must be scalar or null but %s provided.', - is_object($value) ? get_class($value) : gettype($value) - )); - } - - $trimmed = trim((string) $value, " \t"); - $this->assertValue($trimmed); - - return $trimmed; - }, array_values($values)); - } - - /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2 - * - * @param mixed $header - */ - private function assertHeader($header): void - { - if (!is_string($header)) { - throw new \InvalidArgumentException(sprintf( - 'Header name must be a string but %s provided.', - is_object($header) ? get_class($header) : gettype($header) - )); - } - - if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { - throw new \InvalidArgumentException( - sprintf('"%s" is not valid header name.', $header) - ); - } - } - - /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2 - * - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - * VCHAR = %x21-7E - * obs-text = %x80-FF - * obs-fold = CRLF 1*( SP / HTAB ) - */ - private function assertValue(string $value): void - { - // The regular expression intentionally does not support the obs-fold production, because as - // per RFC 7230#3.2.4: - // - // A sender MUST NOT generate a message that includes - // line folding (i.e., that has any field-value that contains a match to - // the obs-fold rule) unless the message is intended for packaging - // within the message/http media type. - // - // Clients must not send a request with line folding and a server sending folded headers is - // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting - // folding is not likely to break any legitimate use case. - if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { - throw new \InvalidArgumentException( - sprintf('"%s" is not valid header value.', $value) - ); - } - } -} diff --git a/lib/guzzlehttp/psr7/src/MimeType.php b/lib/guzzlehttp/psr7/src/MimeType.php deleted file mode 100644 index 0debbd18c..000000000 --- a/lib/guzzlehttp/psr7/src/MimeType.php +++ /dev/null @@ -1,1237 +0,0 @@ - 'application/vnd.1000minds.decision-model+xml', - '3dml' => 'text/vnd.in3d.3dml', - '3ds' => 'image/x-3ds', - '3g2' => 'video/3gpp2', - '3gp' => 'video/3gp', - '3gpp' => 'video/3gpp', - '3mf' => 'model/3mf', - '7z' => 'application/x-7z-compressed', - '7zip' => 'application/x-7z-compressed', - '123' => 'application/vnd.lotus-1-2-3', - 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/x-acc', - 'aam' => 'application/x-authorware-map', - 'aas' => 'application/x-authorware-seg', - 'abw' => 'application/x-abiword', - 'ac' => 'application/vnd.nokia.n-gage.ac+xml', - 'ac3' => 'audio/ac3', - 'acc' => 'application/vnd.americandynamics.acc', - 'ace' => 'application/x-ace-compressed', - 'acu' => 'application/vnd.acucobol', - 'acutc' => 'application/vnd.acucorp', - 'adp' => 'audio/adpcm', - 'aep' => 'application/vnd.audiograph', - 'afm' => 'application/x-font-type1', - 'afp' => 'application/vnd.ibm.modcap', - 'age' => 'application/vnd.age', - 'ahead' => 'application/vnd.ahead.space', - 'ai' => 'application/pdf', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'air' => 'application/vnd.adobe.air-application-installer-package+zip', - 'ait' => 'application/vnd.dvb.ait', - 'ami' => 'application/vnd.amiga.ami', - 'amr' => 'audio/amr', - 'apk' => 'application/vnd.android.package-archive', - 'apng' => 'image/apng', - 'appcache' => 'text/cache-manifest', - 'application' => 'application/x-ms-application', - 'apr' => 'application/vnd.lotus-approach', - 'arc' => 'application/x-freearc', - 'arj' => 'application/x-arj', - 'asc' => 'application/pgp-signature', - 'asf' => 'video/x-ms-asf', - 'asm' => 'text/x-asm', - 'aso' => 'application/vnd.accpac.simply.aso', - 'asx' => 'video/x-ms-asf', - 'atc' => 'application/vnd.acucorp', - 'atom' => 'application/atom+xml', - 'atomcat' => 'application/atomcat+xml', - 'atomdeleted' => 'application/atomdeleted+xml', - 'atomsvc' => 'application/atomsvc+xml', - 'atx' => 'application/vnd.antix.game-component', - 'au' => 'audio/x-au', - 'avci' => 'image/avci', - 'avcs' => 'image/avcs', - 'avi' => 'video/x-msvideo', - 'avif' => 'image/avif', - 'aw' => 'application/applixware', - 'azf' => 'application/vnd.airzip.filesecure.azf', - 'azs' => 'application/vnd.airzip.filesecure.azs', - 'azv' => 'image/vnd.airzip.accelerator.azv', - 'azw' => 'application/vnd.amazon.ebook', - 'b16' => 'image/vnd.pco.b16', - 'bat' => 'application/x-msdownload', - 'bcpio' => 'application/x-bcpio', - 'bdf' => 'application/x-font-bdf', - 'bdm' => 'application/vnd.syncml.dm+wbxml', - 'bdoc' => 'application/x-bdoc', - 'bed' => 'application/vnd.realvnc.bed', - 'bh2' => 'application/vnd.fujitsu.oasysprs', - 'bin' => 'application/octet-stream', - 'blb' => 'application/x-blorb', - 'blorb' => 'application/x-blorb', - 'bmi' => 'application/vnd.bmi', - 'bmml' => 'application/vnd.balsamiq.bmml+xml', - 'bmp' => 'image/bmp', - 'book' => 'application/vnd.framemaker', - 'box' => 'application/vnd.previewsystems.box', - 'boz' => 'application/x-bzip2', - 'bpk' => 'application/octet-stream', - 'bpmn' => 'application/octet-stream', - 'bsp' => 'model/vnd.valve.source.compiled-map', - 'btif' => 'image/prs.btif', - 'buffer' => 'application/octet-stream', - 'bz' => 'application/x-bzip', - 'bz2' => 'application/x-bzip2', - 'c' => 'text/x-c', - 'c4d' => 'application/vnd.clonk.c4group', - 'c4f' => 'application/vnd.clonk.c4group', - 'c4g' => 'application/vnd.clonk.c4group', - 'c4p' => 'application/vnd.clonk.c4group', - 'c4u' => 'application/vnd.clonk.c4group', - 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', - 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', - 'cab' => 'application/vnd.ms-cab-compressed', - 'caf' => 'audio/x-caf', - 'cap' => 'application/vnd.tcpdump.pcap', - 'car' => 'application/vnd.curl.car', - 'cat' => 'application/vnd.ms-pki.seccat', - 'cb7' => 'application/x-cbr', - 'cba' => 'application/x-cbr', - 'cbr' => 'application/x-cbr', - 'cbt' => 'application/x-cbr', - 'cbz' => 'application/x-cbr', - 'cc' => 'text/x-c', - 'cco' => 'application/x-cocoa', - 'cct' => 'application/x-director', - 'ccxml' => 'application/ccxml+xml', - 'cdbcmsg' => 'application/vnd.contact.cmsg', - 'cdf' => 'application/x-netcdf', - 'cdfx' => 'application/cdfx+xml', - 'cdkey' => 'application/vnd.mediastation.cdkey', - 'cdmia' => 'application/cdmi-capability', - 'cdmic' => 'application/cdmi-container', - 'cdmid' => 'application/cdmi-domain', - 'cdmio' => 'application/cdmi-object', - 'cdmiq' => 'application/cdmi-queue', - 'cdr' => 'application/cdr', - 'cdx' => 'chemical/x-cdx', - 'cdxml' => 'application/vnd.chemdraw+xml', - 'cdy' => 'application/vnd.cinderella', - 'cer' => 'application/pkix-cert', - 'cfs' => 'application/x-cfs-compressed', - 'cgm' => 'image/cgm', - 'chat' => 'application/x-chat', - 'chm' => 'application/vnd.ms-htmlhelp', - 'chrt' => 'application/vnd.kde.kchart', - 'cif' => 'chemical/x-cif', - 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', - 'cil' => 'application/vnd.ms-artgalry', - 'cjs' => 'application/node', - 'cla' => 'application/vnd.claymore', - 'class' => 'application/octet-stream', - 'clkk' => 'application/vnd.crick.clicker.keyboard', - 'clkp' => 'application/vnd.crick.clicker.palette', - 'clkt' => 'application/vnd.crick.clicker.template', - 'clkw' => 'application/vnd.crick.clicker.wordbank', - 'clkx' => 'application/vnd.crick.clicker', - 'clp' => 'application/x-msclip', - 'cmc' => 'application/vnd.cosmocaller', - 'cmdf' => 'chemical/x-cmdf', - 'cml' => 'chemical/x-cml', - 'cmp' => 'application/vnd.yellowriver-custom-menu', - 'cmx' => 'image/x-cmx', - 'cod' => 'application/vnd.rim.cod', - 'coffee' => 'text/coffeescript', - 'com' => 'application/x-msdownload', - 'conf' => 'text/plain', - 'cpio' => 'application/x-cpio', - 'cpl' => 'application/cpl+xml', - 'cpp' => 'text/x-c', - 'cpt' => 'application/mac-compactpro', - 'crd' => 'application/x-mscardfile', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'crx' => 'application/x-chrome-extension', - 'cryptonote' => 'application/vnd.rig.cryptonote', - 'csh' => 'application/x-csh', - 'csl' => 'application/vnd.citationstyles.style+xml', - 'csml' => 'chemical/x-csml', - 'csp' => 'application/vnd.commonspace', - 'csr' => 'application/octet-stream', - 'css' => 'text/css', - 'cst' => 'application/x-director', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'curl' => 'text/vnd.curl', - 'cww' => 'application/prs.cww', - 'cxt' => 'application/x-director', - 'cxx' => 'text/x-c', - 'dae' => 'model/vnd.collada+xml', - 'daf' => 'application/vnd.mobius.daf', - 'dart' => 'application/vnd.dart', - 'dataless' => 'application/vnd.fdsn.seed', - 'davmount' => 'application/davmount+xml', - 'dbf' => 'application/vnd.dbf', - 'dbk' => 'application/docbook+xml', - 'dcr' => 'application/x-director', - 'dcurl' => 'text/vnd.curl.dcurl', - 'dd2' => 'application/vnd.oma.dd2+xml', - 'ddd' => 'application/vnd.fujixerox.ddd', - 'ddf' => 'application/vnd.syncml.dmddf+xml', - 'dds' => 'image/vnd.ms-dds', - 'deb' => 'application/x-debian-package', - 'def' => 'text/plain', - 'deploy' => 'application/octet-stream', - 'der' => 'application/x-x509-ca-cert', - 'dfac' => 'application/vnd.dreamfactory', - 'dgc' => 'application/x-dgc-compressed', - 'dic' => 'text/x-c', - 'dir' => 'application/x-director', - 'dis' => 'application/vnd.mobius.dis', - 'disposition-notification' => 'message/disposition-notification', - 'dist' => 'application/octet-stream', - 'distz' => 'application/octet-stream', - 'djv' => 'image/vnd.djvu', - 'djvu' => 'image/vnd.djvu', - 'dll' => 'application/octet-stream', - 'dmg' => 'application/x-apple-diskimage', - 'dmn' => 'application/octet-stream', - 'dmp' => 'application/vnd.tcpdump.pcap', - 'dms' => 'application/octet-stream', - 'dna' => 'application/vnd.dna', - 'doc' => 'application/msword', - 'docm' => 'application/vnd.ms-word.template.macroEnabled.12', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dot' => 'application/msword', - 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'dp' => 'application/vnd.osgi.dp', - 'dpg' => 'application/vnd.dpgraph', - 'dra' => 'audio/vnd.dra', - 'drle' => 'image/dicom-rle', - 'dsc' => 'text/prs.lines.tag', - 'dssc' => 'application/dssc+der', - 'dtb' => 'application/x-dtbook+xml', - 'dtd' => 'application/xml-dtd', - 'dts' => 'audio/vnd.dts', - 'dtshd' => 'audio/vnd.dts.hd', - 'dump' => 'application/octet-stream', - 'dvb' => 'video/vnd.dvb.file', - 'dvi' => 'application/x-dvi', - 'dwd' => 'application/atsc-dwd+xml', - 'dwf' => 'model/vnd.dwf', - 'dwg' => 'image/vnd.dwg', - 'dxf' => 'image/vnd.dxf', - 'dxp' => 'application/vnd.spotfire.dxp', - 'dxr' => 'application/x-director', - 'ear' => 'application/java-archive', - 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', - 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', - 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', - 'ecma' => 'application/ecmascript', - 'edm' => 'application/vnd.novadigm.edm', - 'edx' => 'application/vnd.novadigm.edx', - 'efif' => 'application/vnd.picsel', - 'ei6' => 'application/vnd.pg.osasli', - 'elc' => 'application/octet-stream', - 'emf' => 'image/emf', - 'eml' => 'message/rfc822', - 'emma' => 'application/emma+xml', - 'emotionml' => 'application/emotionml+xml', - 'emz' => 'application/x-msmetafile', - 'eol' => 'audio/vnd.digital-winds', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'es' => 'application/ecmascript', - 'es3' => 'application/vnd.eszigno3+xml', - 'esa' => 'application/vnd.osgi.subsystem', - 'esf' => 'application/vnd.epson.esf', - 'et3' => 'application/vnd.eszigno3+xml', - 'etx' => 'text/x-setext', - 'eva' => 'application/x-eva', - 'evy' => 'application/x-envoy', - 'exe' => 'application/octet-stream', - 'exi' => 'application/exi', - 'exp' => 'application/express', - 'exr' => 'image/aces', - 'ext' => 'application/vnd.novadigm.ext', - 'ez' => 'application/andrew-inset', - 'ez2' => 'application/vnd.ezpix-album', - 'ez3' => 'application/vnd.ezpix-package', - 'f' => 'text/x-fortran', - 'f4v' => 'video/mp4', - 'f77' => 'text/x-fortran', - 'f90' => 'text/x-fortran', - 'fbs' => 'image/vnd.fastbidsheet', - 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', - 'fcs' => 'application/vnd.isac.fcs', - 'fdf' => 'application/vnd.fdf', - 'fdt' => 'application/fdt+xml', - 'fe_launch' => 'application/vnd.denovo.fcselayout-link', - 'fg5' => 'application/vnd.fujitsu.oasysgp', - 'fgd' => 'application/x-director', - 'fh' => 'image/x-freehand', - 'fh4' => 'image/x-freehand', - 'fh5' => 'image/x-freehand', - 'fh7' => 'image/x-freehand', - 'fhc' => 'image/x-freehand', - 'fig' => 'application/x-xfig', - 'fits' => 'image/fits', - 'flac' => 'audio/x-flac', - 'fli' => 'video/x-fli', - 'flo' => 'application/vnd.micrografx.flo', - 'flv' => 'video/x-flv', - 'flw' => 'application/vnd.kde.kivio', - 'flx' => 'text/vnd.fmi.flexstor', - 'fly' => 'text/vnd.fly', - 'fm' => 'application/vnd.framemaker', - 'fnc' => 'application/vnd.frogans.fnc', - 'fo' => 'application/vnd.software602.filler.form+xml', - 'for' => 'text/x-fortran', - 'fpx' => 'image/vnd.fpx', - 'frame' => 'application/vnd.framemaker', - 'fsc' => 'application/vnd.fsc.weblaunch', - 'fst' => 'image/vnd.fst', - 'ftc' => 'application/vnd.fluxtime.clip', - 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', - 'fvt' => 'video/vnd.fvt', - 'fxp' => 'application/vnd.adobe.fxp', - 'fxpl' => 'application/vnd.adobe.fxp', - 'fzs' => 'application/vnd.fuzzysheet', - 'g2w' => 'application/vnd.geoplan', - 'g3' => 'image/g3fax', - 'g3w' => 'application/vnd.geospace', - 'gac' => 'application/vnd.groove-account', - 'gam' => 'application/x-tads', - 'gbr' => 'application/rpki-ghostbusters', - 'gca' => 'application/x-gca-compressed', - 'gdl' => 'model/vnd.gdl', - 'gdoc' => 'application/vnd.google-apps.document', - 'ged' => 'text/vnd.familysearch.gedcom', - 'geo' => 'application/vnd.dynageo', - 'geojson' => 'application/geo+json', - 'gex' => 'application/vnd.geometry-explorer', - 'ggb' => 'application/vnd.geogebra.file', - 'ggt' => 'application/vnd.geogebra.tool', - 'ghf' => 'application/vnd.groove-help', - 'gif' => 'image/gif', - 'gim' => 'application/vnd.groove-identity-message', - 'glb' => 'model/gltf-binary', - 'gltf' => 'model/gltf+json', - 'gml' => 'application/gml+xml', - 'gmx' => 'application/vnd.gmx', - 'gnumeric' => 'application/x-gnumeric', - 'gpg' => 'application/gpg-keys', - 'gph' => 'application/vnd.flographit', - 'gpx' => 'application/gpx+xml', - 'gqf' => 'application/vnd.grafeq', - 'gqs' => 'application/vnd.grafeq', - 'gram' => 'application/srgs', - 'gramps' => 'application/x-gramps-xml', - 'gre' => 'application/vnd.geometry-explorer', - 'grv' => 'application/vnd.groove-injector', - 'grxml' => 'application/srgs+xml', - 'gsf' => 'application/x-font-ghostscript', - 'gsheet' => 'application/vnd.google-apps.spreadsheet', - 'gslides' => 'application/vnd.google-apps.presentation', - 'gtar' => 'application/x-gtar', - 'gtm' => 'application/vnd.groove-tool-message', - 'gtw' => 'model/vnd.gtw', - 'gv' => 'text/vnd.graphviz', - 'gxf' => 'application/gxf', - 'gxt' => 'application/vnd.geonext', - 'gz' => 'application/gzip', - 'gzip' => 'application/gzip', - 'h' => 'text/x-c', - 'h261' => 'video/h261', - 'h263' => 'video/h263', - 'h264' => 'video/h264', - 'hal' => 'application/vnd.hal+xml', - 'hbci' => 'application/vnd.hbci', - 'hbs' => 'text/x-handlebars-template', - 'hdd' => 'application/x-virtualbox-hdd', - 'hdf' => 'application/x-hdf', - 'heic' => 'image/heic', - 'heics' => 'image/heic-sequence', - 'heif' => 'image/heif', - 'heifs' => 'image/heif-sequence', - 'hej2' => 'image/hej2k', - 'held' => 'application/atsc-held+xml', - 'hh' => 'text/x-c', - 'hjson' => 'application/hjson', - 'hlp' => 'application/winhlp', - 'hpgl' => 'application/vnd.hp-hpgl', - 'hpid' => 'application/vnd.hp-hpid', - 'hps' => 'application/vnd.hp-hps', - 'hqx' => 'application/mac-binhex40', - 'hsj2' => 'image/hsj2', - 'htc' => 'text/x-component', - 'htke' => 'application/vnd.kenameaapp', - 'htm' => 'text/html', - 'html' => 'text/html', - 'hvd' => 'application/vnd.yamaha.hv-dic', - 'hvp' => 'application/vnd.yamaha.hv-voice', - 'hvs' => 'application/vnd.yamaha.hv-script', - 'i2g' => 'application/vnd.intergeo', - 'icc' => 'application/vnd.iccprofile', - 'ice' => 'x-conference/x-cooltalk', - 'icm' => 'application/vnd.iccprofile', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ief' => 'image/ief', - 'ifb' => 'text/calendar', - 'ifm' => 'application/vnd.shana.informed.formdata', - 'iges' => 'model/iges', - 'igl' => 'application/vnd.igloader', - 'igm' => 'application/vnd.insors.igm', - 'igs' => 'model/iges', - 'igx' => 'application/vnd.micrografx.igx', - 'iif' => 'application/vnd.shana.informed.interchange', - 'img' => 'application/octet-stream', - 'imp' => 'application/vnd.accpac.simply.imp', - 'ims' => 'application/vnd.ms-ims', - 'in' => 'text/plain', - 'ini' => 'text/plain', - 'ink' => 'application/inkml+xml', - 'inkml' => 'application/inkml+xml', - 'install' => 'application/x-install-instructions', - 'iota' => 'application/vnd.astraea-software.iota', - 'ipfix' => 'application/ipfix', - 'ipk' => 'application/vnd.shana.informed.package', - 'irm' => 'application/vnd.ibm.rights-management', - 'irp' => 'application/vnd.irepository.package+xml', - 'iso' => 'application/x-iso9660-image', - 'itp' => 'application/vnd.shana.informed.formtemplate', - 'its' => 'application/its+xml', - 'ivp' => 'application/vnd.immervision-ivp', - 'ivu' => 'application/vnd.immervision-ivu', - 'jad' => 'text/vnd.sun.j2me.app-descriptor', - 'jade' => 'text/jade', - 'jam' => 'application/vnd.jam', - 'jar' => 'application/java-archive', - 'jardiff' => 'application/x-java-archive-diff', - 'java' => 'text/x-java-source', - 'jhc' => 'image/jphc', - 'jisp' => 'application/vnd.jisp', - 'jls' => 'image/jls', - 'jlt' => 'application/vnd.hp-jlyt', - 'jng' => 'image/x-jng', - 'jnlp' => 'application/x-java-jnlp-file', - 'joda' => 'application/vnd.joost.joda-archive', - 'jp2' => 'image/jp2', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpf' => 'image/jpx', - 'jpg' => 'image/jpeg', - 'jpg2' => 'image/jp2', - 'jpgm' => 'video/jpm', - 'jpgv' => 'video/jpeg', - 'jph' => 'image/jph', - 'jpm' => 'video/jpm', - 'jpx' => 'image/jpx', - 'js' => 'application/javascript', - 'json' => 'application/json', - 'json5' => 'application/json5', - 'jsonld' => 'application/ld+json', - 'jsonml' => 'application/jsonml+json', - 'jsx' => 'text/jsx', - 'jxr' => 'image/jxr', - 'jxra' => 'image/jxra', - 'jxrs' => 'image/jxrs', - 'jxs' => 'image/jxs', - 'jxsc' => 'image/jxsc', - 'jxsi' => 'image/jxsi', - 'jxss' => 'image/jxss', - 'kar' => 'audio/midi', - 'karbon' => 'application/vnd.kde.karbon', - 'kdb' => 'application/octet-stream', - 'kdbx' => 'application/x-keepass2', - 'key' => 'application/x-iwork-keynote-sffkey', - 'kfo' => 'application/vnd.kde.kformula', - 'kia' => 'application/vnd.kidspiration', - 'kml' => 'application/vnd.google-earth.kml+xml', - 'kmz' => 'application/vnd.google-earth.kmz', - 'kne' => 'application/vnd.kinar', - 'knp' => 'application/vnd.kinar', - 'kon' => 'application/vnd.kde.kontour', - 'kpr' => 'application/vnd.kde.kpresenter', - 'kpt' => 'application/vnd.kde.kpresenter', - 'kpxx' => 'application/vnd.ds-keypoint', - 'ksp' => 'application/vnd.kde.kspread', - 'ktr' => 'application/vnd.kahootz', - 'ktx' => 'image/ktx', - 'ktx2' => 'image/ktx2', - 'ktz' => 'application/vnd.kahootz', - 'kwd' => 'application/vnd.kde.kword', - 'kwt' => 'application/vnd.kde.kword', - 'lasxml' => 'application/vnd.las.las+xml', - 'latex' => 'application/x-latex', - 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', - 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', - 'les' => 'application/vnd.hhe.lesson-player', - 'less' => 'text/less', - 'lgr' => 'application/lgr+xml', - 'lha' => 'application/octet-stream', - 'link66' => 'application/vnd.route66.link66+xml', - 'list' => 'text/plain', - 'list3820' => 'application/vnd.ibm.modcap', - 'listafp' => 'application/vnd.ibm.modcap', - 'litcoffee' => 'text/coffeescript', - 'lnk' => 'application/x-ms-shortcut', - 'log' => 'text/plain', - 'lostxml' => 'application/lost+xml', - 'lrf' => 'application/octet-stream', - 'lrm' => 'application/vnd.ms-lrm', - 'ltf' => 'application/vnd.frogans.ltf', - 'lua' => 'text/x-lua', - 'luac' => 'application/x-lua-bytecode', - 'lvp' => 'audio/vnd.lucent.voice', - 'lwp' => 'application/vnd.lotus-wordpro', - 'lzh' => 'application/octet-stream', - 'm1v' => 'video/mpeg', - 'm2a' => 'audio/mpeg', - 'm2v' => 'video/mpeg', - 'm3a' => 'audio/mpeg', - 'm3u' => 'text/plain', - 'm3u8' => 'application/vnd.apple.mpegurl', - 'm4a' => 'audio/x-m4a', - 'm4p' => 'application/mp4', - 'm4s' => 'video/iso.segment', - 'm4u' => 'application/vnd.mpegurl', - 'm4v' => 'video/x-m4v', - 'm13' => 'application/x-msmediaview', - 'm14' => 'application/x-msmediaview', - 'm21' => 'application/mp21', - 'ma' => 'application/mathematica', - 'mads' => 'application/mads+xml', - 'maei' => 'application/mmt-aei+xml', - 'mag' => 'application/vnd.ecowin.chart', - 'maker' => 'application/vnd.framemaker', - 'man' => 'text/troff', - 'manifest' => 'text/cache-manifest', - 'map' => 'application/json', - 'mar' => 'application/octet-stream', - 'markdown' => 'text/markdown', - 'mathml' => 'application/mathml+xml', - 'mb' => 'application/mathematica', - 'mbk' => 'application/vnd.mobius.mbk', - 'mbox' => 'application/mbox', - 'mc1' => 'application/vnd.medcalcdata', - 'mcd' => 'application/vnd.mcd', - 'mcurl' => 'text/vnd.curl.mcurl', - 'md' => 'text/markdown', - 'mdb' => 'application/x-msaccess', - 'mdi' => 'image/vnd.ms-modi', - 'mdx' => 'text/mdx', - 'me' => 'text/troff', - 'mesh' => 'model/mesh', - 'meta4' => 'application/metalink4+xml', - 'metalink' => 'application/metalink+xml', - 'mets' => 'application/mets+xml', - 'mfm' => 'application/vnd.mfmp', - 'mft' => 'application/rpki-manifest', - 'mgp' => 'application/vnd.osgeo.mapguide.package', - 'mgz' => 'application/vnd.proteus.magazine', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mie' => 'application/x-mie', - 'mif' => 'application/vnd.mif', - 'mime' => 'message/rfc822', - 'mj2' => 'video/mj2', - 'mjp2' => 'video/mj2', - 'mjs' => 'application/javascript', - 'mk3d' => 'video/x-matroska', - 'mka' => 'audio/x-matroska', - 'mkd' => 'text/x-markdown', - 'mks' => 'video/x-matroska', - 'mkv' => 'video/x-matroska', - 'mlp' => 'application/vnd.dolby.mlp', - 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', - 'mmf' => 'application/vnd.smaf', - 'mml' => 'text/mathml', - 'mmr' => 'image/vnd.fujixerox.edmics-mmr', - 'mng' => 'video/x-mng', - 'mny' => 'application/x-msmoney', - 'mobi' => 'application/x-mobipocket-ebook', - 'mods' => 'application/mods+xml', - 'mov' => 'video/quicktime', - 'movie' => 'video/x-sgi-movie', - 'mp2' => 'audio/mpeg', - 'mp2a' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4s' => 'application/mp4', - 'mp4v' => 'video/mp4', - 'mp21' => 'application/mp21', - 'mpc' => 'application/vnd.mophun.certificate', - 'mpd' => 'application/dash+xml', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpf' => 'application/media-policy-dataset+xml', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'mpga' => 'audio/mpeg', - 'mpkg' => 'application/vnd.apple.installer+xml', - 'mpm' => 'application/vnd.blueice.multipass', - 'mpn' => 'application/vnd.mophun.application', - 'mpp' => 'application/vnd.ms-project', - 'mpt' => 'application/vnd.ms-project', - 'mpy' => 'application/vnd.ibm.minipay', - 'mqy' => 'application/vnd.mobius.mqy', - 'mrc' => 'application/marc', - 'mrcx' => 'application/marcxml+xml', - 'ms' => 'text/troff', - 'mscml' => 'application/mediaservercontrol+xml', - 'mseed' => 'application/vnd.fdsn.mseed', - 'mseq' => 'application/vnd.mseq', - 'msf' => 'application/vnd.epson.msf', - 'msg' => 'application/vnd.ms-outlook', - 'msh' => 'model/mesh', - 'msi' => 'application/x-msdownload', - 'msl' => 'application/vnd.mobius.msl', - 'msm' => 'application/octet-stream', - 'msp' => 'application/octet-stream', - 'msty' => 'application/vnd.muvee.style', - 'mtl' => 'model/mtl', - 'mts' => 'model/vnd.mts', - 'mus' => 'application/vnd.musician', - 'musd' => 'application/mmt-usd+xml', - 'musicxml' => 'application/vnd.recordare.musicxml+xml', - 'mvb' => 'application/x-msmediaview', - 'mvt' => 'application/vnd.mapbox-vector-tile', - 'mwf' => 'application/vnd.mfer', - 'mxf' => 'application/mxf', - 'mxl' => 'application/vnd.recordare.musicxml', - 'mxmf' => 'audio/mobile-xmf', - 'mxml' => 'application/xv+xml', - 'mxs' => 'application/vnd.triscape.mxs', - 'mxu' => 'video/vnd.mpegurl', - 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', - 'n3' => 'text/n3', - 'nb' => 'application/mathematica', - 'nbp' => 'application/vnd.wolfram.player', - 'nc' => 'application/x-netcdf', - 'ncx' => 'application/x-dtbncx+xml', - 'nfo' => 'text/x-nfo', - 'ngdat' => 'application/vnd.nokia.n-gage.data', - 'nitf' => 'application/vnd.nitf', - 'nlu' => 'application/vnd.neurolanguage.nlu', - 'nml' => 'application/vnd.enliven', - 'nnd' => 'application/vnd.noblenet-directory', - 'nns' => 'application/vnd.noblenet-sealer', - 'nnw' => 'application/vnd.noblenet-web', - 'npx' => 'image/vnd.net-fpx', - 'nq' => 'application/n-quads', - 'nsc' => 'application/x-conference', - 'nsf' => 'application/vnd.lotus-notes', - 'nt' => 'application/n-triples', - 'ntf' => 'application/vnd.nitf', - 'numbers' => 'application/x-iwork-numbers-sffnumbers', - 'nzb' => 'application/x-nzb', - 'oa2' => 'application/vnd.fujitsu.oasys2', - 'oa3' => 'application/vnd.fujitsu.oasys3', - 'oas' => 'application/vnd.fujitsu.oasys', - 'obd' => 'application/x-msbinder', - 'obgx' => 'application/vnd.openblox.game+xml', - 'obj' => 'model/obj', - 'oda' => 'application/oda', - 'odb' => 'application/vnd.oasis.opendocument.database', - 'odc' => 'application/vnd.oasis.opendocument.chart', - 'odf' => 'application/vnd.oasis.opendocument.formula', - 'odft' => 'application/vnd.oasis.opendocument.formula-template', - 'odg' => 'application/vnd.oasis.opendocument.graphics', - 'odi' => 'application/vnd.oasis.opendocument.image', - 'odm' => 'application/vnd.oasis.opendocument.text-master', - 'odp' => 'application/vnd.oasis.opendocument.presentation', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - 'odt' => 'application/vnd.oasis.opendocument.text', - 'oga' => 'audio/ogg', - 'ogex' => 'model/vnd.opengex', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'omdoc' => 'application/omdoc+xml', - 'onepkg' => 'application/onenote', - 'onetmp' => 'application/onenote', - 'onetoc' => 'application/onenote', - 'onetoc2' => 'application/onenote', - 'opf' => 'application/oebps-package+xml', - 'opml' => 'text/x-opml', - 'oprc' => 'application/vnd.palm', - 'opus' => 'audio/ogg', - 'org' => 'text/x-org', - 'osf' => 'application/vnd.yamaha.openscoreformat', - 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', - 'osm' => 'application/vnd.openstreetmap.data+xml', - 'otc' => 'application/vnd.oasis.opendocument.chart-template', - 'otf' => 'font/otf', - 'otg' => 'application/vnd.oasis.opendocument.graphics-template', - 'oth' => 'application/vnd.oasis.opendocument.text-web', - 'oti' => 'application/vnd.oasis.opendocument.image-template', - 'otp' => 'application/vnd.oasis.opendocument.presentation-template', - 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', - 'ott' => 'application/vnd.oasis.opendocument.text-template', - 'ova' => 'application/x-virtualbox-ova', - 'ovf' => 'application/x-virtualbox-ovf', - 'owl' => 'application/rdf+xml', - 'oxps' => 'application/oxps', - 'oxt' => 'application/vnd.openofficeorg.extension', - 'p' => 'text/x-pascal', - 'p7a' => 'application/x-pkcs7-signature', - 'p7b' => 'application/x-pkcs7-certificates', - 'p7c' => 'application/pkcs7-mime', - 'p7m' => 'application/pkcs7-mime', - 'p7r' => 'application/x-pkcs7-certreqresp', - 'p7s' => 'application/pkcs7-signature', - 'p8' => 'application/pkcs8', - 'p10' => 'application/x-pkcs10', - 'p12' => 'application/x-pkcs12', - 'pac' => 'application/x-ns-proxy-autoconfig', - 'pages' => 'application/x-iwork-pages-sffpages', - 'pas' => 'text/x-pascal', - 'paw' => 'application/vnd.pawaafile', - 'pbd' => 'application/vnd.powerbuilder6', - 'pbm' => 'image/x-portable-bitmap', - 'pcap' => 'application/vnd.tcpdump.pcap', - 'pcf' => 'application/x-font-pcf', - 'pcl' => 'application/vnd.hp-pcl', - 'pclxl' => 'application/vnd.hp-pclxl', - 'pct' => 'image/x-pict', - 'pcurl' => 'application/vnd.curl.pcurl', - 'pcx' => 'image/x-pcx', - 'pdb' => 'application/x-pilot', - 'pde' => 'text/x-processing', - 'pdf' => 'application/pdf', - 'pem' => 'application/x-x509-user-cert', - 'pfa' => 'application/x-font-type1', - 'pfb' => 'application/x-font-type1', - 'pfm' => 'application/x-font-type1', - 'pfr' => 'application/font-tdpfr', - 'pfx' => 'application/x-pkcs12', - 'pgm' => 'image/x-portable-graymap', - 'pgn' => 'application/x-chess-pgn', - 'pgp' => 'application/pgp', - 'phar' => 'application/octet-stream', - 'php' => 'application/x-httpd-php', - 'php3' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'phtml' => 'application/x-httpd-php', - 'pic' => 'image/x-pict', - 'pkg' => 'application/octet-stream', - 'pki' => 'application/pkixcmp', - 'pkipath' => 'application/pkix-pkipath', - 'pkpass' => 'application/vnd.apple.pkpass', - 'pl' => 'application/x-perl', - 'plb' => 'application/vnd.3gpp.pic-bw-large', - 'plc' => 'application/vnd.mobius.plc', - 'plf' => 'application/vnd.pocketlearn', - 'pls' => 'application/pls+xml', - 'pm' => 'application/x-perl', - 'pml' => 'application/vnd.ctc-posml', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'portpkg' => 'application/vnd.macports.portpkg', - 'pot' => 'application/vnd.ms-powerpoint', - 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppa' => 'application/vnd.ms-powerpoint', - 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', - 'ppd' => 'application/vnd.cups-ppd', - 'ppm' => 'image/x-portable-pixmap', - 'pps' => 'application/vnd.ms-powerpoint', - 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'ppt' => 'application/powerpoint', - 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'pqa' => 'application/vnd.palm', - 'prc' => 'model/prc', - 'pre' => 'application/vnd.lotus-freelance', - 'prf' => 'application/pics-rules', - 'provx' => 'application/provenance+xml', - 'ps' => 'application/postscript', - 'psb' => 'application/vnd.3gpp.pic-bw-small', - 'psd' => 'application/x-photoshop', - 'psf' => 'application/x-font-linux-psf', - 'pskcxml' => 'application/pskc+xml', - 'pti' => 'image/prs.pti', - 'ptid' => 'application/vnd.pvi.ptid1', - 'pub' => 'application/x-mspublisher', - 'pvb' => 'application/vnd.3gpp.pic-bw-var', - 'pwn' => 'application/vnd.3m.post-it-notes', - 'pya' => 'audio/vnd.ms-playready.media.pya', - 'pyv' => 'video/vnd.ms-playready.media.pyv', - 'qam' => 'application/vnd.epson.quickanime', - 'qbo' => 'application/vnd.intu.qbo', - 'qfx' => 'application/vnd.intu.qfx', - 'qps' => 'application/vnd.publishare-delta-tree', - 'qt' => 'video/quicktime', - 'qwd' => 'application/vnd.quark.quarkxpress', - 'qwt' => 'application/vnd.quark.quarkxpress', - 'qxb' => 'application/vnd.quark.quarkxpress', - 'qxd' => 'application/vnd.quark.quarkxpress', - 'qxl' => 'application/vnd.quark.quarkxpress', - 'qxt' => 'application/vnd.quark.quarkxpress', - 'ra' => 'audio/x-realaudio', - 'ram' => 'audio/x-pn-realaudio', - 'raml' => 'application/raml+yaml', - 'rapd' => 'application/route-apd+xml', - 'rar' => 'application/x-rar', - 'ras' => 'image/x-cmu-raster', - 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', - 'rdf' => 'application/rdf+xml', - 'rdz' => 'application/vnd.data-vision.rdz', - 'relo' => 'application/p2p-overlay+xml', - 'rep' => 'application/vnd.businessobjects', - 'res' => 'application/x-dtbresource+xml', - 'rgb' => 'image/x-rgb', - 'rif' => 'application/reginfo+xml', - 'rip' => 'audio/vnd.rip', - 'ris' => 'application/x-research-info-systems', - 'rl' => 'application/resource-lists+xml', - 'rlc' => 'image/vnd.fujixerox.edmics-rlc', - 'rld' => 'application/resource-lists-diff+xml', - 'rm' => 'audio/x-pn-realaudio', - 'rmi' => 'audio/midi', - 'rmp' => 'audio/x-pn-realaudio-plugin', - 'rms' => 'application/vnd.jcp.javame.midlet-rms', - 'rmvb' => 'application/vnd.rn-realmedia-vbr', - 'rnc' => 'application/relax-ng-compact-syntax', - 'rng' => 'application/xml', - 'roa' => 'application/rpki-roa', - 'roff' => 'text/troff', - 'rp9' => 'application/vnd.cloanto.rp9', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'rpss' => 'application/vnd.nokia.radio-presets', - 'rpst' => 'application/vnd.nokia.radio-preset', - 'rq' => 'application/sparql-query', - 'rs' => 'application/rls-services+xml', - 'rsa' => 'application/x-pkcs7', - 'rsat' => 'application/atsc-rsat+xml', - 'rsd' => 'application/rsd+xml', - 'rsheet' => 'application/urc-ressheet+xml', - 'rss' => 'application/rss+xml', - 'rtf' => 'text/rtf', - 'rtx' => 'text/richtext', - 'run' => 'application/x-makeself', - 'rusd' => 'application/route-usd+xml', - 'rv' => 'video/vnd.rn-realvideo', - 's' => 'text/x-asm', - 's3m' => 'audio/s3m', - 'saf' => 'application/vnd.yamaha.smaf-audio', - 'sass' => 'text/x-sass', - 'sbml' => 'application/sbml+xml', - 'sc' => 'application/vnd.ibm.secure-container', - 'scd' => 'application/x-msschedule', - 'scm' => 'application/vnd.lotus-screencam', - 'scq' => 'application/scvp-cv-request', - 'scs' => 'application/scvp-cv-response', - 'scss' => 'text/x-scss', - 'scurl' => 'text/vnd.curl.scurl', - 'sda' => 'application/vnd.stardivision.draw', - 'sdc' => 'application/vnd.stardivision.calc', - 'sdd' => 'application/vnd.stardivision.impress', - 'sdkd' => 'application/vnd.solent.sdkm+xml', - 'sdkm' => 'application/vnd.solent.sdkm+xml', - 'sdp' => 'application/sdp', - 'sdw' => 'application/vnd.stardivision.writer', - 'sea' => 'application/octet-stream', - 'see' => 'application/vnd.seemail', - 'seed' => 'application/vnd.fdsn.seed', - 'sema' => 'application/vnd.sema', - 'semd' => 'application/vnd.semd', - 'semf' => 'application/vnd.semf', - 'senmlx' => 'application/senml+xml', - 'sensmlx' => 'application/sensml+xml', - 'ser' => 'application/java-serialized-object', - 'setpay' => 'application/set-payment-initiation', - 'setreg' => 'application/set-registration-initiation', - 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', - 'sfs' => 'application/vnd.spotfire.sfs', - 'sfv' => 'text/x-sfv', - 'sgi' => 'image/sgi', - 'sgl' => 'application/vnd.stardivision.writer-global', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'sh' => 'application/x-sh', - 'shar' => 'application/x-shar', - 'shex' => 'text/shex', - 'shf' => 'application/shf+xml', - 'shtml' => 'text/html', - 'sid' => 'image/x-mrsid-image', - 'sieve' => 'application/sieve', - 'sig' => 'application/pgp-signature', - 'sil' => 'audio/silk', - 'silo' => 'model/mesh', - 'sis' => 'application/vnd.symbian.install', - 'sisx' => 'application/vnd.symbian.install', - 'sit' => 'application/x-stuffit', - 'sitx' => 'application/x-stuffitx', - 'siv' => 'application/sieve', - 'skd' => 'application/vnd.koan', - 'skm' => 'application/vnd.koan', - 'skp' => 'application/vnd.koan', - 'skt' => 'application/vnd.koan', - 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'slim' => 'text/slim', - 'slm' => 'text/slim', - 'sls' => 'application/route-s-tsid+xml', - 'slt' => 'application/vnd.epson.salt', - 'sm' => 'application/vnd.stepmania.stepchart', - 'smf' => 'application/vnd.stardivision.math', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'smv' => 'video/x-smv', - 'smzip' => 'application/vnd.stepmania.package', - 'snd' => 'audio/basic', - 'snf' => 'application/x-font-snf', - 'so' => 'application/octet-stream', - 'spc' => 'application/x-pkcs7-certificates', - 'spdx' => 'text/spdx', - 'spf' => 'application/vnd.yamaha.smaf-phrase', - 'spl' => 'application/x-futuresplash', - 'spot' => 'text/vnd.in3d.spot', - 'spp' => 'application/scvp-vp-response', - 'spq' => 'application/scvp-vp-request', - 'spx' => 'audio/ogg', - 'sql' => 'application/x-sql', - 'src' => 'application/x-wais-source', - 'srt' => 'application/x-subrip', - 'sru' => 'application/sru+xml', - 'srx' => 'application/sparql-results+xml', - 'ssdl' => 'application/ssdl+xml', - 'sse' => 'application/vnd.kodak-descriptor', - 'ssf' => 'application/vnd.epson.ssf', - 'ssml' => 'application/ssml+xml', - 'sst' => 'application/octet-stream', - 'st' => 'application/vnd.sailingtracker.track', - 'stc' => 'application/vnd.sun.xml.calc.template', - 'std' => 'application/vnd.sun.xml.draw.template', - 'stf' => 'application/vnd.wt.stf', - 'sti' => 'application/vnd.sun.xml.impress.template', - 'stk' => 'application/hyperstudio', - 'stl' => 'model/stl', - 'stpx' => 'model/step+xml', - 'stpxz' => 'model/step-xml+zip', - 'stpz' => 'model/step+zip', - 'str' => 'application/vnd.pg.format', - 'stw' => 'application/vnd.sun.xml.writer.template', - 'styl' => 'text/stylus', - 'stylus' => 'text/stylus', - 'sub' => 'text/vnd.dvb.subtitle', - 'sus' => 'application/vnd.sus-calendar', - 'susp' => 'application/vnd.sus-calendar', - 'sv4cpio' => 'application/x-sv4cpio', - 'sv4crc' => 'application/x-sv4crc', - 'svc' => 'application/vnd.dvb.service', - 'svd' => 'application/vnd.svd', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - 'swa' => 'application/x-director', - 'swf' => 'application/x-shockwave-flash', - 'swi' => 'application/vnd.aristanetworks.swi', - 'swidtag' => 'application/swid+xml', - 'sxc' => 'application/vnd.sun.xml.calc', - 'sxd' => 'application/vnd.sun.xml.draw', - 'sxg' => 'application/vnd.sun.xml.writer.global', - 'sxi' => 'application/vnd.sun.xml.impress', - 'sxm' => 'application/vnd.sun.xml.math', - 'sxw' => 'application/vnd.sun.xml.writer', - 't' => 'text/troff', - 't3' => 'application/x-t3vm-image', - 't38' => 'image/t38', - 'taglet' => 'application/vnd.mynfc', - 'tao' => 'application/vnd.tao.intent-module-archive', - 'tap' => 'image/vnd.tencent.tap', - 'tar' => 'application/x-tar', - 'tcap' => 'application/vnd.3gpp2.tcap', - 'tcl' => 'application/x-tcl', - 'td' => 'application/urc-targetdesc+xml', - 'teacher' => 'application/vnd.smart.teacher', - 'tei' => 'application/tei+xml', - 'teicorpus' => 'application/tei+xml', - 'tex' => 'application/x-tex', - 'texi' => 'application/x-texinfo', - 'texinfo' => 'application/x-texinfo', - 'text' => 'text/plain', - 'tfi' => 'application/thraud+xml', - 'tfm' => 'application/x-tex-tfm', - 'tfx' => 'image/tiff-fx', - 'tga' => 'image/x-tga', - 'tgz' => 'application/x-tar', - 'thmx' => 'application/vnd.ms-officetheme', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'tk' => 'application/x-tcl', - 'tmo' => 'application/vnd.tmobile-livetv', - 'toml' => 'application/toml', - 'torrent' => 'application/x-bittorrent', - 'tpl' => 'application/vnd.groove-tool-template', - 'tpt' => 'application/vnd.trid.tpt', - 'tr' => 'text/troff', - 'tra' => 'application/vnd.trueapp', - 'trig' => 'application/trig', - 'trm' => 'application/x-msterminal', - 'ts' => 'video/mp2t', - 'tsd' => 'application/timestamped-data', - 'tsv' => 'text/tab-separated-values', - 'ttc' => 'font/collection', - 'ttf' => 'font/ttf', - 'ttl' => 'text/turtle', - 'ttml' => 'application/ttml+xml', - 'twd' => 'application/vnd.simtech-mindmapper', - 'twds' => 'application/vnd.simtech-mindmapper', - 'txd' => 'application/vnd.genomatix.tuxedo', - 'txf' => 'application/vnd.mobius.txf', - 'txt' => 'text/plain', - 'u3d' => 'model/u3d', - 'u8dsn' => 'message/global-delivery-status', - 'u8hdr' => 'message/global-headers', - 'u8mdn' => 'message/global-disposition-notification', - 'u8msg' => 'message/global', - 'u32' => 'application/x-authorware-bin', - 'ubj' => 'application/ubjson', - 'udeb' => 'application/x-debian-package', - 'ufd' => 'application/vnd.ufdl', - 'ufdl' => 'application/vnd.ufdl', - 'ulx' => 'application/x-glulx', - 'umj' => 'application/vnd.umajin', - 'unityweb' => 'application/vnd.unity', - 'uoml' => 'application/vnd.uoml+xml', - 'uri' => 'text/uri-list', - 'uris' => 'text/uri-list', - 'urls' => 'text/uri-list', - 'usdz' => 'model/vnd.usdz+zip', - 'ustar' => 'application/x-ustar', - 'utz' => 'application/vnd.uiq.theme', - 'uu' => 'text/x-uuencode', - 'uva' => 'audio/vnd.dece.audio', - 'uvd' => 'application/vnd.dece.data', - 'uvf' => 'application/vnd.dece.data', - 'uvg' => 'image/vnd.dece.graphic', - 'uvh' => 'video/vnd.dece.hd', - 'uvi' => 'image/vnd.dece.graphic', - 'uvm' => 'video/vnd.dece.mobile', - 'uvp' => 'video/vnd.dece.pd', - 'uvs' => 'video/vnd.dece.sd', - 'uvt' => 'application/vnd.dece.ttml+xml', - 'uvu' => 'video/vnd.uvvu.mp4', - 'uvv' => 'video/vnd.dece.video', - 'uvva' => 'audio/vnd.dece.audio', - 'uvvd' => 'application/vnd.dece.data', - 'uvvf' => 'application/vnd.dece.data', - 'uvvg' => 'image/vnd.dece.graphic', - 'uvvh' => 'video/vnd.dece.hd', - 'uvvi' => 'image/vnd.dece.graphic', - 'uvvm' => 'video/vnd.dece.mobile', - 'uvvp' => 'video/vnd.dece.pd', - 'uvvs' => 'video/vnd.dece.sd', - 'uvvt' => 'application/vnd.dece.ttml+xml', - 'uvvu' => 'video/vnd.uvvu.mp4', - 'uvvv' => 'video/vnd.dece.video', - 'uvvx' => 'application/vnd.dece.unspecified', - 'uvvz' => 'application/vnd.dece.zip', - 'uvx' => 'application/vnd.dece.unspecified', - 'uvz' => 'application/vnd.dece.zip', - 'vbox' => 'application/x-virtualbox-vbox', - 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack', - 'vcard' => 'text/vcard', - 'vcd' => 'application/x-cdlink', - 'vcf' => 'text/x-vcard', - 'vcg' => 'application/vnd.groove-vcard', - 'vcs' => 'text/x-vcalendar', - 'vcx' => 'application/vnd.vcx', - 'vdi' => 'application/x-virtualbox-vdi', - 'vds' => 'model/vnd.sap.vds', - 'vhd' => 'application/x-virtualbox-vhd', - 'vis' => 'application/vnd.visionary', - 'viv' => 'video/vnd.vivo', - 'vlc' => 'application/videolan', - 'vmdk' => 'application/x-virtualbox-vmdk', - 'vob' => 'video/x-ms-vob', - 'vor' => 'application/vnd.stardivision.writer', - 'vox' => 'application/x-authorware-bin', - 'vrml' => 'model/vrml', - 'vsd' => 'application/vnd.visio', - 'vsf' => 'application/vnd.vsf', - 'vss' => 'application/vnd.visio', - 'vst' => 'application/vnd.visio', - 'vsw' => 'application/vnd.visio', - 'vtf' => 'image/vnd.valve.source.texture', - 'vtt' => 'text/vtt', - 'vtu' => 'model/vnd.vtu', - 'vxml' => 'application/voicexml+xml', - 'w3d' => 'application/x-director', - 'wad' => 'application/x-doom', - 'wadl' => 'application/vnd.sun.wadl+xml', - 'war' => 'application/java-archive', - 'wasm' => 'application/wasm', - 'wav' => 'audio/x-wav', - 'wax' => 'audio/x-ms-wax', - 'wbmp' => 'image/vnd.wap.wbmp', - 'wbs' => 'application/vnd.criticaltools.wbs+xml', - 'wbxml' => 'application/wbxml', - 'wcm' => 'application/vnd.ms-works', - 'wdb' => 'application/vnd.ms-works', - 'wdp' => 'image/vnd.ms-photo', - 'weba' => 'audio/webm', - 'webapp' => 'application/x-web-app-manifest+json', - 'webm' => 'video/webm', - 'webmanifest' => 'application/manifest+json', - 'webp' => 'image/webp', - 'wg' => 'application/vnd.pmi.widget', - 'wgt' => 'application/widget', - 'wif' => 'application/watcherinfo+xml', - 'wks' => 'application/vnd.ms-works', - 'wm' => 'video/x-ms-wm', - 'wma' => 'audio/x-ms-wma', - 'wmd' => 'application/x-ms-wmd', - 'wmf' => 'image/wmf', - 'wml' => 'text/vnd.wap.wml', - 'wmlc' => 'application/wmlc', - 'wmls' => 'text/vnd.wap.wmlscript', - 'wmlsc' => 'application/vnd.wap.wmlscriptc', - 'wmv' => 'video/x-ms-wmv', - 'wmx' => 'video/x-ms-wmx', - 'wmz' => 'application/x-msmetafile', - 'woff' => 'font/woff', - 'woff2' => 'font/woff2', - 'word' => 'application/msword', - 'wpd' => 'application/vnd.wordperfect', - 'wpl' => 'application/vnd.ms-wpl', - 'wps' => 'application/vnd.ms-works', - 'wqd' => 'application/vnd.wqd', - 'wri' => 'application/x-mswrite', - 'wrl' => 'model/vrml', - 'wsc' => 'message/vnd.wfa.wsc', - 'wsdl' => 'application/wsdl+xml', - 'wspolicy' => 'application/wspolicy+xml', - 'wtb' => 'application/vnd.webturbo', - 'wvx' => 'video/x-ms-wvx', - 'x3d' => 'model/x3d+xml', - 'x3db' => 'model/x3d+fastinfoset', - 'x3dbz' => 'model/x3d+binary', - 'x3dv' => 'model/x3d-vrml', - 'x3dvz' => 'model/x3d+vrml', - 'x3dz' => 'model/x3d+xml', - 'x32' => 'application/x-authorware-bin', - 'x_b' => 'model/vnd.parasolid.transmit.binary', - 'x_t' => 'model/vnd.parasolid.transmit.text', - 'xaml' => 'application/xaml+xml', - 'xap' => 'application/x-silverlight-app', - 'xar' => 'application/vnd.xara', - 'xav' => 'application/xcap-att+xml', - 'xbap' => 'application/x-ms-xbap', - 'xbd' => 'application/vnd.fujixerox.docuworks.binder', - 'xbm' => 'image/x-xbitmap', - 'xca' => 'application/xcap-caps+xml', - 'xcs' => 'application/calendar+xml', - 'xdf' => 'application/xcap-diff+xml', - 'xdm' => 'application/vnd.syncml.dm+xml', - 'xdp' => 'application/vnd.adobe.xdp+xml', - 'xdssc' => 'application/dssc+xml', - 'xdw' => 'application/vnd.fujixerox.docuworks', - 'xel' => 'application/xcap-el+xml', - 'xenc' => 'application/xenc+xml', - 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/vnd.adobe.xfdf', - 'xfdl' => 'application/vnd.xfdl', - 'xht' => 'application/xhtml+xml', - 'xhtml' => 'application/xhtml+xml', - 'xhvml' => 'application/xv+xml', - 'xif' => 'image/vnd.xiff', - 'xl' => 'application/excel', - 'xla' => 'application/vnd.ms-excel', - 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', - 'xlc' => 'application/vnd.ms-excel', - 'xlf' => 'application/xliff+xml', - 'xlm' => 'application/vnd.ms-excel', - 'xls' => 'application/vnd.ms-excel', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', - 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xlt' => 'application/vnd.ms-excel', - 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'xlw' => 'application/vnd.ms-excel', - 'xm' => 'audio/xm', - 'xml' => 'application/xml', - 'xns' => 'application/xcap-ns+xml', - 'xo' => 'application/vnd.olpc-sugar', - 'xop' => 'application/xop+xml', - 'xpi' => 'application/x-xpinstall', - 'xpl' => 'application/xproc+xml', - 'xpm' => 'image/x-xpixmap', - 'xpr' => 'application/vnd.is-xpr', - 'xps' => 'application/vnd.ms-xpsdocument', - 'xpw' => 'application/vnd.intercon.formnet', - 'xpx' => 'application/vnd.intercon.formnet', - 'xsd' => 'application/xml', - 'xsl' => 'application/xml', - 'xslt' => 'application/xslt+xml', - 'xsm' => 'application/vnd.syncml+xml', - 'xspf' => 'application/xspf+xml', - 'xul' => 'application/vnd.mozilla.xul+xml', - 'xvm' => 'application/xv+xml', - 'xvml' => 'application/xv+xml', - 'xwd' => 'image/x-xwindowdump', - 'xyz' => 'chemical/x-xyz', - 'xz' => 'application/x-xz', - 'yaml' => 'text/yaml', - 'yang' => 'application/yang', - 'yin' => 'application/yin+xml', - 'yml' => 'text/yaml', - 'ymp' => 'text/x-suse-ymp', - 'z' => 'application/x-compress', - 'z1' => 'application/x-zmachine', - 'z2' => 'application/x-zmachine', - 'z3' => 'application/x-zmachine', - 'z4' => 'application/x-zmachine', - 'z5' => 'application/x-zmachine', - 'z6' => 'application/x-zmachine', - 'z7' => 'application/x-zmachine', - 'z8' => 'application/x-zmachine', - 'zaz' => 'application/vnd.zzazz.deck+xml', - 'zip' => 'application/zip', - 'zir' => 'application/vnd.zul', - 'zirz' => 'application/vnd.zul', - 'zmm' => 'application/vnd.handheld-entertainment+xml', - 'zsh' => 'text/x-scriptzsh', - ]; - - /** - * Determines the mimetype of a file by looking at its extension. - * - * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json - */ - public static function fromFilename(string $filename): ?string - { - return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION)); - } - - /** - * Maps a file extensions to a mimetype. - * - * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json - */ - public static function fromExtension(string $extension): ?string - { - return self::MIME_TYPES[strtolower($extension)] ?? null; - } -} diff --git a/lib/guzzlehttp/psr7/src/MultipartStream.php b/lib/guzzlehttp/psr7/src/MultipartStream.php deleted file mode 100644 index 3e12b74d1..000000000 --- a/lib/guzzlehttp/psr7/src/MultipartStream.php +++ /dev/null @@ -1,159 +0,0 @@ -boundary = $boundary ?: bin2hex(random_bytes(20)); - $this->stream = $this->createStream($elements); - } - - public function getBoundary(): string - { - return $this->boundary; - } - - public function isWritable(): bool - { - return false; - } - - /** - * Get the headers needed before transferring the content of a POST file - * - * @param array $headers - */ - private function getHeaders(array $headers): string - { - $str = ''; - foreach ($headers as $key => $value) { - $str .= "{$key}: {$value}\r\n"; - } - - return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; - } - - /** - * Create the aggregate stream that will be used to upload the POST data - */ - protected function createStream(array $elements = []): StreamInterface - { - $stream = new AppendStream(); - - foreach ($elements as $element) { - if (!is_array($element)) { - throw new \UnexpectedValueException("An array is expected"); - } - $this->addElement($stream, $element); - } - - // Add the trailing boundary with CRLF - $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); - - return $stream; - } - - private function addElement(AppendStream $stream, array $element): void - { - foreach (['contents', 'name'] as $key) { - if (!array_key_exists($key, $element)) { - throw new \InvalidArgumentException("A '{$key}' key is required"); - } - } - - $element['contents'] = Utils::streamFor($element['contents']); - - if (empty($element['filename'])) { - $uri = $element['contents']->getMetadata('uri'); - if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') { - $element['filename'] = $uri; - } - } - - [$body, $headers] = $this->createElement( - $element['name'], - $element['contents'], - $element['filename'] ?? null, - $element['headers'] ?? [] - ); - - $stream->addStream(Utils::streamFor($this->getHeaders($headers))); - $stream->addStream($body); - $stream->addStream(Utils::streamFor("\r\n")); - } - - private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array - { - // Set a default content-disposition header if one was no provided - $disposition = $this->getHeader($headers, 'content-disposition'); - if (!$disposition) { - $headers['Content-Disposition'] = ($filename === '0' || $filename) - ? sprintf( - 'form-data; name="%s"; filename="%s"', - $name, - basename($filename) - ) - : "form-data; name=\"{$name}\""; - } - - // Set a default content-length header if one was no provided - $length = $this->getHeader($headers, 'content-length'); - if (!$length) { - if ($length = $stream->getSize()) { - $headers['Content-Length'] = (string) $length; - } - } - - // Set a default Content-Type if one was not supplied - $type = $this->getHeader($headers, 'content-type'); - if (!$type && ($filename === '0' || $filename)) { - if ($type = MimeType::fromFilename($filename)) { - $headers['Content-Type'] = $type; - } - } - - return [$stream, $headers]; - } - - private function getHeader(array $headers, string $key) - { - $lowercaseHeader = strtolower($key); - foreach ($headers as $k => $v) { - if (strtolower($k) === $lowercaseHeader) { - return $v; - } - } - - return null; - } -} diff --git a/lib/guzzlehttp/psr7/src/NoSeekStream.php b/lib/guzzlehttp/psr7/src/NoSeekStream.php deleted file mode 100644 index 161a224f0..000000000 --- a/lib/guzzlehttp/psr7/src/NoSeekStream.php +++ /dev/null @@ -1,28 +0,0 @@ -source = $source; - $this->size = $options['size'] ?? null; - $this->metadata = $options['metadata'] ?? []; - $this->buffer = new BufferStream(); - } - - public function __toString(): string - { - try { - return Utils::copyToString($this); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - return ''; - } - } - - public function close(): void - { - $this->detach(); - } - - public function detach() - { - $this->tellPos = 0; - $this->source = null; - - return null; - } - - public function getSize(): ?int - { - return $this->size; - } - - public function tell(): int - { - return $this->tellPos; - } - - public function eof(): bool - { - return $this->source === null; - } - - public function isSeekable(): bool - { - return false; - } - - public function rewind(): void - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET): void - { - throw new \RuntimeException('Cannot seek a PumpStream'); - } - - public function isWritable(): bool - { - return false; - } - - public function write($string): int - { - throw new \RuntimeException('Cannot write to a PumpStream'); - } - - public function isReadable(): bool - { - return true; - } - - public function read($length): string - { - $data = $this->buffer->read($length); - $readLen = strlen($data); - $this->tellPos += $readLen; - $remaining = $length - $readLen; - - if ($remaining) { - $this->pump($remaining); - $data .= $this->buffer->read($remaining); - $this->tellPos += strlen($data) - $readLen; - } - - return $data; - } - - public function getContents(): string - { - $result = ''; - while (!$this->eof()) { - $result .= $this->read(1000000); - } - - return $result; - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function getMetadata($key = null) - { - if (!$key) { - return $this->metadata; - } - - return $this->metadata[$key] ?? null; - } - - private function pump(int $length): void - { - if ($this->source) { - do { - $data = call_user_func($this->source, $length); - if ($data === false || $data === null) { - $this->source = null; - return; - } - $this->buffer->write($data); - $length -= strlen($data); - } while ($length > 0); - } - } -} diff --git a/lib/guzzlehttp/psr7/src/Query.php b/lib/guzzlehttp/psr7/src/Query.php deleted file mode 100644 index 2faab3a88..000000000 --- a/lib/guzzlehttp/psr7/src/Query.php +++ /dev/null @@ -1,113 +0,0 @@ - '1', 'foo[b]' => '2'])`. - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - */ - public static function parse(string $str, $urlEncoding = true): array - { - $result = []; - - if ($str === '') { - return $result; - } - - if ($urlEncoding === true) { - $decoder = function ($value) { - return rawurldecode(str_replace('+', ' ', (string) $value)); - }; - } elseif ($urlEncoding === PHP_QUERY_RFC3986) { - $decoder = 'rawurldecode'; - } elseif ($urlEncoding === PHP_QUERY_RFC1738) { - $decoder = 'urldecode'; - } else { - $decoder = function ($str) { - return $str; - }; - } - - foreach (explode('&', $str) as $kvp) { - $parts = explode('=', $kvp, 2); - $key = $decoder($parts[0]); - $value = isset($parts[1]) ? $decoder($parts[1]) : null; - if (!array_key_exists($key, $result)) { - $result[$key] = $value; - } else { - if (!is_array($result[$key])) { - $result[$key] = [$result[$key]]; - } - $result[$key][] = $value; - } - } - - return $result; - } - - /** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - */ - public static function build(array $params, $encoding = PHP_QUERY_RFC3986): string - { - if (!$params) { - return ''; - } - - if ($encoding === false) { - $encoder = function (string $str): string { - return $str; - }; - } elseif ($encoding === PHP_QUERY_RFC3986) { - $encoder = 'rawurlencode'; - } elseif ($encoding === PHP_QUERY_RFC1738) { - $encoder = 'urlencode'; - } else { - throw new \InvalidArgumentException('Invalid type'); - } - - $qs = ''; - foreach ($params as $k => $v) { - $k = $encoder((string) $k); - if (!is_array($v)) { - $qs .= $k; - $v = is_bool($v) ? (int) $v : $v; - if ($v !== null) { - $qs .= '=' . $encoder((string) $v); - } - $qs .= '&'; - } else { - foreach ($v as $vv) { - $qs .= $k; - $vv = is_bool($vv) ? (int) $vv : $vv; - if ($vv !== null) { - $qs .= '=' . $encoder((string) $vv); - } - $qs .= '&'; - } - } - } - - return $qs ? (string) substr($qs, 0, -1) : ''; - } -} diff --git a/lib/guzzlehttp/psr7/src/Request.php b/lib/guzzlehttp/psr7/src/Request.php deleted file mode 100644 index b17af66a2..000000000 --- a/lib/guzzlehttp/psr7/src/Request.php +++ /dev/null @@ -1,157 +0,0 @@ - $headers Request headers - * @param string|resource|StreamInterface|null $body Request body - * @param string $version Protocol version - */ - public function __construct( - string $method, - $uri, - array $headers = [], - $body = null, - string $version = '1.1' - ) { - $this->assertMethod($method); - if (!($uri instanceof UriInterface)) { - $uri = new Uri($uri); - } - - $this->method = strtoupper($method); - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - - if (!isset($this->headerNames['host'])) { - $this->updateHostFromUri(); - } - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - } - - public function getRequestTarget(): string - { - if ($this->requestTarget !== null) { - return $this->requestTarget; - } - - $target = $this->uri->getPath(); - if ($target === '') { - $target = '/'; - } - if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); - } - - return $target; - } - - public function withRequestTarget($requestTarget): RequestInterface - { - if (preg_match('#\s#', $requestTarget)) { - throw new InvalidArgumentException( - 'Invalid request target provided; cannot contain whitespace' - ); - } - - $new = clone $this; - $new->requestTarget = $requestTarget; - return $new; - } - - public function getMethod(): string - { - return $this->method; - } - - public function withMethod($method): RequestInterface - { - $this->assertMethod($method); - $new = clone $this; - $new->method = strtoupper($method); - return $new; - } - - public function getUri(): UriInterface - { - return $this->uri; - } - - public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface - { - if ($uri === $this->uri) { - return $this; - } - - $new = clone $this; - $new->uri = $uri; - - if (!$preserveHost || !isset($this->headerNames['host'])) { - $new->updateHostFromUri(); - } - - return $new; - } - - private function updateHostFromUri(): void - { - $host = $this->uri->getHost(); - - if ($host == '') { - return; - } - - if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; - } - - if (isset($this->headerNames['host'])) { - $header = $this->headerNames['host']; - } else { - $header = 'Host'; - $this->headerNames['host'] = 'Host'; - } - // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 - $this->headers = [$header => [$host]] + $this->headers; - } - - /** - * @param mixed $method - */ - private function assertMethod($method): void - { - if (!is_string($method) || $method === '') { - throw new InvalidArgumentException('Method must be a non-empty string.'); - } - } -} diff --git a/lib/guzzlehttp/psr7/src/Response.php b/lib/guzzlehttp/psr7/src/Response.php deleted file mode 100644 index 4c6ee6f03..000000000 --- a/lib/guzzlehttp/psr7/src/Response.php +++ /dev/null @@ -1,160 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-status', - 208 => 'Already Reported', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Switch Proxy', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Time-out', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Large', - 415 => 'Unsupported Media Type', - 416 => 'Requested range not satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 425 => 'Unordered Collection', - 426 => 'Upgrade Required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 451 => 'Unavailable For Legal Reasons', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Time-out', - 505 => 'HTTP Version not supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 510 => 'Not Extended', - 511 => 'Network Authentication Required', - ]; - - /** @var string */ - private $reasonPhrase; - - /** @var int */ - private $statusCode; - - /** - * @param int $status Status code - * @param array $headers Response headers - * @param string|resource|StreamInterface|null $body Response body - * @param string $version Protocol version - * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) - */ - public function __construct( - int $status = 200, - array $headers = [], - $body = null, - string $version = '1.1', - string $reason = null - ) { - $this->assertStatusCodeRange($status); - - $this->statusCode = $status; - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - - $this->setHeaders($headers); - if ($reason == '' && isset(self::PHRASES[$this->statusCode])) { - $this->reasonPhrase = self::PHRASES[$this->statusCode]; - } else { - $this->reasonPhrase = (string) $reason; - } - - $this->protocol = $version; - } - - public function getStatusCode(): int - { - return $this->statusCode; - } - - public function getReasonPhrase(): string - { - return $this->reasonPhrase; - } - - public function withStatus($code, $reasonPhrase = ''): ResponseInterface - { - $this->assertStatusCodeIsInteger($code); - $code = (int) $code; - $this->assertStatusCodeRange($code); - - $new = clone $this; - $new->statusCode = $code; - if ($reasonPhrase == '' && isset(self::PHRASES[$new->statusCode])) { - $reasonPhrase = self::PHRASES[$new->statusCode]; - } - $new->reasonPhrase = (string) $reasonPhrase; - return $new; - } - - /** - * @param mixed $statusCode - */ - private function assertStatusCodeIsInteger($statusCode): void - { - if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { - throw new \InvalidArgumentException('Status code must be an integer value.'); - } - } - - private function assertStatusCodeRange(int $statusCode): void - { - if ($statusCode < 100 || $statusCode >= 600) { - throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); - } - } -} diff --git a/lib/guzzlehttp/psr7/src/Rfc7230.php b/lib/guzzlehttp/psr7/src/Rfc7230.php deleted file mode 100644 index 30224018d..000000000 --- a/lib/guzzlehttp/psr7/src/Rfc7230.php +++ /dev/null @@ -1,23 +0,0 @@ -@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; - public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; -} diff --git a/lib/guzzlehttp/psr7/src/ServerRequest.php b/lib/guzzlehttp/psr7/src/ServerRequest.php deleted file mode 100644 index b2aa382da..000000000 --- a/lib/guzzlehttp/psr7/src/ServerRequest.php +++ /dev/null @@ -1,344 +0,0 @@ - $headers Request headers - * @param string|resource|StreamInterface|null $body Request body - * @param string $version Protocol version - * @param array $serverParams Typically the $_SERVER superglobal - */ - public function __construct( - string $method, - $uri, - array $headers = [], - $body = null, - string $version = '1.1', - array $serverParams = [] - ) { - $this->serverParams = $serverParams; - - parent::__construct($method, $uri, $headers, $body, $version); - } - - /** - * Return an UploadedFile instance array. - * - * @param array $files An array which respect $_FILES structure - * - * @throws InvalidArgumentException for unrecognized values - */ - public static function normalizeFiles(array $files): array - { - $normalized = []; - - foreach ($files as $key => $value) { - if ($value instanceof UploadedFileInterface) { - $normalized[$key] = $value; - } elseif (is_array($value) && isset($value['tmp_name'])) { - $normalized[$key] = self::createUploadedFileFromSpec($value); - } elseif (is_array($value)) { - $normalized[$key] = self::normalizeFiles($value); - continue; - } else { - throw new InvalidArgumentException('Invalid value in files specification'); - } - } - - return $normalized; - } - - /** - * Create and return an UploadedFile instance from a $_FILES specification. - * - * If the specification represents an array of values, this method will - * delegate to normalizeNestedFileSpec() and return that return value. - * - * @param array $value $_FILES struct - * - * @return UploadedFileInterface|UploadedFileInterface[] - */ - private static function createUploadedFileFromSpec(array $value) - { - if (is_array($value['tmp_name'])) { - return self::normalizeNestedFileSpec($value); - } - - return new UploadedFile( - $value['tmp_name'], - (int) $value['size'], - (int) $value['error'], - $value['name'], - $value['type'] - ); - } - - /** - * Normalize an array of file specifications. - * - * Loops through all nested files and returns a normalized array of - * UploadedFileInterface instances. - * - * @return UploadedFileInterface[] - */ - private static function normalizeNestedFileSpec(array $files = []): array - { - $normalizedFiles = []; - - foreach (array_keys($files['tmp_name']) as $key) { - $spec = [ - 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key] ?? null, - 'error' => $files['error'][$key] ?? null, - 'name' => $files['name'][$key] ?? null, - 'type' => $files['type'][$key] ?? null, - ]; - $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); - } - - return $normalizedFiles; - } - - /** - * Return a ServerRequest populated with superglobals: - * $_GET - * $_POST - * $_COOKIE - * $_FILES - * $_SERVER - */ - public static function fromGlobals(): ServerRequestInterface - { - $method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; - $headers = getallheaders(); - $uri = self::getUriFromGlobals(); - $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); - $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; - - $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); - - return $serverRequest - ->withCookieParams($_COOKIE) - ->withQueryParams($_GET) - ->withParsedBody($_POST) - ->withUploadedFiles(self::normalizeFiles($_FILES)); - } - - private static function extractHostAndPortFromAuthority(string $authority): array - { - $uri = 'http://' . $authority; - $parts = parse_url($uri); - if (false === $parts) { - return [null, null]; - } - - $host = $parts['host'] ?? null; - $port = $parts['port'] ?? null; - - return [$host, $port]; - } - - /** - * Get a Uri populated with values from $_SERVER. - */ - public static function getUriFromGlobals(): UriInterface - { - $uri = new Uri(''); - - $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); - - $hasPort = false; - if (isset($_SERVER['HTTP_HOST'])) { - [$host, $port] = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); - if ($host !== null) { - $uri = $uri->withHost($host); - } - - if ($port !== null) { - $hasPort = true; - $uri = $uri->withPort($port); - } - } elseif (isset($_SERVER['SERVER_NAME'])) { - $uri = $uri->withHost($_SERVER['SERVER_NAME']); - } elseif (isset($_SERVER['SERVER_ADDR'])) { - $uri = $uri->withHost($_SERVER['SERVER_ADDR']); - } - - if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { - $uri = $uri->withPort($_SERVER['SERVER_PORT']); - } - - $hasQuery = false; - if (isset($_SERVER['REQUEST_URI'])) { - $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); - $uri = $uri->withPath($requestUriParts[0]); - if (isset($requestUriParts[1])) { - $hasQuery = true; - $uri = $uri->withQuery($requestUriParts[1]); - } - } - - if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { - $uri = $uri->withQuery($_SERVER['QUERY_STRING']); - } - - return $uri; - } - - public function getServerParams(): array - { - return $this->serverParams; - } - - public function getUploadedFiles(): array - { - return $this->uploadedFiles; - } - - public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface - { - $new = clone $this; - $new->uploadedFiles = $uploadedFiles; - - return $new; - } - - public function getCookieParams(): array - { - return $this->cookieParams; - } - - public function withCookieParams(array $cookies): ServerRequestInterface - { - $new = clone $this; - $new->cookieParams = $cookies; - - return $new; - } - - public function getQueryParams(): array - { - return $this->queryParams; - } - - public function withQueryParams(array $query): ServerRequestInterface - { - $new = clone $this; - $new->queryParams = $query; - - return $new; - } - - /** - * {@inheritdoc} - * - * @return array|object|null - */ - public function getParsedBody() - { - return $this->parsedBody; - } - - public function withParsedBody($data): ServerRequestInterface - { - $new = clone $this; - $new->parsedBody = $data; - - return $new; - } - - public function getAttributes(): array - { - return $this->attributes; - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function getAttribute($attribute, $default = null) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $default; - } - - return $this->attributes[$attribute]; - } - - public function withAttribute($attribute, $value): ServerRequestInterface - { - $new = clone $this; - $new->attributes[$attribute] = $value; - - return $new; - } - - public function withoutAttribute($attribute): ServerRequestInterface - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $this; - } - - $new = clone $this; - unset($new->attributes[$attribute]); - - return $new; - } -} diff --git a/lib/guzzlehttp/psr7/src/Stream.php b/lib/guzzlehttp/psr7/src/Stream.php deleted file mode 100644 index ecd31861e..000000000 --- a/lib/guzzlehttp/psr7/src/Stream.php +++ /dev/null @@ -1,282 +0,0 @@ -size = $options['size']; - } - - $this->customMetadata = $options['metadata'] ?? []; - $this->stream = $stream; - $meta = stream_get_meta_data($this->stream); - $this->seekable = $meta['seekable']; - $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); - $this->uri = $this->getMetadata('uri'); - } - - /** - * Closes the stream when the destructed - */ - public function __destruct() - { - $this->close(); - } - - public function __toString(): string - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - return ''; - } - } - - public function getContents(): string - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - - return Utils::tryGetContents($this->stream); - } - - public function close(): void - { - if (isset($this->stream)) { - if (is_resource($this->stream)) { - fclose($this->stream); - } - $this->detach(); - } - } - - public function detach() - { - if (!isset($this->stream)) { - return null; - } - - $result = $this->stream; - unset($this->stream); - $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = false; - - return $result; - } - - public function getSize(): ?int - { - if ($this->size !== null) { - return $this->size; - } - - if (!isset($this->stream)) { - return null; - } - - // Clear the stat cache if the stream has a URI - if ($this->uri) { - clearstatcache(true, $this->uri); - } - - $stats = fstat($this->stream); - if (is_array($stats) && isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } - - return null; - } - - public function isReadable(): bool - { - return $this->readable; - } - - public function isWritable(): bool - { - return $this->writable; - } - - public function isSeekable(): bool - { - return $this->seekable; - } - - public function eof(): bool - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - return feof($this->stream); - } - - public function tell(): int - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - $result = ftell($this->stream); - - if ($result === false) { - throw new \RuntimeException('Unable to determine stream position'); - } - - return $result; - } - - public function rewind(): void - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET): void - { - $whence = (int) $whence; - - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->seekable) { - throw new \RuntimeException('Stream is not seekable'); - } - if (fseek($this->stream, $offset, $whence) === -1) { - throw new \RuntimeException('Unable to seek to stream position ' - . $offset . ' with whence ' . var_export($whence, true)); - } - } - - public function read($length): string - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - if ($length < 0) { - throw new \RuntimeException('Length parameter cannot be negative'); - } - - if (0 === $length) { - return ''; - } - - try { - $string = fread($this->stream, $length); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to read from stream', 0, $e); - } - - if (false === $string) { - throw new \RuntimeException('Unable to read from stream'); - } - - return $string; - } - - public function write($string): int - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->writable) { - throw new \RuntimeException('Cannot write to a non-writable stream'); - } - - // We can't know the size after writing anything - $this->size = null; - $result = fwrite($this->stream, $string); - - if ($result === false) { - throw new \RuntimeException('Unable to write to stream'); - } - - return $result; - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function getMetadata($key = null) - { - if (!isset($this->stream)) { - return $key ? null : []; - } elseif (!$key) { - return $this->customMetadata + stream_get_meta_data($this->stream); - } elseif (isset($this->customMetadata[$key])) { - return $this->customMetadata[$key]; - } - - $meta = stream_get_meta_data($this->stream); - - return $meta[$key] ?? null; - } -} diff --git a/lib/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/lib/guzzlehttp/psr7/src/StreamDecoratorTrait.php deleted file mode 100644 index 56d4104d4..000000000 --- a/lib/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ /dev/null @@ -1,155 +0,0 @@ -stream = $stream; - } - - /** - * Magic method used to create a new stream if streams are not added in - * the constructor of a decorator (e.g., LazyOpenStream). - * - * @return StreamInterface - */ - public function __get(string $name) - { - if ($name === 'stream') { - $this->stream = $this->createStream(); - return $this->stream; - } - - throw new \UnexpectedValueException("$name not found on class"); - } - - public function __toString(): string - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - return ''; - } - } - - public function getContents(): string - { - return Utils::copyToString($this); - } - - /** - * Allow decorators to implement custom methods - * - * @return mixed - */ - public function __call(string $method, array $args) - { - /** @var callable $callable */ - $callable = [$this->stream, $method]; - $result = call_user_func_array($callable, $args); - - // Always return the wrapped object if the result is a return $this - return $result === $this->stream ? $this : $result; - } - - public function close(): void - { - $this->stream->close(); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } - - public function detach() - { - return $this->stream->detach(); - } - - public function getSize(): ?int - { - return $this->stream->getSize(); - } - - public function eof(): bool - { - return $this->stream->eof(); - } - - public function tell(): int - { - return $this->stream->tell(); - } - - public function isReadable(): bool - { - return $this->stream->isReadable(); - } - - public function isWritable(): bool - { - return $this->stream->isWritable(); - } - - public function isSeekable(): bool - { - return $this->stream->isSeekable(); - } - - public function rewind(): void - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET): void - { - $this->stream->seek($offset, $whence); - } - - public function read($length): string - { - return $this->stream->read($length); - } - - public function write($string): int - { - return $this->stream->write($string); - } - - /** - * Implement in subclasses to dynamically create streams when requested. - * - * @throws \BadMethodCallException - */ - protected function createStream(): StreamInterface - { - throw new \BadMethodCallException('Not implemented'); - } -} diff --git a/lib/guzzlehttp/psr7/src/StreamWrapper.php b/lib/guzzlehttp/psr7/src/StreamWrapper.php deleted file mode 100644 index 2a9346403..000000000 --- a/lib/guzzlehttp/psr7/src/StreamWrapper.php +++ /dev/null @@ -1,175 +0,0 @@ -isReadable()) { - $mode = $stream->isWritable() ? 'r+' : 'r'; - } elseif ($stream->isWritable()) { - $mode = 'w'; - } else { - throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); - } - - return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream)); - } - - /** - * Creates a stream context that can be used to open a stream as a php stream resource. - * - * @return resource - */ - public static function createStreamContext(StreamInterface $stream) - { - return stream_context_create([ - 'guzzle' => ['stream' => $stream] - ]); - } - - /** - * Registers the stream wrapper if needed - */ - public static function register(): void - { - if (!in_array('guzzle', stream_get_wrappers())) { - stream_wrapper_register('guzzle', __CLASS__); - } - } - - public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool - { - $options = stream_context_get_options($this->context); - - if (!isset($options['guzzle']['stream'])) { - return false; - } - - $this->mode = $mode; - $this->stream = $options['guzzle']['stream']; - - return true; - } - - public function stream_read(int $count): string - { - return $this->stream->read($count); - } - - public function stream_write(string $data): int - { - return $this->stream->write($data); - } - - public function stream_tell(): int - { - return $this->stream->tell(); - } - - public function stream_eof(): bool - { - return $this->stream->eof(); - } - - public function stream_seek(int $offset, int $whence): bool - { - $this->stream->seek($offset, $whence); - - return true; - } - - /** - * @return resource|false - */ - public function stream_cast(int $cast_as) - { - $stream = clone($this->stream); - $resource = $stream->detach(); - - return $resource ?? false; - } - - /** - * @return array - */ - public function stream_stat(): array - { - static $modeMap = [ - 'r' => 33060, - 'rb' => 33060, - 'r+' => 33206, - 'w' => 33188, - 'wb' => 33188 - ]; - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } - - /** - * @return array - */ - public function url_stat(string $path, int $flags): array - { - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 0, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } -} diff --git a/lib/guzzlehttp/psr7/src/UploadedFile.php b/lib/guzzlehttp/psr7/src/UploadedFile.php deleted file mode 100644 index b1521bcf8..000000000 --- a/lib/guzzlehttp/psr7/src/UploadedFile.php +++ /dev/null @@ -1,211 +0,0 @@ -setError($errorStatus); - $this->size = $size; - $this->clientFilename = $clientFilename; - $this->clientMediaType = $clientMediaType; - - if ($this->isOk()) { - $this->setStreamOrFile($streamOrFile); - } - } - - /** - * Depending on the value set file or stream variable - * - * @param StreamInterface|string|resource $streamOrFile - * - * @throws InvalidArgumentException - */ - private function setStreamOrFile($streamOrFile): void - { - if (is_string($streamOrFile)) { - $this->file = $streamOrFile; - } elseif (is_resource($streamOrFile)) { - $this->stream = new Stream($streamOrFile); - } elseif ($streamOrFile instanceof StreamInterface) { - $this->stream = $streamOrFile; - } else { - throw new InvalidArgumentException( - 'Invalid stream or file provided for UploadedFile' - ); - } - } - - /** - * @throws InvalidArgumentException - */ - private function setError(int $error): void - { - if (false === in_array($error, UploadedFile::ERRORS, true)) { - throw new InvalidArgumentException( - 'Invalid error status for UploadedFile' - ); - } - - $this->error = $error; - } - - private function isStringNotEmpty($param): bool - { - return is_string($param) && false === empty($param); - } - - /** - * Return true if there is no upload error - */ - private function isOk(): bool - { - return $this->error === UPLOAD_ERR_OK; - } - - public function isMoved(): bool - { - return $this->moved; - } - - /** - * @throws RuntimeException if is moved or not ok - */ - private function validateActive(): void - { - if (false === $this->isOk()) { - throw new RuntimeException('Cannot retrieve stream due to upload error'); - } - - if ($this->isMoved()) { - throw new RuntimeException('Cannot retrieve stream after it has already been moved'); - } - } - - public function getStream(): StreamInterface - { - $this->validateActive(); - - if ($this->stream instanceof StreamInterface) { - return $this->stream; - } - - /** @var string $file */ - $file = $this->file; - - return new LazyOpenStream($file, 'r+'); - } - - public function moveTo($targetPath): void - { - $this->validateActive(); - - if (false === $this->isStringNotEmpty($targetPath)) { - throw new InvalidArgumentException( - 'Invalid path provided for move operation; must be a non-empty string' - ); - } - - if ($this->file) { - $this->moved = PHP_SAPI === 'cli' - ? rename($this->file, $targetPath) - : move_uploaded_file($this->file, $targetPath); - } else { - Utils::copyToStream( - $this->getStream(), - new LazyOpenStream($targetPath, 'w') - ); - - $this->moved = true; - } - - if (false === $this->moved) { - throw new RuntimeException( - sprintf('Uploaded file could not be moved to %s', $targetPath) - ); - } - } - - public function getSize(): ?int - { - return $this->size; - } - - public function getError(): int - { - return $this->error; - } - - public function getClientFilename(): ?string - { - return $this->clientFilename; - } - - public function getClientMediaType(): ?string - { - return $this->clientMediaType; - } -} diff --git a/lib/guzzlehttp/psr7/src/Uri.php b/lib/guzzlehttp/psr7/src/Uri.php deleted file mode 100644 index 09e878d3d..000000000 --- a/lib/guzzlehttp/psr7/src/Uri.php +++ /dev/null @@ -1,740 +0,0 @@ - 80, - 'https' => 443, - 'ftp' => 21, - 'gopher' => 70, - 'nntp' => 119, - 'news' => 119, - 'telnet' => 23, - 'tn3270' => 23, - 'imap' => 143, - 'pop' => 110, - 'ldap' => 389, - ]; - - /** - * Unreserved characters for use in a regex. - * - * @link https://tools.ietf.org/html/rfc3986#section-2.3 - */ - private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; - - /** - * Sub-delims for use in a regex. - * - * @link https://tools.ietf.org/html/rfc3986#section-2.2 - */ - private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;='; - private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26']; - - /** @var string Uri scheme. */ - private $scheme = ''; - - /** @var string Uri user info. */ - private $userInfo = ''; - - /** @var string Uri host. */ - private $host = ''; - - /** @var int|null Uri port. */ - private $port; - - /** @var string Uri path. */ - private $path = ''; - - /** @var string Uri query string. */ - private $query = ''; - - /** @var string Uri fragment. */ - private $fragment = ''; - - /** @var string|null String representation */ - private $composedComponents; - - public function __construct(string $uri = '') - { - if ($uri !== '') { - $parts = self::parse($uri); - if ($parts === false) { - throw new MalformedUriException("Unable to parse URI: $uri"); - } - $this->applyParts($parts); - } - } - /** - * UTF-8 aware \parse_url() replacement. - * - * The internal function produces broken output for non ASCII domain names - * (IDN) when used with locales other than "C". - * - * On the other hand, cURL understands IDN correctly only when UTF-8 locale - * is configured ("C.UTF-8", "en_US.UTF-8", etc.). - * - * @see https://bugs.php.net/bug.php?id=52923 - * @see https://www.php.net/manual/en/function.parse-url.php#114817 - * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING - * - * @return array|false - */ - private static function parse(string $url) - { - // If IPv6 - $prefix = ''; - if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { - /** @var array{0:string, 1:string, 2:string} $matches */ - $prefix = $matches[1]; - $url = $matches[2]; - } - - /** @var string */ - $encodedUrl = preg_replace_callback( - '%[^:/@?&=#]+%usD', - static function ($matches) { - return urlencode($matches[0]); - }, - $url - ); - - $result = parse_url($prefix . $encodedUrl); - - if ($result === false) { - return false; - } - - return array_map('urldecode', $result); - } - - public function __toString(): string - { - if ($this->composedComponents === null) { - $this->composedComponents = self::composeComponents( - $this->scheme, - $this->getAuthority(), - $this->path, - $this->query, - $this->fragment - ); - } - - return $this->composedComponents; - } - - /** - * Composes a URI reference string from its various components. - * - * Usually this method does not need to be called manually but instead is used indirectly via - * `Psr\Http\Message\UriInterface::__toString`. - * - * PSR-7 UriInterface treats an empty component the same as a missing component as - * getQuery(), getFragment() etc. always return a string. This explains the slight - * difference to RFC 3986 Section 5.3. - * - * Another adjustment is that the authority separator is added even when the authority is missing/empty - * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with - * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But - * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to - * that format). - * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 - */ - public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string - { - $uri = ''; - - // weak type checks to also accept null until we can add scalar type hints - if ($scheme != '') { - $uri .= $scheme . ':'; - } - - if ($authority != '' || $scheme === 'file') { - $uri .= '//' . $authority; - } - - if ($authority != '' && $path != '' && $path[0] != '/') { - $path = '/' . $path; - } - - $uri .= $path; - - if ($query != '') { - $uri .= '?' . $query; - } - - if ($fragment != '') { - $uri .= '#' . $fragment; - } - - return $uri; - } - - /** - * Whether the URI has the default port of the current scheme. - * - * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used - * independently of the implementation. - */ - public static function isDefaultPort(UriInterface $uri): bool - { - return $uri->getPort() === null - || (isset(self::DEFAULT_PORTS[$uri->getScheme()]) && $uri->getPort() === self::DEFAULT_PORTS[$uri->getScheme()]); - } - - /** - * Whether the URI is absolute, i.e. it has a scheme. - * - * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true - * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative - * to another URI, the base URI. Relative references can be divided into several forms: - * - network-path references, e.g. '//example.com/path' - * - absolute-path references, e.g. '/path' - * - relative-path references, e.g. 'subpath' - * - * @see Uri::isNetworkPathReference - * @see Uri::isAbsolutePathReference - * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 - */ - public static function isAbsolute(UriInterface $uri): bool - { - return $uri->getScheme() !== ''; - } - - /** - * Whether the URI is a network-path reference. - * - * A relative reference that begins with two slash characters is termed an network-path reference. - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isNetworkPathReference(UriInterface $uri): bool - { - return $uri->getScheme() === '' && $uri->getAuthority() !== ''; - } - - /** - * Whether the URI is a absolute-path reference. - * - * A relative reference that begins with a single slash character is termed an absolute-path reference. - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isAbsolutePathReference(UriInterface $uri): bool - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && isset($uri->getPath()[0]) - && $uri->getPath()[0] === '/'; - } - - /** - * Whether the URI is a relative-path reference. - * - * A relative reference that does not begin with a slash character is termed a relative-path reference. - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isRelativePathReference(UriInterface $uri): bool - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); - } - - /** - * Whether the URI is a same-document reference. - * - * A same-document reference refers to a URI that is, aside from its fragment - * component, identical to the base URI. When no base URI is given, only an empty - * URI reference (apart from its fragment) is considered a same-document reference. - * - * @param UriInterface $uri The URI to check - * @param UriInterface|null $base An optional base URI to compare against - * - * @link https://tools.ietf.org/html/rfc3986#section-4.4 - */ - public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool - { - if ($base !== null) { - $uri = UriResolver::resolve($base, $uri); - - return ($uri->getScheme() === $base->getScheme()) - && ($uri->getAuthority() === $base->getAuthority()) - && ($uri->getPath() === $base->getPath()) - && ($uri->getQuery() === $base->getQuery()); - } - - return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; - } - - /** - * Creates a new URI with a specific query string value removed. - * - * Any existing query string values that exactly match the provided key are - * removed. - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Query string key to remove. - */ - public static function withoutQueryValue(UriInterface $uri, string $key): UriInterface - { - $result = self::getFilteredQueryString($uri, [$key]); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with a specific query string value. - * - * Any existing query string values that exactly match the provided key are - * removed and replaced with the given key value pair. - * - * A value of null will set the query string key without a value, e.g. "key" - * instead of "key=value". - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Key to set. - * @param string|null $value Value to set - */ - public static function withQueryValue(UriInterface $uri, string $key, ?string $value): UriInterface - { - $result = self::getFilteredQueryString($uri, [$key]); - - $result[] = self::generateQueryString($key, $value); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with multiple specific query string values. - * - * It has the same behavior as withQueryValue() but for an associative array of key => value. - * - * @param UriInterface $uri URI to use as a base. - * @param array $keyValueArray Associative array of key and values - */ - public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface - { - $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); - - foreach ($keyValueArray as $key => $value) { - $result[] = self::generateQueryString((string) $key, $value !== null ? (string) $value : null); - } - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a URI from a hash of `parse_url` components. - * - * @link http://php.net/manual/en/function.parse-url.php - * - * @throws MalformedUriException If the components do not form a valid URI. - */ - public static function fromParts(array $parts): UriInterface - { - $uri = new self(); - $uri->applyParts($parts); - $uri->validateState(); - - return $uri; - } - - public function getScheme(): string - { - return $this->scheme; - } - - public function getAuthority(): string - { - $authority = $this->host; - if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; - } - - if ($this->port !== null) { - $authority .= ':' . $this->port; - } - - return $authority; - } - - public function getUserInfo(): string - { - return $this->userInfo; - } - - public function getHost(): string - { - return $this->host; - } - - public function getPort(): ?int - { - return $this->port; - } - - public function getPath(): string - { - return $this->path; - } - - public function getQuery(): string - { - return $this->query; - } - - public function getFragment(): string - { - return $this->fragment; - } - - public function withScheme($scheme): UriInterface - { - $scheme = $this->filterScheme($scheme); - - if ($this->scheme === $scheme) { - return $this; - } - - $new = clone $this; - $new->scheme = $scheme; - $new->composedComponents = null; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withUserInfo($user, $password = null): UriInterface - { - $info = $this->filterUserInfoComponent($user); - if ($password !== null) { - $info .= ':' . $this->filterUserInfoComponent($password); - } - - if ($this->userInfo === $info) { - return $this; - } - - $new = clone $this; - $new->userInfo = $info; - $new->composedComponents = null; - $new->validateState(); - - return $new; - } - - public function withHost($host): UriInterface - { - $host = $this->filterHost($host); - - if ($this->host === $host) { - return $this; - } - - $new = clone $this; - $new->host = $host; - $new->composedComponents = null; - $new->validateState(); - - return $new; - } - - public function withPort($port): UriInterface - { - $port = $this->filterPort($port); - - if ($this->port === $port) { - return $this; - } - - $new = clone $this; - $new->port = $port; - $new->composedComponents = null; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withPath($path): UriInterface - { - $path = $this->filterPath($path); - - if ($this->path === $path) { - return $this; - } - - $new = clone $this; - $new->path = $path; - $new->composedComponents = null; - $new->validateState(); - - return $new; - } - - public function withQuery($query): UriInterface - { - $query = $this->filterQueryAndFragment($query); - - if ($this->query === $query) { - return $this; - } - - $new = clone $this; - $new->query = $query; - $new->composedComponents = null; - - return $new; - } - - public function withFragment($fragment): UriInterface - { - $fragment = $this->filterQueryAndFragment($fragment); - - if ($this->fragment === $fragment) { - return $this; - } - - $new = clone $this; - $new->fragment = $fragment; - $new->composedComponents = null; - - return $new; - } - - public function jsonSerialize(): string - { - return $this->__toString(); - } - - /** - * Apply parse_url parts to a URI. - * - * @param array $parts Array of parse_url parts to apply. - */ - private function applyParts(array $parts): void - { - $this->scheme = isset($parts['scheme']) - ? $this->filterScheme($parts['scheme']) - : ''; - $this->userInfo = isset($parts['user']) - ? $this->filterUserInfoComponent($parts['user']) - : ''; - $this->host = isset($parts['host']) - ? $this->filterHost($parts['host']) - : ''; - $this->port = isset($parts['port']) - ? $this->filterPort($parts['port']) - : null; - $this->path = isset($parts['path']) - ? $this->filterPath($parts['path']) - : ''; - $this->query = isset($parts['query']) - ? $this->filterQueryAndFragment($parts['query']) - : ''; - $this->fragment = isset($parts['fragment']) - ? $this->filterQueryAndFragment($parts['fragment']) - : ''; - if (isset($parts['pass'])) { - $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); - } - - $this->removeDefaultPort(); - } - - /** - * @param mixed $scheme - * - * @throws \InvalidArgumentException If the scheme is invalid. - */ - private function filterScheme($scheme): string - { - if (!is_string($scheme)) { - throw new \InvalidArgumentException('Scheme must be a string'); - } - - return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - } - - /** - * @param mixed $component - * - * @throws \InvalidArgumentException If the user info is invalid. - */ - private function filterUserInfoComponent($component): string - { - if (!is_string($component)) { - throw new \InvalidArgumentException('User info must be a string'); - } - - return preg_replace_callback( - '/(?:[^%' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ']+|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $component - ); - } - - /** - * @param mixed $host - * - * @throws \InvalidArgumentException If the host is invalid. - */ - private function filterHost($host): string - { - if (!is_string($host)) { - throw new \InvalidArgumentException('Host must be a string'); - } - - return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - } - - /** - * @param mixed $port - * - * @throws \InvalidArgumentException If the port is invalid. - */ - private function filterPort($port): ?int - { - if ($port === null) { - return null; - } - - $port = (int) $port; - if (0 > $port || 0xffff < $port) { - throw new \InvalidArgumentException( - sprintf('Invalid port: %d. Must be between 0 and 65535', $port) - ); - } - - return $port; - } - - /** - * @param string[] $keys - * - * @return string[] - */ - private static function getFilteredQueryString(UriInterface $uri, array $keys): array - { - $current = $uri->getQuery(); - - if ($current === '') { - return []; - } - - $decodedKeys = array_map('rawurldecode', $keys); - - return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { - return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); - }); - } - - private static function generateQueryString(string $key, ?string $value): string - { - // Query string separators ("=", "&") within the key or value need to be encoded - // (while preventing double-encoding) before setting the query string. All other - // chars that need percent-encoding will be encoded by withQuery(). - $queryString = strtr($key, self::QUERY_SEPARATORS_REPLACEMENT); - - if ($value !== null) { - $queryString .= '=' . strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); - } - - return $queryString; - } - - private function removeDefaultPort(): void - { - if ($this->port !== null && self::isDefaultPort($this)) { - $this->port = null; - } - } - - /** - * Filters the path of a URI - * - * @param mixed $path - * - * @throws \InvalidArgumentException If the path is invalid. - */ - private function filterPath($path): string - { - if (!is_string($path)) { - throw new \InvalidArgumentException('Path must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $path - ); - } - - /** - * Filters the query string or fragment of a URI. - * - * @param mixed $str - * - * @throws \InvalidArgumentException If the query or fragment is invalid. - */ - private function filterQueryAndFragment($str): string - { - if (!is_string($str)) { - throw new \InvalidArgumentException('Query and fragment must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $str - ); - } - - private function rawurlencodeMatchZero(array $match): string - { - return rawurlencode($match[0]); - } - - private function validateState(): void - { - if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { - $this->host = self::HTTP_DEFAULT_HOST; - } - - if ($this->getAuthority() === '') { - if (0 === strpos($this->path, '//')) { - throw new MalformedUriException('The path of a URI without an authority must not start with two slashes "//"'); - } - if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { - throw new MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon'); - } - } - } -} diff --git a/lib/guzzlehttp/psr7/src/UriComparator.php b/lib/guzzlehttp/psr7/src/UriComparator.php deleted file mode 100644 index 70c582aa0..000000000 --- a/lib/guzzlehttp/psr7/src/UriComparator.php +++ /dev/null @@ -1,52 +0,0 @@ -getHost(), $modified->getHost()) !== 0) { - return true; - } - - if ($original->getScheme() !== $modified->getScheme()) { - return true; - } - - if (self::computePort($original) !== self::computePort($modified)) { - return true; - } - - return false; - } - - private static function computePort(UriInterface $uri): int - { - $port = $uri->getPort(); - - if (null !== $port) { - return $port; - } - - return 'https' === $uri->getScheme() ? 443 : 80; - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/lib/guzzlehttp/psr7/src/UriNormalizer.php b/lib/guzzlehttp/psr7/src/UriNormalizer.php deleted file mode 100644 index e12971edd..000000000 --- a/lib/guzzlehttp/psr7/src/UriNormalizer.php +++ /dev/null @@ -1,220 +0,0 @@ -getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') - ) { - $uri = $uri->withPath('/'); - } - - if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { - $uri = $uri->withHost(''); - } - - if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { - $uri = $uri->withPort(null); - } - - if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { - $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); - } - - if ($flags & self::REMOVE_DUPLICATE_SLASHES) { - $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); - } - - if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { - $queryKeyValues = explode('&', $uri->getQuery()); - sort($queryKeyValues); - $uri = $uri->withQuery(implode('&', $queryKeyValues)); - } - - return $uri; - } - - /** - * Whether two URIs can be considered equivalent. - * - * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also - * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be - * resolved against the same base URI. If this is not the case, determination of equivalence or difference of - * relative references does not mean anything. - * - * @param UriInterface $uri1 An URI to compare - * @param UriInterface $uri2 An URI to compare - * @param int $normalizations A bitmask of normalizations to apply, see constants - * - * @link https://tools.ietf.org/html/rfc3986#section-6.1 - */ - public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool - { - return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); - } - - private static function capitalizePercentEncoding(UriInterface $uri): UriInterface - { - $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - - $callback = function (array $match) { - return strtoupper($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private static function decodeUnreservedCharacters(UriInterface $uri): UriInterface - { - $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - - $callback = function (array $match) { - return rawurldecode($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/lib/guzzlehttp/psr7/src/UriResolver.php b/lib/guzzlehttp/psr7/src/UriResolver.php deleted file mode 100644 index 426e5c9ad..000000000 --- a/lib/guzzlehttp/psr7/src/UriResolver.php +++ /dev/null @@ -1,211 +0,0 @@ -getScheme() != '') { - return $rel->withPath(self::removeDotSegments($rel->getPath())); - } - - if ($rel->getAuthority() != '') { - $targetAuthority = $rel->getAuthority(); - $targetPath = self::removeDotSegments($rel->getPath()); - $targetQuery = $rel->getQuery(); - } else { - $targetAuthority = $base->getAuthority(); - if ($rel->getPath() === '') { - $targetPath = $base->getPath(); - $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); - } else { - if ($rel->getPath()[0] === '/') { - $targetPath = $rel->getPath(); - } else { - if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); - } else { - $lastSlashPos = strrpos($base->getPath(), '/'); - if ($lastSlashPos === false) { - $targetPath = $rel->getPath(); - } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); - } - } - } - $targetPath = self::removeDotSegments($targetPath); - $targetQuery = $rel->getQuery(); - } - } - - return new Uri(Uri::composeComponents( - $base->getScheme(), - $targetAuthority, - $targetPath, - $targetQuery, - $rel->getFragment() - )); - } - - /** - * Returns the target URI as a relative reference from the base URI. - * - * This method is the counterpart to resolve(): - * - * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) - * - * One use-case is to use the current request URI as base URI and then generate relative links in your documents - * to reduce the document size or offer self-contained downloadable document archives. - * - * $base = new Uri('http://example.com/a/b/'); - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. - * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. - * - * This method also accepts a target that is already relative and will try to relativize it further. Only a - * relative-path reference will be returned as-is. - * - * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well - */ - public static function relativize(UriInterface $base, UriInterface $target): UriInterface - { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') - ) { - return $target; - } - - if (Uri::isRelativePathReference($target)) { - // As the target is already highly relative we return it as-is. It would be possible to resolve - // the target with `$target = self::resolve($base, $target);` and then try make it more relative - // by removing a duplicate query. But let's not do that automatically. - return $target; - } - - if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { - return $target->withScheme(''); - } - - // We must remove the path before removing the authority because if the path starts with two slashes, the URI - // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also - // invalid. - $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); - - if ($base->getPath() !== $target->getPath()) { - return $emptyPathUri->withPath(self::getRelativePath($base, $target)); - } - - if ($base->getQuery() === $target->getQuery()) { - // Only the target fragment is left. And it must be returned even if base and target fragment are the same. - return $emptyPathUri->withQuery(''); - } - - // If the base URI has a query but the target has none, we cannot return an empty path reference as it would - // inherit the base query component when resolving. - if ($target->getQuery() === '') { - $segments = explode('/', $target->getPath()); - /** @var string $lastSegment */ - $lastSegment = end($segments); - - return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); - } - - return $emptyPathUri; - } - - private static function getRelativePath(UriInterface $base, UriInterface $target): string - { - $sourceSegments = explode('/', $base->getPath()); - $targetSegments = explode('/', $target->getPath()); - array_pop($sourceSegments); - $targetLastSegment = array_pop($targetSegments); - foreach ($sourceSegments as $i => $segment) { - if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { - unset($sourceSegments[$i], $targetSegments[$i]); - } else { - break; - } - } - $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); - - // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. - if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { - $relativePath = "./$relativePath"; - } elseif ('/' === $relativePath[0]) { - if ($base->getAuthority() != '' && $base->getPath() === '') { - // In this case an extra slash is added by resolve() automatically. So we must not add one here. - $relativePath = ".$relativePath"; - } else { - $relativePath = "./$relativePath"; - } - } - - return $relativePath; - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/lib/guzzlehttp/psr7/src/Utils.php b/lib/guzzlehttp/psr7/src/Utils.php deleted file mode 100644 index 3a4cf3946..000000000 --- a/lib/guzzlehttp/psr7/src/Utils.php +++ /dev/null @@ -1,459 +0,0 @@ - $v) { - if (!is_string($k) || !in_array(strtolower($k), $keys)) { - $result[$k] = $v; - } - } - - return $result; - } - - /** - * Copy the contents of a stream into another stream until the given number - * of bytes have been read. - * - * @param StreamInterface $source Stream to read from - * @param StreamInterface $dest Stream to write to - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @throws \RuntimeException on error. - */ - public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void - { - $bufferSize = 8192; - - if ($maxLen === -1) { - while (!$source->eof()) { - if (!$dest->write($source->read($bufferSize))) { - break; - } - } - } else { - $remaining = $maxLen; - while ($remaining > 0 && !$source->eof()) { - $buf = $source->read(min($bufferSize, $remaining)); - $len = strlen($buf); - if (!$len) { - break; - } - $remaining -= $len; - $dest->write($buf); - } - } - } - - /** - * Copy the contents of a stream into a string until the given number of - * bytes have been read. - * - * @param StreamInterface $stream Stream to read - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @throws \RuntimeException on error. - */ - public static function copyToString(StreamInterface $stream, int $maxLen = -1): string - { - $buffer = ''; - - if ($maxLen === -1) { - while (!$stream->eof()) { - $buf = $stream->read(1048576); - if ($buf === '') { - break; - } - $buffer .= $buf; - } - return $buffer; - } - - $len = 0; - while (!$stream->eof() && $len < $maxLen) { - $buf = $stream->read($maxLen - $len); - if ($buf === '') { - break; - } - $buffer .= $buf; - $len = strlen($buffer); - } - - return $buffer; - } - - /** - * Calculate a hash of a stream. - * - * This method reads the entire stream to calculate a rolling hash, based - * on PHP's `hash_init` functions. - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @throws \RuntimeException on error. - */ - public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string - { - $pos = $stream->tell(); - - if ($pos > 0) { - $stream->rewind(); - } - - $ctx = hash_init($algo); - while (!$stream->eof()) { - hash_update($ctx, $stream->read(1048576)); - } - - $out = hash_final($ctx, $rawOutput); - $stream->seek($pos); - - return $out; - } - - /** - * Clone and modify a request with the given changes. - * - * This method is useful for reducing the number of clones needed to mutate - * a message. - * - * The changes can be one of: - * - method: (string) Changes the HTTP method. - * - set_headers: (array) Sets the given headers. - * - remove_headers: (array) Remove the given headers. - * - body: (mixed) Sets the given body. - * - uri: (UriInterface) Set the URI. - * - query: (string) Set the query string value of the URI. - * - version: (string) Set the protocol version. - * - * @param RequestInterface $request Request to clone and modify. - * @param array $changes Changes to apply. - */ - public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface - { - if (!$changes) { - return $request; - } - - $headers = $request->getHeaders(); - - if (!isset($changes['uri'])) { - $uri = $request->getUri(); - } else { - // Remove the host header if one is on the URI - if ($host = $changes['uri']->getHost()) { - $changes['set_headers']['Host'] = $host; - - if ($port = $changes['uri']->getPort()) { - $standardPorts = ['http' => 80, 'https' => 443]; - $scheme = $changes['uri']->getScheme(); - if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':' . $port; - } - } - } - $uri = $changes['uri']; - } - - if (!empty($changes['remove_headers'])) { - $headers = self::caselessRemove($changes['remove_headers'], $headers); - } - - if (!empty($changes['set_headers'])) { - $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers); - $headers = $changes['set_headers'] + $headers; - } - - if (isset($changes['query'])) { - $uri = $uri->withQuery($changes['query']); - } - - if ($request instanceof ServerRequestInterface) { - $new = (new ServerRequest( - $changes['method'] ?? $request->getMethod(), - $uri, - $headers, - $changes['body'] ?? $request->getBody(), - $changes['version'] ?? $request->getProtocolVersion(), - $request->getServerParams() - )) - ->withParsedBody($request->getParsedBody()) - ->withQueryParams($request->getQueryParams()) - ->withCookieParams($request->getCookieParams()) - ->withUploadedFiles($request->getUploadedFiles()); - - foreach ($request->getAttributes() as $key => $value) { - $new = $new->withAttribute($key, $value); - } - - return $new; - } - - return new Request( - $changes['method'] ?? $request->getMethod(), - $uri, - $headers, - $changes['body'] ?? $request->getBody(), - $changes['version'] ?? $request->getProtocolVersion() - ); - } - - /** - * Read a line from the stream up to the maximum allowed buffer length. - * - * @param StreamInterface $stream Stream to read from - * @param int|null $maxLength Maximum buffer length - */ - public static function readLine(StreamInterface $stream, ?int $maxLength = null): string - { - $buffer = ''; - $size = 0; - - while (!$stream->eof()) { - if ('' === ($byte = $stream->read(1))) { - return $buffer; - } - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte === "\n" || ++$size === $maxLength - 1) { - break; - } - } - - return $buffer; - } - - /** - * Create a new stream based on the input type. - * - * Options is an associative array that can contain the following keys: - * - metadata: Array of custom metadata. - * - size: Size of the stream. - * - * This method accepts the following `$resource` types: - * - `Psr\Http\Message\StreamInterface`: Returns the value as-is. - * - `string`: Creates a stream object that uses the given string as the contents. - * - `resource`: Creates a stream object that wraps the given PHP stream resource. - * - `Iterator`: If the provided value implements `Iterator`, then a read-only - * stream object will be created that wraps the given iterable. Each time the - * stream is read from, data from the iterator will fill a buffer and will be - * continuously called until the buffer is equal to the requested read size. - * Subsequent read calls will first read from the buffer and then call `next` - * on the underlying iterator until it is exhausted. - * - `object` with `__toString()`: If the object has the `__toString()` method, - * the object will be cast to a string and then a stream will be returned that - * uses the string value. - * - `NULL`: When `null` is passed, an empty stream object is returned. - * - `callable` When a callable is passed, a read-only stream object will be - * created that invokes the given callable. The callable is invoked with the - * number of suggested bytes to read. The callable can return any number of - * bytes, but MUST return `false` when there is no more data to return. The - * stream object that wraps the callable will invoke the callable until the - * number of requested bytes are available. Any additional bytes will be - * buffered and used in subsequent reads. - * - * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data - * @param array{size?: int, metadata?: array} $options Additional options - * - * @throws \InvalidArgumentException if the $resource arg is not valid. - */ - public static function streamFor($resource = '', array $options = []): StreamInterface - { - if (is_scalar($resource)) { - $stream = self::tryFopen('php://temp', 'r+'); - if ($resource !== '') { - fwrite($stream, (string) $resource); - fseek($stream, 0); - } - return new Stream($stream, $options); - } - - switch (gettype($resource)) { - case 'resource': - /* - * The 'php://input' is a special stream with quirks and inconsistencies. - * We avoid using that stream by reading it into php://temp - */ - - /** @var resource $resource */ - if ((\stream_get_meta_data($resource)['uri'] ?? '') === 'php://input') { - $stream = self::tryFopen('php://temp', 'w+'); - stream_copy_to_stream($resource, $stream); - fseek($stream, 0); - $resource = $stream; - } - return new Stream($resource, $options); - case 'object': - /** @var object $resource */ - if ($resource instanceof StreamInterface) { - return $resource; - } elseif ($resource instanceof \Iterator) { - return new PumpStream(function () use ($resource) { - if (!$resource->valid()) { - return false; - } - $result = $resource->current(); - $resource->next(); - return $result; - }, $options); - } elseif (method_exists($resource, '__toString')) { - return self::streamFor((string) $resource, $options); - } - break; - case 'NULL': - return new Stream(self::tryFopen('php://temp', 'r+'), $options); - } - - if (is_callable($resource)) { - return new PumpStream($resource, $options); - } - - throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); - } - - /** - * Safely opens a PHP stream resource using a filename. - * - * When fopen fails, PHP normally raises a warning. This function adds an - * error handler that checks for errors and throws an exception instead. - * - * @param string $filename File to open - * @param string $mode Mode used to open the file - * - * @return resource - * - * @throws \RuntimeException if the file cannot be opened - */ - public static function tryFopen(string $filename, string $mode) - { - $ex = null; - set_error_handler(static function (int $errno, string $errstr) use ($filename, $mode, &$ex): bool { - $ex = new \RuntimeException(sprintf( - 'Unable to open "%s" using mode "%s": %s', - $filename, - $mode, - $errstr - )); - - return true; - }); - - try { - /** @var resource $handle */ - $handle = fopen($filename, $mode); - } catch (\Throwable $e) { - $ex = new \RuntimeException(sprintf( - 'Unable to open "%s" using mode "%s": %s', - $filename, - $mode, - $e->getMessage() - ), 0, $e); - } - - restore_error_handler(); - - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - - return $handle; - } - - /** - * Safely gets the contents of a given stream. - * - * When stream_get_contents fails, PHP normally raises a warning. This - * function adds an error handler that checks for errors and throws an - * exception instead. - * - * @param resource $stream - * - * @throws \RuntimeException if the stream cannot be read - */ - public static function tryGetContents($stream): string - { - $ex = null; - set_error_handler(static function (int $errno, string $errstr) use (&$ex): bool { - $ex = new \RuntimeException(sprintf( - 'Unable to read stream contents: %s', - $errstr - )); - - return true; - }); - - try { - /** @var string|false $contents */ - $contents = stream_get_contents($stream); - - if ($contents === false) { - $ex = new \RuntimeException('Unable to read stream contents'); - } - } catch (\Throwable $e) { - $ex = new \RuntimeException(sprintf( - 'Unable to read stream contents: %s', - $e->getMessage() - ), 0, $e); - } - - restore_error_handler(); - - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - - return $contents; - } - - /** - * Returns a UriInterface for the given value. - * - * This function accepts a string or UriInterface and returns a - * UriInterface for the given value. If the value is already a - * UriInterface, it is returned as-is. - * - * @param string|UriInterface $uri - * - * @throws \InvalidArgumentException - */ - public static function uriFor($uri): UriInterface - { - if ($uri instanceof UriInterface) { - return $uri; - } - - if (is_string($uri)) { - return new Uri($uri); - } - - throw new \InvalidArgumentException('URI must be a string or UriInterface'); - } -} diff --git a/lib/laminas/laminas-loader/.laminas-ci.json b/lib/laminas/laminas-loader/.laminas-ci.json deleted file mode 100644 index bce3fa21b..000000000 --- a/lib/laminas/laminas-loader/.laminas-ci.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "ignore_php_platform_requirements": { - "8.1": true - } -} diff --git a/lib/laminas/laminas-loader/COPYRIGHT.md b/lib/laminas/laminas-loader/COPYRIGHT.md deleted file mode 100644 index 0a8cccc06..000000000 --- a/lib/laminas/laminas-loader/COPYRIGHT.md +++ /dev/null @@ -1 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) diff --git a/lib/laminas/laminas-loader/LICENSE.md b/lib/laminas/laminas-loader/LICENSE.md deleted file mode 100644 index 10b40f142..000000000 --- a/lib/laminas/laminas-loader/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of Laminas Foundation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/laminas/laminas-loader/README.md b/lib/laminas/laminas-loader/README.md deleted file mode 100644 index 1c9911767..000000000 --- a/lib/laminas/laminas-loader/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# laminas-loader - -> This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only). -> If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/). -> If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D) - - -[![Build Status](https://github.com/laminas/laminas-loader/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-loader/actions?query=workflow%3A"Continuous+Integration") - -laminas-loader provides different strategies for autoloading PHP classes. - -- File issues at https://github.com/laminas/laminas-loader/issues -- Documentation is at https://docs.laminas.dev/laminas-loader/ diff --git a/lib/laminas/laminas-loader/composer.json b/lib/laminas/laminas-loader/composer.json deleted file mode 100644 index 8457d67ed..000000000 --- a/lib/laminas/laminas-loader/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "laminas/laminas-loader", - "description": "Autoloading and plugin loading strategies", - "license": "BSD-3-Clause", - "keywords": [ - "laminas", - "loader" - ], - "homepage": "https://laminas.dev", - "support": { - "docs": "https://docs.laminas.dev/laminas-loader/", - "issues": "https://github.com/laminas/laminas-loader/issues", - "source": "https://github.com/laminas/laminas-loader", - "rss": "https://github.com/laminas/laminas-loader/releases.atom", - "chat": "https://laminas.dev/chat", - "forum": "https://discourse.laminas.dev" - }, - "config": { - "sort-packages": true - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.3" - }, - "autoload": { - "psr-4": { - "Laminas\\Loader\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "LaminasTest\\Loader\\": "test/" - } - }, - "scripts": { - "check": [ - "@cs-check", - "@test" - ], - "cs-check": "phpcs", - "cs-fix": "phpcbf", - "test": "phpunit --colors=always", - "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" - }, - "conflict": { - "zendframework/zend-loader": "*" - } -} diff --git a/lib/laminas/laminas-loader/composer.lock b/lib/laminas/laminas-loader/composer.lock deleted file mode 100644 index 19e27ed25..000000000 --- a/lib/laminas/laminas-loader/composer.lock +++ /dev/null @@ -1,2460 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "04bc51f9c0a84aa54ea419f7c9fbee94", - "packages": [], - "packages-dev": [ - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.1", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2020-12-07T18:04:37+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "laminas/laminas-coding-standard", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "c953ecb1d37034f4aa326046e2c24a10fe0a2845" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/c953ecb1d37034f4aa326046e2c24a10fe0a2845", - "reference": "c953ecb1d37034f4aa326046e2c24a10fe0a2845", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.3 || ~8.0.0", - "slevomat/coding-standard": "^6.4.1", - "squizlabs/php_codesniffer": "^3.5.8", - "webimpress/coding-standard": "^1.1.6" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "LaminasCodingStandard\\": "src/LaminasCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas Coding Standard", - "homepage": "https://laminas.dev", - "keywords": [ - "Coding Standard", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-coding-standard/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-coding-standard/issues", - "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", - "source": "https://github.com/laminas/laminas-coding-standard" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-05-17T17:39:41+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.12.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" - }, - "time": "2021-07-21T10:44:31+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, - "time": "2020-09-17T18:55:26+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.13.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" - }, - "time": "2021-03-17T13:42:18+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "0.4.9", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "consistence/coding-standard": "^3.5", - "ergebnis/composer-normalize": "^2.0.2", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.26", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^4.7.2", - "symfony/process": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/master" - }, - "time": "2020-08-03T20:32:43+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-03-28T07:26:59+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:57:25+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" - }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-08-31T06:47:40+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:52:38+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:24:23+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-11T13:31:12+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-15T12:49:02+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "6.4.1", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", - "squizlabs/php_codesniffer": "^3.5.6" - }, - "require-dev": { - "phing/phing": "2.16.3", - "php-parallel-lint/php-parallel-lint": "1.2.0", - "phpstan/phpstan": "0.12.48", - "phpstan/phpstan-deprecation-rules": "0.12.5", - "phpstan/phpstan-phpunit": "0.12.16", - "phpstan/phpstan-strict-rules": "0.12.5", - "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/6.4.1" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2020-10-05T12:39:37+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-04-09T00:54:41+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webimpress/coding-standard", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/webimpress/coding-standard.git", - "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/8f4a220de33f471a8101836f7ec72b852c3f9f03", - "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.4" - }, - "type": "phpcodesniffer-standard", - "extra": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - }, - "autoload": { - "psr-4": { - "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "Webimpress Coding Standard", - "keywords": [ - "Coding Standard", - "PSR-2", - "phpcs", - "psr-12", - "webimpress" - ], - "support": { - "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.2" - }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2021-04-12T12:51:27+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/lib/laminas/laminas-loader/phpcs.xml.dist b/lib/laminas/laminas-loader/phpcs.xml.dist deleted file mode 100644 index 174a8d4c9..000000000 --- a/lib/laminas/laminas-loader/phpcs.xml.dist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - src - test - */TestAsset/* - */_files/* - - - - - - /src/Exception/* - /src/SplAutoloader.php - /src/AutoloaderFactory.php - /src/ClassMapAutoloader.php - /src/ModuleAutoloader.php - /src/StandardAutoloader.php - - diff --git a/lib/laminas/laminas-loader/src/AutoloaderFactory.php b/lib/laminas/laminas-loader/src/AutoloaderFactory.php deleted file mode 100644 index e1dabba1a..000000000 --- a/lib/laminas/laminas-loader/src/AutoloaderFactory.php +++ /dev/null @@ -1,212 +0,0 @@ - - * array( - * '' => $autoloaderOptions, - * ) - * - * - * The factory will then loop through and instantiate each autoloader with - * the specified options, and register each with the spl_autoloader. - * - * You may retrieve the concrete autoloader instances later using - * {@link getRegisteredAutoloaders()}. - * - * Note that the class names must be resolvable on the include_path or via - * the Laminas library, using PSR-0 rules (unless the class has already been - * loaded). - * - * @param array|Traversable $options (optional) options to use. Defaults to Laminas\Loader\StandardAutoloader - * @return void - * @throws Exception\InvalidArgumentException For invalid options. - * @throws Exception\InvalidArgumentException For unloadable autoloader classes. - * @throws Exception\DomainException For autoloader classes not implementing SplAutoloader. - */ - public static function factory($options = null) - { - if (null === $options) { - if (! isset(static::$loaders[static::STANDARD_AUTOLOADER])) { - $autoloader = static::getStandardAutoloader(); - $autoloader->register(); - static::$loaders[static::STANDARD_AUTOLOADER] = $autoloader; - } - - // Return so we don't hit the next check's exception (we're done here anyway) - return; - } - - if (! is_array($options) && ! $options instanceof Traversable) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException( - 'Options provided must be an array or Traversable' - ); - } - - foreach ($options as $class => $autoloaderOptions) { - if (! isset(static::$loaders[$class])) { - $autoloader = static::getStandardAutoloader(); - if (! class_exists($class) && ! $autoloader->autoload($class)) { - require_once 'Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException( - sprintf('Autoloader class "%s" not loaded', $class) - ); - } - - if (! is_subclass_of($class, SplAutoloader::class)) { - require_once 'Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException( - sprintf('Autoloader class %s must implement Laminas\\Loader\\SplAutoloader', $class) - ); - } - - if ($class === static::STANDARD_AUTOLOADER) { - $autoloader->setOptions($autoloaderOptions); - } else { - $autoloader = new $class($autoloaderOptions); - } - $autoloader->register(); - static::$loaders[$class] = $autoloader; - } else { - static::$loaders[$class]->setOptions($autoloaderOptions); - } - } - } - - /** - * Get a list of all autoloaders registered with the factory - * - * Returns an array of autoloader instances. - * - * @return array - */ - public static function getRegisteredAutoloaders() - { - return static::$loaders; - } - - /** - * Retrieves an autoloader by class name - * - * @param string $class - * @return SplAutoloader - * @throws Exception\InvalidArgumentException For non-registered class. - */ - public static function getRegisteredAutoloader($class) - { - if (! isset(static::$loaders[$class])) { - require_once 'Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException(sprintf('Autoloader class "%s" not loaded', $class)); - } - return static::$loaders[$class]; - } - - /** - * Unregisters all autoloaders that have been registered via the factory. - * This will NOT unregister autoloaders registered outside of the fctory. - * - * @return void - */ - public static function unregisterAutoloaders() - { - foreach (static::getRegisteredAutoloaders() as $class => $autoloader) { - spl_autoload_unregister([$autoloader, 'autoload']); - unset(static::$loaders[$class]); - } - } - - /** - * Unregister a single autoloader by class name - * - * @param string $autoloaderClass - * @return bool - */ - public static function unregisterAutoloader($autoloaderClass) - { - if (! isset(static::$loaders[$autoloaderClass])) { - return false; - } - - $autoloader = static::$loaders[$autoloaderClass]; - spl_autoload_unregister([$autoloader, 'autoload']); - unset(static::$loaders[$autoloaderClass]); - return true; - } - - /** - * Get an instance of the standard autoloader - * - * Used to attempt to resolve autoloader classes, using the - * StandardAutoloader. The instance is marked as a fallback autoloader, to - * allow resolving autoloaders not under the "Laminas" namespace. - * - * @return SplAutoloader - */ - protected static function getStandardAutoloader() - { - if (null !== static::$standardAutoloader) { - return static::$standardAutoloader; - } - - if (! class_exists(static::STANDARD_AUTOLOADER)) { - // Extract the filename from the classname - $stdAutoloader = substr(strrchr(static::STANDARD_AUTOLOADER, '\\'), 1); - require_once __DIR__ . "/$stdAutoloader.php"; - } - $loader = new StandardAutoloader(); - static::$standardAutoloader = $loader; - return static::$standardAutoloader; - } - - /** - * Checks if the object has this class as one of its parents - * - * @deprecated since laminas 2.3 requires PHP >= 5.3.23 - * - * @see https://bugs.php.net/bug.php?id=53727 - * @see https://github.com/zendframework/zf2/pull/1807 - * - * @param string $className - * @param string $type - * @return bool - */ - protected static function isSubclassOf($className, $type) - { - return is_subclass_of($className, $type); - } -} diff --git a/lib/laminas/laminas-loader/src/ClassMapAutoloader.php b/lib/laminas/laminas-loader/src/ClassMapAutoloader.php deleted file mode 100644 index b8edf3e61..000000000 --- a/lib/laminas/laminas-loader/src/ClassMapAutoloader.php +++ /dev/null @@ -1,234 +0,0 @@ -setOptions($options); - } - } - - /** - * Configure the autoloader - * - * Proxies to {@link registerAutoloadMaps()}. - * - * @param array|Traversable $options - * @return ClassMapAutoloader - */ - public function setOptions($options) - { - $this->registerAutoloadMaps($options); - return $this; - } - - /** - * Register an autoload map - * - * An autoload map may be either an associative array, or a file returning - * an associative array. - * - * An autoload map should be an associative array containing - * classname/file pairs. - * - * @param string|array $map - * @throws Exception\InvalidArgumentException - * @return ClassMapAutoloader - */ - public function registerAutoloadMap($map) - { - if (is_string($map)) { - $location = $map; - if ($this === ($map = $this->loadMapFromFile($location))) { - return $this; - } - } - - if (! is_array($map)) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException(sprintf( - 'Map file provided does not return a map. Map file: "%s"', - isset($location) && is_string($location) ? $location : 'unexpected type: ' . gettype($map) - )); - } - - $this->map = $map + $this->map; - - if (isset($location)) { - $this->mapsLoaded[] = $location; - } - - return $this; - } - - /** - * Register many autoload maps at once - * - * @param array $locations - * @throws Exception\InvalidArgumentException - * @return ClassMapAutoloader - */ - public function registerAutoloadMaps($locations) - { - if (! is_array($locations) && ! $locations instanceof Traversable) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException('Map list must be an array or implement Traversable'); - } - foreach ($locations as $location) { - $this->registerAutoloadMap($location); - } - return $this; - } - - /** - * Retrieve current autoload map - * - * @return array - */ - public function getAutoloadMap() - { - return $this->map; - } - - /** - * {@inheritDoc} - */ - public function autoload($class) - { - if (isset($this->map[$class])) { - require_once $this->map[$class]; - - return $class; - } - - return false; - } - - /** - * Register the autoloader with spl_autoload registry - * - * @return void - */ - public function register() - { - spl_autoload_register([$this, 'autoload'], true, true); - } - - /** - * Load a map from a file - * - * If the map has been previously loaded, returns the current instance; - * otherwise, returns whatever was returned by calling include() on the - * location. - * - * @param string $location - * @return ClassMapAutoloader|mixed - * @throws Exception\InvalidArgumentException For nonexistent locations. - */ - protected function loadMapFromFile($location) - { - if (! file_exists($location)) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException(sprintf( - 'Map file provided does not exist. Map file: "%s"', - is_string($location) ? $location : 'unexpected type: ' . gettype($location) - )); - } - - if (! $path = static::realPharPath($location)) { - $path = realpath($location); - } - - if (in_array($path, $this->mapsLoaded)) { - // Already loaded this map - return $this; - } - - return include $path; - } - - /** - * Resolve the real_path() to a file within a phar. - * - * @see https://bugs.php.net/bug.php?id=52769 - * - * @param string $path - * @return string - */ - public static function realPharPath($path) - { - if (! preg_match('|^phar:(/{2,3})|', $path, $match)) { - return; - } - - $prefixLength = 5 + strlen($match[1]); - $parts = explode('/', str_replace(['/', '\\'], '/', substr($path, $prefixLength))); - $parts = array_values(array_filter($parts, function ($p) { - return $p !== '' && $p !== '.'; - })); - - array_walk($parts, function ($value, $key) use (&$parts) { - if ($value === '..') { - unset($parts[$key], $parts[$key - 1]); - $parts = array_values($parts); - } - }); - - if (file_exists($realPath = str_pad('phar:', $prefixLength, '/') . implode('/', $parts))) { - return $realPath; - } - } -} diff --git a/lib/laminas/laminas-loader/src/Exception/BadMethodCallException.php b/lib/laminas/laminas-loader/src/Exception/BadMethodCallException.php deleted file mode 100644 index 98f08aa7d..000000000 --- a/lib/laminas/laminas-loader/src/Exception/BadMethodCallException.php +++ /dev/null @@ -1,10 +0,0 @@ - path */ - protected $explicitPaths = []; - - /** @var array An array of namespaceName => namespacePath */ - protected $namespacedPaths = []; - - /** @var string Will contain the absolute phar:// path to the executable when packaged as phar file */ - protected $pharBasePath = ""; - - /** @var array An array of supported phar extensions (filled on constructor) */ - protected $pharExtensions = []; - - /** @var array An array of module classes to their containing files */ - protected $moduleClassMap = []; - - /** - * Constructor - * - * Allow configuration of the autoloader via the constructor. - * - * @param null|array|Traversable $options - */ - public function __construct($options = null) - { - if (extension_loaded('phar')) { - $this->pharBasePath = Phar::running(true); - $this->pharExtensions = [ - 'phar', - 'phar.tar', - 'tar', - ]; - - // ext/zlib enabled -> phar can read gzip & zip compressed files - if (extension_loaded('zlib')) { - $this->pharExtensions[] = 'phar.gz'; - $this->pharExtensions[] = 'phar.tar.gz'; - $this->pharExtensions[] = 'tar.gz'; - - $this->pharExtensions[] = 'phar.zip'; - $this->pharExtensions[] = 'zip'; - } - - // ext/bzip2 enabled -> phar can read bz2 compressed files - if (extension_loaded('bzip2')) { - $this->pharExtensions[] = 'phar.bz2'; - $this->pharExtensions[] = 'phar.tar.bz2'; - $this->pharExtensions[] = 'tar.bz2'; - } - } - - if (null !== $options) { - $this->setOptions($options); - } - } - - /** - * Configure the autoloader - * - * In most cases, $options should be either an associative array or - * Traversable object. - * - * @param array|Traversable $options - * @return ModuleAutoloader - */ - public function setOptions($options) - { - $this->registerPaths($options); - return $this; - } - - /** - * Retrieves the class map for all loaded modules. - * - * @return array - */ - public function getModuleClassMap() - { - return $this->moduleClassMap; - } - - /** - * Sets the class map used to speed up the module autoloading. - * - * @param array $classmap - * @return ModuleAutoloader - */ - public function setModuleClassMap(array $classmap) - { - $this->moduleClassMap = $classmap; - - return $this; - } - - /** - * Autoload a class - * - * @param string $class - * @return mixed - * False [if unable to load $class] - * get_class($class) [if $class is successfully loaded] - */ - public function autoload($class) - { - // Limit scope of this autoloader - if (substr($class, -7) !== '\Module') { - return false; - } - - if (isset($this->moduleClassMap[$class])) { - require_once $this->moduleClassMap[$class]; - return $class; - } - - $moduleName = substr($class, 0, -7); - if (isset($this->explicitPaths[$moduleName])) { - $classLoaded = $this->loadModuleFromDir($this->explicitPaths[$moduleName], $class); - if ($classLoaded) { - return $classLoaded; - } - - $classLoaded = $this->loadModuleFromPhar($this->explicitPaths[$moduleName], $class); - if ($classLoaded) { - return $classLoaded; - } - } - - if (count($this->namespacedPaths) >= 1) { - foreach ($this->namespacedPaths as $namespace => $path) { - if (false === strpos($moduleName, $namespace)) { - continue; - } - - $moduleNameBuffer = str_replace($namespace . "\\", "", $moduleName); - $path .= DIRECTORY_SEPARATOR . $moduleNameBuffer . DIRECTORY_SEPARATOR; - - $classLoaded = $this->loadModuleFromDir($path, $class); - if ($classLoaded) { - return $classLoaded; - } - - $classLoaded = $this->loadModuleFromPhar($path, $class); - if ($classLoaded) { - return $classLoaded; - } - } - } - - $moduleClassPath = str_replace('\\', DIRECTORY_SEPARATOR, $moduleName); - - $pharSuffixPattern = null; - if ($this->pharExtensions) { - $pharSuffixPattern = '(' . implode('|', array_map('preg_quote', $this->pharExtensions)) . ')'; - } - - foreach ($this->paths as $path) { - $path .= $moduleClassPath; - - if ($path === '.' || substr($path, 0, 2) === './' || substr($path, 0, 2) === '.\\') { - if (! $basePath = $this->pharBasePath) { - $basePath = realpath('.'); - } - - if (false === $basePath) { - $basePath = getcwd(); - } - - $path = rtrim($basePath, '\/\\') . substr($path, 1); - } - - $classLoaded = $this->loadModuleFromDir($path, $class); - if ($classLoaded) { - return $classLoaded; - } - - // No directory with Module.php, searching for phars - if ($pharSuffixPattern) { - foreach (new GlobIterator($path . '.*') as $entry) { - if ($entry->isDir()) { - continue; - } - - if (! preg_match('#.+\.' . $pharSuffixPattern . '$#', $entry->getPathname())) { - continue; - } - - $classLoaded = $this->loadModuleFromPhar($entry->getPathname(), $class); - if ($classLoaded) { - return $classLoaded; - } - } - } - } - - return false; - } - - /** - * loadModuleFromDir - * - * @param string $dirPath - * @param string $class - * @return mixed - * False [if unable to load $class] - * get_class($class) [if $class is successfully loaded] - */ - protected function loadModuleFromDir($dirPath, $class) - { - $modulePath = $dirPath . '/Module.php'; - if (substr($modulePath, 0, 7) === 'phar://') { - $file = new PharFileInfo($modulePath); - } else { - $file = new SplFileInfo($modulePath); - } - - if ($file->isReadable() && $file->isFile()) { - // Found directory with Module.php in it - $absModulePath = $this->pharBasePath ? (string) $file : $file->getRealPath(); - require_once $absModulePath; - if (class_exists($class)) { - $this->moduleClassMap[$class] = $absModulePath; - return $class; - } - } - return false; - } - - /** - * loadModuleFromPhar - * - * @param string $pharPath - * @param string $class - * @return mixed - * False [if unable to load $class] - * get_class($class) [if $class is successfully loaded] - */ - protected function loadModuleFromPhar($pharPath, $class) - { - $pharPath = static::normalizePath($pharPath, false); - $file = new SplFileInfo($pharPath); - if (! $file->isReadable() || ! $file->isFile()) { - return false; - } - - $fileRealPath = $file->getRealPath(); - - // Phase 0: Check for executable phar with Module class in stub - if (strpos($fileRealPath, '.phar') !== false) { - // First see if the stub makes the Module class available - require_once $fileRealPath; - if (class_exists($class)) { - $this->moduleClassMap[$class] = $fileRealPath; - return $class; - } - } - - // Phase 1: Not executable phar, no stub, or stub did not provide Module class; try Module.php directly - $moduleClassFile = 'phar://' . $fileRealPath . '/Module.php'; - $moduleFile = new SplFileInfo($moduleClassFile); - if ($moduleFile->isReadable() && $moduleFile->isFile()) { - require_once $moduleClassFile; - if (class_exists($class)) { - $this->moduleClassMap[$class] = $moduleClassFile; - return $class; - } - } - - // Phase 2: Check for nested module directory within archive - // Checks for /path/to/MyModule.tar/MyModule/Module.php - // (shell-integrated zip/tar utilities wrap directories like this) - $pharBaseName = $this->pharFileToModuleName($fileRealPath); - $moduleClassFile = 'phar://' . $fileRealPath . '/' . $pharBaseName . '/Module.php'; - $moduleFile = new SplFileInfo($moduleClassFile); - if ($moduleFile->isReadable() && $moduleFile->isFile()) { - require_once $moduleClassFile; - if (class_exists($class)) { - $this->moduleClassMap[$class] = $moduleClassFile; - return $class; - } - } - - return false; - } - - /** - * Register the autoloader with spl_autoload registry - * - * @return void - */ - public function register() - { - spl_autoload_register([$this, 'autoload']); - } - - /** - * Unregister the autoloader with spl_autoload registry - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister([$this, 'autoload']); - } - - /** - * registerPaths - * - * @param array|Traversable $paths - * @throws InvalidArgumentException - * @return ModuleAutoloader - */ - public function registerPaths($paths) - { - if (! is_array($paths) && ! $paths instanceof Traversable) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException( - 'Parameter to \\Laminas\\Loader\\ModuleAutoloader\'s ' - . 'registerPaths method must be an array or ' - . 'implement the Traversable interface' - ); - } - - foreach ($paths as $module => $path) { - if (is_string($module)) { - $this->registerPath($path, $module); - } else { - $this->registerPath($path); - } - } - - return $this; - } - - /** - * registerPath - * - * @param string $path - * @param bool|string $moduleName - * @throws InvalidArgumentException - * @return ModuleAutoloader - */ - public function registerPath($path, $moduleName = false) - { - if (! is_string($path)) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException(sprintf( - 'Invalid path provided; must be a string, received %s', - gettype($path) - )); - } - if ($moduleName) { - if (in_array(substr($moduleName, -2), ['\\*', '\\%'])) { - $this->namespacedPaths[substr($moduleName, 0, -2)] = static::normalizePath($path); - } else { - $this->explicitPaths[$moduleName] = static::normalizePath($path); - } - } else { - $this->paths[] = static::normalizePath($path); - } - return $this; - } - - /** - * getPaths - * - * This is primarily for unit testing, but could have other uses. - * - * @return array - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Returns the base module name from the path to a phar - * - * @param string $pharPath - * @return string - */ - protected function pharFileToModuleName($pharPath) - { - do { - $pathinfo = pathinfo($pharPath); - $pharPath = $pathinfo['filename']; - } while (isset($pathinfo['extension'])); - return $pathinfo['filename']; - } - - /** - * Normalize a path for insertion in the stack - * - * @param string $path - * @param bool $trailingSlash Whether trailing slash should be included - * @return string - */ - public static function normalizePath($path, $trailingSlash = true) - { - $path = rtrim($path, '/'); - $path = rtrim($path, '\\'); - if ($trailingSlash) { - $path .= DIRECTORY_SEPARATOR; - } - return $path; - } -} diff --git a/lib/laminas/laminas-loader/src/PluginClassLoader.php b/lib/laminas/laminas-loader/src/PluginClassLoader.php deleted file mode 100644 index 0743cc7ae..000000000 --- a/lib/laminas/laminas-loader/src/PluginClassLoader.php +++ /dev/null @@ -1,223 +0,0 @@ - class name pairs - * - * @var array - */ - protected $plugins = []; - - /** - * Static map allow global seeding of plugin loader - * - * @var array - */ - protected static $staticMap = []; - - /** - * Constructor - * - * @param null|array|Traversable $map If provided, seeds the loader with a map - */ - public function __construct($map = null) - { - // Merge in static overrides - if (! empty(static::$staticMap)) { - $this->registerPlugins(static::$staticMap); - } - - // Merge in constructor arguments - if ($map !== null) { - $this->registerPlugins($map); - } - } - - /** - * Add a static map of plugins - * - * A null value will clear the static map. - * - * @param null|array|Traversable $map - * @throws Exception\InvalidArgumentException - * @return void - */ - public static function addStaticMap($map) - { - if (null === $map) { - static::$staticMap = []; - return; - } - - if (! is_array($map) && ! $map instanceof Traversable) { - throw new Exception\InvalidArgumentException('Expects an array or Traversable object'); - } - foreach ($map as $key => $value) { - static::$staticMap[$key] = $value; - } - } - - /** - * Register a class to a given short name - * - * @param string $shortName - * @param string $className - * @return PluginClassLoader - */ - public function registerPlugin($shortName, $className) - { - $this->plugins[strtolower($shortName)] = $className; - return $this; - } - - /** - * Register many plugins at once - * - * If $map is a string, assumes that the map is the class name of a - * Traversable object (likely a ShortNameLocator); it will then instantiate - * this class and use it to register plugins. - * - * If $map is an array or Traversable object, it will iterate it to - * register plugin names/classes. - * - * For all other arguments, or if the string $map is not a class or not a - * Traversable class, an exception will be raised. - * - * @param string|array|Traversable $map - * @return PluginClassLoader - * @throws Exception\InvalidArgumentException - */ - public function registerPlugins($map) - { - if (is_string($map)) { - if (! class_exists($map)) { - throw new Exception\InvalidArgumentException('Map class provided is invalid'); - } - $map = new $map(); - } - if (is_array($map)) { - $map = new ArrayIterator($map); - } - if (! $map instanceof Traversable) { - throw new Exception\InvalidArgumentException('Map provided is invalid; must be traversable'); - } - - // iterator_apply doesn't work as expected with IteratorAggregate - if ($map instanceof IteratorAggregate) { - $map = $map->getIterator(); - } - - foreach ($map as $name => $class) { - if (is_int($name) || is_numeric($name)) { - if (! is_object($class) && class_exists($class)) { - $class = new $class(); - } - - if ($class instanceof Traversable) { - $this->registerPlugins($class); - continue; - } - } - - $this->registerPlugin($name, $class); - } - - return $this; - } - - /** - * Unregister a short name lookup - * - * @param mixed $shortName - * @return PluginClassLoader - */ - public function unregisterPlugin($shortName) - { - $lookup = strtolower($shortName); - if (array_key_exists($lookup, $this->plugins)) { - unset($this->plugins[$lookup]); - } - return $this; - } - - /** - * Get a list of all registered plugins - * - * @return array|Traversable - */ - public function getRegisteredPlugins() - { - return $this->plugins; - } - - /** - * Whether or not a plugin by a specific name has been registered - * - * @param string $name - * @return bool - */ - public function isLoaded($name) - { - $lookup = strtolower($name); - return isset($this->plugins[$lookup]); - } - - /** - * Return full class name for a named helper - * - * @param string $name - * @return string|false - */ - public function getClassName($name) - { - return $this->load($name); - } - - /** - * Load a helper via the name provided - * - * @param string $name - * @return string|false - */ - public function load($name) - { - if (! $this->isLoaded($name)) { - return false; - } - return $this->plugins[strtolower($name)]; - } - - /** - * Defined by IteratorAggregate - * - * Returns an instance of ArrayIterator, containing a map of - * all plugins - * - * @return ArrayIterator - */ - #[ReturnTypeWillChange] - public function getIterator() - { - return new ArrayIterator($this->plugins); - } -} diff --git a/lib/laminas/laminas-loader/src/PluginClassLocator.php b/lib/laminas/laminas-loader/src/PluginClassLocator.php deleted file mode 100644 index 181b88ef8..000000000 --- a/lib/laminas/laminas-loader/src/PluginClassLocator.php +++ /dev/null @@ -1,36 +0,0 @@ - - * spl_autoload_register(array($this, 'autoload')); - * - * - * @return void - */ - public function register(); -} diff --git a/lib/laminas/laminas-loader/src/StandardAutoloader.php b/lib/laminas/laminas-loader/src/StandardAutoloader.php deleted file mode 100644 index 6d468187b..000000000 --- a/lib/laminas/laminas-loader/src/StandardAutoloader.php +++ /dev/null @@ -1,332 +0,0 @@ -setOptions($options); - } - } - - /** - * Configure autoloader - * - * Allows specifying both "namespace" and "prefix" pairs, using the - * following structure: - * - * array( - * 'namespaces' => array( - * 'Laminas' => '/path/to/Laminas/library', - * 'Doctrine' => '/path/to/Doctrine/library', - * ), - * 'prefixes' => array( - * 'Phly_' => '/path/to/Phly/library', - * ), - * 'fallback_autoloader' => true, - * ) - * - * - * @param array|Traversable $options - * @throws Exception\InvalidArgumentException - * @return StandardAutoloader - */ - public function setOptions($options) - { - if (! is_array($options) && ! $options instanceof Traversable) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException('Options must be either an array or Traversable'); - } - - foreach ($options as $type => $pairs) { - switch ($type) { - case self::AUTOREGISTER_LAMINAS: - if ($pairs) { - $this->registerNamespace('Laminas', dirname(__DIR__)); - } - break; - case self::LOAD_NS: - if (is_array($pairs) || $pairs instanceof Traversable) { - $this->registerNamespaces($pairs); - } - break; - case self::LOAD_PREFIX: - if (is_array($pairs) || $pairs instanceof Traversable) { - $this->registerPrefixes($pairs); - } - break; - case self::ACT_AS_FALLBACK: - $this->setFallbackAutoloader($pairs); - break; - default: - // ignore - } - } - return $this; - } - - /** - * Set flag indicating fallback autoloader status - * - * @param bool $flag - * @return StandardAutoloader - */ - public function setFallbackAutoloader($flag) - { - $this->fallbackAutoloaderFlag = (bool) $flag; - return $this; - } - - /** - * Is this autoloader acting as a fallback autoloader? - * - * @return bool - */ - public function isFallbackAutoloader() - { - return $this->fallbackAutoloaderFlag; - } - - /** - * Register a namespace/directory pair - * - * @param string $namespace - * @param string $directory - * @return StandardAutoloader - */ - public function registerNamespace($namespace, $directory) - { - $namespace = rtrim($namespace, self::NS_SEPARATOR) . self::NS_SEPARATOR; - $this->namespaces[$namespace] = $this->normalizeDirectory($directory); - return $this; - } - - /** - * Register many namespace/directory pairs at once - * - * @param array $namespaces - * @throws Exception\InvalidArgumentException - * @return StandardAutoloader - */ - public function registerNamespaces($namespaces) - { - if (! is_array($namespaces) && ! $namespaces instanceof Traversable) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException('Namespace pairs must be either an array or Traversable'); - } - - foreach ($namespaces as $namespace => $directory) { - $this->registerNamespace($namespace, $directory); - } - return $this; - } - - /** - * Register a prefix/directory pair - * - * @param string $prefix - * @param string $directory - * @return StandardAutoloader - */ - public function registerPrefix($prefix, $directory) - { - $prefix = rtrim($prefix, self::PREFIX_SEPARATOR) . self::PREFIX_SEPARATOR; - $this->prefixes[$prefix] = $this->normalizeDirectory($directory); - return $this; - } - - /** - * Register many namespace/directory pairs at once - * - * @param array $prefixes - * @throws Exception\InvalidArgumentException - * @return StandardAutoloader - */ - public function registerPrefixes($prefixes) - { - if (! is_array($prefixes) && ! $prefixes instanceof Traversable) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException('Prefix pairs must be either an array or Traversable'); - } - - foreach ($prefixes as $prefix => $directory) { - $this->registerPrefix($prefix, $directory); - } - return $this; - } - - /** - * Defined by Autoloadable; autoload a class - * - * @param string $class - * @return false|string - */ - public function autoload($class) - { - $isFallback = $this->isFallbackAutoloader(); - if (false !== strpos($class, self::NS_SEPARATOR)) { - if ($this->loadClass($class, self::LOAD_NS)) { - return $class; - } elseif ($isFallback) { - return $this->loadClass($class, self::ACT_AS_FALLBACK); - } - return false; - } - if (false !== strpos($class, self::PREFIX_SEPARATOR)) { - if ($this->loadClass($class, self::LOAD_PREFIX)) { - return $class; - } elseif ($isFallback) { - return $this->loadClass($class, self::ACT_AS_FALLBACK); - } - return false; - } - if ($isFallback) { - return $this->loadClass($class, self::ACT_AS_FALLBACK); - } - return false; - } - - /** - * Register the autoloader with spl_autoload - * - * @return void - */ - public function register() - { - spl_autoload_register([$this, 'autoload']); - } - - /** - * Transform the class name to a filename - * - * @param string $class - * @param string $directory - * @return string - */ - protected function transformClassNameToFilename($class, $directory) - { - // $class may contain a namespace portion, in which case we need - // to preserve any underscores in that portion. - $matches = []; - preg_match('/(?P.+\\\)?(?P[^\\\]+$)/', $class, $matches); - - $class = $matches['class'] ?? ''; - $namespace = $matches['namespace'] ?? ''; - - return $directory - . str_replace(self::NS_SEPARATOR, '/', $namespace) - . str_replace(self::PREFIX_SEPARATOR, '/', $class) - . '.php'; - } - - /** - * Load a class, based on its type (namespaced or prefixed) - * - * @param string $class - * @param string $type - * @return bool|string - * @throws Exception\InvalidArgumentException - */ - protected function loadClass($class, $type) - { - if (! in_array($type, [self::LOAD_NS, self::LOAD_PREFIX, self::ACT_AS_FALLBACK])) { - require_once __DIR__ . '/Exception/InvalidArgumentException.php'; - throw new Exception\InvalidArgumentException(); - } - - // Fallback autoloading - if ($type === self::ACT_AS_FALLBACK) { - // create filename - $filename = $this->transformClassNameToFilename($class, ''); - $resolvedName = stream_resolve_include_path($filename); - if ($resolvedName !== false) { - return include $resolvedName; - } - return false; - } - - // Namespace and/or prefix autoloading - foreach ($this->$type as $leader => $path) { - if (0 === strpos($class, $leader)) { - // Trim off leader (namespace or prefix) - $trimmedClass = substr($class, strlen($leader)); - - // create filename - $filename = $this->transformClassNameToFilename($trimmedClass, $path); - if (file_exists($filename)) { - return include $filename; - } - } - } - return false; - } - - /** - * Normalize the directory to include a trailing directory separator - * - * @param string $directory - * @return string - */ - protected function normalizeDirectory($directory) - { - $last = $directory[strlen($directory) - 1]; - if (in_array($last, ['/', '\\'])) { - $directory[strlen($directory) - 1] = DIRECTORY_SEPARATOR; - return $directory; - } - $directory .= DIRECTORY_SEPARATOR; - return $directory; - } -} diff --git a/lib/laminas/laminas-mail/.laminas-ci.json b/lib/laminas/laminas-mail/.laminas-ci.json deleted file mode 100644 index bce3fa21b..000000000 --- a/lib/laminas/laminas-mail/.laminas-ci.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "ignore_php_platform_requirements": { - "8.1": true - } -} diff --git a/lib/laminas/laminas-mail/.laminas-ci/pre-run.sh b/lib/laminas/laminas-mail/.laminas-ci/pre-run.sh deleted file mode 100644 index eed79a3b2..000000000 --- a/lib/laminas/laminas-mail/.laminas-ci/pre-run.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -INTL_EXTENSION=$(php -r 'echo sprintf("php%s.%s-intl",PHP_MAJOR_VERSION,PHP_MINOR_VERSION);') - -echo -e "Removing $INTL_EXTENSION extension:\n" -sudo apt remove "$INTL_EXTENSION" -y - -echo -e "Cleaning up:\n" -sudo apt autoclean && sudo apt autoremove - -echo -e "Installed extensions:\n" -/usr/local/bin/php-extensions-with-version.php \ No newline at end of file diff --git a/lib/laminas/laminas-mail/COPYRIGHT.md b/lib/laminas/laminas-mail/COPYRIGHT.md deleted file mode 100644 index 0a8cccc06..000000000 --- a/lib/laminas/laminas-mail/COPYRIGHT.md +++ /dev/null @@ -1 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) diff --git a/lib/laminas/laminas-mail/LICENSE.md b/lib/laminas/laminas-mail/LICENSE.md deleted file mode 100644 index 10b40f142..000000000 --- a/lib/laminas/laminas-mail/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of Laminas Foundation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/laminas/laminas-mail/README.md b/lib/laminas/laminas-mail/README.md deleted file mode 100644 index 16e57f835..000000000 --- a/lib/laminas/laminas-mail/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# laminas-mail - -[![Build Status](https://github.com/laminas/laminas-mail/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-mail/actions?query=workflow%3A"Continuous+Integration") - -`Laminas\Mail` provides generalized functionality to compose and send both text and -MIME-compliant multipart email messages. Mail can be sent with `Laminas\Mail` via -the `Mail\Transport\Sendmail`, `Mail\Transport\Smtp` or the `Mail\Transport\File` -transport. Of course, you can also implement your own transport by implementing -the `Mail\Transport\TransportInterface`. - -- File issues at https://github.com/laminas/laminas-mail/issues -- Documentation is at https://docs.laminas.dev/laminas-mail/ diff --git a/lib/laminas/laminas-mail/composer.json b/lib/laminas/laminas-mail/composer.json deleted file mode 100644 index 96074d234..000000000 --- a/lib/laminas/laminas-mail/composer.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "laminas/laminas-mail", - "description": "Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", - "keywords": [ - "laminas", - "mail" - ], - "homepage": "https://laminas.dev", - "license": "BSD-3-Clause", - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", - "ext-iconv": "*", - "laminas/laminas-loader": "^2.8", - "laminas/laminas-mime": "^2.9.1", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-validator": "^2.15", - "symfony/polyfill-mbstring": "^1.12.0", - "webmozart/assert": "^1.10", - "symfony/polyfill-intl-idn": "^1.24.0" - }, - "conflict": { - "zendframework/zend-mail": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-crypt": "^2.6 || ^3.4", - "laminas/laminas-db": "^2.13.3", - "laminas/laminas-servicemanager": "^3.7", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.1", - "symfony/process": "^5.3.7", - "vimeo/psalm": "^4.7" - }, - "suggest": { - "laminas/laminas-crypt": "Crammd5 support in SMTP Auth", - "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" - }, - "config": { - "sort-packages": true, - "allow-plugins": { - "composer/package-versions-deprecated": true - }, - "platform": { - "php": "7.3.99" - } - }, - "extra": { - "laminas": { - "component": "Laminas\\Mail", - "config-provider": "Laminas\\Mail\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Mail\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "LaminasTest\\Mail\\": "test/" - } - }, - "scripts": { - "check": [ - "@cs-check", - "@static-analysis", - "@test" - ], - "cs-check": "phpcs", - "cs-fix": "phpcbf", - "static-analysis": "psalm --shepherd --stats", - "test": "phpunit --colors=always", - "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" - }, - "support": { - "issues": "https://github.com/laminas/laminas-mail/issues", - "forum": "https://discourse.laminas.dev", - "chat": "https://laminas.dev/chat", - "source": "https://github.com/laminas/laminas-mail", - "docs": "https://docs.laminas.dev/laminas-mail/", - "rss": "https://github.com/laminas/laminas-mail/releases.atom" - } -} diff --git a/lib/laminas/laminas-mail/composer.lock b/lib/laminas/laminas-mail/composer.lock deleted file mode 100644 index b6263984b..000000000 --- a/lib/laminas/laminas-mail/composer.lock +++ /dev/null @@ -1,4882 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "c4e2858fd3753937b8ef20cfc5096601", - "packages": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "support": { - "issues": "https://github.com/container-interop/container-interop/issues", - "source": "https://github.com/container-interop/container-interop/tree/master" - }, - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" - }, - { - "name": "laminas/laminas-loader", - "version": "2.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-loader.git", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-loader": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Loader\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Autoloading and plugin loading strategies", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "loader" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-loader/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-loader/issues", - "rss": "https://github.com/laminas/laminas-loader/releases.atom", - "source": "https://github.com/laminas/laminas-loader" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-02T18:30:53+00:00" - }, - { - "name": "laminas/laminas-mime", - "version": "2.9.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-mime.git", - "reference": "72d21a1b4bb7086d4a4d7058c0abca180b209184" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mime/zipball/72d21a1b4bb7086d4a4d7058c0abca180b209184", - "reference": "72d21a1b4bb7086d4a4d7058c0abca180b209184", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^2.7 || ^3.0", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-mime": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-mail": "^2.12", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "laminas/laminas-mail": "Laminas\\Mail component" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Mime\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Create and parse MIME messages and parts", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "mime" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-mime/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-mime/issues", - "rss": "https://github.com/laminas/laminas-mime/releases.atom", - "source": "https://github.com/laminas/laminas-mime" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-20T21:19:24+00:00" - }, - { - "name": "laminas/laminas-stdlib", - "version": "3.7.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "cba75fad2053bb5dc8d3e7f5e62b61d75eecfaf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/cba75fad2053bb5dc8d3e7f5e62b61d75eecfaf1", - "reference": "cba75fad2053bb5dc8d3e7f5e62b61d75eecfaf1", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-stdlib": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "^9.3.7", - "psalm/plugin-phpunit": "^0.16.0", - "vimeo/psalm": "^4.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "source": "https://github.com/laminas/laminas-stdlib" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-01-10T11:18:55+00:00" - }, - { - "name": "laminas/laminas-validator", - "version": "2.15.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-validator.git", - "reference": "fbd87f30c0a27aaeeee8adb2f934c14fb6046c80" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/fbd87f30c0a27aaeeee8adb2f934c14fb6046c80", - "reference": "fbd87f30c0a27aaeeee8adb2f934c14fb6046c80", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-validator": "*" - }, - "require-dev": { - "laminas/laminas-cache": "^2.6.1", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.6", - "laminas/laminas-http": "^2.14.2", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-math": "^2.6", - "laminas/laminas-servicemanager": "^2.7.11 || ^3.0.3", - "laminas/laminas-session": "^2.8", - "laminas/laminas-uri": "^2.7", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "vimeo/psalm": "^4.3" - }, - "suggest": { - "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", - "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", - "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", - "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-math": "Laminas\\Math component, required by the Csrf validator", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", - "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", - "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Validator", - "config-provider": "Laminas\\Validator\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Validator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "validator" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-validator/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-validator/issues", - "rss": "https://github.com/laminas/laminas-validator/releases.atom", - "source": "https://github.com/laminas/laminas-validator" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-12-02T14:23:06+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-10-20T20:35:02+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-14T14:02:44+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "packages-dev": [ - { - "name": "amphp/amp", - "version": "v2.6.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ], - "psr-4": { - "Amp\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", - "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2021-09-23T18:43:08+00:00" - }, - { - "name": "amphp/byte-stream", - "version": "v1.8.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Amp\\ByteStream\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2021-03-30T17:13:30+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.4", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b174585d1fe49ceed21928a945138948cb394600" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", - "reference": "b174585d1fe49ceed21928a945138948cb394600", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-09-13T08:41:34+00:00" - }, - { - "name": "composer/pcre", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/3d322d715c43a1ac36c7fe215fa59336265500f2", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-12-06T15:17:27+00:00" - }, - { - "name": "composer/semver", - "version": "3.2.7", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "deac27056b57e46faf136fae7b449eeaa71661ee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/deac27056b57e46faf136fae7b449eeaa71661ee", - "reference": "deac27056b57e46faf136fae7b449eeaa71661ee", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.54", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.7" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-04T09:57:54+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "12f1b79476638a5615ed00ea6adbb269cec96fd8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/12f1b79476638a5615ed00ea6adbb269cec96fd8", - "reference": "12f1b79476638a5615ed00ea6adbb269cec96fd8", - "shasum": "" - }, - "require": { - "composer/pcre": "^1", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.1" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-04T18:29:42+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" - }, - "time": "2019-12-04T15:06:13+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "shasum": "" - }, - "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "A more advanced JSONRPC implementation", - "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" - }, - "time": "2021-06-11T22:34:44+00:00" - }, - { - "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "LanguageServerProtocol\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "PHP classes for the Language Server Protocol", - "keywords": [ - "language", - "microsoft", - "php", - "server" - ], - "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" - }, - "time": "2021-02-22T14:02:09+00:00" - }, - { - "name": "laminas/laminas-coding-standard", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/08880ce2fbfe62d471cd3cb766a91da630b32539", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "squizlabs/php_codesniffer": "^2.7" - }, - "replace": { - "zendframework/zend-coding-standard": "self.version" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas coding standard", - "homepage": "https://laminas.dev", - "keywords": [ - "Coding Standard", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-coding-standard/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-coding-standard/issues", - "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", - "source": "https://github.com/laminas/laminas-coding-standard" - }, - "time": "2019-12-31T16:28:26+00:00" - }, - { - "name": "laminas/laminas-crypt", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-crypt.git", - "reference": "ad2c29c289a4bc837b37a7650f5178edda0fc548" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/ad2c29c289a4bc837b37a7650f5178edda0fc548", - "reference": "ad2c29c289a4bc837b37a7650f5178edda0fc548", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "ext-mbstring": "*", - "laminas/laminas-math": "^3.4", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-crypt": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-openssl": "Required for most features of Laminas\\Crypt" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Crypt\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Strong cryptography tools and password hashing", - "homepage": "https://laminas.dev", - "keywords": [ - "crypt", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-crypt/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-crypt/issues", - "rss": "https://github.com/laminas/laminas-crypt/releases.atom", - "source": "https://github.com/laminas/laminas-crypt" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-12-06T01:25:27+00:00" - }, - { - "name": "laminas/laminas-db", - "version": "2.13.4", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-db.git", - "reference": "cdabb4bfa669c2c0edb0cb4e014c15b41afd3fb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-db/zipball/cdabb4bfa669c2c0edb0cb4e014c15b41afd3fb1", - "reference": "cdabb4bfa669c2c0edb0cb4e014c15b41afd3fb1", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-db": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-eventmanager": "^3.4", - "laminas/laminas-hydrator": "^3.2 || ^4.3", - "laminas/laminas-servicemanager": "^3.7", - "phpunit/phpunit": "^9.5.5" - }, - "suggest": { - "laminas/laminas-eventmanager": "Laminas\\EventManager component", - "laminas/laminas-hydrator": "(^3.2 || ^4.3) Laminas\\Hydrator component for using HydratingResultSets", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Db", - "config-provider": "Laminas\\Db\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Db\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "db", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-db/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-db/issues", - "rss": "https://github.com/laminas/laminas-db/releases.atom", - "source": "https://github.com/laminas/laminas-db" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-21T18:59:44+00:00" - }, - { - "name": "laminas/laminas-math", - "version": "3.5.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-math.git", - "reference": "146d8187ab247ae152e811a6704a953d43537381" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-math/zipball/146d8187ab247ae152e811a6704a953d43537381", - "reference": "146d8187ab247ae152e811a6704a953d43537381", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-math": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.5.5" - }, - "suggest": { - "ext-bcmath": "If using the bcmath functionality", - "ext-gmp": "If using the gmp functionality" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev", - "dev-develop": "3.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Math\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Create cryptographically secure pseudo-random numbers, and manage big integers", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "math" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-math/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-math/issues", - "rss": "https://github.com/laminas/laminas-math/releases.atom", - "source": "https://github.com/laminas/laminas-math" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-12-06T02:02:07+00:00" - }, - { - "name": "laminas/laminas-servicemanager", - "version": "3.7.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "2b0aee477fdbd3191af7c302b93dbc5fda0626f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/2b0aee477fdbd3191af7c302b93dbc5fda0626f4", - "reference": "2b0aee477fdbd3191af7c302b93dbc5fda0626f4", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0", - "psr/container": "^1.0" - }, - "conflict": { - "laminas/laminas-code": "<3.3.1", - "zendframework/zend-code": "<3.3.1" - }, - "provide": { - "container-interop/container-interop-implementation": "^1.2", - "psr/container-implementation": "^1.0" - }, - "replace": { - "zendframework/zend-servicemanager": "^3.4.0" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.0", - "laminas/laminas-coding-standard": "~2.2.0", - "laminas/laminas-container-config-test": "^0.3", - "laminas/laminas-dependency-plugin": "^2.1.2", - "mikey179/vfsstream": "^1.6.8", - "ocramius/proxy-manager": "^2.2.3", - "phpbench/phpbench": "^1.0.4", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.4", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.8" - }, - "suggest": { - "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" - }, - "bin": [ - "bin/generate-deps-for-config-factory", - "bin/generate-factory-for-class" - ], - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Factory-Driven Dependency Injection Container", - "homepage": "https://laminas.dev", - "keywords": [ - "PSR-11", - "dependency-injection", - "di", - "dic", - "laminas", - "service-manager", - "servicemanager" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-servicemanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-servicemanager/issues", - "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", - "source": "https://github.com/laminas/laminas-servicemanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-07-24T19:33:07+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "88bf037259869891afce6504cacc4f8a07b24d0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/88bf037259869891afce6504cacc4f8a07b24d0f", - "reference": "88bf037259869891afce6504cacc4f8a07b24d0f", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-12-21T14:34:37+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" - }, - { - "name": "netresearch/jsonmapper", - "version": "v4.0.0", - "source": { - "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", - "squizlabs/php_codesniffer": "~3.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonMapper": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" - } - ], - "description": "Map nested JSON structures onto PHP classes", - "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" - }, - "time": "2020-12-01T19:48:11+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.13.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" - }, - "time": "2021-11-30T19:35:32+00:00" - }, - { - "name": "openlss/lib-array2xml", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nullivex/lib-array2xml.git", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "LSS": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Bryan Tong", - "email": "bryan@nullivex.com", - "homepage": "https://www.nullivex.com" - }, - { - "name": "Tony Butler", - "email": "spudz76@gmail.com", - "homepage": "https://www.nullivex.com" - } - ], - "description": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com", - "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" - ], - "support": { - "issues": "https://github.com/nullivex/lib-array2xml/issues", - "source": "https://github.com/nullivex/lib-array2xml/tree/master" - }, - "time": "2019-03-29T20:06:56+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" - }, - "time": "2022-01-04T19:58:01+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.10", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687", - "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-05T09:12:13+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.11", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2406855036db1102126125537adb1406f7242fdd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2406855036db1102126125537adb1406f7242fdd", - "reference": "2406855036db1102126125537adb1406f7242fdd", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.11" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-25T07:07:57+00:00" - }, - { - "name": "psalm/plugin-phpunit", - "version": "0.15.2", - "source": { - "type": "git", - "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "31d15bbc0169a3c454e495e03fd8a6ccb663661b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/31d15bbc0169a3c454e495e03fd8a6ccb663661b", - "reference": "31d15bbc0169a3c454e495e03fd8a6ccb663661b", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.10", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "ext-simplexml": "*", - "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.0" - }, - "conflict": { - "phpunit/phpunit": "<7.5" - }, - "require-dev": { - "codeception/codeception": "^4.0.3", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.11.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" - } - }, - "autoload": { - "psr-4": { - "Psalm\\PhpUnitPlugin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matt Brown", - "email": "github@muglug.com" - } - ], - "description": "Psalm plugin for PHPUnit", - "support": { - "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.15.2" - }, - "time": "2021-05-29T19:11:38+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:52:38+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-11-11T14:18:36+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-11T13:31:12+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-15T12:49:02+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "2.9.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2018-11-07T22:31:41+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2c6b7ced2eb7799a35375fb9022519282b5405e", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-12-20T16:11:12+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-12T14:48:14+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-23T21:10:46+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-06-05T21:20:04+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-13T13:58:33+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "2b3ba8722c4aaf3e88011be5e7f48710088fb5e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/2b3ba8722c4aaf3e88011be5e7f48710088fb5e4", - "reference": "2b3ba8722c4aaf3e88011be5e7f48710088fb5e4", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-12-27T21:01:00+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-04T16:48:04+00:00" - }, - { - "name": "symfony/string", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "files": [ - "Resources/functions.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-12-16T21:52:00+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "vimeo/psalm", - "version": "4.18.1", - "source": { - "type": "git", - "url": "https://github.com/vimeo/psalm.git", - "reference": "dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb", - "reference": "dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.4.2", - "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", - "dnoegel/php-xdg-base-dir": "^0.1.1", - "ext-ctype": "*", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", - "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "webmozart/path-util": "^2.3" - }, - "provide": { - "psalm/psalm": "self.version" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", - "ext-curl": "*", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "suggest": { - "ext-curl": "In order to send data to shepherd", - "ext-igbinary": "^2.0.5 is required, used to serialize caching data" - }, - "bin": [ - "psalm", - "psalm-language-server", - "psalm-plugin", - "psalm-refactor", - "psalter" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev", - "dev-3.x": "3.x-dev", - "dev-2.x": "2.x-dev", - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], - "psr-4": { - "Psalm\\": "src/Psalm/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthew Brown" - } - ], - "description": "A static analysis tool for finding errors in PHP applications", - "keywords": [ - "code", - "inspection", - "php" - ], - "support": { - "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.18.1" - }, - "time": "2022-01-08T21:21:26+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", - "ext-iconv": "*" - }, - "platform-dev": [], - "platform-overrides": { - "php": "7.3.99" - }, - "plugin-api-version": "2.2.0" -} diff --git a/lib/laminas/laminas-mail/src/Address.php b/lib/laminas/laminas-mail/src/Address.php deleted file mode 100644 index 7b2956f2e..000000000 --- a/lib/laminas/laminas-mail/src/Address.php +++ /dev/null @@ -1,162 +0,0 @@ -.*)<(?P[^>]+)>|(?P.+))$/', $address, $matches)) { - throw new Exception\InvalidArgumentException('Invalid address format'); - } - - $name = null; - if (isset($matches['name'])) { - $name = trim($matches['name']); - } - if (empty($name)) { - $name = null; - } - - if (isset($matches['namedEmail'])) { - $email = $matches['namedEmail']; - } - if (isset($matches['email'])) { - $email = $matches['email']; - } - $email = trim($email); - //trim single quotes, because outlook does add single quotes to emails sometimes which is technically not valid - $email = trim($email, '\''); - - return new static($email, $name, $comment); - } - - /** - * Constructor - * - * @param string $email - * @param null|string $name - * @param null|string $comment - * @throws Exception\InvalidArgumentException - */ - public function __construct($email, $name = null, $comment = null) - { - $emailAddressValidator = new EmailAddressValidator(Hostname::ALLOW_DNS | Hostname::ALLOW_LOCAL); - if (! is_string($email) || empty($email)) { - throw new Exception\InvalidArgumentException('Email must be a valid email address'); - } - - if (preg_match("/[\r\n]/", $email)) { - throw new Exception\InvalidArgumentException('CRLF injection detected'); - } - - if (! $emailAddressValidator->isValid($email)) { - $invalidMessages = $emailAddressValidator->getMessages(); - throw new Exception\InvalidArgumentException(array_shift($invalidMessages)); - } - - if (null !== $name) { - if (! is_string($name)) { - throw new Exception\InvalidArgumentException('Name must be a string'); - } - - if (preg_match("/[\r\n]/", $name)) { - throw new Exception\InvalidArgumentException('CRLF injection detected'); - } - - $this->name = $name; - } - - $this->email = $email; - - if (null !== $comment) { - $this->comment = $comment; - } - } - - /** - * Retrieve email - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Retrieve name, if any - * - * @return null|string - */ - public function getName() - { - return $this->name; - } - - /** - * Retrieve comment, if any - * - * @return null|string - */ - public function getComment() - { - return $this->comment; - } - - /** - * String representation of address - * - * @return string - */ - public function toString() - { - $string = sprintf('<%s>', $this->getEmail()); - $name = $this->constructName(); - if (null === $name) { - return $string; - } - - return sprintf('%s %s', $name, $string); - } - - /** - * Constructs the name string - * - * If a comment is present, appends the comment (commented using parens) to - * the name before returning it; otherwise, returns just the name. - * - * @return null|string - */ - private function constructName() - { - $name = $this->getName(); - $comment = $this->getComment(); - - if ($comment === null || $comment === '') { - return $name; - } - - $string = sprintf('%s (%s)', $name, $comment); - return trim($string); - } -} diff --git a/lib/laminas/laminas-mail/src/Address/AddressInterface.php b/lib/laminas/laminas-mail/src/Address/AddressInterface.php deleted file mode 100644 index c75c6f75b..000000000 --- a/lib/laminas/laminas-mail/src/Address/AddressInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -createAddress($emailOrAddress, $name); - } - - if (! $emailOrAddress instanceof Address\AddressInterface) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects an email address or %s\Address object as its first argument; received "%s"', - __METHOD__, - __NAMESPACE__, - (is_object($emailOrAddress) ? get_class($emailOrAddress) : gettype($emailOrAddress)) - )); - } - - $email = strtolower($emailOrAddress->getEmail()); - if ($this->has($email)) { - return $this; - } - - $this->addresses[$email] = $emailOrAddress; - return $this; - } - - /** - * Add many addresses at once - * - * If an email key is provided, it will be used as the email, and the value - * as the name. Otherwise, the value is passed as the sole argument to add(), - * and, as such, can be either email strings or Address\AddressInterface objects. - * - * @param array $addresses - * @throws Exception\RuntimeException - * @return AddressList - */ - public function addMany(array $addresses) - { - foreach ($addresses as $key => $value) { - if (is_int($key) || is_numeric($key)) { - $this->add($value); - continue; - } - - if (! is_string($key)) { - throw new Exception\RuntimeException(sprintf( - 'Invalid key type in provided addresses array ("%s")', - (is_object($key) ? get_class($key) : var_export($key, 1)) - )); - } - - $this->add($key, $value); - } - return $this; - } - - /** - * Add an address to the list from any valid string format, such as - * - "Laminas Dev" - * - dev@laminas.com - * - * @param string $address - * @param null|string $comment Comment associated with the address, if any. - * @throws Exception\InvalidArgumentException - * @return AddressList - */ - public function addFromString($address, $comment = null) - { - $this->add(Address::fromString($address, $comment)); - return $this; - } - - /** - * Merge another address list into this one - * - * @param AddressList $addressList - * @return AddressList - */ - public function merge(self $addressList) - { - foreach ($addressList as $address) { - $this->add($address); - } - return $this; - } - - /** - * Does the email exist in this list? - * - * @param string $email - * @return bool - */ - public function has($email) - { - $email = strtolower($email); - return isset($this->addresses[$email]); - } - - /** - * Get an address by email - * - * @param string $email - * @return bool|Address\AddressInterface - */ - public function get($email) - { - $email = strtolower($email); - if (! isset($this->addresses[$email])) { - return false; - } - - return $this->addresses[$email]; - } - - /** - * Delete an address from the list - * - * @param string $email - * @return bool - */ - public function delete($email) - { - $email = strtolower($email); - if (! isset($this->addresses[$email])) { - return false; - } - - unset($this->addresses[$email]); - return true; - } - - /** - * Return count of addresses - * - * @return int - */ - #[ReturnTypeWillChange] - public function count() - { - return count($this->addresses); - } - - /** - * Rewind iterator - * - * @return mixed the value of the first addresses element, or false if the addresses is - * empty. - * @see addresses - */ - #[ReturnTypeWillChange] - public function rewind() - { - return reset($this->addresses); - } - - /** - * Return current item in iteration - * - * @return Address - */ - #[ReturnTypeWillChange] - public function current() - { - return current($this->addresses); - } - - /** - * Return key of current item of iteration - * - * @return string - */ - #[ReturnTypeWillChange] - public function key() - { - return key($this->addresses); - } - - /** - * Move to next item - * - * @return mixed the addresses value in the next place that's pointed to by the - * internal array pointer, or false if there are no more elements. - * @see addresses - */ - #[ReturnTypeWillChange] - public function next() - { - return next($this->addresses); - } - - /** - * Is the current item of iteration valid? - * - * @return bool - */ - #[ReturnTypeWillChange] - public function valid() - { - $key = key($this->addresses); - return ($key !== null && $key !== false); - } - - /** - * Create an address object - * - * @param string $email - * @param string|null $name - * @return Address - */ - protected function createAddress($email, $name) - { - return new Address($email, $name); - } -} diff --git a/lib/laminas/laminas-mail/src/ConfigProvider.php b/lib/laminas/laminas-mail/src/ConfigProvider.php deleted file mode 100644 index d8468a3f6..000000000 --- a/lib/laminas/laminas-mail/src/ConfigProvider.php +++ /dev/null @@ -1,36 +0,0 @@ - $this->getDependencyConfig(), - ]; - } - - /** - * Retrieve dependency settings for laminas-mail package. - * - * @return array - */ - public function getDependencyConfig() - { - return [ - // Legacy Zend Framework aliases - 'aliases' => [ - \Zend\Mail\Protocol\SmtpPluginManager::class => Protocol\SmtpPluginManager::class, - ], - 'factories' => [ - Protocol\SmtpPluginManager::class => Protocol\SmtpPluginManagerFactory::class, - ], - ]; - } -} diff --git a/lib/laminas/laminas-mail/src/Exception/BadMethodCallException.php b/lib/laminas/laminas-mail/src/Exception/BadMethodCallException.php deleted file mode 100644 index 4020cc891..000000000 --- a/lib/laminas/laminas-mail/src/Exception/BadMethodCallException.php +++ /dev/null @@ -1,11 +0,0 @@ - 'empty label', - IDNA_ERROR_LABEL_TOO_LONG => 'label too long', - IDNA_ERROR_DOMAIN_NAME_TOO_LONG => 'domain name too long', - IDNA_ERROR_LEADING_HYPHEN => 'leading hyphen', - IDNA_ERROR_TRAILING_HYPHEN => 'trailing hyphen', - IDNA_ERROR_HYPHEN_3_4 => 'consecutive hyphens', - IDNA_ERROR_LEADING_COMBINING_MARK => 'leading combining mark', - IDNA_ERROR_DISALLOWED => 'disallowed', - IDNA_ERROR_PUNYCODE => 'invalid punycode encoding', - IDNA_ERROR_LABEL_HAS_DOT => 'has dot', - IDNA_ERROR_INVALID_ACE_LABEL => 'label not in ASCII encoding', - IDNA_ERROR_BIDI => 'fails bidirectional criteria', - IDNA_ERROR_CONTEXTJ => 'one or more characters fail CONTEXTJ rule', - ]; - - /** - * @var AddressList - */ - protected $addressList; - - /** - * @var string Normalized field name - */ - protected $fieldName; - - /** - * Header encoding - * - * @var string - */ - protected $encoding = 'ASCII'; - - /** - * @var string lower case field name - */ - protected static $type; - - public static function fromString($headerLine) - { - list($fieldName, $fieldValue) = GenericHeader::splitHeaderLine($headerLine); - if (strtolower($fieldName) !== static::$type) { - throw new Exception\InvalidArgumentException(sprintf( - 'Invalid header line for "%s" string', - __CLASS__ - )); - } - - // split value on "," - $fieldValue = str_replace(Headers::FOLDING, ' ', $fieldValue); - $fieldValue = preg_replace('/[^:]+:([^;]*);/', '$1,', $fieldValue); - $values = ListParser::parse($fieldValue); - - $wasEncoded = false; - $addresses = array_map( - function ($value) use (&$wasEncoded) { - $decodedValue = HeaderWrap::mimeDecodeValue($value); - $wasEncoded = $wasEncoded || ($decodedValue !== $value); - - $value = trim($decodedValue); - - $comments = self::getComments($value); - $value = self::stripComments($value); - - $value = preg_replace( - [ - '#(?setEncoding('UTF-8'); - } - - /** @var AddressList $addressList */ - $addressList = $header->getAddressList(); - foreach ($addresses as $address) { - $addressList->add($address); - } - - return $header; - } - - public function getFieldName() - { - return $this->fieldName; - } - - /** - * Safely convert UTF-8 encoded domain name to ASCII - * @param string $domainName the UTF-8 encoded email - * @return string - */ - protected function idnToAscii($domainName): string - { - $ascii = idn_to_ascii($domainName, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46, $conversionInfo); - if (false !== $ascii) { - return $ascii; - } - - $messages = []; - $errors = (int) $conversionInfo['errors']; - - foreach (self::IDNA_ERROR_MAP as $flag => $message) { - if (($flag & $errors) === $flag) { - $messages[] = $message; - } - } - - throw new RuntimeException(sprintf( - 'Failed encoding domain due to errors: %s', - implode(', ', $messages) - )); - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - $emails = []; - $encoding = $this->getEncoding(); - - foreach ($this->getAddressList() as $address) { - $email = $address->getEmail(); - $name = $address->getName(); - - // quote $name if value requires so - if (! empty($name) && (false !== strpos($name, ',') || false !== strpos($name, ';'))) { - // FIXME: what if name contains double quote? - $name = sprintf('"%s"', $name); - } - - if ($format === HeaderInterface::FORMAT_ENCODED - && 'ASCII' !== $encoding - ) { - if (! empty($name)) { - $name = HeaderWrap::mimeEncodeValue($name, $encoding); - } - - if (preg_match('/^(.+)@([^@]+)$/', $email, $matches)) { - $localPart = $matches[1]; - $hostname = $this->idnToAscii($matches[2]); - $email = sprintf('%s@%s', $localPart, $hostname); - } - } - - if (empty($name)) { - $emails[] = $email; - } else { - $emails[] = sprintf('%s <%s>', $name, $email); - } - } - - // Ensure the values are valid before sending them. - if ($format !== HeaderInterface::FORMAT_RAW) { - foreach ($emails as $email) { - HeaderValue::assertValid($email); - } - } - - return implode(',' . Headers::FOLDING, $emails); - } - - public function setEncoding($encoding) - { - $this->encoding = $encoding; - return $this; - } - - public function getEncoding() - { - return $this->encoding; - } - - /** - * Set address list for this header - * - * @param AddressList $addressList - */ - public function setAddressList(AddressList $addressList) - { - $this->addressList = $addressList; - } - - /** - * Get address list managed by this header - * - * @return AddressList - */ - public function getAddressList() - { - if (null === $this->addressList) { - $this->setAddressList(new AddressList()); - } - return $this->addressList; - } - - public function toString() - { - $name = $this->getFieldName(); - $value = $this->getFieldValue(HeaderInterface::FORMAT_ENCODED); - return (empty($value)) ? '' : sprintf('%s: %s', $name, $value); - } - - /** - * Retrieve comments from value, if any. - * - * Supposed to be private, protected as a workaround for PHP bug 68194 - * - * @param string $value - * @return string - */ - protected static function getComments($value) - { - $matches = []; - preg_match_all( - '/\\( - (?P( - \\\\.| - [^\\\\)] - )+) - \\)/x', - $value, - $matches - ); - return isset($matches['comment']) ? implode(', ', $matches['comment']) : ''; - } - - /** - * Strip all comments from value, if any. - * - * Supposed to be private, protected as a workaround for PHP bug 68194 - * - * @param string $value - * @return string - */ - protected static function stripComments($value) - { - return preg_replace( - '/\\( - ( - \\\\.| - [^\\\\)] - )+ - \\)/x', - '', - $value - ); - } -} diff --git a/lib/laminas/laminas-mail/src/Header/Bcc.php b/lib/laminas/laminas-mail/src/Header/Bcc.php deleted file mode 100644 index 0fd3a12d8..000000000 --- a/lib/laminas/laminas-mail/src/Header/Bcc.php +++ /dev/null @@ -1,16 +0,0 @@ -setDisposition($parts[0]); - - if (isset($parts[1])) { - $values = ListParser::parse(trim($parts[1]), [';', '=']); - $length = count($values); - $continuedValues = []; - - for ($i = 0; $i < $length; $i += 2) { - $value = $values[$i + 1]; - $value = trim($value, "'\" \t\n\r\0\x0B"); - $name = trim($values[$i], "'\" \t\n\r\0\x0B"); - - if (strpos($name, '*')) { - list($name, $count) = explode('*', $name); - // allow optional count: - // Content-Disposition: attachment; filename*=UTF-8''%64%61%61%6D%69%2D%6D%C3%B5%72%76%2E%6A%70%67 - if ($count === "") { - $count = 0; - } - - if (! is_numeric($count)) { - $type = gettype($count); - $value = var_export($count, 1); - throw new Exception\InvalidArgumentException(sprintf( - "Invalid header line for Content-Disposition string". - " - count expected to be numeric, got %s with value %s", - $type, - $value - )); - } - if (! isset($continuedValues[$name])) { - $continuedValues[$name] = []; - } - $continuedValues[$name][$count] = $value; - } else { - $header->setParameter($name, $value); - } - } - - foreach ($continuedValues as $name => $values) { - $value = ''; - for ($i = 0, $iMax = count($values); $i < $iMax; $i++) { - if (! isset($values[$i])) { - throw new Exception\InvalidArgumentException( - 'Invalid header line for Content-Disposition string - incomplete continuation'. - '; HeaderLine: '.$headerLine - ); - } - $value .= $values[$i]; - } - $header->setParameter($name, $value); - } - } - - return $header; - } - - /** - * @inheritDoc - */ - public function getFieldName() - { - return 'Content-Disposition'; - } - - /** - * @inheritDoc - */ - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - $result = $this->disposition; - if (empty($this->parameters)) { - return $result; - } - - foreach ($this->parameters as $attribute => $value) { - $valueIsEncoded = false; - if (HeaderInterface::FORMAT_ENCODED === $format && ! Mime::isPrintable($value)) { - $value = $this->getEncodedValue($value); - $valueIsEncoded = true; - } - - $line = sprintf('%s="%s"', $attribute, $value); - - if (strlen($line) < self::MAX_PARAMETER_LENGTH) { - $lines = explode(Headers::FOLDING, $result); - - if (count($lines) === 1) { - $existingLineLength = strlen('Content-Disposition: ' . $result); - } else { - $existingLineLength = 1 + strlen($lines[count($lines) - 1]); - } - - if ((2 + $existingLineLength + strlen($line)) <= self::MAX_PARAMETER_LENGTH) { - $result .= '; ' . $line; - } else { - $result .= ';' . Headers::FOLDING . $line; - } - } else { - // Use 'continuation' per RFC 2231 - if ($valueIsEncoded) { - $value = HeaderWrap::mimeDecodeValue($value); - } - - $i = 0; - $fullLength = mb_strlen($value, 'UTF-8'); - while ($fullLength > 0) { - $attributePart = $attribute . '*' . $i++ . '="'; - $attLen = mb_strlen($attributePart, 'UTF-8'); - - $subPos = 1; - $valuePart = ''; - while ($subPos <= $fullLength) { - $sub = mb_substr($value, 0, $subPos, 'UTF-8'); - if ($valueIsEncoded) { - $sub = $this->getEncodedValue($sub); - } - if ($attLen + mb_strlen($sub, 'UTF-8') >= self::MAX_PARAMETER_LENGTH) { - $subPos--; - break; - } - $subPos++; - $valuePart = $sub; - } - - $value = mb_substr($value, $subPos, null, 'UTF-8'); - $fullLength = mb_strlen($value, 'UTF-8'); - $result .= ';' . Headers::FOLDING . $attributePart . $valuePart . '"'; - } - } - } - - return $result; - } - - /** - * @param string $value - * @return string - */ - protected function getEncodedValue($value) - { - $configuredEncoding = $this->encoding; - $this->encoding = 'UTF-8'; - $value = HeaderWrap::wrap($value, $this); - $this->encoding = $configuredEncoding; - return $value; - } - - /** - * @inheritDoc - */ - public function setEncoding($encoding) - { - $this->encoding = $encoding; - return $this; - } - - /** - * @inheritDoc - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * @inheritDoc - */ - public function toString() - { - return 'Content-Disposition: ' . $this->getFieldValue(HeaderInterface::FORMAT_ENCODED); - } - - /** - * Set the content disposition - * Expected values include 'inline', 'attachment' - * - * @param string $disposition - * @return ContentDisposition - */ - public function setDisposition($disposition) - { - $this->disposition = strtolower($disposition); - return $this; - } - - /** - * Retrieve the content disposition - * - * @return string - */ - public function getDisposition() - { - return $this->disposition; - } - - /** - * Add a parameter pair - * - * @param string $name - * @param string $value - * @return ContentDisposition - */ - public function setParameter($name, $value) - { - $name = strtolower($name); - - if (! HeaderValue::isValid($name)) { - throw new Exception\InvalidArgumentException( - 'Invalid content-disposition parameter name detected' - ); - } - // '5' here is for the quotes & equal sign in `name="value"`, - // and the space & semicolon for line folding - if ((strlen($name) + 5) >= self::MAX_PARAMETER_LENGTH) { - throw new Exception\InvalidArgumentException( - 'Invalid content-disposition parameter name detected (too long)' - ); - } - - $this->parameters[$name] = $value; - return $this; - } - - /** - * Get all parameters - * - * @return array - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Get a parameter by name - * - * @param string $name - * @return null|string - */ - public function getParameter($name) - { - $name = strtolower($name); - if (isset($this->parameters[$name])) { - return $this->parameters[$name]; - } - return null; - } - - /** - * Remove a named parameter - * - * @param string $name - * @return bool - */ - public function removeParameter($name) - { - $name = strtolower($name); - if (isset($this->parameters[$name])) { - unset($this->parameters[$name]); - return true; - } - return false; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/ContentTransferEncoding.php b/lib/laminas/laminas-mail/src/Header/ContentTransferEncoding.php deleted file mode 100644 index 3c80e9274..000000000 --- a/lib/laminas/laminas-mail/src/Header/ContentTransferEncoding.php +++ /dev/null @@ -1,108 +0,0 @@ -setTransferEncoding($value); - - return $header; - } - - public function getFieldName() - { - return 'Content-Transfer-Encoding'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - return $this->transferEncoding; - } - - public function setEncoding($encoding) - { - // Header must be always in US-ASCII - return $this; - } - - public function getEncoding() - { - return 'ASCII'; - } - - public function toString() - { - return 'Content-Transfer-Encoding: ' . $this->getFieldValue(); - } - - /** - * Set the content transfer encoding - * - * @param string $transferEncoding - * @throws Exception\InvalidArgumentException - * @return $this - */ - public function setTransferEncoding($transferEncoding) - { - // Per RFC 1521, the value of the header is not case sensitive - $transferEncoding = strtolower($transferEncoding); - - if (! in_array($transferEncoding, static::$allowedTransferEncodings)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects one of "'. implode(', ', static::$allowedTransferEncodings) . '"; received "%s"', - __METHOD__, - (string) $transferEncoding - )); - } - $this->transferEncoding = $transferEncoding; - return $this; - } - - /** - * Retrieve the content transfer encoding - * - * @return string - */ - public function getTransferEncoding() - { - return $this->transferEncoding; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/ContentType.php b/lib/laminas/laminas-mail/src/Header/ContentType.php deleted file mode 100644 index 99fa9ecc5..000000000 --- a/lib/laminas/laminas-mail/src/Header/ContentType.php +++ /dev/null @@ -1,197 +0,0 @@ -setType($parts[0]); - - if (isset($parts[1])) { - $values = ListParser::parse(trim($parts[1]), [';', '=']); - $length = count($values); - - for ($i = 0; $i < $length; $i += 2) { - $value = $values[$i + 1]; - $value = trim($value, "'\" \t\n\r\0\x0B"); - $header->addParameter($values[$i], $value); - } - } - - return $header; - } - - public function getFieldName() - { - return 'Content-Type'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - $prepared = $this->type; - if (empty($this->parameters)) { - return $prepared; - } - - $values = [$prepared]; - foreach ($this->parameters as $attribute => $value) { - if (HeaderInterface::FORMAT_ENCODED === $format && ! Mime::isPrintable($value)) { - $this->encoding = 'UTF-8'; - $value = HeaderWrap::wrap($value, $this); - $this->encoding = 'ASCII'; - } - - $values[] = sprintf('%s="%s"', $attribute, $value); - } - - return implode(';' . Headers::FOLDING, $values); - } - - public function setEncoding($encoding) - { - $this->encoding = $encoding; - return $this; - } - - public function getEncoding() - { - return $this->encoding; - } - - public function toString() - { - return 'Content-Type: ' . $this->getFieldValue(HeaderInterface::FORMAT_ENCODED); - } - - /** - * Set the content type - * - * @param string $type - * @throws Exception\InvalidArgumentException - * @return ContentType - */ - public function setType($type) - { - if (! preg_match('/^[a-z-]+\/[a-z0-9.+-]+$/i', $type)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a value in the format "type/subtype"; received "%s"', - __METHOD__, - (string) $type - )); - } - $this->type = $type; - return $this; - } - - /** - * Retrieve the content type - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Add a parameter pair - * - * @param string $name - * @param string $value - * @return ContentType - * @throws Exception\InvalidArgumentException for parameter names that do not follow RFC 2822 - * @throws Exception\InvalidArgumentException for parameter values that do not follow RFC 2822 - */ - public function addParameter($name, $value) - { - $name = trim(strtolower($name)); - $value = (string) $value; - - if (! HeaderValue::isValid($name)) { - throw new Exception\InvalidArgumentException('Invalid content-type parameter name detected'); - } - if (! HeaderWrap::canBeEncoded($value)) { - throw new Exception\InvalidArgumentException( - 'Parameter value must be composed of printable US-ASCII or UTF-8 characters.' - ); - } - - $this->parameters[$name] = $value; - return $this; - } - - /** - * Get all parameters - * - * @return array - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Get a parameter by name - * - * @param string $name - * @return null|string - */ - public function getParameter($name) - { - $name = strtolower($name); - if (isset($this->parameters[$name])) { - return $this->parameters[$name]; - } - - return null; - } - - /** - * Remove a named parameter - * - * @param string $name - * @return bool - */ - public function removeParameter($name) - { - $name = strtolower($name); - if (isset($this->parameters[$name])) { - unset($this->parameters[$name]); - return true; - } - return false; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/Date.php b/lib/laminas/laminas-mail/src/Header/Date.php deleted file mode 100644 index d6d3d732b..000000000 --- a/lib/laminas/laminas-mail/src/Header/Date.php +++ /dev/null @@ -1,63 +0,0 @@ -value = $value; - } - - public function getFieldName() - { - return 'Date'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - return $this->value; - } - - public function setEncoding($encoding) - { - // This header must be always in US-ASCII - return $this; - } - - public function getEncoding() - { - return 'ASCII'; - } - - public function toString() - { - return 'Date: ' . $this->getFieldValue(); - } -} diff --git a/lib/laminas/laminas-mail/src/Header/Exception/BadMethodCallException.php b/lib/laminas/laminas-mail/src/Header/Exception/BadMethodCallException.php deleted file mode 100644 index 7506af5f4..000000000 --- a/lib/laminas/laminas-mail/src/Header/Exception/BadMethodCallException.php +++ /dev/null @@ -1,9 +0,0 @@ -setFieldName($fieldName); - - if ($fieldValue !== null) { - $this->setFieldValue($fieldValue); - } - } - - /** - * Set header name - * - * @param string $fieldName - * @return GenericHeader - * @throws Exception\InvalidArgumentException; - */ - public function setFieldName($fieldName) - { - if (! is_string($fieldName) || empty($fieldName)) { - throw new Exception\InvalidArgumentException('Header name must be a string'); - } - - // Pre-filter to normalize valid characters, change underscore to dash - $fieldName = str_replace(' ', '-', ucwords(str_replace(['_', '-'], ' ', $fieldName))); - - if (! HeaderName::isValid($fieldName)) { - throw new Exception\InvalidArgumentException( - 'Header name must be composed of printable US-ASCII characters, except colon.' - ); - } - - $this->fieldName = $fieldName; - return $this; - } - - public function getFieldName() - { - return $this->fieldName; - } - - /** - * Set header value - * - * @param string $fieldValue - * @return GenericHeader - * @throws Exception\InvalidArgumentException; - */ - public function setFieldValue($fieldValue) - { - $fieldValue = (string) $fieldValue; - - if (! HeaderWrap::canBeEncoded($fieldValue)) { - throw new Exception\InvalidArgumentException( - 'Header value must be composed of printable US-ASCII characters and valid folding sequences.' - ); - } - - $this->fieldValue = $fieldValue; - $this->encoding = null; - - return $this; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - if (HeaderInterface::FORMAT_ENCODED === $format) { - return HeaderWrap::wrap($this->fieldValue, $this); - } - - return $this->fieldValue; - } - - public function setEncoding($encoding) - { - if ($encoding === $this->encoding) { - return $this; - } - - if ($encoding === null) { - $this->encoding = null; - return $this; - } - - $encoding = strtoupper($encoding); - if ($encoding === 'UTF-8') { - $this->encoding = $encoding; - return $this; - } - - if ($encoding === 'ASCII' && Mime::isPrintable($this->fieldValue)) { - $this->encoding = $encoding; - return $this; - } - - $this->encoding = null; - - return $this; - } - - public function getEncoding() - { - if (! $this->encoding) { - $this->encoding = Mime::isPrintable($this->fieldValue) ? 'ASCII' : 'UTF-8'; - } - - return $this->encoding; - } - - public function toString() - { - $name = $this->getFieldName(); - if (empty($name)) { - throw new Exception\RuntimeException('Header name is not set, use setFieldName()'); - } - $value = $this->getFieldValue(HeaderInterface::FORMAT_ENCODED); - - return $name . ': ' . $value; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/GenericMultiHeader.php b/lib/laminas/laminas-mail/src/Header/GenericMultiHeader.php deleted file mode 100644 index 9d62a63a0..000000000 --- a/lib/laminas/laminas-mail/src/Header/GenericMultiHeader.php +++ /dev/null @@ -1,49 +0,0 @@ -getFieldName(); - $values = [$this->getFieldValue(HeaderInterface::FORMAT_ENCODED)]; - - foreach ($headers as $header) { - if (! $header instanceof static) { - throw new Exception\InvalidArgumentException( - 'This method toStringMultipleHeaders was expecting an array of headers of the same type' - ); - } - $values[] = $header->getFieldValue(HeaderInterface::FORMAT_ENCODED); - } - - return $name . ': ' . implode(',', $values); - } -} diff --git a/lib/laminas/laminas-mail/src/Header/HeaderInterface.php b/lib/laminas/laminas-mail/src/Header/HeaderInterface.php deleted file mode 100644 index c5e98341c..000000000 --- a/lib/laminas/laminas-mail/src/Header/HeaderInterface.php +++ /dev/null @@ -1,69 +0,0 @@ - Bcc::class, - 'cc' => Cc::class, - 'contentdisposition' => ContentDisposition::class, - 'content_disposition' => ContentDisposition::class, - 'content-disposition' => ContentDisposition::class, - 'contenttype' => ContentType::class, - 'content_type' => ContentType::class, - 'content-type' => ContentType::class, - 'contenttransferencoding' => ContentTransferEncoding::class, - 'content_transfer_encoding' => ContentTransferEncoding::class, - 'content-transfer-encoding' => ContentTransferEncoding::class, - 'date' => Date::class, - 'from' => From::class, - 'in-reply-to' => InReplyTo::class, - 'message-id' => MessageId::class, - 'mimeversion' => MimeVersion::class, - 'mime_version' => MimeVersion::class, - 'mime-version' => MimeVersion::class, - 'received' => Received::class, - 'references' => References::class, - 'replyto' => ReplyTo::class, - 'reply_to' => ReplyTo::class, - 'reply-to' => ReplyTo::class, - 'sender' => Sender::class, - 'subject' => Subject::class, - 'to' => To::class, - ]; -} diff --git a/lib/laminas/laminas-mail/src/Header/HeaderLocator.php b/lib/laminas/laminas-mail/src/Header/HeaderLocator.php deleted file mode 100644 index fcaf2774c..000000000 --- a/lib/laminas/laminas-mail/src/Header/HeaderLocator.php +++ /dev/null @@ -1,69 +0,0 @@ - Bcc::class, - 'cc' => Cc::class, - 'contentdisposition' => ContentDisposition::class, - 'content_disposition' => ContentDisposition::class, - 'content-disposition' => ContentDisposition::class, - 'contenttype' => ContentType::class, - 'content_type' => ContentType::class, - 'content-type' => ContentType::class, - 'contenttransferencoding' => ContentTransferEncoding::class, - 'content_transfer_encoding' => ContentTransferEncoding::class, - 'content-transfer-encoding' => ContentTransferEncoding::class, - 'date' => Date::class, - 'from' => From::class, - 'in-reply-to' => InReplyTo::class, - 'message-id' => MessageId::class, - 'mimeversion' => MimeVersion::class, - 'mime_version' => MimeVersion::class, - 'mime-version' => MimeVersion::class, - 'received' => Received::class, - 'references' => References::class, - 'replyto' => ReplyTo::class, - 'reply_to' => ReplyTo::class, - 'reply-to' => ReplyTo::class, - 'sender' => Sender::class, - 'subject' => Subject::class, - 'to' => To::class, - ]; - - public function get(string $name, ?string $default = null): ?string - { - $name = $this->normalizeName($name); - return $this->plugins[$name] ?? $default; - } - - public function has(string $name): bool - { - return isset($this->plugins[$this->normalizeName($name)]); - } - - public function add(string $name, string $class): void - { - $this->plugins[$this->normalizeName($name)] = $class; - } - - public function remove(string $name): void - { - unset($this->plugins[$this->normalizeName($name)]); - } - - private function normalizeName(string $name): string - { - return strtolower($name); - } -} diff --git a/lib/laminas/laminas-mail/src/Header/HeaderLocatorInterface.php b/lib/laminas/laminas-mail/src/Header/HeaderLocatorInterface.php deleted file mode 100644 index 28a93dc95..000000000 --- a/lib/laminas/laminas-mail/src/Header/HeaderLocatorInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - 32 && $ord < 127 && $ord !== 58) { - $result .= $name[$i]; - } - } - return $result; - } - - /** - * Determine if the header name contains any invalid characters. - * - * @param string $name - * @return bool - */ - public static function isValid($name) - { - $tot = strlen($name); - for ($i = 0; $i < $tot; $i += 1) { - $ord = ord($name[$i]); - if ($ord < 33 || $ord > 126 || $ord === 58) { - return false; - } - } - return true; - } - - /** - * Assert that the header name is valid. - * - * Raises an exception if invalid. - * - * @param string $name - * @throws Exception\RuntimeException - * @return void - */ - public static function assertValid($name) - { - if (! self::isValid($name)) { - throw new Exception\RuntimeException('Invalid header name detected'); - } - } -} diff --git a/lib/laminas/laminas-mail/src/Header/HeaderValue.php b/lib/laminas/laminas-mail/src/Header/HeaderValue.php deleted file mode 100644 index 175801801..000000000 --- a/lib/laminas/laminas-mail/src/Header/HeaderValue.php +++ /dev/null @@ -1,110 +0,0 @@ - 127) { - continue; - } - - if ($ord === 13) { - if ($i + 2 >= $total) { - continue; - } - - $lf = ord($value[$i + 1]); - $sp = ord($value[$i + 2]); - - if ($lf !== 10 || $sp !== 32) { - continue; - } - - $result .= "\r\n "; - $i += 2; - continue; - } - - $result .= $value[$i]; - } - - return $result; - } - - /** - * Determine if the header value contains any invalid characters. - * - * @see http://www.rfc-base.org/txt/rfc-2822.txt (section 2.2) - * @param string $value - * @return bool - */ - public static function isValid($value) - { - $total = strlen($value); - for ($i = 0; $i < $total; $i += 1) { - $ord = ord($value[$i]); - - // bare LF means we aren't valid - if ($ord === 10 || $ord > 127) { - return false; - } - - if ($ord === 13) { - if ($i + 2 >= $total) { - return false; - } - - $lf = ord($value[$i + 1]); - $sp = ord($value[$i + 2]); - - if ($lf !== 10 || ! in_array($sp, [9, 32], true)) { - return false; - } - - // skip over the LF following this - $i += 2; - } - } - - return true; - } - - /** - * Assert that the header value is valid. - * - * Raises an exception if invalid. - * - * @param string $value - * @throws Exception\RuntimeException - * @return void - */ - public static function assertValid($value) - { - if (! self::isValid($value)) { - throw new Exception\RuntimeException('Invalid header value detected'); - } - } -} diff --git a/lib/laminas/laminas-mail/src/Header/HeaderWrap.php b/lib/laminas/laminas-mail/src/Header/HeaderWrap.php deleted file mode 100644 index 483f51a53..000000000 --- a/lib/laminas/laminas-mail/src/Header/HeaderWrap.php +++ /dev/null @@ -1,155 +0,0 @@ -getEncoding(); - if ($encoding == 'ASCII') { - return wordwrap($value, 78, Headers::FOLDING); - } - return static::mimeEncodeValue($value, $encoding, 78); - } - - /** - * Wrap a structured header line - * - * @param string $value - * @param StructuredInterface $header - * @return string - */ - protected static function wrapStructuredHeader($value, StructuredInterface $header) - { - $delimiter = $header->getDelimiter(); - - $length = strlen($value); - $lines = []; - $temp = ''; - for ($i = 0; $i < $length; $i++) { - $temp .= $value[$i]; - if ($value[$i] == $delimiter) { - $lines[] = $temp; - $temp = ''; - } - } - return implode(Headers::FOLDING, $lines); - } - - /** - * MIME-encode a value - * - * Performs quoted-printable encoding on a value, setting maximum - * line-length to 998. - * - * @param string $value - * @param string $encoding - * @param int $lineLength maximum line-length, by default 998 - * @return string Returns the mime encode value without the last line ending - */ - public static function mimeEncodeValue($value, $encoding, $lineLength = 998) - { - return Mime::encodeQuotedPrintableHeader($value, $encoding, $lineLength, Headers::EOL); - } - - /** - * MIME-decode a value - * - * Performs quoted-printable decoding on a value. - * - * @param string $value - * @return string Returns the mime encode value without the last line ending - */ - public static function mimeDecodeValue($value) - { - // unfold first, because iconv_mime_decode is discarding "\n" with no apparent reason - // making the resulting value no longer valid. - - // see https://tools.ietf.org/html/rfc2822#section-2.2.3 about unfolding - $parts = explode(Headers::FOLDING, $value); - $value = implode(' ', $parts); - - $decodedValue = iconv_mime_decode($value, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8'); - - // imap (unlike iconv) can handle multibyte headers which are splitted across multiple line - if (self::isNotDecoded($value, $decodedValue) && extension_loaded('imap')) { - return array_reduce( - imap_mime_header_decode(imap_utf8($value)), - function ($accumulator, $headerPart) { - return $accumulator . $headerPart->text; - }, - '' - ); - } - - return $decodedValue; - } - - private static function isNotDecoded($originalValue, $value) - { - return 0 === strpos($value, '=?') - && strlen($value) - 2 === strpos($value, '?=') - && false !== strpos($originalValue, $value); - } - - /** - * Test if is possible apply MIME-encoding - * - * @param string $value - * @return bool - */ - public static function canBeEncoded($value) - { - // avoid any wrapping by specifying line length long enough - // "test" -> 4 - // "x-test: =?ISO-8859-1?B?dGVzdA==?=" -> 33 - // 8 +2 +3 +3 -> 16 - $charset = 'UTF-8'; - $lineLength = strlen($value) * 4 + strlen($charset) + 16; - - $preferences = [ - 'scheme' => 'Q', - 'input-charset' => $charset, - 'output-charset' => $charset, - 'line-length' => $lineLength, - ]; - - $encoded = iconv_mime_encode('x-test', $value, $preferences); - - return (false !== $encoded); - } -} diff --git a/lib/laminas/laminas-mail/src/Header/IdentificationField.php b/lib/laminas/laminas-mail/src/Header/IdentificationField.php deleted file mode 100644 index 2c5084369..000000000 --- a/lib/laminas/laminas-mail/src/Header/IdentificationField.php +++ /dev/null @@ -1,137 +0,0 @@ -setIds($messageIds); - - return $header; - } - - /** - * @param string $id - * @return string - */ - private static function trimMessageId($id) - { - return trim($id, "\t\n\r\0\x0B<>"); - } - - /** - * @return string - */ - public function getFieldName() - { - return $this->fieldName; - } - - /** - * @param bool $format - * @return string - */ - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - return implode(Headers::FOLDING, array_map(function ($id) { - return sprintf('<%s>', $id); - }, $this->messageIds)); - } - - /** - * @param string $encoding Ignored; headers of this type MUST always be in - * ASCII. - * @return static This method is a no-op, and implements a fluent interface. - */ - public function setEncoding($encoding) - { - return $this; - } - - /** - * @return string Always returns ASCII - */ - public function getEncoding() - { - return 'ASCII'; - } - - /** - * @return string - */ - public function toString() - { - return sprintf('%s: %s', $this->getFieldName(), $this->getFieldValue()); - } - - /** - * Set the message ids - * - * @param string[] $ids - * @return static This method implements a fluent interface. - */ - public function setIds($ids) - { - foreach ($ids as $id) { - if (! HeaderValue::isValid($id) - || preg_match("/[\r\n]/", $id) - ) { - throw new Exception\InvalidArgumentException('Invalid ID detected'); - } - } - - $this->messageIds = array_map([self::class, "trimMessageId"], $ids); - return $this; - } - - /** - * Retrieve the message ids - * - * @return string[] - */ - public function getIds() - { - return $this->messageIds; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/InReplyTo.php b/lib/laminas/laminas-mail/src/Header/InReplyTo.php deleted file mode 100644 index 6698d441a..000000000 --- a/lib/laminas/laminas-mail/src/Header/InReplyTo.php +++ /dev/null @@ -1,9 +0,0 @@ -setId($value); - - return $header; - } - - public function getFieldName() - { - return 'Message-ID'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - return $this->messageId; - } - - public function setEncoding($encoding) - { - // This header must be always in US-ASCII - return $this; - } - - public function getEncoding() - { - return 'ASCII'; - } - - public function toString() - { - return 'Message-ID: ' . $this->getFieldValue(); - } - - /** - * Set the message id - * - * @param string|null $id - * @return MessageId - */ - public function setId($id = null) - { - if ($id === null) { - $id = $this->createMessageId(); - } else { - $id = trim($id, '<>'); - } - - if (! HeaderValue::isValid($id) - || preg_match("/[\r\n]/", $id) - ) { - throw new Exception\InvalidArgumentException('Invalid ID detected'); - } - - $this->messageId = sprintf('<%s>', $id); - return $this; - } - - /** - * Retrieve the message id - * - * @return string - */ - public function getId() - { - return $this->messageId; - } - - /** - * Creates the Message-ID - * - * @return string - */ - public function createMessageId() - { - $time = time(); - - if (isset($_SERVER['REMOTE_ADDR'])) { - $user = $_SERVER['REMOTE_ADDR']; - } else { - $user = getmypid(); - } - - $rand = mt_rand(); - - if (isset($_SERVER["SERVER_NAME"])) { - $hostName = $_SERVER["SERVER_NAME"]; - } else { - $hostName = php_uname('n'); - } - - return sha1($time . $user . $rand) . '@' . $hostName; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/MimeVersion.php b/lib/laminas/laminas-mail/src/Header/MimeVersion.php deleted file mode 100644 index 435029470..000000000 --- a/lib/laminas/laminas-mail/src/Header/MimeVersion.php +++ /dev/null @@ -1,81 +0,0 @@ -\d+\.\d+)$/', $value, $matches)) { - $header->setVersion($matches['version']); - } - - return $header; - } - - public function getFieldName() - { - return 'MIME-Version'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - return $this->version; - } - - public function setEncoding($encoding) - { - // This header must be always in US-ASCII - return $this; - } - - public function getEncoding() - { - return 'ASCII'; - } - - public function toString() - { - return 'MIME-Version: ' . $this->getFieldValue(); - } - - /** - * Set the version string used in this header - * - * @param string $version - * @return MimeVersion - */ - public function setVersion($version) - { - if (! preg_match('/^[1-9]\d*\.\d+$/', $version)) { - throw new Exception\InvalidArgumentException('Invalid MIME-Version value detected'); - } - $this->version = $version; - return $this; - } - - /** - * Retrieve the version string for this header - * - * @return string - */ - public function getVersion() - { - return $this->version; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/MultipleHeadersInterface.php b/lib/laminas/laminas-mail/src/Header/MultipleHeadersInterface.php deleted file mode 100644 index b109e68dd..000000000 --- a/lib/laminas/laminas-mail/src/Header/MultipleHeadersInterface.php +++ /dev/null @@ -1,8 +0,0 @@ -value = $value; - } - - public function getFieldName() - { - return 'Received'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - return $this->value; - } - - public function setEncoding($encoding) - { - // This header must be always in US-ASCII - return $this; - } - - public function getEncoding() - { - return 'ASCII'; - } - - public function toString() - { - return 'Received: ' . $this->getFieldValue(); - } - - /** - * Serialize collection of Received headers to string - * - * @param array $headers - * @throws Exception\RuntimeException - * @return string - */ - public function toStringMultipleHeaders(array $headers) - { - $strings = [$this->toString()]; - foreach ($headers as $header) { - if (! $header instanceof self) { - throw new Exception\RuntimeException( - 'The Received multiple header implementation can only accept an array of Received headers' - ); - } - $strings[] = $header->toString(); - } - return implode(Headers::EOL, $strings); - } -} diff --git a/lib/laminas/laminas-mail/src/Header/References.php b/lib/laminas/laminas-mail/src/Header/References.php deleted file mode 100644 index 9b7b92fe7..000000000 --- a/lib/laminas/laminas-mail/src/Header/References.php +++ /dev/null @@ -1,9 +0,0 @@ - when a name is present - * 'name' and 'email' capture groups correspond respectively to 'display-name' and 'addr-spec' in the ABNF - * @see https://tools.ietf.org/html/rfc5322#section-3.4 - */ - $hasMatches = preg_match( - '/^(?:(?P.+)\s)?(?(name)<|[^\s]+?)(?(name)>|>?)$/', - $value, - $matches - ); - - if ($hasMatches !== 1) { - throw new Exception\InvalidArgumentException('Invalid header value for Sender string'); - } - - $senderName = trim($matches['name']); - - if (empty($senderName)) { - $senderName = null; - } - - $header->setAddress($matches['email'], $senderName); - - return $header; - } - - public function getFieldName() - { - return 'Sender'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - if (! $this->address instanceof Mail\Address\AddressInterface) { - return ''; - } - - $email = sprintf('<%s>', $this->address->getEmail()); - $name = $this->address->getName(); - - if (! empty($name)) { - if ($format == HeaderInterface::FORMAT_ENCODED) { - $encoding = $this->getEncoding(); - if ('ASCII' !== $encoding) { - $name = HeaderWrap::mimeEncodeValue($name, $encoding); - } - } - $email = sprintf('%s %s', $name, $email); - } - - return $email; - } - - public function setEncoding($encoding) - { - $this->encoding = $encoding; - return $this; - } - - public function getEncoding() - { - if (! $this->encoding) { - $this->encoding = Mime::isPrintable($this->getFieldValue(HeaderInterface::FORMAT_RAW)) - ? 'ASCII' - : 'UTF-8'; - } - - return $this->encoding; - } - - public function toString() - { - return 'Sender: ' . $this->getFieldValue(HeaderInterface::FORMAT_ENCODED); - } - - /** - * Set the address used in this header - * - * @param string|\Laminas\Mail\Address\AddressInterface $emailOrAddress - * @param null|string $name - * @throws Exception\InvalidArgumentException - * @return Sender - */ - public function setAddress($emailOrAddress, $name = null) - { - if (is_string($emailOrAddress)) { - $emailOrAddress = new Mail\Address($emailOrAddress, $name); - } elseif (! $emailOrAddress instanceof Mail\Address\AddressInterface) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a string or AddressInterface object; received "%s"', - __METHOD__, - (is_object($emailOrAddress) ? get_class($emailOrAddress) : gettype($emailOrAddress)) - )); - } - $this->address = $emailOrAddress; - return $this; - } - - /** - * Retrieve the internal address from this header - * - * @return \Laminas\Mail\Address\AddressInterface|null - */ - public function getAddress() - { - return $this->address; - } -} diff --git a/lib/laminas/laminas-mail/src/Header/StructuredInterface.php b/lib/laminas/laminas-mail/src/Header/StructuredInterface.php deleted file mode 100644 index f487bb3f2..000000000 --- a/lib/laminas/laminas-mail/src/Header/StructuredInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -setSubject($value); - - return $header; - } - - public function getFieldName() - { - return 'Subject'; - } - - public function getFieldValue($format = HeaderInterface::FORMAT_RAW) - { - if (HeaderInterface::FORMAT_ENCODED === $format) { - return HeaderWrap::wrap($this->subject, $this); - } - - return $this->subject; - } - - public function setEncoding($encoding) - { - if ($encoding === $this->encoding) { - return $this; - } - - if ($encoding === null) { - $this->encoding = null; - return $this; - } - - $encoding = strtoupper($encoding); - if ($encoding === 'UTF-8') { - $this->encoding = $encoding; - return $this; - } - - if ($encoding === 'ASCII' && Mime::isPrintable($this->subject)) { - $this->encoding = $encoding; - return $this; - } - - $this->encoding = null; - - return $this; - } - - public function getEncoding() - { - if (! $this->encoding) { - $this->encoding = Mime::isPrintable($this->subject) ? 'ASCII' : 'UTF-8'; - } - - return $this->encoding; - } - - public function setSubject($subject) - { - $subject = (string) $subject; - - if (! HeaderWrap::canBeEncoded($subject)) { - throw new Exception\InvalidArgumentException( - 'Subject value must be composed of printable US-ASCII or UTF-8 characters.' - ); - } - - $this->subject = $subject; - $this->encoding = null; - - return $this; - } - - public function toString() - { - return 'Subject: ' . $this->getFieldValue(HeaderInterface::FORMAT_ENCODED); - } -} diff --git a/lib/laminas/laminas-mail/src/Header/To.php b/lib/laminas/laminas-mail/src/Header/To.php deleted file mode 100644 index b3f50dead..000000000 --- a/lib/laminas/laminas-mail/src/Header/To.php +++ /dev/null @@ -1,9 +0,0 @@ - 2) { - throw new Exception\RuntimeException('Malformed header detected'); - } - continue; - } elseif (preg_match('/^\s*$/', $line)) { - // skip empty continuation line - continue; - } - - if ($emptyLine > 1) { - throw new Exception\RuntimeException('Malformed header detected'); - } - - // check if a header name is present - if (preg_match('/^[\x21-\x39\x3B-\x7E]+:.*$/', $line)) { - if ($currentLine) { - // a header name was present, then store the current complete line - $headers->addHeaderLine($currentLine); - } - $currentLine = trim($line); - continue; - } - - // continuation: append to current line - // recover the whitespace that break the line (unfolding, rfc2822#section-2.2.3) - if (preg_match('/^\s+.*$/', $line)) { - $currentLine .= ' ' . trim($line); - continue; - } - - // Line does not match header format! - throw new Exception\RuntimeException(sprintf( - 'Line "%s" does not match header format!', - $line - )); - } - if ($currentLine) { - $headers->addHeaderLine($currentLine); - } - return $headers; - } - - /** - * Set an alternate PluginClassLocator implementation for loading header classes. - * - * @deprecated since 2.12.0 - * @todo Remove for version 3.0.0 - * @return $this - */ - public function setPluginClassLoader(PluginClassLocator $pluginClassLoader) - { - // Silenced; can be caught in custom error handlers. - @trigger_error(sprintf( - 'Since laminas/laminas-mail 2.12.0: Usage of %s is deprecated; use %s::setHeaderLocator() instead', - __METHOD__, - __CLASS__ - ), E_USER_DEPRECATED); - - $this->pluginClassLoader = $pluginClassLoader; - return $this; - } - - /** - * Return a PluginClassLocator instance for customizing headers. - * - * Lazyloads a Header\HeaderLoader if necessary. - * - * @deprecated since 2.12.0 - * @todo Remove for version 3.0.0 - * @return PluginClassLocator - */ - public function getPluginClassLoader() - { - // Silenced; can be caught in custom error handlers. - @trigger_error(sprintf( - 'Since laminas/laminas-mail 2.12.0: Usage of %s is deprecated; use %s::getHeaderLocator() instead', - __METHOD__, - __CLASS__ - ), E_USER_DEPRECATED); - - if (! $this->pluginClassLoader) { - $this->pluginClassLoader = new Header\HeaderLoader(); - } - - return $this->pluginClassLoader; - } - - /** - * Retrieve the header class locator for customizing headers. - * - * Lazyloads a Header\HeaderLocator instance if necessary. - */ - public function getHeaderLocator(): Header\HeaderLocatorInterface - { - if (! $this->headerLocator) { - $this->setHeaderLocator(new Header\HeaderLocator()); - } - return $this->headerLocator; - } - - /** - * @todo Return self when we update to 7.4 or later as minimum PHP version. - * @return $this - */ - public function setHeaderLocator(Header\HeaderLocatorInterface $headerLocator) - { - $this->headerLocator = $headerLocator; - return $this; - } - - /** - * Set the header encoding - * - * @param string $encoding - * @return Headers - */ - public function setEncoding($encoding) - { - $this->encoding = $encoding; - foreach ($this as $header) { - $header->setEncoding($encoding); - } - return $this; - } - - /** - * Get the header encoding - * - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Add many headers at once - * - * Expects an array (or Traversable object) of type/value pairs. - * - * @param array|Traversable $headers - * @throws Exception\InvalidArgumentException - * @return Headers - */ - public function addHeaders($headers) - { - if (! is_array($headers) && ! $headers instanceof Traversable) { - throw new Exception\InvalidArgumentException(sprintf( - 'Expected array or Traversable; received "%s"', - (is_object($headers) ? get_class($headers) : gettype($headers)) - )); - } - - foreach ($headers as $name => $value) { - if (is_int($name)) { - if (is_string($value)) { - $this->addHeaderLine($value); - } elseif (is_array($value) && count($value) == 1) { - $this->addHeaderLine(key($value), current($value)); - } elseif (is_array($value) && count($value) == 2) { - $this->addHeaderLine($value[0], $value[1]); - } elseif ($value instanceof Header\HeaderInterface) { - $this->addHeader($value); - } - } elseif (is_string($name)) { - $this->addHeaderLine($name, $value); - } - } - - return $this; - } - - /** - * Add a raw header line, either in name => value, or as a single string 'name: value' - * - * This method allows for lazy-loading in that the parsing and instantiation of HeaderInterface object - * will be delayed until they are retrieved by either get() or current() - * - * @throws Exception\InvalidArgumentException - * @param string $headerFieldNameOrLine - * @param string $fieldValue optional - * @return Headers - */ - public function addHeaderLine($headerFieldNameOrLine, $fieldValue = null) - { - if (! is_string($headerFieldNameOrLine)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects its first argument to be a string; received "%s"', - __METHOD__, - (is_object($headerFieldNameOrLine) - ? get_class($headerFieldNameOrLine) - : gettype($headerFieldNameOrLine)) - )); - } - - if ($fieldValue === null) { - $headers = $this->loadHeader($headerFieldNameOrLine); - $headers = is_array($headers) ? $headers : [$headers]; - foreach ($headers as $header) { - $this->addHeader($header); - } - } elseif (is_array($fieldValue)) { - foreach ($fieldValue as $i) { - $this->addHeader(Header\GenericMultiHeader::fromString($headerFieldNameOrLine . ':' . $i)); - } - } else { - $this->addHeader(Header\GenericHeader::fromString($headerFieldNameOrLine . ':' . $fieldValue)); - } - - return $this; - } - - /** - * Add a Header\Interface to this container, for raw values see {@link addHeaderLine()} and {@link addHeaders()} - * - * @param Header\HeaderInterface $header - * @return Headers - */ - public function addHeader(Header\HeaderInterface $header) - { - $key = $this->normalizeFieldName($header->getFieldName()); - $this->headersKeys[] = $key; - $this->headers[] = $header; - if ($this->getEncoding() !== 'ASCII') { - $header->setEncoding($this->getEncoding()); - } - return $this; - } - - /** - * Remove a Header from the container - * - * @param string|Header\HeaderInterface field name or specific header instance to remove - * @return bool - */ - public function removeHeader($instanceOrFieldName) - { - if (! $instanceOrFieldName instanceof Header\HeaderInterface && ! is_string($instanceOrFieldName)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s requires a string or %s instance; received %s', - __METHOD__, - Header\HeaderInterface::class, - is_object($instanceOrFieldName) ? get_class($instanceOrFieldName) : gettype($instanceOrFieldName) - )); - } - - if ($instanceOrFieldName instanceof Header\HeaderInterface) { - $indexes = array_keys($this->headers, $instanceOrFieldName, true); - } - - if (is_string($instanceOrFieldName)) { - $key = $this->normalizeFieldName($instanceOrFieldName); - $indexes = array_keys($this->headersKeys, $key, true); - } - - if (! empty($indexes)) { - foreach ($indexes as $index) { - unset($this->headersKeys[$index]); - unset($this->headers[$index]); - } - return true; - } - - return false; - } - - /** - * Clear all headers - * - * Removes all headers from queue - * - * @return Headers - */ - public function clearHeaders() - { - $this->headers = $this->headersKeys = []; - return $this; - } - - /** - * Get all headers of a certain name/type - * - * @param string $name - * @return bool|ArrayIterator|Header\HeaderInterface Returns false if there is no headers with $name in this - * contain, an ArrayIterator if the header is a MultipleHeadersInterface instance and finally returns - * HeaderInterface for the rest of cases. - */ - public function get($name) - { - $key = $this->normalizeFieldName($name); - $results = []; - - foreach (array_keys($this->headersKeys, $key, true) as $index) { - if ($this->headers[$index] instanceof Header\GenericHeader) { - $results[] = $this->lazyLoadHeader($index); - } else { - $results[] = $this->headers[$index]; - } - } - - switch (count($results)) { - case 0: - return false; - case 1: - if ($results[0] instanceof Header\MultipleHeadersInterface) { - return new ArrayIterator($results); - } - return $results[0]; - default: - return new ArrayIterator($results); - } - } - - /** - * Test for existence of a type of header - * - * @param string $name - * @return bool - */ - public function has($name) - { - $name = $this->normalizeFieldName($name); - return in_array($name, $this->headersKeys, true); - } - - /** - * Advance the pointer for this object as an iterator - * - */ - #[ReturnTypeWillChange] - public function next() - { - next($this->headers); - } - - /** - * Return the current key for this object as an iterator - * - * @return mixed - */ - #[ReturnTypeWillChange] - public function key() - { - return key($this->headers); - } - - /** - * Is this iterator still valid? - * - * @return bool - */ - #[ReturnTypeWillChange] - public function valid() - { - return (current($this->headers) !== false); - } - - /** - * Reset the internal pointer for this object as an iterator - * - */ - #[ReturnTypeWillChange] - public function rewind() - { - reset($this->headers); - } - - /** - * Return the current value for this iterator, lazy loading it if need be - * - * @return Header\HeaderInterface - */ - #[ReturnTypeWillChange] - public function current() - { - $current = current($this->headers); - if ($current instanceof Header\GenericHeader) { - $current = $this->lazyLoadHeader(key($this->headers)); - } - return $current; - } - - /** - * Return the number of headers in this contain, if all headers have not been parsed, actual count could - * increase if MultipleHeader objects exist in the Request/Response. If you need an exact count, iterate - * - * @return int count of currently known headers - */ - #[ReturnTypeWillChange] - public function count() - { - return count($this->headers); - } - - /** - * Render all headers at once - * - * This method handles the normal iteration of headers; it is up to the - * concrete classes to prepend with the appropriate status/request line. - * - * @return string - */ - public function toString() - { - $headers = ''; - foreach ($this as $header) { - if ($str = $header->toString()) { - $headers .= $str . self::EOL; - } - } - - return $headers; - } - - /** - * Return the headers container as an array - * - * @param bool $format Return the values in Mime::Encoded or in Raw format - * @return array - * @todo determine how to produce single line headers, if they are supported - */ - public function toArray($format = Header\HeaderInterface::FORMAT_RAW) - { - $headers = []; - /* @var $header Header\HeaderInterface */ - foreach ($this->headers as $header) { - if ($header instanceof Header\MultipleHeadersInterface) { - $name = $header->getFieldName(); - if (! isset($headers[$name])) { - $headers[$name] = []; - } - $headers[$name][] = $header->getFieldValue($format); - } else { - $headers[$header->getFieldName()] = $header->getFieldValue($format); - } - } - return $headers; - } - - /** - * By calling this, it will force parsing and loading of all headers, after this count() will be accurate - * - * @return bool - */ - public function forceLoading() - { - foreach ($this as $item) { - // $item should now be loaded - } - return true; - } - - /** - * Create Header object from header line - * - * @param string $headerLine - * @return Header\HeaderInterface|Header\HeaderInterface[] - */ - public function loadHeader($headerLine) - { - list($name) = Header\GenericHeader::splitHeaderLine($headerLine); - - /** @var HeaderInterface $class */ - $class = $this->resolveHeaderClass($name); - return $class::fromString($headerLine); - } - - /** - * @param $index - * @return mixed - */ - protected function lazyLoadHeader($index) - { - $current = $this->headers[$index]; - - $key = $this->headersKeys[$index]; - - /** @var GenericHeader $class */ - $class = $this->resolveHeaderClass($key); - - $encoding = $current->getEncoding(); - $headers = $class::fromString($current->toString()); - if (is_array($headers)) { - $current = array_shift($headers); - $current->setEncoding($encoding); - $this->headers[$index] = $current; - foreach ($headers as $header) { - $header->setEncoding($encoding); - $this->headersKeys[] = $key; - $this->headers[] = $header; - } - return $current; - } - - $current = $headers; - $current->setEncoding($encoding); - $this->headers[$index] = $current; - return $current; - } - - /** - * Normalize a field name - * - * @param string $fieldName - * @return string - */ - protected function normalizeFieldName($fieldName) - { - return str_replace(['-', '_', ' ', '.'], '', strtolower($fieldName)); - } - - /** - * @param string $key - * @return string - */ - private function resolveHeaderClass($key) - { - if ($this->pluginClassLoader) { - return $this->pluginClassLoader->load($key) ?: Header\GenericHeader::class; - } - return $this->getHeaderLocator()->get($key, Header\GenericHeader::class); - } -} diff --git a/lib/laminas/laminas-mail/src/Message.php b/lib/laminas/laminas-mail/src/Message.php deleted file mode 100644 index 67f429d67..000000000 --- a/lib/laminas/laminas-mail/src/Message.php +++ /dev/null @@ -1,576 +0,0 @@ -getFrom(); - if (! $from instanceof AddressList) { - return false; - } - return (bool) count($from); - } - - /** - * Set the message encoding - * - * @param string $encoding - * @return Message - */ - public function setEncoding($encoding) - { - $this->encoding = $encoding; - $this->getHeaders()->setEncoding($encoding); - return $this; - } - - /** - * Get the message encoding - * - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Compose headers - * - * @param Headers $headers - * @return Message - */ - public function setHeaders(Headers $headers) - { - $this->headers = $headers; - $headers->setEncoding($this->getEncoding()); - return $this; - } - - /** - * Access headers collection - * - * Lazy-loads if not already attached. - * - * @return Headers - */ - public function getHeaders() - { - if (null === $this->headers) { - $this->setHeaders(new Headers()); - $date = Header\Date::fromString('Date: ' . date('r')); - $this->headers->addHeader($date); - } - return $this->headers; - } - - /** - * Set (overwrite) From addresses - * - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressList - * @param string|null $name - * @return Message - */ - public function setFrom($emailOrAddressList, $name = null) - { - $this->clearHeaderByName('from'); - return $this->addFrom($emailOrAddressList, $name); - } - - /** - * Add a "From" address - * - * @param string|Address|array|AddressList|Traversable $emailOrAddressOrList - * @param string|null $name - * @return Message - */ - public function addFrom($emailOrAddressOrList, $name = null) - { - $addressList = $this->getFrom(); - $this->updateAddressList($addressList, $emailOrAddressOrList, $name, __METHOD__); - return $this; - } - - /** - * Retrieve list of From senders - * - * @return AddressList - */ - public function getFrom() - { - return $this->getAddressListFromHeader('from', From::class); - } - - /** - * Overwrite the address list in the To recipients - * - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressList - * @param null|string $name - * @return Message - */ - public function setTo($emailOrAddressList, $name = null) - { - $this->clearHeaderByName('to'); - return $this->addTo($emailOrAddressList, $name); - } - - /** - * Add one or more addresses to the To recipients - * - * Appends to the list. - * - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressOrList - * @param null|string $name - * @return Message - */ - public function addTo($emailOrAddressOrList, $name = null) - { - $addressList = $this->getTo(); - $this->updateAddressList($addressList, $emailOrAddressOrList, $name, __METHOD__); - return $this; - } - - /** - * Access the address list of the To header - * - * @return AddressList - */ - public function getTo() - { - return $this->getAddressListFromHeader('to', To::class); - } - - /** - * Set (overwrite) CC addresses - * - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressList - * @param string|null $name - * @return Message - */ - public function setCc($emailOrAddressList, $name = null) - { - $this->clearHeaderByName('cc'); - return $this->addCc($emailOrAddressList, $name); - } - - /** - * Add a "Cc" address - * - * @param string|Address|array|AddressList|Traversable $emailOrAddressOrList - * @param string|null $name - * @return Message - */ - public function addCc($emailOrAddressOrList, $name = null) - { - $addressList = $this->getCc(); - $this->updateAddressList($addressList, $emailOrAddressOrList, $name, __METHOD__); - return $this; - } - - /** - * Retrieve list of CC recipients - * - * @return AddressList - */ - public function getCc() - { - return $this->getAddressListFromHeader('cc', Cc::class); - } - - /** - * Set (overwrite) BCC addresses - * - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressList - * @param string|null $name - * @return Message - */ - public function setBcc($emailOrAddressList, $name = null) - { - $this->clearHeaderByName('bcc'); - return $this->addBcc($emailOrAddressList, $name); - } - - /** - * Add a "Bcc" address - * - * @param string|Address|array|AddressList|Traversable $emailOrAddressOrList - * @param string|null $name - * @return Message - */ - public function addBcc($emailOrAddressOrList, $name = null) - { - $addressList = $this->getBcc(); - $this->updateAddressList($addressList, $emailOrAddressOrList, $name, __METHOD__); - return $this; - } - - /** - * Retrieve list of BCC recipients - * - * @return AddressList - */ - public function getBcc() - { - return $this->getAddressListFromHeader('bcc', Bcc::class); - } - - /** - * Overwrite the address list in the Reply-To recipients - * - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressList - * @param null|string $name - * @return Message - */ - public function setReplyTo($emailOrAddressList, $name = null) - { - $this->clearHeaderByName('reply-to'); - return $this->addReplyTo($emailOrAddressList, $name); - } - - /** - * Add one or more addresses to the Reply-To recipients - * - * Appends to the list. - * - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressOrList - * @param null|string $name - * @return Message - */ - public function addReplyTo($emailOrAddressOrList, $name = null) - { - $addressList = $this->getReplyTo(); - $this->updateAddressList($addressList, $emailOrAddressOrList, $name, __METHOD__); - return $this; - } - - /** - * Access the address list of the Reply-To header - * - * @return AddressList - */ - public function getReplyTo() - { - return $this->getAddressListFromHeader('reply-to', ReplyTo::class); - } - - /** - * setSender - * - * @param mixed $emailOrAddress - * @param mixed $name - * @return Message - */ - public function setSender($emailOrAddress, $name = null) - { - /** @var Sender $header */ - $header = $this->getHeaderByName('sender', Sender::class); - $header->setAddress($emailOrAddress, $name); - return $this; - } - - /** - * Retrieve the sender address, if any - * - * @return null|Address\AddressInterface - */ - public function getSender() - { - $headers = $this->getHeaders(); - if (! $headers->has('sender')) { - return null; - } - - /** @var Sender $header */ - $header = $this->getHeaderByName('sender', Sender::class); - return $header->getAddress(); - } - - /** - * Set the message subject header value - * - * @param string $subject - * @return Message - */ - public function setSubject($subject) - { - $headers = $this->getHeaders(); - if (! $headers->has('subject')) { - $header = new Header\Subject(); - $headers->addHeader($header); - } else { - $header = $headers->get('subject'); - } - $header->setSubject($subject); - $header->setEncoding($this->getEncoding()); - return $this; - } - - /** - * Get the message subject header value - * - * @return null|string - */ - public function getSubject() - { - $headers = $this->getHeaders(); - if (! $headers->has('subject')) { - return; - } - $header = $headers->get('subject'); - return $header->getFieldValue(); - } - - /** - * Set the message body - * - * @param null|string|\Laminas\Mime\Message|object $body - * @throws Exception\InvalidArgumentException - * @return Message - */ - public function setBody($body) - { - if (! is_string($body) && $body !== null) { - if (! is_object($body)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a string or object argument; received "%s"', - __METHOD__, - gettype($body) - )); - } - if (! $body instanceof Mime\Message) { - if (! method_exists($body, '__toString')) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects object arguments of type %s or implementing __toString();' - . ' object of type "%s" received', - __METHOD__, - Mime\Message::class, - get_class($body) - )); - } - } - } - $this->body = $body; - - if (! $this->body instanceof Mime\Message) { - return $this; - } - - // Get headers, and set Mime-Version header - $headers = $this->getHeaders(); - $this->getHeaderByName('mime-version', MimeVersion::class); - - // Multipart content headers - if ($this->body->isMultiPart()) { - $mime = $this->body->getMime(); - - /** @var ContentType $header */ - $header = $this->getHeaderByName('content-type', ContentType::class); - $header->setType('multipart/mixed'); - $header->addParameter('boundary', $mime->boundary()); - return $this; - } - - // MIME single part headers - $parts = $this->body->getParts(); - if (! empty($parts)) { - $part = array_shift($parts); - $headers->addHeaders($part->getHeadersArray("\r\n")); - } - return $this; - } - - /** - * Return the currently set message body - * - * @return object|string|Mime\Message - */ - public function getBody() - { - return $this->body; - } - - /** - * Get the string-serialized message body text - * - * @return string - */ - public function getBodyText() - { - if ($this->body instanceof Mime\Message) { - return $this->body->generateMessage(Headers::EOL); - } - - return (string) $this->body; - } - - /** - * Retrieve a header by name - * - * If not found, instantiates one based on $headerClass. - * - * @param string $headerName - * @param string $headerClass - * @return Header\HeaderInterface|\ArrayIterator header instance or collection of headers - */ - protected function getHeaderByName($headerName, $headerClass) - { - $headers = $this->getHeaders(); - if ($headers->has($headerName)) { - $header = $headers->get($headerName); - } else { - $header = new $headerClass(); - $headers->addHeader($header); - } - return $header; - } - - /** - * Clear a header by name - * - * @param string $headerName - */ - protected function clearHeaderByName($headerName) - { - $this->getHeaders()->removeHeader($headerName); - } - - /** - * Retrieve the AddressList from a named header - * - * Used with To, From, Cc, Bcc, and ReplyTo headers. If the header does not - * exist, instantiates it. - * - * @param string $headerName - * @param string $headerClass - * @throws Exception\DomainException - * @return AddressList - */ - protected function getAddressListFromHeader($headerName, $headerClass) - { - $header = $this->getHeaderByName($headerName, $headerClass); - if (! $header instanceof Header\AbstractAddressList) { - throw new Exception\DomainException(sprintf( - 'Cannot grab address list from header of type "%s"; not an AbstractAddressList implementation', - get_class($header) - )); - } - return $header->getAddressList(); - } - - /** - * Update an address list - * - * Proxied to this from addFrom, addTo, addCc, addBcc, and addReplyTo. - * - * @param AddressList $addressList - * @param string|Address\AddressInterface|array|AddressList|Traversable $emailOrAddressOrList - * @param null|string $name - * @param string $callingMethod - * @throws Exception\InvalidArgumentException - */ - protected function updateAddressList(AddressList $addressList, $emailOrAddressOrList, $name, $callingMethod) - { - if ($emailOrAddressOrList instanceof Traversable) { - foreach ($emailOrAddressOrList as $address) { - $addressList->add($address); - } - return; - } - if (is_array($emailOrAddressOrList)) { - $addressList->addMany($emailOrAddressOrList); - return; - } - if (! is_string($emailOrAddressOrList) && ! $emailOrAddressOrList instanceof Address\AddressInterface) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a string, AddressInterface, array, AddressList, or Traversable as its first argument;' - . ' received "%s"', - $callingMethod, - (is_object($emailOrAddressOrList) ? get_class($emailOrAddressOrList) : gettype($emailOrAddressOrList)) - )); - } - - if (is_string($emailOrAddressOrList) && $name === null) { - $addressList->addFromString($emailOrAddressOrList); - return; - } - - $addressList->add($emailOrAddressOrList, $name); - } - - /** - * Serialize to string - * - * @return string - */ - public function toString() - { - $headers = $this->getHeaders(); - return $headers->toString() - . Headers::EOL - . $this->getBodyText(); - } - - /** - * Instantiate from raw message string - * - * @todo Restore body to Mime\Message - * @param string $rawMessage - * @return Message - */ - public static function fromString($rawMessage) - { - $message = new static(); - - /** @var Headers $headers */ - $headers = null; - $content = null; - Mime\Decode::splitMessage($rawMessage, $headers, $content, Headers::EOL); - if ($headers->has('mime-version')) { - // todo - restore body to mime\message - } - $message->setHeaders($headers); - $message->setBody($content); - return $message; - } -} diff --git a/lib/laminas/laminas-mail/src/MessageFactory.php b/lib/laminas/laminas-mail/src/MessageFactory.php deleted file mode 100644 index faf40fe76..000000000 --- a/lib/laminas/laminas-mail/src/MessageFactory.php +++ /dev/null @@ -1,58 +0,0 @@ - $value) { - $setter = self::getSetterMethod($key); - if (method_exists($message, $setter)) { - $message->{$setter}($value); - } - } - - return $message; - } - - /** - * Generate a setter method name based on a provided key. - * - * @param string $key - * @return string - */ - private static function getSetterMethod($key) - { - return 'set' - . str_replace( - ' ', - '', - ucwords( - strtr( - $key, - [ - '-' => ' ', - '_' => ' ', - ] - ) - ) - ); - } -} diff --git a/lib/laminas/laminas-mail/src/Module.php b/lib/laminas/laminas-mail/src/Module.php deleted file mode 100644 index 652dfcb7c..000000000 --- a/lib/laminas/laminas-mail/src/Module.php +++ /dev/null @@ -1,19 +0,0 @@ - $provider->getDependencyConfig(), - ]; - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/AbstractProtocol.php b/lib/laminas/laminas-mail/src/Protocol/AbstractProtocol.php deleted file mode 100644 index 304dfe15e..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/AbstractProtocol.php +++ /dev/null @@ -1,344 +0,0 @@ -validHost = new Validator\ValidatorChain(); - $this->validHost->attach(new Validator\Hostname(Validator\Hostname::ALLOW_ALL)); - - if (! $this->validHost->isValid($host)) { - throw new Exception\RuntimeException(implode(', ', $this->validHost->getMessages())); - } - - $this->host = $host; - $this->port = $port; - } - - /** - * Class destructor to cleanup open resources - * - */ - public function __destruct() - { - $this->_disconnect(); - } - - /** - * Set the maximum log size - * - * @param int $maximumLog Maximum log size - */ - public function setMaximumLog($maximumLog) - { - $this->maximumLog = (int) $maximumLog; - } - - /** - * Get the maximum log size - * - * @return int the maximum log size - */ - public function getMaximumLog() - { - return $this->maximumLog; - } - - /** - * Create a connection to the remote host - * - * Concrete adapters for this class will implement their own unique connect - * scripts, using the _connect() method to create the socket resource. - */ - abstract public function connect(); - - /** - * Retrieve the last client request - * - * @return string - */ - public function getRequest() - { - return $this->request; - } - - /** - * Retrieve the last server response - * - * @return array - */ - public function getResponse() - { - return $this->response; - } - - /** - * Retrieve the transaction log - * - * @return string - */ - public function getLog() - { - return implode('', $this->log); - } - - /** - * Reset the transaction log - * - */ - public function resetLog() - { - $this->log = []; - } - - /** - * Add the transaction log - * - * @param string $value new transaction - */ - // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore - protected function _addLog($value) - { - if ($this->maximumLog >= 0 && count($this->log) >= $this->maximumLog) { - array_shift($this->log); - } - - $this->log[] = $value; - } - - /** - * Connect to the server using the supplied transport and target - * - * An example $remote string may be 'tcp://mail.example.com:25' or 'ssh://hostname.com:2222' - * - * @deprecated Since 1.12.0. Implementations should use the ProtocolTrait::setupSocket() method instead. - * @todo Remove for 3.0.0. - * @param string $remote Remote - * @throws Exception\RuntimeException - * @return bool - */ - // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore - protected function _connect($remote) - { - $errorNum = 0; - $errorStr = ''; - - // open connection - set_error_handler( - function ($error, $message = '') { - throw new Exception\RuntimeException(sprintf('Could not open socket: %s', $message), $error); - }, - E_WARNING - ); - $this->socket = stream_socket_client($remote, $errorNum, $errorStr, self::TIMEOUT_CONNECTION); - restore_error_handler(); - - if ($this->socket === false) { - if ($errorNum == 0) { - $errorStr = 'Could not open socket'; - } - throw new Exception\RuntimeException($errorStr); - } - - if (($result = stream_set_timeout($this->socket, self::TIMEOUT_CONNECTION)) === false) { - throw new Exception\RuntimeException('Could not set stream timeout'); - } - - return $result; - } - - /** - * Disconnect from remote host and free resource - * - */ - // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore - protected function _disconnect() - { - if (is_resource($this->socket)) { - fclose($this->socket); - } - } - - /** - * Send the given request followed by a LINEEND to the server. - * - * @param string $request - * @throws Exception\RuntimeException - * @return int|bool Number of bytes written to remote host - */ - // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore - protected function _send($request) - { - if (! is_resource($this->socket)) { - throw new Exception\RuntimeException('No connection has been established to ' . $this->host); - } - - $this->request = $request; - - $result = fwrite($this->socket, $request . self::EOL); - - // Save request to internal log - $this->_addLog($request . self::EOL); - - if ($result === false) { - throw new Exception\RuntimeException('Could not send request to ' . $this->host); - } - - return $result; - } - - /** - * Get a line from the stream. - * - * @param int $timeout Per-request timeout value if applicable - * @throws Exception\RuntimeException - * @return string - */ - // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore - protected function _receive($timeout = null) - { - if (! is_resource($this->socket)) { - throw new Exception\RuntimeException('No connection has been established to ' . $this->host); - } - - // Adapters may wish to supply per-commend timeouts according to appropriate RFC - if ($timeout !== null) { - stream_set_timeout($this->socket, $timeout); - } - - // Retrieve response - $response = fgets($this->socket, 1024); - - // Save request to internal log - $this->_addLog($response); - - // Check meta data to ensure connection is still valid - $info = stream_get_meta_data($this->socket); - - if ($info['timed_out']) { - throw new Exception\RuntimeException($this->host . ' has timed out'); - } - - if ($response === false) { - throw new Exception\RuntimeException('Could not read from ' . $this->host); - } - - return $response; - } - - /** - * Parse server response for successful codes - * - * Read the response from the stream and check for expected return code. - * Throws a Laminas\Mail\Protocol\Exception\ExceptionInterface if an unexpected code is returned. - * - * @param string|array $code One or more codes that indicate a successful response - * @param int $timeout Per-request timeout value if applicable - * @throws Exception\RuntimeException - * @return string Last line of response string - */ - // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore - protected function _expect($code, $timeout = null) - { - $this->response = []; - $errMsg = ''; - - if (! is_array($code)) { - $code = [$code]; - } - - do { - $this->response[] = $result = $this->_receive($timeout); - list($cmd, $more, $msg) = preg_split('/([\s-]+)/', $result, 2, PREG_SPLIT_DELIM_CAPTURE); - - if ($errMsg !== '') { - $errMsg .= ' ' . $msg; - } elseif ($cmd === null || ! in_array($cmd, $code)) { - $errMsg = $msg; - } - - // The '-' message prefix indicates an information string instead of a response string. - } while (strpos($more, '-') === 0); - - if ($errMsg !== '') { - throw new Exception\RuntimeException($errMsg); - } - - return $msg; - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/Exception/ExceptionInterface.php b/lib/laminas/laminas-mail/src/Protocol/Exception/ExceptionInterface.php deleted file mode 100644 index 05bfeee21..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/Exception/ExceptionInterface.php +++ /dev/null @@ -1,9 +0,0 @@ -setNoValidateCert($novalidatecert); - - if ($host) { - $this->connect($host, $port, $ssl); - } - } - - /** - * Public destructor - */ - public function __destruct() - { - $this->logout(); - } - - /** - * Open connection to IMAP server - * - * @param string $host hostname or IP address of IMAP server - * @param int|null $port of IMAP server, default is 143 (993 for ssl) - * @param string|bool $ssl use 'SSL', 'TLS' or false - * @throws Exception\RuntimeException - * @return void - */ - public function connect($host, $port = null, $ssl = false) - { - $transport = 'tcp'; - $isTls = false; - - if ($ssl) { - $ssl = strtolower($ssl); - } - - switch ($ssl) { - case 'ssl': - $transport = 'ssl'; - if (! $port) { - $port = 993; - } - break; - case 'tls': - $isTls = true; - // break intentionally omitted - default: - if (! $port) { - $port = 143; - } - } - - $this->socket = $this->setupSocket($transport, $host, $port, self::TIMEOUT_CONNECTION); - - if (! $this->assumedNextLine('* OK')) { - throw new Exception\RuntimeException('host doesn\'t allow connection'); - } - - if ($isTls) { - $result = $this->requestAndResponse('STARTTLS'); - $result = $result && stream_socket_enable_crypto($this->socket, true, $this->getCryptoMethod()); - if (! $result) { - throw new Exception\RuntimeException('cannot enable TLS'); - } - } - } - - /** - * get the next line from socket with error checking, but nothing else - * - * @throws Exception\RuntimeException - * @return string next line - */ - protected function nextLine() - { - $line = fgets($this->socket); - if ($line === false) { - throw new Exception\RuntimeException('cannot read - connection closed?'); - } - - return $line; - } - - /** - * get next line and assume it starts with $start. some requests give a simple - * feedback so we can quickly check if we can go on. - * - * @param string $start the first bytes we assume to be in the next line - * @return bool line starts with $start - */ - protected function assumedNextLine($start) - { - $line = $this->nextLine(); - return strpos($line, $start) === 0; - } - - /** - * get next line and split the tag. that's the normal case for a response line - * - * @param string $tag tag of line is returned by reference - * @return string next line - */ - protected function nextTaggedLine(&$tag) - { - $line = $this->nextLine(); - - // separate tag from line - list($tag, $line) = explode(' ', $line, 2); - - return $line; - } - - /** - * split a given line in tokens. a token is literal of any form or a list - * - * @param string $line line to decode - * @return array tokens, literals are returned as string, lists as array - */ - protected function decodeLine($line) - { - $tokens = []; - $stack = []; - - /* - We start to decode the response here. The understood tokens are: - literal - "literal" or also "lit\\er\"al" - {bytes}literal - (literals*) - All tokens are returned in an array. Literals in braces (the last understood - token in the list) are returned as an array of tokens. I.e. the following response: - "foo" baz {3}bar ("f\\\"oo" bar) - would be returned as: - array('foo', 'baz', 'bar', array('f\\\"oo', 'bar')); - - // TODO: add handling of '[' and ']' to parser for easier handling of response text - */ - // replace any trailing including spaces with a single space - $line = rtrim($line) . ' '; - while (($pos = strpos($line, ' ')) !== false) { - $token = substr($line, 0, $pos); - if (! strlen($token)) { - continue; - } - while ($token[0] == '(') { - array_push($stack, $tokens); - $tokens = []; - $token = substr($token, 1); - } - if ($token[0] == '"') { - if (preg_match('%^\(*"((.|\\\\|\\")*?)" *%', $line, $matches)) { - $tokens[] = $matches[1]; - $line = substr($line, strlen($matches[0])); - continue; - } - } - if ($token[0] == '{') { - $endPos = strpos($token, '}'); - $chars = substr($token, 1, $endPos - 1); - if (is_numeric($chars)) { - $token = ''; - while (strlen($token) < $chars) { - $token .= $this->nextLine(); - } - $line = ''; - if (strlen($token) > $chars) { - $line = substr($token, $chars); - $token = substr($token, 0, $chars); - } else { - $line .= $this->nextLine(); - } - $tokens[] = $token; - $line = trim($line) . ' '; - continue; - } - } - if ($stack && $token[strlen($token) - 1] == ')') { - // closing braces are not separated by spaces, so we need to count them - $braces = strlen($token); - $token = rtrim($token, ')'); - // only count braces if more than one - $braces -= strlen($token) + 1; - // only add if token had more than just closing braces - if (rtrim($token) != '') { - $tokens[] = rtrim($token); - } - $token = $tokens; - $tokens = array_pop($stack); - // special handline if more than one closing brace - while ($braces-- > 0) { - $tokens[] = $token; - $token = $tokens; - $tokens = array_pop($stack); - } - } - $tokens[] = $token; - $line = substr($line, $pos + 1); - } - - // maybe the server forgot to send some closing braces - while ($stack) { - $child = $tokens; - $tokens = array_pop($stack); - $tokens[] = $child; - } - - return $tokens; - } - - /** - * read a response "line" (could also be more than one real line if response has {..}) - * and do a simple decode - * - * @param array|string $tokens decoded tokens are returned by reference, if $dontParse - * is true the unparsed line is returned here - * @param string $wantedTag check for this tag for response code. Default '*' is - * continuation tag. - * @param bool $dontParse if true only the unparsed line is returned $tokens - * @return bool if returned tag matches wanted tag - */ - public function readLine(&$tokens = [], $wantedTag = '*', $dontParse = false) - { - $tag = null; // define $tag variable before first use - $line = $this->nextTaggedLine($tag); // get next tag - if (! $dontParse) { - $tokens = $this->decodeLine($line); - } else { - $tokens = $line; - } - - // if tag is wanted tag we might be at the end of a multiline response - return $tag == $wantedTag; - } - - /** - * read all lines of response until given tag is found (last line of response) - * - * @param string $tag the tag of your request - * @param bool $dontParse if true every line is returned unparsed instead of - * the decoded tokens - * @return null|bool|array tokens if success, false if error, null if bad request - */ - public function readResponse($tag, $dontParse = false) - { - $lines = []; - $tokens = null; // define $tokens variable before first use - while (! $this->readLine($tokens, $tag, $dontParse)) { - $lines[] = $tokens; - } - - if ($dontParse) { - // last to chars are still needed for response code - $tokens = [substr($tokens, 0, 2)]; - } - - // last line has response code - if ($tokens[0] == 'OK') { - return $lines ? $lines : true; - } elseif ($tokens[0] == 'NO') { - return false; - } - } - - /** - * send a request - * - * @param string $command your request command - * @param array $tokens additional parameters to command, use escapeString() to prepare - * @param string $tag provide a tag otherwise an autogenerated is returned - * @throws Exception\RuntimeException - */ - public function sendRequest($command, $tokens = [], &$tag = null) - { - if (! $tag) { - ++$this->tagCount; - $tag = 'TAG' . $this->tagCount; - } - - $line = $tag . ' ' . $command; - - foreach ($tokens as $token) { - if (is_array($token)) { - if (fwrite($this->socket, $line . ' ' . $token[0] . "\r\n") === false) { - throw new Exception\RuntimeException('cannot write - connection closed?'); - } - if (! $this->assumedNextLine('+ ')) { - throw new Exception\RuntimeException('cannot send literal string'); - } - $line = $token[1]; - } else { - $line .= ' ' . $token; - } - } - - if (fwrite($this->socket, $line . "\r\n") === false) { - throw new Exception\RuntimeException('cannot write - connection closed?'); - } - } - - /** - * send a request and get response at once - * - * @param string $command command as in sendRequest() - * @param array $tokens parameters as in sendRequest() - * @param bool $dontParse if true unparsed lines are returned instead of tokens - * @return mixed response as in readResponse() - */ - public function requestAndResponse($command, $tokens = [], $dontParse = false) - { - $tag = null; // define $tag variable before first use - $this->sendRequest($command, $tokens, $tag); - $response = $this->readResponse($tag, $dontParse); - - return $response; - } - - /** - * escape one or more literals i.e. for sendRequest - * - * @param string|array $string the literal/-s - * @return string|array escape literals, literals with newline ar returned - * as array('{size}', 'string'); - */ - public function escapeString($string) - { - if (func_num_args() < 2) { - if (strpos($string, "\n") !== false) { - return ['{' . strlen($string) . '}', $string]; - } - - return '"' . str_replace(['\\', '"'], ['\\\\', '\\"'], $string) . '"'; - } - - $result = []; - foreach (func_get_args() as $string) { - $result[] = $this->escapeString($string); - } - return $result; - } - - /** - * escape a list with literals or lists - * - * @param array $list list with literals or lists as PHP array - * @return string escaped list for imap - */ - public function escapeList($list) - { - $result = []; - foreach ($list as $v) { - if (! is_array($v)) { - $result[] = $v; - continue; - } - $result[] = $this->escapeList($v); - } - return '(' . implode(' ', $result) . ')'; - } - - /** - * Login to IMAP server. - * - * @param string $user username - * @param string $password password - * @return bool success - */ - public function login($user, $password) - { - return $this->requestAndResponse('LOGIN', $this->escapeString($user, $password), true); - } - - /** - * logout of imap server - * - * @return bool success - */ - public function logout() - { - $result = false; - if ($this->socket) { - try { - $result = $this->requestAndResponse('LOGOUT', [], true); - } catch (Exception\ExceptionInterface $e) { - // ignoring exception - } - fclose($this->socket); - $this->socket = null; - } - return $result; - } - - /** - * Get capabilities from IMAP server - * - * @return array list of capabilities - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function capability() - { - $response = $this->requestAndResponse('CAPABILITY'); - - if (! $response) { - return []; - } - - $capabilities = []; - foreach ($response as $line) { - $capabilities = array_merge($capabilities, $line); - } - return $capabilities; - } - - /** - * Examine and select have the same response. The common code for both - * is in this method - * - * @param string $command can be 'EXAMINE' or 'SELECT' and this is used as command - * @param string $box which folder to change to or examine - * @return bool|array false if error, array with returned information - * otherwise (flags, exists, recent, uidvalidity) - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function examineOrSelect($command = 'EXAMINE', $box = 'INBOX') - { - $tag = null; // define $tag variable before first use - $this->sendRequest($command, [$this->escapeString($box)], $tag); - - $result = []; - $tokens = null; // define $tokens variable before first use - while (! $this->readLine($tokens, $tag)) { - if ($tokens[0] == 'FLAGS') { - array_shift($tokens); - $result['flags'] = $tokens; - continue; - } - switch ($tokens[1]) { - case 'EXISTS': - case 'RECENT': - $result[strtolower($tokens[1])] = $tokens[0]; - break; - case '[UIDVALIDITY': - $result['uidvalidity'] = (int) $tokens[2]; - break; - default: - // ignore - } - } - - if ($tokens[0] != 'OK') { - return false; - } - return $result; - } - - /** - * change folder - * - * @param string $box change to this folder - * @return bool|array see examineOrselect() - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function select($box = 'INBOX') - { - return $this->examineOrSelect('SELECT', $box); - } - - /** - * examine folder - * - * @param string $box examine this folder - * @return bool|array see examineOrselect() - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function examine($box = 'INBOX') - { - return $this->examineOrSelect('EXAMINE', $box); - } - - /** - * fetch one or more items of one or more messages - * - * @param string|array $items items to fetch from message(s) as string (if only one item) - * or array of strings - * @param int|array $from message for items or start message if $to !== null - * @param int|null $to if null only one message ($from) is fetched, else it's the - * last message, INF means last message available - * @param bool $uid set to true if passing a unique id - * @throws Exception\RuntimeException - * @return string|array if only one item of one message is fetched it's returned as string - * if items of one message are fetched it's returned as (name => value) - * if one items of messages are fetched it's returned as (msgno => value) - * if items of messages are fetched it's returned as (msgno => (name => value)) - */ - public function fetch($items, $from, $to = null, $uid = false) - { - if (is_array($from)) { - $set = implode(',', $from); - } elseif ($to === null) { - $set = (int) $from; - } elseif ($to === INF) { - $set = (int) $from . ':*'; - } else { - $set = (int) $from . ':' . (int) $to; - } - - $items = (array) $items; - $itemList = $this->escapeList($items); - - $tag = null; // define $tag variable before first use - $this->sendRequest(($uid ? 'UID ' : '') . 'FETCH', [$set, $itemList], $tag); - - $result = []; - $tokens = null; // define $tokens variable before first use - while (! $this->readLine($tokens, $tag)) { - // ignore other responses - if ($tokens[1] != 'FETCH') { - continue; - } - - // find array key of UID value; try the last elements, or search for it - if ($uid) { - $count = count($tokens[2]); - if ($tokens[2][$count - 2] == 'UID') { - $uidKey = $count - 1; - } else { - $uidKey = array_search('UID', $tokens[2]) + 1; - } - } - - // ignore other messages - if ($to === null && ! is_array($from) && ($uid ? $tokens[2][$uidKey] != $from : $tokens[0] != $from)) { - continue; - } - - // if we only want one item we return that one directly - if (count($items) == 1) { - if ($tokens[2][0] == $items[0]) { - $data = $tokens[2][1]; - } elseif ($uid && $tokens[2][2] == $items[0]) { - $data = $tokens[2][3]; - } else { - // maybe the server send an other field we didn't wanted - $count = count($tokens[2]); - // we start with 2, because 0 was already checked - for ($i = 2; $i < $count; $i += 2) { - if ($tokens[2][$i] != $items[0]) { - continue; - } - $data = $tokens[2][$i + 1]; - break; - } - } - } else { - $data = []; - while (key($tokens[2]) !== null) { - $data[current($tokens[2])] = next($tokens[2]); - next($tokens[2]); - } - } - - // if we want only one message we can ignore everything else and just return - if ($to === null && ! is_array($from) && ($uid ? $tokens[2][$uidKey] == $from : $tokens[0] == $from)) { - // we still need to read all lines - while (! $this->readLine($tokens, $tag)) { - } - return $data; - } - $result[$tokens[0]] = $data; - } - - if ($to === null && ! is_array($from)) { - throw new Exception\RuntimeException('the single id was not found in response'); - } - - return $result; - } - - /** - * get mailbox list - * - * this method can't be named after the IMAP command 'LIST', as list is a reserved keyword - * - * @param string $reference mailbox reference for list - * @param string $mailbox mailbox name match with wildcards - * @return array mailboxes that matched $mailbox as array(globalName => array('delim' => .., 'flags' => ..)) - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function listMailbox($reference = '', $mailbox = '*') - { - $result = []; - $list = $this->requestAndResponse('LIST', $this->escapeString($reference, $mailbox)); - if (! $list || $list === true) { - return $result; - } - - foreach ($list as $item) { - if (count($item) != 4 || $item[0] != 'LIST') { - continue; - } - $result[$item[3]] = ['delim' => $item[2], 'flags' => $item[1]]; - } - - return $result; - } - - /** - * set flags - * - * @param array $flags flags to set, add or remove - see $mode - * @param int $from message for items or start message if $to !== null - * @param int|null $to if null only one message ($from) is fetched, else it's the - * last message, INF means last message available - * @param string|null $mode '+' to add flags, '-' to remove flags, everything else sets the flags as given - * @param bool $silent if false the return values are the new flags for the wanted messages - * @return bool|array new flags if $silent is false, else true or false depending on success - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function store(array $flags, $from, $to = null, $mode = null, $silent = true) - { - $item = 'FLAGS'; - if ($mode == '+' || $mode == '-') { - $item = $mode . $item; - } - if ($silent) { - $item .= '.SILENT'; - } - - $flags = $this->escapeList($flags); - $set = (int) $from; - if ($to !== null) { - $set .= ':' . ($to == INF ? '*' : (int) $to); - } - - $result = $this->requestAndResponse('STORE', [$set, $item, $flags], $silent); - - if ($silent) { - return (bool) $result; - } - - $tokens = $result; - $result = []; - foreach ($tokens as $token) { - if ($token[1] != 'FETCH' || $token[2][0] != 'FLAGS') { - continue; - } - $result[$token[0]] = $token[2][1]; - } - - return $result; - } - - /** - * append a new message to given folder - * - * @param string $folder name of target folder - * @param string $message full message content - * @param array $flags flags for new message - * @param string $date date for new message - * @return bool success - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function append($folder, $message, $flags = null, $date = null) - { - $tokens = []; - $tokens[] = $this->escapeString($folder); - if ($flags !== null) { - $tokens[] = $this->escapeList($flags); - } - if ($date !== null) { - $tokens[] = $this->escapeString($date); - } - $tokens[] = $this->escapeString($message); - - return $this->requestAndResponse('APPEND', $tokens, true); - } - - /** - * copy message set from current folder to other folder - * - * @param string $folder destination folder - * @param $from - * @param int|null $to if null only one message ($from) is fetched, else it's the - * last message, INF means last message available - * @return bool success - */ - public function copy($folder, $from, $to = null) - { - $set = (int) $from; - if ($to !== null) { - $set .= ':' . ($to == INF ? '*' : (int) $to); - } - - return $this->requestAndResponse('COPY', [$set, $this->escapeString($folder)], true); - } - - /** - * create a new folder (and parent folders if needed) - * - * @param string $folder folder name - * @return bool success - */ - public function create($folder) - { - return $this->requestAndResponse('CREATE', [$this->escapeString($folder)], true); - } - - /** - * rename an existing folder - * - * @param string $old old name - * @param string $new new name - * @return bool success - */ - public function rename($old, $new) - { - return $this->requestAndResponse('RENAME', $this->escapeString($old, $new), true); - } - - /** - * remove a folder - * - * @param string $folder folder name - * @return bool success - */ - public function delete($folder) - { - return $this->requestAndResponse('DELETE', [$this->escapeString($folder)], true); - } - - /** - * subscribe to a folder - * - * @param string $folder folder name - * @return bool success - */ - public function subscribe($folder) - { - return $this->requestAndResponse('SUBSCRIBE', [$this->escapeString($folder)], true); - } - - /** - * permanently remove messages - * - * @return bool success - */ - public function expunge() - { - // TODO: parse response? - return $this->requestAndResponse('EXPUNGE'); - } - - /** - * send noop - * - * @return bool success - */ - public function noop() - { - // TODO: parse response - return $this->requestAndResponse('NOOP'); - } - - /** - * do a search request - * - * This method is currently marked as internal as the API might change and is not - * safe if you don't take precautions. - * - * @param array $params - * @return array message ids - */ - public function search(array $params) - { - $response = $this->requestAndResponse('SEARCH', $params); - if (! $response) { - return $response; - } - - foreach ($response as $ids) { - if ($ids[0] == 'SEARCH') { - array_shift($ids); - return $ids; - } - } - return []; - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/Pop3.php b/lib/laminas/laminas-mail/src/Protocol/Pop3.php deleted file mode 100644 index 8675491a2..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/Pop3.php +++ /dev/null @@ -1,389 +0,0 @@ -setNoValidateCert($novalidatecert); - - if ($host) { - $this->connect($host, $port, $ssl); - } - } - - /** - * Public destructor - */ - public function __destruct() - { - $this->logout(); - } - - /** - * Open connection to POP3 server - * - * @param string $host hostname or IP address of POP3 server - * @param int|null $port of POP3 server, default is 110 (995 for ssl) - * @param string|bool $ssl use 'SSL', 'TLS' or false - * @throws Exception\RuntimeException - * @return string welcome message - */ - public function connect($host, $port = null, $ssl = false) - { - $transport = 'tcp'; - $isTls = false; - - if ($ssl) { - $ssl = strtolower($ssl); - } - - switch ($ssl) { - case 'ssl': - $transport = 'ssl'; - if (! $port) { - $port = 995; - } - break; - case 'tls': - $isTls = true; - // break intentionally omitted - default: - if (! $port) { - $port = 110; - } - } - - $this->socket = $this->setupSocket($transport, $host, $port, self::TIMEOUT_CONNECTION); - - $welcome = $this->readResponse(); - - strtok($welcome, '<'); - $this->timestamp = strtok('>'); - if (! strpos($this->timestamp, '@')) { - $this->timestamp = null; - } else { - $this->timestamp = '<' . $this->timestamp . '>'; - } - - if ($isTls) { - $this->request('STLS'); - $result = stream_socket_enable_crypto($this->socket, true, $this->getCryptoMethod()); - if (! $result) { - throw new Exception\RuntimeException('cannot enable TLS'); - } - } - - return $welcome; - } - - /** - * Send a request - * - * @param string $request your request without newline - * @throws Exception\RuntimeException - */ - public function sendRequest($request) - { - ErrorHandler::start(); - $result = fwrite($this->socket, $request . "\r\n"); - $error = ErrorHandler::stop(); - if (! $result) { - throw new Exception\RuntimeException('send failed - connection closed?', 0, $error); - } - } - - /** - * read a response - * - * @param bool $multiline response has multiple lines and should be read until "." - * @throws Exception\RuntimeException - * @return string response - */ - public function readResponse($multiline = false) - { - ErrorHandler::start(); - $result = fgets($this->socket); - $error = ErrorHandler::stop(); - if (! is_string($result)) { - throw new Exception\RuntimeException('read failed - connection closed?', 0, $error); - } - - $result = trim($result); - if (strpos($result, ' ')) { - list($status, $message) = explode(' ', $result, 2); - } else { - $status = $result; - $message = ''; - } - - if ($status != '+OK') { - throw new Exception\RuntimeException('last request failed'); - } - - if ($multiline) { - $message = ''; - $line = fgets($this->socket); - while ($line && rtrim($line, "\r\n") != '.') { - if ($line[0] == '.') { - $line = substr($line, 1); - } - $message .= $line; - $line = fgets($this->socket); - } - } - - return $message; - } - - /** - * Send request and get response - * - * @see sendRequest() - * @see readResponse() - * @param string $request request - * @param bool $multiline multiline response? - * @return string result from readResponse() - */ - public function request($request, $multiline = false) - { - $this->sendRequest($request); - return $this->readResponse($multiline); - } - - /** - * End communication with POP3 server (also closes socket) - */ - public function logout() - { - if ($this->socket) { - try { - $this->request('QUIT'); - } catch (Exception\ExceptionInterface $e) { - // ignore error - we're closing the socket anyway - } - - fclose($this->socket); - $this->socket = null; - } - } - - /** - * Get capabilities from POP3 server - * - * @return array list of capabilities - */ - public function capa() - { - $result = $this->request('CAPA', true); - return explode("\n", $result); - } - - /** - * Login to POP3 server. Can use APOP - * - * @param string $user username - * @param string $password password - * @param bool $tryApop should APOP be tried? - */ - public function login($user, $password, $tryApop = true) - { - if ($tryApop && $this->timestamp) { - try { - $this->request("APOP $user " . md5($this->timestamp . $password)); - return; - } catch (Exception\ExceptionInterface $e) { - // ignore - } - } - - $this->request("USER $user"); - $this->request("PASS $password"); - } - - /** - * Make STAT call for message count and size sum - * - * @param int $messages out parameter with count of messages - * @param int $octets out parameter with size in octets of messages - */ - public function status(&$messages, &$octets) - { - $messages = 0; - $octets = 0; - $result = $this->request('STAT'); - - list($messages, $octets) = explode(' ', $result); - } - - /** - * Make LIST call for size of message(s) - * - * @param int|null $msgno number of message, null for all - * @return int|array size of given message or list with array(num => size) - */ - public function getList($msgno = null) - { - if ($msgno !== null) { - $result = $this->request("LIST $msgno"); - - list(, $result) = explode(' ', $result); - return (int) $result; - } - - $result = $this->request('LIST', true); - $messages = []; - $line = strtok($result, "\n"); - while ($line) { - list($no, $size) = explode(' ', trim($line)); - $messages[(int) $no] = (int) $size; - $line = strtok("\n"); - } - - return $messages; - } - - /** - * Make UIDL call for getting a uniqueid - * - * @param int|null $msgno number of message, null for all - * @return string|array uniqueid of message or list with array(num => uniqueid) - */ - public function uniqueid($msgno = null) - { - if ($msgno !== null) { - $result = $this->request("UIDL $msgno"); - - list(, $result) = explode(' ', $result); - return $result; - } - - $result = $this->request('UIDL', true); - - $result = explode("\n", $result); - $messages = []; - foreach ($result as $line) { - if (! $line) { - continue; - } - list($no, $id) = explode(' ', trim($line), 2); - $messages[(int) $no] = $id; - } - - return $messages; - } - - /** - * Make TOP call for getting headers and maybe some body lines - * This method also sets hasTop - before it it's not known if top is supported - * - * The fallback makes normal RETR call, which retrieves the whole message. Additional - * lines are not removed. - * - * @param int $msgno number of message - * @param int $lines number of wanted body lines (empty line is inserted after header lines) - * @param bool $fallback fallback with full retrieve if top is not supported - * @throws Exception\RuntimeException - * @throws Exception\ExceptionInterface - * @return string message headers with wanted body lines - */ - public function top($msgno, $lines = 0, $fallback = false) - { - if ($this->hasTop === false) { - if ($fallback) { - return $this->retrieve($msgno); - } - - throw new Exception\RuntimeException('top not supported and no fallback wanted'); - } - $this->hasTop = true; - - $lines = (! $lines || $lines < 1) ? 0 : (int) $lines; - - try { - $result = $this->request("TOP $msgno $lines", true); - } catch (Exception\ExceptionInterface $e) { - $this->hasTop = false; - if ($fallback) { - $result = $this->retrieve($msgno); - } else { - throw $e; - } - } - - return $result; - } - - /** - * Make a RETR call for retrieving a full message with headers and body - * - * @param int $msgno message number - * @return string message - */ - public function retrieve($msgno) - { - $result = $this->request("RETR $msgno", true); - return $result; - } - - /** - * Make a NOOP call, maybe needed for keeping the server happy - */ - public function noop() - { - $this->request('NOOP'); - } - - /** - * Make a DELE count to remove a message - * - * @param $msgno - */ - public function delete($msgno) - { - $this->request("DELE $msgno"); - } - - /** - * Make RSET call, which rollbacks delete requests - */ - public function undelete() - { - $this->request('RSET'); - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/ProtocolTrait.php b/lib/laminas/laminas-mail/src/Protocol/ProtocolTrait.php deleted file mode 100644 index a562a9e91..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/ProtocolTrait.php +++ /dev/null @@ -1,112 +0,0 @@ -novalidatecert = $novalidatecert; - return $this; - } - - /** - * Should we validate SSL certificate? - * - * @return bool - */ - public function validateCert(): bool - { - return ! $this->novalidatecert; - } - - /** - * Prepare socket options - * - * @return array - */ - private function prepareSocketOptions(): array - { - return $this->novalidatecert - ? [ - 'ssl' => [ - 'verify_peer_name' => false, - 'verify_peer' => false, - ], - ] - : []; - } - - /** - * Setup connection socket - * - * @param string $host hostname or IP address of IMAP server - * @param int|null $port of IMAP server, default is 143 (993 for ssl) - * @param int $timeout timeout in seconds for initiating session - * @return resource The socket created. - * @throws Exception\RuntimeException If unable to connect to host. - */ - protected function setupSocket( - string $transport, - string $host, - ?int $port, - int $timeout - ) { - ErrorHandler::start(); - $socket = stream_socket_client( - sprintf('%s://%s:%d', $transport, $host, $port), - $errno, - $errstr, - $timeout, - STREAM_CLIENT_CONNECT, - stream_context_create($this->prepareSocketOptions()) - ); - $error = ErrorHandler::stop(); - - if (! $socket) { - throw new Exception\RuntimeException(sprintf( - 'cannot connect to host%s', - $error ? sprintf('; error = %s (errno = %d )', $error->getMessage(), $error->getCode()) : '' - ), 0, $error); - } - - if (false === stream_set_timeout($socket, $timeout)) { - throw new Exception\RuntimeException('Could not set stream timeout'); - } - - return $socket; - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/Smtp.php b/lib/laminas/laminas-mail/src/Protocol/Smtp.php deleted file mode 100644 index 0bbe3ee45..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/Smtp.php +++ /dev/null @@ -1,514 +0,0 @@ -secure = 'tls'; - break; - - case 'ssl': - $this->transport = 'ssl'; - $this->secure = 'ssl'; - if ($port === null) { - $port = 465; - } - break; - - case '': - // fall-through - case 'none': - break; - - default: - throw new Exception\InvalidArgumentException($config['ssl'] . ' is unsupported SSL type'); - } - } - - if (array_key_exists('use_complete_quit', $config)) { - $this->setUseCompleteQuit($config['use_complete_quit']); - } - - // If no port has been specified then check the master PHP ini file. Defaults to 25 if the ini setting is null. - if ($port === null) { - if (($port = ini_get('smtp_port')) == '') { - $port = 25; - } - } - - if (array_key_exists('novalidatecert', $config)) { - $this->setNoValidateCert($config['novalidatecert']); - } - - parent::__construct($host, $port); - } - - /** - * Set whether or not send QUIT command - * - * @param bool $useCompleteQuit use complete quit - * @return bool - */ - public function setUseCompleteQuit($useCompleteQuit) - { - return $this->useCompleteQuit = (bool) $useCompleteQuit; - } - - /** - * Read $data as lines terminated by "\n" - * - * @param string $data - * @param int $chunkSize - * @return Generator|string[] - * @author Elan Ruusamäe - */ - private static function chunkedReader(string $data, int $chunkSize = 4096): Generator - { - if (($fp = fopen("php://temp", "r+")) === false) { - throw new Exception\RuntimeException('cannot fopen'); - } - if (fwrite($fp, $data) === false) { - throw new Exception\RuntimeException('cannot fwrite'); - } - rewind($fp); - - $line = null; - while (($buffer = fgets($fp, $chunkSize)) !== false) { - $line .= $buffer; - - // This is optimization to avoid calling length() in a loop. - // We need to match a condition that is when: - // 1. maximum was read from fgets, which is $chunkSize-1 - // 2. last byte of the buffer is not \n - // - // to access last byte of buffer, we can do - // - $buffer[strlen($buffer)-1] - // and when maximum is read from fgets, then: - // - strlen($buffer) === $chunkSize-1 - // - strlen($buffer)-1 === $chunkSize-2 - // which means this is also true: - // - $buffer[strlen($buffer)-1] === $buffer[$chunkSize-2] - // - // the null coalesce works, as string offset can never be null - $lastByte = $buffer[$chunkSize - 2] ?? null; - - // partial read, continue loop to read again to complete the line - // compare \n first as that's usually false - if ($lastByte !== "\n" && $lastByte !== null) { - continue; - } - - yield $line; - $line = null; - } - - if ($line !== null) { - yield $line; - } - - fclose($fp); - } - - /** - * Whether or not send QUIT command - * - * @return bool - */ - public function useCompleteQuit() - { - return $this->useCompleteQuit; - } - - /** - * Connect to the server with the parameters given in the constructor. - * - * @return bool - */ - public function connect() - { - $this->socket = $this->setupSocket( - $this->transport, - $this->host, - $this->port, - self::TIMEOUT_CONNECTION - ); - return true; - } - - /** - * Initiate HELO/EHLO sequence and set flag to indicate valid smtp session - * - * @param string $host The client hostname or IP address (default: 127.0.0.1) - * @throws Exception\RuntimeException - */ - public function helo($host = '127.0.0.1') - { - // Respect RFC 2821 and disallow HELO attempts if session is already initiated. - if ($this->sess === true) { - throw new Exception\RuntimeException('Cannot issue HELO to existing session'); - } - - // Validate client hostname - if (! $this->validHost->isValid($host)) { - throw new Exception\RuntimeException(implode(', ', $this->validHost->getMessages())); - } - - // Initiate helo sequence - $this->_expect(220, 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - $this->ehlo($host); - - // If a TLS session is required, commence negotiation - if ($this->secure == 'tls') { - $this->_send('STARTTLS'); - $this->_expect(220, 180); - if (! stream_socket_enable_crypto($this->socket, true, $this->getCryptoMethod())) { - throw new Exception\RuntimeException('Unable to connect via TLS'); - } - $this->ehlo($host); - } - - $this->startSession(); - $this->auth(); - } - - /** - * Returns the perceived session status - * - * @return bool - */ - public function hasSession() - { - return $this->sess; - } - - /** - * Send EHLO or HELO depending on capabilities of smtp host - * - * @param string $host The client hostname or IP address (default: 127.0.0.1) - * @throws \Exception|Exception\ExceptionInterface - */ - protected function ehlo($host) - { - // Support for older, less-compliant remote servers. Tries multiple attempts of EHLO or HELO. - try { - $this->_send('EHLO ' . $host); - $this->_expect(250, 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - } catch (Exception\ExceptionInterface $e) { - $this->_send('HELO ' . $host); - $this->_expect(250, 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - } - } - - /** - * Issues MAIL command - * - * @param string $from Sender mailbox - * @throws Exception\RuntimeException - */ - public function mail($from) - { - if ($this->sess !== true) { - throw new Exception\RuntimeException('A valid session has not been started'); - } - - $this->_send('MAIL FROM:<' . $from . '>'); - $this->_expect(250, 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - - // Set mail to true, clear recipients and any existing data flags as per 4.1.1.2 of RFC 2821 - $this->mail = true; - $this->rcpt = false; - $this->data = false; - } - - /** - * Issues RCPT command - * - * @param string $to Receiver(s) mailbox - * @throws Exception\RuntimeException - */ - public function rcpt($to) - { - if ($this->mail !== true) { - throw new Exception\RuntimeException('No sender reverse path has been supplied'); - } - - // Set rcpt to true, as per 4.1.1.3 of RFC 2821 - $this->_send('RCPT TO:<' . $to . '>'); - $this->_expect([250, 251], 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - $this->rcpt = true; - } - - /** - * Issues DATA command - * - * @param string $data - * @throws Exception\RuntimeException - */ - public function data($data) - { - // Ensure recipients have been set - if ($this->rcpt !== true) { // Per RFC 2821 3.3 (page 18) - throw new Exception\RuntimeException('No recipient forward path has been supplied'); - } - - $this->_send('DATA'); - $this->_expect(354, 120); // Timeout set for 2 minutes as per RFC 2821 4.5.3.2 - - $reader = self::chunkedReader($data); - foreach ($reader as $line) { - $line = rtrim($line, "\r\n"); - if (isset($line[0]) && $line[0] === '.') { - // Escape lines prefixed with a '.' - $line = '.' . $line; - } - - if (strlen($line) > self::SMTP_LINE_LIMIT) { - // Long lines are "folded" by inserting "" - // https://tools.ietf.org/html/rfc5322#section-2.2.3 - // Add "-1" to stay within limits, - // because Headers::FOLDING includes a byte for space character after \r\n - $chunks = chunk_split($line, self::SMTP_LINE_LIMIT - 1, Headers::FOLDING); - $line = substr($chunks, 0, -strlen(Headers::FOLDING)); - } - - $this->_send($line); - } - - $this->_send('.'); - $this->_expect(250, 600); // Timeout set for 10 minutes as per RFC 2821 4.5.3.2 - $this->data = true; - } - - /** - * Issues the RSET command end validates answer - * - * Can be used to restore a clean smtp communication state when a - * transaction has been cancelled or commencing a new transaction. - */ - public function rset() - { - $this->_send('RSET'); - // MS ESMTP doesn't follow RFC, see https://zendframework.com/issues/browse/ZF-1377 - $this->_expect([250, 220]); - - $this->mail = false; - $this->rcpt = false; - $this->data = false; - } - - /** - * Issues the NOOP command end validates answer - * - * Not used by Laminas\Mail, could be used to keep a connection alive or check if it is still open. - * - */ - public function noop() - { - $this->_send('NOOP'); - $this->_expect(250, 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - } - - /** - * Issues the VRFY command end validates answer - * - * Not used by Laminas\Mail. - * - * @param string $user User Name or eMail to verify - */ - public function vrfy($user) - { - $this->_send('VRFY ' . $user); - $this->_expect([250, 251, 252], 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - } - - /** - * Issues the QUIT command and clears the current session - * - */ - public function quit() - { - if ($this->sess) { - $this->auth = false; - - if ($this->useCompleteQuit()) { - $this->_send('QUIT'); - $this->_expect(221, 300); // Timeout set for 5 minutes as per RFC 2821 4.5.3.2 - } - - $this->stopSession(); - } - } - - /** - * Default authentication method - * - * This default method is implemented by AUTH adapters to properly authenticate to a remote host. - * - * @throws Exception\RuntimeException - */ - public function auth() - { - if ($this->auth === true) { - throw new Exception\RuntimeException('Already authenticated for this session'); - } - } - - /** - * Closes connection - * - */ - public function disconnect() - { - $this->_disconnect(); - } - - /** - * Disconnect from remote host and free resource - */ - // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore - protected function _disconnect() - { - - // Make sure the session gets closed - $this->quit(); - parent::_disconnect(); - } - - /** - * Start mail session - * - */ - protected function startSession() - { - $this->sess = true; - } - - /** - * Stop mail session - * - */ - protected function stopSession() - { - $this->sess = false; - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Crammd5.php b/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Crammd5.php deleted file mode 100644 index e5e2c7b32..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Crammd5.php +++ /dev/null @@ -1,132 +0,0 @@ -setUsername($config['username']); - } - if (isset($config['password'])) { - $this->setPassword($config['password']); - } - } - - // Call parent with original arguments - parent::__construct($host, $port, $origConfig); - } - - /** - * Performs CRAM-MD5 authentication with supplied credentials - */ - public function auth() - { - // Ensure AUTH has not already been initiated. - parent::auth(); - - $this->_send('AUTH CRAM-MD5'); - $challenge = $this->_expect(334); - $challenge = base64_decode($challenge); - $digest = $this->hmacMd5($this->getPassword(), $challenge); - $this->_send(base64_encode($this->getUsername() . ' ' . $digest)); - $this->_expect(235); - $this->auth = true; - } - - /** - * Set value for username - * - * @param string $username - * @return Crammd5 - */ - public function setUsername($username) - { - $this->username = $username; - return $this; - } - - /** - * Get username - * - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Set value for password - * - * @param string $password - * @return Crammd5 - */ - public function setPassword($password) - { - $this->password = $password; - return $this; - } - - /** - * Get password - * - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Prepare CRAM-MD5 response to server's ticket - * - * @param string $key Challenge key (usually password) - * @param string $data Challenge data - * @param int $block Length of blocks (deprecated; unused) - * @return string - */ - protected function hmacMd5($key, $data, $block = 64) - { - return Hmac::compute($key, 'md5', $data); - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Login.php b/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Login.php deleted file mode 100644 index 66225d4a5..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Login.php +++ /dev/null @@ -1,120 +0,0 @@ -setUsername($config['username']); - } - if (isset($config['password'])) { - $this->setPassword($config['password']); - } - } - - // Call parent with original arguments - parent::__construct($host, $port, $origConfig); - } - - /** - * Perform LOGIN authentication with supplied credentials - * - */ - public function auth() - { - // Ensure AUTH has not already been initiated. - parent::auth(); - - $this->_send('AUTH LOGIN'); - $this->_expect(334); - $this->_send(base64_encode($this->getUsername())); - $this->_expect(334); - $this->_send(base64_encode($this->getPassword())); - $this->_expect(235); - $this->auth = true; - } - - /** - * Set value for username - * - * @param string $username - * @return Login - */ - public function setUsername($username) - { - $this->username = $username; - return $this; - } - - /** - * Get username - * - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Set value for password - * - * @param string $password - * @return Login - */ - public function setPassword($password) - { - $this->password = $password; - return $this; - } - - /** - * Get password - * - * @return string - */ - public function getPassword() - { - return $this->password; - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Plain.php b/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Plain.php deleted file mode 100644 index 0bd3c8a65..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/Smtp/Auth/Plain.php +++ /dev/null @@ -1,118 +0,0 @@ -setUsername($config['username']); - } - if (isset($config['password'])) { - $this->setPassword($config['password']); - } - } - - // Call parent with original arguments - parent::__construct($host, $port, $origConfig); - } - - /** - * Perform PLAIN authentication with supplied credentials - * - */ - public function auth() - { - // Ensure AUTH has not already been initiated. - parent::auth(); - - $this->_send('AUTH PLAIN'); - $this->_expect(334); - $this->_send(base64_encode("\0" . $this->getUsername() . "\0" . $this->getPassword())); - $this->_expect(235); - $this->auth = true; - } - - /** - * Set value for username - * - * @param string $username - * @return Plain - */ - public function setUsername($username) - { - $this->username = $username; - return $this; - } - - /** - * Get username - * - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Set value for password - * - * @param string $password - * @return Plain - */ - public function setPassword($password) - { - $this->password = $password; - return $this; - } - - /** - * Get password - * - * @return string - */ - public function getPassword() - { - return $this->password; - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/SmtpPluginManager.php b/lib/laminas/laminas-mail/src/Protocol/SmtpPluginManager.php deleted file mode 100644 index 91c35dfa7..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/SmtpPluginManager.php +++ /dev/null @@ -1,108 +0,0 @@ - Smtp\Auth\Crammd5::class, - 'cramMd5' => Smtp\Auth\Crammd5::class, - 'CramMd5' => Smtp\Auth\Crammd5::class, - 'cramMD5' => Smtp\Auth\Crammd5::class, - 'CramMD5' => Smtp\Auth\Crammd5::class, - 'login' => Smtp\Auth\Login::class, - 'Login' => Smtp\Auth\Login::class, - 'plain' => Smtp\Auth\Plain::class, - 'Plain' => Smtp\Auth\Plain::class, - 'smtp' => Smtp::class, - 'Smtp' => Smtp::class, - 'SMTP' => Smtp::class, - - // Legacy Zend Framework aliases - \Zend\Mail\Protocol\Smtp\Auth\Crammd5::class => Smtp\Auth\Crammd5::class, - \Zend\Mail\Protocol\Smtp\Auth\Login::class => Smtp\Auth\Login::class, - \Zend\Mail\Protocol\Smtp\Auth\Plain::class => Smtp\Auth\Plain::class, - \Zend\Mail\Protocol\Smtp::class => Smtp::class, - - // v2 normalized FQCNs - 'zendmailprotocolsmtpauthcrammd5' => Smtp\Auth\Crammd5::class, - 'zendmailprotocolsmtpauthlogin' => Smtp\Auth\Login::class, - 'zendmailprotocolsmtpauthplain' => Smtp\Auth\Plain::class, - 'zendmailprotocolsmtp' => Smtp::class, - ]; - - /** - * Service factories - * - * @var array - */ - protected $factories = [ - Smtp\Auth\Crammd5::class => InvokableFactory::class, - Smtp\Auth\Login::class => InvokableFactory::class, - Smtp\Auth\Plain::class => InvokableFactory::class, - Smtp::class => InvokableFactory::class, - - // v2 normalized service names - - 'laminasmailprotocolsmtpauthcrammd5' => InvokableFactory::class, - 'laminasmailprotocolsmtpauthlogin' => InvokableFactory::class, - 'laminasmailprotocolsmtpauthplain' => InvokableFactory::class, - 'laminasmailprotocolsmtp' => InvokableFactory::class, - ]; - - /** - * Plugins must be an instance of the Smtp class - * - * @var string - */ - protected $instanceOf = Smtp::class; - - /** - * Validate a retrieved plugin instance (v3). - * - * @param object|array $instance - * @throws InvalidServiceException - */ - public function validate($instance) - { - if (! $instance instanceof $this->instanceOf) { - throw new InvalidServiceException(sprintf( - 'Plugin of type %s is invalid; must extend %s', - (is_object($instance) ? get_class($instance) : gettype($instance)), - $this->instanceOf - )); - } - } - - /** - * Validate a retrieved plugin instance (v2). - * - * @param object $plugin - * @throws Exception\InvalidArgumentException - */ - public function validatePlugin($plugin) - { - try { - $this->validate($plugin); - } catch (InvalidServiceException $e) { - throw new Exception\InvalidArgumentException( - $e->getMessage(), - $e->getCode(), - $e - ); - } - } -} diff --git a/lib/laminas/laminas-mail/src/Protocol/SmtpPluginManagerFactory.php b/lib/laminas/laminas-mail/src/Protocol/SmtpPluginManagerFactory.php deleted file mode 100644 index 0b0555fce..000000000 --- a/lib/laminas/laminas-mail/src/Protocol/SmtpPluginManagerFactory.php +++ /dev/null @@ -1,48 +0,0 @@ -creationOptions); - } - - /** - * laminas-servicemanager v2 support for invocation options. - * - * @param array $options - * @return void - */ - public function setCreationOptions(array $options) - { - $this->creationOptions = $options; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage.php b/lib/laminas/laminas-mail/src/Storage.php deleted file mode 100644 index c4f8d9fe3..000000000 --- a/lib/laminas/laminas-mail/src/Storage.php +++ /dev/null @@ -1,17 +0,0 @@ - true, - 'delete' => false, - 'create' => false, - 'top' => false, - 'fetchPart' => true, - 'flags' => false, - ]; - - /** - * current iteration position - * @var int - */ - protected $iterationPos = 0; - - /** - * maximum iteration position (= message count) - * @var null|int - */ - protected $iterationMax = null; - - /** - * used message class, change it in an extended class to extend the returned message class - * @var string - */ - protected $messageClass = Message::class; - - /** - * Getter for has-properties. The standard has properties - * are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop - * - * The valid values for the has-properties are: - * - true if a feature is supported - * - false if a feature is not supported - * - null is it's not yet known or it can't be know if a feature is supported - * - * @param string $var property name - * @throws Exception\InvalidArgumentException - * @return bool supported or not - */ - public function __get($var) - { - if (strpos($var, 'has') === 0) { - $var = strtolower(substr($var, 3)); - return isset($this->has[$var]) ? $this->has[$var] : null; - } - - throw new Exception\InvalidArgumentException($var . ' not found'); - } - - /** - * Get a full list of features supported by the specific mail lib and the server - * - * @return array list of features as array(feature_name => true|false[|null]) - */ - public function getCapabilities() - { - return $this->has; - } - - /** - * Count messages messages in current box/folder - * - * @return int number of messages - * @throws Exception\ExceptionInterface - */ - abstract public function countMessages(); - - /** - * Get a list of messages with number and size - * - * @param int $id number of message - * @return int|array size of given message of list with all messages as array(num => size) - */ - abstract public function getSize($id = 0); - - /** - * Get a message with headers and body - * - * @param $id int number of message - * @return Message - */ - abstract public function getMessage($id); - - /** - * Get raw header of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message header - * @param int $topLines include this many lines with header (after an empty line) - * @return string raw header - */ - abstract public function getRawHeader($id, $part = null, $topLines = 0); - - /** - * Get raw content of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message content - * @return string raw content - */ - abstract public function getRawContent($id, $part = null); - - /** - * Create instance with parameters - * - * @param array $params mail reader specific parameters - * @throws Exception\ExceptionInterface - */ - abstract public function __construct($params); - - /** - * Destructor calls close() and therefore closes the resource. - */ - public function __destruct() - { - $this->close(); - } - - /** - * Close resource for mail lib. If you need to control, when the resource - * is closed. Otherwise the destructor would call this. - */ - abstract public function close(); - - /** - * Keep the resource alive. - */ - abstract public function noop(); - - /** - * delete a message from current box/folder - * - * @param $id - */ - abstract public function removeMessage($id); - - /** - * get unique id for one or all messages - * - * if storage does not support unique ids it's the same as the message number - * - * @param int|null $id message number - * @return array|string message number for given message or all messages as array - * @throws Exception\ExceptionInterface - */ - abstract public function getUniqueId($id = null); - - /** - * get a message number from a unique id - * - * I.e. if you have a webmailer that supports deleting messages you should use unique ids - * as parameter and use this method to translate it to message number right before calling removeMessage() - * - * @param string $id unique id - * @return int message number - * @throws Exception\ExceptionInterface - */ - abstract public function getNumberByUniqueId($id); - - // interface implementations follows - - /** - * Countable::count() - * - * @return int - */ - #[ReturnTypeWillChange] - public function count() - { - return $this->countMessages(); - } - - /** - * ArrayAccess::offsetExists() - * - * @param int $id - * @return bool - */ - #[ReturnTypeWillChange] - public function offsetExists($id) - { - try { - if ($this->getMessage($id)) { - return true; - } - } catch (Exception\ExceptionInterface $e) { - } - - return false; - } - - /** - * ArrayAccess::offsetGet() - * - * @param int $id - * @return \Laminas\Mail\Storage\Message message object - */ - #[ReturnTypeWillChange] - public function offsetGet($id) - { - return $this->getMessage($id); - } - - /** - * ArrayAccess::offsetSet() - * - * @param mixed $id - * @param mixed $value - * @throws Exception\RuntimeException - */ - #[ReturnTypeWillChange] - public function offsetSet($id, $value) - { - throw new Exception\RuntimeException('cannot write mail messages via array access'); - } - - /** - * ArrayAccess::offsetUnset() - * - * @param int $id - * @return bool success - */ - #[ReturnTypeWillChange] - public function offsetUnset($id) - { - return $this->removeMessage($id); - } - - /** - * Iterator::rewind() - * - * Rewind always gets the new count from the storage. Thus if you use - * the interfaces and your scripts take long you should use reset() - * from time to time. - */ - #[ReturnTypeWillChange] - public function rewind() - { - $this->iterationMax = $this->countMessages(); - $this->iterationPos = 1; - } - - /** - * Iterator::current() - * - * @return Message current message - */ - #[ReturnTypeWillChange] - public function current() - { - return $this->getMessage($this->iterationPos); - } - - /** - * Iterator::key() - * - * @return int id of current position - */ - #[ReturnTypeWillChange] - public function key() - { - return $this->iterationPos; - } - - /** - * Iterator::next() - */ - #[ReturnTypeWillChange] - public function next() - { - ++$this->iterationPos; - } - - /** - * Iterator::valid() - * - * @return bool - */ - #[ReturnTypeWillChange] - public function valid() - { - if ($this->iterationMax === null) { - $this->iterationMax = $this->countMessages(); - } - return $this->iterationPos && $this->iterationPos <= $this->iterationMax; - } - - /** - * SeekableIterator::seek() - * - * @param int $pos - * @throws Exception\OutOfBoundsException - */ - #[ReturnTypeWillChange] - public function seek($pos) - { - if ($this->iterationMax === null) { - $this->iterationMax = $this->countMessages(); - } - - if ($pos > $this->iterationMax) { - throw new Exception\OutOfBoundsException('this position does not exist'); - } - $this->iterationPos = $pos; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Exception/ExceptionInterface.php b/lib/laminas/laminas-mail/src/Storage/Exception/ExceptionInterface.php deleted file mode 100644 index 856cd626a..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Exception/ExceptionInterface.php +++ /dev/null @@ -1,9 +0,0 @@ - \Laminas\Mail\Storage\Folder folder) - * @var array - */ - protected $folders; - - /** - * local name (name of folder in parent folder) - * @var string - */ - protected $localName; - - /** - * global name (absolute name of folder) - * @var string - */ - protected $globalName; - - /** - * folder is selectable if folder is able to hold messages, otherwise it is a parent folder - * @var bool - */ - protected $selectable = true; - - /** - * create a new mail folder instance - * - * @param string $localName name of folder in current subdirectory - * @param string $globalName absolute name of folder - * @param bool $selectable if true folder holds messages, if false it's - * just a parent for subfolders (Default: true) - * @param array $folders init with given instances of Folder as subfolders - */ - public function __construct($localName, $globalName = '', $selectable = true, array $folders = []) - { - $this->localName = $localName; - $this->globalName = $globalName ? $globalName : $localName; - $this->selectable = $selectable; - $this->folders = $folders; - } - - /** - * implements RecursiveIterator::hasChildren() - * - * @return bool current element has children - */ - #[ReturnTypeWillChange] - public function hasChildren() - { - $current = $this->current(); - return $current && $current instanceof self && ! $current->isLeaf(); - } - - /** - * implements RecursiveIterator::getChildren() - * - * @return \Laminas\Mail\Storage\Folder same as self::current() - */ - #[ReturnTypeWillChange] - public function getChildren() - { - return $this->current(); - } - - /** - * implements Iterator::valid() - * - * @return bool check if there's a current element - */ - #[ReturnTypeWillChange] - public function valid() - { - return key($this->folders) !== null; - } - - /** - * implements Iterator::next() - */ - #[ReturnTypeWillChange] - public function next() - { - next($this->folders); - } - - /** - * implements Iterator::key() - * - * @return string key/local name of current element - */ - #[ReturnTypeWillChange] - public function key() - { - return key($this->folders); - } - - /** - * implements Iterator::current() - * - * @return \Laminas\Mail\Storage\Folder current folder - */ - #[ReturnTypeWillChange] - public function current() - { - return current($this->folders); - } - - /** - * implements Iterator::rewind() - */ - #[ReturnTypeWillChange] - public function rewind() - { - reset($this->folders); - } - - /** - * get subfolder named $name - * - * @param string $name wanted subfolder - * @throws Exception\InvalidArgumentException - * @return \Laminas\Mail\Storage\Folder folder named $folder - */ - public function __get($name) - { - if (! isset($this->folders[$name])) { - throw new Exception\InvalidArgumentException("no subfolder named $name"); - } - - return $this->folders[$name]; - } - - /** - * add or replace subfolder named $name - * - * @param string $name local name of subfolder - * @param \Laminas\Mail\Storage\Folder $folder instance for new subfolder - */ - public function __set($name, self $folder) - { - $this->folders[$name] = $folder; - } - - /** - * remove subfolder named $name - * - * @param string $name local name of subfolder - */ - public function __unset($name) - { - unset($this->folders[$name]); - } - - /** - * magic method for easy output of global name - * - * @return string global name of folder - */ - public function __toString() - { - return (string) $this->getGlobalName(); - } - - /** - * get local name - * - * @return string local name - */ - public function getLocalName() - { - return $this->localName; - } - - /** - * get global name - * - * @return string global name - */ - public function getGlobalName() - { - return $this->globalName; - } - - /** - * is this folder selectable? - * - * @return bool selectable - */ - public function isSelectable() - { - return $this->selectable; - } - - /** - * check if folder has no subfolder - * - * @return bool true if no subfolders - */ - public function isLeaf() - { - return empty($this->folders); - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Folder/FolderInterface.php b/lib/laminas/laminas-mail/src/Storage/Folder/FolderInterface.php deleted file mode 100644 index c26775b38..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Folder/FolderInterface.php +++ /dev/null @@ -1,32 +0,0 @@ -rootdir = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - - $delim = $params['delim'] ?? '.'; - $this->delim = (string) $delim; - - $folder = $params['folder'] ?? 'INBOX'; - - $this->buildFolderTree(); - $this->selectFolder((string) $folder); - $this->has['top'] = true; - $this->has['flags'] = true; - } - - /** - * find all subfolders and mbox files for folder structure - * - * Result is save in Storage\Folder instances with the root in $this->rootFolder. - * $parentFolder and $parentGlobalName are only used internally for recursion. - * - * @throws Exception\RuntimeException - */ - protected function buildFolderTree() - { - $this->rootFolder = new Storage\Folder('/', '/', false); - $this->rootFolder->INBOX = new Storage\Folder('INBOX', 'INBOX', true); - - ErrorHandler::start(E_WARNING); - $dh = opendir($this->rootdir); - $error = ErrorHandler::stop(); - if (! $dh) { - throw new Exception\RuntimeException("can't read folders in maildir", 0, $error); - } - $dirs = []; - - while (($entry = readdir($dh)) !== false) { - // maildir++ defines folders must start with . - if ($entry[0] != '.' || $entry == '.' || $entry == '..') { - continue; - } - - if ($this->isMaildir($this->rootdir . $entry)) { - $dirs[] = $entry; - } - } - closedir($dh); - - sort($dirs); - $stack = [null]; - $folderStack = [null]; - $parentFolder = $this->rootFolder; - $parent = '.'; - - foreach ($dirs as $dir) { - do { - if (strpos($dir, $parent) === 0) { - $local = substr($dir, strlen($parent)); - if (strpos($local, $this->delim) !== false) { - throw new Exception\RuntimeException('error while reading maildir'); - } - array_push($stack, $parent); - $parent = $dir . $this->delim; - $folder = new Storage\Folder($local, substr($dir, 1), true); - $parentFolder->$local = $folder; - array_push($folderStack, $parentFolder); - $parentFolder = $folder; - break; - } elseif ($stack) { - $parent = array_pop($stack); - $parentFolder = array_pop($folderStack); - } - } while ($stack); - if (! $stack) { - throw new Exception\RuntimeException('error while reading maildir'); - } - } - } - - /** - * get root folder or given folder - * - * @param string $rootFolder get folder structure for given folder, else root - * @throws \Laminas\Mail\Storage\Exception\InvalidArgumentException - * @return \Laminas\Mail\Storage\Folder root or wanted folder - */ - public function getFolders($rootFolder = null) - { - if (! $rootFolder || $rootFolder == 'INBOX') { - return $this->rootFolder; - } - - // rootdir is same as INBOX in maildir - if (strpos($rootFolder, 'INBOX' . $this->delim) === 0) { - $rootFolder = substr($rootFolder, 6); - } - $currentFolder = $this->rootFolder; - $subname = trim($rootFolder, $this->delim); - - while ($currentFolder) { - if (false !== strpos($subname, $this->delim)) { - list($entry, $subname) = explode($this->delim, $subname, 2); - } else { - $entry = $subname; - $subname = null; - } - - $currentFolder = $currentFolder->$entry; - - if (! $subname) { - break; - } - } - - if ($currentFolder->getGlobalName() != rtrim($rootFolder, $this->delim)) { - throw new Exception\InvalidArgumentException("folder $rootFolder not found"); - } - return $currentFolder; - } - - /** - * select given folder - * - * folder must be selectable! - * - * @param Storage\Folder|string $globalName global name of folder or - * instance for subfolder - * @throws Exception\RuntimeException - */ - public function selectFolder($globalName) - { - $this->currentFolder = (string) $globalName; - - // getting folder from folder tree for validation - $folder = $this->getFolders($this->currentFolder); - - try { - $this->openMaildir($this->rootdir . '.' . $folder->getGlobalName()); - } catch (Exception\ExceptionInterface $e) { - // check what went wrong - if (! $folder->isSelectable()) { - throw new Exception\RuntimeException("{$this->currentFolder} is not selectable", 0, $e); - } - // seems like file has vanished; rebuilding folder tree - but it's still an exception - $this->buildFolderTree(); - throw new Exception\RuntimeException( - 'seems like the maildir has vanished; I have rebuilt the folder tree; ' - . 'search for another folder and try again', - 0, - $e - ); - } - } - - /** - * get Storage\Folder instance for current folder - * - * @return Storage\Folder instance of current folder - */ - public function getCurrentFolder() - { - return $this->currentFolder; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Folder/Mbox.php b/lib/laminas/laminas-mail/src/Storage/Folder/Mbox.php deleted file mode 100644 index 8fed65d89..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Folder/Mbox.php +++ /dev/null @@ -1,219 +0,0 @@ -rootdir = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - $folder = $params['folder'] ?? 'INBOX'; - - $this->buildFolderTree($this->rootdir); - $this->selectFolder((string) $folder); - $this->has['top'] = true; - $this->has['uniqueid'] = false; - } - - /** - * find all subfolders and mbox files for folder structure - * - * Result is save in Storage\Folder instances with the root in $this->rootFolder. - * $parentFolder and $parentGlobalName are only used internally for recursion. - * - * @param string $currentDir call with root dir, also used for recursion. - * @param Storage\Folder|null $parentFolder used for recursion - * @param string $parentGlobalName used for recursion - * @throws Exception\InvalidArgumentException - */ - protected function buildFolderTree($currentDir, $parentFolder = null, $parentGlobalName = '') - { - if (! $parentFolder) { - $this->rootFolder = new Storage\Folder('/', '/', false); - $parentFolder = $this->rootFolder; - } - - ErrorHandler::start(E_WARNING); - $dh = opendir($currentDir); - ErrorHandler::stop(); - if (! $dh) { - throw new Exception\InvalidArgumentException("can't read dir $currentDir"); - } - while (($entry = readdir($dh)) !== false) { - // ignore hidden files for mbox - if ($entry[0] == '.') { - continue; - } - $absoluteEntry = $currentDir . $entry; - $globalName = $parentGlobalName . DIRECTORY_SEPARATOR . $entry; - if (is_file($absoluteEntry) && $this->isMboxFile($absoluteEntry)) { - $parentFolder->$entry = new Storage\Folder($entry, $globalName); - continue; - } - if (! is_dir($absoluteEntry) /* || $entry == '.' || $entry == '..' */) { - continue; - } - $folder = new Storage\Folder($entry, $globalName, false); - $parentFolder->$entry = $folder; - $this->buildFolderTree($absoluteEntry . DIRECTORY_SEPARATOR, $folder, $globalName); - } - - closedir($dh); - } - - /** - * get root folder or given folder - * - * @param string $rootFolder get folder structure for given folder, else root - * @return Storage\Folder root or wanted folder - * @throws Exception\InvalidArgumentException - */ - public function getFolders($rootFolder = null) - { - if (! $rootFolder) { - return $this->rootFolder; - } - - $currentFolder = $this->rootFolder; - $subname = trim($rootFolder, DIRECTORY_SEPARATOR); - while ($currentFolder) { - if (false !== strpos($subname, DIRECTORY_SEPARATOR)) { - list($entry, $subname) = explode(DIRECTORY_SEPARATOR, $subname, 2); - } else { - $entry = $subname; - $subname = null; - } - - $currentFolder = $currentFolder->$entry; - - if (! $subname) { - break; - } - } - - if ($currentFolder->getGlobalName() != DIRECTORY_SEPARATOR . trim($rootFolder, DIRECTORY_SEPARATOR)) { - throw new Exception\InvalidArgumentException("folder $rootFolder not found"); - } - return $currentFolder; - } - - /** - * select given folder - * - * folder must be selectable! - * - * @param Storage\Folder|string $globalName global name of folder or - * instance for subfolder - * @throws Exception\RuntimeException - */ - public function selectFolder($globalName) - { - $this->currentFolder = (string) $globalName; - - // getting folder from folder tree for validation - $folder = $this->getFolders($this->currentFolder); - - try { - $this->openMboxFile($this->rootdir . $folder->getGlobalName()); - } catch (Exception\ExceptionInterface $e) { - // check what went wrong - if (! $folder->isSelectable()) { - throw new Exception\RuntimeException("{$this->currentFolder} is not selectable", 0, $e); - } - // seems like file has vanished; rebuilding folder tree - but it's still an exception - $this->buildFolderTree($this->rootdir); - throw new Exception\RuntimeException( - 'seems like the mbox file has vanished; I have rebuilt the folder tree; ' - . 'search for another folder and try again', - 0, - $e - ); - } - } - - /** - * get Storage\Folder instance for current folder - * - * @return Storage\Folder instance of current folder - * @throws Exception\ExceptionInterface - */ - public function getCurrentFolder() - { - return $this->currentFolder; - } - - /** - * magic method for serialize() - * - * with this method you can cache the mbox class - * - * @return array name of variables - */ - public function __sleep() - { - return array_merge(parent::__sleep(), ['currentFolder', 'rootFolder', 'rootdir']); - } - - /** - * magic method for unserialize(), with this method you can cache the mbox class - */ - public function __wakeup() - { - // if cache is stall selectFolder() rebuilds the tree on error - parent::__wakeup(); - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Imap.php b/lib/laminas/laminas-mail/src/Storage/Imap.php deleted file mode 100644 index 30196a5a7..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Imap.php +++ /dev/null @@ -1,553 +0,0 @@ - Mail\Storage::FLAG_PASSED, - '\Answered' => Mail\Storage::FLAG_ANSWERED, - '\Seen' => Mail\Storage::FLAG_SEEN, - '\Unseen' => Mail\Storage::FLAG_UNSEEN, - '\Deleted' => Mail\Storage::FLAG_DELETED, - '\Draft' => Mail\Storage::FLAG_DRAFT, - '\Flagged' => Mail\Storage::FLAG_FLAGGED, - ]; - - /** - * IMAP flags to search criteria - * @var array - */ - protected static $searchFlags = [ - '\Recent' => 'RECENT', - '\Answered' => 'ANSWERED', - '\Seen' => 'SEEN', - '\Unseen' => 'UNSEEN', - '\Deleted' => 'DELETED', - '\Draft' => 'DRAFT', - '\Flagged' => 'FLAGGED', - ]; - - /** - * Count messages all messages in current box - * - * @param null $flags - * @throws Exception\RuntimeException - * @throws Protocol\Exception\RuntimeException - * @return int number of messages - */ - public function countMessages($flags = null) - { - if (! $this->currentFolder) { - throw new Exception\RuntimeException('No selected folder to count'); - } - - if ($flags === null) { - return count($this->protocol->search(['ALL'])); - } - - $params = []; - foreach ((array) $flags as $flag) { - if (isset(static::$searchFlags[$flag])) { - $params[] = static::$searchFlags[$flag]; - } else { - $params[] = 'KEYWORD'; - $params[] = $this->protocol->escapeString($flag); - } - } - return count($this->protocol->search($params)); - } - - /** - * get a list of messages with number and size - * - * @param int $id number of message - * @return int|array size of given message of list with all messages as [num => size] - * @throws Protocol\Exception\RuntimeException - */ - public function getSize($id = 0) - { - if ($id) { - return $this->protocol->fetch('RFC822.SIZE', $id); - } - return $this->protocol->fetch('RFC822.SIZE', 1, INF); - } - - /** - * Fetch a message - * - * @param int $id number of message - * @return Message - * @throws Protocol\Exception\RuntimeException - */ - public function getMessage($id) - { - $data = $this->protocol->fetch(['FLAGS', 'RFC822.HEADER'], $id); - $header = $data['RFC822.HEADER']; - - $flags = []; - foreach ($data['FLAGS'] as $flag) { - $flags[] = static::$knownFlags[$flag] ?? $flag; - } - - return new $this->messageClass(['handler' => $this, 'id' => $id, 'headers' => $header, 'flags' => $flags]); - } - - /* - * Get raw header of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message header - * @param int $topLines include this many lines with header (after an empty line) - * @param int $topLines include this many lines with header (after an empty line) - * @return string raw header - * @throws Exception\RuntimeException - * @throws Protocol\Exception\RuntimeException - */ - public function getRawHeader($id, $part = null, $topLines = 0) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - - // TODO: toplines - return $this->protocol->fetch('RFC822.HEADER', $id); - } - - /* - * Get raw content of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message content - * @return string raw content - * @throws Protocol\Exception\RuntimeException - * @throws Exception\RuntimeException - */ - public function getRawContent($id, $part = null) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - - return $this->protocol->fetch('RFC822.TEXT', $id); - } - - /** - * create instance with parameters - * - * Supported parameters are - * - * - user username - * - host hostname or ip address of IMAP server [optional, default = 'localhost'] - * - password password for user 'username' [optional, default = ''] - * - port port for IMAP server [optional, default = 110] - * - ssl 'SSL' or 'TLS' for secure sockets - * - folder select this folder [optional, default = 'INBOX'] - * - * @param array|object|Protocol\Imap $params mail reader specific - * parameters or configured Imap protocol object - * @throws Exception\RuntimeException - * @throws Exception\InvalidArgumentException - * @throws Protocol\Exception\RuntimeException - */ - public function __construct($params) - { - $this->has['flags'] = true; - - if ($params instanceof Protocol\Imap) { - $this->protocol = $params; - try { - $this->selectFolder('INBOX'); - } catch (Exception\ExceptionInterface $e) { - throw new Exception\RuntimeException('cannot select INBOX, is this a valid transport?', 0, $e); - } - return; - } - - $params = ParamsNormalizer::normalizeParams($params); - - if (! isset($params['user'])) { - throw new Exception\InvalidArgumentException('need at least user in params'); - } - - $host = $params['host'] ?? 'localhost'; - $password = $params['password'] ?? ''; - $port = $params['port'] ?? null; - $ssl = $params['ssl'] ?? false; - $folder = $params['folder'] ?? 'INBOX'; - - if (null !== $port) { - $port = (int) $port; - } - - if (! is_string($ssl)) { - $ssl = (bool) $ssl; - } - - $this->protocol = new Protocol\Imap(); - - if (array_key_exists('novalidatecert', $params)) { - $this->protocol->setNoValidateCert((bool) $params['novalidatecert']); - } - - $this->protocol->connect((string) $host, $port, $ssl); - if (! $this->protocol->login((string) $params['user'], (string) $password)) { - throw new Exception\RuntimeException('cannot login, user or password wrong'); - } - $this->selectFolder((string) $folder); - } - - /** - * Close resource for mail lib. - * - * If you need to control, when the resource is closed. Otherwise the - * destructor would call this. - */ - public function close() - { - $this->currentFolder = ''; - $this->protocol->logout(); - } - - /** - * Keep the server busy. - * - * @throws Exception\RuntimeException - */ - public function noop() - { - if (! $this->protocol->noop()) { - throw new Exception\RuntimeException('could not do nothing'); - } - } - - /** - * Remove a message from server. - * - * If you're doing that from a web environment you should be careful and - * use a uniqueid as parameter if possible to identify the message. - * - * @param int $id number of message - * @throws Exception\RuntimeException - */ - public function removeMessage($id) - { - if (! $this->protocol->store([Mail\Storage::FLAG_DELETED], $id, null, '+')) { - throw new Exception\RuntimeException('cannot set deleted flag'); - } - // TODO: expunge here or at close? we can handle an error here better and are more fail safe - if (! $this->protocol->expunge()) { - throw new Exception\RuntimeException('message marked as deleted, but could not expunge'); - } - } - - /** - * get unique id for one or all messages - * - * if storage does not support unique ids it's the same as the message - * number. - * - * @param int|null $id message number - * @return array|string message number for given message or all messages as array - * @throws Protocol\Exception\RuntimeException - */ - public function getUniqueId($id = null) - { - if ($id) { - return $this->protocol->fetch('UID', $id); - } - - return $this->protocol->fetch('UID', 1, INF); - } - - /** - * get a message number from a unique id - * - * I.e. if you have a webmailer that supports deleting messages you should - * use unique ids as parameter and use this method to translate it to - * message number right before calling removeMessage() - * - * @param string $id unique id - * @throws Exception\InvalidArgumentException - * @return int message number - */ - public function getNumberByUniqueId($id) - { - // TODO: use search to find number directly - $ids = $this->getUniqueId(); - foreach ($ids as $k => $v) { - if ($v == $id) { - return $k; - } - } - - throw new Exception\InvalidArgumentException('unique id not found'); - } - - /** - * get root folder or given folder - * - * @param string $rootFolder get folder structure for given folder, else root - * @throws Exception\RuntimeException - * @throws Exception\InvalidArgumentException - * @throws Protocol\Exception\RuntimeException - * @return Folder root or wanted folder - */ - public function getFolders($rootFolder = null) - { - $folders = $this->protocol->listMailbox((string) $rootFolder); - if (! $folders) { - throw new Exception\InvalidArgumentException('folder not found'); - } - - ksort($folders, SORT_STRING); - $root = new Folder('/', '/', false); - $stack = [null]; - $folderStack = [null]; - $parentFolder = $root; - $parent = ''; - - foreach ($folders as $globalName => $data) { - do { - if (! $parent || strpos($globalName, $parent) === 0) { - $pos = strrpos($globalName, $data['delim']); - if ($pos === false) { - $localName = $globalName; - } else { - $localName = substr($globalName, $pos + 1); - } - $selectable = ! $data['flags'] || ! in_array('\\Noselect', $data['flags']); - - array_push($stack, $parent); - $parent = $globalName . $data['delim']; - $folder = new Folder($localName, $globalName, $selectable); - $parentFolder->$localName = $folder; - array_push($folderStack, $parentFolder); - $parentFolder = $folder; - $this->delimiter = $data['delim']; - break; - } elseif ($stack) { - $parent = array_pop($stack); - $parentFolder = array_pop($folderStack); - } - } while ($stack); - if (! $stack) { - throw new Exception\RuntimeException('error while constructing folder tree'); - } - } - - return $root; - } - - /** - * select given folder - * - * folder must be selectable! - * - * @param Folder|string $globalName global name of folder or instance for subfolder - * @throws Exception\RuntimeException - * @throws Protocol\Exception\RuntimeException - */ - public function selectFolder($globalName) - { - $this->currentFolder = $globalName; - if (! $this->protocol->select($this->currentFolder)) { - $this->currentFolder = ''; - throw new Exception\RuntimeException('cannot change folder, maybe it does not exist'); - } - } - - /** - * get Folder instance for current folder - * - * @return Folder instance of current folder - */ - public function getCurrentFolder() - { - return $this->currentFolder; - } - - /** - * create a new folder - * - * This method also creates parent folders if necessary. Some mail storages - * may restrict, which folder may be used as parent or which chars may be - * used in the folder name - * - * @param string $name global name of folder, local name if $parentFolder - * is set - * @param string|Folder $parentFolder parent folder for new folder, else - * root folder is parent - * @throws Exception\RuntimeException - */ - public function createFolder($name, $parentFolder = null) - { - // TODO: we assume / as the hierarchy delim - need to get that from the folder class! - if ($parentFolder instanceof Folder) { - $folder = $parentFolder->getGlobalName() . '/' . $name; - } elseif ($parentFolder !== null) { - $folder = $parentFolder . '/' . $name; - } else { - $folder = $name; - } - - if (! $this->protocol->create($folder)) { - throw new Exception\RuntimeException('cannot create folder'); - } - } - - /** - * remove a folder - * - * @param string|Folder $name name or instance of folder - * @throws Exception\RuntimeException - */ - public function removeFolder($name) - { - if ($name instanceof Folder) { - $name = $name->getGlobalName(); - } - - if (! $this->protocol->delete($name)) { - throw new Exception\RuntimeException('cannot delete folder'); - } - } - - /** - * rename and/or move folder - * - * The new name has the same restrictions as in createFolder() - * - * @param string|Folder $oldName name or instance of folder - * @param string $newName new global name of folder - * @throws Exception\RuntimeException - */ - public function renameFolder($oldName, $newName) - { - if ($oldName instanceof Folder) { - $oldName = $oldName->getGlobalName(); - } - - if (! $this->protocol->rename($oldName, $newName)) { - throw new Exception\RuntimeException('cannot rename folder'); - } - } - - /** - * append a new message to mail storage - * - * @param string $message message as string or instance of message class - * @param null|string|Folder $folder folder for new message, else current - * folder is taken - * @param null|array $flags set flags for new message, else a default set - * is used - * @throws Exception\RuntimeException - */ - public function appendMessage($message, $folder = null, $flags = null) - { - if ($folder === null) { - $folder = $this->currentFolder; - } - - if ($flags === null) { - $flags = [Mail\Storage::FLAG_SEEN]; - } - - // TODO: handle class instances for $message - if (! $this->protocol->append($folder, $message, $flags)) { - throw new Exception\RuntimeException( - 'cannot create message, please check if the folder exists and your flags' - ); - } - } - - /** - * copy an existing message - * - * @param int $id number of message - * @param string|Folder $folder name or instance of target folder - * @throws Exception\RuntimeException - */ - public function copyMessage($id, $folder) - { - if (! $this->protocol->copy($folder, $id)) { - throw new Exception\RuntimeException('cannot copy message, does the folder exist?'); - } - } - - /** - * move an existing message - * - * NOTE: IMAP has no native move command, thus it's emulated with copy and delete - * - * @param int $id number of message - * @param string|Folder $folder name or instance of target folder - * @throws Exception\RuntimeException - */ - public function moveMessage($id, $folder) - { - $this->copyMessage($id, $folder); - $this->removeMessage($id); - } - - /** - * set flags for message - * - * NOTE: this method can't set the recent flag. - * - * @param int $id number of message - * @param array $flags new flags for message - * @throws Exception\RuntimeException - */ - public function setFlags($id, $flags) - { - if (! $this->protocol->store($flags, $id)) { - throw new Exception\RuntimeException( - 'cannot set flags, have you tried to set the recent flag or special chars?' - ); - } - } - - /** - * get IMAP delimiter - * - * @return string|null - */ - public function delimiter() - { - if (! isset($this->delimiter)) { - $this->getFolders(); - } - return $this->delimiter; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Maildir.php b/lib/laminas/laminas-mail/src/Storage/Maildir.php deleted file mode 100644 index ce1c8901b..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Maildir.php +++ /dev/null @@ -1,430 +0,0 @@ - Mail\Storage::FLAG_DRAFT, - 'F' => Mail\Storage::FLAG_FLAGGED, - 'P' => Mail\Storage::FLAG_PASSED, - 'R' => Mail\Storage::FLAG_ANSWERED, - 'S' => Mail\Storage::FLAG_SEEN, - 'T' => Mail\Storage::FLAG_DELETED, - ]; - - // TODO: getFlags($id) for fast access if headers are not needed (i.e. just setting flags)? - - /** - * Count messages all messages in current box - * - * @param mixed $flags - * @return int number of messages - */ - public function countMessages($flags = null) - { - if ($flags === null) { - return count($this->files); - } - - $count = 0; - if (! is_array($flags)) { - foreach ($this->files as $file) { - if (isset($file['flaglookup'][$flags])) { - ++$count; - } - } - return $count; - } - - $flags = array_flip($flags); - foreach ($this->files as $file) { - foreach ($flags as $flag => $v) { - if (! isset($file['flaglookup'][$flag])) { - continue 2; - } - } - ++$count; - } - return $count; - } - - /** - * Get one or all fields from file structure. Also checks if message is valid - * - * @param int $id message number - * @param string|null $field wanted field - * @throws Exception\InvalidArgumentException - * @return string|array wanted field or all fields as array - */ - protected function getFileData($id, $field = null) - { - if (! isset($this->files[$id - 1])) { - throw new Exception\InvalidArgumentException('id does not exist'); - } - - if (! $field) { - return $this->files[$id - 1]; - } - - if (! isset($this->files[$id - 1][$field])) { - throw new Exception\InvalidArgumentException('field does not exist'); - } - - return $this->files[$id - 1][$field]; - } - - /** - * Get a list of messages with number and size - * - * @param int|null $id number of message or null for all messages - * @return int|array size of given message of list with all messages as array(num => size) - */ - public function getSize($id = null) - { - if ($id !== null) { - $filedata = $this->getFileData($id); - return $filedata['size'] ?? filesize($filedata['filename']); - } - - $result = []; - foreach ($this->files as $num => $data) { - $result[$num + 1] = $data['size'] ?? filesize($data['filename']); - } - - return $result; - } - - /** - * Fetch a message - * - * @param int $id number of message - * @return \Laminas\Mail\Storage\Message\File - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getMessage($id) - { - // TODO that's ugly, would be better to let the message class decide - if (\trim($this->messageClass, '\\') === Message\File::class - || is_subclass_of($this->messageClass, Message\File::class) - ) { - return new $this->messageClass([ - 'file' => $this->getFileData($id, 'filename'), - 'flags' => $this->getFileData($id, 'flags'), - ]); - } - - return new $this->messageClass([ - 'handler' => $this, - 'id' => $id, - 'headers' => $this->getRawHeader($id), - 'flags' => $this->getFileData($id, 'flags'), - ]); - } - - /* - * Get raw header of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message header - * @param int $topLines include this many lines with header (after an empty line) - * @throws Exception\RuntimeException - * @return string raw header - */ - public function getRawHeader($id, $part = null, $topLines = 0) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - - $fh = fopen($this->getFileData($id, 'filename'), 'r'); - - $content = ''; - while (! feof($fh)) { - $line = fgets($fh); - if (! trim($line)) { - break; - } - $content .= $line; - } - - fclose($fh); - return $content; - } - - /* - * Get raw content of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message content - * @throws Exception\RuntimeException - * @return string raw content - */ - public function getRawContent($id, $part = null) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - - $fh = fopen($this->getFileData($id, 'filename'), 'r'); - - while (! feof($fh)) { - $line = fgets($fh); - if (! trim($line)) { - break; - } - } - - $content = stream_get_contents($fh); - fclose($fh); - return $content; - } - - /** - * Create instance with parameters - * Supported parameters are: - * - dirname dirname of mbox file - * - * @param $params array|object Array, iterable object, or stdClass object - * with reader specific parameters - * @throws Exception\InvalidArgumentException - */ - public function __construct($params) - { - $params = ParamsNormalizer::normalizeParams($params); - - if (! isset($params['dirname'])) { - throw new Exception\InvalidArgumentException('no dirname provided in params'); - } - - $dirname = (string) $params['dirname'] ; - - if (! is_dir($dirname)) { - throw new Exception\InvalidArgumentException(sprintf('Maildir "%s" is not a directory', $dirname)); - } - - if (! $this->isMaildir($dirname)) { - throw new Exception\InvalidArgumentException('invalid maildir given'); - } - - $this->has['top'] = true; - $this->has['flags'] = true; - $this->openMaildir($dirname); - } - - /** - * check if a given dir is a valid maildir - * - * @param string $dirname name of dir - * @return bool dir is valid maildir - */ - protected function isMaildir($dirname) - { - if (file_exists($dirname . '/new') && ! is_dir($dirname . '/new')) { - return false; - } - if (file_exists($dirname . '/tmp') && ! is_dir($dirname . '/tmp')) { - return false; - } - return is_dir($dirname . '/cur'); - } - - /** - * open given dir as current maildir - * - * @param string $dirname name of maildir - * @throws Exception\RuntimeException - */ - protected function openMaildir($dirname) - { - if ($this->files) { - $this->close(); - } - - ErrorHandler::start(E_WARNING); - $dh = opendir($dirname . '/cur/'); - $error = ErrorHandler::stop(); - if (! $dh) { - throw new Exception\RuntimeException('cannot open maildir', 0, $error); - } - $this->getMaildirFiles($dh, $dirname . '/cur/'); - closedir($dh); - - ErrorHandler::start(E_WARNING); - $dh = opendir($dirname . '/new/'); - $error = ErrorHandler::stop(); - if (! $dh) { - throw new Exception\RuntimeException('cannot read recent mails in maildir', 0, $error); - } - - $this->getMaildirFiles($dh, $dirname . '/new/', [Mail\Storage::FLAG_RECENT]); - closedir($dh); - } - - /** - * find all files in opened dir handle and add to maildir files - * - * @param resource $dh dir handle used for search - * @param string $dirname dirname of dir in $dh - * @param array $defaultFlags default flags for given dir - */ - protected function getMaildirFiles($dh, $dirname, $defaultFlags = []) - { - while (($entry = readdir($dh)) !== false) { - if ($entry[0] == '.' || ! is_file($dirname . $entry)) { - continue; - } - - if (false !== strpos($entry, ':')) { - list($uniq, $info) = explode(':', $entry, 2); - } else { - $uniq = $entry; - $info = ''; - } - - if (false !== strpos($uniq, ',')) { - list(, $size) = explode(',', $uniq, 2); - } else { - $size = ''; - } - - if (strlen($size) >= 2 && $size[0] === 'S' && $size[1] === '=') { - $size = substr($size, 2); - } - - if (! ctype_digit($size)) { - $size = null; - } - - if (false !== strpos($info, ',')) { - list($version, $flags) = explode(',', $info, 2); - } else { - $version = $info; - $flags = ''; - } - - if ($version !== '2') { - $flags = ''; - } - - $namedFlags = $defaultFlags; - $length = strlen($flags); - for ($i = 0; $i < $length; ++$i) { - $flag = $flags[$i]; - $namedFlags[$flag] = static::$knownFlags[$flag] ?? $flag; - } - - $data = [ - 'uniq' => $uniq, - 'flags' => $namedFlags, - 'flaglookup' => array_flip($namedFlags), - 'filename' => $dirname . $entry, - ]; - if ($size !== null) { - $data['size'] = (int) $size; - } - $this->files[] = $data; - } - - \usort($this->files, function ($a, $b): int { - return \strcmp($a['filename'], $b['filename']); - }); - } - - /** - * Close resource for mail lib. If you need to control, when the resource - * is closed. Otherwise the destructor would call this. - * - */ - public function close() - { - $this->files = []; - } - - /** - * Waste some CPU cycles doing nothing. - * - * @return bool always return true - */ - public function noop() - { - return true; - } - - /** - * stub for not supported message deletion - * - * @param $id - * @throws Exception\RuntimeException - */ - public function removeMessage($id) - { - throw new Exception\RuntimeException('maildir is (currently) read-only'); - } - - /** - * get unique id for one or all messages - * - * if storage does not support unique ids it's the same as the message number - * - * @param int|null $id message number - * @return array|string message number for given message or all messages as array - */ - public function getUniqueId($id = null) - { - if ($id) { - return $this->getFileData($id, 'uniq'); - } - - $ids = []; - foreach ($this->files as $num => $file) { - $ids[$num + 1] = $file['uniq']; - } - return $ids; - } - - /** - * get a message number from a unique id - * - * I.e. if you have a webmailer that supports deleting messages you should use unique ids - * as parameter and use this method to translate it to message number right before calling removeMessage() - * - * @param string $id unique id - * @throws Exception\InvalidArgumentException - * @return int message number - */ - public function getNumberByUniqueId($id) - { - foreach ($this->files as $num => $file) { - if ($file['uniq'] == $id) { - return $num + 1; - } - } - - throw new Exception\InvalidArgumentException('unique id not found'); - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Mbox.php b/lib/laminas/laminas-mail/src/Storage/Mbox.php deleted file mode 100644 index 7e2ec748f..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Mbox.php +++ /dev/null @@ -1,410 +0,0 @@ - start, 'separator' => headersep, 'end' => end) - * @var array - */ - protected $positions; - - /** - * used message class, change it in an extended class to extend the returned message class - * @var string - */ - protected $messageClass = Message\File::class; - - /** - * end of Line for messages - * - * @var string|null - */ - protected $messageEOL; - - /** - * Count messages all messages in current box - * - * @return int number of messages - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function countMessages() - { - return count($this->positions); - } - - /** - * Get a list of messages with number and size - * - * @param int|null $id number of message or null for all messages - * @return int|array size of given message of list with all messages as array(num => size) - */ - public function getSize($id = 0) - { - if ($id) { - $pos = $this->positions[$id - 1]; - return $pos['end'] - $pos['start']; - } - - $result = []; - foreach ($this->positions as $num => $pos) { - $result[$num + 1] = $pos['end'] - $pos['start']; - } - - return $result; - } - - /** - * Get positions for mail message or throw exception if id is invalid - * - * @param int $id number of message - * @throws Exception\InvalidArgumentException - * @return array positions as in positions - */ - protected function getPos($id) - { - if (! isset($this->positions[$id - 1])) { - throw new Exception\InvalidArgumentException('id does not exist'); - } - - return $this->positions[$id - 1]; - } - - /** - * Fetch a message - * - * @param int $id number of message - * @return \Laminas\Mail\Storage\Message\File - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getMessage($id) - { - // TODO that's ugly, would be better to let the message class decide - if (is_subclass_of($this->messageClass, Message\File::class) - || strtolower($this->messageClass) === strtolower(Message\File::class)) { - // TODO top/body lines - $messagePos = $this->getPos($id); - - $messageClassParams = [ - 'file' => $this->fh, - 'startPos' => $messagePos['start'], - 'endPos' => $messagePos['end'], - ]; - - if (isset($this->messageEOL)) { - $messageClassParams['EOL'] = $this->messageEOL; - } - - return new $this->messageClass($messageClassParams); - } - - /** @todo Uncomment once we know how to count body lines */ - // $bodyLines = 0; - - $message = $this->getRawHeader($id); - - /* Once we know how to count body lines, we should uncomment the - * following, which would append the body content to the headers. - * - if ($bodyLines) { - $message .= "\n"; - while ($bodyLines-- && ftell($this->fh) < $this->positions[$id - 1]['end']) { - $message .= fgets($this->fh); - } - } - */ - - return new $this->messageClass(['handler' => $this, 'id' => $id, 'headers' => $message]); - } - - /* - * Get raw header of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message header - * @param int $topLines include this many lines with header (after an empty line) - * @return string raw header - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getRawHeader($id, $part = null, $topLines = 0) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - $messagePos = $this->getPos($id); - // TODO: toplines - return stream_get_contents($this->fh, $messagePos['separator'] - $messagePos['start'], $messagePos['start']); - } - - /* - * Get raw content of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message content - * @return string raw content - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getRawContent($id, $part = null) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - $messagePos = $this->getPos($id); - return stream_get_contents($this->fh, $messagePos['end'] - $messagePos['separator'], $messagePos['separator']); - } - - /** - * Create instance with parameters - * Supported parameters are: - * - filename filename of mbox file - * - * @param $params array|object|Config mail reader specific parameters - * @throws Exception\InvalidArgumentException - */ - public function __construct($params) - { - $params = ParamsNormalizer::normalizeParams($params); - - if (! isset($params['filename'])) { - throw new Exception\InvalidArgumentException('no valid filename given in params'); - } - - if (isset($params['messageEOL'])) { - $this->messageEOL = (string) $params['messageEOL']; - } - - $this->openMboxFile((string) $params['filename']); - $this->has['top'] = true; - $this->has['uniqueid'] = false; - } - - /** - * check if given file is a mbox file - * - * if $file is a resource its file pointer is moved after the first line - * - * @param resource|string $file stream resource of name of file - * @param bool $fileIsString file is string or resource - * @return bool file is mbox file - */ - protected function isMboxFile($file, $fileIsString = true) - { - if ($fileIsString) { - ErrorHandler::start(E_WARNING); - $file = fopen($file, 'r'); - ErrorHandler::stop(); - if (! $file) { - return false; - } - } else { - fseek($file, 0); - } - - $result = false; - - $line = fgets($file) ?: ''; - if (strpos($line, 'From ') === 0) { - $result = true; - } - - if ($fileIsString) { - ErrorHandler::start(E_WARNING); - fclose($file); - ErrorHandler::stop(); - } - - return $result; - } - - /** - * open given file as current mbox file - * - * @param string $filename filename of mbox file - * @throws Exception\RuntimeException - * @throws Exception\InvalidArgumentException - */ - protected function openMboxFile($filename) - { - if ($this->fh) { - $this->close(); - } - - if (is_dir($filename)) { - throw new Exception\InvalidArgumentException('file is not a valid mbox file'); - } - - ErrorHandler::start(); - $this->fh = fopen($filename, 'r'); - $error = ErrorHandler::stop(); - if (! $this->fh) { - throw new Exception\RuntimeException('cannot open mbox file', 0, $error); - } - $this->filename = $filename; - $this->filemtime = filemtime($this->filename); - - if (! $this->isMboxFile($this->fh, false)) { - ErrorHandler::start(E_WARNING); - fclose($this->fh); - $error = ErrorHandler::stop(); - throw new Exception\InvalidArgumentException('file is not a valid mbox format', 0, $error); - } - - $messagePos = ['start' => ftell($this->fh), 'separator' => 0, 'end' => 0]; - while (($line = fgets($this->fh)) !== false) { - if (strpos($line, 'From ') === 0) { - $messagePos['end'] = ftell($this->fh) - strlen($line) - 2; // + newline - if (! $messagePos['separator']) { - $messagePos['separator'] = $messagePos['end']; - } - $this->positions[] = $messagePos; - $messagePos = ['start' => ftell($this->fh), 'separator' => 0, 'end' => 0]; - } - if (! $messagePos['separator'] && ! trim($line)) { - $messagePos['separator'] = ftell($this->fh); - } - } - - $messagePos['end'] = ftell($this->fh); - if (! $messagePos['separator']) { - $messagePos['separator'] = $messagePos['end']; - } - $this->positions[] = $messagePos; - } - - /** - * Close resource for mail lib. If you need to control, when the resource - * is closed. Otherwise the destructor would call this. - * - */ - public function close() - { - if (is_resource($this->fh)) { - fclose($this->fh); - } - $this->positions = []; - } - - /** - * Waste some CPU cycles doing nothing. - * - * @return bool always return true - */ - public function noop() - { - return true; - } - - /** - * stub for not supported message deletion - * - * @param $id - * @throws Exception\RuntimeException - */ - public function removeMessage($id) - { - throw new Exception\RuntimeException('mbox is read-only'); - } - - /** - * get unique id for one or all messages - * - * Mbox does not support unique ids (yet) - it's always the same as the message number. - * That shouldn't be a problem, because we can't change mbox files. Therefor the message - * number is save enough. - * - * @param int|null $id message number - * @return array|string message number for given message or all messages as array - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getUniqueId($id = null) - { - if ($id) { - // check if id exists - $this->getPos($id); - return $id; - } - - $range = range(1, $this->countMessages()); - return array_combine($range, $range); - } - - /** - * get a message number from a unique id - * - * I.e. if you have a webmailer that supports deleting messages you should use unique ids - * as parameter and use this method to translate it to message number right before calling removeMessage() - * - * @param string $id unique id - * @return int message number - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getNumberByUniqueId($id) - { - // check if id exists - $this->getPos($id); - return $id; - } - - /** - * magic method for serialize() - * - * with this method you can cache the mbox class - * - * @return array name of variables - */ - public function __sleep() - { - return ['filename', 'positions', 'filemtime']; - } - - /** - * magic method for unserialize() - * - * with this method you can cache the mbox class - * for cache validation the mtime of the mbox file is used - * - * @throws Exception\RuntimeException - */ - public function __wakeup() - { - ErrorHandler::start(); - $filemtime = filemtime($this->filename); - ErrorHandler::stop(); - if ($this->filemtime != $filemtime) { - $this->close(); - $this->openMboxFile($this->filename); - } else { - ErrorHandler::start(); - $this->fh = fopen($this->filename, 'r'); - $error = ErrorHandler::stop(); - if (! $this->fh) { - throw new Exception\RuntimeException('cannot open mbox file', 0, $error); - } - } - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Message.php b/lib/laminas/laminas-mail/src/Storage/Message.php deleted file mode 100644 index d2307aed3..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Message.php +++ /dev/null @@ -1,80 +0,0 @@ -flags = array_combine($params['flags'], $params['flags']); - } - - parent::__construct($params); - } - - /** - * return toplines as found after headers - * - * @return string toplines - */ - public function getTopLines() - { - return $this->topLines; - } - - /** - * check if flag is set - * - * @param mixed $flag a flag name, use constants defined in \Laminas\Mail\Storage - * @return bool true if set, otherwise false - */ - public function hasFlag($flag) - { - return isset($this->flags[$flag]); - } - - /** - * get all set flags - * - * @return array array with flags, key and value are the same for easy lookup - */ - public function getFlags() - { - return $this->flags; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Message/File.php b/lib/laminas/laminas-mail/src/Storage/Message/File.php deleted file mode 100644 index b5ce38990..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Message/File.php +++ /dev/null @@ -1,64 +0,0 @@ -flags = array_combine($params['flags'], $params['flags']); - } - - parent::__construct($params); - } - - /** - * return toplines as found after headers - * - * @return string toplines - */ - public function getTopLines() - { - return $this->topLines; - } - - /** - * check if flag is set - * - * @param mixed $flag a flag name, use constants defined in \Laminas\Mail\Storage - * @return bool true if set, otherwise false - */ - public function hasFlag($flag) - { - return isset($this->flags[$flag]); - } - - /** - * get all set flags - * - * @return array array with flags, key and value are the same for easy lookup - */ - public function getFlags() - { - return $this->flags; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Message/MessageInterface.php b/lib/laminas/laminas-mail/src/Storage/Message/MessageInterface.php deleted file mode 100644 index 15d82273c..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Message/MessageInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ - public static function normalizeParams($params): array - { - if ($params instanceof Traversable) { - $params = iterator_to_array($params); - } - - if (is_object($params)) { - $params = get_object_vars($params); - } - - if (! is_array($params)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Invalid $params provided; expected array|Traversable|object, received %s', - gettype($params) - )); - } - - Assert::isMap($params, 'Expected $params to have only string keys'); - return $params; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Part.php b/lib/laminas/laminas-mail/src/Storage/Part.php deleted file mode 100644 index c1f2f4681..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Part.php +++ /dev/null @@ -1,474 +0,0 @@ - value) or string, if a content part is found it's used as toplines - * - noToplines ignore content found after headers in param 'headers' - * - content content as string - * - strict strictly parse raw content - * - * @param array $params full message with or without headers - * @throws Exception\InvalidArgumentException - */ - public function __construct(array $params) - { - if (isset($params['handler'])) { - if (! $params['handler'] instanceof AbstractStorage) { - throw new Exception\InvalidArgumentException('handler is not a valid mail handler'); - } - if (! isset($params['id'])) { - throw new Exception\InvalidArgumentException('need a message id with a handler'); - } - - $this->mail = $params['handler']; - $this->messageNum = $params['id']; - } - - $params['strict'] = $params['strict'] ?? false; - - if (isset($params['raw'])) { - Mime\Decode::splitMessage( - $params['raw'], - $this->headers, - $this->content, - Mime\Mime::LINEEND, - $params['strict'] - ); - } elseif (isset($params['headers'])) { - if (is_array($params['headers'])) { - $this->headers = new Headers(); - $this->headers->addHeaders($params['headers']); - } else { - if (empty($params['noToplines'])) { - Mime\Decode::splitMessage($params['headers'], $this->headers, $this->topLines); - } else { - $this->headers = Headers::fromString($params['headers']); - } - } - - if (isset($params['content'])) { - $this->content = $params['content']; - } - } - } - - /** - * Check if part is a multipart message - * - * @return bool if part is multipart - */ - public function isMultipart() - { - try { - return stripos($this->contentType, 'multipart/') === 0; - } catch (Exception\ExceptionInterface $e) { - return false; - } - } - - /** - * Body of part - * - * If part is multipart the raw content of this part with all sub parts is returned - * - * @throws Exception\RuntimeException - * @return string body - */ - public function getContent() - { - if ($this->content !== null) { - return $this->content; - } - - if ($this->mail) { - return $this->mail->getRawContent($this->messageNum); - } - - throw new Exception\RuntimeException('no content'); - } - - /** - * Return size of part - * - * Quite simple implemented currently (not decoding). Handle with care. - * - * @return int size - */ - public function getSize() - { - return strlen($this->getContent()); - } - - /** - * Cache content and split in parts if multipart - * - * @throws Exception\RuntimeException - * @return null - */ - protected function cacheContent() - { - // caching content if we can't fetch parts - if ($this->content === null && $this->mail) { - $this->content = $this->mail->getRawContent($this->messageNum); - } - - if (! $this->isMultipart()) { - return; - } - - // split content in parts - $boundary = $this->getHeaderField('content-type', 'boundary'); - if (! $boundary) { - throw new Exception\RuntimeException('no boundary found in content type to split message'); - } - $parts = Mime\Decode::splitMessageStruct($this->content, $boundary); - if ($parts === null) { - return; - } - $counter = 1; - foreach ($parts as $part) { - $this->parts[$counter++] = new static(['headers' => $part['header'], 'content' => $part['body']]); - } - } - - /** - * Get part of multipart message - * - * @param int $num number of part starting with 1 for first part - * @throws Exception\RuntimeException - * @return Part wanted part - */ - public function getPart($num) - { - if (isset($this->parts[$num])) { - return $this->parts[$num]; - } - - if (! $this->mail && $this->content === null) { - throw new Exception\RuntimeException('part not found'); - } - - if ($this->mail && $this->mail->hasFetchPart) { - // TODO: fetch part - // return - } - - $this->cacheContent(); - - if (! isset($this->parts[$num])) { - throw new Exception\RuntimeException('part not found'); - } - - return $this->parts[$num]; - } - - /** - * Count parts of a multipart part - * - * @return int number of sub-parts - */ - public function countParts() - { - if ($this->countParts) { - return $this->countParts; - } - - $this->countParts = count($this->parts); - if ($this->countParts) { - return $this->countParts; - } - - if ($this->mail && $this->mail->hasFetchPart) { - // TODO: fetch part - // return - } - - $this->cacheContent(); - - $this->countParts = count($this->parts); - return $this->countParts; - } - - /** - * Access headers collection - * - * Lazy-loads if not already attached. - * - * @return Headers - * @throws Exception\RuntimeException - */ - public function getHeaders() - { - if (null === $this->headers) { - if ($this->mail) { - $part = $this->mail->getRawHeader($this->messageNum); - $this->headers = Headers::fromString($part); - } else { - $this->headers = new Headers(); - } - } - if (! $this->headers instanceof Headers) { - throw new Exception\RuntimeException( - '$this->headers must be an instance of Headers' - ); - } - - return $this->headers; - } - - /** - * Get a header in specified format - * - * Internally headers that occur more than once are saved as array, all other as string. If $format - * is set to string implode is used to concat the values (with Mime::LINEEND as delim). - * - * @param string $name name of header, matches case-insensitive, but camel-case is replaced with dashes - * @param string $format change type of return value to 'string' or 'array' - * @throws Exception\InvalidArgumentException - * @return string|array|HeaderInterface|\ArrayIterator value of header in wanted or internal format - */ - public function getHeader($name, $format = null) - { - $header = $this->getHeaders()->get($name); - if ($header === false) { - $lowerName = strtolower(preg_replace('%([a-z])([A-Z])%', '\1-\2', $name)); - $header = $this->getHeaders()->get($lowerName); - if ($header === false) { - throw new Exception\InvalidArgumentException( - "Header with Name $name or $lowerName not found" - ); - } - } - - switch ($format) { - case 'string': - if ($header instanceof HeaderInterface) { - $return = $header->getFieldValue(HeaderInterface::FORMAT_RAW); - } else { - $return = trim(implode( - Mime\Mime::LINEEND, - array_map(static function ($header): string { - return $header->getFieldValue(HeaderInterface::FORMAT_RAW); - }, iterator_to_array($header)) - ), Mime\Mime::LINEEND); - } - break; - case 'array': - if ($header instanceof HeaderInterface) { - $return = [$header->getFieldValue()]; - } else { - $return = []; - foreach ($header as $h) { - $return[] = $h->getFieldValue(HeaderInterface::FORMAT_RAW); - } - } - break; - default: - $return = $header; - } - - return $return; - } - - /** - * Get a specific field from a header like content type or all fields as array - * - * If the header occurs more than once, only the value from the first header - * is returned. - * - * Throws an Exception if the requested header does not exist. If - * the specific header field does not exist, returns null. - * - * @param string $name name of header, like in getHeader() - * @param string $wantedPart the wanted part, default is first, if null an array with all parts is returned - * @param string $firstName key name for the first part - * @return string|array wanted part or all parts as array($firstName => firstPart, partname => value) - * @throws \Laminas\Mime\Exception\RuntimeException - */ - public function getHeaderField($name, $wantedPart = '0', $firstName = '0') - { - return Mime\Decode::splitHeaderField(current($this->getHeader($name, 'array')), $wantedPart, $firstName); - } - - /** - * Getter for mail headers - name is matched in lowercase - * - * This getter is short for Part::getHeader($name, 'string') - * - * @see Part::getHeader() - * - * @param string $name header name - * @return string value of header - * @throws Exception\ExceptionInterface - */ - public function __get($name) - { - return $this->getHeader($name, 'string'); - } - - /** - * Isset magic method proxy to hasHeader - * - * This method is short syntax for Part::hasHeader($name); - * - * @see Part::hasHeader - * - * @param string - * @return bool - */ - public function __isset($name) - { - return $this->getHeaders()->has($name); - } - - /** - * magic method to get content of part - * - * @return string content - */ - public function __toString() - { - return $this->getContent(); - } - - /** - * implements RecursiveIterator::hasChildren() - * - * @return bool current element has children/is multipart - */ - #[ReturnTypeWillChange] - public function hasChildren() - { - $current = $this->current(); - return $current && $current instanceof self && $current->isMultipart(); - } - - /** - * implements RecursiveIterator::getChildren() - * - * @return Part same as self::current() - */ - #[ReturnTypeWillChange] - public function getChildren() - { - return $this->current(); - } - - /** - * implements Iterator::valid() - * - * @return bool check if there's a current element - */ - #[ReturnTypeWillChange] - public function valid() - { - if ($this->countParts === null) { - $this->countParts(); - } - return $this->iterationPos && $this->iterationPos <= $this->countParts; - } - - /** - * implements Iterator::next() - */ - #[ReturnTypeWillChange] - public function next() - { - ++$this->iterationPos; - } - - /** - * implements Iterator::key() - * - * @return string key/number of current part - */ - #[ReturnTypeWillChange] - public function key() - { - return $this->iterationPos; - } - - /** - * implements Iterator::current() - * - * @return Part current part - */ - #[ReturnTypeWillChange] - public function current() - { - return $this->getPart($this->iterationPos); - } - - /** - * implements Iterator::rewind() - */ - #[ReturnTypeWillChange] - public function rewind() - { - $this->countParts(); - $this->iterationPos = 1; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Part/Exception/ExceptionInterface.php b/lib/laminas/laminas-mail/src/Storage/Part/Exception/ExceptionInterface.php deleted file mode 100644 index abebe1c35..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Part/Exception/ExceptionInterface.php +++ /dev/null @@ -1,9 +0,0 @@ -fh = fopen($params['file'], 'r'); - } else { - $this->fh = $params['file']; - } - if (! $this->fh) { - throw new Exception\RuntimeException('could not open file'); - } - if (isset($params['startPos'])) { - fseek($this->fh, $params['startPos']); - } - $header = ''; - $endPos = $params['endPos'] ?? null; - while (($endPos === null || ftell($this->fh) < $endPos) && trim($line = fgets($this->fh))) { - $header .= $line; - } - - if (isset($params['EOL'])) { - $this->headers = Headers::fromString($header, $params['EOL']); - } else { - $this->headers = Headers::fromString($header); - } - - $this->contentPos[0] = ftell($this->fh); - if ($endPos !== null) { - $this->contentPos[1] = $endPos; - } else { - fseek($this->fh, 0, SEEK_END); - $this->contentPos[1] = ftell($this->fh); - } - if (! $this->isMultipart()) { - return; - } - - $boundary = $this->getHeaderField('content-type', 'boundary'); - if (! $boundary) { - throw new Exception\RuntimeException('no boundary found in content type to split message'); - } - - $part = []; - $pos = $this->contentPos[0]; - fseek($this->fh, $pos); - while (! feof($this->fh) && ($endPos === null || $pos < $endPos)) { - $line = fgets($this->fh); - if ($line === false) { - if (feof($this->fh)) { - break; - } - throw new Exception\RuntimeException('error reading file'); - } - - $lastPos = $pos; - $pos = ftell($this->fh); - $line = trim($line); - - if ($line == '--' . $boundary) { - if ($part) { - // not first part - $part[1] = $lastPos; - $this->partPos[] = $part; - } - $part = [$pos]; - } elseif ($line == '--' . $boundary . '--') { - $part[1] = $lastPos; - $this->partPos[] = $part; - break; - } - } - $this->countParts = count($this->partPos); - } - - /** - * Body of part - * - * If part is multipart the raw content of this part with all sub parts is returned - * - * @param resource $stream Optional - * @return string body - */ - public function getContent($stream = null) - { - fseek($this->fh, $this->contentPos[0]); - if ($stream !== null) { - return stream_copy_to_stream($this->fh, $stream, $this->contentPos[1] - $this->contentPos[0]); - } - $length = $this->contentPos[1] - $this->contentPos[0]; - return $length < 1 ? '' : fread($this->fh, $length); - } - - /** - * Return size of part - * - * Quite simple implemented currently (not decoding). Handle with care. - * - * @return int size - */ - public function getSize() - { - return $this->contentPos[1] - $this->contentPos[0]; - } - - /** - * Get part of multipart message - * - * @param int $num number of part starting with 1 for first part - * @throws Exception\RuntimeException - * @return Part wanted part - */ - public function getPart($num) - { - --$num; - if (! isset($this->partPos[$num])) { - throw new Exception\RuntimeException('part not found'); - } - - return new static([ - 'file' => $this->fh, - 'startPos' => $this->partPos[$num][0], - 'endPos' => $this->partPos[$num][1], - ]); - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Part/PartInterface.php b/lib/laminas/laminas-mail/src/Storage/Part/PartInterface.php deleted file mode 100644 index 6161112bb..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Part/PartInterface.php +++ /dev/null @@ -1,117 +0,0 @@ - firstPart, partname => value] - * @throws Exception\ExceptionInterface - */ - public function getHeaderField($name, $wantedPart = '0', $firstName = '0'); - - /** - * Getter for mail headers - name is matched in lowercase - * - * This getter is short for PartInterface::getHeader($name, 'string') - * - * @see PartInterface::getHeader() - * @param string $name header name - * @return string value of header - * @throws Exception\ExceptionInterface - */ - public function __get($name); - - /** - * magic method to get content of part - * - * @return string content - */ - public function __toString(); -} diff --git a/lib/laminas/laminas-mail/src/Storage/Pop3.php b/lib/laminas/laminas-mail/src/Storage/Pop3.php deleted file mode 100644 index def4f97a9..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Pop3.php +++ /dev/null @@ -1,288 +0,0 @@ -protocol->status($count, $octets); - return (int) $count; - } - - /** - * get a list of messages with number and size - * - * @param int $id number of message - * @return int|array size of given message of list with all messages as array(num => size) - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function getSize($id = 0) - { - $id = $id ? $id : null; - return $this->protocol->getList($id); - } - - /** - * Fetch a message - * - * @param int $id number of message - * @return \Laminas\Mail\Storage\Message - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - */ - public function getMessage($id) - { - $bodyLines = 0; - $message = $this->protocol->top($id, $bodyLines, true); - - return new $this->messageClass([ - 'handler' => $this, - 'id' => $id, - 'headers' => $message, - 'noToplines' => $bodyLines < 1, - ]); - } - - /* - * Get raw header of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message header - * @param int $topLines include this many lines with header (after an empty line) - * @return string raw header - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getRawHeader($id, $part = null, $topLines = 0) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - - return $this->protocol->top($id, 0, true); - } - - /* - * Get raw content of message or part - * - * @param int $id number of message - * @param null|array|string $part path to part or null for message content - * @return string raw content - * @throws \Laminas\Mail\Protocol\Exception\ExceptionInterface - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getRawContent($id, $part = null) - { - if ($part !== null) { - // TODO: implement - throw new Exception\RuntimeException('not implemented'); - } - - $content = $this->protocol->retrieve($id); - // TODO: find a way to avoid decoding the headers - $headers = null; // "Declare" variable since it's passed by reference - $body = null; // "Declare" variable before first usage. - Mime\Decode::splitMessage($content, $headers, $body); - return $body; - } - - /** - * create instance with parameters - * Supported parameters are - * - host hostname or ip address of POP3 server - * - user username - * - password password for user 'username' [optional, default = ''] - * - port port for POP3 server [optional, default = 110] - * - ssl 'SSL' or 'TLS' for secure sockets - * - * @param array|object|Protocol\Pop3 $params mail reader specific - * parameters or configured Pop3 protocol object - * @throws \Laminas\Mail\Storage\Exception\InvalidArgumentException - * @throws \Laminas\Mail\Protocol\Exception\RuntimeException - */ - public function __construct($params) - { - $this->has['fetchPart'] = false; - $this->has['top'] = null; - $this->has['uniqueid'] = null; - - if ($params instanceof Protocol\Pop3) { - $this->protocol = $params; - return; - } - - $params = ParamsNormalizer::normalizeParams($params); - - if (! isset($params['user'])) { - throw new Exception\InvalidArgumentException('need at least user in params'); - } - - $host = $params['host'] ?? 'localhost'; - $password = $params['password'] ?? ''; - $port = $params['port'] ?? null; - $ssl = $params['ssl'] ?? false; - - if (null !== $port) { - $port = (int) $port; - } - - if (! is_string($ssl)) { - $ssl = (bool) $ssl; - } - - $this->protocol = new Protocol\Pop3(); - - if (array_key_exists('novalidatecert', $params)) { - $this->protocol->setNoValidateCert((bool) $params['novalidatecert']); - } - - $this->protocol->connect((string) $host, $port, $ssl); - $this->protocol->login((string) $params['user'], (string) $password); - } - - /** - * Close resource for mail lib. If you need to control, when the resource - * is closed. Otherwise the destructor would call this. - */ - public function close() - { - $this->protocol->logout(); - } - - /** - * Keep the server busy. - * - * @throws \Laminas\Mail\Protocol\Exception\RuntimeException - */ - public function noop() - { - $this->protocol->noop(); - } - - /** - * Remove a message from server. If you're doing that from a web environment - * you should be careful and use a uniqueid as parameter if possible to - * identify the message. - * - * @param int $id number of message - * @throws \Laminas\Mail\Protocol\Exception\RuntimeException - */ - public function removeMessage($id) - { - $this->protocol->delete($id); - } - - /** - * get unique id for one or all messages - * - * if storage does not support unique ids it's the same as the message number - * - * @param int|null $id message number - * @return array|string message number for given message or all messages as array - * @throws \Laminas\Mail\Storage\Exception\ExceptionInterface - */ - public function getUniqueId($id = null) - { - if (! $this->hasUniqueid) { - if ($id) { - return $id; - } - $count = $this->countMessages(); - if ($count < 1) { - return []; - } - $range = range(1, $count); - return array_combine($range, $range); - } - - return $this->protocol->uniqueid($id); - } - - /** - * get a message number from a unique id - * - * I.e. if you have a webmailer that supports deleting messages you should use unique ids - * as parameter and use this method to translate it to message number right before calling removeMessage() - * - * @param string $id unique id - * @throws Exception\InvalidArgumentException - * @return int message number - */ - public function getNumberByUniqueId($id) - { - if (! $this->hasUniqueid) { - return $id; - } - - $ids = $this->getUniqueId(); - foreach ($ids as $k => $v) { - if ($v == $id) { - return $k; - } - } - - throw new Exception\InvalidArgumentException('unique id not found'); - } - - /** - * Special handling for hasTop and hasUniqueid. The headers of the first message is - * retrieved if Top wasn't needed/tried yet. - * - * @see AbstractStorage::__get() - * @param string $var - * @return string - */ - public function __get($var) - { - $result = parent::__get($var); - if ($result !== null) { - return $result; - } - - if (strtolower($var) == 'hastop') { - if ($this->protocol->hasTop === null) { - // need to make a real call, because not all server are honest in their capas - try { - $this->protocol->top(1, 0, false); - } catch (MailException\ExceptionInterface $e) { - // ignoring error - } - } - $this->has['top'] = $this->protocol->hasTop; - return $this->protocol->hasTop; - } - - if (strtolower($var) == 'hasuniqueid') { - $id = null; - try { - $id = $this->protocol->uniqueid(1); - } catch (MailException\ExceptionInterface $e) { - // ignoring error - } - $this->has['uniqueid'] = (bool) $id; - return $this->has['uniqueid']; - } - - return $result; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Writable/Maildir.php b/lib/laminas/laminas-mail/src/Storage/Writable/Maildir.php deleted file mode 100644 index a8245b510..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Writable/Maildir.php +++ /dev/null @@ -1,957 +0,0 @@ -create) - && isset($params->dirname) - && ! file_exists($params->dirname . DIRECTORY_SEPARATOR . 'cur') - ) { - self::initMaildir($params->dirname); - } - - parent::__construct($params); - } - - /** - * create a new folder - * - * This method also creates parent folders if necessary. Some mail storages may restrict, which folder - * may be used as parent or which chars may be used in the folder name - * - * @param string $name global name of folder, local name if $parentFolder is set - * @param string|\Laminas\Mail\Storage\Folder $parentFolder parent of new folder, else root folder is parent - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - * @return string only used internally (new created maildir) - */ - public function createFolder($name, $parentFolder = null) - { - if ($parentFolder instanceof Folder) { - $folder = $parentFolder->getGlobalName() . $this->delim . $name; - } elseif ($parentFolder !== null) { - $folder = rtrim($parentFolder, $this->delim) . $this->delim . $name; - } else { - $folder = $name; - } - - $folder = trim($folder, $this->delim); - - // first we check if we try to create a folder that does exist - $exists = null; - try { - $exists = $this->getFolders($folder); - } catch (MailException\ExceptionInterface $e) { - // ok - } - if ($exists) { - throw new StorageException\RuntimeException('folder already exists'); - } - - if (strpos($folder, $this->delim . $this->delim) !== false) { - throw new StorageException\RuntimeException('invalid name - folder parts may not be empty'); - } - - if (strpos($folder, 'INBOX' . $this->delim) === 0) { - $folder = substr($folder, 6); - } - - $fulldir = $this->rootdir . '.' . $folder; - - // check if we got tricked and would create a dir outside of the rootdir or not as direct child - if (strpos($folder, DIRECTORY_SEPARATOR) !== false || strpos($folder, '/') !== false - || dirname($fulldir) . DIRECTORY_SEPARATOR != $this->rootdir - ) { - throw new StorageException\RuntimeException('invalid name - no directory separator allowed in folder name'); - } - - // has a parent folder? - $parent = null; - if (strpos($folder, $this->delim)) { - // let's see if the parent folder exists - $parent = substr($folder, 0, strrpos($folder, $this->delim)); - try { - $this->getFolders($parent); - } catch (MailException\ExceptionInterface $e) { - // does not - create parent folder - $this->createFolder($parent); - } - } - - ErrorHandler::start(); - if (! mkdir($fulldir) || ! mkdir($fulldir . DIRECTORY_SEPARATOR . 'cur')) { - $error = ErrorHandler::stop(); - throw new StorageException\RuntimeException( - 'error while creating new folder, may be created incompletely', - 0, - $error - ); - } - ErrorHandler::stop(); - - mkdir($fulldir . DIRECTORY_SEPARATOR . 'new'); - mkdir($fulldir . DIRECTORY_SEPARATOR . 'tmp'); - - $localName = $parent ? substr($folder, strlen($parent) + 1) : $folder; - $this->getFolders($parent)->$localName = new Folder($localName, $folder, true); - - return $fulldir; - } - - /** - * remove a folder - * - * @param string|Folder $name name or instance of folder - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - */ - public function removeFolder($name) - { - // TODO: This could fail in the middle of the task, which is not optimal. - // But there is no defined standard way to mark a folder as removed and there is no atomar fs-op - // to remove a directory. Also moving the folder to a/the trash folder is not possible, as - // all parent folders must be created. What we could do is add a dash to the front of the - // directory name and it should be ignored as long as other processes obey the standard. - - if ($name instanceof Folder) { - $name = $name->getGlobalName(); - } - - $name = trim($name, $this->delim); - if (strpos($name, 'INBOX' . $this->delim) === 0) { - $name = substr($name, 6); - } - - // check if folder exists and has no children - if (! $this->getFolders($name)->isLeaf()) { - throw new StorageException\RuntimeException('delete children first'); - } - - if ($name == 'INBOX' || $name == DIRECTORY_SEPARATOR || $name == '/') { - throw new StorageException\RuntimeException('wont delete INBOX'); - } - - if ($name == $this->getCurrentFolder()) { - throw new StorageException\RuntimeException('wont delete selected folder'); - } - - foreach (['tmp', 'new', 'cur', '.'] as $subdir) { - $dir = $this->rootdir . '.' . $name . DIRECTORY_SEPARATOR . $subdir; - if (! file_exists($dir)) { - continue; - } - $dh = opendir($dir); - if (! $dh) { - throw new StorageException\RuntimeException("error opening $subdir"); - } - while (($entry = readdir($dh)) !== false) { - if ($entry == '.' || $entry == '..') { - continue; - } - if (! unlink($dir . DIRECTORY_SEPARATOR . $entry)) { - throw new StorageException\RuntimeException("error cleaning $subdir"); - } - } - closedir($dh); - if ($subdir !== '.') { - if (! rmdir($dir)) { - throw new StorageException\RuntimeException("error removing $subdir"); - } - } - } - - if (! rmdir($this->rootdir . '.' . $name)) { - // at least we should try to make it a valid maildir again - mkdir($this->rootdir . '.' . $name . DIRECTORY_SEPARATOR . 'cur'); - throw new StorageException\RuntimeException("error removing maindir"); - } - - $parent = strpos($name, $this->delim) ? substr($name, 0, strrpos($name, $this->delim)) : null; - $localName = $parent ? substr($name, strlen($parent) + 1) : $name; - unset($this->getFolders($parent)->$localName); - } - - /** - * rename and/or move folder - * - * The new name has the same restrictions as in createFolder() - * - * @param string|\Laminas\Mail\Storage\Folder $oldName name or instance of folder - * @param string $newName new global name of folder - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - */ - public function renameFolder($oldName, $newName) - { - // TODO: This is also not atomar and has similar problems as removeFolder() - - if ($oldName instanceof Folder) { - $oldName = $oldName->getGlobalName(); - } - - $oldName = trim($oldName, $this->delim); - if (strpos($oldName, 'INBOX' . $this->delim) === 0) { - $oldName = substr($oldName, 6); - } - - $newName = trim($newName, $this->delim); - if (strpos($newName, 'INBOX' . $this->delim) === 0) { - $newName = substr($newName, 6); - } - - if (strpos($newName, $oldName . $this->delim) === 0) { - throw new StorageException\RuntimeException('new folder cannot be a child of old folder'); - } - - // check if folder exists and has no children - $folder = $this->getFolders($oldName); - - if ($oldName == 'INBOX' || $oldName == DIRECTORY_SEPARATOR || $oldName == '/') { - throw new StorageException\RuntimeException('wont rename INBOX'); - } - - if ($oldName == $this->getCurrentFolder()) { - throw new StorageException\RuntimeException('wont rename selected folder'); - } - - $newdir = $this->createFolder($newName); - - if (! $folder->isLeaf()) { - foreach ($folder as $k => $v) { - $this->renameFolder($v->getGlobalName(), $newName . $this->delim . $k); - } - } - - $olddir = $this->rootdir . '.' . $folder; - foreach (['tmp', 'new', 'cur'] as $subdir) { - $subdir = DIRECTORY_SEPARATOR . $subdir; - if (! file_exists($olddir . $subdir)) { - continue; - } - // using copy or moving files would be even better - but also much slower - if (! rename($olddir . $subdir, $newdir . $subdir)) { - throw new StorageException\RuntimeException('error while moving ' . $subdir); - } - } - // create a dummy if removing fails - otherwise we can't read it next time - mkdir($olddir . DIRECTORY_SEPARATOR . 'cur'); - $this->removeFolder($oldName); - } - - /** - * create a uniqueid for maildir filename - * - * This is nearly the format defined in the maildir standard. The microtime() call should already - * create a uniqueid, the pid is for multicore/-cpu machine that manage to call this function at the - * exact same time, and uname() gives us the hostname for multiple machines accessing the same storage. - * - * If someone disables posix we create a random number of the same size, so this method should also - * work on Windows - if you manage to get maildir working on Windows. - * Microtime could also be disabled, although I've never seen it. - * - * @return string new uniqueid - */ - protected function createUniqueId() - { - $id = ''; - $id .= microtime(true); - $id .= '.' . getmypid(); - $id .= '.' . php_uname('n'); - - return $id; - } - - /** - * open a temporary maildir file - * - * makes sure tmp/ exists and create a file with a unique name - * you should close the returned filehandle! - * - * @param string $folder name of current folder without leading . - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - * @return array array('dirname' => dir of maildir folder, 'uniq' => unique id, 'filename' => name of create file - * 'handle' => file opened for writing) - */ - protected function createTmpFile($folder = 'INBOX') - { - if ($folder == 'INBOX') { - $tmpdir = $this->rootdir . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR; - } else { - $tmpdir = $this->rootdir . '.' . $folder . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR; - } - if (! file_exists($tmpdir)) { - if (! mkdir($tmpdir)) { - throw new StorageException\RuntimeException('problems creating tmp dir'); - } - } - - // we should retry to create a unique id if a file with the same name exists - // to avoid a script timeout we only wait 1 second (instead of 2) and stop - // after a defined retry count - // if you change this variable take into account that it can take up to $maxTries seconds - // normally we should have a valid unique name after the first try, we're just following the "standard" here - $maxTries = 5; - for ($i = 0; $i < $maxTries; ++$i) { - $uniq = $this->createUniqueId(); - if (! file_exists($tmpdir . $uniq)) { - // here is the race condition! - as defined in the standard - // to avoid having a long time between stat()ing the file and creating it we're opening it here - // to mark the filename as taken - $fh = fopen($tmpdir . $uniq, 'w'); - if (! $fh) { - throw new StorageException\RuntimeException('could not open temp file'); - } - break; - } - sleep(1); - } - - if (! $fh) { - throw new StorageException\RuntimeException( - "tried {$maxTries} unique ids for a temp file, but all were taken - giving up" - ); - } - - return [ - 'dirname' => $this->rootdir . '.' . $folder, - 'uniq' => $uniq, - 'filename' => $tmpdir . $uniq, - 'handle' => $fh, - ]; - } - - /** - * create an info string for filenames with given flags - * - * @param array $flags wanted flags, with the reference you'll get the set - * flags with correct key (= char for flag) - * @return string info string for version 2 filenames including the leading colon - * @throws StorageException\InvalidArgumentException - */ - protected function getInfoString(&$flags) - { - // accessing keys is easier, faster and it removes duplicated flags - $wantedFlags = array_flip($flags); - if (isset($wantedFlags[Storage::FLAG_RECENT])) { - throw new StorageException\InvalidArgumentException('recent flag may not be set'); - } - - $info = ':2,'; - $flags = []; - foreach (Storage\Maildir::$knownFlags as $char => $flag) { - if (! isset($wantedFlags[$flag])) { - continue; - } - $info .= $char; - $flags[$char] = $flag; - unset($wantedFlags[$flag]); - } - - if (! empty($wantedFlags)) { - $wantedFlags = implode(', ', array_keys($wantedFlags)); - throw new StorageException\InvalidArgumentException('unknown flag(s): ' . $wantedFlags); - } - - return $info; - } - - /** - * append a new message to mail storage - * - * @param string|resource $message message as string or stream resource. - * @param null|string|Folder $folder folder for new message, else current - * folder is taken. - * @param null|array $flags set flags for new message, else a default set - * is used. - * @param bool $recent handle this mail as if recent flag has been set, - * should only be used in delivery. - * @throws StorageException\RuntimeException - */ - public function appendMessage($message, $folder = null, $flags = null, $recent = false) - { - if ($this->quota && $this->checkQuota()) { - throw new StorageException\RuntimeException('storage is over quota!'); - } - - if ($folder === null) { - $folder = $this->currentFolder; - } - - if (! ($folder instanceof Folder)) { - $folder = $this->getFolders($folder); - } - - if ($flags === null) { - $flags = [Storage::FLAG_SEEN]; - } - $info = $this->getInfoString($flags); - $tempFile = $this->createTmpFile($folder->getGlobalName()); - - // TODO: handle class instances for $message - if (is_resource($message) && get_resource_type($message) == 'stream') { - stream_copy_to_stream($message, $tempFile['handle']); - } else { - fwrite($tempFile['handle'], $message); - } - fclose($tempFile['handle']); - - // we're adding the size to the filename for maildir++ - $size = filesize($tempFile['filename']); - if ($size !== false) { - $info = ',S=' . $size . $info; - } - $newFilename = $tempFile['dirname'] . DIRECTORY_SEPARATOR; - $newFilename .= $recent ? 'new' : 'cur'; - $newFilename .= DIRECTORY_SEPARATOR . $tempFile['uniq'] . $info; - - // we're throwing any exception after removing our temp file and saving it to this variable instead - $exception = null; - - if (! link($tempFile['filename'], $newFilename)) { - $exception = new StorageException\RuntimeException('cannot link message file to final dir'); - } - - ErrorHandler::start(E_WARNING); - unlink($tempFile['filename']); - ErrorHandler::stop(); - - if ($exception) { - throw $exception; - } - - $this->files[] = [ - 'uniq' => $tempFile['uniq'], - 'flags' => $flags, - 'filename' => $newFilename, - ]; - if ($this->quota) { - $this->addQuotaEntry((int) $size, 1); - } - } - - /** - * copy an existing message - * - * @param int $id number of message - * @param string|\Laminas\Mail\Storage\Folder $folder name or instance of targer folder - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - */ - public function copyMessage($id, $folder) - { - if ($this->quota && $this->checkQuota()) { - throw new StorageException\RuntimeException('storage is over quota!'); - } - - if (! ($folder instanceof Folder)) { - $folder = $this->getFolders($folder); - } - - $filedata = $this->getFileData($id); - $oldFile = $filedata['filename']; - $flags = $filedata['flags']; - - // copied message can't be recent - while (($key = array_search(Storage::FLAG_RECENT, $flags)) !== false) { - unset($flags[$key]); - } - $info = $this->getInfoString($flags); - - // we're creating the copy as temp file before moving to cur/ - $tempFile = $this->createTmpFile($folder->getGlobalName()); - // we don't write directly to the file - fclose($tempFile['handle']); - - // we're adding the size to the filename for maildir++ - $size = filesize($oldFile); - if ($size !== false) { - $info = ',S=' . $size . $info; - } - - $newFile = $tempFile['dirname'] . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . $tempFile['uniq'] . $info; - - // we're throwing any exception after removing our temp file and saving it to this variable instead - $exception = null; - - if (! copy($oldFile, $tempFile['filename'])) { - $exception = new StorageException\RuntimeException('cannot copy message file'); - } elseif (! link($tempFile['filename'], $newFile)) { - $exception = new StorageException\RuntimeException('cannot link message file to final dir'); - } - - ErrorHandler::start(E_WARNING); - unlink($tempFile['filename']); - ErrorHandler::stop(); - - if ($exception) { - throw $exception; - } - - if ($folder->getGlobalName() == $this->currentFolder - || ($this->currentFolder == 'INBOX' && $folder->getGlobalName() == '/') - ) { - $this->files[] = [ - 'uniq' => $tempFile['uniq'], - 'flags' => $flags, - 'filename' => $newFile, - ]; - } - - if ($this->quota) { - $this->addQuotaEntry((int) $size, 1); - } - } - - /** - * move an existing message - * - * @param int $id number of message - * @param string|\Laminas\Mail\Storage\Folder $folder name or instance of targer folder - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - */ - public function moveMessage($id, $folder) - { - if (! ($folder instanceof Folder)) { - $folder = $this->getFolders($folder); - } - - if ($folder->getGlobalName() == $this->currentFolder - || ($this->currentFolder == 'INBOX' && $folder->getGlobalName() == '/') - ) { - throw new StorageException\RuntimeException('target is current folder'); - } - - $filedata = $this->getFileData($id); - $oldFile = $filedata['filename']; - $flags = $filedata['flags']; - - // moved message can't be recent - while (($key = array_search(Storage::FLAG_RECENT, $flags)) !== false) { - unset($flags[$key]); - } - $info = $this->getInfoString($flags); - - // reserving a new name - $tempFile = $this->createTmpFile($folder->getGlobalName()); - fclose($tempFile['handle']); - - // we're adding the size to the filename for maildir++ - $size = filesize($oldFile); - if ($size !== false) { - $info = ',S=' . $size . $info; - } - - $newFile = $tempFile['dirname'] . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . $tempFile['uniq'] . $info; - - // we're throwing any exception after removing our temp file and saving it to this variable instead - $exception = null; - - if (! rename($oldFile, $newFile)) { - $exception = new StorageException\RuntimeException('cannot move message file'); - } - - ErrorHandler::start(E_WARNING); - unlink($tempFile['filename']); - ErrorHandler::stop(); - - if ($exception) { - throw $exception; - } - - unset($this->files[$id - 1]); - // remove the gap - $this->files = array_values($this->files); - } - - /** - * set flags for message - * - * NOTE: this method can't set the recent flag. - * - * @param int $id number of message - * @param array $flags new flags for message - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - */ - public function setFlags($id, $flags) - { - $info = $this->getInfoString($flags); - $filedata = $this->getFileData($id); - - // NOTE: double dirname to make sure we always move to cur. if recent - // flag has been set (message is in new) it will be moved to cur. - $newFilename = dirname($filedata['filename'], 2) - . DIRECTORY_SEPARATOR - . 'cur' - . DIRECTORY_SEPARATOR - . "$filedata[uniq]$info"; - - ErrorHandler::start(); - $test = rename($filedata['filename'], $newFilename); - $error = ErrorHandler::stop(); - if (! $test) { - throw new StorageException\RuntimeException('cannot rename file', 0, $error); - } - - $filedata['flags'] = $flags; - $filedata['filename'] = $newFilename; - - $this->files[$id - 1] = $filedata; - } - - /** - * stub for not supported message deletion - * - * @param $id - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - */ - public function removeMessage($id) - { - $filename = $this->getFileData($id, 'filename'); - - if ($this->quota) { - $size = filesize($filename); - } - - ErrorHandler::start(); - $test = unlink($filename); - $error = ErrorHandler::stop(); - if (! $test) { - throw new StorageException\RuntimeException('cannot remove message', 0, $error); - } - unset($this->files[$id - 1]); - // remove the gap - $this->files = array_values($this->files); - if ($this->quota) { - $this->addQuotaEntry(0 - (int) $size, -1); - } - } - - /** - * enable/disable quota and set a quota value if wanted or needed - * - * You can enable/disable quota with true/false. If you don't have - * a MDA or want to enforce a quota value you can also set this value - * here. Use array('size' => SIZE_QUOTA, 'count' => MAX_MESSAGE) do - * define your quota. Order of these fields does matter! - * - * @param bool|array $value new quota value - */ - public function setQuota($value) - { - $this->quota = $value; - } - - /** - * get currently set quota - * - * @see \Laminas\Mail\Storage\Writable\Maildir::setQuota() - * @param bool $fromStorage - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - * @return bool|array - */ - public function getQuota($fromStorage = false) - { - if ($fromStorage) { - ErrorHandler::start(E_WARNING); - $fh = fopen($this->rootdir . 'maildirsize', 'r'); - $error = ErrorHandler::stop(); - if (! $fh) { - throw new StorageException\RuntimeException('cannot open maildirsize', 0, $error); - } - $definition = fgets($fh); - fclose($fh); - $definition = explode(',', trim($definition)); - $quota = []; - foreach ($definition as $member) { - $key = $member[strlen($member) - 1]; - if ($key == 'S' || $key == 'C') { - $key = $key == 'C' ? 'count' : 'size'; - } - $quota[$key] = substr($member, 0, -1); - } - return $quota; - } - - return $this->quota; - } - - /** - * @see http://www.inter7.com/courierimap/README.maildirquota.html "Calculating maildirsize" - * @throws \Laminas\Mail\Storage\Exception\RuntimeException - * @return array - */ - protected function calculateMaildirsize() - { - $timestamps = []; - $messages = 0; - $totalSize = 0; - - if (is_array($this->quota)) { - $quota = $this->quota; - } else { - try { - $quota = $this->getQuota(true); - } catch (StorageException\ExceptionInterface $e) { - throw new StorageException\RuntimeException('no quota definition found', 0, $e); - } - } - - $folders = new RecursiveIteratorIterator($this->getFolders(), RecursiveIteratorIterator::SELF_FIRST); - foreach ($folders as $folder) { - $subdir = $folder->getGlobalName(); - if ($subdir == 'INBOX') { - $subdir = ''; - } else { - $subdir = '.' . $subdir; - } - if ($subdir == 'Trash') { - continue; - } - - foreach (['cur', 'new'] as $subsubdir) { - $dirname = $this->rootdir . $subdir . DIRECTORY_SEPARATOR . $subsubdir . DIRECTORY_SEPARATOR; - if (! file_exists($dirname)) { - continue; - } - // NOTE: we are using mtime instead of "the latest timestamp". The latest would be atime - // and as we are accessing the directory it would make the whole calculation useless. - $timestamps[$dirname] = filemtime($dirname); - - $dh = opendir($dirname); - // NOTE: Should have been checked in constructor. Not throwing an exception here, quotas will - // therefore not be fully enforced, but next request will fail anyway, if problem persists. - if (! $dh) { - continue; - } - - while (($entry = readdir()) !== false) { - if ($entry[0] == '.' || ! is_file($dirname . $entry)) { - continue; - } - - if (strpos($entry, ',S=')) { - strtok($entry, '='); - $filesize = strtok(':'); - if (is_numeric($filesize)) { - $totalSize += $filesize; - ++$messages; - continue; - } - } - $size = filesize($dirname . $entry); - if ($size === false) { - // ignore, as we assume file got removed - continue; - } - $totalSize += $size; - ++$messages; - } - } - } - - $tmp = $this->createTmpFile(); - $fh = $tmp['handle']; - $definition = []; - foreach ($quota as $type => $value) { - if ($type == 'size' || $type == 'count') { - $type = $type == 'count' ? 'C' : 'S'; - } - $definition[] = $value . $type; - } - $definition = implode(',', $definition); - fwrite($fh, "$definition\n"); - fwrite($fh, "$totalSize $messages\n"); - fclose($fh); - rename($tmp['filename'], $this->rootdir . 'maildirsize'); - foreach ($timestamps as $dir => $timestamp) { - if ($timestamp < filemtime($dir)) { - unlink($this->rootdir . 'maildirsize'); - break; - } - } - - return [ - 'size' => $totalSize, - 'count' => $messages, - 'quota' => $quota, - ]; - } - - /** - * @see http://www.inter7.com/courierimap/README.maildirquota.html "Calculating the quota for a Maildir++" - * @param bool $forceRecalc - * @return array - */ - protected function calculateQuota($forceRecalc = false) - { - $fh = null; - $totalSize = 0; - $messages = 0; - $maildirsize = ''; - if (! $forceRecalc - && file_exists($this->rootdir . 'maildirsize') - && filesize($this->rootdir . 'maildirsize') < 5120 - ) { - $fh = fopen($this->rootdir . 'maildirsize', 'r'); - } - if ($fh) { - $maildirsize = fread($fh, 5120); - if (strlen($maildirsize) >= 5120) { - fclose($fh); - $fh = null; - $maildirsize = ''; - } - } - if (! $fh) { - $result = $this->calculateMaildirsize(); - $totalSize = $result['size']; - $messages = $result['count']; - $quota = $result['quota']; - } else { - $maildirsize = explode("\n", $maildirsize); - if (is_array($this->quota)) { - $quota = $this->quota; - } else { - $definition = explode(',', $maildirsize[0]); - $quota = []; - foreach ($definition as $member) { - $key = $member[strlen($member) - 1]; - if ($key == 'S' || $key == 'C') { - $key = $key == 'C' ? 'count' : 'size'; - } - $quota[$key] = substr($member, 0, -1); - } - } - unset($maildirsize[0]); - foreach ($maildirsize as $line) { - list($size, $count) = explode(' ', trim($line)); - $totalSize += $size; - $messages += $count; - } - } - - $overQuota = false; - $overQuota = $overQuota || (isset($quota['size']) && $totalSize > $quota['size']); - $overQuota = $overQuota || (isset($quota['count']) && $messages > $quota['count']); - // NOTE: $maildirsize equals false if it wasn't set (AKA we recalculated) or it's only - // one line, because $maildirsize[0] gets unsetted. - // Also we're using local time to calculate the 15 minute offset. Touching a file just for known the - // local time of the file storage isn't worth the hassle. - if ($overQuota && ($maildirsize || filemtime($this->rootdir . 'maildirsize') > time() - 900)) { - $result = $this->calculateMaildirsize(); - $totalSize = $result['size']; - $messages = $result['count']; - $quota = $result['quota']; - $overQuota = false; - $overQuota = $overQuota || (isset($quota['size']) && $totalSize > $quota['size']); - $overQuota = $overQuota || (isset($quota['count']) && $messages > $quota['count']); - } - - if ($fh) { - // TODO is there a safe way to keep the handle open for writing? - fclose($fh); - } - - return [ - 'size' => $totalSize, - 'count' => $messages, - 'quota' => $quota, - 'over_quota' => $overQuota, - ]; - } - - protected function addQuotaEntry($size, $count = 1) - { - if (! file_exists($this->rootdir . 'maildirsize')) { - // TODO: should get file handler from calculateQuota - } - $size = (int) $size; - $count = (int) $count; - file_put_contents($this->rootdir . 'maildirsize', "$size $count\n", FILE_APPEND); - } - - /** - * check if storage is currently over quota - * - * @see calculateQuota() - * @param bool $detailedResponse return known data of quota and current size and message count - * @param bool $forceRecalc - * @return bool|array over quota state or detailed response - */ - public function checkQuota($detailedResponse = false, $forceRecalc = false) - { - $result = $this->calculateQuota($forceRecalc); - return $detailedResponse ? $result : $result['over_quota']; - } -} diff --git a/lib/laminas/laminas-mail/src/Storage/Writable/WritableInterface.php b/lib/laminas/laminas-mail/src/Storage/Writable/WritableInterface.php deleted file mode 100644 index 9a005ba3b..000000000 --- a/lib/laminas/laminas-mail/src/Storage/Writable/WritableInterface.php +++ /dev/null @@ -1,86 +0,0 @@ -from; - } - - /** - * Set MAIL FROM - * - * @param string $from - */ - public function setFrom($from) - { - $this->from = (string) $from; - } - - /** - * Get RCPT TO - * - * @return string|null - */ - public function getTo() - { - return $this->to; - } - - /** - * Set RCPT TO - * - * @param string $to - */ - public function setTo($to) - { - $this->to = $to; - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/Exception/DomainException.php b/lib/laminas/laminas-mail/src/Transport/Exception/DomainException.php deleted file mode 100644 index d92b9d122..000000000 --- a/lib/laminas/laminas-mail/src/Transport/Exception/DomainException.php +++ /dev/null @@ -1,12 +0,0 @@ - File::class, - 'inmemory' => InMemory::class, - 'memory' => InMemory::class, - 'null' => InMemory::class, - 'sendmail' => Sendmail::class, - 'smtp' => Smtp::class, - ]; - - /** - * @param array $spec - * @return TransportInterface - * @throws Exception\InvalidArgumentException - * @throws Exception\DomainException - */ - public static function create($spec = []) - { - if ($spec instanceof Traversable) { - $spec = ArrayUtils::iteratorToArray($spec); - } - - if (! is_array($spec)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects an array or Traversable argument; received "%s"', - __METHOD__, - (is_object($spec) ? get_class($spec) : gettype($spec)) - )); - } - - $type = $spec['type'] ?? 'sendmail'; - - $normalizedType = strtolower($type); - - if (isset(static::$classMap[$normalizedType])) { - $type = static::$classMap[$normalizedType]; - } - - if (! class_exists($type)) { - throw new Exception\DomainException(sprintf( - '%s expects the "type" attribute to resolve to an existing class; received "%s"', - __METHOD__, - $type - )); - } - - $transport = new $type(); - - if (! $transport instanceof TransportInterface) { - throw new Exception\DomainException(sprintf( - '%s expects the "type" attribute to resolve to a valid %s instance; received "%s"', - __METHOD__, - TransportInterface::class, - $type - )); - } - - if ($transport instanceof Smtp && isset($spec['options'])) { - $transport->setOptions(new SmtpOptions($spec['options'])); - } - - if ($transport instanceof File && isset($spec['options'])) { - $transport->setOptions(new FileOptions($spec['options'])); - } - - return $transport; - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/File.php b/lib/laminas/laminas-mail/src/Transport/File.php deleted file mode 100644 index 7e772bb7f..000000000 --- a/lib/laminas/laminas-mail/src/Transport/File.php +++ /dev/null @@ -1,90 +0,0 @@ -setOptions($options); - } - - /** - * @return FileOptions - */ - public function getOptions() - { - return $this->options; - } - - /** - * Sets options - * - * @param FileOptions $options - */ - public function setOptions(FileOptions $options) - { - $this->options = $options; - } - - /** - * Saves e-mail message to a file - * - * @param Message $message - * @throws Exception\RuntimeException on not writable target directory or - * on file_put_contents() failure - */ - public function send(Message $message) - { - $options = $this->options; - $filename = $options->getCallback()($this); - $file = $options->getPath() . DIRECTORY_SEPARATOR . $filename; - $email = $message->toString(); - - if (false === file_put_contents($file, $email)) { - throw new Exception\RuntimeException(sprintf( - 'Unable to write mail to file (directory "%s")', - $options->getPath() - )); - } - - $this->lastFile = $file; - } - - /** - * Get the name of the last file written to - * - * @return string - */ - public function getLastFile() - { - return $this->lastFile; - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/FileOptions.php b/lib/laminas/laminas-mail/src/Transport/FileOptions.php deleted file mode 100644 index d6a811ed8..000000000 --- a/lib/laminas/laminas-mail/src/Transport/FileOptions.php +++ /dev/null @@ -1,89 +0,0 @@ -path = $path; - return $this; - } - - /** - * Get path - * - * If none is set, uses value from sys_get_temp_dir() - * - * @return string - */ - public function getPath() - { - if (null === $this->path) { - $this->setPath(sys_get_temp_dir()); - } - return $this->path; - } - - /** - * Set callback used to generate a file name - * - * @param callable $callback - * @throws \Laminas\Mail\Exception\InvalidArgumentException - * @return FileOptions - */ - public function setCallback($callback) - { - if (! is_callable($callback)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a valid callback; received "%s"', - __METHOD__, - (is_object($callback) ? get_class($callback) : gettype($callback)) - )); - } - $this->callback = $callback; - return $this; - } - - /** - * Get callback used to generate a file name - * - * @return callable - */ - public function getCallback() - { - if (null === $this->callback) { - $this->setCallback(function () { - return 'LaminasMail_' . time() . '_' . mt_rand() . '.eml'; - }); - } - return $this->callback; - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/InMemory.php b/lib/laminas/laminas-mail/src/Transport/InMemory.php deleted file mode 100644 index 49caf6adb..000000000 --- a/lib/laminas/laminas-mail/src/Transport/InMemory.php +++ /dev/null @@ -1,40 +0,0 @@ -lastMessage = $message; - } - - /** - * Get the last message sent. - * - * @return null|Message - */ - public function getLastMessage() - { - return $this->lastMessage; - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/Sendmail.php b/lib/laminas/laminas-mail/src/Transport/Sendmail.php deleted file mode 100644 index 807282017..000000000 --- a/lib/laminas/laminas-mail/src/Transport/Sendmail.php +++ /dev/null @@ -1,330 +0,0 @@ -setParameters($parameters); - } - $this->callable = [$this, 'mailHandler']; - } - - /** - * Set sendmail parameters - * - * Used to populate the additional_parameters argument to mail() - * - * @param null|string|array|Traversable $parameters - * @throws \Laminas\Mail\Transport\Exception\InvalidArgumentException - * @return Sendmail - */ - public function setParameters($parameters) - { - if ($parameters === null || is_string($parameters)) { - $this->parameters = $parameters; - return $this; - } - - if (! is_array($parameters) && ! $parameters instanceof Traversable) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a string, array, or Traversable object of parameters; received "%s"', - __METHOD__, - (is_object($parameters) ? get_class($parameters) : gettype($parameters)) - )); - } - - $string = ''; - foreach ($parameters as $param) { - $string .= ' ' . $param; - } - - $this->parameters = trim($string); - return $this; - } - - /** - * Set callback to use for mail - * - * Primarily for testing purposes, but could be used to curry arguments. - * - * @param callable $callable - * @throws \Laminas\Mail\Transport\Exception\InvalidArgumentException - * @return Sendmail - */ - public function setCallable($callable) - { - if (! is_callable($callable)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a callable argument; received "%s"', - __METHOD__, - (is_object($callable) ? get_class($callable) : gettype($callable)) - )); - } - $this->callable = $callable; - return $this; - } - - /** - * Send a message - * - * @param \Laminas\Mail\Message $message - */ - public function send(Mail\Message $message) - { - $to = $this->prepareRecipients($message); - $subject = $this->prepareSubject($message); - $body = $this->prepareBody($message); - $headers = $this->prepareHeaders($message); - $params = $this->prepareParameters($message); - - // On *nix platforms, we need to replace \r\n with \n - // sendmail is not an SMTP server, it is a unix command - it expects LF - if (PHP_VERSION_ID < 80000 && ! $this->isWindowsOs()) { - $to = str_replace("\r\n", "\n", $to); - $subject = str_replace("\r\n", "\n", $subject); - $body = str_replace("\r\n", "\n", $body); - $headers = str_replace("\r\n", "\n", $headers); - } - - ($this->callable)($to, $subject, $body, $headers, $params); - } - - /** - * Prepare recipients list - * - * @param \Laminas\Mail\Message $message - * @throws \Laminas\Mail\Transport\Exception\RuntimeException - * @return string - */ - protected function prepareRecipients(Mail\Message $message) - { - $headers = $message->getHeaders(); - - $hasTo = $headers->has('to'); - if (! $hasTo && ! $headers->has('cc') && ! $headers->has('bcc')) { - throw new Exception\RuntimeException( - 'Invalid email; contains no at least one of "To", "Cc", and "Bcc" header' - ); - } - - if (! $hasTo) { - return ''; - } - - /** @var Mail\Header\To $to */ - $to = $headers->get('to'); - $list = $to->getAddressList(); - if (0 == count($list)) { - throw new Exception\RuntimeException('Invalid "To" header; contains no addresses'); - } - - // If not on Windows, return normal string - if (! $this->isWindowsOs()) { - return $to->getFieldValue(HeaderInterface::FORMAT_ENCODED); - } - - // Otherwise, return list of emails - $addresses = []; - foreach ($list as $address) { - $addresses[] = $address->getEmail(); - } - $addresses = implode(', ', $addresses); - return $addresses; - } - - /** - * Prepare the subject line string - * - * @param \Laminas\Mail\Message $message - * @return string - */ - protected function prepareSubject(Mail\Message $message) - { - $headers = $message->getHeaders(); - if (! $headers->has('subject')) { - return; - } - $header = $headers->get('subject'); - return $header->getFieldValue(HeaderInterface::FORMAT_ENCODED); - } - - /** - * Prepare the body string - * - * @param \Laminas\Mail\Message $message - * @return string - */ - protected function prepareBody(Mail\Message $message) - { - if (! $this->isWindowsOs()) { - // *nix platforms can simply return the body text - return $message->getBodyText(); - } - - // On windows, lines beginning with a full stop need to be fixed - $text = $message->getBodyText(); - $text = str_replace("\n.", "\n..", $text); - return $text; - } - - /** - * Prepare the textual representation of headers - * - * @param \Laminas\Mail\Message $message - * @return string - */ - protected function prepareHeaders(Mail\Message $message) - { - // Strip the "to" and "subject" headers - $headers = clone $message->getHeaders(); - $headers->removeHeader('To'); - $headers->removeHeader('Subject'); - - /** @var Mail\Header\From $from Sanitize the From header*/ - $from = $headers->get('From'); - if ($from) { - foreach ($from->getAddressList() as $address) { - if (strpos($address->getEmail(), '\\"') !== false) { - throw new Exception\RuntimeException('Potential code injection in From header'); - } - } - } - return $headers->toString(); - } - - /** - * Prepare additional_parameters argument - * - * Basically, overrides the MAIL FROM envelope with either the Sender or - * From address. - * - * @param \Laminas\Mail\Message $message - * @return string - */ - protected function prepareParameters(Mail\Message $message) - { - if ($this->isWindowsOs()) { - return; - } - - $parameters = (string) $this->parameters; - if (preg_match('/(^| )\-f.+/', $parameters)) { - return $parameters; - } - - $sender = $message->getSender(); - if ($sender instanceof AddressInterface) { - $parameters .= ' -f' . \escapeshellarg($sender->getEmail()); - return $parameters; - } - - $from = $message->getFrom(); - if (count($from)) { - $from->rewind(); - $sender = $from->current(); - $parameters .= ' -f' . \escapeshellarg($sender->getEmail()); - return $parameters; - } - - return $parameters; - } - - /** - * Send mail using PHP native mail() - * - * @param string $to - * @param string $subject - * @param string $message - * @param string $headers - * @param $parameters - * @throws \Laminas\Mail\Transport\Exception\RuntimeException - */ - public function mailHandler($to, $subject, $message, $headers, $parameters) - { - set_error_handler([$this, 'handleMailErrors']); - if ($parameters === null) { - $result = mail($to, $subject, $message, $headers); - } else { - $result = mail($to, $subject, $message, $headers, $parameters); - } - restore_error_handler(); - - if ($this->errstr !== null || ! $result) { - $errstr = $this->errstr; - if (empty($errstr)) { - $errstr = 'Unknown error'; - } - throw new Exception\RuntimeException('Unable to send mail: ' . $errstr); - } - } - - /** - * Temporary error handler for PHP native mail(). - * - * @param int $errno - * @param string $errstr - * @param string $errfile - * @param string $errline - * @param array $errcontext - * @return bool always true - */ - public function handleMailErrors($errno, $errstr, $errfile = null, $errline = null, array $errcontext = null) - { - $this->errstr = $errstr; - return true; - } - - /** - * Is this a windows OS? - * - * @return bool - */ - protected function isWindowsOs() - { - if (! $this->operatingSystem) { - $this->operatingSystem = strtoupper(substr(PHP_OS, 0, 3)); - } - return ($this->operatingSystem == 'WIN'); - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/Smtp.php b/lib/laminas/laminas-mail/src/Transport/Smtp.php deleted file mode 100644 index 51e544697..000000000 --- a/lib/laminas/laminas-mail/src/Transport/Smtp.php +++ /dev/null @@ -1,400 +0,0 @@ -setOptions($options); - } - - /** - * Set options - * - * @param SmtpOptions $options - * @return Smtp - */ - public function setOptions(SmtpOptions $options) - { - $this->options = $options; - return $this; - } - - /** - * Get options - * - * @return SmtpOptions - */ - public function getOptions() - { - return $this->options; - } - - /** - * Set options - * - * @param Envelope $envelope - */ - public function setEnvelope(Envelope $envelope) - { - $this->envelope = $envelope; - } - - /** - * Get envelope - * - * @return Envelope|null - */ - public function getEnvelope() - { - return $this->envelope; - } - - /** - * Set plugin manager for obtaining SMTP protocol connection - * - * @param Protocol\SmtpPluginManager $plugins - * @throws Exception\InvalidArgumentException - * @return Smtp - */ - public function setPluginManager(Protocol\SmtpPluginManager $plugins) - { - $this->plugins = $plugins; - return $this; - } - - /** - * Get plugin manager for loading SMTP protocol connection - * - * @return Protocol\SmtpPluginManager - */ - public function getPluginManager() - { - if (null === $this->plugins) { - $this->setPluginManager(new Protocol\SmtpPluginManager(new ServiceManager())); - } - return $this->plugins; - } - - /** - * Set the automatic disconnection when destruct - * - * @param bool $flag - * @return Smtp - */ - public function setAutoDisconnect($flag) - { - $this->autoDisconnect = (bool) $flag; - return $this; - } - - /** - * Get the automatic disconnection value - * - * @return bool - */ - public function getAutoDisconnect() - { - return $this->autoDisconnect; - } - - /** - * Return an SMTP connection - * - * @param string $name - * @param array|null $options - * @return Protocol\Smtp - */ - public function plugin($name, array $options = null) - { - return $this->getPluginManager()->get($name, $options); - } - - /** - * Class destructor to ensure all open connections are closed - */ - public function __destruct() - { - if (! $this->getConnection() instanceof Protocol\Smtp) { - return; - } - - try { - $this->getConnection()->quit(); - } catch (ProtocolException\ExceptionInterface $e) { - // ignore - } - - if ($this->autoDisconnect) { - $this->getConnection()->disconnect(); - } - } - - /** - * Sets the connection protocol instance - * - * @param Protocol\AbstractProtocol $connection - */ - public function setConnection(Protocol\AbstractProtocol $connection) - { - $this->connection = $connection; - if (($connection instanceof Protocol\Smtp) - && ($this->getOptions()->getConnectionTimeLimit() !== null) - ) { - $connection->setUseCompleteQuit(false); - } - } - - /** - * Gets the connection protocol instance - * - * @return Protocol\Smtp - */ - public function getConnection() - { - $timeLimit = $this->getOptions()->getConnectionTimeLimit(); - if ($timeLimit !== null - && $this->connectedTime !== null - && ((time() - $this->connectedTime) > $timeLimit) - ) { - $this->connection = null; - } - return $this->connection; - } - - /** - * Disconnect the connection protocol instance - * - * @return void - */ - public function disconnect() - { - if ($this->getConnection() instanceof Protocol\Smtp) { - $this->getConnection()->disconnect(); - $this->connectedTime = null; - } - } - - /** - * Send an email via the SMTP connection protocol - * - * The connection via the protocol adapter is made just-in-time to allow a - * developer to add a custom adapter if required before mail is sent. - * - * @param Message $message - * @throws Exception\RuntimeException - */ - public function send(Message $message) - { - // If sending multiple messages per session use existing adapter - $connection = $this->getConnection(); - - if (! ($connection instanceof Protocol\Smtp) || ! $connection->hasSession()) { - $connection = $this->connect(); - } else { - // Reset connection to ensure reliable transaction - $connection->rset(); - } - - // Prepare message - $from = $this->prepareFromAddress($message); - $recipients = $this->prepareRecipients($message); - $headers = $this->prepareHeaders($message); - $body = $this->prepareBody($message); - - if ((count($recipients) == 0) && (! empty($headers) || ! empty($body))) { - // Per RFC 2821 3.3 (page 18) - throw new Exception\RuntimeException( - sprintf( - '%s transport expects at least one recipient if the message has at least one header or body', - __CLASS__ - ) - ); - } - - // Set sender email address - $connection->mail($from); - - // Set recipient forward paths - foreach ($recipients as $recipient) { - $connection->rcpt($recipient); - } - - // Issue DATA command to client - $connection->data($headers . Headers::EOL . $body); - } - - /** - * Retrieve email address for envelope FROM - * - * @param Message $message - * @throws Exception\RuntimeException - * @return string - */ - protected function prepareFromAddress(Message $message) - { - if ($this->getEnvelope() && $this->getEnvelope()->getFrom()) { - return $this->getEnvelope()->getFrom(); - } - - $sender = $message->getSender(); - if ($sender instanceof Address\AddressInterface) { - return $sender->getEmail(); - } - - $from = $message->getFrom(); - if (! count($from)) { - // Per RFC 2822 3.6 - throw new Exception\RuntimeException(sprintf( - '%s transport expects either a Sender or at least one From address in the Message; none provided', - __CLASS__ - )); - } - - $from->rewind(); - $sender = $from->current(); - return $sender->getEmail(); - } - - /** - * Prepare array of email address recipients - * - * @param Message $message - * @return array - */ - protected function prepareRecipients(Message $message) - { - if ($this->getEnvelope() && $this->getEnvelope()->getTo()) { - return (array) $this->getEnvelope()->getTo(); - } - - $recipients = []; - foreach ($message->getTo() as $address) { - $recipients[] = $address->getEmail(); - } - foreach ($message->getCc() as $address) { - $recipients[] = $address->getEmail(); - } - foreach ($message->getBcc() as $address) { - $recipients[] = $address->getEmail(); - } - - $recipients = array_unique($recipients); - return $recipients; - } - - /** - * Prepare header string from message - * - * @param Message $message - * @return string - */ - protected function prepareHeaders(Message $message) - { - $headers = clone $message->getHeaders(); - $headers->removeHeader('Bcc'); - return $headers->toString(); - } - - /** - * Prepare body string from message - * - * @param Message $message - * @return string - */ - protected function prepareBody(Message $message) - { - return $message->getBodyText(); - } - - /** - * Lazy load the connection - * - * @return Protocol\Smtp - */ - protected function lazyLoadConnection() - { - // Check if authentication is required and determine required class - $options = $this->getOptions(); - $config = $options->getConnectionConfig(); - $config['host'] = $options->getHost(); - $config['port'] = $options->getPort(); - - $this->setConnection($this->plugin($options->getConnectionClass(), $config)); - - return $this->connect(); - } - - /** - * Connect the connection, and pass it helo - * - * @return Protocol\Smtp - */ - protected function connect() - { - if (! $this->connection instanceof Protocol\Smtp) { - return $this->lazyLoadConnection(); - } - - $this->connection->connect(); - - $this->connectedTime = time(); - - $this->connection->helo($this->getOptions()->getName()); - - return $this->connection; - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/SmtpOptions.php b/lib/laminas/laminas-mail/src/Transport/SmtpOptions.php deleted file mode 100644 index 268d2ba4f..000000000 --- a/lib/laminas/laminas-mail/src/Transport/SmtpOptions.php +++ /dev/null @@ -1,203 +0,0 @@ -name; - } - - /** - * Set the local client hostname or IP - * - * @todo hostname/IP validation - * @param string $name - * @throws \Laminas\Mail\Exception\InvalidArgumentException - * @return SmtpOptions - */ - public function setName($name) - { - if (! is_string($name) && $name !== null) { - throw new Exception\InvalidArgumentException(sprintf( - 'Name must be a string or null; argument of type "%s" provided', - (is_object($name) ? get_class($name) : gettype($name)) - )); - } - $this->name = $name; - return $this; - } - - /** - * Get connection class - * - * This should be either the class Laminas\Mail\Protocol\Smtp or a class - * extending it -- typically a class in the Laminas\Mail\Protocol\Smtp\Auth - * namespace. - * - * @return string - */ - public function getConnectionClass() - { - return $this->connectionClass; - } - - /** - * Set connection class - * - * @param string $connectionClass the value to be set - * @throws \Laminas\Mail\Exception\InvalidArgumentException - * @return SmtpOptions - */ - public function setConnectionClass($connectionClass) - { - if (! is_string($connectionClass) && $connectionClass !== null) { - throw new Exception\InvalidArgumentException(sprintf( - 'Connection class must be a string or null; argument of type "%s" provided', - (is_object($connectionClass) ? get_class($connectionClass) : gettype($connectionClass)) - )); - } - $this->connectionClass = $connectionClass; - return $this; - } - - /** - * Get connection configuration array - * - * @return array - */ - public function getConnectionConfig() - { - return $this->connectionConfig; - } - - /** - * Set connection configuration array - * - * @param array $connectionConfig - * @return SmtpOptions - */ - public function setConnectionConfig(array $connectionConfig) - { - $this->connectionConfig = $connectionConfig; - return $this; - } - - /** - * Get the host name - * - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Set the SMTP host - * - * @todo hostname/IP validation - * @param string $host - * @return SmtpOptions - */ - public function setHost($host) - { - $this->host = (string) $host; - return $this; - } - - /** - * Get the port the SMTP server runs on - * - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Set the port the SMTP server runs on - * - * @param int $port - * @throws \Laminas\Mail\Exception\InvalidArgumentException - * @return SmtpOptions - */ - public function setPort($port) - { - $port = (int) $port; - if ($port < 1) { - throw new Exception\InvalidArgumentException(sprintf( - 'Port must be greater than 1; received "%d"', - $port - )); - } - $this->port = $port; - return $this; - } - - /** - * @return int|null - */ - public function getConnectionTimeLimit() - { - return $this->connectionTimeLimit; - } - - /** - * @param int|null $seconds - * @return self - */ - public function setConnectionTimeLimit($seconds) - { - $this->connectionTimeLimit = $seconds === null - ? null - : (int) $seconds; - - return $this; - } -} diff --git a/lib/laminas/laminas-mail/src/Transport/TransportInterface.php b/lib/laminas/laminas-mail/src/Transport/TransportInterface.php deleted file mode 100644 index 274d44e40..000000000 --- a/lib/laminas/laminas-mail/src/Transport/TransportInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only). -> If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/). -> If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D) -> -> If you are looking for an actively maintained package alternative, we recommend: -> -> - [symfony/mime](https://symfony.com/doc/current/components/mime.html) - -[![Build Status](https://github.com/laminas/laminas-mime/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-mime/actions?query=workflow%3A"Continuous+Integration") - -`Laminas\Mime` is a support class for handling multipart MIME messages. -It is used by `Laminas\Mail` and `Laminas\Mime\Message` and may be used by applications requiring MIME support. - -## Installation - -Run the following to install this library: - -```bash -$ composer require laminas/laminas-mime -``` - -## Documentation - -Browse the documentation online at https://docs.laminas.dev/laminas-mime/ - -## Support - -- [Issues](https://github.com/laminas/laminas-mime/issues/) -- [Chat](https://laminas.dev/chat/) -- [Forum](https://discourse.laminas.dev/) diff --git a/lib/laminas/laminas-mime/composer.json b/lib/laminas/laminas-mime/composer.json deleted file mode 100644 index abd18699a..000000000 --- a/lib/laminas/laminas-mime/composer.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "laminas/laminas-mime", - "description": "Create and parse MIME messages and parts", - "license": "BSD-3-Clause", - "keywords": [ - "laminas", - "mime" - ], - "homepage": "https://laminas.dev", - "support": { - "docs": "https://docs.laminas.dev/laminas-mime/", - "issues": "https://github.com/laminas/laminas-mime/issues", - "source": "https://github.com/laminas/laminas-mime", - "rss": "https://github.com/laminas/laminas-mime/releases.atom", - "chat": "https://laminas.dev/chat", - "forum": "https://discourse.laminas.dev" - }, - "config": { - "sort-packages": true - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", - "laminas/laminas-stdlib": "^2.7 || ^3.0" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-mail": "^2.12", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "laminas/laminas-mail": "Laminas\\Mail component" - }, - "autoload": { - "psr-4": { - "Laminas\\Mime\\": "src/" - } - }, - "autoload-dev": { - "files": [ - "test/TestAsset/Mail/Headers.php" - ], - "psr-4": { - "LaminasTest\\Mime\\": "test/" - } - }, - "scripts": { - "check": [ - "@cs-check", - "@test" - ], - "cs-check": "phpcs", - "cs-fix": "phpcbf", - "test": "phpunit --colors=always", - "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" - }, - "conflict": { - "zendframework/zend-mime": "*" - } -} diff --git a/lib/laminas/laminas-mime/composer.lock b/lib/laminas/laminas-mime/composer.lock deleted file mode 100644 index aeeb2d372..000000000 --- a/lib/laminas/laminas-mime/composer.lock +++ /dev/null @@ -1,3023 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "77a8daa5c98d4a651b4fab53280b68e4", - "packages": [ - { - "name": "laminas/laminas-stdlib", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "c53d8537f108fac3fae652677a19735db730ba46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/c53d8537f108fac3fae652677a19735db730ba46", - "reference": "c53d8537f108fac3fae652677a19735db730ba46", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-stdlib": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^0.17.1", - "phpunit/phpunit": "~9.3.7", - "psalm/plugin-phpunit": "^0.16.0", - "vimeo/psalm": "^4.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "source": "https://github.com/laminas/laminas-stdlib" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-02T16:11:32+00:00" - } - ], - "packages-dev": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "support": { - "issues": "https://github.com/container-interop/container-interop/issues", - "source": "https://github.com/container-interop/container-interop/tree/master" - }, - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" - }, - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.1", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2020-12-07T18:04:37+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "laminas/laminas-coding-standard", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "c953ecb1d37034f4aa326046e2c24a10fe0a2845" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/c953ecb1d37034f4aa326046e2c24a10fe0a2845", - "reference": "c953ecb1d37034f4aa326046e2c24a10fe0a2845", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.3 || ~8.0.0", - "slevomat/coding-standard": "^6.4.1", - "squizlabs/php_codesniffer": "^3.5.8", - "webimpress/coding-standard": "^1.1.6" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "LaminasCodingStandard\\": "src/LaminasCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas Coding Standard", - "homepage": "https://laminas.dev", - "keywords": [ - "Coding Standard", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-coding-standard/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-coding-standard/issues", - "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", - "source": "https://github.com/laminas/laminas-coding-standard" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-05-17T17:39:41+00:00" - }, - { - "name": "laminas/laminas-loader", - "version": "2.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-loader.git", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-loader": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Loader\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Autoloading and plugin loading strategies", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "loader" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-loader/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-loader/issues", - "rss": "https://github.com/laminas/laminas-loader/releases.atom", - "source": "https://github.com/laminas/laminas-loader" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-02T18:30:53+00:00" - }, - { - "name": "laminas/laminas-mail", - "version": "2.14.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-mail.git", - "reference": "180c6c7baa37cba16fe9fd34af0f346e796cf1a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/180c6c7baa37cba16fe9fd34af0f346e796cf1a1", - "reference": "180c6c7baa37cba16fe9fd34af0f346e796cf1a1", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "laminas/laminas-loader": "^2.5", - "laminas/laminas-mime": "^2.5", - "laminas/laminas-stdlib": "^2.7 || ^3.0", - "laminas/laminas-validator": "^2.10.2", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0", - "symfony/polyfill-mbstring": "^1.12.0", - "true/punycode": "^2.1" - }, - "replace": { - "zendframework/zend-mail": "^2.10.0" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-config": "^3.4", - "laminas/laminas-crypt": "^2.6 || ^3.0", - "laminas/laminas-servicemanager": "^3.2.1", - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.7" - }, - "suggest": { - "laminas/laminas-crypt": "Crammd5 support in SMTP Auth", - "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Mail", - "config-provider": "Laminas\\Mail\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Mail\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "mail" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-mail/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-mail/issues", - "rss": "https://github.com/laminas/laminas-mail/releases.atom", - "source": "https://github.com/laminas/laminas-mail" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-05-20T04:00:23+00:00" - }, - { - "name": "laminas/laminas-validator", - "version": "2.14.5", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-validator.git", - "reference": "4680bc4241cb5b3ff78954c421fe43105ca413b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/4680bc4241cb5b3ff78954c421fe43105ca413b7", - "reference": "4680bc4241cb5b3ff78954c421fe43105ca413b7", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-stdlib": "^3.3", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0" - }, - "replace": { - "zendframework/zend-validator": "^2.13.0" - }, - "require-dev": { - "laminas/laminas-cache": "^2.6.1", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-config": "^2.6", - "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.6", - "laminas/laminas-http": "^2.14.2", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-math": "^2.6", - "laminas/laminas-servicemanager": "^2.7.11 || ^3.0.3", - "laminas/laminas-session": "^2.8", - "laminas/laminas-uri": "^2.7", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.15.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "vimeo/psalm": "^4.3" - }, - "suggest": { - "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", - "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", - "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", - "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-math": "Laminas\\Math component, required by the Csrf validator", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", - "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", - "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Validator", - "config-provider": "Laminas\\Validator\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Validator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "validator" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-validator/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-validator/issues", - "rss": "https://github.com/laminas/laminas-validator/releases.atom", - "source": "https://github.com/laminas/laminas-validator" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-07-14T13:59:23+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "13af2502d9bb6f7d33be2de4b51fb68c6cdb476e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/13af2502d9bb6f7d33be2de4b51fb68c6cdb476e", - "reference": "13af2502d9bb6f7d33be2de4b51fb68c6cdb476e", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-06-24T12:49:22+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.12.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" - }, - "time": "2021-07-21T10:44:31+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, - "time": "2020-09-17T18:55:26+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.13.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" - }, - "time": "2021-03-17T13:42:18+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "0.4.9", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "consistence/coding-standard": "^3.5", - "ergebnis/composer-normalize": "^2.0.2", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.26", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^4.7.2", - "symfony/process": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/master" - }, - "time": "2020-08-03T20:32:43+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-03-28T07:26:59+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:57:25+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" - }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-08-31T06:47:40+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:52:38+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:24:23+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-11T13:31:12+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-15T12:49:02+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "6.4.1", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", - "squizlabs/php_codesniffer": "^3.5.6" - }, - "require-dev": { - "phing/phing": "2.16.3", - "php-parallel-lint/php-parallel-lint": "1.2.0", - "phpstan/phpstan": "0.12.48", - "phpstan/phpstan-deprecation-rules": "0.12.5", - "phpstan/phpstan-phpunit": "0.12.16", - "phpstan/phpstan-strict-rules": "0.12.5", - "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/6.4.1" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2020-10-05T12:39:37+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-04-09T00:54:41+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T12:26:48+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "true/punycode", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/true/php-punycode.git", - "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/true/php-punycode/zipball/a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", - "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.7", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "TrueBV\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Renan Gonçalves", - "email": "renan.saddam@gmail.com" - } - ], - "description": "A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)", - "homepage": "https://github.com/true/php-punycode", - "keywords": [ - "idna", - "punycode" - ], - "support": { - "issues": "https://github.com/true/php-punycode/issues", - "source": "https://github.com/true/php-punycode/tree/master" - }, - "time": "2016-11-16T10:37:54+00:00" - }, - { - "name": "webimpress/coding-standard", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/webimpress/coding-standard.git", - "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/8f4a220de33f471a8101836f7ec72b852c3f9f03", - "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.4" - }, - "type": "phpcodesniffer-standard", - "extra": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - }, - "autoload": { - "psr-4": { - "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "Webimpress Coding Standard", - "keywords": [ - "Coding Standard", - "PSR-2", - "phpcs", - "psr-12", - "webimpress" - ], - "support": { - "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.2" - }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2021-04-12T12:51:27+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/lib/laminas/laminas-mime/phpcs.xml.dist b/lib/laminas/laminas-mime/phpcs.xml.dist deleted file mode 100644 index 7f391d80a..000000000 --- a/lib/laminas/laminas-mime/phpcs.xml.dist +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - src - test - - - - diff --git a/lib/laminas/laminas-mime/src/Decode.php b/lib/laminas/laminas-mime/src/Decode.php deleted file mode 100644 index 5afdeab2d..000000000 --- a/lib/laminas/laminas-mime/src/Decode.php +++ /dev/null @@ -1,240 +0,0 @@ - array(name => value), 'body' => content), null if no parts found - * @throws Exception\RuntimeException - */ - public static function splitMessageStruct($message, $boundary, $EOL = Mime::LINEEND) - { - $parts = static::splitMime($message, $boundary); - if (! $parts) { - return; - } - $result = []; - $headers = null; // "Declare" variable before the first usage "for reading" - $body = null; // "Declare" variable before the first usage "for reading" - foreach ($parts as $part) { - static::splitMessage($part, $headers, $body, $EOL); - $result[] = [ - 'header' => $headers, - 'body' => $body, - ]; - } - return $result; - } - - /** - * split a message in header and body part, if no header or an - * invalid header is found $headers is empty - * - * The charset of the returned headers depend on your iconv settings. - * - * @param string|Headers $message raw message with header and optional content - * @param Headers $headers output param, headers container - * @param string $body output param, content of message - * @param string $EOL EOL string; defaults to {@link Laminas\Mime\Mime::LINEEND} - * @param bool $strict enable strict mode for parsing message - * @return null - */ - public static function splitMessage($message, &$headers, &$body, $EOL = Mime::LINEEND, $strict = false) - { - if ($message instanceof Headers) { - $message = $message->toString(); - } - // check for valid header at first line - $firstlinePos = strpos($message, "\n"); - $firstline = $firstlinePos === false ? $message : substr($message, 0, $firstlinePos); - if (! preg_match('%^[^\s]+[^:]*:%', $firstline)) { - $headers = new Headers(); - // TODO: we're ignoring \r for now - is this function fast enough and is it safe to assume noone needs \r? - $body = str_replace(["\r", "\n"], ['', $EOL], $message); - return; - } - - // see @Laminas-372, pops the first line off a message if it doesn't contain a header - if (! $strict) { - $parts = explode(':', $firstline, 2); - if (count($parts) !== 2) { - $message = substr($message, strpos($message, $EOL) + 1); - } - } - - // @todo splitMime removes "\r" sequences, which breaks valid mime - // messages as returned by many mail servers - $headersEOL = $EOL; - - // find an empty line between headers and body - // default is set new line - // @todo Maybe this is too much "magic"; we should be more strict here - if (strpos($message, $EOL . $EOL)) { - [$headers, $body] = explode($EOL . $EOL, $message, 2); - // next is the standard new line - } elseif ($EOL !== "\r\n" && strpos($message, "\r\n\r\n")) { - [$headers, $body] = explode("\r\n\r\n", $message, 2); - $headersEOL = "\r\n"; // Headers::fromString will fail with incorrect EOL - // next is the other "standard" new line - } elseif ($EOL !== "\n" && strpos($message, "\n\n")) { - [$headers, $body] = explode("\n\n", $message, 2); - $headersEOL = "\n"; - // at last resort find anything that looks like a new line - } else { - ErrorHandler::start(E_NOTICE | E_WARNING); - [$headers, $body] = preg_split("%([\r\n]+)\\1%U", $message, 2); - ErrorHandler::stop(); - } - - $headers = Headers::fromString($headers, $headersEOL); - } - - /** - * split a content type in its different parts - * - * @param string $type content-type - * @param string $wantedPart the wanted part, else an array with all parts is returned - * @return string|array wanted part or all parts as array('type' => content-type, partname => value) - */ - public static function splitContentType($type, $wantedPart = null) - { - return static::splitHeaderField($type, $wantedPart, 'type'); - } - - /** - * split a header field like content type in its different parts - * - * @param string $field header field - * @param string $wantedPart the wanted part, else an array with all parts is returned - * @param string $firstName key name for the first part - * @return string|array wanted part or all parts as array($firstName => firstPart, partname => value) - * @throws Exception\RuntimeException - */ - public static function splitHeaderField($field, $wantedPart = null, $firstName = '0') - { - $wantedPart = strtolower($wantedPart ?? ''); - $firstName = strtolower($firstName); - - // special case - a bit optimized - if ($firstName === $wantedPart) { - $field = strtok($field, ';'); - return $field[0] === '"' ? substr($field, 1, -1) : $field; - } - - $field = $firstName . '=' . $field; - if (! preg_match_all('%([^=\s]+)\s*=\s*("[^"]+"|[^;]+)(;\s*|$)%', $field, $matches)) { - throw new Exception\RuntimeException('not a valid header field'); - } - - if ($wantedPart) { - foreach ($matches[1] as $key => $name) { - if (strcasecmp($name, $wantedPart)) { - continue; - } - if ($matches[2][$key][0] !== '"') { - return $matches[2][$key]; - } - return substr($matches[2][$key], 1, -1); - } - return; - } - - $split = []; - foreach ($matches[1] as $key => $name) { - $name = strtolower($name); - if ($matches[2][$key][0] === '"') { - $split[$name] = substr($matches[2][$key], 1, -1); - } else { - $split[$name] = $matches[2][$key]; - } - } - - return $split; - } - - /** - * decode a quoted printable encoded string - * - * The charset of the returned string depends on your iconv settings. - * - * @param string $string encoded string - * @return string decoded string - */ - public static function decodeQuotedPrintable($string) - { - return iconv_mime_decode($string, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8'); - } -} diff --git a/lib/laminas/laminas-mime/src/Exception/ExceptionInterface.php b/lib/laminas/laminas-mime/src/Exception/ExceptionInterface.php deleted file mode 100644 index 762e2c007..000000000 --- a/lib/laminas/laminas-mime/src/Exception/ExceptionInterface.php +++ /dev/null @@ -1,7 +0,0 @@ -parts; - } - - /** - * Sets the given array of Laminas\Mime\Part as the array for the message - * - * @param array $parts - * @return self - */ - public function setParts($parts) - { - $this->parts = $parts; - return $this; - } - - /** - * Append a new Laminas\Mime\Part to the current message - * - * @throws Exception\InvalidArgumentException - * @return self - */ - public function addPart(Part $part) - { - foreach ($this->getParts() as $row) { - if ($part === $row) { - throw new Exception\InvalidArgumentException(sprintf( - 'Provided part %s already defined.', - $part->getId() - )); - } - } - - $this->parts[] = $part; - return $this; - } - - /** - * Check if message needs to be sent as multipart - * MIME message or if it has only one part. - * - * @return bool - */ - public function isMultiPart() - { - return count($this->parts) > 1; - } - - /** - * Set Laminas\Mime\Mime object for the message - * - * This can be used to set the boundary specifically or to use a subclass of - * Laminas\Mime for generating the boundary. - * - * @return self - */ - public function setMime(Mime $mime) - { - $this->mime = $mime; - return $this; - } - - /** - * Returns the Laminas\Mime\Mime object in use by the message - * - * If the object was not present, it is created and returned. Can be used to - * determine the boundary used in this message. - * - * @return Mime - */ - public function getMime() - { - if ($this->mime === null) { - $this->mime = new Mime(); - } - - return $this->mime; - } - - /** - * Generate MIME-compliant message from the current configuration - * - * This can be a multipart message if more than one MIME part was added. If - * only one part is present, the content of this part is returned. If no - * part had been added, an empty string is returned. - * - * Parts are separated by the mime boundary as defined in Laminas\Mime\Mime. If - * {@link setMime()} has been called before this method, the Laminas\Mime\Mime - * object set by this call will be used. Otherwise, a new Laminas\Mime\Mime object - * is generated and used. - * - * @param string $EOL EOL string; defaults to {@link Laminas\Mime\Mime::LINEEND} - * @return string - */ - public function generateMessage($EOL = Mime::LINEEND) - { - if (! $this->isMultiPart()) { - if (empty($this->parts)) { - return ''; - } - $part = current($this->parts); - $body = $part->getContent($EOL); - } else { - $mime = $this->getMime(); - - $boundaryLine = $mime->boundaryLine($EOL); - $body = 'This is a message in Mime Format. If you see this, ' - . "your mail reader does not support this format." . $EOL; - - foreach (array_keys($this->parts) as $p) { - $body .= $boundaryLine - . $this->getPartHeaders($p, $EOL) - . $EOL - . $this->getPartContent($p, $EOL); - } - - $body .= $mime->mimeEnd($EOL); - } - - return trim($body); - } - - /** - * Get the headers of a given part as an array - * - * @param int $partnum - * @return array - */ - public function getPartHeadersArray($partnum) - { - return $this->parts[$partnum]->getHeadersArray(); - } - - /** - * Get the headers of a given part as a string - * - * @param int $partnum - * @param string $EOL - * @return string - */ - public function getPartHeaders($partnum, $EOL = Mime::LINEEND) - { - return $this->parts[$partnum]->getHeaders($EOL); - } - - /** - * Get the (encoded) content of a given part as a string - * - * @param int $partnum - * @param string $EOL - * @return string - */ - public function getPartContent($partnum, $EOL = Mime::LINEEND) - { - return $this->parts[$partnum]->getContent($EOL); - } - - /** - * Explode MIME multipart string into separate parts - * - * Parts consist of the header and the body of each MIME part. - * - * @param string $body - * @param string $boundary - * @throws Exception\RuntimeException - * @return array - */ - protected static function _disassembleMime($body, $boundary) - { - $start = 0; - $res = []; - // find every mime part limiter and cut out the - // string before it. - // the part before the first boundary string is discarded: - $p = strpos($body, '--' . $boundary . "\n", $start); - if ($p === false) { - // no parts found! - return []; - } - - // position after first boundary line - $start = $p + 3 + strlen($boundary); - - while (($p = strpos($body, '--' . $boundary . "\n", $start)) !== false) { - $res[] = substr($body, $start, $p - $start); - $start = $p + 3 + strlen($boundary); - } - - // no more parts, find end boundary - $p = strpos($body, '--' . $boundary . '--', $start); - if ($p === false) { - throw new Exception\RuntimeException('Not a valid Mime Message: End Missing'); - } - - // the remaining part also needs to be parsed: - $res[] = substr($body, $start, $p - $start); - return $res; - } - - /** - * Decodes a MIME encoded string and returns a Laminas\Mime\Message object with - * all the MIME parts set according to the given string - * - * @param string $message - * @param string $boundary Multipart boundary; if omitted, $message will be - * treated as a single part. - * @param string $EOL EOL string; defaults to {@link Laminas\Mime\Mime::LINEEND} - * @throws Exception\RuntimeException - * @return Message - */ - public static function createFromMessage($message, $boundary = null, $EOL = Mime::LINEEND) - { - if ($boundary) { - $parts = Decode::splitMessageStruct($message, $boundary, $EOL); - } else { - Decode::splitMessage($message, $headers, $body, $EOL); - $parts = [ - [ - 'header' => $headers, - 'body' => $body, - ], - ]; - } - - $res = new static(); - foreach ($parts as $part) { - // now we build a new MimePart for the current Message Part: - $properties = []; - foreach ($part['header'] as $header) { - /** @var HeaderInterface $header */ - /** - * @todo check for characterset and filename - */ - - $fieldName = $header->getFieldName(); - $fieldValue = $header->getFieldValue(); - switch (strtolower($fieldName)) { - case 'content-type': - $properties['type'] = $fieldValue; - break; - case 'content-transfer-encoding': - $properties['encoding'] = $fieldValue; - break; - case 'content-id': - $properties['id'] = trim($fieldValue, '<>'); - break; - case 'content-disposition': - $properties['disposition'] = $fieldValue; - break; - case 'content-description': - $properties['description'] = $fieldValue; - break; - case 'content-location': - $properties['location'] = $fieldValue; - break; - case 'content-language': - $properties['language'] = $fieldValue; - break; - default: - // Ignore unknown header - break; - } - } - - $body = $part['body']; - - if (isset($properties['encoding'])) { - switch ($properties['encoding']) { - case 'quoted-printable': - $body = quoted_printable_decode($body); - break; - case 'base64': - $body = base64_decode($body); - break; - } - } - - $newPart = new Part($body); - foreach ($properties as $key => $value) { - $newPart->$key = $value; - } - $res->addPart($newPart); - } - - return $res; - } -} diff --git a/lib/laminas/laminas-mime/src/Mime.php b/lib/laminas/laminas-mime/src/Mime.php deleted file mode 100644 index 70f08fa08..000000000 --- a/lib/laminas/laminas-mime/src/Mime.php +++ /dev/null @@ -1,709 +0,0 @@ -[\x21\x23-\x26\x2a\x2b\x2d\x5e\5f\60\x7b-\x7ea-zA-Z0-9]+)\?(?P[\x21\x23-\x26\x2a\x2b\x2d\x5e\5f\60\x7b-\x7ea-zA-Z0-9]+)\?(?P[\x21-\x3e\x40-\x7e]+)#'; - // phpcs:enable - - /** @var null|string */ - protected $boundary; - - /** @var int */ - protected static $makeUnique = 0; - - /** - * Lookup-tables for QuotedPrintable - * - * @var string[] - */ - public static $qpKeys = [ - "\x00", - "\x01", - "\x02", - "\x03", - "\x04", - "\x05", - "\x06", - "\x07", - "\x08", - "\x09", - "\x0A", - "\x0B", - "\x0C", - "\x0D", - "\x0E", - "\x0F", - "\x10", - "\x11", - "\x12", - "\x13", - "\x14", - "\x15", - "\x16", - "\x17", - "\x18", - "\x19", - "\x1A", - "\x1B", - "\x1C", - "\x1D", - "\x1E", - "\x1F", - "\x7F", - "\x80", - "\x81", - "\x82", - "\x83", - "\x84", - "\x85", - "\x86", - "\x87", - "\x88", - "\x89", - "\x8A", - "\x8B", - "\x8C", - "\x8D", - "\x8E", - "\x8F", - "\x90", - "\x91", - "\x92", - "\x93", - "\x94", - "\x95", - "\x96", - "\x97", - "\x98", - "\x99", - "\x9A", - "\x9B", - "\x9C", - "\x9D", - "\x9E", - "\x9F", - "\xA0", - "\xA1", - "\xA2", - "\xA3", - "\xA4", - "\xA5", - "\xA6", - "\xA7", - "\xA8", - "\xA9", - "\xAA", - "\xAB", - "\xAC", - "\xAD", - "\xAE", - "\xAF", - "\xB0", - "\xB1", - "\xB2", - "\xB3", - "\xB4", - "\xB5", - "\xB6", - "\xB7", - "\xB8", - "\xB9", - "\xBA", - "\xBB", - "\xBC", - "\xBD", - "\xBE", - "\xBF", - "\xC0", - "\xC1", - "\xC2", - "\xC3", - "\xC4", - "\xC5", - "\xC6", - "\xC7", - "\xC8", - "\xC9", - "\xCA", - "\xCB", - "\xCC", - "\xCD", - "\xCE", - "\xCF", - "\xD0", - "\xD1", - "\xD2", - "\xD3", - "\xD4", - "\xD5", - "\xD6", - "\xD7", - "\xD8", - "\xD9", - "\xDA", - "\xDB", - "\xDC", - "\xDD", - "\xDE", - "\xDF", - "\xE0", - "\xE1", - "\xE2", - "\xE3", - "\xE4", - "\xE5", - "\xE6", - "\xE7", - "\xE8", - "\xE9", - "\xEA", - "\xEB", - "\xEC", - "\xED", - "\xEE", - "\xEF", - "\xF0", - "\xF1", - "\xF2", - "\xF3", - "\xF4", - "\xF5", - "\xF6", - "\xF7", - "\xF8", - "\xF9", - "\xFA", - "\xFB", - "\xFC", - "\xFD", - "\xFE", - "\xFF", - ]; - - /** @var string[] */ - public static $qpReplaceValues = [ - "=00", - "=01", - "=02", - "=03", - "=04", - "=05", - "=06", - "=07", - "=08", - "=09", - "=0A", - "=0B", - "=0C", - "=0D", - "=0E", - "=0F", - "=10", - "=11", - "=12", - "=13", - "=14", - "=15", - "=16", - "=17", - "=18", - "=19", - "=1A", - "=1B", - "=1C", - "=1D", - "=1E", - "=1F", - "=7F", - "=80", - "=81", - "=82", - "=83", - "=84", - "=85", - "=86", - "=87", - "=88", - "=89", - "=8A", - "=8B", - "=8C", - "=8D", - "=8E", - "=8F", - "=90", - "=91", - "=92", - "=93", - "=94", - "=95", - "=96", - "=97", - "=98", - "=99", - "=9A", - "=9B", - "=9C", - "=9D", - "=9E", - "=9F", - "=A0", - "=A1", - "=A2", - "=A3", - "=A4", - "=A5", - "=A6", - "=A7", - "=A8", - "=A9", - "=AA", - "=AB", - "=AC", - "=AD", - "=AE", - "=AF", - "=B0", - "=B1", - "=B2", - "=B3", - "=B4", - "=B5", - "=B6", - "=B7", - "=B8", - "=B9", - "=BA", - "=BB", - "=BC", - "=BD", - "=BE", - "=BF", - "=C0", - "=C1", - "=C2", - "=C3", - "=C4", - "=C5", - "=C6", - "=C7", - "=C8", - "=C9", - "=CA", - "=CB", - "=CC", - "=CD", - "=CE", - "=CF", - "=D0", - "=D1", - "=D2", - "=D3", - "=D4", - "=D5", - "=D6", - "=D7", - "=D8", - "=D9", - "=DA", - "=DB", - "=DC", - "=DD", - "=DE", - "=DF", - "=E0", - "=E1", - "=E2", - "=E3", - "=E4", - "=E5", - "=E6", - "=E7", - "=E8", - "=E9", - "=EA", - "=EB", - "=EC", - "=ED", - "=EE", - "=EF", - "=F0", - "=F1", - "=F2", - "=F3", - "=F4", - "=F5", - "=F6", - "=F7", - "=F8", - "=F9", - "=FA", - "=FB", - "=FC", - "=FD", - "=FE", - "=FF", - ]; - // @codingStandardsIgnoreStart - public static $qpKeysString = - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"; - // @codingStandardsIgnoreEnd - - /** - * Check if the given string is "printable" - * - * Checks that a string contains no unprintable characters. If this returns - * false, encode the string for secure delivery. - * - * @param string $str - * @return bool - */ - public static function isPrintable($str) - { - return strcspn($str, static::$qpKeysString) === strlen($str); - } - - /** - * Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines. - * - * @param string $str - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param string $lineEnd Defaults to {@link LINEEND} - * @return string - */ - public static function encodeQuotedPrintable( - $str, - $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND - ) { - $out = ''; - $str = self::_encodeQuotedPrintable($str); - - // Split encoded text into separate lines - $initialPtr = 0; - $strLength = strlen($str); - while ($initialPtr < $strLength) { - $continueAt = $strLength - $initialPtr; - - if ($continueAt > $lineLength) { - $continueAt = $lineLength; - } - - $chunk = substr($str, $initialPtr, $continueAt); - - // Ensure we are not splitting across an encoded character - $endingMarkerPos = strrpos($chunk, '='); - if ($endingMarkerPos !== false && $endingMarkerPos >= strlen($chunk) - 2) { - $chunk = substr($chunk, 0, $endingMarkerPos); - $continueAt = $endingMarkerPos; - } - - if (ord($chunk[0]) === 0x2E) { // 0x2E is a dot - $chunk = '=2E' . substr($chunk, 1); - } - - // copied from swiftmailer https://git.io/vAXU1 - switch (ord(substr($chunk, strlen($chunk) - 1))) { - case 0x09: // Horizontal Tab - $chunk = substr_replace($chunk, '=09', strlen($chunk) - 1, 1); - break; - case 0x20: // Space - $chunk = substr_replace($chunk, '=20', strlen($chunk) - 1, 1); - break; - } - - // Add string and continue - $out .= $chunk . '=' . $lineEnd; - $initialPtr += $continueAt; - } - - $out = rtrim($out, $lineEnd); - $out = rtrim($out, '='); - return $out; - } - - /** - * Converts a string into quoted printable format. - * - * @param string $str - * @return string - */ - // @codingStandardsIgnoreStart - private static function _encodeQuotedPrintable($str) - { - // @codingStandardsIgnoreEnd - $str = str_replace('=', '=3D', $str); - $str = str_replace(static::$qpKeys, static::$qpReplaceValues, $str); - $str = rtrim($str); - return $str; - } - - /** - * Encode a given string with the QUOTED_PRINTABLE mechanism for Mail Headers. - * - * Mail headers depend on an extended quoted printable algorithm otherwise - * a range of bugs can occur. - * - * @param string $str - * @param string $charset - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param string $lineEnd Defaults to {@link LINEEND} - * @return string - */ - public static function encodeQuotedPrintableHeader( - $str, - $charset, - $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND - ) { - // Reduce line-length by the length of the required delimiter, charsets and encoding - $prefix = sprintf('=?%s?Q?', $charset); - $lineLength = $lineLength - strlen($prefix) - 3; - - $str = self::_encodeQuotedPrintable($str); - - // Mail-Header required chars have to be encoded also: - $str = str_replace(['?', ',', ' ', '_'], ['=3F', '=2C', '=20', '=5F'], $str); - - // initialize first line, we need it anyways - $lines = [0 => '']; - - // Split encoded text into separate lines - $tmp = ''; - while (strlen($str) > 0) { - $currentLine = max(count($lines) - 1, 0); - $token = static::getNextQuotedPrintableToken($str); - $substr = substr($str, strlen($token)); - $str = false === $substr ? '' : $substr; - - $tmp .= $token; - if ($token === '=20') { - // only if we have a single char token or space, we can append the - // tempstring it to the current line or start a new line if necessary. - $lineLimitReached = strlen($lines[$currentLine] . $tmp) > $lineLength; - $noCurrentLine = $lines[$currentLine] === ''; - if ($noCurrentLine && $lineLimitReached) { - $lines[$currentLine] = $tmp; - $lines[$currentLine + 1] = ''; - } elseif ($lineLimitReached) { - $lines[$currentLine + 1] = $tmp; - } else { - $lines[$currentLine] .= $tmp; - } - $tmp = ''; - } - // don't forget to append the rest to the last line - if (strlen($str) === 0) { - $lines[$currentLine] .= $tmp; - } - } - - // assemble the lines together by pre- and appending delimiters, charset, encoding. - for ($i = 0, $count = count($lines); $i < $count; $i++) { - $lines[$i] = " " . $prefix . $lines[$i] . "?="; - } - $str = trim(implode($lineEnd, $lines)); - return $str; - } - - /** - * Retrieves the first token from a quoted printable string. - * - * @param string $str - * @return string - */ - private static function getNextQuotedPrintableToken($str) - { - if (0 === strpos($str, '=')) { - $token = substr($str, 0, 3); - } else { - $token = substr($str, 0, 1); - } - return $token; - } - - /** - * Encode a given string in mail header compatible base64 encoding. - * - * @param string $str - * @param string $charset - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param string $lineEnd Defaults to {@link LINEEND} - * @return string - */ - public static function encodeBase64Header( - $str, - $charset, - $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND - ) { - $prefix = '=?' . $charset . '?B?'; - $suffix = '?='; - $remainingLength = $lineLength - strlen($prefix) - strlen($suffix); - - $encodedValue = static::encodeBase64($str, $remainingLength, $lineEnd); - $encodedValue = str_replace($lineEnd, $suffix . $lineEnd . ' ' . $prefix, $encodedValue); - $encodedValue = $prefix . $encodedValue . $suffix; - return $encodedValue; - } - - /** - * Encode a given string in base64 encoding and break lines - * according to the maximum linelength. - * - * @param string $str - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param string $lineEnd Defaults to {@link LINEEND} - * @return string - */ - public static function encodeBase64( - $str, - $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND - ) { - $lineLength = $lineLength - ($lineLength % 4); - return rtrim(chunk_split(base64_encode($str), $lineLength, $lineEnd)); - } - - /** - * Constructor - * - * @param null|string $boundary - * @access public - */ - public function __construct($boundary = null) - { - // This string needs to be somewhat unique - if ($boundary === null) { - $this->boundary = '=_' . md5(microtime(1) . static::$makeUnique++); - } else { - $this->boundary = $boundary; - } - } - - // phpcs:disable WebimpressCodingStandard.NamingConventions.ValidVariableName.NotCamelCaps - - /** - * Encode the given string with the given encoding. - * - * @param string $str - * @param string $encoding - * @param string $EOL EOL string; defaults to {@link LINEEND} - * @return string - */ - public static function encode($str, $encoding, $EOL = self::LINEEND) - { - switch ($encoding) { - case self::ENCODING_BASE64: - return static::encodeBase64($str, self::LINELENGTH, $EOL); - - case self::ENCODING_QUOTEDPRINTABLE: - return static::encodeQuotedPrintable($str, self::LINELENGTH, $EOL); - - default: - /** - * @todo 7Bit and 8Bit is currently handled the same way. - */ - return $str; - } - } - - /** - * Return a MIME boundary - * - * @access public - * @return string - */ - public function boundary() - { - return $this->boundary; - } - - /** - * Return a MIME boundary line - * - * @param string $EOL Defaults to {@link LINEEND} - * @access public - * @return string - */ - public function boundaryLine($EOL = self::LINEEND) - { - return $EOL . '--' . $this->boundary . $EOL; - } - - /** - * Return MIME ending - * - * @param string $EOL Defaults to {@link LINEEND} - * @access public - * @return string - */ - public function mimeEnd($EOL = self::LINEEND) - { - return $EOL . '--' . $this->boundary . '--' . $EOL; - } - - /** - * Detect MIME charset - * - * Extract parts according to https://tools.ietf.org/html/rfc2047#section-2 - * - * @param string $str - * @return string - */ - public static function mimeDetectCharset($str) - { - if (preg_match(self::CHARSET_REGEX, $str, $matches)) { - return strtoupper($matches['charset']); - } - - return 'ASCII'; - } -} diff --git a/lib/laminas/laminas-mime/src/Part.php b/lib/laminas/laminas-mime/src/Part.php deleted file mode 100644 index 541da9c0f..000000000 --- a/lib/laminas/laminas-mime/src/Part.php +++ /dev/null @@ -1,549 +0,0 @@ - */ - protected $filters = []; - - /** - * create a new Mime Part. - * The (unencoded) content of the Part as passed - * as a string or stream - * - * @param mixed $content String or Stream containing the content - * @throws Exception\InvalidArgumentException - */ - public function __construct($content = '') - { - $this->setContent($content); - } - - /** - * @todo error checking for setting $type - * @todo error checking for setting $encoding - */ - - /** - * Set type - * - * @param string $type - * @return self - */ - public function setType($type = Mime::TYPE_OCTETSTREAM) - { - $this->type = $type; - return $this; - } - - /** - * Get type - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Set encoding - * - * @param string $encoding - * @return self - */ - public function setEncoding($encoding = Mime::ENCODING_8BIT) - { - $this->encoding = $encoding; - return $this; - } - - /** - * Get encoding - * - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Set id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Get id - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Set disposition - * - * @param string $disposition - * @return self - */ - public function setDisposition($disposition) - { - $this->disposition = $disposition; - return $this; - } - - /** - * Get disposition - * - * @return string - */ - public function getDisposition() - { - return $this->disposition; - } - - /** - * Set description - * - * @param string $description - * @return self - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * Get description - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Set filename - * - * @param string $fileName - * @return self - */ - public function setFileName($fileName) - { - $this->filename = $fileName; - return $this; - } - - /** - * Get filename - * - * @return string - */ - public function getFileName() - { - return $this->filename; - } - - /** - * Set charset - * - * @param string $charset - * @return self - */ - public function setCharset($charset) - { - $this->charset = $charset; - return $this; - } - - /** - * Get charset - * - * @return string - */ - public function getCharset() - { - return $this->charset; - } - - /** - * Set boundary - * - * @param string $boundary - * @return self - */ - public function setBoundary($boundary) - { - $this->boundary = $boundary; - return $this; - } - - /** - * Get boundary - * - * @return string - */ - public function getBoundary() - { - return $this->boundary; - } - - /** - * Set location - * - * @param string $location - * @return self - */ - public function setLocation($location) - { - $this->location = $location; - return $this; - } - - /** - * Get location - * - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Set language - * - * @param string $language - * @return self - */ - public function setLanguage($language) - { - $this->language = $language; - return $this; - } - - /** - * Get language - * - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * Set content - * - * @param mixed $content String or Stream containing the content - * @throws Exception\InvalidArgumentException - * @return self - */ - public function setContent($content) - { - if (! is_string($content) && ! is_resource($content)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Content must be string or resource; received "%s"', - is_object($content) ? get_class($content) : gettype($content) - )); - } - $this->content = $content; - if (is_resource($content)) { - $this->isStream = true; - } - - return $this; - } - - /** - * Set isStream - * - * @param bool $isStream - * @return self - */ - public function setIsStream($isStream = false) - { - $this->isStream = (bool) $isStream; - return $this; - } - - /** - * Get isStream - * - * @return bool - */ - public function getIsStream() - { - return $this->isStream; - } - - /** - * Set filters - * - * @param array $filters - * @return self - */ - public function setFilters($filters = []) - { - $this->filters = $filters; - return $this; - } - - /** - * Get Filters - * - * @return array - */ - public function getFilters() - { - return $this->filters; - } - - /** - * check if this part can be read as a stream. - * if true, getEncodedStream can be called, otherwise - * only getContent can be used to fetch the encoded - * content of the part - * - * @return bool - */ - public function isStream() - { - return $this->isStream; - } - - // phpcs:disable WebimpressCodingStandard.NamingConventions.ValidVariableName.NotCamelCaps - - /** - * if this was created with a stream, return a filtered stream for - * reading the content. very useful for large file attachments. - * - * @param string $EOL - * @return resource - * @throws Exception\RuntimeException If not a stream or unable to append filter. - */ - public function getEncodedStream($EOL = Mime::LINEEND) - { - if (! $this->isStream) { - throw new Exception\RuntimeException('Attempt to get a stream from a string part'); - } - - //stream_filter_remove(); // ??? is that right? - switch ($this->encoding) { - case Mime::ENCODING_QUOTEDPRINTABLE: - if (array_key_exists(Mime::ENCODING_QUOTEDPRINTABLE, $this->filters)) { - stream_filter_remove($this->filters[Mime::ENCODING_QUOTEDPRINTABLE]); - } - $filter = stream_filter_append( - $this->content, - 'convert.quoted-printable-encode', - STREAM_FILTER_READ, - [ - 'line-length' => 76, - 'line-break-chars' => $EOL, - ] - ); - $this->filters[Mime::ENCODING_QUOTEDPRINTABLE] = $filter; - if (! is_resource($filter)) { - throw new Exception\RuntimeException('Failed to append quoted-printable filter'); - } - break; - case Mime::ENCODING_BASE64: - if (array_key_exists(Mime::ENCODING_BASE64, $this->filters)) { - stream_filter_remove($this->filters[Mime::ENCODING_BASE64]); - } - $filter = stream_filter_append( - $this->content, - 'convert.base64-encode', - STREAM_FILTER_READ, - [ - 'line-length' => 76, - 'line-break-chars' => $EOL, - ] - ); - $this->filters[Mime::ENCODING_BASE64] = $filter; - if (! is_resource($filter)) { - throw new Exception\RuntimeException('Failed to append base64 filter'); - } - break; - default: - } - return $this->content; - } - - /** - * Get the Content of the current Mime Part in the given encoding. - * - * @param string $EOL - * @return string - */ - public function getContent($EOL = Mime::LINEEND) - { - if ($this->isStream) { - $encodedStream = $this->getEncodedStream($EOL); - $encodedStreamContents = stream_get_contents($encodedStream); - $streamMetaData = stream_get_meta_data($encodedStream); - - if (isset($streamMetaData['seekable']) && $streamMetaData['seekable']) { - rewind($encodedStream); - } - - return $encodedStreamContents; - } - return Mime::encode($this->content, $this->encoding, $EOL); - } - - /** - * Get the RAW unencoded content from this part - * - * @return string - */ - public function getRawContent() - { - if ($this->isStream) { - return stream_get_contents($this->content); - } - return $this->content; - } - - /** - * Create and return the array of headers for this MIME part - * - * @access public - * @param string $EOL - * @return array - */ - public function getHeadersArray($EOL = Mime::LINEEND) - { - $headers = []; - - $contentType = $this->type; - if ($this->charset) { - $contentType .= '; charset=' . $this->charset; - } - - if ($this->boundary) { - $contentType .= ';' . $EOL - . " boundary=\"" . $this->boundary . '"'; - } - - $headers[] = ['Content-Type', $contentType]; - - if ($this->encoding) { - $headers[] = ['Content-Transfer-Encoding', $this->encoding]; - } - - if ($this->id) { - $headers[] = ['Content-ID', '<' . $this->id . '>']; - } - - if ($this->disposition) { - $disposition = $this->disposition; - if ($this->filename) { - $disposition .= '; filename="' . $this->filename . '"'; - } - $headers[] = ['Content-Disposition', $disposition]; - } - - if ($this->description) { - $headers[] = ['Content-Description', $this->description]; - } - - if ($this->location) { - $headers[] = ['Content-Location', $this->location]; - } - - if ($this->language) { - $headers[] = ['Content-Language', $this->language]; - } - - return $headers; - } - - /** - * Return the headers for this part as a string - * - * @param string $EOL - * @return String - */ - public function getHeaders($EOL = Mime::LINEEND) - { - $res = ''; - foreach ($this->getHeadersArray($EOL) as $header) { - $res .= $header[0] . ': ' . $header[1] . $EOL; - } - - return $res; - } -} diff --git a/lib/laminas/laminas-servicemanager/COPYRIGHT.md b/lib/laminas/laminas-servicemanager/COPYRIGHT.md deleted file mode 100644 index 0a8cccc06..000000000 --- a/lib/laminas/laminas-servicemanager/COPYRIGHT.md +++ /dev/null @@ -1 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) diff --git a/lib/laminas/laminas-servicemanager/LICENSE.md b/lib/laminas/laminas-servicemanager/LICENSE.md deleted file mode 100644 index 10b40f142..000000000 --- a/lib/laminas/laminas-servicemanager/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of Laminas Foundation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/laminas/laminas-servicemanager/README.md b/lib/laminas/laminas-servicemanager/README.md deleted file mode 100644 index 794a34029..000000000 --- a/lib/laminas/laminas-servicemanager/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# laminas-servicemanager - -[![Build Status](https://github.com/laminas/laminas-servicemanager/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/laminas/laminas-servicemanager/actions/workflows/continuous-integration.yml) -[![Psalm coverage](https://shepherd.dev/github/laminas/laminas-servicemanager/coverage.svg?)](https://shepherd.dev/github/laminas/laminas-servicemanager) - -> ## 🇷🇺 Русским гражданам -> -> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм. -> -> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую. -> -> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!" -> -> ## 🇺🇸 To Citizens of Russia -> -> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. -> -> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. -> -> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!" - -The Service Locator design pattern is implemented by the `Laminas\ServiceManager` -component. The Service Locator is a service/object locator, tasked with -retrieving other objects. - -- File issues at https://github.com/laminas/laminas-servicemanager/issues -- [Online documentation](https://docs.laminas.dev/laminas-servicemanager) -- [Documentation source files](docs/book/) - -## Benchmarks - -We provide scripts for benchmarking laminas-servicemanager using the -[PHPBench](https://github.com/phpbench/phpbench) framework; these can be -found in the `benchmarks/` directory. - -To execute the benchmarks you can run the following command: - -```bash -$ vendor/bin/phpbench run --report=aggregate -``` diff --git a/lib/laminas/laminas-servicemanager/bin/generate-deps-for-config-factory b/lib/laminas/laminas-servicemanager/bin/generate-deps-for-config-factory deleted file mode 100644 index 8ee1105a5..000000000 --- a/lib/laminas/laminas-servicemanager/bin/generate-deps-for-config-factory +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env php -=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" - }, - "time": "2021-11-05T16:50:12+00:00" - } - ], - "packages-dev": [ - { - "name": "amphp/amp", - "version": "v2.6.2", - "source": { - "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ], - "psr-4": { - "Amp\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "https://amphp.org/amp", - "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2022-02-20T17:52:18+00:00" - }, - { - "name": "amphp/byte-stream", - "version": "v1.8.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Amp\\ByteStream\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2021-03-30T17:13:30+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, - { - "name": "composer/pcre", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T20:21:48+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-04-01T19:23:25+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" - }, - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - }, - { - "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2022-02-04T12:51:07+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" - }, - "time": "2019-12-04T15:06:13+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.13.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2", - "vimeo/psalm": "^4.10" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.3" - }, - "time": "2022-07-02T10:48:51+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-02-28T11:07:21+00:00" - }, - { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "shasum": "" - }, - "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "A more advanced JSONRPC implementation", - "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" - }, - "time": "2021-06-11T22:34:44+00:00" - }, - { - "name": "felixfbecker/language-server-protocol", - "version": "v1.5.2", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "LanguageServerProtocol\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "PHP classes for the Language Server Protocol", - "keywords": [ - "language", - "microsoft", - "php", - "server" - ], - "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" - }, - "time": "2022-03-02T22:36:06+00:00" - }, - { - "name": "laminas/laminas-code", - "version": "4.5.2", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-code.git", - "reference": "da01fb74c08f37e20e7ae49f1e3ee09aa401ebad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/da01fb74c08f37e20e7ae49f1e3ee09aa401ebad", - "reference": "da01fb74c08f37e20e7ae49f1e3ee09aa401ebad", - "shasum": "" - }, - "require": { - "php": ">=7.4, <8.2" - }, - "require-dev": { - "doctrine/annotations": "^1.13.2", - "ext-phar": "*", - "laminas/laminas-coding-standard": "^2.3.0", - "laminas/laminas-stdlib": "^3.6.1", - "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.13.1" - }, - "suggest": { - "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", - "laminas/laminas-stdlib": "Laminas\\Stdlib component" - }, - "type": "library", - "autoload": { - "files": [ - "polyfill/ReflectionEnumPolyfill.php" - ], - "psr-4": { - "Laminas\\Code\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", - "homepage": "https://laminas.dev", - "keywords": [ - "code", - "laminas", - "laminasframework" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-code/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-code/issues", - "rss": "https://github.com/laminas/laminas-code/releases.atom", - "source": "https://github.com/laminas/laminas-code" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-06-06T11:26:02+00:00" - }, - { - "name": "laminas/laminas-coding-standard", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/bcf6e07fe4690240be7beb6d884d0b0fafa6a251", - "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "php": "^7.3 || ^8.0", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.6", - "webimpress/coding-standard": "^1.2" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "LaminasCodingStandard\\": "src/LaminasCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas Coding Standard", - "homepage": "https://laminas.dev", - "keywords": [ - "Coding Standard", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-coding-standard/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-coding-standard/issues", - "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", - "source": "https://github.com/laminas/laminas-coding-standard" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-05-29T15:53:59+00:00" - }, - { - "name": "laminas/laminas-container-config-test", - "version": "0.7.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-container-config-test.git", - "reference": "799bbd667c25bf5b88ff879be2ac0e33a5a15185" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-container-config-test/zipball/799bbd667c25bf5b88ff879be2ac0e33a5a15185", - "reference": "799bbd667c25bf5b88ff879be2ac0e33a5a15185", - "shasum": "" - }, - "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", - "psr/container": "^1.0 || ^2.0" - }, - "conflict": { - "zendframework/zend-container-config-test": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "^2.3", - "phpunit/phpunit": "^9.5.21", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.24.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/TestAsset/function-factory.php", - "src/TestAsset/function-factory-with-name.php", - "src/TestAsset/function-factory.legacy.php", - "src/TestAsset/function-factory-with-name.legacy.php" - ], - "psr-4": { - "Laminas\\ContainerConfigTest\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Mezzio PSR-11 container configuration tests", - "homepage": "https://laminas.dev", - "keywords": [ - "PSR-11", - "container", - "laminas", - "mezzio", - "test" - ], - "support": { - "chat": "https://laminas.dev/chat", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-container-config-test/issues", - "rss": "https://github.com/laminas/laminas-container-config-test/releases.atom", - "source": "https://github.com/laminas/laminas-container-config-test" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-07-24T20:30:12+00:00" - }, - { - "name": "laminas/laminas-dependency-plugin", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-dependency-plugin.git", - "reference": "73cfb63ddca9d6bfedad5e0a038f6d55063975a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-dependency-plugin/zipball/73cfb63ddca9d6bfedad5e0a038f6d55063975a3", - "reference": "73cfb63ddca9d6bfedad5e0a038f6d55063975a3", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1 || ^2.0", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "require-dev": { - "composer/composer": "^1.9 || ^2.0", - "laminas/laminas-coding-standard": "^2.2.1", - "mikey179/vfsstream": "^1.6.10@alpha", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.1", - "roave/security-advisories": "dev-master", - "vimeo/psalm": "^4.5" - }, - "type": "composer-plugin", - "extra": { - "class": "Laminas\\DependencyPlugin\\DependencyRewriterPluginDelegator" - }, - "autoload": { - "psr-4": { - "Laminas\\DependencyPlugin\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.", - "support": { - "issues": "https://github.com/laminas/laminas-dependency-plugin/issues", - "source": "https://github.com/laminas/laminas-dependency-plugin/tree/2.2.0" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-08T17:51:35+00:00" - }, - { - "name": "mikey179/vfsstream", - "version": "v1.6.11", - "source": { - "type": "git", - "url": "https://github.com/bovigo/vfsStream.git", - "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", - "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" - } - ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/", - "support": { - "issues": "https://github.com/bovigo/vfsStream/issues", - "source": "https://github.com/bovigo/vfsStream/tree/master", - "wiki": "https://github.com/bovigo/vfsStream/wiki" - }, - "time": "2022-02-23T02:02:42+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "netresearch/jsonmapper", - "version": "v4.0.0", - "source": { - "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", - "squizlabs/php_codesniffer": "~3.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonMapper": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" - } - ], - "description": "Map nested JSON structures onto PHP classes", - "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" - }, - "time": "2020-12-01T19:48:11+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.14.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" - }, - "time": "2022-05-31T20:59:12+00:00" - }, - { - "name": "ocramius/proxy-manager", - "version": "2.13.1", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/ProxyManager.git", - "reference": "e32bc1986fb6fa318ce35e573c654e3ddfb4848d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/e32bc1986fb6fa318ce35e573c654e3ddfb4848d", - "reference": "e32bc1986fb6fa318ce35e573c654e3ddfb4848d", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2.1.0", - "laminas/laminas-code": "^4.3.0", - "php": "~7.4.1 || ~8.0.0", - "webimpress/safe-writer": "^2.2.0" - }, - "conflict": { - "doctrine/annotations": "<1.6.1", - "laminas/laminas-stdlib": "<3.2.1", - "thecodingmachine/safe": "<1.3.3", - "zendframework/zend-stdlib": "<3.2.1" - }, - "require-dev": { - "codelicia/xulieta": "^0.1.6", - "doctrine/coding-standard": "^8.2.1", - "ext-phar": "*", - "infection/infection": "^0.21.5", - "nikic/php-parser": "^4.10.5", - "phpbench/phpbench": "^0.17.1 || 1.0.0-alpha2", - "phpunit/phpunit": "^9.5.4", - "slevomat/coding-standard": "^6.3.10", - "squizlabs/php_codesniffer": "^3.6.0", - "vimeo/psalm": "^4.4.1" - }, - "suggest": { - "laminas/laminas-json": "To have the JsonRpc adapter (Remote Object feature)", - "laminas/laminas-soap": "To have the Soap adapter (Remote Object feature)", - "laminas/laminas-xmlrpc": "To have the XmlRpc adapter (Remote Object feature)", - "ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "ProxyManager\\": "src/ProxyManager" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.io/" - } - ], - "description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies", - "homepage": "https://github.com/Ocramius/ProxyManager", - "keywords": [ - "aop", - "lazy loading", - "proxy", - "proxy pattern", - "service proxies" - ], - "support": { - "issues": "https://github.com/Ocramius/ProxyManager/issues", - "source": "https://github.com/Ocramius/ProxyManager/tree/2.13.1" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ocramius/proxy-manager", - "type": "tidelift" - } - ], - "time": "2022-03-05T18:42:03+00:00" - }, - { - "name": "openlss/lib-array2xml", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nullivex/lib-array2xml.git", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "LSS": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Bryan Tong", - "email": "bryan@nullivex.com", - "homepage": "https://www.nullivex.com" - }, - { - "name": "Tony Butler", - "email": "spudz76@gmail.com", - "homepage": "https://www.nullivex.com" - } - ], - "description": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com", - "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" - ], - "support": { - "issues": "https://github.com/nullivex/lib-array2xml/issues", - "source": "https://github.com/nullivex/lib-array2xml/tree/master" - }, - "time": "2019-03-29T20:06:56+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpbench/container", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpbench/container.git", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/container/zipball/6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "shasum": "" - }, - "require": { - "psr/container": "^1.0|^2.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12.52", - "phpunit/phpunit": "^8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\DependencyInjection\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "Simple, configurable, service container.", - "support": { - "issues": "https://github.com/phpbench/container/issues", - "source": "https://github.com/phpbench/container/tree/2.2.1" - }, - "time": "2022-01-25T10:17:35+00:00" - }, - { - "name": "phpbench/dom", - "version": "0.3.2", - "source": { - "type": "git", - "url": "https://github.com/phpbench/dom.git", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/dom/zipball/b013b717832ddbaadf2a40984b04bc66af9a7110", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^7.2||^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", - "phpstan/phpstan": "^0.12.83", - "phpunit/phpunit": "^8.0||^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\Dom\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "DOM wrapper to simplify working with the PHP DOM implementation", - "support": { - "issues": "https://github.com/phpbench/dom/issues", - "source": "https://github.com/phpbench/dom/tree/0.3.2" - }, - "time": "2021-09-24T15:26:07+00:00" - }, - { - "name": "phpbench/phpbench", - "version": "1.2.6", - "source": { - "type": "git", - "url": "https://github.com/phpbench/phpbench.git", - "reference": "c30fac992e72b505a1f131790583647f4d3255c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/c30fac992e72b505a1f131790583647f4d3255c3", - "reference": "c30fac992e72b505a1f131790583647f4d3255c3", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.13", - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0", - "phpbench/container": "^2.1", - "phpbench/dom": "~0.3.1", - "psr/log": "^1.1 || ^2.0 || ^3.0", - "seld/jsonlint": "^1.1", - "symfony/console": "^4.2 || ^5.0 || ^6.0", - "symfony/filesystem": "^4.2 || ^5.0 || ^6.0", - "symfony/finder": "^4.2 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0", - "symfony/process": "^4.2 || ^5.0 || ^6.0", - "webmozart/path-util": "^2.3" - }, - "require-dev": { - "dantleech/invoke": "^2.0", - "friendsofphp/php-cs-fixer": "^3.0", - "jangregor/phpstan-prophecy": "^0.8.1", - "phpspec/prophecy": "^1.12", - "phpstan/phpstan": "^0.12.7", - "phpunit/phpunit": "^8.5.8 || ^9.0", - "symfony/error-handler": "^5.2 || ^6.0", - "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-xdebug": "For Xdebug profiling extension." - }, - "bin": [ - "bin/phpbench" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "files": [ - "lib/Report/Func/functions.php" - ], - "psr-4": { - "PhpBench\\": "lib/", - "PhpBench\\Extensions\\XDebug\\": "extensions/xdebug/lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "PHP Benchmarking Framework", - "support": { - "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.2.6" - }, - "funding": [ - { - "url": "https://github.com/dantleech", - "type": "github" - } - ], - "time": "2022-07-19T19:52:39+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, - { - "name": "phpspec/prophecy-phpunit", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/2d7a9df55f257d2cba9b1d0c0963a54960657177", - "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8", - "phpspec/prophecy": "^1.3", - "phpunit/phpunit": "^9.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\PhpUnit\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - } - ], - "description": "Integrating the Prophecy mocking library in PHPUnit test cases", - "homepage": "http://phpspec.net", - "keywords": [ - "phpunit", - "prophecy" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.1" - }, - "time": "2020-07-09T08:33:42+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.6.4", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" - }, - "time": "2022-06-26T13:09:08+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-07T09:28:20+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.21", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-06-19T12:14:25+00:00" - }, - { - "name": "psalm/plugin-phpunit", - "version": "0.17.0", - "source": { - "type": "git", - "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "45951541beef07e93e3ad197daf01da88e85c31d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/45951541beef07e93e3ad197daf01da88e85c31d", - "reference": "45951541beef07e93e3ad197daf01da88e85c31d", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.10", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "ext-simplexml": "*", - "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.5" - }, - "conflict": { - "phpunit/phpunit": "<7.5" - }, - "require-dev": { - "codeception/codeception": "^4.0.3", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.11.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" - } - }, - "autoload": { - "psr-4": { - "Psalm\\PhpUnitPlugin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matt Brown", - "email": "github@muglug.com" - } - ], - "description": "Psalm plugin for PHPUnit", - "support": { - "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.17.0" - }, - "time": "2022-06-14T17:05:57+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/master" - }, - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-11-11T14:18:36+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-15T09:54:48+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2022-04-01T13:37:23+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "7.2.1", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", - "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.5.1", - "squizlabs/php_codesniffer": "^3.6.2" - }, - "require-dev": { - "phing/phing": "2.17.3", - "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.7.1", - "phpstan/phpstan-deprecation-rules": "1.0.0", - "phpstan/phpstan-phpunit": "1.0.0|1.1.1", - "phpstan/phpstan-strict-rules": "1.2.3", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2022-05-25T10:58:12+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4d671ab4ddac94ee439ea73649c69d9d200b5000", - "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-26T13:00:04+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.4.9", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "36a017fa4cce1eff1b8e8129ff53513abcef05ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/36a017fa4cce1eff1b8e8129ff53513abcef05ba", - "reference": "36a017fa4cce1eff1b8e8129ff53513abcef05ba", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.9" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-20T13:55:35+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.4.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-04-15T08:07:45+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v5.4.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc1147cb11af1b43f503ac18f31aa3bec213aba8", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-10T07:21:04+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-04-08T05:07:18+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-30T19:17:29+00:00" - }, - { - "name": "symfony/string", - "version": "v5.4.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4432bc7df82a554b3e413a8570ce2fea90e94097", - "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-26T15:57:47+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "vimeo/psalm", - "version": "4.24.0", - "source": { - "type": "git", - "url": "https://github.com/vimeo/psalm.git", - "reference": "06dd975cb55d36af80f242561738f16c5f58264f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/06dd975cb55d36af80f242561738f16c5f58264f", - "reference": "06dd975cb55d36af80f242561738f16c5f58264f", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.4.2", - "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", - "dnoegel/php-xdg-base-dir": "^0.1.1", - "ext-ctype": "*", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", - "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" - }, - "provide": { - "psalm/psalm": "self.version" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", - "ext-curl": "*", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "suggest": { - "ext-curl": "In order to send data to shepherd", - "ext-igbinary": "^2.0.5 is required, used to serialize caching data" - }, - "bin": [ - "psalm", - "psalm-language-server", - "psalm-plugin", - "psalm-refactor", - "psalter" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev", - "dev-3.x": "3.x-dev", - "dev-2.x": "2.x-dev", - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], - "psr-4": { - "Psalm\\": "src/Psalm/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthew Brown" - } - ], - "description": "A static analysis tool for finding errors in PHP applications", - "keywords": [ - "code", - "inspection", - "php" - ], - "support": { - "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.24.0" - }, - "time": "2022-06-26T11:47:54+00:00" - }, - { - "name": "webimpress/coding-standard", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/webimpress/coding-standard.git", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.13" - }, - "type": "phpcodesniffer-standard", - "extra": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - }, - "autoload": { - "psr-4": { - "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "Webimpress Coding Standard", - "keywords": [ - "Coding Standard", - "PSR-2", - "phpcs", - "psr-12", - "webimpress" - ], - "support": { - "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.4" - }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2022-02-15T19:52:12+00:00" - }, - { - "name": "webimpress/safe-writer", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/webimpress/safe-writer.git", - "reference": "9d37cc8bee20f7cb2f58f6e23e05097eab5072e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webimpress/safe-writer/zipball/9d37cc8bee20f7cb2f58f6e23e05097eab5072e6", - "reference": "9d37cc8bee20f7cb2f58f6e23e05097eab5072e6", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.4", - "vimeo/psalm": "^4.7", - "webimpress/coding-standard": "^1.2.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev", - "dev-develop": "2.3.x-dev", - "dev-release-1.0": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Webimpress\\SafeWriter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "Tool to write files safely, to avoid race conditions", - "keywords": [ - "concurrent write", - "file writer", - "race condition", - "safe writer", - "webimpress" - ], - "support": { - "issues": "https://github.com/webimpress/safe-writer/issues", - "source": "https://github.com/webimpress/safe-writer/tree/2.2.0" - }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2021-04-19T16:34:45+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "mikey179/vfsstream": 15 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "~7.4.0 || ~8.0.0 || ~8.1.0" - }, - "platform-dev": [], - "platform-overrides": { - "php": "7.4.99" - }, - "plugin-api-version": "2.3.0" -} diff --git a/lib/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php b/lib/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php deleted file mode 100644 index b51dfdf01..000000000 --- a/lib/laminas/laminas-servicemanager/src/AbstractFactory/ConfigAbstractFactory.php +++ /dev/null @@ -1,80 +0,0 @@ -has('config')) { - return false; - } - $config = $container->get('config'); - if (! isset($config[self::class])) { - return false; - } - $dependencies = $config[self::class]; - - return is_array($dependencies) && array_key_exists($requestedName, $dependencies); - } - - /** - * {@inheritDoc} - */ - public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) - { - if (! $container->has('config')) { - throw new ServiceNotCreatedException('Cannot find a config array in the container'); - } - - $config = $container->get('config'); - - if (! (is_array($config) || $config instanceof ArrayObject)) { - throw new ServiceNotCreatedException('Config must be an array or an instance of ArrayObject'); - } - if (! isset($config[self::class])) { - throw new ServiceNotCreatedException('Cannot find a `' . self::class . '` key in the config array'); - } - - $dependencies = $config[self::class]; - - if ( - ! is_array($dependencies) - || ! array_key_exists($requestedName, $dependencies) - || ! is_array($dependencies[$requestedName]) - ) { - throw new ServiceNotCreatedException('Service dependencies config must exist and be an array'); - } - - $serviceDependencies = $dependencies[$requestedName]; - - if ($serviceDependencies !== array_values(array_map('strval', $serviceDependencies))) { - $problem = json_encode(array_map('gettype', $serviceDependencies)); - throw new ServiceNotCreatedException( - 'Service dependencies config must be an array of strings, ' . $problem . ' given' - ); - } - - $arguments = array_map([$container, 'get'], $serviceDependencies); - - return new $requestedName(...$arguments); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/AbstractFactory/ReflectionBasedAbstractFactory.php b/lib/laminas/laminas-servicemanager/src/AbstractFactory/ReflectionBasedAbstractFactory.php deleted file mode 100644 index 9d6bdc4aa..000000000 --- a/lib/laminas/laminas-servicemanager/src/AbstractFactory/ReflectionBasedAbstractFactory.php +++ /dev/null @@ -1,247 +0,0 @@ - - * 'service_manager' => [ - * 'abstract_factories' => [ - * ReflectionBasedAbstractFactory::class, - * ], - * ], - * - * - * Or as a factory, mapping a class name to it: - * - * - * 'service_manager' => [ - * 'factories' => [ - * MyClassWithDependencies::class => ReflectionBasedAbstractFactory::class, - * ], - * ], - * - * - * The latter approach is more explicit, and also more performant. - * - * The factory has the following constraints/features: - * - * - A parameter named `$config` typehinted as an array will receive the - * application "config" service (i.e., the merged configuration). - * - Parameters type-hinted against array, but not named `$config` will - * be injected with an empty array. - * - Scalar parameters will result in an exception being thrown, unless - * a default value is present; if the default is present, that will be used. - * - If a service cannot be found for a given typehint, the factory will - * raise an exception detailing this. - * - Some services provided by Laminas components do not have - * entries based on their class name (for historical reasons); the - * factory allows defining a map of these class/interface names to the - * corresponding service name to allow them to resolve. - * - * `$options` passed to the factory are ignored in all cases, as we cannot - * make assumptions about which argument(s) they might replace. - * - * Based on the LazyControllerAbstractFactory from laminas-mvc. - */ -class ReflectionBasedAbstractFactory implements AbstractFactoryInterface -{ - /** - * Maps known classes/interfaces to the service that provides them; only - * required for those services with no entry based on the class/interface - * name. - * - * Extend the class if you wish to add to the list. - * - * Example: - * - * - * [ - * \Laminas\Filter\FilterPluginManager::class => 'FilterManager', - * \Laminas\Validator\ValidatorPluginManager::class => 'ValidatorManager', - * ] - * - * - * @var string[] - */ - protected $aliases = []; - - /** - * Allows overriding the internal list of aliases. These should be of the - * form `class name => well-known service name`; see the documentation for - * the `$aliases` property for details on what is accepted. - * - * @param string[] $aliases - */ - public function __construct(array $aliases = []) - { - if (! empty($aliases)) { - $this->aliases = $aliases; - } - } - - /** - * {@inheritDoc} - * - * @return DispatchableInterface - */ - public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) - { - $reflectionClass = new ReflectionClass($requestedName); - - if (null === ($constructor = $reflectionClass->getConstructor())) { - return new $requestedName(); - } - - $reflectionParameters = $constructor->getParameters(); - - if (empty($reflectionParameters)) { - return new $requestedName(); - } - - $resolver = $container->has('config') - ? $this->resolveParameterWithConfigService($container, $requestedName) - : $this->resolveParameterWithoutConfigService($container, $requestedName); - - $parameters = array_map($resolver, $reflectionParameters); - - return new $requestedName(...$parameters); - } - - /** - * {@inheritDoc} - */ - public function canCreate(ContainerInterface $container, $requestedName) - { - return class_exists($requestedName) && $this->canCallConstructor($requestedName); - } - - private function canCallConstructor(string $requestedName): bool - { - $constructor = (new ReflectionClass($requestedName))->getConstructor(); - - return $constructor === null || $constructor->isPublic(); - } - - /** - * Resolve a parameter to a value. - * - * Returns a callback for resolving a parameter to a value, but without - * allowing mapping array `$config` arguments to the `config` service. - * - * @param string $requestedName - * @return callable - */ - private function resolveParameterWithoutConfigService(ContainerInterface $container, $requestedName) - { - /** - * @param ReflectionParameter $parameter - * @return mixed - * @throws ServiceNotFoundException If type-hinted parameter cannot be - * resolved to a service in the container. - * @psalm-suppress MissingClosureReturnType - */ - return fn(ReflectionParameter $parameter) => $this->resolveParameter($parameter, $container, $requestedName); - } - - /** - * Returns a callback for resolving a parameter to a value, including mapping 'config' arguments. - * - * Unlike resolveParameter(), this version will detect `$config` array - * arguments and have them return the 'config' service. - * - * @param string $requestedName - * @return callable - */ - private function resolveParameterWithConfigService(ContainerInterface $container, $requestedName) - { - /** - * @param ReflectionParameter $parameter - * @return mixed - * @throws ServiceNotFoundException If type-hinted parameter cannot be - * resolved to a service in the container. - */ - return function (ReflectionParameter $parameter) use ($container, $requestedName) { - if ($parameter->getName() === 'config') { - $type = $parameter->getType(); - if ($type instanceof ReflectionNamedType && $type->getName() === 'array') { - return $container->get('config'); - } - } - return $this->resolveParameter($parameter, $container, $requestedName); - }; - } - - /** - * Logic common to all parameter resolution. - * - * @param string $requestedName - * @return mixed - * @throws ServiceNotFoundException If type-hinted parameter cannot be - * resolved to a service in the container. - */ - private function resolveParameter(ReflectionParameter $parameter, ContainerInterface $container, $requestedName) - { - $type = $parameter->getType(); - $type = $type instanceof ReflectionNamedType ? $type->getName() : null; - - if ($type === 'array') { - return []; - } - - if ($type === null || (is_string($type) && ! class_exists($type) && ! interface_exists($type))) { - if (! $parameter->isDefaultValueAvailable()) { - throw new ServiceNotFoundException(sprintf( - 'Unable to create service "%s"; unable to resolve parameter "%s" ' - . 'to a class, interface, or array type', - $requestedName, - $parameter->getName() - )); - } - - return $parameter->getDefaultValue(); - } - - $type = $this->aliases[$type] ?? $type; - - if ($container->has($type)) { - return $container->get($type); - } - - if (! $parameter->isOptional()) { - throw new ServiceNotFoundException(sprintf( - 'Unable to create service "%s"; unable to resolve parameter "%s" using type hint "%s"', - $requestedName, - $parameter->getName(), - $type - )); - } - - // Type not available in container, but the value is optional and has a - // default defined. - return $parameter->getDefaultValue(); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/AbstractFactoryInterface.php b/lib/laminas/laminas-servicemanager/src/AbstractFactoryInterface.php deleted file mode 100644 index 2a8ff71b2..000000000 --- a/lib/laminas/laminas-servicemanager/src/AbstractFactoryInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @psalm-import-type ServiceManagerConfiguration from ServiceManager - * @psalm-suppress PropertyNotSetInConstructor - */ -abstract class AbstractPluginManager extends ServiceManager implements PluginManagerInterface -{ - /** - * Whether or not to auto-add a FQCN as an invokable if it exists. - * - * @var bool - */ - protected $autoAddInvokableClass = true; - - /** - * An object type that the created instance must be instanced of - * - * @var null|string - * @psalm-var null|class-string - */ - protected $instanceOf; - - /** - * Sets the provided $parentLocator as the creation context for all - * factories; for $config, {@see \Laminas\ServiceManager\ServiceManager::configure()} - * for details on its accepted structure. - * - * @param null|ConfigInterface|ContainerInterface $configInstanceOrParentLocator - * @param array $config - * @psalm-param ServiceManagerConfiguration $config - */ - public function __construct($configInstanceOrParentLocator = null, array $config = []) - { - /** @psalm-suppress DocblockTypeContradiction */ - if ( - null !== $configInstanceOrParentLocator - && ! $configInstanceOrParentLocator instanceof ConfigInterface - && ! $configInstanceOrParentLocator instanceof ContainerInterface - ) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a ConfigInterface or ContainerInterface instance as the first argument; received %s', - self::class, - is_object($configInstanceOrParentLocator) - ? get_class($configInstanceOrParentLocator) - : gettype($configInstanceOrParentLocator) - )); - } - - if ($configInstanceOrParentLocator instanceof ConfigInterface) { - trigger_error(sprintf( - 'Usage of %s as a constructor argument for %s is now deprecated', - ConfigInterface::class, - static::class - ), E_USER_DEPRECATED); - $config = $configInstanceOrParentLocator->toArray(); - } - - parent::__construct($config); - - if (! $configInstanceOrParentLocator instanceof ContainerInterface) { - trigger_error(sprintf( - '%s now expects a %s instance representing the parent container; please update your code', - __METHOD__, - ContainerInterface::class - ), E_USER_DEPRECATED); - } - - $this->creationContext = $configInstanceOrParentLocator instanceof ContainerInterface - ? $configInstanceOrParentLocator - : $this; - } - - /** - * Override configure() to validate service instances. - * - * @param array $config - * @psalm-param ServiceManagerConfiguration $config - * @return self - * @throws InvalidServiceException If an instance passed in the `services` configuration is invalid for the - * plugin manager. - * @throws ContainerModificationsNotAllowedException If the allow override flag has been toggled off, and a - * service instanceexists for a given service. - */ - public function configure(array $config) - { - if (isset($config['services'])) { - /** @psalm-suppress MixedAssignment */ - foreach ($config['services'] as $service) { - $this->validate($service); - } - } - - parent::configure($config); - - return $this; - } - - /** - * Override setService for additional plugin validation. - * - * {@inheritDoc} - * - * @param string|class-string $name - * @param InstanceType $service - */ - public function setService($name, $service) - { - $this->validate($service); - parent::setService($name, $service); - } - - /** - * @param class-string|string $name Service name of plugin to retrieve. - * @param null|array $options Options to use when creating the instance. - * @return mixed - * @psalm-return ($name is class-string ? InstanceType : mixed) - * @throws Exception\ServiceNotFoundException If the manager does not have - * a service definition for the instance, and the service is not - * auto-invokable. - * @throws InvalidServiceException If the plugin created is invalid for the - * plugin context. - */ - public function get($name, ?array $options = null) - { - if (! $this->has($name)) { - if (! $this->autoAddInvokableClass || ! class_exists($name)) { - throw new Exception\ServiceNotFoundException(sprintf( - 'A plugin by the name "%s" was not found in the plugin manager %s', - $name, - static::class - )); - } - - $this->setFactory($name, Factory\InvokableFactory::class); - } - - $instance = ! $options ? parent::get($name) : $this->build($name, $options); - $this->validate($instance); - return $instance; - } - - /** - * {@inheritDoc} - * - * @psalm-assert InstanceType $instance - */ - public function validate($instance) - { - if (method_exists($this, 'validatePlugin')) { - trigger_error(sprintf( - '%s::validatePlugin() has been deprecated as of 3.0; please define validate() instead', - static::class - ), E_USER_DEPRECATED); - $this->validatePlugin($instance); - return; - } - - if (empty($this->instanceOf) || $instance instanceof $this->instanceOf) { - return; - } - - throw new InvalidServiceException(sprintf( - 'Plugin manager "%s" expected an instance of type "%s", but "%s" was received', - self::class, - $this->instanceOf, - is_object($instance) ? get_class($instance) : gettype($instance) - )); - } - - /** - * Implemented for backwards compatibility only. - * - * Returns the creation context. - * - * @deprecated since 3.0.0. The creation context should be passed during - * instantiation instead. - * - * @return void - */ - public function setServiceLocator(ContainerInterface $container) - { - trigger_error(sprintf( - 'Usage of %s is deprecated since v3.0.0; please pass the container to the constructor instead', - __METHOD__ - ), E_USER_DEPRECATED); - $this->creationContext = $container; - } -} diff --git a/lib/laminas/laminas-servicemanager/src/Config.php b/lib/laminas/laminas-servicemanager/src/Config.php deleted file mode 100644 index 8024bdc0c..000000000 --- a/lib/laminas/laminas-servicemanager/src/Config.php +++ /dev/null @@ -1,102 +0,0 @@ - */ - private array $allowedKeys = [ - 'abstract_factories' => true, - 'aliases' => true, - 'delegators' => true, - 'factories' => true, - 'initializers' => true, - 'invokables' => true, - 'lazy_services' => true, - 'services' => true, - 'shared' => true, - ]; - - /** - * @var array - * @psalm-var ServiceManagerConfigurationType - */ - protected $config = [ - 'abstract_factories' => [], - 'aliases' => [], - 'delegators' => [], - 'factories' => [], - 'initializers' => [], - 'invokables' => [], - 'lazy_services' => [], - 'services' => [], - 'shared' => [], - ]; - - /** - * @psalm-param ServiceManagerConfigurationType $config - */ - public function __construct(array $config = []) - { - // Only merge keys we're interested in - foreach (array_keys($config) as $key) { - if (! isset($this->allowedKeys[$key])) { - unset($config[$key]); - } - } - - /** @psalm-suppress ArgumentTypeCoercion */ - $this->config = $this->merge($this->config, $config); - } - - /** - * @inheritDoc - */ - public function configureServiceManager(ServiceManager $serviceManager) - { - return $serviceManager->configure($this->config); - } - - /** - * @inheritDoc - */ - public function toArray() - { - return $this->config; - } - - /** - * @psalm-param ServiceManagerConfigurationType $a - * @psalm-param ServiceManagerConfigurationType $b - * @psalm-return ServiceManagerConfigurationType - * @psalm-suppress MixedReturnTypeCoercion - */ - private function merge(array $a, array $b) - { - /** @psalm-suppress MixedReturnTypeCoercion */ - return ArrayUtils::merge($a, $b); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/ConfigInterface.php b/lib/laminas/laminas-servicemanager/src/ConfigInterface.php deleted file mode 100644 index a9c8fc59c..000000000 --- a/lib/laminas/laminas-servicemanager/src/ConfigInterface.php +++ /dev/null @@ -1,90 +0,0 @@ -|Factory\AbstractFactoryInterface) - * > - * @psalm-type DelegatorsConfigurationType = array< - * string, - * array< - * array-key, - * (class-string|Factory\DelegatorFactoryInterface) - * |callable(ContainerInterface,string,callable():object,array|null):object - * > - * > - * @psalm-type FactoriesConfigurationType = array< - * string, - * (class-string|Factory\FactoryInterface) - * |callable(ContainerInterface,string,array|null):object - * > - * @psalm-type InitializersConfigurationType = array< - * array-key, - * (class-string|Initializer\InitializerInterface) - * |callable(ContainerInterface,object):void - * > - * @psalm-type LazyServicesConfigurationType = array{ - * class_map?:array, - * proxies_namespace?:non-empty-string, - * proxies_target_dir?:non-empty-string, - * write_proxy_files?:bool - * } - * @psalm-type ServiceManagerConfigurationType = array{ - * abstract_factories?: AbstractFactoriesConfigurationType, - * aliases?: array, - * delegators?: DelegatorsConfigurationType, - * factories?: FactoriesConfigurationType, - * initializers?: InitializersConfigurationType, - * invokables?: array, - * lazy_services?: LazyServicesConfigurationType, - * services?: array, - * shared?:array - * } - */ -interface ConfigInterface -{ - /** - * Configure a service manager. - * - * Implementations should pull configuration from somewhere (typically - * local properties) and pass it to a ServiceManager's withConfig() method, - * returning a new instance. - * - * @return ServiceManager - */ - public function configureServiceManager(ServiceManager $serviceManager); - - /** - * Return configuration for a service manager instance as an array. - * - * Implementations MUST return an array compatible with ServiceManager::configure, - * containing one or more of the following keys: - * - * - abstract_factories - * - aliases - * - delegators - * - factories - * - initializers - * - invokables - * - lazy_services - * - services - * - shared - * - * In other words, this should return configuration that can be used to instantiate - * a service manager or plugin manager, or pass to its `withConfig()` method. - * - * @return array - * @psalm-return ServiceManagerConfigurationType - */ - public function toArray(); -} diff --git a/lib/laminas/laminas-servicemanager/src/DelegatorFactoryInterface.php b/lib/laminas/laminas-servicemanager/src/DelegatorFactoryInterface.php deleted file mode 100644 index 1b30ecf60..000000000 --- a/lib/laminas/laminas-servicemanager/src/DelegatorFactoryInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - ' . $cursor; - } - $cycle .= ' -> ' . $alias . "\n"; - - return new self(sprintf( - "A cycle was detected within the aliases definitions:\n%s", - $cycle - )); - } - - /** - * @param string[] $aliases map of referenced services, indexed by alias name (string) - * @return self - */ - public static function fromAliasesMap(array $aliases) - { - $detectedCycles = array_filter(array_map( - static fn($alias) => self::getCycleFor($aliases, $alias), - array_keys($aliases) - )); - - if (! $detectedCycles) { - return new self(sprintf( - "A cycle was detected within the following aliases map:\n\n%s", - self::printReferencesMap($aliases) - )); - } - - return new self(sprintf( - "Cycles were detected within the provided aliases:\n\n%s\n\n" - . "The cycle was detected in the following alias map:\n\n%s", - self::printCycles(self::deDuplicateDetectedCycles($detectedCycles)), - self::printReferencesMap($aliases) - )); - } - - /** - * Retrieves the cycle detected for the given $alias, or `null` if no cycle was detected - * - * @param string[] $aliases - * @param string $alias - * @return array|null - */ - private static function getCycleFor(array $aliases, $alias) - { - $cycleCandidate = []; - $targetName = $alias; - - while (isset($aliases[$targetName])) { - if (isset($cycleCandidate[$targetName])) { - return $cycleCandidate; - } - - $cycleCandidate[$targetName] = true; - $targetName = $aliases[$targetName]; - } - - return null; - } - - /** - * @param string[] $aliases - * @return string - */ - private static function printReferencesMap(array $aliases) - { - $map = []; - - foreach ($aliases as $alias => $reference) { - $map[] = '"' . $alias . '" => "' . $reference . '"'; - } - - return "[\n" . implode("\n", $map) . "\n]"; - } - - /** - * @param string[][] $detectedCycles - * @return string - */ - private static function printCycles(array $detectedCycles) - { - return "[\n" . implode("\n", array_map([self::class, 'printCycle'], $detectedCycles)) . "\n]"; - } - - /** - * @param string[] $detectedCycle - * @return string - * @phpcsSuppress SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedMethod - */ - private static function printCycle(array $detectedCycle) - { - $fullCycle = array_keys($detectedCycle); - $fullCycle[] = reset($fullCycle); - - return implode( - ' => ', - array_map( - static fn($cycle): string => '"' . $cycle . '"', - $fullCycle - ) - ); - } - - /** - * @param bool[][] $detectedCycles - * @return bool[][] de-duplicated - */ - private static function deDuplicateDetectedCycles(array $detectedCycles) - { - $detectedCyclesByHash = []; - - foreach ($detectedCycles as $detectedCycle) { - $cycleAliases = array_keys($detectedCycle); - - sort($cycleAliases); - - $hash = serialize($cycleAliases); - - $detectedCyclesByHash[$hash] ??= $detectedCycle; - } - - return array_values($detectedCyclesByHash); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/Exception/ExceptionInterface.php b/lib/laminas/laminas-servicemanager/src/Exception/ExceptionInterface.php deleted file mode 100644 index cccc42df5..000000000 --- a/lib/laminas/laminas-servicemanager/src/Exception/ExceptionInterface.php +++ /dev/null @@ -1,14 +0,0 @@ - $options - * @return object - * @throws ServiceNotFoundException If unable to resolve the service. - * @throws ServiceNotCreatedException If an exception is raised when creating a service. - * @throws ContainerExceptionInterface If any other error occurs. - */ - public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null); -} diff --git a/lib/laminas/laminas-servicemanager/src/Factory/InvokableFactory.php b/lib/laminas/laminas-servicemanager/src/Factory/InvokableFactory.php deleted file mode 100644 index ab09e38e6..000000000 --- a/lib/laminas/laminas-servicemanager/src/Factory/InvokableFactory.php +++ /dev/null @@ -1,29 +0,0 @@ - map of service names to class names */ - private array $servicesMap; - - /** - * @param array $servicesMap A map of service names to - * class names of their respective classes - */ - public function __construct(LazyLoadingValueHolderFactory $proxyFactory, array $servicesMap) - { - $this->proxyFactory = $proxyFactory; - $this->servicesMap = $servicesMap; - } - - /** - * {@inheritDoc} - * - * @param string $name - * @return VirtualProxyInterface - */ - public function __invoke(ContainerInterface $container, $name, callable $callback, ?array $options = null) - { - if (isset($this->servicesMap[$name])) { - $initializer = function (&$wrappedInstance, LazyLoadingInterface $proxy) use ($callback) { - $proxy->setProxyInitializer(null); - $wrappedInstance = $callback(); - - return true; - }; - - return $this->proxyFactory->createProxy($this->servicesMap[$name], $initializer); - } - - throw new Exception\ServiceNotFoundException( - sprintf('The requested service "%s" was not found in the provided services map', $name) - ); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php b/lib/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php deleted file mode 100644 index a0dc4600f..000000000 --- a/lib/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - $name - * @param null|array $options - * @return mixed - * @psalm-return ($name is class-string ? T : mixed) - * @throws Exception\ServiceNotFoundException If no factory/abstract - * factory could be found to create the instance. - * @throws Exception\ServiceNotCreatedException If factory/delegator fails - * to create the instance. - * @throws ContainerExceptionInterface If any other error occurs. - */ - public function build($name, ?array $options = null); -} diff --git a/lib/laminas/laminas-servicemanager/src/ServiceManager.php b/lib/laminas/laminas-servicemanager/src/ServiceManager.php deleted file mode 100644 index c87879c12..000000000 --- a/lib/laminas/laminas-servicemanager/src/ServiceManager.php +++ /dev/null @@ -1,983 +0,0 @@ - - */ - protected $services = []; - - /** - * Enable/disable shared instances by service name. - * - * Example configuration: - * - * 'shared' => [ - * MyService::class => true, // will be shared, even if "sharedByDefault" is false - * MyOtherService::class => false // won't be shared, even if "sharedByDefault" is true - * ] - * - * @var array - */ - protected $shared = []; - - /** - * Should the services be shared by default? - * - * @var bool - */ - protected $sharedByDefault = true; - - /** - * Service manager was already configured? - * - * @var bool - */ - protected $configured = false; - - /** - * Cached abstract factories from string. - */ - private array $cachedAbstractFactories = []; - - /** - * See {@see \Laminas\ServiceManager\ServiceManager::configure()} for details - * on what $config accepts. - * - * @param array $config - * @psalm-param ServiceManagerConfiguration $config - */ - public function __construct(array $config = []) - { - $this->creationContext = $this; - $this->configure($config); - } - - /** - * Implemented for backwards compatibility with previous plugin managers only. - * - * Returns the creation context. - * - * @deprecated since 3.0.0. Factories using 3.0 should use the container - * instance passed to the factory instead. - * - * @return ContainerInterface - */ - public function getServiceLocator() - { - trigger_error(sprintf( - 'Usage of %s is deprecated since v3.0.0; please use the container passed to the factory instead', - __METHOD__ - ), E_USER_DEPRECATED); - return $this->creationContext; - } - - /** - * {@inheritDoc} - */ - public function get($name) - { - // We start by checking if we have cached the requested service; - // this is the fastest method. - if (isset($this->services[$name])) { - return $this->services[$name]; - } - - // Determine if the service should be shared. - $sharedService = $this->shared[$name] ?? $this->sharedByDefault; - - // We achieve better performance if we can let all alias - // considerations out. - if (! $this->aliases) { - $object = $this->doCreate($name); - - // Cache the object for later, if it is supposed to be shared. - if ($sharedService) { - $this->services[$name] = $object; - } - return $object; - } - - // We now deal with requests which may be aliases. - $resolvedName = $this->aliases[$name] ?? $name; - - // Update shared service information as we checked if the alias was shared before. - if ($resolvedName !== $name) { - $sharedService = $this->shared[$resolvedName] ?? $sharedService; - } - - // The following is only true if the requested service is a shared alias. - $sharedAlias = $sharedService && isset($this->services[$resolvedName]); - - // If the alias is configured as a shared service, we are done. - if ($sharedAlias) { - $this->services[$name] = $this->services[$resolvedName]; - return $this->services[$resolvedName]; - } - - // At this point, we have to create the object. - // We use the resolved name for that. - $object = $this->doCreate($resolvedName); - - // Cache the object for later, if it is supposed to be shared. - if ($sharedService) { - $this->services[$resolvedName] = $object; - } - - // Also cache under the alias name; this allows sharing based on the - // service name used. - if ($sharedAlias) { - $this->services[$name] = $object; - } - - return $object; - } - - /** - * {@inheritDoc} - */ - public function build($name, ?array $options = null) - { - // We never cache when using "build". - $name = $this->aliases[$name] ?? $name; - return $this->doCreate($name, $options); - } - - /** - * {@inheritDoc} - * - * @param string|class-string $name - * @return bool - */ - public function has($name) - { - // Check static services and factories first to speedup the most common requests. - return $this->staticServiceOrFactoryCanCreate($name) || $this->abstractFactoryCanCreate($name); - } - - /** - * Indicate whether or not the instance is immutable. - * - * @param bool $flag - */ - public function setAllowOverride($flag) - { - $this->allowOverride = (bool) $flag; - } - - /** - * Retrieve the flag indicating immutability status. - * - * @return bool - */ - public function getAllowOverride() - { - return $this->allowOverride; - } - - /** - * @param array $config - * @psalm-param ServiceManagerConfiguration $config - * @return self - * @throws ContainerModificationsNotAllowedException If the allow - * override flag has been toggled off, and a service instance - * exists for a given service. - */ - public function configure(array $config) - { - // This is a bulk update/initial configuration, - // so we check all definitions up front. - $this->validateServiceNames($config); - - if (isset($config['services'])) { - $this->services = $config['services'] + $this->services; - } - - if (isset($config['invokables']) && ! empty($config['invokables'])) { - $newAliases = $this->createAliasesAndFactoriesForInvokables($config['invokables']); - // override existing aliases with those created by invokables to ensure - // that they are still present after merging aliases later on - $config['aliases'] = $newAliases + ($config['aliases'] ?? []); - } - - if (isset($config['factories'])) { - $this->factories = $config['factories'] + $this->factories; - } - - if (isset($config['delegators'])) { - $this->mergeDelegators($config['delegators']); - } - - if (isset($config['shared'])) { - $this->shared = $config['shared'] + $this->shared; - } - - if (! empty($config['aliases'])) { - $this->aliases = $config['aliases'] + $this->aliases; - $this->mapAliasesToTargets(); - } elseif (! $this->configured && ! empty($this->aliases)) { - $this->mapAliasesToTargets(); - } - - if (isset($config['shared_by_default'])) { - $this->sharedByDefault = $config['shared_by_default']; - } - - // If lazy service configuration was provided, reset the lazy services - // delegator factory. - if (isset($config['lazy_services']) && ! empty($config['lazy_services'])) { - /** @psalm-suppress MixedPropertyTypeCoercion */ - $this->lazyServices = ArrayUtils::merge($this->lazyServices, $config['lazy_services']); - $this->lazyServicesDelegator = null; - } - - // For abstract factories and initializers, we always directly - // instantiate them to avoid checks during service construction. - if (isset($config['abstract_factories'])) { - $abstractFactories = $config['abstract_factories']; - // $key not needed, but foreach is faster than foreach + array_values. - foreach ($abstractFactories as $key => $abstractFactory) { - $this->resolveAbstractFactoryInstance($abstractFactory); - } - } - - if (isset($config['initializers'])) { - $this->resolveInitializers($config['initializers']); - } - - $this->configured = true; - - return $this; - } - - /** - * Add an alias. - * - * @param string $alias - * @param string $target - * @throws ContainerModificationsNotAllowedException If $alias already - * exists as a service and overrides are disallowed. - */ - public function setAlias($alias, $target) - { - if (isset($this->services[$alias]) && ! $this->allowOverride) { - throw ContainerModificationsNotAllowedException::fromExistingService($alias); - } - - $this->mapAliasToTarget($alias, $target); - } - - /** - * Add an invokable class mapping. - * - * @param string $name Service name - * @param null|string $class Class to which to map; if omitted, $name is - * assumed. - * @throws ContainerModificationsNotAllowedException If $name already - * exists as a service and overrides are disallowed. - */ - public function setInvokableClass($name, $class = null) - { - if (isset($this->services[$name]) && ! $this->allowOverride) { - throw ContainerModificationsNotAllowedException::fromExistingService($name); - } - - $this->createAliasesAndFactoriesForInvokables([$name => $class ?? $name]); - } - - /** - * Specify a factory for a given service name. - * - * @param string $name Service name - * @param string|callable|Factory\FactoryInterface $factory Factory to which to map. - * phpcs:disable Generic.Files.LineLength.TooLong - * @psalm-param class-string|callable(ContainerInterface,string,array|null):object|Factory\FactoryInterface $factory - * phpcs:enable Generic.Files.LineLength.TooLong - * @return void - * @throws ContainerModificationsNotAllowedException If $name already - * exists as a service and overrides are disallowed. - */ - public function setFactory($name, $factory) - { - if (isset($this->services[$name]) && ! $this->allowOverride) { - throw ContainerModificationsNotAllowedException::fromExistingService($name); - } - - $this->factories[$name] = $factory; - } - - /** - * Create a lazy service mapping to a class. - * - * @param string $name Service name to map - * @param null|string $class Class to which to map; if not provided, $name - * will be used for the mapping. - */ - public function mapLazyService($name, $class = null) - { - $this->configure(['lazy_services' => ['class_map' => [$name => $class ?: $name]]]); - } - - /** - * Add an abstract factory for resolving services. - * - * @param string|Factory\AbstractFactoryInterface $factory Abstract factory - * instance or class name. - * @psalm-param class-string|Factory\AbstractFactoryInterface $factory - */ - public function addAbstractFactory($factory) - { - $this->resolveAbstractFactoryInstance($factory); - } - - /** - * Add a delegator for a given service. - * - * @param string $name Service name - * @param string|callable|Factory\DelegatorFactoryInterface $factory Delegator - * factory to assign. - * @psalm-param class-string - * |callable(ContainerInterface,string,callable,array|null) $factory - */ - public function addDelegator($name, $factory) - { - $this->configure(['delegators' => [$name => [$factory]]]); - } - - /** - * Add an initializer. - * - * @param string|callable|Initializer\InitializerInterface $initializer - * @psalm-param class-string - * |callable(ContainerInterface,mixed):void - * |Initializer\InitializerInterface $initializer - */ - public function addInitializer($initializer) - { - $this->configure(['initializers' => [$initializer]]); - } - - /** - * Map a service. - * - * @param string $name Service name - * @param array|object $service - * @throws ContainerModificationsNotAllowedException If $name already - * exists as a service and overrides are disallowed. - */ - public function setService($name, $service) - { - if (isset($this->services[$name]) && ! $this->allowOverride) { - throw ContainerModificationsNotAllowedException::fromExistingService($name); - } - $this->services[$name] = $service; - } - - /** - * Add a service sharing rule. - * - * @param string $name Service name - * @param bool $flag Whether or not the service should be shared. - * @throws ContainerModificationsNotAllowedException If $name already - * exists as a service and overrides are disallowed. - */ - public function setShared($name, $flag) - { - if (isset($this->services[$name]) && ! $this->allowOverride) { - throw ContainerModificationsNotAllowedException::fromExistingService($name); - } - - $this->shared[$name] = (bool) $flag; - } - - /** - * Instantiate initializers for to avoid checks during service construction. - * - * @psalm-param InitializersConfigurationType $initializers - */ - private function resolveInitializers(array $initializers): void - { - foreach ($initializers as $initializer) { - if (is_string($initializer) && class_exists($initializer)) { - $initializer = new $initializer(); - } - - if (is_callable($initializer)) { - $this->initializers[] = $initializer; - continue; - } - - throw InvalidArgumentException::fromInvalidInitializer($initializer); - } - } - - /** - * Get a factory for the given service name - * - * @psalm-return (callable(ContainerInterface,string,array|null):object)|Factory\FactoryInterface - * @throws ServiceNotFoundException - */ - private function getFactory(string $name): callable - { - $factory = $this->factories[$name] ?? null; - - $lazyLoaded = false; - if (is_string($factory) && class_exists($factory)) { - $factory = new $factory(); - $lazyLoaded = true; - } - - if (is_callable($factory)) { - if ($lazyLoaded) { - $this->factories[$name] = $factory; - } - - return $factory; - } - - // Check abstract factories - foreach ($this->abstractFactories as $abstractFactory) { - if ($abstractFactory->canCreate($this->creationContext, $name)) { - return $abstractFactory; - } - } - - throw new ServiceNotFoundException(sprintf( - 'Unable to resolve service "%s" to a factory; are you certain you provided it during configuration?', - $name - )); - } - - /** - * @return object - */ - private function createDelegatorFromName(string $name, ?array $options = null) - { - $creationCallback = function () use ($name, $options) { - // Code is inlined for performance reason, instead of abstracting the creation - $factory = $this->getFactory($name); - return $factory($this->creationContext, $name, $options); - }; - - $initialCreationContext = $this->creationContext; - - foreach ($this->delegators[$name] as $index => $delegatorFactory) { - $delegatorFactory = $this->delegators[$name][$index]; - - if ($delegatorFactory === LazyServiceFactory::class) { - $delegatorFactory = $this->createLazyServiceDelegatorFactory(); - } elseif (is_string($delegatorFactory) && class_exists($delegatorFactory)) { - $delegatorFactory = new $delegatorFactory(); - } - - $this->assertCallableDelegatorFactory($delegatorFactory); - - $this->delegators[$name][$index] = $delegatorFactory; - - $creationCallback = - /** @return object */ - static fn() => $delegatorFactory($initialCreationContext, $name, $creationCallback, $options); - } - - return $creationCallback(); - } - - /** - * Create a new instance with an already resolved name - * - * This is a highly performance sensitive method, do not modify if you have not benchmarked it carefully - * - * @return object - * @throws ServiceNotFoundException If unable to resolve the service. - * @throws ServiceNotCreatedException If an exception is raised when creating a service. - * @throws ContainerExceptionInterface If any other error occurs. - */ - private function doCreate(string $resolvedName, ?array $options = null) - { - try { - if (! isset($this->delegators[$resolvedName])) { - // Let's create the service by fetching the factory - $factory = $this->getFactory($resolvedName); - $object = $factory($this->creationContext, $resolvedName, $options); - } else { - $object = $this->createDelegatorFromName($resolvedName, $options); - } - } catch (ContainerExceptionInterface $exception) { - throw $exception; - } catch (Exception $exception) { - throw new ServiceNotCreatedException(sprintf( - 'Service with name "%s" could not be created. Reason: %s', - $resolvedName, - $exception->getMessage() - ), (int) $exception->getCode(), $exception); - } - - foreach ($this->initializers as $initializer) { - $initializer($this->creationContext, $object); - } - - return $object; - } - - /** - * Create the lazy services delegator factory. - * - * Creates the lazy services delegator factory based on the lazy_services - * configuration present. - * - * @throws ServiceNotCreatedException When the lazy service class_map configuration is missing. - */ - private function createLazyServiceDelegatorFactory(): LazyServiceFactory - { - if ($this->lazyServicesDelegator) { - return $this->lazyServicesDelegator; - } - - if (! isset($this->lazyServices['class_map'])) { - throw new ServiceNotCreatedException('Missing "class_map" config key in "lazy_services"'); - } - - $factoryConfig = new ProxyConfiguration(); - - if (isset($this->lazyServices['proxies_namespace'])) { - $factoryConfig->setProxiesNamespace($this->lazyServices['proxies_namespace']); - } - - if (isset($this->lazyServices['proxies_target_dir'])) { - $factoryConfig->setProxiesTargetDir($this->lazyServices['proxies_target_dir']); - } - - if (! isset($this->lazyServices['write_proxy_files']) || ! $this->lazyServices['write_proxy_files']) { - $factoryConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy()); - } else { - $factoryConfig->setGeneratorStrategy(new FileWriterGeneratorStrategy( - new FileLocator($factoryConfig->getProxiesTargetDir()) - )); - } - - spl_autoload_register($factoryConfig->getProxyAutoloader()); - - $this->lazyServicesDelegator = new LazyServiceFactory( - new LazyLoadingValueHolderFactory($factoryConfig), - $this->lazyServices['class_map'] - ); - - return $this->lazyServicesDelegator; - } - - /** - * Merge delegators avoiding multiple same delegators for the same service. - * It works with strings and class instances. - * It's not possible to de-duple anonymous functions - * - * @psalm-param DelegatorsConfigurationType $config - * @psalm-return DelegatorsConfigurationType - */ - private function mergeDelegators(array $config): array - { - foreach ($config as $key => $delegators) { - if (! array_key_exists($key, $this->delegators)) { - $this->delegators[$key] = $delegators; - continue; - } - - foreach ($delegators as $delegator) { - if (! in_array($delegator, $this->delegators[$key], true)) { - $this->delegators[$key][] = $delegator; - } - } - } - - return $this->delegators; - } - - /** - * Create aliases and factories for invokable classes. - * - * If an invokable service name does not match the class it maps to, this - * creates an alias to the class (which will later be mapped as an - * invokable factory). The newly created aliases will be returned as an array. - * - * @param array $invokables - * @return array - */ - private function createAliasesAndFactoriesForInvokables(array $invokables): array - { - $newAliases = []; - - foreach ($invokables as $name => $class) { - $this->factories[$class] = Factory\InvokableFactory::class; - if ($name !== $class) { - $this->aliases[$name] = $class; - $newAliases[$name] = $class; - } - } - - return $newAliases; - } - - /** - * Determine if a service for any name provided by a service - * manager configuration(services, aliases, factories, ...) - * already exists, and if it exists, determine if is it allowed - * to get overriden. - * - * Validation in the context of this class means, that for - * a given service name we do not have a service instance - * in the cache OR override is explicitly allowed. - * - * @psalm-param ServiceManagerConfigurationType $config - * @throws ContainerModificationsNotAllowedException If any - * service key is invalid. - */ - private function validateServiceNames(array $config): void - { - if ($this->allowOverride || ! $this->configured) { - return; - } - - if (isset($config['services'])) { - foreach (array_keys($config['services']) as $service) { - if (isset($this->services[$service])) { - throw ContainerModificationsNotAllowedException::fromExistingService($service); - } - } - } - - if (isset($config['aliases'])) { - foreach (array_keys($config['aliases']) as $service) { - if (isset($this->services[$service])) { - throw ContainerModificationsNotAllowedException::fromExistingService($service); - } - } - } - - if (isset($config['invokables'])) { - foreach (array_keys($config['invokables']) as $service) { - if (isset($this->services[$service])) { - throw ContainerModificationsNotAllowedException::fromExistingService($service); - } - } - } - - if (isset($config['factories'])) { - foreach (array_keys($config['factories']) as $service) { - if (isset($this->services[$service])) { - throw ContainerModificationsNotAllowedException::fromExistingService($service); - } - } - } - - if (isset($config['delegators'])) { - foreach (array_keys($config['delegators']) as $service) { - if (isset($this->services[$service])) { - throw ContainerModificationsNotAllowedException::fromExistingService($service); - } - } - } - - if (isset($config['shared'])) { - foreach (array_keys($config['shared']) as $service) { - if (isset($this->services[$service])) { - throw ContainerModificationsNotAllowedException::fromExistingService($service); - } - } - } - - if (isset($config['lazy_services']['class_map'])) { - foreach (array_keys($config['lazy_services']['class_map']) as $service) { - if (isset($this->services[$service])) { - throw ContainerModificationsNotAllowedException::fromExistingService($service); - } - } - } - } - - /** - * Assuming that the alias name is valid (see above) resolve/add it. - * - * This is done differently from bulk mapping aliases for performance reasons, as the - * algorithms for mapping a single item efficiently are different from those of mapping - * many. - */ - private function mapAliasToTarget(string $alias, string $target): void - { - // $target is either an alias or something else - // if it is an alias, resolve it - $this->aliases[$alias] = $this->aliases[$target] ?? $target; - - // a self-referencing alias indicates a cycle - if ($alias === $this->aliases[$alias]) { - throw CyclicAliasException::fromCyclicAlias($alias, $this->aliases); - } - - // finally we have to check if existing incomplete alias definitions - // exist which can get resolved by the new alias - if (in_array($alias, $this->aliases)) { - $r = array_intersect($this->aliases, [$alias]); - // found some, resolve them - foreach ($r as $name => $service) { - $this->aliases[$name] = $target; - } - } - } - - /** - * Assuming that all provided alias keys are valid resolve them. - * - * This function maps $this->aliases in place. - * - * This algorithm is an adaptated version of Tarjans Strongly - * Connected Components. Instead of returning the strongly - * connected components (i.e. cycles in our case), we throw. - * If nodes are not strongly connected (i.e. resolvable in - * our case), they get resolved. - * - * This algorithm is fast for mass updates through configure(). - * It is not appropriate if just a single alias is added. - * - * @see mapAliasToTarget above - */ - private function mapAliasesToTargets(): void - { - $tagged = []; - foreach ($this->aliases as $alias => $target) { - if (isset($tagged[$alias])) { - continue; - } - - $tCursor = $this->aliases[$alias]; - $aCursor = $alias; - if ($aCursor === $tCursor) { - throw CyclicAliasException::fromCyclicAlias($alias, $this->aliases); - } - if (! isset($this->aliases[$tCursor])) { - continue; - } - - $stack = []; - - while (isset($this->aliases[$tCursor])) { - $stack[] = $aCursor; - if ($aCursor === $this->aliases[$tCursor]) { - throw CyclicAliasException::fromCyclicAlias($alias, $this->aliases); - } - $aCursor = $tCursor; - $tCursor = $this->aliases[$tCursor]; - } - - $tagged[$aCursor] = true; - - foreach ($stack as $alias) { - if ($alias === $tCursor) { - throw CyclicAliasException::fromCyclicAlias($alias, $this->aliases); - } - $this->aliases[$alias] = $tCursor; - $tagged[$alias] = true; - } - } - } - - /** - * Instantiate abstract factories in order to avoid checks during service construction. - * - * @param string|Factory\AbstractFactoryInterface $abstractFactory - * @psalm-param class-string|Factory\AbstractFactoryInterface $abstractFactory - */ - private function resolveAbstractFactoryInstance($abstractFactory): void - { - if (is_string($abstractFactory) && class_exists($abstractFactory)) { - // Cached string factory name - if (! isset($this->cachedAbstractFactories[$abstractFactory])) { - $this->cachedAbstractFactories[$abstractFactory] = new $abstractFactory(); - } - - $abstractFactory = $this->cachedAbstractFactories[$abstractFactory]; - } - - if (! $abstractFactory instanceof Factory\AbstractFactoryInterface) { - throw InvalidArgumentException::fromInvalidAbstractFactory($abstractFactory); - } - - $abstractFactoryObjHash = spl_object_hash($abstractFactory); - $this->abstractFactories[$abstractFactoryObjHash] = $abstractFactory; - } - - /** - * Check if a static service or factory exists for the given name. - */ - private function staticServiceOrFactoryCanCreate(string $name): bool - { - if (isset($this->services[$name]) || isset($this->factories[$name])) { - return true; - } - - $resolvedName = $this->aliases[$name] ?? $name; - if ($resolvedName !== $name) { - return $this->staticServiceOrFactoryCanCreate($resolvedName); - } - - return false; - } - - /** - * Check if an abstract factory exists that can create a service for the given name. - */ - private function abstractFactoryCanCreate(string $name): bool - { - foreach ($this->abstractFactories as $abstractFactory) { - if ($abstractFactory->canCreate($this->creationContext, $name)) { - return true; - } - } - - $resolvedName = $this->aliases[$name] ?? $name; - if ($resolvedName !== $name) { - return $this->abstractFactoryCanCreate($resolvedName); - } - - return false; - } - - /** - * @psalm-param mixed $delegatorFactory - * @psalm-assert callable(ContainerInterface,string,callable():object,array|null):object $delegatorFactory - */ - private function assertCallableDelegatorFactory($delegatorFactory): void - { - if ( - $delegatorFactory instanceof Factory\DelegatorFactoryInterface - || is_callable($delegatorFactory) - ) { - return; - } - if (is_string($delegatorFactory)) { - throw new ServiceNotCreatedException(sprintf( - 'An invalid delegator factory was registered; resolved to class or function "%s"' - . ' which does not exist; please provide a valid function name or class name resolving' - . ' to an implementation of %s', - $delegatorFactory, - DelegatorFactoryInterface::class - )); - } - throw new ServiceNotCreatedException(sprintf( - 'A non-callable delegator, "%s", was provided; expected a callable or instance of "%s"', - is_object($delegatorFactory) ? get_class($delegatorFactory) : gettype($delegatorFactory), - DelegatorFactoryInterface::class - )); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/Tool/ConfigDumper.php b/lib/laminas/laminas-servicemanager/src/Tool/ConfigDumper.php deleted file mode 100644 index c9e6b8752..000000000 --- a/lib/laminas/laminas-servicemanager/src/Tool/ConfigDumper.php +++ /dev/null @@ -1,263 +0,0 @@ -container = $container; - } - - /** - * @param array $config - * @param string $className - * @param bool $ignoreUnresolved - * @return array - * @throws InvalidArgumentException For invalid $className. - */ - public function createDependencyConfig(array $config, $className, $ignoreUnresolved = false) - { - $this->validateClassName($className); - - $reflectionClass = new ReflectionClass($className); - - // class is an interface; do nothing - if ($reflectionClass->isInterface()) { - return $config; - } - - // class has no constructor, treat it as an invokable - if (! $reflectionClass->getConstructor()) { - return $this->createInvokable($config, $className); - } - - $constructorArguments = $reflectionClass->getConstructor()->getParameters(); - $constructorArguments = array_filter( - $constructorArguments, - static fn(ReflectionParameter $argument): bool => ! $argument->isOptional() - ); - - // has no required parameters, treat it as an invokable - if (empty($constructorArguments)) { - return $this->createInvokable($config, $className); - } - - $classConfig = []; - - foreach ($constructorArguments as $constructorArgument) { - $type = $constructorArgument->getType(); - $argumentType = null !== $type && ! $type->isBuiltin() ? $type->getName() : null; - - if ($argumentType === null) { - if ($ignoreUnresolved) { - // don't throw an exception, just return the previous config - return $config; - } - // don't throw an exception if the class is an already defined service - if ($this->container && $this->container->has($className)) { - return $config; - } - throw new InvalidArgumentException(sprintf( - 'Cannot create config for constructor argument "%s", ' - . 'it has no type hint, or non-class/interface type hint', - $constructorArgument->getName() - )); - } - $config = $this->createDependencyConfig($config, $argumentType, $ignoreUnresolved); - $classConfig[] = $argumentType; - } - - $config[ConfigAbstractFactory::class][$className] = $classConfig; - - return $config; - } - - /** - * @param string $className - * @throws InvalidArgumentException If class name is not a string or does - * not exist. - */ - private function validateClassName($className) - { - if (! is_string($className)) { - throw new InvalidArgumentException('Class name must be a string, ' . gettype($className) . ' given'); - } - - if (! class_exists($className) && ! interface_exists($className)) { - throw new InvalidArgumentException('Cannot find class or interface with name ' . $className); - } - } - - /** - * @param array $config - * @param string $className - * @return array - */ - private function createInvokable(array $config, $className) - { - $config[ConfigAbstractFactory::class][$className] = []; - return $config; - } - - /** - * @param array $config - * @return array - * @throws InvalidArgumentException If ConfigAbstractFactory configuration - * value is not an array. - */ - public function createFactoryMappingsFromConfig(array $config) - { - if (! array_key_exists(ConfigAbstractFactory::class, $config)) { - return $config; - } - - if (! is_array($config[ConfigAbstractFactory::class])) { - throw new InvalidArgumentException( - 'Config key for ' . ConfigAbstractFactory::class . ' should be an array, ' . gettype( - $config[ConfigAbstractFactory::class] - ) . ' given' - ); - } - - foreach ($config[ConfigAbstractFactory::class] as $className => $dependency) { - $config = $this->createFactoryMappings($config, $className); - } - return $config; - } - - /** - * @param array $config - * @param string $className - * @return array - */ - public function createFactoryMappings(array $config, $className) - { - $this->validateClassName($className); - - if ( - array_key_exists('service_manager', $config) - && array_key_exists('factories', $config['service_manager']) - && array_key_exists($className, $config['service_manager']['factories']) - ) { - return $config; - } - - $config['service_manager']['factories'][$className] = ConfigAbstractFactory::class; - return $config; - } - - /** - * @param array $config - * @return string - */ - public function dumpConfigFile(array $config) - { - $prepared = $this->prepareConfig($config); - return sprintf( - self::CONFIG_TEMPLATE, - static::class, - date('Y-m-d H:i:s'), - $prepared - ); - } - - /** - * @param array|Traversable $config - * @param int $indentLevel - * @return string - */ - private function prepareConfig($config, $indentLevel = 1) - { - $indent = str_repeat(' ', $indentLevel * 4); - $entries = []; - foreach ($config as $key => $value) { - $key = $this->createConfigKey($key); - $entries[] = sprintf( - '%s%s%s,', - $indent, - $key ? sprintf('%s => ', $key) : '', - $this->createConfigValue($value, $indentLevel) - ); - } - - $outerIndent = str_repeat(' ', ($indentLevel - 1) * 4); - - return sprintf( - "[\n%s\n%s]", - implode("\n", $entries), - $outerIndent - ); - } - - /** - * @param string|int|null $key - * @return null|string - */ - private function createConfigKey($key) - { - if (is_string($key) && class_exists($key)) { - return sprintf('\\%s::class', $key); - } - - if (is_int($key)) { - return null; - } - - return sprintf("'%s'", $key); - } - - /** - * @param mixed $value - * @param int $indentLevel - * @return string - */ - private function createConfigValue($value, $indentLevel) - { - if (is_array($value) || $value instanceof Traversable) { - return $this->prepareConfig($value, $indentLevel + 1); - } - - if (is_string($value) && class_exists($value)) { - return sprintf('\\%s::class', $value); - } - - return var_export($value, true); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/Tool/ConfigDumperCommand.php b/lib/laminas/laminas-servicemanager/src/Tool/ConfigDumperCommand.php deleted file mode 100644 index 6ce1fda83..000000000 --- a/lib/laminas/laminas-servicemanager/src/Tool/ConfigDumperCommand.php +++ /dev/null @@ -1,248 +0,0 @@ -, - * class: string, - * ignoreUnresolved: bool - * } - */ -class ConfigDumperCommand -{ - public const COMMAND_DUMP = 'dump'; - public const COMMAND_ERROR = 'error'; - public const COMMAND_HELP = 'help'; - - public const DEFAULT_SCRIPT_NAME = self::class; - - public const HELP_TEMPLATE = <<Usage: - - %s [-h|--help|help] [-i|--ignore-unresolved] - -Arguments: - - -h|--help|help This usage message - -i|--ignore-unresolved Ignore classes with unresolved direct dependencies. - Path to a config file for which to generate - configuration. If the file does not exist, it will - be created. If it does exist, it must return an - array, and the file will be updated with new - configuration. - Name of the class to reflect and for which to - generate dependency configuration. - -Reads the provided configuration file (creating it if it does not exist), -and injects it with ConfigAbstractFactory dependency configuration for -the provided class name, writing the changes back to the file. -EOH; - - private ConsoleHelper $helper; - - private string $scriptName; - - /** - * @param string $scriptName - */ - public function __construct($scriptName = self::DEFAULT_SCRIPT_NAME, ?ConsoleHelper $helper = null) - { - $this->scriptName = $scriptName; - $this->helper = $helper ?: new ConsoleHelper(); - } - - /** - * @param array $args Argument list, minus script name - * @return int Exit status - */ - public function __invoke(array $args) - { - $arguments = $this->parseArgs($args); - - switch ($arguments->command) { - case self::COMMAND_HELP: - $this->help(); - return 0; - case self::COMMAND_ERROR: - $this->helper->writeErrorMessage($arguments->message); - $this->help(STDERR); - return 1; - case self::COMMAND_DUMP: - // fall-through - default: - break; - } - - $dumper = new ConfigDumper(); - try { - $config = $dumper->createDependencyConfig( - $arguments->config, - $arguments->class, - $arguments->ignoreUnresolved - ); - } catch (Exception\InvalidArgumentException $e) { - $this->helper->writeErrorMessage(sprintf( - 'Unable to create config for "%s": %s', - $arguments->class, - $e->getMessage() - )); - $this->help(STDERR); - return 1; - } - - file_put_contents($arguments->configFile, $dumper->dumpConfigFile($config)); - - $this->helper->writeLine(sprintf( - '[DONE] Changes written to %s', - $arguments->configFile - )); - return 0; - } - - /** - * @param array $args - * @return object - */ - private function parseArgs(array $args) - { - if (! $args) { - return $this->createHelpArgument(); - } - - $arg1 = array_shift($args); - - if (in_array($arg1, ['-h', '--help', 'help'], true)) { - return $this->createHelpArgument(); - } - - $ignoreUnresolved = false; - if (in_array($arg1, ['-i', '--ignore-unresolved'], true)) { - $ignoreUnresolved = true; - $arg1 = array_shift($args); - } - - if (! $args) { - return $this->createErrorArgument('Missing class name'); - } - - $configFile = $arg1; - switch (file_exists($configFile)) { - case true: - $config = require $configFile; - - if (! is_array($config)) { - return $this->createErrorArgument(sprintf( - 'Configuration at path "%s" does not return an array.', - $configFile - )); - } - - break; - case false: - // fall-through - default: - if (! is_writable(dirname($configFile))) { - return $this->createErrorArgument(sprintf( - 'Cannot create configuration at path "%s"; not writable.', - $configFile - )); - } - - $config = []; - break; - } - - $class = array_shift($args); - - if (! class_exists($class)) { - return $this->createErrorArgument(sprintf( - 'Class "%s" does not exist or could not be autoloaded.', - $class - )); - } - - return $this->createArguments(self::COMMAND_DUMP, $configFile, $config, $class, $ignoreUnresolved); - } - - /** - * @param resource $resource Defaults to STDOUT - * @return void - */ - private function help($resource = STDOUT) - { - $this->helper->writeLine(sprintf( - self::HELP_TEMPLATE, - $this->scriptName - ), true, $resource); - } - - /** - * @param string $command - * @param string $configFile File from which config originates, and to - * which it will be written. - * @param array $config Parsed configuration. - * @param string $class Name of class to reflect. - * @param bool $ignoreUnresolved If to ignore classes with unresolved direct dependencies. - * @return ArgumentObject - */ - private function createArguments($command, $configFile, $config, $class, $ignoreUnresolved) - { - return (object) [ - 'command' => $command, - 'configFile' => $configFile, - 'config' => $config, - 'class' => $class, - 'ignoreUnresolved' => $ignoreUnresolved, - ]; - } - - /** - * @param string $message - * @return ErrorObject - */ - private function createErrorArgument($message) - { - return (object) [ - 'command' => self::COMMAND_ERROR, - 'message' => $message, - ]; - } - - /** - * @return HelpObject - */ - private function createHelpArgument() - { - return (object) [ - 'command' => self::COMMAND_HELP, - ]; - } -} diff --git a/lib/laminas/laminas-servicemanager/src/Tool/FactoryCreator.php b/lib/laminas/laminas-servicemanager/src/Tool/FactoryCreator.php deleted file mode 100644 index ae8f39847..000000000 --- a/lib/laminas/laminas-servicemanager/src/Tool/FactoryCreator.php +++ /dev/null @@ -1,164 +0,0 @@ -getClassName($className); - - return sprintf( - self::FACTORY_TEMPLATE, - preg_replace('/\\\\' . $class . '$/', '', $className), - $this->createImportStatements($className), - $class, - $class, - $class, - $this->createArgumentString($className) - ); - } - - private function getClassName(string $className): string - { - return substr($className, strrpos($className, '\\') + 1); - } - - /** - * @param string $className - * @return array - */ - private function getConstructorParameters($className) - { - $reflectionClass = new ReflectionClass($className); - - if (! $reflectionClass->getConstructor()) { - return []; - } - - $constructorParameters = $reflectionClass->getConstructor()->getParameters(); - - if (empty($constructorParameters)) { - return []; - } - - $constructorParameters = array_filter( - $constructorParameters, - function (ReflectionParameter $argument): bool { - if ($argument->isOptional()) { - return false; - } - - $type = $argument->getType(); - $class = null !== $type && ! $type->isBuiltin() ? $type->getName() : null; - - if (null === $class) { - throw new InvalidArgumentException(sprintf( - 'Cannot identify type for constructor argument "%s"; ' - . 'no type hint, or non-class/interface type hint', - $argument->getName() - )); - } - - return true; - } - ); - - if (empty($constructorParameters)) { - return []; - } - - return array_map(function (ReflectionParameter $parameter): ?string { - $type = $parameter->getType(); - return null !== $type && ! $type->isBuiltin() ? $type->getName() : null; - }, $constructorParameters); - } - - /** - * @param string $className - * @return string - */ - private function createArgumentString($className) - { - $arguments = array_map(fn(string $dependency): string - => sprintf('$container->get(\\%s::class)', $dependency), $this->getConstructorParameters($className)); - - switch (count($arguments)) { - case 0: - return ''; - case 1: - return array_shift($arguments); - default: - $argumentPad = str_repeat(' ', 12); - $closePad = str_repeat(' ', 8); - return sprintf( - "\n%s%s\n%s", - $argumentPad, - implode(",\n" . $argumentPad, $arguments), - $closePad - ); - } - } - - private function createImportStatements(string $className): string - { - $imports = array_merge(self::IMPORT_ALWAYS, [$className]); - sort($imports); - return implode("\n", array_map(static fn(string $import): string => sprintf('use %s;', $import), $imports)); - } -} diff --git a/lib/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php b/lib/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php deleted file mode 100644 index ec6c1fc69..000000000 --- a/lib/laminas/laminas-servicemanager/src/Tool/FactoryCreatorCommand.php +++ /dev/null @@ -1,154 +0,0 @@ -Usage: - - %s [-h|--help|help] - -Arguments: - - -h|--help|help This usage message - Name of the class to reflect and for which to generate - a factory. - -Generates to STDOUT a factory for creating the specified class; this may then -be added to your application, and configured as a factory for the class. -EOH; - - private ConsoleHelper $helper; - - private string $scriptName; - - /** - * @param string $scriptName - */ - public function __construct($scriptName = self::DEFAULT_SCRIPT_NAME, ?ConsoleHelper $helper = null) - { - $this->scriptName = $scriptName; - $this->helper = $helper ?: new ConsoleHelper(); - } - - /** - * @param array $args Argument list, minus script name - * @return int Exit status - */ - public function __invoke(array $args) - { - $arguments = $this->parseArgs($args); - - switch ($arguments->command) { - case self::COMMAND_HELP: - $this->help(); - return 0; - case self::COMMAND_ERROR: - assert(is_string($arguments->message)); - $this->helper->writeErrorMessage($arguments->message); - $this->help(STDERR); - return 1; - case self::COMMAND_DUMP: - // fall-through - default: - break; - } - - $generator = new FactoryCreator(); - assert(is_string($arguments->class)); - try { - $factory = $generator->createFactory($arguments->class); - } catch (Exception\InvalidArgumentException $e) { - $this->helper->writeErrorMessage(sprintf( - 'Unable to create factory for "%s": %s', - $arguments->class, - $e->getMessage() - )); - $this->help(STDERR); - return 1; - } - - $this->helper->write($factory, false); - return 0; - } - - /** - * @param array $args - * @return ArgumentObject - */ - private function parseArgs(array $args) - { - if (! $args) { - return $this->createArguments(self::COMMAND_HELP); - } - - $arg1 = array_shift($args); - - if (in_array($arg1, ['-h', '--help', 'help'], true)) { - return $this->createArguments(self::COMMAND_HELP); - } - - $class = $arg1; - - if (! class_exists($class)) { - return $this->createArguments(self::COMMAND_ERROR, null, sprintf( - 'Class "%s" does not exist or could not be autoloaded.', - $class - )); - } - - return $this->createArguments(self::COMMAND_DUMP, $class); - } - - /** - * @param resource $resource Defaults to STDOUT - * @return void - */ - private function help($resource = STDOUT) - { - $this->helper->writeLine(sprintf( - self::HELP_TEMPLATE, - $this->scriptName - ), true, $resource); - } - - /** - * @param string $command - * @param string|null $class Name of class to reflect. - * @param string|null $error Error message, if any. - * @return ArgumentObject - */ - private function createArguments($command, $class = null, $error = null) - { - return (object) [ - 'command' => $command, - 'class' => $class, - 'message' => $error, - ]; - } -} diff --git a/lib/laminas/laminas-servicemanager/src/autoload.php b/lib/laminas/laminas-servicemanager/src/autoload.php deleted file mode 100644 index 76bd64e07..000000000 --- a/lib/laminas/laminas-servicemanager/src/autoload.php +++ /dev/null @@ -1,21 +0,0 @@ - ## 🇷🇺 Русским гражданам -> -> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм. -> -> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую. -> -> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!" -> -> ## 🇺🇸 To Citizens of Russia -> -> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. -> -> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. -> -> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!" - -`Laminas\Stdlib` is a set of components that implements general purpose utility -class for different scopes like: - -- array utilities functions; -- general messaging systems; -- string wrappers; -- etc. - ---- - -- File issues at https://github.com/laminas/laminas-stdlib/issues -- Documentation is at https://docs.laminas.dev/laminas-stdlib/ - -## Benchmarks - -We provide scripts for benchmarking laminas-stdlib using the -[PHPBench](https://github.com/phpbench/phpbench) framework; these can be -found in the `benchmark/` directory. - -To execute the benchmarks you can run the following command: - -```bash -$ vendor/bin/phpbench run --report=aggregate -``` diff --git a/lib/laminas/laminas-stdlib/composer.json b/lib/laminas/laminas-stdlib/composer.json deleted file mode 100644 index 711b3fc95..000000000 --- a/lib/laminas/laminas-stdlib/composer.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "laminas/laminas-stdlib", - "description": "SPL extensions, array utilities, error handlers, and more", - "license": "BSD-3-Clause", - "keywords": [ - "laminas", - "stdlib" - ], - "homepage": "https://laminas.dev", - "support": { - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "source": "https://github.com/laminas/laminas-stdlib", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "chat": "https://laminas.dev/chat", - "forum": "https://discourse.laminas.dev" - }, - "config": { - "sort-packages": true, - "platform": { - "php": "7.4.99" - }, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - }, - "extra": { - }, - "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.23", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.26", - "phpstan/phpdoc-parser": "^0.5.4" - }, - "autoload": { - "psr-4": { - "Laminas\\Stdlib\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "LaminasTest\\Stdlib\\": "test/", - "LaminasBench\\Stdlib\\": "benchmark/" - } - }, - "scripts": { - "check": [ - "@cs-check", - "@test" - ], - "cs-check": "phpcs", - "cs-fix": "phpcbf", - "static-analysis": "psalm --shepherd --stats", - "test": "phpunit --colors=always", - "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" - }, - "conflict": { - "zendframework/zend-stdlib": "*" - } -} diff --git a/lib/laminas/laminas-stdlib/composer.lock b/lib/laminas/laminas-stdlib/composer.lock deleted file mode 100644 index c2f7beca3..000000000 --- a/lib/laminas/laminas-stdlib/composer.lock +++ /dev/null @@ -1,4852 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "6797353dc8a3d832ed036772471afd74", - "packages": [], - "packages-dev": [ - { - "name": "amphp/amp", - "version": "v2.6.2", - "source": { - "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ], - "psr-4": { - "Amp\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "https://amphp.org/amp", - "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2022-02-20T17:52:18+00:00" - }, - { - "name": "amphp/byte-stream", - "version": "v1.8.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Amp\\ByteStream\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2021-03-30T17:13:30+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, - { - "name": "composer/pcre", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T20:21:48+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-04-01T19:23:25+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" - }, - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - }, - { - "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2022-02-04T12:51:07+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" - }, - "time": "2019-12-04T15:06:13+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.13.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2", - "vimeo/psalm": "^4.10" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.3" - }, - "time": "2022-07-02T10:48:51+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-02-28T11:07:21+00:00" - }, - { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "shasum": "" - }, - "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "A more advanced JSONRPC implementation", - "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" - }, - "time": "2021-06-11T22:34:44+00:00" - }, - { - "name": "felixfbecker/language-server-protocol", - "version": "v1.5.2", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "LanguageServerProtocol\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "PHP classes for the Language Server Protocol", - "keywords": [ - "language", - "microsoft", - "php", - "server" - ], - "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" - }, - "time": "2022-03-02T22:36:06+00:00" - }, - { - "name": "laminas/laminas-coding-standard", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/bcf6e07fe4690240be7beb6d884d0b0fafa6a251", - "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "php": "^7.3 || ^8.0", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.6", - "webimpress/coding-standard": "^1.2" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "LaminasCodingStandard\\": "src/LaminasCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas Coding Standard", - "homepage": "https://laminas.dev", - "keywords": [ - "Coding Standard", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-coding-standard/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-coding-standard/issues", - "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", - "source": "https://github.com/laminas/laminas-coding-standard" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-05-29T15:53:59+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "netresearch/jsonmapper", - "version": "v4.0.0", - "source": { - "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", - "squizlabs/php_codesniffer": "~3.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonMapper": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" - } - ], - "description": "Map nested JSON structures onto PHP classes", - "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" - }, - "time": "2020-12-01T19:48:11+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.14.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" - }, - "time": "2022-05-31T20:59:12+00:00" - }, - { - "name": "openlss/lib-array2xml", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nullivex/lib-array2xml.git", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "LSS": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Bryan Tong", - "email": "bryan@nullivex.com", - "homepage": "https://www.nullivex.com" - }, - { - "name": "Tony Butler", - "email": "spudz76@gmail.com", - "homepage": "https://www.nullivex.com" - } - ], - "description": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com", - "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" - ], - "support": { - "issues": "https://github.com/nullivex/lib-array2xml/issues", - "source": "https://github.com/nullivex/lib-array2xml/tree/master" - }, - "time": "2019-03-29T20:06:56+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpbench/container", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpbench/container.git", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/container/zipball/6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "reference": "6d555ff7174fca13f9b1ec0b4a089ed41d0ab392", - "shasum": "" - }, - "require": { - "psr/container": "^1.0|^2.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12.52", - "phpunit/phpunit": "^8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\DependencyInjection\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "Simple, configurable, service container.", - "support": { - "issues": "https://github.com/phpbench/container/issues", - "source": "https://github.com/phpbench/container/tree/2.2.1" - }, - "time": "2022-01-25T10:17:35+00:00" - }, - { - "name": "phpbench/dom", - "version": "0.3.2", - "source": { - "type": "git", - "url": "https://github.com/phpbench/dom.git", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/dom/zipball/b013b717832ddbaadf2a40984b04bc66af9a7110", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^7.2||^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", - "phpstan/phpstan": "^0.12.83", - "phpunit/phpunit": "^8.0||^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpBench\\Dom\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "DOM wrapper to simplify working with the PHP DOM implementation", - "support": { - "issues": "https://github.com/phpbench/dom/issues", - "source": "https://github.com/phpbench/dom/tree/0.3.2" - }, - "time": "2021-09-24T15:26:07+00:00" - }, - { - "name": "phpbench/phpbench", - "version": "1.2.6", - "source": { - "type": "git", - "url": "https://github.com/phpbench/phpbench.git", - "reference": "c30fac992e72b505a1f131790583647f4d3255c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/c30fac992e72b505a1f131790583647f4d3255c3", - "reference": "c30fac992e72b505a1f131790583647f4d3255c3", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.13", - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0", - "phpbench/container": "^2.1", - "phpbench/dom": "~0.3.1", - "psr/log": "^1.1 || ^2.0 || ^3.0", - "seld/jsonlint": "^1.1", - "symfony/console": "^4.2 || ^5.0 || ^6.0", - "symfony/filesystem": "^4.2 || ^5.0 || ^6.0", - "symfony/finder": "^4.2 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.2 || ^5.0 || ^6.0", - "symfony/process": "^4.2 || ^5.0 || ^6.0", - "webmozart/path-util": "^2.3" - }, - "require-dev": { - "dantleech/invoke": "^2.0", - "friendsofphp/php-cs-fixer": "^3.0", - "jangregor/phpstan-prophecy": "^0.8.1", - "phpspec/prophecy": "^1.12", - "phpstan/phpstan": "^0.12.7", - "phpunit/phpunit": "^8.5.8 || ^9.0", - "symfony/error-handler": "^5.2 || ^6.0", - "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-xdebug": "For Xdebug profiling extension." - }, - "bin": [ - "bin/phpbench" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "files": [ - "lib/Report/Func/functions.php" - ], - "psr-4": { - "PhpBench\\": "lib/", - "PhpBench\\Extensions\\XDebug\\": "extensions/xdebug/lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Leech", - "email": "daniel@dantleech.com" - } - ], - "description": "PHP Benchmarking Framework", - "support": { - "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.2.6" - }, - "funding": [ - { - "url": "https://github.com/dantleech", - "type": "github" - } - ], - "time": "2022-07-19T19:52:39+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "0.5.6", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fac86158ffc7392e49636f77e63684c026df43b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fac86158ffc7392e49636f77e63684c026df43b8", - "reference": "fac86158ffc7392e49636f77e63684c026df43b8", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.87", - "phpstan/phpstan-strict-rules": "^0.12.5", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/0.5.6" - }, - "time": "2021-08-31T08:08:22+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.16", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2593003befdcc10db5e213f9f28814f5aa8ac073", - "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.16" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-08-20T05:26:47+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.23", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "888556852e7e9bbeeedb9656afe46118765ade34" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/888556852e7e9bbeeedb9656afe46118765ade34", - "reference": "888556852e7e9bbeeedb9656afe46118765ade34", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.23" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-08-22T14:01:36+00:00" - }, - { - "name": "psalm/plugin-phpunit", - "version": "0.17.0", - "source": { - "type": "git", - "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "45951541beef07e93e3ad197daf01da88e85c31d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/45951541beef07e93e3ad197daf01da88e85c31d", - "reference": "45951541beef07e93e3ad197daf01da88e85c31d", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.10", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "ext-simplexml": "*", - "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.5" - }, - "conflict": { - "phpunit/phpunit": "<7.5" - }, - "require-dev": { - "codeception/codeception": "^4.0.3", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.11.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" - } - }, - "autoload": { - "psr-4": { - "Psalm\\PhpUnitPlugin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matt Brown", - "email": "github@muglug.com" - } - ], - "description": "Psalm plugin for PHPUnit", - "support": { - "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.17.0" - }, - "time": "2022-06-14T17:05:57+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/master" - }, - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-11-11T14:18:36+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-15T09:54:48+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2022-04-01T13:37:23+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "7.0.15", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "cc80e59f9b4ca642f02dc1b615c37a9afc2a0f80" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/cc80e59f9b4ca642f02dc1b615c37a9afc2a0f80", - "reference": "cc80e59f9b4ca642f02dc1b615c37a9afc2a0f80", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "0.5.1 - 0.5.6", - "squizlabs/php_codesniffer": "^3.6.0" - }, - "require-dev": { - "phing/phing": "2.17.0", - "php-parallel-lint/php-parallel-lint": "1.3.1", - "phpstan/phpstan": "0.12.98", - "phpstan/phpstan-deprecation-rules": "0.12.6", - "phpstan/phpstan-phpunit": "0.12.22", - "phpstan/phpstan-strict-rules": "0.12.11", - "phpunit/phpunit": "7.5.20|8.5.5|9.5.9" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.0.15" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2021-09-09T10:29:09+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/535846c7ee6bc4dd027ca0d93220601456734b10", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-22T10:42:43+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "6699fb0228d1bc35b12aed6dd5e7455457609ddd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6699fb0228d1bc35b12aed6dd5e7455457609ddd", - "reference": "6699fb0228d1bc35b12aed6dd5e7455457609ddd", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-20T13:00:38+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-29T07:37:50+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", - "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-20T13:00:38+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-10T07:21:04+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-27T16:58:25+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v1.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", - "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "suggest": { - "psr/container": "", - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.2" - }, - "time": "2019-05-28T07:50:59+00:00" - }, - { - "name": "symfony/string", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5eb661e49ad389e4ae2b6e4df8d783a8a6548322", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-07-24T16:15:25+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "vimeo/psalm", - "version": "4.26.0", - "source": { - "type": "git", - "url": "https://github.com/vimeo/psalm.git", - "reference": "6998fabb2bf528b65777bf9941920888d23c03ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/6998fabb2bf528b65777bf9941920888d23c03ac", - "reference": "6998fabb2bf528b65777bf9941920888d23c03ac", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.4.2", - "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", - "dnoegel/php-xdg-base-dir": "^0.1.1", - "ext-ctype": "*", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", - "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" - }, - "provide": { - "psalm/psalm": "self.version" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", - "ext-curl": "*", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "suggest": { - "ext-curl": "In order to send data to shepherd", - "ext-igbinary": "^2.0.5 is required, used to serialize caching data" - }, - "bin": [ - "psalm", - "psalm-language-server", - "psalm-plugin", - "psalm-refactor", - "psalter" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev", - "dev-3.x": "3.x-dev", - "dev-2.x": "2.x-dev", - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], - "psr-4": { - "Psalm\\": "src/Psalm/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthew Brown" - } - ], - "description": "A static analysis tool for finding errors in PHP applications", - "keywords": [ - "code", - "inspection", - "php" - ], - "support": { - "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.26.0" - }, - "time": "2022-07-31T13:10:26+00:00" - }, - { - "name": "webimpress/coding-standard", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/webimpress/coding-standard.git", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.13" - }, - "type": "phpcodesniffer-standard", - "extra": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - }, - "autoload": { - "psr-4": { - "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "Webimpress Coding Standard", - "keywords": [ - "Coding Standard", - "PSR-2", - "phpcs", - "psr-12", - "webimpress" - ], - "support": { - "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.4" - }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2022-02-15T19:52:12+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "platform-dev": [], - "platform-overrides": { - "php": "7.4.99" - }, - "plugin-api-version": "2.3.0" -} diff --git a/lib/laminas/laminas-stdlib/src/AbstractOptions.php b/lib/laminas/laminas-stdlib/src/AbstractOptions.php deleted file mode 100644 index d02221ab1..000000000 --- a/lib/laminas/laminas-stdlib/src/AbstractOptions.php +++ /dev/null @@ -1,194 +0,0 @@ -setFromArray($options); - } - } - - /** - * Set one or more configuration properties - * - * @param array|Traversable|AbstractOptions $options - * @throws Exception\InvalidArgumentException - * @return AbstractOptions Provides fluent interface - */ - public function setFromArray($options) - { - if ($options instanceof self) { - $options = $options->toArray(); - } - - if (! is_array($options) && ! $options instanceof Traversable) { - throw new Exception\InvalidArgumentException( - sprintf( - 'Parameter provided to %s must be an %s, %s or %s', - __METHOD__, - 'array', - 'Traversable', - self::class - ) - ); - } - - foreach ($options as $key => $value) { - $this->__set($key, $value); - } - - return $this; - } - - /** - * Cast to array - * - * @return array - */ - public function toArray() - { - $array = []; - - /** @param string[] $letters */ - $transform = static function (array $letters): string { - $letter = array_shift($letters); - return '_' . strtolower($letter); - }; - - foreach ($this as $key => $value) { - if ($key === '__strictMode__') { - continue; - } - $normalizedKey = preg_replace_callback('/([A-Z])/', $transform, $key); - $array[$normalizedKey] = $value; - } - - return $array; - } - - /** - * Set a configuration property - * - * @see ParameterObject::__set() - * - * @param string $key - * @param mixed $value - * @throws Exception\BadMethodCallException - * @return void - */ - public function __set($key, $value) - { - $setter = 'set' . str_replace('_', '', $key); - - if (is_callable([$this, $setter])) { - $this->{$setter}($value); - - return; - } - - if ($this->__strictMode__) { - throw new Exception\BadMethodCallException(sprintf( - 'The option "%s" does not have a callable "%s" ("%s") setter method which must be defined', - $key, - 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))), - $setter - )); - } - } - - /** - * Get a configuration property - * - * @see ParameterObject::__get() - * - * @param string $key - * @throws Exception\BadMethodCallException - * @return mixed - */ - public function __get($key) - { - $getter = 'get' . str_replace('_', '', $key); - - if (is_callable([$this, $getter])) { - return $this->{$getter}(); - } - - throw new Exception\BadMethodCallException(sprintf( - 'The option "%s" does not have a callable "%s" getter method which must be defined', - $key, - 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))) - )); - } - - /** - * Test if a configuration property is null - * - * @see ParameterObject::__isset() - * - * @param string $key - * @return bool - */ - public function __isset($key) - { - $getter = 'get' . str_replace('_', '', $key); - - return method_exists($this, $getter) && null !== $this->__get($key); - } - - /** - * Set a configuration property to NULL - * - * @see ParameterObject::__unset() - * - * @param string $key - * @throws Exception\InvalidArgumentException - * @return void - */ - public function __unset($key) - { - try { - $this->__set($key, null); - } catch (Exception\BadMethodCallException $e) { - throw new Exception\InvalidArgumentException( - 'The class property $' . $key . ' cannot be unset as' - . ' NULL is an invalid value for it', - 0, - $e - ); - } - } -} diff --git a/lib/laminas/laminas-stdlib/src/ArrayObject.php b/lib/laminas/laminas-stdlib/src/ArrayObject.php deleted file mode 100644 index 6cc195ddd..000000000 --- a/lib/laminas/laminas-stdlib/src/ArrayObject.php +++ /dev/null @@ -1,505 +0,0 @@ -setFlags($flags); - $this->storage = $input; - $this->setIteratorClass($iteratorClass); - $this->protectedProperties = array_keys(get_object_vars($this)); - } - - /** - * Returns whether the requested key exists - * - * @param mixed $key - * @return bool - */ - public function __isset($key) - { - if ($this->flag === self::ARRAY_AS_PROPS) { - return $this->offsetExists($key); - } - - if (in_array($key, $this->protectedProperties)) { - throw new Exception\InvalidArgumentException("$key is a protected property, use a different key"); - } - - return isset($this->$key); - } - - /** - * Sets the value at the specified key to value - * - * @param mixed $key - * @param mixed $value - * @return void - */ - public function __set($key, $value) - { - if ($this->flag === self::ARRAY_AS_PROPS) { - $this->offsetSet($key, $value); - return; - } - - if (in_array($key, $this->protectedProperties)) { - throw new Exception\InvalidArgumentException("$key is a protected property, use a different key"); - } - - $this->$key = $value; - } - - /** - * Unsets the value at the specified key - * - * @param mixed $key - * @return void - */ - public function __unset($key) - { - if ($this->flag === self::ARRAY_AS_PROPS) { - $this->offsetUnset($key); - return; - } - - if (in_array($key, $this->protectedProperties)) { - throw new Exception\InvalidArgumentException("$key is a protected property, use a different key"); - } - - unset($this->$key); - } - - /** - * Returns the value at the specified key by reference - * - * @param mixed $key - * @return mixed - */ - public function &__get($key) - { - if ($this->flag === self::ARRAY_AS_PROPS) { - $ret = &$this->offsetGet($key); - - return $ret; - } - - if (in_array($key, $this->protectedProperties, true)) { - throw new Exception\InvalidArgumentException("$key is a protected property, use a different key"); - } - - return $this->$key; - } - - /** - * Appends the value - * - * @param mixed $value - * @return void - */ - public function append($value) - { - $this->storage[] = $value; - } - - /** - * Sort the entries by value - * - * @return void - */ - public function asort() - { - asort($this->storage); - } - - /** - * Get the number of public properties in the ArrayObject - * - * @return int - */ - #[ReturnTypeWillChange] - public function count() - { - return count($this->storage); - } - - /** - * Exchange the array for another one. - * - * @param array|ArrayObject|ArrayIterator|object $data - * @return array - */ - public function exchangeArray($data) - { - if (! is_array($data) && ! is_object($data)) { - throw new Exception\InvalidArgumentException( - 'Passed variable is not an array or object, using empty array instead' - ); - } - - if (is_object($data) && ($data instanceof self || $data instanceof \ArrayObject)) { - $data = $data->getArrayCopy(); - } - if (! is_array($data)) { - $data = (array) $data; - } - - $storage = $this->storage; - - $this->storage = $data; - - return $storage; - } - - /** - * Creates a copy of the ArrayObject. - * - * @return array - */ - public function getArrayCopy() - { - return $this->storage; - } - - /** - * Gets the behavior flags. - * - * @return int - */ - public function getFlags() - { - return $this->flag; - } - - /** - * Create a new iterator from an ArrayObject instance - * - * @return Iterator - */ - #[ReturnTypeWillChange] - public function getIterator() - { - $class = $this->iteratorClass; - - return new $class($this->storage); - } - - /** - * Gets the iterator classname for the ArrayObject. - * - * @return string - */ - public function getIteratorClass() - { - return $this->iteratorClass; - } - - /** - * Sort the entries by key - * - * @return void - */ - public function ksort() - { - ksort($this->storage); - } - - /** - * Sort an array using a case insensitive "natural order" algorithm - * - * @return void - */ - public function natcasesort() - { - natcasesort($this->storage); - } - - /** - * Sort entries using a "natural order" algorithm - * - * @return void - */ - public function natsort() - { - natsort($this->storage); - } - - /** - * Returns whether the requested key exists - * - * @param mixed $key - * @return bool - */ - #[ReturnTypeWillChange] - public function offsetExists($key) - { - return isset($this->storage[$key]); - } - - /** - * Returns the value at the specified key - * - * @param mixed $key - * @return mixed - */ - #[ReturnTypeWillChange] - public function &offsetGet($key) - { - $ret = null; - if (! $this->offsetExists($key)) { - return $ret; - } - $ret = &$this->storage[$key]; - - return $ret; - } - - /** - * Sets the value at the specified key to value - * - * @param mixed $key - * @param mixed $value - * @return void - */ - #[ReturnTypeWillChange] - public function offsetSet($key, $value) - { - $this->storage[$key] = $value; - } - - /** - * Unsets the value at the specified key - * - * @param mixed $key - * @return void - */ - #[ReturnTypeWillChange] - public function offsetUnset($key) - { - if ($this->offsetExists($key)) { - unset($this->storage[$key]); - } - } - - /** - * Serialize an ArrayObject - * - * @return string - */ - public function serialize() - { - return serialize($this->__serialize()); - } - - /** - * Magic method used for serializing of an instance. - * - * @return array - */ - public function __serialize() - { - return get_object_vars($this); - } - - /** - * Sets the behavior flags - * - * @param int $flags - * @return void - */ - public function setFlags($flags) - { - $this->flag = $flags; - } - - /** - * Sets the iterator classname for the ArrayObject - * - * @param string $class - * @return void - */ - public function setIteratorClass($class) - { - if (class_exists($class)) { - $this->iteratorClass = $class; - - return; - } - - if (strpos($class, '\\') === 0) { - $class = '\\' . $class; - if (class_exists($class)) { - $this->iteratorClass = $class; - - return; - } - } - - throw new Exception\InvalidArgumentException('The iterator class does not exist'); - } - - /** - * Sort the entries with a user-defined comparison function and maintain key association - * - * @param callable $function - * @return void - */ - public function uasort($function) - { - if (is_callable($function)) { - uasort($this->storage, $function); - } - } - - /** - * Sort the entries by keys using a user-defined comparison function - * - * @param callable $function - * @return void - */ - public function uksort($function) - { - if (is_callable($function)) { - uksort($this->storage, $function); - } - } - - /** - * Unserialize an ArrayObject - * - * @param string $data - * @return void - */ - public function unserialize($data) - { - $toUnserialize = unserialize($data); - if (! is_array($toUnserialize)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance; corrupt serialization data', - self::class - )); - } - - $this->__unserialize($toUnserialize); - } - - /** - * Magic method used to rebuild an instance. - * - * @param array $data Data array. - * @return void - */ - public function __unserialize($data) - { - $this->protectedProperties = array_keys(get_object_vars($this)); - - // Unserialize protected internal properties first - if (array_key_exists('flag', $data)) { - $this->setFlags((int) $data['flag']); - unset($data['flag']); - } - - if (array_key_exists('storage', $data)) { - if (! is_array($data['storage']) && ! is_object($data['storage'])) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance: corrupt storage data; expected array or object, received %s', - self::class, - gettype($data['storage']) - )); - } - $this->exchangeArray($data['storage']); - unset($data['storage']); - } - - if (array_key_exists('iteratorClass', $data)) { - if (! is_string($data['iteratorClass'])) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance: invalid iteratorClass; expected string, received %s', - self::class, - is_object($data['iteratorClass']) - ? get_class($data['iteratorClass']) - : gettype($data['iteratorClass']) - )); - } - $this->setIteratorClass($data['iteratorClass']); - unset($data['iteratorClass']); - } - - unset($data['protectedProperties']); - - // Unserialize array keys after resolving protected properties to ensure configuration is used. - foreach ($data as $k => $v) { - $this->__set($k, $v); - } - } -} diff --git a/lib/laminas/laminas-stdlib/src/ArraySerializableInterface.php b/lib/laminas/laminas-stdlib/src/ArraySerializableInterface.php deleted file mode 100644 index f2544535b..000000000 --- a/lib/laminas/laminas-stdlib/src/ArraySerializableInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -getArrayCopy(); - return new ArrayIterator(array_reverse($array)); - } -} diff --git a/lib/laminas/laminas-stdlib/src/ArrayUtils.php b/lib/laminas/laminas-stdlib/src/ArrayUtils.php deleted file mode 100644 index 285e644dd..000000000 --- a/lib/laminas/laminas-stdlib/src/ArrayUtils.php +++ /dev/null @@ -1,338 +0,0 @@ - - * $list = array('a', 'b', 'c', 'd'); - * $list = array( - * 0 => 'foo', - * 1 => 'bar', - * 2 => array('foo' => 'baz'), - * ); - * - * - * @param mixed $value - * @param bool $allowEmpty Is an empty list a valid list? - * @return bool - */ - public static function isList($value, $allowEmpty = false) - { - if (! is_array($value)) { - return false; - } - - if (! $value) { - return $allowEmpty; - } - - return array_values($value) === $value; - } - - /** - * Test whether an array is a hash table. - * - * An array is a hash table if: - * - * 1. Contains one or more non-integer keys, or - * 2. Integer keys are non-continuous or misaligned (not starting with 0) - * - * For example: - * - * $hash = array( - * 'foo' => 15, - * 'bar' => false, - * ); - * $hash = array( - * 1995 => 'Birth of PHP', - * 2009 => 'PHP 5.3.0', - * 2012 => 'PHP 5.4.0', - * ); - * $hash = array( - * 'formElement, - * 'options' => array( 'debug' => true ), - * ); - * - * - * @param mixed $value - * @param bool $allowEmpty Is an empty array() a valid hash table? - * @return bool - */ - public static function isHashTable($value, $allowEmpty = false) - { - if (! is_array($value)) { - return false; - } - - if (! $value) { - return $allowEmpty; - } - - return array_values($value) !== $value; - } - - /** - * Checks if a value exists in an array. - * - * Due to "foo" == 0 === TRUE with in_array when strict = false, an option - * has been added to prevent this. When $strict = 0/false, the most secure - * non-strict check is implemented. if $strict = -1, the default in_array - * non-strict behaviour is used. - * - * @param mixed $needle - * @param array $haystack - * @param int|bool $strict - * @return bool - */ - public static function inArray($needle, array $haystack, $strict = false) - { - if (! $strict) { - if (is_int($needle) || is_float($needle)) { - $needle = (string) $needle; - } - if (is_string($needle)) { - foreach ($haystack as &$h) { - if (is_int($h) || is_float($h)) { - $h = (string) $h; - } - } - } - } - - return in_array($needle, $haystack, (bool) $strict); - } - - /** - * Converts an iterator to an array. The $recursive flag, on by default, - * hints whether or not you want to do so recursively. - * - * @template TKey - * @template TValue - * @param iterable $iterator The array or Traversable object to convert - * @param bool $recursive Recursively check all nested structures - * @throws Exception\InvalidArgumentException If $iterator is not an array or a Traversable object. - * @return array - */ - public static function iteratorToArray($iterator, $recursive = true) - { - /** @psalm-suppress DocblockTypeContradiction */ - if (! is_array($iterator) && ! $iterator instanceof Traversable) { - throw new Exception\InvalidArgumentException(__METHOD__ . ' expects an array or Traversable object'); - } - - if (! $recursive) { - if (is_array($iterator)) { - return $iterator; - } - - return iterator_to_array($iterator); - } - - if ( - is_object($iterator) - && ! $iterator instanceof Iterator - && method_exists($iterator, 'toArray') - ) { - /** @psalm-var array $array */ - $array = $iterator->toArray(); - - return $array; - } - - $array = []; - foreach ($iterator as $key => $value) { - if (is_scalar($value)) { - $array[$key] = $value; - continue; - } - - if ($value instanceof Traversable) { - $array[$key] = static::iteratorToArray($value, $recursive); - continue; - } - - if (is_array($value)) { - $array[$key] = static::iteratorToArray($value, $recursive); - continue; - } - - $array[$key] = $value; - } - - /** @psalm-var array $array */ - - return $array; - } - - /** - * Merge two arrays together. - * - * If an integer key exists in both arrays and preserveNumericKeys is false, the value - * from the second array will be appended to the first array. If both values are arrays, they - * are merged together, else the value of the second array overwrites the one of the first array. - * - * @param array $a - * @param array $b - * @param bool $preserveNumericKeys - * @return array - */ - public static function merge(array $a, array $b, $preserveNumericKeys = false) - { - foreach ($b as $key => $value) { - if ($value instanceof MergeReplaceKeyInterface) { - $a[$key] = $value->getData(); - } elseif (isset($a[$key]) || array_key_exists($key, $a)) { - if ($value instanceof MergeRemoveKey) { - unset($a[$key]); - } elseif (! $preserveNumericKeys && is_int($key)) { - $a[] = $value; - } elseif (is_array($value) && is_array($a[$key])) { - $a[$key] = static::merge($a[$key], $value, $preserveNumericKeys); - } else { - $a[$key] = $value; - } - } else { - if (! $value instanceof MergeRemoveKey) { - $a[$key] = $value; - } - } - } - - return $a; - } - - /** - * @deprecated Since 3.2.0; use the native array_filter methods - * - * @param array $data - * @param callable $callback - * @param null|int $flag - * @return array - * @throws Exception\InvalidArgumentException - */ - public static function filter(array $data, $callback, $flag = null) - { - if (! is_callable($callback)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Second parameter of %s must be callable', - __METHOD__ - )); - } - - return array_filter($data, $callback, $flag ?? 0); - } -} diff --git a/lib/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php b/lib/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php deleted file mode 100644 index bde0b25ae..000000000 --- a/lib/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php +++ /dev/null @@ -1,9 +0,0 @@ -data = $data; - } - - /** - * {@inheritDoc} - */ - public function getData() - { - return $this->data; - } -} diff --git a/lib/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php b/lib/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php deleted file mode 100644 index 47243fc24..000000000 --- a/lib/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -message`, - * `message`) - * - Write output to a specified stream, optionally with colorization. - * - Write a line of output to a specified stream, optionally with - * colorization, using the system EOL sequence.. - * - Write an error message to STDERR. - * - * Colorization will only occur when expected sequences are discovered, and - * then, only if the console terminal allows it. - * - * Essentially, provides the bare minimum to allow you to provide messages to - * the current console. - */ -class ConsoleHelper -{ - public const COLOR_GREEN = "\033[32m"; - public const COLOR_RED = "\033[31m"; - public const COLOR_RESET = "\033[0m"; - - public const HIGHLIGHT_INFO = 'info'; - public const HIGHLIGHT_ERROR = 'error'; - - /** @psalm-var array */ - private array $highlightMap = [ - self::HIGHLIGHT_INFO => self::COLOR_GREEN, - self::HIGHLIGHT_ERROR => self::COLOR_RED, - ]; - - /** @var string Exists only for testing. */ - private string $eol = PHP_EOL; - - /** @var resource Exists only for testing. */ - private $stderr = STDERR; - - private bool $supportsColor; - - /** - * @param resource $resource - */ - public function __construct($resource = STDOUT) - { - $this->supportsColor = $this->detectColorCapabilities($resource); - } - - /** - * Colorize a string for use with the terminal. - * - * Takes strings formatted as `string` and formats them per the - * $highlightMap; if color support is disabled, simply removes the formatting - * tags. - * - * @param string $string - * @return string - */ - public function colorize($string) - { - $reset = $this->supportsColor ? self::COLOR_RESET : ''; - foreach ($this->highlightMap as $key => $color) { - $pattern = sprintf('#<%s>(.*?)#s', $key, $key); - $color = $this->supportsColor ? $color : ''; - $string = preg_replace($pattern, $color . '$1' . $reset, $string); - } - return $string; - } - - /** - * @param string $string - * @param bool $colorize Whether or not to colorize the string - * @param resource $resource Defaults to STDOUT - * @return void - */ - public function write($string, $colorize = true, $resource = STDOUT) - { - if ($colorize) { - $string = $this->colorize($string); - } - - $string = $this->formatNewlines($string); - - fwrite($resource, $string); - } - - /** - * @param string $string - * @param bool $colorize Whether or not to colorize the line - * @param resource $resource Defaults to STDOUT - * @return void - */ - public function writeLine($string, $colorize = true, $resource = STDOUT) - { - $this->write($string . $this->eol, $colorize, $resource); - } - - /** - * Emit an error message. - * - * Wraps the message in ``, and passes it to `writeLine()`, - * using STDERR as the resource; emits an additional empty line when done, - * also to STDERR. - * - * @param string $message - * @return void - */ - public function writeErrorMessage($message) - { - $this->writeLine(sprintf('%s', $message), true, $this->stderr); - $this->writeLine('', false, $this->stderr); - } - - /** - * @param resource $resource - * @return bool - */ - private function detectColorCapabilities($resource = STDOUT) - { - if ('\\' === DIRECTORY_SEPARATOR) { - // Windows - return false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - return function_exists('posix_isatty') && posix_isatty($resource); - } - - /** - * Ensure newlines are appropriate for the current terminal. - * - * @param string $string - * @return string - */ - private function formatNewlines($string) - { - $string = str_replace($this->eol, "\0PHP_EOL\0", $string); - $string = preg_replace("/(\r\n|\n|\r)/", $this->eol, $string); - return str_replace("\0PHP_EOL\0", $this->eol, $string); - } -} diff --git a/lib/laminas/laminas-stdlib/src/DispatchableInterface.php b/lib/laminas/laminas-stdlib/src/DispatchableInterface.php deleted file mode 100644 index a9b325a67..000000000 --- a/lib/laminas/laminas-stdlib/src/DispatchableInterface.php +++ /dev/null @@ -1,15 +0,0 @@ -setExtractFlags(self::EXTR_BOTH); - - $data = []; - foreach ($clone as $item) { - $data[] = $item; - } - - return $data; - } - - public function __unserialize(array $data): void - { - foreach ($data as $item) { - $this->insert($item['data'], $item['priority']); - } - } - - /** - * Insert an element in the queue with a specified priority - * - * @param mixed $value - * @param integer $priority - * @return void - */ - public function insert($value, $priority) - { - if (! is_int($priority)) { - throw new Exception\InvalidArgumentException('The priority must be an integer'); - } - $this->values[$priority][] = $value; - if (! isset($this->priorities[$priority])) { - $this->priorities[$priority] = $priority; - $this->maxPriority = $this->maxPriority === null ? $priority : max($priority, $this->maxPriority); - } - ++$this->count; - } - - /** - * Extract an element in the queue according to the priority and the - * order of insertion - * - * @return mixed - */ - public function extract() - { - if (! $this->valid()) { - return false; - } - $value = $this->current(); - $this->nextAndRemove(); - return $value; - } - - /** - * Remove an item from the queue - * - * This is different than {@link extract()}; its purpose is to dequeue an - * item. - * - * Note: this removes the first item matching the provided item found. If - * the same item has been added multiple times, it will not remove other - * instances. - * - * @param mixed $datum - * @return bool False if the item was not found, true otherwise. - */ - public function remove($datum) - { - $currentIndex = $this->index; - $currentSubIndex = $this->subIndex; - $currentPriority = $this->maxPriority; - - $this->rewind(); - while ($this->valid()) { - if (current($this->values[$this->maxPriority]) === $datum) { - $index = key($this->values[$this->maxPriority]); - unset($this->values[$this->maxPriority][$index]); - - // The `next()` method advances the internal array pointer, so we need to use the `reset()` function, - // otherwise we would lose all elements before the place the pointer points. - reset($this->values[$this->maxPriority]); - - $this->index = $currentIndex; - $this->subIndex = $currentSubIndex; - - // If the array is empty we need to destroy the unnecessary priority, - // otherwise we would end up with an incorrect value of `$this->count` - // {@see \Laminas\Stdlib\FastPriorityQueue::nextAndRemove()}. - if (empty($this->values[$this->maxPriority])) { - unset($this->values[$this->maxPriority]); - unset($this->priorities[$this->maxPriority]); - if ($this->maxPriority === $currentPriority) { - $this->subIndex = 0; - } - } - - $this->maxPriority = empty($this->priorities) ? null : max($this->priorities); - --$this->count; - return true; - } - $this->next(); - } - return false; - } - - /** - * Get the total number of elements in the queue - * - * @return int - */ - #[ReturnTypeWillChange] - public function count() - { - return $this->count; - } - - /** - * Get the current element in the queue - * - * @return mixed - */ - #[ReturnTypeWillChange] - public function current() - { - switch ($this->extractFlag) { - case self::EXTR_DATA: - return current($this->values[$this->maxPriority]); - case self::EXTR_PRIORITY: - return $this->maxPriority; - case self::EXTR_BOTH: - return [ - 'data' => current($this->values[$this->maxPriority]), - 'priority' => $this->maxPriority, - ]; - } - } - - /** - * Get the index of the current element in the queue - * - * @return int - */ - #[ReturnTypeWillChange] - public function key() - { - return $this->index; - } - - /** - * Set the iterator pointer to the next element in the queue - * removing the previous element - * - * @return void - */ - protected function nextAndRemove() - { - $key = key($this->values[$this->maxPriority]); - - if (false === next($this->values[$this->maxPriority])) { - unset($this->priorities[$this->maxPriority]); - unset($this->values[$this->maxPriority]); - $this->maxPriority = empty($this->priorities) ? null : max($this->priorities); - $this->subIndex = -1; - } else { - unset($this->values[$this->maxPriority][$key]); - } - ++$this->index; - ++$this->subIndex; - --$this->count; - } - - /** - * Set the iterator pointer to the next element in the queue - * without removing the previous element - */ - #[ReturnTypeWillChange] - public function next() - { - if (false === next($this->values[$this->maxPriority])) { - unset($this->subPriorities[$this->maxPriority]); - reset($this->values[$this->maxPriority]); - $this->maxPriority = empty($this->subPriorities) ? null : max($this->subPriorities); - $this->subIndex = -1; - } - ++$this->index; - ++$this->subIndex; - } - - /** - * Check if the current iterator is valid - * - * @return bool - */ - #[ReturnTypeWillChange] - public function valid() - { - return isset($this->values[$this->maxPriority]); - } - - /** - * Rewind the current iterator - */ - #[ReturnTypeWillChange] - public function rewind() - { - $this->subPriorities = $this->priorities; - $this->maxPriority = empty($this->priorities) ? 0 : max($this->priorities); - $this->index = 0; - $this->subIndex = 0; - } - - /** - * Serialize to an array - * - * Array will be priority => data pairs - * - * @return array - */ - public function toArray() - { - $array = []; - foreach (clone $this as $item) { - $array[] = $item; - } - return $array; - } - - /** - * Serialize - * - * @return string - */ - public function serialize() - { - return serialize($this->__serialize()); - } - - /** - * Deserialize - * - * @param string $data - * @return void - */ - public function unserialize($data) - { - $toUnserialize = unserialize($data); - if (! is_array($toUnserialize)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance; corrupt serialization data', - self::class - )); - } - - $this->__unserialize($toUnserialize); - } - - /** - * Set the extract flag - * - * @param integer $flag - * @return void - */ - public function setExtractFlags($flag) - { - switch ($flag) { - case self::EXTR_DATA: - case self::EXTR_PRIORITY: - case self::EXTR_BOTH: - $this->extractFlag = $flag; - break; - default: - throw new Exception\InvalidArgumentException("The extract flag specified is not valid"); - } - } - - /** - * Check if the queue is empty - * - * @return boolean - */ - public function isEmpty() - { - return empty($this->values); - } - - /** - * Does the queue contain the given datum? - * - * @param mixed $datum - * @return bool - */ - public function contains($datum) - { - foreach ($this->values as $values) { - if (in_array($datum, $values)) { - return true; - } - } - return false; - } - - /** - * Does the queue have an item with the given priority? - * - * @param int $priority - * @return bool - */ - public function hasPriority($priority) - { - return isset($this->values[$priority]); - } -} diff --git a/lib/laminas/laminas-stdlib/src/Glob.php b/lib/laminas/laminas-stdlib/src/Glob.php deleted file mode 100644 index 5b5be710d..000000000 --- a/lib/laminas/laminas-stdlib/src/Glob.php +++ /dev/null @@ -1,226 +0,0 @@ - GLOB_MARK, - self::GLOB_NOSORT => GLOB_NOSORT, - self::GLOB_NOCHECK => GLOB_NOCHECK, - self::GLOB_NOESCAPE => GLOB_NOESCAPE, - self::GLOB_BRACE => defined('GLOB_BRACE') ? GLOB_BRACE : 0, - self::GLOB_ONLYDIR => GLOB_ONLYDIR, - self::GLOB_ERR => GLOB_ERR, - ]; - - $globFlags = 0; - - foreach ($flagMap as $internalFlag => $globFlag) { - if ($flags & $internalFlag) { - $globFlags |= $globFlag; - } - } - } else { - $globFlags = 0; - } - - ErrorHandler::start(); - $res = glob($pattern, $globFlags); - $err = ErrorHandler::stop(); - if ($res === false) { - throw new Exception\RuntimeException("glob('{$pattern}', {$globFlags}) failed", 0, $err); - } - return $res; - } - - /** - * Expand braces manually, then use the system glob. - * - * @param string $pattern - * @param int $flags - * @return array - * @throws Exception\RuntimeException - */ - protected static function fallbackGlob($pattern, $flags) - { - if (! self::flagsIsEqualTo($flags, self::GLOB_BRACE)) { - return static::systemGlob($pattern, $flags); - } - - $flags &= ~self::GLOB_BRACE; - $length = strlen($pattern); - $paths = []; - - if ($flags & self::GLOB_NOESCAPE) { - $begin = strpos($pattern, '{'); - } else { - $begin = 0; - - while (true) { - if ($begin === $length) { - $begin = false; - break; - } elseif ($pattern[$begin] === '\\' && ($begin + 1) < $length) { - $begin++; - } elseif ($pattern[$begin] === '{') { - break; - } - - $begin++; - } - } - - if ($begin === false) { - return static::systemGlob($pattern, $flags); - } - - $next = static::nextBraceSub($pattern, $begin + 1, $flags); - - if ($next === null) { - return static::systemGlob($pattern, $flags); - } - - $rest = $next; - - while ($pattern[$rest] !== '}') { - $rest = static::nextBraceSub($pattern, $rest + 1, $flags); - - if ($rest === null) { - return static::systemGlob($pattern, $flags); - } - } - - $p = $begin + 1; - - while (true) { - $subPattern = substr($pattern, 0, $begin) - . substr($pattern, $p, $next - $p) - . substr($pattern, $rest + 1); - - $result = static::fallbackGlob($subPattern, $flags | self::GLOB_BRACE); - - if ($result) { - $paths = array_merge($paths, $result); - } - - if ($pattern[$next] === '}') { - break; - } - - $p = $next + 1; - $next = static::nextBraceSub($pattern, $p, $flags); - } - - return array_unique($paths); - } - - /** - * Find the end of the sub-pattern in a brace expression. - * - * @param string $pattern - * @param int $begin - * @param int $flags - * @return int|null - */ - protected static function nextBraceSub($pattern, $begin, $flags) - { - $length = strlen($pattern); - $depth = 0; - $current = $begin; - - while ($current < $length) { - $flagsEqualsNoEscape = self::flagsIsEqualTo($flags, self::GLOB_NOESCAPE); - - if ($flagsEqualsNoEscape && $pattern[$current] === '\\') { - if (++$current === $length) { - break; - } - - $current++; - } else { - if ( - ($pattern[$current] === '}' && $depth-- === 0) - || ($pattern[$current] === ',' && $depth === 0) - ) { - break; - } elseif ($pattern[$current++] === '{') { - $depth++; - } - } - } - - return $current < $length ? $current : null; - } - - /** @internal */ - public static function flagsIsEqualTo(int $flags, int $otherFlags): bool - { - return (bool) ($flags & $otherFlags); - } -} diff --git a/lib/laminas/laminas-stdlib/src/Guard/AllGuardsTrait.php b/lib/laminas/laminas-stdlib/src/Guard/AllGuardsTrait.php deleted file mode 100644 index b5abe5a62..000000000 --- a/lib/laminas/laminas-stdlib/src/Guard/AllGuardsTrait.php +++ /dev/null @@ -1,15 +0,0 @@ -metadata[$spec] = $value; - return $this; - } - if (! is_array($spec) && ! $spec instanceof Traversable) { - throw new Exception\InvalidArgumentException(sprintf( - 'Expected a string, array, or Traversable argument in first position; received "%s"', - is_object($spec) ? get_class($spec) : gettype($spec) - )); - } - foreach ($spec as $key => $value) { - $this->metadata[$key] = $value; - } - return $this; - } - - /** - * Retrieve all metadata or a single metadatum as specified by key - * - * @param null|string|int $key - * @param null|mixed $default - * @throws Exception\InvalidArgumentException - * @return mixed - */ - public function getMetadata($key = null, $default = null) - { - if (null === $key) { - return $this->metadata; - } - - if (! is_scalar($key)) { - throw new Exception\InvalidArgumentException('Non-scalar argument provided for key'); - } - - if (array_key_exists($key, $this->metadata)) { - return $this->metadata[$key]; - } - - return $default; - } - - /** - * Set message content - * - * @param mixed $value - * @return Message - */ - public function setContent($value) - { - $this->content = $value; - return $this; - } - - /** - * Get message content - * - * @return mixed - */ - public function getContent() - { - return $this->content; - } - - /** - * @return string - */ - public function toString() - { - $request = ''; - foreach ($this->getMetadata() as $key => $value) { - $request .= sprintf( - "%s: %s\r\n", - (string) $key, - (string) $value - ); - } - $request .= "\r\n" . $this->getContent(); - return $request; - } -} diff --git a/lib/laminas/laminas-stdlib/src/MessageInterface.php b/lib/laminas/laminas-stdlib/src/MessageInterface.php deleted file mode 100644 index 71a482081..000000000 --- a/lib/laminas/laminas-stdlib/src/MessageInterface.php +++ /dev/null @@ -1,41 +0,0 @@ -exchangeArray($values); - } - - /** - * Populate from query string - * - * @param string $string - * @return void - */ - public function fromString($string) - { - $array = []; - parse_str($string, $array); - $this->fromArray($array); - } - - /** - * Serialize to native PHP array - * - * @return array - */ - public function toArray() - { - return $this->getArrayCopy(); - } - - /** - * Serialize to query string - * - * @return string - */ - public function toString() - { - return http_build_query($this->toArray()); - } - - /** - * Retrieve by key - * - * Returns null if the key does not exist. - * - * @param string $name - * @return mixed - */ - #[ReturnTypeWillChange] - public function offsetGet($name) - { - if ($this->offsetExists($name)) { - return parent::offsetGet($name); - } - - return null; - } - - /** - * @param string $name - * @param mixed $default optional default value - * @return mixed - */ - public function get($name, $default = null) - { - if ($this->offsetExists($name)) { - return parent::offsetGet($name); - } - return $default; - } - - /** - * @param string $name - * @param mixed $value - * @return Parameters - */ - public function set($name, $value) - { - $this[$name] = $value; - return $this; - } -} diff --git a/lib/laminas/laminas-stdlib/src/ParametersInterface.php b/lib/laminas/laminas-stdlib/src/ParametersInterface.php deleted file mode 100644 index 8e07e070d..000000000 --- a/lib/laminas/laminas-stdlib/src/ParametersInterface.php +++ /dev/null @@ -1,81 +0,0 @@ -items[$name])) { - $this->count++; - } - - $this->sorted = false; - - $this->items[$name] = [ - 'data' => $value, - 'priority' => (int) $priority, - 'serial' => $this->serial++, - ]; - } - - /** - * @param string $name - * @param int $priority - * @return $this - * @throws Exception - */ - public function setPriority($name, $priority) - { - if (! isset($this->items[$name])) { - throw new Exception("item $name not found"); - } - - $this->items[$name]['priority'] = (int) $priority; - $this->sorted = false; - - return $this; - } - - /** - * Remove a item. - * - * @param string $name - * @return void - */ - public function remove($name) - { - if (isset($this->items[$name])) { - $this->count--; - } - - unset($this->items[$name]); - } - - /** - * Remove all items. - * - * @return void - */ - public function clear() - { - $this->items = []; - $this->serial = 0; - $this->count = 0; - $this->sorted = false; - } - - /** - * Get a item. - * - * @param string $name - * @return mixed - */ - public function get($name) - { - if (! isset($this->items[$name])) { - return; - } - - return $this->items[$name]['data']; - } - - /** - * Sort all items. - * - * @return void - */ - protected function sort() - { - if (! $this->sorted) { - uasort($this->items, [$this, 'compare']); - $this->sorted = true; - } - } - - /** - * Compare the priority of two items. - * - * @param array $item1, - * @param array $item2 - * @return int - */ - protected function compare(array $item1, array $item2) - { - return $item1['priority'] === $item2['priority'] - ? ($item1['serial'] > $item2['serial'] ? -1 : 1) * $this->isLIFO - : ($item1['priority'] > $item2['priority'] ? -1 : 1); - } - - /** - * Get/Set serial order mode - * - * @param bool|null $flag - * @return bool - */ - public function isLIFO($flag = null) - { - if ($flag !== null) { - $isLifo = $flag === true ? 1 : -1; - - if ($isLifo !== $this->isLIFO) { - $this->isLIFO = $isLifo; - $this->sorted = false; - } - } - - return 1 === $this->isLIFO; - } - - /** - * {@inheritDoc} - */ - #[ReturnTypeWillChange] - public function rewind() - { - $this->sort(); - reset($this->items); - } - - /** - * {@inheritDoc} - */ - #[ReturnTypeWillChange] - public function current() - { - $this->sorted || $this->sort(); - $node = current($this->items); - - return $node ? $node['data'] : false; - } - - /** - * {@inheritDoc} - */ - #[ReturnTypeWillChange] - public function key() - { - $this->sorted || $this->sort(); - return key($this->items); - } - - /** - * {@inheritDoc} - */ - #[ReturnTypeWillChange] - public function next() - { - $node = next($this->items); - - return $node ? $node['data'] : false; - } - - /** - * {@inheritDoc} - */ - #[ReturnTypeWillChange] - public function valid() - { - return current($this->items) !== false; - } - - /** - * @return self - */ - public function getIterator() - { - return clone $this; - } - - /** - * {@inheritDoc} - */ - #[ReturnTypeWillChange] - public function count() - { - return $this->count; - } - - /** - * Return list as array - * - * @param int $flag - * @return array - */ - public function toArray($flag = self::EXTR_DATA) - { - $this->sort(); - - if ($flag === self::EXTR_BOTH) { - return $this->items; - } - - return array_map( - static fn($item) => $flag === self::EXTR_PRIORITY ? $item['priority'] : $item['data'], - $this->items - ); - } -} diff --git a/lib/laminas/laminas-stdlib/src/PriorityQueue.php b/lib/laminas/laminas-stdlib/src/PriorityQueue.php deleted file mode 100644 index 92af39223..000000000 --- a/lib/laminas/laminas-stdlib/src/PriorityQueue.php +++ /dev/null @@ -1,385 +0,0 @@ - - */ -class PriorityQueue implements Countable, IteratorAggregate, Serializable -{ - public const EXTR_DATA = 0x00000001; - public const EXTR_PRIORITY = 0x00000002; - public const EXTR_BOTH = 0x00000003; - - /** - * Inner queue class to use for iteration - * - * @var class-string<\SplPriorityQueue> - */ - protected $queueClass = SplPriorityQueue::class; - - /** - * Actual items aggregated in the priority queue. Each item is an array - * with keys "data" and "priority". - * - * @var list - */ - protected $items = []; - - /** - * Inner queue object - * - * @var \SplPriorityQueue|null - */ - protected $queue; - - /** - * Insert an item into the queue - * - * Priority defaults to 1 (low priority) if none provided. - * - * @param T $data - * @param TPriority $priority - * @return $this - */ - public function insert($data, $priority = 1) - { - /** @psalm-var TPriority $priority */ - $priority = (int) $priority; - $this->items[] = [ - 'data' => $data, - 'priority' => $priority, - ]; - $this->getQueue()->insert($data, $priority); - return $this; - } - - /** - * Remove an item from the queue - * - * This is different than {@link extract()}; its purpose is to dequeue an - * item. - * - * This operation is potentially expensive, as it requires - * re-initialization and re-population of the inner queue. - * - * Note: this removes the first item matching the provided item found. If - * the same item has been added multiple times, it will not remove other - * instances. - * - * @param mixed $datum - * @return bool False if the item was not found, true otherwise. - */ - public function remove($datum) - { - $found = false; - $key = null; - foreach ($this->items as $key => $item) { - if ($item['data'] === $datum) { - $found = true; - break; - } - } - if ($found && $key !== null) { - unset($this->items[$key]); - $this->queue = null; - - if (! $this->isEmpty()) { - $queue = $this->getQueue(); - foreach ($this->items as $item) { - $queue->insert($item['data'], $item['priority']); - } - } - return true; - } - return false; - } - - /** - * Is the queue empty? - * - * @return bool - */ - public function isEmpty() - { - return 0 === $this->count(); - } - - /** - * How many items are in the queue? - * - * @return int - */ - #[ReturnTypeWillChange] - public function count() - { - return count($this->items); - } - - /** - * Peek at the top node in the queue, based on priority. - * - * @return T - */ - public function top() - { - $queue = clone $this->getQueue(); - - return $queue->top(); - } - - /** - * Extract a node from the inner queue and sift up - * - * @return T - */ - public function extract() - { - $value = $this->getQueue()->extract(); - - $keyToRemove = null; - $highestPriority = null; - foreach ($this->items as $key => $item) { - if ($item['data'] !== $value) { - continue; - } - - if (null === $highestPriority) { - $highestPriority = $item['priority']; - $keyToRemove = $key; - continue; - } - - if ($highestPriority >= $item['priority']) { - continue; - } - - $highestPriority = $item['priority']; - $keyToRemove = $key; - } - - if ($keyToRemove !== null) { - unset($this->items[$keyToRemove]); - } - - return $value; - } - - /** - * Retrieve the inner iterator - * - * SplPriorityQueue acts as a heap, which typically implies that as items - * are iterated, they are also removed. This does not work for situations - * where the queue may be iterated multiple times. As such, this class - * aggregates the values, and also injects an SplPriorityQueue. This method - * retrieves the inner queue object, and clones it for purposes of - * iteration. - * - * @return \SplPriorityQueue - */ - #[ReturnTypeWillChange] - public function getIterator() - { - $queue = $this->getQueue(); - return clone $queue; - } - - /** - * Serialize the data structure - * - * @return string - */ - public function serialize() - { - return serialize($this->__serialize()); - } - - /** - * Magic method used for serializing of an instance. - * - * @return list - */ - public function __serialize() - { - return $this->items; - } - - /** - * Unserialize a string into a PriorityQueue object - * - * Serialization format is compatible with {@link SplPriorityQueue} - * - * @param string $data - * @return void - */ - public function unserialize($data) - { - $toUnserialize = unserialize($data); - if (! is_array($toUnserialize)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance; corrupt serialization data', - self::class - )); - } - - /** @psalm-var list $toUnserialize */ - - $this->__unserialize($toUnserialize); - } - - /** - * Magic method used to rebuild an instance. - * - * @param list $data Data array. - * @return void - */ - public function __unserialize($data) - { - foreach ($data as $item) { - $this->insert($item['data'], $item['priority']); - } - } - - /** - * Serialize to an array - * By default, returns only the item data, and in the order registered (not - * sorted). You may provide one of the EXTR_* flags as an argument, allowing - * the ability to return priorities or both data and priority. - * - * @param int $flag - * @return array - * @psalm-return ($flag is self::EXTR_BOTH - * ? list - * : $flag is self::EXTR_PRIORITY - * ? list - * : list - * ) - */ - public function toArray($flag = self::EXTR_DATA) - { - switch ($flag) { - case self::EXTR_BOTH: - return $this->items; - case self::EXTR_PRIORITY: - return array_map(static fn($item) => $item['priority'], $this->items); - case self::EXTR_DATA: - default: - return array_map(static fn($item) => $item['data'], $this->items); - } - } - - /** - * Specify the internal queue class - * - * Please see {@link getIterator()} for details on the necessity of an - * internal queue class. The class provided should extend SplPriorityQueue. - * - * @param class-string<\SplPriorityQueue> $class - * @return $this - */ - public function setInternalQueueClass($class) - { - /** @psalm-suppress RedundantCastGivenDocblockType */ - $this->queueClass = (string) $class; - return $this; - } - - /** - * Does the queue contain the given datum? - * - * @param T $datum - * @return bool - */ - public function contains($datum) - { - foreach ($this->items as $item) { - if ($item['data'] === $datum) { - return true; - } - } - return false; - } - - /** - * Does the queue have an item with the given priority? - * - * @param TPriority $priority - * @return bool - */ - public function hasPriority($priority) - { - foreach ($this->items as $item) { - if ($item['priority'] === $priority) { - return true; - } - } - return false; - } - - /** - * Get the inner priority queue instance - * - * @throws Exception\DomainException - * @return \SplPriorityQueue - * @psalm-assert !null $this->queue - */ - protected function getQueue() - { - if (null === $this->queue) { - /** @psalm-suppress UnsafeInstantiation */ - $queue = new $this->queueClass(); - /** @psalm-var \SplPriorityQueue $queue */ - $this->queue = $queue; - /** @psalm-suppress DocblockTypeContradiction, MixedArgument */ - if (! $this->queue instanceof \SplPriorityQueue) { - throw new Exception\DomainException(sprintf( - 'PriorityQueue expects an internal queue of type SplPriorityQueue; received "%s"', - get_class($this->queue) - )); - } - } - - return $this->queue; - } - - /** - * Add support for deep cloning - * - * @return void - */ - public function __clone() - { - if (null !== $this->queue) { - $this->queue = clone $this->queue; - } - } -} diff --git a/lib/laminas/laminas-stdlib/src/Request.php b/lib/laminas/laminas-stdlib/src/Request.php deleted file mode 100644 index 65026f609..000000000 --- a/lib/laminas/laminas-stdlib/src/Request.php +++ /dev/null @@ -1,10 +0,0 @@ - - */ -class SplPriorityQueue extends \SplPriorityQueue implements Serializable -{ - /** @var int Seed used to ensure queue order for items of the same priority */ - protected $serial = PHP_INT_MAX; - - /** - * Insert a value with a given priority - * - * Utilizes {@var $serial} to ensure that values of equal priority are - * emitted in the same order in which they are inserted. - * - * @param TValue $datum - * @param TPriority|mixed $priority - * @return void - */ - public function insert($datum, $priority) - { - if (! is_array($priority)) { - $priority = [$priority, $this->serial--]; - } - - /** @psalm-var TPriority $priority */ - - parent::insert($datum, $priority); - } - - /** - * Serialize to an array - * - * Array will be priority => data pairs - * - * @return list - */ - public function toArray() - { - $array = []; - foreach (clone $this as $item) { - $array[] = $item; - } - return $array; - } - - /** - * Serialize - * - * @return string - */ - public function serialize() - { - return serialize($this->__serialize()); - } - - /** - * Magic method used for serializing of an instance. - * - * @return array - */ - public function __serialize() - { - $clone = clone $this; - $clone->setExtractFlags(self::EXTR_BOTH); - - $data = []; - foreach ($clone as $item) { - $data[] = $item; - } - return $data; - } - - /** - * Deserialize - * - * @param string $data - * @return void - */ - public function unserialize($data) - { - $toUnserialize = unserialize($data); - if (! is_array($toUnserialize)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance; corrupt serialization data', - self::class - )); - } - - $this->__unserialize($toUnserialize); - } - - /** - * Magic method used to rebuild an instance. - * - * @param array $data Data array. - * @return void - */ - public function __unserialize($data) - { - $this->serial = PHP_INT_MAX; - - foreach ($data as $item) { - if (! is_array($item)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance: corrupt item; expected array, received %s', - self::class, - is_object($item) ? get_class($item) : gettype($item) - )); - } - - if (! array_key_exists('data', $item)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance: corrupt item; missing "data" element', - self::class - )); - } - - $priority = 1; - if (array_key_exists('priority', $item)) { - $priority = (int) $item['priority']; - } - - /** @psalm-var TValue $item['data'] */ - - $this->insert($item['data'], $priority); - } - } -} diff --git a/lib/laminas/laminas-stdlib/src/SplQueue.php b/lib/laminas/laminas-stdlib/src/SplQueue.php deleted file mode 100644 index 2656a856b..000000000 --- a/lib/laminas/laminas-stdlib/src/SplQueue.php +++ /dev/null @@ -1,94 +0,0 @@ - - */ -class SplQueue extends \SplQueue implements Serializable -{ - /** - * Return an array representing the queue - * - * @return list - */ - public function toArray() - { - $array = []; - foreach ($this as $item) { - $array[] = $item; - } - return $array; - } - - /** - * Serialize - * - * @return string - */ - #[ReturnTypeWillChange] - public function serialize() - { - return serialize($this->__serialize()); - } - - /** - * Magic method used for serializing of an instance. - * - * @return list - */ - #[ReturnTypeWillChange] - public function __serialize() - { - return $this->toArray(); - } - - /** - * Unserialize - * - * @param string $data - * @return void - */ - #[ReturnTypeWillChange] - public function unserialize($data) - { - $toUnserialize = unserialize($data); - if (! is_array($toUnserialize)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance; corrupt serialization data', - self::class - )); - } - - $this->__unserialize($toUnserialize); - } - - /** - * Magic method used to rebuild an instance. - * - * @param array $data Data array. - * @return void - */ - #[ReturnTypeWillChange] - public function __unserialize($data) - { - foreach ($data as $item) { - $this->push($item); - } - } -} diff --git a/lib/laminas/laminas-stdlib/src/SplStack.php b/lib/laminas/laminas-stdlib/src/SplStack.php deleted file mode 100644 index 52564fde8..000000000 --- a/lib/laminas/laminas-stdlib/src/SplStack.php +++ /dev/null @@ -1,93 +0,0 @@ - - */ -class SplStack extends \SplStack implements Serializable -{ - /** - * Serialize to an array representing the stack - * - * @return list - */ - public function toArray() - { - $array = []; - foreach ($this as $item) { - $array[] = $item; - } - return $array; - } - - /** - * Serialize - * - * @return string - */ - #[ReturnTypeWillChange] - public function serialize() - { - return serialize($this->__serialize()); - } - - /** - * Magic method used for serializing of an instance. - * - * @return list - */ - #[ReturnTypeWillChange] - public function __serialize() - { - return $this->toArray(); - } - - /** - * Unserialize - * - * @param string $data - * @return void - */ - #[ReturnTypeWillChange] - public function unserialize($data) - { - $toUnserialize = unserialize($data); - if (! is_array($toUnserialize)) { - throw new UnexpectedValueException(sprintf( - 'Cannot deserialize %s instance; corrupt serialization data', - self::class - )); - } - - $this->__unserialize($toUnserialize); - } - - /** - * Magic method used to rebuild an instance. - * - * @param array $data Data array. - * @return void - */ - #[ReturnTypeWillChange] - public function __unserialize($data) - { - foreach ($data as $item) { - $this->unshift($item); - } - } -} diff --git a/lib/laminas/laminas-stdlib/src/StringUtils.php b/lib/laminas/laminas-stdlib/src/StringUtils.php deleted file mode 100644 index ffc3ad553..000000000 --- a/lib/laminas/laminas-stdlib/src/StringUtils.php +++ /dev/null @@ -1,213 +0,0 @@ ->|null - */ - protected static $wrapperRegistry; - - /** - * A list of known single-byte character encodings (upper-case) - * - * @var string[] - */ - protected static $singleByteEncodings = [ - 'ASCII', - '7BIT', - '8BIT', - 'ISO-8859-1', - 'ISO-8859-2', - 'ISO-8859-3', - 'ISO-8859-4', - 'ISO-8859-5', - 'ISO-8859-6', - 'ISO-8859-7', - 'ISO-8859-8', - 'ISO-8859-9', - 'ISO-8859-10', - 'ISO-8859-11', - 'ISO-8859-13', - 'ISO-8859-14', - 'ISO-8859-15', - 'ISO-8859-16', - 'CP-1251', - 'CP-1252', - // TODO - ]; - - /** - * Is PCRE compiled with Unicode support? - * - * @var bool - **/ - protected static $hasPcreUnicodeSupport; - - /** - * Get registered wrapper classes - * - * @return string[] - * @psalm-return list> - */ - public static function getRegisteredWrappers() - { - if (static::$wrapperRegistry === null) { - static::$wrapperRegistry = []; - - if (extension_loaded('intl')) { - static::$wrapperRegistry[] = Intl::class; - } - - if (extension_loaded('mbstring')) { - static::$wrapperRegistry[] = MbString::class; - } - - if (extension_loaded('iconv')) { - static::$wrapperRegistry[] = Iconv::class; - } - - static::$wrapperRegistry[] = Native::class; - } - - return static::$wrapperRegistry; - } - - /** - * Register a string wrapper class - * - * @param class-string $wrapper - * @return void - */ - public static function registerWrapper($wrapper) - { - $wrapper = (string) $wrapper; - // using getRegisteredWrappers() here to ensure that the list is initialized - if (! in_array($wrapper, static::getRegisteredWrappers(), true)) { - static::$wrapperRegistry[] = $wrapper; - } - } - - /** - * Unregister a string wrapper class - * - * @param class-string $wrapper - * @return void - */ - public static function unregisterWrapper($wrapper) - { - // using getRegisteredWrappers() here to ensure that the list is initialized - $index = array_search((string) $wrapper, static::getRegisteredWrappers(), true); - if ($index !== false) { - unset(static::$wrapperRegistry[$index]); - } - } - - /** - * Reset all registered wrappers so the default wrappers will be used - * - * @return void - */ - public static function resetRegisteredWrappers() - { - static::$wrapperRegistry = null; - } - - /** - * Get the first string wrapper supporting the given character encoding - * and supports to convert into the given convert encoding. - * - * @param string $encoding Character encoding to support - * @param string|null $convertEncoding OPTIONAL character encoding to convert in - * @return StringWrapperInterface - * @throws Exception\RuntimeException If no wrapper supports given character encodings. - */ - public static function getWrapper($encoding = 'UTF-8', $convertEncoding = null) - { - foreach (static::getRegisteredWrappers() as $wrapperClass) { - if ($wrapperClass::isSupported($encoding, $convertEncoding)) { - $wrapper = new $wrapperClass($encoding, $convertEncoding); - $wrapper->setEncoding($encoding, $convertEncoding); - return $wrapper; - } - } - - throw new Exception\RuntimeException( - 'No wrapper found supporting "' . $encoding . '"' - . ($convertEncoding !== null ? ' and "' . $convertEncoding . '"' : '') - ); - } - - /** - * Get a list of all known single-byte character encodings - * - * @return string[] - */ - public static function getSingleByteEncodings() - { - return static::$singleByteEncodings; - } - - /** - * Check if a given encoding is a known single-byte character encoding - * - * @param string $encoding - * @return bool - */ - public static function isSingleByteEncoding($encoding) - { - return in_array(strtoupper($encoding), static::$singleByteEncodings); - } - - /** - * Check if a given string is valid UTF-8 encoded - * - * @param string $str - * @return bool - */ - public static function isValidUtf8($str) - { - return is_string($str) && ($str === '' || preg_match('/^./su', $str) === 1); - } - - /** - * Is PCRE compiled with Unicode support? - * - * @return bool - */ - public static function hasPcreUnicodeSupport() - { - if (static::$hasPcreUnicodeSupport === null) { - ErrorHandler::start(); - static::$hasPcreUnicodeSupport = defined('PREG_BAD_UTF8_OFFSET_ERROR') && preg_match('/\pL/u', 'a') === 1; - ErrorHandler::stop(); - } - return static::$hasPcreUnicodeSupport; - } -} diff --git a/lib/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php b/lib/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php deleted file mode 100644 index a96c7a468..000000000 --- a/lib/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php +++ /dev/null @@ -1,278 +0,0 @@ -convertEncoding = $convertEncodingUpper; - } else { - $this->convertEncoding = null; - } - $this->encoding = $encodingUpper; - - return $this; - } - - /** - * Get the defined character encoding to work with - * - * @return null|string - * @throws Exception\LogicException If no encoding was defined. - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Get the defined character encoding to convert to - * - * @return string|null - */ - public function getConvertEncoding() - { - return $this->convertEncoding; - } - - /** - * Convert a string from defined character encoding to the defined convert encoding - * - * @param string $str - * @param bool $reverse - * @return string|false - */ - public function convert($str, $reverse = false) - { - $encoding = $this->getEncoding(); - $convertEncoding = $this->getConvertEncoding(); - if ($convertEncoding === null) { - throw new Exception\LogicException( - 'No convert encoding defined' - ); - } - - if ($encoding === $convertEncoding) { - return $str; - } - - $from = $reverse ? $convertEncoding : $encoding; - $to = $reverse ? $encoding : $convertEncoding; - throw new Exception\RuntimeException(sprintf( - 'Converting from "%s" to "%s" isn\'t supported by this string wrapper', - $from ?? '', - $to ?? '' - )); - } - - /** - * Wraps a string to a given number of characters - * - * @param string $string - * @param int $width - * @param string $break - * @param bool $cut - * @return string|false - */ - public function wordWrap($string, $width = 75, $break = "\n", $cut = false) - { - $string = (string) $string; - if ($string === '') { - return ''; - } - - $break = (string) $break; - if ($break === '') { - throw new Exception\InvalidArgumentException('Break string cannot be empty'); - } - - $width = (int) $width; - if ($width === 0 && $cut) { - throw new Exception\InvalidArgumentException('Cannot force cut when width is zero'); - } - - if (null === $this->getEncoding() || StringUtils::isSingleByteEncoding($this->getEncoding())) { - return wordwrap($string, $width, $break, $cut); - } - - $stringWidth = $this->strlen($string); - $breakWidth = $this->strlen($break); - - $result = ''; - $lastStart = $lastSpace = 0; - - for ($current = 0; $current < $stringWidth; $current++) { - $char = $this->substr($string, $current, 1); - - $possibleBreak = $char; - if ($breakWidth !== 1) { - $possibleBreak = $this->substr($string, $current, $breakWidth); - } - - if ($possibleBreak === $break) { - $result .= $this->substr($string, $lastStart, $current - $lastStart + $breakWidth); - $current += $breakWidth - 1; - $lastStart = $lastSpace = $current + 1; - continue; - } - - if ($char === ' ') { - if ($current - $lastStart >= $width) { - $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break; - $lastStart = $current + 1; - } - - $lastSpace = $current; - continue; - } - - if ($current - $lastStart >= $width && $cut && $lastStart >= $lastSpace) { - $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break; - $lastStart = $lastSpace = $current; - continue; - } - - if ($current - $lastStart >= $width && $lastStart < $lastSpace) { - $result .= $this->substr($string, $lastStart, $lastSpace - $lastStart) . $break; - $lastStart = $lastSpace += 1; - continue; - } - } - - if ($lastStart !== $current) { - $result .= $this->substr($string, $lastStart, $current - $lastStart); - } - - return $result; - } - - /** - * Pad a string to a certain length with another string - * - * @param string $input - * @param int $padLength - * @param string $padString - * @param int $padType - * @return string - */ - public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT) - { - if (null === $this->getEncoding() || StringUtils::isSingleByteEncoding($this->getEncoding())) { - return str_pad($input, $padLength, $padString, $padType); - } - - $lengthOfPadding = $padLength - $this->strlen($input); - if ($lengthOfPadding <= 0) { - return $input; - } - - $padStringLength = $this->strlen($padString); - if ($padStringLength === 0) { - return $input; - } - - $repeatCount = (int) floor($lengthOfPadding / $padStringLength); - - if ($padType === STR_PAD_BOTH) { - $repeatCountLeft = $repeatCountRight = ($repeatCount - $repeatCount % 2) / 2; - - $lastStringLength = $lengthOfPadding - 2 * $repeatCountLeft * $padStringLength; - $lastStringLeftLength = $lastStringRightLength = (int) floor($lastStringLength / 2); - $lastStringRightLength += $lastStringLength % 2; - - $lastStringLeft = $this->substr($padString, 0, $lastStringLeftLength); - $lastStringRight = $this->substr($padString, 0, $lastStringRightLength); - - return str_repeat($padString, $repeatCountLeft) . $lastStringLeft - . $input - . str_repeat($padString, $repeatCountRight) . $lastStringRight; - } - - $lastString = $this->substr($padString, 0, $lengthOfPadding % $padStringLength); - - if ($padType === STR_PAD_LEFT) { - return str_repeat($padString, $repeatCount) . $lastString . $input; - } - - return $input . str_repeat($padString, $repeatCount) . $lastString; - } -} diff --git a/lib/laminas/laminas-stdlib/src/StringWrapper/Iconv.php b/lib/laminas/laminas-stdlib/src/StringWrapper/Iconv.php deleted file mode 100644 index 2f52b74e1..000000000 --- a/lib/laminas/laminas-stdlib/src/StringWrapper/Iconv.php +++ /dev/null @@ -1,302 +0,0 @@ -getEncoding()); - } - - /** - * Returns the portion of string specified by the start and length parameters - * - * @param string $str - * @param int $offset - * @param int|null $length - * @return string|false - */ - public function substr($str, $offset = 0, $length = null) - { - $length ??= $this->strlen($str); - assert($length !== false); - - return iconv_substr($str, $offset, $length, $this->getEncoding()); - } - - /** - * Find the position of the first occurrence of a substring in a string - * - * @param string $haystack - * @param string $needle - * @param int $offset - * @return int|false - */ - public function strpos($haystack, $needle, $offset = 0) - { - $encoding = $this->getEncoding(); - assert($encoding !== null); - - return iconv_strpos($haystack, $needle, $offset, $encoding); - } - - /** - * Convert a string from defined encoding to the defined convert encoding - * - * @param string $str - * @param bool $reverse - * @return string|false - */ - public function convert($str, $reverse = false) - { - $encoding = $this->getEncoding(); - $convertEncoding = $this->getConvertEncoding(); - if ($convertEncoding === null) { - throw new Exception\LogicException( - 'No convert encoding defined' - ); - } - - if ($encoding === $convertEncoding) { - return $str; - } - - $fromEncoding = $reverse ? $convertEncoding : $encoding; - $toEncoding = $reverse ? $encoding : $convertEncoding; - - if (null === $toEncoding || null === $fromEncoding) { - return $str; - } - - // automatically add "//IGNORE" to not stop converting on invalid characters - // invalid characters triggers a notice anyway - return iconv($fromEncoding, $toEncoding . '//IGNORE', $str); - } -} diff --git a/lib/laminas/laminas-stdlib/src/StringWrapper/Intl.php b/lib/laminas/laminas-stdlib/src/StringWrapper/Intl.php deleted file mode 100644 index 81a6b9a8a..000000000 --- a/lib/laminas/laminas-stdlib/src/StringWrapper/Intl.php +++ /dev/null @@ -1,89 +0,0 @@ -getEncoding()); - } - - /** - * Returns the portion of string specified by the start and length parameters - * - * @param string $str - * @param int $offset - * @param int|null $length - * @return string|false - */ - public function substr($str, $offset = 0, $length = null) - { - return mb_substr($str, $offset, $length, $this->getEncoding()); - } - - /** - * Find the position of the first occurrence of a substring in a string - * - * @param string $haystack - * @param string $needle - * @param int $offset - * @return int|false - */ - public function strpos($haystack, $needle, $offset = 0) - { - return mb_strpos($haystack, $needle, $offset, $this->getEncoding()); - } - - /** - * Convert a string from defined encoding to the defined convert encoding - * - * @param string $str - * @param bool $reverse - * @return string|false - */ - public function convert($str, $reverse = false) - { - $encoding = $this->getEncoding(); - $convertEncoding = $this->getConvertEncoding(); - - if ($convertEncoding === null) { - throw new Exception\LogicException( - 'No convert encoding defined' - ); - } - - if ($encoding === $convertEncoding) { - return $str; - } - - $fromEncoding = $reverse ? $convertEncoding : $encoding; - $toEncoding = $reverse ? $encoding : $convertEncoding; - - return mb_convert_encoding($str, $toEncoding ?? '', $fromEncoding ?? ''); - } -} diff --git a/lib/laminas/laminas-stdlib/src/StringWrapper/Native.php b/lib/laminas/laminas-stdlib/src/StringWrapper/Native.php deleted file mode 100644 index a137d4ae1..000000000 --- a/lib/laminas/laminas-stdlib/src/StringWrapper/Native.php +++ /dev/null @@ -1,135 +0,0 @@ -convertEncoding = $encodingUpper; - } - - if ($convertEncoding !== null) { - if ($encodingUpper !== strtoupper($convertEncoding)) { - throw new Exception\InvalidArgumentException( - 'Wrapper doesn\'t support to convert between character encodings' - ); - } - - $this->convertEncoding = $encodingUpper; - } else { - $this->convertEncoding = null; - } - $this->encoding = $encodingUpper; - - return $this; - } - - /** - * Returns the length of the given string - * - * @param string $str - * @return int|false - */ - public function strlen($str) - { - return strlen($str); - } - - /** - * Returns the portion of string specified by the start and length parameters - * - * @param string $str - * @param int $offset - * @param int|null $length - * @return string|false - */ - public function substr($str, $offset = 0, $length = null) - { - return substr($str, $offset, $length); - } - - /** - * Find the position of the first occurrence of a substring in a string - * - * @param string $haystack - * @param string $needle - * @param int $offset - * @return int|false - */ - public function strpos($haystack, $needle, $offset = 0) - { - return strpos($haystack, $needle, $offset); - } -} diff --git a/lib/laminas/laminas-stdlib/src/StringWrapper/StringWrapperInterface.php b/lib/laminas/laminas-stdlib/src/StringWrapper/StringWrapperInterface.php deleted file mode 100644 index 700799f91..000000000 --- a/lib/laminas/laminas-stdlib/src/StringWrapper/StringWrapperInterface.php +++ /dev/null @@ -1,108 +0,0 @@ - ## 🇷🇺 Русским гражданам -> -> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм. -> -> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую. -> -> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!" -> -> ## 🇺🇸 To Citizens of Russia -> -> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism. -> -> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences. -> -> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!" - -laminas-validator provides a set of commonly needed validators. It also provides a -simple validator chaining mechanism by which multiple validators may be applied -to a single datum in a user-defined order. - -## Installation - -Run the following to install this library: - -```bash -$ composer require laminas/laminas-validator -``` - -## Documentation - -Browse the documentation online at https://docs.laminas.dev/laminas-validator/ - -## Support - -* [Issues](https://github.com/laminas/laminas-validator/issues/) -* [Chat](https://laminas.dev/chat/) -* [Forum](https://discourse.laminas.dev/) diff --git a/lib/laminas/laminas-validator/bin/update_hostname_validator.php b/lib/laminas/laminas-validator/bin/update_hostname_validator.php deleted file mode 100644 index fbc461634..000000000 --- a/lib/laminas/laminas-validator/bin/update_hostname_validator.php +++ /dev/null @@ -1,196 +0,0 @@ - $newFileContent */ -$newFileContent = []; // new file content -$insertDone = false; // becomes 'true' when we find start of $validTlds declaration -$insertFinish = false; // becomes 'true' when we find end of $validTlds declaration -$checkOnly = isset($argv[1]) ? $argv[1] === '--check-only' : false; -$response = getOfficialTLDs(); -$ianaVersion = getVersionFromString('Version', strtok($response->getBody(), "\n")); -$validatorVersion = getVersionFromString('IanaVersion', file_get_contents(LAMINAS_HOSTNAME_VALIDATOR_FILE)); - -if ($checkOnly && $ianaVersion > $validatorVersion) { - printf( - 'TLDs must be updated, please run `php bin/update_hostname_validator.php` and push your changes%s', - PHP_EOL - ); - exit(1); -} - -if ($checkOnly) { - printf('TLDs are up-to-date%s', PHP_EOL); - exit(0); -} - -foreach (file(LAMINAS_HOSTNAME_VALIDATOR_FILE) as $line) { - // Replace old version number with new one - if (preg_match('/\*\s+IanaVersion\s+\d+/', $line, $matches)) { - $newFileContent[] = sprintf(" * IanaVersion %s\n", $ianaVersion); - continue; - } - - if ($insertDone === $insertFinish) { - // Outside of $validTlds definition; keep line as-is - $newFileContent[] = $line; - } - - if ($insertFinish) { - continue; - } - - if ($insertDone) { - // Detect where the $validTlds declaration ends - if (preg_match('/^\s+\];\s*$/', $line)) { - $newFileContent[] = $line; - $insertFinish = true; - } - - continue; - } - - // Detect where the $validTlds declaration begins - if (preg_match('/^\s+protected\s+\$validTlds\s+=\s+\[\s*$/', $line)) { - $newFileContent = array_merge($newFileContent, getNewValidTlds($response->getBody())); - $insertDone = true; - } -} - -if (! $insertDone) { - printf('Error: cannot find line with "protected $validTlds"%s', PHP_EOL); - exit(1); -} - -if (!$insertFinish) { - printf('Error: cannot find end of $validTlds declaration%s', PHP_EOL); - exit(1); -} - -if (false === @file_put_contents(LAMINAS_HOSTNAME_VALIDATOR_FILE, $newFileContent)) { - printf('Error: cannot write info file "%s"%s', LAMINAS_HOSTNAME_VALIDATOR_FILE, PHP_EOL); - exit(1); -} - -printf('Validator TLD file updated.%s', PHP_EOL); -exit(0); - -/** - * Get Official TLDs - * - * @return \Laminas\Http\Response - * @throws Exception - */ -function getOfficialTLDs() -{ - $client = new Client(); - $client->setOptions([ - 'adapter' => 'Laminas\Http\Client\Adapter\Curl', - ]); - $client->setUri(IANA_URL); - $client->setMethod('GET'); - - $response = $client->send(); - if (! $response->isSuccess()) { - throw new \Exception(sprintf("Error: cannot get '%s'%s", IANA_URL, PHP_EOL)); - } - return $response; -} - -/** - * Extract the first match of a string like - * "Version 2015072300" from the given string - * - * @param string $prefix - * @param string $string - * @return string - * @throws Exception - */ -function getVersionFromString($prefix, $string) -{ - $matches = []; - if (! preg_match(sprintf('/%s\s+((\d+)?)/', $prefix), $string, $matches)) { - throw new Exception('Error: cannot get last update date'); - } - - return $matches[1]; -} - -/** - * Extract new Valid TLDs from a string containing one per line. - * - * @param string $string - * @return list - */ -function getNewValidTlds($string) -{ - $decodePunycode = getPunycodeDecoder(); - - // Get new TLDs from the list previously fetched - $newValidTlds = []; - foreach (preg_grep('/^[^#]/', preg_split("#\r?\n#", $string)) as $line) { - $newValidTlds []= sprintf( - "%s'%s',\n", - str_repeat(' ', 8), - $decodePunycode(strtolower($line)) - ); - } - - return $newValidTlds; -} - -/** - * Retrieve and return a punycode decoder. - * - * TLDs are puny encoded. - * - * We need a decodePunycode function to translate TLDs to UTF-8: - * - * - use idn_to_utf8 if available - * - otherwise, use Hostname::decodePunycode() - * - * @return callable - */ -function getPunycodeDecoder() -{ - if (function_exists('idn_to_utf8')) { - return function ($domain) { - return idn_to_utf8($domain, 0, INTL_IDNA_VARIANT_UTS46); - }; - } - - $hostnameValidator = new Hostname(); - $reflection = new ReflectionClass(get_class($hostnameValidator)); - $decodePunyCode = $reflection->getMethod('decodePunycode'); - $decodePunyCode->setAccessible(true); - - return function ($encode) use ($hostnameValidator, $decodePunyCode) { - if (strpos($encode, 'xn--') === 0) { - return $decodePunyCode->invokeArgs($hostnameValidator, [substr($encode, 4)]); - } - return $encode; - }; -} diff --git a/lib/laminas/laminas-validator/composer.json b/lib/laminas/laminas-validator/composer.json deleted file mode 100644 index 3c552aa81..000000000 --- a/lib/laminas/laminas-validator/composer.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "laminas/laminas-validator", - "description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria", - "license": "BSD-3-Clause", - "keywords": [ - "laminas", - "validator" - ], - "homepage": "https://laminas.dev", - "support": { - "docs": "https://docs.laminas.dev/laminas-validator/", - "issues": "https://github.com/laminas/laminas-validator/issues", - "source": "https://github.com/laminas/laminas-validator", - "rss": "https://github.com/laminas/laminas-validator/releases.atom", - "chat": "https://laminas.dev/chat", - "forum": "https://discourse.laminas.dev" - }, - "config": { - "sort-packages": true, - "platform": { - "php": "7.4.99" - }, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - }, - "extra": { - "laminas": { - "component": "Laminas\\Validator", - "config-provider": "Laminas\\Validator\\ConfigProvider" - } - }, - "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", - "laminas/laminas-servicemanager": "^3.12.0", - "laminas/laminas-stdlib": "^3.10" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.14.0", - "laminas/laminas-http": "^2.14.2", - "laminas/laminas-i18n": "^2.15.0", - "laminas/laminas-session": "^2.12.1", - "laminas/laminas-uri": "^2.9.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.21", - "psalm/plugin-phpunit": "^0.17.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "vimeo/psalm": "^4.24.0" - }, - "suggest": { - "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", - "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", - "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", - "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", - "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", - "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" - }, - "autoload": { - "psr-4": { - "Laminas\\Validator\\": "src/" - } - }, - "autoload-dev": { - "files": [ - "test/autoload.php" - ], - "psr-4": { - "LaminasTest\\Validator\\": "test/" - } - }, - "scripts": { - "check": [ - "@cs-check", - "@test" - ], - "cs-check": "phpcs", - "cs-fix": "phpcbf", - "test": "phpunit --colors=always", - "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", - "static-analysis": "psalm --shepherd --stats" - }, - "conflict": { - "zendframework/zend-validator": "*" - } -} diff --git a/lib/laminas/laminas-validator/composer.lock b/lib/laminas/laminas-validator/composer.lock deleted file mode 100644 index 88be7a9da..000000000 --- a/lib/laminas/laminas-validator/composer.lock +++ /dev/null @@ -1,5217 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "12f30984a08a09a9f205c4d8f7cef8a7", - "packages": [ - { - "name": "laminas/laminas-servicemanager", - "version": "3.15.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "216f972b179191b14c33a79337947b63bf7808ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/216f972b179191b14c33a79337947b63bf7808ff", - "reference": "216f972b179191b14c33a79337947b63bf7808ff", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.2.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0", - "psr/container": "^1.0" - }, - "conflict": { - "ext-psr": "*", - "laminas/laminas-code": "<3.3.1", - "zendframework/zend-code": "<3.3.1", - "zendframework/zend-servicemanager": "*" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "replace": { - "container-interop/container-interop": "^1.2.0" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.0", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-container-config-test": "^0.6", - "laminas/laminas-dependency-plugin": "^2.1.2", - "mikey179/vfsstream": "^1.6.10@alpha", - "ocramius/proxy-manager": "^2.11", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.8" - }, - "suggest": { - "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" - }, - "bin": [ - "bin/generate-deps-for-config-factory", - "bin/generate-factory-for-class" - ], - "type": "library", - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Factory-Driven Dependency Injection Container", - "homepage": "https://laminas.dev", - "keywords": [ - "PSR-11", - "dependency-injection", - "di", - "dic", - "laminas", - "service-manager", - "servicemanager" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-servicemanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-servicemanager/issues", - "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", - "source": "https://github.com/laminas/laminas-servicemanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-07-20T09:48:45+00:00" - }, - { - "name": "laminas/laminas-stdlib", - "version": "3.10.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "0d669074845fc80a99add0f64025192f143ef836" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/0d669074845fc80a99add0f64025192f143ef836", - "reference": "0d669074845fc80a99add0f64025192f143ef836", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-stdlib": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "^9.3.7", - "psalm/plugin-phpunit": "^0.16.0", - "vimeo/psalm": "^4.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "source": "https://github.com/laminas/laminas-stdlib" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-06-10T14:49:09+00:00" - }, - { - "name": "psr/container", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" - }, - "time": "2021-11-05T16:50:12+00:00" - } - ], - "packages-dev": [ - { - "name": "amphp/amp", - "version": "v2.6.2", - "source": { - "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ], - "psr-4": { - "Amp\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "https://amphp.org/amp", - "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2022-02-20T17:52:18+00:00" - }, - { - "name": "amphp/byte-stream", - "version": "v1.8.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Amp\\ByteStream\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2021-03-30T17:13:30+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, - { - "name": "composer/pcre", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T20:21:48+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-04-01T19:23:25+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" - }, - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - }, - { - "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2022-02-04T12:51:07+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" - }, - "time": "2019-12-04T15:06:13+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "shasum": "" - }, - "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "A more advanced JSONRPC implementation", - "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" - }, - "time": "2021-06-11T22:34:44+00:00" - }, - { - "name": "felixfbecker/language-server-protocol", - "version": "v1.5.2", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "LanguageServerProtocol\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "PHP classes for the Language Server Protocol", - "keywords": [ - "language", - "microsoft", - "php", - "server" - ], - "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" - }, - "time": "2022-03-02T22:36:06+00:00" - }, - { - "name": "laminas/laminas-coding-standard", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/bcf6e07fe4690240be7beb6d884d0b0fafa6a251", - "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "php": "^7.3 || ^8.0", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.6", - "webimpress/coding-standard": "^1.2" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "LaminasCodingStandard\\": "src/LaminasCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas Coding Standard", - "homepage": "https://laminas.dev", - "keywords": [ - "Coding Standard", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-coding-standard/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-coding-standard/issues", - "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", - "source": "https://github.com/laminas/laminas-coding-standard" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-05-29T15:53:59+00:00" - }, - { - "name": "laminas/laminas-db", - "version": "2.15.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-db.git", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-db/zipball/1125ef2e55108bdfcc1f0030d3a0f9b895e09606", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.7.1", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-db": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-eventmanager": "^3.4.0", - "laminas/laminas-hydrator": "^3.2 || ^4.3", - "laminas/laminas-servicemanager": "^3.7.0", - "phpunit/phpunit": "^9.5.19" - }, - "suggest": { - "laminas/laminas-eventmanager": "Laminas\\EventManager component", - "laminas/laminas-hydrator": "(^3.2 || ^4.3) Laminas\\Hydrator component for using HydratingResultSets", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Db", - "config-provider": "Laminas\\Db\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Db\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "db", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-db/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-db/issues", - "rss": "https://github.com/laminas/laminas-db/releases.atom", - "source": "https://github.com/laminas/laminas-db" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-04-11T13:26:20+00:00" - }, - { - "name": "laminas/laminas-escaper", - "version": "2.10.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "58af67282db37d24e584a837a94ee55b9c7552be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/58af67282db37d24e584a837a94ee55b9c7552be", - "reference": "58af67282db37d24e584a837a94ee55b9c7552be", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-mbstring": "*", - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-escaper": "*" - }, - "require-dev": { - "infection/infection": "^0.26.6", - "laminas/laminas-coding-standard": "~2.3.0", - "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.5.18", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.22.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Escaper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", - "homepage": "https://laminas.dev", - "keywords": [ - "escaper", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-escaper/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-escaper/issues", - "rss": "https://github.com/laminas/laminas-escaper/releases.atom", - "source": "https://github.com/laminas/laminas-escaper" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-03-08T20:15:36+00:00" - }, - { - "name": "laminas/laminas-eventmanager", - "version": "3.5.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "41f7209428f37cab9573365e361f4078209aaafa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/41f7209428f37cab9573365e361f4078209aaafa", - "reference": "41f7209428f37cab9573365e361f4078209aaafa", - "shasum": "" - }, - "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "container-interop/container-interop": "<1.2", - "zendframework/zend-eventmanager": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-stdlib": "^3.6", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psr/container": "^1.1.2 || ^2.0.2" - }, - "suggest": { - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", - "psr/container": "^1.1.2 || ^2.0.2, to use the lazy listeners feature" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\EventManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Trigger and listen to events within a PHP application", - "homepage": "https://laminas.dev", - "keywords": [ - "event", - "eventmanager", - "events", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-eventmanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-eventmanager/issues", - "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", - "source": "https://github.com/laminas/laminas-eventmanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-04-06T21:05:17+00:00" - }, - { - "name": "laminas/laminas-filter", - "version": "2.17.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-filter.git", - "reference": "7c78483f22e118fbc98be41dc24b39e8c17cdcae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/7c78483f22e118fbc98be41dc24b39e8c17cdcae", - "reference": "7c78483f22e118fbc98be41dc24b39e8c17cdcae", - "shasum": "" - }, - "require": { - "laminas/laminas-servicemanager": "^3.14.0", - "laminas/laminas-stdlib": "^3.6.1", - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "laminas/laminas-validator": "<2.10.1", - "zendframework/zend-filter": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "^2.3.0", - "laminas/laminas-crypt": "^3.5.1", - "laminas/laminas-uri": "^2.9.1", - "pear/archive_tar": "^1.4.14", - "phpspec/prophecy-phpunit": "^2.0.1", - "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.17.0", - "psr/http-factory": "^1.0.1", - "vimeo/psalm": "^4.24.0" - }, - "suggest": { - "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters", - "laminas/laminas-i18n": "Laminas\\I18n component for filters depending on i18n functionality", - "laminas/laminas-uri": "Laminas\\Uri component, for the UriNormalize filter", - "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Filter", - "config-provider": "Laminas\\Filter\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Filter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Programmatically filter and normalize data and files", - "homepage": "https://laminas.dev", - "keywords": [ - "filter", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-filter/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-filter/issues", - "rss": "https://github.com/laminas/laminas-filter/releases.atom", - "source": "https://github.com/laminas/laminas-filter" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-07-17T11:58:06+00:00" - }, - { - "name": "laminas/laminas-http", - "version": "2.15.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-http.git", - "reference": "261f079c3dffcf6f123484db43c40e44c4bf1c79" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-http/zipball/261f079c3dffcf6f123484db43c40e44c4bf1c79", - "reference": "261f079c3dffcf6f123484db43c40e44c4bf1c79", - "shasum": "" - }, - "require": { - "laminas/laminas-loader": "^2.8", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-uri": "^2.9.1", - "laminas/laminas-validator": "^2.15", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-http": "*" - }, - "require-dev": { - "ext-curl": "*", - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.5.5" - }, - "suggest": { - "paragonie/certainty": "For automated management of cacert.pem" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Http\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "http client", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-http/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-http/issues", - "rss": "https://github.com/laminas/laminas-http/releases.atom", - "source": "https://github.com/laminas/laminas-http" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-12-03T10:17:11+00:00" - }, - { - "name": "laminas/laminas-i18n", - "version": "2.16.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-i18n.git", - "reference": "e77c04c050b7744125d26e213b2639c86d4514ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/e77c04c050b7744125d26e213b2639c86d4514ad", - "reference": "e77c04c050b7744125d26e213b2639c86d4514ad", - "shasum": "" - }, - "require": { - "ext-intl": "*", - "laminas/laminas-servicemanager": "^3.14.0", - "laminas/laminas-stdlib": "^2.7 || ^3.0", - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "laminas/laminas-view": "<2.20.0", - "phpspec/prophecy": "<1.9.0", - "zendframework/zend-i18n": "*" - }, - "require-dev": { - "laminas/laminas-cache": "^3.1.2", - "laminas/laminas-cache-storage-adapter-memory": "^2.0.0", - "laminas/laminas-cache-storage-deprecated-factory": "^1.0.0", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-config": "^3.4.0", - "laminas/laminas-eventmanager": "^3.5.0", - "laminas/laminas-filter": "^2.16.0", - "laminas/laminas-validator": "^2.17.0", - "laminas/laminas-view": "^2.21.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.21", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.24.0" - }, - "suggest": { - "laminas/laminas-cache": "You should install this package to cache the translations", - "laminas/laminas-config": "You should install this package to use the INI translation format", - "laminas/laminas-eventmanager": "You should install this package to use the events in the translator", - "laminas/laminas-filter": "You should install this package to use the provided filters", - "laminas/laminas-i18n-resources": "This package provides validator and captcha translations", - "laminas/laminas-servicemanager": "You should install this package to use the translator", - "laminas/laminas-validator": "You should install this package to use the provided validators", - "laminas/laminas-view": "You should install this package to use the provided view helpers" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\I18n", - "config-provider": "Laminas\\I18n\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\I18n\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Provide translations for your application, and filter and validate internationalized values", - "homepage": "https://laminas.dev", - "keywords": [ - "i18n", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-i18n/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-i18n/issues", - "rss": "https://github.com/laminas/laminas-i18n/releases.atom", - "source": "https://github.com/laminas/laminas-i18n" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-07-12T22:15:49+00:00" - }, - { - "name": "laminas/laminas-loader", - "version": "2.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-loader.git", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "reference": "d0589ec9dd48365fd95ad10d1c906efd7711c16b", - "shasum": "" - }, - "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-loader": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Loader\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Autoloading and plugin loading strategies", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "loader" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-loader/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-loader/issues", - "rss": "https://github.com/laminas/laminas-loader/releases.atom", - "source": "https://github.com/laminas/laminas-loader" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-02T18:30:53+00:00" - }, - { - "name": "laminas/laminas-session", - "version": "2.13.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-session.git", - "reference": "9f8a6077dd22b3b253583b1be84ddd5bf6fa1ef4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-session/zipball/9f8a6077dd22b3b253583b1be84ddd5bf6fa1ef4", - "reference": "9f8a6077dd22b3b253583b1be84ddd5bf6fa1ef4", - "shasum": "" - }, - "require": { - "laminas/laminas-eventmanager": "^3.5", - "laminas/laminas-servicemanager": "^3.15.1", - "laminas/laminas-stdlib": "^3.10.1", - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-session": "*" - }, - "require-dev": { - "laminas/laminas-cache": "^3.1.3", - "laminas/laminas-cache-storage-adapter-memory": "^2.0.0", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-db": "^2.13.4", - "laminas/laminas-http": "^2.15", - "laminas/laminas-validator": "^2.15", - "mongodb/mongodb": "~1.12.0", - "php-mock/php-mock-phpunit": "^1.1.2 || ^2.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.9", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.24.0" - }, - "suggest": { - "laminas/laminas-cache": "Laminas\\Cache component", - "laminas/laminas-db": "Laminas\\Db component", - "laminas/laminas-http": "Laminas\\Http component", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component", - "laminas/laminas-validator": "Laminas\\Validator component", - "mongodb/mongodb": "If you want to use the MongoDB session save handler" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Session", - "config-provider": "Laminas\\Session\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Session\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Object-oriented interface to PHP sessions and storage", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "session" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-session/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-session/issues", - "rss": "https://github.com/laminas/laminas-session/releases.atom", - "source": "https://github.com/laminas/laminas-session" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-07-22T10:26:33+00:00" - }, - { - "name": "laminas/laminas-uri", - "version": "2.9.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-uri.git", - "reference": "7e837dc15c8fd3949df7d1213246fd7c8640032b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-uri/zipball/7e837dc15c8fd3949df7d1213246fd7c8640032b", - "reference": "7e837dc15c8fd3949df7d1213246fd7c8640032b", - "shasum": "" - }, - "require": { - "laminas/laminas-escaper": "^2.9", - "laminas/laminas-validator": "^2.15", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-uri": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "phpunit/phpunit": "^9.5.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Uri\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "uri" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-uri/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-uri/issues", - "rss": "https://github.com/laminas/laminas-uri/releases.atom", - "source": "https://github.com/laminas/laminas-uri" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-09-09T18:37:15+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "netresearch/jsonmapper", - "version": "v4.0.0", - "source": { - "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", - "squizlabs/php_codesniffer": "~3.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonMapper": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" - } - ], - "description": "Map nested JSON structures onto PHP classes", - "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" - }, - "time": "2020-12-01T19:48:11+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.14.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" - }, - "time": "2022-05-31T20:59:12+00:00" - }, - { - "name": "openlss/lib-array2xml", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nullivex/lib-array2xml.git", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "LSS": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Bryan Tong", - "email": "bryan@nullivex.com", - "homepage": "https://www.nullivex.com" - }, - { - "name": "Tony Butler", - "email": "spudz76@gmail.com", - "homepage": "https://www.nullivex.com" - } - ], - "description": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com", - "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" - ], - "support": { - "issues": "https://github.com/nullivex/lib-array2xml/issues", - "source": "https://github.com/nullivex/lib-array2xml/tree/master" - }, - "time": "2019-03-29T20:06:56+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, - { - "name": "phpspec/prophecy-phpunit", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/2d7a9df55f257d2cba9b1d0c0963a54960657177", - "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8", - "phpspec/prophecy": "^1.3", - "phpunit/phpunit": "^9.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\PhpUnit\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - } - ], - "description": "Integrating the Prophecy mocking library in PHPUnit test cases", - "homepage": "http://phpspec.net", - "keywords": [ - "phpunit", - "prophecy" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.1" - }, - "time": "2020-07-09T08:33:42+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.6.4", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" - }, - "time": "2022-06-26T13:09:08+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-07T09:28:20+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.21", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-06-19T12:14:25+00:00" - }, - { - "name": "psalm/plugin-phpunit", - "version": "0.17.0", - "source": { - "type": "git", - "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "45951541beef07e93e3ad197daf01da88e85c31d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/45951541beef07e93e3ad197daf01da88e85c31d", - "reference": "45951541beef07e93e3ad197daf01da88e85c31d", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.10", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "ext-simplexml": "*", - "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.5" - }, - "conflict": { - "phpunit/phpunit": "<7.5" - }, - "require-dev": { - "codeception/codeception": "^4.0.3", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.11.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" - } - }, - "autoload": { - "psr-4": { - "Psalm\\PhpUnitPlugin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matt Brown", - "email": "github@muglug.com" - } - ], - "description": "Psalm plugin for PHPUnit", - "support": { - "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.17.0" - }, - "time": "2022-06-14T17:05:57+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client/tree/master" - }, - "time": "2020-06-29T06:28:15+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" - }, - "time": "2019-04-30T12:38:16+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-03T09:37:03+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-11-11T14:18:36+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-15T09:54:48+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "7.2.1", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", - "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.5.1", - "squizlabs/php_codesniffer": "^3.6.2" - }, - "require-dev": { - "phing/phing": "2.17.3", - "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.7.1", - "phpstan/phpstan-deprecation-rules": "1.0.0", - "phpstan/phpstan-phpunit": "1.0.0|1.1.1", - "phpstan/phpstan-strict-rules": "1.2.3", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2022-05-25T10:58:12+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2022-06-18T07:21:10+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4d671ab4ddac94ee439ea73649c69d9d200b5000", - "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-26T13:00:04+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-10T07:21:04+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-30T19:17:29+00:00" - }, - { - "name": "symfony/string", - "version": "v5.4.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4432bc7df82a554b3e413a8570ce2fea90e94097", - "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-26T15:57:47+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "vimeo/psalm", - "version": "4.24.0", - "source": { - "type": "git", - "url": "https://github.com/vimeo/psalm.git", - "reference": "06dd975cb55d36af80f242561738f16c5f58264f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/06dd975cb55d36af80f242561738f16c5f58264f", - "reference": "06dd975cb55d36af80f242561738f16c5f58264f", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.4.2", - "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", - "dnoegel/php-xdg-base-dir": "^0.1.1", - "ext-ctype": "*", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", - "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" - }, - "provide": { - "psalm/psalm": "self.version" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", - "ext-curl": "*", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "suggest": { - "ext-curl": "In order to send data to shepherd", - "ext-igbinary": "^2.0.5 is required, used to serialize caching data" - }, - "bin": [ - "psalm", - "psalm-language-server", - "psalm-plugin", - "psalm-refactor", - "psalter" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev", - "dev-3.x": "3.x-dev", - "dev-2.x": "2.x-dev", - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], - "psr-4": { - "Psalm\\": "src/Psalm/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthew Brown" - } - ], - "description": "A static analysis tool for finding errors in PHP applications", - "keywords": [ - "code", - "inspection", - "php" - ], - "support": { - "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.24.0" - }, - "time": "2022-06-26T11:47:54+00:00" - }, - { - "name": "webimpress/coding-standard", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/webimpress/coding-standard.git", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.13" - }, - "type": "phpcodesniffer-standard", - "extra": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - }, - "autoload": { - "psr-4": { - "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "Webimpress Coding Standard", - "keywords": [ - "Coding Standard", - "PSR-2", - "phpcs", - "psr-12", - "webimpress" - ], - "support": { - "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.4" - }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2022-02-15T19:52:12+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "platform-dev": [], - "platform-overrides": { - "php": "7.4.99" - }, - "plugin-api-version": "2.3.0" -} diff --git a/lib/laminas/laminas-validator/renovate.json b/lib/laminas/laminas-validator/renovate.json deleted file mode 100644 index 060b1d1a2..000000000 --- a/lib/laminas/laminas-validator/renovate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "local>laminas/.github:renovate-config" - ] -} diff --git a/lib/laminas/laminas-validator/src/AbstractValidator.php b/lib/laminas/laminas-validator/src/AbstractValidator.php deleted file mode 100644 index d7f3ccd3c..000000000 --- a/lib/laminas/laminas-validator/src/AbstractValidator.php +++ /dev/null @@ -1,623 +0,0 @@ -, - * messageTemplates: array, - * messageVariables: array, - * translator: Translator\TranslatorInterface|null, - * translatorTextDomain: string|null, - * translatorEnabled: bool, - * valueObscured: bool, - * } - * @property array $options - * @property array $messageTemplates - * @property array $messageVariables - */ -abstract class AbstractValidator implements - Translator\TranslatorAwareInterface, - ValidatorInterface -{ - /** - * The value to be validated - * - * @var mixed - */ - protected $value; - - /** - * Default translation object for all validate objects - * - * @var Translator\TranslatorInterface - */ - protected static $defaultTranslator; - - /** - * Default text domain to be used with translator - * - * @var string - */ - protected static $defaultTranslatorTextDomain = 'default'; - - /** - * Limits the maximum returned length of an error message - * - * @var int - */ - protected static $messageLength = -1; - - /** @var AbstractOptions&array */ - protected $abstractOptions = [ - 'messages' => [], // Array of validation failure messages - 'messageTemplates' => [], // Array of validation failure message templates - 'messageVariables' => [], // Array of additional variables available for validation failure messages - 'translator' => null, // Translation object to used -> Translator\TranslatorInterface - 'translatorTextDomain' => null, // Translation text domain - 'translatorEnabled' => true, // Is translation enabled? - 'valueObscured' => false, // Flag indicating whether value should be obfuscated in error messages - ]; - - /** - * Abstract constructor for all validators - * A validator should accept following parameters: - * - nothing f.e. Validator() - * - one or multiple scalar values f.e. Validator($first, $second, $third) - * - an array f.e. Validator(array($first => 'first', $second => 'second', $third => 'third')) - * - an instance of Traversable f.e. Validator($config_instance) - * - * @param array|Traversable $options - */ - public function __construct($options = null) - { - // The abstract constructor allows no scalar values - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - /** @psalm-suppress RedundantConditionGivenDocblockType */ - if (isset($this->messageTemplates) && is_array($this->messageTemplates)) { - $this->abstractOptions['messageTemplates'] = $this->messageTemplates; - } - - /** @psalm-suppress RedundantConditionGivenDocblockType */ - if (isset($this->messageVariables) && is_array($this->messageVariables)) { - $this->abstractOptions['messageVariables'] = $this->messageVariables; - } - - if (is_array($options)) { - $this->setOptions($options); - } - } - - /** - * Returns an option - * - * @param string $option Option to be returned - * @return mixed Returned option - * @throws Exception\InvalidArgumentException - */ - public function getOption($option) - { - if (array_key_exists($option, $this->abstractOptions)) { - return $this->abstractOptions[$option]; - } - - /** @psalm-suppress RedundantConditionGivenDocblockType */ - if (isset($this->options) && array_key_exists($option, $this->options)) { - return $this->options[$option]; - } - - throw new Exception\InvalidArgumentException("Invalid option '$option'"); - } - - /** - * Returns all available options - * - * @return array Array with all available options - */ - public function getOptions() - { - $result = $this->abstractOptions; - /** @psalm-suppress RedundantConditionGivenDocblockType */ - if (isset($this->options) && is_array($this->options)) { - $result += $this->options; - } - return $result; - } - - /** - * Sets one or multiple options - * - * @param array|Traversable $options Options to set - * @return $this Provides fluid interface - * @throws Exception\InvalidArgumentException If $options is not an array or Traversable. - */ - public function setOptions($options = []) - { - /** @psalm-suppress DocblockTypeContradiction */ - if (! is_array($options) && ! $options instanceof Traversable) { - throw new Exception\InvalidArgumentException(__METHOD__ . ' expects an array or Traversable'); - } - - /** - * @psalm-suppress RedundantConditionGivenDocblockType - * @psalm-var mixed $option - */ - foreach ($options as $name => $option) { - $fname = 'set' . ucfirst($name); - $fname2 = 'is' . ucfirst($name); - if (($name !== 'setOptions') && method_exists($this, $name)) { - $this->{$name}($option); - } elseif (($fname !== 'setOptions') && method_exists($this, $fname)) { - $this->{$fname}($option); - } elseif (method_exists($this, $fname2)) { - $this->{$fname2}($option); - } elseif (isset($this->options) && is_array($this->options)) { - $this->options[$name] = $option; - } else { - $this->abstractOptions[$name] = $option; - } - } - - return $this; - } - - /** - * Returns array of validation failure messages - * - * @return array - */ - public function getMessages() - { - return array_unique($this->abstractOptions['messages'], SORT_REGULAR); - } - - /** - * Invoke as command - * - * @param mixed $value - * @return bool - */ - public function __invoke($value) - { - return $this->isValid($value); - } - - /** - * Returns an array of the names of variables that are used in constructing validation failure messages - * - * @return list - */ - public function getMessageVariables() - { - return array_keys($this->abstractOptions['messageVariables']); - } - - /** - * Returns the message templates from the validator - * - * @return array - */ - public function getMessageTemplates() - { - return $this->abstractOptions['messageTemplates']; - } - - /** - * Sets the validation failure message template for a particular key - * - * @param string $messageString - * @param string|null $messageKey OPTIONAL - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException - */ - public function setMessage($messageString, $messageKey = null) - { - if ($messageKey === null) { - $keys = array_keys($this->abstractOptions['messageTemplates']); - foreach ($keys as $key) { - $this->setMessage($messageString, $key); - } - return $this; - } - - if (! isset($this->abstractOptions['messageTemplates'][$messageKey])) { - throw new Exception\InvalidArgumentException("No message template exists for key '$messageKey'"); - } - - $this->abstractOptions['messageTemplates'][$messageKey] = $messageString; - return $this; - } - - /** - * Sets validation failure message templates given as an array, where the array keys are the message keys, - * and the array values are the message template strings. - * - * @param array $messages - * @return $this - */ - public function setMessages(array $messages) - { - foreach ($messages as $key => $message) { - $this->setMessage($message, $key); - } - return $this; - } - - /** - * Magic function returns the value of the requested property, if and only if it is the value or a - * message variable. - * - * @param string $property - * @return mixed - * @throws Exception\InvalidArgumentException - */ - public function __get($property) - { - if ($property === 'value') { - return $this->value; - } - - if (array_key_exists($property, $this->abstractOptions['messageVariables'])) { - /** @psalm-var mixed $result */ - $result = $this->abstractOptions['messageVariables'][$property]; - if (is_array($result)) { - return $this->{key($result)}[current($result)]; - } - return $this->{$result}; - } - - /** @psalm-suppress RedundantConditionGivenDocblockType */ - if (isset($this->messageVariables) && array_key_exists($property, $this->messageVariables)) { - /** @psalm-var mixed $result */ - $result = $this->{$this->messageVariables[$property]}; - if (is_array($result)) { - return $this->{key($result)}[current($result)]; - } - return $this->{$result}; - } - - throw new Exception\InvalidArgumentException("No property exists by the name '$property'"); - } - - /** - * Constructs and returns a validation failure message with the given message key and value. - * - * Returns null if and only if $messageKey does not correspond to an existing template. - * - * If a translator is available and a translation exists for $messageKey, - * the translation will be used. - * - * @param string $messageKey - * @param string|array|object $value - * @return null|string - */ - protected function createMessage($messageKey, $value) - { - if (! isset($this->abstractOptions['messageTemplates'][$messageKey])) { - return null; - } - - $message = $this->abstractOptions['messageTemplates'][$messageKey]; - - $message = $this->translateMessage($messageKey, $message); - - if (is_object($value)) { - $value = method_exists($value, '__toString') - ? (string) $value - : get_class($value) . ' object'; - } elseif (is_array($value)) { - $value = var_export($value, true); - } else { - /** @psalm-suppress RedundantCastGivenDocblockType $value */ - $value = (string) $value; - } - - if ($this->isValueObscured()) { - $value = str_repeat('*', strlen($value)); - } - - $message = str_replace('%value%', $value, $message); - foreach ($this->abstractOptions['messageVariables'] as $ident => $property) { - if (is_array($property)) { - $value = $this->{key($property)}[current($property)]; - if (is_array($value)) { - $value = '[' . implode(', ', $value) . ']'; - } - } else { - $value = $this->$property; - } - $message = str_replace("%$ident%", (string) $value, $message); - } - - $length = self::getMessageLength(); - if (($length > -1) && (strlen($message) > $length)) { - $message = substr($message, 0, $length - 3) . '...'; - } - - return $message; - } - - /** - * @param string|null $messageKey - * @param null|string|array|object $value OPTIONAL - * @return void - */ - protected function error($messageKey, $value = null) - { - if ($messageKey === null) { - $keys = array_keys($this->abstractOptions['messageTemplates']); - $messageKey = current($keys); - } - - if ($value === null) { - /** @psalm-var string|array|object $value */ - $value = $this->value; - } - - $message = $this->createMessage($messageKey, $value); - if (! is_string($message)) { - return; - } - - $this->abstractOptions['messages'][$messageKey] = $message; - } - - /** - * Returns the validation value - * - * @return mixed Value to be validated - */ - protected function getValue() - { - return $this->value; - } - - /** - * Sets the value to be validated and clears the messages and errors arrays - * - * @param mixed $value - * @return void - */ - protected function setValue($value) - { - $this->value = $value; - $this->abstractOptions['messages'] = []; - } - - /** - * Set flag indicating whether or not value should be obfuscated in messages - * - * @param bool $flag - * @return $this - */ - public function setValueObscured($flag) - { - /** @psalm-suppress RedundantCastGivenDocblockType */ - $this->abstractOptions['valueObscured'] = (bool) $flag; - return $this; - } - - /** - * Retrieve flag indicating whether or not value should be obfuscated in - * messages - * - * @return bool - */ - public function isValueObscured() - { - return $this->abstractOptions['valueObscured']; - } - - /** - * Set translation object - * - * @param string $textDomain (optional) - * @return $this - * @throws Exception\InvalidArgumentException - */ - public function setTranslator(?Translator\TranslatorInterface $translator = null, $textDomain = null) - { - $this->abstractOptions['translator'] = $translator; - if (null !== $textDomain) { - $this->setTranslatorTextDomain($textDomain); - } - return $this; - } - - /** - * Return translation object - * - * @return Translator\TranslatorInterface|null - */ - public function getTranslator() - { - if (! $this->isTranslatorEnabled()) { - return null; - } - - if (null === $this->abstractOptions['translator']) { - $this->abstractOptions['translator'] = self::getDefaultTranslator(); - } - - return $this->abstractOptions['translator']; - } - - /** - * Does this validator have its own specific translator? - * - * @return bool - */ - public function hasTranslator() - { - return (bool) $this->abstractOptions['translator']; - } - - /** - * Set translation text domain - * - * @param string $textDomain - * @return $this - */ - public function setTranslatorTextDomain($textDomain = 'default') - { - $this->abstractOptions['translatorTextDomain'] = $textDomain; - return $this; - } - - /** - * Return the translation text domain - * - * @return string - */ - public function getTranslatorTextDomain() - { - if (null === $this->abstractOptions['translatorTextDomain']) { - $this->abstractOptions['translatorTextDomain'] = - self::getDefaultTranslatorTextDomain(); - } - return $this->abstractOptions['translatorTextDomain']; - } - - /** - * Set default translation object for all validate objects - * - * @param string $textDomain (optional) - * @return void - * @throws Exception\InvalidArgumentException - */ - public static function setDefaultTranslator(?Translator\TranslatorInterface $translator = null, $textDomain = null) - { - static::$defaultTranslator = $translator; - if (null !== $textDomain) { - self::setDefaultTranslatorTextDomain($textDomain); - } - } - - /** - * Get default translation object for all validate objects - * - * @return Translator\TranslatorInterface|null - */ - public static function getDefaultTranslator() - { - return static::$defaultTranslator; - } - - /** - * Is there a default translation object set? - * - * @return bool - */ - public static function hasDefaultTranslator() - { - return (bool) static::$defaultTranslator; - } - - /** - * Set default translation text domain for all validate objects - * - * @param string $textDomain - * @return void - */ - public static function setDefaultTranslatorTextDomain($textDomain = 'default') - { - static::$defaultTranslatorTextDomain = $textDomain; - } - - /** - * Get default translation text domain for all validate objects - * - * @return string - */ - public static function getDefaultTranslatorTextDomain() - { - return static::$defaultTranslatorTextDomain; - } - - /** - * Indicate whether or not translation should be enabled - * - * @param bool $enabled - * @return $this - */ - public function setTranslatorEnabled($enabled = true) - { - /** @psalm-suppress RedundantCastGivenDocblockType */ - $this->abstractOptions['translatorEnabled'] = (bool) $enabled; - return $this; - } - - /** - * Is translation enabled? - * - * @return bool - */ - public function isTranslatorEnabled() - { - return $this->abstractOptions['translatorEnabled']; - } - - /** - * Returns the maximum allowed message length - * - * @return int - */ - public static function getMessageLength() - { - return static::$messageLength; - } - - /** - * Sets the maximum allowed message length - * - * @param int $length - * @return void - */ - public static function setMessageLength($length = -1) - { - static::$messageLength = $length; - } - - /** - * Translate a validation message - * - * @param string $messageKey - * @param string $message - * @return string - */ - protected function translateMessage($messageKey, $message) - { - $translator = $this->getTranslator(); - if (! $translator) { - return $message; - } - - return $translator->translate($message, $this->getTranslatorTextDomain()); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode.php b/lib/laminas/laminas-validator/src/Barcode.php deleted file mode 100644 index 7ba7589af..000000000 --- a/lib/laminas/laminas-validator/src/Barcode.php +++ /dev/null @@ -1,199 +0,0 @@ - */ - protected $messageTemplates = [ - self::FAILED => 'The input failed checksum validation', - self::INVALID_CHARS => 'The input contains invalid characters', - self::INVALID_LENGTH => 'The input should have a length of %length% characters', - self::INVALID => 'Invalid type given. String expected', - ]; - - /** - * Additional variables available for validation failure messages - * - * @var array> - */ - protected $messageVariables = [ - 'length' => ['options' => 'length'], - ]; - - /** @var array */ - protected $options = [ - 'adapter' => null, // Barcode adapter Laminas\Validator\Barcode\AbstractAdapter - 'options' => null, // Options for this adapter - 'length' => null, - 'useChecksum' => null, - ]; - - /** - * Constructor for barcodes - * - * @param array|string $options Options to use - */ - public function __construct($options = null) - { - if ($options === null) { - $options = []; - } - - if (is_array($options)) { - if (array_key_exists('options', $options)) { - $options['options'] = ['options' => $options['options']]; - } - } elseif ($options instanceof Traversable) { - if (property_exists($options, 'options')) { - $options['options'] = ['options' => $options['options']]; - } - } else { - $options = ['adapter' => $options]; - } - - parent::__construct($options); - } - - /** - * Returns the set adapter - * - * @return Barcode\AbstractAdapter - */ - public function getAdapter() - { - if (! $this->options['adapter'] instanceof Barcode\AdapterInterface) { - $this->setAdapter('Ean13'); - } - - return $this->options['adapter']; - } - - /** - * Sets a new barcode adapter - * - * @param string|Barcode\AbstractAdapter $adapter Barcode adapter to use - * @param array $options Options for this adapter - * @return $this - * @throws Exception\InvalidArgumentException - */ - public function setAdapter($adapter, $options = null) - { - if (is_string($adapter)) { - $adapter = ucfirst(strtolower($adapter)); - $adapter = 'Laminas\\Validator\\Barcode\\' . $adapter; - - if (! class_exists($adapter)) { - throw new Exception\InvalidArgumentException('Barcode adapter matching "' . $adapter . '" not found'); - } - - $adapter = new $adapter($options); - } - - if (! $adapter instanceof Barcode\AdapterInterface) { - throw new Exception\InvalidArgumentException( - sprintf( - 'Adapter %s does not implement Laminas\\Validator\\Barcode\\AdapterInterface', - is_object($adapter) ? get_class($adapter) : gettype($adapter) - ) - ); - } - - $this->options['adapter'] = $adapter; - - return $this; - } - - /** - * Returns the checksum option - * - * @return string - */ - public function getChecksum() - { - return $this->getAdapter()->getChecksum(); - } - - /** - * Sets if checksum should be validated, if no value is given the actual setting is returned - * - * @param null|bool $checksum - * @return Barcode\AbstractAdapter|bool - */ - public function useChecksum($checksum = null) - { - return $this->getAdapter()->useChecksum($checksum); - } - - /** - * Defined by Laminas\Validator\ValidatorInterface - * - * Returns true if and only if $value contains a valid barcode - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - $adapter = $this->getAdapter(); - $this->options['length'] = $adapter->getLength(); - $result = $adapter->hasValidLength($value); - if (! $result) { - if (is_array($this->options['length'])) { - $temp = $this->options['length']; - $this->options['length'] = ''; - foreach ($temp as $length) { - $this->options['length'] .= '/'; - $this->options['length'] .= $length; - } - - $this->options['length'] = substr($this->options['length'], 1); - } - - $this->error(self::INVALID_LENGTH); - return false; - } - - $result = $adapter->hasValidCharacters($value); - if (! $result) { - $this->error(self::INVALID_CHARS); - return false; - } - - if ($this->useChecksum(null)) { - $result = $adapter->hasValidChecksum($value); - if (! $result) { - $this->error(self::FAILED); - return false; - } - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/AbstractAdapter.php b/lib/laminas/laminas-validator/src/Barcode/AbstractAdapter.php deleted file mode 100644 index 56a0164d0..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/AbstractAdapter.php +++ /dev/null @@ -1,312 +0,0 @@ - null, // Allowed barcode lengths, integer, array, string - 'characters' => null, // Allowed barcode characters - 'checksum' => null, // Callback to checksum function - 'useChecksum' => true, // Is a checksum value included?, boolean - ]; - - /** - * Checks the length of a barcode - * - * @param string $value The barcode to check for proper length - * @return bool - */ - public function hasValidLength($value) - { - if (! is_string($value)) { - return false; - } - - $fixum = strlen($value); - $length = $this->getLength(); - - if (is_array($length)) { - foreach ($length as $value) { - if ($fixum === $value) { - return true; - } - - if ($value === -1) { - return true; - } - } - - return false; - } - - if ($fixum === $length) { - return true; - } - - if ($length === -1) { - return true; - } - - if ($length === 'even') { - $count = $fixum % 2; - return 0 === $count; - } - - if ($length === 'odd') { - $count = $fixum % 2; - return 1 === $count; - } - - return false; - } - - /** - * Checks for allowed characters within the barcode - * - * @param string $value The barcode to check for allowed characters - * @return bool - */ - public function hasValidCharacters($value) - { - if (! is_string($value)) { - return false; - } - - $characters = $this->getCharacters(); - if ($characters === 128) { - for ($x = 0; $x < 128; ++$x) { - $value = str_replace(chr($x), '', $value); - } - } else { - $chars = str_split($characters); - foreach ($chars as $char) { - $value = str_replace($char, '', $value); - } - } - - if (strlen($value) > 0) { - return false; - } - - return true; - } - - /** - * Validates the checksum - * - * @param string $value The barcode to check the checksum for - * @return bool - */ - public function hasValidChecksum($value) - { - $checksum = $this->getChecksum(); - if (! empty($checksum)) { - if (method_exists($this, $checksum)) { - return $this->$checksum($value); - } - } - - return false; - } - - /** - * Returns the allowed barcode length - * - * @return int|array - */ - public function getLength() - { - return $this->options['length']; - } - - /** - * Returns the allowed characters - * - * @return int|string|array - */ - public function getCharacters() - { - return $this->options['characters']; - } - - /** - * Returns the checksum function name - * - * @return string - */ - public function getChecksum() - { - return $this->options['checksum']; - } - - /** - * Sets the checksum validation method - * - * @param callable $checksum Checksum method to call - * @return $this - */ - protected function setChecksum($checksum) - { - $this->options['checksum'] = $checksum; - return $this; - } - - /** - * Sets the checksum validation, if no value is given, the actual setting is returned - * - * @param bool $check - * @return AbstractAdapter|bool - */ - public function useChecksum($check = null) - { - if ($check === null) { - return $this->options['useChecksum']; - } - - $this->options['useChecksum'] = (bool) $check; - return $this; - } - - /** - * Sets the length of this barcode - * - * @param int|array $length - * @return $this - */ - protected function setLength($length) - { - $this->options['length'] = $length; - return $this; - } - - /** - * Sets the allowed characters of this barcode - * - * @param int $characters - * @return $this - */ - protected function setCharacters($characters) - { - $this->options['characters'] = $characters; - return $this; - } - - /** - * Validates the checksum (Modulo 10) - * GTIN implementation factor 3 - * - * @param string $value The barcode to validate - * @return bool - */ - protected function gtin($value) - { - $barcode = substr($value, 0, -1); - $sum = 0; - $length = strlen($barcode) - 1; - - for ($i = 0; $i <= $length; $i++) { - if (($i % 2) === 0) { - $sum += $barcode[$length - $i] * 3; - } else { - $sum += $barcode[$length - $i]; - } - } - - $calc = $sum % 10; - $checksum = $calc === 0 ? 0 : 10 - $calc; - - return $value[$length + 1] === (string) $checksum; - } - - /** - * Validates the checksum (Modulo 10) - * IDENTCODE implementation factors 9 and 4 - * - * @param string $value The barcode to validate - * @return bool - */ - protected function identcode($value) - { - $barcode = substr($value, 0, -1); - $sum = 0; - $length = strlen($value) - 2; - - for ($i = 0; $i <= $length; $i++) { - if (($i % 2) === 0) { - $sum += $barcode[$length - $i] * 4; - } else { - $sum += $barcode[$length - $i] * 9; - } - } - - $calc = $sum % 10; - $checksum = $calc === 0 ? 0 : 10 - $calc; - - return $value[$length + 1] === (string) $checksum; - } - - /** - * Validates the checksum (Modulo 10) - * CODE25 implementation factor 3 - * - * @param string $value The barcode to validate - * @return bool - */ - protected function code25($value) - { - $barcode = substr($value, 0, -1); - $sum = 0; - $length = strlen($barcode) - 1; - - for ($i = 0; $i <= $length; $i++) { - if (($i % 2) === 0) { - $sum += $barcode[$i] * 3; - } else { - $sum += $barcode[$i]; - } - } - - $calc = $sum % 10; - $checksum = $calc === 0 ? 0 : 10 - $calc; - - return $value[$length + 1] === (string) $checksum; - } - - /** - * Validates the checksum () - * POSTNET implementation - * - * @param string $value The barcode to validate - * @return bool - */ - protected function postnet($value) - { - $checksum = substr($value, -1, 1); - $values = str_split(substr($value, 0, -1)); - - $check = 0; - foreach ($values as $row) { - $check += $row; - } - - $check %= 10; - $check = 10 - $check; - - return (string) $check === $checksum; - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/AdapterInterface.php b/lib/laminas/laminas-validator/src/Barcode/AdapterInterface.php deleted file mode 100644 index 5ccab6103..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/AdapterInterface.php +++ /dev/null @@ -1,59 +0,0 @@ -setLength(-1); - $this->setCharacters('0123456789-$:/.+ABCDTN*E'); - $this->useChecksum(false); - } - - /** - * Checks for allowed characters - * - * @see Laminas\Validator\Barcode.AbstractAdapter::checkChars() - * - * @param string $value - * @return bool - */ - public function hasValidCharacters($value) - { - if (strpbrk($value, 'ABCD')) { - $first = $value[0]; - if (! strpbrk($first, 'ABCD')) { - // Missing start char - return false; - } - - $last = substr($value, -1, 1); - if (! strpbrk($last, 'ABCD')) { - // Missing stop char - return false; - } - - $value = substr($value, 1, -1); - } elseif (strpbrk($value, 'TN*E')) { - $first = $value[0]; - if (! strpbrk($first, 'TN*E')) { - // Missing start char - return false; - } - - $last = substr($value, -1, 1); - if (! strpbrk($last, 'TN*E')) { - // Missing stop char - return false; - } - - $value = substr($value, 1, -1); - } - - $chars = $this->getCharacters(); - $this->setCharacters('0123456789-$:/.+'); - $result = parent::hasValidCharacters($value); - $this->setCharacters($chars); - return $result; - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Code128.php b/lib/laminas/laminas-validator/src/Barcode/Code128.php deleted file mode 100644 index 44d7a537f..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Code128.php +++ /dev/null @@ -1,739 +0,0 @@ -setLength(-1); - $this->setCharacters([ - 'A' => [ - 0 => ' ', - 1 => '!', - 2 => '"', - 3 => '#', - 4 => '$', - 5 => '%', - 6 => '&', - 7 => "'", - 8 => '(', - 9 => ')', - 10 => '*', - 11 => '+', - 12 => ',', - 13 => '-', - 14 => '.', - 15 => '/', - 16 => '0', - 17 => '1', - 18 => '2', - 19 => '3', - 20 => '4', - 21 => '5', - 22 => '6', - 23 => '7', - 24 => '8', - 25 => '9', - 26 => ':', - 27 => ';', - 28 => '<', - 29 => '=', - 30 => '>', - 31 => '?', - 32 => '@', - 33 => 'A', - 34 => 'B', - 35 => 'C', - 36 => 'D', - 37 => 'E', - 38 => 'F', - 39 => 'G', - 40 => 'H', - 41 => 'I', - 42 => 'J', - 43 => 'K', - 44 => 'L', - 45 => 'M', - 46 => 'N', - 47 => 'O', - 48 => 'P', - 49 => 'Q', - 50 => 'R', - 51 => 'S', - 52 => 'T', - 53 => 'U', - 54 => 'V', - 55 => 'W', - 56 => 'X', - 57 => 'Y', - 58 => 'Z', - 59 => '[', - 60 => '\\', - 61 => ']', - 62 => '^', - 63 => '_', - 64 => 0x00, - 65 => 0x01, - 66 => 0x02, - 67 => 0x03, - 68 => 0x04, - 69 => 0x05, - 70 => 0x06, - 71 => 0x07, - 72 => 0x08, - 73 => 0x09, - 74 => 0x0A, - 75 => 0x0B, - 76 => 0x0C, - 77 => 0x0D, - 78 => 0x0E, - 79 => 0x0F, - 80 => 0x10, - 81 => 0x11, - 82 => 0x12, - 83 => 0x13, - 84 => 0x14, - 85 => 0x15, - 86 => 0x16, - 87 => 0x17, - 88 => 0x18, - 89 => 0x19, - 90 => 0x1A, - 91 => 0x1B, - 92 => 0x1C, - 93 => 0x1D, - 94 => 0x1E, - 95 => 0x1F, - 96 => 'Ç', - 97 => 'ü', - 98 => 'é', - 99 => 'â', - 100 => 'ä', - 101 => 'à', - 102 => 'å', - 103 => '‡', - 104 => 'ˆ', - 105 => '‰', - 106 => 'Š', - ], - 'B' => [ - 0 => ' ', - 1 => '!', - 2 => '"', - 3 => '#', - 4 => '$', - 5 => '%', - 6 => '&', - 7 => "'", - 8 => '(', - 9 => ')', - 10 => '*', - 11 => '+', - 12 => ',', - 13 => '-', - 14 => '.', - 15 => '/', - 16 => '0', - 17 => '1', - 18 => '2', - 19 => '3', - 20 => '4', - 21 => '5', - 22 => '6', - 23 => '7', - 24 => '8', - 25 => '9', - 26 => ':', - 27 => ';', - 28 => '<', - 29 => '=', - 30 => '>', - 31 => '?', - 32 => '@', - 33 => 'A', - 34 => 'B', - 35 => 'C', - 36 => 'D', - 37 => 'E', - 38 => 'F', - 39 => 'G', - 40 => 'H', - 41 => 'I', - 42 => 'J', - 43 => 'K', - 44 => 'L', - 45 => 'M', - 46 => 'N', - 47 => 'O', - 48 => 'P', - 49 => 'Q', - 50 => 'R', - 51 => 'S', - 52 => 'T', - 53 => 'U', - 54 => 'V', - 55 => 'W', - 56 => 'X', - 57 => 'Y', - 58 => 'Z', - 59 => '[', - 60 => '\\', - 61 => ']', - 62 => '^', - 63 => '_', - 64 => '`', - 65 => 'a', - 66 => 'b', - 67 => 'c', - 68 => 'd', - 69 => 'e', - 70 => 'f', - 71 => 'g', - 72 => 'h', - 73 => 'i', - 74 => 'j', - 75 => 'k', - 76 => 'l', - 77 => 'm', - 78 => 'n', - 79 => 'o', - 80 => 'p', - 81 => 'q', - 82 => 'r', - 83 => 's', - 84 => 't', - 85 => 'u', - 86 => 'v', - 87 => 'w', - 88 => 'x', - 89 => 'y', - 90 => 'z', - 91 => '{', - 92 => '|', - 93 => '}', - 94 => '~', - 95 => 0x7F, - 96 => 'Ç', - 97 => 'ü', - 98 => 'é', - 99 => 'â', - 100 => 'ä', - 101 => 'à', - 102 => 'å', - 103 => '‡', - 104 => 'ˆ', - 105 => '‰', - 106 => 'Š', - ], - 'C' => [ - 0 => '00', - 1 => '01', - 2 => '02', - 3 => '03', - 4 => '04', - 5 => '05', - 6 => '06', - 7 => '07', - 8 => '08', - 9 => '09', - 10 => '10', - 11 => '11', - 12 => '12', - 13 => '13', - 14 => '14', - 15 => '15', - 16 => '16', - 17 => '17', - 18 => '18', - 19 => '19', - 20 => '20', - 21 => '21', - 22 => '22', - 23 => '23', - 24 => '24', - 25 => '25', - 26 => '26', - 27 => '27', - 28 => '28', - 29 => '29', - 30 => '30', - 31 => '31', - 32 => '32', - 33 => '33', - 34 => '34', - 35 => '35', - 36 => '36', - 37 => '37', - 38 => '38', - 39 => '39', - 40 => '40', - 41 => '41', - 42 => '42', - 43 => '43', - 44 => '44', - 45 => '45', - 46 => '46', - 47 => '47', - 48 => '48', - 49 => '49', - 50 => '50', - 51 => '51', - 52 => '52', - 53 => '53', - 54 => '54', - 55 => '55', - 56 => '56', - 57 => '57', - 58 => '58', - 59 => '59', - 60 => '60', - 61 => '61', - 62 => '62', - 63 => '63', - 64 => '64', - 65 => '65', - 66 => '66', - 67 => '67', - 68 => '68', - 69 => '69', - 70 => '70', - 71 => '71', - 72 => '72', - 73 => '73', - 74 => '74', - 75 => '75', - 76 => '76', - 77 => '77', - 78 => '78', - 79 => '79', - 80 => '80', - 81 => '81', - 82 => '82', - 83 => '83', - 84 => '84', - 85 => '85', - 86 => '86', - 87 => '87', - 88 => '88', - 89 => '89', - 90 => '90', - 91 => '91', - 92 => '92', - 93 => '93', - 94 => '94', - 95 => '95', - 96 => '96', - 97 => '97', - 98 => '98', - 99 => '99', - 100 => 'ä', - 101 => 'à', - 102 => 'å', - 103 => '‡', - 104 => 'ˆ', - 105 => '‰', - 106 => 'Š', - ], - ]); - $this->setChecksum('code128'); - } - - /** - * @return void - */ - public function setUtf8StringWrapper(StringWrapperInterface $utf8StringWrapper) - { - if (! $utf8StringWrapper->isSupported('UTF-8')) { - throw new Exception\InvalidArgumentException( - 'The string wrapper needs to support UTF-8 character encoding' - ); - } - $this->utf8StringWrapper = $utf8StringWrapper; - } - - /** - * Get the string wrapper supporting UTF-8 character encoding - * - * @return StringWrapperInterface - */ - public function getUtf8StringWrapper() - { - if (! $this->utf8StringWrapper) { - $this->utf8StringWrapper = StringUtils::getWrapper('UTF-8'); - } - return $this->utf8StringWrapper; - } - - /** - * Checks for allowed characters within the barcode - * - * @param string $value The barcode to check for allowed characters - * @return bool - */ - public function hasValidCharacters($value) - { - if (! is_string($value)) { - return false; - } - - // get used string wrapper for UTF-8 character encoding - $strWrapper = $this->getUtf8StringWrapper(); - - // detect starting charset - $set = $this->getCodingSet($value); - $read = $set; - if ($set !== '') { - $value = $strWrapper->substr($value, 1, null); - } - - // process barcode - while ($value !== '' && $value !== false) { - $char = $strWrapper->substr($value, 0, 1); - - switch ($char) { - // Function definition - case 'Ç': - case 'ü': - case 'å': - break; - - // Switch 1 char between A and B - case 'é': - if ($set === 'A') { - $read = 'B'; - break; - } - - if ($set === 'B') { - $read = 'A'; - break; - } - - break; - - // Switch to C - case 'â': - $set = 'C'; - $read = 'C'; - break; - - // Switch to B - case 'ä': - $set = 'B'; - $read = 'B'; - break; - - // Switch to A - case 'à': - $set = 'A'; - $read = 'A'; - break; - - // Doubled start character - case '‡': - case 'ˆ': - case '‰': - return false; - - // Chars after the stop character - case 'Š': - break 2; - - default: - // Does the char exist within the charset to read? - if ($this->ord128($char, $read) === -1) { - return false; - } - - break; - } - - $value = $strWrapper->substr($value, 1, null); - $read = $set; - } - - if ($value !== '' && is_string($value) && $strWrapper->strlen($value) !== 1) { - return false; - } - - return true; - } - - /** - * Validates the checksum () - * - * @param string $value The barcode to validate - * @return bool - */ - protected function code128($value) - { - $sum = 0; - $pos = 1; - $set = $this->getCodingSet($value); - $read = $set; - $usecheck = $this->useChecksum(null); - $strWrapper = $this->getUtf8StringWrapper(); - $char = $strWrapper->substr($value, 0, 1); - if ($char === '‡') { - $sum = 103; - } elseif ($char === 'ˆ') { - $sum = 104; - } elseif ($char === '‰') { - $sum = 105; - } elseif ($usecheck === true) { - // no start value, unable to detect a proper checksum - return false; - } - - $value = $strWrapper->substr($value, 1, null); - while ($strWrapper->strpos($value, 'Š') || ($value !== '')) { - $char = $strWrapper->substr($value, 0, 1); - if ($read === 'C') { - $char = $strWrapper->substr($value, 0, 2); - } - - switch ($char) { - // Function definition - case 'Ç': - case 'ü': - case 'å': - $sum += $pos * $this->ord128($char, $set); - break; - - case 'é': - $sum += $pos * $this->ord128($char, $set); - - if ($set === 'A') { - $read = 'B'; - break; - } - - if ($set === 'B') { - $read = 'A'; - break; - } - - break; - - // Switch to C - case 'â': - $sum += $pos * $this->ord128($char, $set); - $set = 'C'; - $read = 'C'; - break; - - // Switch to B - case 'ä': - $sum += $pos * $this->ord128($char, $set); - $set = 'B'; - $read = 'B'; - break; - - // Switch to A - case 'à': - $sum += $pos * $this->ord128($char, $set); - $set = 'A'; - $read = 'A'; - break; - - case '‡': - case 'ˆ': - case '‰': - return false; - - default: - // Does the char exist within the charset to read? - if ($this->ord128($char, $read) === -1) { - return false; - } - - $sum += $pos * $this->ord128($char, $set); - break; - } - - $value = $strWrapper->substr($value, 1); - ++$pos; - if (($strWrapper->strpos($value, 'Š') === 1) && ($strWrapper->strlen($value) === 2)) { - // break by stop and checksum char - break; - } - $read = $set; - } - - if (($strWrapper->strpos($value, 'Š') !== 1) || ($strWrapper->strlen($value) !== 2)) { - // return false if checksum is not readable and true if no startvalue is detected - return ! $usecheck; - } - - $mod = $sum % 103; - if ($strWrapper->substr($value, 0, 1) === $this->chr128($mod, $set)) { - return true; - } - - return false; - } - - /** - * Returns the coding set for a barcode - * - * @param string $value Barcode - * @return string - */ - protected function getCodingSet($value) - { - $value = $this->getUtf8StringWrapper()->substr($value, 0, 1); - switch ($value) { - case '‡': - return 'A'; - - case 'ˆ': - return 'B'; - - case '‰': - return 'C'; - } - - return ''; - } - - /** - * Internal method to return the code128 integer from an ascii value - * - * Table A - * ASCII CODE128 - * 32 to 95 == 0 to 63 - * 0 to 31 == 64 to 95 - * 128 to 138 == 96 to 106 - * - * Table B - * ASCII CODE128 - * 32 to 138 == 0 to 106 - * - * Table C - * ASCII CODE128 - * "00" to "99" == 0 to 99 - * 132 to 138 == 100 to 106 - * - * @param string $value - * @param string $set - * @return int - */ - protected function ord128($value, $set) - { - $ord = ord($value); - if ($set === 'A') { - if ($ord < 32) { - return $ord + 64; - } elseif ($ord < 96) { - return $ord - 32; - } elseif ($ord > 138) { - return -1; - } else { - return $ord - 32; - } - } elseif ($set === 'B') { - if ($ord < 32) { - return -1; - } elseif ($ord <= 138) { - return $ord - 32; - } else { - return -1; - } - } elseif ($set === 'C') { - $val = (int) $value; - if (($val >= 0) && ($val <= 99)) { - return $val; - } elseif (($ord >= 132) && ($ord <= 138)) { - return $ord - 32; - } else { - return -1; - } - } else { - if ($ord < 32) { - return $ord + 64; - } elseif ($ord <= 138) { - return $ord - 32; - } else { - return -1; - } - } - } - - /** - * Internal Method to return the ascii value from a code128 integer - * - * Table A - * ASCII CODE128 - * 32 to 95 == 0 to 63 - * 0 to 31 == 64 to 95 - * 128 to 138 == 96 to 106 - * - * Table B - * ASCII CODE128 - * 32 to 138 == 0 to 106 - * - * Table C - * ASCII CODE128 - * "00" to "99" == 0 to 99 - * 132 to 138 == 100 to 106 - * - * @param int $value - * @param string $set - * @return int|string - */ - protected function chr128($value, $set) - { - if ($set === 'A') { - if ($value < 64) { - return chr($value + 32); - } elseif ($value < 96) { - return chr($value - 64); - } elseif ($value > 106) { - return -1; - } else { - return chr($value + 32); - } - } elseif ($set === 'B') { - if ($value > 106) { - return -1; - } else { - return chr($value + 32); - } - } elseif ($set === 'C') { - if (($value >= 0) && ($value <= 9)) { - return '0' . (string) $value; - } elseif ($value <= 99) { - return (string) $value; - } elseif ($value <= 106) { - return chr($value + 32); - } else { - return -1; - } - } else { - if ($value <= 106) { - return $value + 32; - } else { - return -1; - } - } - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Code25.php b/lib/laminas/laminas-validator/src/Barcode/Code25.php deleted file mode 100644 index 7134eb7cd..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Code25.php +++ /dev/null @@ -1,17 +0,0 @@ -setLength(-1); - $this->setCharacters('0123456789'); - $this->setChecksum('code25'); - $this->useChecksum(false); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Code25interleaved.php b/lib/laminas/laminas-validator/src/Barcode/Code25interleaved.php deleted file mode 100644 index cce21b20e..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Code25interleaved.php +++ /dev/null @@ -1,19 +0,0 @@ -setLength('even'); - $this->setCharacters('0123456789'); - $this->setChecksum('code25'); - $this->useChecksum(false); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Code39.php b/lib/laminas/laminas-validator/src/Barcode/Code39.php deleted file mode 100644 index 4b101191c..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Code39.php +++ /dev/null @@ -1,90 +0,0 @@ - 0, - '1' => 1, - '2' => 2, - '3' => 3, - '4' => 4, - '5' => 5, - '6' => 6, - '7' => 7, - '8' => 8, - '9' => 9, - 'A' => 10, - 'B' => 11, - 'C' => 12, - 'D' => 13, - 'E' => 14, - 'F' => 15, - 'G' => 16, - 'H' => 17, - 'I' => 18, - 'J' => 19, - 'K' => 20, - 'L' => 21, - 'M' => 22, - 'N' => 23, - 'O' => 24, - 'P' => 25, - 'Q' => 26, - 'R' => 27, - 'S' => 28, - 'T' => 29, - 'U' => 30, - 'V' => 31, - 'W' => 32, - 'X' => 33, - 'Y' => 34, - 'Z' => 35, - '-' => 36, - '.' => 37, - ' ' => 38, - '$' => 39, - '/' => 40, - '+' => 41, - '%' => 42, - ]; - - /** - * Constructor for this barcode adapter - */ - public function __construct() - { - $this->setLength(-1); - $this->setCharacters('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ -.$/+%'); - $this->setChecksum('code39'); - $this->useChecksum(false); - } - - /** - * Validates the checksum (Modulo 43) - * - * @param string $value The barcode to validate - * @return bool - */ - protected function code39($value) - { - $checksum = substr($value, -1, 1); - $value = str_split(substr($value, 0, -1)); - $count = 0; - foreach ($value as $char) { - $count += $this->check[$char]; - } - - $mod = $count % 43; - if ($mod === $this->check[$checksum]) { - return true; - } - - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Code39ext.php b/lib/laminas/laminas-validator/src/Barcode/Code39ext.php deleted file mode 100644 index d23123c0a..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Code39ext.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(-1); - $this->setCharacters(128); - $this->useChecksum(false); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Code93.php b/lib/laminas/laminas-validator/src/Barcode/Code93.php deleted file mode 100644 index 92905ec17..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Code93.php +++ /dev/null @@ -1,119 +0,0 @@ - 0, - '1' => 1, - '2' => 2, - '3' => 3, - '4' => 4, - '5' => 5, - '6' => 6, - '7' => 7, - '8' => 8, - '9' => 9, - 'A' => 10, - 'B' => 11, - 'C' => 12, - 'D' => 13, - 'E' => 14, - 'F' => 15, - 'G' => 16, - 'H' => 17, - 'I' => 18, - 'J' => 19, - 'K' => 20, - 'L' => 21, - 'M' => 22, - 'N' => 23, - 'O' => 24, - 'P' => 25, - 'Q' => 26, - 'R' => 27, - 'S' => 28, - 'T' => 29, - 'U' => 30, - 'V' => 31, - 'W' => 32, - 'X' => 33, - 'Y' => 34, - 'Z' => 35, - '-' => 36, - '.' => 37, - ' ' => 38, - '$' => 39, - '/' => 40, - '+' => 41, - '%' => 42, - '!' => 43, - '"' => 44, - '§' => 45, - '&' => 46, - ]; - - /** - * Constructor for this barcode adapter - */ - public function __construct() - { - $this->setLength(-1); - $this->setCharacters('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ -.$/+%'); - $this->setChecksum('code93'); - $this->useChecksum(false); - } - - /** - * Validates the checksum (Modulo CK) - * - * @param string $value The barcode to validate - * @return bool - */ - protected function code93($value) - { - $checksum = substr($value, -2, 2); - $value = str_split(substr($value, 0, -2)); - $count = 0; - $length = count($value) % 20; - foreach ($value as $char) { - if ($length === 0) { - $length = 20; - } - - $count += $this->check[$char] * $length; - --$length; - } - - $check = array_search($count % 47, $this->check); - $value[] = $check; - $count = 0; - $length = count($value) % 15; - foreach ($value as $char) { - if ($length === 0) { - $length = 15; - } - - $count += $this->check[$char] * $length; - --$length; - } - $check .= array_search($count % 47, $this->check); - - if ($check === $checksum) { - return true; - } - - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Code93ext.php b/lib/laminas/laminas-validator/src/Barcode/Code93ext.php deleted file mode 100644 index 216d72285..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Code93ext.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(-1); - $this->setCharacters(128); - $this->useChecksum(false); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Ean12.php b/lib/laminas/laminas-validator/src/Barcode/Ean12.php deleted file mode 100644 index 82be6c5a5..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Ean12.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(12); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Ean13.php b/lib/laminas/laminas-validator/src/Barcode/Ean13.php deleted file mode 100644 index 261a687fd..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Ean13.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(13); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Ean14.php b/lib/laminas/laminas-validator/src/Barcode/Ean14.php deleted file mode 100644 index 9be798b08..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Ean14.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(14); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Ean18.php b/lib/laminas/laminas-validator/src/Barcode/Ean18.php deleted file mode 100644 index f2c32204e..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Ean18.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(18); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Ean2.php b/lib/laminas/laminas-validator/src/Barcode/Ean2.php deleted file mode 100644 index a49ea9b9a..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Ean2.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(2); - $this->setCharacters('0123456789'); - $this->useChecksum(false); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Ean5.php b/lib/laminas/laminas-validator/src/Barcode/Ean5.php deleted file mode 100644 index 0433c80a2..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Ean5.php +++ /dev/null @@ -1,18 +0,0 @@ -setLength(5); - $this->setCharacters('0123456789'); - $this->useChecksum(false); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Ean8.php b/lib/laminas/laminas-validator/src/Barcode/Ean8.php deleted file mode 100644 index 7f1399a46..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Ean8.php +++ /dev/null @@ -1,35 +0,0 @@ -setLength([7, 8]); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } - - /** - * Overrides parent checkLength - * - * @param string $value Value - * @return bool - */ - public function hasValidLength($value) - { - if (strlen($value) === 7) { - $this->useChecksum(false); - } else { - $this->useChecksum(true); - } - - return parent::hasValidLength($value); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Gtin12.php b/lib/laminas/laminas-validator/src/Barcode/Gtin12.php deleted file mode 100644 index f667d1f50..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Gtin12.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(12); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Gtin13.php b/lib/laminas/laminas-validator/src/Barcode/Gtin13.php deleted file mode 100644 index 4f02651ec..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Gtin13.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(13); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Gtin14.php b/lib/laminas/laminas-validator/src/Barcode/Gtin14.php deleted file mode 100644 index 2ec6624ce..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Gtin14.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(14); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Identcode.php b/lib/laminas/laminas-validator/src/Barcode/Identcode.php deleted file mode 100644 index a0c4cf63a..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Identcode.php +++ /dev/null @@ -1,37 +0,0 @@ -setLength(12); - $this->setCharacters('0123456789'); - $this->setChecksum('identcode'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Intelligentmail.php b/lib/laminas/laminas-validator/src/Barcode/Intelligentmail.php deleted file mode 100644 index d34569f1b..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Intelligentmail.php +++ /dev/null @@ -1,18 +0,0 @@ -setLength([20, 25, 29, 31]); - $this->setCharacters('0123456789'); - $this->useChecksum(false); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Issn.php b/lib/laminas/laminas-validator/src/Barcode/Issn.php deleted file mode 100644 index 73a0fcc3f..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Issn.php +++ /dev/null @@ -1,91 +0,0 @@ -setLength([8, 13]); - $this->setCharacters('0123456789X'); - $this->setChecksum('gtin'); - } - - /** - * Allows X on length of 8 chars - * - * @param string $value The barcode to check for allowed characters - * @return bool - */ - public function hasValidCharacters($value) - { - if (strlen($value) !== 8) { - if (strpos($value, 'X') !== false) { - return false; - } - } - - return parent::hasValidCharacters($value); - } - - /** - * Validates the checksum - * - * @param string $value The barcode to check the checksum for - * @return bool - */ - public function hasValidChecksum($value) - { - if (strlen($value) === 8) { - $this->setChecksum('issn'); - } else { - $this->setChecksum('gtin'); - } - - return parent::hasValidChecksum($value); - } - - /** - * Validates the checksum () - * ISSN implementation (reversed mod11) - * - * @param string $value The barcode to validate - * @return bool - */ - protected function issn($value) - { - $checksum = substr($value, -1, 1); - $values = str_split(substr($value, 0, -1)); - $check = 0; - $multi = 8; - foreach ($values as $token) { - if ($token === 'X') { - $token = 10; - } - - $check += $token * $multi; - --$multi; - } - - $check %= 11; - $check = $check === 0 ? 0 : 11 - $check; - - if ((string) $check === $checksum) { - return true; - } - - if (($check === 10) && ($checksum === 'X')) { - return true; - } - - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Itf14.php b/lib/laminas/laminas-validator/src/Barcode/Itf14.php deleted file mode 100644 index c8683ff19..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Itf14.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(14); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Leitcode.php b/lib/laminas/laminas-validator/src/Barcode/Leitcode.php deleted file mode 100644 index c4a0dc107..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Leitcode.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(14); - $this->setCharacters('0123456789'); - $this->setChecksum('identcode'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Planet.php b/lib/laminas/laminas-validator/src/Barcode/Planet.php deleted file mode 100644 index e966065b9..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Planet.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength([12, 14]); - $this->setCharacters('0123456789'); - $this->setChecksum('postnet'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Postnet.php b/lib/laminas/laminas-validator/src/Barcode/Postnet.php deleted file mode 100644 index f3261e138..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Postnet.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength([6, 7, 10, 12]); - $this->setCharacters('0123456789'); - $this->setChecksum('postnet'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Royalmail.php b/lib/laminas/laminas-validator/src/Barcode/Royalmail.php deleted file mode 100644 index 9c3d306ef..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Royalmail.php +++ /dev/null @@ -1,156 +0,0 @@ - */ - protected $rows = [ - '0' => 1, - '1' => 1, - '2' => 1, - '3' => 1, - '4' => 1, - '5' => 1, - '6' => 2, - '7' => 2, - '8' => 2, - '9' => 2, - 'A' => 2, - 'B' => 2, - 'C' => 3, - 'D' => 3, - 'E' => 3, - 'F' => 3, - 'G' => 3, - 'H' => 3, - 'I' => 4, - 'J' => 4, - 'K' => 4, - 'L' => 4, - 'M' => 4, - 'N' => 4, - 'O' => 5, - 'P' => 5, - 'Q' => 5, - 'R' => 5, - 'S' => 5, - 'T' => 5, - 'U' => 0, - 'V' => 0, - 'W' => 0, - 'X' => 0, - 'Y' => 0, - 'Z' => 0, - ]; - - /** @var array */ - protected $columns = [ - '0' => 1, - '1' => 2, - '2' => 3, - '3' => 4, - '4' => 5, - '5' => 0, - '6' => 1, - '7' => 2, - '8' => 3, - '9' => 4, - 'A' => 5, - 'B' => 0, - 'C' => 1, - 'D' => 2, - 'E' => 3, - 'F' => 4, - 'G' => 5, - 'H' => 0, - 'I' => 1, - 'J' => 2, - 'K' => 3, - 'L' => 4, - 'M' => 5, - 'N' => 0, - 'O' => 1, - 'P' => 2, - 'Q' => 3, - 'R' => 4, - 'S' => 5, - 'T' => 0, - 'U' => 1, - 'V' => 2, - 'W' => 3, - 'X' => 4, - 'Y' => 5, - 'Z' => 0, - ]; - - /** - * Constructor for this barcode adapter - */ - public function __construct() - { - $this->setLength(-1); - $this->setCharacters('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'); - $this->setChecksum('royalmail'); - } - - /** - * Validates the checksum () - * - * @param string $value The barcode to validate - * @return bool - */ - protected function royalmail($value) - { - $checksum = substr($value, -1, 1); - $values = str_split(substr($value, 0, -1)); - $rowvalue = 0; - $colvalue = 0; - foreach ($values as $row) { - $rowvalue += $this->rows[$row]; - $colvalue += $this->columns[$row]; - } - - $rowvalue %= 6; - $colvalue %= 6; - - $rowchkvalue = array_keys($this->rows, $rowvalue); - $colchkvalue = array_keys($this->columns, $colvalue); - $intersect = array_intersect($rowchkvalue, $colchkvalue); - $chkvalue = (string) current($intersect); - - if ($chkvalue === $checksum) { - return true; - } - - return false; - } - - /** - * Allows start and stop tag within checked chars - * - * @param string $value The barcode to check for allowed characters - * @return bool - */ - public function hasValidCharacters($value) - { - if ($value[0] === '(') { - $value = substr($value, 1); - - if ($value[strlen($value) - 1] === ')') { - $value = substr($value, 0, -1); - } else { - return false; - } - } - - return parent::hasValidCharacters($value); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Sscc.php b/lib/laminas/laminas-validator/src/Barcode/Sscc.php deleted file mode 100644 index 44f804233..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Sscc.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(18); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Upca.php b/lib/laminas/laminas-validator/src/Barcode/Upca.php deleted file mode 100644 index d5d804177..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Upca.php +++ /dev/null @@ -1,16 +0,0 @@ -setLength(12); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } -} diff --git a/lib/laminas/laminas-validator/src/Barcode/Upce.php b/lib/laminas/laminas-validator/src/Barcode/Upce.php deleted file mode 100644 index 3532b42c6..000000000 --- a/lib/laminas/laminas-validator/src/Barcode/Upce.php +++ /dev/null @@ -1,35 +0,0 @@ -setLength([6, 7, 8]); - $this->setCharacters('0123456789'); - $this->setChecksum('gtin'); - } - - /** - * Overrides parent checkLength - * - * @param string $value Value - * @return bool - */ - public function hasValidLength($value) - { - if (strlen($value) !== 8) { - $this->useChecksum(false); - } else { - $this->useChecksum(true); - } - - return parent::hasValidLength($value); - } -} diff --git a/lib/laminas/laminas-validator/src/Between.php b/lib/laminas/laminas-validator/src/Between.php deleted file mode 100644 index 8a34f4ae6..000000000 --- a/lib/laminas/laminas-validator/src/Between.php +++ /dev/null @@ -1,217 +0,0 @@ - - */ - protected $messageTemplates = [ - self::NOT_BETWEEN => "The input is not between '%min%' and '%max%', inclusively", - self::NOT_BETWEEN_STRICT => "The input is not strictly between '%min%' and '%max%'", - self::VALUE_NOT_NUMERIC => "The min ('%min%') and max ('%max%') values are numeric, but the input is not", - self::VALUE_NOT_STRING => "The min ('%min%') and max ('%max%') values are non-numeric strings, " - . 'but the input is not a string', - ]; - - /** - * Additional variables available for validation failure messages - * - * @var array - */ - protected $messageVariables = [ - 'min' => ['options' => 'min'], - 'max' => ['options' => 'max'], - ]; - - /** - * Options for the between validator - * - * @var array - */ - protected $options = [ - 'inclusive' => true, // Whether to do inclusive comparisons, allowing equivalence to min and/or max - 'min' => 0, - 'max' => PHP_INT_MAX, - ]; - - /** - * Sets validator options - * Accepts the following option keys: - * 'min' => scalar, minimum border - * 'max' => scalar, maximum border - * 'inclusive' => boolean, inclusive border values - * - * @param array|Traversable $options - * @throws Exception\InvalidArgumentException - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - if (! is_array($options)) { - $temp = []; - /** @psalm-var array $options */ - $options = func_get_args(); - $temp['min'] = array_shift($options); - if (! empty($options)) { - $temp['max'] = array_shift($options); - } - - if (! empty($options)) { - $temp['inclusive'] = array_shift($options); - } - - $options = $temp; - } - - if (! array_key_exists('min', $options) || ! array_key_exists('max', $options)) { - throw new Exception\InvalidArgumentException("Missing option: 'min' and 'max' have to be given"); - } - - if ( - (isset($options['min']) && is_numeric($options['min'])) - && (isset($options['max']) && is_numeric($options['max'])) - ) { - $this->numeric = true; - } elseif ( - (isset($options['min']) && is_string($options['min'])) - && (isset($options['max']) && is_string($options['max'])) - ) { - $this->numeric = false; - } else { - throw new Exception\InvalidArgumentException( - "Invalid options: 'min' and 'max' should be of the same scalar type" - ); - } - - parent::__construct($options); - } - - /** - * Returns the min option - * - * @return mixed - */ - public function getMin() - { - return $this->options['min']; - } - - /** - * Sets the min option - * - * @param mixed $min - * @return $this Provides a fluent interface - */ - public function setMin($min) - { - $this->options['min'] = $min; - return $this; - } - - /** - * Returns the max option - * - * @return mixed - */ - public function getMax() - { - return $this->options['max']; - } - - /** - * Sets the max option - * - * @param mixed $max - * @return $this Provides a fluent interface - */ - public function setMax($max) - { - $this->options['max'] = $max; - return $this; - } - - /** - * Returns the inclusive option - * - * @return bool - */ - public function getInclusive() - { - return $this->options['inclusive']; - } - - /** - * Sets the inclusive option - * - * @param bool $inclusive - * @return $this Provides a fluent interface - */ - public function setInclusive($inclusive) - { - $this->options['inclusive'] = $inclusive; - return $this; - } - - /** - * Returns true if and only if $value is between min and max options, inclusively - * if inclusive option is true. - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - $this->setValue($value); - - if ($this->numeric && ! is_numeric($value)) { - $this->error(self::VALUE_NOT_NUMERIC); - return false; - } - if (! $this->numeric && ! is_string($value)) { - $this->error(self::VALUE_NOT_STRING); - return false; - } - - if ($this->getInclusive()) { - if ($this->getMin() > $value || $value > $this->getMax()) { - $this->error(self::NOT_BETWEEN); - return false; - } - } else { - if ($this->getMin() >= $value || $value >= $this->getMax()) { - $this->error(self::NOT_BETWEEN_STRICT); - return false; - } - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Bitwise.php b/lib/laminas/laminas-validator/src/Bitwise.php deleted file mode 100644 index d718a020f..000000000 --- a/lib/laminas/laminas-validator/src/Bitwise.php +++ /dev/null @@ -1,203 +0,0 @@ - - */ - protected $messageTemplates = [ - self::NOT_AND => "The input has no common bit set with '%control%'", - self::NOT_AND_STRICT => "The input doesn't have the same bits set as '%control%'", - self::NOT_XOR => "The input has common bit set with '%control%'", - self::NO_OP => "No operator was present to compare '%control%' against", - ]; - - /** - * Additional variables available for validation failure messages - * - * @var array - */ - protected $messageVariables = [ - 'control' => 'control', - ]; - - /** @var null|int */ - protected $operator; - - /** @var bool */ - protected $strict = false; - - /** - * Sets validator options - * Accepts the following option keys: - * 'control' => int - * 'operator' => - * 'strict' => bool - * - * @param array|Traversable $options - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = iterator_to_array($options); - } - - if (! is_array($options)) { - $options = func_get_args(); - - $temp['control'] = array_shift($options); - - if (! empty($options)) { - $temp['operator'] = array_shift($options); - } - - if (! empty($options)) { - $temp['strict'] = array_shift($options); - } - - $options = $temp; - } - - parent::__construct($options); - } - - /** - * Returns the control parameter. - * - * @return integer - */ - public function getControl() - { - return $this->control; - } - - /** - * Returns the operator parameter. - * - * @return null|int - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Returns the strict parameter. - * - * @return boolean - */ - public function getStrict() - { - return $this->strict; - } - - /** - * Returns true if and only if $value is between min and max options, inclusively - * if inclusive option is true. - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - $this->setValue($value); - - if (self::OP_AND === $this->operator) { - if ($this->strict) { - // All the bits set in value must be set in control - $result = ($this->control & $value) === $value; - - if (! $result) { - $this->error(self::NOT_AND_STRICT); - } - - return $result; - } - - // At least one of the bits must be common between value and control - $result = (bool) ($this->control & $value); - - if (! $result) { - $this->error(self::NOT_AND); - } - - return $result; - } - - if (self::OP_XOR === $this->operator) { - // Parentheses are required due to order of operations with bitwise operations - // phpcs:ignore WebimpressCodingStandard.Formatting.RedundantParentheses.SingleEquality - $result = ($this->control ^ $value) === ($this->control | $value); - - if (! $result) { - $this->error(self::NOT_XOR); - } - - return $result; - } - - $this->error(self::NO_OP); - return false; - } - - /** - * Sets the control parameter. - * - * @param integer $control - * @return $this - */ - public function setControl($control) - { - $this->control = (int) $control; - - return $this; - } - - /** - * Sets the operator parameter. - * - * @param string $operator - * @return $this - */ - public function setOperator($operator) - { - $this->operator = $operator; - - return $this; - } - - /** - * Sets the strict parameter. - * - * @param boolean $strict - * @return $this - */ - public function setStrict($strict) - { - $this->strict = (bool) $strict; - - return $this; - } -} diff --git a/lib/laminas/laminas-validator/src/BusinessIdentifierCode.php b/lib/laminas/laminas-validator/src/BusinessIdentifierCode.php deleted file mode 100644 index f9df4feaa..000000000 --- a/lib/laminas/laminas-validator/src/BusinessIdentifierCode.php +++ /dev/null @@ -1,329 +0,0 @@ - 'Invalid type given; string expected', - self::INVALID => 'Invalid BIC format', - self::NOT_VALID_COUNTRY => 'Invalid country code', - ]; - - /** - * @see https://www.bundesbank.de/resource/blob/749660/d2c6e00664251b4d83483c229e084e44/mL/technische-spezifikationen-scc-anhang-112018-data.pdf (page 39) - */ - private const REGEX_BIC = '/^[a-z]{4}(?[a-z]{2})[a-z2-9][a-np-z0-9]([0-9a-z]{3})?$/i'; - - /** - * List of all country codes defined by ISO 3166-1 alpha-2 - * - * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes - * - * @var string[] - */ - private const ISO_COUNTRIES = [ - 'AD', - 'AE', - 'AF', - 'AG', - 'AI', - 'AL', - 'AM', - 'AO', - 'AQ', - 'AR', - 'AS', - 'AT', - 'AU', - 'AW', - 'AX', - 'AZ', - 'BA', - 'BB', - 'BD', - 'BE', - 'BF', - 'BG', - 'BH', - 'BI', - 'BJ', - 'BL', - 'BM', - 'BN', - 'BO', - 'BQ', - 'BQ', - 'BR', - 'BS', - 'BT', - 'BV', - 'BW', - 'BY', - 'BZ', - 'CA', - 'CC', - 'CD', - 'CF', - 'CG', - 'CH', - 'CI', - 'CK', - 'CL', - 'CM', - 'CN', - 'CO', - 'CR', - 'CU', - 'CV', - 'CW', - 'CX', - 'CY', - 'CZ', - 'DE', - 'DJ', - 'DK', - 'DM', - 'DO', - 'DZ', - 'EC', - 'EE', - 'EG', - 'EH', - 'ER', - 'ES', - 'ET', - 'FI', - 'FJ', - 'FK', - 'FM', - 'FO', - 'FR', - 'GA', - 'GB', - 'GD', - 'GE', - 'GF', - 'GG', - 'GH', - 'GI', - 'GL', - 'GM', - 'GN', - 'GP', - 'GQ', - 'GR', - 'GS', - 'GT', - 'GU', - 'GW', - 'GY', - 'HK', - 'HM', - 'HN', - 'HR', - 'HT', - 'HU', - 'ID', - 'IE', - 'IL', - 'IM', - 'IN', - 'IO', - 'IQ', - 'IR', - 'IS', - 'IT', - 'JE', - 'JM', - 'JO', - 'JP', - 'KE', - 'KG', - 'KH', - 'KI', - 'KM', - 'KN', - 'KP', - 'KR', - 'KW', - 'KY', - 'KZ', - 'LA', - 'LB', - 'LC', - 'LI', - 'LK', - 'LR', - 'LS', - 'LT', - 'LU', - 'LV', - 'LY', - 'MA', - 'MC', - 'MD', - 'ME', - 'MF', - 'MG', - 'MH', - 'MK', - 'ML', - 'MM', - 'MN', - 'MO', - 'MP', - 'MQ', - 'MR', - 'MS', - 'MT', - 'MU', - 'MV', - 'MW', - 'MX', - 'MY', - 'MZ', - 'NA', - 'NC', - 'NE', - 'NF', - 'NG', - 'NI', - 'NL', - 'NO', - 'NP', - 'NR', - 'NU', - 'NZ', - 'OM', - 'PA', - 'PE', - 'PF', - 'PG', - 'PH', - 'PK', - 'PL', - 'PM', - 'PN', - 'PR', - 'PS', - 'PT', - 'PW', - 'PY', - 'QA', - 'RE', - 'RO', - 'RS', - 'RU', - 'RW', - 'SA', - 'SB', - 'SC', - 'SD', - 'SE', - 'SG', - 'SH', - 'SI', - 'SJ', - 'SK', - 'SL', - 'SM', - 'SN', - 'SO', - 'SR', - 'SS', - 'ST', - 'SV', - 'SX', - 'SY', - 'SZ', - 'TC', - 'TD', - 'TF', - 'TG', - 'TH', - 'TJ', - 'TK', - 'TL', - 'TM', - 'TN', - 'TO', - 'TR', - 'TT', - 'TV', - 'TW', - 'TZ', - 'UA', - 'UG', - 'UM', - 'US', - 'UY', - 'UZ', - 'VA', - 'VC', - 'VE', - 'VG', - 'VI', - 'VN', - 'VU', - 'WF', - 'WS', - 'YE', - 'YT', - 'ZA', - 'ZM', - 'ZW', - ]; - - /** - * This code is the only one used by SWIFT that is not defined by ISO 3166-1 alpha-2 - * - * @see https://en.wikipedia.org/wiki/ISO_9362 - * - * @var string - */ - private const KOSOVO_EXCEPTION = 'XK'; - - /** - * @inheritDoc - */ - public function isValid($value): bool - { - if (! is_string($value)) { - $this->error(self::NOT_STRING); - return false; - } - - if ( - empty($value) - || ! preg_match(self::REGEX_BIC, $value, $matches) - ) { - $this->error(self::INVALID); - return false; - } - - if (! $this->isSwiftValidCountry($matches['country'])) { - $this->error(self::NOT_VALID_COUNTRY); - return false; - } - - return true; - } - - private function isSwiftValidCountry(string $countryCode): bool - { - $countryCode = strtoupper($countryCode); - return in_array($countryCode, self::ISO_COUNTRIES, true) - || $countryCode === self::KOSOVO_EXCEPTION; - } -} diff --git a/lib/laminas/laminas-validator/src/Callback.php b/lib/laminas/laminas-validator/src/Callback.php deleted file mode 100644 index 7d2dc52a4..000000000 --- a/lib/laminas/laminas-validator/src/Callback.php +++ /dev/null @@ -1,150 +0,0 @@ - 'The input is not valid', - self::INVALID_CALLBACK => 'An exception has been raised within the callback', - ]; - - /** - * Default options to set for the validator - * - * @var mixed - */ - protected $options = [ - 'callback' => null, // Callback in a call_user_func format, string || array - 'callbackOptions' => [], // Options for the callback - ]; - - /** - * Constructor - * - * @param array|callable $options - */ - public function __construct($options = null) - { - if (is_callable($options)) { - $options = ['callback' => $options]; - } - - parent::__construct($options); - } - - /** - * Returns the set callback - * - * @return mixed - */ - public function getCallback() - { - return $this->options['callback']; - } - - /** - * Sets the callback - * - * @param string|array|callable $callback - * @return $this Provides a fluent interface - * @throws InvalidArgumentException - */ - public function setCallback($callback) - { - if (! is_callable($callback)) { - throw new InvalidArgumentException('Invalid callback given'); - } - - $this->options['callback'] = $callback; - return $this; - } - - /** - * Returns the set options for the callback - * - * @return mixed - */ - public function getCallbackOptions() - { - return $this->options['callbackOptions']; - } - - /** - * Sets options for the callback - * - * @param mixed $options - * @return $this Provides a fluent interface - */ - public function setCallbackOptions($options) - { - $this->options['callbackOptions'] = (array) $options; - return $this; - } - - /** - * Returns true if and only if the set callback returns - * for the provided $value - * - * @param mixed $value - * @param mixed $context Additional context to provide to the callback - * @return bool - * @throws InvalidArgumentException - */ - public function isValid($value, $context = null) - { - $this->setValue($value); - - $options = $this->getCallbackOptions(); - $callback = $this->getCallback(); - if (empty($callback)) { - throw new InvalidArgumentException('No callback given'); - } - - $args = [$value]; - if (empty($options) && ! empty($context)) { - $args[] = $context; - } - if (! empty($options) && empty($context)) { - $args = array_merge($args, $options); - } - if (! empty($options) && ! empty($context)) { - $args[] = $context; - $args = array_merge($args, $options); - } - - try { - if (! call_user_func_array($callback, $args)) { - $this->error(self::INVALID_VALUE); - return false; - } - } catch (Exception $e) { - $this->error(self::INVALID_CALLBACK); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/ConfigProvider.php b/lib/laminas/laminas-validator/src/ConfigProvider.php deleted file mode 100644 index 188ebc39d..000000000 --- a/lib/laminas/laminas-validator/src/ConfigProvider.php +++ /dev/null @@ -1,38 +0,0 @@ - $this->getDependencyConfig(), - ]; - } - - /** - * Return dependency mappings for this component. - * - * @return array - */ - public function getDependencyConfig() - { - return [ - 'aliases' => [ - 'ValidatorManager' => ValidatorPluginManager::class, - - // Legacy Zend Framework aliases - 'Zend\Validator\ValidatorPluginManager' => ValidatorPluginManager::class, - ], - 'factories' => [ - ValidatorPluginManager::class => ValidatorPluginManagerFactory::class, - ], - ]; - } -} diff --git a/lib/laminas/laminas-validator/src/CreditCard.php b/lib/laminas/laminas-validator/src/CreditCard.php deleted file mode 100644 index 24030ed67..000000000 --- a/lib/laminas/laminas-validator/src/CreditCard.php +++ /dev/null @@ -1,436 +0,0 @@ - 'The input seems to contain an invalid checksum', - self::CONTENT => 'The input must contain only digits', - self::INVALID => 'Invalid type given. String expected', - self::LENGTH => 'The input contains an invalid amount of digits', - self::PREFIX => 'The input is not from an allowed institute', - self::SERVICE => 'The input seems to be an invalid credit card number', - self::SERVICEFAILURE => 'An exception has been raised while validating the input', - ]; - - /** - * List of CCV names - * - * @var array - */ - protected $cardName = [ - 0 => self::AMERICAN_EXPRESS, - 1 => self::DINERS_CLUB, - 2 => self::DINERS_CLUB_US, - 3 => self::DISCOVER, - 4 => self::JCB, - 5 => self::LASER, - 6 => self::MAESTRO, - 7 => self::MASTERCARD, - 8 => self::SOLO, - 9 => self::UNIONPAY, - 10 => self::VISA, - 11 => self::MIR, - ]; - - /** - * List of allowed CCV lengths - * - * @var array - */ - protected $cardLength = [ - self::AMERICAN_EXPRESS => [15], - self::DINERS_CLUB => [14], - self::DINERS_CLUB_US => [16], - self::DISCOVER => [16, 19], - self::JCB => [15, 16], - self::LASER => [16, 17, 18, 19], - self::MAESTRO => [12, 13, 14, 15, 16, 17, 18, 19], - self::MASTERCARD => [16], - self::SOLO => [16, 18, 19], - self::UNIONPAY => [16, 17, 18, 19], - self::VISA => [13, 16, 19], - self::MIR => [13, 16], - ]; - - /** - * List of accepted CCV provider tags - * - * @var array - */ - protected $cardType = [ - self::AMERICAN_EXPRESS => ['34', '37'], - self::DINERS_CLUB => ['300', '301', '302', '303', '304', '305', '36'], - self::DINERS_CLUB_US => ['54', '55'], - self::DISCOVER => [ - '6011', - '622126', - '622127', - '622128', - '622129', - '62213', - '62214', - '62215', - '62216', - '62217', - '62218', - '62219', - '6222', - '6223', - '6224', - '6225', - '6226', - '6227', - '6228', - '62290', - '62291', - '622920', - '622921', - '622922', - '622923', - '622924', - '622925', - '644', - '645', - '646', - '647', - '648', - '649', - '65', - ], - self::JCB => ['1800', '2131', '3528', '3529', '353', '354', '355', '356', '357', '358'], - self::LASER => ['6304', '6706', '6771', '6709'], - self::MAESTRO => [ - '5018', - '5020', - '5038', - '6304', - '6759', - '6761', - '6762', - '6763', - '6764', - '6765', - '6766', - '6772', - ], - self::MASTERCARD => [ - '2221', - '2222', - '2223', - '2224', - '2225', - '2226', - '2227', - '2228', - '2229', - '223', - '224', - '225', - '226', - '227', - '228', - '229', - '23', - '24', - '25', - '26', - '271', - '2720', - '51', - '52', - '53', - '54', - '55', - ], - self::SOLO => ['6334', '6767'], - self::UNIONPAY => [ - '622126', - '622127', - '622128', - '622129', - '62213', - '62214', - '62215', - '62216', - '62217', - '62218', - '62219', - '6222', - '6223', - '6224', - '6225', - '6226', - '6227', - '6228', - '62290', - '62291', - '622920', - '622921', - '622922', - '622923', - '622924', - '622925', - ], - self::VISA => ['4'], - self::MIR => ['2200', '2201', '2202', '2203', '2204'], - ]; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'service' => null, // Service callback for additional validation - 'type' => [], // CCIs which are accepted by validation - ]; - - /** - * Constructor - * - * @param string|array|Traversable $options OPTIONAL Type of CCI to allow - */ - public function __construct($options = []) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } elseif (! is_array($options)) { - $options = func_get_args(); - $temp['type'] = array_shift($options); - if (! empty($options)) { - $temp['service'] = array_shift($options); - } - - $options = $temp; - } - - if (! array_key_exists('type', $options)) { - $options['type'] = self::ALL; - } - - $this->setType($options['type']); - unset($options['type']); - - if (array_key_exists('service', $options)) { - $this->setService($options['service']); - unset($options['service']); - } - - parent::__construct($options); - } - - /** - * Returns a list of accepted CCIs - * - * @return array - */ - public function getType() - { - return $this->options['type']; - } - - /** - * Sets CCIs which are accepted by validation - * - * @param string|array $type Type to allow for validation - * @return CreditCard Provides a fluid interface - */ - public function setType($type) - { - $this->options['type'] = []; - return $this->addType($type); - } - - /** - * Adds a CCI to be accepted by validation - * - * @param string|array $type Type to allow for validation - * @return $this Provides a fluid interface - */ - public function addType($type) - { - if (is_string($type)) { - $type = [$type]; - } - - foreach ($type as $typ) { - if ($typ === self::ALL) { - $this->options['type'] = array_keys($this->cardLength); - continue; - } - - if (in_array($typ, $this->options['type'])) { - continue; - } - - $constant = 'static::' . strtoupper($typ); - if (! defined($constant) || in_array(constant($constant), $this->options['type'])) { - continue; - } - $this->options['type'][] = constant($constant); - } - - return $this; - } - - /** - * Returns the actual set service - * - * @return callable - */ - public function getService() - { - return $this->options['service']; - } - - /** - * Sets a new callback for service validation - * - * @param callable $service - * @return $this - * @throws InvalidArgumentException On invalid service callback. - */ - public function setService($service) - { - if (! is_callable($service)) { - throw new InvalidArgumentException('Invalid callback given'); - } - - $this->options['service'] = $service; - return $this; - } - - /** - * Returns true if and only if $value follows the Luhn algorithm (mod-10 checksum) - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - $this->setValue($value); - - if (! is_string($value)) { - $this->error(self::INVALID, $value); - return false; - } - - if (! ctype_digit($value)) { - $this->error(self::CONTENT, $value); - return false; - } - - $length = strlen($value); - $types = $this->getType(); - $foundp = false; - $foundl = false; - foreach ($types as $type) { - foreach ($this->cardType[$type] as $prefix) { - if (0 === strpos($value, (string) $prefix)) { - $foundp = true; - if (in_array($length, $this->cardLength[$type])) { - $foundl = true; - break 2; - } - } - } - } - - if ($foundp === false) { - $this->error(self::PREFIX, $value); - return false; - } - - if ($foundl === false) { - $this->error(self::LENGTH, $value); - return false; - } - - $sum = 0; - $weight = 2; - - for ($i = $length - 2; $i >= 0; $i--) { - $digit = $weight * $value[$i]; - $sum += floor($digit / 10) + $digit % 10; - $weight = $weight % 2 + 1; - } - - $checksum = (10 - $sum % 10) % 10; - if ((string) $checksum !== $value[$length - 1]) { - $this->error(self::CHECKSUM, $value); - return false; - } - - $service = $this->getService(); - if (! empty($service)) { - try { - $callback = new Callback($service); - $callback->setOptions($this->getType()); - if (! $callback->isValid($value)) { - $this->error(self::SERVICE, $value); - return false; - } - } catch (Exception $e) { - $this->error(self::SERVICEFAILURE, $value); - return false; - } - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Csrf.php b/lib/laminas/laminas-validator/src/Csrf.php deleted file mode 100644 index 332d366ba..000000000 --- a/lib/laminas/laminas-validator/src/Csrf.php +++ /dev/null @@ -1,376 +0,0 @@ - 'The form submitted did not originate from the expected site', - ]; - - /** - * Actual hash used. - * - * @var mixed - */ - protected $hash; - - /** - * Static cache of the session names to generated hashes - * - * @todo unused, left here to avoid BC breaks - * @var array - */ - protected static $hashCache; - - /** - * Name of CSRF element (used to create non-colliding hashes) - * - * @var string - */ - protected $name = 'csrf'; - - /** - * Salt for CSRF token - * - * @var string - */ - protected $salt = 'salt'; - - /** @var SessionContainer */ - protected $session; - - /** - * TTL for CSRF token - * - * @var int|null - */ - protected $timeout = 300; - - /** - * Constructor - * - * @param array|Traversable $options - */ - public function __construct($options = []) - { - parent::__construct($options); - - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - if (! is_array($options)) { - $options = (array) $options; - } - - foreach ($options as $key => $value) { - switch (strtolower($key)) { - case 'name': - $this->setName($value); - break; - case 'salt': - $this->setSalt($value); - break; - case 'session': - $this->setSession($value); - break; - case 'timeout': - $this->setTimeout($value); - break; - default: - // ignore unknown options - break; - } - } - } - - /** - * Does the provided token match the one generated? - * - * @param string $value - * @param mixed $context - * @return bool - */ - public function isValid($value, $context = null) - { - if (! is_string($value)) { - return false; - } - - $this->setValue($value); - - $tokenId = $this->getTokenIdFromHash($value); - $hash = $this->getValidationToken($tokenId); - - $tokenFromValue = $this->getTokenFromHash($value); - $tokenFromHash = $this->getTokenFromHash($hash); - - if (! $tokenFromValue || ! $tokenFromHash || ($tokenFromValue !== $tokenFromHash)) { - $this->error(self::NOT_SAME); - return false; - } - - return true; - } - - /** - * Set CSRF name - * - * @param string $name - * @return $this - */ - public function setName($name) - { - $this->name = (string) $name; - return $this; - } - - /** - * Get CSRF name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set session container - * - * @return $this - */ - public function setSession(SessionContainer $session) - { - $this->session = $session; - if ($this->hash) { - $this->initCsrfToken(); - } - return $this; - } - - /** - * Get session container - * - * Instantiate session container if none currently exists - * - * @return SessionContainer - */ - public function getSession() - { - if (null === $this->session) { - // Using fully qualified name, to ensure polyfill class alias is used - $this->session = new SessionContainer($this->getSessionName()); - } - return $this->session; - } - - /** - * Salt for CSRF token - * - * @param string $salt - * @return $this - */ - public function setSalt($salt) - { - $this->salt = (string) $salt; - return $this; - } - - /** - * Retrieve salt for CSRF token - * - * @return string - */ - public function getSalt() - { - return $this->salt; - } - - /** - * Retrieve CSRF token - * - * If no CSRF token currently exists, or should be regenerated, - * generates one. - * - * @param bool $regenerate default false - * @return string - */ - public function getHash($regenerate = false) - { - if ((null === $this->hash) || $regenerate) { - $this->generateHash(); - } - return $this->hash; - } - - /** - * Get session namespace for CSRF token - * - * Generates a session namespace based on salt, element name, and class. - * - * @return string - */ - public function getSessionName() - { - return str_replace('\\', '_', self::class) . '_' - . $this->getSalt() . '_' - . strtr($this->getName(), ['[' => '_', ']' => '']); - } - - /** - * Set timeout for CSRF session token - * - * @param int|null $ttl - * @return $this - */ - public function setTimeout($ttl) - { - $this->timeout = $ttl !== null ? (int) $ttl : null; - return $this; - } - - /** - * Get CSRF session token timeout - * - * @return int|null - */ - public function getTimeout() - { - return $this->timeout; - } - - /** - * Initialize CSRF token in session - * - * @return void - */ - protected function initCsrfToken() - { - $session = $this->getSession(); - $timeout = $this->getTimeout(); - if (null !== $timeout) { - $session->setExpirationSeconds($timeout); - } - - $hash = $this->getHash(); - $token = $this->getTokenFromHash($hash); - $tokenId = $this->getTokenIdFromHash($hash); - - if (! $session->tokenList) { - $session->tokenList = []; - } - $session->tokenList[$tokenId] = $token; - $session->hash = $hash; // @todo remove this, left for BC - } - - /** - * Generate CSRF token - * - * Generates CSRF token and stores both in {@link $hash} and element - * value. - * - * @return void - */ - protected function generateHash() - { - $token = md5($this->getSalt() . random_bytes(32) . $this->getName()); - - $this->hash = $this->formatHash($token, $this->generateTokenId()); - - $this->setValue($this->hash); - $this->initCsrfToken(); - } - - /** - * @return string - */ - protected function generateTokenId() - { - return md5(random_bytes(32)); - } - - /** - * Get validation token - * - * Retrieve token from session, if it exists. - * - * @param string $tokenId - * @return null|string - */ - protected function getValidationToken($tokenId = null) - { - $session = $this->getSession(); - - /** - * if no tokenId is passed we revert to the old behaviour - * - * @todo remove, here for BC - */ - if (! $tokenId && isset($session->hash)) { - return $session->hash; - } - - if ($tokenId && isset($session->tokenList[$tokenId])) { - return $this->formatHash($session->tokenList[$tokenId], $tokenId); - } - - return null; - } - - /** - * @return string - */ - protected function formatHash(string $token, string $tokenId) - { - return sprintf('%s-%s', $token, $tokenId); - } - - protected function getTokenFromHash(?string $hash): ?string - { - if (null === $hash) { - return null; - } - - $data = explode('-', $hash); - return $data[0] ?: null; - } - - protected function getTokenIdFromHash(string $hash): ?string - { - $data = explode('-', $hash); - - if (! isset($data[1])) { - return null; - } - - return $data[1]; - } -} diff --git a/lib/laminas/laminas-validator/src/Date.php b/lib/laminas/laminas-validator/src/Date.php deleted file mode 100644 index 2d85ade24..000000000 --- a/lib/laminas/laminas-validator/src/Date.php +++ /dev/null @@ -1,232 +0,0 @@ - 'Invalid type given. String, integer, array or DateTime expected', - self::INVALID_DATE => 'The input does not appear to be a valid date', - self::FALSEFORMAT => "The input does not fit the date format '%format%'", - ]; - - /** @var string[] */ - protected $messageVariables = [ - 'format' => 'format', - ]; - - /** @var string */ - protected $format = self::FORMAT_DEFAULT; - - /** @var bool */ - protected $strict = false; - - /** - * Sets validator options - * - * @param string|array|Traversable $options OPTIONAL - */ - public function __construct($options = []) - { - if ($options instanceof Traversable) { - $options = iterator_to_array($options); - } elseif (! is_array($options)) { - $options = func_get_args(); - $temp['format'] = array_shift($options); - $options = $temp; - } - - parent::__construct($options); - } - - /** - * Returns the format option - * - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Sets the format option - * - * Format cannot be null. It will always default to 'Y-m-d', even - * if null is provided. - * - * @param string|null $format - * @return $this provides a fluent interface - * @todo validate the format - */ - public function setFormat($format = self::FORMAT_DEFAULT) - { - $this->format = empty($format) ? self::FORMAT_DEFAULT : $format; - return $this; - } - - public function setStrict(bool $strict): self - { - $this->strict = $strict; - return $this; - } - - public function isStrict(): bool - { - return $this->strict; - } - - /** - * Returns true if $value is a DateTimeInterface instance or can be converted into one. - * - * @param string|numeric|array|DateTimeInterface $value - * @return bool - */ - public function isValid($value) - { - $this->setValue($value); - - $date = $this->convertToDateTime($value); - if (! $date) { - $this->error(self::INVALID_DATE); - return false; - } - - if ($this->isStrict() && $date->format($this->getFormat()) !== $value) { - $this->error(self::FALSEFORMAT); - return false; - } - - return true; - } - - /** - * Attempts to convert an int, string, or array to a DateTime object - * - * @param string|numeric|array|DateTimeInterface $param - * @param bool $addErrors - * @return false|DateTime - */ - protected function convertToDateTime($param, $addErrors = true) - { - if ($param instanceof DateTime) { - return $param; - } - - if ($param instanceof DateTimeImmutable) { - return DateTime::createFromImmutable($param); - } - - $type = gettype($param); - switch ($type) { - case 'string': - return $this->convertString($param, $addErrors); - case 'integer': - return $this->convertInteger($param); - case 'double': - return $this->convertDouble($param); - case 'array': - return $this->convertArray($param, $addErrors); - } - - if ($addErrors) { - $this->error(self::INVALID); - } - - return false; - } - - /** - * Attempts to convert an integer into a DateTime object - * - * @param integer $value - * @return false|DateTime - */ - protected function convertInteger($value) - { - return DateTime::createFromFormat('U', (string) $value); - } - - /** - * Attempts to convert an double into a DateTime object - * - * @param double $value - * @return false|DateTime - */ - protected function convertDouble($value) - { - return DateTime::createFromFormat('U', (string) $value); - } - - /** - * Attempts to convert a string into a DateTime object - * - * @param string $value - * @param bool $addErrors - * @return false|DateTime - */ - protected function convertString($value, $addErrors = true) - { - $date = DateTime::createFromFormat($this->format, $value); - - // Invalid dates can show up as warnings (ie. "2007-02-99") - // and still return a DateTime object. - $errors = DateTime::getLastErrors(); - if ($errors['warning_count'] > 0) { - if ($addErrors) { - $this->error(self::FALSEFORMAT); - } - return false; - } - - return $date; - } - - /** - * Implodes the array into a string and proxies to {@link convertString()}. - * - * @param array $value - * @param bool $addErrors - * @return false|DateTime - * @todo enhance the implosion - */ - protected function convertArray(array $value, $addErrors = true) - { - return $this->convertString(implode('-', $value), $addErrors); - } -} diff --git a/lib/laminas/laminas-validator/src/DateStep.php b/lib/laminas/laminas-validator/src/DateStep.php deleted file mode 100644 index 2ec86dac0..000000000 --- a/lib/laminas/laminas-validator/src/DateStep.php +++ /dev/null @@ -1,525 +0,0 @@ - 'Invalid type given. String, integer, array or DateTime expected', - self::INVALID_DATE => 'The input does not appear to be a valid date', - self::FALSEFORMAT => "The input does not fit the date format '%format%'", - self::NOT_STEP => 'The input is not a valid step', - ]; - - /** - * Optional base date value - * - * @var string|int|DateTimeInterface - */ - protected $baseValue = '1970-01-01T00:00:00Z'; - - /** - * Date step interval (defaults to 1 day). - * Uses the DateInterval specification. - * - * @var DateInterval - */ - protected $step; - - /** - * Optional timezone to be used when the baseValue - * and validation values do not contain timezone info - * - * @var DateTimeZone - */ - protected $timezone; - - /** - * Set default options for this instance - * - * @param string|array|Traversable $options - */ - public function __construct($options = []) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } elseif (! is_array($options)) { - $options = func_get_args(); - $temp = []; - $temp['baseValue'] = array_shift($options); - if (! empty($options)) { - $temp['step'] = array_shift($options); - } - if (! empty($options)) { - $temp['format'] = array_shift($options); - } - if (! empty($options)) { - $temp['timezone'] = array_shift($options); - } - - $options = $temp; - } - - if (! isset($options['step'])) { - $options['step'] = new DateInterval('P1D'); - } - if (! isset($options['timezone'])) { - $options['timezone'] = new DateTimeZone(date_default_timezone_get()); - } - - parent::__construct($options); - } - - /** - * Sets the base value from which the step should be computed - * - * @param string|int|DateTimeInterface $baseValue - * @return $this - */ - public function setBaseValue($baseValue) - { - $this->baseValue = $baseValue; - return $this; - } - - /** - * Returns the base value from which the step should be computed - * - * @return string|int|DateTimeInterface - */ - public function getBaseValue() - { - return $this->baseValue; - } - - /** - * Sets the step date interval - * - * @return $this - */ - public function setStep(DateInterval $step) - { - $this->step = $step; - return $this; - } - - /** - * Returns the step date interval - * - * @return DateInterval - */ - public function getStep() - { - return $this->step; - } - - /** - * Returns the timezone option - * - * @return DateTimeZone - */ - public function getTimezone() - { - return $this->timezone; - } - - /** - * Sets the timezone option - * - * @return $this - */ - public function setTimezone(DateTimeZone $timezone) - { - $this->timezone = $timezone; - return $this; - } - - /** - * Supports formats with ISO week (W) definitions - * - * @see Date::convertString() - * - * @param string $value - * @param bool $addErrors - * @return DateTime|false - */ - protected function convertString($value, $addErrors = true) - { - // Custom week format support - if ( - strpos($this->format, 'Y-\WW') === 0 - && preg_match('/^([0-9]{4})\-W([0-9]{2})/', $value, $matches) - ) { - $date = new DateTime(); - $date->setISODate((int) $matches[1], (int) $matches[2]); - } else { - $date = DateTime::createFromFormat($this->format, $value, new DateTimeZone('UTC')); - } - - // Invalid dates can show up as warnings (ie. "2007-02-99") - // and still return a DateTime object. - $errors = DateTime::getLastErrors(); - if ($errors['warning_count'] > 0) { - if ($addErrors) { - $this->error(self::FALSEFORMAT); - } - return false; - } - - return $date; - } - - /** - * Returns true if a date is within a valid step - * - * @param string|int|DateTimeInterface $value - * @return bool - * @throws Exception\InvalidArgumentException - */ - public function isValid($value) - { - if (! parent::isValid($value)) { - return false; - } - - $valueDate = $this->convertToDateTime($value, false); // avoid duplicate errors - $baseDate = $this->convertToDateTime($this->baseValue, false); - - if (false === $valueDate || false === $baseDate) { - return false; - } - - $step = $this->getStep(); - - // Same date? - // phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedEqualOperator - if ($valueDate == $baseDate) { - return true; - } - - // Optimization for simple intervals. - // Handle intervals of just one date or time unit. - $intervalParts = explode('|', $step->format('%y|%m|%d|%h|%i|%s')); - $intervalParts = array_map('intval', $intervalParts); - $partCounts = array_count_values($intervalParts); - - $unitKeys = ['years', 'months', 'days', 'hours', 'minutes', 'seconds']; - $intervalParts = array_combine($unitKeys, $intervalParts); - - // Get absolute time difference to avoid special cases of missing/added time - $absoluteValueDate = new DateTime($valueDate->format('Y-m-d H:i:s'), new DateTimeZone('UTC')); - $absoluteBaseDate = new DateTime($baseDate->format('Y-m-d H:i:s'), new DateTimeZone('UTC')); - - $timeDiff = $absoluteValueDate->diff($absoluteBaseDate, true); - $diffParts = array_map('intval', explode('|', $timeDiff->format('%y|%m|%d|%h|%i|%s'))); - $diffParts = array_combine($unitKeys, $diffParts); - - if (5 === $partCounts[0]) { - // Find the unit with the non-zero interval - $intervalUnit = 'days'; - $stepValue = 1; - foreach ($intervalParts as $key => $value) { - if (0 !== $value) { - $intervalUnit = $key; - $stepValue = $value; - break; - } - } - - // Check date units - if (in_array($intervalUnit, ['years', 'months', 'days'])) { - switch ($intervalUnit) { - case 'years': - if ( - 0 === $diffParts['months'] && 0 === $diffParts['days'] - && 0 === $diffParts['hours'] && 0 === $diffParts['minutes'] - && 0 === $diffParts['seconds'] - ) { - if (($diffParts['years'] % $stepValue) === 0) { - return true; - } - } - break; - case 'months': - if ( - 0 === $diffParts['days'] && 0 === $diffParts['hours'] - && 0 === $diffParts['minutes'] && 0 === $diffParts['seconds'] - ) { - $months = ($diffParts['years'] * 12) + $diffParts['months']; - if (($months % $stepValue) === 0) { - return true; - } - } - break; - case 'days': - if ( - 0 === $diffParts['hours'] && 0 === $diffParts['minutes'] - && 0 === $diffParts['seconds'] - ) { - $days = (int) $timeDiff->format('%a'); // Total days - if (($days % $stepValue) === 0) { - return true; - } - } - break; - } - $this->error(self::NOT_STEP); - return false; - } - - // Check time units - if (in_array($intervalUnit, ['hours', 'minutes', 'seconds'])) { - // Simple test if $stepValue is 1. - if (1 === $stepValue) { - if ( - 'hours' === $intervalUnit - && 0 === $diffParts['minutes'] && 0 === $diffParts['seconds'] - ) { - return true; - } elseif ('minutes' === $intervalUnit && 0 === $diffParts['seconds']) { - return true; - } elseif ('seconds' === $intervalUnit) { - return true; - } - - $this->error(self::NOT_STEP); - - return false; - } - - // Simple test for same day, when using default baseDate - if ( - $baseDate->format('Y-m-d') === $valueDate->format('Y-m-d') - && $baseDate->format('Y-m-d') === '1970-01-01' - ) { - switch ($intervalUnit) { - case 'hours': - if (0 === $diffParts['minutes'] && 0 === $diffParts['seconds']) { - if (($diffParts['hours'] % $stepValue) === 0) { - return true; - } - } - break; - case 'minutes': - if (0 === $diffParts['seconds']) { - $minutes = ($diffParts['hours'] * 60) + $diffParts['minutes']; - if (($minutes % $stepValue) === 0) { - return true; - } - } - break; - case 'seconds': - $seconds = ($diffParts['hours'] * 60 * 60) - + ($diffParts['minutes'] * 60) - + $diffParts['seconds']; - if (($seconds % $stepValue) === 0) { - return true; - } - break; - } - $this->error(self::NOT_STEP); - return false; - } - } - } - - return $this->fallbackIncrementalIterationLogic($baseDate, $valueDate, $intervalParts, $diffParts, $step); - } - - /** - * Fall back to slower (but accurate) method for complex intervals. - * Keep adding steps to the base date until a match is found - * or until the value is exceeded. - * - * This is really slow if the interval is small, especially if the - * default base date of 1/1/1970 is used. We can skip a chunk of - * iterations by starting at the lower bound of steps needed to reach - * the target - * - * @param int[] $intervalParts - * @param int[] $diffParts - * @throws Exception\InvalidArgumentException - */ - private function fallbackIncrementalIterationLogic( - DateTimeInterface $baseDate, - DateTimeInterface $valueDate, - array $intervalParts, - array $diffParts, - DateInterval $step - ): bool { - [$minSteps, $requiredIterations] = $this->computeMinStepAndRequiredIterations($intervalParts, $diffParts); - $minimumInterval = $this->computeMinimumInterval($intervalParts, $minSteps); - $isIncrementalStepping = $baseDate < $valueDate; - - if (! ($baseDate instanceof DateTime || $baseDate instanceof DateTimeImmutable)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Function %s requires the baseDate to be a DateTime or DateTimeImmutable instance.', - __FUNCTION__ - )); - } - - for ($offsetIterations = 0; $offsetIterations < $requiredIterations; $offsetIterations += 1) { - if ($isIncrementalStepping) { - $baseDate = $baseDate->add($minimumInterval); - } else { - $baseDate = $baseDate->sub($minimumInterval); - } - } - - while ( - ($isIncrementalStepping && $baseDate < $valueDate) - || (! $isIncrementalStepping && $baseDate > $valueDate) - ) { - if ($isIncrementalStepping) { - $baseDate = $baseDate->add($step); - } else { - $baseDate = $baseDate->sub($step); - } - - // phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedEqualOperator - if ($baseDate == $valueDate) { - return true; - } - } - - $this->error(self::NOT_STEP); - - return false; - } - - /** - * Computes minimum interval to use for iterations while checking steps - * - * @param int[] $intervalParts - * @param int|float $minSteps - */ - private function computeMinimumInterval(array $intervalParts, $minSteps): DateInterval - { - return new DateInterval(sprintf( - 'P%dY%dM%dDT%dH%dM%dS', - $intervalParts['years'] * $minSteps, - $intervalParts['months'] * $minSteps, - $intervalParts['days'] * $minSteps, - $intervalParts['hours'] * $minSteps, - $intervalParts['minutes'] * $minSteps, - $intervalParts['seconds'] * $minSteps - )); - } - - /** - * @param int[] $intervalParts - * @param int[] $diffParts - * @return int[] (ordered tuple containing minimum steps and required step iterations - * @psalm-return array{0: int, 1: int} - */ - private function computeMinStepAndRequiredIterations(array $intervalParts, array $diffParts): array - { - $minSteps = $this->computeMinSteps($intervalParts, $diffParts); - - // If we use PHP_INT_MAX DateInterval::__construct falls over with a bad format error - // before we reach the max on 64 bit machines - $maxInteger = min(2 ** 31, PHP_INT_MAX); - // check for integer overflow and split $minimum interval if needed - $maximumInterval = max($intervalParts); - $requiredStepIterations = 1; - - if (($minSteps * $maximumInterval) > $maxInteger) { - $requiredStepIterations = ceil(($minSteps * $maximumInterval) / $maxInteger); - $minSteps = floor($minSteps / $requiredStepIterations); - } - - return [(int) $minSteps, $minSteps ? (int) $requiredStepIterations : 0]; - } - - /** - * Multiply the step interval by the lower bound of steps to reach the target - * - * @param int[] $intervalParts - * @param int[] $diffParts - * @return float|int - */ - private function computeMinSteps(array $intervalParts, array $diffParts) - { - $intervalMaxSeconds = $this->computeIntervalMaxSeconds($intervalParts); - - return 0 === $intervalMaxSeconds - ? 0 - : max(floor($this->computeDiffMinSeconds($diffParts) / $intervalMaxSeconds) - 1, 0); - } - - /** - * Get upper bound of the given interval in seconds - * Converts a given `$intervalParts` array into seconds - * - * @param int[] $intervalParts - */ - private function computeIntervalMaxSeconds(array $intervalParts): int - { - return ($intervalParts['years'] * 60 * 60 * 24 * 366) - + ($intervalParts['months'] * 60 * 60 * 24 * 31) - + ($intervalParts['days'] * 60 * 60 * 24) - + ($intervalParts['hours'] * 60 * 60) - + ($intervalParts['minutes'] * 60) - + $intervalParts['seconds']; - } - - /** - * Get lower bound of difference in secondss - * Converts a given `$diffParts` array into seconds - * - * @param int[] $diffParts - */ - private function computeDiffMinSeconds(array $diffParts): int - { - return ($diffParts['years'] * 60 * 60 * 24 * 365) - + ($diffParts['months'] * 60 * 60 * 24 * 28) - + ($diffParts['days'] * 60 * 60 * 24) - + ($diffParts['hours'] * 60 * 60) - + ($diffParts['minutes'] * 60) - + $diffParts['seconds']; - } -} diff --git a/lib/laminas/laminas-validator/src/Db/AbstractDb.php b/lib/laminas/laminas-validator/src/Db/AbstractDb.php deleted file mode 100755 index 495cdf113..000000000 --- a/lib/laminas/laminas-validator/src/Db/AbstractDb.php +++ /dev/null @@ -1,315 +0,0 @@ - Message templates */ - protected $messageTemplates = [ - self::ERROR_NO_RECORD_FOUND => 'No record matching the input was found', - self::ERROR_RECORD_FOUND => 'A record matching the input was found', - ]; - - /** - * Select object to use. can be set, or will be auto-generated - * - * @var Select - */ - protected $select; - - /** @var string */ - protected $schema; - - /** @var string */ - protected $table = ''; - - /** @var string */ - protected $field = ''; - - /** @var mixed */ - protected $exclude; - - /** - * Provides basic configuration for use with Laminas\Validator\Db Validators - * Setting $exclude allows a single record to be excluded from matching. - * Exclude can either be a String containing a where clause, or an array with `field` and `value` keys - * to define the where clause added to the sql. - * A database adapter may optionally be supplied to avoid using the registered default adapter. - * - * The following option keys are supported: - * 'table' => The database table to validate against - * 'schema' => The schema keys - * 'field' => The field to check for a match - * 'exclude' => An optional where clause or field/value pair to exclude from the query - * 'adapter' => An optional database adapter to use - * - * @param array|Traversable|Select $options Options to use for this validator - * @throws InvalidArgumentException - */ - public function __construct($options = null) - { - parent::__construct($options); - - if ($options instanceof Select) { - $this->setSelect($options); - return; - } - - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } elseif (func_num_args() > 1) { - $options = func_get_args(); - $firstArgument = array_shift($options); - if (is_array($firstArgument)) { - $temp = ArrayUtils::iteratorToArray($firstArgument); - } else { - $temp['table'] = $firstArgument; - } - - $temp['field'] = array_shift($options); - - if (! empty($options)) { - $temp['exclude'] = array_shift($options); - } - - if (! empty($options)) { - $temp['adapter'] = array_shift($options); - } - - $options = $temp; - } - - if (! array_key_exists('table', $options) && ! array_key_exists('schema', $options)) { - throw new Exception\InvalidArgumentException('Table or Schema option missing!'); - } - - if (! array_key_exists('field', $options)) { - throw new Exception\InvalidArgumentException('Field option missing!'); - } - - if (array_key_exists('adapter', $options)) { - $this->setAdapter($options['adapter']); - } - - if (array_key_exists('exclude', $options)) { - $this->setExclude($options['exclude']); - } - - $this->setField($options['field']); - if (array_key_exists('table', $options)) { - $this->setTable($options['table']); - } - - if (array_key_exists('schema', $options)) { - $this->setSchema($options['schema']); - } - } - - /** - * Returns the set adapter - * - * @throws RuntimeException When no database adapter is defined. - * @return DbAdapter - */ - public function getAdapter() - { - return $this->adapter; - } - - /** - * Sets a new database adapter - * - * @return self Provides a fluent interface - */ - public function setAdapter(DbAdapter $adapter) - { - return $this->setDbAdapter($adapter); - } - - /** - * Returns the set exclude clause - * - * @return string|array - */ - public function getExclude() - { - return $this->exclude; - } - - /** - * Sets a new exclude clause - * - * @param string|array $exclude - * @return $this Provides a fluent interface - */ - public function setExclude($exclude) - { - $this->exclude = $exclude; - $this->select = null; - return $this; - } - - /** - * Returns the set field - * - * @return string|array - */ - public function getField() - { - return $this->field; - } - - /** - * Sets a new field - * - * @param string $field - * @return $this - */ - public function setField($field) - { - $this->field = (string) $field; - $this->select = null; - return $this; - } - - /** - * Returns the set table - * - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Sets a new table - * - * @param string $table - * @return $this Provides a fluent interface - */ - public function setTable($table) - { - $this->table = (string) $table; - $this->select = null; - return $this; - } - - /** - * Returns the set schema - * - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * Sets a new schema - * - * @param string $schema - * @return $this Provides a fluent interface - */ - public function setSchema($schema) - { - $this->schema = $schema; - $this->select = null; - return $this; - } - - /** - * Sets the select object to be used by the validator - * - * @return $this Provides a fluent interface - */ - public function setSelect(Select $select) - { - $this->select = $select; - return $this; - } - - /** - * Gets the select object to be used by the validator. - * If no select object was supplied to the constructor, - * then it will auto-generate one from the given table, - * schema, field, and adapter options. - * - * @return Select The Select object which will be used - */ - public function getSelect() - { - if ($this->select instanceof Select) { - return $this->select; - } - - // Build select object - $select = new Select(); - $tableIdentifier = new TableIdentifier($this->table, $this->schema); - $select->from($tableIdentifier)->columns([$this->field]); - $select->where->equalTo($this->field, null); - - if ($this->exclude !== null) { - if (is_array($this->exclude)) { - $select->where->notEqualTo( - $this->exclude['field'], - $this->exclude['value'] - ); - } else { - $select->where($this->exclude); - } - } - - $this->select = $select; - - return $this->select; - } - - /** - * Run query and returns matches, or null if no matches are found. - * - * @param string $value - * @return array when matches are found. - */ - protected function query($value) - { - $sql = new Sql($this->getAdapter()); - $select = $this->getSelect(); - $statement = $sql->prepareStatementForSqlObject($select); - $parameters = $statement->getParameterContainer(); - $parameters['where1'] = $value; - $result = $statement->execute(); - - return $result->current(); - } -} diff --git a/lib/laminas/laminas-validator/src/Db/NoRecordExists.php b/lib/laminas/laminas-validator/src/Db/NoRecordExists.php deleted file mode 100644 index 573a81ff8..000000000 --- a/lib/laminas/laminas-validator/src/Db/NoRecordExists.php +++ /dev/null @@ -1,36 +0,0 @@ -adapter) { - throw new Exception\RuntimeException('No database adapter present'); - } - - $valid = true; - $this->setValue($value); - - $result = $this->query($value); - if ($result) { - $valid = false; - $this->error(self::ERROR_RECORD_FOUND); - } - - return $valid; - } -} diff --git a/lib/laminas/laminas-validator/src/Db/RecordExists.php b/lib/laminas/laminas-validator/src/Db/RecordExists.php deleted file mode 100644 index bbc57db21..000000000 --- a/lib/laminas/laminas-validator/src/Db/RecordExists.php +++ /dev/null @@ -1,36 +0,0 @@ -adapter) { - throw new Exception\RuntimeException('No database adapter present'); - } - - $valid = true; - $this->setValue($value); - - $result = $this->query($value); - if (! $result) { - $valid = false; - $this->error(self::ERROR_NO_RECORD_FOUND); - } - - return $valid; - } -} diff --git a/lib/laminas/laminas-validator/src/Digits.php b/lib/laminas/laminas-validator/src/Digits.php deleted file mode 100644 index 34568a5c5..000000000 --- a/lib/laminas/laminas-validator/src/Digits.php +++ /dev/null @@ -1,66 +0,0 @@ - 'The input must contain only digits', - self::STRING_EMPTY => 'The input is an empty string', - self::INVALID => 'Invalid type given. String, integer or float expected', - ]; - - /** - * Returns true if and only if $value only contains digit characters - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value) && ! is_int($value) && ! is_float($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue((string) $value); - - if ('' === $this->getValue()) { - $this->error(self::STRING_EMPTY); - return false; - } - - if (null === static::$filter) { - static::$filter = new DigitsFilter(); - } - - if ($this->getValue() !== static::$filter->filter($this->getValue())) { - $this->error(self::NOT_DIGITS); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/EmailAddress.php b/lib/laminas/laminas-validator/src/EmailAddress.php deleted file mode 100644 index e03070deb..000000000 --- a/lib/laminas/laminas-validator/src/EmailAddress.php +++ /dev/null @@ -1,617 +0,0 @@ - */ - protected $messageTemplates = [ - self::INVALID => "Invalid type given. String expected", - self::INVALID_FORMAT => "The input is not a valid email address. Use the basic format local-part@hostname", - self::INVALID_HOSTNAME => "'%hostname%' is not a valid hostname for the email address", - self::INVALID_MX_RECORD => "'%hostname%' does not appear to have any valid MX or A records for the email address", - self::INVALID_SEGMENT => "'%hostname%' is not in a routable network segment. The email address should not be resolved from public network", - self::DOT_ATOM => "'%localPart%' can not be matched against dot-atom format", - self::QUOTED_STRING => "'%localPart%' can not be matched against quoted-string format", - self::INVALID_LOCAL_PART => "'%localPart%' is not a valid local part for the email address", - self::LENGTH_EXCEEDED => "The input exceeds the allowed length", - ]; - - // phpcs:enable - - /** @var array */ - protected $messageVariables = [ - 'hostname' => 'hostname', - 'localPart' => 'localPart', - ]; - - /** @var string */ - protected $hostname; - - /** @var string */ - protected $localPart; - - /** - * Returns the found mx record information - * - * @var array - */ - protected $mxRecord = []; - - /** - * Internal options array - * - * @var array - */ - protected $options = [ - 'useMxCheck' => false, - 'useDeepMxCheck' => false, - 'useDomainCheck' => true, - 'allow' => Hostname::ALLOW_DNS, - 'strict' => true, - 'hostnameValidator' => null, - ]; - - /** - * Instantiates hostname validator for local use - * - * The following additional option keys are supported: - * 'hostnameValidator' => A hostname validator, see Laminas\Validator\Hostname - * 'allow' => Options for the hostname validator, see Laminas\Validator\Hostname::ALLOW_* - * 'strict' => Whether to adhere to strictest requirements in the spec - * 'useMxCheck' => If MX check should be enabled, boolean - * 'useDeepMxCheck' => If a deep MX check should be done, boolean - * - * @param array|Traversable $options OPTIONAL - */ - public function __construct($options = []) - { - if (! is_array($options)) { - $options = func_get_args(); - $temp['allow'] = array_shift($options); - if (! empty($options)) { - $temp['useMxCheck'] = array_shift($options); - } - - if (! empty($options)) { - $temp['hostnameValidator'] = array_shift($options); - } - - $options = $temp; - } - - parent::__construct($options); - } - - /** - * Sets the validation failure message template for a particular key - * Adds the ability to set messages to the attached hostname validator - * - * @param string $messageString - * @param string $messageKey OPTIONAL - * @return AbstractValidator Provides a fluent interface - */ - public function setMessage($messageString, $messageKey = null) - { - if ($messageKey === null) { - $this->getHostnameValidator()->setMessage($messageString); - parent::setMessage($messageString); - return $this; - } - - if (! isset($this->messageTemplates[$messageKey])) { - $this->getHostnameValidator()->setMessage($messageString, $messageKey); - } else { - parent::setMessage($messageString, $messageKey); - } - - return $this; - } - - /** - * Returns the set hostname validator - * - * If was not previously set then lazy load a new one - * - * @return Hostname - */ - public function getHostnameValidator() - { - if (! isset($this->options['hostnameValidator'])) { - $this->options['hostnameValidator'] = new Hostname($this->getAllow()); - } - - return $this->options['hostnameValidator']; - } - - /** - * @param Hostname $hostnameValidator OPTIONAL - * @return $this Provides a fluent interface - */ - public function setHostnameValidator(?Hostname $hostnameValidator = null) - { - $this->options['hostnameValidator'] = $hostnameValidator; - - return $this; - } - - /** - * Returns the allow option of the attached hostname validator - * - * @return int - */ - public function getAllow() - { - return $this->options['allow']; - } - - /** - * Sets the allow option of the hostname validator to use - * - * @param int $allow - * @return $this Provides a fluent interface - */ - public function setAllow($allow) - { - $this->options['allow'] = $allow; - if (isset($this->options['hostnameValidator'])) { - $this->options['hostnameValidator']->setAllow($allow); - } - - return $this; - } - - /** - * Whether MX checking via getmxrr is supported or not - * - * @return bool - */ - public function isMxSupported() - { - return function_exists('getmxrr'); - } - - /** - * Returns the set validateMx option - * - * @return bool - */ - public function getMxCheck() - { - return $this->options['useMxCheck']; - } - - /** - * Set whether we check for a valid MX record via DNS - * - * This only applies when DNS hostnames are validated - * - * @param bool $mx Set allowed to true to validate for MX records, and false to not validate them - * @return $this Fluid Interface - */ - public function useMxCheck($mx) - { - $this->options['useMxCheck'] = (bool) $mx; - return $this; - } - - /** - * Returns the set deepMxCheck option - * - * @return bool - */ - public function getDeepMxCheck() - { - return $this->options['useDeepMxCheck']; - } - - /** - * Use deep validation for MX records - * - * @param bool $deep Set deep to true to perform a deep validation process for MX records - * @return $this Fluid Interface - */ - public function useDeepMxCheck($deep) - { - $this->options['useDeepMxCheck'] = (bool) $deep; - return $this; - } - - /** - * Returns the set domainCheck option - * - * @return bool - */ - public function getDomainCheck() - { - return $this->options['useDomainCheck']; - } - - /** - * Sets if the domain should also be checked - * or only the local part of the email address - * - * @param bool $domain - * @return $this Fluid Interface - */ - public function useDomainCheck($domain = true) - { - $this->options['useDomainCheck'] = (bool) $domain; - return $this; - } - - /** - * Returns if the given host is reserved - * - * The following addresses are seen as reserved - * '0.0.0.0/8', '10.0.0.0/8', '127.0.0.0/8' - * '100.64.0.0/10' - * '172.16.0.0/12' - * '198.18.0.0/15' - * '169.254.0.0/16', '192.168.0.0/16' - * '192.0.2.0/24', '192.88.99.0/24', '198.51.100.0/24', '203.0.113.0/24' - * '224.0.0.0/4', '240.0.0.0/4' - * - * @see http://en.wikipedia.org/wiki/Reserved_IP_addresses - * - * As of RFC5753 (JAN 2010), the following blocks are no longer reserved: - * - 128.0.0.0/16 - * - 191.255.0.0/16 - * - 223.255.255.0/24 - * @see http://tools.ietf.org/html/rfc5735#page-6 - * - * As of RFC6598 (APR 2012), the following blocks are now reserved: - * - 100.64.0.0/10 - * @see http://tools.ietf.org/html/rfc6598#section-7 - * - * @param string $host - * @return bool Returns false when minimal one of the given addresses is not reserved - */ - protected function isReserved($host) - { - if (! preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $host)) { - $host = gethostbynamel($host); - } else { - $host = [$host]; - } - - if (empty($host)) { - return false; - } - - foreach ($host as $server) { - // @codingStandardsIgnoreStart - // Search for 0.0.0.0/8, 10.0.0.0/8, 127.0.0.0/8 - if (!preg_match('/^(0|10|127)(\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))){3}$/', $server) && - // Search for 100.64.0.0/10 - !preg_match('/^100\.(6[0-4]|[7-9][0-9]|1[0-1][0-9]|12[0-7])(\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))){2}$/', $server) && - // Search for 172.16.0.0/12 - !preg_match('/^172\.(1[6-9]|2[0-9]|3[0-1])(\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))){2}$/', $server) && - // Search for 198.18.0.0/15 - !preg_match('/^198\.(1[8-9])(\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))){2}$/', $server) && - // Search for 169.254.0.0/16, 192.168.0.0/16 - !preg_match('/^(169\.254|192\.168)(\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))){2}$/', $server) && - // Search for 192.0.2.0/24, 192.88.99.0/24, 198.51.100.0/24, 203.0.113.0/24 - !preg_match('/^(192\.0\.2|192\.88\.99|198\.51\.100|203\.0\.113)\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$/', $server) && - // Search for 224.0.0.0/4, 240.0.0.0/4 - !preg_match('/^(2(2[4-9]|[3-4][0-9]|5[0-5]))(\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))){3}$/', $server) - ) { - return false; - } - // @codingStandardsIgnoreEnd - } - - return true; - } - - /** - * Internal method to validate the local part of the email address - * - * @return bool - */ - protected function validateLocalPart() - { - // First try to match the local part on the common dot-atom format - - // Dot-atom characters are: 1*atext *("." 1*atext) - // atext: ALPHA / DIGIT / and "!", "#", "$", "%", "&", "'", "*", - // "+", "-", "/", "=", "?", "^", "_", "`", "{", "|", "}", "~" - $atext = 'a-zA-Z0-9\x21\x23\x24\x25\x26\x27\x2a\x2b\x2d\x2f\x3d\x3f\x5e\x5f\x60\x7b\x7c\x7d\x7e'; - if (preg_match('/^[' . $atext . ']+(\x2e+[' . $atext . ']+)*$/', $this->localPart)) { - return true; - } - - if ($this->validateInternationalizedLocalPart($this->localPart)) { - return true; - } - - // Try quoted string format (RFC 5321 Chapter 4.1.2) - - // Quoted-string characters are: DQUOTE *(qtext/quoted-pair) DQUOTE - $qtext = '\x20-\x21\x23-\x5b\x5d-\x7e'; // %d32-33 / %d35-91 / %d93-126 - $quotedPair = '\x20-\x7e'; // %d92 %d32-126 - if (preg_match('/^"([' . $qtext . ']|\x5c[' . $quotedPair . '])*"$/', $this->localPart)) { - return true; - } - - $this->error(self::DOT_ATOM); - $this->error(self::QUOTED_STRING); - $this->error(self::INVALID_LOCAL_PART); - - return false; - } - - /** - * @param string $localPart Address local part to validate. - * @return bool - */ - protected function validateInternationalizedLocalPart($localPart) - { - if ( - extension_loaded('intl') - && false === UConverter::transcode($localPart, 'UTF-8', 'UTF-8') - ) { - // invalid utf? - return false; - } - - $atext = 'a-zA-Z0-9\x21\x23\x24\x25\x26\x27\x2a\x2b\x2d\x2f\x3d\x3f\x5e\x5f\x60\x7b\x7c\x7d\x7e'; - // RFC 6532 extends atext to include non-ascii utf - // @see https://tools.ietf.org/html/rfc6532#section-3.1 - $uatext = $atext . '\x{80}-\x{FFFF}'; - return (bool) preg_match('/^[' . $uatext . ']+(\x2e+[' . $uatext . ']+)*$/u', $localPart); - } - - /** - * Returns the found MX Record information after validation including weight for further processing - * - * @return array - */ - public function getMXRecord() - { - return $this->mxRecord; - } - - /** - * Internal method to validate the servers MX records - * - * @return bool|string[] - * @psalm-return bool|list - */ - protected function validateMXRecords() - { - $mxHosts = []; - $weight = []; - $result = getmxrr($this->hostname, $mxHosts, $weight); - if (! empty($mxHosts) && ! empty($weight)) { - $this->mxRecord = array_combine($mxHosts, $weight) ?: []; - } else { - $this->mxRecord = []; - } - - arsort($this->mxRecord); - - // Fallback to IPv4 hosts if no MX record found (RFC 2821 SS 5). - if (! $result) { - $result = gethostbynamel($this->hostname); - if (is_array($result)) { - $this->mxRecord = array_flip($result); - } - } - - if (! $result) { - $this->error(self::INVALID_MX_RECORD); - return $result; - } - - if (! $this->options['useDeepMxCheck']) { - return $result; - } - - $validAddress = false; - $reserved = true; - foreach (array_keys($this->mxRecord) as $hostname) { - $res = $this->isReserved($hostname); - if (! $res) { - $reserved = false; - } - - if (! is_string($hostname) || ! trim($hostname)) { - continue; - } - - if ( - ! $res - && (checkdnsrr($hostname, 'A') - || checkdnsrr($hostname, 'AAAA') - || checkdnsrr($hostname, 'A6')) - ) { - $validAddress = true; - break; - } - } - - if (! $validAddress) { - $result = false; - $error = $reserved ? self::INVALID_SEGMENT : self::INVALID_MX_RECORD; - $this->error($error); - } - - return $result; - } - - /** - * Internal method to validate the hostname part of the email address - * - * @return bool|string[] - * @psalm-return bool|list - */ - protected function validateHostnamePart() - { - $hostname = $this->getHostnameValidator()->setTranslator($this->getTranslator()) - ->isValid($this->hostname); - if (! $hostname) { - $this->error(self::INVALID_HOSTNAME); - // Get messages and errors from hostnameValidator - foreach ($this->getHostnameValidator()->getMessages() as $code => $message) { - $this->abstractOptions['messages'][$code] = $message; - } - } elseif ($this->options['useMxCheck']) { - // MX check on hostname - $hostname = $this->validateMXRecords(); - } - - return $hostname; - } - - /** - * Splits the given value in hostname and local part of the email address - * - * @param string $value Email address to be split - * @return bool Returns false when the email can not be split - */ - protected function splitEmailParts($value) - { - $value = is_string($value) ? $value : ''; - - // Split email address up and disallow '..' - if ( - strpos($value, '..') !== false - || ! preg_match('/^(.+)@([^@]+)$/', $value, $matches) - ) { - return false; - } - - $this->localPart = $matches[1]; - $this->hostname = $this->idnToAscii($matches[2]); - - return true; - } - - /** - * Defined by Laminas\Validator\ValidatorInterface - * - * Returns true if and only if $value is a valid email address - * according to RFC2822 - * - * @link http://www.ietf.org/rfc/rfc2822.txt RFC2822 - * @link http://www.columbia.edu/kermit/ascii.html US-ASCII characters - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $length = true; - $this->setValue($value); - - // Split email address up and disallow '..' - if (! $this->splitEmailParts($this->getValue())) { - $this->error(self::INVALID_FORMAT); - return false; - } - - if ($this->getOption('strict') && (strlen($this->localPart) > 64) || (strlen($this->hostname) > 255)) { - $length = false; - $this->error(self::LENGTH_EXCEEDED); - } - - // Match hostname part - $hostname = false; - if ($this->options['useDomainCheck']) { - $hostname = $this->validateHostnamePart(); - } - - $local = $this->validateLocalPart(); - - // If both parts valid, return true - return ($local && $length) && (! $this->options['useDomainCheck'] || $hostname); - } - - /** - * Safely convert UTF-8 encoded domain name to ASCII - * - * @param string $email the UTF-8 encoded email - * @return string - */ - protected function idnToAscii($email) - { - if (extension_loaded('intl')) { - if (defined('INTL_IDNA_VARIANT_UTS46')) { - return idn_to_ascii($email, 0, INTL_IDNA_VARIANT_UTS46) ?: $email; - } - return idn_to_ascii($email) ?: $email; - } - return $email; - } - - /** - * Safely convert ASCII encoded domain name to UTF-8 - * - * @param string $email the ASCII encoded email - * @return string - */ - protected function idnToUtf8($email) - { - if (strlen($email) === 0) { - return $email; - } - - if (extension_loaded('intl')) { - // The documentation does not clarify what kind of failure - // can happen in idn_to_utf8. One can assume if the source - // is not IDN encoded, it would fail, but it usually returns - // the source string in those cases. - // But not when the source string is long enough. - // Thus we default to source string ourselves. - if (defined('INTL_IDNA_VARIANT_UTS46')) { - return idn_to_utf8($email, 0, INTL_IDNA_VARIANT_UTS46) ?: $email; - } - return idn_to_utf8($email) ?: $email; - } - return $email; - } -} diff --git a/lib/laminas/laminas-validator/src/Exception/BadMethodCallException.php b/lib/laminas/laminas-validator/src/Exception/BadMethodCallException.php deleted file mode 100644 index 48ffcba69..000000000 --- a/lib/laminas/laminas-validator/src/Exception/BadMethodCallException.php +++ /dev/null @@ -1,7 +0,0 @@ - 'Invalid type given', - ]; - - /** @var array */ - protected $messageVariables = []; - - /** @var string */ - protected $valueDelimiter = ','; - - /** @var ValidatorInterface|null */ - protected $validator; - - /** @var bool */ - protected $breakOnFirstFailure = false; - - /** - * Sets the delimiter string that the values will be split upon - * - * @param string $delimiter - * @return $this - */ - public function setValueDelimiter($delimiter) - { - $this->valueDelimiter = $delimiter; - return $this; - } - - /** - * Returns the delimiter string that the values will be split upon - * - * @return string - */ - public function getValueDelimiter() - { - return $this->valueDelimiter; - } - - /** - * Set validator plugin manager - * - * @return void - */ - public function setValidatorPluginManager(ValidatorPluginManager $pluginManager) - { - $this->pluginManager = $pluginManager; - } - - /** - * Get validator plugin manager - * - * @return ValidatorPluginManager - */ - public function getValidatorPluginManager() - { - if (! $this->pluginManager) { - $this->pluginManager = new ValidatorPluginManager(new ServiceManager()); - } - - return $this->pluginManager; - } - - /** - * Sets the Validator for validating each value - * - * @param ValidatorInterface|ValidatorSpecification $validator - * @throws Exception\RuntimeException - * @return $this - */ - public function setValidator($validator) - { - if (is_array($validator)) { - if (! isset($validator['name'])) { - throw new Exception\RuntimeException( - 'Invalid validator specification provided; does not include "name" key' - ); - } - $name = $validator['name']; - $options = $validator['options'] ?? []; - /** @psalm-suppress MixedAssignment $validator */ - $validator = $this->getValidatorPluginManager()->get($name, $options); - } - - if (! $validator instanceof ValidatorInterface) { - throw new Exception\RuntimeException( - 'Invalid validator given' - ); - } - - $this->validator = $validator; - return $this; - } - - /** - * Gets the Validator for validating each value - * - * @return ValidatorInterface|null - */ - public function getValidator() - { - return $this->validator; - } - - /** - * Set break on first failure setting - * - * @param bool $break - * @return $this - */ - public function setBreakOnFirstFailure($break) - { - $this->breakOnFirstFailure = (bool) $break; - return $this; - } - - /** - * Get break on first failure setting - * - * @return bool - */ - public function isBreakOnFirstFailure() - { - return $this->breakOnFirstFailure; - } - - /** - * Defined by Laminas\Validator\ValidatorInterface - * - * Returns true if all values validate true - * - * @param mixed $value - * @param mixed $context Extra "context" to provide the composed validator - * @return bool - * @throws Exception\RuntimeException - */ - public function isValid($value, $context = null) - { - $this->setValue($value); - - if ($value instanceof Traversable) { - $value = ArrayUtils::iteratorToArray($value); - } - - if (is_array($value)) { - $values = $value; - } elseif (is_string($value)) { - $delimiter = $this->getValueDelimiter(); - // Skip explode if delimiter is null, - // used when value is expected to be either an - // array when multiple values and a string for - // single values (ie. MultiCheckbox form behavior) - $values = null !== $delimiter - ? explode($this->valueDelimiter, $value) - : [$value]; - } else { - $values = [$value]; - } - - $validator = $this->getValidator(); - - if (! $validator) { - throw new Exception\RuntimeException(sprintf( - '%s expects a validator to be set; none given', - __METHOD__ - )); - } - - foreach ($values as $value) { - if (! $validator->isValid($value, $context)) { - $this->abstractOptions['messages'][] = $validator->getMessages(); - - if ($this->isBreakOnFirstFailure()) { - return false; - } - } - } - - return ! $this->abstractOptions['messages']; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Count.php b/lib/laminas/laminas-validator/src/File/Count.php deleted file mode 100644 index 1f8ee0960..000000000 --- a/lib/laminas/laminas-validator/src/File/Count.php +++ /dev/null @@ -1,257 +0,0 @@ - "Too many files, maximum '%max%' are allowed but '%count%' are given", - self::TOO_FEW => "Too few files, minimum '%min%' are expected but '%count%' are given", - ]; - - /** @var array Error message template variables */ - protected $messageVariables = [ - 'min' => ['options' => 'min'], - 'max' => ['options' => 'max'], - 'count' => 'count', - ]; - - /** - * Actual filecount - * - * @var int - */ - protected $count; - - /** - * Internal file array - * - * @var array - */ - protected $files; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'min' => null, // Minimum file count, if null there is no minimum file count - 'max' => null, // Maximum file count, if null there is no maximum file count - ]; - - /** - * Sets validator options - * - * Min limits the file count, when used with max=null it is the maximum file count - * It also accepts an array with the keys 'min' and 'max' - * - * If $options is an integer, it will be used as maximum file count - * As Array is accepts the following keys: - * 'min': Minimum filecount - * 'max': Maximum filecount - * - * @param int|array|Traversable $options Options for the adapter - */ - public function __construct($options = null) - { - if (1 < func_num_args()) { - $args = func_get_args(); - $options = [ - 'min' => array_shift($args), - 'max' => array_shift($args), - ]; - } - - if (is_string($options) || is_numeric($options)) { - $options = ['max' => $options]; - } - - parent::__construct($options); - } - - /** - * Returns the minimum file count - * - * @return int - */ - public function getMin() - { - return $this->options['min']; - } - - /** - * Sets the minimum file count - * - * @param int|array $min The minimum file count - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException When min is greater than max. - */ - public function setMin($min) - { - if (is_array($min) && isset($min['min'])) { - $min = $min['min']; - } - - if (! is_numeric($min)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - $min = (int) $min; - if (($this->getMax() !== null) && ($min > $this->getMax())) { - throw new Exception\InvalidArgumentException( - "The minimum must be less than or equal to the maximum file count, but {$min} > {$this->getMax()}" - ); - } - - $this->options['min'] = $min; - return $this; - } - - /** - * Returns the maximum file count - * - * @return int - */ - public function getMax() - { - return $this->options['max']; - } - - /** - * Sets the maximum file count - * - * @param int|array $max The maximum file count - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException When max is smaller than min. - */ - public function setMax($max) - { - if (is_array($max) && isset($max['max'])) { - $max = $max['max']; - } - - if (! is_numeric($max)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - $max = (int) $max; - if (($this->getMin() !== null) && ($max < $this->getMin())) { - throw new Exception\InvalidArgumentException( - "The maximum must be greater than or equal to the minimum file count, but {$max} < {$this->getMin()}" - ); - } - - $this->options['max'] = $max; - return $this; - } - - /** - * Adds a file for validation - * - * @param string|array $file - * @return $this - */ - public function addFile($file) - { - if (is_string($file)) { - $file = [$file]; - } - - if (is_array($file)) { - foreach ($file as $name) { - if (! isset($this->files[$name]) && ! empty($name)) { - $this->files[$name] = $name; - } - } - } - - return $this; - } - - /** - * Returns true if and only if the file count of all checked files is at least min and - * not bigger than max (when max is not null). Attention: When checking with set min you - * must give all files with the first call, otherwise you will get a false. - * - * @param string|array $value Filenames to check for count - * @param array $file File data from \Laminas\File\Transfer\Transfer - * @return bool - */ - public function isValid($value, $file = null) - { - if (($file !== null) && ! array_key_exists('destination', $file)) { - $file['destination'] = dirname($value); - } - - if (($file !== null) && array_key_exists('tmp_name', $file)) { - $value = $file['destination'] . DIRECTORY_SEPARATOR . $file['name']; - } - - if (($file === null) || ! empty($file['tmp_name'])) { - $this->addFile($value); - } - - $this->count = count($this->files); - if (($this->getMax() !== null) && ($this->count > $this->getMax())) { - return $this->throwError($file, self::TOO_MANY); - } - - if (($this->getMin() !== null) && ($this->count < $this->getMin())) { - return $this->throwError($file, self::TOO_FEW); - } - - return true; - } - - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = $file['name']; - } - } elseif (is_string($file)) { - $this->value = $file; - } - } - - $this->error($errorType); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Crc32.php b/lib/laminas/laminas-validator/src/File/Crc32.php deleted file mode 100644 index 94963bf1f..000000000 --- a/lib/laminas/laminas-validator/src/File/Crc32.php +++ /dev/null @@ -1,110 +0,0 @@ - 'File does not match the given crc32 hashes', - self::NOT_DETECTED => 'A crc32 hash could not be evaluated for the given file', - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** - * Options for this validator - * - * @var string - */ - protected $options = [ - 'algorithm' => 'crc32', - 'hash' => null, - ]; - - /** - * Returns all set crc32 hashes - * - * @return array - */ - public function getCrc32() - { - return $this->getHash(); - } - - /** - * Sets the crc32 hash for one or multiple files - * - * @param string|array $options - * @return $this Provides a fluent interface - */ - public function setCrc32($options) - { - $this->setHash($options); - return $this; - } - - /** - * Adds the crc32 hash for one or multiple files - * - * @param string|array $options - * @return $this Provides a fluent interface - */ - public function addCrc32($options) - { - $this->addHash($options); - return $this; - } - - /** - * Returns true if and only if the given file confirms the set hash - * - * @param string|array $value Filename to check for hash - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_FOUND); - return false; - } - - $hashes = array_unique(array_keys($this->getHash())); - $filehash = hash_file('crc32', $fileInfo['file']); - if ($filehash === false) { - $this->error(self::NOT_DETECTED); - return false; - } - - foreach ($hashes as $hash) { - if ($filehash === $hash) { - return true; - } - } - - $this->error(self::DOES_NOT_MATCH); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/ExcludeExtension.php b/lib/laminas/laminas-validator/src/File/ExcludeExtension.php deleted file mode 100644 index 47741fc26..000000000 --- a/lib/laminas/laminas-validator/src/File/ExcludeExtension.php +++ /dev/null @@ -1,72 +0,0 @@ - 'File has an incorrect extension', - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** - * Returns true if and only if the file extension of $value is not included in the - * set extension list - * - * @param string|array $value Real file to check for extension - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - // Is file readable ? - if ( - ! $this->getAllowNonExistentFile() - && (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) - ) { - $this->error(self::NOT_FOUND); - return false; - } - - $this->setValue($fileInfo['filename']); - - $extension = substr($fileInfo['filename'], strrpos($fileInfo['filename'], '.') + 1); - $extensions = $this->getExtension(); - - if ($this->getCase() && (! in_array($extension, $extensions))) { - return true; - } elseif (! $this->getCase()) { - foreach ($extensions as $ext) { - if (strtolower($ext) === strtolower($extension)) { - $this->error(self::FALSE_EXTENSION); - return false; - } - } - - return true; - } - - $this->error(self::FALSE_EXTENSION); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/ExcludeMimeType.php b/lib/laminas/laminas-validator/src/File/ExcludeMimeType.php deleted file mode 100644 index f5a321c09..000000000 --- a/lib/laminas/laminas-validator/src/File/ExcludeMimeType.php +++ /dev/null @@ -1,97 +0,0 @@ - "File has an incorrect mimetype of '%type%'", - self::NOT_DETECTED => 'The mimetype could not be detected from the file', - self::NOT_READABLE => 'File is not readable or does not exist', - ]; - - /** - * Returns true if the mimetype of the file does not matche the given ones. Also parts - * of mimetypes can be checked. If you give for example "image" all image - * mime types will not be accepted like "image/gif", "image/jpeg" and so on. - * - * @param string|array $value Real file to check for mimetype - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file, true); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_READABLE); - return false; - } - - $mimefile = $this->getMagicFile(); - if (class_exists('finfo', false)) { - if (! $this->isMagicFileDisabled() && (! empty($mimefile) && empty($this->finfo))) { - $this->finfo = finfo_open(FILEINFO_MIME_TYPE, $mimefile); - } - - if (empty($this->finfo)) { - $this->finfo = finfo_open(FILEINFO_MIME_TYPE); - } - - $this->type = null; - if (! empty($this->finfo)) { - $this->type = finfo_file($this->finfo, $fileInfo['file']); - } - } - - if (empty($this->type) && $this->getHeaderCheck()) { - $this->type = $fileInfo['filetype']; - } - - if (empty($this->type)) { - $this->error(self::NOT_DETECTED); - return false; - } - - $mimetype = $this->getMimeType(true); - if (in_array($this->type, $mimetype)) { - $this->error(self::FALSE_TYPE); - return false; - } - - $types = explode('/', $this->type); - $types = array_merge($types, explode('-', $this->type)); - $types = array_merge($types, explode(';', $this->type)); - foreach ($mimetype as $mime) { - if (in_array($mime, $types)) { - $this->error(self::FALSE_TYPE); - return false; - } - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Exists.php b/lib/laminas/laminas-validator/src/File/Exists.php deleted file mode 100644 index 80a27c975..000000000 --- a/lib/laminas/laminas-validator/src/File/Exists.php +++ /dev/null @@ -1,183 +0,0 @@ - 'File does not exist', - ]; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'directory' => null, // internal list of directories - ]; - - /** @var array Error message template variables */ - protected $messageVariables = [ - 'directory' => ['options' => 'directory'], - ]; - - /** - * Sets validator options - * - * @param string|array|Traversable $options - */ - public function __construct($options = null) - { - if (is_string($options)) { - $options = explode(',', $options); - } - - if (is_array($options) && ! array_key_exists('directory', $options)) { - $options = ['directory' => $options]; - } - - parent::__construct($options); - } - - /** - * Returns the set file directories which are checked - * - * @param bool $asArray Returns the values as array; when false, a concatenated string is returned - * @return string|null - */ - public function getDirectory($asArray = false) - { - $asArray = (bool) $asArray; - $directory = $this->options['directory']; - if ($asArray && isset($directory)) { - $directory = explode(',', (string) $directory); - } - - return $directory; - } - - /** - * Sets the file directory which will be checked - * - * @param string|array $directory The directories to validate - * @return self Provides a fluent interface - */ - public function setDirectory($directory) - { - $this->options['directory'] = null; - $this->addDirectory($directory); - return $this; - } - - /** - * Adds the file directory which will be checked - * - * @param string|array $directory The directory to add for validation - * @return self Provides a fluent interface - * @throws Exception\InvalidArgumentException - */ - public function addDirectory($directory) - { - $directories = $this->getDirectory(true); - if (! isset($directories)) { - $directories = []; - } - - if (is_string($directory)) { - $directory = explode(',', $directory); - } elseif (! is_array($directory)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - foreach ($directory as $content) { - if (empty($content) || ! is_string($content)) { - continue; - } - - $directories[] = trim($content); - } - $directories = array_unique($directories); - - // Sanity check to ensure no empty values - foreach ($directories as $key => $dir) { - if (empty($dir)) { - unset($directories[$key]); - } - } - - $this->options['directory'] = ! empty($directory) - ? implode(',', $directories) : null; - - return $this; - } - - /** - * Returns true if and only if the file already exists in the set directories - * - * @param string|array $value Real file to check for existence - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file, false, true); - - $this->setValue($fileInfo['filename']); - - $check = false; - $directories = $this->getDirectory(true); - if (! isset($directories)) { - $check = true; - if (! file_exists($fileInfo['file'])) { - $this->error(self::DOES_NOT_EXIST); - return false; - } - } else { - foreach ($directories as $directory) { - if (! isset($directory) || '' === $directory) { - continue; - } - - $check = true; - if (! file_exists($directory . DIRECTORY_SEPARATOR . $fileInfo['basename'])) { - $this->error(self::DOES_NOT_EXIST); - return false; - } - } - } - - if (! $check) { - $this->error(self::DOES_NOT_EXIST); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Extension.php b/lib/laminas/laminas-validator/src/File/Extension.php deleted file mode 100644 index c977d9bcd..000000000 --- a/lib/laminas/laminas-validator/src/File/Extension.php +++ /dev/null @@ -1,242 +0,0 @@ - Error message templates */ - protected $messageTemplates = [ - self::FALSE_EXTENSION => 'File has an incorrect extension', - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'case' => false, // Validate case sensitive - 'extension' => '', // List of extensions - 'allowNonExistentFile' => false, // Allow validation even if file does not exist - ]; - - /** @var array Error message template variables */ - protected $messageVariables = [ - 'extension' => ['options' => 'extension'], - ]; - - /** - * Sets validator options - * - * @param string|array|Traversable $options - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - $case = null; - if (1 < func_num_args()) { - $case = func_get_arg(1); - } - - if (is_array($options)) { - if (isset($options['case'])) { - $case = $options['case']; - unset($options['case']); - } - - if (! array_key_exists('extension', $options)) { - $options = ['extension' => $options]; - } - } else { - $options = ['extension' => $options]; - } - - if ($case !== null) { - $options['case'] = $case; - } - - parent::__construct($options); - } - - /** - * Returns the case option - * - * @return bool - */ - public function getCase() - { - return $this->options['case']; - } - - /** - * Sets the case to use - * - * @param bool $case - * @return $this Provides a fluent interface - */ - public function setCase($case) - { - $this->options['case'] = (bool) $case; - return $this; - } - - /** - * Returns the set file extension - * - * @return array - */ - public function getExtension() - { - if ( - ! array_key_exists('extension', $this->options) - || ! is_string($this->options['extension']) - ) { - return []; - } - - return explode(',', $this->options['extension']); - } - - /** - * Sets the file extensions - * - * @param string|array $extension The extensions to validate - * @return $this Provides a fluent interface - */ - public function setExtension($extension) - { - $this->options['extension'] = null; - $this->addExtension($extension); - return $this; - } - - /** - * Adds the file extensions - * - * @param string|array $extension The extensions to add for validation - * @return $this Provides a fluent interface - */ - public function addExtension($extension) - { - $extensions = $this->getExtension(); - if (is_string($extension)) { - $extension = explode(',', $extension); - } - - foreach ($extension as $content) { - if (empty($content) || ! is_string($content)) { - continue; - } - - $extensions[] = trim($content); - } - - $extensions = array_unique($extensions); - - // Sanity check to ensure no empty values - foreach ($extensions as $key => $ext) { - if (empty($ext)) { - unset($extensions[$key]); - } - } - - $this->options['extension'] = implode(',', $extensions); - return $this; - } - - /** - * Returns whether or not to allow validation of non-existent files. - * - * @return bool - */ - public function getAllowNonExistentFile() - { - return $this->options['allowNonExistentFile']; - } - - /** - * Sets the flag indicating whether or not to allow validation of non-existent files. - * - * @param bool $flag Whether or not to allow validation of non-existent files. - * @return $this Provides a fluent interface - */ - public function setAllowNonExistentFile($flag) - { - $this->options['allowNonExistentFile'] = (bool) $flag; - return $this; - } - - /** - * Returns true if and only if the file extension of $value is included in the - * set extension list - * - * @param string|array $value Real file to check for extension - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - // Is file readable ? - if ( - ! $this->getAllowNonExistentFile() - && (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) - ) { - $this->error(self::NOT_FOUND); - return false; - } - - $this->setValue($fileInfo['filename']); - - $extension = substr($fileInfo['filename'], strrpos($fileInfo['filename'], '.') + 1); - $extensions = $this->getExtension(); - - if ($this->getCase() && (in_array($extension, $extensions))) { - return true; - } elseif (! $this->getCase()) { - foreach ($extensions as $ext) { - if (strtolower($ext) === strtolower($extension)) { - return true; - } - } - } - - $this->error(self::FALSE_EXTENSION); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/FileInformationTrait.php b/lib/laminas/laminas-validator/src/File/FileInformationTrait.php deleted file mode 100644 index 295027b93..000000000 --- a/lib/laminas/laminas-validator/src/File/FileInformationTrait.php +++ /dev/null @@ -1,164 +0,0 @@ -getLegacyFileInfo($file, $hasType, $hasBasename); - } - - if (is_array($value)) { - return $this->getSapiFileInfo($value, $hasType, $hasBasename); - } - - if ($value instanceof UploadedFileInterface) { - return $this->getPsr7FileInfo($value, $hasType, $hasBasename); - } - - return $this->getFileBasedFileInfo($value, $hasType, $hasBasename); - } - - /** - * Generate file information array with legacy Laminas_File_Transfer API - * - * @param array $file File data - * @param bool $hasType Return with filetype - * @param bool $hasBasename Basename is calculated from location path - * @return array - */ - private function getLegacyFileInfo( - array $file, - $hasType = false, - $hasBasename = false - ) { - $fileInfo = []; - - $fileInfo['filename'] = $file['name']; - $fileInfo['file'] = $file['tmp_name']; - - if ($hasBasename) { - $fileInfo['basename'] = basename($fileInfo['file']); - } - - if ($hasType) { - $fileInfo['filetype'] = $file['type']; - } - - return $fileInfo; - } - - /** - * Generate file information array with SAPI - * - * @param array $file File data from SAPI - * @param bool $hasType Return with filetype - * @param bool $hasBasename Filename is calculated from location path - * @return array - */ - private function getSapiFileInfo( - array $file, - $hasType = false, - $hasBasename = false - ) { - if (! isset($file['tmp_name']) || ! isset($file['name'])) { - throw new Exception\InvalidArgumentException( - 'Value array must be in $_FILES format' - ); - } - - $fileInfo = []; - - $fileInfo['file'] = $file['tmp_name']; - $fileInfo['filename'] = $file['name']; - - if ($hasBasename) { - $fileInfo['basename'] = basename($fileInfo['file']); - } - - if ($hasType) { - $fileInfo['filetype'] = $file['type']; - } - - return $fileInfo; - } - - /** - * Generate file information array with PSR-7 UploadedFileInterface - * - * @param bool $hasType Return with filetype - * @param bool $hasBasename Filename is calculated from location path - * @return array - */ - private function getPsr7FileInfo( - UploadedFileInterface $file, - $hasType = false, - $hasBasename = false - ) { - $fileInfo = []; - - $fileInfo['file'] = $file->getStream()->getMetadata('uri'); - $fileInfo['filename'] = $file->getClientFilename(); - - if ($hasBasename) { - $fileInfo['basename'] = basename($fileInfo['file']); - } - - if ($hasType) { - $fileInfo['filetype'] = $file->getClientMediaType(); - } - - return $fileInfo; - } - - /** - * Generate file information array with base method - * - * @param string $file File path - * @param bool $hasType Return with filetype - * @param bool $hasBasename Filename is calculated from location path - * @return array - */ - private function getFileBasedFileInfo( - $file, - $hasType = false, - $hasBasename = false - ) { - $fileInfo = []; - - $fileInfo['file'] = $file; - $fileInfo['filename'] = basename($fileInfo['file']); - - if ($hasBasename) { - $fileInfo['basename'] = basename($fileInfo['file']); - } - - if ($hasType) { - $fileInfo['filetype'] = null; - } - - return $fileInfo; - } -} diff --git a/lib/laminas/laminas-validator/src/File/FilesSize.php b/lib/laminas/laminas-validator/src/File/FilesSize.php deleted file mode 100644 index 25bd90250..000000000 --- a/lib/laminas/laminas-validator/src/File/FilesSize.php +++ /dev/null @@ -1,184 +0,0 @@ - "All files in sum should have a maximum size of '%max%' but '%size%' were detected", - self::TOO_SMALL => "All files in sum should have a minimum size of '%min%' but '%size%' were detected", - self::NOT_READABLE => 'One or more files can not be read', - ]; - - /** - * Internal file array - * - * @var array - */ - protected $files; - - /** - * Sets validator options - * - * Min limits the used disk space for all files, when used with max=null it is the maximum file size - * It also accepts an array with the keys 'min' and 'max' - * - * @param int|array|Traversable $options Options for this validator - * @throws InvalidArgumentException - */ - public function __construct($options = null) - { - $this->files = []; - $this->setSize(0); - - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } elseif (is_scalar($options)) { - $options = ['max' => $options]; - } elseif (! is_array($options)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - if (1 < func_num_args()) { - $argv = func_get_args(); - array_shift($argv); - $options['max'] = array_shift($argv); - if (! empty($argv)) { - $options['useByteString'] = array_shift($argv); - } - } - - parent::__construct($options); - } - - /** - * Returns true if and only if the disk usage of all files is at least min and - * not bigger than max (when max is not null). - * - * @param string|array $value Real file to check for size - * @param array $file File data from \Laminas\File\Transfer\Transfer - * @return bool - */ - public function isValid($value, $file = null) - { - if (is_string($value)) { - $value = [$value]; - } elseif (is_array($value) && isset($value['tmp_name'])) { - $value = [$value]; - } - - $min = $this->getMin(true); - $max = $this->getMax(true); - $size = $this->getSize(); - foreach ($value as $files) { - if (is_array($files)) { - if (! isset($files['tmp_name']) || ! isset($files['name'])) { - throw new Exception\InvalidArgumentException( - 'Value array must be in $_FILES format' - ); - } - $file = $files; - $files = $files['tmp_name']; - } - - // Is file readable ? - if (empty($files) || false === is_readable($files)) { - $this->throwError($file, self::NOT_READABLE); - continue; - } - - if (! isset($this->files[$files])) { - $this->files[$files] = $files; - } else { - // file already counted... do not count twice - continue; - } - - // limited to 2GB files - ErrorHandler::start(); - $size += filesize($files); - ErrorHandler::stop(); - $this->size = $size; - if (($max !== null) && ($max < $size)) { - if ($this->getByteString()) { - $this->options['max'] = $this->toByteString($max); - $this->size = $this->toByteString($size); - $this->throwError($file, self::TOO_BIG); - $this->options['max'] = $max; - $this->size = $size; - } else { - $this->throwError($file, self::TOO_BIG); - } - } - } - - // Check that aggregate files are >= minimum size - if (($min !== null) && ($size < $min)) { - if ($this->getByteString()) { - $this->options['min'] = $this->toByteString($min); - $this->size = $this->toByteString($size); - $this->throwError($file, self::TOO_SMALL); - $this->options['min'] = $min; - $this->size = $size; - } else { - $this->throwError($file, self::TOO_SMALL); - } - } - - if ($this->getMessages()) { - return false; - } - - return true; - } - - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = $file['name']; - } - } elseif (is_string($file)) { - $this->value = $file; - } - } - - $this->error($errorType); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Hash.php b/lib/laminas/laminas-validator/src/File/Hash.php deleted file mode 100644 index bf11570b8..000000000 --- a/lib/laminas/laminas-validator/src/File/Hash.php +++ /dev/null @@ -1,177 +0,0 @@ - 'File does not match the given hashes', - self::NOT_DETECTED => 'A hash could not be evaluated for the given file', - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** - * Options for this validator - * - * @var string - */ - protected $options = [ - 'algorithm' => 'crc32', - 'hash' => null, - ]; - - /** - * Sets validator options - * - * @param string|array $options - */ - public function __construct($options = null) - { - if ( - is_scalar($options) || - (is_array($options) && ! array_key_exists('hash', $options)) - ) { - $options = ['hash' => $options]; - } - - if (1 < func_num_args()) { - $options['algorithm'] = func_get_arg(1); - } - - parent::__construct($options); - } - - /** - * Returns the set hash values as array, the hash as key and the algorithm the value - * - * @return array - */ - public function getHash() - { - return $this->options['hash']; - } - - /** - * Sets the hash for one or multiple files - * - * @param string|array $options - * @return $this Provides a fluent interface - */ - public function setHash($options) - { - $this->options['hash'] = null; - $this->addHash($options); - - return $this; - } - - /** - * Adds the hash for one or multiple files - * - * @param string|array $options - * @throws Exception\InvalidArgumentException - * @return $this Provides a fluent interface - */ - public function addHash($options) - { - if (is_string($options)) { - $options = [$options]; - } elseif (! is_array($options)) { - throw new Exception\InvalidArgumentException('False parameter given'); - } - - $known = hash_algos(); - if (! isset($options['algorithm'])) { - $algorithm = $this->options['algorithm']; - } else { - $algorithm = $options['algorithm']; - unset($options['algorithm']); - } - - if (! in_array($algorithm, $known)) { - throw new Exception\InvalidArgumentException("Unknown algorithm '{$algorithm}'"); - } - - foreach ($options as $value) { - if (! is_string($value)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Hash must be a string, %s received', - is_object($value) ? get_class($value) : gettype($value) - )); - } - $this->options['hash'][$value] = $algorithm; - } - - return $this; - } - - /** - * Returns true if and only if the given file confirms the set hash - * - * @param string|array $value File to check for hash - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_FOUND); - return false; - } - - $algos = array_unique(array_values($this->getHash())); - foreach ($algos as $algorithm) { - $filehash = hash_file($algorithm, $fileInfo['file']); - - if ($filehash === false) { - $this->error(self::NOT_DETECTED); - return false; - } - - if (isset($this->getHash()[$filehash]) && $this->getHash()[$filehash] === $algorithm) { - return true; - } - } - - $this->error(self::DOES_NOT_MATCH); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/ImageSize.php b/lib/laminas/laminas-validator/src/File/ImageSize.php deleted file mode 100644 index 91f478bb7..000000000 --- a/lib/laminas/laminas-validator/src/File/ImageSize.php +++ /dev/null @@ -1,377 +0,0 @@ - "Maximum allowed width for image should be '%maxwidth%' but '%width%' detected", - self::WIDTH_TOO_SMALL => "Minimum expected width for image should be '%minwidth%' but '%width%' detected", - self::HEIGHT_TOO_BIG => "Maximum allowed height for image should be '%maxheight%' but '%height%' detected", - self::HEIGHT_TOO_SMALL => "Minimum expected height for image should be '%minheight%' but '%height%' detected", - self::NOT_DETECTED => 'The size of image could not be detected', - self::NOT_READABLE => 'File is not readable or does not exist', - ]; - - /** @var array Error message template variables */ - protected $messageVariables = [ - 'minwidth' => ['options' => 'minWidth'], - 'maxwidth' => ['options' => 'maxWidth'], - 'minheight' => ['options' => 'minHeight'], - 'maxheight' => ['options' => 'maxHeight'], - 'width' => 'width', - 'height' => 'height', - ]; - - /** - * Detected width - * - * @var int - */ - protected $width; - - /** - * Detected height - * - * @var int - */ - protected $height; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'minWidth' => null, // Minimum image width - 'maxWidth' => null, // Maximum image width - 'minHeight' => null, // Minimum image height - 'maxHeight' => null, // Maximum image height - ]; - - /** - * Sets validator options - * - * Accepts the following option keys: - * - minheight - * - minwidth - * - maxheight - * - maxwidth - * - * @param null|array|Traversable $options - */ - public function __construct($options = null) - { - if (1 < func_num_args()) { - if (! is_array($options)) { - $options = ['minWidth' => $options]; - } - - $argv = func_get_args(); - array_shift($argv); - $options['minHeight'] = array_shift($argv); - if (! empty($argv)) { - $options['maxWidth'] = array_shift($argv); - if (! empty($argv)) { - $options['maxHeight'] = array_shift($argv); - } - } - } - - parent::__construct($options); - } - - /** - * Returns the minimum allowed width - * - * @return int - */ - public function getMinWidth() - { - return $this->options['minWidth']; - } - - /** - * Sets the minimum allowed width - * - * @param int $minWidth - * @return $this Provides a fluid interface - * @throws Exception\InvalidArgumentException When minwidth is greater than maxwidth. - */ - public function setMinWidth($minWidth) - { - if (($this->getMaxWidth() !== null) && ($minWidth > $this->getMaxWidth())) { - throw new Exception\InvalidArgumentException( - 'The minimum image width must be less than or equal to the ' - . " maximum image width, but {$minWidth} > {$this->getMaxWidth()}" - ); - } - - $this->options['minWidth'] = (int) $minWidth; - return $this; - } - - /** - * Returns the maximum allowed width - * - * @return int - */ - public function getMaxWidth() - { - return $this->options['maxWidth']; - } - - /** - * Sets the maximum allowed width - * - * @param int $maxWidth - * @return $this Provides a fluid interface - * @throws Exception\InvalidArgumentException When maxwidth is less than minwidth. - */ - public function setMaxWidth($maxWidth) - { - if (($this->getMinWidth() !== null) && ($maxWidth < $this->getMinWidth())) { - throw new Exception\InvalidArgumentException( - 'The maximum image width must be greater than or equal to the ' - . "minimum image width, but {$maxWidth} < {$this->getMinWidth()}" - ); - } - - $this->options['maxWidth'] = (int) $maxWidth; - return $this; - } - - /** - * Returns the minimum allowed height - * - * @return int - */ - public function getMinHeight() - { - return $this->options['minHeight']; - } - - /** - * Sets the minimum allowed height - * - * @param int $minHeight - * @return $this Provides a fluid interface - * @throws Exception\InvalidArgumentException When minheight is greater than maxheight. - */ - public function setMinHeight($minHeight) - { - if (($this->getMaxHeight() !== null) && ($minHeight > $this->getMaxHeight())) { - throw new Exception\InvalidArgumentException( - 'The minimum image height must be less than or equal to the ' - . " maximum image height, but {$minHeight} > {$this->getMaxHeight()}" - ); - } - - $this->options['minHeight'] = (int) $minHeight; - return $this; - } - - /** - * Returns the maximum allowed height - * - * @return int - */ - public function getMaxHeight() - { - return $this->options['maxHeight']; - } - - /** - * Sets the maximum allowed height - * - * @param int $maxHeight - * @return $this Provides a fluid interface - * @throws Exception\InvalidArgumentException When maxheight is less than minheight. - */ - public function setMaxHeight($maxHeight) - { - if (($this->getMinHeight() !== null) && ($maxHeight < $this->getMinHeight())) { - throw new Exception\InvalidArgumentException( - 'The maximum image height must be greater than or equal to the ' - . "minimum image height, but {$maxHeight} < {$this->getMinHeight()}" - ); - } - - $this->options['maxHeight'] = (int) $maxHeight; - return $this; - } - - /** - * Returns the set minimum image sizes - * - * @return array - */ - public function getImageMin() - { - return ['minWidth' => $this->getMinWidth(), 'minHeight' => $this->getMinHeight()]; - } - - /** - * Returns the set maximum image sizes - * - * @return array - */ - public function getImageMax() - { - return ['maxWidth' => $this->getMaxWidth(), 'maxHeight' => $this->getMaxHeight()]; - } - - /** - * Returns the set image width sizes - * - * @return array - */ - public function getImageWidth() - { - return ['minWidth' => $this->getMinWidth(), 'maxWidth' => $this->getMaxWidth()]; - } - - /** - * Returns the set image height sizes - * - * @return array - */ - public function getImageHeight() - { - return ['minHeight' => $this->getMinHeight(), 'maxHeight' => $this->getMaxHeight()]; - } - - /** - * Sets the minimum image size - * - * @param array $options The minimum image dimensions - * @return $this Provides a fluent interface - */ - public function setImageMin($options) - { - $this->setOptions($options); - return $this; - } - - /** - * Sets the maximum image size - * - * @param array|Traversable $options The maximum image dimensions - * @return $this Provides a fluent interface - */ - public function setImageMax($options) - { - $this->setOptions($options); - return $this; - } - - /** - * Sets the minimum and maximum image width - * - * @param array $options The image width dimensions - * @return $this Provides a fluent interface - */ - public function setImageWidth($options) - { - $this->setImageMin($options); - $this->setImageMax($options); - - return $this; - } - - /** - * Sets the minimum and maximum image height - * - * @param array $options The image height dimensions - * @return $this Provides a fluent interface - */ - public function setImageHeight($options) - { - $this->setImageMin($options); - $this->setImageMax($options); - - return $this; - } - - /** - * Returns true if and only if the image size of $value is at least min and - * not bigger than max - * - * @param string|array $value Real file to check for image size - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_READABLE); - return false; - } - - ErrorHandler::start(); - $size = getimagesize($fileInfo['file']); - ErrorHandler::stop(); - - if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) { - $this->error(self::NOT_DETECTED); - return false; - } - - $this->width = $size[0]; - $this->height = $size[1]; - if ($this->width < $this->getMinWidth()) { - $this->error(self::WIDTH_TOO_SMALL); - } - - if (($this->getMaxWidth() !== null) && ($this->getMaxWidth() < $this->width)) { - $this->error(self::WIDTH_TOO_BIG); - } - - if ($this->height < $this->getMinHeight()) { - $this->error(self::HEIGHT_TOO_SMALL); - } - - if (($this->getMaxHeight() !== null) && ($this->getMaxHeight() < $this->height)) { - $this->error(self::HEIGHT_TOO_BIG); - } - - if ($this->getMessages()) { - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/File/IsCompressed.php b/lib/laminas/laminas-validator/src/File/IsCompressed.php deleted file mode 100644 index 86ce6164e..000000000 --- a/lib/laminas/laminas-validator/src/File/IsCompressed.php +++ /dev/null @@ -1,84 +0,0 @@ - "File is not compressed, '%type%' detected", - self::NOT_DETECTED => 'The mimetype could not be detected from the file', - self::NOT_READABLE => 'File is not readable or does not exist', - ]; - - /** - * Sets validator options - * - * @param string|array|Traversable $options - */ - public function __construct($options = []) - { - // http://hul.harvard.edu/ois/systems/wax/wax-public-help/mimetypes.htm - $default = [ - 'application/arj', - 'application/gnutar', - 'application/lha', - 'application/lzx', - 'application/vnd.ms-cab-compressed', - 'application/x-ace-compressed', - 'application/x-arc', - 'application/x-archive', - 'application/x-arj', - 'application/x-bzip', - 'application/x-bzip2', - 'application/x-cab-compressed', - 'application/x-compress', - 'application/x-compressed', - 'application/x-cpio', - 'application/x-debian-package', - 'application/x-eet', - 'application/x-gzip', - 'application/x-java-pack200', - 'application/x-lha', - 'application/x-lharc', - 'application/x-lzh', - 'application/x-lzma', - 'application/x-lzx', - 'application/x-rar', - 'application/x-sit', - 'application/x-stuffit', - 'application/x-tar', - 'application/zip', - 'application/x-zip', - 'application/zoo', - 'multipart/x-gzip', - ]; - - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - if ($options === null) { - $options = []; - } - - parent::__construct($options); - - if (! $this->getMimeType()) { - $this->setMimeType($default); - } - } -} diff --git a/lib/laminas/laminas-validator/src/File/IsImage.php b/lib/laminas/laminas-validator/src/File/IsImage.php deleted file mode 100644 index ced192753..000000000 --- a/lib/laminas/laminas-validator/src/File/IsImage.php +++ /dev/null @@ -1,110 +0,0 @@ - "File is no image, '%type%' detected", - self::NOT_DETECTED => 'The mimetype could not be detected from the file', - self::NOT_READABLE => 'File is not readable or does not exist', - ]; - - /** - * Sets validator options - * - * @param array|Traversable|string $options - */ - public function __construct($options = []) - { - // http://www.iana.org/assignments/media-types/media-types.xhtml#image - $default = [ - 'application/cdf', - 'application/dicom', - 'application/fractals', - 'application/postscript', - 'application/vnd.hp-hpgl', - 'application/vnd.oasis.opendocument.graphics', - 'application/x-cdf', - 'application/x-cmu-raster', - 'application/x-ima', - 'application/x-inventor', - 'application/x-koan', - 'application/x-portable-anymap', - 'application/x-world-x-3dmf', - 'image/bmp', - 'image/c', - 'image/cgm', - 'image/fif', - 'image/gif', - 'image/heic', - 'image/heif', - 'image/jpeg', - 'image/jpm', - 'image/jpx', - 'image/jp2', - 'image/naplps', - 'image/pjpeg', - 'image/png', - 'image/svg', - 'image/svg+xml', - 'image/tiff', - 'image/vnd.adobe.photoshop', - 'image/vnd.djvu', - 'image/vnd.fpx', - 'image/vnd.net-fpx', - 'image/webp', - 'image/x-cmu-raster', - 'image/x-cmx', - 'image/x-coreldraw', - 'image/x-cpi', - 'image/x-emf', - 'image/x-ico', - 'image/x-icon', - 'image/x-jg', - 'image/x-ms-bmp', - 'image/x-niff', - 'image/x-pict', - 'image/x-pcx', - 'image/x-png', - 'image/x-portable-anymap', - 'image/x-portable-bitmap', - 'image/x-portable-greymap', - 'image/x-portable-pixmap', - 'image/x-quicktime', - 'image/x-rgb', - 'image/x-tiff', - 'image/x-unknown', - 'image/x-windows-bmp', - 'image/x-xpmi', - ]; - - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - if ($options === null) { - $options = []; - } - - parent::__construct($options); - - if (! $this->getMimeType()) { - $this->setMimeType($default); - } - } -} diff --git a/lib/laminas/laminas-validator/src/File/Md5.php b/lib/laminas/laminas-validator/src/File/Md5.php deleted file mode 100644 index 4d48edf4e..000000000 --- a/lib/laminas/laminas-validator/src/File/Md5.php +++ /dev/null @@ -1,110 +0,0 @@ - 'File does not match the given md5 hashes', - self::NOT_DETECTED => 'An md5 hash could not be evaluated for the given file', - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** - * Options for this validator - * - * @var string - */ - protected $options = [ - 'algorithm' => 'md5', - 'hash' => null, - ]; - - /** - * Returns all set md5 hashes - * - * @return array - */ - public function getMd5() - { - return $this->getHash(); - } - - /** - * Sets the md5 hash for one or multiple files - * - * @param string|array $options - * @return Hash Provides a fluent interface - */ - public function setMd5($options) - { - $this->setHash($options); - return $this; - } - - /** - * Adds the md5 hash for one or multiple files - * - * @param string|array $options - * @return Hash Provides a fluent interface - */ - public function addMd5($options) - { - $this->addHash($options); - return $this; - } - - /** - * Returns true if and only if the given file confirms the set hash - * - * @param string|array $value Filename to check for hash - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_FOUND); - return false; - } - - $hashes = array_unique(array_keys($this->getHash())); - $filehash = hash_file('md5', $fileInfo['file']); - if ($filehash === false) { - $this->error(self::NOT_DETECTED); - return false; - } - - foreach ($hashes as $hash) { - if ($filehash === $hash) { - return true; - } - } - - $this->error(self::DOES_NOT_MATCH); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/MimeType.php b/lib/laminas/laminas-validator/src/File/MimeType.php deleted file mode 100644 index 8c2c43a04..000000000 --- a/lib/laminas/laminas-validator/src/File/MimeType.php +++ /dev/null @@ -1,416 +0,0 @@ - "File has an incorrect mimetype of '%type%'", - self::NOT_DETECTED => 'The mimetype could not be detected from the file', - self::NOT_READABLE => 'File is not readable or does not exist', - ]; - - /** @var array */ - protected $messageVariables = [ - 'type' => 'type', - ]; - - /** @var string */ - protected $type; - - /** - * Finfo object to use - * - * @var resource - */ - protected $finfo; - - /** - * If no environment variable 'MAGIC' is set, try and autodiscover it based on common locations - * - * @var array - */ - protected $magicFiles = [ - '/usr/share/misc/magic', - '/usr/share/misc/magic.mime', - '/usr/share/misc/magic.mgc', - '/usr/share/mime/magic', - '/usr/share/mime/magic.mime', - '/usr/share/mime/magic.mgc', - '/usr/share/file/magic', - '/usr/share/file/magic.mime', - '/usr/share/file/magic.mgc', - ]; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'enableHeaderCheck' => false, // Allow header check - 'disableMagicFile' => false, // Disable usage of magicfile - 'magicFile' => null, // Magicfile to use - 'mimeType' => null, // Mimetype to allow - ]; - - /** - * Sets validator options - * - * Mimetype to accept - * - NULL means default PHP usage by using the environment variable 'magic' - * - FALSE means disabling searching for mimetype, should be used for PHP 5.3 - * - A string is the mimetype file to use - * - * @param string|array|Traversable $options - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } elseif (is_string($options)) { - $this->setMimeType($options); - $options = []; - } elseif (is_array($options)) { - if (isset($options['magicFile'])) { - $this->setMagicFile($options['magicFile']); - unset($options['magicFile']); - } - - if (isset($options['enableHeaderCheck'])) { - $this->enableHeaderCheck($options['enableHeaderCheck']); - unset($options['enableHeaderCheck']); - } - - if (array_key_exists('mimeType', $options)) { - $this->setMimeType($options['mimeType']); - unset($options['mimeType']); - } - - // Handle cases where mimetypes are interspersed with options, or - // options are simply an array of mime types - foreach (array_keys($options) as $key) { - if (! is_int($key)) { - continue; - } - $this->addMimeType($options[$key]); - unset($options[$key]); - } - } - - parent::__construct($options); - } - - /** - * Returns the actual set magicfile - * - * @return string - */ - public function getMagicFile() - { - if (null === $this->options['magicFile']) { - $magic = getenv('magic'); - if (! empty($magic)) { - $this->setMagicFile($magic); - if ($this->options['magicFile'] === null) { - $this->options['magicFile'] = false; - } - return $this->options['magicFile']; - } - - foreach ($this->magicFiles as $file) { - try { - $this->setMagicFile($file); - } catch (Exception\ExceptionInterface $e) { - // suppressing errors which are thrown due to open_basedir restrictions - continue; - } - - if ($this->options['magicFile'] !== null) { - return $this->options['magicFile']; - } - } - - if ($this->options['magicFile'] === null) { - $this->options['magicFile'] = false; - } - } - - return $this->options['magicFile']; - } - - /** - * Sets the magicfile to use - * if null, the MAGIC constant from php is used - * if the MAGIC file is erroneous, no file will be set - * if false, the default MAGIC file from PHP will be used - * - * @param string $file - * @throws Exception\RuntimeException When finfo can not read the magicfile. - * @throws Exception\InvalidArgumentException - * @throws Exception\InvalidMagicMimeFileException - * @return $this Provides fluid interface - */ - public function setMagicFile($file) - { - if ($file === false) { - $this->options['magicFile'] = false; - } elseif (empty($file)) { - $this->options['magicFile'] = null; - } elseif (! class_exists('finfo', false)) { - $this->options['magicFile'] = null; - throw new Exception\RuntimeException('Magicfile can not be set; there is no finfo extension installed'); - } elseif (! is_file($file) || ! is_readable($file)) { - throw new Exception\InvalidArgumentException(sprintf( - 'The given magicfile ("%s") could not be read', - $file - )); - } else { - ErrorHandler::start(E_NOTICE | E_WARNING); - $this->finfo = finfo_open(FILEINFO_MIME_TYPE, $file); - $error = ErrorHandler::stop(); - if (empty($this->finfo)) { - $this->finfo = null; - throw new Exception\InvalidMagicMimeFileException(sprintf( - 'The given magicfile ("%s") could not be used by ext/finfo', - $file - ), 0, $error); - } - $this->options['magicFile'] = $file; - } - - return $this; - } - - /** - * Disables usage of MagicFile - * - * @param bool $disable False disables usage of magic file; true enables it. - * @return self Provides fluid interface - */ - public function disableMagicFile($disable) - { - $this->options['disableMagicFile'] = (bool) $disable; - return $this; - } - - /** - * Is usage of MagicFile disabled? - * - * @return bool - */ - public function isMagicFileDisabled() - { - return $this->options['disableMagicFile']; - } - - /** - * Returns the Header Check option - * - * @return bool - */ - public function getHeaderCheck() - { - return $this->options['enableHeaderCheck']; - } - - /** - * Defines if the http header should be used - * Note that this is unsafe and therefor the default value is false - * - * @param bool $headerCheck - * @return $this Provides fluid interface - */ - public function enableHeaderCheck($headerCheck = true) - { - $this->options['enableHeaderCheck'] = (bool) $headerCheck; - return $this; - } - - /** - * Returns the set mimetypes - * - * @param bool $asArray Returns the values as array, when false a concatenated string is returned - * @return string|array - * @psalm-return ($asArray is true ? list : string) - */ - public function getMimeType($asArray = false) - { - $asArray = (bool) $asArray; - $mimetype = (string) $this->options['mimeType']; - if ($asArray) { - $mimetype = explode(',', $mimetype); - } - - return $mimetype; - } - - /** - * Sets the mimetypes - * - * @param string|array $mimetype The mimetypes to validate - * @return $this Provides a fluent interface - */ - public function setMimeType($mimetype) - { - $this->options['mimeType'] = null; - $this->addMimeType($mimetype); - return $this; - } - - /** - * Adds the mimetypes - * - * @param string|array $mimetype The mimetypes to add for validation - * @throws Exception\InvalidArgumentException - * @return $this Provides a fluent interface - */ - public function addMimeType($mimetype) - { - $mimetypes = $this->getMimeType(true); - - if (is_string($mimetype)) { - $mimetype = explode(',', $mimetype); - } elseif (! is_array($mimetype)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - if (isset($mimetype['magicFile'])) { - unset($mimetype['magicFile']); - } - - foreach ($mimetype as $content) { - if (empty($content) || ! is_string($content)) { - continue; - } - $mimetypes[] = trim($content); - } - $mimetypes = array_unique($mimetypes); - - // Sanity check to ensure no empty values - foreach ($mimetypes as $key => $mt) { - if (empty($mt)) { - unset($mimetypes[$key]); - } - } - - $this->options['mimeType'] = implode(',', $mimetypes); - - return $this; - } - - /** - * Defined by Laminas\Validator\ValidatorInterface - * - * Returns true if the mimetype of the file matches the given ones. Also parts - * of mimetypes can be checked. If you give for example "image" all image - * mime types will be accepted like "image/gif", "image/jpeg" and so on. - * - * @param string|array $value Real file to check for mimetype - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file, true); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(static::NOT_READABLE); - return false; - } - - $mimefile = $this->getMagicFile(); - if (class_exists('finfo', false)) { - if (! $this->isMagicFileDisabled() && (! empty($mimefile) && empty($this->finfo))) { - ErrorHandler::start(E_NOTICE | E_WARNING); - $this->finfo = finfo_open(FILEINFO_MIME_TYPE, $mimefile); - ErrorHandler::stop(); - } - - if (empty($this->finfo)) { - ErrorHandler::start(E_NOTICE | E_WARNING); - $this->finfo = finfo_open(FILEINFO_MIME_TYPE); - ErrorHandler::stop(); - } - - $this->type = null; - if (! empty($this->finfo)) { - $this->type = finfo_file($this->finfo, $fileInfo['file']); - unset($this->finfo); - } - } - - if (empty($this->type) && $this->getHeaderCheck()) { - $this->type = $fileInfo['filetype']; - } - - if (empty($this->type)) { - $this->error(static::NOT_DETECTED); - return false; - } - - $mimetype = $this->getMimeType(true); - if (in_array($this->type, $mimetype)) { - return true; - } - - $types = explode('/', $this->type); - $types = array_merge($types, explode('-', $this->type)); - $types = array_merge($types, explode(';', $this->type)); - foreach ($mimetype as $mime) { - if (in_array($mime, $types)) { - return true; - } - } - - $this->error(static::FALSE_TYPE); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/NotExists.php b/lib/laminas/laminas-validator/src/File/NotExists.php deleted file mode 100644 index 0ed8f2f18..000000000 --- a/lib/laminas/laminas-validator/src/File/NotExists.php +++ /dev/null @@ -1,68 +0,0 @@ - 'File exists', - ]; - - /** - * Returns true if and only if the file does not exist in the set destinations - * - * @param string|array $value Real file to check for existence - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file, false, true); - - $this->setValue($fileInfo['filename']); - - $check = false; - $directories = $this->getDirectory(true); - if (! isset($directories)) { - $check = true; - if (file_exists($fileInfo['file'])) { - $this->error(self::DOES_EXIST); - return false; - } - } else { - foreach ($directories as $directory) { - if (! isset($directory) || '' === $directory) { - continue; - } - - $check = true; - if (file_exists($directory . DIRECTORY_SEPARATOR . $fileInfo['basename'])) { - $this->error(self::DOES_EXIST); - return false; - } - } - } - - if (! $check) { - $this->error(self::DOES_EXIST); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Sha1.php b/lib/laminas/laminas-validator/src/File/Sha1.php deleted file mode 100644 index da90c45b7..000000000 --- a/lib/laminas/laminas-validator/src/File/Sha1.php +++ /dev/null @@ -1,110 +0,0 @@ - 'File does not match the given sha1 hashes', - self::NOT_DETECTED => 'A sha1 hash could not be evaluated for the given file', - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** - * Options for this validator - * - * @var string - */ - protected $options = [ - 'algorithm' => 'sha1', - 'hash' => null, - ]; - - /** - * Returns all set sha1 hashes - * - * @return array - */ - public function getSha1() - { - return $this->getHash(); - } - - /** - * Sets the sha1 hash for one or multiple files - * - * @param string|array $options - * @return Hash Provides a fluent interface - */ - public function setSha1($options) - { - $this->setHash($options); - return $this; - } - - /** - * Adds the sha1 hash for one or multiple files - * - * @param string|array $options - * @return Hash Provides a fluent interface - */ - public function addSha1($options) - { - $this->addHash($options); - return $this; - } - - /** - * Returns true if and only if the given file confirms the set hash - * - * @param (int|string)[]|string $value Filename to check for hash - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_FOUND); - return false; - } - - $hashes = array_unique(array_keys($this->getHash())); - $filehash = hash_file('sha1', $fileInfo['file']); - if ($filehash === false) { - $this->error(self::NOT_DETECTED); - return false; - } - - foreach ($hashes as $hash) { - if ($filehash === $hash) { - return true; - } - } - - $this->error(self::DOES_NOT_MATCH); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Size.php b/lib/laminas/laminas-validator/src/File/Size.php deleted file mode 100644 index d3dd64df1..000000000 --- a/lib/laminas/laminas-validator/src/File/Size.php +++ /dev/null @@ -1,359 +0,0 @@ - "Maximum allowed size for file is '%max%' but '%size%' detected", - self::TOO_SMALL => "Minimum expected size for file is '%min%' but '%size%' detected", - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** @var array Error message template variables */ - protected $messageVariables = [ - 'min' => ['options' => 'min'], - 'max' => ['options' => 'max'], - 'size' => 'size', - ]; - - /** - * Detected size - * - * @var int - */ - protected $size; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'min' => null, // Minimum file size, if null there is no minimum - 'max' => null, // Maximum file size, if null there is no maximum - 'useByteString' => true, // Use byte string? - ]; - - /** - * Sets validator options - * - * If $options is an integer, it will be used as maximum file size - * As Array is accepts the following keys: - * 'min': Minimum file size - * 'max': Maximum file size - * 'useByteString': Use bytestring or real size for messages - * - * @param int|array|Traversable $options Options for the adapter - */ - public function __construct($options = null) - { - if (is_string($options) || is_numeric($options)) { - $options = ['max' => $options]; - } - - if (1 < func_num_args()) { - $argv = func_get_args(); - array_shift($argv); - $options['max'] = array_shift($argv); - if (! empty($argv)) { - $options['useByteString'] = array_shift($argv); - } - } - - parent::__construct($options); - } - - /** - * Should messages return bytes as integer or as string in SI notation - * - * @param bool $byteString Use bytestring ? - * @return self - */ - public function useByteString($byteString = true) - { - $this->options['useByteString'] = (bool) $byteString; - return $this; - } - - /** - * Will bytestring be used? - * - * @return bool - */ - public function getByteString() - { - return $this->options['useByteString']; - } - - /** - * Returns the minimum file size - * - * @param bool $raw Whether or not to force return of the raw value (defaults off) - * @return int|string - */ - public function getMin($raw = false) - { - $min = $this->options['min']; - if (! $raw && $this->getByteString()) { - $min = $this->toByteString($min); - } - - return $min; - } - - /** - * Sets the minimum file size - * - * File size can be an integer or a byte string - * This includes 'B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB' - * For example: 2000, 2MB, 0.2GB - * - * @param int|string $min The minimum file size - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException When min is greater than max. - */ - public function setMin($min) - { - if (! is_string($min) && ! is_numeric($min)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - $min = (int) $this->fromByteString($min); - $max = $this->getMax(true); - if (($max !== null) && ($min > $max)) { - throw new Exception\InvalidArgumentException( - "The minimum must be less than or equal to the maximum file size, but $min > $max" - ); - } - - $this->options['min'] = $min; - return $this; - } - - /** - * Returns the maximum file size - * - * @param bool $raw Whether or not to force return of the raw value (defaults off) - * @return int|string - */ - public function getMax($raw = false) - { - $max = $this->options['max']; - if (! $raw && $this->getByteString()) { - $max = $this->toByteString($max); - } - - return $max; - } - - /** - * Sets the maximum file size - * - * File size can be an integer or a byte string - * This includes 'B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB' - * For example: 2000, 2MB, 0.2GB - * - * @param int|string $max The maximum file size - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException When max is smaller than min. - */ - public function setMax($max) - { - if (! is_string($max) && ! is_numeric($max)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - $max = (int) $this->fromByteString($max); - $min = $this->getMin(true); - if (($min !== null) && ($max < $min)) { - throw new Exception\InvalidArgumentException( - "The maximum must be greater than or equal to the minimum file size, but $max < $min" - ); - } - - $this->options['max'] = $max; - return $this; - } - - /** - * Retrieve current detected file size - * - * @return int - */ - protected function getSize() - { - return $this->size; - } - - /** - * Set current size - * - * @param int $size - * @return $this - */ - protected function setSize($size) - { - $this->size = $size; - return $this; - } - - /** - * Returns true if and only if the file size of $value is at least min and - * not bigger than max (when max is not null). - * - * @param string|array $value File to check for size - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_FOUND); - return false; - } - - // limited to 4GB files - ErrorHandler::start(); - $size = sprintf('%u', filesize($fileInfo['file'])); - ErrorHandler::stop(); - $this->size = $size; - - // Check to see if it's smaller than min size - $min = $this->getMin(true); - $max = $this->getMax(true); - if (($min !== null) && ($size < $min)) { - if ($this->getByteString()) { - $this->options['min'] = $this->toByteString($min); - $this->size = $this->toByteString($size); - $this->error(self::TOO_SMALL); - $this->options['min'] = $min; - $this->size = $size; - } else { - $this->error(self::TOO_SMALL); - } - } - - // Check to see if it's larger than max size - if (($max !== null) && ($max < $size)) { - if ($this->getByteString()) { - $this->options['max'] = $this->toByteString($max); - $this->size = $this->toByteString($size); - $this->error(self::TOO_BIG); - $this->options['max'] = $max; - $this->size = $size; - } else { - $this->error(self::TOO_BIG); - } - } - - if ($this->getMessages()) { - return false; - } - - return true; - } - - /** - * Returns the formatted size - * - * @param int $size - * @return string - */ - protected function toByteString($size) - { - $sizes = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - for ($i = 0; $size >= 1024 && $i < 9; $i++) { - $size /= 1024; - } - - return round($size, 2) . $sizes[$i]; - } - - /** - * Returns the unformatted size - * - * @param string $size - * @return float|int|string - */ - protected function fromByteString($size) - { - if (is_numeric($size)) { - return (int) $size; - } - - $type = trim(substr($size, -2, 1)); - - $value = substr($size, 0, -1); - if (! is_numeric($value)) { - $value = trim(substr($value, 0, -1)); - } - - switch (strtoupper($type)) { - case 'Y': - $value *= 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024; - break; - case 'Z': - $value *= 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024; - break; - case 'E': - $value *= 1024 * 1024 * 1024 * 1024 * 1024 * 1024; - break; - case 'P': - $value *= 1024 * 1024 * 1024 * 1024 * 1024; - break; - case 'T': - $value *= 1024 * 1024 * 1024 * 1024; - break; - case 'G': - $value *= 1024 * 1024 * 1024; - break; - case 'M': - $value *= 1024 * 1024; - break; - case 'K': - $value *= 1024; - break; - default: - break; - } - - return $value; - } -} diff --git a/lib/laminas/laminas-validator/src/File/Upload.php b/lib/laminas/laminas-validator/src/File/Upload.php deleted file mode 100644 index 10a0f2f3e..000000000 --- a/lib/laminas/laminas-validator/src/File/Upload.php +++ /dev/null @@ -1,270 +0,0 @@ - Error message templates */ - protected $messageTemplates = [ - self::INI_SIZE => "File '%value%' exceeds upload_max_filesize directive in php.ini", - self::FORM_SIZE => "File '%value%' exceeds the MAX_FILE_SIZE directive that was " - . 'specified in the HTML form', - self::PARTIAL => "File '%value%' was only partially uploaded", - self::NO_FILE => "File '%value%' was not uploaded", - self::NO_TMP_DIR => "Missing a temporary folder to store '%value%'", - self::CANT_WRITE => "Failed to write file '%value%' to disk", - self::EXTENSION => "A PHP extension stopped uploading the file '%value%'", - self::ATTACK => "File '%value%' was illegally uploaded. This could be a possible attack", - self::FILE_NOT_FOUND => "File '%value%' was not found", - self::UNKNOWN => "Unknown error while uploading file '%value%'", - ]; - - /** @var array */ - protected $options = [ - 'files' => [], - ]; - - /** - * Sets validator options - * - * The array $files must be given in syntax of Laminas\File\Transfer\Transfer to be checked - * If no files are given the $_FILES array will be used automatically. - * NOTE: This validator will only work with HTTP POST uploads! - * - * @param array|Traversable $options Array of files in syntax of \Laminas\File\Transfer\Transfer - */ - public function __construct($options = []) - { - if (is_array($options) && ! array_key_exists('files', $options)) { - $options = ['files' => $options]; - } - - parent::__construct($options); - } - - /** - * Returns the array of set files - * - * @param string $file (Optional) The file to return in detail - * @return array - * @throws Exception\InvalidArgumentException If file is not found. - */ - public function getFiles($file = null) - { - if ($file !== null) { - $return = []; - foreach ($this->options['files'] as $name => $content) { - if ($name === $file) { - $return[$file] = $this->options['files'][$name]; - } - - if ($content instanceof UploadedFileInterface) { - if ($content->getClientFilename() === $file) { - $return[$name] = $this->options['files'][$name]; - } - } elseif ($content['name'] === $file) { - $return[$name] = $this->options['files'][$name]; - } - } - - if (! $return) { - throw new Exception\InvalidArgumentException("The file '$file' was not found"); - } - - return $return; - } - - return $this->options['files']; - } - - /** - * Sets the files to be checked - * - * @param array $files The files to check in syntax of \Laminas\File\Transfer\Transfer - * @return $this Provides a fluent interface - */ - public function setFiles($files = []) - { - if ( - null === $files - || ((is_countable($files)) - && count($files) === 0) - ) { - $this->options['files'] = $_FILES; - } else { - $this->options['files'] = $files; - } - - if ($this->options['files'] === null) { - $this->options['files'] = []; - } - - foreach ($this->options['files'] as $file => $content) { - if ( - ! $content instanceof UploadedFileInterface - && ! isset($content['error']) - ) { - unset($this->options['files'][$file]); - } - } - - return $this; - } - - /** - * Returns true if and only if the file was uploaded without errors - * - * @param string $value Single file to check for upload errors, when giving null the $_FILES array - * from initialization will be used - * @param mixed $file - * @return bool - */ - public function isValid($value, $file = null) - { - $files = []; - $this->setValue($value); - if (array_key_exists($value, $this->getFiles())) { - $files = array_merge($files, $this->getFiles($value)); - } else { - foreach ($this->getFiles() as $file => $content) { - if ($content instanceof UploadedFileInterface) { - if ($content->getClientFilename() === $value) { - $files = array_merge($files, $this->getFiles($file)); - } - - // PSR cannot search by tmp_name because it does not have - // a public interface to get it, only user defined name - // from form field. - continue; - } - - if (isset($content['name']) && ($content['name'] === $value)) { - $files = array_merge($files, $this->getFiles($file)); - } - - if (isset($content['tmp_name']) && ($content['tmp_name'] === $value)) { - $files = array_merge($files, $this->getFiles($file)); - } - } - } - - if (empty($files)) { - return $this->throwError($file, self::FILE_NOT_FOUND); - } - - foreach ($files as $file => $content) { - $this->value = $file; - $error = $content instanceof UploadedFileInterface - ? $content->getError() - : $content['error']; - - switch ($error) { - case 0: - if ($content instanceof UploadedFileInterface) { - // done! - break; - } - - // For standard SAPI environments, check that the upload - // was valid - if (! is_uploaded_file($content['tmp_name'])) { - $this->throwError($content, self::ATTACK); - } - break; - - case 1: - $this->throwError($content, self::INI_SIZE); - break; - - case 2: - $this->throwError($content, self::FORM_SIZE); - break; - - case 3: - $this->throwError($content, self::PARTIAL); - break; - - case 4: - $this->throwError($content, self::NO_FILE); - break; - - case 6: - $this->throwError($content, self::NO_TMP_DIR); - break; - - case 7: - $this->throwError($content, self::CANT_WRITE); - break; - - case 8: - $this->throwError($content, self::EXTENSION); - break; - - default: - $this->throwError($content, self::UNKNOWN); - break; - } - } - - if ($this->getMessages()) { - return false; - } - - return true; - } - - /** - * Throws an error of the given type - * - * @param array|string|UploadedFileInterface $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = $file['name']; - } - } elseif (is_string($file)) { - $this->value = $file; - } elseif ($file instanceof UploadedFileInterface) { - $this->value = $file->getClientFilename(); - } - } - - $this->error($errorType); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/File/UploadFile.php b/lib/laminas/laminas-validator/src/File/UploadFile.php deleted file mode 100644 index 9d73f54af..000000000 --- a/lib/laminas/laminas-validator/src/File/UploadFile.php +++ /dev/null @@ -1,175 +0,0 @@ - 'The uploaded file exceeds the upload_max_filesize directive in php.ini', - self::FORM_SIZE => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was ' - . 'specified in the HTML form', - self::PARTIAL => 'The uploaded file was only partially uploaded', - self::NO_FILE => 'No file was uploaded', - self::NO_TMP_DIR => 'Missing a temporary folder', - self::CANT_WRITE => 'Failed to write file to disk', - self::EXTENSION => 'A PHP extension stopped the file upload', - self::ATTACK => 'File was illegally uploaded. This could be a possible attack', - self::FILE_NOT_FOUND => 'File was not found', - self::UNKNOWN => 'Unknown error while uploading file', - ]; - - /** - * Returns true if and only if the file was uploaded without errors - * - * @param string|array|UploadedFileInterface $value File to check for upload errors - * @return bool - * @throws Exception\InvalidArgumentException - */ - public function isValid($value) - { - if (is_array($value)) { - if (! isset($value['tmp_name']) || ! isset($value['name']) || ! isset($value['error'])) { - throw new Exception\InvalidArgumentException( - 'Value array must be in $_FILES format' - ); - } - - return $this->validateUploadedFile( - $value['error'], - $value['name'], - $value['tmp_name'] - ); - } - - if ($value instanceof UploadedFileInterface) { - return $this->validatePsr7UploadedFile($value); - } - - if (is_string($value)) { - return $this->validateUploadedFile(0, basename($value), $value); - } - - $this->error(self::UNKNOWN); - return false; - } - - /** - * @param int $error UPLOAD_ERR_* constant value - * @return bool - */ - private function validateFileFromErrorCode($error) - { - switch ($error) { - case UPLOAD_ERR_OK: - return true; - - case UPLOAD_ERR_INI_SIZE: - $this->error(self::INI_SIZE); - return false; - - case UPLOAD_ERR_FORM_SIZE: - $this->error(self::FORM_SIZE); - return false; - - case UPLOAD_ERR_PARTIAL: - $this->error(self::PARTIAL); - return false; - - case UPLOAD_ERR_NO_FILE: - $this->error(self::NO_FILE); - return false; - - case UPLOAD_ERR_NO_TMP_DIR: - $this->error(self::NO_TMP_DIR); - return false; - - case UPLOAD_ERR_CANT_WRITE: - $this->error(self::CANT_WRITE); - return false; - - case UPLOAD_ERR_EXTENSION: - $this->error(self::EXTENSION); - return false; - - default: - $this->error(self::UNKNOWN); - return false; - } - } - - /** - * @param int $error UPLOAD_ERR_* constant - * @param string $filename - * @param string $uploadedFile Name of uploaded file (gen tmp_name) - * @return bool - */ - private function validateUploadedFile($error, $filename, $uploadedFile) - { - $this->setValue($filename); - - // Normal errors can be validated normally - if ($error !== UPLOAD_ERR_OK) { - return $this->validateFileFromErrorCode($error); - } - - // Did we get no name? Is the file missing? - if (empty($uploadedFile) || false === is_file($uploadedFile)) { - $this->error(self::FILE_NOT_FOUND); - return false; - } - - // Do we have an invalid upload? - if (! is_uploaded_file($uploadedFile)) { - $this->error(self::ATTACK); - return false; - } - - return true; - } - - /** - * @return bool - */ - private function validatePsr7UploadedFile(UploadedFileInterface $uploadedFile) - { - $this->setValue($uploadedFile); - return $this->validateFileFromErrorCode($uploadedFile->getError()); - } -} diff --git a/lib/laminas/laminas-validator/src/File/WordCount.php b/lib/laminas/laminas-validator/src/File/WordCount.php deleted file mode 100644 index 107fb6fdd..000000000 --- a/lib/laminas/laminas-validator/src/File/WordCount.php +++ /dev/null @@ -1,204 +0,0 @@ - "Too many words, maximum '%max%' are allowed but '%count%' were counted", - self::TOO_LESS => "Too few words, minimum '%min%' are expected but '%count%' were counted", - self::NOT_FOUND => 'File is not readable or does not exist', - ]; - - /** @var array Error message template variables */ - protected $messageVariables = [ - 'min' => ['options' => 'min'], - 'max' => ['options' => 'max'], - 'count' => 'count', - ]; - - /** - * Word count - * - * @var int - */ - protected $count; - - /** - * Options for this validator - * - * @var array - */ - protected $options = [ - 'min' => null, // Minimum word count, if null there is no minimum word count - 'max' => null, // Maximum word count, if null there is no maximum word count - ]; - - /** - * Sets validator options - * - * Min limits the word count, when used with max=null it is the maximum word count - * It also accepts an array with the keys 'min' and 'max' - * - * If $options is an integer, it will be used as maximum word count - * As Array is accepts the following keys: - * 'min': Minimum word count - * 'max': Maximum word count - * - * @param int|array|Traversable $options Options for the adapter - */ - public function __construct($options = null) - { - if (1 < func_num_args()) { - $args = func_get_args(); - $options = [ - 'min' => array_shift($args), - 'max' => array_shift($args), - ]; - } - - if (is_string($options) || is_numeric($options)) { - $options = ['max' => $options]; - } - - parent::__construct($options); - } - - /** - * Returns the minimum word count - * - * @return int - */ - public function getMin() - { - return $this->options['min']; - } - - /** - * Sets the minimum word count - * - * @param int|array $min The minimum word count - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException When min is greater than max. - */ - public function setMin($min) - { - if (is_array($min) && isset($min['min'])) { - $min = $min['min']; - } - - if (! is_numeric($min)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - $min = (int) $min; - if (($this->getMax() !== null) && ($min > $this->getMax())) { - throw new Exception\InvalidArgumentException( - "The minimum must be less than or equal to the maximum word count, but $min > {$this->getMax()}" - ); - } - - $this->options['min'] = $min; - return $this; - } - - /** - * Returns the maximum word count - * - * @return int - */ - public function getMax() - { - return $this->options['max']; - } - - /** - * Sets the maximum file count - * - * @param int|array $max The maximum word count - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException When max is smaller than min. - */ - public function setMax($max) - { - if (is_array($max) && isset($max['max'])) { - $max = $max['max']; - } - - if (! is_numeric($max)) { - throw new Exception\InvalidArgumentException('Invalid options to validator provided'); - } - - $max = (int) $max; - if (($this->getMin() !== null) && ($max < $this->getMin())) { - throw new Exception\InvalidArgumentException( - "The maximum must be greater than or equal to the minimum word count, but $max < {$this->getMin()}" - ); - } - - $this->options['max'] = $max; - return $this; - } - - /** - * Returns true if and only if the counted words are at least min and - * not bigger than max (when max is not null). - * - * @param string|array $value Filename to check for word count - * @param array $file File data from \Laminas\File\Transfer\Transfer (optional) - * @return bool - */ - public function isValid($value, $file = null) - { - $fileInfo = $this->getFileInfo($value, $file); - - $this->setValue($fileInfo['filename']); - - // Is file readable ? - if (empty($fileInfo['file']) || false === is_readable($fileInfo['file'])) { - $this->error(self::NOT_FOUND); - return false; - } - - $content = file_get_contents($fileInfo['file']); - $this->count = str_word_count($content); - if (($this->getMax() !== null) && ($this->count > $this->getMax())) { - $this->error(self::TOO_MUCH); - return false; - } - - if (($this->getMin() !== null) && ($this->count < $this->getMin())) { - $this->error(self::TOO_LESS); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/GpsPoint.php b/lib/laminas/laminas-validator/src/GpsPoint.php deleted file mode 100644 index 7090a4590..000000000 --- a/lib/laminas/laminas-validator/src/GpsPoint.php +++ /dev/null @@ -1,122 +0,0 @@ - '%value% is out of Bounds.', - 'gpsPointConvertError' => '%value% can not converted into a Decimal Degree Value.', - 'gpsPointIncompleteCoordinate' => '%value% did not provided a complete Coordinate', - ]; - - /** - * Returns true if and only if $value meets the validation requirements - * - * If $value fails validation, then this method returns false, and - * getMessages() will return an array of messages that explain why the - * validation failed. - * - * @param mixed $value - * @return bool - * @throws Exception\RuntimeException If validation of $value is impossible. - */ - public function isValid($value) - { - if (strpos($value, ',') === false) { - $this->error(self::INCOMPLETE_COORDINATE, $value); - return false; - } - - [$lat, $long] = explode(',', $value); - - if ($this->isValidCoordinate($lat, 90.0000) && $this->isValidCoordinate($long, 180.000)) { - return true; - } - - return false; - } - - /** - * @param string $value - */ - private function isValidCoordinate($value, float $maxBoundary): bool - { - $this->value = $value; - - $value = $this->removeWhiteSpace($value); - if ($this->isDMSValue($value)) { - $value = $this->convertValue($value); - } else { - $value = $this->removeDegreeSign($value); - } - - if ($value === false || $value === null) { - $this->error(self::CONVERT_ERROR); - return false; - } - - $doubleLatitude = (double) $value; - - if ($doubleLatitude <= $maxBoundary && $doubleLatitude >= $maxBoundary * -1) { - return true; - } - - $this->error(self::OUT_OF_BOUNDS); - return false; - } - - /** - * Determines if the give value is a Degrees Minutes Second Definition - */ - private function isDMSValue(string $value): bool - { - return preg_match('/([°\'"]+[NESW])/', $value) > 0; - } - - /** - * @param string $value - * @return false|float - */ - private function convertValue($value) - { - $matches = []; - $result = preg_match_all('/(\d{1,3})°(\d{1,2})\'(\d{1,2}[\.\d]{0,6})"[NESW]/i', $value, $matches); - - if ($result === false || $result === 0) { - return false; - } - - return $matches[1][0] + $matches[2][0] / 60 + ((double) $matches[3][0]) / 3600; - } - - /** - * @param string $value - * @return string - */ - private function removeWhiteSpace($value) - { - return preg_replace('/\s/', '', $value); - } - - /** - * @param string $value - * @return string - */ - private function removeDegreeSign($value) - { - return str_replace('°', '', $value); - } -} diff --git a/lib/laminas/laminas-validator/src/GreaterThan.php b/lib/laminas/laminas-validator/src/GreaterThan.php deleted file mode 100644 index bab3846ad..000000000 --- a/lib/laminas/laminas-validator/src/GreaterThan.php +++ /dev/null @@ -1,154 +0,0 @@ - "The input is not greater than '%min%'", - self::NOT_GREATER_INCLUSIVE => "The input is not greater than or equal to '%min%'", - ]; - - /** @var array */ - protected $messageVariables = [ - 'min' => 'min', - ]; - - /** - * Minimum value - * - * @var mixed - */ - protected $min; - - /** - * Whether to do inclusive comparisons, allowing equivalence to max - * - * If false, then strict comparisons are done, and the value may equal - * the min option - * - * @var bool - */ - protected $inclusive; - - /** - * Sets validator options - * - * @param array|Traversable $options - * @throws Exception\InvalidArgumentException - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - if (! is_array($options)) { - $options = func_get_args(); - $temp['min'] = array_shift($options); - - if (! empty($options)) { - $temp['inclusive'] = array_shift($options); - } - - $options = $temp; - } - - if (! array_key_exists('min', $options)) { - throw new Exception\InvalidArgumentException("Missing option 'min'"); - } - - if (! array_key_exists('inclusive', $options)) { - $options['inclusive'] = false; - } - - $this->setMin($options['min']) - ->setInclusive($options['inclusive']); - - parent::__construct($options); - } - - /** - * Returns the min option - * - * @return mixed - */ - public function getMin() - { - return $this->min; - } - - /** - * Sets the min option - * - * @param mixed $min - * @return $this Provides a fluent interface - */ - public function setMin($min) - { - $this->min = $min; - return $this; - } - - /** - * Returns the inclusive option - * - * @return bool - */ - public function getInclusive() - { - return $this->inclusive; - } - - /** - * Sets the inclusive option - * - * @param bool $inclusive - * @return $this Provides a fluent interface - */ - public function setInclusive($inclusive) - { - $this->inclusive = $inclusive; - return $this; - } - - /** - * Returns true if and only if $value is greater than min option - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - $this->setValue($value); - - if ($this->inclusive) { - if ($this->min > $value) { - $this->error(self::NOT_GREATER_INCLUSIVE); - return false; - } - } else { - if ($this->min >= $value) { - $this->error(self::NOT_GREATER); - return false; - } - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Hex.php b/lib/laminas/laminas-validator/src/Hex.php deleted file mode 100644 index b00198578..000000000 --- a/lib/laminas/laminas-validator/src/Hex.php +++ /dev/null @@ -1,45 +0,0 @@ - 'Invalid type given. String expected', - self::NOT_HEX => 'The input contains non-hexadecimal characters', - ]; - - /** - * Returns true if and only if $value contains only hexadecimal digit characters - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value) && ! is_int($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - if (! ctype_xdigit((string) $value)) { - $this->error(self::NOT_HEX); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Hostname.php b/lib/laminas/laminas-validator/src/Hostname.php deleted file mode 100644 index a5fb700d5..000000000 --- a/lib/laminas/laminas-validator/src/Hostname.php +++ /dev/null @@ -1,2293 +0,0 @@ - "The input appears to be a DNS hostname but the given punycode notation cannot be decoded", - self::INVALID => "Invalid type given. String expected", - self::INVALID_DASH => "The input appears to be a DNS hostname but contains a dash in an invalid position", - self::INVALID_HOSTNAME => "The input does not match the expected structure for a DNS hostname", - self::INVALID_HOSTNAME_SCHEMA => "The input appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'", - self::INVALID_LOCAL_NAME => "The input does not appear to be a valid local network name", - self::INVALID_URI => "The input does not appear to be a valid URI hostname", - self::IP_ADDRESS_NOT_ALLOWED => "The input appears to be an IP address, but IP addresses are not allowed", - self::LOCAL_NAME_NOT_ALLOWED => "The input appears to be a local network name but local network names are not allowed", - self::UNDECIPHERABLE_TLD => "The input appears to be a DNS hostname but cannot extract TLD part", - self::UNKNOWN_TLD => "The input appears to be a DNS hostname but cannot match TLD against known list", - ]; - - /** @var array */ - protected $messageVariables = [ - 'tld' => 'tld', - ]; - - public const ALLOW_DNS = 1; // Allows Internet domain names (e.g., example.com) - public const ALLOW_IP = 2; // Allows IP addresses - public const ALLOW_LOCAL = 4; // Allows local network names (e.g., localhost, www.localdomain) - public const ALLOW_URI = 8; // Allows URI hostnames - public const ALLOW_ALL = 15; // Allows all types of hostnames - - /** - * Array of valid top-level-domains - * IanaVersion 2022072400 - * - * @see ftp://data.iana.org/TLD/tlds-alpha-by-domain.txt List of all TLDs by domain - * @see http://www.iana.org/domains/root/db/ Official list of supported TLDs - * - * @var string[] - */ - protected $validTlds = [ - 'aaa', - 'aarp', - 'abarth', - 'abb', - 'abbott', - 'abbvie', - 'abc', - 'able', - 'abogado', - 'abudhabi', - 'ac', - 'academy', - 'accenture', - 'accountant', - 'accountants', - 'aco', - 'actor', - 'ad', - 'adac', - 'ads', - 'adult', - 'ae', - 'aeg', - 'aero', - 'aetna', - 'af', - 'afl', - 'africa', - 'ag', - 'agakhan', - 'agency', - 'ai', - 'aig', - 'airbus', - 'airforce', - 'airtel', - 'akdn', - 'al', - 'alfaromeo', - 'alibaba', - 'alipay', - 'allfinanz', - 'allstate', - 'ally', - 'alsace', - 'alstom', - 'am', - 'amazon', - 'americanexpress', - 'americanfamily', - 'amex', - 'amfam', - 'amica', - 'amsterdam', - 'analytics', - 'android', - 'anquan', - 'anz', - 'ao', - 'aol', - 'apartments', - 'app', - 'apple', - 'aq', - 'aquarelle', - 'ar', - 'arab', - 'aramco', - 'archi', - 'army', - 'arpa', - 'art', - 'arte', - 'as', - 'asda', - 'asia', - 'associates', - 'at', - 'athleta', - 'attorney', - 'au', - 'auction', - 'audi', - 'audible', - 'audio', - 'auspost', - 'author', - 'auto', - 'autos', - 'avianca', - 'aw', - 'aws', - 'ax', - 'axa', - 'az', - 'azure', - 'ba', - 'baby', - 'baidu', - 'banamex', - 'bananarepublic', - 'band', - 'bank', - 'bar', - 'barcelona', - 'barclaycard', - 'barclays', - 'barefoot', - 'bargains', - 'baseball', - 'basketball', - 'bauhaus', - 'bayern', - 'bb', - 'bbc', - 'bbt', - 'bbva', - 'bcg', - 'bcn', - 'bd', - 'be', - 'beats', - 'beauty', - 'beer', - 'bentley', - 'berlin', - 'best', - 'bestbuy', - 'bet', - 'bf', - 'bg', - 'bh', - 'bharti', - 'bi', - 'bible', - 'bid', - 'bike', - 'bing', - 'bingo', - 'bio', - 'biz', - 'bj', - 'black', - 'blackfriday', - 'blockbuster', - 'blog', - 'bloomberg', - 'blue', - 'bm', - 'bms', - 'bmw', - 'bn', - 'bnpparibas', - 'bo', - 'boats', - 'boehringer', - 'bofa', - 'bom', - 'bond', - 'boo', - 'book', - 'booking', - 'bosch', - 'bostik', - 'boston', - 'bot', - 'boutique', - 'box', - 'br', - 'bradesco', - 'bridgestone', - 'broadway', - 'broker', - 'brother', - 'brussels', - 'bs', - 'bt', - 'bugatti', - 'build', - 'builders', - 'business', - 'buy', - 'buzz', - 'bv', - 'bw', - 'by', - 'bz', - 'bzh', - 'ca', - 'cab', - 'cafe', - 'cal', - 'call', - 'calvinklein', - 'cam', - 'camera', - 'camp', - 'cancerresearch', - 'canon', - 'capetown', - 'capital', - 'capitalone', - 'car', - 'caravan', - 'cards', - 'care', - 'career', - 'careers', - 'cars', - 'casa', - 'case', - 'cash', - 'casino', - 'cat', - 'catering', - 'catholic', - 'cba', - 'cbn', - 'cbre', - 'cbs', - 'cc', - 'cd', - 'center', - 'ceo', - 'cern', - 'cf', - 'cfa', - 'cfd', - 'cg', - 'ch', - 'chanel', - 'channel', - 'charity', - 'chase', - 'chat', - 'cheap', - 'chintai', - 'christmas', - 'chrome', - 'church', - 'ci', - 'cipriani', - 'circle', - 'cisco', - 'citadel', - 'citi', - 'citic', - 'city', - 'cityeats', - 'ck', - 'cl', - 'claims', - 'cleaning', - 'click', - 'clinic', - 'clinique', - 'clothing', - 'cloud', - 'club', - 'clubmed', - 'cm', - 'cn', - 'co', - 'coach', - 'codes', - 'coffee', - 'college', - 'cologne', - 'com', - 'comcast', - 'commbank', - 'community', - 'company', - 'compare', - 'computer', - 'comsec', - 'condos', - 'construction', - 'consulting', - 'contact', - 'contractors', - 'cooking', - 'cookingchannel', - 'cool', - 'coop', - 'corsica', - 'country', - 'coupon', - 'coupons', - 'courses', - 'cpa', - 'cr', - 'credit', - 'creditcard', - 'creditunion', - 'cricket', - 'crown', - 'crs', - 'cruise', - 'cruises', - 'cu', - 'cuisinella', - 'cv', - 'cw', - 'cx', - 'cy', - 'cymru', - 'cyou', - 'cz', - 'dabur', - 'dad', - 'dance', - 'data', - 'date', - 'dating', - 'datsun', - 'day', - 'dclk', - 'dds', - 'de', - 'deal', - 'dealer', - 'deals', - 'degree', - 'delivery', - 'dell', - 'deloitte', - 'delta', - 'democrat', - 'dental', - 'dentist', - 'desi', - 'design', - 'dev', - 'dhl', - 'diamonds', - 'diet', - 'digital', - 'direct', - 'directory', - 'discount', - 'discover', - 'dish', - 'diy', - 'dj', - 'dk', - 'dm', - 'dnp', - 'do', - 'docs', - 'doctor', - 'dog', - 'domains', - 'dot', - 'download', - 'drive', - 'dtv', - 'dubai', - 'dunlop', - 'dupont', - 'durban', - 'dvag', - 'dvr', - 'dz', - 'earth', - 'eat', - 'ec', - 'eco', - 'edeka', - 'edu', - 'education', - 'ee', - 'eg', - 'email', - 'emerck', - 'energy', - 'engineer', - 'engineering', - 'enterprises', - 'epson', - 'equipment', - 'er', - 'ericsson', - 'erni', - 'es', - 'esq', - 'estate', - 'et', - 'etisalat', - 'eu', - 'eurovision', - 'eus', - 'events', - 'exchange', - 'expert', - 'exposed', - 'express', - 'extraspace', - 'fage', - 'fail', - 'fairwinds', - 'faith', - 'family', - 'fan', - 'fans', - 'farm', - 'farmers', - 'fashion', - 'fast', - 'fedex', - 'feedback', - 'ferrari', - 'ferrero', - 'fi', - 'fiat', - 'fidelity', - 'fido', - 'film', - 'final', - 'finance', - 'financial', - 'fire', - 'firestone', - 'firmdale', - 'fish', - 'fishing', - 'fit', - 'fitness', - 'fj', - 'fk', - 'flickr', - 'flights', - 'flir', - 'florist', - 'flowers', - 'fly', - 'fm', - 'fo', - 'foo', - 'food', - 'foodnetwork', - 'football', - 'ford', - 'forex', - 'forsale', - 'forum', - 'foundation', - 'fox', - 'fr', - 'free', - 'fresenius', - 'frl', - 'frogans', - 'frontdoor', - 'frontier', - 'ftr', - 'fujitsu', - 'fun', - 'fund', - 'furniture', - 'futbol', - 'fyi', - 'ga', - 'gal', - 'gallery', - 'gallo', - 'gallup', - 'game', - 'games', - 'gap', - 'garden', - 'gay', - 'gb', - 'gbiz', - 'gd', - 'gdn', - 'ge', - 'gea', - 'gent', - 'genting', - 'george', - 'gf', - 'gg', - 'ggee', - 'gh', - 'gi', - 'gift', - 'gifts', - 'gives', - 'giving', - 'gl', - 'glass', - 'gle', - 'global', - 'globo', - 'gm', - 'gmail', - 'gmbh', - 'gmo', - 'gmx', - 'gn', - 'godaddy', - 'gold', - 'goldpoint', - 'golf', - 'goo', - 'goodyear', - 'goog', - 'google', - 'gop', - 'got', - 'gov', - 'gp', - 'gq', - 'gr', - 'grainger', - 'graphics', - 'gratis', - 'green', - 'gripe', - 'grocery', - 'group', - 'gs', - 'gt', - 'gu', - 'guardian', - 'gucci', - 'guge', - 'guide', - 'guitars', - 'guru', - 'gw', - 'gy', - 'hair', - 'hamburg', - 'hangout', - 'haus', - 'hbo', - 'hdfc', - 'hdfcbank', - 'health', - 'healthcare', - 'help', - 'helsinki', - 'here', - 'hermes', - 'hgtv', - 'hiphop', - 'hisamitsu', - 'hitachi', - 'hiv', - 'hk', - 'hkt', - 'hm', - 'hn', - 'hockey', - 'holdings', - 'holiday', - 'homedepot', - 'homegoods', - 'homes', - 'homesense', - 'honda', - 'horse', - 'hospital', - 'host', - 'hosting', - 'hot', - 'hoteles', - 'hotels', - 'hotmail', - 'house', - 'how', - 'hr', - 'hsbc', - 'ht', - 'hu', - 'hughes', - 'hyatt', - 'hyundai', - 'ibm', - 'icbc', - 'ice', - 'icu', - 'id', - 'ie', - 'ieee', - 'ifm', - 'ikano', - 'il', - 'im', - 'imamat', - 'imdb', - 'immo', - 'immobilien', - 'in', - 'inc', - 'industries', - 'infiniti', - 'info', - 'ing', - 'ink', - 'institute', - 'insurance', - 'insure', - 'int', - 'international', - 'intuit', - 'investments', - 'io', - 'ipiranga', - 'iq', - 'ir', - 'irish', - 'is', - 'ismaili', - 'ist', - 'istanbul', - 'it', - 'itau', - 'itv', - 'jaguar', - 'java', - 'jcb', - 'je', - 'jeep', - 'jetzt', - 'jewelry', - 'jio', - 'jll', - 'jm', - 'jmp', - 'jnj', - 'jo', - 'jobs', - 'joburg', - 'jot', - 'joy', - 'jp', - 'jpmorgan', - 'jprs', - 'juegos', - 'juniper', - 'kaufen', - 'kddi', - 'ke', - 'kerryhotels', - 'kerrylogistics', - 'kerryproperties', - 'kfh', - 'kg', - 'kh', - 'ki', - 'kia', - 'kids', - 'kim', - 'kinder', - 'kindle', - 'kitchen', - 'kiwi', - 'km', - 'kn', - 'koeln', - 'komatsu', - 'kosher', - 'kp', - 'kpmg', - 'kpn', - 'kr', - 'krd', - 'kred', - 'kuokgroup', - 'kw', - 'ky', - 'kyoto', - 'kz', - 'la', - 'lacaixa', - 'lamborghini', - 'lamer', - 'lancaster', - 'lancia', - 'land', - 'landrover', - 'lanxess', - 'lasalle', - 'lat', - 'latino', - 'latrobe', - 'law', - 'lawyer', - 'lb', - 'lc', - 'lds', - 'lease', - 'leclerc', - 'lefrak', - 'legal', - 'lego', - 'lexus', - 'lgbt', - 'li', - 'lidl', - 'life', - 'lifeinsurance', - 'lifestyle', - 'lighting', - 'like', - 'lilly', - 'limited', - 'limo', - 'lincoln', - 'linde', - 'link', - 'lipsy', - 'live', - 'living', - 'lk', - 'llc', - 'llp', - 'loan', - 'loans', - 'locker', - 'locus', - 'loft', - 'lol', - 'london', - 'lotte', - 'lotto', - 'love', - 'lpl', - 'lplfinancial', - 'lr', - 'ls', - 'lt', - 'ltd', - 'ltda', - 'lu', - 'lundbeck', - 'luxe', - 'luxury', - 'lv', - 'ly', - 'ma', - 'macys', - 'madrid', - 'maif', - 'maison', - 'makeup', - 'man', - 'management', - 'mango', - 'map', - 'market', - 'marketing', - 'markets', - 'marriott', - 'marshalls', - 'maserati', - 'mattel', - 'mba', - 'mc', - 'mckinsey', - 'md', - 'me', - 'med', - 'media', - 'meet', - 'melbourne', - 'meme', - 'memorial', - 'men', - 'menu', - 'merckmsd', - 'mg', - 'mh', - 'miami', - 'microsoft', - 'mil', - 'mini', - 'mint', - 'mit', - 'mitsubishi', - 'mk', - 'ml', - 'mlb', - 'mls', - 'mm', - 'mma', - 'mn', - 'mo', - 'mobi', - 'mobile', - 'moda', - 'moe', - 'moi', - 'mom', - 'monash', - 'money', - 'monster', - 'mormon', - 'mortgage', - 'moscow', - 'moto', - 'motorcycles', - 'mov', - 'movie', - 'mp', - 'mq', - 'mr', - 'ms', - 'msd', - 'mt', - 'mtn', - 'mtr', - 'mu', - 'museum', - 'music', - 'mutual', - 'mv', - 'mw', - 'mx', - 'my', - 'mz', - 'na', - 'nab', - 'nagoya', - 'name', - 'natura', - 'navy', - 'nba', - 'nc', - 'ne', - 'nec', - 'net', - 'netbank', - 'netflix', - 'network', - 'neustar', - 'new', - 'news', - 'next', - 'nextdirect', - 'nexus', - 'nf', - 'nfl', - 'ng', - 'ngo', - 'nhk', - 'ni', - 'nico', - 'nike', - 'nikon', - 'ninja', - 'nissan', - 'nissay', - 'nl', - 'no', - 'nokia', - 'northwesternmutual', - 'norton', - 'now', - 'nowruz', - 'nowtv', - 'np', - 'nr', - 'nra', - 'nrw', - 'ntt', - 'nu', - 'nyc', - 'nz', - 'obi', - 'observer', - 'office', - 'okinawa', - 'olayan', - 'olayangroup', - 'oldnavy', - 'ollo', - 'om', - 'omega', - 'one', - 'ong', - 'onl', - 'online', - 'ooo', - 'open', - 'oracle', - 'orange', - 'org', - 'organic', - 'origins', - 'osaka', - 'otsuka', - 'ott', - 'ovh', - 'pa', - 'page', - 'panasonic', - 'paris', - 'pars', - 'partners', - 'parts', - 'party', - 'passagens', - 'pay', - 'pccw', - 'pe', - 'pet', - 'pf', - 'pfizer', - 'pg', - 'ph', - 'pharmacy', - 'phd', - 'philips', - 'phone', - 'photo', - 'photography', - 'photos', - 'physio', - 'pics', - 'pictet', - 'pictures', - 'pid', - 'pin', - 'ping', - 'pink', - 'pioneer', - 'pizza', - 'pk', - 'pl', - 'place', - 'play', - 'playstation', - 'plumbing', - 'plus', - 'pm', - 'pn', - 'pnc', - 'pohl', - 'poker', - 'politie', - 'porn', - 'post', - 'pr', - 'pramerica', - 'praxi', - 'press', - 'prime', - 'pro', - 'prod', - 'productions', - 'prof', - 'progressive', - 'promo', - 'properties', - 'property', - 'protection', - 'pru', - 'prudential', - 'ps', - 'pt', - 'pub', - 'pw', - 'pwc', - 'py', - 'qa', - 'qpon', - 'quebec', - 'quest', - 'racing', - 'radio', - 're', - 'read', - 'realestate', - 'realtor', - 'realty', - 'recipes', - 'red', - 'redstone', - 'redumbrella', - 'rehab', - 'reise', - 'reisen', - 'reit', - 'reliance', - 'ren', - 'rent', - 'rentals', - 'repair', - 'report', - 'republican', - 'rest', - 'restaurant', - 'review', - 'reviews', - 'rexroth', - 'rich', - 'richardli', - 'ricoh', - 'ril', - 'rio', - 'rip', - 'ro', - 'rocher', - 'rocks', - 'rodeo', - 'rogers', - 'room', - 'rs', - 'rsvp', - 'ru', - 'rugby', - 'ruhr', - 'run', - 'rw', - 'rwe', - 'ryukyu', - 'sa', - 'saarland', - 'safe', - 'safety', - 'sakura', - 'sale', - 'salon', - 'samsclub', - 'samsung', - 'sandvik', - 'sandvikcoromant', - 'sanofi', - 'sap', - 'sarl', - 'sas', - 'save', - 'saxo', - 'sb', - 'sbi', - 'sbs', - 'sc', - 'sca', - 'scb', - 'schaeffler', - 'schmidt', - 'scholarships', - 'school', - 'schule', - 'schwarz', - 'science', - 'scot', - 'sd', - 'se', - 'search', - 'seat', - 'secure', - 'security', - 'seek', - 'select', - 'sener', - 'services', - 'ses', - 'seven', - 'sew', - 'sex', - 'sexy', - 'sfr', - 'sg', - 'sh', - 'shangrila', - 'sharp', - 'shaw', - 'shell', - 'shia', - 'shiksha', - 'shoes', - 'shop', - 'shopping', - 'shouji', - 'show', - 'showtime', - 'si', - 'silk', - 'sina', - 'singles', - 'site', - 'sj', - 'sk', - 'ski', - 'skin', - 'sky', - 'skype', - 'sl', - 'sling', - 'sm', - 'smart', - 'smile', - 'sn', - 'sncf', - 'so', - 'soccer', - 'social', - 'softbank', - 'software', - 'sohu', - 'solar', - 'solutions', - 'song', - 'sony', - 'soy', - 'spa', - 'space', - 'sport', - 'spot', - 'sr', - 'srl', - 'ss', - 'st', - 'stada', - 'staples', - 'star', - 'statebank', - 'statefarm', - 'stc', - 'stcgroup', - 'stockholm', - 'storage', - 'store', - 'stream', - 'studio', - 'study', - 'style', - 'su', - 'sucks', - 'supplies', - 'supply', - 'support', - 'surf', - 'surgery', - 'suzuki', - 'sv', - 'swatch', - 'swiss', - 'sx', - 'sy', - 'sydney', - 'systems', - 'sz', - 'tab', - 'taipei', - 'talk', - 'taobao', - 'target', - 'tatamotors', - 'tatar', - 'tattoo', - 'tax', - 'taxi', - 'tc', - 'tci', - 'td', - 'tdk', - 'team', - 'tech', - 'technology', - 'tel', - 'temasek', - 'tennis', - 'teva', - 'tf', - 'tg', - 'th', - 'thd', - 'theater', - 'theatre', - 'tiaa', - 'tickets', - 'tienda', - 'tiffany', - 'tips', - 'tires', - 'tirol', - 'tj', - 'tjmaxx', - 'tjx', - 'tk', - 'tkmaxx', - 'tl', - 'tm', - 'tmall', - 'tn', - 'to', - 'today', - 'tokyo', - 'tools', - 'top', - 'toray', - 'toshiba', - 'total', - 'tours', - 'town', - 'toyota', - 'toys', - 'tr', - 'trade', - 'trading', - 'training', - 'travel', - 'travelchannel', - 'travelers', - 'travelersinsurance', - 'trust', - 'trv', - 'tt', - 'tube', - 'tui', - 'tunes', - 'tushu', - 'tv', - 'tvs', - 'tw', - 'tz', - 'ua', - 'ubank', - 'ubs', - 'ug', - 'uk', - 'unicom', - 'university', - 'uno', - 'uol', - 'ups', - 'us', - 'uy', - 'uz', - 'va', - 'vacations', - 'vana', - 'vanguard', - 'vc', - 've', - 'vegas', - 'ventures', - 'verisign', - 'versicherung', - 'vet', - 'vg', - 'vi', - 'viajes', - 'video', - 'vig', - 'viking', - 'villas', - 'vin', - 'vip', - 'virgin', - 'visa', - 'vision', - 'viva', - 'vivo', - 'vlaanderen', - 'vn', - 'vodka', - 'volkswagen', - 'volvo', - 'vote', - 'voting', - 'voto', - 'voyage', - 'vu', - 'vuelos', - 'wales', - 'walmart', - 'walter', - 'wang', - 'wanggou', - 'watch', - 'watches', - 'weather', - 'weatherchannel', - 'webcam', - 'weber', - 'website', - 'wed', - 'wedding', - 'weibo', - 'weir', - 'wf', - 'whoswho', - 'wien', - 'wiki', - 'williamhill', - 'win', - 'windows', - 'wine', - 'winners', - 'wme', - 'wolterskluwer', - 'woodside', - 'work', - 'works', - 'world', - 'wow', - 'ws', - 'wtc', - 'wtf', - 'xbox', - 'xerox', - 'xfinity', - 'xihuan', - 'xin', - 'कॉम', - 'セール', - '佛山', - 'ಭಾರತ', - '慈善', - '集团', - '在线', - '한국', - 'ଭାରତ', - '点看', - 'คอม', - 'ভাৰত', - 'ভারত', - '八卦', - 'ישראל', - 'موقع', - 'বাংলা', - '公益', - '公司', - '香格里拉', - '网站', - '移动', - '我爱你', - 'москва', - 'қаз', - 'католик', - 'онлайн', - 'сайт', - '联通', - 'срб', - 'бг', - 'бел', - 'קום', - '时尚', - '微博', - '淡马锡', - 'ファッション', - 'орг', - 'नेट', - 'ストア', - 'アマゾン', - '삼성', - 'சிங்கப்பூர்', - '商标', - '商店', - '商城', - 'дети', - 'мкд', - 'ею', - 'ポイント', - '新闻', - '家電', - 'كوم', - '中文网', - '中信', - '中国', - '中國', - '娱乐', - '谷歌', - 'భారత్', - 'ලංකා', - '電訊盈科', - '购物', - 'クラウド', - 'ભારત', - '通販', - 'भारतम्', - 'भारत', - 'भारोत', - '网店', - 'संगठन', - '餐厅', - '网络', - 'ком', - 'укр', - '香港', - '亚马逊', - '诺基亚', - '食品', - '飞利浦', - '台湾', - '台灣', - '手机', - 'мон', - 'الجزائر', - 'عمان', - 'ارامكو', - 'ایران', - 'العليان', - 'اتصالات', - 'امارات', - 'بازار', - 'موريتانيا', - 'پاکستان', - 'الاردن', - 'بارت', - 'بھارت', - 'المغرب', - 'ابوظبي', - 'البحرين', - 'السعودية', - 'ڀارت', - 'كاثوليك', - 'سودان', - 'همراه', - 'عراق', - 'مليسيا', - '澳門', - '닷컴', - '政府', - 'شبكة', - 'بيتك', - 'عرب', - 'გე', - '机构', - '组织机构', - '健康', - 'ไทย', - 'سورية', - '招聘', - 'рус', - 'рф', - 'تونس', - '大拿', - 'ລາວ', - 'みんな', - 'グーグル', - 'ευ', - 'ελ', - '世界', - '書籍', - 'ഭാരതം', - 'ਭਾਰਤ', - '网址', - '닷넷', - 'コム', - '天主教', - '游戏', - 'vermögensberater', - 'vermögensberatung', - '企业', - '信息', - '嘉里大酒店', - '嘉里', - 'مصر', - 'قطر', - '广东', - 'இலங்கை', - 'இந்தியா', - 'հայ', - '新加坡', - 'فلسطين', - '政务', - 'xxx', - 'xyz', - 'yachts', - 'yahoo', - 'yamaxun', - 'yandex', - 'ye', - 'yodobashi', - 'yoga', - 'yokohama', - 'you', - 'youtube', - 'yt', - 'yun', - 'za', - 'zappos', - 'zara', - 'zero', - 'zip', - 'zm', - 'zone', - 'zuerich', - 'zw', - ]; - - /** - * Array for valid Idns - * - * @see http://www.iana.org/domains/idn-tables/ Official list of supported IDN Chars - * (.AC) Ascension Island http://www.nic.ac/pdf/AC-IDN-Policy.pdf - * (.AR) Argentina http://www.nic.ar/faqidn.html - * (.AS) American Samoa http://www.nic.as/idn/chars.cfm - * (.AT) Austria http://www.nic.at/en/service/technical_information/idn/charset_converter/ - * (.BIZ) International http://www.iana.org/domains/idn-tables/ - * (.BR) Brazil http://registro.br/faq/faq6.html - * (.BV) Bouvett Island http://www.norid.no/domeneregistrering/idn/idn_nyetegn.en.html - * (.CAT) Catalan http://www.iana.org/domains/idn-tables/tables/cat_ca_1.0.html - * (.CH) Switzerland https://nic.switch.ch/reg/ocView.action?res=EF6GW2JBPVTG67DLNIQXU234MN6SC33JNQQGI7L6#anhang1 - * (.CL) Chile http://www.iana.org/domains/idn-tables/tables/cl_latn_1.0.html - * (.COM) International http://www.verisign.com/information-services/naming-services/internationalized-domain-names/index.html - * (.DE) Germany https://www.denic.de/en/know-how/idn-domains/idn-character-list/ - * (.DK) Danmark http://www.dk-hostmaster.dk/index.php?id=151 - * (.EE) Estonia https://www.iana.org/domains/idn-tables/tables/pl_et-pl_1.0.html - * (.ES) Spain https://www.nic.es/media/2008-05/1210147705287.pdf - * (.FI) Finland http://www.ficora.fi/en/index/palvelut/fiverkkotunnukset/aakkostenkaytto.html - * (.GR) Greece https://grweb.ics.forth.gr/CharacterTable1_en.jsp - * (.HR) Croatia https://www.dns.hr/en/portal/files/Odluka-1,2alfanum-dijak.pdf - * (.HU) Hungary http://www.domain.hu/domain/English/szabalyzat/szabalyzat.html - * (.IL) Israel http://www.isoc.org.il/domains/il-domain-rules.html - * (.INFO) International http://www.nic.info/info/idn - * (.IO) British Indian Ocean Territory http://www.nic.io/IO-IDN-Policy.pdf - * (.IR) Iran http://www.nic.ir/Allowable_Characters_dot-iran - * (.IS) Iceland https://www.isnic.is/en/domain/rules#2 - * (.KR) Korea http://www.iana.org/domains/idn-tables/tables/kr_ko-kr_1.0.html - * (.LI) Liechtenstein https://nic.switch.ch/reg/ocView.action?res=EF6GW2JBPVTG67DLNIQXU234MN6SC33JNQQGI7L6#anhang1 - * (.LT) Lithuania http://www.domreg.lt/static/doc/public/idn_symbols-en.pdf - * (.MD) Moldova http://www.register.md/ - * (.MUSEUM) International http://www.iana.org/domains/idn-tables/tables/museum_latn_1.0.html - * (.NET) International http://www.verisign.com/information-services/naming-services/internationalized-domain-names/index.html - * (.NO) Norway http://www.norid.no/domeneregistrering/idn/idn_nyetegn.en.html - * (.NU) Niue http://www.worldnames.net/ - * (.ORG) International http://www.pir.org/index.php?db=content/FAQs&tbl=FAQs_Registrant&id=2 - * (.PE) Peru https://www.nic.pe/nuevas_politicas_faq_2.php - * (.PL) Poland http://www.dns.pl/IDN/allowed_character_sets.pdf - * (.PR) Puerto Rico http://www.nic.pr/idn_rules.asp - * (.PT) Portugal https://online.dns.pt/dns_2008/do?com=DS;8216320233;111;+PAGE(4000058)+K-CAT-CODIGO(C.125)+RCNT(100); - * (.RU) Russia http://www.iana.org/domains/idn-tables/tables/ru_ru-ru_1.0.html - * (.SA) Saudi Arabia http://www.iana.org/domains/idn-tables/tables/sa_ar_1.0.html - * (.SE) Sweden http://www.iis.se/english/IDN_campaignsite.shtml?lang=en - * (.SH) Saint Helena http://www.nic.sh/SH-IDN-Policy.pdf - * (.SJ) Svalbard and Jan Mayen http://www.norid.no/domeneregistrering/idn/idn_nyetegn.en.html - * (.TH) Thailand http://www.iana.org/domains/idn-tables/tables/th_th-th_1.0.html - * (.TM) Turkmenistan http://www.nic.tm/TM-IDN-Policy.pdf - * (.TR) Turkey https://www.nic.tr/index.php - * (.UA) Ukraine http://www.iana.org/domains/idn-tables/tables/ua_cyrl_1.2.html - * (.VE) Venice http://www.iana.org/domains/idn-tables/tables/ve_es_1.0.html - * (.VN) Vietnam http://www.vnnic.vn/english/5-6-300-2-2-04-20071115.htm#1.%20Introduction - * - * @var array> - */ - protected $validIdns = [ - 'AC' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēėęěĝġģĥħīįĵķĺļľŀłńņňŋőœŕŗřśŝşšţťŧūŭůűųŵŷźżž]{1,63}$/iu'], - 'AR' => [1 => '/^[\x{002d}0-9a-zà-ãç-êìíñ-õü]{1,63}$/iu'], - 'AS' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĸĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźż]{1,63}$/iu'], - 'AT' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿœšž]{1,63}$/iu'], - 'BIZ' => 'Hostname/Biz.php', - 'BR' => [1 => '/^[\x{002d}0-9a-zà-ãçéíó-õúü]{1,63}$/iu'], - 'BV' => [1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'], - 'CAT' => [1 => '/^[\x{002d}0-9a-z·àç-éíïòóúü]{1,63}$/iu'], - 'CH' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'], - 'CL' => [1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'], - 'CN' => 'Hostname/Cn.php', - 'COM' => 'Hostname/Com.php', - 'DE' => [1 => '/^[\x{002d}0-9a-záàăâåäãąāæćĉčċçďđéèĕêěëėęēğĝġģĥħíìĭîïĩįīıĵķĺľļłńňñņŋóòŏôöőõøōœĸŕřŗśŝšşßťţŧúùŭûůüűũųūŵýŷÿźžżðþ]{1,63}$/iu'], - 'DK' => [1 => '/^[\x{002d}0-9a-zäåæéöøü]{1,63}$/iu'], - 'EE' => [1 => '/^[\x{002d}0-9a-zäõöüšž]{1,63}$/iu'], - 'ES' => [1 => '/^[\x{002d}0-9a-zàáçèéíïñòóúü·]{1,63}$/iu'], - 'EU' => [ - 1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu', - 2 => '/^[\x{002d}0-9a-zāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőœŕŗřśŝšťŧũūŭůűųŵŷźżž]{1,63}$/iu', - 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu', - 4 => '/^[\x{002d}0-9a-zΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ]{1,63}$/iu', - 5 => '/^[\x{002d}0-9a-zабвгдежзийклмнопрстуфхцчшщъыьэюя]{1,63}$/iu', - 6 => '/^[\x{002d}0-9a-zἀ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ὼώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷῂῃῄῆῇῐ-ῒΐῖῗῠ-ῧῲῳῴῶῷ]{1,63}$/iu', - ], - 'FI' => [1 => '/^[\x{002d}0-9a-zäåö]{1,63}$/iu'], - 'GR' => [1 => '/^[\x{002d}0-9a-zΆΈΉΊΌΎ-ΡΣ-ώἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼῂῃῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲῳῴῶ-ῼ]{1,63}$/iu'], - 'HK' => 'Hostname/Cn.php', - 'HR' => [1 => '/^[\x{002d}0-9a-zžćčđš]{1,63}$/iu'], - 'HU' => [1 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu'], - 'IL' => [ - 1 => '/^[\x{002d}0-9\x{05D0}-\x{05EA}]{1,63}$/iu', - 2 => '/^[\x{002d}0-9a-z]{1,63}$/i', - ], - 'INFO' => [ - 1 => '/^[\x{002d}0-9a-zäåæéöøü]{1,63}$/iu', - 2 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', - 3 => '/^[\x{002d}0-9a-záæéíðóöúýþ]{1,63}$/iu', - 4 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu', - 5 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', - 6 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', - 7 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', - 8 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', - ], - 'IO' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'], - 'IS' => [1 => '/^[\x{002d}0-9a-záéýúíóþæöð]{1,63}$/iu'], - 'IT' => [1 => '/^[\x{002d}0-9a-zàâäèéêëìîïòôöùûüæœçÿß-]{1,63}$/iu'], - 'JP' => 'Hostname/Jp.php', - 'KR' => [1 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu'], - 'LI' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'], - 'LT' => [1 => '/^[\x{002d}0-9ąčęėįšųūž]{1,63}$/iu'], - 'MD' => [1 => '/^[\x{002d}0-9ăâîşţ]{1,63}$/iu'], - 'MUSEUM' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćċčďđēėęěğġģħīįıķĺļľłńņňŋōőœŕŗřśşšţťŧūůűųŵŷźżžǎǐǒǔ\x{01E5}\x{01E7}\x{01E9}\x{01EF}ə\x{0292}ẁẃẅỳ]{1,63}$/iu'], - 'NET' => 'Hostname/Com.php', - 'NO' => [1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'], - 'NU' => 'Hostname/Com.php', - 'ORG' => [ - 1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', - 2 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', - 3 => '/^[\x{002d}0-9a-záäåæéëíðóöøúüýþ]{1,63}$/iu', - 4 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', - 5 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', - 6 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu', - 7 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', - ], - 'PE' => [1 => '/^[\x{002d}0-9a-zñáéíóúü]{1,63}$/iu'], - 'PL' => [ - 1 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', - 2 => '/^[\x{002d}а-ик-ш\x{0450}ѓѕјљњќџ]{1,63}$/iu', - 3 => '/^[\x{002d}0-9a-zâîăşţ]{1,63}$/iu', - 4 => '/^[\x{002d}0-9а-яё\x{04C2}]{1,63}$/iu', - 5 => '/^[\x{002d}0-9a-zàáâèéêìíîòóôùúûċġħż]{1,63}$/iu', - 6 => '/^[\x{002d}0-9a-zàäåæéêòóôöøü]{1,63}$/iu', - 7 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', - 8 => '/^[\x{002d}0-9a-zàáâãçéêíòóôõúü]{1,63}$/iu', - 9 => '/^[\x{002d}0-9a-zâîăşţ]{1,63}$/iu', - 10 => '/^[\x{002d}0-9a-záäéíóôúýčďĺľňŕšťž]{1,63}$/iu', - 11 => '/^[\x{002d}0-9a-zçë]{1,63}$/iu', - 12 => '/^[\x{002d}0-9а-ик-шђјљњћџ]{1,63}$/iu', - 13 => '/^[\x{002d}0-9a-zćčđšž]{1,63}$/iu', - 14 => '/^[\x{002d}0-9a-zâçöûüğış]{1,63}$/iu', - 15 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', - 16 => '/^[\x{002d}0-9a-zäõöüšž]{1,63}$/iu', - 17 => '/^[\x{002d}0-9a-zĉĝĥĵŝŭ]{1,63}$/iu', - 18 => '/^[\x{002d}0-9a-zâäéëîô]{1,63}$/iu', - 19 => '/^[\x{002d}0-9a-zàáâäåæçèéêëìíîïðñòôöøùúûüýćčłńřśš]{1,63}$/iu', - 20 => '/^[\x{002d}0-9a-zäåæõöøüšž]{1,63}$/iu', - 21 => '/^[\x{002d}0-9a-zàáçèéìíòóùú]{1,63}$/iu', - 22 => '/^[\x{002d}0-9a-zàáéíóöúüőű]{1,63}$/iu', - 23 => '/^[\x{002d}0-9ΐά-ώ]{1,63}$/iu', - 24 => '/^[\x{002d}0-9a-zàáâåæçèéêëðóôöøüþœ]{1,63}$/iu', - 25 => '/^[\x{002d}0-9a-záäéíóöúüýčďěňřšťůž]{1,63}$/iu', - 26 => '/^[\x{002d}0-9a-z·àçèéíïòóúü]{1,63}$/iu', - 27 => '/^[\x{002d}0-9а-ъьюя\x{0450}\x{045D}]{1,63}$/iu', - 28 => '/^[\x{002d}0-9а-яёіў]{1,63}$/iu', - 29 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', - 30 => '/^[\x{002d}0-9a-záäåæéëíðóöøúüýþ]{1,63}$/iu', - 31 => '/^[\x{002d}0-9a-zàâæçèéêëîïñôùûüÿœ]{1,63}$/iu', - 32 => '/^[\x{002d}0-9а-щъыьэюяёєіїґ]{1,63}$/iu', - 33 => '/^[\x{002d}0-9א-ת]{1,63}$/iu', - ], - 'PR' => [1 => '/^[\x{002d}0-9a-záéíóúñäëïüöâêîôûàèùæçœãõ]{1,63}$/iu'], - 'PT' => [1 => '/^[\x{002d}0-9a-záàâãçéêíóôõú]{1,63}$/iu'], - 'RS' => [1 => '/^[\x{002d}0-9a-zßáâäçéëíîóôöúüýăąćčďđęěĺľłńňőŕřśşšţťůűźżž]{1,63}$/iu'], - 'RU' => [1 => '/^[\x{002d}0-9а-яё]{1,63}$/iu'], - 'SA' => [1 => '/^[\x{002d}.0-9\x{0621}-\x{063A}\x{0641}-\x{064A}\x{0660}-\x{0669}]{1,63}$/iu'], - 'SE' => [1 => '/^[\x{002d}0-9a-zäåéöü]{1,63}$/iu'], - 'SH' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'], - 'SI' => [ - 1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu', - 2 => '/^[\x{002d}0-9a-zāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőœŕŗřśŝšťŧũūŭůűųŵŷźżž]{1,63}$/iu', - 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu', - ], - 'SJ' => [1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'], - 'TH' => [1 => '/^[\x{002d}0-9a-z\x{0E01}-\x{0E3A}\x{0E40}-\x{0E4D}\x{0E50}-\x{0E59}]{1,63}$/iu'], - 'TM' => [1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēėęěĝġģĥħīįĵķĺļľŀłńņňŋőœŕŗřśŝşšţťŧūŭůűųŵŷźżž]{1,63}$/iu'], - 'TW' => 'Hostname/Cn.php', - 'TR' => [1 => '/^[\x{002d}0-9a-zğıüşöç]{1,63}$/iu'], - 'UA' => [1 => '/^[\x{002d}0-9a-zабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџґӂʼ]{1,63}$/iu'], - 'VE' => [1 => '/^[\x{002d}0-9a-záéíóúüñ]{1,63}$/iu'], - 'VN' => [1 => '/^[ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯư\x{1EA0}-\x{1EF9}]{1,63}$/iu'], - 'мон' => [1 => '/^[\x{002d}0-9\x{0430}-\x{044F}]{1,63}$/iu'], - 'срб' => [1 => '/^[\x{002d}0-9а-ик-шђјљњћџ]{1,63}$/iu'], - 'сайт' => [1 => '/^[\x{002d}0-9а-яёіїѝйўґг]{1,63}$/iu'], - 'онлайн' => [1 => '/^[\x{002d}0-9а-яёіїѝйўґг]{1,63}$/iu'], - '中国' => 'Hostname/Cn.php', - '中國' => 'Hostname/Cn.php', - 'ලංකා' => [1 => '/^[\x{0d80}-\x{0dff}]{1,63}$/iu'], - '香港' => 'Hostname/Cn.php', - '台湾' => 'Hostname/Cn.php', - '台灣' => 'Hostname/Cn.php', - 'امارات' => [1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'], - 'الاردن' => [1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'], - 'السعودية' => [1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'], - 'ไทย' => [1 => '/^[\x{002d}0-9a-z\x{0E01}-\x{0E3A}\x{0E40}-\x{0E4D}\x{0E50}-\x{0E59}]{1,63}$/iu'], - 'рф' => [1 => '/^[\x{002d}0-9а-яё]{1,63}$/iu'], - 'تونس' => [1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'], - 'مصر' => [1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'], - 'இலங்கை' => [1 => '/^[\x{0b80}-\x{0bff}]{1,63}$/iu'], - 'فلسطين' => [1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'], - 'شبكة' => [1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'], - ]; - - /** @var array> */ - protected $idnLength = [ - 'BIZ' => [5 => 17, 11 => 15, 12 => 20], - 'CN' => [1 => 20], - 'COM' => [3 => 17, 5 => 20], - 'HK' => [1 => 15], - 'INFO' => [4 => 17], - 'KR' => [1 => 17], - 'NET' => [3 => 17, 5 => 20], - 'ORG' => [6 => 17], - 'TW' => [1 => 20], - 'امارات' => [1 => 30], - 'الاردن' => [1 => 30], - 'السعودية' => [1 => 30], - 'تونس' => [1 => 30], - 'مصر' => [1 => 30], - 'فلسطين' => [1 => 30], - 'شبكة' => [1 => 30], - '中国' => [1 => 20], - '中國' => [1 => 20], - '香港' => [1 => 20], - '台湾' => [1 => 20], - '台灣' => [1 => 20], - ]; - - /** @var null|false|string */ - protected $tld; - - /** - * Options for the hostname validator - * - * @var array - */ - protected $options = [ - 'allow' => self::ALLOW_DNS, // Allow these hostnames - 'useIdnCheck' => true, // Check IDN domains - 'useTldCheck' => true, // Check TLD elements - 'ipValidator' => null, // IP validator to use - ]; - - // phpcs:disable Squiz.Commenting.FunctionComment.ExtraParamComment - - /** - * Sets validator options. - * - * @see http://www.iana.org/cctld/specifications-policies-cctlds-01apr02.htm Technical Specifications for ccTLDs - * - * @param array $options OPTIONAL Array of validator options; see Hostname::$options - * @param int $allow OPTIONAL Set what types of hostname to allow (default ALLOW_DNS) - * @param bool $useIdnCheck OPTIONAL Set whether IDN domains are validated (default true) - * @param bool $useTldCheck Set whether the TLD element of a hostname is validated (default true) - * @param Ip $ipValidator OPTIONAL - */ - public function __construct($options = []) - { - // phpcs:enable - if (! is_array($options)) { - $options = func_get_args(); - $temp['allow'] = array_shift($options); - if (! empty($options)) { - $temp['useIdnCheck'] = array_shift($options); - } - - if (! empty($options)) { - $temp['useTldCheck'] = array_shift($options); - } - - if (! empty($options)) { - $temp['ipValidator'] = array_shift($options); - } - - $options = $temp; - } - - if (! array_key_exists('ipValidator', $options)) { - $options['ipValidator'] = null; - } - - parent::__construct($options); - } - - /** - * Returns the set ip validator - * - * @return Ip - */ - public function getIpValidator() - { - return $this->options['ipValidator']; - } - - /** - * @param Ip $ipValidator OPTIONAL - * @return self - */ - public function setIpValidator(?Ip $ipValidator = null) - { - if ($ipValidator === null) { - $ipValidator = new Ip(); - } - - $this->options['ipValidator'] = $ipValidator; - return $this; - } - - /** - * Returns the allow option - * - * @return int - */ - public function getAllow() - { - return $this->options['allow']; - } - - /** - * Sets the allow option - * - * @param int $allow - * @return $this Provides a fluent interface - */ - public function setAllow($allow) - { - $this->options['allow'] = $allow; - return $this; - } - - /** - * Returns the set idn option - * - * @return bool - */ - public function getIdnCheck() - { - return $this->options['useIdnCheck']; - } - - /** - * Set whether IDN domains are validated - * - * This only applies when DNS hostnames are validated - * - * @param bool $useIdnCheck Set to true to validate IDN domains - * @return $this - */ - public function useIdnCheck($useIdnCheck) - { - $this->options['useIdnCheck'] = (bool) $useIdnCheck; - return $this; - } - - /** - * Returns the set tld option - * - * @return bool - */ - public function getTldCheck() - { - return $this->options['useTldCheck']; - } - - /** - * Set whether the TLD element of a hostname is validated - * - * This only applies when DNS hostnames are validated - * - * @param bool $useTldCheck Set to true to validate TLD elements - * @return $this - */ - public function useTldCheck($useTldCheck) - { - $this->options['useTldCheck'] = (bool) $useTldCheck; - return $this; - } - - /** - * Defined by Interface - * - * Returns true if and only if the $value is a valid hostname with respect to the current allow option - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - // Check input against IP address schema - if ( - ((preg_match('/^[0-9.]*$/', $value) && strpos($value, '.') !== false) - || (preg_match('/^[0-9a-f:.]*$/i', $value) && strpos($value, ':') !== false)) - && $this->getIpValidator()->setTranslator($this->getTranslator())->isValid($value) - ) { - if (! ($this->getAllow() & self::ALLOW_IP)) { - $this->error(self::IP_ADDRESS_NOT_ALLOWED); - return false; - } - - return true; - } - - // Handle Regex compilation failure that may happen on .biz domain with has @ character, eg: tapi4457@hsoqvf.biz - // Technically, hostname with '@' character is invalid, so mark as invalid immediately - // @see https://github.com/laminas/laminas-validator/issues/8 - if (strpos($value, '@') !== false) { - $this->error(self::INVALID_HOSTNAME); - return false; - } - - // Local hostnames are allowed to be partial (ending '.') - if ($this->getAllow() & self::ALLOW_LOCAL) { - if (substr($value, -1) === '.') { - $value = substr($value, 0, -1); - if (substr($value, -1) === '.') { - // Empty hostnames (ending '..') are not allowed - $this->error(self::INVALID_LOCAL_NAME); - return false; - } - } - } - - $domainParts = explode('.', $value); - - // Prevent partial IP V4 addresses (ending '.') - if ( - count($domainParts) === 4 && preg_match('/^[0-9.a-e:.]*$/i', $value) - && $this->getIpValidator()->setTranslator($this->getTranslator())->isValid($value) - ) { - $this->error(self::INVALID_LOCAL_NAME); - } - - $utf8StrWrapper = StringUtils::getWrapper('UTF-8'); - - // Check input against DNS hostname schema - if ( - count($domainParts) > 1 - && $utf8StrWrapper->strlen($value) >= 4 - && $utf8StrWrapper->strlen($value) <= 254 - ) { - $status = false; - - do { - // First check TLD - $matches = []; - if ( - preg_match('/([^.]{2,63})$/u', end($domainParts), $matches) - || (array_key_exists(end($domainParts), $this->validIdns)) - ) { - reset($domainParts); - - // Hostname characters are: *(label dot)(label dot label); max 254 chars - // label: id-prefix [*ldh{61} id-prefix]; max 63 chars - // id-prefix: alpha / digit - // ldh: alpha / digit / dash - - $this->tld = $matches[1]; - // Decode Punycode TLD to IDN - if (strpos($this->tld, 'xn--') === 0) { - $this->tld = $this->decodePunycode(substr($this->tld, 4)); - if ($this->tld === false) { - return false; - } - } else { - $this->tld = strtoupper($this->tld); - } - - // Match TLD against known list - $removedTld = false; - if ($this->getTldCheck()) { - if ( - ! in_array(strtolower($this->tld), $this->validTlds) - && ! in_array($this->tld, $this->validTlds) - ) { - $this->error(self::UNKNOWN_TLD); - $status = false; - break; - } - // We have already validated that the TLD is fine. We don't want it to go through the below - // checks as new UTF-8 TLDs will incorrectly fail if there is no IDN regex for it. - array_pop($domainParts); - $removedTld = true; - } - - /** - * Match against IDN hostnames - * Note: Keep label regex short to avoid issues with long patterns when matching IDN hostnames - * - * @see Hostname\Interface - */ - $regexChars = [0 => '/^[a-z0-9\x2d]{1,63}$/i']; - if ($this->getIdnCheck() && isset($this->validIdns[$this->tld])) { - if (is_string($this->validIdns[$this->tld])) { - $regexChars += include __DIR__ . '/' . $this->validIdns[$this->tld]; - } else { - $regexChars += $this->validIdns[$this->tld]; - } - } - - // Check each hostname part - $check = 0; - $lastDomainPart = end($domainParts); - if (! $removedTld) { - $lastDomainPart = prev($domainParts); - } - foreach ($domainParts as $domainPart) { - // Decode Punycode domain names to IDN - if (strpos($domainPart, 'xn--') === 0) { - $domainPart = $this->decodePunycode(substr($domainPart, 4)); - if ($domainPart === false) { - return false; - } - } - - // Skip following checks if domain part is empty, as it definitely is not a valid hostname then - if ($domainPart === '') { - $this->error(self::INVALID_HOSTNAME); - $status = false; - break 2; - } - - // Check dash (-) does not start, end or appear in 3rd and 4th positions - if ( - $utf8StrWrapper->strpos($domainPart, '-') === 0 - || ($utf8StrWrapper->strlen($domainPart) > 2 - && $utf8StrWrapper->strpos($domainPart, '-', 2) === 2 - && $utf8StrWrapper->strpos($domainPart, '-', 3) === 3 - ) - || $utf8StrWrapper->substr($domainPart, -1) === '-' - ) { - $this->error(self::INVALID_DASH); - $status = false; - break 2; - } - - // Check each domain part - $checked = false; - $isSubDomain = $domainPart !== $lastDomainPart; - $partRegexChars = $isSubDomain ? ['/^[a-z0-9_\x2d]{1,63}$/i'] + $regexChars : $regexChars; - foreach ($partRegexChars as $regexKey => $regexChar) { - $status = preg_match($regexChar, $domainPart); - if ($status > 0) { - $length = 63; - if ( - array_key_exists($this->tld, $this->idnLength) - && array_key_exists($regexKey, $this->idnLength[$this->tld]) - ) { - $length = $this->idnLength[$this->tld]; - } - - if ($utf8StrWrapper->strlen($domainPart) > $length) { - $this->error(self::INVALID_HOSTNAME); - $status = false; - } else { - $checked = true; - break; - } - } - } - - if ($checked) { - ++$check; - } - } - - // If one of the labels doesn't match, the hostname is invalid - if ($check !== count($domainParts)) { - $this->error(self::INVALID_HOSTNAME_SCHEMA); - $status = false; - } - } else { - // Hostname not long enough - $this->error(self::UNDECIPHERABLE_TLD); - $status = false; - } - } while (false); - - // If the input passes as an Internet domain name, and domain names are allowed, then the hostname - // passes validation - if ($status && ($this->getAllow() & self::ALLOW_DNS)) { - return true; - } - } elseif ($this->getAllow() & self::ALLOW_DNS) { - $this->error(self::INVALID_HOSTNAME); - } - - // Check for URI Syntax (RFC3986) - if ($this->getAllow() & self::ALLOW_URI) { - if (preg_match("/^([a-zA-Z0-9-._~!$&\'()*+,;=]|%[[:xdigit:]]{2}){1,254}$/i", $value)) { - return true; - } - - $this->error(self::INVALID_URI); - } - - // Check input against local network name schema; last chance to pass validation - $regexLocal = '/^(([a-zA-Z0-9\x2d]{1,63}\x2e)*[a-zA-Z0-9\x2d]{1,63}[\x2e]{0,1}){1,254}$/'; - $status = preg_match($regexLocal, $value); - - // If the input passes as a local network name, and local network names are allowed, then the - // hostname passes validation - $allowLocal = $this->getAllow() & self::ALLOW_LOCAL; - if ($status && $allowLocal) { - return true; - } - - // If the input does not pass as a local network name, add a message - if (! $status) { - $this->error(self::INVALID_LOCAL_NAME); - } - - // If local network names are not allowed, add a message - if ($status && ! $allowLocal) { - $this->error(self::LOCAL_NAME_NOT_ALLOWED); - } - - return false; - } - - /** - * Decodes a punycode encoded string to it's original utf8 string - * Returns false in case of a decoding failure. - * - * @param string $encoded Punycode encoded string to decode - * @return string|false - */ - protected function decodePunycode($encoded) - { - if (! preg_match('/^[a-z0-9-]+$/i', $encoded)) { - // no punycode encoded string - $this->error(self::CANNOT_DECODE_PUNYCODE); - return false; - } - - $decoded = []; - $separator = strrpos($encoded, '-'); - if ($separator > 0) { - for ($x = 0; $x < $separator; ++$x) { - // prepare decoding matrix - $decoded[] = ord($encoded[$x]); - } - } - - $lengthd = count($decoded); - $lengthe = strlen($encoded); - - // decoding - $init = true; - $base = 72; - $index = 0; - $char = 0x80; - - for ($indexe = $separator ? $separator + 1 : 0; $indexe < $lengthe; ++$lengthd) { - for ($oldIndex = $index, $pos = 1, $key = 36; 1; $key += 36) { - $hex = ord($encoded[$indexe++]); - $digit = $hex - 48 < 10 ? $hex - 22 - : ($hex - 65 < 26 ? $hex - 65 - : ($hex - 97 < 26 ? $hex - 97 - : 36)); - - $index += $digit * $pos; - $tag = $key <= $base ? 1 : ($key >= $base + 26 ? 26 : $key - $base); - if ($digit < $tag) { - break; - } - - $pos = (int) ($pos * (36 - $tag)); - } - - $delta = intval($init ? ($index - $oldIndex) / 700 : ($index - $oldIndex) / 2); - $delta += intval($delta / ($lengthd + 1)); - for ($key = 0; $delta > 910 / 2; $key += 36) { - $delta = intval($delta / 35); - } - - $base = intval($key + 36 * $delta / ($delta + 38)); - $init = false; - $char += (int) ($index / ($lengthd + 1)); - $index %= $lengthd + 1; - if ($lengthd > 0) { - for ($i = $lengthd; $i > $index; $i--) { - $decoded[$i] = $decoded[$i - 1]; - } - } - - $decoded[$index++] = $char; - } - - // convert decoded ucs4 to utf8 string - foreach ($decoded as $key => $value) { - if ($value < 128) { - $decoded[$key] = chr($value); - } elseif ($value < 1 << 11) { - $decoded[$key] = chr(192 + ($value >> 6)); - $decoded[$key] .= chr(128 + ($value & 63)); - } elseif ($value < 1 << 16) { - $decoded[$key] = chr(224 + ($value >> 12)); - $decoded[$key] .= chr(128 + (($value >> 6) & 63)); - $decoded[$key] .= chr(128 + ($value & 63)); - } elseif ($value < 1 << 21) { - $decoded[$key] = chr(240 + ($value >> 18)); - $decoded[$key] .= chr(128 + (($value >> 12) & 63)); - $decoded[$key] .= chr(128 + (($value >> 6) & 63)); - $decoded[$key] .= chr(128 + ($value & 63)); - } else { - $this->error(self::CANNOT_DECODE_PUNYCODE); - return false; - } - } - - return implode($decoded); - } -} diff --git a/lib/laminas/laminas-validator/src/Hostname/Biz.php b/lib/laminas/laminas-validator/src/Hostname/Biz.php deleted file mode 100644 index f852cf1c2..000000000 --- a/lib/laminas/laminas-validator/src/Hostname/Biz.php +++ /dev/null @@ -1,2897 +0,0 @@ - '/^[\x{002d}0-9a-zäåæéöøü]{1,63}$/iu', - 2 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', - 3 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', - 4 => '/^[\x{002d}0-9a-záæéíðóöúýþ]{1,63}$/iu', - 5 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu', - 6 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', - 7 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', - 8 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu', - 9 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', - 10 => '/^[\x{002d}0-9a-záàâãçéêíóôõú]{1,63}$/iu', - 11 => '/^[\x{002d}0-9a-z\x{3005}-\x{3007}\x{3041}-\x{3093}\x{309D}\x{309E}\x{30A1}-\x{30F6}\x{30FC}' - . '\x{30FD}\x{30FE}\x{4E00}\x{4E01}\x{4E03}\x{4E07}\x{4E08}\x{4E09}\x{4E0A}' - . '\x{4E0B}\x{4E0D}\x{4E0E}\x{4E10}\x{4E11}\x{4E14}\x{4E15}\x{4E16}\x{4E17}' - . '\x{4E18}\x{4E19}\x{4E1E}\x{4E21}\x{4E26}\x{4E2A}\x{4E2D}\x{4E31}\x{4E32}' - . '\x{4E36}\x{4E38}\x{4E39}\x{4E3B}\x{4E3C}\x{4E3F}\x{4E42}\x{4E43}\x{4E45}' - . '\x{4E4B}\x{4E4D}\x{4E4E}\x{4E4F}\x{4E55}\x{4E56}\x{4E57}\x{4E58}\x{4E59}' - . '\x{4E5D}\x{4E5E}\x{4E5F}\x{4E62}\x{4E71}\x{4E73}\x{4E7E}\x{4E80}\x{4E82}' - . '\x{4E85}\x{4E86}\x{4E88}\x{4E89}\x{4E8A}\x{4E8B}\x{4E8C}\x{4E8E}\x{4E91}' - . '\x{4E92}\x{4E94}\x{4E95}\x{4E98}\x{4E99}\x{4E9B}\x{4E9C}\x{4E9E}\x{4E9F}' - . '\x{4EA0}\x{4EA1}\x{4EA2}\x{4EA4}\x{4EA5}\x{4EA6}\x{4EA8}\x{4EAB}\x{4EAC}' - . '\x{4EAD}\x{4EAE}\x{4EB0}\x{4EB3}\x{4EB6}\x{4EBA}\x{4EC0}\x{4EC1}\x{4EC2}' - . '\x{4EC4}\x{4EC6}\x{4EC7}\x{4ECA}\x{4ECB}\x{4ECD}\x{4ECE}\x{4ECF}\x{4ED4}' - . '\x{4ED5}\x{4ED6}\x{4ED7}\x{4ED8}\x{4ED9}\x{4EDD}\x{4EDE}\x{4EDF}\x{4EE3}' - . '\x{4EE4}\x{4EE5}\x{4EED}\x{4EEE}\x{4EF0}\x{4EF2}\x{4EF6}\x{4EF7}\x{4EFB}' - . '\x{4F01}\x{4F09}\x{4F0A}\x{4F0D}\x{4F0E}\x{4F0F}\x{4F10}\x{4F11}\x{4F1A}' - . '\x{4F1C}\x{4F1D}\x{4F2F}\x{4F30}\x{4F34}\x{4F36}\x{4F38}\x{4F3A}\x{4F3C}' - . '\x{4F3D}\x{4F43}\x{4F46}\x{4F47}\x{4F4D}\x{4F4E}\x{4F4F}\x{4F50}\x{4F51}' - . '\x{4F53}\x{4F55}\x{4F57}\x{4F59}\x{4F5A}\x{4F5B}\x{4F5C}\x{4F5D}\x{4F5E}' - . '\x{4F69}\x{4F6F}\x{4F70}\x{4F73}\x{4F75}\x{4F76}\x{4F7B}\x{4F7C}\x{4F7F}' - . '\x{4F83}\x{4F86}\x{4F88}\x{4F8B}\x{4F8D}\x{4F8F}\x{4F91}\x{4F96}\x{4F98}' - . '\x{4F9B}\x{4F9D}\x{4FA0}\x{4FA1}\x{4FAB}\x{4FAD}\x{4FAE}\x{4FAF}\x{4FB5}' - . '\x{4FB6}\x{4FBF}\x{4FC2}\x{4FC3}\x{4FC4}\x{4FCA}\x{4FCE}\x{4FD0}\x{4FD1}' - . '\x{4FD4}\x{4FD7}\x{4FD8}\x{4FDA}\x{4FDB}\x{4FDD}\x{4FDF}\x{4FE1}\x{4FE3}' - . '\x{4FE4}\x{4FE5}\x{4FEE}\x{4FEF}\x{4FF3}\x{4FF5}\x{4FF6}\x{4FF8}\x{4FFA}' - . '\x{4FFE}\x{5005}\x{5006}\x{5009}\x{500B}\x{500D}\x{500F}\x{5011}\x{5012}' - . '\x{5014}\x{5016}\x{5019}\x{501A}\x{501F}\x{5021}\x{5023}\x{5024}\x{5025}' - . '\x{5026}\x{5028}\x{5029}\x{502A}\x{502B}\x{502C}\x{502D}\x{5036}\x{5039}' - . '\x{5043}\x{5047}\x{5048}\x{5049}\x{504F}\x{5050}\x{5055}\x{5056}\x{505A}' - . '\x{505C}\x{5065}\x{506C}\x{5072}\x{5074}\x{5075}\x{5076}\x{5078}\x{507D}' - . '\x{5080}\x{5085}\x{508D}\x{5091}\x{5098}\x{5099}\x{509A}\x{50AC}\x{50AD}' - . '\x{50B2}\x{50B3}\x{50B4}\x{50B5}\x{50B7}\x{50BE}\x{50C2}\x{50C5}\x{50C9}' - . '\x{50CA}\x{50CD}\x{50CF}\x{50D1}\x{50D5}\x{50D6}\x{50DA}\x{50DE}\x{50E3}' - . '\x{50E5}\x{50E7}\x{50ED}\x{50EE}\x{50F5}\x{50F9}\x{50FB}\x{5100}\x{5101}' - . '\x{5102}\x{5104}\x{5109}\x{5112}\x{5114}\x{5115}\x{5116}\x{5118}\x{511A}' - . '\x{511F}\x{5121}\x{512A}\x{5132}\x{5137}\x{513A}\x{513B}\x{513C}\x{513F}' - . '\x{5140}\x{5141}\x{5143}\x{5144}\x{5145}\x{5146}\x{5147}\x{5148}\x{5149}' - . '\x{514B}\x{514C}\x{514D}\x{514E}\x{5150}\x{5152}\x{5154}\x{515A}\x{515C}' - . '\x{5162}\x{5165}\x{5168}\x{5169}\x{516A}\x{516B}\x{516C}\x{516D}\x{516E}' - . '\x{5171}\x{5175}\x{5176}\x{5177}\x{5178}\x{517C}\x{5180}\x{5182}\x{5185}' - . '\x{5186}\x{5189}\x{518A}\x{518C}\x{518D}\x{518F}\x{5190}\x{5191}\x{5192}' - . '\x{5193}\x{5195}\x{5196}\x{5197}\x{5199}\x{51A0}\x{51A2}\x{51A4}\x{51A5}' - . '\x{51A6}\x{51A8}\x{51A9}\x{51AA}\x{51AB}\x{51AC}\x{51B0}\x{51B1}\x{51B2}' - . '\x{51B3}\x{51B4}\x{51B5}\x{51B6}\x{51B7}\x{51BD}\x{51C4}\x{51C5}\x{51C6}' - . '\x{51C9}\x{51CB}\x{51CC}\x{51CD}\x{51D6}\x{51DB}\x{51DC}\x{51DD}\x{51E0}' - . '\x{51E1}\x{51E6}\x{51E7}\x{51E9}\x{51EA}\x{51ED}\x{51F0}\x{51F1}\x{51F5}' - . '\x{51F6}\x{51F8}\x{51F9}\x{51FA}\x{51FD}\x{51FE}\x{5200}\x{5203}\x{5204}' - . '\x{5206}\x{5207}\x{5208}\x{520A}\x{520B}\x{520E}\x{5211}\x{5214}\x{5217}' - . '\x{521D}\x{5224}\x{5225}\x{5227}\x{5229}\x{522A}\x{522E}\x{5230}\x{5233}' - . '\x{5236}\x{5237}\x{5238}\x{5239}\x{523A}\x{523B}\x{5243}\x{5244}\x{5247}' - . '\x{524A}\x{524B}\x{524C}\x{524D}\x{524F}\x{5254}\x{5256}\x{525B}\x{525E}' - . '\x{5263}\x{5264}\x{5265}\x{5269}\x{526A}\x{526F}\x{5270}\x{5271}\x{5272}' - . '\x{5273}\x{5274}\x{5275}\x{527D}\x{527F}\x{5283}\x{5287}\x{5288}\x{5289}' - . '\x{528D}\x{5291}\x{5292}\x{5294}\x{529B}\x{529F}\x{52A0}\x{52A3}\x{52A9}' - . '\x{52AA}\x{52AB}\x{52AC}\x{52AD}\x{52B1}\x{52B4}\x{52B5}\x{52B9}\x{52BC}' - . '\x{52BE}\x{52C1}\x{52C3}\x{52C5}\x{52C7}\x{52C9}\x{52CD}\x{52D2}\x{52D5}' - . '\x{52D7}\x{52D8}\x{52D9}\x{52DD}\x{52DE}\x{52DF}\x{52E0}\x{52E2}\x{52E3}' - . '\x{52E4}\x{52E6}\x{52E7}\x{52F2}\x{52F3}\x{52F5}\x{52F8}\x{52F9}\x{52FA}' - . '\x{52FE}\x{52FF}\x{5301}\x{5302}\x{5305}\x{5306}\x{5308}\x{530D}\x{530F}' - . '\x{5310}\x{5315}\x{5316}\x{5317}\x{5319}\x{531A}\x{531D}\x{5320}\x{5321}' - . '\x{5323}\x{532A}\x{532F}\x{5331}\x{5333}\x{5338}\x{5339}\x{533A}\x{533B}' - . '\x{533F}\x{5340}\x{5341}\x{5343}\x{5345}\x{5346}\x{5347}\x{5348}\x{5349}' - . '\x{534A}\x{534D}\x{5351}\x{5352}\x{5353}\x{5354}\x{5357}\x{5358}\x{535A}' - . '\x{535C}\x{535E}\x{5360}\x{5366}\x{5369}\x{536E}\x{536F}\x{5370}\x{5371}' - . '\x{5373}\x{5374}\x{5375}\x{5377}\x{5378}\x{537B}\x{537F}\x{5382}\x{5384}' - . '\x{5396}\x{5398}\x{539A}\x{539F}\x{53A0}\x{53A5}\x{53A6}\x{53A8}\x{53A9}' - . '\x{53AD}\x{53AE}\x{53B0}\x{53B3}\x{53B6}\x{53BB}\x{53C2}\x{53C3}\x{53C8}' - . '\x{53C9}\x{53CA}\x{53CB}\x{53CC}\x{53CD}\x{53CE}\x{53D4}\x{53D6}\x{53D7}' - . '\x{53D9}\x{53DB}\x{53DF}\x{53E1}\x{53E2}\x{53E3}\x{53E4}\x{53E5}\x{53E8}' - . '\x{53E9}\x{53EA}\x{53EB}\x{53EC}\x{53ED}\x{53EE}\x{53EF}\x{53F0}\x{53F1}' - . '\x{53F2}\x{53F3}\x{53F6}\x{53F7}\x{53F8}\x{53FA}\x{5401}\x{5403}\x{5404}' - . '\x{5408}\x{5409}\x{540A}\x{540B}\x{540C}\x{540D}\x{540E}\x{540F}\x{5410}' - . '\x{5411}\x{541B}\x{541D}\x{541F}\x{5420}\x{5426}\x{5429}\x{542B}\x{542C}' - . '\x{542D}\x{542E}\x{5436}\x{5438}\x{5439}\x{543B}\x{543C}\x{543D}\x{543E}' - . '\x{5440}\x{5442}\x{5446}\x{5448}\x{5449}\x{544A}\x{544E}\x{5451}\x{545F}' - . '\x{5468}\x{546A}\x{5470}\x{5471}\x{5473}\x{5475}\x{5476}\x{5477}\x{547B}' - . '\x{547C}\x{547D}\x{5480}\x{5484}\x{5486}\x{548B}\x{548C}\x{548E}\x{548F}' - . '\x{5490}\x{5492}\x{54A2}\x{54A4}\x{54A5}\x{54A8}\x{54AB}\x{54AC}\x{54AF}' - . '\x{54B2}\x{54B3}\x{54B8}\x{54BC}\x{54BD}\x{54BE}\x{54C0}\x{54C1}\x{54C2}' - . '\x{54C4}\x{54C7}\x{54C8}\x{54C9}\x{54D8}\x{54E1}\x{54E2}\x{54E5}\x{54E6}' - . '\x{54E8}\x{54E9}\x{54ED}\x{54EE}\x{54F2}\x{54FA}\x{54FD}\x{5504}\x{5506}' - . '\x{5507}\x{550F}\x{5510}\x{5514}\x{5516}\x{552E}\x{552F}\x{5531}\x{5533}' - . '\x{5538}\x{5539}\x{553E}\x{5540}\x{5544}\x{5545}\x{5546}\x{554C}\x{554F}' - . '\x{5553}\x{5556}\x{5557}\x{555C}\x{555D}\x{5563}\x{557B}\x{557C}\x{557E}' - . '\x{5580}\x{5583}\x{5584}\x{5587}\x{5589}\x{558A}\x{558B}\x{5598}\x{5599}' - . '\x{559A}\x{559C}\x{559D}\x{559E}\x{559F}\x{55A7}\x{55A8}\x{55A9}\x{55AA}' - . '\x{55AB}\x{55AC}\x{55AE}\x{55B0}\x{55B6}\x{55C4}\x{55C5}\x{55C7}\x{55D4}' - . '\x{55DA}\x{55DC}\x{55DF}\x{55E3}\x{55E4}\x{55F7}\x{55F9}\x{55FD}\x{55FE}' - . '\x{5606}\x{5609}\x{5614}\x{5616}\x{5617}\x{5618}\x{561B}\x{5629}\x{562F}' - . '\x{5631}\x{5632}\x{5634}\x{5636}\x{5638}\x{5642}\x{564C}\x{564E}\x{5650}' - . '\x{565B}\x{5664}\x{5668}\x{566A}\x{566B}\x{566C}\x{5674}\x{5678}\x{567A}' - . '\x{5680}\x{5686}\x{5687}\x{568A}\x{568F}\x{5694}\x{56A0}\x{56A2}\x{56A5}' - . '\x{56AE}\x{56B4}\x{56B6}\x{56BC}\x{56C0}\x{56C1}\x{56C2}\x{56C3}\x{56C8}' - . '\x{56CE}\x{56D1}\x{56D3}\x{56D7}\x{56D8}\x{56DA}\x{56DB}\x{56DE}\x{56E0}' - . '\x{56E3}\x{56EE}\x{56F0}\x{56F2}\x{56F3}\x{56F9}\x{56FA}\x{56FD}\x{56FF}' - . '\x{5700}\x{5703}\x{5704}\x{5708}\x{5709}\x{570B}\x{570D}\x{570F}\x{5712}' - . '\x{5713}\x{5716}\x{5718}\x{571C}\x{571F}\x{5726}\x{5727}\x{5728}\x{572D}' - . '\x{5730}\x{5737}\x{5738}\x{573B}\x{5740}\x{5742}\x{5747}\x{574A}\x{574E}' - . '\x{574F}\x{5750}\x{5751}\x{5761}\x{5764}\x{5766}\x{5769}\x{576A}\x{577F}' - . '\x{5782}\x{5788}\x{5789}\x{578B}\x{5793}\x{57A0}\x{57A2}\x{57A3}\x{57A4}' - . '\x{57AA}\x{57B0}\x{57B3}\x{57C0}\x{57C3}\x{57C6}\x{57CB}\x{57CE}\x{57D2}' - . '\x{57D3}\x{57D4}\x{57D6}\x{57DC}\x{57DF}\x{57E0}\x{57E3}\x{57F4}\x{57F7}' - . '\x{57F9}\x{57FA}\x{57FC}\x{5800}\x{5802}\x{5805}\x{5806}\x{580A}\x{580B}' - . '\x{5815}\x{5819}\x{581D}\x{5821}\x{5824}\x{582A}\x{582F}\x{5830}\x{5831}' - . '\x{5834}\x{5835}\x{583A}\x{583D}\x{5840}\x{5841}\x{584A}\x{584B}\x{5851}' - . '\x{5852}\x{5854}\x{5857}\x{5858}\x{5859}\x{585A}\x{585E}\x{5862}\x{5869}' - . '\x{586B}\x{5870}\x{5872}\x{5875}\x{5879}\x{587E}\x{5883}\x{5885}\x{5893}' - . '\x{5897}\x{589C}\x{589F}\x{58A8}\x{58AB}\x{58AE}\x{58B3}\x{58B8}\x{58B9}' - . '\x{58BA}\x{58BB}\x{58BE}\x{58C1}\x{58C5}\x{58C7}\x{58CA}\x{58CC}\x{58D1}' - . '\x{58D3}\x{58D5}\x{58D7}\x{58D8}\x{58D9}\x{58DC}\x{58DE}\x{58DF}\x{58E4}' - . '\x{58E5}\x{58EB}\x{58EC}\x{58EE}\x{58EF}\x{58F0}\x{58F1}\x{58F2}\x{58F7}' - . '\x{58F9}\x{58FA}\x{58FB}\x{58FC}\x{58FD}\x{5902}\x{5909}\x{590A}\x{590F}' - . '\x{5910}\x{5915}\x{5916}\x{5918}\x{5919}\x{591A}\x{591B}\x{591C}\x{5922}' - . '\x{5925}\x{5927}\x{5929}\x{592A}\x{592B}\x{592C}\x{592D}\x{592E}\x{5931}' - . '\x{5932}\x{5937}\x{5938}\x{593E}\x{5944}\x{5947}\x{5948}\x{5949}\x{594E}' - . '\x{594F}\x{5950}\x{5951}\x{5954}\x{5955}\x{5957}\x{5958}\x{595A}\x{5960}' - . '\x{5962}\x{5965}\x{5967}\x{5968}\x{5969}\x{596A}\x{596C}\x{596E}\x{5973}' - . '\x{5974}\x{5978}\x{597D}\x{5981}\x{5982}\x{5983}\x{5984}\x{598A}\x{598D}' - . '\x{5993}\x{5996}\x{5999}\x{599B}\x{599D}\x{59A3}\x{59A5}\x{59A8}\x{59AC}' - . '\x{59B2}\x{59B9}\x{59BB}\x{59BE}\x{59C6}\x{59C9}\x{59CB}\x{59D0}\x{59D1}' - . '\x{59D3}\x{59D4}\x{59D9}\x{59DA}\x{59DC}\x{59E5}\x{59E6}\x{59E8}\x{59EA}' - . '\x{59EB}\x{59F6}\x{59FB}\x{59FF}\x{5A01}\x{5A03}\x{5A09}\x{5A11}\x{5A18}' - . '\x{5A1A}\x{5A1C}\x{5A1F}\x{5A20}\x{5A25}\x{5A29}\x{5A2F}\x{5A35}\x{5A36}' - . '\x{5A3C}\x{5A40}\x{5A41}\x{5A46}\x{5A49}\x{5A5A}\x{5A62}\x{5A66}\x{5A6A}' - . '\x{5A6C}\x{5A7F}\x{5A92}\x{5A9A}\x{5A9B}\x{5ABC}\x{5ABD}\x{5ABE}\x{5AC1}' - . '\x{5AC2}\x{5AC9}\x{5ACB}\x{5ACC}\x{5AD0}\x{5AD6}\x{5AD7}\x{5AE1}\x{5AE3}' - . '\x{5AE6}\x{5AE9}\x{5AFA}\x{5AFB}\x{5B09}\x{5B0B}\x{5B0C}\x{5B16}\x{5B22}' - . '\x{5B2A}\x{5B2C}\x{5B30}\x{5B32}\x{5B36}\x{5B3E}\x{5B40}\x{5B43}\x{5B45}' - . '\x{5B50}\x{5B51}\x{5B54}\x{5B55}\x{5B57}\x{5B58}\x{5B5A}\x{5B5B}\x{5B5C}' - . '\x{5B5D}\x{5B5F}\x{5B63}\x{5B64}\x{5B65}\x{5B66}\x{5B69}\x{5B6B}\x{5B70}' - . '\x{5B71}\x{5B73}\x{5B75}\x{5B78}\x{5B7A}\x{5B80}\x{5B83}\x{5B85}\x{5B87}' - . '\x{5B88}\x{5B89}\x{5B8B}\x{5B8C}\x{5B8D}\x{5B8F}\x{5B95}\x{5B97}\x{5B98}' - . '\x{5B99}\x{5B9A}\x{5B9B}\x{5B9C}\x{5B9D}\x{5B9F}\x{5BA2}\x{5BA3}\x{5BA4}' - . '\x{5BA5}\x{5BA6}\x{5BAE}\x{5BB0}\x{5BB3}\x{5BB4}\x{5BB5}\x{5BB6}\x{5BB8}' - . '\x{5BB9}\x{5BBF}\x{5BC2}\x{5BC3}\x{5BC4}\x{5BC5}\x{5BC6}\x{5BC7}\x{5BC9}' - . '\x{5BCC}\x{5BD0}\x{5BD2}\x{5BD3}\x{5BD4}\x{5BDB}\x{5BDD}\x{5BDE}\x{5BDF}' - . '\x{5BE1}\x{5BE2}\x{5BE4}\x{5BE5}\x{5BE6}\x{5BE7}\x{5BE8}\x{5BE9}\x{5BEB}' - . '\x{5BEE}\x{5BF0}\x{5BF3}\x{5BF5}\x{5BF6}\x{5BF8}\x{5BFA}\x{5BFE}\x{5BFF}' - . '\x{5C01}\x{5C02}\x{5C04}\x{5C05}\x{5C06}\x{5C07}\x{5C08}\x{5C09}\x{5C0A}' - . '\x{5C0B}\x{5C0D}\x{5C0E}\x{5C0F}\x{5C11}\x{5C13}\x{5C16}\x{5C1A}\x{5C20}' - . '\x{5C22}\x{5C24}\x{5C28}\x{5C2D}\x{5C31}\x{5C38}\x{5C39}\x{5C3A}\x{5C3B}' - . '\x{5C3C}\x{5C3D}\x{5C3E}\x{5C3F}\x{5C40}\x{5C41}\x{5C45}\x{5C46}\x{5C48}' - . '\x{5C4A}\x{5C4B}\x{5C4D}\x{5C4E}\x{5C4F}\x{5C50}\x{5C51}\x{5C53}\x{5C55}' - . '\x{5C5E}\x{5C60}\x{5C61}\x{5C64}\x{5C65}\x{5C6C}\x{5C6E}\x{5C6F}\x{5C71}' - . '\x{5C76}\x{5C79}\x{5C8C}\x{5C90}\x{5C91}\x{5C94}\x{5CA1}\x{5CA8}\x{5CA9}' - . '\x{5CAB}\x{5CAC}\x{5CB1}\x{5CB3}\x{5CB6}\x{5CB7}\x{5CB8}\x{5CBB}\x{5CBC}' - . '\x{5CBE}\x{5CC5}\x{5CC7}\x{5CD9}\x{5CE0}\x{5CE1}\x{5CE8}\x{5CE9}\x{5CEA}' - . '\x{5CED}\x{5CEF}\x{5CF0}\x{5CF6}\x{5CFA}\x{5CFB}\x{5CFD}\x{5D07}\x{5D0B}' - . '\x{5D0E}\x{5D11}\x{5D14}\x{5D15}\x{5D16}\x{5D17}\x{5D18}\x{5D19}\x{5D1A}' - . '\x{5D1B}\x{5D1F}\x{5D22}\x{5D29}\x{5D4B}\x{5D4C}\x{5D4E}\x{5D50}\x{5D52}' - . '\x{5D5C}\x{5D69}\x{5D6C}\x{5D6F}\x{5D73}\x{5D76}\x{5D82}\x{5D84}\x{5D87}' - . '\x{5D8B}\x{5D8C}\x{5D90}\x{5D9D}\x{5DA2}\x{5DAC}\x{5DAE}\x{5DB7}\x{5DBA}' - . '\x{5DBC}\x{5DBD}\x{5DC9}\x{5DCC}\x{5DCD}\x{5DD2}\x{5DD3}\x{5DD6}\x{5DDB}' - . '\x{5DDD}\x{5DDE}\x{5DE1}\x{5DE3}\x{5DE5}\x{5DE6}\x{5DE7}\x{5DE8}\x{5DEB}' - . '\x{5DEE}\x{5DF1}\x{5DF2}\x{5DF3}\x{5DF4}\x{5DF5}\x{5DF7}\x{5DFB}\x{5DFD}' - . '\x{5DFE}\x{5E02}\x{5E03}\x{5E06}\x{5E0B}\x{5E0C}\x{5E11}\x{5E16}\x{5E19}' - . '\x{5E1A}\x{5E1B}\x{5E1D}\x{5E25}\x{5E2B}\x{5E2D}\x{5E2F}\x{5E30}\x{5E33}' - . '\x{5E36}\x{5E37}\x{5E38}\x{5E3D}\x{5E40}\x{5E43}\x{5E44}\x{5E45}\x{5E47}' - . '\x{5E4C}\x{5E4E}\x{5E54}\x{5E55}\x{5E57}\x{5E5F}\x{5E61}\x{5E62}\x{5E63}' - . '\x{5E64}\x{5E72}\x{5E73}\x{5E74}\x{5E75}\x{5E76}\x{5E78}\x{5E79}\x{5E7A}' - . '\x{5E7B}\x{5E7C}\x{5E7D}\x{5E7E}\x{5E7F}\x{5E81}\x{5E83}\x{5E84}\x{5E87}' - . '\x{5E8A}\x{5E8F}\x{5E95}\x{5E96}\x{5E97}\x{5E9A}\x{5E9C}\x{5EA0}\x{5EA6}' - . '\x{5EA7}\x{5EAB}\x{5EAD}\x{5EB5}\x{5EB6}\x{5EB7}\x{5EB8}\x{5EC1}\x{5EC2}' - . '\x{5EC3}\x{5EC8}\x{5EC9}\x{5ECA}\x{5ECF}\x{5ED0}\x{5ED3}\x{5ED6}\x{5EDA}' - . '\x{5EDB}\x{5EDD}\x{5EDF}\x{5EE0}\x{5EE1}\x{5EE2}\x{5EE3}\x{5EE8}\x{5EE9}' - . '\x{5EEC}\x{5EF0}\x{5EF1}\x{5EF3}\x{5EF4}\x{5EF6}\x{5EF7}\x{5EF8}\x{5EFA}' - . '\x{5EFB}\x{5EFC}\x{5EFE}\x{5EFF}\x{5F01}\x{5F03}\x{5F04}\x{5F09}\x{5F0A}' - . '\x{5F0B}\x{5F0C}\x{5F0D}\x{5F0F}\x{5F10}\x{5F11}\x{5F13}\x{5F14}\x{5F15}' - . '\x{5F16}\x{5F17}\x{5F18}\x{5F1B}\x{5F1F}\x{5F25}\x{5F26}\x{5F27}\x{5F29}' - . '\x{5F2D}\x{5F2F}\x{5F31}\x{5F35}\x{5F37}\x{5F38}\x{5F3C}\x{5F3E}\x{5F41}' - . '\x{5F48}\x{5F4A}\x{5F4C}\x{5F4E}\x{5F51}\x{5F53}\x{5F56}\x{5F57}\x{5F59}' - . '\x{5F5C}\x{5F5D}\x{5F61}\x{5F62}\x{5F66}\x{5F69}\x{5F6A}\x{5F6B}\x{5F6C}' - . '\x{5F6D}\x{5F70}\x{5F71}\x{5F73}\x{5F77}\x{5F79}\x{5F7C}\x{5F7F}\x{5F80}' - . '\x{5F81}\x{5F82}\x{5F83}\x{5F84}\x{5F85}\x{5F87}\x{5F88}\x{5F8A}\x{5F8B}' - . '\x{5F8C}\x{5F90}\x{5F91}\x{5F92}\x{5F93}\x{5F97}\x{5F98}\x{5F99}\x{5F9E}' - . '\x{5FA0}\x{5FA1}\x{5FA8}\x{5FA9}\x{5FAA}\x{5FAD}\x{5FAE}\x{5FB3}\x{5FB4}' - . '\x{5FB9}\x{5FBC}\x{5FBD}\x{5FC3}\x{5FC5}\x{5FCC}\x{5FCD}\x{5FD6}\x{5FD7}' - . '\x{5FD8}\x{5FD9}\x{5FDC}\x{5FDD}\x{5FE0}\x{5FE4}\x{5FEB}\x{5FF0}\x{5FF1}' - . '\x{5FF5}\x{5FF8}\x{5FFB}\x{5FFD}\x{5FFF}\x{600E}\x{600F}\x{6010}\x{6012}' - . '\x{6015}\x{6016}\x{6019}\x{601B}\x{601C}\x{601D}\x{6020}\x{6021}\x{6025}' - . '\x{6026}\x{6027}\x{6028}\x{6029}\x{602A}\x{602B}\x{602F}\x{6031}\x{603A}' - . '\x{6041}\x{6042}\x{6043}\x{6046}\x{604A}\x{604B}\x{604D}\x{6050}\x{6052}' - . '\x{6055}\x{6059}\x{605A}\x{605F}\x{6060}\x{6062}\x{6063}\x{6064}\x{6065}' - . '\x{6068}\x{6069}\x{606A}\x{606B}\x{606C}\x{606D}\x{606F}\x{6070}\x{6075}' - . '\x{6077}\x{6081}\x{6083}\x{6084}\x{6089}\x{608B}\x{608C}\x{608D}\x{6092}' - . '\x{6094}\x{6096}\x{6097}\x{609A}\x{609B}\x{609F}\x{60A0}\x{60A3}\x{60A6}' - . '\x{60A7}\x{60A9}\x{60AA}\x{60B2}\x{60B3}\x{60B4}\x{60B5}\x{60B6}\x{60B8}' - . '\x{60BC}\x{60BD}\x{60C5}\x{60C6}\x{60C7}\x{60D1}\x{60D3}\x{60D8}\x{60DA}' - . '\x{60DC}\x{60DF}\x{60E0}\x{60E1}\x{60E3}\x{60E7}\x{60E8}\x{60F0}\x{60F1}' - . '\x{60F3}\x{60F4}\x{60F6}\x{60F7}\x{60F9}\x{60FA}\x{60FB}\x{6100}\x{6101}' - . '\x{6103}\x{6106}\x{6108}\x{6109}\x{610D}\x{610E}\x{610F}\x{6115}\x{611A}' - . '\x{611B}\x{611F}\x{6121}\x{6127}\x{6128}\x{612C}\x{6134}\x{613C}\x{613D}' - . '\x{613E}\x{613F}\x{6142}\x{6144}\x{6147}\x{6148}\x{614A}\x{614B}\x{614C}' - . '\x{614D}\x{614E}\x{6153}\x{6155}\x{6158}\x{6159}\x{615A}\x{615D}\x{615F}' - . '\x{6162}\x{6163}\x{6165}\x{6167}\x{6168}\x{616B}\x{616E}\x{616F}\x{6170}' - . '\x{6171}\x{6173}\x{6174}\x{6175}\x{6176}\x{6177}\x{617E}\x{6182}\x{6187}' - . '\x{618A}\x{618E}\x{6190}\x{6191}\x{6194}\x{6196}\x{6199}\x{619A}\x{61A4}' - . '\x{61A7}\x{61A9}\x{61AB}\x{61AC}\x{61AE}\x{61B2}\x{61B6}\x{61BA}\x{61BE}' - . '\x{61C3}\x{61C6}\x{61C7}\x{61C8}\x{61C9}\x{61CA}\x{61CB}\x{61CC}\x{61CD}' - . '\x{61D0}\x{61E3}\x{61E6}\x{61F2}\x{61F4}\x{61F6}\x{61F7}\x{61F8}\x{61FA}' - . '\x{61FC}\x{61FD}\x{61FE}\x{61FF}\x{6200}\x{6208}\x{6209}\x{620A}\x{620C}' - . '\x{620D}\x{620E}\x{6210}\x{6211}\x{6212}\x{6214}\x{6216}\x{621A}\x{621B}' - . '\x{621D}\x{621E}\x{621F}\x{6221}\x{6226}\x{622A}\x{622E}\x{622F}\x{6230}' - . '\x{6232}\x{6233}\x{6234}\x{6238}\x{623B}\x{623F}\x{6240}\x{6241}\x{6247}' - . '\x{6248}\x{6249}\x{624B}\x{624D}\x{624E}\x{6253}\x{6255}\x{6258}\x{625B}' - . '\x{625E}\x{6260}\x{6263}\x{6268}\x{626E}\x{6271}\x{6276}\x{6279}\x{627C}' - . '\x{627E}\x{627F}\x{6280}\x{6282}\x{6283}\x{6284}\x{6289}\x{628A}\x{6291}' - . '\x{6292}\x{6293}\x{6294}\x{6295}\x{6296}\x{6297}\x{6298}\x{629B}\x{629C}' - . '\x{629E}\x{62AB}\x{62AC}\x{62B1}\x{62B5}\x{62B9}\x{62BB}\x{62BC}\x{62BD}' - . '\x{62C2}\x{62C5}\x{62C6}\x{62C7}\x{62C8}\x{62C9}\x{62CA}\x{62CC}\x{62CD}' - . '\x{62CF}\x{62D0}\x{62D1}\x{62D2}\x{62D3}\x{62D4}\x{62D7}\x{62D8}\x{62D9}' - . '\x{62DB}\x{62DC}\x{62DD}\x{62E0}\x{62E1}\x{62EC}\x{62ED}\x{62EE}\x{62EF}' - . '\x{62F1}\x{62F3}\x{62F5}\x{62F6}\x{62F7}\x{62FE}\x{62FF}\x{6301}\x{6302}' - . '\x{6307}\x{6308}\x{6309}\x{630C}\x{6311}\x{6319}\x{631F}\x{6327}\x{6328}' - . '\x{632B}\x{632F}\x{633A}\x{633D}\x{633E}\x{633F}\x{6349}\x{634C}\x{634D}' - . '\x{634F}\x{6350}\x{6355}\x{6357}\x{635C}\x{6367}\x{6368}\x{6369}\x{636B}' - . '\x{636E}\x{6372}\x{6376}\x{6377}\x{637A}\x{637B}\x{6380}\x{6383}\x{6388}' - . '\x{6389}\x{638C}\x{638E}\x{638F}\x{6392}\x{6396}\x{6398}\x{639B}\x{639F}' - . '\x{63A0}\x{63A1}\x{63A2}\x{63A3}\x{63A5}\x{63A7}\x{63A8}\x{63A9}\x{63AA}' - . '\x{63AB}\x{63AC}\x{63B2}\x{63B4}\x{63B5}\x{63BB}\x{63BE}\x{63C0}\x{63C3}' - . '\x{63C4}\x{63C6}\x{63C9}\x{63CF}\x{63D0}\x{63D2}\x{63D6}\x{63DA}\x{63DB}' - . '\x{63E1}\x{63E3}\x{63E9}\x{63EE}\x{63F4}\x{63F6}\x{63FA}\x{6406}\x{640D}' - . '\x{640F}\x{6413}\x{6416}\x{6417}\x{641C}\x{6426}\x{6428}\x{642C}\x{642D}' - . '\x{6434}\x{6436}\x{643A}\x{643E}\x{6442}\x{644E}\x{6458}\x{6467}\x{6469}' - . '\x{646F}\x{6476}\x{6478}\x{647A}\x{6483}\x{6488}\x{6492}\x{6493}\x{6495}' - . '\x{649A}\x{649E}\x{64A4}\x{64A5}\x{64A9}\x{64AB}\x{64AD}\x{64AE}\x{64B0}' - . '\x{64B2}\x{64B9}\x{64BB}\x{64BC}\x{64C1}\x{64C2}\x{64C5}\x{64C7}\x{64CD}' - . '\x{64D2}\x{64D4}\x{64D8}\x{64DA}\x{64E0}\x{64E1}\x{64E2}\x{64E3}\x{64E6}' - . '\x{64E7}\x{64EC}\x{64EF}\x{64F1}\x{64F2}\x{64F4}\x{64F6}\x{64FA}\x{64FD}' - . '\x{64FE}\x{6500}\x{6505}\x{6518}\x{651C}\x{651D}\x{6523}\x{6524}\x{652A}' - . '\x{652B}\x{652C}\x{652F}\x{6534}\x{6535}\x{6536}\x{6537}\x{6538}\x{6539}' - . '\x{653B}\x{653E}\x{653F}\x{6545}\x{6548}\x{654D}\x{654F}\x{6551}\x{6555}' - . '\x{6556}\x{6557}\x{6558}\x{6559}\x{655D}\x{655E}\x{6562}\x{6563}\x{6566}' - . '\x{656C}\x{6570}\x{6572}\x{6574}\x{6575}\x{6577}\x{6578}\x{6582}\x{6583}' - . '\x{6587}\x{6588}\x{6589}\x{658C}\x{658E}\x{6590}\x{6591}\x{6597}\x{6599}' - . '\x{659B}\x{659C}\x{659F}\x{65A1}\x{65A4}\x{65A5}\x{65A7}\x{65AB}\x{65AC}' - . '\x{65AD}\x{65AF}\x{65B0}\x{65B7}\x{65B9}\x{65BC}\x{65BD}\x{65C1}\x{65C3}' - . '\x{65C4}\x{65C5}\x{65C6}\x{65CB}\x{65CC}\x{65CF}\x{65D2}\x{65D7}\x{65D9}' - . '\x{65DB}\x{65E0}\x{65E1}\x{65E2}\x{65E5}\x{65E6}\x{65E7}\x{65E8}\x{65E9}' - . '\x{65EC}\x{65ED}\x{65F1}\x{65FA}\x{65FB}\x{6602}\x{6603}\x{6606}\x{6607}' - . '\x{660A}\x{660C}\x{660E}\x{660F}\x{6613}\x{6614}\x{661C}\x{661F}\x{6620}' - . '\x{6625}\x{6627}\x{6628}\x{662D}\x{662F}\x{6634}\x{6635}\x{6636}\x{663C}' - . '\x{663F}\x{6641}\x{6642}\x{6643}\x{6644}\x{6649}\x{664B}\x{664F}\x{6652}' - . '\x{665D}\x{665E}\x{665F}\x{6662}\x{6664}\x{6666}\x{6667}\x{6668}\x{6669}' - . '\x{666E}\x{666F}\x{6670}\x{6674}\x{6676}\x{667A}\x{6681}\x{6683}\x{6684}' - . '\x{6687}\x{6688}\x{6689}\x{668E}\x{6691}\x{6696}\x{6697}\x{6698}\x{669D}' - . '\x{66A2}\x{66A6}\x{66AB}\x{66AE}\x{66B4}\x{66B8}\x{66B9}\x{66BC}\x{66BE}' - . '\x{66C1}\x{66C4}\x{66C7}\x{66C9}\x{66D6}\x{66D9}\x{66DA}\x{66DC}\x{66DD}' - . '\x{66E0}\x{66E6}\x{66E9}\x{66F0}\x{66F2}\x{66F3}\x{66F4}\x{66F5}\x{66F7}' - . '\x{66F8}\x{66F9}\x{66FC}\x{66FD}\x{66FE}\x{66FF}\x{6700}\x{6703}\x{6708}' - . '\x{6709}\x{670B}\x{670D}\x{670F}\x{6714}\x{6715}\x{6716}\x{6717}\x{671B}' - . '\x{671D}\x{671E}\x{671F}\x{6726}\x{6727}\x{6728}\x{672A}\x{672B}\x{672C}' - . '\x{672D}\x{672E}\x{6731}\x{6734}\x{6736}\x{6737}\x{6738}\x{673A}\x{673D}' - . '\x{673F}\x{6741}\x{6746}\x{6749}\x{674E}\x{674F}\x{6750}\x{6751}\x{6753}' - . '\x{6756}\x{6759}\x{675C}\x{675E}\x{675F}\x{6760}\x{6761}\x{6762}\x{6763}' - . '\x{6764}\x{6765}\x{676A}\x{676D}\x{676F}\x{6770}\x{6771}\x{6772}\x{6773}' - . '\x{6775}\x{6777}\x{677C}\x{677E}\x{677F}\x{6785}\x{6787}\x{6789}\x{678B}' - . '\x{678C}\x{6790}\x{6795}\x{6797}\x{679A}\x{679C}\x{679D}\x{67A0}\x{67A1}' - . '\x{67A2}\x{67A6}\x{67A9}\x{67AF}\x{67B3}\x{67B4}\x{67B6}\x{67B7}\x{67B8}' - . '\x{67B9}\x{67C1}\x{67C4}\x{67C6}\x{67CA}\x{67CE}\x{67CF}\x{67D0}\x{67D1}' - . '\x{67D3}\x{67D4}\x{67D8}\x{67DA}\x{67DD}\x{67DE}\x{67E2}\x{67E4}\x{67E7}' - . '\x{67E9}\x{67EC}\x{67EE}\x{67EF}\x{67F1}\x{67F3}\x{67F4}\x{67F5}\x{67FB}' - . '\x{67FE}\x{67FF}\x{6802}\x{6803}\x{6804}\x{6813}\x{6816}\x{6817}\x{681E}' - . '\x{6821}\x{6822}\x{6829}\x{682A}\x{682B}\x{6832}\x{6834}\x{6838}\x{6839}' - . '\x{683C}\x{683D}\x{6840}\x{6841}\x{6842}\x{6843}\x{6846}\x{6848}\x{684D}' - . '\x{684E}\x{6850}\x{6851}\x{6853}\x{6854}\x{6859}\x{685C}\x{685D}\x{685F}' - . '\x{6863}\x{6867}\x{6874}\x{6876}\x{6877}\x{687E}\x{687F}\x{6881}\x{6883}' - . '\x{6885}\x{688D}\x{688F}\x{6893}\x{6894}\x{6897}\x{689B}\x{689D}\x{689F}' - . '\x{68A0}\x{68A2}\x{68A6}\x{68A7}\x{68A8}\x{68AD}\x{68AF}\x{68B0}\x{68B1}' - . '\x{68B3}\x{68B5}\x{68B6}\x{68B9}\x{68BA}\x{68BC}\x{68C4}\x{68C6}\x{68C9}' - . '\x{68CA}\x{68CB}\x{68CD}\x{68D2}\x{68D4}\x{68D5}\x{68D7}\x{68D8}\x{68DA}' - . '\x{68DF}\x{68E0}\x{68E1}\x{68E3}\x{68E7}\x{68EE}\x{68EF}\x{68F2}\x{68F9}' - . '\x{68FA}\x{6900}\x{6901}\x{6904}\x{6905}\x{6908}\x{690B}\x{690C}\x{690D}' - . '\x{690E}\x{690F}\x{6912}\x{6919}\x{691A}\x{691B}\x{691C}\x{6921}\x{6922}' - . '\x{6923}\x{6925}\x{6926}\x{6928}\x{692A}\x{6930}\x{6934}\x{6936}\x{6939}' - . '\x{693D}\x{693F}\x{694A}\x{6953}\x{6954}\x{6955}\x{6959}\x{695A}\x{695C}' - . '\x{695D}\x{695E}\x{6960}\x{6961}\x{6962}\x{696A}\x{696B}\x{696D}\x{696E}' - . '\x{696F}\x{6973}\x{6974}\x{6975}\x{6977}\x{6978}\x{6979}\x{697C}\x{697D}' - . '\x{697E}\x{6981}\x{6982}\x{698A}\x{698E}\x{6991}\x{6994}\x{6995}\x{699B}' - . '\x{699C}\x{69A0}\x{69A7}\x{69AE}\x{69B1}\x{69B2}\x{69B4}\x{69BB}\x{69BE}' - . '\x{69BF}\x{69C1}\x{69C3}\x{69C7}\x{69CA}\x{69CB}\x{69CC}\x{69CD}\x{69CE}' - . '\x{69D0}\x{69D3}\x{69D8}\x{69D9}\x{69DD}\x{69DE}\x{69E7}\x{69E8}\x{69EB}' - . '\x{69ED}\x{69F2}\x{69F9}\x{69FB}\x{69FD}\x{69FF}\x{6A02}\x{6A05}\x{6A0A}' - . '\x{6A0B}\x{6A0C}\x{6A12}\x{6A13}\x{6A14}\x{6A17}\x{6A19}\x{6A1B}\x{6A1E}' - . '\x{6A1F}\x{6A21}\x{6A22}\x{6A23}\x{6A29}\x{6A2A}\x{6A2B}\x{6A2E}\x{6A35}' - . '\x{6A36}\x{6A38}\x{6A39}\x{6A3A}\x{6A3D}\x{6A44}\x{6A47}\x{6A48}\x{6A4B}' - . '\x{6A58}\x{6A59}\x{6A5F}\x{6A61}\x{6A62}\x{6A66}\x{6A72}\x{6A78}\x{6A7F}' - . '\x{6A80}\x{6A84}\x{6A8D}\x{6A8E}\x{6A90}\x{6A97}\x{6A9C}\x{6AA0}\x{6AA2}' - . '\x{6AA3}\x{6AAA}\x{6AAC}\x{6AAE}\x{6AB3}\x{6AB8}\x{6ABB}\x{6AC1}\x{6AC2}' - . '\x{6AC3}\x{6AD1}\x{6AD3}\x{6ADA}\x{6ADB}\x{6ADE}\x{6ADF}\x{6AE8}\x{6AEA}' - . '\x{6AFA}\x{6AFB}\x{6B04}\x{6B05}\x{6B0A}\x{6B12}\x{6B16}\x{6B1D}\x{6B1F}' - . '\x{6B20}\x{6B21}\x{6B23}\x{6B27}\x{6B32}\x{6B37}\x{6B38}\x{6B39}\x{6B3A}' - . '\x{6B3D}\x{6B3E}\x{6B43}\x{6B47}\x{6B49}\x{6B4C}\x{6B4E}\x{6B50}\x{6B53}' - . '\x{6B54}\x{6B59}\x{6B5B}\x{6B5F}\x{6B61}\x{6B62}\x{6B63}\x{6B64}\x{6B66}' - . '\x{6B69}\x{6B6A}\x{6B6F}\x{6B73}\x{6B74}\x{6B78}\x{6B79}\x{6B7B}\x{6B7F}' - . '\x{6B80}\x{6B83}\x{6B84}\x{6B86}\x{6B89}\x{6B8A}\x{6B8B}\x{6B8D}\x{6B95}' - . '\x{6B96}\x{6B98}\x{6B9E}\x{6BA4}\x{6BAA}\x{6BAB}\x{6BAF}\x{6BB1}\x{6BB2}' - . '\x{6BB3}\x{6BB4}\x{6BB5}\x{6BB7}\x{6BBA}\x{6BBB}\x{6BBC}\x{6BBF}\x{6BC0}' - . '\x{6BC5}\x{6BC6}\x{6BCB}\x{6BCD}\x{6BCE}\x{6BD2}\x{6BD3}\x{6BD4}\x{6BD8}' - . '\x{6BDB}\x{6BDF}\x{6BEB}\x{6BEC}\x{6BEF}\x{6BF3}\x{6C08}\x{6C0F}\x{6C11}' - . '\x{6C13}\x{6C14}\x{6C17}\x{6C1B}\x{6C23}\x{6C24}\x{6C34}\x{6C37}\x{6C38}' - . '\x{6C3E}\x{6C40}\x{6C41}\x{6C42}\x{6C4E}\x{6C50}\x{6C55}\x{6C57}\x{6C5A}' - . '\x{6C5D}\x{6C5E}\x{6C5F}\x{6C60}\x{6C62}\x{6C68}\x{6C6A}\x{6C70}\x{6C72}' - . '\x{6C73}\x{6C7A}\x{6C7D}\x{6C7E}\x{6C81}\x{6C82}\x{6C83}\x{6C88}\x{6C8C}' - . '\x{6C8D}\x{6C90}\x{6C92}\x{6C93}\x{6C96}\x{6C99}\x{6C9A}\x{6C9B}\x{6CA1}' - . '\x{6CA2}\x{6CAB}\x{6CAE}\x{6CB1}\x{6CB3}\x{6CB8}\x{6CB9}\x{6CBA}\x{6CBB}' - . '\x{6CBC}\x{6CBD}\x{6CBE}\x{6CBF}\x{6CC1}\x{6CC4}\x{6CC5}\x{6CC9}\x{6CCA}' - . '\x{6CCC}\x{6CD3}\x{6CD5}\x{6CD7}\x{6CD9}\x{6CDB}\x{6CDD}\x{6CE1}\x{6CE2}' - . '\x{6CE3}\x{6CE5}\x{6CE8}\x{6CEA}\x{6CEF}\x{6CF0}\x{6CF1}\x{6CF3}\x{6D0B}' - . '\x{6D0C}\x{6D12}\x{6D17}\x{6D19}\x{6D1B}\x{6D1E}\x{6D1F}\x{6D25}\x{6D29}' - . '\x{6D2A}\x{6D2B}\x{6D32}\x{6D33}\x{6D35}\x{6D36}\x{6D38}\x{6D3B}\x{6D3D}' - . '\x{6D3E}\x{6D41}\x{6D44}\x{6D45}\x{6D59}\x{6D5A}\x{6D5C}\x{6D63}\x{6D64}' - . '\x{6D66}\x{6D69}\x{6D6A}\x{6D6C}\x{6D6E}\x{6D74}\x{6D77}\x{6D78}\x{6D79}' - . '\x{6D85}\x{6D88}\x{6D8C}\x{6D8E}\x{6D93}\x{6D95}\x{6D99}\x{6D9B}\x{6D9C}' - . '\x{6DAF}\x{6DB2}\x{6DB5}\x{6DB8}\x{6DBC}\x{6DC0}\x{6DC5}\x{6DC6}\x{6DC7}' - . '\x{6DCB}\x{6DCC}\x{6DD1}\x{6DD2}\x{6DD5}\x{6DD8}\x{6DD9}\x{6DDE}\x{6DE1}' - . '\x{6DE4}\x{6DE6}\x{6DE8}\x{6DEA}\x{6DEB}\x{6DEC}\x{6DEE}\x{6DF1}\x{6DF3}' - . '\x{6DF5}\x{6DF7}\x{6DF9}\x{6DFA}\x{6DFB}\x{6E05}\x{6E07}\x{6E08}\x{6E09}' - . '\x{6E0A}\x{6E0B}\x{6E13}\x{6E15}\x{6E19}\x{6E1A}\x{6E1B}\x{6E1D}\x{6E1F}' - . '\x{6E20}\x{6E21}\x{6E23}\x{6E24}\x{6E25}\x{6E26}\x{6E29}\x{6E2B}\x{6E2C}' - . '\x{6E2D}\x{6E2E}\x{6E2F}\x{6E38}\x{6E3A}\x{6E3E}\x{6E43}\x{6E4A}\x{6E4D}' - . '\x{6E4E}\x{6E56}\x{6E58}\x{6E5B}\x{6E5F}\x{6E67}\x{6E6B}\x{6E6E}\x{6E6F}' - . '\x{6E72}\x{6E76}\x{6E7E}\x{6E7F}\x{6E80}\x{6E82}\x{6E8C}\x{6E8F}\x{6E90}' - . '\x{6E96}\x{6E98}\x{6E9C}\x{6E9D}\x{6E9F}\x{6EA2}\x{6EA5}\x{6EAA}\x{6EAF}' - . '\x{6EB2}\x{6EB6}\x{6EB7}\x{6EBA}\x{6EBD}\x{6EC2}\x{6EC4}\x{6EC5}\x{6EC9}' - . '\x{6ECB}\x{6ECC}\x{6ED1}\x{6ED3}\x{6ED4}\x{6ED5}\x{6EDD}\x{6EDE}\x{6EEC}' - . '\x{6EEF}\x{6EF2}\x{6EF4}\x{6EF7}\x{6EF8}\x{6EFE}\x{6EFF}\x{6F01}\x{6F02}' - . '\x{6F06}\x{6F09}\x{6F0F}\x{6F11}\x{6F13}\x{6F14}\x{6F15}\x{6F20}\x{6F22}' - . '\x{6F23}\x{6F2B}\x{6F2C}\x{6F31}\x{6F32}\x{6F38}\x{6F3E}\x{6F3F}\x{6F41}' - . '\x{6F45}\x{6F54}\x{6F58}\x{6F5B}\x{6F5C}\x{6F5F}\x{6F64}\x{6F66}\x{6F6D}' - . '\x{6F6E}\x{6F6F}\x{6F70}\x{6F74}\x{6F78}\x{6F7A}\x{6F7C}\x{6F80}\x{6F81}' - . '\x{6F82}\x{6F84}\x{6F86}\x{6F8E}\x{6F91}\x{6F97}\x{6FA1}\x{6FA3}\x{6FA4}' - . '\x{6FAA}\x{6FB1}\x{6FB3}\x{6FB9}\x{6FC0}\x{6FC1}\x{6FC2}\x{6FC3}\x{6FC6}' - . '\x{6FD4}\x{6FD5}\x{6FD8}\x{6FDB}\x{6FDF}\x{6FE0}\x{6FE1}\x{6FE4}\x{6FEB}' - . '\x{6FEC}\x{6FEE}\x{6FEF}\x{6FF1}\x{6FF3}\x{6FF6}\x{6FFA}\x{6FFE}\x{7001}' - . '\x{7009}\x{700B}\x{700F}\x{7011}\x{7015}\x{7018}\x{701A}\x{701B}\x{701D}' - . '\x{701E}\x{701F}\x{7026}\x{7027}\x{702C}\x{7030}\x{7032}\x{703E}\x{704C}' - . '\x{7051}\x{7058}\x{7063}\x{706B}\x{706F}\x{7070}\x{7078}\x{707C}\x{707D}' - . '\x{7089}\x{708A}\x{708E}\x{7092}\x{7099}\x{70AC}\x{70AD}\x{70AE}\x{70AF}' - . '\x{70B3}\x{70B8}\x{70B9}\x{70BA}\x{70C8}\x{70CB}\x{70CF}\x{70D9}\x{70DD}' - . '\x{70DF}\x{70F1}\x{70F9}\x{70FD}\x{7109}\x{7114}\x{7119}\x{711A}\x{711C}' - . '\x{7121}\x{7126}\x{7136}\x{713C}\x{7149}\x{714C}\x{714E}\x{7155}\x{7156}' - . '\x{7159}\x{7162}\x{7164}\x{7165}\x{7166}\x{7167}\x{7169}\x{716C}\x{716E}' - . '\x{717D}\x{7184}\x{7188}\x{718A}\x{718F}\x{7194}\x{7195}\x{7199}\x{719F}' - . '\x{71A8}\x{71AC}\x{71B1}\x{71B9}\x{71BE}\x{71C3}\x{71C8}\x{71C9}\x{71CE}' - . '\x{71D0}\x{71D2}\x{71D4}\x{71D5}\x{71D7}\x{71DF}\x{71E0}\x{71E5}\x{71E6}' - . '\x{71E7}\x{71EC}\x{71ED}\x{71EE}\x{71F5}\x{71F9}\x{71FB}\x{71FC}\x{71FF}' - . '\x{7206}\x{720D}\x{7210}\x{721B}\x{7228}\x{722A}\x{722C}\x{722D}\x{7230}' - . '\x{7232}\x{7235}\x{7236}\x{723A}\x{723B}\x{723C}\x{723D}\x{723E}\x{723F}' - . '\x{7240}\x{7246}\x{7247}\x{7248}\x{724B}\x{724C}\x{7252}\x{7258}\x{7259}' - . '\x{725B}\x{725D}\x{725F}\x{7261}\x{7262}\x{7267}\x{7269}\x{7272}\x{7274}' - . '\x{7279}\x{727D}\x{727E}\x{7280}\x{7281}\x{7282}\x{7287}\x{7292}\x{7296}' - . '\x{72A0}\x{72A2}\x{72A7}\x{72AC}\x{72AF}\x{72B2}\x{72B6}\x{72B9}\x{72C2}' - . '\x{72C3}\x{72C4}\x{72C6}\x{72CE}\x{72D0}\x{72D2}\x{72D7}\x{72D9}\x{72DB}' - . '\x{72E0}\x{72E1}\x{72E2}\x{72E9}\x{72EC}\x{72ED}\x{72F7}\x{72F8}\x{72F9}' - . '\x{72FC}\x{72FD}\x{730A}\x{7316}\x{7317}\x{731B}\x{731C}\x{731D}\x{731F}' - . '\x{7325}\x{7329}\x{732A}\x{732B}\x{732E}\x{732F}\x{7334}\x{7336}\x{7337}' - . '\x{733E}\x{733F}\x{7344}\x{7345}\x{734E}\x{734F}\x{7357}\x{7363}\x{7368}' - . '\x{736A}\x{7370}\x{7372}\x{7375}\x{7378}\x{737A}\x{737B}\x{7384}\x{7387}' - . '\x{7389}\x{738B}\x{7396}\x{73A9}\x{73B2}\x{73B3}\x{73BB}\x{73C0}\x{73C2}' - . '\x{73C8}\x{73CA}\x{73CD}\x{73CE}\x{73DE}\x{73E0}\x{73E5}\x{73EA}\x{73ED}' - . '\x{73EE}\x{73F1}\x{73F8}\x{73FE}\x{7403}\x{7405}\x{7406}\x{7409}\x{7422}' - . '\x{7425}\x{7432}\x{7433}\x{7434}\x{7435}\x{7436}\x{743A}\x{743F}\x{7441}' - . '\x{7455}\x{7459}\x{745A}\x{745B}\x{745C}\x{745E}\x{745F}\x{7460}\x{7463}' - . '\x{7464}\x{7469}\x{746A}\x{746F}\x{7470}\x{7473}\x{7476}\x{747E}\x{7483}' - . '\x{748B}\x{749E}\x{74A2}\x{74A7}\x{74B0}\x{74BD}\x{74CA}\x{74CF}\x{74D4}' - . '\x{74DC}\x{74E0}\x{74E2}\x{74E3}\x{74E6}\x{74E7}\x{74E9}\x{74EE}\x{74F0}' - . '\x{74F1}\x{74F2}\x{74F6}\x{74F7}\x{74F8}\x{7503}\x{7504}\x{7505}\x{750C}' - . '\x{750D}\x{750E}\x{7511}\x{7513}\x{7515}\x{7518}\x{751A}\x{751C}\x{751E}' - . '\x{751F}\x{7523}\x{7525}\x{7526}\x{7528}\x{752B}\x{752C}\x{7530}\x{7531}' - . '\x{7532}\x{7533}\x{7537}\x{7538}\x{753A}\x{753B}\x{753C}\x{7544}\x{7546}' - . '\x{7549}\x{754A}\x{754B}\x{754C}\x{754D}\x{754F}\x{7551}\x{7554}\x{7559}' - . '\x{755A}\x{755B}\x{755C}\x{755D}\x{7560}\x{7562}\x{7564}\x{7565}\x{7566}' - . '\x{7567}\x{7569}\x{756A}\x{756B}\x{756D}\x{7570}\x{7573}\x{7574}\x{7576}' - . '\x{7577}\x{7578}\x{757F}\x{7582}\x{7586}\x{7587}\x{7589}\x{758A}\x{758B}' - . '\x{758E}\x{758F}\x{7591}\x{7594}\x{759A}\x{759D}\x{75A3}\x{75A5}\x{75AB}' - . '\x{75B1}\x{75B2}\x{75B3}\x{75B5}\x{75B8}\x{75B9}\x{75BC}\x{75BD}\x{75BE}' - . '\x{75C2}\x{75C3}\x{75C5}\x{75C7}\x{75CA}\x{75CD}\x{75D2}\x{75D4}\x{75D5}' - . '\x{75D8}\x{75D9}\x{75DB}\x{75DE}\x{75E2}\x{75E3}\x{75E9}\x{75F0}\x{75F2}' - . '\x{75F3}\x{75F4}\x{75FA}\x{75FC}\x{75FE}\x{75FF}\x{7601}\x{7609}\x{760B}' - . '\x{760D}\x{761F}\x{7620}\x{7621}\x{7622}\x{7624}\x{7627}\x{7630}\x{7634}' - . '\x{763B}\x{7642}\x{7646}\x{7647}\x{7648}\x{764C}\x{7652}\x{7656}\x{7658}' - . '\x{765C}\x{7661}\x{7662}\x{7667}\x{7668}\x{7669}\x{766A}\x{766C}\x{7670}' - . '\x{7672}\x{7676}\x{7678}\x{767A}\x{767B}\x{767C}\x{767D}\x{767E}\x{7680}' - . '\x{7683}\x{7684}\x{7686}\x{7687}\x{7688}\x{768B}\x{768E}\x{7690}\x{7693}' - . '\x{7696}\x{7699}\x{769A}\x{76AE}\x{76B0}\x{76B4}\x{76B7}\x{76B8}\x{76B9}' - . '\x{76BA}\x{76BF}\x{76C2}\x{76C3}\x{76C6}\x{76C8}\x{76CA}\x{76CD}\x{76D2}' - . '\x{76D6}\x{76D7}\x{76DB}\x{76DC}\x{76DE}\x{76DF}\x{76E1}\x{76E3}\x{76E4}' - . '\x{76E5}\x{76E7}\x{76EA}\x{76EE}\x{76F2}\x{76F4}\x{76F8}\x{76FB}\x{76FE}' - . '\x{7701}\x{7704}\x{7707}\x{7708}\x{7709}\x{770B}\x{770C}\x{771B}\x{771E}' - . '\x{771F}\x{7720}\x{7724}\x{7725}\x{7726}\x{7729}\x{7737}\x{7738}\x{773A}' - . '\x{773C}\x{7740}\x{7747}\x{775A}\x{775B}\x{7761}\x{7763}\x{7765}\x{7766}' - . '\x{7768}\x{776B}\x{7779}\x{777E}\x{777F}\x{778B}\x{778E}\x{7791}\x{779E}' - . '\x{77A0}\x{77A5}\x{77AC}\x{77AD}\x{77B0}\x{77B3}\x{77B6}\x{77B9}\x{77BB}' - . '\x{77BC}\x{77BD}\x{77BF}\x{77C7}\x{77CD}\x{77D7}\x{77DA}\x{77DB}\x{77DC}' - . '\x{77E2}\x{77E3}\x{77E5}\x{77E7}\x{77E9}\x{77ED}\x{77EE}\x{77EF}\x{77F3}' - . '\x{77FC}\x{7802}\x{780C}\x{7812}\x{7814}\x{7815}\x{7820}\x{7825}\x{7826}' - . '\x{7827}\x{7832}\x{7834}\x{783A}\x{783F}\x{7845}\x{785D}\x{786B}\x{786C}' - . '\x{786F}\x{7872}\x{7874}\x{787C}\x{7881}\x{7886}\x{7887}\x{788C}\x{788D}' - . '\x{788E}\x{7891}\x{7893}\x{7895}\x{7897}\x{789A}\x{78A3}\x{78A7}\x{78A9}' - . '\x{78AA}\x{78AF}\x{78B5}\x{78BA}\x{78BC}\x{78BE}\x{78C1}\x{78C5}\x{78C6}' - . '\x{78CA}\x{78CB}\x{78D0}\x{78D1}\x{78D4}\x{78DA}\x{78E7}\x{78E8}\x{78EC}' - . '\x{78EF}\x{78F4}\x{78FD}\x{7901}\x{7907}\x{790E}\x{7911}\x{7912}\x{7919}' - . '\x{7926}\x{792A}\x{792B}\x{792C}\x{793A}\x{793C}\x{793E}\x{7940}\x{7941}' - . '\x{7947}\x{7948}\x{7949}\x{7950}\x{7953}\x{7955}\x{7956}\x{7957}\x{795A}' - . '\x{795D}\x{795E}\x{795F}\x{7960}\x{7962}\x{7965}\x{7968}\x{796D}\x{7977}' - . '\x{797A}\x{797F}\x{7980}\x{7981}\x{7984}\x{7985}\x{798A}\x{798D}\x{798E}' - . '\x{798F}\x{799D}\x{79A6}\x{79A7}\x{79AA}\x{79AE}\x{79B0}\x{79B3}\x{79B9}' - . '\x{79BA}\x{79BD}\x{79BE}\x{79BF}\x{79C0}\x{79C1}\x{79C9}\x{79CB}\x{79D1}' - . '\x{79D2}\x{79D5}\x{79D8}\x{79DF}\x{79E1}\x{79E3}\x{79E4}\x{79E6}\x{79E7}' - . '\x{79E9}\x{79EC}\x{79F0}\x{79FB}\x{7A00}\x{7A08}\x{7A0B}\x{7A0D}\x{7A0E}' - . '\x{7A14}\x{7A17}\x{7A18}\x{7A19}\x{7A1A}\x{7A1C}\x{7A1F}\x{7A20}\x{7A2E}' - . '\x{7A31}\x{7A32}\x{7A37}\x{7A3B}\x{7A3C}\x{7A3D}\x{7A3E}\x{7A3F}\x{7A40}' - . '\x{7A42}\x{7A43}\x{7A46}\x{7A49}\x{7A4D}\x{7A4E}\x{7A4F}\x{7A50}\x{7A57}' - . '\x{7A61}\x{7A62}\x{7A63}\x{7A69}\x{7A6B}\x{7A70}\x{7A74}\x{7A76}\x{7A79}' - . '\x{7A7A}\x{7A7D}\x{7A7F}\x{7A81}\x{7A83}\x{7A84}\x{7A88}\x{7A92}\x{7A93}' - . '\x{7A95}\x{7A96}\x{7A97}\x{7A98}\x{7A9F}\x{7AA9}\x{7AAA}\x{7AAE}\x{7AAF}' - . '\x{7AB0}\x{7AB6}\x{7ABA}\x{7ABF}\x{7AC3}\x{7AC4}\x{7AC5}\x{7AC7}\x{7AC8}' - . '\x{7ACA}\x{7ACB}\x{7ACD}\x{7ACF}\x{7AD2}\x{7AD3}\x{7AD5}\x{7AD9}\x{7ADA}' - . '\x{7ADC}\x{7ADD}\x{7ADF}\x{7AE0}\x{7AE1}\x{7AE2}\x{7AE3}\x{7AE5}\x{7AE6}' - . '\x{7AEA}\x{7AED}\x{7AEF}\x{7AF0}\x{7AF6}\x{7AF8}\x{7AF9}\x{7AFA}\x{7AFF}' - . '\x{7B02}\x{7B04}\x{7B06}\x{7B08}\x{7B0A}\x{7B0B}\x{7B0F}\x{7B11}\x{7B18}' - . '\x{7B19}\x{7B1B}\x{7B1E}\x{7B20}\x{7B25}\x{7B26}\x{7B28}\x{7B2C}\x{7B33}' - . '\x{7B35}\x{7B36}\x{7B39}\x{7B45}\x{7B46}\x{7B48}\x{7B49}\x{7B4B}\x{7B4C}' - . '\x{7B4D}\x{7B4F}\x{7B50}\x{7B51}\x{7B52}\x{7B54}\x{7B56}\x{7B5D}\x{7B65}' - . '\x{7B67}\x{7B6C}\x{7B6E}\x{7B70}\x{7B71}\x{7B74}\x{7B75}\x{7B7A}\x{7B86}' - . '\x{7B87}\x{7B8B}\x{7B8D}\x{7B8F}\x{7B92}\x{7B94}\x{7B95}\x{7B97}\x{7B98}' - . '\x{7B99}\x{7B9A}\x{7B9C}\x{7B9D}\x{7B9F}\x{7BA1}\x{7BAA}\x{7BAD}\x{7BB1}' - . '\x{7BB4}\x{7BB8}\x{7BC0}\x{7BC1}\x{7BC4}\x{7BC6}\x{7BC7}\x{7BC9}\x{7BCB}' - . '\x{7BCC}\x{7BCF}\x{7BDD}\x{7BE0}\x{7BE4}\x{7BE5}\x{7BE6}\x{7BE9}\x{7BED}' - . '\x{7BF3}\x{7BF6}\x{7BF7}\x{7C00}\x{7C07}\x{7C0D}\x{7C11}\x{7C12}\x{7C13}' - . '\x{7C14}\x{7C17}\x{7C1F}\x{7C21}\x{7C23}\x{7C27}\x{7C2A}\x{7C2B}\x{7C37}' - . '\x{7C38}\x{7C3D}\x{7C3E}\x{7C3F}\x{7C40}\x{7C43}\x{7C4C}\x{7C4D}\x{7C4F}' - . '\x{7C50}\x{7C54}\x{7C56}\x{7C58}\x{7C5F}\x{7C60}\x{7C64}\x{7C65}\x{7C6C}' - . '\x{7C73}\x{7C75}\x{7C7E}\x{7C81}\x{7C82}\x{7C83}\x{7C89}\x{7C8B}\x{7C8D}' - . '\x{7C90}\x{7C92}\x{7C95}\x{7C97}\x{7C98}\x{7C9B}\x{7C9F}\x{7CA1}\x{7CA2}' - . '\x{7CA4}\x{7CA5}\x{7CA7}\x{7CA8}\x{7CAB}\x{7CAD}\x{7CAE}\x{7CB1}\x{7CB2}' - . '\x{7CB3}\x{7CB9}\x{7CBD}\x{7CBE}\x{7CC0}\x{7CC2}\x{7CC5}\x{7CCA}\x{7CCE}' - . '\x{7CD2}\x{7CD6}\x{7CD8}\x{7CDC}\x{7CDE}\x{7CDF}\x{7CE0}\x{7CE2}\x{7CE7}' - . '\x{7CEF}\x{7CF2}\x{7CF4}\x{7CF6}\x{7CF8}\x{7CFA}\x{7CFB}\x{7CFE}\x{7D00}' - . '\x{7D02}\x{7D04}\x{7D05}\x{7D06}\x{7D0A}\x{7D0B}\x{7D0D}\x{7D10}\x{7D14}' - . '\x{7D15}\x{7D17}\x{7D18}\x{7D19}\x{7D1A}\x{7D1B}\x{7D1C}\x{7D20}\x{7D21}' - . '\x{7D22}\x{7D2B}\x{7D2C}\x{7D2E}\x{7D2F}\x{7D30}\x{7D32}\x{7D33}\x{7D35}' - . '\x{7D39}\x{7D3A}\x{7D3F}\x{7D42}\x{7D43}\x{7D44}\x{7D45}\x{7D46}\x{7D4B}' - . '\x{7D4C}\x{7D4E}\x{7D4F}\x{7D50}\x{7D56}\x{7D5B}\x{7D5E}\x{7D61}\x{7D62}' - . '\x{7D63}\x{7D66}\x{7D68}\x{7D6E}\x{7D71}\x{7D72}\x{7D73}\x{7D75}\x{7D76}' - . '\x{7D79}\x{7D7D}\x{7D89}\x{7D8F}\x{7D93}\x{7D99}\x{7D9A}\x{7D9B}\x{7D9C}' - . '\x{7D9F}\x{7DA2}\x{7DA3}\x{7DAB}\x{7DAC}\x{7DAD}\x{7DAE}\x{7DAF}\x{7DB0}' - . '\x{7DB1}\x{7DB2}\x{7DB4}\x{7DB5}\x{7DB8}\x{7DBA}\x{7DBB}\x{7DBD}\x{7DBE}' - . '\x{7DBF}\x{7DC7}\x{7DCA}\x{7DCB}\x{7DCF}\x{7DD1}\x{7DD2}\x{7DD5}\x{7DD8}' - . '\x{7DDA}\x{7DDC}\x{7DDD}\x{7DDE}\x{7DE0}\x{7DE1}\x{7DE4}\x{7DE8}\x{7DE9}' - . '\x{7DEC}\x{7DEF}\x{7DF2}\x{7DF4}\x{7DFB}\x{7E01}\x{7E04}\x{7E05}\x{7E09}' - . '\x{7E0A}\x{7E0B}\x{7E12}\x{7E1B}\x{7E1E}\x{7E1F}\x{7E21}\x{7E22}\x{7E23}' - . '\x{7E26}\x{7E2B}\x{7E2E}\x{7E31}\x{7E32}\x{7E35}\x{7E37}\x{7E39}\x{7E3A}' - . '\x{7E3B}\x{7E3D}\x{7E3E}\x{7E41}\x{7E43}\x{7E46}\x{7E4A}\x{7E4B}\x{7E4D}' - . '\x{7E54}\x{7E55}\x{7E56}\x{7E59}\x{7E5A}\x{7E5D}\x{7E5E}\x{7E66}\x{7E67}' - . '\x{7E69}\x{7E6A}\x{7E6D}\x{7E70}\x{7E79}\x{7E7B}\x{7E7C}\x{7E7D}\x{7E7F}' - . '\x{7E82}\x{7E83}\x{7E88}\x{7E89}\x{7E8C}\x{7E8E}\x{7E8F}\x{7E90}\x{7E92}' - . '\x{7E93}\x{7E94}\x{7E96}\x{7E9B}\x{7E9C}\x{7F36}\x{7F38}\x{7F3A}\x{7F45}' - . '\x{7F4C}\x{7F4D}\x{7F4E}\x{7F50}\x{7F51}\x{7F54}\x{7F55}\x{7F58}\x{7F5F}' - . '\x{7F60}\x{7F67}\x{7F68}\x{7F69}\x{7F6A}\x{7F6B}\x{7F6E}\x{7F70}\x{7F72}' - . '\x{7F75}\x{7F77}\x{7F78}\x{7F79}\x{7F82}\x{7F83}\x{7F85}\x{7F86}\x{7F87}' - . '\x{7F88}\x{7F8A}\x{7F8C}\x{7F8E}\x{7F94}\x{7F9A}\x{7F9D}\x{7F9E}\x{7FA3}' - . '\x{7FA4}\x{7FA8}\x{7FA9}\x{7FAE}\x{7FAF}\x{7FB2}\x{7FB6}\x{7FB8}\x{7FB9}' - . '\x{7FBD}\x{7FC1}\x{7FC5}\x{7FC6}\x{7FCA}\x{7FCC}\x{7FD2}\x{7FD4}\x{7FD5}' - . '\x{7FE0}\x{7FE1}\x{7FE6}\x{7FE9}\x{7FEB}\x{7FF0}\x{7FF3}\x{7FF9}\x{7FFB}' - . '\x{7FFC}\x{8000}\x{8001}\x{8003}\x{8004}\x{8005}\x{8006}\x{800B}\x{800C}' - . '\x{8010}\x{8012}\x{8015}\x{8017}\x{8018}\x{8019}\x{801C}\x{8021}\x{8028}' - . '\x{8033}\x{8036}\x{803B}\x{803D}\x{803F}\x{8046}\x{804A}\x{8052}\x{8056}' - . '\x{8058}\x{805A}\x{805E}\x{805F}\x{8061}\x{8062}\x{8068}\x{806F}\x{8070}' - . '\x{8072}\x{8073}\x{8074}\x{8076}\x{8077}\x{8079}\x{807D}\x{807E}\x{807F}' - . '\x{8084}\x{8085}\x{8086}\x{8087}\x{8089}\x{808B}\x{808C}\x{8093}\x{8096}' - . '\x{8098}\x{809A}\x{809B}\x{809D}\x{80A1}\x{80A2}\x{80A5}\x{80A9}\x{80AA}' - . '\x{80AC}\x{80AD}\x{80AF}\x{80B1}\x{80B2}\x{80B4}\x{80BA}\x{80C3}\x{80C4}' - . '\x{80C6}\x{80CC}\x{80CE}\x{80D6}\x{80D9}\x{80DA}\x{80DB}\x{80DD}\x{80DE}' - . '\x{80E1}\x{80E4}\x{80E5}\x{80EF}\x{80F1}\x{80F4}\x{80F8}\x{80FC}\x{80FD}' - . '\x{8102}\x{8105}\x{8106}\x{8107}\x{8108}\x{8109}\x{810A}\x{811A}\x{811B}' - . '\x{8123}\x{8129}\x{812F}\x{8131}\x{8133}\x{8139}\x{813E}\x{8146}\x{814B}' - . '\x{814E}\x{8150}\x{8151}\x{8153}\x{8154}\x{8155}\x{815F}\x{8165}\x{8166}' - . '\x{816B}\x{816E}\x{8170}\x{8171}\x{8174}\x{8178}\x{8179}\x{817A}\x{817F}' - . '\x{8180}\x{8182}\x{8183}\x{8188}\x{818A}\x{818F}\x{8193}\x{8195}\x{819A}' - . '\x{819C}\x{819D}\x{81A0}\x{81A3}\x{81A4}\x{81A8}\x{81A9}\x{81B0}\x{81B3}' - . '\x{81B5}\x{81B8}\x{81BA}\x{81BD}\x{81BE}\x{81BF}\x{81C0}\x{81C2}\x{81C6}' - . '\x{81C8}\x{81C9}\x{81CD}\x{81D1}\x{81D3}\x{81D8}\x{81D9}\x{81DA}\x{81DF}' - . '\x{81E0}\x{81E3}\x{81E5}\x{81E7}\x{81E8}\x{81EA}\x{81ED}\x{81F3}\x{81F4}' - . '\x{81FA}\x{81FB}\x{81FC}\x{81FE}\x{8201}\x{8202}\x{8205}\x{8207}\x{8208}' - . '\x{8209}\x{820A}\x{820C}\x{820D}\x{820E}\x{8210}\x{8212}\x{8216}\x{8217}' - . '\x{8218}\x{821B}\x{821C}\x{821E}\x{821F}\x{8229}\x{822A}\x{822B}\x{822C}' - . '\x{822E}\x{8233}\x{8235}\x{8236}\x{8237}\x{8238}\x{8239}\x{8240}\x{8247}' - . '\x{8258}\x{8259}\x{825A}\x{825D}\x{825F}\x{8262}\x{8264}\x{8266}\x{8268}' - . '\x{826A}\x{826B}\x{826E}\x{826F}\x{8271}\x{8272}\x{8276}\x{8277}\x{8278}' - . '\x{827E}\x{828B}\x{828D}\x{8292}\x{8299}\x{829D}\x{829F}\x{82A5}\x{82A6}' - . '\x{82AB}\x{82AC}\x{82AD}\x{82AF}\x{82B1}\x{82B3}\x{82B8}\x{82B9}\x{82BB}' - . '\x{82BD}\x{82C5}\x{82D1}\x{82D2}\x{82D3}\x{82D4}\x{82D7}\x{82D9}\x{82DB}' - . '\x{82DC}\x{82DE}\x{82DF}\x{82E1}\x{82E3}\x{82E5}\x{82E6}\x{82E7}\x{82EB}' - . '\x{82F1}\x{82F3}\x{82F4}\x{82F9}\x{82FA}\x{82FB}\x{8302}\x{8303}\x{8304}' - . '\x{8305}\x{8306}\x{8309}\x{830E}\x{8316}\x{8317}\x{8318}\x{831C}\x{8323}' - . '\x{8328}\x{832B}\x{832F}\x{8331}\x{8332}\x{8334}\x{8335}\x{8336}\x{8338}' - . '\x{8339}\x{8340}\x{8345}\x{8349}\x{834A}\x{834F}\x{8350}\x{8352}\x{8358}' - . '\x{8373}\x{8375}\x{8377}\x{837B}\x{837C}\x{8385}\x{8387}\x{8389}\x{838A}' - . '\x{838E}\x{8393}\x{8396}\x{839A}\x{839E}\x{839F}\x{83A0}\x{83A2}\x{83A8}' - . '\x{83AA}\x{83AB}\x{83B1}\x{83B5}\x{83BD}\x{83C1}\x{83C5}\x{83CA}\x{83CC}' - . '\x{83CE}\x{83D3}\x{83D6}\x{83D8}\x{83DC}\x{83DF}\x{83E0}\x{83E9}\x{83EB}' - . '\x{83EF}\x{83F0}\x{83F1}\x{83F2}\x{83F4}\x{83F7}\x{83FB}\x{83FD}\x{8403}' - . '\x{8404}\x{8407}\x{840B}\x{840C}\x{840D}\x{840E}\x{8413}\x{8420}\x{8422}' - . '\x{8429}\x{842A}\x{842C}\x{8431}\x{8435}\x{8438}\x{843C}\x{843D}\x{8446}' - . '\x{8449}\x{844E}\x{8457}\x{845B}\x{8461}\x{8462}\x{8463}\x{8466}\x{8469}' - . '\x{846B}\x{846C}\x{846D}\x{846E}\x{846F}\x{8471}\x{8475}\x{8477}\x{8479}' - . '\x{847A}\x{8482}\x{8484}\x{848B}\x{8490}\x{8494}\x{8499}\x{849C}\x{849F}' - . '\x{84A1}\x{84AD}\x{84B2}\x{84B8}\x{84B9}\x{84BB}\x{84BC}\x{84BF}\x{84C1}' - . '\x{84C4}\x{84C6}\x{84C9}\x{84CA}\x{84CB}\x{84CD}\x{84D0}\x{84D1}\x{84D6}' - . '\x{84D9}\x{84DA}\x{84EC}\x{84EE}\x{84F4}\x{84FC}\x{84FF}\x{8500}\x{8506}' - . '\x{8511}\x{8513}\x{8514}\x{8515}\x{8517}\x{8518}\x{851A}\x{851F}\x{8521}' - . '\x{8526}\x{852C}\x{852D}\x{8535}\x{853D}\x{8540}\x{8541}\x{8543}\x{8548}' - . '\x{8549}\x{854A}\x{854B}\x{854E}\x{8555}\x{8557}\x{8558}\x{855A}\x{8563}' - . '\x{8568}\x{8569}\x{856A}\x{856D}\x{8577}\x{857E}\x{8580}\x{8584}\x{8587}' - . '\x{8588}\x{858A}\x{8590}\x{8591}\x{8594}\x{8597}\x{8599}\x{859B}\x{859C}' - . '\x{85A4}\x{85A6}\x{85A8}\x{85A9}\x{85AA}\x{85AB}\x{85AC}\x{85AE}\x{85AF}' - . '\x{85B9}\x{85BA}\x{85C1}\x{85C9}\x{85CD}\x{85CF}\x{85D0}\x{85D5}\x{85DC}' - . '\x{85DD}\x{85E4}\x{85E5}\x{85E9}\x{85EA}\x{85F7}\x{85F9}\x{85FA}\x{85FB}' - . '\x{85FE}\x{8602}\x{8606}\x{8607}\x{860A}\x{860B}\x{8613}\x{8616}\x{8617}' - . '\x{861A}\x{8622}\x{862D}\x{862F}\x{8630}\x{863F}\x{864D}\x{864E}\x{8650}' - . '\x{8654}\x{8655}\x{865A}\x{865C}\x{865E}\x{865F}\x{8667}\x{866B}\x{8671}' - . '\x{8679}\x{867B}\x{868A}\x{868B}\x{868C}\x{8693}\x{8695}\x{86A3}\x{86A4}' - . '\x{86A9}\x{86AA}\x{86AB}\x{86AF}\x{86B0}\x{86B6}\x{86C4}\x{86C6}\x{86C7}' - . '\x{86C9}\x{86CB}\x{86CD}\x{86CE}\x{86D4}\x{86D9}\x{86DB}\x{86DE}\x{86DF}' - . '\x{86E4}\x{86E9}\x{86EC}\x{86ED}\x{86EE}\x{86EF}\x{86F8}\x{86F9}\x{86FB}' - . '\x{86FE}\x{8700}\x{8702}\x{8703}\x{8706}\x{8708}\x{8709}\x{870A}\x{870D}' - . '\x{8711}\x{8712}\x{8718}\x{871A}\x{871C}\x{8725}\x{8729}\x{8734}\x{8737}' - . '\x{873B}\x{873F}\x{8749}\x{874B}\x{874C}\x{874E}\x{8753}\x{8755}\x{8757}' - . '\x{8759}\x{875F}\x{8760}\x{8763}\x{8766}\x{8768}\x{876A}\x{876E}\x{8774}' - . '\x{8776}\x{8778}\x{877F}\x{8782}\x{878D}\x{879F}\x{87A2}\x{87AB}\x{87AF}' - . '\x{87B3}\x{87BA}\x{87BB}\x{87BD}\x{87C0}\x{87C4}\x{87C6}\x{87C7}\x{87CB}' - . '\x{87D0}\x{87D2}\x{87E0}\x{87EF}\x{87F2}\x{87F6}\x{87F7}\x{87F9}\x{87FB}' - . '\x{87FE}\x{8805}\x{880D}\x{880E}\x{880F}\x{8811}\x{8815}\x{8816}\x{8821}' - . '\x{8822}\x{8823}\x{8827}\x{8831}\x{8836}\x{8839}\x{883B}\x{8840}\x{8842}' - . '\x{8844}\x{8846}\x{884C}\x{884D}\x{8852}\x{8853}\x{8857}\x{8859}\x{885B}' - . '\x{885D}\x{885E}\x{8861}\x{8862}\x{8863}\x{8868}\x{886B}\x{8870}\x{8872}' - . '\x{8875}\x{8877}\x{887D}\x{887E}\x{887F}\x{8881}\x{8882}\x{8888}\x{888B}' - . '\x{888D}\x{8892}\x{8896}\x{8897}\x{8899}\x{889E}\x{88A2}\x{88A4}\x{88AB}' - . '\x{88AE}\x{88B0}\x{88B1}\x{88B4}\x{88B5}\x{88B7}\x{88BF}\x{88C1}\x{88C2}' - . '\x{88C3}\x{88C4}\x{88C5}\x{88CF}\x{88D4}\x{88D5}\x{88D8}\x{88D9}\x{88DC}' - . '\x{88DD}\x{88DF}\x{88E1}\x{88E8}\x{88F2}\x{88F3}\x{88F4}\x{88F8}\x{88F9}' - . '\x{88FC}\x{88FD}\x{88FE}\x{8902}\x{8904}\x{8907}\x{890A}\x{890C}\x{8910}' - . '\x{8912}\x{8913}\x{891D}\x{891E}\x{8925}\x{892A}\x{892B}\x{8936}\x{8938}' - . '\x{893B}\x{8941}\x{8943}\x{8944}\x{894C}\x{894D}\x{8956}\x{895E}\x{895F}' - . '\x{8960}\x{8964}\x{8966}\x{896A}\x{896D}\x{896F}\x{8972}\x{8974}\x{8977}' - . '\x{897E}\x{897F}\x{8981}\x{8983}\x{8986}\x{8987}\x{8988}\x{898A}\x{898B}' - . '\x{898F}\x{8993}\x{8996}\x{8997}\x{8998}\x{899A}\x{89A1}\x{89A6}\x{89A7}' - . '\x{89A9}\x{89AA}\x{89AC}\x{89AF}\x{89B2}\x{89B3}\x{89BA}\x{89BD}\x{89BF}' - . '\x{89C0}\x{89D2}\x{89DA}\x{89DC}\x{89DD}\x{89E3}\x{89E6}\x{89E7}\x{89F4}' - . '\x{89F8}\x{8A00}\x{8A02}\x{8A03}\x{8A08}\x{8A0A}\x{8A0C}\x{8A0E}\x{8A10}' - . '\x{8A13}\x{8A16}\x{8A17}\x{8A18}\x{8A1B}\x{8A1D}\x{8A1F}\x{8A23}\x{8A25}' - . '\x{8A2A}\x{8A2D}\x{8A31}\x{8A33}\x{8A34}\x{8A36}\x{8A3A}\x{8A3B}\x{8A3C}' - . '\x{8A41}\x{8A46}\x{8A48}\x{8A50}\x{8A51}\x{8A52}\x{8A54}\x{8A55}\x{8A5B}' - . '\x{8A5E}\x{8A60}\x{8A62}\x{8A63}\x{8A66}\x{8A69}\x{8A6B}\x{8A6C}\x{8A6D}' - . '\x{8A6E}\x{8A70}\x{8A71}\x{8A72}\x{8A73}\x{8A7C}\x{8A82}\x{8A84}\x{8A85}' - . '\x{8A87}\x{8A89}\x{8A8C}\x{8A8D}\x{8A91}\x{8A93}\x{8A95}\x{8A98}\x{8A9A}' - . '\x{8A9E}\x{8AA0}\x{8AA1}\x{8AA3}\x{8AA4}\x{8AA5}\x{8AA6}\x{8AA8}\x{8AAC}' - . '\x{8AAD}\x{8AB0}\x{8AB2}\x{8AB9}\x{8ABC}\x{8ABF}\x{8AC2}\x{8AC4}\x{8AC7}' - . '\x{8ACB}\x{8ACC}\x{8ACD}\x{8ACF}\x{8AD2}\x{8AD6}\x{8ADA}\x{8ADB}\x{8ADC}' - . '\x{8ADE}\x{8AE0}\x{8AE1}\x{8AE2}\x{8AE4}\x{8AE6}\x{8AE7}\x{8AEB}\x{8AED}' - . '\x{8AEE}\x{8AF1}\x{8AF3}\x{8AF7}\x{8AF8}\x{8AFA}\x{8AFE}\x{8B00}\x{8B01}' - . '\x{8B02}\x{8B04}\x{8B07}\x{8B0C}\x{8B0E}\x{8B10}\x{8B14}\x{8B16}\x{8B17}' - . '\x{8B19}\x{8B1A}\x{8B1B}\x{8B1D}\x{8B20}\x{8B21}\x{8B26}\x{8B28}\x{8B2B}' - . '\x{8B2C}\x{8B33}\x{8B39}\x{8B3E}\x{8B41}\x{8B49}\x{8B4C}\x{8B4E}\x{8B4F}' - . '\x{8B56}\x{8B58}\x{8B5A}\x{8B5B}\x{8B5C}\x{8B5F}\x{8B66}\x{8B6B}\x{8B6C}' - . '\x{8B6F}\x{8B70}\x{8B71}\x{8B72}\x{8B74}\x{8B77}\x{8B7D}\x{8B80}\x{8B83}' - . '\x{8B8A}\x{8B8C}\x{8B8E}\x{8B90}\x{8B92}\x{8B93}\x{8B96}\x{8B99}\x{8B9A}' - . '\x{8C37}\x{8C3A}\x{8C3F}\x{8C41}\x{8C46}\x{8C48}\x{8C4A}\x{8C4C}\x{8C4E}' - . '\x{8C50}\x{8C55}\x{8C5A}\x{8C61}\x{8C62}\x{8C6A}\x{8C6B}\x{8C6C}\x{8C78}' - . '\x{8C79}\x{8C7A}\x{8C7C}\x{8C82}\x{8C85}\x{8C89}\x{8C8A}\x{8C8C}\x{8C8D}' - . '\x{8C8E}\x{8C94}\x{8C98}\x{8C9D}\x{8C9E}\x{8CA0}\x{8CA1}\x{8CA2}\x{8CA7}' - . '\x{8CA8}\x{8CA9}\x{8CAA}\x{8CAB}\x{8CAC}\x{8CAD}\x{8CAE}\x{8CAF}\x{8CB0}' - . '\x{8CB2}\x{8CB3}\x{8CB4}\x{8CB6}\x{8CB7}\x{8CB8}\x{8CBB}\x{8CBC}\x{8CBD}' - . '\x{8CBF}\x{8CC0}\x{8CC1}\x{8CC2}\x{8CC3}\x{8CC4}\x{8CC7}\x{8CC8}\x{8CCA}' - . '\x{8CCD}\x{8CCE}\x{8CD1}\x{8CD3}\x{8CDA}\x{8CDB}\x{8CDC}\x{8CDE}\x{8CE0}' - . '\x{8CE2}\x{8CE3}\x{8CE4}\x{8CE6}\x{8CEA}\x{8CED}\x{8CFA}\x{8CFB}\x{8CFC}' - . '\x{8CFD}\x{8D04}\x{8D05}\x{8D07}\x{8D08}\x{8D0A}\x{8D0B}\x{8D0D}\x{8D0F}' - . '\x{8D10}\x{8D13}\x{8D14}\x{8D16}\x{8D64}\x{8D66}\x{8D67}\x{8D6B}\x{8D6D}' - . '\x{8D70}\x{8D71}\x{8D73}\x{8D74}\x{8D77}\x{8D81}\x{8D85}\x{8D8A}\x{8D99}' - . '\x{8DA3}\x{8DA8}\x{8DB3}\x{8DBA}\x{8DBE}\x{8DC2}\x{8DCB}\x{8DCC}\x{8DCF}' - . '\x{8DD6}\x{8DDA}\x{8DDB}\x{8DDD}\x{8DDF}\x{8DE1}\x{8DE3}\x{8DE8}\x{8DEA}' - . '\x{8DEB}\x{8DEF}\x{8DF3}\x{8DF5}\x{8DFC}\x{8DFF}\x{8E08}\x{8E09}\x{8E0A}' - . '\x{8E0F}\x{8E10}\x{8E1D}\x{8E1E}\x{8E1F}\x{8E2A}\x{8E30}\x{8E34}\x{8E35}' - . '\x{8E42}\x{8E44}\x{8E47}\x{8E48}\x{8E49}\x{8E4A}\x{8E4C}\x{8E50}\x{8E55}' - . '\x{8E59}\x{8E5F}\x{8E60}\x{8E63}\x{8E64}\x{8E72}\x{8E74}\x{8E76}\x{8E7C}' - . '\x{8E81}\x{8E84}\x{8E85}\x{8E87}\x{8E8A}\x{8E8B}\x{8E8D}\x{8E91}\x{8E93}' - . '\x{8E94}\x{8E99}\x{8EA1}\x{8EAA}\x{8EAB}\x{8EAC}\x{8EAF}\x{8EB0}\x{8EB1}' - . '\x{8EBE}\x{8EC5}\x{8EC6}\x{8EC8}\x{8ECA}\x{8ECB}\x{8ECC}\x{8ECD}\x{8ED2}' - . '\x{8EDB}\x{8EDF}\x{8EE2}\x{8EE3}\x{8EEB}\x{8EF8}\x{8EFB}\x{8EFC}\x{8EFD}' - . '\x{8EFE}\x{8F03}\x{8F05}\x{8F09}\x{8F0A}\x{8F0C}\x{8F12}\x{8F13}\x{8F14}' - . '\x{8F15}\x{8F19}\x{8F1B}\x{8F1C}\x{8F1D}\x{8F1F}\x{8F26}\x{8F29}\x{8F2A}' - . '\x{8F2F}\x{8F33}\x{8F38}\x{8F39}\x{8F3B}\x{8F3E}\x{8F3F}\x{8F42}\x{8F44}' - . '\x{8F45}\x{8F46}\x{8F49}\x{8F4C}\x{8F4D}\x{8F4E}\x{8F57}\x{8F5C}\x{8F5F}' - . '\x{8F61}\x{8F62}\x{8F63}\x{8F64}\x{8F9B}\x{8F9C}\x{8F9E}\x{8F9F}\x{8FA3}' - . '\x{8FA7}\x{8FA8}\x{8FAD}\x{8FAE}\x{8FAF}\x{8FB0}\x{8FB1}\x{8FB2}\x{8FB7}' - . '\x{8FBA}\x{8FBB}\x{8FBC}\x{8FBF}\x{8FC2}\x{8FC4}\x{8FC5}\x{8FCE}\x{8FD1}' - . '\x{8FD4}\x{8FDA}\x{8FE2}\x{8FE5}\x{8FE6}\x{8FE9}\x{8FEA}\x{8FEB}\x{8FED}' - . '\x{8FEF}\x{8FF0}\x{8FF4}\x{8FF7}\x{8FF8}\x{8FF9}\x{8FFA}\x{8FFD}\x{9000}' - . '\x{9001}\x{9003}\x{9005}\x{9006}\x{900B}\x{900D}\x{900E}\x{900F}\x{9010}' - . '\x{9011}\x{9013}\x{9014}\x{9015}\x{9016}\x{9017}\x{9019}\x{901A}\x{901D}' - . '\x{901E}\x{901F}\x{9020}\x{9021}\x{9022}\x{9023}\x{9027}\x{902E}\x{9031}' - . '\x{9032}\x{9035}\x{9036}\x{9038}\x{9039}\x{903C}\x{903E}\x{9041}\x{9042}' - . '\x{9045}\x{9047}\x{9049}\x{904A}\x{904B}\x{904D}\x{904E}\x{904F}\x{9050}' - . '\x{9051}\x{9052}\x{9053}\x{9054}\x{9055}\x{9056}\x{9058}\x{9059}\x{905C}' - . '\x{905E}\x{9060}\x{9061}\x{9063}\x{9065}\x{9068}\x{9069}\x{906D}\x{906E}' - . '\x{906F}\x{9072}\x{9075}\x{9076}\x{9077}\x{9078}\x{907A}\x{907C}\x{907D}' - . '\x{907F}\x{9080}\x{9081}\x{9082}\x{9083}\x{9084}\x{9087}\x{9089}\x{908A}' - . '\x{908F}\x{9091}\x{90A3}\x{90A6}\x{90A8}\x{90AA}\x{90AF}\x{90B1}\x{90B5}' - . '\x{90B8}\x{90C1}\x{90CA}\x{90CE}\x{90DB}\x{90E1}\x{90E2}\x{90E4}\x{90E8}' - . '\x{90ED}\x{90F5}\x{90F7}\x{90FD}\x{9102}\x{9112}\x{9119}\x{912D}\x{9130}' - . '\x{9132}\x{9149}\x{914A}\x{914B}\x{914C}\x{914D}\x{914E}\x{9152}\x{9154}' - . '\x{9156}\x{9158}\x{9162}\x{9163}\x{9165}\x{9169}\x{916A}\x{916C}\x{9172}' - . '\x{9173}\x{9175}\x{9177}\x{9178}\x{9182}\x{9187}\x{9189}\x{918B}\x{918D}' - . '\x{9190}\x{9192}\x{9197}\x{919C}\x{91A2}\x{91A4}\x{91AA}\x{91AB}\x{91AF}' - . '\x{91B4}\x{91B5}\x{91B8}\x{91BA}\x{91C0}\x{91C1}\x{91C6}\x{91C7}\x{91C8}' - . '\x{91C9}\x{91CB}\x{91CC}\x{91CD}\x{91CE}\x{91CF}\x{91D0}\x{91D1}\x{91D6}' - . '\x{91D8}\x{91DB}\x{91DC}\x{91DD}\x{91DF}\x{91E1}\x{91E3}\x{91E6}\x{91E7}' - . '\x{91F5}\x{91F6}\x{91FC}\x{91FF}\x{920D}\x{920E}\x{9211}\x{9214}\x{9215}' - . '\x{921E}\x{9229}\x{922C}\x{9234}\x{9237}\x{923F}\x{9244}\x{9245}\x{9248}' - . '\x{9249}\x{924B}\x{9250}\x{9257}\x{925A}\x{925B}\x{925E}\x{9262}\x{9264}' - . '\x{9266}\x{9271}\x{927E}\x{9280}\x{9283}\x{9285}\x{9291}\x{9293}\x{9295}' - . '\x{9296}\x{9298}\x{929A}\x{929B}\x{929C}\x{92AD}\x{92B7}\x{92B9}\x{92CF}' - . '\x{92D2}\x{92E4}\x{92E9}\x{92EA}\x{92ED}\x{92F2}\x{92F3}\x{92F8}\x{92FA}' - . '\x{92FC}\x{9306}\x{930F}\x{9310}\x{9318}\x{9319}\x{931A}\x{9320}\x{9322}' - . '\x{9323}\x{9326}\x{9328}\x{932B}\x{932C}\x{932E}\x{932F}\x{9332}\x{9335}' - . '\x{933A}\x{933B}\x{9344}\x{934B}\x{934D}\x{9354}\x{9356}\x{935B}\x{935C}' - . '\x{9360}\x{936C}\x{936E}\x{9375}\x{937C}\x{937E}\x{938C}\x{9394}\x{9396}' - . '\x{9397}\x{939A}\x{93A7}\x{93AC}\x{93AD}\x{93AE}\x{93B0}\x{93B9}\x{93C3}' - . '\x{93C8}\x{93D0}\x{93D1}\x{93D6}\x{93D7}\x{93D8}\x{93DD}\x{93E1}\x{93E4}' - . '\x{93E5}\x{93E8}\x{9403}\x{9407}\x{9410}\x{9413}\x{9414}\x{9418}\x{9419}' - . '\x{941A}\x{9421}\x{942B}\x{9435}\x{9436}\x{9438}\x{943A}\x{9441}\x{9444}' - . '\x{9451}\x{9452}\x{9453}\x{945A}\x{945B}\x{945E}\x{9460}\x{9462}\x{946A}' - . '\x{9470}\x{9475}\x{9477}\x{947C}\x{947D}\x{947E}\x{947F}\x{9481}\x{9577}' - . '\x{9580}\x{9582}\x{9583}\x{9587}\x{9589}\x{958A}\x{958B}\x{958F}\x{9591}' - . '\x{9593}\x{9594}\x{9596}\x{9598}\x{9599}\x{95A0}\x{95A2}\x{95A3}\x{95A4}' - . '\x{95A5}\x{95A7}\x{95A8}\x{95AD}\x{95B2}\x{95B9}\x{95BB}\x{95BC}\x{95BE}' - . '\x{95C3}\x{95C7}\x{95CA}\x{95CC}\x{95CD}\x{95D4}\x{95D5}\x{95D6}\x{95D8}' - . '\x{95DC}\x{95E1}\x{95E2}\x{95E5}\x{961C}\x{9621}\x{9628}\x{962A}\x{962E}' - . '\x{962F}\x{9632}\x{963B}\x{963F}\x{9640}\x{9642}\x{9644}\x{964B}\x{964C}' - . '\x{964D}\x{964F}\x{9650}\x{965B}\x{965C}\x{965D}\x{965E}\x{965F}\x{9662}' - . '\x{9663}\x{9664}\x{9665}\x{9666}\x{966A}\x{966C}\x{9670}\x{9672}\x{9673}' - . '\x{9675}\x{9676}\x{9677}\x{9678}\x{967A}\x{967D}\x{9685}\x{9686}\x{9688}' - . '\x{968A}\x{968B}\x{968D}\x{968E}\x{968F}\x{9694}\x{9695}\x{9697}\x{9698}' - . '\x{9699}\x{969B}\x{969C}\x{96A0}\x{96A3}\x{96A7}\x{96A8}\x{96AA}\x{96B0}' - . '\x{96B1}\x{96B2}\x{96B4}\x{96B6}\x{96B7}\x{96B8}\x{96B9}\x{96BB}\x{96BC}' - . '\x{96C0}\x{96C1}\x{96C4}\x{96C5}\x{96C6}\x{96C7}\x{96C9}\x{96CB}\x{96CC}' - . '\x{96CD}\x{96CE}\x{96D1}\x{96D5}\x{96D6}\x{96D9}\x{96DB}\x{96DC}\x{96E2}' - . '\x{96E3}\x{96E8}\x{96EA}\x{96EB}\x{96F0}\x{96F2}\x{96F6}\x{96F7}\x{96F9}' - . '\x{96FB}\x{9700}\x{9704}\x{9706}\x{9707}\x{9708}\x{970A}\x{970D}\x{970E}' - . '\x{970F}\x{9711}\x{9713}\x{9716}\x{9719}\x{971C}\x{971E}\x{9724}\x{9727}' - . '\x{972A}\x{9730}\x{9732}\x{9738}\x{9739}\x{973D}\x{973E}\x{9742}\x{9744}' - . '\x{9746}\x{9748}\x{9749}\x{9752}\x{9756}\x{9759}\x{975C}\x{975E}\x{9760}' - . '\x{9761}\x{9762}\x{9764}\x{9766}\x{9768}\x{9769}\x{976B}\x{976D}\x{9771}' - . '\x{9774}\x{9779}\x{977A}\x{977C}\x{9781}\x{9784}\x{9785}\x{9786}\x{978B}' - . '\x{978D}\x{978F}\x{9790}\x{9798}\x{979C}\x{97A0}\x{97A3}\x{97A6}\x{97A8}' - . '\x{97AB}\x{97AD}\x{97B3}\x{97B4}\x{97C3}\x{97C6}\x{97C8}\x{97CB}\x{97D3}' - . '\x{97DC}\x{97ED}\x{97EE}\x{97F2}\x{97F3}\x{97F5}\x{97F6}\x{97FB}\x{97FF}' - . '\x{9801}\x{9802}\x{9803}\x{9805}\x{9806}\x{9808}\x{980C}\x{980F}\x{9810}' - . '\x{9811}\x{9812}\x{9813}\x{9817}\x{9818}\x{981A}\x{9821}\x{9824}\x{982C}' - . '\x{982D}\x{9834}\x{9837}\x{9838}\x{983B}\x{983C}\x{983D}\x{9846}\x{984B}' - . '\x{984C}\x{984D}\x{984E}\x{984F}\x{9854}\x{9855}\x{9858}\x{985B}\x{985E}' - . '\x{9867}\x{986B}\x{986F}\x{9870}\x{9871}\x{9873}\x{9874}\x{98A8}\x{98AA}' - . '\x{98AF}\x{98B1}\x{98B6}\x{98C3}\x{98C4}\x{98C6}\x{98DB}\x{98DC}\x{98DF}' - . '\x{98E2}\x{98E9}\x{98EB}\x{98ED}\x{98EE}\x{98EF}\x{98F2}\x{98F4}\x{98FC}' - . '\x{98FD}\x{98FE}\x{9903}\x{9905}\x{9909}\x{990A}\x{990C}\x{9910}\x{9912}' - . '\x{9913}\x{9914}\x{9918}\x{991D}\x{991E}\x{9920}\x{9921}\x{9924}\x{9928}' - . '\x{992C}\x{992E}\x{993D}\x{993E}\x{9942}\x{9945}\x{9949}\x{994B}\x{994C}' - . '\x{9950}\x{9951}\x{9952}\x{9955}\x{9957}\x{9996}\x{9997}\x{9998}\x{9999}' - . '\x{99A5}\x{99A8}\x{99AC}\x{99AD}\x{99AE}\x{99B3}\x{99B4}\x{99BC}\x{99C1}' - . '\x{99C4}\x{99C5}\x{99C6}\x{99C8}\x{99D0}\x{99D1}\x{99D2}\x{99D5}\x{99D8}' - . '\x{99DB}\x{99DD}\x{99DF}\x{99E2}\x{99ED}\x{99EE}\x{99F1}\x{99F2}\x{99F8}' - . '\x{99FB}\x{99FF}\x{9A01}\x{9A05}\x{9A0E}\x{9A0F}\x{9A12}\x{9A13}\x{9A19}' - . '\x{9A28}\x{9A2B}\x{9A30}\x{9A37}\x{9A3E}\x{9A40}\x{9A42}\x{9A43}\x{9A45}' - . '\x{9A4D}\x{9A55}\x{9A57}\x{9A5A}\x{9A5B}\x{9A5F}\x{9A62}\x{9A64}\x{9A65}' - . '\x{9A69}\x{9A6A}\x{9A6B}\x{9AA8}\x{9AAD}\x{9AB0}\x{9AB8}\x{9ABC}\x{9AC0}' - . '\x{9AC4}\x{9ACF}\x{9AD1}\x{9AD3}\x{9AD4}\x{9AD8}\x{9ADE}\x{9ADF}\x{9AE2}' - . '\x{9AE3}\x{9AE6}\x{9AEA}\x{9AEB}\x{9AED}\x{9AEE}\x{9AEF}\x{9AF1}\x{9AF4}' - . '\x{9AF7}\x{9AFB}\x{9B06}\x{9B18}\x{9B1A}\x{9B1F}\x{9B22}\x{9B23}\x{9B25}' - . '\x{9B27}\x{9B28}\x{9B29}\x{9B2A}\x{9B2E}\x{9B2F}\x{9B31}\x{9B32}\x{9B3B}' - . '\x{9B3C}\x{9B41}\x{9B42}\x{9B43}\x{9B44}\x{9B45}\x{9B4D}\x{9B4E}\x{9B4F}' - . '\x{9B51}\x{9B54}\x{9B58}\x{9B5A}\x{9B6F}\x{9B74}\x{9B83}\x{9B8E}\x{9B91}' - . '\x{9B92}\x{9B93}\x{9B96}\x{9B97}\x{9B9F}\x{9BA0}\x{9BA8}\x{9BAA}\x{9BAB}' - . '\x{9BAD}\x{9BAE}\x{9BB4}\x{9BB9}\x{9BC0}\x{9BC6}\x{9BC9}\x{9BCA}\x{9BCF}' - . '\x{9BD1}\x{9BD2}\x{9BD4}\x{9BD6}\x{9BDB}\x{9BE1}\x{9BE2}\x{9BE3}\x{9BE4}' - . '\x{9BE8}\x{9BF0}\x{9BF1}\x{9BF2}\x{9BF5}\x{9C04}\x{9C06}\x{9C08}\x{9C09}' - . '\x{9C0A}\x{9C0C}\x{9C0D}\x{9C10}\x{9C12}\x{9C13}\x{9C14}\x{9C15}\x{9C1B}' - . '\x{9C21}\x{9C24}\x{9C25}\x{9C2D}\x{9C2E}\x{9C2F}\x{9C30}\x{9C32}\x{9C39}' - . '\x{9C3A}\x{9C3B}\x{9C3E}\x{9C46}\x{9C47}\x{9C48}\x{9C52}\x{9C57}\x{9C5A}' - . '\x{9C60}\x{9C67}\x{9C76}\x{9C78}\x{9CE5}\x{9CE7}\x{9CE9}\x{9CEB}\x{9CEC}' - . '\x{9CF0}\x{9CF3}\x{9CF4}\x{9CF6}\x{9D03}\x{9D06}\x{9D07}\x{9D08}\x{9D09}' - . '\x{9D0E}\x{9D12}\x{9D15}\x{9D1B}\x{9D1F}\x{9D23}\x{9D26}\x{9D28}\x{9D2A}' - . '\x{9D2B}\x{9D2C}\x{9D3B}\x{9D3E}\x{9D3F}\x{9D41}\x{9D44}\x{9D46}\x{9D48}' - . '\x{9D50}\x{9D51}\x{9D59}\x{9D5C}\x{9D5D}\x{9D5E}\x{9D60}\x{9D61}\x{9D64}' - . '\x{9D6C}\x{9D6F}\x{9D72}\x{9D7A}\x{9D87}\x{9D89}\x{9D8F}\x{9D9A}\x{9DA4}' - . '\x{9DA9}\x{9DAB}\x{9DAF}\x{9DB2}\x{9DB4}\x{9DB8}\x{9DBA}\x{9DBB}\x{9DC1}' - . '\x{9DC2}\x{9DC4}\x{9DC6}\x{9DCF}\x{9DD3}\x{9DD9}\x{9DE6}\x{9DED}\x{9DEF}' - . '\x{9DF2}\x{9DF8}\x{9DF9}\x{9DFA}\x{9DFD}\x{9E1A}\x{9E1B}\x{9E1E}\x{9E75}' - . '\x{9E78}\x{9E79}\x{9E7D}\x{9E7F}\x{9E81}\x{9E88}\x{9E8B}\x{9E8C}\x{9E91}' - . '\x{9E92}\x{9E93}\x{9E95}\x{9E97}\x{9E9D}\x{9E9F}\x{9EA5}\x{9EA6}\x{9EA9}' - . '\x{9EAA}\x{9EAD}\x{9EB8}\x{9EB9}\x{9EBA}\x{9EBB}\x{9EBC}\x{9EBE}\x{9EBF}' - . '\x{9EC4}\x{9ECC}\x{9ECD}\x{9ECE}\x{9ECF}\x{9ED0}\x{9ED2}\x{9ED4}\x{9ED8}' - . '\x{9ED9}\x{9EDB}\x{9EDC}\x{9EDD}\x{9EDE}\x{9EE0}\x{9EE5}\x{9EE8}\x{9EEF}' - . '\x{9EF4}\x{9EF6}\x{9EF7}\x{9EF9}\x{9EFB}\x{9EFC}\x{9EFD}\x{9F07}\x{9F08}' - . '\x{9F0E}\x{9F13}\x{9F15}\x{9F20}\x{9F21}\x{9F2C}\x{9F3B}\x{9F3E}\x{9F4A}' - . '\x{9F4B}\x{9F4E}\x{9F4F}\x{9F52}\x{9F54}\x{9F5F}\x{9F60}\x{9F61}\x{9F62}' - . '\x{9F63}\x{9F66}\x{9F67}\x{9F6A}\x{9F6C}\x{9F72}\x{9F76}\x{9F77}\x{9F8D}' - . '\x{9F95}\x{9F9C}\x{9F9D}\x{9FA0}]{1,15}$/iu', - 12 => '/^[\x{002d}0-9a-z\x{3447}\x{3473}\x{359E}\x{360E}\x{361A}\x{3918}\x{396E}\x{39CF}\x{39D0}' - . '\x{39DF}\x{3A73}\x{3B4E}\x{3C6E}\x{3CE0}\x{4056}\x{415F}\x{4337}\x{43AC}' - . '\x{43B1}\x{43DD}\x{44D6}\x{464C}\x{4661}\x{4723}\x{4729}\x{477C}\x{478D}' - . '\x{4947}\x{497A}\x{497D}\x{4982}\x{4983}\x{4985}\x{4986}\x{499B}\x{499F}' - . '\x{49B6}\x{49B7}\x{4C77}\x{4C9F}\x{4CA0}\x{4CA1}\x{4CA2}\x{4CA3}\x{4D13}' - . '\x{4D14}\x{4D15}\x{4D16}\x{4D17}\x{4D18}\x{4D19}\x{4DAE}\x{4E00}\x{4E01}' - . '\x{4E02}\x{4E03}\x{4E04}\x{4E05}\x{4E06}\x{4E07}\x{4E08}\x{4E09}\x{4E0A}' - . '\x{4E0B}\x{4E0C}\x{4E0D}\x{4E0E}\x{4E0F}\x{4E10}\x{4E11}\x{4E13}\x{4E14}' - . '\x{4E15}\x{4E16}\x{4E17}\x{4E18}\x{4E19}\x{4E1A}\x{4E1B}\x{4E1C}\x{4E1D}' - . '\x{4E1E}\x{4E1F}\x{4E20}\x{4E21}\x{4E22}\x{4E23}\x{4E24}\x{4E25}\x{4E26}' - . '\x{4E27}\x{4E28}\x{4E2A}\x{4E2B}\x{4E2C}\x{4E2D}\x{4E2E}\x{4E2F}\x{4E30}' - . '\x{4E31}\x{4E32}\x{4E33}\x{4E34}\x{4E35}\x{4E36}\x{4E37}\x{4E38}\x{4E39}' - . '\x{4E3A}\x{4E3B}\x{4E3C}\x{4E3D}\x{4E3E}\x{4E3F}\x{4E40}\x{4E41}\x{4E42}' - . '\x{4E43}\x{4E44}\x{4E45}\x{4E46}\x{4E47}\x{4E48}\x{4E49}\x{4E4A}\x{4E4B}' - . '\x{4E4C}\x{4E4D}\x{4E4E}\x{4E4F}\x{4E50}\x{4E51}\x{4E52}\x{4E53}\x{4E54}' - . '\x{4E56}\x{4E57}\x{4E58}\x{4E59}\x{4E5A}\x{4E5B}\x{4E5C}\x{4E5D}\x{4E5E}' - . '\x{4E5F}\x{4E60}\x{4E61}\x{4E62}\x{4E63}\x{4E64}\x{4E65}\x{4E66}\x{4E67}' - . '\x{4E69}\x{4E6A}\x{4E6B}\x{4E6C}\x{4E6D}\x{4E6E}\x{4E6F}\x{4E70}\x{4E71}' - . '\x{4E72}\x{4E73}\x{4E74}\x{4E75}\x{4E76}\x{4E77}\x{4E78}\x{4E7A}\x{4E7B}' - . '\x{4E7C}\x{4E7D}\x{4E7E}\x{4E7F}\x{4E80}\x{4E81}\x{4E82}\x{4E83}\x{4E84}' - . '\x{4E85}\x{4E86}\x{4E87}\x{4E88}\x{4E89}\x{4E8B}\x{4E8C}\x{4E8D}\x{4E8E}' - . '\x{4E8F}\x{4E90}\x{4E91}\x{4E92}\x{4E93}\x{4E94}\x{4E95}\x{4E97}\x{4E98}' - . '\x{4E99}\x{4E9A}\x{4E9B}\x{4E9C}\x{4E9D}\x{4E9E}\x{4E9F}\x{4EA0}\x{4EA1}' - . '\x{4EA2}\x{4EA4}\x{4EA5}\x{4EA6}\x{4EA7}\x{4EA8}\x{4EA9}\x{4EAA}\x{4EAB}' - . '\x{4EAC}\x{4EAD}\x{4EAE}\x{4EAF}\x{4EB0}\x{4EB1}\x{4EB2}\x{4EB3}\x{4EB4}' - . '\x{4EB5}\x{4EB6}\x{4EB7}\x{4EB8}\x{4EB9}\x{4EBA}\x{4EBB}\x{4EBD}\x{4EBE}' - . '\x{4EBF}\x{4EC0}\x{4EC1}\x{4EC2}\x{4EC3}\x{4EC4}\x{4EC5}\x{4EC6}\x{4EC7}' - . '\x{4EC8}\x{4EC9}\x{4ECA}\x{4ECB}\x{4ECD}\x{4ECE}\x{4ECF}\x{4ED0}\x{4ED1}' - . '\x{4ED2}\x{4ED3}\x{4ED4}\x{4ED5}\x{4ED6}\x{4ED7}\x{4ED8}\x{4ED9}\x{4EDA}' - . '\x{4EDB}\x{4EDC}\x{4EDD}\x{4EDE}\x{4EDF}\x{4EE0}\x{4EE1}\x{4EE2}\x{4EE3}' - . '\x{4EE4}\x{4EE5}\x{4EE6}\x{4EE8}\x{4EE9}\x{4EEA}\x{4EEB}\x{4EEC}\x{4EEF}' - . '\x{4EF0}\x{4EF1}\x{4EF2}\x{4EF3}\x{4EF4}\x{4EF5}\x{4EF6}\x{4EF7}\x{4EFB}' - . '\x{4EFD}\x{4EFF}\x{4F00}\x{4F01}\x{4F02}\x{4F03}\x{4F04}\x{4F05}\x{4F06}' - . '\x{4F08}\x{4F09}\x{4F0A}\x{4F0B}\x{4F0C}\x{4F0D}\x{4F0E}\x{4F0F}\x{4F10}' - . '\x{4F11}\x{4F12}\x{4F13}\x{4F14}\x{4F15}\x{4F17}\x{4F18}\x{4F19}\x{4F1A}' - . '\x{4F1B}\x{4F1C}\x{4F1D}\x{4F1E}\x{4F1F}\x{4F20}\x{4F21}\x{4F22}\x{4F23}' - . '\x{4F24}\x{4F25}\x{4F26}\x{4F27}\x{4F29}\x{4F2A}\x{4F2B}\x{4F2C}\x{4F2D}' - . '\x{4F2E}\x{4F2F}\x{4F30}\x{4F32}\x{4F33}\x{4F34}\x{4F36}\x{4F38}\x{4F39}' - . '\x{4F3A}\x{4F3B}\x{4F3C}\x{4F3D}\x{4F3E}\x{4F3F}\x{4F41}\x{4F42}\x{4F43}' - . '\x{4F45}\x{4F46}\x{4F47}\x{4F48}\x{4F49}\x{4F4A}\x{4F4B}\x{4F4C}\x{4F4D}' - . '\x{4F4E}\x{4F4F}\x{4F50}\x{4F51}\x{4F52}\x{4F53}\x{4F54}\x{4F55}\x{4F56}' - . '\x{4F57}\x{4F58}\x{4F59}\x{4F5A}\x{4F5B}\x{4F5C}\x{4F5D}\x{4F5E}\x{4F5F}' - . '\x{4F60}\x{4F61}\x{4F62}\x{4F63}\x{4F64}\x{4F65}\x{4F66}\x{4F67}\x{4F68}' - . '\x{4F69}\x{4F6A}\x{4F6B}\x{4F6C}\x{4F6D}\x{4F6E}\x{4F6F}\x{4F70}\x{4F72}' - . '\x{4F73}\x{4F74}\x{4F75}\x{4F76}\x{4F77}\x{4F78}\x{4F79}\x{4F7A}\x{4F7B}' - . '\x{4F7C}\x{4F7D}\x{4F7E}\x{4F7F}\x{4F80}\x{4F81}\x{4F82}\x{4F83}\x{4F84}' - . '\x{4F85}\x{4F86}\x{4F87}\x{4F88}\x{4F89}\x{4F8A}\x{4F8B}\x{4F8D}\x{4F8F}' - . '\x{4F90}\x{4F91}\x{4F92}\x{4F93}\x{4F94}\x{4F95}\x{4F96}\x{4F97}\x{4F98}' - . '\x{4F99}\x{4F9A}\x{4F9B}\x{4F9C}\x{4F9D}\x{4F9E}\x{4F9F}\x{4FA0}\x{4FA1}' - . '\x{4FA3}\x{4FA4}\x{4FA5}\x{4FA6}\x{4FA7}\x{4FA8}\x{4FA9}\x{4FAA}\x{4FAB}' - . '\x{4FAC}\x{4FAE}\x{4FAF}\x{4FB0}\x{4FB1}\x{4FB2}\x{4FB3}\x{4FB4}\x{4FB5}' - . '\x{4FB6}\x{4FB7}\x{4FB8}\x{4FB9}\x{4FBA}\x{4FBB}\x{4FBC}\x{4FBE}\x{4FBF}' - . '\x{4FC0}\x{4FC1}\x{4FC2}\x{4FC3}\x{4FC4}\x{4FC5}\x{4FC7}\x{4FC9}\x{4FCA}' - . '\x{4FCB}\x{4FCD}\x{4FCE}\x{4FCF}\x{4FD0}\x{4FD1}\x{4FD2}\x{4FD3}\x{4FD4}' - . '\x{4FD5}\x{4FD6}\x{4FD7}\x{4FD8}\x{4FD9}\x{4FDA}\x{4FDB}\x{4FDC}\x{4FDD}' - . '\x{4FDE}\x{4FDF}\x{4FE0}\x{4FE1}\x{4FE3}\x{4FE4}\x{4FE5}\x{4FE6}\x{4FE7}' - . '\x{4FE8}\x{4FE9}\x{4FEA}\x{4FEB}\x{4FEC}\x{4FED}\x{4FEE}\x{4FEF}\x{4FF0}' - . '\x{4FF1}\x{4FF2}\x{4FF3}\x{4FF4}\x{4FF5}\x{4FF6}\x{4FF7}\x{4FF8}\x{4FF9}' - . '\x{4FFA}\x{4FFB}\x{4FFE}\x{4FFF}\x{5000}\x{5001}\x{5002}\x{5003}\x{5004}' - . '\x{5005}\x{5006}\x{5007}\x{5008}\x{5009}\x{500A}\x{500B}\x{500C}\x{500D}' - . '\x{500E}\x{500F}\x{5011}\x{5012}\x{5013}\x{5014}\x{5015}\x{5016}\x{5017}' - . '\x{5018}\x{5019}\x{501A}\x{501B}\x{501C}\x{501D}\x{501E}\x{501F}\x{5020}' - . '\x{5021}\x{5022}\x{5023}\x{5024}\x{5025}\x{5026}\x{5027}\x{5028}\x{5029}' - . '\x{502A}\x{502B}\x{502C}\x{502D}\x{502E}\x{502F}\x{5030}\x{5031}\x{5032}' - . '\x{5033}\x{5035}\x{5036}\x{5037}\x{5039}\x{503A}\x{503B}\x{503C}\x{503E}' - . '\x{503F}\x{5040}\x{5041}\x{5043}\x{5044}\x{5045}\x{5046}\x{5047}\x{5048}' - . '\x{5049}\x{504A}\x{504B}\x{504C}\x{504D}\x{504E}\x{504F}\x{5051}\x{5053}' - . '\x{5054}\x{5055}\x{5056}\x{5057}\x{5059}\x{505A}\x{505B}\x{505C}\x{505D}' - . '\x{505E}\x{505F}\x{5060}\x{5061}\x{5062}\x{5063}\x{5064}\x{5065}\x{5066}' - . '\x{5067}\x{5068}\x{5069}\x{506A}\x{506B}\x{506C}\x{506D}\x{506E}\x{506F}' - . '\x{5070}\x{5071}\x{5072}\x{5073}\x{5074}\x{5075}\x{5076}\x{5077}\x{5078}' - . '\x{5079}\x{507A}\x{507B}\x{507D}\x{507E}\x{507F}\x{5080}\x{5082}\x{5083}' - . '\x{5084}\x{5085}\x{5086}\x{5087}\x{5088}\x{5089}\x{508A}\x{508B}\x{508C}' - . '\x{508D}\x{508E}\x{508F}\x{5090}\x{5091}\x{5092}\x{5094}\x{5095}\x{5096}' - . '\x{5098}\x{5099}\x{509A}\x{509B}\x{509C}\x{509D}\x{509E}\x{50A2}\x{50A3}' - . '\x{50A4}\x{50A5}\x{50A6}\x{50A7}\x{50A8}\x{50A9}\x{50AA}\x{50AB}\x{50AC}' - . '\x{50AD}\x{50AE}\x{50AF}\x{50B0}\x{50B1}\x{50B2}\x{50B3}\x{50B4}\x{50B5}' - . '\x{50B6}\x{50B7}\x{50B8}\x{50BA}\x{50BB}\x{50BC}\x{50BD}\x{50BE}\x{50BF}' - . '\x{50C0}\x{50C1}\x{50C2}\x{50C4}\x{50C5}\x{50C6}\x{50C7}\x{50C8}\x{50C9}' - . '\x{50CA}\x{50CB}\x{50CC}\x{50CD}\x{50CE}\x{50CF}\x{50D0}\x{50D1}\x{50D2}' - . '\x{50D3}\x{50D4}\x{50D5}\x{50D6}\x{50D7}\x{50D9}\x{50DA}\x{50DB}\x{50DC}' - . '\x{50DD}\x{50DE}\x{50E0}\x{50E3}\x{50E4}\x{50E5}\x{50E6}\x{50E7}\x{50E8}' - . '\x{50E9}\x{50EA}\x{50EC}\x{50ED}\x{50EE}\x{50EF}\x{50F0}\x{50F1}\x{50F2}' - . '\x{50F3}\x{50F5}\x{50F6}\x{50F8}\x{50F9}\x{50FA}\x{50FB}\x{50FC}\x{50FD}' - . '\x{50FE}\x{50FF}\x{5100}\x{5101}\x{5102}\x{5103}\x{5104}\x{5105}\x{5106}' - . '\x{5107}\x{5108}\x{5109}\x{510A}\x{510B}\x{510C}\x{510D}\x{510E}\x{510F}' - . '\x{5110}\x{5111}\x{5112}\x{5113}\x{5114}\x{5115}\x{5116}\x{5117}\x{5118}' - . '\x{5119}\x{511A}\x{511C}\x{511D}\x{511E}\x{511F}\x{5120}\x{5121}\x{5122}' - . '\x{5123}\x{5124}\x{5125}\x{5126}\x{5127}\x{5129}\x{512A}\x{512C}\x{512D}' - . '\x{512E}\x{512F}\x{5130}\x{5131}\x{5132}\x{5133}\x{5134}\x{5135}\x{5136}' - . '\x{5137}\x{5138}\x{5139}\x{513A}\x{513B}\x{513C}\x{513D}\x{513E}\x{513F}' - . '\x{5140}\x{5141}\x{5143}\x{5144}\x{5145}\x{5146}\x{5147}\x{5148}\x{5149}' - . '\x{514B}\x{514C}\x{514D}\x{514E}\x{5150}\x{5151}\x{5152}\x{5154}\x{5155}' - . '\x{5156}\x{5157}\x{5159}\x{515A}\x{515B}\x{515C}\x{515D}\x{515E}\x{515F}' - . '\x{5161}\x{5162}\x{5163}\x{5165}\x{5166}\x{5167}\x{5168}\x{5169}\x{516A}' - . '\x{516B}\x{516C}\x{516D}\x{516E}\x{516F}\x{5170}\x{5171}\x{5173}\x{5174}' - . '\x{5175}\x{5176}\x{5177}\x{5178}\x{5179}\x{517A}\x{517B}\x{517C}\x{517D}' - . '\x{517F}\x{5180}\x{5181}\x{5182}\x{5185}\x{5186}\x{5187}\x{5188}\x{5189}' - . '\x{518A}\x{518B}\x{518C}\x{518D}\x{518F}\x{5190}\x{5191}\x{5192}\x{5193}' - . '\x{5194}\x{5195}\x{5196}\x{5197}\x{5198}\x{5199}\x{519A}\x{519B}\x{519C}' - . '\x{519D}\x{519E}\x{519F}\x{51A0}\x{51A2}\x{51A4}\x{51A5}\x{51A6}\x{51A7}' - . '\x{51A8}\x{51AA}\x{51AB}\x{51AC}\x{51AE}\x{51AF}\x{51B0}\x{51B1}\x{51B2}' - . '\x{51B3}\x{51B5}\x{51B6}\x{51B7}\x{51B9}\x{51BB}\x{51BC}\x{51BD}\x{51BE}' - . '\x{51BF}\x{51C0}\x{51C1}\x{51C3}\x{51C4}\x{51C5}\x{51C6}\x{51C7}\x{51C8}' - . '\x{51C9}\x{51CA}\x{51CB}\x{51CC}\x{51CD}\x{51CE}\x{51CF}\x{51D0}\x{51D1}' - . '\x{51D4}\x{51D5}\x{51D6}\x{51D7}\x{51D8}\x{51D9}\x{51DA}\x{51DB}\x{51DC}' - . '\x{51DD}\x{51DE}\x{51E0}\x{51E1}\x{51E2}\x{51E3}\x{51E4}\x{51E5}\x{51E7}' - . '\x{51E8}\x{51E9}\x{51EA}\x{51EB}\x{51ED}\x{51EF}\x{51F0}\x{51F1}\x{51F3}' - . '\x{51F4}\x{51F5}\x{51F6}\x{51F7}\x{51F8}\x{51F9}\x{51FA}\x{51FB}\x{51FC}' - . '\x{51FD}\x{51FE}\x{51FF}\x{5200}\x{5201}\x{5202}\x{5203}\x{5204}\x{5205}' - . '\x{5206}\x{5207}\x{5208}\x{5209}\x{520A}\x{520B}\x{520C}\x{520D}\x{520E}' - . '\x{520F}\x{5210}\x{5211}\x{5212}\x{5213}\x{5214}\x{5215}\x{5216}\x{5217}' - . '\x{5218}\x{5219}\x{521A}\x{521B}\x{521C}\x{521D}\x{521E}\x{521F}\x{5220}' - . '\x{5221}\x{5222}\x{5223}\x{5224}\x{5225}\x{5226}\x{5228}\x{5229}\x{522A}' - . '\x{522B}\x{522C}\x{522D}\x{522E}\x{522F}\x{5230}\x{5231}\x{5232}\x{5233}' - . '\x{5234}\x{5235}\x{5236}\x{5237}\x{5238}\x{5239}\x{523A}\x{523B}\x{523C}' - . '\x{523D}\x{523E}\x{523F}\x{5240}\x{5241}\x{5242}\x{5243}\x{5244}\x{5245}' - . '\x{5246}\x{5247}\x{5248}\x{5249}\x{524A}\x{524B}\x{524C}\x{524D}\x{524E}' - . '\x{5250}\x{5251}\x{5252}\x{5254}\x{5255}\x{5256}\x{5257}\x{5258}\x{5259}' - . '\x{525A}\x{525B}\x{525C}\x{525D}\x{525E}\x{525F}\x{5260}\x{5261}\x{5262}' - . '\x{5263}\x{5264}\x{5265}\x{5267}\x{5268}\x{5269}\x{526A}\x{526B}\x{526C}' - . '\x{526D}\x{526E}\x{526F}\x{5270}\x{5272}\x{5273}\x{5274}\x{5275}\x{5276}' - . '\x{5277}\x{5278}\x{527A}\x{527B}\x{527C}\x{527D}\x{527E}\x{527F}\x{5280}' - . '\x{5281}\x{5282}\x{5283}\x{5284}\x{5286}\x{5287}\x{5288}\x{5289}\x{528A}' - . '\x{528B}\x{528C}\x{528D}\x{528F}\x{5290}\x{5291}\x{5292}\x{5293}\x{5294}' - . '\x{5295}\x{5296}\x{5297}\x{5298}\x{5299}\x{529A}\x{529B}\x{529C}\x{529D}' - . '\x{529E}\x{529F}\x{52A0}\x{52A1}\x{52A2}\x{52A3}\x{52A5}\x{52A6}\x{52A7}' - . '\x{52A8}\x{52A9}\x{52AA}\x{52AB}\x{52AC}\x{52AD}\x{52AE}\x{52AF}\x{52B0}' - . '\x{52B1}\x{52B2}\x{52B3}\x{52B4}\x{52B5}\x{52B6}\x{52B7}\x{52B8}\x{52B9}' - . '\x{52BA}\x{52BB}\x{52BC}\x{52BD}\x{52BE}\x{52BF}\x{52C0}\x{52C1}\x{52C2}' - . '\x{52C3}\x{52C6}\x{52C7}\x{52C9}\x{52CA}\x{52CB}\x{52CD}\x{52CF}\x{52D0}' - . '\x{52D2}\x{52D3}\x{52D5}\x{52D6}\x{52D7}\x{52D8}\x{52D9}\x{52DA}\x{52DB}' - . '\x{52DC}\x{52DD}\x{52DE}\x{52DF}\x{52E0}\x{52E2}\x{52E3}\x{52E4}\x{52E6}' - . '\x{52E7}\x{52E8}\x{52E9}\x{52EA}\x{52EB}\x{52EC}\x{52ED}\x{52EF}\x{52F0}' - . '\x{52F1}\x{52F2}\x{52F3}\x{52F4}\x{52F5}\x{52F6}\x{52F7}\x{52F8}\x{52F9}' - . '\x{52FA}\x{52FB}\x{52FC}\x{52FD}\x{52FE}\x{52FF}\x{5300}\x{5301}\x{5302}' - . '\x{5305}\x{5306}\x{5307}\x{5308}\x{5309}\x{530A}\x{530B}\x{530C}\x{530D}' - . '\x{530E}\x{530F}\x{5310}\x{5311}\x{5312}\x{5313}\x{5314}\x{5315}\x{5316}' - . '\x{5317}\x{5319}\x{531A}\x{531C}\x{531D}\x{531F}\x{5320}\x{5321}\x{5322}' - . '\x{5323}\x{5324}\x{5325}\x{5326}\x{5328}\x{532A}\x{532B}\x{532C}\x{532D}' - . '\x{532E}\x{532F}\x{5330}\x{5331}\x{5333}\x{5334}\x{5337}\x{5339}\x{533A}' - . '\x{533B}\x{533C}\x{533D}\x{533E}\x{533F}\x{5340}\x{5341}\x{5343}\x{5344}' - . '\x{5345}\x{5346}\x{5347}\x{5348}\x{5349}\x{534A}\x{534B}\x{534C}\x{534D}' - . '\x{534E}\x{534F}\x{5350}\x{5351}\x{5352}\x{5353}\x{5354}\x{5355}\x{5356}' - . '\x{5357}\x{5358}\x{5359}\x{535A}\x{535C}\x{535E}\x{535F}\x{5360}\x{5361}' - . '\x{5362}\x{5363}\x{5364}\x{5365}\x{5366}\x{5367}\x{5369}\x{536B}\x{536C}' - . '\x{536E}\x{536F}\x{5370}\x{5371}\x{5372}\x{5373}\x{5374}\x{5375}\x{5376}' - . '\x{5377}\x{5378}\x{5379}\x{537A}\x{537B}\x{537C}\x{537D}\x{537E}\x{537F}' - . '\x{5381}\x{5382}\x{5383}\x{5384}\x{5385}\x{5386}\x{5387}\x{5388}\x{5389}' - . '\x{538A}\x{538B}\x{538C}\x{538D}\x{538E}\x{538F}\x{5390}\x{5391}\x{5392}' - . '\x{5393}\x{5394}\x{5395}\x{5396}\x{5397}\x{5398}\x{5399}\x{539A}\x{539B}' - . '\x{539C}\x{539D}\x{539E}\x{539F}\x{53A0}\x{53A2}\x{53A3}\x{53A4}\x{53A5}' - . '\x{53A6}\x{53A7}\x{53A8}\x{53A9}\x{53AC}\x{53AD}\x{53AE}\x{53B0}\x{53B1}' - . '\x{53B2}\x{53B3}\x{53B4}\x{53B5}\x{53B6}\x{53B7}\x{53B8}\x{53B9}\x{53BB}' - . '\x{53BC}\x{53BD}\x{53BE}\x{53BF}\x{53C0}\x{53C1}\x{53C2}\x{53C3}\x{53C4}' - . '\x{53C6}\x{53C7}\x{53C8}\x{53C9}\x{53CA}\x{53CB}\x{53CC}\x{53CD}\x{53CE}' - . '\x{53D0}\x{53D1}\x{53D2}\x{53D3}\x{53D4}\x{53D5}\x{53D6}\x{53D7}\x{53D8}' - . '\x{53D9}\x{53DB}\x{53DC}\x{53DF}\x{53E0}\x{53E1}\x{53E2}\x{53E3}\x{53E4}' - . '\x{53E5}\x{53E6}\x{53E8}\x{53E9}\x{53EA}\x{53EB}\x{53EC}\x{53ED}\x{53EE}' - . '\x{53EF}\x{53F0}\x{53F1}\x{53F2}\x{53F3}\x{53F4}\x{53F5}\x{53F6}\x{53F7}' - . '\x{53F8}\x{53F9}\x{53FA}\x{53FB}\x{53FC}\x{53FD}\x{53FE}\x{5401}\x{5402}' - . '\x{5403}\x{5404}\x{5405}\x{5406}\x{5407}\x{5408}\x{5409}\x{540A}\x{540B}' - . '\x{540C}\x{540D}\x{540E}\x{540F}\x{5410}\x{5411}\x{5412}\x{5413}\x{5414}' - . '\x{5415}\x{5416}\x{5417}\x{5418}\x{5419}\x{541B}\x{541C}\x{541D}\x{541E}' - . '\x{541F}\x{5420}\x{5421}\x{5423}\x{5424}\x{5425}\x{5426}\x{5427}\x{5428}' - . '\x{5429}\x{542A}\x{542B}\x{542C}\x{542D}\x{542E}\x{542F}\x{5430}\x{5431}' - . '\x{5432}\x{5433}\x{5434}\x{5435}\x{5436}\x{5437}\x{5438}\x{5439}\x{543A}' - . '\x{543B}\x{543C}\x{543D}\x{543E}\x{543F}\x{5440}\x{5441}\x{5442}\x{5443}' - . '\x{5444}\x{5445}\x{5446}\x{5447}\x{5448}\x{5449}\x{544A}\x{544B}\x{544D}' - . '\x{544E}\x{544F}\x{5450}\x{5451}\x{5452}\x{5453}\x{5454}\x{5455}\x{5456}' - . '\x{5457}\x{5458}\x{5459}\x{545A}\x{545B}\x{545C}\x{545E}\x{545F}\x{5460}' - . '\x{5461}\x{5462}\x{5463}\x{5464}\x{5465}\x{5466}\x{5467}\x{5468}\x{546A}' - . '\x{546B}\x{546C}\x{546D}\x{546E}\x{546F}\x{5470}\x{5471}\x{5472}\x{5473}' - . '\x{5474}\x{5475}\x{5476}\x{5477}\x{5478}\x{5479}\x{547A}\x{547B}\x{547C}' - . '\x{547D}\x{547E}\x{547F}\x{5480}\x{5481}\x{5482}\x{5483}\x{5484}\x{5485}' - . '\x{5486}\x{5487}\x{5488}\x{5489}\x{548B}\x{548C}\x{548D}\x{548E}\x{548F}' - . '\x{5490}\x{5491}\x{5492}\x{5493}\x{5494}\x{5495}\x{5496}\x{5497}\x{5498}' - . '\x{5499}\x{549A}\x{549B}\x{549C}\x{549D}\x{549E}\x{549F}\x{54A0}\x{54A1}' - . '\x{54A2}\x{54A3}\x{54A4}\x{54A5}\x{54A6}\x{54A7}\x{54A8}\x{54A9}\x{54AA}' - . '\x{54AB}\x{54AC}\x{54AD}\x{54AE}\x{54AF}\x{54B0}\x{54B1}\x{54B2}\x{54B3}' - . '\x{54B4}\x{54B6}\x{54B7}\x{54B8}\x{54B9}\x{54BA}\x{54BB}\x{54BC}\x{54BD}' - . '\x{54BE}\x{54BF}\x{54C0}\x{54C1}\x{54C2}\x{54C3}\x{54C4}\x{54C5}\x{54C6}' - . '\x{54C7}\x{54C8}\x{54C9}\x{54CA}\x{54CB}\x{54CC}\x{54CD}\x{54CE}\x{54CF}' - . '\x{54D0}\x{54D1}\x{54D2}\x{54D3}\x{54D4}\x{54D5}\x{54D6}\x{54D7}\x{54D8}' - . '\x{54D9}\x{54DA}\x{54DB}\x{54DC}\x{54DD}\x{54DE}\x{54DF}\x{54E0}\x{54E1}' - . '\x{54E2}\x{54E3}\x{54E4}\x{54E5}\x{54E6}\x{54E7}\x{54E8}\x{54E9}\x{54EA}' - . '\x{54EB}\x{54EC}\x{54ED}\x{54EE}\x{54EF}\x{54F0}\x{54F1}\x{54F2}\x{54F3}' - . '\x{54F4}\x{54F5}\x{54F7}\x{54F8}\x{54F9}\x{54FA}\x{54FB}\x{54FC}\x{54FD}' - . '\x{54FE}\x{54FF}\x{5500}\x{5501}\x{5502}\x{5503}\x{5504}\x{5505}\x{5506}' - . '\x{5507}\x{5508}\x{5509}\x{550A}\x{550B}\x{550C}\x{550D}\x{550E}\x{550F}' - . '\x{5510}\x{5511}\x{5512}\x{5513}\x{5514}\x{5516}\x{5517}\x{551A}\x{551B}' - . '\x{551C}\x{551D}\x{551E}\x{551F}\x{5520}\x{5521}\x{5522}\x{5523}\x{5524}' - . '\x{5525}\x{5526}\x{5527}\x{5528}\x{5529}\x{552A}\x{552B}\x{552C}\x{552D}' - . '\x{552E}\x{552F}\x{5530}\x{5531}\x{5532}\x{5533}\x{5534}\x{5535}\x{5536}' - . '\x{5537}\x{5538}\x{5539}\x{553A}\x{553B}\x{553C}\x{553D}\x{553E}\x{553F}' - . '\x{5540}\x{5541}\x{5542}\x{5543}\x{5544}\x{5545}\x{5546}\x{5548}\x{5549}' - . '\x{554A}\x{554B}\x{554C}\x{554D}\x{554E}\x{554F}\x{5550}\x{5551}\x{5552}' - . '\x{5553}\x{5554}\x{5555}\x{5556}\x{5557}\x{5558}\x{5559}\x{555A}\x{555B}' - . '\x{555C}\x{555D}\x{555E}\x{555F}\x{5561}\x{5562}\x{5563}\x{5564}\x{5565}' - . '\x{5566}\x{5567}\x{5568}\x{5569}\x{556A}\x{556B}\x{556C}\x{556D}\x{556E}' - . '\x{556F}\x{5570}\x{5571}\x{5572}\x{5573}\x{5574}\x{5575}\x{5576}\x{5577}' - . '\x{5578}\x{5579}\x{557B}\x{557C}\x{557D}\x{557E}\x{557F}\x{5580}\x{5581}' - . '\x{5582}\x{5583}\x{5584}\x{5585}\x{5586}\x{5587}\x{5588}\x{5589}\x{558A}' - . '\x{558B}\x{558C}\x{558D}\x{558E}\x{558F}\x{5590}\x{5591}\x{5592}\x{5593}' - . '\x{5594}\x{5595}\x{5596}\x{5597}\x{5598}\x{5599}\x{559A}\x{559B}\x{559C}' - . '\x{559D}\x{559E}\x{559F}\x{55A0}\x{55A1}\x{55A2}\x{55A3}\x{55A4}\x{55A5}' - . '\x{55A6}\x{55A7}\x{55A8}\x{55A9}\x{55AA}\x{55AB}\x{55AC}\x{55AD}\x{55AE}' - . '\x{55AF}\x{55B0}\x{55B1}\x{55B2}\x{55B3}\x{55B4}\x{55B5}\x{55B6}\x{55B7}' - . '\x{55B8}\x{55B9}\x{55BA}\x{55BB}\x{55BC}\x{55BD}\x{55BE}\x{55BF}\x{55C0}' - . '\x{55C1}\x{55C2}\x{55C3}\x{55C4}\x{55C5}\x{55C6}\x{55C7}\x{55C8}\x{55C9}' - . '\x{55CA}\x{55CB}\x{55CC}\x{55CD}\x{55CE}\x{55CF}\x{55D0}\x{55D1}\x{55D2}' - . '\x{55D3}\x{55D4}\x{55D5}\x{55D6}\x{55D7}\x{55D8}\x{55D9}\x{55DA}\x{55DB}' - . '\x{55DC}\x{55DD}\x{55DE}\x{55DF}\x{55E1}\x{55E2}\x{55E3}\x{55E4}\x{55E5}' - . '\x{55E6}\x{55E7}\x{55E8}\x{55E9}\x{55EA}\x{55EB}\x{55EC}\x{55ED}\x{55EE}' - . '\x{55EF}\x{55F0}\x{55F1}\x{55F2}\x{55F3}\x{55F4}\x{55F5}\x{55F6}\x{55F7}' - . '\x{55F9}\x{55FA}\x{55FB}\x{55FC}\x{55FD}\x{55FE}\x{55FF}\x{5600}\x{5601}' - . '\x{5602}\x{5603}\x{5604}\x{5606}\x{5607}\x{5608}\x{5609}\x{560C}\x{560D}' - . '\x{560E}\x{560F}\x{5610}\x{5611}\x{5612}\x{5613}\x{5614}\x{5615}\x{5616}' - . '\x{5617}\x{5618}\x{5619}\x{561A}\x{561B}\x{561C}\x{561D}\x{561E}\x{561F}' - . '\x{5621}\x{5622}\x{5623}\x{5624}\x{5625}\x{5626}\x{5627}\x{5628}\x{5629}' - . '\x{562A}\x{562C}\x{562D}\x{562E}\x{562F}\x{5630}\x{5631}\x{5632}\x{5633}' - . '\x{5634}\x{5635}\x{5636}\x{5638}\x{5639}\x{563A}\x{563B}\x{563D}\x{563E}' - . '\x{563F}\x{5640}\x{5641}\x{5642}\x{5643}\x{5645}\x{5646}\x{5647}\x{5648}' - . '\x{5649}\x{564A}\x{564C}\x{564D}\x{564E}\x{564F}\x{5650}\x{5652}\x{5653}' - . '\x{5654}\x{5655}\x{5657}\x{5658}\x{5659}\x{565A}\x{565B}\x{565C}\x{565D}' - . '\x{565E}\x{5660}\x{5662}\x{5663}\x{5664}\x{5665}\x{5666}\x{5667}\x{5668}' - . '\x{5669}\x{566A}\x{566B}\x{566C}\x{566D}\x{566E}\x{566F}\x{5670}\x{5671}' - . '\x{5672}\x{5673}\x{5674}\x{5676}\x{5677}\x{5678}\x{5679}\x{567A}\x{567B}' - . '\x{567C}\x{567E}\x{567F}\x{5680}\x{5681}\x{5682}\x{5683}\x{5684}\x{5685}' - . '\x{5686}\x{5687}\x{568A}\x{568C}\x{568D}\x{568E}\x{568F}\x{5690}\x{5691}' - . '\x{5692}\x{5693}\x{5694}\x{5695}\x{5697}\x{5698}\x{5699}\x{569A}\x{569B}' - . '\x{569C}\x{569D}\x{569F}\x{56A0}\x{56A1}\x{56A3}\x{56A4}\x{56A5}\x{56A6}' - . '\x{56A7}\x{56A8}\x{56A9}\x{56AA}\x{56AB}\x{56AC}\x{56AD}\x{56AE}\x{56AF}' - . '\x{56B0}\x{56B1}\x{56B2}\x{56B3}\x{56B4}\x{56B5}\x{56B6}\x{56B7}\x{56B8}' - . '\x{56B9}\x{56BB}\x{56BC}\x{56BD}\x{56BE}\x{56BF}\x{56C0}\x{56C1}\x{56C2}' - . '\x{56C3}\x{56C4}\x{56C5}\x{56C6}\x{56C7}\x{56C8}\x{56C9}\x{56CA}\x{56CB}' - . '\x{56CC}\x{56CD}\x{56CE}\x{56D0}\x{56D1}\x{56D2}\x{56D3}\x{56D4}\x{56D5}' - . '\x{56D6}\x{56D7}\x{56D8}\x{56DA}\x{56DB}\x{56DC}\x{56DD}\x{56DE}\x{56DF}' - . '\x{56E0}\x{56E1}\x{56E2}\x{56E3}\x{56E4}\x{56E5}\x{56E7}\x{56E8}\x{56E9}' - . '\x{56EA}\x{56EB}\x{56EC}\x{56ED}\x{56EE}\x{56EF}\x{56F0}\x{56F1}\x{56F2}' - . '\x{56F3}\x{56F4}\x{56F5}\x{56F7}\x{56F9}\x{56FA}\x{56FD}\x{56FE}\x{56FF}' - . '\x{5700}\x{5701}\x{5702}\x{5703}\x{5704}\x{5706}\x{5707}\x{5708}\x{5709}' - . '\x{570A}\x{570B}\x{570C}\x{570D}\x{570E}\x{570F}\x{5710}\x{5712}\x{5713}' - . '\x{5714}\x{5715}\x{5716}\x{5718}\x{5719}\x{571A}\x{571B}\x{571C}\x{571D}' - . '\x{571E}\x{571F}\x{5720}\x{5722}\x{5723}\x{5725}\x{5726}\x{5727}\x{5728}' - . '\x{5729}\x{572A}\x{572B}\x{572C}\x{572D}\x{572E}\x{572F}\x{5730}\x{5731}' - . '\x{5732}\x{5733}\x{5734}\x{5735}\x{5736}\x{5737}\x{5738}\x{5739}\x{573A}' - . '\x{573B}\x{573C}\x{573E}\x{573F}\x{5740}\x{5741}\x{5742}\x{5744}\x{5745}' - . '\x{5746}\x{5747}\x{5749}\x{574A}\x{574B}\x{574C}\x{574D}\x{574E}\x{574F}' - . '\x{5750}\x{5751}\x{5752}\x{5753}\x{5754}\x{5757}\x{5759}\x{575A}\x{575B}' - . '\x{575C}\x{575D}\x{575E}\x{575F}\x{5760}\x{5761}\x{5762}\x{5764}\x{5765}' - . '\x{5766}\x{5767}\x{5768}\x{5769}\x{576A}\x{576B}\x{576C}\x{576D}\x{576F}' - . '\x{5770}\x{5771}\x{5772}\x{5773}\x{5774}\x{5775}\x{5776}\x{5777}\x{5779}' - . '\x{577A}\x{577B}\x{577C}\x{577D}\x{577E}\x{577F}\x{5780}\x{5782}\x{5783}' - . '\x{5784}\x{5785}\x{5786}\x{5788}\x{5789}\x{578A}\x{578B}\x{578C}\x{578D}' - . '\x{578E}\x{578F}\x{5790}\x{5791}\x{5792}\x{5793}\x{5794}\x{5795}\x{5797}' - . '\x{5798}\x{5799}\x{579A}\x{579B}\x{579C}\x{579D}\x{579E}\x{579F}\x{57A0}' - . '\x{57A1}\x{57A2}\x{57A3}\x{57A4}\x{57A5}\x{57A6}\x{57A7}\x{57A9}\x{57AA}' - . '\x{57AB}\x{57AC}\x{57AD}\x{57AE}\x{57AF}\x{57B0}\x{57B1}\x{57B2}\x{57B3}' - . '\x{57B4}\x{57B5}\x{57B6}\x{57B7}\x{57B8}\x{57B9}\x{57BA}\x{57BB}\x{57BC}' - . '\x{57BD}\x{57BE}\x{57BF}\x{57C0}\x{57C1}\x{57C2}\x{57C3}\x{57C4}\x{57C5}' - . '\x{57C6}\x{57C7}\x{57C8}\x{57C9}\x{57CB}\x{57CC}\x{57CD}\x{57CE}\x{57CF}' - . '\x{57D0}\x{57D2}\x{57D3}\x{57D4}\x{57D5}\x{57D6}\x{57D8}\x{57D9}\x{57DA}' - . '\x{57DC}\x{57DD}\x{57DF}\x{57E0}\x{57E1}\x{57E2}\x{57E3}\x{57E4}\x{57E5}' - . '\x{57E6}\x{57E7}\x{57E8}\x{57E9}\x{57EA}\x{57EB}\x{57EC}\x{57ED}\x{57EE}' - . '\x{57EF}\x{57F0}\x{57F1}\x{57F2}\x{57F3}\x{57F4}\x{57F5}\x{57F6}\x{57F7}' - . '\x{57F8}\x{57F9}\x{57FA}\x{57FB}\x{57FC}\x{57FD}\x{57FE}\x{57FF}\x{5800}' - . '\x{5801}\x{5802}\x{5803}\x{5804}\x{5805}\x{5806}\x{5807}\x{5808}\x{5809}' - . '\x{580A}\x{580B}\x{580C}\x{580D}\x{580E}\x{580F}\x{5810}\x{5811}\x{5812}' - . '\x{5813}\x{5814}\x{5815}\x{5816}\x{5819}\x{581A}\x{581B}\x{581C}\x{581D}' - . '\x{581E}\x{581F}\x{5820}\x{5821}\x{5822}\x{5823}\x{5824}\x{5825}\x{5826}' - . '\x{5827}\x{5828}\x{5829}\x{582A}\x{582B}\x{582C}\x{582D}\x{582E}\x{582F}' - . '\x{5830}\x{5831}\x{5832}\x{5833}\x{5834}\x{5835}\x{5836}\x{5837}\x{5838}' - . '\x{5839}\x{583A}\x{583B}\x{583C}\x{583D}\x{583E}\x{583F}\x{5840}\x{5842}' - . '\x{5843}\x{5844}\x{5845}\x{5846}\x{5847}\x{5848}\x{5849}\x{584A}\x{584B}' - . '\x{584C}\x{584D}\x{584E}\x{584F}\x{5851}\x{5852}\x{5853}\x{5854}\x{5855}' - . '\x{5857}\x{5858}\x{5859}\x{585A}\x{585B}\x{585C}\x{585D}\x{585E}\x{585F}' - . '\x{5861}\x{5862}\x{5863}\x{5864}\x{5865}\x{5868}\x{5869}\x{586A}\x{586B}' - . '\x{586C}\x{586D}\x{586E}\x{586F}\x{5870}\x{5871}\x{5872}\x{5873}\x{5874}' - . '\x{5875}\x{5876}\x{5878}\x{5879}\x{587A}\x{587B}\x{587C}\x{587D}\x{587E}' - . '\x{587F}\x{5880}\x{5881}\x{5882}\x{5883}\x{5884}\x{5885}\x{5886}\x{5887}' - . '\x{5888}\x{5889}\x{588A}\x{588B}\x{588C}\x{588D}\x{588E}\x{588F}\x{5890}' - . '\x{5891}\x{5892}\x{5893}\x{5894}\x{5896}\x{5897}\x{5898}\x{5899}\x{589A}' - . '\x{589B}\x{589C}\x{589D}\x{589E}\x{589F}\x{58A0}\x{58A1}\x{58A2}\x{58A3}' - . '\x{58A4}\x{58A5}\x{58A6}\x{58A7}\x{58A8}\x{58A9}\x{58AB}\x{58AC}\x{58AD}' - . '\x{58AE}\x{58AF}\x{58B0}\x{58B1}\x{58B2}\x{58B3}\x{58B4}\x{58B7}\x{58B8}' - . '\x{58B9}\x{58BA}\x{58BB}\x{58BC}\x{58BD}\x{58BE}\x{58BF}\x{58C1}\x{58C2}' - . '\x{58C5}\x{58C6}\x{58C7}\x{58C8}\x{58C9}\x{58CA}\x{58CB}\x{58CE}\x{58CF}' - . '\x{58D1}\x{58D2}\x{58D3}\x{58D4}\x{58D5}\x{58D6}\x{58D7}\x{58D8}\x{58D9}' - . '\x{58DA}\x{58DB}\x{58DD}\x{58DE}\x{58DF}\x{58E0}\x{58E2}\x{58E3}\x{58E4}' - . '\x{58E5}\x{58E7}\x{58E8}\x{58E9}\x{58EA}\x{58EB}\x{58EC}\x{58ED}\x{58EE}' - . '\x{58EF}\x{58F0}\x{58F1}\x{58F2}\x{58F3}\x{58F4}\x{58F6}\x{58F7}\x{58F8}' - . '\x{58F9}\x{58FA}\x{58FB}\x{58FC}\x{58FD}\x{58FE}\x{58FF}\x{5900}\x{5902}' - . '\x{5903}\x{5904}\x{5906}\x{5907}\x{5909}\x{590A}\x{590B}\x{590C}\x{590D}' - . '\x{590E}\x{590F}\x{5910}\x{5912}\x{5914}\x{5915}\x{5916}\x{5917}\x{5918}' - . '\x{5919}\x{591A}\x{591B}\x{591C}\x{591D}\x{591E}\x{591F}\x{5920}\x{5921}' - . '\x{5922}\x{5924}\x{5925}\x{5926}\x{5927}\x{5928}\x{5929}\x{592A}\x{592B}' - . '\x{592C}\x{592D}\x{592E}\x{592F}\x{5930}\x{5931}\x{5932}\x{5934}\x{5935}' - . '\x{5937}\x{5938}\x{5939}\x{593A}\x{593B}\x{593C}\x{593D}\x{593E}\x{593F}' - . '\x{5940}\x{5941}\x{5942}\x{5943}\x{5944}\x{5945}\x{5946}\x{5947}\x{5948}' - . '\x{5949}\x{594A}\x{594B}\x{594C}\x{594D}\x{594E}\x{594F}\x{5950}\x{5951}' - . '\x{5952}\x{5953}\x{5954}\x{5955}\x{5956}\x{5957}\x{5958}\x{595A}\x{595C}' - . '\x{595D}\x{595E}\x{595F}\x{5960}\x{5961}\x{5962}\x{5963}\x{5964}\x{5965}' - . '\x{5966}\x{5967}\x{5968}\x{5969}\x{596A}\x{596B}\x{596C}\x{596D}\x{596E}' - . '\x{596F}\x{5970}\x{5971}\x{5972}\x{5973}\x{5974}\x{5975}\x{5976}\x{5977}' - . '\x{5978}\x{5979}\x{597A}\x{597B}\x{597C}\x{597D}\x{597E}\x{597F}\x{5980}' - . '\x{5981}\x{5982}\x{5983}\x{5984}\x{5985}\x{5986}\x{5987}\x{5988}\x{5989}' - . '\x{598A}\x{598B}\x{598C}\x{598D}\x{598E}\x{598F}\x{5990}\x{5991}\x{5992}' - . '\x{5993}\x{5994}\x{5995}\x{5996}\x{5997}\x{5998}\x{5999}\x{599A}\x{599C}' - . '\x{599D}\x{599E}\x{599F}\x{59A0}\x{59A1}\x{59A2}\x{59A3}\x{59A4}\x{59A5}' - . '\x{59A6}\x{59A7}\x{59A8}\x{59A9}\x{59AA}\x{59AB}\x{59AC}\x{59AD}\x{59AE}' - . '\x{59AF}\x{59B0}\x{59B1}\x{59B2}\x{59B3}\x{59B4}\x{59B5}\x{59B6}\x{59B8}' - . '\x{59B9}\x{59BA}\x{59BB}\x{59BC}\x{59BD}\x{59BE}\x{59BF}\x{59C0}\x{59C1}' - . '\x{59C2}\x{59C3}\x{59C4}\x{59C5}\x{59C6}\x{59C7}\x{59C8}\x{59C9}\x{59CA}' - . '\x{59CB}\x{59CC}\x{59CD}\x{59CE}\x{59CF}\x{59D0}\x{59D1}\x{59D2}\x{59D3}' - . '\x{59D4}\x{59D5}\x{59D6}\x{59D7}\x{59D8}\x{59D9}\x{59DA}\x{59DB}\x{59DC}' - . '\x{59DD}\x{59DE}\x{59DF}\x{59E0}\x{59E1}\x{59E2}\x{59E3}\x{59E4}\x{59E5}' - . '\x{59E6}\x{59E8}\x{59E9}\x{59EA}\x{59EB}\x{59EC}\x{59ED}\x{59EE}\x{59EF}' - . '\x{59F0}\x{59F1}\x{59F2}\x{59F3}\x{59F4}\x{59F5}\x{59F6}\x{59F7}\x{59F8}' - . '\x{59F9}\x{59FA}\x{59FB}\x{59FC}\x{59FD}\x{59FE}\x{59FF}\x{5A00}\x{5A01}' - . '\x{5A02}\x{5A03}\x{5A04}\x{5A05}\x{5A06}\x{5A07}\x{5A08}\x{5A09}\x{5A0A}' - . '\x{5A0B}\x{5A0C}\x{5A0D}\x{5A0E}\x{5A0F}\x{5A10}\x{5A11}\x{5A12}\x{5A13}' - . '\x{5A14}\x{5A15}\x{5A16}\x{5A17}\x{5A18}\x{5A19}\x{5A1A}\x{5A1B}\x{5A1C}' - . '\x{5A1D}\x{5A1E}\x{5A1F}\x{5A20}\x{5A21}\x{5A22}\x{5A23}\x{5A25}\x{5A27}' - . '\x{5A28}\x{5A29}\x{5A2A}\x{5A2B}\x{5A2D}\x{5A2E}\x{5A2F}\x{5A31}\x{5A32}' - . '\x{5A33}\x{5A34}\x{5A35}\x{5A36}\x{5A37}\x{5A38}\x{5A39}\x{5A3A}\x{5A3B}' - . '\x{5A3C}\x{5A3D}\x{5A3E}\x{5A3F}\x{5A40}\x{5A41}\x{5A42}\x{5A43}\x{5A44}' - . '\x{5A45}\x{5A46}\x{5A47}\x{5A48}\x{5A49}\x{5A4A}\x{5A4B}\x{5A4C}\x{5A4D}' - . '\x{5A4E}\x{5A4F}\x{5A50}\x{5A51}\x{5A52}\x{5A53}\x{5A55}\x{5A56}\x{5A57}' - . '\x{5A58}\x{5A5A}\x{5A5B}\x{5A5C}\x{5A5D}\x{5A5E}\x{5A5F}\x{5A60}\x{5A61}' - . '\x{5A62}\x{5A63}\x{5A64}\x{5A65}\x{5A66}\x{5A67}\x{5A68}\x{5A69}\x{5A6A}' - . '\x{5A6B}\x{5A6C}\x{5A6D}\x{5A6E}\x{5A70}\x{5A72}\x{5A73}\x{5A74}\x{5A75}' - . '\x{5A76}\x{5A77}\x{5A78}\x{5A79}\x{5A7A}\x{5A7B}\x{5A7C}\x{5A7D}\x{5A7E}' - . '\x{5A7F}\x{5A80}\x{5A81}\x{5A82}\x{5A83}\x{5A84}\x{5A85}\x{5A86}\x{5A88}' - . '\x{5A89}\x{5A8A}\x{5A8B}\x{5A8C}\x{5A8E}\x{5A8F}\x{5A90}\x{5A91}\x{5A92}' - . '\x{5A93}\x{5A94}\x{5A95}\x{5A96}\x{5A97}\x{5A98}\x{5A99}\x{5A9A}\x{5A9B}' - . '\x{5A9C}\x{5A9D}\x{5A9E}\x{5A9F}\x{5AA0}\x{5AA1}\x{5AA2}\x{5AA3}\x{5AA4}' - . '\x{5AA5}\x{5AA6}\x{5AA7}\x{5AA8}\x{5AA9}\x{5AAA}\x{5AAC}\x{5AAD}\x{5AAE}' - . '\x{5AAF}\x{5AB0}\x{5AB1}\x{5AB2}\x{5AB3}\x{5AB4}\x{5AB5}\x{5AB6}\x{5AB7}' - . '\x{5AB8}\x{5AB9}\x{5ABA}\x{5ABB}\x{5ABC}\x{5ABD}\x{5ABE}\x{5ABF}\x{5AC0}' - . '\x{5AC1}\x{5AC2}\x{5AC3}\x{5AC4}\x{5AC5}\x{5AC6}\x{5AC7}\x{5AC8}\x{5AC9}' - . '\x{5ACA}\x{5ACB}\x{5ACC}\x{5ACD}\x{5ACE}\x{5ACF}\x{5AD1}\x{5AD2}\x{5AD4}' - . '\x{5AD5}\x{5AD6}\x{5AD7}\x{5AD8}\x{5AD9}\x{5ADA}\x{5ADB}\x{5ADC}\x{5ADD}' - . '\x{5ADE}\x{5ADF}\x{5AE0}\x{5AE1}\x{5AE2}\x{5AE3}\x{5AE4}\x{5AE5}\x{5AE6}' - . '\x{5AE7}\x{5AE8}\x{5AE9}\x{5AEA}\x{5AEB}\x{5AEC}\x{5AED}\x{5AEE}\x{5AF1}' - . '\x{5AF2}\x{5AF3}\x{5AF4}\x{5AF5}\x{5AF6}\x{5AF7}\x{5AF8}\x{5AF9}\x{5AFA}' - . '\x{5AFB}\x{5AFC}\x{5AFD}\x{5AFE}\x{5AFF}\x{5B00}\x{5B01}\x{5B02}\x{5B03}' - . '\x{5B04}\x{5B05}\x{5B06}\x{5B07}\x{5B08}\x{5B09}\x{5B0B}\x{5B0C}\x{5B0E}' - . '\x{5B0F}\x{5B10}\x{5B11}\x{5B12}\x{5B13}\x{5B14}\x{5B15}\x{5B16}\x{5B17}' - . '\x{5B18}\x{5B19}\x{5B1A}\x{5B1B}\x{5B1C}\x{5B1D}\x{5B1E}\x{5B1F}\x{5B20}' - . '\x{5B21}\x{5B22}\x{5B23}\x{5B24}\x{5B25}\x{5B26}\x{5B27}\x{5B28}\x{5B29}' - . '\x{5B2A}\x{5B2B}\x{5B2C}\x{5B2D}\x{5B2E}\x{5B2F}\x{5B30}\x{5B31}\x{5B32}' - . '\x{5B33}\x{5B34}\x{5B35}\x{5B36}\x{5B37}\x{5B38}\x{5B3A}\x{5B3B}\x{5B3C}' - . '\x{5B3D}\x{5B3E}\x{5B3F}\x{5B40}\x{5B41}\x{5B42}\x{5B43}\x{5B44}\x{5B45}' - . '\x{5B47}\x{5B48}\x{5B49}\x{5B4A}\x{5B4B}\x{5B4C}\x{5B4D}\x{5B4E}\x{5B50}' - . '\x{5B51}\x{5B53}\x{5B54}\x{5B55}\x{5B56}\x{5B57}\x{5B58}\x{5B59}\x{5B5A}' - . '\x{5B5B}\x{5B5C}\x{5B5D}\x{5B5E}\x{5B5F}\x{5B62}\x{5B63}\x{5B64}\x{5B65}' - . '\x{5B66}\x{5B67}\x{5B68}\x{5B69}\x{5B6A}\x{5B6B}\x{5B6C}\x{5B6D}\x{5B6E}' - . '\x{5B70}\x{5B71}\x{5B72}\x{5B73}\x{5B74}\x{5B75}\x{5B76}\x{5B77}\x{5B78}' - . '\x{5B7A}\x{5B7B}\x{5B7C}\x{5B7D}\x{5B7F}\x{5B80}\x{5B81}\x{5B82}\x{5B83}' - . '\x{5B84}\x{5B85}\x{5B87}\x{5B88}\x{5B89}\x{5B8A}\x{5B8B}\x{5B8C}\x{5B8D}' - . '\x{5B8E}\x{5B8F}\x{5B91}\x{5B92}\x{5B93}\x{5B94}\x{5B95}\x{5B96}\x{5B97}' - . '\x{5B98}\x{5B99}\x{5B9A}\x{5B9B}\x{5B9C}\x{5B9D}\x{5B9E}\x{5B9F}\x{5BA0}' - . '\x{5BA1}\x{5BA2}\x{5BA3}\x{5BA4}\x{5BA5}\x{5BA6}\x{5BA7}\x{5BA8}\x{5BAA}' - . '\x{5BAB}\x{5BAC}\x{5BAD}\x{5BAE}\x{5BAF}\x{5BB0}\x{5BB1}\x{5BB3}\x{5BB4}' - . '\x{5BB5}\x{5BB6}\x{5BB8}\x{5BB9}\x{5BBA}\x{5BBB}\x{5BBD}\x{5BBE}\x{5BBF}' - . '\x{5BC0}\x{5BC1}\x{5BC2}\x{5BC3}\x{5BC4}\x{5BC5}\x{5BC6}\x{5BC7}\x{5BCA}' - . '\x{5BCB}\x{5BCC}\x{5BCD}\x{5BCE}\x{5BCF}\x{5BD0}\x{5BD1}\x{5BD2}\x{5BD3}' - . '\x{5BD4}\x{5BD5}\x{5BD6}\x{5BD8}\x{5BD9}\x{5BDB}\x{5BDC}\x{5BDD}\x{5BDE}' - . '\x{5BDF}\x{5BE0}\x{5BE1}\x{5BE2}\x{5BE3}\x{5BE4}\x{5BE5}\x{5BE6}\x{5BE7}' - . '\x{5BE8}\x{5BE9}\x{5BEA}\x{5BEB}\x{5BEC}\x{5BED}\x{5BEE}\x{5BEF}\x{5BF0}' - . '\x{5BF1}\x{5BF2}\x{5BF3}\x{5BF4}\x{5BF5}\x{5BF6}\x{5BF7}\x{5BF8}\x{5BF9}' - . '\x{5BFA}\x{5BFB}\x{5BFC}\x{5BFD}\x{5BFF}\x{5C01}\x{5C03}\x{5C04}\x{5C05}' - . '\x{5C06}\x{5C07}\x{5C08}\x{5C09}\x{5C0A}\x{5C0B}\x{5C0C}\x{5C0D}\x{5C0E}' - . '\x{5C0F}\x{5C10}\x{5C11}\x{5C12}\x{5C13}\x{5C14}\x{5C15}\x{5C16}\x{5C17}' - . '\x{5C18}\x{5C19}\x{5C1A}\x{5C1C}\x{5C1D}\x{5C1E}\x{5C1F}\x{5C20}\x{5C21}' - . '\x{5C22}\x{5C24}\x{5C25}\x{5C27}\x{5C28}\x{5C2A}\x{5C2B}\x{5C2C}\x{5C2D}' - . '\x{5C2E}\x{5C2F}\x{5C30}\x{5C31}\x{5C32}\x{5C33}\x{5C34}\x{5C35}\x{5C37}' - . '\x{5C38}\x{5C39}\x{5C3A}\x{5C3B}\x{5C3C}\x{5C3D}\x{5C3E}\x{5C3F}\x{5C40}' - . '\x{5C41}\x{5C42}\x{5C43}\x{5C44}\x{5C45}\x{5C46}\x{5C47}\x{5C48}\x{5C49}' - . '\x{5C4A}\x{5C4B}\x{5C4C}\x{5C4D}\x{5C4E}\x{5C4F}\x{5C50}\x{5C51}\x{5C52}' - . '\x{5C53}\x{5C54}\x{5C55}\x{5C56}\x{5C57}\x{5C58}\x{5C59}\x{5C5B}\x{5C5C}' - . '\x{5C5D}\x{5C5E}\x{5C5F}\x{5C60}\x{5C61}\x{5C62}\x{5C63}\x{5C64}\x{5C65}' - . '\x{5C66}\x{5C67}\x{5C68}\x{5C69}\x{5C6A}\x{5C6B}\x{5C6C}\x{5C6D}\x{5C6E}' - . '\x{5C6F}\x{5C70}\x{5C71}\x{5C72}\x{5C73}\x{5C74}\x{5C75}\x{5C76}\x{5C77}' - . '\x{5C78}\x{5C79}\x{5C7A}\x{5C7B}\x{5C7C}\x{5C7D}\x{5C7E}\x{5C7F}\x{5C80}' - . '\x{5C81}\x{5C82}\x{5C83}\x{5C84}\x{5C86}\x{5C87}\x{5C88}\x{5C89}\x{5C8A}' - . '\x{5C8B}\x{5C8C}\x{5C8D}\x{5C8E}\x{5C8F}\x{5C90}\x{5C91}\x{5C92}\x{5C93}' - . '\x{5C94}\x{5C95}\x{5C96}\x{5C97}\x{5C98}\x{5C99}\x{5C9A}\x{5C9B}\x{5C9C}' - . '\x{5C9D}\x{5C9E}\x{5C9F}\x{5CA0}\x{5CA1}\x{5CA2}\x{5CA3}\x{5CA4}\x{5CA5}' - . '\x{5CA6}\x{5CA7}\x{5CA8}\x{5CA9}\x{5CAA}\x{5CAB}\x{5CAC}\x{5CAD}\x{5CAE}' - . '\x{5CAF}\x{5CB0}\x{5CB1}\x{5CB2}\x{5CB3}\x{5CB5}\x{5CB6}\x{5CB7}\x{5CB8}' - . '\x{5CBA}\x{5CBB}\x{5CBC}\x{5CBD}\x{5CBE}\x{5CBF}\x{5CC1}\x{5CC2}\x{5CC3}' - . '\x{5CC4}\x{5CC5}\x{5CC6}\x{5CC7}\x{5CC8}\x{5CC9}\x{5CCA}\x{5CCB}\x{5CCC}' - . '\x{5CCD}\x{5CCE}\x{5CCF}\x{5CD0}\x{5CD1}\x{5CD2}\x{5CD3}\x{5CD4}\x{5CD6}' - . '\x{5CD7}\x{5CD8}\x{5CD9}\x{5CDA}\x{5CDB}\x{5CDC}\x{5CDE}\x{5CDF}\x{5CE0}' - . '\x{5CE1}\x{5CE2}\x{5CE3}\x{5CE4}\x{5CE5}\x{5CE6}\x{5CE7}\x{5CE8}\x{5CE9}' - . '\x{5CEA}\x{5CEB}\x{5CEC}\x{5CED}\x{5CEE}\x{5CEF}\x{5CF0}\x{5CF1}\x{5CF2}' - . '\x{5CF3}\x{5CF4}\x{5CF6}\x{5CF7}\x{5CF8}\x{5CF9}\x{5CFA}\x{5CFB}\x{5CFC}' - . '\x{5CFD}\x{5CFE}\x{5CFF}\x{5D00}\x{5D01}\x{5D02}\x{5D03}\x{5D04}\x{5D05}' - . '\x{5D06}\x{5D07}\x{5D08}\x{5D09}\x{5D0A}\x{5D0B}\x{5D0C}\x{5D0D}\x{5D0E}' - . '\x{5D0F}\x{5D10}\x{5D11}\x{5D12}\x{5D13}\x{5D14}\x{5D15}\x{5D16}\x{5D17}' - . '\x{5D18}\x{5D19}\x{5D1A}\x{5D1B}\x{5D1C}\x{5D1D}\x{5D1E}\x{5D1F}\x{5D20}' - . '\x{5D21}\x{5D22}\x{5D23}\x{5D24}\x{5D25}\x{5D26}\x{5D27}\x{5D28}\x{5D29}' - . '\x{5D2A}\x{5D2C}\x{5D2D}\x{5D2E}\x{5D30}\x{5D31}\x{5D32}\x{5D33}\x{5D34}' - . '\x{5D35}\x{5D36}\x{5D37}\x{5D38}\x{5D39}\x{5D3A}\x{5D3C}\x{5D3D}\x{5D3E}' - . '\x{5D3F}\x{5D40}\x{5D41}\x{5D42}\x{5D43}\x{5D44}\x{5D45}\x{5D46}\x{5D47}' - . '\x{5D48}\x{5D49}\x{5D4A}\x{5D4B}\x{5D4C}\x{5D4D}\x{5D4E}\x{5D4F}\x{5D50}' - . '\x{5D51}\x{5D52}\x{5D54}\x{5D55}\x{5D56}\x{5D58}\x{5D59}\x{5D5A}\x{5D5B}' - . '\x{5D5D}\x{5D5E}\x{5D5F}\x{5D61}\x{5D62}\x{5D63}\x{5D64}\x{5D65}\x{5D66}' - . '\x{5D67}\x{5D68}\x{5D69}\x{5D6A}\x{5D6B}\x{5D6C}\x{5D6D}\x{5D6E}\x{5D6F}' - . '\x{5D70}\x{5D71}\x{5D72}\x{5D73}\x{5D74}\x{5D75}\x{5D76}\x{5D77}\x{5D78}' - . '\x{5D79}\x{5D7A}\x{5D7B}\x{5D7C}\x{5D7D}\x{5D7E}\x{5D7F}\x{5D80}\x{5D81}' - . '\x{5D82}\x{5D84}\x{5D85}\x{5D86}\x{5D87}\x{5D88}\x{5D89}\x{5D8A}\x{5D8B}' - . '\x{5D8C}\x{5D8D}\x{5D8E}\x{5D8F}\x{5D90}\x{5D91}\x{5D92}\x{5D93}\x{5D94}' - . '\x{5D95}\x{5D97}\x{5D98}\x{5D99}\x{5D9A}\x{5D9B}\x{5D9C}\x{5D9D}\x{5D9E}' - . '\x{5D9F}\x{5DA0}\x{5DA1}\x{5DA2}\x{5DA5}\x{5DA6}\x{5DA7}\x{5DA8}\x{5DA9}' - . '\x{5DAA}\x{5DAC}\x{5DAD}\x{5DAE}\x{5DAF}\x{5DB0}\x{5DB1}\x{5DB2}\x{5DB4}' - . '\x{5DB5}\x{5DB6}\x{5DB7}\x{5DB8}\x{5DBA}\x{5DBB}\x{5DBC}\x{5DBD}\x{5DBE}' - . '\x{5DBF}\x{5DC0}\x{5DC1}\x{5DC2}\x{5DC3}\x{5DC5}\x{5DC6}\x{5DC7}\x{5DC8}' - . '\x{5DC9}\x{5DCA}\x{5DCB}\x{5DCC}\x{5DCD}\x{5DCE}\x{5DCF}\x{5DD0}\x{5DD1}' - . '\x{5DD2}\x{5DD3}\x{5DD4}\x{5DD5}\x{5DD6}\x{5DD8}\x{5DD9}\x{5DDB}\x{5DDD}' - . '\x{5DDE}\x{5DDF}\x{5DE0}\x{5DE1}\x{5DE2}\x{5DE3}\x{5DE4}\x{5DE5}\x{5DE6}' - . '\x{5DE7}\x{5DE8}\x{5DE9}\x{5DEA}\x{5DEB}\x{5DEC}\x{5DED}\x{5DEE}\x{5DEF}' - . '\x{5DF0}\x{5DF1}\x{5DF2}\x{5DF3}\x{5DF4}\x{5DF5}\x{5DF7}\x{5DF8}\x{5DF9}' - . '\x{5DFA}\x{5DFB}\x{5DFC}\x{5DFD}\x{5DFE}\x{5DFF}\x{5E00}\x{5E01}\x{5E02}' - . '\x{5E03}\x{5E04}\x{5E05}\x{5E06}\x{5E07}\x{5E08}\x{5E09}\x{5E0A}\x{5E0B}' - . '\x{5E0C}\x{5E0D}\x{5E0E}\x{5E0F}\x{5E10}\x{5E11}\x{5E13}\x{5E14}\x{5E15}' - . '\x{5E16}\x{5E17}\x{5E18}\x{5E19}\x{5E1A}\x{5E1B}\x{5E1C}\x{5E1D}\x{5E1E}' - . '\x{5E1F}\x{5E20}\x{5E21}\x{5E22}\x{5E23}\x{5E24}\x{5E25}\x{5E26}\x{5E27}' - . '\x{5E28}\x{5E29}\x{5E2A}\x{5E2B}\x{5E2C}\x{5E2D}\x{5E2E}\x{5E2F}\x{5E30}' - . '\x{5E31}\x{5E32}\x{5E33}\x{5E34}\x{5E35}\x{5E36}\x{5E37}\x{5E38}\x{5E39}' - . '\x{5E3A}\x{5E3B}\x{5E3C}\x{5E3D}\x{5E3E}\x{5E40}\x{5E41}\x{5E42}\x{5E43}' - . '\x{5E44}\x{5E45}\x{5E46}\x{5E47}\x{5E49}\x{5E4A}\x{5E4B}\x{5E4C}\x{5E4D}' - . '\x{5E4E}\x{5E4F}\x{5E50}\x{5E52}\x{5E53}\x{5E54}\x{5E55}\x{5E56}\x{5E57}' - . '\x{5E58}\x{5E59}\x{5E5A}\x{5E5B}\x{5E5C}\x{5E5D}\x{5E5E}\x{5E5F}\x{5E60}' - . '\x{5E61}\x{5E62}\x{5E63}\x{5E64}\x{5E65}\x{5E66}\x{5E67}\x{5E68}\x{5E69}' - . '\x{5E6A}\x{5E6B}\x{5E6C}\x{5E6D}\x{5E6E}\x{5E6F}\x{5E70}\x{5E71}\x{5E72}' - . '\x{5E73}\x{5E74}\x{5E75}\x{5E76}\x{5E77}\x{5E78}\x{5E79}\x{5E7A}\x{5E7B}' - . '\x{5E7C}\x{5E7D}\x{5E7E}\x{5E7F}\x{5E80}\x{5E81}\x{5E82}\x{5E83}\x{5E84}' - . '\x{5E85}\x{5E86}\x{5E87}\x{5E88}\x{5E89}\x{5E8A}\x{5E8B}\x{5E8C}\x{5E8D}' - . '\x{5E8E}\x{5E8F}\x{5E90}\x{5E91}\x{5E93}\x{5E94}\x{5E95}\x{5E96}\x{5E97}' - . '\x{5E98}\x{5E99}\x{5E9A}\x{5E9B}\x{5E9C}\x{5E9D}\x{5E9E}\x{5E9F}\x{5EA0}' - . '\x{5EA1}\x{5EA2}\x{5EA3}\x{5EA4}\x{5EA5}\x{5EA6}\x{5EA7}\x{5EA8}\x{5EA9}' - . '\x{5EAA}\x{5EAB}\x{5EAC}\x{5EAD}\x{5EAE}\x{5EAF}\x{5EB0}\x{5EB1}\x{5EB2}' - . '\x{5EB3}\x{5EB4}\x{5EB5}\x{5EB6}\x{5EB7}\x{5EB8}\x{5EB9}\x{5EBB}\x{5EBC}' - . '\x{5EBD}\x{5EBE}\x{5EBF}\x{5EC1}\x{5EC2}\x{5EC3}\x{5EC4}\x{5EC5}\x{5EC6}' - . '\x{5EC7}\x{5EC8}\x{5EC9}\x{5ECA}\x{5ECB}\x{5ECC}\x{5ECD}\x{5ECE}\x{5ECF}' - . '\x{5ED0}\x{5ED1}\x{5ED2}\x{5ED3}\x{5ED4}\x{5ED5}\x{5ED6}\x{5ED7}\x{5ED8}' - . '\x{5ED9}\x{5EDA}\x{5EDB}\x{5EDC}\x{5EDD}\x{5EDE}\x{5EDF}\x{5EE0}\x{5EE1}' - . '\x{5EE2}\x{5EE3}\x{5EE4}\x{5EE5}\x{5EE6}\x{5EE7}\x{5EE8}\x{5EE9}\x{5EEA}' - . '\x{5EEC}\x{5EED}\x{5EEE}\x{5EEF}\x{5EF0}\x{5EF1}\x{5EF2}\x{5EF3}\x{5EF4}' - . '\x{5EF5}\x{5EF6}\x{5EF7}\x{5EF8}\x{5EFA}\x{5EFB}\x{5EFC}\x{5EFD}\x{5EFE}' - . '\x{5EFF}\x{5F00}\x{5F01}\x{5F02}\x{5F03}\x{5F04}\x{5F05}\x{5F06}\x{5F07}' - . '\x{5F08}\x{5F0A}\x{5F0B}\x{5F0C}\x{5F0D}\x{5F0F}\x{5F11}\x{5F12}\x{5F13}' - . '\x{5F14}\x{5F15}\x{5F16}\x{5F17}\x{5F18}\x{5F19}\x{5F1A}\x{5F1B}\x{5F1C}' - . '\x{5F1D}\x{5F1E}\x{5F1F}\x{5F20}\x{5F21}\x{5F22}\x{5F23}\x{5F24}\x{5F25}' - . '\x{5F26}\x{5F27}\x{5F28}\x{5F29}\x{5F2A}\x{5F2B}\x{5F2C}\x{5F2D}\x{5F2E}' - . '\x{5F2F}\x{5F30}\x{5F31}\x{5F32}\x{5F33}\x{5F34}\x{5F35}\x{5F36}\x{5F37}' - . '\x{5F38}\x{5F39}\x{5F3A}\x{5F3C}\x{5F3E}\x{5F3F}\x{5F40}\x{5F41}\x{5F42}' - . '\x{5F43}\x{5F44}\x{5F45}\x{5F46}\x{5F47}\x{5F48}\x{5F49}\x{5F4A}\x{5F4B}' - . '\x{5F4C}\x{5F4D}\x{5F4E}\x{5F4F}\x{5F50}\x{5F51}\x{5F52}\x{5F53}\x{5F54}' - . '\x{5F55}\x{5F56}\x{5F57}\x{5F58}\x{5F59}\x{5F5A}\x{5F5B}\x{5F5C}\x{5F5D}' - . '\x{5F5E}\x{5F5F}\x{5F60}\x{5F61}\x{5F62}\x{5F63}\x{5F64}\x{5F65}\x{5F66}' - . '\x{5F67}\x{5F68}\x{5F69}\x{5F6A}\x{5F6B}\x{5F6C}\x{5F6D}\x{5F6E}\x{5F6F}' - . '\x{5F70}\x{5F71}\x{5F72}\x{5F73}\x{5F74}\x{5F75}\x{5F76}\x{5F77}\x{5F78}' - . '\x{5F79}\x{5F7A}\x{5F7B}\x{5F7C}\x{5F7D}\x{5F7E}\x{5F7F}\x{5F80}\x{5F81}' - . '\x{5F82}\x{5F83}\x{5F84}\x{5F85}\x{5F86}\x{5F87}\x{5F88}\x{5F89}\x{5F8A}' - . '\x{5F8B}\x{5F8C}\x{5F8D}\x{5F8E}\x{5F90}\x{5F91}\x{5F92}\x{5F93}\x{5F94}' - . '\x{5F95}\x{5F96}\x{5F97}\x{5F98}\x{5F99}\x{5F9B}\x{5F9C}\x{5F9D}\x{5F9E}' - . '\x{5F9F}\x{5FA0}\x{5FA1}\x{5FA2}\x{5FA5}\x{5FA6}\x{5FA7}\x{5FA8}\x{5FA9}' - . '\x{5FAA}\x{5FAB}\x{5FAC}\x{5FAD}\x{5FAE}\x{5FAF}\x{5FB1}\x{5FB2}\x{5FB3}' - . '\x{5FB4}\x{5FB5}\x{5FB6}\x{5FB7}\x{5FB8}\x{5FB9}\x{5FBA}\x{5FBB}\x{5FBC}' - . '\x{5FBD}\x{5FBE}\x{5FBF}\x{5FC0}\x{5FC1}\x{5FC3}\x{5FC4}\x{5FC5}\x{5FC6}' - . '\x{5FC7}\x{5FC8}\x{5FC9}\x{5FCA}\x{5FCB}\x{5FCC}\x{5FCD}\x{5FCF}\x{5FD0}' - . '\x{5FD1}\x{5FD2}\x{5FD3}\x{5FD4}\x{5FD5}\x{5FD6}\x{5FD7}\x{5FD8}\x{5FD9}' - . '\x{5FDA}\x{5FDC}\x{5FDD}\x{5FDE}\x{5FE0}\x{5FE1}\x{5FE3}\x{5FE4}\x{5FE5}' - . '\x{5FE6}\x{5FE7}\x{5FE8}\x{5FE9}\x{5FEA}\x{5FEB}\x{5FED}\x{5FEE}\x{5FEF}' - . '\x{5FF0}\x{5FF1}\x{5FF2}\x{5FF3}\x{5FF4}\x{5FF5}\x{5FF6}\x{5FF7}\x{5FF8}' - . '\x{5FF9}\x{5FFA}\x{5FFB}\x{5FFD}\x{5FFE}\x{5FFF}\x{6000}\x{6001}\x{6002}' - . '\x{6003}\x{6004}\x{6005}\x{6006}\x{6007}\x{6008}\x{6009}\x{600A}\x{600B}' - . '\x{600C}\x{600D}\x{600E}\x{600F}\x{6010}\x{6011}\x{6012}\x{6013}\x{6014}' - . '\x{6015}\x{6016}\x{6017}\x{6018}\x{6019}\x{601A}\x{601B}\x{601C}\x{601D}' - . '\x{601E}\x{601F}\x{6020}\x{6021}\x{6022}\x{6024}\x{6025}\x{6026}\x{6027}' - . '\x{6028}\x{6029}\x{602A}\x{602B}\x{602C}\x{602D}\x{602E}\x{602F}\x{6030}' - . '\x{6031}\x{6032}\x{6033}\x{6034}\x{6035}\x{6036}\x{6037}\x{6038}\x{6039}' - . '\x{603A}\x{603B}\x{603C}\x{603D}\x{603E}\x{603F}\x{6040}\x{6041}\x{6042}' - . '\x{6043}\x{6044}\x{6045}\x{6046}\x{6047}\x{6048}\x{6049}\x{604A}\x{604B}' - . '\x{604C}\x{604D}\x{604E}\x{604F}\x{6050}\x{6051}\x{6052}\x{6053}\x{6054}' - . '\x{6055}\x{6057}\x{6058}\x{6059}\x{605A}\x{605B}\x{605C}\x{605D}\x{605E}' - . '\x{605F}\x{6062}\x{6063}\x{6064}\x{6065}\x{6066}\x{6067}\x{6068}\x{6069}' - . '\x{606A}\x{606B}\x{606C}\x{606D}\x{606E}\x{606F}\x{6070}\x{6072}\x{6073}' - . '\x{6075}\x{6076}\x{6077}\x{6078}\x{6079}\x{607A}\x{607B}\x{607C}\x{607D}' - . '\x{607E}\x{607F}\x{6080}\x{6081}\x{6082}\x{6083}\x{6084}\x{6085}\x{6086}' - . '\x{6087}\x{6088}\x{6089}\x{608A}\x{608B}\x{608C}\x{608D}\x{608E}\x{608F}' - . '\x{6090}\x{6092}\x{6094}\x{6095}\x{6096}\x{6097}\x{6098}\x{6099}\x{609A}' - . '\x{609B}\x{609C}\x{609D}\x{609E}\x{609F}\x{60A0}\x{60A1}\x{60A2}\x{60A3}' - . '\x{60A4}\x{60A6}\x{60A7}\x{60A8}\x{60AA}\x{60AB}\x{60AC}\x{60AD}\x{60AE}' - . '\x{60AF}\x{60B0}\x{60B1}\x{60B2}\x{60B3}\x{60B4}\x{60B5}\x{60B6}\x{60B7}' - . '\x{60B8}\x{60B9}\x{60BA}\x{60BB}\x{60BC}\x{60BD}\x{60BE}\x{60BF}\x{60C0}' - . '\x{60C1}\x{60C2}\x{60C3}\x{60C4}\x{60C5}\x{60C6}\x{60C7}\x{60C8}\x{60C9}' - . '\x{60CA}\x{60CB}\x{60CC}\x{60CD}\x{60CE}\x{60CF}\x{60D0}\x{60D1}\x{60D3}' - . '\x{60D4}\x{60D5}\x{60D7}\x{60D8}\x{60D9}\x{60DA}\x{60DB}\x{60DC}\x{60DD}' - . '\x{60DF}\x{60E0}\x{60E1}\x{60E2}\x{60E4}\x{60E6}\x{60E7}\x{60E8}\x{60E9}' - . '\x{60EA}\x{60EB}\x{60EC}\x{60ED}\x{60EE}\x{60EF}\x{60F0}\x{60F1}\x{60F2}' - . '\x{60F3}\x{60F4}\x{60F5}\x{60F6}\x{60F7}\x{60F8}\x{60F9}\x{60FA}\x{60FB}' - . '\x{60FC}\x{60FE}\x{60FF}\x{6100}\x{6101}\x{6103}\x{6104}\x{6105}\x{6106}' - . '\x{6108}\x{6109}\x{610A}\x{610B}\x{610C}\x{610D}\x{610E}\x{610F}\x{6110}' - . '\x{6112}\x{6113}\x{6114}\x{6115}\x{6116}\x{6117}\x{6118}\x{6119}\x{611A}' - . '\x{611B}\x{611C}\x{611D}\x{611F}\x{6120}\x{6122}\x{6123}\x{6124}\x{6125}' - . '\x{6126}\x{6127}\x{6128}\x{6129}\x{612A}\x{612B}\x{612C}\x{612D}\x{612E}' - . '\x{612F}\x{6130}\x{6132}\x{6134}\x{6136}\x{6137}\x{613A}\x{613B}\x{613C}' - . '\x{613D}\x{613E}\x{613F}\x{6140}\x{6141}\x{6142}\x{6143}\x{6144}\x{6145}' - . '\x{6146}\x{6147}\x{6148}\x{6149}\x{614A}\x{614B}\x{614C}\x{614D}\x{614E}' - . '\x{614F}\x{6150}\x{6151}\x{6152}\x{6153}\x{6154}\x{6155}\x{6156}\x{6157}' - . '\x{6158}\x{6159}\x{615A}\x{615B}\x{615C}\x{615D}\x{615E}\x{615F}\x{6161}' - . '\x{6162}\x{6163}\x{6164}\x{6165}\x{6166}\x{6167}\x{6168}\x{6169}\x{616A}' - . '\x{616B}\x{616C}\x{616D}\x{616E}\x{6170}\x{6171}\x{6172}\x{6173}\x{6174}' - . '\x{6175}\x{6176}\x{6177}\x{6178}\x{6179}\x{617A}\x{617C}\x{617E}\x{6180}' - . '\x{6181}\x{6182}\x{6183}\x{6184}\x{6185}\x{6187}\x{6188}\x{6189}\x{618A}' - . '\x{618B}\x{618C}\x{618D}\x{618E}\x{618F}\x{6190}\x{6191}\x{6192}\x{6193}' - . '\x{6194}\x{6195}\x{6196}\x{6198}\x{6199}\x{619A}\x{619B}\x{619D}\x{619E}' - . '\x{619F}\x{61A0}\x{61A1}\x{61A2}\x{61A3}\x{61A4}\x{61A5}\x{61A6}\x{61A7}' - . '\x{61A8}\x{61A9}\x{61AA}\x{61AB}\x{61AC}\x{61AD}\x{61AE}\x{61AF}\x{61B0}' - . '\x{61B1}\x{61B2}\x{61B3}\x{61B4}\x{61B5}\x{61B6}\x{61B7}\x{61B8}\x{61BA}' - . '\x{61BC}\x{61BD}\x{61BE}\x{61BF}\x{61C0}\x{61C1}\x{61C2}\x{61C3}\x{61C4}' - . '\x{61C5}\x{61C6}\x{61C7}\x{61C8}\x{61C9}\x{61CA}\x{61CB}\x{61CC}\x{61CD}' - . '\x{61CE}\x{61CF}\x{61D0}\x{61D1}\x{61D2}\x{61D4}\x{61D6}\x{61D7}\x{61D8}' - . '\x{61D9}\x{61DA}\x{61DB}\x{61DC}\x{61DD}\x{61DE}\x{61DF}\x{61E0}\x{61E1}' - . '\x{61E2}\x{61E3}\x{61E4}\x{61E5}\x{61E6}\x{61E7}\x{61E8}\x{61E9}\x{61EA}' - . '\x{61EB}\x{61ED}\x{61EE}\x{61F0}\x{61F1}\x{61F2}\x{61F3}\x{61F5}\x{61F6}' - . '\x{61F7}\x{61F8}\x{61F9}\x{61FA}\x{61FB}\x{61FC}\x{61FD}\x{61FE}\x{61FF}' - . '\x{6200}\x{6201}\x{6202}\x{6203}\x{6204}\x{6206}\x{6207}\x{6208}\x{6209}' - . '\x{620A}\x{620B}\x{620C}\x{620D}\x{620E}\x{620F}\x{6210}\x{6211}\x{6212}' - . '\x{6213}\x{6214}\x{6215}\x{6216}\x{6217}\x{6218}\x{6219}\x{621A}\x{621B}' - . '\x{621C}\x{621D}\x{621E}\x{621F}\x{6220}\x{6221}\x{6222}\x{6223}\x{6224}' - . '\x{6225}\x{6226}\x{6227}\x{6228}\x{6229}\x{622A}\x{622B}\x{622C}\x{622D}' - . '\x{622E}\x{622F}\x{6230}\x{6231}\x{6232}\x{6233}\x{6234}\x{6236}\x{6237}' - . '\x{6238}\x{623A}\x{623B}\x{623C}\x{623D}\x{623E}\x{623F}\x{6240}\x{6241}' - . '\x{6242}\x{6243}\x{6244}\x{6245}\x{6246}\x{6247}\x{6248}\x{6249}\x{624A}' - . '\x{624B}\x{624C}\x{624D}\x{624E}\x{624F}\x{6250}\x{6251}\x{6252}\x{6253}' - . '\x{6254}\x{6255}\x{6256}\x{6258}\x{6259}\x{625A}\x{625B}\x{625C}\x{625D}' - . '\x{625E}\x{625F}\x{6260}\x{6261}\x{6262}\x{6263}\x{6264}\x{6265}\x{6266}' - . '\x{6267}\x{6268}\x{6269}\x{626A}\x{626B}\x{626C}\x{626D}\x{626E}\x{626F}' - . '\x{6270}\x{6271}\x{6272}\x{6273}\x{6274}\x{6275}\x{6276}\x{6277}\x{6278}' - . '\x{6279}\x{627A}\x{627B}\x{627C}\x{627D}\x{627E}\x{627F}\x{6280}\x{6281}' - . '\x{6283}\x{6284}\x{6285}\x{6286}\x{6287}\x{6288}\x{6289}\x{628A}\x{628B}' - . '\x{628C}\x{628E}\x{628F}\x{6290}\x{6291}\x{6292}\x{6293}\x{6294}\x{6295}' - . '\x{6296}\x{6297}\x{6298}\x{6299}\x{629A}\x{629B}\x{629C}\x{629E}\x{629F}' - . '\x{62A0}\x{62A1}\x{62A2}\x{62A3}\x{62A4}\x{62A5}\x{62A7}\x{62A8}\x{62A9}' - . '\x{62AA}\x{62AB}\x{62AC}\x{62AD}\x{62AE}\x{62AF}\x{62B0}\x{62B1}\x{62B2}' - . '\x{62B3}\x{62B4}\x{62B5}\x{62B6}\x{62B7}\x{62B8}\x{62B9}\x{62BA}\x{62BB}' - . '\x{62BC}\x{62BD}\x{62BE}\x{62BF}\x{62C0}\x{62C1}\x{62C2}\x{62C3}\x{62C4}' - . '\x{62C5}\x{62C6}\x{62C7}\x{62C8}\x{62C9}\x{62CA}\x{62CB}\x{62CC}\x{62CD}' - . '\x{62CE}\x{62CF}\x{62D0}\x{62D1}\x{62D2}\x{62D3}\x{62D4}\x{62D5}\x{62D6}' - . '\x{62D7}\x{62D8}\x{62D9}\x{62DA}\x{62DB}\x{62DC}\x{62DD}\x{62DF}\x{62E0}' - . '\x{62E1}\x{62E2}\x{62E3}\x{62E4}\x{62E5}\x{62E6}\x{62E7}\x{62E8}\x{62E9}' - . '\x{62EB}\x{62EC}\x{62ED}\x{62EE}\x{62EF}\x{62F0}\x{62F1}\x{62F2}\x{62F3}' - . '\x{62F4}\x{62F5}\x{62F6}\x{62F7}\x{62F8}\x{62F9}\x{62FA}\x{62FB}\x{62FC}' - . '\x{62FD}\x{62FE}\x{62FF}\x{6300}\x{6301}\x{6302}\x{6303}\x{6304}\x{6305}' - . '\x{6306}\x{6307}\x{6308}\x{6309}\x{630B}\x{630C}\x{630D}\x{630E}\x{630F}' - . '\x{6310}\x{6311}\x{6312}\x{6313}\x{6314}\x{6315}\x{6316}\x{6318}\x{6319}' - . '\x{631A}\x{631B}\x{631C}\x{631D}\x{631E}\x{631F}\x{6320}\x{6321}\x{6322}' - . '\x{6323}\x{6324}\x{6325}\x{6326}\x{6327}\x{6328}\x{6329}\x{632A}\x{632B}' - . '\x{632C}\x{632D}\x{632E}\x{632F}\x{6330}\x{6332}\x{6333}\x{6334}\x{6336}' - . '\x{6338}\x{6339}\x{633A}\x{633B}\x{633C}\x{633D}\x{633E}\x{6340}\x{6341}' - . '\x{6342}\x{6343}\x{6344}\x{6345}\x{6346}\x{6347}\x{6348}\x{6349}\x{634A}' - . '\x{634B}\x{634C}\x{634D}\x{634E}\x{634F}\x{6350}\x{6351}\x{6352}\x{6353}' - . '\x{6354}\x{6355}\x{6356}\x{6357}\x{6358}\x{6359}\x{635A}\x{635C}\x{635D}' - . '\x{635E}\x{635F}\x{6360}\x{6361}\x{6362}\x{6363}\x{6364}\x{6365}\x{6366}' - . '\x{6367}\x{6368}\x{6369}\x{636A}\x{636B}\x{636C}\x{636D}\x{636E}\x{636F}' - . '\x{6370}\x{6371}\x{6372}\x{6373}\x{6374}\x{6375}\x{6376}\x{6377}\x{6378}' - . '\x{6379}\x{637A}\x{637B}\x{637C}\x{637D}\x{637E}\x{6380}\x{6381}\x{6382}' - . '\x{6383}\x{6384}\x{6385}\x{6386}\x{6387}\x{6388}\x{6389}\x{638A}\x{638C}' - . '\x{638D}\x{638E}\x{638F}\x{6390}\x{6391}\x{6392}\x{6394}\x{6395}\x{6396}' - . '\x{6397}\x{6398}\x{6399}\x{639A}\x{639B}\x{639C}\x{639D}\x{639E}\x{639F}' - . '\x{63A0}\x{63A1}\x{63A2}\x{63A3}\x{63A4}\x{63A5}\x{63A6}\x{63A7}\x{63A8}' - . '\x{63A9}\x{63AA}\x{63AB}\x{63AC}\x{63AD}\x{63AE}\x{63AF}\x{63B0}\x{63B1}' - . '\x{63B2}\x{63B3}\x{63B4}\x{63B5}\x{63B6}\x{63B7}\x{63B8}\x{63B9}\x{63BA}' - . '\x{63BC}\x{63BD}\x{63BE}\x{63BF}\x{63C0}\x{63C1}\x{63C2}\x{63C3}\x{63C4}' - . '\x{63C5}\x{63C6}\x{63C7}\x{63C8}\x{63C9}\x{63CA}\x{63CB}\x{63CC}\x{63CD}' - . '\x{63CE}\x{63CF}\x{63D0}\x{63D2}\x{63D3}\x{63D4}\x{63D5}\x{63D6}\x{63D7}' - . '\x{63D8}\x{63D9}\x{63DA}\x{63DB}\x{63DC}\x{63DD}\x{63DE}\x{63DF}\x{63E0}' - . '\x{63E1}\x{63E2}\x{63E3}\x{63E4}\x{63E5}\x{63E6}\x{63E7}\x{63E8}\x{63E9}' - . '\x{63EA}\x{63EB}\x{63EC}\x{63ED}\x{63EE}\x{63EF}\x{63F0}\x{63F1}\x{63F2}' - . '\x{63F3}\x{63F4}\x{63F5}\x{63F6}\x{63F7}\x{63F8}\x{63F9}\x{63FA}\x{63FB}' - . '\x{63FC}\x{63FD}\x{63FE}\x{63FF}\x{6400}\x{6401}\x{6402}\x{6403}\x{6404}' - . '\x{6405}\x{6406}\x{6408}\x{6409}\x{640A}\x{640B}\x{640C}\x{640D}\x{640E}' - . '\x{640F}\x{6410}\x{6411}\x{6412}\x{6413}\x{6414}\x{6415}\x{6416}\x{6417}' - . '\x{6418}\x{6419}\x{641A}\x{641B}\x{641C}\x{641D}\x{641E}\x{641F}\x{6420}' - . '\x{6421}\x{6422}\x{6423}\x{6424}\x{6425}\x{6426}\x{6427}\x{6428}\x{6429}' - . '\x{642A}\x{642B}\x{642C}\x{642D}\x{642E}\x{642F}\x{6430}\x{6431}\x{6432}' - . '\x{6433}\x{6434}\x{6435}\x{6436}\x{6437}\x{6438}\x{6439}\x{643A}\x{643D}' - . '\x{643E}\x{643F}\x{6440}\x{6441}\x{6443}\x{6444}\x{6445}\x{6446}\x{6447}' - . '\x{6448}\x{644A}\x{644B}\x{644C}\x{644D}\x{644E}\x{644F}\x{6450}\x{6451}' - . '\x{6452}\x{6453}\x{6454}\x{6455}\x{6456}\x{6457}\x{6458}\x{6459}\x{645B}' - . '\x{645C}\x{645D}\x{645E}\x{645F}\x{6460}\x{6461}\x{6462}\x{6463}\x{6464}' - . '\x{6465}\x{6466}\x{6467}\x{6468}\x{6469}\x{646A}\x{646B}\x{646C}\x{646D}' - . '\x{646E}\x{646F}\x{6470}\x{6471}\x{6472}\x{6473}\x{6474}\x{6475}\x{6476}' - . '\x{6477}\x{6478}\x{6479}\x{647A}\x{647B}\x{647C}\x{647D}\x{647F}\x{6480}' - . '\x{6481}\x{6482}\x{6483}\x{6484}\x{6485}\x{6487}\x{6488}\x{6489}\x{648A}' - . '\x{648B}\x{648C}\x{648D}\x{648E}\x{648F}\x{6490}\x{6491}\x{6492}\x{6493}' - . '\x{6494}\x{6495}\x{6496}\x{6497}\x{6498}\x{6499}\x{649A}\x{649B}\x{649C}' - . '\x{649D}\x{649E}\x{649F}\x{64A0}\x{64A2}\x{64A3}\x{64A4}\x{64A5}\x{64A6}' - . '\x{64A7}\x{64A8}\x{64A9}\x{64AA}\x{64AB}\x{64AC}\x{64AD}\x{64AE}\x{64B0}' - . '\x{64B1}\x{64B2}\x{64B3}\x{64B4}\x{64B5}\x{64B7}\x{64B8}\x{64B9}\x{64BA}' - . '\x{64BB}\x{64BC}\x{64BD}\x{64BE}\x{64BF}\x{64C0}\x{64C1}\x{64C2}\x{64C3}' - . '\x{64C4}\x{64C5}\x{64C6}\x{64C7}\x{64C9}\x{64CA}\x{64CB}\x{64CC}\x{64CD}' - . '\x{64CE}\x{64CF}\x{64D0}\x{64D1}\x{64D2}\x{64D3}\x{64D4}\x{64D6}\x{64D7}' - . '\x{64D8}\x{64D9}\x{64DA}\x{64DB}\x{64DC}\x{64DD}\x{64DE}\x{64DF}\x{64E0}' - . '\x{64E2}\x{64E3}\x{64E4}\x{64E6}\x{64E7}\x{64E8}\x{64E9}\x{64EA}\x{64EB}' - . '\x{64EC}\x{64ED}\x{64EF}\x{64F0}\x{64F1}\x{64F2}\x{64F3}\x{64F4}\x{64F6}' - . '\x{64F7}\x{64F8}\x{64FA}\x{64FB}\x{64FC}\x{64FD}\x{64FE}\x{64FF}\x{6500}' - . '\x{6501}\x{6503}\x{6504}\x{6505}\x{6506}\x{6507}\x{6508}\x{6509}\x{650B}' - . '\x{650C}\x{650D}\x{650E}\x{650F}\x{6510}\x{6511}\x{6512}\x{6513}\x{6514}' - . '\x{6515}\x{6516}\x{6517}\x{6518}\x{6519}\x{651A}\x{651B}\x{651C}\x{651D}' - . '\x{651E}\x{6520}\x{6521}\x{6522}\x{6523}\x{6524}\x{6525}\x{6526}\x{6527}' - . '\x{6529}\x{652A}\x{652B}\x{652C}\x{652D}\x{652E}\x{652F}\x{6530}\x{6531}' - . '\x{6532}\x{6533}\x{6534}\x{6535}\x{6536}\x{6537}\x{6538}\x{6539}\x{653A}' - . '\x{653B}\x{653C}\x{653D}\x{653E}\x{653F}\x{6541}\x{6543}\x{6544}\x{6545}' - . '\x{6546}\x{6547}\x{6548}\x{6549}\x{654A}\x{654B}\x{654C}\x{654D}\x{654E}' - . '\x{654F}\x{6550}\x{6551}\x{6552}\x{6553}\x{6554}\x{6555}\x{6556}\x{6557}' - . '\x{6558}\x{6559}\x{655B}\x{655C}\x{655D}\x{655E}\x{6560}\x{6561}\x{6562}' - . '\x{6563}\x{6564}\x{6565}\x{6566}\x{6567}\x{6568}\x{6569}\x{656A}\x{656B}' - . '\x{656C}\x{656E}\x{656F}\x{6570}\x{6571}\x{6572}\x{6573}\x{6574}\x{6575}' - . '\x{6576}\x{6577}\x{6578}\x{6579}\x{657A}\x{657B}\x{657C}\x{657E}\x{657F}' - . '\x{6580}\x{6581}\x{6582}\x{6583}\x{6584}\x{6585}\x{6586}\x{6587}\x{6588}' - . '\x{6589}\x{658B}\x{658C}\x{658D}\x{658E}\x{658F}\x{6590}\x{6591}\x{6592}' - . '\x{6593}\x{6594}\x{6595}\x{6596}\x{6597}\x{6598}\x{6599}\x{659B}\x{659C}' - . '\x{659D}\x{659E}\x{659F}\x{65A0}\x{65A1}\x{65A2}\x{65A3}\x{65A4}\x{65A5}' - . '\x{65A6}\x{65A7}\x{65A8}\x{65A9}\x{65AA}\x{65AB}\x{65AC}\x{65AD}\x{65AE}' - . '\x{65AF}\x{65B0}\x{65B1}\x{65B2}\x{65B3}\x{65B4}\x{65B6}\x{65B7}\x{65B8}' - . '\x{65B9}\x{65BA}\x{65BB}\x{65BC}\x{65BD}\x{65BF}\x{65C0}\x{65C1}\x{65C2}' - . '\x{65C3}\x{65C4}\x{65C5}\x{65C6}\x{65C7}\x{65CA}\x{65CB}\x{65CC}\x{65CD}' - . '\x{65CE}\x{65CF}\x{65D0}\x{65D2}\x{65D3}\x{65D4}\x{65D5}\x{65D6}\x{65D7}' - . '\x{65DA}\x{65DB}\x{65DD}\x{65DE}\x{65DF}\x{65E0}\x{65E1}\x{65E2}\x{65E3}' - . '\x{65E5}\x{65E6}\x{65E7}\x{65E8}\x{65E9}\x{65EB}\x{65EC}\x{65ED}\x{65EE}' - . '\x{65EF}\x{65F0}\x{65F1}\x{65F2}\x{65F3}\x{65F4}\x{65F5}\x{65F6}\x{65F7}' - . '\x{65F8}\x{65FA}\x{65FB}\x{65FC}\x{65FD}\x{6600}\x{6601}\x{6602}\x{6603}' - . '\x{6604}\x{6605}\x{6606}\x{6607}\x{6608}\x{6609}\x{660A}\x{660B}\x{660C}' - . '\x{660D}\x{660E}\x{660F}\x{6610}\x{6611}\x{6612}\x{6613}\x{6614}\x{6615}' - . '\x{6616}\x{6618}\x{6619}\x{661A}\x{661B}\x{661C}\x{661D}\x{661F}\x{6620}' - . '\x{6621}\x{6622}\x{6623}\x{6624}\x{6625}\x{6626}\x{6627}\x{6628}\x{6629}' - . '\x{662A}\x{662B}\x{662D}\x{662E}\x{662F}\x{6630}\x{6631}\x{6632}\x{6633}' - . '\x{6634}\x{6635}\x{6636}\x{6639}\x{663A}\x{663C}\x{663D}\x{663E}\x{6640}' - . '\x{6641}\x{6642}\x{6643}\x{6644}\x{6645}\x{6646}\x{6647}\x{6649}\x{664A}' - . '\x{664B}\x{664C}\x{664E}\x{664F}\x{6650}\x{6651}\x{6652}\x{6653}\x{6654}' - . '\x{6655}\x{6656}\x{6657}\x{6658}\x{6659}\x{665A}\x{665B}\x{665C}\x{665D}' - . '\x{665E}\x{665F}\x{6661}\x{6662}\x{6664}\x{6665}\x{6666}\x{6668}\x{6669}' - . '\x{666A}\x{666B}\x{666C}\x{666D}\x{666E}\x{666F}\x{6670}\x{6671}\x{6672}' - . '\x{6673}\x{6674}\x{6675}\x{6676}\x{6677}\x{6678}\x{6679}\x{667A}\x{667B}' - . '\x{667C}\x{667D}\x{667E}\x{667F}\x{6680}\x{6681}\x{6682}\x{6683}\x{6684}' - . '\x{6685}\x{6686}\x{6687}\x{6688}\x{6689}\x{668A}\x{668B}\x{668C}\x{668D}' - . '\x{668E}\x{668F}\x{6690}\x{6691}\x{6693}\x{6694}\x{6695}\x{6696}\x{6697}' - . '\x{6698}\x{6699}\x{669A}\x{669B}\x{669D}\x{669F}\x{66A0}\x{66A1}\x{66A2}' - . '\x{66A3}\x{66A4}\x{66A5}\x{66A6}\x{66A7}\x{66A8}\x{66A9}\x{66AA}\x{66AB}' - . '\x{66AE}\x{66AF}\x{66B0}\x{66B1}\x{66B2}\x{66B3}\x{66B4}\x{66B5}\x{66B6}' - . '\x{66B7}\x{66B8}\x{66B9}\x{66BA}\x{66BB}\x{66BC}\x{66BD}\x{66BE}\x{66BF}' - . '\x{66C0}\x{66C1}\x{66C2}\x{66C3}\x{66C4}\x{66C5}\x{66C6}\x{66C7}\x{66C8}' - . '\x{66C9}\x{66CA}\x{66CB}\x{66CC}\x{66CD}\x{66CE}\x{66CF}\x{66D1}\x{66D2}' - . '\x{66D4}\x{66D5}\x{66D6}\x{66D8}\x{66D9}\x{66DA}\x{66DB}\x{66DC}\x{66DD}' - . '\x{66DE}\x{66E0}\x{66E1}\x{66E2}\x{66E3}\x{66E4}\x{66E5}\x{66E6}\x{66E7}' - . '\x{66E8}\x{66E9}\x{66EA}\x{66EB}\x{66EC}\x{66ED}\x{66EE}\x{66F0}\x{66F1}' - . '\x{66F2}\x{66F3}\x{66F4}\x{66F5}\x{66F6}\x{66F7}\x{66F8}\x{66F9}\x{66FA}' - . '\x{66FB}\x{66FC}\x{66FE}\x{66FF}\x{6700}\x{6701}\x{6703}\x{6704}\x{6705}' - . '\x{6706}\x{6708}\x{6709}\x{670A}\x{670B}\x{670C}\x{670D}\x{670E}\x{670F}' - . '\x{6710}\x{6711}\x{6712}\x{6713}\x{6714}\x{6715}\x{6716}\x{6717}\x{6718}' - . '\x{671A}\x{671B}\x{671C}\x{671D}\x{671E}\x{671F}\x{6720}\x{6721}\x{6722}' - . '\x{6723}\x{6725}\x{6726}\x{6727}\x{6728}\x{672A}\x{672B}\x{672C}\x{672D}' - . '\x{672E}\x{672F}\x{6730}\x{6731}\x{6732}\x{6733}\x{6734}\x{6735}\x{6736}' - . '\x{6737}\x{6738}\x{6739}\x{673A}\x{673B}\x{673C}\x{673D}\x{673E}\x{673F}' - . '\x{6740}\x{6741}\x{6742}\x{6743}\x{6744}\x{6745}\x{6746}\x{6747}\x{6748}' - . '\x{6749}\x{674A}\x{674B}\x{674C}\x{674D}\x{674E}\x{674F}\x{6750}\x{6751}' - . '\x{6752}\x{6753}\x{6754}\x{6755}\x{6756}\x{6757}\x{6758}\x{6759}\x{675A}' - . '\x{675B}\x{675C}\x{675D}\x{675E}\x{675F}\x{6760}\x{6761}\x{6762}\x{6763}' - . '\x{6764}\x{6765}\x{6766}\x{6768}\x{6769}\x{676A}\x{676B}\x{676C}\x{676D}' - . '\x{676E}\x{676F}\x{6770}\x{6771}\x{6772}\x{6773}\x{6774}\x{6775}\x{6776}' - . '\x{6777}\x{6778}\x{6779}\x{677A}\x{677B}\x{677C}\x{677D}\x{677E}\x{677F}' - . '\x{6780}\x{6781}\x{6782}\x{6783}\x{6784}\x{6785}\x{6786}\x{6787}\x{6789}' - . '\x{678A}\x{678B}\x{678C}\x{678D}\x{678E}\x{678F}\x{6790}\x{6791}\x{6792}' - . '\x{6793}\x{6794}\x{6795}\x{6797}\x{6798}\x{6799}\x{679A}\x{679B}\x{679C}' - . '\x{679D}\x{679E}\x{679F}\x{67A0}\x{67A1}\x{67A2}\x{67A3}\x{67A4}\x{67A5}' - . '\x{67A6}\x{67A7}\x{67A8}\x{67AA}\x{67AB}\x{67AC}\x{67AD}\x{67AE}\x{67AF}' - . '\x{67B0}\x{67B1}\x{67B2}\x{67B3}\x{67B4}\x{67B5}\x{67B6}\x{67B7}\x{67B8}' - . '\x{67B9}\x{67BA}\x{67BB}\x{67BC}\x{67BE}\x{67C0}\x{67C1}\x{67C2}\x{67C3}' - . '\x{67C4}\x{67C5}\x{67C6}\x{67C7}\x{67C8}\x{67C9}\x{67CA}\x{67CB}\x{67CC}' - . '\x{67CD}\x{67CE}\x{67CF}\x{67D0}\x{67D1}\x{67D2}\x{67D3}\x{67D4}\x{67D6}' - . '\x{67D8}\x{67D9}\x{67DA}\x{67DB}\x{67DC}\x{67DD}\x{67DE}\x{67DF}\x{67E0}' - . '\x{67E1}\x{67E2}\x{67E3}\x{67E4}\x{67E5}\x{67E6}\x{67E7}\x{67E8}\x{67E9}' - . '\x{67EA}\x{67EB}\x{67EC}\x{67ED}\x{67EE}\x{67EF}\x{67F0}\x{67F1}\x{67F2}' - . '\x{67F3}\x{67F4}\x{67F5}\x{67F6}\x{67F7}\x{67F8}\x{67FA}\x{67FB}\x{67FC}' - . '\x{67FD}\x{67FE}\x{67FF}\x{6800}\x{6802}\x{6803}\x{6804}\x{6805}\x{6806}' - . '\x{6807}\x{6808}\x{6809}\x{680A}\x{680B}\x{680C}\x{680D}\x{680E}\x{680F}' - . '\x{6810}\x{6811}\x{6812}\x{6813}\x{6814}\x{6816}\x{6817}\x{6818}\x{6819}' - . '\x{681A}\x{681B}\x{681C}\x{681D}\x{681F}\x{6820}\x{6821}\x{6822}\x{6823}' - . '\x{6824}\x{6825}\x{6826}\x{6828}\x{6829}\x{682A}\x{682B}\x{682C}\x{682D}' - . '\x{682E}\x{682F}\x{6831}\x{6832}\x{6833}\x{6834}\x{6835}\x{6836}\x{6837}' - . '\x{6838}\x{6839}\x{683A}\x{683B}\x{683C}\x{683D}\x{683E}\x{683F}\x{6840}' - . '\x{6841}\x{6842}\x{6843}\x{6844}\x{6845}\x{6846}\x{6847}\x{6848}\x{6849}' - . '\x{684A}\x{684B}\x{684C}\x{684D}\x{684E}\x{684F}\x{6850}\x{6851}\x{6852}' - . '\x{6853}\x{6854}\x{6855}\x{6856}\x{6857}\x{685B}\x{685D}\x{6860}\x{6861}' - . '\x{6862}\x{6863}\x{6864}\x{6865}\x{6866}\x{6867}\x{6868}\x{6869}\x{686A}' - . '\x{686B}\x{686C}\x{686D}\x{686E}\x{686F}\x{6870}\x{6871}\x{6872}\x{6873}' - . '\x{6874}\x{6875}\x{6876}\x{6877}\x{6878}\x{6879}\x{687B}\x{687C}\x{687D}' - . '\x{687E}\x{687F}\x{6880}\x{6881}\x{6882}\x{6883}\x{6884}\x{6885}\x{6886}' - . '\x{6887}\x{6888}\x{6889}\x{688A}\x{688B}\x{688C}\x{688D}\x{688E}\x{688F}' - . '\x{6890}\x{6891}\x{6892}\x{6893}\x{6894}\x{6896}\x{6897}\x{6898}\x{689A}' - . '\x{689B}\x{689C}\x{689D}\x{689E}\x{689F}\x{68A0}\x{68A1}\x{68A2}\x{68A3}' - . '\x{68A4}\x{68A6}\x{68A7}\x{68A8}\x{68A9}\x{68AA}\x{68AB}\x{68AC}\x{68AD}' - . '\x{68AE}\x{68AF}\x{68B0}\x{68B1}\x{68B2}\x{68B3}\x{68B4}\x{68B5}\x{68B6}' - . '\x{68B7}\x{68B9}\x{68BB}\x{68BC}\x{68BD}\x{68BE}\x{68BF}\x{68C0}\x{68C1}' - . '\x{68C2}\x{68C4}\x{68C6}\x{68C7}\x{68C8}\x{68C9}\x{68CA}\x{68CB}\x{68CC}' - . '\x{68CD}\x{68CE}\x{68CF}\x{68D0}\x{68D1}\x{68D2}\x{68D3}\x{68D4}\x{68D5}' - . '\x{68D6}\x{68D7}\x{68D8}\x{68DA}\x{68DB}\x{68DC}\x{68DD}\x{68DE}\x{68DF}' - . '\x{68E0}\x{68E1}\x{68E3}\x{68E4}\x{68E6}\x{68E7}\x{68E8}\x{68E9}\x{68EA}' - . '\x{68EB}\x{68EC}\x{68ED}\x{68EE}\x{68EF}\x{68F0}\x{68F1}\x{68F2}\x{68F3}' - . '\x{68F4}\x{68F5}\x{68F6}\x{68F7}\x{68F8}\x{68F9}\x{68FA}\x{68FB}\x{68FC}' - . '\x{68FD}\x{68FE}\x{68FF}\x{6901}\x{6902}\x{6903}\x{6904}\x{6905}\x{6906}' - . '\x{6907}\x{6908}\x{690A}\x{690B}\x{690C}\x{690D}\x{690E}\x{690F}\x{6910}' - . '\x{6911}\x{6912}\x{6913}\x{6914}\x{6915}\x{6916}\x{6917}\x{6918}\x{6919}' - . '\x{691A}\x{691B}\x{691C}\x{691D}\x{691E}\x{691F}\x{6920}\x{6921}\x{6922}' - . '\x{6923}\x{6924}\x{6925}\x{6926}\x{6927}\x{6928}\x{6929}\x{692A}\x{692B}' - . '\x{692C}\x{692D}\x{692E}\x{692F}\x{6930}\x{6931}\x{6932}\x{6933}\x{6934}' - . '\x{6935}\x{6936}\x{6937}\x{6938}\x{6939}\x{693A}\x{693B}\x{693C}\x{693D}' - . '\x{693F}\x{6940}\x{6941}\x{6942}\x{6943}\x{6944}\x{6945}\x{6946}\x{6947}' - . '\x{6948}\x{6949}\x{694A}\x{694B}\x{694C}\x{694E}\x{694F}\x{6950}\x{6951}' - . '\x{6952}\x{6953}\x{6954}\x{6955}\x{6956}\x{6957}\x{6958}\x{6959}\x{695A}' - . '\x{695B}\x{695C}\x{695D}\x{695E}\x{695F}\x{6960}\x{6961}\x{6962}\x{6963}' - . '\x{6964}\x{6965}\x{6966}\x{6967}\x{6968}\x{6969}\x{696A}\x{696B}\x{696C}' - . '\x{696D}\x{696E}\x{696F}\x{6970}\x{6971}\x{6972}\x{6973}\x{6974}\x{6975}' - . '\x{6976}\x{6977}\x{6978}\x{6979}\x{697A}\x{697B}\x{697C}\x{697D}\x{697E}' - . '\x{697F}\x{6980}\x{6981}\x{6982}\x{6983}\x{6984}\x{6985}\x{6986}\x{6987}' - . '\x{6988}\x{6989}\x{698A}\x{698B}\x{698C}\x{698D}\x{698E}\x{698F}\x{6990}' - . '\x{6991}\x{6992}\x{6993}\x{6994}\x{6995}\x{6996}\x{6997}\x{6998}\x{6999}' - . '\x{699A}\x{699B}\x{699C}\x{699D}\x{699E}\x{69A0}\x{69A1}\x{69A3}\x{69A4}' - . '\x{69A5}\x{69A6}\x{69A7}\x{69A8}\x{69A9}\x{69AA}\x{69AB}\x{69AC}\x{69AD}' - . '\x{69AE}\x{69AF}\x{69B0}\x{69B1}\x{69B2}\x{69B3}\x{69B4}\x{69B5}\x{69B6}' - . '\x{69B7}\x{69B8}\x{69B9}\x{69BA}\x{69BB}\x{69BC}\x{69BD}\x{69BE}\x{69BF}' - . '\x{69C1}\x{69C2}\x{69C3}\x{69C4}\x{69C5}\x{69C6}\x{69C7}\x{69C8}\x{69C9}' - . '\x{69CA}\x{69CB}\x{69CC}\x{69CD}\x{69CE}\x{69CF}\x{69D0}\x{69D3}\x{69D4}' - . '\x{69D8}\x{69D9}\x{69DA}\x{69DB}\x{69DC}\x{69DD}\x{69DE}\x{69DF}\x{69E0}' - . '\x{69E1}\x{69E2}\x{69E3}\x{69E4}\x{69E5}\x{69E6}\x{69E7}\x{69E8}\x{69E9}' - . '\x{69EA}\x{69EB}\x{69EC}\x{69ED}\x{69EE}\x{69EF}\x{69F0}\x{69F1}\x{69F2}' - . '\x{69F3}\x{69F4}\x{69F5}\x{69F6}\x{69F7}\x{69F8}\x{69FA}\x{69FB}\x{69FC}' - . '\x{69FD}\x{69FE}\x{69FF}\x{6A00}\x{6A01}\x{6A02}\x{6A04}\x{6A05}\x{6A06}' - . '\x{6A07}\x{6A08}\x{6A09}\x{6A0A}\x{6A0B}\x{6A0D}\x{6A0E}\x{6A0F}\x{6A10}' - . '\x{6A11}\x{6A12}\x{6A13}\x{6A14}\x{6A15}\x{6A16}\x{6A17}\x{6A18}\x{6A19}' - . '\x{6A1A}\x{6A1B}\x{6A1D}\x{6A1E}\x{6A1F}\x{6A20}\x{6A21}\x{6A22}\x{6A23}' - . '\x{6A25}\x{6A26}\x{6A27}\x{6A28}\x{6A29}\x{6A2A}\x{6A2B}\x{6A2C}\x{6A2D}' - . '\x{6A2E}\x{6A2F}\x{6A30}\x{6A31}\x{6A32}\x{6A33}\x{6A34}\x{6A35}\x{6A36}' - . '\x{6A38}\x{6A39}\x{6A3A}\x{6A3B}\x{6A3C}\x{6A3D}\x{6A3E}\x{6A3F}\x{6A40}' - . '\x{6A41}\x{6A42}\x{6A43}\x{6A44}\x{6A45}\x{6A46}\x{6A47}\x{6A48}\x{6A49}' - . '\x{6A4B}\x{6A4C}\x{6A4D}\x{6A4E}\x{6A4F}\x{6A50}\x{6A51}\x{6A52}\x{6A54}' - . '\x{6A55}\x{6A56}\x{6A57}\x{6A58}\x{6A59}\x{6A5A}\x{6A5B}\x{6A5D}\x{6A5E}' - . '\x{6A5F}\x{6A60}\x{6A61}\x{6A62}\x{6A63}\x{6A64}\x{6A65}\x{6A66}\x{6A67}' - . '\x{6A68}\x{6A69}\x{6A6A}\x{6A6B}\x{6A6C}\x{6A6D}\x{6A6F}\x{6A71}\x{6A72}' - . '\x{6A73}\x{6A74}\x{6A75}\x{6A76}\x{6A77}\x{6A78}\x{6A79}\x{6A7A}\x{6A7B}' - . '\x{6A7C}\x{6A7D}\x{6A7E}\x{6A7F}\x{6A80}\x{6A81}\x{6A82}\x{6A83}\x{6A84}' - . '\x{6A85}\x{6A87}\x{6A88}\x{6A89}\x{6A8B}\x{6A8C}\x{6A8D}\x{6A8E}\x{6A90}' - . '\x{6A91}\x{6A92}\x{6A93}\x{6A94}\x{6A95}\x{6A96}\x{6A97}\x{6A98}\x{6A9A}' - . '\x{6A9B}\x{6A9C}\x{6A9E}\x{6A9F}\x{6AA0}\x{6AA1}\x{6AA2}\x{6AA3}\x{6AA4}' - . '\x{6AA5}\x{6AA6}\x{6AA7}\x{6AA8}\x{6AA9}\x{6AAB}\x{6AAC}\x{6AAD}\x{6AAE}' - . '\x{6AAF}\x{6AB0}\x{6AB2}\x{6AB3}\x{6AB4}\x{6AB5}\x{6AB6}\x{6AB7}\x{6AB8}' - . '\x{6AB9}\x{6ABA}\x{6ABB}\x{6ABC}\x{6ABD}\x{6ABF}\x{6AC1}\x{6AC2}\x{6AC3}' - . '\x{6AC5}\x{6AC6}\x{6AC7}\x{6ACA}\x{6ACB}\x{6ACC}\x{6ACD}\x{6ACE}\x{6ACF}' - . '\x{6AD0}\x{6AD1}\x{6AD2}\x{6AD3}\x{6AD4}\x{6AD5}\x{6AD6}\x{6AD7}\x{6AD9}' - . '\x{6ADA}\x{6ADB}\x{6ADC}\x{6ADD}\x{6ADE}\x{6ADF}\x{6AE0}\x{6AE1}\x{6AE2}' - . '\x{6AE3}\x{6AE4}\x{6AE5}\x{6AE6}\x{6AE7}\x{6AE8}\x{6AEA}\x{6AEB}\x{6AEC}' - . '\x{6AED}\x{6AEE}\x{6AEF}\x{6AF0}\x{6AF1}\x{6AF2}\x{6AF3}\x{6AF4}\x{6AF5}' - . '\x{6AF6}\x{6AF7}\x{6AF8}\x{6AF9}\x{6AFA}\x{6AFB}\x{6AFC}\x{6AFD}\x{6AFE}' - . '\x{6AFF}\x{6B00}\x{6B01}\x{6B02}\x{6B03}\x{6B04}\x{6B05}\x{6B06}\x{6B07}' - . '\x{6B08}\x{6B09}\x{6B0A}\x{6B0B}\x{6B0C}\x{6B0D}\x{6B0F}\x{6B10}\x{6B11}' - . '\x{6B12}\x{6B13}\x{6B14}\x{6B15}\x{6B16}\x{6B17}\x{6B18}\x{6B19}\x{6B1A}' - . '\x{6B1C}\x{6B1D}\x{6B1E}\x{6B1F}\x{6B20}\x{6B21}\x{6B22}\x{6B23}\x{6B24}' - . '\x{6B25}\x{6B26}\x{6B27}\x{6B28}\x{6B29}\x{6B2A}\x{6B2B}\x{6B2C}\x{6B2D}' - . '\x{6B2F}\x{6B30}\x{6B31}\x{6B32}\x{6B33}\x{6B34}\x{6B36}\x{6B37}\x{6B38}' - . '\x{6B39}\x{6B3A}\x{6B3B}\x{6B3C}\x{6B3D}\x{6B3E}\x{6B3F}\x{6B41}\x{6B42}' - . '\x{6B43}\x{6B44}\x{6B45}\x{6B46}\x{6B47}\x{6B48}\x{6B49}\x{6B4A}\x{6B4B}' - . '\x{6B4C}\x{6B4D}\x{6B4E}\x{6B4F}\x{6B50}\x{6B51}\x{6B52}\x{6B53}\x{6B54}' - . '\x{6B55}\x{6B56}\x{6B59}\x{6B5A}\x{6B5B}\x{6B5C}\x{6B5E}\x{6B5F}\x{6B60}' - . '\x{6B61}\x{6B62}\x{6B63}\x{6B64}\x{6B65}\x{6B66}\x{6B67}\x{6B69}\x{6B6A}' - . '\x{6B6B}\x{6B6D}\x{6B6F}\x{6B70}\x{6B72}\x{6B73}\x{6B74}\x{6B76}\x{6B77}' - . '\x{6B78}\x{6B79}\x{6B7A}\x{6B7B}\x{6B7C}\x{6B7E}\x{6B7F}\x{6B80}\x{6B81}' - . '\x{6B82}\x{6B83}\x{6B84}\x{6B85}\x{6B86}\x{6B87}\x{6B88}\x{6B89}\x{6B8A}' - . '\x{6B8B}\x{6B8C}\x{6B8D}\x{6B8E}\x{6B8F}\x{6B90}\x{6B91}\x{6B92}\x{6B93}' - . '\x{6B94}\x{6B95}\x{6B96}\x{6B97}\x{6B98}\x{6B99}\x{6B9A}\x{6B9B}\x{6B9C}' - . '\x{6B9D}\x{6B9E}\x{6B9F}\x{6BA0}\x{6BA1}\x{6BA2}\x{6BA3}\x{6BA4}\x{6BA5}' - . '\x{6BA6}\x{6BA7}\x{6BA8}\x{6BA9}\x{6BAA}\x{6BAB}\x{6BAC}\x{6BAD}\x{6BAE}' - . '\x{6BAF}\x{6BB0}\x{6BB2}\x{6BB3}\x{6BB4}\x{6BB5}\x{6BB6}\x{6BB7}\x{6BB9}' - . '\x{6BBA}\x{6BBB}\x{6BBC}\x{6BBD}\x{6BBE}\x{6BBF}\x{6BC0}\x{6BC1}\x{6BC2}' - . '\x{6BC3}\x{6BC4}\x{6BC5}\x{6BC6}\x{6BC7}\x{6BC8}\x{6BC9}\x{6BCA}\x{6BCB}' - . '\x{6BCC}\x{6BCD}\x{6BCE}\x{6BCF}\x{6BD0}\x{6BD1}\x{6BD2}\x{6BD3}\x{6BD4}' - . '\x{6BD5}\x{6BD6}\x{6BD7}\x{6BD8}\x{6BD9}\x{6BDA}\x{6BDB}\x{6BDC}\x{6BDD}' - . '\x{6BDE}\x{6BDF}\x{6BE0}\x{6BE1}\x{6BE2}\x{6BE3}\x{6BE4}\x{6BE5}\x{6BE6}' - . '\x{6BE7}\x{6BE8}\x{6BEA}\x{6BEB}\x{6BEC}\x{6BED}\x{6BEE}\x{6BEF}\x{6BF0}' - . '\x{6BF2}\x{6BF3}\x{6BF5}\x{6BF6}\x{6BF7}\x{6BF8}\x{6BF9}\x{6BFB}\x{6BFC}' - . '\x{6BFD}\x{6BFE}\x{6BFF}\x{6C00}\x{6C01}\x{6C02}\x{6C03}\x{6C04}\x{6C05}' - . '\x{6C06}\x{6C07}\x{6C08}\x{6C09}\x{6C0B}\x{6C0C}\x{6C0D}\x{6C0E}\x{6C0F}' - . '\x{6C10}\x{6C11}\x{6C12}\x{6C13}\x{6C14}\x{6C15}\x{6C16}\x{6C18}\x{6C19}' - . '\x{6C1A}\x{6C1B}\x{6C1D}\x{6C1E}\x{6C1F}\x{6C20}\x{6C21}\x{6C22}\x{6C23}' - . '\x{6C24}\x{6C25}\x{6C26}\x{6C27}\x{6C28}\x{6C29}\x{6C2A}\x{6C2B}\x{6C2C}' - . '\x{6C2E}\x{6C2F}\x{6C30}\x{6C31}\x{6C32}\x{6C33}\x{6C34}\x{6C35}\x{6C36}' - . '\x{6C37}\x{6C38}\x{6C3A}\x{6C3B}\x{6C3D}\x{6C3E}\x{6C3F}\x{6C40}\x{6C41}' - . '\x{6C42}\x{6C43}\x{6C44}\x{6C46}\x{6C47}\x{6C48}\x{6C49}\x{6C4A}\x{6C4B}' - . '\x{6C4C}\x{6C4D}\x{6C4E}\x{6C4F}\x{6C50}\x{6C51}\x{6C52}\x{6C53}\x{6C54}' - . '\x{6C55}\x{6C56}\x{6C57}\x{6C58}\x{6C59}\x{6C5A}\x{6C5B}\x{6C5C}\x{6C5D}' - . '\x{6C5E}\x{6C5F}\x{6C60}\x{6C61}\x{6C62}\x{6C63}\x{6C64}\x{6C65}\x{6C66}' - . '\x{6C67}\x{6C68}\x{6C69}\x{6C6A}\x{6C6B}\x{6C6D}\x{6C6F}\x{6C70}\x{6C71}' - . '\x{6C72}\x{6C73}\x{6C74}\x{6C75}\x{6C76}\x{6C77}\x{6C78}\x{6C79}\x{6C7A}' - . '\x{6C7B}\x{6C7C}\x{6C7D}\x{6C7E}\x{6C7F}\x{6C80}\x{6C81}\x{6C82}\x{6C83}' - . '\x{6C84}\x{6C85}\x{6C86}\x{6C87}\x{6C88}\x{6C89}\x{6C8A}\x{6C8B}\x{6C8C}' - . '\x{6C8D}\x{6C8E}\x{6C8F}\x{6C90}\x{6C91}\x{6C92}\x{6C93}\x{6C94}\x{6C95}' - . '\x{6C96}\x{6C97}\x{6C98}\x{6C99}\x{6C9A}\x{6C9B}\x{6C9C}\x{6C9D}\x{6C9E}' - . '\x{6C9F}\x{6CA1}\x{6CA2}\x{6CA3}\x{6CA4}\x{6CA5}\x{6CA6}\x{6CA7}\x{6CA8}' - . '\x{6CA9}\x{6CAA}\x{6CAB}\x{6CAC}\x{6CAD}\x{6CAE}\x{6CAF}\x{6CB0}\x{6CB1}' - . '\x{6CB2}\x{6CB3}\x{6CB4}\x{6CB5}\x{6CB6}\x{6CB7}\x{6CB8}\x{6CB9}\x{6CBA}' - . '\x{6CBB}\x{6CBC}\x{6CBD}\x{6CBE}\x{6CBF}\x{6CC0}\x{6CC1}\x{6CC2}\x{6CC3}' - . '\x{6CC4}\x{6CC5}\x{6CC6}\x{6CC7}\x{6CC8}\x{6CC9}\x{6CCA}\x{6CCB}\x{6CCC}' - . '\x{6CCD}\x{6CCE}\x{6CCF}\x{6CD0}\x{6CD1}\x{6CD2}\x{6CD3}\x{6CD4}\x{6CD5}' - . '\x{6CD6}\x{6CD7}\x{6CD9}\x{6CDA}\x{6CDB}\x{6CDC}\x{6CDD}\x{6CDE}\x{6CDF}' - . '\x{6CE0}\x{6CE1}\x{6CE2}\x{6CE3}\x{6CE4}\x{6CE5}\x{6CE6}\x{6CE7}\x{6CE8}' - . '\x{6CE9}\x{6CEA}\x{6CEB}\x{6CEC}\x{6CED}\x{6CEE}\x{6CEF}\x{6CF0}\x{6CF1}' - . '\x{6CF2}\x{6CF3}\x{6CF5}\x{6CF6}\x{6CF7}\x{6CF8}\x{6CF9}\x{6CFA}\x{6CFB}' - . '\x{6CFC}\x{6CFD}\x{6CFE}\x{6CFF}\x{6D00}\x{6D01}\x{6D03}\x{6D04}\x{6D05}' - . '\x{6D06}\x{6D07}\x{6D08}\x{6D09}\x{6D0A}\x{6D0B}\x{6D0C}\x{6D0D}\x{6D0E}' - . '\x{6D0F}\x{6D10}\x{6D11}\x{6D12}\x{6D13}\x{6D14}\x{6D15}\x{6D16}\x{6D17}' - . '\x{6D18}\x{6D19}\x{6D1A}\x{6D1B}\x{6D1D}\x{6D1E}\x{6D1F}\x{6D20}\x{6D21}' - . '\x{6D22}\x{6D23}\x{6D25}\x{6D26}\x{6D27}\x{6D28}\x{6D29}\x{6D2A}\x{6D2B}' - . '\x{6D2C}\x{6D2D}\x{6D2E}\x{6D2F}\x{6D30}\x{6D31}\x{6D32}\x{6D33}\x{6D34}' - . '\x{6D35}\x{6D36}\x{6D37}\x{6D38}\x{6D39}\x{6D3A}\x{6D3B}\x{6D3C}\x{6D3D}' - . '\x{6D3E}\x{6D3F}\x{6D40}\x{6D41}\x{6D42}\x{6D43}\x{6D44}\x{6D45}\x{6D46}' - . '\x{6D47}\x{6D48}\x{6D49}\x{6D4A}\x{6D4B}\x{6D4C}\x{6D4D}\x{6D4E}\x{6D4F}' - . '\x{6D50}\x{6D51}\x{6D52}\x{6D53}\x{6D54}\x{6D55}\x{6D56}\x{6D57}\x{6D58}' - . '\x{6D59}\x{6D5A}\x{6D5B}\x{6D5C}\x{6D5D}\x{6D5E}\x{6D5F}\x{6D60}\x{6D61}' - . '\x{6D62}\x{6D63}\x{6D64}\x{6D65}\x{6D66}\x{6D67}\x{6D68}\x{6D69}\x{6D6A}' - . '\x{6D6B}\x{6D6C}\x{6D6D}\x{6D6E}\x{6D6F}\x{6D70}\x{6D72}\x{6D73}\x{6D74}' - . '\x{6D75}\x{6D76}\x{6D77}\x{6D78}\x{6D79}\x{6D7A}\x{6D7B}\x{6D7C}\x{6D7D}' - . '\x{6D7E}\x{6D7F}\x{6D80}\x{6D82}\x{6D83}\x{6D84}\x{6D85}\x{6D86}\x{6D87}' - . '\x{6D88}\x{6D89}\x{6D8A}\x{6D8B}\x{6D8C}\x{6D8D}\x{6D8E}\x{6D8F}\x{6D90}' - . '\x{6D91}\x{6D92}\x{6D93}\x{6D94}\x{6D95}\x{6D97}\x{6D98}\x{6D99}\x{6D9A}' - . '\x{6D9B}\x{6D9D}\x{6D9E}\x{6D9F}\x{6DA0}\x{6DA1}\x{6DA2}\x{6DA3}\x{6DA4}' - . '\x{6DA5}\x{6DA6}\x{6DA7}\x{6DA8}\x{6DA9}\x{6DAA}\x{6DAB}\x{6DAC}\x{6DAD}' - . '\x{6DAE}\x{6DAF}\x{6DB2}\x{6DB3}\x{6DB4}\x{6DB5}\x{6DB7}\x{6DB8}\x{6DB9}' - . '\x{6DBA}\x{6DBB}\x{6DBC}\x{6DBD}\x{6DBE}\x{6DBF}\x{6DC0}\x{6DC1}\x{6DC2}' - . '\x{6DC3}\x{6DC4}\x{6DC5}\x{6DC6}\x{6DC7}\x{6DC8}\x{6DC9}\x{6DCA}\x{6DCB}' - . '\x{6DCC}\x{6DCD}\x{6DCE}\x{6DCF}\x{6DD0}\x{6DD1}\x{6DD2}\x{6DD3}\x{6DD4}' - . '\x{6DD5}\x{6DD6}\x{6DD7}\x{6DD8}\x{6DD9}\x{6DDA}\x{6DDB}\x{6DDC}\x{6DDD}' - . '\x{6DDE}\x{6DDF}\x{6DE0}\x{6DE1}\x{6DE2}\x{6DE3}\x{6DE4}\x{6DE5}\x{6DE6}' - . '\x{6DE7}\x{6DE8}\x{6DE9}\x{6DEA}\x{6DEB}\x{6DEC}\x{6DED}\x{6DEE}\x{6DEF}' - . '\x{6DF0}\x{6DF1}\x{6DF2}\x{6DF3}\x{6DF4}\x{6DF5}\x{6DF6}\x{6DF7}\x{6DF8}' - . '\x{6DF9}\x{6DFA}\x{6DFB}\x{6DFC}\x{6DFD}\x{6E00}\x{6E03}\x{6E04}\x{6E05}' - . '\x{6E07}\x{6E08}\x{6E09}\x{6E0A}\x{6E0B}\x{6E0C}\x{6E0D}\x{6E0E}\x{6E0F}' - . '\x{6E10}\x{6E11}\x{6E14}\x{6E15}\x{6E16}\x{6E17}\x{6E19}\x{6E1A}\x{6E1B}' - . '\x{6E1C}\x{6E1D}\x{6E1E}\x{6E1F}\x{6E20}\x{6E21}\x{6E22}\x{6E23}\x{6E24}' - . '\x{6E25}\x{6E26}\x{6E27}\x{6E28}\x{6E29}\x{6E2B}\x{6E2C}\x{6E2D}\x{6E2E}' - . '\x{6E2F}\x{6E30}\x{6E31}\x{6E32}\x{6E33}\x{6E34}\x{6E35}\x{6E36}\x{6E37}' - . '\x{6E38}\x{6E39}\x{6E3A}\x{6E3B}\x{6E3C}\x{6E3D}\x{6E3E}\x{6E3F}\x{6E40}' - . '\x{6E41}\x{6E42}\x{6E43}\x{6E44}\x{6E45}\x{6E46}\x{6E47}\x{6E48}\x{6E49}' - . '\x{6E4A}\x{6E4B}\x{6E4D}\x{6E4E}\x{6E4F}\x{6E50}\x{6E51}\x{6E52}\x{6E53}' - . '\x{6E54}\x{6E55}\x{6E56}\x{6E57}\x{6E58}\x{6E59}\x{6E5A}\x{6E5B}\x{6E5C}' - . '\x{6E5D}\x{6E5E}\x{6E5F}\x{6E60}\x{6E61}\x{6E62}\x{6E63}\x{6E64}\x{6E65}' - . '\x{6E66}\x{6E67}\x{6E68}\x{6E69}\x{6E6A}\x{6E6B}\x{6E6D}\x{6E6E}\x{6E6F}' - . '\x{6E70}\x{6E71}\x{6E72}\x{6E73}\x{6E74}\x{6E75}\x{6E77}\x{6E78}\x{6E79}' - . '\x{6E7E}\x{6E7F}\x{6E80}\x{6E81}\x{6E82}\x{6E83}\x{6E84}\x{6E85}\x{6E86}' - . '\x{6E87}\x{6E88}\x{6E89}\x{6E8A}\x{6E8D}\x{6E8E}\x{6E8F}\x{6E90}\x{6E91}' - . '\x{6E92}\x{6E93}\x{6E94}\x{6E96}\x{6E97}\x{6E98}\x{6E99}\x{6E9A}\x{6E9B}' - . '\x{6E9C}\x{6E9D}\x{6E9E}\x{6E9F}\x{6EA0}\x{6EA1}\x{6EA2}\x{6EA3}\x{6EA4}' - . '\x{6EA5}\x{6EA6}\x{6EA7}\x{6EA8}\x{6EA9}\x{6EAA}\x{6EAB}\x{6EAC}\x{6EAD}' - . '\x{6EAE}\x{6EAF}\x{6EB0}\x{6EB1}\x{6EB2}\x{6EB3}\x{6EB4}\x{6EB5}\x{6EB6}' - . '\x{6EB7}\x{6EB8}\x{6EB9}\x{6EBA}\x{6EBB}\x{6EBC}\x{6EBD}\x{6EBE}\x{6EBF}' - . '\x{6EC0}\x{6EC1}\x{6EC2}\x{6EC3}\x{6EC4}\x{6EC5}\x{6EC6}\x{6EC7}\x{6EC8}' - . '\x{6EC9}\x{6ECA}\x{6ECB}\x{6ECC}\x{6ECD}\x{6ECE}\x{6ECF}\x{6ED0}\x{6ED1}' - . '\x{6ED2}\x{6ED3}\x{6ED4}\x{6ED5}\x{6ED6}\x{6ED7}\x{6ED8}\x{6ED9}\x{6EDA}' - . '\x{6EDC}\x{6EDE}\x{6EDF}\x{6EE0}\x{6EE1}\x{6EE2}\x{6EE4}\x{6EE5}\x{6EE6}' - . '\x{6EE7}\x{6EE8}\x{6EE9}\x{6EEA}\x{6EEB}\x{6EEC}\x{6EED}\x{6EEE}\x{6EEF}' - . '\x{6EF0}\x{6EF1}\x{6EF2}\x{6EF3}\x{6EF4}\x{6EF5}\x{6EF6}\x{6EF7}\x{6EF8}' - . '\x{6EF9}\x{6EFA}\x{6EFB}\x{6EFC}\x{6EFD}\x{6EFE}\x{6EFF}\x{6F00}\x{6F01}' - . '\x{6F02}\x{6F03}\x{6F05}\x{6F06}\x{6F07}\x{6F08}\x{6F09}\x{6F0A}\x{6F0C}' - . '\x{6F0D}\x{6F0E}\x{6F0F}\x{6F10}\x{6F11}\x{6F12}\x{6F13}\x{6F14}\x{6F15}' - . '\x{6F16}\x{6F17}\x{6F18}\x{6F19}\x{6F1A}\x{6F1B}\x{6F1C}\x{6F1D}\x{6F1E}' - . '\x{6F1F}\x{6F20}\x{6F21}\x{6F22}\x{6F23}\x{6F24}\x{6F25}\x{6F26}\x{6F27}' - . '\x{6F28}\x{6F29}\x{6F2A}\x{6F2B}\x{6F2C}\x{6F2D}\x{6F2E}\x{6F2F}\x{6F30}' - . '\x{6F31}\x{6F32}\x{6F33}\x{6F34}\x{6F35}\x{6F36}\x{6F37}\x{6F38}\x{6F39}' - . '\x{6F3A}\x{6F3B}\x{6F3C}\x{6F3D}\x{6F3E}\x{6F3F}\x{6F40}\x{6F41}\x{6F43}' - . '\x{6F44}\x{6F45}\x{6F46}\x{6F47}\x{6F49}\x{6F4B}\x{6F4C}\x{6F4D}\x{6F4E}' - . '\x{6F4F}\x{6F50}\x{6F51}\x{6F52}\x{6F53}\x{6F54}\x{6F55}\x{6F56}\x{6F57}' - . '\x{6F58}\x{6F59}\x{6F5A}\x{6F5B}\x{6F5C}\x{6F5D}\x{6F5E}\x{6F5F}\x{6F60}' - . '\x{6F61}\x{6F62}\x{6F63}\x{6F64}\x{6F65}\x{6F66}\x{6F67}\x{6F68}\x{6F69}' - . '\x{6F6A}\x{6F6B}\x{6F6C}\x{6F6D}\x{6F6E}\x{6F6F}\x{6F70}\x{6F71}\x{6F72}' - . '\x{6F73}\x{6F74}\x{6F75}\x{6F76}\x{6F77}\x{6F78}\x{6F7A}\x{6F7B}\x{6F7C}' - . '\x{6F7D}\x{6F7E}\x{6F7F}\x{6F80}\x{6F81}\x{6F82}\x{6F83}\x{6F84}\x{6F85}' - . '\x{6F86}\x{6F87}\x{6F88}\x{6F89}\x{6F8A}\x{6F8B}\x{6F8C}\x{6F8D}\x{6F8E}' - . '\x{6F8F}\x{6F90}\x{6F91}\x{6F92}\x{6F93}\x{6F94}\x{6F95}\x{6F96}\x{6F97}' - . '\x{6F99}\x{6F9B}\x{6F9C}\x{6F9D}\x{6F9E}\x{6FA0}\x{6FA1}\x{6FA2}\x{6FA3}' - . '\x{6FA4}\x{6FA5}\x{6FA6}\x{6FA7}\x{6FA8}\x{6FA9}\x{6FAA}\x{6FAB}\x{6FAC}' - . '\x{6FAD}\x{6FAE}\x{6FAF}\x{6FB0}\x{6FB1}\x{6FB2}\x{6FB3}\x{6FB4}\x{6FB5}' - . '\x{6FB6}\x{6FB8}\x{6FB9}\x{6FBA}\x{6FBB}\x{6FBC}\x{6FBD}\x{6FBE}\x{6FBF}' - . '\x{6FC0}\x{6FC1}\x{6FC2}\x{6FC3}\x{6FC4}\x{6FC6}\x{6FC7}\x{6FC8}\x{6FC9}' - . '\x{6FCA}\x{6FCB}\x{6FCC}\x{6FCD}\x{6FCE}\x{6FCF}\x{6FD1}\x{6FD2}\x{6FD4}' - . '\x{6FD5}\x{6FD6}\x{6FD7}\x{6FD8}\x{6FD9}\x{6FDA}\x{6FDB}\x{6FDC}\x{6FDD}' - . '\x{6FDE}\x{6FDF}\x{6FE0}\x{6FE1}\x{6FE2}\x{6FE3}\x{6FE4}\x{6FE5}\x{6FE6}' - . '\x{6FE7}\x{6FE8}\x{6FE9}\x{6FEA}\x{6FEB}\x{6FEC}\x{6FED}\x{6FEE}\x{6FEF}' - . '\x{6FF0}\x{6FF1}\x{6FF2}\x{6FF3}\x{6FF4}\x{6FF6}\x{6FF7}\x{6FF8}\x{6FF9}' - . '\x{6FFA}\x{6FFB}\x{6FFC}\x{6FFE}\x{6FFF}\x{7000}\x{7001}\x{7002}\x{7003}' - . '\x{7004}\x{7005}\x{7006}\x{7007}\x{7008}\x{7009}\x{700A}\x{700B}\x{700C}' - . '\x{700D}\x{700E}\x{700F}\x{7011}\x{7012}\x{7014}\x{7015}\x{7016}\x{7017}' - . '\x{7018}\x{7019}\x{701A}\x{701B}\x{701C}\x{701D}\x{701F}\x{7020}\x{7021}' - . '\x{7022}\x{7023}\x{7024}\x{7025}\x{7026}\x{7027}\x{7028}\x{7029}\x{702A}' - . '\x{702B}\x{702C}\x{702D}\x{702E}\x{702F}\x{7030}\x{7031}\x{7032}\x{7033}' - . '\x{7034}\x{7035}\x{7036}\x{7037}\x{7038}\x{7039}\x{703A}\x{703B}\x{703C}' - . '\x{703D}\x{703E}\x{703F}\x{7040}\x{7041}\x{7042}\x{7043}\x{7044}\x{7045}' - . '\x{7046}\x{7048}\x{7049}\x{704A}\x{704C}\x{704D}\x{704F}\x{7050}\x{7051}' - . '\x{7052}\x{7053}\x{7054}\x{7055}\x{7056}\x{7057}\x{7058}\x{7059}\x{705A}' - . '\x{705B}\x{705C}\x{705D}\x{705E}\x{705F}\x{7060}\x{7061}\x{7062}\x{7063}' - . '\x{7064}\x{7065}\x{7066}\x{7067}\x{7068}\x{7069}\x{706A}\x{706B}\x{706C}' - . '\x{706D}\x{706E}\x{706F}\x{7070}\x{7071}\x{7074}\x{7075}\x{7076}\x{7077}' - . '\x{7078}\x{7079}\x{707A}\x{707C}\x{707D}\x{707E}\x{707F}\x{7080}\x{7082}' - . '\x{7083}\x{7084}\x{7085}\x{7086}\x{7087}\x{7088}\x{7089}\x{708A}\x{708B}' - . '\x{708C}\x{708E}\x{708F}\x{7090}\x{7091}\x{7092}\x{7093}\x{7094}\x{7095}' - . '\x{7096}\x{7098}\x{7099}\x{709A}\x{709C}\x{709D}\x{709E}\x{709F}\x{70A0}' - . '\x{70A1}\x{70A2}\x{70A3}\x{70A4}\x{70A5}\x{70A6}\x{70A7}\x{70A8}\x{70A9}' - . '\x{70AB}\x{70AC}\x{70AD}\x{70AE}\x{70AF}\x{70B0}\x{70B1}\x{70B3}\x{70B4}' - . '\x{70B5}\x{70B7}\x{70B8}\x{70B9}\x{70BA}\x{70BB}\x{70BC}\x{70BD}\x{70BE}' - . '\x{70BF}\x{70C0}\x{70C1}\x{70C2}\x{70C3}\x{70C4}\x{70C5}\x{70C6}\x{70C7}' - . '\x{70C8}\x{70C9}\x{70CA}\x{70CB}\x{70CC}\x{70CD}\x{70CE}\x{70CF}\x{70D0}' - . '\x{70D1}\x{70D2}\x{70D3}\x{70D4}\x{70D6}\x{70D7}\x{70D8}\x{70D9}\x{70DA}' - . '\x{70DB}\x{70DC}\x{70DD}\x{70DE}\x{70DF}\x{70E0}\x{70E1}\x{70E2}\x{70E3}' - . '\x{70E4}\x{70E5}\x{70E6}\x{70E7}\x{70E8}\x{70E9}\x{70EA}\x{70EB}\x{70EC}' - . '\x{70ED}\x{70EE}\x{70EF}\x{70F0}\x{70F1}\x{70F2}\x{70F3}\x{70F4}\x{70F5}' - . '\x{70F6}\x{70F7}\x{70F8}\x{70F9}\x{70FA}\x{70FB}\x{70FC}\x{70FD}\x{70FF}' - . '\x{7100}\x{7101}\x{7102}\x{7103}\x{7104}\x{7105}\x{7106}\x{7107}\x{7109}' - . '\x{710A}\x{710B}\x{710C}\x{710D}\x{710E}\x{710F}\x{7110}\x{7111}\x{7112}' - . '\x{7113}\x{7115}\x{7116}\x{7117}\x{7118}\x{7119}\x{711A}\x{711B}\x{711C}' - . '\x{711D}\x{711E}\x{711F}\x{7120}\x{7121}\x{7122}\x{7123}\x{7125}\x{7126}' - . '\x{7127}\x{7128}\x{7129}\x{712A}\x{712B}\x{712C}\x{712D}\x{712E}\x{712F}' - . '\x{7130}\x{7131}\x{7132}\x{7135}\x{7136}\x{7137}\x{7138}\x{7139}\x{713A}' - . '\x{713B}\x{713D}\x{713E}\x{713F}\x{7140}\x{7141}\x{7142}\x{7143}\x{7144}' - . '\x{7145}\x{7146}\x{7147}\x{7148}\x{7149}\x{714A}\x{714B}\x{714C}\x{714D}' - . '\x{714E}\x{714F}\x{7150}\x{7151}\x{7152}\x{7153}\x{7154}\x{7156}\x{7158}' - . '\x{7159}\x{715A}\x{715B}\x{715C}\x{715D}\x{715E}\x{715F}\x{7160}\x{7161}' - . '\x{7162}\x{7163}\x{7164}\x{7165}\x{7166}\x{7167}\x{7168}\x{7169}\x{716A}' - . '\x{716C}\x{716E}\x{716F}\x{7170}\x{7171}\x{7172}\x{7173}\x{7174}\x{7175}' - . '\x{7176}\x{7177}\x{7178}\x{7179}\x{717A}\x{717B}\x{717C}\x{717D}\x{717E}' - . '\x{717F}\x{7180}\x{7181}\x{7182}\x{7183}\x{7184}\x{7185}\x{7186}\x{7187}' - . '\x{7188}\x{7189}\x{718A}\x{718B}\x{718C}\x{718E}\x{718F}\x{7190}\x{7191}' - . '\x{7192}\x{7193}\x{7194}\x{7195}\x{7197}\x{7198}\x{7199}\x{719A}\x{719B}' - . '\x{719C}\x{719D}\x{719E}\x{719F}\x{71A0}\x{71A1}\x{71A2}\x{71A3}\x{71A4}' - . '\x{71A5}\x{71A7}\x{71A8}\x{71A9}\x{71AA}\x{71AC}\x{71AD}\x{71AE}\x{71AF}' - . '\x{71B0}\x{71B1}\x{71B2}\x{71B3}\x{71B4}\x{71B5}\x{71B7}\x{71B8}\x{71B9}' - . '\x{71BA}\x{71BB}\x{71BC}\x{71BD}\x{71BE}\x{71BF}\x{71C0}\x{71C1}\x{71C2}' - . '\x{71C3}\x{71C4}\x{71C5}\x{71C6}\x{71C7}\x{71C8}\x{71C9}\x{71CA}\x{71CB}' - . '\x{71CD}\x{71CE}\x{71CF}\x{71D0}\x{71D1}\x{71D2}\x{71D4}\x{71D5}\x{71D6}' - . '\x{71D7}\x{71D8}\x{71D9}\x{71DA}\x{71DB}\x{71DC}\x{71DD}\x{71DE}\x{71DF}' - . '\x{71E0}\x{71E1}\x{71E2}\x{71E3}\x{71E4}\x{71E5}\x{71E6}\x{71E7}\x{71E8}' - . '\x{71E9}\x{71EA}\x{71EB}\x{71EC}\x{71ED}\x{71EE}\x{71EF}\x{71F0}\x{71F1}' - . '\x{71F2}\x{71F4}\x{71F5}\x{71F6}\x{71F7}\x{71F8}\x{71F9}\x{71FB}\x{71FC}' - . '\x{71FD}\x{71FE}\x{71FF}\x{7201}\x{7202}\x{7203}\x{7204}\x{7205}\x{7206}' - . '\x{7207}\x{7208}\x{7209}\x{720A}\x{720C}\x{720D}\x{720E}\x{720F}\x{7210}' - . '\x{7212}\x{7213}\x{7214}\x{7216}\x{7218}\x{7219}\x{721A}\x{721B}\x{721C}' - . '\x{721D}\x{721E}\x{721F}\x{7221}\x{7222}\x{7223}\x{7226}\x{7227}\x{7228}' - . '\x{7229}\x{722A}\x{722B}\x{722C}\x{722D}\x{722E}\x{7230}\x{7231}\x{7232}' - . '\x{7233}\x{7235}\x{7236}\x{7237}\x{7238}\x{7239}\x{723A}\x{723B}\x{723C}' - . '\x{723D}\x{723E}\x{723F}\x{7240}\x{7241}\x{7242}\x{7243}\x{7244}\x{7246}' - . '\x{7247}\x{7248}\x{7249}\x{724A}\x{724B}\x{724C}\x{724D}\x{724F}\x{7251}' - . '\x{7252}\x{7253}\x{7254}\x{7256}\x{7257}\x{7258}\x{7259}\x{725A}\x{725B}' - . '\x{725C}\x{725D}\x{725E}\x{725F}\x{7260}\x{7261}\x{7262}\x{7263}\x{7264}' - . '\x{7265}\x{7266}\x{7267}\x{7268}\x{7269}\x{726A}\x{726B}\x{726C}\x{726D}' - . '\x{726E}\x{726F}\x{7270}\x{7271}\x{7272}\x{7273}\x{7274}\x{7275}\x{7276}' - . '\x{7277}\x{7278}\x{7279}\x{727A}\x{727B}\x{727C}\x{727D}\x{727E}\x{727F}' - . '\x{7280}\x{7281}\x{7282}\x{7283}\x{7284}\x{7285}\x{7286}\x{7287}\x{7288}' - . '\x{7289}\x{728A}\x{728B}\x{728C}\x{728D}\x{728E}\x{728F}\x{7290}\x{7291}' - . '\x{7292}\x{7293}\x{7294}\x{7295}\x{7296}\x{7297}\x{7298}\x{7299}\x{729A}' - . '\x{729B}\x{729C}\x{729D}\x{729E}\x{729F}\x{72A1}\x{72A2}\x{72A3}\x{72A4}' - . '\x{72A5}\x{72A6}\x{72A7}\x{72A8}\x{72A9}\x{72AA}\x{72AC}\x{72AD}\x{72AE}' - . '\x{72AF}\x{72B0}\x{72B1}\x{72B2}\x{72B3}\x{72B4}\x{72B5}\x{72B6}\x{72B7}' - . '\x{72B8}\x{72B9}\x{72BA}\x{72BB}\x{72BC}\x{72BD}\x{72BF}\x{72C0}\x{72C1}' - . '\x{72C2}\x{72C3}\x{72C4}\x{72C5}\x{72C6}\x{72C7}\x{72C8}\x{72C9}\x{72CA}' - . '\x{72CB}\x{72CC}\x{72CD}\x{72CE}\x{72CF}\x{72D0}\x{72D1}\x{72D2}\x{72D3}' - . '\x{72D4}\x{72D5}\x{72D6}\x{72D7}\x{72D8}\x{72D9}\x{72DA}\x{72DB}\x{72DC}' - . '\x{72DD}\x{72DE}\x{72DF}\x{72E0}\x{72E1}\x{72E2}\x{72E3}\x{72E4}\x{72E5}' - . '\x{72E6}\x{72E7}\x{72E8}\x{72E9}\x{72EA}\x{72EB}\x{72EC}\x{72ED}\x{72EE}' - . '\x{72EF}\x{72F0}\x{72F1}\x{72F2}\x{72F3}\x{72F4}\x{72F5}\x{72F6}\x{72F7}' - . '\x{72F8}\x{72F9}\x{72FA}\x{72FB}\x{72FC}\x{72FD}\x{72FE}\x{72FF}\x{7300}' - . '\x{7301}\x{7303}\x{7304}\x{7305}\x{7306}\x{7307}\x{7308}\x{7309}\x{730A}' - . '\x{730B}\x{730C}\x{730D}\x{730E}\x{730F}\x{7311}\x{7312}\x{7313}\x{7314}' - . '\x{7315}\x{7316}\x{7317}\x{7318}\x{7319}\x{731A}\x{731B}\x{731C}\x{731D}' - . '\x{731E}\x{7320}\x{7321}\x{7322}\x{7323}\x{7324}\x{7325}\x{7326}\x{7327}' - . '\x{7329}\x{732A}\x{732B}\x{732C}\x{732D}\x{732E}\x{7330}\x{7331}\x{7332}' - . '\x{7333}\x{7334}\x{7335}\x{7336}\x{7337}\x{7338}\x{7339}\x{733A}\x{733B}' - . '\x{733C}\x{733D}\x{733E}\x{733F}\x{7340}\x{7341}\x{7342}\x{7343}\x{7344}' - . '\x{7345}\x{7346}\x{7347}\x{7348}\x{7349}\x{734A}\x{734B}\x{734C}\x{734D}' - . '\x{734E}\x{7350}\x{7351}\x{7352}\x{7354}\x{7355}\x{7356}\x{7357}\x{7358}' - . '\x{7359}\x{735A}\x{735B}\x{735C}\x{735D}\x{735E}\x{735F}\x{7360}\x{7361}' - . '\x{7362}\x{7364}\x{7365}\x{7366}\x{7367}\x{7368}\x{7369}\x{736A}\x{736B}' - . '\x{736C}\x{736D}\x{736E}\x{736F}\x{7370}\x{7371}\x{7372}\x{7373}\x{7374}' - . '\x{7375}\x{7376}\x{7377}\x{7378}\x{7379}\x{737A}\x{737B}\x{737C}\x{737D}' - . '\x{737E}\x{737F}\x{7380}\x{7381}\x{7382}\x{7383}\x{7384}\x{7385}\x{7386}' - . '\x{7387}\x{7388}\x{7389}\x{738A}\x{738B}\x{738C}\x{738D}\x{738E}\x{738F}' - . '\x{7390}\x{7391}\x{7392}\x{7393}\x{7394}\x{7395}\x{7396}\x{7397}\x{7398}' - . '\x{7399}\x{739A}\x{739B}\x{739D}\x{739E}\x{739F}\x{73A0}\x{73A1}\x{73A2}' - . '\x{73A3}\x{73A4}\x{73A5}\x{73A6}\x{73A7}\x{73A8}\x{73A9}\x{73AA}\x{73AB}' - . '\x{73AC}\x{73AD}\x{73AE}\x{73AF}\x{73B0}\x{73B1}\x{73B2}\x{73B3}\x{73B4}' - . '\x{73B5}\x{73B6}\x{73B7}\x{73B8}\x{73B9}\x{73BA}\x{73BB}\x{73BC}\x{73BD}' - . '\x{73BE}\x{73BF}\x{73C0}\x{73C2}\x{73C3}\x{73C4}\x{73C5}\x{73C6}\x{73C7}' - . '\x{73C8}\x{73C9}\x{73CA}\x{73CB}\x{73CC}\x{73CD}\x{73CE}\x{73CF}\x{73D0}' - . '\x{73D1}\x{73D2}\x{73D3}\x{73D4}\x{73D5}\x{73D6}\x{73D7}\x{73D8}\x{73D9}' - . '\x{73DA}\x{73DB}\x{73DC}\x{73DD}\x{73DE}\x{73DF}\x{73E0}\x{73E2}\x{73E3}' - . '\x{73E5}\x{73E6}\x{73E7}\x{73E8}\x{73E9}\x{73EA}\x{73EB}\x{73EC}\x{73ED}' - . '\x{73EE}\x{73EF}\x{73F0}\x{73F1}\x{73F2}\x{73F4}\x{73F5}\x{73F6}\x{73F7}' - . '\x{73F8}\x{73F9}\x{73FA}\x{73FC}\x{73FD}\x{73FE}\x{73FF}\x{7400}\x{7401}' - . '\x{7402}\x{7403}\x{7404}\x{7405}\x{7406}\x{7407}\x{7408}\x{7409}\x{740A}' - . '\x{740B}\x{740C}\x{740D}\x{740E}\x{740F}\x{7410}\x{7411}\x{7412}\x{7413}' - . '\x{7414}\x{7415}\x{7416}\x{7417}\x{7419}\x{741A}\x{741B}\x{741C}\x{741D}' - . '\x{741E}\x{741F}\x{7420}\x{7421}\x{7422}\x{7423}\x{7424}\x{7425}\x{7426}' - . '\x{7427}\x{7428}\x{7429}\x{742A}\x{742B}\x{742C}\x{742D}\x{742E}\x{742F}' - . '\x{7430}\x{7431}\x{7432}\x{7433}\x{7434}\x{7435}\x{7436}\x{7437}\x{7438}' - . '\x{743A}\x{743B}\x{743C}\x{743D}\x{743F}\x{7440}\x{7441}\x{7442}\x{7443}' - . '\x{7444}\x{7445}\x{7446}\x{7448}\x{744A}\x{744B}\x{744C}\x{744D}\x{744E}' - . '\x{744F}\x{7450}\x{7451}\x{7452}\x{7453}\x{7454}\x{7455}\x{7456}\x{7457}' - . '\x{7459}\x{745A}\x{745B}\x{745C}\x{745D}\x{745E}\x{745F}\x{7461}\x{7462}' - . '\x{7463}\x{7464}\x{7465}\x{7466}\x{7467}\x{7468}\x{7469}\x{746A}\x{746B}' - . '\x{746C}\x{746D}\x{746E}\x{746F}\x{7470}\x{7471}\x{7472}\x{7473}\x{7474}' - . '\x{7475}\x{7476}\x{7477}\x{7478}\x{7479}\x{747A}\x{747C}\x{747D}\x{747E}' - . '\x{747F}\x{7480}\x{7481}\x{7482}\x{7483}\x{7485}\x{7486}\x{7487}\x{7488}' - . '\x{7489}\x{748A}\x{748B}\x{748C}\x{748D}\x{748E}\x{748F}\x{7490}\x{7491}' - . '\x{7492}\x{7493}\x{7494}\x{7495}\x{7497}\x{7498}\x{7499}\x{749A}\x{749B}' - . '\x{749C}\x{749E}\x{749F}\x{74A0}\x{74A1}\x{74A3}\x{74A4}\x{74A5}\x{74A6}' - . '\x{74A7}\x{74A8}\x{74A9}\x{74AA}\x{74AB}\x{74AC}\x{74AD}\x{74AE}\x{74AF}' - . '\x{74B0}\x{74B1}\x{74B2}\x{74B3}\x{74B4}\x{74B5}\x{74B6}\x{74B7}\x{74B8}' - . '\x{74B9}\x{74BA}\x{74BB}\x{74BC}\x{74BD}\x{74BE}\x{74BF}\x{74C0}\x{74C1}' - . '\x{74C2}\x{74C3}\x{74C4}\x{74C5}\x{74C6}\x{74CA}\x{74CB}\x{74CD}\x{74CE}' - . '\x{74CF}\x{74D0}\x{74D1}\x{74D2}\x{74D3}\x{74D4}\x{74D5}\x{74D6}\x{74D7}' - . '\x{74D8}\x{74D9}\x{74DA}\x{74DB}\x{74DC}\x{74DD}\x{74DE}\x{74DF}\x{74E0}' - . '\x{74E1}\x{74E2}\x{74E3}\x{74E4}\x{74E5}\x{74E6}\x{74E7}\x{74E8}\x{74E9}' - . '\x{74EA}\x{74EC}\x{74ED}\x{74EE}\x{74EF}\x{74F0}\x{74F1}\x{74F2}\x{74F3}' - . '\x{74F4}\x{74F5}\x{74F6}\x{74F7}\x{74F8}\x{74F9}\x{74FA}\x{74FB}\x{74FC}' - . '\x{74FD}\x{74FE}\x{74FF}\x{7500}\x{7501}\x{7502}\x{7503}\x{7504}\x{7505}' - . '\x{7506}\x{7507}\x{7508}\x{7509}\x{750A}\x{750B}\x{750C}\x{750D}\x{750F}' - . '\x{7510}\x{7511}\x{7512}\x{7513}\x{7514}\x{7515}\x{7516}\x{7517}\x{7518}' - . '\x{7519}\x{751A}\x{751B}\x{751C}\x{751D}\x{751E}\x{751F}\x{7521}\x{7522}' - . '\x{7523}\x{7524}\x{7525}\x{7526}\x{7527}\x{7528}\x{7529}\x{752A}\x{752B}' - . '\x{752C}\x{752D}\x{752E}\x{752F}\x{7530}\x{7531}\x{7532}\x{7533}\x{7535}' - . '\x{7536}\x{7537}\x{7538}\x{7539}\x{753A}\x{753B}\x{753C}\x{753D}\x{753E}' - . '\x{753F}\x{7540}\x{7542}\x{7543}\x{7544}\x{7545}\x{7546}\x{7547}\x{7548}' - . '\x{7549}\x{754B}\x{754C}\x{754D}\x{754E}\x{754F}\x{7550}\x{7551}\x{7553}' - . '\x{7554}\x{7556}\x{7557}\x{7558}\x{7559}\x{755A}\x{755B}\x{755C}\x{755D}' - . '\x{755F}\x{7560}\x{7562}\x{7563}\x{7564}\x{7565}\x{7566}\x{7567}\x{7568}' - . '\x{7569}\x{756A}\x{756B}\x{756C}\x{756D}\x{756E}\x{756F}\x{7570}\x{7572}' - . '\x{7574}\x{7575}\x{7576}\x{7577}\x{7578}\x{7579}\x{757C}\x{757D}\x{757E}' - . '\x{757F}\x{7580}\x{7581}\x{7582}\x{7583}\x{7584}\x{7586}\x{7587}\x{7588}' - . '\x{7589}\x{758A}\x{758B}\x{758C}\x{758D}\x{758F}\x{7590}\x{7591}\x{7592}' - . '\x{7593}\x{7594}\x{7595}\x{7596}\x{7597}\x{7598}\x{7599}\x{759A}\x{759B}' - . '\x{759C}\x{759D}\x{759E}\x{759F}\x{75A0}\x{75A1}\x{75A2}\x{75A3}\x{75A4}' - . '\x{75A5}\x{75A6}\x{75A7}\x{75A8}\x{75AA}\x{75AB}\x{75AC}\x{75AD}\x{75AE}' - . '\x{75AF}\x{75B0}\x{75B1}\x{75B2}\x{75B3}\x{75B4}\x{75B5}\x{75B6}\x{75B8}' - . '\x{75B9}\x{75BA}\x{75BB}\x{75BC}\x{75BD}\x{75BE}\x{75BF}\x{75C0}\x{75C1}' - . '\x{75C2}\x{75C3}\x{75C4}\x{75C5}\x{75C6}\x{75C7}\x{75C8}\x{75C9}\x{75CA}' - . '\x{75CB}\x{75CC}\x{75CD}\x{75CE}\x{75CF}\x{75D0}\x{75D1}\x{75D2}\x{75D3}' - . '\x{75D4}\x{75D5}\x{75D6}\x{75D7}\x{75D8}\x{75D9}\x{75DA}\x{75DB}\x{75DD}' - . '\x{75DE}\x{75DF}\x{75E0}\x{75E1}\x{75E2}\x{75E3}\x{75E4}\x{75E5}\x{75E6}' - . '\x{75E7}\x{75E8}\x{75EA}\x{75EB}\x{75EC}\x{75ED}\x{75EF}\x{75F0}\x{75F1}' - . '\x{75F2}\x{75F3}\x{75F4}\x{75F5}\x{75F6}\x{75F7}\x{75F8}\x{75F9}\x{75FA}' - . '\x{75FB}\x{75FC}\x{75FD}\x{75FE}\x{75FF}\x{7600}\x{7601}\x{7602}\x{7603}' - . '\x{7604}\x{7605}\x{7606}\x{7607}\x{7608}\x{7609}\x{760A}\x{760B}\x{760C}' - . '\x{760D}\x{760E}\x{760F}\x{7610}\x{7611}\x{7612}\x{7613}\x{7614}\x{7615}' - . '\x{7616}\x{7617}\x{7618}\x{7619}\x{761A}\x{761B}\x{761C}\x{761D}\x{761E}' - . '\x{761F}\x{7620}\x{7621}\x{7622}\x{7623}\x{7624}\x{7625}\x{7626}\x{7627}' - . '\x{7628}\x{7629}\x{762A}\x{762B}\x{762D}\x{762E}\x{762F}\x{7630}\x{7631}' - . '\x{7632}\x{7633}\x{7634}\x{7635}\x{7636}\x{7637}\x{7638}\x{7639}\x{763A}' - . '\x{763B}\x{763C}\x{763D}\x{763E}\x{763F}\x{7640}\x{7641}\x{7642}\x{7643}' - . '\x{7646}\x{7647}\x{7648}\x{7649}\x{764A}\x{764B}\x{764C}\x{764D}\x{764F}' - . '\x{7650}\x{7652}\x{7653}\x{7654}\x{7656}\x{7657}\x{7658}\x{7659}\x{765A}' - . '\x{765B}\x{765C}\x{765D}\x{765E}\x{765F}\x{7660}\x{7661}\x{7662}\x{7663}' - . '\x{7664}\x{7665}\x{7666}\x{7667}\x{7668}\x{7669}\x{766A}\x{766B}\x{766C}' - . '\x{766D}\x{766E}\x{766F}\x{7670}\x{7671}\x{7672}\x{7674}\x{7675}\x{7676}' - . '\x{7677}\x{7678}\x{7679}\x{767B}\x{767C}\x{767D}\x{767E}\x{767F}\x{7680}' - . '\x{7681}\x{7682}\x{7683}\x{7684}\x{7685}\x{7686}\x{7687}\x{7688}\x{7689}' - . '\x{768A}\x{768B}\x{768C}\x{768E}\x{768F}\x{7690}\x{7691}\x{7692}\x{7693}' - . '\x{7694}\x{7695}\x{7696}\x{7697}\x{7698}\x{7699}\x{769A}\x{769B}\x{769C}' - . '\x{769D}\x{769E}\x{769F}\x{76A0}\x{76A3}\x{76A4}\x{76A6}\x{76A7}\x{76A9}' - . '\x{76AA}\x{76AB}\x{76AC}\x{76AD}\x{76AE}\x{76AF}\x{76B0}\x{76B1}\x{76B2}' - . '\x{76B4}\x{76B5}\x{76B7}\x{76B8}\x{76BA}\x{76BB}\x{76BC}\x{76BD}\x{76BE}' - . '\x{76BF}\x{76C0}\x{76C2}\x{76C3}\x{76C4}\x{76C5}\x{76C6}\x{76C7}\x{76C8}' - . '\x{76C9}\x{76CA}\x{76CD}\x{76CE}\x{76CF}\x{76D0}\x{76D1}\x{76D2}\x{76D3}' - . '\x{76D4}\x{76D5}\x{76D6}\x{76D7}\x{76D8}\x{76DA}\x{76DB}\x{76DC}\x{76DD}' - . '\x{76DE}\x{76DF}\x{76E0}\x{76E1}\x{76E2}\x{76E3}\x{76E4}\x{76E5}\x{76E6}' - . '\x{76E7}\x{76E8}\x{76E9}\x{76EA}\x{76EC}\x{76ED}\x{76EE}\x{76EF}\x{76F0}' - . '\x{76F1}\x{76F2}\x{76F3}\x{76F4}\x{76F5}\x{76F6}\x{76F7}\x{76F8}\x{76F9}' - . '\x{76FA}\x{76FB}\x{76FC}\x{76FD}\x{76FE}\x{76FF}\x{7701}\x{7703}\x{7704}' - . '\x{7705}\x{7706}\x{7707}\x{7708}\x{7709}\x{770A}\x{770B}\x{770C}\x{770D}' - . '\x{770F}\x{7710}\x{7711}\x{7712}\x{7713}\x{7714}\x{7715}\x{7716}\x{7717}' - . '\x{7718}\x{7719}\x{771A}\x{771B}\x{771C}\x{771D}\x{771E}\x{771F}\x{7720}' - . '\x{7722}\x{7723}\x{7725}\x{7726}\x{7727}\x{7728}\x{7729}\x{772A}\x{772C}' - . '\x{772D}\x{772E}\x{772F}\x{7730}\x{7731}\x{7732}\x{7733}\x{7734}\x{7735}' - . '\x{7736}\x{7737}\x{7738}\x{7739}\x{773A}\x{773B}\x{773C}\x{773D}\x{773E}' - . '\x{7740}\x{7741}\x{7743}\x{7744}\x{7745}\x{7746}\x{7747}\x{7748}\x{7749}' - . '\x{774A}\x{774B}\x{774C}\x{774D}\x{774E}\x{774F}\x{7750}\x{7751}\x{7752}' - . '\x{7753}\x{7754}\x{7755}\x{7756}\x{7757}\x{7758}\x{7759}\x{775A}\x{775B}' - . '\x{775C}\x{775D}\x{775E}\x{775F}\x{7760}\x{7761}\x{7762}\x{7763}\x{7765}' - . '\x{7766}\x{7767}\x{7768}\x{7769}\x{776A}\x{776B}\x{776C}\x{776D}\x{776E}' - . '\x{776F}\x{7770}\x{7771}\x{7772}\x{7773}\x{7774}\x{7775}\x{7776}\x{7777}' - . '\x{7778}\x{7779}\x{777A}\x{777B}\x{777C}\x{777D}\x{777E}\x{777F}\x{7780}' - . '\x{7781}\x{7782}\x{7783}\x{7784}\x{7785}\x{7786}\x{7787}\x{7788}\x{7789}' - . '\x{778A}\x{778B}\x{778C}\x{778D}\x{778E}\x{778F}\x{7790}\x{7791}\x{7792}' - . '\x{7793}\x{7794}\x{7795}\x{7797}\x{7798}\x{7799}\x{779A}\x{779B}\x{779C}' - . '\x{779D}\x{779E}\x{779F}\x{77A0}\x{77A1}\x{77A2}\x{77A3}\x{77A5}\x{77A6}' - . '\x{77A7}\x{77A8}\x{77A9}\x{77AA}\x{77AB}\x{77AC}\x{77AD}\x{77AE}\x{77AF}' - . '\x{77B0}\x{77B1}\x{77B2}\x{77B3}\x{77B4}\x{77B5}\x{77B6}\x{77B7}\x{77B8}' - . '\x{77B9}\x{77BA}\x{77BB}\x{77BC}\x{77BD}\x{77BF}\x{77C0}\x{77C2}\x{77C3}' - . '\x{77C4}\x{77C5}\x{77C6}\x{77C7}\x{77C8}\x{77C9}\x{77CA}\x{77CB}\x{77CC}' - . '\x{77CD}\x{77CE}\x{77CF}\x{77D0}\x{77D1}\x{77D3}\x{77D4}\x{77D5}\x{77D6}' - . '\x{77D7}\x{77D8}\x{77D9}\x{77DA}\x{77DB}\x{77DC}\x{77DE}\x{77DF}\x{77E0}' - . '\x{77E1}\x{77E2}\x{77E3}\x{77E5}\x{77E7}\x{77E8}\x{77E9}\x{77EA}\x{77EB}' - . '\x{77EC}\x{77ED}\x{77EE}\x{77EF}\x{77F0}\x{77F1}\x{77F2}\x{77F3}\x{77F6}' - . '\x{77F7}\x{77F8}\x{77F9}\x{77FA}\x{77FB}\x{77FC}\x{77FD}\x{77FE}\x{77FF}' - . '\x{7800}\x{7801}\x{7802}\x{7803}\x{7804}\x{7805}\x{7806}\x{7808}\x{7809}' - . '\x{780A}\x{780B}\x{780C}\x{780D}\x{780E}\x{780F}\x{7810}\x{7811}\x{7812}' - . '\x{7813}\x{7814}\x{7815}\x{7816}\x{7817}\x{7818}\x{7819}\x{781A}\x{781B}' - . '\x{781C}\x{781D}\x{781E}\x{781F}\x{7820}\x{7821}\x{7822}\x{7823}\x{7825}' - . '\x{7826}\x{7827}\x{7828}\x{7829}\x{782A}\x{782B}\x{782C}\x{782D}\x{782E}' - . '\x{782F}\x{7830}\x{7831}\x{7832}\x{7833}\x{7834}\x{7835}\x{7837}\x{7838}' - . '\x{7839}\x{783A}\x{783B}\x{783C}\x{783D}\x{783E}\x{7840}\x{7841}\x{7843}' - . '\x{7844}\x{7845}\x{7847}\x{7848}\x{7849}\x{784A}\x{784C}\x{784D}\x{784E}' - . '\x{7850}\x{7851}\x{7852}\x{7853}\x{7854}\x{7855}\x{7856}\x{7857}\x{7858}' - . '\x{7859}\x{785A}\x{785B}\x{785C}\x{785D}\x{785E}\x{785F}\x{7860}\x{7861}' - . '\x{7862}\x{7863}\x{7864}\x{7865}\x{7866}\x{7867}\x{7868}\x{7869}\x{786A}' - . '\x{786B}\x{786C}\x{786D}\x{786E}\x{786F}\x{7870}\x{7871}\x{7872}\x{7873}' - . '\x{7874}\x{7875}\x{7877}\x{7878}\x{7879}\x{787A}\x{787B}\x{787C}\x{787D}' - . '\x{787E}\x{787F}\x{7880}\x{7881}\x{7882}\x{7883}\x{7884}\x{7885}\x{7886}' - . '\x{7887}\x{7889}\x{788A}\x{788B}\x{788C}\x{788D}\x{788E}\x{788F}\x{7890}' - . '\x{7891}\x{7892}\x{7893}\x{7894}\x{7895}\x{7896}\x{7897}\x{7898}\x{7899}' - . '\x{789A}\x{789B}\x{789C}\x{789D}\x{789E}\x{789F}\x{78A0}\x{78A1}\x{78A2}' - . '\x{78A3}\x{78A4}\x{78A5}\x{78A6}\x{78A7}\x{78A8}\x{78A9}\x{78AA}\x{78AB}' - . '\x{78AC}\x{78AD}\x{78AE}\x{78AF}\x{78B0}\x{78B1}\x{78B2}\x{78B3}\x{78B4}' - . '\x{78B5}\x{78B6}\x{78B7}\x{78B8}\x{78B9}\x{78BA}\x{78BB}\x{78BC}\x{78BD}' - . '\x{78BE}\x{78BF}\x{78C0}\x{78C1}\x{78C3}\x{78C4}\x{78C5}\x{78C6}\x{78C8}' - . '\x{78C9}\x{78CA}\x{78CB}\x{78CC}\x{78CD}\x{78CE}\x{78CF}\x{78D0}\x{78D1}' - . '\x{78D3}\x{78D4}\x{78D5}\x{78D6}\x{78D7}\x{78D8}\x{78D9}\x{78DA}\x{78DB}' - . '\x{78DC}\x{78DD}\x{78DE}\x{78DF}\x{78E0}\x{78E1}\x{78E2}\x{78E3}\x{78E4}' - . '\x{78E5}\x{78E6}\x{78E7}\x{78E8}\x{78E9}\x{78EA}\x{78EB}\x{78EC}\x{78ED}' - . '\x{78EE}\x{78EF}\x{78F1}\x{78F2}\x{78F3}\x{78F4}\x{78F5}\x{78F6}\x{78F7}' - . '\x{78F9}\x{78FA}\x{78FB}\x{78FC}\x{78FD}\x{78FE}\x{78FF}\x{7901}\x{7902}' - . '\x{7903}\x{7904}\x{7905}\x{7906}\x{7907}\x{7909}\x{790A}\x{790B}\x{790C}' - . '\x{790E}\x{790F}\x{7910}\x{7911}\x{7912}\x{7913}\x{7914}\x{7916}\x{7917}' - . '\x{7918}\x{7919}\x{791A}\x{791B}\x{791C}\x{791D}\x{791E}\x{7921}\x{7922}' - . '\x{7923}\x{7924}\x{7925}\x{7926}\x{7927}\x{7928}\x{7929}\x{792A}\x{792B}' - . '\x{792C}\x{792D}\x{792E}\x{792F}\x{7930}\x{7931}\x{7933}\x{7934}\x{7935}' - . '\x{7937}\x{7938}\x{7939}\x{793A}\x{793B}\x{793C}\x{793D}\x{793E}\x{793F}' - . '\x{7940}\x{7941}\x{7942}\x{7943}\x{7944}\x{7945}\x{7946}\x{7947}\x{7948}' - . '\x{7949}\x{794A}\x{794B}\x{794C}\x{794D}\x{794E}\x{794F}\x{7950}\x{7951}' - . '\x{7952}\x{7953}\x{7954}\x{7955}\x{7956}\x{7957}\x{7958}\x{795A}\x{795B}' - . '\x{795C}\x{795D}\x{795E}\x{795F}\x{7960}\x{7961}\x{7962}\x{7963}\x{7964}' - . '\x{7965}\x{7966}\x{7967}\x{7968}\x{7969}\x{796A}\x{796B}\x{796D}\x{796F}' - . '\x{7970}\x{7971}\x{7972}\x{7973}\x{7974}\x{7977}\x{7978}\x{7979}\x{797A}' - . '\x{797B}\x{797C}\x{797D}\x{797E}\x{797F}\x{7980}\x{7981}\x{7982}\x{7983}' - . '\x{7984}\x{7985}\x{7988}\x{7989}\x{798A}\x{798B}\x{798C}\x{798D}\x{798E}' - . '\x{798F}\x{7990}\x{7991}\x{7992}\x{7993}\x{7994}\x{7995}\x{7996}\x{7997}' - . '\x{7998}\x{7999}\x{799A}\x{799B}\x{799C}\x{799F}\x{79A0}\x{79A1}\x{79A2}' - . '\x{79A3}\x{79A4}\x{79A5}\x{79A6}\x{79A7}\x{79A8}\x{79AA}\x{79AB}\x{79AC}' - . '\x{79AD}\x{79AE}\x{79AF}\x{79B0}\x{79B1}\x{79B2}\x{79B3}\x{79B4}\x{79B5}' - . '\x{79B6}\x{79B7}\x{79B8}\x{79B9}\x{79BA}\x{79BB}\x{79BD}\x{79BE}\x{79BF}' - . '\x{79C0}\x{79C1}\x{79C2}\x{79C3}\x{79C5}\x{79C6}\x{79C8}\x{79C9}\x{79CA}' - . '\x{79CB}\x{79CD}\x{79CE}\x{79CF}\x{79D0}\x{79D1}\x{79D2}\x{79D3}\x{79D5}' - . '\x{79D6}\x{79D8}\x{79D9}\x{79DA}\x{79DB}\x{79DC}\x{79DD}\x{79DE}\x{79DF}' - . '\x{79E0}\x{79E1}\x{79E2}\x{79E3}\x{79E4}\x{79E5}\x{79E6}\x{79E7}\x{79E8}' - . '\x{79E9}\x{79EA}\x{79EB}\x{79EC}\x{79ED}\x{79EE}\x{79EF}\x{79F0}\x{79F1}' - . '\x{79F2}\x{79F3}\x{79F4}\x{79F5}\x{79F6}\x{79F7}\x{79F8}\x{79F9}\x{79FA}' - . '\x{79FB}\x{79FC}\x{79FD}\x{79FE}\x{79FF}\x{7A00}\x{7A02}\x{7A03}\x{7A04}' - . '\x{7A05}\x{7A06}\x{7A08}\x{7A0A}\x{7A0B}\x{7A0C}\x{7A0D}\x{7A0E}\x{7A0F}' - . '\x{7A10}\x{7A11}\x{7A12}\x{7A13}\x{7A14}\x{7A15}\x{7A16}\x{7A17}\x{7A18}' - . '\x{7A19}\x{7A1A}\x{7A1B}\x{7A1C}\x{7A1D}\x{7A1E}\x{7A1F}\x{7A20}\x{7A21}' - . '\x{7A22}\x{7A23}\x{7A24}\x{7A25}\x{7A26}\x{7A27}\x{7A28}\x{7A29}\x{7A2A}' - . '\x{7A2B}\x{7A2D}\x{7A2E}\x{7A2F}\x{7A30}\x{7A31}\x{7A32}\x{7A33}\x{7A34}' - . '\x{7A35}\x{7A37}\x{7A39}\x{7A3B}\x{7A3C}\x{7A3D}\x{7A3E}\x{7A3F}\x{7A40}' - . '\x{7A41}\x{7A42}\x{7A43}\x{7A44}\x{7A45}\x{7A46}\x{7A47}\x{7A48}\x{7A49}' - . '\x{7A4A}\x{7A4B}\x{7A4C}\x{7A4D}\x{7A4E}\x{7A50}\x{7A51}\x{7A52}\x{7A53}' - . '\x{7A54}\x{7A55}\x{7A56}\x{7A57}\x{7A58}\x{7A59}\x{7A5A}\x{7A5B}\x{7A5C}' - . '\x{7A5D}\x{7A5E}\x{7A5F}\x{7A60}\x{7A61}\x{7A62}\x{7A65}\x{7A66}\x{7A67}' - . '\x{7A68}\x{7A69}\x{7A6B}\x{7A6C}\x{7A6D}\x{7A6E}\x{7A70}\x{7A71}\x{7A72}' - . '\x{7A73}\x{7A74}\x{7A75}\x{7A76}\x{7A77}\x{7A78}\x{7A79}\x{7A7A}\x{7A7B}' - . '\x{7A7C}\x{7A7D}\x{7A7E}\x{7A7F}\x{7A80}\x{7A81}\x{7A83}\x{7A84}\x{7A85}' - . '\x{7A86}\x{7A87}\x{7A88}\x{7A89}\x{7A8A}\x{7A8B}\x{7A8C}\x{7A8D}\x{7A8E}' - . '\x{7A8F}\x{7A90}\x{7A91}\x{7A92}\x{7A93}\x{7A94}\x{7A95}\x{7A96}\x{7A97}' - . '\x{7A98}\x{7A99}\x{7A9C}\x{7A9D}\x{7A9E}\x{7A9F}\x{7AA0}\x{7AA1}\x{7AA2}' - . '\x{7AA3}\x{7AA4}\x{7AA5}\x{7AA6}\x{7AA7}\x{7AA8}\x{7AA9}\x{7AAA}\x{7AAB}' - . '\x{7AAC}\x{7AAD}\x{7AAE}\x{7AAF}\x{7AB0}\x{7AB1}\x{7AB2}\x{7AB3}\x{7AB4}' - . '\x{7AB5}\x{7AB6}\x{7AB7}\x{7AB8}\x{7ABA}\x{7ABE}\x{7ABF}\x{7AC0}\x{7AC1}' - . '\x{7AC4}\x{7AC5}\x{7AC7}\x{7AC8}\x{7AC9}\x{7ACA}\x{7ACB}\x{7ACC}\x{7ACD}' - . '\x{7ACE}\x{7ACF}\x{7AD0}\x{7AD1}\x{7AD2}\x{7AD3}\x{7AD4}\x{7AD5}\x{7AD6}' - . '\x{7AD8}\x{7AD9}\x{7ADB}\x{7ADC}\x{7ADD}\x{7ADE}\x{7ADF}\x{7AE0}\x{7AE1}' - . '\x{7AE2}\x{7AE3}\x{7AE4}\x{7AE5}\x{7AE6}\x{7AE7}\x{7AE8}\x{7AEA}\x{7AEB}' - . '\x{7AEC}\x{7AED}\x{7AEE}\x{7AEF}\x{7AF0}\x{7AF1}\x{7AF2}\x{7AF3}\x{7AF4}' - . '\x{7AF6}\x{7AF7}\x{7AF8}\x{7AF9}\x{7AFA}\x{7AFB}\x{7AFD}\x{7AFE}\x{7AFF}' - . '\x{7B00}\x{7B01}\x{7B02}\x{7B03}\x{7B04}\x{7B05}\x{7B06}\x{7B08}\x{7B09}' - . '\x{7B0A}\x{7B0B}\x{7B0C}\x{7B0D}\x{7B0E}\x{7B0F}\x{7B10}\x{7B11}\x{7B12}' - . '\x{7B13}\x{7B14}\x{7B15}\x{7B16}\x{7B17}\x{7B18}\x{7B19}\x{7B1A}\x{7B1B}' - . '\x{7B1C}\x{7B1D}\x{7B1E}\x{7B20}\x{7B21}\x{7B22}\x{7B23}\x{7B24}\x{7B25}' - . '\x{7B26}\x{7B28}\x{7B2A}\x{7B2B}\x{7B2C}\x{7B2D}\x{7B2E}\x{7B2F}\x{7B30}' - . '\x{7B31}\x{7B32}\x{7B33}\x{7B34}\x{7B35}\x{7B36}\x{7B37}\x{7B38}\x{7B39}' - . '\x{7B3A}\x{7B3B}\x{7B3C}\x{7B3D}\x{7B3E}\x{7B3F}\x{7B40}\x{7B41}\x{7B43}' - . '\x{7B44}\x{7B45}\x{7B46}\x{7B47}\x{7B48}\x{7B49}\x{7B4A}\x{7B4B}\x{7B4C}' - . '\x{7B4D}\x{7B4E}\x{7B4F}\x{7B50}\x{7B51}\x{7B52}\x{7B54}\x{7B55}\x{7B56}' - . '\x{7B57}\x{7B58}\x{7B59}\x{7B5A}\x{7B5B}\x{7B5C}\x{7B5D}\x{7B5E}\x{7B5F}' - . '\x{7B60}\x{7B61}\x{7B62}\x{7B63}\x{7B64}\x{7B65}\x{7B66}\x{7B67}\x{7B68}' - . '\x{7B69}\x{7B6A}\x{7B6B}\x{7B6C}\x{7B6D}\x{7B6E}\x{7B70}\x{7B71}\x{7B72}' - . '\x{7B73}\x{7B74}\x{7B75}\x{7B76}\x{7B77}\x{7B78}\x{7B79}\x{7B7B}\x{7B7C}' - . '\x{7B7D}\x{7B7E}\x{7B7F}\x{7B80}\x{7B81}\x{7B82}\x{7B83}\x{7B84}\x{7B85}' - . '\x{7B87}\x{7B88}\x{7B89}\x{7B8A}\x{7B8B}\x{7B8C}\x{7B8D}\x{7B8E}\x{7B8F}' - . '\x{7B90}\x{7B91}\x{7B93}\x{7B94}\x{7B95}\x{7B96}\x{7B97}\x{7B98}\x{7B99}' - . '\x{7B9A}\x{7B9B}\x{7B9C}\x{7B9D}\x{7B9E}\x{7B9F}\x{7BA0}\x{7BA1}\x{7BA2}' - . '\x{7BA4}\x{7BA6}\x{7BA7}\x{7BA8}\x{7BA9}\x{7BAA}\x{7BAB}\x{7BAC}\x{7BAD}' - . '\x{7BAE}\x{7BAF}\x{7BB1}\x{7BB3}\x{7BB4}\x{7BB5}\x{7BB6}\x{7BB7}\x{7BB8}' - . '\x{7BB9}\x{7BBA}\x{7BBB}\x{7BBC}\x{7BBD}\x{7BBE}\x{7BBF}\x{7BC0}\x{7BC1}' - . '\x{7BC2}\x{7BC3}\x{7BC4}\x{7BC5}\x{7BC6}\x{7BC7}\x{7BC8}\x{7BC9}\x{7BCA}' - . '\x{7BCB}\x{7BCC}\x{7BCD}\x{7BCE}\x{7BD0}\x{7BD1}\x{7BD2}\x{7BD3}\x{7BD4}' - . '\x{7BD5}\x{7BD6}\x{7BD7}\x{7BD8}\x{7BD9}\x{7BDA}\x{7BDB}\x{7BDC}\x{7BDD}' - . '\x{7BDE}\x{7BDF}\x{7BE0}\x{7BE1}\x{7BE2}\x{7BE3}\x{7BE4}\x{7BE5}\x{7BE6}' - . '\x{7BE7}\x{7BE8}\x{7BE9}\x{7BEA}\x{7BEB}\x{7BEC}\x{7BED}\x{7BEE}\x{7BEF}' - . '\x{7BF0}\x{7BF1}\x{7BF2}\x{7BF3}\x{7BF4}\x{7BF5}\x{7BF6}\x{7BF7}\x{7BF8}' - . '\x{7BF9}\x{7BFB}\x{7BFC}\x{7BFD}\x{7BFE}\x{7BFF}\x{7C00}\x{7C01}\x{7C02}' - . '\x{7C03}\x{7C04}\x{7C05}\x{7C06}\x{7C07}\x{7C08}\x{7C09}\x{7C0A}\x{7C0B}' - . '\x{7C0C}\x{7C0D}\x{7C0E}\x{7C0F}\x{7C10}\x{7C11}\x{7C12}\x{7C13}\x{7C15}' - . '\x{7C16}\x{7C17}\x{7C18}\x{7C19}\x{7C1A}\x{7C1C}\x{7C1D}\x{7C1E}\x{7C1F}' - . '\x{7C20}\x{7C21}\x{7C22}\x{7C23}\x{7C24}\x{7C25}\x{7C26}\x{7C27}\x{7C28}' - . '\x{7C29}\x{7C2A}\x{7C2B}\x{7C2C}\x{7C2D}\x{7C30}\x{7C31}\x{7C32}\x{7C33}' - . '\x{7C34}\x{7C35}\x{7C36}\x{7C37}\x{7C38}\x{7C39}\x{7C3A}\x{7C3B}\x{7C3C}' - . '\x{7C3D}\x{7C3E}\x{7C3F}\x{7C40}\x{7C41}\x{7C42}\x{7C43}\x{7C44}\x{7C45}' - . '\x{7C46}\x{7C47}\x{7C48}\x{7C49}\x{7C4A}\x{7C4B}\x{7C4C}\x{7C4D}\x{7C4E}' - . '\x{7C50}\x{7C51}\x{7C53}\x{7C54}\x{7C56}\x{7C57}\x{7C58}\x{7C59}\x{7C5A}' - . '\x{7C5B}\x{7C5C}\x{7C5E}\x{7C5F}\x{7C60}\x{7C61}\x{7C62}\x{7C63}\x{7C64}' - . '\x{7C65}\x{7C66}\x{7C67}\x{7C68}\x{7C69}\x{7C6A}\x{7C6B}\x{7C6C}\x{7C6D}' - . '\x{7C6E}\x{7C6F}\x{7C70}\x{7C71}\x{7C72}\x{7C73}\x{7C74}\x{7C75}\x{7C77}' - . '\x{7C78}\x{7C79}\x{7C7A}\x{7C7B}\x{7C7C}\x{7C7D}\x{7C7E}\x{7C7F}\x{7C80}' - . '\x{7C81}\x{7C82}\x{7C84}\x{7C85}\x{7C86}\x{7C88}\x{7C89}\x{7C8A}\x{7C8B}' - . '\x{7C8C}\x{7C8D}\x{7C8E}\x{7C8F}\x{7C90}\x{7C91}\x{7C92}\x{7C94}\x{7C95}' - . '\x{7C96}\x{7C97}\x{7C98}\x{7C99}\x{7C9B}\x{7C9C}\x{7C9D}\x{7C9E}\x{7C9F}' - . '\x{7CA0}\x{7CA1}\x{7CA2}\x{7CA3}\x{7CA4}\x{7CA5}\x{7CA6}\x{7CA7}\x{7CA8}' - . '\x{7CA9}\x{7CAA}\x{7CAD}\x{7CAE}\x{7CAF}\x{7CB0}\x{7CB1}\x{7CB2}\x{7CB3}' - . '\x{7CB4}\x{7CB5}\x{7CB6}\x{7CB7}\x{7CB8}\x{7CB9}\x{7CBA}\x{7CBB}\x{7CBC}' - . '\x{7CBD}\x{7CBE}\x{7CBF}\x{7CC0}\x{7CC1}\x{7CC2}\x{7CC3}\x{7CC4}\x{7CC5}' - . '\x{7CC6}\x{7CC7}\x{7CC8}\x{7CC9}\x{7CCA}\x{7CCB}\x{7CCC}\x{7CCD}\x{7CCE}' - . '\x{7CCF}\x{7CD0}\x{7CD1}\x{7CD2}\x{7CD4}\x{7CD5}\x{7CD6}\x{7CD7}\x{7CD8}' - . '\x{7CD9}\x{7CDC}\x{7CDD}\x{7CDE}\x{7CDF}\x{7CE0}\x{7CE2}\x{7CE4}\x{7CE7}' - . '\x{7CE8}\x{7CE9}\x{7CEA}\x{7CEB}\x{7CEC}\x{7CED}\x{7CEE}\x{7CEF}\x{7CF0}' - . '\x{7CF1}\x{7CF2}\x{7CF3}\x{7CF4}\x{7CF5}\x{7CF6}\x{7CF7}\x{7CF8}\x{7CF9}' - . '\x{7CFA}\x{7CFB}\x{7CFD}\x{7CFE}\x{7D00}\x{7D01}\x{7D02}\x{7D03}\x{7D04}' - . '\x{7D05}\x{7D06}\x{7D07}\x{7D08}\x{7D09}\x{7D0A}\x{7D0B}\x{7D0C}\x{7D0D}' - . '\x{7D0E}\x{7D0F}\x{7D10}\x{7D11}\x{7D12}\x{7D13}\x{7D14}\x{7D15}\x{7D16}' - . '\x{7D17}\x{7D18}\x{7D19}\x{7D1A}\x{7D1B}\x{7D1C}\x{7D1D}\x{7D1E}\x{7D1F}' - . '\x{7D20}\x{7D21}\x{7D22}\x{7D24}\x{7D25}\x{7D26}\x{7D27}\x{7D28}\x{7D29}' - . '\x{7D2B}\x{7D2C}\x{7D2E}\x{7D2F}\x{7D30}\x{7D31}\x{7D32}\x{7D33}\x{7D34}' - . '\x{7D35}\x{7D36}\x{7D37}\x{7D38}\x{7D39}\x{7D3A}\x{7D3B}\x{7D3C}\x{7D3D}' - . '\x{7D3E}\x{7D3F}\x{7D40}\x{7D41}\x{7D42}\x{7D43}\x{7D44}\x{7D45}\x{7D46}' - . '\x{7D47}\x{7D49}\x{7D4A}\x{7D4B}\x{7D4C}\x{7D4E}\x{7D4F}\x{7D50}\x{7D51}' - . '\x{7D52}\x{7D53}\x{7D54}\x{7D55}\x{7D56}\x{7D57}\x{7D58}\x{7D59}\x{7D5B}' - . '\x{7D5C}\x{7D5D}\x{7D5E}\x{7D5F}\x{7D60}\x{7D61}\x{7D62}\x{7D63}\x{7D65}' - . '\x{7D66}\x{7D67}\x{7D68}\x{7D69}\x{7D6A}\x{7D6B}\x{7D6C}\x{7D6D}\x{7D6E}' - . '\x{7D6F}\x{7D70}\x{7D71}\x{7D72}\x{7D73}\x{7D74}\x{7D75}\x{7D76}\x{7D77}' - . '\x{7D79}\x{7D7A}\x{7D7B}\x{7D7C}\x{7D7D}\x{7D7E}\x{7D7F}\x{7D80}\x{7D81}' - . '\x{7D83}\x{7D84}\x{7D85}\x{7D86}\x{7D87}\x{7D88}\x{7D89}\x{7D8A}\x{7D8B}' - . '\x{7D8C}\x{7D8D}\x{7D8E}\x{7D8F}\x{7D90}\x{7D91}\x{7D92}\x{7D93}\x{7D94}' - . '\x{7D96}\x{7D97}\x{7D99}\x{7D9B}\x{7D9C}\x{7D9D}\x{7D9E}\x{7D9F}\x{7DA0}' - . '\x{7DA1}\x{7DA2}\x{7DA3}\x{7DA5}\x{7DA6}\x{7DA7}\x{7DA9}\x{7DAA}\x{7DAB}' - . '\x{7DAC}\x{7DAD}\x{7DAE}\x{7DAF}\x{7DB0}\x{7DB1}\x{7DB2}\x{7DB3}\x{7DB4}' - . '\x{7DB5}\x{7DB6}\x{7DB7}\x{7DB8}\x{7DB9}\x{7DBA}\x{7DBB}\x{7DBC}\x{7DBD}' - . '\x{7DBE}\x{7DBF}\x{7DC0}\x{7DC1}\x{7DC2}\x{7DC3}\x{7DC4}\x{7DC5}\x{7DC6}' - . '\x{7DC7}\x{7DC8}\x{7DC9}\x{7DCA}\x{7DCB}\x{7DCC}\x{7DCE}\x{7DCF}\x{7DD0}' - . '\x{7DD1}\x{7DD2}\x{7DD4}\x{7DD5}\x{7DD6}\x{7DD7}\x{7DD8}\x{7DD9}\x{7DDA}' - . '\x{7DDB}\x{7DDD}\x{7DDE}\x{7DDF}\x{7DE0}\x{7DE1}\x{7DE2}\x{7DE3}\x{7DE6}' - . '\x{7DE7}\x{7DE8}\x{7DE9}\x{7DEA}\x{7DEC}\x{7DED}\x{7DEE}\x{7DEF}\x{7DF0}' - . '\x{7DF1}\x{7DF2}\x{7DF3}\x{7DF4}\x{7DF5}\x{7DF6}\x{7DF7}\x{7DF8}\x{7DF9}' - . '\x{7DFA}\x{7DFB}\x{7DFC}\x{7E00}\x{7E01}\x{7E02}\x{7E03}\x{7E04}\x{7E05}' - . '\x{7E06}\x{7E07}\x{7E08}\x{7E09}\x{7E0A}\x{7E0B}\x{7E0C}\x{7E0D}\x{7E0E}' - . '\x{7E0F}\x{7E10}\x{7E11}\x{7E12}\x{7E13}\x{7E14}\x{7E15}\x{7E16}\x{7E17}' - . '\x{7E19}\x{7E1A}\x{7E1B}\x{7E1C}\x{7E1D}\x{7E1E}\x{7E1F}\x{7E20}\x{7E21}' - . '\x{7E22}\x{7E23}\x{7E24}\x{7E25}\x{7E26}\x{7E27}\x{7E28}\x{7E29}\x{7E2A}' - . '\x{7E2B}\x{7E2C}\x{7E2D}\x{7E2E}\x{7E2F}\x{7E30}\x{7E31}\x{7E32}\x{7E33}' - . '\x{7E34}\x{7E35}\x{7E36}\x{7E37}\x{7E38}\x{7E39}\x{7E3A}\x{7E3B}\x{7E3C}' - . '\x{7E3D}\x{7E3E}\x{7E3F}\x{7E40}\x{7E41}\x{7E42}\x{7E43}\x{7E44}\x{7E45}' - . '\x{7E46}\x{7E47}\x{7E48}\x{7E49}\x{7E4C}\x{7E4D}\x{7E4E}\x{7E4F}\x{7E50}' - . '\x{7E51}\x{7E52}\x{7E53}\x{7E54}\x{7E55}\x{7E56}\x{7E57}\x{7E58}\x{7E59}' - . '\x{7E5A}\x{7E5C}\x{7E5D}\x{7E5E}\x{7E5F}\x{7E60}\x{7E61}\x{7E62}\x{7E63}' - . '\x{7E65}\x{7E66}\x{7E67}\x{7E68}\x{7E69}\x{7E6A}\x{7E6B}\x{7E6C}\x{7E6D}' - . '\x{7E6E}\x{7E6F}\x{7E70}\x{7E71}\x{7E72}\x{7E73}\x{7E74}\x{7E75}\x{7E76}' - . '\x{7E77}\x{7E78}\x{7E79}\x{7E7A}\x{7E7B}\x{7E7C}\x{7E7D}\x{7E7E}\x{7E7F}' - . '\x{7E80}\x{7E81}\x{7E82}\x{7E83}\x{7E84}\x{7E85}\x{7E86}\x{7E87}\x{7E88}' - . '\x{7E89}\x{7E8A}\x{7E8B}\x{7E8C}\x{7E8D}\x{7E8E}\x{7E8F}\x{7E90}\x{7E91}' - . '\x{7E92}\x{7E93}\x{7E94}\x{7E95}\x{7E96}\x{7E97}\x{7E98}\x{7E99}\x{7E9A}' - . '\x{7E9B}\x{7E9C}\x{7E9E}\x{7E9F}\x{7EA0}\x{7EA1}\x{7EA2}\x{7EA3}\x{7EA4}' - . '\x{7EA5}\x{7EA6}\x{7EA7}\x{7EA8}\x{7EA9}\x{7EAA}\x{7EAB}\x{7EAC}\x{7EAD}' - . '\x{7EAE}\x{7EAF}\x{7EB0}\x{7EB1}\x{7EB2}\x{7EB3}\x{7EB4}\x{7EB5}\x{7EB6}' - . '\x{7EB7}\x{7EB8}\x{7EB9}\x{7EBA}\x{7EBB}\x{7EBC}\x{7EBD}\x{7EBE}\x{7EBF}' - . '\x{7EC0}\x{7EC1}\x{7EC2}\x{7EC3}\x{7EC4}\x{7EC5}\x{7EC6}\x{7EC7}\x{7EC8}' - . '\x{7EC9}\x{7ECA}\x{7ECB}\x{7ECC}\x{7ECD}\x{7ECE}\x{7ECF}\x{7ED0}\x{7ED1}' - . '\x{7ED2}\x{7ED3}\x{7ED4}\x{7ED5}\x{7ED6}\x{7ED7}\x{7ED8}\x{7ED9}\x{7EDA}' - . '\x{7EDB}\x{7EDC}\x{7EDD}\x{7EDE}\x{7EDF}\x{7EE0}\x{7EE1}\x{7EE2}\x{7EE3}' - . '\x{7EE4}\x{7EE5}\x{7EE6}\x{7EE7}\x{7EE8}\x{7EE9}\x{7EEA}\x{7EEB}\x{7EEC}' - . '\x{7EED}\x{7EEE}\x{7EEF}\x{7EF0}\x{7EF1}\x{7EF2}\x{7EF3}\x{7EF4}\x{7EF5}' - . '\x{7EF6}\x{7EF7}\x{7EF8}\x{7EF9}\x{7EFA}\x{7EFB}\x{7EFC}\x{7EFD}\x{7EFE}' - . '\x{7EFF}\x{7F00}\x{7F01}\x{7F02}\x{7F03}\x{7F04}\x{7F05}\x{7F06}\x{7F07}' - . '\x{7F08}\x{7F09}\x{7F0A}\x{7F0B}\x{7F0C}\x{7F0D}\x{7F0E}\x{7F0F}\x{7F10}' - . '\x{7F11}\x{7F12}\x{7F13}\x{7F14}\x{7F15}\x{7F16}\x{7F17}\x{7F18}\x{7F19}' - . '\x{7F1A}\x{7F1B}\x{7F1C}\x{7F1D}\x{7F1E}\x{7F1F}\x{7F20}\x{7F21}\x{7F22}' - . '\x{7F23}\x{7F24}\x{7F25}\x{7F26}\x{7F27}\x{7F28}\x{7F29}\x{7F2A}\x{7F2B}' - . '\x{7F2C}\x{7F2D}\x{7F2E}\x{7F2F}\x{7F30}\x{7F31}\x{7F32}\x{7F33}\x{7F34}' - . '\x{7F35}\x{7F36}\x{7F37}\x{7F38}\x{7F39}\x{7F3A}\x{7F3D}\x{7F3E}\x{7F3F}' - . '\x{7F40}\x{7F42}\x{7F43}\x{7F44}\x{7F45}\x{7F47}\x{7F48}\x{7F49}\x{7F4A}' - . '\x{7F4B}\x{7F4C}\x{7F4D}\x{7F4E}\x{7F4F}\x{7F50}\x{7F51}\x{7F52}\x{7F53}' - . '\x{7F54}\x{7F55}\x{7F56}\x{7F57}\x{7F58}\x{7F5A}\x{7F5B}\x{7F5C}\x{7F5D}' - . '\x{7F5E}\x{7F5F}\x{7F60}\x{7F61}\x{7F62}\x{7F63}\x{7F64}\x{7F65}\x{7F66}' - . '\x{7F67}\x{7F68}\x{7F69}\x{7F6A}\x{7F6B}\x{7F6C}\x{7F6D}\x{7F6E}\x{7F6F}' - . '\x{7F70}\x{7F71}\x{7F72}\x{7F73}\x{7F74}\x{7F75}\x{7F76}\x{7F77}\x{7F78}' - . '\x{7F79}\x{7F7A}\x{7F7B}\x{7F7C}\x{7F7D}\x{7F7E}\x{7F7F}\x{7F80}\x{7F81}' - . '\x{7F82}\x{7F83}\x{7F85}\x{7F86}\x{7F87}\x{7F88}\x{7F89}\x{7F8A}\x{7F8B}' - . '\x{7F8C}\x{7F8D}\x{7F8E}\x{7F8F}\x{7F91}\x{7F92}\x{7F93}\x{7F94}\x{7F95}' - . '\x{7F96}\x{7F98}\x{7F9A}\x{7F9B}\x{7F9C}\x{7F9D}\x{7F9E}\x{7F9F}\x{7FA0}' - . '\x{7FA1}\x{7FA2}\x{7FA3}\x{7FA4}\x{7FA5}\x{7FA6}\x{7FA7}\x{7FA8}\x{7FA9}' - . '\x{7FAA}\x{7FAB}\x{7FAC}\x{7FAD}\x{7FAE}\x{7FAF}\x{7FB0}\x{7FB1}\x{7FB2}' - . '\x{7FB3}\x{7FB5}\x{7FB6}\x{7FB7}\x{7FB8}\x{7FB9}\x{7FBA}\x{7FBB}\x{7FBC}' - . '\x{7FBD}\x{7FBE}\x{7FBF}\x{7FC0}\x{7FC1}\x{7FC2}\x{7FC3}\x{7FC4}\x{7FC5}' - . '\x{7FC6}\x{7FC7}\x{7FC8}\x{7FC9}\x{7FCA}\x{7FCB}\x{7FCC}\x{7FCD}\x{7FCE}' - . '\x{7FCF}\x{7FD0}\x{7FD1}\x{7FD2}\x{7FD3}\x{7FD4}\x{7FD5}\x{7FD7}\x{7FD8}' - . '\x{7FD9}\x{7FDA}\x{7FDB}\x{7FDC}\x{7FDE}\x{7FDF}\x{7FE0}\x{7FE1}\x{7FE2}' - . '\x{7FE3}\x{7FE5}\x{7FE6}\x{7FE7}\x{7FE8}\x{7FE9}\x{7FEA}\x{7FEB}\x{7FEC}' - . '\x{7FED}\x{7FEE}\x{7FEF}\x{7FF0}\x{7FF1}\x{7FF2}\x{7FF3}\x{7FF4}\x{7FF5}' - . '\x{7FF6}\x{7FF7}\x{7FF8}\x{7FF9}\x{7FFA}\x{7FFB}\x{7FFC}\x{7FFD}\x{7FFE}' - . '\x{7FFF}\x{8000}\x{8001}\x{8002}\x{8003}\x{8004}\x{8005}\x{8006}\x{8007}' - . '\x{8008}\x{8009}\x{800B}\x{800C}\x{800D}\x{800E}\x{800F}\x{8010}\x{8011}' - . '\x{8012}\x{8013}\x{8014}\x{8015}\x{8016}\x{8017}\x{8018}\x{8019}\x{801A}' - . '\x{801B}\x{801C}\x{801D}\x{801E}\x{801F}\x{8020}\x{8021}\x{8022}\x{8023}' - . '\x{8024}\x{8025}\x{8026}\x{8027}\x{8028}\x{8029}\x{802A}\x{802B}\x{802C}' - . '\x{802D}\x{802E}\x{8030}\x{8031}\x{8032}\x{8033}\x{8034}\x{8035}\x{8036}' - . '\x{8037}\x{8038}\x{8039}\x{803A}\x{803B}\x{803D}\x{803E}\x{803F}\x{8041}' - . '\x{8042}\x{8043}\x{8044}\x{8045}\x{8046}\x{8047}\x{8048}\x{8049}\x{804A}' - . '\x{804B}\x{804C}\x{804D}\x{804E}\x{804F}\x{8050}\x{8051}\x{8052}\x{8053}' - . '\x{8054}\x{8055}\x{8056}\x{8057}\x{8058}\x{8059}\x{805A}\x{805B}\x{805C}' - . '\x{805D}\x{805E}\x{805F}\x{8060}\x{8061}\x{8062}\x{8063}\x{8064}\x{8065}' - . '\x{8067}\x{8068}\x{8069}\x{806A}\x{806B}\x{806C}\x{806D}\x{806E}\x{806F}' - . '\x{8070}\x{8071}\x{8072}\x{8073}\x{8074}\x{8075}\x{8076}\x{8077}\x{8078}' - . '\x{8079}\x{807A}\x{807B}\x{807C}\x{807D}\x{807E}\x{807F}\x{8080}\x{8081}' - . '\x{8082}\x{8083}\x{8084}\x{8085}\x{8086}\x{8087}\x{8089}\x{808A}\x{808B}' - . '\x{808C}\x{808D}\x{808F}\x{8090}\x{8091}\x{8092}\x{8093}\x{8095}\x{8096}' - . '\x{8097}\x{8098}\x{8099}\x{809A}\x{809B}\x{809C}\x{809D}\x{809E}\x{809F}' - . '\x{80A0}\x{80A1}\x{80A2}\x{80A3}\x{80A4}\x{80A5}\x{80A9}\x{80AA}\x{80AB}' - . '\x{80AD}\x{80AE}\x{80AF}\x{80B0}\x{80B1}\x{80B2}\x{80B4}\x{80B5}\x{80B6}' - . '\x{80B7}\x{80B8}\x{80BA}\x{80BB}\x{80BC}\x{80BD}\x{80BE}\x{80BF}\x{80C0}' - . '\x{80C1}\x{80C2}\x{80C3}\x{80C4}\x{80C5}\x{80C6}\x{80C7}\x{80C8}\x{80C9}' - . '\x{80CA}\x{80CB}\x{80CC}\x{80CD}\x{80CE}\x{80CF}\x{80D0}\x{80D1}\x{80D2}' - . '\x{80D3}\x{80D4}\x{80D5}\x{80D6}\x{80D7}\x{80D8}\x{80D9}\x{80DA}\x{80DB}' - . '\x{80DC}\x{80DD}\x{80DE}\x{80E0}\x{80E1}\x{80E2}\x{80E3}\x{80E4}\x{80E5}' - . '\x{80E6}\x{80E7}\x{80E8}\x{80E9}\x{80EA}\x{80EB}\x{80EC}\x{80ED}\x{80EE}' - . '\x{80EF}\x{80F0}\x{80F1}\x{80F2}\x{80F3}\x{80F4}\x{80F5}\x{80F6}\x{80F7}' - . '\x{80F8}\x{80F9}\x{80FA}\x{80FB}\x{80FC}\x{80FD}\x{80FE}\x{80FF}\x{8100}' - . '\x{8101}\x{8102}\x{8105}\x{8106}\x{8107}\x{8108}\x{8109}\x{810A}\x{810B}' - . '\x{810C}\x{810D}\x{810E}\x{810F}\x{8110}\x{8111}\x{8112}\x{8113}\x{8114}' - . '\x{8115}\x{8116}\x{8118}\x{8119}\x{811A}\x{811B}\x{811C}\x{811D}\x{811E}' - . '\x{811F}\x{8120}\x{8121}\x{8122}\x{8123}\x{8124}\x{8125}\x{8126}\x{8127}' - . '\x{8128}\x{8129}\x{812A}\x{812B}\x{812C}\x{812D}\x{812E}\x{812F}\x{8130}' - . '\x{8131}\x{8132}\x{8136}\x{8137}\x{8138}\x{8139}\x{813A}\x{813B}\x{813C}' - . '\x{813D}\x{813E}\x{813F}\x{8140}\x{8141}\x{8142}\x{8143}\x{8144}\x{8145}' - . '\x{8146}\x{8147}\x{8148}\x{8149}\x{814A}\x{814B}\x{814C}\x{814D}\x{814E}' - . '\x{814F}\x{8150}\x{8151}\x{8152}\x{8153}\x{8154}\x{8155}\x{8156}\x{8157}' - . '\x{8158}\x{8159}\x{815A}\x{815B}\x{815C}\x{815D}\x{815E}\x{8160}\x{8161}' - . '\x{8162}\x{8163}\x{8164}\x{8165}\x{8166}\x{8167}\x{8168}\x{8169}\x{816A}' - . '\x{816B}\x{816C}\x{816D}\x{816E}\x{816F}\x{8170}\x{8171}\x{8172}\x{8173}' - . '\x{8174}\x{8175}\x{8176}\x{8177}\x{8178}\x{8179}\x{817A}\x{817B}\x{817C}' - . '\x{817D}\x{817E}\x{817F}\x{8180}\x{8181}\x{8182}\x{8183}\x{8185}\x{8186}' - . '\x{8187}\x{8188}\x{8189}\x{818A}\x{818B}\x{818C}\x{818D}\x{818E}\x{818F}' - . '\x{8191}\x{8192}\x{8193}\x{8194}\x{8195}\x{8197}\x{8198}\x{8199}\x{819A}' - . '\x{819B}\x{819C}\x{819D}\x{819E}\x{819F}\x{81A0}\x{81A1}\x{81A2}\x{81A3}' - . '\x{81A4}\x{81A5}\x{81A6}\x{81A7}\x{81A8}\x{81A9}\x{81AA}\x{81AB}\x{81AC}' - . '\x{81AD}\x{81AE}\x{81AF}\x{81B0}\x{81B1}\x{81B2}\x{81B3}\x{81B4}\x{81B5}' - . '\x{81B6}\x{81B7}\x{81B8}\x{81B9}\x{81BA}\x{81BB}\x{81BC}\x{81BD}\x{81BE}' - . '\x{81BF}\x{81C0}\x{81C1}\x{81C2}\x{81C3}\x{81C4}\x{81C5}\x{81C6}\x{81C7}' - . '\x{81C8}\x{81C9}\x{81CA}\x{81CC}\x{81CD}\x{81CE}\x{81CF}\x{81D0}\x{81D1}' - . '\x{81D2}\x{81D4}\x{81D5}\x{81D6}\x{81D7}\x{81D8}\x{81D9}\x{81DA}\x{81DB}' - . '\x{81DC}\x{81DD}\x{81DE}\x{81DF}\x{81E0}\x{81E1}\x{81E2}\x{81E3}\x{81E5}' - . '\x{81E6}\x{81E7}\x{81E8}\x{81E9}\x{81EA}\x{81EB}\x{81EC}\x{81ED}\x{81EE}' - . '\x{81F1}\x{81F2}\x{81F3}\x{81F4}\x{81F5}\x{81F6}\x{81F7}\x{81F8}\x{81F9}' - . '\x{81FA}\x{81FB}\x{81FC}\x{81FD}\x{81FE}\x{81FF}\x{8200}\x{8201}\x{8202}' - . '\x{8203}\x{8204}\x{8205}\x{8206}\x{8207}\x{8208}\x{8209}\x{820A}\x{820B}' - . '\x{820C}\x{820D}\x{820E}\x{820F}\x{8210}\x{8211}\x{8212}\x{8214}\x{8215}' - . '\x{8216}\x{8218}\x{8219}\x{821A}\x{821B}\x{821C}\x{821D}\x{821E}\x{821F}' - . '\x{8220}\x{8221}\x{8222}\x{8223}\x{8225}\x{8226}\x{8227}\x{8228}\x{8229}' - . '\x{822A}\x{822B}\x{822C}\x{822D}\x{822F}\x{8230}\x{8231}\x{8232}\x{8233}' - . '\x{8234}\x{8235}\x{8236}\x{8237}\x{8238}\x{8239}\x{823A}\x{823B}\x{823C}' - . '\x{823D}\x{823E}\x{823F}\x{8240}\x{8242}\x{8243}\x{8244}\x{8245}\x{8246}' - . '\x{8247}\x{8248}\x{8249}\x{824A}\x{824B}\x{824C}\x{824D}\x{824E}\x{824F}' - . '\x{8250}\x{8251}\x{8252}\x{8253}\x{8254}\x{8255}\x{8256}\x{8257}\x{8258}' - . '\x{8259}\x{825A}\x{825B}\x{825C}\x{825D}\x{825E}\x{825F}\x{8260}\x{8261}' - . '\x{8263}\x{8264}\x{8266}\x{8267}\x{8268}\x{8269}\x{826A}\x{826B}\x{826C}' - . '\x{826D}\x{826E}\x{826F}\x{8270}\x{8271}\x{8272}\x{8273}\x{8274}\x{8275}' - . '\x{8276}\x{8277}\x{8278}\x{8279}\x{827A}\x{827B}\x{827C}\x{827D}\x{827E}' - . '\x{827F}\x{8280}\x{8281}\x{8282}\x{8283}\x{8284}\x{8285}\x{8286}\x{8287}' - . '\x{8288}\x{8289}\x{828A}\x{828B}\x{828D}\x{828E}\x{828F}\x{8290}\x{8291}' - . '\x{8292}\x{8293}\x{8294}\x{8295}\x{8296}\x{8297}\x{8298}\x{8299}\x{829A}' - . '\x{829B}\x{829C}\x{829D}\x{829E}\x{829F}\x{82A0}\x{82A1}\x{82A2}\x{82A3}' - . '\x{82A4}\x{82A5}\x{82A6}\x{82A7}\x{82A8}\x{82A9}\x{82AA}\x{82AB}\x{82AC}' - . '\x{82AD}\x{82AE}\x{82AF}\x{82B0}\x{82B1}\x{82B3}\x{82B4}\x{82B5}\x{82B6}' - . '\x{82B7}\x{82B8}\x{82B9}\x{82BA}\x{82BB}\x{82BC}\x{82BD}\x{82BE}\x{82BF}' - . '\x{82C0}\x{82C1}\x{82C2}\x{82C3}\x{82C4}\x{82C5}\x{82C6}\x{82C7}\x{82C8}' - . '\x{82C9}\x{82CA}\x{82CB}\x{82CC}\x{82CD}\x{82CE}\x{82CF}\x{82D0}\x{82D1}' - . '\x{82D2}\x{82D3}\x{82D4}\x{82D5}\x{82D6}\x{82D7}\x{82D8}\x{82D9}\x{82DA}' - . '\x{82DB}\x{82DC}\x{82DD}\x{82DE}\x{82DF}\x{82E0}\x{82E1}\x{82E3}\x{82E4}' - . '\x{82E5}\x{82E6}\x{82E7}\x{82E8}\x{82E9}\x{82EA}\x{82EB}\x{82EC}\x{82ED}' - . '\x{82EE}\x{82EF}\x{82F0}\x{82F1}\x{82F2}\x{82F3}\x{82F4}\x{82F5}\x{82F6}' - . '\x{82F7}\x{82F8}\x{82F9}\x{82FA}\x{82FB}\x{82FD}\x{82FE}\x{82FF}\x{8300}' - . '\x{8301}\x{8302}\x{8303}\x{8304}\x{8305}\x{8306}\x{8307}\x{8308}\x{8309}' - . '\x{830B}\x{830C}\x{830D}\x{830E}\x{830F}\x{8311}\x{8312}\x{8313}\x{8314}' - . '\x{8315}\x{8316}\x{8317}\x{8318}\x{8319}\x{831A}\x{831B}\x{831C}\x{831D}' - . '\x{831E}\x{831F}\x{8320}\x{8321}\x{8322}\x{8323}\x{8324}\x{8325}\x{8326}' - . '\x{8327}\x{8328}\x{8329}\x{832A}\x{832B}\x{832C}\x{832D}\x{832E}\x{832F}' - . '\x{8331}\x{8332}\x{8333}\x{8334}\x{8335}\x{8336}\x{8337}\x{8338}\x{8339}' - . '\x{833A}\x{833B}\x{833C}\x{833D}\x{833E}\x{833F}\x{8340}\x{8341}\x{8342}' - . '\x{8343}\x{8344}\x{8345}\x{8346}\x{8347}\x{8348}\x{8349}\x{834A}\x{834B}' - . '\x{834C}\x{834D}\x{834E}\x{834F}\x{8350}\x{8351}\x{8352}\x{8353}\x{8354}' - . '\x{8356}\x{8357}\x{8358}\x{8359}\x{835A}\x{835B}\x{835C}\x{835D}\x{835E}' - . '\x{835F}\x{8360}\x{8361}\x{8362}\x{8363}\x{8364}\x{8365}\x{8366}\x{8367}' - . '\x{8368}\x{8369}\x{836A}\x{836B}\x{836C}\x{836D}\x{836E}\x{836F}\x{8370}' - . '\x{8371}\x{8372}\x{8373}\x{8374}\x{8375}\x{8376}\x{8377}\x{8378}\x{8379}' - . '\x{837A}\x{837B}\x{837C}\x{837D}\x{837E}\x{837F}\x{8380}\x{8381}\x{8382}' - . '\x{8383}\x{8384}\x{8385}\x{8386}\x{8387}\x{8388}\x{8389}\x{838A}\x{838B}' - . '\x{838C}\x{838D}\x{838E}\x{838F}\x{8390}\x{8391}\x{8392}\x{8393}\x{8394}' - . '\x{8395}\x{8396}\x{8397}\x{8398}\x{8399}\x{839A}\x{839B}\x{839C}\x{839D}' - . '\x{839E}\x{83A0}\x{83A1}\x{83A2}\x{83A3}\x{83A4}\x{83A5}\x{83A6}\x{83A7}' - . '\x{83A8}\x{83A9}\x{83AA}\x{83AB}\x{83AC}\x{83AD}\x{83AE}\x{83AF}\x{83B0}' - . '\x{83B1}\x{83B2}\x{83B3}\x{83B4}\x{83B6}\x{83B7}\x{83B8}\x{83B9}\x{83BA}' - . '\x{83BB}\x{83BC}\x{83BD}\x{83BF}\x{83C0}\x{83C1}\x{83C2}\x{83C3}\x{83C4}' - . '\x{83C5}\x{83C6}\x{83C7}\x{83C8}\x{83C9}\x{83CA}\x{83CB}\x{83CC}\x{83CD}' - . '\x{83CE}\x{83CF}\x{83D0}\x{83D1}\x{83D2}\x{83D3}\x{83D4}\x{83D5}\x{83D6}' - . '\x{83D7}\x{83D8}\x{83D9}\x{83DA}\x{83DB}\x{83DC}\x{83DD}\x{83DE}\x{83DF}' - . '\x{83E0}\x{83E1}\x{83E2}\x{83E3}\x{83E4}\x{83E5}\x{83E7}\x{83E8}\x{83E9}' - . '\x{83EA}\x{83EB}\x{83EC}\x{83EE}\x{83EF}\x{83F0}\x{83F1}\x{83F2}\x{83F3}' - . '\x{83F4}\x{83F5}\x{83F6}\x{83F7}\x{83F8}\x{83F9}\x{83FA}\x{83FB}\x{83FC}' - . '\x{83FD}\x{83FE}\x{83FF}\x{8400}\x{8401}\x{8402}\x{8403}\x{8404}\x{8405}' - . '\x{8406}\x{8407}\x{8408}\x{8409}\x{840A}\x{840B}\x{840C}\x{840D}\x{840E}' - . '\x{840F}\x{8410}\x{8411}\x{8412}\x{8413}\x{8415}\x{8418}\x{8419}\x{841A}' - . '\x{841B}\x{841C}\x{841D}\x{841E}\x{8421}\x{8422}\x{8423}\x{8424}\x{8425}' - . '\x{8426}\x{8427}\x{8428}\x{8429}\x{842A}\x{842B}\x{842C}\x{842D}\x{842E}' - . '\x{842F}\x{8430}\x{8431}\x{8432}\x{8433}\x{8434}\x{8435}\x{8436}\x{8437}' - . '\x{8438}\x{8439}\x{843A}\x{843B}\x{843C}\x{843D}\x{843E}\x{843F}\x{8440}' - . '\x{8441}\x{8442}\x{8443}\x{8444}\x{8445}\x{8446}\x{8447}\x{8448}\x{8449}' - . '\x{844A}\x{844B}\x{844C}\x{844D}\x{844E}\x{844F}\x{8450}\x{8451}\x{8452}' - . '\x{8453}\x{8454}\x{8455}\x{8456}\x{8457}\x{8459}\x{845A}\x{845B}\x{845C}' - . '\x{845D}\x{845E}\x{845F}\x{8460}\x{8461}\x{8462}\x{8463}\x{8464}\x{8465}' - . '\x{8466}\x{8467}\x{8468}\x{8469}\x{846A}\x{846B}\x{846C}\x{846D}\x{846E}' - . '\x{846F}\x{8470}\x{8471}\x{8472}\x{8473}\x{8474}\x{8475}\x{8476}\x{8477}' - . '\x{8478}\x{8479}\x{847A}\x{847B}\x{847C}\x{847D}\x{847E}\x{847F}\x{8480}' - . '\x{8481}\x{8482}\x{8484}\x{8485}\x{8486}\x{8487}\x{8488}\x{8489}\x{848A}' - . '\x{848B}\x{848C}\x{848D}\x{848E}\x{848F}\x{8490}\x{8491}\x{8492}\x{8493}' - . '\x{8494}\x{8496}\x{8497}\x{8498}\x{8499}\x{849A}\x{849B}\x{849C}\x{849D}' - . '\x{849E}\x{849F}\x{84A0}\x{84A1}\x{84A2}\x{84A3}\x{84A4}\x{84A5}\x{84A6}' - . '\x{84A7}\x{84A8}\x{84A9}\x{84AA}\x{84AB}\x{84AC}\x{84AE}\x{84AF}\x{84B0}' - . '\x{84B1}\x{84B2}\x{84B3}\x{84B4}\x{84B5}\x{84B6}\x{84B8}\x{84B9}\x{84BA}' - . '\x{84BB}\x{84BC}\x{84BD}\x{84BE}\x{84BF}\x{84C0}\x{84C1}\x{84C2}\x{84C4}' - . '\x{84C5}\x{84C6}\x{84C7}\x{84C8}\x{84C9}\x{84CA}\x{84CB}\x{84CC}\x{84CD}' - . '\x{84CE}\x{84CF}\x{84D0}\x{84D1}\x{84D2}\x{84D3}\x{84D4}\x{84D5}\x{84D6}' - . '\x{84D7}\x{84D8}\x{84D9}\x{84DB}\x{84DC}\x{84DD}\x{84DE}\x{84DF}\x{84E0}' - . '\x{84E1}\x{84E2}\x{84E3}\x{84E4}\x{84E5}\x{84E6}\x{84E7}\x{84E8}\x{84E9}' - . '\x{84EA}\x{84EB}\x{84EC}\x{84EE}\x{84EF}\x{84F0}\x{84F1}\x{84F2}\x{84F3}' - . '\x{84F4}\x{84F5}\x{84F6}\x{84F7}\x{84F8}\x{84F9}\x{84FA}\x{84FB}\x{84FC}' - . '\x{84FD}\x{84FE}\x{84FF}\x{8500}\x{8501}\x{8502}\x{8503}\x{8504}\x{8506}' - . '\x{8507}\x{8508}\x{8509}\x{850A}\x{850B}\x{850C}\x{850D}\x{850E}\x{850F}' - . '\x{8511}\x{8512}\x{8513}\x{8514}\x{8515}\x{8516}\x{8517}\x{8518}\x{8519}' - . '\x{851A}\x{851B}\x{851C}\x{851D}\x{851E}\x{851F}\x{8520}\x{8521}\x{8522}' - . '\x{8523}\x{8524}\x{8525}\x{8526}\x{8527}\x{8528}\x{8529}\x{852A}\x{852B}' - . '\x{852C}\x{852D}\x{852E}\x{852F}\x{8530}\x{8531}\x{8534}\x{8535}\x{8536}' - . '\x{8537}\x{8538}\x{8539}\x{853A}\x{853B}\x{853C}\x{853D}\x{853E}\x{853F}' - . '\x{8540}\x{8541}\x{8542}\x{8543}\x{8544}\x{8545}\x{8546}\x{8547}\x{8548}' - . '\x{8549}\x{854A}\x{854B}\x{854D}\x{854E}\x{854F}\x{8551}\x{8552}\x{8553}' - . '\x{8554}\x{8555}\x{8556}\x{8557}\x{8558}\x{8559}\x{855A}\x{855B}\x{855C}' - . '\x{855D}\x{855E}\x{855F}\x{8560}\x{8561}\x{8562}\x{8563}\x{8564}\x{8565}' - . '\x{8566}\x{8567}\x{8568}\x{8569}\x{856A}\x{856B}\x{856C}\x{856D}\x{856E}' - . '\x{856F}\x{8570}\x{8571}\x{8572}\x{8573}\x{8574}\x{8575}\x{8576}\x{8577}' - . '\x{8578}\x{8579}\x{857A}\x{857B}\x{857C}\x{857D}\x{857E}\x{8580}\x{8581}' - . '\x{8582}\x{8583}\x{8584}\x{8585}\x{8586}\x{8587}\x{8588}\x{8589}\x{858A}' - . '\x{858B}\x{858C}\x{858D}\x{858E}\x{858F}\x{8590}\x{8591}\x{8592}\x{8594}' - . '\x{8595}\x{8596}\x{8598}\x{8599}\x{859A}\x{859B}\x{859C}\x{859D}\x{859E}' - . '\x{859F}\x{85A0}\x{85A1}\x{85A2}\x{85A3}\x{85A4}\x{85A5}\x{85A6}\x{85A7}' - . '\x{85A8}\x{85A9}\x{85AA}\x{85AB}\x{85AC}\x{85AD}\x{85AE}\x{85AF}\x{85B0}' - . '\x{85B1}\x{85B3}\x{85B4}\x{85B5}\x{85B6}\x{85B7}\x{85B8}\x{85B9}\x{85BA}' - . '\x{85BC}\x{85BD}\x{85BE}\x{85BF}\x{85C0}\x{85C1}\x{85C2}\x{85C3}\x{85C4}' - . '\x{85C5}\x{85C6}\x{85C7}\x{85C8}\x{85C9}\x{85CA}\x{85CB}\x{85CD}\x{85CE}' - . '\x{85CF}\x{85D0}\x{85D1}\x{85D2}\x{85D3}\x{85D4}\x{85D5}\x{85D6}\x{85D7}' - . '\x{85D8}\x{85D9}\x{85DA}\x{85DB}\x{85DC}\x{85DD}\x{85DE}\x{85DF}\x{85E0}' - . '\x{85E1}\x{85E2}\x{85E3}\x{85E4}\x{85E5}\x{85E6}\x{85E7}\x{85E8}\x{85E9}' - . '\x{85EA}\x{85EB}\x{85EC}\x{85ED}\x{85EF}\x{85F0}\x{85F1}\x{85F2}\x{85F4}' - . '\x{85F5}\x{85F6}\x{85F7}\x{85F8}\x{85F9}\x{85FA}\x{85FB}\x{85FD}\x{85FE}' - . '\x{85FF}\x{8600}\x{8601}\x{8602}\x{8604}\x{8605}\x{8606}\x{8607}\x{8608}' - . '\x{8609}\x{860A}\x{860B}\x{860C}\x{860F}\x{8611}\x{8612}\x{8613}\x{8614}' - . '\x{8616}\x{8617}\x{8618}\x{8619}\x{861A}\x{861B}\x{861C}\x{861E}\x{861F}' - . '\x{8620}\x{8621}\x{8622}\x{8623}\x{8624}\x{8625}\x{8626}\x{8627}\x{8628}' - . '\x{8629}\x{862A}\x{862B}\x{862C}\x{862D}\x{862E}\x{862F}\x{8630}\x{8631}' - . '\x{8632}\x{8633}\x{8634}\x{8635}\x{8636}\x{8638}\x{8639}\x{863A}\x{863B}' - . '\x{863C}\x{863D}\x{863E}\x{863F}\x{8640}\x{8641}\x{8642}\x{8643}\x{8644}' - . '\x{8645}\x{8646}\x{8647}\x{8648}\x{8649}\x{864A}\x{864B}\x{864C}\x{864D}' - . '\x{864E}\x{864F}\x{8650}\x{8651}\x{8652}\x{8653}\x{8654}\x{8655}\x{8656}' - . '\x{8658}\x{8659}\x{865A}\x{865B}\x{865C}\x{865D}\x{865E}\x{865F}\x{8660}' - . '\x{8661}\x{8662}\x{8663}\x{8664}\x{8665}\x{8666}\x{8667}\x{8668}\x{8669}' - . '\x{866A}\x{866B}\x{866C}\x{866D}\x{866E}\x{866F}\x{8670}\x{8671}\x{8672}' - . '\x{8673}\x{8674}\x{8676}\x{8677}\x{8678}\x{8679}\x{867A}\x{867B}\x{867C}' - . '\x{867D}\x{867E}\x{867F}\x{8680}\x{8681}\x{8682}\x{8683}\x{8684}\x{8685}' - . '\x{8686}\x{8687}\x{8688}\x{868A}\x{868B}\x{868C}\x{868D}\x{868E}\x{868F}' - . '\x{8690}\x{8691}\x{8693}\x{8694}\x{8695}\x{8696}\x{8697}\x{8698}\x{8699}' - . '\x{869A}\x{869B}\x{869C}\x{869D}\x{869E}\x{869F}\x{86A1}\x{86A2}\x{86A3}' - . '\x{86A4}\x{86A5}\x{86A7}\x{86A8}\x{86A9}\x{86AA}\x{86AB}\x{86AC}\x{86AD}' - . '\x{86AE}\x{86AF}\x{86B0}\x{86B1}\x{86B2}\x{86B3}\x{86B4}\x{86B5}\x{86B6}' - . '\x{86B7}\x{86B8}\x{86B9}\x{86BA}\x{86BB}\x{86BC}\x{86BD}\x{86BE}\x{86BF}' - . '\x{86C0}\x{86C1}\x{86C2}\x{86C3}\x{86C4}\x{86C5}\x{86C6}\x{86C7}\x{86C8}' - . '\x{86C9}\x{86CA}\x{86CB}\x{86CC}\x{86CE}\x{86CF}\x{86D0}\x{86D1}\x{86D2}' - . '\x{86D3}\x{86D4}\x{86D6}\x{86D7}\x{86D8}\x{86D9}\x{86DA}\x{86DB}\x{86DC}' - . '\x{86DD}\x{86DE}\x{86DF}\x{86E1}\x{86E2}\x{86E3}\x{86E4}\x{86E5}\x{86E6}' - . '\x{86E8}\x{86E9}\x{86EA}\x{86EB}\x{86EC}\x{86ED}\x{86EE}\x{86EF}\x{86F0}' - . '\x{86F1}\x{86F2}\x{86F3}\x{86F4}\x{86F5}\x{86F6}\x{86F7}\x{86F8}\x{86F9}' - . '\x{86FA}\x{86FB}\x{86FC}\x{86FE}\x{86FF}\x{8700}\x{8701}\x{8702}\x{8703}' - . '\x{8704}\x{8705}\x{8706}\x{8707}\x{8708}\x{8709}\x{870A}\x{870B}\x{870C}' - . '\x{870D}\x{870E}\x{870F}\x{8710}\x{8711}\x{8712}\x{8713}\x{8714}\x{8715}' - . '\x{8716}\x{8717}\x{8718}\x{8719}\x{871A}\x{871B}\x{871C}\x{871E}\x{871F}' - . '\x{8720}\x{8721}\x{8722}\x{8723}\x{8724}\x{8725}\x{8726}\x{8727}\x{8728}' - . '\x{8729}\x{872A}\x{872B}\x{872C}\x{872D}\x{872E}\x{8730}\x{8731}\x{8732}' - . '\x{8733}\x{8734}\x{8735}\x{8736}\x{8737}\x{8738}\x{8739}\x{873A}\x{873B}' - . '\x{873C}\x{873E}\x{873F}\x{8740}\x{8741}\x{8742}\x{8743}\x{8744}\x{8746}' - . '\x{8747}\x{8748}\x{8749}\x{874A}\x{874C}\x{874D}\x{874E}\x{874F}\x{8750}' - . '\x{8751}\x{8752}\x{8753}\x{8754}\x{8755}\x{8756}\x{8757}\x{8758}\x{8759}' - . '\x{875A}\x{875B}\x{875C}\x{875D}\x{875E}\x{875F}\x{8760}\x{8761}\x{8762}' - . '\x{8763}\x{8764}\x{8765}\x{8766}\x{8767}\x{8768}\x{8769}\x{876A}\x{876B}' - . '\x{876C}\x{876D}\x{876E}\x{876F}\x{8770}\x{8772}\x{8773}\x{8774}\x{8775}' - . '\x{8776}\x{8777}\x{8778}\x{8779}\x{877A}\x{877B}\x{877C}\x{877D}\x{877E}' - . '\x{8780}\x{8781}\x{8782}\x{8783}\x{8784}\x{8785}\x{8786}\x{8787}\x{8788}' - . '\x{8789}\x{878A}\x{878B}\x{878C}\x{878D}\x{878F}\x{8790}\x{8791}\x{8792}' - . '\x{8793}\x{8794}\x{8795}\x{8796}\x{8797}\x{8798}\x{879A}\x{879B}\x{879C}' - . '\x{879D}\x{879E}\x{879F}\x{87A0}\x{87A1}\x{87A2}\x{87A3}\x{87A4}\x{87A5}' - . '\x{87A6}\x{87A7}\x{87A8}\x{87A9}\x{87AA}\x{87AB}\x{87AC}\x{87AD}\x{87AE}' - . '\x{87AF}\x{87B0}\x{87B1}\x{87B2}\x{87B3}\x{87B4}\x{87B5}\x{87B6}\x{87B7}' - . '\x{87B8}\x{87B9}\x{87BA}\x{87BB}\x{87BC}\x{87BD}\x{87BE}\x{87BF}\x{87C0}' - . '\x{87C1}\x{87C2}\x{87C3}\x{87C4}\x{87C5}\x{87C6}\x{87C7}\x{87C8}\x{87C9}' - . '\x{87CA}\x{87CB}\x{87CC}\x{87CD}\x{87CE}\x{87CF}\x{87D0}\x{87D1}\x{87D2}' - . '\x{87D3}\x{87D4}\x{87D5}\x{87D6}\x{87D7}\x{87D8}\x{87D9}\x{87DB}\x{87DC}' - . '\x{87DD}\x{87DE}\x{87DF}\x{87E0}\x{87E1}\x{87E2}\x{87E3}\x{87E4}\x{87E5}' - . '\x{87E6}\x{87E7}\x{87E8}\x{87E9}\x{87EA}\x{87EB}\x{87EC}\x{87ED}\x{87EE}' - . '\x{87EF}\x{87F1}\x{87F2}\x{87F3}\x{87F4}\x{87F5}\x{87F6}\x{87F7}\x{87F8}' - . '\x{87F9}\x{87FA}\x{87FB}\x{87FC}\x{87FD}\x{87FE}\x{87FF}\x{8800}\x{8801}' - . '\x{8802}\x{8803}\x{8804}\x{8805}\x{8806}\x{8808}\x{8809}\x{880A}\x{880B}' - . '\x{880C}\x{880D}\x{880E}\x{880F}\x{8810}\x{8811}\x{8813}\x{8814}\x{8815}' - . '\x{8816}\x{8817}\x{8818}\x{8819}\x{881A}\x{881B}\x{881C}\x{881D}\x{881E}' - . '\x{881F}\x{8820}\x{8821}\x{8822}\x{8823}\x{8824}\x{8825}\x{8826}\x{8827}' - . '\x{8828}\x{8829}\x{882A}\x{882B}\x{882C}\x{882E}\x{882F}\x{8830}\x{8831}' - . '\x{8832}\x{8833}\x{8834}\x{8835}\x{8836}\x{8837}\x{8838}\x{8839}\x{883B}' - . '\x{883C}\x{883D}\x{883E}\x{883F}\x{8840}\x{8841}\x{8842}\x{8843}\x{8844}' - . '\x{8845}\x{8846}\x{8848}\x{8849}\x{884A}\x{884B}\x{884C}\x{884D}\x{884E}' - . '\x{884F}\x{8850}\x{8851}\x{8852}\x{8853}\x{8854}\x{8855}\x{8856}\x{8857}' - . '\x{8859}\x{885A}\x{885B}\x{885D}\x{885E}\x{8860}\x{8861}\x{8862}\x{8863}' - . '\x{8864}\x{8865}\x{8866}\x{8867}\x{8868}\x{8869}\x{886A}\x{886B}\x{886C}' - . '\x{886D}\x{886E}\x{886F}\x{8870}\x{8871}\x{8872}\x{8873}\x{8874}\x{8875}' - . '\x{8876}\x{8877}\x{8878}\x{8879}\x{887B}\x{887C}\x{887D}\x{887E}\x{887F}' - . '\x{8880}\x{8881}\x{8882}\x{8883}\x{8884}\x{8885}\x{8886}\x{8887}\x{8888}' - . '\x{8889}\x{888A}\x{888B}\x{888C}\x{888D}\x{888E}\x{888F}\x{8890}\x{8891}' - . '\x{8892}\x{8893}\x{8894}\x{8895}\x{8896}\x{8897}\x{8898}\x{8899}\x{889A}' - . '\x{889B}\x{889C}\x{889D}\x{889E}\x{889F}\x{88A0}\x{88A1}\x{88A2}\x{88A3}' - . '\x{88A4}\x{88A5}\x{88A6}\x{88A7}\x{88A8}\x{88A9}\x{88AA}\x{88AB}\x{88AC}' - . '\x{88AD}\x{88AE}\x{88AF}\x{88B0}\x{88B1}\x{88B2}\x{88B3}\x{88B4}\x{88B6}' - . '\x{88B7}\x{88B8}\x{88B9}\x{88BA}\x{88BB}\x{88BC}\x{88BD}\x{88BE}\x{88BF}' - . '\x{88C0}\x{88C1}\x{88C2}\x{88C3}\x{88C4}\x{88C5}\x{88C6}\x{88C7}\x{88C8}' - . '\x{88C9}\x{88CA}\x{88CB}\x{88CC}\x{88CD}\x{88CE}\x{88CF}\x{88D0}\x{88D1}' - . '\x{88D2}\x{88D3}\x{88D4}\x{88D5}\x{88D6}\x{88D7}\x{88D8}\x{88D9}\x{88DA}' - . '\x{88DB}\x{88DC}\x{88DD}\x{88DE}\x{88DF}\x{88E0}\x{88E1}\x{88E2}\x{88E3}' - . '\x{88E4}\x{88E5}\x{88E7}\x{88E8}\x{88EA}\x{88EB}\x{88EC}\x{88EE}\x{88EF}' - . '\x{88F0}\x{88F1}\x{88F2}\x{88F3}\x{88F4}\x{88F5}\x{88F6}\x{88F7}\x{88F8}' - . '\x{88F9}\x{88FA}\x{88FB}\x{88FC}\x{88FD}\x{88FE}\x{88FF}\x{8900}\x{8901}' - . '\x{8902}\x{8904}\x{8905}\x{8906}\x{8907}\x{8908}\x{8909}\x{890A}\x{890B}' - . '\x{890C}\x{890D}\x{890E}\x{8910}\x{8911}\x{8912}\x{8913}\x{8914}\x{8915}' - . '\x{8916}\x{8917}\x{8918}\x{8919}\x{891A}\x{891B}\x{891C}\x{891D}\x{891E}' - . '\x{891F}\x{8920}\x{8921}\x{8922}\x{8923}\x{8925}\x{8926}\x{8927}\x{8928}' - . '\x{8929}\x{892A}\x{892B}\x{892C}\x{892D}\x{892E}\x{892F}\x{8930}\x{8931}' - . '\x{8932}\x{8933}\x{8934}\x{8935}\x{8936}\x{8937}\x{8938}\x{8939}\x{893A}' - . '\x{893B}\x{893C}\x{893D}\x{893E}\x{893F}\x{8940}\x{8941}\x{8942}\x{8943}' - . '\x{8944}\x{8945}\x{8946}\x{8947}\x{8948}\x{8949}\x{894A}\x{894B}\x{894C}' - . '\x{894E}\x{894F}\x{8950}\x{8951}\x{8952}\x{8953}\x{8954}\x{8955}\x{8956}' - . '\x{8957}\x{8958}\x{8959}\x{895A}\x{895B}\x{895C}\x{895D}\x{895E}\x{895F}' - . '\x{8960}\x{8961}\x{8962}\x{8963}\x{8964}\x{8966}\x{8967}\x{8968}\x{8969}' - . '\x{896A}\x{896B}\x{896C}\x{896D}\x{896E}\x{896F}\x{8970}\x{8971}\x{8972}' - . '\x{8973}\x{8974}\x{8976}\x{8977}\x{8978}\x{8979}\x{897A}\x{897B}\x{897C}' - . '\x{897E}\x{897F}\x{8980}\x{8981}\x{8982}\x{8983}\x{8984}\x{8985}\x{8986}' - . '\x{8987}\x{8988}\x{8989}\x{898A}\x{898B}\x{898C}\x{898E}\x{898F}\x{8991}' - . '\x{8992}\x{8993}\x{8995}\x{8996}\x{8997}\x{8998}\x{899A}\x{899B}\x{899C}' - . '\x{899D}\x{899E}\x{899F}\x{89A0}\x{89A1}\x{89A2}\x{89A3}\x{89A4}\x{89A5}' - . '\x{89A6}\x{89A7}\x{89A8}\x{89AA}\x{89AB}\x{89AC}\x{89AD}\x{89AE}\x{89AF}' - . '\x{89B1}\x{89B2}\x{89B3}\x{89B5}\x{89B6}\x{89B7}\x{89B8}\x{89B9}\x{89BA}' - . '\x{89BD}\x{89BE}\x{89BF}\x{89C0}\x{89C1}\x{89C2}\x{89C3}\x{89C4}\x{89C5}' - . '\x{89C6}\x{89C7}\x{89C8}\x{89C9}\x{89CA}\x{89CB}\x{89CC}\x{89CD}\x{89CE}' - . '\x{89CF}\x{89D0}\x{89D1}\x{89D2}\x{89D3}\x{89D4}\x{89D5}\x{89D6}\x{89D7}' - . '\x{89D8}\x{89D9}\x{89DA}\x{89DB}\x{89DC}\x{89DD}\x{89DE}\x{89DF}\x{89E0}' - . '\x{89E1}\x{89E2}\x{89E3}\x{89E4}\x{89E5}\x{89E6}\x{89E7}\x{89E8}\x{89E9}' - . '\x{89EA}\x{89EB}\x{89EC}\x{89ED}\x{89EF}\x{89F0}\x{89F1}\x{89F2}\x{89F3}' - . '\x{89F4}\x{89F6}\x{89F7}\x{89F8}\x{89FA}\x{89FB}\x{89FC}\x{89FE}\x{89FF}' - . '\x{8A00}\x{8A01}\x{8A02}\x{8A03}\x{8A04}\x{8A07}\x{8A08}\x{8A09}\x{8A0A}' - . '\x{8A0B}\x{8A0C}\x{8A0D}\x{8A0E}\x{8A0F}\x{8A10}\x{8A11}\x{8A12}\x{8A13}' - . '\x{8A15}\x{8A16}\x{8A17}\x{8A18}\x{8A1A}\x{8A1B}\x{8A1C}\x{8A1D}\x{8A1E}' - . '\x{8A1F}\x{8A22}\x{8A23}\x{8A24}\x{8A25}\x{8A26}\x{8A27}\x{8A28}\x{8A29}' - . '\x{8A2A}\x{8A2C}\x{8A2D}\x{8A2E}\x{8A2F}\x{8A30}\x{8A31}\x{8A32}\x{8A34}' - . '\x{8A35}\x{8A36}\x{8A37}\x{8A38}\x{8A39}\x{8A3A}\x{8A3B}\x{8A3C}\x{8A3E}' - . '\x{8A3F}\x{8A40}\x{8A41}\x{8A42}\x{8A43}\x{8A44}\x{8A45}\x{8A46}\x{8A47}' - . '\x{8A48}\x{8A49}\x{8A4A}\x{8A4C}\x{8A4D}\x{8A4E}\x{8A4F}\x{8A50}\x{8A51}' - . '\x{8A52}\x{8A53}\x{8A54}\x{8A55}\x{8A56}\x{8A57}\x{8A58}\x{8A59}\x{8A5A}' - . '\x{8A5B}\x{8A5C}\x{8A5D}\x{8A5E}\x{8A5F}\x{8A60}\x{8A61}\x{8A62}\x{8A63}' - . '\x{8A65}\x{8A66}\x{8A67}\x{8A68}\x{8A69}\x{8A6A}\x{8A6B}\x{8A6C}\x{8A6D}' - . '\x{8A6E}\x{8A6F}\x{8A70}\x{8A71}\x{8A72}\x{8A73}\x{8A74}\x{8A75}\x{8A76}' - . '\x{8A77}\x{8A79}\x{8A7A}\x{8A7B}\x{8A7C}\x{8A7E}\x{8A7F}\x{8A80}\x{8A81}' - . '\x{8A82}\x{8A83}\x{8A84}\x{8A85}\x{8A86}\x{8A87}\x{8A89}\x{8A8A}\x{8A8B}' - . '\x{8A8C}\x{8A8D}\x{8A8E}\x{8A8F}\x{8A90}\x{8A91}\x{8A92}\x{8A93}\x{8A94}' - . '\x{8A95}\x{8A96}\x{8A97}\x{8A98}\x{8A99}\x{8A9A}\x{8A9B}\x{8A9C}\x{8A9D}' - . '\x{8A9E}\x{8AA0}\x{8AA1}\x{8AA2}\x{8AA3}\x{8AA4}\x{8AA5}\x{8AA6}\x{8AA7}' - . '\x{8AA8}\x{8AA9}\x{8AAA}\x{8AAB}\x{8AAC}\x{8AAE}\x{8AB0}\x{8AB1}\x{8AB2}' - . '\x{8AB3}\x{8AB4}\x{8AB5}\x{8AB6}\x{8AB8}\x{8AB9}\x{8ABA}\x{8ABB}\x{8ABC}' - . '\x{8ABD}\x{8ABE}\x{8ABF}\x{8AC0}\x{8AC1}\x{8AC2}\x{8AC3}\x{8AC4}\x{8AC5}' - . '\x{8AC6}\x{8AC7}\x{8AC8}\x{8AC9}\x{8ACA}\x{8ACB}\x{8ACC}\x{8ACD}\x{8ACE}' - . '\x{8ACF}\x{8AD1}\x{8AD2}\x{8AD3}\x{8AD4}\x{8AD5}\x{8AD6}\x{8AD7}\x{8AD8}' - . '\x{8AD9}\x{8ADA}\x{8ADB}\x{8ADC}\x{8ADD}\x{8ADE}\x{8ADF}\x{8AE0}\x{8AE1}' - . '\x{8AE2}\x{8AE3}\x{8AE4}\x{8AE5}\x{8AE6}\x{8AE7}\x{8AE8}\x{8AE9}\x{8AEA}' - . '\x{8AEB}\x{8AED}\x{8AEE}\x{8AEF}\x{8AF0}\x{8AF1}\x{8AF2}\x{8AF3}\x{8AF4}' - . '\x{8AF5}\x{8AF6}\x{8AF7}\x{8AF8}\x{8AF9}\x{8AFA}\x{8AFB}\x{8AFC}\x{8AFD}' - . '\x{8AFE}\x{8AFF}\x{8B00}\x{8B01}\x{8B02}\x{8B03}\x{8B04}\x{8B05}\x{8B06}' - . '\x{8B07}\x{8B08}\x{8B09}\x{8B0A}\x{8B0B}\x{8B0D}\x{8B0E}\x{8B0F}\x{8B10}' - . '\x{8B11}\x{8B12}\x{8B13}\x{8B14}\x{8B15}\x{8B16}\x{8B17}\x{8B18}\x{8B19}' - . '\x{8B1A}\x{8B1B}\x{8B1C}\x{8B1D}\x{8B1E}\x{8B1F}\x{8B20}\x{8B21}\x{8B22}' - . '\x{8B23}\x{8B24}\x{8B25}\x{8B26}\x{8B27}\x{8B28}\x{8B2A}\x{8B2B}\x{8B2C}' - . '\x{8B2D}\x{8B2E}\x{8B2F}\x{8B30}\x{8B31}\x{8B33}\x{8B34}\x{8B35}\x{8B36}' - . '\x{8B37}\x{8B39}\x{8B3A}\x{8B3B}\x{8B3C}\x{8B3D}\x{8B3E}\x{8B40}\x{8B41}' - . '\x{8B42}\x{8B43}\x{8B44}\x{8B45}\x{8B46}\x{8B47}\x{8B48}\x{8B49}\x{8B4A}' - . '\x{8B4B}\x{8B4C}\x{8B4D}\x{8B4E}\x{8B4F}\x{8B50}\x{8B51}\x{8B52}\x{8B53}' - . '\x{8B54}\x{8B55}\x{8B56}\x{8B57}\x{8B58}\x{8B59}\x{8B5A}\x{8B5B}\x{8B5C}' - . '\x{8B5D}\x{8B5E}\x{8B5F}\x{8B60}\x{8B63}\x{8B64}\x{8B65}\x{8B66}\x{8B67}' - . '\x{8B68}\x{8B6A}\x{8B6B}\x{8B6C}\x{8B6D}\x{8B6E}\x{8B6F}\x{8B70}\x{8B71}' - . '\x{8B73}\x{8B74}\x{8B76}\x{8B77}\x{8B78}\x{8B79}\x{8B7A}\x{8B7B}\x{8B7D}' - . '\x{8B7E}\x{8B7F}\x{8B80}\x{8B82}\x{8B83}\x{8B84}\x{8B85}\x{8B86}\x{8B88}' - . '\x{8B89}\x{8B8A}\x{8B8B}\x{8B8C}\x{8B8E}\x{8B90}\x{8B91}\x{8B92}\x{8B93}' - . '\x{8B94}\x{8B95}\x{8B96}\x{8B97}\x{8B98}\x{8B99}\x{8B9A}\x{8B9C}\x{8B9D}' - . '\x{8B9E}\x{8B9F}\x{8BA0}\x{8BA1}\x{8BA2}\x{8BA3}\x{8BA4}\x{8BA5}\x{8BA6}' - . '\x{8BA7}\x{8BA8}\x{8BA9}\x{8BAA}\x{8BAB}\x{8BAC}\x{8BAD}\x{8BAE}\x{8BAF}' - . '\x{8BB0}\x{8BB1}\x{8BB2}\x{8BB3}\x{8BB4}\x{8BB5}\x{8BB6}\x{8BB7}\x{8BB8}' - . '\x{8BB9}\x{8BBA}\x{8BBB}\x{8BBC}\x{8BBD}\x{8BBE}\x{8BBF}\x{8BC0}\x{8BC1}' - . '\x{8BC2}\x{8BC3}\x{8BC4}\x{8BC5}\x{8BC6}\x{8BC7}\x{8BC8}\x{8BC9}\x{8BCA}' - . '\x{8BCB}\x{8BCC}\x{8BCD}\x{8BCE}\x{8BCF}\x{8BD0}\x{8BD1}\x{8BD2}\x{8BD3}' - . '\x{8BD4}\x{8BD5}\x{8BD6}\x{8BD7}\x{8BD8}\x{8BD9}\x{8BDA}\x{8BDB}\x{8BDC}' - . '\x{8BDD}\x{8BDE}\x{8BDF}\x{8BE0}\x{8BE1}\x{8BE2}\x{8BE3}\x{8BE4}\x{8BE5}' - . '\x{8BE6}\x{8BE7}\x{8BE8}\x{8BE9}\x{8BEA}\x{8BEB}\x{8BEC}\x{8BED}\x{8BEE}' - . '\x{8BEF}\x{8BF0}\x{8BF1}\x{8BF2}\x{8BF3}\x{8BF4}\x{8BF5}\x{8BF6}\x{8BF7}' - . '\x{8BF8}\x{8BF9}\x{8BFA}\x{8BFB}\x{8BFC}\x{8BFD}\x{8BFE}\x{8BFF}\x{8C00}' - . '\x{8C01}\x{8C02}\x{8C03}\x{8C04}\x{8C05}\x{8C06}\x{8C07}\x{8C08}\x{8C09}' - . '\x{8C0A}\x{8C0B}\x{8C0C}\x{8C0D}\x{8C0E}\x{8C0F}\x{8C10}\x{8C11}\x{8C12}' - . '\x{8C13}\x{8C14}\x{8C15}\x{8C16}\x{8C17}\x{8C18}\x{8C19}\x{8C1A}\x{8C1B}' - . '\x{8C1C}\x{8C1D}\x{8C1E}\x{8C1F}\x{8C20}\x{8C21}\x{8C22}\x{8C23}\x{8C24}' - . '\x{8C25}\x{8C26}\x{8C27}\x{8C28}\x{8C29}\x{8C2A}\x{8C2B}\x{8C2C}\x{8C2D}' - . '\x{8C2E}\x{8C2F}\x{8C30}\x{8C31}\x{8C32}\x{8C33}\x{8C34}\x{8C35}\x{8C36}' - . '\x{8C37}\x{8C39}\x{8C3A}\x{8C3B}\x{8C3C}\x{8C3D}\x{8C3E}\x{8C3F}\x{8C41}' - . '\x{8C42}\x{8C43}\x{8C45}\x{8C46}\x{8C47}\x{8C48}\x{8C49}\x{8C4A}\x{8C4B}' - . '\x{8C4C}\x{8C4D}\x{8C4E}\x{8C4F}\x{8C50}\x{8C54}\x{8C55}\x{8C56}\x{8C57}' - . '\x{8C59}\x{8C5A}\x{8C5B}\x{8C5C}\x{8C5D}\x{8C5E}\x{8C5F}\x{8C60}\x{8C61}' - . '\x{8C62}\x{8C63}\x{8C64}\x{8C65}\x{8C66}\x{8C67}\x{8C68}\x{8C69}\x{8C6A}' - . '\x{8C6B}\x{8C6C}\x{8C6D}\x{8C6E}\x{8C6F}\x{8C70}\x{8C71}\x{8C72}\x{8C73}' - . '\x{8C75}\x{8C76}\x{8C77}\x{8C78}\x{8C79}\x{8C7A}\x{8C7B}\x{8C7D}\x{8C7E}' - . '\x{8C80}\x{8C81}\x{8C82}\x{8C84}\x{8C85}\x{8C86}\x{8C88}\x{8C89}\x{8C8A}' - . '\x{8C8C}\x{8C8D}\x{8C8F}\x{8C90}\x{8C91}\x{8C92}\x{8C93}\x{8C94}\x{8C95}' - . '\x{8C96}\x{8C97}\x{8C98}\x{8C99}\x{8C9A}\x{8C9C}\x{8C9D}\x{8C9E}\x{8C9F}' - . '\x{8CA0}\x{8CA1}\x{8CA2}\x{8CA3}\x{8CA4}\x{8CA5}\x{8CA7}\x{8CA8}\x{8CA9}' - . '\x{8CAA}\x{8CAB}\x{8CAC}\x{8CAD}\x{8CAE}\x{8CAF}\x{8CB0}\x{8CB1}\x{8CB2}' - . '\x{8CB3}\x{8CB4}\x{8CB5}\x{8CB6}\x{8CB7}\x{8CB8}\x{8CB9}\x{8CBA}\x{8CBB}' - . '\x{8CBC}\x{8CBD}\x{8CBE}\x{8CBF}\x{8CC0}\x{8CC1}\x{8CC2}\x{8CC3}\x{8CC4}' - . '\x{8CC5}\x{8CC6}\x{8CC7}\x{8CC8}\x{8CC9}\x{8CCA}\x{8CCC}\x{8CCE}\x{8CCF}' - . '\x{8CD0}\x{8CD1}\x{8CD2}\x{8CD3}\x{8CD4}\x{8CD5}\x{8CD7}\x{8CD9}\x{8CDA}' - . '\x{8CDB}\x{8CDC}\x{8CDD}\x{8CDE}\x{8CDF}\x{8CE0}\x{8CE1}\x{8CE2}\x{8CE3}' - . '\x{8CE4}\x{8CE5}\x{8CE6}\x{8CE7}\x{8CE8}\x{8CEA}\x{8CEB}\x{8CEC}\x{8CED}' - . '\x{8CEE}\x{8CEF}\x{8CF0}\x{8CF1}\x{8CF2}\x{8CF3}\x{8CF4}\x{8CF5}\x{8CF6}' - . '\x{8CF8}\x{8CF9}\x{8CFA}\x{8CFB}\x{8CFC}\x{8CFD}\x{8CFE}\x{8CFF}\x{8D00}' - . '\x{8D02}\x{8D03}\x{8D04}\x{8D05}\x{8D06}\x{8D07}\x{8D08}\x{8D09}\x{8D0A}' - . '\x{8D0B}\x{8D0C}\x{8D0D}\x{8D0E}\x{8D0F}\x{8D10}\x{8D13}\x{8D14}\x{8D15}' - . '\x{8D16}\x{8D17}\x{8D18}\x{8D19}\x{8D1A}\x{8D1B}\x{8D1C}\x{8D1D}\x{8D1E}' - . '\x{8D1F}\x{8D20}\x{8D21}\x{8D22}\x{8D23}\x{8D24}\x{8D25}\x{8D26}\x{8D27}' - . '\x{8D28}\x{8D29}\x{8D2A}\x{8D2B}\x{8D2C}\x{8D2D}\x{8D2E}\x{8D2F}\x{8D30}' - . '\x{8D31}\x{8D32}\x{8D33}\x{8D34}\x{8D35}\x{8D36}\x{8D37}\x{8D38}\x{8D39}' - . '\x{8D3A}\x{8D3B}\x{8D3C}\x{8D3D}\x{8D3E}\x{8D3F}\x{8D40}\x{8D41}\x{8D42}' - . '\x{8D43}\x{8D44}\x{8D45}\x{8D46}\x{8D47}\x{8D48}\x{8D49}\x{8D4A}\x{8D4B}' - . '\x{8D4C}\x{8D4D}\x{8D4E}\x{8D4F}\x{8D50}\x{8D51}\x{8D52}\x{8D53}\x{8D54}' - . '\x{8D55}\x{8D56}\x{8D57}\x{8D58}\x{8D59}\x{8D5A}\x{8D5B}\x{8D5C}\x{8D5D}' - . '\x{8D5E}\x{8D5F}\x{8D60}\x{8D61}\x{8D62}\x{8D63}\x{8D64}\x{8D65}\x{8D66}' - . '\x{8D67}\x{8D68}\x{8D69}\x{8D6A}\x{8D6B}\x{8D6C}\x{8D6D}\x{8D6E}\x{8D6F}' - . '\x{8D70}\x{8D71}\x{8D72}\x{8D73}\x{8D74}\x{8D75}\x{8D76}\x{8D77}\x{8D78}' - . '\x{8D79}\x{8D7A}\x{8D7B}\x{8D7D}\x{8D7E}\x{8D7F}\x{8D80}\x{8D81}\x{8D82}' - . '\x{8D83}\x{8D84}\x{8D85}\x{8D86}\x{8D87}\x{8D88}\x{8D89}\x{8D8A}\x{8D8B}' - . '\x{8D8C}\x{8D8D}\x{8D8E}\x{8D8F}\x{8D90}\x{8D91}\x{8D92}\x{8D93}\x{8D94}' - . '\x{8D95}\x{8D96}\x{8D97}\x{8D98}\x{8D99}\x{8D9A}\x{8D9B}\x{8D9C}\x{8D9D}' - . '\x{8D9E}\x{8D9F}\x{8DA0}\x{8DA1}\x{8DA2}\x{8DA3}\x{8DA4}\x{8DA5}\x{8DA7}' - . '\x{8DA8}\x{8DA9}\x{8DAA}\x{8DAB}\x{8DAC}\x{8DAD}\x{8DAE}\x{8DAF}\x{8DB0}' - . '\x{8DB1}\x{8DB2}\x{8DB3}\x{8DB4}\x{8DB5}\x{8DB6}\x{8DB7}\x{8DB8}\x{8DB9}' - . '\x{8DBA}\x{8DBB}\x{8DBC}\x{8DBD}\x{8DBE}\x{8DBF}\x{8DC1}\x{8DC2}\x{8DC3}' - . '\x{8DC4}\x{8DC5}\x{8DC6}\x{8DC7}\x{8DC8}\x{8DC9}\x{8DCA}\x{8DCB}\x{8DCC}' - . '\x{8DCD}\x{8DCE}\x{8DCF}\x{8DD0}\x{8DD1}\x{8DD2}\x{8DD3}\x{8DD4}\x{8DD5}' - . '\x{8DD6}\x{8DD7}\x{8DD8}\x{8DD9}\x{8DDA}\x{8DDB}\x{8DDC}\x{8DDD}\x{8DDE}' - . '\x{8DDF}\x{8DE0}\x{8DE1}\x{8DE2}\x{8DE3}\x{8DE4}\x{8DE6}\x{8DE7}\x{8DE8}' - . '\x{8DE9}\x{8DEA}\x{8DEB}\x{8DEC}\x{8DED}\x{8DEE}\x{8DEF}\x{8DF0}\x{8DF1}' - . '\x{8DF2}\x{8DF3}\x{8DF4}\x{8DF5}\x{8DF6}\x{8DF7}\x{8DF8}\x{8DF9}\x{8DFA}' - . '\x{8DFB}\x{8DFC}\x{8DFD}\x{8DFE}\x{8DFF}\x{8E00}\x{8E02}\x{8E03}\x{8E04}' - . '\x{8E05}\x{8E06}\x{8E07}\x{8E08}\x{8E09}\x{8E0A}\x{8E0C}\x{8E0D}\x{8E0E}' - . '\x{8E0F}\x{8E10}\x{8E11}\x{8E12}\x{8E13}\x{8E14}\x{8E15}\x{8E16}\x{8E17}' - . '\x{8E18}\x{8E19}\x{8E1A}\x{8E1B}\x{8E1C}\x{8E1D}\x{8E1E}\x{8E1F}\x{8E20}' - . '\x{8E21}\x{8E22}\x{8E23}\x{8E24}\x{8E25}\x{8E26}\x{8E27}\x{8E28}\x{8E29}' - . '\x{8E2A}\x{8E2B}\x{8E2C}\x{8E2D}\x{8E2E}\x{8E2F}\x{8E30}\x{8E31}\x{8E33}' - . '\x{8E34}\x{8E35}\x{8E36}\x{8E37}\x{8E38}\x{8E39}\x{8E3A}\x{8E3B}\x{8E3C}' - . '\x{8E3D}\x{8E3E}\x{8E3F}\x{8E40}\x{8E41}\x{8E42}\x{8E43}\x{8E44}\x{8E45}' - . '\x{8E47}\x{8E48}\x{8E49}\x{8E4A}\x{8E4B}\x{8E4C}\x{8E4D}\x{8E4E}\x{8E50}' - . '\x{8E51}\x{8E52}\x{8E53}\x{8E54}\x{8E55}\x{8E56}\x{8E57}\x{8E58}\x{8E59}' - . '\x{8E5A}\x{8E5B}\x{8E5C}\x{8E5D}\x{8E5E}\x{8E5F}\x{8E60}\x{8E61}\x{8E62}' - . '\x{8E63}\x{8E64}\x{8E65}\x{8E66}\x{8E67}\x{8E68}\x{8E69}\x{8E6A}\x{8E6B}' - . '\x{8E6C}\x{8E6D}\x{8E6F}\x{8E70}\x{8E71}\x{8E72}\x{8E73}\x{8E74}\x{8E76}' - . '\x{8E78}\x{8E7A}\x{8E7B}\x{8E7C}\x{8E7D}\x{8E7E}\x{8E7F}\x{8E80}\x{8E81}' - . '\x{8E82}\x{8E83}\x{8E84}\x{8E85}\x{8E86}\x{8E87}\x{8E88}\x{8E89}\x{8E8A}' - . '\x{8E8B}\x{8E8C}\x{8E8D}\x{8E8E}\x{8E8F}\x{8E90}\x{8E91}\x{8E92}\x{8E93}' - . '\x{8E94}\x{8E95}\x{8E96}\x{8E97}\x{8E98}\x{8E9A}\x{8E9C}\x{8E9D}\x{8E9E}' - . '\x{8E9F}\x{8EA0}\x{8EA1}\x{8EA3}\x{8EA4}\x{8EA5}\x{8EA6}\x{8EA7}\x{8EA8}' - . '\x{8EA9}\x{8EAA}\x{8EAB}\x{8EAC}\x{8EAD}\x{8EAE}\x{8EAF}\x{8EB0}\x{8EB1}' - . '\x{8EB2}\x{8EB4}\x{8EB5}\x{8EB8}\x{8EB9}\x{8EBA}\x{8EBB}\x{8EBC}\x{8EBD}' - . '\x{8EBE}\x{8EBF}\x{8EC0}\x{8EC2}\x{8EC3}\x{8EC5}\x{8EC6}\x{8EC7}\x{8EC8}' - . '\x{8EC9}\x{8ECA}\x{8ECB}\x{8ECC}\x{8ECD}\x{8ECE}\x{8ECF}\x{8ED0}\x{8ED1}' - . '\x{8ED2}\x{8ED3}\x{8ED4}\x{8ED5}\x{8ED6}\x{8ED7}\x{8ED8}\x{8EDA}\x{8EDB}' - . '\x{8EDC}\x{8EDD}\x{8EDE}\x{8EDF}\x{8EE0}\x{8EE1}\x{8EE4}\x{8EE5}\x{8EE6}' - . '\x{8EE7}\x{8EE8}\x{8EE9}\x{8EEA}\x{8EEB}\x{8EEC}\x{8EED}\x{8EEE}\x{8EEF}' - . '\x{8EF1}\x{8EF2}\x{8EF3}\x{8EF4}\x{8EF5}\x{8EF6}\x{8EF7}\x{8EF8}\x{8EF9}' - . '\x{8EFA}\x{8EFB}\x{8EFC}\x{8EFD}\x{8EFE}\x{8EFF}\x{8F00}\x{8F01}\x{8F02}' - . '\x{8F03}\x{8F04}\x{8F05}\x{8F06}\x{8F07}\x{8F08}\x{8F09}\x{8F0A}\x{8F0B}' - . '\x{8F0D}\x{8F0E}\x{8F10}\x{8F11}\x{8F12}\x{8F13}\x{8F14}\x{8F15}\x{8F16}' - . '\x{8F17}\x{8F18}\x{8F1A}\x{8F1B}\x{8F1C}\x{8F1D}\x{8F1E}\x{8F1F}\x{8F20}' - . '\x{8F21}\x{8F22}\x{8F23}\x{8F24}\x{8F25}\x{8F26}\x{8F27}\x{8F28}\x{8F29}' - . '\x{8F2A}\x{8F2B}\x{8F2C}\x{8F2E}\x{8F2F}\x{8F30}\x{8F31}\x{8F32}\x{8F33}' - . '\x{8F34}\x{8F35}\x{8F36}\x{8F37}\x{8F38}\x{8F39}\x{8F3B}\x{8F3C}\x{8F3D}' - . '\x{8F3E}\x{8F3F}\x{8F40}\x{8F42}\x{8F43}\x{8F44}\x{8F45}\x{8F46}\x{8F47}' - . '\x{8F48}\x{8F49}\x{8F4A}\x{8F4B}\x{8F4C}\x{8F4D}\x{8F4E}\x{8F4F}\x{8F50}' - . '\x{8F51}\x{8F52}\x{8F53}\x{8F54}\x{8F55}\x{8F56}\x{8F57}\x{8F58}\x{8F59}' - . '\x{8F5A}\x{8F5B}\x{8F5D}\x{8F5E}\x{8F5F}\x{8F60}\x{8F61}\x{8F62}\x{8F63}' - . '\x{8F64}\x{8F65}\x{8F66}\x{8F67}\x{8F68}\x{8F69}\x{8F6A}\x{8F6B}\x{8F6C}' - . '\x{8F6D}\x{8F6E}\x{8F6F}\x{8F70}\x{8F71}\x{8F72}\x{8F73}\x{8F74}\x{8F75}' - . '\x{8F76}\x{8F77}\x{8F78}\x{8F79}\x{8F7A}\x{8F7B}\x{8F7C}\x{8F7D}\x{8F7E}' - . '\x{8F7F}\x{8F80}\x{8F81}\x{8F82}\x{8F83}\x{8F84}\x{8F85}\x{8F86}\x{8F87}' - . '\x{8F88}\x{8F89}\x{8F8A}\x{8F8B}\x{8F8C}\x{8F8D}\x{8F8E}\x{8F8F}\x{8F90}' - . '\x{8F91}\x{8F92}\x{8F93}\x{8F94}\x{8F95}\x{8F96}\x{8F97}\x{8F98}\x{8F99}' - . '\x{8F9A}\x{8F9B}\x{8F9C}\x{8F9E}\x{8F9F}\x{8FA0}\x{8FA1}\x{8FA2}\x{8FA3}' - . '\x{8FA5}\x{8FA6}\x{8FA7}\x{8FA8}\x{8FA9}\x{8FAA}\x{8FAB}\x{8FAC}\x{8FAD}' - . '\x{8FAE}\x{8FAF}\x{8FB0}\x{8FB1}\x{8FB2}\x{8FB4}\x{8FB5}\x{8FB6}\x{8FB7}' - . '\x{8FB8}\x{8FB9}\x{8FBB}\x{8FBC}\x{8FBD}\x{8FBE}\x{8FBF}\x{8FC0}\x{8FC1}' - . '\x{8FC2}\x{8FC4}\x{8FC5}\x{8FC6}\x{8FC7}\x{8FC8}\x{8FC9}\x{8FCB}\x{8FCC}' - . '\x{8FCD}\x{8FCE}\x{8FCF}\x{8FD0}\x{8FD1}\x{8FD2}\x{8FD3}\x{8FD4}\x{8FD5}' - . '\x{8FD6}\x{8FD7}\x{8FD8}\x{8FD9}\x{8FDA}\x{8FDB}\x{8FDC}\x{8FDD}\x{8FDE}' - . '\x{8FDF}\x{8FE0}\x{8FE1}\x{8FE2}\x{8FE3}\x{8FE4}\x{8FE5}\x{8FE6}\x{8FE8}' - . '\x{8FE9}\x{8FEA}\x{8FEB}\x{8FEC}\x{8FED}\x{8FEE}\x{8FEF}\x{8FF0}\x{8FF1}' - . '\x{8FF2}\x{8FF3}\x{8FF4}\x{8FF5}\x{8FF6}\x{8FF7}\x{8FF8}\x{8FF9}\x{8FFA}' - . '\x{8FFB}\x{8FFC}\x{8FFD}\x{8FFE}\x{8FFF}\x{9000}\x{9001}\x{9002}\x{9003}' - . '\x{9004}\x{9005}\x{9006}\x{9007}\x{9008}\x{9009}\x{900A}\x{900B}\x{900C}' - . '\x{900D}\x{900F}\x{9010}\x{9011}\x{9012}\x{9013}\x{9014}\x{9015}\x{9016}' - . '\x{9017}\x{9018}\x{9019}\x{901A}\x{901B}\x{901C}\x{901D}\x{901E}\x{901F}' - . '\x{9020}\x{9021}\x{9022}\x{9023}\x{9024}\x{9025}\x{9026}\x{9027}\x{9028}' - . '\x{9029}\x{902B}\x{902D}\x{902E}\x{902F}\x{9030}\x{9031}\x{9032}\x{9033}' - . '\x{9034}\x{9035}\x{9036}\x{9038}\x{903A}\x{903B}\x{903C}\x{903D}\x{903E}' - . '\x{903F}\x{9041}\x{9042}\x{9043}\x{9044}\x{9045}\x{9047}\x{9048}\x{9049}' - . '\x{904A}\x{904B}\x{904C}\x{904D}\x{904E}\x{904F}\x{9050}\x{9051}\x{9052}' - . '\x{9053}\x{9054}\x{9055}\x{9056}\x{9057}\x{9058}\x{9059}\x{905A}\x{905B}' - . '\x{905C}\x{905D}\x{905E}\x{905F}\x{9060}\x{9061}\x{9062}\x{9063}\x{9064}' - . '\x{9065}\x{9066}\x{9067}\x{9068}\x{9069}\x{906A}\x{906B}\x{906C}\x{906D}' - . '\x{906E}\x{906F}\x{9070}\x{9071}\x{9072}\x{9073}\x{9074}\x{9075}\x{9076}' - . '\x{9077}\x{9078}\x{9079}\x{907A}\x{907B}\x{907C}\x{907D}\x{907E}\x{907F}' - . '\x{9080}\x{9081}\x{9082}\x{9083}\x{9084}\x{9085}\x{9086}\x{9087}\x{9088}' - . '\x{9089}\x{908A}\x{908B}\x{908C}\x{908D}\x{908E}\x{908F}\x{9090}\x{9091}' - . '\x{9092}\x{9093}\x{9094}\x{9095}\x{9096}\x{9097}\x{9098}\x{9099}\x{909A}' - . '\x{909B}\x{909C}\x{909D}\x{909E}\x{909F}\x{90A0}\x{90A1}\x{90A2}\x{90A3}' - . '\x{90A4}\x{90A5}\x{90A6}\x{90A7}\x{90A8}\x{90A9}\x{90AA}\x{90AC}\x{90AD}' - . '\x{90AE}\x{90AF}\x{90B0}\x{90B1}\x{90B2}\x{90B3}\x{90B4}\x{90B5}\x{90B6}' - . '\x{90B7}\x{90B8}\x{90B9}\x{90BA}\x{90BB}\x{90BC}\x{90BD}\x{90BE}\x{90BF}' - . '\x{90C0}\x{90C1}\x{90C2}\x{90C3}\x{90C4}\x{90C5}\x{90C6}\x{90C7}\x{90C8}' - . '\x{90C9}\x{90CA}\x{90CB}\x{90CE}\x{90CF}\x{90D0}\x{90D1}\x{90D3}\x{90D4}' - . '\x{90D5}\x{90D6}\x{90D7}\x{90D8}\x{90D9}\x{90DA}\x{90DB}\x{90DC}\x{90DD}' - . '\x{90DE}\x{90DF}\x{90E0}\x{90E1}\x{90E2}\x{90E3}\x{90E4}\x{90E5}\x{90E6}' - . '\x{90E7}\x{90E8}\x{90E9}\x{90EA}\x{90EB}\x{90EC}\x{90ED}\x{90EE}\x{90EF}' - . '\x{90F0}\x{90F1}\x{90F2}\x{90F3}\x{90F4}\x{90F5}\x{90F7}\x{90F8}\x{90F9}' - . '\x{90FA}\x{90FB}\x{90FC}\x{90FD}\x{90FE}\x{90FF}\x{9100}\x{9101}\x{9102}' - . '\x{9103}\x{9104}\x{9105}\x{9106}\x{9107}\x{9108}\x{9109}\x{910B}\x{910C}' - . '\x{910D}\x{910E}\x{910F}\x{9110}\x{9111}\x{9112}\x{9113}\x{9114}\x{9115}' - . '\x{9116}\x{9117}\x{9118}\x{9119}\x{911A}\x{911B}\x{911C}\x{911D}\x{911E}' - . '\x{911F}\x{9120}\x{9121}\x{9122}\x{9123}\x{9124}\x{9125}\x{9126}\x{9127}' - . '\x{9128}\x{9129}\x{912A}\x{912B}\x{912C}\x{912D}\x{912E}\x{912F}\x{9130}' - . '\x{9131}\x{9132}\x{9133}\x{9134}\x{9135}\x{9136}\x{9137}\x{9138}\x{9139}' - . '\x{913A}\x{913B}\x{913E}\x{913F}\x{9140}\x{9141}\x{9142}\x{9143}\x{9144}' - . '\x{9145}\x{9146}\x{9147}\x{9148}\x{9149}\x{914A}\x{914B}\x{914C}\x{914D}' - . '\x{914E}\x{914F}\x{9150}\x{9151}\x{9152}\x{9153}\x{9154}\x{9155}\x{9156}' - . '\x{9157}\x{9158}\x{915A}\x{915B}\x{915C}\x{915D}\x{915E}\x{915F}\x{9160}' - . '\x{9161}\x{9162}\x{9163}\x{9164}\x{9165}\x{9166}\x{9167}\x{9168}\x{9169}' - . '\x{916A}\x{916B}\x{916C}\x{916D}\x{916E}\x{916F}\x{9170}\x{9171}\x{9172}' - . '\x{9173}\x{9174}\x{9175}\x{9176}\x{9177}\x{9178}\x{9179}\x{917A}\x{917C}' - . '\x{917D}\x{917E}\x{917F}\x{9180}\x{9181}\x{9182}\x{9183}\x{9184}\x{9185}' - . '\x{9186}\x{9187}\x{9188}\x{9189}\x{918A}\x{918B}\x{918C}\x{918D}\x{918E}' - . '\x{918F}\x{9190}\x{9191}\x{9192}\x{9193}\x{9194}\x{9196}\x{9199}\x{919A}' - . '\x{919B}\x{919C}\x{919D}\x{919E}\x{919F}\x{91A0}\x{91A1}\x{91A2}\x{91A3}' - . '\x{91A5}\x{91A6}\x{91A7}\x{91A8}\x{91AA}\x{91AB}\x{91AC}\x{91AD}\x{91AE}' - . '\x{91AF}\x{91B0}\x{91B1}\x{91B2}\x{91B3}\x{91B4}\x{91B5}\x{91B6}\x{91B7}' - . '\x{91B9}\x{91BA}\x{91BB}\x{91BC}\x{91BD}\x{91BE}\x{91C0}\x{91C1}\x{91C2}' - . '\x{91C3}\x{91C5}\x{91C6}\x{91C7}\x{91C9}\x{91CA}\x{91CB}\x{91CC}\x{91CD}' - . '\x{91CE}\x{91CF}\x{91D0}\x{91D1}\x{91D2}\x{91D3}\x{91D4}\x{91D5}\x{91D7}' - . '\x{91D8}\x{91D9}\x{91DA}\x{91DB}\x{91DC}\x{91DD}\x{91DE}\x{91DF}\x{91E2}' - . '\x{91E3}\x{91E4}\x{91E5}\x{91E6}\x{91E7}\x{91E8}\x{91E9}\x{91EA}\x{91EB}' - . '\x{91EC}\x{91ED}\x{91EE}\x{91F0}\x{91F1}\x{91F2}\x{91F3}\x{91F4}\x{91F5}' - . '\x{91F7}\x{91F8}\x{91F9}\x{91FA}\x{91FB}\x{91FD}\x{91FE}\x{91FF}\x{9200}' - . '\x{9201}\x{9202}\x{9203}\x{9204}\x{9205}\x{9206}\x{9207}\x{9208}\x{9209}' - . '\x{920A}\x{920B}\x{920C}\x{920D}\x{920E}\x{920F}\x{9210}\x{9211}\x{9212}' - . '\x{9214}\x{9215}\x{9216}\x{9217}\x{9218}\x{9219}\x{921A}\x{921B}\x{921C}' - . '\x{921D}\x{921E}\x{9220}\x{9221}\x{9223}\x{9224}\x{9225}\x{9226}\x{9227}' - . '\x{9228}\x{9229}\x{922A}\x{922B}\x{922D}\x{922E}\x{922F}\x{9230}\x{9231}' - . '\x{9232}\x{9233}\x{9234}\x{9235}\x{9236}\x{9237}\x{9238}\x{9239}\x{923A}' - . '\x{923B}\x{923C}\x{923D}\x{923E}\x{923F}\x{9240}\x{9241}\x{9242}\x{9245}' - . '\x{9246}\x{9247}\x{9248}\x{9249}\x{924A}\x{924B}\x{924C}\x{924D}\x{924E}' - . '\x{924F}\x{9250}\x{9251}\x{9252}\x{9253}\x{9254}\x{9255}\x{9256}\x{9257}' - . '\x{9258}\x{9259}\x{925A}\x{925B}\x{925C}\x{925D}\x{925E}\x{925F}\x{9260}' - . '\x{9261}\x{9262}\x{9263}\x{9264}\x{9265}\x{9266}\x{9267}\x{9268}\x{926B}' - . '\x{926C}\x{926D}\x{926E}\x{926F}\x{9270}\x{9272}\x{9273}\x{9274}\x{9275}' - . '\x{9276}\x{9277}\x{9278}\x{9279}\x{927A}\x{927B}\x{927C}\x{927D}\x{927E}' - . '\x{927F}\x{9280}\x{9282}\x{9283}\x{9285}\x{9286}\x{9287}\x{9288}\x{9289}' - . '\x{928A}\x{928B}\x{928C}\x{928D}\x{928E}\x{928F}\x{9290}\x{9291}\x{9292}' - . '\x{9293}\x{9294}\x{9295}\x{9296}\x{9297}\x{9298}\x{9299}\x{929A}\x{929B}' - . '\x{929C}\x{929D}\x{929F}\x{92A0}\x{92A1}\x{92A2}\x{92A3}\x{92A4}\x{92A5}' - . '\x{92A6}\x{92A7}\x{92A8}\x{92A9}\x{92AA}\x{92AB}\x{92AC}\x{92AD}\x{92AE}' - . '\x{92AF}\x{92B0}\x{92B1}\x{92B2}\x{92B3}\x{92B4}\x{92B5}\x{92B6}\x{92B7}' - . '\x{92B8}\x{92B9}\x{92BA}\x{92BB}\x{92BC}\x{92BE}\x{92BF}\x{92C0}\x{92C1}' - . '\x{92C2}\x{92C3}\x{92C4}\x{92C5}\x{92C6}\x{92C7}\x{92C8}\x{92C9}\x{92CA}' - . '\x{92CB}\x{92CC}\x{92CD}\x{92CE}\x{92CF}\x{92D0}\x{92D1}\x{92D2}\x{92D3}' - . '\x{92D5}\x{92D6}\x{92D7}\x{92D8}\x{92D9}\x{92DA}\x{92DC}\x{92DD}\x{92DE}' - . '\x{92DF}\x{92E0}\x{92E1}\x{92E3}\x{92E4}\x{92E5}\x{92E6}\x{92E7}\x{92E8}' - . '\x{92E9}\x{92EA}\x{92EB}\x{92EC}\x{92ED}\x{92EE}\x{92EF}\x{92F0}\x{92F1}' - . '\x{92F2}\x{92F3}\x{92F4}\x{92F5}\x{92F6}\x{92F7}\x{92F8}\x{92F9}\x{92FA}' - . '\x{92FB}\x{92FC}\x{92FD}\x{92FE}\x{92FF}\x{9300}\x{9301}\x{9302}\x{9303}' - . '\x{9304}\x{9305}\x{9306}\x{9307}\x{9308}\x{9309}\x{930A}\x{930B}\x{930C}' - . '\x{930D}\x{930E}\x{930F}\x{9310}\x{9311}\x{9312}\x{9313}\x{9314}\x{9315}' - . '\x{9316}\x{9317}\x{9318}\x{9319}\x{931A}\x{931B}\x{931D}\x{931E}\x{931F}' - . '\x{9320}\x{9321}\x{9322}\x{9323}\x{9324}\x{9325}\x{9326}\x{9327}\x{9328}' - . '\x{9329}\x{932A}\x{932B}\x{932D}\x{932E}\x{932F}\x{9332}\x{9333}\x{9334}' - . '\x{9335}\x{9336}\x{9337}\x{9338}\x{9339}\x{933A}\x{933B}\x{933C}\x{933D}' - . '\x{933E}\x{933F}\x{9340}\x{9341}\x{9342}\x{9343}\x{9344}\x{9345}\x{9346}' - . '\x{9347}\x{9348}\x{9349}\x{934A}\x{934B}\x{934C}\x{934D}\x{934E}\x{934F}' - . '\x{9350}\x{9351}\x{9352}\x{9353}\x{9354}\x{9355}\x{9356}\x{9357}\x{9358}' - . '\x{9359}\x{935A}\x{935B}\x{935C}\x{935D}\x{935E}\x{935F}\x{9360}\x{9361}' - . '\x{9363}\x{9364}\x{9365}\x{9366}\x{9367}\x{9369}\x{936A}\x{936C}\x{936D}' - . '\x{936E}\x{9370}\x{9371}\x{9372}\x{9374}\x{9375}\x{9376}\x{9377}\x{9379}' - . '\x{937A}\x{937B}\x{937C}\x{937D}\x{937E}\x{9380}\x{9382}\x{9383}\x{9384}' - . '\x{9385}\x{9386}\x{9387}\x{9388}\x{9389}\x{938A}\x{938C}\x{938D}\x{938E}' - . '\x{938F}\x{9390}\x{9391}\x{9392}\x{9393}\x{9394}\x{9395}\x{9396}\x{9397}' - . '\x{9398}\x{9399}\x{939A}\x{939B}\x{939D}\x{939E}\x{939F}\x{93A1}\x{93A2}' - . '\x{93A3}\x{93A4}\x{93A5}\x{93A6}\x{93A7}\x{93A8}\x{93A9}\x{93AA}\x{93AC}' - . '\x{93AD}\x{93AE}\x{93AF}\x{93B0}\x{93B1}\x{93B2}\x{93B3}\x{93B4}\x{93B5}' - . '\x{93B6}\x{93B7}\x{93B8}\x{93B9}\x{93BA}\x{93BC}\x{93BD}\x{93BE}\x{93BF}' - . '\x{93C0}\x{93C1}\x{93C2}\x{93C3}\x{93C4}\x{93C5}\x{93C6}\x{93C7}\x{93C8}' - . '\x{93C9}\x{93CA}\x{93CB}\x{93CC}\x{93CD}\x{93CE}\x{93CF}\x{93D0}\x{93D1}' - . '\x{93D2}\x{93D3}\x{93D4}\x{93D5}\x{93D6}\x{93D7}\x{93D8}\x{93D9}\x{93DA}' - . '\x{93DB}\x{93DC}\x{93DD}\x{93DE}\x{93DF}\x{93E1}\x{93E2}\x{93E3}\x{93E4}' - . '\x{93E6}\x{93E7}\x{93E8}\x{93E9}\x{93EA}\x{93EB}\x{93EC}\x{93ED}\x{93EE}' - . '\x{93EF}\x{93F0}\x{93F1}\x{93F2}\x{93F4}\x{93F5}\x{93F6}\x{93F7}\x{93F8}' - . '\x{93F9}\x{93FA}\x{93FB}\x{93FC}\x{93FD}\x{93FE}\x{93FF}\x{9400}\x{9401}' - . '\x{9403}\x{9404}\x{9405}\x{9406}\x{9407}\x{9408}\x{9409}\x{940A}\x{940B}' - . '\x{940C}\x{940D}\x{940E}\x{940F}\x{9410}\x{9411}\x{9412}\x{9413}\x{9414}' - . '\x{9415}\x{9416}\x{9418}\x{9419}\x{941B}\x{941D}\x{9420}\x{9422}\x{9423}' - . '\x{9425}\x{9426}\x{9427}\x{9428}\x{9429}\x{942A}\x{942B}\x{942C}\x{942D}' - . '\x{942E}\x{942F}\x{9430}\x{9431}\x{9432}\x{9433}\x{9434}\x{9435}\x{9436}' - . '\x{9437}\x{9438}\x{9439}\x{943A}\x{943B}\x{943C}\x{943D}\x{943E}\x{943F}' - . '\x{9440}\x{9441}\x{9442}\x{9444}\x{9445}\x{9446}\x{9447}\x{9448}\x{9449}' - . '\x{944A}\x{944B}\x{944C}\x{944D}\x{944F}\x{9450}\x{9451}\x{9452}\x{9453}' - . '\x{9454}\x{9455}\x{9456}\x{9457}\x{9458}\x{9459}\x{945B}\x{945C}\x{945D}' - . '\x{945E}\x{945F}\x{9460}\x{9461}\x{9462}\x{9463}\x{9464}\x{9465}\x{9466}' - . '\x{9467}\x{9468}\x{9469}\x{946A}\x{946B}\x{946D}\x{946E}\x{946F}\x{9470}' - . '\x{9471}\x{9472}\x{9473}\x{9474}\x{9475}\x{9476}\x{9477}\x{9478}\x{9479}' - . '\x{947A}\x{947C}\x{947D}\x{947E}\x{947F}\x{9480}\x{9481}\x{9482}\x{9483}' - . '\x{9484}\x{9485}\x{9486}\x{9487}\x{9488}\x{9489}\x{948A}\x{948B}\x{948C}' - . '\x{948D}\x{948E}\x{948F}\x{9490}\x{9491}\x{9492}\x{9493}\x{9494}\x{9495}' - . '\x{9496}\x{9497}\x{9498}\x{9499}\x{949A}\x{949B}\x{949C}\x{949D}\x{949E}' - . '\x{949F}\x{94A0}\x{94A1}\x{94A2}\x{94A3}\x{94A4}\x{94A5}\x{94A6}\x{94A7}' - . '\x{94A8}\x{94A9}\x{94AA}\x{94AB}\x{94AC}\x{94AD}\x{94AE}\x{94AF}\x{94B0}' - . '\x{94B1}\x{94B2}\x{94B3}\x{94B4}\x{94B5}\x{94B6}\x{94B7}\x{94B8}\x{94B9}' - . '\x{94BA}\x{94BB}\x{94BC}\x{94BD}\x{94BE}\x{94BF}\x{94C0}\x{94C1}\x{94C2}' - . '\x{94C3}\x{94C4}\x{94C5}\x{94C6}\x{94C7}\x{94C8}\x{94C9}\x{94CA}\x{94CB}' - . '\x{94CC}\x{94CD}\x{94CE}\x{94CF}\x{94D0}\x{94D1}\x{94D2}\x{94D3}\x{94D4}' - . '\x{94D5}\x{94D6}\x{94D7}\x{94D8}\x{94D9}\x{94DA}\x{94DB}\x{94DC}\x{94DD}' - . '\x{94DE}\x{94DF}\x{94E0}\x{94E1}\x{94E2}\x{94E3}\x{94E4}\x{94E5}\x{94E6}' - . '\x{94E7}\x{94E8}\x{94E9}\x{94EA}\x{94EB}\x{94EC}\x{94ED}\x{94EE}\x{94EF}' - . '\x{94F0}\x{94F1}\x{94F2}\x{94F3}\x{94F4}\x{94F5}\x{94F6}\x{94F7}\x{94F8}' - . '\x{94F9}\x{94FA}\x{94FB}\x{94FC}\x{94FD}\x{94FE}\x{94FF}\x{9500}\x{9501}' - . '\x{9502}\x{9503}\x{9504}\x{9505}\x{9506}\x{9507}\x{9508}\x{9509}\x{950A}' - . '\x{950B}\x{950C}\x{950D}\x{950E}\x{950F}\x{9510}\x{9511}\x{9512}\x{9513}' - . '\x{9514}\x{9515}\x{9516}\x{9517}\x{9518}\x{9519}\x{951A}\x{951B}\x{951C}' - . '\x{951D}\x{951E}\x{951F}\x{9520}\x{9521}\x{9522}\x{9523}\x{9524}\x{9525}' - . '\x{9526}\x{9527}\x{9528}\x{9529}\x{952A}\x{952B}\x{952C}\x{952D}\x{952E}' - . '\x{952F}\x{9530}\x{9531}\x{9532}\x{9533}\x{9534}\x{9535}\x{9536}\x{9537}' - . '\x{9538}\x{9539}\x{953A}\x{953B}\x{953C}\x{953D}\x{953E}\x{953F}\x{9540}' - . '\x{9541}\x{9542}\x{9543}\x{9544}\x{9545}\x{9546}\x{9547}\x{9548}\x{9549}' - . '\x{954A}\x{954B}\x{954C}\x{954D}\x{954E}\x{954F}\x{9550}\x{9551}\x{9552}' - . '\x{9553}\x{9554}\x{9555}\x{9556}\x{9557}\x{9558}\x{9559}\x{955A}\x{955B}' - . '\x{955C}\x{955D}\x{955E}\x{955F}\x{9560}\x{9561}\x{9562}\x{9563}\x{9564}' - . '\x{9565}\x{9566}\x{9567}\x{9568}\x{9569}\x{956A}\x{956B}\x{956C}\x{956D}' - . '\x{956E}\x{956F}\x{9570}\x{9571}\x{9572}\x{9573}\x{9574}\x{9575}\x{9576}' - . '\x{9577}\x{957A}\x{957B}\x{957C}\x{957D}\x{957F}\x{9580}\x{9581}\x{9582}' - . '\x{9583}\x{9584}\x{9586}\x{9587}\x{9588}\x{9589}\x{958A}\x{958B}\x{958C}' - . '\x{958D}\x{958E}\x{958F}\x{9590}\x{9591}\x{9592}\x{9593}\x{9594}\x{9595}' - . '\x{9596}\x{9598}\x{9599}\x{959A}\x{959B}\x{959C}\x{959D}\x{959E}\x{959F}' - . '\x{95A1}\x{95A2}\x{95A3}\x{95A4}\x{95A5}\x{95A6}\x{95A7}\x{95A8}\x{95A9}' - . '\x{95AA}\x{95AB}\x{95AC}\x{95AD}\x{95AE}\x{95AF}\x{95B0}\x{95B1}\x{95B2}' - . '\x{95B5}\x{95B6}\x{95B7}\x{95B9}\x{95BA}\x{95BB}\x{95BC}\x{95BD}\x{95BE}' - . '\x{95BF}\x{95C0}\x{95C2}\x{95C3}\x{95C4}\x{95C5}\x{95C6}\x{95C7}\x{95C8}' - . '\x{95C9}\x{95CA}\x{95CB}\x{95CC}\x{95CD}\x{95CE}\x{95CF}\x{95D0}\x{95D1}' - . '\x{95D2}\x{95D3}\x{95D4}\x{95D5}\x{95D6}\x{95D7}\x{95D8}\x{95DA}\x{95DB}' - . '\x{95DC}\x{95DE}\x{95DF}\x{95E0}\x{95E1}\x{95E2}\x{95E3}\x{95E4}\x{95E5}' - . '\x{95E6}\x{95E7}\x{95E8}\x{95E9}\x{95EA}\x{95EB}\x{95EC}\x{95ED}\x{95EE}' - . '\x{95EF}\x{95F0}\x{95F1}\x{95F2}\x{95F3}\x{95F4}\x{95F5}\x{95F6}\x{95F7}' - . '\x{95F8}\x{95F9}\x{95FA}\x{95FB}\x{95FC}\x{95FD}\x{95FE}\x{95FF}\x{9600}' - . '\x{9601}\x{9602}\x{9603}\x{9604}\x{9605}\x{9606}\x{9607}\x{9608}\x{9609}' - . '\x{960A}\x{960B}\x{960C}\x{960D}\x{960E}\x{960F}\x{9610}\x{9611}\x{9612}' - . '\x{9613}\x{9614}\x{9615}\x{9616}\x{9617}\x{9618}\x{9619}\x{961A}\x{961B}' - . '\x{961C}\x{961D}\x{961E}\x{961F}\x{9620}\x{9621}\x{9622}\x{9623}\x{9624}' - . '\x{9627}\x{9628}\x{962A}\x{962B}\x{962C}\x{962D}\x{962E}\x{962F}\x{9630}' - . '\x{9631}\x{9632}\x{9633}\x{9634}\x{9635}\x{9636}\x{9637}\x{9638}\x{9639}' - . '\x{963A}\x{963B}\x{963C}\x{963D}\x{963F}\x{9640}\x{9641}\x{9642}\x{9643}' - . '\x{9644}\x{9645}\x{9646}\x{9647}\x{9648}\x{9649}\x{964A}\x{964B}\x{964C}' - . '\x{964D}\x{964E}\x{964F}\x{9650}\x{9651}\x{9652}\x{9653}\x{9654}\x{9655}' - . '\x{9658}\x{9659}\x{965A}\x{965B}\x{965C}\x{965D}\x{965E}\x{965F}\x{9660}' - . '\x{9661}\x{9662}\x{9663}\x{9664}\x{9666}\x{9667}\x{9668}\x{9669}\x{966A}' - . '\x{966B}\x{966C}\x{966D}\x{966E}\x{966F}\x{9670}\x{9671}\x{9672}\x{9673}' - . '\x{9674}\x{9675}\x{9676}\x{9677}\x{9678}\x{967C}\x{967D}\x{967E}\x{9680}' - . '\x{9683}\x{9684}\x{9685}\x{9686}\x{9687}\x{9688}\x{9689}\x{968A}\x{968B}' - . '\x{968D}\x{968E}\x{968F}\x{9690}\x{9691}\x{9692}\x{9693}\x{9694}\x{9695}' - . '\x{9697}\x{9698}\x{9699}\x{969B}\x{969C}\x{969E}\x{96A0}\x{96A1}\x{96A2}' - . '\x{96A3}\x{96A4}\x{96A5}\x{96A6}\x{96A7}\x{96A8}\x{96A9}\x{96AA}\x{96AC}' - . '\x{96AD}\x{96AE}\x{96B0}\x{96B1}\x{96B3}\x{96B4}\x{96B6}\x{96B7}\x{96B8}' - . '\x{96B9}\x{96BA}\x{96BB}\x{96BC}\x{96BD}\x{96BE}\x{96BF}\x{96C0}\x{96C1}' - . '\x{96C2}\x{96C3}\x{96C4}\x{96C5}\x{96C6}\x{96C7}\x{96C8}\x{96C9}\x{96CA}' - . '\x{96CB}\x{96CC}\x{96CD}\x{96CE}\x{96CF}\x{96D0}\x{96D1}\x{96D2}\x{96D3}' - . '\x{96D4}\x{96D5}\x{96D6}\x{96D7}\x{96D8}\x{96D9}\x{96DA}\x{96DB}\x{96DC}' - . '\x{96DD}\x{96DE}\x{96DF}\x{96E0}\x{96E1}\x{96E2}\x{96E3}\x{96E5}\x{96E8}' - . '\x{96E9}\x{96EA}\x{96EB}\x{96EC}\x{96ED}\x{96EE}\x{96EF}\x{96F0}\x{96F1}' - . '\x{96F2}\x{96F3}\x{96F4}\x{96F5}\x{96F6}\x{96F7}\x{96F8}\x{96F9}\x{96FA}' - . '\x{96FB}\x{96FD}\x{96FE}\x{96FF}\x{9700}\x{9701}\x{9702}\x{9703}\x{9704}' - . '\x{9705}\x{9706}\x{9707}\x{9708}\x{9709}\x{970A}\x{970B}\x{970C}\x{970D}' - . '\x{970E}\x{970F}\x{9710}\x{9711}\x{9712}\x{9713}\x{9715}\x{9716}\x{9718}' - . '\x{9719}\x{971C}\x{971D}\x{971E}\x{971F}\x{9720}\x{9721}\x{9722}\x{9723}' - . '\x{9724}\x{9725}\x{9726}\x{9727}\x{9728}\x{9729}\x{972A}\x{972B}\x{972C}' - . '\x{972D}\x{972E}\x{972F}\x{9730}\x{9731}\x{9732}\x{9735}\x{9736}\x{9738}' - . '\x{9739}\x{973A}\x{973B}\x{973C}\x{973D}\x{973E}\x{973F}\x{9742}\x{9743}' - . '\x{9744}\x{9745}\x{9746}\x{9747}\x{9748}\x{9749}\x{974A}\x{974B}\x{974C}' - . '\x{974E}\x{974F}\x{9750}\x{9751}\x{9752}\x{9753}\x{9754}\x{9755}\x{9756}' - . '\x{9758}\x{9759}\x{975A}\x{975B}\x{975C}\x{975D}\x{975E}\x{975F}\x{9760}' - . '\x{9761}\x{9762}\x{9765}\x{9766}\x{9767}\x{9768}\x{9769}\x{976A}\x{976B}' - . '\x{976C}\x{976D}\x{976E}\x{976F}\x{9770}\x{9772}\x{9773}\x{9774}\x{9776}' - . '\x{9777}\x{9778}\x{9779}\x{977A}\x{977B}\x{977C}\x{977D}\x{977E}\x{977F}' - . '\x{9780}\x{9781}\x{9782}\x{9783}\x{9784}\x{9785}\x{9786}\x{9788}\x{978A}' - . '\x{978B}\x{978C}\x{978D}\x{978E}\x{978F}\x{9790}\x{9791}\x{9792}\x{9793}' - . '\x{9794}\x{9795}\x{9796}\x{9797}\x{9798}\x{9799}\x{979A}\x{979C}\x{979D}' - . '\x{979E}\x{979F}\x{97A0}\x{97A1}\x{97A2}\x{97A3}\x{97A4}\x{97A5}\x{97A6}' - . '\x{97A7}\x{97A8}\x{97AA}\x{97AB}\x{97AC}\x{97AD}\x{97AE}\x{97AF}\x{97B2}' - . '\x{97B3}\x{97B4}\x{97B6}\x{97B7}\x{97B8}\x{97B9}\x{97BA}\x{97BB}\x{97BC}' - . '\x{97BD}\x{97BF}\x{97C1}\x{97C2}\x{97C3}\x{97C4}\x{97C5}\x{97C6}\x{97C7}' - . '\x{97C8}\x{97C9}\x{97CA}\x{97CB}\x{97CC}\x{97CD}\x{97CE}\x{97CF}\x{97D0}' - . '\x{97D1}\x{97D3}\x{97D4}\x{97D5}\x{97D6}\x{97D7}\x{97D8}\x{97D9}\x{97DA}' - . '\x{97DB}\x{97DC}\x{97DD}\x{97DE}\x{97DF}\x{97E0}\x{97E1}\x{97E2}\x{97E3}' - . '\x{97E4}\x{97E5}\x{97E6}\x{97E7}\x{97E8}\x{97E9}\x{97EA}\x{97EB}\x{97EC}' - . '\x{97ED}\x{97EE}\x{97EF}\x{97F0}\x{97F1}\x{97F2}\x{97F3}\x{97F4}\x{97F5}' - . '\x{97F6}\x{97F7}\x{97F8}\x{97F9}\x{97FA}\x{97FB}\x{97FD}\x{97FE}\x{97FF}' - . '\x{9800}\x{9801}\x{9802}\x{9803}\x{9804}\x{9805}\x{9806}\x{9807}\x{9808}' - . '\x{9809}\x{980A}\x{980B}\x{980C}\x{980D}\x{980E}\x{980F}\x{9810}\x{9811}' - . '\x{9812}\x{9813}\x{9814}\x{9815}\x{9816}\x{9817}\x{9818}\x{9819}\x{981A}' - . '\x{981B}\x{981C}\x{981D}\x{981E}\x{9820}\x{9821}\x{9822}\x{9823}\x{9824}' - . '\x{9826}\x{9827}\x{9828}\x{9829}\x{982B}\x{982D}\x{982E}\x{982F}\x{9830}' - . '\x{9831}\x{9832}\x{9834}\x{9835}\x{9836}\x{9837}\x{9838}\x{9839}\x{983B}' - . '\x{983C}\x{983D}\x{983F}\x{9840}\x{9841}\x{9843}\x{9844}\x{9845}\x{9846}' - . '\x{9848}\x{9849}\x{984A}\x{984C}\x{984D}\x{984E}\x{984F}\x{9850}\x{9851}' - . '\x{9852}\x{9853}\x{9854}\x{9855}\x{9857}\x{9858}\x{9859}\x{985A}\x{985B}' - . '\x{985C}\x{985D}\x{985E}\x{985F}\x{9860}\x{9861}\x{9862}\x{9863}\x{9864}' - . '\x{9865}\x{9867}\x{9869}\x{986A}\x{986B}\x{986C}\x{986D}\x{986E}\x{986F}' - . '\x{9870}\x{9871}\x{9872}\x{9873}\x{9874}\x{9875}\x{9876}\x{9877}\x{9878}' - . '\x{9879}\x{987A}\x{987B}\x{987C}\x{987D}\x{987E}\x{987F}\x{9880}\x{9881}' - . '\x{9882}\x{9883}\x{9884}\x{9885}\x{9886}\x{9887}\x{9888}\x{9889}\x{988A}' - . '\x{988B}\x{988C}\x{988D}\x{988E}\x{988F}\x{9890}\x{9891}\x{9892}\x{9893}' - . '\x{9894}\x{9895}\x{9896}\x{9897}\x{9898}\x{9899}\x{989A}\x{989B}\x{989C}' - . '\x{989D}\x{989E}\x{989F}\x{98A0}\x{98A1}\x{98A2}\x{98A3}\x{98A4}\x{98A5}' - . '\x{98A6}\x{98A7}\x{98A8}\x{98A9}\x{98AA}\x{98AB}\x{98AC}\x{98AD}\x{98AE}' - . '\x{98AF}\x{98B0}\x{98B1}\x{98B2}\x{98B3}\x{98B4}\x{98B5}\x{98B6}\x{98B8}' - . '\x{98B9}\x{98BA}\x{98BB}\x{98BC}\x{98BD}\x{98BE}\x{98BF}\x{98C0}\x{98C1}' - . '\x{98C2}\x{98C3}\x{98C4}\x{98C5}\x{98C6}\x{98C8}\x{98C9}\x{98CB}\x{98CC}' - . '\x{98CD}\x{98CE}\x{98CF}\x{98D0}\x{98D1}\x{98D2}\x{98D3}\x{98D4}\x{98D5}' - . '\x{98D6}\x{98D7}\x{98D8}\x{98D9}\x{98DA}\x{98DB}\x{98DC}\x{98DD}\x{98DE}' - . '\x{98DF}\x{98E0}\x{98E2}\x{98E3}\x{98E5}\x{98E6}\x{98E7}\x{98E8}\x{98E9}' - . '\x{98EA}\x{98EB}\x{98ED}\x{98EF}\x{98F0}\x{98F2}\x{98F3}\x{98F4}\x{98F5}' - . '\x{98F6}\x{98F7}\x{98F9}\x{98FA}\x{98FC}\x{98FD}\x{98FE}\x{98FF}\x{9900}' - . '\x{9901}\x{9902}\x{9903}\x{9904}\x{9905}\x{9906}\x{9907}\x{9908}\x{9909}' - . '\x{990A}\x{990B}\x{990C}\x{990D}\x{990E}\x{990F}\x{9910}\x{9911}\x{9912}' - . '\x{9913}\x{9914}\x{9915}\x{9916}\x{9917}\x{9918}\x{991A}\x{991B}\x{991C}' - . '\x{991D}\x{991E}\x{991F}\x{9920}\x{9921}\x{9922}\x{9923}\x{9924}\x{9925}' - . '\x{9926}\x{9927}\x{9928}\x{9929}\x{992A}\x{992B}\x{992C}\x{992D}\x{992E}' - . '\x{992F}\x{9930}\x{9931}\x{9932}\x{9933}\x{9934}\x{9935}\x{9936}\x{9937}' - . '\x{9938}\x{9939}\x{993A}\x{993C}\x{993D}\x{993E}\x{993F}\x{9940}\x{9941}' - . '\x{9942}\x{9943}\x{9945}\x{9946}\x{9947}\x{9948}\x{9949}\x{994A}\x{994B}' - . '\x{994C}\x{994E}\x{994F}\x{9950}\x{9951}\x{9952}\x{9953}\x{9954}\x{9955}' - . '\x{9956}\x{9957}\x{9958}\x{9959}\x{995B}\x{995C}\x{995E}\x{995F}\x{9960}' - . '\x{9961}\x{9962}\x{9963}\x{9964}\x{9965}\x{9966}\x{9967}\x{9968}\x{9969}' - . '\x{996A}\x{996B}\x{996C}\x{996D}\x{996E}\x{996F}\x{9970}\x{9971}\x{9972}' - . '\x{9973}\x{9974}\x{9975}\x{9976}\x{9977}\x{9978}\x{9979}\x{997A}\x{997B}' - . '\x{997C}\x{997D}\x{997E}\x{997F}\x{9980}\x{9981}\x{9982}\x{9983}\x{9984}' - . '\x{9985}\x{9986}\x{9987}\x{9988}\x{9989}\x{998A}\x{998B}\x{998C}\x{998D}' - . '\x{998E}\x{998F}\x{9990}\x{9991}\x{9992}\x{9993}\x{9994}\x{9995}\x{9996}' - . '\x{9997}\x{9998}\x{9999}\x{999A}\x{999B}\x{999C}\x{999D}\x{999E}\x{999F}' - . '\x{99A0}\x{99A1}\x{99A2}\x{99A3}\x{99A4}\x{99A5}\x{99A6}\x{99A7}\x{99A8}' - . '\x{99A9}\x{99AA}\x{99AB}\x{99AC}\x{99AD}\x{99AE}\x{99AF}\x{99B0}\x{99B1}' - . '\x{99B2}\x{99B3}\x{99B4}\x{99B5}\x{99B6}\x{99B7}\x{99B8}\x{99B9}\x{99BA}' - . '\x{99BB}\x{99BC}\x{99BD}\x{99BE}\x{99C0}\x{99C1}\x{99C2}\x{99C3}\x{99C4}' - . '\x{99C6}\x{99C7}\x{99C8}\x{99C9}\x{99CA}\x{99CB}\x{99CC}\x{99CD}\x{99CE}' - . '\x{99CF}\x{99D0}\x{99D1}\x{99D2}\x{99D3}\x{99D4}\x{99D5}\x{99D6}\x{99D7}' - . '\x{99D8}\x{99D9}\x{99DA}\x{99DB}\x{99DC}\x{99DD}\x{99DE}\x{99DF}\x{99E1}' - . '\x{99E2}\x{99E3}\x{99E4}\x{99E5}\x{99E7}\x{99E8}\x{99E9}\x{99EA}\x{99EC}' - . '\x{99ED}\x{99EE}\x{99EF}\x{99F0}\x{99F1}\x{99F2}\x{99F3}\x{99F4}\x{99F6}' - . '\x{99F7}\x{99F8}\x{99F9}\x{99FA}\x{99FB}\x{99FC}\x{99FD}\x{99FE}\x{99FF}' - . '\x{9A00}\x{9A01}\x{9A02}\x{9A03}\x{9A04}\x{9A05}\x{9A06}\x{9A07}\x{9A08}' - . '\x{9A09}\x{9A0A}\x{9A0B}\x{9A0C}\x{9A0D}\x{9A0E}\x{9A0F}\x{9A11}\x{9A14}' - . '\x{9A15}\x{9A16}\x{9A19}\x{9A1A}\x{9A1B}\x{9A1C}\x{9A1D}\x{9A1E}\x{9A1F}' - . '\x{9A20}\x{9A21}\x{9A22}\x{9A23}\x{9A24}\x{9A25}\x{9A26}\x{9A27}\x{9A29}' - . '\x{9A2A}\x{9A2B}\x{9A2C}\x{9A2D}\x{9A2E}\x{9A2F}\x{9A30}\x{9A31}\x{9A32}' - . '\x{9A33}\x{9A34}\x{9A35}\x{9A36}\x{9A37}\x{9A38}\x{9A39}\x{9A3A}\x{9A3C}' - . '\x{9A3D}\x{9A3E}\x{9A3F}\x{9A40}\x{9A41}\x{9A42}\x{9A43}\x{9A44}\x{9A45}' - . '\x{9A46}\x{9A47}\x{9A48}\x{9A49}\x{9A4A}\x{9A4B}\x{9A4C}\x{9A4D}\x{9A4E}' - . '\x{9A4F}\x{9A50}\x{9A52}\x{9A53}\x{9A54}\x{9A55}\x{9A56}\x{9A57}\x{9A59}' - . '\x{9A5A}\x{9A5B}\x{9A5C}\x{9A5E}\x{9A5F}\x{9A60}\x{9A61}\x{9A62}\x{9A64}' - . '\x{9A65}\x{9A66}\x{9A67}\x{9A68}\x{9A69}\x{9A6A}\x{9A6B}\x{9A6C}\x{9A6D}' - . '\x{9A6E}\x{9A6F}\x{9A70}\x{9A71}\x{9A72}\x{9A73}\x{9A74}\x{9A75}\x{9A76}' - . '\x{9A77}\x{9A78}\x{9A79}\x{9A7A}\x{9A7B}\x{9A7C}\x{9A7D}\x{9A7E}\x{9A7F}' - . '\x{9A80}\x{9A81}\x{9A82}\x{9A83}\x{9A84}\x{9A85}\x{9A86}\x{9A87}\x{9A88}' - . '\x{9A89}\x{9A8A}\x{9A8B}\x{9A8C}\x{9A8D}\x{9A8E}\x{9A8F}\x{9A90}\x{9A91}' - . '\x{9A92}\x{9A93}\x{9A94}\x{9A95}\x{9A96}\x{9A97}\x{9A98}\x{9A99}\x{9A9A}' - . '\x{9A9B}\x{9A9C}\x{9A9D}\x{9A9E}\x{9A9F}\x{9AA0}\x{9AA1}\x{9AA2}\x{9AA3}' - . '\x{9AA4}\x{9AA5}\x{9AA6}\x{9AA7}\x{9AA8}\x{9AAA}\x{9AAB}\x{9AAC}\x{9AAD}' - . '\x{9AAE}\x{9AAF}\x{9AB0}\x{9AB1}\x{9AB2}\x{9AB3}\x{9AB4}\x{9AB5}\x{9AB6}' - . '\x{9AB7}\x{9AB8}\x{9AB9}\x{9ABA}\x{9ABB}\x{9ABC}\x{9ABE}\x{9ABF}\x{9AC0}' - . '\x{9AC1}\x{9AC2}\x{9AC3}\x{9AC4}\x{9AC5}\x{9AC6}\x{9AC7}\x{9AC9}\x{9ACA}' - . '\x{9ACB}\x{9ACC}\x{9ACD}\x{9ACE}\x{9ACF}\x{9AD0}\x{9AD1}\x{9AD2}\x{9AD3}' - . '\x{9AD4}\x{9AD5}\x{9AD6}\x{9AD8}\x{9AD9}\x{9ADA}\x{9ADB}\x{9ADC}\x{9ADD}' - . '\x{9ADE}\x{9ADF}\x{9AE1}\x{9AE2}\x{9AE3}\x{9AE5}\x{9AE6}\x{9AE7}\x{9AEA}' - . '\x{9AEB}\x{9AEC}\x{9AED}\x{9AEE}\x{9AEF}\x{9AF1}\x{9AF2}\x{9AF3}\x{9AF4}' - . '\x{9AF5}\x{9AF6}\x{9AF7}\x{9AF8}\x{9AF9}\x{9AFA}\x{9AFB}\x{9AFC}\x{9AFD}' - . '\x{9AFE}\x{9AFF}\x{9B01}\x{9B03}\x{9B04}\x{9B05}\x{9B06}\x{9B07}\x{9B08}' - . '\x{9B0A}\x{9B0B}\x{9B0C}\x{9B0D}\x{9B0E}\x{9B0F}\x{9B10}\x{9B11}\x{9B12}' - . '\x{9B13}\x{9B15}\x{9B16}\x{9B17}\x{9B18}\x{9B19}\x{9B1A}\x{9B1C}\x{9B1D}' - . '\x{9B1E}\x{9B1F}\x{9B20}\x{9B21}\x{9B22}\x{9B23}\x{9B24}\x{9B25}\x{9B26}' - . '\x{9B27}\x{9B28}\x{9B29}\x{9B2A}\x{9B2B}\x{9B2C}\x{9B2D}\x{9B2E}\x{9B2F}' - . '\x{9B30}\x{9B31}\x{9B32}\x{9B33}\x{9B35}\x{9B36}\x{9B37}\x{9B38}\x{9B39}' - . '\x{9B3A}\x{9B3B}\x{9B3C}\x{9B3E}\x{9B3F}\x{9B41}\x{9B42}\x{9B43}\x{9B44}' - . '\x{9B45}\x{9B46}\x{9B47}\x{9B48}\x{9B49}\x{9B4A}\x{9B4B}\x{9B4C}\x{9B4D}' - . '\x{9B4E}\x{9B4F}\x{9B51}\x{9B52}\x{9B53}\x{9B54}\x{9B55}\x{9B56}\x{9B58}' - . '\x{9B59}\x{9B5A}\x{9B5B}\x{9B5C}\x{9B5D}\x{9B5E}\x{9B5F}\x{9B60}\x{9B61}' - . '\x{9B63}\x{9B64}\x{9B65}\x{9B66}\x{9B67}\x{9B68}\x{9B69}\x{9B6A}\x{9B6B}' - . '\x{9B6C}\x{9B6D}\x{9B6E}\x{9B6F}\x{9B70}\x{9B71}\x{9B73}\x{9B74}\x{9B75}' - . '\x{9B76}\x{9B77}\x{9B78}\x{9B79}\x{9B7A}\x{9B7B}\x{9B7C}\x{9B7D}\x{9B7E}' - . '\x{9B7F}\x{9B80}\x{9B81}\x{9B82}\x{9B83}\x{9B84}\x{9B85}\x{9B86}\x{9B87}' - . '\x{9B88}\x{9B8A}\x{9B8B}\x{9B8D}\x{9B8E}\x{9B8F}\x{9B90}\x{9B91}\x{9B92}' - . '\x{9B93}\x{9B94}\x{9B95}\x{9B96}\x{9B97}\x{9B98}\x{9B9A}\x{9B9B}\x{9B9C}' - . '\x{9B9D}\x{9B9E}\x{9B9F}\x{9BA0}\x{9BA1}\x{9BA2}\x{9BA3}\x{9BA4}\x{9BA5}' - . '\x{9BA6}\x{9BA7}\x{9BA8}\x{9BA9}\x{9BAA}\x{9BAB}\x{9BAC}\x{9BAD}\x{9BAE}' - . '\x{9BAF}\x{9BB0}\x{9BB1}\x{9BB2}\x{9BB3}\x{9BB4}\x{9BB5}\x{9BB6}\x{9BB7}' - . '\x{9BB8}\x{9BB9}\x{9BBA}\x{9BBB}\x{9BBC}\x{9BBD}\x{9BBE}\x{9BBF}\x{9BC0}' - . '\x{9BC1}\x{9BC3}\x{9BC4}\x{9BC5}\x{9BC6}\x{9BC7}\x{9BC8}\x{9BC9}\x{9BCA}' - . '\x{9BCB}\x{9BCC}\x{9BCD}\x{9BCE}\x{9BCF}\x{9BD0}\x{9BD1}\x{9BD2}\x{9BD3}' - . '\x{9BD4}\x{9BD5}\x{9BD6}\x{9BD7}\x{9BD8}\x{9BD9}\x{9BDA}\x{9BDB}\x{9BDC}' - . '\x{9BDD}\x{9BDE}\x{9BDF}\x{9BE0}\x{9BE1}\x{9BE2}\x{9BE3}\x{9BE4}\x{9BE5}' - . '\x{9BE6}\x{9BE7}\x{9BE8}\x{9BE9}\x{9BEA}\x{9BEB}\x{9BEC}\x{9BED}\x{9BEE}' - . '\x{9BEF}\x{9BF0}\x{9BF1}\x{9BF2}\x{9BF3}\x{9BF4}\x{9BF5}\x{9BF7}\x{9BF8}' - . '\x{9BF9}\x{9BFA}\x{9BFB}\x{9BFC}\x{9BFD}\x{9BFE}\x{9BFF}\x{9C02}\x{9C05}' - . '\x{9C06}\x{9C07}\x{9C08}\x{9C09}\x{9C0A}\x{9C0B}\x{9C0C}\x{9C0D}\x{9C0E}' - . '\x{9C0F}\x{9C10}\x{9C11}\x{9C12}\x{9C13}\x{9C14}\x{9C15}\x{9C16}\x{9C17}' - . '\x{9C18}\x{9C19}\x{9C1A}\x{9C1B}\x{9C1C}\x{9C1D}\x{9C1E}\x{9C1F}\x{9C20}' - . '\x{9C21}\x{9C22}\x{9C23}\x{9C24}\x{9C25}\x{9C26}\x{9C27}\x{9C28}\x{9C29}' - . '\x{9C2A}\x{9C2B}\x{9C2C}\x{9C2D}\x{9C2F}\x{9C30}\x{9C31}\x{9C32}\x{9C33}' - . '\x{9C34}\x{9C35}\x{9C36}\x{9C37}\x{9C38}\x{9C39}\x{9C3A}\x{9C3B}\x{9C3C}' - . '\x{9C3D}\x{9C3E}\x{9C3F}\x{9C40}\x{9C41}\x{9C43}\x{9C44}\x{9C45}\x{9C46}' - . '\x{9C47}\x{9C48}\x{9C49}\x{9C4A}\x{9C4B}\x{9C4C}\x{9C4D}\x{9C4E}\x{9C50}' - . '\x{9C52}\x{9C53}\x{9C54}\x{9C55}\x{9C56}\x{9C57}\x{9C58}\x{9C59}\x{9C5A}' - . '\x{9C5B}\x{9C5C}\x{9C5D}\x{9C5E}\x{9C5F}\x{9C60}\x{9C62}\x{9C63}\x{9C65}' - . '\x{9C66}\x{9C67}\x{9C68}\x{9C69}\x{9C6A}\x{9C6B}\x{9C6C}\x{9C6D}\x{9C6E}' - . '\x{9C6F}\x{9C70}\x{9C71}\x{9C72}\x{9C73}\x{9C74}\x{9C75}\x{9C77}\x{9C78}' - . '\x{9C79}\x{9C7A}\x{9C7C}\x{9C7D}\x{9C7E}\x{9C7F}\x{9C80}\x{9C81}\x{9C82}' - . '\x{9C83}\x{9C84}\x{9C85}\x{9C86}\x{9C87}\x{9C88}\x{9C89}\x{9C8A}\x{9C8B}' - . '\x{9C8C}\x{9C8D}\x{9C8E}\x{9C8F}\x{9C90}\x{9C91}\x{9C92}\x{9C93}\x{9C94}' - . '\x{9C95}\x{9C96}\x{9C97}\x{9C98}\x{9C99}\x{9C9A}\x{9C9B}\x{9C9C}\x{9C9D}' - . '\x{9C9E}\x{9C9F}\x{9CA0}\x{9CA1}\x{9CA2}\x{9CA3}\x{9CA4}\x{9CA5}\x{9CA6}' - . '\x{9CA7}\x{9CA8}\x{9CA9}\x{9CAA}\x{9CAB}\x{9CAC}\x{9CAD}\x{9CAE}\x{9CAF}' - . '\x{9CB0}\x{9CB1}\x{9CB2}\x{9CB3}\x{9CB4}\x{9CB5}\x{9CB6}\x{9CB7}\x{9CB8}' - . '\x{9CB9}\x{9CBA}\x{9CBB}\x{9CBC}\x{9CBD}\x{9CBE}\x{9CBF}\x{9CC0}\x{9CC1}' - . '\x{9CC2}\x{9CC3}\x{9CC4}\x{9CC5}\x{9CC6}\x{9CC7}\x{9CC8}\x{9CC9}\x{9CCA}' - . '\x{9CCB}\x{9CCC}\x{9CCD}\x{9CCE}\x{9CCF}\x{9CD0}\x{9CD1}\x{9CD2}\x{9CD3}' - . '\x{9CD4}\x{9CD5}\x{9CD6}\x{9CD7}\x{9CD8}\x{9CD9}\x{9CDA}\x{9CDB}\x{9CDC}' - . '\x{9CDD}\x{9CDE}\x{9CDF}\x{9CE0}\x{9CE1}\x{9CE2}\x{9CE3}\x{9CE4}\x{9CE5}' - . '\x{9CE6}\x{9CE7}\x{9CE8}\x{9CE9}\x{9CEA}\x{9CEB}\x{9CEC}\x{9CED}\x{9CEE}' - . '\x{9CEF}\x{9CF0}\x{9CF1}\x{9CF2}\x{9CF3}\x{9CF4}\x{9CF5}\x{9CF6}\x{9CF7}' - . '\x{9CF8}\x{9CF9}\x{9CFA}\x{9CFB}\x{9CFC}\x{9CFD}\x{9CFE}\x{9CFF}\x{9D00}' - . '\x{9D01}\x{9D02}\x{9D03}\x{9D04}\x{9D05}\x{9D06}\x{9D07}\x{9D08}\x{9D09}' - . '\x{9D0A}\x{9D0B}\x{9D0F}\x{9D10}\x{9D12}\x{9D13}\x{9D14}\x{9D15}\x{9D16}' - . '\x{9D17}\x{9D18}\x{9D19}\x{9D1A}\x{9D1B}\x{9D1C}\x{9D1D}\x{9D1E}\x{9D1F}' - . '\x{9D20}\x{9D21}\x{9D22}\x{9D23}\x{9D24}\x{9D25}\x{9D26}\x{9D28}\x{9D29}' - . '\x{9D2B}\x{9D2D}\x{9D2E}\x{9D2F}\x{9D30}\x{9D31}\x{9D32}\x{9D33}\x{9D34}' - . '\x{9D36}\x{9D37}\x{9D38}\x{9D39}\x{9D3A}\x{9D3B}\x{9D3D}\x{9D3E}\x{9D3F}' - . '\x{9D40}\x{9D41}\x{9D42}\x{9D43}\x{9D45}\x{9D46}\x{9D47}\x{9D48}\x{9D49}' - . '\x{9D4A}\x{9D4B}\x{9D4C}\x{9D4D}\x{9D4E}\x{9D4F}\x{9D50}\x{9D51}\x{9D52}' - . '\x{9D53}\x{9D54}\x{9D55}\x{9D56}\x{9D57}\x{9D58}\x{9D59}\x{9D5A}\x{9D5B}' - . '\x{9D5C}\x{9D5D}\x{9D5E}\x{9D5F}\x{9D60}\x{9D61}\x{9D62}\x{9D63}\x{9D64}' - . '\x{9D65}\x{9D66}\x{9D67}\x{9D68}\x{9D69}\x{9D6A}\x{9D6B}\x{9D6C}\x{9D6E}' - . '\x{9D6F}\x{9D70}\x{9D71}\x{9D72}\x{9D73}\x{9D74}\x{9D75}\x{9D76}\x{9D77}' - . '\x{9D78}\x{9D79}\x{9D7A}\x{9D7B}\x{9D7C}\x{9D7D}\x{9D7E}\x{9D7F}\x{9D80}' - . '\x{9D81}\x{9D82}\x{9D83}\x{9D84}\x{9D85}\x{9D86}\x{9D87}\x{9D88}\x{9D89}' - . '\x{9D8A}\x{9D8B}\x{9D8C}\x{9D8D}\x{9D8E}\x{9D90}\x{9D91}\x{9D92}\x{9D93}' - . '\x{9D94}\x{9D96}\x{9D97}\x{9D98}\x{9D99}\x{9D9A}\x{9D9B}\x{9D9C}\x{9D9D}' - . '\x{9D9E}\x{9D9F}\x{9DA0}\x{9DA1}\x{9DA2}\x{9DA3}\x{9DA4}\x{9DA5}\x{9DA6}' - . '\x{9DA7}\x{9DA8}\x{9DA9}\x{9DAA}\x{9DAB}\x{9DAC}\x{9DAD}\x{9DAF}\x{9DB0}' - . '\x{9DB1}\x{9DB2}\x{9DB3}\x{9DB4}\x{9DB5}\x{9DB6}\x{9DB7}\x{9DB8}\x{9DB9}' - . '\x{9DBA}\x{9DBB}\x{9DBC}\x{9DBE}\x{9DBF}\x{9DC1}\x{9DC2}\x{9DC3}\x{9DC4}' - . '\x{9DC5}\x{9DC7}\x{9DC8}\x{9DC9}\x{9DCA}\x{9DCB}\x{9DCC}\x{9DCD}\x{9DCE}' - . '\x{9DCF}\x{9DD0}\x{9DD1}\x{9DD2}\x{9DD3}\x{9DD4}\x{9DD5}\x{9DD6}\x{9DD7}' - . '\x{9DD8}\x{9DD9}\x{9DDA}\x{9DDB}\x{9DDC}\x{9DDD}\x{9DDE}\x{9DDF}\x{9DE0}' - . '\x{9DE1}\x{9DE2}\x{9DE3}\x{9DE4}\x{9DE5}\x{9DE6}\x{9DE7}\x{9DE8}\x{9DE9}' - . '\x{9DEB}\x{9DEC}\x{9DED}\x{9DEE}\x{9DEF}\x{9DF0}\x{9DF1}\x{9DF2}\x{9DF3}' - . '\x{9DF4}\x{9DF5}\x{9DF6}\x{9DF7}\x{9DF8}\x{9DF9}\x{9DFA}\x{9DFB}\x{9DFD}' - . '\x{9DFE}\x{9DFF}\x{9E00}\x{9E01}\x{9E02}\x{9E03}\x{9E04}\x{9E05}\x{9E06}' - . '\x{9E07}\x{9E08}\x{9E09}\x{9E0A}\x{9E0B}\x{9E0C}\x{9E0D}\x{9E0F}\x{9E10}' - . '\x{9E11}\x{9E12}\x{9E13}\x{9E14}\x{9E15}\x{9E17}\x{9E18}\x{9E19}\x{9E1A}' - . '\x{9E1B}\x{9E1D}\x{9E1E}\x{9E1F}\x{9E20}\x{9E21}\x{9E22}\x{9E23}\x{9E24}' - . '\x{9E25}\x{9E26}\x{9E27}\x{9E28}\x{9E29}\x{9E2A}\x{9E2B}\x{9E2C}\x{9E2D}' - . '\x{9E2E}\x{9E2F}\x{9E30}\x{9E31}\x{9E32}\x{9E33}\x{9E34}\x{9E35}\x{9E36}' - . '\x{9E37}\x{9E38}\x{9E39}\x{9E3A}\x{9E3B}\x{9E3C}\x{9E3D}\x{9E3E}\x{9E3F}' - . '\x{9E40}\x{9E41}\x{9E42}\x{9E43}\x{9E44}\x{9E45}\x{9E46}\x{9E47}\x{9E48}' - . '\x{9E49}\x{9E4A}\x{9E4B}\x{9E4C}\x{9E4D}\x{9E4E}\x{9E4F}\x{9E50}\x{9E51}' - . '\x{9E52}\x{9E53}\x{9E54}\x{9E55}\x{9E56}\x{9E57}\x{9E58}\x{9E59}\x{9E5A}' - . '\x{9E5B}\x{9E5C}\x{9E5D}\x{9E5E}\x{9E5F}\x{9E60}\x{9E61}\x{9E62}\x{9E63}' - . '\x{9E64}\x{9E65}\x{9E66}\x{9E67}\x{9E68}\x{9E69}\x{9E6A}\x{9E6B}\x{9E6C}' - . '\x{9E6D}\x{9E6E}\x{9E6F}\x{9E70}\x{9E71}\x{9E72}\x{9E73}\x{9E74}\x{9E75}' - . '\x{9E76}\x{9E77}\x{9E79}\x{9E7A}\x{9E7C}\x{9E7D}\x{9E7E}\x{9E7F}\x{9E80}' - . '\x{9E81}\x{9E82}\x{9E83}\x{9E84}\x{9E85}\x{9E86}\x{9E87}\x{9E88}\x{9E89}' - . '\x{9E8A}\x{9E8B}\x{9E8C}\x{9E8D}\x{9E8E}\x{9E91}\x{9E92}\x{9E93}\x{9E94}' - . '\x{9E96}\x{9E97}\x{9E99}\x{9E9A}\x{9E9B}\x{9E9C}\x{9E9D}\x{9E9F}\x{9EA0}' - . '\x{9EA1}\x{9EA3}\x{9EA4}\x{9EA5}\x{9EA6}\x{9EA7}\x{9EA8}\x{9EA9}\x{9EAA}' - . '\x{9EAD}\x{9EAE}\x{9EAF}\x{9EB0}\x{9EB2}\x{9EB3}\x{9EB4}\x{9EB5}\x{9EB6}' - . '\x{9EB7}\x{9EB8}\x{9EBB}\x{9EBC}\x{9EBD}\x{9EBE}\x{9EBF}\x{9EC0}\x{9EC1}' - . '\x{9EC2}\x{9EC3}\x{9EC4}\x{9EC5}\x{9EC6}\x{9EC7}\x{9EC8}\x{9EC9}\x{9ECA}' - . '\x{9ECB}\x{9ECC}\x{9ECD}\x{9ECE}\x{9ECF}\x{9ED0}\x{9ED1}\x{9ED2}\x{9ED3}' - . '\x{9ED4}\x{9ED5}\x{9ED6}\x{9ED7}\x{9ED8}\x{9ED9}\x{9EDA}\x{9EDB}\x{9EDC}' - . '\x{9EDD}\x{9EDE}\x{9EDF}\x{9EE0}\x{9EE1}\x{9EE2}\x{9EE3}\x{9EE4}\x{9EE5}' - . '\x{9EE6}\x{9EE7}\x{9EE8}\x{9EE9}\x{9EEA}\x{9EEB}\x{9EED}\x{9EEE}\x{9EEF}' - . '\x{9EF0}\x{9EF2}\x{9EF3}\x{9EF4}\x{9EF5}\x{9EF6}\x{9EF7}\x{9EF8}\x{9EF9}' - . '\x{9EFA}\x{9EFB}\x{9EFC}\x{9EFD}\x{9EFE}\x{9EFF}\x{9F00}\x{9F01}\x{9F02}' - . '\x{9F04}\x{9F05}\x{9F06}\x{9F07}\x{9F08}\x{9F09}\x{9F0A}\x{9F0B}\x{9F0C}' - . '\x{9F0D}\x{9F0E}\x{9F0F}\x{9F10}\x{9F12}\x{9F13}\x{9F15}\x{9F16}\x{9F17}' - . '\x{9F18}\x{9F19}\x{9F1A}\x{9F1B}\x{9F1C}\x{9F1D}\x{9F1E}\x{9F1F}\x{9F20}' - . '\x{9F22}\x{9F23}\x{9F24}\x{9F25}\x{9F27}\x{9F28}\x{9F29}\x{9F2A}\x{9F2B}' - . '\x{9F2C}\x{9F2D}\x{9F2E}\x{9F2F}\x{9F30}\x{9F31}\x{9F32}\x{9F33}\x{9F34}' - . '\x{9F35}\x{9F36}\x{9F37}\x{9F38}\x{9F39}\x{9F3A}\x{9F3B}\x{9F3C}\x{9F3D}' - . '\x{9F3E}\x{9F3F}\x{9F40}\x{9F41}\x{9F42}\x{9F43}\x{9F44}\x{9F46}\x{9F47}' - . '\x{9F48}\x{9F49}\x{9F4A}\x{9F4B}\x{9F4C}\x{9F4D}\x{9F4E}\x{9F4F}\x{9F50}' - . '\x{9F51}\x{9F52}\x{9F54}\x{9F55}\x{9F56}\x{9F57}\x{9F58}\x{9F59}\x{9F5A}' - . '\x{9F5B}\x{9F5C}\x{9F5D}\x{9F5E}\x{9F5F}\x{9F60}\x{9F61}\x{9F63}\x{9F64}' - . '\x{9F65}\x{9F66}\x{9F67}\x{9F68}\x{9F69}\x{9F6A}\x{9F6B}\x{9F6C}\x{9F6E}' - . '\x{9F6F}\x{9F70}\x{9F71}\x{9F72}\x{9F73}\x{9F74}\x{9F75}\x{9F76}\x{9F77}' - . '\x{9F78}\x{9F79}\x{9F7A}\x{9F7B}\x{9F7C}\x{9F7D}\x{9F7E}\x{9F7F}\x{9F80}' - . '\x{9F81}\x{9F82}\x{9F83}\x{9F84}\x{9F85}\x{9F86}\x{9F87}\x{9F88}\x{9F89}' - . '\x{9F8A}\x{9F8B}\x{9F8C}\x{9F8D}\x{9F8E}\x{9F8F}\x{9F90}\x{9F91}\x{9F92}' - . '\x{9F93}\x{9F94}\x{9F95}\x{9F96}\x{9F97}\x{9F98}\x{9F99}\x{9F9A}\x{9F9B}' - . '\x{9F9C}\x{9F9D}\x{9F9E}\x{9F9F}\x{9FA0}\x{9FA2}\x{9FA4}\x{9FA5}]{1,20}$/iu', -]; diff --git a/lib/laminas/laminas-validator/src/Hostname/Cn.php b/lib/laminas/laminas-validator/src/Hostname/Cn.php deleted file mode 100644 index d280764b0..000000000 --- a/lib/laminas/laminas-validator/src/Hostname/Cn.php +++ /dev/null @@ -1,2179 +0,0 @@ - '/^[\x{002d}0-9a-z\x{3447}\x{3473}\x{359E}\x{360E}\x{361A}\x{3918}\x{396E}\x{39CF}\x{39D0}' - . '\x{39DF}\x{3A73}\x{3B4E}\x{3C6E}\x{3CE0}\x{4056}\x{415F}\x{4337}\x{43AC}' - . '\x{43B1}\x{43DD}\x{44D6}\x{464C}\x{4661}\x{4723}\x{4729}\x{477C}\x{478D}' - . '\x{4947}\x{497A}\x{497D}\x{4982}\x{4983}\x{4985}\x{4986}\x{499B}\x{499F}' - . '\x{49B6}\x{49B7}\x{4C77}\x{4C9F}\x{4CA0}\x{4CA1}\x{4CA2}\x{4CA3}\x{4D13}' - . '\x{4D14}\x{4D15}\x{4D16}\x{4D17}\x{4D18}\x{4D19}\x{4DAE}\x{4E00}\x{4E01}' - . '\x{4E02}\x{4E03}\x{4E04}\x{4E05}\x{4E06}\x{4E07}\x{4E08}\x{4E09}\x{4E0A}' - . '\x{4E0B}\x{4E0C}\x{4E0D}\x{4E0E}\x{4E0F}\x{4E10}\x{4E11}\x{4E13}\x{4E14}' - . '\x{4E15}\x{4E16}\x{4E17}\x{4E18}\x{4E19}\x{4E1A}\x{4E1B}\x{4E1C}\x{4E1D}' - . '\x{4E1E}\x{4E1F}\x{4E20}\x{4E21}\x{4E22}\x{4E23}\x{4E24}\x{4E25}\x{4E26}' - . '\x{4E27}\x{4E28}\x{4E2A}\x{4E2B}\x{4E2C}\x{4E2D}\x{4E2E}\x{4E2F}\x{4E30}' - . '\x{4E31}\x{4E32}\x{4E33}\x{4E34}\x{4E35}\x{4E36}\x{4E37}\x{4E38}\x{4E39}' - . '\x{4E3A}\x{4E3B}\x{4E3C}\x{4E3D}\x{4E3E}\x{4E3F}\x{4E40}\x{4E41}\x{4E42}' - . '\x{4E43}\x{4E44}\x{4E45}\x{4E46}\x{4E47}\x{4E48}\x{4E49}\x{4E4A}\x{4E4B}' - . '\x{4E4C}\x{4E4D}\x{4E4E}\x{4E4F}\x{4E50}\x{4E51}\x{4E52}\x{4E53}\x{4E54}' - . '\x{4E56}\x{4E57}\x{4E58}\x{4E59}\x{4E5A}\x{4E5B}\x{4E5C}\x{4E5D}\x{4E5E}' - . '\x{4E5F}\x{4E60}\x{4E61}\x{4E62}\x{4E63}\x{4E64}\x{4E65}\x{4E66}\x{4E67}' - . '\x{4E69}\x{4E6A}\x{4E6B}\x{4E6C}\x{4E6D}\x{4E6E}\x{4E6F}\x{4E70}\x{4E71}' - . '\x{4E72}\x{4E73}\x{4E74}\x{4E75}\x{4E76}\x{4E77}\x{4E78}\x{4E7A}\x{4E7B}' - . '\x{4E7C}\x{4E7D}\x{4E7E}\x{4E7F}\x{4E80}\x{4E81}\x{4E82}\x{4E83}\x{4E84}' - . '\x{4E85}\x{4E86}\x{4E87}\x{4E88}\x{4E89}\x{4E8B}\x{4E8C}\x{4E8D}\x{4E8E}' - . '\x{4E8F}\x{4E90}\x{4E91}\x{4E92}\x{4E93}\x{4E94}\x{4E95}\x{4E97}\x{4E98}' - . '\x{4E99}\x{4E9A}\x{4E9B}\x{4E9C}\x{4E9D}\x{4E9E}\x{4E9F}\x{4EA0}\x{4EA1}' - . '\x{4EA2}\x{4EA4}\x{4EA5}\x{4EA6}\x{4EA7}\x{4EA8}\x{4EA9}\x{4EAA}\x{4EAB}' - . '\x{4EAC}\x{4EAD}\x{4EAE}\x{4EAF}\x{4EB0}\x{4EB1}\x{4EB2}\x{4EB3}\x{4EB4}' - . '\x{4EB5}\x{4EB6}\x{4EB7}\x{4EB8}\x{4EB9}\x{4EBA}\x{4EBB}\x{4EBD}\x{4EBE}' - . '\x{4EBF}\x{4EC0}\x{4EC1}\x{4EC2}\x{4EC3}\x{4EC4}\x{4EC5}\x{4EC6}\x{4EC7}' - . '\x{4EC8}\x{4EC9}\x{4ECA}\x{4ECB}\x{4ECD}\x{4ECE}\x{4ECF}\x{4ED0}\x{4ED1}' - . '\x{4ED2}\x{4ED3}\x{4ED4}\x{4ED5}\x{4ED6}\x{4ED7}\x{4ED8}\x{4ED9}\x{4EDA}' - . '\x{4EDB}\x{4EDC}\x{4EDD}\x{4EDE}\x{4EDF}\x{4EE0}\x{4EE1}\x{4EE2}\x{4EE3}' - . '\x{4EE4}\x{4EE5}\x{4EE6}\x{4EE8}\x{4EE9}\x{4EEA}\x{4EEB}\x{4EEC}\x{4EEF}' - . '\x{4EF0}\x{4EF1}\x{4EF2}\x{4EF3}\x{4EF4}\x{4EF5}\x{4EF6}\x{4EF7}\x{4EFB}' - . '\x{4EFD}\x{4EFF}\x{4F00}\x{4F01}\x{4F02}\x{4F03}\x{4F04}\x{4F05}\x{4F06}' - . '\x{4F08}\x{4F09}\x{4F0A}\x{4F0B}\x{4F0C}\x{4F0D}\x{4F0E}\x{4F0F}\x{4F10}' - . '\x{4F11}\x{4F12}\x{4F13}\x{4F14}\x{4F15}\x{4F17}\x{4F18}\x{4F19}\x{4F1A}' - . '\x{4F1B}\x{4F1C}\x{4F1D}\x{4F1E}\x{4F1F}\x{4F20}\x{4F21}\x{4F22}\x{4F23}' - . '\x{4F24}\x{4F25}\x{4F26}\x{4F27}\x{4F29}\x{4F2A}\x{4F2B}\x{4F2C}\x{4F2D}' - . '\x{4F2E}\x{4F2F}\x{4F30}\x{4F32}\x{4F33}\x{4F34}\x{4F36}\x{4F38}\x{4F39}' - . '\x{4F3A}\x{4F3B}\x{4F3C}\x{4F3D}\x{4F3E}\x{4F3F}\x{4F41}\x{4F42}\x{4F43}' - . '\x{4F45}\x{4F46}\x{4F47}\x{4F48}\x{4F49}\x{4F4A}\x{4F4B}\x{4F4C}\x{4F4D}' - . '\x{4F4E}\x{4F4F}\x{4F50}\x{4F51}\x{4F52}\x{4F53}\x{4F54}\x{4F55}\x{4F56}' - . '\x{4F57}\x{4F58}\x{4F59}\x{4F5A}\x{4F5B}\x{4F5C}\x{4F5D}\x{4F5E}\x{4F5F}' - . '\x{4F60}\x{4F61}\x{4F62}\x{4F63}\x{4F64}\x{4F65}\x{4F66}\x{4F67}\x{4F68}' - . '\x{4F69}\x{4F6A}\x{4F6B}\x{4F6C}\x{4F6D}\x{4F6E}\x{4F6F}\x{4F70}\x{4F72}' - . '\x{4F73}\x{4F74}\x{4F75}\x{4F76}\x{4F77}\x{4F78}\x{4F79}\x{4F7A}\x{4F7B}' - . '\x{4F7C}\x{4F7D}\x{4F7E}\x{4F7F}\x{4F80}\x{4F81}\x{4F82}\x{4F83}\x{4F84}' - . '\x{4F85}\x{4F86}\x{4F87}\x{4F88}\x{4F89}\x{4F8A}\x{4F8B}\x{4F8D}\x{4F8F}' - . '\x{4F90}\x{4F91}\x{4F92}\x{4F93}\x{4F94}\x{4F95}\x{4F96}\x{4F97}\x{4F98}' - . '\x{4F99}\x{4F9A}\x{4F9B}\x{4F9C}\x{4F9D}\x{4F9E}\x{4F9F}\x{4FA0}\x{4FA1}' - . '\x{4FA3}\x{4FA4}\x{4FA5}\x{4FA6}\x{4FA7}\x{4FA8}\x{4FA9}\x{4FAA}\x{4FAB}' - . '\x{4FAC}\x{4FAE}\x{4FAF}\x{4FB0}\x{4FB1}\x{4FB2}\x{4FB3}\x{4FB4}\x{4FB5}' - . '\x{4FB6}\x{4FB7}\x{4FB8}\x{4FB9}\x{4FBA}\x{4FBB}\x{4FBC}\x{4FBE}\x{4FBF}' - . '\x{4FC0}\x{4FC1}\x{4FC2}\x{4FC3}\x{4FC4}\x{4FC5}\x{4FC7}\x{4FC9}\x{4FCA}' - . '\x{4FCB}\x{4FCD}\x{4FCE}\x{4FCF}\x{4FD0}\x{4FD1}\x{4FD2}\x{4FD3}\x{4FD4}' - . '\x{4FD5}\x{4FD6}\x{4FD7}\x{4FD8}\x{4FD9}\x{4FDA}\x{4FDB}\x{4FDC}\x{4FDD}' - . '\x{4FDE}\x{4FDF}\x{4FE0}\x{4FE1}\x{4FE3}\x{4FE4}\x{4FE5}\x{4FE6}\x{4FE7}' - . '\x{4FE8}\x{4FE9}\x{4FEA}\x{4FEB}\x{4FEC}\x{4FED}\x{4FEE}\x{4FEF}\x{4FF0}' - . '\x{4FF1}\x{4FF2}\x{4FF3}\x{4FF4}\x{4FF5}\x{4FF6}\x{4FF7}\x{4FF8}\x{4FF9}' - . '\x{4FFA}\x{4FFB}\x{4FFE}\x{4FFF}\x{5000}\x{5001}\x{5002}\x{5003}\x{5004}' - . '\x{5005}\x{5006}\x{5007}\x{5008}\x{5009}\x{500A}\x{500B}\x{500C}\x{500D}' - . '\x{500E}\x{500F}\x{5011}\x{5012}\x{5013}\x{5014}\x{5015}\x{5016}\x{5017}' - . '\x{5018}\x{5019}\x{501A}\x{501B}\x{501C}\x{501D}\x{501E}\x{501F}\x{5020}' - . '\x{5021}\x{5022}\x{5023}\x{5024}\x{5025}\x{5026}\x{5027}\x{5028}\x{5029}' - . '\x{502A}\x{502B}\x{502C}\x{502D}\x{502E}\x{502F}\x{5030}\x{5031}\x{5032}' - . '\x{5033}\x{5035}\x{5036}\x{5037}\x{5039}\x{503A}\x{503B}\x{503C}\x{503E}' - . '\x{503F}\x{5040}\x{5041}\x{5043}\x{5044}\x{5045}\x{5046}\x{5047}\x{5048}' - . '\x{5049}\x{504A}\x{504B}\x{504C}\x{504D}\x{504E}\x{504F}\x{5051}\x{5053}' - . '\x{5054}\x{5055}\x{5056}\x{5057}\x{5059}\x{505A}\x{505B}\x{505C}\x{505D}' - . '\x{505E}\x{505F}\x{5060}\x{5061}\x{5062}\x{5063}\x{5064}\x{5065}\x{5066}' - . '\x{5067}\x{5068}\x{5069}\x{506A}\x{506B}\x{506C}\x{506D}\x{506E}\x{506F}' - . '\x{5070}\x{5071}\x{5072}\x{5073}\x{5074}\x{5075}\x{5076}\x{5077}\x{5078}' - . '\x{5079}\x{507A}\x{507B}\x{507D}\x{507E}\x{507F}\x{5080}\x{5082}\x{5083}' - . '\x{5084}\x{5085}\x{5086}\x{5087}\x{5088}\x{5089}\x{508A}\x{508B}\x{508C}' - . '\x{508D}\x{508E}\x{508F}\x{5090}\x{5091}\x{5092}\x{5094}\x{5095}\x{5096}' - . '\x{5098}\x{5099}\x{509A}\x{509B}\x{509C}\x{509D}\x{509E}\x{50A2}\x{50A3}' - . '\x{50A4}\x{50A5}\x{50A6}\x{50A7}\x{50A8}\x{50A9}\x{50AA}\x{50AB}\x{50AC}' - . '\x{50AD}\x{50AE}\x{50AF}\x{50B0}\x{50B1}\x{50B2}\x{50B3}\x{50B4}\x{50B5}' - . '\x{50B6}\x{50B7}\x{50B8}\x{50BA}\x{50BB}\x{50BC}\x{50BD}\x{50BE}\x{50BF}' - . '\x{50C0}\x{50C1}\x{50C2}\x{50C4}\x{50C5}\x{50C6}\x{50C7}\x{50C8}\x{50C9}' - . '\x{50CA}\x{50CB}\x{50CC}\x{50CD}\x{50CE}\x{50CF}\x{50D0}\x{50D1}\x{50D2}' - . '\x{50D3}\x{50D4}\x{50D5}\x{50D6}\x{50D7}\x{50D9}\x{50DA}\x{50DB}\x{50DC}' - . '\x{50DD}\x{50DE}\x{50E0}\x{50E3}\x{50E4}\x{50E5}\x{50E6}\x{50E7}\x{50E8}' - . '\x{50E9}\x{50EA}\x{50EC}\x{50ED}\x{50EE}\x{50EF}\x{50F0}\x{50F1}\x{50F2}' - . '\x{50F3}\x{50F5}\x{50F6}\x{50F8}\x{50F9}\x{50FA}\x{50FB}\x{50FC}\x{50FD}' - . '\x{50FE}\x{50FF}\x{5100}\x{5101}\x{5102}\x{5103}\x{5104}\x{5105}\x{5106}' - . '\x{5107}\x{5108}\x{5109}\x{510A}\x{510B}\x{510C}\x{510D}\x{510E}\x{510F}' - . '\x{5110}\x{5111}\x{5112}\x{5113}\x{5114}\x{5115}\x{5116}\x{5117}\x{5118}' - . '\x{5119}\x{511A}\x{511C}\x{511D}\x{511E}\x{511F}\x{5120}\x{5121}\x{5122}' - . '\x{5123}\x{5124}\x{5125}\x{5126}\x{5127}\x{5129}\x{512A}\x{512C}\x{512D}' - . '\x{512E}\x{512F}\x{5130}\x{5131}\x{5132}\x{5133}\x{5134}\x{5135}\x{5136}' - . '\x{5137}\x{5138}\x{5139}\x{513A}\x{513B}\x{513C}\x{513D}\x{513E}\x{513F}' - . '\x{5140}\x{5141}\x{5143}\x{5144}\x{5145}\x{5146}\x{5147}\x{5148}\x{5149}' - . '\x{514B}\x{514C}\x{514D}\x{514E}\x{5150}\x{5151}\x{5152}\x{5154}\x{5155}' - . '\x{5156}\x{5157}\x{5159}\x{515A}\x{515B}\x{515C}\x{515D}\x{515E}\x{515F}' - . '\x{5161}\x{5162}\x{5163}\x{5165}\x{5166}\x{5167}\x{5168}\x{5169}\x{516A}' - . '\x{516B}\x{516C}\x{516D}\x{516E}\x{516F}\x{5170}\x{5171}\x{5173}\x{5174}' - . '\x{5175}\x{5176}\x{5177}\x{5178}\x{5179}\x{517A}\x{517B}\x{517C}\x{517D}' - . '\x{517F}\x{5180}\x{5181}\x{5182}\x{5185}\x{5186}\x{5187}\x{5188}\x{5189}' - . '\x{518A}\x{518B}\x{518C}\x{518D}\x{518F}\x{5190}\x{5191}\x{5192}\x{5193}' - . '\x{5194}\x{5195}\x{5196}\x{5197}\x{5198}\x{5199}\x{519A}\x{519B}\x{519C}' - . '\x{519D}\x{519E}\x{519F}\x{51A0}\x{51A2}\x{51A4}\x{51A5}\x{51A6}\x{51A7}' - . '\x{51A8}\x{51AA}\x{51AB}\x{51AC}\x{51AE}\x{51AF}\x{51B0}\x{51B1}\x{51B2}' - . '\x{51B3}\x{51B5}\x{51B6}\x{51B7}\x{51B9}\x{51BB}\x{51BC}\x{51BD}\x{51BE}' - . '\x{51BF}\x{51C0}\x{51C1}\x{51C3}\x{51C4}\x{51C5}\x{51C6}\x{51C7}\x{51C8}' - . '\x{51C9}\x{51CA}\x{51CB}\x{51CC}\x{51CD}\x{51CE}\x{51CF}\x{51D0}\x{51D1}' - . '\x{51D4}\x{51D5}\x{51D6}\x{51D7}\x{51D8}\x{51D9}\x{51DA}\x{51DB}\x{51DC}' - . '\x{51DD}\x{51DE}\x{51E0}\x{51E1}\x{51E2}\x{51E3}\x{51E4}\x{51E5}\x{51E7}' - . '\x{51E8}\x{51E9}\x{51EA}\x{51EB}\x{51ED}\x{51EF}\x{51F0}\x{51F1}\x{51F3}' - . '\x{51F4}\x{51F5}\x{51F6}\x{51F7}\x{51F8}\x{51F9}\x{51FA}\x{51FB}\x{51FC}' - . '\x{51FD}\x{51FE}\x{51FF}\x{5200}\x{5201}\x{5202}\x{5203}\x{5204}\x{5205}' - . '\x{5206}\x{5207}\x{5208}\x{5209}\x{520A}\x{520B}\x{520C}\x{520D}\x{520E}' - . '\x{520F}\x{5210}\x{5211}\x{5212}\x{5213}\x{5214}\x{5215}\x{5216}\x{5217}' - . '\x{5218}\x{5219}\x{521A}\x{521B}\x{521C}\x{521D}\x{521E}\x{521F}\x{5220}' - . '\x{5221}\x{5222}\x{5223}\x{5224}\x{5225}\x{5226}\x{5228}\x{5229}\x{522A}' - . '\x{522B}\x{522C}\x{522D}\x{522E}\x{522F}\x{5230}\x{5231}\x{5232}\x{5233}' - . '\x{5234}\x{5235}\x{5236}\x{5237}\x{5238}\x{5239}\x{523A}\x{523B}\x{523C}' - . '\x{523D}\x{523E}\x{523F}\x{5240}\x{5241}\x{5242}\x{5243}\x{5244}\x{5245}' - . '\x{5246}\x{5247}\x{5248}\x{5249}\x{524A}\x{524B}\x{524C}\x{524D}\x{524E}' - . '\x{5250}\x{5251}\x{5252}\x{5254}\x{5255}\x{5256}\x{5257}\x{5258}\x{5259}' - . '\x{525A}\x{525B}\x{525C}\x{525D}\x{525E}\x{525F}\x{5260}\x{5261}\x{5262}' - . '\x{5263}\x{5264}\x{5265}\x{5267}\x{5268}\x{5269}\x{526A}\x{526B}\x{526C}' - . '\x{526D}\x{526E}\x{526F}\x{5270}\x{5272}\x{5273}\x{5274}\x{5275}\x{5276}' - . '\x{5277}\x{5278}\x{527A}\x{527B}\x{527C}\x{527D}\x{527E}\x{527F}\x{5280}' - . '\x{5281}\x{5282}\x{5283}\x{5284}\x{5286}\x{5287}\x{5288}\x{5289}\x{528A}' - . '\x{528B}\x{528C}\x{528D}\x{528F}\x{5290}\x{5291}\x{5292}\x{5293}\x{5294}' - . '\x{5295}\x{5296}\x{5297}\x{5298}\x{5299}\x{529A}\x{529B}\x{529C}\x{529D}' - . '\x{529E}\x{529F}\x{52A0}\x{52A1}\x{52A2}\x{52A3}\x{52A5}\x{52A6}\x{52A7}' - . '\x{52A8}\x{52A9}\x{52AA}\x{52AB}\x{52AC}\x{52AD}\x{52AE}\x{52AF}\x{52B0}' - . '\x{52B1}\x{52B2}\x{52B3}\x{52B4}\x{52B5}\x{52B6}\x{52B7}\x{52B8}\x{52B9}' - . '\x{52BA}\x{52BB}\x{52BC}\x{52BD}\x{52BE}\x{52BF}\x{52C0}\x{52C1}\x{52C2}' - . '\x{52C3}\x{52C6}\x{52C7}\x{52C9}\x{52CA}\x{52CB}\x{52CD}\x{52CF}\x{52D0}' - . '\x{52D2}\x{52D3}\x{52D5}\x{52D6}\x{52D7}\x{52D8}\x{52D9}\x{52DA}\x{52DB}' - . '\x{52DC}\x{52DD}\x{52DE}\x{52DF}\x{52E0}\x{52E2}\x{52E3}\x{52E4}\x{52E6}' - . '\x{52E7}\x{52E8}\x{52E9}\x{52EA}\x{52EB}\x{52EC}\x{52ED}\x{52EF}\x{52F0}' - . '\x{52F1}\x{52F2}\x{52F3}\x{52F4}\x{52F5}\x{52F6}\x{52F7}\x{52F8}\x{52F9}' - . '\x{52FA}\x{52FB}\x{52FC}\x{52FD}\x{52FE}\x{52FF}\x{5300}\x{5301}\x{5302}' - . '\x{5305}\x{5306}\x{5307}\x{5308}\x{5309}\x{530A}\x{530B}\x{530C}\x{530D}' - . '\x{530E}\x{530F}\x{5310}\x{5311}\x{5312}\x{5313}\x{5314}\x{5315}\x{5316}' - . '\x{5317}\x{5319}\x{531A}\x{531C}\x{531D}\x{531F}\x{5320}\x{5321}\x{5322}' - . '\x{5323}\x{5324}\x{5325}\x{5326}\x{5328}\x{532A}\x{532B}\x{532C}\x{532D}' - . '\x{532E}\x{532F}\x{5330}\x{5331}\x{5333}\x{5334}\x{5337}\x{5339}\x{533A}' - . '\x{533B}\x{533C}\x{533D}\x{533E}\x{533F}\x{5340}\x{5341}\x{5343}\x{5344}' - . '\x{5345}\x{5346}\x{5347}\x{5348}\x{5349}\x{534A}\x{534B}\x{534C}\x{534D}' - . '\x{534E}\x{534F}\x{5350}\x{5351}\x{5352}\x{5353}\x{5354}\x{5355}\x{5356}' - . '\x{5357}\x{5358}\x{5359}\x{535A}\x{535C}\x{535E}\x{535F}\x{5360}\x{5361}' - . '\x{5362}\x{5363}\x{5364}\x{5365}\x{5366}\x{5367}\x{5369}\x{536B}\x{536C}' - . '\x{536E}\x{536F}\x{5370}\x{5371}\x{5372}\x{5373}\x{5374}\x{5375}\x{5376}' - . '\x{5377}\x{5378}\x{5379}\x{537A}\x{537B}\x{537C}\x{537D}\x{537E}\x{537F}' - . '\x{5381}\x{5382}\x{5383}\x{5384}\x{5385}\x{5386}\x{5387}\x{5388}\x{5389}' - . '\x{538A}\x{538B}\x{538C}\x{538D}\x{538E}\x{538F}\x{5390}\x{5391}\x{5392}' - . '\x{5393}\x{5394}\x{5395}\x{5396}\x{5397}\x{5398}\x{5399}\x{539A}\x{539B}' - . '\x{539C}\x{539D}\x{539E}\x{539F}\x{53A0}\x{53A2}\x{53A3}\x{53A4}\x{53A5}' - . '\x{53A6}\x{53A7}\x{53A8}\x{53A9}\x{53AC}\x{53AD}\x{53AE}\x{53B0}\x{53B1}' - . '\x{53B2}\x{53B3}\x{53B4}\x{53B5}\x{53B6}\x{53B7}\x{53B8}\x{53B9}\x{53BB}' - . '\x{53BC}\x{53BD}\x{53BE}\x{53BF}\x{53C0}\x{53C1}\x{53C2}\x{53C3}\x{53C4}' - . '\x{53C6}\x{53C7}\x{53C8}\x{53C9}\x{53CA}\x{53CB}\x{53CC}\x{53CD}\x{53CE}' - . '\x{53D0}\x{53D1}\x{53D2}\x{53D3}\x{53D4}\x{53D5}\x{53D6}\x{53D7}\x{53D8}' - . '\x{53D9}\x{53DB}\x{53DC}\x{53DF}\x{53E0}\x{53E1}\x{53E2}\x{53E3}\x{53E4}' - . '\x{53E5}\x{53E6}\x{53E8}\x{53E9}\x{53EA}\x{53EB}\x{53EC}\x{53ED}\x{53EE}' - . '\x{53EF}\x{53F0}\x{53F1}\x{53F2}\x{53F3}\x{53F4}\x{53F5}\x{53F6}\x{53F7}' - . '\x{53F8}\x{53F9}\x{53FA}\x{53FB}\x{53FC}\x{53FD}\x{53FE}\x{5401}\x{5402}' - . '\x{5403}\x{5404}\x{5405}\x{5406}\x{5407}\x{5408}\x{5409}\x{540A}\x{540B}' - . '\x{540C}\x{540D}\x{540E}\x{540F}\x{5410}\x{5411}\x{5412}\x{5413}\x{5414}' - . '\x{5415}\x{5416}\x{5417}\x{5418}\x{5419}\x{541B}\x{541C}\x{541D}\x{541E}' - . '\x{541F}\x{5420}\x{5421}\x{5423}\x{5424}\x{5425}\x{5426}\x{5427}\x{5428}' - . '\x{5429}\x{542A}\x{542B}\x{542C}\x{542D}\x{542E}\x{542F}\x{5430}\x{5431}' - . '\x{5432}\x{5433}\x{5434}\x{5435}\x{5436}\x{5437}\x{5438}\x{5439}\x{543A}' - . '\x{543B}\x{543C}\x{543D}\x{543E}\x{543F}\x{5440}\x{5441}\x{5442}\x{5443}' - . '\x{5444}\x{5445}\x{5446}\x{5447}\x{5448}\x{5449}\x{544A}\x{544B}\x{544D}' - . '\x{544E}\x{544F}\x{5450}\x{5451}\x{5452}\x{5453}\x{5454}\x{5455}\x{5456}' - . '\x{5457}\x{5458}\x{5459}\x{545A}\x{545B}\x{545C}\x{545E}\x{545F}\x{5460}' - . '\x{5461}\x{5462}\x{5463}\x{5464}\x{5465}\x{5466}\x{5467}\x{5468}\x{546A}' - . '\x{546B}\x{546C}\x{546D}\x{546E}\x{546F}\x{5470}\x{5471}\x{5472}\x{5473}' - . '\x{5474}\x{5475}\x{5476}\x{5477}\x{5478}\x{5479}\x{547A}\x{547B}\x{547C}' - . '\x{547D}\x{547E}\x{547F}\x{5480}\x{5481}\x{5482}\x{5483}\x{5484}\x{5485}' - . '\x{5486}\x{5487}\x{5488}\x{5489}\x{548B}\x{548C}\x{548D}\x{548E}\x{548F}' - . '\x{5490}\x{5491}\x{5492}\x{5493}\x{5494}\x{5495}\x{5496}\x{5497}\x{5498}' - . '\x{5499}\x{549A}\x{549B}\x{549C}\x{549D}\x{549E}\x{549F}\x{54A0}\x{54A1}' - . '\x{54A2}\x{54A3}\x{54A4}\x{54A5}\x{54A6}\x{54A7}\x{54A8}\x{54A9}\x{54AA}' - . '\x{54AB}\x{54AC}\x{54AD}\x{54AE}\x{54AF}\x{54B0}\x{54B1}\x{54B2}\x{54B3}' - . '\x{54B4}\x{54B6}\x{54B7}\x{54B8}\x{54B9}\x{54BA}\x{54BB}\x{54BC}\x{54BD}' - . '\x{54BE}\x{54BF}\x{54C0}\x{54C1}\x{54C2}\x{54C3}\x{54C4}\x{54C5}\x{54C6}' - . '\x{54C7}\x{54C8}\x{54C9}\x{54CA}\x{54CB}\x{54CC}\x{54CD}\x{54CE}\x{54CF}' - . '\x{54D0}\x{54D1}\x{54D2}\x{54D3}\x{54D4}\x{54D5}\x{54D6}\x{54D7}\x{54D8}' - . '\x{54D9}\x{54DA}\x{54DB}\x{54DC}\x{54DD}\x{54DE}\x{54DF}\x{54E0}\x{54E1}' - . '\x{54E2}\x{54E3}\x{54E4}\x{54E5}\x{54E6}\x{54E7}\x{54E8}\x{54E9}\x{54EA}' - . '\x{54EB}\x{54EC}\x{54ED}\x{54EE}\x{54EF}\x{54F0}\x{54F1}\x{54F2}\x{54F3}' - . '\x{54F4}\x{54F5}\x{54F7}\x{54F8}\x{54F9}\x{54FA}\x{54FB}\x{54FC}\x{54FD}' - . '\x{54FE}\x{54FF}\x{5500}\x{5501}\x{5502}\x{5503}\x{5504}\x{5505}\x{5506}' - . '\x{5507}\x{5508}\x{5509}\x{550A}\x{550B}\x{550C}\x{550D}\x{550E}\x{550F}' - . '\x{5510}\x{5511}\x{5512}\x{5513}\x{5514}\x{5516}\x{5517}\x{551A}\x{551B}' - . '\x{551C}\x{551D}\x{551E}\x{551F}\x{5520}\x{5521}\x{5522}\x{5523}\x{5524}' - . '\x{5525}\x{5526}\x{5527}\x{5528}\x{5529}\x{552A}\x{552B}\x{552C}\x{552D}' - . '\x{552E}\x{552F}\x{5530}\x{5531}\x{5532}\x{5533}\x{5534}\x{5535}\x{5536}' - . '\x{5537}\x{5538}\x{5539}\x{553A}\x{553B}\x{553C}\x{553D}\x{553E}\x{553F}' - . '\x{5540}\x{5541}\x{5542}\x{5543}\x{5544}\x{5545}\x{5546}\x{5548}\x{5549}' - . '\x{554A}\x{554B}\x{554C}\x{554D}\x{554E}\x{554F}\x{5550}\x{5551}\x{5552}' - . '\x{5553}\x{5554}\x{5555}\x{5556}\x{5557}\x{5558}\x{5559}\x{555A}\x{555B}' - . '\x{555C}\x{555D}\x{555E}\x{555F}\x{5561}\x{5562}\x{5563}\x{5564}\x{5565}' - . '\x{5566}\x{5567}\x{5568}\x{5569}\x{556A}\x{556B}\x{556C}\x{556D}\x{556E}' - . '\x{556F}\x{5570}\x{5571}\x{5572}\x{5573}\x{5574}\x{5575}\x{5576}\x{5577}' - . '\x{5578}\x{5579}\x{557B}\x{557C}\x{557D}\x{557E}\x{557F}\x{5580}\x{5581}' - . '\x{5582}\x{5583}\x{5584}\x{5585}\x{5586}\x{5587}\x{5588}\x{5589}\x{558A}' - . '\x{558B}\x{558C}\x{558D}\x{558E}\x{558F}\x{5590}\x{5591}\x{5592}\x{5593}' - . '\x{5594}\x{5595}\x{5596}\x{5597}\x{5598}\x{5599}\x{559A}\x{559B}\x{559C}' - . '\x{559D}\x{559E}\x{559F}\x{55A0}\x{55A1}\x{55A2}\x{55A3}\x{55A4}\x{55A5}' - . '\x{55A6}\x{55A7}\x{55A8}\x{55A9}\x{55AA}\x{55AB}\x{55AC}\x{55AD}\x{55AE}' - . '\x{55AF}\x{55B0}\x{55B1}\x{55B2}\x{55B3}\x{55B4}\x{55B5}\x{55B6}\x{55B7}' - . '\x{55B8}\x{55B9}\x{55BA}\x{55BB}\x{55BC}\x{55BD}\x{55BE}\x{55BF}\x{55C0}' - . '\x{55C1}\x{55C2}\x{55C3}\x{55C4}\x{55C5}\x{55C6}\x{55C7}\x{55C8}\x{55C9}' - . '\x{55CA}\x{55CB}\x{55CC}\x{55CD}\x{55CE}\x{55CF}\x{55D0}\x{55D1}\x{55D2}' - . '\x{55D3}\x{55D4}\x{55D5}\x{55D6}\x{55D7}\x{55D8}\x{55D9}\x{55DA}\x{55DB}' - . '\x{55DC}\x{55DD}\x{55DE}\x{55DF}\x{55E1}\x{55E2}\x{55E3}\x{55E4}\x{55E5}' - . '\x{55E6}\x{55E7}\x{55E8}\x{55E9}\x{55EA}\x{55EB}\x{55EC}\x{55ED}\x{55EE}' - . '\x{55EF}\x{55F0}\x{55F1}\x{55F2}\x{55F3}\x{55F4}\x{55F5}\x{55F6}\x{55F7}' - . '\x{55F9}\x{55FA}\x{55FB}\x{55FC}\x{55FD}\x{55FE}\x{55FF}\x{5600}\x{5601}' - . '\x{5602}\x{5603}\x{5604}\x{5606}\x{5607}\x{5608}\x{5609}\x{560C}\x{560D}' - . '\x{560E}\x{560F}\x{5610}\x{5611}\x{5612}\x{5613}\x{5614}\x{5615}\x{5616}' - . '\x{5617}\x{5618}\x{5619}\x{561A}\x{561B}\x{561C}\x{561D}\x{561E}\x{561F}' - . '\x{5621}\x{5622}\x{5623}\x{5624}\x{5625}\x{5626}\x{5627}\x{5628}\x{5629}' - . '\x{562A}\x{562C}\x{562D}\x{562E}\x{562F}\x{5630}\x{5631}\x{5632}\x{5633}' - . '\x{5634}\x{5635}\x{5636}\x{5638}\x{5639}\x{563A}\x{563B}\x{563D}\x{563E}' - . '\x{563F}\x{5640}\x{5641}\x{5642}\x{5643}\x{5645}\x{5646}\x{5647}\x{5648}' - . '\x{5649}\x{564A}\x{564C}\x{564D}\x{564E}\x{564F}\x{5650}\x{5652}\x{5653}' - . '\x{5654}\x{5655}\x{5657}\x{5658}\x{5659}\x{565A}\x{565B}\x{565C}\x{565D}' - . '\x{565E}\x{5660}\x{5662}\x{5663}\x{5664}\x{5665}\x{5666}\x{5667}\x{5668}' - . '\x{5669}\x{566A}\x{566B}\x{566C}\x{566D}\x{566E}\x{566F}\x{5670}\x{5671}' - . '\x{5672}\x{5673}\x{5674}\x{5676}\x{5677}\x{5678}\x{5679}\x{567A}\x{567B}' - . '\x{567C}\x{567E}\x{567F}\x{5680}\x{5681}\x{5682}\x{5683}\x{5684}\x{5685}' - . '\x{5686}\x{5687}\x{568A}\x{568C}\x{568D}\x{568E}\x{568F}\x{5690}\x{5691}' - . '\x{5692}\x{5693}\x{5694}\x{5695}\x{5697}\x{5698}\x{5699}\x{569A}\x{569B}' - . '\x{569C}\x{569D}\x{569F}\x{56A0}\x{56A1}\x{56A3}\x{56A4}\x{56A5}\x{56A6}' - . '\x{56A7}\x{56A8}\x{56A9}\x{56AA}\x{56AB}\x{56AC}\x{56AD}\x{56AE}\x{56AF}' - . '\x{56B0}\x{56B1}\x{56B2}\x{56B3}\x{56B4}\x{56B5}\x{56B6}\x{56B7}\x{56B8}' - . '\x{56B9}\x{56BB}\x{56BC}\x{56BD}\x{56BE}\x{56BF}\x{56C0}\x{56C1}\x{56C2}' - . '\x{56C3}\x{56C4}\x{56C5}\x{56C6}\x{56C7}\x{56C8}\x{56C9}\x{56CA}\x{56CB}' - . '\x{56CC}\x{56CD}\x{56CE}\x{56D0}\x{56D1}\x{56D2}\x{56D3}\x{56D4}\x{56D5}' - . '\x{56D6}\x{56D7}\x{56D8}\x{56DA}\x{56DB}\x{56DC}\x{56DD}\x{56DE}\x{56DF}' - . '\x{56E0}\x{56E1}\x{56E2}\x{56E3}\x{56E4}\x{56E5}\x{56E7}\x{56E8}\x{56E9}' - . '\x{56EA}\x{56EB}\x{56EC}\x{56ED}\x{56EE}\x{56EF}\x{56F0}\x{56F1}\x{56F2}' - . '\x{56F3}\x{56F4}\x{56F5}\x{56F7}\x{56F9}\x{56FA}\x{56FD}\x{56FE}\x{56FF}' - . '\x{5700}\x{5701}\x{5702}\x{5703}\x{5704}\x{5706}\x{5707}\x{5708}\x{5709}' - . '\x{570A}\x{570B}\x{570C}\x{570D}\x{570E}\x{570F}\x{5710}\x{5712}\x{5713}' - . '\x{5714}\x{5715}\x{5716}\x{5718}\x{5719}\x{571A}\x{571B}\x{571C}\x{571D}' - . '\x{571E}\x{571F}\x{5720}\x{5722}\x{5723}\x{5725}\x{5726}\x{5727}\x{5728}' - . '\x{5729}\x{572A}\x{572B}\x{572C}\x{572D}\x{572E}\x{572F}\x{5730}\x{5731}' - . '\x{5732}\x{5733}\x{5734}\x{5735}\x{5736}\x{5737}\x{5738}\x{5739}\x{573A}' - . '\x{573B}\x{573C}\x{573E}\x{573F}\x{5740}\x{5741}\x{5742}\x{5744}\x{5745}' - . '\x{5746}\x{5747}\x{5749}\x{574A}\x{574B}\x{574C}\x{574D}\x{574E}\x{574F}' - . '\x{5750}\x{5751}\x{5752}\x{5753}\x{5754}\x{5757}\x{5759}\x{575A}\x{575B}' - . '\x{575C}\x{575D}\x{575E}\x{575F}\x{5760}\x{5761}\x{5762}\x{5764}\x{5765}' - . '\x{5766}\x{5767}\x{5768}\x{5769}\x{576A}\x{576B}\x{576C}\x{576D}\x{576F}' - . '\x{5770}\x{5771}\x{5772}\x{5773}\x{5774}\x{5775}\x{5776}\x{5777}\x{5779}' - . '\x{577A}\x{577B}\x{577C}\x{577D}\x{577E}\x{577F}\x{5780}\x{5782}\x{5783}' - . '\x{5784}\x{5785}\x{5786}\x{5788}\x{5789}\x{578A}\x{578B}\x{578C}\x{578D}' - . '\x{578E}\x{578F}\x{5790}\x{5791}\x{5792}\x{5793}\x{5794}\x{5795}\x{5797}' - . '\x{5798}\x{5799}\x{579A}\x{579B}\x{579C}\x{579D}\x{579E}\x{579F}\x{57A0}' - . '\x{57A1}\x{57A2}\x{57A3}\x{57A4}\x{57A5}\x{57A6}\x{57A7}\x{57A9}\x{57AA}' - . '\x{57AB}\x{57AC}\x{57AD}\x{57AE}\x{57AF}\x{57B0}\x{57B1}\x{57B2}\x{57B3}' - . '\x{57B4}\x{57B5}\x{57B6}\x{57B7}\x{57B8}\x{57B9}\x{57BA}\x{57BB}\x{57BC}' - . '\x{57BD}\x{57BE}\x{57BF}\x{57C0}\x{57C1}\x{57C2}\x{57C3}\x{57C4}\x{57C5}' - . '\x{57C6}\x{57C7}\x{57C8}\x{57C9}\x{57CB}\x{57CC}\x{57CD}\x{57CE}\x{57CF}' - . '\x{57D0}\x{57D2}\x{57D3}\x{57D4}\x{57D5}\x{57D6}\x{57D8}\x{57D9}\x{57DA}' - . '\x{57DC}\x{57DD}\x{57DF}\x{57E0}\x{57E1}\x{57E2}\x{57E3}\x{57E4}\x{57E5}' - . '\x{57E6}\x{57E7}\x{57E8}\x{57E9}\x{57EA}\x{57EB}\x{57EC}\x{57ED}\x{57EE}' - . '\x{57EF}\x{57F0}\x{57F1}\x{57F2}\x{57F3}\x{57F4}\x{57F5}\x{57F6}\x{57F7}' - . '\x{57F8}\x{57F9}\x{57FA}\x{57FB}\x{57FC}\x{57FD}\x{57FE}\x{57FF}\x{5800}' - . '\x{5801}\x{5802}\x{5803}\x{5804}\x{5805}\x{5806}\x{5807}\x{5808}\x{5809}' - . '\x{580A}\x{580B}\x{580C}\x{580D}\x{580E}\x{580F}\x{5810}\x{5811}\x{5812}' - . '\x{5813}\x{5814}\x{5815}\x{5816}\x{5819}\x{581A}\x{581B}\x{581C}\x{581D}' - . '\x{581E}\x{581F}\x{5820}\x{5821}\x{5822}\x{5823}\x{5824}\x{5825}\x{5826}' - . '\x{5827}\x{5828}\x{5829}\x{582A}\x{582B}\x{582C}\x{582D}\x{582E}\x{582F}' - . '\x{5830}\x{5831}\x{5832}\x{5833}\x{5834}\x{5835}\x{5836}\x{5837}\x{5838}' - . '\x{5839}\x{583A}\x{583B}\x{583C}\x{583D}\x{583E}\x{583F}\x{5840}\x{5842}' - . '\x{5843}\x{5844}\x{5845}\x{5846}\x{5847}\x{5848}\x{5849}\x{584A}\x{584B}' - . '\x{584C}\x{584D}\x{584E}\x{584F}\x{5851}\x{5852}\x{5853}\x{5854}\x{5855}' - . '\x{5857}\x{5858}\x{5859}\x{585A}\x{585B}\x{585C}\x{585D}\x{585E}\x{585F}' - . '\x{5861}\x{5862}\x{5863}\x{5864}\x{5865}\x{5868}\x{5869}\x{586A}\x{586B}' - . '\x{586C}\x{586D}\x{586E}\x{586F}\x{5870}\x{5871}\x{5872}\x{5873}\x{5874}' - . '\x{5875}\x{5876}\x{5878}\x{5879}\x{587A}\x{587B}\x{587C}\x{587D}\x{587E}' - . '\x{587F}\x{5880}\x{5881}\x{5882}\x{5883}\x{5884}\x{5885}\x{5886}\x{5887}' - . '\x{5888}\x{5889}\x{588A}\x{588B}\x{588C}\x{588D}\x{588E}\x{588F}\x{5890}' - . '\x{5891}\x{5892}\x{5893}\x{5894}\x{5896}\x{5897}\x{5898}\x{5899}\x{589A}' - . '\x{589B}\x{589C}\x{589D}\x{589E}\x{589F}\x{58A0}\x{58A1}\x{58A2}\x{58A3}' - . '\x{58A4}\x{58A5}\x{58A6}\x{58A7}\x{58A8}\x{58A9}\x{58AB}\x{58AC}\x{58AD}' - . '\x{58AE}\x{58AF}\x{58B0}\x{58B1}\x{58B2}\x{58B3}\x{58B4}\x{58B7}\x{58B8}' - . '\x{58B9}\x{58BA}\x{58BB}\x{58BC}\x{58BD}\x{58BE}\x{58BF}\x{58C1}\x{58C2}' - . '\x{58C5}\x{58C6}\x{58C7}\x{58C8}\x{58C9}\x{58CA}\x{58CB}\x{58CE}\x{58CF}' - . '\x{58D1}\x{58D2}\x{58D3}\x{58D4}\x{58D5}\x{58D6}\x{58D7}\x{58D8}\x{58D9}' - . '\x{58DA}\x{58DB}\x{58DD}\x{58DE}\x{58DF}\x{58E0}\x{58E2}\x{58E3}\x{58E4}' - . '\x{58E5}\x{58E7}\x{58E8}\x{58E9}\x{58EA}\x{58EB}\x{58EC}\x{58ED}\x{58EE}' - . '\x{58EF}\x{58F0}\x{58F1}\x{58F2}\x{58F3}\x{58F4}\x{58F6}\x{58F7}\x{58F8}' - . '\x{58F9}\x{58FA}\x{58FB}\x{58FC}\x{58FD}\x{58FE}\x{58FF}\x{5900}\x{5902}' - . '\x{5903}\x{5904}\x{5906}\x{5907}\x{5909}\x{590A}\x{590B}\x{590C}\x{590D}' - . '\x{590E}\x{590F}\x{5910}\x{5912}\x{5914}\x{5915}\x{5916}\x{5917}\x{5918}' - . '\x{5919}\x{591A}\x{591B}\x{591C}\x{591D}\x{591E}\x{591F}\x{5920}\x{5921}' - . '\x{5922}\x{5924}\x{5925}\x{5926}\x{5927}\x{5928}\x{5929}\x{592A}\x{592B}' - . '\x{592C}\x{592D}\x{592E}\x{592F}\x{5930}\x{5931}\x{5932}\x{5934}\x{5935}' - . '\x{5937}\x{5938}\x{5939}\x{593A}\x{593B}\x{593C}\x{593D}\x{593E}\x{593F}' - . '\x{5940}\x{5941}\x{5942}\x{5943}\x{5944}\x{5945}\x{5946}\x{5947}\x{5948}' - . '\x{5949}\x{594A}\x{594B}\x{594C}\x{594D}\x{594E}\x{594F}\x{5950}\x{5951}' - . '\x{5952}\x{5953}\x{5954}\x{5955}\x{5956}\x{5957}\x{5958}\x{595A}\x{595C}' - . '\x{595D}\x{595E}\x{595F}\x{5960}\x{5961}\x{5962}\x{5963}\x{5964}\x{5965}' - . '\x{5966}\x{5967}\x{5968}\x{5969}\x{596A}\x{596B}\x{596C}\x{596D}\x{596E}' - . '\x{596F}\x{5970}\x{5971}\x{5972}\x{5973}\x{5974}\x{5975}\x{5976}\x{5977}' - . '\x{5978}\x{5979}\x{597A}\x{597B}\x{597C}\x{597D}\x{597E}\x{597F}\x{5980}' - . '\x{5981}\x{5982}\x{5983}\x{5984}\x{5985}\x{5986}\x{5987}\x{5988}\x{5989}' - . '\x{598A}\x{598B}\x{598C}\x{598D}\x{598E}\x{598F}\x{5990}\x{5991}\x{5992}' - . '\x{5993}\x{5994}\x{5995}\x{5996}\x{5997}\x{5998}\x{5999}\x{599A}\x{599C}' - . '\x{599D}\x{599E}\x{599F}\x{59A0}\x{59A1}\x{59A2}\x{59A3}\x{59A4}\x{59A5}' - . '\x{59A6}\x{59A7}\x{59A8}\x{59A9}\x{59AA}\x{59AB}\x{59AC}\x{59AD}\x{59AE}' - . '\x{59AF}\x{59B0}\x{59B1}\x{59B2}\x{59B3}\x{59B4}\x{59B5}\x{59B6}\x{59B8}' - . '\x{59B9}\x{59BA}\x{59BB}\x{59BC}\x{59BD}\x{59BE}\x{59BF}\x{59C0}\x{59C1}' - . '\x{59C2}\x{59C3}\x{59C4}\x{59C5}\x{59C6}\x{59C7}\x{59C8}\x{59C9}\x{59CA}' - . '\x{59CB}\x{59CC}\x{59CD}\x{59CE}\x{59CF}\x{59D0}\x{59D1}\x{59D2}\x{59D3}' - . '\x{59D4}\x{59D5}\x{59D6}\x{59D7}\x{59D8}\x{59D9}\x{59DA}\x{59DB}\x{59DC}' - . '\x{59DD}\x{59DE}\x{59DF}\x{59E0}\x{59E1}\x{59E2}\x{59E3}\x{59E4}\x{59E5}' - . '\x{59E6}\x{59E8}\x{59E9}\x{59EA}\x{59EB}\x{59EC}\x{59ED}\x{59EE}\x{59EF}' - . '\x{59F0}\x{59F1}\x{59F2}\x{59F3}\x{59F4}\x{59F5}\x{59F6}\x{59F7}\x{59F8}' - . '\x{59F9}\x{59FA}\x{59FB}\x{59FC}\x{59FD}\x{59FE}\x{59FF}\x{5A00}\x{5A01}' - . '\x{5A02}\x{5A03}\x{5A04}\x{5A05}\x{5A06}\x{5A07}\x{5A08}\x{5A09}\x{5A0A}' - . '\x{5A0B}\x{5A0C}\x{5A0D}\x{5A0E}\x{5A0F}\x{5A10}\x{5A11}\x{5A12}\x{5A13}' - . '\x{5A14}\x{5A15}\x{5A16}\x{5A17}\x{5A18}\x{5A19}\x{5A1A}\x{5A1B}\x{5A1C}' - . '\x{5A1D}\x{5A1E}\x{5A1F}\x{5A20}\x{5A21}\x{5A22}\x{5A23}\x{5A25}\x{5A27}' - . '\x{5A28}\x{5A29}\x{5A2A}\x{5A2B}\x{5A2D}\x{5A2E}\x{5A2F}\x{5A31}\x{5A32}' - . '\x{5A33}\x{5A34}\x{5A35}\x{5A36}\x{5A37}\x{5A38}\x{5A39}\x{5A3A}\x{5A3B}' - . '\x{5A3C}\x{5A3D}\x{5A3E}\x{5A3F}\x{5A40}\x{5A41}\x{5A42}\x{5A43}\x{5A44}' - . '\x{5A45}\x{5A46}\x{5A47}\x{5A48}\x{5A49}\x{5A4A}\x{5A4B}\x{5A4C}\x{5A4D}' - . '\x{5A4E}\x{5A4F}\x{5A50}\x{5A51}\x{5A52}\x{5A53}\x{5A55}\x{5A56}\x{5A57}' - . '\x{5A58}\x{5A5A}\x{5A5B}\x{5A5C}\x{5A5D}\x{5A5E}\x{5A5F}\x{5A60}\x{5A61}' - . '\x{5A62}\x{5A63}\x{5A64}\x{5A65}\x{5A66}\x{5A67}\x{5A68}\x{5A69}\x{5A6A}' - . '\x{5A6B}\x{5A6C}\x{5A6D}\x{5A6E}\x{5A70}\x{5A72}\x{5A73}\x{5A74}\x{5A75}' - . '\x{5A76}\x{5A77}\x{5A78}\x{5A79}\x{5A7A}\x{5A7B}\x{5A7C}\x{5A7D}\x{5A7E}' - . '\x{5A7F}\x{5A80}\x{5A81}\x{5A82}\x{5A83}\x{5A84}\x{5A85}\x{5A86}\x{5A88}' - . '\x{5A89}\x{5A8A}\x{5A8B}\x{5A8C}\x{5A8E}\x{5A8F}\x{5A90}\x{5A91}\x{5A92}' - . '\x{5A93}\x{5A94}\x{5A95}\x{5A96}\x{5A97}\x{5A98}\x{5A99}\x{5A9A}\x{5A9B}' - . '\x{5A9C}\x{5A9D}\x{5A9E}\x{5A9F}\x{5AA0}\x{5AA1}\x{5AA2}\x{5AA3}\x{5AA4}' - . '\x{5AA5}\x{5AA6}\x{5AA7}\x{5AA8}\x{5AA9}\x{5AAA}\x{5AAC}\x{5AAD}\x{5AAE}' - . '\x{5AAF}\x{5AB0}\x{5AB1}\x{5AB2}\x{5AB3}\x{5AB4}\x{5AB5}\x{5AB6}\x{5AB7}' - . '\x{5AB8}\x{5AB9}\x{5ABA}\x{5ABB}\x{5ABC}\x{5ABD}\x{5ABE}\x{5ABF}\x{5AC0}' - . '\x{5AC1}\x{5AC2}\x{5AC3}\x{5AC4}\x{5AC5}\x{5AC6}\x{5AC7}\x{5AC8}\x{5AC9}' - . '\x{5ACA}\x{5ACB}\x{5ACC}\x{5ACD}\x{5ACE}\x{5ACF}\x{5AD1}\x{5AD2}\x{5AD4}' - . '\x{5AD5}\x{5AD6}\x{5AD7}\x{5AD8}\x{5AD9}\x{5ADA}\x{5ADB}\x{5ADC}\x{5ADD}' - . '\x{5ADE}\x{5ADF}\x{5AE0}\x{5AE1}\x{5AE2}\x{5AE3}\x{5AE4}\x{5AE5}\x{5AE6}' - . '\x{5AE7}\x{5AE8}\x{5AE9}\x{5AEA}\x{5AEB}\x{5AEC}\x{5AED}\x{5AEE}\x{5AF1}' - . '\x{5AF2}\x{5AF3}\x{5AF4}\x{5AF5}\x{5AF6}\x{5AF7}\x{5AF8}\x{5AF9}\x{5AFA}' - . '\x{5AFB}\x{5AFC}\x{5AFD}\x{5AFE}\x{5AFF}\x{5B00}\x{5B01}\x{5B02}\x{5B03}' - . '\x{5B04}\x{5B05}\x{5B06}\x{5B07}\x{5B08}\x{5B09}\x{5B0B}\x{5B0C}\x{5B0E}' - . '\x{5B0F}\x{5B10}\x{5B11}\x{5B12}\x{5B13}\x{5B14}\x{5B15}\x{5B16}\x{5B17}' - . '\x{5B18}\x{5B19}\x{5B1A}\x{5B1B}\x{5B1C}\x{5B1D}\x{5B1E}\x{5B1F}\x{5B20}' - . '\x{5B21}\x{5B22}\x{5B23}\x{5B24}\x{5B25}\x{5B26}\x{5B27}\x{5B28}\x{5B29}' - . '\x{5B2A}\x{5B2B}\x{5B2C}\x{5B2D}\x{5B2E}\x{5B2F}\x{5B30}\x{5B31}\x{5B32}' - . '\x{5B33}\x{5B34}\x{5B35}\x{5B36}\x{5B37}\x{5B38}\x{5B3A}\x{5B3B}\x{5B3C}' - . '\x{5B3D}\x{5B3E}\x{5B3F}\x{5B40}\x{5B41}\x{5B42}\x{5B43}\x{5B44}\x{5B45}' - . '\x{5B47}\x{5B48}\x{5B49}\x{5B4A}\x{5B4B}\x{5B4C}\x{5B4D}\x{5B4E}\x{5B50}' - . '\x{5B51}\x{5B53}\x{5B54}\x{5B55}\x{5B56}\x{5B57}\x{5B58}\x{5B59}\x{5B5A}' - . '\x{5B5B}\x{5B5C}\x{5B5D}\x{5B5E}\x{5B5F}\x{5B62}\x{5B63}\x{5B64}\x{5B65}' - . '\x{5B66}\x{5B67}\x{5B68}\x{5B69}\x{5B6A}\x{5B6B}\x{5B6C}\x{5B6D}\x{5B6E}' - . '\x{5B70}\x{5B71}\x{5B72}\x{5B73}\x{5B74}\x{5B75}\x{5B76}\x{5B77}\x{5B78}' - . '\x{5B7A}\x{5B7B}\x{5B7C}\x{5B7D}\x{5B7F}\x{5B80}\x{5B81}\x{5B82}\x{5B83}' - . '\x{5B84}\x{5B85}\x{5B87}\x{5B88}\x{5B89}\x{5B8A}\x{5B8B}\x{5B8C}\x{5B8D}' - . '\x{5B8E}\x{5B8F}\x{5B91}\x{5B92}\x{5B93}\x{5B94}\x{5B95}\x{5B96}\x{5B97}' - . '\x{5B98}\x{5B99}\x{5B9A}\x{5B9B}\x{5B9C}\x{5B9D}\x{5B9E}\x{5B9F}\x{5BA0}' - . '\x{5BA1}\x{5BA2}\x{5BA3}\x{5BA4}\x{5BA5}\x{5BA6}\x{5BA7}\x{5BA8}\x{5BAA}' - . '\x{5BAB}\x{5BAC}\x{5BAD}\x{5BAE}\x{5BAF}\x{5BB0}\x{5BB1}\x{5BB3}\x{5BB4}' - . '\x{5BB5}\x{5BB6}\x{5BB8}\x{5BB9}\x{5BBA}\x{5BBB}\x{5BBD}\x{5BBE}\x{5BBF}' - . '\x{5BC0}\x{5BC1}\x{5BC2}\x{5BC3}\x{5BC4}\x{5BC5}\x{5BC6}\x{5BC7}\x{5BCA}' - . '\x{5BCB}\x{5BCC}\x{5BCD}\x{5BCE}\x{5BCF}\x{5BD0}\x{5BD1}\x{5BD2}\x{5BD3}' - . '\x{5BD4}\x{5BD5}\x{5BD6}\x{5BD8}\x{5BD9}\x{5BDB}\x{5BDC}\x{5BDD}\x{5BDE}' - . '\x{5BDF}\x{5BE0}\x{5BE1}\x{5BE2}\x{5BE3}\x{5BE4}\x{5BE5}\x{5BE6}\x{5BE7}' - . '\x{5BE8}\x{5BE9}\x{5BEA}\x{5BEB}\x{5BEC}\x{5BED}\x{5BEE}\x{5BEF}\x{5BF0}' - . '\x{5BF1}\x{5BF2}\x{5BF3}\x{5BF4}\x{5BF5}\x{5BF6}\x{5BF7}\x{5BF8}\x{5BF9}' - . '\x{5BFA}\x{5BFB}\x{5BFC}\x{5BFD}\x{5BFF}\x{5C01}\x{5C03}\x{5C04}\x{5C05}' - . '\x{5C06}\x{5C07}\x{5C08}\x{5C09}\x{5C0A}\x{5C0B}\x{5C0C}\x{5C0D}\x{5C0E}' - . '\x{5C0F}\x{5C10}\x{5C11}\x{5C12}\x{5C13}\x{5C14}\x{5C15}\x{5C16}\x{5C17}' - . '\x{5C18}\x{5C19}\x{5C1A}\x{5C1C}\x{5C1D}\x{5C1E}\x{5C1F}\x{5C20}\x{5C21}' - . '\x{5C22}\x{5C24}\x{5C25}\x{5C27}\x{5C28}\x{5C2A}\x{5C2B}\x{5C2C}\x{5C2D}' - . '\x{5C2E}\x{5C2F}\x{5C30}\x{5C31}\x{5C32}\x{5C33}\x{5C34}\x{5C35}\x{5C37}' - . '\x{5C38}\x{5C39}\x{5C3A}\x{5C3B}\x{5C3C}\x{5C3D}\x{5C3E}\x{5C3F}\x{5C40}' - . '\x{5C41}\x{5C42}\x{5C43}\x{5C44}\x{5C45}\x{5C46}\x{5C47}\x{5C48}\x{5C49}' - . '\x{5C4A}\x{5C4B}\x{5C4C}\x{5C4D}\x{5C4E}\x{5C4F}\x{5C50}\x{5C51}\x{5C52}' - . '\x{5C53}\x{5C54}\x{5C55}\x{5C56}\x{5C57}\x{5C58}\x{5C59}\x{5C5B}\x{5C5C}' - . '\x{5C5D}\x{5C5E}\x{5C5F}\x{5C60}\x{5C61}\x{5C62}\x{5C63}\x{5C64}\x{5C65}' - . '\x{5C66}\x{5C67}\x{5C68}\x{5C69}\x{5C6A}\x{5C6B}\x{5C6C}\x{5C6D}\x{5C6E}' - . '\x{5C6F}\x{5C70}\x{5C71}\x{5C72}\x{5C73}\x{5C74}\x{5C75}\x{5C76}\x{5C77}' - . '\x{5C78}\x{5C79}\x{5C7A}\x{5C7B}\x{5C7C}\x{5C7D}\x{5C7E}\x{5C7F}\x{5C80}' - . '\x{5C81}\x{5C82}\x{5C83}\x{5C84}\x{5C86}\x{5C87}\x{5C88}\x{5C89}\x{5C8A}' - . '\x{5C8B}\x{5C8C}\x{5C8D}\x{5C8E}\x{5C8F}\x{5C90}\x{5C91}\x{5C92}\x{5C93}' - . '\x{5C94}\x{5C95}\x{5C96}\x{5C97}\x{5C98}\x{5C99}\x{5C9A}\x{5C9B}\x{5C9C}' - . '\x{5C9D}\x{5C9E}\x{5C9F}\x{5CA0}\x{5CA1}\x{5CA2}\x{5CA3}\x{5CA4}\x{5CA5}' - . '\x{5CA6}\x{5CA7}\x{5CA8}\x{5CA9}\x{5CAA}\x{5CAB}\x{5CAC}\x{5CAD}\x{5CAE}' - . '\x{5CAF}\x{5CB0}\x{5CB1}\x{5CB2}\x{5CB3}\x{5CB5}\x{5CB6}\x{5CB7}\x{5CB8}' - . '\x{5CBA}\x{5CBB}\x{5CBC}\x{5CBD}\x{5CBE}\x{5CBF}\x{5CC1}\x{5CC2}\x{5CC3}' - . '\x{5CC4}\x{5CC5}\x{5CC6}\x{5CC7}\x{5CC8}\x{5CC9}\x{5CCA}\x{5CCB}\x{5CCC}' - . '\x{5CCD}\x{5CCE}\x{5CCF}\x{5CD0}\x{5CD1}\x{5CD2}\x{5CD3}\x{5CD4}\x{5CD6}' - . '\x{5CD7}\x{5CD8}\x{5CD9}\x{5CDA}\x{5CDB}\x{5CDC}\x{5CDE}\x{5CDF}\x{5CE0}' - . '\x{5CE1}\x{5CE2}\x{5CE3}\x{5CE4}\x{5CE5}\x{5CE6}\x{5CE7}\x{5CE8}\x{5CE9}' - . '\x{5CEA}\x{5CEB}\x{5CEC}\x{5CED}\x{5CEE}\x{5CEF}\x{5CF0}\x{5CF1}\x{5CF2}' - . '\x{5CF3}\x{5CF4}\x{5CF6}\x{5CF7}\x{5CF8}\x{5CF9}\x{5CFA}\x{5CFB}\x{5CFC}' - . '\x{5CFD}\x{5CFE}\x{5CFF}\x{5D00}\x{5D01}\x{5D02}\x{5D03}\x{5D04}\x{5D05}' - . '\x{5D06}\x{5D07}\x{5D08}\x{5D09}\x{5D0A}\x{5D0B}\x{5D0C}\x{5D0D}\x{5D0E}' - . '\x{5D0F}\x{5D10}\x{5D11}\x{5D12}\x{5D13}\x{5D14}\x{5D15}\x{5D16}\x{5D17}' - . '\x{5D18}\x{5D19}\x{5D1A}\x{5D1B}\x{5D1C}\x{5D1D}\x{5D1E}\x{5D1F}\x{5D20}' - . '\x{5D21}\x{5D22}\x{5D23}\x{5D24}\x{5D25}\x{5D26}\x{5D27}\x{5D28}\x{5D29}' - . '\x{5D2A}\x{5D2C}\x{5D2D}\x{5D2E}\x{5D30}\x{5D31}\x{5D32}\x{5D33}\x{5D34}' - . '\x{5D35}\x{5D36}\x{5D37}\x{5D38}\x{5D39}\x{5D3A}\x{5D3C}\x{5D3D}\x{5D3E}' - . '\x{5D3F}\x{5D40}\x{5D41}\x{5D42}\x{5D43}\x{5D44}\x{5D45}\x{5D46}\x{5D47}' - . '\x{5D48}\x{5D49}\x{5D4A}\x{5D4B}\x{5D4C}\x{5D4D}\x{5D4E}\x{5D4F}\x{5D50}' - . '\x{5D51}\x{5D52}\x{5D54}\x{5D55}\x{5D56}\x{5D58}\x{5D59}\x{5D5A}\x{5D5B}' - . '\x{5D5D}\x{5D5E}\x{5D5F}\x{5D61}\x{5D62}\x{5D63}\x{5D64}\x{5D65}\x{5D66}' - . '\x{5D67}\x{5D68}\x{5D69}\x{5D6A}\x{5D6B}\x{5D6C}\x{5D6D}\x{5D6E}\x{5D6F}' - . '\x{5D70}\x{5D71}\x{5D72}\x{5D73}\x{5D74}\x{5D75}\x{5D76}\x{5D77}\x{5D78}' - . '\x{5D79}\x{5D7A}\x{5D7B}\x{5D7C}\x{5D7D}\x{5D7E}\x{5D7F}\x{5D80}\x{5D81}' - . '\x{5D82}\x{5D84}\x{5D85}\x{5D86}\x{5D87}\x{5D88}\x{5D89}\x{5D8A}\x{5D8B}' - . '\x{5D8C}\x{5D8D}\x{5D8E}\x{5D8F}\x{5D90}\x{5D91}\x{5D92}\x{5D93}\x{5D94}' - . '\x{5D95}\x{5D97}\x{5D98}\x{5D99}\x{5D9A}\x{5D9B}\x{5D9C}\x{5D9D}\x{5D9E}' - . '\x{5D9F}\x{5DA0}\x{5DA1}\x{5DA2}\x{5DA5}\x{5DA6}\x{5DA7}\x{5DA8}\x{5DA9}' - . '\x{5DAA}\x{5DAC}\x{5DAD}\x{5DAE}\x{5DAF}\x{5DB0}\x{5DB1}\x{5DB2}\x{5DB4}' - . '\x{5DB5}\x{5DB6}\x{5DB7}\x{5DB8}\x{5DBA}\x{5DBB}\x{5DBC}\x{5DBD}\x{5DBE}' - . '\x{5DBF}\x{5DC0}\x{5DC1}\x{5DC2}\x{5DC3}\x{5DC5}\x{5DC6}\x{5DC7}\x{5DC8}' - . '\x{5DC9}\x{5DCA}\x{5DCB}\x{5DCC}\x{5DCD}\x{5DCE}\x{5DCF}\x{5DD0}\x{5DD1}' - . '\x{5DD2}\x{5DD3}\x{5DD4}\x{5DD5}\x{5DD6}\x{5DD8}\x{5DD9}\x{5DDB}\x{5DDD}' - . '\x{5DDE}\x{5DDF}\x{5DE0}\x{5DE1}\x{5DE2}\x{5DE3}\x{5DE4}\x{5DE5}\x{5DE6}' - . '\x{5DE7}\x{5DE8}\x{5DE9}\x{5DEA}\x{5DEB}\x{5DEC}\x{5DED}\x{5DEE}\x{5DEF}' - . '\x{5DF0}\x{5DF1}\x{5DF2}\x{5DF3}\x{5DF4}\x{5DF5}\x{5DF7}\x{5DF8}\x{5DF9}' - . '\x{5DFA}\x{5DFB}\x{5DFC}\x{5DFD}\x{5DFE}\x{5DFF}\x{5E00}\x{5E01}\x{5E02}' - . '\x{5E03}\x{5E04}\x{5E05}\x{5E06}\x{5E07}\x{5E08}\x{5E09}\x{5E0A}\x{5E0B}' - . '\x{5E0C}\x{5E0D}\x{5E0E}\x{5E0F}\x{5E10}\x{5E11}\x{5E13}\x{5E14}\x{5E15}' - . '\x{5E16}\x{5E17}\x{5E18}\x{5E19}\x{5E1A}\x{5E1B}\x{5E1C}\x{5E1D}\x{5E1E}' - . '\x{5E1F}\x{5E20}\x{5E21}\x{5E22}\x{5E23}\x{5E24}\x{5E25}\x{5E26}\x{5E27}' - . '\x{5E28}\x{5E29}\x{5E2A}\x{5E2B}\x{5E2C}\x{5E2D}\x{5E2E}\x{5E2F}\x{5E30}' - . '\x{5E31}\x{5E32}\x{5E33}\x{5E34}\x{5E35}\x{5E36}\x{5E37}\x{5E38}\x{5E39}' - . '\x{5E3A}\x{5E3B}\x{5E3C}\x{5E3D}\x{5E3E}\x{5E40}\x{5E41}\x{5E42}\x{5E43}' - . '\x{5E44}\x{5E45}\x{5E46}\x{5E47}\x{5E49}\x{5E4A}\x{5E4B}\x{5E4C}\x{5E4D}' - . '\x{5E4E}\x{5E4F}\x{5E50}\x{5E52}\x{5E53}\x{5E54}\x{5E55}\x{5E56}\x{5E57}' - . '\x{5E58}\x{5E59}\x{5E5A}\x{5E5B}\x{5E5C}\x{5E5D}\x{5E5E}\x{5E5F}\x{5E60}' - . '\x{5E61}\x{5E62}\x{5E63}\x{5E64}\x{5E65}\x{5E66}\x{5E67}\x{5E68}\x{5E69}' - . '\x{5E6A}\x{5E6B}\x{5E6C}\x{5E6D}\x{5E6E}\x{5E6F}\x{5E70}\x{5E71}\x{5E72}' - . '\x{5E73}\x{5E74}\x{5E75}\x{5E76}\x{5E77}\x{5E78}\x{5E79}\x{5E7A}\x{5E7B}' - . '\x{5E7C}\x{5E7D}\x{5E7E}\x{5E7F}\x{5E80}\x{5E81}\x{5E82}\x{5E83}\x{5E84}' - . '\x{5E85}\x{5E86}\x{5E87}\x{5E88}\x{5E89}\x{5E8A}\x{5E8B}\x{5E8C}\x{5E8D}' - . '\x{5E8E}\x{5E8F}\x{5E90}\x{5E91}\x{5E93}\x{5E94}\x{5E95}\x{5E96}\x{5E97}' - . '\x{5E98}\x{5E99}\x{5E9A}\x{5E9B}\x{5E9C}\x{5E9D}\x{5E9E}\x{5E9F}\x{5EA0}' - . '\x{5EA1}\x{5EA2}\x{5EA3}\x{5EA4}\x{5EA5}\x{5EA6}\x{5EA7}\x{5EA8}\x{5EA9}' - . '\x{5EAA}\x{5EAB}\x{5EAC}\x{5EAD}\x{5EAE}\x{5EAF}\x{5EB0}\x{5EB1}\x{5EB2}' - . '\x{5EB3}\x{5EB4}\x{5EB5}\x{5EB6}\x{5EB7}\x{5EB8}\x{5EB9}\x{5EBB}\x{5EBC}' - . '\x{5EBD}\x{5EBE}\x{5EBF}\x{5EC1}\x{5EC2}\x{5EC3}\x{5EC4}\x{5EC5}\x{5EC6}' - . '\x{5EC7}\x{5EC8}\x{5EC9}\x{5ECA}\x{5ECB}\x{5ECC}\x{5ECD}\x{5ECE}\x{5ECF}' - . '\x{5ED0}\x{5ED1}\x{5ED2}\x{5ED3}\x{5ED4}\x{5ED5}\x{5ED6}\x{5ED7}\x{5ED8}' - . '\x{5ED9}\x{5EDA}\x{5EDB}\x{5EDC}\x{5EDD}\x{5EDE}\x{5EDF}\x{5EE0}\x{5EE1}' - . '\x{5EE2}\x{5EE3}\x{5EE4}\x{5EE5}\x{5EE6}\x{5EE7}\x{5EE8}\x{5EE9}\x{5EEA}' - . '\x{5EEC}\x{5EED}\x{5EEE}\x{5EEF}\x{5EF0}\x{5EF1}\x{5EF2}\x{5EF3}\x{5EF4}' - . '\x{5EF5}\x{5EF6}\x{5EF7}\x{5EF8}\x{5EFA}\x{5EFB}\x{5EFC}\x{5EFD}\x{5EFE}' - . '\x{5EFF}\x{5F00}\x{5F01}\x{5F02}\x{5F03}\x{5F04}\x{5F05}\x{5F06}\x{5F07}' - . '\x{5F08}\x{5F0A}\x{5F0B}\x{5F0C}\x{5F0D}\x{5F0F}\x{5F11}\x{5F12}\x{5F13}' - . '\x{5F14}\x{5F15}\x{5F16}\x{5F17}\x{5F18}\x{5F19}\x{5F1A}\x{5F1B}\x{5F1C}' - . '\x{5F1D}\x{5F1E}\x{5F1F}\x{5F20}\x{5F21}\x{5F22}\x{5F23}\x{5F24}\x{5F25}' - . '\x{5F26}\x{5F27}\x{5F28}\x{5F29}\x{5F2A}\x{5F2B}\x{5F2C}\x{5F2D}\x{5F2E}' - . '\x{5F2F}\x{5F30}\x{5F31}\x{5F32}\x{5F33}\x{5F34}\x{5F35}\x{5F36}\x{5F37}' - . '\x{5F38}\x{5F39}\x{5F3A}\x{5F3C}\x{5F3E}\x{5F3F}\x{5F40}\x{5F41}\x{5F42}' - . '\x{5F43}\x{5F44}\x{5F45}\x{5F46}\x{5F47}\x{5F48}\x{5F49}\x{5F4A}\x{5F4B}' - . '\x{5F4C}\x{5F4D}\x{5F4E}\x{5F4F}\x{5F50}\x{5F51}\x{5F52}\x{5F53}\x{5F54}' - . '\x{5F55}\x{5F56}\x{5F57}\x{5F58}\x{5F59}\x{5F5A}\x{5F5B}\x{5F5C}\x{5F5D}' - . '\x{5F5E}\x{5F5F}\x{5F60}\x{5F61}\x{5F62}\x{5F63}\x{5F64}\x{5F65}\x{5F66}' - . '\x{5F67}\x{5F68}\x{5F69}\x{5F6A}\x{5F6B}\x{5F6C}\x{5F6D}\x{5F6E}\x{5F6F}' - . '\x{5F70}\x{5F71}\x{5F72}\x{5F73}\x{5F74}\x{5F75}\x{5F76}\x{5F77}\x{5F78}' - . '\x{5F79}\x{5F7A}\x{5F7B}\x{5F7C}\x{5F7D}\x{5F7E}\x{5F7F}\x{5F80}\x{5F81}' - . '\x{5F82}\x{5F83}\x{5F84}\x{5F85}\x{5F86}\x{5F87}\x{5F88}\x{5F89}\x{5F8A}' - . '\x{5F8B}\x{5F8C}\x{5F8D}\x{5F8E}\x{5F90}\x{5F91}\x{5F92}\x{5F93}\x{5F94}' - . '\x{5F95}\x{5F96}\x{5F97}\x{5F98}\x{5F99}\x{5F9B}\x{5F9C}\x{5F9D}\x{5F9E}' - . '\x{5F9F}\x{5FA0}\x{5FA1}\x{5FA2}\x{5FA5}\x{5FA6}\x{5FA7}\x{5FA8}\x{5FA9}' - . '\x{5FAA}\x{5FAB}\x{5FAC}\x{5FAD}\x{5FAE}\x{5FAF}\x{5FB1}\x{5FB2}\x{5FB3}' - . '\x{5FB4}\x{5FB5}\x{5FB6}\x{5FB7}\x{5FB8}\x{5FB9}\x{5FBA}\x{5FBB}\x{5FBC}' - . '\x{5FBD}\x{5FBE}\x{5FBF}\x{5FC0}\x{5FC1}\x{5FC3}\x{5FC4}\x{5FC5}\x{5FC6}' - . '\x{5FC7}\x{5FC8}\x{5FC9}\x{5FCA}\x{5FCB}\x{5FCC}\x{5FCD}\x{5FCF}\x{5FD0}' - . '\x{5FD1}\x{5FD2}\x{5FD3}\x{5FD4}\x{5FD5}\x{5FD6}\x{5FD7}\x{5FD8}\x{5FD9}' - . '\x{5FDA}\x{5FDC}\x{5FDD}\x{5FDE}\x{5FE0}\x{5FE1}\x{5FE3}\x{5FE4}\x{5FE5}' - . '\x{5FE6}\x{5FE7}\x{5FE8}\x{5FE9}\x{5FEA}\x{5FEB}\x{5FED}\x{5FEE}\x{5FEF}' - . '\x{5FF0}\x{5FF1}\x{5FF2}\x{5FF3}\x{5FF4}\x{5FF5}\x{5FF6}\x{5FF7}\x{5FF8}' - . '\x{5FF9}\x{5FFA}\x{5FFB}\x{5FFD}\x{5FFE}\x{5FFF}\x{6000}\x{6001}\x{6002}' - . '\x{6003}\x{6004}\x{6005}\x{6006}\x{6007}\x{6008}\x{6009}\x{600A}\x{600B}' - . '\x{600C}\x{600D}\x{600E}\x{600F}\x{6010}\x{6011}\x{6012}\x{6013}\x{6014}' - . '\x{6015}\x{6016}\x{6017}\x{6018}\x{6019}\x{601A}\x{601B}\x{601C}\x{601D}' - . '\x{601E}\x{601F}\x{6020}\x{6021}\x{6022}\x{6024}\x{6025}\x{6026}\x{6027}' - . '\x{6028}\x{6029}\x{602A}\x{602B}\x{602C}\x{602D}\x{602E}\x{602F}\x{6030}' - . '\x{6031}\x{6032}\x{6033}\x{6034}\x{6035}\x{6036}\x{6037}\x{6038}\x{6039}' - . '\x{603A}\x{603B}\x{603C}\x{603D}\x{603E}\x{603F}\x{6040}\x{6041}\x{6042}' - . '\x{6043}\x{6044}\x{6045}\x{6046}\x{6047}\x{6048}\x{6049}\x{604A}\x{604B}' - . '\x{604C}\x{604D}\x{604E}\x{604F}\x{6050}\x{6051}\x{6052}\x{6053}\x{6054}' - . '\x{6055}\x{6057}\x{6058}\x{6059}\x{605A}\x{605B}\x{605C}\x{605D}\x{605E}' - . '\x{605F}\x{6062}\x{6063}\x{6064}\x{6065}\x{6066}\x{6067}\x{6068}\x{6069}' - . '\x{606A}\x{606B}\x{606C}\x{606D}\x{606E}\x{606F}\x{6070}\x{6072}\x{6073}' - . '\x{6075}\x{6076}\x{6077}\x{6078}\x{6079}\x{607A}\x{607B}\x{607C}\x{607D}' - . '\x{607E}\x{607F}\x{6080}\x{6081}\x{6082}\x{6083}\x{6084}\x{6085}\x{6086}' - . '\x{6087}\x{6088}\x{6089}\x{608A}\x{608B}\x{608C}\x{608D}\x{608E}\x{608F}' - . '\x{6090}\x{6092}\x{6094}\x{6095}\x{6096}\x{6097}\x{6098}\x{6099}\x{609A}' - . '\x{609B}\x{609C}\x{609D}\x{609E}\x{609F}\x{60A0}\x{60A1}\x{60A2}\x{60A3}' - . '\x{60A4}\x{60A6}\x{60A7}\x{60A8}\x{60AA}\x{60AB}\x{60AC}\x{60AD}\x{60AE}' - . '\x{60AF}\x{60B0}\x{60B1}\x{60B2}\x{60B3}\x{60B4}\x{60B5}\x{60B6}\x{60B7}' - . '\x{60B8}\x{60B9}\x{60BA}\x{60BB}\x{60BC}\x{60BD}\x{60BE}\x{60BF}\x{60C0}' - . '\x{60C1}\x{60C2}\x{60C3}\x{60C4}\x{60C5}\x{60C6}\x{60C7}\x{60C8}\x{60C9}' - . '\x{60CA}\x{60CB}\x{60CC}\x{60CD}\x{60CE}\x{60CF}\x{60D0}\x{60D1}\x{60D3}' - . '\x{60D4}\x{60D5}\x{60D7}\x{60D8}\x{60D9}\x{60DA}\x{60DB}\x{60DC}\x{60DD}' - . '\x{60DF}\x{60E0}\x{60E1}\x{60E2}\x{60E4}\x{60E6}\x{60E7}\x{60E8}\x{60E9}' - . '\x{60EA}\x{60EB}\x{60EC}\x{60ED}\x{60EE}\x{60EF}\x{60F0}\x{60F1}\x{60F2}' - . '\x{60F3}\x{60F4}\x{60F5}\x{60F6}\x{60F7}\x{60F8}\x{60F9}\x{60FA}\x{60FB}' - . '\x{60FC}\x{60FE}\x{60FF}\x{6100}\x{6101}\x{6103}\x{6104}\x{6105}\x{6106}' - . '\x{6108}\x{6109}\x{610A}\x{610B}\x{610C}\x{610D}\x{610E}\x{610F}\x{6110}' - . '\x{6112}\x{6113}\x{6114}\x{6115}\x{6116}\x{6117}\x{6118}\x{6119}\x{611A}' - . '\x{611B}\x{611C}\x{611D}\x{611F}\x{6120}\x{6122}\x{6123}\x{6124}\x{6125}' - . '\x{6126}\x{6127}\x{6128}\x{6129}\x{612A}\x{612B}\x{612C}\x{612D}\x{612E}' - . '\x{612F}\x{6130}\x{6132}\x{6134}\x{6136}\x{6137}\x{613A}\x{613B}\x{613C}' - . '\x{613D}\x{613E}\x{613F}\x{6140}\x{6141}\x{6142}\x{6143}\x{6144}\x{6145}' - . '\x{6146}\x{6147}\x{6148}\x{6149}\x{614A}\x{614B}\x{614C}\x{614D}\x{614E}' - . '\x{614F}\x{6150}\x{6151}\x{6152}\x{6153}\x{6154}\x{6155}\x{6156}\x{6157}' - . '\x{6158}\x{6159}\x{615A}\x{615B}\x{615C}\x{615D}\x{615E}\x{615F}\x{6161}' - . '\x{6162}\x{6163}\x{6164}\x{6165}\x{6166}\x{6167}\x{6168}\x{6169}\x{616A}' - . '\x{616B}\x{616C}\x{616D}\x{616E}\x{6170}\x{6171}\x{6172}\x{6173}\x{6174}' - . '\x{6175}\x{6176}\x{6177}\x{6178}\x{6179}\x{617A}\x{617C}\x{617E}\x{6180}' - . '\x{6181}\x{6182}\x{6183}\x{6184}\x{6185}\x{6187}\x{6188}\x{6189}\x{618A}' - . '\x{618B}\x{618C}\x{618D}\x{618E}\x{618F}\x{6190}\x{6191}\x{6192}\x{6193}' - . '\x{6194}\x{6195}\x{6196}\x{6198}\x{6199}\x{619A}\x{619B}\x{619D}\x{619E}' - . '\x{619F}\x{61A0}\x{61A1}\x{61A2}\x{61A3}\x{61A4}\x{61A5}\x{61A6}\x{61A7}' - . '\x{61A8}\x{61A9}\x{61AA}\x{61AB}\x{61AC}\x{61AD}\x{61AE}\x{61AF}\x{61B0}' - . '\x{61B1}\x{61B2}\x{61B3}\x{61B4}\x{61B5}\x{61B6}\x{61B7}\x{61B8}\x{61BA}' - . '\x{61BC}\x{61BD}\x{61BE}\x{61BF}\x{61C0}\x{61C1}\x{61C2}\x{61C3}\x{61C4}' - . '\x{61C5}\x{61C6}\x{61C7}\x{61C8}\x{61C9}\x{61CA}\x{61CB}\x{61CC}\x{61CD}' - . '\x{61CE}\x{61CF}\x{61D0}\x{61D1}\x{61D2}\x{61D4}\x{61D6}\x{61D7}\x{61D8}' - . '\x{61D9}\x{61DA}\x{61DB}\x{61DC}\x{61DD}\x{61DE}\x{61DF}\x{61E0}\x{61E1}' - . '\x{61E2}\x{61E3}\x{61E4}\x{61E5}\x{61E6}\x{61E7}\x{61E8}\x{61E9}\x{61EA}' - . '\x{61EB}\x{61ED}\x{61EE}\x{61F0}\x{61F1}\x{61F2}\x{61F3}\x{61F5}\x{61F6}' - . '\x{61F7}\x{61F8}\x{61F9}\x{61FA}\x{61FB}\x{61FC}\x{61FD}\x{61FE}\x{61FF}' - . '\x{6200}\x{6201}\x{6202}\x{6203}\x{6204}\x{6206}\x{6207}\x{6208}\x{6209}' - . '\x{620A}\x{620B}\x{620C}\x{620D}\x{620E}\x{620F}\x{6210}\x{6211}\x{6212}' - . '\x{6213}\x{6214}\x{6215}\x{6216}\x{6217}\x{6218}\x{6219}\x{621A}\x{621B}' - . '\x{621C}\x{621D}\x{621E}\x{621F}\x{6220}\x{6221}\x{6222}\x{6223}\x{6224}' - . '\x{6225}\x{6226}\x{6227}\x{6228}\x{6229}\x{622A}\x{622B}\x{622C}\x{622D}' - . '\x{622E}\x{622F}\x{6230}\x{6231}\x{6232}\x{6233}\x{6234}\x{6236}\x{6237}' - . '\x{6238}\x{623A}\x{623B}\x{623C}\x{623D}\x{623E}\x{623F}\x{6240}\x{6241}' - . '\x{6242}\x{6243}\x{6244}\x{6245}\x{6246}\x{6247}\x{6248}\x{6249}\x{624A}' - . '\x{624B}\x{624C}\x{624D}\x{624E}\x{624F}\x{6250}\x{6251}\x{6252}\x{6253}' - . '\x{6254}\x{6255}\x{6256}\x{6258}\x{6259}\x{625A}\x{625B}\x{625C}\x{625D}' - . '\x{625E}\x{625F}\x{6260}\x{6261}\x{6262}\x{6263}\x{6264}\x{6265}\x{6266}' - . '\x{6267}\x{6268}\x{6269}\x{626A}\x{626B}\x{626C}\x{626D}\x{626E}\x{626F}' - . '\x{6270}\x{6271}\x{6272}\x{6273}\x{6274}\x{6275}\x{6276}\x{6277}\x{6278}' - . '\x{6279}\x{627A}\x{627B}\x{627C}\x{627D}\x{627E}\x{627F}\x{6280}\x{6281}' - . '\x{6283}\x{6284}\x{6285}\x{6286}\x{6287}\x{6288}\x{6289}\x{628A}\x{628B}' - . '\x{628C}\x{628E}\x{628F}\x{6290}\x{6291}\x{6292}\x{6293}\x{6294}\x{6295}' - . '\x{6296}\x{6297}\x{6298}\x{6299}\x{629A}\x{629B}\x{629C}\x{629E}\x{629F}' - . '\x{62A0}\x{62A1}\x{62A2}\x{62A3}\x{62A4}\x{62A5}\x{62A7}\x{62A8}\x{62A9}' - . '\x{62AA}\x{62AB}\x{62AC}\x{62AD}\x{62AE}\x{62AF}\x{62B0}\x{62B1}\x{62B2}' - . '\x{62B3}\x{62B4}\x{62B5}\x{62B6}\x{62B7}\x{62B8}\x{62B9}\x{62BA}\x{62BB}' - . '\x{62BC}\x{62BD}\x{62BE}\x{62BF}\x{62C0}\x{62C1}\x{62C2}\x{62C3}\x{62C4}' - . '\x{62C5}\x{62C6}\x{62C7}\x{62C8}\x{62C9}\x{62CA}\x{62CB}\x{62CC}\x{62CD}' - . '\x{62CE}\x{62CF}\x{62D0}\x{62D1}\x{62D2}\x{62D3}\x{62D4}\x{62D5}\x{62D6}' - . '\x{62D7}\x{62D8}\x{62D9}\x{62DA}\x{62DB}\x{62DC}\x{62DD}\x{62DF}\x{62E0}' - . '\x{62E1}\x{62E2}\x{62E3}\x{62E4}\x{62E5}\x{62E6}\x{62E7}\x{62E8}\x{62E9}' - . '\x{62EB}\x{62EC}\x{62ED}\x{62EE}\x{62EF}\x{62F0}\x{62F1}\x{62F2}\x{62F3}' - . '\x{62F4}\x{62F5}\x{62F6}\x{62F7}\x{62F8}\x{62F9}\x{62FA}\x{62FB}\x{62FC}' - . '\x{62FD}\x{62FE}\x{62FF}\x{6300}\x{6301}\x{6302}\x{6303}\x{6304}\x{6305}' - . '\x{6306}\x{6307}\x{6308}\x{6309}\x{630B}\x{630C}\x{630D}\x{630E}\x{630F}' - . '\x{6310}\x{6311}\x{6312}\x{6313}\x{6314}\x{6315}\x{6316}\x{6318}\x{6319}' - . '\x{631A}\x{631B}\x{631C}\x{631D}\x{631E}\x{631F}\x{6320}\x{6321}\x{6322}' - . '\x{6323}\x{6324}\x{6325}\x{6326}\x{6327}\x{6328}\x{6329}\x{632A}\x{632B}' - . '\x{632C}\x{632D}\x{632E}\x{632F}\x{6330}\x{6332}\x{6333}\x{6334}\x{6336}' - . '\x{6338}\x{6339}\x{633A}\x{633B}\x{633C}\x{633D}\x{633E}\x{6340}\x{6341}' - . '\x{6342}\x{6343}\x{6344}\x{6345}\x{6346}\x{6347}\x{6348}\x{6349}\x{634A}' - . '\x{634B}\x{634C}\x{634D}\x{634E}\x{634F}\x{6350}\x{6351}\x{6352}\x{6353}' - . '\x{6354}\x{6355}\x{6356}\x{6357}\x{6358}\x{6359}\x{635A}\x{635C}\x{635D}' - . '\x{635E}\x{635F}\x{6360}\x{6361}\x{6362}\x{6363}\x{6364}\x{6365}\x{6366}' - . '\x{6367}\x{6368}\x{6369}\x{636A}\x{636B}\x{636C}\x{636D}\x{636E}\x{636F}' - . '\x{6370}\x{6371}\x{6372}\x{6373}\x{6374}\x{6375}\x{6376}\x{6377}\x{6378}' - . '\x{6379}\x{637A}\x{637B}\x{637C}\x{637D}\x{637E}\x{6380}\x{6381}\x{6382}' - . '\x{6383}\x{6384}\x{6385}\x{6386}\x{6387}\x{6388}\x{6389}\x{638A}\x{638C}' - . '\x{638D}\x{638E}\x{638F}\x{6390}\x{6391}\x{6392}\x{6394}\x{6395}\x{6396}' - . '\x{6397}\x{6398}\x{6399}\x{639A}\x{639B}\x{639C}\x{639D}\x{639E}\x{639F}' - . '\x{63A0}\x{63A1}\x{63A2}\x{63A3}\x{63A4}\x{63A5}\x{63A6}\x{63A7}\x{63A8}' - . '\x{63A9}\x{63AA}\x{63AB}\x{63AC}\x{63AD}\x{63AE}\x{63AF}\x{63B0}\x{63B1}' - . '\x{63B2}\x{63B3}\x{63B4}\x{63B5}\x{63B6}\x{63B7}\x{63B8}\x{63B9}\x{63BA}' - . '\x{63BC}\x{63BD}\x{63BE}\x{63BF}\x{63C0}\x{63C1}\x{63C2}\x{63C3}\x{63C4}' - . '\x{63C5}\x{63C6}\x{63C7}\x{63C8}\x{63C9}\x{63CA}\x{63CB}\x{63CC}\x{63CD}' - . '\x{63CE}\x{63CF}\x{63D0}\x{63D2}\x{63D3}\x{63D4}\x{63D5}\x{63D6}\x{63D7}' - . '\x{63D8}\x{63D9}\x{63DA}\x{63DB}\x{63DC}\x{63DD}\x{63DE}\x{63DF}\x{63E0}' - . '\x{63E1}\x{63E2}\x{63E3}\x{63E4}\x{63E5}\x{63E6}\x{63E7}\x{63E8}\x{63E9}' - . '\x{63EA}\x{63EB}\x{63EC}\x{63ED}\x{63EE}\x{63EF}\x{63F0}\x{63F1}\x{63F2}' - . '\x{63F3}\x{63F4}\x{63F5}\x{63F6}\x{63F7}\x{63F8}\x{63F9}\x{63FA}\x{63FB}' - . '\x{63FC}\x{63FD}\x{63FE}\x{63FF}\x{6400}\x{6401}\x{6402}\x{6403}\x{6404}' - . '\x{6405}\x{6406}\x{6408}\x{6409}\x{640A}\x{640B}\x{640C}\x{640D}\x{640E}' - . '\x{640F}\x{6410}\x{6411}\x{6412}\x{6413}\x{6414}\x{6415}\x{6416}\x{6417}' - . '\x{6418}\x{6419}\x{641A}\x{641B}\x{641C}\x{641D}\x{641E}\x{641F}\x{6420}' - . '\x{6421}\x{6422}\x{6423}\x{6424}\x{6425}\x{6426}\x{6427}\x{6428}\x{6429}' - . '\x{642A}\x{642B}\x{642C}\x{642D}\x{642E}\x{642F}\x{6430}\x{6431}\x{6432}' - . '\x{6433}\x{6434}\x{6435}\x{6436}\x{6437}\x{6438}\x{6439}\x{643A}\x{643D}' - . '\x{643E}\x{643F}\x{6440}\x{6441}\x{6443}\x{6444}\x{6445}\x{6446}\x{6447}' - . '\x{6448}\x{644A}\x{644B}\x{644C}\x{644D}\x{644E}\x{644F}\x{6450}\x{6451}' - . '\x{6452}\x{6453}\x{6454}\x{6455}\x{6456}\x{6457}\x{6458}\x{6459}\x{645B}' - . '\x{645C}\x{645D}\x{645E}\x{645F}\x{6460}\x{6461}\x{6462}\x{6463}\x{6464}' - . '\x{6465}\x{6466}\x{6467}\x{6468}\x{6469}\x{646A}\x{646B}\x{646C}\x{646D}' - . '\x{646E}\x{646F}\x{6470}\x{6471}\x{6472}\x{6473}\x{6474}\x{6475}\x{6476}' - . '\x{6477}\x{6478}\x{6479}\x{647A}\x{647B}\x{647C}\x{647D}\x{647F}\x{6480}' - . '\x{6481}\x{6482}\x{6483}\x{6484}\x{6485}\x{6487}\x{6488}\x{6489}\x{648A}' - . '\x{648B}\x{648C}\x{648D}\x{648E}\x{648F}\x{6490}\x{6491}\x{6492}\x{6493}' - . '\x{6494}\x{6495}\x{6496}\x{6497}\x{6498}\x{6499}\x{649A}\x{649B}\x{649C}' - . '\x{649D}\x{649E}\x{649F}\x{64A0}\x{64A2}\x{64A3}\x{64A4}\x{64A5}\x{64A6}' - . '\x{64A7}\x{64A8}\x{64A9}\x{64AA}\x{64AB}\x{64AC}\x{64AD}\x{64AE}\x{64B0}' - . '\x{64B1}\x{64B2}\x{64B3}\x{64B4}\x{64B5}\x{64B7}\x{64B8}\x{64B9}\x{64BA}' - . '\x{64BB}\x{64BC}\x{64BD}\x{64BE}\x{64BF}\x{64C0}\x{64C1}\x{64C2}\x{64C3}' - . '\x{64C4}\x{64C5}\x{64C6}\x{64C7}\x{64C9}\x{64CA}\x{64CB}\x{64CC}\x{64CD}' - . '\x{64CE}\x{64CF}\x{64D0}\x{64D1}\x{64D2}\x{64D3}\x{64D4}\x{64D6}\x{64D7}' - . '\x{64D8}\x{64D9}\x{64DA}\x{64DB}\x{64DC}\x{64DD}\x{64DE}\x{64DF}\x{64E0}' - . '\x{64E2}\x{64E3}\x{64E4}\x{64E6}\x{64E7}\x{64E8}\x{64E9}\x{64EA}\x{64EB}' - . '\x{64EC}\x{64ED}\x{64EF}\x{64F0}\x{64F1}\x{64F2}\x{64F3}\x{64F4}\x{64F6}' - . '\x{64F7}\x{64F8}\x{64FA}\x{64FB}\x{64FC}\x{64FD}\x{64FE}\x{64FF}\x{6500}' - . '\x{6501}\x{6503}\x{6504}\x{6505}\x{6506}\x{6507}\x{6508}\x{6509}\x{650B}' - . '\x{650C}\x{650D}\x{650E}\x{650F}\x{6510}\x{6511}\x{6512}\x{6513}\x{6514}' - . '\x{6515}\x{6516}\x{6517}\x{6518}\x{6519}\x{651A}\x{651B}\x{651C}\x{651D}' - . '\x{651E}\x{6520}\x{6521}\x{6522}\x{6523}\x{6524}\x{6525}\x{6526}\x{6527}' - . '\x{6529}\x{652A}\x{652B}\x{652C}\x{652D}\x{652E}\x{652F}\x{6530}\x{6531}' - . '\x{6532}\x{6533}\x{6534}\x{6535}\x{6536}\x{6537}\x{6538}\x{6539}\x{653A}' - . '\x{653B}\x{653C}\x{653D}\x{653E}\x{653F}\x{6541}\x{6543}\x{6544}\x{6545}' - . '\x{6546}\x{6547}\x{6548}\x{6549}\x{654A}\x{654B}\x{654C}\x{654D}\x{654E}' - . '\x{654F}\x{6550}\x{6551}\x{6552}\x{6553}\x{6554}\x{6555}\x{6556}\x{6557}' - . '\x{6558}\x{6559}\x{655B}\x{655C}\x{655D}\x{655E}\x{6560}\x{6561}\x{6562}' - . '\x{6563}\x{6564}\x{6565}\x{6566}\x{6567}\x{6568}\x{6569}\x{656A}\x{656B}' - . '\x{656C}\x{656E}\x{656F}\x{6570}\x{6571}\x{6572}\x{6573}\x{6574}\x{6575}' - . '\x{6576}\x{6577}\x{6578}\x{6579}\x{657A}\x{657B}\x{657C}\x{657E}\x{657F}' - . '\x{6580}\x{6581}\x{6582}\x{6583}\x{6584}\x{6585}\x{6586}\x{6587}\x{6588}' - . '\x{6589}\x{658B}\x{658C}\x{658D}\x{658E}\x{658F}\x{6590}\x{6591}\x{6592}' - . '\x{6593}\x{6594}\x{6595}\x{6596}\x{6597}\x{6598}\x{6599}\x{659B}\x{659C}' - . '\x{659D}\x{659E}\x{659F}\x{65A0}\x{65A1}\x{65A2}\x{65A3}\x{65A4}\x{65A5}' - . '\x{65A6}\x{65A7}\x{65A8}\x{65A9}\x{65AA}\x{65AB}\x{65AC}\x{65AD}\x{65AE}' - . '\x{65AF}\x{65B0}\x{65B1}\x{65B2}\x{65B3}\x{65B4}\x{65B6}\x{65B7}\x{65B8}' - . '\x{65B9}\x{65BA}\x{65BB}\x{65BC}\x{65BD}\x{65BF}\x{65C0}\x{65C1}\x{65C2}' - . '\x{65C3}\x{65C4}\x{65C5}\x{65C6}\x{65C7}\x{65CA}\x{65CB}\x{65CC}\x{65CD}' - . '\x{65CE}\x{65CF}\x{65D0}\x{65D2}\x{65D3}\x{65D4}\x{65D5}\x{65D6}\x{65D7}' - . '\x{65DA}\x{65DB}\x{65DD}\x{65DE}\x{65DF}\x{65E0}\x{65E1}\x{65E2}\x{65E3}' - . '\x{65E5}\x{65E6}\x{65E7}\x{65E8}\x{65E9}\x{65EB}\x{65EC}\x{65ED}\x{65EE}' - . '\x{65EF}\x{65F0}\x{65F1}\x{65F2}\x{65F3}\x{65F4}\x{65F5}\x{65F6}\x{65F7}' - . '\x{65F8}\x{65FA}\x{65FB}\x{65FC}\x{65FD}\x{6600}\x{6601}\x{6602}\x{6603}' - . '\x{6604}\x{6605}\x{6606}\x{6607}\x{6608}\x{6609}\x{660A}\x{660B}\x{660C}' - . '\x{660D}\x{660E}\x{660F}\x{6610}\x{6611}\x{6612}\x{6613}\x{6614}\x{6615}' - . '\x{6616}\x{6618}\x{6619}\x{661A}\x{661B}\x{661C}\x{661D}\x{661F}\x{6620}' - . '\x{6621}\x{6622}\x{6623}\x{6624}\x{6625}\x{6626}\x{6627}\x{6628}\x{6629}' - . '\x{662A}\x{662B}\x{662D}\x{662E}\x{662F}\x{6630}\x{6631}\x{6632}\x{6633}' - . '\x{6634}\x{6635}\x{6636}\x{6639}\x{663A}\x{663C}\x{663D}\x{663E}\x{6640}' - . '\x{6641}\x{6642}\x{6643}\x{6644}\x{6645}\x{6646}\x{6647}\x{6649}\x{664A}' - . '\x{664B}\x{664C}\x{664E}\x{664F}\x{6650}\x{6651}\x{6652}\x{6653}\x{6654}' - . '\x{6655}\x{6656}\x{6657}\x{6658}\x{6659}\x{665A}\x{665B}\x{665C}\x{665D}' - . '\x{665E}\x{665F}\x{6661}\x{6662}\x{6664}\x{6665}\x{6666}\x{6668}\x{6669}' - . '\x{666A}\x{666B}\x{666C}\x{666D}\x{666E}\x{666F}\x{6670}\x{6671}\x{6672}' - . '\x{6673}\x{6674}\x{6675}\x{6676}\x{6677}\x{6678}\x{6679}\x{667A}\x{667B}' - . '\x{667C}\x{667D}\x{667E}\x{667F}\x{6680}\x{6681}\x{6682}\x{6683}\x{6684}' - . '\x{6685}\x{6686}\x{6687}\x{6688}\x{6689}\x{668A}\x{668B}\x{668C}\x{668D}' - . '\x{668E}\x{668F}\x{6690}\x{6691}\x{6693}\x{6694}\x{6695}\x{6696}\x{6697}' - . '\x{6698}\x{6699}\x{669A}\x{669B}\x{669D}\x{669F}\x{66A0}\x{66A1}\x{66A2}' - . '\x{66A3}\x{66A4}\x{66A5}\x{66A6}\x{66A7}\x{66A8}\x{66A9}\x{66AA}\x{66AB}' - . '\x{66AE}\x{66AF}\x{66B0}\x{66B1}\x{66B2}\x{66B3}\x{66B4}\x{66B5}\x{66B6}' - . '\x{66B7}\x{66B8}\x{66B9}\x{66BA}\x{66BB}\x{66BC}\x{66BD}\x{66BE}\x{66BF}' - . '\x{66C0}\x{66C1}\x{66C2}\x{66C3}\x{66C4}\x{66C5}\x{66C6}\x{66C7}\x{66C8}' - . '\x{66C9}\x{66CA}\x{66CB}\x{66CC}\x{66CD}\x{66CE}\x{66CF}\x{66D1}\x{66D2}' - . '\x{66D4}\x{66D5}\x{66D6}\x{66D8}\x{66D9}\x{66DA}\x{66DB}\x{66DC}\x{66DD}' - . '\x{66DE}\x{66E0}\x{66E1}\x{66E2}\x{66E3}\x{66E4}\x{66E5}\x{66E6}\x{66E7}' - . '\x{66E8}\x{66E9}\x{66EA}\x{66EB}\x{66EC}\x{66ED}\x{66EE}\x{66F0}\x{66F1}' - . '\x{66F2}\x{66F3}\x{66F4}\x{66F5}\x{66F6}\x{66F7}\x{66F8}\x{66F9}\x{66FA}' - . '\x{66FB}\x{66FC}\x{66FE}\x{66FF}\x{6700}\x{6701}\x{6703}\x{6704}\x{6705}' - . '\x{6706}\x{6708}\x{6709}\x{670A}\x{670B}\x{670C}\x{670D}\x{670E}\x{670F}' - . '\x{6710}\x{6711}\x{6712}\x{6713}\x{6714}\x{6715}\x{6716}\x{6717}\x{6718}' - . '\x{671A}\x{671B}\x{671C}\x{671D}\x{671E}\x{671F}\x{6720}\x{6721}\x{6722}' - . '\x{6723}\x{6725}\x{6726}\x{6727}\x{6728}\x{672A}\x{672B}\x{672C}\x{672D}' - . '\x{672E}\x{672F}\x{6730}\x{6731}\x{6732}\x{6733}\x{6734}\x{6735}\x{6736}' - . '\x{6737}\x{6738}\x{6739}\x{673A}\x{673B}\x{673C}\x{673D}\x{673E}\x{673F}' - . '\x{6740}\x{6741}\x{6742}\x{6743}\x{6744}\x{6745}\x{6746}\x{6747}\x{6748}' - . '\x{6749}\x{674A}\x{674B}\x{674C}\x{674D}\x{674E}\x{674F}\x{6750}\x{6751}' - . '\x{6752}\x{6753}\x{6754}\x{6755}\x{6756}\x{6757}\x{6758}\x{6759}\x{675A}' - . '\x{675B}\x{675C}\x{675D}\x{675E}\x{675F}\x{6760}\x{6761}\x{6762}\x{6763}' - . '\x{6764}\x{6765}\x{6766}\x{6768}\x{6769}\x{676A}\x{676B}\x{676C}\x{676D}' - . '\x{676E}\x{676F}\x{6770}\x{6771}\x{6772}\x{6773}\x{6774}\x{6775}\x{6776}' - . '\x{6777}\x{6778}\x{6779}\x{677A}\x{677B}\x{677C}\x{677D}\x{677E}\x{677F}' - . '\x{6780}\x{6781}\x{6782}\x{6783}\x{6784}\x{6785}\x{6786}\x{6787}\x{6789}' - . '\x{678A}\x{678B}\x{678C}\x{678D}\x{678E}\x{678F}\x{6790}\x{6791}\x{6792}' - . '\x{6793}\x{6794}\x{6795}\x{6797}\x{6798}\x{6799}\x{679A}\x{679B}\x{679C}' - . '\x{679D}\x{679E}\x{679F}\x{67A0}\x{67A1}\x{67A2}\x{67A3}\x{67A4}\x{67A5}' - . '\x{67A6}\x{67A7}\x{67A8}\x{67AA}\x{67AB}\x{67AC}\x{67AD}\x{67AE}\x{67AF}' - . '\x{67B0}\x{67B1}\x{67B2}\x{67B3}\x{67B4}\x{67B5}\x{67B6}\x{67B7}\x{67B8}' - . '\x{67B9}\x{67BA}\x{67BB}\x{67BC}\x{67BE}\x{67C0}\x{67C1}\x{67C2}\x{67C3}' - . '\x{67C4}\x{67C5}\x{67C6}\x{67C7}\x{67C8}\x{67C9}\x{67CA}\x{67CB}\x{67CC}' - . '\x{67CD}\x{67CE}\x{67CF}\x{67D0}\x{67D1}\x{67D2}\x{67D3}\x{67D4}\x{67D6}' - . '\x{67D8}\x{67D9}\x{67DA}\x{67DB}\x{67DC}\x{67DD}\x{67DE}\x{67DF}\x{67E0}' - . '\x{67E1}\x{67E2}\x{67E3}\x{67E4}\x{67E5}\x{67E6}\x{67E7}\x{67E8}\x{67E9}' - . '\x{67EA}\x{67EB}\x{67EC}\x{67ED}\x{67EE}\x{67EF}\x{67F0}\x{67F1}\x{67F2}' - . '\x{67F3}\x{67F4}\x{67F5}\x{67F6}\x{67F7}\x{67F8}\x{67FA}\x{67FB}\x{67FC}' - . '\x{67FD}\x{67FE}\x{67FF}\x{6800}\x{6802}\x{6803}\x{6804}\x{6805}\x{6806}' - . '\x{6807}\x{6808}\x{6809}\x{680A}\x{680B}\x{680C}\x{680D}\x{680E}\x{680F}' - . '\x{6810}\x{6811}\x{6812}\x{6813}\x{6814}\x{6816}\x{6817}\x{6818}\x{6819}' - . '\x{681A}\x{681B}\x{681C}\x{681D}\x{681F}\x{6820}\x{6821}\x{6822}\x{6823}' - . '\x{6824}\x{6825}\x{6826}\x{6828}\x{6829}\x{682A}\x{682B}\x{682C}\x{682D}' - . '\x{682E}\x{682F}\x{6831}\x{6832}\x{6833}\x{6834}\x{6835}\x{6836}\x{6837}' - . '\x{6838}\x{6839}\x{683A}\x{683B}\x{683C}\x{683D}\x{683E}\x{683F}\x{6840}' - . '\x{6841}\x{6842}\x{6843}\x{6844}\x{6845}\x{6846}\x{6847}\x{6848}\x{6849}' - . '\x{684A}\x{684B}\x{684C}\x{684D}\x{684E}\x{684F}\x{6850}\x{6851}\x{6852}' - . '\x{6853}\x{6854}\x{6855}\x{6856}\x{6857}\x{685B}\x{685D}\x{6860}\x{6861}' - . '\x{6862}\x{6863}\x{6864}\x{6865}\x{6866}\x{6867}\x{6868}\x{6869}\x{686A}' - . '\x{686B}\x{686C}\x{686D}\x{686E}\x{686F}\x{6870}\x{6871}\x{6872}\x{6873}' - . '\x{6874}\x{6875}\x{6876}\x{6877}\x{6878}\x{6879}\x{687B}\x{687C}\x{687D}' - . '\x{687E}\x{687F}\x{6880}\x{6881}\x{6882}\x{6883}\x{6884}\x{6885}\x{6886}' - . '\x{6887}\x{6888}\x{6889}\x{688A}\x{688B}\x{688C}\x{688D}\x{688E}\x{688F}' - . '\x{6890}\x{6891}\x{6892}\x{6893}\x{6894}\x{6896}\x{6897}\x{6898}\x{689A}' - . '\x{689B}\x{689C}\x{689D}\x{689E}\x{689F}\x{68A0}\x{68A1}\x{68A2}\x{68A3}' - . '\x{68A4}\x{68A6}\x{68A7}\x{68A8}\x{68A9}\x{68AA}\x{68AB}\x{68AC}\x{68AD}' - . '\x{68AE}\x{68AF}\x{68B0}\x{68B1}\x{68B2}\x{68B3}\x{68B4}\x{68B5}\x{68B6}' - . '\x{68B7}\x{68B9}\x{68BB}\x{68BC}\x{68BD}\x{68BE}\x{68BF}\x{68C0}\x{68C1}' - . '\x{68C2}\x{68C4}\x{68C6}\x{68C7}\x{68C8}\x{68C9}\x{68CA}\x{68CB}\x{68CC}' - . '\x{68CD}\x{68CE}\x{68CF}\x{68D0}\x{68D1}\x{68D2}\x{68D3}\x{68D4}\x{68D5}' - . '\x{68D6}\x{68D7}\x{68D8}\x{68DA}\x{68DB}\x{68DC}\x{68DD}\x{68DE}\x{68DF}' - . '\x{68E0}\x{68E1}\x{68E3}\x{68E4}\x{68E6}\x{68E7}\x{68E8}\x{68E9}\x{68EA}' - . '\x{68EB}\x{68EC}\x{68ED}\x{68EE}\x{68EF}\x{68F0}\x{68F1}\x{68F2}\x{68F3}' - . '\x{68F4}\x{68F5}\x{68F6}\x{68F7}\x{68F8}\x{68F9}\x{68FA}\x{68FB}\x{68FC}' - . '\x{68FD}\x{68FE}\x{68FF}\x{6901}\x{6902}\x{6903}\x{6904}\x{6905}\x{6906}' - . '\x{6907}\x{6908}\x{690A}\x{690B}\x{690C}\x{690D}\x{690E}\x{690F}\x{6910}' - . '\x{6911}\x{6912}\x{6913}\x{6914}\x{6915}\x{6916}\x{6917}\x{6918}\x{6919}' - . '\x{691A}\x{691B}\x{691C}\x{691D}\x{691E}\x{691F}\x{6920}\x{6921}\x{6922}' - . '\x{6923}\x{6924}\x{6925}\x{6926}\x{6927}\x{6928}\x{6929}\x{692A}\x{692B}' - . '\x{692C}\x{692D}\x{692E}\x{692F}\x{6930}\x{6931}\x{6932}\x{6933}\x{6934}' - . '\x{6935}\x{6936}\x{6937}\x{6938}\x{6939}\x{693A}\x{693B}\x{693C}\x{693D}' - . '\x{693F}\x{6940}\x{6941}\x{6942}\x{6943}\x{6944}\x{6945}\x{6946}\x{6947}' - . '\x{6948}\x{6949}\x{694A}\x{694B}\x{694C}\x{694E}\x{694F}\x{6950}\x{6951}' - . '\x{6952}\x{6953}\x{6954}\x{6955}\x{6956}\x{6957}\x{6958}\x{6959}\x{695A}' - . '\x{695B}\x{695C}\x{695D}\x{695E}\x{695F}\x{6960}\x{6961}\x{6962}\x{6963}' - . '\x{6964}\x{6965}\x{6966}\x{6967}\x{6968}\x{6969}\x{696A}\x{696B}\x{696C}' - . '\x{696D}\x{696E}\x{696F}\x{6970}\x{6971}\x{6972}\x{6973}\x{6974}\x{6975}' - . '\x{6976}\x{6977}\x{6978}\x{6979}\x{697A}\x{697B}\x{697C}\x{697D}\x{697E}' - . '\x{697F}\x{6980}\x{6981}\x{6982}\x{6983}\x{6984}\x{6985}\x{6986}\x{6987}' - . '\x{6988}\x{6989}\x{698A}\x{698B}\x{698C}\x{698D}\x{698E}\x{698F}\x{6990}' - . '\x{6991}\x{6992}\x{6993}\x{6994}\x{6995}\x{6996}\x{6997}\x{6998}\x{6999}' - . '\x{699A}\x{699B}\x{699C}\x{699D}\x{699E}\x{69A0}\x{69A1}\x{69A3}\x{69A4}' - . '\x{69A5}\x{69A6}\x{69A7}\x{69A8}\x{69A9}\x{69AA}\x{69AB}\x{69AC}\x{69AD}' - . '\x{69AE}\x{69AF}\x{69B0}\x{69B1}\x{69B2}\x{69B3}\x{69B4}\x{69B5}\x{69B6}' - . '\x{69B7}\x{69B8}\x{69B9}\x{69BA}\x{69BB}\x{69BC}\x{69BD}\x{69BE}\x{69BF}' - . '\x{69C1}\x{69C2}\x{69C3}\x{69C4}\x{69C5}\x{69C6}\x{69C7}\x{69C8}\x{69C9}' - . '\x{69CA}\x{69CB}\x{69CC}\x{69CD}\x{69CE}\x{69CF}\x{69D0}\x{69D3}\x{69D4}' - . '\x{69D8}\x{69D9}\x{69DA}\x{69DB}\x{69DC}\x{69DD}\x{69DE}\x{69DF}\x{69E0}' - . '\x{69E1}\x{69E2}\x{69E3}\x{69E4}\x{69E5}\x{69E6}\x{69E7}\x{69E8}\x{69E9}' - . '\x{69EA}\x{69EB}\x{69EC}\x{69ED}\x{69EE}\x{69EF}\x{69F0}\x{69F1}\x{69F2}' - . '\x{69F3}\x{69F4}\x{69F5}\x{69F6}\x{69F7}\x{69F8}\x{69FA}\x{69FB}\x{69FC}' - . '\x{69FD}\x{69FE}\x{69FF}\x{6A00}\x{6A01}\x{6A02}\x{6A04}\x{6A05}\x{6A06}' - . '\x{6A07}\x{6A08}\x{6A09}\x{6A0A}\x{6A0B}\x{6A0D}\x{6A0E}\x{6A0F}\x{6A10}' - . '\x{6A11}\x{6A12}\x{6A13}\x{6A14}\x{6A15}\x{6A16}\x{6A17}\x{6A18}\x{6A19}' - . '\x{6A1A}\x{6A1B}\x{6A1D}\x{6A1E}\x{6A1F}\x{6A20}\x{6A21}\x{6A22}\x{6A23}' - . '\x{6A25}\x{6A26}\x{6A27}\x{6A28}\x{6A29}\x{6A2A}\x{6A2B}\x{6A2C}\x{6A2D}' - . '\x{6A2E}\x{6A2F}\x{6A30}\x{6A31}\x{6A32}\x{6A33}\x{6A34}\x{6A35}\x{6A36}' - . '\x{6A38}\x{6A39}\x{6A3A}\x{6A3B}\x{6A3C}\x{6A3D}\x{6A3E}\x{6A3F}\x{6A40}' - . '\x{6A41}\x{6A42}\x{6A43}\x{6A44}\x{6A45}\x{6A46}\x{6A47}\x{6A48}\x{6A49}' - . '\x{6A4B}\x{6A4C}\x{6A4D}\x{6A4E}\x{6A4F}\x{6A50}\x{6A51}\x{6A52}\x{6A54}' - . '\x{6A55}\x{6A56}\x{6A57}\x{6A58}\x{6A59}\x{6A5A}\x{6A5B}\x{6A5D}\x{6A5E}' - . '\x{6A5F}\x{6A60}\x{6A61}\x{6A62}\x{6A63}\x{6A64}\x{6A65}\x{6A66}\x{6A67}' - . '\x{6A68}\x{6A69}\x{6A6A}\x{6A6B}\x{6A6C}\x{6A6D}\x{6A6F}\x{6A71}\x{6A72}' - . '\x{6A73}\x{6A74}\x{6A75}\x{6A76}\x{6A77}\x{6A78}\x{6A79}\x{6A7A}\x{6A7B}' - . '\x{6A7C}\x{6A7D}\x{6A7E}\x{6A7F}\x{6A80}\x{6A81}\x{6A82}\x{6A83}\x{6A84}' - . '\x{6A85}\x{6A87}\x{6A88}\x{6A89}\x{6A8B}\x{6A8C}\x{6A8D}\x{6A8E}\x{6A90}' - . '\x{6A91}\x{6A92}\x{6A93}\x{6A94}\x{6A95}\x{6A96}\x{6A97}\x{6A98}\x{6A9A}' - . '\x{6A9B}\x{6A9C}\x{6A9E}\x{6A9F}\x{6AA0}\x{6AA1}\x{6AA2}\x{6AA3}\x{6AA4}' - . '\x{6AA5}\x{6AA6}\x{6AA7}\x{6AA8}\x{6AA9}\x{6AAB}\x{6AAC}\x{6AAD}\x{6AAE}' - . '\x{6AAF}\x{6AB0}\x{6AB2}\x{6AB3}\x{6AB4}\x{6AB5}\x{6AB6}\x{6AB7}\x{6AB8}' - . '\x{6AB9}\x{6ABA}\x{6ABB}\x{6ABC}\x{6ABD}\x{6ABF}\x{6AC1}\x{6AC2}\x{6AC3}' - . '\x{6AC5}\x{6AC6}\x{6AC7}\x{6ACA}\x{6ACB}\x{6ACC}\x{6ACD}\x{6ACE}\x{6ACF}' - . '\x{6AD0}\x{6AD1}\x{6AD2}\x{6AD3}\x{6AD4}\x{6AD5}\x{6AD6}\x{6AD7}\x{6AD9}' - . '\x{6ADA}\x{6ADB}\x{6ADC}\x{6ADD}\x{6ADE}\x{6ADF}\x{6AE0}\x{6AE1}\x{6AE2}' - . '\x{6AE3}\x{6AE4}\x{6AE5}\x{6AE6}\x{6AE7}\x{6AE8}\x{6AEA}\x{6AEB}\x{6AEC}' - . '\x{6AED}\x{6AEE}\x{6AEF}\x{6AF0}\x{6AF1}\x{6AF2}\x{6AF3}\x{6AF4}\x{6AF5}' - . '\x{6AF6}\x{6AF7}\x{6AF8}\x{6AF9}\x{6AFA}\x{6AFB}\x{6AFC}\x{6AFD}\x{6AFE}' - . '\x{6AFF}\x{6B00}\x{6B01}\x{6B02}\x{6B03}\x{6B04}\x{6B05}\x{6B06}\x{6B07}' - . '\x{6B08}\x{6B09}\x{6B0A}\x{6B0B}\x{6B0C}\x{6B0D}\x{6B0F}\x{6B10}\x{6B11}' - . '\x{6B12}\x{6B13}\x{6B14}\x{6B15}\x{6B16}\x{6B17}\x{6B18}\x{6B19}\x{6B1A}' - . '\x{6B1C}\x{6B1D}\x{6B1E}\x{6B1F}\x{6B20}\x{6B21}\x{6B22}\x{6B23}\x{6B24}' - . '\x{6B25}\x{6B26}\x{6B27}\x{6B28}\x{6B29}\x{6B2A}\x{6B2B}\x{6B2C}\x{6B2D}' - . '\x{6B2F}\x{6B30}\x{6B31}\x{6B32}\x{6B33}\x{6B34}\x{6B36}\x{6B37}\x{6B38}' - . '\x{6B39}\x{6B3A}\x{6B3B}\x{6B3C}\x{6B3D}\x{6B3E}\x{6B3F}\x{6B41}\x{6B42}' - . '\x{6B43}\x{6B44}\x{6B45}\x{6B46}\x{6B47}\x{6B48}\x{6B49}\x{6B4A}\x{6B4B}' - . '\x{6B4C}\x{6B4D}\x{6B4E}\x{6B4F}\x{6B50}\x{6B51}\x{6B52}\x{6B53}\x{6B54}' - . '\x{6B55}\x{6B56}\x{6B59}\x{6B5A}\x{6B5B}\x{6B5C}\x{6B5E}\x{6B5F}\x{6B60}' - . '\x{6B61}\x{6B62}\x{6B63}\x{6B64}\x{6B65}\x{6B66}\x{6B67}\x{6B69}\x{6B6A}' - . '\x{6B6B}\x{6B6D}\x{6B6F}\x{6B70}\x{6B72}\x{6B73}\x{6B74}\x{6B76}\x{6B77}' - . '\x{6B78}\x{6B79}\x{6B7A}\x{6B7B}\x{6B7C}\x{6B7E}\x{6B7F}\x{6B80}\x{6B81}' - . '\x{6B82}\x{6B83}\x{6B84}\x{6B85}\x{6B86}\x{6B87}\x{6B88}\x{6B89}\x{6B8A}' - . '\x{6B8B}\x{6B8C}\x{6B8D}\x{6B8E}\x{6B8F}\x{6B90}\x{6B91}\x{6B92}\x{6B93}' - . '\x{6B94}\x{6B95}\x{6B96}\x{6B97}\x{6B98}\x{6B99}\x{6B9A}\x{6B9B}\x{6B9C}' - . '\x{6B9D}\x{6B9E}\x{6B9F}\x{6BA0}\x{6BA1}\x{6BA2}\x{6BA3}\x{6BA4}\x{6BA5}' - . '\x{6BA6}\x{6BA7}\x{6BA8}\x{6BA9}\x{6BAA}\x{6BAB}\x{6BAC}\x{6BAD}\x{6BAE}' - . '\x{6BAF}\x{6BB0}\x{6BB2}\x{6BB3}\x{6BB4}\x{6BB5}\x{6BB6}\x{6BB7}\x{6BB9}' - . '\x{6BBA}\x{6BBB}\x{6BBC}\x{6BBD}\x{6BBE}\x{6BBF}\x{6BC0}\x{6BC1}\x{6BC2}' - . '\x{6BC3}\x{6BC4}\x{6BC5}\x{6BC6}\x{6BC7}\x{6BC8}\x{6BC9}\x{6BCA}\x{6BCB}' - . '\x{6BCC}\x{6BCD}\x{6BCE}\x{6BCF}\x{6BD0}\x{6BD1}\x{6BD2}\x{6BD3}\x{6BD4}' - . '\x{6BD5}\x{6BD6}\x{6BD7}\x{6BD8}\x{6BD9}\x{6BDA}\x{6BDB}\x{6BDC}\x{6BDD}' - . '\x{6BDE}\x{6BDF}\x{6BE0}\x{6BE1}\x{6BE2}\x{6BE3}\x{6BE4}\x{6BE5}\x{6BE6}' - . '\x{6BE7}\x{6BE8}\x{6BEA}\x{6BEB}\x{6BEC}\x{6BED}\x{6BEE}\x{6BEF}\x{6BF0}' - . '\x{6BF2}\x{6BF3}\x{6BF5}\x{6BF6}\x{6BF7}\x{6BF8}\x{6BF9}\x{6BFB}\x{6BFC}' - . '\x{6BFD}\x{6BFE}\x{6BFF}\x{6C00}\x{6C01}\x{6C02}\x{6C03}\x{6C04}\x{6C05}' - . '\x{6C06}\x{6C07}\x{6C08}\x{6C09}\x{6C0B}\x{6C0C}\x{6C0D}\x{6C0E}\x{6C0F}' - . '\x{6C10}\x{6C11}\x{6C12}\x{6C13}\x{6C14}\x{6C15}\x{6C16}\x{6C18}\x{6C19}' - . '\x{6C1A}\x{6C1B}\x{6C1D}\x{6C1E}\x{6C1F}\x{6C20}\x{6C21}\x{6C22}\x{6C23}' - . '\x{6C24}\x{6C25}\x{6C26}\x{6C27}\x{6C28}\x{6C29}\x{6C2A}\x{6C2B}\x{6C2C}' - . '\x{6C2E}\x{6C2F}\x{6C30}\x{6C31}\x{6C32}\x{6C33}\x{6C34}\x{6C35}\x{6C36}' - . '\x{6C37}\x{6C38}\x{6C3A}\x{6C3B}\x{6C3D}\x{6C3E}\x{6C3F}\x{6C40}\x{6C41}' - . '\x{6C42}\x{6C43}\x{6C44}\x{6C46}\x{6C47}\x{6C48}\x{6C49}\x{6C4A}\x{6C4B}' - . '\x{6C4C}\x{6C4D}\x{6C4E}\x{6C4F}\x{6C50}\x{6C51}\x{6C52}\x{6C53}\x{6C54}' - . '\x{6C55}\x{6C56}\x{6C57}\x{6C58}\x{6C59}\x{6C5A}\x{6C5B}\x{6C5C}\x{6C5D}' - . '\x{6C5E}\x{6C5F}\x{6C60}\x{6C61}\x{6C62}\x{6C63}\x{6C64}\x{6C65}\x{6C66}' - . '\x{6C67}\x{6C68}\x{6C69}\x{6C6A}\x{6C6B}\x{6C6D}\x{6C6F}\x{6C70}\x{6C71}' - . '\x{6C72}\x{6C73}\x{6C74}\x{6C75}\x{6C76}\x{6C77}\x{6C78}\x{6C79}\x{6C7A}' - . '\x{6C7B}\x{6C7C}\x{6C7D}\x{6C7E}\x{6C7F}\x{6C80}\x{6C81}\x{6C82}\x{6C83}' - . '\x{6C84}\x{6C85}\x{6C86}\x{6C87}\x{6C88}\x{6C89}\x{6C8A}\x{6C8B}\x{6C8C}' - . '\x{6C8D}\x{6C8E}\x{6C8F}\x{6C90}\x{6C91}\x{6C92}\x{6C93}\x{6C94}\x{6C95}' - . '\x{6C96}\x{6C97}\x{6C98}\x{6C99}\x{6C9A}\x{6C9B}\x{6C9C}\x{6C9D}\x{6C9E}' - . '\x{6C9F}\x{6CA1}\x{6CA2}\x{6CA3}\x{6CA4}\x{6CA5}\x{6CA6}\x{6CA7}\x{6CA8}' - . '\x{6CA9}\x{6CAA}\x{6CAB}\x{6CAC}\x{6CAD}\x{6CAE}\x{6CAF}\x{6CB0}\x{6CB1}' - . '\x{6CB2}\x{6CB3}\x{6CB4}\x{6CB5}\x{6CB6}\x{6CB7}\x{6CB8}\x{6CB9}\x{6CBA}' - . '\x{6CBB}\x{6CBC}\x{6CBD}\x{6CBE}\x{6CBF}\x{6CC0}\x{6CC1}\x{6CC2}\x{6CC3}' - . '\x{6CC4}\x{6CC5}\x{6CC6}\x{6CC7}\x{6CC8}\x{6CC9}\x{6CCA}\x{6CCB}\x{6CCC}' - . '\x{6CCD}\x{6CCE}\x{6CCF}\x{6CD0}\x{6CD1}\x{6CD2}\x{6CD3}\x{6CD4}\x{6CD5}' - . '\x{6CD6}\x{6CD7}\x{6CD9}\x{6CDA}\x{6CDB}\x{6CDC}\x{6CDD}\x{6CDE}\x{6CDF}' - . '\x{6CE0}\x{6CE1}\x{6CE2}\x{6CE3}\x{6CE4}\x{6CE5}\x{6CE6}\x{6CE7}\x{6CE8}' - . '\x{6CE9}\x{6CEA}\x{6CEB}\x{6CEC}\x{6CED}\x{6CEE}\x{6CEF}\x{6CF0}\x{6CF1}' - . '\x{6CF2}\x{6CF3}\x{6CF5}\x{6CF6}\x{6CF7}\x{6CF8}\x{6CF9}\x{6CFA}\x{6CFB}' - . '\x{6CFC}\x{6CFD}\x{6CFE}\x{6CFF}\x{6D00}\x{6D01}\x{6D03}\x{6D04}\x{6D05}' - . '\x{6D06}\x{6D07}\x{6D08}\x{6D09}\x{6D0A}\x{6D0B}\x{6D0C}\x{6D0D}\x{6D0E}' - . '\x{6D0F}\x{6D10}\x{6D11}\x{6D12}\x{6D13}\x{6D14}\x{6D15}\x{6D16}\x{6D17}' - . '\x{6D18}\x{6D19}\x{6D1A}\x{6D1B}\x{6D1D}\x{6D1E}\x{6D1F}\x{6D20}\x{6D21}' - . '\x{6D22}\x{6D23}\x{6D25}\x{6D26}\x{6D27}\x{6D28}\x{6D29}\x{6D2A}\x{6D2B}' - . '\x{6D2C}\x{6D2D}\x{6D2E}\x{6D2F}\x{6D30}\x{6D31}\x{6D32}\x{6D33}\x{6D34}' - . '\x{6D35}\x{6D36}\x{6D37}\x{6D38}\x{6D39}\x{6D3A}\x{6D3B}\x{6D3C}\x{6D3D}' - . '\x{6D3E}\x{6D3F}\x{6D40}\x{6D41}\x{6D42}\x{6D43}\x{6D44}\x{6D45}\x{6D46}' - . '\x{6D47}\x{6D48}\x{6D49}\x{6D4A}\x{6D4B}\x{6D4C}\x{6D4D}\x{6D4E}\x{6D4F}' - . '\x{6D50}\x{6D51}\x{6D52}\x{6D53}\x{6D54}\x{6D55}\x{6D56}\x{6D57}\x{6D58}' - . '\x{6D59}\x{6D5A}\x{6D5B}\x{6D5C}\x{6D5D}\x{6D5E}\x{6D5F}\x{6D60}\x{6D61}' - . '\x{6D62}\x{6D63}\x{6D64}\x{6D65}\x{6D66}\x{6D67}\x{6D68}\x{6D69}\x{6D6A}' - . '\x{6D6B}\x{6D6C}\x{6D6D}\x{6D6E}\x{6D6F}\x{6D70}\x{6D72}\x{6D73}\x{6D74}' - . '\x{6D75}\x{6D76}\x{6D77}\x{6D78}\x{6D79}\x{6D7A}\x{6D7B}\x{6D7C}\x{6D7D}' - . '\x{6D7E}\x{6D7F}\x{6D80}\x{6D82}\x{6D83}\x{6D84}\x{6D85}\x{6D86}\x{6D87}' - . '\x{6D88}\x{6D89}\x{6D8A}\x{6D8B}\x{6D8C}\x{6D8D}\x{6D8E}\x{6D8F}\x{6D90}' - . '\x{6D91}\x{6D92}\x{6D93}\x{6D94}\x{6D95}\x{6D97}\x{6D98}\x{6D99}\x{6D9A}' - . '\x{6D9B}\x{6D9D}\x{6D9E}\x{6D9F}\x{6DA0}\x{6DA1}\x{6DA2}\x{6DA3}\x{6DA4}' - . '\x{6DA5}\x{6DA6}\x{6DA7}\x{6DA8}\x{6DA9}\x{6DAA}\x{6DAB}\x{6DAC}\x{6DAD}' - . '\x{6DAE}\x{6DAF}\x{6DB2}\x{6DB3}\x{6DB4}\x{6DB5}\x{6DB7}\x{6DB8}\x{6DB9}' - . '\x{6DBA}\x{6DBB}\x{6DBC}\x{6DBD}\x{6DBE}\x{6DBF}\x{6DC0}\x{6DC1}\x{6DC2}' - . '\x{6DC3}\x{6DC4}\x{6DC5}\x{6DC6}\x{6DC7}\x{6DC8}\x{6DC9}\x{6DCA}\x{6DCB}' - . '\x{6DCC}\x{6DCD}\x{6DCE}\x{6DCF}\x{6DD0}\x{6DD1}\x{6DD2}\x{6DD3}\x{6DD4}' - . '\x{6DD5}\x{6DD6}\x{6DD7}\x{6DD8}\x{6DD9}\x{6DDA}\x{6DDB}\x{6DDC}\x{6DDD}' - . '\x{6DDE}\x{6DDF}\x{6DE0}\x{6DE1}\x{6DE2}\x{6DE3}\x{6DE4}\x{6DE5}\x{6DE6}' - . '\x{6DE7}\x{6DE8}\x{6DE9}\x{6DEA}\x{6DEB}\x{6DEC}\x{6DED}\x{6DEE}\x{6DEF}' - . '\x{6DF0}\x{6DF1}\x{6DF2}\x{6DF3}\x{6DF4}\x{6DF5}\x{6DF6}\x{6DF7}\x{6DF8}' - . '\x{6DF9}\x{6DFA}\x{6DFB}\x{6DFC}\x{6DFD}\x{6E00}\x{6E03}\x{6E04}\x{6E05}' - . '\x{6E07}\x{6E08}\x{6E09}\x{6E0A}\x{6E0B}\x{6E0C}\x{6E0D}\x{6E0E}\x{6E0F}' - . '\x{6E10}\x{6E11}\x{6E14}\x{6E15}\x{6E16}\x{6E17}\x{6E19}\x{6E1A}\x{6E1B}' - . '\x{6E1C}\x{6E1D}\x{6E1E}\x{6E1F}\x{6E20}\x{6E21}\x{6E22}\x{6E23}\x{6E24}' - . '\x{6E25}\x{6E26}\x{6E27}\x{6E28}\x{6E29}\x{6E2B}\x{6E2C}\x{6E2D}\x{6E2E}' - . '\x{6E2F}\x{6E30}\x{6E31}\x{6E32}\x{6E33}\x{6E34}\x{6E35}\x{6E36}\x{6E37}' - . '\x{6E38}\x{6E39}\x{6E3A}\x{6E3B}\x{6E3C}\x{6E3D}\x{6E3E}\x{6E3F}\x{6E40}' - . '\x{6E41}\x{6E42}\x{6E43}\x{6E44}\x{6E45}\x{6E46}\x{6E47}\x{6E48}\x{6E49}' - . '\x{6E4A}\x{6E4B}\x{6E4D}\x{6E4E}\x{6E4F}\x{6E50}\x{6E51}\x{6E52}\x{6E53}' - . '\x{6E54}\x{6E55}\x{6E56}\x{6E57}\x{6E58}\x{6E59}\x{6E5A}\x{6E5B}\x{6E5C}' - . '\x{6E5D}\x{6E5E}\x{6E5F}\x{6E60}\x{6E61}\x{6E62}\x{6E63}\x{6E64}\x{6E65}' - . '\x{6E66}\x{6E67}\x{6E68}\x{6E69}\x{6E6A}\x{6E6B}\x{6E6D}\x{6E6E}\x{6E6F}' - . '\x{6E70}\x{6E71}\x{6E72}\x{6E73}\x{6E74}\x{6E75}\x{6E77}\x{6E78}\x{6E79}' - . '\x{6E7E}\x{6E7F}\x{6E80}\x{6E81}\x{6E82}\x{6E83}\x{6E84}\x{6E85}\x{6E86}' - . '\x{6E87}\x{6E88}\x{6E89}\x{6E8A}\x{6E8D}\x{6E8E}\x{6E8F}\x{6E90}\x{6E91}' - . '\x{6E92}\x{6E93}\x{6E94}\x{6E96}\x{6E97}\x{6E98}\x{6E99}\x{6E9A}\x{6E9B}' - . '\x{6E9C}\x{6E9D}\x{6E9E}\x{6E9F}\x{6EA0}\x{6EA1}\x{6EA2}\x{6EA3}\x{6EA4}' - . '\x{6EA5}\x{6EA6}\x{6EA7}\x{6EA8}\x{6EA9}\x{6EAA}\x{6EAB}\x{6EAC}\x{6EAD}' - . '\x{6EAE}\x{6EAF}\x{6EB0}\x{6EB1}\x{6EB2}\x{6EB3}\x{6EB4}\x{6EB5}\x{6EB6}' - . '\x{6EB7}\x{6EB8}\x{6EB9}\x{6EBA}\x{6EBB}\x{6EBC}\x{6EBD}\x{6EBE}\x{6EBF}' - . '\x{6EC0}\x{6EC1}\x{6EC2}\x{6EC3}\x{6EC4}\x{6EC5}\x{6EC6}\x{6EC7}\x{6EC8}' - . '\x{6EC9}\x{6ECA}\x{6ECB}\x{6ECC}\x{6ECD}\x{6ECE}\x{6ECF}\x{6ED0}\x{6ED1}' - . '\x{6ED2}\x{6ED3}\x{6ED4}\x{6ED5}\x{6ED6}\x{6ED7}\x{6ED8}\x{6ED9}\x{6EDA}' - . '\x{6EDC}\x{6EDE}\x{6EDF}\x{6EE0}\x{6EE1}\x{6EE2}\x{6EE4}\x{6EE5}\x{6EE6}' - . '\x{6EE7}\x{6EE8}\x{6EE9}\x{6EEA}\x{6EEB}\x{6EEC}\x{6EED}\x{6EEE}\x{6EEF}' - . '\x{6EF0}\x{6EF1}\x{6EF2}\x{6EF3}\x{6EF4}\x{6EF5}\x{6EF6}\x{6EF7}\x{6EF8}' - . '\x{6EF9}\x{6EFA}\x{6EFB}\x{6EFC}\x{6EFD}\x{6EFE}\x{6EFF}\x{6F00}\x{6F01}' - . '\x{6F02}\x{6F03}\x{6F05}\x{6F06}\x{6F07}\x{6F08}\x{6F09}\x{6F0A}\x{6F0C}' - . '\x{6F0D}\x{6F0E}\x{6F0F}\x{6F10}\x{6F11}\x{6F12}\x{6F13}\x{6F14}\x{6F15}' - . '\x{6F16}\x{6F17}\x{6F18}\x{6F19}\x{6F1A}\x{6F1B}\x{6F1C}\x{6F1D}\x{6F1E}' - . '\x{6F1F}\x{6F20}\x{6F21}\x{6F22}\x{6F23}\x{6F24}\x{6F25}\x{6F26}\x{6F27}' - . '\x{6F28}\x{6F29}\x{6F2A}\x{6F2B}\x{6F2C}\x{6F2D}\x{6F2E}\x{6F2F}\x{6F30}' - . '\x{6F31}\x{6F32}\x{6F33}\x{6F34}\x{6F35}\x{6F36}\x{6F37}\x{6F38}\x{6F39}' - . '\x{6F3A}\x{6F3B}\x{6F3C}\x{6F3D}\x{6F3E}\x{6F3F}\x{6F40}\x{6F41}\x{6F43}' - . '\x{6F44}\x{6F45}\x{6F46}\x{6F47}\x{6F49}\x{6F4B}\x{6F4C}\x{6F4D}\x{6F4E}' - . '\x{6F4F}\x{6F50}\x{6F51}\x{6F52}\x{6F53}\x{6F54}\x{6F55}\x{6F56}\x{6F57}' - . '\x{6F58}\x{6F59}\x{6F5A}\x{6F5B}\x{6F5C}\x{6F5D}\x{6F5E}\x{6F5F}\x{6F60}' - . '\x{6F61}\x{6F62}\x{6F63}\x{6F64}\x{6F65}\x{6F66}\x{6F67}\x{6F68}\x{6F69}' - . '\x{6F6A}\x{6F6B}\x{6F6C}\x{6F6D}\x{6F6E}\x{6F6F}\x{6F70}\x{6F71}\x{6F72}' - . '\x{6F73}\x{6F74}\x{6F75}\x{6F76}\x{6F77}\x{6F78}\x{6F7A}\x{6F7B}\x{6F7C}' - . '\x{6F7D}\x{6F7E}\x{6F7F}\x{6F80}\x{6F81}\x{6F82}\x{6F83}\x{6F84}\x{6F85}' - . '\x{6F86}\x{6F87}\x{6F88}\x{6F89}\x{6F8A}\x{6F8B}\x{6F8C}\x{6F8D}\x{6F8E}' - . '\x{6F8F}\x{6F90}\x{6F91}\x{6F92}\x{6F93}\x{6F94}\x{6F95}\x{6F96}\x{6F97}' - . '\x{6F99}\x{6F9B}\x{6F9C}\x{6F9D}\x{6F9E}\x{6FA0}\x{6FA1}\x{6FA2}\x{6FA3}' - . '\x{6FA4}\x{6FA5}\x{6FA6}\x{6FA7}\x{6FA8}\x{6FA9}\x{6FAA}\x{6FAB}\x{6FAC}' - . '\x{6FAD}\x{6FAE}\x{6FAF}\x{6FB0}\x{6FB1}\x{6FB2}\x{6FB3}\x{6FB4}\x{6FB5}' - . '\x{6FB6}\x{6FB8}\x{6FB9}\x{6FBA}\x{6FBB}\x{6FBC}\x{6FBD}\x{6FBE}\x{6FBF}' - . '\x{6FC0}\x{6FC1}\x{6FC2}\x{6FC3}\x{6FC4}\x{6FC6}\x{6FC7}\x{6FC8}\x{6FC9}' - . '\x{6FCA}\x{6FCB}\x{6FCC}\x{6FCD}\x{6FCE}\x{6FCF}\x{6FD1}\x{6FD2}\x{6FD4}' - . '\x{6FD5}\x{6FD6}\x{6FD7}\x{6FD8}\x{6FD9}\x{6FDA}\x{6FDB}\x{6FDC}\x{6FDD}' - . '\x{6FDE}\x{6FDF}\x{6FE0}\x{6FE1}\x{6FE2}\x{6FE3}\x{6FE4}\x{6FE5}\x{6FE6}' - . '\x{6FE7}\x{6FE8}\x{6FE9}\x{6FEA}\x{6FEB}\x{6FEC}\x{6FED}\x{6FEE}\x{6FEF}' - . '\x{6FF0}\x{6FF1}\x{6FF2}\x{6FF3}\x{6FF4}\x{6FF6}\x{6FF7}\x{6FF8}\x{6FF9}' - . '\x{6FFA}\x{6FFB}\x{6FFC}\x{6FFE}\x{6FFF}\x{7000}\x{7001}\x{7002}\x{7003}' - . '\x{7004}\x{7005}\x{7006}\x{7007}\x{7008}\x{7009}\x{700A}\x{700B}\x{700C}' - . '\x{700D}\x{700E}\x{700F}\x{7011}\x{7012}\x{7014}\x{7015}\x{7016}\x{7017}' - . '\x{7018}\x{7019}\x{701A}\x{701B}\x{701C}\x{701D}\x{701F}\x{7020}\x{7021}' - . '\x{7022}\x{7023}\x{7024}\x{7025}\x{7026}\x{7027}\x{7028}\x{7029}\x{702A}' - . '\x{702B}\x{702C}\x{702D}\x{702E}\x{702F}\x{7030}\x{7031}\x{7032}\x{7033}' - . '\x{7034}\x{7035}\x{7036}\x{7037}\x{7038}\x{7039}\x{703A}\x{703B}\x{703C}' - . '\x{703D}\x{703E}\x{703F}\x{7040}\x{7041}\x{7042}\x{7043}\x{7044}\x{7045}' - . '\x{7046}\x{7048}\x{7049}\x{704A}\x{704C}\x{704D}\x{704F}\x{7050}\x{7051}' - . '\x{7052}\x{7053}\x{7054}\x{7055}\x{7056}\x{7057}\x{7058}\x{7059}\x{705A}' - . '\x{705B}\x{705C}\x{705D}\x{705E}\x{705F}\x{7060}\x{7061}\x{7062}\x{7063}' - . '\x{7064}\x{7065}\x{7066}\x{7067}\x{7068}\x{7069}\x{706A}\x{706B}\x{706C}' - . '\x{706D}\x{706E}\x{706F}\x{7070}\x{7071}\x{7074}\x{7075}\x{7076}\x{7077}' - . '\x{7078}\x{7079}\x{707A}\x{707C}\x{707D}\x{707E}\x{707F}\x{7080}\x{7082}' - . '\x{7083}\x{7084}\x{7085}\x{7086}\x{7087}\x{7088}\x{7089}\x{708A}\x{708B}' - . '\x{708C}\x{708E}\x{708F}\x{7090}\x{7091}\x{7092}\x{7093}\x{7094}\x{7095}' - . '\x{7096}\x{7098}\x{7099}\x{709A}\x{709C}\x{709D}\x{709E}\x{709F}\x{70A0}' - . '\x{70A1}\x{70A2}\x{70A3}\x{70A4}\x{70A5}\x{70A6}\x{70A7}\x{70A8}\x{70A9}' - . '\x{70AB}\x{70AC}\x{70AD}\x{70AE}\x{70AF}\x{70B0}\x{70B1}\x{70B3}\x{70B4}' - . '\x{70B5}\x{70B7}\x{70B8}\x{70B9}\x{70BA}\x{70BB}\x{70BC}\x{70BD}\x{70BE}' - . '\x{70BF}\x{70C0}\x{70C1}\x{70C2}\x{70C3}\x{70C4}\x{70C5}\x{70C6}\x{70C7}' - . '\x{70C8}\x{70C9}\x{70CA}\x{70CB}\x{70CC}\x{70CD}\x{70CE}\x{70CF}\x{70D0}' - . '\x{70D1}\x{70D2}\x{70D3}\x{70D4}\x{70D6}\x{70D7}\x{70D8}\x{70D9}\x{70DA}' - . '\x{70DB}\x{70DC}\x{70DD}\x{70DE}\x{70DF}\x{70E0}\x{70E1}\x{70E2}\x{70E3}' - . '\x{70E4}\x{70E5}\x{70E6}\x{70E7}\x{70E8}\x{70E9}\x{70EA}\x{70EB}\x{70EC}' - . '\x{70ED}\x{70EE}\x{70EF}\x{70F0}\x{70F1}\x{70F2}\x{70F3}\x{70F4}\x{70F5}' - . '\x{70F6}\x{70F7}\x{70F8}\x{70F9}\x{70FA}\x{70FB}\x{70FC}\x{70FD}\x{70FF}' - . '\x{7100}\x{7101}\x{7102}\x{7103}\x{7104}\x{7105}\x{7106}\x{7107}\x{7109}' - . '\x{710A}\x{710B}\x{710C}\x{710D}\x{710E}\x{710F}\x{7110}\x{7111}\x{7112}' - . '\x{7113}\x{7115}\x{7116}\x{7117}\x{7118}\x{7119}\x{711A}\x{711B}\x{711C}' - . '\x{711D}\x{711E}\x{711F}\x{7120}\x{7121}\x{7122}\x{7123}\x{7125}\x{7126}' - . '\x{7127}\x{7128}\x{7129}\x{712A}\x{712B}\x{712C}\x{712D}\x{712E}\x{712F}' - . '\x{7130}\x{7131}\x{7132}\x{7135}\x{7136}\x{7137}\x{7138}\x{7139}\x{713A}' - . '\x{713B}\x{713D}\x{713E}\x{713F}\x{7140}\x{7141}\x{7142}\x{7143}\x{7144}' - . '\x{7145}\x{7146}\x{7147}\x{7148}\x{7149}\x{714A}\x{714B}\x{714C}\x{714D}' - . '\x{714E}\x{714F}\x{7150}\x{7151}\x{7152}\x{7153}\x{7154}\x{7156}\x{7158}' - . '\x{7159}\x{715A}\x{715B}\x{715C}\x{715D}\x{715E}\x{715F}\x{7160}\x{7161}' - . '\x{7162}\x{7163}\x{7164}\x{7165}\x{7166}\x{7167}\x{7168}\x{7169}\x{716A}' - . '\x{716C}\x{716E}\x{716F}\x{7170}\x{7171}\x{7172}\x{7173}\x{7174}\x{7175}' - . '\x{7176}\x{7177}\x{7178}\x{7179}\x{717A}\x{717B}\x{717C}\x{717D}\x{717E}' - . '\x{717F}\x{7180}\x{7181}\x{7182}\x{7183}\x{7184}\x{7185}\x{7186}\x{7187}' - . '\x{7188}\x{7189}\x{718A}\x{718B}\x{718C}\x{718E}\x{718F}\x{7190}\x{7191}' - . '\x{7192}\x{7193}\x{7194}\x{7195}\x{7197}\x{7198}\x{7199}\x{719A}\x{719B}' - . '\x{719C}\x{719D}\x{719E}\x{719F}\x{71A0}\x{71A1}\x{71A2}\x{71A3}\x{71A4}' - . '\x{71A5}\x{71A7}\x{71A8}\x{71A9}\x{71AA}\x{71AC}\x{71AD}\x{71AE}\x{71AF}' - . '\x{71B0}\x{71B1}\x{71B2}\x{71B3}\x{71B4}\x{71B5}\x{71B7}\x{71B8}\x{71B9}' - . '\x{71BA}\x{71BB}\x{71BC}\x{71BD}\x{71BE}\x{71BF}\x{71C0}\x{71C1}\x{71C2}' - . '\x{71C3}\x{71C4}\x{71C5}\x{71C6}\x{71C7}\x{71C8}\x{71C9}\x{71CA}\x{71CB}' - . '\x{71CD}\x{71CE}\x{71CF}\x{71D0}\x{71D1}\x{71D2}\x{71D4}\x{71D5}\x{71D6}' - . '\x{71D7}\x{71D8}\x{71D9}\x{71DA}\x{71DB}\x{71DC}\x{71DD}\x{71DE}\x{71DF}' - . '\x{71E0}\x{71E1}\x{71E2}\x{71E3}\x{71E4}\x{71E5}\x{71E6}\x{71E7}\x{71E8}' - . '\x{71E9}\x{71EA}\x{71EB}\x{71EC}\x{71ED}\x{71EE}\x{71EF}\x{71F0}\x{71F1}' - . '\x{71F2}\x{71F4}\x{71F5}\x{71F6}\x{71F7}\x{71F8}\x{71F9}\x{71FB}\x{71FC}' - . '\x{71FD}\x{71FE}\x{71FF}\x{7201}\x{7202}\x{7203}\x{7204}\x{7205}\x{7206}' - . '\x{7207}\x{7208}\x{7209}\x{720A}\x{720C}\x{720D}\x{720E}\x{720F}\x{7210}' - . '\x{7212}\x{7213}\x{7214}\x{7216}\x{7218}\x{7219}\x{721A}\x{721B}\x{721C}' - . '\x{721D}\x{721E}\x{721F}\x{7221}\x{7222}\x{7223}\x{7226}\x{7227}\x{7228}' - . '\x{7229}\x{722A}\x{722B}\x{722C}\x{722D}\x{722E}\x{7230}\x{7231}\x{7232}' - . '\x{7233}\x{7235}\x{7236}\x{7237}\x{7238}\x{7239}\x{723A}\x{723B}\x{723C}' - . '\x{723D}\x{723E}\x{723F}\x{7240}\x{7241}\x{7242}\x{7243}\x{7244}\x{7246}' - . '\x{7247}\x{7248}\x{7249}\x{724A}\x{724B}\x{724C}\x{724D}\x{724F}\x{7251}' - . '\x{7252}\x{7253}\x{7254}\x{7256}\x{7257}\x{7258}\x{7259}\x{725A}\x{725B}' - . '\x{725C}\x{725D}\x{725E}\x{725F}\x{7260}\x{7261}\x{7262}\x{7263}\x{7264}' - . '\x{7265}\x{7266}\x{7267}\x{7268}\x{7269}\x{726A}\x{726B}\x{726C}\x{726D}' - . '\x{726E}\x{726F}\x{7270}\x{7271}\x{7272}\x{7273}\x{7274}\x{7275}\x{7276}' - . '\x{7277}\x{7278}\x{7279}\x{727A}\x{727B}\x{727C}\x{727D}\x{727E}\x{727F}' - . '\x{7280}\x{7281}\x{7282}\x{7283}\x{7284}\x{7285}\x{7286}\x{7287}\x{7288}' - . '\x{7289}\x{728A}\x{728B}\x{728C}\x{728D}\x{728E}\x{728F}\x{7290}\x{7291}' - . '\x{7292}\x{7293}\x{7294}\x{7295}\x{7296}\x{7297}\x{7298}\x{7299}\x{729A}' - . '\x{729B}\x{729C}\x{729D}\x{729E}\x{729F}\x{72A1}\x{72A2}\x{72A3}\x{72A4}' - . '\x{72A5}\x{72A6}\x{72A7}\x{72A8}\x{72A9}\x{72AA}\x{72AC}\x{72AD}\x{72AE}' - . '\x{72AF}\x{72B0}\x{72B1}\x{72B2}\x{72B3}\x{72B4}\x{72B5}\x{72B6}\x{72B7}' - . '\x{72B8}\x{72B9}\x{72BA}\x{72BB}\x{72BC}\x{72BD}\x{72BF}\x{72C0}\x{72C1}' - . '\x{72C2}\x{72C3}\x{72C4}\x{72C5}\x{72C6}\x{72C7}\x{72C8}\x{72C9}\x{72CA}' - . '\x{72CB}\x{72CC}\x{72CD}\x{72CE}\x{72CF}\x{72D0}\x{72D1}\x{72D2}\x{72D3}' - . '\x{72D4}\x{72D5}\x{72D6}\x{72D7}\x{72D8}\x{72D9}\x{72DA}\x{72DB}\x{72DC}' - . '\x{72DD}\x{72DE}\x{72DF}\x{72E0}\x{72E1}\x{72E2}\x{72E3}\x{72E4}\x{72E5}' - . '\x{72E6}\x{72E7}\x{72E8}\x{72E9}\x{72EA}\x{72EB}\x{72EC}\x{72ED}\x{72EE}' - . '\x{72EF}\x{72F0}\x{72F1}\x{72F2}\x{72F3}\x{72F4}\x{72F5}\x{72F6}\x{72F7}' - . '\x{72F8}\x{72F9}\x{72FA}\x{72FB}\x{72FC}\x{72FD}\x{72FE}\x{72FF}\x{7300}' - . '\x{7301}\x{7303}\x{7304}\x{7305}\x{7306}\x{7307}\x{7308}\x{7309}\x{730A}' - . '\x{730B}\x{730C}\x{730D}\x{730E}\x{730F}\x{7311}\x{7312}\x{7313}\x{7314}' - . '\x{7315}\x{7316}\x{7317}\x{7318}\x{7319}\x{731A}\x{731B}\x{731C}\x{731D}' - . '\x{731E}\x{7320}\x{7321}\x{7322}\x{7323}\x{7324}\x{7325}\x{7326}\x{7327}' - . '\x{7329}\x{732A}\x{732B}\x{732C}\x{732D}\x{732E}\x{7330}\x{7331}\x{7332}' - . '\x{7333}\x{7334}\x{7335}\x{7336}\x{7337}\x{7338}\x{7339}\x{733A}\x{733B}' - . '\x{733C}\x{733D}\x{733E}\x{733F}\x{7340}\x{7341}\x{7342}\x{7343}\x{7344}' - . '\x{7345}\x{7346}\x{7347}\x{7348}\x{7349}\x{734A}\x{734B}\x{734C}\x{734D}' - . '\x{734E}\x{7350}\x{7351}\x{7352}\x{7354}\x{7355}\x{7356}\x{7357}\x{7358}' - . '\x{7359}\x{735A}\x{735B}\x{735C}\x{735D}\x{735E}\x{735F}\x{7360}\x{7361}' - . '\x{7362}\x{7364}\x{7365}\x{7366}\x{7367}\x{7368}\x{7369}\x{736A}\x{736B}' - . '\x{736C}\x{736D}\x{736E}\x{736F}\x{7370}\x{7371}\x{7372}\x{7373}\x{7374}' - . '\x{7375}\x{7376}\x{7377}\x{7378}\x{7379}\x{737A}\x{737B}\x{737C}\x{737D}' - . '\x{737E}\x{737F}\x{7380}\x{7381}\x{7382}\x{7383}\x{7384}\x{7385}\x{7386}' - . '\x{7387}\x{7388}\x{7389}\x{738A}\x{738B}\x{738C}\x{738D}\x{738E}\x{738F}' - . '\x{7390}\x{7391}\x{7392}\x{7393}\x{7394}\x{7395}\x{7396}\x{7397}\x{7398}' - . '\x{7399}\x{739A}\x{739B}\x{739D}\x{739E}\x{739F}\x{73A0}\x{73A1}\x{73A2}' - . '\x{73A3}\x{73A4}\x{73A5}\x{73A6}\x{73A7}\x{73A8}\x{73A9}\x{73AA}\x{73AB}' - . '\x{73AC}\x{73AD}\x{73AE}\x{73AF}\x{73B0}\x{73B1}\x{73B2}\x{73B3}\x{73B4}' - . '\x{73B5}\x{73B6}\x{73B7}\x{73B8}\x{73B9}\x{73BA}\x{73BB}\x{73BC}\x{73BD}' - . '\x{73BE}\x{73BF}\x{73C0}\x{73C2}\x{73C3}\x{73C4}\x{73C5}\x{73C6}\x{73C7}' - . '\x{73C8}\x{73C9}\x{73CA}\x{73CB}\x{73CC}\x{73CD}\x{73CE}\x{73CF}\x{73D0}' - . '\x{73D1}\x{73D2}\x{73D3}\x{73D4}\x{73D5}\x{73D6}\x{73D7}\x{73D8}\x{73D9}' - . '\x{73DA}\x{73DB}\x{73DC}\x{73DD}\x{73DE}\x{73DF}\x{73E0}\x{73E2}\x{73E3}' - . '\x{73E5}\x{73E6}\x{73E7}\x{73E8}\x{73E9}\x{73EA}\x{73EB}\x{73EC}\x{73ED}' - . '\x{73EE}\x{73EF}\x{73F0}\x{73F1}\x{73F2}\x{73F4}\x{73F5}\x{73F6}\x{73F7}' - . '\x{73F8}\x{73F9}\x{73FA}\x{73FC}\x{73FD}\x{73FE}\x{73FF}\x{7400}\x{7401}' - . '\x{7402}\x{7403}\x{7404}\x{7405}\x{7406}\x{7407}\x{7408}\x{7409}\x{740A}' - . '\x{740B}\x{740C}\x{740D}\x{740E}\x{740F}\x{7410}\x{7411}\x{7412}\x{7413}' - . '\x{7414}\x{7415}\x{7416}\x{7417}\x{7419}\x{741A}\x{741B}\x{741C}\x{741D}' - . '\x{741E}\x{741F}\x{7420}\x{7421}\x{7422}\x{7423}\x{7424}\x{7425}\x{7426}' - . '\x{7427}\x{7428}\x{7429}\x{742A}\x{742B}\x{742C}\x{742D}\x{742E}\x{742F}' - . '\x{7430}\x{7431}\x{7432}\x{7433}\x{7434}\x{7435}\x{7436}\x{7437}\x{7438}' - . '\x{743A}\x{743B}\x{743C}\x{743D}\x{743F}\x{7440}\x{7441}\x{7442}\x{7443}' - . '\x{7444}\x{7445}\x{7446}\x{7448}\x{744A}\x{744B}\x{744C}\x{744D}\x{744E}' - . '\x{744F}\x{7450}\x{7451}\x{7452}\x{7453}\x{7454}\x{7455}\x{7456}\x{7457}' - . '\x{7459}\x{745A}\x{745B}\x{745C}\x{745D}\x{745E}\x{745F}\x{7461}\x{7462}' - . '\x{7463}\x{7464}\x{7465}\x{7466}\x{7467}\x{7468}\x{7469}\x{746A}\x{746B}' - . '\x{746C}\x{746D}\x{746E}\x{746F}\x{7470}\x{7471}\x{7472}\x{7473}\x{7474}' - . '\x{7475}\x{7476}\x{7477}\x{7478}\x{7479}\x{747A}\x{747C}\x{747D}\x{747E}' - . '\x{747F}\x{7480}\x{7481}\x{7482}\x{7483}\x{7485}\x{7486}\x{7487}\x{7488}' - . '\x{7489}\x{748A}\x{748B}\x{748C}\x{748D}\x{748E}\x{748F}\x{7490}\x{7491}' - . '\x{7492}\x{7493}\x{7494}\x{7495}\x{7497}\x{7498}\x{7499}\x{749A}\x{749B}' - . '\x{749C}\x{749E}\x{749F}\x{74A0}\x{74A1}\x{74A3}\x{74A4}\x{74A5}\x{74A6}' - . '\x{74A7}\x{74A8}\x{74A9}\x{74AA}\x{74AB}\x{74AC}\x{74AD}\x{74AE}\x{74AF}' - . '\x{74B0}\x{74B1}\x{74B2}\x{74B3}\x{74B4}\x{74B5}\x{74B6}\x{74B7}\x{74B8}' - . '\x{74B9}\x{74BA}\x{74BB}\x{74BC}\x{74BD}\x{74BE}\x{74BF}\x{74C0}\x{74C1}' - . '\x{74C2}\x{74C3}\x{74C4}\x{74C5}\x{74C6}\x{74CA}\x{74CB}\x{74CD}\x{74CE}' - . '\x{74CF}\x{74D0}\x{74D1}\x{74D2}\x{74D3}\x{74D4}\x{74D5}\x{74D6}\x{74D7}' - . '\x{74D8}\x{74D9}\x{74DA}\x{74DB}\x{74DC}\x{74DD}\x{74DE}\x{74DF}\x{74E0}' - . '\x{74E1}\x{74E2}\x{74E3}\x{74E4}\x{74E5}\x{74E6}\x{74E7}\x{74E8}\x{74E9}' - . '\x{74EA}\x{74EC}\x{74ED}\x{74EE}\x{74EF}\x{74F0}\x{74F1}\x{74F2}\x{74F3}' - . '\x{74F4}\x{74F5}\x{74F6}\x{74F7}\x{74F8}\x{74F9}\x{74FA}\x{74FB}\x{74FC}' - . '\x{74FD}\x{74FE}\x{74FF}\x{7500}\x{7501}\x{7502}\x{7503}\x{7504}\x{7505}' - . '\x{7506}\x{7507}\x{7508}\x{7509}\x{750A}\x{750B}\x{750C}\x{750D}\x{750F}' - . '\x{7510}\x{7511}\x{7512}\x{7513}\x{7514}\x{7515}\x{7516}\x{7517}\x{7518}' - . '\x{7519}\x{751A}\x{751B}\x{751C}\x{751D}\x{751E}\x{751F}\x{7521}\x{7522}' - . '\x{7523}\x{7524}\x{7525}\x{7526}\x{7527}\x{7528}\x{7529}\x{752A}\x{752B}' - . '\x{752C}\x{752D}\x{752E}\x{752F}\x{7530}\x{7531}\x{7532}\x{7533}\x{7535}' - . '\x{7536}\x{7537}\x{7538}\x{7539}\x{753A}\x{753B}\x{753C}\x{753D}\x{753E}' - . '\x{753F}\x{7540}\x{7542}\x{7543}\x{7544}\x{7545}\x{7546}\x{7547}\x{7548}' - . '\x{7549}\x{754B}\x{754C}\x{754D}\x{754E}\x{754F}\x{7550}\x{7551}\x{7553}' - . '\x{7554}\x{7556}\x{7557}\x{7558}\x{7559}\x{755A}\x{755B}\x{755C}\x{755D}' - . '\x{755F}\x{7560}\x{7562}\x{7563}\x{7564}\x{7565}\x{7566}\x{7567}\x{7568}' - . '\x{7569}\x{756A}\x{756B}\x{756C}\x{756D}\x{756E}\x{756F}\x{7570}\x{7572}' - . '\x{7574}\x{7575}\x{7576}\x{7577}\x{7578}\x{7579}\x{757C}\x{757D}\x{757E}' - . '\x{757F}\x{7580}\x{7581}\x{7582}\x{7583}\x{7584}\x{7586}\x{7587}\x{7588}' - . '\x{7589}\x{758A}\x{758B}\x{758C}\x{758D}\x{758F}\x{7590}\x{7591}\x{7592}' - . '\x{7593}\x{7594}\x{7595}\x{7596}\x{7597}\x{7598}\x{7599}\x{759A}\x{759B}' - . '\x{759C}\x{759D}\x{759E}\x{759F}\x{75A0}\x{75A1}\x{75A2}\x{75A3}\x{75A4}' - . '\x{75A5}\x{75A6}\x{75A7}\x{75A8}\x{75AA}\x{75AB}\x{75AC}\x{75AD}\x{75AE}' - . '\x{75AF}\x{75B0}\x{75B1}\x{75B2}\x{75B3}\x{75B4}\x{75B5}\x{75B6}\x{75B8}' - . '\x{75B9}\x{75BA}\x{75BB}\x{75BC}\x{75BD}\x{75BE}\x{75BF}\x{75C0}\x{75C1}' - . '\x{75C2}\x{75C3}\x{75C4}\x{75C5}\x{75C6}\x{75C7}\x{75C8}\x{75C9}\x{75CA}' - . '\x{75CB}\x{75CC}\x{75CD}\x{75CE}\x{75CF}\x{75D0}\x{75D1}\x{75D2}\x{75D3}' - . '\x{75D4}\x{75D5}\x{75D6}\x{75D7}\x{75D8}\x{75D9}\x{75DA}\x{75DB}\x{75DD}' - . '\x{75DE}\x{75DF}\x{75E0}\x{75E1}\x{75E2}\x{75E3}\x{75E4}\x{75E5}\x{75E6}' - . '\x{75E7}\x{75E8}\x{75EA}\x{75EB}\x{75EC}\x{75ED}\x{75EF}\x{75F0}\x{75F1}' - . '\x{75F2}\x{75F3}\x{75F4}\x{75F5}\x{75F6}\x{75F7}\x{75F8}\x{75F9}\x{75FA}' - . '\x{75FB}\x{75FC}\x{75FD}\x{75FE}\x{75FF}\x{7600}\x{7601}\x{7602}\x{7603}' - . '\x{7604}\x{7605}\x{7606}\x{7607}\x{7608}\x{7609}\x{760A}\x{760B}\x{760C}' - . '\x{760D}\x{760E}\x{760F}\x{7610}\x{7611}\x{7612}\x{7613}\x{7614}\x{7615}' - . '\x{7616}\x{7617}\x{7618}\x{7619}\x{761A}\x{761B}\x{761C}\x{761D}\x{761E}' - . '\x{761F}\x{7620}\x{7621}\x{7622}\x{7623}\x{7624}\x{7625}\x{7626}\x{7627}' - . '\x{7628}\x{7629}\x{762A}\x{762B}\x{762D}\x{762E}\x{762F}\x{7630}\x{7631}' - . '\x{7632}\x{7633}\x{7634}\x{7635}\x{7636}\x{7637}\x{7638}\x{7639}\x{763A}' - . '\x{763B}\x{763C}\x{763D}\x{763E}\x{763F}\x{7640}\x{7641}\x{7642}\x{7643}' - . '\x{7646}\x{7647}\x{7648}\x{7649}\x{764A}\x{764B}\x{764C}\x{764D}\x{764F}' - . '\x{7650}\x{7652}\x{7653}\x{7654}\x{7656}\x{7657}\x{7658}\x{7659}\x{765A}' - . '\x{765B}\x{765C}\x{765D}\x{765E}\x{765F}\x{7660}\x{7661}\x{7662}\x{7663}' - . '\x{7664}\x{7665}\x{7666}\x{7667}\x{7668}\x{7669}\x{766A}\x{766B}\x{766C}' - . '\x{766D}\x{766E}\x{766F}\x{7670}\x{7671}\x{7672}\x{7674}\x{7675}\x{7676}' - . '\x{7677}\x{7678}\x{7679}\x{767B}\x{767C}\x{767D}\x{767E}\x{767F}\x{7680}' - . '\x{7681}\x{7682}\x{7683}\x{7684}\x{7685}\x{7686}\x{7687}\x{7688}\x{7689}' - . '\x{768A}\x{768B}\x{768C}\x{768E}\x{768F}\x{7690}\x{7691}\x{7692}\x{7693}' - . '\x{7694}\x{7695}\x{7696}\x{7697}\x{7698}\x{7699}\x{769A}\x{769B}\x{769C}' - . '\x{769D}\x{769E}\x{769F}\x{76A0}\x{76A3}\x{76A4}\x{76A6}\x{76A7}\x{76A9}' - . '\x{76AA}\x{76AB}\x{76AC}\x{76AD}\x{76AE}\x{76AF}\x{76B0}\x{76B1}\x{76B2}' - . '\x{76B4}\x{76B5}\x{76B7}\x{76B8}\x{76BA}\x{76BB}\x{76BC}\x{76BD}\x{76BE}' - . '\x{76BF}\x{76C0}\x{76C2}\x{76C3}\x{76C4}\x{76C5}\x{76C6}\x{76C7}\x{76C8}' - . '\x{76C9}\x{76CA}\x{76CD}\x{76CE}\x{76CF}\x{76D0}\x{76D1}\x{76D2}\x{76D3}' - . '\x{76D4}\x{76D5}\x{76D6}\x{76D7}\x{76D8}\x{76DA}\x{76DB}\x{76DC}\x{76DD}' - . '\x{76DE}\x{76DF}\x{76E0}\x{76E1}\x{76E2}\x{76E3}\x{76E4}\x{76E5}\x{76E6}' - . '\x{76E7}\x{76E8}\x{76E9}\x{76EA}\x{76EC}\x{76ED}\x{76EE}\x{76EF}\x{76F0}' - . '\x{76F1}\x{76F2}\x{76F3}\x{76F4}\x{76F5}\x{76F6}\x{76F7}\x{76F8}\x{76F9}' - . '\x{76FA}\x{76FB}\x{76FC}\x{76FD}\x{76FE}\x{76FF}\x{7701}\x{7703}\x{7704}' - . '\x{7705}\x{7706}\x{7707}\x{7708}\x{7709}\x{770A}\x{770B}\x{770C}\x{770D}' - . '\x{770F}\x{7710}\x{7711}\x{7712}\x{7713}\x{7714}\x{7715}\x{7716}\x{7717}' - . '\x{7718}\x{7719}\x{771A}\x{771B}\x{771C}\x{771D}\x{771E}\x{771F}\x{7720}' - . '\x{7722}\x{7723}\x{7725}\x{7726}\x{7727}\x{7728}\x{7729}\x{772A}\x{772C}' - . '\x{772D}\x{772E}\x{772F}\x{7730}\x{7731}\x{7732}\x{7733}\x{7734}\x{7735}' - . '\x{7736}\x{7737}\x{7738}\x{7739}\x{773A}\x{773B}\x{773C}\x{773D}\x{773E}' - . '\x{7740}\x{7741}\x{7743}\x{7744}\x{7745}\x{7746}\x{7747}\x{7748}\x{7749}' - . '\x{774A}\x{774B}\x{774C}\x{774D}\x{774E}\x{774F}\x{7750}\x{7751}\x{7752}' - . '\x{7753}\x{7754}\x{7755}\x{7756}\x{7757}\x{7758}\x{7759}\x{775A}\x{775B}' - . '\x{775C}\x{775D}\x{775E}\x{775F}\x{7760}\x{7761}\x{7762}\x{7763}\x{7765}' - . '\x{7766}\x{7767}\x{7768}\x{7769}\x{776A}\x{776B}\x{776C}\x{776D}\x{776E}' - . '\x{776F}\x{7770}\x{7771}\x{7772}\x{7773}\x{7774}\x{7775}\x{7776}\x{7777}' - . '\x{7778}\x{7779}\x{777A}\x{777B}\x{777C}\x{777D}\x{777E}\x{777F}\x{7780}' - . '\x{7781}\x{7782}\x{7783}\x{7784}\x{7785}\x{7786}\x{7787}\x{7788}\x{7789}' - . '\x{778A}\x{778B}\x{778C}\x{778D}\x{778E}\x{778F}\x{7790}\x{7791}\x{7792}' - . '\x{7793}\x{7794}\x{7795}\x{7797}\x{7798}\x{7799}\x{779A}\x{779B}\x{779C}' - . '\x{779D}\x{779E}\x{779F}\x{77A0}\x{77A1}\x{77A2}\x{77A3}\x{77A5}\x{77A6}' - . '\x{77A7}\x{77A8}\x{77A9}\x{77AA}\x{77AB}\x{77AC}\x{77AD}\x{77AE}\x{77AF}' - . '\x{77B0}\x{77B1}\x{77B2}\x{77B3}\x{77B4}\x{77B5}\x{77B6}\x{77B7}\x{77B8}' - . '\x{77B9}\x{77BA}\x{77BB}\x{77BC}\x{77BD}\x{77BF}\x{77C0}\x{77C2}\x{77C3}' - . '\x{77C4}\x{77C5}\x{77C6}\x{77C7}\x{77C8}\x{77C9}\x{77CA}\x{77CB}\x{77CC}' - . '\x{77CD}\x{77CE}\x{77CF}\x{77D0}\x{77D1}\x{77D3}\x{77D4}\x{77D5}\x{77D6}' - . '\x{77D7}\x{77D8}\x{77D9}\x{77DA}\x{77DB}\x{77DC}\x{77DE}\x{77DF}\x{77E0}' - . '\x{77E1}\x{77E2}\x{77E3}\x{77E5}\x{77E7}\x{77E8}\x{77E9}\x{77EA}\x{77EB}' - . '\x{77EC}\x{77ED}\x{77EE}\x{77EF}\x{77F0}\x{77F1}\x{77F2}\x{77F3}\x{77F6}' - . '\x{77F7}\x{77F8}\x{77F9}\x{77FA}\x{77FB}\x{77FC}\x{77FD}\x{77FE}\x{77FF}' - . '\x{7800}\x{7801}\x{7802}\x{7803}\x{7804}\x{7805}\x{7806}\x{7808}\x{7809}' - . '\x{780A}\x{780B}\x{780C}\x{780D}\x{780E}\x{780F}\x{7810}\x{7811}\x{7812}' - . '\x{7813}\x{7814}\x{7815}\x{7816}\x{7817}\x{7818}\x{7819}\x{781A}\x{781B}' - . '\x{781C}\x{781D}\x{781E}\x{781F}\x{7820}\x{7821}\x{7822}\x{7823}\x{7825}' - . '\x{7826}\x{7827}\x{7828}\x{7829}\x{782A}\x{782B}\x{782C}\x{782D}\x{782E}' - . '\x{782F}\x{7830}\x{7831}\x{7832}\x{7833}\x{7834}\x{7835}\x{7837}\x{7838}' - . '\x{7839}\x{783A}\x{783B}\x{783C}\x{783D}\x{783E}\x{7840}\x{7841}\x{7843}' - . '\x{7844}\x{7845}\x{7847}\x{7848}\x{7849}\x{784A}\x{784C}\x{784D}\x{784E}' - . '\x{7850}\x{7851}\x{7852}\x{7853}\x{7854}\x{7855}\x{7856}\x{7857}\x{7858}' - . '\x{7859}\x{785A}\x{785B}\x{785C}\x{785D}\x{785E}\x{785F}\x{7860}\x{7861}' - . '\x{7862}\x{7863}\x{7864}\x{7865}\x{7866}\x{7867}\x{7868}\x{7869}\x{786A}' - . '\x{786B}\x{786C}\x{786D}\x{786E}\x{786F}\x{7870}\x{7871}\x{7872}\x{7873}' - . '\x{7874}\x{7875}\x{7877}\x{7878}\x{7879}\x{787A}\x{787B}\x{787C}\x{787D}' - . '\x{787E}\x{787F}\x{7880}\x{7881}\x{7882}\x{7883}\x{7884}\x{7885}\x{7886}' - . '\x{7887}\x{7889}\x{788A}\x{788B}\x{788C}\x{788D}\x{788E}\x{788F}\x{7890}' - . '\x{7891}\x{7892}\x{7893}\x{7894}\x{7895}\x{7896}\x{7897}\x{7898}\x{7899}' - . '\x{789A}\x{789B}\x{789C}\x{789D}\x{789E}\x{789F}\x{78A0}\x{78A1}\x{78A2}' - . '\x{78A3}\x{78A4}\x{78A5}\x{78A6}\x{78A7}\x{78A8}\x{78A9}\x{78AA}\x{78AB}' - . '\x{78AC}\x{78AD}\x{78AE}\x{78AF}\x{78B0}\x{78B1}\x{78B2}\x{78B3}\x{78B4}' - . '\x{78B5}\x{78B6}\x{78B7}\x{78B8}\x{78B9}\x{78BA}\x{78BB}\x{78BC}\x{78BD}' - . '\x{78BE}\x{78BF}\x{78C0}\x{78C1}\x{78C3}\x{78C4}\x{78C5}\x{78C6}\x{78C8}' - . '\x{78C9}\x{78CA}\x{78CB}\x{78CC}\x{78CD}\x{78CE}\x{78CF}\x{78D0}\x{78D1}' - . '\x{78D3}\x{78D4}\x{78D5}\x{78D6}\x{78D7}\x{78D8}\x{78D9}\x{78DA}\x{78DB}' - . '\x{78DC}\x{78DD}\x{78DE}\x{78DF}\x{78E0}\x{78E1}\x{78E2}\x{78E3}\x{78E4}' - . '\x{78E5}\x{78E6}\x{78E7}\x{78E8}\x{78E9}\x{78EA}\x{78EB}\x{78EC}\x{78ED}' - . '\x{78EE}\x{78EF}\x{78F1}\x{78F2}\x{78F3}\x{78F4}\x{78F5}\x{78F6}\x{78F7}' - . '\x{78F9}\x{78FA}\x{78FB}\x{78FC}\x{78FD}\x{78FE}\x{78FF}\x{7901}\x{7902}' - . '\x{7903}\x{7904}\x{7905}\x{7906}\x{7907}\x{7909}\x{790A}\x{790B}\x{790C}' - . '\x{790E}\x{790F}\x{7910}\x{7911}\x{7912}\x{7913}\x{7914}\x{7916}\x{7917}' - . '\x{7918}\x{7919}\x{791A}\x{791B}\x{791C}\x{791D}\x{791E}\x{7921}\x{7922}' - . '\x{7923}\x{7924}\x{7925}\x{7926}\x{7927}\x{7928}\x{7929}\x{792A}\x{792B}' - . '\x{792C}\x{792D}\x{792E}\x{792F}\x{7930}\x{7931}\x{7933}\x{7934}\x{7935}' - . '\x{7937}\x{7938}\x{7939}\x{793A}\x{793B}\x{793C}\x{793D}\x{793E}\x{793F}' - . '\x{7940}\x{7941}\x{7942}\x{7943}\x{7944}\x{7945}\x{7946}\x{7947}\x{7948}' - . '\x{7949}\x{794A}\x{794B}\x{794C}\x{794D}\x{794E}\x{794F}\x{7950}\x{7951}' - . '\x{7952}\x{7953}\x{7954}\x{7955}\x{7956}\x{7957}\x{7958}\x{795A}\x{795B}' - . '\x{795C}\x{795D}\x{795E}\x{795F}\x{7960}\x{7961}\x{7962}\x{7963}\x{7964}' - . '\x{7965}\x{7966}\x{7967}\x{7968}\x{7969}\x{796A}\x{796B}\x{796D}\x{796F}' - . '\x{7970}\x{7971}\x{7972}\x{7973}\x{7974}\x{7977}\x{7978}\x{7979}\x{797A}' - . '\x{797B}\x{797C}\x{797D}\x{797E}\x{797F}\x{7980}\x{7981}\x{7982}\x{7983}' - . '\x{7984}\x{7985}\x{7988}\x{7989}\x{798A}\x{798B}\x{798C}\x{798D}\x{798E}' - . '\x{798F}\x{7990}\x{7991}\x{7992}\x{7993}\x{7994}\x{7995}\x{7996}\x{7997}' - . '\x{7998}\x{7999}\x{799A}\x{799B}\x{799C}\x{799F}\x{79A0}\x{79A1}\x{79A2}' - . '\x{79A3}\x{79A4}\x{79A5}\x{79A6}\x{79A7}\x{79A8}\x{79AA}\x{79AB}\x{79AC}' - . '\x{79AD}\x{79AE}\x{79AF}\x{79B0}\x{79B1}\x{79B2}\x{79B3}\x{79B4}\x{79B5}' - . '\x{79B6}\x{79B7}\x{79B8}\x{79B9}\x{79BA}\x{79BB}\x{79BD}\x{79BE}\x{79BF}' - . '\x{79C0}\x{79C1}\x{79C2}\x{79C3}\x{79C5}\x{79C6}\x{79C8}\x{79C9}\x{79CA}' - . '\x{79CB}\x{79CD}\x{79CE}\x{79CF}\x{79D0}\x{79D1}\x{79D2}\x{79D3}\x{79D5}' - . '\x{79D6}\x{79D8}\x{79D9}\x{79DA}\x{79DB}\x{79DC}\x{79DD}\x{79DE}\x{79DF}' - . '\x{79E0}\x{79E1}\x{79E2}\x{79E3}\x{79E4}\x{79E5}\x{79E6}\x{79E7}\x{79E8}' - . '\x{79E9}\x{79EA}\x{79EB}\x{79EC}\x{79ED}\x{79EE}\x{79EF}\x{79F0}\x{79F1}' - . '\x{79F2}\x{79F3}\x{79F4}\x{79F5}\x{79F6}\x{79F7}\x{79F8}\x{79F9}\x{79FA}' - . '\x{79FB}\x{79FC}\x{79FD}\x{79FE}\x{79FF}\x{7A00}\x{7A02}\x{7A03}\x{7A04}' - . '\x{7A05}\x{7A06}\x{7A08}\x{7A0A}\x{7A0B}\x{7A0C}\x{7A0D}\x{7A0E}\x{7A0F}' - . '\x{7A10}\x{7A11}\x{7A12}\x{7A13}\x{7A14}\x{7A15}\x{7A16}\x{7A17}\x{7A18}' - . '\x{7A19}\x{7A1A}\x{7A1B}\x{7A1C}\x{7A1D}\x{7A1E}\x{7A1F}\x{7A20}\x{7A21}' - . '\x{7A22}\x{7A23}\x{7A24}\x{7A25}\x{7A26}\x{7A27}\x{7A28}\x{7A29}\x{7A2A}' - . '\x{7A2B}\x{7A2D}\x{7A2E}\x{7A2F}\x{7A30}\x{7A31}\x{7A32}\x{7A33}\x{7A34}' - . '\x{7A35}\x{7A37}\x{7A39}\x{7A3B}\x{7A3C}\x{7A3D}\x{7A3E}\x{7A3F}\x{7A40}' - . '\x{7A41}\x{7A42}\x{7A43}\x{7A44}\x{7A45}\x{7A46}\x{7A47}\x{7A48}\x{7A49}' - . '\x{7A4A}\x{7A4B}\x{7A4C}\x{7A4D}\x{7A4E}\x{7A50}\x{7A51}\x{7A52}\x{7A53}' - . '\x{7A54}\x{7A55}\x{7A56}\x{7A57}\x{7A58}\x{7A59}\x{7A5A}\x{7A5B}\x{7A5C}' - . '\x{7A5D}\x{7A5E}\x{7A5F}\x{7A60}\x{7A61}\x{7A62}\x{7A65}\x{7A66}\x{7A67}' - . '\x{7A68}\x{7A69}\x{7A6B}\x{7A6C}\x{7A6D}\x{7A6E}\x{7A70}\x{7A71}\x{7A72}' - . '\x{7A73}\x{7A74}\x{7A75}\x{7A76}\x{7A77}\x{7A78}\x{7A79}\x{7A7A}\x{7A7B}' - . '\x{7A7C}\x{7A7D}\x{7A7E}\x{7A7F}\x{7A80}\x{7A81}\x{7A83}\x{7A84}\x{7A85}' - . '\x{7A86}\x{7A87}\x{7A88}\x{7A89}\x{7A8A}\x{7A8B}\x{7A8C}\x{7A8D}\x{7A8E}' - . '\x{7A8F}\x{7A90}\x{7A91}\x{7A92}\x{7A93}\x{7A94}\x{7A95}\x{7A96}\x{7A97}' - . '\x{7A98}\x{7A99}\x{7A9C}\x{7A9D}\x{7A9E}\x{7A9F}\x{7AA0}\x{7AA1}\x{7AA2}' - . '\x{7AA3}\x{7AA4}\x{7AA5}\x{7AA6}\x{7AA7}\x{7AA8}\x{7AA9}\x{7AAA}\x{7AAB}' - . '\x{7AAC}\x{7AAD}\x{7AAE}\x{7AAF}\x{7AB0}\x{7AB1}\x{7AB2}\x{7AB3}\x{7AB4}' - . '\x{7AB5}\x{7AB6}\x{7AB7}\x{7AB8}\x{7ABA}\x{7ABE}\x{7ABF}\x{7AC0}\x{7AC1}' - . '\x{7AC4}\x{7AC5}\x{7AC7}\x{7AC8}\x{7AC9}\x{7ACA}\x{7ACB}\x{7ACC}\x{7ACD}' - . '\x{7ACE}\x{7ACF}\x{7AD0}\x{7AD1}\x{7AD2}\x{7AD3}\x{7AD4}\x{7AD5}\x{7AD6}' - . '\x{7AD8}\x{7AD9}\x{7ADB}\x{7ADC}\x{7ADD}\x{7ADE}\x{7ADF}\x{7AE0}\x{7AE1}' - . '\x{7AE2}\x{7AE3}\x{7AE4}\x{7AE5}\x{7AE6}\x{7AE7}\x{7AE8}\x{7AEA}\x{7AEB}' - . '\x{7AEC}\x{7AED}\x{7AEE}\x{7AEF}\x{7AF0}\x{7AF1}\x{7AF2}\x{7AF3}\x{7AF4}' - . '\x{7AF6}\x{7AF7}\x{7AF8}\x{7AF9}\x{7AFA}\x{7AFB}\x{7AFD}\x{7AFE}\x{7AFF}' - . '\x{7B00}\x{7B01}\x{7B02}\x{7B03}\x{7B04}\x{7B05}\x{7B06}\x{7B08}\x{7B09}' - . '\x{7B0A}\x{7B0B}\x{7B0C}\x{7B0D}\x{7B0E}\x{7B0F}\x{7B10}\x{7B11}\x{7B12}' - . '\x{7B13}\x{7B14}\x{7B15}\x{7B16}\x{7B17}\x{7B18}\x{7B19}\x{7B1A}\x{7B1B}' - . '\x{7B1C}\x{7B1D}\x{7B1E}\x{7B20}\x{7B21}\x{7B22}\x{7B23}\x{7B24}\x{7B25}' - . '\x{7B26}\x{7B28}\x{7B2A}\x{7B2B}\x{7B2C}\x{7B2D}\x{7B2E}\x{7B2F}\x{7B30}' - . '\x{7B31}\x{7B32}\x{7B33}\x{7B34}\x{7B35}\x{7B36}\x{7B37}\x{7B38}\x{7B39}' - . '\x{7B3A}\x{7B3B}\x{7B3C}\x{7B3D}\x{7B3E}\x{7B3F}\x{7B40}\x{7B41}\x{7B43}' - . '\x{7B44}\x{7B45}\x{7B46}\x{7B47}\x{7B48}\x{7B49}\x{7B4A}\x{7B4B}\x{7B4C}' - . '\x{7B4D}\x{7B4E}\x{7B4F}\x{7B50}\x{7B51}\x{7B52}\x{7B54}\x{7B55}\x{7B56}' - . '\x{7B57}\x{7B58}\x{7B59}\x{7B5A}\x{7B5B}\x{7B5C}\x{7B5D}\x{7B5E}\x{7B5F}' - . '\x{7B60}\x{7B61}\x{7B62}\x{7B63}\x{7B64}\x{7B65}\x{7B66}\x{7B67}\x{7B68}' - . '\x{7B69}\x{7B6A}\x{7B6B}\x{7B6C}\x{7B6D}\x{7B6E}\x{7B70}\x{7B71}\x{7B72}' - . '\x{7B73}\x{7B74}\x{7B75}\x{7B76}\x{7B77}\x{7B78}\x{7B79}\x{7B7B}\x{7B7C}' - . '\x{7B7D}\x{7B7E}\x{7B7F}\x{7B80}\x{7B81}\x{7B82}\x{7B83}\x{7B84}\x{7B85}' - . '\x{7B87}\x{7B88}\x{7B89}\x{7B8A}\x{7B8B}\x{7B8C}\x{7B8D}\x{7B8E}\x{7B8F}' - . '\x{7B90}\x{7B91}\x{7B93}\x{7B94}\x{7B95}\x{7B96}\x{7B97}\x{7B98}\x{7B99}' - . '\x{7B9A}\x{7B9B}\x{7B9C}\x{7B9D}\x{7B9E}\x{7B9F}\x{7BA0}\x{7BA1}\x{7BA2}' - . '\x{7BA4}\x{7BA6}\x{7BA7}\x{7BA8}\x{7BA9}\x{7BAA}\x{7BAB}\x{7BAC}\x{7BAD}' - . '\x{7BAE}\x{7BAF}\x{7BB1}\x{7BB3}\x{7BB4}\x{7BB5}\x{7BB6}\x{7BB7}\x{7BB8}' - . '\x{7BB9}\x{7BBA}\x{7BBB}\x{7BBC}\x{7BBD}\x{7BBE}\x{7BBF}\x{7BC0}\x{7BC1}' - . '\x{7BC2}\x{7BC3}\x{7BC4}\x{7BC5}\x{7BC6}\x{7BC7}\x{7BC8}\x{7BC9}\x{7BCA}' - . '\x{7BCB}\x{7BCC}\x{7BCD}\x{7BCE}\x{7BD0}\x{7BD1}\x{7BD2}\x{7BD3}\x{7BD4}' - . '\x{7BD5}\x{7BD6}\x{7BD7}\x{7BD8}\x{7BD9}\x{7BDA}\x{7BDB}\x{7BDC}\x{7BDD}' - . '\x{7BDE}\x{7BDF}\x{7BE0}\x{7BE1}\x{7BE2}\x{7BE3}\x{7BE4}\x{7BE5}\x{7BE6}' - . '\x{7BE7}\x{7BE8}\x{7BE9}\x{7BEA}\x{7BEB}\x{7BEC}\x{7BED}\x{7BEE}\x{7BEF}' - . '\x{7BF0}\x{7BF1}\x{7BF2}\x{7BF3}\x{7BF4}\x{7BF5}\x{7BF6}\x{7BF7}\x{7BF8}' - . '\x{7BF9}\x{7BFB}\x{7BFC}\x{7BFD}\x{7BFE}\x{7BFF}\x{7C00}\x{7C01}\x{7C02}' - . '\x{7C03}\x{7C04}\x{7C05}\x{7C06}\x{7C07}\x{7C08}\x{7C09}\x{7C0A}\x{7C0B}' - . '\x{7C0C}\x{7C0D}\x{7C0E}\x{7C0F}\x{7C10}\x{7C11}\x{7C12}\x{7C13}\x{7C15}' - . '\x{7C16}\x{7C17}\x{7C18}\x{7C19}\x{7C1A}\x{7C1C}\x{7C1D}\x{7C1E}\x{7C1F}' - . '\x{7C20}\x{7C21}\x{7C22}\x{7C23}\x{7C24}\x{7C25}\x{7C26}\x{7C27}\x{7C28}' - . '\x{7C29}\x{7C2A}\x{7C2B}\x{7C2C}\x{7C2D}\x{7C30}\x{7C31}\x{7C32}\x{7C33}' - . '\x{7C34}\x{7C35}\x{7C36}\x{7C37}\x{7C38}\x{7C39}\x{7C3A}\x{7C3B}\x{7C3C}' - . '\x{7C3D}\x{7C3E}\x{7C3F}\x{7C40}\x{7C41}\x{7C42}\x{7C43}\x{7C44}\x{7C45}' - . '\x{7C46}\x{7C47}\x{7C48}\x{7C49}\x{7C4A}\x{7C4B}\x{7C4C}\x{7C4D}\x{7C4E}' - . '\x{7C50}\x{7C51}\x{7C53}\x{7C54}\x{7C56}\x{7C57}\x{7C58}\x{7C59}\x{7C5A}' - . '\x{7C5B}\x{7C5C}\x{7C5E}\x{7C5F}\x{7C60}\x{7C61}\x{7C62}\x{7C63}\x{7C64}' - . '\x{7C65}\x{7C66}\x{7C67}\x{7C68}\x{7C69}\x{7C6A}\x{7C6B}\x{7C6C}\x{7C6D}' - . '\x{7C6E}\x{7C6F}\x{7C70}\x{7C71}\x{7C72}\x{7C73}\x{7C74}\x{7C75}\x{7C77}' - . '\x{7C78}\x{7C79}\x{7C7A}\x{7C7B}\x{7C7C}\x{7C7D}\x{7C7E}\x{7C7F}\x{7C80}' - . '\x{7C81}\x{7C82}\x{7C84}\x{7C85}\x{7C86}\x{7C88}\x{7C89}\x{7C8A}\x{7C8B}' - . '\x{7C8C}\x{7C8D}\x{7C8E}\x{7C8F}\x{7C90}\x{7C91}\x{7C92}\x{7C94}\x{7C95}' - . '\x{7C96}\x{7C97}\x{7C98}\x{7C99}\x{7C9B}\x{7C9C}\x{7C9D}\x{7C9E}\x{7C9F}' - . '\x{7CA0}\x{7CA1}\x{7CA2}\x{7CA3}\x{7CA4}\x{7CA5}\x{7CA6}\x{7CA7}\x{7CA8}' - . '\x{7CA9}\x{7CAA}\x{7CAD}\x{7CAE}\x{7CAF}\x{7CB0}\x{7CB1}\x{7CB2}\x{7CB3}' - . '\x{7CB4}\x{7CB5}\x{7CB6}\x{7CB7}\x{7CB8}\x{7CB9}\x{7CBA}\x{7CBB}\x{7CBC}' - . '\x{7CBD}\x{7CBE}\x{7CBF}\x{7CC0}\x{7CC1}\x{7CC2}\x{7CC3}\x{7CC4}\x{7CC5}' - . '\x{7CC6}\x{7CC7}\x{7CC8}\x{7CC9}\x{7CCA}\x{7CCB}\x{7CCC}\x{7CCD}\x{7CCE}' - . '\x{7CCF}\x{7CD0}\x{7CD1}\x{7CD2}\x{7CD4}\x{7CD5}\x{7CD6}\x{7CD7}\x{7CD8}' - . '\x{7CD9}\x{7CDC}\x{7CDD}\x{7CDE}\x{7CDF}\x{7CE0}\x{7CE2}\x{7CE4}\x{7CE7}' - . '\x{7CE8}\x{7CE9}\x{7CEA}\x{7CEB}\x{7CEC}\x{7CED}\x{7CEE}\x{7CEF}\x{7CF0}' - . '\x{7CF1}\x{7CF2}\x{7CF3}\x{7CF4}\x{7CF5}\x{7CF6}\x{7CF7}\x{7CF8}\x{7CF9}' - . '\x{7CFA}\x{7CFB}\x{7CFD}\x{7CFE}\x{7D00}\x{7D01}\x{7D02}\x{7D03}\x{7D04}' - . '\x{7D05}\x{7D06}\x{7D07}\x{7D08}\x{7D09}\x{7D0A}\x{7D0B}\x{7D0C}\x{7D0D}' - . '\x{7D0E}\x{7D0F}\x{7D10}\x{7D11}\x{7D12}\x{7D13}\x{7D14}\x{7D15}\x{7D16}' - . '\x{7D17}\x{7D18}\x{7D19}\x{7D1A}\x{7D1B}\x{7D1C}\x{7D1D}\x{7D1E}\x{7D1F}' - . '\x{7D20}\x{7D21}\x{7D22}\x{7D24}\x{7D25}\x{7D26}\x{7D27}\x{7D28}\x{7D29}' - . '\x{7D2B}\x{7D2C}\x{7D2E}\x{7D2F}\x{7D30}\x{7D31}\x{7D32}\x{7D33}\x{7D34}' - . '\x{7D35}\x{7D36}\x{7D37}\x{7D38}\x{7D39}\x{7D3A}\x{7D3B}\x{7D3C}\x{7D3D}' - . '\x{7D3E}\x{7D3F}\x{7D40}\x{7D41}\x{7D42}\x{7D43}\x{7D44}\x{7D45}\x{7D46}' - . '\x{7D47}\x{7D49}\x{7D4A}\x{7D4B}\x{7D4C}\x{7D4E}\x{7D4F}\x{7D50}\x{7D51}' - . '\x{7D52}\x{7D53}\x{7D54}\x{7D55}\x{7D56}\x{7D57}\x{7D58}\x{7D59}\x{7D5B}' - . '\x{7D5C}\x{7D5D}\x{7D5E}\x{7D5F}\x{7D60}\x{7D61}\x{7D62}\x{7D63}\x{7D65}' - . '\x{7D66}\x{7D67}\x{7D68}\x{7D69}\x{7D6A}\x{7D6B}\x{7D6C}\x{7D6D}\x{7D6E}' - . '\x{7D6F}\x{7D70}\x{7D71}\x{7D72}\x{7D73}\x{7D74}\x{7D75}\x{7D76}\x{7D77}' - . '\x{7D79}\x{7D7A}\x{7D7B}\x{7D7C}\x{7D7D}\x{7D7E}\x{7D7F}\x{7D80}\x{7D81}' - . '\x{7D83}\x{7D84}\x{7D85}\x{7D86}\x{7D87}\x{7D88}\x{7D89}\x{7D8A}\x{7D8B}' - . '\x{7D8C}\x{7D8D}\x{7D8E}\x{7D8F}\x{7D90}\x{7D91}\x{7D92}\x{7D93}\x{7D94}' - . '\x{7D96}\x{7D97}\x{7D99}\x{7D9B}\x{7D9C}\x{7D9D}\x{7D9E}\x{7D9F}\x{7DA0}' - . '\x{7DA1}\x{7DA2}\x{7DA3}\x{7DA5}\x{7DA6}\x{7DA7}\x{7DA9}\x{7DAA}\x{7DAB}' - . '\x{7DAC}\x{7DAD}\x{7DAE}\x{7DAF}\x{7DB0}\x{7DB1}\x{7DB2}\x{7DB3}\x{7DB4}' - . '\x{7DB5}\x{7DB6}\x{7DB7}\x{7DB8}\x{7DB9}\x{7DBA}\x{7DBB}\x{7DBC}\x{7DBD}' - . '\x{7DBE}\x{7DBF}\x{7DC0}\x{7DC1}\x{7DC2}\x{7DC3}\x{7DC4}\x{7DC5}\x{7DC6}' - . '\x{7DC7}\x{7DC8}\x{7DC9}\x{7DCA}\x{7DCB}\x{7DCC}\x{7DCE}\x{7DCF}\x{7DD0}' - . '\x{7DD1}\x{7DD2}\x{7DD4}\x{7DD5}\x{7DD6}\x{7DD7}\x{7DD8}\x{7DD9}\x{7DDA}' - . '\x{7DDB}\x{7DDD}\x{7DDE}\x{7DDF}\x{7DE0}\x{7DE1}\x{7DE2}\x{7DE3}\x{7DE6}' - . '\x{7DE7}\x{7DE8}\x{7DE9}\x{7DEA}\x{7DEC}\x{7DED}\x{7DEE}\x{7DEF}\x{7DF0}' - . '\x{7DF1}\x{7DF2}\x{7DF3}\x{7DF4}\x{7DF5}\x{7DF6}\x{7DF7}\x{7DF8}\x{7DF9}' - . '\x{7DFA}\x{7DFB}\x{7DFC}\x{7E00}\x{7E01}\x{7E02}\x{7E03}\x{7E04}\x{7E05}' - . '\x{7E06}\x{7E07}\x{7E08}\x{7E09}\x{7E0A}\x{7E0B}\x{7E0C}\x{7E0D}\x{7E0E}' - . '\x{7E0F}\x{7E10}\x{7E11}\x{7E12}\x{7E13}\x{7E14}\x{7E15}\x{7E16}\x{7E17}' - . '\x{7E19}\x{7E1A}\x{7E1B}\x{7E1C}\x{7E1D}\x{7E1E}\x{7E1F}\x{7E20}\x{7E21}' - . '\x{7E22}\x{7E23}\x{7E24}\x{7E25}\x{7E26}\x{7E27}\x{7E28}\x{7E29}\x{7E2A}' - . '\x{7E2B}\x{7E2C}\x{7E2D}\x{7E2E}\x{7E2F}\x{7E30}\x{7E31}\x{7E32}\x{7E33}' - . '\x{7E34}\x{7E35}\x{7E36}\x{7E37}\x{7E38}\x{7E39}\x{7E3A}\x{7E3B}\x{7E3C}' - . '\x{7E3D}\x{7E3E}\x{7E3F}\x{7E40}\x{7E41}\x{7E42}\x{7E43}\x{7E44}\x{7E45}' - . '\x{7E46}\x{7E47}\x{7E48}\x{7E49}\x{7E4C}\x{7E4D}\x{7E4E}\x{7E4F}\x{7E50}' - . '\x{7E51}\x{7E52}\x{7E53}\x{7E54}\x{7E55}\x{7E56}\x{7E57}\x{7E58}\x{7E59}' - . '\x{7E5A}\x{7E5C}\x{7E5D}\x{7E5E}\x{7E5F}\x{7E60}\x{7E61}\x{7E62}\x{7E63}' - . '\x{7E65}\x{7E66}\x{7E67}\x{7E68}\x{7E69}\x{7E6A}\x{7E6B}\x{7E6C}\x{7E6D}' - . '\x{7E6E}\x{7E6F}\x{7E70}\x{7E71}\x{7E72}\x{7E73}\x{7E74}\x{7E75}\x{7E76}' - . '\x{7E77}\x{7E78}\x{7E79}\x{7E7A}\x{7E7B}\x{7E7C}\x{7E7D}\x{7E7E}\x{7E7F}' - . '\x{7E80}\x{7E81}\x{7E82}\x{7E83}\x{7E84}\x{7E85}\x{7E86}\x{7E87}\x{7E88}' - . '\x{7E89}\x{7E8A}\x{7E8B}\x{7E8C}\x{7E8D}\x{7E8E}\x{7E8F}\x{7E90}\x{7E91}' - . '\x{7E92}\x{7E93}\x{7E94}\x{7E95}\x{7E96}\x{7E97}\x{7E98}\x{7E99}\x{7E9A}' - . '\x{7E9B}\x{7E9C}\x{7E9E}\x{7E9F}\x{7EA0}\x{7EA1}\x{7EA2}\x{7EA3}\x{7EA4}' - . '\x{7EA5}\x{7EA6}\x{7EA7}\x{7EA8}\x{7EA9}\x{7EAA}\x{7EAB}\x{7EAC}\x{7EAD}' - . '\x{7EAE}\x{7EAF}\x{7EB0}\x{7EB1}\x{7EB2}\x{7EB3}\x{7EB4}\x{7EB5}\x{7EB6}' - . '\x{7EB7}\x{7EB8}\x{7EB9}\x{7EBA}\x{7EBB}\x{7EBC}\x{7EBD}\x{7EBE}\x{7EBF}' - . '\x{7EC0}\x{7EC1}\x{7EC2}\x{7EC3}\x{7EC4}\x{7EC5}\x{7EC6}\x{7EC7}\x{7EC8}' - . '\x{7EC9}\x{7ECA}\x{7ECB}\x{7ECC}\x{7ECD}\x{7ECE}\x{7ECF}\x{7ED0}\x{7ED1}' - . '\x{7ED2}\x{7ED3}\x{7ED4}\x{7ED5}\x{7ED6}\x{7ED7}\x{7ED8}\x{7ED9}\x{7EDA}' - . '\x{7EDB}\x{7EDC}\x{7EDD}\x{7EDE}\x{7EDF}\x{7EE0}\x{7EE1}\x{7EE2}\x{7EE3}' - . '\x{7EE4}\x{7EE5}\x{7EE6}\x{7EE7}\x{7EE8}\x{7EE9}\x{7EEA}\x{7EEB}\x{7EEC}' - . '\x{7EED}\x{7EEE}\x{7EEF}\x{7EF0}\x{7EF1}\x{7EF2}\x{7EF3}\x{7EF4}\x{7EF5}' - . '\x{7EF6}\x{7EF7}\x{7EF8}\x{7EF9}\x{7EFA}\x{7EFB}\x{7EFC}\x{7EFD}\x{7EFE}' - . '\x{7EFF}\x{7F00}\x{7F01}\x{7F02}\x{7F03}\x{7F04}\x{7F05}\x{7F06}\x{7F07}' - . '\x{7F08}\x{7F09}\x{7F0A}\x{7F0B}\x{7F0C}\x{7F0D}\x{7F0E}\x{7F0F}\x{7F10}' - . '\x{7F11}\x{7F12}\x{7F13}\x{7F14}\x{7F15}\x{7F16}\x{7F17}\x{7F18}\x{7F19}' - . '\x{7F1A}\x{7F1B}\x{7F1C}\x{7F1D}\x{7F1E}\x{7F1F}\x{7F20}\x{7F21}\x{7F22}' - . '\x{7F23}\x{7F24}\x{7F25}\x{7F26}\x{7F27}\x{7F28}\x{7F29}\x{7F2A}\x{7F2B}' - . '\x{7F2C}\x{7F2D}\x{7F2E}\x{7F2F}\x{7F30}\x{7F31}\x{7F32}\x{7F33}\x{7F34}' - . '\x{7F35}\x{7F36}\x{7F37}\x{7F38}\x{7F39}\x{7F3A}\x{7F3D}\x{7F3E}\x{7F3F}' - . '\x{7F40}\x{7F42}\x{7F43}\x{7F44}\x{7F45}\x{7F47}\x{7F48}\x{7F49}\x{7F4A}' - . '\x{7F4B}\x{7F4C}\x{7F4D}\x{7F4E}\x{7F4F}\x{7F50}\x{7F51}\x{7F52}\x{7F53}' - . '\x{7F54}\x{7F55}\x{7F56}\x{7F57}\x{7F58}\x{7F5A}\x{7F5B}\x{7F5C}\x{7F5D}' - . '\x{7F5E}\x{7F5F}\x{7F60}\x{7F61}\x{7F62}\x{7F63}\x{7F64}\x{7F65}\x{7F66}' - . '\x{7F67}\x{7F68}\x{7F69}\x{7F6A}\x{7F6B}\x{7F6C}\x{7F6D}\x{7F6E}\x{7F6F}' - . '\x{7F70}\x{7F71}\x{7F72}\x{7F73}\x{7F74}\x{7F75}\x{7F76}\x{7F77}\x{7F78}' - . '\x{7F79}\x{7F7A}\x{7F7B}\x{7F7C}\x{7F7D}\x{7F7E}\x{7F7F}\x{7F80}\x{7F81}' - . '\x{7F82}\x{7F83}\x{7F85}\x{7F86}\x{7F87}\x{7F88}\x{7F89}\x{7F8A}\x{7F8B}' - . '\x{7F8C}\x{7F8D}\x{7F8E}\x{7F8F}\x{7F91}\x{7F92}\x{7F93}\x{7F94}\x{7F95}' - . '\x{7F96}\x{7F98}\x{7F9A}\x{7F9B}\x{7F9C}\x{7F9D}\x{7F9E}\x{7F9F}\x{7FA0}' - . '\x{7FA1}\x{7FA2}\x{7FA3}\x{7FA4}\x{7FA5}\x{7FA6}\x{7FA7}\x{7FA8}\x{7FA9}' - . '\x{7FAA}\x{7FAB}\x{7FAC}\x{7FAD}\x{7FAE}\x{7FAF}\x{7FB0}\x{7FB1}\x{7FB2}' - . '\x{7FB3}\x{7FB5}\x{7FB6}\x{7FB7}\x{7FB8}\x{7FB9}\x{7FBA}\x{7FBB}\x{7FBC}' - . '\x{7FBD}\x{7FBE}\x{7FBF}\x{7FC0}\x{7FC1}\x{7FC2}\x{7FC3}\x{7FC4}\x{7FC5}' - . '\x{7FC6}\x{7FC7}\x{7FC8}\x{7FC9}\x{7FCA}\x{7FCB}\x{7FCC}\x{7FCD}\x{7FCE}' - . '\x{7FCF}\x{7FD0}\x{7FD1}\x{7FD2}\x{7FD3}\x{7FD4}\x{7FD5}\x{7FD7}\x{7FD8}' - . '\x{7FD9}\x{7FDA}\x{7FDB}\x{7FDC}\x{7FDE}\x{7FDF}\x{7FE0}\x{7FE1}\x{7FE2}' - . '\x{7FE3}\x{7FE5}\x{7FE6}\x{7FE7}\x{7FE8}\x{7FE9}\x{7FEA}\x{7FEB}\x{7FEC}' - . '\x{7FED}\x{7FEE}\x{7FEF}\x{7FF0}\x{7FF1}\x{7FF2}\x{7FF3}\x{7FF4}\x{7FF5}' - . '\x{7FF6}\x{7FF7}\x{7FF8}\x{7FF9}\x{7FFA}\x{7FFB}\x{7FFC}\x{7FFD}\x{7FFE}' - . '\x{7FFF}\x{8000}\x{8001}\x{8002}\x{8003}\x{8004}\x{8005}\x{8006}\x{8007}' - . '\x{8008}\x{8009}\x{800B}\x{800C}\x{800D}\x{800E}\x{800F}\x{8010}\x{8011}' - . '\x{8012}\x{8013}\x{8014}\x{8015}\x{8016}\x{8017}\x{8018}\x{8019}\x{801A}' - . '\x{801B}\x{801C}\x{801D}\x{801E}\x{801F}\x{8020}\x{8021}\x{8022}\x{8023}' - . '\x{8024}\x{8025}\x{8026}\x{8027}\x{8028}\x{8029}\x{802A}\x{802B}\x{802C}' - . '\x{802D}\x{802E}\x{8030}\x{8031}\x{8032}\x{8033}\x{8034}\x{8035}\x{8036}' - . '\x{8037}\x{8038}\x{8039}\x{803A}\x{803B}\x{803D}\x{803E}\x{803F}\x{8041}' - . '\x{8042}\x{8043}\x{8044}\x{8045}\x{8046}\x{8047}\x{8048}\x{8049}\x{804A}' - . '\x{804B}\x{804C}\x{804D}\x{804E}\x{804F}\x{8050}\x{8051}\x{8052}\x{8053}' - . '\x{8054}\x{8055}\x{8056}\x{8057}\x{8058}\x{8059}\x{805A}\x{805B}\x{805C}' - . '\x{805D}\x{805E}\x{805F}\x{8060}\x{8061}\x{8062}\x{8063}\x{8064}\x{8065}' - . '\x{8067}\x{8068}\x{8069}\x{806A}\x{806B}\x{806C}\x{806D}\x{806E}\x{806F}' - . '\x{8070}\x{8071}\x{8072}\x{8073}\x{8074}\x{8075}\x{8076}\x{8077}\x{8078}' - . '\x{8079}\x{807A}\x{807B}\x{807C}\x{807D}\x{807E}\x{807F}\x{8080}\x{8081}' - . '\x{8082}\x{8083}\x{8084}\x{8085}\x{8086}\x{8087}\x{8089}\x{808A}\x{808B}' - . '\x{808C}\x{808D}\x{808F}\x{8090}\x{8091}\x{8092}\x{8093}\x{8095}\x{8096}' - . '\x{8097}\x{8098}\x{8099}\x{809A}\x{809B}\x{809C}\x{809D}\x{809E}\x{809F}' - . '\x{80A0}\x{80A1}\x{80A2}\x{80A3}\x{80A4}\x{80A5}\x{80A9}\x{80AA}\x{80AB}' - . '\x{80AD}\x{80AE}\x{80AF}\x{80B0}\x{80B1}\x{80B2}\x{80B4}\x{80B5}\x{80B6}' - . '\x{80B7}\x{80B8}\x{80BA}\x{80BB}\x{80BC}\x{80BD}\x{80BE}\x{80BF}\x{80C0}' - . '\x{80C1}\x{80C2}\x{80C3}\x{80C4}\x{80C5}\x{80C6}\x{80C7}\x{80C8}\x{80C9}' - . '\x{80CA}\x{80CB}\x{80CC}\x{80CD}\x{80CE}\x{80CF}\x{80D0}\x{80D1}\x{80D2}' - . '\x{80D3}\x{80D4}\x{80D5}\x{80D6}\x{80D7}\x{80D8}\x{80D9}\x{80DA}\x{80DB}' - . '\x{80DC}\x{80DD}\x{80DE}\x{80E0}\x{80E1}\x{80E2}\x{80E3}\x{80E4}\x{80E5}' - . '\x{80E6}\x{80E7}\x{80E8}\x{80E9}\x{80EA}\x{80EB}\x{80EC}\x{80ED}\x{80EE}' - . '\x{80EF}\x{80F0}\x{80F1}\x{80F2}\x{80F3}\x{80F4}\x{80F5}\x{80F6}\x{80F7}' - . '\x{80F8}\x{80F9}\x{80FA}\x{80FB}\x{80FC}\x{80FD}\x{80FE}\x{80FF}\x{8100}' - . '\x{8101}\x{8102}\x{8105}\x{8106}\x{8107}\x{8108}\x{8109}\x{810A}\x{810B}' - . '\x{810C}\x{810D}\x{810E}\x{810F}\x{8110}\x{8111}\x{8112}\x{8113}\x{8114}' - . '\x{8115}\x{8116}\x{8118}\x{8119}\x{811A}\x{811B}\x{811C}\x{811D}\x{811E}' - . '\x{811F}\x{8120}\x{8121}\x{8122}\x{8123}\x{8124}\x{8125}\x{8126}\x{8127}' - . '\x{8128}\x{8129}\x{812A}\x{812B}\x{812C}\x{812D}\x{812E}\x{812F}\x{8130}' - . '\x{8131}\x{8132}\x{8136}\x{8137}\x{8138}\x{8139}\x{813A}\x{813B}\x{813C}' - . '\x{813D}\x{813E}\x{813F}\x{8140}\x{8141}\x{8142}\x{8143}\x{8144}\x{8145}' - . '\x{8146}\x{8147}\x{8148}\x{8149}\x{814A}\x{814B}\x{814C}\x{814D}\x{814E}' - . '\x{814F}\x{8150}\x{8151}\x{8152}\x{8153}\x{8154}\x{8155}\x{8156}\x{8157}' - . '\x{8158}\x{8159}\x{815A}\x{815B}\x{815C}\x{815D}\x{815E}\x{8160}\x{8161}' - . '\x{8162}\x{8163}\x{8164}\x{8165}\x{8166}\x{8167}\x{8168}\x{8169}\x{816A}' - . '\x{816B}\x{816C}\x{816D}\x{816E}\x{816F}\x{8170}\x{8171}\x{8172}\x{8173}' - . '\x{8174}\x{8175}\x{8176}\x{8177}\x{8178}\x{8179}\x{817A}\x{817B}\x{817C}' - . '\x{817D}\x{817E}\x{817F}\x{8180}\x{8181}\x{8182}\x{8183}\x{8185}\x{8186}' - . '\x{8187}\x{8188}\x{8189}\x{818A}\x{818B}\x{818C}\x{818D}\x{818E}\x{818F}' - . '\x{8191}\x{8192}\x{8193}\x{8194}\x{8195}\x{8197}\x{8198}\x{8199}\x{819A}' - . '\x{819B}\x{819C}\x{819D}\x{819E}\x{819F}\x{81A0}\x{81A1}\x{81A2}\x{81A3}' - . '\x{81A4}\x{81A5}\x{81A6}\x{81A7}\x{81A8}\x{81A9}\x{81AA}\x{81AB}\x{81AC}' - . '\x{81AD}\x{81AE}\x{81AF}\x{81B0}\x{81B1}\x{81B2}\x{81B3}\x{81B4}\x{81B5}' - . '\x{81B6}\x{81B7}\x{81B8}\x{81B9}\x{81BA}\x{81BB}\x{81BC}\x{81BD}\x{81BE}' - . '\x{81BF}\x{81C0}\x{81C1}\x{81C2}\x{81C3}\x{81C4}\x{81C5}\x{81C6}\x{81C7}' - . '\x{81C8}\x{81C9}\x{81CA}\x{81CC}\x{81CD}\x{81CE}\x{81CF}\x{81D0}\x{81D1}' - . '\x{81D2}\x{81D4}\x{81D5}\x{81D6}\x{81D7}\x{81D8}\x{81D9}\x{81DA}\x{81DB}' - . '\x{81DC}\x{81DD}\x{81DE}\x{81DF}\x{81E0}\x{81E1}\x{81E2}\x{81E3}\x{81E5}' - . '\x{81E6}\x{81E7}\x{81E8}\x{81E9}\x{81EA}\x{81EB}\x{81EC}\x{81ED}\x{81EE}' - . '\x{81F1}\x{81F2}\x{81F3}\x{81F4}\x{81F5}\x{81F6}\x{81F7}\x{81F8}\x{81F9}' - . '\x{81FA}\x{81FB}\x{81FC}\x{81FD}\x{81FE}\x{81FF}\x{8200}\x{8201}\x{8202}' - . '\x{8203}\x{8204}\x{8205}\x{8206}\x{8207}\x{8208}\x{8209}\x{820A}\x{820B}' - . '\x{820C}\x{820D}\x{820E}\x{820F}\x{8210}\x{8211}\x{8212}\x{8214}\x{8215}' - . '\x{8216}\x{8218}\x{8219}\x{821A}\x{821B}\x{821C}\x{821D}\x{821E}\x{821F}' - . '\x{8220}\x{8221}\x{8222}\x{8223}\x{8225}\x{8226}\x{8227}\x{8228}\x{8229}' - . '\x{822A}\x{822B}\x{822C}\x{822D}\x{822F}\x{8230}\x{8231}\x{8232}\x{8233}' - . '\x{8234}\x{8235}\x{8236}\x{8237}\x{8238}\x{8239}\x{823A}\x{823B}\x{823C}' - . '\x{823D}\x{823E}\x{823F}\x{8240}\x{8242}\x{8243}\x{8244}\x{8245}\x{8246}' - . '\x{8247}\x{8248}\x{8249}\x{824A}\x{824B}\x{824C}\x{824D}\x{824E}\x{824F}' - . '\x{8250}\x{8251}\x{8252}\x{8253}\x{8254}\x{8255}\x{8256}\x{8257}\x{8258}' - . '\x{8259}\x{825A}\x{825B}\x{825C}\x{825D}\x{825E}\x{825F}\x{8260}\x{8261}' - . '\x{8263}\x{8264}\x{8266}\x{8267}\x{8268}\x{8269}\x{826A}\x{826B}\x{826C}' - . '\x{826D}\x{826E}\x{826F}\x{8270}\x{8271}\x{8272}\x{8273}\x{8274}\x{8275}' - . '\x{8276}\x{8277}\x{8278}\x{8279}\x{827A}\x{827B}\x{827C}\x{827D}\x{827E}' - . '\x{827F}\x{8280}\x{8281}\x{8282}\x{8283}\x{8284}\x{8285}\x{8286}\x{8287}' - . '\x{8288}\x{8289}\x{828A}\x{828B}\x{828D}\x{828E}\x{828F}\x{8290}\x{8291}' - . '\x{8292}\x{8293}\x{8294}\x{8295}\x{8296}\x{8297}\x{8298}\x{8299}\x{829A}' - . '\x{829B}\x{829C}\x{829D}\x{829E}\x{829F}\x{82A0}\x{82A1}\x{82A2}\x{82A3}' - . '\x{82A4}\x{82A5}\x{82A6}\x{82A7}\x{82A8}\x{82A9}\x{82AA}\x{82AB}\x{82AC}' - . '\x{82AD}\x{82AE}\x{82AF}\x{82B0}\x{82B1}\x{82B3}\x{82B4}\x{82B5}\x{82B6}' - . '\x{82B7}\x{82B8}\x{82B9}\x{82BA}\x{82BB}\x{82BC}\x{82BD}\x{82BE}\x{82BF}' - . '\x{82C0}\x{82C1}\x{82C2}\x{82C3}\x{82C4}\x{82C5}\x{82C6}\x{82C7}\x{82C8}' - . '\x{82C9}\x{82CA}\x{82CB}\x{82CC}\x{82CD}\x{82CE}\x{82CF}\x{82D0}\x{82D1}' - . '\x{82D2}\x{82D3}\x{82D4}\x{82D5}\x{82D6}\x{82D7}\x{82D8}\x{82D9}\x{82DA}' - . '\x{82DB}\x{82DC}\x{82DD}\x{82DE}\x{82DF}\x{82E0}\x{82E1}\x{82E3}\x{82E4}' - . '\x{82E5}\x{82E6}\x{82E7}\x{82E8}\x{82E9}\x{82EA}\x{82EB}\x{82EC}\x{82ED}' - . '\x{82EE}\x{82EF}\x{82F0}\x{82F1}\x{82F2}\x{82F3}\x{82F4}\x{82F5}\x{82F6}' - . '\x{82F7}\x{82F8}\x{82F9}\x{82FA}\x{82FB}\x{82FD}\x{82FE}\x{82FF}\x{8300}' - . '\x{8301}\x{8302}\x{8303}\x{8304}\x{8305}\x{8306}\x{8307}\x{8308}\x{8309}' - . '\x{830B}\x{830C}\x{830D}\x{830E}\x{830F}\x{8311}\x{8312}\x{8313}\x{8314}' - . '\x{8315}\x{8316}\x{8317}\x{8318}\x{8319}\x{831A}\x{831B}\x{831C}\x{831D}' - . '\x{831E}\x{831F}\x{8320}\x{8321}\x{8322}\x{8323}\x{8324}\x{8325}\x{8326}' - . '\x{8327}\x{8328}\x{8329}\x{832A}\x{832B}\x{832C}\x{832D}\x{832E}\x{832F}' - . '\x{8331}\x{8332}\x{8333}\x{8334}\x{8335}\x{8336}\x{8337}\x{8338}\x{8339}' - . '\x{833A}\x{833B}\x{833C}\x{833D}\x{833E}\x{833F}\x{8340}\x{8341}\x{8342}' - . '\x{8343}\x{8344}\x{8345}\x{8346}\x{8347}\x{8348}\x{8349}\x{834A}\x{834B}' - . '\x{834C}\x{834D}\x{834E}\x{834F}\x{8350}\x{8351}\x{8352}\x{8353}\x{8354}' - . '\x{8356}\x{8357}\x{8358}\x{8359}\x{835A}\x{835B}\x{835C}\x{835D}\x{835E}' - . '\x{835F}\x{8360}\x{8361}\x{8362}\x{8363}\x{8364}\x{8365}\x{8366}\x{8367}' - . '\x{8368}\x{8369}\x{836A}\x{836B}\x{836C}\x{836D}\x{836E}\x{836F}\x{8370}' - . '\x{8371}\x{8372}\x{8373}\x{8374}\x{8375}\x{8376}\x{8377}\x{8378}\x{8379}' - . '\x{837A}\x{837B}\x{837C}\x{837D}\x{837E}\x{837F}\x{8380}\x{8381}\x{8382}' - . '\x{8383}\x{8384}\x{8385}\x{8386}\x{8387}\x{8388}\x{8389}\x{838A}\x{838B}' - . '\x{838C}\x{838D}\x{838E}\x{838F}\x{8390}\x{8391}\x{8392}\x{8393}\x{8394}' - . '\x{8395}\x{8396}\x{8397}\x{8398}\x{8399}\x{839A}\x{839B}\x{839C}\x{839D}' - . '\x{839E}\x{83A0}\x{83A1}\x{83A2}\x{83A3}\x{83A4}\x{83A5}\x{83A6}\x{83A7}' - . '\x{83A8}\x{83A9}\x{83AA}\x{83AB}\x{83AC}\x{83AD}\x{83AE}\x{83AF}\x{83B0}' - . '\x{83B1}\x{83B2}\x{83B3}\x{83B4}\x{83B6}\x{83B7}\x{83B8}\x{83B9}\x{83BA}' - . '\x{83BB}\x{83BC}\x{83BD}\x{83BF}\x{83C0}\x{83C1}\x{83C2}\x{83C3}\x{83C4}' - . '\x{83C5}\x{83C6}\x{83C7}\x{83C8}\x{83C9}\x{83CA}\x{83CB}\x{83CC}\x{83CD}' - . '\x{83CE}\x{83CF}\x{83D0}\x{83D1}\x{83D2}\x{83D3}\x{83D4}\x{83D5}\x{83D6}' - . '\x{83D7}\x{83D8}\x{83D9}\x{83DA}\x{83DB}\x{83DC}\x{83DD}\x{83DE}\x{83DF}' - . '\x{83E0}\x{83E1}\x{83E2}\x{83E3}\x{83E4}\x{83E5}\x{83E7}\x{83E8}\x{83E9}' - . '\x{83EA}\x{83EB}\x{83EC}\x{83EE}\x{83EF}\x{83F0}\x{83F1}\x{83F2}\x{83F3}' - . '\x{83F4}\x{83F5}\x{83F6}\x{83F7}\x{83F8}\x{83F9}\x{83FA}\x{83FB}\x{83FC}' - . '\x{83FD}\x{83FE}\x{83FF}\x{8400}\x{8401}\x{8402}\x{8403}\x{8404}\x{8405}' - . '\x{8406}\x{8407}\x{8408}\x{8409}\x{840A}\x{840B}\x{840C}\x{840D}\x{840E}' - . '\x{840F}\x{8410}\x{8411}\x{8412}\x{8413}\x{8415}\x{8418}\x{8419}\x{841A}' - . '\x{841B}\x{841C}\x{841D}\x{841E}\x{8421}\x{8422}\x{8423}\x{8424}\x{8425}' - . '\x{8426}\x{8427}\x{8428}\x{8429}\x{842A}\x{842B}\x{842C}\x{842D}\x{842E}' - . '\x{842F}\x{8430}\x{8431}\x{8432}\x{8433}\x{8434}\x{8435}\x{8436}\x{8437}' - . '\x{8438}\x{8439}\x{843A}\x{843B}\x{843C}\x{843D}\x{843E}\x{843F}\x{8440}' - . '\x{8441}\x{8442}\x{8443}\x{8444}\x{8445}\x{8446}\x{8447}\x{8448}\x{8449}' - . '\x{844A}\x{844B}\x{844C}\x{844D}\x{844E}\x{844F}\x{8450}\x{8451}\x{8452}' - . '\x{8453}\x{8454}\x{8455}\x{8456}\x{8457}\x{8459}\x{845A}\x{845B}\x{845C}' - . '\x{845D}\x{845E}\x{845F}\x{8460}\x{8461}\x{8462}\x{8463}\x{8464}\x{8465}' - . '\x{8466}\x{8467}\x{8468}\x{8469}\x{846A}\x{846B}\x{846C}\x{846D}\x{846E}' - . '\x{846F}\x{8470}\x{8471}\x{8472}\x{8473}\x{8474}\x{8475}\x{8476}\x{8477}' - . '\x{8478}\x{8479}\x{847A}\x{847B}\x{847C}\x{847D}\x{847E}\x{847F}\x{8480}' - . '\x{8481}\x{8482}\x{8484}\x{8485}\x{8486}\x{8487}\x{8488}\x{8489}\x{848A}' - . '\x{848B}\x{848C}\x{848D}\x{848E}\x{848F}\x{8490}\x{8491}\x{8492}\x{8493}' - . '\x{8494}\x{8496}\x{8497}\x{8498}\x{8499}\x{849A}\x{849B}\x{849C}\x{849D}' - . '\x{849E}\x{849F}\x{84A0}\x{84A1}\x{84A2}\x{84A3}\x{84A4}\x{84A5}\x{84A6}' - . '\x{84A7}\x{84A8}\x{84A9}\x{84AA}\x{84AB}\x{84AC}\x{84AE}\x{84AF}\x{84B0}' - . '\x{84B1}\x{84B2}\x{84B3}\x{84B4}\x{84B5}\x{84B6}\x{84B8}\x{84B9}\x{84BA}' - . '\x{84BB}\x{84BC}\x{84BD}\x{84BE}\x{84BF}\x{84C0}\x{84C1}\x{84C2}\x{84C4}' - . '\x{84C5}\x{84C6}\x{84C7}\x{84C8}\x{84C9}\x{84CA}\x{84CB}\x{84CC}\x{84CD}' - . '\x{84CE}\x{84CF}\x{84D0}\x{84D1}\x{84D2}\x{84D3}\x{84D4}\x{84D5}\x{84D6}' - . '\x{84D7}\x{84D8}\x{84D9}\x{84DB}\x{84DC}\x{84DD}\x{84DE}\x{84DF}\x{84E0}' - . '\x{84E1}\x{84E2}\x{84E3}\x{84E4}\x{84E5}\x{84E6}\x{84E7}\x{84E8}\x{84E9}' - . '\x{84EA}\x{84EB}\x{84EC}\x{84EE}\x{84EF}\x{84F0}\x{84F1}\x{84F2}\x{84F3}' - . '\x{84F4}\x{84F5}\x{84F6}\x{84F7}\x{84F8}\x{84F9}\x{84FA}\x{84FB}\x{84FC}' - . '\x{84FD}\x{84FE}\x{84FF}\x{8500}\x{8501}\x{8502}\x{8503}\x{8504}\x{8506}' - . '\x{8507}\x{8508}\x{8509}\x{850A}\x{850B}\x{850C}\x{850D}\x{850E}\x{850F}' - . '\x{8511}\x{8512}\x{8513}\x{8514}\x{8515}\x{8516}\x{8517}\x{8518}\x{8519}' - . '\x{851A}\x{851B}\x{851C}\x{851D}\x{851E}\x{851F}\x{8520}\x{8521}\x{8522}' - . '\x{8523}\x{8524}\x{8525}\x{8526}\x{8527}\x{8528}\x{8529}\x{852A}\x{852B}' - . '\x{852C}\x{852D}\x{852E}\x{852F}\x{8530}\x{8531}\x{8534}\x{8535}\x{8536}' - . '\x{8537}\x{8538}\x{8539}\x{853A}\x{853B}\x{853C}\x{853D}\x{853E}\x{853F}' - . '\x{8540}\x{8541}\x{8542}\x{8543}\x{8544}\x{8545}\x{8546}\x{8547}\x{8548}' - . '\x{8549}\x{854A}\x{854B}\x{854D}\x{854E}\x{854F}\x{8551}\x{8552}\x{8553}' - . '\x{8554}\x{8555}\x{8556}\x{8557}\x{8558}\x{8559}\x{855A}\x{855B}\x{855C}' - . '\x{855D}\x{855E}\x{855F}\x{8560}\x{8561}\x{8562}\x{8563}\x{8564}\x{8565}' - . '\x{8566}\x{8567}\x{8568}\x{8569}\x{856A}\x{856B}\x{856C}\x{856D}\x{856E}' - . '\x{856F}\x{8570}\x{8571}\x{8572}\x{8573}\x{8574}\x{8575}\x{8576}\x{8577}' - . '\x{8578}\x{8579}\x{857A}\x{857B}\x{857C}\x{857D}\x{857E}\x{8580}\x{8581}' - . '\x{8582}\x{8583}\x{8584}\x{8585}\x{8586}\x{8587}\x{8588}\x{8589}\x{858A}' - . '\x{858B}\x{858C}\x{858D}\x{858E}\x{858F}\x{8590}\x{8591}\x{8592}\x{8594}' - . '\x{8595}\x{8596}\x{8598}\x{8599}\x{859A}\x{859B}\x{859C}\x{859D}\x{859E}' - . '\x{859F}\x{85A0}\x{85A1}\x{85A2}\x{85A3}\x{85A4}\x{85A5}\x{85A6}\x{85A7}' - . '\x{85A8}\x{85A9}\x{85AA}\x{85AB}\x{85AC}\x{85AD}\x{85AE}\x{85AF}\x{85B0}' - . '\x{85B1}\x{85B3}\x{85B4}\x{85B5}\x{85B6}\x{85B7}\x{85B8}\x{85B9}\x{85BA}' - . '\x{85BC}\x{85BD}\x{85BE}\x{85BF}\x{85C0}\x{85C1}\x{85C2}\x{85C3}\x{85C4}' - . '\x{85C5}\x{85C6}\x{85C7}\x{85C8}\x{85C9}\x{85CA}\x{85CB}\x{85CD}\x{85CE}' - . '\x{85CF}\x{85D0}\x{85D1}\x{85D2}\x{85D3}\x{85D4}\x{85D5}\x{85D6}\x{85D7}' - . '\x{85D8}\x{85D9}\x{85DA}\x{85DB}\x{85DC}\x{85DD}\x{85DE}\x{85DF}\x{85E0}' - . '\x{85E1}\x{85E2}\x{85E3}\x{85E4}\x{85E5}\x{85E6}\x{85E7}\x{85E8}\x{85E9}' - . '\x{85EA}\x{85EB}\x{85EC}\x{85ED}\x{85EF}\x{85F0}\x{85F1}\x{85F2}\x{85F4}' - . '\x{85F5}\x{85F6}\x{85F7}\x{85F8}\x{85F9}\x{85FA}\x{85FB}\x{85FD}\x{85FE}' - . '\x{85FF}\x{8600}\x{8601}\x{8602}\x{8604}\x{8605}\x{8606}\x{8607}\x{8608}' - . '\x{8609}\x{860A}\x{860B}\x{860C}\x{860F}\x{8611}\x{8612}\x{8613}\x{8614}' - . '\x{8616}\x{8617}\x{8618}\x{8619}\x{861A}\x{861B}\x{861C}\x{861E}\x{861F}' - . '\x{8620}\x{8621}\x{8622}\x{8623}\x{8624}\x{8625}\x{8626}\x{8627}\x{8628}' - . '\x{8629}\x{862A}\x{862B}\x{862C}\x{862D}\x{862E}\x{862F}\x{8630}\x{8631}' - . '\x{8632}\x{8633}\x{8634}\x{8635}\x{8636}\x{8638}\x{8639}\x{863A}\x{863B}' - . '\x{863C}\x{863D}\x{863E}\x{863F}\x{8640}\x{8641}\x{8642}\x{8643}\x{8644}' - . '\x{8645}\x{8646}\x{8647}\x{8648}\x{8649}\x{864A}\x{864B}\x{864C}\x{864D}' - . '\x{864E}\x{864F}\x{8650}\x{8651}\x{8652}\x{8653}\x{8654}\x{8655}\x{8656}' - . '\x{8658}\x{8659}\x{865A}\x{865B}\x{865C}\x{865D}\x{865E}\x{865F}\x{8660}' - . '\x{8661}\x{8662}\x{8663}\x{8664}\x{8665}\x{8666}\x{8667}\x{8668}\x{8669}' - . '\x{866A}\x{866B}\x{866C}\x{866D}\x{866E}\x{866F}\x{8670}\x{8671}\x{8672}' - . '\x{8673}\x{8674}\x{8676}\x{8677}\x{8678}\x{8679}\x{867A}\x{867B}\x{867C}' - . '\x{867D}\x{867E}\x{867F}\x{8680}\x{8681}\x{8682}\x{8683}\x{8684}\x{8685}' - . '\x{8686}\x{8687}\x{8688}\x{868A}\x{868B}\x{868C}\x{868D}\x{868E}\x{868F}' - . '\x{8690}\x{8691}\x{8693}\x{8694}\x{8695}\x{8696}\x{8697}\x{8698}\x{8699}' - . '\x{869A}\x{869B}\x{869C}\x{869D}\x{869E}\x{869F}\x{86A1}\x{86A2}\x{86A3}' - . '\x{86A4}\x{86A5}\x{86A7}\x{86A8}\x{86A9}\x{86AA}\x{86AB}\x{86AC}\x{86AD}' - . '\x{86AE}\x{86AF}\x{86B0}\x{86B1}\x{86B2}\x{86B3}\x{86B4}\x{86B5}\x{86B6}' - . '\x{86B7}\x{86B8}\x{86B9}\x{86BA}\x{86BB}\x{86BC}\x{86BD}\x{86BE}\x{86BF}' - . '\x{86C0}\x{86C1}\x{86C2}\x{86C3}\x{86C4}\x{86C5}\x{86C6}\x{86C7}\x{86C8}' - . '\x{86C9}\x{86CA}\x{86CB}\x{86CC}\x{86CE}\x{86CF}\x{86D0}\x{86D1}\x{86D2}' - . '\x{86D3}\x{86D4}\x{86D6}\x{86D7}\x{86D8}\x{86D9}\x{86DA}\x{86DB}\x{86DC}' - . '\x{86DD}\x{86DE}\x{86DF}\x{86E1}\x{86E2}\x{86E3}\x{86E4}\x{86E5}\x{86E6}' - . '\x{86E8}\x{86E9}\x{86EA}\x{86EB}\x{86EC}\x{86ED}\x{86EE}\x{86EF}\x{86F0}' - . '\x{86F1}\x{86F2}\x{86F3}\x{86F4}\x{86F5}\x{86F6}\x{86F7}\x{86F8}\x{86F9}' - . '\x{86FA}\x{86FB}\x{86FC}\x{86FE}\x{86FF}\x{8700}\x{8701}\x{8702}\x{8703}' - . '\x{8704}\x{8705}\x{8706}\x{8707}\x{8708}\x{8709}\x{870A}\x{870B}\x{870C}' - . '\x{870D}\x{870E}\x{870F}\x{8710}\x{8711}\x{8712}\x{8713}\x{8714}\x{8715}' - . '\x{8716}\x{8717}\x{8718}\x{8719}\x{871A}\x{871B}\x{871C}\x{871E}\x{871F}' - . '\x{8720}\x{8721}\x{8722}\x{8723}\x{8724}\x{8725}\x{8726}\x{8727}\x{8728}' - . '\x{8729}\x{872A}\x{872B}\x{872C}\x{872D}\x{872E}\x{8730}\x{8731}\x{8732}' - . '\x{8733}\x{8734}\x{8735}\x{8736}\x{8737}\x{8738}\x{8739}\x{873A}\x{873B}' - . '\x{873C}\x{873E}\x{873F}\x{8740}\x{8741}\x{8742}\x{8743}\x{8744}\x{8746}' - . '\x{8747}\x{8748}\x{8749}\x{874A}\x{874C}\x{874D}\x{874E}\x{874F}\x{8750}' - . '\x{8751}\x{8752}\x{8753}\x{8754}\x{8755}\x{8756}\x{8757}\x{8758}\x{8759}' - . '\x{875A}\x{875B}\x{875C}\x{875D}\x{875E}\x{875F}\x{8760}\x{8761}\x{8762}' - . '\x{8763}\x{8764}\x{8765}\x{8766}\x{8767}\x{8768}\x{8769}\x{876A}\x{876B}' - . '\x{876C}\x{876D}\x{876E}\x{876F}\x{8770}\x{8772}\x{8773}\x{8774}\x{8775}' - . '\x{8776}\x{8777}\x{8778}\x{8779}\x{877A}\x{877B}\x{877C}\x{877D}\x{877E}' - . '\x{8780}\x{8781}\x{8782}\x{8783}\x{8784}\x{8785}\x{8786}\x{8787}\x{8788}' - . '\x{8789}\x{878A}\x{878B}\x{878C}\x{878D}\x{878F}\x{8790}\x{8791}\x{8792}' - . '\x{8793}\x{8794}\x{8795}\x{8796}\x{8797}\x{8798}\x{879A}\x{879B}\x{879C}' - . '\x{879D}\x{879E}\x{879F}\x{87A0}\x{87A1}\x{87A2}\x{87A3}\x{87A4}\x{87A5}' - . '\x{87A6}\x{87A7}\x{87A8}\x{87A9}\x{87AA}\x{87AB}\x{87AC}\x{87AD}\x{87AE}' - . '\x{87AF}\x{87B0}\x{87B1}\x{87B2}\x{87B3}\x{87B4}\x{87B5}\x{87B6}\x{87B7}' - . '\x{87B8}\x{87B9}\x{87BA}\x{87BB}\x{87BC}\x{87BD}\x{87BE}\x{87BF}\x{87C0}' - . '\x{87C1}\x{87C2}\x{87C3}\x{87C4}\x{87C5}\x{87C6}\x{87C7}\x{87C8}\x{87C9}' - . '\x{87CA}\x{87CB}\x{87CC}\x{87CD}\x{87CE}\x{87CF}\x{87D0}\x{87D1}\x{87D2}' - . '\x{87D3}\x{87D4}\x{87D5}\x{87D6}\x{87D7}\x{87D8}\x{87D9}\x{87DB}\x{87DC}' - . '\x{87DD}\x{87DE}\x{87DF}\x{87E0}\x{87E1}\x{87E2}\x{87E3}\x{87E4}\x{87E5}' - . '\x{87E6}\x{87E7}\x{87E8}\x{87E9}\x{87EA}\x{87EB}\x{87EC}\x{87ED}\x{87EE}' - . '\x{87EF}\x{87F1}\x{87F2}\x{87F3}\x{87F4}\x{87F5}\x{87F6}\x{87F7}\x{87F8}' - . '\x{87F9}\x{87FA}\x{87FB}\x{87FC}\x{87FD}\x{87FE}\x{87FF}\x{8800}\x{8801}' - . '\x{8802}\x{8803}\x{8804}\x{8805}\x{8806}\x{8808}\x{8809}\x{880A}\x{880B}' - . '\x{880C}\x{880D}\x{880E}\x{880F}\x{8810}\x{8811}\x{8813}\x{8814}\x{8815}' - . '\x{8816}\x{8817}\x{8818}\x{8819}\x{881A}\x{881B}\x{881C}\x{881D}\x{881E}' - . '\x{881F}\x{8820}\x{8821}\x{8822}\x{8823}\x{8824}\x{8825}\x{8826}\x{8827}' - . '\x{8828}\x{8829}\x{882A}\x{882B}\x{882C}\x{882E}\x{882F}\x{8830}\x{8831}' - . '\x{8832}\x{8833}\x{8834}\x{8835}\x{8836}\x{8837}\x{8838}\x{8839}\x{883B}' - . '\x{883C}\x{883D}\x{883E}\x{883F}\x{8840}\x{8841}\x{8842}\x{8843}\x{8844}' - . '\x{8845}\x{8846}\x{8848}\x{8849}\x{884A}\x{884B}\x{884C}\x{884D}\x{884E}' - . '\x{884F}\x{8850}\x{8851}\x{8852}\x{8853}\x{8854}\x{8855}\x{8856}\x{8857}' - . '\x{8859}\x{885A}\x{885B}\x{885D}\x{885E}\x{8860}\x{8861}\x{8862}\x{8863}' - . '\x{8864}\x{8865}\x{8866}\x{8867}\x{8868}\x{8869}\x{886A}\x{886B}\x{886C}' - . '\x{886D}\x{886E}\x{886F}\x{8870}\x{8871}\x{8872}\x{8873}\x{8874}\x{8875}' - . '\x{8876}\x{8877}\x{8878}\x{8879}\x{887B}\x{887C}\x{887D}\x{887E}\x{887F}' - . '\x{8880}\x{8881}\x{8882}\x{8883}\x{8884}\x{8885}\x{8886}\x{8887}\x{8888}' - . '\x{8889}\x{888A}\x{888B}\x{888C}\x{888D}\x{888E}\x{888F}\x{8890}\x{8891}' - . '\x{8892}\x{8893}\x{8894}\x{8895}\x{8896}\x{8897}\x{8898}\x{8899}\x{889A}' - . '\x{889B}\x{889C}\x{889D}\x{889E}\x{889F}\x{88A0}\x{88A1}\x{88A2}\x{88A3}' - . '\x{88A4}\x{88A5}\x{88A6}\x{88A7}\x{88A8}\x{88A9}\x{88AA}\x{88AB}\x{88AC}' - . '\x{88AD}\x{88AE}\x{88AF}\x{88B0}\x{88B1}\x{88B2}\x{88B3}\x{88B4}\x{88B6}' - . '\x{88B7}\x{88B8}\x{88B9}\x{88BA}\x{88BB}\x{88BC}\x{88BD}\x{88BE}\x{88BF}' - . '\x{88C0}\x{88C1}\x{88C2}\x{88C3}\x{88C4}\x{88C5}\x{88C6}\x{88C7}\x{88C8}' - . '\x{88C9}\x{88CA}\x{88CB}\x{88CC}\x{88CD}\x{88CE}\x{88CF}\x{88D0}\x{88D1}' - . '\x{88D2}\x{88D3}\x{88D4}\x{88D5}\x{88D6}\x{88D7}\x{88D8}\x{88D9}\x{88DA}' - . '\x{88DB}\x{88DC}\x{88DD}\x{88DE}\x{88DF}\x{88E0}\x{88E1}\x{88E2}\x{88E3}' - . '\x{88E4}\x{88E5}\x{88E7}\x{88E8}\x{88EA}\x{88EB}\x{88EC}\x{88EE}\x{88EF}' - . '\x{88F0}\x{88F1}\x{88F2}\x{88F3}\x{88F4}\x{88F5}\x{88F6}\x{88F7}\x{88F8}' - . '\x{88F9}\x{88FA}\x{88FB}\x{88FC}\x{88FD}\x{88FE}\x{88FF}\x{8900}\x{8901}' - . '\x{8902}\x{8904}\x{8905}\x{8906}\x{8907}\x{8908}\x{8909}\x{890A}\x{890B}' - . '\x{890C}\x{890D}\x{890E}\x{8910}\x{8911}\x{8912}\x{8913}\x{8914}\x{8915}' - . '\x{8916}\x{8917}\x{8918}\x{8919}\x{891A}\x{891B}\x{891C}\x{891D}\x{891E}' - . '\x{891F}\x{8920}\x{8921}\x{8922}\x{8923}\x{8925}\x{8926}\x{8927}\x{8928}' - . '\x{8929}\x{892A}\x{892B}\x{892C}\x{892D}\x{892E}\x{892F}\x{8930}\x{8931}' - . '\x{8932}\x{8933}\x{8934}\x{8935}\x{8936}\x{8937}\x{8938}\x{8939}\x{893A}' - . '\x{893B}\x{893C}\x{893D}\x{893E}\x{893F}\x{8940}\x{8941}\x{8942}\x{8943}' - . '\x{8944}\x{8945}\x{8946}\x{8947}\x{8948}\x{8949}\x{894A}\x{894B}\x{894C}' - . '\x{894E}\x{894F}\x{8950}\x{8951}\x{8952}\x{8953}\x{8954}\x{8955}\x{8956}' - . '\x{8957}\x{8958}\x{8959}\x{895A}\x{895B}\x{895C}\x{895D}\x{895E}\x{895F}' - . '\x{8960}\x{8961}\x{8962}\x{8963}\x{8964}\x{8966}\x{8967}\x{8968}\x{8969}' - . '\x{896A}\x{896B}\x{896C}\x{896D}\x{896E}\x{896F}\x{8970}\x{8971}\x{8972}' - . '\x{8973}\x{8974}\x{8976}\x{8977}\x{8978}\x{8979}\x{897A}\x{897B}\x{897C}' - . '\x{897E}\x{897F}\x{8980}\x{8981}\x{8982}\x{8983}\x{8984}\x{8985}\x{8986}' - . '\x{8987}\x{8988}\x{8989}\x{898A}\x{898B}\x{898C}\x{898E}\x{898F}\x{8991}' - . '\x{8992}\x{8993}\x{8995}\x{8996}\x{8997}\x{8998}\x{899A}\x{899B}\x{899C}' - . '\x{899D}\x{899E}\x{899F}\x{89A0}\x{89A1}\x{89A2}\x{89A3}\x{89A4}\x{89A5}' - . '\x{89A6}\x{89A7}\x{89A8}\x{89AA}\x{89AB}\x{89AC}\x{89AD}\x{89AE}\x{89AF}' - . '\x{89B1}\x{89B2}\x{89B3}\x{89B5}\x{89B6}\x{89B7}\x{89B8}\x{89B9}\x{89BA}' - . '\x{89BD}\x{89BE}\x{89BF}\x{89C0}\x{89C1}\x{89C2}\x{89C3}\x{89C4}\x{89C5}' - . '\x{89C6}\x{89C7}\x{89C8}\x{89C9}\x{89CA}\x{89CB}\x{89CC}\x{89CD}\x{89CE}' - . '\x{89CF}\x{89D0}\x{89D1}\x{89D2}\x{89D3}\x{89D4}\x{89D5}\x{89D6}\x{89D7}' - . '\x{89D8}\x{89D9}\x{89DA}\x{89DB}\x{89DC}\x{89DD}\x{89DE}\x{89DF}\x{89E0}' - . '\x{89E1}\x{89E2}\x{89E3}\x{89E4}\x{89E5}\x{89E6}\x{89E7}\x{89E8}\x{89E9}' - . '\x{89EA}\x{89EB}\x{89EC}\x{89ED}\x{89EF}\x{89F0}\x{89F1}\x{89F2}\x{89F3}' - . '\x{89F4}\x{89F6}\x{89F7}\x{89F8}\x{89FA}\x{89FB}\x{89FC}\x{89FE}\x{89FF}' - . '\x{8A00}\x{8A01}\x{8A02}\x{8A03}\x{8A04}\x{8A07}\x{8A08}\x{8A09}\x{8A0A}' - . '\x{8A0B}\x{8A0C}\x{8A0D}\x{8A0E}\x{8A0F}\x{8A10}\x{8A11}\x{8A12}\x{8A13}' - . '\x{8A15}\x{8A16}\x{8A17}\x{8A18}\x{8A1A}\x{8A1B}\x{8A1C}\x{8A1D}\x{8A1E}' - . '\x{8A1F}\x{8A22}\x{8A23}\x{8A24}\x{8A25}\x{8A26}\x{8A27}\x{8A28}\x{8A29}' - . '\x{8A2A}\x{8A2C}\x{8A2D}\x{8A2E}\x{8A2F}\x{8A30}\x{8A31}\x{8A32}\x{8A34}' - . '\x{8A35}\x{8A36}\x{8A37}\x{8A38}\x{8A39}\x{8A3A}\x{8A3B}\x{8A3C}\x{8A3E}' - . '\x{8A3F}\x{8A40}\x{8A41}\x{8A42}\x{8A43}\x{8A44}\x{8A45}\x{8A46}\x{8A47}' - . '\x{8A48}\x{8A49}\x{8A4A}\x{8A4C}\x{8A4D}\x{8A4E}\x{8A4F}\x{8A50}\x{8A51}' - . '\x{8A52}\x{8A53}\x{8A54}\x{8A55}\x{8A56}\x{8A57}\x{8A58}\x{8A59}\x{8A5A}' - . '\x{8A5B}\x{8A5C}\x{8A5D}\x{8A5E}\x{8A5F}\x{8A60}\x{8A61}\x{8A62}\x{8A63}' - . '\x{8A65}\x{8A66}\x{8A67}\x{8A68}\x{8A69}\x{8A6A}\x{8A6B}\x{8A6C}\x{8A6D}' - . '\x{8A6E}\x{8A6F}\x{8A70}\x{8A71}\x{8A72}\x{8A73}\x{8A74}\x{8A75}\x{8A76}' - . '\x{8A77}\x{8A79}\x{8A7A}\x{8A7B}\x{8A7C}\x{8A7E}\x{8A7F}\x{8A80}\x{8A81}' - . '\x{8A82}\x{8A83}\x{8A84}\x{8A85}\x{8A86}\x{8A87}\x{8A89}\x{8A8A}\x{8A8B}' - . '\x{8A8C}\x{8A8D}\x{8A8E}\x{8A8F}\x{8A90}\x{8A91}\x{8A92}\x{8A93}\x{8A94}' - . '\x{8A95}\x{8A96}\x{8A97}\x{8A98}\x{8A99}\x{8A9A}\x{8A9B}\x{8A9C}\x{8A9D}' - . '\x{8A9E}\x{8AA0}\x{8AA1}\x{8AA2}\x{8AA3}\x{8AA4}\x{8AA5}\x{8AA6}\x{8AA7}' - . '\x{8AA8}\x{8AA9}\x{8AAA}\x{8AAB}\x{8AAC}\x{8AAE}\x{8AB0}\x{8AB1}\x{8AB2}' - . '\x{8AB3}\x{8AB4}\x{8AB5}\x{8AB6}\x{8AB8}\x{8AB9}\x{8ABA}\x{8ABB}\x{8ABC}' - . '\x{8ABD}\x{8ABE}\x{8ABF}\x{8AC0}\x{8AC1}\x{8AC2}\x{8AC3}\x{8AC4}\x{8AC5}' - . '\x{8AC6}\x{8AC7}\x{8AC8}\x{8AC9}\x{8ACA}\x{8ACB}\x{8ACC}\x{8ACD}\x{8ACE}' - . '\x{8ACF}\x{8AD1}\x{8AD2}\x{8AD3}\x{8AD4}\x{8AD5}\x{8AD6}\x{8AD7}\x{8AD8}' - . '\x{8AD9}\x{8ADA}\x{8ADB}\x{8ADC}\x{8ADD}\x{8ADE}\x{8ADF}\x{8AE0}\x{8AE1}' - . '\x{8AE2}\x{8AE3}\x{8AE4}\x{8AE5}\x{8AE6}\x{8AE7}\x{8AE8}\x{8AE9}\x{8AEA}' - . '\x{8AEB}\x{8AED}\x{8AEE}\x{8AEF}\x{8AF0}\x{8AF1}\x{8AF2}\x{8AF3}\x{8AF4}' - . '\x{8AF5}\x{8AF6}\x{8AF7}\x{8AF8}\x{8AF9}\x{8AFA}\x{8AFB}\x{8AFC}\x{8AFD}' - . '\x{8AFE}\x{8AFF}\x{8B00}\x{8B01}\x{8B02}\x{8B03}\x{8B04}\x{8B05}\x{8B06}' - . '\x{8B07}\x{8B08}\x{8B09}\x{8B0A}\x{8B0B}\x{8B0D}\x{8B0E}\x{8B0F}\x{8B10}' - . '\x{8B11}\x{8B12}\x{8B13}\x{8B14}\x{8B15}\x{8B16}\x{8B17}\x{8B18}\x{8B19}' - . '\x{8B1A}\x{8B1B}\x{8B1C}\x{8B1D}\x{8B1E}\x{8B1F}\x{8B20}\x{8B21}\x{8B22}' - . '\x{8B23}\x{8B24}\x{8B25}\x{8B26}\x{8B27}\x{8B28}\x{8B2A}\x{8B2B}\x{8B2C}' - . '\x{8B2D}\x{8B2E}\x{8B2F}\x{8B30}\x{8B31}\x{8B33}\x{8B34}\x{8B35}\x{8B36}' - . '\x{8B37}\x{8B39}\x{8B3A}\x{8B3B}\x{8B3C}\x{8B3D}\x{8B3E}\x{8B40}\x{8B41}' - . '\x{8B42}\x{8B43}\x{8B44}\x{8B45}\x{8B46}\x{8B47}\x{8B48}\x{8B49}\x{8B4A}' - . '\x{8B4B}\x{8B4C}\x{8B4D}\x{8B4E}\x{8B4F}\x{8B50}\x{8B51}\x{8B52}\x{8B53}' - . '\x{8B54}\x{8B55}\x{8B56}\x{8B57}\x{8B58}\x{8B59}\x{8B5A}\x{8B5B}\x{8B5C}' - . '\x{8B5D}\x{8B5E}\x{8B5F}\x{8B60}\x{8B63}\x{8B64}\x{8B65}\x{8B66}\x{8B67}' - . '\x{8B68}\x{8B6A}\x{8B6B}\x{8B6C}\x{8B6D}\x{8B6E}\x{8B6F}\x{8B70}\x{8B71}' - . '\x{8B73}\x{8B74}\x{8B76}\x{8B77}\x{8B78}\x{8B79}\x{8B7A}\x{8B7B}\x{8B7D}' - . '\x{8B7E}\x{8B7F}\x{8B80}\x{8B82}\x{8B83}\x{8B84}\x{8B85}\x{8B86}\x{8B88}' - . '\x{8B89}\x{8B8A}\x{8B8B}\x{8B8C}\x{8B8E}\x{8B90}\x{8B91}\x{8B92}\x{8B93}' - . '\x{8B94}\x{8B95}\x{8B96}\x{8B97}\x{8B98}\x{8B99}\x{8B9A}\x{8B9C}\x{8B9D}' - . '\x{8B9E}\x{8B9F}\x{8BA0}\x{8BA1}\x{8BA2}\x{8BA3}\x{8BA4}\x{8BA5}\x{8BA6}' - . '\x{8BA7}\x{8BA8}\x{8BA9}\x{8BAA}\x{8BAB}\x{8BAC}\x{8BAD}\x{8BAE}\x{8BAF}' - . '\x{8BB0}\x{8BB1}\x{8BB2}\x{8BB3}\x{8BB4}\x{8BB5}\x{8BB6}\x{8BB7}\x{8BB8}' - . '\x{8BB9}\x{8BBA}\x{8BBB}\x{8BBC}\x{8BBD}\x{8BBE}\x{8BBF}\x{8BC0}\x{8BC1}' - . '\x{8BC2}\x{8BC3}\x{8BC4}\x{8BC5}\x{8BC6}\x{8BC7}\x{8BC8}\x{8BC9}\x{8BCA}' - . '\x{8BCB}\x{8BCC}\x{8BCD}\x{8BCE}\x{8BCF}\x{8BD0}\x{8BD1}\x{8BD2}\x{8BD3}' - . '\x{8BD4}\x{8BD5}\x{8BD6}\x{8BD7}\x{8BD8}\x{8BD9}\x{8BDA}\x{8BDB}\x{8BDC}' - . '\x{8BDD}\x{8BDE}\x{8BDF}\x{8BE0}\x{8BE1}\x{8BE2}\x{8BE3}\x{8BE4}\x{8BE5}' - . '\x{8BE6}\x{8BE7}\x{8BE8}\x{8BE9}\x{8BEA}\x{8BEB}\x{8BEC}\x{8BED}\x{8BEE}' - . '\x{8BEF}\x{8BF0}\x{8BF1}\x{8BF2}\x{8BF3}\x{8BF4}\x{8BF5}\x{8BF6}\x{8BF7}' - . '\x{8BF8}\x{8BF9}\x{8BFA}\x{8BFB}\x{8BFC}\x{8BFD}\x{8BFE}\x{8BFF}\x{8C00}' - . '\x{8C01}\x{8C02}\x{8C03}\x{8C04}\x{8C05}\x{8C06}\x{8C07}\x{8C08}\x{8C09}' - . '\x{8C0A}\x{8C0B}\x{8C0C}\x{8C0D}\x{8C0E}\x{8C0F}\x{8C10}\x{8C11}\x{8C12}' - . '\x{8C13}\x{8C14}\x{8C15}\x{8C16}\x{8C17}\x{8C18}\x{8C19}\x{8C1A}\x{8C1B}' - . '\x{8C1C}\x{8C1D}\x{8C1E}\x{8C1F}\x{8C20}\x{8C21}\x{8C22}\x{8C23}\x{8C24}' - . '\x{8C25}\x{8C26}\x{8C27}\x{8C28}\x{8C29}\x{8C2A}\x{8C2B}\x{8C2C}\x{8C2D}' - . '\x{8C2E}\x{8C2F}\x{8C30}\x{8C31}\x{8C32}\x{8C33}\x{8C34}\x{8C35}\x{8C36}' - . '\x{8C37}\x{8C39}\x{8C3A}\x{8C3B}\x{8C3C}\x{8C3D}\x{8C3E}\x{8C3F}\x{8C41}' - . '\x{8C42}\x{8C43}\x{8C45}\x{8C46}\x{8C47}\x{8C48}\x{8C49}\x{8C4A}\x{8C4B}' - . '\x{8C4C}\x{8C4D}\x{8C4E}\x{8C4F}\x{8C50}\x{8C54}\x{8C55}\x{8C56}\x{8C57}' - . '\x{8C59}\x{8C5A}\x{8C5B}\x{8C5C}\x{8C5D}\x{8C5E}\x{8C5F}\x{8C60}\x{8C61}' - . '\x{8C62}\x{8C63}\x{8C64}\x{8C65}\x{8C66}\x{8C67}\x{8C68}\x{8C69}\x{8C6A}' - . '\x{8C6B}\x{8C6C}\x{8C6D}\x{8C6E}\x{8C6F}\x{8C70}\x{8C71}\x{8C72}\x{8C73}' - . '\x{8C75}\x{8C76}\x{8C77}\x{8C78}\x{8C79}\x{8C7A}\x{8C7B}\x{8C7D}\x{8C7E}' - . '\x{8C80}\x{8C81}\x{8C82}\x{8C84}\x{8C85}\x{8C86}\x{8C88}\x{8C89}\x{8C8A}' - . '\x{8C8C}\x{8C8D}\x{8C8F}\x{8C90}\x{8C91}\x{8C92}\x{8C93}\x{8C94}\x{8C95}' - . '\x{8C96}\x{8C97}\x{8C98}\x{8C99}\x{8C9A}\x{8C9C}\x{8C9D}\x{8C9E}\x{8C9F}' - . '\x{8CA0}\x{8CA1}\x{8CA2}\x{8CA3}\x{8CA4}\x{8CA5}\x{8CA7}\x{8CA8}\x{8CA9}' - . '\x{8CAA}\x{8CAB}\x{8CAC}\x{8CAD}\x{8CAE}\x{8CAF}\x{8CB0}\x{8CB1}\x{8CB2}' - . '\x{8CB3}\x{8CB4}\x{8CB5}\x{8CB6}\x{8CB7}\x{8CB8}\x{8CB9}\x{8CBA}\x{8CBB}' - . '\x{8CBC}\x{8CBD}\x{8CBE}\x{8CBF}\x{8CC0}\x{8CC1}\x{8CC2}\x{8CC3}\x{8CC4}' - . '\x{8CC5}\x{8CC6}\x{8CC7}\x{8CC8}\x{8CC9}\x{8CCA}\x{8CCC}\x{8CCE}\x{8CCF}' - . '\x{8CD0}\x{8CD1}\x{8CD2}\x{8CD3}\x{8CD4}\x{8CD5}\x{8CD7}\x{8CD9}\x{8CDA}' - . '\x{8CDB}\x{8CDC}\x{8CDD}\x{8CDE}\x{8CDF}\x{8CE0}\x{8CE1}\x{8CE2}\x{8CE3}' - . '\x{8CE4}\x{8CE5}\x{8CE6}\x{8CE7}\x{8CE8}\x{8CEA}\x{8CEB}\x{8CEC}\x{8CED}' - . '\x{8CEE}\x{8CEF}\x{8CF0}\x{8CF1}\x{8CF2}\x{8CF3}\x{8CF4}\x{8CF5}\x{8CF6}' - . '\x{8CF8}\x{8CF9}\x{8CFA}\x{8CFB}\x{8CFC}\x{8CFD}\x{8CFE}\x{8CFF}\x{8D00}' - . '\x{8D02}\x{8D03}\x{8D04}\x{8D05}\x{8D06}\x{8D07}\x{8D08}\x{8D09}\x{8D0A}' - . '\x{8D0B}\x{8D0C}\x{8D0D}\x{8D0E}\x{8D0F}\x{8D10}\x{8D13}\x{8D14}\x{8D15}' - . '\x{8D16}\x{8D17}\x{8D18}\x{8D19}\x{8D1A}\x{8D1B}\x{8D1C}\x{8D1D}\x{8D1E}' - . '\x{8D1F}\x{8D20}\x{8D21}\x{8D22}\x{8D23}\x{8D24}\x{8D25}\x{8D26}\x{8D27}' - . '\x{8D28}\x{8D29}\x{8D2A}\x{8D2B}\x{8D2C}\x{8D2D}\x{8D2E}\x{8D2F}\x{8D30}' - . '\x{8D31}\x{8D32}\x{8D33}\x{8D34}\x{8D35}\x{8D36}\x{8D37}\x{8D38}\x{8D39}' - . '\x{8D3A}\x{8D3B}\x{8D3C}\x{8D3D}\x{8D3E}\x{8D3F}\x{8D40}\x{8D41}\x{8D42}' - . '\x{8D43}\x{8D44}\x{8D45}\x{8D46}\x{8D47}\x{8D48}\x{8D49}\x{8D4A}\x{8D4B}' - . '\x{8D4C}\x{8D4D}\x{8D4E}\x{8D4F}\x{8D50}\x{8D51}\x{8D52}\x{8D53}\x{8D54}' - . '\x{8D55}\x{8D56}\x{8D57}\x{8D58}\x{8D59}\x{8D5A}\x{8D5B}\x{8D5C}\x{8D5D}' - . '\x{8D5E}\x{8D5F}\x{8D60}\x{8D61}\x{8D62}\x{8D63}\x{8D64}\x{8D65}\x{8D66}' - . '\x{8D67}\x{8D68}\x{8D69}\x{8D6A}\x{8D6B}\x{8D6C}\x{8D6D}\x{8D6E}\x{8D6F}' - . '\x{8D70}\x{8D71}\x{8D72}\x{8D73}\x{8D74}\x{8D75}\x{8D76}\x{8D77}\x{8D78}' - . '\x{8D79}\x{8D7A}\x{8D7B}\x{8D7D}\x{8D7E}\x{8D7F}\x{8D80}\x{8D81}\x{8D82}' - . '\x{8D83}\x{8D84}\x{8D85}\x{8D86}\x{8D87}\x{8D88}\x{8D89}\x{8D8A}\x{8D8B}' - . '\x{8D8C}\x{8D8D}\x{8D8E}\x{8D8F}\x{8D90}\x{8D91}\x{8D92}\x{8D93}\x{8D94}' - . '\x{8D95}\x{8D96}\x{8D97}\x{8D98}\x{8D99}\x{8D9A}\x{8D9B}\x{8D9C}\x{8D9D}' - . '\x{8D9E}\x{8D9F}\x{8DA0}\x{8DA1}\x{8DA2}\x{8DA3}\x{8DA4}\x{8DA5}\x{8DA7}' - . '\x{8DA8}\x{8DA9}\x{8DAA}\x{8DAB}\x{8DAC}\x{8DAD}\x{8DAE}\x{8DAF}\x{8DB0}' - . '\x{8DB1}\x{8DB2}\x{8DB3}\x{8DB4}\x{8DB5}\x{8DB6}\x{8DB7}\x{8DB8}\x{8DB9}' - . '\x{8DBA}\x{8DBB}\x{8DBC}\x{8DBD}\x{8DBE}\x{8DBF}\x{8DC1}\x{8DC2}\x{8DC3}' - . '\x{8DC4}\x{8DC5}\x{8DC6}\x{8DC7}\x{8DC8}\x{8DC9}\x{8DCA}\x{8DCB}\x{8DCC}' - . '\x{8DCD}\x{8DCE}\x{8DCF}\x{8DD0}\x{8DD1}\x{8DD2}\x{8DD3}\x{8DD4}\x{8DD5}' - . '\x{8DD6}\x{8DD7}\x{8DD8}\x{8DD9}\x{8DDA}\x{8DDB}\x{8DDC}\x{8DDD}\x{8DDE}' - . '\x{8DDF}\x{8DE0}\x{8DE1}\x{8DE2}\x{8DE3}\x{8DE4}\x{8DE6}\x{8DE7}\x{8DE8}' - . '\x{8DE9}\x{8DEA}\x{8DEB}\x{8DEC}\x{8DED}\x{8DEE}\x{8DEF}\x{8DF0}\x{8DF1}' - . '\x{8DF2}\x{8DF3}\x{8DF4}\x{8DF5}\x{8DF6}\x{8DF7}\x{8DF8}\x{8DF9}\x{8DFA}' - . '\x{8DFB}\x{8DFC}\x{8DFD}\x{8DFE}\x{8DFF}\x{8E00}\x{8E02}\x{8E03}\x{8E04}' - . '\x{8E05}\x{8E06}\x{8E07}\x{8E08}\x{8E09}\x{8E0A}\x{8E0C}\x{8E0D}\x{8E0E}' - . '\x{8E0F}\x{8E10}\x{8E11}\x{8E12}\x{8E13}\x{8E14}\x{8E15}\x{8E16}\x{8E17}' - . '\x{8E18}\x{8E19}\x{8E1A}\x{8E1B}\x{8E1C}\x{8E1D}\x{8E1E}\x{8E1F}\x{8E20}' - . '\x{8E21}\x{8E22}\x{8E23}\x{8E24}\x{8E25}\x{8E26}\x{8E27}\x{8E28}\x{8E29}' - . '\x{8E2A}\x{8E2B}\x{8E2C}\x{8E2D}\x{8E2E}\x{8E2F}\x{8E30}\x{8E31}\x{8E33}' - . '\x{8E34}\x{8E35}\x{8E36}\x{8E37}\x{8E38}\x{8E39}\x{8E3A}\x{8E3B}\x{8E3C}' - . '\x{8E3D}\x{8E3E}\x{8E3F}\x{8E40}\x{8E41}\x{8E42}\x{8E43}\x{8E44}\x{8E45}' - . '\x{8E47}\x{8E48}\x{8E49}\x{8E4A}\x{8E4B}\x{8E4C}\x{8E4D}\x{8E4E}\x{8E50}' - . '\x{8E51}\x{8E52}\x{8E53}\x{8E54}\x{8E55}\x{8E56}\x{8E57}\x{8E58}\x{8E59}' - . '\x{8E5A}\x{8E5B}\x{8E5C}\x{8E5D}\x{8E5E}\x{8E5F}\x{8E60}\x{8E61}\x{8E62}' - . '\x{8E63}\x{8E64}\x{8E65}\x{8E66}\x{8E67}\x{8E68}\x{8E69}\x{8E6A}\x{8E6B}' - . '\x{8E6C}\x{8E6D}\x{8E6F}\x{8E70}\x{8E71}\x{8E72}\x{8E73}\x{8E74}\x{8E76}' - . '\x{8E78}\x{8E7A}\x{8E7B}\x{8E7C}\x{8E7D}\x{8E7E}\x{8E7F}\x{8E80}\x{8E81}' - . '\x{8E82}\x{8E83}\x{8E84}\x{8E85}\x{8E86}\x{8E87}\x{8E88}\x{8E89}\x{8E8A}' - . '\x{8E8B}\x{8E8C}\x{8E8D}\x{8E8E}\x{8E8F}\x{8E90}\x{8E91}\x{8E92}\x{8E93}' - . '\x{8E94}\x{8E95}\x{8E96}\x{8E97}\x{8E98}\x{8E9A}\x{8E9C}\x{8E9D}\x{8E9E}' - . '\x{8E9F}\x{8EA0}\x{8EA1}\x{8EA3}\x{8EA4}\x{8EA5}\x{8EA6}\x{8EA7}\x{8EA8}' - . '\x{8EA9}\x{8EAA}\x{8EAB}\x{8EAC}\x{8EAD}\x{8EAE}\x{8EAF}\x{8EB0}\x{8EB1}' - . '\x{8EB2}\x{8EB4}\x{8EB5}\x{8EB8}\x{8EB9}\x{8EBA}\x{8EBB}\x{8EBC}\x{8EBD}' - . '\x{8EBE}\x{8EBF}\x{8EC0}\x{8EC2}\x{8EC3}\x{8EC5}\x{8EC6}\x{8EC7}\x{8EC8}' - . '\x{8EC9}\x{8ECA}\x{8ECB}\x{8ECC}\x{8ECD}\x{8ECE}\x{8ECF}\x{8ED0}\x{8ED1}' - . '\x{8ED2}\x{8ED3}\x{8ED4}\x{8ED5}\x{8ED6}\x{8ED7}\x{8ED8}\x{8EDA}\x{8EDB}' - . '\x{8EDC}\x{8EDD}\x{8EDE}\x{8EDF}\x{8EE0}\x{8EE1}\x{8EE4}\x{8EE5}\x{8EE6}' - . '\x{8EE7}\x{8EE8}\x{8EE9}\x{8EEA}\x{8EEB}\x{8EEC}\x{8EED}\x{8EEE}\x{8EEF}' - . '\x{8EF1}\x{8EF2}\x{8EF3}\x{8EF4}\x{8EF5}\x{8EF6}\x{8EF7}\x{8EF8}\x{8EF9}' - . '\x{8EFA}\x{8EFB}\x{8EFC}\x{8EFD}\x{8EFE}\x{8EFF}\x{8F00}\x{8F01}\x{8F02}' - . '\x{8F03}\x{8F04}\x{8F05}\x{8F06}\x{8F07}\x{8F08}\x{8F09}\x{8F0A}\x{8F0B}' - . '\x{8F0D}\x{8F0E}\x{8F10}\x{8F11}\x{8F12}\x{8F13}\x{8F14}\x{8F15}\x{8F16}' - . '\x{8F17}\x{8F18}\x{8F1A}\x{8F1B}\x{8F1C}\x{8F1D}\x{8F1E}\x{8F1F}\x{8F20}' - . '\x{8F21}\x{8F22}\x{8F23}\x{8F24}\x{8F25}\x{8F26}\x{8F27}\x{8F28}\x{8F29}' - . '\x{8F2A}\x{8F2B}\x{8F2C}\x{8F2E}\x{8F2F}\x{8F30}\x{8F31}\x{8F32}\x{8F33}' - . '\x{8F34}\x{8F35}\x{8F36}\x{8F37}\x{8F38}\x{8F39}\x{8F3B}\x{8F3C}\x{8F3D}' - . '\x{8F3E}\x{8F3F}\x{8F40}\x{8F42}\x{8F43}\x{8F44}\x{8F45}\x{8F46}\x{8F47}' - . '\x{8F48}\x{8F49}\x{8F4A}\x{8F4B}\x{8F4C}\x{8F4D}\x{8F4E}\x{8F4F}\x{8F50}' - . '\x{8F51}\x{8F52}\x{8F53}\x{8F54}\x{8F55}\x{8F56}\x{8F57}\x{8F58}\x{8F59}' - . '\x{8F5A}\x{8F5B}\x{8F5D}\x{8F5E}\x{8F5F}\x{8F60}\x{8F61}\x{8F62}\x{8F63}' - . '\x{8F64}\x{8F65}\x{8F66}\x{8F67}\x{8F68}\x{8F69}\x{8F6A}\x{8F6B}\x{8F6C}' - . '\x{8F6D}\x{8F6E}\x{8F6F}\x{8F70}\x{8F71}\x{8F72}\x{8F73}\x{8F74}\x{8F75}' - . '\x{8F76}\x{8F77}\x{8F78}\x{8F79}\x{8F7A}\x{8F7B}\x{8F7C}\x{8F7D}\x{8F7E}' - . '\x{8F7F}\x{8F80}\x{8F81}\x{8F82}\x{8F83}\x{8F84}\x{8F85}\x{8F86}\x{8F87}' - . '\x{8F88}\x{8F89}\x{8F8A}\x{8F8B}\x{8F8C}\x{8F8D}\x{8F8E}\x{8F8F}\x{8F90}' - . '\x{8F91}\x{8F92}\x{8F93}\x{8F94}\x{8F95}\x{8F96}\x{8F97}\x{8F98}\x{8F99}' - . '\x{8F9A}\x{8F9B}\x{8F9C}\x{8F9E}\x{8F9F}\x{8FA0}\x{8FA1}\x{8FA2}\x{8FA3}' - . '\x{8FA5}\x{8FA6}\x{8FA7}\x{8FA8}\x{8FA9}\x{8FAA}\x{8FAB}\x{8FAC}\x{8FAD}' - . '\x{8FAE}\x{8FAF}\x{8FB0}\x{8FB1}\x{8FB2}\x{8FB4}\x{8FB5}\x{8FB6}\x{8FB7}' - . '\x{8FB8}\x{8FB9}\x{8FBB}\x{8FBC}\x{8FBD}\x{8FBE}\x{8FBF}\x{8FC0}\x{8FC1}' - . '\x{8FC2}\x{8FC4}\x{8FC5}\x{8FC6}\x{8FC7}\x{8FC8}\x{8FC9}\x{8FCB}\x{8FCC}' - . '\x{8FCD}\x{8FCE}\x{8FCF}\x{8FD0}\x{8FD1}\x{8FD2}\x{8FD3}\x{8FD4}\x{8FD5}' - . '\x{8FD6}\x{8FD7}\x{8FD8}\x{8FD9}\x{8FDA}\x{8FDB}\x{8FDC}\x{8FDD}\x{8FDE}' - . '\x{8FDF}\x{8FE0}\x{8FE1}\x{8FE2}\x{8FE3}\x{8FE4}\x{8FE5}\x{8FE6}\x{8FE8}' - . '\x{8FE9}\x{8FEA}\x{8FEB}\x{8FEC}\x{8FED}\x{8FEE}\x{8FEF}\x{8FF0}\x{8FF1}' - . '\x{8FF2}\x{8FF3}\x{8FF4}\x{8FF5}\x{8FF6}\x{8FF7}\x{8FF8}\x{8FF9}\x{8FFA}' - . '\x{8FFB}\x{8FFC}\x{8FFD}\x{8FFE}\x{8FFF}\x{9000}\x{9001}\x{9002}\x{9003}' - . '\x{9004}\x{9005}\x{9006}\x{9007}\x{9008}\x{9009}\x{900A}\x{900B}\x{900C}' - . '\x{900D}\x{900F}\x{9010}\x{9011}\x{9012}\x{9013}\x{9014}\x{9015}\x{9016}' - . '\x{9017}\x{9018}\x{9019}\x{901A}\x{901B}\x{901C}\x{901D}\x{901E}\x{901F}' - . '\x{9020}\x{9021}\x{9022}\x{9023}\x{9024}\x{9025}\x{9026}\x{9027}\x{9028}' - . '\x{9029}\x{902B}\x{902D}\x{902E}\x{902F}\x{9030}\x{9031}\x{9032}\x{9033}' - . '\x{9034}\x{9035}\x{9036}\x{9038}\x{903A}\x{903B}\x{903C}\x{903D}\x{903E}' - . '\x{903F}\x{9041}\x{9042}\x{9043}\x{9044}\x{9045}\x{9047}\x{9048}\x{9049}' - . '\x{904A}\x{904B}\x{904C}\x{904D}\x{904E}\x{904F}\x{9050}\x{9051}\x{9052}' - . '\x{9053}\x{9054}\x{9055}\x{9056}\x{9057}\x{9058}\x{9059}\x{905A}\x{905B}' - . '\x{905C}\x{905D}\x{905E}\x{905F}\x{9060}\x{9061}\x{9062}\x{9063}\x{9064}' - . '\x{9065}\x{9066}\x{9067}\x{9068}\x{9069}\x{906A}\x{906B}\x{906C}\x{906D}' - . '\x{906E}\x{906F}\x{9070}\x{9071}\x{9072}\x{9073}\x{9074}\x{9075}\x{9076}' - . '\x{9077}\x{9078}\x{9079}\x{907A}\x{907B}\x{907C}\x{907D}\x{907E}\x{907F}' - . '\x{9080}\x{9081}\x{9082}\x{9083}\x{9084}\x{9085}\x{9086}\x{9087}\x{9088}' - . '\x{9089}\x{908A}\x{908B}\x{908C}\x{908D}\x{908E}\x{908F}\x{9090}\x{9091}' - . '\x{9092}\x{9093}\x{9094}\x{9095}\x{9096}\x{9097}\x{9098}\x{9099}\x{909A}' - . '\x{909B}\x{909C}\x{909D}\x{909E}\x{909F}\x{90A0}\x{90A1}\x{90A2}\x{90A3}' - . '\x{90A4}\x{90A5}\x{90A6}\x{90A7}\x{90A8}\x{90A9}\x{90AA}\x{90AC}\x{90AD}' - . '\x{90AE}\x{90AF}\x{90B0}\x{90B1}\x{90B2}\x{90B3}\x{90B4}\x{90B5}\x{90B6}' - . '\x{90B7}\x{90B8}\x{90B9}\x{90BA}\x{90BB}\x{90BC}\x{90BD}\x{90BE}\x{90BF}' - . '\x{90C0}\x{90C1}\x{90C2}\x{90C3}\x{90C4}\x{90C5}\x{90C6}\x{90C7}\x{90C8}' - . '\x{90C9}\x{90CA}\x{90CB}\x{90CE}\x{90CF}\x{90D0}\x{90D1}\x{90D3}\x{90D4}' - . '\x{90D5}\x{90D6}\x{90D7}\x{90D8}\x{90D9}\x{90DA}\x{90DB}\x{90DC}\x{90DD}' - . '\x{90DE}\x{90DF}\x{90E0}\x{90E1}\x{90E2}\x{90E3}\x{90E4}\x{90E5}\x{90E6}' - . '\x{90E7}\x{90E8}\x{90E9}\x{90EA}\x{90EB}\x{90EC}\x{90ED}\x{90EE}\x{90EF}' - . '\x{90F0}\x{90F1}\x{90F2}\x{90F3}\x{90F4}\x{90F5}\x{90F7}\x{90F8}\x{90F9}' - . '\x{90FA}\x{90FB}\x{90FC}\x{90FD}\x{90FE}\x{90FF}\x{9100}\x{9101}\x{9102}' - . '\x{9103}\x{9104}\x{9105}\x{9106}\x{9107}\x{9108}\x{9109}\x{910B}\x{910C}' - . '\x{910D}\x{910E}\x{910F}\x{9110}\x{9111}\x{9112}\x{9113}\x{9114}\x{9115}' - . '\x{9116}\x{9117}\x{9118}\x{9119}\x{911A}\x{911B}\x{911C}\x{911D}\x{911E}' - . '\x{911F}\x{9120}\x{9121}\x{9122}\x{9123}\x{9124}\x{9125}\x{9126}\x{9127}' - . '\x{9128}\x{9129}\x{912A}\x{912B}\x{912C}\x{912D}\x{912E}\x{912F}\x{9130}' - . '\x{9131}\x{9132}\x{9133}\x{9134}\x{9135}\x{9136}\x{9137}\x{9138}\x{9139}' - . '\x{913A}\x{913B}\x{913E}\x{913F}\x{9140}\x{9141}\x{9142}\x{9143}\x{9144}' - . '\x{9145}\x{9146}\x{9147}\x{9148}\x{9149}\x{914A}\x{914B}\x{914C}\x{914D}' - . '\x{914E}\x{914F}\x{9150}\x{9151}\x{9152}\x{9153}\x{9154}\x{9155}\x{9156}' - . '\x{9157}\x{9158}\x{915A}\x{915B}\x{915C}\x{915D}\x{915E}\x{915F}\x{9160}' - . '\x{9161}\x{9162}\x{9163}\x{9164}\x{9165}\x{9166}\x{9167}\x{9168}\x{9169}' - . '\x{916A}\x{916B}\x{916C}\x{916D}\x{916E}\x{916F}\x{9170}\x{9171}\x{9172}' - . '\x{9173}\x{9174}\x{9175}\x{9176}\x{9177}\x{9178}\x{9179}\x{917A}\x{917C}' - . '\x{917D}\x{917E}\x{917F}\x{9180}\x{9181}\x{9182}\x{9183}\x{9184}\x{9185}' - . '\x{9186}\x{9187}\x{9188}\x{9189}\x{918A}\x{918B}\x{918C}\x{918D}\x{918E}' - . '\x{918F}\x{9190}\x{9191}\x{9192}\x{9193}\x{9194}\x{9196}\x{9199}\x{919A}' - . '\x{919B}\x{919C}\x{919D}\x{919E}\x{919F}\x{91A0}\x{91A1}\x{91A2}\x{91A3}' - . '\x{91A5}\x{91A6}\x{91A7}\x{91A8}\x{91AA}\x{91AB}\x{91AC}\x{91AD}\x{91AE}' - . '\x{91AF}\x{91B0}\x{91B1}\x{91B2}\x{91B3}\x{91B4}\x{91B5}\x{91B6}\x{91B7}' - . '\x{91B9}\x{91BA}\x{91BB}\x{91BC}\x{91BD}\x{91BE}\x{91C0}\x{91C1}\x{91C2}' - . '\x{91C3}\x{91C5}\x{91C6}\x{91C7}\x{91C9}\x{91CA}\x{91CB}\x{91CC}\x{91CD}' - . '\x{91CE}\x{91CF}\x{91D0}\x{91D1}\x{91D2}\x{91D3}\x{91D4}\x{91D5}\x{91D7}' - . '\x{91D8}\x{91D9}\x{91DA}\x{91DB}\x{91DC}\x{91DD}\x{91DE}\x{91DF}\x{91E2}' - . '\x{91E3}\x{91E4}\x{91E5}\x{91E6}\x{91E7}\x{91E8}\x{91E9}\x{91EA}\x{91EB}' - . '\x{91EC}\x{91ED}\x{91EE}\x{91F0}\x{91F1}\x{91F2}\x{91F3}\x{91F4}\x{91F5}' - . '\x{91F7}\x{91F8}\x{91F9}\x{91FA}\x{91FB}\x{91FD}\x{91FE}\x{91FF}\x{9200}' - . '\x{9201}\x{9202}\x{9203}\x{9204}\x{9205}\x{9206}\x{9207}\x{9208}\x{9209}' - . '\x{920A}\x{920B}\x{920C}\x{920D}\x{920E}\x{920F}\x{9210}\x{9211}\x{9212}' - . '\x{9214}\x{9215}\x{9216}\x{9217}\x{9218}\x{9219}\x{921A}\x{921B}\x{921C}' - . '\x{921D}\x{921E}\x{9220}\x{9221}\x{9223}\x{9224}\x{9225}\x{9226}\x{9227}' - . '\x{9228}\x{9229}\x{922A}\x{922B}\x{922D}\x{922E}\x{922F}\x{9230}\x{9231}' - . '\x{9232}\x{9233}\x{9234}\x{9235}\x{9236}\x{9237}\x{9238}\x{9239}\x{923A}' - . '\x{923B}\x{923C}\x{923D}\x{923E}\x{923F}\x{9240}\x{9241}\x{9242}\x{9245}' - . '\x{9246}\x{9247}\x{9248}\x{9249}\x{924A}\x{924B}\x{924C}\x{924D}\x{924E}' - . '\x{924F}\x{9250}\x{9251}\x{9252}\x{9253}\x{9254}\x{9255}\x{9256}\x{9257}' - . '\x{9258}\x{9259}\x{925A}\x{925B}\x{925C}\x{925D}\x{925E}\x{925F}\x{9260}' - . '\x{9261}\x{9262}\x{9263}\x{9264}\x{9265}\x{9266}\x{9267}\x{9268}\x{926B}' - . '\x{926C}\x{926D}\x{926E}\x{926F}\x{9270}\x{9272}\x{9273}\x{9274}\x{9275}' - . '\x{9276}\x{9277}\x{9278}\x{9279}\x{927A}\x{927B}\x{927C}\x{927D}\x{927E}' - . '\x{927F}\x{9280}\x{9282}\x{9283}\x{9285}\x{9286}\x{9287}\x{9288}\x{9289}' - . '\x{928A}\x{928B}\x{928C}\x{928D}\x{928E}\x{928F}\x{9290}\x{9291}\x{9292}' - . '\x{9293}\x{9294}\x{9295}\x{9296}\x{9297}\x{9298}\x{9299}\x{929A}\x{929B}' - . '\x{929C}\x{929D}\x{929F}\x{92A0}\x{92A1}\x{92A2}\x{92A3}\x{92A4}\x{92A5}' - . '\x{92A6}\x{92A7}\x{92A8}\x{92A9}\x{92AA}\x{92AB}\x{92AC}\x{92AD}\x{92AE}' - . '\x{92AF}\x{92B0}\x{92B1}\x{92B2}\x{92B3}\x{92B4}\x{92B5}\x{92B6}\x{92B7}' - . '\x{92B8}\x{92B9}\x{92BA}\x{92BB}\x{92BC}\x{92BE}\x{92BF}\x{92C0}\x{92C1}' - . '\x{92C2}\x{92C3}\x{92C4}\x{92C5}\x{92C6}\x{92C7}\x{92C8}\x{92C9}\x{92CA}' - . '\x{92CB}\x{92CC}\x{92CD}\x{92CE}\x{92CF}\x{92D0}\x{92D1}\x{92D2}\x{92D3}' - . '\x{92D5}\x{92D6}\x{92D7}\x{92D8}\x{92D9}\x{92DA}\x{92DC}\x{92DD}\x{92DE}' - . '\x{92DF}\x{92E0}\x{92E1}\x{92E3}\x{92E4}\x{92E5}\x{92E6}\x{92E7}\x{92E8}' - . '\x{92E9}\x{92EA}\x{92EB}\x{92EC}\x{92ED}\x{92EE}\x{92EF}\x{92F0}\x{92F1}' - . '\x{92F2}\x{92F3}\x{92F4}\x{92F5}\x{92F6}\x{92F7}\x{92F8}\x{92F9}\x{92FA}' - . '\x{92FB}\x{92FC}\x{92FD}\x{92FE}\x{92FF}\x{9300}\x{9301}\x{9302}\x{9303}' - . '\x{9304}\x{9305}\x{9306}\x{9307}\x{9308}\x{9309}\x{930A}\x{930B}\x{930C}' - . '\x{930D}\x{930E}\x{930F}\x{9310}\x{9311}\x{9312}\x{9313}\x{9314}\x{9315}' - . '\x{9316}\x{9317}\x{9318}\x{9319}\x{931A}\x{931B}\x{931D}\x{931E}\x{931F}' - . '\x{9320}\x{9321}\x{9322}\x{9323}\x{9324}\x{9325}\x{9326}\x{9327}\x{9328}' - . '\x{9329}\x{932A}\x{932B}\x{932D}\x{932E}\x{932F}\x{9332}\x{9333}\x{9334}' - . '\x{9335}\x{9336}\x{9337}\x{9338}\x{9339}\x{933A}\x{933B}\x{933C}\x{933D}' - . '\x{933E}\x{933F}\x{9340}\x{9341}\x{9342}\x{9343}\x{9344}\x{9345}\x{9346}' - . '\x{9347}\x{9348}\x{9349}\x{934A}\x{934B}\x{934C}\x{934D}\x{934E}\x{934F}' - . '\x{9350}\x{9351}\x{9352}\x{9353}\x{9354}\x{9355}\x{9356}\x{9357}\x{9358}' - . '\x{9359}\x{935A}\x{935B}\x{935C}\x{935D}\x{935E}\x{935F}\x{9360}\x{9361}' - . '\x{9363}\x{9364}\x{9365}\x{9366}\x{9367}\x{9369}\x{936A}\x{936C}\x{936D}' - . '\x{936E}\x{9370}\x{9371}\x{9372}\x{9374}\x{9375}\x{9376}\x{9377}\x{9379}' - . '\x{937A}\x{937B}\x{937C}\x{937D}\x{937E}\x{9380}\x{9382}\x{9383}\x{9384}' - . '\x{9385}\x{9386}\x{9387}\x{9388}\x{9389}\x{938A}\x{938C}\x{938D}\x{938E}' - . '\x{938F}\x{9390}\x{9391}\x{9392}\x{9393}\x{9394}\x{9395}\x{9396}\x{9397}' - . '\x{9398}\x{9399}\x{939A}\x{939B}\x{939D}\x{939E}\x{939F}\x{93A1}\x{93A2}' - . '\x{93A3}\x{93A4}\x{93A5}\x{93A6}\x{93A7}\x{93A8}\x{93A9}\x{93AA}\x{93AC}' - . '\x{93AD}\x{93AE}\x{93AF}\x{93B0}\x{93B1}\x{93B2}\x{93B3}\x{93B4}\x{93B5}' - . '\x{93B6}\x{93B7}\x{93B8}\x{93B9}\x{93BA}\x{93BC}\x{93BD}\x{93BE}\x{93BF}' - . '\x{93C0}\x{93C1}\x{93C2}\x{93C3}\x{93C4}\x{93C5}\x{93C6}\x{93C7}\x{93C8}' - . '\x{93C9}\x{93CA}\x{93CB}\x{93CC}\x{93CD}\x{93CE}\x{93CF}\x{93D0}\x{93D1}' - . '\x{93D2}\x{93D3}\x{93D4}\x{93D5}\x{93D6}\x{93D7}\x{93D8}\x{93D9}\x{93DA}' - . '\x{93DB}\x{93DC}\x{93DD}\x{93DE}\x{93DF}\x{93E1}\x{93E2}\x{93E3}\x{93E4}' - . '\x{93E6}\x{93E7}\x{93E8}\x{93E9}\x{93EA}\x{93EB}\x{93EC}\x{93ED}\x{93EE}' - . '\x{93EF}\x{93F0}\x{93F1}\x{93F2}\x{93F4}\x{93F5}\x{93F6}\x{93F7}\x{93F8}' - . '\x{93F9}\x{93FA}\x{93FB}\x{93FC}\x{93FD}\x{93FE}\x{93FF}\x{9400}\x{9401}' - . '\x{9403}\x{9404}\x{9405}\x{9406}\x{9407}\x{9408}\x{9409}\x{940A}\x{940B}' - . '\x{940C}\x{940D}\x{940E}\x{940F}\x{9410}\x{9411}\x{9412}\x{9413}\x{9414}' - . '\x{9415}\x{9416}\x{9418}\x{9419}\x{941B}\x{941D}\x{9420}\x{9422}\x{9423}' - . '\x{9425}\x{9426}\x{9427}\x{9428}\x{9429}\x{942A}\x{942B}\x{942C}\x{942D}' - . '\x{942E}\x{942F}\x{9430}\x{9431}\x{9432}\x{9433}\x{9434}\x{9435}\x{9436}' - . '\x{9437}\x{9438}\x{9439}\x{943A}\x{943B}\x{943C}\x{943D}\x{943E}\x{943F}' - . '\x{9440}\x{9441}\x{9442}\x{9444}\x{9445}\x{9446}\x{9447}\x{9448}\x{9449}' - . '\x{944A}\x{944B}\x{944C}\x{944D}\x{944F}\x{9450}\x{9451}\x{9452}\x{9453}' - . '\x{9454}\x{9455}\x{9456}\x{9457}\x{9458}\x{9459}\x{945B}\x{945C}\x{945D}' - . '\x{945E}\x{945F}\x{9460}\x{9461}\x{9462}\x{9463}\x{9464}\x{9465}\x{9466}' - . '\x{9467}\x{9468}\x{9469}\x{946A}\x{946B}\x{946D}\x{946E}\x{946F}\x{9470}' - . '\x{9471}\x{9472}\x{9473}\x{9474}\x{9475}\x{9476}\x{9477}\x{9478}\x{9479}' - . '\x{947A}\x{947C}\x{947D}\x{947E}\x{947F}\x{9480}\x{9481}\x{9482}\x{9483}' - . '\x{9484}\x{9485}\x{9486}\x{9487}\x{9488}\x{9489}\x{948A}\x{948B}\x{948C}' - . '\x{948D}\x{948E}\x{948F}\x{9490}\x{9491}\x{9492}\x{9493}\x{9494}\x{9495}' - . '\x{9496}\x{9497}\x{9498}\x{9499}\x{949A}\x{949B}\x{949C}\x{949D}\x{949E}' - . '\x{949F}\x{94A0}\x{94A1}\x{94A2}\x{94A3}\x{94A4}\x{94A5}\x{94A6}\x{94A7}' - . '\x{94A8}\x{94A9}\x{94AA}\x{94AB}\x{94AC}\x{94AD}\x{94AE}\x{94AF}\x{94B0}' - . '\x{94B1}\x{94B2}\x{94B3}\x{94B4}\x{94B5}\x{94B6}\x{94B7}\x{94B8}\x{94B9}' - . '\x{94BA}\x{94BB}\x{94BC}\x{94BD}\x{94BE}\x{94BF}\x{94C0}\x{94C1}\x{94C2}' - . '\x{94C3}\x{94C4}\x{94C5}\x{94C6}\x{94C7}\x{94C8}\x{94C9}\x{94CA}\x{94CB}' - . '\x{94CC}\x{94CD}\x{94CE}\x{94CF}\x{94D0}\x{94D1}\x{94D2}\x{94D3}\x{94D4}' - . '\x{94D5}\x{94D6}\x{94D7}\x{94D8}\x{94D9}\x{94DA}\x{94DB}\x{94DC}\x{94DD}' - . '\x{94DE}\x{94DF}\x{94E0}\x{94E1}\x{94E2}\x{94E3}\x{94E4}\x{94E5}\x{94E6}' - . '\x{94E7}\x{94E8}\x{94E9}\x{94EA}\x{94EB}\x{94EC}\x{94ED}\x{94EE}\x{94EF}' - . '\x{94F0}\x{94F1}\x{94F2}\x{94F3}\x{94F4}\x{94F5}\x{94F6}\x{94F7}\x{94F8}' - . '\x{94F9}\x{94FA}\x{94FB}\x{94FC}\x{94FD}\x{94FE}\x{94FF}\x{9500}\x{9501}' - . '\x{9502}\x{9503}\x{9504}\x{9505}\x{9506}\x{9507}\x{9508}\x{9509}\x{950A}' - . '\x{950B}\x{950C}\x{950D}\x{950E}\x{950F}\x{9510}\x{9511}\x{9512}\x{9513}' - . '\x{9514}\x{9515}\x{9516}\x{9517}\x{9518}\x{9519}\x{951A}\x{951B}\x{951C}' - . '\x{951D}\x{951E}\x{951F}\x{9520}\x{9521}\x{9522}\x{9523}\x{9524}\x{9525}' - . '\x{9526}\x{9527}\x{9528}\x{9529}\x{952A}\x{952B}\x{952C}\x{952D}\x{952E}' - . '\x{952F}\x{9530}\x{9531}\x{9532}\x{9533}\x{9534}\x{9535}\x{9536}\x{9537}' - . '\x{9538}\x{9539}\x{953A}\x{953B}\x{953C}\x{953D}\x{953E}\x{953F}\x{9540}' - . '\x{9541}\x{9542}\x{9543}\x{9544}\x{9545}\x{9546}\x{9547}\x{9548}\x{9549}' - . '\x{954A}\x{954B}\x{954C}\x{954D}\x{954E}\x{954F}\x{9550}\x{9551}\x{9552}' - . '\x{9553}\x{9554}\x{9555}\x{9556}\x{9557}\x{9558}\x{9559}\x{955A}\x{955B}' - . '\x{955C}\x{955D}\x{955E}\x{955F}\x{9560}\x{9561}\x{9562}\x{9563}\x{9564}' - . '\x{9565}\x{9566}\x{9567}\x{9568}\x{9569}\x{956A}\x{956B}\x{956C}\x{956D}' - . '\x{956E}\x{956F}\x{9570}\x{9571}\x{9572}\x{9573}\x{9574}\x{9575}\x{9576}' - . '\x{9577}\x{957A}\x{957B}\x{957C}\x{957D}\x{957F}\x{9580}\x{9581}\x{9582}' - . '\x{9583}\x{9584}\x{9586}\x{9587}\x{9588}\x{9589}\x{958A}\x{958B}\x{958C}' - . '\x{958D}\x{958E}\x{958F}\x{9590}\x{9591}\x{9592}\x{9593}\x{9594}\x{9595}' - . '\x{9596}\x{9598}\x{9599}\x{959A}\x{959B}\x{959C}\x{959D}\x{959E}\x{959F}' - . '\x{95A1}\x{95A2}\x{95A3}\x{95A4}\x{95A5}\x{95A6}\x{95A7}\x{95A8}\x{95A9}' - . '\x{95AA}\x{95AB}\x{95AC}\x{95AD}\x{95AE}\x{95AF}\x{95B0}\x{95B1}\x{95B2}' - . '\x{95B5}\x{95B6}\x{95B7}\x{95B9}\x{95BA}\x{95BB}\x{95BC}\x{95BD}\x{95BE}' - . '\x{95BF}\x{95C0}\x{95C2}\x{95C3}\x{95C4}\x{95C5}\x{95C6}\x{95C7}\x{95C8}' - . '\x{95C9}\x{95CA}\x{95CB}\x{95CC}\x{95CD}\x{95CE}\x{95CF}\x{95D0}\x{95D1}' - . '\x{95D2}\x{95D3}\x{95D4}\x{95D5}\x{95D6}\x{95D7}\x{95D8}\x{95DA}\x{95DB}' - . '\x{95DC}\x{95DE}\x{95DF}\x{95E0}\x{95E1}\x{95E2}\x{95E3}\x{95E4}\x{95E5}' - . '\x{95E6}\x{95E7}\x{95E8}\x{95E9}\x{95EA}\x{95EB}\x{95EC}\x{95ED}\x{95EE}' - . '\x{95EF}\x{95F0}\x{95F1}\x{95F2}\x{95F3}\x{95F4}\x{95F5}\x{95F6}\x{95F7}' - . '\x{95F8}\x{95F9}\x{95FA}\x{95FB}\x{95FC}\x{95FD}\x{95FE}\x{95FF}\x{9600}' - . '\x{9601}\x{9602}\x{9603}\x{9604}\x{9605}\x{9606}\x{9607}\x{9608}\x{9609}' - . '\x{960A}\x{960B}\x{960C}\x{960D}\x{960E}\x{960F}\x{9610}\x{9611}\x{9612}' - . '\x{9613}\x{9614}\x{9615}\x{9616}\x{9617}\x{9618}\x{9619}\x{961A}\x{961B}' - . '\x{961C}\x{961D}\x{961E}\x{961F}\x{9620}\x{9621}\x{9622}\x{9623}\x{9624}' - . '\x{9627}\x{9628}\x{962A}\x{962B}\x{962C}\x{962D}\x{962E}\x{962F}\x{9630}' - . '\x{9631}\x{9632}\x{9633}\x{9634}\x{9635}\x{9636}\x{9637}\x{9638}\x{9639}' - . '\x{963A}\x{963B}\x{963C}\x{963D}\x{963F}\x{9640}\x{9641}\x{9642}\x{9643}' - . '\x{9644}\x{9645}\x{9646}\x{9647}\x{9648}\x{9649}\x{964A}\x{964B}\x{964C}' - . '\x{964D}\x{964E}\x{964F}\x{9650}\x{9651}\x{9652}\x{9653}\x{9654}\x{9655}' - . '\x{9658}\x{9659}\x{965A}\x{965B}\x{965C}\x{965D}\x{965E}\x{965F}\x{9660}' - . '\x{9661}\x{9662}\x{9663}\x{9664}\x{9666}\x{9667}\x{9668}\x{9669}\x{966A}' - . '\x{966B}\x{966C}\x{966D}\x{966E}\x{966F}\x{9670}\x{9671}\x{9672}\x{9673}' - . '\x{9674}\x{9675}\x{9676}\x{9677}\x{9678}\x{967C}\x{967D}\x{967E}\x{9680}' - . '\x{9683}\x{9684}\x{9685}\x{9686}\x{9687}\x{9688}\x{9689}\x{968A}\x{968B}' - . '\x{968D}\x{968E}\x{968F}\x{9690}\x{9691}\x{9692}\x{9693}\x{9694}\x{9695}' - . '\x{9697}\x{9698}\x{9699}\x{969B}\x{969C}\x{969E}\x{96A0}\x{96A1}\x{96A2}' - . '\x{96A3}\x{96A4}\x{96A5}\x{96A6}\x{96A7}\x{96A8}\x{96A9}\x{96AA}\x{96AC}' - . '\x{96AD}\x{96AE}\x{96B0}\x{96B1}\x{96B3}\x{96B4}\x{96B6}\x{96B7}\x{96B8}' - . '\x{96B9}\x{96BA}\x{96BB}\x{96BC}\x{96BD}\x{96BE}\x{96BF}\x{96C0}\x{96C1}' - . '\x{96C2}\x{96C3}\x{96C4}\x{96C5}\x{96C6}\x{96C7}\x{96C8}\x{96C9}\x{96CA}' - . '\x{96CB}\x{96CC}\x{96CD}\x{96CE}\x{96CF}\x{96D0}\x{96D1}\x{96D2}\x{96D3}' - . '\x{96D4}\x{96D5}\x{96D6}\x{96D7}\x{96D8}\x{96D9}\x{96DA}\x{96DB}\x{96DC}' - . '\x{96DD}\x{96DE}\x{96DF}\x{96E0}\x{96E1}\x{96E2}\x{96E3}\x{96E5}\x{96E8}' - . '\x{96E9}\x{96EA}\x{96EB}\x{96EC}\x{96ED}\x{96EE}\x{96EF}\x{96F0}\x{96F1}' - . '\x{96F2}\x{96F3}\x{96F4}\x{96F5}\x{96F6}\x{96F7}\x{96F8}\x{96F9}\x{96FA}' - . '\x{96FB}\x{96FD}\x{96FE}\x{96FF}\x{9700}\x{9701}\x{9702}\x{9703}\x{9704}' - . '\x{9705}\x{9706}\x{9707}\x{9708}\x{9709}\x{970A}\x{970B}\x{970C}\x{970D}' - . '\x{970E}\x{970F}\x{9710}\x{9711}\x{9712}\x{9713}\x{9715}\x{9716}\x{9718}' - . '\x{9719}\x{971C}\x{971D}\x{971E}\x{971F}\x{9720}\x{9721}\x{9722}\x{9723}' - . '\x{9724}\x{9725}\x{9726}\x{9727}\x{9728}\x{9729}\x{972A}\x{972B}\x{972C}' - . '\x{972D}\x{972E}\x{972F}\x{9730}\x{9731}\x{9732}\x{9735}\x{9736}\x{9738}' - . '\x{9739}\x{973A}\x{973B}\x{973C}\x{973D}\x{973E}\x{973F}\x{9742}\x{9743}' - . '\x{9744}\x{9745}\x{9746}\x{9747}\x{9748}\x{9749}\x{974A}\x{974B}\x{974C}' - . '\x{974E}\x{974F}\x{9750}\x{9751}\x{9752}\x{9753}\x{9754}\x{9755}\x{9756}' - . '\x{9758}\x{9759}\x{975A}\x{975B}\x{975C}\x{975D}\x{975E}\x{975F}\x{9760}' - . '\x{9761}\x{9762}\x{9765}\x{9766}\x{9767}\x{9768}\x{9769}\x{976A}\x{976B}' - . '\x{976C}\x{976D}\x{976E}\x{976F}\x{9770}\x{9772}\x{9773}\x{9774}\x{9776}' - . '\x{9777}\x{9778}\x{9779}\x{977A}\x{977B}\x{977C}\x{977D}\x{977E}\x{977F}' - . '\x{9780}\x{9781}\x{9782}\x{9783}\x{9784}\x{9785}\x{9786}\x{9788}\x{978A}' - . '\x{978B}\x{978C}\x{978D}\x{978E}\x{978F}\x{9790}\x{9791}\x{9792}\x{9793}' - . '\x{9794}\x{9795}\x{9796}\x{9797}\x{9798}\x{9799}\x{979A}\x{979C}\x{979D}' - . '\x{979E}\x{979F}\x{97A0}\x{97A1}\x{97A2}\x{97A3}\x{97A4}\x{97A5}\x{97A6}' - . '\x{97A7}\x{97A8}\x{97AA}\x{97AB}\x{97AC}\x{97AD}\x{97AE}\x{97AF}\x{97B2}' - . '\x{97B3}\x{97B4}\x{97B6}\x{97B7}\x{97B8}\x{97B9}\x{97BA}\x{97BB}\x{97BC}' - . '\x{97BD}\x{97BF}\x{97C1}\x{97C2}\x{97C3}\x{97C4}\x{97C5}\x{97C6}\x{97C7}' - . '\x{97C8}\x{97C9}\x{97CA}\x{97CB}\x{97CC}\x{97CD}\x{97CE}\x{97CF}\x{97D0}' - . '\x{97D1}\x{97D3}\x{97D4}\x{97D5}\x{97D6}\x{97D7}\x{97D8}\x{97D9}\x{97DA}' - . '\x{97DB}\x{97DC}\x{97DD}\x{97DE}\x{97DF}\x{97E0}\x{97E1}\x{97E2}\x{97E3}' - . '\x{97E4}\x{97E5}\x{97E6}\x{97E7}\x{97E8}\x{97E9}\x{97EA}\x{97EB}\x{97EC}' - . '\x{97ED}\x{97EE}\x{97EF}\x{97F0}\x{97F1}\x{97F2}\x{97F3}\x{97F4}\x{97F5}' - . '\x{97F6}\x{97F7}\x{97F8}\x{97F9}\x{97FA}\x{97FB}\x{97FD}\x{97FE}\x{97FF}' - . '\x{9800}\x{9801}\x{9802}\x{9803}\x{9804}\x{9805}\x{9806}\x{9807}\x{9808}' - . '\x{9809}\x{980A}\x{980B}\x{980C}\x{980D}\x{980E}\x{980F}\x{9810}\x{9811}' - . '\x{9812}\x{9813}\x{9814}\x{9815}\x{9816}\x{9817}\x{9818}\x{9819}\x{981A}' - . '\x{981B}\x{981C}\x{981D}\x{981E}\x{9820}\x{9821}\x{9822}\x{9823}\x{9824}' - . '\x{9826}\x{9827}\x{9828}\x{9829}\x{982B}\x{982D}\x{982E}\x{982F}\x{9830}' - . '\x{9831}\x{9832}\x{9834}\x{9835}\x{9836}\x{9837}\x{9838}\x{9839}\x{983B}' - . '\x{983C}\x{983D}\x{983F}\x{9840}\x{9841}\x{9843}\x{9844}\x{9845}\x{9846}' - . '\x{9848}\x{9849}\x{984A}\x{984C}\x{984D}\x{984E}\x{984F}\x{9850}\x{9851}' - . '\x{9852}\x{9853}\x{9854}\x{9855}\x{9857}\x{9858}\x{9859}\x{985A}\x{985B}' - . '\x{985C}\x{985D}\x{985E}\x{985F}\x{9860}\x{9861}\x{9862}\x{9863}\x{9864}' - . '\x{9865}\x{9867}\x{9869}\x{986A}\x{986B}\x{986C}\x{986D}\x{986E}\x{986F}' - . '\x{9870}\x{9871}\x{9872}\x{9873}\x{9874}\x{9875}\x{9876}\x{9877}\x{9878}' - . '\x{9879}\x{987A}\x{987B}\x{987C}\x{987D}\x{987E}\x{987F}\x{9880}\x{9881}' - . '\x{9882}\x{9883}\x{9884}\x{9885}\x{9886}\x{9887}\x{9888}\x{9889}\x{988A}' - . '\x{988B}\x{988C}\x{988D}\x{988E}\x{988F}\x{9890}\x{9891}\x{9892}\x{9893}' - . '\x{9894}\x{9895}\x{9896}\x{9897}\x{9898}\x{9899}\x{989A}\x{989B}\x{989C}' - . '\x{989D}\x{989E}\x{989F}\x{98A0}\x{98A1}\x{98A2}\x{98A3}\x{98A4}\x{98A5}' - . '\x{98A6}\x{98A7}\x{98A8}\x{98A9}\x{98AA}\x{98AB}\x{98AC}\x{98AD}\x{98AE}' - . '\x{98AF}\x{98B0}\x{98B1}\x{98B2}\x{98B3}\x{98B4}\x{98B5}\x{98B6}\x{98B8}' - . '\x{98B9}\x{98BA}\x{98BB}\x{98BC}\x{98BD}\x{98BE}\x{98BF}\x{98C0}\x{98C1}' - . '\x{98C2}\x{98C3}\x{98C4}\x{98C5}\x{98C6}\x{98C8}\x{98C9}\x{98CB}\x{98CC}' - . '\x{98CD}\x{98CE}\x{98CF}\x{98D0}\x{98D1}\x{98D2}\x{98D3}\x{98D4}\x{98D5}' - . '\x{98D6}\x{98D7}\x{98D8}\x{98D9}\x{98DA}\x{98DB}\x{98DC}\x{98DD}\x{98DE}' - . '\x{98DF}\x{98E0}\x{98E2}\x{98E3}\x{98E5}\x{98E6}\x{98E7}\x{98E8}\x{98E9}' - . '\x{98EA}\x{98EB}\x{98ED}\x{98EF}\x{98F0}\x{98F2}\x{98F3}\x{98F4}\x{98F5}' - . '\x{98F6}\x{98F7}\x{98F9}\x{98FA}\x{98FC}\x{98FD}\x{98FE}\x{98FF}\x{9900}' - . '\x{9901}\x{9902}\x{9903}\x{9904}\x{9905}\x{9906}\x{9907}\x{9908}\x{9909}' - . '\x{990A}\x{990B}\x{990C}\x{990D}\x{990E}\x{990F}\x{9910}\x{9911}\x{9912}' - . '\x{9913}\x{9914}\x{9915}\x{9916}\x{9917}\x{9918}\x{991A}\x{991B}\x{991C}' - . '\x{991D}\x{991E}\x{991F}\x{9920}\x{9921}\x{9922}\x{9923}\x{9924}\x{9925}' - . '\x{9926}\x{9927}\x{9928}\x{9929}\x{992A}\x{992B}\x{992C}\x{992D}\x{992E}' - . '\x{992F}\x{9930}\x{9931}\x{9932}\x{9933}\x{9934}\x{9935}\x{9936}\x{9937}' - . '\x{9938}\x{9939}\x{993A}\x{993C}\x{993D}\x{993E}\x{993F}\x{9940}\x{9941}' - . '\x{9942}\x{9943}\x{9945}\x{9946}\x{9947}\x{9948}\x{9949}\x{994A}\x{994B}' - . '\x{994C}\x{994E}\x{994F}\x{9950}\x{9951}\x{9952}\x{9953}\x{9954}\x{9955}' - . '\x{9956}\x{9957}\x{9958}\x{9959}\x{995B}\x{995C}\x{995E}\x{995F}\x{9960}' - . '\x{9961}\x{9962}\x{9963}\x{9964}\x{9965}\x{9966}\x{9967}\x{9968}\x{9969}' - . '\x{996A}\x{996B}\x{996C}\x{996D}\x{996E}\x{996F}\x{9970}\x{9971}\x{9972}' - . '\x{9973}\x{9974}\x{9975}\x{9976}\x{9977}\x{9978}\x{9979}\x{997A}\x{997B}' - . '\x{997C}\x{997D}\x{997E}\x{997F}\x{9980}\x{9981}\x{9982}\x{9983}\x{9984}' - . '\x{9985}\x{9986}\x{9987}\x{9988}\x{9989}\x{998A}\x{998B}\x{998C}\x{998D}' - . '\x{998E}\x{998F}\x{9990}\x{9991}\x{9992}\x{9993}\x{9994}\x{9995}\x{9996}' - . '\x{9997}\x{9998}\x{9999}\x{999A}\x{999B}\x{999C}\x{999D}\x{999E}\x{999F}' - . '\x{99A0}\x{99A1}\x{99A2}\x{99A3}\x{99A4}\x{99A5}\x{99A6}\x{99A7}\x{99A8}' - . '\x{99A9}\x{99AA}\x{99AB}\x{99AC}\x{99AD}\x{99AE}\x{99AF}\x{99B0}\x{99B1}' - . '\x{99B2}\x{99B3}\x{99B4}\x{99B5}\x{99B6}\x{99B7}\x{99B8}\x{99B9}\x{99BA}' - . '\x{99BB}\x{99BC}\x{99BD}\x{99BE}\x{99C0}\x{99C1}\x{99C2}\x{99C3}\x{99C4}' - . '\x{99C6}\x{99C7}\x{99C8}\x{99C9}\x{99CA}\x{99CB}\x{99CC}\x{99CD}\x{99CE}' - . '\x{99CF}\x{99D0}\x{99D1}\x{99D2}\x{99D3}\x{99D4}\x{99D5}\x{99D6}\x{99D7}' - . '\x{99D8}\x{99D9}\x{99DA}\x{99DB}\x{99DC}\x{99DD}\x{99DE}\x{99DF}\x{99E1}' - . '\x{99E2}\x{99E3}\x{99E4}\x{99E5}\x{99E7}\x{99E8}\x{99E9}\x{99EA}\x{99EC}' - . '\x{99ED}\x{99EE}\x{99EF}\x{99F0}\x{99F1}\x{99F2}\x{99F3}\x{99F4}\x{99F6}' - . '\x{99F7}\x{99F8}\x{99F9}\x{99FA}\x{99FB}\x{99FC}\x{99FD}\x{99FE}\x{99FF}' - . '\x{9A00}\x{9A01}\x{9A02}\x{9A03}\x{9A04}\x{9A05}\x{9A06}\x{9A07}\x{9A08}' - . '\x{9A09}\x{9A0A}\x{9A0B}\x{9A0C}\x{9A0D}\x{9A0E}\x{9A0F}\x{9A11}\x{9A14}' - . '\x{9A15}\x{9A16}\x{9A19}\x{9A1A}\x{9A1B}\x{9A1C}\x{9A1D}\x{9A1E}\x{9A1F}' - . '\x{9A20}\x{9A21}\x{9A22}\x{9A23}\x{9A24}\x{9A25}\x{9A26}\x{9A27}\x{9A29}' - . '\x{9A2A}\x{9A2B}\x{9A2C}\x{9A2D}\x{9A2E}\x{9A2F}\x{9A30}\x{9A31}\x{9A32}' - . '\x{9A33}\x{9A34}\x{9A35}\x{9A36}\x{9A37}\x{9A38}\x{9A39}\x{9A3A}\x{9A3C}' - . '\x{9A3D}\x{9A3E}\x{9A3F}\x{9A40}\x{9A41}\x{9A42}\x{9A43}\x{9A44}\x{9A45}' - . '\x{9A46}\x{9A47}\x{9A48}\x{9A49}\x{9A4A}\x{9A4B}\x{9A4C}\x{9A4D}\x{9A4E}' - . '\x{9A4F}\x{9A50}\x{9A52}\x{9A53}\x{9A54}\x{9A55}\x{9A56}\x{9A57}\x{9A59}' - . '\x{9A5A}\x{9A5B}\x{9A5C}\x{9A5E}\x{9A5F}\x{9A60}\x{9A61}\x{9A62}\x{9A64}' - . '\x{9A65}\x{9A66}\x{9A67}\x{9A68}\x{9A69}\x{9A6A}\x{9A6B}\x{9A6C}\x{9A6D}' - . '\x{9A6E}\x{9A6F}\x{9A70}\x{9A71}\x{9A72}\x{9A73}\x{9A74}\x{9A75}\x{9A76}' - . '\x{9A77}\x{9A78}\x{9A79}\x{9A7A}\x{9A7B}\x{9A7C}\x{9A7D}\x{9A7E}\x{9A7F}' - . '\x{9A80}\x{9A81}\x{9A82}\x{9A83}\x{9A84}\x{9A85}\x{9A86}\x{9A87}\x{9A88}' - . '\x{9A89}\x{9A8A}\x{9A8B}\x{9A8C}\x{9A8D}\x{9A8E}\x{9A8F}\x{9A90}\x{9A91}' - . '\x{9A92}\x{9A93}\x{9A94}\x{9A95}\x{9A96}\x{9A97}\x{9A98}\x{9A99}\x{9A9A}' - . '\x{9A9B}\x{9A9C}\x{9A9D}\x{9A9E}\x{9A9F}\x{9AA0}\x{9AA1}\x{9AA2}\x{9AA3}' - . '\x{9AA4}\x{9AA5}\x{9AA6}\x{9AA7}\x{9AA8}\x{9AAA}\x{9AAB}\x{9AAC}\x{9AAD}' - . '\x{9AAE}\x{9AAF}\x{9AB0}\x{9AB1}\x{9AB2}\x{9AB3}\x{9AB4}\x{9AB5}\x{9AB6}' - . '\x{9AB7}\x{9AB8}\x{9AB9}\x{9ABA}\x{9ABB}\x{9ABC}\x{9ABE}\x{9ABF}\x{9AC0}' - . '\x{9AC1}\x{9AC2}\x{9AC3}\x{9AC4}\x{9AC5}\x{9AC6}\x{9AC7}\x{9AC9}\x{9ACA}' - . '\x{9ACB}\x{9ACC}\x{9ACD}\x{9ACE}\x{9ACF}\x{9AD0}\x{9AD1}\x{9AD2}\x{9AD3}' - . '\x{9AD4}\x{9AD5}\x{9AD6}\x{9AD8}\x{9AD9}\x{9ADA}\x{9ADB}\x{9ADC}\x{9ADD}' - . '\x{9ADE}\x{9ADF}\x{9AE1}\x{9AE2}\x{9AE3}\x{9AE5}\x{9AE6}\x{9AE7}\x{9AEA}' - . '\x{9AEB}\x{9AEC}\x{9AED}\x{9AEE}\x{9AEF}\x{9AF1}\x{9AF2}\x{9AF3}\x{9AF4}' - . '\x{9AF5}\x{9AF6}\x{9AF7}\x{9AF8}\x{9AF9}\x{9AFA}\x{9AFB}\x{9AFC}\x{9AFD}' - . '\x{9AFE}\x{9AFF}\x{9B01}\x{9B03}\x{9B04}\x{9B05}\x{9B06}\x{9B07}\x{9B08}' - . '\x{9B0A}\x{9B0B}\x{9B0C}\x{9B0D}\x{9B0E}\x{9B0F}\x{9B10}\x{9B11}\x{9B12}' - . '\x{9B13}\x{9B15}\x{9B16}\x{9B17}\x{9B18}\x{9B19}\x{9B1A}\x{9B1C}\x{9B1D}' - . '\x{9B1E}\x{9B1F}\x{9B20}\x{9B21}\x{9B22}\x{9B23}\x{9B24}\x{9B25}\x{9B26}' - . '\x{9B27}\x{9B28}\x{9B29}\x{9B2A}\x{9B2B}\x{9B2C}\x{9B2D}\x{9B2E}\x{9B2F}' - . '\x{9B30}\x{9B31}\x{9B32}\x{9B33}\x{9B35}\x{9B36}\x{9B37}\x{9B38}\x{9B39}' - . '\x{9B3A}\x{9B3B}\x{9B3C}\x{9B3E}\x{9B3F}\x{9B41}\x{9B42}\x{9B43}\x{9B44}' - . '\x{9B45}\x{9B46}\x{9B47}\x{9B48}\x{9B49}\x{9B4A}\x{9B4B}\x{9B4C}\x{9B4D}' - . '\x{9B4E}\x{9B4F}\x{9B51}\x{9B52}\x{9B53}\x{9B54}\x{9B55}\x{9B56}\x{9B58}' - . '\x{9B59}\x{9B5A}\x{9B5B}\x{9B5C}\x{9B5D}\x{9B5E}\x{9B5F}\x{9B60}\x{9B61}' - . '\x{9B63}\x{9B64}\x{9B65}\x{9B66}\x{9B67}\x{9B68}\x{9B69}\x{9B6A}\x{9B6B}' - . '\x{9B6C}\x{9B6D}\x{9B6E}\x{9B6F}\x{9B70}\x{9B71}\x{9B73}\x{9B74}\x{9B75}' - . '\x{9B76}\x{9B77}\x{9B78}\x{9B79}\x{9B7A}\x{9B7B}\x{9B7C}\x{9B7D}\x{9B7E}' - . '\x{9B7F}\x{9B80}\x{9B81}\x{9B82}\x{9B83}\x{9B84}\x{9B85}\x{9B86}\x{9B87}' - . '\x{9B88}\x{9B8A}\x{9B8B}\x{9B8D}\x{9B8E}\x{9B8F}\x{9B90}\x{9B91}\x{9B92}' - . '\x{9B93}\x{9B94}\x{9B95}\x{9B96}\x{9B97}\x{9B98}\x{9B9A}\x{9B9B}\x{9B9C}' - . '\x{9B9D}\x{9B9E}\x{9B9F}\x{9BA0}\x{9BA1}\x{9BA2}\x{9BA3}\x{9BA4}\x{9BA5}' - . '\x{9BA6}\x{9BA7}\x{9BA8}\x{9BA9}\x{9BAA}\x{9BAB}\x{9BAC}\x{9BAD}\x{9BAE}' - . '\x{9BAF}\x{9BB0}\x{9BB1}\x{9BB2}\x{9BB3}\x{9BB4}\x{9BB5}\x{9BB6}\x{9BB7}' - . '\x{9BB8}\x{9BB9}\x{9BBA}\x{9BBB}\x{9BBC}\x{9BBD}\x{9BBE}\x{9BBF}\x{9BC0}' - . '\x{9BC1}\x{9BC3}\x{9BC4}\x{9BC5}\x{9BC6}\x{9BC7}\x{9BC8}\x{9BC9}\x{9BCA}' - . '\x{9BCB}\x{9BCC}\x{9BCD}\x{9BCE}\x{9BCF}\x{9BD0}\x{9BD1}\x{9BD2}\x{9BD3}' - . '\x{9BD4}\x{9BD5}\x{9BD6}\x{9BD7}\x{9BD8}\x{9BD9}\x{9BDA}\x{9BDB}\x{9BDC}' - . '\x{9BDD}\x{9BDE}\x{9BDF}\x{9BE0}\x{9BE1}\x{9BE2}\x{9BE3}\x{9BE4}\x{9BE5}' - . '\x{9BE6}\x{9BE7}\x{9BE8}\x{9BE9}\x{9BEA}\x{9BEB}\x{9BEC}\x{9BED}\x{9BEE}' - . '\x{9BEF}\x{9BF0}\x{9BF1}\x{9BF2}\x{9BF3}\x{9BF4}\x{9BF5}\x{9BF7}\x{9BF8}' - . '\x{9BF9}\x{9BFA}\x{9BFB}\x{9BFC}\x{9BFD}\x{9BFE}\x{9BFF}\x{9C02}\x{9C05}' - . '\x{9C06}\x{9C07}\x{9C08}\x{9C09}\x{9C0A}\x{9C0B}\x{9C0C}\x{9C0D}\x{9C0E}' - . '\x{9C0F}\x{9C10}\x{9C11}\x{9C12}\x{9C13}\x{9C14}\x{9C15}\x{9C16}\x{9C17}' - . '\x{9C18}\x{9C19}\x{9C1A}\x{9C1B}\x{9C1C}\x{9C1D}\x{9C1E}\x{9C1F}\x{9C20}' - . '\x{9C21}\x{9C22}\x{9C23}\x{9C24}\x{9C25}\x{9C26}\x{9C27}\x{9C28}\x{9C29}' - . '\x{9C2A}\x{9C2B}\x{9C2C}\x{9C2D}\x{9C2F}\x{9C30}\x{9C31}\x{9C32}\x{9C33}' - . '\x{9C34}\x{9C35}\x{9C36}\x{9C37}\x{9C38}\x{9C39}\x{9C3A}\x{9C3B}\x{9C3C}' - . '\x{9C3D}\x{9C3E}\x{9C3F}\x{9C40}\x{9C41}\x{9C43}\x{9C44}\x{9C45}\x{9C46}' - . '\x{9C47}\x{9C48}\x{9C49}\x{9C4A}\x{9C4B}\x{9C4C}\x{9C4D}\x{9C4E}\x{9C50}' - . '\x{9C52}\x{9C53}\x{9C54}\x{9C55}\x{9C56}\x{9C57}\x{9C58}\x{9C59}\x{9C5A}' - . '\x{9C5B}\x{9C5C}\x{9C5D}\x{9C5E}\x{9C5F}\x{9C60}\x{9C62}\x{9C63}\x{9C65}' - . '\x{9C66}\x{9C67}\x{9C68}\x{9C69}\x{9C6A}\x{9C6B}\x{9C6C}\x{9C6D}\x{9C6E}' - . '\x{9C6F}\x{9C70}\x{9C71}\x{9C72}\x{9C73}\x{9C74}\x{9C75}\x{9C77}\x{9C78}' - . '\x{9C79}\x{9C7A}\x{9C7C}\x{9C7D}\x{9C7E}\x{9C7F}\x{9C80}\x{9C81}\x{9C82}' - . '\x{9C83}\x{9C84}\x{9C85}\x{9C86}\x{9C87}\x{9C88}\x{9C89}\x{9C8A}\x{9C8B}' - . '\x{9C8C}\x{9C8D}\x{9C8E}\x{9C8F}\x{9C90}\x{9C91}\x{9C92}\x{9C93}\x{9C94}' - . '\x{9C95}\x{9C96}\x{9C97}\x{9C98}\x{9C99}\x{9C9A}\x{9C9B}\x{9C9C}\x{9C9D}' - . '\x{9C9E}\x{9C9F}\x{9CA0}\x{9CA1}\x{9CA2}\x{9CA3}\x{9CA4}\x{9CA5}\x{9CA6}' - . '\x{9CA7}\x{9CA8}\x{9CA9}\x{9CAA}\x{9CAB}\x{9CAC}\x{9CAD}\x{9CAE}\x{9CAF}' - . '\x{9CB0}\x{9CB1}\x{9CB2}\x{9CB3}\x{9CB4}\x{9CB5}\x{9CB6}\x{9CB7}\x{9CB8}' - . '\x{9CB9}\x{9CBA}\x{9CBB}\x{9CBC}\x{9CBD}\x{9CBE}\x{9CBF}\x{9CC0}\x{9CC1}' - . '\x{9CC2}\x{9CC3}\x{9CC4}\x{9CC5}\x{9CC6}\x{9CC7}\x{9CC8}\x{9CC9}\x{9CCA}' - . '\x{9CCB}\x{9CCC}\x{9CCD}\x{9CCE}\x{9CCF}\x{9CD0}\x{9CD1}\x{9CD2}\x{9CD3}' - . '\x{9CD4}\x{9CD5}\x{9CD6}\x{9CD7}\x{9CD8}\x{9CD9}\x{9CDA}\x{9CDB}\x{9CDC}' - . '\x{9CDD}\x{9CDE}\x{9CDF}\x{9CE0}\x{9CE1}\x{9CE2}\x{9CE3}\x{9CE4}\x{9CE5}' - . '\x{9CE6}\x{9CE7}\x{9CE8}\x{9CE9}\x{9CEA}\x{9CEB}\x{9CEC}\x{9CED}\x{9CEE}' - . '\x{9CEF}\x{9CF0}\x{9CF1}\x{9CF2}\x{9CF3}\x{9CF4}\x{9CF5}\x{9CF6}\x{9CF7}' - . '\x{9CF8}\x{9CF9}\x{9CFA}\x{9CFB}\x{9CFC}\x{9CFD}\x{9CFE}\x{9CFF}\x{9D00}' - . '\x{9D01}\x{9D02}\x{9D03}\x{9D04}\x{9D05}\x{9D06}\x{9D07}\x{9D08}\x{9D09}' - . '\x{9D0A}\x{9D0B}\x{9D0F}\x{9D10}\x{9D12}\x{9D13}\x{9D14}\x{9D15}\x{9D16}' - . '\x{9D17}\x{9D18}\x{9D19}\x{9D1A}\x{9D1B}\x{9D1C}\x{9D1D}\x{9D1E}\x{9D1F}' - . '\x{9D20}\x{9D21}\x{9D22}\x{9D23}\x{9D24}\x{9D25}\x{9D26}\x{9D28}\x{9D29}' - . '\x{9D2B}\x{9D2D}\x{9D2E}\x{9D2F}\x{9D30}\x{9D31}\x{9D32}\x{9D33}\x{9D34}' - . '\x{9D36}\x{9D37}\x{9D38}\x{9D39}\x{9D3A}\x{9D3B}\x{9D3D}\x{9D3E}\x{9D3F}' - . '\x{9D40}\x{9D41}\x{9D42}\x{9D43}\x{9D45}\x{9D46}\x{9D47}\x{9D48}\x{9D49}' - . '\x{9D4A}\x{9D4B}\x{9D4C}\x{9D4D}\x{9D4E}\x{9D4F}\x{9D50}\x{9D51}\x{9D52}' - . '\x{9D53}\x{9D54}\x{9D55}\x{9D56}\x{9D57}\x{9D58}\x{9D59}\x{9D5A}\x{9D5B}' - . '\x{9D5C}\x{9D5D}\x{9D5E}\x{9D5F}\x{9D60}\x{9D61}\x{9D62}\x{9D63}\x{9D64}' - . '\x{9D65}\x{9D66}\x{9D67}\x{9D68}\x{9D69}\x{9D6A}\x{9D6B}\x{9D6C}\x{9D6E}' - . '\x{9D6F}\x{9D70}\x{9D71}\x{9D72}\x{9D73}\x{9D74}\x{9D75}\x{9D76}\x{9D77}' - . '\x{9D78}\x{9D79}\x{9D7A}\x{9D7B}\x{9D7C}\x{9D7D}\x{9D7E}\x{9D7F}\x{9D80}' - . '\x{9D81}\x{9D82}\x{9D83}\x{9D84}\x{9D85}\x{9D86}\x{9D87}\x{9D88}\x{9D89}' - . '\x{9D8A}\x{9D8B}\x{9D8C}\x{9D8D}\x{9D8E}\x{9D90}\x{9D91}\x{9D92}\x{9D93}' - . '\x{9D94}\x{9D96}\x{9D97}\x{9D98}\x{9D99}\x{9D9A}\x{9D9B}\x{9D9C}\x{9D9D}' - . '\x{9D9E}\x{9D9F}\x{9DA0}\x{9DA1}\x{9DA2}\x{9DA3}\x{9DA4}\x{9DA5}\x{9DA6}' - . '\x{9DA7}\x{9DA8}\x{9DA9}\x{9DAA}\x{9DAB}\x{9DAC}\x{9DAD}\x{9DAF}\x{9DB0}' - . '\x{9DB1}\x{9DB2}\x{9DB3}\x{9DB4}\x{9DB5}\x{9DB6}\x{9DB7}\x{9DB8}\x{9DB9}' - . '\x{9DBA}\x{9DBB}\x{9DBC}\x{9DBE}\x{9DBF}\x{9DC1}\x{9DC2}\x{9DC3}\x{9DC4}' - . '\x{9DC5}\x{9DC7}\x{9DC8}\x{9DC9}\x{9DCA}\x{9DCB}\x{9DCC}\x{9DCD}\x{9DCE}' - . '\x{9DCF}\x{9DD0}\x{9DD1}\x{9DD2}\x{9DD3}\x{9DD4}\x{9DD5}\x{9DD6}\x{9DD7}' - . '\x{9DD8}\x{9DD9}\x{9DDA}\x{9DDB}\x{9DDC}\x{9DDD}\x{9DDE}\x{9DDF}\x{9DE0}' - . '\x{9DE1}\x{9DE2}\x{9DE3}\x{9DE4}\x{9DE5}\x{9DE6}\x{9DE7}\x{9DE8}\x{9DE9}' - . '\x{9DEB}\x{9DEC}\x{9DED}\x{9DEE}\x{9DEF}\x{9DF0}\x{9DF1}\x{9DF2}\x{9DF3}' - . '\x{9DF4}\x{9DF5}\x{9DF6}\x{9DF7}\x{9DF8}\x{9DF9}\x{9DFA}\x{9DFB}\x{9DFD}' - . '\x{9DFE}\x{9DFF}\x{9E00}\x{9E01}\x{9E02}\x{9E03}\x{9E04}\x{9E05}\x{9E06}' - . '\x{9E07}\x{9E08}\x{9E09}\x{9E0A}\x{9E0B}\x{9E0C}\x{9E0D}\x{9E0F}\x{9E10}' - . '\x{9E11}\x{9E12}\x{9E13}\x{9E14}\x{9E15}\x{9E17}\x{9E18}\x{9E19}\x{9E1A}' - . '\x{9E1B}\x{9E1D}\x{9E1E}\x{9E1F}\x{9E20}\x{9E21}\x{9E22}\x{9E23}\x{9E24}' - . '\x{9E25}\x{9E26}\x{9E27}\x{9E28}\x{9E29}\x{9E2A}\x{9E2B}\x{9E2C}\x{9E2D}' - . '\x{9E2E}\x{9E2F}\x{9E30}\x{9E31}\x{9E32}\x{9E33}\x{9E34}\x{9E35}\x{9E36}' - . '\x{9E37}\x{9E38}\x{9E39}\x{9E3A}\x{9E3B}\x{9E3C}\x{9E3D}\x{9E3E}\x{9E3F}' - . '\x{9E40}\x{9E41}\x{9E42}\x{9E43}\x{9E44}\x{9E45}\x{9E46}\x{9E47}\x{9E48}' - . '\x{9E49}\x{9E4A}\x{9E4B}\x{9E4C}\x{9E4D}\x{9E4E}\x{9E4F}\x{9E50}\x{9E51}' - . '\x{9E52}\x{9E53}\x{9E54}\x{9E55}\x{9E56}\x{9E57}\x{9E58}\x{9E59}\x{9E5A}' - . '\x{9E5B}\x{9E5C}\x{9E5D}\x{9E5E}\x{9E5F}\x{9E60}\x{9E61}\x{9E62}\x{9E63}' - . '\x{9E64}\x{9E65}\x{9E66}\x{9E67}\x{9E68}\x{9E69}\x{9E6A}\x{9E6B}\x{9E6C}' - . '\x{9E6D}\x{9E6E}\x{9E6F}\x{9E70}\x{9E71}\x{9E72}\x{9E73}\x{9E74}\x{9E75}' - . '\x{9E76}\x{9E77}\x{9E79}\x{9E7A}\x{9E7C}\x{9E7D}\x{9E7E}\x{9E7F}\x{9E80}' - . '\x{9E81}\x{9E82}\x{9E83}\x{9E84}\x{9E85}\x{9E86}\x{9E87}\x{9E88}\x{9E89}' - . '\x{9E8A}\x{9E8B}\x{9E8C}\x{9E8D}\x{9E8E}\x{9E91}\x{9E92}\x{9E93}\x{9E94}' - . '\x{9E96}\x{9E97}\x{9E99}\x{9E9A}\x{9E9B}\x{9E9C}\x{9E9D}\x{9E9F}\x{9EA0}' - . '\x{9EA1}\x{9EA3}\x{9EA4}\x{9EA5}\x{9EA6}\x{9EA7}\x{9EA8}\x{9EA9}\x{9EAA}' - . '\x{9EAD}\x{9EAE}\x{9EAF}\x{9EB0}\x{9EB2}\x{9EB3}\x{9EB4}\x{9EB5}\x{9EB6}' - . '\x{9EB7}\x{9EB8}\x{9EBB}\x{9EBC}\x{9EBD}\x{9EBE}\x{9EBF}\x{9EC0}\x{9EC1}' - . '\x{9EC2}\x{9EC3}\x{9EC4}\x{9EC5}\x{9EC6}\x{9EC7}\x{9EC8}\x{9EC9}\x{9ECA}' - . '\x{9ECB}\x{9ECC}\x{9ECD}\x{9ECE}\x{9ECF}\x{9ED0}\x{9ED1}\x{9ED2}\x{9ED3}' - . '\x{9ED4}\x{9ED5}\x{9ED6}\x{9ED7}\x{9ED8}\x{9ED9}\x{9EDA}\x{9EDB}\x{9EDC}' - . '\x{9EDD}\x{9EDE}\x{9EDF}\x{9EE0}\x{9EE1}\x{9EE2}\x{9EE3}\x{9EE4}\x{9EE5}' - . '\x{9EE6}\x{9EE7}\x{9EE8}\x{9EE9}\x{9EEA}\x{9EEB}\x{9EED}\x{9EEE}\x{9EEF}' - . '\x{9EF0}\x{9EF2}\x{9EF3}\x{9EF4}\x{9EF5}\x{9EF6}\x{9EF7}\x{9EF8}\x{9EF9}' - . '\x{9EFA}\x{9EFB}\x{9EFC}\x{9EFD}\x{9EFE}\x{9EFF}\x{9F00}\x{9F01}\x{9F02}' - . '\x{9F04}\x{9F05}\x{9F06}\x{9F07}\x{9F08}\x{9F09}\x{9F0A}\x{9F0B}\x{9F0C}' - . '\x{9F0D}\x{9F0E}\x{9F0F}\x{9F10}\x{9F12}\x{9F13}\x{9F15}\x{9F16}\x{9F17}' - . '\x{9F18}\x{9F19}\x{9F1A}\x{9F1B}\x{9F1C}\x{9F1D}\x{9F1E}\x{9F1F}\x{9F20}' - . '\x{9F22}\x{9F23}\x{9F24}\x{9F25}\x{9F27}\x{9F28}\x{9F29}\x{9F2A}\x{9F2B}' - . '\x{9F2C}\x{9F2D}\x{9F2E}\x{9F2F}\x{9F30}\x{9F31}\x{9F32}\x{9F33}\x{9F34}' - . '\x{9F35}\x{9F36}\x{9F37}\x{9F38}\x{9F39}\x{9F3A}\x{9F3B}\x{9F3C}\x{9F3D}' - . '\x{9F3E}\x{9F3F}\x{9F40}\x{9F41}\x{9F42}\x{9F43}\x{9F44}\x{9F46}\x{9F47}' - . '\x{9F48}\x{9F49}\x{9F4A}\x{9F4B}\x{9F4C}\x{9F4D}\x{9F4E}\x{9F4F}\x{9F50}' - . '\x{9F51}\x{9F52}\x{9F54}\x{9F55}\x{9F56}\x{9F57}\x{9F58}\x{9F59}\x{9F5A}' - . '\x{9F5B}\x{9F5C}\x{9F5D}\x{9F5E}\x{9F5F}\x{9F60}\x{9F61}\x{9F63}\x{9F64}' - . '\x{9F65}\x{9F66}\x{9F67}\x{9F68}\x{9F69}\x{9F6A}\x{9F6B}\x{9F6C}\x{9F6E}' - . '\x{9F6F}\x{9F70}\x{9F71}\x{9F72}\x{9F73}\x{9F74}\x{9F75}\x{9F76}\x{9F77}' - . '\x{9F78}\x{9F79}\x{9F7A}\x{9F7B}\x{9F7C}\x{9F7D}\x{9F7E}\x{9F7F}\x{9F80}' - . '\x{9F81}\x{9F82}\x{9F83}\x{9F84}\x{9F85}\x{9F86}\x{9F87}\x{9F88}\x{9F89}' - . '\x{9F8A}\x{9F8B}\x{9F8C}\x{9F8D}\x{9F8E}\x{9F8F}\x{9F90}\x{9F91}\x{9F92}' - . '\x{9F93}\x{9F94}\x{9F95}\x{9F96}\x{9F97}\x{9F98}\x{9F99}\x{9F9A}\x{9F9B}' - . '\x{9F9C}\x{9F9D}\x{9F9E}\x{9F9F}\x{9FA0}\x{9FA2}\x{9FA4}\x{9FA5}]{1,20}$/iu', -]; diff --git a/lib/laminas/laminas-validator/src/Hostname/Com.php b/lib/laminas/laminas-validator/src/Hostname/Com.php deleted file mode 100644 index 5db58df61..000000000 --- a/lib/laminas/laminas-validator/src/Hostname/Com.php +++ /dev/null @@ -1,176 +0,0 @@ - '/^[\x{002d}0-9\x{0400}-\x{052f}]{1,63}$/iu', - 2 => '/^[\x{002d}0-9\x{0370}-\x{03ff}]{1,63}$/iu', - 3 => '/^[\x{002d}0-9a-z\x{ac00}-\x{d7a3}]{1,17}$/iu', - // @codingStandardsIgnoreStart - 4 => '/^[\x{002d}0-9a-z·à-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĸĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž]{1,63}$/iu', - // @codingStandardsIgnoreEnd - 5 => '/^[\x{002d}0-9A-Za-z\x{3400}-\x{3401}\x{3404}-\x{3406}\x{340C}\x{3416}\x{341C}' -. '\x{3421}\x{3424}\x{3428}-\x{3429}\x{342B}-\x{342E}\x{3430}-\x{3434}\x{3436}' -. '\x{3438}-\x{343C}\x{343E}\x{3441}-\x{3445}\x{3447}\x{3449}-\x{3451}\x{3453}' -. '\x{3457}-\x{345F}\x{3463}-\x{3467}\x{346E}-\x{3471}\x{3473}-\x{3477}\x{3479}-\x{348E}\x{3491}-\x{3497}' -. '\x{3499}-\x{34A1}\x{34A4}-\x{34AD}\x{34AF}-\x{34B0}\x{34B2}-\x{34BF}\x{34C2}-\x{34C5}\x{34C7}-\x{34CC}' -. '\x{34CE}-\x{34D1}\x{34D3}-\x{34D8}\x{34DA}-\x{34E4}\x{34E7}-\x{34E9}\x{34EC}-\x{34EF}\x{34F1}-\x{34FE}' -. '\x{3500}-\x{3507}\x{350A}-\x{3513}\x{3515}\x{3517}-\x{351A}\x{351C}-\x{351E}\x{3520}-\x{352A}' -. '\x{352C}-\x{3552}\x{3554}-\x{355C}\x{355E}-\x{3567}\x{3569}-\x{3573}\x{3575}-\x{357C}\x{3580}-\x{3588}' -. '\x{358F}-\x{3598}\x{359E}-\x{35AB}\x{35B4}-\x{35CD}\x{35D0}\x{35D3}-\x{35DC}\x{35E2}-\x{35ED}' -. '\x{35F0}-\x{35F6}\x{35FB}-\x{3602}\x{3605}-\x{360E}\x{3610}-\x{3611}\x{3613}-\x{3616}\x{3619}-\x{362D}' -. '\x{362F}-\x{3634}\x{3636}-\x{363B}\x{363F}-\x{3645}\x{3647}-\x{364B}\x{364D}-\x{3653}\x{3655}' -. '\x{3659}-\x{365E}\x{3660}-\x{3665}\x{3667}-\x{367C}\x{367E}\x{3680}-\x{3685}\x{3687}' -. '\x{3689}-\x{3690}\x{3692}-\x{3698}\x{369A}\x{369C}-\x{36AE}\x{36B0}-\x{36BF}\x{36C1}-\x{36C5}' -. '\x{36C9}-\x{36CA}\x{36CD}-\x{36DE}\x{36E1}-\x{36E2}\x{36E5}-\x{36FE}\x{3701}-\x{3713}\x{3715}-\x{371E}' -. '\x{3720}-\x{372C}\x{372E}-\x{3745}\x{3747}-\x{3748}\x{374A}\x{374C}-\x{3759}\x{375B}-\x{3760}' -. '\x{3762}-\x{3767}\x{3769}-\x{3772}\x{3774}-\x{378C}\x{378F}-\x{379C}\x{379F}\x{37A1}-\x{37AD}' -. '\x{37AF}-\x{37B7}\x{37B9}-\x{37C1}\x{37C3}-\x{37C5}\x{37C7}-\x{37D4}\x{37D6}-\x{37E0}\x{37E2}' -. '\x{37E5}-\x{37ED}\x{37EF}-\x{37F6}\x{37F8}-\x{3802}\x{3804}-\x{381D}\x{3820}-\x{3822}\x{3825}-\x{382A}' -. '\x{382D}-\x{382F}\x{3831}-\x{3832}\x{3834}-\x{384C}\x{384E}-\x{3860}\x{3862}-\x{3863}\x{3865}-\x{386B}' -. '\x{386D}-\x{3886}\x{3888}-\x{38A1}\x{38A3}\x{38A5}-\x{38AA}\x{38AC}\x{38AE}-\x{38B0}' -. '\x{38B2}-\x{38B6}\x{38B8}\x{38BA}-\x{38BE}\x{38C0}-\x{38C9}\x{38CB}-\x{38D4}\x{38D8}-\x{38E0}' -. '\x{38E2}-\x{38E6}\x{38EB}-\x{38ED}\x{38EF}-\x{38F2}\x{38F5}-\x{38F7}\x{38FA}-\x{38FF}\x{3901}-\x{392A}' -. '\x{392C}\x{392E}-\x{393B}\x{393E}-\x{3956}\x{395A}-\x{3969}\x{396B}-\x{397A}\x{397C}-\x{3987}' -. '\x{3989}-\x{3998}\x{399A}-\x{39B0}\x{39B2}\x{39B4}-\x{39D0}\x{39D2}-\x{39DA}\x{39DE}-\x{39DF}' -. '\x{39E1}-\x{39EF}\x{39F1}-\x{3A17}\x{3A19}-\x{3A2A}\x{3A2D}-\x{3A40}\x{3A43}-\x{3A4E}\x{3A50}' -. '\x{3A52}-\x{3A5E}\x{3A60}-\x{3A6D}\x{3A6F}-\x{3A77}\x{3A79}-\x{3A82}\x{3A84}-\x{3A85}\x{3A87}-\x{3A89}' -. '\x{3A8B}-\x{3A8F}\x{3A91}-\x{3A93}\x{3A95}-\x{3A96}\x{3A9A}\x{3A9C}-\x{3AA6}\x{3AA8}-\x{3AA9}' -. '\x{3AAB}-\x{3AB1}\x{3AB4}-\x{3ABC}\x{3ABE}-\x{3AC5}\x{3ACA}-\x{3ACB}\x{3ACD}-\x{3AD5}\x{3AD7}-\x{3AE1}' -. '\x{3AE4}-\x{3AE7}\x{3AE9}-\x{3AEC}\x{3AEE}-\x{3AFD}\x{3B01}-\x{3B10}\x{3B12}-\x{3B15}\x{3B17}-\x{3B1E}' -. '\x{3B20}-\x{3B23}\x{3B25}-\x{3B27}\x{3B29}-\x{3B36}\x{3B38}-\x{3B39}\x{3B3B}-\x{3B3C}\x{3B3F}' -. '\x{3B41}-\x{3B44}\x{3B47}-\x{3B4C}\x{3B4E}\x{3B51}-\x{3B55}\x{3B58}-\x{3B62}\x{3B68}-\x{3B72}' -. '\x{3B78}-\x{3B88}\x{3B8B}-\x{3B9F}\x{3BA1}\x{3BA3}-\x{3BBA}\x{3BBC}\x{3BBF}-\x{3BD0}' -. '\x{3BD3}-\x{3BE6}\x{3BEA}-\x{3BFB}\x{3BFE}-\x{3C12}\x{3C14}-\x{3C1B}\x{3C1D}-\x{3C37}\x{3C39}-\x{3C4F}' -. '\x{3C52}\x{3C54}-\x{3C5C}\x{3C5E}-\x{3C68}\x{3C6A}-\x{3C76}\x{3C78}-\x{3C8F}\x{3C91}-\x{3CA8}' -. '\x{3CAA}-\x{3CAD}\x{3CAF}-\x{3CBE}\x{3CC0}-\x{3CC8}\x{3CCA}-\x{3CD3}\x{3CD6}-\x{3CE0}\x{3CE4}-\x{3CEE}' -. '\x{3CF3}-\x{3D0A}\x{3D0E}-\x{3D1E}\x{3D20}-\x{3D21}\x{3D25}-\x{3D38}\x{3D3B}-\x{3D46}\x{3D4A}-\x{3D59}' -. '\x{3D5D}-\x{3D7B}\x{3D7D}-\x{3D81}\x{3D84}-\x{3D88}\x{3D8C}-\x{3D8F}\x{3D91}-\x{3D98}\x{3D9A}-\x{3D9C}' -. '\x{3D9E}-\x{3DA1}\x{3DA3}-\x{3DB0}\x{3DB2}-\x{3DB5}\x{3DB9}-\x{3DBC}\x{3DBE}-\x{3DCB}\x{3DCD}-\x{3DDB}' -. '\x{3DDF}-\x{3DE8}\x{3DEB}-\x{3DF0}\x{3DF3}-\x{3DF9}\x{3DFB}-\x{3DFC}\x{3DFE}-\x{3E05}\x{3E08}-\x{3E33}' -. '\x{3E35}-\x{3E3E}\x{3E40}-\x{3E47}\x{3E49}-\x{3E67}\x{3E6B}-\x{3E6F}\x{3E71}-\x{3E85}\x{3E87}-\x{3E8C}' -. '\x{3E8E}-\x{3E98}\x{3E9A}-\x{3EA1}\x{3EA3}-\x{3EAE}\x{3EB0}-\x{3EB5}\x{3EB7}-\x{3EBA}\x{3EBD}' -. '\x{3EBF}-\x{3EC4}\x{3EC7}-\x{3ECE}\x{3ED1}-\x{3ED7}\x{3ED9}-\x{3EDA}\x{3EDD}-\x{3EE3}\x{3EE7}-\x{3EE8}' -. '\x{3EEB}-\x{3EF2}\x{3EF5}-\x{3EFF}\x{3F01}-\x{3F02}\x{3F04}-\x{3F07}\x{3F09}-\x{3F44}\x{3F46}-\x{3F4E}' -. '\x{3F50}-\x{3F53}\x{3F55}-\x{3F72}\x{3F74}-\x{3F75}\x{3F77}-\x{3F7B}\x{3F7D}-\x{3FB0}\x{3FB6}-\x{3FBF}' -. '\x{3FC1}-\x{3FCF}\x{3FD1}-\x{3FD3}\x{3FD5}-\x{3FDF}\x{3FE1}-\x{400B}\x{400D}-\x{401C}\x{401E}-\x{4024}' -. '\x{4027}-\x{403F}\x{4041}-\x{4060}\x{4062}-\x{4069}\x{406B}-\x{408A}\x{408C}-\x{40A7}\x{40A9}-\x{40B4}' -. '\x{40B6}-\x{40C2}\x{40C7}-\x{40CF}\x{40D1}-\x{40DE}\x{40E0}-\x{40E7}\x{40E9}-\x{40EE}\x{40F0}-\x{40FB}' -. '\x{40FD}-\x{4109}\x{410B}-\x{4115}\x{4118}-\x{411D}\x{411F}-\x{4122}\x{4124}-\x{4133}\x{4136}-\x{4138}' -. '\x{413A}-\x{4148}\x{414A}-\x{4169}\x{416C}-\x{4185}\x{4188}-\x{418B}\x{418D}-\x{41AD}\x{41AF}-\x{41B3}' -. '\x{41B5}-\x{41C3}\x{41C5}-\x{41C9}\x{41CB}-\x{41F2}\x{41F5}-\x{41FE}\x{4200}-\x{4227}\x{422A}-\x{4246}' -. '\x{4248}-\x{4263}\x{4265}-\x{428B}\x{428D}-\x{42A1}\x{42A3}-\x{42C4}\x{42C8}-\x{42DC}\x{42DE}-\x{430A}' -. '\x{430C}-\x{4335}\x{4337}\x{4342}-\x{435F}\x{4361}-\x{439A}\x{439C}-\x{439D}\x{439F}-\x{43A4}' -. '\x{43A6}-\x{43EC}\x{43EF}-\x{4405}\x{4407}-\x{4429}\x{442B}-\x{4455}\x{4457}-\x{4468}\x{446A}-\x{446D}' -. '\x{446F}-\x{4476}\x{4479}-\x{447D}\x{447F}-\x{4486}\x{4488}-\x{4490}\x{4492}-\x{4498}\x{449A}-\x{44AD}' -. '\x{44B0}-\x{44BD}\x{44C1}-\x{44D3}\x{44D6}-\x{44E7}\x{44EA}\x{44EC}-\x{44FA}\x{44FC}-\x{4541}' -. '\x{4543}-\x{454F}\x{4551}-\x{4562}\x{4564}-\x{4575}\x{4577}-\x{45AB}\x{45AD}-\x{45BD}\x{45BF}-\x{45D5}' -. '\x{45D7}-\x{45EC}\x{45EE}-\x{45F2}\x{45F4}-\x{45FA}\x{45FC}-\x{461A}\x{461C}-\x{461D}\x{461F}-\x{4631}' -. '\x{4633}-\x{4649}\x{464C}\x{464E}-\x{4652}\x{4654}-\x{466A}\x{466C}-\x{4675}\x{4677}-\x{467A}' -. '\x{467C}-\x{4694}\x{4696}-\x{46A3}\x{46A5}-\x{46AB}\x{46AD}-\x{46D2}\x{46D4}-\x{4723}\x{4729}-\x{4732}' -. '\x{4734}-\x{4758}\x{475A}\x{475C}-\x{478B}\x{478D}\x{4791}-\x{47B1}\x{47B3}-\x{47F1}' -. '\x{47F3}-\x{480B}\x{480D}-\x{4815}\x{4817}-\x{4839}\x{483B}-\x{4870}\x{4872}-\x{487A}\x{487C}-\x{487F}' -. '\x{4883}-\x{488E}\x{4890}-\x{4896}\x{4899}-\x{48A2}\x{48A4}-\x{48B9}\x{48BB}-\x{48C8}\x{48CA}-\x{48D1}' -. '\x{48D3}-\x{48E5}\x{48E7}-\x{48F2}\x{48F4}-\x{48FF}\x{4901}-\x{4922}\x{4924}-\x{4928}\x{492A}-\x{4931}' -. '\x{4933}-\x{495B}\x{495D}-\x{4978}\x{497A}\x{497D}\x{4982}-\x{4983}\x{4985}-\x{49A8}' -. '\x{49AA}-\x{49AF}\x{49B1}-\x{49B7}\x{49B9}-\x{49BD}\x{49C1}-\x{49C7}\x{49C9}-\x{49CE}\x{49D0}-\x{49E8}' -. '\x{49EA}\x{49EC}\x{49EE}-\x{4A19}\x{4A1B}-\x{4A43}\x{4A45}-\x{4A4D}\x{4A4F}-\x{4A9E}' -. '\x{4AA0}-\x{4AA9}\x{4AAB}-\x{4B4E}\x{4B50}-\x{4B5B}\x{4B5D}-\x{4B69}\x{4B6B}-\x{4BC2}\x{4BC6}-\x{4BE8}' -. '\x{4BEA}-\x{4BFA}\x{4BFC}-\x{4C06}\x{4C08}-\x{4C2D}\x{4C2F}-\x{4C32}\x{4C34}-\x{4C35}\x{4C37}-\x{4C69}' -. '\x{4C6B}-\x{4C73}\x{4C75}-\x{4C86}\x{4C88}-\x{4C97}\x{4C99}-\x{4C9C}\x{4C9F}-\x{4CA3}\x{4CA5}-\x{4CB5}' -. '\x{4CB7}-\x{4CF8}\x{4CFA}-\x{4D27}\x{4D29}-\x{4DAC}\x{4DAE}-\x{4DB1}\x{4DB3}-\x{4DB5}\x{4E00}-\x{4E54}' -. '\x{4E56}-\x{4E89}\x{4E8B}-\x{4EEC}\x{4EEE}-\x{4FAC}\x{4FAE}-\x{503C}\x{503E}-\x{51E5}\x{51E7}-\x{5270}' -. '\x{5272}-\x{56A1}\x{56A3}-\x{5840}\x{5842}-\x{58B5}\x{58B7}-\x{58CB}\x{58CD}-\x{5BC8}\x{5BCA}-\x{5C01}' -. '\x{5C03}-\x{5C25}\x{5C27}-\x{5D5B}\x{5D5D}-\x{5F08}\x{5F0A}-\x{61F3}\x{61F5}-\x{63BA}\x{63BC}-\x{6441}' -. '\x{6443}-\x{657C}\x{657E}-\x{663E}\x{6640}-\x{66FC}\x{66FE}-\x{6728}\x{672A}-\x{6766}\x{6768}-\x{67A8}' -. '\x{67AA}-\x{685B}\x{685D}-\x{685E}\x{6860}-\x{68B9}\x{68BB}-\x{6AC8}\x{6ACA}-\x{6BB0}\x{6BB2}-\x{6C16}' -. '\x{6C18}-\x{6D9B}\x{6D9D}-\x{6E12}\x{6E14}-\x{6E8B}\x{6E8D}-\x{704D}\x{704F}-\x{7113}\x{7115}-\x{713B}' -. '\x{713D}-\x{7154}\x{7156}-\x{729F}\x{72A1}-\x{731E}\x{7320}-\x{7362}\x{7364}-\x{7533}\x{7535}-\x{7551}' -. '\x{7553}-\x{7572}\x{7574}-\x{75E8}\x{75EA}-\x{7679}\x{767B}-\x{783E}\x{7840}-\x{7A62}\x{7A64}-\x{7AC2}' -. '\x{7AC4}-\x{7B06}\x{7B08}-\x{7B79}\x{7B7B}-\x{7BCE}\x{7BD0}-\x{7D99}\x{7D9B}-\x{7E49}\x{7E4C}-\x{8132}' -. '\x{8134}\x{8136}-\x{81D2}\x{81D4}-\x{8216}\x{8218}-\x{822D}\x{822F}-\x{83B4}\x{83B6}-\x{841F}' -. '\x{8421}-\x{86CC}\x{86CE}-\x{874A}\x{874C}-\x{877E}\x{8780}-\x{8A32}\x{8A34}-\x{8B71}\x{8B73}-\x{8B8E}' -. '\x{8B90}-\x{8DE4}\x{8DE6}-\x{8E9A}\x{8E9C}-\x{8EE1}\x{8EE4}-\x{8F0B}\x{8F0D}-\x{8FB9}\x{8FBB}-\x{9038}' -. '\x{903A}-\x{9196}\x{9198}-\x{91A3}\x{91A5}-\x{91B7}\x{91B9}-\x{91C7}\x{91C9}-\x{91E0}\x{91E2}-\x{91FB}' -. '\x{91FD}-\x{922B}\x{922D}-\x{9270}\x{9272}-\x{9420}\x{9422}-\x{9664}\x{9666}-\x{9679}\x{967B}-\x{9770}' -. '\x{9772}-\x{982B}\x{982D}-\x{98ED}\x{98EF}-\x{99C4}\x{99C6}-\x{9A11}\x{9A14}-\x{9A27}\x{9A29}-\x{9D0D}' -. '\x{9D0F}-\x{9D2B}\x{9D2D}-\x{9D8E}\x{9D90}-\x{9DC5}\x{9DC7}-\x{9E77}\x{9E79}-\x{9EB8}\x{9EBB}-\x{9F20}' -. '\x{9F22}-\x{9F61}\x{9F63}-\x{9FA5}\x{FA28}]{1,20}$/iu', - 6 => '/^[\x{002d}0-9A-Za-z]{1,63}$/iu', - 7 => '/^[\x{00A1}-\x{00FF}]{1,63}$/iu', - 8 => '/^[\x{0100}-\x{017f}]{1,63}$/iu', - 9 => '/^[\x{0180}-\x{024f}]{1,63}$/iu', - 10 => '/^[\x{0250}-\x{02af}]{1,63}$/iu', - 11 => '/^[\x{02b0}-\x{02ff}]{1,63}$/iu', - 12 => '/^[\x{0300}-\x{036f}]{1,63}$/iu', - 13 => '/^[\x{0370}-\x{03ff}]{1,63}$/iu', - 14 => '/^[\x{0400}-\x{04ff}]{1,63}$/iu', - 15 => '/^[\x{0500}-\x{052f}]{1,63}$/iu', - 16 => '/^[\x{0530}-\x{058F}]{1,63}$/iu', - 17 => '/^[\x{0590}-\x{05FF}]{1,63}$/iu', - 18 => '/^[\x{0600}-\x{06FF}]{1,63}$/iu', - 19 => '/^[\x{0700}-\x{074F}]{1,63}$/iu', - 20 => '/^[\x{0780}-\x{07BF}]{1,63}$/iu', - 21 => '/^[\x{0900}-\x{097F}]{1,63}$/iu', - 22 => '/^[\x{0980}-\x{09FF}]{1,63}$/iu', - 23 => '/^[\x{0A00}-\x{0A7F}]{1,63}$/iu', - 24 => '/^[\x{0A80}-\x{0AFF}]{1,63}$/iu', - 25 => '/^[\x{0B00}-\x{0B7F}]{1,63}$/iu', - 26 => '/^[\x{0B80}-\x{0BFF}]{1,63}$/iu', - 27 => '/^[\x{0C00}-\x{0C7F}]{1,63}$/iu', - 28 => '/^[\x{0C80}-\x{0CFF}]{1,63}$/iu', - 29 => '/^[\x{0D00}-\x{0D7F}]{1,63}$/iu', - 30 => '/^[\x{0D80}-\x{0DFF}]{1,63}$/iu', - 31 => '/^[\x{0E00}-\x{0E7F}]{1,63}$/iu', - 32 => '/^[\x{0E80}-\x{0EFF}]{1,63}$/iu', - 33 => '/^[\x{0F00}-\x{0FFF}]{1,63}$/iu', - 34 => '/^[\x{1000}-\x{109F}]{1,63}$/iu', - 35 => '/^[\x{10A0}-\x{10FF}]{1,63}$/iu', - 36 => '/^[\x{1100}-\x{11FF}]{1,63}$/iu', - 37 => '/^[\x{1200}-\x{137F}]{1,63}$/iu', - 38 => '/^[\x{13A0}-\x{13FF}]{1,63}$/iu', - 39 => '/^[\x{1400}-\x{167F}]{1,63}$/iu', - 40 => '/^[\x{1680}-\x{169F}]{1,63}$/iu', - 41 => '/^[\x{16A0}-\x{16FF}]{1,63}$/iu', - 42 => '/^[\x{1700}-\x{171F}]{1,63}$/iu', - 43 => '/^[\x{1720}-\x{173F}]{1,63}$/iu', - 44 => '/^[\x{1740}-\x{175F}]{1,63}$/iu', - 45 => '/^[\x{1760}-\x{177F}]{1,63}$/iu', - 46 => '/^[\x{1780}-\x{17FF}]{1,63}$/iu', - 47 => '/^[\x{1800}-\x{18AF}]{1,63}$/iu', - 48 => '/^[\x{1E00}-\x{1EFF}]{1,63}$/iu', - 49 => '/^[\x{1F00}-\x{1FFF}]{1,63}$/iu', - 50 => '/^[\x{2070}-\x{209F}]{1,63}$/iu', - 51 => '/^[\x{2100}-\x{214F}]{1,63}$/iu', - 52 => '/^[\x{2150}-\x{218F}]{1,63}$/iu', - 53 => '/^[\x{2460}-\x{24FF}]{1,63}$/iu', - 54 => '/^[\x{2E80}-\x{2EFF}]{1,63}$/iu', - 55 => '/^[\x{2F00}-\x{2FDF}]{1,63}$/iu', - 56 => '/^[\x{2FF0}-\x{2FFF}]{1,63}$/iu', - 57 => '/^[\x{3040}-\x{309F}]{1,63}$/iu', - 58 => '/^[\x{30A0}-\x{30FF}]{1,63}$/iu', - 59 => '/^[\x{3100}-\x{312F}]{1,63}$/iu', - 60 => '/^[\x{3130}-\x{318F}]{1,63}$/iu', - 61 => '/^[\x{3190}-\x{319F}]{1,63}$/iu', - 62 => '/^[\x{31A0}-\x{31BF}]{1,63}$/iu', - 63 => '/^[\x{31F0}-\x{31FF}]{1,63}$/iu', - 64 => '/^[\x{3200}-\x{32FF}]{1,63}$/iu', - 65 => '/^[\x{3300}-\x{33FF}]{1,63}$/iu', - 66 => '/^[\x{3400}-\x{4DBF}]{1,63}$/iu', - 67 => '/^[\x{4E00}-\x{9FFF}]{1,63}$/iu', - 68 => '/^[\x{A000}-\x{A48F}]{1,63}$/iu', - 69 => '/^[\x{A490}-\x{A4CF}]{1,63}$/iu', - 70 => '/^[\x{AC00}-\x{D7AF}]{1,63}$/iu', - 73 => '/^[\x{F900}-\x{FAFF}]{1,63}$/iu', - 74 => '/^[\x{FB00}-\x{FB4F}]{1,63}$/iu', - 75 => '/^[\x{FB50}-\x{FDFF}]{1,63}$/iu', - 76 => '/^[\x{FE20}-\x{FE2F}]{1,63}$/iu', - 77 => '/^[\x{FE70}-\x{FEFF}]{1,63}$/iu', - 78 => '/^[\x{FF00}-\x{FFEF}]{1,63}$/iu', - 79 => '/^[\x{20000}-\x{2A6DF}]{1,63}$/iu', - 80 => '/^[\x{2F800}-\x{2FA1F}]{1,63}$/iu', -]; diff --git a/lib/laminas/laminas-validator/src/Hostname/Jp.php b/lib/laminas/laminas-validator/src/Hostname/Jp.php deleted file mode 100644 index 8520f6a1d..000000000 --- a/lib/laminas/laminas-validator/src/Hostname/Jp.php +++ /dev/null @@ -1,719 +0,0 @@ - '/^[\x{002d}0-9a-z\x{3005}-\x{3007}\x{3041}-\x{3093}\x{309D}\x{309E}' - . '\x{30A1}-\x{30F6}\x{30FC}' - . '\x{30FD}\x{30FE}\x{4E00}\x{4E01}\x{4E03}\x{4E07}\x{4E08}\x{4E09}\x{4E0A}' - . '\x{4E0B}\x{4E0D}\x{4E0E}\x{4E10}\x{4E11}\x{4E14}\x{4E15}\x{4E16}\x{4E17}' - . '\x{4E18}\x{4E19}\x{4E1E}\x{4E21}\x{4E26}\x{4E2A}\x{4E2D}\x{4E31}\x{4E32}' - . '\x{4E36}\x{4E38}\x{4E39}\x{4E3B}\x{4E3C}\x{4E3F}\x{4E42}\x{4E43}\x{4E45}' - . '\x{4E4B}\x{4E4D}\x{4E4E}\x{4E4F}\x{4E55}\x{4E56}\x{4E57}\x{4E58}\x{4E59}' - . '\x{4E5D}\x{4E5E}\x{4E5F}\x{4E62}\x{4E71}\x{4E73}\x{4E7E}\x{4E80}\x{4E82}' - . '\x{4E85}\x{4E86}\x{4E88}\x{4E89}\x{4E8A}\x{4E8B}\x{4E8C}\x{4E8E}\x{4E91}' - . '\x{4E92}\x{4E94}\x{4E95}\x{4E98}\x{4E99}\x{4E9B}\x{4E9C}\x{4E9E}\x{4E9F}' - . '\x{4EA0}\x{4EA1}\x{4EA2}\x{4EA4}\x{4EA5}\x{4EA6}\x{4EA8}\x{4EAB}\x{4EAC}' - . '\x{4EAD}\x{4EAE}\x{4EB0}\x{4EB3}\x{4EB6}\x{4EBA}\x{4EC0}\x{4EC1}\x{4EC2}' - . '\x{4EC4}\x{4EC6}\x{4EC7}\x{4ECA}\x{4ECB}\x{4ECD}\x{4ECE}\x{4ECF}\x{4ED4}' - . '\x{4ED5}\x{4ED6}\x{4ED7}\x{4ED8}\x{4ED9}\x{4EDD}\x{4EDE}\x{4EDF}\x{4EE3}' - . '\x{4EE4}\x{4EE5}\x{4EED}\x{4EEE}\x{4EF0}\x{4EF2}\x{4EF6}\x{4EF7}\x{4EFB}' - . '\x{4F01}\x{4F09}\x{4F0A}\x{4F0D}\x{4F0E}\x{4F0F}\x{4F10}\x{4F11}\x{4F1A}' - . '\x{4F1C}\x{4F1D}\x{4F2F}\x{4F30}\x{4F34}\x{4F36}\x{4F38}\x{4F3A}\x{4F3C}' - . '\x{4F3D}\x{4F43}\x{4F46}\x{4F47}\x{4F4D}\x{4F4E}\x{4F4F}\x{4F50}\x{4F51}' - . '\x{4F53}\x{4F55}\x{4F57}\x{4F59}\x{4F5A}\x{4F5B}\x{4F5C}\x{4F5D}\x{4F5E}' - . '\x{4F69}\x{4F6F}\x{4F70}\x{4F73}\x{4F75}\x{4F76}\x{4F7B}\x{4F7C}\x{4F7F}' - . '\x{4F83}\x{4F86}\x{4F88}\x{4F8B}\x{4F8D}\x{4F8F}\x{4F91}\x{4F96}\x{4F98}' - . '\x{4F9B}\x{4F9D}\x{4FA0}\x{4FA1}\x{4FAB}\x{4FAD}\x{4FAE}\x{4FAF}\x{4FB5}' - . '\x{4FB6}\x{4FBF}\x{4FC2}\x{4FC3}\x{4FC4}\x{4FCA}\x{4FCE}\x{4FD0}\x{4FD1}' - . '\x{4FD4}\x{4FD7}\x{4FD8}\x{4FDA}\x{4FDB}\x{4FDD}\x{4FDF}\x{4FE1}\x{4FE3}' - . '\x{4FE4}\x{4FE5}\x{4FEE}\x{4FEF}\x{4FF3}\x{4FF5}\x{4FF6}\x{4FF8}\x{4FFA}' - . '\x{4FFE}\x{5005}\x{5006}\x{5009}\x{500B}\x{500D}\x{500F}\x{5011}\x{5012}' - . '\x{5014}\x{5016}\x{5019}\x{501A}\x{501F}\x{5021}\x{5023}\x{5024}\x{5025}' - . '\x{5026}\x{5028}\x{5029}\x{502A}\x{502B}\x{502C}\x{502D}\x{5036}\x{5039}' - . '\x{5043}\x{5047}\x{5048}\x{5049}\x{504F}\x{5050}\x{5055}\x{5056}\x{505A}' - . '\x{505C}\x{5065}\x{506C}\x{5072}\x{5074}\x{5075}\x{5076}\x{5078}\x{507D}' - . '\x{5080}\x{5085}\x{508D}\x{5091}\x{5098}\x{5099}\x{509A}\x{50AC}\x{50AD}' - . '\x{50B2}\x{50B3}\x{50B4}\x{50B5}\x{50B7}\x{50BE}\x{50C2}\x{50C5}\x{50C9}' - . '\x{50CA}\x{50CD}\x{50CF}\x{50D1}\x{50D5}\x{50D6}\x{50DA}\x{50DE}\x{50E3}' - . '\x{50E5}\x{50E7}\x{50ED}\x{50EE}\x{50F5}\x{50F9}\x{50FB}\x{5100}\x{5101}' - . '\x{5102}\x{5104}\x{5109}\x{5112}\x{5114}\x{5115}\x{5116}\x{5118}\x{511A}' - . '\x{511F}\x{5121}\x{512A}\x{5132}\x{5137}\x{513A}\x{513B}\x{513C}\x{513F}' - . '\x{5140}\x{5141}\x{5143}\x{5144}\x{5145}\x{5146}\x{5147}\x{5148}\x{5149}' - . '\x{514B}\x{514C}\x{514D}\x{514E}\x{5150}\x{5152}\x{5154}\x{515A}\x{515C}' - . '\x{5162}\x{5165}\x{5168}\x{5169}\x{516A}\x{516B}\x{516C}\x{516D}\x{516E}' - . '\x{5171}\x{5175}\x{5176}\x{5177}\x{5178}\x{517C}\x{5180}\x{5182}\x{5185}' - . '\x{5186}\x{5189}\x{518A}\x{518C}\x{518D}\x{518F}\x{5190}\x{5191}\x{5192}' - . '\x{5193}\x{5195}\x{5196}\x{5197}\x{5199}\x{51A0}\x{51A2}\x{51A4}\x{51A5}' - . '\x{51A6}\x{51A8}\x{51A9}\x{51AA}\x{51AB}\x{51AC}\x{51B0}\x{51B1}\x{51B2}' - . '\x{51B3}\x{51B4}\x{51B5}\x{51B6}\x{51B7}\x{51BD}\x{51C4}\x{51C5}\x{51C6}' - . '\x{51C9}\x{51CB}\x{51CC}\x{51CD}\x{51D6}\x{51DB}\x{51DC}\x{51DD}\x{51E0}' - . '\x{51E1}\x{51E6}\x{51E7}\x{51E9}\x{51EA}\x{51ED}\x{51F0}\x{51F1}\x{51F5}' - . '\x{51F6}\x{51F8}\x{51F9}\x{51FA}\x{51FD}\x{51FE}\x{5200}\x{5203}\x{5204}' - . '\x{5206}\x{5207}\x{5208}\x{520A}\x{520B}\x{520E}\x{5211}\x{5214}\x{5217}' - . '\x{521D}\x{5224}\x{5225}\x{5227}\x{5229}\x{522A}\x{522E}\x{5230}\x{5233}' - . '\x{5236}\x{5237}\x{5238}\x{5239}\x{523A}\x{523B}\x{5243}\x{5244}\x{5247}' - . '\x{524A}\x{524B}\x{524C}\x{524D}\x{524F}\x{5254}\x{5256}\x{525B}\x{525E}' - . '\x{5263}\x{5264}\x{5265}\x{5269}\x{526A}\x{526F}\x{5270}\x{5271}\x{5272}' - . '\x{5273}\x{5274}\x{5275}\x{527D}\x{527F}\x{5283}\x{5287}\x{5288}\x{5289}' - . '\x{528D}\x{5291}\x{5292}\x{5294}\x{529B}\x{529F}\x{52A0}\x{52A3}\x{52A9}' - . '\x{52AA}\x{52AB}\x{52AC}\x{52AD}\x{52B1}\x{52B4}\x{52B5}\x{52B9}\x{52BC}' - . '\x{52BE}\x{52C1}\x{52C3}\x{52C5}\x{52C7}\x{52C9}\x{52CD}\x{52D2}\x{52D5}' - . '\x{52D7}\x{52D8}\x{52D9}\x{52DD}\x{52DE}\x{52DF}\x{52E0}\x{52E2}\x{52E3}' - . '\x{52E4}\x{52E6}\x{52E7}\x{52F2}\x{52F3}\x{52F5}\x{52F8}\x{52F9}\x{52FA}' - . '\x{52FE}\x{52FF}\x{5301}\x{5302}\x{5305}\x{5306}\x{5308}\x{530D}\x{530F}' - . '\x{5310}\x{5315}\x{5316}\x{5317}\x{5319}\x{531A}\x{531D}\x{5320}\x{5321}' - . '\x{5323}\x{532A}\x{532F}\x{5331}\x{5333}\x{5338}\x{5339}\x{533A}\x{533B}' - . '\x{533F}\x{5340}\x{5341}\x{5343}\x{5345}\x{5346}\x{5347}\x{5348}\x{5349}' - . '\x{534A}\x{534D}\x{5351}\x{5352}\x{5353}\x{5354}\x{5357}\x{5358}\x{535A}' - . '\x{535C}\x{535E}\x{5360}\x{5366}\x{5369}\x{536E}\x{536F}\x{5370}\x{5371}' - . '\x{5373}\x{5374}\x{5375}\x{5377}\x{5378}\x{537B}\x{537F}\x{5382}\x{5384}' - . '\x{5396}\x{5398}\x{539A}\x{539F}\x{53A0}\x{53A5}\x{53A6}\x{53A8}\x{53A9}' - . '\x{53AD}\x{53AE}\x{53B0}\x{53B3}\x{53B6}\x{53BB}\x{53C2}\x{53C3}\x{53C8}' - . '\x{53C9}\x{53CA}\x{53CB}\x{53CC}\x{53CD}\x{53CE}\x{53D4}\x{53D6}\x{53D7}' - . '\x{53D9}\x{53DB}\x{53DF}\x{53E1}\x{53E2}\x{53E3}\x{53E4}\x{53E5}\x{53E8}' - . '\x{53E9}\x{53EA}\x{53EB}\x{53EC}\x{53ED}\x{53EE}\x{53EF}\x{53F0}\x{53F1}' - . '\x{53F2}\x{53F3}\x{53F6}\x{53F7}\x{53F8}\x{53FA}\x{5401}\x{5403}\x{5404}' - . '\x{5408}\x{5409}\x{540A}\x{540B}\x{540C}\x{540D}\x{540E}\x{540F}\x{5410}' - . '\x{5411}\x{541B}\x{541D}\x{541F}\x{5420}\x{5426}\x{5429}\x{542B}\x{542C}' - . '\x{542D}\x{542E}\x{5436}\x{5438}\x{5439}\x{543B}\x{543C}\x{543D}\x{543E}' - . '\x{5440}\x{5442}\x{5446}\x{5448}\x{5449}\x{544A}\x{544E}\x{5451}\x{545F}' - . '\x{5468}\x{546A}\x{5470}\x{5471}\x{5473}\x{5475}\x{5476}\x{5477}\x{547B}' - . '\x{547C}\x{547D}\x{5480}\x{5484}\x{5486}\x{548B}\x{548C}\x{548E}\x{548F}' - . '\x{5490}\x{5492}\x{54A2}\x{54A4}\x{54A5}\x{54A8}\x{54AB}\x{54AC}\x{54AF}' - . '\x{54B2}\x{54B3}\x{54B8}\x{54BC}\x{54BD}\x{54BE}\x{54C0}\x{54C1}\x{54C2}' - . '\x{54C4}\x{54C7}\x{54C8}\x{54C9}\x{54D8}\x{54E1}\x{54E2}\x{54E5}\x{54E6}' - . '\x{54E8}\x{54E9}\x{54ED}\x{54EE}\x{54F2}\x{54FA}\x{54FD}\x{5504}\x{5506}' - . '\x{5507}\x{550F}\x{5510}\x{5514}\x{5516}\x{552E}\x{552F}\x{5531}\x{5533}' - . '\x{5538}\x{5539}\x{553E}\x{5540}\x{5544}\x{5545}\x{5546}\x{554C}\x{554F}' - . '\x{5553}\x{5556}\x{5557}\x{555C}\x{555D}\x{5563}\x{557B}\x{557C}\x{557E}' - . '\x{5580}\x{5583}\x{5584}\x{5587}\x{5589}\x{558A}\x{558B}\x{5598}\x{5599}' - . '\x{559A}\x{559C}\x{559D}\x{559E}\x{559F}\x{55A7}\x{55A8}\x{55A9}\x{55AA}' - . '\x{55AB}\x{55AC}\x{55AE}\x{55B0}\x{55B6}\x{55C4}\x{55C5}\x{55C7}\x{55D4}' - . '\x{55DA}\x{55DC}\x{55DF}\x{55E3}\x{55E4}\x{55F7}\x{55F9}\x{55FD}\x{55FE}' - . '\x{5606}\x{5609}\x{5614}\x{5616}\x{5617}\x{5618}\x{561B}\x{5629}\x{562F}' - . '\x{5631}\x{5632}\x{5634}\x{5636}\x{5638}\x{5642}\x{564C}\x{564E}\x{5650}' - . '\x{565B}\x{5664}\x{5668}\x{566A}\x{566B}\x{566C}\x{5674}\x{5678}\x{567A}' - . '\x{5680}\x{5686}\x{5687}\x{568A}\x{568F}\x{5694}\x{56A0}\x{56A2}\x{56A5}' - . '\x{56AE}\x{56B4}\x{56B6}\x{56BC}\x{56C0}\x{56C1}\x{56C2}\x{56C3}\x{56C8}' - . '\x{56CE}\x{56D1}\x{56D3}\x{56D7}\x{56D8}\x{56DA}\x{56DB}\x{56DE}\x{56E0}' - . '\x{56E3}\x{56EE}\x{56F0}\x{56F2}\x{56F3}\x{56F9}\x{56FA}\x{56FD}\x{56FF}' - . '\x{5700}\x{5703}\x{5704}\x{5708}\x{5709}\x{570B}\x{570D}\x{570F}\x{5712}' - . '\x{5713}\x{5716}\x{5718}\x{571C}\x{571F}\x{5726}\x{5727}\x{5728}\x{572D}' - . '\x{5730}\x{5737}\x{5738}\x{573B}\x{5740}\x{5742}\x{5747}\x{574A}\x{574E}' - . '\x{574F}\x{5750}\x{5751}\x{5761}\x{5764}\x{5766}\x{5769}\x{576A}\x{577F}' - . '\x{5782}\x{5788}\x{5789}\x{578B}\x{5793}\x{57A0}\x{57A2}\x{57A3}\x{57A4}' - . '\x{57AA}\x{57B0}\x{57B3}\x{57C0}\x{57C3}\x{57C6}\x{57CB}\x{57CE}\x{57D2}' - . '\x{57D3}\x{57D4}\x{57D6}\x{57DC}\x{57DF}\x{57E0}\x{57E3}\x{57F4}\x{57F7}' - . '\x{57F9}\x{57FA}\x{57FC}\x{5800}\x{5802}\x{5805}\x{5806}\x{580A}\x{580B}' - . '\x{5815}\x{5819}\x{581D}\x{5821}\x{5824}\x{582A}\x{582F}\x{5830}\x{5831}' - . '\x{5834}\x{5835}\x{583A}\x{583D}\x{5840}\x{5841}\x{584A}\x{584B}\x{5851}' - . '\x{5852}\x{5854}\x{5857}\x{5858}\x{5859}\x{585A}\x{585E}\x{5862}\x{5869}' - . '\x{586B}\x{5870}\x{5872}\x{5875}\x{5879}\x{587E}\x{5883}\x{5885}\x{5893}' - . '\x{5897}\x{589C}\x{589F}\x{58A8}\x{58AB}\x{58AE}\x{58B3}\x{58B8}\x{58B9}' - . '\x{58BA}\x{58BB}\x{58BE}\x{58C1}\x{58C5}\x{58C7}\x{58CA}\x{58CC}\x{58D1}' - . '\x{58D3}\x{58D5}\x{58D7}\x{58D8}\x{58D9}\x{58DC}\x{58DE}\x{58DF}\x{58E4}' - . '\x{58E5}\x{58EB}\x{58EC}\x{58EE}\x{58EF}\x{58F0}\x{58F1}\x{58F2}\x{58F7}' - . '\x{58F9}\x{58FA}\x{58FB}\x{58FC}\x{58FD}\x{5902}\x{5909}\x{590A}\x{590F}' - . '\x{5910}\x{5915}\x{5916}\x{5918}\x{5919}\x{591A}\x{591B}\x{591C}\x{5922}' - . '\x{5925}\x{5927}\x{5929}\x{592A}\x{592B}\x{592C}\x{592D}\x{592E}\x{5931}' - . '\x{5932}\x{5937}\x{5938}\x{593E}\x{5944}\x{5947}\x{5948}\x{5949}\x{594E}' - . '\x{594F}\x{5950}\x{5951}\x{5954}\x{5955}\x{5957}\x{5958}\x{595A}\x{5960}' - . '\x{5962}\x{5965}\x{5967}\x{5968}\x{5969}\x{596A}\x{596C}\x{596E}\x{5973}' - . '\x{5974}\x{5978}\x{597D}\x{5981}\x{5982}\x{5983}\x{5984}\x{598A}\x{598D}' - . '\x{5993}\x{5996}\x{5999}\x{599B}\x{599D}\x{59A3}\x{59A5}\x{59A8}\x{59AC}' - . '\x{59B2}\x{59B9}\x{59BB}\x{59BE}\x{59C6}\x{59C9}\x{59CB}\x{59D0}\x{59D1}' - . '\x{59D3}\x{59D4}\x{59D9}\x{59DA}\x{59DC}\x{59E5}\x{59E6}\x{59E8}\x{59EA}' - . '\x{59EB}\x{59F6}\x{59FB}\x{59FF}\x{5A01}\x{5A03}\x{5A09}\x{5A11}\x{5A18}' - . '\x{5A1A}\x{5A1C}\x{5A1F}\x{5A20}\x{5A25}\x{5A29}\x{5A2F}\x{5A35}\x{5A36}' - . '\x{5A3C}\x{5A40}\x{5A41}\x{5A46}\x{5A49}\x{5A5A}\x{5A62}\x{5A66}\x{5A6A}' - . '\x{5A6C}\x{5A7F}\x{5A92}\x{5A9A}\x{5A9B}\x{5ABC}\x{5ABD}\x{5ABE}\x{5AC1}' - . '\x{5AC2}\x{5AC9}\x{5ACB}\x{5ACC}\x{5AD0}\x{5AD6}\x{5AD7}\x{5AE1}\x{5AE3}' - . '\x{5AE6}\x{5AE9}\x{5AFA}\x{5AFB}\x{5B09}\x{5B0B}\x{5B0C}\x{5B16}\x{5B22}' - . '\x{5B2A}\x{5B2C}\x{5B30}\x{5B32}\x{5B36}\x{5B3E}\x{5B40}\x{5B43}\x{5B45}' - . '\x{5B50}\x{5B51}\x{5B54}\x{5B55}\x{5B57}\x{5B58}\x{5B5A}\x{5B5B}\x{5B5C}' - . '\x{5B5D}\x{5B5F}\x{5B63}\x{5B64}\x{5B65}\x{5B66}\x{5B69}\x{5B6B}\x{5B70}' - . '\x{5B71}\x{5B73}\x{5B75}\x{5B78}\x{5B7A}\x{5B80}\x{5B83}\x{5B85}\x{5B87}' - . '\x{5B88}\x{5B89}\x{5B8B}\x{5B8C}\x{5B8D}\x{5B8F}\x{5B95}\x{5B97}\x{5B98}' - . '\x{5B99}\x{5B9A}\x{5B9B}\x{5B9C}\x{5B9D}\x{5B9F}\x{5BA2}\x{5BA3}\x{5BA4}' - . '\x{5BA5}\x{5BA6}\x{5BAE}\x{5BB0}\x{5BB3}\x{5BB4}\x{5BB5}\x{5BB6}\x{5BB8}' - . '\x{5BB9}\x{5BBF}\x{5BC2}\x{5BC3}\x{5BC4}\x{5BC5}\x{5BC6}\x{5BC7}\x{5BC9}' - . '\x{5BCC}\x{5BD0}\x{5BD2}\x{5BD3}\x{5BD4}\x{5BDB}\x{5BDD}\x{5BDE}\x{5BDF}' - . '\x{5BE1}\x{5BE2}\x{5BE4}\x{5BE5}\x{5BE6}\x{5BE7}\x{5BE8}\x{5BE9}\x{5BEB}' - . '\x{5BEE}\x{5BF0}\x{5BF3}\x{5BF5}\x{5BF6}\x{5BF8}\x{5BFA}\x{5BFE}\x{5BFF}' - . '\x{5C01}\x{5C02}\x{5C04}\x{5C05}\x{5C06}\x{5C07}\x{5C08}\x{5C09}\x{5C0A}' - . '\x{5C0B}\x{5C0D}\x{5C0E}\x{5C0F}\x{5C11}\x{5C13}\x{5C16}\x{5C1A}\x{5C20}' - . '\x{5C22}\x{5C24}\x{5C28}\x{5C2D}\x{5C31}\x{5C38}\x{5C39}\x{5C3A}\x{5C3B}' - . '\x{5C3C}\x{5C3D}\x{5C3E}\x{5C3F}\x{5C40}\x{5C41}\x{5C45}\x{5C46}\x{5C48}' - . '\x{5C4A}\x{5C4B}\x{5C4D}\x{5C4E}\x{5C4F}\x{5C50}\x{5C51}\x{5C53}\x{5C55}' - . '\x{5C5E}\x{5C60}\x{5C61}\x{5C64}\x{5C65}\x{5C6C}\x{5C6E}\x{5C6F}\x{5C71}' - . '\x{5C76}\x{5C79}\x{5C8C}\x{5C90}\x{5C91}\x{5C94}\x{5CA1}\x{5CA8}\x{5CA9}' - . '\x{5CAB}\x{5CAC}\x{5CB1}\x{5CB3}\x{5CB6}\x{5CB7}\x{5CB8}\x{5CBB}\x{5CBC}' - . '\x{5CBE}\x{5CC5}\x{5CC7}\x{5CD9}\x{5CE0}\x{5CE1}\x{5CE8}\x{5CE9}\x{5CEA}' - . '\x{5CED}\x{5CEF}\x{5CF0}\x{5CF6}\x{5CFA}\x{5CFB}\x{5CFD}\x{5D07}\x{5D0B}' - . '\x{5D0E}\x{5D11}\x{5D14}\x{5D15}\x{5D16}\x{5D17}\x{5D18}\x{5D19}\x{5D1A}' - . '\x{5D1B}\x{5D1F}\x{5D22}\x{5D29}\x{5D4B}\x{5D4C}\x{5D4E}\x{5D50}\x{5D52}' - . '\x{5D5C}\x{5D69}\x{5D6C}\x{5D6F}\x{5D73}\x{5D76}\x{5D82}\x{5D84}\x{5D87}' - . '\x{5D8B}\x{5D8C}\x{5D90}\x{5D9D}\x{5DA2}\x{5DAC}\x{5DAE}\x{5DB7}\x{5DBA}' - . '\x{5DBC}\x{5DBD}\x{5DC9}\x{5DCC}\x{5DCD}\x{5DD2}\x{5DD3}\x{5DD6}\x{5DDB}' - . '\x{5DDD}\x{5DDE}\x{5DE1}\x{5DE3}\x{5DE5}\x{5DE6}\x{5DE7}\x{5DE8}\x{5DEB}' - . '\x{5DEE}\x{5DF1}\x{5DF2}\x{5DF3}\x{5DF4}\x{5DF5}\x{5DF7}\x{5DFB}\x{5DFD}' - . '\x{5DFE}\x{5E02}\x{5E03}\x{5E06}\x{5E0B}\x{5E0C}\x{5E11}\x{5E16}\x{5E19}' - . '\x{5E1A}\x{5E1B}\x{5E1D}\x{5E25}\x{5E2B}\x{5E2D}\x{5E2F}\x{5E30}\x{5E33}' - . '\x{5E36}\x{5E37}\x{5E38}\x{5E3D}\x{5E40}\x{5E43}\x{5E44}\x{5E45}\x{5E47}' - . '\x{5E4C}\x{5E4E}\x{5E54}\x{5E55}\x{5E57}\x{5E5F}\x{5E61}\x{5E62}\x{5E63}' - . '\x{5E64}\x{5E72}\x{5E73}\x{5E74}\x{5E75}\x{5E76}\x{5E78}\x{5E79}\x{5E7A}' - . '\x{5E7B}\x{5E7C}\x{5E7D}\x{5E7E}\x{5E7F}\x{5E81}\x{5E83}\x{5E84}\x{5E87}' - . '\x{5E8A}\x{5E8F}\x{5E95}\x{5E96}\x{5E97}\x{5E9A}\x{5E9C}\x{5EA0}\x{5EA6}' - . '\x{5EA7}\x{5EAB}\x{5EAD}\x{5EB5}\x{5EB6}\x{5EB7}\x{5EB8}\x{5EC1}\x{5EC2}' - . '\x{5EC3}\x{5EC8}\x{5EC9}\x{5ECA}\x{5ECF}\x{5ED0}\x{5ED3}\x{5ED6}\x{5EDA}' - . '\x{5EDB}\x{5EDD}\x{5EDF}\x{5EE0}\x{5EE1}\x{5EE2}\x{5EE3}\x{5EE8}\x{5EE9}' - . '\x{5EEC}\x{5EF0}\x{5EF1}\x{5EF3}\x{5EF4}\x{5EF6}\x{5EF7}\x{5EF8}\x{5EFA}' - . '\x{5EFB}\x{5EFC}\x{5EFE}\x{5EFF}\x{5F01}\x{5F03}\x{5F04}\x{5F09}\x{5F0A}' - . '\x{5F0B}\x{5F0C}\x{5F0D}\x{5F0F}\x{5F10}\x{5F11}\x{5F13}\x{5F14}\x{5F15}' - . '\x{5F16}\x{5F17}\x{5F18}\x{5F1B}\x{5F1F}\x{5F25}\x{5F26}\x{5F27}\x{5F29}' - . '\x{5F2D}\x{5F2F}\x{5F31}\x{5F35}\x{5F37}\x{5F38}\x{5F3C}\x{5F3E}\x{5F41}' - . '\x{5F48}\x{5F4A}\x{5F4C}\x{5F4E}\x{5F51}\x{5F53}\x{5F56}\x{5F57}\x{5F59}' - . '\x{5F5C}\x{5F5D}\x{5F61}\x{5F62}\x{5F66}\x{5F69}\x{5F6A}\x{5F6B}\x{5F6C}' - . '\x{5F6D}\x{5F70}\x{5F71}\x{5F73}\x{5F77}\x{5F79}\x{5F7C}\x{5F7F}\x{5F80}' - . '\x{5F81}\x{5F82}\x{5F83}\x{5F84}\x{5F85}\x{5F87}\x{5F88}\x{5F8A}\x{5F8B}' - . '\x{5F8C}\x{5F90}\x{5F91}\x{5F92}\x{5F93}\x{5F97}\x{5F98}\x{5F99}\x{5F9E}' - . '\x{5FA0}\x{5FA1}\x{5FA8}\x{5FA9}\x{5FAA}\x{5FAD}\x{5FAE}\x{5FB3}\x{5FB4}' - . '\x{5FB9}\x{5FBC}\x{5FBD}\x{5FC3}\x{5FC5}\x{5FCC}\x{5FCD}\x{5FD6}\x{5FD7}' - . '\x{5FD8}\x{5FD9}\x{5FDC}\x{5FDD}\x{5FE0}\x{5FE4}\x{5FEB}\x{5FF0}\x{5FF1}' - . '\x{5FF5}\x{5FF8}\x{5FFB}\x{5FFD}\x{5FFF}\x{600E}\x{600F}\x{6010}\x{6012}' - . '\x{6015}\x{6016}\x{6019}\x{601B}\x{601C}\x{601D}\x{6020}\x{6021}\x{6025}' - . '\x{6026}\x{6027}\x{6028}\x{6029}\x{602A}\x{602B}\x{602F}\x{6031}\x{603A}' - . '\x{6041}\x{6042}\x{6043}\x{6046}\x{604A}\x{604B}\x{604D}\x{6050}\x{6052}' - . '\x{6055}\x{6059}\x{605A}\x{605F}\x{6060}\x{6062}\x{6063}\x{6064}\x{6065}' - . '\x{6068}\x{6069}\x{606A}\x{606B}\x{606C}\x{606D}\x{606F}\x{6070}\x{6075}' - . '\x{6077}\x{6081}\x{6083}\x{6084}\x{6089}\x{608B}\x{608C}\x{608D}\x{6092}' - . '\x{6094}\x{6096}\x{6097}\x{609A}\x{609B}\x{609F}\x{60A0}\x{60A3}\x{60A6}' - . '\x{60A7}\x{60A9}\x{60AA}\x{60B2}\x{60B3}\x{60B4}\x{60B5}\x{60B6}\x{60B8}' - . '\x{60BC}\x{60BD}\x{60C5}\x{60C6}\x{60C7}\x{60D1}\x{60D3}\x{60D8}\x{60DA}' - . '\x{60DC}\x{60DF}\x{60E0}\x{60E1}\x{60E3}\x{60E7}\x{60E8}\x{60F0}\x{60F1}' - . '\x{60F3}\x{60F4}\x{60F6}\x{60F7}\x{60F9}\x{60FA}\x{60FB}\x{6100}\x{6101}' - . '\x{6103}\x{6106}\x{6108}\x{6109}\x{610D}\x{610E}\x{610F}\x{6115}\x{611A}' - . '\x{611B}\x{611F}\x{6121}\x{6127}\x{6128}\x{612C}\x{6134}\x{613C}\x{613D}' - . '\x{613E}\x{613F}\x{6142}\x{6144}\x{6147}\x{6148}\x{614A}\x{614B}\x{614C}' - . '\x{614D}\x{614E}\x{6153}\x{6155}\x{6158}\x{6159}\x{615A}\x{615D}\x{615F}' - . '\x{6162}\x{6163}\x{6165}\x{6167}\x{6168}\x{616B}\x{616E}\x{616F}\x{6170}' - . '\x{6171}\x{6173}\x{6174}\x{6175}\x{6176}\x{6177}\x{617E}\x{6182}\x{6187}' - . '\x{618A}\x{618E}\x{6190}\x{6191}\x{6194}\x{6196}\x{6199}\x{619A}\x{61A4}' - . '\x{61A7}\x{61A9}\x{61AB}\x{61AC}\x{61AE}\x{61B2}\x{61B6}\x{61BA}\x{61BE}' - . '\x{61C3}\x{61C6}\x{61C7}\x{61C8}\x{61C9}\x{61CA}\x{61CB}\x{61CC}\x{61CD}' - . '\x{61D0}\x{61E3}\x{61E6}\x{61F2}\x{61F4}\x{61F6}\x{61F7}\x{61F8}\x{61FA}' - . '\x{61FC}\x{61FD}\x{61FE}\x{61FF}\x{6200}\x{6208}\x{6209}\x{620A}\x{620C}' - . '\x{620D}\x{620E}\x{6210}\x{6211}\x{6212}\x{6214}\x{6216}\x{621A}\x{621B}' - . '\x{621D}\x{621E}\x{621F}\x{6221}\x{6226}\x{622A}\x{622E}\x{622F}\x{6230}' - . '\x{6232}\x{6233}\x{6234}\x{6238}\x{623B}\x{623F}\x{6240}\x{6241}\x{6247}' - . '\x{6248}\x{6249}\x{624B}\x{624D}\x{624E}\x{6253}\x{6255}\x{6258}\x{625B}' - . '\x{625E}\x{6260}\x{6263}\x{6268}\x{626E}\x{6271}\x{6276}\x{6279}\x{627C}' - . '\x{627E}\x{627F}\x{6280}\x{6282}\x{6283}\x{6284}\x{6289}\x{628A}\x{6291}' - . '\x{6292}\x{6293}\x{6294}\x{6295}\x{6296}\x{6297}\x{6298}\x{629B}\x{629C}' - . '\x{629E}\x{62AB}\x{62AC}\x{62B1}\x{62B5}\x{62B9}\x{62BB}\x{62BC}\x{62BD}' - . '\x{62C2}\x{62C5}\x{62C6}\x{62C7}\x{62C8}\x{62C9}\x{62CA}\x{62CC}\x{62CD}' - . '\x{62CF}\x{62D0}\x{62D1}\x{62D2}\x{62D3}\x{62D4}\x{62D7}\x{62D8}\x{62D9}' - . '\x{62DB}\x{62DC}\x{62DD}\x{62E0}\x{62E1}\x{62EC}\x{62ED}\x{62EE}\x{62EF}' - . '\x{62F1}\x{62F3}\x{62F5}\x{62F6}\x{62F7}\x{62FE}\x{62FF}\x{6301}\x{6302}' - . '\x{6307}\x{6308}\x{6309}\x{630C}\x{6311}\x{6319}\x{631F}\x{6327}\x{6328}' - . '\x{632B}\x{632F}\x{633A}\x{633D}\x{633E}\x{633F}\x{6349}\x{634C}\x{634D}' - . '\x{634F}\x{6350}\x{6355}\x{6357}\x{635C}\x{6367}\x{6368}\x{6369}\x{636B}' - . '\x{636E}\x{6372}\x{6376}\x{6377}\x{637A}\x{637B}\x{6380}\x{6383}\x{6388}' - . '\x{6389}\x{638C}\x{638E}\x{638F}\x{6392}\x{6396}\x{6398}\x{639B}\x{639F}' - . '\x{63A0}\x{63A1}\x{63A2}\x{63A3}\x{63A5}\x{63A7}\x{63A8}\x{63A9}\x{63AA}' - . '\x{63AB}\x{63AC}\x{63B2}\x{63B4}\x{63B5}\x{63BB}\x{63BE}\x{63C0}\x{63C3}' - . '\x{63C4}\x{63C6}\x{63C9}\x{63CF}\x{63D0}\x{63D2}\x{63D6}\x{63DA}\x{63DB}' - . '\x{63E1}\x{63E3}\x{63E9}\x{63EE}\x{63F4}\x{63F6}\x{63FA}\x{6406}\x{640D}' - . '\x{640F}\x{6413}\x{6416}\x{6417}\x{641C}\x{6426}\x{6428}\x{642C}\x{642D}' - . '\x{6434}\x{6436}\x{643A}\x{643E}\x{6442}\x{644E}\x{6458}\x{6467}\x{6469}' - . '\x{646F}\x{6476}\x{6478}\x{647A}\x{6483}\x{6488}\x{6492}\x{6493}\x{6495}' - . '\x{649A}\x{649E}\x{64A4}\x{64A5}\x{64A9}\x{64AB}\x{64AD}\x{64AE}\x{64B0}' - . '\x{64B2}\x{64B9}\x{64BB}\x{64BC}\x{64C1}\x{64C2}\x{64C5}\x{64C7}\x{64CD}' - . '\x{64D2}\x{64D4}\x{64D8}\x{64DA}\x{64E0}\x{64E1}\x{64E2}\x{64E3}\x{64E6}' - . '\x{64E7}\x{64EC}\x{64EF}\x{64F1}\x{64F2}\x{64F4}\x{64F6}\x{64FA}\x{64FD}' - . '\x{64FE}\x{6500}\x{6505}\x{6518}\x{651C}\x{651D}\x{6523}\x{6524}\x{652A}' - . '\x{652B}\x{652C}\x{652F}\x{6534}\x{6535}\x{6536}\x{6537}\x{6538}\x{6539}' - . '\x{653B}\x{653E}\x{653F}\x{6545}\x{6548}\x{654D}\x{654F}\x{6551}\x{6555}' - . '\x{6556}\x{6557}\x{6558}\x{6559}\x{655D}\x{655E}\x{6562}\x{6563}\x{6566}' - . '\x{656C}\x{6570}\x{6572}\x{6574}\x{6575}\x{6577}\x{6578}\x{6582}\x{6583}' - . '\x{6587}\x{6588}\x{6589}\x{658C}\x{658E}\x{6590}\x{6591}\x{6597}\x{6599}' - . '\x{659B}\x{659C}\x{659F}\x{65A1}\x{65A4}\x{65A5}\x{65A7}\x{65AB}\x{65AC}' - . '\x{65AD}\x{65AF}\x{65B0}\x{65B7}\x{65B9}\x{65BC}\x{65BD}\x{65C1}\x{65C3}' - . '\x{65C4}\x{65C5}\x{65C6}\x{65CB}\x{65CC}\x{65CF}\x{65D2}\x{65D7}\x{65D9}' - . '\x{65DB}\x{65E0}\x{65E1}\x{65E2}\x{65E5}\x{65E6}\x{65E7}\x{65E8}\x{65E9}' - . '\x{65EC}\x{65ED}\x{65F1}\x{65FA}\x{65FB}\x{6602}\x{6603}\x{6606}\x{6607}' - . '\x{660A}\x{660C}\x{660E}\x{660F}\x{6613}\x{6614}\x{661C}\x{661F}\x{6620}' - . '\x{6625}\x{6627}\x{6628}\x{662D}\x{662F}\x{6634}\x{6635}\x{6636}\x{663C}' - . '\x{663F}\x{6641}\x{6642}\x{6643}\x{6644}\x{6649}\x{664B}\x{664F}\x{6652}' - . '\x{665D}\x{665E}\x{665F}\x{6662}\x{6664}\x{6666}\x{6667}\x{6668}\x{6669}' - . '\x{666E}\x{666F}\x{6670}\x{6674}\x{6676}\x{667A}\x{6681}\x{6683}\x{6684}' - . '\x{6687}\x{6688}\x{6689}\x{668E}\x{6691}\x{6696}\x{6697}\x{6698}\x{669D}' - . '\x{66A2}\x{66A6}\x{66AB}\x{66AE}\x{66B4}\x{66B8}\x{66B9}\x{66BC}\x{66BE}' - . '\x{66C1}\x{66C4}\x{66C7}\x{66C9}\x{66D6}\x{66D9}\x{66DA}\x{66DC}\x{66DD}' - . '\x{66E0}\x{66E6}\x{66E9}\x{66F0}\x{66F2}\x{66F3}\x{66F4}\x{66F5}\x{66F7}' - . '\x{66F8}\x{66F9}\x{66FC}\x{66FD}\x{66FE}\x{66FF}\x{6700}\x{6703}\x{6708}' - . '\x{6709}\x{670B}\x{670D}\x{670F}\x{6714}\x{6715}\x{6716}\x{6717}\x{671B}' - . '\x{671D}\x{671E}\x{671F}\x{6726}\x{6727}\x{6728}\x{672A}\x{672B}\x{672C}' - . '\x{672D}\x{672E}\x{6731}\x{6734}\x{6736}\x{6737}\x{6738}\x{673A}\x{673D}' - . '\x{673F}\x{6741}\x{6746}\x{6749}\x{674E}\x{674F}\x{6750}\x{6751}\x{6753}' - . '\x{6756}\x{6759}\x{675C}\x{675E}\x{675F}\x{6760}\x{6761}\x{6762}\x{6763}' - . '\x{6764}\x{6765}\x{676A}\x{676D}\x{676F}\x{6770}\x{6771}\x{6772}\x{6773}' - . '\x{6775}\x{6777}\x{677C}\x{677E}\x{677F}\x{6785}\x{6787}\x{6789}\x{678B}' - . '\x{678C}\x{6790}\x{6795}\x{6797}\x{679A}\x{679C}\x{679D}\x{67A0}\x{67A1}' - . '\x{67A2}\x{67A6}\x{67A9}\x{67AF}\x{67B3}\x{67B4}\x{67B6}\x{67B7}\x{67B8}' - . '\x{67B9}\x{67C1}\x{67C4}\x{67C6}\x{67CA}\x{67CE}\x{67CF}\x{67D0}\x{67D1}' - . '\x{67D3}\x{67D4}\x{67D8}\x{67DA}\x{67DD}\x{67DE}\x{67E2}\x{67E4}\x{67E7}' - . '\x{67E9}\x{67EC}\x{67EE}\x{67EF}\x{67F1}\x{67F3}\x{67F4}\x{67F5}\x{67FB}' - . '\x{67FE}\x{67FF}\x{6802}\x{6803}\x{6804}\x{6813}\x{6816}\x{6817}\x{681E}' - . '\x{6821}\x{6822}\x{6829}\x{682A}\x{682B}\x{6832}\x{6834}\x{6838}\x{6839}' - . '\x{683C}\x{683D}\x{6840}\x{6841}\x{6842}\x{6843}\x{6846}\x{6848}\x{684D}' - . '\x{684E}\x{6850}\x{6851}\x{6853}\x{6854}\x{6859}\x{685C}\x{685D}\x{685F}' - . '\x{6863}\x{6867}\x{6874}\x{6876}\x{6877}\x{687E}\x{687F}\x{6881}\x{6883}' - . '\x{6885}\x{688D}\x{688F}\x{6893}\x{6894}\x{6897}\x{689B}\x{689D}\x{689F}' - . '\x{68A0}\x{68A2}\x{68A6}\x{68A7}\x{68A8}\x{68AD}\x{68AF}\x{68B0}\x{68B1}' - . '\x{68B3}\x{68B5}\x{68B6}\x{68B9}\x{68BA}\x{68BC}\x{68C4}\x{68C6}\x{68C9}' - . '\x{68CA}\x{68CB}\x{68CD}\x{68D2}\x{68D4}\x{68D5}\x{68D7}\x{68D8}\x{68DA}' - . '\x{68DF}\x{68E0}\x{68E1}\x{68E3}\x{68E7}\x{68EE}\x{68EF}\x{68F2}\x{68F9}' - . '\x{68FA}\x{6900}\x{6901}\x{6904}\x{6905}\x{6908}\x{690B}\x{690C}\x{690D}' - . '\x{690E}\x{690F}\x{6912}\x{6919}\x{691A}\x{691B}\x{691C}\x{6921}\x{6922}' - . '\x{6923}\x{6925}\x{6926}\x{6928}\x{692A}\x{6930}\x{6934}\x{6936}\x{6939}' - . '\x{693D}\x{693F}\x{694A}\x{6953}\x{6954}\x{6955}\x{6959}\x{695A}\x{695C}' - . '\x{695D}\x{695E}\x{6960}\x{6961}\x{6962}\x{696A}\x{696B}\x{696D}\x{696E}' - . '\x{696F}\x{6973}\x{6974}\x{6975}\x{6977}\x{6978}\x{6979}\x{697C}\x{697D}' - . '\x{697E}\x{6981}\x{6982}\x{698A}\x{698E}\x{6991}\x{6994}\x{6995}\x{699B}' - . '\x{699C}\x{69A0}\x{69A7}\x{69AE}\x{69B1}\x{69B2}\x{69B4}\x{69BB}\x{69BE}' - . '\x{69BF}\x{69C1}\x{69C3}\x{69C7}\x{69CA}\x{69CB}\x{69CC}\x{69CD}\x{69CE}' - . '\x{69D0}\x{69D3}\x{69D8}\x{69D9}\x{69DD}\x{69DE}\x{69E7}\x{69E8}\x{69EB}' - . '\x{69ED}\x{69F2}\x{69F9}\x{69FB}\x{69FD}\x{69FF}\x{6A02}\x{6A05}\x{6A0A}' - . '\x{6A0B}\x{6A0C}\x{6A12}\x{6A13}\x{6A14}\x{6A17}\x{6A19}\x{6A1B}\x{6A1E}' - . '\x{6A1F}\x{6A21}\x{6A22}\x{6A23}\x{6A29}\x{6A2A}\x{6A2B}\x{6A2E}\x{6A35}' - . '\x{6A36}\x{6A38}\x{6A39}\x{6A3A}\x{6A3D}\x{6A44}\x{6A47}\x{6A48}\x{6A4B}' - . '\x{6A58}\x{6A59}\x{6A5F}\x{6A61}\x{6A62}\x{6A66}\x{6A72}\x{6A78}\x{6A7F}' - . '\x{6A80}\x{6A84}\x{6A8D}\x{6A8E}\x{6A90}\x{6A97}\x{6A9C}\x{6AA0}\x{6AA2}' - . '\x{6AA3}\x{6AAA}\x{6AAC}\x{6AAE}\x{6AB3}\x{6AB8}\x{6ABB}\x{6AC1}\x{6AC2}' - . '\x{6AC3}\x{6AD1}\x{6AD3}\x{6ADA}\x{6ADB}\x{6ADE}\x{6ADF}\x{6AE8}\x{6AEA}' - . '\x{6AFA}\x{6AFB}\x{6B04}\x{6B05}\x{6B0A}\x{6B12}\x{6B16}\x{6B1D}\x{6B1F}' - . '\x{6B20}\x{6B21}\x{6B23}\x{6B27}\x{6B32}\x{6B37}\x{6B38}\x{6B39}\x{6B3A}' - . '\x{6B3D}\x{6B3E}\x{6B43}\x{6B47}\x{6B49}\x{6B4C}\x{6B4E}\x{6B50}\x{6B53}' - . '\x{6B54}\x{6B59}\x{6B5B}\x{6B5F}\x{6B61}\x{6B62}\x{6B63}\x{6B64}\x{6B66}' - . '\x{6B69}\x{6B6A}\x{6B6F}\x{6B73}\x{6B74}\x{6B78}\x{6B79}\x{6B7B}\x{6B7F}' - . '\x{6B80}\x{6B83}\x{6B84}\x{6B86}\x{6B89}\x{6B8A}\x{6B8B}\x{6B8D}\x{6B95}' - . '\x{6B96}\x{6B98}\x{6B9E}\x{6BA4}\x{6BAA}\x{6BAB}\x{6BAF}\x{6BB1}\x{6BB2}' - . '\x{6BB3}\x{6BB4}\x{6BB5}\x{6BB7}\x{6BBA}\x{6BBB}\x{6BBC}\x{6BBF}\x{6BC0}' - . '\x{6BC5}\x{6BC6}\x{6BCB}\x{6BCD}\x{6BCE}\x{6BD2}\x{6BD3}\x{6BD4}\x{6BD8}' - . '\x{6BDB}\x{6BDF}\x{6BEB}\x{6BEC}\x{6BEF}\x{6BF3}\x{6C08}\x{6C0F}\x{6C11}' - . '\x{6C13}\x{6C14}\x{6C17}\x{6C1B}\x{6C23}\x{6C24}\x{6C34}\x{6C37}\x{6C38}' - . '\x{6C3E}\x{6C40}\x{6C41}\x{6C42}\x{6C4E}\x{6C50}\x{6C55}\x{6C57}\x{6C5A}' - . '\x{6C5D}\x{6C5E}\x{6C5F}\x{6C60}\x{6C62}\x{6C68}\x{6C6A}\x{6C70}\x{6C72}' - . '\x{6C73}\x{6C7A}\x{6C7D}\x{6C7E}\x{6C81}\x{6C82}\x{6C83}\x{6C88}\x{6C8C}' - . '\x{6C8D}\x{6C90}\x{6C92}\x{6C93}\x{6C96}\x{6C99}\x{6C9A}\x{6C9B}\x{6CA1}' - . '\x{6CA2}\x{6CAB}\x{6CAE}\x{6CB1}\x{6CB3}\x{6CB8}\x{6CB9}\x{6CBA}\x{6CBB}' - . '\x{6CBC}\x{6CBD}\x{6CBE}\x{6CBF}\x{6CC1}\x{6CC4}\x{6CC5}\x{6CC9}\x{6CCA}' - . '\x{6CCC}\x{6CD3}\x{6CD5}\x{6CD7}\x{6CD9}\x{6CDB}\x{6CDD}\x{6CE1}\x{6CE2}' - . '\x{6CE3}\x{6CE5}\x{6CE8}\x{6CEA}\x{6CEF}\x{6CF0}\x{6CF1}\x{6CF3}\x{6D0B}' - . '\x{6D0C}\x{6D12}\x{6D17}\x{6D19}\x{6D1B}\x{6D1E}\x{6D1F}\x{6D25}\x{6D29}' - . '\x{6D2A}\x{6D2B}\x{6D32}\x{6D33}\x{6D35}\x{6D36}\x{6D38}\x{6D3B}\x{6D3D}' - . '\x{6D3E}\x{6D41}\x{6D44}\x{6D45}\x{6D59}\x{6D5A}\x{6D5C}\x{6D63}\x{6D64}' - . '\x{6D66}\x{6D69}\x{6D6A}\x{6D6C}\x{6D6E}\x{6D74}\x{6D77}\x{6D78}\x{6D79}' - . '\x{6D85}\x{6D88}\x{6D8C}\x{6D8E}\x{6D93}\x{6D95}\x{6D99}\x{6D9B}\x{6D9C}' - . '\x{6DAF}\x{6DB2}\x{6DB5}\x{6DB8}\x{6DBC}\x{6DC0}\x{6DC5}\x{6DC6}\x{6DC7}' - . '\x{6DCB}\x{6DCC}\x{6DD1}\x{6DD2}\x{6DD5}\x{6DD8}\x{6DD9}\x{6DDE}\x{6DE1}' - . '\x{6DE4}\x{6DE6}\x{6DE8}\x{6DEA}\x{6DEB}\x{6DEC}\x{6DEE}\x{6DF1}\x{6DF3}' - . '\x{6DF5}\x{6DF7}\x{6DF9}\x{6DFA}\x{6DFB}\x{6E05}\x{6E07}\x{6E08}\x{6E09}' - . '\x{6E0A}\x{6E0B}\x{6E13}\x{6E15}\x{6E19}\x{6E1A}\x{6E1B}\x{6E1D}\x{6E1F}' - . '\x{6E20}\x{6E21}\x{6E23}\x{6E24}\x{6E25}\x{6E26}\x{6E29}\x{6E2B}\x{6E2C}' - . '\x{6E2D}\x{6E2E}\x{6E2F}\x{6E38}\x{6E3A}\x{6E3E}\x{6E43}\x{6E4A}\x{6E4D}' - . '\x{6E4E}\x{6E56}\x{6E58}\x{6E5B}\x{6E5F}\x{6E67}\x{6E6B}\x{6E6E}\x{6E6F}' - . '\x{6E72}\x{6E76}\x{6E7E}\x{6E7F}\x{6E80}\x{6E82}\x{6E8C}\x{6E8F}\x{6E90}' - . '\x{6E96}\x{6E98}\x{6E9C}\x{6E9D}\x{6E9F}\x{6EA2}\x{6EA5}\x{6EAA}\x{6EAF}' - . '\x{6EB2}\x{6EB6}\x{6EB7}\x{6EBA}\x{6EBD}\x{6EC2}\x{6EC4}\x{6EC5}\x{6EC9}' - . '\x{6ECB}\x{6ECC}\x{6ED1}\x{6ED3}\x{6ED4}\x{6ED5}\x{6EDD}\x{6EDE}\x{6EEC}' - . '\x{6EEF}\x{6EF2}\x{6EF4}\x{6EF7}\x{6EF8}\x{6EFE}\x{6EFF}\x{6F01}\x{6F02}' - . '\x{6F06}\x{6F09}\x{6F0F}\x{6F11}\x{6F13}\x{6F14}\x{6F15}\x{6F20}\x{6F22}' - . '\x{6F23}\x{6F2B}\x{6F2C}\x{6F31}\x{6F32}\x{6F38}\x{6F3E}\x{6F3F}\x{6F41}' - . '\x{6F45}\x{6F54}\x{6F58}\x{6F5B}\x{6F5C}\x{6F5F}\x{6F64}\x{6F66}\x{6F6D}' - . '\x{6F6E}\x{6F6F}\x{6F70}\x{6F74}\x{6F78}\x{6F7A}\x{6F7C}\x{6F80}\x{6F81}' - . '\x{6F82}\x{6F84}\x{6F86}\x{6F8E}\x{6F91}\x{6F97}\x{6FA1}\x{6FA3}\x{6FA4}' - . '\x{6FAA}\x{6FB1}\x{6FB3}\x{6FB9}\x{6FC0}\x{6FC1}\x{6FC2}\x{6FC3}\x{6FC6}' - . '\x{6FD4}\x{6FD5}\x{6FD8}\x{6FDB}\x{6FDF}\x{6FE0}\x{6FE1}\x{6FE4}\x{6FEB}' - . '\x{6FEC}\x{6FEE}\x{6FEF}\x{6FF1}\x{6FF3}\x{6FF6}\x{6FFA}\x{6FFE}\x{7001}' - . '\x{7009}\x{700B}\x{700F}\x{7011}\x{7015}\x{7018}\x{701A}\x{701B}\x{701D}' - . '\x{701E}\x{701F}\x{7026}\x{7027}\x{702C}\x{7030}\x{7032}\x{703E}\x{704C}' - . '\x{7051}\x{7058}\x{7063}\x{706B}\x{706F}\x{7070}\x{7078}\x{707C}\x{707D}' - . '\x{7089}\x{708A}\x{708E}\x{7092}\x{7099}\x{70AC}\x{70AD}\x{70AE}\x{70AF}' - . '\x{70B3}\x{70B8}\x{70B9}\x{70BA}\x{70C8}\x{70CB}\x{70CF}\x{70D9}\x{70DD}' - . '\x{70DF}\x{70F1}\x{70F9}\x{70FD}\x{7109}\x{7114}\x{7119}\x{711A}\x{711C}' - . '\x{7121}\x{7126}\x{7136}\x{713C}\x{7149}\x{714C}\x{714E}\x{7155}\x{7156}' - . '\x{7159}\x{7162}\x{7164}\x{7165}\x{7166}\x{7167}\x{7169}\x{716C}\x{716E}' - . '\x{717D}\x{7184}\x{7188}\x{718A}\x{718F}\x{7194}\x{7195}\x{7199}\x{719F}' - . '\x{71A8}\x{71AC}\x{71B1}\x{71B9}\x{71BE}\x{71C3}\x{71C8}\x{71C9}\x{71CE}' - . '\x{71D0}\x{71D2}\x{71D4}\x{71D5}\x{71D7}\x{71DF}\x{71E0}\x{71E5}\x{71E6}' - . '\x{71E7}\x{71EC}\x{71ED}\x{71EE}\x{71F5}\x{71F9}\x{71FB}\x{71FC}\x{71FF}' - . '\x{7206}\x{720D}\x{7210}\x{721B}\x{7228}\x{722A}\x{722C}\x{722D}\x{7230}' - . '\x{7232}\x{7235}\x{7236}\x{723A}\x{723B}\x{723C}\x{723D}\x{723E}\x{723F}' - . '\x{7240}\x{7246}\x{7247}\x{7248}\x{724B}\x{724C}\x{7252}\x{7258}\x{7259}' - . '\x{725B}\x{725D}\x{725F}\x{7261}\x{7262}\x{7267}\x{7269}\x{7272}\x{7274}' - . '\x{7279}\x{727D}\x{727E}\x{7280}\x{7281}\x{7282}\x{7287}\x{7292}\x{7296}' - . '\x{72A0}\x{72A2}\x{72A7}\x{72AC}\x{72AF}\x{72B2}\x{72B6}\x{72B9}\x{72C2}' - . '\x{72C3}\x{72C4}\x{72C6}\x{72CE}\x{72D0}\x{72D2}\x{72D7}\x{72D9}\x{72DB}' - . '\x{72E0}\x{72E1}\x{72E2}\x{72E9}\x{72EC}\x{72ED}\x{72F7}\x{72F8}\x{72F9}' - . '\x{72FC}\x{72FD}\x{730A}\x{7316}\x{7317}\x{731B}\x{731C}\x{731D}\x{731F}' - . '\x{7325}\x{7329}\x{732A}\x{732B}\x{732E}\x{732F}\x{7334}\x{7336}\x{7337}' - . '\x{733E}\x{733F}\x{7344}\x{7345}\x{734E}\x{734F}\x{7357}\x{7363}\x{7368}' - . '\x{736A}\x{7370}\x{7372}\x{7375}\x{7378}\x{737A}\x{737B}\x{7384}\x{7387}' - . '\x{7389}\x{738B}\x{7396}\x{73A9}\x{73B2}\x{73B3}\x{73BB}\x{73C0}\x{73C2}' - . '\x{73C8}\x{73CA}\x{73CD}\x{73CE}\x{73DE}\x{73E0}\x{73E5}\x{73EA}\x{73ED}' - . '\x{73EE}\x{73F1}\x{73F8}\x{73FE}\x{7403}\x{7405}\x{7406}\x{7409}\x{7422}' - . '\x{7425}\x{7432}\x{7433}\x{7434}\x{7435}\x{7436}\x{743A}\x{743F}\x{7441}' - . '\x{7455}\x{7459}\x{745A}\x{745B}\x{745C}\x{745E}\x{745F}\x{7460}\x{7463}' - . '\x{7464}\x{7469}\x{746A}\x{746F}\x{7470}\x{7473}\x{7476}\x{747E}\x{7483}' - . '\x{748B}\x{749E}\x{74A2}\x{74A7}\x{74B0}\x{74BD}\x{74CA}\x{74CF}\x{74D4}' - . '\x{74DC}\x{74E0}\x{74E2}\x{74E3}\x{74E6}\x{74E7}\x{74E9}\x{74EE}\x{74F0}' - . '\x{74F1}\x{74F2}\x{74F6}\x{74F7}\x{74F8}\x{7503}\x{7504}\x{7505}\x{750C}' - . '\x{750D}\x{750E}\x{7511}\x{7513}\x{7515}\x{7518}\x{751A}\x{751C}\x{751E}' - . '\x{751F}\x{7523}\x{7525}\x{7526}\x{7528}\x{752B}\x{752C}\x{7530}\x{7531}' - . '\x{7532}\x{7533}\x{7537}\x{7538}\x{753A}\x{753B}\x{753C}\x{7544}\x{7546}' - . '\x{7549}\x{754A}\x{754B}\x{754C}\x{754D}\x{754F}\x{7551}\x{7554}\x{7559}' - . '\x{755A}\x{755B}\x{755C}\x{755D}\x{7560}\x{7562}\x{7564}\x{7565}\x{7566}' - . '\x{7567}\x{7569}\x{756A}\x{756B}\x{756D}\x{7570}\x{7573}\x{7574}\x{7576}' - . '\x{7577}\x{7578}\x{757F}\x{7582}\x{7586}\x{7587}\x{7589}\x{758A}\x{758B}' - . '\x{758E}\x{758F}\x{7591}\x{7594}\x{759A}\x{759D}\x{75A3}\x{75A5}\x{75AB}' - . '\x{75B1}\x{75B2}\x{75B3}\x{75B5}\x{75B8}\x{75B9}\x{75BC}\x{75BD}\x{75BE}' - . '\x{75C2}\x{75C3}\x{75C5}\x{75C7}\x{75CA}\x{75CD}\x{75D2}\x{75D4}\x{75D5}' - . '\x{75D8}\x{75D9}\x{75DB}\x{75DE}\x{75E2}\x{75E3}\x{75E9}\x{75F0}\x{75F2}' - . '\x{75F3}\x{75F4}\x{75FA}\x{75FC}\x{75FE}\x{75FF}\x{7601}\x{7609}\x{760B}' - . '\x{760D}\x{761F}\x{7620}\x{7621}\x{7622}\x{7624}\x{7627}\x{7630}\x{7634}' - . '\x{763B}\x{7642}\x{7646}\x{7647}\x{7648}\x{764C}\x{7652}\x{7656}\x{7658}' - . '\x{765C}\x{7661}\x{7662}\x{7667}\x{7668}\x{7669}\x{766A}\x{766C}\x{7670}' - . '\x{7672}\x{7676}\x{7678}\x{767A}\x{767B}\x{767C}\x{767D}\x{767E}\x{7680}' - . '\x{7683}\x{7684}\x{7686}\x{7687}\x{7688}\x{768B}\x{768E}\x{7690}\x{7693}' - . '\x{7696}\x{7699}\x{769A}\x{76AE}\x{76B0}\x{76B4}\x{76B7}\x{76B8}\x{76B9}' - . '\x{76BA}\x{76BF}\x{76C2}\x{76C3}\x{76C6}\x{76C8}\x{76CA}\x{76CD}\x{76D2}' - . '\x{76D6}\x{76D7}\x{76DB}\x{76DC}\x{76DE}\x{76DF}\x{76E1}\x{76E3}\x{76E4}' - . '\x{76E5}\x{76E7}\x{76EA}\x{76EE}\x{76F2}\x{76F4}\x{76F8}\x{76FB}\x{76FE}' - . '\x{7701}\x{7704}\x{7707}\x{7708}\x{7709}\x{770B}\x{770C}\x{771B}\x{771E}' - . '\x{771F}\x{7720}\x{7724}\x{7725}\x{7726}\x{7729}\x{7737}\x{7738}\x{773A}' - . '\x{773C}\x{7740}\x{7747}\x{775A}\x{775B}\x{7761}\x{7763}\x{7765}\x{7766}' - . '\x{7768}\x{776B}\x{7779}\x{777E}\x{777F}\x{778B}\x{778E}\x{7791}\x{779E}' - . '\x{77A0}\x{77A5}\x{77AC}\x{77AD}\x{77B0}\x{77B3}\x{77B6}\x{77B9}\x{77BB}' - . '\x{77BC}\x{77BD}\x{77BF}\x{77C7}\x{77CD}\x{77D7}\x{77DA}\x{77DB}\x{77DC}' - . '\x{77E2}\x{77E3}\x{77E5}\x{77E7}\x{77E9}\x{77ED}\x{77EE}\x{77EF}\x{77F3}' - . '\x{77FC}\x{7802}\x{780C}\x{7812}\x{7814}\x{7815}\x{7820}\x{7825}\x{7826}' - . '\x{7827}\x{7832}\x{7834}\x{783A}\x{783F}\x{7845}\x{785D}\x{786B}\x{786C}' - . '\x{786F}\x{7872}\x{7874}\x{787C}\x{7881}\x{7886}\x{7887}\x{788C}\x{788D}' - . '\x{788E}\x{7891}\x{7893}\x{7895}\x{7897}\x{789A}\x{78A3}\x{78A7}\x{78A9}' - . '\x{78AA}\x{78AF}\x{78B5}\x{78BA}\x{78BC}\x{78BE}\x{78C1}\x{78C5}\x{78C6}' - . '\x{78CA}\x{78CB}\x{78D0}\x{78D1}\x{78D4}\x{78DA}\x{78E7}\x{78E8}\x{78EC}' - . '\x{78EF}\x{78F4}\x{78FD}\x{7901}\x{7907}\x{790E}\x{7911}\x{7912}\x{7919}' - . '\x{7926}\x{792A}\x{792B}\x{792C}\x{793A}\x{793C}\x{793E}\x{7940}\x{7941}' - . '\x{7947}\x{7948}\x{7949}\x{7950}\x{7953}\x{7955}\x{7956}\x{7957}\x{795A}' - . '\x{795D}\x{795E}\x{795F}\x{7960}\x{7962}\x{7965}\x{7968}\x{796D}\x{7977}' - . '\x{797A}\x{797F}\x{7980}\x{7981}\x{7984}\x{7985}\x{798A}\x{798D}\x{798E}' - . '\x{798F}\x{799D}\x{79A6}\x{79A7}\x{79AA}\x{79AE}\x{79B0}\x{79B3}\x{79B9}' - . '\x{79BA}\x{79BD}\x{79BE}\x{79BF}\x{79C0}\x{79C1}\x{79C9}\x{79CB}\x{79D1}' - . '\x{79D2}\x{79D5}\x{79D8}\x{79DF}\x{79E1}\x{79E3}\x{79E4}\x{79E6}\x{79E7}' - . '\x{79E9}\x{79EC}\x{79F0}\x{79FB}\x{7A00}\x{7A08}\x{7A0B}\x{7A0D}\x{7A0E}' - . '\x{7A14}\x{7A17}\x{7A18}\x{7A19}\x{7A1A}\x{7A1C}\x{7A1F}\x{7A20}\x{7A2E}' - . '\x{7A31}\x{7A32}\x{7A37}\x{7A3B}\x{7A3C}\x{7A3D}\x{7A3E}\x{7A3F}\x{7A40}' - . '\x{7A42}\x{7A43}\x{7A46}\x{7A49}\x{7A4D}\x{7A4E}\x{7A4F}\x{7A50}\x{7A57}' - . '\x{7A61}\x{7A62}\x{7A63}\x{7A69}\x{7A6B}\x{7A70}\x{7A74}\x{7A76}\x{7A79}' - . '\x{7A7A}\x{7A7D}\x{7A7F}\x{7A81}\x{7A83}\x{7A84}\x{7A88}\x{7A92}\x{7A93}' - . '\x{7A95}\x{7A96}\x{7A97}\x{7A98}\x{7A9F}\x{7AA9}\x{7AAA}\x{7AAE}\x{7AAF}' - . '\x{7AB0}\x{7AB6}\x{7ABA}\x{7ABF}\x{7AC3}\x{7AC4}\x{7AC5}\x{7AC7}\x{7AC8}' - . '\x{7ACA}\x{7ACB}\x{7ACD}\x{7ACF}\x{7AD2}\x{7AD3}\x{7AD5}\x{7AD9}\x{7ADA}' - . '\x{7ADC}\x{7ADD}\x{7ADF}\x{7AE0}\x{7AE1}\x{7AE2}\x{7AE3}\x{7AE5}\x{7AE6}' - . '\x{7AEA}\x{7AED}\x{7AEF}\x{7AF0}\x{7AF6}\x{7AF8}\x{7AF9}\x{7AFA}\x{7AFF}' - . '\x{7B02}\x{7B04}\x{7B06}\x{7B08}\x{7B0A}\x{7B0B}\x{7B0F}\x{7B11}\x{7B18}' - . '\x{7B19}\x{7B1B}\x{7B1E}\x{7B20}\x{7B25}\x{7B26}\x{7B28}\x{7B2C}\x{7B33}' - . '\x{7B35}\x{7B36}\x{7B39}\x{7B45}\x{7B46}\x{7B48}\x{7B49}\x{7B4B}\x{7B4C}' - . '\x{7B4D}\x{7B4F}\x{7B50}\x{7B51}\x{7B52}\x{7B54}\x{7B56}\x{7B5D}\x{7B65}' - . '\x{7B67}\x{7B6C}\x{7B6E}\x{7B70}\x{7B71}\x{7B74}\x{7B75}\x{7B7A}\x{7B86}' - . '\x{7B87}\x{7B8B}\x{7B8D}\x{7B8F}\x{7B92}\x{7B94}\x{7B95}\x{7B97}\x{7B98}' - . '\x{7B99}\x{7B9A}\x{7B9C}\x{7B9D}\x{7B9F}\x{7BA1}\x{7BAA}\x{7BAD}\x{7BB1}' - . '\x{7BB4}\x{7BB8}\x{7BC0}\x{7BC1}\x{7BC4}\x{7BC6}\x{7BC7}\x{7BC9}\x{7BCB}' - . '\x{7BCC}\x{7BCF}\x{7BDD}\x{7BE0}\x{7BE4}\x{7BE5}\x{7BE6}\x{7BE9}\x{7BED}' - . '\x{7BF3}\x{7BF6}\x{7BF7}\x{7C00}\x{7C07}\x{7C0D}\x{7C11}\x{7C12}\x{7C13}' - . '\x{7C14}\x{7C17}\x{7C1F}\x{7C21}\x{7C23}\x{7C27}\x{7C2A}\x{7C2B}\x{7C37}' - . '\x{7C38}\x{7C3D}\x{7C3E}\x{7C3F}\x{7C40}\x{7C43}\x{7C4C}\x{7C4D}\x{7C4F}' - . '\x{7C50}\x{7C54}\x{7C56}\x{7C58}\x{7C5F}\x{7C60}\x{7C64}\x{7C65}\x{7C6C}' - . '\x{7C73}\x{7C75}\x{7C7E}\x{7C81}\x{7C82}\x{7C83}\x{7C89}\x{7C8B}\x{7C8D}' - . '\x{7C90}\x{7C92}\x{7C95}\x{7C97}\x{7C98}\x{7C9B}\x{7C9F}\x{7CA1}\x{7CA2}' - . '\x{7CA4}\x{7CA5}\x{7CA7}\x{7CA8}\x{7CAB}\x{7CAD}\x{7CAE}\x{7CB1}\x{7CB2}' - . '\x{7CB3}\x{7CB9}\x{7CBD}\x{7CBE}\x{7CC0}\x{7CC2}\x{7CC5}\x{7CCA}\x{7CCE}' - . '\x{7CD2}\x{7CD6}\x{7CD8}\x{7CDC}\x{7CDE}\x{7CDF}\x{7CE0}\x{7CE2}\x{7CE7}' - . '\x{7CEF}\x{7CF2}\x{7CF4}\x{7CF6}\x{7CF8}\x{7CFA}\x{7CFB}\x{7CFE}\x{7D00}' - . '\x{7D02}\x{7D04}\x{7D05}\x{7D06}\x{7D0A}\x{7D0B}\x{7D0D}\x{7D10}\x{7D14}' - . '\x{7D15}\x{7D17}\x{7D18}\x{7D19}\x{7D1A}\x{7D1B}\x{7D1C}\x{7D20}\x{7D21}' - . '\x{7D22}\x{7D2B}\x{7D2C}\x{7D2E}\x{7D2F}\x{7D30}\x{7D32}\x{7D33}\x{7D35}' - . '\x{7D39}\x{7D3A}\x{7D3F}\x{7D42}\x{7D43}\x{7D44}\x{7D45}\x{7D46}\x{7D4B}' - . '\x{7D4C}\x{7D4E}\x{7D4F}\x{7D50}\x{7D56}\x{7D5B}\x{7D5E}\x{7D61}\x{7D62}' - . '\x{7D63}\x{7D66}\x{7D68}\x{7D6E}\x{7D71}\x{7D72}\x{7D73}\x{7D75}\x{7D76}' - . '\x{7D79}\x{7D7D}\x{7D89}\x{7D8F}\x{7D93}\x{7D99}\x{7D9A}\x{7D9B}\x{7D9C}' - . '\x{7D9F}\x{7DA2}\x{7DA3}\x{7DAB}\x{7DAC}\x{7DAD}\x{7DAE}\x{7DAF}\x{7DB0}' - . '\x{7DB1}\x{7DB2}\x{7DB4}\x{7DB5}\x{7DB8}\x{7DBA}\x{7DBB}\x{7DBD}\x{7DBE}' - . '\x{7DBF}\x{7DC7}\x{7DCA}\x{7DCB}\x{7DCF}\x{7DD1}\x{7DD2}\x{7DD5}\x{7DD8}' - . '\x{7DDA}\x{7DDC}\x{7DDD}\x{7DDE}\x{7DE0}\x{7DE1}\x{7DE4}\x{7DE8}\x{7DE9}' - . '\x{7DEC}\x{7DEF}\x{7DF2}\x{7DF4}\x{7DFB}\x{7E01}\x{7E04}\x{7E05}\x{7E09}' - . '\x{7E0A}\x{7E0B}\x{7E12}\x{7E1B}\x{7E1E}\x{7E1F}\x{7E21}\x{7E22}\x{7E23}' - . '\x{7E26}\x{7E2B}\x{7E2E}\x{7E31}\x{7E32}\x{7E35}\x{7E37}\x{7E39}\x{7E3A}' - . '\x{7E3B}\x{7E3D}\x{7E3E}\x{7E41}\x{7E43}\x{7E46}\x{7E4A}\x{7E4B}\x{7E4D}' - . '\x{7E54}\x{7E55}\x{7E56}\x{7E59}\x{7E5A}\x{7E5D}\x{7E5E}\x{7E66}\x{7E67}' - . '\x{7E69}\x{7E6A}\x{7E6D}\x{7E70}\x{7E79}\x{7E7B}\x{7E7C}\x{7E7D}\x{7E7F}' - . '\x{7E82}\x{7E83}\x{7E88}\x{7E89}\x{7E8C}\x{7E8E}\x{7E8F}\x{7E90}\x{7E92}' - . '\x{7E93}\x{7E94}\x{7E96}\x{7E9B}\x{7E9C}\x{7F36}\x{7F38}\x{7F3A}\x{7F45}' - . '\x{7F4C}\x{7F4D}\x{7F4E}\x{7F50}\x{7F51}\x{7F54}\x{7F55}\x{7F58}\x{7F5F}' - . '\x{7F60}\x{7F67}\x{7F68}\x{7F69}\x{7F6A}\x{7F6B}\x{7F6E}\x{7F70}\x{7F72}' - . '\x{7F75}\x{7F77}\x{7F78}\x{7F79}\x{7F82}\x{7F83}\x{7F85}\x{7F86}\x{7F87}' - . '\x{7F88}\x{7F8A}\x{7F8C}\x{7F8E}\x{7F94}\x{7F9A}\x{7F9D}\x{7F9E}\x{7FA3}' - . '\x{7FA4}\x{7FA8}\x{7FA9}\x{7FAE}\x{7FAF}\x{7FB2}\x{7FB6}\x{7FB8}\x{7FB9}' - . '\x{7FBD}\x{7FC1}\x{7FC5}\x{7FC6}\x{7FCA}\x{7FCC}\x{7FD2}\x{7FD4}\x{7FD5}' - . '\x{7FE0}\x{7FE1}\x{7FE6}\x{7FE9}\x{7FEB}\x{7FF0}\x{7FF3}\x{7FF9}\x{7FFB}' - . '\x{7FFC}\x{8000}\x{8001}\x{8003}\x{8004}\x{8005}\x{8006}\x{800B}\x{800C}' - . '\x{8010}\x{8012}\x{8015}\x{8017}\x{8018}\x{8019}\x{801C}\x{8021}\x{8028}' - . '\x{8033}\x{8036}\x{803B}\x{803D}\x{803F}\x{8046}\x{804A}\x{8052}\x{8056}' - . '\x{8058}\x{805A}\x{805E}\x{805F}\x{8061}\x{8062}\x{8068}\x{806F}\x{8070}' - . '\x{8072}\x{8073}\x{8074}\x{8076}\x{8077}\x{8079}\x{807D}\x{807E}\x{807F}' - . '\x{8084}\x{8085}\x{8086}\x{8087}\x{8089}\x{808B}\x{808C}\x{8093}\x{8096}' - . '\x{8098}\x{809A}\x{809B}\x{809D}\x{80A1}\x{80A2}\x{80A5}\x{80A9}\x{80AA}' - . '\x{80AC}\x{80AD}\x{80AF}\x{80B1}\x{80B2}\x{80B4}\x{80BA}\x{80C3}\x{80C4}' - . '\x{80C6}\x{80CC}\x{80CE}\x{80D6}\x{80D9}\x{80DA}\x{80DB}\x{80DD}\x{80DE}' - . '\x{80E1}\x{80E4}\x{80E5}\x{80EF}\x{80F1}\x{80F4}\x{80F8}\x{80FC}\x{80FD}' - . '\x{8102}\x{8105}\x{8106}\x{8107}\x{8108}\x{8109}\x{810A}\x{811A}\x{811B}' - . '\x{8123}\x{8129}\x{812F}\x{8131}\x{8133}\x{8139}\x{813E}\x{8146}\x{814B}' - . '\x{814E}\x{8150}\x{8151}\x{8153}\x{8154}\x{8155}\x{815F}\x{8165}\x{8166}' - . '\x{816B}\x{816E}\x{8170}\x{8171}\x{8174}\x{8178}\x{8179}\x{817A}\x{817F}' - . '\x{8180}\x{8182}\x{8183}\x{8188}\x{818A}\x{818F}\x{8193}\x{8195}\x{819A}' - . '\x{819C}\x{819D}\x{81A0}\x{81A3}\x{81A4}\x{81A8}\x{81A9}\x{81B0}\x{81B3}' - . '\x{81B5}\x{81B8}\x{81BA}\x{81BD}\x{81BE}\x{81BF}\x{81C0}\x{81C2}\x{81C6}' - . '\x{81C8}\x{81C9}\x{81CD}\x{81D1}\x{81D3}\x{81D8}\x{81D9}\x{81DA}\x{81DF}' - . '\x{81E0}\x{81E3}\x{81E5}\x{81E7}\x{81E8}\x{81EA}\x{81ED}\x{81F3}\x{81F4}' - . '\x{81FA}\x{81FB}\x{81FC}\x{81FE}\x{8201}\x{8202}\x{8205}\x{8207}\x{8208}' - . '\x{8209}\x{820A}\x{820C}\x{820D}\x{820E}\x{8210}\x{8212}\x{8216}\x{8217}' - . '\x{8218}\x{821B}\x{821C}\x{821E}\x{821F}\x{8229}\x{822A}\x{822B}\x{822C}' - . '\x{822E}\x{8233}\x{8235}\x{8236}\x{8237}\x{8238}\x{8239}\x{8240}\x{8247}' - . '\x{8258}\x{8259}\x{825A}\x{825D}\x{825F}\x{8262}\x{8264}\x{8266}\x{8268}' - . '\x{826A}\x{826B}\x{826E}\x{826F}\x{8271}\x{8272}\x{8276}\x{8277}\x{8278}' - . '\x{827E}\x{828B}\x{828D}\x{8292}\x{8299}\x{829D}\x{829F}\x{82A5}\x{82A6}' - . '\x{82AB}\x{82AC}\x{82AD}\x{82AF}\x{82B1}\x{82B3}\x{82B8}\x{82B9}\x{82BB}' - . '\x{82BD}\x{82C5}\x{82D1}\x{82D2}\x{82D3}\x{82D4}\x{82D7}\x{82D9}\x{82DB}' - . '\x{82DC}\x{82DE}\x{82DF}\x{82E1}\x{82E3}\x{82E5}\x{82E6}\x{82E7}\x{82EB}' - . '\x{82F1}\x{82F3}\x{82F4}\x{82F9}\x{82FA}\x{82FB}\x{8302}\x{8303}\x{8304}' - . '\x{8305}\x{8306}\x{8309}\x{830E}\x{8316}\x{8317}\x{8318}\x{831C}\x{8323}' - . '\x{8328}\x{832B}\x{832F}\x{8331}\x{8332}\x{8334}\x{8335}\x{8336}\x{8338}' - . '\x{8339}\x{8340}\x{8345}\x{8349}\x{834A}\x{834F}\x{8350}\x{8352}\x{8358}' - . '\x{8373}\x{8375}\x{8377}\x{837B}\x{837C}\x{8385}\x{8387}\x{8389}\x{838A}' - . '\x{838E}\x{8393}\x{8396}\x{839A}\x{839E}\x{839F}\x{83A0}\x{83A2}\x{83A8}' - . '\x{83AA}\x{83AB}\x{83B1}\x{83B5}\x{83BD}\x{83C1}\x{83C5}\x{83CA}\x{83CC}' - . '\x{83CE}\x{83D3}\x{83D6}\x{83D8}\x{83DC}\x{83DF}\x{83E0}\x{83E9}\x{83EB}' - . '\x{83EF}\x{83F0}\x{83F1}\x{83F2}\x{83F4}\x{83F7}\x{83FB}\x{83FD}\x{8403}' - . '\x{8404}\x{8407}\x{840B}\x{840C}\x{840D}\x{840E}\x{8413}\x{8420}\x{8422}' - . '\x{8429}\x{842A}\x{842C}\x{8431}\x{8435}\x{8438}\x{843C}\x{843D}\x{8446}' - . '\x{8449}\x{844E}\x{8457}\x{845B}\x{8461}\x{8462}\x{8463}\x{8466}\x{8469}' - . '\x{846B}\x{846C}\x{846D}\x{846E}\x{846F}\x{8471}\x{8475}\x{8477}\x{8479}' - . '\x{847A}\x{8482}\x{8484}\x{848B}\x{8490}\x{8494}\x{8499}\x{849C}\x{849F}' - . '\x{84A1}\x{84AD}\x{84B2}\x{84B8}\x{84B9}\x{84BB}\x{84BC}\x{84BF}\x{84C1}' - . '\x{84C4}\x{84C6}\x{84C9}\x{84CA}\x{84CB}\x{84CD}\x{84D0}\x{84D1}\x{84D6}' - . '\x{84D9}\x{84DA}\x{84EC}\x{84EE}\x{84F4}\x{84FC}\x{84FF}\x{8500}\x{8506}' - . '\x{8511}\x{8513}\x{8514}\x{8515}\x{8517}\x{8518}\x{851A}\x{851F}\x{8521}' - . '\x{8526}\x{852C}\x{852D}\x{8535}\x{853D}\x{8540}\x{8541}\x{8543}\x{8548}' - . '\x{8549}\x{854A}\x{854B}\x{854E}\x{8555}\x{8557}\x{8558}\x{855A}\x{8563}' - . '\x{8568}\x{8569}\x{856A}\x{856D}\x{8577}\x{857E}\x{8580}\x{8584}\x{8587}' - . '\x{8588}\x{858A}\x{8590}\x{8591}\x{8594}\x{8597}\x{8599}\x{859B}\x{859C}' - . '\x{85A4}\x{85A6}\x{85A8}\x{85A9}\x{85AA}\x{85AB}\x{85AC}\x{85AE}\x{85AF}' - . '\x{85B9}\x{85BA}\x{85C1}\x{85C9}\x{85CD}\x{85CF}\x{85D0}\x{85D5}\x{85DC}' - . '\x{85DD}\x{85E4}\x{85E5}\x{85E9}\x{85EA}\x{85F7}\x{85F9}\x{85FA}\x{85FB}' - . '\x{85FE}\x{8602}\x{8606}\x{8607}\x{860A}\x{860B}\x{8613}\x{8616}\x{8617}' - . '\x{861A}\x{8622}\x{862D}\x{862F}\x{8630}\x{863F}\x{864D}\x{864E}\x{8650}' - . '\x{8654}\x{8655}\x{865A}\x{865C}\x{865E}\x{865F}\x{8667}\x{866B}\x{8671}' - . '\x{8679}\x{867B}\x{868A}\x{868B}\x{868C}\x{8693}\x{8695}\x{86A3}\x{86A4}' - . '\x{86A9}\x{86AA}\x{86AB}\x{86AF}\x{86B0}\x{86B6}\x{86C4}\x{86C6}\x{86C7}' - . '\x{86C9}\x{86CB}\x{86CD}\x{86CE}\x{86D4}\x{86D9}\x{86DB}\x{86DE}\x{86DF}' - . '\x{86E4}\x{86E9}\x{86EC}\x{86ED}\x{86EE}\x{86EF}\x{86F8}\x{86F9}\x{86FB}' - . '\x{86FE}\x{8700}\x{8702}\x{8703}\x{8706}\x{8708}\x{8709}\x{870A}\x{870D}' - . '\x{8711}\x{8712}\x{8718}\x{871A}\x{871C}\x{8725}\x{8729}\x{8734}\x{8737}' - . '\x{873B}\x{873F}\x{8749}\x{874B}\x{874C}\x{874E}\x{8753}\x{8755}\x{8757}' - . '\x{8759}\x{875F}\x{8760}\x{8763}\x{8766}\x{8768}\x{876A}\x{876E}\x{8774}' - . '\x{8776}\x{8778}\x{877F}\x{8782}\x{878D}\x{879F}\x{87A2}\x{87AB}\x{87AF}' - . '\x{87B3}\x{87BA}\x{87BB}\x{87BD}\x{87C0}\x{87C4}\x{87C6}\x{87C7}\x{87CB}' - . '\x{87D0}\x{87D2}\x{87E0}\x{87EF}\x{87F2}\x{87F6}\x{87F7}\x{87F9}\x{87FB}' - . '\x{87FE}\x{8805}\x{880D}\x{880E}\x{880F}\x{8811}\x{8815}\x{8816}\x{8821}' - . '\x{8822}\x{8823}\x{8827}\x{8831}\x{8836}\x{8839}\x{883B}\x{8840}\x{8842}' - . '\x{8844}\x{8846}\x{884C}\x{884D}\x{8852}\x{8853}\x{8857}\x{8859}\x{885B}' - . '\x{885D}\x{885E}\x{8861}\x{8862}\x{8863}\x{8868}\x{886B}\x{8870}\x{8872}' - . '\x{8875}\x{8877}\x{887D}\x{887E}\x{887F}\x{8881}\x{8882}\x{8888}\x{888B}' - . '\x{888D}\x{8892}\x{8896}\x{8897}\x{8899}\x{889E}\x{88A2}\x{88A4}\x{88AB}' - . '\x{88AE}\x{88B0}\x{88B1}\x{88B4}\x{88B5}\x{88B7}\x{88BF}\x{88C1}\x{88C2}' - . '\x{88C3}\x{88C4}\x{88C5}\x{88CF}\x{88D4}\x{88D5}\x{88D8}\x{88D9}\x{88DC}' - . '\x{88DD}\x{88DF}\x{88E1}\x{88E8}\x{88F2}\x{88F3}\x{88F4}\x{88F8}\x{88F9}' - . '\x{88FC}\x{88FD}\x{88FE}\x{8902}\x{8904}\x{8907}\x{890A}\x{890C}\x{8910}' - . '\x{8912}\x{8913}\x{891D}\x{891E}\x{8925}\x{892A}\x{892B}\x{8936}\x{8938}' - . '\x{893B}\x{8941}\x{8943}\x{8944}\x{894C}\x{894D}\x{8956}\x{895E}\x{895F}' - . '\x{8960}\x{8964}\x{8966}\x{896A}\x{896D}\x{896F}\x{8972}\x{8974}\x{8977}' - . '\x{897E}\x{897F}\x{8981}\x{8983}\x{8986}\x{8987}\x{8988}\x{898A}\x{898B}' - . '\x{898F}\x{8993}\x{8996}\x{8997}\x{8998}\x{899A}\x{89A1}\x{89A6}\x{89A7}' - . '\x{89A9}\x{89AA}\x{89AC}\x{89AF}\x{89B2}\x{89B3}\x{89BA}\x{89BD}\x{89BF}' - . '\x{89C0}\x{89D2}\x{89DA}\x{89DC}\x{89DD}\x{89E3}\x{89E6}\x{89E7}\x{89F4}' - . '\x{89F8}\x{8A00}\x{8A02}\x{8A03}\x{8A08}\x{8A0A}\x{8A0C}\x{8A0E}\x{8A10}' - . '\x{8A13}\x{8A16}\x{8A17}\x{8A18}\x{8A1B}\x{8A1D}\x{8A1F}\x{8A23}\x{8A25}' - . '\x{8A2A}\x{8A2D}\x{8A31}\x{8A33}\x{8A34}\x{8A36}\x{8A3A}\x{8A3B}\x{8A3C}' - . '\x{8A41}\x{8A46}\x{8A48}\x{8A50}\x{8A51}\x{8A52}\x{8A54}\x{8A55}\x{8A5B}' - . '\x{8A5E}\x{8A60}\x{8A62}\x{8A63}\x{8A66}\x{8A69}\x{8A6B}\x{8A6C}\x{8A6D}' - . '\x{8A6E}\x{8A70}\x{8A71}\x{8A72}\x{8A73}\x{8A7C}\x{8A82}\x{8A84}\x{8A85}' - . '\x{8A87}\x{8A89}\x{8A8C}\x{8A8D}\x{8A91}\x{8A93}\x{8A95}\x{8A98}\x{8A9A}' - . '\x{8A9E}\x{8AA0}\x{8AA1}\x{8AA3}\x{8AA4}\x{8AA5}\x{8AA6}\x{8AA8}\x{8AAC}' - . '\x{8AAD}\x{8AB0}\x{8AB2}\x{8AB9}\x{8ABC}\x{8ABF}\x{8AC2}\x{8AC4}\x{8AC7}' - . '\x{8ACB}\x{8ACC}\x{8ACD}\x{8ACF}\x{8AD2}\x{8AD6}\x{8ADA}\x{8ADB}\x{8ADC}' - . '\x{8ADE}\x{8AE0}\x{8AE1}\x{8AE2}\x{8AE4}\x{8AE6}\x{8AE7}\x{8AEB}\x{8AED}' - . '\x{8AEE}\x{8AF1}\x{8AF3}\x{8AF7}\x{8AF8}\x{8AFA}\x{8AFE}\x{8B00}\x{8B01}' - . '\x{8B02}\x{8B04}\x{8B07}\x{8B0C}\x{8B0E}\x{8B10}\x{8B14}\x{8B16}\x{8B17}' - . '\x{8B19}\x{8B1A}\x{8B1B}\x{8B1D}\x{8B20}\x{8B21}\x{8B26}\x{8B28}\x{8B2B}' - . '\x{8B2C}\x{8B33}\x{8B39}\x{8B3E}\x{8B41}\x{8B49}\x{8B4C}\x{8B4E}\x{8B4F}' - . '\x{8B56}\x{8B58}\x{8B5A}\x{8B5B}\x{8B5C}\x{8B5F}\x{8B66}\x{8B6B}\x{8B6C}' - . '\x{8B6F}\x{8B70}\x{8B71}\x{8B72}\x{8B74}\x{8B77}\x{8B7D}\x{8B80}\x{8B83}' - . '\x{8B8A}\x{8B8C}\x{8B8E}\x{8B90}\x{8B92}\x{8B93}\x{8B96}\x{8B99}\x{8B9A}' - . '\x{8C37}\x{8C3A}\x{8C3F}\x{8C41}\x{8C46}\x{8C48}\x{8C4A}\x{8C4C}\x{8C4E}' - . '\x{8C50}\x{8C55}\x{8C5A}\x{8C61}\x{8C62}\x{8C6A}\x{8C6B}\x{8C6C}\x{8C78}' - . '\x{8C79}\x{8C7A}\x{8C7C}\x{8C82}\x{8C85}\x{8C89}\x{8C8A}\x{8C8C}\x{8C8D}' - . '\x{8C8E}\x{8C94}\x{8C98}\x{8C9D}\x{8C9E}\x{8CA0}\x{8CA1}\x{8CA2}\x{8CA7}' - . '\x{8CA8}\x{8CA9}\x{8CAA}\x{8CAB}\x{8CAC}\x{8CAD}\x{8CAE}\x{8CAF}\x{8CB0}' - . '\x{8CB2}\x{8CB3}\x{8CB4}\x{8CB6}\x{8CB7}\x{8CB8}\x{8CBB}\x{8CBC}\x{8CBD}' - . '\x{8CBF}\x{8CC0}\x{8CC1}\x{8CC2}\x{8CC3}\x{8CC4}\x{8CC7}\x{8CC8}\x{8CCA}' - . '\x{8CCD}\x{8CCE}\x{8CD1}\x{8CD3}\x{8CDA}\x{8CDB}\x{8CDC}\x{8CDE}\x{8CE0}' - . '\x{8CE2}\x{8CE3}\x{8CE4}\x{8CE6}\x{8CEA}\x{8CED}\x{8CFA}\x{8CFB}\x{8CFC}' - . '\x{8CFD}\x{8D04}\x{8D05}\x{8D07}\x{8D08}\x{8D0A}\x{8D0B}\x{8D0D}\x{8D0F}' - . '\x{8D10}\x{8D13}\x{8D14}\x{8D16}\x{8D64}\x{8D66}\x{8D67}\x{8D6B}\x{8D6D}' - . '\x{8D70}\x{8D71}\x{8D73}\x{8D74}\x{8D77}\x{8D81}\x{8D85}\x{8D8A}\x{8D99}' - . '\x{8DA3}\x{8DA8}\x{8DB3}\x{8DBA}\x{8DBE}\x{8DC2}\x{8DCB}\x{8DCC}\x{8DCF}' - . '\x{8DD6}\x{8DDA}\x{8DDB}\x{8DDD}\x{8DDF}\x{8DE1}\x{8DE3}\x{8DE8}\x{8DEA}' - . '\x{8DEB}\x{8DEF}\x{8DF3}\x{8DF5}\x{8DFC}\x{8DFF}\x{8E08}\x{8E09}\x{8E0A}' - . '\x{8E0F}\x{8E10}\x{8E1D}\x{8E1E}\x{8E1F}\x{8E2A}\x{8E30}\x{8E34}\x{8E35}' - . '\x{8E42}\x{8E44}\x{8E47}\x{8E48}\x{8E49}\x{8E4A}\x{8E4C}\x{8E50}\x{8E55}' - . '\x{8E59}\x{8E5F}\x{8E60}\x{8E63}\x{8E64}\x{8E72}\x{8E74}\x{8E76}\x{8E7C}' - . '\x{8E81}\x{8E84}\x{8E85}\x{8E87}\x{8E8A}\x{8E8B}\x{8E8D}\x{8E91}\x{8E93}' - . '\x{8E94}\x{8E99}\x{8EA1}\x{8EAA}\x{8EAB}\x{8EAC}\x{8EAF}\x{8EB0}\x{8EB1}' - . '\x{8EBE}\x{8EC5}\x{8EC6}\x{8EC8}\x{8ECA}\x{8ECB}\x{8ECC}\x{8ECD}\x{8ED2}' - . '\x{8EDB}\x{8EDF}\x{8EE2}\x{8EE3}\x{8EEB}\x{8EF8}\x{8EFB}\x{8EFC}\x{8EFD}' - . '\x{8EFE}\x{8F03}\x{8F05}\x{8F09}\x{8F0A}\x{8F0C}\x{8F12}\x{8F13}\x{8F14}' - . '\x{8F15}\x{8F19}\x{8F1B}\x{8F1C}\x{8F1D}\x{8F1F}\x{8F26}\x{8F29}\x{8F2A}' - . '\x{8F2F}\x{8F33}\x{8F38}\x{8F39}\x{8F3B}\x{8F3E}\x{8F3F}\x{8F42}\x{8F44}' - . '\x{8F45}\x{8F46}\x{8F49}\x{8F4C}\x{8F4D}\x{8F4E}\x{8F57}\x{8F5C}\x{8F5F}' - . '\x{8F61}\x{8F62}\x{8F63}\x{8F64}\x{8F9B}\x{8F9C}\x{8F9E}\x{8F9F}\x{8FA3}' - . '\x{8FA7}\x{8FA8}\x{8FAD}\x{8FAE}\x{8FAF}\x{8FB0}\x{8FB1}\x{8FB2}\x{8FB7}' - . '\x{8FBA}\x{8FBB}\x{8FBC}\x{8FBF}\x{8FC2}\x{8FC4}\x{8FC5}\x{8FCE}\x{8FD1}' - . '\x{8FD4}\x{8FDA}\x{8FE2}\x{8FE5}\x{8FE6}\x{8FE9}\x{8FEA}\x{8FEB}\x{8FED}' - . '\x{8FEF}\x{8FF0}\x{8FF4}\x{8FF7}\x{8FF8}\x{8FF9}\x{8FFA}\x{8FFD}\x{9000}' - . '\x{9001}\x{9003}\x{9005}\x{9006}\x{900B}\x{900D}\x{900E}\x{900F}\x{9010}' - . '\x{9011}\x{9013}\x{9014}\x{9015}\x{9016}\x{9017}\x{9019}\x{901A}\x{901D}' - . '\x{901E}\x{901F}\x{9020}\x{9021}\x{9022}\x{9023}\x{9027}\x{902E}\x{9031}' - . '\x{9032}\x{9035}\x{9036}\x{9038}\x{9039}\x{903C}\x{903E}\x{9041}\x{9042}' - . '\x{9045}\x{9047}\x{9049}\x{904A}\x{904B}\x{904D}\x{904E}\x{904F}\x{9050}' - . '\x{9051}\x{9052}\x{9053}\x{9054}\x{9055}\x{9056}\x{9058}\x{9059}\x{905C}' - . '\x{905E}\x{9060}\x{9061}\x{9063}\x{9065}\x{9068}\x{9069}\x{906D}\x{906E}' - . '\x{906F}\x{9072}\x{9075}\x{9076}\x{9077}\x{9078}\x{907A}\x{907C}\x{907D}' - . '\x{907F}\x{9080}\x{9081}\x{9082}\x{9083}\x{9084}\x{9087}\x{9089}\x{908A}' - . '\x{908F}\x{9091}\x{90A3}\x{90A6}\x{90A8}\x{90AA}\x{90AF}\x{90B1}\x{90B5}' - . '\x{90B8}\x{90C1}\x{90CA}\x{90CE}\x{90DB}\x{90E1}\x{90E2}\x{90E4}\x{90E8}' - . '\x{90ED}\x{90F5}\x{90F7}\x{90FD}\x{9102}\x{9112}\x{9119}\x{912D}\x{9130}' - . '\x{9132}\x{9149}\x{914A}\x{914B}\x{914C}\x{914D}\x{914E}\x{9152}\x{9154}' - . '\x{9156}\x{9158}\x{9162}\x{9163}\x{9165}\x{9169}\x{916A}\x{916C}\x{9172}' - . '\x{9173}\x{9175}\x{9177}\x{9178}\x{9182}\x{9187}\x{9189}\x{918B}\x{918D}' - . '\x{9190}\x{9192}\x{9197}\x{919C}\x{91A2}\x{91A4}\x{91AA}\x{91AB}\x{91AF}' - . '\x{91B4}\x{91B5}\x{91B8}\x{91BA}\x{91C0}\x{91C1}\x{91C6}\x{91C7}\x{91C8}' - . '\x{91C9}\x{91CB}\x{91CC}\x{91CD}\x{91CE}\x{91CF}\x{91D0}\x{91D1}\x{91D6}' - . '\x{91D8}\x{91DB}\x{91DC}\x{91DD}\x{91DF}\x{91E1}\x{91E3}\x{91E6}\x{91E7}' - . '\x{91F5}\x{91F6}\x{91FC}\x{91FF}\x{920D}\x{920E}\x{9211}\x{9214}\x{9215}' - . '\x{921E}\x{9229}\x{922C}\x{9234}\x{9237}\x{923F}\x{9244}\x{9245}\x{9248}' - . '\x{9249}\x{924B}\x{9250}\x{9257}\x{925A}\x{925B}\x{925E}\x{9262}\x{9264}' - . '\x{9266}\x{9271}\x{927E}\x{9280}\x{9283}\x{9285}\x{9291}\x{9293}\x{9295}' - . '\x{9296}\x{9298}\x{929A}\x{929B}\x{929C}\x{92AD}\x{92B7}\x{92B9}\x{92CF}' - . '\x{92D2}\x{92E4}\x{92E9}\x{92EA}\x{92ED}\x{92F2}\x{92F3}\x{92F8}\x{92FA}' - . '\x{92FC}\x{9306}\x{930F}\x{9310}\x{9318}\x{9319}\x{931A}\x{9320}\x{9322}' - . '\x{9323}\x{9326}\x{9328}\x{932B}\x{932C}\x{932E}\x{932F}\x{9332}\x{9335}' - . '\x{933A}\x{933B}\x{9344}\x{934B}\x{934D}\x{9354}\x{9356}\x{935B}\x{935C}' - . '\x{9360}\x{936C}\x{936E}\x{9375}\x{937C}\x{937E}\x{938C}\x{9394}\x{9396}' - . '\x{9397}\x{939A}\x{93A7}\x{93AC}\x{93AD}\x{93AE}\x{93B0}\x{93B9}\x{93C3}' - . '\x{93C8}\x{93D0}\x{93D1}\x{93D6}\x{93D7}\x{93D8}\x{93DD}\x{93E1}\x{93E4}' - . '\x{93E5}\x{93E8}\x{9403}\x{9407}\x{9410}\x{9413}\x{9414}\x{9418}\x{9419}' - . '\x{941A}\x{9421}\x{942B}\x{9435}\x{9436}\x{9438}\x{943A}\x{9441}\x{9444}' - . '\x{9451}\x{9452}\x{9453}\x{945A}\x{945B}\x{945E}\x{9460}\x{9462}\x{946A}' - . '\x{9470}\x{9475}\x{9477}\x{947C}\x{947D}\x{947E}\x{947F}\x{9481}\x{9577}' - . '\x{9580}\x{9582}\x{9583}\x{9587}\x{9589}\x{958A}\x{958B}\x{958F}\x{9591}' - . '\x{9593}\x{9594}\x{9596}\x{9598}\x{9599}\x{95A0}\x{95A2}\x{95A3}\x{95A4}' - . '\x{95A5}\x{95A7}\x{95A8}\x{95AD}\x{95B2}\x{95B9}\x{95BB}\x{95BC}\x{95BE}' - . '\x{95C3}\x{95C7}\x{95CA}\x{95CC}\x{95CD}\x{95D4}\x{95D5}\x{95D6}\x{95D8}' - . '\x{95DC}\x{95E1}\x{95E2}\x{95E5}\x{961C}\x{9621}\x{9628}\x{962A}\x{962E}' - . '\x{962F}\x{9632}\x{963B}\x{963F}\x{9640}\x{9642}\x{9644}\x{964B}\x{964C}' - . '\x{964D}\x{964F}\x{9650}\x{965B}\x{965C}\x{965D}\x{965E}\x{965F}\x{9662}' - . '\x{9663}\x{9664}\x{9665}\x{9666}\x{966A}\x{966C}\x{9670}\x{9672}\x{9673}' - . '\x{9675}\x{9676}\x{9677}\x{9678}\x{967A}\x{967D}\x{9685}\x{9686}\x{9688}' - . '\x{968A}\x{968B}\x{968D}\x{968E}\x{968F}\x{9694}\x{9695}\x{9697}\x{9698}' - . '\x{9699}\x{969B}\x{969C}\x{96A0}\x{96A3}\x{96A7}\x{96A8}\x{96AA}\x{96B0}' - . '\x{96B1}\x{96B2}\x{96B4}\x{96B6}\x{96B7}\x{96B8}\x{96B9}\x{96BB}\x{96BC}' - . '\x{96C0}\x{96C1}\x{96C4}\x{96C5}\x{96C6}\x{96C7}\x{96C9}\x{96CB}\x{96CC}' - . '\x{96CD}\x{96CE}\x{96D1}\x{96D5}\x{96D6}\x{96D9}\x{96DB}\x{96DC}\x{96E2}' - . '\x{96E3}\x{96E8}\x{96EA}\x{96EB}\x{96F0}\x{96F2}\x{96F6}\x{96F7}\x{96F9}' - . '\x{96FB}\x{9700}\x{9704}\x{9706}\x{9707}\x{9708}\x{970A}\x{970D}\x{970E}' - . '\x{970F}\x{9711}\x{9713}\x{9716}\x{9719}\x{971C}\x{971E}\x{9724}\x{9727}' - . '\x{972A}\x{9730}\x{9732}\x{9738}\x{9739}\x{973D}\x{973E}\x{9742}\x{9744}' - . '\x{9746}\x{9748}\x{9749}\x{9752}\x{9756}\x{9759}\x{975C}\x{975E}\x{9760}' - . '\x{9761}\x{9762}\x{9764}\x{9766}\x{9768}\x{9769}\x{976B}\x{976D}\x{9771}' - . '\x{9774}\x{9779}\x{977A}\x{977C}\x{9781}\x{9784}\x{9785}\x{9786}\x{978B}' - . '\x{978D}\x{978F}\x{9790}\x{9798}\x{979C}\x{97A0}\x{97A3}\x{97A6}\x{97A8}' - . '\x{97AB}\x{97AD}\x{97B3}\x{97B4}\x{97C3}\x{97C6}\x{97C8}\x{97CB}\x{97D3}' - . '\x{97DC}\x{97ED}\x{97EE}\x{97F2}\x{97F3}\x{97F5}\x{97F6}\x{97FB}\x{97FF}' - . '\x{9801}\x{9802}\x{9803}\x{9805}\x{9806}\x{9808}\x{980C}\x{980F}\x{9810}' - . '\x{9811}\x{9812}\x{9813}\x{9817}\x{9818}\x{981A}\x{9821}\x{9824}\x{982C}' - . '\x{982D}\x{9834}\x{9837}\x{9838}\x{983B}\x{983C}\x{983D}\x{9846}\x{984B}' - . '\x{984C}\x{984D}\x{984E}\x{984F}\x{9854}\x{9855}\x{9858}\x{985B}\x{985E}' - . '\x{9867}\x{986B}\x{986F}\x{9870}\x{9871}\x{9873}\x{9874}\x{98A8}\x{98AA}' - . '\x{98AF}\x{98B1}\x{98B6}\x{98C3}\x{98C4}\x{98C6}\x{98DB}\x{98DC}\x{98DF}' - . '\x{98E2}\x{98E9}\x{98EB}\x{98ED}\x{98EE}\x{98EF}\x{98F2}\x{98F4}\x{98FC}' - . '\x{98FD}\x{98FE}\x{9903}\x{9905}\x{9909}\x{990A}\x{990C}\x{9910}\x{9912}' - . '\x{9913}\x{9914}\x{9918}\x{991D}\x{991E}\x{9920}\x{9921}\x{9924}\x{9928}' - . '\x{992C}\x{992E}\x{993D}\x{993E}\x{9942}\x{9945}\x{9949}\x{994B}\x{994C}' - . '\x{9950}\x{9951}\x{9952}\x{9955}\x{9957}\x{9996}\x{9997}\x{9998}\x{9999}' - . '\x{99A5}\x{99A8}\x{99AC}\x{99AD}\x{99AE}\x{99B3}\x{99B4}\x{99BC}\x{99C1}' - . '\x{99C4}\x{99C5}\x{99C6}\x{99C8}\x{99D0}\x{99D1}\x{99D2}\x{99D5}\x{99D8}' - . '\x{99DB}\x{99DD}\x{99DF}\x{99E2}\x{99ED}\x{99EE}\x{99F1}\x{99F2}\x{99F8}' - . '\x{99FB}\x{99FF}\x{9A01}\x{9A05}\x{9A0E}\x{9A0F}\x{9A12}\x{9A13}\x{9A19}' - . '\x{9A28}\x{9A2B}\x{9A30}\x{9A37}\x{9A3E}\x{9A40}\x{9A42}\x{9A43}\x{9A45}' - . '\x{9A4D}\x{9A55}\x{9A57}\x{9A5A}\x{9A5B}\x{9A5F}\x{9A62}\x{9A64}\x{9A65}' - . '\x{9A69}\x{9A6A}\x{9A6B}\x{9AA8}\x{9AAD}\x{9AB0}\x{9AB8}\x{9ABC}\x{9AC0}' - . '\x{9AC4}\x{9ACF}\x{9AD1}\x{9AD3}\x{9AD4}\x{9AD8}\x{9ADE}\x{9ADF}\x{9AE2}' - . '\x{9AE3}\x{9AE6}\x{9AEA}\x{9AEB}\x{9AED}\x{9AEE}\x{9AEF}\x{9AF1}\x{9AF4}' - . '\x{9AF7}\x{9AFB}\x{9B06}\x{9B18}\x{9B1A}\x{9B1F}\x{9B22}\x{9B23}\x{9B25}' - . '\x{9B27}\x{9B28}\x{9B29}\x{9B2A}\x{9B2E}\x{9B2F}\x{9B31}\x{9B32}\x{9B3B}' - . '\x{9B3C}\x{9B41}\x{9B42}\x{9B43}\x{9B44}\x{9B45}\x{9B4D}\x{9B4E}\x{9B4F}' - . '\x{9B51}\x{9B54}\x{9B58}\x{9B5A}\x{9B6F}\x{9B74}\x{9B83}\x{9B8E}\x{9B91}' - . '\x{9B92}\x{9B93}\x{9B96}\x{9B97}\x{9B9F}\x{9BA0}\x{9BA8}\x{9BAA}\x{9BAB}' - . '\x{9BAD}\x{9BAE}\x{9BB4}\x{9BB9}\x{9BC0}\x{9BC6}\x{9BC9}\x{9BCA}\x{9BCF}' - . '\x{9BD1}\x{9BD2}\x{9BD4}\x{9BD6}\x{9BDB}\x{9BE1}\x{9BE2}\x{9BE3}\x{9BE4}' - . '\x{9BE8}\x{9BF0}\x{9BF1}\x{9BF2}\x{9BF5}\x{9C04}\x{9C06}\x{9C08}\x{9C09}' - . '\x{9C0A}\x{9C0C}\x{9C0D}\x{9C10}\x{9C12}\x{9C13}\x{9C14}\x{9C15}\x{9C1B}' - . '\x{9C21}\x{9C24}\x{9C25}\x{9C2D}\x{9C2E}\x{9C2F}\x{9C30}\x{9C32}\x{9C39}' - . '\x{9C3A}\x{9C3B}\x{9C3E}\x{9C46}\x{9C47}\x{9C48}\x{9C52}\x{9C57}\x{9C5A}' - . '\x{9C60}\x{9C67}\x{9C76}\x{9C78}\x{9CE5}\x{9CE7}\x{9CE9}\x{9CEB}\x{9CEC}' - . '\x{9CF0}\x{9CF3}\x{9CF4}\x{9CF6}\x{9D03}\x{9D06}\x{9D07}\x{9D08}\x{9D09}' - . '\x{9D0E}\x{9D12}\x{9D15}\x{9D1B}\x{9D1F}\x{9D23}\x{9D26}\x{9D28}\x{9D2A}' - . '\x{9D2B}\x{9D2C}\x{9D3B}\x{9D3E}\x{9D3F}\x{9D41}\x{9D44}\x{9D46}\x{9D48}' - . '\x{9D50}\x{9D51}\x{9D59}\x{9D5C}\x{9D5D}\x{9D5E}\x{9D60}\x{9D61}\x{9D64}' - . '\x{9D6C}\x{9D6F}\x{9D72}\x{9D7A}\x{9D87}\x{9D89}\x{9D8F}\x{9D9A}\x{9DA4}' - . '\x{9DA9}\x{9DAB}\x{9DAF}\x{9DB2}\x{9DB4}\x{9DB8}\x{9DBA}\x{9DBB}\x{9DC1}' - . '\x{9DC2}\x{9DC4}\x{9DC6}\x{9DCF}\x{9DD3}\x{9DD9}\x{9DE6}\x{9DED}\x{9DEF}' - . '\x{9DF2}\x{9DF8}\x{9DF9}\x{9DFA}\x{9DFD}\x{9E1A}\x{9E1B}\x{9E1E}\x{9E75}' - . '\x{9E78}\x{9E79}\x{9E7D}\x{9E7F}\x{9E81}\x{9E88}\x{9E8B}\x{9E8C}\x{9E91}' - . '\x{9E92}\x{9E93}\x{9E95}\x{9E97}\x{9E9D}\x{9E9F}\x{9EA5}\x{9EA6}\x{9EA9}' - . '\x{9EAA}\x{9EAD}\x{9EB8}\x{9EB9}\x{9EBA}\x{9EBB}\x{9EBC}\x{9EBE}\x{9EBF}' - . '\x{9EC4}\x{9ECC}\x{9ECD}\x{9ECE}\x{9ECF}\x{9ED0}\x{9ED2}\x{9ED4}\x{9ED8}' - . '\x{9ED9}\x{9EDB}\x{9EDC}\x{9EDD}\x{9EDE}\x{9EE0}\x{9EE5}\x{9EE8}\x{9EEF}' - . '\x{9EF4}\x{9EF6}\x{9EF7}\x{9EF9}\x{9EFB}\x{9EFC}\x{9EFD}\x{9F07}\x{9F08}' - . '\x{9F0E}\x{9F13}\x{9F15}\x{9F20}\x{9F21}\x{9F2C}\x{9F3B}\x{9F3E}\x{9F4A}' - . '\x{9F4B}\x{9F4E}\x{9F4F}\x{9F52}\x{9F54}\x{9F5F}\x{9F60}\x{9F61}\x{9F62}' - . '\x{9F63}\x{9F66}\x{9F67}\x{9F6A}\x{9F6C}\x{9F72}\x{9F76}\x{9F77}\x{9F8D}' - . '\x{9F95}\x{9F9C}\x{9F9D}\x{9FA0}]{1,15}$/iu', -]; diff --git a/lib/laminas/laminas-validator/src/Iban.php b/lib/laminas/laminas-validator/src/Iban.php deleted file mode 100644 index 65f23054f..000000000 --- a/lib/laminas/laminas-validator/src/Iban.php +++ /dev/null @@ -1,364 +0,0 @@ - - */ - protected $messageTemplates = [ - self::NOTSUPPORTED => 'Unknown country within the IBAN', - self::SEPANOTSUPPORTED => 'Countries outside the Single Euro Payments Area (SEPA) are not supported', - self::FALSEFORMAT => 'The input has a false IBAN format', - self::CHECKFAILED => 'The input has failed the IBAN check', - ]; - - /** - * Optional country code by ISO 3166-1 - * - * @var string|null - */ - protected $countryCode; - - /** - * Optionally allow IBAN codes from non-SEPA countries. Defaults to true - * - * @var bool - */ - protected $allowNonSepa = true; - - /** - * The SEPA country codes - * - * @var string[] ISO 3166-1 codes - */ - protected static $sepaCountries = [ - 'AT', - 'BE', - 'BG', - 'CY', - 'CZ', - 'DK', - 'FO', - 'GL', - 'EE', - 'FI', - 'FR', - 'DE', - 'GI', - 'GR', - 'HU', - 'IS', - 'IE', - 'IT', - 'LV', - 'LI', - 'LT', - 'LU', - 'MT', - 'MC', - 'NL', - 'NO', - 'PL', - 'PT', - 'RO', - 'SK', - 'SI', - 'ES', - 'SE', - 'CH', - 'GB', - 'SM', - 'HR', - ]; - - /** - * IBAN regexes by country code - * - * @var array - */ - protected static $ibanRegex = [ - 'AD' => 'AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}', - 'AE' => 'AE[0-9]{2}[0-9]{3}[0-9]{16}', - 'AL' => 'AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}', - 'AT' => 'AT[0-9]{2}[0-9]{5}[0-9]{11}', - 'AZ' => 'AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}', - 'BA' => 'BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}', - 'BE' => 'BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}', - 'BG' => 'BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}', - 'BH' => 'BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}', - 'BR' => 'BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]', - 'BY' => 'BY[0-9]{2}[A-Z0-9]{4}[0-9]{4}[A-Z0-9]{16}', - 'CH' => 'CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}', - 'CR' => 'CR[0-9]{2}[0-9]{3}[0-9]{14}', - 'CY' => 'CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}', - 'CZ' => 'CZ[0-9]{2}[0-9]{20}', - 'DE' => 'DE[0-9]{2}[0-9]{8}[0-9]{10}', - 'DO' => 'DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}', - 'DK' => 'DK[0-9]{2}[0-9]{14}', - 'EE' => 'EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}', - 'ES' => 'ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}', - 'FI' => 'FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}', - 'FO' => 'FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}', - 'FR' => 'FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}', - 'GB' => 'GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}', - 'GE' => 'GE[0-9]{2}[A-Z]{2}[0-9]{16}', - 'GI' => 'GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}', - 'GL' => 'GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}', - 'GR' => 'GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}', - 'GT' => 'GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}', - 'HR' => 'HR[0-9]{2}[0-9]{7}[0-9]{10}', - 'HU' => 'HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}', - 'IE' => 'IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}', - 'IL' => 'IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}', - 'IS' => 'IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}', - 'IT' => 'IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}', - 'KW' => 'KW[0-9]{2}[A-Z]{4}[0-9]{22}', - 'KZ' => 'KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}', - 'LB' => 'LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}', - 'LI' => 'LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}', - 'LT' => 'LT[0-9]{2}[0-9]{5}[0-9]{11}', - 'LU' => 'LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}', - 'LV' => 'LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}', - 'MC' => 'MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}', - 'MD' => 'MD[0-9]{2}[A-Z0-9]{20}', - 'ME' => 'ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', - 'MK' => 'MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}', - 'MR' => 'MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}', - 'MT' => 'MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}', - 'MU' => 'MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}', - 'NL' => 'NL[0-9]{2}[A-Z]{4}[0-9]{10}', - 'NO' => 'NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}', - 'UA' => 'UA[0-9]{2}[0-9]{6}[0-9]{19}', - 'PK' => 'PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}', - 'PL' => 'PL[0-9]{2}[0-9]{8}[0-9]{16}', - 'PS' => 'PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}', - 'PT' => 'PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}', - 'RO' => 'RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}', - 'RS' => 'RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', - 'SA' => 'SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}', - 'SE' => 'SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}', - 'SI' => 'SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}', - 'SK' => 'SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}', - 'SM' => 'SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}', - 'TN' => 'TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', - 'TR' => 'TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}', - 'VG' => 'VG[0-9]{2}[A-Z]{4}[0-9]{16}', - ]; - - /** - * Sets validator options - * - * @param array|Traversable $options OPTIONAL - */ - public function __construct($options = []) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - if (array_key_exists('country_code', $options)) { - $this->setCountryCode($options['country_code']); - } - - if (array_key_exists('allow_non_sepa', $options)) { - $this->setAllowNonSepa($options['allow_non_sepa']); - } - - parent::__construct($options); - } - - /** - * Returns the optional country code by ISO 3166-1 - * - * @return string|null - */ - public function getCountryCode() - { - return $this->countryCode; - } - - /** - * Sets an optional country code by ISO 3166-1 - * - * @param string|null $countryCode - * @return $this provides a fluent interface - * @throws Exception\InvalidArgumentException - */ - public function setCountryCode($countryCode = null) - { - if ($countryCode !== null) { - $countryCode = (string) $countryCode; - - if (! isset(static::$ibanRegex[$countryCode])) { - throw new Exception\InvalidArgumentException( - "Country code '{$countryCode}' invalid by ISO 3166-1 or not supported" - ); - } - } - - $this->countryCode = $countryCode; - return $this; - } - - /** - * Returns the optional allow non-sepa countries setting - * - * @return bool - */ - public function allowNonSepa() - { - return $this->allowNonSepa; - } - - /** - * Sets the optional allow non-sepa countries setting - * - * @param bool $allowNonSepa - * @return $this provides a fluent interface - */ - public function setAllowNonSepa($allowNonSepa) - { - $this->allowNonSepa = (bool) $allowNonSepa; - return $this; - } - - /** - * Returns true if $value is a valid IBAN - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::FALSEFORMAT); - return false; - } - - $value = str_replace(' ', '', strtoupper($value)); - $this->setValue($value); - - $countryCode = $this->getCountryCode(); - if ($countryCode === null) { - $countryCode = substr($value, 0, 2); - } - - if (! array_key_exists($countryCode, static::$ibanRegex)) { - $this->setValue($countryCode); - $this->error(self::NOTSUPPORTED); - return false; - } - - if (! $this->allowNonSepa && ! in_array($countryCode, static::$sepaCountries)) { - $this->setValue($countryCode); - $this->error(self::SEPANOTSUPPORTED); - return false; - } - - if (! preg_match('/^' . static::$ibanRegex[$countryCode] . '$/', $value)) { - $this->error(self::FALSEFORMAT); - return false; - } - - $format = substr($value, 4) . substr($value, 0, 4); - $format = str_replace( - [ - 'A', - 'B', - 'C', - 'D', - 'E', - 'F', - 'G', - 'H', - 'I', - 'J', - 'K', - 'L', - 'M', - 'N', - 'O', - 'P', - 'Q', - 'R', - 'S', - 'T', - 'U', - 'V', - 'W', - 'X', - 'Y', - 'Z', - ], - [ - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - '21', - '22', - '23', - '24', - '25', - '26', - '27', - '28', - '29', - '30', - '31', - '32', - '33', - '34', - '35', - ], - $format - ); - - $temp = intval(substr($format, 0, 1)); - $len = strlen($format); - for ($x = 1; $x < $len; ++$x) { - $temp *= 10; - $temp += intval(substr($format, $x, 1)); - $temp %= 97; - } - - if ($temp !== 1) { - $this->error(self::CHECKFAILED); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Identical.php b/lib/laminas/laminas-validator/src/Identical.php deleted file mode 100644 index 4bf3c358c..000000000 --- a/lib/laminas/laminas-validator/src/Identical.php +++ /dev/null @@ -1,221 +0,0 @@ - 'The two given tokens do not match', - self::MISSING_TOKEN => 'No token was provided to match against', - ]; - - /** @var array */ - protected $messageVariables = [ - 'token' => 'tokenString', - ]; - - /** - * Original token against which to validate - * - * @var null|string - */ - protected $tokenString; - - /** @var null|string */ - protected $token; - - /** @var bool */ - protected $strict = true; - - /** @var bool */ - protected $literal = false; - - /** - * Sets validator options - * - * @param mixed $token - */ - public function __construct($token = null) - { - if ($token instanceof Traversable) { - $token = ArrayUtils::iteratorToArray($token); - } - - if (is_array($token) && array_key_exists('token', $token)) { - if (array_key_exists('strict', $token)) { - $this->setStrict($token['strict']); - } - - if (array_key_exists('literal', $token)) { - $this->setLiteral($token['literal']); - } - - $this->setToken($token['token']); - } elseif (null !== $token) { - $this->setToken($token); - } - - parent::__construct(is_array($token) ? $token : null); - } - - /** - * Retrieve token - * - * @return mixed - */ - public function getToken() - { - return $this->token; - } - - /** - * Set token against which to compare - * - * @param mixed $token - * @return $this - */ - public function setToken($token) - { - $this->tokenString = is_array($token) ? var_export($token, true) : (string) $token; - $this->token = $token; - return $this; - } - - /** - * Returns the strict parameter - * - * @return bool - */ - public function getStrict() - { - return $this->strict; - } - - /** - * Sets the strict parameter - * - * @param bool $strict - * @return $this - */ - public function setStrict($strict) - { - $this->strict = (bool) $strict; - return $this; - } - - /** - * Returns the literal parameter - * - * @return bool - */ - public function getLiteral() - { - return $this->literal; - } - - /** - * Sets the literal parameter - * - * @param bool $literal - * @return $this - */ - public function setLiteral($literal) - { - $this->literal = (bool) $literal; - return $this; - } - - /** - * Returns true if and only if a token has been set and the provided value - * matches that token. - * - * @param mixed $value - * @param null|array|ArrayAccess $context - * @throws Exception\InvalidArgumentException If context is not array or ArrayObject. - * @return bool - */ - public function isValid($value, $context = null) - { - $this->setValue($value); - - $token = $this->getToken(); - - if (! $this->getLiteral() && $context !== null) { - if (! is_array($context) && ! $context instanceof ArrayAccess) { - throw new Exception\InvalidArgumentException(sprintf( - 'Context passed to %s must be array, ArrayObject or null; received "%s"', - __METHOD__, - is_object($context) ? get_class($context) : gettype($context) - )); - } - - if (is_array($token)) { - while (is_array($token)) { - $key = key($token); - if (! isset($context[$key])) { - break; - } - $context = $context[$key]; - $token = $token[$key]; - } - } - - // if $token is an array it means the above loop didn't went all the way down to the leaf, - // so the $token structure doesn't match the $context structure - if ( - is_array($token) - || (! is_int($token) && ! is_string($token)) - || ! isset($context[$token]) - ) { - $token = $this->getToken(); - } else { - $token = $context[$token]; - } - } - - if ($token === null) { - $this->error(self::MISSING_TOKEN); - return false; - } - - $strict = $this->getStrict(); - if ( - ($strict && ($value !== $token)) - // phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator - || (! $strict && ($value != $token)) - ) { - $this->error(self::NOT_SAME); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/InArray.php b/lib/laminas/laminas-validator/src/InArray.php deleted file mode 100644 index e1289c4cc..000000000 --- a/lib/laminas/laminas-validator/src/InArray.php +++ /dev/null @@ -1,253 +0,0 @@ - */ - protected $messageTemplates = [ - self::NOT_IN_ARRAY => 'The input was not found in the haystack', - ]; - - /** - * Haystack of possible values - * - * @var array - */ - protected $haystack; - - /** - * Type of strict check to be used. Due to "foo" == 0 === TRUE with in_array when strict = false, - * an option has been added to prevent this. When $strict = 0/false, the most - * secure non-strict check is implemented. if $strict = -1, the default in_array non-strict - * behaviour is used - * - * @var int - */ - protected $strict = self::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY; - - /** - * Whether a recursive search should be done - * - * @var bool - */ - protected $recursive = false; - - /** - * Returns the haystack option - * - * @return mixed - * @throws Exception\RuntimeException If haystack option is not set. - */ - public function getHaystack() - { - if ($this->haystack === null) { - throw new Exception\RuntimeException('haystack option is mandatory'); - } - return $this->haystack; - } - - /** - * Sets the haystack option - * - * @param mixed $haystack - * @return $this Provides a fluent interface - */ - public function setHaystack(array $haystack) - { - $this->haystack = $haystack; - return $this; - } - - /** - * Returns the strict option - * - * @return bool|int - */ - public function getStrict() - { - // To keep BC with new strict modes - if ( - $this->strict === self::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY - || $this->strict === self::COMPARE_STRICT - ) { - return (bool) $this->strict; - } - return $this->strict; - } - - /** - * Sets the strict option mode - * InArray::COMPARE_STRICT - * InArray::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY - * InArray::COMPARE_NOT_STRICT - * - * @param int|bool $strict - * @return $this Provides a fluent interface - * @throws Exception\InvalidArgumentException - */ - public function setStrict($strict) - { - if (is_bool($strict)) { - $strict = $strict ? self::COMPARE_STRICT : self::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY; - } - - $checkTypes = [ - self::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY, // 0 - self::COMPARE_STRICT, // 1 - self::COMPARE_NOT_STRICT, // -1 - ]; - - // validate strict value - if (! in_array($strict, $checkTypes)) { - throw new Exception\InvalidArgumentException('Strict option must be one of the COMPARE_ constants'); - } - - $this->strict = $strict; - return $this; - } - - /** - * Returns the recursive option - * - * @return bool - */ - public function getRecursive() - { - return $this->recursive; - } - - /** - * Sets the recursive option - * - * @param bool $recursive - * @return $this Provides a fluent interface - */ - public function setRecursive($recursive) - { - $this->recursive = (bool) $recursive; - return $this; - } - - /** - * Returns true if and only if $value is contained in the haystack option. If the strict - * option is true, then the type of $value is also checked. - * - * @param mixed $value - * See {@link http://php.net/manual/function.in-array.php#104501} - * @return bool - */ - public function isValid($value) - { - // we create a copy of the haystack in case we need to modify it - $haystack = $this->getHaystack(); - - // if the input is a string or float, and vulnerability protection is on - // we type cast the input to a string - if ( - self::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY === $this->strict - && (is_int($value) || is_float($value)) - ) { - $value = (string) $value; - } - - $this->setValue($value); - - if ($this->getRecursive()) { - $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($haystack)); - foreach ($iterator as $element) { - if (self::COMPARE_STRICT === $this->strict) { - if ($element === $value) { - return true; - } - - continue; - } - - // add protection to prevent string to int vuln's - $el = $element; - if ( - self::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY === $this->strict - && is_string($value) && (is_int($el) || is_float($el)) - ) { - $el = (string) $el; - } - - // phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedEqualOperator - if ($el == $value) { - return true; - } - } - - $this->error(self::NOT_IN_ARRAY); - return false; - } - - /** - * If the check is not strict, then, to prevent "asdf" being converted to 0 - * and returning a false positive if 0 is in haystack, we type cast - * the haystack to strings. To prevent "56asdf" == 56 === TRUE we also - * type cast values like 56 to strings as well. - * - * This occurs only if the input is a string and a haystack member is an int - */ - if ( - self::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY === $this->strict - && is_string($value) - ) { - foreach ($haystack as &$h) { - if (is_int($h) || is_float($h)) { - $h = (string) $h; - } - } - - if (in_array($value, $haystack, (bool) $this->strict)) { - return true; - } - - $this->error(self::NOT_IN_ARRAY); - return false; - } - - if (in_array($value, $haystack, self::COMPARE_STRICT === $this->strict)) { - return true; - } - - if (self::COMPARE_NOT_STRICT === $this->strict) { - return true; - } - - $this->error(self::NOT_IN_ARRAY); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/Ip.php b/lib/laminas/laminas-validator/src/Ip.php deleted file mode 100644 index 969faa5ef..000000000 --- a/lib/laminas/laminas-validator/src/Ip.php +++ /dev/null @@ -1,193 +0,0 @@ - 'Invalid type given. String expected', - self::NOT_IP_ADDRESS => 'The input does not appear to be a valid IP address', - ]; - - /** - * Internal options - * - * @var array - */ - protected $options = [ - 'allowipv4' => true, // Enable IPv4 Validation - 'allowipv6' => true, // Enable IPv6 Validation - 'allowipvfuture' => false, // Enable IPvFuture Validation - 'allowliteral' => true, // Enable IPs in literal format (only IPv6 and IPvFuture) - ]; - - /** - * Sets the options for this validator - * - * @param array|Traversable $options - * @throws Exception\InvalidArgumentException If there is any kind of IP allowed or $options is not an array - * or Traversable. - * @return AbstractValidator - */ - public function setOptions($options = []) - { - parent::setOptions($options); - - if (! $this->options['allowipv4'] && ! $this->options['allowipv6'] && ! $this->options['allowipvfuture']) { - throw new Exception\InvalidArgumentException('Nothing to validate. Check your options'); - } - - return $this; - } - - /** - * Returns true if and only if $value is a valid IP address - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - - if ($this->options['allowipv4'] && $this->validateIPv4($value)) { - return true; - } else { - if ((bool) $this->options['allowliteral']) { - static $regex = '/^\[(.*)\]$/'; - if ((bool) preg_match($regex, $value, $matches)) { - $value = $matches[1]; - } - } - - if ( - ($this->options['allowipv6'] && $this->validateIPv6($value)) || - ($this->options['allowipvfuture'] && $this->validateIPvFuture($value)) - ) { - return true; - } - } - $this->error(self::NOT_IP_ADDRESS); - return false; - } - - /** - * Validates an IPv4 address - * - * @param string $value - * @return bool - */ - protected function validateIPv4($value) - { - if (preg_match('/^([01]{8}\.){3}[01]{8}\z/i', $value)) { - // binary format 00000000.00000000.00000000.00000000 - $value = bindec(substr($value, 0, 8)) . '.' . bindec(substr($value, 9, 8)) . '.' - . bindec(substr($value, 18, 8)) . '.' . bindec(substr($value, 27, 8)); - } elseif (preg_match('/^([0-9]{3}\.){3}[0-9]{3}\z/i', $value)) { - // octet format 777.777.777.777 - $value = (int) substr($value, 0, 3) . '.' . (int) substr($value, 4, 3) . '.' - . (int) substr($value, 8, 3) . '.' . (int) substr($value, 12, 3); - } elseif (preg_match('/^([0-9a-f]{2}\.){3}[0-9a-f]{2}\z/i', $value)) { - // hex format ff.ff.ff.ff - $value = hexdec(substr($value, 0, 2)) . '.' . hexdec(substr($value, 3, 2)) . '.' - . hexdec(substr($value, 6, 2)) . '.' . hexdec(substr($value, 9, 2)); - } - - $ip2long = ip2long($value); - if ($ip2long === false) { - return false; - } - - return $value === long2ip($ip2long); - } - - /** - * Validates an IPv6 address - * - * @param string $value Value to check against - * @return bool|int True when $value is a valid ipv6 address False otherwise - */ - protected function validateIPv6($value) - { - if (strlen($value) < 3) { - return $value === '::'; - } - - if (strpos($value, '.')) { - $lastcolon = strrpos($value, ':'); - if (! ($lastcolon && $this->validateIPv4(substr($value, $lastcolon + 1)))) { - return false; - } - - $value = substr($value, 0, $lastcolon) . ':0:0'; - } - - if (strpos($value, '::') === false) { - return preg_match('/\A(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}\z/i', $value); - } - - $colonCount = substr_count($value, ':'); - if ($colonCount < 8) { - return preg_match('/\A(?::|(?:[a-f0-9]{1,4}:)+):(?:(?:[a-f0-9]{1,4}:)*[a-f0-9]{1,4})?\z/i', $value); - } - - // special case with ending or starting double colon - if ($colonCount === 8) { - return preg_match('/\A(?:::)?(?:[a-f0-9]{1,4}:){6}[a-f0-9]{1,4}(?:::)?\z/i', $value); - } - - return false; - } - - /** - * Validates an IPvFuture address. - * - * IPvFuture is loosely defined in the Section 3.2.2 of RFC 3986 - * - * @param string $value Value to check against - * @return bool True when $value is a valid IPvFuture address - * False otherwise - */ - protected function validateIPvFuture($value) - { - /* - * ABNF: - * IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) - * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" - * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," - * / ";" / "=" - */ - static $regex = '/^v([[:xdigit:]]+)\.[[:alnum:]\-\._~!\$&\'\(\)\*\+,;=:]+$/'; - - $result = (bool) preg_match($regex, $value, $matches); - - /* - * "As such, implementations must not provide the version flag for the - * existing IPv4 and IPv6 literal address forms described below." - */ - return $result && $matches[1] !== '4' && $matches[1] !== '6'; - } -} diff --git a/lib/laminas/laminas-validator/src/IsCountable.php b/lib/laminas/laminas-validator/src/IsCountable.php deleted file mode 100644 index e62ad6556..000000000 --- a/lib/laminas/laminas-validator/src/IsCountable.php +++ /dev/null @@ -1,203 +0,0 @@ - 'The input must be an array or an instance of \\Countable', - self::NOT_EQUALS => "The input count must equal '%count%'", - self::GREATER_THAN => "The input count must be less than '%max%', inclusively", - self::LESS_THAN => "The input count must be greater than '%min%', inclusively", - ]; - - /** - * Additional variables available for validation failure messages - * - * @var array - */ - protected $messageVariables = [ - 'count' => ['options' => 'count'], - 'min' => ['options' => 'min'], - 'max' => ['options' => 'max'], - ]; - - /** - * Options for the between validator - * - * @var array - */ - protected $options = [ - 'count' => null, - 'min' => null, - 'max' => null, - ]; - - /** - * @param array|Traversable $options - * @return $this Provides fluid interface - */ - public function setOptions($options = []) - { - foreach (['count', 'min', 'max'] as $option) { - if (! is_array($options) || ! isset($options[$option])) { - continue; - } - - $method = sprintf('set%s', ucfirst($option)); - $this->$method($options[$option]); - unset($options[$option]); - } - - return parent::setOptions($options); - } - - /** - * Returns true if and only if $value is countable (and the count validates against optional values). - * - * @param iterable $value - * @return bool - */ - public function isValid($value) - { - if (! is_countable($value)) { - $this->error(self::NOT_COUNTABLE); - return false; - } - - $count = count($value); - - if (is_numeric($this->getCount())) { - if ($count !== $this->getCount()) { - $this->error(self::NOT_EQUALS); - return false; - } - - return true; - } - - if (is_numeric($this->getMax()) && $count > $this->getMax()) { - $this->error(self::GREATER_THAN); - return false; - } - - if (is_numeric($this->getMin()) && $count < $this->getMin()) { - $this->error(self::LESS_THAN); - return false; - } - - return true; - } - - /** - * Returns the count option - * - * @return mixed - */ - public function getCount() - { - return $this->options['count']; - } - - /** - * Returns the min option - * - * @return mixed - */ - public function getMin() - { - return $this->options['min']; - } - - /** - * Returns the max option - * - * @return mixed - */ - public function getMax() - { - return $this->options['max']; - } - - /** - * @param mixed $value - * @return void - * @throws Exception\InvalidArgumentException If either a min or max option - * was previously set. - */ - private function setCount($value) - { - if (isset($this->options['min']) || isset($this->options['max'])) { - throw new Exception\InvalidArgumentException( - 'Cannot set count; conflicts with either a min or max option previously set' - ); - } - $this->options['count'] = $value; - } - - /** - * @param mixed $value - * @return void - * @throws Exception\InvalidArgumentException If either a count or max option - * was previously set. - */ - private function setMin($value) - { - if (isset($this->options['count'])) { - throw new Exception\InvalidArgumentException( - 'Cannot set count; conflicts with either a count option previously set' - ); - } - $this->options['min'] = $value; - } - - /** - * @param mixed $value - * @return void - * @throws Exception\InvalidArgumentException If either a count or min option - * was previously set. - */ - private function setMax($value) - { - if (isset($this->options['count'])) { - throw new Exception\InvalidArgumentException( - 'Cannot set count; conflicts with either a count option previously set' - ); - } - $this->options['max'] = $value; - } -} diff --git a/lib/laminas/laminas-validator/src/IsInstanceOf.php b/lib/laminas/laminas-validator/src/IsInstanceOf.php deleted file mode 100644 index e6009afb3..000000000 --- a/lib/laminas/laminas-validator/src/IsInstanceOf.php +++ /dev/null @@ -1,103 +0,0 @@ - "The input is not an instance of '%className%'", - ]; - - /** - * Additional variables available for validation failure messages - * - * @var array - */ - protected $messageVariables = [ - 'className' => 'className', - ]; - - /** @var string */ - protected $className; - - /** - * Sets validator options - * - * @param array|Traversable $options - * @throws Exception\InvalidArgumentException - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = iterator_to_array($options); - } - - // If argument is not an array, consider first argument as class name - if (! is_array($options)) { - $options = func_get_args(); - - $tmpOptions = []; - $tmpOptions['className'] = array_shift($options); - - $options = $tmpOptions; - } - - if (! array_key_exists('className', $options)) { - throw new Exception\InvalidArgumentException('Missing option "className"'); - } - - parent::__construct($options); - } - - /** - * Get class name - * - * @return string - */ - public function getClassName() - { - return $this->className; - } - - /** - * Set class name - * - * @param string $className - * @return $this - */ - public function setClassName($className) - { - $this->className = $className; - return $this; - } - - /** - * Returns true if $value is instance of $this->className - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - if ($value instanceof $this->className) { - return true; - } - $this->error(self::NOT_INSTANCE_OF); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/Isbn.php b/lib/laminas/laminas-validator/src/Isbn.php deleted file mode 100644 index d5d11876b..000000000 --- a/lib/laminas/laminas-validator/src/Isbn.php +++ /dev/null @@ -1,189 +0,0 @@ - 'Invalid type given. String or integer expected', - self::NO_ISBN => 'The input is not a valid ISBN number', - ]; - - /** @var array */ - protected $options = [ - 'type' => self::AUTO, // Allowed type - 'separator' => '', // Separator character - ]; - - /** - * Detect input format. - * - * @return null|string - */ - protected function detectFormat() - { - // prepare separator and pattern list - $sep = quotemeta($this->getSeparator()); - $patterns = []; - $lengths = []; - $type = $this->getType(); - - // check for ISBN-10 - if ($type === self::ISBN10 || $type === self::AUTO) { - if (empty($sep)) { - $pattern = '/^[0-9]{9}[0-9X]{1}$/'; - $length = 10; - } else { - $pattern = "/^[0-9]{1,7}[{$sep}]{1}[0-9]{1,7}[{$sep}]{1}[0-9]{1,7}[{$sep}]{1}[0-9X]{1}$/"; - $length = 13; - } - - $patterns[$pattern] = self::ISBN10; - $lengths[$pattern] = $length; - } - - // check for ISBN-13 - if ($type === self::ISBN13 || $type === self::AUTO) { - if (empty($sep)) { - $pattern = '/^[0-9]{13}$/'; - $length = 13; - } else { - // @codingStandardsIgnoreStart - $pattern = "/^[0-9]{1,9}[{$sep}]{1}[0-9]{1,5}[{$sep}]{1}[0-9]{1,9}[{$sep}]{1}[0-9]{1,9}[{$sep}]{1}[0-9]{1}$/"; - // @codingStandardsIgnoreEnd - $length = 17; - } - - $patterns[$pattern] = self::ISBN13; - $lengths[$pattern] = $length; - } - - // check pattern list - foreach ($patterns as $pattern => $type) { - if ((strlen($this->getValue()) === $lengths[$pattern]) && preg_match($pattern, $this->getValue())) { - return $type; - } - } - - return null; - } - - /** - * Returns true if and only if $value is a valid ISBN. - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value) && ! is_int($value)) { - $this->error(self::INVALID); - return false; - } - - $value = (string) $value; - $this->setValue($value); - - switch ($this->detectFormat()) { - case self::ISBN10: - $isbn = new Isbn\Isbn10(); - break; - - case self::ISBN13: - $isbn = new Isbn\Isbn13(); - break; - - default: - $this->error(self::NO_ISBN); - return false; - } - - $value = str_replace($this->getSeparator(), '', $value); - $checksum = $isbn->getChecksum($value); - - // validate - if (substr($this->getValue(), -1) !== (string) $checksum) { - $this->error(self::NO_ISBN); - return false; - } - return true; - } - - /** - * Set separator characters. - * - * It is allowed only empty string, hyphen and space. - * - * @param string $separator - * @throws Exception\InvalidArgumentException When $separator is not valid. - * @return $this Provides a fluent interface - */ - public function setSeparator($separator) - { - // check separator - if (! in_array($separator, ['-', ' ', ''])) { - throw new Exception\InvalidArgumentException('Invalid ISBN separator.'); - } - - $this->options['separator'] = $separator; - return $this; - } - - /** - * Get separator characters. - * - * @return string - */ - public function getSeparator() - { - return $this->options['separator']; - } - - /** - * Set allowed ISBN type. - * - * @param string $type - * @throws Exception\InvalidArgumentException When $type is not valid. - * @return $this Provides a fluent interface - */ - public function setType($type) - { - // check type - if (! in_array($type, [self::AUTO, self::ISBN10, self::ISBN13])) { - throw new Exception\InvalidArgumentException('Invalid ISBN type'); - } - - $this->options['type'] = $type; - return $this; - } - - /** - * Get allowed ISBN type. - * - * @return string - */ - public function getType() - { - return $this->options['type']; - } -} diff --git a/lib/laminas/laminas-validator/src/Isbn/Isbn10.php b/lib/laminas/laminas-validator/src/Isbn/Isbn10.php deleted file mode 100755 index 4bcc6570d..000000000 --- a/lib/laminas/laminas-validator/src/Isbn/Isbn10.php +++ /dev/null @@ -1,54 +0,0 @@ -sum($value); - return $this->checksum($sum); - } - - /** - * Calculate the value sum. - * - * @param string $value - * @return int - */ - private function sum($value) - { - $sum = 0; - - for ($i = 0; $i < 9; $i++) { - $sum += (10 - $i) * (int) $value[$i]; - } - - return $sum; - } - - /** - * Calculate the checksum for the value's sum. - * - * @param int $sum - * @return int|string - */ - private function checksum($sum) - { - $checksum = 11 - ($sum % 11); - - if ($checksum === 11) { - return '0'; - } - - if ($checksum === 10) { - return 'X'; - } - - return $checksum; - } -} diff --git a/lib/laminas/laminas-validator/src/Isbn/Isbn13.php b/lib/laminas/laminas-validator/src/Isbn/Isbn13.php deleted file mode 100755 index c5aaf494e..000000000 --- a/lib/laminas/laminas-validator/src/Isbn/Isbn13.php +++ /dev/null @@ -1,55 +0,0 @@ -sum($value); - return $this->checksum($sum); - } - - /** - * Calculate the value sum. - * - * @param string $value - * @return int - */ - private function sum($value) - { - $sum = 0; - - for ($i = 0; $i < 12; $i++) { - if ($i % 2 === 0) { - $sum += (int) $value[$i]; - continue; - } - - $sum += 3 * (int) $value[$i]; - } - - return $sum; - } - - /** - * Calculate the checksum for the value's sum. - * - * @param int $sum - * @return int|string - */ - private function checksum($sum) - { - $checksum = 10 - ($sum % 10); - - if ($checksum === 10) { - return '0'; - } - - return $checksum; - } -} diff --git a/lib/laminas/laminas-validator/src/LessThan.php b/lib/laminas/laminas-validator/src/LessThan.php deleted file mode 100644 index c2a6fccc9..000000000 --- a/lib/laminas/laminas-validator/src/LessThan.php +++ /dev/null @@ -1,159 +0,0 @@ - "The input is not less than '%max%'", - self::NOT_LESS_INCLUSIVE => "The input is not less or equal than '%max%'", - ]; - - /** - * Additional variables available for validation failure messages - * - * @var array - */ - protected $messageVariables = [ - 'max' => 'max', - ]; - - /** - * Maximum value - * - * @var mixed - */ - protected $max; - - /** - * Whether to do inclusive comparisons, allowing equivalence to max - * - * If false, then strict comparisons are done, and the value may equal - * the max option - * - * @var bool - */ - protected $inclusive; - - /** - * Sets validator options - * - * @param array|Traversable $options - * @throws Exception\InvalidArgumentException - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - if (! is_array($options)) { - $options = func_get_args(); - $temp['max'] = array_shift($options); - - if (! empty($options)) { - $temp['inclusive'] = array_shift($options); - } - - $options = $temp; - } - - if (! array_key_exists('max', $options)) { - throw new Exception\InvalidArgumentException("Missing option 'max'"); - } - - if (! array_key_exists('inclusive', $options)) { - $options['inclusive'] = false; - } - - $this->setMax($options['max']) - ->setInclusive($options['inclusive']); - - parent::__construct($options); - } - - /** - * Returns the max option - * - * @return mixed - */ - public function getMax() - { - return $this->max; - } - - /** - * Sets the max option - * - * @param mixed $max - * @return $this Provides a fluent interface - */ - public function setMax($max) - { - $this->max = $max; - return $this; - } - - /** - * Returns the inclusive option - * - * @return bool - */ - public function getInclusive() - { - return $this->inclusive; - } - - /** - * Sets the inclusive option - * - * @param bool $inclusive - * @return $this Provides a fluent interface - */ - public function setInclusive($inclusive) - { - $this->inclusive = $inclusive; - return $this; - } - - /** - * Returns true if and only if $value is less than max option, inclusively - * when the inclusive option is true - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - $this->setValue($value); - - if ($this->inclusive) { - if ($value > $this->max) { - $this->error(self::NOT_LESS_INCLUSIVE); - return false; - } - } else { - if ($value >= $this->max) { - $this->error(self::NOT_LESS); - return false; - } - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Module.php b/lib/laminas/laminas-validator/src/Module.php deleted file mode 100644 index d95016ee6..000000000 --- a/lib/laminas/laminas-validator/src/Module.php +++ /dev/null @@ -1,43 +0,0 @@ - $provider->getDependencyConfig(), - ]; - } - - /** - * Register a specification for the ValidatorManager with the ServiceListener. - * - * @param ModuleManager $moduleManager - * @return void - */ - public function init($moduleManager) - { - $event = $moduleManager->getEvent(); - $container = $event->getParam('ServiceManager'); - $serviceListener = $container->get('ServiceListener'); - - $serviceListener->addServiceManager( - 'ValidatorManager', - 'validators', - ValidatorProviderInterface::class, - 'getValidatorConfig' - ); - } -} diff --git a/lib/laminas/laminas-validator/src/NotEmpty.php b/lib/laminas/laminas-validator/src/NotEmpty.php deleted file mode 100644 index b342974f7..000000000 --- a/lib/laminas/laminas-validator/src/NotEmpty.php +++ /dev/null @@ -1,306 +0,0 @@ - */ - protected $constants = [ - self::BOOLEAN => 'boolean', - self::INTEGER => 'integer', - self::FLOAT => 'float', - self::STRING => 'string', - self::ZERO => 'zero', - self::EMPTY_ARRAY => 'array', - self::NULL => 'null', - self::PHP => 'php', - self::SPACE => 'space', - self::OBJECT => 'object', - self::OBJECT_STRING => 'objectstring', - self::OBJECT_COUNT => 'objectcount', - self::ALL => 'all', - ]; - - /** - * Default value for types; value = 0b000111101001 - * - * @var array - */ - protected $defaultType = [ - self::OBJECT, - self::SPACE, - self::NULL, - self::EMPTY_ARRAY, - self::STRING, - self::BOOLEAN, - ]; - - /** @var array */ - protected $messageTemplates = [ - self::IS_EMPTY => "Value is required and can't be empty", - self::INVALID => 'Invalid type given. String, integer, float, boolean or array expected', - ]; - - /** - * Options for this validator - * - * @var array - */ - protected $options = []; - - /** - * Constructor - * - * @param array|Traversable|int $options OPTIONAL - */ - public function __construct($options = null) - { - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - if (! is_array($options)) { - $options = func_get_args(); - $temp = []; - if (! empty($options)) { - $temp['type'] = array_shift($options); - } - - $options = $temp; - } - - if (! isset($options['type'])) { - if (($type = $this->calculateTypeValue($options)) !== 0) { - $options['type'] = $type; - } else { - $options['type'] = $this->defaultType; - } - } - - parent::__construct($options); - } - - /** - * Returns the set types - * - * @return int - */ - public function getType() - { - return $this->options['type']; - } - - /** - * @return false|int|string - */ - public function getDefaultType() - { - return $this->calculateTypeValue($this->defaultType); - } - - /** - * @param array|int|string $type - * @return false|int|string - */ - protected function calculateTypeValue($type) - { - if (is_array($type)) { - $detected = 0; - foreach ($type as $value) { - if (is_int($value)) { - $detected |= $value; - } elseif (in_array($value, $this->constants, true)) { - $detected |= (int) array_search($value, $this->constants, true); - } - } - - $type = $detected; - } elseif (is_string($type) && in_array($type, $this->constants, true)) { - $type = array_search($type, $this->constants, true); - } - - return $type; - } - - /** - * Set the types - * - * @param int|int[] $type - * @throws Exception\InvalidArgumentException - * @return $this - */ - public function setType($type = null) - { - $type = $this->calculateTypeValue($type); - - if (! is_int($type) || ($type < 0) || ($type > self::ALL)) { - throw new Exception\InvalidArgumentException('Unknown type'); - } - - $this->options['type'] = $type; - - return $this; - } - - /** - * Returns true if and only if $value is not an empty value. - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - if ( - $value !== null - && ! is_string($value) - && ! is_int($value) - && ! is_float($value) - && ! is_bool($value) - && ! is_array($value) - && ! is_object($value) - ) { - $this->error(self::INVALID); - return false; - } - - $type = $this->getType(); - $this->setValue($value); - $object = false; - - // OBJECT_COUNT (countable object) - if ($type & self::OBJECT_COUNT) { - $object = true; - - if (is_object($value) && $value instanceof Countable && (count($value) === 0)) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // OBJECT_STRING (object's toString) - if ($type & self::OBJECT_STRING) { - $object = true; - - if ( - (is_object($value) && ! method_exists($value, '__toString')) - || (is_object($value) && method_exists($value, '__toString') && (string) $value === '') - ) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // OBJECT (object) - // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf - if ($type & self::OBJECT) { - // fall through, objects are always not empty - } elseif ($object === false) { - // object not allowed but object given -> return false - if (is_object($value)) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // SPACE (' ') - if ($type & self::SPACE) { - if (is_string($value) && (preg_match('/^\s+$/s', $value))) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // NULL (null) - if ($type & self::NULL) { - if ($value === null) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // EMPTY_ARRAY (array()) - if ($type & self::EMPTY_ARRAY) { - if ($value === []) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // ZERO ('0') - if ($type & self::ZERO) { - if ($value === '0') { - $this->error(self::IS_EMPTY); - return false; - } - } - - // STRING ('') - if ($type & self::STRING) { - if ($value === '') { - $this->error(self::IS_EMPTY); - return false; - } - } - - // FLOAT (0.0) - if ($type & self::FLOAT) { - if ($value === 0.0) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // INTEGER (0) - if ($type & self::INTEGER) { - if ($value === 0) { - $this->error(self::IS_EMPTY); - return false; - } - } - - // BOOLEAN (false) - if ($type & self::BOOLEAN) { - if ($value === false) { - $this->error(self::IS_EMPTY); - return false; - } - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Regex.php b/lib/laminas/laminas-validator/src/Regex.php deleted file mode 100644 index d022fe3e9..000000000 --- a/lib/laminas/laminas-validator/src/Regex.php +++ /dev/null @@ -1,137 +0,0 @@ - 'Invalid type given. String, integer or float expected', - self::NOT_MATCH => "The input does not match against pattern '%pattern%'", - self::ERROROUS => "There was an internal error while using the pattern '%pattern%'", - ]; - - /** @var array */ - protected $messageVariables = [ - 'pattern' => 'pattern', - ]; - - /** - * Regular expression pattern - * - * @var string - */ - protected $pattern; - - /** - * Sets validator options - * - * @param string|array|Traversable $pattern - * @throws Exception\InvalidArgumentException On missing 'pattern' parameter. - */ - public function __construct($pattern) - { - if (is_string($pattern)) { - $this->setPattern($pattern); - parent::__construct([]); - return; - } - - if ($pattern instanceof Traversable) { - $pattern = ArrayUtils::iteratorToArray($pattern); - } - - if (! is_array($pattern)) { - throw new Exception\InvalidArgumentException('Invalid options provided to constructor'); - } - - if (! array_key_exists('pattern', $pattern)) { - throw new Exception\InvalidArgumentException("Missing option 'pattern'"); - } - - $this->setPattern($pattern['pattern']); - unset($pattern['pattern']); - parent::__construct($pattern); - } - - /** - * Returns the pattern option - * - * @return string - */ - public function getPattern() - { - return $this->pattern; - } - - /** - * Sets the pattern option - * - * @param string $pattern - * @throws Exception\InvalidArgumentException If there is a fatal error in pattern matching. - * @return $this Provides a fluent interface - */ - public function setPattern($pattern) - { - ErrorHandler::start(); - $this->pattern = (string) $pattern; - $status = preg_match($this->pattern, 'Test'); - $error = ErrorHandler::stop(); - - if (false === $status) { - throw new Exception\InvalidArgumentException( - "Internal error parsing the pattern '{$this->pattern}'", - 0, - $error - ); - } - - return $this; - } - - /** - * Returns true if and only if $value matches against the pattern option - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value) && ! is_int($value) && ! is_float($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - - ErrorHandler::start(); - $status = preg_match($this->pattern, $value); - ErrorHandler::stop(); - if (false === $status) { - $this->error(self::ERROROUS); - return false; - } - - if (! $status) { - $this->error(self::NOT_MATCH); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Sitemap/Changefreq.php b/lib/laminas/laminas-validator/src/Sitemap/Changefreq.php deleted file mode 100644 index af1cac18e..000000000 --- a/lib/laminas/laminas-validator/src/Sitemap/Changefreq.php +++ /dev/null @@ -1,72 +0,0 @@ - value - * - * @link http://www.sitemaps.org/protocol.php Sitemaps XML format - */ -class Changefreq extends AbstractValidator -{ - /** - * Validation key for not valid - */ - public const NOT_VALID = 'sitemapChangefreqNotValid'; - public const INVALID = 'sitemapChangefreqInvalid'; - - /** - * Validation failure message template definitions - * - * @var array - */ - protected $messageTemplates = [ - self::NOT_VALID => 'The input is not a valid sitemap changefreq', - self::INVALID => 'Invalid type given. String expected', - ]; - - /** - * Valid change frequencies - * - * @var array - */ - protected $changeFreqs = [ - 'always', - 'hourly', - 'daily', - 'weekly', - 'monthly', - 'yearly', - 'never', - ]; - - /** - * Validates if a string is valid as a sitemap changefreq - * - * @link http://www.sitemaps.org/protocol.php#changefreqdef - * - * @param string $value value to validate - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - - if (! in_array($value, $this->changeFreqs, true)) { - $this->error(self::NOT_VALID); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Sitemap/Lastmod.php b/lib/laminas/laminas-validator/src/Sitemap/Lastmod.php deleted file mode 100644 index 2f6884e4c..000000000 --- a/lib/laminas/laminas-validator/src/Sitemap/Lastmod.php +++ /dev/null @@ -1,69 +0,0 @@ - value - * - * @link http://www.sitemaps.org/protocol.php Sitemaps XML format - */ -class Lastmod extends AbstractValidator -{ - // phpcs:disable Generic.Files.LineLength.TooLong - - /** - * Regular expression to use when validating - */ - public const LASTMOD_REGEX = '/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([0-1][0-9]|2[0-3])(:[0-5][0-9])(:[0-5][0-9])?(\\+|-)([0-1][0-9]|2[0-3]):[0-5][0-9])?$/'; - - // phpcs:enable - - /** - * Validation key for not valid - */ - public const NOT_VALID = 'sitemapLastmodNotValid'; - public const INVALID = 'sitemapLastmodInvalid'; - - /** - * Validation failure message template definitions - * - * @var array - */ - protected $messageTemplates = [ - self::NOT_VALID => 'The input is not a valid sitemap lastmod', - self::INVALID => 'Invalid type given. String expected', - ]; - - /** - * Validates if a string is valid as a sitemap lastmod - * - * @link http://www.sitemaps.org/protocol.php#lastmoddef - * - * @param string $value value to validate - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - ErrorHandler::start(); - $result = preg_match(self::LASTMOD_REGEX, $value); - ErrorHandler::stop(); - if ($result !== 1) { - $this->error(self::NOT_VALID); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Sitemap/Loc.php b/lib/laminas/laminas-validator/src/Sitemap/Loc.php deleted file mode 100644 index 447a92d4d..000000000 --- a/lib/laminas/laminas-validator/src/Sitemap/Loc.php +++ /dev/null @@ -1,58 +0,0 @@ - value - * - * @link http://www.sitemaps.org/protocol.php Sitemaps XML format - * @see Laminas\Uri\Uri - */ -class Loc extends AbstractValidator -{ - /** - * Validation key for not valid - */ - public const NOT_VALID = 'sitemapLocNotValid'; - public const INVALID = 'sitemapLocInvalid'; - - /** - * Validation failure message template definitions - * - * @var array - */ - protected $messageTemplates = [ - self::NOT_VALID => 'The input is not a valid sitemap location', - self::INVALID => 'Invalid type given. String expected', - ]; - - /** - * Validates if a string is valid as a sitemap location - * - * @link http://www.sitemaps.org/protocol.php#locdef - * - * @param string $value value to validate - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - $uri = Uri\UriFactory::factory($value); - if (! $uri->isValid()) { - $this->error(self::NOT_VALID); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Sitemap/Priority.php b/lib/laminas/laminas-validator/src/Sitemap/Priority.php deleted file mode 100644 index 7bf6c02b8..000000000 --- a/lib/laminas/laminas-validator/src/Sitemap/Priority.php +++ /dev/null @@ -1,56 +0,0 @@ - value - * - * @link http://www.sitemaps.org/protocol.php Sitemaps XML format - */ -class Priority extends AbstractValidator -{ - /** - * Validation key for not valid - */ - public const NOT_VALID = 'sitemapPriorityNotValid'; - public const INVALID = 'sitemapPriorityInvalid'; - - /** - * Validation failure message template definitions - * - * @var array - */ - protected $messageTemplates = [ - self::NOT_VALID => 'The input is not a valid sitemap priority', - self::INVALID => 'Invalid type given. Numeric string, integer or float expected', - ]; - - /** - * Validates if a string is valid as a sitemap priority - * - * @link http://www.sitemaps.org/protocol.php#prioritydef - * - * @param string $value value to validate - * @return bool - */ - public function isValid($value) - { - if (! is_numeric($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - $value = (float) $value; - if ($value < 0 || $value > 1) { - $this->error(self::NOT_VALID); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/StaticValidator.php b/lib/laminas/laminas-validator/src/StaticValidator.php deleted file mode 100644 index aba395d4a..000000000 --- a/lib/laminas/laminas-validator/src/StaticValidator.php +++ /dev/null @@ -1,71 +0,0 @@ -configure(['shared_by_default' => false]); - } else { - $plugins->setShareByDefault(false); - } - } - static::$plugins = $plugins; - } - - /** - * Get plugin manager for locating validators - * - * @return ValidatorPluginManager - */ - public static function getPluginManager() - { - if (! static::$plugins instanceof ValidatorPluginManager) { - $plugins = new ValidatorPluginManager(new ServiceManager()); - static::setPluginManager($plugins); - - return $plugins; - } - return static::$plugins; - } - - /** - * @param mixed $value - * @param class-string $classBaseName - * @param array $options OPTIONAL associative array of options to pass as - * the sole argument to the validator constructor. - * @return bool - * @throws Exception\InvalidArgumentException For an invalid $options argument. - */ - public static function execute($value, $classBaseName, array $options = []) - { - if ($options && array_values($options) === $options) { - throw new Exception\InvalidArgumentException( - 'Invalid options provided via $options argument; must be an associative array' - ); - } - - $plugins = static::getPluginManager(); - - $validator = $plugins->get($classBaseName, $options); - return $validator->isValid($value); - } -} diff --git a/lib/laminas/laminas-validator/src/Step.php b/lib/laminas/laminas-validator/src/Step.php deleted file mode 100644 index 1892f5209..000000000 --- a/lib/laminas/laminas-validator/src/Step.php +++ /dev/null @@ -1,176 +0,0 @@ - 'Invalid value given. Scalar expected', - self::NOT_STEP => 'The input is not a valid step', - ]; - - /** @var mixed */ - protected $baseValue = 0; - - /** @var mixed */ - protected $step = 1; - - /** - * Set default options for this instance - * - * @param array $options - */ - public function __construct($options = []) - { - if ($options instanceof Traversable) { - $options = iterator_to_array($options); - } elseif (! is_array($options)) { - $options = func_get_args(); - $temp['baseValue'] = array_shift($options); - if (! empty($options)) { - $temp['step'] = array_shift($options); - } - - $options = $temp; - } - - if (isset($options['baseValue'])) { - $this->setBaseValue($options['baseValue']); - } - if (isset($options['step'])) { - $this->setStep($options['step']); - } - - parent::__construct($options); - } - - /** - * Sets the base value from which the step should be computed - * - * @param mixed $baseValue - * @return $this - */ - public function setBaseValue($baseValue) - { - $this->baseValue = $baseValue; - return $this; - } - - /** - * Returns the base value from which the step should be computed - * - * @return string - */ - public function getBaseValue() - { - return $this->baseValue; - } - - /** - * Sets the step value - * - * @param mixed $step - * @return $this - */ - public function setStep($step) - { - $this->step = (float) $step; - return $this; - } - - /** - * Returns the step value - * - * @return string - */ - public function getStep() - { - return $this->step; - } - - /** - * Returns true if $value is a scalar and a valid step value - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - if (! is_numeric($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - - $substract = $this->sub($value, $this->baseValue); - - $fmod = $this->fmod($substract, $this->step); - - if ($fmod !== 0.0 && $fmod !== $this->step) { - $this->error(self::NOT_STEP); - return false; - } - - return true; - } - - /** - * replaces the internal fmod function which give wrong results on many cases - * - * @param int|float $x - * @param int|float $y - * @return float - */ - protected function fmod($x, $y) - { - if ($y === 0.0 || $y === 0) { - return 1.0; - } - - //find the maximum precision from both input params to give accurate results - $precision = $this->getPrecision($x) + $this->getPrecision($y); - - return round($x - $y * floor($x / $y), $precision); - } - - /** - * replaces the internal substraction operation which give wrong results on some cases - * - * @param float $x - * @param float $y - * @return float - */ - private function sub($x, $y) - { - $precision = $this->getPrecision($x) + $this->getPrecision($y); - return round($x - $y, $precision); - } - - /** - * @param float $float - * @return int - */ - private function getPrecision($float) - { - $segment = substr($float, strpos($float, '.') + 1); - return $segment ? strlen($segment) : 0; - } -} diff --git a/lib/laminas/laminas-validator/src/StringLength.php b/lib/laminas/laminas-validator/src/StringLength.php deleted file mode 100644 index 64edff34b..000000000 --- a/lib/laminas/laminas-validator/src/StringLength.php +++ /dev/null @@ -1,233 +0,0 @@ - */ - protected $messageTemplates = [ - self::INVALID => 'Invalid type given. String expected', - self::TOO_SHORT => 'The input is less than %min% characters long', - self::TOO_LONG => 'The input is more than %max% characters long', - ]; - - /** @var array> */ - protected $messageVariables = [ - 'min' => ['options' => 'min'], - 'max' => ['options' => 'max'], - 'length' => ['options' => 'length'], - ]; - - /** @var array */ - protected $options = [ - 'min' => 0, // Minimum length - 'max' => null, // Maximum length, null if there is no length limitation - 'encoding' => 'UTF-8', // Encoding to use - 'length' => 0, // Actual length - ]; - - /** @var null|StringWrapperInterface */ - protected $stringWrapper; - - /** - * Sets validator options - * - * @param int|array|Traversable $options - */ - public function __construct($options = []) - { - if (! is_array($options)) { - $options = func_get_args(); - $temp['min'] = array_shift($options); - if (! empty($options)) { - $temp['max'] = array_shift($options); - } - - if (! empty($options)) { - $temp['encoding'] = array_shift($options); - } - - $options = $temp; - } - - parent::__construct($options); - } - - /** - * Returns the min option - * - * @return int - */ - public function getMin() - { - return $this->options['min']; - } - - /** - * Sets the min option - * - * @param int $min - * @throws Exception\InvalidArgumentException - * @return $this Provides a fluent interface - */ - public function setMin($min) - { - if (null !== $this->getMax() && $min > $this->getMax()) { - throw new Exception\InvalidArgumentException( - "The minimum must be less than or equal to the maximum length, but {$min} > {$this->getMax()}" - ); - } - - $this->options['min'] = max(0, (int) $min); - return $this; - } - - /** - * Returns the max option - * - * @return int|null - */ - public function getMax() - { - return $this->options['max']; - } - - /** - * Sets the max option - * - * @param int|null $max - * @throws Exception\InvalidArgumentException - * @return $this Provides a fluent interface - */ - public function setMax($max) - { - if (null === $max) { - $this->options['max'] = null; - } elseif ($max < $this->getMin()) { - throw new Exception\InvalidArgumentException( - "The maximum must be greater than or equal to the minimum length, but {$max} < {$this->getMin()}" - ); - } else { - $this->options['max'] = (int) $max; - } - - return $this; - } - - /** - * Get the string wrapper to detect the string length - * - * @return StringWrapper - */ - public function getStringWrapper() - { - if (! $this->stringWrapper) { - $this->stringWrapper = StringUtils::getWrapper($this->getEncoding()); - } - return $this->stringWrapper; - } - - /** - * Set the string wrapper to detect the string length - * - * @return void - */ - public function setStringWrapper(StringWrapper $stringWrapper) - { - $stringWrapper->setEncoding($this->getEncoding()); - $this->stringWrapper = $stringWrapper; - } - - /** - * Returns the actual encoding - * - * @return string - */ - public function getEncoding() - { - return $this->options['encoding']; - } - - /** - * Sets a new encoding to use - * - * @param string $encoding - * @return $this - * @throws Exception\InvalidArgumentException - */ - public function setEncoding($encoding) - { - $this->stringWrapper = StringUtils::getWrapper($encoding); - $this->options['encoding'] = $encoding; - return $this; - } - - /** - * Returns the length option - * - * @return int - */ - private function getLength() - { - return $this->options['length']; - } - - /** - * Sets the length option - * - * @param int $length - * @return $this Provides a fluent interface - */ - private function setLength($length) - { - $this->options['length'] = (int) $length; - return $this; - } - - /** - * Returns true if and only if the string length of $value is at least the min option and - * no greater than the max option (when the max option is not null). - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $this->setValue($value); - - $this->setLength($this->getStringWrapper()->strlen($value)); - if ($this->getLength() < $this->getMin()) { - $this->error(self::TOO_SHORT); - } - - if (null !== $this->getMax() && $this->getMax() < $this->getLength()) { - $this->error(self::TOO_LONG); - } - - if ($this->getMessages()) { - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/Timezone.php b/lib/laminas/laminas-validator/src/Timezone.php deleted file mode 100644 index e262da225..000000000 --- a/lib/laminas/laminas-validator/src/Timezone.php +++ /dev/null @@ -1,173 +0,0 @@ - 'location', - self::ABBREVIATION => 'abbreviation', - ]; - - /** - * Default value for types; value = 3 - * - * @var array - */ - protected $defaultType = [ - self::LOCATION, - self::ABBREVIATION, - ]; - - /** @var array */ - protected $messageTemplates = [ - self::INVALID => 'Invalid timezone given.', - self::INVALID_TIMEZONE_LOCATION => 'Invalid timezone location given.', - self::INVALID_TIMEZONE_ABBREVIATION => 'Invalid timezone abbreviation given.', - ]; - - /** - * Options for this validator - * - * @var array - */ - protected $options = []; - - /** - * Constructor - * - * @param array|int $options OPTIONAL - */ - public function __construct($options = []) - { - $opts['type'] = $this->defaultType; - - if (is_array($options)) { - if (array_key_exists('type', $options)) { - $opts['type'] = $options['type']; - } - } elseif (! empty($options)) { - $opts['type'] = $options; - } - - // setType called by parent constructor then setOptions method - parent::__construct($opts); - } - - /** - * Set the types - * - * @param int|array $type - * @return void - * @throws Exception\InvalidArgumentException - */ - public function setType($type = null) - { - $type = $this->calculateTypeValue($type); - - if (! is_int($type) || ($type < 1) || ($type > self::ALL)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Unknown type "%s" provided', - is_string($type) || is_int($type) - ? $type - : (is_object($type) ? get_class($type) : gettype($type)) - )); - } - - $this->options['type'] = $type; - } - - /** - * Returns true if timezone location or timezone abbreviations is correct. - * - * @param mixed $value - * @return bool - */ - public function isValid($value) - { - if ($value !== null && ! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $type = $this->options['type']; - $this->setValue($value); - - switch (true) { - // Check in locations and abbreviations - case ($type & self::LOCATION) && ($type & self::ABBREVIATION): - $abbrs = DateTimeZone::listAbbreviations(); - $locations = DateTimeZone::listIdentifiers(); - - if (! array_key_exists($value, $abbrs) && ! in_array($value, $locations)) { - $this->error(self::INVALID); - return false; - } - break; - - // Check only in locations - case $type & self::LOCATION: - $locations = DateTimeZone::listIdentifiers(); - - if (! in_array($value, $locations)) { - $this->error(self::INVALID_TIMEZONE_LOCATION); - return false; - } - break; - - // Check only in abbreviations - case $type & self::ABBREVIATION: - $abbrs = DateTimeZone::listAbbreviations(); - - if (! array_key_exists($value, $abbrs)) { - $this->error(self::INVALID_TIMEZONE_ABBREVIATION); - return false; - } - break; - } - - return true; - } - - /** - * @param array|int|string $type - * @return float|int - */ - protected function calculateTypeValue($type) - { - $types = (array) $type; - $detected = 0; - - foreach ($types as $value) { - if (is_int($value)) { - $detected |= $value; - } elseif (false !== array_search($value, $this->constants)) { - $detected |= array_search($value, $this->constants); - } - } - - return $detected; - } -} diff --git a/lib/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php b/lib/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php deleted file mode 100644 index 9702abc8c..000000000 --- a/lib/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php +++ /dev/null @@ -1,62 +0,0 @@ - */ - protected $messageTemplates = [ - self::PASSWORD_BREACHED => 'The provided password was found in previous breaches, please create another password', - self::NOT_A_STRING => 'The provided password is not a string, please provide a correct password', - ]; - - private ClientInterface $httpClient; - - private RequestFactoryInterface $makeHttpRequest; - - public function __construct(ClientInterface $httpClient, RequestFactoryInterface $makeHttpRequest) - { - parent::__construct(); - - $this->httpClient = $httpClient; - $this->makeHttpRequest = $makeHttpRequest; - } - - /** - * @inheritDoc - */ - public function isValid($value): bool - { - if (! is_string($value)) { - $this->error(self::NOT_A_STRING); - return false; - } - - if ($this->isPwnedPassword($value)) { - $this->error(self::PASSWORD_BREACHED); - return false; - } - - return true; - } - - private function isPwnedPassword(string $password): bool - { - $sha1Hash = $this->hashPassword($password); - $rangeHash = $this->getRangeHash($sha1Hash); - $hashList = $this->retrieveHashList($rangeHash); - - return $this->hashInResponse($sha1Hash, $hashList); - } - - /** - * We use a SHA1 hashed password for checking it against - * the breached data set of HIBP. - */ - private function hashPassword(string $password): string - { - $hashedPassword = sha1($password); - - return strtoupper($hashedPassword); - } - - /** - * Creates a hash range that will be send to HIBP API - * applying K-Anonymity - * - * @see https://www.troyhunt.com/enhancing-pwned-passwords-privacy-by-exclusively-supporting-anonymity/ - */ - private function getRangeHash(string $passwordHash): string - { - return substr($passwordHash, self::HIBP_K_ANONYMITY_HASH_RANGE_BASE, self::HIBP_K_ANONYMITY_HASH_RANGE_LENGTH); - } - - /** - * Making a connection to the HIBP API to retrieve a - * list of hashes that all have the same range as we - * provided. - * - * @throws ClientExceptionInterface - */ - private function retrieveHashList(string $passwordRange): string - { - $request = $this->makeHttpRequest->createRequest( - 'GET', - self::HIBP_API_URI . '/range/' . $passwordRange - ); - - $response = $this->httpClient->sendRequest($request); - return (string) $response->getBody(); - } - - /** - * Checks if the password is in the response from HIBP - */ - private function hashInResponse(string $sha1Hash, string $resultStream): bool - { - $data = explode("\r\n", $resultStream); - $hashes = array_filter($data, static function ($value) use ($sha1Hash) { - [$hash] = explode(':', $value); - - return strcmp($hash, substr($sha1Hash, self::HIBP_K_ANONYMITY_HASH_RANGE_LENGTH)) === 0; - }); - - return $hashes !== []; - } -} diff --git a/lib/laminas/laminas-validator/src/Uri.php b/lib/laminas/laminas-validator/src/Uri.php deleted file mode 100644 index ed2d3612e..000000000 --- a/lib/laminas/laminas-validator/src/Uri.php +++ /dev/null @@ -1,185 +0,0 @@ - */ - protected $messageTemplates = [ - self::INVALID => 'Invalid type given. String expected', - self::NOT_URI => 'The input does not appear to be a valid Uri', - ]; - - /** @var UriHandler */ - protected $uriHandler; - - /** @var bool */ - protected $allowRelative = true; - - /** @var bool */ - protected $allowAbsolute = true; - - /** - * Sets default option values for this instance - * - * @param array|Traversable $options - */ - public function __construct($options = []) - { - if ($options instanceof Traversable) { - $options = iterator_to_array($options); - } elseif (! is_array($options)) { - $options = func_get_args(); - $temp['uriHandler'] = array_shift($options); - if (! empty($options)) { - $temp['allowRelative'] = array_shift($options); - } - if (! empty($options)) { - $temp['allowAbsolute'] = array_shift($options); - } - - $options = $temp; - } - - if (isset($options['uriHandler'])) { - $this->setUriHandler($options['uriHandler']); - } - if (isset($options['allowRelative'])) { - $this->setAllowRelative($options['allowRelative']); - } - if (isset($options['allowAbsolute'])) { - $this->setAllowAbsolute($options['allowAbsolute']); - } - - parent::__construct($options); - } - - /** - * @throws InvalidArgumentException - * @return UriHandler - */ - public function getUriHandler() - { - if (null === $this->uriHandler) { - // Lazy load the base Uri handler - $this->uriHandler = new UriHandler(); - } elseif (is_string($this->uriHandler) && class_exists($this->uriHandler)) { - // Instantiate string Uri handler that references a class - $this->uriHandler = new $this->uriHandler(); - } - return $this->uriHandler; - } - - /** - * @param UriHandler|string $uriHandler - * @throws InvalidArgumentException - * @return $this - */ - public function setUriHandler($uriHandler) - { - if (! is_a($uriHandler, UriHandler::class, true)) { - throw new InvalidArgumentException(sprintf( - 'Expecting a subclass name or instance of %s as $uriHandler', - UriHandler::class - )); - } - - $this->uriHandler = $uriHandler; - return $this; - } - - /** - * Returns the allowAbsolute option - * - * @return bool - */ - public function getAllowAbsolute() - { - return $this->allowAbsolute; - } - - /** - * Sets the allowAbsolute option - * - * @param bool $allowAbsolute - * @return $this - */ - public function setAllowAbsolute($allowAbsolute) - { - $this->allowAbsolute = (bool) $allowAbsolute; - return $this; - } - - /** - * Returns the allowRelative option - * - * @return bool - */ - public function getAllowRelative() - { - return $this->allowRelative; - } - - /** - * Sets the allowRelative option - * - * @param bool $allowRelative - * @return $this - */ - public function setAllowRelative($allowRelative) - { - $this->allowRelative = (bool) $allowRelative; - return $this; - } - - /** - * Returns true if and only if $value validates as a Uri - * - * @param string $value - * @return bool - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::INVALID); - return false; - } - - $uriHandler = $this->getUriHandler(); - try { - $uriHandler->parse($value); - if ($uriHandler->isValid()) { - // It will either be a valid absolute or relative URI - if ( - ($this->allowRelative && $this->allowAbsolute) - || ($this->allowAbsolute && $uriHandler->isAbsolute()) - || ($this->allowRelative && $uriHandler->isValidRelative()) - ) { - return true; - } - } - } catch (UriException $ex) { - // Error parsing URI, it must be invalid - } - - $this->error(self::NOT_URI); - return false; - } -} diff --git a/lib/laminas/laminas-validator/src/Uuid.php b/lib/laminas/laminas-validator/src/Uuid.php deleted file mode 100644 index 77ecdd8b3..000000000 --- a/lib/laminas/laminas-validator/src/Uuid.php +++ /dev/null @@ -1,58 +0,0 @@ - 'Invalid type given; string expected', - self::INVALID => 'Invalid UUID format', - ]; - - /** - * Returns true if and only if $value meets the validation requirements. - * - * If $value fails validation, then this method returns false, and - * getMessages() will return an array of messages that explain why the - * validation failed. - * - * @param mixed $value - * @return bool - * @throws Exception\RuntimeException If validation of $value is impossible. - */ - public function isValid($value) - { - if (! is_string($value)) { - $this->error(self::NOT_STRING); - return false; - } - - $this->setValue($value); - - if ( - empty($value) - || $value !== '00000000-0000-0000-0000-000000000000' - && ! preg_match(self::REGEX_UUID, $value) - ) { - $this->error(self::INVALID); - return false; - } - - return true; - } -} diff --git a/lib/laminas/laminas-validator/src/ValidatorChain.php b/lib/laminas/laminas-validator/src/ValidatorChain.php deleted file mode 100644 index 798c52f2b..000000000 --- a/lib/laminas/laminas-validator/src/ValidatorChain.php +++ /dev/null @@ -1,334 +0,0 @@ -|null */ - protected $plugins; - - /** - * Validator chain - * - * @var PriorityQueue - */ - protected $validators; - - /** - * Array of validation failure messages - * - * @var array - */ - protected $messages = []; - - /** - * Initialize validator chain - */ - public function __construct() - { - /** @psalm-suppress InvalidPropertyAssignmentValue */ - $this->validators = new PriorityQueue(); - } - - /** - * Return the count of attached validators - * - * @return int - */ - #[ReturnTypeWillChange] - public function count() - { - return count($this->validators); - } - - /** - * Get plugin manager instance - * - * @return ValidatorPluginManager - */ - public function getPluginManager() - { - if (! $this->plugins) { - $this->setPluginManager(new ValidatorPluginManager(new ServiceManager())); - } - return $this->plugins; - } - - /** - * Set plugin manager instance - * - * @param ValidatorPluginManager $plugins Plugin manager - * @psalm-assert ValidatorPluginManager $this->plugins - * @return $this - */ - public function setPluginManager(ValidatorPluginManager $plugins) - { - $this->plugins = $plugins; - return $this; - } - - /** - * Retrieve a validator by name - * - * @param string|class-string $name Name of validator to return - * @param null|array $options Options to pass to validator constructor - * (if not already instantiated) - * @return ValidatorInterface - * @template T of ValidatorInterface - * @psalm-param string|class-string $name - * @psalm-return ValidatorInterface - */ - public function plugin($name, ?array $options = null) - { - $plugins = $this->getPluginManager(); - return $plugins->get($name, $options); - } - - /** - * Attach a validator to the end of the chain - * If $breakChainOnFailure is true, then if the validator fails, the next validator in the chain, - * if one exists, will not be executed. - * - * @param bool $breakChainOnFailure - * @param int $priority Priority at which to enqueue validator; defaults to - * 1 (higher executes earlier) - * @return $this - * @throws Exception\InvalidArgumentException - */ - public function attach( - ValidatorInterface $validator, - $breakChainOnFailure = false, - $priority = self::DEFAULT_PRIORITY - ) { - /** @psalm-suppress RedundantCastGivenDocblockType */ - $this->validators->insert( - [ - 'instance' => $validator, - 'breakChainOnFailure' => (bool) $breakChainOnFailure, - ], - $priority - ); - - return $this; - } - - /** - * Proxy to attach() to keep BC - * - * @deprecated Please use attach() - * - * @param bool $breakChainOnFailure - * @param int $priority - * @return ValidatorChain Provides a fluent interface - */ - public function addValidator( - ValidatorInterface $validator, - $breakChainOnFailure = false, - $priority = self::DEFAULT_PRIORITY - ) { - return $this->attach($validator, $breakChainOnFailure, $priority); - } - - /** - * Adds a validator to the beginning of the chain - * - * If $breakChainOnFailure is true, then if the validator fails, the next validator in the chain, - * if one exists, will not be executed. - * - * @param bool $breakChainOnFailure - * @return $this Provides a fluent interface - */ - public function prependValidator(ValidatorInterface $validator, $breakChainOnFailure = false) - { - $priority = self::DEFAULT_PRIORITY; - - if (! $this->validators->isEmpty()) { - $extractedNodes = $this->validators->toArray(PriorityQueue::EXTR_PRIORITY); - rsort($extractedNodes, SORT_NUMERIC); - $priority = $extractedNodes[0] + 1; - } - - /** @psalm-suppress RedundantCastGivenDocblockType */ - $this->validators->insert( - [ - 'instance' => $validator, - 'breakChainOnFailure' => (bool) $breakChainOnFailure, - ], - $priority - ); - return $this; - } - - /** - * Use the plugin manager to add a validator by name - * - * @param string|class-string $name - * @param array $options - * @param bool $breakChainOnFailure - * @param int $priority - * @return $this - */ - public function attachByName($name, $options = [], $breakChainOnFailure = false, $priority = self::DEFAULT_PRIORITY) - { - if (isset($options['break_chain_on_failure'])) { - $breakChainOnFailure = (bool) $options['break_chain_on_failure']; - } - - if (isset($options['breakchainonfailure'])) { - $breakChainOnFailure = (bool) $options['breakchainonfailure']; - } - - $this->attach($this->plugin($name, $options), $breakChainOnFailure, $priority); - - return $this; - } - - /** - * Proxy to attachByName() to keep BC - * - * @deprecated Please use attachByName() - * - * @param string $name - * @param array $options - * @param bool $breakChainOnFailure - * @return ValidatorChain - */ - public function addByName($name, $options = [], $breakChainOnFailure = false) - { - return $this->attachByName($name, $options, $breakChainOnFailure); - } - - /** - * Use the plugin manager to prepend a validator by name - * - * @param string|class-string $name - * @param array $options - * @param bool $breakChainOnFailure - * @return $this - */ - public function prependByName($name, $options = [], $breakChainOnFailure = false) - { - $validator = $this->plugin($name, $options); - $this->prependValidator($validator, $breakChainOnFailure); - return $this; - } - - /** - * Returns true if and only if $value passes all validations in the chain - * - * Validators are run in the order in which they were added to the chain (FIFO). - * - * @param mixed $value - * @param mixed $context Extra "context" to provide the validator - * @return bool - */ - public function isValid($value, $context = null) - { - $this->messages = []; - $result = true; - foreach ($this->validators as $element) { - $validator = $element['instance']; - assert($validator instanceof ValidatorInterface); - if ($validator->isValid($value, $context)) { - continue; - } - $result = false; - $messages = $validator->getMessages(); - $this->messages = array_replace($this->messages, $messages); - if ($element['breakChainOnFailure']) { - break; - } - } - return $result; - } - - /** - * Merge the validator chain with the one given in parameter - * - * @return $this - */ - public function merge(ValidatorChain $validatorChain) - { - foreach ($validatorChain->validators->toArray(PriorityQueue::EXTR_BOTH) as $item) { - $this->attach($item['data']['instance'], $item['data']['breakChainOnFailure'], $item['priority']); - } - - return $this; - } - - /** - * Returns array of validation failure messages - * - * @return array - */ - public function getMessages() - { - return $this->messages; - } - - /** - * Get all the validators - * - * @return list - */ - public function getValidators() - { - return $this->validators->toArray(PriorityQueue::EXTR_DATA); - } - - /** - * Invoke chain as command - * - * @param mixed $value - * @return bool - */ - public function __invoke($value) - { - return $this->isValid($value); - } - - /** - * Deep clone handling - */ - public function __clone() - { - $this->validators = clone $this->validators; - } - - /** - * Prepare validator chain for serialization - * - * Plugin manager (property 'plugins') cannot - * be serialized. On wakeup the property remains unset - * and next invocation to getPluginManager() sets - * the default plugin manager instance (ValidatorPluginManager). - * - * @return array - */ - public function __sleep() - { - return ['validators', 'messages']; - } -} diff --git a/lib/laminas/laminas-validator/src/ValidatorInterface.php b/lib/laminas/laminas-validator/src/ValidatorInterface.php deleted file mode 100644 index af83fbd0a..000000000 --- a/lib/laminas/laminas-validator/src/ValidatorInterface.php +++ /dev/null @@ -1,39 +0,0 @@ -, - * priority?: int, - * break_chain_on_failure?: bool, - * options?: array, - * } - */ -interface ValidatorInterface -{ - /** - * Returns true if and only if $value meets the validation requirements - * - * If $value fails validation, then this method returns false, and - * getMessages() will return an array of messages that explain why the - * validation failed. - * - * @param mixed $value - * @return bool - * @throws Exception\RuntimeException If validation of $value is impossible. - */ - public function isValid($value); - - /** - * Returns an array of messages that explain why the most recent isValid() - * call returned false. The array keys are validation failure message identifiers, - * and the array values are the corresponding human-readable message strings. - * - * If isValid() was never called or if the most recent isValid() call - * returned true, then this method returns an empty array. - * - * @return array - */ - public function getMessages(); -} diff --git a/lib/laminas/laminas-validator/src/ValidatorPluginManager.php b/lib/laminas/laminas-validator/src/ValidatorPluginManager.php deleted file mode 100644 index 58517ebc4..000000000 --- a/lib/laminas/laminas-validator/src/ValidatorPluginManager.php +++ /dev/null @@ -1,657 +0,0 @@ - - */ -class ValidatorPluginManager extends AbstractPluginManager -{ - /** - * Default set of aliases - * - * @var array - * @psalm-suppress UndefinedClass - */ - protected $aliases = [ - 'alnum' => I18nValidator\Alnum::class, - 'Alnum' => I18nValidator\Alnum::class, - 'alpha' => I18nValidator\Alpha::class, - 'Alpha' => I18nValidator\Alpha::class, - 'barcode' => Barcode::class, - 'Barcode' => Barcode::class, - 'between' => Between::class, - 'Between' => Between::class, - 'BIC' => BusinessIdentifierCode::class, - 'bic' => BusinessIdentifierCode::class, - 'bitwise' => Bitwise::class, - 'Bitwise' => Bitwise::class, - 'BusinessIdentifierCode' => BusinessIdentifierCode::class, - 'businessidentifiercode' => BusinessIdentifierCode::class, - 'callback' => Callback::class, - 'Callback' => Callback::class, - 'creditcard' => CreditCard::class, - 'creditCard' => CreditCard::class, - 'CreditCard' => CreditCard::class, - 'csrf' => Csrf::class, - 'Csrf' => Csrf::class, - 'date' => Date::class, - 'Date' => Date::class, - 'datestep' => DateStep::class, - 'dateStep' => DateStep::class, - 'DateStep' => DateStep::class, - 'datetime' => I18nValidator\DateTime::class, - 'dateTime' => I18nValidator\DateTime::class, - 'DateTime' => I18nValidator\DateTime::class, - 'dbnorecordexists' => Db\NoRecordExists::class, - 'dbNoRecordExists' => Db\NoRecordExists::class, - 'DbNoRecordExists' => Db\NoRecordExists::class, - 'dbrecordexists' => Db\RecordExists::class, - 'dbRecordExists' => Db\RecordExists::class, - 'DbRecordExists' => Db\RecordExists::class, - 'digits' => Digits::class, - 'Digits' => Digits::class, - 'emailaddress' => EmailAddress::class, - 'emailAddress' => EmailAddress::class, - 'EmailAddress' => EmailAddress::class, - 'explode' => Explode::class, - 'Explode' => Explode::class, - 'filecount' => File\Count::class, - 'fileCount' => File\Count::class, - 'FileCount' => File\Count::class, - 'filecrc32' => File\Crc32::class, - 'fileCrc32' => File\Crc32::class, - 'FileCrc32' => File\Crc32::class, - 'fileexcludeextension' => File\ExcludeExtension::class, - 'fileExcludeExtension' => File\ExcludeExtension::class, - 'FileExcludeExtension' => File\ExcludeExtension::class, - 'fileexcludemimetype' => File\ExcludeMimeType::class, - 'fileExcludeMimeType' => File\ExcludeMimeType::class, - 'FileExcludeMimeType' => File\ExcludeMimeType::class, - 'fileexists' => File\Exists::class, - 'fileExists' => File\Exists::class, - 'FileExists' => File\Exists::class, - 'fileextension' => File\Extension::class, - 'fileExtension' => File\Extension::class, - 'FileExtension' => File\Extension::class, - 'filefilessize' => File\FilesSize::class, - 'fileFilesSize' => File\FilesSize::class, - 'FileFilesSize' => File\FilesSize::class, - 'filehash' => File\Hash::class, - 'fileHash' => File\Hash::class, - 'FileHash' => File\Hash::class, - 'fileimagesize' => File\ImageSize::class, - 'fileImageSize' => File\ImageSize::class, - 'FileImageSize' => File\ImageSize::class, - 'fileiscompressed' => File\IsCompressed::class, - 'fileIsCompressed' => File\IsCompressed::class, - 'FileIsCompressed' => File\IsCompressed::class, - 'fileisimage' => File\IsImage::class, - 'fileIsImage' => File\IsImage::class, - 'FileIsImage' => File\IsImage::class, - 'filemd5' => File\Md5::class, - 'fileMd5' => File\Md5::class, - 'FileMd5' => File\Md5::class, - 'filemimetype' => File\MimeType::class, - 'fileMimeType' => File\MimeType::class, - 'FileMimeType' => File\MimeType::class, - 'filenotexists' => File\NotExists::class, - 'fileNotExists' => File\NotExists::class, - 'FileNotExists' => File\NotExists::class, - 'filesha1' => File\Sha1::class, - 'fileSha1' => File\Sha1::class, - 'FileSha1' => File\Sha1::class, - 'filesize' => File\Size::class, - 'fileSize' => File\Size::class, - 'FileSize' => File\Size::class, - 'fileupload' => File\Upload::class, - 'fileUpload' => File\Upload::class, - 'FileUpload' => File\Upload::class, - 'fileuploadfile' => File\UploadFile::class, - 'fileUploadFile' => File\UploadFile::class, - 'FileUploadFile' => File\UploadFile::class, - 'filewordcount' => File\WordCount::class, - 'fileWordCount' => File\WordCount::class, - 'FileWordCount' => File\WordCount::class, - 'float' => I18nValidator\IsFloat::class, - 'Float' => I18nValidator\IsFloat::class, - 'gpspoint' => GpsPoint::class, - 'gpsPoint' => GpsPoint::class, - 'GpsPoint' => GpsPoint::class, - 'greaterthan' => GreaterThan::class, - 'greaterThan' => GreaterThan::class, - 'GreaterThan' => GreaterThan::class, - 'hex' => Hex::class, - 'Hex' => Hex::class, - 'hostname' => Hostname::class, - 'Hostname' => Hostname::class, - 'iban' => Iban::class, - 'Iban' => Iban::class, - 'identical' => Identical::class, - 'Identical' => Identical::class, - 'inarray' => InArray::class, - 'inArray' => InArray::class, - 'InArray' => InArray::class, - 'int' => I18nValidator\IsInt::class, - 'Int' => I18nValidator\IsInt::class, - 'ip' => Ip::class, - 'Ip' => Ip::class, - 'isbn' => Isbn::class, - 'Isbn' => Isbn::class, - 'isCountable' => IsCountable::class, - 'IsCountable' => IsCountable::class, - 'iscountable' => IsCountable::class, - 'isfloat' => I18nValidator\IsFloat::class, - 'isFloat' => I18nValidator\IsFloat::class, - 'IsFloat' => I18nValidator\IsFloat::class, - 'isinstanceof' => IsInstanceOf::class, - 'isInstanceOf' => IsInstanceOf::class, - 'IsInstanceOf' => IsInstanceOf::class, - 'isint' => I18nValidator\IsInt::class, - 'isInt' => I18nValidator\IsInt::class, - 'IsInt' => I18nValidator\IsInt::class, - 'lessthan' => LessThan::class, - 'lessThan' => LessThan::class, - 'LessThan' => LessThan::class, - 'notempty' => NotEmpty::class, - 'notEmpty' => NotEmpty::class, - 'NotEmpty' => NotEmpty::class, - 'phonenumber' => I18nValidator\PhoneNumber::class, - 'phoneNumber' => I18nValidator\PhoneNumber::class, - 'PhoneNumber' => I18nValidator\PhoneNumber::class, - 'postcode' => I18nValidator\PostCode::class, - 'postCode' => I18nValidator\PostCode::class, - 'PostCode' => I18nValidator\PostCode::class, - 'regex' => Regex::class, - 'Regex' => Regex::class, - 'sitemapchangefreq' => Sitemap\Changefreq::class, - 'sitemapChangefreq' => Sitemap\Changefreq::class, - 'SitemapChangefreq' => Sitemap\Changefreq::class, - 'sitemaplastmod' => Sitemap\Lastmod::class, - 'sitemapLastmod' => Sitemap\Lastmod::class, - 'SitemapLastmod' => Sitemap\Lastmod::class, - 'sitemaploc' => Sitemap\Loc::class, - 'sitemapLoc' => Sitemap\Loc::class, - 'SitemapLoc' => Sitemap\Loc::class, - 'sitemappriority' => Sitemap\Priority::class, - 'sitemapPriority' => Sitemap\Priority::class, - 'SitemapPriority' => Sitemap\Priority::class, - 'stringlength' => StringLength::class, - 'stringLength' => StringLength::class, - 'StringLength' => StringLength::class, - 'step' => Step::class, - 'Step' => Step::class, - 'timezone' => Timezone::class, - 'Timezone' => Timezone::class, - 'uri' => Uri::class, - 'Uri' => Uri::class, - 'uuid' => Uuid::class, - 'Uuid' => Uuid::class, - - // Legacy Zend Framework aliases - Alnum::class => I18nValidator\Alnum::class, - Alpha::class => I18nValidator\Alpha::class, - \Zend\Validator\Barcode::class => Barcode::class, - \Zend\Validator\Between::class => Between::class, - \Zend\Validator\Bitwise::class => Bitwise::class, - \Zend\Validator\Callback::class => Callback::class, - \Zend\Validator\CreditCard::class => CreditCard::class, - \Zend\Validator\Csrf::class => Csrf::class, - \Zend\Validator\DateStep::class => DateStep::class, - \Zend\Validator\Date::class => Date::class, - DateTime::class => I18nValidator\DateTime::class, - NoRecordExists::class => Db\NoRecordExists::class, - RecordExists::class => Db\RecordExists::class, - \Zend\Validator\Digits::class => Digits::class, - \Zend\Validator\EmailAddress::class => EmailAddress::class, - \Zend\Validator\Explode::class => Explode::class, - Count::class => File\Count::class, - Crc32::class => File\Crc32::class, - ExcludeExtension::class => File\ExcludeExtension::class, - ExcludeMimeType::class => File\ExcludeMimeType::class, - Exists::class => File\Exists::class, - Extension::class => File\Extension::class, - FilesSize::class => File\FilesSize::class, - Hash::class => File\Hash::class, - ImageSize::class => File\ImageSize::class, - IsCompressed::class => File\IsCompressed::class, - IsImage::class => File\IsImage::class, - Md5::class => File\Md5::class, - MimeType::class => File\MimeType::class, - NotExists::class => File\NotExists::class, - Sha1::class => File\Sha1::class, - Size::class => File\Size::class, - Upload::class => File\Upload::class, - UploadFile::class => File\UploadFile::class, - WordCount::class => File\WordCount::class, - IsFloat::class => I18nValidator\IsFloat::class, - \Zend\Validator\GpsPoint::class => GpsPoint::class, - \Zend\Validator\GreaterThan::class => GreaterThan::class, - \Zend\Validator\Hex::class => Hex::class, - \Zend\Validator\Hostname::class => Hostname::class, - \Zend\Validator\Iban::class => Iban::class, - \Zend\Validator\Identical::class => Identical::class, - \Zend\Validator\InArray::class => InArray::class, - IsInt::class => I18nValidator\IsInt::class, - \Zend\Validator\Ip::class => Ip::class, - \Zend\Validator\Isbn::class => Isbn::class, - \Zend\Validator\IsInstanceOf::class => IsInstanceOf::class, - \Zend\Validator\LessThan::class => LessThan::class, - \Zend\Validator\NotEmpty::class => NotEmpty::class, - PhoneNumber::class => I18nValidator\PhoneNumber::class, - PostCode::class => I18nValidator\PostCode::class, - \Zend\Validator\Regex::class => Regex::class, - Changefreq::class => Sitemap\Changefreq::class, - Lastmod::class => Sitemap\Lastmod::class, - Loc::class => Sitemap\Loc::class, - Priority::class => Sitemap\Priority::class, - \Zend\Validator\StringLength::class => StringLength::class, - \Zend\Validator\Step::class => Step::class, - \Zend\Validator\Timezone::class => Timezone::class, - \Zend\Validator\Uri::class => Uri::class, - \Zend\Validator\Uuid::class => Uuid::class, - - // v2 normalized FQCNs - 'zendvalidatorbarcode' => Barcode::class, - 'zendvalidatorbetween' => Between::class, - 'zendvalidatorbitwise' => Bitwise::class, - 'zendvalidatorcallback' => Callback::class, - 'zendvalidatorcreditcard' => CreditCard::class, - 'zendvalidatorcsrf' => Csrf::class, - 'zendvalidatordatestep' => DateStep::class, - 'zendvalidatordate' => Date::class, - 'zendvalidatordbnorecordexists' => Db\NoRecordExists::class, - 'zendvalidatordbrecordexists' => Db\RecordExists::class, - 'zendvalidatordigits' => Digits::class, - 'zendvalidatoremailaddress' => EmailAddress::class, - 'zendvalidatorexplode' => Explode::class, - 'zendvalidatorfilecount' => File\Count::class, - 'zendvalidatorfilecrc32' => File\Crc32::class, - 'zendvalidatorfileexcludeextension' => File\ExcludeExtension::class, - 'zendvalidatorfileexcludemimetype' => File\ExcludeMimeType::class, - 'zendvalidatorfileexists' => File\Exists::class, - 'zendvalidatorfileextension' => File\Extension::class, - 'zendvalidatorfilefilessize' => File\FilesSize::class, - 'zendvalidatorfilehash' => File\Hash::class, - 'zendvalidatorfileimagesize' => File\ImageSize::class, - 'zendvalidatorfileiscompressed' => File\IsCompressed::class, - 'zendvalidatorfileisimage' => File\IsImage::class, - 'zendvalidatorfilemd5' => File\Md5::class, - 'zendvalidatorfilemimetype' => File\MimeType::class, - 'zendvalidatorfilenotexists' => File\NotExists::class, - 'zendvalidatorfilesha1' => File\Sha1::class, - 'zendvalidatorfilesize' => File\Size::class, - 'zendvalidatorfileupload' => File\Upload::class, - 'zendvalidatorfileuploadfile' => File\UploadFile::class, - 'zendvalidatorfilewordcount' => File\WordCount::class, - 'zendvalidatorgpspoint' => GpsPoint::class, - 'zendvalidatorgreaterthan' => GreaterThan::class, - 'zendvalidatorhex' => Hex::class, - 'zendvalidatorhostname' => Hostname::class, - 'zendi18nvalidatoralnum' => I18nValidator\Alnum::class, - 'zendi18nvalidatoralpha' => I18nValidator\Alpha::class, - 'zendi18nvalidatordatetime' => I18nValidator\DateTime::class, - 'zendi18nvalidatorisfloat' => I18nValidator\IsFloat::class, - 'zendi18nvalidatorisint' => I18nValidator\IsInt::class, - 'zendi18nvalidatorphonenumber' => I18nValidator\PhoneNumber::class, - 'zendi18nvalidatorpostcode' => I18nValidator\PostCode::class, - 'zendvalidatoriban' => Iban::class, - 'zendvalidatoridentical' => Identical::class, - 'zendvalidatorinarray' => InArray::class, - 'zendvalidatorip' => Ip::class, - 'zendvalidatorisbn' => Isbn::class, - 'zendvalidatorisinstanceof' => IsInstanceOf::class, - 'zendvalidatorlessthan' => LessThan::class, - 'zendvalidatornotempty' => NotEmpty::class, - 'zendvalidatorregex' => Regex::class, - 'zendvalidatorsitemapchangefreq' => Sitemap\Changefreq::class, - 'zendvalidatorsitemaplastmod' => Sitemap\Lastmod::class, - 'zendvalidatorsitemaploc' => Sitemap\Loc::class, - 'zendvalidatorsitemappriority' => Sitemap\Priority::class, - 'zendvalidatorstringlength' => StringLength::class, - 'zendvalidatorstep' => Step::class, - 'zendvalidatortimezone' => Timezone::class, - 'zendvalidatoruri' => Uri::class, - 'zendvalidatoruuid' => Uuid::class, - ]; - - /** - * Default set of factories - * - * @var FactoriesConfigurationType - */ - protected $factories = [ - I18nValidator\Alnum::class => InvokableFactory::class, - I18nValidator\Alpha::class => InvokableFactory::class, - Barcode::class => InvokableFactory::class, - Between::class => InvokableFactory::class, - Bitwise::class => InvokableFactory::class, - BusinessIdentifierCode::class => InvokableFactory::class, - Callback::class => InvokableFactory::class, - CreditCard::class => InvokableFactory::class, - Csrf::class => InvokableFactory::class, - DateStep::class => InvokableFactory::class, - Date::class => InvokableFactory::class, - I18nValidator\DateTime::class => InvokableFactory::class, - Db\NoRecordExists::class => InvokableFactory::class, - Db\RecordExists::class => InvokableFactory::class, - Digits::class => InvokableFactory::class, - EmailAddress::class => InvokableFactory::class, - Explode::class => InvokableFactory::class, - File\Count::class => InvokableFactory::class, - File\Crc32::class => InvokableFactory::class, - File\ExcludeExtension::class => InvokableFactory::class, - File\ExcludeMimeType::class => InvokableFactory::class, - File\Exists::class => InvokableFactory::class, - File\Extension::class => InvokableFactory::class, - File\FilesSize::class => InvokableFactory::class, - File\Hash::class => InvokableFactory::class, - File\ImageSize::class => InvokableFactory::class, - File\IsCompressed::class => InvokableFactory::class, - File\IsImage::class => InvokableFactory::class, - File\Md5::class => InvokableFactory::class, - File\MimeType::class => InvokableFactory::class, - File\NotExists::class => InvokableFactory::class, - File\Sha1::class => InvokableFactory::class, - File\Size::class => InvokableFactory::class, - File\Upload::class => InvokableFactory::class, - File\UploadFile::class => InvokableFactory::class, - File\WordCount::class => InvokableFactory::class, - I18nValidator\IsFloat::class => InvokableFactory::class, - GpsPoint::class => InvokableFactory::class, - GreaterThan::class => InvokableFactory::class, - Hex::class => InvokableFactory::class, - Hostname::class => InvokableFactory::class, - Iban::class => InvokableFactory::class, - Identical::class => InvokableFactory::class, - InArray::class => InvokableFactory::class, - I18nValidator\IsInt::class => InvokableFactory::class, - Ip::class => InvokableFactory::class, - Isbn::class => InvokableFactory::class, - IsCountable::class => InvokableFactory::class, - IsInstanceOf::class => InvokableFactory::class, - LessThan::class => InvokableFactory::class, - NotEmpty::class => InvokableFactory::class, - I18nValidator\PhoneNumber::class => InvokableFactory::class, - I18nValidator\PostCode::class => InvokableFactory::class, - Regex::class => InvokableFactory::class, - Sitemap\Changefreq::class => InvokableFactory::class, - Sitemap\Lastmod::class => InvokableFactory::class, - Sitemap\Loc::class => InvokableFactory::class, - Sitemap\Priority::class => InvokableFactory::class, - StringLength::class => InvokableFactory::class, - Step::class => InvokableFactory::class, - Timezone::class => InvokableFactory::class, - Uri::class => InvokableFactory::class, - Uuid::class => InvokableFactory::class, - - // v2 canonical FQCNs - 'laminasvalidatorbarcodecode25interleaved' => InvokableFactory::class, - 'laminasvalidatorbarcodecode25' => InvokableFactory::class, - 'laminasvalidatorbarcodecode39ext' => InvokableFactory::class, - 'laminasvalidatorbarcodecode39' => InvokableFactory::class, - 'laminasvalidatorbarcodecode93ext' => InvokableFactory::class, - 'laminasvalidatorbarcodecode93' => InvokableFactory::class, - 'laminasvalidatorbarcodeean12' => InvokableFactory::class, - 'laminasvalidatorbarcodeean13' => InvokableFactory::class, - 'laminasvalidatorbarcodeean14' => InvokableFactory::class, - 'laminasvalidatorbarcodeean18' => InvokableFactory::class, - 'laminasvalidatorbarcodeean2' => InvokableFactory::class, - 'laminasvalidatorbarcodeean5' => InvokableFactory::class, - 'laminasvalidatorbarcodeean8' => InvokableFactory::class, - 'laminasvalidatorbarcodegtin12' => InvokableFactory::class, - 'laminasvalidatorbarcodegtin13' => InvokableFactory::class, - 'laminasvalidatorbarcodegtin14' => InvokableFactory::class, - 'laminasvalidatorbarcodeidentcode' => InvokableFactory::class, - 'laminasvalidatorbarcodeintelligentmail' => InvokableFactory::class, - 'laminasvalidatorbarcodeissn' => InvokableFactory::class, - 'laminasvalidatorbarcodeitf14' => InvokableFactory::class, - 'laminasvalidatorbarcodeleitcode' => InvokableFactory::class, - 'laminasvalidatorbarcodeplanet' => InvokableFactory::class, - 'laminasvalidatorbarcodepostnet' => InvokableFactory::class, - 'laminasvalidatorbarcoderoyalmail' => InvokableFactory::class, - 'laminasvalidatorbarcodesscc' => InvokableFactory::class, - 'laminasvalidatorbarcodeupca' => InvokableFactory::class, - 'laminasvalidatorbarcodeupce' => InvokableFactory::class, - 'laminasvalidatorbarcode' => InvokableFactory::class, - 'laminasvalidatorbetween' => InvokableFactory::class, - 'laminasvalidatorbitwise' => InvokableFactory::class, - 'laminasvalidatorcallback' => InvokableFactory::class, - 'laminasvalidatorcreditcard' => InvokableFactory::class, - 'laminasvalidatorcsrf' => InvokableFactory::class, - 'laminasvalidatordatestep' => InvokableFactory::class, - 'laminasvalidatordate' => InvokableFactory::class, - 'laminasvalidatordbnorecordexists' => InvokableFactory::class, - 'laminasvalidatordbrecordexists' => InvokableFactory::class, - 'laminasvalidatordigits' => InvokableFactory::class, - 'laminasvalidatoremailaddress' => InvokableFactory::class, - 'laminasvalidatorexplode' => InvokableFactory::class, - 'laminasvalidatorfilecount' => InvokableFactory::class, - 'laminasvalidatorfilecrc32' => InvokableFactory::class, - 'laminasvalidatorfileexcludeextension' => InvokableFactory::class, - 'laminasvalidatorfileexcludemimetype' => InvokableFactory::class, - 'laminasvalidatorfileexists' => InvokableFactory::class, - 'laminasvalidatorfileextension' => InvokableFactory::class, - 'laminasvalidatorfilefilessize' => InvokableFactory::class, - 'laminasvalidatorfilehash' => InvokableFactory::class, - 'laminasvalidatorfileimagesize' => InvokableFactory::class, - 'laminasvalidatorfileiscompressed' => InvokableFactory::class, - 'laminasvalidatorfileisimage' => InvokableFactory::class, - 'laminasvalidatorfilemd5' => InvokableFactory::class, - 'laminasvalidatorfilemimetype' => InvokableFactory::class, - 'laminasvalidatorfilenotexists' => InvokableFactory::class, - 'laminasvalidatorfilesha1' => InvokableFactory::class, - 'laminasvalidatorfilesize' => InvokableFactory::class, - 'laminasvalidatorfileupload' => InvokableFactory::class, - 'laminasvalidatorfileuploadfile' => InvokableFactory::class, - 'laminasvalidatorfilewordcount' => InvokableFactory::class, - 'laminasvalidatorgpspoint' => InvokableFactory::class, - 'laminasvalidatorgreaterthan' => InvokableFactory::class, - 'laminasvalidatorhex' => InvokableFactory::class, - 'laminasvalidatorhostname' => InvokableFactory::class, - 'laminasi18nvalidatoralnum' => InvokableFactory::class, - 'laminasi18nvalidatoralpha' => InvokableFactory::class, - 'laminasi18nvalidatordatetime' => InvokableFactory::class, - 'laminasi18nvalidatorisfloat' => InvokableFactory::class, - 'laminasi18nvalidatorisint' => InvokableFactory::class, - 'laminasi18nvalidatorphonenumber' => InvokableFactory::class, - 'laminasi18nvalidatorpostcode' => InvokableFactory::class, - 'laminasvalidatoriban' => InvokableFactory::class, - 'laminasvalidatoridentical' => InvokableFactory::class, - 'laminasvalidatorinarray' => InvokableFactory::class, - 'laminasvalidatorip' => InvokableFactory::class, - 'laminasvalidatorisbn' => InvokableFactory::class, - 'laminasvalidatoriscountable' => InvokableFactory::class, - 'laminasvalidatorisinstanceof' => InvokableFactory::class, - 'laminasvalidatorlessthan' => InvokableFactory::class, - 'laminasvalidatornotempty' => InvokableFactory::class, - 'laminasvalidatorregex' => InvokableFactory::class, - 'laminasvalidatorsitemapchangefreq' => InvokableFactory::class, - 'laminasvalidatorsitemaplastmod' => InvokableFactory::class, - 'laminasvalidatorsitemaploc' => InvokableFactory::class, - 'laminasvalidatorsitemappriority' => InvokableFactory::class, - 'laminasvalidatorstringlength' => InvokableFactory::class, - 'laminasvalidatorstep' => InvokableFactory::class, - 'laminasvalidatortimezone' => InvokableFactory::class, - 'laminasvalidatoruri' => InvokableFactory::class, - 'laminasvalidatoruuid' => InvokableFactory::class, - ]; - - /** - * Whether or not to share by default; default to false (v2) - * - * @var bool - */ - protected $shareByDefault = false; - - /** - * Whether or not to share by default; default to false (v3) - * - * @var bool - */ - protected $sharedByDefault = false; - - /** - * Default instance type - * - * @var string - */ - protected $instanceOf = ValidatorInterface::class; - - /** - * Constructor - * - * After invoking parent constructor, add an initializer to inject the - * attached translator, if any, to the currently requested helper. - * - * {@inheritDoc} - * - * @param ServiceManagerConfiguration $v3config - */ - public function __construct($configOrContainerInstance = null, array $v3config = []) - { - parent::__construct($configOrContainerInstance, $v3config); - - $this->addInitializer([$this, 'injectTranslator']); - $this->addInitializer([$this, 'injectValidatorPluginManager']); - } - - /** - * Validate plugin instance - * - * {@inheritDoc} - */ - public function validate($instance) - { - if (! $instance instanceof $this->instanceOf) { - throw new InvalidServiceException(sprintf( - '%s expects only to create instances of %s; %s is invalid', - static::class, - $this->instanceOf, - is_object($instance) ? get_class($instance) : gettype($instance) - )); - } - } - - /** - * For v2 compatibility: validate plugin instance. - * - * Proxies to `validate()`. - * - * @param mixed $plugin - * @return void - * @throws Exception\RuntimeException - */ - public function validatePlugin($plugin) - { - try { - $this->validate($plugin); - } catch (InvalidServiceException $e) { - throw new Exception\RuntimeException(sprintf( - 'Plugin of type %s is invalid; must implement %s', - is_object($plugin) ? get_class($plugin) : gettype($plugin), - ValidatorInterface::class - ), $e->getCode(), $e); - } - } - - /** - * Inject a validator instance with the registered translator - * - * @param ContainerInterface|object $first - * @param ContainerInterface|object $second - * @return void - */ - public function injectTranslator($first, $second) - { - if ($first instanceof ContainerInterface) { - $container = $first; - $validator = $second; - } else { - $container = $second; - $validator = $first; - } - - // V2 means we pull it from the parent container - if ($container === $this && method_exists($container, 'getServiceLocator') && $container->getServiceLocator()) { - $container = $container->getServiceLocator(); - } - - if ($validator instanceof Translator\TranslatorAwareInterface) { - if ($container && $container->has('MvcTranslator')) { - $validator->setTranslator($container->get('MvcTranslator')); - } - } - } - - /** - * Inject a validator plugin manager - * - * @param ContainerInterface|object $first - * @param ContainerInterface|object $second - * @return void - */ - public function injectValidatorPluginManager($first, $second) - { - if ($first instanceof ContainerInterface) { - $validator = $second; - } else { - $validator = $first; - } - if ($validator instanceof ValidatorPluginManagerAwareInterface) { - $validator->setValidatorPluginManager($this); - } - } -} diff --git a/lib/laminas/laminas-validator/src/ValidatorPluginManagerAwareInterface.php b/lib/laminas/laminas-validator/src/ValidatorPluginManagerAwareInterface.php deleted file mode 100644 index d30cc7e79..000000000 --- a/lib/laminas/laminas-validator/src/ValidatorPluginManagerAwareInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -has('ServiceListener')) { - return $pluginManager; - } - - // If we do not have a config service, nothing more to do - if (! $container->has('config')) { - return $pluginManager; - } - - $config = $container->get('config'); - - // If we do not have validators configuration, nothing more to do - if (! isset($config['validators']) || ! is_array($config['validators'])) { - return $pluginManager; - } - - // Wire service configuration for validators - (new Config($config['validators']))->configureServiceManager($pluginManager); - - return $pluginManager; - } - - /** - * {@inheritDoc} - * - * @param string|null $name - * @param string|null $requestedName - * @return ValidatorPluginManager - */ - public function createService(ServiceLocatorInterface $container, $name = null, $requestedName = null) - { - return $this($container, $requestedName ?: ValidatorPluginManager::class, $this->creationOptions); - } - - /** - * laminas-servicemanager v2 support for invocation options. - * - * @param ServiceManagerConfiguration $options - * @return void - */ - public function setCreationOptions(array $options) - { - $this->creationOptions = $options; - } -} diff --git a/lib/laminas/laminas-validator/src/ValidatorProviderInterface.php b/lib/laminas/laminas-validator/src/ValidatorProviderInterface.php deleted file mode 100644 index fc6fbb298..000000000 --- a/lib/laminas/laminas-validator/src/ValidatorProviderInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/league/oauth2-client/README.md b/lib/league/oauth2-client/README.md deleted file mode 100644 index f35d53e8a..000000000 --- a/lib/league/oauth2-client/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# OAuth 2.0 Client - -This package provides a base for integrating with [OAuth 2.0](http://oauth.net/2/) service providers. - -[![Gitter Chat](https://img.shields.io/badge/gitter-join_chat-brightgreen.svg?style=flat-square)](https://gitter.im/thephpleague/oauth2-client) -[![Source Code](https://img.shields.io/badge/source-thephpleague/oauth2--client-blue.svg?style=flat-square)](https://github.com/thephpleague/oauth2-client) -[![Latest Version](https://img.shields.io/github/release/thephpleague/oauth2-client.svg?style=flat-square)](https://github.com/thephpleague/oauth2-client/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/thephpleague/oauth2-client/blob/master/LICENSE) -[![Build Status](https://img.shields.io/github/workflow/status/thephpleague/oauth2-client/CI?label=CI&logo=github&style=flat-square)](https://github.com/thephpleague/oauth2-client/actions?query=workflow%3ACI) -[![Codecov Code Coverage](https://img.shields.io/codecov/c/gh/thephpleague/oauth2-client?label=codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/thephpleague/oauth2-client) -[![Total Downloads](https://img.shields.io/packagist/dt/league/oauth2-client.svg?style=flat-square)](https://packagist.org/packages/league/oauth2-client) - ---- - -The OAuth 2.0 login flow, seen commonly around the web in the form of "Connect with Facebook/Google/etc." buttons, is a common integration added to web applications, but it can be tricky and tedious to do right. To help, we've created the `league/oauth2-client` package, which provides a base for integrating with various OAuth 2.0 providers, without overburdening your application with the concerns of [RFC 6749](http://tools.ietf.org/html/rfc6749). - -This OAuth 2.0 client library will work with any OAuth 2.0 provider that conforms to the OAuth 2.0 Authorization Framework. Out-of-the-box, we provide a `GenericProvider` class to connect to any service provider that uses [Bearer tokens](http://tools.ietf.org/html/rfc6750). See our [basic usage guide](https://oauth2-client.thephpleague.com/usage/) for examples using `GenericProvider`. - -Many service providers provide additional functionality above and beyond the OAuth 2.0 specification. For this reason, you may extend and wrap this library to support additional behavior. There are already many [official](https://oauth2-client.thephpleague.com/providers/league/) and [third-party](https://oauth2-client.thephpleague.com/providers/thirdparty/) provider clients available (e.g., Facebook, GitHub, Google, Instagram, LinkedIn, etc.). If your provider isn't in the list, feel free to add it. - -This package is compliant with [PSR-1][], [PSR-2][], [PSR-4][], and [PSR-7][]. If you notice compliance oversights, please send a patch via pull request. If you're interested in contributing to this library, please take a look at our [contributing guidelines](https://github.com/thephpleague/oauth2-client/blob/master/CONTRIBUTING.md). - -## Requirements - -We support the following versions of PHP: - -* PHP 8.1 -* PHP 8.0 -* PHP 7.4 -* PHP 7.3 -* PHP 7.2 -* PHP 7.1 -* PHP 7.0 -* PHP 5.6 - -## Provider Clients - -We provide a list of [official PHP League provider clients](https://oauth2-client.thephpleague.com/providers/league/), as well as [third-party provider clients](https://oauth2-client.thephpleague.com/providers/thirdparty/). - -To build your own provider client, please refer to "[Implementing a Provider Client](https://oauth2-client.thephpleague.com/providers/implementing/)." - -## Usage - -For usage and code examples, check out our [basic usage guide](https://oauth2-client.thephpleague.com/usage/). - -## Contributing - -Please see [our contributing guidelines](https://github.com/thephpleague/oauth2-client/blob/master/CONTRIBUTING.md) for details. - -## License - -The MIT License (MIT). Please see [LICENSE](https://github.com/thephpleague/oauth2-client/blob/master/LICENSE) for more information. - - -[PSR-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md -[PSR-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md -[PSR-4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md -[PSR-7]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md diff --git a/lib/league/oauth2-client/composer.json b/lib/league/oauth2-client/composer.json deleted file mode 100644 index 59201f48f..000000000 --- a/lib/league/oauth2-client/composer.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "league/oauth2-client", - "description": "OAuth 2.0 Client Library", - "license": "MIT", - "config": { - "sort-packages": true - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0", - "guzzlehttp/guzzle": "^6.0 || ^7.0", - "paragonie/random_compat": "^1 || ^2 || ^9.99" - }, - "require-dev": { - "mockery/mockery": "^1.3.5", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpunit/phpunit": "^5.7 || ^6.0 || ^9.5", - "squizlabs/php_codesniffer": "^2.3 || ^3.0" - }, - "keywords": [ - "oauth", - "oauth2", - "authorization", - "authentication", - "idp", - "identity", - "sso", - "single sign on" - ], - "authors": [ - { - "name": "Alex Bilbie", - "email": "hello@alexbilbie.com", - "homepage": "http://www.alexbilbie.com", - "role": "Developer" - }, - { - "name": "Woody Gilk", - "homepage": "https://github.com/shadowhand", - "role": "Contributor" - } - - ], - "autoload": { - "psr-4": { - "League\\OAuth2\\Client\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "League\\OAuth2\\Client\\Test\\": "test/src/" - } - }, - "extra": { - "branch-alias": { - "dev-2.x": "2.0.x-dev" - } - } -} diff --git a/lib/league/oauth2-client/src/Grant/AbstractGrant.php b/lib/league/oauth2-client/src/Grant/AbstractGrant.php deleted file mode 100644 index 2c0244ba3..000000000 --- a/lib/league/oauth2-client/src/Grant/AbstractGrant.php +++ /dev/null @@ -1,80 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Grant; - -use League\OAuth2\Client\Tool\RequiredParameterTrait; - -/** - * Represents a type of authorization grant. - * - * An authorization grant is a credential representing the resource - * owner's authorization (to access its protected resources) used by the - * client to obtain an access token. OAuth 2.0 defines four - * grant types -- authorization code, implicit, resource owner password - * credentials, and client credentials -- as well as an extensibility - * mechanism for defining additional types. - * - * @link http://tools.ietf.org/html/rfc6749#section-1.3 Authorization Grant (RFC 6749, §1.3) - */ -abstract class AbstractGrant -{ - use RequiredParameterTrait; - - /** - * Returns the name of this grant, eg. 'grant_name', which is used as the - * grant type when encoding URL query parameters. - * - * @return string - */ - abstract protected function getName(); - - /** - * Returns a list of all required request parameters. - * - * @return array - */ - abstract protected function getRequiredRequestParameters(); - - /** - * Returns this grant's name as its string representation. This allows for - * string interpolation when building URL query parameters. - * - * @return string - */ - public function __toString() - { - return $this->getName(); - } - - /** - * Prepares an access token request's parameters by checking that all - * required parameters are set, then merging with any given defaults. - * - * @param array $defaults - * @param array $options - * @return array - */ - public function prepareRequestParameters(array $defaults, array $options) - { - $defaults['grant_type'] = $this->getName(); - - $required = $this->getRequiredRequestParameters(); - $provided = array_merge($defaults, $options); - - $this->checkRequiredParameters($required, $provided); - - return $provided; - } -} diff --git a/lib/league/oauth2-client/src/Grant/AuthorizationCode.php b/lib/league/oauth2-client/src/Grant/AuthorizationCode.php deleted file mode 100644 index c49460c02..000000000 --- a/lib/league/oauth2-client/src/Grant/AuthorizationCode.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Grant; - -/** - * Represents an authorization code grant. - * - * @link http://tools.ietf.org/html/rfc6749#section-1.3.1 Authorization Code (RFC 6749, §1.3.1) - */ -class AuthorizationCode extends AbstractGrant -{ - /** - * @inheritdoc - */ - protected function getName() - { - return 'authorization_code'; - } - - /** - * @inheritdoc - */ - protected function getRequiredRequestParameters() - { - return [ - 'code', - ]; - } -} diff --git a/lib/league/oauth2-client/src/Grant/ClientCredentials.php b/lib/league/oauth2-client/src/Grant/ClientCredentials.php deleted file mode 100644 index dc78c4fda..000000000 --- a/lib/league/oauth2-client/src/Grant/ClientCredentials.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Grant; - -/** - * Represents a client credentials grant. - * - * @link http://tools.ietf.org/html/rfc6749#section-1.3.4 Client Credentials (RFC 6749, §1.3.4) - */ -class ClientCredentials extends AbstractGrant -{ - /** - * @inheritdoc - */ - protected function getName() - { - return 'client_credentials'; - } - - /** - * @inheritdoc - */ - protected function getRequiredRequestParameters() - { - return []; - } -} diff --git a/lib/league/oauth2-client/src/Grant/Exception/InvalidGrantException.php b/lib/league/oauth2-client/src/Grant/Exception/InvalidGrantException.php deleted file mode 100644 index c3c4e677b..000000000 --- a/lib/league/oauth2-client/src/Grant/Exception/InvalidGrantException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Grant\Exception; - -use InvalidArgumentException; - -/** - * Exception thrown if the grant does not extend from AbstractGrant. - * - * @see League\OAuth2\Client\Grant\AbstractGrant - */ -class InvalidGrantException extends InvalidArgumentException -{ -} diff --git a/lib/league/oauth2-client/src/Grant/GrantFactory.php b/lib/league/oauth2-client/src/Grant/GrantFactory.php deleted file mode 100644 index 71990e83d..000000000 --- a/lib/league/oauth2-client/src/Grant/GrantFactory.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Grant; - -use League\OAuth2\Client\Grant\Exception\InvalidGrantException; - -/** - * Represents a factory used when retrieving an authorization grant type. - */ -class GrantFactory -{ - /** - * @var array - */ - protected $registry = []; - - /** - * Defines a grant singleton in the registry. - * - * @param string $name - * @param AbstractGrant $grant - * @return self - */ - public function setGrant($name, AbstractGrant $grant) - { - $this->registry[$name] = $grant; - - return $this; - } - - /** - * Returns a grant singleton by name. - * - * If the grant has not be registered, a default grant will be loaded. - * - * @param string $name - * @return AbstractGrant - */ - public function getGrant($name) - { - if (empty($this->registry[$name])) { - $this->registerDefaultGrant($name); - } - - return $this->registry[$name]; - } - - /** - * Registers a default grant singleton by name. - * - * @param string $name - * @return self - */ - protected function registerDefaultGrant($name) - { - // PascalCase the grant. E.g: 'authorization_code' becomes 'AuthorizationCode' - $class = str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $name))); - $class = 'League\\OAuth2\\Client\\Grant\\' . $class; - - $this->checkGrant($class); - - return $this->setGrant($name, new $class); - } - - /** - * Determines if a variable is a valid grant. - * - * @param mixed $class - * @return boolean - */ - public function isGrant($class) - { - return is_subclass_of($class, AbstractGrant::class); - } - - /** - * Checks if a variable is a valid grant. - * - * @throws InvalidGrantException - * @param mixed $class - * @return void - */ - public function checkGrant($class) - { - if (!$this->isGrant($class)) { - throw new InvalidGrantException(sprintf( - 'Grant "%s" must extend AbstractGrant', - is_object($class) ? get_class($class) : $class - )); - } - } -} diff --git a/lib/league/oauth2-client/src/Grant/Password.php b/lib/league/oauth2-client/src/Grant/Password.php deleted file mode 100644 index 6543b2ebd..000000000 --- a/lib/league/oauth2-client/src/Grant/Password.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Grant; - -/** - * Represents a resource owner password credentials grant. - * - * @link http://tools.ietf.org/html/rfc6749#section-1.3.3 Resource Owner Password Credentials (RFC 6749, §1.3.3) - */ -class Password extends AbstractGrant -{ - /** - * @inheritdoc - */ - protected function getName() - { - return 'password'; - } - - /** - * @inheritdoc - */ - protected function getRequiredRequestParameters() - { - return [ - 'username', - 'password', - ]; - } -} diff --git a/lib/league/oauth2-client/src/Grant/RefreshToken.php b/lib/league/oauth2-client/src/Grant/RefreshToken.php deleted file mode 100644 index 819218230..000000000 --- a/lib/league/oauth2-client/src/Grant/RefreshToken.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Grant; - -/** - * Represents a refresh token grant. - * - * @link http://tools.ietf.org/html/rfc6749#section-6 Refreshing an Access Token (RFC 6749, §6) - */ -class RefreshToken extends AbstractGrant -{ - /** - * @inheritdoc - */ - protected function getName() - { - return 'refresh_token'; - } - - /** - * @inheritdoc - */ - protected function getRequiredRequestParameters() - { - return [ - 'refresh_token', - ]; - } -} diff --git a/lib/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php b/lib/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php deleted file mode 100644 index 3da406568..000000000 --- a/lib/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\OptionProvider; - -use InvalidArgumentException; - -/** - * Add http basic auth into access token request options - * @link https://tools.ietf.org/html/rfc6749#section-2.3.1 - */ -class HttpBasicAuthOptionProvider extends PostAuthOptionProvider -{ - /** - * @inheritdoc - */ - public function getAccessTokenOptions($method, array $params) - { - if (empty($params['client_id']) || empty($params['client_secret'])) { - throw new InvalidArgumentException('clientId and clientSecret are required for http basic auth'); - } - - $encodedCredentials = base64_encode(sprintf('%s:%s', $params['client_id'], $params['client_secret'])); - unset($params['client_id'], $params['client_secret']); - - $options = parent::getAccessTokenOptions($method, $params); - $options['headers']['Authorization'] = 'Basic ' . $encodedCredentials; - - return $options; - } -} diff --git a/lib/league/oauth2-client/src/OptionProvider/OptionProviderInterface.php b/lib/league/oauth2-client/src/OptionProvider/OptionProviderInterface.php deleted file mode 100644 index 1126d25aa..000000000 --- a/lib/league/oauth2-client/src/OptionProvider/OptionProviderInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\OptionProvider; - -/** - * Interface for access token options provider - */ -interface OptionProviderInterface -{ - /** - * Builds request options used for requesting an access token. - * - * @param string $method - * @param array $params - * @return array - */ - public function getAccessTokenOptions($method, array $params); -} diff --git a/lib/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php b/lib/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php deleted file mode 100644 index 12d920ecf..000000000 --- a/lib/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\OptionProvider; - -use League\OAuth2\Client\Provider\AbstractProvider; -use League\OAuth2\Client\Tool\QueryBuilderTrait; - -/** - * Provide options for access token - */ -class PostAuthOptionProvider implements OptionProviderInterface -{ - use QueryBuilderTrait; - - /** - * @inheritdoc - */ - public function getAccessTokenOptions($method, array $params) - { - $options = ['headers' => ['content-type' => 'application/x-www-form-urlencoded']]; - - if ($method === AbstractProvider::METHOD_POST) { - $options['body'] = $this->getAccessTokenBody($params); - } - - return $options; - } - - /** - * Returns the request body for requesting an access token. - * - * @param array $params - * @return string - */ - protected function getAccessTokenBody(array $params) - { - return $this->buildQueryString($params); - } -} diff --git a/lib/league/oauth2-client/src/Provider/AbstractProvider.php b/lib/league/oauth2-client/src/Provider/AbstractProvider.php deleted file mode 100644 index d1679998c..000000000 --- a/lib/league/oauth2-client/src/Provider/AbstractProvider.php +++ /dev/null @@ -1,843 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Provider; - -use GuzzleHttp\Client as HttpClient; -use GuzzleHttp\ClientInterface as HttpClientInterface; -use GuzzleHttp\Exception\BadResponseException; -use League\OAuth2\Client\Grant\AbstractGrant; -use League\OAuth2\Client\Grant\GrantFactory; -use League\OAuth2\Client\OptionProvider\OptionProviderInterface; -use League\OAuth2\Client\OptionProvider\PostAuthOptionProvider; -use League\OAuth2\Client\Provider\Exception\IdentityProviderException; -use League\OAuth2\Client\Token\AccessToken; -use League\OAuth2\Client\Token\AccessTokenInterface; -use League\OAuth2\Client\Tool\ArrayAccessorTrait; -use League\OAuth2\Client\Tool\GuardedPropertyTrait; -use League\OAuth2\Client\Tool\QueryBuilderTrait; -use League\OAuth2\Client\Tool\RequestFactory; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; -use UnexpectedValueException; - -/** - * Represents a service provider (authorization server). - * - * @link http://tools.ietf.org/html/rfc6749#section-1.1 Roles (RFC 6749, §1.1) - */ -abstract class AbstractProvider -{ - use ArrayAccessorTrait; - use GuardedPropertyTrait; - use QueryBuilderTrait; - - /** - * @var string Key used in a token response to identify the resource owner. - */ - const ACCESS_TOKEN_RESOURCE_OWNER_ID = null; - - /** - * @var string HTTP method used to fetch access tokens. - */ - const METHOD_GET = 'GET'; - - /** - * @var string HTTP method used to fetch access tokens. - */ - const METHOD_POST = 'POST'; - - /** - * @var string - */ - protected $clientId; - - /** - * @var string - */ - protected $clientSecret; - - /** - * @var string - */ - protected $redirectUri; - - /** - * @var string - */ - protected $state; - - /** - * @var GrantFactory - */ - protected $grantFactory; - - /** - * @var RequestFactory - */ - protected $requestFactory; - - /** - * @var HttpClientInterface - */ - protected $httpClient; - - /** - * @var OptionProviderInterface - */ - protected $optionProvider; - - /** - * Constructs an OAuth 2.0 service provider. - * - * @param array $options An array of options to set on this provider. - * Options include `clientId`, `clientSecret`, `redirectUri`, and `state`. - * Individual providers may introduce more options, as needed. - * @param array $collaborators An array of collaborators that may be used to - * override this provider's default behavior. Collaborators include - * `grantFactory`, `requestFactory`, and `httpClient`. - * Individual providers may introduce more collaborators, as needed. - */ - public function __construct(array $options = [], array $collaborators = []) - { - // We'll let the GuardedPropertyTrait handle mass assignment of incoming - // options, skipping any blacklisted properties defined in the provider - $this->fillProperties($options); - - if (empty($collaborators['grantFactory'])) { - $collaborators['grantFactory'] = new GrantFactory(); - } - $this->setGrantFactory($collaborators['grantFactory']); - - if (empty($collaborators['requestFactory'])) { - $collaborators['requestFactory'] = new RequestFactory(); - } - $this->setRequestFactory($collaborators['requestFactory']); - - if (empty($collaborators['httpClient'])) { - $client_options = $this->getAllowedClientOptions($options); - - $collaborators['httpClient'] = new HttpClient( - array_intersect_key($options, array_flip($client_options)) - ); - } - $this->setHttpClient($collaborators['httpClient']); - - if (empty($collaborators['optionProvider'])) { - $collaborators['optionProvider'] = new PostAuthOptionProvider(); - } - $this->setOptionProvider($collaborators['optionProvider']); - } - - /** - * Returns the list of options that can be passed to the HttpClient - * - * @param array $options An array of options to set on this provider. - * Options include `clientId`, `clientSecret`, `redirectUri`, and `state`. - * Individual providers may introduce more options, as needed. - * @return array The options to pass to the HttpClient constructor - */ - protected function getAllowedClientOptions(array $options) - { - $client_options = ['timeout', 'proxy']; - - // Only allow turning off ssl verification if it's for a proxy - if (!empty($options['proxy'])) { - $client_options[] = 'verify'; - } - - return $client_options; - } - - /** - * Sets the grant factory instance. - * - * @param GrantFactory $factory - * @return self - */ - public function setGrantFactory(GrantFactory $factory) - { - $this->grantFactory = $factory; - - return $this; - } - - /** - * Returns the current grant factory instance. - * - * @return GrantFactory - */ - public function getGrantFactory() - { - return $this->grantFactory; - } - - /** - * Sets the request factory instance. - * - * @param RequestFactory $factory - * @return self - */ - public function setRequestFactory(RequestFactory $factory) - { - $this->requestFactory = $factory; - - return $this; - } - - /** - * Returns the request factory instance. - * - * @return RequestFactory - */ - public function getRequestFactory() - { - return $this->requestFactory; - } - - /** - * Sets the HTTP client instance. - * - * @param HttpClientInterface $client - * @return self - */ - public function setHttpClient(HttpClientInterface $client) - { - $this->httpClient = $client; - - return $this; - } - - /** - * Returns the HTTP client instance. - * - * @return HttpClientInterface - */ - public function getHttpClient() - { - return $this->httpClient; - } - - /** - * Sets the option provider instance. - * - * @param OptionProviderInterface $provider - * @return self - */ - public function setOptionProvider(OptionProviderInterface $provider) - { - $this->optionProvider = $provider; - - return $this; - } - - /** - * Returns the option provider instance. - * - * @return OptionProviderInterface - */ - public function getOptionProvider() - { - return $this->optionProvider; - } - - /** - * Returns the current value of the state parameter. - * - * This can be accessed by the redirect handler during authorization. - * - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Returns the base URL for authorizing a client. - * - * Eg. https://oauth.service.com/authorize - * - * @return string - */ - abstract public function getBaseAuthorizationUrl(); - - /** - * Returns the base URL for requesting an access token. - * - * Eg. https://oauth.service.com/token - * - * @param array $params - * @return string - */ - abstract public function getBaseAccessTokenUrl(array $params); - - /** - * Returns the URL for requesting the resource owner's details. - * - * @param AccessToken $token - * @return string - */ - abstract public function getResourceOwnerDetailsUrl(AccessToken $token); - - /** - * Returns a new random string to use as the state parameter in an - * authorization flow. - * - * @param int $length Length of the random string to be generated. - * @return string - */ - protected function getRandomState($length = 32) - { - // Converting bytes to hex will always double length. Hence, we can reduce - // the amount of bytes by half to produce the correct length. - return bin2hex(random_bytes($length / 2)); - } - - /** - * Returns the default scopes used by this provider. - * - * This should only be the scopes that are required to request the details - * of the resource owner, rather than all the available scopes. - * - * @return array - */ - abstract protected function getDefaultScopes(); - - /** - * Returns the string that should be used to separate scopes when building - * the URL for requesting an access token. - * - * @return string Scope separator, defaults to ',' - */ - protected function getScopeSeparator() - { - return ','; - } - - /** - * Returns authorization parameters based on provided options. - * - * @param array $options - * @return array Authorization parameters - */ - protected function getAuthorizationParameters(array $options) - { - if (empty($options['state'])) { - $options['state'] = $this->getRandomState(); - } - - if (empty($options['scope'])) { - $options['scope'] = $this->getDefaultScopes(); - } - - $options += [ - 'response_type' => 'code', - 'approval_prompt' => 'auto' - ]; - - if (is_array($options['scope'])) { - $separator = $this->getScopeSeparator(); - $options['scope'] = implode($separator, $options['scope']); - } - - // Store the state as it may need to be accessed later on. - $this->state = $options['state']; - - // Business code layer might set a different redirect_uri parameter - // depending on the context, leave it as-is - if (!isset($options['redirect_uri'])) { - $options['redirect_uri'] = $this->redirectUri; - } - - $options['client_id'] = $this->clientId; - - return $options; - } - - /** - * Builds the authorization URL's query string. - * - * @param array $params Query parameters - * @return string Query string - */ - protected function getAuthorizationQuery(array $params) - { - return $this->buildQueryString($params); - } - - /** - * Builds the authorization URL. - * - * @param array $options - * @return string Authorization URL - */ - public function getAuthorizationUrl(array $options = []) - { - $base = $this->getBaseAuthorizationUrl(); - $params = $this->getAuthorizationParameters($options); - $query = $this->getAuthorizationQuery($params); - - return $this->appendQuery($base, $query); - } - - /** - * Redirects the client for authorization. - * - * @param array $options - * @param callable|null $redirectHandler - * @return mixed - */ - public function authorize( - array $options = [], - callable $redirectHandler = null - ) { - $url = $this->getAuthorizationUrl($options); - if ($redirectHandler) { - return $redirectHandler($url, $this); - } - - // @codeCoverageIgnoreStart - header('Location: ' . $url); - exit; - // @codeCoverageIgnoreEnd - } - - /** - * Appends a query string to a URL. - * - * @param string $url The URL to append the query to - * @param string $query The HTTP query string - * @return string The resulting URL - */ - protected function appendQuery($url, $query) - { - $query = trim($query, '?&'); - - if ($query) { - $glue = strstr($url, '?') === false ? '?' : '&'; - return $url . $glue . $query; - } - - return $url; - } - - /** - * Returns the method to use when requesting an access token. - * - * @return string HTTP method - */ - protected function getAccessTokenMethod() - { - return self::METHOD_POST; - } - - /** - * Returns the key used in the access token response to identify the resource owner. - * - * @return string|null Resource owner identifier key - */ - protected function getAccessTokenResourceOwnerId() - { - return static::ACCESS_TOKEN_RESOURCE_OWNER_ID; - } - - /** - * Builds the access token URL's query string. - * - * @param array $params Query parameters - * @return string Query string - */ - protected function getAccessTokenQuery(array $params) - { - return $this->buildQueryString($params); - } - - /** - * Checks that a provided grant is valid, or attempts to produce one if the - * provided grant is a string. - * - * @param AbstractGrant|string $grant - * @return AbstractGrant - */ - protected function verifyGrant($grant) - { - if (is_string($grant)) { - return $this->grantFactory->getGrant($grant); - } - - $this->grantFactory->checkGrant($grant); - return $grant; - } - - /** - * Returns the full URL to use when requesting an access token. - * - * @param array $params Query parameters - * @return string - */ - protected function getAccessTokenUrl(array $params) - { - $url = $this->getBaseAccessTokenUrl($params); - - if ($this->getAccessTokenMethod() === self::METHOD_GET) { - $query = $this->getAccessTokenQuery($params); - return $this->appendQuery($url, $query); - } - - return $url; - } - - /** - * Returns a prepared request for requesting an access token. - * - * @param array $params Query string parameters - * @return RequestInterface - */ - protected function getAccessTokenRequest(array $params) - { - $method = $this->getAccessTokenMethod(); - $url = $this->getAccessTokenUrl($params); - $options = $this->optionProvider->getAccessTokenOptions($this->getAccessTokenMethod(), $params); - - return $this->getRequest($method, $url, $options); - } - - /** - * Requests an access token using a specified grant and option set. - * - * @param mixed $grant - * @param array $options - * @throws IdentityProviderException - * @return AccessTokenInterface - */ - public function getAccessToken($grant, array $options = []) - { - $grant = $this->verifyGrant($grant); - - $params = [ - 'client_id' => $this->clientId, - 'client_secret' => $this->clientSecret, - 'redirect_uri' => $this->redirectUri, - ]; - - $params = $grant->prepareRequestParameters($params, $options); - $request = $this->getAccessTokenRequest($params); - $response = $this->getParsedResponse($request); - if (false === is_array($response)) { - throw new UnexpectedValueException( - 'Invalid response received from Authorization Server. Expected JSON.' - ); - } - $prepared = $this->prepareAccessTokenResponse($response); - $token = $this->createAccessToken($prepared, $grant); - - return $token; - } - - /** - * Returns a PSR-7 request instance that is not authenticated. - * - * @param string $method - * @param string $url - * @param array $options - * @return RequestInterface - */ - public function getRequest($method, $url, array $options = []) - { - return $this->createRequest($method, $url, null, $options); - } - - /** - * Returns an authenticated PSR-7 request instance. - * - * @param string $method - * @param string $url - * @param AccessTokenInterface|string $token - * @param array $options Any of "headers", "body", and "protocolVersion". - * @return RequestInterface - */ - public function getAuthenticatedRequest($method, $url, $token, array $options = []) - { - return $this->createRequest($method, $url, $token, $options); - } - - /** - * Creates a PSR-7 request instance. - * - * @param string $method - * @param string $url - * @param AccessTokenInterface|string|null $token - * @param array $options - * @return RequestInterface - */ - protected function createRequest($method, $url, $token, array $options) - { - $defaults = [ - 'headers' => $this->getHeaders($token), - ]; - - $options = array_merge_recursive($defaults, $options); - $factory = $this->getRequestFactory(); - - return $factory->getRequestWithOptions($method, $url, $options); - } - - /** - * Sends a request instance and returns a response instance. - * - * WARNING: This method does not attempt to catch exceptions caused by HTTP - * errors! It is recommended to wrap this method in a try/catch block. - * - * @param RequestInterface $request - * @return ResponseInterface - */ - public function getResponse(RequestInterface $request) - { - return $this->getHttpClient()->send($request); - } - - /** - * Sends a request and returns the parsed response. - * - * @param RequestInterface $request - * @throws IdentityProviderException - * @return mixed - */ - public function getParsedResponse(RequestInterface $request) - { - try { - $response = $this->getResponse($request); - } catch (BadResponseException $e) { - $response = $e->getResponse(); - } - - $parsed = $this->parseResponse($response); - - $this->checkResponse($response, $parsed); - - return $parsed; - } - - /** - * Attempts to parse a JSON response. - * - * @param string $content JSON content from response body - * @return array Parsed JSON data - * @throws UnexpectedValueException if the content could not be parsed - */ - protected function parseJson($content) - { - $content = json_decode($content, true); - - if (json_last_error() !== JSON_ERROR_NONE) { - throw new UnexpectedValueException(sprintf( - "Failed to parse JSON response: %s", - json_last_error_msg() - )); - } - - return $content; - } - - /** - * Returns the content type header of a response. - * - * @param ResponseInterface $response - * @return string Semi-colon separated join of content-type headers. - */ - protected function getContentType(ResponseInterface $response) - { - return join(';', (array) $response->getHeader('content-type')); - } - - /** - * Parses the response according to its content-type header. - * - * @throws UnexpectedValueException - * @param ResponseInterface $response - * @return array - */ - protected function parseResponse(ResponseInterface $response) - { - $content = (string) $response->getBody(); - $type = $this->getContentType($response); - - if (strpos($type, 'urlencoded') !== false) { - parse_str($content, $parsed); - return $parsed; - } - - // Attempt to parse the string as JSON regardless of content type, - // since some providers use non-standard content types. Only throw an - // exception if the JSON could not be parsed when it was expected to. - try { - return $this->parseJson($content); - } catch (UnexpectedValueException $e) { - if (strpos($type, 'json') !== false) { - throw $e; - } - - if ($response->getStatusCode() == 500) { - throw new UnexpectedValueException( - 'An OAuth server error was encountered that did not contain a JSON body', - 0, - $e - ); - } - - return $content; - } - } - - /** - * Checks a provider response for errors. - * - * @throws IdentityProviderException - * @param ResponseInterface $response - * @param array|string $data Parsed response data - * @return void - */ - abstract protected function checkResponse(ResponseInterface $response, $data); - - /** - * Prepares an parsed access token response for a grant. - * - * Custom mapping of expiration, etc should be done here. Always call the - * parent method when overloading this method. - * - * @param mixed $result - * @return array - */ - protected function prepareAccessTokenResponse(array $result) - { - if ($this->getAccessTokenResourceOwnerId() !== null) { - $result['resource_owner_id'] = $this->getValueByKey( - $result, - $this->getAccessTokenResourceOwnerId() - ); - } - return $result; - } - - /** - * Creates an access token from a response. - * - * The grant that was used to fetch the response can be used to provide - * additional context. - * - * @param array $response - * @param AbstractGrant $grant - * @return AccessTokenInterface - */ - protected function createAccessToken(array $response, AbstractGrant $grant) - { - return new AccessToken($response); - } - - /** - * Generates a resource owner object from a successful resource owner - * details request. - * - * @param array $response - * @param AccessToken $token - * @return ResourceOwnerInterface - */ - abstract protected function createResourceOwner(array $response, AccessToken $token); - - /** - * Requests and returns the resource owner of given access token. - * - * @param AccessToken $token - * @return ResourceOwnerInterface - */ - public function getResourceOwner(AccessToken $token) - { - $response = $this->fetchResourceOwnerDetails($token); - - return $this->createResourceOwner($response, $token); - } - - /** - * Requests resource owner details. - * - * @param AccessToken $token - * @return mixed - */ - protected function fetchResourceOwnerDetails(AccessToken $token) - { - $url = $this->getResourceOwnerDetailsUrl($token); - - $request = $this->getAuthenticatedRequest(self::METHOD_GET, $url, $token); - - $response = $this->getParsedResponse($request); - - if (false === is_array($response)) { - throw new UnexpectedValueException( - 'Invalid response received from Authorization Server. Expected JSON.' - ); - } - - return $response; - } - - /** - * Returns the default headers used by this provider. - * - * Typically this is used to set 'Accept' or 'Content-Type' headers. - * - * @return array - */ - protected function getDefaultHeaders() - { - return []; - } - - /** - * Returns the authorization headers used by this provider. - * - * Typically this is "Bearer" or "MAC". For more information see: - * http://tools.ietf.org/html/rfc6749#section-7.1 - * - * No default is provided, providers must overload this method to activate - * authorization headers. - * - * @param mixed|null $token Either a string or an access token instance - * @return array - */ - protected function getAuthorizationHeaders($token = null) - { - return []; - } - - /** - * Returns all headers used by this provider for a request. - * - * The request will be authenticated if an access token is provided. - * - * @param mixed|null $token object or string - * @return array - */ - public function getHeaders($token = null) - { - if ($token) { - return array_merge( - $this->getDefaultHeaders(), - $this->getAuthorizationHeaders($token) - ); - } - - return $this->getDefaultHeaders(); - } -} diff --git a/lib/league/oauth2-client/src/Provider/Exception/IdentityProviderException.php b/lib/league/oauth2-client/src/Provider/Exception/IdentityProviderException.php deleted file mode 100644 index 52b7e0353..000000000 --- a/lib/league/oauth2-client/src/Provider/Exception/IdentityProviderException.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Provider\Exception; - -/** - * Exception thrown if the provider response contains errors. - */ -class IdentityProviderException extends \Exception -{ - /** - * @var mixed - */ - protected $response; - - /** - * @param string $message - * @param int $code - * @param array|string $response The response body - */ - public function __construct($message, $code, $response) - { - $this->response = $response; - - parent::__construct($message, $code); - } - - /** - * Returns the exception's response body. - * - * @return array|string - */ - public function getResponseBody() - { - return $this->response; - } -} diff --git a/lib/league/oauth2-client/src/Provider/GenericProvider.php b/lib/league/oauth2-client/src/Provider/GenericProvider.php deleted file mode 100644 index 74393ffda..000000000 --- a/lib/league/oauth2-client/src/Provider/GenericProvider.php +++ /dev/null @@ -1,233 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Provider; - -use InvalidArgumentException; -use League\OAuth2\Client\Provider\Exception\IdentityProviderException; -use League\OAuth2\Client\Token\AccessToken; -use League\OAuth2\Client\Tool\BearerAuthorizationTrait; -use Psr\Http\Message\ResponseInterface; - -/** - * Represents a generic service provider that may be used to interact with any - * OAuth 2.0 service provider, using Bearer token authentication. - */ -class GenericProvider extends AbstractProvider -{ - use BearerAuthorizationTrait; - - /** - * @var string - */ - private $urlAuthorize; - - /** - * @var string - */ - private $urlAccessToken; - - /** - * @var string - */ - private $urlResourceOwnerDetails; - - /** - * @var string - */ - private $accessTokenMethod; - - /** - * @var string - */ - private $accessTokenResourceOwnerId; - - /** - * @var array|null - */ - private $scopes = null; - - /** - * @var string - */ - private $scopeSeparator; - - /** - * @var string - */ - private $responseError = 'error'; - - /** - * @var string - */ - private $responseCode; - - /** - * @var string - */ - private $responseResourceOwnerId = 'id'; - - /** - * @param array $options - * @param array $collaborators - */ - public function __construct(array $options = [], array $collaborators = []) - { - $this->assertRequiredOptions($options); - - $possible = $this->getConfigurableOptions(); - $configured = array_intersect_key($options, array_flip($possible)); - - foreach ($configured as $key => $value) { - $this->$key = $value; - } - - // Remove all options that are only used locally - $options = array_diff_key($options, $configured); - - parent::__construct($options, $collaborators); - } - - /** - * Returns all options that can be configured. - * - * @return array - */ - protected function getConfigurableOptions() - { - return array_merge($this->getRequiredOptions(), [ - 'accessTokenMethod', - 'accessTokenResourceOwnerId', - 'scopeSeparator', - 'responseError', - 'responseCode', - 'responseResourceOwnerId', - 'scopes', - ]); - } - - /** - * Returns all options that are required. - * - * @return array - */ - protected function getRequiredOptions() - { - return [ - 'urlAuthorize', - 'urlAccessToken', - 'urlResourceOwnerDetails', - ]; - } - - /** - * Verifies that all required options have been passed. - * - * @param array $options - * @return void - * @throws InvalidArgumentException - */ - private function assertRequiredOptions(array $options) - { - $missing = array_diff_key(array_flip($this->getRequiredOptions()), $options); - - if (!empty($missing)) { - throw new InvalidArgumentException( - 'Required options not defined: ' . implode(', ', array_keys($missing)) - ); - } - } - - /** - * @inheritdoc - */ - public function getBaseAuthorizationUrl() - { - return $this->urlAuthorize; - } - - /** - * @inheritdoc - */ - public function getBaseAccessTokenUrl(array $params) - { - return $this->urlAccessToken; - } - - /** - * @inheritdoc - */ - public function getResourceOwnerDetailsUrl(AccessToken $token) - { - return $this->urlResourceOwnerDetails; - } - - /** - * @inheritdoc - */ - public function getDefaultScopes() - { - return $this->scopes; - } - - /** - * @inheritdoc - */ - protected function getAccessTokenMethod() - { - return $this->accessTokenMethod ?: parent::getAccessTokenMethod(); - } - - /** - * @inheritdoc - */ - protected function getAccessTokenResourceOwnerId() - { - return $this->accessTokenResourceOwnerId ?: parent::getAccessTokenResourceOwnerId(); - } - - /** - * @inheritdoc - */ - protected function getScopeSeparator() - { - return $this->scopeSeparator ?: parent::getScopeSeparator(); - } - - /** - * @inheritdoc - */ - protected function checkResponse(ResponseInterface $response, $data) - { - if (!empty($data[$this->responseError])) { - $error = $data[$this->responseError]; - if (!is_string($error)) { - $error = var_export($error, true); - } - $code = $this->responseCode && !empty($data[$this->responseCode])? $data[$this->responseCode] : 0; - if (!is_int($code)) { - $code = intval($code); - } - throw new IdentityProviderException($error, $code, $data); - } - } - - /** - * @inheritdoc - */ - protected function createResourceOwner(array $response, AccessToken $token) - { - return new GenericResourceOwner($response, $this->responseResourceOwnerId); - } -} diff --git a/lib/league/oauth2-client/src/Provider/GenericResourceOwner.php b/lib/league/oauth2-client/src/Provider/GenericResourceOwner.php deleted file mode 100644 index f87661485..000000000 --- a/lib/league/oauth2-client/src/Provider/GenericResourceOwner.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Provider; - -/** - * Represents a generic resource owner for use with the GenericProvider. - */ -class GenericResourceOwner implements ResourceOwnerInterface -{ - /** - * @var array - */ - protected $response; - - /** - * @var string - */ - protected $resourceOwnerId; - - /** - * @param array $response - * @param string $resourceOwnerId - */ - public function __construct(array $response, $resourceOwnerId) - { - $this->response = $response; - $this->resourceOwnerId = $resourceOwnerId; - } - - /** - * Returns the identifier of the authorized resource owner. - * - * @return mixed - */ - public function getId() - { - return $this->response[$this->resourceOwnerId]; - } - - /** - * Returns the raw resource owner response. - * - * @return array - */ - public function toArray() - { - return $this->response; - } -} diff --git a/lib/league/oauth2-client/src/Provider/ResourceOwnerInterface.php b/lib/league/oauth2-client/src/Provider/ResourceOwnerInterface.php deleted file mode 100644 index 828442425..000000000 --- a/lib/league/oauth2-client/src/Provider/ResourceOwnerInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Provider; - -/** - * Classes implementing `ResourceOwnerInterface` may be used to represent - * the resource owner authenticated with a service provider. - */ -interface ResourceOwnerInterface -{ - /** - * Returns the identifier of the authorized resource owner. - * - * @return mixed - */ - public function getId(); - - /** - * Return all of the owner details available as an array. - * - * @return array - */ - public function toArray(); -} diff --git a/lib/league/oauth2-client/src/Token/AccessToken.php b/lib/league/oauth2-client/src/Token/AccessToken.php deleted file mode 100644 index 81533c307..000000000 --- a/lib/league/oauth2-client/src/Token/AccessToken.php +++ /dev/null @@ -1,243 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Token; - -use InvalidArgumentException; -use RuntimeException; - -/** - * Represents an access token. - * - * @link http://tools.ietf.org/html/rfc6749#section-1.4 Access Token (RFC 6749, §1.4) - */ -class AccessToken implements AccessTokenInterface, ResourceOwnerAccessTokenInterface -{ - /** - * @var string - */ - protected $accessToken; - - /** - * @var int - */ - protected $expires; - - /** - * @var string - */ - protected $refreshToken; - - /** - * @var string - */ - protected $resourceOwnerId; - - /** - * @var array - */ - protected $values = []; - - /** - * @var int - */ - private static $timeNow; - - /** - * Set the time now. This should only be used for testing purposes. - * - * @param int $timeNow the time in seconds since epoch - * @return void - */ - public static function setTimeNow($timeNow) - { - self::$timeNow = $timeNow; - } - - /** - * Reset the time now if it was set for test purposes. - * - * @return void - */ - public static function resetTimeNow() - { - self::$timeNow = null; - } - - /** - * @return int - */ - public function getTimeNow() - { - return self::$timeNow ? self::$timeNow : time(); - } - - /** - * Constructs an access token. - * - * @param array $options An array of options returned by the service provider - * in the access token request. The `access_token` option is required. - * @throws InvalidArgumentException if `access_token` is not provided in `$options`. - */ - public function __construct(array $options = []) - { - if (empty($options['access_token'])) { - throw new InvalidArgumentException('Required option not passed: "access_token"'); - } - - $this->accessToken = $options['access_token']; - - if (!empty($options['resource_owner_id'])) { - $this->resourceOwnerId = $options['resource_owner_id']; - } - - if (!empty($options['refresh_token'])) { - $this->refreshToken = $options['refresh_token']; - } - - // We need to know when the token expires. Show preference to - // 'expires_in' since it is defined in RFC6749 Section 5.1. - // Defer to 'expires' if it is provided instead. - if (isset($options['expires_in'])) { - if (!is_numeric($options['expires_in'])) { - throw new \InvalidArgumentException('expires_in value must be an integer'); - } - - $this->expires = $options['expires_in'] != 0 ? $this->getTimeNow() + $options['expires_in'] : 0; - } elseif (!empty($options['expires'])) { - // Some providers supply the seconds until expiration rather than - // the exact timestamp. Take a best guess at which we received. - $expires = $options['expires']; - - if (!$this->isExpirationTimestamp($expires)) { - $expires += $this->getTimeNow(); - } - - $this->expires = $expires; - } - - // Capture any additional values that might exist in the token but are - // not part of the standard response. Vendors will sometimes pass - // additional user data this way. - $this->values = array_diff_key($options, array_flip([ - 'access_token', - 'resource_owner_id', - 'refresh_token', - 'expires_in', - 'expires', - ])); - } - - /** - * Check if a value is an expiration timestamp or second value. - * - * @param integer $value - * @return bool - */ - protected function isExpirationTimestamp($value) - { - // If the given value is larger than the original OAuth 2 draft date, - // assume that it is meant to be a (possible expired) timestamp. - $oauth2InceptionDate = 1349067600; // 2012-10-01 - return ($value > $oauth2InceptionDate); - } - - /** - * @inheritdoc - */ - public function getToken() - { - return $this->accessToken; - } - - /** - * @inheritdoc - */ - public function getRefreshToken() - { - return $this->refreshToken; - } - - /** - * @inheritdoc - */ - public function getExpires() - { - return $this->expires; - } - - /** - * @inheritdoc - */ - public function getResourceOwnerId() - { - return $this->resourceOwnerId; - } - - /** - * @inheritdoc - */ - public function hasExpired() - { - $expires = $this->getExpires(); - - if (empty($expires)) { - throw new RuntimeException('"expires" is not set on the token'); - } - - return $expires < time(); - } - - /** - * @inheritdoc - */ - public function getValues() - { - return $this->values; - } - - /** - * @inheritdoc - */ - public function __toString() - { - return (string) $this->getToken(); - } - - /** - * @inheritdoc - */ - public function jsonSerialize() - { - $parameters = $this->values; - - if ($this->accessToken) { - $parameters['access_token'] = $this->accessToken; - } - - if ($this->refreshToken) { - $parameters['refresh_token'] = $this->refreshToken; - } - - if ($this->expires) { - $parameters['expires'] = $this->expires; - } - - if ($this->resourceOwnerId) { - $parameters['resource_owner_id'] = $this->resourceOwnerId; - } - - return $parameters; - } -} diff --git a/lib/league/oauth2-client/src/Token/AccessTokenInterface.php b/lib/league/oauth2-client/src/Token/AccessTokenInterface.php deleted file mode 100644 index 5fd219ffc..000000000 --- a/lib/league/oauth2-client/src/Token/AccessTokenInterface.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Token; - -use JsonSerializable; -use ReturnTypeWillChange; -use RuntimeException; - -interface AccessTokenInterface extends JsonSerializable -{ - /** - * Returns the access token string of this instance. - * - * @return string - */ - public function getToken(); - - /** - * Returns the refresh token, if defined. - * - * @return string|null - */ - public function getRefreshToken(); - - /** - * Returns the expiration timestamp in seconds, if defined. - * - * @return integer|null - */ - public function getExpires(); - - /** - * Checks if this token has expired. - * - * @return boolean true if the token has expired, false otherwise. - * @throws RuntimeException if 'expires' is not set on the token. - */ - public function hasExpired(); - - /** - * Returns additional vendor values stored in the token. - * - * @return array - */ - public function getValues(); - - /** - * Returns a string representation of the access token - * - * @return string - */ - public function __toString(); - - /** - * Returns an array of parameters to serialize when this is serialized with - * json_encode(). - * - * @return array - */ - #[ReturnTypeWillChange] - public function jsonSerialize(); -} diff --git a/lib/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php b/lib/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php deleted file mode 100644 index 51e4ce413..000000000 --- a/lib/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Token; - -interface ResourceOwnerAccessTokenInterface extends AccessTokenInterface -{ - /** - * Returns the resource owner identifier, if defined. - * - * @return string|null - */ - public function getResourceOwnerId(); -} diff --git a/lib/league/oauth2-client/src/Tool/ArrayAccessorTrait.php b/lib/league/oauth2-client/src/Tool/ArrayAccessorTrait.php deleted file mode 100644 index a18198cf3..000000000 --- a/lib/league/oauth2-client/src/Tool/ArrayAccessorTrait.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Tool; - -/** - * Provides generic array navigation tools. - */ -trait ArrayAccessorTrait -{ - /** - * Returns a value by key using dot notation. - * - * @param array $data - * @param string $key - * @param mixed|null $default - * @return mixed - */ - private function getValueByKey(array $data, $key, $default = null) - { - if (!is_string($key) || empty($key) || !count($data)) { - return $default; - } - - if (strpos($key, '.') !== false) { - $keys = explode('.', $key); - - foreach ($keys as $innerKey) { - if (!is_array($data) || !array_key_exists($innerKey, $data)) { - return $default; - } - - $data = $data[$innerKey]; - } - - return $data; - } - - return array_key_exists($key, $data) ? $data[$key] : $default; - } -} diff --git a/lib/league/oauth2-client/src/Tool/BearerAuthorizationTrait.php b/lib/league/oauth2-client/src/Tool/BearerAuthorizationTrait.php deleted file mode 100644 index 081c7c861..000000000 --- a/lib/league/oauth2-client/src/Tool/BearerAuthorizationTrait.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Tool; - -use League\OAuth2\Client\Token\AccessTokenInterface; - -/** - * Enables `Bearer` header authorization for providers. - * - * @link http://tools.ietf.org/html/rfc6750 Bearer Token Usage (RFC 6750) - */ -trait BearerAuthorizationTrait -{ - /** - * Returns authorization headers for the 'bearer' grant. - * - * @param AccessTokenInterface|string|null $token Either a string or an access token instance - * @return array - */ - protected function getAuthorizationHeaders($token = null) - { - return ['Authorization' => 'Bearer ' . $token]; - } -} diff --git a/lib/league/oauth2-client/src/Tool/GuardedPropertyTrait.php b/lib/league/oauth2-client/src/Tool/GuardedPropertyTrait.php deleted file mode 100644 index 02c9ba5fb..000000000 --- a/lib/league/oauth2-client/src/Tool/GuardedPropertyTrait.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Tool; - -/** - * Provides support for blacklisting explicit properties from the - * mass assignment behavior. - */ -trait GuardedPropertyTrait -{ - /** - * The properties that aren't mass assignable. - * - * @var array - */ - protected $guarded = []; - - /** - * Attempts to mass assign the given options to explicitly defined properties, - * skipping over any properties that are defined in the guarded array. - * - * @param array $options - * @return mixed - */ - protected function fillProperties(array $options = []) - { - if (isset($options['guarded'])) { - unset($options['guarded']); - } - - foreach ($options as $option => $value) { - if (property_exists($this, $option) && !$this->isGuarded($option)) { - $this->{$option} = $value; - } - } - } - - /** - * Returns current guarded properties. - * - * @return array - */ - public function getGuarded() - { - return $this->guarded; - } - - /** - * Determines if the given property is guarded. - * - * @param string $property - * @return bool - */ - public function isGuarded($property) - { - return in_array($property, $this->getGuarded()); - } -} diff --git a/lib/league/oauth2-client/src/Tool/MacAuthorizationTrait.php b/lib/league/oauth2-client/src/Tool/MacAuthorizationTrait.php deleted file mode 100644 index f8dcd77c5..000000000 --- a/lib/league/oauth2-client/src/Tool/MacAuthorizationTrait.php +++ /dev/null @@ -1,83 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Tool; - -use League\OAuth2\Client\Token\AccessToken; -use League\OAuth2\Client\Token\AccessTokenInterface; - -/** - * Enables `MAC` header authorization for providers. - * - * @link http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-05 Message Authentication Code (MAC) Tokens - */ -trait MacAuthorizationTrait -{ - /** - * Returns the id of this token for MAC generation. - * - * @param AccessToken $token - * @return string - */ - abstract protected function getTokenId(AccessToken $token); - - /** - * Returns the MAC signature for the current request. - * - * @param string $id - * @param integer $ts - * @param string $nonce - * @return string - */ - abstract protected function getMacSignature($id, $ts, $nonce); - - /** - * Returns a new random string to use as the state parameter in an - * authorization flow. - * - * @param int $length Length of the random string to be generated. - * @return string - */ - abstract protected function getRandomState($length = 32); - - /** - * Returns the authorization headers for the 'mac' grant. - * - * @param AccessTokenInterface|string|null $token Either a string or an access token instance - * @return array - * @codeCoverageIgnore - * - * @todo This is currently untested and provided only as an example. If you - * complete the implementation, please create a pull request for - * https://github.com/thephpleague/oauth2-client - */ - protected function getAuthorizationHeaders($token = null) - { - if ($token === null) { - return []; - } - - $ts = time(); - $id = $this->getTokenId($token); - $nonce = $this->getRandomState(16); - $mac = $this->getMacSignature($id, $ts, $nonce); - - $parts = []; - foreach (compact('id', 'ts', 'nonce', 'mac') as $key => $value) { - $parts[] = sprintf('%s="%s"', $key, $value); - } - - return ['Authorization' => 'MAC ' . implode(', ', $parts)]; - } -} diff --git a/lib/league/oauth2-client/src/Tool/ProviderRedirectTrait.php b/lib/league/oauth2-client/src/Tool/ProviderRedirectTrait.php deleted file mode 100644 index f81b511f9..000000000 --- a/lib/league/oauth2-client/src/Tool/ProviderRedirectTrait.php +++ /dev/null @@ -1,122 +0,0 @@ -redirectLimit) { - $attempts++; - $response = $this->getHttpClient()->send($request, [ - 'allow_redirects' => false - ]); - - if ($this->isRedirect($response)) { - $redirectUrl = new Uri($response->getHeader('Location')[0]); - $request = $request->withUri($redirectUrl); - } else { - break; - } - } - - return $response; - } - - /** - * Returns the HTTP client instance. - * - * @return GuzzleHttp\ClientInterface - */ - abstract public function getHttpClient(); - - /** - * Retrieves current redirect limit. - * - * @return integer - */ - public function getRedirectLimit() - { - return $this->redirectLimit; - } - - /** - * Determines if a given response is a redirect. - * - * @param ResponseInterface $response - * - * @return boolean - */ - protected function isRedirect(ResponseInterface $response) - { - $statusCode = $response->getStatusCode(); - - return $statusCode > 300 && $statusCode < 400 && $response->hasHeader('Location'); - } - - /** - * Sends a request instance and returns a response instance. - * - * WARNING: This method does not attempt to catch exceptions caused by HTTP - * errors! It is recommended to wrap this method in a try/catch block. - * - * @param RequestInterface $request - * @return ResponseInterface - */ - public function getResponse(RequestInterface $request) - { - try { - $response = $this->followRequestRedirects($request); - } catch (BadResponseException $e) { - $response = $e->getResponse(); - } - - return $response; - } - - /** - * Updates the redirect limit. - * - * @param integer $limit - * @return League\OAuth2\Client\Provider\AbstractProvider - * @throws InvalidArgumentException - */ - public function setRedirectLimit($limit) - { - if (!is_int($limit)) { - throw new InvalidArgumentException('redirectLimit must be an integer.'); - } - - if ($limit < 1) { - throw new InvalidArgumentException('redirectLimit must be greater than or equal to one.'); - } - - $this->redirectLimit = $limit; - - return $this; - } -} diff --git a/lib/league/oauth2-client/src/Tool/QueryBuilderTrait.php b/lib/league/oauth2-client/src/Tool/QueryBuilderTrait.php deleted file mode 100644 index bdda3e79e..000000000 --- a/lib/league/oauth2-client/src/Tool/QueryBuilderTrait.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Tool; - -/** - * Provides a standard way to generate query strings. - */ -trait QueryBuilderTrait -{ - /** - * Build a query string from an array. - * - * @param array $params - * - * @return string - */ - protected function buildQueryString(array $params) - { - return http_build_query($params, '', '&', \PHP_QUERY_RFC3986); - } -} diff --git a/lib/league/oauth2-client/src/Tool/RequestFactory.php b/lib/league/oauth2-client/src/Tool/RequestFactory.php deleted file mode 100644 index 1af434297..000000000 --- a/lib/league/oauth2-client/src/Tool/RequestFactory.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Tool; - -use GuzzleHttp\Psr7\Request; - -/** - * Used to produce PSR-7 Request instances. - * - * @link https://github.com/guzzle/guzzle/pull/1101 - */ -class RequestFactory -{ - /** - * Creates a PSR-7 Request instance. - * - * @param null|string $method HTTP method for the request. - * @param null|string $uri URI for the request. - * @param array $headers Headers for the message. - * @param string|resource|StreamInterface $body Message body. - * @param string $version HTTP protocol version. - * - * @return Request - */ - public function getRequest( - $method, - $uri, - array $headers = [], - $body = null, - $version = '1.1' - ) { - return new Request($method, $uri, $headers, $body, $version); - } - - /** - * Parses simplified options. - * - * @param array $options Simplified options. - * - * @return array Extended options for use with getRequest. - */ - protected function parseOptions(array $options) - { - // Should match default values for getRequest - $defaults = [ - 'headers' => [], - 'body' => null, - 'version' => '1.1', - ]; - - return array_merge($defaults, $options); - } - - /** - * Creates a request using a simplified array of options. - * - * @param null|string $method - * @param null|string $uri - * @param array $options - * - * @return Request - */ - public function getRequestWithOptions($method, $uri, array $options = []) - { - $options = $this->parseOptions($options); - - return $this->getRequest( - $method, - $uri, - $options['headers'], - $options['body'], - $options['version'] - ); - } -} diff --git a/lib/league/oauth2-client/src/Tool/RequiredParameterTrait.php b/lib/league/oauth2-client/src/Tool/RequiredParameterTrait.php deleted file mode 100644 index 47da97717..000000000 --- a/lib/league/oauth2-client/src/Tool/RequiredParameterTrait.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link http://thephpleague.com/oauth2-client/ Documentation - * @link https://packagist.org/packages/league/oauth2-client Packagist - * @link https://github.com/thephpleague/oauth2-client GitHub - */ - -namespace League\OAuth2\Client\Tool; - -use BadMethodCallException; - -/** - * Provides functionality to check for required parameters. - */ -trait RequiredParameterTrait -{ - /** - * Checks for a required parameter in a hash. - * - * @throws BadMethodCallException - * @param string $name - * @param array $params - * @return void - */ - private function checkRequiredParameter($name, array $params) - { - if (!isset($params[$name])) { - throw new BadMethodCallException(sprintf( - 'Required parameter not passed: "%s"', - $name - )); - } - } - - /** - * Checks for multiple required parameters in a hash. - * - * @throws InvalidArgumentException - * @param array $names - * @param array $params - * @return void - */ - private function checkRequiredParameters(array $names, array $params) - { - foreach ($names as $name) { - $this->checkRequiredParameter($name, $params); - } - } -} diff --git a/lib/league/oauth2-google/CHANGELOG.md b/lib/league/oauth2-google/CHANGELOG.md deleted file mode 100644 index 18b1a9a6e..000000000 --- a/lib/league/oauth2-google/CHANGELOG.md +++ /dev/null @@ -1,72 +0,0 @@ -OAuth 2.0 Google Provider Changelog - -## 3.0.4 - 2021-01-27 - -### Fixed - -- Correct OAuth endpoint, #94 by @Slamdunk - -## 3.0.3 - 2020-07-24 - -### Fixed - -- Remove the `approval_prompt` from default parameters, #90 - -## 3.0.2 - 2019-11-16 - -### Fixed - -- Allow for `family_name` to be undefined in user information, #79 by @majkel89 - -## 3.0.1 - 2018-12-28 - -### Fixed - -- Correct conflict handling for prompt option, #69 by @mxdpeep - -## 3.0.0 - 2018-12-23 - -### Changed - -- Update to latest version of Google OAuth -- Use only OpenID Connect for user details - -### Fixed - -- Correct handling of selecting from multiple user accounts, #45 -- Prevent conflict when using prompt option, #42 - -### Added - -- Add "locale" to user details, #60 -- Support additional scopes at construction - -### Removed - -- Dropped support for Google+ user details, #34 and #63 - -## 2.2.0 - 2018-03-19 - -### Added - -- Hosted domain validation, #54 by @pradtke - -## 2.1.0 - 2018-03-09 - -### Added - -- OpenID Connect support, #48 by @pradtke - -## 2.0.0 - 2017-01-24 - -### Added - -- PHP 7.1 support - -### Removed - -- Dropped PHP 5.5 support - -## 1.0.0 - 2015-08-12 - -- Initial release diff --git a/lib/league/oauth2-google/CONTRIBUTING.md b/lib/league/oauth2-google/CONTRIBUTING.md deleted file mode 100644 index 84554556e..000000000 --- a/lib/league/oauth2-google/CONTRIBUTING.md +++ /dev/null @@ -1,42 +0,0 @@ -# Contributing - -Contributions are **welcome** and will be fully **credited**. - -We accept contributions via Pull Requests on [Github](https://github.com/thephpleague/oauth2-google). - - -## Pull Requests - -- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). - -- **Add tests!** - Your patch won't be accepted if it doesn't have tests. - -- **Document any change in behaviour** - Make sure the README and any other relevant documentation are kept up-to-date. - -- **Consider our release cycle** - We try to follow SemVer. Randomly breaking public APIs is not an option. - -- **Create topic branches** - Don't ask us to pull from your master branch. - -- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. - -- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. - -- **Ensure tests pass!** - Please run the tests (see below) before submitting your pull request, and make sure they pass. We won't accept a patch until all tests pass. - -- **Ensure no coding standards violations** - Please run PHP Code Sniffer using the PSR-2 standard (see below) before submitting your pull request. A violation will cause the build to fail, so please make sure there are no violations. We can't accept a patch if the build fails. - - -## Running Tests - -```sh -composer test -``` - - -## Running PHP Code Sniffer - -```sh -composer check -``` - -**Happy coding**! diff --git a/lib/league/oauth2-google/LICENSE b/lib/league/oauth2-google/LICENSE deleted file mode 100644 index 6d451561e..000000000 --- a/lib/league/oauth2-google/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Woody Gilk - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/league/oauth2-google/README.md b/lib/league/oauth2-google/README.md deleted file mode 100644 index df69dcd12..000000000 --- a/lib/league/oauth2-google/README.md +++ /dev/null @@ -1,242 +0,0 @@ -# Google Provider for OAuth 2.0 Client - -[![Join the chat](https://img.shields.io/badge/gitter-join-1DCE73.svg)](https://gitter.im/thephpleague/oauth2-google) -[![Build Status](https://img.shields.io/travis/thephpleague/oauth2-google.svg)](https://travis-ci.org/thephpleague/oauth2-google) -[![Code Coverage](https://img.shields.io/coveralls/thephpleague/oauth2-google.svg)](https://coveralls.io/r/thephpleague/oauth2-google) -[![Code Quality](https://img.shields.io/scrutinizer/g/thephpleague/oauth2-google.svg)](https://scrutinizer-ci.com/g/thephpleague/oauth2-google/) -[![License](https://img.shields.io/packagist/l/league/oauth2-google.svg)](https://github.com/thephpleague/oauth2-google/blob/master/LICENSE) -[![Latest Stable Version](https://img.shields.io/packagist/v/league/oauth2-google.svg)](https://packagist.org/packages/league/oauth2-google) - -This package provides Google OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client). - -This package is compliant with [PSR-1][], [PSR-2][] and [PSR-4][]. If you notice compliance oversights, please send -a patch via pull request. - -[PSR-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md -[PSR-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md -[PSR-4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md - -## Requirements - -The following versions of PHP are supported. - -* PHP 7.0 -* PHP 7.1 -* PHP 7.2 -* PHP 7.3 -* PHP 7.4 - -This package uses [OpenID Connect][openid-connect] to authenticate users with -Google accounts. - -To use this package, it will be necessary to have a Google client ID and client -secret. These are referred to as `{google-client-id}` and `{google-client-secret}` -in the documentation. - -Please follow the [Google instructions][oauth-setup] to create the required credentials. - -[openid-connect]: https://developers.google.com/identity/protocols/OpenIDConnect -[oauth-setup]: https://developers.google.com/identity/protocols/OpenIDConnect#registeringyourapp - -## Installation - -To install, use composer: - -```sh -composer require league/oauth2-google -``` - -## Usage - -### Authorization Code Flow - -```php -require __DIR__ . '/vendor/autoload.php'; - -use League\OAuth2\Client\Provider\Google; - -session_start(); // Remove if session.auto_start=1 in php.ini - -$provider = new Google([ - 'clientId' => '{google-client-id}', - 'clientSecret' => '{google-client-secret}', - 'redirectUri' => 'https://example.com/callback-url', - 'hostedDomain' => 'example.com', // optional; used to restrict access to users on your G Suite/Google Apps for Business accounts -]); - -if (!empty($_GET['error'])) { - - // Got an error, probably user denied access - exit('Got error: ' . htmlspecialchars($_GET['error'], ENT_QUOTES, 'UTF-8')); - -} elseif (empty($_GET['code'])) { - - // If we don't have an authorization code then get one - $authUrl = $provider->getAuthorizationUrl(); - $_SESSION['oauth2state'] = $provider->getState(); - header('Location: ' . $authUrl); - exit; - -} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { - - // State is invalid, possible CSRF attack in progress - unset($_SESSION['oauth2state']); - exit('Invalid state'); - -} else { - - // Try to get an access token (using the authorization code grant) - $token = $provider->getAccessToken('authorization_code', [ - 'code' => $_GET['code'] - ]); - - // Optional: Now you have a token you can look up a users profile data - try { - - // We got an access token, let's now get the owner details - $ownerDetails = $provider->getResourceOwner($token); - - // Use these details to create a new profile - printf('Hello %s!', $ownerDetails->getFirstName()); - - } catch (Exception $e) { - - // Failed to get user details - exit('Something went wrong: ' . $e->getMessage()); - - } - - // Use this to interact with an API on the users behalf - echo $token->getToken(); - - // Use this to get a new access token if the old one expires - echo $token->getRefreshToken(); - - // Unix timestamp at which the access token expires - echo $token->getExpires(); -} -``` - -#### Available Options - -The `Google` provider has the following [options][auth-params]: - -- `accessType` to use online or offline access -- `hostedDomain` to authenticate G Suite users -- `prompt` to modify the prompt that the user will see -- `scopes` to request access to additional user information - -[auth-params]: https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters - -#### Accessing Token JWT - -Google provides a [JSON Web Token][jwt] (JWT) with all access tokens. This token -[contains basic information][openid-jwt] about the authenticated user. The JWT -can be accessed from the `id_token` value of the access token: - -```php -/** @var League\OAuth2\Client\Token\AccessToken $token */ -$values = $token->getValues(); - -/** @var string */ -$jwt = $values['id_token']; -``` - -Parsing the JWT will require a [JWT parser][jwt-parsers]. Refer to parser -documentation for instructions. - -[jwt]: https://jwt.io/ -[openid-jwt]: https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo -[jwt-parsers]: https://packagist.org/search/?q=jwt - -### Refreshing a Token - -Refresh tokens are only provided to applications which request offline access. You can specify offline access by setting the `accessType` option in your provider: - -```php -use League\OAuth2\Client\Provider\Google; - -$provider = new Google([ - 'clientId' => '{google-client-id}', - 'clientSecret' => '{google-client-secret}', - 'redirectUri' => 'https://example.com/callback-url', - 'accessType' => 'offline', -]); -``` - -It is important to note that the refresh token is only returned on the first request after this it will be `null`. You should securely store the refresh token when it is returned: - -```php -$token = $provider->getAccessToken('authorization_code', [ - 'code' => $code -]); - -// persist the token in a database -$refreshToken = $token->getRefreshToken(); -``` - -If you ever need to get a new refresh token you can request one by forcing the consent prompt: - -```php -$authUrl = $provider->getAuthorizationUrl(['prompt' => 'consent']); -``` - -Now you have everything you need to refresh an access token using a refresh token: - -```php -use League\OAuth2\Client\Provider\Google; -use League\OAuth2\Client\Grant\RefreshToken; - -$provider = new Google([ - 'clientId' => '{google-client-id}', - 'clientSecret' => '{google-client-secret}', - 'redirectUri' => 'https://example.com/callback-url', -]); - -$grant = new RefreshToken(); -$token = $provider->getAccessToken($grant, ['refresh_token' => $refreshToken]); -``` - -## Scopes - -Additional [scopes][scopes] can be set by using the `scope` parameter when -generating the authorization URL: - -```php -$authorizationUrl = $provider->getAuthorizationUrl([ - 'scope' => [ - 'scope-url-here' - ], -]); -``` - -[scopes]: https://developers.google.com/identity/protocols/googlescopes - -## Testing - -Tests can be run with: - -```sh -composer test -``` - -Style checks can be run with: - -```sh -composer check -``` - -## Contributing - -Please see [CONTRIBUTING](https://github.com/thephpleague/oauth2-google/blob/master/CONTRIBUTING.md) for details. - - -## Credits - -- [Woody Gilk](https://github.com/shadowhand) -- [All Contributors](https://github.com/thephpleague/oauth2-google/contributors) - - -## License - -The MIT License (MIT). Please see [License File](https://github.com/thephpleague/oauth2-google/blob/master/LICENSE) for more information. diff --git a/lib/league/oauth2-google/composer.json b/lib/league/oauth2-google/composer.json deleted file mode 100644 index f34a1cec9..000000000 --- a/lib/league/oauth2-google/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "league/oauth2-google", - "description": "Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client", - "license": "MIT", - "authors": [ - { - "name": "Woody Gilk", - "email": "woody.gilk@gmail.com", - "homepage": "http://shadowhand.me" - } - ], - "keywords": [ - "oauth", - "oauth2", - "client", - "authorization", - "authentication", - "google" - ], - "minimum-stability": "stable", - "require": { - "league/oauth2-client": "^2.0" - }, - "require-dev": { - "eloquent/phony-phpunit": "^2.0", - "phpunit/phpunit": "^6.0", - "php-coveralls/php-coveralls": "^2.1", - "squizlabs/php_codesniffer": "^2.0" - }, - "autoload": { - "psr-4": { - "League\\OAuth2\\Client\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "League\\OAuth2\\Client\\Test\\": "test/src/" - } - }, - "scripts": { - "test": "phpunit", - "check": "phpcs src --standard=psr2 -sp" - } -} diff --git a/lib/league/oauth2-google/examples/index.php b/lib/league/oauth2-google/examples/index.php deleted file mode 100644 index 913843777..000000000 --- a/lib/league/oauth2-google/examples/index.php +++ /dev/null @@ -1,35 +0,0 @@ -getAuthorizationUrl(); - $_SESSION['oauth2state'] = $provider->getState(); - header('Location: ' . $authUrl); - exit; - -} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { - - // State is invalid, possible CSRF attack in progress - unset($_SESSION['oauth2state']); - exit('Invalid state'); - -} else { - - // Try to get an access token (using the authorization code grant) - $token = $provider->getAccessToken('authorization_code', [ - 'code' => $_GET['code'] - ]); - - $_SESSION['token'] = serialize($token); - - // Optional: Now you have a token you can look up a users profile data - header('Location: /user.php'); -} diff --git a/lib/league/oauth2-google/examples/provider.php b/lib/league/oauth2-google/examples/provider.php deleted file mode 100644 index 4001f6857..000000000 --- a/lib/league/oauth2-google/examples/provider.php +++ /dev/null @@ -1,24 +0,0 @@ -getResourceOwner($token); - - // Use these details to create a new profile - printf('Hello %s!
    ', $userDetails->getFirstname()); -} catch (Exception $e) { - // Failed to get user details - exit('Something went wrong: ' . $e->getMessage()); -} - -// Use this to interact with an API on the users behalf -echo "Token is: ", $token->getToken(), "
    "; - -// Use this to get a new access token if the old one expires -echo "Refresh token is: ", $token->getRefreshToken(), "
    "; - -// Number of seconds until the access token will expire, and need refreshing -echo "Expires at ", date('r', $token->getExpires()), "
    "; - -// Allow the user to logout -echo 'Logout
    '; diff --git a/lib/league/oauth2-google/phpunit.xml.dist b/lib/league/oauth2-google/phpunit.xml.dist deleted file mode 100644 index 7f37586aa..000000000 --- a/lib/league/oauth2-google/phpunit.xml.dist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - ./test - - - - - src/ - - - - - - - - diff --git a/lib/league/oauth2-google/src/Exception/HostedDomainException.php b/lib/league/oauth2-google/src/Exception/HostedDomainException.php deleted file mode 100644 index b38a41580..000000000 --- a/lib/league/oauth2-google/src/Exception/HostedDomainException.php +++ /dev/null @@ -1,15 +0,0 @@ -hostedDomain) { - $options['hd'] = $this->hostedDomain; - } - - if (empty($options['access_type']) && $this->accessType) { - $options['access_type'] = $this->accessType; - } - - if (empty($options['prompt']) && $this->prompt) { - $options['prompt'] = $this->prompt; - } - - // Default scopes MUST be included for OpenID Connect. - // Additional scopes MAY be added by constructor or option. - $scopes = array_merge($this->getDefaultScopes(), $this->scopes); - - if (!empty($options['scope'])) { - $scopes = array_merge($scopes, $options['scope']); - } - - $options['scope'] = array_unique($scopes); - - $options = parent::getAuthorizationParameters($options); - - // The "approval_prompt" MUST be removed as it is not supported by Google, use "prompt" instead: - // https://developers.google.com/identity/protocols/oauth2/openid-connect#prompt - unset($options['approval_prompt']); - - return $options; - } - - protected function getDefaultScopes() - { - // "openid" MUST be the first scope in the list. - return [ - 'openid', - 'email', - 'profile', - ]; - } - - protected function getScopeSeparator() - { - return ' '; - } - - protected function checkResponse(ResponseInterface $response, $data) - { - // @codeCoverageIgnoreStart - if (empty($data['error'])) { - return; - } - // @codeCoverageIgnoreEnd - - $code = 0; - $error = $data['error']; - - if (is_array($error)) { - $code = $error['code']; - $error = $error['message']; - } - - throw new IdentityProviderException($error, $code, $data); - } - - protected function createResourceOwner(array $response, AccessToken $token) - { - $user = new GoogleUser($response); - - $this->assertMatchingDomain($user->getHostedDomain()); - - return $user; - } - - /** - * @throws HostedDomainException If the domain does not match the configured domain. - */ - protected function assertMatchingDomain($hostedDomain) - { - if ($this->hostedDomain === null) { - // No hosted domain configured. - return; - } - - if ($this->hostedDomain === '*' && $hostedDomain) { - // Any hosted domain is allowed. - return; - } - - if ($this->hostedDomain === $hostedDomain) { - // Hosted domain is correct. - return; - } - - throw HostedDomainException::notMatchingDomain($this->hostedDomain); - } -} diff --git a/lib/league/oauth2-google/src/Provider/GoogleUser.php b/lib/league/oauth2-google/src/Provider/GoogleUser.php deleted file mode 100644 index 1100b1dbe..000000000 --- a/lib/league/oauth2-google/src/Provider/GoogleUser.php +++ /dev/null @@ -1,112 +0,0 @@ -response = $response; - } - - public function getId() - { - return $this->response['sub']; - } - - /** - * Get preferred display name. - * - * @return string - */ - public function getName() - { - return $this->response['name']; - } - - /** - * Get preferred first name. - * - * @return string|null - */ - public function getFirstName() - { - return $this->getResponseValue('given_name'); - } - - /** - * Get preferred last name. - * - * @return string|null - */ - public function getLastName() - { - return $this->getResponseValue('family_name'); - } - - /** - * Get locale. - * - * @return string|null - */ - public function getLocale() - { - return $this->getResponseValue('locale'); - } - - /** - * Get email address. - * - * @return string|null - */ - public function getEmail() - { - return $this->getResponseValue('email'); - } - - /** - * Get hosted domain. - * - * @return string|null - */ - public function getHostedDomain() - { - return $this->getResponseValue('hd'); - } - - /** - * Get avatar image URL. - * - * @return string|null - */ - public function getAvatar() - { - return $this->getResponseValue('picture'); - } - - /** - * Get user data as an array. - * - * @return array - */ - public function toArray() - { - return $this->response; - } - - private function getResponseValue($key) - { - if (array_key_exists($key, $this->response)) { - return $this->response[$key]; - } - return null; - } -} diff --git a/lib/nikic/php-parser/LICENSE b/lib/nikic/php-parser/LICENSE deleted file mode 100644 index 2e5671835..000000000 --- a/lib/nikic/php-parser/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2011, Nikita Popov -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/nikic/php-parser/README.md b/lib/nikic/php-parser/README.md deleted file mode 100644 index 708cdfcbd..000000000 --- a/lib/nikic/php-parser/README.md +++ /dev/null @@ -1,225 +0,0 @@ -PHP Parser -========== - -[![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) - -This is a PHP 5.2 to PHP 8.1 parser written in PHP. Its purpose is to simplify static code analysis and -manipulation. - -[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1). - -[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). - -Features --------- - -The main features provided by this library are: - - * Parsing PHP 5, PHP 7, and PHP 8 code into an abstract syntax tree (AST). - * Invalid code can be parsed into a partial AST. - * The AST contains accurate location information. - * Dumping the AST in human-readable form. - * Converting an AST back to PHP code. - * Experimental: Formatting can be preserved for partially changed ASTs. - * Infrastructure to traverse and modify ASTs. - * Resolution of namespaced names. - * Evaluation of constant expressions. - * Builders to simplify AST construction for code generation. - * Converting an AST into JSON and back. - -Quick Start ------------ - -Install the library using [composer](https://getcomposer.org): - - php composer.phar require nikic/php-parser - -Parse some PHP code into an AST and dump the result in human-readable form: - -```php -create(ParserFactory::PREFER_PHP7); -try { - $ast = $parser->parse($code); -} catch (Error $error) { - echo "Parse error: {$error->getMessage()}\n"; - return; -} - -$dumper = new NodeDumper; -echo $dumper->dump($ast) . "\n"; -``` - -This dumps an AST looking something like this: - -``` -array( - 0: Stmt_Function( - byRef: false - name: Identifier( - name: test - ) - params: array( - 0: Param( - type: null - byRef: false - variadic: false - var: Expr_Variable( - name: foo - ) - default: null - ) - ) - returnType: null - stmts: array( - 0: Stmt_Expression( - expr: Expr_FuncCall( - name: Name( - parts: array( - 0: var_dump - ) - ) - args: array( - 0: Arg( - value: Expr_Variable( - name: foo - ) - byRef: false - unpack: false - ) - ) - ) - ) - ) - ) -) -``` - -Let's traverse the AST and perform some kind of modification. For example, drop all function bodies: - -```php -use PhpParser\Node; -use PhpParser\Node\Stmt\Function_; -use PhpParser\NodeTraverser; -use PhpParser\NodeVisitorAbstract; - -$traverser = new NodeTraverser(); -$traverser->addVisitor(new class extends NodeVisitorAbstract { - public function enterNode(Node $node) { - if ($node instanceof Function_) { - // Clean out the function body - $node->stmts = []; - } - } -}); - -$ast = $traverser->traverse($ast); -echo $dumper->dump($ast) . "\n"; -``` - -This gives us an AST where the `Function_::$stmts` are empty: - -``` -array( - 0: Stmt_Function( - byRef: false - name: Identifier( - name: test - ) - params: array( - 0: Param( - type: null - byRef: false - variadic: false - var: Expr_Variable( - name: foo - ) - default: null - ) - ) - returnType: null - stmts: array( - ) - ) -) -``` - -Finally, we can convert the new AST back to PHP code: - -```php -use PhpParser\PrettyPrinter; - -$prettyPrinter = new PrettyPrinter\Standard; -echo $prettyPrinter->prettyPrintFile($ast); -``` - -This gives us our original code, minus the `var_dump()` call inside the function: - -```php - [ - 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' -]]); -$parser = (new PhpParser\ParserFactory)->create( - PhpParser\ParserFactory::PREFER_PHP7, - $lexer -); -$dumper = new PhpParser\NodeDumper([ - 'dumpComments' => true, - 'dumpPositions' => $attributes['with-positions'], -]); -$prettyPrinter = new PhpParser\PrettyPrinter\Standard; - -$traverser = new PhpParser\NodeTraverser(); -$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); - -foreach ($files as $file) { - if (strpos($file, ' Code $code\n"); - } else { - if (!file_exists($file)) { - fwrite(STDERR, "File $file does not exist.\n"); - exit(1); - } - - $code = file_get_contents($file); - fwrite(STDERR, "====> File $file:\n"); - } - - if ($attributes['with-recovery']) { - $errorHandler = new PhpParser\ErrorHandler\Collecting; - $stmts = $parser->parse($code, $errorHandler); - foreach ($errorHandler->getErrors() as $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); - } - if (null === $stmts) { - continue; - } - } else { - try { - $stmts = $parser->parse($code); - } catch (PhpParser\Error $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); - exit(1); - } - } - - foreach ($operations as $operation) { - if ('dump' === $operation) { - fwrite(STDERR, "==> Node dump:\n"); - echo $dumper->dump($stmts, $code), "\n"; - } elseif ('pretty-print' === $operation) { - fwrite(STDERR, "==> Pretty print:\n"); - echo $prettyPrinter->prettyPrintFile($stmts), "\n"; - } elseif ('json-dump' === $operation) { - fwrite(STDERR, "==> JSON dump:\n"); - echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; - } elseif ('var-dump' === $operation) { - fwrite(STDERR, "==> var_dump():\n"); - var_dump($stmts); - } elseif ('resolve-names' === $operation) { - fwrite(STDERR, "==> Resolved names.\n"); - $stmts = $traverser->traverse($stmts); - } - } -} - -function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { - if ($withColumnInfo && $e->hasColumnInfo()) { - return $e->getMessageWithColumnInfo($code); - } else { - return $e->getMessage(); - } -} - -function showHelp($error = '') { - if ($error) { - fwrite(STDERR, $error . "\n\n"); - } - fwrite($error ? STDERR : STDOUT, << false, - 'with-positions' => false, - 'with-recovery' => false, - ]; - - array_shift($args); - $parseOptions = true; - foreach ($args as $arg) { - if (!$parseOptions) { - $files[] = $arg; - continue; - } - - switch ($arg) { - case '--dump': - case '-d': - $operations[] = 'dump'; - break; - case '--pretty-print': - case '-p': - $operations[] = 'pretty-print'; - break; - case '--json-dump': - case '-j': - $operations[] = 'json-dump'; - break; - case '--var-dump': - $operations[] = 'var-dump'; - break; - case '--resolve-names': - case '-N'; - $operations[] = 'resolve-names'; - break; - case '--with-column-info': - case '-c'; - $attributes['with-column-info'] = true; - break; - case '--with-positions': - case '-P': - $attributes['with-positions'] = true; - break; - case '--with-recovery': - case '-r': - $attributes['with-recovery'] = true; - break; - case '--help': - case '-h'; - showHelp(); - break; - case '--': - $parseOptions = false; - break; - default: - if ($arg[0] === '-') { - showHelp("Invalid operation $arg."); - } else { - $files[] = $arg; - } - } - } - - return [$operations, $files, $attributes]; -} diff --git a/lib/nikic/php-parser/composer.json b/lib/nikic/php-parser/composer.json deleted file mode 100644 index 2fd064a21..000000000 --- a/lib/nikic/php-parser/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "nikic/php-parser", - "type": "library", - "description": "A PHP parser written in PHP", - "keywords": [ - "php", - "parser" - ], - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Nikita Popov" - } - ], - "require": { - "php": ">=7.0", - "ext-tokenizer": "*" - }, - "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0", - "ircmaxell/php-yacc": "^0.0.7" - }, - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "autoload-dev": { - "psr-4": { - "PhpParser\\": "test/PhpParser/" - } - }, - "bin": [ - "bin/php-parse" - ] -} diff --git a/lib/nikic/php-parser/grammar/README.md b/lib/nikic/php-parser/grammar/README.md deleted file mode 100644 index 4bae11d82..000000000 --- a/lib/nikic/php-parser/grammar/README.md +++ /dev/null @@ -1,30 +0,0 @@ -What do all those files mean? -============================= - - * `php5.y`: PHP 5 grammar written in a pseudo language - * `php7.y`: PHP 7 grammar written in a pseudo language - * `tokens.y`: Tokens definition shared between PHP 5 and PHP 7 grammars - * `parser.template`: A `kmyacc` parser prototype file for PHP - * `tokens.template`: A `kmyacc` prototype file for the `Tokens` class - * `rebuildParsers.php`: Preprocesses the grammar and builds the parser using `kmyacc` - -.phpy pseudo language -===================== - -The `.y` file is a normal grammar in `kmyacc` (`yacc`) style, with some transformations -applied to it: - - * Nodes are created using the syntax `Name[..., ...]`. This is transformed into - `new Name(..., ..., attributes())` - * Some function-like constructs are resolved (see `rebuildParsers.php` for a list) - -Building the parser -=================== - -Run `php grammar/rebuildParsers.php` to rebuild the parsers. Additional options: - - * The `KMYACC` environment variable can be used to specify an alternative `kmyacc` binary. - By default the `phpyacc` dev dependency will be used. To use the original `kmyacc`, you - need to compile [moriyoshi's fork](https://github.com/moriyoshi/kmyacc-forked). - * The `--debug` option enables emission of debug symbols and creates the `y.output` file. - * The `--keep-tmp-grammar` option preserves the preprocessed grammar file. diff --git a/lib/nikic/php-parser/grammar/parser.template b/lib/nikic/php-parser/grammar/parser.template deleted file mode 100644 index 6166607c9..000000000 --- a/lib/nikic/php-parser/grammar/parser.template +++ /dev/null @@ -1,106 +0,0 @@ -semValue -#semval($,%t) $this->semValue -#semval(%n) $stackPos-(%l-%n) -#semval(%n,%t) $stackPos-(%l-%n) - -namespace PhpParser\Parser; - -use PhpParser\Error; -use PhpParser\Node; -use PhpParser\Node\Expr; -use PhpParser\Node\Name; -use PhpParser\Node\Scalar; -use PhpParser\Node\Stmt; -#include; - -/* This is an automatically GENERATED file, which should not be manually edited. - * Instead edit one of the following: - * * the grammar files grammar/php5.y or grammar/php7.y - * * the skeleton file grammar/parser.template - * * the preprocessing script grammar/rebuildParsers.php - */ -class #(-p) extends \PhpParser\ParserAbstract -{ - protected $tokenToSymbolMapSize = #(YYMAXLEX); - protected $actionTableSize = #(YYLAST); - protected $gotoTableSize = #(YYGLAST); - - protected $invalidSymbol = #(YYBADCH); - protected $errorSymbol = #(YYINTERRTOK); - protected $defaultAction = #(YYDEFAULT); - protected $unexpectedTokenRule = #(YYUNEXPECTED); - - protected $YY2TBLSTATE = #(YY2TBLSTATE); - protected $numNonLeafStates = #(YYNLSTATES); - - protected $symbolToName = array( - #listvar terminals - ); - - protected $tokenToSymbol = array( - #listvar yytranslate - ); - - protected $action = array( - #listvar yyaction - ); - - protected $actionCheck = array( - #listvar yycheck - ); - - protected $actionBase = array( - #listvar yybase - ); - - protected $actionDefault = array( - #listvar yydefault - ); - - protected $goto = array( - #listvar yygoto - ); - - protected $gotoCheck = array( - #listvar yygcheck - ); - - protected $gotoBase = array( - #listvar yygbase - ); - - protected $gotoDefault = array( - #listvar yygdefault - ); - - protected $ruleToNonTerminal = array( - #listvar yylhs - ); - - protected $ruleToLength = array( - #listvar yylen - ); -#if -t - - protected $productions = array( - #production-strings; - ); -#endif - - protected function initReduceCallbacks() { - $this->reduceCallbacks = [ -#reduce - %n => function ($stackPos) { - %b - }, -#noact - %n => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, -#endreduce - ]; - } -} -#tailcode; diff --git a/lib/nikic/php-parser/grammar/php5.y b/lib/nikic/php-parser/grammar/php5.y deleted file mode 100644 index a62e9a310..000000000 --- a/lib/nikic/php-parser/grammar/php5.y +++ /dev/null @@ -1,1036 +0,0 @@ -%pure_parser -%expect 6 - -%tokens - -%% - -start: - top_statement_list { $$ = $this->handleNamespaces($1); } -; - -top_statement_list_ex: - top_statement_list_ex top_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -top_statement_list: - top_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -ampersand: - T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG -; - -reserved_non_modifiers: - T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND - | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE - | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH - | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO - | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT - | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS - | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN - | T_MATCH -; - -semi_reserved: - reserved_non_modifiers - | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC -; - -identifier_ex: - T_STRING { $$ = Node\Identifier[$1]; } - | semi_reserved { $$ = Node\Identifier[$1]; } -; - -identifier: - T_STRING { $$ = Node\Identifier[$1]; } -; - -reserved_non_modifiers_identifier: - reserved_non_modifiers { $$ = Node\Identifier[$1]; } -; - -namespace_name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } -; - -legacy_namespace_name: - namespace_name { $$ = $1; } - | T_NAME_FULLY_QUALIFIED { $$ = Name[substr($1, 1)]; } -; - -plain_variable: - T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } -; - -top_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } - | T_NAMESPACE namespace_name ';' - { $$ = Stmt\Namespace_[$2, null]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($$); } - | T_NAMESPACE namespace_name '{' top_statement_list '}' - { $$ = Stmt\Namespace_[$2, $4]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_NAMESPACE '{' top_statement_list '}' - { $$ = Stmt\Namespace_[null, $3]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_USE use_declarations ';' { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } - | T_USE use_type use_declarations ';' { $$ = Stmt\Use_[$3, $2]; } - | group_use_declaration ';' { $$ = $1; } - | T_CONST constant_declaration_list ';' { $$ = Stmt\Const_[$2]; } -; - -use_type: - T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; } - | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; } -; - -group_use_declaration: - T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}' - { $$ = Stmt\GroupUse[$3, $6, $2]; } - | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}' - { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; } -; - -unprefixed_use_declarations: - unprefixed_use_declarations ',' unprefixed_use_declaration - { push($1, $3); } - | unprefixed_use_declaration { init($1); } -; - -use_declarations: - use_declarations ',' use_declaration { push($1, $3); } - | use_declaration { init($1); } -; - -inline_use_declarations: - inline_use_declarations ',' inline_use_declaration { push($1, $3); } - | inline_use_declaration { init($1); } -; - -unprefixed_use_declaration: - namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | namespace_name T_AS identifier - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -use_declaration: - legacy_namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | legacy_namespace_name T_AS identifier - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -inline_use_declaration: - unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; } - | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; } -; - -constant_declaration_list: - constant_declaration_list ',' constant_declaration { push($1, $3); } - | constant_declaration { init($1); } -; - -constant_declaration: - identifier '=' static_scalar { $$ = Node\Const_[$1, $3]; } -; - -class_const_list: - class_const_list ',' class_const { push($1, $3); } - | class_const { init($1); } -; - -class_const: - identifier_ex '=' static_scalar { $$ = Node\Const_[$1, $3]; } -; - -inner_statement_list_ex: - inner_statement_list_ex inner_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -inner_statement_list: - inner_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -inner_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); } -; - -non_empty_statement: - '{' inner_statement_list '}' - { - if ($2) { - $$ = $2; prependLeadingComments($$); - } else { - makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if (null === $$) { $$ = array(); } - } - } - | T_IF parentheses_expr statement elseif_list else_single - { $$ = Stmt\If_[$2, ['stmts' => toArray($3), 'elseifs' => $4, 'else' => $5]]; } - | T_IF parentheses_expr ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';' - { $$ = Stmt\If_[$2, ['stmts' => $4, 'elseifs' => $5, 'else' => $6]]; } - | T_WHILE parentheses_expr while_statement { $$ = Stmt\While_[$2, $3]; } - | T_DO statement T_WHILE parentheses_expr ';' { $$ = Stmt\Do_ [$4, toArray($2)]; } - | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement - { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; } - | T_SWITCH parentheses_expr switch_case_list { $$ = Stmt\Switch_[$2, $3]; } - | T_BREAK ';' { $$ = Stmt\Break_[null]; } - | T_BREAK expr ';' { $$ = Stmt\Break_[$2]; } - | T_CONTINUE ';' { $$ = Stmt\Continue_[null]; } - | T_CONTINUE expr ';' { $$ = Stmt\Continue_[$2]; } - | T_RETURN ';' { $$ = Stmt\Return_[null]; } - | T_RETURN expr ';' { $$ = Stmt\Return_[$2]; } - | T_GLOBAL global_var_list ';' { $$ = Stmt\Global_[$2]; } - | T_STATIC static_var_list ';' { $$ = Stmt\Static_[$2]; } - | T_ECHO expr_list ';' { $$ = Stmt\Echo_[$2]; } - | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; } - | yield_expr ';' { $$ = Stmt\Expression[$1]; } - | expr ';' { $$ = Stmt\Expression[$1]; } - | T_UNSET '(' variables_list ')' ';' { $$ = Stmt\Unset_[$3]; } - | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; } - | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; } - | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; } - | T_TRY '{' inner_statement_list '}' catches optional_finally - { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); } - | T_THROW expr ';' { $$ = Stmt\Throw_[$2]; } - | T_GOTO identifier ';' { $$ = Stmt\Goto_[$2]; } - | identifier ':' { $$ = Stmt\Label[$1]; } - | expr error { $$ = Stmt\Expression[$1]; } - | error { $$ = array(); /* means: no statement */ } -; - -statement: - non_empty_statement { $$ = $1; } - | ';' - { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if ($$ === null) $$ = array(); /* means: no statement */ } -; - -catches: - /* empty */ { init(); } - | catches catch { push($1, $2); } -; - -catch: - T_CATCH '(' name plain_variable ')' '{' inner_statement_list '}' - { $$ = Stmt\Catch_[array($3), $4, $7]; } -; - -optional_finally: - /* empty */ { $$ = null; } - | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; } -; - -variables_list: - variable { init($1); } - | variables_list ',' variable { push($1, $3); } -; - -optional_ref: - /* empty */ { $$ = false; } - | ampersand { $$ = true; } -; - -optional_arg_ref: - /* empty */ { $$ = false; } - | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG { $$ = true; } -; - -optional_ellipsis: - /* empty */ { $$ = false; } - | T_ELLIPSIS { $$ = true; } -; - -function_declaration_statement: - T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type '{' inner_statement_list '}' - { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $9]]; } -; - -class_declaration_statement: - class_entry_type identifier extends_from implements_list '{' class_statement_list '}' - { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]]; - $this->checkClass($$, #2); } - | T_INTERFACE identifier interface_extends_list '{' class_statement_list '}' - { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]]; - $this->checkInterface($$, #2); } - | T_TRAIT identifier '{' class_statement_list '}' - { $$ = Stmt\Trait_[$2, ['stmts' => $4]]; } -; - -class_entry_type: - T_CLASS { $$ = 0; } - | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; } -; - -extends_from: - /* empty */ { $$ = null; } - | T_EXTENDS class_name { $$ = $2; } -; - -interface_extends_list: - /* empty */ { $$ = array(); } - | T_EXTENDS class_name_list { $$ = $2; } -; - -implements_list: - /* empty */ { $$ = array(); } - | T_IMPLEMENTS class_name_list { $$ = $2; } -; - -class_name_list: - class_name { init($1); } - | class_name_list ',' class_name { push($1, $3); } -; - -for_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; } -; - -foreach_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; } -; - -declare_statement: - non_empty_statement { $$ = toArray($1); } - | ';' { $$ = null; } - | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; } -; - -declare_list: - declare_list_element { init($1); } - | declare_list ',' declare_list_element { push($1, $3); } -; - -declare_list_element: - identifier '=' static_scalar { $$ = Stmt\DeclareDeclare[$1, $3]; } -; - -switch_case_list: - '{' case_list '}' { $$ = $2; } - | '{' ';' case_list '}' { $$ = $3; } - | ':' case_list T_ENDSWITCH ';' { $$ = $2; } - | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; } -; - -case_list: - /* empty */ { init(); } - | case_list case { push($1, $2); } -; - -case: - T_CASE expr case_separator inner_statement_list_ex { $$ = Stmt\Case_[$2, $4]; } - | T_DEFAULT case_separator inner_statement_list_ex { $$ = Stmt\Case_[null, $3]; } -; - -case_separator: - ':' - | ';' -; - -while_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } -; - -elseif_list: - /* empty */ { init(); } - | elseif_list elseif { push($1, $2); } -; - -elseif: - T_ELSEIF parentheses_expr statement { $$ = Stmt\ElseIf_[$2, toArray($3)]; } -; - -new_elseif_list: - /* empty */ { init(); } - | new_elseif_list new_elseif { push($1, $2); } -; - -new_elseif: - T_ELSEIF parentheses_expr ':' inner_statement_list { $$ = Stmt\ElseIf_[$2, $4]; } -; - -else_single: - /* empty */ { $$ = null; } - | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; } -; - -new_else_single: - /* empty */ { $$ = null; } - | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; } -; - -foreach_variable: - variable { $$ = array($1, false); } - | ampersand variable { $$ = array($2, true); } - | list_expr { $$ = array($1, false); } -; - -parameter_list: - non_empty_parameter_list { $$ = $1; } - | /* empty */ { $$ = array(); } -; - -non_empty_parameter_list: - parameter { init($1); } - | non_empty_parameter_list ',' parameter { push($1, $3); } -; - -parameter: - optional_param_type optional_arg_ref optional_ellipsis plain_variable - { $$ = Node\Param[$4, null, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_arg_ref optional_ellipsis plain_variable '=' static_scalar - { $$ = Node\Param[$4, $6, $1, $2, $3]; $this->checkParam($$); } -; - -type: - name { $$ = $1; } - | T_ARRAY { $$ = Node\Identifier['array']; } - | T_CALLABLE { $$ = Node\Identifier['callable']; } -; - -optional_param_type: - /* empty */ { $$ = null; } - | type { $$ = $1; } -; - -optional_return_type: - /* empty */ { $$ = null; } - | ':' type { $$ = $2; } -; - -argument_list: - '(' ')' { $$ = array(); } - | '(' non_empty_argument_list ')' { $$ = $2; } - | '(' yield_expr ')' { $$ = array(Node\Arg[$2, false, false]); } -; - -non_empty_argument_list: - argument { init($1); } - | non_empty_argument_list ',' argument { push($1, $3); } -; - -argument: - expr { $$ = Node\Arg[$1, false, false]; } - | ampersand variable { $$ = Node\Arg[$2, true, false]; } - | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } -; - -global_var_list: - global_var_list ',' global_var { push($1, $3); } - | global_var { init($1); } -; - -global_var: - plain_variable { $$ = $1; } - | '$' variable { $$ = Expr\Variable[$2]; } - | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } -; - -static_var_list: - static_var_list ',' static_var { push($1, $3); } - | static_var { init($1); } -; - -static_var: - plain_variable { $$ = Stmt\StaticVar[$1, null]; } - | plain_variable '=' static_scalar { $$ = Stmt\StaticVar[$1, $3]; } -; - -class_statement_list_ex: - class_statement_list_ex class_statement { if ($2 !== null) { push($1, $2); } } - | /* empty */ { init(); } -; - -class_statement_list: - class_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -class_statement: - variable_modifiers property_declaration_list ';' - { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); } - | T_CONST class_const_list ';' { $$ = Stmt\ClassConst[$2, 0]; } - | method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body - { $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]]; - $this->checkClassMethod($$, #1); } - | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } -; - -trait_adaptations: - ';' { $$ = array(); } - | '{' trait_adaptation_list '}' { $$ = $2; } -; - -trait_adaptation_list: - /* empty */ { init(); } - | trait_adaptation_list trait_adaptation { push($1, $2); } -; - -trait_adaptation: - trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';' - { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } - | trait_method_reference T_AS member_modifier identifier_ex ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; } - | trait_method_reference T_AS member_modifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; } - | trait_method_reference T_AS identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } - | trait_method_reference T_AS reserved_non_modifiers_identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } -; - -trait_method_reference_fully_qualified: - name T_PAAMAYIM_NEKUDOTAYIM identifier_ex { $$ = array($1, $3); } -; -trait_method_reference: - trait_method_reference_fully_qualified { $$ = $1; } - | identifier_ex { $$ = array(null, $1); } -; - -method_body: - ';' /* abstract method */ { $$ = null; } - | '{' inner_statement_list '}' { $$ = $2; } -; - -variable_modifiers: - non_empty_member_modifiers { $$ = $1; } - | T_VAR { $$ = 0; } -; - -method_modifiers: - /* empty */ { $$ = 0; } - | non_empty_member_modifiers { $$ = $1; } -; - -non_empty_member_modifiers: - member_modifier { $$ = $1; } - | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } -; - -member_modifier: - T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } - | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } - | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } - | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; } - | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } -; - -property_declaration_list: - property_declaration { init($1); } - | property_declaration_list ',' property_declaration { push($1, $3); } -; - -property_decl_name: - T_VARIABLE { $$ = Node\VarLikeIdentifier[parseVar($1)]; } -; - -property_declaration: - property_decl_name { $$ = Stmt\PropertyProperty[$1, null]; } - | property_decl_name '=' static_scalar { $$ = Stmt\PropertyProperty[$1, $3]; } -; - -expr_list: - expr_list ',' expr { push($1, $3); } - | expr { init($1); } -; - -for_expr: - /* empty */ { $$ = array(); } - | expr_list { $$ = $1; } -; - -expr: - variable { $$ = $1; } - | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } - | variable '=' ampersand new_expr { $$ = Expr\AssignRef[$1, $4]; } - | new_expr { $$ = $1; } - | T_CLONE expr { $$ = Expr\Clone_[$2]; } - | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; } - | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; } - | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; } - | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; } - | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; } - | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; } - | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; } - | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; } - | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; } - | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } - | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } - | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } - | variable T_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } - | variable T_INC { $$ = Expr\PostInc[$1]; } - | T_INC variable { $$ = Expr\PreInc [$2]; } - | variable T_DEC { $$ = Expr\PostDec[$1]; } - | T_DEC variable { $$ = Expr\PreDec [$2]; } - | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } - | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } - | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } - | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } - | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } - | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } - | expr T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } - | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; } - | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; } - | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; } - | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; } - | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; } - | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; } - | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } - | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } - | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; } - | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; } - | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; } - | '!' expr { $$ = Expr\BooleanNot[$2]; } - | '~' expr { $$ = Expr\BitwiseNot[$2]; } - | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; } - | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } - | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; } - | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } - | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; } - | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; } - | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } - | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; } - | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } - | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; } - | parentheses_expr { $$ = $1; } - /* we need a separate '(' new_expr ')' rule to avoid problems caused by a s/r conflict */ - | '(' new_expr ')' { $$ = $2; } - | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; } - | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; } - | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; } - | T_ISSET '(' variables_list ')' { $$ = Expr\Isset_[$3]; } - | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; } - | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; } - | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; } - | T_EVAL parentheses_expr { $$ = Expr\Eval_[$2]; } - | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } - | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } - | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } - | T_DOUBLE_CAST expr - { $attrs = attributes(); - $attrs['kind'] = $this->getFloatCastKind($1); - $$ = new Expr\Cast\Double($2, $attrs); } - | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } - | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } - | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } - | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; } - | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; } - | T_EXIT exit_expr - { $attrs = attributes(); - $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $$ = new Expr\Exit_($2, $attrs); } - | '@' expr { $$ = Expr\ErrorSuppress[$2]; } - | scalar { $$ = $1; } - | array_expr { $$ = $1; } - | scalar_dereference { $$ = $1; } - | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } - | T_PRINT expr { $$ = Expr\Print_[$2]; } - | T_YIELD { $$ = Expr\Yield_[null, null]; } - | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } - | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type - '{' inner_statement_list '}' - { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $9]]; } - | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type - '{' inner_statement_list '}' - { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $10]]; } -; - -parentheses_expr: - '(' expr ')' { $$ = $2; } - | '(' yield_expr ')' { $$ = $2; } -; - -yield_expr: - T_YIELD expr { $$ = Expr\Yield_[$2, null]; } - | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; } -; - -array_expr: - T_ARRAY '(' array_pair_list ')' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; - $$ = new Expr\Array_($3, $attrs); } - | '[' array_pair_list ']' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $$ = new Expr\Array_($2, $attrs); } -; - -scalar_dereference: - array_expr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[Scalar\String_::fromString($1, attributes()), $3]; } - | constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - /* alternative array syntax missing intentionally */ -; - -anonymous_class: - T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}' - { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $3, 'implements' => $4, 'stmts' => $6]], $2); - $this->checkClass($$[0], -1); } -; - -new_expr: - T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; } - | T_NEW anonymous_class - { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; } -; - -lexical_vars: - /* empty */ { $$ = array(); } - | T_USE '(' lexical_var_list ')' { $$ = $3; } -; - -lexical_var_list: - lexical_var { init($1); } - | lexical_var_list ',' lexical_var { push($1, $3); } -; - -lexical_var: - optional_ref plain_variable { $$ = Expr\ClosureUse[$2, $1]; } -; - -function_call: - name argument_list { $$ = Expr\FuncCall[$1, $2]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex argument_list - { $$ = Expr\StaticCall[$1, $3, $4]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' argument_list - { $$ = Expr\StaticCall[$1, $4, $6]; } - | static_property argument_list - { $$ = $this->fixupPhp5StaticPropCall($1, $2, attributes()); } - | variable_without_objects argument_list - { $$ = Expr\FuncCall[$1, $2]; } - | function_call '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - /* alternative array syntax missing intentionally */ -; - -class_name: - T_STATIC { $$ = Name[$1]; } - | name { $$ = $1; } -; - -name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } - | T_NAME_FULLY_QUALIFIED { $$ = Name\FullyQualified[substr($1, 1)]; } - | T_NAME_RELATIVE { $$ = Name\Relative[substr($1, 10)]; } -; - -class_name_reference: - class_name { $$ = $1; } - | dynamic_class_name_reference { $$ = $1; } -; - -dynamic_class_name_reference: - object_access_for_dcnr { $$ = $1; } - | base_variable { $$ = $1; } -; - -class_name_or_var: - class_name { $$ = $1; } - | reference_variable { $$ = $1; } -; - -object_access_for_dcnr: - base_variable T_OBJECT_OPERATOR object_property - { $$ = Expr\PropertyFetch[$1, $3]; } - | object_access_for_dcnr T_OBJECT_OPERATOR object_property - { $$ = Expr\PropertyFetch[$1, $3]; } - | object_access_for_dcnr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | object_access_for_dcnr '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } -; - -exit_expr: - /* empty */ { $$ = null; } - | '(' ')' { $$ = null; } - | parentheses_expr { $$ = $1; } -; - -backticks_expr: - /* empty */ { $$ = array(); } - | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`', false)]); } - | encaps_list { parseEncapsed($1, '`', false); $$ = $1; } -; - -ctor_arguments: - /* empty */ { $$ = array(); } - | argument_list { $$ = $1; } -; - -common_scalar: - T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); } - | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } - | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes(), false); } - | T_LINE { $$ = Scalar\MagicConst\Line[]; } - | T_FILE { $$ = Scalar\MagicConst\File[]; } - | T_DIR { $$ = Scalar\MagicConst\Dir[]; } - | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; } - | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; } - | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; } - | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; } - | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; } - | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), false); } - | T_START_HEREDOC T_END_HEREDOC - { $$ = $this->parseDocString($1, '', $2, attributes(), stackAttributes(#2), false); } -; - -static_scalar: - common_scalar { $$ = $1; } - | class_name T_PAAMAYIM_NEKUDOTAYIM identifier_ex { $$ = Expr\ClassConstFetch[$1, $3]; } - | name { $$ = Expr\ConstFetch[$1]; } - | T_ARRAY '(' static_array_pair_list ')' { $$ = Expr\Array_[$3]; } - | '[' static_array_pair_list ']' { $$ = Expr\Array_[$2]; } - | static_operation { $$ = $1; } -; - -static_operation: - static_scalar T_BOOLEAN_OR static_scalar { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } - | static_scalar T_BOOLEAN_AND static_scalar { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } - | static_scalar T_LOGICAL_OR static_scalar { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } - | static_scalar T_LOGICAL_AND static_scalar { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } - | static_scalar T_LOGICAL_XOR static_scalar { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } - | static_scalar '|' static_scalar { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } - | static_scalar T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG static_scalar - { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | static_scalar T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG static_scalar - { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | static_scalar '^' static_scalar { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } - | static_scalar '.' static_scalar { $$ = Expr\BinaryOp\Concat [$1, $3]; } - | static_scalar '+' static_scalar { $$ = Expr\BinaryOp\Plus [$1, $3]; } - | static_scalar '-' static_scalar { $$ = Expr\BinaryOp\Minus [$1, $3]; } - | static_scalar '*' static_scalar { $$ = Expr\BinaryOp\Mul [$1, $3]; } - | static_scalar '/' static_scalar { $$ = Expr\BinaryOp\Div [$1, $3]; } - | static_scalar '%' static_scalar { $$ = Expr\BinaryOp\Mod [$1, $3]; } - | static_scalar T_SL static_scalar { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } - | static_scalar T_SR static_scalar { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } - | static_scalar T_POW static_scalar { $$ = Expr\BinaryOp\Pow [$1, $3]; } - | '+' static_scalar %prec T_INC { $$ = Expr\UnaryPlus [$2]; } - | '-' static_scalar %prec T_INC { $$ = Expr\UnaryMinus[$2]; } - | '!' static_scalar { $$ = Expr\BooleanNot[$2]; } - | '~' static_scalar { $$ = Expr\BitwiseNot[$2]; } - | static_scalar T_IS_IDENTICAL static_scalar { $$ = Expr\BinaryOp\Identical [$1, $3]; } - | static_scalar T_IS_NOT_IDENTICAL static_scalar { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } - | static_scalar T_IS_EQUAL static_scalar { $$ = Expr\BinaryOp\Equal [$1, $3]; } - | static_scalar T_IS_NOT_EQUAL static_scalar { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } - | static_scalar '<' static_scalar { $$ = Expr\BinaryOp\Smaller [$1, $3]; } - | static_scalar T_IS_SMALLER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } - | static_scalar '>' static_scalar { $$ = Expr\BinaryOp\Greater [$1, $3]; } - | static_scalar T_IS_GREATER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } - | static_scalar '?' static_scalar ':' static_scalar { $$ = Expr\Ternary[$1, $3, $5]; } - | static_scalar '?' ':' static_scalar { $$ = Expr\Ternary[$1, null, $4]; } - | static_scalar '[' static_scalar ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | '(' static_scalar ')' { $$ = $2; } -; - -constant: - name { $$ = Expr\ConstFetch[$1]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex - { $$ = Expr\ClassConstFetch[$1, $3]; } -; - -scalar: - common_scalar { $$ = $1; } - | constant { $$ = $1; } - | '"' encaps_list '"' - { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } - | T_START_HEREDOC encaps_list T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } -; - -static_array_pair_list: - /* empty */ { $$ = array(); } - | non_empty_static_array_pair_list optional_comma { $$ = $1; } -; - -optional_comma: - /* empty */ - | ',' -; - -non_empty_static_array_pair_list: - non_empty_static_array_pair_list ',' static_array_pair { push($1, $3); } - | static_array_pair { init($1); } -; - -static_array_pair: - static_scalar T_DOUBLE_ARROW static_scalar { $$ = Expr\ArrayItem[$3, $1, false]; } - | static_scalar { $$ = Expr\ArrayItem[$1, null, false]; } -; - -variable: - object_access { $$ = $1; } - | base_variable { $$ = $1; } - | function_call { $$ = $1; } - | new_expr_array_deref { $$ = $1; } -; - -new_expr_array_deref: - '(' new_expr ')' '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$2, $5]; } - | new_expr_array_deref '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - /* alternative array syntax missing intentionally */ -; - -object_access: - variable_or_new_expr T_OBJECT_OPERATOR object_property - { $$ = Expr\PropertyFetch[$1, $3]; } - | variable_or_new_expr T_OBJECT_OPERATOR object_property argument_list - { $$ = Expr\MethodCall[$1, $3, $4]; } - | object_access argument_list { $$ = Expr\FuncCall[$1, $2]; } - | object_access '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | object_access '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } -; - -variable_or_new_expr: - variable { $$ = $1; } - | '(' new_expr ')' { $$ = $2; } -; - -variable_without_objects: - reference_variable { $$ = $1; } - | '$' variable_without_objects { $$ = Expr\Variable[$2]; } -; - -base_variable: - variable_without_objects { $$ = $1; } - | static_property { $$ = $1; } -; - -static_property: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' reference_variable - { $$ = Expr\StaticPropertyFetch[$1, $4]; } - | static_property_with_arrays { $$ = $1; } -; - -static_property_simple_name: - T_VARIABLE - { $var = parseVar($1); $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; } -; - -static_property_with_arrays: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM static_property_simple_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' '{' expr '}' - { $$ = Expr\StaticPropertyFetch[$1, $5]; } - | static_property_with_arrays '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | static_property_with_arrays '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } -; - -reference_variable: - reference_variable '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | reference_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable { $$ = $1; } - | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } -; - -dim_offset: - /* empty */ { $$ = null; } - | expr { $$ = $1; } -; - -object_property: - identifier { $$ = $1; } - | '{' expr '}' { $$ = $2; } - | variable_without_objects { $$ = $1; } - | error { $$ = Expr\Error[]; $this->errorState = 2; } -; - -list_expr: - T_LIST '(' list_expr_elements ')' { $$ = Expr\List_[$3]; } -; - -list_expr_elements: - list_expr_elements ',' list_expr_element { push($1, $3); } - | list_expr_element { init($1); } -; - -list_expr_element: - variable { $$ = Expr\ArrayItem[$1, null, false]; } - | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } - | /* empty */ { $$ = null; } -; - -array_pair_list: - /* empty */ { $$ = array(); } - | non_empty_array_pair_list optional_comma { $$ = $1; } -; - -non_empty_array_pair_list: - non_empty_array_pair_list ',' array_pair { push($1, $3); } - | array_pair { init($1); } -; - -array_pair: - expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | expr { $$ = Expr\ArrayItem[$1, null, false]; } - | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } - | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } - | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } -; - -encaps_list: - encaps_list encaps_var { push($1, $2); } - | encaps_list encaps_string_part { push($1, $2); } - | encaps_var { init($1); } - | encaps_string_part encaps_var { init($1, $2); } -; - -encaps_string_part: - T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } -; - -encaps_str_varname: - T_STRING_VARNAME { $$ = Expr\Variable[$1]; } -; - -encaps_var: - plain_variable { $$ = $1; } - | plain_variable '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable T_OBJECT_OPERATOR identifier { $$ = Expr\PropertyFetch[$1, $3]; } - | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES encaps_str_varname '[' expr ']' '}' - { $$ = Expr\ArrayDimFetch[$2, $4]; } - | T_CURLY_OPEN variable '}' { $$ = $2; } -; - -encaps_var_offset: - T_STRING { $$ = Scalar\String_[$1]; } - | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } - | plain_variable { $$ = $1; } -; - -%% diff --git a/lib/nikic/php-parser/grammar/php7.y b/lib/nikic/php-parser/grammar/php7.y deleted file mode 100644 index 087bc7392..000000000 --- a/lib/nikic/php-parser/grammar/php7.y +++ /dev/null @@ -1,1204 +0,0 @@ -%pure_parser -%expect 2 - -%tokens - -%% - -start: - top_statement_list { $$ = $this->handleNamespaces($1); } -; - -top_statement_list_ex: - top_statement_list_ex top_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -top_statement_list: - top_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -ampersand: - T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG -; - -reserved_non_modifiers: - T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND - | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE - | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH - | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO - | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT - | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS - | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN - | T_MATCH | T_ENUM -; - -semi_reserved: - reserved_non_modifiers - | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC | T_READONLY -; - -identifier_maybe_reserved: - T_STRING { $$ = Node\Identifier[$1]; } - | semi_reserved { $$ = Node\Identifier[$1]; } -; - -identifier_not_reserved: - T_STRING { $$ = Node\Identifier[$1]; } -; - -reserved_non_modifiers_identifier: - reserved_non_modifiers { $$ = Node\Identifier[$1]; } -; - -namespace_declaration_name: - T_STRING { $$ = Name[$1]; } - | semi_reserved { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } -; - -namespace_name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } -; - -legacy_namespace_name: - namespace_name { $$ = $1; } - | T_NAME_FULLY_QUALIFIED { $$ = Name[substr($1, 1)]; } -; - -plain_variable: - T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } -; - -semi: - ';' { /* nothing */ } - | error { /* nothing */ } -; - -no_comma: - /* empty */ { /* nothing */ } - | ',' { $this->emitError(new Error('A trailing comma is not allowed here', attributes())); } -; - -optional_comma: - /* empty */ - | ',' -; - -attribute_decl: - class_name { $$ = Node\Attribute[$1, []]; } - | class_name argument_list { $$ = Node\Attribute[$1, $2]; } -; - -attribute_group: - attribute_decl { init($1); } - | attribute_group ',' attribute_decl { push($1, $3); } -; - -attribute: - T_ATTRIBUTE attribute_group optional_comma ']' { $$ = Node\AttributeGroup[$2]; } -; - -attributes: - attribute { init($1); } - | attributes attribute { push($1, $2); } -; - -optional_attributes: - /* empty */ { $$ = []; } - | attributes { $$ = $1; } -; - -top_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } - | T_NAMESPACE namespace_declaration_name semi - { $$ = Stmt\Namespace_[$2, null]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($$); } - | T_NAMESPACE namespace_declaration_name '{' top_statement_list '}' - { $$ = Stmt\Namespace_[$2, $4]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_NAMESPACE '{' top_statement_list '}' - { $$ = Stmt\Namespace_[null, $3]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_USE use_declarations semi { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } - | T_USE use_type use_declarations semi { $$ = Stmt\Use_[$3, $2]; } - | group_use_declaration semi { $$ = $1; } - | T_CONST constant_declaration_list semi { $$ = Stmt\Const_[$2]; } -; - -use_type: - T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; } - | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; } -; - -group_use_declaration: - T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}' - { $$ = Stmt\GroupUse[$3, $6, $2]; } - | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}' - { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; } -; - -unprefixed_use_declarations: - non_empty_unprefixed_use_declarations optional_comma { $$ = $1; } -; - -non_empty_unprefixed_use_declarations: - non_empty_unprefixed_use_declarations ',' unprefixed_use_declaration - { push($1, $3); } - | unprefixed_use_declaration { init($1); } -; - -use_declarations: - non_empty_use_declarations no_comma { $$ = $1; } -; - -non_empty_use_declarations: - non_empty_use_declarations ',' use_declaration { push($1, $3); } - | use_declaration { init($1); } -; - -inline_use_declarations: - non_empty_inline_use_declarations optional_comma { $$ = $1; } -; - -non_empty_inline_use_declarations: - non_empty_inline_use_declarations ',' inline_use_declaration - { push($1, $3); } - | inline_use_declaration { init($1); } -; - -unprefixed_use_declaration: - namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | namespace_name T_AS identifier_not_reserved - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -use_declaration: - legacy_namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | legacy_namespace_name T_AS identifier_not_reserved - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -inline_use_declaration: - unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; } - | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; } -; - -constant_declaration_list: - non_empty_constant_declaration_list no_comma { $$ = $1; } -; - -non_empty_constant_declaration_list: - non_empty_constant_declaration_list ',' constant_declaration - { push($1, $3); } - | constant_declaration { init($1); } -; - -constant_declaration: - identifier_not_reserved '=' expr { $$ = Node\Const_[$1, $3]; } -; - -class_const_list: - non_empty_class_const_list no_comma { $$ = $1; } -; - -non_empty_class_const_list: - non_empty_class_const_list ',' class_const { push($1, $3); } - | class_const { init($1); } -; - -class_const: - identifier_maybe_reserved '=' expr { $$ = Node\Const_[$1, $3]; } -; - -inner_statement_list_ex: - inner_statement_list_ex inner_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -inner_statement_list: - inner_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -inner_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); } -; - -non_empty_statement: - '{' inner_statement_list '}' - { - if ($2) { - $$ = $2; prependLeadingComments($$); - } else { - makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if (null === $$) { $$ = array(); } - } - } - | T_IF '(' expr ')' statement elseif_list else_single - { $$ = Stmt\If_[$3, ['stmts' => toArray($5), 'elseifs' => $6, 'else' => $7]]; } - | T_IF '(' expr ')' ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';' - { $$ = Stmt\If_[$3, ['stmts' => $6, 'elseifs' => $7, 'else' => $8]]; } - | T_WHILE '(' expr ')' while_statement { $$ = Stmt\While_[$3, $5]; } - | T_DO statement T_WHILE '(' expr ')' ';' { $$ = Stmt\Do_ [$5, toArray($2)]; } - | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement - { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; } - | T_SWITCH '(' expr ')' switch_case_list { $$ = Stmt\Switch_[$3, $5]; } - | T_BREAK optional_expr semi { $$ = Stmt\Break_[$2]; } - | T_CONTINUE optional_expr semi { $$ = Stmt\Continue_[$2]; } - | T_RETURN optional_expr semi { $$ = Stmt\Return_[$2]; } - | T_GLOBAL global_var_list semi { $$ = Stmt\Global_[$2]; } - | T_STATIC static_var_list semi { $$ = Stmt\Static_[$2]; } - | T_ECHO expr_list_forbid_comma semi { $$ = Stmt\Echo_[$2]; } - | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; } - | expr semi { - $e = $1; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $$ = Stmt\Throw_[$e->expr]; - } else { - $$ = Stmt\Expression[$e]; - } - } - | T_UNSET '(' variables_list ')' semi { $$ = Stmt\Unset_[$3]; } - | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; } - | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; } - | T_FOREACH '(' expr error ')' foreach_statement - { $$ = Stmt\Foreach_[$3, new Expr\Error(stackAttributes(#4)), ['stmts' => $6]]; } - | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; } - | T_TRY '{' inner_statement_list '}' catches optional_finally - { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); } - | T_GOTO identifier_not_reserved semi { $$ = Stmt\Goto_[$2]; } - | identifier_not_reserved ':' { $$ = Stmt\Label[$1]; } - | error { $$ = array(); /* means: no statement */ } -; - -statement: - non_empty_statement { $$ = $1; } - | ';' - { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if ($$ === null) $$ = array(); /* means: no statement */ } -; - -catches: - /* empty */ { init(); } - | catches catch { push($1, $2); } -; - -name_union: - name { init($1); } - | name_union '|' name { push($1, $3); } -; - -catch: - T_CATCH '(' name_union optional_plain_variable ')' '{' inner_statement_list '}' - { $$ = Stmt\Catch_[$3, $4, $7]; } -; - -optional_finally: - /* empty */ { $$ = null; } - | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; } -; - -variables_list: - non_empty_variables_list optional_comma { $$ = $1; } -; - -non_empty_variables_list: - variable { init($1); } - | non_empty_variables_list ',' variable { push($1, $3); } -; - -optional_ref: - /* empty */ { $$ = false; } - | ampersand { $$ = true; } -; - -optional_arg_ref: - /* empty */ { $$ = false; } - | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG { $$ = true; } -; - -optional_ellipsis: - /* empty */ { $$ = false; } - | T_ELLIPSIS { $$ = true; } -; - -block_or_error: - '{' inner_statement_list '}' { $$ = $2; } - | error { $$ = []; } -; - -function_declaration_statement: - T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error - { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } - | attributes T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error - { $$ = Stmt\Function_[$4, ['byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } -; - -class_declaration_statement: - optional_attributes class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}' - { $$ = Stmt\Class_[$3, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; - $this->checkClass($$, #3); } - | optional_attributes T_INTERFACE identifier_not_reserved interface_extends_list '{' class_statement_list '}' - { $$ = Stmt\Interface_[$3, ['extends' => $4, 'stmts' => $6, 'attrGroups' => $1]]; - $this->checkInterface($$, #3); } - | optional_attributes T_TRAIT identifier_not_reserved '{' class_statement_list '}' - { $$ = Stmt\Trait_[$3, ['stmts' => $5, 'attrGroups' => $1]]; } - | optional_attributes T_ENUM identifier_not_reserved enum_scalar_type implements_list '{' class_statement_list '}' - { $$ = Stmt\Enum_[$3, ['scalarType' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; - $this->checkEnum($$, #3); } -; - -enum_scalar_type: - /* empty */ { $$ = null; } - | ':' type { $$ = $2; } - -enum_case_expr: - /* empty */ { $$ = null; } - | '=' expr { $$ = $2; } -; - -class_entry_type: - T_CLASS { $$ = 0; } - | class_modifiers T_CLASS { $$ = $1; } -; - -class_modifiers: - class_modifier { $$ = $1; } - | class_modifiers class_modifier { $this->checkClassModifier($1, $2, #2); $$ = $1 | $2; } -; - -class_modifier: - T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } -; - -extends_from: - /* empty */ { $$ = null; } - | T_EXTENDS class_name { $$ = $2; } -; - -interface_extends_list: - /* empty */ { $$ = array(); } - | T_EXTENDS class_name_list { $$ = $2; } -; - -implements_list: - /* empty */ { $$ = array(); } - | T_IMPLEMENTS class_name_list { $$ = $2; } -; - -class_name_list: - non_empty_class_name_list no_comma { $$ = $1; } -; - -non_empty_class_name_list: - class_name { init($1); } - | non_empty_class_name_list ',' class_name { push($1, $3); } -; - -for_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; } -; - -foreach_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; } -; - -declare_statement: - non_empty_statement { $$ = toArray($1); } - | ';' { $$ = null; } - | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; } -; - -declare_list: - non_empty_declare_list no_comma { $$ = $1; } -; - -non_empty_declare_list: - declare_list_element { init($1); } - | non_empty_declare_list ',' declare_list_element { push($1, $3); } -; - -declare_list_element: - identifier_not_reserved '=' expr { $$ = Stmt\DeclareDeclare[$1, $3]; } -; - -switch_case_list: - '{' case_list '}' { $$ = $2; } - | '{' ';' case_list '}' { $$ = $3; } - | ':' case_list T_ENDSWITCH ';' { $$ = $2; } - | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; } -; - -case_list: - /* empty */ { init(); } - | case_list case { push($1, $2); } -; - -case: - T_CASE expr case_separator inner_statement_list_ex { $$ = Stmt\Case_[$2, $4]; } - | T_DEFAULT case_separator inner_statement_list_ex { $$ = Stmt\Case_[null, $3]; } -; - -case_separator: - ':' - | ';' -; - -match: - T_MATCH '(' expr ')' '{' match_arm_list '}' { $$ = Expr\Match_[$3, $6]; } -; - -match_arm_list: - /* empty */ { $$ = []; } - | non_empty_match_arm_list optional_comma { $$ = $1; } -; - -non_empty_match_arm_list: - match_arm { init($1); } - | non_empty_match_arm_list ',' match_arm { push($1, $3); } -; - -match_arm: - expr_list_allow_comma T_DOUBLE_ARROW expr { $$ = Node\MatchArm[$1, $3]; } - | T_DEFAULT optional_comma T_DOUBLE_ARROW expr { $$ = Node\MatchArm[null, $4]; } -; - -while_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } -; - -elseif_list: - /* empty */ { init(); } - | elseif_list elseif { push($1, $2); } -; - -elseif: - T_ELSEIF '(' expr ')' statement { $$ = Stmt\ElseIf_[$3, toArray($5)]; } -; - -new_elseif_list: - /* empty */ { init(); } - | new_elseif_list new_elseif { push($1, $2); } -; - -new_elseif: - T_ELSEIF '(' expr ')' ':' inner_statement_list { $$ = Stmt\ElseIf_[$3, $6]; } -; - -else_single: - /* empty */ { $$ = null; } - | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; } -; - -new_else_single: - /* empty */ { $$ = null; } - | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; } -; - -foreach_variable: - variable { $$ = array($1, false); } - | ampersand variable { $$ = array($2, true); } - | list_expr { $$ = array($1, false); } - | array_short_syntax { $$ = array($1, false); } -; - -parameter_list: - non_empty_parameter_list optional_comma { $$ = $1; } - | /* empty */ { $$ = array(); } -; - -non_empty_parameter_list: - parameter { init($1); } - | non_empty_parameter_list ',' parameter { push($1, $3); } -; - -optional_property_modifiers: - /* empty */ { $$ = 0; } - | optional_property_modifiers property_modifier - { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } -; - -property_modifier: - T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } - | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } - | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } -; - -parameter: - optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis plain_variable - { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1); - $this->checkParam($$); } - | optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis plain_variable '=' expr - { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1); - $this->checkParam($$); } - | optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis error - { $$ = new Node\Param(Expr\Error[], null, $3, $4, $5, attributes(), $2, $1); } -; - -type_expr: - type { $$ = $1; } - | '?' type { $$ = Node\NullableType[$2]; } - | union_type { $$ = Node\UnionType[$1]; } - | intersection_type { $$ = Node\IntersectionType[$1]; } -; - -type: - type_without_static { $$ = $1; } - | T_STATIC { $$ = Node\Name['static']; } -; - -type_without_static: - name { $$ = $this->handleBuiltinTypes($1); } - | T_ARRAY { $$ = Node\Identifier['array']; } - | T_CALLABLE { $$ = Node\Identifier['callable']; } -; - -union_type: - type '|' type { init($1, $3); } - | union_type '|' type { push($1, $3); } -; - -union_type_without_static: - type_without_static '|' type_without_static { init($1, $3); } - | union_type_without_static '|' type_without_static { push($1, $3); } -; - -intersection_type: - type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); } - | intersection_type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type - { push($1, $3); } -; - -intersection_type_without_static: - type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static - { init($1, $3); } - | intersection_type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static - { push($1, $3); } -; - -type_expr_without_static: - type_without_static { $$ = $1; } - | '?' type_without_static { $$ = Node\NullableType[$2]; } - | union_type_without_static { $$ = Node\UnionType[$1]; } - | intersection_type_without_static { $$ = Node\IntersectionType[$1]; } -; - -optional_type_without_static: - /* empty */ { $$ = null; } - | type_expr_without_static { $$ = $1; } -; - -optional_return_type: - /* empty */ { $$ = null; } - | ':' type_expr { $$ = $2; } - | ':' error { $$ = null; } -; - -argument_list: - '(' ')' { $$ = array(); } - | '(' non_empty_argument_list optional_comma ')' { $$ = $2; } - | '(' variadic_placeholder ')' { init($2); } -; - -variadic_placeholder: - T_ELLIPSIS { $$ = Node\VariadicPlaceholder[]; } -; - -non_empty_argument_list: - argument { init($1); } - | non_empty_argument_list ',' argument { push($1, $3); } -; - -argument: - expr { $$ = Node\Arg[$1, false, false]; } - | ampersand variable { $$ = Node\Arg[$2, true, false]; } - | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } - | identifier_maybe_reserved ':' expr - { $$ = new Node\Arg($3, false, false, attributes(), $1); } -; - -global_var_list: - non_empty_global_var_list no_comma { $$ = $1; } -; - -non_empty_global_var_list: - non_empty_global_var_list ',' global_var { push($1, $3); } - | global_var { init($1); } -; - -global_var: - simple_variable { $$ = $1; } -; - -static_var_list: - non_empty_static_var_list no_comma { $$ = $1; } -; - -non_empty_static_var_list: - non_empty_static_var_list ',' static_var { push($1, $3); } - | static_var { init($1); } -; - -static_var: - plain_variable { $$ = Stmt\StaticVar[$1, null]; } - | plain_variable '=' expr { $$ = Stmt\StaticVar[$1, $3]; } -; - -class_statement_list_ex: - class_statement_list_ex class_statement { if ($2 !== null) { push($1, $2); } } - | /* empty */ { init(); } -; - -class_statement_list: - class_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -class_statement: - optional_attributes variable_modifiers optional_type_without_static property_declaration_list semi - { $$ = new Stmt\Property($2, $4, attributes(), $3, $1); - $this->checkProperty($$, #2); } - | optional_attributes method_modifiers T_CONST class_const_list semi - { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); - $this->checkClassConst($$, #2); } - | optional_attributes method_modifiers T_FUNCTION optional_ref identifier_maybe_reserved '(' parameter_list ')' - optional_return_type method_body - { $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; - $this->checkClassMethod($$, #2); } - | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } - | optional_attributes T_CASE identifier_maybe_reserved enum_case_expr semi - { $$ = Stmt\EnumCase[$3, $4, $1]; } - | error { $$ = null; /* will be skipped */ } -; - -trait_adaptations: - ';' { $$ = array(); } - | '{' trait_adaptation_list '}' { $$ = $2; } -; - -trait_adaptation_list: - /* empty */ { init(); } - | trait_adaptation_list trait_adaptation { push($1, $2); } -; - -trait_adaptation: - trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';' - { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } - | trait_method_reference T_AS member_modifier identifier_maybe_reserved ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; } - | trait_method_reference T_AS member_modifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; } - | trait_method_reference T_AS identifier_not_reserved ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } - | trait_method_reference T_AS reserved_non_modifiers_identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } -; - -trait_method_reference_fully_qualified: - name T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved { $$ = array($1, $3); } -; -trait_method_reference: - trait_method_reference_fully_qualified { $$ = $1; } - | identifier_maybe_reserved { $$ = array(null, $1); } -; - -method_body: - ';' /* abstract method */ { $$ = null; } - | block_or_error { $$ = $1; } -; - -variable_modifiers: - non_empty_member_modifiers { $$ = $1; } - | T_VAR { $$ = 0; } -; - -method_modifiers: - /* empty */ { $$ = 0; } - | non_empty_member_modifiers { $$ = $1; } -; - -non_empty_member_modifiers: - member_modifier { $$ = $1; } - | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } -; - -member_modifier: - T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } - | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } - | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } - | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; } - | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } -; - -property_declaration_list: - non_empty_property_declaration_list no_comma { $$ = $1; } -; - -non_empty_property_declaration_list: - property_declaration { init($1); } - | non_empty_property_declaration_list ',' property_declaration - { push($1, $3); } -; - -property_decl_name: - T_VARIABLE { $$ = Node\VarLikeIdentifier[parseVar($1)]; } -; - -property_declaration: - property_decl_name { $$ = Stmt\PropertyProperty[$1, null]; } - | property_decl_name '=' expr { $$ = Stmt\PropertyProperty[$1, $3]; } -; - -expr_list_forbid_comma: - non_empty_expr_list no_comma { $$ = $1; } -; - -expr_list_allow_comma: - non_empty_expr_list optional_comma { $$ = $1; } -; - -non_empty_expr_list: - non_empty_expr_list ',' expr { push($1, $3); } - | expr { init($1); } -; - -for_expr: - /* empty */ { $$ = array(); } - | expr_list_forbid_comma { $$ = $1; } -; - -expr: - variable { $$ = $1; } - | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } - | array_short_syntax '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } - | new_expr { $$ = $1; } - | match { $$ = $1; } - | T_CLONE expr { $$ = Expr\Clone_[$2]; } - | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; } - | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; } - | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; } - | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; } - | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; } - | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; } - | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; } - | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; } - | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; } - | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } - | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } - | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } - | variable T_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } - | variable T_INC { $$ = Expr\PostInc[$1]; } - | T_INC variable { $$ = Expr\PreInc [$2]; } - | variable T_DEC { $$ = Expr\PostDec[$1]; } - | T_DEC variable { $$ = Expr\PreDec [$2]; } - | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } - | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } - | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } - | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } - | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } - | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } - | expr T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } - | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; } - | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; } - | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; } - | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; } - | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; } - | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; } - | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } - | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } - | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; } - | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; } - | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; } - | '!' expr { $$ = Expr\BooleanNot[$2]; } - | '~' expr { $$ = Expr\BitwiseNot[$2]; } - | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; } - | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } - | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; } - | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } - | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; } - | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; } - | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } - | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; } - | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } - | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; } - | '(' expr ')' { $$ = $2; } - | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; } - | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; } - | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; } - | T_ISSET '(' expr_list_allow_comma ')' { $$ = Expr\Isset_[$3]; } - | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; } - | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; } - | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; } - | T_EVAL '(' expr ')' { $$ = Expr\Eval_[$3]; } - | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } - | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } - | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } - | T_DOUBLE_CAST expr - { $attrs = attributes(); - $attrs['kind'] = $this->getFloatCastKind($1); - $$ = new Expr\Cast\Double($2, $attrs); } - | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } - | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } - | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } - | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; } - | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; } - | T_EXIT exit_expr - { $attrs = attributes(); - $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $$ = new Expr\Exit_($2, $attrs); } - | '@' expr { $$ = Expr\ErrorSuppress[$2]; } - | scalar { $$ = $1; } - | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } - | T_PRINT expr { $$ = Expr\Print_[$2]; } - | T_YIELD { $$ = Expr\Yield_[null, null]; } - | T_YIELD expr { $$ = Expr\Yield_[$2, null]; } - | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; } - | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } - | T_THROW expr { $$ = Expr\Throw_[$2]; } - - | T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $2, 'params' => $4, 'returnType' => $6, 'expr' => $8, 'attrGroups' => []]]; } - | T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => []]]; } - | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } - | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => []]]; } - - | attributes T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => $1]]; } - | attributes T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $4, 'params' => $6, 'returnType' => $8, 'expr' => $10, 'attrGroups' => $1]]; } - | attributes T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => false, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } - | attributes T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => true, 'byRef' => $4, 'params' => $6, 'uses' => $8, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; } -; - -anonymous_class: - optional_attributes T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}' - { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]], $3); - $this->checkClass($$[0], -1); } -; - -new_expr: - T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; } - | T_NEW anonymous_class - { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; } -; - -lexical_vars: - /* empty */ { $$ = array(); } - | T_USE '(' lexical_var_list ')' { $$ = $3; } -; - -lexical_var_list: - non_empty_lexical_var_list optional_comma { $$ = $1; } -; - -non_empty_lexical_var_list: - lexical_var { init($1); } - | non_empty_lexical_var_list ',' lexical_var { push($1, $3); } -; - -lexical_var: - optional_ref plain_variable { $$ = Expr\ClosureUse[$2, $1]; } -; - -function_call: - name argument_list { $$ = Expr\FuncCall[$1, $2]; } - | callable_expr argument_list { $$ = Expr\FuncCall[$1, $2]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM member_name argument_list - { $$ = Expr\StaticCall[$1, $3, $4]; } -; - -class_name: - T_STATIC { $$ = Name[$1]; } - | name { $$ = $1; } -; - -name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } - | T_NAME_FULLY_QUALIFIED { $$ = Name\FullyQualified[substr($1, 1)]; } - | T_NAME_RELATIVE { $$ = Name\Relative[substr($1, 10)]; } -; - -class_name_reference: - class_name { $$ = $1; } - | new_variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | error { $$ = Expr\Error[]; $this->errorState = 2; } -; - -class_name_or_var: - class_name { $$ = $1; } - | fully_dereferencable { $$ = $1; } -; - -exit_expr: - /* empty */ { $$ = null; } - | '(' optional_expr ')' { $$ = $2; } -; - -backticks_expr: - /* empty */ { $$ = array(); } - | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } - | encaps_list { parseEncapsed($1, '`', true); $$ = $1; } -; - -ctor_arguments: - /* empty */ { $$ = array(); } - | argument_list { $$ = $1; } -; - -constant: - name { $$ = Expr\ConstFetch[$1]; } - | T_LINE { $$ = Scalar\MagicConst\Line[]; } - | T_FILE { $$ = Scalar\MagicConst\File[]; } - | T_DIR { $$ = Scalar\MagicConst\Dir[]; } - | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; } - | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; } - | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; } - | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; } - | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; } -; - -class_constant: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved - { $$ = Expr\ClassConstFetch[$1, $3]; } - /* We interpret an isolated FOO:: as an unfinished class constant fetch. It could also be - an unfinished static property fetch or unfinished scoped call. */ - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM error - { $$ = Expr\ClassConstFetch[$1, new Expr\Error(stackAttributes(#3))]; $this->errorState = 2; } -; - -array_short_syntax: - '[' array_pair_list ']' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $$ = new Expr\Array_($2, $attrs); } -; - -dereferencable_scalar: - T_ARRAY '(' array_pair_list ')' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; - $$ = new Expr\Array_($3, $attrs); } - | array_short_syntax { $$ = $1; } - | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes()); } - | '"' encaps_list '"' - { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } -; - -scalar: - T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); } - | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } - | dereferencable_scalar { $$ = $1; } - | constant { $$ = $1; } - | class_constant { $$ = $1; } - | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } - | T_START_HEREDOC T_END_HEREDOC - { $$ = $this->parseDocString($1, '', $2, attributes(), stackAttributes(#2), true); } - | T_START_HEREDOC encaps_list T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } -; - -optional_expr: - /* empty */ { $$ = null; } - | expr { $$ = $1; } -; - -fully_dereferencable: - variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } - | class_constant { $$ = $1; } -; - -array_object_dereferencable: - fully_dereferencable { $$ = $1; } - | constant { $$ = $1; } -; - -callable_expr: - callable_variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } -; - -callable_variable: - simple_variable { $$ = $1; } - | array_object_dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | array_object_dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | function_call { $$ = $1; } - | array_object_dereferencable T_OBJECT_OPERATOR property_name argument_list - { $$ = Expr\MethodCall[$1, $3, $4]; } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list - { $$ = Expr\NullsafeMethodCall[$1, $3, $4]; } -; - -optional_plain_variable: - /* empty */ { $$ = null; } - | plain_variable { $$ = $1; } -; - -variable: - callable_variable { $$ = $1; } - | static_member { $$ = $1; } - | array_object_dereferencable T_OBJECT_OPERATOR property_name - { $$ = Expr\PropertyFetch[$1, $3]; } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name - { $$ = Expr\NullsafePropertyFetch[$1, $3]; } -; - -simple_variable: - plain_variable { $$ = $1; } - | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } - | '$' simple_variable { $$ = Expr\Variable[$2]; } - | '$' error { $$ = Expr\Variable[Expr\Error[]]; $this->errorState = 2; } -; - -static_member_prop_name: - simple_variable - { $var = $1->name; $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; } -; - -static_member: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } -; - -new_variable: - simple_variable { $$ = $1; } - | new_variable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | new_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | new_variable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } - | new_variable T_NULLSAFE_OBJECT_OPERATOR property_name { $$ = Expr\NullsafePropertyFetch[$1, $3]; } - | class_name T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } - | new_variable T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } -; - -member_name: - identifier_maybe_reserved { $$ = $1; } - | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1; } -; - -property_name: - identifier_not_reserved { $$ = $1; } - | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1; } - | error { $$ = Expr\Error[]; $this->errorState = 2; } -; - -list_expr: - T_LIST '(' inner_array_pair_list ')' { $$ = Expr\List_[$3]; } -; - -array_pair_list: - inner_array_pair_list - { $$ = $1; $end = count($$)-1; if ($$[$end] === null) array_pop($$); } -; - -comma_or_error: - ',' - | error - { /* do nothing -- prevent default action of $$=$1. See #551. */ } -; - -inner_array_pair_list: - inner_array_pair_list comma_or_error array_pair { push($1, $3); } - | array_pair { init($1); } -; - -array_pair: - expr { $$ = Expr\ArrayItem[$1, null, false]; } - | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } - | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } - | expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } - | expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } - | /* empty */ { $$ = null; } -; - -encaps_list: - encaps_list encaps_var { push($1, $2); } - | encaps_list encaps_string_part { push($1, $2); } - | encaps_var { init($1); } - | encaps_string_part encaps_var { init($1, $2); } -; - -encaps_string_part: - T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } -; - -encaps_str_varname: - T_STRING_VARNAME { $$ = Expr\Variable[$1]; } -; - -encaps_var: - plain_variable { $$ = $1; } - | plain_variable '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable T_OBJECT_OPERATOR identifier_not_reserved - { $$ = Expr\PropertyFetch[$1, $3]; } - | plain_variable T_NULLSAFE_OBJECT_OPERATOR identifier_not_reserved - { $$ = Expr\NullsafePropertyFetch[$1, $3]; } - | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES encaps_str_varname '[' expr ']' '}' - { $$ = Expr\ArrayDimFetch[$2, $4]; } - | T_CURLY_OPEN variable '}' { $$ = $2; } -; - -encaps_var_offset: - T_STRING { $$ = Scalar\String_[$1]; } - | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } - | '-' T_NUM_STRING { $$ = $this->parseNumString('-' . $2, attributes()); } - | plain_variable { $$ = $1; } -; - -%% diff --git a/lib/nikic/php-parser/grammar/phpyLang.php b/lib/nikic/php-parser/grammar/phpyLang.php deleted file mode 100644 index 663c2a144..000000000 --- a/lib/nikic/php-parser/grammar/phpyLang.php +++ /dev/null @@ -1,184 +0,0 @@ -\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\') - (?"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+") - (?(?&singleQuotedString)|(?&doubleQuotedString)) - (?/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/) - (?\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+}) -)'; - -const PARAMS = '\[(?[^[\]]*+(?:\[(?¶ms)\][^[\]]*+)*+)\]'; -const ARGS = '\((?[^()]*+(?:\((?&args)\)[^()]*+)*+)\)'; - -/////////////////////////////// -/// Preprocessing functions /// -/////////////////////////////// - -function preprocessGrammar($code) { - $code = resolveNodes($code); - $code = resolveMacros($code); - $code = resolveStackAccess($code); - - return $code; -} - -function resolveNodes($code) { - return preg_replace_callback( - '~\b(?[A-Z][a-zA-Z_\\\\]++)\s*' . PARAMS . '~', - function($matches) { - // recurse - $matches['params'] = resolveNodes($matches['params']); - - $params = magicSplit( - '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,', - $matches['params'] - ); - - $paramCode = ''; - foreach ($params as $param) { - $paramCode .= $param . ', '; - } - - return 'new ' . $matches['name'] . '(' . $paramCode . 'attributes())'; - }, - $code - ); -} - -function resolveMacros($code) { - return preg_replace_callback( - '~\b(?)(?!array\()(?[a-z][A-Za-z]++)' . ARGS . '~', - function($matches) { - // recurse - $matches['args'] = resolveMacros($matches['args']); - - $name = $matches['name']; - $args = magicSplit( - '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,', - $matches['args'] - ); - - if ('attributes' === $name) { - assertArgs(0, $args, $name); - return '$this->startAttributeStack[#1] + $this->endAttributes'; - } - - if ('stackAttributes' === $name) { - assertArgs(1, $args, $name); - return '$this->startAttributeStack[' . $args[0] . ']' - . ' + $this->endAttributeStack[' . $args[0] . ']'; - } - - if ('init' === $name) { - return '$$ = array(' . implode(', ', $args) . ')'; - } - - if ('push' === $name) { - assertArgs(2, $args, $name); - - return $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0]; - } - - if ('pushNormalizing' === $name) { - assertArgs(2, $args, $name); - - return 'if (is_array(' . $args[1] . ')) { $$ = array_merge(' . $args[0] . ', ' . $args[1] . '); }' - . ' else { ' . $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0] . '; }'; - } - - if ('toArray' == $name) { - assertArgs(1, $args, $name); - - return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')'; - } - - if ('parseVar' === $name) { - assertArgs(1, $args, $name); - - return 'substr(' . $args[0] . ', 1)'; - } - - if ('parseEncapsed' === $name) { - assertArgs(3, $args, $name); - - return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {' - . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }'; - } - - if ('makeNop' === $name) { - assertArgs(3, $args, $name); - - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($startAttributes + ' . $args[2] . '); }' - . ' else { ' . $args[0] . ' = null; }'; - } - - if ('makeZeroLengthNop' == $name) { - assertArgs(2, $args, $name); - - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($this->createCommentNopAttributes($startAttributes[\'comments\'])); }' - . ' else { ' . $args[0] . ' = null; }'; - } - - if ('prependLeadingComments' === $name) { - assertArgs(1, $args, $name); - - return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; ' - . 'if (!empty($attrs[\'comments\'])) {' - . '$stmts[0]->setAttribute(\'comments\', ' - . 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }'; - } - - return $matches[0]; - }, - $code - ); -} - -function assertArgs($num, $args, $name) { - if ($num != count($args)) { - die('Wrong argument count for ' . $name . '().'); - } -} - -function resolveStackAccess($code) { - $code = preg_replace('/\$\d+/', '$this->semStack[$0]', $code); - $code = preg_replace('/#(\d+)/', '$$1', $code); - return $code; -} - -function removeTrailingWhitespace($code) { - $lines = explode("\n", $code); - $lines = array_map('rtrim', $lines); - return implode("\n", $lines); -} - -////////////////////////////// -/// Regex helper functions /// -////////////////////////////// - -function regex($regex) { - return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~'; -} - -function magicSplit($regex, $string) { - $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string); - - foreach ($pieces as &$piece) { - $piece = trim($piece); - } - - if ($pieces === ['']) { - return []; - } - - return $pieces; -} diff --git a/lib/nikic/php-parser/grammar/rebuildParsers.php b/lib/nikic/php-parser/grammar/rebuildParsers.php deleted file mode 100644 index 2d0c6b14d..000000000 --- a/lib/nikic/php-parser/grammar/rebuildParsers.php +++ /dev/null @@ -1,81 +0,0 @@ - 'Php5', - __DIR__ . '/php7.y' => 'Php7', -]; - -$tokensFile = __DIR__ . '/tokens.y'; -$tokensTemplate = __DIR__ . '/tokens.template'; -$skeletonFile = __DIR__ . '/parser.template'; -$tmpGrammarFile = __DIR__ . '/tmp_parser.phpy'; -$tmpResultFile = __DIR__ . '/tmp_parser.php'; -$resultDir = __DIR__ . '/../lib/PhpParser/Parser'; -$tokensResultsFile = $resultDir . '/Tokens.php'; - -$kmyacc = getenv('KMYACC'); -if (!$kmyacc) { - // Use phpyacc from dev dependencies by default. - $kmyacc = __DIR__ . '/../vendor/bin/phpyacc'; -} - -$options = array_flip($argv); -$optionDebug = isset($options['--debug']); -$optionKeepTmpGrammar = isset($options['--keep-tmp-grammar']); - -/////////////////// -/// Main script /// -/////////////////// - -$tokens = file_get_contents($tokensFile); - -foreach ($grammarFileToName as $grammarFile => $name) { - echo "Building temporary $name grammar file.\n"; - - $grammarCode = file_get_contents($grammarFile); - $grammarCode = str_replace('%tokens', $tokens, $grammarCode); - $grammarCode = preprocessGrammar($grammarCode); - - file_put_contents($tmpGrammarFile, $grammarCode); - - $additionalArgs = $optionDebug ? '-t -v' : ''; - - echo "Building $name parser.\n"; - $output = execCmd("$kmyacc $additionalArgs -m $skeletonFile -p $name $tmpGrammarFile"); - - $resultCode = file_get_contents($tmpResultFile); - $resultCode = removeTrailingWhitespace($resultCode); - - ensureDirExists($resultDir); - file_put_contents("$resultDir/$name.php", $resultCode); - unlink($tmpResultFile); - - echo "Building token definition.\n"; - $output = execCmd("$kmyacc -m $tokensTemplate $tmpGrammarFile"); - rename($tmpResultFile, $tokensResultsFile); - - if (!$optionKeepTmpGrammar) { - unlink($tmpGrammarFile); - } -} - -//////////////////////////////// -/// Utility helper functions /// -//////////////////////////////// - -function ensureDirExists($dir) { - if (!is_dir($dir)) { - mkdir($dir, 0777, true); - } -} - -function execCmd($cmd) { - $output = trim(shell_exec("$cmd 2>&1")); - if ($output !== "") { - echo "> " . $cmd . "\n"; - echo $output; - } - return $output; -} diff --git a/lib/nikic/php-parser/grammar/tokens.template b/lib/nikic/php-parser/grammar/tokens.template deleted file mode 100644 index ba4e4901c..000000000 --- a/lib/nikic/php-parser/grammar/tokens.template +++ /dev/null @@ -1,17 +0,0 @@ -semValue -#semval($,%t) $this->semValue -#semval(%n) $this->stackPos-(%l-%n) -#semval(%n,%t) $this->stackPos-(%l-%n) - -namespace PhpParser\Parser; -#include; - -/* GENERATED file based on grammar/tokens.y */ -final class Tokens -{ -#tokenval - const %s = %n; -#endtokenval -} diff --git a/lib/nikic/php-parser/grammar/tokens.y b/lib/nikic/php-parser/grammar/tokens.y deleted file mode 100644 index 8f0b21725..000000000 --- a/lib/nikic/php-parser/grammar/tokens.y +++ /dev/null @@ -1,115 +0,0 @@ -/* We currently rely on the token ID mapping to be the same between PHP 5 and PHP 7 - so the same lexer can be used for - * both. This is enforced by sharing this token file. */ - -%right T_THROW -%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE -%left ',' -%left T_LOGICAL_OR -%left T_LOGICAL_XOR -%left T_LOGICAL_AND -%right T_PRINT -%right T_YIELD -%right T_DOUBLE_ARROW -%right T_YIELD_FROM -%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL T_COALESCE_EQUAL -%left '?' ':' -%right T_COALESCE -%left T_BOOLEAN_OR -%left T_BOOLEAN_AND -%left '|' -%left '^' -%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG -%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP -%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL -%left T_SL T_SR -%left '+' '-' '.' -%left '*' '/' '%' -%right '!' -%nonassoc T_INSTANCEOF -%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@' -%right T_POW -%right '[' -%nonassoc T_NEW T_CLONE -%token T_EXIT -%token T_IF -%left T_ELSEIF -%left T_ELSE -%left T_ENDIF -%token T_LNUMBER -%token T_DNUMBER -%token T_STRING -%token T_STRING_VARNAME -%token T_VARIABLE -%token T_NUM_STRING -%token T_INLINE_HTML -%token T_ENCAPSED_AND_WHITESPACE -%token T_CONSTANT_ENCAPSED_STRING -%token T_ECHO -%token T_DO -%token T_WHILE -%token T_ENDWHILE -%token T_FOR -%token T_ENDFOR -%token T_FOREACH -%token T_ENDFOREACH -%token T_DECLARE -%token T_ENDDECLARE -%token T_AS -%token T_SWITCH -%token T_MATCH -%token T_ENDSWITCH -%token T_CASE -%token T_DEFAULT -%token T_BREAK -%token T_CONTINUE -%token T_GOTO -%token T_FUNCTION -%token T_FN -%token T_CONST -%token T_RETURN -%token T_TRY -%token T_CATCH -%token T_FINALLY -%token T_THROW -%token T_USE -%token T_INSTEADOF -%token T_GLOBAL -%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY -%token T_VAR -%token T_UNSET -%token T_ISSET -%token T_EMPTY -%token T_HALT_COMPILER -%token T_CLASS -%token T_TRAIT -%token T_INTERFACE -%token T_ENUM -%token T_EXTENDS -%token T_IMPLEMENTS -%token T_OBJECT_OPERATOR -%token T_NULLSAFE_OBJECT_OPERATOR -%token T_DOUBLE_ARROW -%token T_LIST -%token T_ARRAY -%token T_CALLABLE -%token T_CLASS_C -%token T_TRAIT_C -%token T_METHOD_C -%token T_FUNC_C -%token T_LINE -%token T_FILE -%token T_START_HEREDOC -%token T_END_HEREDOC -%token T_DOLLAR_OPEN_CURLY_BRACES -%token T_CURLY_OPEN -%token T_PAAMAYIM_NEKUDOTAYIM -%token T_NAMESPACE -%token T_NS_C -%token T_DIR -%token T_NS_SEPARATOR -%token T_ELLIPSIS -%token T_NAME_FULLY_QUALIFIED -%token T_NAME_QUALIFIED -%token T_NAME_RELATIVE -%token T_ATTRIBUTE -%token T_ENUM diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder.php b/lib/nikic/php-parser/lib/PhpParser/Builder.php deleted file mode 100644 index 26d8921ef..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder.php +++ /dev/null @@ -1,13 +0,0 @@ -constants = [new Const_($name, BuilderHelpers::normalizeValue($value))]; - } - - /** - * Add another constant to const group - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value - * - * @return $this The builder instance (for fluid interface) - */ - public function addConst($name, $value) { - $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value)); - - return $this; - } - - /** - * Makes the constant public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); - - return $this; - } - - /** - * Makes the constant protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); - - return $this; - } - - /** - * Makes the constant private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); - - return $this; - } - - /** - * Makes the constant final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); - - return $this; - } - - /** - * Sets doc comment for the constant. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\ClassConst The built constant node - */ - public function getNode(): PhpParser\Node { - return new Stmt\ClassConst( - $this->constants, - $this->flags, - $this->attributes, - $this->attributeGroups - ); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Class_.php deleted file mode 100644 index 35b54d041..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Class_.php +++ /dev/null @@ -1,146 +0,0 @@ -name = $name; - } - - /** - * Extends a class. - * - * @param Name|string $class Name of class to extend - * - * @return $this The builder instance (for fluid interface) - */ - public function extend($class) { - $this->extends = BuilderHelpers::normalizeName($class); - - return $this; - } - - /** - * Implements one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to implement - * - * @return $this The builder instance (for fluid interface) - */ - public function implement(...$interfaces) { - foreach ($interfaces as $interface) { - $this->implements[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Makes the class abstract. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeAbstract() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); - - return $this; - } - - /** - * Makes the class final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); - - return $this; - } - - public function makeReadonly() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\ClassConst::class => &$this->constants, - Stmt\Property::class => &$this->properties, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - $targets[$class][] = $stmt; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Class_ The built class node - */ - public function getNode() : PhpParser\Node { - return new Stmt\Class_($this->name, [ - 'flags' => $this->flags, - 'extends' => $this->extends, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Declaration.php deleted file mode 100644 index 830949928..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +++ /dev/null @@ -1,43 +0,0 @@ -addStmt($stmt); - } - - return $this; - } - - /** - * Sets doc comment for the declaration. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes['comments'] = [ - BuilderHelpers::normalizeDocComment($docComment) - ]; - - return $this; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/lib/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php deleted file mode 100644 index 02fa83e62..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +++ /dev/null @@ -1,85 +0,0 @@ -name = $name; - } - - /** - * Sets the value. - * - * @param Node\Expr|string|int $value - * - * @return $this - */ - public function setValue($value) { - $this->value = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets doc comment for the constant. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built enum case node. - * - * @return Stmt\EnumCase The built constant node - */ - public function getNode(): PhpParser\Node { - return new Stmt\EnumCase( - $this->name, - $this->value, - $this->attributes, - $this->attributeGroups - ); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Enum_.php deleted file mode 100644 index be7eef95f..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +++ /dev/null @@ -1,117 +0,0 @@ -name = $name; - } - - /** - * Sets the scalar type. - * - * @param string|Identifier $type - * - * @return $this - */ - public function setScalarType($scalarType) { - $this->scalarType = BuilderHelpers::normalizeType($scalarType); - - return $this; - } - - /** - * Implements one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to implement - * - * @return $this The builder instance (for fluid interface) - */ - public function implement(...$interfaces) { - foreach ($interfaces as $interface) { - $this->implements[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\EnumCase::class => &$this->enumCases, - Stmt\ClassConst::class => &$this->constants, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - $targets[$class][] = $stmt; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Enum_ The built enum node - */ - public function getNode() : PhpParser\Node { - return new Stmt\Enum_($this->name, [ - 'scalarType' => $this->scalarType, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/lib/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php deleted file mode 100644 index 98ea9d336..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +++ /dev/null @@ -1,73 +0,0 @@ -returnByRef = true; - - return $this; - } - - /** - * Adds a parameter. - * - * @param Node\Param|Param $param The parameter to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addParam($param) { - $param = BuilderHelpers::normalizeNode($param); - - if (!$param instanceof Node\Param) { - throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType())); - } - - $this->params[] = $param; - - return $this; - } - - /** - * Adds multiple parameters. - * - * @param array $params The parameters to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addParams(array $params) { - foreach ($params as $param) { - $this->addParam($param); - } - - return $this; - } - - /** - * Sets the return type for PHP 7. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type - * - * @return $this The builder instance (for fluid interface) - */ - public function setReturnType($type) { - $this->returnType = BuilderHelpers::normalizeType($type); - - return $this; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Function_.php deleted file mode 100644 index 1cd73c0d3..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Function_.php +++ /dev/null @@ -1,67 +0,0 @@ -name = $name; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built function node. - * - * @return Stmt\Function_ The built function node - */ - public function getNode() : Node { - return new Stmt\Function_($this->name, [ - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Interface_.php deleted file mode 100644 index 7806e85fc..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +++ /dev/null @@ -1,93 +0,0 @@ -name = $name; - } - - /** - * Extends one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to extend - * - * @return $this The builder instance (for fluid interface) - */ - public function extend(...$interfaces) { - foreach ($interfaces as $interface) { - $this->extends[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - // we erase all statements in the body of an interface method - $stmt->stmts = null; - $this->methods[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built interface node. - * - * @return Stmt\Interface_ The built interface node - */ - public function getNode() : PhpParser\Node { - return new Stmt\Interface_($this->name, [ - 'extends' => $this->extends, - 'stmts' => array_merge($this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Method.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Method.php deleted file mode 100644 index 232d7cb87..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Method.php +++ /dev/null @@ -1,146 +0,0 @@ -name = $name; - } - - /** - * Makes the method public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); - - return $this; - } - - /** - * Makes the method protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); - - return $this; - } - - /** - * Makes the method private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); - - return $this; - } - - /** - * Makes the method static. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); - - return $this; - } - - /** - * Makes the method abstract. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeAbstract() { - if (!empty($this->stmts)) { - throw new \LogicException('Cannot make method with statements abstract'); - } - - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); - $this->stmts = null; // abstract methods don't have statements - - return $this; - } - - /** - * Makes the method final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); - - return $this; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - if (null === $this->stmts) { - throw new \LogicException('Cannot add statements to an abstract method'); - } - - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built method node. - * - * @return Stmt\ClassMethod The built method node - */ - public function getNode() : Node { - return new Stmt\ClassMethod($this->name, [ - 'flags' => $this->flags, - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php deleted file mode 100644 index 1c751e163..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +++ /dev/null @@ -1,45 +0,0 @@ -name = null !== $name ? BuilderHelpers::normalizeName($name) : null; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Returns the built node. - * - * @return Stmt\Namespace_ The built node - */ - public function getNode() : Node { - return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Param.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Param.php deleted file mode 100644 index de9aae7e5..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ /dev/null @@ -1,122 +0,0 @@ -name = $name; - } - - /** - * Sets default value for the parameter. - * - * @param mixed $value Default value to use - * - * @return $this The builder instance (for fluid interface) - */ - public function setDefault($value) { - $this->default = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets type for the parameter. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type - * - * @return $this The builder instance (for fluid interface) - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - if ($this->type == 'void') { - throw new \LogicException('Parameter type cannot be void'); - } - - return $this; - } - - /** - * Sets type for the parameter. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type - * - * @return $this The builder instance (for fluid interface) - * - * @deprecated Use setType() instead - */ - public function setTypeHint($type) { - return $this->setType($type); - } - - /** - * Make the parameter accept the value by reference. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeByRef() { - $this->byRef = true; - - return $this; - } - - /** - * Make the parameter variadic - * - * @return $this The builder instance (for fluid interface) - */ - public function makeVariadic() { - $this->variadic = true; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built parameter node. - * - * @return Node\Param The built parameter node - */ - public function getNode() : Node { - return new Node\Param( - new Node\Expr\Variable($this->name), - $this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups - ); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Property.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Property.php deleted file mode 100644 index 68e318565..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ /dev/null @@ -1,161 +0,0 @@ -name = $name; - } - - /** - * Makes the property public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); - - return $this; - } - - /** - * Makes the property protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); - - return $this; - } - - /** - * Makes the property private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); - - return $this; - } - - /** - * Makes the property static. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); - - return $this; - } - - /** - * Makes the property readonly. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); - - return $this; - } - - /** - * Sets default value for the property. - * - * @param mixed $value Default value to use - * - * @return $this The builder instance (for fluid interface) - */ - public function setDefault($value) { - $this->default = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets doc comment for the property. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Sets the property type for PHP 7.4+. - * - * @param string|Name|Identifier|ComplexType $type - * - * @return $this - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Property The built property node - */ - public function getNode() : PhpParser\Node { - return new Stmt\Property( - $this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC, - [ - new Stmt\PropertyProperty($this->name, $this->default) - ], - $this->attributes, - $this->type, - $this->attributeGroups - ); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/lib/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php deleted file mode 100644 index 311e8cd7b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +++ /dev/null @@ -1,64 +0,0 @@ -and($trait); - } - } - - /** - * Adds used trait. - * - * @param Node\Name|string $trait Trait name - * - * @return $this The builder instance (for fluid interface) - */ - public function and($trait) { - $this->traits[] = BuilderHelpers::normalizeName($trait); - return $this; - } - - /** - * Adds trait adaptation. - * - * @param Stmt\TraitUseAdaptation|Builder\TraitUseAdaptation $adaptation Trait adaptation - * - * @return $this The builder instance (for fluid interface) - */ - public function with($adaptation) { - $adaptation = BuilderHelpers::normalizeNode($adaptation); - - if (!$adaptation instanceof Stmt\TraitUseAdaptation) { - throw new \LogicException('Adaptation must have type TraitUseAdaptation'); - } - - $this->adaptations[] = $adaptation; - return $this; - } - - /** - * Returns the built node. - * - * @return Node The built node - */ - public function getNode() : Node { - return new Stmt\TraitUse($this->traits, $this->adaptations); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php deleted file mode 100644 index eb6c0b622..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +++ /dev/null @@ -1,148 +0,0 @@ -type = self::TYPE_UNDEFINED; - - $this->trait = is_null($trait)? null: BuilderHelpers::normalizeName($trait); - $this->method = BuilderHelpers::normalizeIdentifier($method); - } - - /** - * Sets alias of method. - * - * @param Node\Identifier|string $alias Alias for adaptated method - * - * @return $this The builder instance (for fluid interface) - */ - public function as($alias) { - if ($this->type === self::TYPE_UNDEFINED) { - $this->type = self::TYPE_ALIAS; - } - - if ($this->type !== self::TYPE_ALIAS) { - throw new \LogicException('Cannot set alias for not alias adaptation buider'); - } - - $this->alias = $alias; - return $this; - } - - /** - * Sets adaptated method public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC); - return $this; - } - - /** - * Sets adaptated method protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED); - return $this; - } - - /** - * Sets adaptated method private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE); - return $this; - } - - /** - * Adds overwritten traits. - * - * @param Node\Name|string ...$traits Traits for overwrite - * - * @return $this The builder instance (for fluid interface) - */ - public function insteadof(...$traits) { - if ($this->type === self::TYPE_UNDEFINED) { - if (is_null($this->trait)) { - throw new \LogicException('Precedence adaptation must have trait'); - } - - $this->type = self::TYPE_PRECEDENCE; - } - - if ($this->type !== self::TYPE_PRECEDENCE) { - throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider'); - } - - foreach ($traits as $trait) { - $this->insteadof[] = BuilderHelpers::normalizeName($trait); - } - - return $this; - } - - protected function setModifier(int $modifier) { - if ($this->type === self::TYPE_UNDEFINED) { - $this->type = self::TYPE_ALIAS; - } - - if ($this->type !== self::TYPE_ALIAS) { - throw new \LogicException('Cannot set access modifier for not alias adaptation buider'); - } - - if (is_null($this->modifier)) { - $this->modifier = $modifier; - } else { - throw new \LogicException('Multiple access type modifiers are not allowed'); - } - } - - /** - * Returns the built node. - * - * @return Node The built node - */ - public function getNode() : Node { - switch ($this->type) { - case self::TYPE_ALIAS: - return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); - case self::TYPE_PRECEDENCE: - return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof); - default: - throw new \LogicException('Type of adaptation is not defined'); - } - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Trait_.php deleted file mode 100644 index 97f32f98d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +++ /dev/null @@ -1,78 +0,0 @@ -name = $name; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\Property) { - $this->properties[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - $this->methods[] = $stmt; - } elseif ($stmt instanceof Stmt\TraitUse) { - $this->uses[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built trait node. - * - * @return Stmt\Trait_ The built interface node - */ - public function getNode() : PhpParser\Node { - return new Stmt\Trait_( - $this->name, [ - 'stmts' => array_merge($this->uses, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes - ); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/lib/nikic/php-parser/lib/PhpParser/Builder/Use_.php deleted file mode 100644 index 4bd3d12df..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Builder/Use_.php +++ /dev/null @@ -1,49 +0,0 @@ -name = BuilderHelpers::normalizeName($name); - $this->type = $type; - } - - /** - * Sets alias for used name. - * - * @param string $alias Alias to use (last component of full name by default) - * - * @return $this The builder instance (for fluid interface) - */ - public function as(string $alias) { - $this->alias = $alias; - return $this; - } - - /** - * Returns the built node. - * - * @return Stmt\Use_ The built node - */ - public function getNode() : Node { - return new Stmt\Use_([ - new Stmt\UseUse($this->name, $this->alias) - ], $this->type); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/lib/nikic/php-parser/lib/PhpParser/BuilderFactory.php deleted file mode 100644 index fef2579b3..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ /dev/null @@ -1,399 +0,0 @@ -args($args) - ); - } - - /** - * Creates a namespace builder. - * - * @param null|string|Node\Name $name Name of the namespace - * - * @return Builder\Namespace_ The created namespace builder - */ - public function namespace($name) : Builder\Namespace_ { - return new Builder\Namespace_($name); - } - - /** - * Creates a class builder. - * - * @param string $name Name of the class - * - * @return Builder\Class_ The created class builder - */ - public function class(string $name) : Builder\Class_ { - return new Builder\Class_($name); - } - - /** - * Creates an interface builder. - * - * @param string $name Name of the interface - * - * @return Builder\Interface_ The created interface builder - */ - public function interface(string $name) : Builder\Interface_ { - return new Builder\Interface_($name); - } - - /** - * Creates a trait builder. - * - * @param string $name Name of the trait - * - * @return Builder\Trait_ The created trait builder - */ - public function trait(string $name) : Builder\Trait_ { - return new Builder\Trait_($name); - } - - /** - * Creates an enum builder. - * - * @param string $name Name of the enum - * - * @return Builder\Enum_ The created enum builder - */ - public function enum(string $name) : Builder\Enum_ { - return new Builder\Enum_($name); - } - - /** - * Creates a trait use builder. - * - * @param Node\Name|string ...$traits Trait names - * - * @return Builder\TraitUse The create trait use builder - */ - public function useTrait(...$traits) : Builder\TraitUse { - return new Builder\TraitUse(...$traits); - } - - /** - * Creates a trait use adaptation builder. - * - * @param Node\Name|string|null $trait Trait name - * @param Node\Identifier|string $method Method name - * - * @return Builder\TraitUseAdaptation The create trait use adaptation builder - */ - public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { - if ($method === null) { - $method = $trait; - $trait = null; - } - - return new Builder\TraitUseAdaptation($trait, $method); - } - - /** - * Creates a method builder. - * - * @param string $name Name of the method - * - * @return Builder\Method The created method builder - */ - public function method(string $name) : Builder\Method { - return new Builder\Method($name); - } - - /** - * Creates a parameter builder. - * - * @param string $name Name of the parameter - * - * @return Builder\Param The created parameter builder - */ - public function param(string $name) : Builder\Param { - return new Builder\Param($name); - } - - /** - * Creates a property builder. - * - * @param string $name Name of the property - * - * @return Builder\Property The created property builder - */ - public function property(string $name) : Builder\Property { - return new Builder\Property($name); - } - - /** - * Creates a function builder. - * - * @param string $name Name of the function - * - * @return Builder\Function_ The created function builder - */ - public function function(string $name) : Builder\Function_ { - return new Builder\Function_($name); - } - - /** - * Creates a namespace/class use builder. - * - * @param Node\Name|string $name Name of the entity (namespace or class) to alias - * - * @return Builder\Use_ The created use builder - */ - public function use($name) : Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_NORMAL); - } - - /** - * Creates a function use builder. - * - * @param Node\Name|string $name Name of the function to alias - * - * @return Builder\Use_ The created use function builder - */ - public function useFunction($name) : Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_FUNCTION); - } - - /** - * Creates a constant use builder. - * - * @param Node\Name|string $name Name of the const to alias - * - * @return Builder\Use_ The created use const builder - */ - public function useConst($name) : Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_CONSTANT); - } - - /** - * Creates a class constant builder. - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value - * - * @return Builder\ClassConst The created use const builder - */ - public function classConst($name, $value) : Builder\ClassConst { - return new Builder\ClassConst($name, $value); - } - - /** - * Creates an enum case builder. - * - * @param string|Identifier $name Name - * - * @return Builder\EnumCase The created use const builder - */ - public function enumCase($name) : Builder\EnumCase { - return new Builder\EnumCase($name); - } - - /** - * Creates node a for a literal value. - * - * @param Expr|bool|null|int|float|string|array $value $value - * - * @return Expr - */ - public function val($value) : Expr { - return BuilderHelpers::normalizeValue($value); - } - - /** - * Creates variable node. - * - * @param string|Expr $name Name - * - * @return Expr\Variable - */ - public function var($name) : Expr\Variable { - if (!\is_string($name) && !$name instanceof Expr) { - throw new \LogicException('Variable name must be string or Expr'); - } - - return new Expr\Variable($name); - } - - /** - * Normalizes an argument list. - * - * Creates Arg nodes for all arguments and converts literal values to expressions. - * - * @param array $args List of arguments to normalize - * - * @return Arg[] - */ - public function args(array $args) : array { - $normalizedArgs = []; - foreach ($args as $key => $arg) { - if (!($arg instanceof Arg)) { - $arg = new Arg(BuilderHelpers::normalizeValue($arg)); - } - if (\is_string($key)) { - $arg->name = BuilderHelpers::normalizeIdentifier($key); - } - $normalizedArgs[] = $arg; - } - return $normalizedArgs; - } - - /** - * Creates a function call node. - * - * @param string|Name|Expr $name Function name - * @param array $args Function arguments - * - * @return Expr\FuncCall - */ - public function funcCall($name, array $args = []) : Expr\FuncCall { - return new Expr\FuncCall( - BuilderHelpers::normalizeNameOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates a method call node. - * - * @param Expr $var Variable the method is called on - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - * - * @return Expr\MethodCall - */ - public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall { - return new Expr\MethodCall( - $var, - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates a static method call node. - * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - * - * @return Expr\StaticCall - */ - public function staticCall($class, $name, array $args = []) : Expr\StaticCall { - return new Expr\StaticCall( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates an object creation node. - * - * @param string|Name|Expr $class Class name - * @param array $args Constructor arguments - * - * @return Expr\New_ - */ - public function new($class, array $args = []) : Expr\New_ { - return new Expr\New_( - BuilderHelpers::normalizeNameOrExpr($class), - $this->args($args) - ); - } - - /** - * Creates a constant fetch node. - * - * @param string|Name $name Constant name - * - * @return Expr\ConstFetch - */ - public function constFetch($name) : Expr\ConstFetch { - return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); - } - - /** - * Creates a property fetch node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name - * - * @return Expr\PropertyFetch - */ - public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch { - return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); - } - - /** - * Creates a class constant fetch node. - * - * @param string|Name|Expr $class Class name - * @param string|Identifier $name Constant name - * - * @return Expr\ClassConstFetch - */ - public function classConstFetch($class, $name): Expr\ClassConstFetch { - return new Expr\ClassConstFetch( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifier($name) - ); - } - - /** - * Creates nested Concat nodes from a list of expressions. - * - * @param Expr|string ...$exprs Expressions or literal strings - * - * @return Concat - */ - public function concat(...$exprs) : Concat { - $numExprs = count($exprs); - if ($numExprs < 2) { - throw new \LogicException('Expected at least two expressions'); - } - - $lastConcat = $this->normalizeStringExpr($exprs[0]); - for ($i = 1; $i < $numExprs; $i++) { - $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); - } - return $lastConcat; - } - - /** - * @param string|Expr $expr - * @return Expr - */ - private function normalizeStringExpr($expr) : Expr { - if ($expr instanceof Expr) { - return $expr; - } - - if (\is_string($expr)) { - return new String_($expr); - } - - throw new \LogicException('Expected string or Expr'); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/lib/nikic/php-parser/lib/PhpParser/BuilderHelpers.php deleted file mode 100644 index b8839db32..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ /dev/null @@ -1,322 +0,0 @@ -getNode(); - } - - if ($node instanceof Node) { - return $node; - } - - throw new \LogicException('Expected node or builder object'); - } - - /** - * Normalizes a node to a statement. - * - * Expressions are wrapped in a Stmt\Expression node. - * - * @param Node|Builder $node The node to normalize - * - * @return Stmt The normalized statement node - */ - public static function normalizeStmt($node) : Stmt { - $node = self::normalizeNode($node); - if ($node instanceof Stmt) { - return $node; - } - - if ($node instanceof Expr) { - return new Stmt\Expression($node); - } - - throw new \LogicException('Expected statement or expression node'); - } - - /** - * Normalizes strings to Identifier. - * - * @param string|Identifier $name The identifier to normalize - * - * @return Identifier The normalized identifier - */ - public static function normalizeIdentifier($name) : Identifier { - if ($name instanceof Identifier) { - return $name; - } - - if (\is_string($name)) { - return new Identifier($name); - } - - throw new \LogicException('Expected string or instance of Node\Identifier'); - } - - /** - * Normalizes strings to Identifier, also allowing expressions. - * - * @param string|Identifier|Expr $name The identifier to normalize - * - * @return Identifier|Expr The normalized identifier or expression - */ - public static function normalizeIdentifierOrExpr($name) { - if ($name instanceof Identifier || $name instanceof Expr) { - return $name; - } - - if (\is_string($name)) { - return new Identifier($name); - } - - throw new \LogicException('Expected string or instance of Node\Identifier or Node\Expr'); - } - - /** - * Normalizes a name: Converts string names to Name nodes. - * - * @param Name|string $name The name to normalize - * - * @return Name The normalized name - */ - public static function normalizeName($name) : Name { - if ($name instanceof Name) { - return $name; - } - - if (is_string($name)) { - if (!$name) { - throw new \LogicException('Name cannot be empty'); - } - - if ($name[0] === '\\') { - return new Name\FullyQualified(substr($name, 1)); - } - - if (0 === strpos($name, 'namespace\\')) { - return new Name\Relative(substr($name, strlen('namespace\\'))); - } - - return new Name($name); - } - - throw new \LogicException('Name must be a string or an instance of Node\Name'); - } - - /** - * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. - * - * @param Expr|Name|string $name The name to normalize - * - * @return Name|Expr The normalized name or expression - */ - public static function normalizeNameOrExpr($name) { - if ($name instanceof Expr) { - return $name; - } - - if (!is_string($name) && !($name instanceof Name)) { - throw new \LogicException( - 'Name must be a string or an instance of Node\Name or Node\Expr' - ); - } - - return self::normalizeName($name); - } - - /** - * Normalizes a type: Converts plain-text type names into proper AST representation. - * - * In particular, builtin types become Identifiers, custom types become Names and nullables - * are wrapped in NullableType nodes. - * - * @param string|Name|Identifier|ComplexType $type The type to normalize - * - * @return Name|Identifier|ComplexType The normalized type - */ - public static function normalizeType($type) { - if (!is_string($type)) { - if ( - !$type instanceof Name && !$type instanceof Identifier && - !$type instanceof ComplexType - ) { - throw new \LogicException( - 'Type must be a string, or an instance of Name, Identifier or ComplexType' - ); - } - return $type; - } - - $nullable = false; - if (strlen($type) > 0 && $type[0] === '?') { - $nullable = true; - $type = substr($type, 1); - } - - $builtinTypes = [ - 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed', 'never', - ]; - - $lowerType = strtolower($type); - if (in_array($lowerType, $builtinTypes)) { - $type = new Identifier($lowerType); - } else { - $type = self::normalizeName($type); - } - - $notNullableTypes = [ - 'void', 'mixed', 'never', - ]; - if ($nullable && in_array((string) $type, $notNullableTypes)) { - throw new \LogicException(sprintf('%s type cannot be nullable', $type)); - } - - return $nullable ? new NullableType($type) : $type; - } - - /** - * Normalizes a value: Converts nulls, booleans, integers, - * floats, strings and arrays into their respective nodes - * - * @param Node\Expr|bool|null|int|float|string|array $value The value to normalize - * - * @return Expr The normalized value - */ - public static function normalizeValue($value) : Expr { - if ($value instanceof Node\Expr) { - return $value; - } - - if (is_null($value)) { - return new Expr\ConstFetch( - new Name('null') - ); - } - - if (is_bool($value)) { - return new Expr\ConstFetch( - new Name($value ? 'true' : 'false') - ); - } - - if (is_int($value)) { - return new Scalar\LNumber($value); - } - - if (is_float($value)) { - return new Scalar\DNumber($value); - } - - if (is_string($value)) { - return new Scalar\String_($value); - } - - if (is_array($value)) { - $items = []; - $lastKey = -1; - foreach ($value as $itemKey => $itemValue) { - // for consecutive, numeric keys don't generate keys - if (null !== $lastKey && ++$lastKey === $itemKey) { - $items[] = new Expr\ArrayItem( - self::normalizeValue($itemValue) - ); - } else { - $lastKey = null; - $items[] = new Expr\ArrayItem( - self::normalizeValue($itemValue), - self::normalizeValue($itemKey) - ); - } - } - - return new Expr\Array_($items); - } - - throw new \LogicException('Invalid value'); - } - - /** - * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc. - * - * @param Comment\Doc|string $docComment The doc comment to normalize - * - * @return Comment\Doc The normalized doc comment - */ - public static function normalizeDocComment($docComment) : Comment\Doc { - if ($docComment instanceof Comment\Doc) { - return $docComment; - } - - if (is_string($docComment)) { - return new Comment\Doc($docComment); - } - - throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); - } - - /** - * Normalizes a attribute: Converts attribute to the Attribute Group if needed. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return Node\AttributeGroup The Attribute Group - */ - public static function normalizeAttribute($attribute) : Node\AttributeGroup - { - if ($attribute instanceof Node\AttributeGroup) { - return $attribute; - } - - if (!($attribute instanceof Node\Attribute)) { - throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); - } - - return new Node\AttributeGroup([$attribute]); - } - - /** - * Adds a modifier and returns new modifier bitmask. - * - * @param int $modifiers Existing modifiers - * @param int $modifier Modifier to set - * - * @return int New modifiers - */ - public static function addModifier(int $modifiers, int $modifier) : int { - Stmt\Class_::verifyModifier($modifiers, $modifier); - return $modifiers | $modifier; - } - - /** - * Adds a modifier and returns new modifier bitmask. - * @return int New modifiers - */ - public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int { - Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet); - return $existingModifiers | $modifierToSet; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Comment.php b/lib/nikic/php-parser/lib/PhpParser/Comment.php deleted file mode 100644 index 61e98d3dc..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Comment.php +++ /dev/null @@ -1,239 +0,0 @@ -text = $text; - $this->startLine = $startLine; - $this->startFilePos = $startFilePos; - $this->startTokenPos = $startTokenPos; - $this->endLine = $endLine; - $this->endFilePos = $endFilePos; - $this->endTokenPos = $endTokenPos; - } - - /** - * Gets the comment text. - * - * @return string The comment text (including comment delimiters like /*) - */ - public function getText() : string { - return $this->text; - } - - /** - * Gets the line number the comment started on. - * - * @return int Line number (or -1 if not available) - */ - public function getStartLine() : int { - return $this->startLine; - } - - /** - * Gets the file offset the comment started on. - * - * @return int File offset (or -1 if not available) - */ - public function getStartFilePos() : int { - return $this->startFilePos; - } - - /** - * Gets the token offset the comment started on. - * - * @return int Token offset (or -1 if not available) - */ - public function getStartTokenPos() : int { - return $this->startTokenPos; - } - - /** - * Gets the line number the comment ends on. - * - * @return int Line number (or -1 if not available) - */ - public function getEndLine() : int { - return $this->endLine; - } - - /** - * Gets the file offset the comment ends on. - * - * @return int File offset (or -1 if not available) - */ - public function getEndFilePos() : int { - return $this->endFilePos; - } - - /** - * Gets the token offset the comment ends on. - * - * @return int Token offset (or -1 if not available) - */ - public function getEndTokenPos() : int { - return $this->endTokenPos; - } - - /** - * Gets the line number the comment started on. - * - * @deprecated Use getStartLine() instead - * - * @return int Line number - */ - public function getLine() : int { - return $this->startLine; - } - - /** - * Gets the file offset the comment started on. - * - * @deprecated Use getStartFilePos() instead - * - * @return int File offset - */ - public function getFilePos() : int { - return $this->startFilePos; - } - - /** - * Gets the token offset the comment started on. - * - * @deprecated Use getStartTokenPos() instead - * - * @return int Token offset - */ - public function getTokenPos() : int { - return $this->startTokenPos; - } - - /** - * Gets the comment text. - * - * @return string The comment text (including comment delimiters like /*) - */ - public function __toString() : string { - return $this->text; - } - - /** - * Gets the reformatted comment text. - * - * "Reformatted" here means that we try to clean up the whitespace at the - * starts of the lines. This is necessary because we receive the comments - * without trailing whitespace on the first line, but with trailing whitespace - * on all subsequent lines. - * - * @return mixed|string - */ - public function getReformattedText() { - $text = trim($this->text); - $newlinePos = strpos($text, "\n"); - if (false === $newlinePos) { - // Single line comments don't need further processing - return $text; - } elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) { - // Multi line comment of the type - // - // /* - // * Some text. - // * Some more text. - // */ - // - // is handled by replacing the whitespace sequences before the * by a single space - return preg_replace('(^\s+\*)m', ' *', $this->text); - } elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { - // Multi line comment of the type - // - // /* - // Some text. - // Some more text. - // */ - // - // is handled by removing the whitespace sequence on the line before the closing - // */ on all lines. So if the last line is " */", then " " is removed at the - // start of all lines. - return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); - } elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { - // Multi line comment of the type - // - // /* Some text. - // Some more text. - // Indented text. - // Even more text. */ - // - // is handled by removing the difference between the shortest whitespace prefix on all - // lines and the length of the "/* " opening sequence. - $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1)); - $removeLen = $prefixLen - strlen($matches[0]); - return preg_replace('(^\s{' . $removeLen . '})m', '', $text); - } - - // No idea how to format this comment, so simply return as is - return $text; - } - - /** - * Get length of shortest whitespace prefix (at the start of a line). - * - * If there is a line with no prefix whitespace, 0 is a valid return value. - * - * @param string $str String to check - * @return int Length in characters. Tabs count as single characters. - */ - private function getShortestWhitespacePrefixLen(string $str) : int { - $lines = explode("\n", $str); - $shortestPrefixLen = \INF; - foreach ($lines as $line) { - preg_match('(^\s*)', $line, $matches); - $prefixLen = strlen($matches[0]); - if ($prefixLen < $shortestPrefixLen) { - $shortestPrefixLen = $prefixLen; - } - } - return $shortestPrefixLen; - } - - /** - * @return array - * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} - */ - public function jsonSerialize() : array { - // Technically not a node, but we make it look like one anyway - $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; - return [ - 'nodeType' => $type, - 'text' => $this->text, - // TODO: Rename these to include "start". - 'line' => $this->startLine, - 'filePos' => $this->startFilePos, - 'tokenPos' => $this->startTokenPos, - 'endLine' => $this->endLine, - 'endFilePos' => $this->endFilePos, - 'endTokenPos' => $this->endTokenPos, - ]; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/lib/nikic/php-parser/lib/PhpParser/Comment/Doc.php deleted file mode 100644 index a9db6128f..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Comment/Doc.php +++ /dev/null @@ -1,7 +0,0 @@ -fallbackEvaluator = $fallbackEvaluator ?? function(Expr $expr) { - throw new ConstExprEvaluationException( - "Expression of type {$expr->getType()} cannot be evaluated" - ); - }; - } - - /** - * Silently evaluates a constant expression into a PHP value. - * - * Thrown Errors, warnings or notices will be converted into a ConstExprEvaluationException. - * The original source of the exception is available through getPrevious(). - * - * If some part of the expression cannot be evaluated, the fallback evaluator passed to the - * constructor will be invoked. By default, if no fallback is provided, an exception of type - * ConstExprEvaluationException is thrown. - * - * See class doc comment for caveats and limitations. - * - * @param Expr $expr Constant expression to evaluate - * @return mixed Result of evaluation - * - * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred - */ - public function evaluateSilently(Expr $expr) { - set_error_handler(function($num, $str, $file, $line) { - throw new \ErrorException($str, 0, $num, $file, $line); - }); - - try { - return $this->evaluate($expr); - } catch (\Throwable $e) { - if (!$e instanceof ConstExprEvaluationException) { - $e = new ConstExprEvaluationException( - "An error occurred during constant expression evaluation", 0, $e); - } - throw $e; - } finally { - restore_error_handler(); - } - } - - /** - * Directly evaluates a constant expression into a PHP value. - * - * May generate Error exceptions, warnings or notices. Use evaluateSilently() to convert these - * into a ConstExprEvaluationException. - * - * If some part of the expression cannot be evaluated, the fallback evaluator passed to the - * constructor will be invoked. By default, if no fallback is provided, an exception of type - * ConstExprEvaluationException is thrown. - * - * See class doc comment for caveats and limitations. - * - * @param Expr $expr Constant expression to evaluate - * @return mixed Result of evaluation - * - * @throws ConstExprEvaluationException if the expression cannot be evaluated - */ - public function evaluateDirectly(Expr $expr) { - return $this->evaluate($expr); - } - - private function evaluate(Expr $expr) { - if ($expr instanceof Scalar\LNumber - || $expr instanceof Scalar\DNumber - || $expr instanceof Scalar\String_ - ) { - return $expr->value; - } - - if ($expr instanceof Expr\Array_) { - return $this->evaluateArray($expr); - } - - // Unary operators - if ($expr instanceof Expr\UnaryPlus) { - return +$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\UnaryMinus) { - return -$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\BooleanNot) { - return !$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\BitwiseNot) { - return ~$this->evaluate($expr->expr); - } - - if ($expr instanceof Expr\BinaryOp) { - return $this->evaluateBinaryOp($expr); - } - - if ($expr instanceof Expr\Ternary) { - return $this->evaluateTernary($expr); - } - - if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) { - return $this->evaluate($expr->var)[$this->evaluate($expr->dim)]; - } - - if ($expr instanceof Expr\ConstFetch) { - return $this->evaluateConstFetch($expr); - } - - return ($this->fallbackEvaluator)($expr); - } - - private function evaluateArray(Expr\Array_ $expr) { - $array = []; - foreach ($expr->items as $item) { - if (null !== $item->key) { - $array[$this->evaluate($item->key)] = $this->evaluate($item->value); - } elseif ($item->unpack) { - $array = array_merge($array, $this->evaluate($item->value)); - } else { - $array[] = $this->evaluate($item->value); - } - } - return $array; - } - - private function evaluateTernary(Expr\Ternary $expr) { - if (null === $expr->if) { - return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); - } - - return $this->evaluate($expr->cond) - ? $this->evaluate($expr->if) - : $this->evaluate($expr->else); - } - - private function evaluateBinaryOp(Expr\BinaryOp $expr) { - if ($expr instanceof Expr\BinaryOp\Coalesce - && $expr->left instanceof Expr\ArrayDimFetch - ) { - // This needs to be special cased to respect BP_VAR_IS fetch semantics - return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)] - ?? $this->evaluate($expr->right); - } - - // The evaluate() calls are repeated in each branch, because some of the operators are - // short-circuiting and evaluating the RHS in advance may be illegal in that case - $l = $expr->left; - $r = $expr->right; - switch ($expr->getOperatorSigil()) { - case '&': return $this->evaluate($l) & $this->evaluate($r); - case '|': return $this->evaluate($l) | $this->evaluate($r); - case '^': return $this->evaluate($l) ^ $this->evaluate($r); - case '&&': return $this->evaluate($l) && $this->evaluate($r); - case '||': return $this->evaluate($l) || $this->evaluate($r); - case '??': return $this->evaluate($l) ?? $this->evaluate($r); - case '.': return $this->evaluate($l) . $this->evaluate($r); - case '/': return $this->evaluate($l) / $this->evaluate($r); - case '==': return $this->evaluate($l) == $this->evaluate($r); - case '>': return $this->evaluate($l) > $this->evaluate($r); - case '>=': return $this->evaluate($l) >= $this->evaluate($r); - case '===': return $this->evaluate($l) === $this->evaluate($r); - case 'and': return $this->evaluate($l) and $this->evaluate($r); - case 'or': return $this->evaluate($l) or $this->evaluate($r); - case 'xor': return $this->evaluate($l) xor $this->evaluate($r); - case '-': return $this->evaluate($l) - $this->evaluate($r); - case '%': return $this->evaluate($l) % $this->evaluate($r); - case '*': return $this->evaluate($l) * $this->evaluate($r); - case '!=': return $this->evaluate($l) != $this->evaluate($r); - case '!==': return $this->evaluate($l) !== $this->evaluate($r); - case '+': return $this->evaluate($l) + $this->evaluate($r); - case '**': return $this->evaluate($l) ** $this->evaluate($r); - case '<<': return $this->evaluate($l) << $this->evaluate($r); - case '>>': return $this->evaluate($l) >> $this->evaluate($r); - case '<': return $this->evaluate($l) < $this->evaluate($r); - case '<=': return $this->evaluate($l) <= $this->evaluate($r); - case '<=>': return $this->evaluate($l) <=> $this->evaluate($r); - } - - throw new \Exception('Should not happen'); - } - - private function evaluateConstFetch(Expr\ConstFetch $expr) { - $name = $expr->name->toLowerString(); - switch ($name) { - case 'null': return null; - case 'false': return false; - case 'true': return true; - } - - return ($this->fallbackEvaluator)($expr); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Error.php b/lib/nikic/php-parser/lib/PhpParser/Error.php deleted file mode 100644 index d1fb959d1..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Error.php +++ /dev/null @@ -1,180 +0,0 @@ -rawMessage = $message; - if (is_array($attributes)) { - $this->attributes = $attributes; - } else { - $this->attributes = ['startLine' => $attributes]; - } - $this->updateMessage(); - } - - /** - * Gets the error message - * - * @return string Error message - */ - public function getRawMessage() : string { - return $this->rawMessage; - } - - /** - * Gets the line the error starts in. - * - * @return int Error start line - */ - public function getStartLine() : int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets the line the error ends in. - * - * @return int Error end line - */ - public function getEndLine() : int { - return $this->attributes['endLine'] ?? -1; - } - - /** - * Gets the attributes of the node/token the error occurred at. - * - * @return array - */ - public function getAttributes() : array { - return $this->attributes; - } - - /** - * Sets the attributes of the node/token the error occurred at. - * - * @param array $attributes - */ - public function setAttributes(array $attributes) { - $this->attributes = $attributes; - $this->updateMessage(); - } - - /** - * Sets the line of the PHP file the error occurred in. - * - * @param string $message Error message - */ - public function setRawMessage(string $message) { - $this->rawMessage = $message; - $this->updateMessage(); - } - - /** - * Sets the line the error starts in. - * - * @param int $line Error start line - */ - public function setStartLine(int $line) { - $this->attributes['startLine'] = $line; - $this->updateMessage(); - } - - /** - * Returns whether the error has start and end column information. - * - * For column information enable the startFilePos and endFilePos in the lexer options. - * - * @return bool - */ - public function hasColumnInfo() : bool { - return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); - } - - /** - * Gets the start column (1-based) into the line where the error started. - * - * @param string $code Source code of the file - * @return int - */ - public function getStartColumn(string $code) : int { - if (!$this->hasColumnInfo()) { - throw new \RuntimeException('Error does not have column information'); - } - - return $this->toColumn($code, $this->attributes['startFilePos']); - } - - /** - * Gets the end column (1-based) into the line where the error ended. - * - * @param string $code Source code of the file - * @return int - */ - public function getEndColumn(string $code) : int { - if (!$this->hasColumnInfo()) { - throw new \RuntimeException('Error does not have column information'); - } - - return $this->toColumn($code, $this->attributes['endFilePos']); - } - - /** - * Formats message including line and column information. - * - * @param string $code Source code associated with the error, for calculation of the columns - * - * @return string Formatted message - */ - public function getMessageWithColumnInfo(string $code) : string { - return sprintf( - '%s from %d:%d to %d:%d', $this->getRawMessage(), - $this->getStartLine(), $this->getStartColumn($code), - $this->getEndLine(), $this->getEndColumn($code) - ); - } - - /** - * Converts a file offset into a column. - * - * @param string $code Source code that $pos indexes into - * @param int $pos 0-based position in $code - * - * @return int 1-based column (relative to start of line) - */ - private function toColumn(string $code, int $pos) : int { - if ($pos > strlen($code)) { - throw new \RuntimeException('Invalid position information'); - } - - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { - $lineStartPos = -1; - } - - return $pos - $lineStartPos; - } - - /** - * Updates the exception message after a change to rawMessage or rawLine. - */ - protected function updateMessage() { - $this->message = $this->rawMessage; - - if (-1 === $this->getStartLine()) { - $this->message .= ' on unknown line'; - } else { - $this->message .= ' on line ' . $this->getStartLine(); - } - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/lib/nikic/php-parser/lib/PhpParser/ErrorHandler.php deleted file mode 100644 index d620e7453..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/ErrorHandler.php +++ /dev/null @@ -1,13 +0,0 @@ -errors[] = $error; - } - - /** - * Get collected errors. - * - * @return Error[] - */ - public function getErrors() : array { - return $this->errors; - } - - /** - * Check whether there are any errors. - * - * @return bool - */ - public function hasErrors() : bool { - return !empty($this->errors); - } - - /** - * Reset/clear collected errors. - */ - public function clearErrors() { - $this->errors = []; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/lib/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php deleted file mode 100644 index aeee989b1..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +++ /dev/null @@ -1,18 +0,0 @@ -type = $type; - $this->old = $old; - $this->new = $new; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/lib/nikic/php-parser/lib/PhpParser/Internal/Differ.php deleted file mode 100644 index 7f218c74f..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Internal/Differ.php +++ /dev/null @@ -1,164 +0,0 @@ -isEqual = $isEqual; - } - - /** - * Calculate diff (edit script) from $old to $new. - * - * @param array $old Original array - * @param array $new New array - * - * @return DiffElem[] Diff (edit script) - */ - public function diff(array $old, array $new) { - list($trace, $x, $y) = $this->calculateTrace($old, $new); - return $this->extractDiff($trace, $x, $y, $old, $new); - } - - /** - * Calculate diff, including "replace" operations. - * - * If a sequence of remove operations is followed by the same number of add operations, these - * will be coalesced into replace operations. - * - * @param array $old Original array - * @param array $new New array - * - * @return DiffElem[] Diff (edit script), including replace operations - */ - public function diffWithReplacements(array $old, array $new) { - return $this->coalesceReplacements($this->diff($old, $new)); - } - - private function calculateTrace(array $a, array $b) { - $n = \count($a); - $m = \count($b); - $max = $n + $m; - $v = [1 => 0]; - $trace = []; - for ($d = 0; $d <= $max; $d++) { - $trace[] = $v; - for ($k = -$d; $k <= $d; $k += 2) { - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { - $x = $v[$k+1]; - } else { - $x = $v[$k-1] + 1; - } - - $y = $x - $k; - while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) { - $x++; - $y++; - } - - $v[$k] = $x; - if ($x >= $n && $y >= $m) { - return [$trace, $x, $y]; - } - } - } - throw new \Exception('Should not happen'); - } - - private function extractDiff(array $trace, int $x, int $y, array $a, array $b) { - $result = []; - for ($d = \count($trace) - 1; $d >= 0; $d--) { - $v = $trace[$d]; - $k = $x - $y; - - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { - $prevK = $k + 1; - } else { - $prevK = $k - 1; - } - - $prevX = $v[$prevK]; - $prevY = $prevX - $prevK; - - while ($x > $prevX && $y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]); - $x--; - $y--; - } - - if ($d === 0) { - break; - } - - while ($x > $prevX) { - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null); - $x--; - } - - while ($y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]); - $y--; - } - } - return array_reverse($result); - } - - /** - * Coalesce equal-length sequences of remove+add into a replace operation. - * - * @param DiffElem[] $diff - * @return DiffElem[] - */ - private function coalesceReplacements(array $diff) { - $newDiff = []; - $c = \count($diff); - for ($i = 0; $i < $c; $i++) { - $diffType = $diff[$i]->type; - if ($diffType !== DiffElem::TYPE_REMOVE) { - $newDiff[] = $diff[$i]; - continue; - } - - $j = $i; - while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) { - $j++; - } - - $k = $j; - while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) { - $k++; - } - - if ($j - $i === $k - $j) { - $len = $j - $i; - for ($n = 0; $n < $len; $n++) { - $newDiff[] = new DiffElem( - DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new - ); - } - } else { - for (; $i < $k; $i++) { - $newDiff[] = $diff[$i]; - } - } - $i = $k - 1; - } - return $newDiff; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php deleted file mode 100644 index 3eeac04a4..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ /dev/null @@ -1,61 +0,0 @@ -attrGroups = $attrGroups; - $this->args = $args; - $this->extends = $extends; - $this->implements = $implements; - $this->stmts = $stmts; - } - - public static function fromNewNode(Expr\New_ $newNode) { - $class = $newNode->class; - assert($class instanceof Node\Stmt\Class_); - // We don't assert that $class->name is null here, to allow consumers to assign unique names - // to anonymous classes for their own purposes. We simplify ignore the name here. - return new self( - $class->attrGroups, $newNode->args, $class->extends, $class->implements, - $class->stmts, $newNode->getAttributes() - ); - } - - public function getType() : string { - return 'Expr_PrintableNewAnonClass'; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'args', 'extends', 'implements', 'stmts']; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/lib/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php deleted file mode 100644 index 84c0175ec..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +++ /dev/null @@ -1,281 +0,0 @@ -tokens = $tokens; - $this->indentMap = $this->calcIndentMap(); - } - - /** - * Whether the given position is immediately surrounded by parenthesis. - * - * @param int $startPos Start position - * @param int $endPos End position - * - * @return bool - */ - public function haveParens(int $startPos, int $endPos) : bool { - return $this->haveTokenImmediatelyBefore($startPos, '(') - && $this->haveTokenImmediatelyAfter($endPos, ')'); - } - - /** - * Whether the given position is immediately surrounded by braces. - * - * @param int $startPos Start position - * @param int $endPos End position - * - * @return bool - */ - public function haveBraces(int $startPos, int $endPos) : bool { - return ($this->haveTokenImmediatelyBefore($startPos, '{') - || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) - && $this->haveTokenImmediatelyAfter($endPos, '}'); - } - - /** - * Check whether the position is directly preceded by a certain token type. - * - * During this check whitespace and comments are skipped. - * - * @param int $pos Position before which the token should occur - * @param int|string $expectedTokenType Token to check for - * - * @return bool Whether the expected token was found - */ - public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool { - $tokens = $this->tokens; - $pos--; - for (; $pos >= 0; $pos--) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { - return true; - } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { - break; - } - } - return false; - } - - /** - * Check whether the position is directly followed by a certain token type. - * - * During this check whitespace and comments are skipped. - * - * @param int $pos Position after which the token should occur - * @param int|string $expectedTokenType Token to check for - * - * @return bool Whether the expected token was found - */ - public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool { - $tokens = $this->tokens; - $pos++; - for (; $pos < \count($tokens); $pos++) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { - return true; - } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { - break; - } - } - return false; - } - - public function skipLeft(int $pos, $skipTokenType) { - $tokens = $this->tokens; - - $pos = $this->skipLeftWhitespace($pos); - if ($skipTokenType === \T_WHITESPACE) { - return $pos; - } - - if ($tokens[$pos][0] !== $skipTokenType) { - // Shouldn't happen. The skip token MUST be there - throw new \Exception('Encountered unexpected token'); - } - $pos--; - - return $this->skipLeftWhitespace($pos); - } - - public function skipRight(int $pos, $skipTokenType) { - $tokens = $this->tokens; - - $pos = $this->skipRightWhitespace($pos); - if ($skipTokenType === \T_WHITESPACE) { - return $pos; - } - - if ($tokens[$pos][0] !== $skipTokenType) { - // Shouldn't happen. The skip token MUST be there - throw new \Exception('Encountered unexpected token'); - } - $pos++; - - return $this->skipRightWhitespace($pos); - } - - /** - * Return first non-whitespace token position smaller or equal to passed position. - * - * @param int $pos Token position - * @return int Non-whitespace token position - */ - public function skipLeftWhitespace(int $pos) { - $tokens = $this->tokens; - for (; $pos >= 0; $pos--) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { - break; - } - } - return $pos; - } - - /** - * Return first non-whitespace position greater or equal to passed position. - * - * @param int $pos Token position - * @return int Non-whitespace token position - */ - public function skipRightWhitespace(int $pos) { - $tokens = $this->tokens; - for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { - break; - } - } - return $pos; - } - - public function findRight(int $pos, $findTokenType) { - $tokens = $this->tokens; - for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type === $findTokenType) { - return $pos; - } - } - return -1; - } - - /** - * Whether the given position range contains a certain token type. - * - * @param int $startPos Starting position (inclusive) - * @param int $endPos Ending position (exclusive) - * @param int|string $tokenType Token type to look for - * @return bool Whether the token occurs in the given range - */ - public function haveTokenInRange(int $startPos, int $endPos, $tokenType) { - $tokens = $this->tokens; - for ($pos = $startPos; $pos < $endPos; $pos++) { - if ($tokens[$pos][0] === $tokenType) { - return true; - } - } - return false; - } - - public function haveBracesInRange(int $startPos, int $endPos) { - return $this->haveTokenInRange($startPos, $endPos, '{') - || $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN) - || $this->haveTokenInRange($startPos, $endPos, '}'); - } - - /** - * Get indentation before token position. - * - * @param int $pos Token position - * - * @return int Indentation depth (in spaces) - */ - public function getIndentationBefore(int $pos) : int { - return $this->indentMap[$pos]; - } - - /** - * Get the code corresponding to a token offset range, optionally adjusted for indentation. - * - * @param int $from Token start position (inclusive) - * @param int $to Token end position (exclusive) - * @param int $indent By how much the code should be indented (can be negative as well) - * - * @return string Code corresponding to token range, adjusted for indentation - */ - public function getTokenCode(int $from, int $to, int $indent) : string { - $tokens = $this->tokens; - $result = ''; - for ($pos = $from; $pos < $to; $pos++) { - $token = $tokens[$pos]; - if (\is_array($token)) { - $type = $token[0]; - $content = $token[1]; - if ($type === \T_CONSTANT_ENCAPSED_STRING || $type === \T_ENCAPSED_AND_WHITESPACE) { - $result .= $content; - } else { - // TODO Handle non-space indentation - if ($indent < 0) { - $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $content); - } elseif ($indent > 0) { - $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $content); - } else { - $result .= $content; - } - } - } else { - $result .= $token; - } - } - return $result; - } - - /** - * Precalculate the indentation at every token position. - * - * @return int[] Token position to indentation map - */ - private function calcIndentMap() { - $indentMap = []; - $indent = 0; - foreach ($this->tokens as $token) { - $indentMap[] = $indent; - - if ($token[0] === \T_WHITESPACE) { - $content = $token[1]; - $newlinePos = \strrpos($content, "\n"); - if (false !== $newlinePos) { - $indent = \strlen($content) - $newlinePos - 1; - } - } - } - - // Add a sentinel for one past end of the file - $indentMap[] = $indent; - - return $indentMap; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/lib/nikic/php-parser/lib/PhpParser/JsonDecoder.php deleted file mode 100644 index 47d2003d4..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/JsonDecoder.php +++ /dev/null @@ -1,103 +0,0 @@ -decodeRecursive($value); - } - - private function decodeRecursive($value) { - if (\is_array($value)) { - if (isset($value['nodeType'])) { - if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') { - return $this->decodeComment($value); - } - return $this->decodeNode($value); - } - return $this->decodeArray($value); - } - return $value; - } - - private function decodeArray(array $array) : array { - $decodedArray = []; - foreach ($array as $key => $value) { - $decodedArray[$key] = $this->decodeRecursive($value); - } - return $decodedArray; - } - - private function decodeNode(array $value) : Node { - $nodeType = $value['nodeType']; - if (!\is_string($nodeType)) { - throw new \RuntimeException('Node type must be a string'); - } - - $reflectionClass = $this->reflectionClassFromNodeType($nodeType); - /** @var Node $node */ - $node = $reflectionClass->newInstanceWithoutConstructor(); - - if (isset($value['attributes'])) { - if (!\is_array($value['attributes'])) { - throw new \RuntimeException('Attributes must be an array'); - } - - $node->setAttributes($this->decodeArray($value['attributes'])); - } - - foreach ($value as $name => $subNode) { - if ($name === 'nodeType' || $name === 'attributes') { - continue; - } - - $node->$name = $this->decodeRecursive($subNode); - } - - return $node; - } - - private function decodeComment(array $value) : Comment { - $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; - if (!isset($value['text'])) { - throw new \RuntimeException('Comment must have text'); - } - - return new $className( - $value['text'], - $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, - $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1 - ); - } - - private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass { - if (!isset($this->reflectionClassCache[$nodeType])) { - $className = $this->classNameFromNodeType($nodeType); - $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); - } - return $this->reflectionClassCache[$nodeType]; - } - - private function classNameFromNodeType(string $nodeType) : string { - $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); - if (class_exists($className)) { - return $className; - } - - $className .= '_'; - if (class_exists($className)) { - return $className; - } - - throw new \RuntimeException("Unknown node type \"$nodeType\""); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer.php b/lib/nikic/php-parser/lib/PhpParser/Lexer.php deleted file mode 100644 index e15dd0a5d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer.php +++ /dev/null @@ -1,560 +0,0 @@ -defineCompatibilityTokens(); - $this->tokenMap = $this->createTokenMap(); - $this->identifierTokens = $this->createIdentifierTokenMap(); - - // map of tokens to drop while lexing (the map is only used for isset lookup, - // that's why the value is simply set to 1; the value is never actually used.) - $this->dropTokens = array_fill_keys( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1 - ); - - $defaultAttributes = ['comments', 'startLine', 'endLine']; - $usedAttributes = array_fill_keys($options['usedAttributes'] ?? $defaultAttributes, true); - - // Create individual boolean properties to make these checks faster. - $this->attributeStartLineUsed = isset($usedAttributes['startLine']); - $this->attributeEndLineUsed = isset($usedAttributes['endLine']); - $this->attributeStartTokenPosUsed = isset($usedAttributes['startTokenPos']); - $this->attributeEndTokenPosUsed = isset($usedAttributes['endTokenPos']); - $this->attributeStartFilePosUsed = isset($usedAttributes['startFilePos']); - $this->attributeEndFilePosUsed = isset($usedAttributes['endFilePos']); - $this->attributeCommentsUsed = isset($usedAttributes['comments']); - } - - /** - * Initializes the lexer for lexing the provided source code. - * - * This function does not throw if lexing errors occur. Instead, errors may be retrieved using - * the getErrors() method. - * - * @param string $code The source code to lex - * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to - * ErrorHandler\Throwing - */ - public function startLexing(string $code, ErrorHandler $errorHandler = null) { - if (null === $errorHandler) { - $errorHandler = new ErrorHandler\Throwing(); - } - - $this->code = $code; // keep the code around for __halt_compiler() handling - $this->pos = -1; - $this->line = 1; - $this->filePos = 0; - - // If inline HTML occurs without preceding code, treat it as if it had a leading newline. - // This ensures proper composability, because having a newline is the "safe" assumption. - $this->prevCloseTagHasNewline = true; - - $scream = ini_set('xdebug.scream', '0'); - - $this->tokens = @token_get_all($code); - $this->postprocessTokens($errorHandler); - - if (false !== $scream) { - ini_set('xdebug.scream', $scream); - } - } - - private function handleInvalidCharacterRange($start, $end, $line, ErrorHandler $errorHandler) { - $tokens = []; - for ($i = $start; $i < $end; $i++) { - $chr = $this->code[$i]; - if ($chr === "\0") { - // PHP cuts error message after null byte, so need special case - $errorMsg = 'Unexpected null byte'; - } else { - $errorMsg = sprintf( - 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) - ); - } - - $tokens[] = [\T_BAD_CHARACTER, $chr, $line]; - $errorHandler->handleError(new Error($errorMsg, [ - 'startLine' => $line, - 'endLine' => $line, - 'startFilePos' => $i, - 'endFilePos' => $i, - ])); - } - return $tokens; - } - - /** - * Check whether comment token is unterminated. - * - * @return bool - */ - private function isUnterminatedComment($token) : bool { - return ($token[0] === \T_COMMENT || $token[0] === \T_DOC_COMMENT) - && substr($token[1], 0, 2) === '/*' - && substr($token[1], -2) !== '*/'; - } - - protected function postprocessTokens(ErrorHandler $errorHandler) { - // PHP's error handling for token_get_all() is rather bad, so if we want detailed - // error information we need to compute it ourselves. Invalid character errors are - // detected by finding "gaps" in the token array. Unterminated comments are detected - // by checking if a trailing comment has a "*/" at the end. - // - // Additionally, we perform a number of canonicalizations here: - // * Use the PHP 8.0 comment format, which does not include trailing whitespace anymore. - // * Use PHP 8.0 T_NAME_* tokens. - // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and - // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. - - $filePos = 0; - $line = 1; - $numTokens = \count($this->tokens); - for ($i = 0; $i < $numTokens; $i++) { - $token = $this->tokens[$i]; - - // Since PHP 7.4 invalid characters are represented by a T_BAD_CHARACTER token. - // In this case we only need to emit an error. - if ($token[0] === \T_BAD_CHARACTER) { - $this->handleInvalidCharacterRange($filePos, $filePos + 1, $line, $errorHandler); - } - - if ($token[0] === \T_COMMENT && substr($token[1], 0, 2) !== '/*' - && preg_match('/(\r\n|\n|\r)$/D', $token[1], $matches)) { - $trailingNewline = $matches[0]; - $token[1] = substr($token[1], 0, -strlen($trailingNewline)); - $this->tokens[$i] = $token; - if (isset($this->tokens[$i + 1]) && $this->tokens[$i + 1][0] === \T_WHITESPACE) { - // Move trailing newline into following T_WHITESPACE token, if it already exists. - $this->tokens[$i + 1][1] = $trailingNewline . $this->tokens[$i + 1][1]; - $this->tokens[$i + 1][2]--; - } else { - // Otherwise, we need to create a new T_WHITESPACE token. - array_splice($this->tokens, $i + 1, 0, [ - [\T_WHITESPACE, $trailingNewline, $line], - ]); - $numTokens++; - } - } - - // Emulate PHP 8 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and T_STRING - // into a single token. - if (\is_array($token) - && ($token[0] === \T_NS_SEPARATOR || isset($this->identifierTokens[$token[0]]))) { - $lastWasSeparator = $token[0] === \T_NS_SEPARATOR; - $text = $token[1]; - for ($j = $i + 1; isset($this->tokens[$j]); $j++) { - if ($lastWasSeparator) { - if (!isset($this->identifierTokens[$this->tokens[$j][0]])) { - break; - } - $lastWasSeparator = false; - } else { - if ($this->tokens[$j][0] !== \T_NS_SEPARATOR) { - break; - } - $lastWasSeparator = true; - } - $text .= $this->tokens[$j][1]; - } - if ($lastWasSeparator) { - // Trailing separator is not part of the name. - $j--; - $text = substr($text, 0, -1); - } - if ($j > $i + 1) { - if ($token[0] === \T_NS_SEPARATOR) { - $type = \T_NAME_FULLY_QUALIFIED; - } else if ($token[0] === \T_NAMESPACE) { - $type = \T_NAME_RELATIVE; - } else { - $type = \T_NAME_QUALIFIED; - } - $token = [$type, $text, $line]; - array_splice($this->tokens, $i, $j - $i, [$token]); - $numTokens -= $j - $i - 1; - } - } - - if ($token === '&') { - $next = $i + 1; - while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \T_WHITESPACE) { - $next++; - } - $followedByVarOrVarArg = isset($this->tokens[$next]) && - ($this->tokens[$next][0] === \T_VARIABLE || $this->tokens[$next][0] === \T_ELLIPSIS); - $this->tokens[$i] = $token = [ - $followedByVarOrVarArg - ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, - '&', - $line, - ]; - } - - $tokenValue = \is_string($token) ? $token : $token[1]; - $tokenLen = \strlen($tokenValue); - - if (substr($this->code, $filePos, $tokenLen) !== $tokenValue) { - // Something is missing, must be an invalid character - $nextFilePos = strpos($this->code, $tokenValue, $filePos); - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, $nextFilePos, $line, $errorHandler); - $filePos = (int) $nextFilePos; - - array_splice($this->tokens, $i, 0, $badCharTokens); - $numTokens += \count($badCharTokens); - $i += \count($badCharTokens); - } - - $filePos += $tokenLen; - $line += substr_count($tokenValue, "\n"); - } - - if ($filePos !== \strlen($this->code)) { - if (substr($this->code, $filePos, 2) === '/*') { - // Unlike PHP, HHVM will drop unterminated comments entirely - $comment = substr($this->code, $filePos); - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $line, - 'endLine' => $line + substr_count($comment, "\n"), - 'startFilePos' => $filePos, - 'endFilePos' => $filePos + \strlen($comment), - ])); - - // Emulate the PHP behavior - $isDocComment = isset($comment[3]) && $comment[3] === '*'; - $this->tokens[] = [$isDocComment ? \T_DOC_COMMENT : \T_COMMENT, $comment, $line]; - } else { - // Invalid characters at the end of the input - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, \strlen($this->code), $line, $errorHandler); - $this->tokens = array_merge($this->tokens, $badCharTokens); - } - return; - } - - if (count($this->tokens) > 0) { - // Check for unterminated comment - $lastToken = $this->tokens[count($this->tokens) - 1]; - if ($this->isUnterminatedComment($lastToken)) { - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $line - substr_count($lastToken[1], "\n"), - 'endLine' => $line, - 'startFilePos' => $filePos - \strlen($lastToken[1]), - 'endFilePos' => $filePos, - ])); - } - } - } - - /** - * Fetches the next token. - * - * The available attributes are determined by the 'usedAttributes' option, which can - * be specified in the constructor. The following attributes are supported: - * - * * 'comments' => Array of PhpParser\Comment or PhpParser\Comment\Doc instances, - * representing all comments that occurred between the previous - * non-discarded token and the current one. - * * 'startLine' => Line in which the node starts. - * * 'endLine' => Line in which the node ends. - * * 'startTokenPos' => Offset into the token array of the first token in the node. - * * 'endTokenPos' => Offset into the token array of the last token in the node. - * * 'startFilePos' => Offset into the code string of the first character that is part of the node. - * * 'endFilePos' => Offset into the code string of the last character that is part of the node. - * - * @param mixed $value Variable to store token content in - * @param mixed $startAttributes Variable to store start attributes in - * @param mixed $endAttributes Variable to store end attributes in - * - * @return int Token id - */ - public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) : int { - $startAttributes = []; - $endAttributes = []; - - while (1) { - if (isset($this->tokens[++$this->pos])) { - $token = $this->tokens[$this->pos]; - } else { - // EOF token with ID 0 - $token = "\0"; - } - - if ($this->attributeStartLineUsed) { - $startAttributes['startLine'] = $this->line; - } - if ($this->attributeStartTokenPosUsed) { - $startAttributes['startTokenPos'] = $this->pos; - } - if ($this->attributeStartFilePosUsed) { - $startAttributes['startFilePos'] = $this->filePos; - } - - if (\is_string($token)) { - $value = $token; - if (isset($token[1])) { - // bug in token_get_all - $this->filePos += 2; - $id = ord('"'); - } else { - $this->filePos += 1; - $id = ord($token); - } - } elseif (!isset($this->dropTokens[$token[0]])) { - $value = $token[1]; - $id = $this->tokenMap[$token[0]]; - if (\T_CLOSE_TAG === $token[0]) { - $this->prevCloseTagHasNewline = false !== strpos($token[1], "\n") - || false !== strpos($token[1], "\r"); - } elseif (\T_INLINE_HTML === $token[0]) { - $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; - } - - $this->line += substr_count($value, "\n"); - $this->filePos += \strlen($value); - } else { - $origLine = $this->line; - $origFilePos = $this->filePos; - $this->line += substr_count($token[1], "\n"); - $this->filePos += \strlen($token[1]); - - if (\T_COMMENT === $token[0] || \T_DOC_COMMENT === $token[0]) { - if ($this->attributeCommentsUsed) { - $comment = \T_DOC_COMMENT === $token[0] - ? new Comment\Doc($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos) - : new Comment($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos); - $startAttributes['comments'][] = $comment; - } - } - continue; - } - - if ($this->attributeEndLineUsed) { - $endAttributes['endLine'] = $this->line; - } - if ($this->attributeEndTokenPosUsed) { - $endAttributes['endTokenPos'] = $this->pos; - } - if ($this->attributeEndFilePosUsed) { - $endAttributes['endFilePos'] = $this->filePos - 1; - } - - return $id; - } - - throw new \RuntimeException('Reached end of lexer loop'); - } - - /** - * Returns the token array for current code. - * - * The token array is in the same format as provided by the - * token_get_all() function and does not discard tokens (i.e. - * whitespace and comments are included). The token position - * attributes are against this token array. - * - * @return array Array of tokens in token_get_all() format - */ - public function getTokens() : array { - return $this->tokens; - } - - /** - * Handles __halt_compiler() by returning the text after it. - * - * @return string Remaining text - */ - public function handleHaltCompiler() : string { - // text after T_HALT_COMPILER, still including (); - $textAfter = substr($this->code, $this->filePos); - - // ensure that it is followed by (); - // this simplifies the situation, by not allowing any comments - // in between of the tokens. - if (!preg_match('~^\s*\(\s*\)\s*(?:;|\?>\r?\n?)~', $textAfter, $matches)) { - throw new Error('__HALT_COMPILER must be followed by "();"'); - } - - // prevent the lexer from returning any further tokens - $this->pos = count($this->tokens); - - // return with (); removed - return substr($textAfter, strlen($matches[0])); - } - - private function defineCompatibilityTokens() { - static $compatTokensDefined = false; - if ($compatTokensDefined) { - return; - } - - $compatTokens = [ - // PHP 7.4 - 'T_BAD_CHARACTER', - 'T_FN', - 'T_COALESCE_EQUAL', - // PHP 8.0 - 'T_NAME_QUALIFIED', - 'T_NAME_FULLY_QUALIFIED', - 'T_NAME_RELATIVE', - 'T_MATCH', - 'T_NULLSAFE_OBJECT_OPERATOR', - 'T_ATTRIBUTE', - // PHP 8.1 - 'T_ENUM', - 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', - 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', - 'T_READONLY', - ]; - - // PHP-Parser might be used together with another library that also emulates some or all - // of these tokens. Perform a sanity-check that all already defined tokens have been - // assigned a unique ID. - $usedTokenIds = []; - foreach ($compatTokens as $token) { - if (\defined($token)) { - $tokenId = \constant($token); - $clashingToken = $usedTokenIds[$tokenId] ?? null; - if ($clashingToken !== null) { - throw new \Error(sprintf( - 'Token %s has same ID as token %s, ' . - 'you may be using a library with broken token emulation', - $token, $clashingToken - )); - } - $usedTokenIds[$tokenId] = $token; - } - } - - // Now define any tokens that have not yet been emulated. Try to assign IDs from -1 - // downwards, but skip any IDs that may already be in use. - $newTokenId = -1; - foreach ($compatTokens as $token) { - if (!\defined($token)) { - while (isset($usedTokenIds[$newTokenId])) { - $newTokenId--; - } - \define($token, $newTokenId); - $newTokenId--; - } - } - - $compatTokensDefined = true; - } - - /** - * Creates the token map. - * - * The token map maps the PHP internal token identifiers - * to the identifiers used by the Parser. Additionally it - * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. - * - * @return array The token map - */ - protected function createTokenMap() : array { - $tokenMap = []; - - // 256 is the minimum possible token number, as everything below - // it is an ASCII value - for ($i = 256; $i < 1000; ++$i) { - if (\T_DOUBLE_COLON === $i) { - // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM - $tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM; - } elseif(\T_OPEN_TAG_WITH_ECHO === $i) { - // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO - $tokenMap[$i] = Tokens::T_ECHO; - } elseif(\T_CLOSE_TAG === $i) { - // T_CLOSE_TAG is equivalent to ';' - $tokenMap[$i] = ord(';'); - } elseif ('UNKNOWN' !== $name = token_name($i)) { - if ('T_HASHBANG' === $name) { - // HHVM uses a special token for #! hashbang lines - $tokenMap[$i] = Tokens::T_INLINE_HTML; - } elseif (defined($name = Tokens::class . '::' . $name)) { - // Other tokens can be mapped directly - $tokenMap[$i] = constant($name); - } - } - } - - // HHVM uses a special token for numbers that overflow to double - if (defined('T_ONUMBER')) { - $tokenMap[\T_ONUMBER] = Tokens::T_DNUMBER; - } - // HHVM also has a separate token for the __COMPILER_HALT_OFFSET__ constant - if (defined('T_COMPILER_HALT_OFFSET')) { - $tokenMap[\T_COMPILER_HALT_OFFSET] = Tokens::T_STRING; - } - - // Assign tokens for which we define compatibility constants, as token_name() does not know them. - $tokenMap[\T_FN] = Tokens::T_FN; - $tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL; - $tokenMap[\T_NAME_QUALIFIED] = Tokens::T_NAME_QUALIFIED; - $tokenMap[\T_NAME_FULLY_QUALIFIED] = Tokens::T_NAME_FULLY_QUALIFIED; - $tokenMap[\T_NAME_RELATIVE] = Tokens::T_NAME_RELATIVE; - $tokenMap[\T_MATCH] = Tokens::T_MATCH; - $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR; - $tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE; - $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_ENUM] = Tokens::T_ENUM; - $tokenMap[\T_READONLY] = Tokens::T_READONLY; - - return $tokenMap; - } - - private function createIdentifierTokenMap(): array { - // Based on semi_reserved production. - return array_fill_keys([ - \T_STRING, - \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, - \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, - \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, - \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, - \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, - \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, - \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, - \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, - \T_MATCH, - ], true); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php deleted file mode 100644 index 5c56e026b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ /dev/null @@ -1,248 +0,0 @@ -targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_1; - unset($options['phpVersion']); - - parent::__construct($options); - - $emulators = [ - new FlexibleDocStringEmulator(), - new FnTokenEmulator(), - new MatchTokenEmulator(), - new CoaleseEqualTokenEmulator(), - new NumericLiteralSeparatorEmulator(), - new NullsafeTokenEmulator(), - new AttributeEmulator(), - new EnumTokenEmulator(), - new ReadonlyTokenEmulator(), - new ExplicitOctalEmulator(), - ]; - - // Collect emulators that are relevant for the PHP version we're running - // and the PHP version we're targeting for emulation. - foreach ($emulators as $emulator) { - $emulatorPhpVersion = $emulator->getPhpVersion(); - if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) { - $this->emulators[] = $emulator; - } else if ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { - $this->emulators[] = new ReverseEmulator($emulator); - } - } - } - - public function startLexing(string $code, ErrorHandler $errorHandler = null) { - $emulators = array_filter($this->emulators, function($emulator) use($code) { - return $emulator->isEmulationNeeded($code); - }); - - if (empty($emulators)) { - // Nothing to emulate, yay - parent::startLexing($code, $errorHandler); - return; - } - - $this->patches = []; - foreach ($emulators as $emulator) { - $code = $emulator->preprocessCode($code, $this->patches); - } - - $collector = new ErrorHandler\Collecting(); - parent::startLexing($code, $collector); - $this->sortPatches(); - $this->fixupTokens(); - - $errors = $collector->getErrors(); - if (!empty($errors)) { - $this->fixupErrors($errors); - foreach ($errors as $error) { - $errorHandler->handleError($error); - } - } - - foreach ($emulators as $emulator) { - $this->tokens = $emulator->emulate($code, $this->tokens); - } - } - - private function isForwardEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>='); - } - - private function isReverseEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<'); - } - - private function sortPatches() - { - // Patches may be contributed by different emulators. - // Make sure they are sorted by increasing patch position. - usort($this->patches, function($p1, $p2) { - return $p1[0] <=> $p2[0]; - }); - } - - private function fixupTokens() - { - if (\count($this->patches) === 0) { - return; - } - - // Load first patch - $patchIdx = 0; - - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - - // We use a manual loop over the tokens, because we modify the array on the fly - $pos = 0; - for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) { - $token = $this->tokens[$i]; - if (\is_string($token)) { - if ($patchPos === $pos) { - // Only support replacement for string tokens. - assert($patchType === 'replace'); - $this->tokens[$i] = $patchText; - - // Fetch the next patch - $patchIdx++; - if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; - } - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - } - - $pos += \strlen($token); - continue; - } - - $len = \strlen($token[1]); - $posDelta = 0; - while ($patchPos >= $pos && $patchPos < $pos + $len) { - $patchTextLen = \strlen($patchText); - if ($patchType === 'remove') { - if ($patchPos === $pos && $patchTextLen === $len) { - // Remove token entirely - array_splice($this->tokens, $i, 1, []); - $i--; - $c--; - } else { - // Remove from token string - $this->tokens[$i][1] = substr_replace( - $token[1], '', $patchPos - $pos + $posDelta, $patchTextLen - ); - $posDelta -= $patchTextLen; - } - } elseif ($patchType === 'add') { - // Insert into the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, 0 - ); - $posDelta += $patchTextLen; - } else if ($patchType === 'replace') { - // Replace inside the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen - ); - } else { - assert(false); - } - - // Fetch the next patch - $patchIdx++; - if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; - } - - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - - // Multiple patches may apply to the same token. Reload the current one to check - // If the new patch applies - $token = $this->tokens[$i]; - } - - $pos += $len; - } - - // A patch did not apply - assert(false); - } - - /** - * Fixup line and position information in errors. - * - * @param Error[] $errors - */ - private function fixupErrors(array $errors) { - foreach ($errors as $error) { - $attrs = $error->getAttributes(); - - $posDelta = 0; - $lineDelta = 0; - foreach ($this->patches as $patch) { - list($patchPos, $patchType, $patchText) = $patch; - if ($patchPos >= $attrs['startFilePos']) { - // No longer relevant - break; - } - - if ($patchType === 'add') { - $posDelta += strlen($patchText); - $lineDelta += substr_count($patchText, "\n"); - } else if ($patchType === 'remove') { - $posDelta -= strlen($patchText); - $lineDelta -= substr_count($patchText, "\n"); - } - } - - $attrs['startFilePos'] += $posDelta; - $attrs['endFilePos'] += $posDelta; - $attrs['startLine'] += $lineDelta; - $attrs['endLine'] += $lineDelta; - $error->setAttributes($attrs); - } - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php deleted file mode 100644 index 6776a5197..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ /dev/null @@ -1,56 +0,0 @@ -resolveIntegerOrFloatToken($tokens[$i + 1][1]); - array_splice($tokens, $i, 2, [ - [$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]], - ]); - $c--; - } - } - return $tokens; - } - - private function resolveIntegerOrFloatToken(string $str): int - { - $str = substr($str, 1); - $str = str_replace('_', '', $str); - $num = octdec($str); - return is_float($num) ? \T_DNUMBER : \T_LNUMBER; - } - - public function reverseEmulate(string $code, array $tokens): array { - // Explicit octals were not legal code previously, don't bother. - return $tokens; - } -} \ No newline at end of file diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php deleted file mode 100644 index c15d6271f..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +++ /dev/null @@ -1,76 +0,0 @@ -\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?(?:;?[\r\n])?)/x -REGEX; - - public function getPhpVersion(): string - { - return Emulative::PHP_7_3; - } - - public function isEmulationNeeded(string $code) : bool - { - return strpos($code, '<<<') !== false; - } - - public function emulate(string $code, array $tokens): array - { - // Handled by preprocessing + fixup. - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // Not supported. - return $tokens; - } - - public function preprocessCode(string $code, array &$patches): string { - if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { - // No heredoc/nowdoc found - return $code; - } - - // Keep track of how much we need to adjust string offsets due to the modifications we - // already made - $posDelta = 0; - foreach ($matches as $match) { - $indentation = $match['indentation'][0]; - $indentationStart = $match['indentation'][1]; - - $separator = $match['separator'][0]; - $separatorStart = $match['separator'][1]; - - if ($indentation === '' && $separator !== '') { - // Ordinary heredoc/nowdoc - continue; - } - - if ($indentation !== '') { - // Remove indentation - $indentationLen = strlen($indentation); - $code = substr_replace($code, '', $indentationStart + $posDelta, $indentationLen); - $patches[] = [$indentationStart + $posDelta, 'add', $indentation]; - $posDelta -= $indentationLen; - } - - if ($separator === '') { - // Insert newline as separator - $code = substr_replace($code, "\n", $separatorStart + $posDelta, 0); - $patches[] = [$separatorStart + $posDelta, 'remove', "\n"]; - $posDelta += 1; - } - } - - return $code; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php deleted file mode 100644 index eb7e49634..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +++ /dev/null @@ -1,23 +0,0 @@ -getKeywordString()) !== false; - } - - protected function isKeywordContext(array $tokens, int $pos): bool - { - $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos); - return $previousNonSpaceToken === null || $previousNonSpaceToken[0] !== \T_OBJECT_OPERATOR; - } - - public function emulate(string $code, array $tokens): array - { - $keywordString = $this->getKeywordString(); - foreach ($tokens as $i => $token) { - if ($token[0] === T_STRING && strtolower($token[1]) === $keywordString - && $this->isKeywordContext($tokens, $i)) { - $tokens[$i][0] = $this->getKeywordToken(); - } - } - - return $tokens; - } - - /** - * @param mixed[] $tokens - * @return mixed[]|null - */ - private function getPreviousNonSpaceToken(array $tokens, int $start) - { - for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i][0] === T_WHITESPACE) { - continue; - } - - return $tokens[$i]; - } - - return null; - } - - public function reverseEmulate(string $code, array $tokens): array - { - $keywordToken = $this->getKeywordToken(); - foreach ($tokens as $i => $token) { - if ($token[0] === $keywordToken) { - $tokens[$i][0] = \T_STRING; - } - } - - return $tokens; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php deleted file mode 100644 index 902a46dfc..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ /dev/null @@ -1,23 +0,0 @@ -') !== false; - } - - public function emulate(string $code, array $tokens): array - { - // We need to manually iterate and manage a count because we'll change - // the tokens array on the way - $line = 1; - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i] === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1][0] === \T_OBJECT_OPERATOR) { - array_splice($tokens, $i, 2, [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line] - ]); - $c--; - continue; - } - - // Handle ?-> inside encapsed string. - if ($tokens[$i][0] === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) - && $tokens[$i - 1][0] === \T_VARIABLE - && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $tokens[$i][1], $matches) - ) { - $replacement = [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line], - [\T_STRING, $matches[1], $line], - ]; - if (\strlen($matches[0]) !== \strlen($tokens[$i][1])) { - $replacement[] = [ - \T_ENCAPSED_AND_WHITESPACE, - \substr($tokens[$i][1], \strlen($matches[0])), - $line - ]; - } - array_splice($tokens, $i, 1, $replacement); - $c += \count($replacement) - 1; - continue; - } - - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // ?-> was not valid code previously, don't bother. - return $tokens; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php deleted file mode 100644 index cdf793e46..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +++ /dev/null @@ -1,105 +0,0 @@ -resolveIntegerOrFloatToken($match); - $newTokens = [[$tokenKind, $match, $token[2]]]; - - $numTokens = 1; - $len = $tokenLen; - while ($matchLen > $len) { - $nextToken = $tokens[$i + $numTokens]; - $nextTokenText = \is_array($nextToken) ? $nextToken[1] : $nextToken; - $nextTokenLen = \strlen($nextTokenText); - - $numTokens++; - if ($matchLen < $len + $nextTokenLen) { - // Split trailing characters into a partial token. - assert(is_array($nextToken), "Partial token should be an array token"); - $partialText = substr($nextTokenText, $matchLen - $len); - $newTokens[] = [$nextToken[0], $partialText, $nextToken[2]]; - break; - } - - $len += $nextTokenLen; - } - - array_splice($tokens, $i, $numTokens, $newTokens); - $c -= $numTokens - \count($newTokens); - $codeOffset += $matchLen; - } - - return $tokens; - } - - private function resolveIntegerOrFloatToken(string $str): int - { - $str = str_replace('_', '', $str); - - if (stripos($str, '0b') === 0) { - $num = bindec($str); - } elseif (stripos($str, '0x') === 0) { - $num = hexdec($str); - } elseif (stripos($str, '0') === 0 && ctype_digit($str)) { - $num = octdec($str); - } else { - $num = +$str; - } - - return is_float($num) ? T_DNUMBER : T_LNUMBER; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // Numeric separators were not legal code previously, don't bother. - return $tokens; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php deleted file mode 100644 index b97f8d112..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ /dev/null @@ -1,23 +0,0 @@ -emulator = $emulator; - } - - public function getPhpVersion(): string { - return $this->emulator->getPhpVersion(); - } - - public function isEmulationNeeded(string $code): bool { - return $this->emulator->isEmulationNeeded($code); - } - - public function emulate(string $code, array $tokens): array { - return $this->emulator->reverseEmulate($code, $tokens); - } - - public function reverseEmulate(string $code, array $tokens): array { - return $this->emulator->emulate($code, $tokens); - } - - public function preprocessCode(string $code, array &$patches): string { - return $code; - } -} \ No newline at end of file diff --git a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php deleted file mode 100644 index a020bc0ff..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ /dev/null @@ -1,25 +0,0 @@ - [aliasName => originalName]] */ - protected $aliases = []; - - /** @var Name[][] Same as $aliases but preserving original case */ - protected $origAliases = []; - - /** @var ErrorHandler Error handler */ - protected $errorHandler; - - /** - * Create a name context. - * - * @param ErrorHandler $errorHandler Error handling used to report errors - */ - public function __construct(ErrorHandler $errorHandler) { - $this->errorHandler = $errorHandler; - } - - /** - * Start a new namespace. - * - * This also resets the alias table. - * - * @param Name|null $namespace Null is the global namespace - */ - public function startNamespace(Name $namespace = null) { - $this->namespace = $namespace; - $this->origAliases = $this->aliases = [ - Stmt\Use_::TYPE_NORMAL => [], - Stmt\Use_::TYPE_FUNCTION => [], - Stmt\Use_::TYPE_CONSTANT => [], - ]; - } - - /** - * Add an alias / import. - * - * @param Name $name Original name - * @param string $aliasName Aliased name - * @param int $type One of Stmt\Use_::TYPE_* - * @param array $errorAttrs Attributes to use to report an error - */ - public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []) { - // Constant names are case sensitive, everything else case insensitive - if ($type === Stmt\Use_::TYPE_CONSTANT) { - $aliasLookupName = $aliasName; - } else { - $aliasLookupName = strtolower($aliasName); - } - - if (isset($this->aliases[$type][$aliasLookupName])) { - $typeStringMap = [ - Stmt\Use_::TYPE_NORMAL => '', - Stmt\Use_::TYPE_FUNCTION => 'function ', - Stmt\Use_::TYPE_CONSTANT => 'const ', - ]; - - $this->errorHandler->handleError(new Error( - sprintf( - 'Cannot use %s%s as %s because the name is already in use', - $typeStringMap[$type], $name, $aliasName - ), - $errorAttrs - )); - return; - } - - $this->aliases[$type][$aliasLookupName] = $name; - $this->origAliases[$type][$aliasName] = $name; - } - - /** - * Get current namespace. - * - * @return null|Name Namespace (or null if global namespace) - */ - public function getNamespace() { - return $this->namespace; - } - - /** - * Get resolved name. - * - * @param Name $name Name to resolve - * @param int $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} - * - * @return null|Name Resolved name, or null if static resolution is not possible - */ - public function getResolvedName(Name $name, int $type) { - // don't resolve special class names - if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { - if (!$name->isUnqualified()) { - $this->errorHandler->handleError(new Error( - sprintf("'\\%s' is an invalid class name", $name->toString()), - $name->getAttributes() - )); - } - return $name; - } - - // fully qualified names are already resolved - if ($name->isFullyQualified()) { - return $name; - } - - // Try to resolve aliases - if (null !== $resolvedName = $this->resolveAlias($name, $type)) { - return $resolvedName; - } - - if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) { - if (null === $this->namespace) { - // outside of a namespace unaliased unqualified is same as fully qualified - return new FullyQualified($name, $name->getAttributes()); - } - - // Cannot resolve statically - return null; - } - - // if no alias exists prepend current namespace - return FullyQualified::concat($this->namespace, $name, $name->getAttributes()); - } - - /** - * Get resolved class name. - * - * @param Name $name Class ame to resolve - * - * @return Name Resolved name - */ - public function getResolvedClassName(Name $name) : Name { - return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); - } - - /** - * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). - * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* - * - * @return Name[] Possible representations of the name - */ - public function getPossibleNames(string $name, int $type) : array { - $lcName = strtolower($name); - - if ($type === Stmt\Use_::TYPE_NORMAL) { - // self, parent and static must always be unqualified - if ($lcName === "self" || $lcName === "parent" || $lcName === "static") { - return [new Name($name)]; - } - } - - // Collect possible ways to write this name, starting with the fully-qualified name - $possibleNames = [new FullyQualified($name)]; - - if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) { - // Make sure there is no alias that makes the normally namespace-relative name - // into something else - if (null === $this->resolveAlias($nsRelativeName, $type)) { - $possibleNames[] = $nsRelativeName; - } - } - - // Check for relevant namespace use statements - foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) { - $lcOrig = $orig->toLowerString(); - if (0 === strpos($lcName, $lcOrig . '\\')) { - $possibleNames[] = new Name($alias . substr($name, strlen($lcOrig))); - } - } - - // Check for relevant type-specific use statements - foreach ($this->origAliases[$type] as $alias => $orig) { - if ($type === Stmt\Use_::TYPE_CONSTANT) { - // Constants are are complicated-sensitive - $normalizedOrig = $this->normalizeConstName($orig->toString()); - if ($normalizedOrig === $this->normalizeConstName($name)) { - $possibleNames[] = new Name($alias); - } - } else { - // Everything else is case-insensitive - if ($orig->toLowerString() === $lcName) { - $possibleNames[] = new Name($alias); - } - } - } - - return $possibleNames; - } - - /** - * Get shortest representation of this fully-qualified name. - * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* - * - * @return Name Shortest representation - */ - public function getShortName(string $name, int $type) : Name { - $possibleNames = $this->getPossibleNames($name, $type); - - // Find shortest name - $shortestName = null; - $shortestLength = \INF; - foreach ($possibleNames as $possibleName) { - $length = strlen($possibleName->toCodeString()); - if ($length < $shortestLength) { - $shortestName = $possibleName; - $shortestLength = $length; - } - } - - return $shortestName; - } - - private function resolveAlias(Name $name, $type) { - $firstPart = $name->getFirst(); - - if ($name->isQualified()) { - // resolve aliases for qualified names, always against class alias table - $checkName = strtolower($firstPart); - if (isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName])) { - $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName]; - return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes()); - } - } elseif ($name->isUnqualified()) { - // constant aliases are case-sensitive, function aliases case-insensitive - $checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : strtolower($firstPart); - if (isset($this->aliases[$type][$checkName])) { - // resolve unqualified aliases - return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes()); - } - } - - // No applicable aliases - return null; - } - - private function getNamespaceRelativeName(string $name, string $lcName, int $type) { - if (null === $this->namespace) { - return new Name($name); - } - - if ($type === Stmt\Use_::TYPE_CONSTANT) { - // The constants true/false/null always resolve to the global symbols, even inside a - // namespace, so they may be used without qualification - if ($lcName === "true" || $lcName === "false" || $lcName === "null") { - return new Name($name); - } - } - - $namespacePrefix = strtolower($this->namespace . '\\'); - if (0 === strpos($lcName, $namespacePrefix)) { - return new Name(substr($name, strlen($namespacePrefix))); - } - - return null; - } - - private function normalizeConstName(string $name) { - $nsSep = strrpos($name, '\\'); - if (false === $nsSep) { - return $name; - } - - // Constants have case-insensitive namespace and case-sensitive short-name - $ns = substr($name, 0, $nsSep); - $shortName = substr($name, $nsSep + 1); - return strtolower($ns) . '\\' . $shortName; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node.php b/lib/nikic/php-parser/lib/PhpParser/Node.php deleted file mode 100644 index befb25650..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node.php +++ /dev/null @@ -1,151 +0,0 @@ -attributes = $attributes; - $this->name = $name; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames() : array { - return ['name', 'value', 'byRef', 'unpack']; - } - - public function getType() : string { - return 'Arg'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Attribute.php b/lib/nikic/php-parser/lib/PhpParser/Node/Attribute.php deleted file mode 100644 index c96f66e51..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Attribute.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->name = $name; - $this->args = $args; - } - - public function getSubNodeNames() : array { - return ['name', 'args']; - } - - public function getType() : string { - return 'Attribute'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php b/lib/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php deleted file mode 100644 index 613bfc413..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +++ /dev/null @@ -1,29 +0,0 @@ -attributes = $attributes; - $this->attrs = $attrs; - } - - public function getSubNodeNames() : array { - return ['attrs']; - } - - public function getType() : string { - return 'AttributeGroup'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/lib/nikic/php-parser/lib/PhpParser/Node/ComplexType.php deleted file mode 100644 index 9505532ae..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +++ /dev/null @@ -1,14 +0,0 @@ -attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['name', 'value']; - } - - public function getType() : string { - return 'Const'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr.php deleted file mode 100644 index 6cf4df223..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr.php +++ /dev/null @@ -1,9 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->dim = $dim; - } - - public function getSubNodeNames() : array { - return ['var', 'dim']; - } - - public function getType() : string { - return 'Expr_ArrayDimFetch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php deleted file mode 100644 index 1b078f821..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +++ /dev/null @@ -1,41 +0,0 @@ -attributes = $attributes; - $this->key = $key; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames() : array { - return ['key', 'value', 'byRef', 'unpack']; - } - - public function getType() : string { - return 'Expr_ArrayItem'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php deleted file mode 100644 index e6eaa2834..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->items = $items; - } - - public function getSubNodeNames() : array { - return ['items']; - } - - public function getType() : string { - return 'Expr_Array'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php deleted file mode 100644 index c273fb7ee..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +++ /dev/null @@ -1,79 +0,0 @@ - false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'expr' => Expr : Expression body - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; - $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; - $this->expr = $subNodes['expr']; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; - } - - public function returnsByRef() : bool { - return $this->byRef; - } - - public function getParams() : array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getAttrGroups() : array { - return $this->attrGroups; - } - - /** - * @return Node\Stmt\Return_[] - */ - public function getStmts() : array { - return [new Node\Stmt\Return_($this->expr)]; - } - - public function getType() : string { - return 'Expr_ArrowFunction'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php deleted file mode 100644 index cf9e6e82b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['var', 'expr']; - } - - public function getType() : string { - return 'Expr_Assign'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php deleted file mode 100644 index bce8604f1..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['var', 'expr']; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php deleted file mode 100644 index 420284cdc..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +++ /dev/null @@ -1,12 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['var', 'expr']; - } - - public function getType() : string { - return 'Expr_AssignRef'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php deleted file mode 100644 index d9c582b0d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +++ /dev/null @@ -1,40 +0,0 @@ -attributes = $attributes; - $this->left = $left; - $this->right = $right; - } - - public function getSubNodeNames() : array { - return ['left', 'right']; - } - - /** - * Get the operator sigil for this binary operation. - * - * In the case there are multiple possible sigils for an operator, this method does not - * necessarily return the one used in the parsed code. - * - * @return string - */ - abstract public function getOperatorSigil() : string; -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php deleted file mode 100644 index d907393bf..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +++ /dev/null @@ -1,16 +0,0 @@ -'; - } - - public function getType() : string { - return 'Expr_BinaryOp_Greater'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php deleted file mode 100644 index d677502cf..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +++ /dev/null @@ -1,16 +0,0 @@ -='; - } - - public function getType() : string { - return 'Expr_BinaryOp_GreaterOrEqual'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php deleted file mode 100644 index 3d96285c6..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +++ /dev/null @@ -1,16 +0,0 @@ ->'; - } - - public function getType() : string { - return 'Expr_BinaryOp_ShiftRight'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php deleted file mode 100644 index 3cb8e7e0d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +++ /dev/null @@ -1,16 +0,0 @@ -'; - } - - public function getType() : string { - return 'Expr_BinaryOp_Spaceship'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php deleted file mode 100644 index ed44984be..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_BitwiseNot'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php deleted file mode 100644 index bf27e9f65..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_BooleanNot'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php deleted file mode 100644 index 78e1cf349..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ - abstract public function getRawArgs(): array; - - /** - * Returns whether this call expression is actually a first class callable. - */ - public function isFirstClassCallable(): bool { - foreach ($this->getRawArgs() as $arg) { - if ($arg instanceof VariadicPlaceholder) { - return true; - } - } - return false; - } - - /** - * Assert that this is not a first-class callable and return only ordinary Args. - * - * @return Arg[] - */ - public function getArgs(): array { - assert(!$this->isFirstClassCallable()); - return $this->getRawArgs(); - } -} \ No newline at end of file diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php deleted file mode 100644 index 36769d4fc..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +++ /dev/null @@ -1,26 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php deleted file mode 100644 index 57cc473b6..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +++ /dev/null @@ -1,12 +0,0 @@ -attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames() : array { - return ['class', 'name']; - } - - public function getType() : string { - return 'Expr_ClassConstFetch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php deleted file mode 100644 index db216b8f8..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_Clone'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php deleted file mode 100644 index 56ddea6aa..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ /dev/null @@ -1,79 +0,0 @@ - false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array(): Parameters - * 'uses' => array(): use()s - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attributes groups - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; - $this->params = $subNodes['params'] ?? []; - $this->uses = $subNodes['uses'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; - } - - public function returnsByRef() : bool { - return $this->byRef; - } - - public function getParams() : array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - /** @return Node\Stmt[] */ - public function getStmts() : array { - return $this->stmts; - } - - public function getAttrGroups() : array { - return $this->attrGroups; - } - - public function getType() : string { - return 'Expr_Closure'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php deleted file mode 100644 index 2b8a09666..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->byRef = $byRef; - } - - public function getSubNodeNames() : array { - return ['var', 'byRef']; - } - - public function getType() : string { - return 'Expr_ClosureUse'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php deleted file mode 100644 index 14ebd16bd..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +++ /dev/null @@ -1,31 +0,0 @@ -attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames() : array { - return ['name']; - } - - public function getType() : string { - return 'Expr_ConstFetch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php deleted file mode 100644 index 4042ec93c..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_Empty'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php deleted file mode 100644 index 1637f3aea..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +++ /dev/null @@ -1,31 +0,0 @@ -attributes = $attributes; - } - - public function getSubNodeNames() : array { - return []; - } - - public function getType() : string { - return 'Expr_Error'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php deleted file mode 100644 index c44ff6f93..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_ErrorSuppress'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php deleted file mode 100644 index 856854743..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_Eval'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php deleted file mode 100644 index b88a8f7e6..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_Exit'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php deleted file mode 100644 index 2de4d0dd5..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ /dev/null @@ -1,39 +0,0 @@ - Arguments */ - public $args; - - /** - * Constructs a function call node. - * - * @param Node\Name|Expr $name Function name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct($name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - $this->args = $args; - } - - public function getSubNodeNames() : array { - return ['name', 'args']; - } - - public function getType() : string { - return 'Expr_FuncCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php deleted file mode 100644 index 07ce5968e..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +++ /dev/null @@ -1,39 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - $this->type = $type; - } - - public function getSubNodeNames() : array { - return ['expr', 'type']; - } - - public function getType() : string { - return 'Expr_Include'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php deleted file mode 100644 index 9000d47bb..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +++ /dev/null @@ -1,35 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - $this->class = $class; - } - - public function getSubNodeNames() : array { - return ['expr', 'class']; - } - - public function getType() : string { - return 'Expr_Instanceof'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php deleted file mode 100644 index 76b738758..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames() : array { - return ['vars']; - } - - public function getType() : string { - return 'Expr_Isset'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php deleted file mode 100644 index c27a27b95..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->items = $items; - } - - public function getSubNodeNames() : array { - return ['items']; - } - - public function getType() : string { - return 'Expr_List'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php deleted file mode 100644 index 2455a3026..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +++ /dev/null @@ -1,31 +0,0 @@ -attributes = $attributes; - $this->cond = $cond; - $this->arms = $arms; - } - - public function getSubNodeNames() : array { - return ['cond', 'arms']; - } - - public function getType() : string { - return 'Expr_Match'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php deleted file mode 100644 index 49ca48356..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public $args; - - /** - * Constructs a function call node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames() : array { - return ['var', 'name', 'args']; - } - - public function getType() : string { - return 'Expr_MethodCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php deleted file mode 100644 index e2bb64928..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ /dev/null @@ -1,41 +0,0 @@ - Arguments */ - public $args; - - /** - * Constructs a function call node. - * - * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct($class, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->args = $args; - } - - public function getSubNodeNames() : array { - return ['class', 'args']; - } - - public function getType() : string { - return 'Expr_New'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php deleted file mode 100644 index 07a571fd8..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public $args; - - /** - * Constructs a nullsafe method call node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames() : array { - return ['var', 'name', 'args']; - } - - public function getType() : string { - return 'Expr_NullsafeMethodCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php deleted file mode 100644 index 9317eb3b9..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ /dev/null @@ -1,35 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames() : array { - return ['var', 'name']; - } - - public function getType() : string { - return 'Expr_NullsafePropertyFetch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php deleted file mode 100644 index 94d6c296d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames() : array { - return ['var']; - } - - public function getType() : string { - return 'Expr_PostDec'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php deleted file mode 100644 index 005c443a2..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames() : array { - return ['var']; - } - - public function getType() : string { - return 'Expr_PostInc'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php deleted file mode 100644 index a5ca685a8..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames() : array { - return ['var']; - } - - public function getType() : string { - return 'Expr_PreDec'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php deleted file mode 100644 index 0986c4474..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames() : array { - return ['var']; - } - - public function getType() : string { - return 'Expr_PreInc'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php deleted file mode 100644 index 2d43c2ac8..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_Print'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php deleted file mode 100644 index 4281f31cc..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +++ /dev/null @@ -1,35 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames() : array { - return ['var', 'name']; - } - - public function getType() : string { - return 'Expr_PropertyFetch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php deleted file mode 100644 index 537a7cc80..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames() : array { - return ['parts']; - } - - public function getType() : string { - return 'Expr_ShellExec'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php deleted file mode 100644 index d0d099c47..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ /dev/null @@ -1,46 +0,0 @@ - Arguments */ - public $args; - - /** - * Constructs a static method call node. - * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct($class, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames() : array { - return ['class', 'name', 'args']; - } - - public function getType() : string { - return 'Expr_StaticCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php deleted file mode 100644 index 1ee1a25e5..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ /dev/null @@ -1,36 +0,0 @@ -attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; - } - - public function getSubNodeNames() : array { - return ['class', 'name']; - } - - public function getType() : string { - return 'Expr_StaticPropertyFetch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php deleted file mode 100644 index 9316f47d4..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +++ /dev/null @@ -1,38 +0,0 @@ -attributes = $attributes; - $this->cond = $cond; - $this->if = $if; - $this->else = $else; - } - - public function getSubNodeNames() : array { - return ['cond', 'if', 'else']; - } - - public function getType() : string { - return 'Expr_Ternary'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php deleted file mode 100644 index 5c97f0e2b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_Throw'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php deleted file mode 100644 index ce8808bc6..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_UnaryMinus'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php deleted file mode 100644 index d23047e54..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_UnaryPlus'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php deleted file mode 100644 index b47d38e93..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames() : array { - return ['name']; - } - - public function getType() : string { - return 'Expr_Variable'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php deleted file mode 100644 index a3efce618..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Expr_YieldFrom'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php deleted file mode 100644 index aef8fc333..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->key = $key; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['key', 'value']; - } - - public function getType() : string { - return 'Expr_Yield'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/lib/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php deleted file mode 100644 index 5a825e731..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +++ /dev/null @@ -1,43 +0,0 @@ - true, - 'parent' => true, - 'static' => true, - ]; - - /** - * Constructs an identifier node. - * - * @param string $name Identifier as string - * @param array $attributes Additional attributes - */ - public function __construct(string $name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames() : array { - return ['name']; - } - - /** - * Get identifier as string. - * - * @return string Identifier as string. - */ - public function toString() : string { - return $this->name; - } - - /** - * Get lowercased identifier as string. - * - * @return string Lowercased identifier as string - */ - public function toLowerString() : string { - return strtolower($this->name); - } - - /** - * Checks whether the identifier is a special class name (self, parent or static). - * - * @return bool Whether identifier is a special class name - */ - public function isSpecialClassName() : bool { - return isset(self::$specialClassNames[strtolower($this->name)]); - } - - /** - * Get identifier as string. - * - * @return string Identifier as string - */ - public function __toString() : string { - return $this->name; - } - - public function getType() : string { - return 'Identifier'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/lib/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php deleted file mode 100644 index 9208e1392..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->types = $types; - } - - public function getSubNodeNames() : array { - return ['types']; - } - - public function getType() : string { - return 'IntersectionType'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/MatchArm.php b/lib/nikic/php-parser/lib/PhpParser/Node/MatchArm.php deleted file mode 100644 index 2ae1c86b8..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +++ /dev/null @@ -1,31 +0,0 @@ -conds = $conds; - $this->body = $body; - $this->attributes = $attributes; - } - - public function getSubNodeNames() : array { - return ['conds', 'body']; - } - - public function getType() : string { - return 'MatchArm'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Name.php b/lib/nikic/php-parser/lib/PhpParser/Node/Name.php deleted file mode 100644 index 6b1cc9f8e..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Name.php +++ /dev/null @@ -1,242 +0,0 @@ - true, - 'parent' => true, - 'static' => true, - ]; - - /** - * Constructs a name node. - * - * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) - * @param array $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->parts = self::prepareName($name); - } - - public function getSubNodeNames() : array { - return ['parts']; - } - - /** - * Gets the first part of the name, i.e. everything before the first namespace separator. - * - * @return string First part of the name - */ - public function getFirst() : string { - return $this->parts[0]; - } - - /** - * Gets the last part of the name, i.e. everything after the last namespace separator. - * - * @return string Last part of the name - */ - public function getLast() : string { - return $this->parts[count($this->parts) - 1]; - } - - /** - * Checks whether the name is unqualified. (E.g. Name) - * - * @return bool Whether the name is unqualified - */ - public function isUnqualified() : bool { - return 1 === count($this->parts); - } - - /** - * Checks whether the name is qualified. (E.g. Name\Name) - * - * @return bool Whether the name is qualified - */ - public function isQualified() : bool { - return 1 < count($this->parts); - } - - /** - * Checks whether the name is fully qualified. (E.g. \Name) - * - * @return bool Whether the name is fully qualified - */ - public function isFullyQualified() : bool { - return false; - } - - /** - * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) - * - * @return bool Whether the name is relative - */ - public function isRelative() : bool { - return false; - } - - /** - * Returns a string representation of the name itself, without taking the name type into - * account (e.g., not including a leading backslash for fully qualified names). - * - * @return string String representation - */ - public function toString() : string { - return implode('\\', $this->parts); - } - - /** - * Returns a string representation of the name as it would occur in code (e.g., including - * leading backslash for fully qualified names. - * - * @return string String representation - */ - public function toCodeString() : string { - return $this->toString(); - } - - /** - * Returns lowercased string representation of the name, without taking the name type into - * account (e.g., no leading backslash for fully qualified names). - * - * @return string Lowercased string representation - */ - public function toLowerString() : string { - return strtolower(implode('\\', $this->parts)); - } - - /** - * Checks whether the identifier is a special class name (self, parent or static). - * - * @return bool Whether identifier is a special class name - */ - public function isSpecialClassName() : bool { - return count($this->parts) === 1 - && isset(self::$specialClassNames[strtolower($this->parts[0])]); - } - - /** - * Returns a string representation of the name by imploding the namespace parts with the - * namespace separator. - * - * @return string String representation - */ - public function __toString() : string { - return implode('\\', $this->parts); - } - - /** - * Gets a slice of a name (similar to array_slice). - * - * This method returns a new instance of the same type as the original and with the same - * attributes. - * - * If the slice is empty, null is returned. The null value will be correctly handled in - * concatenations using concat(). - * - * Offset and length have the same meaning as in array_slice(). - * - * @param int $offset Offset to start the slice at (may be negative) - * @param int|null $length Length of the slice (may be negative) - * - * @return static|null Sliced name - */ - public function slice(int $offset, int $length = null) { - $numParts = count($this->parts); - - $realOffset = $offset < 0 ? $offset + $numParts : $offset; - if ($realOffset < 0 || $realOffset > $numParts) { - throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset)); - } - - if (null === $length) { - $realLength = $numParts - $realOffset; - } else { - $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; - if ($realLength < 0 || $realLength > $numParts) { - throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); - } - } - - if ($realLength === 0) { - // Empty slice is represented as null - return null; - } - - return new static(array_slice($this->parts, $realOffset, $realLength), $this->attributes); - } - - /** - * Concatenate two names, yielding a new Name instance. - * - * The type of the generated instance depends on which class this method is called on, for - * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance. - * - * If one of the arguments is null, a new instance of the other name will be returned. If both - * arguments are null, null will be returned. As such, writing - * Name::concat($namespace, $shortName) - * where $namespace is a Name node or null will work as expected. - * - * @param string|string[]|self|null $name1 The first name - * @param string|string[]|self|null $name2 The second name - * @param array $attributes Attributes to assign to concatenated name - * - * @return static|null Concatenated name - */ - public static function concat($name1, $name2, array $attributes = []) { - if (null === $name1 && null === $name2) { - return null; - } elseif (null === $name1) { - return new static(self::prepareName($name2), $attributes); - } elseif (null === $name2) { - return new static(self::prepareName($name1), $attributes); - } else { - return new static( - array_merge(self::prepareName($name1), self::prepareName($name2)), $attributes - ); - } - } - - /** - * Prepares a (string, array or Name node) name for use in name changing methods by converting - * it to an array. - * - * @param string|string[]|self $name Name to prepare - * - * @return string[] Prepared name - */ - private static function prepareName($name) : array { - if (\is_string($name)) { - if ('' === $name) { - throw new \InvalidArgumentException('Name cannot be empty'); - } - - return explode('\\', $name); - } elseif (\is_array($name)) { - if (empty($name)) { - throw new \InvalidArgumentException('Name cannot be empty'); - } - - return $name; - } elseif ($name instanceof self) { - return $name->parts; - } - - throw new \InvalidArgumentException( - 'Expected string, array of parts or Name instance' - ); - } - - public function getType() : string { - return 'Name'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/lib/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php deleted file mode 100644 index 1df93a56b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +++ /dev/null @@ -1,50 +0,0 @@ -toString(); - } - - public function getType() : string { - return 'Name_FullyQualified'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/lib/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php deleted file mode 100644 index 57bf7af2b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +++ /dev/null @@ -1,50 +0,0 @@ -toString(); - } - - public function getType() : string { - return 'Name_Relative'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/lib/nikic/php-parser/lib/PhpParser/Node/NullableType.php deleted file mode 100644 index d68e26a38..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ /dev/null @@ -1,28 +0,0 @@ -attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; - } - - public function getSubNodeNames() : array { - return ['type']; - } - - public function getType() : string { - return 'NullableType'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Param.php b/lib/nikic/php-parser/lib/PhpParser/Node/Param.php deleted file mode 100644 index 1e90b7944..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Param.php +++ /dev/null @@ -1,60 +0,0 @@ -attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; - $this->byRef = $byRef; - $this->variadic = $variadic; - $this->var = $var; - $this->default = $default; - $this->flags = $flags; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default']; - } - - public function getType() : string { - return 'Param'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/lib/nikic/php-parser/lib/PhpParser/Node/Scalar.php deleted file mode 100644 index 8117909b6..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar.php +++ /dev/null @@ -1,7 +0,0 @@ -attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - /** - * @param mixed[] $attributes - */ - public static function fromString(string $str, array $attributes = []): DNumber - { - $attributes['rawValue'] = $str; - $float = self::parse($str); - - return new DNumber($float, $attributes); - } - - /** - * @internal - * - * Parses a DNUMBER token like PHP would. - * - * @param string $str A string number - * - * @return float The parsed number - */ - public static function parse(string $str) : float { - $str = str_replace('_', '', $str); - - // if string contains any of .eE just cast it to float - if (false !== strpbrk($str, '.eE')) { - return (float) $str; - } - - // otherwise it's an integer notation that overflowed into a float - // if it starts with 0 it's one of the special integer notations - if ('0' === $str[0]) { - // hex - if ('x' === $str[1] || 'X' === $str[1]) { - return hexdec($str); - } - - // bin - if ('b' === $str[1] || 'B' === $str[1]) { - return bindec($str); - } - - // oct - // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit (8 or 9) - // so that only the digits before that are used - return octdec(substr($str, 0, strcspn($str, '89'))); - } - - // dec - return (float) $str; - } - - public function getType() : string { - return 'Scalar_DNumber'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php b/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php deleted file mode 100644 index fa5d2e268..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +++ /dev/null @@ -1,31 +0,0 @@ -attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames() : array { - return ['parts']; - } - - public function getType() : string { - return 'Scalar_Encapsed'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php deleted file mode 100644 index bb3194c1d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - public function getType() : string { - return 'Scalar_EncapsedStringPart'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php deleted file mode 100644 index 2cc2b22c8..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +++ /dev/null @@ -1,80 +0,0 @@ -attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - /** - * Constructs an LNumber node from a string number literal. - * - * @param string $str String number literal (decimal, octal, hex or binary) - * @param array $attributes Additional attributes - * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) - * - * @return LNumber The constructed LNumber, including kind attribute - */ - public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { - $attributes['rawValue'] = $str; - - $str = str_replace('_', '', $str); - - if ('0' !== $str[0] || '0' === $str) { - $attributes['kind'] = LNumber::KIND_DEC; - return new LNumber((int) $str, $attributes); - } - - if ('x' === $str[1] || 'X' === $str[1]) { - $attributes['kind'] = LNumber::KIND_HEX; - return new LNumber(hexdec($str), $attributes); - } - - if ('b' === $str[1] || 'B' === $str[1]) { - $attributes['kind'] = LNumber::KIND_BIN; - return new LNumber(bindec($str), $attributes); - } - - if (!$allowInvalidOctal && strpbrk($str, '89')) { - throw new Error('Invalid numeric literal', $attributes); - } - - // Strip optional explicit octal prefix. - if ('o' === $str[1] || 'O' === $str[1]) { - $str = substr($str, 2); - } - - // use intval instead of octdec to get proper cutting behavior with malformed numbers - $attributes['kind'] = LNumber::KIND_OCT; - return new LNumber(intval($str, 8), $attributes); - } - - public function getType() : string { - return 'Scalar_LNumber'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php b/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php deleted file mode 100644 index 941f0c762..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +++ /dev/null @@ -1,28 +0,0 @@ -attributes = $attributes; - } - - public function getSubNodeNames() : array { - return []; - } - - /** - * Get name of magic constant. - * - * @return string Name of magic constant - */ - abstract public function getName() : string; -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php deleted file mode 100644 index 244328476..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +++ /dev/null @@ -1,16 +0,0 @@ - '\\', - '$' => '$', - 'n' => "\n", - 'r' => "\r", - 't' => "\t", - 'f' => "\f", - 'v' => "\v", - 'e' => "\x1B", - ]; - - /** - * Constructs a string scalar node. - * - * @param string $value Value of the string - * @param array $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - /** - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - */ - public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self - { - $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) - ? Scalar\String_::KIND_SINGLE_QUOTED - : Scalar\String_::KIND_DOUBLE_QUOTED; - - $attributes['rawValue'] = $str; - - $string = self::parse($str, $parseUnicodeEscape); - - return new self($string, $attributes); - } - - /** - * @internal - * - * Parses a string token. - * - * @param string $str String token content - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string The parsed string - */ - public static function parse(string $str, bool $parseUnicodeEscape = true) : string { - $bLength = 0; - if ('b' === $str[0] || 'B' === $str[0]) { - $bLength = 1; - } - - if ('\'' === $str[$bLength]) { - return str_replace( - ['\\\\', '\\\''], - ['\\', '\''], - substr($str, $bLength + 1, -1) - ); - } else { - return self::parseEscapeSequences( - substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape - ); - } - } - - /** - * @internal - * - * Parses escape sequences in strings (all string types apart from single quoted). - * - * @param string $str String without quotes - * @param null|string $quote Quote type - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string String with escape sequences parsed - */ - public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true) : string { - if (null !== $quote) { - $str = str_replace('\\' . $quote, $quote, $str); - } - - $extra = ''; - if ($parseUnicodeEscape) { - $extra = '|u\{([0-9a-fA-F]+)\}'; - } - - return preg_replace_callback( - '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', - function($matches) { - $str = $matches[1]; - - if (isset(self::$replacements[$str])) { - return self::$replacements[$str]; - } elseif ('x' === $str[0] || 'X' === $str[0]) { - return chr(hexdec(substr($str, 1))); - } elseif ('u' === $str[0]) { - return self::codePointToUtf8(hexdec($matches[2])); - } else { - return chr(octdec($str)); - } - }, - $str - ); - } - - /** - * Converts a Unicode code point to its UTF-8 encoded representation. - * - * @param int $num Code point - * - * @return string UTF-8 representation of code point - */ - private static function codePointToUtf8(int $num) : string { - if ($num <= 0x7F) { - return chr($num); - } - if ($num <= 0x7FF) { - return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80); - } - if ($num <= 0xFFFF) { - return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); - } - if ($num <= 0x1FFFFF) { - return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80) - . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); - } - throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); - } - - public function getType() : string { - return 'Scalar_String'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt.php deleted file mode 100644 index 69d33e579..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt.php +++ /dev/null @@ -1,9 +0,0 @@ -attributes = $attributes; - $this->num = $num; - } - - public function getSubNodeNames() : array { - return ['num']; - } - - public function getType() : string { - return 'Stmt_Break'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php deleted file mode 100644 index 2bf044c90..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['cond', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Case'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php deleted file mode 100644 index 9b9c09478..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +++ /dev/null @@ -1,41 +0,0 @@ -attributes = $attributes; - $this->types = $types; - $this->var = $var; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['types', 'var', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Catch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php deleted file mode 100644 index 1fc7f3362..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +++ /dev/null @@ -1,80 +0,0 @@ -attributes = $attributes; - $this->flags = $flags; - $this->consts = $consts; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'flags', 'consts']; - } - - /** - * Whether constant is explicitly or implicitly public. - * - * @return bool - */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; - } - - /** - * Whether constant is protected. - * - * @return bool - */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); - } - - /** - * Whether constant is private. - * - * @return bool - */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); - } - - /** - * Whether constant is final. - * - * @return bool - */ - public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); - } - - public function getType() : string { - return 'Stmt_ClassConst'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php deleted file mode 100644 index 2fa4e861b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +++ /dev/null @@ -1,109 +0,0 @@ -stmts as $stmt) { - if ($stmt instanceof TraitUse) { - $traitUses[] = $stmt; - } - } - return $traitUses; - } - - /** - * @return ClassConst[] - */ - public function getConstants() : array { - $constants = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassConst) { - $constants[] = $stmt; - } - } - return $constants; - } - - /** - * @return Property[] - */ - public function getProperties() : array { - $properties = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof Property) { - $properties[] = $stmt; - } - } - return $properties; - } - - /** - * Gets property with the given name defined directly in this class/interface/trait. - * - * @param string $name Name of the property - * - * @return Property|null Property node or null if the property does not exist - */ - public function getProperty(string $name) { - foreach ($this->stmts as $stmt) { - if ($stmt instanceof Property) { - foreach ($stmt->props as $prop) { - if ($prop instanceof PropertyProperty && $name === $prop->name->toString()) { - return $stmt; - } - } - } - } - return null; - } - - /** - * Gets all methods defined directly in this class/interface/trait - * - * @return ClassMethod[] - */ - public function getMethods() : array { - $methods = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassMethod) { - $methods[] = $stmt; - } - } - return $methods; - } - - /** - * Gets method with the given name defined directly in this class/interface/trait. - * - * @param string $name Name of the method (compared case-insensitively) - * - * @return ClassMethod|null Method node or null if the method does not exist - */ - public function getMethod(string $name) { - $lowerName = strtolower($name); - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { - return $stmt; - } - } - return null; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php deleted file mode 100644 index 09b877a92..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ /dev/null @@ -1,159 +0,0 @@ - true, - '__destruct' => true, - '__call' => true, - '__callstatic' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - '__unset' => true, - '__sleep' => true, - '__wakeup' => true, - '__tostring' => true, - '__set_state' => true, - '__clone' => true, - '__invoke' => true, - '__debuginfo' => true, - ]; - - /** - * Constructs a class method node. - * - * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'flags => MODIFIER_PUBLIC: Flags - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; - $this->byRef = $subNodes['byRef'] ?? false; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; - $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; - } - - public function returnsByRef() : bool { - return $this->byRef; - } - - public function getParams() : array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getStmts() { - return $this->stmts; - } - - public function getAttrGroups() : array { - return $this->attrGroups; - } - - /** - * Whether the method is explicitly or implicitly public. - * - * @return bool - */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; - } - - /** - * Whether the method is protected. - * - * @return bool - */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); - } - - /** - * Whether the method is private. - * - * @return bool - */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); - } - - /** - * Whether the method is abstract. - * - * @return bool - */ - public function isAbstract() : bool { - return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT); - } - - /** - * Whether the method is final. - * - * @return bool - */ - public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); - } - - /** - * Whether the method is static. - * - * @return bool - */ - public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); - } - - /** - * Whether the method is magic. - * - * @return bool - */ - public function isMagic() : bool { - return isset(self::$magicNames[$this->name->toLowerString()]); - } - - public function getType() : string { - return 'Stmt_ClassMethod'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php deleted file mode 100644 index 52ed6c6cd..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ /dev/null @@ -1,137 +0,0 @@ - 0 : Flags - * 'extends' => null : Name of extended class - * 'implements' => array(): Names of implemented interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->extends = $subNodes['extends'] ?? null; - $this->implements = $subNodes['implements'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; - } - - /** - * Whether the class is explicitly abstract. - * - * @return bool - */ - public function isAbstract() : bool { - return (bool) ($this->flags & self::MODIFIER_ABSTRACT); - } - - /** - * Whether the class is final. - * - * @return bool - */ - public function isFinal() : bool { - return (bool) ($this->flags & self::MODIFIER_FINAL); - } - - public function isReadonly() : bool { - return (bool) ($this->flags & self::MODIFIER_READONLY); - } - - /** - * Whether the class is anonymous. - * - * @return bool - */ - public function isAnonymous() : bool { - return null === $this->name; - } - - /** - * @internal - */ - public static function verifyClassModifier($a, $b) { - if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class'); - } - } - - /** - * @internal - */ - public static function verifyModifier($a, $b) { - if ($a & self::VISIBILITY_MODIFIER_MASK && $b & self::VISIBILITY_MODIFIER_MASK) { - throw new Error('Multiple access type modifiers are not allowed'); - } - - if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) { - throw new Error('Multiple static modifiers are not allowed'); - } - - if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class member'); - } - } - - public function getType() : string { - return 'Stmt_Class'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php deleted file mode 100644 index e6316345e..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->consts = $consts; - } - - public function getSubNodeNames() : array { - return ['consts']; - } - - public function getType() : string { - return 'Stmt_Const'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php deleted file mode 100644 index 24882683b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->num = $num; - } - - public function getSubNodeNames() : array { - return ['num']; - } - - public function getType() : string { - return 'Stmt_Continue'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php deleted file mode 100644 index ac07f30c7..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ /dev/null @@ -1,34 +0,0 @@ -value pair node. - * - * @param string|Node\Identifier $key Key - * @param Node\Expr $value Value - * @param array $attributes Additional attributes - */ - public function __construct($key, Node\Expr $value, array $attributes = []) { - $this->attributes = $attributes; - $this->key = \is_string($key) ? new Node\Identifier($key) : $key; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['key', 'value']; - } - - public function getType() : string { - return 'Stmt_DeclareDeclare'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php deleted file mode 100644 index f46ff0baf..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->declares = $declares; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['declares', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Declare'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php deleted file mode 100644 index 78e90da03..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['stmts', 'cond']; - } - - public function getType() : string { - return 'Stmt_Do'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php deleted file mode 100644 index 7cc50d5d6..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->exprs = $exprs; - } - - public function getSubNodeNames() : array { - return ['exprs']; - } - - public function getType() : string { - return 'Stmt_Echo'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php deleted file mode 100644 index eef1ece32..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['cond', 'stmts']; - } - - public function getType() : string { - return 'Stmt_ElseIf'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php deleted file mode 100644 index 0e61778e2..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['stmts']; - } - - public function getType() : string { - return 'Stmt_Else'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php deleted file mode 100644 index 5beff8b39..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +++ /dev/null @@ -1,37 +0,0 @@ -name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->expr = $expr; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'name', 'expr']; - } - - public function getType() : string { - return 'Stmt_EnumCase'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php deleted file mode 100644 index 3a50c225d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +++ /dev/null @@ -1,40 +0,0 @@ - null : Scalar type - * 'implements' => array() : Names of implemented interfaces - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->scalarType = $subNodes['scalarType'] ?? null; - $this->implements = $subNodes['implements'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - - parent::__construct($attributes); - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Enum'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php deleted file mode 100644 index 99d1687de..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +++ /dev/null @@ -1,33 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Stmt_Expression'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php deleted file mode 100644 index d55b8b687..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['stmts']; - } - - public function getType() : string { - return 'Stmt_Finally'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php deleted file mode 100644 index 1323d37cf..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +++ /dev/null @@ -1,43 +0,0 @@ - array(): Init expressions - * 'cond' => array(): Loop conditions - * 'loop' => array(): Loop expressions - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->init = $subNodes['init'] ?? []; - $this->cond = $subNodes['cond'] ?? []; - $this->loop = $subNodes['loop'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - } - - public function getSubNodeNames() : array { - return ['init', 'cond', 'loop', 'stmts']; - } - - public function getType() : string { - return 'Stmt_For'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php deleted file mode 100644 index 0556a7ce5..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +++ /dev/null @@ -1,47 +0,0 @@ - null : Variable to assign key to - * 'byRef' => false : Whether to assign value by reference - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - $this->keyVar = $subNodes['keyVar'] ?? null; - $this->byRef = $subNodes['byRef'] ?? false; - $this->valueVar = $valueVar; - $this->stmts = $subNodes['stmts'] ?? []; - } - - public function getSubNodeNames() : array { - return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Foreach'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php deleted file mode 100644 index c2ccae24e..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ /dev/null @@ -1,77 +0,0 @@ - false : Whether to return by reference - * 'params' => array(): Parameters - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->byRef = $subNodes['byRef'] ?? false; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; - } - - public function returnsByRef() : bool { - return $this->byRef; - } - - public function getParams() : array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getAttrGroups() : array { - return $this->attrGroups; - } - - /** @return Node\Stmt[] */ - public function getStmts() : array { - return $this->stmts; - } - - public function getType() : string { - return 'Stmt_Function'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php deleted file mode 100644 index a0022ad93..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames() : array { - return ['vars']; - } - - public function getType() : string { - return 'Stmt_Global'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php deleted file mode 100644 index 24a57f780..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +++ /dev/null @@ -1,31 +0,0 @@ -attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames() : array { - return ['name']; - } - - public function getType() : string { - return 'Stmt_Goto'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php deleted file mode 100644 index 24520d223..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +++ /dev/null @@ -1,39 +0,0 @@ -attributes = $attributes; - $this->type = $type; - $this->prefix = $prefix; - $this->uses = $uses; - } - - public function getSubNodeNames() : array { - return ['type', 'prefix', 'uses']; - } - - public function getType() : string { - return 'Stmt_GroupUse'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php deleted file mode 100644 index 8e624e0f1..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->remaining = $remaining; - } - - public function getSubNodeNames() : array { - return ['remaining']; - } - - public function getType() : string { - return 'Stmt_HaltCompiler'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php deleted file mode 100644 index a1bae4bf8..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +++ /dev/null @@ -1,43 +0,0 @@ - array(): Statements - * 'elseifs' => array(): Elseif clauses - * 'else' => null : Else clause - * @param array $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $subNodes['stmts'] ?? []; - $this->elseifs = $subNodes['elseifs'] ?? []; - $this->else = $subNodes['else'] ?? null; - } - - public function getSubNodeNames() : array { - return ['cond', 'stmts', 'elseifs', 'else']; - } - - public function getType() : string { - return 'Stmt_If'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php deleted file mode 100644 index 0711d2842..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - public function getType() : string { - return 'Stmt_InlineHTML'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php deleted file mode 100644 index 4d587dd48..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ /dev/null @@ -1,37 +0,0 @@ - array(): Name of extended interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->extends = $subNodes['extends'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'name', 'extends', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Interface'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php deleted file mode 100644 index 3edcb3be7..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +++ /dev/null @@ -1,31 +0,0 @@ -attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames() : array { - return ['name']; - } - - public function getType() : string { - return 'Stmt_Label'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php deleted file mode 100644 index c63204577..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +++ /dev/null @@ -1,38 +0,0 @@ -attributes = $attributes; - $this->name = $name; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['name', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Namespace'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php deleted file mode 100644 index f86f8df7d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +++ /dev/null @@ -1,17 +0,0 @@ -attributes = $attributes; - $this->flags = $flags; - $this->props = $props; - $this->type = \is_string($type) ? new Identifier($type) : $type; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'flags', 'type', 'props']; - } - - /** - * Whether the property is explicitly or implicitly public. - * - * @return bool - */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; - } - - /** - * Whether the property is protected. - * - * @return bool - */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); - } - - /** - * Whether the property is private. - * - * @return bool - */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); - } - - /** - * Whether the property is static. - * - * @return bool - */ - public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); - } - - /** - * Whether the property is readonly. - * - * @return bool - */ - public function isReadonly() : bool { - return (bool) ($this->flags & Class_::MODIFIER_READONLY); - } - - public function getType() : string { - return 'Stmt_Property'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php deleted file mode 100644 index 205731e20..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; - $this->default = $default; - } - - public function getSubNodeNames() : array { - return ['name', 'default']; - } - - public function getType() : string { - return 'Stmt_PropertyProperty'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php deleted file mode 100644 index efc578c58..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Stmt_Return'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php deleted file mode 100644 index 29584560d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +++ /dev/null @@ -1,37 +0,0 @@ -attributes = $attributes; - $this->var = $var; - $this->default = $default; - } - - public function getSubNodeNames() : array { - return ['var', 'default']; - } - - public function getType() : string { - return 'Stmt_StaticVar'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php deleted file mode 100644 index 464898ffa..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames() : array { - return ['vars']; - } - - public function getType() : string { - return 'Stmt_Static'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php deleted file mode 100644 index 2c8dae022..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->cond = $cond; - $this->cases = $cases; - } - - public function getSubNodeNames() : array { - return ['cond', 'cases']; - } - - public function getType() : string { - return 'Stmt_Switch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php deleted file mode 100644 index a34e2b362..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Stmt_Throw'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php deleted file mode 100644 index 9e97053b4..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->traits = $traits; - $this->adaptations = $adaptations; - } - - public function getSubNodeNames() : array { - return ['traits', 'adaptations']; - } - - public function getType() : string { - return 'Stmt_TraitUse'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php deleted file mode 100644 index 8bdd2c041..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +++ /dev/null @@ -1,13 +0,0 @@ -attributes = $attributes; - $this->trait = $trait; - $this->method = \is_string($method) ? new Node\Identifier($method) : $method; - $this->newModifier = $newModifier; - $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; - } - - public function getSubNodeNames() : array { - return ['trait', 'method', 'newModifier', 'newName']; - } - - public function getType() : string { - return 'Stmt_TraitUseAdaptation_Alias'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php deleted file mode 100644 index 80385f64e..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->trait = $trait; - $this->method = \is_string($method) ? new Node\Identifier($method) : $method; - $this->insteadof = $insteadof; - } - - public function getSubNodeNames() : array { - return ['trait', 'method', 'insteadof']; - } - - public function getType() : string { - return 'Stmt_TraitUseAdaptation_Precedence'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php deleted file mode 100644 index 0cec203ac..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +++ /dev/null @@ -1,32 +0,0 @@ - array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames() : array { - return ['attrGroups', 'name', 'stmts']; - } - - public function getType() : string { - return 'Stmt_Trait'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php deleted file mode 100644 index 7fc158c57..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +++ /dev/null @@ -1,38 +0,0 @@ -attributes = $attributes; - $this->stmts = $stmts; - $this->catches = $catches; - $this->finally = $finally; - } - - public function getSubNodeNames() : array { - return ['stmts', 'catches', 'finally']; - } - - public function getType() : string { - return 'Stmt_TryCatch'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php deleted file mode 100644 index 310e427aa..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames() : array { - return ['vars']; - } - - public function getType() : string { - return 'Stmt_Unset'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php deleted file mode 100644 index 32bd7847d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +++ /dev/null @@ -1,52 +0,0 @@ -attributes = $attributes; - $this->type = $type; - $this->name = $name; - $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; - } - - public function getSubNodeNames() : array { - return ['type', 'name', 'alias']; - } - - /** - * Get alias. If not explicitly given this is the last component of the used name. - * - * @return Identifier - */ - public function getAlias() : Identifier { - if (null !== $this->alias) { - return $this->alias; - } - - return new Identifier($this->name->getLast()); - } - - public function getType() : string { - return 'Stmt_UseUse'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php deleted file mode 100644 index 8753da313..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +++ /dev/null @@ -1,47 +0,0 @@ -attributes = $attributes; - $this->type = $type; - $this->uses = $uses; - } - - public function getSubNodeNames() : array { - return ['type', 'uses']; - } - - public function getType() : string { - return 'Stmt_Use'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php deleted file mode 100644 index f41034f8c..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +++ /dev/null @@ -1,34 +0,0 @@ -attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames() : array { - return ['cond', 'stmts']; - } - - public function getType() : string { - return 'Stmt_While'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/lib/nikic/php-parser/lib/PhpParser/Node/UnionType.php deleted file mode 100644 index 61c2d8106..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ /dev/null @@ -1,28 +0,0 @@ -attributes = $attributes; - $this->types = $types; - } - - public function getSubNodeNames() : array { - return ['types']; - } - - public function getType() : string { - return 'UnionType'; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php b/lib/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php deleted file mode 100644 index a30807a6d..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +++ /dev/null @@ -1,17 +0,0 @@ -attributes = $attributes; - } - - public function getType(): string { - return 'VariadicPlaceholder'; - } - - public function getSubNodeNames(): array { - return []; - } -} \ No newline at end of file diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/lib/nikic/php-parser/lib/PhpParser/NodeAbstract.php deleted file mode 100644 index 04514da11..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ /dev/null @@ -1,178 +0,0 @@ -attributes = $attributes; - } - - /** - * Gets line the node started in (alias of getStartLine). - * - * @return int Start line (or -1 if not available) - */ - public function getLine() : int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets line the node started in. - * - * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default). - * - * @return int Start line (or -1 if not available) - */ - public function getStartLine() : int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets the line the node ended in. - * - * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default). - * - * @return int End line (or -1 if not available) - */ - public function getEndLine() : int { - return $this->attributes['endLine'] ?? -1; - } - - /** - * Gets the token offset of the first token that is part of this node. - * - * The offset is an index into the array returned by Lexer::getTokens(). - * - * Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int Token start position (or -1 if not available) - */ - public function getStartTokenPos() : int { - return $this->attributes['startTokenPos'] ?? -1; - } - - /** - * Gets the token offset of the last token that is part of this node. - * - * The offset is an index into the array returned by Lexer::getTokens(). - * - * Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int Token end position (or -1 if not available) - */ - public function getEndTokenPos() : int { - return $this->attributes['endTokenPos'] ?? -1; - } - - /** - * Gets the file offset of the first character that is part of this node. - * - * Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int File start position (or -1 if not available) - */ - public function getStartFilePos() : int { - return $this->attributes['startFilePos'] ?? -1; - } - - /** - * Gets the file offset of the last character that is part of this node. - * - * Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int File end position (or -1 if not available) - */ - public function getEndFilePos() : int { - return $this->attributes['endFilePos'] ?? -1; - } - - /** - * Gets all comments directly preceding this node. - * - * The comments are also available through the "comments" attribute. - * - * @return Comment[] - */ - public function getComments() : array { - return $this->attributes['comments'] ?? []; - } - - /** - * Gets the doc comment of the node. - * - * @return null|Comment\Doc Doc comment object or null - */ - public function getDocComment() { - $comments = $this->getComments(); - for ($i = count($comments) - 1; $i >= 0; $i--) { - $comment = $comments[$i]; - if ($comment instanceof Comment\Doc) { - return $comment; - } - } - - return null; - } - - /** - * Sets the doc comment of the node. - * - * This will either replace an existing doc comment or add it to the comments array. - * - * @param Comment\Doc $docComment Doc comment to set - */ - public function setDocComment(Comment\Doc $docComment) { - $comments = $this->getComments(); - for ($i = count($comments) - 1; $i >= 0; $i--) { - if ($comments[$i] instanceof Comment\Doc) { - // Replace existing doc comment. - $comments[$i] = $docComment; - $this->setAttribute('comments', $comments); - return; - } - } - - // Append new doc comment. - $comments[] = $docComment; - $this->setAttribute('comments', $comments); - } - - public function setAttribute(string $key, $value) { - $this->attributes[$key] = $value; - } - - public function hasAttribute(string $key) : bool { - return array_key_exists($key, $this->attributes); - } - - public function getAttribute(string $key, $default = null) { - if (array_key_exists($key, $this->attributes)) { - return $this->attributes[$key]; - } - - return $default; - } - - public function getAttributes() : array { - return $this->attributes; - } - - public function setAttributes(array $attributes) { - $this->attributes = $attributes; - } - - /** - * @return array - */ - public function jsonSerialize() : array { - return ['nodeType' => $this->getType()] + get_object_vars($this); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeDumper.php b/lib/nikic/php-parser/lib/PhpParser/NodeDumper.php deleted file mode 100644 index ba622efd1..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeDumper.php +++ /dev/null @@ -1,206 +0,0 @@ -dumpComments = !empty($options['dumpComments']); - $this->dumpPositions = !empty($options['dumpPositions']); - } - - /** - * Dumps a node or array. - * - * @param array|Node $node Node or array to dump - * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if - * the dumpPositions option is enabled and the dumping of node offsets - * is desired. - * - * @return string Dumped value - */ - public function dump($node, string $code = null) : string { - $this->code = $code; - return $this->dumpRecursive($node); - } - - protected function dumpRecursive($node) { - if ($node instanceof Node) { - $r = $node->getType(); - if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { - $r .= $p; - } - $r .= '('; - - foreach ($node->getSubNodeNames() as $key) { - $r .= "\n " . $key . ': '; - - $value = $node->$key; - if (null === $value) { - $r .= 'null'; - } elseif (false === $value) { - $r .= 'false'; - } elseif (true === $value) { - $r .= 'true'; - } elseif (is_scalar($value)) { - if ('flags' === $key || 'newModifier' === $key) { - $r .= $this->dumpFlags($value); - } elseif ('type' === $key && $node instanceof Include_) { - $r .= $this->dumpIncludeType($value); - } elseif ('type' === $key - && ($node instanceof Use_ || $node instanceof UseUse || $node instanceof GroupUse)) { - $r .= $this->dumpUseType($value); - } else { - $r .= $value; - } - } else { - $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); - } - } - - if ($this->dumpComments && $comments = $node->getComments()) { - $r .= "\n comments: " . str_replace("\n", "\n ", $this->dumpRecursive($comments)); - } - } elseif (is_array($node)) { - $r = 'array('; - - foreach ($node as $key => $value) { - $r .= "\n " . $key . ': '; - - if (null === $value) { - $r .= 'null'; - } elseif (false === $value) { - $r .= 'false'; - } elseif (true === $value) { - $r .= 'true'; - } elseif (is_scalar($value)) { - $r .= $value; - } else { - $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); - } - } - } elseif ($node instanceof Comment) { - return $node->getReformattedText(); - } else { - throw new \InvalidArgumentException('Can only dump nodes and arrays.'); - } - - return $r . "\n)"; - } - - protected function dumpFlags($flags) { - $strs = []; - if ($flags & Class_::MODIFIER_PUBLIC) { - $strs[] = 'MODIFIER_PUBLIC'; - } - if ($flags & Class_::MODIFIER_PROTECTED) { - $strs[] = 'MODIFIER_PROTECTED'; - } - if ($flags & Class_::MODIFIER_PRIVATE) { - $strs[] = 'MODIFIER_PRIVATE'; - } - if ($flags & Class_::MODIFIER_ABSTRACT) { - $strs[] = 'MODIFIER_ABSTRACT'; - } - if ($flags & Class_::MODIFIER_STATIC) { - $strs[] = 'MODIFIER_STATIC'; - } - if ($flags & Class_::MODIFIER_FINAL) { - $strs[] = 'MODIFIER_FINAL'; - } - if ($flags & Class_::MODIFIER_READONLY) { - $strs[] = 'MODIFIER_READONLY'; - } - - if ($strs) { - return implode(' | ', $strs) . ' (' . $flags . ')'; - } else { - return $flags; - } - } - - protected function dumpIncludeType($type) { - $map = [ - Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', - Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', - Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', - Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', - ]; - - if (!isset($map[$type])) { - return $type; - } - return $map[$type] . ' (' . $type . ')'; - } - - protected function dumpUseType($type) { - $map = [ - Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - Use_::TYPE_NORMAL => 'TYPE_NORMAL', - Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', - Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', - ]; - - if (!isset($map[$type])) { - return $type; - } - return $map[$type] . ' (' . $type . ')'; - } - - /** - * Dump node position, if possible. - * - * @param Node $node Node for which to dump position - * - * @return string|null Dump of position, or null if position information not available - */ - protected function dumpPosition(Node $node) { - if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { - return null; - } - - $start = $node->getStartLine(); - $end = $node->getEndLine(); - if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') - && null !== $this->code - ) { - $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos()); - $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos()); - } - return "[$start - $end]"; - } - - // Copied from Error class - private function toColumn($code, $pos) { - if ($pos > strlen($code)) { - throw new \RuntimeException('Invalid position information'); - } - - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { - $lineStartPos = -1; - } - - return $pos - $lineStartPos; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeFinder.php b/lib/nikic/php-parser/lib/PhpParser/NodeFinder.php deleted file mode 100644 index 2e7cfdad4..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeFinder.php +++ /dev/null @@ -1,81 +0,0 @@ -addVisitor($visitor); - $traverser->traverse($nodes); - - return $visitor->getFoundNodes(); - } - - /** - * Find all nodes that are instances of a certain class. - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name - * - * @return Node[] Found nodes (all instances of $class) - */ - public function findInstanceOf($nodes, string $class) : array { - return $this->find($nodes, function ($node) use ($class) { - return $node instanceof $class; - }); - } - - /** - * Find first node satisfying a filter callback. - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool - * - * @return null|Node Found node (or null if none found) - */ - public function findFirst($nodes, callable $filter) { - if (!is_array($nodes)) { - $nodes = [$nodes]; - } - - $visitor = new FirstFindingVisitor($filter); - - $traverser = new NodeTraverser; - $traverser->addVisitor($visitor); - $traverser->traverse($nodes); - - return $visitor->getFoundNode(); - } - - /** - * Find first node that is an instance of a certain class. - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name - * - * @return null|Node Found node, which is an instance of $class (or null if none found) - */ - public function findFirstInstanceOf($nodes, string $class) { - return $this->findFirst($nodes, function ($node) use ($class) { - return $node instanceof $class; - }); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/lib/nikic/php-parser/lib/PhpParser/NodeTraverser.php deleted file mode 100644 index 97d45bdaa..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeTraverser.php +++ /dev/null @@ -1,291 +0,0 @@ -visitors[] = $visitor; - } - - /** - * Removes an added visitor. - * - * @param NodeVisitor $visitor - */ - public function removeVisitor(NodeVisitor $visitor) { - foreach ($this->visitors as $index => $storedVisitor) { - if ($storedVisitor === $visitor) { - unset($this->visitors[$index]); - break; - } - } - } - - /** - * Traverses an array of nodes using the registered visitors. - * - * @param Node[] $nodes Array of nodes - * - * @return Node[] Traversed array of nodes - */ - public function traverse(array $nodes) : array { - $this->stopTraversal = false; - - foreach ($this->visitors as $visitor) { - if (null !== $return = $visitor->beforeTraverse($nodes)) { - $nodes = $return; - } - } - - $nodes = $this->traverseArray($nodes); - - foreach ($this->visitors as $visitor) { - if (null !== $return = $visitor->afterTraverse($nodes)) { - $nodes = $return; - } - } - - return $nodes; - } - - /** - * Recursively traverse a node. - * - * @param Node $node Node to traverse. - * - * @return Node Result of traversal (may be original node or new one) - */ - protected function traverseNode(Node $node) : Node { - foreach ($node->getSubNodeNames() as $name) { - $subNode =& $node->$name; - - if (\is_array($subNode)) { - $subNode = $this->traverseArray($subNode); - if ($this->stopTraversal) { - break; - } - } elseif ($subNode instanceof Node) { - $traverseChildren = true; - $breakVisitorIndex = null; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($subNode); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; - break; - } elseif (self::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - - if ($traverseChildren) { - $subNode = $this->traverseNode($subNode); - if ($this->stopTraversal) { - break; - } - } - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->leaveNode($subNode); - - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; - } elseif (self::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (\is_array($return)) { - throw new \LogicException( - 'leaveNode() may only return an array ' . - 'if the parent structure is an array' - ); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } - } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } - } - } - } - - return $node; - } - - /** - * Recursively traverse array (usually of nodes). - * - * @param array $nodes Array to traverse - * - * @return array Result of traversal (may be original array or changed one) - */ - protected function traverseArray(array $nodes) : array { - $doNodes = []; - - foreach ($nodes as $i => &$node) { - if ($node instanceof Node) { - $traverseChildren = true; - $breakVisitorIndex = null; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($node); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $node = $return; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; - break; - } elseif (self::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - - if ($traverseChildren) { - $node = $this->traverseNode($node); - if ($this->stopTraversal) { - break; - } - } - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->leaveNode($node); - - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $node = $return; - } elseif (\is_array($return)) { - $doNodes[] = [$i, $return]; - break; - } elseif (self::REMOVE_NODE === $return) { - $doNodes[] = [$i, []]; - break; - } elseif (self::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (false === $return) { - throw new \LogicException( - 'bool(false) return from leaveNode() no longer supported. ' . - 'Return NodeTraverser::REMOVE_NODE instead' - ); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } - } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } - } - } elseif (\is_array($node)) { - throw new \LogicException('Invalid node structure: Contains nested arrays'); - } - } - - if (!empty($doNodes)) { - while (list($i, $replace) = array_pop($doNodes)) { - array_splice($nodes, $i, 1, $replace); - } - } - - return $nodes; - } - - private function ensureReplacementReasonable($old, $new) { - if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { - throw new \LogicException( - "Trying to replace statement ({$old->getType()}) " . - "with expression ({$new->getType()}). Are you missing a " . - "Stmt_Expression wrapper?" - ); - } - - if ($old instanceof Node\Expr && $new instanceof Node\Stmt) { - throw new \LogicException( - "Trying to replace expression ({$old->getType()}) " . - "with statement ({$new->getType()})" - ); - } - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/lib/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php deleted file mode 100644 index 77ff3d27f..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - $node stays as-is - * * NodeTraverser::DONT_TRAVERSE_CHILDREN - * => Children of $node are not traversed. $node stays as-is - * * NodeTraverser::STOP_TRAVERSAL - * => Traversal is aborted. $node stays as-is - * * otherwise - * => $node is set to the return value - * - * @param Node $node Node - * - * @return null|int|Node Replacement node (or special return value) - */ - public function enterNode(Node $node); - - /** - * Called when leaving a node. - * - * Return value semantics: - * * null - * => $node stays as-is - * * NodeTraverser::REMOVE_NODE - * => $node is removed from the parent array - * * NodeTraverser::STOP_TRAVERSAL - * => Traversal is aborted. $node stays as-is - * * array (of Nodes) - * => The return value is merged into the parent array (at the position of the $node) - * * otherwise - * => $node is set to the return value - * - * @param Node $node Node - * - * @return null|int|Node|Node[] Replacement node (or special return value) - */ - public function leaveNode(Node $node); - - /** - * Called once after traversal. - * - * Return value semantics: - * * null: $nodes stays as-is - * * otherwise: $nodes is set to the return value - * - * @param Node[] $nodes Array of nodes - * - * @return null|Node[] Array of nodes - */ - public function afterTraverse(array $nodes); -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php deleted file mode 100644 index a85fa493b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +++ /dev/null @@ -1,20 +0,0 @@ -setAttribute('origNode', $origNode); - return $node; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php deleted file mode 100644 index 9531edbce..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ /dev/null @@ -1,48 +0,0 @@ -filterCallback = $filterCallback; - } - - /** - * Get found nodes satisfying the filter callback. - * - * Nodes are returned in pre-order. - * - * @return Node[] Found nodes - */ - public function getFoundNodes() : array { - return $this->foundNodes; - } - - public function beforeTraverse(array $nodes) { - $this->foundNodes = []; - - return null; - } - - public function enterNode(Node $node) { - $filterCallback = $this->filterCallback; - if ($filterCallback($node)) { - $this->foundNodes[] = $node; - } - - return null; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php deleted file mode 100644 index 596a7d7fd..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ /dev/null @@ -1,50 +0,0 @@ -filterCallback = $filterCallback; - } - - /** - * Get found node satisfying the filter callback. - * - * Returns null if no node satisfies the filter callback. - * - * @return null|Node Found node (or null if not found) - */ - public function getFoundNode() { - return $this->foundNode; - } - - public function beforeTraverse(array $nodes) { - $this->foundNode = null; - - return null; - } - - public function enterNode(Node $node) { - $filterCallback = $this->filterCallback; - if ($filterCallback($node)) { - $this->foundNode = $node; - return NodeTraverser::STOP_TRAVERSAL; - } - - return null; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php deleted file mode 100644 index 8e259c57b..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ /dev/null @@ -1,257 +0,0 @@ -nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing); - $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; - $this->replaceNodes = $options['replaceNodes'] ?? true; - } - - /** - * Get name resolution context. - * - * @return NameContext - */ - public function getNameContext() : NameContext { - return $this->nameContext; - } - - public function beforeTraverse(array $nodes) { - $this->nameContext->startNamespace(); - return null; - } - - public function enterNode(Node $node) { - if ($node instanceof Stmt\Namespace_) { - $this->nameContext->startNamespace($node->name); - } elseif ($node instanceof Stmt\Use_) { - foreach ($node->uses as $use) { - $this->addAlias($use, $node->type, null); - } - } elseif ($node instanceof Stmt\GroupUse) { - foreach ($node->uses as $use) { - $this->addAlias($use, $node->type, $node->prefix); - } - } elseif ($node instanceof Stmt\Class_) { - if (null !== $node->extends) { - $node->extends = $this->resolveClassName($node->extends); - } - - foreach ($node->implements as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - if (null !== $node->name) { - $this->addNamespacedName($node); - } - } elseif ($node instanceof Stmt\Interface_) { - foreach ($node->extends as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Enum_) { - foreach ($node->implements as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - if (null !== $node->name) { - $this->addNamespacedName($node); - } - } elseif ($node instanceof Stmt\Trait_) { - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Function_) { - $this->resolveSignature($node); - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\ClassMethod - || $node instanceof Expr\Closure - || $node instanceof Expr\ArrowFunction - ) { - $this->resolveSignature($node); - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\Property) { - if (null !== $node->type) { - $node->type = $this->resolveType($node->type); - } - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\Const_) { - foreach ($node->consts as $const) { - $this->addNamespacedName($const); - } - } else if ($node instanceof Stmt\ClassConst) { - $this->resolveAttrGroups($node); - } else if ($node instanceof Stmt\EnumCase) { - $this->resolveAttrGroups($node); - } elseif ($node instanceof Expr\StaticCall - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\ClassConstFetch - || $node instanceof Expr\New_ - || $node instanceof Expr\Instanceof_ - ) { - if ($node->class instanceof Name) { - $node->class = $this->resolveClassName($node->class); - } - } elseif ($node instanceof Stmt\Catch_) { - foreach ($node->types as &$type) { - $type = $this->resolveClassName($type); - } - } elseif ($node instanceof Expr\FuncCall) { - if ($node->name instanceof Name) { - $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_FUNCTION); - } - } elseif ($node instanceof Expr\ConstFetch) { - $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_CONSTANT); - } elseif ($node instanceof Stmt\TraitUse) { - foreach ($node->traits as &$trait) { - $trait = $this->resolveClassName($trait); - } - - foreach ($node->adaptations as $adaptation) { - if (null !== $adaptation->trait) { - $adaptation->trait = $this->resolveClassName($adaptation->trait); - } - - if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) { - foreach ($adaptation->insteadof as &$insteadof) { - $insteadof = $this->resolveClassName($insteadof); - } - } - } - } - - return null; - } - - private function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) { - // Add prefix for group uses - $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; - // Type is determined either by individual element or whole use declaration - $type |= $use->type; - - $this->nameContext->addAlias( - $name, (string) $use->getAlias(), $type, $use->getAttributes() - ); - } - - /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */ - private function resolveSignature($node) { - foreach ($node->params as $param) { - $param->type = $this->resolveType($param->type); - $this->resolveAttrGroups($param); - } - $node->returnType = $this->resolveType($node->returnType); - } - - private function resolveType($node) { - if ($node instanceof Name) { - return $this->resolveClassName($node); - } - if ($node instanceof Node\NullableType) { - $node->type = $this->resolveType($node->type); - return $node; - } - if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) { - foreach ($node->types as &$type) { - $type = $this->resolveType($type); - } - return $node; - } - return $node; - } - - /** - * Resolve name, according to name resolver options. - * - * @param Name $name Function or constant name to resolve - * @param int $type One of Stmt\Use_::TYPE_* - * - * @return Name Resolved name, or original name with attribute - */ - protected function resolveName(Name $name, int $type) : Name { - if (!$this->replaceNodes) { - $resolvedName = $this->nameContext->getResolvedName($name, $type); - if (null !== $resolvedName) { - $name->setAttribute('resolvedName', $resolvedName); - } else { - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); - } - return $name; - } - - if ($this->preserveOriginalNames) { - // Save the original name - $originalName = $name; - $name = clone $originalName; - $name->setAttribute('originalName', $originalName); - } - - $resolvedName = $this->nameContext->getResolvedName($name, $type); - if (null !== $resolvedName) { - return $resolvedName; - } - - // unqualified names inside a namespace cannot be resolved at compile-time - // add the namespaced version of the name as an attribute - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); - return $name; - } - - protected function resolveClassName(Name $name) { - return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); - } - - protected function addNamespacedName(Node $node) { - $node->namespacedName = Name::concat( - $this->nameContext->getNamespace(), (string) $node->name); - } - - protected function resolveAttrGroups(Node $node) - { - foreach ($node->attrGroups as $attrGroup) { - foreach ($attrGroup->attrs as $attr) { - $attr->name = $this->resolveClassName($attr->name); - } - } - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php deleted file mode 100644 index ea372e5b9..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ /dev/null @@ -1,52 +0,0 @@ -$node->getAttribute('parent'), the previous - * node can be accessed through $node->getAttribute('previous'), - * and the next node can be accessed through $node->getAttribute('next'). - */ -final class NodeConnectingVisitor extends NodeVisitorAbstract -{ - /** - * @var Node[] - */ - private $stack = []; - - /** - * @var ?Node - */ - private $previous; - - public function beforeTraverse(array $nodes) { - $this->stack = []; - $this->previous = null; - } - - public function enterNode(Node $node) { - if (!empty($this->stack)) { - $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); - } - - if ($this->previous !== null && $this->previous->getAttribute('parent') === $node->getAttribute('parent')) { - $node->setAttribute('previous', $this->previous); - $this->previous->setAttribute('next', $node); - } - - $this->stack[] = $node; - } - - public function leaveNode(Node $node) { - $this->previous = $node; - - array_pop($this->stack); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php deleted file mode 100644 index b98d2bfa6..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ /dev/null @@ -1,41 +0,0 @@ -$node->getAttribute('parent'). - */ -final class ParentConnectingVisitor extends NodeVisitorAbstract -{ - /** - * @var Node[] - */ - private $stack = []; - - public function beforeTraverse(array $nodes) - { - $this->stack = []; - } - - public function enterNode(Node $node) - { - if (!empty($this->stack)) { - $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); - } - - $this->stack[] = $node; - } - - public function leaveNode(Node $node) - { - array_pop($this->stack); - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/lib/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php deleted file mode 100644 index d378d6709..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +++ /dev/null @@ -1,25 +0,0 @@ -parsers = $parsers; - } - - public function parse(string $code, ErrorHandler $errorHandler = null) { - if (null === $errorHandler) { - $errorHandler = new ErrorHandler\Throwing; - } - - list($firstStmts, $firstError) = $this->tryParse($this->parsers[0], $errorHandler, $code); - if ($firstError === null) { - return $firstStmts; - } - - for ($i = 1, $c = count($this->parsers); $i < $c; ++$i) { - list($stmts, $error) = $this->tryParse($this->parsers[$i], $errorHandler, $code); - if ($error === null) { - return $stmts; - } - } - - throw $firstError; - } - - private function tryParse(Parser $parser, ErrorHandler $errorHandler, $code) { - $stmts = null; - $error = null; - try { - $stmts = $parser->parse($code, $errorHandler); - } catch (Error $error) {} - return [$stmts, $error]; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/lib/nikic/php-parser/lib/PhpParser/Parser/Php5.php deleted file mode 100644 index d9c8fe049..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Parser/Php5.php +++ /dev/null @@ -1,2672 +0,0 @@ -'", - "T_IS_GREATER_OR_EQUAL", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'.'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_EXIT", - "T_IF", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_LNUMBER", - "T_DNUMBER", - "T_STRING", - "T_STRING_VARNAME", - "T_VARIABLE", - "T_NUM_STRING", - "T_INLINE_HTML", - "T_ENCAPSED_AND_WHITESPACE", - "T_CONSTANT_ENCAPSED_STRING", - "T_ECHO", - "T_DO", - "T_WHILE", - "T_ENDWHILE", - "T_FOR", - "T_ENDFOR", - "T_FOREACH", - "T_ENDFOREACH", - "T_DECLARE", - "T_ENDDECLARE", - "T_AS", - "T_SWITCH", - "T_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "T_USE", - "T_INSTEADOF", - "T_GLOBAL", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", - "T_VAR", - "T_UNSET", - "T_ISSET", - "T_EMPTY", - "T_HALT_COMPILER", - "T_CLASS", - "T_TRAIT", - "T_INTERFACE", - "T_EXTENDS", - "T_IMPLEMENTS", - "T_OBJECT_OPERATOR", - "T_LIST", - "T_ARRAY", - "T_CALLABLE", - "T_CLASS_C", - "T_TRAIT_C", - "T_METHOD_C", - "T_FUNC_C", - "T_LINE", - "T_FILE", - "T_START_HEREDOC", - "T_END_HEREDOC", - "T_DOLLAR_OPEN_CURLY_BRACES", - "T_CURLY_OPEN", - "T_PAAMAYIM_NEKUDOTAYIM", - "T_NAMESPACE", - "T_NS_C", - "T_DIR", - "T_NS_SEPARATOR", - "T_ELLIPSIS", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "';'", - "'{'", - "'}'", - "'('", - "')'", - "'$'", - "'`'", - "']'", - "'\"'", - "T_READONLY", - "T_ENUM", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_ATTRIBUTE" - ); - - protected $tokenToSymbol = array( - 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 56, 163, 168, 160, 55, 168, 168, - 158, 159, 53, 50, 8, 51, 52, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 155, - 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 70, 168, 162, 36, 168, 161, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 156, 35, 157, 58, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, - 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 164, - 122, 123, 124, 125, 126, 127, 128, 129, 165, 130, - 131, 132, 166, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 167 - ); - - protected $action = array( - 699, 669, 670, 671, 672, 673, 286, 674, 675, 676, - 712, 713, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, 245, 246, - 242, 243, 244,-32766,-32766, 677,-32766, 750,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 1224, 245, 246, 1225, 678, - 679, 680, 681, 682, 683, 684,-32766, 48, 746,-32766, - -32766,-32766,-32766,-32766,-32766, 685, 686, 687, 688, 689, - 690, 691, 692, 693, 694, 695, 715, 738, 716, 717, - 718, 719, 707, 708, 709, 737, 710, 711, 696, 697, - 698, 700, 701, 702, 740, 741, 742, 743, 744, 745, - 703, 704, 705, 706, 736, 727, 725, 726, 722, 723, - 751, 714, 720, 721, 728, 729, 731, 730, 732, 733, - 55, 56, 425, 57, 58, 724, 735, 734, 1073, 59, - 60, -224, 61,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 121,-32767,-32767,-32767,-32767, 29, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 1043, 766, 1071, 767, 580, 62, 63,-32766, - -32766,-32766,-32766, 64, 516, 65, 294, 295, 66, 67, - 68, 69, 70, 71, 72, 73, 822, 25, 302, 74, - 418, 981, 983, 1043, 1181, 1095, 1096, 1073, 748, 754, - 1075, 1074, 1076, 469,-32766,-32766,-32766, 337, 823, 54, - -32767,-32767,-32767,-32767, 98, 99, 100, 101, 102, 220, - 221, 222, 78, 361, 1107,-32766, 341,-32766,-32766,-32766, - -32766,-32766, 1107, 492, 949, 950, 951, 948, 947, 946, - 207, 477, 478, 949, 950, 951, 948, 947, 946, 1043, - 479, 480, 52, 1101, 1102, 1103, 1104, 1098, 1099, 319, - 872, 668, 667, 27, -511, 1105, 1100,-32766, 130, 1075, - 1074, 1076, 345, 668, 667, 41, 126, 341, 334, 369, - 336, 426, -128, -128, -128, 896, 897, 468, 220, 221, - 222, 811, 1195, 619, 40, 21, 427, -128, 470, -128, - 471, -128, 472, -128, 802, 428, -4, 823, 54, 207, - 33, 34, 429, 360, 317, 28, 35, 473,-32766,-32766, - -32766, 211, 356, 357, 474, 475,-32766,-32766,-32766, 754, - 476, 49, 313, 794, 843, 430, 431, 289, 125,-32766, - 813,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767,-32766,-32766,-32766, 769, 103, 104, 105, - 327, 307, 825, 633, -128, 1075, 1074, 1076, 221, 222, - 927, 748, 1146, 106,-32766, 129,-32766,-32766,-32766,-32766, - 426, 823, 54, 902, 873, 302, 468, 75, 207, 359, - 811, 668, 667, 40, 21, 427, 754, 470, 754, 471, - 423, 472, 1043, 127, 428, 435, 1043, 341, 1043, 33, - 34, 429, 360, 1181, 415, 35, 473, 122, 10, 315, - 128, 356, 357, 474, 475,-32766,-32766,-32766, 768, 476, - 668, 667, 758, 843, 430, 431, 754, 1043, 1147,-32766, - -32766,-32766, 754, 419, 342, 1215,-32766, 131,-32766,-32766, - -32766, 341, 363, 346, 426, 823, 54, 100, 101, 102, - 468, 825, 633, -4, 811, 442, 903, 40, 21, 427, - 754, 470, 435, 471, 341, 472, 341, 766, 428, 767, - -209, -209, -209, 33, 34, 429, 360, 479, 1196, 35, - 473, 345,-32766,-32766,-32766, 356, 357, 474, 475, 220, - 221, 222, 421, 476, 32, 297, 794, 843, 430, 431, - 754, 754, 435,-32766, 341,-32766,-32766, 9, 300, 51, - 207, 249, 324, 753, 120, 220, 221, 222, 426, 30, - 247, 941, 422, 424, 468, 825, 633, -209, 811, 1043, - 1061, 40, 21, 427, 129, 470, 207, 471, 341, 472, - 804, 20, 428, 124, -208, -208, -208, 33, 34, 429, - 360, 479, 212, 35, 473, 923, -259, 823, 54, 356, - 357, 474, 475,-32766,-32766,-32766, 1043, 476, 213, 806, - 794, 843, 430, 431,-32766,-32766, 435, 435, 341, 341, - 443, 79, 80, 81,-32766, 668, 667, 636, 344, 808, - 668, 667, 239, 240, 241, 123, 214, 538, 250, 825, - 633, -208, 36, 251, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 252, 307, - 426, 220, 221, 222, 823, 54, 468,-32766, 222, 765, - 811, 106, 134, 40, 21, 427, 571, 470, 207, 471, - 445, 472, 207,-32766, 428, 896, 897, 207, 307, 33, - 34, 429, 245, 246, 637, 35, 473, 452, 22, 809, - 922, 356, 357, 457, 588, 135, 374, 595, 596, 476, - -228, 759, 639, 938, 653, 926, 661, -86, 823, 54, - 314, 644, 647, 821, 133, 836, 43, 106, 603, 44, - 45, 46, 47, 748, 50, 53, 132, 426, 302,-32766, - 520, 825, 633, 468, -84, 607, 577, 811, 641, 362, - 40, 21, 427, -278, 470, 754, 471, 954, 472, 441, - 627, 428, 823, 54, 574, 844, 33, 34, 429, 11, - 615, 845, 35, 473, 444, 461, 285, -511, 356, 357, - 592, -419, 593, 1106, 1153, -410, 476, 368, 838, 38, - 658, 426, 645, 795, 1052, 0, 325, 468, 0,-32766, - 0, 811, 0, 0, 40, 21, 427, 0, 470, 0, - 471, 0, 472, 0, 322, 428, 823, 54, 825, 633, - 33, 34, 429, 0, 326, 0, 35, 473, 323, 0, - 316, 318, 356, 357, -512, 426, 0, 753, 531, 0, - 476, 468, 6, 0, 0, 811, 650, 7, 40, 21, - 427, 12, 470, 14, 471, 373, 472, -420, 562, 428, - 823, 54, 78, -225, 33, 34, 429, 39, 656, 657, - 35, 473, 859, 633, 764, 812, 356, 357, 820, 799, - 814, 875, 866, 867, 476, 797, 860, 857, 855, 426, - 933, 934, 931, 819, 803, 468, 805, 807, 810, 811, - 930, 762, 40, 21, 427, 763, 470, 932, 471, 335, - 472, 358, 634, 428, 638, 640, 825, 633, 33, 34, - 429, 642, 643, 646, 35, 473, 648, 649, 651, 652, - 356, 357, 635, 426, 1221, 1223, 761, 842, 476, 468, - 248, 760, 841, 811, 1222, 840, 40, 21, 427, 1057, - 470, 830, 471, 1045, 472, 839, 1046, 428, 828, 215, - 216, 939, 33, 34, 429, 217, 864, 218, 35, 473, - 825, 633, 24, 865, 356, 357, 456, 1220, 1189, 209, - 1187, 1172, 476, 1185, 215, 216, 1086, 1095, 1096, 914, - 217, 1193, 218, 1183, -224, 1097, 26, 31, 37, 42, - 76, 77, 210, 288, 209, 292, 293, 308, 309, 310, - 311, 339, 1095, 1096, 825, 633, 355, 291, 416, 1152, - 1097, 16, 17, 18, 393, 453, 460, 462, 466, 552, - 624, 1048, 1051, 904, 1111, 1047, 1023, 563, 1022, 1088, - 0, 0, -429, 558, 1041, 1101, 1102, 1103, 1104, 1098, - 1099, 398, 1054, 1053, 1056, 1055, 1070, 1105, 1100, 1186, - 1171, 1167, 1184, 1085, 1218, 1112, 1166, 219, 558, 599, - 1101, 1102, 1103, 1104, 1098, 1099, 398, 0, 0, 0, - 0, 0, 1105, 1100, 0, 0, 0, 0, 0, 0, - 0, 0, 219 - ); - - protected $actionCheck = array( - 2, 3, 4, 5, 6, 7, 14, 9, 10, 11, - 12, 13, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, - 53, 54, 55, 9, 10, 57, 30, 80, 32, 33, - 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, - 72, 73, 74, 75, 76, 77, 9, 70, 80, 33, - 34, 35, 36, 37, 38, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 153, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 3, 4, 5, 6, 7, 147, 148, 149, 80, 12, - 13, 159, 15, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 156, 44, 45, 46, 47, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 13, 106, 116, 108, 85, 50, 51, 33, - 34, 35, 36, 56, 85, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 1, 70, 71, 72, - 73, 59, 60, 13, 82, 78, 79, 80, 80, 82, - 152, 153, 154, 86, 9, 10, 11, 8, 1, 2, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 9, - 10, 11, 156, 106, 143, 30, 160, 32, 33, 34, - 35, 36, 143, 116, 116, 117, 118, 119, 120, 121, - 30, 124, 125, 116, 117, 118, 119, 120, 121, 13, - 133, 134, 70, 136, 137, 138, 139, 140, 141, 142, - 31, 37, 38, 8, 132, 148, 149, 116, 156, 152, - 153, 154, 160, 37, 38, 158, 8, 160, 161, 8, - 163, 74, 75, 76, 77, 134, 135, 80, 9, 10, - 11, 84, 1, 80, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 155, 98, 0, 1, 2, 30, - 103, 104, 105, 106, 132, 8, 109, 110, 9, 10, - 11, 8, 115, 116, 117, 118, 9, 10, 11, 82, - 123, 70, 8, 126, 127, 128, 129, 8, 156, 30, - 155, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 9, 10, 11, 157, 53, 54, 55, - 8, 57, 155, 156, 157, 152, 153, 154, 10, 11, - 157, 80, 162, 69, 30, 151, 32, 33, 34, 35, - 74, 1, 2, 159, 155, 71, 80, 151, 30, 8, - 84, 37, 38, 87, 88, 89, 82, 91, 82, 93, - 8, 95, 13, 156, 98, 158, 13, 160, 13, 103, - 104, 105, 106, 82, 108, 109, 110, 156, 8, 113, - 31, 115, 116, 117, 118, 9, 10, 11, 157, 123, - 37, 38, 126, 127, 128, 129, 82, 13, 159, 33, - 34, 35, 82, 127, 8, 85, 30, 156, 32, 33, - 34, 160, 8, 147, 74, 1, 2, 50, 51, 52, - 80, 155, 156, 157, 84, 31, 159, 87, 88, 89, - 82, 91, 158, 93, 160, 95, 160, 106, 98, 108, - 100, 101, 102, 103, 104, 105, 106, 133, 159, 109, - 110, 160, 9, 10, 11, 115, 116, 117, 118, 9, - 10, 11, 8, 123, 144, 145, 126, 127, 128, 129, - 82, 82, 158, 30, 160, 32, 33, 108, 8, 70, - 30, 31, 113, 152, 16, 9, 10, 11, 74, 14, - 14, 122, 8, 8, 80, 155, 156, 157, 84, 13, - 159, 87, 88, 89, 151, 91, 30, 93, 160, 95, - 155, 159, 98, 14, 100, 101, 102, 103, 104, 105, - 106, 133, 16, 109, 110, 155, 157, 1, 2, 115, - 116, 117, 118, 9, 10, 11, 13, 123, 16, 155, - 126, 127, 128, 129, 33, 34, 158, 158, 160, 160, - 156, 9, 10, 11, 30, 37, 38, 31, 70, 155, - 37, 38, 50, 51, 52, 156, 16, 81, 16, 155, - 156, 157, 30, 16, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 16, 57, - 74, 9, 10, 11, 1, 2, 80, 116, 11, 155, - 84, 69, 156, 87, 88, 89, 160, 91, 30, 93, - 132, 95, 30, 33, 98, 134, 135, 30, 57, 103, - 104, 105, 69, 70, 31, 109, 110, 75, 76, 155, - 155, 115, 116, 75, 76, 101, 102, 111, 112, 123, - 159, 155, 156, 155, 156, 155, 156, 31, 1, 2, - 31, 31, 31, 31, 31, 38, 70, 69, 77, 70, - 70, 70, 70, 80, 70, 70, 70, 74, 71, 85, - 85, 155, 156, 80, 97, 96, 100, 84, 31, 106, - 87, 88, 89, 82, 91, 82, 93, 82, 95, 89, - 92, 98, 1, 2, 90, 127, 103, 104, 105, 97, - 94, 127, 109, 110, 97, 97, 97, 132, 115, 116, - 100, 146, 113, 143, 143, 146, 123, 106, 151, 155, - 157, 74, 31, 157, 162, -1, 114, 80, -1, 116, - -1, 84, -1, -1, 87, 88, 89, -1, 91, -1, - 93, -1, 95, -1, 130, 98, 1, 2, 155, 156, - 103, 104, 105, -1, 130, -1, 109, 110, 131, -1, - 132, 132, 115, 116, 132, 74, -1, 152, 150, -1, - 123, 80, 146, -1, -1, 84, 31, 146, 87, 88, - 89, 146, 91, 146, 93, 146, 95, 146, 150, 98, - 1, 2, 156, 159, 103, 104, 105, 155, 155, 155, - 109, 110, 155, 156, 155, 155, 115, 116, 155, 155, - 155, 155, 155, 155, 123, 155, 155, 155, 155, 74, - 155, 155, 155, 155, 155, 80, 155, 155, 155, 84, - 155, 155, 87, 88, 89, 155, 91, 155, 93, 156, - 95, 156, 156, 98, 156, 156, 155, 156, 103, 104, - 105, 156, 156, 156, 109, 110, 156, 156, 156, 156, - 115, 116, 156, 74, 157, 157, 157, 157, 123, 80, - 31, 157, 157, 84, 157, 157, 87, 88, 89, 157, - 91, 157, 93, 157, 95, 157, 157, 98, 157, 50, - 51, 157, 103, 104, 105, 56, 157, 58, 109, 110, - 155, 156, 158, 157, 115, 116, 157, 157, 157, 70, - 157, 157, 123, 157, 50, 51, 157, 78, 79, 157, - 56, 157, 58, 157, 159, 86, 158, 158, 158, 158, - 158, 158, 158, 158, 70, 158, 158, 158, 158, 158, - 158, 158, 78, 79, 155, 156, 158, 160, 158, 163, - 86, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - -1, -1, 161, 134, 161, 136, 137, 138, 139, 140, - 141, 142, 162, 162, 162, 162, 162, 148, 149, 162, - 162, 162, 162, 162, 162, 162, 162, 158, 134, 162, - 136, 137, 138, 139, 140, 141, 142, -1, -1, -1, - -1, -1, 148, 149, -1, -1, -1, -1, -1, -1, - -1, -1, 158 - ); - - protected $actionBase = array( - 0, 227, 326, 400, 474, 233, 132, 132, 752, -2, - -2, 138, -2, -2, -2, 663, 761, 815, 761, 586, - 717, 859, 859, 859, 244, 256, 256, 256, 413, 583, - 583, 880, 546, 169, 415, 444, 409, 200, 200, 200, - 200, 137, 137, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 249, 205, 738, 559, - 535, 739, 741, 742, 876, 679, 877, 820, 821, 693, - 823, 824, 826, 829, 832, 819, 834, 907, 836, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 67, 536, 299, 510, 230, 44, 652, 652, 652, - 652, 652, 652, 652, 337, 337, 337, 337, 337, 337, - 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, - 337, 337, 378, 584, 584, 584, 657, 909, 648, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 503, -21, -21, 436, 650, 364, 571, - 215, 426, 156, 26, 26, 329, 329, 329, 329, 329, - 46, 46, 5, 5, 5, 5, 152, 186, 186, 186, - 186, 120, 120, 120, 120, 374, 374, 429, 448, 448, - 334, 267, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 336, 427, 427, 572, 572, 408, 551, 551, - 551, 551, 671, 171, 171, 391, 311, 311, 311, 109, - 641, 856, 68, 68, 68, 68, 68, 68, 324, 324, - 324, -3, -3, -3, 655, 77, 380, 77, 380, 683, - 685, 86, 685, 654, -15, 516, 776, 281, 646, 809, - 680, 816, 560, 711, 202, 578, 857, 643, -23, 578, - 578, 578, 578, 857, 622, 628, 596, -23, 578, -23, - 639, 454, 849, 351, 249, 558, 469, 631, 743, 514, - 688, 746, 464, 544, 548, 556, 7, 412, 708, 750, - 878, 879, 349, 702, 631, 631, 631, 327, 101, 7, - -8, 623, 623, 623, 623, 219, 623, 623, 623, 623, - 291, 430, 545, 401, 745, 653, 653, 675, 839, 814, - 814, 653, 673, 653, 675, 841, 841, 841, 841, 653, - 653, 653, 653, 814, 814, 667, 814, 275, 684, 694, - 694, 841, 713, 714, 653, 653, 697, 814, 814, 814, - 697, 687, 841, 669, 637, 333, 814, 841, 689, 673, - 689, 653, 669, 689, 673, 673, 689, 22, 686, 656, - 840, 842, 860, 756, 638, 644, 847, 848, 843, 845, - 838, 692, 719, 720, 528, 659, 660, 661, 662, 696, - 664, 698, 643, 658, 658, 658, 645, 701, 645, 658, - 658, 658, 658, 658, 658, 658, 658, 632, 635, 709, - 699, 670, 723, 566, 582, 758, 640, 636, 872, 865, - 881, 883, 849, 870, 645, 890, 634, 288, 610, 850, - 633, 753, 645, 851, 645, 759, 645, 873, 777, 666, - 778, 779, 658, 874, 891, 892, 893, 894, 897, 898, - 899, 900, 665, 901, 724, 674, 866, 344, 844, 639, - 705, 677, 755, 725, 780, 372, 902, 784, 645, 645, - 765, 706, 645, 766, 726, 712, 862, 727, 867, 903, - 640, 678, 868, 645, 681, 785, 904, 372, 690, 651, - 704, 649, 728, 858, 875, 853, 767, 612, 617, 787, - 788, 792, 691, 730, 863, 864, 835, 731, 770, 642, - 771, 676, 794, 772, 852, 732, 796, 798, 871, 647, - 707, 682, 672, 668, 773, 799, 869, 733, 735, 736, - 801, 737, 804, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 137, 137, 137, 137, -2, -2, -2, - -2, 0, 0, -2, 0, 0, 0, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 0, 0, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 602, -21, -21, -21, -21, 602, -21, - -21, -21, -21, -21, -21, -21, 602, 602, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 602, 602, 602, -21, 602, 602, 602, -21, 68, - -21, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 602, 0, 0, 602, -21, - 602, -21, 602, -21, -21, 602, 602, 602, 602, 602, - 602, 602, -21, -21, -21, -21, -21, -21, 0, 324, - 324, 324, 324, -21, -21, -21, -21, 68, 68, 147, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 324, 324, -3, -3, 68, - 68, 68, 68, 68, 147, 68, 68, -23, 673, 673, - 673, 380, 380, 380, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 380, -23, 0, -23, - 0, 68, -23, 673, -23, 380, 673, 673, -23, 814, - 604, 604, 604, 604, 372, 7, 0, 0, 673, 673, - 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, - 0, 0, 814, 0, 653, 0, 0, 0, 0, 658, - 288, 0, 677, 456, 0, 0, 0, 0, 0, 0, - 677, 456, 530, 530, 0, 665, 658, 658, 658, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 372 - ); - - protected $actionDefault = array( - 3,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 540, 540, 495,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 297, 297, 297, - 32767,32767,32767, 528, 528, 528, 528, 528, 528, 528, - 528, 528, 528, 528,32767,32767,32767,32767,32767,32767, - 381,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 387, - 545,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 362, - 363, 365, 366, 296, 548, 529, 245, 388, 544, 295, - 247, 325, 499,32767,32767,32767, 327, 122, 256, 201, - 498, 125, 294, 232, 380, 382, 326, 301, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 300, 454, 359, 358, 357, 456,32767, 455, 492, - 492, 495,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 323, 483, 482, 324, 452, 328, 453, - 331, 457, 460, 329, 330, 347, 348, 345, 346, 349, - 458, 459, 476, 477, 474, 475, 299, 350, 351, 352, - 353, 478, 479, 480, 481,32767,32767, 280, 539, 539, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 338, 339, 467, 468,32767, 236, 236, - 236, 236, 281, 236,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 333, 334, - 332, 462, 463, 461, 428,32767,32767,32767, 430,32767, - 32767,32767,32767,32767,32767,32767,32767, 500,32767,32767, - 32767,32767,32767, 513, 417, 171,32767, 409,32767, 171, - 171, 171, 171,32767, 220, 222, 167,32767, 171,32767, - 486,32767,32767,32767,32767,32767, 518, 343,32767,32767, - 116,32767,32767,32767, 555,32767, 513,32767, 116,32767, - 32767,32767,32767, 356, 335, 336, 337,32767,32767, 517, - 511, 470, 471, 472, 473,32767, 464, 465, 466, 469, - 32767,32767,32767,32767,32767,32767,32767,32767, 425, 431, - 431,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 516, 515,32767, 410, 494, 186, 184, - 184,32767, 206, 206,32767,32767, 188, 487, 506,32767, - 188, 173,32767, 398, 175, 494,32767,32767, 238,32767, - 238,32767, 398, 238,32767,32767, 238,32767, 411, 435, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 377, 378, 489, 502,32767, - 503,32767, 409, 341, 342, 344, 320,32767, 322, 367, - 368, 369, 370, 371, 372, 373, 375,32767, 415,32767, - 418,32767,32767,32767, 255,32767, 553,32767,32767, 304, - 553,32767,32767,32767, 547,32767,32767, 298,32767,32767, - 32767,32767, 251,32767, 169,32767, 537,32767, 554,32767, - 511,32767, 340,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 512,32767,32767,32767,32767, 227,32767, 448, - 32767, 116,32767,32767,32767, 187,32767,32767, 302, 246, - 32767,32767, 546,32767,32767,32767,32767,32767,32767,32767, - 32767, 114,32767, 170,32767,32767,32767, 189,32767,32767, - 511,32767,32767,32767,32767,32767,32767,32767, 293,32767, - 32767,32767,32767,32767,32767,32767, 511,32767,32767, 231, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 411, - 32767, 274,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 127, 127, 3, 127, 127, 258, 3, - 258, 127, 258, 258, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 214, 217, 206, 206, 164, 127, - 127, 266 - ); - - protected $goto = array( - 166, 140, 140, 140, 166, 187, 168, 144, 147, 141, - 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, - 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, - 138, 159, 160, 161, 162, 184, 139, 185, 493, 494, - 377, 495, 499, 500, 501, 502, 503, 504, 505, 506, - 967, 164, 145, 146, 148, 171, 176, 186, 203, 253, - 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, - 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, - 395, 396, 542, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, - 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, - 158, 136, 620, 560, 756, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 1108, - 628, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 757, 888, 888, 508, 1200, - 1200, 400, 606, 508, 536, 536, 568, 532, 534, 534, - 496, 498, 524, 540, 569, 572, 583, 590, 852, 852, - 852, 852, 847, 853, 174, 585, 519, 600, 601, 177, - 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, - 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, - 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, - 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, - 497, 497, 785, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 509, 578, 582, - 626, 749, 509, 544, 545, 546, 547, 548, 549, 550, - 551, 553, 586, 338, 559, 321, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 530, 349, 655, 555, 587, 352, 414, 591, 575, 604, - 885, 611, 612, 881, 616, 617, 623, 625, 630, 632, - 298, 296, 296, 296, 298, 290, 299, 944, 610, 816, - 1170, 613, 436, 436, 375, 436, 436, 436, 436, 436, - 436, 436, 436, 436, 436, 436, 436, 436, 436, 1072, - 1084, 1083, 945, 1065, 1072, 895, 895, 895, 895, 1178, - 895, 895, 1212, 1212, 1178, 388, 858, 561, 755, 1072, - 1072, 1072, 1072, 1072, 1072, 3, 4, 384, 384, 384, - 1212, 874, 856, 854, 856, 654, 465, 511, 883, 878, - 1089, 541, 384, 537, 384, 567, 384, 1026, 19, 15, - 371, 384, 1226, 510, 1204, 1192, 1192, 1192, 510, 906, - 372, 522, 533, 554, 912, 514, 1068, 1069, 13, 1065, - 378, 912, 1158, 594, 23, 965, 386, 386, 386, 602, - 1066, 1169, 1066, 937, 447, 449, 631, 752, 1177, 1067, - 1109, 614, 935, 1177, 605, 1197, 391, 1211, 1211, 543, - 892, 386, 1194, 1194, 1194, 399, 518, 1016, 901, 389, - 771, 529, 752, 340, 752, 1211, 518, 518, 385, 781, - 1214, 770, 772, 1063, 910, 774, 1058, 1176, 659, 953, - 514, 782, 862, 915, 450, 573, 1155, 0, 463, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 513, 528, 0, 0, 0, 0, - 513, 0, 528, 0, 350, 351, 0, 609, 512, 515, - 438, 439, 1064, 618, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 779, 1219, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 523, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 301, 301 - ); - - protected $gotoCheck = array( - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 57, 68, 15, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 126, - 9, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 16, 76, 76, 68, 76, - 76, 51, 51, 68, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 68, 68, - 68, 68, 68, 68, 27, 66, 101, 66, 66, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 117, 117, 29, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 61, 61, - 61, 6, 117, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 125, 57, 125, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 32, 71, 32, 32, 69, 69, 69, 32, 40, 40, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 5, 5, 5, 5, 5, 5, 5, 97, 62, 50, - 81, 62, 57, 57, 62, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 124, 124, 97, 81, 57, 57, 57, 57, 57, 118, - 57, 57, 142, 142, 118, 12, 33, 12, 14, 57, - 57, 57, 57, 57, 57, 30, 30, 13, 13, 13, - 142, 14, 14, 14, 14, 14, 57, 14, 14, 14, - 34, 2, 13, 109, 13, 2, 13, 34, 34, 34, - 34, 13, 13, 122, 140, 9, 9, 9, 122, 83, - 58, 58, 58, 34, 13, 13, 81, 81, 58, 81, - 46, 13, 131, 127, 34, 101, 123, 123, 123, 34, - 81, 81, 81, 8, 8, 8, 8, 11, 119, 81, - 8, 8, 8, 119, 49, 138, 48, 141, 141, 47, - 78, 123, 119, 119, 119, 123, 47, 102, 80, 17, - 23, 9, 11, 18, 11, 141, 47, 47, 11, 23, - 141, 23, 24, 115, 84, 25, 113, 119, 73, 99, - 13, 26, 70, 85, 64, 65, 130, -1, 108, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, - 9, -1, 9, -1, 71, 71, -1, 13, 9, 9, - 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 9, 9, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 5 - ); - - protected $gotoBase = array( - 0, 0, -184, 0, 0, 356, 290, 0, 488, 149, - 0, 182, 85, 118, 426, 112, 203, 179, 208, 0, - 0, 0, 0, 162, 190, 198, 120, 27, 0, 272, - -224, 0, -274, 406, 32, 0, 0, 0, 0, 0, - 330, 0, 0, -24, 0, 0, 440, 485, 213, 218, - 371, -74, 0, 0, 0, 0, 0, 107, 110, 0, - 0, -11, -72, 0, 104, 95, -405, 0, -94, 41, - 119, -82, 0, 164, 0, 0, -79, 0, 197, 0, - 204, 43, 0, 441, 171, 121, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 100, 0, 115, - 0, 195, 210, 0, 0, 0, 0, 0, 86, 427, - 259, 0, 0, 116, 0, 174, 0, -5, 117, 196, - 0, 0, 161, 170, 93, -21, -48, 273, 0, 0, - 91, 271, 0, 0, 0, 0, 0, 0, 216, 0, - 437, 187, 102, 0, 0 - ); - - protected $gotoDefault = array( - -32768, 467, 663, 2, 664, 834, 739, 747, 597, 481, - 629, 581, 380, 1188, 791, 792, 793, 381, 367, 482, - 379, 410, 405, 780, 773, 775, 783, 172, 411, 786, - 1, 788, 517, 824, 1017, 364, 796, 365, 589, 798, - 526, 800, 801, 137, 382, 383, 527, 483, 390, 576, - 815, 276, 387, 817, 366, 818, 827, 370, 464, 454, - 459, 556, 608, 432, 446, 570, 564, 535, 1081, 565, - 861, 348, 869, 660, 877, 880, 484, 557, 891, 451, - 899, 1094, 397, 905, 911, 916, 287, 919, 417, 412, - 584, 924, 925, 5, 929, 621, 622, 8, 312, 952, - 598, 966, 420, 1036, 1038, 485, 486, 521, 458, 507, - 525, 487, 1059, 440, 413, 1062, 488, 489, 433, 434, - 1078, 354, 1163, 353, 448, 320, 1150, 579, 1113, 455, - 1203, 1159, 347, 490, 491, 376, 1182, 392, 1198, 437, - 1205, 1213, 343, 539, 566 - ); - - protected $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, - 12, 12, 13, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 18, 18, 19, 19, 21, 21, - 17, 17, 22, 22, 23, 23, 24, 24, 25, 25, - 20, 20, 26, 28, 28, 29, 30, 30, 32, 31, - 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 14, 14, 54, 54, 56, 55, 55, 48, - 48, 58, 58, 59, 59, 60, 60, 15, 16, 16, - 16, 63, 63, 63, 64, 64, 67, 67, 65, 65, - 69, 69, 41, 41, 50, 50, 53, 53, 53, 52, - 52, 70, 42, 42, 42, 42, 71, 71, 72, 72, - 73, 73, 39, 39, 35, 35, 74, 37, 37, 75, - 36, 36, 38, 38, 49, 49, 49, 61, 61, 77, - 77, 78, 78, 80, 80, 80, 79, 79, 62, 62, - 81, 81, 81, 82, 82, 83, 83, 83, 44, 44, - 84, 84, 84, 45, 45, 85, 85, 86, 86, 66, - 87, 87, 87, 87, 92, 92, 93, 93, 94, 94, - 94, 94, 94, 95, 96, 96, 91, 91, 88, 88, - 90, 90, 98, 98, 97, 97, 97, 97, 97, 97, - 89, 89, 100, 99, 99, 46, 46, 40, 40, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 34, 34, 47, 47, 105, - 105, 106, 106, 106, 106, 112, 101, 101, 108, 108, - 114, 114, 115, 116, 116, 116, 116, 116, 116, 68, - 68, 57, 57, 57, 57, 102, 102, 120, 120, 117, - 117, 121, 121, 121, 121, 103, 103, 103, 107, 107, - 107, 113, 113, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 27, 27, 27, 27, - 27, 27, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 111, 111, 104, 104, - 104, 104, 127, 127, 130, 130, 129, 129, 131, 131, - 51, 51, 51, 51, 133, 133, 132, 132, 132, 132, - 132, 134, 134, 119, 119, 122, 122, 118, 118, 136, - 135, 135, 135, 135, 123, 123, 123, 123, 110, 110, - 124, 124, 124, 124, 76, 137, 137, 138, 138, 138, - 109, 109, 139, 139, 140, 140, 140, 140, 140, 125, - 125, 125, 125, 142, 143, 141, 141, 141, 141, 141, - 141, 141, 144, 144, 144 - ); - - protected $ruleToLength = array( - 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 5, 4, - 3, 4, 2, 3, 1, 1, 7, 6, 3, 1, - 3, 1, 3, 1, 1, 3, 1, 3, 1, 2, - 3, 1, 3, 3, 1, 3, 2, 0, 1, 1, - 1, 1, 1, 3, 5, 8, 3, 5, 9, 3, - 2, 3, 2, 3, 2, 3, 3, 3, 3, 1, - 2, 2, 5, 7, 9, 5, 6, 3, 3, 2, - 2, 1, 1, 1, 0, 2, 8, 0, 4, 1, - 3, 0, 1, 0, 1, 0, 1, 10, 7, 6, - 5, 1, 2, 2, 0, 2, 0, 2, 0, 2, - 1, 3, 1, 4, 1, 4, 1, 1, 4, 1, - 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, - 1, 1, 1, 4, 0, 2, 3, 0, 2, 4, - 0, 2, 0, 3, 1, 2, 1, 1, 0, 1, - 3, 4, 6, 1, 1, 1, 0, 1, 0, 2, - 2, 3, 3, 1, 3, 1, 2, 2, 3, 1, - 1, 2, 4, 3, 1, 1, 3, 2, 0, 1, - 3, 3, 9, 3, 1, 3, 0, 2, 4, 5, - 4, 4, 4, 3, 1, 1, 1, 3, 1, 1, - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 3, 3, 1, 0, 1, 1, - 3, 3, 4, 4, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 1, 3, 5, 4, 3, - 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 1, 1, 3, - 2, 1, 2, 10, 11, 3, 3, 2, 4, 4, - 3, 4, 4, 4, 4, 7, 3, 2, 0, 4, - 1, 3, 2, 2, 4, 6, 2, 2, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 3, 4, 4, 0, 2, 1, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 2, 1, 3, 1, 4, - 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 4, 4, 3, 1, 3, 1, 1, - 3, 3, 0, 2, 0, 1, 3, 1, 3, 1, - 1, 1, 1, 1, 6, 4, 3, 4, 2, 4, - 4, 1, 3, 1, 2, 1, 1, 4, 1, 1, - 3, 6, 4, 4, 4, 4, 1, 4, 0, 1, - 1, 3, 1, 1, 4, 3, 1, 1, 1, 0, - 0, 2, 3, 1, 3, 1, 4, 2, 2, 2, - 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, - 6, 3, 1, 1, 1 - ); - - protected function initReduceCallbacks() { - $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); - }, - 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 3 => function ($stackPos) { - $this->semValue = array(); - }, - 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 88 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 90 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 91 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 92 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 93 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 96 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 97 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); - }, - 98 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 99 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 100 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 101 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 103 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 104 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 105 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 106 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 107 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 108 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 110 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 111 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 112 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 114 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 115 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 118 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 119 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; - }, - 120 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 121 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 122 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 123 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 124 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 125 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 126 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 127 => function ($stackPos) { - $this->semValue = array(); - }, - 128 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 129 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 130 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 131 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 132 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 133 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; - } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if (null === $this->semValue) { $this->semValue = array(); } - } - - }, - 134 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(5-2)], ['stmts' => is_array($this->semStack[$stackPos-(5-3)]) ? $this->semStack[$stackPos-(5-3)] : array($this->semStack[$stackPos-(5-3)]), 'elseifs' => $this->semStack[$stackPos-(5-4)], 'else' => $this->semStack[$stackPos-(5-5)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 135 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(8-2)], ['stmts' => $this->semStack[$stackPos-(8-4)], 'elseifs' => $this->semStack[$stackPos-(8-5)], 'else' => $this->semStack[$stackPos-(8-6)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 136 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 137 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(5-4)], is_array($this->semStack[$stackPos-(5-2)]) ? $this->semStack[$stackPos-(5-2)] : array($this->semStack[$stackPos-(5-2)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 138 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 139 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 140 => function ($stackPos) { - $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 141 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 142 => function ($stackPos) { - $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 143 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 144 => function ($stackPos) { - $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 145 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 146 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 147 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 148 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 149 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 150 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 151 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 152 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 153 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 154 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 155 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 156 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); - }, - 157 => function ($stackPos) { - $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 158 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 161 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ - }, - 162 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 163 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ - }, - 164 => function ($stackPos) { - $this->semValue = array(); - }, - 165 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos-(8-3)]), $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 167 => function ($stackPos) { - $this->semValue = null; - }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 169 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 170 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 171 => function ($stackPos) { - $this->semValue = false; - }, - 172 => function ($stackPos) { - $this->semValue = true; - }, - 173 => function ($stackPos) { - $this->semValue = false; - }, - 174 => function ($stackPos) { - $this->semValue = true; - }, - 175 => function ($stackPos) { - $this->semValue = false; - }, - 176 => function ($stackPos) { - $this->semValue = true; - }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(7-2)); - }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(6-2)); - }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 181 => function ($stackPos) { - $this->semValue = 0; - }, - 182 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 183 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 184 => function ($stackPos) { - $this->semValue = null; - }, - 185 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 186 => function ($stackPos) { - $this->semValue = array(); - }, - 187 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 188 => function ($stackPos) { - $this->semValue = array(); - }, - 189 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 190 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 191 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 192 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 193 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 194 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 195 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 196 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 197 => function ($stackPos) { - $this->semValue = null; - }, - 198 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 199 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 200 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 201 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 202 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 203 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 204 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 205 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 206 => function ($stackPos) { - $this->semValue = array(); - }, - 207 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 208 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 209 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 210 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 212 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 214 => function ($stackPos) { - $this->semValue = array(); - }, - 215 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 216 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 217 => function ($stackPos) { - $this->semValue = array(); - }, - 218 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 219 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 220 => function ($stackPos) { - $this->semValue = null; - }, - 221 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 222 => function ($stackPos) { - $this->semValue = null; - }, - 223 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 224 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 225 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 226 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 228 => function ($stackPos) { - $this->semValue = array(); - }, - 229 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 230 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 231 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 232 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 234 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 235 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 236 => function ($stackPos) { - $this->semValue = null; - }, - 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 238 => function ($stackPos) { - $this->semValue = null; - }, - 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 240 => function ($stackPos) { - $this->semValue = array(); - }, - 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 242 => function ($stackPos) { - $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); - }, - 243 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 244 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 245 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 246 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 247 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 248 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 249 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 250 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 251 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 252 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 253 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 254 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 255 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 256 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 257 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 258 => function ($stackPos) { - $this->semValue = array(); - }, - 259 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 260 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); - }, - 261 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 262 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(9-1)); - }, - 263 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = array(); - }, - 265 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 266 => function ($stackPos) { - $this->semValue = array(); - }, - 267 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 268 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 269 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 270 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 271 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 272 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 274 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 275 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 276 => function ($stackPos) { - $this->semValue = null; - }, - 277 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 278 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 279 => function ($stackPos) { - $this->semValue = 0; - }, - 280 => function ($stackPos) { - $this->semValue = 0; - }, - 281 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 282 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 283 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 284 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; - }, - 285 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; - }, - 286 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; - }, - 287 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; - }, - 288 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 289 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 290 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 291 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 292 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 293 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 294 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 297 => function ($stackPos) { - $this->semValue = array(); - }, - 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 300 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 301 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 302 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 303 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 304 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 305 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 306 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 307 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 310 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 311 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 312 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 313 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 314 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 316 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 317 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 318 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 319 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 320 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 321 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 322 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 323 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 324 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 325 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 326 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 327 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 328 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 329 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 330 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 331 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 332 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 333 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 334 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 335 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 336 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 337 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 341 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 342 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 343 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 344 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 349 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 350 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 351 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 353 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 354 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 355 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 356 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 357 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 358 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 359 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 360 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 361 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 362 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 363 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 364 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 365 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 366 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 367 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 368 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); - }, - 369 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 370 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 371 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 372 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 373 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 374 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); - }, - 375 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 376 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 379 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 380 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 381 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 382 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 384 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); - }, - 385 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 386 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 387 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 388 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 389 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - }, - 390 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 391 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 392 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch(Scalar\String_::fromString($this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 395 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); - $this->checkClass($this->semValue[0], -1); - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 398 => function ($stackPos) { - $this->semValue = array(); - }, - 399 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 400 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 401 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 402 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 403 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 405 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 406 => function ($stackPos) { - $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 411 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 412 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 413 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 414 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 415 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 416 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 417 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 418 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 419 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 420 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 421 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 422 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 423 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 424 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 425 => function ($stackPos) { - $this->semValue = null; - }, - 426 => function ($stackPos) { - $this->semValue = null; - }, - 427 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 428 => function ($stackPos) { - $this->semValue = array(); - }, - 429 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 430 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 431 => function ($stackPos) { - $this->semValue = array(); - }, - 432 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 433 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); - }, - 434 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 435 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, false); - }, - 436 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 437 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 438 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 439 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 440 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 441 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 444 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], false); - }, - 445 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], false); - }, - 446 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 447 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 449 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 451 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 476 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 479 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 480 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 481 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 483 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 484 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 486 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 487 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 488 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 490 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); - }, - 491 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 492 => function ($stackPos) { - $this->semValue = array(); - }, - 493 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 494 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 495 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 496 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 497 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 498 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 499 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 500 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 501 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 504 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 505 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 506 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 507 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 508 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 509 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 510 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 511 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 512 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 513 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 514 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 515 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 517 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 518 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 519 => function ($stackPos) { - $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 520 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 521 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 522 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 523 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 524 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 525 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 526 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 527 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 528 => function ($stackPos) { - $this->semValue = null; - }, - 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 533 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 534 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 535 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 536 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 537 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 538 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 539 => function ($stackPos) { - $this->semValue = null; - }, - 540 => function ($stackPos) { - $this->semValue = array(); - }, - 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 542 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 543 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 544 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 545 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 546 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 547 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 548 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 549 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 550 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 551 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 552 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 553 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 554 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 555 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 556 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 557 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 558 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 559 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 560 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 562 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 563 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - ]; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/lib/nikic/php-parser/lib/PhpParser/Parser/Php7.php deleted file mode 100644 index 71ba0187e..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ /dev/null @@ -1,2829 +0,0 @@ -'", - "T_IS_GREATER_OR_EQUAL", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'.'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_EXIT", - "T_IF", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_LNUMBER", - "T_DNUMBER", - "T_STRING", - "T_STRING_VARNAME", - "T_VARIABLE", - "T_NUM_STRING", - "T_INLINE_HTML", - "T_ENCAPSED_AND_WHITESPACE", - "T_CONSTANT_ENCAPSED_STRING", - "T_ECHO", - "T_DO", - "T_WHILE", - "T_ENDWHILE", - "T_FOR", - "T_ENDFOR", - "T_FOREACH", - "T_ENDFOREACH", - "T_DECLARE", - "T_ENDDECLARE", - "T_AS", - "T_SWITCH", - "T_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "T_USE", - "T_INSTEADOF", - "T_GLOBAL", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", - "T_READONLY", - "T_VAR", - "T_UNSET", - "T_ISSET", - "T_EMPTY", - "T_HALT_COMPILER", - "T_CLASS", - "T_TRAIT", - "T_INTERFACE", - "T_ENUM", - "T_EXTENDS", - "T_IMPLEMENTS", - "T_OBJECT_OPERATOR", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_LIST", - "T_ARRAY", - "T_CALLABLE", - "T_CLASS_C", - "T_TRAIT_C", - "T_METHOD_C", - "T_FUNC_C", - "T_LINE", - "T_FILE", - "T_START_HEREDOC", - "T_END_HEREDOC", - "T_DOLLAR_OPEN_CURLY_BRACES", - "T_CURLY_OPEN", - "T_PAAMAYIM_NEKUDOTAYIM", - "T_NAMESPACE", - "T_NS_C", - "T_DIR", - "T_NS_SEPARATOR", - "T_ELLIPSIS", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "T_ATTRIBUTE", - "';'", - "']'", - "'{'", - "'}'", - "'('", - "')'", - "'`'", - "'\"'", - "'$'" - ); - - protected $tokenToSymbol = array( - 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, - 163, 164, 53, 50, 8, 51, 52, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, - 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 161, 35, 162, 58, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, - 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158 - ); - - protected $action = array( - 132, 133, 134, 568, 135, 136, 0, 721, 722, 723, - 137, 37, 921, 448, 449, 450,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1071, 1072, - 1073, 1070, 1069, 1068, 1074, 715, 714,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 371, 372, 240, 2, 724,-32766,-32766,-32766, 1001, - 1002, 415, 956,-32766,-32766,-32766, 373, 372, 12, 267, - 138, 397, 728, 729, 730, 731, 415,-32766, 421,-32766, - -32766,-32766,-32766,-32766,-32766, 732, 733, 734, 735, 736, - 737, 738, 739, 740, 741, 742, 762, 569, 763, 764, - 765, 766, 754, 755, 337, 338, 757, 758, 743, 744, - 745, 747, 748, 749, 347, 789, 790, 791, 792, 793, - 794, 750, 751, 570, 571, 783, 774, 772, 773, 786, - 769, 770, 284, 421, 572, 573, 768, 574, 575, 576, - 577, 578, 579, 597, -579,-32766,-32766, 797, 771, 580, - 581, -579, 139,-32766,-32766,-32766, 132, 133, 134, 568, - 135, 136, 1020, 721, 722, 723, 137, 37,-32766,-32766, - -32766, 542, 1306, 126,-32766, 1307,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 1071, 1072, 1073, 1070, 1069, 1068, 1074, - 957, 715, 714, -318, 993, 1261,-32766,-32766,-32766, -576, - 106, 107, 108, -268, 270, 890, -576, 910, 1196, 1195, - 1197, 724,-32766,-32766,-32766, 1049, 109,-32766,-32766,-32766, - -32766, 989, 988, 987, 990, 267, 138, 397, 728, 729, - 730, 731, 1233,-32766, 421,-32766,-32766,-32766,-32766, 1001, - 1002, 732, 733, 734, 735, 736, 737, 738, 739, 740, - 741, 742, 762, 569, 763, 764, 765, 766, 754, 755, - 337, 338, 757, 758, 743, 744, 745, 747, 748, 749, - 347, 789, 790, 791, 792, 793, 794, 750, 751, 570, - 571, 783, 774, 772, 773, 786, 769, 770, 880, 321, - 572, 573, 768, 574, 575, 576, 577, 578, 579,-32766, - 82, 83, 84, -579, 771, 580, 581, -579, 148, 746, - 716, 717, 718, 719, 720, 1281, 721, 722, 723, 759, - 760, 36, 1280, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 999, 270, -318, - -32766,-32766,-32766, 456, 457, 81, -193, 808, -576, 1019, - 109, 320, -576, 892, 724, 681, 802, 695, 1001, 1002, - 591,-32766, 1047,-32766,-32766,-32766, 715, 714, 725, 726, - 727, 728, 729, 730, 731, -192, -86, 795, 279, -530, - 284,-32766,-32766,-32766, 732, 733, 734, 735, 736, 737, - 738, 739, 740, 741, 742, 762, 785, 763, 764, 765, - 766, 754, 755, 756, 784, 757, 758, 743, 744, 745, - 747, 748, 749, 788, 789, 790, 791, 792, 793, 794, - 750, 751, 752, 753, 783, 774, 772, 773, 786, 769, - 770, 470, 803, 761, 767, 768, 775, 776, 778, 777, - 779, 780, -86, -530, -530, 637, 25, 771, 782, 781, - 49, 50, 51, 501, 52, 53, 239, 34, -530, 890, - 54, 55, -111, 56, 999, 128,-32766, -111, 1201, -111, - -530, -570, -536, 890, 300, -570, 144, -111, -111, -111, - -111, -111, -111, -111, -111, 1001, 1002, 1001, 1002, 686, - 1201, 925, 926, 1194, 806, 890, 927, 1296, 57, 58, - 799, 253, -193, 687, 59, 807, 60, 246, 247, 61, - 62, 63, 64, 65, 66, 67, 68, 304, 27, 268, - 69, 437, 502, -332, 306, 688, 1227, 1228, 503, 1192, - 806, -192, 318, 890, 1225, 41, 24, 504, 334, 505, - 14, 506, 880, 507, 653, 654, 508, 509, 280, 806, - 281, 43, 44, 438, 368, 367, 880, 45, 510, 35, - 249, 471, 1063, 359, 333, 103, 104, 105, 1196, 1195, - 1197, 806, 511, 512, 513, 335, 801, 1221, 880, 361, - 285, 683, 286, 365, 514, 515, 380, 1215, 1216, 1217, - 1218, 1212, 1213, 292, 433, -111, 715, 714, 434, 1219, - 1214, 149, 400, 1196, 1195, 1197, 293, -153, -153, -153, - -356, 70, -356, 316, 317, 320, 880, 892, -531, 681, - 435, 1048, -153, 707, -153, 293, -153, 1277, -153, 27, - 74, 892, 436, 681, 320, 369, 370, 833, 366, 834, - -529, 806, 382, 812, 11, 1225, 833, 150, 834, -111, - -111, 151, 74, 942, -111, 681, 320, 153, 806, 866, - -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 715, 714, - 374, 375, -531, -531, 890, 154, 805, 155, -4, 890, - 157, 892, -88, 681, -153, 514, 515, -531, 1215, 1216, - 1217, 1218, 1212, 1213, -529, -529, 797, 1108, 1110, -531, - 1219, 1214, 715, 714, 690,-32766, 629, 630, -528, -529, - 32, 1194, 72, 123, 124, 317, 320, 129,-32766,-32766, - -32766, -529,-32766, -535,-32766, 130,-32766, 140, 143,-32766, - 158, 159, 160, 320,-32766,-32766,-32766, 161, -528,-32766, - -32766,-32766, -79, 282, -75, 1194,-32766, 412, -73, 27, - -72, -71,-32766,-32766,-32766,-32766,-32766, 880,-32766, 287, - -32766, 806, 880,-32766, -70, 1225, -69, -68,-32766,-32766, - -32766, -67, -528, -528,-32766,-32766, -66, 141, -47, -18, - -32766, 412, 147, 320, 366, 73, 428, -528, 271,-32766, - 278, 291, -51, 696, 699, -111, -111, 1201, -533, -528, - -111, 889, -528, -528, 48, 825, -111, -111, -111, -111, - 146, 327, 283, 270, 288, 109, 515, -528, 1215, 1216, - 1217, 1218, 1212, 1213, 131, 906, 661, -16, 9, -528, - 1219, 1214, 892, 797, 681,-32766, 145, 892, 1308, 681, - -4, 1194, 72,-32766, 638, 317, 320, 806,-32766,-32766, - -32766, 1078,-32766, 544,-32766, 627,-32766, 13, 656,-32766, - 548, 298, -533, -533,-32766,-32766,-32766,-32766, 296, 297, - -32766,-32766, 674, 1194, 643, 890,-32766, 412, 806, 453, - -32766,-32766,-32766, 364,-32766,-32766,-32766, 481,-32766, -533, - -32766,-32766, 47, -494, 890, 127,-32766,-32766,-32766,-32766, - 644, 657,-32766,-32766, 305, 1194, 890, 805,-32766, 412, - 1222, 301,-32766,-32766,-32766, 0,-32766,-32766,-32766, 432, - -32766, 299, 922,-32766, -111, 293, 554, 476,-32766,-32766, - -32766,-32766, 1232, -484,-32766,-32766, 697, 1194, 560, 908, - -32766, 412, 595, 817,-32766,-32766,-32766, 7,-32766,-32766, - -32766, 1234,-32766, 16, 293,-32766, 294, 295, 880, 74, - -32766,-32766,-32766, 320, 363, 39,-32766,-32766, 40, 704, - 705, 871,-32766, 412, -246, -246, -246, 880, 966, 943, - 366,-32766, 950, 125, 1247, 940, 951, 869, 938, 880, - 1052, -111, -111, -245, -245, -245, -111, 1055, 1056, 366, - 1053, 866, -111, -111, -111, -111, 1054, 1060, 701, 1265, - -111, -111, 1299, 632, -564, -111, 33, 315, -271, 362, - 866, -111, -111, -111, -111, 682, 685, 689, 691, 692, - 693, 694,-32766, 892, 698, 681, -246, 684, 1194, 867, - 1303, 1305, 828, 827, 836,-32766,-32766,-32766, 915,-32766, - 958,-32766, 892,-32766, 681, -245,-32766, 835, 1304, 914, - 916,-32766,-32766,-32766, 892, 913, 681,-32766,-32766, 1180, - 899, 909, 897,-32766, 412, 948, 949, 1302, 1259, 1248, - 1266, 1272,-32766, 1275, -269, -562, -536, -535, -534, 1, - 28, 29, 38, 42, 46, 71, 75, 76, 77, 78, - 79, 80, 142, 152, 156, 245, 322, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 360, 429, - 0, -268, 0, 18, 19, 20, 21, 23, 399, 472, - 473, 480, 483, 484, 485, 486, 490, 491, 492, 499, - 668, 1205, 1148, 1223, 1022, 1021, 1184, -273, -103, 17, - 22, 26, 290, 398, 588, 592, 619, 673, 1152, 1200, - 1149, 1278, 0, -498, 1165, 0, 1226, 0, 320 - ); - - protected $actionCheck = array( - 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 128, 129, 130, 131, 9, 10, 11, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 106, 107, 14, 8, 57, 9, 10, 11, 137, - 138, 116, 31, 9, 10, 11, 106, 107, 8, 71, - 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, - 33, 34, 35, 36, 30, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 30, 80, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 51, 1, 9, 10, 80, 150, 151, - 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, - 6, 7, 164, 9, 10, 11, 12, 13, 9, 10, - 11, 85, 80, 14, 30, 83, 32, 33, 34, 35, - 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, - 159, 37, 38, 8, 1, 1, 9, 10, 11, 1, - 53, 54, 55, 164, 57, 1, 8, 1, 155, 156, - 157, 57, 9, 10, 11, 162, 69, 30, 116, 32, - 33, 119, 120, 121, 122, 71, 72, 73, 74, 75, - 76, 77, 146, 30, 80, 32, 33, 34, 35, 137, - 138, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 84, 70, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 9, - 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, - 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, - 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 116, 57, 164, - 9, 10, 11, 134, 135, 161, 8, 1, 160, 1, - 69, 167, 164, 159, 57, 161, 80, 161, 137, 138, - 1, 30, 1, 32, 33, 34, 37, 38, 71, 72, - 73, 74, 75, 76, 77, 8, 31, 80, 30, 70, - 30, 9, 10, 11, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 31, 156, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 97, 134, 135, 75, 76, 150, 151, 152, - 2, 3, 4, 5, 6, 7, 97, 8, 149, 1, - 12, 13, 101, 15, 116, 8, 116, 106, 1, 108, - 161, 160, 163, 1, 113, 164, 8, 116, 117, 118, - 119, 120, 121, 122, 123, 137, 138, 137, 138, 31, - 1, 117, 118, 80, 82, 1, 122, 85, 50, 51, - 80, 8, 164, 31, 56, 159, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 8, 70, 71, - 72, 73, 74, 162, 8, 31, 78, 79, 80, 116, - 82, 164, 8, 1, 86, 87, 88, 89, 8, 91, - 101, 93, 84, 95, 75, 76, 98, 99, 35, 82, - 37, 103, 104, 105, 106, 107, 84, 109, 110, 147, - 148, 161, 123, 115, 116, 50, 51, 52, 155, 156, - 157, 82, 124, 125, 126, 8, 156, 1, 84, 8, - 35, 161, 37, 8, 136, 137, 8, 139, 140, 141, - 142, 143, 144, 145, 8, 128, 37, 38, 8, 151, - 152, 101, 102, 155, 156, 157, 158, 75, 76, 77, - 106, 163, 108, 165, 166, 167, 84, 159, 70, 161, - 8, 159, 90, 161, 92, 158, 94, 1, 96, 70, - 163, 159, 8, 161, 167, 106, 107, 106, 106, 108, - 70, 82, 106, 8, 108, 86, 106, 14, 108, 117, - 118, 14, 163, 159, 122, 161, 167, 14, 82, 127, - 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 37, 38, - 106, 107, 134, 135, 1, 14, 155, 14, 0, 1, - 14, 159, 31, 161, 162, 136, 137, 149, 139, 140, - 141, 142, 143, 144, 134, 135, 80, 59, 60, 161, - 151, 152, 37, 38, 31, 74, 111, 112, 70, 149, - 14, 80, 163, 16, 16, 166, 167, 16, 87, 88, - 89, 161, 91, 163, 93, 16, 95, 161, 16, 98, - 16, 16, 16, 167, 103, 104, 105, 16, 70, 74, - 109, 110, 31, 35, 31, 80, 115, 116, 31, 70, - 31, 31, 87, 88, 89, 124, 91, 84, 93, 35, - 95, 82, 84, 98, 31, 86, 31, 31, 103, 104, - 105, 31, 134, 135, 109, 110, 31, 161, 31, 31, - 115, 116, 31, 167, 106, 154, 108, 149, 31, 124, - 31, 113, 31, 31, 31, 117, 118, 1, 70, 161, - 122, 31, 134, 135, 70, 127, 128, 129, 130, 131, - 31, 35, 37, 57, 37, 69, 137, 149, 139, 140, - 141, 142, 143, 144, 31, 38, 77, 31, 150, 161, - 151, 152, 159, 80, 161, 74, 70, 159, 83, 161, - 162, 80, 163, 85, 90, 166, 167, 82, 87, 88, - 89, 82, 91, 85, 93, 113, 95, 97, 94, 98, - 89, 132, 134, 135, 103, 104, 105, 74, 134, 135, - 109, 110, 92, 80, 96, 1, 115, 116, 82, 97, - 87, 88, 89, 149, 91, 124, 93, 97, 95, 161, - 116, 98, 70, 149, 1, 161, 103, 104, 105, 74, - 100, 100, 109, 110, 132, 80, 1, 155, 115, 116, - 160, 114, 87, 88, 89, -1, 91, 124, 93, 128, - 95, 133, 128, 98, 128, 158, 153, 102, 103, 104, - 105, 74, 146, 149, 109, 110, 31, 80, 81, 154, - 115, 116, 153, 160, 87, 88, 89, 149, 91, 124, - 93, 146, 95, 149, 158, 98, 134, 135, 84, 163, - 103, 104, 105, 167, 149, 159, 109, 110, 159, 159, - 159, 159, 115, 116, 100, 101, 102, 84, 159, 159, - 106, 124, 159, 161, 160, 159, 159, 159, 159, 84, - 159, 117, 118, 100, 101, 102, 122, 159, 159, 106, - 159, 127, 128, 129, 130, 131, 159, 159, 162, 160, - 117, 118, 160, 160, 163, 122, 161, 161, 164, 161, - 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, - 161, 161, 74, 159, 161, 161, 162, 161, 80, 162, - 162, 162, 162, 162, 162, 87, 88, 89, 162, 91, - 162, 93, 159, 95, 161, 162, 98, 162, 162, 162, - 162, 103, 104, 105, 159, 162, 161, 109, 110, 162, - 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, - 162, 162, 124, 162, 164, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - -1, 164, -1, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, -1, 165, 165, -1, 166, -1, 167 - ); - - protected $actionBase = array( - 0, -2, 154, 542, 698, 894, 913, 586, 53, 430, - 867, 307, 307, 67, 307, 307, 307, 482, 693, 693, - 925, 693, 468, 504, 204, 204, 204, 651, 651, 651, - 651, 685, 685, 845, 845, 877, 813, 781, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 356, 31, 369, 716, 1008, 1014, 1010, 1015, - 1006, 1005, 1009, 1011, 1016, 935, 936, 799, 937, 938, - 939, 941, 1012, 873, 1007, 1013, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 290, 159, 136, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 54, 54, 54, 187, 569, - 569, 341, 203, 658, 47, 699, 699, 699, 699, 699, - 699, 699, 699, 699, 699, 144, 144, 7, 7, 7, - 7, 7, 371, -25, -25, -25, -25, 816, 477, 102, - 499, 358, 449, 514, 525, 525, 360, -116, 231, 231, - 231, 231, 231, 231, -78, -78, -78, -78, -78, 319, - 580, 541, 86, 423, 636, 636, 636, 636, 423, 423, - 423, 423, 825, 1020, 423, 423, 423, 558, 688, 688, - 754, 147, 147, 147, 688, 550, 788, 422, 550, 422, - 194, 92, 794, -55, -40, 321, 814, 794, 748, 842, - 198, 143, 772, 539, 772, 1004, 778, 767, 733, 868, - 896, 1017, 820, 933, 821, 934, 219, 731, 1003, 1003, - 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1021, - 339, 1004, 286, 1021, 1021, 1021, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 615, 286, 380, 479, - 286, 796, 339, 356, 804, 356, 356, 356, 356, 964, - 356, 356, 356, 356, 356, 356, 969, 768, 410, 356, - 31, 206, 206, 472, 193, 206, 206, 206, 206, 356, - 356, 356, 539, 776, 793, 584, 809, 377, 776, 776, - 776, 355, 185, 39, 348, 555, 523, 546, 773, 773, - 789, 946, 946, 773, 785, 773, 789, 951, 773, 946, - 787, 467, 596, 540, 585, 600, 946, 519, 773, 773, - 773, 773, 622, 773, 503, 478, 773, 773, 749, 779, - 792, 46, 946, 946, 946, 792, 581, 808, 808, 808, - 830, 831, 762, 777, 534, 526, 645, 459, 807, 777, - 777, 773, 588, 762, 777, 762, 777, 805, 777, 777, - 777, 762, 777, 785, 577, 777, 734, 634, 60, 777, - 6, 952, 953, 671, 954, 949, 955, 976, 956, 957, - 884, 962, 950, 958, 948, 947, 790, 717, 718, 818, - 764, 945, 766, 766, 766, 943, 766, 766, 766, 766, - 766, 766, 766, 766, 717, 770, 835, 811, 791, 965, - 721, 729, 806, 897, 1018, 1019, 964, 997, 959, 826, - 732, 983, 966, 866, 876, 967, 968, 984, 998, 999, - 898, 786, 899, 900, 803, 970, 885, 766, 952, 957, - 950, 958, 948, 947, 765, 760, 755, 756, 753, 740, - 737, 739, 771, 1000, 942, 871, 844, 969, 944, 717, - 869, 979, 875, 985, 986, 878, 802, 775, 872, 901, - 971, 972, 973, 886, 1001, 829, 980, 874, 987, 810, - 902, 988, 989, 990, 991, 906, 887, 888, 889, 832, - 774, 940, 798, 908, 643, 744, 797, 975, 647, 963, - 890, 915, 916, 992, 993, 994, 917, 960, 839, 981, - 784, 982, 977, 840, 843, 653, 728, 795, 681, 683, - 918, 923, 927, 961, 782, 769, 846, 847, 1002, 928, - 686, 848, 735, 929, 996, 736, 741, 800, 893, 824, - 817, 780, 974, 783, 849, 930, 851, 858, 859, 995, - 861, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 458, 458, 458, 458, 458, 458, 307, 307, 307, 307, - 0, 0, 307, 0, 0, 0, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, - 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, - 291, 787, 147, 147, 147, 147, 423, 423, 423, 423, - 423, -88, -88, 147, 147, 423, 384, 423, 423, 423, - 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, - 286, 422, 0, 785, 785, 785, 785, 0, 0, 0, - 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 286, 422, 0, 286, 0, 785, - 785, 423, 787, 787, 314, 384, 423, 0, 0, 0, - 0, 286, 785, 286, 339, 422, 339, 339, 206, 356, - 314, 510, 510, 510, 510, 0, 539, 787, 787, 787, - 787, 787, 787, 787, 787, 787, 787, 787, 785, 0, - 787, 0, 785, 785, 785, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 785, 0, 0, 946, 0, 0, 0, 0, 773, 0, - 0, 0, 0, 0, 0, 773, 951, 0, 0, 0, - 0, 0, 0, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 766, 802, 0, 802, 0, 766, 766, 766 - ); - - protected $actionDefault = array( - 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 582, 582, 582, - 582,32767,32767, 250, 103,32767,32767, 458, 376, 376, - 376,32767,32767, 526, 526, 526, 526, 526, 526,32767, - 32767,32767,32767,32767,32767, 458,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 314, - 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 575,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 462, 441, 442, 444, - 445, 375, 527, 581, 317, 578, 374, 146, 329, 319, - 238, 320, 254, 463, 255, 464, 467, 468, 211, 283, - 371, 150, 405, 459, 407, 457, 461, 406, 381, 386, - 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, - 397, 398, 379, 380, 460, 438, 437, 436, 403,32767, - 32767, 404, 408, 378, 411,32767,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 409, 410, 427, 428, 425, - 426, 429,32767, 430, 431, 432, 433,32767,32767, 306, - 32767,32767, 355, 353, 418, 419, 306,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 520, - 435,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 103,32767, 101, 522, 400, 402, - 490, 413, 414, 412, 382,32767, 497,32767, 103, 499, - 32767,32767,32767, 112,32767,32767,32767,32767, 521,32767, - 528, 528,32767, 483, 101, 194,32767, 194, 194,32767, - 32767,32767,32767,32767,32767,32767, 589, 483, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, - 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 189,32767, 264, 266, - 103, 543, 194,32767, 502,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 495,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 483, 423, 139,32767, 139, 528, 415, 416, - 417, 485, 528, 528, 528, 302, 285,32767,32767,32767, - 32767, 500, 500, 101, 101, 101, 101, 495,32767,32767, - 112, 100, 100, 100, 100, 100, 104, 102,32767,32767, - 32767,32767, 100,32767, 102, 102,32767,32767, 221, 208, - 219, 102,32767, 547, 548, 219, 102, 223, 223, 223, - 243, 243, 474, 308, 102, 100, 102, 102, 196, 308, - 308,32767, 102, 474, 308, 474, 308, 198, 308, 308, - 308, 474, 308,32767, 102, 308, 210, 100, 100, 308, - 32767,32767,32767, 485,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 515,32767, - 532, 545, 421, 422, 424, 530, 446, 447, 448, 449, - 450, 451, 452, 454, 577,32767, 489,32767,32767,32767, - 32767, 328, 587,32767, 587,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 588,32767, 528,32767,32767,32767,32767, 420, 9, 76, - 43, 44, 52, 58, 506, 507, 508, 509, 503, 504, - 510, 505,32767,32767, 511, 553,32767,32767, 529, 580, - 32767,32767,32767,32767,32767,32767, 139,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 515,32767, 137, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 528,32767,32767,32767, 304, 305,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 528,32767,32767,32767, 287, 288,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 282,32767,32767, 370,32767,32767,32767,32767, - 349,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 152, 152, 3, 3, 331, 152, 152, 152, 331, - 152, 331, 331, 331, 152, 152, 152, 152, 152, 152, - 276, 184, 258, 261, 243, 243, 152, 341, 152 - ); - - protected $goto = array( - 194, 194, 669, 423, 642, 883, 839, 884, 1025, 417, - 308, 309, 330, 562, 314, 422, 331, 424, 621, 823, - 677, 851, 824, 585, 838, 857, 165, 165, 165, 165, - 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, - 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 522, 523, 413, 524, - 526, 527, 528, 529, 530, 531, 532, 533, 1094, 166, - 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, - 176, 212, 214, 217, 235, 238, 241, 242, 244, 255, - 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 275, 311, 312, 313, 418, 419, 420, 567, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1094, 199, 180, - 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, - 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 323, 323, 323, 323, 826, 607, 607, 800, 546, - 539, 1189, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1242, 1242, 343, 464, 1267, 1268, 1242, 1242, - 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 389, 539, - 546, 555, 556, 396, 565, 587, 601, 602, 831, 798, - 879, 874, 875, 888, 15, 832, 876, 829, 877, 878, - 830, 455, 455, 941, 882, 804, 1190, 251, 251, 559, - 455, 1240, 1240, 814, 1046, 1042, 1043, 1240, 1240, 1240, - 1240, 1240, 1240, 1240, 1240, 1240, 1240, 605, 639, 1191, - 1250, 1251, 341, 248, 248, 248, 248, 250, 252, 819, - 819, 1193, 1193, 1000, 1193, 1000, 804, 416, 804, 596, - 1000, 1282, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, - 1000, 1000, 1000, 1264, 1264, 962, 1264, 1193, 488, 5, - 489, 6, 1193, 1193, 1193, 1193, 495, 385, 1193, 1193, - 1193, 1274, 1274, 1274, 1274, 277, 277, 277, 277, 558, - 1276, 1276, 1276, 1276, 1066, 1067, 895, 346, 553, 319, - 303, 896, 703, 620, 622, 641, 640, 346, 346, 1143, - 659, 663, 976, 667, 675, 972, 1260, 430, 1292, 1292, - 332, 346, 346, 816, 346, 636, 1309, 650, 651, 652, - 844, 536, 536, 924, 536, 1292, 525, 525, 541, 1269, - 1270, 346, 525, 525, 525, 525, 525, 525, 525, 525, - 525, 525, 1295, 617, 618, 1033, 819, 446, 395, 1262, - 1262, 1033, 935, 935, 935, 935, 563, 599, 446, 929, - 936, 933, 403, 676, 822, 1186, 552, 534, 534, 534, - 534, 841, 589, 600, 984, 1031, 1253, 965, 939, 939, - 937, 939, 702, 465, 538, 974, 969, 344, 345, 706, - 440, 900, 1082, 853, 946, 440, 440, 1035, 604, 662, - 469, 1293, 1293, 981, 1077, 540, 550, 0, 0, 0, - 540, 843, 550, 645, 960, 388, 1174, 911, 1293, 837, - 1175, 1178, 912, 1179, 0, 566, 458, 459, 460, 541, - 849, 1185, 0, 1300, 1301, 254, 254, 401, 402, 0, - 0, 0, 648, 0, 649, 0, 405, 406, 407, 0, - 660, 0, 0, 408, 0, 0, 0, 339, 847, 594, - 608, 611, 612, 613, 614, 633, 634, 635, 679, 918, - 995, 1003, 1007, 1004, 1008, 0, 440, 440, 440, 440, - 440, 440, 440, 440, 440, 440, 440, 0, 1188, 440, - 852, 840, 1030, 1034, 584, 1059, 0, 680, 666, 666, - 944, 496, 672, 1057, 387, 391, 547, 586, 590, 425, - 0, 0, 0, 0, 0, 0, 425, 0, 0, 0, - 0, 0, 0, 934, 1012, 1005, 1009, 1006, 1010, 0, - 0, 0, 0, 0, 272, 0, 0, 0, 0, 537, - 537, 0, 0, 0, 0, 1075, 856, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 979, - 979 - ); - - protected $gotoCheck = array( - 42, 42, 72, 65, 65, 64, 35, 64, 121, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 26, - 9, 35, 27, 124, 35, 45, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 106, 106, 7, 75, - 75, 20, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 162, 162, 95, 168, 168, 168, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 15, 6, - 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, - 15, 143, 143, 49, 15, 12, 20, 5, 5, 164, - 143, 163, 163, 20, 15, 15, 15, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 55, 55, 20, - 20, 20, 171, 5, 5, 5, 5, 5, 5, 22, - 22, 72, 72, 72, 72, 72, 12, 13, 12, 13, - 72, 173, 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 124, 124, 101, 124, 72, 149, 46, - 149, 46, 72, 72, 72, 72, 149, 61, 72, 72, - 72, 9, 9, 9, 9, 24, 24, 24, 24, 102, - 124, 124, 124, 124, 138, 138, 72, 14, 48, 161, - 161, 72, 48, 48, 48, 63, 48, 14, 14, 145, - 48, 48, 48, 48, 48, 48, 124, 111, 174, 174, - 29, 14, 14, 18, 14, 84, 14, 84, 84, 84, - 39, 19, 19, 90, 19, 174, 165, 165, 14, 170, - 170, 14, 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 174, 83, 83, 124, 22, 19, 28, 124, - 124, 124, 19, 19, 19, 19, 2, 2, 19, 19, - 19, 91, 91, 91, 25, 154, 9, 105, 105, 105, - 105, 37, 105, 9, 108, 123, 14, 25, 25, 25, - 25, 25, 25, 151, 25, 25, 25, 95, 95, 97, - 23, 17, 17, 41, 94, 23, 23, 126, 17, 14, - 82, 175, 175, 17, 141, 9, 9, -1, -1, -1, - 9, 17, 9, 17, 17, 9, 78, 78, 175, 17, - 78, 78, 78, 78, -1, 9, 9, 9, 9, 14, - 9, 17, -1, 9, 9, 5, 5, 80, 80, -1, - -1, -1, 80, -1, 80, -1, 80, 80, 80, -1, - 80, -1, -1, 80, -1, -1, -1, 80, 9, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 87, - 87, 87, 87, 87, 87, -1, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, -1, 14, 23, - 16, 16, 16, 16, 8, 8, -1, 8, 8, 8, - 16, 8, 8, 8, 58, 58, 58, 58, 58, 115, - -1, -1, -1, -1, -1, -1, 115, -1, -1, -1, - -1, -1, -1, 16, 115, 115, 115, 115, 115, -1, - -1, -1, -1, -1, 24, -1, -1, -1, -1, 24, - 24, -1, -1, -1, -1, 16, 16, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 105, - 105 - ); - - protected $gotoBase = array( - 0, 0, -297, 0, 0, 226, 196, 159, 517, 7, - 0, 0, -66, -65, 25, -175, 78, -33, 39, 84, - -213, 0, -64, 158, 302, 390, 15, 18, 46, 49, - 0, 0, 0, 0, 0, -356, 0, 67, 0, 32, - 0, -10, -1, 0, 0, 13, -417, 0, -364, 200, - 0, 0, 0, 0, 0, 208, 0, 0, 490, 0, - 0, 256, 0, 85, -14, -236, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -168, 0, 0, 45, 140, - -12, 0, -35, -95, -344, 0, 0, 221, 0, 0, - 27, 92, 0, 0, -11, -287, 0, 19, 0, 0, - 0, 251, 267, 0, 0, 370, -73, 0, 43, 0, - 0, 61, 0, 0, 0, 270, 0, 0, 0, 0, - 0, 6, 0, 40, 16, 0, -7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, - 0, -2, 0, 188, 0, 59, 0, 0, 0, -195, - 0, -19, 0, 0, 35, 0, 0, 0, 0, 0, - 0, 3, -57, -8, 201, 117, 0, 0, -110, 0, - -4, 223, 0, 241, 36, 129, 0, 0 - ); - - protected $gotoDefault = array( - -32768, 500, 710, 4, 711, 904, 787, 796, 582, 516, - 678, 340, 609, 414, 1258, 881, 1081, 564, 815, 1202, - 1210, 447, 818, 324, 700, 863, 864, 865, 392, 377, - 383, 390, 631, 610, 482, 850, 443, 842, 474, 845, - 442, 854, 162, 411, 498, 858, 3, 860, 543, 891, - 378, 868, 379, 655, 870, 549, 872, 873, 386, 393, - 394, 1086, 557, 606, 885, 243, 551, 886, 376, 887, - 894, 381, 384, 664, 454, 493, 487, 404, 1061, 593, - 628, 451, 468, 616, 615, 603, 467, 426, 409, 326, - 923, 931, 475, 452, 945, 342, 953, 708, 1093, 623, - 477, 961, 624, 968, 971, 517, 518, 466, 983, 269, - 986, 478, 1018, 646, 647, 998, 625, 626, 1016, 461, - 583, 1024, 444, 1032, 1246, 445, 1036, 262, 1039, 276, - 410, 427, 1044, 1045, 8, 1051, 670, 671, 10, 273, - 497, 1076, 665, 441, 1092, 431, 1162, 1164, 545, 479, - 1182, 1181, 658, 494, 1187, 1249, 439, 519, 462, 310, - 520, 302, 328, 307, 535, 289, 329, 521, 463, 1255, - 1263, 325, 30, 1283, 1294, 336, 561, 598 - ); - - protected $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, - 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, - 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, - 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, - 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, - 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, - 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, - 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, - 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, - 88, 88, 81, 81, 89, 89, 90, 90, 90, 82, - 82, 85, 85, 83, 83, 91, 92, 92, 56, 56, - 64, 64, 67, 67, 67, 66, 93, 93, 94, 57, - 57, 57, 57, 95, 95, 96, 96, 97, 97, 98, - 99, 99, 100, 100, 101, 101, 54, 54, 50, 50, - 103, 52, 52, 104, 51, 51, 53, 53, 63, 63, - 63, 63, 79, 79, 107, 107, 109, 109, 110, 110, - 110, 110, 108, 108, 108, 112, 112, 112, 112, 87, - 87, 115, 115, 115, 113, 113, 116, 116, 114, 114, - 117, 117, 118, 118, 118, 118, 111, 111, 80, 80, - 80, 20, 20, 20, 120, 119, 119, 121, 121, 121, - 121, 59, 122, 122, 123, 60, 125, 125, 126, 126, - 127, 127, 84, 128, 128, 128, 128, 128, 128, 133, - 133, 134, 134, 135, 135, 135, 135, 135, 136, 137, - 137, 132, 132, 129, 129, 131, 131, 139, 139, 138, - 138, 138, 138, 138, 138, 138, 130, 140, 140, 142, - 141, 141, 61, 102, 143, 143, 55, 55, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 150, 144, 144, 149, 149, 152, 153, 153, 154, - 155, 155, 155, 19, 19, 72, 72, 72, 72, 145, - 145, 145, 145, 157, 157, 146, 146, 148, 148, 148, - 151, 151, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 163, 163, 106, 165, 165, 165, 165, 147, 147, - 147, 147, 147, 147, 147, 147, 58, 58, 160, 160, - 160, 160, 166, 166, 156, 156, 156, 167, 167, 167, - 167, 167, 167, 73, 73, 65, 65, 65, 65, 124, - 124, 124, 124, 170, 169, 159, 159, 159, 159, 159, - 159, 159, 158, 158, 158, 168, 168, 168, 168, 105, - 164, 172, 172, 171, 171, 173, 173, 173, 173, 173, - 173, 173, 173, 161, 161, 161, 161, 175, 176, 174, - 174, 174, 174, 174, 174, 174, 174, 177, 177, 177, - 177 - ); - - protected $ruleToLength = array( - 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, - 2, 0, 1, 1, 1, 1, 1, 3, 5, 4, - 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, - 3, 2, 0, 1, 1, 1, 1, 1, 3, 7, - 10, 5, 7, 9, 5, 3, 3, 3, 3, 3, - 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, - 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, - 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, - 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, - 0, 2, 1, 2, 1, 2, 1, 1, 1, 0, - 2, 0, 2, 0, 2, 2, 1, 3, 1, 4, - 1, 4, 1, 1, 4, 2, 1, 3, 3, 3, - 4, 4, 5, 0, 2, 4, 3, 1, 1, 7, - 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, - 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, - 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, - 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 2, 1, 1, 0, 1, 0, 2, - 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, - 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, - 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, - 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 1, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 4, 3, 4, - 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 2, 1, 2, - 4, 2, 2, 8, 9, 8, 9, 9, 10, 9, - 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, - 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 3, 3, 4, 1, 1, 3, 1, 1, - 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, - 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, - 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, - 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, - 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, - 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, - 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, - 1 - ); - - protected function initReduceCallbacks() { - $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); - }, - 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 3 => function ($stackPos) { - $this->semValue = array(); - }, - 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 85 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 89 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 94 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 96 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 97 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 98 => function ($stackPos) { - /* nothing */ - }, - 99 => function ($stackPos) { - /* nothing */ - }, - 100 => function ($stackPos) { - /* nothing */ - }, - 101 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 103 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 105 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 106 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 107 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 108 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 110 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 111 => function ($stackPos) { - $this->semValue = []; - }, - 112 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 114 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 115 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); - }, - 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 119 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 121 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 122 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 123 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 124 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 125 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 127 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 128 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 129 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 130 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 131 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 132 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 133 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 134 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 135 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 136 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 137 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 138 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 139 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 140 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 141 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 142 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; - }, - 143 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 144 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 145 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 146 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 147 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 148 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 149 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 150 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 151 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 152 => function ($stackPos) { - $this->semValue = array(); - }, - 153 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 154 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 155 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 156 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 157 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 158 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; - } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if (null === $this->semValue) { $this->semValue = array(); } - } - - }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 161 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 163 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 164 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 165 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 167 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 169 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 170 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 171 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 172 => function ($stackPos) { - - $e = $this->semStack[$stackPos-(2-1)]; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $this->semValue = new Stmt\Throw_($e->expr, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - } else { - $this->semValue = new Stmt\Expression($e, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - } - - }, - 173 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 174 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); - }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 181 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ - }, - 182 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 183 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ - }, - 184 => function ($stackPos) { - $this->semValue = array(); - }, - 185 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 186 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 187 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 188 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 189 => function ($stackPos) { - $this->semValue = null; - }, - 190 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 191 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 192 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 193 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 194 => function ($stackPos) { - $this->semValue = false; - }, - 195 => function ($stackPos) { - $this->semValue = true; - }, - 196 => function ($stackPos) { - $this->semValue = false; - }, - 197 => function ($stackPos) { - $this->semValue = true; - }, - 198 => function ($stackPos) { - $this->semValue = false; - }, - 199 => function ($stackPos) { - $this->semValue = true; - }, - 200 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 201 => function ($stackPos) { - $this->semValue = []; - }, - 202 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 203 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 204 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(8-3)); - }, - 205 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(7-3)); - }, - 206 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 207 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkEnum($this->semValue, $stackPos-(8-3)); - }, - 208 => function ($stackPos) { - $this->semValue = null; - }, - 209 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 210 => function ($stackPos) { - $this->semValue = null; - }, - 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 212 => function ($stackPos) { - $this->semValue = 0; - }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 214 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 215 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 216 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 217 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 218 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; - }, - 219 => function ($stackPos) { - $this->semValue = null; - }, - 220 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 221 => function ($stackPos) { - $this->semValue = array(); - }, - 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 223 => function ($stackPos) { - $this->semValue = array(); - }, - 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 226 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 227 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 228 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 229 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 230 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 232 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 233 => function ($stackPos) { - $this->semValue = null; - }, - 234 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 236 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 237 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 238 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 240 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 243 => function ($stackPos) { - $this->semValue = array(); - }, - 244 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 245 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 246 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 247 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 248 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 249 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 250 => function ($stackPos) { - $this->semValue = []; - }, - 251 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 252 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 253 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 254 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 255 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 256 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 257 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 258 => function ($stackPos) { - $this->semValue = array(); - }, - 259 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 260 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 261 => function ($stackPos) { - $this->semValue = array(); - }, - 262 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = null; - }, - 265 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 266 => function ($stackPos) { - $this->semValue = null; - }, - 267 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 268 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 269 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 270 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 271 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 272 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 273 => function ($stackPos) { - $this->semValue = array(); - }, - 274 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 275 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 276 => function ($stackPos) { - $this->semValue = 0; - }, - 277 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 278 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; - }, - 279 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; - }, - 280 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; - }, - 281 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; - }, - 282 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); - }, - 283 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); - }, - 284 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - }, - 285 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 286 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 287 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 288 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 289 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 290 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 291 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); - }, - 292 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 293 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 294 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 297 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 298 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 299 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 300 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 301 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 302 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 303 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 304 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 305 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 306 => function ($stackPos) { - $this->semValue = null; - }, - 307 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 308 => function ($stackPos) { - $this->semValue = null; - }, - 309 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 310 => function ($stackPos) { - $this->semValue = null; - }, - 311 => function ($stackPos) { - $this->semValue = array(); - }, - 312 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 313 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); - }, - 314 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 316 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 317 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 318 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 319 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 320 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); - }, - 321 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 322 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 324 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 325 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 326 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 327 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 328 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 329 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 330 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 331 => function ($stackPos) { - $this->semValue = array(); - }, - 332 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 333 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); - }, - 334 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); - }, - 335 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); - }, - 336 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 337 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 338 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ - }, - 339 => function ($stackPos) { - $this->semValue = array(); - }, - 340 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 341 => function ($stackPos) { - $this->semValue = array(); - }, - 342 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 343 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 344 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 345 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 346 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 347 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 348 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 349 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 350 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 351 => function ($stackPos) { - $this->semValue = null; - }, - 352 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 354 => function ($stackPos) { - $this->semValue = 0; - }, - 355 => function ($stackPos) { - $this->semValue = 0; - }, - 356 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 357 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 358 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 359 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; - }, - 360 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; - }, - 361 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; - }, - 362 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; - }, - 363 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 364 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 365 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; - }, - 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 367 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 368 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 369 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 370 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 371 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 372 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 373 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 374 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 375 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 376 => function ($stackPos) { - $this->semValue = array(); - }, - 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 379 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 380 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 381 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 382 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 384 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 385 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 386 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 387 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 388 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 389 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 390 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 391 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 392 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 395 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 399 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 400 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 401 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 402 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 403 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 421 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 422 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 423 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 424 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 433 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 434 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 435 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 436 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 437 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 439 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 440 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 441 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 444 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 445 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 446 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 447 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 449 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 451 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 471 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = array(); - }, - 475 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 477 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 478 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 479 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 480 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 481 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 483 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 484 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 485 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 486 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 487 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 488 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 490 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 491 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 492 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 493 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 494 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 495 => function ($stackPos) { - $this->semValue = null; - }, - 496 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 497 => function ($stackPos) { - $this->semValue = array(); - }, - 498 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 499 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 500 => function ($stackPos) { - $this->semValue = array(); - }, - 501 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 502 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 503 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 504 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 505 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 506 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 507 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 508 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 509 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 510 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 511 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 512 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; - }, - 513 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 514 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - }, - 515 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 516 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 517 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); - }, - 518 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 519 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 520 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 521 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 523 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 524 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); - }, - 525 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 526 => function ($stackPos) { - $this->semValue = null; - }, - 527 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 528 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 534 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 537 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 538 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 539 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 540 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 541 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 542 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 543 => function ($stackPos) { - $this->semValue = null; - }, - 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 546 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 547 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 548 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 550 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 551 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 552 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; - }, - 553 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 554 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 555 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 556 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 557 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 558 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 559 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 560 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 561 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 565 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 566 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 568 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 569 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 570 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); - }, - 571 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 572 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ - }, - 573 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 574 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 575 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 576 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 578 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 579 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 580 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 581 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 582 => function ($stackPos) { - $this->semValue = null; - }, - 583 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 584 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 585 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 586 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 587 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 588 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 589 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 590 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 591 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 592 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 593 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 594 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 595 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 596 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 597 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 598 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 599 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 600 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - ]; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/lib/nikic/php-parser/lib/PhpParser/Parser/Tokens.php deleted file mode 100644 index b76a5d94c..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +++ /dev/null @@ -1,148 +0,0 @@ -lexer = $lexer; - - if (isset($options['throwOnError'])) { - throw new \LogicException( - '"throwOnError" is no longer supported, use "errorHandler" instead'); - } - - $this->initReduceCallbacks(); - } - - /** - * Parses PHP code into a node tree. - * - * If a non-throwing error handler is used, the parser will continue parsing after an error - * occurred and attempt to build a partial AST. - * - * @param string $code The source code to parse - * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults - * to ErrorHandler\Throwing. - * - * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and - * the parser was unable to recover from an error). - */ - public function parse(string $code, ErrorHandler $errorHandler = null) { - $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; - - $this->lexer->startLexing($code, $this->errorHandler); - $result = $this->doParse(); - - // Clear out some of the interior state, so we don't hold onto unnecessary - // memory between uses of the parser - $this->startAttributeStack = []; - $this->endAttributeStack = []; - $this->semStack = []; - $this->semValue = null; - - return $result; - } - - protected function doParse() { - // We start off with no lookahead-token - $symbol = self::SYMBOL_NONE; - - // The attributes for a node are taken from the first and last token of the node. - // From the first token only the startAttributes are taken and from the last only - // the endAttributes. Both are merged using the array union operator (+). - $startAttributes = []; - $endAttributes = []; - $this->endAttributes = $endAttributes; - - // Keep stack of start and end attributes - $this->startAttributeStack = []; - $this->endAttributeStack = [$endAttributes]; - - // Start off in the initial state and keep a stack of previous states - $state = 0; - $stateStack = [$state]; - - // Semantic value stack (contains values of tokens and semantic action results) - $this->semStack = []; - - // Current position in the stack(s) - $stackPos = 0; - - $this->errorState = 0; - - for (;;) { - //$this->traceNewState($state, $symbol); - - if ($this->actionBase[$state] === 0) { - $rule = $this->actionDefault[$state]; - } else { - if ($symbol === self::SYMBOL_NONE) { - // Fetch the next token id from the lexer and fetch additional info by-ref. - // The end attributes are fetched into a temporary variable and only set once the token is really - // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is - // reduced after a token was read but not yet shifted. - $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes); - - // map the lexer token id to the internally used symbols - $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize - ? $this->tokenToSymbol[$tokenId] - : $this->invalidSymbol; - - if ($symbol === $this->invalidSymbol) { - throw new \RangeException(sprintf( - 'The lexer returned an invalid token (id=%d, value=%s)', - $tokenId, $tokenValue - )); - } - - // Allow productions to access the start attributes of the lookahead token. - $this->lookaheadStartAttributes = $startAttributes; - - //$this->traceRead($symbol); - } - - $idx = $this->actionBase[$state] + $symbol; - if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)) - && ($action = $this->action[$idx]) !== $this->defaultAction) { - /* - * >= numNonLeafStates: shift and reduce - * > 0: shift - * = 0: accept - * < 0: reduce - * = -YYUNEXPECTED: error - */ - if ($action > 0) { - /* shift */ - //$this->traceShift($symbol); - - ++$stackPos; - $stateStack[$stackPos] = $state = $action; - $this->semStack[$stackPos] = $tokenValue; - $this->startAttributeStack[$stackPos] = $startAttributes; - $this->endAttributeStack[$stackPos] = $endAttributes; - $this->endAttributes = $endAttributes; - $symbol = self::SYMBOL_NONE; - - if ($this->errorState) { - --$this->errorState; - } - - if ($action < $this->numNonLeafStates) { - continue; - } - - /* $yyn >= numNonLeafStates means shift-and-reduce */ - $rule = $action - $this->numNonLeafStates; - } else { - $rule = -$action; - } - } else { - $rule = $this->actionDefault[$state]; - } - } - - for (;;) { - if ($rule === 0) { - /* accept */ - //$this->traceAccept(); - return $this->semValue; - } elseif ($rule !== $this->unexpectedTokenRule) { - /* reduce */ - //$this->traceReduce($rule); - - try { - $this->reduceCallbacks[$rule]($stackPos); - } catch (Error $e) { - if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { - $e->setStartLine($startAttributes['startLine']); - } - - $this->emitError($e); - // Can't recover from this type of error - return null; - } - - /* Goto - shift nonterminal */ - $lastEndAttributes = $this->endAttributeStack[$stackPos]; - $ruleLength = $this->ruleToLength[$rule]; - $stackPos -= $ruleLength; - $nonTerminal = $this->ruleToNonTerminal[$rule]; - $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; - if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) { - $state = $this->goto[$idx]; - } else { - $state = $this->gotoDefault[$nonTerminal]; - } - - ++$stackPos; - $stateStack[$stackPos] = $state; - $this->semStack[$stackPos] = $this->semValue; - $this->endAttributeStack[$stackPos] = $lastEndAttributes; - if ($ruleLength === 0) { - // Empty productions use the start attributes of the lookahead token. - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; - } - } else { - /* error */ - switch ($this->errorState) { - case 0: - $msg = $this->getErrorMessage($symbol, $state); - $this->emitError(new Error($msg, $startAttributes + $endAttributes)); - // Break missing intentionally - case 1: - case 2: - $this->errorState = 3; - - // Pop until error-expecting state uncovered - while (!( - (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this - if ($stackPos <= 0) { - // Could not recover from error - return null; - } - $state = $stateStack[--$stackPos]; - //$this->tracePop($state); - } - - //$this->traceShift($this->errorSymbol); - ++$stackPos; - $stateStack[$stackPos] = $state = $action; - - // We treat the error symbol as being empty, so we reset the end attributes - // to the end attributes of the last non-error symbol - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; - $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1]; - $this->endAttributes = $this->endAttributeStack[$stackPos - 1]; - break; - - case 3: - if ($symbol === 0) { - // Reached EOF without recovering from error - return null; - } - - //$this->traceDiscard($symbol); - $symbol = self::SYMBOL_NONE; - break 2; - } - } - - if ($state < $this->numNonLeafStates) { - break; - } - - /* >= numNonLeafStates means shift-and-reduce */ - $rule = $state - $this->numNonLeafStates; - } - } - - throw new \RuntimeException('Reached end of parser loop'); - } - - protected function emitError(Error $error) { - $this->errorHandler->handleError($error); - } - - /** - * Format error message including expected tokens. - * - * @param int $symbol Unexpected symbol - * @param int $state State at time of error - * - * @return string Formatted error message - */ - protected function getErrorMessage(int $symbol, int $state) : string { - $expectedString = ''; - if ($expected = $this->getExpectedTokens($state)) { - $expectedString = ', expecting ' . implode(' or ', $expected); - } - - return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; - } - - /** - * Get limited number of expected tokens in given state. - * - * @param int $state State - * - * @return string[] Expected tokens. If too many, an empty array is returned. - */ - protected function getExpectedTokens(int $state) : array { - $expected = []; - - $base = $this->actionBase[$state]; - foreach ($this->symbolToName as $symbol => $name) { - $idx = $base + $symbol; - if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - || $state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - ) { - if ($this->action[$idx] !== $this->unexpectedTokenRule - && $this->action[$idx] !== $this->defaultAction - && $symbol !== $this->errorSymbol - ) { - if (count($expected) === 4) { - /* Too many expected tokens */ - return []; - } - - $expected[] = $name; - } - } - } - - return $expected; - } - - /* - * Tracing functions used for debugging the parser. - */ - - /* - protected function traceNewState($state, $symbol) { - echo '% State ' . $state - . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; - } - - protected function traceRead($symbol) { - echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; - } - - protected function traceShift($symbol) { - echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; - } - - protected function traceAccept() { - echo "% Accepted.\n"; - } - - protected function traceReduce($n) { - echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; - } - - protected function tracePop($state) { - echo '% Recovering, uncovered state ' . $state . "\n"; - } - - protected function traceDiscard($symbol) { - echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; - } - */ - - /* - * Helper functions invoked by semantic actions - */ - - /** - * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. - * - * @param Node\Stmt[] $stmts - * @return Node\Stmt[] - */ - protected function handleNamespaces(array $stmts) : array { - $hasErrored = false; - $style = $this->getNamespacingStyle($stmts); - if (null === $style) { - // not namespaced, nothing to do - return $stmts; - } elseif ('brace' === $style) { - // For braced namespaces we only have to check that there are no invalid statements between the namespaces - $afterFirstNamespace = false; - foreach ($stmts as $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - $afterFirstNamespace = true; - } elseif (!$stmt instanceof Node\Stmt\HaltCompiler - && !$stmt instanceof Node\Stmt\Nop - && $afterFirstNamespace && !$hasErrored) { - $this->emitError(new Error( - 'No code may exist outside of namespace {}', $stmt->getAttributes())); - $hasErrored = true; // Avoid one error for every statement - } - } - return $stmts; - } else { - // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts - $resultStmts = []; - $targetStmts =& $resultStmts; - $lastNs = null; - foreach ($stmts as $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - if ($lastNs !== null) { - $this->fixupNamespaceAttributes($lastNs); - } - if ($stmt->stmts === null) { - $stmt->stmts = []; - $targetStmts =& $stmt->stmts; - $resultStmts[] = $stmt; - } else { - // This handles the invalid case of mixed style namespaces - $resultStmts[] = $stmt; - $targetStmts =& $resultStmts; - } - $lastNs = $stmt; - } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { - // __halt_compiler() is not moved into the namespace - $resultStmts[] = $stmt; - } else { - $targetStmts[] = $stmt; - } - } - if ($lastNs !== null) { - $this->fixupNamespaceAttributes($lastNs); - } - return $resultStmts; - } - } - - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) { - // We moved the statements into the namespace node, as such the end of the namespace node - // needs to be extended to the end of the statements. - if (empty($stmt->stmts)) { - return; - } - - // We only move the builtin end attributes here. This is the best we can do with the - // knowledge we have. - $endAttributes = ['endLine', 'endFilePos', 'endTokenPos']; - $lastStmt = $stmt->stmts[count($stmt->stmts) - 1]; - foreach ($endAttributes as $endAttribute) { - if ($lastStmt->hasAttribute($endAttribute)) { - $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute)); - } - } - } - - /** - * Determine namespacing style (semicolon or brace) - * - * @param Node[] $stmts Top-level statements. - * - * @return null|string One of "semicolon", "brace" or null (no namespaces) - */ - private function getNamespacingStyle(array $stmts) { - $style = null; - $hasNotAllowedStmts = false; - foreach ($stmts as $i => $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; - if (null === $style) { - $style = $currentStyle; - if ($hasNotAllowedStmts) { - $this->emitError(new Error( - 'Namespace declaration statement has to be the very first statement in the script', - $stmt->getLine() // Avoid marking the entire namespace as an error - )); - } - } elseif ($style !== $currentStyle) { - $this->emitError(new Error( - 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', - $stmt->getLine() // Avoid marking the entire namespace as an error - )); - // Treat like semicolon style for namespace normalization - return 'semicolon'; - } - continue; - } - - /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ - if ($stmt instanceof Node\Stmt\Declare_ - || $stmt instanceof Node\Stmt\HaltCompiler - || $stmt instanceof Node\Stmt\Nop) { - continue; - } - - /* There may be a hashbang line at the very start of the file */ - if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { - continue; - } - - /* Everything else if forbidden before namespace declarations */ - $hasNotAllowedStmts = true; - } - return $style; - } - - /** - * Fix up parsing of static property calls in PHP 5. - * - * In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is - * interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the - * latter as the former initially and this method fixes the AST into the correct form when we - * encounter the "()". - * - * @param Node\Expr\StaticPropertyFetch|Node\Expr\ArrayDimFetch $prop - * @param Node\Arg[] $args - * @param array $attributes - * - * @return Expr\StaticCall - */ - protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : Expr\StaticCall { - if ($prop instanceof Node\Expr\StaticPropertyFetch) { - $name = $prop->name instanceof VarLikeIdentifier - ? $prop->name->toString() : $prop->name; - $var = new Expr\Variable($name, $prop->name->getAttributes()); - return new Expr\StaticCall($prop->class, $var, $args, $attributes); - } elseif ($prop instanceof Node\Expr\ArrayDimFetch) { - $tmp = $prop; - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - } - - /** @var Expr\StaticPropertyFetch $staticProp */ - $staticProp = $tmp->var; - - // Set start attributes to attributes of innermost node - $tmp = $prop; - $this->fixupStartAttributes($tmp, $staticProp->name); - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - $this->fixupStartAttributes($tmp, $staticProp->name); - } - - $name = $staticProp->name instanceof VarLikeIdentifier - ? $staticProp->name->toString() : $staticProp->name; - $tmp->var = new Expr\Variable($name, $staticProp->name->getAttributes()); - return new Expr\StaticCall($staticProp->class, $prop, $args, $attributes); - } else { - throw new \Exception; - } - } - - protected function fixupStartAttributes(Node $to, Node $from) { - $startAttributes = ['startLine', 'startFilePos', 'startTokenPos']; - foreach ($startAttributes as $startAttribute) { - if ($from->hasAttribute($startAttribute)) { - $to->setAttribute($startAttribute, $from->getAttribute($startAttribute)); - } - } - } - - protected function handleBuiltinTypes(Name $name) { - $builtinTypes = [ - 'bool' => true, - 'int' => true, - 'float' => true, - 'string' => true, - 'iterable' => true, - 'void' => true, - 'object' => true, - 'null' => true, - 'false' => true, - 'mixed' => true, - 'never' => true, - ]; - - if (!$name->isUnqualified()) { - return $name; - } - - $lowerName = $name->toLowerString(); - if (!isset($builtinTypes[$lowerName])) { - return $name; - } - - return new Node\Identifier($lowerName, $name->getAttributes()); - } - - /** - * Get combined start and end attributes at a stack location - * - * @param int $pos Stack location - * - * @return array Combined start and end attributes - */ - protected function getAttributesAt(int $pos) : array { - return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; - } - - protected function getFloatCastKind(string $cast): int - { - $cast = strtolower($cast); - if (strpos($cast, 'float') !== false) { - return Double::KIND_FLOAT; - } - - if (strpos($cast, 'real') !== false) { - return Double::KIND_REAL; - } - - return Double::KIND_DOUBLE; - } - - protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { - try { - return LNumber::fromString($str, $attributes, $allowInvalidOctal); - } catch (Error $error) { - $this->emitError($error); - // Use dummy value - return new LNumber(0, $attributes); - } - } - - /** - * Parse a T_NUM_STRING token into either an integer or string node. - * - * @param string $str Number string - * @param array $attributes Attributes - * - * @return LNumber|String_ Integer or string node. - */ - protected function parseNumString(string $str, array $attributes) { - if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { - return new String_($str, $attributes); - } - - $num = +$str; - if (!is_int($num)) { - return new String_($str, $attributes); - } - - return new LNumber($num, $attributes); - } - - protected function stripIndentation( - string $string, int $indentLen, string $indentChar, - bool $newlineAtStart, bool $newlineAtEnd, array $attributes - ) { - if ($indentLen === 0) { - return $string; - } - - $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; - $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; - $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; - return preg_replace_callback( - $regex, - function ($matches) use ($indentLen, $indentChar, $attributes) { - $prefix = substr($matches[1], 0, $indentLen); - if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', $attributes - )); - } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { - $this->emitError(new Error( - 'Invalid body indentation level ' . - '(expecting an indentation level of at least ' . $indentLen . ')', - $attributes - )); - } - return substr($matches[0], strlen($prefix)); - }, - $string - ); - } - - protected function parseDocString( - string $startToken, $contents, string $endToken, - array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape - ) { - $kind = strpos($startToken, "'") === false - ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; - - $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/'; - $result = preg_match($regex, $startToken, $matches); - assert($result === 1); - $label = $matches[1]; - - $result = preg_match('/\A[ \t]*/', $endToken, $matches); - assert($result === 1); - $indentation = $matches[0]; - - $attributes['kind'] = $kind; - $attributes['docLabel'] = $label; - $attributes['docIndentation'] = $indentation; - - $indentHasSpaces = false !== strpos($indentation, " "); - $indentHasTabs = false !== strpos($indentation, "\t"); - if ($indentHasSpaces && $indentHasTabs) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', - $endTokenAttributes - )); - - // Proceed processing as if this doc string is not indented - $indentation = ''; - } - - $indentLen = \strlen($indentation); - $indentChar = $indentHasSpaces ? " " : "\t"; - - if (\is_string($contents)) { - if ($contents === '') { - return new String_('', $attributes); - } - - $contents = $this->stripIndentation( - $contents, $indentLen, $indentChar, true, true, $attributes - ); - $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); - - if ($kind === String_::KIND_HEREDOC) { - $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); - } - - return new String_($contents, $attributes); - } else { - assert(count($contents) > 0); - if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) { - // If there is no leading encapsed string part, pretend there is an empty one - $this->stripIndentation( - '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() - ); - } - - $newContents = []; - foreach ($contents as $i => $part) { - if ($part instanceof Node\Scalar\EncapsedStringPart) { - $isLast = $i === \count($contents) - 1; - $part->value = $this->stripIndentation( - $part->value, $indentLen, $indentChar, - $i === 0, $isLast, $part->getAttributes() - ); - $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); - if ($isLast) { - $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); - } - if ('' === $part->value) { - continue; - } - } - $newContents[] = $part; - } - return new Encapsed($newContents, $attributes); - } - } - - /** - * Create attributes for a zero-length common-capturing nop. - * - * @param Comment[] $comments - * @return array - */ - protected function createCommentNopAttributes(array $comments) { - $comment = $comments[count($comments) - 1]; - $commentEndLine = $comment->getEndLine(); - $commentEndFilePos = $comment->getEndFilePos(); - $commentEndTokenPos = $comment->getEndTokenPos(); - - $attributes = ['comments' => $comments]; - if (-1 !== $commentEndLine) { - $attributes['startLine'] = $commentEndLine; - $attributes['endLine'] = $commentEndLine; - } - if (-1 !== $commentEndFilePos) { - $attributes['startFilePos'] = $commentEndFilePos + 1; - $attributes['endFilePos'] = $commentEndFilePos; - } - if (-1 !== $commentEndTokenPos) { - $attributes['startTokenPos'] = $commentEndTokenPos + 1; - $attributes['endTokenPos'] = $commentEndTokenPos; - } - return $attributes; - } - - protected function checkClassModifier($a, $b, $modifierPos) { - try { - Class_::verifyClassModifier($a, $b); - } catch (Error $error) { - $error->setAttributes($this->getAttributesAt($modifierPos)); - $this->emitError($error); - } - } - - protected function checkModifier($a, $b, $modifierPos) { - // Jumping through some hoops here because verifyModifier() is also used elsewhere - try { - Class_::verifyModifier($a, $b); - } catch (Error $error) { - $error->setAttributes($this->getAttributesAt($modifierPos)); - $this->emitError($error); - } - } - - protected function checkParam(Param $node) { - if ($node->variadic && null !== $node->default) { - $this->emitError(new Error( - 'Variadic parameter cannot have a default value', - $node->default->getAttributes() - )); - } - } - - protected function checkTryCatch(TryCatch $node) { - if (empty($node->catches) && null === $node->finally) { - $this->emitError(new Error( - 'Cannot use try without catch or finally', $node->getAttributes() - )); - } - } - - protected function checkNamespace(Namespace_ $node) { - if (null !== $node->stmts) { - foreach ($node->stmts as $stmt) { - if ($stmt instanceof Namespace_) { - $this->emitError(new Error( - 'Namespace declarations cannot be nested', $stmt->getAttributes() - )); - } - } - } - } - - private function checkClassName($name, $namePos) { - if (null !== $name && $name->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $name), - $this->getAttributesAt($namePos) - )); - } - } - - private function checkImplementedInterfaces(array $interfaces) { - foreach ($interfaces as $interface) { - if ($interface->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), - $interface->getAttributes() - )); - } - } - } - - protected function checkClass(Class_ $node, $namePos) { - $this->checkClassName($node->name, $namePos); - - if ($node->extends && $node->extends->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), - $node->extends->getAttributes() - )); - } - - $this->checkImplementedInterfaces($node->implements); - } - - protected function checkInterface(Interface_ $node, $namePos) { - $this->checkClassName($node->name, $namePos); - $this->checkImplementedInterfaces($node->extends); - } - - protected function checkEnum(Enum_ $node, $namePos) { - $this->checkClassName($node->name, $namePos); - $this->checkImplementedInterfaces($node->implements); - } - - protected function checkClassMethod(ClassMethod $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { - switch ($node->name->toLowerString()) { - case '__construct': - $this->emitError(new Error( - sprintf('Constructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - case '__destruct': - $this->emitError(new Error( - sprintf('Destructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - case '__clone': - $this->emitError(new Error( - sprintf('Clone method %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - } - } - - if ($node->flags & Class_::MODIFIER_READONLY) { - $this->emitError(new Error( - sprintf('Method %s() cannot be readonly', $node->name), - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkClassConst(ClassConst $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { - $this->emitError(new Error( - "Cannot use 'static' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - if ($node->flags & Class_::MODIFIER_ABSTRACT) { - $this->emitError(new Error( - "Cannot use 'abstract' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - if ($node->flags & Class_::MODIFIER_READONLY) { - $this->emitError(new Error( - "Cannot use 'readonly' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkProperty(Property $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_ABSTRACT) { - $this->emitError(new Error('Properties cannot be declared abstract', - $this->getAttributesAt($modifierPos))); - } - - if ($node->flags & Class_::MODIFIER_FINAL) { - $this->emitError(new Error('Properties cannot be declared final', - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkUseUse(UseUse $node, $namePos) { - if ($node->alias && $node->alias->isSpecialClassName()) { - $this->emitError(new Error( - sprintf( - 'Cannot use %s as %s because \'%2$s\' is a special class name', - $node->name, $node->alias - ), - $this->getAttributesAt($namePos) - )); - } - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/ParserFactory.php b/lib/nikic/php-parser/lib/PhpParser/ParserFactory.php deleted file mode 100644 index f041e7ffe..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/ParserFactory.php +++ /dev/null @@ -1,44 +0,0 @@ -pAttrGroups($node->attrGroups, true) - . $this->pModifiers($node->flags) - . ($node->type ? $this->p($node->type) . ' ' : '') - . ($node->byRef ? '&' : '') - . ($node->variadic ? '...' : '') - . $this->p($node->var) - . ($node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pArg(Node\Arg $node) { - return ($node->name ? $node->name->toString() . ': ' : '') - . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') - . $this->p($node->value); - } - - protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) { - return '...'; - } - - protected function pConst(Node\Const_ $node) { - return $node->name . ' = ' . $this->p($node->value); - } - - protected function pNullableType(Node\NullableType $node) { - return '?' . $this->p($node->type); - } - - protected function pUnionType(Node\UnionType $node) { - return $this->pImplode($node->types, '|'); - } - - protected function pIntersectionType(Node\IntersectionType $node) { - return $this->pImplode($node->types, '&'); - } - - protected function pIdentifier(Node\Identifier $node) { - return $node->name; - } - - protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node) { - return '$' . $node->name; - } - - protected function pAttribute(Node\Attribute $node) { - return $this->p($node->name) - . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); - } - - protected function pAttributeGroup(Node\AttributeGroup $node) { - return '#[' . $this->pCommaSeparated($node->attrs) . ']'; - } - - // Names - - protected function pName(Name $node) { - return implode('\\', $node->parts); - } - - protected function pName_FullyQualified(Name\FullyQualified $node) { - return '\\' . implode('\\', $node->parts); - } - - protected function pName_Relative(Name\Relative $node) { - return 'namespace\\' . implode('\\', $node->parts); - } - - // Magic Constants - - protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) { - return '__CLASS__'; - } - - protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) { - return '__DIR__'; - } - - protected function pScalar_MagicConst_File(MagicConst\File $node) { - return '__FILE__'; - } - - protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) { - return '__FUNCTION__'; - } - - protected function pScalar_MagicConst_Line(MagicConst\Line $node) { - return '__LINE__'; - } - - protected function pScalar_MagicConst_Method(MagicConst\Method $node) { - return '__METHOD__'; - } - - protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) { - return '__NAMESPACE__'; - } - - protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) { - return '__TRAIT__'; - } - - // Scalars - - protected function pScalar_String(Scalar\String_ $node) { - $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); - switch ($kind) { - case Scalar\String_::KIND_NOWDOC: - $label = $node->getAttribute('docLabel'); - if ($label && !$this->containsEndLabel($node->value, $label)) { - if ($node->value === '') { - return "<<<'$label'\n$label" . $this->docStringEndToken; - } - - return "<<<'$label'\n$node->value\n$label" - . $this->docStringEndToken; - } - /* break missing intentionally */ - case Scalar\String_::KIND_SINGLE_QUOTED: - return $this->pSingleQuotedString($node->value); - case Scalar\String_::KIND_HEREDOC: - $label = $node->getAttribute('docLabel'); - if ($label && !$this->containsEndLabel($node->value, $label)) { - if ($node->value === '') { - return "<<<$label\n$label" . $this->docStringEndToken; - } - - $escaped = $this->escapeString($node->value, null); - return "<<<$label\n" . $escaped . "\n$label" - . $this->docStringEndToken; - } - /* break missing intentionally */ - case Scalar\String_::KIND_DOUBLE_QUOTED: - return '"' . $this->escapeString($node->value, '"') . '"'; - } - throw new \Exception('Invalid string kind'); - } - - protected function pScalar_Encapsed(Scalar\Encapsed $node) { - if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { - $label = $node->getAttribute('docLabel'); - if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { - if (count($node->parts) === 1 - && $node->parts[0] instanceof Scalar\EncapsedStringPart - && $node->parts[0]->value === '' - ) { - return "<<<$label\n$label" . $this->docStringEndToken; - } - - return "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label" - . $this->docStringEndToken; - } - } - return '"' . $this->pEncapsList($node->parts, '"') . '"'; - } - - protected function pScalar_LNumber(Scalar\LNumber $node) { - if ($node->value === -\PHP_INT_MAX-1) { - // PHP_INT_MIN cannot be represented as a literal, - // because the sign is not part of the literal - return '(-' . \PHP_INT_MAX . '-1)'; - } - - $kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC); - if (Scalar\LNumber::KIND_DEC === $kind) { - return (string) $node->value; - } - - if ($node->value < 0) { - $sign = '-'; - $str = (string) -$node->value; - } else { - $sign = ''; - $str = (string) $node->value; - } - switch ($kind) { - case Scalar\LNumber::KIND_BIN: - return $sign . '0b' . base_convert($str, 10, 2); - case Scalar\LNumber::KIND_OCT: - return $sign . '0' . base_convert($str, 10, 8); - case Scalar\LNumber::KIND_HEX: - return $sign . '0x' . base_convert($str, 10, 16); - } - throw new \Exception('Invalid number kind'); - } - - protected function pScalar_DNumber(Scalar\DNumber $node) { - if (!is_finite($node->value)) { - if ($node->value === \INF) { - return '\INF'; - } elseif ($node->value === -\INF) { - return '-\INF'; - } else { - return '\NAN'; - } - } - - // Try to find a short full-precision representation - $stringValue = sprintf('%.16G', $node->value); - if ($node->value !== (double) $stringValue) { - $stringValue = sprintf('%.17G', $node->value); - } - - // %G is locale dependent and there exists no locale-independent alternative. We don't want - // mess with switching locales here, so let's assume that a comma is the only non-standard - // decimal separator we may encounter... - $stringValue = str_replace(',', '.', $stringValue); - - // ensure that number is really printed as float - return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; - } - - protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node) { - throw new \LogicException('Cannot directly print EncapsedStringPart'); - } - - // Assignments - - protected function pExpr_Assign(Expr\Assign $node) { - return $this->pInfixOp(Expr\Assign::class, $node->var, ' = ', $node->expr); - } - - protected function pExpr_AssignRef(Expr\AssignRef $node) { - return $this->pInfixOp(Expr\AssignRef::class, $node->var, ' =& ', $node->expr); - } - - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) { - return $this->pInfixOp(AssignOp\Plus::class, $node->var, ' += ', $node->expr); - } - - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) { - return $this->pInfixOp(AssignOp\Minus::class, $node->var, ' -= ', $node->expr); - } - - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) { - return $this->pInfixOp(AssignOp\Mul::class, $node->var, ' *= ', $node->expr); - } - - protected function pExpr_AssignOp_Div(AssignOp\Div $node) { - return $this->pInfixOp(AssignOp\Div::class, $node->var, ' /= ', $node->expr); - } - - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) { - return $this->pInfixOp(AssignOp\Concat::class, $node->var, ' .= ', $node->expr); - } - - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) { - return $this->pInfixOp(AssignOp\Mod::class, $node->var, ' %= ', $node->expr); - } - - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) { - return $this->pInfixOp(AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr); - } - - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) { - return $this->pInfixOp(AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr); - } - - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) { - return $this->pInfixOp(AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr); - } - - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) { - return $this->pInfixOp(AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr); - } - - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) { - return $this->pInfixOp(AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr); - } - - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) { - return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr); - } - - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) { - return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr); - } - - // Binary expressions - - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) { - return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right); - } - - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) { - return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right); - } - - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) { - return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right); - } - - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) { - return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right); - } - - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) { - return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right); - } - - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) { - return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right); - } - - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) { - return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right); - } - - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) { - return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right); - } - - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) { - return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right); - } - - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) { - return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right); - } - - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) { - return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right); - } - - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) { - return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right); - } - - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) { - return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right); - } - - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) { - return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right); - } - - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) { - return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right); - } - - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) { - return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right); - } - - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) { - return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right); - } - - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) { - return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right); - } - - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) { - return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right); - } - - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) { - return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right); - } - - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) { - return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right); - } - - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) { - return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right); - } - - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) { - return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right); - } - - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) { - return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right); - } - - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) { - return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right); - } - - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) { - return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right); - } - - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) { - return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right); - } - - protected function pExpr_Instanceof(Expr\Instanceof_ $node) { - list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class]; - return $this->pPrec($node->expr, $precedence, $associativity, -1) - . ' instanceof ' - . $this->pNewVariable($node->class); - } - - // Unary expressions - - protected function pExpr_BooleanNot(Expr\BooleanNot $node) { - return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr); - } - - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) { - return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr); - } - - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) { - if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) { - // Enforce -(-$expr) instead of --$expr - return '-(' . $this->p($node->expr) . ')'; - } - return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr); - } - - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) { - if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) { - // Enforce +(+$expr) instead of ++$expr - return '+(' . $this->p($node->expr) . ')'; - } - return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr); - } - - protected function pExpr_PreInc(Expr\PreInc $node) { - return $this->pPrefixOp(Expr\PreInc::class, '++', $node->var); - } - - protected function pExpr_PreDec(Expr\PreDec $node) { - return $this->pPrefixOp(Expr\PreDec::class, '--', $node->var); - } - - protected function pExpr_PostInc(Expr\PostInc $node) { - return $this->pPostfixOp(Expr\PostInc::class, $node->var, '++'); - } - - protected function pExpr_PostDec(Expr\PostDec $node) { - return $this->pPostfixOp(Expr\PostDec::class, $node->var, '--'); - } - - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) { - return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr); - } - - protected function pExpr_YieldFrom(Expr\YieldFrom $node) { - return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr); - } - - protected function pExpr_Print(Expr\Print_ $node) { - return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr); - } - - // Casts - - protected function pExpr_Cast_Int(Cast\Int_ $node) { - return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr); - } - - protected function pExpr_Cast_Double(Cast\Double $node) { - $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); - if ($kind === Cast\Double::KIND_DOUBLE) { - $cast = '(double)'; - } elseif ($kind === Cast\Double::KIND_FLOAT) { - $cast = '(float)'; - } elseif ($kind === Cast\Double::KIND_REAL) { - $cast = '(real)'; - } - return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); - } - - protected function pExpr_Cast_String(Cast\String_ $node) { - return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr); - } - - protected function pExpr_Cast_Array(Cast\Array_ $node) { - return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr); - } - - protected function pExpr_Cast_Object(Cast\Object_ $node) { - return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr); - } - - protected function pExpr_Cast_Bool(Cast\Bool_ $node) { - return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr); - } - - protected function pExpr_Cast_Unset(Cast\Unset_ $node) { - return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr); - } - - // Function calls and similar constructs - - protected function pExpr_FuncCall(Expr\FuncCall $node) { - return $this->pCallLhs($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_MethodCall(Expr\MethodCall $node) { - return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node) { - return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_StaticCall(Expr\StaticCall $node) { - return $this->pDereferenceLhs($node->class) . '::' - . ($node->name instanceof Expr - ? ($node->name instanceof Expr\Variable - ? $this->p($node->name) - : '{' . $this->p($node->name) . '}') - : $node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_Empty(Expr\Empty_ $node) { - return 'empty(' . $this->p($node->expr) . ')'; - } - - protected function pExpr_Isset(Expr\Isset_ $node) { - return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; - } - - protected function pExpr_Eval(Expr\Eval_ $node) { - return 'eval(' . $this->p($node->expr) . ')'; - } - - protected function pExpr_Include(Expr\Include_ $node) { - static $map = [ - Expr\Include_::TYPE_INCLUDE => 'include', - Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', - Expr\Include_::TYPE_REQUIRE => 'require', - Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', - ]; - - return $map[$node->type] . ' ' . $this->p($node->expr); - } - - protected function pExpr_List(Expr\List_ $node) { - return 'list(' . $this->pCommaSeparated($node->items) . ')'; - } - - // Other - - protected function pExpr_Error(Expr\Error $node) { - throw new \LogicException('Cannot pretty-print AST with Error nodes'); - } - - protected function pExpr_Variable(Expr\Variable $node) { - if ($node->name instanceof Expr) { - return '${' . $this->p($node->name) . '}'; - } else { - return '$' . $node->name; - } - } - - protected function pExpr_Array(Expr\Array_ $node) { - $syntax = $node->getAttribute('kind', - $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); - if ($syntax === Expr\Array_::KIND_SHORT) { - return '[' . $this->pMaybeMultiline($node->items, true) . ']'; - } else { - return 'array(' . $this->pMaybeMultiline($node->items, true) . ')'; - } - } - - protected function pExpr_ArrayItem(Expr\ArrayItem $node) { - return (null !== $node->key ? $this->p($node->key) . ' => ' : '') - . ($node->byRef ? '&' : '') - . ($node->unpack ? '...' : '') - . $this->p($node->value); - } - - protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) { - return $this->pDereferenceLhs($node->var) - . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; - } - - protected function pExpr_ConstFetch(Expr\ConstFetch $node) { - return $this->p($node->name); - } - - protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) { - return $this->pDereferenceLhs($node->class) . '::' . $this->p($node->name); - } - - protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) { - return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); - } - - protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) { - return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); - } - - protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) { - return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); - } - - protected function pExpr_ShellExec(Expr\ShellExec $node) { - return '`' . $this->pEncapsList($node->parts, '`') . '`'; - } - - protected function pExpr_Closure(Expr\Closure $node) { - return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') - . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' - . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '') - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pExpr_Match(Expr\Match_ $node) { - return 'match (' . $this->p($node->cond) . ') {' - . $this->pCommaSeparatedMultiline($node->arms, true) - . $this->nl - . '}'; - } - - protected function pMatchArm(Node\MatchArm $node) { - return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default') - . ' => ' . $this->p($node->body); - } - - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { - return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') - . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' => ' - . $this->p($node->expr); - } - - protected function pExpr_ClosureUse(Expr\ClosureUse $node) { - return ($node->byRef ? '&' : '') . $this->p($node->var); - } - - protected function pExpr_New(Expr\New_ $node) { - if ($node->class instanceof Stmt\Class_) { - $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; - return 'new ' . $this->pClassCommon($node->class, $args); - } - return 'new ' . $this->pNewVariable($node->class) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_Clone(Expr\Clone_ $node) { - return 'clone ' . $this->p($node->expr); - } - - protected function pExpr_Ternary(Expr\Ternary $node) { - // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. - // this is okay because the part between ? and : never needs parentheses. - return $this->pInfixOp(Expr\Ternary::class, - $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else - ); - } - - protected function pExpr_Exit(Expr\Exit_ $node) { - $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); - return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') - . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); - } - - protected function pExpr_Throw(Expr\Throw_ $node) { - return 'throw ' . $this->p($node->expr); - } - - protected function pExpr_Yield(Expr\Yield_ $node) { - if ($node->value === null) { - return 'yield'; - } else { - // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary - return '(yield ' - . ($node->key !== null ? $this->p($node->key) . ' => ' : '') - . $this->p($node->value) - . ')'; - } - } - - // Declarations - - protected function pStmt_Namespace(Stmt\Namespace_ $node) { - if ($this->canUseSemicolonNamespaces) { - return 'namespace ' . $this->p($node->name) . ';' - . $this->nl . $this->pStmts($node->stmts, false); - } else { - return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - } - - protected function pStmt_Use(Stmt\Use_ $node) { - return 'use ' . $this->pUseType($node->type) - . $this->pCommaSeparated($node->uses) . ';'; - } - - protected function pStmt_GroupUse(Stmt\GroupUse $node) { - return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) - . '\{' . $this->pCommaSeparated($node->uses) . '};'; - } - - protected function pStmt_UseUse(Stmt\UseUse $node) { - return $this->pUseType($node->type) . $this->p($node->name) - . (null !== $node->alias ? ' as ' . $node->alias : ''); - } - - protected function pUseType($type) { - return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' - : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); - } - - protected function pStmt_Interface(Stmt\Interface_ $node) { - return $this->pAttrGroups($node->attrGroups) - . 'interface ' . $node->name - . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Enum(Stmt\Enum_ $node) { - return $this->pAttrGroups($node->attrGroups) - . 'enum ' . $node->name - . ($node->scalarType ? " : $node->scalarType" : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Class(Stmt\Class_ $node) { - return $this->pClassCommon($node, ' ' . $node->name); - } - - protected function pStmt_Trait(Stmt\Trait_ $node) { - return $this->pAttrGroups($node->attrGroups) - . 'trait ' . $node->name - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_EnumCase(Stmt\EnumCase $node) { - return $this->pAttrGroups($node->attrGroups) - . 'case ' . $node->name - . ($node->expr ? ' = ' . $this->p($node->expr) : '') - . ';'; - } - - protected function pStmt_TraitUse(Stmt\TraitUse $node) { - return 'use ' . $this->pCommaSeparated($node->traits) - . (empty($node->adaptations) - ? ';' - : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); - } - - protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) { - return $this->p($node->trait) . '::' . $node->method - . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; - } - - protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) { - return (null !== $node->trait ? $this->p($node->trait) . '::' : '') - . $node->method . ' as' - . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') - . (null !== $node->newName ? ' ' . $node->newName : '') - . ';'; - } - - protected function pStmt_Property(Stmt\Property $node) { - return $this->pAttrGroups($node->attrGroups) - . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) - . ($node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->props) . ';'; - } - - protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) { - return '$' . $node->name - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') - . (null !== $node->stmts - ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' - : ';'); - } - - protected function pStmt_ClassConst(Stmt\ClassConst $node) { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'const ' . $this->pCommaSeparated($node->consts) . ';'; - } - - protected function pStmt_Function(Stmt\Function_ $node) { - return $this->pAttrGroups($node->attrGroups) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pCommaSeparated($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Const(Stmt\Const_ $node) { - return 'const ' . $this->pCommaSeparated($node->consts) . ';'; - } - - protected function pStmt_Declare(Stmt\Declare_ $node) { - return 'declare (' . $this->pCommaSeparated($node->declares) . ')' - . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); - } - - protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) { - return $node->key . '=' . $this->p($node->value); - } - - // Control flow - - protected function pStmt_If(Stmt\If_ $node) { - return 'if (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') - . (null !== $node->else ? ' ' . $this->p($node->else) : ''); - } - - protected function pStmt_ElseIf(Stmt\ElseIf_ $node) { - return 'elseif (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Else(Stmt\Else_ $node) { - return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_For(Stmt\For_ $node) { - return 'for (' - . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') - . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') - . $this->pCommaSeparated($node->loop) - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Foreach(Stmt\Foreach_ $node) { - return 'foreach (' . $this->p($node->expr) . ' as ' - . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') - . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_While(Stmt\While_ $node) { - return 'while (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Do(Stmt\Do_ $node) { - return 'do {' . $this->pStmts($node->stmts) . $this->nl - . '} while (' . $this->p($node->cond) . ');'; - } - - protected function pStmt_Switch(Stmt\Switch_ $node) { - return 'switch (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->cases) . $this->nl . '}'; - } - - protected function pStmt_Case(Stmt\Case_ $node) { - return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' - . $this->pStmts($node->stmts); - } - - protected function pStmt_TryCatch(Stmt\TryCatch $node) { - return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') - . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); - } - - protected function pStmt_Catch(Stmt\Catch_ $node) { - return 'catch (' . $this->pImplode($node->types, '|') - . ($node->var !== null ? ' ' . $this->p($node->var) : '') - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Finally(Stmt\Finally_ $node) { - return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Break(Stmt\Break_ $node) { - return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; - } - - protected function pStmt_Continue(Stmt\Continue_ $node) { - return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; - } - - protected function pStmt_Return(Stmt\Return_ $node) { - return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; - } - - protected function pStmt_Throw(Stmt\Throw_ $node) { - return 'throw ' . $this->p($node->expr) . ';'; - } - - protected function pStmt_Label(Stmt\Label $node) { - return $node->name . ':'; - } - - protected function pStmt_Goto(Stmt\Goto_ $node) { - return 'goto ' . $node->name . ';'; - } - - // Other - - protected function pStmt_Expression(Stmt\Expression $node) { - return $this->p($node->expr) . ';'; - } - - protected function pStmt_Echo(Stmt\Echo_ $node) { - return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; - } - - protected function pStmt_Static(Stmt\Static_ $node) { - return 'static ' . $this->pCommaSeparated($node->vars) . ';'; - } - - protected function pStmt_Global(Stmt\Global_ $node) { - return 'global ' . $this->pCommaSeparated($node->vars) . ';'; - } - - protected function pStmt_StaticVar(Stmt\StaticVar $node) { - return $this->p($node->var) - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pStmt_Unset(Stmt\Unset_ $node) { - return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; - } - - protected function pStmt_InlineHTML(Stmt\InlineHTML $node) { - $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : ''; - return '?>' . $newline . $node->value . 'remaining; - } - - protected function pStmt_Nop(Stmt\Nop $node) { - return ''; - } - - // Helpers - - protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) { - return $this->pAttrGroups($node->attrGroups, $node->name === null) - . $this->pModifiers($node->flags) - . 'class' . $afterClassToken - . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pObjectProperty($node) { - if ($node instanceof Expr) { - return '{' . $this->p($node) . '}'; - } else { - return $node; - } - } - - protected function pEncapsList(array $encapsList, $quote) { - $return = ''; - foreach ($encapsList as $element) { - if ($element instanceof Scalar\EncapsedStringPart) { - $return .= $this->escapeString($element->value, $quote); - } else { - $return .= '{' . $this->p($element) . '}'; - } - } - - return $return; - } - - protected function pSingleQuotedString(string $string) { - return '\'' . addcslashes($string, '\'\\') . '\''; - } - - protected function escapeString($string, $quote) { - if (null === $quote) { - // For doc strings, don't escape newlines - $escaped = addcslashes($string, "\t\f\v$\\"); - } else { - $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); - } - - // Escape control characters and non-UTF-8 characters. - // Regex based on https://stackoverflow.com/a/11709412/385378. - $regex = '/( - [\x00-\x08\x0E-\x1F] # Control characters - | [\xC0-\xC1] # Invalid UTF-8 Bytes - | [\xF5-\xFF] # Invalid UTF-8 Bytes - | \xE0(?=[\x80-\x9F]) # Overlong encoding of prior code point - | \xF0(?=[\x80-\x8F]) # Overlong encoding of prior code point - | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start - | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start - | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start - | (?<=[\x00-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle - | (? $part) { - $atStart = $i === 0; - $atEnd = $i === count($parts) - 1; - if ($part instanceof Scalar\EncapsedStringPart - && $this->containsEndLabel($part->value, $label, $atStart, $atEnd) - ) { - return true; - } - } - return false; - } - - protected function pDereferenceLhs(Node $node) { - if (!$this->dereferenceLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pCallLhs(Node $node) { - if (!$this->callLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pNewVariable(Node $node) { - // TODO: This is not fully accurate. - return $this->pDereferenceLhs($node); - } - - /** - * @param Node[] $nodes - * @return bool - */ - protected function hasNodeWithComments(array $nodes) { - foreach ($nodes as $node) { - if ($node && $node->getComments()) { - return true; - } - } - return false; - } - - protected function pMaybeMultiline(array $nodes, bool $trailingComma = false) { - if (!$this->hasNodeWithComments($nodes)) { - return $this->pCommaSeparated($nodes); - } else { - return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl; - } - } - - protected function pAttrGroups(array $nodes, bool $inline = false): string { - $result = ''; - $sep = $inline ? ' ' : $this->nl; - foreach ($nodes as $node) { - $result .= $this->p($node) . $sep; - } - - return $result; - } -} diff --git a/lib/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/lib/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php deleted file mode 100644 index 2c7fc3070..000000000 --- a/lib/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ /dev/null @@ -1,1506 +0,0 @@ - [ 0, 1], - Expr\BitwiseNot::class => [ 10, 1], - Expr\PreInc::class => [ 10, 1], - Expr\PreDec::class => [ 10, 1], - Expr\PostInc::class => [ 10, -1], - Expr\PostDec::class => [ 10, -1], - Expr\UnaryPlus::class => [ 10, 1], - Expr\UnaryMinus::class => [ 10, 1], - Cast\Int_::class => [ 10, 1], - Cast\Double::class => [ 10, 1], - Cast\String_::class => [ 10, 1], - Cast\Array_::class => [ 10, 1], - Cast\Object_::class => [ 10, 1], - Cast\Bool_::class => [ 10, 1], - Cast\Unset_::class => [ 10, 1], - Expr\ErrorSuppress::class => [ 10, 1], - Expr\Instanceof_::class => [ 20, 0], - Expr\BooleanNot::class => [ 30, 1], - BinaryOp\Mul::class => [ 40, -1], - BinaryOp\Div::class => [ 40, -1], - BinaryOp\Mod::class => [ 40, -1], - BinaryOp\Plus::class => [ 50, -1], - BinaryOp\Minus::class => [ 50, -1], - BinaryOp\Concat::class => [ 50, -1], - BinaryOp\ShiftLeft::class => [ 60, -1], - BinaryOp\ShiftRight::class => [ 60, -1], - BinaryOp\Smaller::class => [ 70, 0], - BinaryOp\SmallerOrEqual::class => [ 70, 0], - BinaryOp\Greater::class => [ 70, 0], - BinaryOp\GreaterOrEqual::class => [ 70, 0], - BinaryOp\Equal::class => [ 80, 0], - BinaryOp\NotEqual::class => [ 80, 0], - BinaryOp\Identical::class => [ 80, 0], - BinaryOp\NotIdentical::class => [ 80, 0], - BinaryOp\Spaceship::class => [ 80, 0], - BinaryOp\BitwiseAnd::class => [ 90, -1], - BinaryOp\BitwiseXor::class => [100, -1], - BinaryOp\BitwiseOr::class => [110, -1], - BinaryOp\BooleanAnd::class => [120, -1], - BinaryOp\BooleanOr::class => [130, -1], - BinaryOp\Coalesce::class => [140, 1], - Expr\Ternary::class => [150, 0], - // parser uses %left for assignments, but they really behave as %right - Expr\Assign::class => [160, 1], - Expr\AssignRef::class => [160, 1], - AssignOp\Plus::class => [160, 1], - AssignOp\Minus::class => [160, 1], - AssignOp\Mul::class => [160, 1], - AssignOp\Div::class => [160, 1], - AssignOp\Concat::class => [160, 1], - AssignOp\Mod::class => [160, 1], - AssignOp\BitwiseAnd::class => [160, 1], - AssignOp\BitwiseOr::class => [160, 1], - AssignOp\BitwiseXor::class => [160, 1], - AssignOp\ShiftLeft::class => [160, 1], - AssignOp\ShiftRight::class => [160, 1], - AssignOp\Pow::class => [160, 1], - AssignOp\Coalesce::class => [160, 1], - Expr\YieldFrom::class => [165, 1], - Expr\Print_::class => [168, 1], - BinaryOp\LogicalAnd::class => [170, -1], - BinaryOp\LogicalXor::class => [180, -1], - BinaryOp\LogicalOr::class => [190, -1], - Expr\Include_::class => [200, -1], - ]; - - /** @var int Current indentation level. */ - protected $indentLevel; - /** @var string Newline including current indentation. */ - protected $nl; - /** @var string Token placed at end of doc string to ensure it is followed by a newline. */ - protected $docStringEndToken; - /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected $canUseSemicolonNamespaces; - /** @var array Pretty printer options */ - protected $options; - - /** @var TokenStream Original tokens for use in format-preserving pretty print */ - protected $origTokens; - /** @var Internal\Differ Differ for node lists */ - protected $nodeListDiffer; - /** @var bool[] Map determining whether a certain character is a label character */ - protected $labelCharMap; - /** - * @var int[][] Map from token classes and subnode names to FIXUP_* constants. This is used - * during format-preserving prints to place additional parens/braces if necessary. - */ - protected $fixupMap; - /** - * @var int[][] Map from "{$node->getType()}->{$subNode}" to ['left' => $l, 'right' => $r], - * where $l and $r specify the token type that needs to be stripped when removing - * this node. - */ - protected $removalMap; - /** - * @var mixed[] Map from "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. - */ - protected $insertionMap; - /** - * @var string[] Map From "{$node->getType()}->{$subNode}" to string that should be inserted - * between elements of this list subnode. - */ - protected $listInsertionMap; - protected $emptyListInsertionMap; - /** @var int[] Map from "{$node->getType()}->{$subNode}" to token before which the modifiers - * should be reprinted. */ - protected $modifierChangeMap; - - /** - * Creates a pretty printer instance using the given options. - * - * Supported options: - * * bool $shortArraySyntax = false: Whether to use [] instead of array() as the default array - * syntax, if the node does not specify a format. - * - * @param array $options Dictionary of formatting options - */ - public function __construct(array $options = []) { - $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand(); - - $defaultOptions = ['shortArraySyntax' => false]; - $this->options = $options + $defaultOptions; - } - - /** - * Reset pretty printing state. - */ - protected function resetState() { - $this->indentLevel = 0; - $this->nl = "\n"; - $this->origTokens = null; - } - - /** - * Set indentation level - * - * @param int $level Level in number of spaces - */ - protected function setIndentLevel(int $level) { - $this->indentLevel = $level; - $this->nl = "\n" . \str_repeat(' ', $level); - } - - /** - * Increase indentation level. - */ - protected function indent() { - $this->indentLevel += 4; - $this->nl .= ' '; - } - - /** - * Decrease indentation level. - */ - protected function outdent() { - assert($this->indentLevel >= 4); - $this->indentLevel -= 4; - $this->nl = "\n" . str_repeat(' ', $this->indentLevel); - } - - /** - * Pretty prints an array of statements. - * - * @param Node[] $stmts Array of statements - * - * @return string Pretty printed statements - */ - public function prettyPrint(array $stmts) : string { - $this->resetState(); - $this->preprocessNodes($stmts); - - return ltrim($this->handleMagicTokens($this->pStmts($stmts, false))); - } - - /** - * Pretty prints an expression. - * - * @param Expr $node Expression node - * - * @return string Pretty printed node - */ - public function prettyPrintExpr(Expr $node) : string { - $this->resetState(); - return $this->handleMagicTokens($this->p($node)); - } - - /** - * Pretty prints a file of statements (includes the opening prettyPrint($stmts); - - if ($stmts[0] instanceof Stmt\InlineHTML) { - $p = preg_replace('/^<\?php\s+\?>\n?/', '', $p); - } - if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { - $p = preg_replace('/<\?php$/', '', rtrim($p)); - } - - return $p; - } - - /** - * Preprocesses the top-level nodes to initialize pretty printer state. - * - * @param Node[] $nodes Array of nodes - */ - protected function preprocessNodes(array $nodes) { - /* We can use semicolon-namespaces unless there is a global namespace declaration */ - $this->canUseSemicolonNamespaces = true; - foreach ($nodes as $node) { - if ($node instanceof Stmt\Namespace_ && null === $node->name) { - $this->canUseSemicolonNamespaces = false; - break; - } - } - } - - /** - * Handles (and removes) no-indent and doc-string-end tokens. - * - * @param string $str - * @return string - */ - protected function handleMagicTokens(string $str) : string { - // Replace doc-string-end tokens with nothing or a newline - $str = str_replace($this->docStringEndToken . ";\n", ";\n", $str); - $str = str_replace($this->docStringEndToken, "\n", $str); - - return $str; - } - - /** - * Pretty prints an array of nodes (statements) and indents them optionally. - * - * @param Node[] $nodes Array of nodes - * @param bool $indent Whether to indent the printed nodes - * - * @return string Pretty printed statements - */ - protected function pStmts(array $nodes, bool $indent = true) : string { - if ($indent) { - $this->indent(); - } - - $result = ''; - foreach ($nodes as $node) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - if ($node instanceof Stmt\Nop) { - continue; - } - } - - $result .= $this->nl . $this->p($node); - } - - if ($indent) { - $this->outdent(); - } - - return $result; - } - - /** - * Pretty-print an infix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node - * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node - * - * @return string Pretty printed infix operation - */ - protected function pInfixOp(string $class, Node $leftNode, string $operatorString, Node $rightNode) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - - return $this->pPrec($leftNode, $precedence, $associativity, -1) - . $operatorString - . $this->pPrec($rightNode, $precedence, $associativity, 1); - } - - /** - * Pretty-print a prefix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * - * @return string Pretty printed prefix operation - */ - protected function pPrefixOp(string $class, string $operatorString, Node $node) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); - } - - /** - * Pretty-print a postfix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * - * @return string Pretty printed postfix operation - */ - protected function pPostfixOp(string $class, Node $node, string $operatorString) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString; - } - - /** - * Prints an expression node with the least amount of parentheses necessary to preserve the meaning. - * - * @param Node $node Node to pretty print - * @param int $parentPrecedence Precedence of the parent operator - * @param int $parentAssociativity Associativity of parent operator - * (-1 is left, 0 is nonassoc, 1 is right) - * @param int $childPosition Position of the node relative to the operator - * (-1 is left, 1 is right) - * - * @return string The pretty printed node - */ - protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition) : string { - $class = \get_class($node); - if (isset($this->precedenceMap[$class])) { - $childPrecedence = $this->precedenceMap[$class][0]; - if ($childPrecedence > $parentPrecedence - || ($parentPrecedence === $childPrecedence && $parentAssociativity !== $childPosition) - ) { - return '(' . $this->p($node) . ')'; - } - } - - return $this->p($node); - } - - /** - * Pretty prints an array of nodes and implodes the printed values. - * - * @param Node[] $nodes Array of Nodes to be printed - * @param string $glue Character to implode with - * - * @return string Imploded pretty printed nodes - */ - protected function pImplode(array $nodes, string $glue = '') : string { - $pNodes = []; - foreach ($nodes as $node) { - if (null === $node) { - $pNodes[] = ''; - } else { - $pNodes[] = $this->p($node); - } - } - - return implode($glue, $pNodes); - } - - /** - * Pretty prints an array of nodes and implodes the printed values with commas. - * - * @param Node[] $nodes Array of Nodes to be printed - * - * @return string Comma separated pretty printed nodes - */ - protected function pCommaSeparated(array $nodes) : string { - return $this->pImplode($nodes, ', '); - } - - /** - * Pretty prints a comma-separated list of nodes in multiline style, including comments. - * - * The result includes a leading newline and one level of indentation (same as pStmts). - * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma - * - * @return string Comma separated pretty printed nodes in multiline style - */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string { - $this->indent(); - - $result = ''; - $lastIdx = count($nodes) - 1; - foreach ($nodes as $idx => $node) { - if ($node !== null) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - } - - $result .= $this->nl . $this->p($node); - } else { - $result .= $this->nl; - } - if ($trailingComma || $idx !== $lastIdx) { - $result .= ','; - } - } - - $this->outdent(); - return $result; - } - - /** - * Prints reformatted text of the passed comments. - * - * @param Comment[] $comments List of comments - * - * @return string Reformatted text of comments - */ - protected function pComments(array $comments) : string { - $formattedComments = []; - - foreach ($comments as $comment) { - $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); - } - - return implode($this->nl, $formattedComments); - } - - /** - * Perform a format-preserving pretty print of an AST. - * - * The format preservation is best effort. For some changes to the AST the formatting will not - * be preserved (at least not locally). - * - * In order to use this method a number of prerequisites must be satisfied: - * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. - * * The CloningVisitor must be run on the AST prior to modification. - * * The original tokens must be provided, using the getTokens() method on the lexer. - * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information - * @param array $origTokens Tokens of the original code - * - * @return string - */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string { - $this->initializeNodeListDiffer(); - $this->initializeLabelCharMap(); - $this->initializeFixupMap(); - $this->initializeRemovalMap(); - $this->initializeInsertionMap(); - $this->initializeListInsertionMap(); - $this->initializeEmptyListInsertionMap(); - $this->initializeModifierChangeMap(); - - $this->resetState(); - $this->origTokens = new TokenStream($origTokens); - - $this->preprocessNodes($stmts); - - $pos = 0; - $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); - if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens), 0); - } else { - // Fallback - // TODO Add pStmts($stmts, false); - } - - return ltrim($this->handleMagicTokens($result)); - } - - protected function pFallback(Node $node) { - return $this->{'p' . $node->getType()}($node); - } - - /** - * Pretty prints a node. - * - * This method also handles formatting preservation for nodes. - * - * @param Node $node Node to be pretty printed - * @param bool $parentFormatPreserved Whether parent node has preserved formatting - * - * @return string Pretty printed node - */ - protected function p(Node $node, $parentFormatPreserved = false) : string { - // No orig tokens means this is a normal pretty print without preservation of formatting - if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node); - } - - /** @var Node $origNode */ - $origNode = $node->getAttribute('origNode'); - if (null === $origNode) { - return $this->pFallback($node); - } - - $class = \get_class($node); - \assert($class === \get_class($origNode)); - - $startPos = $origNode->getStartTokenPos(); - $endPos = $origNode->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - - $fallbackNode = $node; - if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { - // Normalize node structure of anonymous classes - $node = PrintableNewAnonClassNode::fromNewNode($node); - $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); - } - - // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting - // is not preserved, then we need to use the fallback code to make sure the tags are - // printed. - if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode); - } - - $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); - - $type = $node->getType(); - $fixupInfo = $this->fixupMap[$class] ?? null; - - $result = ''; - $pos = $startPos; - foreach ($node->getSubNodeNames() as $subNodeName) { - $subNode = $node->$subNodeName; - $origSubNode = $origNode->$subNodeName; - - if ((!$subNode instanceof Node && $subNode !== null) - || (!$origSubNode instanceof Node && $origSubNode !== null) - ) { - if ($subNode === $origSubNode) { - // Unchanged, can reuse old code - continue; - } - - if (is_array($subNode) && is_array($origSubNode)) { - // Array subnode changed, we might be able to reconstruct it - $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $type, $subNodeName, - $fixupInfo[$subNodeName] ?? null - ); - if (null === $listResult) { - return $this->pFallback($fallbackNode); - } - - $result .= $listResult; - continue; - } - - if (is_int($subNode) && is_int($origSubNode)) { - // Check if this is a modifier change - $key = $type . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode); - } - - $findToken = $this->modifierChangeMap[$key]; - $result .= $this->pModifiers($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; - } - - // If a non-node, non-array subnode changed, we don't be able to do a partial - // reconstructions, as we don't have enough offset information. Pretty print the - // whole node instead. - return $this->pFallback($fallbackNode); - } - - $extraLeft = ''; - $extraRight = ''; - if ($origSubNode !== null) { - $subStartPos = $origSubNode->getStartTokenPos(); - $subEndPos = $origSubNode->getEndTokenPos(); - \assert($subStartPos >= 0 && $subEndPos >= 0); - } else { - if ($subNode === null) { - // Both null, nothing to do - continue; - } - - // A node has been inserted, check if we have insertion information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode); - } - - list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; - if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) - + (int) !$beforeToken; - } else { - $subStartPos = $pos; - } - - if (null === $extraLeft && null !== $extraRight) { - // If inserting on the right only, skipping whitespace looks better - $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); - } - $subEndPos = $subStartPos - 1; - } - - if (null === $subNode) { - // A node has been removed, check if we have removal information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode); - } - - // Adjust positions to account for additional tokens that must be skipped - $removalInfo = $this->removalMap[$key]; - if (isset($removalInfo['left'])) { - $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; - } - if (isset($removalInfo['right'])) { - $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; - } - } - - $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); - - if (null !== $subNode) { - $result .= $extraLeft; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment); - - // If it's the same node that was previously in this position, it certainly doesn't - // need fixup. It's important to check this here, because our fixup checks are more - // conservative than strictly necessary. - if (isset($fixupInfo[$subNodeName]) - && $subNode->getAttribute('origNode') !== $origSubNode - ) { - $fixup = $fixupInfo[$subNodeName]; - $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); - } else { - $res = $this->p($subNode, true); - } - - $this->safeAppend($result, $res); - $this->setIndentLevel($origIndentLevel); - - $result .= $extraRight; - } - - $pos = $subEndPos + 1; - } - - $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); - return $result; - } - - /** - * Perform a format-preserving pretty print of an array. - * - * @param array $nodes New nodes - * @param array $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeType Type of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes - * - * @return null|string Result of pretty print or null if cannot preserve formatting - */ - protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeType, string $subNodeName, $fixup - ) { - $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - - $mapKey = $parentNodeType . '->' . $subNodeName; - $insertStr = $this->listInsertionMap[$mapKey] ?? null; - $isStmtList = $subNodeName === 'stmts'; - - $beforeFirstKeepOrReplace = true; - $skipRemovedNode = false; - $delayedAdd = []; - $lastElemIndentLevel = $this->indentLevel; - - $insertNewline = false; - if ($insertStr === "\n") { - $insertStr = ''; - $insertNewline = true; - } - - if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { - $startPos = $origNodes[0]->getStartTokenPos(); - $endPos = $origNodes[0]->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - if (!$this->origTokens->haveBraces($startPos, $endPos)) { - // This was a single statement without braces, but either additional statements - // have been added, or the single statement has been removed. This requires the - // addition of braces. For now fall back. - // TODO: Try to preserve formatting - return null; - } - } - - $result = ''; - foreach ($diff as $i => $diffElem) { - $diffType = $diffElem->type; - /** @var Node|null $arrItem */ - $arrItem = $diffElem->new; - /** @var Node|null $origArrItem */ - $origArrItem = $diffElem->old; - - if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { - $beforeFirstKeepOrReplace = false; - - if ($origArrItem === null || $arrItem === null) { - // We can only handle the case where both are null - if ($origArrItem === $arrItem) { - continue; - } - return null; - } - - if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { - // We can only deal with nodes. This can occur for Names, which use string arrays. - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); - - $origIndentLevel = $this->indentLevel; - $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment; - $this->setIndentLevel($lastElemIndentLevel); - - $comments = $arrItem->getComments(); - $origComments = $origArrItem->getComments(); - $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; - \assert($commentStartPos >= 0); - - if ($commentStartPos < $pos) { - // Comments may be assigned to multiple nodes if they start at the same position. - // Make sure we don't try to print them multiple times. - $commentStartPos = $itemStartPos; - } - - if ($skipRemovedNode) { - if ($isStmtList && $this->origTokens->haveBracesInRange($pos, $itemStartPos)) { - // We'd remove the brace of a code block. - // TODO: Preserve formatting. - $this->setIndentLevel($origIndentLevel); - return null; - } - } else { - $result .= $this->origTokens->getTokenCode( - $pos, $commentStartPos, $indentAdjustment); - } - - if (!empty($delayedAdd)) { - /** @var Node $delayedAddNode */ - foreach ($delayedAdd as $delayedAddNode) { - if ($insertNewline) { - $delayedAddComments = $delayedAddNode->getComments(); - if ($delayedAddComments) { - $result .= $this->pComments($delayedAddComments) . $this->nl; - } - } - - $this->safeAppend($result, $this->p($delayedAddNode, true)); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - } else { - $result .= $insertStr; - } - } - - $delayedAdd = []; - } - - if ($comments !== $origComments) { - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $this->origTokens->getTokenCode( - $commentStartPos, $itemStartPos, $indentAdjustment); - } - - // If we had to remove anything, we have done so now. - $skipRemovedNode = false; - } elseif ($diffType === DiffElem::TYPE_ADD) { - if (null === $insertStr) { - // We don't have insertion information for this list type - return null; - } - - // We go multiline if the original code was multiline, - // or if it's an array item with a comment above it. - if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments()) - ) { - $insertStr = ','; - $insertNewline = true; - } - - if ($beforeFirstKeepOrReplace) { - // Will be inserted at the next "replace" or "keep" element - $delayedAdd[] = $arrItem; - continue; - } - - $itemStartPos = $pos; - $itemEndPos = $pos - 1; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($lastElemIndentLevel); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - $comments = $arrItem->getComments(); - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $insertStr; - } - } elseif ($diffType === DiffElem::TYPE_REMOVE) { - if (!$origArrItem instanceof Node) { - // We only support removal for nodes - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0); - - // Consider comments part of the node. - $origComments = $origArrItem->getComments(); - if ($origComments) { - $itemStartPos = $origComments[0]->getStartTokenPos(); - } - - if ($i === 0) { - // If we're removing from the start, keep the tokens before the node and drop those after it, - // instead of the other way around. - $result .= $this->origTokens->getTokenCode( - $pos, $itemStartPos, $indentAdjustment); - $skipRemovedNode = true; - } else { - if ($isStmtList && $this->origTokens->haveBracesInRange($pos, $itemStartPos)) { - // We'd remove the brace of a code block. - // TODO: Preserve formatting. - return null; - } - } - - $pos = $itemEndPos + 1; - continue; - } else { - throw new \Exception("Shouldn't happen"); - } - - if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { - $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); - } else { - $res = $this->p($arrItem, true); - } - $this->safeAppend($result, $res); - - $this->setIndentLevel($origIndentLevel); - $pos = $itemEndPos + 1; - } - - if ($skipRemovedNode) { - // TODO: Support removing single node. - return null; - } - - if (!empty($delayedAdd)) { - if (!isset($this->emptyListInsertionMap[$mapKey])) { - return null; - } - - list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; - if (null !== $findToken) { - $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; - $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); - $pos = $insertPos; - } - - $first = true; - $result .= $extraLeft; - foreach ($delayedAdd as $delayedAddNode) { - if (!$first) { - $result .= $insertStr; - } - $result .= $this->p($delayedAddNode, true); - $first = false; - } - $result .= $extraRight; - } - - return $result; - } - - /** - * Print node with fixups. - * - * Fixups here refer to the addition of extra parentheses, braces or other characters, that - * are required to preserve program semantics in a certain context (e.g. to maintain precedence - * or because only certain expressions are allowed in certain places). - * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print - * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode - * - * @return string Result of fixed-up print of subnode - */ - protected function pFixup(int $fixup, Node $subNode, $parentClass, int $subStartPos, int $subEndPos) : string { - switch ($fixup) { - case self::FIXUP_PREC_LEFT: - case self::FIXUP_PREC_RIGHT: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - list($precedence, $associativity) = $this->precedenceMap[$parentClass]; - return $this->pPrec($subNode, $precedence, $associativity, - $fixup === self::FIXUP_PREC_LEFT ? -1 : 1); - } - break; - case self::FIXUP_CALL_LHS: - if ($this->callLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_DEREF_LHS: - if ($this->dereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_BRACED_NAME: - case self::FIXUP_VAR_BRACED_NAME: - if ($subNode instanceof Expr - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') - . '{' . $this->p($subNode) . '}'; - } - break; - case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Scalar\EncapsedStringPart - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return '{' . $this->p($subNode) . '}'; - } - break; - default: - throw new \Exception('Cannot happen'); - } - - // Nothing special to do - return $this->p($subNode); - } - - /** - * Appends to a string, ensuring whitespace between label characters. - * - * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". - * Without safeAppend the result would be "echox", which does not preserve semantics. - * - * @param string $str - * @param string $append - */ - protected function safeAppend(string &$str, string $append) { - if ($str === "") { - $str = $append; - return; - } - - if ($append === "") { - return; - } - - if (!$this->labelCharMap[$append[0]] - || !$this->labelCharMap[$str[\strlen($str) - 1]]) { - $str .= $append; - } else { - $str .= " " . $append; - } - } - - /** - * Determines whether the LHS of a call must be wrapped in parenthesis. - * - * @param Node $node LHS of a call - * - * @return bool Whether parentheses are required - */ - protected function callLhsRequiresParens(Node $node) : bool { - return !($node instanceof Node\Name - || $node instanceof Expr\Variable - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_); - } - - /** - * Determines whether the LHS of a dereferencing operation must be wrapped in parenthesis. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function dereferenceLhsRequiresParens(Node $node) : bool { - return !($node instanceof Expr\Variable - || $node instanceof Node\Name - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\PropertyFetch - || $node instanceof Expr\NullsafePropertyFetch - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_ - || $node instanceof Scalar\String_ - || $node instanceof Expr\ConstFetch - || $node instanceof Expr\ClassConstFetch); - } - - /** - * Print modifiers, including trailing whitespace. - * - * @param int $modifiers Modifier mask to print - * - * @return string Printed modifiers - */ - protected function pModifiers(int $modifiers) { - return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_READONLY ? 'readonly ' : ''); - } - - /** - * Determine whether a list of nodes uses multiline formatting. - * - * @param (Node|null)[] $nodes Node list - * - * @return bool Whether multiline formatting is used - */ - protected function isMultiline(array $nodes) : bool { - if (\count($nodes) < 2) { - return false; - } - - $pos = -1; - foreach ($nodes as $node) { - if (null === $node) { - continue; - } - - $endPos = $node->getEndTokenPos() + 1; - if ($pos >= 0) { - $text = $this->origTokens->getTokenCode($pos, $endPos, 0); - if (false === strpos($text, "\n")) { - // We require that a newline is present between *every* item. If the formatting - // is inconsistent, with only some items having newlines, we don't consider it - // as multiline - return false; - } - } - $pos = $endPos; - } - - return true; - } - - /** - * Lazily initializes label char map. - * - * The label char map determines whether a certain character may occur in a label. - */ - protected function initializeLabelCharMap() { - if ($this->labelCharMap) return; - - $this->labelCharMap = []; - for ($i = 0; $i < 256; $i++) { - // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for - // older versions. - $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); - } - } - - /** - * Lazily initializes node list differ. - * - * The node list differ is used to determine differences between two array subnodes. - */ - protected function initializeNodeListDiffer() { - if ($this->nodeListDiffer) return; - - $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { - if ($a instanceof Node && $b instanceof Node) { - return $a === $b->getAttribute('origNode'); - } - // Can happen for array destructuring - return $a === null && $b === null; - }); - } - - /** - * Lazily initializes fixup map. - * - * The fixup map is used to determine whether a certain subnode of a certain node may require - * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. - */ - protected function initializeFixupMap() { - if ($this->fixupMap) return; - - $this->fixupMap = [ - Expr\PreInc::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PreDec::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PostInc::class => ['var' => self::FIXUP_PREC_LEFT], - Expr\PostDec::class => ['var' => self::FIXUP_PREC_LEFT], - Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_LEFT, - 'class' => self::FIXUP_PREC_RIGHT, // TODO: FIXUP_NEW_VARIABLE - ], - Expr\Ternary::class => [ - 'cond' => self::FIXUP_PREC_LEFT, - 'else' => self::FIXUP_PREC_RIGHT, - ], - - Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_DEREF_LHS], - Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\New_::class => ['class' => self::FIXUP_DEREF_LHS], // TODO: FIXUP_NEW_VARIABLE - Expr\MethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafeMethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_VAR_BRACED_NAME, - ], - Expr\PropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafePropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Scalar\Encapsed::class => [ - 'parts' => self::FIXUP_ENCAPSED, - ], - ]; - - $binaryOps = [ - BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, - BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, - BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, - BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, - BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, - BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, - BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, - BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, - BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, - ]; - foreach ($binaryOps as $binaryOp) { - $this->fixupMap[$binaryOp] = [ - 'left' => self::FIXUP_PREC_LEFT, - 'right' => self::FIXUP_PREC_RIGHT - ]; - } - - $assignOps = [ - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class - ]; - foreach ($assignOps as $assignOp) { - $this->fixupMap[$assignOp] = [ - 'var' => self::FIXUP_PREC_LEFT, - 'expr' => self::FIXUP_PREC_RIGHT, - ]; - } - - $prefixOps = [ - Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, - Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, - Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, - Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, - ]; - foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_RIGHT]; - } - } - - /** - * Lazily initializes the removal map. - * - * The removal map is used to determine which additional tokens should be removed when a - * certain node is replaced by null. - */ - protected function initializeRemovalMap() { - if ($this->removalMap) return; - - $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; - $stripLeft = ['left' => \T_WHITESPACE]; - $stripRight = ['right' => \T_WHITESPACE]; - $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; - $stripColon = ['left' => ':']; - $stripEquals = ['left' => '=']; - $this->removalMap = [ - 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'Expr_ArrayItem->key' => $stripDoubleArrow, - 'Expr_ArrowFunction->returnType' => $stripColon, - 'Expr_Closure->returnType' => $stripColon, - 'Expr_Exit->expr' => $stripBoth, - 'Expr_Ternary->if' => $stripBoth, - 'Expr_Yield->key' => $stripDoubleArrow, - 'Expr_Yield->value' => $stripBoth, - 'Param->type' => $stripRight, - 'Param->default' => $stripEquals, - 'Stmt_Break->num' => $stripBoth, - 'Stmt_Catch->var' => $stripLeft, - 'Stmt_ClassMethod->returnType' => $stripColon, - 'Stmt_Class->extends' => ['left' => \T_EXTENDS], - 'Stmt_Enum->scalarType' => $stripColon, - 'Stmt_EnumCase->expr' => $stripEquals, - 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], - 'Stmt_Continue->num' => $stripBoth, - 'Stmt_Foreach->keyVar' => $stripDoubleArrow, - 'Stmt_Function->returnType' => $stripColon, - 'Stmt_If->else' => $stripLeft, - 'Stmt_Namespace->name' => $stripLeft, - 'Stmt_Property->type' => $stripRight, - 'Stmt_PropertyProperty->default' => $stripEquals, - 'Stmt_Return->expr' => $stripBoth, - 'Stmt_StaticVar->default' => $stripEquals, - 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, - 'Stmt_TryCatch->finally' => $stripLeft, - // 'Stmt_Case->cond': Replace with "default" - // 'Stmt_Class->name': Unclear what to do - // 'Stmt_Declare->stmts': Not a plain node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node - ]; - } - - protected function initializeInsertionMap() { - if ($this->insertionMap) return; - - // TODO: "yield" where both key and value are inserted doesn't work - // [$find, $beforeToken, $extraLeft, $extraRight] - $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'Expr_ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ' : ', null], - 'Expr_Closure->returnType' => [')', false, ' : ', null], - 'Expr_Ternary->if' => ['?', false, ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], - 'Param->type' => [null, false, null, ' '], - 'Param->default' => [null, false, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], - 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null], - 'Stmt_Class->extends' => [null, false, ' extends ', null], - 'Stmt_Enum->scalarType' => [null, false, ' : ', null], - 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ' : ', null], - 'Stmt_If->else' => [null, false, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], - 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'Stmt_PropertyProperty->default' => [null, false, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], - 'Stmt_StaticVar->default' => [null, false, ' = ', null], - //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, false, ' ', null], - - // 'Expr_Exit->expr': Complicated due to optional () - // 'Stmt_Case->cond': Conversion from default to case - // 'Stmt_Class->name': Unclear - // 'Stmt_Declare->stmts': Not a proper node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node - ]; - } - - protected function initializeListInsertionMap() { - if ($this->listInsertionMap) return; - - $this->listInsertionMap = [ - // special - //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_Encapsed->parts' => '', - 'Stmt_Catch->types' => '|', - 'UnionType->types' => '|', - 'IntersectionType->types' => '&', - 'Stmt_If->elseifs' => ' ', - 'Stmt_TryCatch->catches' => ' ', - - // comma-separated lists - 'Expr_Array->items' => ', ', - 'Expr_ArrowFunction->params' => ', ', - 'Expr_Closure->params' => ', ', - 'Expr_Closure->uses' => ', ', - 'Expr_FuncCall->args' => ', ', - 'Expr_Isset->vars' => ', ', - 'Expr_List->items' => ', ', - 'Expr_MethodCall->args' => ', ', - 'Expr_NullsafeMethodCall->args' => ', ', - 'Expr_New->args' => ', ', - 'Expr_PrintableNewAnonClass->args' => ', ', - 'Expr_StaticCall->args' => ', ', - 'Stmt_ClassConst->consts' => ', ', - 'Stmt_ClassMethod->params' => ', ', - 'Stmt_Class->implements' => ', ', - 'Stmt_Enum->implements' => ', ', - 'Expr_PrintableNewAnonClass->implements' => ', ', - 'Stmt_Const->consts' => ', ', - 'Stmt_Declare->declares' => ', ', - 'Stmt_Echo->exprs' => ', ', - 'Stmt_For->init' => ', ', - 'Stmt_For->cond' => ', ', - 'Stmt_For->loop' => ', ', - 'Stmt_Function->params' => ', ', - 'Stmt_Global->vars' => ', ', - 'Stmt_GroupUse->uses' => ', ', - 'Stmt_Interface->extends' => ', ', - 'Stmt_Match->arms' => ', ', - 'Stmt_Property->props' => ', ', - 'Stmt_StaticVar->vars' => ', ', - 'Stmt_TraitUse->traits' => ', ', - 'Stmt_TraitUseAdaptation_Precedence->insteadof' => ', ', - 'Stmt_Unset->vars' => ', ', - 'Stmt_Use->uses' => ', ', - 'MatchArm->conds' => ', ', - 'AttributeGroup->attrs' => ', ', - - // statement lists - 'Expr_Closure->stmts' => "\n", - 'Stmt_Case->stmts' => "\n", - 'Stmt_Catch->stmts' => "\n", - 'Stmt_Class->stmts' => "\n", - 'Stmt_Enum->stmts' => "\n", - 'Expr_PrintableNewAnonClass->stmts' => "\n", - 'Stmt_Interface->stmts' => "\n", - 'Stmt_Trait->stmts' => "\n", - 'Stmt_ClassMethod->stmts' => "\n", - 'Stmt_Declare->stmts' => "\n", - 'Stmt_Do->stmts' => "\n", - 'Stmt_ElseIf->stmts' => "\n", - 'Stmt_Else->stmts' => "\n", - 'Stmt_Finally->stmts' => "\n", - 'Stmt_Foreach->stmts' => "\n", - 'Stmt_For->stmts' => "\n", - 'Stmt_Function->stmts' => "\n", - 'Stmt_If->stmts' => "\n", - 'Stmt_Namespace->stmts' => "\n", - 'Stmt_Class->attrGroups' => "\n", - 'Stmt_Enum->attrGroups' => "\n", - 'Stmt_EnumCase->attrGroups' => "\n", - 'Stmt_Interface->attrGroups' => "\n", - 'Stmt_Trait->attrGroups' => "\n", - 'Stmt_Function->attrGroups' => "\n", - 'Stmt_ClassMethod->attrGroups' => "\n", - 'Stmt_ClassConst->attrGroups' => "\n", - 'Stmt_Property->attrGroups' => "\n", - 'Expr_PrintableNewAnonClass->attrGroups' => ' ', - 'Expr_Closure->attrGroups' => ' ', - 'Expr_ArrowFunction->attrGroups' => ' ', - 'Param->attrGroups' => ' ', - 'Stmt_Switch->cases' => "\n", - 'Stmt_TraitUse->adaptations' => "\n", - 'Stmt_TryCatch->stmts' => "\n", - 'Stmt_While->stmts' => "\n", - - // dummy for top-level context - 'File->stmts' => "\n", - ]; - } - - protected function initializeEmptyListInsertionMap() { - if ($this->emptyListInsertionMap) return; - - // TODO Insertion into empty statement lists. - - // [$find, $extraLeft, $extraRight] - $this->emptyListInsertionMap = [ - 'Expr_ArrowFunction->params' => ['(', '', ''], - 'Expr_Closure->uses' => [')', ' use(', ')'], - 'Expr_Closure->params' => ['(', '', ''], - 'Expr_FuncCall->args' => ['(', '', ''], - 'Expr_MethodCall->args' => ['(', '', ''], - 'Expr_NullsafeMethodCall->args' => ['(', '', ''], - 'Expr_New->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->implements' => [null, ' implements ', ''], - 'Expr_StaticCall->args' => ['(', '', ''], - 'Stmt_Class->implements' => [null, ' implements ', ''], - 'Stmt_Enum->implements' => [null, ' implements ', ''], - 'Stmt_ClassMethod->params' => ['(', '', ''], - 'Stmt_Interface->extends' => [null, ' extends ', ''], - 'Stmt_Function->params' => ['(', '', ''], - - /* These cannot be empty to start with: - * Expr_Isset->vars - * Stmt_Catch->types - * Stmt_Const->consts - * Stmt_ClassConst->consts - * Stmt_Declare->declares - * Stmt_Echo->exprs - * Stmt_Global->vars - * Stmt_GroupUse->uses - * Stmt_Property->props - * Stmt_StaticVar->vars - * Stmt_TraitUse->traits - * Stmt_TraitUseAdaptation_Precedence->insteadof - * Stmt_Unset->vars - * Stmt_Use->uses - * UnionType->types - */ - - /* TODO - * Stmt_If->elseifs - * Stmt_TryCatch->catches - * Expr_Array->items - * Expr_List->items - * Stmt_For->init - * Stmt_For->cond - * Stmt_For->loop - */ - ]; - } - - protected function initializeModifierChangeMap() { - if ($this->modifierChangeMap) return; - - $this->modifierChangeMap = [ - 'Stmt_ClassConst->flags' => \T_CONST, - 'Stmt_ClassMethod->flags' => \T_FUNCTION, - 'Stmt_Class->flags' => \T_CLASS, - 'Stmt_Property->flags' => \T_VARIABLE, - 'Param->flags' => \T_VARIABLE, - //'Stmt_TraitUseAdaptation_Alias->newModifier' => 0, // TODO - ]; - - // List of integer subnodes that are not modifiers: - // Expr_Include->type - // Stmt_GroupUse->type - // Stmt_Use->type - // Stmt_UseUse->type - } -} diff --git a/lib/paragonie/random_compat/LICENSE b/lib/paragonie/random_compat/LICENSE deleted file mode 100644 index 45c7017df..000000000 --- a/lib/paragonie/random_compat/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Paragon Initiative Enterprises - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/lib/paragonie/random_compat/build-phar.sh b/lib/paragonie/random_compat/build-phar.sh deleted file mode 100644 index b4a5ba31c..000000000 --- a/lib/paragonie/random_compat/build-phar.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) - -php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/lib/paragonie/random_compat/composer.json b/lib/paragonie/random_compat/composer.json deleted file mode 100644 index f2b9c4e51..000000000 --- a/lib/paragonie/random_compat/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "paragonie/random_compat", - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "random", - "polyfill", - "pseudorandom" - ], - "license": "MIT", - "type": "library", - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "support": { - "issues": "https://github.com/paragonie/random_compat/issues", - "email": "info@paragonie.com", - "source": "https://github.com/paragonie/random_compat" - }, - "require": { - "php": ">= 7" - }, - "require-dev": { - "vimeo/psalm": "^1", - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - } -} diff --git a/lib/paragonie/random_compat/dist/random_compat.phar.pubkey b/lib/paragonie/random_compat/dist/random_compat.phar.pubkey deleted file mode 100644 index eb50ebfcd..000000000 --- a/lib/paragonie/random_compat/dist/random_compat.phar.pubkey +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PUBLIC KEY----- -MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm -pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p -+h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc ------END PUBLIC KEY----- diff --git a/lib/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/lib/paragonie/random_compat/dist/random_compat.phar.pubkey.asc deleted file mode 100644 index 6a1d7f300..000000000 --- a/lib/paragonie/random_compat/dist/random_compat.phar.pubkey.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (MingW32) - -iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip -QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg -1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW -NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA -NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV -JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= -=B6+8 ------END PGP SIGNATURE----- diff --git a/lib/paragonie/random_compat/lib/random.php b/lib/paragonie/random_compat/lib/random.php deleted file mode 100644 index c7731a56f..000000000 --- a/lib/paragonie/random_compat/lib/random.php +++ /dev/null @@ -1,32 +0,0 @@ -buildFromDirectory(dirname(__DIR__).'/lib'); -rename( - dirname(__DIR__).'/lib/index.php', - dirname(__DIR__).'/lib/random.php' -); - -/** - * If we pass an (optional) path to a private key as a second argument, we will - * sign the Phar with OpenSSL. - * - * If you leave this out, it will produce an unsigned .phar! - */ -if ($argc > 1) { - if (!@is_readable($argv[1])) { - echo 'Could not read the private key file:', $argv[1], "\n"; - exit(255); - } - $pkeyFile = file_get_contents($argv[1]); - - $private = openssl_get_privatekey($pkeyFile); - if ($private !== false) { - $pkey = ''; - openssl_pkey_export($private, $pkey); - $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); - - /** - * Save the corresponding public key to the file - */ - if (!@is_readable($dist.'/random_compat.phar.pubkey')) { - $details = openssl_pkey_get_details($private); - file_put_contents( - $dist.'/random_compat.phar.pubkey', - $details['key'] - ); - } - } else { - echo 'An error occurred reading the private key from OpenSSL.', "\n"; - exit(255); - } -} diff --git a/lib/paragonie/random_compat/psalm-autoload.php b/lib/paragonie/random_compat/psalm-autoload.php deleted file mode 100644 index d71d1b818..000000000 --- a/lib/paragonie/random_compat/psalm-autoload.php +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/lib/pear/archive_tar/.github/FUNDING.yml b/lib/pear/archive_tar/.github/FUNDING.yml deleted file mode 100644 index 4a0f72b64..000000000 --- a/lib/pear/archive_tar/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -github: [mrook] -patreon: michielrook diff --git a/lib/pear/archive_tar/.github/dependabot.yml b/lib/pear/archive_tar/.github/dependabot.yml deleted file mode 100644 index a51bb0bd4..000000000 --- a/lib/pear/archive_tar/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "composer" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "daily" diff --git a/lib/pear/archive_tar/.github/workflows/build.yml b/lib/pear/archive_tar/.github/workflows/build.yml deleted file mode 100644 index 5bcc73b50..000000000 --- a/lib/pear/archive_tar/.github/workflows/build.yml +++ /dev/null @@ -1,40 +0,0 @@ -on: - push: - branches: - - master - pull_request: - -jobs: - test: - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-latest ] - php: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ] - dependencies: [ 'locked' ] - - name: PHP ${{ matrix.php }} on ${{ matrix.operating-system }} with ${{ matrix.dependencies }} dependencies - - steps: - - uses: actions/checkout@v2 - name: Checkout repository - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - - - uses: ramsey/composer-install@v1 - with: - dependency-versions: ${{ matrix.dependencies }} - - - name: Install PEAR - run: | - sudo apt-get install php-pear - - - name: Run tests - run: | - sudo pear install -f package.xml - pear version - pear run-tests -qr tests/ || { cat run-tests.log; for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done; exit 1; } diff --git a/lib/pear/archive_tar/.gitignore b/lib/pear/archive_tar/.gitignore deleted file mode 100644 index c703991e8..000000000 --- a/lib/pear/archive_tar/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# composer related -composer.lock -composer.phar -vendor -# IDE -.idea -# eclipse -.buildpath -.project -.settings -# pear -.tarballs -*.tgz -# phpunit -build diff --git a/lib/pear/archive_tar/.travis.yml b/lib/pear/archive_tar/.travis.yml deleted file mode 100644 index f103381b1..000000000 --- a/lib/pear/archive_tar/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -sudo: false -language: php -matrix: - fast_finish: true - allow_failures: - - php: nightly - include: - - php: 5.2 - dist: precise - - php: 5.3 - dist: precise - - php: 5.4 - dist: trusty - - php: 5.5 - dist: trusty - - php: 5.6 - - php: 7.0 - - php: 7.1 - - php: 7.2 - - php: 7.3 - - php: 7.4 - - php: nightly -install: -# - pear upgrade --force --alldeps pear/pear - - pear install -f package.xml -script: - - pear version - - pear run-tests -qr tests/ - - for i in `find tests/ -name '*.out'`; do echo "$i"; cat "$i"; done diff --git a/lib/pear/archive_tar/Archive/Tar.php b/lib/pear/archive_tar/Archive/Tar.php deleted file mode 100644 index 3356ad6ac..000000000 --- a/lib/pear/archive_tar/Archive/Tar.php +++ /dev/null @@ -1,2530 +0,0 @@ - - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @category File_Formats - * @package Archive_Tar - * @author Vincent Blavet - * @copyright 1997-2010 The Authors - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id$ - * @link http://pear.php.net/package/Archive_Tar - */ - -// If the PEAR class cannot be loaded via the autoloader, -// then try to require_once it from the PHP include path. -if (!class_exists('PEAR')) { - require_once 'PEAR.php'; -} - -define('ARCHIVE_TAR_ATT_SEPARATOR', 90001); -define('ARCHIVE_TAR_END_BLOCK', pack("a512", '')); - -if (!function_exists('gzopen') && function_exists('gzopen64')) { - function gzopen($filename, $mode, $use_include_path = 0) - { - return gzopen64($filename, $mode, $use_include_path); - } -} - -if (!function_exists('gztell') && function_exists('gztell64')) { - function gztell($zp) - { - return gztell64($zp); - } -} - -if (!function_exists('gzseek') && function_exists('gzseek64')) { - function gzseek($zp, $offset, $whence = SEEK_SET) - { - return gzseek64($zp, $offset, $whence); - } -} - -/** - * Creates a (compressed) Tar archive - * - * @package Archive_Tar - * @author Vincent Blavet - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version $Revision$ - */ -class Archive_Tar extends PEAR -{ - /** - * @var string Name of the Tar - */ - public $_tarname = ''; - - /** - * @var boolean if true, the Tar file will be gzipped - */ - public $_compress = false; - - /** - * @var string Type of compression : 'none', 'gz', 'bz2' or 'lzma2' - */ - public $_compress_type = 'none'; - - /** - * @var string Explode separator - */ - public $_separator = ' '; - - /** - * @var file descriptor - */ - public $_file = 0; - - /** - * @var string Local Tar name of a remote Tar (http:// or ftp://) - */ - public $_temp_tarname = ''; - - /** - * @var string regular expression for ignoring files or directories - */ - public $_ignore_regexp = ''; - - /** - * @var object PEAR_Error object - */ - public $error_object = null; - - /** - * Format for data extraction - * - * @var string - */ - public $_fmt = ''; - - /** - * @var int Length of the read buffer in bytes - */ - protected $buffer_length; - - /** - * Archive_Tar Class constructor. This flavour of the constructor only - * declare a new Archive_Tar object, identifying it by the name of the - * tar file. - * If the compress argument is set the tar will be read or created as a - * gzip or bz2 compressed TAR file. - * - * @param string $p_tarname The name of the tar archive to create - * @param string $p_compress can be null, 'gz', 'bz2' or 'lzma2'. This - * parameter indicates if gzip, bz2 or lzma2 compression - * is required. For compatibility reason the - * boolean value 'true' means 'gz'. - * @param int $buffer_length Length of the read buffer in bytes - * - * @return bool - */ - public function __construct($p_tarname, $p_compress = null, $buffer_length = 512) - { - parent::__construct(); - - $this->_compress = false; - $this->_compress_type = 'none'; - if (($p_compress === null) || ($p_compress == '')) { - if (@file_exists($p_tarname)) { - if ($fp = @fopen($p_tarname, "rb")) { - // look for gzip magic cookie - $data = fread($fp, 2); - fclose($fp); - if ($data == "\37\213") { - $this->_compress = true; - $this->_compress_type = 'gz'; - // No sure it's enought for a magic code .... - } elseif ($data == "BZ") { - $this->_compress = true; - $this->_compress_type = 'bz2'; - } elseif (file_get_contents($p_tarname, false, null, 1, 4) == '7zXZ') { - $this->_compress = true; - $this->_compress_type = 'lzma2'; - } - } - } else { - // probably a remote file or some file accessible - // through a stream interface - if (substr($p_tarname, -2) == 'gz') { - $this->_compress = true; - $this->_compress_type = 'gz'; - } elseif ((substr($p_tarname, -3) == 'bz2') || - (substr($p_tarname, -2) == 'bz') - ) { - $this->_compress = true; - $this->_compress_type = 'bz2'; - } else { - if (substr($p_tarname, -2) == 'xz') { - $this->_compress = true; - $this->_compress_type = 'lzma2'; - } - } - } - } else { - if (($p_compress === true) || ($p_compress == 'gz')) { - $this->_compress = true; - $this->_compress_type = 'gz'; - } else { - if ($p_compress == 'bz2') { - $this->_compress = true; - $this->_compress_type = 'bz2'; - } else { - if ($p_compress == 'lzma2') { - $this->_compress = true; - $this->_compress_type = 'lzma2'; - } else { - $this->_error( - "Unsupported compression type '$p_compress'\n" . - "Supported types are 'gz', 'bz2' and 'lzma2'.\n" - ); - return false; - } - } - } - } - $this->_tarname = $p_tarname; - if ($this->_compress) { // assert zlib or bz2 or xz extension support - if ($this->_compress_type == 'gz') { - $extname = 'zlib'; - } else { - if ($this->_compress_type == 'bz2') { - $extname = 'bz2'; - } else { - if ($this->_compress_type == 'lzma2') { - $extname = 'xz'; - } - } - } - - if (!extension_loaded($extname)) { - PEAR::loadExtension($extname); - } - if (!extension_loaded($extname)) { - $this->_error( - "The extension '$extname' couldn't be found.\n" . - "Please make sure your version of PHP was built " . - "with '$extname' support.\n" - ); - return false; - } - } - - - if (version_compare(PHP_VERSION, "5.5.0-dev") < 0) { - $this->_fmt = "a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/" . - "a8checksum/a1typeflag/a100link/a6magic/a2version/" . - "a32uname/a32gname/a8devmajor/a8devminor/a131prefix"; - } else { - $this->_fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" . - "Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" . - "Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix"; - } - - - $this->buffer_length = $buffer_length; - } - - public function __destruct() - { - $this->_close(); - // ----- Look for a local copy to delete - if ($this->_temp_tarname != '' && (bool) preg_match('/^tar[[:alnum:]]*\.tmp$/', $this->_temp_tarname)) { - @unlink($this->_temp_tarname); - } - } - - /** - * This method creates the archive file and add the files / directories - * that are listed in $p_filelist. - * If a file with the same name exist and is writable, it is replaced - * by the new tar. - * The method return false and a PEAR error text. - * The $p_filelist parameter can be an array of string, each string - * representing a filename or a directory name with their path if - * needed. It can also be a single string with names separated by a - * single blank. - * For each directory added in the archive, the files and - * sub-directories are also added. - * See also createModify() method for more details. - * - * @param array $p_filelist An array of filenames and directory names, or a - * single string with names separated by a single - * blank space. - * - * @return true on success, false on error. - * @see createModify() - */ - public function create($p_filelist) - { - return $this->createModify($p_filelist, '', ''); - } - - /** - * This method add the files / directories that are listed in $p_filelist in - * the archive. If the archive does not exist it is created. - * The method return false and a PEAR error text. - * The files and directories listed are only added at the end of the archive, - * even if a file with the same name is already archived. - * See also createModify() method for more details. - * - * @param array $p_filelist An array of filenames and directory names, or a - * single string with names separated by a single - * blank space. - * - * @return true on success, false on error. - * @see createModify() - * @access public - */ - public function add($p_filelist) - { - return $this->addModify($p_filelist, '', ''); - } - - /** - * @param string $p_path - * @param bool $p_preserve - * @param bool $p_symlinks - * @return bool - */ - public function extract($p_path = '', $p_preserve = false, $p_symlinks = true) - { - return $this->extractModify($p_path, '', $p_preserve, $p_symlinks); - } - - /** - * @return array|int - */ - public function listContent() - { - $v_list_detail = array(); - - if ($this->_openRead()) { - if (!$this->_extractList('', $v_list_detail, "list", '', '')) { - unset($v_list_detail); - $v_list_detail = 0; - } - $this->_close(); - } - - return $v_list_detail; - } - - /** - * This method creates the archive file and add the files / directories - * that are listed in $p_filelist. - * If the file already exists and is writable, it is replaced by the - * new tar. It is a create and not an add. If the file exists and is - * read-only or is a directory it is not replaced. The method return - * false and a PEAR error text. - * The $p_filelist parameter can be an array of string, each string - * representing a filename or a directory name with their path if - * needed. It can also be a single string with names separated by a - * single blank. - * The path indicated in $p_remove_dir will be removed from the - * memorized path of each file / directory listed when this path - * exists. By default nothing is removed (empty path '') - * The path indicated in $p_add_dir will be added at the beginning of - * the memorized path of each file / directory listed. However it can - * be set to empty ''. The adding of a path is done after the removing - * of path. - * The path add/remove ability enables the user to prepare an archive - * for extraction in a different path than the origin files are. - * See also addModify() method for file adding properties. - * - * @param array $p_filelist An array of filenames and directory names, - * or a single string with names separated by - * a single blank space. - * @param string $p_add_dir A string which contains a path to be added - * to the memorized path of each element in - * the list. - * @param string $p_remove_dir A string which contains a path to be - * removed from the memorized path of each - * element in the list, when relevant. - * - * @return boolean true on success, false on error. - * @see addModify() - */ - public function createModify($p_filelist, $p_add_dir, $p_remove_dir = '') - { - $v_result = true; - - if (!$this->_openWrite()) { - return false; - } - - if ($p_filelist != '') { - if (is_array($p_filelist)) { - $v_list = $p_filelist; - } elseif (is_string($p_filelist)) { - $v_list = explode($this->_separator, $p_filelist); - } else { - $this->_cleanFile(); - $this->_error('Invalid file list'); - return false; - } - - $v_result = $this->_addList($v_list, $p_add_dir, $p_remove_dir); - } - - if ($v_result) { - $this->_writeFooter(); - $this->_close(); - } else { - $this->_cleanFile(); - } - - return $v_result; - } - - /** - * This method add the files / directories listed in $p_filelist at the - * end of the existing archive. If the archive does not yet exists it - * is created. - * The $p_filelist parameter can be an array of string, each string - * representing a filename or a directory name with their path if - * needed. It can also be a single string with names separated by a - * single blank. - * The path indicated in $p_remove_dir will be removed from the - * memorized path of each file / directory listed when this path - * exists. By default nothing is removed (empty path '') - * The path indicated in $p_add_dir will be added at the beginning of - * the memorized path of each file / directory listed. However it can - * be set to empty ''. The adding of a path is done after the removing - * of path. - * The path add/remove ability enables the user to prepare an archive - * for extraction in a different path than the origin files are. - * If a file/dir is already in the archive it will only be added at the - * end of the archive. There is no update of the existing archived - * file/dir. However while extracting the archive, the last file will - * replace the first one. This results in a none optimization of the - * archive size. - * If a file/dir does not exist the file/dir is ignored. However an - * error text is send to PEAR error. - * If a file/dir is not readable the file/dir is ignored. However an - * error text is send to PEAR error. - * - * @param array $p_filelist An array of filenames and directory - * names, or a single string with names - * separated by a single blank space. - * @param string $p_add_dir A string which contains a path to be - * added to the memorized path of each - * element in the list. - * @param string $p_remove_dir A string which contains a path to be - * removed from the memorized path of - * each element in the list, when - * relevant. - * - * @return true on success, false on error. - */ - public function addModify($p_filelist, $p_add_dir, $p_remove_dir = '') - { - $v_result = true; - - if (!$this->_isArchive()) { - $v_result = $this->createModify( - $p_filelist, - $p_add_dir, - $p_remove_dir - ); - } else { - if (is_array($p_filelist)) { - $v_list = $p_filelist; - } elseif (is_string($p_filelist)) { - $v_list = explode($this->_separator, $p_filelist); - } else { - $this->_error('Invalid file list'); - return false; - } - - $v_result = $this->_append($v_list, $p_add_dir, $p_remove_dir); - } - - return $v_result; - } - - /** - * This method add a single string as a file at the - * end of the existing archive. If the archive does not yet exists it - * is created. - * - * @param string $p_filename A string which contains the full - * filename path that will be associated - * with the string. - * @param string $p_string The content of the file added in - * the archive. - * @param bool|int $p_datetime A custom date/time (unix timestamp) - * for the file (optional). - * @param array $p_params An array of optional params: - * stamp => the datetime (replaces - * datetime above if it exists) - * mode => the permissions on the - * file (600 by default) - * type => is this a link? See the - * tar specification for details. - * (default = regular file) - * uid => the user ID of the file - * (default = 0 = root) - * gid => the group ID of the file - * (default = 0 = root) - * - * @return true on success, false on error. - */ - public function addString($p_filename, $p_string, $p_datetime = false, $p_params = array()) - { - $p_stamp = @$p_params["stamp"] ? $p_params["stamp"] : ($p_datetime ? $p_datetime : time()); - $p_mode = @$p_params["mode"] ? $p_params["mode"] : 0600; - $p_type = @$p_params["type"] ? $p_params["type"] : ""; - $p_uid = @$p_params["uid"] ? $p_params["uid"] : ""; - $p_gid = @$p_params["gid"] ? $p_params["gid"] : ""; - $v_result = true; - - if (!$this->_isArchive()) { - if (!$this->_openWrite()) { - return false; - } - $this->_close(); - } - - if (!$this->_openAppend()) { - return false; - } - - // Need to check the get back to the temporary file ? .... - $v_result = $this->_addString($p_filename, $p_string, $p_datetime, $p_params); - - $this->_writeFooter(); - - $this->_close(); - - return $v_result; - } - - /** - * This method extract all the content of the archive in the directory - * indicated by $p_path. When relevant the memorized path of the - * files/dir can be modified by removing the $p_remove_path path at the - * beginning of the file/dir path. - * While extracting a file, if the directory path does not exists it is - * created. - * While extracting a file, if the file already exists it is replaced - * without looking for last modification date. - * While extracting a file, if the file already exists and is write - * protected, the extraction is aborted. - * While extracting a file, if a directory with the same name already - * exists, the extraction is aborted. - * While extracting a directory, if a file with the same name already - * exists, the extraction is aborted. - * While extracting a file/directory if the destination directory exist - * and is write protected, or does not exist but can not be created, - * the extraction is aborted. - * If after extraction an extracted file does not show the correct - * stored file size, the extraction is aborted. - * When the extraction is aborted, a PEAR error text is set and false - * is returned. However the result can be a partial extraction that may - * need to be manually cleaned. - * - * @param string $p_path The path of the directory where the - * files/dir need to by extracted. - * @param string $p_remove_path Part of the memorized path that can be - * removed if present at the beginning of - * the file/dir path. - * @param boolean $p_preserve Preserve user/group ownership of files - * @param boolean $p_symlinks Allow symlinks. - * - * @return boolean true on success, false on error. - * @see extractList() - */ - public function extractModify($p_path, $p_remove_path, $p_preserve = false, $p_symlinks = true) - { - $v_result = true; - $v_list_detail = array(); - - if ($v_result = $this->_openRead()) { - $v_result = $this->_extractList( - $p_path, - $v_list_detail, - "complete", - 0, - $p_remove_path, - $p_preserve, - $p_symlinks - ); - $this->_close(); - } - - return $v_result; - } - - /** - * This method extract from the archive one file identified by $p_filename. - * The return value is a string with the file content, or NULL on error. - * - * @param string $p_filename The path of the file to extract in a string. - * - * @return a string with the file content or NULL. - */ - public function extractInString($p_filename) - { - if ($this->_openRead()) { - $v_result = $this->_extractInString($p_filename); - $this->_close(); - } else { - $v_result = null; - } - - return $v_result; - } - - /** - * This method extract from the archive only the files indicated in the - * $p_filelist. These files are extracted in the current directory or - * in the directory indicated by the optional $p_path parameter. - * If indicated the $p_remove_path can be used in the same way as it is - * used in extractModify() method. - * - * @param array $p_filelist An array of filenames and directory names, - * or a single string with names separated - * by a single blank space. - * @param string $p_path The path of the directory where the - * files/dir need to by extracted. - * @param string $p_remove_path Part of the memorized path that can be - * removed if present at the beginning of - * the file/dir path. - * @param boolean $p_preserve Preserve user/group ownership of files - * @param boolean $p_symlinks Allow symlinks. - * - * @return true on success, false on error. - * @see extractModify() - */ - public function extractList($p_filelist, $p_path = '', $p_remove_path = '', $p_preserve = false, $p_symlinks = true) - { - $v_result = true; - $v_list_detail = array(); - - if (is_array($p_filelist)) { - $v_list = $p_filelist; - } elseif (is_string($p_filelist)) { - $v_list = explode($this->_separator, $p_filelist); - } else { - $this->_error('Invalid string list'); - return false; - } - - if ($v_result = $this->_openRead()) { - $v_result = $this->_extractList( - $p_path, - $v_list_detail, - "partial", - $v_list, - $p_remove_path, - $p_preserve, - $p_symlinks - ); - $this->_close(); - } - - return $v_result; - } - - /** - * This method set specific attributes of the archive. It uses a variable - * list of parameters, in the format attribute code + attribute values : - * $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ','); - * - * @return true on success, false on error. - */ - public function setAttribute() - { - $v_result = true; - - // ----- Get the number of variable list of arguments - if (($v_size = func_num_args()) == 0) { - return true; - } - - // ----- Get the arguments - $v_att_list = func_get_args(); - - // ----- Read the attributes - $i = 0; - while ($i < $v_size) { - - // ----- Look for next option - switch ($v_att_list[$i]) { - // ----- Look for options that request a string value - case ARCHIVE_TAR_ATT_SEPARATOR : - // ----- Check the number of parameters - if (($i + 1) >= $v_size) { - $this->_error( - 'Invalid number of parameters for ' - . 'attribute ARCHIVE_TAR_ATT_SEPARATOR' - ); - return false; - } - - // ----- Get the value - $this->_separator = $v_att_list[$i + 1]; - $i++; - break; - - default : - $this->_error('Unknown attribute code ' . $v_att_list[$i] . ''); - return false; - } - - // ----- Next attribute - $i++; - } - - return $v_result; - } - - /** - * This method sets the regular expression for ignoring files and directories - * at import, for example: - * $arch->setIgnoreRegexp("#CVS|\.svn#"); - * - * @param string $regexp regular expression defining which files or directories to ignore - */ - public function setIgnoreRegexp($regexp) - { - $this->_ignore_regexp = $regexp; - } - - /** - * This method sets the regular expression for ignoring all files and directories - * matching the filenames in the array list at import, for example: - * $arch->setIgnoreList(array('CVS', '.svn', 'bin/tool')); - * - * @param array $list a list of file or directory names to ignore - * - * @access public - */ - public function setIgnoreList($list) - { - $list = str_replace(array('#', '.', '^', '$'), array('\#', '\.', '\^', '\$'), $list); - $regexp = '#/' . join('$|/', $list) . '#'; - $this->setIgnoreRegexp($regexp); - } - - /** - * @param string $p_message - */ - public function _error($p_message) - { - $this->error_object = $this->raiseError($p_message); - } - - /** - * @param string $p_message - */ - public function _warning($p_message) - { - $this->error_object = $this->raiseError($p_message); - } - - /** - * @param string $p_filename - * @return bool - */ - public function _isArchive($p_filename = null) - { - if ($p_filename == null) { - $p_filename = $this->_tarname; - } - clearstatcache(); - return @is_file($p_filename) && !@is_link($p_filename); - } - - /** - * @return bool - */ - public function _openWrite() - { - if ($this->_compress_type == 'gz' && function_exists('gzopen')) { - $this->_file = @gzopen($this->_tarname, "wb9"); - } else { - if ($this->_compress_type == 'bz2' && function_exists('bzopen')) { - $this->_file = @bzopen($this->_tarname, "w"); - } else { - if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) { - $this->_file = @xzopen($this->_tarname, 'w'); - } else { - if ($this->_compress_type == 'none') { - $this->_file = @fopen($this->_tarname, "wb"); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - return false; - } - } - } - } - - if ($this->_file == 0) { - $this->_error( - 'Unable to open in write mode \'' - . $this->_tarname . '\'' - ); - return false; - } - - return true; - } - - /** - * @return bool - */ - public function _openRead() - { - if (strtolower(substr($this->_tarname, 0, 7)) == 'http://') { - - // ----- Look if a local copy need to be done - if ($this->_temp_tarname == '') { - $this->_temp_tarname = uniqid('tar') . '.tmp'; - if (!$v_file_from = @fopen($this->_tarname, 'rb')) { - $this->_error( - 'Unable to open in read mode \'' - . $this->_tarname . '\'' - ); - $this->_temp_tarname = ''; - return false; - } - if (!$v_file_to = @fopen($this->_temp_tarname, 'wb')) { - $this->_error( - 'Unable to open in write mode \'' - . $this->_temp_tarname . '\'' - ); - $this->_temp_tarname = ''; - return false; - } - while ($v_data = @fread($v_file_from, 1024)) { - @fwrite($v_file_to, $v_data); - } - @fclose($v_file_from); - @fclose($v_file_to); - } - - // ----- File to open if the local copy - $v_filename = $this->_temp_tarname; - } else { - // ----- File to open if the normal Tar file - - $v_filename = $this->_tarname; - } - - if ($this->_compress_type == 'gz' && function_exists('gzopen')) { - $this->_file = @gzopen($v_filename, "rb"); - } else { - if ($this->_compress_type == 'bz2' && function_exists('bzopen')) { - $this->_file = @bzopen($v_filename, "r"); - } else { - if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) { - $this->_file = @xzopen($v_filename, "r"); - } else { - if ($this->_compress_type == 'none') { - $this->_file = @fopen($v_filename, "rb"); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - return false; - } - } - } - } - - if ($this->_file == 0) { - $this->_error('Unable to open in read mode \'' . $v_filename . '\''); - return false; - } - - return true; - } - - /** - * @return bool - */ - public function _openReadWrite() - { - if ($this->_compress_type == 'gz') { - $this->_file = @gzopen($this->_tarname, "r+b"); - } else { - if ($this->_compress_type == 'bz2') { - $this->_error( - 'Unable to open bz2 in read/write mode \'' - . $this->_tarname . '\' (limitation of bz2 extension)' - ); - return false; - } else { - if ($this->_compress_type == 'lzma2') { - $this->_error( - 'Unable to open lzma2 in read/write mode \'' - . $this->_tarname . '\' (limitation of lzma2 extension)' - ); - return false; - } else { - if ($this->_compress_type == 'none') { - $this->_file = @fopen($this->_tarname, "r+b"); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - return false; - } - } - } - } - - if ($this->_file == 0) { - $this->_error( - 'Unable to open in read/write mode \'' - . $this->_tarname . '\'' - ); - return false; - } - - return true; - } - - /** - * @return bool - */ - public function _close() - { - //if (isset($this->_file)) { - if (is_resource($this->_file)) { - if ($this->_compress_type == 'gz') { - @gzclose($this->_file); - } else { - if ($this->_compress_type == 'bz2') { - @bzclose($this->_file); - } else { - if ($this->_compress_type == 'lzma2') { - @xzclose($this->_file); - } else { - if ($this->_compress_type == 'none') { - @fclose($this->_file); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - } - } - } - } - - $this->_file = 0; - } - - // ----- Look if a local copy need to be erase - // Note that it might be interesting to keep the url for a time : ToDo - if ($this->_temp_tarname != '') { - @unlink($this->_temp_tarname); - $this->_temp_tarname = ''; - } - - return true; - } - - /** - * @return bool - */ - public function _cleanFile() - { - $this->_close(); - - // ----- Look for a local copy - if ($this->_temp_tarname != '') { - // ----- Remove the local copy but not the remote tarname - @unlink($this->_temp_tarname); - $this->_temp_tarname = ''; - } else { - // ----- Remove the local tarname file - @unlink($this->_tarname); - } - $this->_tarname = ''; - - return true; - } - - /** - * @param mixed $p_binary_data - * @param integer $p_len - * @return bool - */ - public function _writeBlock($p_binary_data, $p_len = null) - { - if (is_resource($this->_file)) { - if ($p_len === null) { - if ($this->_compress_type == 'gz') { - @gzputs($this->_file, $p_binary_data); - } else { - if ($this->_compress_type == 'bz2') { - @bzwrite($this->_file, $p_binary_data); - } else { - if ($this->_compress_type == 'lzma2') { - @xzwrite($this->_file, $p_binary_data); - } else { - if ($this->_compress_type == 'none') { - @fputs($this->_file, $p_binary_data); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - } - } - } - } - } else { - if ($this->_compress_type == 'gz') { - @gzputs($this->_file, $p_binary_data, $p_len); - } else { - if ($this->_compress_type == 'bz2') { - @bzwrite($this->_file, $p_binary_data, $p_len); - } else { - if ($this->_compress_type == 'lzma2') { - @xzwrite($this->_file, $p_binary_data, $p_len); - } else { - if ($this->_compress_type == 'none') { - @fputs($this->_file, $p_binary_data, $p_len); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - } - } - } - } - } - } - return true; - } - - /** - * @return null|string - */ - public function _readBlock() - { - $v_block = null; - if (is_resource($this->_file)) { - if ($this->_compress_type == 'gz') { - $v_block = @gzread($this->_file, 512); - } else { - if ($this->_compress_type == 'bz2') { - $v_block = @bzread($this->_file, 512); - } else { - if ($this->_compress_type == 'lzma2') { - $v_block = @xzread($this->_file, 512); - } else { - if ($this->_compress_type == 'none') { - $v_block = @fread($this->_file, 512); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - } - } - } - } - } - return $v_block; - } - - /** - * @param null $p_len - * @return bool - */ - public function _jumpBlock($p_len = null) - { - if (is_resource($this->_file)) { - if ($p_len === null) { - $p_len = 1; - } - - if ($this->_compress_type == 'gz') { - @gzseek($this->_file, gztell($this->_file) + ($p_len * 512)); - } else { - if ($this->_compress_type == 'bz2') { - // ----- Replace missing bztell() and bzseek() - for ($i = 0; $i < $p_len; $i++) { - $this->_readBlock(); - } - } else { - if ($this->_compress_type == 'lzma2') { - // ----- Replace missing xztell() and xzseek() - for ($i = 0; $i < $p_len; $i++) { - $this->_readBlock(); - } - } else { - if ($this->_compress_type == 'none') { - @fseek($this->_file, $p_len * 512, SEEK_CUR); - } else { - $this->_error( - 'Unknown or missing compression type (' - . $this->_compress_type . ')' - ); - } - } - } - } - } - return true; - } - - /** - * @return bool - */ - public function _writeFooter() - { - if (is_resource($this->_file)) { - // ----- Write the last 0 filled block for end of archive - $v_binary_data = pack('a1024', ''); - $this->_writeBlock($v_binary_data); - } - return true; - } - - /** - * @param array $p_list - * @param string $p_add_dir - * @param string $p_remove_dir - * @return bool - */ - public function _addList($p_list, $p_add_dir, $p_remove_dir) - { - $v_result = true; - $v_header = array(); - - // ----- Remove potential windows directory separator - $p_add_dir = $this->_translateWinPath($p_add_dir); - $p_remove_dir = $this->_translateWinPath($p_remove_dir, false); - - if (!$this->_file) { - $this->_error('Invalid file descriptor'); - return false; - } - - if (sizeof($p_list) == 0) { - return true; - } - - foreach ($p_list as $v_filename) { - if (!$v_result) { - break; - } - - // ----- Skip the current tar name - if ($v_filename == $this->_tarname) { - continue; - } - - if ($v_filename == '') { - continue; - } - - // ----- ignore files and directories matching the ignore regular expression - if ($this->_ignore_regexp && preg_match($this->_ignore_regexp, '/' . $v_filename)) { - $this->_warning("File '$v_filename' ignored"); - continue; - } - - if (!file_exists($v_filename) && !is_link($v_filename)) { - $this->_warning("File '$v_filename' does not exist"); - continue; - } - - // ----- Add the file or directory header - if (!$this->_addFile($v_filename, $v_header, $p_add_dir, $p_remove_dir)) { - return false; - } - - if (@is_dir($v_filename) && !@is_link($v_filename)) { - if (!($p_hdir = opendir($v_filename))) { - $this->_warning("Directory '$v_filename' can not be read"); - continue; - } - while (false !== ($p_hitem = readdir($p_hdir))) { - if (($p_hitem != '.') && ($p_hitem != '..')) { - if ($v_filename != ".") { - $p_temp_list[0] = $v_filename . '/' . $p_hitem; - } else { - $p_temp_list[0] = $p_hitem; - } - - $v_result = $this->_addList( - $p_temp_list, - $p_add_dir, - $p_remove_dir - ); - } - } - - unset($p_temp_list); - unset($p_hdir); - unset($p_hitem); - } - } - - return $v_result; - } - - /** - * @param string $p_filename - * @param mixed $p_header - * @param string $p_add_dir - * @param string $p_remove_dir - * @param null $v_stored_filename - * @return bool - */ - public function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $v_stored_filename = null) - { - if (!$this->_file) { - $this->_error('Invalid file descriptor'); - return false; - } - - if ($p_filename == '') { - $this->_error('Invalid file name'); - return false; - } - - if (is_null($v_stored_filename)) { - // ----- Calculate the stored filename - $p_filename = $this->_translateWinPath($p_filename, false); - $v_stored_filename = $p_filename; - - if (strcmp($p_filename, $p_remove_dir) == 0) { - return true; - } - - if ($p_remove_dir != '') { - if (substr($p_remove_dir, -1) != '/') { - $p_remove_dir .= '/'; - } - - if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir) { - $v_stored_filename = substr($p_filename, strlen($p_remove_dir)); - } - } - - $v_stored_filename = $this->_translateWinPath($v_stored_filename); - if ($p_add_dir != '') { - if (substr($p_add_dir, -1) == '/') { - $v_stored_filename = $p_add_dir . $v_stored_filename; - } else { - $v_stored_filename = $p_add_dir . '/' . $v_stored_filename; - } - } - - $v_stored_filename = $this->_pathReduction($v_stored_filename); - } - - if ($this->_isArchive($p_filename)) { - if (($v_file = @fopen($p_filename, "rb")) == 0) { - $this->_warning( - "Unable to open file '" . $p_filename - . "' in binary read mode" - ); - return true; - } - - if (!$this->_writeHeader($p_filename, $v_stored_filename)) { - return false; - } - - while (($v_buffer = fread($v_file, $this->buffer_length)) != '') { - $buffer_length = strlen("$v_buffer"); - if ($buffer_length != $this->buffer_length) { - $pack_size = ((int)($buffer_length / 512) + ($buffer_length % 512 !== 0 ? 1 : 0)) * 512; - $pack_format = sprintf('a%d', $pack_size); - } else { - $pack_format = sprintf('a%d', $this->buffer_length); - } - $v_binary_data = pack($pack_format, "$v_buffer"); - $this->_writeBlock($v_binary_data); - } - - fclose($v_file); - } else { - // ----- Only header for dir - if (!$this->_writeHeader($p_filename, $v_stored_filename)) { - return false; - } - } - - return true; - } - - /** - * @param string $p_filename - * @param string $p_string - * @param bool $p_datetime - * @param array $p_params - * @return bool - */ - public function _addString($p_filename, $p_string, $p_datetime = false, $p_params = array()) - { - $p_stamp = @$p_params["stamp"] ? $p_params["stamp"] : ($p_datetime ? $p_datetime : time()); - $p_mode = @$p_params["mode"] ? $p_params["mode"] : 0600; - $p_type = @$p_params["type"] ? $p_params["type"] : ""; - $p_uid = @$p_params["uid"] ? $p_params["uid"] : 0; - $p_gid = @$p_params["gid"] ? $p_params["gid"] : 0; - if (!$this->_file) { - $this->_error('Invalid file descriptor'); - return false; - } - - if ($p_filename == '') { - $this->_error('Invalid file name'); - return false; - } - - // ----- Calculate the stored filename - $p_filename = $this->_translateWinPath($p_filename, false); - - // ----- If datetime is not specified, set current time - if ($p_datetime === false) { - $p_datetime = time(); - } - - if (!$this->_writeHeaderBlock( - $p_filename, - strlen($p_string), - $p_stamp, - $p_mode, - $p_type, - $p_uid, - $p_gid - ) - ) { - return false; - } - - $i = 0; - while (($v_buffer = substr($p_string, (($i++) * 512), 512)) != '') { - $v_binary_data = pack("a512", $v_buffer); - $this->_writeBlock($v_binary_data); - } - - return true; - } - - /** - * @param string $p_filename - * @param string $p_stored_filename - * @return bool - */ - public function _writeHeader($p_filename, $p_stored_filename) - { - if ($p_stored_filename == '') { - $p_stored_filename = $p_filename; - } - - $v_reduced_filename = $this->_pathReduction($p_stored_filename); - - if (strlen($v_reduced_filename) > 99) { - if (!$this->_writeLongHeader($v_reduced_filename, false)) { - return false; - } - } - - $v_linkname = ''; - if (@is_link($p_filename)) { - $v_linkname = readlink($p_filename); - } - - if (strlen($v_linkname) > 99) { - if (!$this->_writeLongHeader($v_linkname, true)) { - return false; - } - } - - $v_info = lstat($p_filename); - $v_uid = sprintf("%07s", DecOct($v_info[4])); - $v_gid = sprintf("%07s", DecOct($v_info[5])); - $v_perms = sprintf("%07s", DecOct($v_info['mode'] & 000777)); - $v_mtime = sprintf("%011s", DecOct($v_info['mtime'])); - - if (@is_link($p_filename)) { - $v_typeflag = '2'; - $v_size = sprintf("%011s", DecOct(0)); - } elseif (@is_dir($p_filename)) { - $v_typeflag = "5"; - $v_size = sprintf("%011s", DecOct(0)); - } else { - $v_typeflag = '0'; - clearstatcache(); - $v_size = sprintf("%011s", DecOct($v_info['size'])); - } - - $v_magic = 'ustar '; - $v_version = ' '; - $v_uname = ''; - $v_gname = ''; - - if (function_exists('posix_getpwuid')) { - $userinfo = posix_getpwuid($v_info[4]); - $groupinfo = posix_getgrgid($v_info[5]); - - if (isset($userinfo['name'])) { - $v_uname = $userinfo['name']; - } - - if (isset($groupinfo['name'])) { - $v_gname = $groupinfo['name']; - } - } - - $v_devmajor = ''; - $v_devminor = ''; - $v_prefix = ''; - - $v_binary_data_first = pack( - "a100a8a8a8a12a12", - $v_reduced_filename, - $v_perms, - $v_uid, - $v_gid, - $v_size, - $v_mtime - ); - $v_binary_data_last = pack( - "a1a100a6a2a32a32a8a8a155a12", - $v_typeflag, - $v_linkname, - $v_magic, - $v_version, - $v_uname, - $v_gname, - $v_devmajor, - $v_devminor, - $v_prefix, - '' - ); - - // ----- Calculate the checksum - $v_checksum = 0; - // ..... First part of the header - for ($i = 0; $i < 148; $i++) { - $v_checksum += ord(substr($v_binary_data_first, $i, 1)); - } - // ..... Ignore the checksum value and replace it by ' ' (space) - for ($i = 148; $i < 156; $i++) { - $v_checksum += ord(' '); - } - // ..... Last part of the header - for ($i = 156, $j = 0; $i < 512; $i++, $j++) { - $v_checksum += ord(substr($v_binary_data_last, $j, 1)); - } - - // ----- Write the first 148 bytes of the header in the archive - $this->_writeBlock($v_binary_data_first, 148); - - // ----- Write the calculated checksum - $v_checksum = sprintf("%06s\0 ", DecOct($v_checksum)); - $v_binary_data = pack("a8", $v_checksum); - $this->_writeBlock($v_binary_data, 8); - - // ----- Write the last 356 bytes of the header in the archive - $this->_writeBlock($v_binary_data_last, 356); - - return true; - } - - /** - * @param string $p_filename - * @param int $p_size - * @param int $p_mtime - * @param int $p_perms - * @param string $p_type - * @param int $p_uid - * @param int $p_gid - * @return bool - */ - public function _writeHeaderBlock( - $p_filename, - $p_size, - $p_mtime = 0, - $p_perms = 0, - $p_type = '', - $p_uid = 0, - $p_gid = 0 - ) - { - $p_filename = $this->_pathReduction($p_filename); - - if (strlen($p_filename) > 99) { - if (!$this->_writeLongHeader($p_filename, false)) { - return false; - } - } - - if ($p_type == "5") { - $v_size = sprintf("%011s", DecOct(0)); - } else { - $v_size = sprintf("%011s", DecOct($p_size)); - } - - $v_uid = sprintf("%07s", DecOct($p_uid)); - $v_gid = sprintf("%07s", DecOct($p_gid)); - $v_perms = sprintf("%07s", DecOct($p_perms & 000777)); - - $v_mtime = sprintf("%11s", DecOct($p_mtime)); - - $v_linkname = ''; - - $v_magic = 'ustar '; - - $v_version = ' '; - - if (function_exists('posix_getpwuid')) { - $userinfo = posix_getpwuid($p_uid); - $groupinfo = posix_getgrgid($p_gid); - - if ($userinfo === false || $groupinfo === false) { - $v_uname = ''; - $v_gname = ''; - } else { - $v_uname = $userinfo['name']; - $v_gname = $groupinfo['name']; - } - } else { - $v_uname = ''; - $v_gname = ''; - } - - $v_devmajor = ''; - - $v_devminor = ''; - - $v_prefix = ''; - - $v_binary_data_first = pack( - "a100a8a8a8a12A12", - $p_filename, - $v_perms, - $v_uid, - $v_gid, - $v_size, - $v_mtime - ); - $v_binary_data_last = pack( - "a1a100a6a2a32a32a8a8a155a12", - $p_type, - $v_linkname, - $v_magic, - $v_version, - $v_uname, - $v_gname, - $v_devmajor, - $v_devminor, - $v_prefix, - '' - ); - - // ----- Calculate the checksum - $v_checksum = 0; - // ..... First part of the header - for ($i = 0; $i < 148; $i++) { - $v_checksum += ord(substr($v_binary_data_first, $i, 1)); - } - // ..... Ignore the checksum value and replace it by ' ' (space) - for ($i = 148; $i < 156; $i++) { - $v_checksum += ord(' '); - } - // ..... Last part of the header - for ($i = 156, $j = 0; $i < 512; $i++, $j++) { - $v_checksum += ord(substr($v_binary_data_last, $j, 1)); - } - - // ----- Write the first 148 bytes of the header in the archive - $this->_writeBlock($v_binary_data_first, 148); - - // ----- Write the calculated checksum - $v_checksum = sprintf("%06s ", DecOct($v_checksum)); - $v_binary_data = pack("a8", $v_checksum); - $this->_writeBlock($v_binary_data, 8); - - // ----- Write the last 356 bytes of the header in the archive - $this->_writeBlock($v_binary_data_last, 356); - - return true; - } - - /** - * @param string $p_filename - * @return bool - */ - public function _writeLongHeader($p_filename, $is_link = false) - { - $v_uid = sprintf("%07s", 0); - $v_gid = sprintf("%07s", 0); - $v_perms = sprintf("%07s", 0); - $v_size = sprintf("%'011s", DecOct(strlen($p_filename))); - $v_mtime = sprintf("%011s", 0); - $v_typeflag = ($is_link ? 'K' : 'L'); - $v_linkname = ''; - $v_magic = 'ustar '; - $v_version = ' '; - $v_uname = ''; - $v_gname = ''; - $v_devmajor = ''; - $v_devminor = ''; - $v_prefix = ''; - - $v_binary_data_first = pack( - "a100a8a8a8a12a12", - '././@LongLink', - $v_perms, - $v_uid, - $v_gid, - $v_size, - $v_mtime - ); - $v_binary_data_last = pack( - "a1a100a6a2a32a32a8a8a155a12", - $v_typeflag, - $v_linkname, - $v_magic, - $v_version, - $v_uname, - $v_gname, - $v_devmajor, - $v_devminor, - $v_prefix, - '' - ); - - // ----- Calculate the checksum - $v_checksum = 0; - // ..... First part of the header - for ($i = 0; $i < 148; $i++) { - $v_checksum += ord(substr($v_binary_data_first, $i, 1)); - } - // ..... Ignore the checksum value and replace it by ' ' (space) - for ($i = 148; $i < 156; $i++) { - $v_checksum += ord(' '); - } - // ..... Last part of the header - for ($i = 156, $j = 0; $i < 512; $i++, $j++) { - $v_checksum += ord(substr($v_binary_data_last, $j, 1)); - } - - // ----- Write the first 148 bytes of the header in the archive - $this->_writeBlock($v_binary_data_first, 148); - - // ----- Write the calculated checksum - $v_checksum = sprintf("%06s\0 ", DecOct($v_checksum)); - $v_binary_data = pack("a8", $v_checksum); - $this->_writeBlock($v_binary_data, 8); - - // ----- Write the last 356 bytes of the header in the archive - $this->_writeBlock($v_binary_data_last, 356); - - // ----- Write the filename as content of the block - $i = 0; - while (($v_buffer = substr($p_filename, (($i++) * 512), 512)) != '') { - $v_binary_data = pack("a512", "$v_buffer"); - $this->_writeBlock($v_binary_data); - } - - return true; - } - - /** - * @param mixed $v_binary_data - * @param mixed $v_header - * @return bool - */ - public function _readHeader($v_binary_data, &$v_header) - { - if (strlen($v_binary_data) == 0) { - $v_header['filename'] = ''; - return true; - } - - if (strlen($v_binary_data) != 512) { - $v_header['filename'] = ''; - $this->_error('Invalid block size : ' . strlen($v_binary_data)); - return false; - } - - if (!is_array($v_header)) { - $v_header = array(); - } - // ----- Calculate the checksum - $v_checksum = 0; - // ..... First part of the header - $v_binary_split = str_split($v_binary_data); - $v_checksum += array_sum(array_map('ord', array_slice($v_binary_split, 0, 148))); - $v_checksum += array_sum(array_map('ord', array(' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',))); - $v_checksum += array_sum(array_map('ord', array_slice($v_binary_split, 156, 512))); - - - $v_data = unpack($this->_fmt, $v_binary_data); - - if (strlen($v_data["prefix"]) > 0) { - $v_data["filename"] = "$v_data[prefix]/$v_data[filename]"; - } - - // ----- Extract the checksum - $v_data_checksum = trim($v_data['checksum']); - if (!preg_match('/^[0-7]*$/', $v_data_checksum)) { - $this->_error( - 'Invalid checksum for file "' . $v_data['filename'] - . '" : ' . $v_data_checksum . ' extracted' - ); - return false; - } - - $v_header['checksum'] = OctDec($v_data_checksum); - if ($v_header['checksum'] != $v_checksum) { - $v_header['filename'] = ''; - - // ----- Look for last block (empty block) - if (($v_checksum == 256) && ($v_header['checksum'] == 0)) { - return true; - } - - $this->_error( - 'Invalid checksum for file "' . $v_data['filename'] - . '" : ' . $v_checksum . ' calculated, ' - . $v_header['checksum'] . ' expected' - ); - return false; - } - - // ----- Extract the properties - $v_header['filename'] = rtrim($v_data['filename'], "\0"); - if ($this->_isMaliciousFilename($v_header['filename'])) { - $this->_error( - 'Malicious .tar detected, file "' . $v_header['filename'] . - '" will not install in desired directory tree' - ); - return false; - } - $v_header['mode'] = OctDec(trim($v_data['mode'])); - $v_header['uid'] = OctDec(trim($v_data['uid'])); - $v_header['gid'] = OctDec(trim($v_data['gid'])); - $v_header['size'] = $this->_tarRecToSize($v_data['size']); - $v_header['mtime'] = OctDec(trim($v_data['mtime'])); - if (($v_header['typeflag'] = $v_data['typeflag']) == "5") { - $v_header['size'] = 0; - } - $v_header['link'] = trim($v_data['link']); - /* ----- All these fields are removed form the header because - they do not carry interesting info - $v_header[magic] = trim($v_data[magic]); - $v_header[version] = trim($v_data[version]); - $v_header[uname] = trim($v_data[uname]); - $v_header[gname] = trim($v_data[gname]); - $v_header[devmajor] = trim($v_data[devmajor]); - $v_header[devminor] = trim($v_data[devminor]); - */ - - return true; - } - - /** - * Convert Tar record size to actual size - * - * @param string $tar_size - * @return size of tar record in bytes - */ - private function _tarRecToSize($tar_size) - { - /* - * First byte of size has a special meaning if bit 7 is set. - * - * Bit 7 indicates base-256 encoding if set. - * Bit 6 is the sign bit. - * Bits 5:0 are most significant value bits. - */ - $ch = ord($tar_size[0]); - if ($ch & 0x80) { - // Full 12-bytes record is required. - $rec_str = $tar_size . "\x00"; - - $size = ($ch & 0x40) ? -1 : 0; - $size = ($size << 6) | ($ch & 0x3f); - - for ($num_ch = 1; $num_ch < 12; ++$num_ch) { - $size = ($size * 256) + ord($rec_str[$num_ch]); - } - - return $size; - - } else { - return OctDec(trim($tar_size)); - } - } - - /** - * Detect and report a malicious file name - * - * @param string $file - * - * @return bool - */ - private function _isMaliciousFilename($file) - { - if (strpos($file, '://') !== false) { - return true; - } - if (strpos($file, '../') !== false || strpos($file, '..\\') !== false) { - return true; - } - return false; - } - - /** - * @param $v_header - * @return bool - */ - public function _readLongHeader(&$v_header) - { - $v_filename = ''; - $v_filesize = $v_header['size']; - $n = floor($v_header['size'] / 512); - for ($i = 0; $i < $n; $i++) { - $v_content = $this->_readBlock(); - $v_filename .= $v_content; - } - if (($v_header['size'] % 512) != 0) { - $v_content = $this->_readBlock(); - $v_filename .= $v_content; - } - - // ----- Read the next header - $v_binary_data = $this->_readBlock(); - - if (!$this->_readHeader($v_binary_data, $v_header)) { - return false; - } - - $v_filename = rtrim(substr($v_filename, 0, $v_filesize), "\0"); - $v_header['filename'] = $v_filename; - if ($this->_isMaliciousFilename($v_filename)) { - $this->_error( - 'Malicious .tar detected, file "' . $v_filename . - '" will not install in desired directory tree' - ); - return false; - } - - return true; - } - - /** - * This method extract from the archive one file identified by $p_filename. - * The return value is a string with the file content, or null on error. - * - * @param string $p_filename The path of the file to extract in a string. - * - * @return a string with the file content or null. - */ - private function _extractInString($p_filename) - { - $v_result_str = ""; - - while (strlen($v_binary_data = $this->_readBlock()) != 0) { - if (!$this->_readHeader($v_binary_data, $v_header)) { - return null; - } - - if ($v_header['filename'] == '') { - continue; - } - - switch ($v_header['typeflag']) { - case 'L': - { - if (!$this->_readLongHeader($v_header)) { - return null; - } - } - break; - - case 'K': - { - $v_link_header = $v_header; - if (!$this->_readLongHeader($v_link_header)) { - return null; - } - $v_header['link'] = $v_link_header['filename']; - } - break; - } - - if ($v_header['filename'] == $p_filename) { - if ($v_header['typeflag'] == "5") { - $this->_error( - 'Unable to extract in string a directory ' - . 'entry {' . $v_header['filename'] . '}' - ); - return null; - } else { - $n = floor($v_header['size'] / 512); - for ($i = 0; $i < $n; $i++) { - $v_result_str .= $this->_readBlock(); - } - if (($v_header['size'] % 512) != 0) { - $v_content = $this->_readBlock(); - $v_result_str .= substr( - $v_content, - 0, - ($v_header['size'] % 512) - ); - } - return $v_result_str; - } - } else { - $this->_jumpBlock(ceil(($v_header['size'] / 512))); - } - } - - return null; - } - - /** - * @param string $p_path - * @param string $p_list_detail - * @param string $p_mode - * @param string $p_file_list - * @param string $p_remove_path - * @param bool $p_preserve - * @param bool $p_symlinks - * @return bool - */ - public function _extractList( - $p_path, - &$p_list_detail, - $p_mode, - $p_file_list, - $p_remove_path, - $p_preserve = false, - $p_symlinks = true - ) - { - $v_result = true; - $v_nb = 0; - $v_extract_all = true; - $v_listing = false; - - $p_path = $this->_translateWinPath($p_path, false); - if ($p_path == '' || (substr($p_path, 0, 1) != '/' - && substr($p_path, 0, 3) != "../" && !strpos($p_path, ':')) - ) { - $p_path = "./" . $p_path; - } - $p_remove_path = $this->_translateWinPath($p_remove_path); - - // ----- Look for path to remove format (should end by /) - if (($p_remove_path != '') && (substr($p_remove_path, -1) != '/')) { - $p_remove_path .= '/'; - } - $p_remove_path_size = strlen($p_remove_path); - - switch ($p_mode) { - case "complete" : - $v_extract_all = true; - $v_listing = false; - break; - case "partial" : - $v_extract_all = false; - $v_listing = false; - break; - case "list" : - $v_extract_all = false; - $v_listing = true; - break; - default : - $this->_error('Invalid extract mode (' . $p_mode . ')'); - return false; - } - - clearstatcache(); - - while (strlen($v_binary_data = $this->_readBlock()) != 0) { - $v_extract_file = false; - $v_extraction_stopped = 0; - - if (!$this->_readHeader($v_binary_data, $v_header)) { - return false; - } - - if ($v_header['filename'] == '') { - continue; - } - - switch ($v_header['typeflag']) { - case 'L': - { - if (!$this->_readLongHeader($v_header)) { - return null; - } - } - break; - - case 'K': - { - $v_link_header = $v_header; - if (!$this->_readLongHeader($v_link_header)) { - return null; - } - $v_header['link'] = $v_link_header['filename']; - } - break; - } - - // ignore extended / pax headers - if ($v_header['typeflag'] == 'x' || $v_header['typeflag'] == 'g') { - $this->_jumpBlock(ceil(($v_header['size'] / 512))); - continue; - } - - if ((!$v_extract_all) && (is_array($p_file_list))) { - // ----- By default no unzip if the file is not found - $v_extract_file = false; - - for ($i = 0; $i < sizeof($p_file_list); $i++) { - // ----- Look if it is a directory - if (substr($p_file_list[$i], -1) == '/') { - // ----- Look if the directory is in the filename path - if ((strlen($v_header['filename']) > strlen($p_file_list[$i])) - && (substr($v_header['filename'], 0, strlen($p_file_list[$i])) - == $p_file_list[$i]) - ) { - $v_extract_file = true; - break; - } - } // ----- It is a file, so compare the file names - elseif ($p_file_list[$i] == $v_header['filename']) { - $v_extract_file = true; - break; - } - } - } else { - $v_extract_file = true; - } - - // ----- Look if this file need to be extracted - if (($v_extract_file) && (!$v_listing)) { - if (($p_remove_path != '') - && (substr($v_header['filename'] . '/', 0, $p_remove_path_size) - == $p_remove_path) - ) { - $v_header['filename'] = substr( - $v_header['filename'], - $p_remove_path_size - ); - if ($v_header['filename'] == '') { - continue; - } - } - if (($p_path != './') && ($p_path != '/')) { - while (substr($p_path, -1) == '/') { - $p_path = substr($p_path, 0, strlen($p_path) - 1); - } - - if (substr($v_header['filename'], 0, 1) == '/') { - $v_header['filename'] = $p_path . $v_header['filename']; - } else { - $v_header['filename'] = $p_path . '/' . $v_header['filename']; - } - } - if (file_exists($v_header['filename'])) { - if ((@is_dir($v_header['filename'])) - && ($v_header['typeflag'] == '') - ) { - $this->_error( - 'File ' . $v_header['filename'] - . ' already exists as a directory' - ); - return false; - } - if (($this->_isArchive($v_header['filename'])) - && ($v_header['typeflag'] == "5") - ) { - $this->_error( - 'Directory ' . $v_header['filename'] - . ' already exists as a file' - ); - return false; - } - if (!is_writeable($v_header['filename'])) { - $this->_error( - 'File ' . $v_header['filename'] - . ' already exists and is write protected' - ); - return false; - } - if (filemtime($v_header['filename']) > $v_header['mtime']) { - // To be completed : An error or silent no replace ? - } - } // ----- Check the directory availability and create it if necessary - elseif (($v_result - = $this->_dirCheck( - ($v_header['typeflag'] == "5" - ? $v_header['filename'] - : dirname($v_header['filename'])) - )) != 1 - ) { - $this->_error('Unable to create path for ' . $v_header['filename']); - return false; - } - - if ($v_extract_file) { - if ($v_header['typeflag'] == "5") { - if (!@file_exists($v_header['filename'])) { - if (!@mkdir($v_header['filename'], 0777)) { - $this->_error( - 'Unable to create directory {' - . $v_header['filename'] . '}' - ); - return false; - } - } - } elseif ($v_header['typeflag'] == "2") { - if (!$p_symlinks) { - $this->_warning('Symbolic links are not allowed. ' - . 'Unable to extract {' - . $v_header['filename'] . '}' - ); - return false; - } - $absolute_link = FALSE; - $link_depth = 0; - if (strpos($v_header['link'], "/") === 0 || strpos($v_header['link'], ':') !== FALSE) { - $absolute_link = TRUE; - } - else { - $s_filename = preg_replace('@^' . preg_quote($p_path) . '@', "", $v_header['filename']); - $s_linkname = str_replace('\\', '/', $v_header['link']); - foreach (explode("/", $s_filename) as $dir) { - if ($dir === "..") { - $link_depth--; - } elseif ($dir !== "" && $dir !== "." ) { - $link_depth++; - } - } - foreach (explode("/", $s_linkname) as $dir){ - if ($link_depth <= 0) { - break; - } - if ($dir === "..") { - $link_depth--; - } elseif ($dir !== "" && $dir !== ".") { - $link_depth++; - } - } - } - if ($absolute_link || $link_depth <= 0) { - $this->_error( - 'Out-of-path file extraction {' - . $v_header['filename'] . ' --> ' . - $v_header['link'] . '}' - ); - return false; - } - if (@file_exists($v_header['filename'])) { - @unlink($v_header['filename']); - } - if (!@symlink($v_header['link'], $v_header['filename'])) { - $this->_error( - 'Unable to extract symbolic link {' - . $v_header['filename'] . '}' - ); - return false; - } - } else { - if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) { - $this->_error( - 'Error while opening {' . $v_header['filename'] - . '} in write binary mode' - ); - return false; - } else { - $n = floor($v_header['size'] / 512); - for ($i = 0; $i < $n; $i++) { - $v_content = $this->_readBlock(); - fwrite($v_dest_file, $v_content, 512); - } - if (($v_header['size'] % 512) != 0) { - $v_content = $this->_readBlock(); - fwrite($v_dest_file, $v_content, ($v_header['size'] % 512)); - } - - @fclose($v_dest_file); - - if ($p_preserve) { - @chown($v_header['filename'], $v_header['uid']); - @chgrp($v_header['filename'], $v_header['gid']); - } - - // ----- Change the file mode, mtime - @touch($v_header['filename'], $v_header['mtime']); - if ($v_header['mode'] & 0111) { - // make file executable, obey umask - $mode = fileperms($v_header['filename']) | (~umask() & 0111); - @chmod($v_header['filename'], $mode); - } - } - - // ----- Check the file size - clearstatcache(); - if (!is_file($v_header['filename'])) { - $this->_error( - 'Extracted file ' . $v_header['filename'] - . 'does not exist. Archive may be corrupted.' - ); - return false; - } - - $filesize = filesize($v_header['filename']); - if ($filesize != $v_header['size']) { - $this->_error( - 'Extracted file ' . $v_header['filename'] - . ' does not have the correct file size \'' - . $filesize - . '\' (' . $v_header['size'] - . ' expected). Archive may be corrupted.' - ); - return false; - } - } - } else { - $this->_jumpBlock(ceil(($v_header['size'] / 512))); - } - } else { - $this->_jumpBlock(ceil(($v_header['size'] / 512))); - } - - /* TBC : Seems to be unused ... - if ($this->_compress) - $v_end_of_file = @gzeof($this->_file); - else - $v_end_of_file = @feof($this->_file); - */ - - if ($v_listing || $v_extract_file || $v_extraction_stopped) { - // ----- Log extracted files - if (($v_file_dir = dirname($v_header['filename'])) - == $v_header['filename'] - ) { - $v_file_dir = ''; - } - if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == '')) { - $v_file_dir = '/'; - } - - $p_list_detail[$v_nb++] = $v_header; - if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) { - return true; - } - } - } - - return true; - } - - /** - * @return bool - */ - public function _openAppend() - { - if (filesize($this->_tarname) == 0) { - return $this->_openWrite(); - } - - if ($this->_compress) { - $this->_close(); - - if (!@rename($this->_tarname, $this->_tarname . ".tmp")) { - $this->_error( - 'Error while renaming \'' . $this->_tarname - . '\' to temporary file \'' . $this->_tarname - . '.tmp\'' - ); - return false; - } - - if ($this->_compress_type == 'gz') { - $v_temp_tar = @gzopen($this->_tarname . ".tmp", "rb"); - } elseif ($this->_compress_type == 'bz2') { - $v_temp_tar = @bzopen($this->_tarname . ".tmp", "r"); - } elseif ($this->_compress_type == 'lzma2') { - $v_temp_tar = @xzopen($this->_tarname . ".tmp", "r"); - } - - - if ($v_temp_tar == 0) { - $this->_error( - 'Unable to open file \'' . $this->_tarname - . '.tmp\' in binary read mode' - ); - @rename($this->_tarname . ".tmp", $this->_tarname); - return false; - } - - if (!$this->_openWrite()) { - @rename($this->_tarname . ".tmp", $this->_tarname); - return false; - } - - if ($this->_compress_type == 'gz') { - $end_blocks = 0; - - while (!@gzeof($v_temp_tar)) { - $v_buffer = @gzread($v_temp_tar, 512); - if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) { - $end_blocks++; - // do not copy end blocks, we will re-make them - // after appending - continue; - } elseif ($end_blocks > 0) { - for ($i = 0; $i < $end_blocks; $i++) { - $this->_writeBlock(ARCHIVE_TAR_END_BLOCK); - } - $end_blocks = 0; - } - $v_binary_data = pack("a512", $v_buffer); - $this->_writeBlock($v_binary_data); - } - - @gzclose($v_temp_tar); - } elseif ($this->_compress_type == 'bz2') { - $end_blocks = 0; - - while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) { - if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) { - $end_blocks++; - // do not copy end blocks, we will re-make them - // after appending - continue; - } elseif ($end_blocks > 0) { - for ($i = 0; $i < $end_blocks; $i++) { - $this->_writeBlock(ARCHIVE_TAR_END_BLOCK); - } - $end_blocks = 0; - } - $v_binary_data = pack("a512", $v_buffer); - $this->_writeBlock($v_binary_data); - } - - @bzclose($v_temp_tar); - } elseif ($this->_compress_type == 'lzma2') { - $end_blocks = 0; - - while (strlen($v_buffer = @xzread($v_temp_tar, 512)) > 0) { - if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) { - $end_blocks++; - // do not copy end blocks, we will re-make them - // after appending - continue; - } elseif ($end_blocks > 0) { - for ($i = 0; $i < $end_blocks; $i++) { - $this->_writeBlock(ARCHIVE_TAR_END_BLOCK); - } - $end_blocks = 0; - } - $v_binary_data = pack("a512", $v_buffer); - $this->_writeBlock($v_binary_data); - } - - @xzclose($v_temp_tar); - } - - if (!@unlink($this->_tarname . ".tmp")) { - $this->_error( - 'Error while deleting temporary file \'' - . $this->_tarname . '.tmp\'' - ); - } - } else { - // ----- For not compressed tar, just add files before the last - // one or two 512 bytes block - if (!$this->_openReadWrite()) { - return false; - } - - clearstatcache(); - $v_size = filesize($this->_tarname); - - // We might have zero, one or two end blocks. - // The standard is two, but we should try to handle - // other cases. - fseek($this->_file, $v_size - 1024); - if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) { - fseek($this->_file, $v_size - 1024); - } elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) { - fseek($this->_file, $v_size - 512); - } - } - - return true; - } - - /** - * @param $p_filelist - * @param string $p_add_dir - * @param string $p_remove_dir - * @return bool - */ - public function _append($p_filelist, $p_add_dir = '', $p_remove_dir = '') - { - if (!$this->_openAppend()) { - return false; - } - - if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir)) { - $this->_writeFooter(); - } - - $this->_close(); - - return true; - } - - /** - * Check if a directory exists and create it (including parent - * dirs) if not. - * - * @param string $p_dir directory to check - * - * @return bool true if the directory exists or was created - */ - public function _dirCheck($p_dir) - { - clearstatcache(); - if ((@is_dir($p_dir)) || ($p_dir == '')) { - return true; - } - - $p_parent_dir = dirname($p_dir); - - if (($p_parent_dir != $p_dir) && - ($p_parent_dir != '') && - (!$this->_dirCheck($p_parent_dir)) - ) { - return false; - } - - if (!@mkdir($p_dir, 0777)) { - $this->_error("Unable to create directory '$p_dir'"); - return false; - } - - return true; - } - - /** - * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar", - * rand emove double slashes. - * - * @param string $p_dir path to reduce - * - * @return string reduced path - */ - private function _pathReduction($p_dir) - { - $v_result = ''; - - // ----- Look for not empty path - if ($p_dir != '') { - // ----- Explode path by directory names - $v_list = explode('/', $p_dir); - - // ----- Study directories from last to first - for ($i = sizeof($v_list) - 1; $i >= 0; $i--) { - // ----- Look for current path - if ($v_list[$i] == ".") { - // ----- Ignore this directory - // Should be the first $i=0, but no check is done - } else { - if ($v_list[$i] == "..") { - // ----- Ignore it and ignore the $i-1 - $i--; - } else { - if (($v_list[$i] == '') - && ($i != (sizeof($v_list) - 1)) - && ($i != 0) - ) { - // ----- Ignore only the double '//' in path, - // but not the first and last / - } else { - $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? '/' - . $v_result : ''); - } - } - } - } - } - - if (defined('OS_WINDOWS') && OS_WINDOWS) { - $v_result = strtr($v_result, '\\', '/'); - } - - return $v_result; - } - - /** - * @param $p_path - * @param bool $p_remove_disk_letter - * @return string - */ - public function _translateWinPath($p_path, $p_remove_disk_letter = true) - { - if (defined('OS_WINDOWS') && OS_WINDOWS) { - // ----- Look for potential disk letter - if (($p_remove_disk_letter) - && (($v_position = strpos($p_path, ':')) != false) - ) { - $p_path = substr($p_path, $v_position + 1); - } - // ----- Change potential windows directory separator - if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0, 1) == '\\')) { - $p_path = strtr($p_path, '\\', '/'); - } - } - return $p_path; - } -} diff --git a/lib/pear/archive_tar/README.md b/lib/pear/archive_tar/README.md deleted file mode 100644 index f9c53be1a..000000000 --- a/lib/pear/archive_tar/README.md +++ /dev/null @@ -1,34 +0,0 @@ -Archive_Tar -========== - -![.github/workflows/build.yml](https://github.com/pear/Archive_Tar/workflows/.github/workflows/build.yml/badge.svg) - -This package provides handling of tar files in PHP. -It supports creating, listing, extracting and adding to tar files. -Gzip support is available if PHP has the zlib extension built-in or -loaded. Bz2 compression is also supported with the bz2 extension loaded. -Also Lzma2 compressed archives are supported with xz extension. - -This package is hosted at http://pear.php.net/package/Archive_Tar - -Please report all new issues via the PEAR bug tracker. - -Pull requests are welcome! - - -Testing, building ------------------ - -To test, run either -$ phpunit tests/ - or -$ pear run-tests -r - -To build, simply -$ pear package - -To install from scratch -$ pear install package.xml - -To upgrade -$ pear upgrade -f package.xml diff --git a/lib/pear/archive_tar/composer.json b/lib/pear/archive_tar/composer.json deleted file mode 100644 index e464d9d7b..000000000 --- a/lib/pear/archive_tar/composer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "pear/archive_tar", - "description": "Tar file management class with compression support (gzip, bzip2, lzma2)", - "type": "library", - "keywords": [ - "archive", - "tar" - ], - "homepage": "https://github.com/pear/Archive_Tar", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Vincent Blavet", - "email": "vincent@phpconcept.net" - }, - { - "name": "Greg Beaver", - "email": "greg@chiaraquartet.net" - }, - { - "name": "Michiel Rook", - "email": "mrook@php.net" - } - ], - "require": { - "php": ">=5.2.0", - "pear/pear-core-minimal": "^1.10.0alpha2" - }, - "suggest": { - "ext-zlib": "Gzip compression support.", - "ext-bz2": "Bz2 compression support.", - "ext-xz": "Lzma2 compression support." - }, - "autoload": { - "psr-0": { - "Archive_Tar": "" - } - }, - "include-path": [ - "./" - ], - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Archive_Tar", - "source": "https://github.com/pear/Archive_Tar" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - } -} diff --git a/lib/pear/archive_tar/package.xml b/lib/pear/archive_tar/package.xml deleted file mode 100644 index d4f20bd4b..000000000 --- a/lib/pear/archive_tar/package.xml +++ /dev/null @@ -1,712 +0,0 @@ - - - Archive_Tar - pear.php.net - Tar file management class - This class provides handling of tar files in PHP. -It supports creating, listing, extracting and adding to tar files. -Gzip support is available if PHP has the zlib extension built-in or -loaded. Bz2 compression is also supported with the bz2 extension loaded. -Also Lzma2 compressed archives are supported with xz extension. - - Vincent Blavet - vblavet - vincent@phpconcept.net - no - - - Greg Beaver - cellog - greg@chiaraquartet.net - no - - - Michiel Rook - mrook - mrook@php.net - yes - - - Stig Bakken - ssb - stig@php.net - no - - 2021-07-20 - - - 1.4.14 - 1.4.0 - - - stable - stable - - New BSD License - -* Properly fix symbolic link path traversal (CVE-2021-32610) - - - - - - - - - - - - - PEAR - pear.php.net - 1.8.0 - 1.10.10 - - - - - 5.2.0 - - - 1.9.0 - - - - - - - - 1.4.13 - 1.4.0 - - - stable - stable - - 2021-02-16 - New BSD License - - * Fix Bug #27010: Relative symlinks failing (out-of path file extraction) [mrook] - - - - - 1.4.12 - 1.4.0 - - - stable - stable - - 2021-01-18 - New BSD License - -* Fix Bug #27008: Symlink out-of-path write vulnerability (CVE-2020-36193) [mrook] - - - - - 1.4.11 - 1.4.0 - - - stable - stable - - 2020-11-19 - New BSD License - -* Fix Bug #27002: Filename manipulation vulnerabilities (CVE-2020-28948 / CVE-2020-28949) [mrook] - - - - - 1.4.10 - 1.4.0 - - - stable - stable - - 2020-09-15 - New BSD License - - * Fix block padding when the file buffer length is a multiple of 512 and smaller than Archive_Tar buffer length - * Don't try to copy username/groupname in chroot jail - - - - - 1.4.9 - 1.4.0 - - - stable - stable - - 2019-12-04 - New BSD License - -* Implement Feature #23861: Add option to disallow symlinks [mrook] - - - - - 1.4.8 - 1.4.0 - - - stable - stable - - 2019-10-21 - New BSD License - -* Fix Bug #23852: PHP 7.4 - Archive_Tar->_readHeader throws deprecation [mrook] - - - - - 1.4.7 - 1.4.0 - - - stable - stable - - 2019-04-08 - New BSD License - -* Improved performance by increasing read buffer size - - - - - 1.4.6 - 1.4.0 - - - stable - stable - - 2019-02-01 - New BSD License - -* Improve path traversal detection for forward and backward slashes - - - - - 1.4.5 - 1.4.0 - - - stable - stable - - 2019-01-02 - New BSD License - -* Fix Bug #23788: Relative symlinks are broken [mrook] - - - - - 1.4.4 - 1.4.0 - - - stable - stable - - 2018-12-20 - New BSD License - -* Fix Bug #21058: Long symlinks are not supported [mrook] - * Fix Bug #23782: Prevent phar:// files from being extracted [mrook] - - - - - 1.4.3 - 1.4.0 - - - stable - stable - - 2017-06-11 - New BSD License - -* Fix Bug #21218: Cannot use result of built-in function in write context in PHP - 7.2.0alpha1 [mrook] - - - - - 1.4.2 - 1.4.0 - - - stable - stable - - 2016-02-25 - New BSD License - -* Fix reading of archives with files > 8GB -* Performance optimizations -* Do not try to call require_once on PEAR.php if it has already been loaded by the autoloader - - - - - 1.4.1 - 1.4.0 - - - stable - stable - - 2015-08-05 - New BSD License - -* Update composer.json to use pear-core-minimal 1.10.0alpha2 - - - - - 1.4.0 - 1.4.0 - - - stable - stable - - 2015-07-20 - New BSD License - -* Add support for PHP 7 -* Drop support for PHP 4 -* Add visibility declarations to methods and properties - - - - - 1.3.16 - 1.3.1 - - - stable - stable - - 2015-04-14 - New BSD License - -* Fix Bug #20514: invalid package.xml; not installable with pyrus [mrook] - - - - - 1.3.15 - 1.3.1 - - - stable - stable - - 2015-03-05 - New BSD License - -* Fixes composer.json parse error - - - - - 1.3.14 - 1.3.1 - - - stable - stable - - 2015-02-26 - New BSD License - -* Fix Bug #18505: Possible incorrect handling of file names in TAR [mrook] - - - - - 1.3.13 - 1.3.1 - - - stable - stable - - 2014-09-02 - New BSD - License - -* Fix Bug #20382: gzopen fix [mrook] - - - - - 1.3.12 - 1.3.1 - - - stable - stable - - 2014-08-04 - New BSD - License - -* Fix Bug #19964: Memory leaking in Archive_Tar [mrook] - * Fix Bug #20246: Broken with php 5.5.9 [mrook] - * Fix Bug #20275: "pax_global_header" looks like a regular file - * [mrook] - * Implement Feature #19827: pass filename to _addFile function - downstream - * patch [mrook] - * Implement Feature #20132: Add custom mode/uid/gid to addString() [mrook] - - - - - 1.3.11 - 1.3.1 - - - stable - stable - - 2013-02-09 - New BSD - License - -* Fix Bug #19746: Broken with PHP 5.5 [mrook] - * Implement Feature #11258: Custom date/time in files added on-the-fly - * [mrook] - - - - - 1.3.10 - 1.3.1 - - - stable - stable - - 2012-04-10 - New BSD - License - -* Fix Bug #13361: Unable to add() some files (ex. mp3) [mrook] - * Fix Bug #19330: Class creates incorrect (non-readable) tar.gz file - * [mrook] - - - - - 1.3.9 - 1.3.1 - - - stable - stable - - 2012-02-27 - New BSD License - -* Fix Bug #16759: No error thrown from missing PHP zlib functions [mrook] - * Fix Bug #18877: Incorrect handling of backslashes in filenames on Linux [mrook] - * Fix Bug #19085: Error while packaging [mrook] - * Fix Bug #19289: Invalid tar file generated [mrook] - - - - - 1.3.8 - 1.3.1 - - - stable - stable - - 2011-10-14 - New BSD License - -* Fix Bug #17853: Test failure: dirtraversal.phpt [mrook] - * Fix Bug #18512: dead links are not saved in tar file [mrook] - * Fix Bug #18702: Unpacks incorrectly on long file names using header prefix [mrook] - * Implement Feature #10145: Patch to return a Pear Error Object on failure [mrook] - * Implement Feature #17491: Option to preserve permissions [mrook] - * Implement Feature #17813: Prevent PHP notice when extracting corrupted archive [mrook] - - - - - 1.3.7 - 1.3.1 - - - stable - stable - - 2010-04-26 - New BSD License - -PEAR compatibility update - - - - - 1.3.6 - 1.3.1 - - - stable - stable - - 2010-03-09 - New BSD License - -* Fix Bug #16963: extractList can't extract zipped files from big tar [mrook] - * Implement Feature #4013: Ignoring files and directories on creating an archive. [mrook] - - - - - 1.3.5 - 1.3.1 - - - stable - stable - - 2009-12-31 - New BSD License - -* Fix Bug #16958: Update 'compatible' tag in package.xml [mrook] - - - - - 1.3.4 - 1.3.1 - - - stable - stable - - 2009-12-30 - New BSD License - -* Fix Bug #11871: wrong result of ::listContent() if filename begins or ends with space [mrook] - * Fix Bug #12462: invalid tar magic [mrook] - * Fix Bug #13918: Long filenames may get up to 511 0x00 bytes appended on read [mrook] - * Fix Bug #16202: Bogus modification times [mrook] - * Implement Feature #16212: Die is not exception [mrook] - - - - - 1.3.3 - 1.3.1 - - - stable - stable - - 2009-03-27 - New BSD License - -Change the license to New BSD license - - minor bugfix release - * fix Bug #9921 compression with bzip2 fails [cellog] - * fix Bug #11594 _readLongHeader leaves 0 bytes in filename [jamessas] - * fix Bug #11769 Incorrect symlink handing [fajar99] - - - - - 1.3.2 - 1.3.1 - - - stable - stable - - 2007-01-03 - PHP License - -Correct Bug #4016 -Remove duplicate remove error display with '@' -Correct Bug #3909 : Check existence of OS_WINDOWS constant -Correct Bug #5452 fix for "lone zero block" when untarring packages -Change filemode (from pear-core/Archive/Tar.php v.1.21) -Correct Bug #6486 Can not extract symlinks -Correct Bug #6933 Archive_Tar (Tar file management class) Directory traversal -Correct Bug #8114 Files added on-the-fly not storing date -Correct Bug #9352 Bug on _dirCheck function over nfs path - - - - - 1.3.1 - 1.3.1 - - - stable - stable - - 2005-03-17 - PHP License - -Correct Bug #3855 - - - - - 1.3.0 - 1.3.0 - - - stable - stable - - 2005-03-06 - PHP License - -Bugs correction (2475, 2488, 2135, 2176) - - - - - 1.2 - 1.2 - - - stable - stable - - 2004-05-08 - PHP License - -Add support for other separator than the space char and bug - correction - - - - - 1.1 - 1.1 - - - stable - stable - - 2003-05-28 - PHP License - -* Add support for BZ2 compression -* Add support for add and extract without using temporary files : methods addString() and extractInString() - - - - - 1.0 - 1.0 - - - stable - stable - - 2003-01-24 - PHP License - -Change status to stable - - - - - 0.10-b1 - 0.10-b1 - - - beta - beta - - 2003-01-08 - PHP License - -Add support for long filenames (greater than 99 characters) - - - - - 0.9 - 0.9 - - - stable - stable - - 2002-05-27 - PHP License - -Auto-detect gzip'ed files - - - - - 0.4 - 0.4 - - - stable - stable - - 2002-05-20 - PHP License - -Windows bugfix: use forward slashes inside archives - - - - - 0.2 - 0.2 - - - stable - stable - - 2002-02-18 - PHP License - -From initial commit to stable - - - - - 0.3 - 0.3 - - - stable - stable - - 2002-04-13 - PHP License - -Windows bugfix: used wrong directory separators - - - - diff --git a/lib/pear/console_getopt/.gitignore b/lib/pear/console_getopt/.gitignore deleted file mode 100644 index 783582816..000000000 --- a/lib/pear/console_getopt/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# composer related -composer.lock -composer.phar -vendor -README.html -dist/ diff --git a/lib/pear/console_getopt/.travis.yml b/lib/pear/console_getopt/.travis.yml deleted file mode 100644 index 2711415f5..000000000 --- a/lib/pear/console_getopt/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: php -php: - - 7 - - 5.6 - - 5.5 - - 5.4 -sudo: false -script: - - pear run-tests -r tests/ diff --git a/lib/pear/console_getopt/Console/Getopt.php b/lib/pear/console_getopt/Console/Getopt.php deleted file mode 100644 index e5793bbb1..000000000 --- a/lib/pear/console_getopt/Console/Getopt.php +++ /dev/null @@ -1,365 +0,0 @@ - - * @license http://opensource.org/licenses/bsd-license.php BSD-2-Clause - * @version CVS: $Id$ - * @link http://pear.php.net/package/Console_Getopt - */ - -require_once 'PEAR.php'; - -/** - * Command-line options parsing class. - * - * @category Console - * @package Console_Getopt - * @author Andrei Zmievski - * @license http://opensource.org/licenses/bsd-license.php BSD-2-Clause - * @link http://pear.php.net/package/Console_Getopt - */ -class Console_Getopt -{ - - /** - * Parses the command-line options. - * - * The first parameter to this function should be the list of command-line - * arguments without the leading reference to the running program. - * - * The second parameter is a string of allowed short options. Each of the - * option letters can be followed by a colon ':' to specify that the option - * requires an argument, or a double colon '::' to specify that the option - * takes an optional argument. - * - * The third argument is an optional array of allowed long options. The - * leading '--' should not be included in the option name. Options that - * require an argument should be followed by '=', and options that take an - * option argument should be followed by '=='. - * - * The return value is an array of two elements: the list of parsed - * options and the list of non-option command-line arguments. Each entry in - * the list of parsed options is a pair of elements - the first one - * specifies the option, and the second one specifies the option argument, - * if there was one. - * - * Long and short options can be mixed. - * - * Most of the semantics of this function are based on GNU getopt_long(). - * - * @param array $args an array of command-line arguments - * @param string $short_options specifies the list of allowed short options - * @param array $long_options specifies the list of allowed long options - * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option - * - * @return array two-element array containing the list of parsed options and - * the non-option arguments - */ - public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false) - { - return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown); - } - - /** - * This function expects $args to start with the script name (POSIX-style). - * Preserved for backwards compatibility. - * - * @param array $args an array of command-line arguments - * @param string $short_options specifies the list of allowed short options - * @param array $long_options specifies the list of allowed long options - * - * @see getopt2() - * @return array two-element array containing the list of parsed options and - * the non-option arguments - */ - public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false) - { - return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown); - } - - /** - * The actual implementation of the argument parsing code. - * - * @param int $version Version to use - * @param array $args an array of command-line arguments - * @param string $short_options specifies the list of allowed short options - * @param array $long_options specifies the list of allowed long options - * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option - * - * @return array - */ - public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false) - { - // in case you pass directly readPHPArgv() as the first arg - if (PEAR::isError($args)) { - return $args; - } - - if (empty($args)) { - return array(array(), array()); - } - - $non_opts = $opts = array(); - - settype($args, 'array'); - - if ($long_options) { - sort($long_options); - } - - /* - * Preserve backwards compatibility with callers that relied on - * erroneous POSIX fix. - */ - if ($version < 2) { - if (isset($args[0][0]) && $args[0][0] != '-') { - array_shift($args); - } - } - - for ($i = 0; $i < count($args); $i++) { - $arg = $args[$i]; - /* The special element '--' means explicit end of - options. Treat the rest of the arguments as non-options - and end the loop. */ - if ($arg == '--') { - $non_opts = array_merge($non_opts, array_slice($args, $i + 1)); - break; - } - - if ($arg[0] != '-' || (strlen($arg) > 1 && $arg[1] == '-' && !$long_options)) { - $non_opts = array_merge($non_opts, array_slice($args, $i)); - break; - } elseif (strlen($arg) > 1 && $arg[1] == '-') { - $error = Console_Getopt::_parseLongOption(substr($arg, 2), - $long_options, - $opts, - $i, - $args, - $skip_unknown); - if (PEAR::isError($error)) { - return $error; - } - } elseif ($arg == '-') { - // - is stdin - $non_opts = array_merge($non_opts, array_slice($args, $i)); - break; - } else { - $error = Console_Getopt::_parseShortOption(substr($arg, 1), - $short_options, - $opts, - $i, - $args, - $skip_unknown); - if (PEAR::isError($error)) { - return $error; - } - } - } - - return array($opts, $non_opts); - } - - /** - * Parse short option - * - * @param string $arg Argument - * @param string[] $short_options Available short options - * @param string[][] &$opts - * @param int &$argIdx - * @param string[] $args - * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option - * - * @return void - */ - protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown) - { - for ($i = 0; $i < strlen($arg); $i++) { - $opt = $arg[$i]; - $opt_arg = null; - - /* Try to find the short option in the specifier string. */ - if (($spec = strstr($short_options, $opt)) === false || $arg[$i] == ':') { - if ($skip_unknown === true) { - break; - } - - $msg = "Console_Getopt: unrecognized option -- $opt"; - return PEAR::raiseError($msg); - } - - if (strlen($spec) > 1 && $spec[1] == ':') { - if (strlen($spec) > 2 && $spec[2] == ':') { - if ($i + 1 < strlen($arg)) { - /* Option takes an optional argument. Use the remainder of - the arg string if there is anything left. */ - $opts[] = array($opt, substr($arg, $i + 1)); - break; - } - } else { - /* Option requires an argument. Use the remainder of the arg - string if there is anything left. */ - if ($i + 1 < strlen($arg)) { - $opts[] = array($opt, substr($arg, $i + 1)); - break; - } else if (isset($args[++$argIdx])) { - $opt_arg = $args[$argIdx]; - /* Else use the next argument. */; - if (Console_Getopt::_isShortOpt($opt_arg) - || Console_Getopt::_isLongOpt($opt_arg)) { - $msg = "option requires an argument --$opt"; - return PEAR::raiseError("Console_Getopt: " . $msg); - } - } else { - $msg = "option requires an argument --$opt"; - return PEAR::raiseError("Console_Getopt: " . $msg); - } - } - } - - $opts[] = array($opt, $opt_arg); - } - } - - /** - * Checks if an argument is a short option - * - * @param string $arg Argument to check - * - * @return bool - */ - protected static function _isShortOpt($arg) - { - return strlen($arg) == 2 && $arg[0] == '-' - && preg_match('/[a-zA-Z]/', $arg[1]); - } - - /** - * Checks if an argument is a long option - * - * @param string $arg Argument to check - * - * @return bool - */ - protected static function _isLongOpt($arg) - { - return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' && - preg_match('/[a-zA-Z]+$/', substr($arg, 2)); - } - - /** - * Parse long option - * - * @param string $arg Argument - * @param string[] $long_options Available long options - * @param string[][] &$opts - * @param int &$argIdx - * @param string[] $args - * - * @return void|PEAR_Error - */ - protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown) - { - @list($opt, $opt_arg) = explode('=', $arg, 2); - - $opt_len = strlen($opt); - - for ($i = 0; $i < count($long_options); $i++) { - $long_opt = $long_options[$i]; - $opt_start = substr($long_opt, 0, $opt_len); - - $long_opt_name = str_replace('=', '', $long_opt); - - /* Option doesn't match. Go on to the next one. */ - if ($long_opt_name != $opt) { - continue; - } - - $opt_rest = substr($long_opt, $opt_len); - - /* Check that the options uniquely matches one of the allowed - options. */ - if ($i + 1 < count($long_options)) { - $next_option_rest = substr($long_options[$i + 1], $opt_len); - } else { - $next_option_rest = ''; - } - - if ($opt_rest != '' && $opt[0] != '=' && - $i + 1 < count($long_options) && - $opt == substr($long_options[$i+1], 0, $opt_len) && - $next_option_rest != '' && - $next_option_rest[0] != '=') { - - $msg = "Console_Getopt: option --$opt is ambiguous"; - return PEAR::raiseError($msg); - } - - if (substr($long_opt, -1) == '=') { - if (substr($long_opt, -2) != '==') { - /* Long option requires an argument. - Take the next argument if one wasn't specified. */; - if (!strlen($opt_arg)) { - if (!isset($args[++$argIdx])) { - $msg = "Console_Getopt: option requires an argument --$opt"; - return PEAR::raiseError($msg); - } - $opt_arg = $args[$argIdx]; - } - - if (Console_Getopt::_isShortOpt($opt_arg) - || Console_Getopt::_isLongOpt($opt_arg)) { - $msg = "Console_Getopt: option requires an argument --$opt"; - return PEAR::raiseError($msg); - } - } - } else if ($opt_arg) { - $msg = "Console_Getopt: option --$opt doesn't allow an argument"; - return PEAR::raiseError($msg); - } - - $opts[] = array('--' . $opt, $opt_arg); - return; - } - - if ($skip_unknown === true) { - return; - } - - return PEAR::raiseError("Console_Getopt: unrecognized option --$opt"); - } - - /** - * Safely read the $argv PHP array across different PHP configurations. - * Will take care on register_globals and register_argc_argv ini directives - * - * @return mixed the $argv PHP array or PEAR error if not registered - */ - public static function readPHPArgv() - { - global $argv; - if (!is_array($argv)) { - if (!@is_array($_SERVER['argv'])) { - if (!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) { - $msg = "Could not read cmd args (register_argc_argv=Off?)"; - return PEAR::raiseError("Console_Getopt: " . $msg); - } - return $GLOBALS['HTTP_SERVER_VARS']['argv']; - } - return $_SERVER['argv']; - } - return $argv; - } - -} diff --git a/lib/pear/console_getopt/LICENSE b/lib/pear/console_getopt/LICENSE deleted file mode 100644 index 452b08839..000000000 --- a/lib/pear/console_getopt/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2001-2015, The PEAR developers -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/pear/console_getopt/README.rst b/lib/pear/console_getopt/README.rst deleted file mode 100644 index 64e5b41be..000000000 --- a/lib/pear/console_getopt/README.rst +++ /dev/null @@ -1,26 +0,0 @@ -******************************************* -Console_Getopt - Command-line option parser -******************************************* - -This is a PHP implementation of "getopt" supporting both short and long options. -It helps parsing command line options in your PHP script. - -Homepage: http://pear.php.net/package/Console_Getopt - -.. image:: https://travis-ci.org/pear/Console_Getopt.svg?branch=master - :target: https://travis-ci.org/pear/Console_Getopt - - -Alternatives -============ - -* Console_CommandLine__ (recommended) -* Console_GetoptPlus__ - -__ http://pear.php.net/package/Console_CommandLine -__ http://pear.php.net/package/Console_GetoptPlus - - -License -======= -BSD-2-Clause diff --git a/lib/pear/console_getopt/composer.json b/lib/pear/console_getopt/composer.json deleted file mode 100644 index 4dc7e7cca..000000000 --- a/lib/pear/console_getopt/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "authors": [ - { - "email": "andrei@php.net", - "name": "Andrei Zmievski", - "role": "Lead" - }, - { - "email": "stig@php.net", - "name": "Stig Bakken", - "role": "Developer" - }, - { - "email": "cellog@php.net", - "name": "Greg Beaver", - "role": "Helper" - } - ], - "autoload": { - "psr-0": { - "Console": "./" - } - }, - "description": "More info available on: http://pear.php.net/package/Console_Getopt", - "include-path": [ - "./" - ], - "license": "BSD-2-Clause", - "name": "pear/console_getopt", - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Getopt", - "source": "https://github.com/pear/Console_Getopt" - }, - "type": "library" -} diff --git a/lib/pear/console_getopt/package.xml b/lib/pear/console_getopt/package.xml deleted file mode 100644 index d3fd78402..000000000 --- a/lib/pear/console_getopt/package.xml +++ /dev/null @@ -1,302 +0,0 @@ - - - Console_Getopt - pear.php.net - Command-line option parser - This is a PHP implementation of "getopt" supporting both -short and long options. - - Andrei Zmievski - andrei - andrei@php.net - no - - - Stig Bakken - ssb - stig@php.net - no - - - Greg Beaver - cellog - cellog@php.net - no - - - 2019-11-20 - - 1.4.3 - 1.4.0 - - - stable - stable - - BSD-2-Clause - - -* PR #4: Fix PHP 7.4 deprecation: array/string curly braces access -* PR #5: fix phplint warnings - - - - - - - - - - - - - - - - - - PEAR - pear.php.net - 1.4.0 - 1.999.999 - - - - - - 5.4.0 - - - 1.8.0 - - - - - - - - - - 2019-11-20 - - 1.4.3 - 1.4.0 - - - stable - stable - - BSD-2-Clause - - * PR #4: Fix PHP 7.4 deprecation: array/string curly braces access - * PR #5: fix phplint warnings - - - - - 2019-02-06 - - 1.4.2 - 1.4.0 - - - stable - stable - - BSD-2-Clause - - * Remove use of each(), which is removed in PHP 8 - - - - - 2015-07-20 - - 1.4.1 - 1.4.0 - - - stable - stable - - BSD-2-Clause - - * Fix unit test on PHP 7 [cweiske] - - - - - 2015-02-22 - - 1.4.0 - 1.4.0 - - - stable - stable - - BSD-2-Clause - - * Change license to BSD-2-Clause - * Set minimum PHP version to 5.4.0 - * Mark static methods with "static" keyword - - - - - 2011-03-07 - - 1.3.1 - 1.3.0 - - - stable - stable - - PHP License - - * Change the minimum PEAR installer dep to be lower - - - - - 2010-12-11 - - - 1.3.0 - 1.3.0 - - - stable - stable - - PHP License - - * Implement Request #13140: [PATCH] to skip unknown parameters. [patch by rquadling, improved on by dufuz] - - - - - 2007-06-12 - - 1.2.3 - 1.2.1 - - - stable - stable - - PHP License - -* fix Bug #11068: No way to read plain "-" option [cardoe] - - - - - 1.2.2 - 1.2.1 - - - stable - stable - - 2007-02-17 - PHP License - -* fix Bug #4475: An ambiguous error occurred when specifying similar longoption name. -* fix Bug #10055: Not failing properly on short options missing required values - - - - - 1.2.1 - 1.2.1 - - - stable - stable - - 2006-12-08 - PHP License - -Fixed bugs #4448 (Long parameter values truncated with longoption parameter) and #7444 (Trailing spaces after php closing tag) - - - - - 1.2 - 1.2 - - - stable - stable - - 2003-12-11 - PHP License - -Fix to preserve BC with 1.0 and allow correct behaviour for new users - - - - - 1.0 - 1.0 - - - stable - stable - - 2002-09-13 - PHP License - -Stable release - - - - - 0.11 - 0.11 - - - beta - beta - - 2002-05-26 - PHP License - -POSIX getopt compatibility fix: treat first element of args - array as command name - - - - - 0.10 - 0.10 - - - beta - beta - - 2002-05-12 - PHP License - -Packaging fix - - - - - 0.9 - 0.9 - - - beta - beta - - 2002-05-12 - PHP License - -Initial release - - - - diff --git a/lib/pear/pear-core-minimal/README.rst b/lib/pear/pear-core-minimal/README.rst deleted file mode 100644 index 9e412fbd1..000000000 --- a/lib/pear/pear-core-minimal/README.rst +++ /dev/null @@ -1,26 +0,0 @@ -****************************** -Minimal set of PEAR core files -****************************** - -This repository provides a set of files from ``pear-core`` -that are often used in PEAR packages. - -It follows the `pear-core`__ repository and gets updated whenever a new -PEAR version is released. - -It's meant to be used as dependency for composer packages. - -__ https://github.com/pear/pear-core - -============== -Included files -============== -- ``OS/Guess.php`` -- ``PEAR.php`` -- ``PEAR/Error.php`` -- ``PEAR/ErrorStack.php`` -- ``System.php`` - - -``PEAR/Error.php`` is a dummy file that only includes ``PEAR.php``, -to make autoloaders work without problems. diff --git a/lib/pear/pear-core-minimal/composer.json b/lib/pear/pear-core-minimal/composer.json deleted file mode 100644 index d805f56ae..000000000 --- a/lib/pear/pear-core-minimal/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "pear/pear-core-minimal", - "description": "Minimal set of PEAR core files to be used as composer dependency", - "license": "BSD-3-Clause", - "authors": [ - { - "email": "cweiske@php.net", - "name": "Christian Weiske", - "role": "Lead" - } - ], - "autoload": { - "psr-0": { - "": "src/" - } - }, - "include-path": [ - "src/" - ], - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", - "source": "https://github.com/pear/pear-core-minimal" - }, - "type": "library", - "require": { - "pear/console_getopt": "~1.4", - "pear/pear_exception": "~1.0" - }, - "replace": { - "rsky/pear-core-min": "self.version" - } -} diff --git a/lib/pear/pear-core-minimal/src/OS/Guess.php b/lib/pear/pear-core-minimal/src/OS/Guess.php deleted file mode 100644 index 88cd65910..000000000 --- a/lib/pear/pear-core-minimal/src/OS/Guess.php +++ /dev/null @@ -1,395 +0,0 @@ - - * @author Gregory Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @link http://pear.php.net/package/PEAR - * @since File available since PEAR 0.1 - */ - -// {{{ uname examples - -// php_uname() without args returns the same as 'uname -a', or a PHP-custom -// string for Windows. -// PHP versions prior to 4.3 return the uname of the host where PHP was built, -// as of 4.3 it returns the uname of the host running the PHP code. -// -// PC RedHat Linux 7.1: -// Linux host.example.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown -// -// PC Debian Potato: -// Linux host 2.4.17 #2 SMP Tue Feb 12 15:10:04 CET 2002 i686 unknown -// -// PC FreeBSD 3.3: -// FreeBSD host.example.com 3.3-STABLE FreeBSD 3.3-STABLE #0: Mon Feb 21 00:42:31 CET 2000 root@example.com:/usr/src/sys/compile/CONFIG i386 -// -// PC FreeBSD 4.3: -// FreeBSD host.example.com 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Mon Jun 25 11:19:43 EDT 2001 root@example.com:/usr/src/sys/compile/CONFIG i386 -// -// PC FreeBSD 4.5: -// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb 6 23:59:23 CET 2002 root@example.com:/usr/src/sys/compile/CONFIG i386 -// -// PC FreeBSD 4.5 w/uname from GNU shellutils: -// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb i386 unknown -// -// HP 9000/712 HP-UX 10: -// HP-UX iq B.10.10 A 9000/712 2008429113 two-user license -// -// HP 9000/712 HP-UX 10 w/uname from GNU shellutils: -// HP-UX host B.10.10 A 9000/712 unknown -// -// IBM RS6000/550 AIX 4.3: -// AIX host 3 4 000003531C00 -// -// AIX 4.3 w/uname from GNU shellutils: -// AIX host 3 4 000003531C00 unknown -// -// SGI Onyx IRIX 6.5 w/uname from GNU shellutils: -// IRIX64 host 6.5 01091820 IP19 mips -// -// SGI Onyx IRIX 6.5: -// IRIX64 host 6.5 01091820 IP19 -// -// SparcStation 20 Solaris 8 w/uname from GNU shellutils: -// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc -// -// SparcStation 20 Solaris 8: -// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc SUNW,SPARCstation-20 -// -// Mac OS X (Darwin) -// Darwin home-eden.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh -// -// Mac OS X early versions -// - -// }}} - -/* TODO: - * - define endianness, to allow matchSignature("bigend") etc. - */ - -/** - * Retrieves information about the current operating system - * - * This class uses php_uname() to grok information about the current OS - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Gregory Beaver - * @copyright 1997-2020 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class OS_Guess -{ - var $sysname; - var $nodename; - var $cpu; - var $release; - var $extra; - - function __construct($uname = null) - { - list($this->sysname, - $this->release, - $this->cpu, - $this->extra, - $this->nodename) = $this->parseSignature($uname); - } - - function parseSignature($uname = null) - { - static $sysmap = array( - 'HP-UX' => 'hpux', - 'IRIX64' => 'irix', - ); - static $cpumap = array( - 'i586' => 'i386', - 'i686' => 'i386', - 'ppc' => 'powerpc', - ); - if ($uname === null) { - $uname = php_uname(); - } - $parts = preg_split('/\s+/', trim($uname)); - $n = count($parts); - - $release = $machine = $cpu = ''; - $sysname = $parts[0]; - $nodename = $parts[1]; - $cpu = $parts[$n-1]; - $extra = ''; - if ($cpu == 'unknown') { - $cpu = $parts[$n - 2]; - } - - switch ($sysname) { - case 'AIX' : - $release = "$parts[3].$parts[2]"; - break; - case 'Windows' : - $release = $parts[1]; - if ($release == '95/98') { - $release = '9x'; - } - $cpu = 'i386'; - break; - case 'Linux' : - $extra = $this->_detectGlibcVersion(); - // use only the first two digits from the kernel version - $release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]); - break; - case 'Mac' : - $sysname = 'darwin'; - $nodename = $parts[2]; - $release = $parts[3]; - $cpu = $this->_determineIfPowerpc($cpu, $parts); - break; - case 'Darwin' : - $cpu = $this->_determineIfPowerpc($cpu, $parts); - $release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]); - break; - default: - $release = preg_replace('/-.*/', '', $parts[2]); - break; - } - - if (isset($sysmap[$sysname])) { - $sysname = $sysmap[$sysname]; - } else { - $sysname = strtolower($sysname); - } - if (isset($cpumap[$cpu])) { - $cpu = $cpumap[$cpu]; - } - return array($sysname, $release, $cpu, $extra, $nodename); - } - - function _determineIfPowerpc($cpu, $parts) - { - $n = count($parts); - if ($cpu == 'Macintosh' && $parts[$n - 2] == 'Power') { - $cpu = 'powerpc'; - } - return $cpu; - } - - function _detectGlibcVersion() - { - static $glibc = false; - if ($glibc !== false) { - return $glibc; // no need to run this multiple times - } - $major = $minor = 0; - include_once "System.php"; - - // Let's try reading possible libc.so.6 symlinks - $libcs = array( - '/lib64/libc.so.6', - '/lib/libc.so.6', - '/lib/i386-linux-gnu/libc.so.6' - ); - $versions = array(); - foreach ($libcs as $file) { - $versions = $this->_readGlibCVersionFromSymlink($file); - if ($versions != []) { - list($major, $minor) = $versions; - break; - } - } - - // Use glibc's header file to - // get major and minor version number: - if (!($major && $minor)) { - $versions = $this->_readGlibCVersionFromFeaturesHeaderFile(); - } - if (is_array($versions) && $versions != []) { - list($major, $minor) = $versions; - } - - if (!($major && $minor)) { - return $glibc = ''; - } - - return $glibc = "glibc{$major}.{$minor}"; - } - - function _readGlibCVersionFromSymlink($file) - { - $versions = array(); - if (@is_link($file) - && (preg_match('/^libc-(.*)\.so$/', basename(readlink($file)), $matches)) - ) { - $versions = explode('.', $matches[1]); - } - return $versions; - } - - - function _readGlibCVersionFromFeaturesHeaderFile() - { - $features_header_file = '/usr/include/features.h'; - if (!(@file_exists($features_header_file) - && @is_readable($features_header_file)) - ) { - return array(); - } - if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) { - return $this-_parseFeaturesHeaderFile($features_header_file); - } // no cpp - - return $this->_fromGlibCTest(); - } - - function _parseFeaturesHeaderFile($features_header_file) - { - $features_file = fopen($features_header_file, 'rb'); - while (!feof($features_file)) { - $line = fgets($features_file, 8192); - if (!$this->_IsADefinition($line)) { - continue; - } - if (strpos($line, '__GLIBC__')) { - // major version number #define __GLIBC__ version - $line = preg_split('/\s+/', $line); - $glibc_major = trim($line[2]); - if (isset($glibc_minor)) { - break; - } - continue; - } - - if (strpos($line, '__GLIBC_MINOR__')) { - // got the minor version number - // #define __GLIBC_MINOR__ version - $line = preg_split('/\s+/', $line); - $glibc_minor = trim($line[2]); - if (isset($glibc_major)) { - break; - } - } - } - fclose($features_file); - if (!isset($glibc_major) || !isset($glibc_minor)) { - return array(); - } - return array(trim($glibc_major), trim($glibc_minor)); - } - - function _IsADefinition($line) - { - if ($line === false) { - return false; - } - return strpos(trim($line), '#define') !== false; - } - - function _fromGlibCTest() - { - $major = null; - $minor = null; - - $tmpfile = System::mktemp("glibctest"); - $fp = fopen($tmpfile, "w"); - fwrite($fp, "#include \n__GLIBC__ __GLIBC_MINOR__\n"); - fclose($fp); - $cpp = popen("/usr/bin/cpp $tmpfile", "r"); - while ($line = fgets($cpp, 1024)) { - if ($line[0] == '#' || trim($line) == '') { - continue; - } - - if (list($major, $minor) = explode(' ', trim($line))) { - break; - } - } - pclose($cpp); - unlink($tmpfile); - if ($major !== null && $minor !== null) { - return [$major, $minor]; - } - } - - function getSignature() - { - if (empty($this->extra)) { - return "{$this->sysname}-{$this->release}-{$this->cpu}"; - } - return "{$this->sysname}-{$this->release}-{$this->cpu}-{$this->extra}"; - } - - function getSysname() - { - return $this->sysname; - } - - function getNodename() - { - return $this->nodename; - } - - function getCpu() - { - return $this->cpu; - } - - function getRelease() - { - return $this->release; - } - - function getExtra() - { - return $this->extra; - } - - function matchSignature($match) - { - $fragments = is_array($match) ? $match : explode('-', $match); - $n = count($fragments); - $matches = 0; - if ($n > 0) { - $matches += $this->_matchFragment($fragments[0], $this->sysname); - } - if ($n > 1) { - $matches += $this->_matchFragment($fragments[1], $this->release); - } - if ($n > 2) { - $matches += $this->_matchFragment($fragments[2], $this->cpu); - } - if ($n > 3) { - $matches += $this->_matchFragment($fragments[3], $this->extra); - } - return ($matches == $n); - } - - function _matchFragment($fragment, $value) - { - if (strcspn($fragment, '*?') < strlen($fragment)) { - $expression = str_replace( - array('*', '?', '/'), - array('.*', '.', '\\/'), - $fragment - ); - $reg = '/^' . $expression . '\\z/'; - return preg_match($reg, $value); - } - return ($fragment == '*' || !strcasecmp($fragment, $value)); - } -} -/* - * Local Variables: - * indent-tabs-mode: nil - * c-basic-offset: 4 - * End: - */ diff --git a/lib/pear/pear-core-minimal/src/PEAR.php b/lib/pear/pear-core-minimal/src/PEAR.php deleted file mode 100644 index fee6638f4..000000000 --- a/lib/pear/pear-core-minimal/src/PEAR.php +++ /dev/null @@ -1,1135 +0,0 @@ - - * @author Stig Bakken - * @author Tomas V.V.Cox - * @author Greg Beaver - * @copyright 1997-2010 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/**#@+ - * ERROR constants - */ -define('PEAR_ERROR_RETURN', 1); -define('PEAR_ERROR_PRINT', 2); -define('PEAR_ERROR_TRIGGER', 4); -define('PEAR_ERROR_DIE', 8); -define('PEAR_ERROR_CALLBACK', 16); -/** - * WARNING: obsolete - * @deprecated - */ -define('PEAR_ERROR_EXCEPTION', 32); -/**#@-*/ - -if (substr(PHP_OS, 0, 3) == 'WIN') { - define('OS_WINDOWS', true); - define('OS_UNIX', false); - define('PEAR_OS', 'Windows'); -} else { - define('OS_WINDOWS', false); - define('OS_UNIX', true); - define('PEAR_OS', 'Unix'); // blatant assumption -} - -$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN; -$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE; -$GLOBALS['_PEAR_destructor_object_list'] = array(); -$GLOBALS['_PEAR_shutdown_funcs'] = array(); -$GLOBALS['_PEAR_error_handler_stack'] = array(); - -@ini_set('track_errors', true); - -/** - * Base class for other PEAR classes. Provides rudimentary - * emulation of destructors. - * - * If you want a destructor in your class, inherit PEAR and make a - * destructor method called _yourclassname (same name as the - * constructor, but with a "_" prefix). Also, in your constructor you - * have to call the PEAR constructor: $this->PEAR();. - * The destructor method will be called without parameters. Note that - * at in some SAPI implementations (such as Apache), any output during - * the request shutdown (in which destructors are called) seems to be - * discarded. If you need to get any debug information from your - * destructor, use error_log(), syslog() or something similar. - * - * IMPORTANT! To use the emulated destructors you need to create the - * objects by reference: $obj =& new PEAR_child; - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V.V. Cox - * @author Greg Beaver - * @copyright 1997-2006 The PHP Group - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @see PEAR_Error - * @since Class available since PHP 4.0.2 - * @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear - */ -class PEAR -{ - /** - * Whether to enable internal debug messages. - * - * @var bool - * @access private - */ - var $_debug = false; - - /** - * Default error mode for this object. - * - * @var int - * @access private - */ - var $_default_error_mode = null; - - /** - * Default error options used for this object when error mode - * is PEAR_ERROR_TRIGGER. - * - * @var int - * @access private - */ - var $_default_error_options = null; - - /** - * Default error handler (callback) for this object, if error mode is - * PEAR_ERROR_CALLBACK. - * - * @var string - * @access private - */ - var $_default_error_handler = ''; - - /** - * Which class to use for error objects. - * - * @var string - * @access private - */ - var $_error_class = 'PEAR_Error'; - - /** - * An array of expected errors. - * - * @var array - * @access private - */ - var $_expected_errors = array(); - - /** - * List of methods that can be called both statically and non-statically. - * @var array - */ - protected static $bivalentMethods = array( - 'setErrorHandling' => true, - 'raiseError' => true, - 'throwError' => true, - 'pushErrorHandling' => true, - 'popErrorHandling' => true, - ); - - /** - * Constructor. Registers this object in - * $_PEAR_destructor_object_list for destructor emulation if a - * destructor object exists. - * - * @param string $error_class (optional) which class to use for - * error objects, defaults to PEAR_Error. - * @access public - * @return void - */ - function __construct($error_class = null) - { - $classname = strtolower(get_class($this)); - if ($this->_debug) { - print "PEAR constructor called, class=$classname\n"; - } - - if ($error_class !== null) { - $this->_error_class = $error_class; - } - - while ($classname && strcasecmp($classname, "pear")) { - $destructor = "_$classname"; - if (method_exists($this, $destructor)) { - global $_PEAR_destructor_object_list; - $_PEAR_destructor_object_list[] = $this; - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { - register_shutdown_function("_PEAR_call_destructors"); - $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; - } - break; - } else { - $classname = get_parent_class($classname); - } - } - } - - /** - * Only here for backwards compatibility. - * E.g. Archive_Tar calls $this->PEAR() in its constructor. - * - * @param string $error_class Which class to use for error objects, - * defaults to PEAR_Error. - */ - public function PEAR($error_class = null) - { - self::__construct($error_class); - } - - /** - * Destructor (the emulated type of...). Does nothing right now, - * but is included for forward compatibility, so subclass - * destructors should always call it. - * - * See the note in the class desciption about output from - * destructors. - * - * @access public - * @return void - */ - function _PEAR() { - if ($this->_debug) { - printf("PEAR destructor called, class=%s\n", strtolower(get_class($this))); - } - } - - public function __call($method, $arguments) - { - if (!isset(self::$bivalentMethods[$method])) { - trigger_error( - 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR - ); - } - return call_user_func_array( - array(get_class(), '_' . $method), - array_merge(array($this), $arguments) - ); - } - - public static function __callStatic($method, $arguments) - { - if (!isset(self::$bivalentMethods[$method])) { - trigger_error( - 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR - ); - } - return call_user_func_array( - array(get_class(), '_' . $method), - array_merge(array(null), $arguments) - ); - } - - /** - * If you have a class that's mostly/entirely static, and you need static - * properties, you can use this method to simulate them. Eg. in your method(s) - * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); - * You MUST use a reference, or they will not persist! - * - * @param string $class The calling classname, to prevent clashes - * @param string $var The variable to retrieve. - * @return mixed A reference to the variable. If not set it will be - * auto initialised to NULL. - */ - public static function &getStaticProperty($class, $var) - { - static $properties; - if (!isset($properties[$class])) { - $properties[$class] = array(); - } - - if (!array_key_exists($var, $properties[$class])) { - $properties[$class][$var] = null; - } - - return $properties[$class][$var]; - } - - /** - * Use this function to register a shutdown method for static - * classes. - * - * @param mixed $func The function name (or array of class/method) to call - * @param mixed $args The arguments to pass to the function - * - * @return void - */ - public static function registerShutdownFunc($func, $args = array()) - { - // if we are called statically, there is a potential - // that no shutdown func is registered. Bug #6445 - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { - register_shutdown_function("_PEAR_call_destructors"); - $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; - } - $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args); - } - - /** - * Tell whether a value is a PEAR error. - * - * @param mixed $data the value to test - * @param int $code if $data is an error object, return true - * only if $code is a string and - * $obj->getMessage() == $code or - * $code is an integer and $obj->getCode() == $code - * - * @return bool true if parameter is an error - */ - public static function isError($data, $code = null) - { - if (!is_a($data, 'PEAR_Error')) { - return false; - } - - if (is_null($code)) { - return true; - } elseif (is_string($code)) { - return $data->getMessage() == $code; - } - - return $data->getCode() == $code; - } - - /** - * Sets how errors generated by this object should be handled. - * Can be invoked both in objects and statically. If called - * statically, setErrorHandling sets the default behaviour for all - * PEAR objects. If called in an object, setErrorHandling sets - * the default behaviour for that object. - * - * @param object $object - * Object the method was called on (non-static mode) - * - * @param int $mode - * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, - * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, - * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION. - * - * @param mixed $options - * When $mode is PEAR_ERROR_TRIGGER, this is the error level (one - * of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). - * - * When $mode is PEAR_ERROR_CALLBACK, this parameter is expected - * to be the callback function or method. A callback - * function is a string with the name of the function, a - * callback method is an array of two elements: the element - * at index 0 is the object, and the element at index 1 is - * the name of the method to call in the object. - * - * When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is - * a printf format string used when printing the error - * message. - * - * @access public - * @return void - * @see PEAR_ERROR_RETURN - * @see PEAR_ERROR_PRINT - * @see PEAR_ERROR_TRIGGER - * @see PEAR_ERROR_DIE - * @see PEAR_ERROR_CALLBACK - * @see PEAR_ERROR_EXCEPTION - * - * @since PHP 4.0.5 - */ - protected static function _setErrorHandling( - $object, $mode = null, $options = null - ) { - if ($object !== null) { - $setmode = &$object->_default_error_mode; - $setoptions = &$object->_default_error_options; - } else { - $setmode = &$GLOBALS['_PEAR_default_error_mode']; - $setoptions = &$GLOBALS['_PEAR_default_error_options']; - } - - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $setmode = $mode; - $setoptions = $options; - break; - - case PEAR_ERROR_CALLBACK: - $setmode = $mode; - // class/object method callback - if (is_callable($options)) { - $setoptions = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - } - - /** - * This method is used to tell which errors you expect to get. - * Expected errors are always returned with error mode - * PEAR_ERROR_RETURN. Expected error codes are stored in a stack, - * and this method pushes a new element onto it. The list of - * expected errors are in effect until they are popped off the - * stack with the popExpect() method. - * - * Note that this method can not be called statically - * - * @param mixed $code a single error code or an array of error codes to expect - * - * @return int the new depth of the "expected errors" stack - * @access public - */ - function expectError($code = '*') - { - if (is_array($code)) { - array_push($this->_expected_errors, $code); - } else { - array_push($this->_expected_errors, array($code)); - } - return count($this->_expected_errors); - } - - /** - * This method pops one element off the expected error codes - * stack. - * - * @return array the list of error codes that were popped - */ - function popExpect() - { - return array_pop($this->_expected_errors); - } - - /** - * This method checks unsets an error code if available - * - * @param mixed error code - * @return bool true if the error code was unset, false otherwise - * @access private - * @since PHP 4.3.0 - */ - function _checkDelExpect($error_code) - { - $deleted = false; - foreach ($this->_expected_errors as $key => $error_array) { - if (in_array($error_code, $error_array)) { - unset($this->_expected_errors[$key][array_search($error_code, $error_array)]); - $deleted = true; - } - - // clean up empty arrays - if (0 == count($this->_expected_errors[$key])) { - unset($this->_expected_errors[$key]); - } - } - - return $deleted; - } - - /** - * This method deletes all occurrences of the specified element from - * the expected error codes stack. - * - * @param mixed $error_code error code that should be deleted - * @return mixed list of error codes that were deleted or error - * @access public - * @since PHP 4.3.0 - */ - function delExpect($error_code) - { - $deleted = false; - if ((is_array($error_code) && (0 != count($error_code)))) { - // $error_code is a non-empty array here; we walk through it trying - // to unset all values - foreach ($error_code as $key => $error) { - $deleted = $this->_checkDelExpect($error) ? true : false; - } - - return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } elseif (!empty($error_code)) { - // $error_code comes alone, trying to unset it - if ($this->_checkDelExpect($error_code)) { - return true; - } - - return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } - - // $error_code is empty - return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME - } - - /** - * This method is a wrapper that returns an instance of the - * configured error class with this object's default error - * handling applied. If the $mode and $options parameters are not - * specified, the object's defaults are used. - * - * @param mixed $message a text error message or a PEAR error object - * - * @param int $code a numeric error code (it is up to your class - * to define these if you want to use codes) - * - * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, - * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, - * PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION. - * - * @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter - * specifies the PHP-internal error level (one of - * E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). - * If $mode is PEAR_ERROR_CALLBACK, this - * parameter specifies the callback function or - * method. In other error modes this parameter - * is ignored. - * - * @param string $userinfo If you need to pass along for example debug - * information, this parameter is meant for that. - * - * @param string $error_class The returned error object will be - * instantiated from this class, if specified. - * - * @param bool $skipmsg If true, raiseError will only pass error codes, - * the error message parameter will be dropped. - * - * @return object a PEAR error object - * @see PEAR::setErrorHandling - * @since PHP 4.0.5 - */ - protected static function _raiseError($object, - $message = null, - $code = null, - $mode = null, - $options = null, - $userinfo = null, - $error_class = null, - $skipmsg = false) - { - // The error is yet a PEAR error object - if (is_object($message)) { - $code = $message->getCode(); - $userinfo = $message->getUserInfo(); - $error_class = $message->getType(); - $message->error_message_prefix = ''; - $message = $message->getMessage(); - } - - if ( - $object !== null && - isset($object->_expected_errors) && - count($object->_expected_errors) > 0 && - count($exp = end($object->_expected_errors)) - ) { - if ($exp[0] === "*" || - (is_int(reset($exp)) && in_array($code, $exp)) || - (is_string(reset($exp)) && in_array($message, $exp)) - ) { - $mode = PEAR_ERROR_RETURN; - } - } - - // No mode given, try global ones - if ($mode === null) { - // Class error handler - if ($object !== null && isset($object->_default_error_mode)) { - $mode = $object->_default_error_mode; - $options = $object->_default_error_options; - // Global error handler - } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) { - $mode = $GLOBALS['_PEAR_default_error_mode']; - $options = $GLOBALS['_PEAR_default_error_options']; - } - } - - if ($error_class !== null) { - $ec = $error_class; - } elseif ($object !== null && isset($object->_error_class)) { - $ec = $object->_error_class; - } else { - $ec = 'PEAR_Error'; - } - - if ($skipmsg) { - $a = new $ec($code, $mode, $options, $userinfo); - } else { - $a = new $ec($message, $code, $mode, $options, $userinfo); - } - - return $a; - } - - /** - * Simpler form of raiseError with fewer options. In most cases - * message, code and userinfo are enough. - * - * @param mixed $message a text error message or a PEAR error object - * - * @param int $code a numeric error code (it is up to your class - * to define these if you want to use codes) - * - * @param string $userinfo If you need to pass along for example debug - * information, this parameter is meant for that. - * - * @return object a PEAR error object - * @see PEAR::raiseError - */ - protected static function _throwError($object, $message = null, $code = null, $userinfo = null) - { - if ($object !== null) { - $a = $object->raiseError($message, $code, null, null, $userinfo); - return $a; - } - - $a = PEAR::raiseError($message, $code, null, null, $userinfo); - return $a; - } - - public static function staticPushErrorHandling($mode, $options = null) - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - $def_mode = &$GLOBALS['_PEAR_default_error_mode']; - $def_options = &$GLOBALS['_PEAR_default_error_options']; - $stack[] = array($def_mode, $def_options); - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $def_mode = $mode; - $def_options = $options; - break; - - case PEAR_ERROR_CALLBACK: - $def_mode = $mode; - // class/object method callback - if (is_callable($options)) { - $def_options = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - $stack[] = array($mode, $options); - return true; - } - - public static function staticPopErrorHandling() - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - $setmode = &$GLOBALS['_PEAR_default_error_mode']; - $setoptions = &$GLOBALS['_PEAR_default_error_options']; - array_pop($stack); - list($mode, $options) = $stack[sizeof($stack) - 1]; - array_pop($stack); - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $setmode = $mode; - $setoptions = $options; - break; - - case PEAR_ERROR_CALLBACK: - $setmode = $mode; - // class/object method callback - if (is_callable($options)) { - $setoptions = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - return true; - } - - /** - * Push a new error handler on top of the error handler options stack. With this - * you can easily override the actual error handler for some code and restore - * it later with popErrorHandling. - * - * @param mixed $mode (same as setErrorHandling) - * @param mixed $options (same as setErrorHandling) - * - * @return bool Always true - * - * @see PEAR::setErrorHandling - */ - protected static function _pushErrorHandling($object, $mode, $options = null) - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - if ($object !== null) { - $def_mode = &$object->_default_error_mode; - $def_options = &$object->_default_error_options; - } else { - $def_mode = &$GLOBALS['_PEAR_default_error_mode']; - $def_options = &$GLOBALS['_PEAR_default_error_options']; - } - $stack[] = array($def_mode, $def_options); - - if ($object !== null) { - $object->setErrorHandling($mode, $options); - } else { - PEAR::setErrorHandling($mode, $options); - } - $stack[] = array($mode, $options); - return true; - } - - /** - * Pop the last error handler used - * - * @return bool Always true - * - * @see PEAR::pushErrorHandling - */ - protected static function _popErrorHandling($object) - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - array_pop($stack); - list($mode, $options) = $stack[sizeof($stack) - 1]; - array_pop($stack); - if ($object !== null) { - $object->setErrorHandling($mode, $options); - } else { - PEAR::setErrorHandling($mode, $options); - } - return true; - } - - /** - * OS independent PHP extension load. Remember to take care - * on the correct extension name for case sensitive OSes. - * - * @param string $ext The extension name - * @return bool Success or not on the dl() call - */ - public static function loadExtension($ext) - { - if (extension_loaded($ext)) { - return true; - } - - // if either returns true dl() will produce a FATAL error, stop that - if ( - function_exists('dl') === false || - ini_get('enable_dl') != 1 - ) { - return false; - } - - if (OS_WINDOWS) { - $suffix = '.dll'; - } elseif (PHP_OS == 'HP-UX') { - $suffix = '.sl'; - } elseif (PHP_OS == 'AIX') { - $suffix = '.a'; - } elseif (PHP_OS == 'OSX') { - $suffix = '.bundle'; - } else { - $suffix = '.so'; - } - - return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix); - } - - /** - * Get SOURCE_DATE_EPOCH environment variable - * See https://reproducible-builds.org/specs/source-date-epoch/ - * - * @return int - * @access public - */ - static function getSourceDateEpoch() - { - if ($source_date_epoch = getenv('SOURCE_DATE_EPOCH')) { - if (preg_match('/^\d+$/', $source_date_epoch)) { - return (int) $source_date_epoch; - } else { - // "If the value is malformed, the build process SHOULD exit with a non-zero error code." - self::raiseError("Invalid SOURCE_DATE_EPOCH: $source_date_epoch"); - exit(1); - } - } else { - return time(); - } - } -} - -function _PEAR_call_destructors() -{ - global $_PEAR_destructor_object_list; - if (is_array($_PEAR_destructor_object_list) && - sizeof($_PEAR_destructor_object_list)) - { - reset($_PEAR_destructor_object_list); - - $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo'); - - if ($destructLifoExists) { - $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); - } - - foreach ($_PEAR_destructor_object_list as $k => $objref) { - $classname = get_class($objref); - while ($classname) { - $destructor = "_$classname"; - if (method_exists($objref, $destructor)) { - $objref->$destructor(); - break; - } else { - $classname = get_parent_class($classname); - } - } - } - // Empty the object list to ensure that destructors are - // not called more than once. - $_PEAR_destructor_object_list = array(); - } - - // Now call the shutdown functions - if ( - isset($GLOBALS['_PEAR_shutdown_funcs']) && - is_array($GLOBALS['_PEAR_shutdown_funcs']) && - !empty($GLOBALS['_PEAR_shutdown_funcs']) - ) { - foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) { - call_user_func_array($value[0], $value[1]); - } - } -} - -/** - * Standard PEAR error class for PHP 4 - * - * This class is supserseded by {@link PEAR_Exception} in PHP 5 - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V.V. Cox - * @author Gregory Beaver - * @copyright 1997-2006 The PHP Group - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: @package_version@ - * @link http://pear.php.net/manual/en/core.pear.pear-error.php - * @see PEAR::raiseError(), PEAR::throwError() - * @since Class available since PHP 4.0.2 - */ -class PEAR_Error -{ - var $error_message_prefix = ''; - var $mode = PEAR_ERROR_RETURN; - var $level = E_USER_NOTICE; - var $code = -1; - var $message = ''; - var $userinfo = ''; - var $backtrace = null; - - /** - * PEAR_Error constructor - * - * @param string $message message - * - * @param int $code (optional) error code - * - * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN, - * PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER, - * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION - * - * @param mixed $options (optional) error level, _OR_ in the case of - * PEAR_ERROR_CALLBACK, the callback function or object/method - * tuple. - * - * @param string $userinfo (optional) additional user/debug info - * - * @access public - * - */ - function __construct($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null) - { - if ($mode === null) { - $mode = PEAR_ERROR_RETURN; - } - $this->message = $message; - $this->code = $code; - $this->mode = $mode; - $this->userinfo = $userinfo; - - $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); - - if (!$skiptrace) { - $this->backtrace = debug_backtrace(); - if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) { - unset($this->backtrace[0]['object']); - } - } - - if ($mode & PEAR_ERROR_CALLBACK) { - $this->level = E_USER_NOTICE; - $this->callback = $options; - } else { - if ($options === null) { - $options = E_USER_NOTICE; - } - - $this->level = $options; - $this->callback = null; - } - - if ($this->mode & PEAR_ERROR_PRINT) { - if (is_null($options) || is_int($options)) { - $format = "%s"; - } else { - $format = $options; - } - - printf($format, $this->getMessage()); - } - - if ($this->mode & PEAR_ERROR_TRIGGER) { - trigger_error($this->getMessage(), $this->level); - } - - if ($this->mode & PEAR_ERROR_DIE) { - $msg = $this->getMessage(); - if (is_null($options) || is_int($options)) { - $format = "%s"; - if (substr($msg, -1) != "\n") { - $msg .= "\n"; - } - } else { - $format = $options; - } - printf($format, $msg); - exit($code); - } - - if ($this->mode & PEAR_ERROR_CALLBACK && is_callable($this->callback)) { - call_user_func($this->callback, $this); - } - - if ($this->mode & PEAR_ERROR_EXCEPTION) { - trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING); - eval('$e = new Exception($this->message, $this->code);throw($e);'); - } - } - - /** - * Only here for backwards compatibility. - * - * Class "Cache_Error" still uses it, among others. - * - * @param string $message Message - * @param int $code Error code - * @param int $mode Error mode - * @param mixed $options See __construct() - * @param string $userinfo Additional user/debug info - */ - public function PEAR_Error( - $message = 'unknown error', $code = null, $mode = null, - $options = null, $userinfo = null - ) { - self::__construct($message, $code, $mode, $options, $userinfo); - } - - /** - * Get the error mode from an error object. - * - * @return int error mode - * @access public - */ - function getMode() - { - return $this->mode; - } - - /** - * Get the callback function/method from an error object. - * - * @return mixed callback function or object/method array - * @access public - */ - function getCallback() - { - return $this->callback; - } - - /** - * Get the error message from an error object. - * - * @return string full error message - * @access public - */ - function getMessage() - { - return ($this->error_message_prefix . $this->message); - } - - /** - * Get error code from an error object - * - * @return int error code - * @access public - */ - function getCode() - { - return $this->code; - } - - /** - * Get the name of this error/exception. - * - * @return string error/exception name (type) - * @access public - */ - function getType() - { - return get_class($this); - } - - /** - * Get additional user-supplied information. - * - * @return string user-supplied information - * @access public - */ - function getUserInfo() - { - return $this->userinfo; - } - - /** - * Get additional debug information supplied by the application. - * - * @return string debug information - * @access public - */ - function getDebugInfo() - { - return $this->getUserInfo(); - } - - /** - * Get the call backtrace from where the error was generated. - * Supported with PHP 4.3.0 or newer. - * - * @param int $frame (optional) what frame to fetch - * @return array Backtrace, or NULL if not available. - * @access public - */ - function getBacktrace($frame = null) - { - if (defined('PEAR_IGNORE_BACKTRACE')) { - return null; - } - if ($frame === null) { - return $this->backtrace; - } - return $this->backtrace[$frame]; - } - - function addUserInfo($info) - { - if (empty($this->userinfo)) { - $this->userinfo = $info; - } else { - $this->userinfo .= " ** $info"; - } - } - - function __toString() - { - return $this->getMessage(); - } - - /** - * Make a string representation of this object. - * - * @return string a string with an object summary - * @access public - */ - function toString() - { - $modes = array(); - $levels = array(E_USER_NOTICE => 'notice', - E_USER_WARNING => 'warning', - E_USER_ERROR => 'error'); - if ($this->mode & PEAR_ERROR_CALLBACK) { - if (is_array($this->callback)) { - $callback = (is_object($this->callback[0]) ? - strtolower(get_class($this->callback[0])) : - $this->callback[0]) . '::' . - $this->callback[1]; - } else { - $callback = $this->callback; - } - return sprintf('[%s: message="%s" code=%d mode=callback '. - 'callback=%s prefix="%s" info="%s"]', - strtolower(get_class($this)), $this->message, $this->code, - $callback, $this->error_message_prefix, - $this->userinfo); - } - if ($this->mode & PEAR_ERROR_PRINT) { - $modes[] = 'print'; - } - if ($this->mode & PEAR_ERROR_TRIGGER) { - $modes[] = 'trigger'; - } - if ($this->mode & PEAR_ERROR_DIE) { - $modes[] = 'die'; - } - if ($this->mode & PEAR_ERROR_RETURN) { - $modes[] = 'return'; - } - return sprintf('[%s: message="%s" code=%d mode=%s level=%s '. - 'prefix="%s" info="%s"]', - strtolower(get_class($this)), $this->message, $this->code, - implode("|", $modes), $levels[$this->level], - $this->error_message_prefix, - $this->userinfo); - } -} - -/* - * Local Variables: - * mode: php - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/lib/pear/pear-core-minimal/src/PEAR/Error.php b/lib/pear/pear-core-minimal/src/PEAR/Error.php deleted file mode 100644 index 96efff75d..000000000 --- a/lib/pear/pear-core-minimal/src/PEAR/Error.php +++ /dev/null @@ -1,14 +0,0 @@ - - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @link http://pear.php.net/package/PEAR - */ -require_once __DIR__ . '/../PEAR.php'; -?> \ No newline at end of file diff --git a/lib/pear/pear-core-minimal/src/PEAR/ErrorStack.php b/lib/pear/pear-core-minimal/src/PEAR/ErrorStack.php deleted file mode 100644 index 6619fbb1e..000000000 --- a/lib/pear/pear-core-minimal/src/PEAR/ErrorStack.php +++ /dev/null @@ -1,979 +0,0 @@ - - * @copyright 2004-2008 Greg Beaver - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @link http://pear.php.net/package/PEAR_ErrorStack - */ - -/** - * Singleton storage - * - * Format: - *
    - * array(
    - *  'package1' => PEAR_ErrorStack object,
    - *  'package2' => PEAR_ErrorStack object,
    - *  ...
    - * )
    - * 
    - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] - */ -$GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] = array(); - -/** - * Global error callback (default) - * - * This is only used if set to non-false. * is the default callback for - * all packages, whereas specific packages may set a default callback - * for all instances, regardless of whether they are a singleton or not. - * - * To exclude non-singletons, only set the local callback for the singleton - * @see PEAR_ErrorStack::setDefaultCallback() - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] - */ -$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] = array( - '*' => false, -); - -/** - * Global Log object (default) - * - * This is only used if set to non-false. Use to set a default log object for - * all stacks, regardless of instantiation order or location - * @see PEAR_ErrorStack::setDefaultLogger() - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] - */ -$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = false; - -/** - * Global Overriding Callback - * - * This callback will override any error callbacks that specific loggers have set. - * Use with EXTREME caution - * @see PEAR_ErrorStack::staticPushCallback() - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] - */ -$GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array(); - -/**#@+ - * One of four possible return values from the error Callback - * @see PEAR_ErrorStack::_errorCallback() - */ -/** - * If this is returned, then the error will be both pushed onto the stack - * and logged. - */ -define('PEAR_ERRORSTACK_PUSHANDLOG', 1); -/** - * If this is returned, then the error will only be pushed onto the stack, - * and not logged. - */ -define('PEAR_ERRORSTACK_PUSH', 2); -/** - * If this is returned, then the error will only be logged, but not pushed - * onto the error stack. - */ -define('PEAR_ERRORSTACK_LOG', 3); -/** - * If this is returned, then the error is completely ignored. - */ -define('PEAR_ERRORSTACK_IGNORE', 4); -/** - * If this is returned, then the error is logged and die() is called. - */ -define('PEAR_ERRORSTACK_DIE', 5); -/**#@-*/ - -/** - * Error code for an attempt to instantiate a non-class as a PEAR_ErrorStack in - * the singleton method. - */ -define('PEAR_ERRORSTACK_ERR_NONCLASS', 1); - -/** - * Error code for an attempt to pass an object into {@link PEAR_ErrorStack::getMessage()} - * that has no __toString() method - */ -define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2); -/** - * Error Stack Implementation - * - * Usage: - * - * // global error stack - * $global_stack = &PEAR_ErrorStack::singleton('MyPackage'); - * // local error stack - * $local_stack = new PEAR_ErrorStack('MyPackage'); - * - * @author Greg Beaver - * @version @package_version@ - * @package PEAR_ErrorStack - * @category Debugging - * @copyright 2004-2008 Greg Beaver - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @link http://pear.php.net/package/PEAR_ErrorStack - */ -class PEAR_ErrorStack { - /** - * Errors are stored in the order that they are pushed on the stack. - * @since 0.4alpha Errors are no longer organized by error level. - * This renders pop() nearly unusable, and levels could be more easily - * handled in a callback anyway - * @var array - * @access private - */ - var $_errors = array(); - - /** - * Storage of errors by level. - * - * Allows easy retrieval and deletion of only errors from a particular level - * @since PEAR 1.4.0dev - * @var array - * @access private - */ - var $_errorsByLevel = array(); - - /** - * Package name this error stack represents - * @var string - * @access protected - */ - var $_package; - - /** - * Determines whether a PEAR_Error is thrown upon every error addition - * @var boolean - * @access private - */ - var $_compat = false; - - /** - * If set to a valid callback, this will be used to generate the error - * message from the error code, otherwise the message passed in will be - * used - * @var false|string|array - * @access private - */ - var $_msgCallback = false; - - /** - * If set to a valid callback, this will be used to generate the error - * context for an error. For PHP-related errors, this will be a file - * and line number as retrieved from debug_backtrace(), but can be - * customized for other purposes. The error might actually be in a separate - * configuration file, or in a database query. - * @var false|string|array - * @access protected - */ - var $_contextCallback = false; - - /** - * If set to a valid callback, this will be called every time an error - * is pushed onto the stack. The return value will be used to determine - * whether to allow an error to be pushed or logged. - * - * The return value must be one an PEAR_ERRORSTACK_* constant - * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG - * @var false|string|array - * @access protected - */ - var $_errorCallback = array(); - - /** - * PEAR::Log object for logging errors - * @var false|Log - * @access protected - */ - var $_logger = false; - - /** - * Error messages - designed to be overridden - * @var array - * @abstract - */ - var $_errorMsgs = array(); - - /** - * Set up a new error stack - * - * @param string $package name of the package this error stack represents - * @param callback $msgCallback callback used for error message generation - * @param callback $contextCallback callback used for context generation, - * defaults to {@link getFileLine()} - * @param boolean $throwPEAR_Error - */ - function __construct($package, $msgCallback = false, $contextCallback = false, - $throwPEAR_Error = false) - { - $this->_package = $package; - $this->setMessageCallback($msgCallback); - $this->setContextCallback($contextCallback); - $this->_compat = $throwPEAR_Error; - } - - /** - * Return a single error stack for this package. - * - * Note that all parameters are ignored if the stack for package $package - * has already been instantiated - * @param string $package name of the package this error stack represents - * @param callback $msgCallback callback used for error message generation - * @param callback $contextCallback callback used for context generation, - * defaults to {@link getFileLine()} - * @param boolean $throwPEAR_Error - * @param string $stackClass class to instantiate - * - * @return PEAR_ErrorStack - */ - public static function &singleton( - $package, $msgCallback = false, $contextCallback = false, - $throwPEAR_Error = false, $stackClass = 'PEAR_ErrorStack' - ) { - if (isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]; - } - if (!class_exists($stackClass)) { - if (function_exists('debug_backtrace')) { - $trace = debug_backtrace(); - } - PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_NONCLASS, - 'exception', array('stackclass' => $stackClass), - 'stack class "%stackclass%" is not a valid class name (should be like PEAR_ErrorStack)', - false, $trace); - } - $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package] = - new $stackClass($package, $msgCallback, $contextCallback, $throwPEAR_Error); - - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]; - } - - /** - * Internal error handler for PEAR_ErrorStack class - * - * Dies if the error is an exception (and would have died anyway) - * @access private - */ - function _handleError($err) - { - if ($err['level'] == 'exception') { - $message = $err['message']; - if (isset($_SERVER['REQUEST_URI'])) { - echo '
    '; - } else { - echo "\n"; - } - var_dump($err['context']); - die($message); - } - } - - /** - * Set up a PEAR::Log object for all error stacks that don't have one - * @param Log $log - */ - public static function setDefaultLogger(&$log) - { - if (is_object($log) && method_exists($log, 'log') ) { - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; - } elseif (is_callable($log)) { - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; - } - } - - /** - * Set up a PEAR::Log object for this error stack - * @param Log $log - */ - function setLogger(&$log) - { - if (is_object($log) && method_exists($log, 'log') ) { - $this->_logger = &$log; - } elseif (is_callable($log)) { - $this->_logger = &$log; - } - } - - /** - * Set an error code => error message mapping callback - * - * This method sets the callback that can be used to generate error - * messages for any instance - * @param array|string Callback function/method - */ - function setMessageCallback($msgCallback) - { - if (!$msgCallback) { - $this->_msgCallback = array(&$this, 'getErrorMessage'); - } else { - if (is_callable($msgCallback)) { - $this->_msgCallback = $msgCallback; - } - } - } - - /** - * Get an error code => error message mapping callback - * - * This method returns the current callback that can be used to generate error - * messages - * @return array|string|false Callback function/method or false if none - */ - function getMessageCallback() - { - return $this->_msgCallback; - } - - /** - * Sets a default callback to be used by all error stacks - * - * This method sets the callback that can be used to generate error - * messages for a singleton - * @param array|string Callback function/method - * @param string Package name, or false for all packages - */ - public static function setDefaultCallback($callback = false, $package = false) - { - if (!is_callable($callback)) { - $callback = false; - } - $package = $package ? $package : '*'; - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$package] = $callback; - } - - /** - * Set a callback that generates context information (location of error) for an error stack - * - * This method sets the callback that can be used to generate context - * information for an error. Passing in NULL will disable context generation - * and remove the expensive call to debug_backtrace() - * @param array|string|null Callback function/method - */ - function setContextCallback($contextCallback) - { - if ($contextCallback === null) { - return $this->_contextCallback = false; - } - if (!$contextCallback) { - $this->_contextCallback = array(&$this, 'getFileLine'); - } else { - if (is_callable($contextCallback)) { - $this->_contextCallback = $contextCallback; - } - } - } - - /** - * Set an error Callback - * If set to a valid callback, this will be called every time an error - * is pushed onto the stack. The return value will be used to determine - * whether to allow an error to be pushed or logged. - * - * The return value must be one of the ERRORSTACK_* constants. - * - * This functionality can be used to emulate PEAR's pushErrorHandling, and - * the PEAR_ERROR_CALLBACK mode, without affecting the integrity of - * the error stack or logging - * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG - * @see popCallback() - * @param string|array $cb - */ - function pushCallback($cb) - { - array_push($this->_errorCallback, $cb); - } - - /** - * Remove a callback from the error callback stack - * @see pushCallback() - * @return array|string|false - */ - function popCallback() - { - if (!count($this->_errorCallback)) { - return false; - } - return array_pop($this->_errorCallback); - } - - /** - * Set a temporary overriding error callback for every package error stack - * - * Use this to temporarily disable all existing callbacks (can be used - * to emulate the @ operator, for instance) - * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG - * @see staticPopCallback(), pushCallback() - * @param string|array $cb - */ - public static function staticPushCallback($cb) - { - array_push($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'], $cb); - } - - /** - * Remove a temporary overriding error callback - * @see staticPushCallback() - * @return array|string|false - */ - public static function staticPopCallback() - { - $ret = array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']); - if (!is_array($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'])) { - $GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array(); - } - return $ret; - } - - /** - * Add an error to the stack - * - * If the message generator exists, it is called with 2 parameters. - * - the current Error Stack object - * - an array that is in the same format as an error. Available indices - * are 'code', 'package', 'time', 'params', 'level', and 'context' - * - * Next, if the error should contain context information, this is - * handled by the context grabbing method. - * Finally, the error is pushed onto the proper error stack - * @param int $code Package-specific error code - * @param string $level Error level. This is NOT spell-checked - * @param array $params associative array of error parameters - * @param string $msg Error message, or a portion of it if the message - * is to be generated - * @param array $repackage If this error re-packages an error pushed by - * another package, place the array returned from - * {@link pop()} in this parameter - * @param array $backtrace Protected parameter: use this to pass in the - * {@link debug_backtrace()} that should be used - * to find error context - * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also - * thrown. If a PEAR_Error is returned, the userinfo - * property is set to the following array: - * - * - * array( - * 'code' => $code, - * 'params' => $params, - * 'package' => $this->_package, - * 'level' => $level, - * 'time' => time(), - * 'context' => $context, - * 'message' => $msg, - * //['repackage' => $err] repackaged error array/Exception class - * ); - * - * - * Normally, the previous array is returned. - */ - function push($code, $level = 'error', $params = array(), $msg = false, - $repackage = false, $backtrace = false) - { - $context = false; - // grab error context - if ($this->_contextCallback) { - if (!$backtrace) { - $backtrace = debug_backtrace(); - } - $context = call_user_func($this->_contextCallback, $code, $params, $backtrace); - } - - // save error - $time = explode(' ', microtime()); - $time = $time[1] + $time[0]; - $err = array( - 'code' => $code, - 'params' => $params, - 'package' => $this->_package, - 'level' => $level, - 'time' => $time, - 'context' => $context, - 'message' => $msg, - ); - - if ($repackage) { - $err['repackage'] = $repackage; - } - - // set up the error message, if necessary - if ($this->_msgCallback) { - $msg = call_user_func_array($this->_msgCallback, - array(&$this, $err)); - $err['message'] = $msg; - } - $push = $log = true; - $die = false; - // try the overriding callback first - $callback = $this->staticPopCallback(); - if ($callback) { - $this->staticPushCallback($callback); - } - if (!is_callable($callback)) { - // try the local callback next - $callback = $this->popCallback(); - if (is_callable($callback)) { - $this->pushCallback($callback); - } else { - // try the default callback - $callback = isset($GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package]) ? - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package] : - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']['*']; - } - } - if (is_callable($callback)) { - switch(call_user_func($callback, $err)){ - case PEAR_ERRORSTACK_IGNORE: - return $err; - break; - case PEAR_ERRORSTACK_PUSH: - $log = false; - break; - case PEAR_ERRORSTACK_LOG: - $push = false; - break; - case PEAR_ERRORSTACK_DIE: - $die = true; - break; - // anything else returned has the same effect as pushandlog - } - } - if ($push) { - array_unshift($this->_errors, $err); - if (!isset($this->_errorsByLevel[$err['level']])) { - $this->_errorsByLevel[$err['level']] = array(); - } - $this->_errorsByLevel[$err['level']][] = &$this->_errors[0]; - } - if ($log) { - if ($this->_logger || $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']) { - $this->_log($err); - } - } - if ($die) { - die(); - } - if ($this->_compat && $push) { - return $this->raiseError($msg, $code, null, null, $err); - } - return $err; - } - - /** - * Static version of {@link push()} - * - * @param string $package Package name this error belongs to - * @param int $code Package-specific error code - * @param string $level Error level. This is NOT spell-checked - * @param array $params associative array of error parameters - * @param string $msg Error message, or a portion of it if the message - * is to be generated - * @param array $repackage If this error re-packages an error pushed by - * another package, place the array returned from - * {@link pop()} in this parameter - * @param array $backtrace Protected parameter: use this to pass in the - * {@link debug_backtrace()} that should be used - * to find error context - * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also - * thrown. see docs for {@link push()} - */ - public static function staticPush( - $package, $code, $level = 'error', $params = array(), - $msg = false, $repackage = false, $backtrace = false - ) { - $s = &PEAR_ErrorStack::singleton($package); - if ($s->_contextCallback) { - if (!$backtrace) { - if (function_exists('debug_backtrace')) { - $backtrace = debug_backtrace(); - } - } - } - return $s->push($code, $level, $params, $msg, $repackage, $backtrace); - } - - /** - * Log an error using PEAR::Log - * @param array $err Error array - * @param array $levels Error level => Log constant map - * @access protected - */ - function _log($err) - { - if ($this->_logger) { - $logger = &$this->_logger; - } else { - $logger = &$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']; - } - if (is_a($logger, 'Log')) { - $levels = array( - 'exception' => PEAR_LOG_CRIT, - 'alert' => PEAR_LOG_ALERT, - 'critical' => PEAR_LOG_CRIT, - 'error' => PEAR_LOG_ERR, - 'warning' => PEAR_LOG_WARNING, - 'notice' => PEAR_LOG_NOTICE, - 'info' => PEAR_LOG_INFO, - 'debug' => PEAR_LOG_DEBUG); - if (isset($levels[$err['level']])) { - $level = $levels[$err['level']]; - } else { - $level = PEAR_LOG_INFO; - } - $logger->log($err['message'], $level, $err); - } else { // support non-standard logs - call_user_func($logger, $err); - } - } - - - /** - * Pop an error off of the error stack - * - * @return false|array - * @since 0.4alpha it is no longer possible to specify a specific error - * level to return - the last error pushed will be returned, instead - */ - function pop() - { - $err = @array_shift($this->_errors); - if (!is_null($err)) { - @array_pop($this->_errorsByLevel[$err['level']]); - if (!count($this->_errorsByLevel[$err['level']])) { - unset($this->_errorsByLevel[$err['level']]); - } - } - return $err; - } - - /** - * Pop an error off of the error stack, static method - * - * @param string package name - * @return boolean - * @since PEAR1.5.0a1 - */ - static function staticPop($package) - { - if ($package) { - if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { - return false; - } - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->pop(); - } - } - - /** - * Determine whether there are any errors on the stack - * @param string|array Level name. Use to determine if any errors - * of level (string), or levels (array) have been pushed - * @return boolean - */ - function hasErrors($level = false) - { - if ($level) { - return isset($this->_errorsByLevel[$level]); - } - return count($this->_errors); - } - - /** - * Retrieve all errors since last purge - * - * @param boolean set in order to empty the error stack - * @param string level name, to return only errors of a particular severity - * @return array - */ - function getErrors($purge = false, $level = false) - { - if (!$purge) { - if ($level) { - if (!isset($this->_errorsByLevel[$level])) { - return array(); - } else { - return $this->_errorsByLevel[$level]; - } - } else { - return $this->_errors; - } - } - if ($level) { - $ret = $this->_errorsByLevel[$level]; - foreach ($this->_errorsByLevel[$level] as $i => $unused) { - // entries are references to the $_errors array - $this->_errorsByLevel[$level][$i] = false; - } - // array_filter removes all entries === false - $this->_errors = array_filter($this->_errors); - unset($this->_errorsByLevel[$level]); - return $ret; - } - $ret = $this->_errors; - $this->_errors = array(); - $this->_errorsByLevel = array(); - return $ret; - } - - /** - * Determine whether there are any errors on a single error stack, or on any error stack - * - * The optional parameter can be used to test the existence of any errors without the need of - * singleton instantiation - * @param string|false Package name to check for errors - * @param string Level name to check for a particular severity - * @return boolean - */ - public static function staticHasErrors($package = false, $level = false) - { - if ($package) { - if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { - return false; - } - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->hasErrors($level); - } - foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) { - if ($obj->hasErrors($level)) { - return true; - } - } - return false; - } - - /** - * Get a list of all errors since last purge, organized by package - * @since PEAR 1.4.0dev BC break! $level is now in the place $merge used to be - * @param boolean $purge Set to purge the error stack of existing errors - * @param string $level Set to a level name in order to retrieve only errors of a particular level - * @param boolean $merge Set to return a flat array, not organized by package - * @param array $sortfunc Function used to sort a merged array - default - * sorts by time, and should be good for most cases - * - * @return array - */ - public static function staticGetErrors( - $purge = false, $level = false, $merge = false, - $sortfunc = array('PEAR_ErrorStack', '_sortErrors') - ) { - $ret = array(); - if (!is_callable($sortfunc)) { - $sortfunc = array('PEAR_ErrorStack', '_sortErrors'); - } - foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) { - $test = $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->getErrors($purge, $level); - if ($test) { - if ($merge) { - $ret = array_merge($ret, $test); - } else { - $ret[$package] = $test; - } - } - } - if ($merge) { - usort($ret, $sortfunc); - } - return $ret; - } - - /** - * Error sorting function, sorts by time - * @access private - */ - public static function _sortErrors($a, $b) - { - if ($a['time'] == $b['time']) { - return 0; - } - if ($a['time'] < $b['time']) { - return 1; - } - return -1; - } - - /** - * Standard file/line number/function/class context callback - * - * This function uses a backtrace generated from {@link debug_backtrace()} - * and so will not work at all in PHP < 4.3.0. The frame should - * reference the frame that contains the source of the error. - * @return array|false either array('file' => file, 'line' => line, - * 'function' => function name, 'class' => class name) or - * if this doesn't work, then false - * @param unused - * @param integer backtrace frame. - * @param array Results of debug_backtrace() - */ - public static function getFileLine($code, $params, $backtrace = null) - { - if ($backtrace === null) { - return false; - } - $frame = 0; - $functionframe = 1; - if (!isset($backtrace[1])) { - $functionframe = 0; - } else { - while (isset($backtrace[$functionframe]['function']) && - $backtrace[$functionframe]['function'] == 'eval' && - isset($backtrace[$functionframe + 1])) { - $functionframe++; - } - } - if (isset($backtrace[$frame])) { - if (!isset($backtrace[$frame]['file'])) { - $frame++; - } - $funcbacktrace = $backtrace[$functionframe]; - $filebacktrace = $backtrace[$frame]; - $ret = array('file' => $filebacktrace['file'], - 'line' => $filebacktrace['line']); - // rearrange for eval'd code or create function errors - if (strpos($filebacktrace['file'], '(') && - preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'], - $matches)) { - $ret['file'] = $matches[1]; - $ret['line'] = $matches[2] + 0; - } - if (isset($funcbacktrace['function']) && isset($backtrace[1])) { - if ($funcbacktrace['function'] != 'eval') { - if ($funcbacktrace['function'] == '__lambda_func') { - $ret['function'] = 'create_function() code'; - } else { - $ret['function'] = $funcbacktrace['function']; - } - } - } - if (isset($funcbacktrace['class']) && isset($backtrace[1])) { - $ret['class'] = $funcbacktrace['class']; - } - return $ret; - } - return false; - } - - /** - * Standard error message generation callback - * - * This method may also be called by a custom error message generator - * to fill in template values from the params array, simply - * set the third parameter to the error message template string to use - * - * The special variable %__msg% is reserved: use it only to specify - * where a message passed in by the user should be placed in the template, - * like so: - * - * Error message: %msg% - internal error - * - * If the message passed like so: - * - * - * $stack->push(ERROR_CODE, 'error', array(), 'server error 500'); - * - * - * The returned error message will be "Error message: server error 500 - - * internal error" - * @param PEAR_ErrorStack - * @param array - * @param string|false Pre-generated error message template - * - * @return string - */ - public static function getErrorMessage(&$stack, $err, $template = false) - { - if ($template) { - $mainmsg = $template; - } else { - $mainmsg = $stack->getErrorMessageTemplate($err['code']); - } - $mainmsg = str_replace('%__msg%', $err['message'], $mainmsg); - if (is_array($err['params']) && count($err['params'])) { - foreach ($err['params'] as $name => $val) { - if (is_array($val)) { - // @ is needed in case $val is a multi-dimensional array - $val = @implode(', ', $val); - } - if (is_object($val)) { - if (method_exists($val, '__toString')) { - $val = $val->__toString(); - } else { - PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_OBJTOSTRING, - 'warning', array('obj' => get_class($val)), - 'object %obj% passed into getErrorMessage, but has no __toString() method'); - $val = 'Object'; - } - } - $mainmsg = str_replace('%' . $name . '%', $val, $mainmsg); - } - } - return $mainmsg; - } - - /** - * Standard Error Message Template generator from code - * @return string - */ - function getErrorMessageTemplate($code) - { - if (!isset($this->_errorMsgs[$code])) { - return '%__msg%'; - } - return $this->_errorMsgs[$code]; - } - - /** - * Set the Error Message Template array - * - * The array format must be: - *
    -     * array(error code => 'message template',...)
    -     * 
    - * - * Error message parameters passed into {@link push()} will be used as input - * for the error message. If the template is 'message %foo% was %bar%', and the - * parameters are array('foo' => 'one', 'bar' => 'six'), the error message returned will - * be 'message one was six' - * @return string - */ - function setErrorMessageTemplate($template) - { - $this->_errorMsgs = $template; - } - - - /** - * emulate PEAR::raiseError() - * - * @return PEAR_Error - */ - function raiseError() - { - require_once 'PEAR.php'; - $args = func_get_args(); - return call_user_func_array(array('PEAR', 'raiseError'), $args); - } -} -$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack'); -$stack->pushCallback(array('PEAR_ErrorStack', '_handleError')); -?> diff --git a/lib/pear/pear-core-minimal/src/System.php b/lib/pear/pear-core-minimal/src/System.php deleted file mode 100644 index a7ef46598..000000000 --- a/lib/pear/pear-core-minimal/src/System.php +++ /dev/null @@ -1,630 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR.php'; -require_once 'Console/Getopt.php'; - -$GLOBALS['_System_temp_files'] = array(); - -/** -* System offers cross platform compatible system functions -* -* Static functions for different operations. Should work under -* Unix and Windows. The names and usage has been taken from its respectively -* GNU commands. The functions will return (bool) false on error and will -* trigger the error with the PHP trigger_error() function (you can silence -* the error by prefixing a '@' sign after the function call, but this -* is not recommended practice. Instead use an error handler with -* {@link set_error_handler()}). -* -* Documentation on this class you can find in: -* http://pear.php.net/manual/ -* -* Example usage: -* if (!@System::rm('-r file1 dir1')) { -* print "could not delete file1 or dir1"; -* } -* -* In case you need to to pass file names with spaces, -* pass the params as an array: -* -* System::rm(array('-r', $file1, $dir1)); -* -* @category pear -* @package System -* @author Tomas V.V. Cox -* @copyright 1997-2006 The PHP Group -* @license http://opensource.org/licenses/bsd-license.php New BSD License -* @version Release: @package_version@ -* @link http://pear.php.net/package/PEAR -* @since Class available since Release 0.1 -* @static -*/ -class System -{ - /** - * returns the commandline arguments of a function - * - * @param string $argv the commandline - * @param string $short_options the allowed option short-tags - * @param string $long_options the allowed option long-tags - * @return array the given options and there values - */ - public static function _parseArgs($argv, $short_options, $long_options = null) - { - if (!is_array($argv) && $argv !== null) { - /* - // Quote all items that are a short option - $av = preg_split('/(\A| )--?[a-z0-9]+[ =]?((? $a) { - if (empty($a)) { - continue; - } - $argv[$k] = trim($a) ; - } - } - - return Console_Getopt::getopt2($argv, $short_options, $long_options); - } - - /** - * Output errors with PHP trigger_error(). You can silence the errors - * with prefixing a "@" sign to the function call: @System::mkdir(..); - * - * @param mixed $error a PEAR error or a string with the error message - * @return bool false - */ - protected static function raiseError($error) - { - if (PEAR::isError($error)) { - $error = $error->getMessage(); - } - trigger_error($error, E_USER_WARNING); - return false; - } - - /** - * Creates a nested array representing the structure of a directory - * - * System::_dirToStruct('dir1', 0) => - * Array - * ( - * [dirs] => Array - * ( - * [0] => dir1 - * ) - * - * [files] => Array - * ( - * [0] => dir1/file2 - * [1] => dir1/file3 - * ) - * ) - * @param string $sPath Name of the directory - * @param integer $maxinst max. deep of the lookup - * @param integer $aktinst starting deep of the lookup - * @param bool $silent if true, do not emit errors. - * @return array the structure of the dir - */ - protected static function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false) - { - $struct = array('dirs' => array(), 'files' => array()); - if (($dir = @opendir($sPath)) === false) { - if (!$silent) { - System::raiseError("Could not open dir $sPath"); - } - return $struct; // XXX could not open error - } - - $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ? - $list = array(); - while (false !== ($file = readdir($dir))) { - if ($file != '.' && $file != '..') { - $list[] = $file; - } - } - - closedir($dir); - natsort($list); - if ($aktinst < $maxinst || $maxinst == 0) { - foreach ($list as $val) { - $path = $sPath . DIRECTORY_SEPARATOR . $val; - if (is_dir($path) && !is_link($path)) { - $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent); - $struct = array_merge_recursive($struct, $tmp); - } else { - $struct['files'][] = $path; - } - } - } - - return $struct; - } - - /** - * Creates a nested array representing the structure of a directory and files - * - * @param array $files Array listing files and dirs - * @return array - * @static - * @see System::_dirToStruct() - */ - protected static function _multipleToStruct($files) - { - $struct = array('dirs' => array(), 'files' => array()); - settype($files, 'array'); - foreach ($files as $file) { - if (is_dir($file) && !is_link($file)) { - $tmp = System::_dirToStruct($file, 0); - $struct = array_merge_recursive($tmp, $struct); - } else { - if (!in_array($file, $struct['files'])) { - $struct['files'][] = $file; - } - } - } - return $struct; - } - - /** - * The rm command for removing files. - * Supports multiple files and dirs and also recursive deletes - * - * @param string $args the arguments for rm - * @return mixed PEAR_Error or true for success - * @static - * @access public - */ - public static function rm($args) - { - $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-) - if (PEAR::isError($opts)) { - return System::raiseError($opts); - } - foreach ($opts[0] as $opt) { - if ($opt[0] == 'r') { - $do_recursive = true; - } - } - $ret = true; - if (isset($do_recursive)) { - $struct = System::_multipleToStruct($opts[1]); - foreach ($struct['files'] as $file) { - if (!@unlink($file)) { - $ret = false; - } - } - - rsort($struct['dirs']); - foreach ($struct['dirs'] as $dir) { - if (!@rmdir($dir)) { - $ret = false; - } - } - } else { - foreach ($opts[1] as $file) { - $delete = (is_dir($file)) ? 'rmdir' : 'unlink'; - if (!@$delete($file)) { - $ret = false; - } - } - } - return $ret; - } - - /** - * Make directories. - * - * The -p option will create parent directories - * @param string $args the name of the director(y|ies) to create - * @return bool True for success - */ - public static function mkDir($args) - { - $opts = System::_parseArgs($args, 'pm:'); - if (PEAR::isError($opts)) { - return System::raiseError($opts); - } - - $mode = 0777; // default mode - foreach ($opts[0] as $opt) { - if ($opt[0] == 'p') { - $create_parents = true; - } elseif ($opt[0] == 'm') { - // if the mode is clearly an octal number (starts with 0) - // convert it to decimal - if (strlen($opt[1]) && $opt[1][0] == '0') { - $opt[1] = octdec($opt[1]); - } else { - // convert to int - $opt[1] += 0; - } - $mode = $opt[1]; - } - } - - $ret = true; - if (isset($create_parents)) { - foreach ($opts[1] as $dir) { - $dirstack = array(); - while ((!file_exists($dir) || !is_dir($dir)) && - $dir != DIRECTORY_SEPARATOR) { - array_unshift($dirstack, $dir); - $dir = dirname($dir); - } - - while ($newdir = array_shift($dirstack)) { - if (!is_writeable(dirname($newdir))) { - $ret = false; - break; - } - - if (!mkdir($newdir, $mode)) { - $ret = false; - } - } - } - } else { - foreach($opts[1] as $dir) { - if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) { - $ret = false; - } - } - } - - return $ret; - } - - /** - * Concatenate files - * - * Usage: - * 1) $var = System::cat('sample.txt test.txt'); - * 2) System::cat('sample.txt test.txt > final.txt'); - * 3) System::cat('sample.txt test.txt >> final.txt'); - * - * Note: as the class use fopen, urls should work also - * - * @param string $args the arguments - * @return boolean true on success - */ - public static function &cat($args) - { - $ret = null; - $files = array(); - if (!is_array($args)) { - $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); - } - - $count_args = count($args); - for ($i = 0; $i < $count_args; $i++) { - if ($args[$i] == '>') { - $mode = 'wb'; - $outputfile = $args[$i+1]; - break; - } elseif ($args[$i] == '>>') { - $mode = 'ab+'; - $outputfile = $args[$i+1]; - break; - } else { - $files[] = $args[$i]; - } - } - $outputfd = false; - if (isset($mode)) { - if (!$outputfd = fopen($outputfile, $mode)) { - $err = System::raiseError("Could not open $outputfile"); - return $err; - } - $ret = true; - } - foreach ($files as $file) { - if (!$fd = fopen($file, 'r')) { - System::raiseError("Could not open $file"); - continue; - } - while ($cont = fread($fd, 2048)) { - if (is_resource($outputfd)) { - fwrite($outputfd, $cont); - } else { - $ret .= $cont; - } - } - fclose($fd); - } - if (is_resource($outputfd)) { - fclose($outputfd); - } - return $ret; - } - - /** - * Creates temporary files or directories. This function will remove - * the created files when the scripts finish its execution. - * - * Usage: - * 1) $tempfile = System::mktemp("prefix"); - * 2) $tempdir = System::mktemp("-d prefix"); - * 3) $tempfile = System::mktemp(); - * 4) $tempfile = System::mktemp("-t /var/tmp prefix"); - * - * prefix -> The string that will be prepended to the temp name - * (defaults to "tmp"). - * -d -> A temporary dir will be created instead of a file. - * -t -> The target dir where the temporary (file|dir) will be created. If - * this param is missing by default the env vars TMP on Windows or - * TMPDIR in Unix will be used. If these vars are also missing - * c:\windows\temp or /tmp will be used. - * - * @param string $args The arguments - * @return mixed the full path of the created (file|dir) or false - * @see System::tmpdir() - */ - public static function mktemp($args = null) - { - static $first_time = true; - $opts = System::_parseArgs($args, 't:d'); - if (PEAR::isError($opts)) { - return System::raiseError($opts); - } - - foreach ($opts[0] as $opt) { - if ($opt[0] == 'd') { - $tmp_is_dir = true; - } elseif ($opt[0] == 't') { - $tmpdir = $opt[1]; - } - } - - $prefix = (isset($opts[1][0])) ? $opts[1][0] : 'tmp'; - if (!isset($tmpdir)) { - $tmpdir = System::tmpdir(); - } - - if (!System::mkDir(array('-p', $tmpdir))) { - return false; - } - - $tmp = tempnam($tmpdir, $prefix); - if (isset($tmp_is_dir)) { - unlink($tmp); // be careful possible race condition here - if (!mkdir($tmp, 0700)) { - return System::raiseError("Unable to create temporary directory $tmpdir"); - } - } - - $GLOBALS['_System_temp_files'][] = $tmp; - if (isset($tmp_is_dir)) { - //$GLOBALS['_System_temp_files'][] = dirname($tmp); - } - - if ($first_time) { - PEAR::registerShutdownFunc(array('System', '_removeTmpFiles')); - $first_time = false; - } - - return $tmp; - } - - /** - * Remove temporary files created my mkTemp. This function is executed - * at script shutdown time - */ - public static function _removeTmpFiles() - { - if (count($GLOBALS['_System_temp_files'])) { - $delete = $GLOBALS['_System_temp_files']; - array_unshift($delete, '-r'); - System::rm($delete); - $GLOBALS['_System_temp_files'] = array(); - } - } - - /** - * Get the path of the temporal directory set in the system - * by looking in its environments variables. - * Note: php.ini-recommended removes the "E" from the variables_order setting, - * making unavaible the $_ENV array, that s why we do tests with _ENV - * - * @return string The temporary directory on the system - */ - public static function tmpdir() - { - if (OS_WINDOWS) { - if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) { - return $var; - } - if ($var = isset($_ENV['TEMP']) ? $_ENV['TEMP'] : getenv('TEMP')) { - return $var; - } - if ($var = isset($_ENV['USERPROFILE']) ? $_ENV['USERPROFILE'] : getenv('USERPROFILE')) { - return $var; - } - if ($var = isset($_ENV['windir']) ? $_ENV['windir'] : getenv('windir')) { - return $var; - } - return getenv('SystemRoot') . '\temp'; - } - if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) { - return $var; - } - return realpath(function_exists('sys_get_temp_dir') ? sys_get_temp_dir() : '/tmp'); - } - - /** - * The "which" command (show the full path of a command) - * - * @param string $program The command to search for - * @param mixed $fallback Value to return if $program is not found - * - * @return mixed A string with the full path or false if not found - * @author Stig Bakken - */ - public static function which($program, $fallback = false) - { - // enforce API - if (!is_string($program) || '' == $program) { - return $fallback; - } - - // full path given - if (basename($program) != $program) { - $path_elements[] = dirname($program); - $program = basename($program); - } else { - $path = getenv('PATH'); - if (!$path) { - $path = getenv('Path'); // some OSes are just stupid enough to do this - } - - $path_elements = explode(PATH_SEPARATOR, $path); - } - - if (OS_WINDOWS) { - $exe_suffixes = getenv('PATHEXT') - ? explode(PATH_SEPARATOR, getenv('PATHEXT')) - : array('.exe','.bat','.cmd','.com'); - // allow passing a command.exe param - if (strpos($program, '.') !== false) { - array_unshift($exe_suffixes, ''); - } - } else { - $exe_suffixes = array(''); - } - - foreach ($exe_suffixes as $suff) { - foreach ($path_elements as $dir) { - $file = $dir . DIRECTORY_SEPARATOR . $program . $suff; - // It's possible to run a .bat on Windows that is_executable - // would return false for. The is_executable check is meaningless... - if (OS_WINDOWS) { - if (file_exists($file)) { - return $file; - } - } else { - if (is_executable($file)) { - return $file; - } - } - } - } - return $fallback; - } - - /** - * The "find" command - * - * Usage: - * - * System::find($dir); - * System::find("$dir -type d"); - * System::find("$dir -type f"); - * System::find("$dir -name *.php"); - * System::find("$dir -name *.php -name *.htm*"); - * System::find("$dir -maxdepth 1"); - * - * Params implemented: - * $dir -> Start the search at this directory - * -type d -> return only directories - * -type f -> return only files - * -maxdepth -> max depth of recursion - * -name -> search pattern (bash style). Multiple -name param allowed - * - * @param mixed Either array or string with the command line - * @return array Array of found files - */ - public static function find($args) - { - if (!is_array($args)) { - $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); - } - $dir = realpath(array_shift($args)); - if (!$dir) { - return array(); - } - $patterns = array(); - $depth = 0; - $do_files = $do_dirs = true; - $args_count = count($args); - for ($i = 0; $i < $args_count; $i++) { - switch ($args[$i]) { - case '-type': - if (in_array($args[$i+1], array('d', 'f'))) { - if ($args[$i+1] == 'd') { - $do_files = false; - } else { - $do_dirs = false; - } - } - $i++; - break; - case '-name': - $name = preg_quote($args[$i+1], '#'); - // our magic characters ? and * have just been escaped, - // so now we change the escaped versions to PCRE operators - $name = strtr($name, array('\?' => '.', '\*' => '.*')); - $patterns[] = '('.$name.')'; - $i++; - break; - case '-maxdepth': - $depth = $args[$i+1]; - break; - } - } - $path = System::_dirToStruct($dir, $depth, 0, true); - if ($do_files && $do_dirs) { - $files = array_merge($path['files'], $path['dirs']); - } elseif ($do_dirs) { - $files = $path['dirs']; - } else { - $files = $path['files']; - } - if (count($patterns)) { - $dsq = preg_quote(DIRECTORY_SEPARATOR, '#'); - $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#'; - $ret = array(); - $files_count = count($files); - for ($i = 0; $i < $files_count; $i++) { - // only search in the part of the file below the current directory - $filepart = basename($files[$i]); - if (preg_match($pattern, $filepart)) { - $ret[] = $files[$i]; - } - } - return $ret; - } - return $files; - } -} diff --git a/lib/pear/pear_exception/LICENSE b/lib/pear/pear_exception/LICENSE deleted file mode 100644 index a00a2421f..000000000 --- a/lib/pear/pear_exception/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 1997-2009, - Stig Bakken , - Gregory Beaver , - Helgi Þormar Þorbjörnsson , - Tomas V.V.Cox , - Martin Jansen . -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/pear/pear_exception/PEAR/Exception.php b/lib/pear/pear_exception/PEAR/Exception.php deleted file mode 100644 index a8ef6e086..000000000 --- a/lib/pear/pear_exception/PEAR/Exception.php +++ /dev/null @@ -1,456 +0,0 @@ - - * @author Hans Lellelid - * @author Bertrand Mansion - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @link http://pear.php.net/package/PEAR_Exception - * @since File available since Release 1.0.0 - */ - - -/** - * Base PEAR_Exception Class - * - * 1) Features: - * - * - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception)) - * - Definable triggers, shot when exceptions occur - * - Pretty and informative error messages - * - Added more context info available (like class, method or cause) - * - cause can be a PEAR_Exception or an array of mixed - * PEAR_Exceptions/PEAR_ErrorStack warnings - * - callbacks for specific exception classes and their children - * - * 2) Ideas: - * - * - Maybe a way to define a 'template' for the output - * - * 3) Inherited properties from PHP Exception Class: - * - * protected $message - * protected $code - * protected $line - * protected $file - * private $trace - * - * 4) Inherited methods from PHP Exception Class: - * - * __clone - * __construct - * getMessage - * getCode - * getFile - * getLine - * getTraceSafe - * getTraceSafeAsString - * __toString - * - * 5) Usage example - * - * - * require_once 'PEAR/Exception.php'; - * - * class Test { - * function foo() { - * throw new PEAR_Exception('Error Message', ERROR_CODE); - * } - * } - * - * function myLogger($pear_exception) { - * echo $pear_exception->getMessage(); - * } - * // each time a exception is thrown the 'myLogger' will be called - * // (its use is completely optional) - * PEAR_Exception::addObserver('myLogger'); - * $test = new Test; - * try { - * $test->foo(); - * } catch (PEAR_Exception $e) { - * print $e; - * } - * - * - * @category PEAR - * @package PEAR_Exception - * @author Tomas V.V.Cox - * @author Hans Lellelid - * @author Bertrand Mansion - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: @package_version@ - * @link http://pear.php.net/package/PEAR_Exception - * @since Class available since Release 1.0.0 - */ -class PEAR_Exception extends Exception -{ - const OBSERVER_PRINT = -2; - const OBSERVER_TRIGGER = -4; - const OBSERVER_DIE = -8; - protected $cause; - private static $_observers = array(); - private static $_uniqueid = 0; - private $_trace; - - /** - * Supported signatures: - * - PEAR_Exception(string $message); - * - PEAR_Exception(string $message, int $code); - * - PEAR_Exception(string $message, Exception $cause); - * - PEAR_Exception(string $message, Exception $cause, int $code); - * - PEAR_Exception(string $message, PEAR_Error $cause); - * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); - * - PEAR_Exception(string $message, array $causes); - * - PEAR_Exception(string $message, array $causes, int $code); - * - * @param string $message exception message - * @param int|Exception|PEAR_Error|array|null $p2 exception cause - * @param int|null $p3 exception code or null - */ - public function __construct($message, $p2 = null, $p3 = null) - { - if (is_int($p2)) { - $code = $p2; - $this->cause = null; - } elseif (is_object($p2) || is_array($p2)) { - // using is_object allows both Exception and PEAR_Error - if (is_object($p2) && !($p2 instanceof Exception)) { - if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { - throw new PEAR_Exception( - 'exception cause must be Exception, ' . - 'array, or PEAR_Error' - ); - } - } - $code = $p3; - if (is_array($p2) && isset($p2['message'])) { - // fix potential problem of passing in a single warning - $p2 = array($p2); - } - $this->cause = $p2; - } else { - $code = null; - $this->cause = null; - } - parent::__construct($message, (int) $code); - $this->signal(); - } - - /** - * Add an exception observer - * - * @param mixed $callback - A valid php callback, see php func is_callable() - * - A PEAR_Exception::OBSERVER_* constant - * - An array(const PEAR_Exception::OBSERVER_*, - * mixed $options) - * @param string $label The name of the observer. Use this if you want - * to remove it later with removeObserver() - * - * @return void - */ - public static function addObserver($callback, $label = 'default') - { - self::$_observers[$label] = $callback; - } - - /** - * Remove an exception observer - * - * @param string $label Name of the observer - * - * @return void - */ - public static function removeObserver($label = 'default') - { - unset(self::$_observers[$label]); - } - - /** - * Generate a unique ID for an observer - * - * @return int unique identifier for an observer - */ - public static function getUniqueId() - { - return self::$_uniqueid++; - } - - /** - * Send a signal to all observers - * - * @return void - */ - protected function signal() - { - foreach (self::$_observers as $func) { - if (is_callable($func)) { - call_user_func($func, $this); - continue; - } - settype($func, 'array'); - switch ($func[0]) { - case self::OBSERVER_PRINT : - $f = (isset($func[1])) ? $func[1] : '%s'; - printf($f, $this->getMessage()); - break; - case self::OBSERVER_TRIGGER : - $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; - trigger_error($this->getMessage(), $f); - break; - case self::OBSERVER_DIE : - $f = (isset($func[1])) ? $func[1] : '%s'; - die(printf($f, $this->getMessage())); - break; - default: - trigger_error('invalid observer type', E_USER_WARNING); - } - } - } - - /** - * Return specific error information that can be used for more detailed - * error messages or translation. - * - * This method may be overridden in child exception classes in order - * to add functionality not present in PEAR_Exception and is a placeholder - * to define API - * - * The returned array must be an associative array of parameter => value like so: - *
    -     * array('name' => $name, 'context' => array(...))
    -     * 
    - * - * @return array - */ - public function getErrorData() - { - return array(); - } - - /** - * Returns the exception that caused this exception to be thrown - * - * @return Exception|array The context of the exception - */ - public function getCause() - { - return $this->cause; - } - - /** - * Function must be public to call on caused exceptions - * - * @param array $causes Array that gets filled. - * - * @return void - */ - public function getCauseMessage(&$causes) - { - $trace = $this->getTraceSafe(); - $cause = array('class' => get_class($this), - 'message' => $this->message, - 'file' => 'unknown', - 'line' => 'unknown'); - if (isset($trace[0])) { - if (isset($trace[0]['file'])) { - $cause['file'] = $trace[0]['file']; - $cause['line'] = $trace[0]['line']; - } - } - $causes[] = $cause; - if ($this->cause instanceof PEAR_Exception) { - $this->cause->getCauseMessage($causes); - } elseif ($this->cause instanceof Exception) { - $causes[] = array('class' => get_class($this->cause), - 'message' => $this->cause->getMessage(), - 'file' => $this->cause->getFile(), - 'line' => $this->cause->getLine()); - } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) { - $causes[] = array('class' => get_class($this->cause), - 'message' => $this->cause->getMessage(), - 'file' => 'unknown', - 'line' => 'unknown'); - } elseif (is_array($this->cause)) { - foreach ($this->cause as $cause) { - if ($cause instanceof PEAR_Exception) { - $cause->getCauseMessage($causes); - } elseif ($cause instanceof Exception) { - $causes[] = array('class' => get_class($cause), - 'message' => $cause->getMessage(), - 'file' => $cause->getFile(), - 'line' => $cause->getLine()); - } elseif (class_exists('PEAR_Error') - && $cause instanceof PEAR_Error - ) { - $causes[] = array('class' => get_class($cause), - 'message' => $cause->getMessage(), - 'file' => 'unknown', - 'line' => 'unknown'); - } elseif (is_array($cause) && isset($cause['message'])) { - // PEAR_ErrorStack warning - $causes[] = array( - 'class' => $cause['package'], - 'message' => $cause['message'], - 'file' => isset($cause['context']['file']) ? - $cause['context']['file'] : - 'unknown', - 'line' => isset($cause['context']['line']) ? - $cause['context']['line'] : - 'unknown', - ); - } - } - } - } - - /** - * Build a backtrace and return it - * - * @return array Backtrace - */ - public function getTraceSafe() - { - if (!isset($this->_trace)) { - $this->_trace = $this->getTrace(); - if (empty($this->_trace)) { - $backtrace = debug_backtrace(); - $this->_trace = array($backtrace[count($backtrace)-1]); - } - } - return $this->_trace; - } - - /** - * Gets the first class of the backtrace - * - * @return string Class name - */ - public function getErrorClass() - { - $trace = $this->getTraceSafe(); - return $trace[0]['class']; - } - - /** - * Gets the first method of the backtrace - * - * @return string Method/function name - */ - public function getErrorMethod() - { - $trace = $this->getTraceSafe(); - return $trace[0]['function']; - } - - /** - * Converts the exception to a string (HTML or plain text) - * - * @return string String representation - * - * @see toHtml() - * @see toText() - */ - public function __toString() - { - if (isset($_SERVER['REQUEST_URI'])) { - return $this->toHtml(); - } - return $this->toText(); - } - - /** - * Generates a HTML representation of the exception - * - * @return string HTML code - */ - public function toHtml() - { - $trace = $this->getTraceSafe(); - $causes = array(); - $this->getCauseMessage($causes); - $html = '' . "\n"; - foreach ($causes as $i => $cause) { - $html .= '\n"; - } - $html .= '' . "\n" - . '' - . '' - . '' . "\n"; - - foreach ($trace as $k => $v) { - $html .= '' - . '' - . '' . "\n"; - } - $html .= '' - . '' - . '' . "\n" - . '
    ' - . str_repeat('-', $i) . ' ' . $cause['class'] . ': ' - . htmlspecialchars($cause['message']) - . ' in ' . $cause['file'] . ' ' - . 'on line ' . $cause['line'] . '' - . "
    Exception trace
    #FunctionLocation
    ' . $k . ''; - if (!empty($v['class'])) { - $html .= $v['class'] . $v['type']; - } - $html .= $v['function']; - $args = array(); - if (!empty($v['args'])) { - foreach ($v['args'] as $arg) { - if (is_null($arg)) { - $args[] = 'null'; - } else if (is_array($arg)) { - $args[] = 'Array'; - } else if (is_object($arg)) { - $args[] = 'Object('.get_class($arg).')'; - } else if (is_bool($arg)) { - $args[] = $arg ? 'true' : 'false'; - } else if (is_int($arg) || is_double($arg)) { - $args[] = $arg; - } else { - $arg = (string)$arg; - $str = htmlspecialchars(substr($arg, 0, 16)); - if (strlen($arg) > 16) { - $str .= '…'; - } - $args[] = "'" . $str . "'"; - } - } - } - $html .= '(' . implode(', ', $args) . ')' - . '' . (isset($v['file']) ? $v['file'] : 'unknown') - . ':' . (isset($v['line']) ? $v['line'] : 'unknown') - . '
    ' . ($k+1) . '{main} 
    '; - return $html; - } - - /** - * Generates text representation of the exception and stack trace - * - * @return string - */ - public function toText() - { - $causes = array(); - $this->getCauseMessage($causes); - $causeMsg = ''; - foreach ($causes as $i => $cause) { - $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' - . $cause['message'] . ' in ' . $cause['file'] - . ' on line ' . $cause['line'] . "\n"; - } - return $causeMsg . $this->getTraceAsString(); - } -} -?> diff --git a/lib/pear/pear_exception/composer.json b/lib/pear/pear_exception/composer.json deleted file mode 100644 index 9ffba9b3d..000000000 --- a/lib/pear/pear_exception/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "pear/pear_exception", - "description": "The PEAR Exception base class.", - "type": "class", - "keywords": [ - "exception" - ], - "homepage": "https://github.com/pear/PEAR_Exception", - "license": "BSD-2-Clause", - "authors": [ - { - "name": "Helgi Thormar", - "email": "dufuz@php.net" - }, - { - "name": "Greg Beaver", - "email": "cellog@php.net" - } - ], - "require": { - "php": ">=5.2.0" - }, - "autoload": { - "classmap": ["PEAR/"] - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "include-path": [ - "." - ], - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception", - "source": "https://github.com/pear/PEAR_Exception" - }, - "require-dev": { - "phpunit/phpunit": "<9" - } -} diff --git a/lib/pelago/emogrifier/CHANGELOG.md b/lib/pelago/emogrifier/CHANGELOG.md deleted file mode 100644 index 8e44e6e90..000000000 --- a/lib/pelago/emogrifier/CHANGELOG.md +++ /dev/null @@ -1,415 +0,0 @@ -# Emogrifier Change Log - -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](https://semver.org/). - -## x.y.z - -### Added - -### Changed - -### Deprecated -- Support for PHP 7.3 will be removed in Emogrifier 8.0. - -### Removed - -### Fixed - -## 6.0.0 - -### Added -- Test with Symfony 6-dev (#1109) -- Add support for PHP 8.1 (#1103) -- Add a dedicated class for caching (#1097) -- Allow installation together with Symfony 6 (#1065) -- Support more file types in the `.editorconfig` (#1035) -- Set `align` attribute of `` elements with `CssToAttributeConverter` (#1008) - -### Changed -- Use `sabberworm/php-css-parser` to parse the CSS (#1015) -- Also check the unit test code with Psalm (#1003) - -### Deprecated -- Support for PHP 7.2 will be removed in Emogrifier 7.0. - -### Removed -- Remove a redundant CSS data cache (#1018) -- Drop support for Symfony 5.1 and 5.2 (#972, #1104) -- Drop support for PHP 7.1 (#967) - -### Fixed -- Allow `@import` after ignored invalid `@charset` (@1081) -- Allow line feeds within `` tag (#987) - -## 5.0.1 - -### Changed -- Switch the default branch from `master` to `main` (#951) - -### Fixed -- Ignore `http-equiv` `Content-Type` in `` (#961) -- Allow "Content-Type" in content (#959) - -## 5.0.0 - -### Added -- Add an `.editorconfig` file (#940) -- Support PHP 8.0 (#926) -- Run the CI build once a week (#933) -- Move more development tools to PHIVE (#894, #907) - -### Changed -- Automatically add a backslash for global functions (#909) -- Update the development tools (#898, #895) -- Upgrade to PHPUnit 7.5 (#888) -- Enforce constant visibility (#892) -- Rename the PHPCS configuration file (#891, #896) -- Make use of PHP 7.1 language features (#883) - -### Deprecated -- Support for PHP 7.1 will be removed in Emogrifier 6.0. - -### Removed -- Drop support for Symfony 4.3 and 5.0 (#936) -- Stop checking `tests/` with Psalm (#885) -- Drop support for PHP 7.0 (#880) - -### Fixed -- Fix a nonsensical code example in the README (#920, #935) -- Remove `!important` from `style` attributes also when uppercase, mixed case or - having whitespace after `!` (#911) -- Copy rules using `:...of-type` without a type to the ` - - -
    -

    Oops! An Error Occurred

    -

    The server returned a " ".

    - -

    - Something is broken. Please let us know what you were doing when this error occurred. - We will fix it as soon as possible. Sorry for any inconvenience caused. -

    -
    - - diff --git a/lib/symfony/error-handler/Resources/views/exception.html.php b/lib/symfony/error-handler/Resources/views/exception.html.php deleted file mode 100644 index c3e7a8674..000000000 --- a/lib/symfony/error-handler/Resources/views/exception.html.php +++ /dev/null @@ -1,116 +0,0 @@ -
    - - -
    -
    -

    formatFileFromText(nl2br($exceptionMessage)); ?>

    - -
    - include('assets/images/symfony-ghost.svg.php'); ?> -
    -
    -
    -
    - -
    -
    -
    - toArray(); - $exceptionWithUserCode = []; - $exceptionAsArrayCount = count($exceptionAsArray); - $last = $exceptionAsArrayCount - 1; - foreach ($exceptionAsArray as $i => $e) { - foreach ($e['trace'] as $trace) { - if ($trace['file'] && false === mb_strpos($trace['file'], '/vendor/') && false === mb_strpos($trace['file'], '/var/cache/') && $i < $last) { - $exceptionWithUserCode[] = $i; - } - } - } - ?> -

    - 1) { ?> - Exceptions - - Exception - -

    - -
    - $e) { - echo $this->include('views/traces.html.php', [ - 'exception' => $e, - 'index' => $i + 1, - 'expand' => in_array($i, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $i), - ]); - } - ?> -
    -
    - - -
    -

    - Logs - countErrors()) { ?>countErrors(); ?> -

    - -
    - getLogs()) { ?> - include('views/logs.html.php', ['logs' => $logger->getLogs()]); ?> - -
    -

    No log messages

    -
    - -
    -
    - - -
    -

    - 1) { ?> - Stack Traces - - Stack Trace - -

    - -
    - $e) { - echo $this->include('views/traces_text.html.php', [ - 'exception' => $e, - 'index' => $i + 1, - 'numExceptions' => $exceptionAsArrayCount, - ]); - } - ?> -
    -
    - - -
    -

    Output content

    - -
    - -
    -
    - -
    -
    diff --git a/lib/symfony/error-handler/Resources/views/exception_full.html.php b/lib/symfony/error-handler/Resources/views/exception_full.html.php deleted file mode 100644 index 04f0fd579..000000000 --- a/lib/symfony/error-handler/Resources/views/exception_full.html.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - <?= $_message; ?> - - - - - - - - -
    -
    -

    include('assets/images/symfony-logo.svg'); ?> Symfony Exception

    - - -
    -
    - - - include('views/exception.html.php', $context); ?> - - - - - diff --git a/lib/symfony/error-handler/Resources/views/logs.html.php b/lib/symfony/error-handler/Resources/views/logs.html.php deleted file mode 100644 index ea6e727b8..000000000 --- a/lib/symfony/error-handler/Resources/views/logs.html.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - = 400) { - $status = 'error'; - } elseif ($log['priority'] >= 300) { - $status = 'warning'; - } else { - $severity = 0; - if (($exception = $log['context']['exception'] ?? null) instanceof \ErrorException || $exception instanceof \Symfony\Component\ErrorHandler\Exception\SilencedErrorContext) { - $severity = $exception->getSeverity(); - } - $status = \E_DEPRECATED === $severity || \E_USER_DEPRECATED === $severity ? 'warning' : 'normal'; - } ?> - data-filter-channel="escape($log['channel']); ?>"> - - - - - - - - -
    LevelChannelMessage
    - escape($log['priorityName']); ?> - - - escape($log['channel']); ?> - - formatLogMessage($log['message'], $log['context']); ?> - -
    escape(json_encode($log['context'], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)); ?>
    - -
    diff --git a/lib/symfony/error-handler/Resources/views/trace.html.php b/lib/symfony/error-handler/Resources/views/trace.html.php deleted file mode 100644 index 8dfdb4ec8..000000000 --- a/lib/symfony/error-handler/Resources/views/trace.html.php +++ /dev/null @@ -1,43 +0,0 @@ -
    - - include('assets/images/icon-minus-square.svg'); ?> - include('assets/images/icon-plus-square.svg'); ?> - - - - abbrClass($trace['class']); ?>(formatArgs($trace['args']); ?>) - - - - getFileLink($trace['file'], $lineNumber); - $filePath = strtr(strip_tags($this->formatFile($trace['file'], $lineNumber)), [' at line '.$lineNumber => '']); - $filePathParts = explode(\DIRECTORY_SEPARATOR, $filePath); - ?> - - in - - - - - - - - (line ) - - - -
    - -
    - fileExcerpt($trace['file'], $trace['line'], 5), [ - '#DD0000' => 'var(--highlight-string)', - '#007700' => 'var(--highlight-keyword)', - '#0000BB' => 'var(--highlight-default)', - '#FF8000' => 'var(--highlight-comment)', - ]); ?> -
    - diff --git a/lib/symfony/error-handler/Resources/views/traces.html.php b/lib/symfony/error-handler/Resources/views/traces.html.php deleted file mode 100644 index f64d91713..000000000 --- a/lib/symfony/error-handler/Resources/views/traces.html.php +++ /dev/null @@ -1,51 +0,0 @@ -
    -
    -
    -
    - include('assets/images/icon-minus-square-o.svg'); ?> - include('assets/images/icon-plus-square-o.svg'); ?> - - -
    - -

    - - - - -

    - - 1) { ?> -

    escape($exception['message']); ?>

    - -
    -
    - -
    - $trace) { - $isVendorTrace = $trace['file'] && (false !== mb_strpos($trace['file'], '/vendor/') || false !== mb_strpos($trace['file'], '/var/cache/')); - $displayCodeSnippet = $isFirstUserCode && !$isVendorTrace; - if ($displayCodeSnippet) { - $isFirstUserCode = false; - } ?> -
    - include('views/trace.html.php', [ - 'prefix' => $index, - 'i' => $i, - 'trace' => $trace, - 'style' => $isVendorTrace ? 'compact' : ($displayCodeSnippet ? 'expanded' : ''), - ]); ?> -
    - -
    -
    -
    diff --git a/lib/symfony/error-handler/Resources/views/traces_text.html.php b/lib/symfony/error-handler/Resources/views/traces_text.html.php deleted file mode 100644 index 6b478402c..000000000 --- a/lib/symfony/error-handler/Resources/views/traces_text.html.php +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - -
    -
    - 1) { ?> - [/] - - - include('assets/images/icon-minus-square-o.svg'); ?> - include('assets/images/icon-plus-square-o.svg'); ?> -
    -
    - -
    -escape($exception['class']).":\n";
    -                    if ($exception['message']) {
    -                        echo $this->escape($exception['message'])."\n";
    -                    }
    -
    -                    foreach ($exception['trace'] as $trace) {
    -                        echo "\n  ";
    -                        if ($trace['function']) {
    -                            echo $this->escape('at '.$trace['class'].$trace['type'].$trace['function']).'('.(isset($trace['args']) ? $this->formatArgsAsText($trace['args']) : '').')';
    -                        }
    -                        if ($trace['file'] && $trace['line']) {
    -                            echo($trace['function'] ? "\n     (" : 'at ').strtr(strip_tags($this->formatFile($trace['file'], $trace['line'])), [' at line '.$trace['line'] => '']).':'.$trace['line'].($trace['function'] ? ')' : '');
    -                        }
    -                    }
    -?>
    -                
    - -
    diff --git a/lib/symfony/error-handler/ThrowableUtils.php b/lib/symfony/error-handler/ThrowableUtils.php deleted file mode 100644 index 18d04988a..000000000 --- a/lib/symfony/error-handler/ThrowableUtils.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; - -/** - * @internal - */ -class ThrowableUtils -{ - /** - * @param SilencedErrorContext|\Throwable - */ - public static function getSeverity($throwable): int - { - if ($throwable instanceof \ErrorException || $throwable instanceof SilencedErrorContext) { - return $throwable->getSeverity(); - } - - if ($throwable instanceof \ParseError) { - return \E_PARSE; - } - - if ($throwable instanceof \TypeError) { - return \E_RECOVERABLE_ERROR; - } - - return \E_ERROR; - } -} diff --git a/lib/symfony/error-handler/composer.json b/lib/symfony/error-handler/composer.json deleted file mode 100644 index bc0d88e9d..000000000 --- a/lib/symfony/error-handler/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/error-handler", - "type": "library", - "description": "Provides tools to manage errors and ease debugging PHP code", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\ErrorHandler\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "minimum-stability": "dev" -} diff --git a/lib/symfony/event-dispatcher-contracts/.gitignore b/lib/symfony/event-dispatcher-contracts/.gitignore deleted file mode 100644 index c49a5d8df..000000000 --- a/lib/symfony/event-dispatcher-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/lib/symfony/event-dispatcher-contracts/CHANGELOG.md b/lib/symfony/event-dispatcher-contracts/CHANGELOG.md deleted file mode 100644 index 7932e2613..000000000 --- a/lib/symfony/event-dispatcher-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/lib/symfony/event-dispatcher-contracts/Event.php b/lib/symfony/event-dispatcher-contracts/Event.php deleted file mode 100644 index 46dcb2ba0..000000000 --- a/lib/symfony/event-dispatcher-contracts/Event.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; - -/** - * Event is the base class for classes containing event data. - * - * This class contains no event data. It is used by events that do not pass - * state information to an event handler when an event is raised. - * - * You can call the method stopPropagation() to abort the execution of - * further listeners in your event listener. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - * @author Nicolas Grekas - */ -class Event implements StoppableEventInterface -{ - private $propagationStopped = false; - - /** - * {@inheritdoc} - */ - public function isPropagationStopped(): bool - { - return $this->propagationStopped; - } - - /** - * Stops the propagation of the event to further event listeners. - * - * If multiple event listeners are connected to the same event, no - * further event listener will be triggered once any trigger calls - * stopPropagation(). - */ - public function stopPropagation(): void - { - $this->propagationStopped = true; - } -} diff --git a/lib/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/lib/symfony/event-dispatcher-contracts/EventDispatcherInterface.php deleted file mode 100644 index 351dc5131..000000000 --- a/lib/symfony/event-dispatcher-contracts/EventDispatcherInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; - -/** - * Allows providing hooks on domain-specific lifecycles by dispatching events. - */ -interface EventDispatcherInterface extends PsrEventDispatcherInterface -{ - /** - * Dispatches an event to all registered listeners. - * - * @param object $event The event to pass to the event handlers/listeners - * @param string|null $eventName The name of the event to dispatch. If not supplied, - * the class of $event should be used instead. - * - * @return object The passed $event MUST be returned - */ - public function dispatch(object $event, string $eventName = null): object; -} diff --git a/lib/symfony/event-dispatcher-contracts/LICENSE b/lib/symfony/event-dispatcher-contracts/LICENSE deleted file mode 100644 index 74cdc2dbf..000000000 --- a/lib/symfony/event-dispatcher-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/event-dispatcher-contracts/README.md b/lib/symfony/event-dispatcher-contracts/README.md deleted file mode 100644 index b1ab4c00c..000000000 --- a/lib/symfony/event-dispatcher-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony EventDispatcher Contracts -================================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/lib/symfony/event-dispatcher-contracts/composer.json b/lib/symfony/event-dispatcher-contracts/composer.json deleted file mode 100644 index 660df81a0..000000000 --- a/lib/symfony/event-dispatcher-contracts/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/event-dispatcher-contracts", - "type": "library", - "description": "Generic abstractions related to dispatching event", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/lib/symfony/event-dispatcher/Attribute/AsEventListener.php b/lib/symfony/event-dispatcher/Attribute/AsEventListener.php deleted file mode 100644 index bb931b82d..000000000 --- a/lib/symfony/event-dispatcher/Attribute/AsEventListener.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Attribute; - -/** - * Service tag to autoconfigure event listeners. - * - * @author Alexander M. Turek - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class AsEventListener -{ - public function __construct( - public ?string $event = null, - public ?string $method = null, - public int $priority = 0, - public ?string $dispatcher = null, - ) { - } -} diff --git a/lib/symfony/event-dispatcher/CHANGELOG.md b/lib/symfony/event-dispatcher/CHANGELOG.md deleted file mode 100644 index 0f9859895..000000000 --- a/lib/symfony/event-dispatcher/CHANGELOG.md +++ /dev/null @@ -1,91 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Allow `#[AsEventListener]` attribute on methods - -5.3 ---- - - * Add `#[AsEventListener]` attribute for declaring listeners on PHP 8 - -5.1.0 ------ - - * The `LegacyEventDispatcherProxy` class has been deprecated. - * Added an optional `dispatcher` attribute to the listener and subscriber tags in `RegisterListenerPass`. - -5.0.0 ------ - - * The signature of the `EventDispatcherInterface::dispatch()` method has been changed to `dispatch($event, string $eventName = null): object`. - * The `Event` class has been removed in favor of `Symfony\Contracts\EventDispatcher\Event`. - * The `TraceableEventDispatcherInterface` has been removed. - * The `WrappedListener` class is now final. - -4.4.0 ------ - - * `AddEventAliasesPass` has been added, allowing applications and bundles to extend the event alias mapping used by `RegisterListenersPass`. - * Made the `event` attribute of the `kernel.event_listener` tag optional for FQCN events. - -4.3.0 ------ - - * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated - * deprecated the `Event` class, use `Symfony\Contracts\EventDispatcher\Event` instead - -4.1.0 ------ - - * added support for invokable event listeners tagged with `kernel.event_listener` by default - * The `TraceableEventDispatcher::getOrphanedEvents()` method has been added. - * The `TraceableEventDispatcherInterface` has been deprecated. - -4.0.0 ------ - - * removed the `ContainerAwareEventDispatcher` class - * added the `reset()` method to the `TraceableEventDispatcherInterface` - -3.4.0 ------ - - * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated. - -3.3.0 ------ - - * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead. - -3.0.0 ------ - - * The method `getListenerPriority($eventName, $listener)` has been added to the - `EventDispatcherInterface`. - * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()` - and `Event::getName()` have been removed. - The event dispatcher and the event name are passed to the listener call. - -2.5.0 ------ - - * added Debug\TraceableEventDispatcher (originally in HttpKernel) - * changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface - * added RegisterListenersPass (originally in HttpKernel) - -2.1.0 ------ - - * added TraceableEventDispatcherInterface - * added ContainerAwareEventDispatcher - * added a reference to the EventDispatcher on the Event - * added a reference to the Event name on the event - * added fluid interface to the dispatch() method which now returns the Event - object - * added GenericEvent event class - * added the possibility for subscribers to subscribe several times for the - same event - * added ImmutableEventDispatcher diff --git a/lib/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/lib/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php deleted file mode 100644 index acfbf619c..000000000 --- a/lib/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ /dev/null @@ -1,366 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Collects some data about event listeners. - * - * This event dispatcher delegates the dispatching to another one. - * - * @author Fabien Potencier - */ -class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterface -{ - protected $logger; - protected $stopwatch; - - /** - * @var \SplObjectStorage - */ - private $callStack; - private $dispatcher; - private $wrappedListeners; - private $orphanedEvents; - private $requestStack; - private $currentRequestHash = ''; - - public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null, RequestStack $requestStack = null) - { - $this->dispatcher = $dispatcher; - $this->stopwatch = $stopwatch; - $this->logger = $logger; - $this->wrappedListeners = []; - $this->orphanedEvents = []; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->dispatcher->addListener($eventName, $listener, $priority); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->dispatcher->addSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) { - $listener = $wrappedListener; - unset($this->wrappedListeners[$eventName][$index]); - break; - } - } - } - - return $this->dispatcher->removeListener($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - return $this->dispatcher->removeSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function getListeners(string $eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - // we might have wrapped listeners for the event (if called while dispatching) - // in that case get the priority by wrapper - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) { - return $this->dispatcher->getListenerPriority($eventName, $wrappedListener); - } - } - } - - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners(string $eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, string $eventName = null): object - { - $eventName = $eventName ?? \get_class($event); - - if (null === $this->callStack) { - $this->callStack = new \SplObjectStorage(); - } - - $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : ''; - - if (null !== $this->logger && $event instanceof StoppableEventInterface && $event->isPropagationStopped()) { - $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName)); - } - - $this->preProcess($eventName); - try { - $this->beforeDispatch($eventName, $event); - try { - $e = $this->stopwatch->start($eventName, 'section'); - try { - $this->dispatcher->dispatch($event, $eventName); - } finally { - if ($e->isStarted()) { - $e->stop(); - } - } - } finally { - $this->afterDispatch($eventName, $event); - } - } finally { - $this->currentRequestHash = $currentRequestHash; - $this->postProcess($eventName); - } - - return $event; - } - - /** - * @return array - */ - public function getCalledListeners(Request $request = null) - { - if (null === $this->callStack) { - return []; - } - - $hash = $request ? spl_object_hash($request) : null; - $called = []; - foreach ($this->callStack as $listener) { - [$eventName, $requestHash] = $this->callStack->getInfo(); - if (null === $hash || $hash === $requestHash) { - $called[] = $listener->getInfo($eventName); - } - } - - return $called; - } - - /** - * @return array - */ - public function getNotCalledListeners(Request $request = null) - { - try { - $allListeners = $this->getListeners(); - } catch (\Exception $e) { - if (null !== $this->logger) { - $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); - } - - // unable to retrieve the uncalled listeners - return []; - } - - $hash = $request ? spl_object_hash($request) : null; - $calledListeners = []; - - if (null !== $this->callStack) { - foreach ($this->callStack as $calledListener) { - [, $requestHash] = $this->callStack->getInfo(); - - if (null === $hash || $hash === $requestHash) { - $calledListeners[] = $calledListener->getWrappedListener(); - } - } - } - - $notCalled = []; - foreach ($allListeners as $eventName => $listeners) { - foreach ($listeners as $listener) { - if (!\in_array($listener, $calledListeners, true)) { - if (!$listener instanceof WrappedListener) { - $listener = new WrappedListener($listener, null, $this->stopwatch, $this); - } - $notCalled[] = $listener->getInfo($eventName); - } - } - } - - uasort($notCalled, [$this, 'sortNotCalledListeners']); - - return $notCalled; - } - - public function getOrphanedEvents(Request $request = null): array - { - if ($request) { - return $this->orphanedEvents[spl_object_hash($request)] ?? []; - } - - if (!$this->orphanedEvents) { - return []; - } - - return array_merge(...array_values($this->orphanedEvents)); - } - - public function reset() - { - $this->callStack = null; - $this->orphanedEvents = []; - $this->currentRequestHash = ''; - } - - /** - * Proxies all method calls to the original event dispatcher. - * - * @param string $method The method name - * @param array $arguments The method arguments - * - * @return mixed - */ - public function __call(string $method, array $arguments) - { - return $this->dispatcher->{$method}(...$arguments); - } - - /** - * Called before dispatching the event. - */ - protected function beforeDispatch(string $eventName, object $event) - { - } - - /** - * Called after dispatching the event. - */ - protected function afterDispatch(string $eventName, object $event) - { - } - - private function preProcess(string $eventName): void - { - if (!$this->dispatcher->hasListeners($eventName)) { - $this->orphanedEvents[$this->currentRequestHash][] = $eventName; - - return; - } - - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - $priority = $this->getListenerPriority($eventName, $listener); - $wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this); - $this->wrappedListeners[$eventName][] = $wrappedListener; - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $wrappedListener, $priority); - $this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]); - } - } - - private function postProcess(string $eventName): void - { - unset($this->wrappedListeners[$eventName]); - $skipped = false; - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - if (!$listener instanceof WrappedListener) { // #12845: a new listener was added during dispatch. - continue; - } - // Unwrap listener - $priority = $this->getListenerPriority($eventName, $listener); - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority); - - if (null !== $this->logger) { - $context = ['event' => $eventName, 'listener' => $listener->getPretty()]; - } - - if ($listener->wasCalled()) { - if (null !== $this->logger) { - $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context); - } - } else { - $this->callStack->detach($listener); - } - - if (null !== $this->logger && $skipped) { - $this->logger->debug('Listener "{listener}" was not called for event "{event}".', $context); - } - - if ($listener->stoppedPropagation()) { - if (null !== $this->logger) { - $this->logger->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context); - } - - $skipped = true; - } - } - } - - private function sortNotCalledListeners(array $a, array $b) - { - if (0 !== $cmp = strcmp($a['event'], $b['event'])) { - return $cmp; - } - - if (\is_int($a['priority']) && !\is_int($b['priority'])) { - return 1; - } - - if (!\is_int($a['priority']) && \is_int($b['priority'])) { - return -1; - } - - if ($a['priority'] === $b['priority']) { - return 0; - } - - if ($a['priority'] > $b['priority']) { - return -1; - } - - return 1; - } -} diff --git a/lib/symfony/event-dispatcher/Debug/WrappedListener.php b/lib/symfony/event-dispatcher/Debug/WrappedListener.php deleted file mode 100644 index 3916716ec..000000000 --- a/lib/symfony/event-dispatcher/Debug/WrappedListener.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * @author Fabien Potencier - */ -final class WrappedListener -{ - private $listener; - private $optimizedListener; - private $name; - private $called; - private $stoppedPropagation; - private $stopwatch; - private $dispatcher; - private $pretty; - private $stub; - private $priority; - private static $hasClassStub; - - public function __construct($listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) - { - $this->listener = $listener; - $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null); - $this->stopwatch = $stopwatch; - $this->dispatcher = $dispatcher; - $this->called = false; - $this->stoppedPropagation = false; - - if (\is_array($listener)) { - $this->name = \is_object($listener[0]) ? get_debug_type($listener[0]) : $listener[0]; - $this->pretty = $this->name.'::'.$listener[1]; - } elseif ($listener instanceof \Closure) { - $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { - $this->pretty = $this->name = 'closure'; - } elseif ($class = $r->getClosureScopeClass()) { - $this->name = $class->name; - $this->pretty = $this->name.'::'.$r->name; - } else { - $this->pretty = $this->name = $r->name; - } - } elseif (\is_string($listener)) { - $this->pretty = $this->name = $listener; - } else { - $this->name = get_debug_type($listener); - $this->pretty = $this->name.'::__invoke'; - } - - if (null !== $name) { - $this->name = $name; - } - - if (null === self::$hasClassStub) { - self::$hasClassStub = class_exists(ClassStub::class); - } - } - - public function getWrappedListener() - { - return $this->listener; - } - - public function wasCalled(): bool - { - return $this->called; - } - - public function stoppedPropagation(): bool - { - return $this->stoppedPropagation; - } - - public function getPretty(): string - { - return $this->pretty; - } - - public function getInfo(string $eventName): array - { - if (null === $this->stub) { - $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()'; - } - - return [ - 'event' => $eventName, - 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null), - 'pretty' => $this->pretty, - 'stub' => $this->stub, - ]; - } - - public function __invoke(object $event, string $eventName, EventDispatcherInterface $dispatcher): void - { - $dispatcher = $this->dispatcher ?: $dispatcher; - - $this->called = true; - $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); - - $e = $this->stopwatch->start($this->name, 'event_listener'); - - ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); - - if ($e->isStarted()) { - $e->stop(); - } - - if ($event instanceof StoppableEventInterface && $event->isPropagationStopped()) { - $this->stoppedPropagation = true; - } - } -} diff --git a/lib/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php b/lib/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php deleted file mode 100644 index 6e7292b4a..000000000 --- a/lib/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * This pass allows bundles to extend the list of event aliases. - * - * @author Alexander M. Turek - */ -class AddEventAliasesPass implements CompilerPassInterface -{ - private $eventAliases; - private $eventAliasesParameter; - - public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->eventAliases = $eventAliases; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - public function process(ContainerBuilder $container): void - { - $eventAliases = $container->hasParameter($this->eventAliasesParameter) ? $container->getParameter($this->eventAliasesParameter) : []; - - $container->setParameter( - $this->eventAliasesParameter, - array_merge($eventAliases, $this->eventAliases) - ); - } -} diff --git a/lib/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/lib/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php deleted file mode 100644 index 8eabe7d74..000000000 --- a/lib/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ /dev/null @@ -1,238 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Compiler pass to register tagged services for an event dispatcher. - */ -class RegisterListenersPass implements CompilerPassInterface -{ - protected $dispatcherService; - protected $listenerTag; - protected $subscriberTag; - protected $eventAliasesParameter; - - private $hotPathEvents = []; - private $hotPathTagName = 'container.hot_path'; - private $noPreloadEvents = []; - private $noPreloadTagName = 'container.no_preload'; - - public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->dispatcherService = $dispatcherService; - $this->listenerTag = $listenerTag; - $this->subscriberTag = $subscriberTag; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - /** - * @return $this - */ - public function setHotPathEvents(array $hotPathEvents) - { - $this->hotPathEvents = array_flip($hotPathEvents); - - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__); - $this->hotPathTagName = func_get_arg(1); - } - - return $this; - } - - /** - * @return $this - */ - public function setNoPreloadEvents(array $noPreloadEvents): self - { - $this->noPreloadEvents = array_flip($noPreloadEvents); - - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__); - $this->noPreloadTagName = func_get_arg(1); - } - - return $this; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) { - return; - } - - $aliases = []; - - if ($container->hasParameter($this->eventAliasesParameter)) { - $aliases = $container->getParameter($this->eventAliasesParameter); - } - - $globalDispatcherDefinition = $container->findDefinition($this->dispatcherService); - - foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) { - $noPreload = 0; - - foreach ($events as $event) { - $priority = $event['priority'] ?? 0; - - if (!isset($event['event'])) { - if ($container->getDefinition($id)->hasTag($this->subscriberTag)) { - continue; - } - - $event['method'] = $event['method'] ?? '__invoke'; - $event['event'] = $this->getEventFromTypeDeclaration($container, $id, $event['method']); - } - - $event['event'] = $aliases[$event['event']] ?? $event['event']; - - if (!isset($event['method'])) { - $event['method'] = 'on'.preg_replace_callback([ - '/(?<=\b|_)[a-z]/i', - '/[^a-z0-9]/i', - ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); - $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); - - if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method']) && $r->hasMethod('__invoke')) { - $event['method'] = '__invoke'; - } - } - - $dispatcherDefinition = $globalDispatcherDefinition; - if (isset($event['dispatcher'])) { - $dispatcherDefinition = $container->getDefinition($event['dispatcher']); - } - - $dispatcherDefinition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]); - - if (isset($this->hotPathEvents[$event['event']])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } elseif (isset($this->noPreloadEvents[$event['event']])) { - ++$noPreload; - } - } - - if ($noPreload && \count($events) === $noPreload) { - $container->getDefinition($id)->addTag($this->noPreloadTagName); - } - } - - $extractingDispatcher = new ExtractingEventDispatcher(); - - foreach ($container->findTaggedServiceIds($this->subscriberTag, true) as $id => $tags) { - $def = $container->getDefinition($id); - - // We must assume that the class value has been correctly filled, even if the service is created by a factory - $class = $def->getClass(); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(EventSubscriberInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class)); - } - $class = $r->name; - - $dispatcherDefinitions = []; - foreach ($tags as $attributes) { - if (!isset($attributes['dispatcher']) || isset($dispatcherDefinitions[$attributes['dispatcher']])) { - continue; - } - - $dispatcherDefinitions[$attributes['dispatcher']] = $container->getDefinition($attributes['dispatcher']); - } - - if (!$dispatcherDefinitions) { - $dispatcherDefinitions = [$globalDispatcherDefinition]; - } - - $noPreload = 0; - ExtractingEventDispatcher::$aliases = $aliases; - ExtractingEventDispatcher::$subscriber = $class; - $extractingDispatcher->addSubscriber($extractingDispatcher); - foreach ($extractingDispatcher->listeners as $args) { - $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]]; - foreach ($dispatcherDefinitions as $dispatcherDefinition) { - $dispatcherDefinition->addMethodCall('addListener', $args); - } - - if (isset($this->hotPathEvents[$args[0]])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } elseif (isset($this->noPreloadEvents[$args[0]])) { - ++$noPreload; - } - } - if ($noPreload && \count($extractingDispatcher->listeners) === $noPreload) { - $container->getDefinition($id)->addTag($this->noPreloadTagName); - } - $extractingDispatcher->listeners = []; - ExtractingEventDispatcher::$aliases = []; - } - } - - private function getEventFromTypeDeclaration(ContainerBuilder $container, string $id, string $method): string - { - if ( - null === ($class = $container->getDefinition($id)->getClass()) - || !($r = $container->getReflectionClass($class, false)) - || !$r->hasMethod($method) - || 1 > ($m = $r->getMethod($method))->getNumberOfParameters() - || !($type = $m->getParameters()[0]->getType()) instanceof \ReflectionNamedType - || $type->isBuiltin() - || Event::class === ($name = $type->getName()) - ) { - throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag)); - } - - return $name; - } -} - -/** - * @internal - */ -class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface -{ - public $listeners = []; - - public static $aliases = []; - public static $subscriber; - - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->listeners[] = [$eventName, $listener[1], $priority]; - } - - public static function getSubscribedEvents(): array - { - $events = []; - - foreach ([self::$subscriber, 'getSubscribedEvents']() as $eventName => $params) { - $events[self::$aliases[$eventName] ?? $eventName] = $params; - } - - return $events; - } -} diff --git a/lib/symfony/event-dispatcher/EventDispatcher.php b/lib/symfony/event-dispatcher/EventDispatcher.php deleted file mode 100644 index 8fe8fb5c2..000000000 --- a/lib/symfony/event-dispatcher/EventDispatcher.php +++ /dev/null @@ -1,280 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\Debug\WrappedListener; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - * @author Fabien Potencier - * @author Jordi Boggiano - * @author Jordan Alliot - * @author Nicolas Grekas - */ -class EventDispatcher implements EventDispatcherInterface -{ - private $listeners = []; - private $sorted = []; - private $optimized; - - public function __construct() - { - if (__CLASS__ === static::class) { - $this->optimized = []; - } - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, string $eventName = null): object - { - $eventName = $eventName ?? \get_class($event); - - if (null !== $this->optimized) { - $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName)); - } else { - $listeners = $this->getListeners($eventName); - } - - if ($listeners) { - $this->callListeners($listeners, $eventName, $event); - } - - return $event; - } - - /** - * {@inheritdoc} - */ - public function getListeners(string $eventName = null) - { - if (null !== $eventName) { - if (empty($this->listeners[$eventName])) { - return []; - } - - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - - return $this->sorted[$eventName]; - } - - foreach ($this->listeners as $eventName => $eventListeners) { - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - } - - return array_filter($this->sorted); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return null; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { - return $priority; - } - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasListeners(string $eventName = null) - { - if (null !== $eventName) { - return !empty($this->listeners[$eventName]); - } - - foreach ($this->listeners as $eventListeners) { - if ($eventListeners) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->listeners[$eventName][$priority][] = $listener; - unset($this->sorted[$eventName], $this->optimized[$eventName]); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as $k => &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { - unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]); - } - } - - if (!$listeners) { - unset($this->listeners[$eventName][$priority]); - } - } - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_string($params)) { - $this->addListener($eventName, [$subscriber, $params]); - } elseif (\is_string($params[0])) { - $this->addListener($eventName, [$subscriber, $params[0]], $params[1] ?? 0); - } else { - foreach ($params as $listener) { - $this->addListener($eventName, [$subscriber, $listener[0]], $listener[1] ?? 0); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_array($params) && \is_array($params[0])) { - foreach ($params as $listener) { - $this->removeListener($eventName, [$subscriber, $listener[0]]); - } - } else { - $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]); - } - } - } - - /** - * Triggers the listeners of an event. - * - * This method can be overridden to add functionality that is executed - * for each listener. - * - * @param callable[] $listeners The event listeners - * @param string $eventName The name of the event to dispatch - * @param object $event The event object to pass to the event handlers/listeners - */ - protected function callListeners(iterable $listeners, string $eventName, object $event) - { - $stoppable = $event instanceof StoppableEventInterface; - - foreach ($listeners as $listener) { - if ($stoppable && $event->isPropagationStopped()) { - break; - } - $listener($event, $eventName, $this); - } - } - - /** - * Sorts the internal list of listeners for the given event by priority. - */ - private function sortListeners(string $eventName) - { - krsort($this->listeners[$eventName]); - $this->sorted[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as $k => &$listener) { - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - $this->sorted[$eventName][] = $listener; - } - } - } - - /** - * Optimizes the internal list of listeners for the given event by priority. - */ - private function optimizeListeners(string $eventName): array - { - krsort($this->listeners[$eventName]); - $this->optimized[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as &$listener) { - $closure = &$this->optimized[$eventName][]; - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $closure = static function (...$args) use (&$listener, &$closure) { - if ($listener[0] instanceof \Closure) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - ($closure = \Closure::fromCallable($listener))(...$args); - }; - } else { - $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener); - } - } - } - - return $this->optimized[$eventName]; - } -} diff --git a/lib/symfony/event-dispatcher/EventDispatcherInterface.php b/lib/symfony/event-dispatcher/EventDispatcherInterface.php deleted file mode 100644 index cc324e1c6..000000000 --- a/lib/symfony/event-dispatcher/EventDispatcherInterface.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Bernhard Schussek - */ -interface EventDispatcherInterface extends ContractsEventDispatcherInterface -{ - /** - * Adds an event listener that listens on the specified events. - * - * @param int $priority The higher this value, the earlier an event - * listener will be triggered in the chain (defaults to 0) - */ - public function addListener(string $eventName, callable $listener, int $priority = 0); - - /** - * Adds an event subscriber. - * - * The subscriber is asked for all the events it is - * interested in and added as a listener for these events. - */ - public function addSubscriber(EventSubscriberInterface $subscriber); - - /** - * Removes an event listener from the specified events. - */ - public function removeListener(string $eventName, callable $listener); - - public function removeSubscriber(EventSubscriberInterface $subscriber); - - /** - * Gets the listeners of a specific event or all listeners sorted by descending priority. - * - * @return array - */ - public function getListeners(string $eventName = null); - - /** - * Gets the listener priority for a specific event. - * - * Returns null if the event or the listener does not exist. - * - * @return int|null - */ - public function getListenerPriority(string $eventName, callable $listener); - - /** - * Checks whether an event has any registered listeners. - * - * @return bool - */ - public function hasListeners(string $eventName = null); -} diff --git a/lib/symfony/event-dispatcher/EventSubscriberInterface.php b/lib/symfony/event-dispatcher/EventSubscriberInterface.php deleted file mode 100644 index 2085e428e..000000000 --- a/lib/symfony/event-dispatcher/EventSubscriberInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * An EventSubscriber knows itself what events it is interested in. - * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes - * {@link getSubscribedEvents} and registers the subscriber as a listener for all - * returned events. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - */ -interface EventSubscriberInterface -{ - /** - * Returns an array of event names this subscriber wants to listen to. - * - * The array keys are event names and the value can be: - * - * * The method name to call (priority defaults to 0) - * * An array composed of the method name to call and the priority - * * An array of arrays composed of the method names to call and respective - * priorities, or 0 if unset - * - * For instance: - * - * * ['eventName' => 'methodName'] - * * ['eventName' => ['methodName', $priority]] - * * ['eventName' => [['methodName1', $priority], ['methodName2']]] - * - * The code must not depend on runtime state as it will only be called at compile time. - * All logic depending on runtime state must be put into the individual methods handling the events. - * - * @return array> - */ - public static function getSubscribedEvents(); -} diff --git a/lib/symfony/event-dispatcher/GenericEvent.php b/lib/symfony/event-dispatcher/GenericEvent.php deleted file mode 100644 index b32a301ae..000000000 --- a/lib/symfony/event-dispatcher/GenericEvent.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Event encapsulation class. - * - * Encapsulates events thus decoupling the observer from the subject they encapsulate. - * - * @author Drak - * - * @implements \ArrayAccess - * @implements \IteratorAggregate - */ -class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate -{ - protected $subject; - protected $arguments; - - /** - * Encapsulate an event with $subject and $args. - * - * @param mixed $subject The subject of the event, usually an object or a callable - * @param array $arguments Arguments to store in the event - */ - public function __construct($subject = null, array $arguments = []) - { - $this->subject = $subject; - $this->arguments = $arguments; - } - - /** - * Getter for subject property. - * - * @return mixed - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Get argument by key. - * - * @return mixed - * - * @throws \InvalidArgumentException if key is not found - */ - public function getArgument(string $key) - { - if ($this->hasArgument($key)) { - return $this->arguments[$key]; - } - - throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key)); - } - - /** - * Add argument to event. - * - * @param mixed $value Value - * - * @return $this - */ - public function setArgument(string $key, $value) - { - $this->arguments[$key] = $value; - - return $this; - } - - /** - * Getter for all arguments. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Set args property. - * - * @return $this - */ - public function setArguments(array $args = []) - { - $this->arguments = $args; - - return $this; - } - - /** - * Has argument. - * - * @return bool - */ - public function hasArgument(string $key) - { - return \array_key_exists($key, $this->arguments); - } - - /** - * ArrayAccess for argument getter. - * - * @param string $key Array key - * - * @return mixed - * - * @throws \InvalidArgumentException if key does not exist in $this->args - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->getArgument($key); - } - - /** - * ArrayAccess for argument setter. - * - * @param string $key Array key to set - * @param mixed $value Value - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - $this->setArgument($key, $value); - } - - /** - * ArrayAccess for unset argument. - * - * @param string $key Array key - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - if ($this->hasArgument($key)) { - unset($this->arguments[$key]); - } - } - - /** - * ArrayAccess has argument. - * - * @param string $key Array key - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->hasArgument($key); - } - - /** - * IteratorAggregate for iterating over the object like an array. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->arguments); - } -} diff --git a/lib/symfony/event-dispatcher/ImmutableEventDispatcher.php b/lib/symfony/event-dispatcher/ImmutableEventDispatcher.php deleted file mode 100644 index 568d79c3a..000000000 --- a/lib/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * A read-only proxy for an event dispatcher. - * - * @author Bernhard Schussek - */ -class ImmutableEventDispatcher implements EventDispatcherInterface -{ - private $dispatcher; - - public function __construct(EventDispatcherInterface $dispatcher) - { - $this->dispatcher = $dispatcher; - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, string $eventName = null): object - { - return $this->dispatcher->dispatch($event, $eventName); - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function getListeners(string $eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners(string $eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } -} diff --git a/lib/symfony/event-dispatcher/LICENSE b/lib/symfony/event-dispatcher/LICENSE deleted file mode 100644 index 88bf75bb4..000000000 --- a/lib/symfony/event-dispatcher/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/event-dispatcher/LegacyEventDispatcherProxy.php b/lib/symfony/event-dispatcher/LegacyEventDispatcherProxy.php deleted file mode 100644 index 6e17c8fcc..000000000 --- a/lib/symfony/event-dispatcher/LegacyEventDispatcherProxy.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/event-dispatcher', '5.1', '%s is deprecated, use the event dispatcher without the proxy.', LegacyEventDispatcherProxy::class); - -/** - * A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch(). - * - * @author Nicolas Grekas - * - * @deprecated since Symfony 5.1 - */ -final class LegacyEventDispatcherProxy -{ - public static function decorate(?EventDispatcherInterface $dispatcher): ?EventDispatcherInterface - { - return $dispatcher; - } -} diff --git a/lib/symfony/event-dispatcher/README.md b/lib/symfony/event-dispatcher/README.md deleted file mode 100644 index dcdb68d21..000000000 --- a/lib/symfony/event-dispatcher/README.md +++ /dev/null @@ -1,15 +0,0 @@ -EventDispatcher Component -========================= - -The EventDispatcher component provides tools that allow your application -components to communicate with each other by dispatching events and listening to -them. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/event-dispatcher/composer.json b/lib/symfony/event-dispatcher/composer.json deleted file mode 100644 index 32b42e408..000000000 --- a/lib/symfony/event-dispatcher/composer.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "symfony/event-dispatcher", - "type": "library", - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/filesystem/CHANGELOG.md b/lib/symfony/filesystem/CHANGELOG.md deleted file mode 100644 index fcb7170ca..000000000 --- a/lib/symfony/filesystem/CHANGELOG.md +++ /dev/null @@ -1,82 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `Path` class - * Add `$lock` argument to `Filesystem::appendToFile()` - -5.0.0 ------ - - * `Filesystem::dumpFile()` and `appendToFile()` don't accept arrays anymore - -4.4.0 ------ - - * support for passing a `null` value to `Filesystem::isAbsolutePath()` is deprecated and will be removed in 5.0 - * `tempnam()` now accepts a third argument `$suffix`. - -4.3.0 ------ - - * support for passing arrays to `Filesystem::dumpFile()` is deprecated and will be removed in 5.0 - * support for passing arrays to `Filesystem::appendToFile()` is deprecated and will be removed in 5.0 - -4.0.0 ------ - - * removed `LockHandler` - * Support for passing relative paths to `Filesystem::makePathRelative()` has been removed. - -3.4.0 ------ - - * support for passing relative paths to `Filesystem::makePathRelative()` is deprecated and will be removed in 4.0 - -3.3.0 ------ - - * added `appendToFile()` to append contents to existing files - -3.2.0 ------ - - * added `readlink()` as a platform independent method to read links - -3.0.0 ------ - - * removed `$mode` argument from `Filesystem::dumpFile()` - -2.8.0 ------ - - * added tempnam() a stream aware version of PHP's native tempnam() - -2.6.0 ------ - - * added LockHandler - -2.3.12 ------- - - * deprecated dumpFile() file mode argument. - -2.3.0 ------ - - * added the dumpFile() method to atomically write files - -2.2.0 ------ - - * added a delete option for the mirror() method - -2.1.0 ------ - - * 24eb396 : BC Break : mkdir() function now throws exception in case of failure instead of returning Boolean value - * created the component diff --git a/lib/symfony/filesystem/Exception/ExceptionInterface.php b/lib/symfony/filesystem/Exception/ExceptionInterface.php deleted file mode 100644 index fc438d9f3..000000000 --- a/lib/symfony/filesystem/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * Exception interface for all exceptions thrown by the component. - * - * @author Romain Neutron - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/filesystem/Exception/FileNotFoundException.php b/lib/symfony/filesystem/Exception/FileNotFoundException.php deleted file mode 100644 index 48b640809..000000000 --- a/lib/symfony/filesystem/Exception/FileNotFoundException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * Exception class thrown when a file couldn't be found. - * - * @author Fabien Potencier - * @author Christian Gärtner - */ -class FileNotFoundException extends IOException -{ - public function __construct(string $message = null, int $code = 0, \Throwable $previous = null, string $path = null) - { - if (null === $message) { - if (null === $path) { - $message = 'File could not be found.'; - } else { - $message = sprintf('File "%s" could not be found.', $path); - } - } - - parent::__construct($message, $code, $previous, $path); - } -} diff --git a/lib/symfony/filesystem/Exception/IOException.php b/lib/symfony/filesystem/Exception/IOException.php deleted file mode 100644 index fea26e4dd..000000000 --- a/lib/symfony/filesystem/Exception/IOException.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * Exception class thrown when a filesystem operation failure happens. - * - * @author Romain Neutron - * @author Christian Gärtner - * @author Fabien Potencier - */ -class IOException extends \RuntimeException implements IOExceptionInterface -{ - private $path; - - public function __construct(string $message, int $code = 0, \Throwable $previous = null, string $path = null) - { - $this->path = $path; - - parent::__construct($message, $code, $previous); - } - - /** - * {@inheritdoc} - */ - public function getPath() - { - return $this->path; - } -} diff --git a/lib/symfony/filesystem/Exception/IOExceptionInterface.php b/lib/symfony/filesystem/Exception/IOExceptionInterface.php deleted file mode 100644 index 42829ab6c..000000000 --- a/lib/symfony/filesystem/Exception/IOExceptionInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * IOException interface for file and input/output stream related exceptions thrown by the component. - * - * @author Christian Gärtner - */ -interface IOExceptionInterface extends ExceptionInterface -{ - /** - * Returns the associated path for the exception. - * - * @return string|null - */ - public function getPath(); -} diff --git a/lib/symfony/filesystem/Exception/InvalidArgumentException.php b/lib/symfony/filesystem/Exception/InvalidArgumentException.php deleted file mode 100644 index abadc2002..000000000 --- a/lib/symfony/filesystem/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * @author Christian Flothmann - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/filesystem/Exception/RuntimeException.php b/lib/symfony/filesystem/Exception/RuntimeException.php deleted file mode 100644 index a7512dca7..000000000 --- a/lib/symfony/filesystem/Exception/RuntimeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * @author Théo Fidry - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/filesystem/Filesystem.php b/lib/symfony/filesystem/Filesystem.php deleted file mode 100644 index fafd36492..000000000 --- a/lib/symfony/filesystem/Filesystem.php +++ /dev/null @@ -1,769 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem; - -use Symfony\Component\Filesystem\Exception\FileNotFoundException; -use Symfony\Component\Filesystem\Exception\InvalidArgumentException; -use Symfony\Component\Filesystem\Exception\IOException; - -/** - * Provides basic utility to manipulate the file system. - * - * @author Fabien Potencier - */ -class Filesystem -{ - private static $lastError; - - /** - * Copies a file. - * - * If the target file is older than the origin file, it's always overwritten. - * If the target file is newer, it is overwritten only when the - * $overwriteNewerFiles option is set to true. - * - * @throws FileNotFoundException When originFile doesn't exist - * @throws IOException When copy fails - */ - public function copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false) - { - $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://'); - if ($originIsLocal && !is_file($originFile)) { - throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile); - } - - $this->mkdir(\dirname($targetFile)); - - $doCopy = true; - if (!$overwriteNewerFiles && null === parse_url($originFile, \PHP_URL_HOST) && is_file($targetFile)) { - $doCopy = filemtime($originFile) > filemtime($targetFile); - } - - if ($doCopy) { - // https://bugs.php.net/64634 - if (!$source = self::box('fopen', $originFile, 'r')) { - throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); - } - - // Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default - if (!$target = self::box('fopen', $targetFile, 'w', false, stream_context_create(['ftp' => ['overwrite' => true]]))) { - throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); - } - - $bytesCopied = stream_copy_to_stream($source, $target); - fclose($source); - fclose($target); - unset($source, $target); - - if (!is_file($targetFile)) { - throw new IOException(sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile); - } - - if ($originIsLocal) { - // Like `cp`, preserve executable permission bits - self::box('chmod', $targetFile, fileperms($targetFile) | (fileperms($originFile) & 0111)); - - if ($bytesCopied !== $bytesOrigin = filesize($originFile)) { - throw new IOException(sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile); - } - } - } - } - - /** - * Creates a directory recursively. - * - * @param string|iterable $dirs The directory path - * - * @throws IOException On any directory creation failure - */ - public function mkdir($dirs, int $mode = 0777) - { - foreach ($this->toIterable($dirs) as $dir) { - if (is_dir($dir)) { - continue; - } - - if (!self::box('mkdir', $dir, $mode, true) && !is_dir($dir)) { - throw new IOException(sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir); - } - } - } - - /** - * Checks the existence of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to check - * - * @return bool - */ - public function exists($files) - { - $maxPathLength = \PHP_MAXPATHLEN - 2; - - foreach ($this->toIterable($files) as $file) { - if (\strlen($file) > $maxPathLength) { - throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file); - } - - if (!file_exists($file)) { - return false; - } - } - - return true; - } - - /** - * Sets access and modification time of file. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to create - * @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used - * @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used - * - * @throws IOException When touch fails - */ - public function touch($files, int $time = null, int $atime = null) - { - foreach ($this->toIterable($files) as $file) { - if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) { - throw new IOException(sprintf('Failed to touch "%s": ', $file).self::$lastError, 0, null, $file); - } - } - } - - /** - * Removes files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to remove - * - * @throws IOException When removal fails - */ - public function remove($files) - { - if ($files instanceof \Traversable) { - $files = iterator_to_array($files, false); - } elseif (!\is_array($files)) { - $files = [$files]; - } - - self::doRemove($files, false); - } - - private static function doRemove(array $files, bool $isRecursive): void - { - $files = array_reverse($files); - foreach ($files as $file) { - if (is_link($file)) { - // See https://bugs.php.net/52176 - if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) { - throw new IOException(sprintf('Failed to remove symlink "%s": ', $file).self::$lastError); - } - } elseif (is_dir($file)) { - if (!$isRecursive) { - $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-.')); - - if (file_exists($tmpName)) { - try { - self::doRemove([$tmpName], true); - } catch (IOException $e) { - } - } - - if (!file_exists($tmpName) && self::box('rename', $file, $tmpName)) { - $origFile = $file; - $file = $tmpName; - } else { - $origFile = null; - } - } - - $files = new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS); - self::doRemove(iterator_to_array($files, true), true); - - if (!self::box('rmdir', $file) && file_exists($file) && !$isRecursive) { - $lastError = self::$lastError; - - if (null !== $origFile && self::box('rename', $file, $origFile)) { - $file = $origFile; - } - - throw new IOException(sprintf('Failed to remove directory "%s": ', $file).$lastError); - } - } elseif (!self::box('unlink', $file) && (str_contains(self::$lastError, 'Permission denied') || file_exists($file))) { - throw new IOException(sprintf('Failed to remove file "%s": ', $file).self::$lastError); - } - } - } - - /** - * Change mode for an array of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change mode - * @param int $mode The new mode (octal) - * @param int $umask The mode mask (octal) - * @param bool $recursive Whether change the mod recursively or not - * - * @throws IOException When the change fails - */ - public function chmod($files, int $mode, int $umask = 0000, bool $recursive = false) - { - foreach ($this->toIterable($files) as $file) { - if ((\PHP_VERSION_ID < 80000 || \is_int($mode)) && !self::box('chmod', $file, $mode & ~$umask)) { - throw new IOException(sprintf('Failed to chmod file "%s": ', $file).self::$lastError, 0, null, $file); - } - if ($recursive && is_dir($file) && !is_link($file)) { - $this->chmod(new \FilesystemIterator($file), $mode, $umask, true); - } - } - } - - /** - * Change the owner of an array of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change owner - * @param string|int $user A user name or number - * @param bool $recursive Whether change the owner recursively or not - * - * @throws IOException When the change fails - */ - public function chown($files, $user, bool $recursive = false) - { - foreach ($this->toIterable($files) as $file) { - if ($recursive && is_dir($file) && !is_link($file)) { - $this->chown(new \FilesystemIterator($file), $user, true); - } - if (is_link($file) && \function_exists('lchown')) { - if (!self::box('lchown', $file, $user)) { - throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); - } - } else { - if (!self::box('chown', $file, $user)) { - throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); - } - } - } - } - - /** - * Change the group of an array of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change group - * @param string|int $group A group name or number - * @param bool $recursive Whether change the group recursively or not - * - * @throws IOException When the change fails - */ - public function chgrp($files, $group, bool $recursive = false) - { - foreach ($this->toIterable($files) as $file) { - if ($recursive && is_dir($file) && !is_link($file)) { - $this->chgrp(new \FilesystemIterator($file), $group, true); - } - if (is_link($file) && \function_exists('lchgrp')) { - if (!self::box('lchgrp', $file, $group)) { - throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); - } - } else { - if (!self::box('chgrp', $file, $group)) { - throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); - } - } - } - } - - /** - * Renames a file or a directory. - * - * @throws IOException When target file or directory already exists - * @throws IOException When origin cannot be renamed - */ - public function rename(string $origin, string $target, bool $overwrite = false) - { - // we check that target does not exist - if (!$overwrite && $this->isReadable($target)) { - throw new IOException(sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target); - } - - if (!self::box('rename', $origin, $target)) { - if (is_dir($origin)) { - // See https://bugs.php.net/54097 & https://php.net/rename#113943 - $this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]); - $this->remove($origin); - - return; - } - throw new IOException(sprintf('Cannot rename "%s" to "%s": ', $origin, $target).self::$lastError, 0, null, $target); - } - } - - /** - * Tells whether a file exists and is readable. - * - * @throws IOException When windows path is longer than 258 characters - */ - private function isReadable(string $filename): bool - { - $maxPathLength = \PHP_MAXPATHLEN - 2; - - if (\strlen($filename) > $maxPathLength) { - throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename); - } - - return is_readable($filename); - } - - /** - * Creates a symbolic link or copy a directory. - * - * @throws IOException When symlink fails - */ - public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false) - { - self::assertFunctionExists('symlink'); - - if ('\\' === \DIRECTORY_SEPARATOR) { - $originDir = strtr($originDir, '/', '\\'); - $targetDir = strtr($targetDir, '/', '\\'); - - if ($copyOnWindows) { - $this->mirror($originDir, $targetDir); - - return; - } - } - - $this->mkdir(\dirname($targetDir)); - - if (is_link($targetDir)) { - if (readlink($targetDir) === $originDir) { - return; - } - $this->remove($targetDir); - } - - if (!self::box('symlink', $originDir, $targetDir)) { - $this->linkException($originDir, $targetDir, 'symbolic'); - } - } - - /** - * Creates a hard link, or several hard links to a file. - * - * @param string|string[] $targetFiles The target file(s) - * - * @throws FileNotFoundException When original file is missing or not a file - * @throws IOException When link fails, including if link already exists - */ - public function hardlink(string $originFile, $targetFiles) - { - self::assertFunctionExists('link'); - - if (!$this->exists($originFile)) { - throw new FileNotFoundException(null, 0, null, $originFile); - } - - if (!is_file($originFile)) { - throw new FileNotFoundException(sprintf('Origin file "%s" is not a file.', $originFile)); - } - - foreach ($this->toIterable($targetFiles) as $targetFile) { - if (is_file($targetFile)) { - if (fileinode($originFile) === fileinode($targetFile)) { - continue; - } - $this->remove($targetFile); - } - - if (!self::box('link', $originFile, $targetFile)) { - $this->linkException($originFile, $targetFile, 'hard'); - } - } - } - - /** - * @param string $linkType Name of the link type, typically 'symbolic' or 'hard' - */ - private function linkException(string $origin, string $target, string $linkType) - { - if (self::$lastError) { - if ('\\' === \DIRECTORY_SEPARATOR && str_contains(self::$lastError, 'error code(1314)')) { - throw new IOException(sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target); - } - } - throw new IOException(sprintf('Failed to create "%s" link from "%s" to "%s": ', $linkType, $origin, $target).self::$lastError, 0, null, $target); - } - - /** - * Resolves links in paths. - * - * With $canonicalize = false (default) - * - if $path does not exist or is not a link, returns null - * - if $path is a link, returns the next direct target of the link without considering the existence of the target - * - * With $canonicalize = true - * - if $path does not exist, returns null - * - if $path exists, returns its absolute fully resolved final version - * - * @return string|null - */ - public function readlink(string $path, bool $canonicalize = false) - { - if (!$canonicalize && !is_link($path)) { - return null; - } - - if ($canonicalize) { - if (!$this->exists($path)) { - return null; - } - - if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70410) { - $path = readlink($path); - } - - return realpath($path); - } - - if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400) { - return realpath($path); - } - - return readlink($path); - } - - /** - * Given an existing path, convert it to a path relative to a given starting path. - * - * @return string - */ - public function makePathRelative(string $endPath, string $startPath) - { - if (!$this->isAbsolutePath($startPath)) { - throw new InvalidArgumentException(sprintf('The start path "%s" is not absolute.', $startPath)); - } - - if (!$this->isAbsolutePath($endPath)) { - throw new InvalidArgumentException(sprintf('The end path "%s" is not absolute.', $endPath)); - } - - // Normalize separators on Windows - if ('\\' === \DIRECTORY_SEPARATOR) { - $endPath = str_replace('\\', '/', $endPath); - $startPath = str_replace('\\', '/', $startPath); - } - - $splitDriveLetter = function ($path) { - return (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) - ? [substr($path, 2), strtoupper($path[0])] - : [$path, null]; - }; - - $splitPath = function ($path) { - $result = []; - - foreach (explode('/', trim($path, '/')) as $segment) { - if ('..' === $segment) { - array_pop($result); - } elseif ('.' !== $segment && '' !== $segment) { - $result[] = $segment; - } - } - - return $result; - }; - - [$endPath, $endDriveLetter] = $splitDriveLetter($endPath); - [$startPath, $startDriveLetter] = $splitDriveLetter($startPath); - - $startPathArr = $splitPath($startPath); - $endPathArr = $splitPath($endPath); - - if ($endDriveLetter && $startDriveLetter && $endDriveLetter != $startDriveLetter) { - // End path is on another drive, so no relative path exists - return $endDriveLetter.':/'.($endPathArr ? implode('/', $endPathArr).'/' : ''); - } - - // Find for which directory the common path stops - $index = 0; - while (isset($startPathArr[$index]) && isset($endPathArr[$index]) && $startPathArr[$index] === $endPathArr[$index]) { - ++$index; - } - - // Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels) - if (1 === \count($startPathArr) && '' === $startPathArr[0]) { - $depth = 0; - } else { - $depth = \count($startPathArr) - $index; - } - - // Repeated "../" for each level need to reach the common path - $traverser = str_repeat('../', $depth); - - $endPathRemainder = implode('/', \array_slice($endPathArr, $index)); - - // Construct $endPath from traversing to the common path, then to the remaining $endPath - $relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : ''); - - return '' === $relativePath ? './' : $relativePath; - } - - /** - * Mirrors a directory to another. - * - * Copies files and directories from the origin directory into the target directory. By default: - * - * - existing files in the target directory will be overwritten, except if they are newer (see the `override` option) - * - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option) - * - * @param \Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created - * @param array $options An array of boolean options - * Valid options are: - * - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false) - * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false) - * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false) - * - * @throws IOException When file type is unknown - */ - public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = []) - { - $targetDir = rtrim($targetDir, '/\\'); - $originDir = rtrim($originDir, '/\\'); - $originDirLen = \strlen($originDir); - - if (!$this->exists($originDir)) { - throw new IOException(sprintf('The origin directory specified "%s" was not found.', $originDir), 0, null, $originDir); - } - - // Iterate in destination folder to remove obsolete entries - if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) { - $deleteIterator = $iterator; - if (null === $deleteIterator) { - $flags = \FilesystemIterator::SKIP_DOTS; - $deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST); - } - $targetDirLen = \strlen($targetDir); - foreach ($deleteIterator as $file) { - $origin = $originDir.substr($file->getPathname(), $targetDirLen); - if (!$this->exists($origin)) { - $this->remove($file); - } - } - } - - $copyOnWindows = $options['copy_on_windows'] ?? false; - - if (null === $iterator) { - $flags = $copyOnWindows ? \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS : \FilesystemIterator::SKIP_DOTS; - $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($originDir, $flags), \RecursiveIteratorIterator::SELF_FIRST); - } - - $this->mkdir($targetDir); - $filesCreatedWhileMirroring = []; - - foreach ($iterator as $file) { - if ($file->getPathname() === $targetDir || $file->getRealPath() === $targetDir || isset($filesCreatedWhileMirroring[$file->getRealPath()])) { - continue; - } - - $target = $targetDir.substr($file->getPathname(), $originDirLen); - $filesCreatedWhileMirroring[$target] = true; - - if (!$copyOnWindows && is_link($file)) { - $this->symlink($file->getLinkTarget(), $target); - } elseif (is_dir($file)) { - $this->mkdir($target); - } elseif (is_file($file)) { - $this->copy($file, $target, $options['override'] ?? false); - } else { - throw new IOException(sprintf('Unable to guess "%s" file type.', $file), 0, null, $file); - } - } - } - - /** - * Returns whether the file path is an absolute path. - * - * @return bool - */ - public function isAbsolutePath(string $file) - { - return '' !== $file && (strspn($file, '/\\', 0, 1) - || (\strlen($file) > 3 && ctype_alpha($file[0]) - && ':' === $file[1] - && strspn($file, '/\\', 2, 1) - ) - || null !== parse_url($file, \PHP_URL_SCHEME) - ); - } - - /** - * Creates a temporary file with support for custom stream wrappers. - * - * @param string $prefix The prefix of the generated temporary filename - * Note: Windows uses only the first three characters of prefix - * @param string $suffix The suffix of the generated temporary filename - * - * @return string The new temporary filename (with path), or throw an exception on failure - */ - public function tempnam(string $dir, string $prefix/* , string $suffix = '' */) - { - $suffix = \func_num_args() > 2 ? func_get_arg(2) : ''; - [$scheme, $hierarchy] = $this->getSchemeAndHierarchy($dir); - - // If no scheme or scheme is "file" or "gs" (Google Cloud) create temp file in local filesystem - if ((null === $scheme || 'file' === $scheme || 'gs' === $scheme) && '' === $suffix) { - // If tempnam failed or no scheme return the filename otherwise prepend the scheme - if ($tmpFile = self::box('tempnam', $hierarchy, $prefix)) { - if (null !== $scheme && 'gs' !== $scheme) { - return $scheme.'://'.$tmpFile; - } - - return $tmpFile; - } - - throw new IOException('A temporary file could not be created: '.self::$lastError); - } - - // Loop until we create a valid temp file or have reached 10 attempts - for ($i = 0; $i < 10; ++$i) { - // Create a unique filename - $tmpFile = $dir.'/'.$prefix.uniqid(mt_rand(), true).$suffix; - - // Use fopen instead of file_exists as some streams do not support stat - // Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability - if (!$handle = self::box('fopen', $tmpFile, 'x+')) { - continue; - } - - // Close the file if it was successfully opened - self::box('fclose', $handle); - - return $tmpFile; - } - - throw new IOException('A temporary file could not be created: '.self::$lastError); - } - - /** - * Atomically dumps content into a file. - * - * @param string|resource $content The data to write into the file - * - * @throws IOException if the file cannot be written to - */ - public function dumpFile(string $filename, $content) - { - if (\is_array($content)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); - } - - $dir = \dirname($filename); - - if (!is_dir($dir)) { - $this->mkdir($dir); - } - - // Will create a temp file with 0600 access rights - // when the filesystem supports chmod. - $tmpFile = $this->tempnam($dir, basename($filename)); - - try { - if (false === self::box('file_put_contents', $tmpFile, $content)) { - throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); - } - - self::box('chmod', $tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask()); - - $this->rename($tmpFile, $filename, true); - } finally { - if (file_exists($tmpFile)) { - self::box('unlink', $tmpFile); - } - } - } - - /** - * Appends content to an existing file. - * - * @param string|resource $content The content to append - * @param bool $lock Whether the file should be locked when writing to it - * - * @throws IOException If the file is not writable - */ - public function appendToFile(string $filename, $content/* , bool $lock = false */) - { - if (\is_array($content)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); - } - - $dir = \dirname($filename); - - if (!is_dir($dir)) { - $this->mkdir($dir); - } - - $lock = \func_num_args() > 2 && func_get_arg(2); - - if (false === self::box('file_put_contents', $filename, $content, \FILE_APPEND | ($lock ? \LOCK_EX : 0))) { - throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); - } - } - - private function toIterable($files): iterable - { - return is_iterable($files) ? $files : [$files]; - } - - /** - * Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]). - */ - private function getSchemeAndHierarchy(string $filename): array - { - $components = explode('://', $filename, 2); - - return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]]; - } - - private static function assertFunctionExists(string $func): void - { - if (!\function_exists($func)) { - throw new IOException(sprintf('Unable to perform filesystem operation because the "%s()" function has been disabled.', $func)); - } - } - - /** - * @param mixed ...$args - * - * @return mixed - */ - private static function box(string $func, ...$args) - { - self::assertFunctionExists($func); - - self::$lastError = null; - set_error_handler(__CLASS__.'::handleError'); - try { - return $func(...$args); - } finally { - restore_error_handler(); - } - } - - /** - * @internal - */ - public static function handleError(int $type, string $msg) - { - self::$lastError = $msg; - } -} diff --git a/lib/symfony/filesystem/LICENSE b/lib/symfony/filesystem/LICENSE deleted file mode 100644 index 88bf75bb4..000000000 --- a/lib/symfony/filesystem/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/filesystem/Path.php b/lib/symfony/filesystem/Path.php deleted file mode 100644 index 0bbd5b477..000000000 --- a/lib/symfony/filesystem/Path.php +++ /dev/null @@ -1,819 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem; - -use Symfony\Component\Filesystem\Exception\InvalidArgumentException; -use Symfony\Component\Filesystem\Exception\RuntimeException; - -/** - * Contains utility methods for handling path strings. - * - * The methods in this class are able to deal with both UNIX and Windows paths - * with both forward and backward slashes. All methods return normalized parts - * containing only forward slashes and no excess "." and ".." segments. - * - * @author Bernhard Schussek - * @author Thomas Schulz - * @author Théo Fidry - */ -final class Path -{ - /** - * The number of buffer entries that triggers a cleanup operation. - */ - private const CLEANUP_THRESHOLD = 1250; - - /** - * The buffer size after the cleanup operation. - */ - private const CLEANUP_SIZE = 1000; - - /** - * Buffers input/output of {@link canonicalize()}. - * - * @var array - */ - private static $buffer = []; - - /** - * @var int - */ - private static $bufferSize = 0; - - /** - * Canonicalizes the given path. - * - * During normalization, all slashes are replaced by forward slashes ("/"). - * Furthermore, all "." and ".." segments are removed as far as possible. - * ".." segments at the beginning of relative paths are not removed. - * - * ```php - * echo Path::canonicalize("\symfony\puli\..\css\style.css"); - * // => /symfony/css/style.css - * - * echo Path::canonicalize("../css/./style.css"); - * // => ../css/style.css - * ``` - * - * This method is able to deal with both UNIX and Windows paths. - */ - public static function canonicalize(string $path): string - { - if ('' === $path) { - return ''; - } - - // This method is called by many other methods in this class. Buffer - // the canonicalized paths to make up for the severe performance - // decrease. - if (isset(self::$buffer[$path])) { - return self::$buffer[$path]; - } - - // Replace "~" with user's home directory. - if ('~' === $path[0]) { - $path = self::getHomeDirectory().mb_substr($path, 1); - } - - $path = self::normalize($path); - - [$root, $pathWithoutRoot] = self::split($path); - - $canonicalParts = self::findCanonicalParts($root, $pathWithoutRoot); - - // Add the root directory again - self::$buffer[$path] = $canonicalPath = $root.implode('/', $canonicalParts); - ++self::$bufferSize; - - // Clean up regularly to prevent memory leaks - if (self::$bufferSize > self::CLEANUP_THRESHOLD) { - self::$buffer = \array_slice(self::$buffer, -self::CLEANUP_SIZE, null, true); - self::$bufferSize = self::CLEANUP_SIZE; - } - - return $canonicalPath; - } - - /** - * Normalizes the given path. - * - * During normalization, all slashes are replaced by forward slashes ("/"). - * Contrary to {@link canonicalize()}, this method does not remove invalid - * or dot path segments. Consequently, it is much more efficient and should - * be used whenever the given path is known to be a valid, absolute system - * path. - * - * This method is able to deal with both UNIX and Windows paths. - */ - public static function normalize(string $path): string - { - return str_replace('\\', '/', $path); - } - - /** - * Returns the directory part of the path. - * - * This method is similar to PHP's dirname(), but handles various cases - * where dirname() returns a weird result: - * - * - dirname() does not accept backslashes on UNIX - * - dirname("C:/symfony") returns "C:", not "C:/" - * - dirname("C:/") returns ".", not "C:/" - * - dirname("C:") returns ".", not "C:/" - * - dirname("symfony") returns ".", not "" - * - dirname() does not canonicalize the result - * - * This method fixes these shortcomings and behaves like dirname() - * otherwise. - * - * The result is a canonical path. - * - * @return string The canonical directory part. Returns the root directory - * if the root directory is passed. Returns an empty string - * if a relative path is passed that contains no slashes. - * Returns an empty string if an empty string is passed. - */ - public static function getDirectory(string $path): string - { - if ('' === $path) { - return ''; - } - - $path = self::canonicalize($path); - - // Maintain scheme - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $scheme = mb_substr($path, 0, $schemeSeparatorPosition + 3); - $path = mb_substr($path, $schemeSeparatorPosition + 3); - } else { - $scheme = ''; - } - - if (false === ($dirSeparatorPosition = strrpos($path, '/'))) { - return ''; - } - - // Directory equals root directory "/" - if (0 === $dirSeparatorPosition) { - return $scheme.'/'; - } - - // Directory equals Windows root "C:/" - if (2 === $dirSeparatorPosition && ctype_alpha($path[0]) && ':' === $path[1]) { - return $scheme.mb_substr($path, 0, 3); - } - - return $scheme.mb_substr($path, 0, $dirSeparatorPosition); - } - - /** - * Returns canonical path of the user's home directory. - * - * Supported operating systems: - * - * - UNIX - * - Windows8 and upper - * - * If your operating system or environment isn't supported, an exception is thrown. - * - * The result is a canonical path. - * - * @throws RuntimeException If your operating system or environment isn't supported - */ - public static function getHomeDirectory(): string - { - // For UNIX support - if (getenv('HOME')) { - return self::canonicalize(getenv('HOME')); - } - - // For >= Windows8 support - if (getenv('HOMEDRIVE') && getenv('HOMEPATH')) { - return self::canonicalize(getenv('HOMEDRIVE').getenv('HOMEPATH')); - } - - throw new RuntimeException("Cannot find the home directory path: Your environment or operating system isn't supported."); - } - - /** - * Returns the root directory of a path. - * - * The result is a canonical path. - * - * @return string The canonical root directory. Returns an empty string if - * the given path is relative or empty. - */ - public static function getRoot(string $path): string - { - if ('' === $path) { - return ''; - } - - // Maintain scheme - if (false !== ($schemeSeparatorPosition = strpos($path, '://'))) { - $scheme = substr($path, 0, $schemeSeparatorPosition + 3); - $path = substr($path, $schemeSeparatorPosition + 3); - } else { - $scheme = ''; - } - - $firstCharacter = $path[0]; - - // UNIX root "/" or "\" (Windows style) - if ('/' === $firstCharacter || '\\' === $firstCharacter) { - return $scheme.'/'; - } - - $length = mb_strlen($path); - - // Windows root - if ($length > 1 && ':' === $path[1] && ctype_alpha($firstCharacter)) { - // Special case: "C:" - if (2 === $length) { - return $scheme.$path.'/'; - } - - // Normal case: "C:/ or "C:\" - if ('/' === $path[2] || '\\' === $path[2]) { - return $scheme.$firstCharacter.$path[1].'/'; - } - } - - return ''; - } - - /** - * Returns the file name without the extension from a file path. - * - * @param string|null $extension if specified, only that extension is cut - * off (may contain leading dot) - */ - public static function getFilenameWithoutExtension(string $path, string $extension = null): string - { - if ('' === $path) { - return ''; - } - - if (null !== $extension) { - // remove extension and trailing dot - return rtrim(basename($path, $extension), '.'); - } - - return pathinfo($path, \PATHINFO_FILENAME); - } - - /** - * Returns the extension from a file path (without leading dot). - * - * @param bool $forceLowerCase forces the extension to be lower-case - */ - public static function getExtension(string $path, bool $forceLowerCase = false): string - { - if ('' === $path) { - return ''; - } - - $extension = pathinfo($path, \PATHINFO_EXTENSION); - - if ($forceLowerCase) { - $extension = self::toLower($extension); - } - - return $extension; - } - - /** - * Returns whether the path has an (or the specified) extension. - * - * @param string $path the path string - * @param string|string[]|null $extensions if null or not provided, checks if - * an extension exists, otherwise - * checks for the specified extension - * or array of extensions (with or - * without leading dot) - * @param bool $ignoreCase whether to ignore case-sensitivity - */ - public static function hasExtension(string $path, $extensions = null, bool $ignoreCase = false): bool - { - if ('' === $path) { - return false; - } - - $actualExtension = self::getExtension($path, $ignoreCase); - - // Only check if path has any extension - if ([] === $extensions || null === $extensions) { - return '' !== $actualExtension; - } - - if (\is_string($extensions)) { - $extensions = [$extensions]; - } - - foreach ($extensions as $key => $extension) { - if ($ignoreCase) { - $extension = self::toLower($extension); - } - - // remove leading '.' in extensions array - $extensions[$key] = ltrim($extension, '.'); - } - - return \in_array($actualExtension, $extensions, true); - } - - /** - * Changes the extension of a path string. - * - * @param string $path The path string with filename.ext to change. - * @param string $extension new extension (with or without leading dot) - * - * @return string the path string with new file extension - */ - public static function changeExtension(string $path, string $extension): string - { - if ('' === $path) { - return ''; - } - - $actualExtension = self::getExtension($path); - $extension = ltrim($extension, '.'); - - // No extension for paths - if ('/' === mb_substr($path, -1)) { - return $path; - } - - // No actual extension in path - if (empty($actualExtension)) { - return $path.('.' === mb_substr($path, -1) ? '' : '.').$extension; - } - - return mb_substr($path, 0, -mb_strlen($actualExtension)).$extension; - } - - public static function isAbsolute(string $path): bool - { - if ('' === $path) { - return false; - } - - // Strip scheme - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $path = mb_substr($path, $schemeSeparatorPosition + 3); - } - - $firstCharacter = $path[0]; - - // UNIX root "/" or "\" (Windows style) - if ('/' === $firstCharacter || '\\' === $firstCharacter) { - return true; - } - - // Windows root - if (mb_strlen($path) > 1 && ctype_alpha($firstCharacter) && ':' === $path[1]) { - // Special case: "C:" - if (2 === mb_strlen($path)) { - return true; - } - - // Normal case: "C:/ or "C:\" - if ('/' === $path[2] || '\\' === $path[2]) { - return true; - } - } - - return false; - } - - public static function isRelative(string $path): bool - { - return !self::isAbsolute($path); - } - - /** - * Turns a relative path into an absolute path in canonical form. - * - * Usually, the relative path is appended to the given base path. Dot - * segments ("." and "..") are removed/collapsed and all slashes turned - * into forward slashes. - * - * ```php - * echo Path::makeAbsolute("../style.css", "/symfony/puli/css"); - * // => /symfony/puli/style.css - * ``` - * - * If an absolute path is passed, that path is returned unless its root - * directory is different than the one of the base path. In that case, an - * exception is thrown. - * - * ```php - * Path::makeAbsolute("/style.css", "/symfony/puli/css"); - * // => /style.css - * - * Path::makeAbsolute("C:/style.css", "C:/symfony/puli/css"); - * // => C:/style.css - * - * Path::makeAbsolute("C:/style.css", "/symfony/puli/css"); - * // InvalidArgumentException - * ``` - * - * If the base path is not an absolute path, an exception is thrown. - * - * The result is a canonical path. - * - * @param string $basePath an absolute base path - * - * @throws InvalidArgumentException if the base path is not absolute or if - * the given path is an absolute path with - * a different root than the base path - */ - public static function makeAbsolute(string $path, string $basePath): string - { - if ('' === $basePath) { - throw new InvalidArgumentException(sprintf('The base path must be a non-empty string. Got: "%s".', $basePath)); - } - - if (!self::isAbsolute($basePath)) { - throw new InvalidArgumentException(sprintf('The base path "%s" is not an absolute path.', $basePath)); - } - - if (self::isAbsolute($path)) { - return self::canonicalize($path); - } - - if (false !== ($schemeSeparatorPosition = mb_strpos($basePath, '://'))) { - $scheme = mb_substr($basePath, 0, $schemeSeparatorPosition + 3); - $basePath = mb_substr($basePath, $schemeSeparatorPosition + 3); - } else { - $scheme = ''; - } - - return $scheme.self::canonicalize(rtrim($basePath, '/\\').'/'.$path); - } - - /** - * Turns a path into a relative path. - * - * The relative path is created relative to the given base path: - * - * ```php - * echo Path::makeRelative("/symfony/style.css", "/symfony/puli"); - * // => ../style.css - * ``` - * - * If a relative path is passed and the base path is absolute, the relative - * path is returned unchanged: - * - * ```php - * Path::makeRelative("style.css", "/symfony/puli/css"); - * // => style.css - * ``` - * - * If both paths are relative, the relative path is created with the - * assumption that both paths are relative to the same directory: - * - * ```php - * Path::makeRelative("style.css", "symfony/puli/css"); - * // => ../../../style.css - * ``` - * - * If both paths are absolute, their root directory must be the same, - * otherwise an exception is thrown: - * - * ```php - * Path::makeRelative("C:/symfony/style.css", "/symfony/puli"); - * // InvalidArgumentException - * ``` - * - * If the passed path is absolute, but the base path is not, an exception - * is thrown as well: - * - * ```php - * Path::makeRelative("/symfony/style.css", "symfony/puli"); - * // InvalidArgumentException - * ``` - * - * If the base path is not an absolute path, an exception is thrown. - * - * The result is a canonical path. - * - * @throws InvalidArgumentException if the base path is not absolute or if - * the given path has a different root - * than the base path - */ - public static function makeRelative(string $path, string $basePath): string - { - $path = self::canonicalize($path); - $basePath = self::canonicalize($basePath); - - [$root, $relativePath] = self::split($path); - [$baseRoot, $relativeBasePath] = self::split($basePath); - - // If the base path is given as absolute path and the path is already - // relative, consider it to be relative to the given absolute path - // already - if ('' === $root && '' !== $baseRoot) { - // If base path is already in its root - if ('' === $relativeBasePath) { - $relativePath = ltrim($relativePath, './\\'); - } - - return $relativePath; - } - - // If the passed path is absolute, but the base path is not, we - // cannot generate a relative path - if ('' !== $root && '' === $baseRoot) { - throw new InvalidArgumentException(sprintf('The absolute path "%s" cannot be made relative to the relative path "%s". You should provide an absolute base path instead.', $path, $basePath)); - } - - // Fail if the roots of the two paths are different - if ($baseRoot && $root !== $baseRoot) { - throw new InvalidArgumentException(sprintf('The path "%s" cannot be made relative to "%s", because they have different roots ("%s" and "%s").', $path, $basePath, $root, $baseRoot)); - } - - if ('' === $relativeBasePath) { - return $relativePath; - } - - // Build a "../../" prefix with as many "../" parts as necessary - $parts = explode('/', $relativePath); - $baseParts = explode('/', $relativeBasePath); - $dotDotPrefix = ''; - - // Once we found a non-matching part in the prefix, we need to add - // "../" parts for all remaining parts - $match = true; - - foreach ($baseParts as $index => $basePart) { - if ($match && isset($parts[$index]) && $basePart === $parts[$index]) { - unset($parts[$index]); - - continue; - } - - $match = false; - $dotDotPrefix .= '../'; - } - - return rtrim($dotDotPrefix.implode('/', $parts), '/'); - } - - /** - * Returns whether the given path is on the local filesystem. - */ - public static function isLocal(string $path): bool - { - return '' !== $path && false === mb_strpos($path, '://'); - } - - /** - * Returns the longest common base path in canonical form of a set of paths or - * `null` if the paths are on different Windows partitions. - * - * Dot segments ("." and "..") are removed/collapsed and all slashes turned - * into forward slashes. - * - * ```php - * $basePath = Path::getLongestCommonBasePath( - * '/symfony/css/style.css', - * '/symfony/css/..' - * ); - * // => /symfony - * ``` - * - * The root is returned if no common base path can be found: - * - * ```php - * $basePath = Path::getLongestCommonBasePath( - * '/symfony/css/style.css', - * '/puli/css/..' - * ); - * // => / - * ``` - * - * If the paths are located on different Windows partitions, `null` is - * returned. - * - * ```php - * $basePath = Path::getLongestCommonBasePath( - * 'C:/symfony/css/style.css', - * 'D:/symfony/css/..' - * ); - * // => null - * ``` - */ - public static function getLongestCommonBasePath(string ...$paths): ?string - { - [$bpRoot, $basePath] = self::split(self::canonicalize(reset($paths))); - - for (next($paths); null !== key($paths) && '' !== $basePath; next($paths)) { - [$root, $path] = self::split(self::canonicalize(current($paths))); - - // If we deal with different roots (e.g. C:/ vs. D:/), it's time - // to quit - if ($root !== $bpRoot) { - return null; - } - - // Make the base path shorter until it fits into path - while (true) { - if ('.' === $basePath) { - // No more base paths - $basePath = ''; - - // next path - continue 2; - } - - // Prevent false positives for common prefixes - // see isBasePath() - if (0 === mb_strpos($path.'/', $basePath.'/')) { - // next path - continue 2; - } - - $basePath = \dirname($basePath); - } - } - - return $bpRoot.$basePath; - } - - /** - * Joins two or more path strings into a canonical path. - */ - public static function join(string ...$paths): string - { - $finalPath = null; - $wasScheme = false; - - foreach ($paths as $path) { - if ('' === $path) { - continue; - } - - if (null === $finalPath) { - // For first part we keep slashes, like '/top', 'C:\' or 'phar://' - $finalPath = $path; - $wasScheme = (false !== mb_strpos($path, '://')); - continue; - } - - // Only add slash if previous part didn't end with '/' or '\' - if (!\in_array(mb_substr($finalPath, -1), ['/', '\\'])) { - $finalPath .= '/'; - } - - // If first part included a scheme like 'phar://' we allow \current part to start with '/', otherwise trim - $finalPath .= $wasScheme ? $path : ltrim($path, '/'); - $wasScheme = false; - } - - if (null === $finalPath) { - return ''; - } - - return self::canonicalize($finalPath); - } - - /** - * Returns whether a path is a base path of another path. - * - * Dot segments ("." and "..") are removed/collapsed and all slashes turned - * into forward slashes. - * - * ```php - * Path::isBasePath('/symfony', '/symfony/css'); - * // => true - * - * Path::isBasePath('/symfony', '/symfony'); - * // => true - * - * Path::isBasePath('/symfony', '/symfony/..'); - * // => false - * - * Path::isBasePath('/symfony', '/puli'); - * // => false - * ``` - */ - public static function isBasePath(string $basePath, string $ofPath): bool - { - $basePath = self::canonicalize($basePath); - $ofPath = self::canonicalize($ofPath); - - // Append slashes to prevent false positives when two paths have - // a common prefix, for example /base/foo and /base/foobar. - // Don't append a slash for the root "/", because then that root - // won't be discovered as common prefix ("//" is not a prefix of - // "/foobar/"). - return 0 === mb_strpos($ofPath.'/', rtrim($basePath, '/').'/'); - } - - /** - * @return non-empty-string[] - */ - private static function findCanonicalParts(string $root, string $pathWithoutRoot): array - { - $parts = explode('/', $pathWithoutRoot); - - $canonicalParts = []; - - // Collapse "." and "..", if possible - foreach ($parts as $part) { - if ('.' === $part || '' === $part) { - continue; - } - - // Collapse ".." with the previous part, if one exists - // Don't collapse ".." if the previous part is also ".." - if ('..' === $part && \count($canonicalParts) > 0 && '..' !== $canonicalParts[\count($canonicalParts) - 1]) { - array_pop($canonicalParts); - - continue; - } - - // Only add ".." prefixes for relative paths - if ('..' !== $part || '' === $root) { - $canonicalParts[] = $part; - } - } - - return $canonicalParts; - } - - /** - * Splits a canonical path into its root directory and the remainder. - * - * If the path has no root directory, an empty root directory will be - * returned. - * - * If the root directory is a Windows style partition, the resulting root - * will always contain a trailing slash. - * - * list ($root, $path) = Path::split("C:/symfony") - * // => ["C:/", "symfony"] - * - * list ($root, $path) = Path::split("C:") - * // => ["C:/", ""] - * - * @return array{string, string} an array with the root directory and the remaining relative path - */ - private static function split(string $path): array - { - if ('' === $path) { - return ['', '']; - } - - // Remember scheme as part of the root, if any - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $root = mb_substr($path, 0, $schemeSeparatorPosition + 3); - $path = mb_substr($path, $schemeSeparatorPosition + 3); - } else { - $root = ''; - } - - $length = mb_strlen($path); - - // Remove and remember root directory - if (0 === mb_strpos($path, '/')) { - $root .= '/'; - $path = $length > 1 ? mb_substr($path, 1) : ''; - } elseif ($length > 1 && ctype_alpha($path[0]) && ':' === $path[1]) { - if (2 === $length) { - // Windows special case: "C:" - $root .= $path.'/'; - $path = ''; - } elseif ('/' === $path[2]) { - // Windows normal case: "C:/".. - $root .= mb_substr($path, 0, 3); - $path = $length > 3 ? mb_substr($path, 3) : ''; - } - } - - return [$root, $path]; - } - - private static function toLower(string $string): string - { - if (false !== $encoding = mb_detect_encoding($string)) { - return mb_strtolower($string, $encoding); - } - - return strtolower($string, $encoding); - } - - private function __construct() - { - } -} diff --git a/lib/symfony/filesystem/README.md b/lib/symfony/filesystem/README.md deleted file mode 100644 index f2f6d45f7..000000000 --- a/lib/symfony/filesystem/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Filesystem Component -==================== - -The Filesystem component provides basic utilities for the filesystem. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/filesystem.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/filesystem/composer.json b/lib/symfony/filesystem/composer.json deleted file mode 100644 index e756104cd..000000000 --- a/lib/symfony/filesystem/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "symfony/filesystem", - "type": "library", - "description": "Provides basic utilities for the filesystem", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Filesystem\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/finder/CHANGELOG.md b/lib/symfony/finder/CHANGELOG.md deleted file mode 100644 index 6a44e87c2..000000000 --- a/lib/symfony/finder/CHANGELOG.md +++ /dev/null @@ -1,87 +0,0 @@ -CHANGELOG -========= - -5.4.0 ------ - - * Deprecate `Comparator::setTarget()` and `Comparator::setOperator()` - * Add a constructor to `Comparator` that allows setting target and operator - * Finder's iterator has now `Symfony\Component\Finder\SplFileInfo` inner type specified - * Add recursive .gitignore files support - -5.0.0 ------ - - * added `$useNaturalSort` argument to `Finder::sortByName()` - -4.3.0 ------ - - * added Finder::ignoreVCSIgnored() to ignore files based on rules listed in .gitignore - -4.2.0 ------ - - * added $useNaturalSort option to Finder::sortByName() method - * the `Finder::sortByName()` method will have a new `$useNaturalSort` - argument in version 5.0, not defining it is deprecated - * added `Finder::reverseSorting()` to reverse the sorting - -4.0.0 ------ - - * removed `ExceptionInterface` - * removed `Symfony\Component\Finder\Iterator\FilterIterator` - -3.4.0 ------ - - * deprecated `Symfony\Component\Finder\Iterator\FilterIterator` - * added Finder::hasResults() method to check if any results were found - -3.3.0 ------ - - * added double-star matching to Glob::toRegex() - -3.0.0 ------ - - * removed deprecated classes - -2.8.0 ------ - - * deprecated adapters and related classes - -2.5.0 ------ - * added support for GLOB_BRACE in the paths passed to Finder::in() - -2.3.0 ------ - - * added a way to ignore unreadable directories (via Finder::ignoreUnreadableDirs()) - * unified the way subfolders that are not executable are handled by always throwing an AccessDeniedException exception - -2.2.0 ------ - - * added Finder::path() and Finder::notPath() methods - * added finder adapters to improve performance on specific platforms - * added support for wildcard characters (glob patterns) in the paths passed - to Finder::in() - -2.1.0 ------ - - * added Finder::sortByAccessedTime(), Finder::sortByChangedTime(), and - Finder::sortByModifiedTime() - * added Countable to Finder - * added support for an array of directories as an argument to - Finder::exclude() - * added searching based on the file content via Finder::contains() and - Finder::notContains() - * added support for the != operator in the Comparator - * [BC BREAK] filter expressions (used for file name and content) are no more - considered as regexps but glob patterns when they are enclosed in '*' or '?' diff --git a/lib/symfony/finder/Comparator/Comparator.php b/lib/symfony/finder/Comparator/Comparator.php deleted file mode 100644 index 3af551f4c..000000000 --- a/lib/symfony/finder/Comparator/Comparator.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Comparator; - -/** - * @author Fabien Potencier - */ -class Comparator -{ - private $target; - private $operator = '=='; - - public function __construct(string $target = null, string $operator = '==') - { - if (null === $target) { - trigger_deprecation('symfony/finder', '5.4', 'Constructing a "%s" without setting "$target" is deprecated.', __CLASS__); - } - - $this->target = $target; - $this->doSetOperator($operator); - } - - /** - * Gets the target value. - * - * @return string - */ - public function getTarget() - { - if (null === $this->target) { - trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__); - } - - return $this->target; - } - - /** - * @deprecated set the target via the constructor instead - */ - public function setTarget(string $target) - { - trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the target via the constructor instead.', __METHOD__); - - $this->target = $target; - } - - /** - * Gets the comparison operator. - * - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Sets the comparison operator. - * - * @throws \InvalidArgumentException - * - * @deprecated set the operator via the constructor instead - */ - public function setOperator(string $operator) - { - trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the operator via the constructor instead.', __METHOD__); - - $this->doSetOperator('' === $operator ? '==' : $operator); - } - - /** - * Tests against the target. - * - * @param mixed $test A test value - * - * @return bool - */ - public function test($test) - { - if (null === $this->target) { - trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__); - } - - switch ($this->operator) { - case '>': - return $test > $this->target; - case '>=': - return $test >= $this->target; - case '<': - return $test < $this->target; - case '<=': - return $test <= $this->target; - case '!=': - return $test != $this->target; - } - - return $test == $this->target; - } - - private function doSetOperator(string $operator): void - { - if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) { - throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator)); - } - - $this->operator = $operator; - } -} diff --git a/lib/symfony/finder/Comparator/DateComparator.php b/lib/symfony/finder/Comparator/DateComparator.php deleted file mode 100644 index 8f651e148..000000000 --- a/lib/symfony/finder/Comparator/DateComparator.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Comparator; - -/** - * DateCompare compiles date comparisons. - * - * @author Fabien Potencier - */ -class DateComparator extends Comparator -{ - /** - * @param string $test A comparison string - * - * @throws \InvalidArgumentException If the test is not understood - */ - public function __construct(string $test) - { - if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) { - throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test)); - } - - try { - $date = new \DateTime($matches[2]); - $target = $date->format('U'); - } catch (\Exception $e) { - throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2])); - } - - $operator = $matches[1] ?? '=='; - if ('since' === $operator || 'after' === $operator) { - $operator = '>'; - } - - if ('until' === $operator || 'before' === $operator) { - $operator = '<'; - } - - parent::__construct($target, $operator); - } -} diff --git a/lib/symfony/finder/Comparator/NumberComparator.php b/lib/symfony/finder/Comparator/NumberComparator.php deleted file mode 100644 index ff85d9677..000000000 --- a/lib/symfony/finder/Comparator/NumberComparator.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Comparator; - -/** - * NumberComparator compiles a simple comparison to an anonymous - * subroutine, which you can call with a value to be tested again. - * - * Now this would be very pointless, if NumberCompare didn't understand - * magnitudes. - * - * The target value may use magnitudes of kilobytes (k, ki), - * megabytes (m, mi), or gigabytes (g, gi). Those suffixed - * with an i use the appropriate 2**n version in accordance with the - * IEC standard: http://physics.nist.gov/cuu/Units/binary.html - * - * Based on the Perl Number::Compare module. - * - * @author Fabien Potencier PHP port - * @author Richard Clamp Perl version - * @copyright 2004-2005 Fabien Potencier - * @copyright 2002 Richard Clamp - * - * @see http://physics.nist.gov/cuu/Units/binary.html - */ -class NumberComparator extends Comparator -{ - /** - * @param string|int $test A comparison string or an integer - * - * @throws \InvalidArgumentException If the test is not understood - */ - public function __construct(?string $test) - { - if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) { - throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null')); - } - - $target = $matches[2]; - if (!is_numeric($target)) { - throw new \InvalidArgumentException(sprintf('Invalid number "%s".', $target)); - } - if (isset($matches[3])) { - // magnitude - switch (strtolower($matches[3])) { - case 'k': - $target *= 1000; - break; - case 'ki': - $target *= 1024; - break; - case 'm': - $target *= 1000000; - break; - case 'mi': - $target *= 1024 * 1024; - break; - case 'g': - $target *= 1000000000; - break; - case 'gi': - $target *= 1024 * 1024 * 1024; - break; - } - } - - parent::__construct($target, $matches[1] ?: '=='); - } -} diff --git a/lib/symfony/finder/Exception/AccessDeniedException.php b/lib/symfony/finder/Exception/AccessDeniedException.php deleted file mode 100644 index ee195ea8d..000000000 --- a/lib/symfony/finder/Exception/AccessDeniedException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -/** - * @author Jean-François Simon - */ -class AccessDeniedException extends \UnexpectedValueException -{ -} diff --git a/lib/symfony/finder/Exception/DirectoryNotFoundException.php b/lib/symfony/finder/Exception/DirectoryNotFoundException.php deleted file mode 100644 index c6cc0f273..000000000 --- a/lib/symfony/finder/Exception/DirectoryNotFoundException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -/** - * @author Andreas Erhard - */ -class DirectoryNotFoundException extends \InvalidArgumentException -{ -} diff --git a/lib/symfony/finder/Finder.php b/lib/symfony/finder/Finder.php deleted file mode 100644 index 8cc564cd6..000000000 --- a/lib/symfony/finder/Finder.php +++ /dev/null @@ -1,806 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -use Symfony\Component\Finder\Comparator\DateComparator; -use Symfony\Component\Finder\Comparator\NumberComparator; -use Symfony\Component\Finder\Exception\DirectoryNotFoundException; -use Symfony\Component\Finder\Iterator\CustomFilterIterator; -use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; -use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; -use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator; -use Symfony\Component\Finder\Iterator\FilecontentFilterIterator; -use Symfony\Component\Finder\Iterator\FilenameFilterIterator; -use Symfony\Component\Finder\Iterator\LazyIterator; -use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; -use Symfony\Component\Finder\Iterator\SortableIterator; - -/** - * Finder allows to build rules to find files and directories. - * - * It is a thin wrapper around several specialized iterator classes. - * - * All rules may be invoked several times. - * - * All methods return the current Finder object to allow chaining: - * - * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate - */ -class Finder implements \IteratorAggregate, \Countable -{ - public const IGNORE_VCS_FILES = 1; - public const IGNORE_DOT_FILES = 2; - public const IGNORE_VCS_IGNORED_FILES = 4; - - private $mode = 0; - private $names = []; - private $notNames = []; - private $exclude = []; - private $filters = []; - private $depths = []; - private $sizes = []; - private $followLinks = false; - private $reverseSorting = false; - private $sort = false; - private $ignore = 0; - private $dirs = []; - private $dates = []; - private $iterators = []; - private $contains = []; - private $notContains = []; - private $paths = []; - private $notPaths = []; - private $ignoreUnreadableDirs = false; - - private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg']; - - public function __construct() - { - $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES; - } - - /** - * Creates a new Finder. - * - * @return static - */ - public static function create() - { - return new static(); - } - - /** - * Restricts the matching to directories only. - * - * @return $this - */ - public function directories() - { - $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES; - - return $this; - } - - /** - * Restricts the matching to files only. - * - * @return $this - */ - public function files() - { - $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES; - - return $this; - } - - /** - * Adds tests for the directory depth. - * - * Usage: - * - * $finder->depth('> 1') // the Finder will start matching at level 1. - * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. - * $finder->depth(['>= 1', '< 3']) - * - * @param string|int|string[]|int[] $levels The depth level expression or an array of depth levels - * - * @return $this - * - * @see DepthRangeFilterIterator - * @see NumberComparator - */ - public function depth($levels) - { - foreach ((array) $levels as $level) { - $this->depths[] = new Comparator\NumberComparator($level); - } - - return $this; - } - - /** - * Adds tests for file dates (last modified). - * - * The date must be something that strtotime() is able to parse: - * - * $finder->date('since yesterday'); - * $finder->date('until 2 days ago'); - * $finder->date('> now - 2 hours'); - * $finder->date('>= 2005-10-15'); - * $finder->date(['>= 2005-10-15', '<= 2006-05-27']); - * - * @param string|string[] $dates A date range string or an array of date ranges - * - * @return $this - * - * @see strtotime - * @see DateRangeFilterIterator - * @see DateComparator - */ - public function date($dates) - { - foreach ((array) $dates as $date) { - $this->dates[] = new Comparator\DateComparator($date); - } - - return $this; - } - - /** - * Adds rules that files must match. - * - * You can use patterns (delimited with / sign), globs or simple strings. - * - * $finder->name('*.php') - * $finder->name('/\.php$/') // same as above - * $finder->name('test.php') - * $finder->name(['test.py', 'test.php']) - * - * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function name($patterns) - { - $this->names = array_merge($this->names, (array) $patterns); - - return $this; - } - - /** - * Adds rules that files must not match. - * - * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function notName($patterns) - { - $this->notNames = array_merge($this->notNames, (array) $patterns); - - return $this; - } - - /** - * Adds tests that file contents must match. - * - * Strings or PCRE patterns can be used: - * - * $finder->contains('Lorem ipsum') - * $finder->contains('/Lorem ipsum/i') - * $finder->contains(['dolor', '/ipsum/i']) - * - * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns - * - * @return $this - * - * @see FilecontentFilterIterator - */ - public function contains($patterns) - { - $this->contains = array_merge($this->contains, (array) $patterns); - - return $this; - } - - /** - * Adds tests that file contents must not match. - * - * Strings or PCRE patterns can be used: - * - * $finder->notContains('Lorem ipsum') - * $finder->notContains('/Lorem ipsum/i') - * $finder->notContains(['lorem', '/dolor/i']) - * - * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns - * - * @return $this - * - * @see FilecontentFilterIterator - */ - public function notContains($patterns) - { - $this->notContains = array_merge($this->notContains, (array) $patterns); - - return $this; - } - - /** - * Adds rules that filenames must match. - * - * You can use patterns (delimited with / sign) or simple strings. - * - * $finder->path('some/special/dir') - * $finder->path('/some\/special\/dir/') // same as above - * $finder->path(['some dir', 'another/dir']) - * - * Use only / as dirname separator. - * - * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function path($patterns) - { - $this->paths = array_merge($this->paths, (array) $patterns); - - return $this; - } - - /** - * Adds rules that filenames must not match. - * - * You can use patterns (delimited with / sign) or simple strings. - * - * $finder->notPath('some/special/dir') - * $finder->notPath('/some\/special\/dir/') // same as above - * $finder->notPath(['some/file.txt', 'another/file.log']) - * - * Use only / as dirname separator. - * - * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function notPath($patterns) - { - $this->notPaths = array_merge($this->notPaths, (array) $patterns); - - return $this; - } - - /** - * Adds tests for file sizes. - * - * $finder->size('> 10K'); - * $finder->size('<= 1Ki'); - * $finder->size(4); - * $finder->size(['> 10K', '< 20K']) - * - * @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges - * - * @return $this - * - * @see SizeRangeFilterIterator - * @see NumberComparator - */ - public function size($sizes) - { - foreach ((array) $sizes as $size) { - $this->sizes[] = new Comparator\NumberComparator($size); - } - - return $this; - } - - /** - * Excludes directories. - * - * Directories passed as argument must be relative to the ones defined with the `in()` method. For example: - * - * $finder->in(__DIR__)->exclude('ruby'); - * - * @param string|array $dirs A directory path or an array of directories - * - * @return $this - * - * @see ExcludeDirectoryFilterIterator - */ - public function exclude($dirs) - { - $this->exclude = array_merge($this->exclude, (array) $dirs); - - return $this; - } - - /** - * Excludes "hidden" directories and files (starting with a dot). - * - * This option is enabled by default. - * - * @return $this - * - * @see ExcludeDirectoryFilterIterator - */ - public function ignoreDotFiles(bool $ignoreDotFiles) - { - if ($ignoreDotFiles) { - $this->ignore |= static::IGNORE_DOT_FILES; - } else { - $this->ignore &= ~static::IGNORE_DOT_FILES; - } - - return $this; - } - - /** - * Forces the finder to ignore version control directories. - * - * This option is enabled by default. - * - * @return $this - * - * @see ExcludeDirectoryFilterIterator - */ - public function ignoreVCS(bool $ignoreVCS) - { - if ($ignoreVCS) { - $this->ignore |= static::IGNORE_VCS_FILES; - } else { - $this->ignore &= ~static::IGNORE_VCS_FILES; - } - - return $this; - } - - /** - * Forces Finder to obey .gitignore and ignore files based on rules listed there. - * - * This option is disabled by default. - * - * @return $this - */ - public function ignoreVCSIgnored(bool $ignoreVCSIgnored) - { - if ($ignoreVCSIgnored) { - $this->ignore |= static::IGNORE_VCS_IGNORED_FILES; - } else { - $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES; - } - - return $this; - } - - /** - * Adds VCS patterns. - * - * @see ignoreVCS() - * - * @param string|string[] $pattern VCS patterns to ignore - */ - public static function addVCSPattern($pattern) - { - foreach ((array) $pattern as $p) { - self::$vcsPatterns[] = $p; - } - - self::$vcsPatterns = array_unique(self::$vcsPatterns); - } - - /** - * Sorts files and directories by an anonymous function. - * - * The anonymous function receives two \SplFileInfo instances to compare. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sort(\Closure $closure) - { - $this->sort = $closure; - - return $this; - } - - /** - * Sorts files and directories by name. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByName(bool $useNaturalSort = false) - { - $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME; - - return $this; - } - - /** - * Sorts files and directories by type (directories before files), then by name. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByType() - { - $this->sort = Iterator\SortableIterator::SORT_BY_TYPE; - - return $this; - } - - /** - * Sorts files and directories by the last accessed time. - * - * This is the time that the file was last accessed, read or written to. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByAccessedTime() - { - $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME; - - return $this; - } - - /** - * Reverses the sorting. - * - * @return $this - */ - public function reverseSorting() - { - $this->reverseSorting = true; - - return $this; - } - - /** - * Sorts files and directories by the last inode changed time. - * - * This is the time that the inode information was last modified (permissions, owner, group or other metadata). - * - * On Windows, since inode is not available, changed time is actually the file creation time. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByChangedTime() - { - $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME; - - return $this; - } - - /** - * Sorts files and directories by the last modified time. - * - * This is the last time the actual contents of the file were last modified. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByModifiedTime() - { - $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME; - - return $this; - } - - /** - * Filters the iterator with an anonymous function. - * - * The anonymous function receives a \SplFileInfo and must return false - * to remove files. - * - * @return $this - * - * @see CustomFilterIterator - */ - public function filter(\Closure $closure) - { - $this->filters[] = $closure; - - return $this; - } - - /** - * Forces the following of symlinks. - * - * @return $this - */ - public function followLinks() - { - $this->followLinks = true; - - return $this; - } - - /** - * Tells finder to ignore unreadable directories. - * - * By default, scanning unreadable directories content throws an AccessDeniedException. - * - * @return $this - */ - public function ignoreUnreadableDirs(bool $ignore = true) - { - $this->ignoreUnreadableDirs = $ignore; - - return $this; - } - - /** - * Searches files and directories which match defined rules. - * - * @param string|string[] $dirs A directory path or an array of directories - * - * @return $this - * - * @throws DirectoryNotFoundException if one of the directories does not exist - */ - public function in($dirs) - { - $resolvedDirs = []; - - foreach ((array) $dirs as $dir) { - if (is_dir($dir)) { - $resolvedDirs[] = [$this->normalizeDir($dir)]; - } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) { - sort($glob); - $resolvedDirs[] = array_map([$this, 'normalizeDir'], $glob); - } else { - throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir)); - } - } - - $this->dirs = array_merge($this->dirs, ...$resolvedDirs); - - return $this; - } - - /** - * Returns an Iterator for the current Finder configuration. - * - * This method implements the IteratorAggregate interface. - * - * @return \Iterator - * - * @throws \LogicException if the in() method has not been called - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (0 === \count($this->dirs) && 0 === \count($this->iterators)) { - throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.'); - } - - if (1 === \count($this->dirs) && 0 === \count($this->iterators)) { - $iterator = $this->searchInDirectory($this->dirs[0]); - - if ($this->sort || $this->reverseSorting) { - $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); - } - - return $iterator; - } - - $iterator = new \AppendIterator(); - foreach ($this->dirs as $dir) { - $iterator->append(new \IteratorIterator(new LazyIterator(function () use ($dir) { - return $this->searchInDirectory($dir); - }))); - } - - foreach ($this->iterators as $it) { - $iterator->append($it); - } - - if ($this->sort || $this->reverseSorting) { - $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); - } - - return $iterator; - } - - /** - * Appends an existing set of files/directories to the finder. - * - * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. - * - * @return $this - * - * @throws \InvalidArgumentException when the given argument is not iterable - */ - public function append(iterable $iterator) - { - if ($iterator instanceof \IteratorAggregate) { - $this->iterators[] = $iterator->getIterator(); - } elseif ($iterator instanceof \Iterator) { - $this->iterators[] = $iterator; - } elseif (is_iterable($iterator)) { - $it = new \ArrayIterator(); - foreach ($iterator as $file) { - $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file); - $it[$file->getPathname()] = $file; - } - $this->iterators[] = $it; - } else { - throw new \InvalidArgumentException('Finder::append() method wrong argument type.'); - } - - return $this; - } - - /** - * Check if any results were found. - * - * @return bool - */ - public function hasResults() - { - foreach ($this->getIterator() as $_) { - return true; - } - - return false; - } - - /** - * Counts all the results collected by the iterators. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return iterator_count($this->getIterator()); - } - - private function searchInDirectory(string $dir): \Iterator - { - $exclude = $this->exclude; - $notPaths = $this->notPaths; - - if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { - $exclude = array_merge($exclude, self::$vcsPatterns); - } - - if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { - $notPaths[] = '#(^|/)\..+(/|$)#'; - } - - $minDepth = 0; - $maxDepth = \PHP_INT_MAX; - - foreach ($this->depths as $comparator) { - switch ($comparator->getOperator()) { - case '>': - $minDepth = $comparator->getTarget() + 1; - break; - case '>=': - $minDepth = $comparator->getTarget(); - break; - case '<': - $maxDepth = $comparator->getTarget() - 1; - break; - case '<=': - $maxDepth = $comparator->getTarget(); - break; - default: - $minDepth = $maxDepth = $comparator->getTarget(); - } - } - - $flags = \RecursiveDirectoryIterator::SKIP_DOTS; - - if ($this->followLinks) { - $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; - } - - $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs); - - if ($exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude); - } - - $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); - - if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) { - $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth); - } - - if ($this->mode) { - $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); - } - - if ($this->names || $this->notNames) { - $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames); - } - - if ($this->contains || $this->notContains) { - $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); - } - - if ($this->sizes) { - $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes); - } - - if ($this->dates) { - $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates); - } - - if ($this->filters) { - $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); - } - - if ($this->paths || $notPaths) { - $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths); - } - - if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) { - $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir); - } - - return $iterator; - } - - /** - * Normalizes given directory names by removing trailing slashes. - * - * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper - */ - private function normalizeDir(string $dir): string - { - if ('/' === $dir) { - return $dir; - } - - $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); - - if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) { - $dir .= '/'; - } - - return $dir; - } -} diff --git a/lib/symfony/finder/Gitignore.php b/lib/symfony/finder/Gitignore.php deleted file mode 100644 index d42cca1dc..000000000 --- a/lib/symfony/finder/Gitignore.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -/** - * Gitignore matches against text. - * - * @author Michael Voříšek - * @author Ahmed Abdou - */ -class Gitignore -{ - /** - * Returns a regexp which is the equivalent of the gitignore pattern. - * - * Format specification: https://git-scm.com/docs/gitignore#_pattern_format - */ - public static function toRegex(string $gitignoreFileContent): string - { - return self::buildRegex($gitignoreFileContent, false); - } - - public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string - { - return self::buildRegex($gitignoreFileContent, true); - } - - private static function buildRegex(string $gitignoreFileContent, bool $inverted): string - { - $gitignoreFileContent = preg_replace('~(? - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -/** - * Glob matches globbing patterns against text. - * - * if match_glob("foo.*", "foo.bar") echo "matched\n"; - * - * // prints foo.bar and foo.baz - * $regex = glob_to_regex("foo.*"); - * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t) - * { - * if (/$regex/) echo "matched: $car\n"; - * } - * - * Glob implements glob(3) style matching that can be used to match - * against text, rather than fetching names from a filesystem. - * - * Based on the Perl Text::Glob module. - * - * @author Fabien Potencier PHP port - * @author Richard Clamp Perl version - * @copyright 2004-2005 Fabien Potencier - * @copyright 2002 Richard Clamp - */ -class Glob -{ - /** - * Returns a regexp which is the equivalent of the glob pattern. - * - * @return string - */ - public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#') - { - $firstByte = true; - $escaping = false; - $inCurlies = 0; - $regex = ''; - $sizeGlob = \strlen($glob); - for ($i = 0; $i < $sizeGlob; ++$i) { - $car = $glob[$i]; - if ($firstByte && $strictLeadingDot && '.' !== $car) { - $regex .= '(?=[^\.])'; - } - - $firstByte = '/' === $car; - - if ($firstByte && $strictWildcardSlash && isset($glob[$i + 2]) && '**' === $glob[$i + 1].$glob[$i + 2] && (!isset($glob[$i + 3]) || '/' === $glob[$i + 3])) { - $car = '[^/]++/'; - if (!isset($glob[$i + 3])) { - $car .= '?'; - } - - if ($strictLeadingDot) { - $car = '(?=[^\.])'.$car; - } - - $car = '/(?:'.$car.')*'; - $i += 2 + isset($glob[$i + 3]); - - if ('/' === $delimiter) { - $car = str_replace('/', '\\/', $car); - } - } - - if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) { - $regex .= "\\$car"; - } elseif ('*' === $car) { - $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*'); - } elseif ('?' === $car) { - $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.'); - } elseif ('{' === $car) { - $regex .= $escaping ? '\\{' : '('; - if (!$escaping) { - ++$inCurlies; - } - } elseif ('}' === $car && $inCurlies) { - $regex .= $escaping ? '}' : ')'; - if (!$escaping) { - --$inCurlies; - } - } elseif (',' === $car && $inCurlies) { - $regex .= $escaping ? ',' : '|'; - } elseif ('\\' === $car) { - if ($escaping) { - $regex .= '\\\\'; - $escaping = false; - } else { - $escaping = true; - } - - continue; - } else { - $regex .= $car; - } - $escaping = false; - } - - return $delimiter.'^'.$regex.'$'.$delimiter; - } -} diff --git a/lib/symfony/finder/Iterator/CustomFilterIterator.php b/lib/symfony/finder/Iterator/CustomFilterIterator.php deleted file mode 100644 index f7bf19b87..000000000 --- a/lib/symfony/finder/Iterator/CustomFilterIterator.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * CustomFilterIterator filters files by applying anonymous functions. - * - * The anonymous function receives a \SplFileInfo and must return false - * to remove files. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class CustomFilterIterator extends \FilterIterator -{ - private $filters = []; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param callable[] $filters An array of PHP callbacks - * - * @throws \InvalidArgumentException - */ - public function __construct(\Iterator $iterator, array $filters) - { - foreach ($filters as $filter) { - if (!\is_callable($filter)) { - throw new \InvalidArgumentException('Invalid PHP callback.'); - } - } - $this->filters = $filters; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - - foreach ($this->filters as $filter) { - if (false === $filter($fileinfo)) { - return false; - } - } - - return true; - } -} diff --git a/lib/symfony/finder/Iterator/DateRangeFilterIterator.php b/lib/symfony/finder/Iterator/DateRangeFilterIterator.php deleted file mode 100644 index f592e1913..000000000 --- a/lib/symfony/finder/Iterator/DateRangeFilterIterator.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Comparator\DateComparator; - -/** - * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates). - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class DateRangeFilterIterator extends \FilterIterator -{ - private $comparators = []; - - /** - * @param \Iterator $iterator - * @param DateComparator[] $comparators - */ - public function __construct(\Iterator $iterator, array $comparators) - { - $this->comparators = $comparators; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - - if (!file_exists($fileinfo->getPathname())) { - return false; - } - - $filedate = $fileinfo->getMTime(); - foreach ($this->comparators as $compare) { - if (!$compare->test($filedate)) { - return false; - } - } - - return true; - } -} diff --git a/lib/symfony/finder/Iterator/DepthRangeFilterIterator.php b/lib/symfony/finder/Iterator/DepthRangeFilterIterator.php deleted file mode 100644 index f593a3f08..000000000 --- a/lib/symfony/finder/Iterator/DepthRangeFilterIterator.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * DepthRangeFilterIterator limits the directory depth. - * - * @author Fabien Potencier - * - * @template-covariant TKey - * @template-covariant TValue - * - * @extends \FilterIterator - */ -class DepthRangeFilterIterator extends \FilterIterator -{ - private $minDepth = 0; - - /** - * @param \RecursiveIteratorIterator<\RecursiveIterator> $iterator The Iterator to filter - * @param int $minDepth The min depth - * @param int $maxDepth The max depth - */ - public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = \PHP_INT_MAX) - { - $this->minDepth = $minDepth; - $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth); - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - return $this->getInnerIterator()->getDepth() >= $this->minDepth; - } -} diff --git a/lib/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/lib/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php deleted file mode 100644 index d9e182c17..000000000 --- a/lib/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * ExcludeDirectoryFilterIterator filters out directories. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - * @implements \RecursiveIterator - */ -class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator -{ - private $iterator; - private $isRecursive; - private $excludedDirs = []; - private $excludedPattern; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param string[] $directories An array of directories to exclude - */ - public function __construct(\Iterator $iterator, array $directories) - { - $this->iterator = $iterator; - $this->isRecursive = $iterator instanceof \RecursiveIterator; - $patterns = []; - foreach ($directories as $directory) { - $directory = rtrim($directory, '/'); - if (!$this->isRecursive || str_contains($directory, '/')) { - $patterns[] = preg_quote($directory, '#'); - } else { - $this->excludedDirs[$directory] = true; - } - } - if ($patterns) { - $this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#'; - } - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) { - return false; - } - - if ($this->excludedPattern) { - $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath(); - $path = str_replace('\\', '/', $path); - - return !preg_match($this->excludedPattern, $path); - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren() - { - return $this->isRecursive && $this->iterator->hasChildren(); - } - - /** - * @return self - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - $children = new self($this->iterator->getChildren(), []); - $children->excludedDirs = $this->excludedDirs; - $children->excludedPattern = $this->excludedPattern; - - return $children; - } -} diff --git a/lib/symfony/finder/Iterator/FileTypeFilterIterator.php b/lib/symfony/finder/Iterator/FileTypeFilterIterator.php deleted file mode 100644 index 793ae3509..000000000 --- a/lib/symfony/finder/Iterator/FileTypeFilterIterator.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * FileTypeFilterIterator only keeps files, directories, or both. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class FileTypeFilterIterator extends \FilterIterator -{ - public const ONLY_FILES = 1; - public const ONLY_DIRECTORIES = 2; - - private $mode; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) - */ - public function __construct(\Iterator $iterator, int $mode) - { - $this->mode = $mode; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) { - return false; - } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) { - return false; - } - - return true; - } -} diff --git a/lib/symfony/finder/Iterator/FilecontentFilterIterator.php b/lib/symfony/finder/Iterator/FilecontentFilterIterator.php deleted file mode 100644 index 79f8c29d3..000000000 --- a/lib/symfony/finder/Iterator/FilecontentFilterIterator.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings). - * - * @author Fabien Potencier - * @author Włodzimierz Gajda - * - * @extends MultiplePcreFilterIterator - */ -class FilecontentFilterIterator extends MultiplePcreFilterIterator -{ - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - if (!$this->matchRegexps && !$this->noMatchRegexps) { - return true; - } - - $fileinfo = $this->current(); - - if ($fileinfo->isDir() || !$fileinfo->isReadable()) { - return false; - } - - $content = $fileinfo->getContents(); - if (!$content) { - return false; - } - - return $this->isAccepted($content); - } - - /** - * Converts string to regexp if necessary. - * - * @param string $str Pattern: string or regexp - * - * @return string - */ - protected function toRegex(string $str) - { - return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; - } -} diff --git a/lib/symfony/finder/Iterator/FilenameFilterIterator.php b/lib/symfony/finder/Iterator/FilenameFilterIterator.php deleted file mode 100644 index 77b3b2419..000000000 --- a/lib/symfony/finder/Iterator/FilenameFilterIterator.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Glob; - -/** - * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string). - * - * @author Fabien Potencier - * - * @extends MultiplePcreFilterIterator - */ -class FilenameFilterIterator extends MultiplePcreFilterIterator -{ - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - return $this->isAccepted($this->current()->getFilename()); - } - - /** - * Converts glob to regexp. - * - * PCRE patterns are left unchanged. - * Glob strings are transformed with Glob::toRegex(). - * - * @param string $str Pattern: glob or regexp - * - * @return string - */ - protected function toRegex(string $str) - { - return $this->isRegex($str) ? $str : Glob::toRegex($str); - } -} diff --git a/lib/symfony/finder/Iterator/LazyIterator.php b/lib/symfony/finder/Iterator/LazyIterator.php deleted file mode 100644 index 32cc37ff1..000000000 --- a/lib/symfony/finder/Iterator/LazyIterator.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * @author Jérémy Derussé - * - * @internal - */ -class LazyIterator implements \IteratorAggregate -{ - private $iteratorFactory; - - public function __construct(callable $iteratorFactory) - { - $this->iteratorFactory = $iteratorFactory; - } - - public function getIterator(): \Traversable - { - yield from ($this->iteratorFactory)(); - } -} diff --git a/lib/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/lib/symfony/finder/Iterator/MultiplePcreFilterIterator.php deleted file mode 100644 index 564765d8f..000000000 --- a/lib/symfony/finder/Iterator/MultiplePcreFilterIterator.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings). - * - * @author Fabien Potencier - * - * @template-covariant TKey - * @template-covariant TValue - * - * @extends \FilterIterator - */ -abstract class MultiplePcreFilterIterator extends \FilterIterator -{ - protected $matchRegexps = []; - protected $noMatchRegexps = []; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param string[] $matchPatterns An array of patterns that need to match - * @param string[] $noMatchPatterns An array of patterns that need to not match - */ - public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns) - { - foreach ($matchPatterns as $pattern) { - $this->matchRegexps[] = $this->toRegex($pattern); - } - - foreach ($noMatchPatterns as $pattern) { - $this->noMatchRegexps[] = $this->toRegex($pattern); - } - - parent::__construct($iterator); - } - - /** - * Checks whether the string is accepted by the regex filters. - * - * If there is no regexps defined in the class, this method will accept the string. - * Such case can be handled by child classes before calling the method if they want to - * apply a different behavior. - * - * @return bool - */ - protected function isAccepted(string $string) - { - // should at least not match one rule to exclude - foreach ($this->noMatchRegexps as $regex) { - if (preg_match($regex, $string)) { - return false; - } - } - - // should at least match one rule - if ($this->matchRegexps) { - foreach ($this->matchRegexps as $regex) { - if (preg_match($regex, $string)) { - return true; - } - } - - return false; - } - - // If there is no match rules, the file is accepted - return true; - } - - /** - * Checks whether the string is a regex. - * - * @return bool - */ - protected function isRegex(string $str) - { - $availableModifiers = 'imsxuADU'; - - if (\PHP_VERSION_ID >= 80200) { - $availableModifiers .= 'n'; - } - - if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) { - $start = substr($m[1], 0, 1); - $end = substr($m[1], -1); - - if ($start === $end) { - return !preg_match('/[*?[:alnum:] \\\\]/', $start); - } - - foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) { - if ($start === $delimiters[0] && $end === $delimiters[1]) { - return true; - } - } - } - - return false; - } - - /** - * Converts string into regexp. - * - * @return string - */ - abstract protected function toRegex(string $str); -} diff --git a/lib/symfony/finder/Iterator/PathFilterIterator.php b/lib/symfony/finder/Iterator/PathFilterIterator.php deleted file mode 100644 index 7974c4ee3..000000000 --- a/lib/symfony/finder/Iterator/PathFilterIterator.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * PathFilterIterator filters files by path patterns (e.g. some/special/dir). - * - * @author Fabien Potencier - * @author Włodzimierz Gajda - * - * @extends MultiplePcreFilterIterator - */ -class PathFilterIterator extends MultiplePcreFilterIterator -{ - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $filename = $this->current()->getRelativePathname(); - - if ('\\' === \DIRECTORY_SEPARATOR) { - $filename = str_replace('\\', '/', $filename); - } - - return $this->isAccepted($filename); - } - - /** - * Converts strings to regexp. - * - * PCRE patterns are left unchanged. - * - * Default conversion: - * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' - * - * Use only / as directory separator (on Windows also). - * - * @param string $str Pattern: regexp or dirname - * - * @return string - */ - protected function toRegex(string $str) - { - return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; - } -} diff --git a/lib/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/lib/symfony/finder/Iterator/RecursiveDirectoryIterator.php deleted file mode 100644 index 27589cdd5..000000000 --- a/lib/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Exception\AccessDeniedException; -use Symfony\Component\Finder\SplFileInfo; - -/** - * Extends the \RecursiveDirectoryIterator to support relative paths. - * - * @author Victor Berchet - */ -class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator -{ - /** - * @var bool - */ - private $ignoreUnreadableDirs; - - /** - * @var bool - */ - private $rewindable; - - // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations - private $rootPath; - private $subPath; - private $directorySeparator = '/'; - - /** - * @throws \RuntimeException - */ - public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false) - { - if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) { - throw new \RuntimeException('This iterator only support returning current as fileinfo.'); - } - - parent::__construct($path, $flags); - $this->ignoreUnreadableDirs = $ignoreUnreadableDirs; - $this->rootPath = $path; - if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) { - $this->directorySeparator = \DIRECTORY_SEPARATOR; - } - } - - /** - * Return an instance of SplFileInfo with support for relative paths. - * - * @return SplFileInfo - */ - #[\ReturnTypeWillChange] - public function current() - { - // the logic here avoids redoing the same work in all iterations - - if (null === $subPathname = $this->subPath) { - $subPathname = $this->subPath = $this->getSubPath(); - } - if ('' !== $subPathname) { - $subPathname .= $this->directorySeparator; - } - $subPathname .= $this->getFilename(); - - if ('/' !== $basePath = $this->rootPath) { - $basePath .= $this->directorySeparator; - } - - return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname); - } - - /** - * @param bool $allowLinks - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren($allowLinks = false) - { - $hasChildren = parent::hasChildren($allowLinks); - - if (!$hasChildren || !$this->ignoreUnreadableDirs) { - return $hasChildren; - } - - try { - parent::getChildren(); - - return true; - } catch (\UnexpectedValueException $e) { - // If directory is unreadable and finder is set to ignore it, skip children - return false; - } - } - - /** - * @return \RecursiveDirectoryIterator - * - * @throws AccessDeniedException - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - try { - $children = parent::getChildren(); - - if ($children instanceof self) { - // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore - $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs; - - // performance optimization to avoid redoing the same work in all children - $children->rewindable = &$this->rewindable; - $children->rootPath = $this->rootPath; - } - - return $children; - } catch (\UnexpectedValueException $e) { - throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Do nothing for non rewindable stream. - * - * @return void - */ - #[\ReturnTypeWillChange] - public function rewind() - { - if (false === $this->isRewindable()) { - return; - } - - parent::rewind(); - } - - /** - * Checks if the stream is rewindable. - * - * @return bool - */ - public function isRewindable() - { - if (null !== $this->rewindable) { - return $this->rewindable; - } - - if (false !== $stream = @opendir($this->getPath())) { - $infos = stream_get_meta_data($stream); - closedir($stream); - - if ($infos['seekable']) { - return $this->rewindable = true; - } - } - - return $this->rewindable = false; - } -} diff --git a/lib/symfony/finder/Iterator/SizeRangeFilterIterator.php b/lib/symfony/finder/Iterator/SizeRangeFilterIterator.php deleted file mode 100644 index 575bf29b7..000000000 --- a/lib/symfony/finder/Iterator/SizeRangeFilterIterator.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Comparator\NumberComparator; - -/** - * SizeRangeFilterIterator filters out files that are not in the given size range. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class SizeRangeFilterIterator extends \FilterIterator -{ - private $comparators = []; - - /** - * @param \Iterator $iterator - * @param NumberComparator[] $comparators - */ - public function __construct(\Iterator $iterator, array $comparators) - { - $this->comparators = $comparators; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - if (!$fileinfo->isFile()) { - return true; - } - - $filesize = $fileinfo->getSize(); - foreach ($this->comparators as $compare) { - if (!$compare->test($filesize)) { - return false; - } - } - - return true; - } -} diff --git a/lib/symfony/finder/Iterator/SortableIterator.php b/lib/symfony/finder/Iterator/SortableIterator.php deleted file mode 100644 index 9afde5c25..000000000 --- a/lib/symfony/finder/Iterator/SortableIterator.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * SortableIterator applies a sort on a given Iterator. - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate - */ -class SortableIterator implements \IteratorAggregate -{ - public const SORT_BY_NONE = 0; - public const SORT_BY_NAME = 1; - public const SORT_BY_TYPE = 2; - public const SORT_BY_ACCESSED_TIME = 3; - public const SORT_BY_CHANGED_TIME = 4; - public const SORT_BY_MODIFIED_TIME = 5; - public const SORT_BY_NAME_NATURAL = 6; - - private $iterator; - private $sort; - - /** - * @param \Traversable $iterator - * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) - * - * @throws \InvalidArgumentException - */ - public function __construct(\Traversable $iterator, $sort, bool $reverseOrder = false) - { - $this->iterator = $iterator; - $order = $reverseOrder ? -1 : 1; - - if (self::SORT_BY_NAME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - }; - } elseif (self::SORT_BY_NAME_NATURAL === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - }; - } elseif (self::SORT_BY_TYPE === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - if ($a->isDir() && $b->isFile()) { - return -$order; - } elseif ($a->isFile() && $b->isDir()) { - return $order; - } - - return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - }; - } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * ($a->getATime() - $b->getATime()); - }; - } elseif (self::SORT_BY_CHANGED_TIME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * ($a->getCTime() - $b->getCTime()); - }; - } elseif (self::SORT_BY_MODIFIED_TIME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * ($a->getMTime() - $b->getMTime()); - }; - } elseif (self::SORT_BY_NONE === $sort) { - $this->sort = $order; - } elseif (\is_callable($sort)) { - $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { return -$sort($a, $b); } : $sort; - } else { - throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.'); - } - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (1 === $this->sort) { - return $this->iterator; - } - - $array = iterator_to_array($this->iterator, true); - - if (-1 === $this->sort) { - $array = array_reverse($array); - } else { - uasort($array, $this->sort); - } - - return new \ArrayIterator($array); - } -} diff --git a/lib/symfony/finder/Iterator/VcsIgnoredFilterIterator.php b/lib/symfony/finder/Iterator/VcsIgnoredFilterIterator.php deleted file mode 100644 index e27158cbd..000000000 --- a/lib/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Gitignore; - -final class VcsIgnoredFilterIterator extends \FilterIterator -{ - /** - * @var string - */ - private $baseDir; - - /** - * @var array - */ - private $gitignoreFilesCache = []; - - /** - * @var array - */ - private $ignoredPathsCache = []; - - public function __construct(\Iterator $iterator, string $baseDir) - { - $this->baseDir = $this->normalizePath($baseDir); - - parent::__construct($iterator); - } - - public function accept(): bool - { - $file = $this->current(); - - $fileRealPath = $this->normalizePath($file->getRealPath()); - - return !$this->isIgnored($fileRealPath); - } - - private function isIgnored(string $fileRealPath): bool - { - if (is_dir($fileRealPath) && !str_ends_with($fileRealPath, '/')) { - $fileRealPath .= '/'; - } - - if (isset($this->ignoredPathsCache[$fileRealPath])) { - return $this->ignoredPathsCache[$fileRealPath]; - } - - $ignored = false; - - foreach ($this->parentsDirectoryDownward($fileRealPath) as $parentDirectory) { - if ($this->isIgnored($parentDirectory)) { - // rules in ignored directories are ignored, no need to check further. - break; - } - - $fileRelativePath = substr($fileRealPath, \strlen($parentDirectory) + 1); - - if (null === $regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore")) { - continue; - } - - [$exclusionRegex, $inclusionRegex] = $regexps; - - if (preg_match($exclusionRegex, $fileRelativePath)) { - $ignored = true; - - continue; - } - - if (preg_match($inclusionRegex, $fileRelativePath)) { - $ignored = false; - } - } - - return $this->ignoredPathsCache[$fileRealPath] = $ignored; - } - - /** - * @return list - */ - private function parentsDirectoryDownward(string $fileRealPath): array - { - $parentDirectories = []; - - $parentDirectory = $fileRealPath; - - while (true) { - $newParentDirectory = \dirname($parentDirectory); - - // dirname('/') = '/' - if ($newParentDirectory === $parentDirectory) { - break; - } - - $parentDirectory = $newParentDirectory; - - if (0 !== strpos($parentDirectory, $this->baseDir)) { - break; - } - - $parentDirectories[] = $parentDirectory; - } - - return array_reverse($parentDirectories); - } - - /** - * @return array{0: string, 1: string}|null - */ - private function readGitignoreFile(string $path): ?array - { - if (\array_key_exists($path, $this->gitignoreFilesCache)) { - return $this->gitignoreFilesCache[$path]; - } - - if (!file_exists($path)) { - return $this->gitignoreFilesCache[$path] = null; - } - - if (!is_file($path) || !is_readable($path)) { - throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable."); - } - - $gitignoreFileContent = file_get_contents($path); - - return $this->gitignoreFilesCache[$path] = [ - Gitignore::toRegex($gitignoreFileContent), - Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent), - ]; - } - - private function normalizePath(string $path): string - { - if ('\\' === \DIRECTORY_SEPARATOR) { - return str_replace('\\', '/', $path); - } - - return $path; - } -} diff --git a/lib/symfony/finder/LICENSE b/lib/symfony/finder/LICENSE deleted file mode 100644 index 88bf75bb4..000000000 --- a/lib/symfony/finder/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/finder/README.md b/lib/symfony/finder/README.md deleted file mode 100644 index 22bdeb9bc..000000000 --- a/lib/symfony/finder/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Finder Component -================ - -The Finder component finds files and directories via an intuitive fluent -interface. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/finder.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/finder/SplFileInfo.php b/lib/symfony/finder/SplFileInfo.php deleted file mode 100644 index 11604a2ef..000000000 --- a/lib/symfony/finder/SplFileInfo.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -/** - * Extends \SplFileInfo to support relative paths. - * - * @author Fabien Potencier - */ -class SplFileInfo extends \SplFileInfo -{ - private $relativePath; - private $relativePathname; - - /** - * @param string $file The file name - * @param string $relativePath The relative path - * @param string $relativePathname The relative path name - */ - public function __construct(string $file, string $relativePath, string $relativePathname) - { - parent::__construct($file); - $this->relativePath = $relativePath; - $this->relativePathname = $relativePathname; - } - - /** - * Returns the relative path. - * - * This path does not contain the file name. - * - * @return string - */ - public function getRelativePath() - { - return $this->relativePath; - } - - /** - * Returns the relative path name. - * - * This path contains the file name. - * - * @return string - */ - public function getRelativePathname() - { - return $this->relativePathname; - } - - public function getFilenameWithoutExtension(): string - { - $filename = $this->getFilename(); - - return pathinfo($filename, \PATHINFO_FILENAME); - } - - /** - * Returns the contents of the file. - * - * @return string - * - * @throws \RuntimeException - */ - public function getContents() - { - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $content = file_get_contents($this->getPathname()); - } finally { - restore_error_handler(); - } - if (false === $content) { - throw new \RuntimeException($error); - } - - return $content; - } -} diff --git a/lib/symfony/finder/composer.json b/lib/symfony/finder/composer.json deleted file mode 100644 index ef19911da..000000000 --- a/lib/symfony/finder/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "symfony/finder", - "type": "library", - "description": "Finds files and directories via an intuitive fluent interface", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Finder\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/form/AbstractExtension.php b/lib/symfony/form/AbstractExtension.php deleted file mode 100644 index ca2790021..000000000 --- a/lib/symfony/form/AbstractExtension.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -abstract class AbstractExtension implements FormExtensionInterface -{ - /** - * The types provided by this extension. - * - * @var FormTypeInterface[] - */ - private $types; - - /** - * The type extensions provided by this extension. - * - * @var FormTypeExtensionInterface[][] - */ - private $typeExtensions; - - /** - * The type guesser provided by this extension. - * - * @var FormTypeGuesserInterface|null - */ - private $typeGuesser; - - /** - * Whether the type guesser has been loaded. - * - * @var bool - */ - private $typeGuesserLoaded = false; - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (null === $this->types) { - $this->initTypes(); - } - - if (!isset($this->types[$name])) { - throw new InvalidArgumentException(sprintf('The type "%s" cannot be loaded by this extension.', $name)); - } - - return $this->types[$name]; - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - if (null === $this->types) { - $this->initTypes(); - } - - return isset($this->types[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions(string $name) - { - if (null === $this->typeExtensions) { - $this->initTypeExtensions(); - } - - return $this->typeExtensions[$name] - ?? []; - } - - /** - * {@inheritdoc} - */ - public function hasTypeExtensions(string $name) - { - if (null === $this->typeExtensions) { - $this->initTypeExtensions(); - } - - return isset($this->typeExtensions[$name]) && \count($this->typeExtensions[$name]) > 0; - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - if (!$this->typeGuesserLoaded) { - $this->initTypeGuesser(); - } - - return $this->typeGuesser; - } - - /** - * Registers the types. - * - * @return FormTypeInterface[] - */ - protected function loadTypes() - { - return []; - } - - /** - * Registers the type extensions. - * - * @return FormTypeExtensionInterface[] - */ - protected function loadTypeExtensions() - { - return []; - } - - /** - * Registers the type guesser. - * - * @return FormTypeGuesserInterface|null - */ - protected function loadTypeGuesser() - { - return null; - } - - /** - * Initializes the types. - * - * @throws UnexpectedTypeException if any registered type is not an instance of FormTypeInterface - */ - private function initTypes() - { - $this->types = []; - - foreach ($this->loadTypes() as $type) { - if (!$type instanceof FormTypeInterface) { - throw new UnexpectedTypeException($type, FormTypeInterface::class); - } - - $this->types[\get_class($type)] = $type; - } - } - - /** - * Initializes the type extensions. - * - * @throws UnexpectedTypeException if any registered type extension is not - * an instance of FormTypeExtensionInterface - */ - private function initTypeExtensions() - { - $this->typeExtensions = []; - - foreach ($this->loadTypeExtensions() as $extension) { - if (!$extension instanceof FormTypeExtensionInterface) { - throw new UnexpectedTypeException($extension, FormTypeExtensionInterface::class); - } - - foreach ($extension::getExtendedTypes() as $extendedType) { - $this->typeExtensions[$extendedType][] = $extension; - } - } - } - - /** - * Initializes the type guesser. - * - * @throws UnexpectedTypeException if the type guesser is not an instance of FormTypeGuesserInterface - */ - private function initTypeGuesser() - { - $this->typeGuesserLoaded = true; - - $this->typeGuesser = $this->loadTypeGuesser(); - if (null !== $this->typeGuesser && !$this->typeGuesser instanceof FormTypeGuesserInterface) { - throw new UnexpectedTypeException($this->typeGuesser, FormTypeGuesserInterface::class); - } - } -} diff --git a/lib/symfony/form/AbstractRendererEngine.php b/lib/symfony/form/AbstractRendererEngine.php deleted file mode 100644 index 07bf28c88..000000000 --- a/lib/symfony/form/AbstractRendererEngine.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Contracts\Service\ResetInterface; - -/** - * Default implementation of {@link FormRendererEngineInterface}. - * - * @author Bernhard Schussek - */ -abstract class AbstractRendererEngine implements FormRendererEngineInterface, ResetInterface -{ - /** - * The variable in {@link FormView} used as cache key. - */ - public const CACHE_KEY_VAR = 'cache_key'; - - /** - * @var array - */ - protected $defaultThemes; - - /** - * @var array[] - */ - protected $themes = []; - - /** - * @var bool[] - */ - protected $useDefaultThemes = []; - - /** - * @var array[] - */ - protected $resources = []; - - /** - * @var array> - */ - private $resourceHierarchyLevels = []; - - /** - * Creates a new renderer engine. - * - * @param array $defaultThemes The default themes. The type of these - * themes is open to the implementation. - */ - public function __construct(array $defaultThemes = []) - { - $this->defaultThemes = $defaultThemes; - } - - /** - * {@inheritdoc} - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - - // Do not cast, as casting turns objects into arrays of properties - $this->themes[$cacheKey] = \is_array($themes) ? $themes : [$themes]; - $this->useDefaultThemes[$cacheKey] = $useDefaultThemes; - - // Unset instead of resetting to an empty array, in order to allow - // implementations (like TwigRendererEngine) to check whether $cacheKey - // is set at all. - unset($this->resources[$cacheKey], $this->resourceHierarchyLevels[$cacheKey]); - } - - /** - * {@inheritdoc} - */ - public function getResourceForBlockName(FormView $view, string $blockName) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - - if (!isset($this->resources[$cacheKey][$blockName])) { - $this->loadResourceForBlockName($cacheKey, $view, $blockName); - } - - return $this->resources[$cacheKey][$blockName]; - } - - /** - * {@inheritdoc} - */ - public function getResourceForBlockNameHierarchy(FormView $view, array $blockNameHierarchy, int $hierarchyLevel) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - if (!isset($this->resources[$cacheKey][$blockName])) { - $this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $hierarchyLevel); - } - - return $this->resources[$cacheKey][$blockName]; - } - - /** - * {@inheritdoc} - */ - public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - if (!isset($this->resources[$cacheKey][$blockName])) { - $this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $hierarchyLevel); - } - - // If $block was previously rendered loaded with loadTemplateForBlock(), the template - // is cached but the hierarchy level is not. In this case, we know that the block - // exists at this very hierarchy level, so we can just set it. - if (!isset($this->resourceHierarchyLevels[$cacheKey][$blockName])) { - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $hierarchyLevel; - } - - return $this->resourceHierarchyLevels[$cacheKey][$blockName]; - } - - /** - * Loads the cache with the resource for a given block name. - * - * @see getResourceForBlock() - * - * @return bool - */ - abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName); - - /** - * Loads the cache with the resource for a specific level of a block hierarchy. - * - * @see getResourceForBlockHierarchy() - */ - private function loadResourceForBlockNameHierarchy(string $cacheKey, FormView $view, array $blockNameHierarchy, int $hierarchyLevel): bool - { - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - // Try to find a template for that block - if ($this->loadResourceForBlockName($cacheKey, $view, $blockName)) { - // If loadTemplateForBlock() returns true, it was able to populate the - // cache. The only missing thing is to set the hierarchy level at which - // the template was found. - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $hierarchyLevel; - - return true; - } - - if ($hierarchyLevel > 0) { - $parentLevel = $hierarchyLevel - 1; - $parentBlockName = $blockNameHierarchy[$parentLevel]; - - // The next two if statements contain slightly duplicated code. This is by intention - // and tries to avoid execution of unnecessary checks in order to increase performance. - - if (isset($this->resources[$cacheKey][$parentBlockName])) { - // It may happen that the parent block is already loaded, but its level is not. - // In this case, the parent block must have been loaded by loadResourceForBlock(), - // which does not check the hierarchy of the block. Subsequently the block must have - // been found directly on the parent level. - if (!isset($this->resourceHierarchyLevels[$cacheKey][$parentBlockName])) { - $this->resourceHierarchyLevels[$cacheKey][$parentBlockName] = $parentLevel; - } - - // Cache the shortcuts for further accesses - $this->resources[$cacheKey][$blockName] = $this->resources[$cacheKey][$parentBlockName]; - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $this->resourceHierarchyLevels[$cacheKey][$parentBlockName]; - - return true; - } - - if ($this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $parentLevel)) { - // Cache the shortcuts for further accesses - $this->resources[$cacheKey][$blockName] = $this->resources[$cacheKey][$parentBlockName]; - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $this->resourceHierarchyLevels[$cacheKey][$parentBlockName]; - - return true; - } - } - - // Cache the result for further accesses - $this->resources[$cacheKey][$blockName] = false; - $this->resourceHierarchyLevels[$cacheKey][$blockName] = false; - - return false; - } - - public function reset(): void - { - $this->themes = []; - $this->useDefaultThemes = []; - $this->resources = []; - $this->resourceHierarchyLevels = []; - } -} diff --git a/lib/symfony/form/AbstractType.php b/lib/symfony/form/AbstractType.php deleted file mode 100644 index 3325b8bc2..000000000 --- a/lib/symfony/form/AbstractType.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Util\StringUtil; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -abstract class AbstractType implements FormTypeInterface -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return StringUtil::fqcnToBlockPrefix(static::class) ?: ''; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return FormType::class; - } -} diff --git a/lib/symfony/form/AbstractTypeExtension.php b/lib/symfony/form/AbstractTypeExtension.php deleted file mode 100644 index 9d369bf29..000000000 --- a/lib/symfony/form/AbstractTypeExtension.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -abstract class AbstractTypeExtension implements FormTypeExtensionInterface -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - } -} diff --git a/lib/symfony/form/Button.php b/lib/symfony/form/Button.php deleted file mode 100644 index 1ffdd469f..000000000 --- a/lib/symfony/form/Button.php +++ /dev/null @@ -1,455 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\AlreadySubmittedException; -use Symfony\Component\Form\Exception\BadMethodCallException; - -/** - * A form button. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class Button implements \IteratorAggregate, FormInterface -{ - /** - * @var FormInterface|null - */ - private $parent; - - /** - * @var FormConfigInterface - */ - private $config; - - /** - * @var bool - */ - private $submitted = false; - - /** - * Creates a new button from a form configuration. - */ - public function __construct(FormConfigInterface $config) - { - $this->config = $config; - } - - /** - * Unsupported method. - * - * @param string $offset - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) - { - return false; - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param string $offset - * - * @return FormInterface - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param string $offset - * @param FormInterface $value - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param string $offset - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * {@inheritdoc} - */ - public function setParent(FormInterface $parent = null) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot set the parent of a submitted button.'); - } - - $this->parent = $parent; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->parent; - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @throws BadMethodCallException - */ - public function add($child, string $type = null, array $options = []) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @throws BadMethodCallException - */ - public function get(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function has(string $name) - { - return false; - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @throws BadMethodCallException - */ - public function remove(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * {@inheritdoc} - */ - public function all() - { - return []; - } - - /** - * {@inheritdoc} - */ - public function getErrors(bool $deep = false, bool $flatten = true) - { - return new FormErrorIterator($this, []); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param mixed $modelData - * - * @return $this - */ - public function setData($modelData) - { - // no-op, called during initialization of the form tree - return $this; - } - - /** - * Unsupported method. - */ - public function getData() - { - return null; - } - - /** - * Unsupported method. - */ - public function getNormData() - { - return null; - } - - /** - * Unsupported method. - */ - public function getViewData() - { - return null; - } - - /** - * Unsupported method. - * - * @return array - */ - public function getExtraData() - { - return []; - } - - /** - * Returns the button's configuration. - * - * @return FormConfigInterface - */ - public function getConfig() - { - return $this->config; - } - - /** - * Returns whether the button is submitted. - * - * @return bool - */ - public function isSubmitted() - { - return $this->submitted; - } - - /** - * Returns the name by which the button is identified in forms. - * - * @return string - */ - public function getName() - { - return $this->config->getName(); - } - - /** - * Unsupported method. - */ - public function getPropertyPath() - { - return null; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addError(FormError $error) - { - throw new BadMethodCallException('Buttons cannot have errors.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isValid() - { - return true; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isRequired() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isDisabled() - { - if ($this->parent && $this->parent->isDisabled()) { - return true; - } - - return $this->config->getDisabled(); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isEmpty() - { - return true; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isSynchronized() - { - return true; - } - - /** - * Unsupported method. - */ - public function getTransformationFailure() - { - return null; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function initialize() - { - throw new BadMethodCallException('Buttons cannot be initialized. Call initialize() on the root form instead.'); - } - - /** - * Unsupported method. - * - * @param mixed $request - * - * @throws BadMethodCallException - */ - public function handleRequest($request = null) - { - throw new BadMethodCallException('Buttons cannot handle requests. Call handleRequest() on the root form instead.'); - } - - /** - * Submits data to the button. - * - * @param array|string|null $submittedData Not used - * @param bool $clearMissing Not used - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the button has already been submitted - */ - public function submit($submittedData, bool $clearMissing = true) - { - if ($this->submitted) { - throw new AlreadySubmittedException('A form can only be submitted once.'); - } - - $this->submitted = true; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getRoot() - { - return $this->parent ? $this->parent->getRoot() : $this; - } - - /** - * {@inheritdoc} - */ - public function isRoot() - { - return null === $this->parent; - } - - /** - * {@inheritdoc} - */ - public function createView(FormView $parent = null) - { - if (null === $parent && $this->parent) { - $parent = $this->parent->createView(); - } - - $type = $this->config->getType(); - $options = $this->config->getOptions(); - - $view = $type->createView($this, $parent); - - $type->buildView($view, $this, $options); - $type->finishView($view, $this, $options); - - return $view; - } - - /** - * Unsupported method. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return 0; - } - - /** - * Unsupported method. - * - * @return \EmptyIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \EmptyIterator(); - } -} diff --git a/lib/symfony/form/ButtonBuilder.php b/lib/symfony/form/ButtonBuilder.php deleted file mode 100644 index c85bcc0d9..000000000 --- a/lib/symfony/form/ButtonBuilder.php +++ /dev/null @@ -1,744 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; - -/** - * A builder for {@link Button} instances. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface -{ - protected $locked = false; - - /** - * @var bool - */ - private $disabled = false; - - /** - * @var ResolvedFormTypeInterface - */ - private $type; - - /** - * @var string - */ - private $name; - - /** - * @var array - */ - private $attributes = []; - - /** - * @var array - */ - private $options; - - /** - * @throws InvalidArgumentException if the name is empty - */ - public function __construct(?string $name, array $options = []) - { - if ('' === $name || null === $name) { - throw new InvalidArgumentException('Buttons cannot have empty names.'); - } - - $this->name = $name; - $this->options = $options; - - FormConfigBuilder::validateName($name); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function add($child, string $type = null, array $options = []) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function create(string $name, string $type = null, array $options = []) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function get(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function remove(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function has(string $name) - { - return false; - } - - /** - * Returns the children. - * - * @return array - */ - public function all() - { - return []; - } - - /** - * Creates the button. - * - * @return Button - */ - public function getForm() - { - return new Button($this->getFormConfig()); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addEventListener(string $eventName, callable $listener, int $priority = 0) - { - throw new BadMethodCallException('Buttons do not support event listeners.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addEventSubscriber(EventSubscriberInterface $subscriber) - { - throw new BadMethodCallException('Buttons do not support event subscribers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false) - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function resetViewTransformers() - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false) - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function resetModelTransformers() - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * {@inheritdoc} - */ - public function setAttribute(string $name, $value) - { - $this->attributes[$name] = $value; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAttributes(array $attributes) - { - $this->attributes = $attributes; - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setDataMapper(DataMapperInterface $dataMapper = null) - { - throw new BadMethodCallException('Buttons do not support data mappers.'); - } - - /** - * Set whether the button is disabled. - * - * @return $this - */ - public function setDisabled(bool $disabled) - { - $this->disabled = $disabled; - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setEmptyData($emptyData) - { - throw new BadMethodCallException('Buttons do not support empty data.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setErrorBubbling(bool $errorBubbling) - { - throw new BadMethodCallException('Buttons do not support error bubbling.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setRequired(bool $required) - { - throw new BadMethodCallException('Buttons cannot be required.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setPropertyPath($propertyPath) - { - throw new BadMethodCallException('Buttons do not support property paths.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setMapped(bool $mapped) - { - throw new BadMethodCallException('Buttons do not support data mapping.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setByReference(bool $byReference) - { - throw new BadMethodCallException('Buttons do not support data mapping.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setCompound(bool $compound) - { - throw new BadMethodCallException('Buttons cannot be compound.'); - } - - /** - * Sets the type of the button. - * - * @return $this - */ - public function setType(ResolvedFormTypeInterface $type) - { - $this->type = $type; - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setData($data) - { - throw new BadMethodCallException('Buttons do not support data.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setDataLocked(bool $locked) - { - throw new BadMethodCallException('Buttons do not support data locking.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setFormFactory(FormFactoryInterface $formFactory) - { - throw new BadMethodCallException('Buttons do not support form factories.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setAction(string $action) - { - throw new BadMethodCallException('Buttons do not support actions.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setMethod(string $method) - { - throw new BadMethodCallException('Buttons do not support methods.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setRequestHandler(RequestHandlerInterface $requestHandler) - { - throw new BadMethodCallException('Buttons do not support request handlers.'); - } - - /** - * Unsupported method. - * - * @return $this - * - * @throws BadMethodCallException - */ - public function setAutoInitialize(bool $initialize) - { - if (true === $initialize) { - throw new BadMethodCallException('Buttons do not support automatic initialization.'); - } - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setInheritData(bool $inheritData) - { - throw new BadMethodCallException('Buttons do not support data inheritance.'); - } - - /** - * Builds and returns the button configuration. - * - * @return FormConfigInterface - */ - public function getFormConfig() - { - // This method should be idempotent, so clone the builder - $config = clone $this; - $config->locked = true; - - return $config; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setIsEmptyCallback(?callable $isEmptyCallback) - { - throw new BadMethodCallException('Buttons do not support "is empty" callback.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getEventDispatcher() - { - throw new BadMethodCallException('Buttons do not support event dispatching.'); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * Unsupported method. - */ - public function getPropertyPath() - { - return null; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getMapped() - { - return false; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getByReference() - { - return false; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getCompound() - { - return false; - } - - /** - * Returns the form type used to construct the button. - * - * @return ResolvedFormTypeInterface - */ - public function getType() - { - return $this->type; - } - - /** - * Unsupported method. - * - * @return array - */ - public function getViewTransformers() - { - return []; - } - - /** - * Unsupported method. - * - * @return array - */ - public function getModelTransformers() - { - return []; - } - - /** - * Unsupported method. - */ - public function getDataMapper() - { - return null; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getRequired() - { - return false; - } - - /** - * Returns whether the button is disabled. - * - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getErrorBubbling() - { - return false; - } - - /** - * Unsupported method. - */ - public function getEmptyData() - { - return null; - } - - /** - * Returns additional attributes of the button. - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Returns whether the attribute with the given name exists. - * - * @return bool - */ - public function hasAttribute(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * Returns the value of the given attribute. - * - * @param mixed $default The value returned if the attribute does not exist - * - * @return mixed - */ - public function getAttribute(string $name, $default = null) - { - return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; - } - - /** - * Unsupported method. - */ - public function getData() - { - return null; - } - - /** - * Unsupported method. - */ - public function getDataClass() - { - return null; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getDataLocked() - { - return false; - } - - /** - * Unsupported method. - */ - public function getFormFactory() - { - throw new BadMethodCallException('Buttons do not support adding children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getAction() - { - throw new BadMethodCallException('Buttons do not support actions.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getMethod() - { - throw new BadMethodCallException('Buttons do not support methods.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getRequestHandler() - { - throw new BadMethodCallException('Buttons do not support request handlers.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getAutoInitialize() - { - return false; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getInheritData() - { - return false; - } - - /** - * Returns all options passed during the construction of the button. - * - * @return array - */ - public function getOptions() - { - return $this->options; - } - - /** - * Returns whether a specific option exists. - * - * @return bool - */ - public function hasOption(string $name) - { - return \array_key_exists($name, $this->options); - } - - /** - * Returns the value of a specific option. - * - * @param mixed $default The value returned if the option does not exist - * - * @return mixed - */ - public function getOption(string $name, $default = null) - { - return \array_key_exists($name, $this->options) ? $this->options[$name] : $default; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getIsEmptyCallback(): ?callable - { - throw new BadMethodCallException('Buttons do not support "is empty" callback.'); - } - - /** - * Unsupported method. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return 0; - } - - /** - * Unsupported method. - * - * @return \EmptyIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \EmptyIterator(); - } -} diff --git a/lib/symfony/form/ButtonTypeInterface.php b/lib/symfony/form/ButtonTypeInterface.php deleted file mode 100644 index dd5117c4d..000000000 --- a/lib/symfony/form/ButtonTypeInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A type that should be converted into a {@link Button} instance. - * - * @author Bernhard Schussek - */ -interface ButtonTypeInterface extends FormTypeInterface -{ -} diff --git a/lib/symfony/form/CHANGELOG.md b/lib/symfony/form/CHANGELOG.md deleted file mode 100644 index 9d7e76445..000000000 --- a/lib/symfony/form/CHANGELOG.md +++ /dev/null @@ -1,567 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate calling `FormErrorIterator::children()` if the current element is not iterable. - * Allow to pass `TranslatableMessage` objects to the `help` option - * Add the `EnumType` - -5.3 ---- - - * Changed `$forms` parameter type of the `DataMapperInterface::mapDataToForms()` method from `iterable` to `\Traversable`. - * Changed `$forms` parameter type of the `DataMapperInterface::mapFormsToData()` method from `iterable` to `\Traversable`. - * Deprecated passing an array as the second argument of the `DataMapper::mapDataToForms()` method, pass `\Traversable` instead. - * Deprecated passing an array as the first argument of the `DataMapper::mapFormsToData()` method, pass `\Traversable` instead. - * Deprecated passing an array as the second argument of the `CheckboxListMapper::mapDataToForms()` method, pass `\Traversable` instead. - * Deprecated passing an array as the first argument of the `CheckboxListMapper::mapFormsToData()` method, pass `\Traversable` instead. - * Deprecated passing an array as the second argument of the `RadioListMapper::mapDataToForms()` method, pass `\Traversable` instead. - * Deprecated passing an array as the first argument of the `RadioListMapper::mapFormsToData()` method, pass `\Traversable` instead. - * Added a `choice_translation_parameters` option to `ChoiceType` - * Add `UuidType` and `UlidType` - * Dependency on `symfony/intl` was removed. Install `symfony/intl` if you are using `LocaleType`, `CountryType`, `CurrencyType`, `LanguageType` or `TimezoneType`. - * Add `priority` option to `BaseType` and sorting view fields - -5.2.0 ------ - - * Added support for using the `{{ label }}` placeholder in constraint messages, which is replaced in the `ViolationMapper` by the corresponding field form label. - * Added `DataMapper`, `ChainAccessor`, `PropertyPathAccessor` and `CallbackAccessor` with new callable `getter` and `setter` options for each form type - * Deprecated `PropertyPathMapper` in favor of `DataMapper` and `PropertyPathAccessor` - * Added an `html5` option to `MoneyType` and `PercentType`, to use `` - -5.1.0 ------ - - * Deprecated not configuring the `rounding_mode` option of the `PercentType`. It will default to `\NumberFormatter::ROUND_HALFUP` in Symfony 6. - * Deprecated not passing a rounding mode to the constructor of `PercentToLocalizedStringTransformer`. It will default to `\NumberFormatter::ROUND_HALFUP` in Symfony 6. - * Added `collection_entry` block prefix to `CollectionType` entries - * Added a `choice_filter` option to `ChoiceType` - * Added argument `callable|null $filter` to `ChoiceListFactoryInterface::createListFromChoices()` and `createListFromLoader()` - not defining them is deprecated. - * Added a `ChoiceList` facade to leverage explicit choice list caching based on options - * Added an `AbstractChoiceLoader` to simplify implementations and handle global optimizations - * The `view_timezone` option defaults to the `model_timezone` if no `reference_date` is configured. - * Implementing the `FormConfigInterface` without implementing the `getIsEmptyCallback()` method - is deprecated. The method will be added to the interface in 6.0. - * Implementing the `FormConfigBuilderInterface` without implementing the `setIsEmptyCallback()` method - is deprecated. The method will be added to the interface in 6.0. - * Added a `rounding_mode` option for the PercentType and correctly round the value when submitted - * Deprecated `Symfony\Component\Form\Extension\Validator\Util\ServerParams` in favor of its parent class `Symfony\Component\Form\Util\ServerParams` - * Added the `html5` option to the `ColorType` to validate the input - * Deprecated `NumberToLocalizedStringTransformer::ROUND_*` constants, use `\NumberFormatter::ROUND_*` instead - -5.0.0 ------ - - * Removed support for using different values for the "model_timezone" and "view_timezone" options of the `TimeType` - without configuring a reference date. - * Removed the `scale` option of the `IntegerType`. - * Using the `date_format`, `date_widget`, and `time_widget` options of the `DateTimeType` when the `widget` option is - set to `single_text` is not supported anymore. - * The `format` option of `DateType` and `DateTimeType` cannot be used when the `html5` option is enabled. - * Using names for buttons that do not start with a letter, a digit, or an underscore throw an exception - * Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons throw an exception. - * removed the `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType` - * removed `getExtendedType()` method of the `FormTypeExtensionInterface` - * added static `getExtendedTypes()` method to the `FormTypeExtensionInterface` - * calling to `FormRenderer::searchAndRenderBlock()` method for fields which were already rendered throw a `BadMethodCallException` - * removed the `regions` option of the `TimezoneType` - * removed the `$scale` argument of the `IntegerToLocalizedStringTransformer` - * removed `TemplatingExtension` and `TemplatingRendererEngine` classes, use Twig instead - * passing a null message when instantiating a `Symfony\Component\Form\FormError` is not allowed - * removed support for using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` - -4.4.0 ------ - - * add new `WeekType` - * using different values for the "model_timezone" and "view_timezone" options of the `TimeType` without configuring a - reference date is deprecated - * preferred choices are repeated in the list of all choices - * deprecated using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` - * The type guesser guesses the HTML accept attribute when a mime type is configured in the File or Image constraint. - * Overriding the methods `FormIntegrationTestCase::setUp()`, `TypeTestCase::setUp()` and `TypeTestCase::tearDown()` without the `void` return-type is deprecated. - * marked all dispatched event classes as `@final` - * Added the `validate` option to `SubmitType` to toggle the browser built-in form validation. - * Added the `alpha3` option to `LanguageType` and `CountryType` to use alpha3 instead of alpha2 codes - -4.3.0 ------ - - * added a `symbol` option to the `PercentType` that allows to disable or customize the output of the percent character - * Using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled is deprecated. - * Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated and will lead to an - exception in 5.0. - * Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons is deprecated and - will lead to an exception in 5.0. - * added `html5` option to `NumberType` that allows to render `type="number"` input fields - * deprecated using the `date_format`, `date_widget`, and `time_widget` options of the `DateTimeType` when the `widget` - option is set to `single_text` - * added `block_prefix` option to `BaseType`. - * added `help_html` option to display the `help` text as HTML. - * `FormError` doesn't implement `Serializable` anymore - * `FormDataCollector` has been marked as `final` - * added `label_translation_parameters`, `attr_translation_parameters`, `help_translation_parameters` options - to `FormType` to pass translation parameters to form labels, attributes (`placeholder` and `title`) and help text respectively. - The passed parameters will replace placeholders in translation messages. - - ```php - class OrderType extends AbstractType - { - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add('comment', TextType::class, [ - 'label' => 'Comment to the order to %company%', - 'label_translation_parameters' => [ - '%company%' => 'Acme', - ], - 'help' => 'The address of the %company% is %address%', - 'help_translation_parameters' => [ - '%company%' => 'Acme Ltd.', - '%address%' => '4 Form street, Symfonyville', - ], - ]) - } - } - ``` - * added the `input_format` option to `DateType`, `DateTimeType`, and `TimeType` to specify the input format when setting - the `input` option to `string` - * dispatch `PreSubmitEvent` on `form.pre_submit` - * dispatch `SubmitEvent` on `form.submit` - * dispatch `PostSubmitEvent` on `form.post_submit` - * dispatch `PreSetDataEvent` on `form.pre_set_data` - * dispatch `PostSetDataEvent` on `form.post_set_data` - * added an `input` option to `NumberType` - * removed default option grouping in `TimezoneType`, use `group_by` instead - -4.2.0 ------ - - * The `getExtendedType()` method of the `FormTypeExtensionInterface` is deprecated and will be removed in 5.0. Type - extensions must implement the static `getExtendedTypes()` method instead and return an iterable of extended types. - - Before: - - ```php - class FooTypeExtension extends AbstractTypeExtension - { - public function getExtendedType() - { - return FormType::class; - } - - // ... - } - ``` - - After: - - ```php - class FooTypeExtension extends AbstractTypeExtension - { - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } - - // ... - } - ``` - * deprecated the `$scale` argument of the `IntegerToLocalizedStringTransformer` - * added `Symfony\Component\Form\ClearableErrorsInterface` - * deprecated calling `FormRenderer::searchAndRenderBlock` for fields which were already rendered - * added a cause when a CSRF error has occurred - * deprecated the `scale` option of the `IntegerType` - * removed restriction on allowed HTTP methods - * deprecated the `regions` option of the `TimezoneType` - -4.1.0 ------ - - * added `input=datetime_immutable` to `DateType`, `TimeType`, `DateTimeType` - * added `rounding_mode` option to `MoneyType` - * added `choice_translation_locale` option to `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType` - * deprecated the `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType` - * added `input=datetime_immutable` to DateType, TimeType, DateTimeType - * added `rounding_mode` option to MoneyType - -4.0.0 ------ - - * using the `choices` option in `CountryType`, `CurrencyType`, `LanguageType`, - `LocaleType`, and `TimezoneType` when the `choice_loader` option is not `null` - is not supported anymore and the configured choices will be ignored - * callable strings that are passed to the options of the `ChoiceType` are - treated as property paths - * the `choices_as_values` option of the `ChoiceType` has been removed - * removed the support for caching loaded choice lists in `LazyChoiceList`, - cache the choice list in the used `ChoiceLoaderInterface` implementation - instead - * removed the support for objects implementing both `\Traversable` and `\ArrayAccess` in `ResizeFormListener::preSubmit()` - * removed the ability to use `FormDataCollector` without the `symfony/var-dumper` component - * removed passing a `ValueExporter` instance to the `FormDataExtractor::__construct()` method - * removed passing guesser services ids as the fourth argument of `DependencyInjectionExtension::__construct()` - * removed the ability to validate an unsubmitted form. - * removed `ChoiceLoaderInterface` implementation in `TimezoneType` - * added the `false_values` option to the `CheckboxType` which allows to configure custom values which will be treated as `false` during submission - -3.4.0 ------ - - * added `DebugCommand` - * deprecated `ChoiceLoaderInterface` implementation in `TimezoneType` - * added options "input" and "regions" to `TimezoneType` - * added an option to ``Symfony\Component\Form\FormRendererEngineInterface::setTheme()`` and - ``Symfony\Component\Form\FormRendererInterface::setTheme()`` to disable usage of default themes when rendering a form - -3.3.0 ------ - - * deprecated using "choices" option in ``CountryType``, ``CurrencyType``, ``LanguageType``, ``LocaleType``, and - ``TimezoneType`` when "choice_loader" is not ``null`` - * added `Symfony\Component\Form\FormErrorIterator::findByCodes()` - * added `getTypedExtensions`, `getTypes`, and `getTypeGuessers` to `Symfony\Component\Form\Test\FormIntegrationTestCase` - * added `FormPass` - -3.2.0 ------ - - * added `CallbackChoiceLoader` - * implemented `ChoiceLoaderInterface` in children of `ChoiceType` - -3.1.0 ------ - - * deprecated the "choices_as_values" option of ChoiceType - * deprecated support for data objects that implements both `Traversable` and - `ArrayAccess` in `ResizeFormListener::preSubmit` method - * Using callable strings as choice options in `ChoiceType` has been deprecated - and will be used as `PropertyPath` instead of callable in Symfony 4.0. - * implemented `DataTransformerInterface` in `TextType` - * deprecated caching loaded choice list in `LazyChoiceList::$loadedList` - -3.0.0 ------ - - * removed `FormTypeInterface::setDefaultOptions()` method - * removed `AbstractType::setDefaultOptions()` method - * removed `FormTypeExtensionInterface::setDefaultOptions()` method - * removed `AbstractTypeExtension::setDefaultOptions()` method - * added `FormTypeInterface::configureOptions()` method - * added `FormTypeExtensionInterface::configureOptions()` method - -2.8.0 ------ - - * added option "choice_translation_domain" to DateType, TimeType and DateTimeType. - * deprecated option "read_only" in favor of "attr['readonly']" - * added the html5 "range" FormType - * deprecated the "cascade_validation" option in favor of setting "constraints" - with the Valid constraint - * moved data trimming logic of TrimListener into StringUtil - * [BC BREAK] When registering a type extension through the DI extension, the tag alias has to match the actual extended type. - -2.7.38 ------- - - * [BC BREAK] the `isFileUpload()` method was added to the `RequestHandlerInterface` - -2.7.0 ------ - - * added option "choice_translation_domain" to ChoiceType. - * deprecated option "precision" in favor of "scale" - * deprecated the overwriting of AbstractType::setDefaultOptions() in favor of overwriting AbstractType::configureOptions(). - * deprecated the overwriting of AbstractTypeExtension::setDefaultOptions() in favor of overwriting AbstractTypeExtension::configureOptions(). - * added new ChoiceList interface and implementations in the Symfony\Component\Form\ChoiceList namespace - * added new ChoiceView in the Symfony\Component\Form\ChoiceList\View namespace - * choice groups are now represented by ChoiceGroupView objects in the view - * deprecated the old ChoiceList interface and implementations - * deprecated the old ChoiceView class - * added CheckboxListMapper and RadioListMapper - * deprecated ChoiceToBooleanArrayTransformer and ChoicesToBooleanArrayTransformer - * deprecated FixCheckboxInputListener and FixRadioInputListener - * deprecated the "choice_list" option of ChoiceType - * added new options to ChoiceType: - * "choices_as_values" - * "choice_loader" - * "choice_label" - * "choice_name" - * "choice_value" - * "choice_attr" - * "group_by" - -2.6.2 ------ - - * Added back the `model_timezone` and `view_timezone` options for `TimeType`, `DateType` - and `BirthdayType` - -2.6.0 ------ - - * added "html5" option to Date, Time and DateTimeFormType to be able to - enable/disable HTML5 input date when widget option is "single_text" - * added "label_format" option with possible placeholders "%name%" and "%id%" - * [BC BREAK] drop support for model_timezone and view_timezone options in TimeType, DateType and BirthdayType, - update to 2.6.2 to get back support for these options - -2.5.0 ------- - - * deprecated options "max_length" and "pattern" in favor of putting these values in "attr" option - * added an option for multiple files upload - * form errors now reference their cause (constraint violation, exception, ...) - * form errors now remember which form they were originally added to - * [BC BREAK] added two optional parameters to FormInterface::getErrors() and - changed the method to return a Symfony\Component\Form\FormErrorIterator - instance instead of an array - * errors mapped to unsubmitted forms are discarded now - * ObjectChoiceList now compares choices by their value, if a value path is - given - * you can now pass interface names in the "data_class" option - * [BC BREAK] added `FormInterface::getTransformationFailure()` - -2.4.0 ------ - - * moved CSRF implementation to the new Security CSRF sub-component - * deprecated CsrfProviderInterface and its implementations - * deprecated options "csrf_provider" and "intention" in favor of the new options "csrf_token_manager" and "csrf_token_id" - -2.3.0 ------ - - * deprecated FormPerformanceTestCase and FormIntegrationTestCase in the Symfony\Component\Form\Tests namespace and moved them to the Symfony\Component\Form\Test namespace - * deprecated TypeTestCase in the Symfony\Component\Form\Tests\Extension\Core\Type namespace and moved it to the Symfony\Component\Form\Test namespace - * changed FormRenderer::humanize() to humanize also camel cased field name - * added RequestHandlerInterface and FormInterface::handleRequest() - * deprecated passing a Request instance to FormInterface::bind() - * added options "method" and "action" to FormType - * deprecated option "virtual" in favor "inherit_data" - * deprecated VirtualFormAwareIterator in favor of InheritDataAwareIterator - * [BC BREAK] removed the "array" type hint from DataMapperInterface - * improved forms inheriting their parent data to actually return that data from getData(), getNormData() and getViewData() - * added component-level exceptions for various SPL exceptions - changed all uses of the deprecated Exception class to use more specialized exceptions instead - removed NotInitializedException, NotValidException, TypeDefinitionException, TypeLoaderException, CreationException - * added events PRE_SUBMIT, SUBMIT and POST_SUBMIT - * deprecated events PRE_BIND, BIND and POST_BIND - * [BC BREAK] renamed bind() and isBound() in FormInterface to submit() and isSubmitted() - * added methods submit() and isSubmitted() to Form - * deprecated bind() and isBound() in Form - * deprecated AlreadyBoundException in favor of AlreadySubmittedException - * added support for PATCH requests - * [BC BREAK] added initialize() to FormInterface - * [BC BREAK] added getAutoInitialize() to FormConfigInterface - * [BC BREAK] added setAutoInitialize() to FormConfigBuilderInterface - * [BC BREAK] initialization for Form instances added to a form tree must be manually disabled - * PRE_SET_DATA is now guaranteed to be called after children were added by the form builder, - unless FormInterface::setData() is called manually - * fixed CSRF error message to be translated - * custom CSRF error messages can now be set through the "csrf_message" option - * fixed: expanded single-choice fields now show a radio button for the empty value - -2.2.0 ------ - - * TrimListener now removes unicode whitespaces - * deprecated getParent(), setParent() and hasParent() in FormBuilderInterface - * FormInterface::add() now accepts a FormInterface instance OR a field's name, type and options - * removed special characters between the choice or text fields of DateType unless - the option "format" is set to a custom value - * deprecated FormException and introduced ExceptionInterface instead - * [BC BREAK] FormException is now an interface - * protected FormBuilder methods from being called when it is turned into a FormConfigInterface with getFormConfig() - * [BC BREAK] inserted argument `$message` in the constructor of `FormError` - * the PropertyPath class and related classes were moved to a dedicated - PropertyAccess component. During the move, InvalidPropertyException was - renamed to NoSuchPropertyException. FormUtil was split: FormUtil::singularify() - can now be found in Symfony\Component\PropertyAccess\StringUtil. The methods - getValue() and setValue() from PropertyPath were extracted into a new class - PropertyAccessor. - * added an optional PropertyAccessorInterface parameter to FormType, - ObjectChoiceList and PropertyPathMapper - * [BC BREAK] PropertyPathMapper and FormType now have a constructor - * [BC BREAK] setting the option "validation_groups" to ``false`` now disables validation - instead of assuming group "Default" - -2.1.0 ------ - - * [BC BREAK] ``read_only`` field attribute now renders as ``readonly="readonly"``, use ``disabled`` instead - * [BC BREAK] child forms now aren't validated anymore by default - * made validation of form children configurable (new option: cascade_validation) - * added support for validation groups as callbacks - * made the translation catalogue configurable via the "translation_domain" option - * added Form::getErrorsAsString() to help debugging forms - * allowed setting different options for RepeatedType fields (like the label) - * added support for empty form name at root level, this enables rendering forms - without form name prefix in field names - * [BC BREAK] form and field names must start with a letter, digit or underscore - and only contain letters, digits, underscores, hyphens and colons - * [BC BREAK] changed default name of the prototype in the "collection" type - from "$$name$$" to "\__name\__". No dollars are appended/prepended to custom - names anymore. - * [BC BREAK] improved ChoiceListInterface - * [BC BREAK] added SimpleChoiceList and LazyChoiceList as replacement of - ArrayChoiceList - * added ChoiceList and ObjectChoiceList to use objects as choices - * [BC BREAK] removed EntitiesToArrayTransformer and EntityToIdTransformer. - The former has been replaced by CollectionToArrayTransformer in combination - with EntityChoiceList, the latter is not required in the core anymore. - * [BC BREAK] renamed - * ArrayToBooleanChoicesTransformer to ChoicesToBooleanArrayTransformer - * ScalarToBooleanChoicesTransformer to ChoiceToBooleanArrayTransformer - * ArrayToChoicesTransformer to ChoicesToValuesTransformer - * ScalarToChoiceTransformer to ChoiceToValueTransformer - to be consistent with the naming in ChoiceListInterface. - They were merged into ChoiceList and have no public equivalent anymore. - * choice fields now throw a FormException if neither the "choices" nor the - "choice_list" option is set - * the radio type is now a child of the checkbox type - * the collection, choice (with multiple selection) and entity (with multiple - selection) types now make use of addXxx() and removeXxx() methods in your - model if you set "by_reference" to false. For a custom, non-recognized - singular form, set the "property_path" option like this: "plural|singular" - * forms now don't create an empty object anymore if they are completely - empty and not required. The empty value for such forms is null. - * added constant Guess::VERY_HIGH_CONFIDENCE - * [BC BREAK] The methods `add`, `remove`, `setParent`, `bind` and `setData` - in class Form now throw an exception if the form is already bound - * fields of constrained classes without a NotBlank or NotNull constraint are - set to not required now, as stated in the docs - * fixed TimeType and DateTimeType to not display seconds when "widget" is - "single_text" unless "with_seconds" is set to true - * checkboxes of in an expanded multiple-choice field don't include the choice - in their name anymore. Their names terminate with "[]" now. - * deprecated FormValidatorInterface and substituted its implementations - by event subscribers - * simplified CSRF protection and removed the csrf type - * deprecated FieldType and merged it into FormType - * added new option "compound" that lets you switch between field and form behavior - * [BC BREAK] renamed theme blocks - * "field_*" to "form_*" - * "field_widget" to "form_widget_simple" - * "widget_choice_options" to "choice_widget_options" - * "generic_label" to "form_label" - * added theme blocks "form_widget_compound", "choice_widget_expanded" and - "choice_widget_collapsed" to make theming more modular - * ValidatorTypeGuesser now guesses "collection" for array type constraint - * added method `guessPattern` to FormTypeGuesserInterface to guess which pattern to use in the HTML5 attribute "pattern" - * deprecated method `guessMinLength` in favor of `guessPattern` - * labels don't display field attributes anymore. Label attributes can be - passed in the "label_attr" option/variable - * added option "mapped" which should be used instead of setting "property_path" to false - * [BC BREAK] "data_class" now *must* be set if a form maps to an object and should be left empty otherwise - * improved error mapping on forms - * dot (".") rules are now allowed to map errors assigned to a form to - one of its children - * errors are not mapped to unsynchronized forms anymore - * [BC BREAK] changed Form constructor to accept a single `FormConfigInterface` object - * [BC BREAK] changed argument order in the FormBuilder constructor - * added Form method `getViewData` - * deprecated Form methods - * `getTypes` - * `getErrorBubbling` - * `getNormTransformers` - * `getClientTransformers` - * `getAttribute` - * `hasAttribute` - * `getClientData` - * added FormBuilder methods - * `getTypes` - * `addViewTransformer` - * `getViewTransformers` - * `resetViewTransformers` - * `addModelTransformer` - * `getModelTransformers` - * `resetModelTransformers` - * deprecated FormBuilder methods - * `prependClientTransformer` - * `appendClientTransformer` - * `getClientTransformers` - * `resetClientTransformers` - * `prependNormTransformer` - * `appendNormTransformer` - * `getNormTransformers` - * `resetNormTransformers` - * deprecated the option "validation_constraint" in favor of the new - option "constraints" - * removed superfluous methods from DataMapperInterface - * `mapFormToData` - * `mapDataToForm` - * added `setDefaultOptions` to FormTypeInterface and FormTypeExtensionInterface - which accepts an OptionsResolverInterface instance - * deprecated the methods `getDefaultOptions` and `getAllowedOptionValues` - in FormTypeInterface and FormTypeExtensionInterface - * options passed during construction can now be accessed from FormConfigInterface - * added FormBuilderInterface and FormConfigEditorInterface - * [BC BREAK] the method `buildForm` in FormTypeInterface and FormTypeExtensionInterface - now receives a FormBuilderInterface instead of a FormBuilder instance - * [BC BREAK] the method `buildViewBottomUp` was renamed to `finishView` in - FormTypeInterface and FormTypeExtensionInterface - * [BC BREAK] the options array is now passed as last argument of the - methods - * `buildView` - * `finishView` - in FormTypeInterface and FormTypeExtensionInterface - * [BC BREAK] no options are passed to `getParent` of FormTypeInterface anymore - * deprecated DataEvent and FilterDataEvent in favor of the new FormEvent which is - now passed to all events thrown by the component - * FormEvents::BIND now replaces FormEvents::BIND_NORM_DATA - * FormEvents::PRE_SET_DATA now replaces FormEvents::SET_DATA - * FormEvents::PRE_BIND now replaces FormEvents::BIND_CLIENT_DATA - * deprecated FormEvents::SET_DATA, FormEvents::BIND_CLIENT_DATA and - FormEvents::BIND_NORM_DATA - * [BC BREAK] reversed the order of the first two arguments to `createNamed` - and `createNamedBuilder` in `FormFactoryInterface` - * deprecated `getChildren` in Form and FormBuilder in favor of `all` - * deprecated `hasChildren` in Form and FormBuilder in favor of `count` - * FormBuilder now implements \IteratorAggregate - * [BC BREAK] compound forms now always need a data mapper - * FormBuilder now maintains the order when explicitly adding form builders as children - * ChoiceType now doesn't add the empty value anymore if the choices already contain an empty element - * DateType, TimeType and DateTimeType now show empty values again if not required - * [BC BREAK] fixed rendering of errors for DateType, BirthdayType and similar ones - * [BC BREAK] fixed: form constraints are only validated if they belong to the validated group - * deprecated `bindRequest` in `Form` and replaced it by a listener to FormEvents::PRE_BIND - * fixed: the "data" option supersedes default values from the model - * changed DateType to refer to the "format" option for calculating the year and day choices instead - of padding them automatically - * [BC BREAK] DateType defaults to the format "yyyy-MM-dd" now if the widget is - "single_text", in order to support the HTML 5 date field out of the box - * added the option "format" to DateTimeType - * [BC BREAK] DateTimeType now outputs RFC 3339 dates by default, as generated and - consumed by HTML5 browsers, if the widget is "single_text" - * deprecated the options "data_timezone" and "user_timezone" in DateType, DateTimeType and TimeType - and renamed them to "model_timezone" and "view_timezone" - * fixed: TransformationFailedExceptions thrown in the model transformer are now caught by the form - * added FormRegistryInterface, ResolvedFormTypeInterface and ResolvedFormTypeFactoryInterface - * deprecated FormFactory methods - * `addType` - * `hasType` - * `getType` - * [BC BREAK] FormFactory now expects a FormRegistryInterface and a ResolvedFormTypeFactoryInterface as constructor argument - * [BC BREAK] The method `createBuilder` in FormTypeInterface is not supported anymore for performance reasons - * [BC BREAK] Removed `setTypes` from FormBuilder - * deprecated AbstractType methods - * `getExtensions` - * `setExtensions` - * ChoiceType now caches its created choice lists to improve performance - * [BC BREAK] Rows of a collection field cannot be themed individually anymore. All rows in the collection - field now have the same block names, which contains "entry" where it previously contained the row index. - * [BC BREAK] When registering a type through the DI extension, the tag alias has to match the actual type name. - * added FormRendererInterface, FormRendererEngineInterface and implementations of these interfaces - * [BC BREAK] removed the following methods from FormUtil: - * `toArrayKey` - * `toArrayKeys` - * `isChoiceGroup` - * `isChoiceSelected` - * [BC BREAK] renamed method `renderBlock` in FormHelper to `block` and changed its signature - * made FormView properties public and deprecated their accessor methods - * made the normalized data of a form accessible in the template through the variable "form.vars.data" - * made the original data of a choice accessible in the template through the property "choice.data" - * added convenience class Forms and FormFactoryBuilderInterface diff --git a/lib/symfony/form/CallbackTransformer.php b/lib/symfony/form/CallbackTransformer.php deleted file mode 100644 index 5125214ff..000000000 --- a/lib/symfony/form/CallbackTransformer.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -class CallbackTransformer implements DataTransformerInterface -{ - private $transform; - private $reverseTransform; - - /** - * @param callable $transform The forward transform callback - * @param callable $reverseTransform The reverse transform callback - */ - public function __construct(callable $transform, callable $reverseTransform) - { - $this->transform = $transform; - $this->reverseTransform = $reverseTransform; - } - - /** - * {@inheritdoc} - */ - public function transform($data) - { - return ($this->transform)($data); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($data) - { - return ($this->reverseTransform)($data); - } -} diff --git a/lib/symfony/form/ChoiceList/ArrayChoiceList.php b/lib/symfony/form/ChoiceList/ArrayChoiceList.php deleted file mode 100644 index e5056d897..000000000 --- a/lib/symfony/form/ChoiceList/ArrayChoiceList.php +++ /dev/null @@ -1,238 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -/** - * A list of choices with arbitrary data types. - * - * The user of this class is responsible for assigning string values to the - * choices and for their uniqueness. - * Both the choices and their values are passed to the constructor. - * Each choice must have a corresponding value (with the same key) in - * the values array. - * - * @author Bernhard Schussek - */ -class ArrayChoiceList implements ChoiceListInterface -{ - /** - * The choices in the list. - * - * @var array - */ - protected $choices; - - /** - * The values indexed by the original keys. - * - * @var array - */ - protected $structuredValues; - - /** - * The original keys of the choices array. - * - * @var int[]|string[] - */ - protected $originalKeys; - protected $valueCallback; - - /** - * Creates a list with the given choices and values. - * - * The given choice array must have the same array keys as the value array. - * - * @param iterable $choices The selectable choices - * @param callable|null $value The callable for creating the value - * for a choice. If `null` is passed, - * incrementing integers are used as - * values - */ - public function __construct(iterable $choices, callable $value = null) - { - if ($choices instanceof \Traversable) { - $choices = iterator_to_array($choices); - } - - if (null === $value && $this->castableToString($choices)) { - $value = function ($choice) { - return false === $choice ? '0' : (string) $choice; - }; - } - - if (null !== $value) { - // If a deterministic value generator was passed, use it later - $this->valueCallback = $value; - } else { - // Otherwise generate incrementing integers as values - $i = 0; - $value = function () use (&$i) { - return $i++; - }; - } - - // If the choices are given as recursive array (i.e. with explicit - // choice groups), flatten the array. The grouping information is needed - // in the view only. - $this->flatten($choices, $value, $choicesByValues, $keysByValues, $structuredValues); - - $this->choices = $choicesByValues; - $this->originalKeys = $keysByValues; - $this->structuredValues = $structuredValues; - } - - /** - * {@inheritdoc} - */ - public function getChoices() - { - return $this->choices; - } - - /** - * {@inheritdoc} - */ - public function getValues() - { - return array_map('strval', array_keys($this->choices)); - } - - /** - * {@inheritdoc} - */ - public function getStructuredValues() - { - return $this->structuredValues; - } - - /** - * {@inheritdoc} - */ - public function getOriginalKeys() - { - return $this->originalKeys; - } - - /** - * {@inheritdoc} - */ - public function getChoicesForValues(array $values) - { - $choices = []; - - foreach ($values as $i => $givenValue) { - if (\array_key_exists($givenValue, $this->choices)) { - $choices[$i] = $this->choices[$givenValue]; - } - } - - return $choices; - } - - /** - * {@inheritdoc} - */ - public function getValuesForChoices(array $choices) - { - $values = []; - - // Use the value callback to compare choices by their values, if present - if ($this->valueCallback) { - $givenValues = []; - - foreach ($choices as $i => $givenChoice) { - $givenValues[$i] = (string) ($this->valueCallback)($givenChoice); - } - - return array_intersect($givenValues, array_keys($this->choices)); - } - - // Otherwise compare choices by identity - foreach ($choices as $i => $givenChoice) { - foreach ($this->choices as $value => $choice) { - if ($choice === $givenChoice) { - $values[$i] = (string) $value; - break; - } - } - } - - return $values; - } - - /** - * Flattens an array into the given output variables. - * - * @param array $choices The array to flatten - * @param callable $value The callable for generating choice values - * @param array|null $choicesByValues The flattened choices indexed by the - * corresponding values - * @param array|null $keysByValues The original keys indexed by the - * corresponding values - * @param array|null $structuredValues The values indexed by the original keys - * - * @internal - */ - protected function flatten(array $choices, callable $value, ?array &$choicesByValues, ?array &$keysByValues, ?array &$structuredValues) - { - if (null === $choicesByValues) { - $choicesByValues = []; - $keysByValues = []; - $structuredValues = []; - } - - foreach ($choices as $key => $choice) { - if (\is_array($choice)) { - $this->flatten($choice, $value, $choicesByValues, $keysByValues, $structuredValues[$key]); - - continue; - } - - $choiceValue = (string) $value($choice); - $choicesByValues[$choiceValue] = $choice; - $keysByValues[$choiceValue] = $key; - $structuredValues[$key] = $choiceValue; - } - } - - /** - * Checks whether the given choices can be cast to strings without - * generating duplicates. - * This method is responsible for preventing conflict between scalar values - * and the empty value. - */ - private function castableToString(array $choices, array &$cache = []): bool - { - foreach ($choices as $choice) { - if (\is_array($choice)) { - if (!$this->castableToString($choice, $cache)) { - return false; - } - - continue; - } elseif (!\is_scalar($choice)) { - return false; - } - - // prevent having false casted to the empty string by isset() - $choice = false === $choice ? '0' : (string) $choice; - - if (isset($cache[$choice])) { - return false; - } - - $cache[$choice] = true; - } - - return true; - } -} diff --git a/lib/symfony/form/ChoiceList/ChoiceList.php b/lib/symfony/form/ChoiceList/ChoiceList.php deleted file mode 100644 index df63c83d8..000000000 --- a/lib/symfony/form/ChoiceList/ChoiceList.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceAttr; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFieldName; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFilter; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLabel; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLoader; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceTranslationParameters; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceValue; -use Symfony\Component\Form\ChoiceList\Factory\Cache\GroupBy; -use Symfony\Component\Form\ChoiceList\Factory\Cache\PreferredChoice; -use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A set of convenient static methods to create cacheable choice list options. - * - * @author Jules Pietri - */ -final class ChoiceList -{ - /** - * Creates a cacheable loader from any callable providing iterable choices. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $choices A callable that must return iterable choices or grouped choices - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the loader - */ - public static function lazy($formType, callable $choices, $vary = null): ChoiceLoader - { - return self::loader($formType, new CallbackChoiceLoader($choices), $vary); - } - - /** - * Decorates a loader to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param ChoiceLoaderInterface $loader A loader responsible for creating loading choices or grouped choices - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the loader - */ - public static function loader($formType, ChoiceLoaderInterface $loader, $vary = null): ChoiceLoader - { - return new ChoiceLoader($formType, $loader, $vary); - } - - /** - * Decorates a "choice_value" callback to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $value Any pseudo callable to create a unique string value from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function value($formType, $value, $vary = null): ChoiceValue - { - return new ChoiceValue($formType, $value, $vary); - } - - /** - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $filter Any pseudo callable to filter a choice list - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function filter($formType, $filter, $vary = null): ChoiceFilter - { - return new ChoiceFilter($formType, $filter, $vary); - } - - /** - * Decorates a "choice_label" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|false $label Any pseudo callable to create a label from a choice or false to discard it - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function label($formType, $label, $vary = null): ChoiceLabel - { - return new ChoiceLabel($formType, $label, $vary); - } - - /** - * Decorates a "choice_name" callback to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $fieldName Any pseudo callable to create a field name from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function fieldName($formType, $fieldName, $vary = null): ChoiceFieldName - { - return new ChoiceFieldName($formType, $fieldName, $vary); - } - - /** - * Decorates a "choice_attr" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|array $attr Any pseudo callable or array to create html attributes from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function attr($formType, $attr, $vary = null): ChoiceAttr - { - return new ChoiceAttr($formType, $attr, $vary); - } - - /** - * Decorates a "choice_translation_parameters" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|array $translationParameters Any pseudo callable or array to create translation parameters from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function translationParameters($formType, $translationParameters, $vary = null): ChoiceTranslationParameters - { - return new ChoiceTranslationParameters($formType, $translationParameters, $vary); - } - - /** - * Decorates a "group_by" callback to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $groupBy Any pseudo callable to return a group name from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function groupBy($formType, $groupBy, $vary = null): GroupBy - { - return new GroupBy($formType, $groupBy, $vary); - } - - /** - * Decorates a "preferred_choices" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|array $preferred Any pseudo callable or array to return a group name from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function preferred($formType, $preferred, $vary = null): PreferredChoice - { - return new PreferredChoice($formType, $preferred, $vary); - } - - /** - * Should not be instantiated. - */ - private function __construct() - { - } -} diff --git a/lib/symfony/form/ChoiceList/ChoiceListInterface.php b/lib/symfony/form/ChoiceList/ChoiceListInterface.php deleted file mode 100644 index 8bf6f95d7..000000000 --- a/lib/symfony/form/ChoiceList/ChoiceListInterface.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -/** - * A list of choices that can be selected in a choice field. - * - * A choice list assigns unique string values to each of a list of choices. - * These string values are displayed in the "value" attributes in HTML and - * submitted back to the server. - * - * The acceptable data types for the choices depend on the implementation. - * Values must always be strings and (within the list) free of duplicates. - * - * @author Bernhard Schussek - */ -interface ChoiceListInterface -{ - /** - * Returns all selectable choices. - * - * @return array The selectable choices indexed by the corresponding values - */ - public function getChoices(); - - /** - * Returns the values for the choices. - * - * The values are strings that do not contain duplicates: - * - * $form->add('field', 'choice', [ - * 'choices' => [ - * 'Decided' => ['Yes' => true, 'No' => false], - * 'Undecided' => ['Maybe' => null], - * ], - * ]); - * - * In this example, the result of this method is: - * - * [ - * 'Yes' => '0', - * 'No' => '1', - * 'Maybe' => '2', - * ] - * - * Null and false MUST NOT conflict when being casted to string. - * For this some default incremented values SHOULD be computed. - * - * @return string[] - */ - public function getValues(); - - /** - * Returns the values in the structure originally passed to the list. - * - * Contrary to {@link getValues()}, the result is indexed by the original - * keys of the choices. If the original array contained nested arrays, these - * nested arrays are represented here as well: - * - * $form->add('field', 'choice', [ - * 'choices' => [ - * 'Decided' => ['Yes' => true, 'No' => false], - * 'Undecided' => ['Maybe' => null], - * ], - * ]); - * - * In this example, the result of this method is: - * - * [ - * 'Decided' => ['Yes' => '0', 'No' => '1'], - * 'Undecided' => ['Maybe' => '2'], - * ] - * - * Nested arrays do not make sense in a view format unless - * they are used as a convenient way of grouping. - * If the implementation does not intend to support grouped choices, - * this method SHOULD be equivalent to {@link getValues()}. - * The $groupBy callback parameter SHOULD be used instead. - * - * @return string[] - */ - public function getStructuredValues(); - - /** - * Returns the original keys of the choices. - * - * The original keys are the keys of the choice array that was passed in the - * "choice" option of the choice type. Note that this array may contain - * duplicates if the "choice" option contained choice groups: - * - * $form->add('field', 'choice', [ - * 'choices' => [ - * 'Decided' => [true, false], - * 'Undecided' => [null], - * ], - * ]); - * - * In this example, the original key 0 appears twice, once for `true` and - * once for `null`. - * - * @return int[]|string[] The original choice keys indexed by the - * corresponding choice values - */ - public function getOriginalKeys(); - - /** - * Returns the choices corresponding to the given values. - * - * The choices are returned with the same keys and in the same order as the - * corresponding values in the given array. - * - * @param string[] $values An array of choice values. Non-existing values in - * this array are ignored - * - * @return array - */ - public function getChoicesForValues(array $values); - - /** - * Returns the values corresponding to the given choices. - * - * The values are returned with the same keys and in the same order as the - * corresponding choices in the given array. - * - * @param array $choices An array of choices. Non-existing choices in this - * array are ignored - * - * @return string[] - */ - public function getValuesForChoices(array $choices); -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php b/lib/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php deleted file mode 100644 index 42b31e027..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A template decorator for static {@see ChoiceType} options. - * - * Used as fly weight for {@see CachingFactoryDecorator}. - * - * @internal - * - * @author Jules Pietri - */ -abstract class AbstractStaticOption -{ - private static $options = []; - - /** @var bool|callable|string|array|\Closure|ChoiceLoaderInterface */ - private $option; - - /** - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param mixed $option Any pseudo callable, array, string or bool to define a choice list option - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - final public function __construct($formType, $option, $vary = null) - { - if (!$formType instanceof FormTypeInterface && !$formType instanceof FormTypeExtensionInterface) { - throw new \TypeError(sprintf('Expected an instance of "%s" or "%s", but got "%s".', FormTypeInterface::class, FormTypeExtensionInterface::class, get_debug_type($formType))); - } - - $hash = CachingFactoryDecorator::generateHash([static::class, $formType, $vary]); - - $this->option = self::$options[$hash] ?? self::$options[$hash] = $option; - } - - /** - * @return mixed - */ - final public function getOption() - { - return $this->option; - } - - final public static function reset(): void - { - self::$options = []; - } -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php b/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php deleted file mode 100644 index 8de6956d1..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_attr" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceAttr extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php b/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php deleted file mode 100644 index 0c71e2050..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_name" callback. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceFieldName extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php b/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php deleted file mode 100644 index 13b8cd8ed..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_filter" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceFilter extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php b/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php deleted file mode 100644 index 664a09081..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_label" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceLabel extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php b/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php deleted file mode 100644 index 83b2ca0aa..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_loader" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceLoader extends AbstractStaticOption implements ChoiceLoaderInterface -{ - /** - * {@inheritdoc} - */ - public function loadChoiceList(callable $value = null): ChoiceListInterface - { - return $this->getOption()->loadChoiceList($value); - } - - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null): array - { - return $this->getOption()->loadChoicesForValues($values, $value); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null): array - { - return $this->getOption()->loadValuesForChoices($choices, $value); - } -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php b/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php deleted file mode 100644 index e9ab5c711..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_translation_parameters" option. - * - * @internal - * - * @author Vincent Langlet - */ -final class ChoiceTranslationParameters extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php b/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php deleted file mode 100644 index d96f1e9e8..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_value" callback. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceValue extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/GroupBy.php b/lib/symfony/form/ChoiceList/Factory/Cache/GroupBy.php deleted file mode 100644 index 2ad492caf..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/GroupBy.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "group_by" callback. - * - * @internal - * - * @author Jules Pietri - */ -final class GroupBy extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php b/lib/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php deleted file mode 100644 index 4aefd69ab..000000000 --- a/lib/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "preferred_choices" option. - * - * @internal - * - * @author Jules Pietri - */ -final class PreferredChoice extends AbstractStaticOption -{ -} diff --git a/lib/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php b/lib/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php deleted file mode 100644 index 912cab4e2..000000000 --- a/lib/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php +++ /dev/null @@ -1,254 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Caches the choice lists created by the decorated factory. - * - * To cache a list based on its options, arguments must be decorated - * by a {@see Cache\AbstractStaticOption} implementation. - * - * @author Bernhard Schussek - * @author Jules Pietri - */ -class CachingFactoryDecorator implements ChoiceListFactoryInterface, ResetInterface -{ - private $decoratedFactory; - - /** - * @var ChoiceListInterface[] - */ - private $lists = []; - - /** - * @var ChoiceListView[] - */ - private $views = []; - - /** - * Generates a SHA-256 hash for the given value. - * - * Optionally, a namespace string can be passed. Calling this method will - * the same values, but different namespaces, will return different hashes. - * - * @param mixed $value The value to hash - * - * @return string The SHA-256 hash - * - * @internal - */ - public static function generateHash($value, string $namespace = ''): string - { - if (\is_object($value)) { - $value = spl_object_hash($value); - } elseif (\is_array($value)) { - array_walk_recursive($value, function (&$v) { - if (\is_object($v)) { - $v = spl_object_hash($v); - } - }); - } - - return hash('sha256', $namespace.':'.serialize($value)); - } - - public function __construct(ChoiceListFactoryInterface $decoratedFactory) - { - $this->decoratedFactory = $decoratedFactory; - } - - /** - * Returns the decorated factory. - * - * @return ChoiceListFactoryInterface - */ - public function getDecoratedFactory() - { - return $this->decoratedFactory; - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - */ - public function createListFromChoices(iterable $choices, $value = null/* , $filter = null */) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if ($choices instanceof \Traversable) { - $choices = iterator_to_array($choices); - } - - $cache = true; - // Only cache per value and filter when needed. The value is not validated on purpose. - // The decorated factory may decide which values to accept and which not. - if ($value instanceof Cache\ChoiceValue) { - $value = $value->getOption(); - } elseif ($value) { - $cache = false; - } - if ($filter instanceof Cache\ChoiceFilter) { - $filter = $filter->getOption(); - } elseif ($filter) { - $cache = false; - } - - if (!$cache) { - return $this->decoratedFactory->createListFromChoices($choices, $value, $filter); - } - - $hash = self::generateHash([$choices, $value, $filter], 'fromChoices'); - - if (!isset($this->lists[$hash])) { - $this->lists[$hash] = $this->decoratedFactory->createListFromChoices($choices, $value, $filter); - } - - return $this->lists[$hash]; - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null/* , $filter = null */) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - $cache = true; - - if ($loader instanceof Cache\ChoiceLoader) { - $loader = $loader->getOption(); - } else { - $cache = false; - } - - if ($value instanceof Cache\ChoiceValue) { - $value = $value->getOption(); - } elseif ($value) { - $cache = false; - } - - if ($filter instanceof Cache\ChoiceFilter) { - $filter = $filter->getOption(); - } elseif ($filter) { - $cache = false; - } - - if (!$cache) { - return $this->decoratedFactory->createListFromLoader($loader, $value, $filter); - } - - $hash = self::generateHash([$loader, $value, $filter], 'fromLoader'); - - if (!isset($this->lists[$hash])) { - $this->lists[$hash] = $this->decoratedFactory->createListFromLoader($loader, $value, $filter); - } - - return $this->lists[$hash]; - } - - /** - * {@inheritdoc} - * - * @param mixed $preferredChoices - * @param mixed $label - * @param mixed $index - * @param mixed $groupBy - * @param mixed $attr - * @param mixed $labelTranslationParameters - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, $index = null, $groupBy = null, $attr = null/* , $labelTranslationParameters = [] */) - { - $labelTranslationParameters = \func_num_args() > 6 ? func_get_arg(6) : []; - $cache = true; - - if ($preferredChoices instanceof Cache\PreferredChoice) { - $preferredChoices = $preferredChoices->getOption(); - } elseif ($preferredChoices) { - $cache = false; - } - - if ($label instanceof Cache\ChoiceLabel) { - $label = $label->getOption(); - } elseif (null !== $label) { - $cache = false; - } - - if ($index instanceof Cache\ChoiceFieldName) { - $index = $index->getOption(); - } elseif ($index) { - $cache = false; - } - - if ($groupBy instanceof Cache\GroupBy) { - $groupBy = $groupBy->getOption(); - } elseif ($groupBy) { - $cache = false; - } - - if ($attr instanceof Cache\ChoiceAttr) { - $attr = $attr->getOption(); - } elseif ($attr) { - $cache = false; - } - - if ($labelTranslationParameters instanceof Cache\ChoiceTranslationParameters) { - $labelTranslationParameters = $labelTranslationParameters->getOption(); - } elseif ([] !== $labelTranslationParameters) { - $cache = false; - } - - if (!$cache) { - return $this->decoratedFactory->createView( - $list, - $preferredChoices, - $label, - $index, - $groupBy, - $attr, - $labelTranslationParameters - ); - } - - $hash = self::generateHash([$list, $preferredChoices, $label, $index, $groupBy, $attr, $labelTranslationParameters]); - - if (!isset($this->views[$hash])) { - $this->views[$hash] = $this->decoratedFactory->createView( - $list, - $preferredChoices, - $label, - $index, - $groupBy, - $attr, - $labelTranslationParameters - ); - } - - return $this->views[$hash]; - } - - public function reset() - { - $this->lists = []; - $this->views = []; - Cache\AbstractStaticOption::reset(); - } -} diff --git a/lib/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php b/lib/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php deleted file mode 100644 index 1c08d812a..000000000 --- a/lib/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; - -/** - * Creates {@link ChoiceListInterface} instances. - * - * @author Bernhard Schussek - */ -interface ChoiceListFactoryInterface -{ - /** - * Creates a choice list for the given choices. - * - * The choices should be passed in the values of the choices array. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param callable|null $filter The callable filtering the choices - * - * @return ChoiceListInterface - */ - public function createListFromChoices(iterable $choices, callable $value = null/* , callable $filter = null */); - - /** - * Creates a choice list that is loaded with the given loader. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param callable|null $filter The callable filtering the choices - * - * @return ChoiceListInterface - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null/* , callable $filter = null */); - - /** - * Creates a view for the given choice list. - * - * Callables may be passed for all optional arguments. The callables receive - * the choice as first and the array key as the second argument. - * - * * The callable for the label and the name should return the generated - * label/choice name. - * * The callable for the preferred choices should return true or false, - * depending on whether the choice should be preferred or not. - * * The callable for the grouping should return the group name or null if - * a choice should not be grouped. - * * The callable for the attributes should return an array of HTML - * attributes that will be inserted in the tag of the choice. - * - * If no callable is passed, the labels will be generated from the choice - * keys. The view indices will be generated using an incrementing integer - * by default. - * - * The preferred choices can also be passed as array. Each choice that is - * contained in that array will be marked as preferred. - * - * The attributes can be passed as multi-dimensional array. The keys should - * match the keys of the choices. The values should be arrays of HTML - * attributes that should be added to the respective choice. - * - * @param array|callable|null $preferredChoices The preferred choices - * @param callable|false|null $label The callable generating the choice labels; - * pass false to discard the label - * @param array|callable|null $attr The callable generating the HTML attributes - * @param array|callable $labelTranslationParameters The parameters used to translate the choice labels - * - * @return ChoiceListView - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, callable $index = null, callable $groupBy = null, $attr = null/* , $labelTranslationParameters = [] */); -} diff --git a/lib/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php b/lib/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php deleted file mode 100644 index 9a244e542..000000000 --- a/lib/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php +++ /dev/null @@ -1,322 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ArrayChoiceList; -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\LazyChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\Loader\FilterChoiceLoaderDecorator; -use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Component\Form\ChoiceList\View\ChoiceView; -use Symfony\Component\Translation\TranslatableMessage; - -/** - * Default implementation of {@link ChoiceListFactoryInterface}. - * - * @author Bernhard Schussek - * @author Jules Pietri - */ -class DefaultChoiceListFactory implements ChoiceListFactoryInterface -{ - /** - * {@inheritdoc} - * - * @param callable|null $filter - */ - public function createListFromChoices(iterable $choices, callable $value = null/* , callable $filter = null */) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if ($filter) { - // filter the choice list lazily - return $this->createListFromLoader(new FilterChoiceLoaderDecorator( - new CallbackChoiceLoader(static function () use ($choices) { - return $choices; - } - ), $filter), $value); - } - - return new ArrayChoiceList($choices, $value); - } - - /** - * {@inheritdoc} - * - * @param callable|null $filter - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null/* , callable $filter = null */) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if ($filter) { - $loader = new FilterChoiceLoaderDecorator($loader, $filter); - } - - return new LazyChoiceList($loader, $value); - } - - /** - * {@inheritdoc} - * - * @param array|callable $labelTranslationParameters The parameters used to translate the choice labels - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, callable $index = null, callable $groupBy = null, $attr = null/* , $labelTranslationParameters = [] */) - { - $labelTranslationParameters = \func_num_args() > 6 ? func_get_arg(6) : []; - $preferredViews = []; - $preferredViewsOrder = []; - $otherViews = []; - $choices = $list->getChoices(); - $keys = $list->getOriginalKeys(); - - if (!\is_callable($preferredChoices)) { - if (empty($preferredChoices)) { - $preferredChoices = null; - } else { - // make sure we have keys that reflect order - $preferredChoices = array_values($preferredChoices); - $preferredChoices = static function ($choice) use ($preferredChoices) { - return array_search($choice, $preferredChoices, true); - }; - } - } - - // The names are generated from an incrementing integer by default - if (null === $index) { - $index = 0; - } - - // If $groupBy is a callable returning a string - // choices are added to the group with the name returned by the callable. - // If $groupBy is a callable returning an array - // choices are added to the groups with names returned by the callable - // If the callable returns null, the choice is not added to any group - if (\is_callable($groupBy)) { - foreach ($choices as $value => $choice) { - self::addChoiceViewsGroupedByCallable( - $groupBy, - $choice, - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $preferredChoices, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - } - - // Remove empty group views that may have been created by - // addChoiceViewsGroupedByCallable() - foreach ($preferredViews as $key => $view) { - if ($view instanceof ChoiceGroupView && 0 === \count($view->choices)) { - unset($preferredViews[$key]); - } - } - - foreach ($otherViews as $key => $view) { - if ($view instanceof ChoiceGroupView && 0 === \count($view->choices)) { - unset($otherViews[$key]); - } - } - - foreach ($preferredViewsOrder as $key => $groupViewsOrder) { - if ($groupViewsOrder) { - $preferredViewsOrder[$key] = min($groupViewsOrder); - } else { - unset($preferredViewsOrder[$key]); - } - } - } else { - // Otherwise use the original structure of the choices - self::addChoiceViewsFromStructuredValues( - $list->getStructuredValues(), - $label, - $choices, - $keys, - $index, - $attr, - $labelTranslationParameters, - $preferredChoices, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - } - - uksort($preferredViews, static function ($a, $b) use ($preferredViewsOrder): int { - return isset($preferredViewsOrder[$a], $preferredViewsOrder[$b]) - ? $preferredViewsOrder[$a] <=> $preferredViewsOrder[$b] - : 0; - }); - - return new ChoiceListView($otherViews, $preferredViews); - } - - private static function addChoiceView($choice, string $value, $label, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews) - { - // $value may be an integer or a string, since it's stored in the array - // keys. We want to guarantee it's a string though. - $key = $keys[$value]; - $nextIndex = \is_int($index) ? $index++ : $index($choice, $key, $value); - - // BC normalize label to accept a false value - if (null === $label) { - // If the labels are null, use the original choice key by default - $label = (string) $key; - } elseif (false !== $label) { - // If "choice_label" is set to false and "expanded" is true, the value false - // should be passed on to the "label" option of the checkboxes/radio buttons - $dynamicLabel = $label($choice, $key, $value); - - if (false === $dynamicLabel) { - $label = false; - } elseif ($dynamicLabel instanceof TranslatableMessage) { - $label = $dynamicLabel; - } else { - $label = (string) $dynamicLabel; - } - } - - $view = new ChoiceView( - $choice, - $value, - $label, - // The attributes may be a callable or a mapping from choice indices - // to nested arrays - \is_callable($attr) ? $attr($choice, $key, $value) : ($attr[$key] ?? []), - // The label translation parameters may be a callable or a mapping from choice indices - // to nested arrays - \is_callable($labelTranslationParameters) ? $labelTranslationParameters($choice, $key, $value) : ($labelTranslationParameters[$key] ?? []) - ); - - // $isPreferred may be null if no choices are preferred - if (null !== $isPreferred && false !== $preferredKey = $isPreferred($choice, $key, $value)) { - $preferredViews[$nextIndex] = $view; - $preferredViewsOrder[$nextIndex] = $preferredKey; - } - - $otherViews[$nextIndex] = $view; - } - - private static function addChoiceViewsFromStructuredValues(array $values, $label, array $choices, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews) - { - foreach ($values as $key => $value) { - if (null === $value) { - continue; - } - - // Add the contents of groups to new ChoiceGroupView instances - if (\is_array($value)) { - $preferredViewsForGroup = []; - $otherViewsForGroup = []; - - self::addChoiceViewsFromStructuredValues( - $value, - $label, - $choices, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViewsForGroup, - $preferredViewsOrder, - $otherViewsForGroup - ); - - if (\count($preferredViewsForGroup) > 0) { - $preferredViews[$key] = new ChoiceGroupView($key, $preferredViewsForGroup); - } - - if (\count($otherViewsForGroup) > 0) { - $otherViews[$key] = new ChoiceGroupView($key, $otherViewsForGroup); - } - - continue; - } - - // Add ungrouped items directly - self::addChoiceView( - $choices[$value], - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - } - } - - private static function addChoiceViewsGroupedByCallable(callable $groupBy, $choice, string $value, $label, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews) - { - $groupLabels = $groupBy($choice, $keys[$value], $value); - - if (null === $groupLabels) { - // If the callable returns null, don't group the choice - self::addChoiceView( - $choice, - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - - return; - } - - $groupLabels = \is_array($groupLabels) ? array_map('strval', $groupLabels) : [(string) $groupLabels]; - - foreach ($groupLabels as $groupLabel) { - // Initialize the group views if necessary. Unnecessarily built group - // views will be cleaned up at the end of createView() - if (!isset($preferredViews[$groupLabel])) { - $preferredViews[$groupLabel] = new ChoiceGroupView($groupLabel); - $otherViews[$groupLabel] = new ChoiceGroupView($groupLabel); - } - if (!isset($preferredViewsOrder[$groupLabel])) { - $preferredViewsOrder[$groupLabel] = []; - } - - self::addChoiceView( - $choice, - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViews[$groupLabel]->choices, - $preferredViewsOrder[$groupLabel], - $otherViews[$groupLabel]->choices - ); - } - } -} diff --git a/lib/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php b/lib/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php deleted file mode 100644 index 2f1ec6475..000000000 --- a/lib/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php +++ /dev/null @@ -1,239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Adds property path support to a choice list factory. - * - * Pass the decorated factory to the constructor: - * - * $decorator = new PropertyAccessDecorator($factory); - * - * You can now pass property paths for generating choice values, labels, view - * indices, HTML attributes and for determining the preferred choices and the - * choice groups: - * - * // extract values from the $value property - * $list = $createListFromChoices($objects, 'value'); - * - * @author Bernhard Schussek - */ -class PropertyAccessDecorator implements ChoiceListFactoryInterface -{ - private $decoratedFactory; - private $propertyAccessor; - - public function __construct(ChoiceListFactoryInterface $decoratedFactory, PropertyAccessorInterface $propertyAccessor = null) - { - $this->decoratedFactory = $decoratedFactory; - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - } - - /** - * Returns the decorated factory. - * - * @return ChoiceListFactoryInterface - */ - public function getDecoratedFactory() - { - return $this->decoratedFactory; - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - * - * @return ChoiceListInterface - */ - public function createListFromChoices(iterable $choices, $value = null/* , $filter = null */) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if (\is_string($value)) { - $value = new PropertyPath($value); - } - - if ($value instanceof PropertyPathInterface) { - $accessor = $this->propertyAccessor; - $value = function ($choice) use ($accessor, $value) { - // The callable may be invoked with a non-object/array value - // when such values are passed to - // ChoiceListInterface::getValuesForChoices(). Handle this case - // so that the call to getValue() doesn't break. - return \is_object($choice) || \is_array($choice) ? $accessor->getValue($choice, $value) : null; - }; - } - - if (\is_string($filter)) { - $filter = new PropertyPath($filter); - } - - if ($filter instanceof PropertyPath) { - $accessor = $this->propertyAccessor; - $filter = static function ($choice) use ($accessor, $filter) { - return (\is_object($choice) || \is_array($choice)) && $accessor->getValue($choice, $filter); - }; - } - - return $this->decoratedFactory->createListFromChoices($choices, $value, $filter); - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - * - * @return ChoiceListInterface - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null/* , $filter = null */) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if (\is_string($value)) { - $value = new PropertyPath($value); - } - - if ($value instanceof PropertyPathInterface) { - $accessor = $this->propertyAccessor; - $value = function ($choice) use ($accessor, $value) { - // The callable may be invoked with a non-object/array value - // when such values are passed to - // ChoiceListInterface::getValuesForChoices(). Handle this case - // so that the call to getValue() doesn't break. - return \is_object($choice) || \is_array($choice) ? $accessor->getValue($choice, $value) : null; - }; - } - - if (\is_string($filter)) { - $filter = new PropertyPath($filter); - } - - if ($filter instanceof PropertyPath) { - $accessor = $this->propertyAccessor; - $filter = static function ($choice) use ($accessor, $filter) { - return (\is_object($choice) || \is_array($choice)) && $accessor->getValue($choice, $filter); - }; - } - - return $this->decoratedFactory->createListFromLoader($loader, $value, $filter); - } - - /** - * {@inheritdoc} - * - * @param mixed $preferredChoices - * @param mixed $label - * @param mixed $index - * @param mixed $groupBy - * @param mixed $attr - * @param mixed $labelTranslationParameters - * - * @return ChoiceListView - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, $index = null, $groupBy = null, $attr = null/* , $labelTranslationParameters = [] */) - { - $labelTranslationParameters = \func_num_args() > 6 ? func_get_arg(6) : []; - $accessor = $this->propertyAccessor; - - if (\is_string($label)) { - $label = new PropertyPath($label); - } - - if ($label instanceof PropertyPathInterface) { - $label = function ($choice) use ($accessor, $label) { - return $accessor->getValue($choice, $label); - }; - } - - if (\is_string($preferredChoices)) { - $preferredChoices = new PropertyPath($preferredChoices); - } - - if ($preferredChoices instanceof PropertyPathInterface) { - $preferredChoices = function ($choice) use ($accessor, $preferredChoices) { - try { - return $accessor->getValue($choice, $preferredChoices); - } catch (UnexpectedTypeException $e) { - // Assume not preferred if not readable - return false; - } - }; - } - - if (\is_string($index)) { - $index = new PropertyPath($index); - } - - if ($index instanceof PropertyPathInterface) { - $index = function ($choice) use ($accessor, $index) { - return $accessor->getValue($choice, $index); - }; - } - - if (\is_string($groupBy)) { - $groupBy = new PropertyPath($groupBy); - } - - if ($groupBy instanceof PropertyPathInterface) { - $groupBy = function ($choice) use ($accessor, $groupBy) { - try { - return $accessor->getValue($choice, $groupBy); - } catch (UnexpectedTypeException $e) { - // Don't group if path is not readable - return null; - } - }; - } - - if (\is_string($attr)) { - $attr = new PropertyPath($attr); - } - - if ($attr instanceof PropertyPathInterface) { - $attr = function ($choice) use ($accessor, $attr) { - return $accessor->getValue($choice, $attr); - }; - } - - if (\is_string($labelTranslationParameters)) { - $labelTranslationParameters = new PropertyPath($labelTranslationParameters); - } - - if ($labelTranslationParameters instanceof PropertyPath) { - $labelTranslationParameters = static function ($choice) use ($accessor, $labelTranslationParameters) { - return $accessor->getValue($choice, $labelTranslationParameters); - }; - } - - return $this->decoratedFactory->createView( - $list, - $preferredChoices, - $label, - $index, - $groupBy, - $attr, - $labelTranslationParameters - ); - } -} diff --git a/lib/symfony/form/ChoiceList/LazyChoiceList.php b/lib/symfony/form/ChoiceList/LazyChoiceList.php deleted file mode 100644 index ab4c103e8..000000000 --- a/lib/symfony/form/ChoiceList/LazyChoiceList.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; - -/** - * A choice list that loads its choices lazily. - * - * The choices are fetched using a {@link ChoiceLoaderInterface} instance. - * If only {@link getChoicesForValues()} or {@link getValuesForChoices()} is - * called, the choice list is only loaded partially for improved performance. - * - * Once {@link getChoices()} or {@link getValues()} is called, the list is - * loaded fully. - * - * @author Bernhard Schussek - */ -class LazyChoiceList implements ChoiceListInterface -{ - private $loader; - - /** - * The callable creating string values for each choice. - * - * If null, choices are cast to strings. - * - * @var callable|null - */ - private $value; - - /** - * Creates a lazily-loaded list using the given loader. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as first and the array key as the second - * argument. - * - * @param callable|null $value The callable generating the choice values - */ - public function __construct(ChoiceLoaderInterface $loader, callable $value = null) - { - $this->loader = $loader; - $this->value = $value; - } - - /** - * {@inheritdoc} - */ - public function getChoices() - { - return $this->loader->loadChoiceList($this->value)->getChoices(); - } - - /** - * {@inheritdoc} - */ - public function getValues() - { - return $this->loader->loadChoiceList($this->value)->getValues(); - } - - /** - * {@inheritdoc} - */ - public function getStructuredValues() - { - return $this->loader->loadChoiceList($this->value)->getStructuredValues(); - } - - /** - * {@inheritdoc} - */ - public function getOriginalKeys() - { - return $this->loader->loadChoiceList($this->value)->getOriginalKeys(); - } - - /** - * {@inheritdoc} - */ - public function getChoicesForValues(array $values) - { - return $this->loader->loadChoicesForValues($values, $this->value); - } - - /** - * {@inheritdoc} - */ - public function getValuesForChoices(array $choices) - { - return $this->loader->loadValuesForChoices($choices, $this->value); - } -} diff --git a/lib/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php b/lib/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php deleted file mode 100644 index a98cc239f..000000000 --- a/lib/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -use Symfony\Component\Form\ChoiceList\ArrayChoiceList; -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; - -/** - * @author Jules Pietri - */ -abstract class AbstractChoiceLoader implements ChoiceLoaderInterface -{ - /** - * The loaded choices. - * - * @var iterable|null - */ - private $choices; - - /** - * @final - * - * {@inheritdoc} - */ - public function loadChoiceList(callable $value = null): ChoiceListInterface - { - return new ArrayChoiceList($this->choices ?? $this->choices = $this->loadChoices(), $value); - } - - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null) - { - if (!$values) { - return []; - } - - return $this->doLoadChoicesForValues($values, $value); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null) - { - if (!$choices) { - return []; - } - - if ($value) { - // if a value callback exists, use it - return array_map($value, $choices); - } - - return $this->doLoadValuesForChoices($choices); - } - - abstract protected function loadChoices(): iterable; - - protected function doLoadChoicesForValues(array $values, ?callable $value): array - { - return $this->loadChoiceList($value)->getChoicesForValues($values); - } - - protected function doLoadValuesForChoices(array $choices): array - { - return $this->loadChoiceList()->getValuesForChoices($choices); - } -} diff --git a/lib/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php b/lib/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php deleted file mode 100644 index 1811d434e..000000000 --- a/lib/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -/** - * Loads an {@link ArrayChoiceList} instance from a callable returning iterable choices. - * - * @author Jules Pietri - */ -class CallbackChoiceLoader extends AbstractChoiceLoader -{ - private $callback; - - /** - * @param callable $callback The callable returning iterable choices - */ - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - protected function loadChoices(): iterable - { - return ($this->callback)(); - } -} diff --git a/lib/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php b/lib/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php deleted file mode 100644 index 98e03bbe3..000000000 --- a/lib/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; - -/** - * Loads a choice list. - * - * The methods {@link loadChoicesForValues()} and {@link loadValuesForChoices()} - * can be used to load the list only partially in cases where a fully-loaded - * list is not necessary. - * - * @author Bernhard Schussek - */ -interface ChoiceLoaderInterface -{ - /** - * Loads a list of choices. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param callable|null $value The callable which generates the values - * from choices - * - * @return ChoiceListInterface - */ - public function loadChoiceList(callable $value = null); - - /** - * Loads the choices corresponding to the given values. - * - * The choices are returned with the same keys and in the same order as the - * corresponding values in the given array. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param string[] $values An array of choice values. Non-existing - * values in this array are ignored - * @param callable|null $value The callable generating the choice values - * - * @return array - */ - public function loadChoicesForValues(array $values, callable $value = null); - - /** - * Loads the values corresponding to the given choices. - * - * The values are returned with the same keys and in the same order as the - * corresponding choices in the given array. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param array $choices An array of choices. Non-existing choices in - * this array are ignored - * @param callable|null $value The callable generating the choice values - * - * @return string[] - */ - public function loadValuesForChoices(array $choices, callable $value = null); -} diff --git a/lib/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php b/lib/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php deleted file mode 100644 index 5e9314e2b..000000000 --- a/lib/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -/** - * A decorator to filter choices only when they are loaded or partially loaded. - * - * @author Jules Pietri - */ -class FilterChoiceLoaderDecorator extends AbstractChoiceLoader -{ - private $decoratedLoader; - private $filter; - - public function __construct(ChoiceLoaderInterface $loader, callable $filter) - { - $this->decoratedLoader = $loader; - $this->filter = $filter; - } - - protected function loadChoices(): iterable - { - $list = $this->decoratedLoader->loadChoiceList(); - - if (array_values($list->getValues()) === array_values($structuredValues = $list->getStructuredValues())) { - return array_filter(array_combine($list->getOriginalKeys(), $list->getChoices()), $this->filter); - } - - foreach ($structuredValues as $group => $values) { - if (\is_array($values)) { - if ($values && $filtered = array_filter($list->getChoicesForValues($values), $this->filter)) { - $choices[$group] = $filtered; - } - continue; - // filter empty groups - } - - if ($filtered = array_filter($list->getChoicesForValues([$values]), $this->filter)) { - $choices[$group] = $filtered[0]; - } - } - - return $choices ?? []; - } - - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null): array - { - return array_filter($this->decoratedLoader->loadChoicesForValues($values, $value), $this->filter); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null): array - { - return $this->decoratedLoader->loadValuesForChoices(array_filter($choices, $this->filter), $value); - } -} diff --git a/lib/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php b/lib/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php deleted file mode 100644 index 546937b90..000000000 --- a/lib/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -/** - * Callback choice loader optimized for Intl choice types. - * - * @author Jules Pietri - * @author Yonel Ceruto - */ -class IntlCallbackChoiceLoader extends CallbackChoiceLoader -{ - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null) - { - return parent::loadChoicesForValues(array_filter($values), $value); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null) - { - $choices = array_filter($choices); - - // If no callable is set, choices are the same as values - if (null === $value) { - return $choices; - } - - return parent::loadValuesForChoices($choices, $value); - } -} diff --git a/lib/symfony/form/ChoiceList/View/ChoiceGroupView.php b/lib/symfony/form/ChoiceList/View/ChoiceGroupView.php deleted file mode 100644 index 46b7d19e7..000000000 --- a/lib/symfony/form/ChoiceList/View/ChoiceGroupView.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\View; - -/** - * Represents a group of choices in templates. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class ChoiceGroupView implements \IteratorAggregate -{ - public $label; - public $choices; - - /** - * Creates a new choice group view. - * - * @param array $choices the choice views in the group - */ - public function __construct(string $label, array $choices = []) - { - $this->label = $label; - $this->choices = $choices; - } - - /** - * {@inheritdoc} - * - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->choices); - } -} diff --git a/lib/symfony/form/ChoiceList/View/ChoiceListView.php b/lib/symfony/form/ChoiceList/View/ChoiceListView.php deleted file mode 100644 index 586269b51..000000000 --- a/lib/symfony/form/ChoiceList/View/ChoiceListView.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\View; - -/** - * Represents a choice list in templates. - * - * A choice list contains choices and optionally preferred choices which are - * displayed in the very beginning of the list. Both choices and preferred - * choices may be grouped in {@link ChoiceGroupView} instances. - * - * @author Bernhard Schussek - */ -class ChoiceListView -{ - public $choices; - public $preferredChoices; - - /** - * Creates a new choice list view. - * - * @param ChoiceGroupView[]|ChoiceView[] $choices The choice views - * @param ChoiceGroupView[]|ChoiceView[] $preferredChoices the preferred choice views - */ - public function __construct(array $choices = [], array $preferredChoices = []) - { - $this->choices = $choices; - $this->preferredChoices = $preferredChoices; - } - - /** - * Returns whether a placeholder is in the choices. - * - * A placeholder must be the first child element, not be in a group and have an empty value. - * - * @return bool - */ - public function hasPlaceholder() - { - if ($this->preferredChoices) { - $firstChoice = reset($this->preferredChoices); - - return $firstChoice instanceof ChoiceView && '' === $firstChoice->value; - } - - $firstChoice = reset($this->choices); - - return $firstChoice instanceof ChoiceView && '' === $firstChoice->value; - } -} diff --git a/lib/symfony/form/ChoiceList/View/ChoiceView.php b/lib/symfony/form/ChoiceList/View/ChoiceView.php deleted file mode 100644 index e1d8ac92d..000000000 --- a/lib/symfony/form/ChoiceList/View/ChoiceView.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\View; - -use Symfony\Component\Translation\TranslatableMessage; - -/** - * Represents a choice in templates. - * - * @author Bernhard Schussek - */ -class ChoiceView -{ - public $label; - public $value; - public $data; - - /** - * Additional attributes for the HTML tag. - */ - public $attr; - - /** - * Additional parameters used to translate the label. - */ - public $labelTranslationParameters; - - /** - * Creates a new choice view. - * - * @param mixed $data The original choice - * @param string $value The view representation of the choice - * @param string|TranslatableMessage|false $label The label displayed to humans; pass false to discard the label - * @param array $attr Additional attributes for the HTML tag - * @param array $labelTranslationParameters Additional parameters used to translate the label - */ - public function __construct($data, string $value, $label, array $attr = [], array $labelTranslationParameters = []) - { - $this->data = $data; - $this->value = $value; - $this->label = $label; - $this->attr = $attr; - $this->labelTranslationParameters = $labelTranslationParameters; - } -} diff --git a/lib/symfony/form/ClearableErrorsInterface.php b/lib/symfony/form/ClearableErrorsInterface.php deleted file mode 100644 index e609bed02..000000000 --- a/lib/symfony/form/ClearableErrorsInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A form element whose errors can be cleared. - * - * @author Colin O'Dell - */ -interface ClearableErrorsInterface -{ - /** - * Removes all the errors of this form. - * - * @param bool $deep Whether to remove errors from child forms as well - * - * @return $this - */ - public function clearErrors(bool $deep = false); -} diff --git a/lib/symfony/form/ClickableInterface.php b/lib/symfony/form/ClickableInterface.php deleted file mode 100644 index 8b02d36e9..000000000 --- a/lib/symfony/form/ClickableInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A clickable form element. - * - * @author Bernhard Schussek - */ -interface ClickableInterface -{ - /** - * Returns whether this element was clicked. - * - * @return bool - */ - public function isClicked(); -} diff --git a/lib/symfony/form/Command/DebugCommand.php b/lib/symfony/form/Command/DebugCommand.php deleted file mode 100644 index 6979831c3..000000000 --- a/lib/symfony/form/Command/DebugCommand.php +++ /dev/null @@ -1,292 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Form\Console\Helper\DescriptorHelper; -use Symfony\Component\Form\Extension\Core\CoreExtension; -use Symfony\Component\Form\FormRegistryInterface; -use Symfony\Component\Form\FormTypeInterface; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * A console command for retrieving information about form types. - * - * @author Yonel Ceruto - */ -class DebugCommand extends Command -{ - protected static $defaultName = 'debug:form'; - protected static $defaultDescription = 'Display form type information'; - - private $formRegistry; - private $namespaces; - private $types; - private $extensions; - private $guessers; - private $fileLinkFormatter; - - public function __construct(FormRegistryInterface $formRegistry, array $namespaces = ['Symfony\Component\Form\Extension\Core\Type'], array $types = [], array $extensions = [], array $guessers = [], FileLinkFormatter $fileLinkFormatter = null) - { - parent::__construct(); - - $this->formRegistry = $formRegistry; - $this->namespaces = $namespaces; - $this->types = $types; - $this->extensions = $extensions; - $this->guessers = $guessers; - $this->fileLinkFormatter = $fileLinkFormatter; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('class', InputArgument::OPTIONAL, 'The form type class'), - new InputArgument('option', InputArgument::OPTIONAL, 'The form type option'), - new InputOption('show-deprecated', null, InputOption::VALUE_NONE, 'Display deprecated options in form types'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt or json)', 'txt'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays information about form types. - - php %command.full_name% - -The command lists all built-in types, services types, type extensions and -guessers currently available. - - php %command.full_name% Symfony\Component\Form\Extension\Core\Type\ChoiceType - php %command.full_name% ChoiceType - -The command lists all defined options that contains the given form type, -as well as their parents and type extensions. - - php %command.full_name% ChoiceType choice_value - -Use the --show-deprecated option to display form types with -deprecated options or the deprecated options of the given form type: - - php %command.full_name% --show-deprecated - php %command.full_name% ChoiceType --show-deprecated - -The command displays the definition of the given option name. - - php %command.full_name% --format=json - -The command lists everything in a machine readable json format. -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - - if (null === $class = $input->getArgument('class')) { - $object = null; - $options['core_types'] = $this->getCoreTypes(); - $options['service_types'] = array_values(array_diff($this->types, $options['core_types'])); - if ($input->getOption('show-deprecated')) { - $options['core_types'] = $this->filterTypesByDeprecated($options['core_types']); - $options['service_types'] = $this->filterTypesByDeprecated($options['service_types']); - } - $options['extensions'] = $this->extensions; - $options['guessers'] = $this->guessers; - foreach ($options as $k => $list) { - sort($options[$k]); - } - } else { - if (!class_exists($class) || !is_subclass_of($class, FormTypeInterface::class)) { - $class = $this->getFqcnTypeClass($input, $io, $class); - } - $resolvedType = $this->formRegistry->getType($class); - - if ($option = $input->getArgument('option')) { - $object = $resolvedType->getOptionsResolver(); - - if (!$object->isDefined($option)) { - $message = sprintf('Option "%s" is not defined in "%s".', $option, \get_class($resolvedType->getInnerType())); - - if ($alternatives = $this->findAlternatives($option, $object->getDefinedOptions())) { - if (1 === \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new InvalidArgumentException($message); - } - - $options['type'] = $resolvedType->getInnerType(); - $options['option'] = $option; - } else { - $object = $resolvedType; - } - } - - $helper = new DescriptorHelper($this->fileLinkFormatter); - $options['format'] = $input->getOption('format'); - $options['show_deprecated'] = $input->getOption('show-deprecated'); - $helper->describe($io, $object, $options); - - return 0; - } - - private function getFqcnTypeClass(InputInterface $input, SymfonyStyle $io, string $shortClassName): string - { - $classes = $this->getFqcnTypeClasses($shortClassName); - - if (0 === $count = \count($classes)) { - $message = sprintf("Could not find type \"%s\" into the following namespaces:\n %s", $shortClassName, implode("\n ", $this->namespaces)); - - $allTypes = array_merge($this->getCoreTypes(), $this->types); - if ($alternatives = $this->findAlternatives($shortClassName, $allTypes)) { - if (1 === \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new InvalidArgumentException($message); - } - if (1 === $count) { - return $classes[0]; - } - if (!$input->isInteractive()) { - throw new InvalidArgumentException(sprintf("The type \"%s\" is ambiguous.\n\nDid you mean one of these?\n %s.", $shortClassName, implode("\n ", $classes))); - } - - return $io->choice(sprintf("The type \"%s\" is ambiguous.\n\nSelect one of the following form types to display its information:", $shortClassName), $classes, $classes[0]); - } - - private function getFqcnTypeClasses(string $shortClassName): array - { - $classes = []; - sort($this->namespaces); - foreach ($this->namespaces as $namespace) { - if (class_exists($fqcn = $namespace.'\\'.$shortClassName)) { - $classes[] = $fqcn; - } elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName))) { - $classes[] = $fqcn; - } elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName).'Type')) { - $classes[] = $fqcn; - } elseif (str_ends_with($shortClassName, 'type') && class_exists($fqcn = $namespace.'\\'.ucfirst(substr($shortClassName, 0, -4).'Type'))) { - $classes[] = $fqcn; - } - } - - return $classes; - } - - private function getCoreTypes(): array - { - $coreExtension = new CoreExtension(); - $loadTypesRefMethod = (new \ReflectionObject($coreExtension))->getMethod('loadTypes'); - $loadTypesRefMethod->setAccessible(true); - $coreTypes = $loadTypesRefMethod->invoke($coreExtension); - $coreTypes = array_map(function (FormTypeInterface $type) { return \get_class($type); }, $coreTypes); - sort($coreTypes); - - return $coreTypes; - } - - private function filterTypesByDeprecated(array $types): array - { - $typesWithDeprecatedOptions = []; - foreach ($types as $class) { - $optionsResolver = $this->formRegistry->getType($class)->getOptionsResolver(); - foreach ($optionsResolver->getDefinedOptions() as $option) { - if ($optionsResolver->isDeprecated($option)) { - $typesWithDeprecatedOptions[] = $class; - break; - } - } - } - - return $typesWithDeprecatedOptions; - } - - private function findAlternatives(string $name, array $collection): array - { - $alternatives = []; - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $threshold = 1e3; - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); - - return array_keys($alternatives); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('class')) { - $suggestions->suggestValues(array_merge($this->getCoreTypes(), $this->types)); - - return; - } - - if ($input->mustSuggestArgumentValuesFor('option') && null !== $class = $input->getArgument('class')) { - $this->completeOptions($class, $suggestions); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - } - } - - private function completeOptions(string $class, CompletionSuggestions $suggestions): void - { - if (!class_exists($class) || !is_subclass_of($class, FormTypeInterface::class)) { - $classes = $this->getFqcnTypeClasses($class); - - if (1 === \count($classes)) { - $class = $classes[0]; - } - } - - if (!$this->formRegistry->hasType($class)) { - return; - } - - $resolvedType = $this->formRegistry->getType($class); - $suggestions->suggestValues($resolvedType->getOptionsResolver()->getDefinedOptions()); - } -} diff --git a/lib/symfony/form/Console/Descriptor/Descriptor.php b/lib/symfony/form/Console/Descriptor/Descriptor.php deleted file mode 100644 index 4aceafbe6..000000000 --- a/lib/symfony/form/Console/Descriptor/Descriptor.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Descriptor; - -use Symfony\Component\Console\Descriptor\DescriptorInterface; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\OutputStyle; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Form\ResolvedFormTypeInterface; -use Symfony\Component\Form\Util\OptionsResolverWrapper; -use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector; -use Symfony\Component\OptionsResolver\Exception\NoConfigurationException; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -abstract class Descriptor implements DescriptorInterface -{ - /** @var OutputStyle */ - protected $output; - protected $type; - protected $ownOptions = []; - protected $overriddenOptions = []; - protected $parentOptions = []; - protected $extensionOptions = []; - protected $requiredOptions = []; - protected $parents = []; - protected $extensions = []; - - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, $object, array $options = []) - { - $this->output = $output instanceof OutputStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); - - switch (true) { - case null === $object: - $this->describeDefaults($options); - break; - case $object instanceof ResolvedFormTypeInterface: - $this->describeResolvedFormType($object, $options); - break; - case $object instanceof OptionsResolver: - $this->describeOption($object, $options); - break; - default: - throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))); - } - } - - abstract protected function describeDefaults(array $options); - - abstract protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []); - - abstract protected function describeOption(OptionsResolver $optionsResolver, array $options); - - protected function collectOptions(ResolvedFormTypeInterface $type) - { - $this->parents = []; - $this->extensions = []; - - if (null !== $type->getParent()) { - $optionsResolver = clone $this->getParentOptionsResolver($type->getParent()); - } else { - $optionsResolver = new OptionsResolver(); - } - - $type->getInnerType()->configureOptions($ownOptionsResolver = new OptionsResolverWrapper()); - $this->ownOptions = array_diff($ownOptionsResolver->getDefinedOptions(), $optionsResolver->getDefinedOptions()); - $overriddenOptions = array_intersect(array_merge($ownOptionsResolver->getDefinedOptions(), $ownOptionsResolver->getUndefinedOptions()), $optionsResolver->getDefinedOptions()); - - $this->parentOptions = []; - foreach ($this->parents as $class => $parentOptions) { - $this->overriddenOptions[$class] = array_intersect($overriddenOptions, $parentOptions); - $this->parentOptions[$class] = array_diff($parentOptions, $overriddenOptions); - } - - $type->getInnerType()->configureOptions($optionsResolver); - $this->collectTypeExtensionsOptions($type, $optionsResolver); - $this->extensionOptions = []; - foreach ($this->extensions as $class => $extensionOptions) { - $this->overriddenOptions[$class] = array_intersect($overriddenOptions, $extensionOptions); - $this->extensionOptions[$class] = array_diff($extensionOptions, $overriddenOptions); - } - - $this->overriddenOptions = array_filter($this->overriddenOptions); - $this->parentOptions = array_filter($this->parentOptions); - $this->extensionOptions = array_filter($this->extensionOptions); - $this->requiredOptions = $optionsResolver->getRequiredOptions(); - - $this->parents = array_keys($this->parents); - $this->extensions = array_keys($this->extensions); - } - - protected function getOptionDefinition(OptionsResolver $optionsResolver, string $option) - { - $definition = []; - - if ($info = $optionsResolver->getInfo($option)) { - $definition = [ - 'info' => $info, - ]; - } - - $definition += [ - 'required' => $optionsResolver->isRequired($option), - 'deprecated' => $optionsResolver->isDeprecated($option), - ]; - - $introspector = new OptionsResolverIntrospector($optionsResolver); - - $map = [ - 'default' => 'getDefault', - 'lazy' => 'getLazyClosures', - 'allowedTypes' => 'getAllowedTypes', - 'allowedValues' => 'getAllowedValues', - 'normalizers' => 'getNormalizers', - 'deprecation' => 'getDeprecation', - ]; - - foreach ($map as $key => $method) { - try { - $definition[$key] = $introspector->{$method}($option); - } catch (NoConfigurationException $e) { - // noop - } - } - - if (isset($definition['deprecation']) && isset($definition['deprecation']['message']) && \is_string($definition['deprecation']['message'])) { - $definition['deprecationMessage'] = strtr($definition['deprecation']['message'], ['%name%' => $option]); - $definition['deprecationPackage'] = $definition['deprecation']['package']; - $definition['deprecationVersion'] = $definition['deprecation']['version']; - } - - return $definition; - } - - protected function filterOptionsByDeprecated(ResolvedFormTypeInterface $type) - { - $deprecatedOptions = []; - $resolver = $type->getOptionsResolver(); - foreach ($resolver->getDefinedOptions() as $option) { - if ($resolver->isDeprecated($option)) { - $deprecatedOptions[] = $option; - } - } - - $filterByDeprecated = function (array $options) use ($deprecatedOptions) { - foreach ($options as $class => $opts) { - if ($deprecated = array_intersect($deprecatedOptions, $opts)) { - $options[$class] = $deprecated; - } else { - unset($options[$class]); - } - } - - return $options; - }; - - $this->ownOptions = array_intersect($deprecatedOptions, $this->ownOptions); - $this->overriddenOptions = $filterByDeprecated($this->overriddenOptions); - $this->parentOptions = $filterByDeprecated($this->parentOptions); - $this->extensionOptions = $filterByDeprecated($this->extensionOptions); - } - - private function getParentOptionsResolver(ResolvedFormTypeInterface $type): OptionsResolver - { - $this->parents[$class = \get_class($type->getInnerType())] = []; - - if (null !== $type->getParent()) { - $optionsResolver = clone $this->getParentOptionsResolver($type->getParent()); - } else { - $optionsResolver = new OptionsResolver(); - } - - $inheritedOptions = $optionsResolver->getDefinedOptions(); - $type->getInnerType()->configureOptions($optionsResolver); - $this->parents[$class] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions); - - $this->collectTypeExtensionsOptions($type, $optionsResolver); - - return $optionsResolver; - } - - private function collectTypeExtensionsOptions(ResolvedFormTypeInterface $type, OptionsResolver $optionsResolver) - { - foreach ($type->getTypeExtensions() as $extension) { - $inheritedOptions = $optionsResolver->getDefinedOptions(); - $extension->configureOptions($optionsResolver); - $this->extensions[\get_class($extension)] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions); - } - } -} diff --git a/lib/symfony/form/Console/Descriptor/JsonDescriptor.php b/lib/symfony/form/Console/Descriptor/JsonDescriptor.php deleted file mode 100644 index d40561e46..000000000 --- a/lib/symfony/form/Console/Descriptor/JsonDescriptor.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Descriptor; - -use Symfony\Component\Form\ResolvedFormTypeInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class JsonDescriptor extends Descriptor -{ - protected function describeDefaults(array $options) - { - $data['builtin_form_types'] = $options['core_types']; - $data['service_form_types'] = $options['service_types']; - if (!$options['show_deprecated']) { - $data['type_extensions'] = $options['extensions']; - $data['type_guessers'] = $options['guessers']; - } - - $this->writeData($data, $options); - } - - protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []) - { - $this->collectOptions($resolvedFormType); - - if ($options['show_deprecated']) { - $this->filterOptionsByDeprecated($resolvedFormType); - } - - $formOptions = [ - 'own' => $this->ownOptions, - 'overridden' => $this->overriddenOptions, - 'parent' => $this->parentOptions, - 'extension' => $this->extensionOptions, - 'required' => $this->requiredOptions, - ]; - $this->sortOptions($formOptions); - - $data = [ - 'class' => \get_class($resolvedFormType->getInnerType()), - 'block_prefix' => $resolvedFormType->getInnerType()->getBlockPrefix(), - 'options' => $formOptions, - 'parent_types' => $this->parents, - 'type_extensions' => $this->extensions, - ]; - - $this->writeData($data, $options); - } - - protected function describeOption(OptionsResolver $optionsResolver, array $options) - { - $definition = $this->getOptionDefinition($optionsResolver, $options['option']); - - $map = []; - if ($definition['deprecated']) { - $map['deprecated'] = 'deprecated'; - if (\is_string($definition['deprecationMessage'])) { - $map['deprecation_message'] = 'deprecationMessage'; - } - } - $map += [ - 'info' => 'info', - 'required' => 'required', - 'default' => 'default', - 'allowed_types' => 'allowedTypes', - 'allowed_values' => 'allowedValues', - ]; - foreach ($map as $label => $name) { - if (\array_key_exists($name, $definition)) { - $data[$label] = $definition[$name]; - - if ('default' === $name) { - $data['is_lazy'] = isset($definition['lazy']); - } - } - } - $data['has_normalizer'] = isset($definition['normalizers']); - - $this->writeData($data, $options); - } - - private function writeData(array $data, array $options) - { - $flags = $options['json_encoding'] ?? 0; - - $this->output->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n"); - } - - private function sortOptions(array &$options) - { - foreach ($options as &$opts) { - $sorted = false; - foreach ($opts as &$opt) { - if (\is_array($opt)) { - sort($opt); - $sorted = true; - } - } - if (!$sorted) { - sort($opts); - } - } - } -} diff --git a/lib/symfony/form/Console/Descriptor/TextDescriptor.php b/lib/symfony/form/Console/Descriptor/TextDescriptor.php deleted file mode 100644 index 4862a674c..000000000 --- a/lib/symfony/form/Console/Descriptor/TextDescriptor.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Descriptor; - -use Symfony\Component\Console\Helper\Dumper; -use Symfony\Component\Console\Helper\TableSeparator; -use Symfony\Component\Form\ResolvedFormTypeInterface; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class TextDescriptor extends Descriptor -{ - private $fileLinkFormatter; - - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this->fileLinkFormatter = $fileLinkFormatter; - } - - protected function describeDefaults(array $options) - { - if ($options['core_types']) { - $this->output->section('Built-in form types (Symfony\Component\Form\Extension\Core\Type)'); - $shortClassNames = array_map(function ($fqcn) { - return $this->formatClassLink($fqcn, \array_slice(explode('\\', $fqcn), -1)[0]); - }, $options['core_types']); - for ($i = 0, $loopsMax = \count($shortClassNames); $i * 5 < $loopsMax; ++$i) { - $this->output->writeln(' '.implode(', ', \array_slice($shortClassNames, $i * 5, 5))); - } - } - - if ($options['service_types']) { - $this->output->section('Service form types'); - $this->output->listing(array_map([$this, 'formatClassLink'], $options['service_types'])); - } - - if (!$options['show_deprecated']) { - if ($options['extensions']) { - $this->output->section('Type extensions'); - $this->output->listing(array_map([$this, 'formatClassLink'], $options['extensions'])); - } - - if ($options['guessers']) { - $this->output->section('Type guessers'); - $this->output->listing(array_map([$this, 'formatClassLink'], $options['guessers'])); - } - } - } - - protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []) - { - $this->collectOptions($resolvedFormType); - - if ($options['show_deprecated']) { - $this->filterOptionsByDeprecated($resolvedFormType); - } - - $formOptions = $this->normalizeAndSortOptionsColumns(array_filter([ - 'own' => $this->ownOptions, - 'overridden' => $this->overriddenOptions, - 'parent' => $this->parentOptions, - 'extension' => $this->extensionOptions, - ])); - - // setting headers and column order - $tableHeaders = array_intersect_key([ - 'own' => 'Options', - 'overridden' => 'Overridden options', - 'parent' => 'Parent options', - 'extension' => 'Extension options', - ], $formOptions); - - $this->output->title(sprintf('%s (Block prefix: "%s")', \get_class($resolvedFormType->getInnerType()), $resolvedFormType->getInnerType()->getBlockPrefix())); - - if ($formOptions) { - $this->output->table($tableHeaders, $this->buildTableRows($tableHeaders, $formOptions)); - } - - if ($this->parents) { - $this->output->section('Parent types'); - $this->output->listing(array_map([$this, 'formatClassLink'], $this->parents)); - } - - if ($this->extensions) { - $this->output->section('Type extensions'); - $this->output->listing(array_map([$this, 'formatClassLink'], $this->extensions)); - } - } - - protected function describeOption(OptionsResolver $optionsResolver, array $options) - { - $definition = $this->getOptionDefinition($optionsResolver, $options['option']); - - $dump = new Dumper($this->output); - $map = []; - if ($definition['deprecated']) { - $map = [ - 'Deprecated' => 'deprecated', - 'Deprecation package' => 'deprecationPackage', - 'Deprecation version' => 'deprecationVersion', - 'Deprecation message' => 'deprecationMessage', - ]; - } - $map += [ - 'Info' => 'info', - 'Required' => 'required', - 'Default' => 'default', - 'Allowed types' => 'allowedTypes', - 'Allowed values' => 'allowedValues', - 'Normalizers' => 'normalizers', - ]; - $rows = []; - foreach ($map as $label => $name) { - $value = \array_key_exists($name, $definition) ? $dump($definition[$name]) : '-'; - if ('default' === $name && isset($definition['lazy'])) { - $value = "Value: $value\n\nClosure(s): ".$dump($definition['lazy']); - } - - $rows[] = ["$label", $value]; - $rows[] = new TableSeparator(); - } - array_pop($rows); - - $this->output->title(sprintf('%s (%s)', \get_class($options['type']), $options['option'])); - $this->output->table([], $rows); - } - - private function buildTableRows(array $headers, array $options): array - { - $tableRows = []; - $count = \count(max($options)); - for ($i = 0; $i < $count; ++$i) { - $cells = []; - foreach (array_keys($headers) as $group) { - $option = $options[$group][$i] ?? null; - if (\is_string($option) && \in_array($option, $this->requiredOptions, true)) { - $option .= ' (required)'; - } - $cells[] = $option; - } - $tableRows[] = $cells; - } - - return $tableRows; - } - - private function normalizeAndSortOptionsColumns(array $options): array - { - foreach ($options as $group => $opts) { - $sorted = false; - foreach ($opts as $class => $opt) { - if (\is_string($class)) { - unset($options[$group][$class]); - } - - if (!\is_array($opt) || 0 === \count($opt)) { - continue; - } - - if (!$sorted) { - $options[$group] = []; - } else { - $options[$group][] = null; - } - $options[$group][] = sprintf('%s', (new \ReflectionClass($class))->getShortName()); - $options[$group][] = new TableSeparator(); - - sort($opt); - $sorted = true; - $options[$group] = array_merge($options[$group], $opt); - } - - if (!$sorted) { - sort($options[$group]); - } - } - - return $options; - } - - private function formatClassLink(string $class, string $text = null): string - { - if (null === $text) { - $text = $class; - } - - if ('' === $fileLink = $this->getFileLink($class)) { - return $text; - } - - return sprintf('%s', $fileLink, $text); - } - - private function getFileLink(string $class): string - { - if (null === $this->fileLinkFormatter) { - return ''; - } - - try { - $r = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return ''; - } - - return (string) $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); - } -} diff --git a/lib/symfony/form/Console/Helper/DescriptorHelper.php b/lib/symfony/form/Console/Helper/DescriptorHelper.php deleted file mode 100644 index 355fb9598..000000000 --- a/lib/symfony/form/Console/Helper/DescriptorHelper.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Helper; - -use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper; -use Symfony\Component\Form\Console\Descriptor\JsonDescriptor; -use Symfony\Component\Form\Console\Descriptor\TextDescriptor; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class DescriptorHelper extends BaseDescriptorHelper -{ - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this - ->register('txt', new TextDescriptor($fileLinkFormatter)) - ->register('json', new JsonDescriptor()) - ; - } -} diff --git a/lib/symfony/form/DataAccessorInterface.php b/lib/symfony/form/DataAccessorInterface.php deleted file mode 100644 index a5b4bc817..000000000 --- a/lib/symfony/form/DataAccessorInterface.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Writes and reads values to/from an object or array bound to a form. - * - * @author Yonel Ceruto - */ -interface DataAccessorInterface -{ - /** - * Returns the value at the end of the property of the object graph. - * - * @param object|array $viewData The view data of the compound form - * @param FormInterface $form The {@link FormInterface()} instance to check - * - * @return mixed - * - * @throws Exception\AccessException If unable to read from the given form data - */ - public function getValue($viewData, FormInterface $form); - - /** - * Sets the value at the end of the property of the object graph. - * - * @param object|array $viewData The view data of the compound form - * @param mixed $value The value to set at the end of the object graph - * @param FormInterface $form The {@link FormInterface()} instance to check - * - * @throws Exception\AccessException If unable to write the given value - */ - public function setValue(&$viewData, $value, FormInterface $form): void; - - /** - * Returns whether a value can be read from an object graph. - * - * Whenever this method returns true, {@link getValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $viewData The view data of the compound form - * @param FormInterface $form The {@link FormInterface()} instance to check - */ - public function isReadable($viewData, FormInterface $form): bool; - - /** - * Returns whether a value can be written at a given object graph. - * - * Whenever this method returns true, {@link setValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $viewData The view data of the compound form - * @param FormInterface $form The {@link FormInterface()} instance to check - */ - public function isWritable($viewData, FormInterface $form): bool; -} diff --git a/lib/symfony/form/DataMapperInterface.php b/lib/symfony/form/DataMapperInterface.php deleted file mode 100644 index c2cd3601e..000000000 --- a/lib/symfony/form/DataMapperInterface.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - */ -interface DataMapperInterface -{ - /** - * Maps the view data of a compound form to its children. - * - * The method is responsible for calling {@link FormInterface::setData()} - * on the children of compound forms, defining their underlying model data. - * - * @param mixed $viewData View data of the compound form being initialized - * @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances - * - * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported - */ - public function mapDataToForms($viewData, \Traversable $forms); - - /** - * Maps the model data of a list of children forms into the view data of their parent. - * - * This is the internal cascade call of FormInterface::submit for compound forms, since they - * cannot be bound to any input nor the request as scalar, but their children may: - * - * $compoundForm->submit($arrayOfChildrenViewData) - * // inside: - * $childForm->submit($childViewData); - * // for each entry, do the same and/or reverse transform - * $this->dataMapper->mapFormsToData($compoundForm, $compoundInitialViewData) - * // then reverse transform - * - * When a simple form is submitted the following is happening: - * - * $simpleForm->submit($submittedViewData) - * // inside: - * $this->viewData = $submittedViewData - * // then reverse transform - * - * The model data can be an array or an object, so this second argument is always passed - * by reference. - * - * @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances - * @param mixed $viewData The compound form's view data that get mapped - * its children model data - * - * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported - */ - public function mapFormsToData(\Traversable $forms, &$viewData); -} diff --git a/lib/symfony/form/DataTransformerInterface.php b/lib/symfony/form/DataTransformerInterface.php deleted file mode 100644 index 5f4842847..000000000 --- a/lib/symfony/form/DataTransformerInterface.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms a value between different representations. - * - * @author Bernhard Schussek - */ -interface DataTransformerInterface -{ - /** - * Transforms a value from the original representation to a transformed representation. - * - * This method is called when the form field is initialized with its default data, on - * two occasions for two types of transformers: - * - * 1. Model transformers which normalize the model data. - * This is mainly useful when the same form type (the same configuration) - * has to handle different kind of underlying data, e.g The DateType can - * deal with strings or \DateTime objects as input. - * - * 2. View transformers which adapt the normalized data to the view format. - * a/ When the form is simple, the value returned by convention is used - * directly in the view and thus can only be a string or an array. In - * this case the data class should be null. - * - * b/ When the form is compound the returned value should be an array or - * an object to be mapped to the children. Each property of the compound - * data will be used as model data by each child and will be transformed - * too. In this case data class should be the class of the object, or null - * when it is an array. - * - * All transformers are called in a configured order from model data to view value. - * At the end of this chain the view data will be validated against the data class - * setting. - * - * This method must be able to deal with empty values. Usually this will - * be NULL, but depending on your implementation other empty values are - * possible as well (such as empty strings). The reasoning behind this is - * that data transformers must be chainable. If the transform() method - * of the first data transformer outputs NULL, the second must be able to - * process that value. - * - * @param mixed $value The value in the original representation - * - * @return mixed - * - * @throws TransformationFailedException when the transformation fails - */ - public function transform($value); - - /** - * Transforms a value from the transformed representation to its original - * representation. - * - * This method is called when {@link Form::submit()} is called to transform the requests tainted data - * into an acceptable format. - * - * The same transformers are called in the reverse order so the responsibility is to - * return one of the types that would be expected as input of transform(). - * - * This method must be able to deal with empty values. Usually this will - * be an empty string, but depending on your implementation other empty - * values are possible as well (such as NULL). The reasoning behind - * this is that value transformers must be chainable. If the - * reverseTransform() method of the first value transformer outputs an - * empty string, the second value transformer must be able to process that - * value. - * - * By convention, reverseTransform() should return NULL if an empty string - * is passed. - * - * @param mixed $value The value in the transformed representation - * - * @return mixed - * - * @throws TransformationFailedException when the transformation fails - */ - public function reverseTransform($value); -} diff --git a/lib/symfony/form/DependencyInjection/FormPass.php b/lib/symfony/form/DependencyInjection/FormPass.php deleted file mode 100644 index 0ba46117c..000000000 --- a/lib/symfony/form/DependencyInjection/FormPass.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds all services with the tags "form.type", "form.type_extension" and - * "form.type_guesser" as arguments of the "form.extension" service. - * - * @author Bernhard Schussek - */ -class FormPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $formExtensionService; - private $formTypeTag; - private $formTypeExtensionTag; - private $formTypeGuesserTag; - private $formDebugCommandService; - - public function __construct(string $formExtensionService = 'form.extension', string $formTypeTag = 'form.type', string $formTypeExtensionTag = 'form.type_extension', string $formTypeGuesserTag = 'form.type_guesser', string $formDebugCommandService = 'console.command.form_debug') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->formExtensionService = $formExtensionService; - $this->formTypeTag = $formTypeTag; - $this->formTypeExtensionTag = $formTypeExtensionTag; - $this->formTypeGuesserTag = $formTypeGuesserTag; - $this->formDebugCommandService = $formDebugCommandService; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->formExtensionService)) { - return; - } - - $definition = $container->getDefinition($this->formExtensionService); - $definition->replaceArgument(0, $this->processFormTypes($container)); - $definition->replaceArgument(1, $this->processFormTypeExtensions($container)); - $definition->replaceArgument(2, $this->processFormTypeGuessers($container)); - } - - private function processFormTypes(ContainerBuilder $container): Reference - { - // Get service locator argument - $servicesMap = []; - $namespaces = ['Symfony\Component\Form\Extension\Core\Type' => true]; - - // Builds an array with fully-qualified type class names as keys and service IDs as values - foreach ($container->findTaggedServiceIds($this->formTypeTag, true) as $serviceId => $tag) { - // Add form type service to the service locator - $serviceDefinition = $container->getDefinition($serviceId); - $servicesMap[$formType = $serviceDefinition->getClass()] = new Reference($serviceId); - $namespaces[substr($formType, 0, strrpos($formType, '\\'))] = true; - } - - if ($container->hasDefinition($this->formDebugCommandService)) { - $commandDefinition = $container->getDefinition($this->formDebugCommandService); - $commandDefinition->setArgument(1, array_keys($namespaces)); - $commandDefinition->setArgument(2, array_keys($servicesMap)); - } - - return ServiceLocatorTagPass::register($container, $servicesMap); - } - - private function processFormTypeExtensions(ContainerBuilder $container): array - { - $typeExtensions = []; - $typeExtensionsClasses = []; - foreach ($this->findAndSortTaggedServices($this->formTypeExtensionTag, $container) as $reference) { - $serviceId = (string) $reference; - $serviceDefinition = $container->getDefinition($serviceId); - - $tag = $serviceDefinition->getTag($this->formTypeExtensionTag); - $typeExtensionClass = $container->getParameterBag()->resolveValue($serviceDefinition->getClass()); - - if (isset($tag[0]['extended_type'])) { - $typeExtensions[$tag[0]['extended_type']][] = new Reference($serviceId); - $typeExtensionsClasses[] = $typeExtensionClass; - } else { - $extendsTypes = false; - - $typeExtensionsClasses[] = $typeExtensionClass; - foreach ($typeExtensionClass::getExtendedTypes() as $extendedType) { - $typeExtensions[$extendedType][] = new Reference($serviceId); - $extendsTypes = true; - } - - if (!$extendsTypes) { - throw new InvalidArgumentException(sprintf('The getExtendedTypes() method for service "%s" does not return any extended types.', $serviceId)); - } - } - } - - foreach ($typeExtensions as $extendedType => $extensions) { - $typeExtensions[$extendedType] = new IteratorArgument($extensions); - } - - if ($container->hasDefinition($this->formDebugCommandService)) { - $commandDefinition = $container->getDefinition($this->formDebugCommandService); - $commandDefinition->setArgument(3, $typeExtensionsClasses); - } - - return $typeExtensions; - } - - private function processFormTypeGuessers(ContainerBuilder $container): ArgumentInterface - { - $guessers = []; - $guessersClasses = []; - foreach ($container->findTaggedServiceIds($this->formTypeGuesserTag, true) as $serviceId => $tags) { - $guessers[] = new Reference($serviceId); - - $serviceDefinition = $container->getDefinition($serviceId); - $guessersClasses[] = $serviceDefinition->getClass(); - } - - if ($container->hasDefinition($this->formDebugCommandService)) { - $commandDefinition = $container->getDefinition($this->formDebugCommandService); - $commandDefinition->setArgument(4, $guessersClasses); - } - - return new IteratorArgument($guessers); - } -} diff --git a/lib/symfony/form/Event/PostSetDataEvent.php b/lib/symfony/form/Event/PostSetDataEvent.php deleted file mode 100644 index eef537452..000000000 --- a/lib/symfony/form/Event/PostSetDataEvent.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched at the end of the Form::setData() method. - * - * This event is mostly here for reading data after having pre-populated the form. - */ -final class PostSetDataEvent extends FormEvent -{ -} diff --git a/lib/symfony/form/Event/PostSubmitEvent.php b/lib/symfony/form/Event/PostSubmitEvent.php deleted file mode 100644 index aa3775f5c..000000000 --- a/lib/symfony/form/Event/PostSubmitEvent.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched after the Form::submit() - * once the model and view data have been denormalized. - * - * It can be used to fetch data after denormalization. - */ -final class PostSubmitEvent extends FormEvent -{ -} diff --git a/lib/symfony/form/Event/PreSetDataEvent.php b/lib/symfony/form/Event/PreSetDataEvent.php deleted file mode 100644 index 5450400e0..000000000 --- a/lib/symfony/form/Event/PreSetDataEvent.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched at the beginning of the Form::setData() method. - * - * It can be used to: - * - Modify the data given during pre-population; - * - Modify a form depending on the pre-populated data (adding or removing fields dynamically). - */ -final class PreSetDataEvent extends FormEvent -{ -} diff --git a/lib/symfony/form/Event/PreSubmitEvent.php b/lib/symfony/form/Event/PreSubmitEvent.php deleted file mode 100644 index a72ac5d16..000000000 --- a/lib/symfony/form/Event/PreSubmitEvent.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched at the beginning of the Form::submit() method. - * - * It can be used to: - * - Change data from the request, before submitting the data to the form. - * - Add or remove form fields, before submitting the data to the form. - */ -final class PreSubmitEvent extends FormEvent -{ -} diff --git a/lib/symfony/form/Event/SubmitEvent.php b/lib/symfony/form/Event/SubmitEvent.php deleted file mode 100644 index 71d3b06d4..000000000 --- a/lib/symfony/form/Event/SubmitEvent.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched just before the Form::submit() method - * transforms back the normalized data to the model and view data. - * - * It can be used to change data from the normalized representation of the data. - */ -final class SubmitEvent extends FormEvent -{ -} diff --git a/lib/symfony/form/Exception/AccessException.php b/lib/symfony/form/Exception/AccessException.php deleted file mode 100644 index ac712cc3d..000000000 --- a/lib/symfony/form/Exception/AccessException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class AccessException extends RuntimeException -{ -} diff --git a/lib/symfony/form/Exception/AlreadySubmittedException.php b/lib/symfony/form/Exception/AlreadySubmittedException.php deleted file mode 100644 index 5e8c30526..000000000 --- a/lib/symfony/form/Exception/AlreadySubmittedException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Thrown when an operation is called that is not acceptable after submitting - * a form. - * - * @author Bernhard Schussek - */ -class AlreadySubmittedException extends LogicException -{ -} diff --git a/lib/symfony/form/Exception/BadMethodCallException.php b/lib/symfony/form/Exception/BadMethodCallException.php deleted file mode 100644 index 27649dd02..000000000 --- a/lib/symfony/form/Exception/BadMethodCallException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base BadMethodCallException for the Form component. - * - * @author Bernhard Schussek - */ -class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface -{ -} diff --git a/lib/symfony/form/Exception/ErrorMappingException.php b/lib/symfony/form/Exception/ErrorMappingException.php deleted file mode 100644 index a69684926..000000000 --- a/lib/symfony/form/Exception/ErrorMappingException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class ErrorMappingException extends RuntimeException -{ -} diff --git a/lib/symfony/form/Exception/ExceptionInterface.php b/lib/symfony/form/Exception/ExceptionInterface.php deleted file mode 100644 index 69145f0bc..000000000 --- a/lib/symfony/form/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base ExceptionInterface for the Form component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/form/Exception/InvalidArgumentException.php b/lib/symfony/form/Exception/InvalidArgumentException.php deleted file mode 100644 index a270e0ce9..000000000 --- a/lib/symfony/form/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base InvalidArgumentException for the Form component. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/form/Exception/InvalidConfigurationException.php b/lib/symfony/form/Exception/InvalidConfigurationException.php deleted file mode 100644 index daa0c42f5..000000000 --- a/lib/symfony/form/Exception/InvalidConfigurationException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class InvalidConfigurationException extends InvalidArgumentException -{ -} diff --git a/lib/symfony/form/Exception/LogicException.php b/lib/symfony/form/Exception/LogicException.php deleted file mode 100644 index 848780215..000000000 --- a/lib/symfony/form/Exception/LogicException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base LogicException for Form component. - * - * @author Alexander Kotynia - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/lib/symfony/form/Exception/OutOfBoundsException.php b/lib/symfony/form/Exception/OutOfBoundsException.php deleted file mode 100644 index 44d311663..000000000 --- a/lib/symfony/form/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base OutOfBoundsException for Form component. - * - * @author Alexander Kotynia - */ -class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/lib/symfony/form/Exception/RuntimeException.php b/lib/symfony/form/Exception/RuntimeException.php deleted file mode 100644 index 0af48a4a2..000000000 --- a/lib/symfony/form/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base RuntimeException for the Form component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/form/Exception/StringCastException.php b/lib/symfony/form/Exception/StringCastException.php deleted file mode 100644 index f9b51d604..000000000 --- a/lib/symfony/form/Exception/StringCastException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class StringCastException extends RuntimeException -{ -} diff --git a/lib/symfony/form/Exception/TransformationFailedException.php b/lib/symfony/form/Exception/TransformationFailedException.php deleted file mode 100644 index 89eba088e..000000000 --- a/lib/symfony/form/Exception/TransformationFailedException.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Indicates a value transformation error. - * - * @author Bernhard Schussek - */ -class TransformationFailedException extends RuntimeException -{ - private $invalidMessage; - private $invalidMessageParameters; - - public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, string $invalidMessage = null, array $invalidMessageParameters = []) - { - parent::__construct($message, $code, $previous); - - $this->setInvalidMessage($invalidMessage, $invalidMessageParameters); - } - - /** - * Sets the message that will be shown to the user. - * - * @param string|null $invalidMessage The message or message key - * @param array $invalidMessageParameters Data to be passed into the translator - */ - public function setInvalidMessage(string $invalidMessage = null, array $invalidMessageParameters = []): void - { - $this->invalidMessage = $invalidMessage; - $this->invalidMessageParameters = $invalidMessageParameters; - } - - public function getInvalidMessage(): ?string - { - return $this->invalidMessage; - } - - public function getInvalidMessageParameters(): array - { - return $this->invalidMessageParameters; - } -} diff --git a/lib/symfony/form/Exception/UnexpectedTypeException.php b/lib/symfony/form/Exception/UnexpectedTypeException.php deleted file mode 100644 index d25d4705f..000000000 --- a/lib/symfony/form/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class UnexpectedTypeException extends InvalidArgumentException -{ - public function __construct($value, string $expectedType) - { - parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, get_debug_type($value))); - } -} diff --git a/lib/symfony/form/Extension/Core/CoreExtension.php b/lib/symfony/form/Extension/Core/CoreExtension.php deleted file mode 100644 index c6768b86b..000000000 --- a/lib/symfony/form/Extension/Core/CoreExtension.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core; - -use Symfony\Component\Form\AbstractExtension; -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface; -use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; -use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; -use Symfony\Component\Form\Extension\Core\Type\TransformationFailureExtension; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Represents the main form extension, which loads the core functionality. - * - * @author Bernhard Schussek - */ -class CoreExtension extends AbstractExtension -{ - private $propertyAccessor; - private $choiceListFactory; - private $translator; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null, TranslatorInterface $translator = null) - { - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - $this->choiceListFactory = $choiceListFactory ?? new CachingFactoryDecorator(new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor)); - $this->translator = $translator; - } - - protected function loadTypes() - { - return [ - new Type\FormType($this->propertyAccessor), - new Type\BirthdayType(), - new Type\CheckboxType(), - new Type\ChoiceType($this->choiceListFactory, $this->translator), - new Type\CollectionType(), - new Type\CountryType(), - new Type\DateIntervalType(), - new Type\DateType(), - new Type\DateTimeType(), - new Type\EmailType(), - new Type\HiddenType(), - new Type\IntegerType(), - new Type\LanguageType(), - new Type\LocaleType(), - new Type\MoneyType(), - new Type\NumberType(), - new Type\PasswordType(), - new Type\PercentType(), - new Type\RadioType(), - new Type\RangeType(), - new Type\RepeatedType(), - new Type\SearchType(), - new Type\TextareaType(), - new Type\TextType(), - new Type\TimeType(), - new Type\TimezoneType(), - new Type\UrlType(), - new Type\FileType($this->translator), - new Type\ButtonType(), - new Type\SubmitType(), - new Type\ResetType(), - new Type\CurrencyType(), - new Type\TelType(), - new Type\ColorType($this->translator), - new Type\WeekType(), - ]; - } - - protected function loadTypeExtensions() - { - return [ - new TransformationFailureExtension($this->translator), - ]; - } -} diff --git a/lib/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php b/lib/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php deleted file mode 100644 index fb121450a..000000000 --- a/lib/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataAccessor; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\Exception\AccessException; -use Symfony\Component\Form\FormInterface; - -/** - * Writes and reads values to/from an object or array using callback functions. - * - * @author Yonel Ceruto - */ -class CallbackAccessor implements DataAccessorInterface -{ - /** - * {@inheritdoc} - */ - public function getValue($data, FormInterface $form) - { - if (null === $getter = $form->getConfig()->getOption('getter')) { - throw new AccessException('Unable to read from the given form data as no getter is defined.'); - } - - return ($getter)($data, $form); - } - - /** - * {@inheritdoc} - */ - public function setValue(&$data, $value, FormInterface $form): void - { - if (null === $setter = $form->getConfig()->getOption('setter')) { - throw new AccessException('Unable to write the given value as no setter is defined.'); - } - - ($setter)($data, $form->getData(), $form); - } - - /** - * {@inheritdoc} - */ - public function isReadable($data, FormInterface $form): bool - { - return null !== $form->getConfig()->getOption('getter'); - } - - /** - * {@inheritdoc} - */ - public function isWritable($data, FormInterface $form): bool - { - return null !== $form->getConfig()->getOption('setter'); - } -} diff --git a/lib/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php b/lib/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php deleted file mode 100644 index 39e444bb7..000000000 --- a/lib/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataAccessor; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\Exception\AccessException; -use Symfony\Component\Form\FormInterface; - -/** - * @author Yonel Ceruto - */ -class ChainAccessor implements DataAccessorInterface -{ - private $accessors; - - /** - * @param DataAccessorInterface[]|iterable $accessors - */ - public function __construct(iterable $accessors) - { - $this->accessors = $accessors; - } - - /** - * {@inheritdoc} - */ - public function getValue($data, FormInterface $form) - { - foreach ($this->accessors as $accessor) { - if ($accessor->isReadable($data, $form)) { - return $accessor->getValue($data, $form); - } - } - - throw new AccessException('Unable to read from the given form data as no accessor in the chain is able to read the data.'); - } - - /** - * {@inheritdoc} - */ - public function setValue(&$data, $value, FormInterface $form): void - { - foreach ($this->accessors as $accessor) { - if ($accessor->isWritable($data, $form)) { - $accessor->setValue($data, $value, $form); - - return; - } - } - - throw new AccessException('Unable to write the given value as no accessor in the chain is able to set the data.'); - } - - /** - * {@inheritdoc} - */ - public function isReadable($data, FormInterface $form): bool - { - foreach ($this->accessors as $accessor) { - if ($accessor->isReadable($data, $form)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function isWritable($data, FormInterface $form): bool - { - foreach ($this->accessors as $accessor) { - if ($accessor->isWritable($data, $form)) { - return true; - } - } - - return false; - } -} diff --git a/lib/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php b/lib/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php deleted file mode 100644 index 3c97075e5..000000000 --- a/lib/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataAccessor; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\Exception\AccessException; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\PropertyAccess\Exception\AccessException as PropertyAccessException; -use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; -use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Writes and reads values to/from an object or array using property path. - * - * @author Yonel Ceruto - * @author Bernhard Schussek - */ -class PropertyPathAccessor implements DataAccessorInterface -{ - private $propertyAccessor; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->propertyAccessor = $propertyAccessor ?? PropertyAccess::createPropertyAccessor(); - } - - /** - * {@inheritdoc} - */ - public function getValue($data, FormInterface $form) - { - if (null === $propertyPath = $form->getPropertyPath()) { - throw new AccessException('Unable to read from the given form data as no property path is defined.'); - } - - return $this->getPropertyValue($data, $propertyPath); - } - - /** - * {@inheritdoc} - */ - public function setValue(&$data, $propertyValue, FormInterface $form): void - { - if (null === $propertyPath = $form->getPropertyPath()) { - throw new AccessException('Unable to write the given value as no property path is defined.'); - } - - // If the field is of type DateTimeInterface and the data is the same skip the update to - // keep the original object hash - if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $this->getPropertyValue($data, $propertyPath)) { - return; - } - - // If the data is identical to the value in $data, we are - // dealing with a reference - if (!\is_object($data) || !$form->getConfig()->getByReference() || $propertyValue !== $this->getPropertyValue($data, $propertyPath)) { - $this->propertyAccessor->setValue($data, $propertyPath, $propertyValue); - } - } - - /** - * {@inheritdoc} - */ - public function isReadable($data, FormInterface $form): bool - { - return null !== $form->getPropertyPath(); - } - - /** - * {@inheritdoc} - */ - public function isWritable($data, FormInterface $form): bool - { - return null !== $form->getPropertyPath(); - } - - private function getPropertyValue($data, PropertyPathInterface $propertyPath) - { - try { - return $this->propertyAccessor->getValue($data, $propertyPath); - } catch (PropertyAccessException $e) { - if (\is_array($data) && $e instanceof NoSuchIndexException) { - return null; - } - - if (!$e instanceof UninitializedPropertyException - // For versions without UninitializedPropertyException check the exception message - && (class_exists(UninitializedPropertyException::class) || false === strpos($e->getMessage(), 'You should initialize it')) - ) { - throw $e; - } - - return null; - } - } -} diff --git a/lib/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php b/lib/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php deleted file mode 100644 index ecfd83a06..000000000 --- a/lib/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Maps choices to/from checkbox forms. - * - * A {@link ChoiceListInterface} implementation is used to find the - * corresponding string values for the choices. Each checkbox form whose "value" - * option corresponds to any of the selected values is marked as selected. - * - * @author Bernhard Schussek - */ -class CheckboxListMapper implements DataMapperInterface -{ - /** - * {@inheritdoc} - */ - public function mapDataToForms($choices, iterable $checkboxes) - { - if (\is_array($checkboxes)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the second argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (null === $choices) { - $choices = []; - } - - if (!\is_array($choices)) { - throw new UnexpectedTypeException($choices, 'array'); - } - - foreach ($checkboxes as $checkbox) { - $value = $checkbox->getConfig()->getOption('value'); - $checkbox->setData(\in_array($value, $choices, true)); - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $checkboxes, &$choices) - { - if (\is_array($checkboxes)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the first argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (!\is_array($choices)) { - throw new UnexpectedTypeException($choices, 'array'); - } - - $values = []; - - foreach ($checkboxes as $checkbox) { - if ($checkbox->getData()) { - // construct an array of choice values - $values[] = $checkbox->getConfig()->getOption('value'); - } - } - - $choices = $values; - } -} diff --git a/lib/symfony/form/Extension/Core/DataMapper/DataMapper.php b/lib/symfony/form/Extension/Core/DataMapper/DataMapper.php deleted file mode 100644 index 5f4c498a3..000000000 --- a/lib/symfony/form/Extension/Core/DataMapper/DataMapper.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Extension\Core\DataAccessor\CallbackAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\ChainAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; - -/** - * Maps arrays/objects to/from forms using data accessors. - * - * @author Bernhard Schussek - */ -class DataMapper implements DataMapperInterface -{ - private $dataAccessor; - - public function __construct(DataAccessorInterface $dataAccessor = null) - { - $this->dataAccessor = $dataAccessor ?? new ChainAccessor([ - new CallbackAccessor(), - new PropertyPathAccessor(), - ]); - } - - /** - * {@inheritdoc} - */ - public function mapDataToForms($data, iterable $forms): void - { - if (\is_array($forms)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the second argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - $empty = null === $data || [] === $data; - - if (!$empty && !\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $config = $form->getConfig(); - - if (!$empty && $config->getMapped() && $this->dataAccessor->isReadable($data, $form)) { - $form->setData($this->dataAccessor->getValue($data, $form)); - } else { - $form->setData($config->getData()); - } - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $forms, &$data): void - { - if (\is_array($forms)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the first argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (null === $data) { - return; - } - - if (!\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $config = $form->getConfig(); - - // Write-back is disabled if the form is not synchronized (transformation failed), - // if the form was not submitted and if the form is disabled (modification not allowed) - if ($config->getMapped() && $form->isSubmitted() && $form->isSynchronized() && !$form->isDisabled() && $this->dataAccessor->isWritable($data, $form)) { - $this->dataAccessor->setValue($data, $form->getData(), $form); - } - } - } -} diff --git a/lib/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php b/lib/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php deleted file mode 100644 index 4c4257cfb..000000000 --- a/lib/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\PropertyAccess\Exception\AccessException; -use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; -use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; - -trigger_deprecation('symfony/form', '5.2', 'The "%s" class is deprecated. Use "%s" instead.', PropertyPathMapper::class, DataMapper::class); - -/** - * Maps arrays/objects to/from forms using property paths. - * - * @author Bernhard Schussek - * - * @deprecated since symfony/form 5.2. Use {@see DataMapper} instead. - */ -class PropertyPathMapper implements DataMapperInterface -{ - private $propertyAccessor; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - } - - /** - * {@inheritdoc} - */ - public function mapDataToForms($data, iterable $forms) - { - $empty = null === $data || [] === $data; - - if (!$empty && !\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $propertyPath = $form->getPropertyPath(); - $config = $form->getConfig(); - - if (!$empty && null !== $propertyPath && $config->getMapped()) { - $form->setData($this->getPropertyValue($data, $propertyPath)); - } else { - $form->setData($config->getData()); - } - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $forms, &$data) - { - if (null === $data) { - return; - } - - if (!\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $propertyPath = $form->getPropertyPath(); - $config = $form->getConfig(); - - // Write-back is disabled if the form is not synchronized (transformation failed), - // if the form was not submitted and if the form is disabled (modification not allowed) - if (null !== $propertyPath && $config->getMapped() && $form->isSubmitted() && $form->isSynchronized() && !$form->isDisabled()) { - $propertyValue = $form->getData(); - // If the field is of type DateTimeInterface and the data is the same skip the update to - // keep the original object hash - if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $this->getPropertyValue($data, $propertyPath)) { - continue; - } - - // If the data is identical to the value in $data, we are - // dealing with a reference - if (!\is_object($data) || !$config->getByReference() || $propertyValue !== $this->getPropertyValue($data, $propertyPath)) { - $this->propertyAccessor->setValue($data, $propertyPath, $propertyValue); - } - } - } - } - - private function getPropertyValue($data, $propertyPath) - { - try { - return $this->propertyAccessor->getValue($data, $propertyPath); - } catch (AccessException $e) { - if (\is_array($data) && $e instanceof NoSuchIndexException) { - return null; - } - - if (!$e instanceof UninitializedPropertyException - // For versions without UninitializedPropertyException check the exception message - && (class_exists(UninitializedPropertyException::class) || !str_contains($e->getMessage(), 'You should initialize it')) - ) { - throw $e; - } - - return null; - } - } -} diff --git a/lib/symfony/form/Extension/Core/DataMapper/RadioListMapper.php b/lib/symfony/form/Extension/Core/DataMapper/RadioListMapper.php deleted file mode 100644 index b54adfa5d..000000000 --- a/lib/symfony/form/Extension/Core/DataMapper/RadioListMapper.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Maps choices to/from radio forms. - * - * A {@link ChoiceListInterface} implementation is used to find the - * corresponding string values for the choices. The radio form whose "value" - * option corresponds to the selected value is marked as selected. - * - * @author Bernhard Schussek - */ -class RadioListMapper implements DataMapperInterface -{ - /** - * {@inheritdoc} - */ - public function mapDataToForms($choice, iterable $radios) - { - if (\is_array($radios)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the second argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (!\is_string($choice)) { - throw new UnexpectedTypeException($choice, 'string'); - } - - foreach ($radios as $radio) { - $value = $radio->getConfig()->getOption('value'); - $radio->setData($choice === $value); - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $radios, &$choice) - { - if (\is_array($radios)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the first argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (null !== $choice && !\is_string($choice)) { - throw new UnexpectedTypeException($choice, 'null or string'); - } - - $choice = null; - - foreach ($radios as $radio) { - if ($radio->getData()) { - if ('placeholder' === $radio->getName()) { - return; - } - - $choice = $radio->getConfig()->getOption('value'); - - return; - } - } - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php deleted file mode 100644 index f79920971..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ArrayToPartsTransformer implements DataTransformerInterface -{ - private $partMapping; - - public function __construct(array $partMapping) - { - $this->partMapping = $partMapping; - } - - public function transform($array) - { - if (null === $array) { - $array = []; - } - - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $result = []; - - foreach ($this->partMapping as $partKey => $originalKeys) { - if (empty($array)) { - $result[$partKey] = null; - } else { - $result[$partKey] = array_intersect_key($array, array_flip($originalKeys)); - } - } - - return $result; - } - - public function reverseTransform($array) - { - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $result = []; - $emptyKeys = []; - - foreach ($this->partMapping as $partKey => $originalKeys) { - if (!empty($array[$partKey])) { - foreach ($originalKeys as $originalKey) { - if (isset($array[$partKey][$originalKey])) { - $result[$originalKey] = $array[$partKey][$originalKey]; - } - } - } else { - $emptyKeys[] = $partKey; - } - } - - if (\count($emptyKeys) > 0) { - if (\count($emptyKeys) === \count($this->partMapping)) { - // All parts empty - return null; - } - - throw new TransformationFailedException(sprintf('The keys "%s" should not be empty.', implode('", "', $emptyKeys))); - } - - return $result; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php deleted file mode 100644 index 142f4894e..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; - -abstract class BaseDateTimeTransformer implements DataTransformerInterface -{ - protected static $formats = [ - \IntlDateFormatter::NONE, - \IntlDateFormatter::FULL, - \IntlDateFormatter::LONG, - \IntlDateFormatter::MEDIUM, - \IntlDateFormatter::SHORT, - ]; - - protected $inputTimezone; - - protected $outputTimezone; - - /** - * @param string|null $inputTimezone The name of the input timezone - * @param string|null $outputTimezone The name of the output timezone - * - * @throws InvalidArgumentException if a timezone is not valid - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null) - { - $this->inputTimezone = $inputTimezone ?: date_default_timezone_get(); - $this->outputTimezone = $outputTimezone ?: date_default_timezone_get(); - - // Check if input and output timezones are valid - try { - new \DateTimeZone($this->inputTimezone); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Input timezone is invalid: "%s".', $this->inputTimezone), $e->getCode(), $e); - } - - try { - new \DateTimeZone($this->outputTimezone); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Output timezone is invalid: "%s".', $this->outputTimezone), $e->getCode(), $e); - } - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php deleted file mode 100644 index b2d574599..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a Boolean and a string. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class BooleanToStringTransformer implements DataTransformerInterface -{ - private $trueValue; - - private $falseValues; - - /** - * @param string $trueValue The value emitted upon transform if the input is true - */ - public function __construct(string $trueValue, array $falseValues = [null]) - { - $this->trueValue = $trueValue; - $this->falseValues = $falseValues; - if (\in_array($this->trueValue, $this->falseValues, true)) { - throw new InvalidArgumentException('The specified "true" value is contained in the false-values.'); - } - } - - /** - * Transforms a Boolean into a string. - * - * @param bool $value Boolean value - * - * @return string|null - * - * @throws TransformationFailedException if the given value is not a Boolean - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!\is_bool($value)) { - throw new TransformationFailedException('Expected a Boolean.'); - } - - return $value ? $this->trueValue : null; - } - - /** - * Transforms a string into a Boolean. - * - * @param string $value String value - * - * @return bool - * - * @throws TransformationFailedException if the given value is not a string - */ - public function reverseTransform($value) - { - if (\in_array($value, $this->falseValues, true)) { - return false; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - return true; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php deleted file mode 100644 index e1feafe62..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ChoiceToValueTransformer implements DataTransformerInterface -{ - private $choiceList; - - public function __construct(ChoiceListInterface $choiceList) - { - $this->choiceList = $choiceList; - } - - public function transform($choice) - { - return (string) current($this->choiceList->getValuesForChoices([$choice])); - } - - public function reverseTransform($value) - { - if (null !== $value && !\is_string($value)) { - throw new TransformationFailedException('Expected a string or null.'); - } - - $choices = $this->choiceList->getChoicesForValues([(string) $value]); - - if (1 !== \count($choices)) { - if (null === $value || '' === $value) { - return null; - } - - throw new TransformationFailedException(sprintf('The choice "%s" does not exist or is not unique.', $value)); - } - - return current($choices); - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php deleted file mode 100644 index 6c9e4fe9d..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ChoicesToValuesTransformer implements DataTransformerInterface -{ - private $choiceList; - - public function __construct(ChoiceListInterface $choiceList) - { - $this->choiceList = $choiceList; - } - - /** - * @return array - * - * @throws TransformationFailedException if the given value is not an array - */ - public function transform($array) - { - if (null === $array) { - return []; - } - - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - return $this->choiceList->getValuesForChoices($array); - } - - /** - * @return array - * - * @throws TransformationFailedException if the given value is not an array - * or if no matching choice could be - * found for some given value - */ - public function reverseTransform($array) - { - if (null === $array) { - return []; - } - - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $choices = $this->choiceList->getChoicesForValues($array); - - if (\count($choices) !== \count($array)) { - throw new TransformationFailedException('Could not find all matching choices for the given values.'); - } - - return $choices; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php b/lib/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php deleted file mode 100644 index e3107a889..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Passes a value through multiple value transformers. - * - * @author Bernhard Schussek - */ -class DataTransformerChain implements DataTransformerInterface -{ - protected $transformers; - - /** - * Uses the given value transformers to transform values. - * - * @param DataTransformerInterface[] $transformers - */ - public function __construct(array $transformers) - { - $this->transformers = $transformers; - } - - /** - * Passes the value through the transform() method of all nested transformers. - * - * The transformers receive the value in the same order as they were passed - * to the constructor. Each transformer receives the result of the previous - * transformer as input. The output of the last transformer is returned - * by this method. - * - * @param mixed $value The original value - * - * @return mixed - * - * @throws TransformationFailedException - */ - public function transform($value) - { - foreach ($this->transformers as $transformer) { - $value = $transformer->transform($value); - } - - return $value; - } - - /** - * Passes the value through the reverseTransform() method of all nested - * transformers. - * - * The transformers receive the value in the reverse order as they were passed - * to the constructor. Each transformer receives the result of the previous - * transformer as input. The output of the last transformer is returned - * by this method. - * - * @param mixed $value The transformed value - * - * @return mixed - * - * @throws TransformationFailedException - */ - public function reverseTransform($value) - { - for ($i = \count($this->transformers) - 1; $i >= 0; --$i) { - $value = $this->transformers[$i]->reverseTransform($value); - } - - return $value; - } - - /** - * @return DataTransformerInterface[] - */ - public function getTransformers() - { - return $this->transformers; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php deleted file mode 100644 index 5a37d4c70..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a normalized date interval and an interval string/array. - * - * @author Steffen Roßkamp - */ -class DateIntervalToArrayTransformer implements DataTransformerInterface -{ - public const YEARS = 'years'; - public const MONTHS = 'months'; - public const DAYS = 'days'; - public const HOURS = 'hours'; - public const MINUTES = 'minutes'; - public const SECONDS = 'seconds'; - public const INVERT = 'invert'; - - private const AVAILABLE_FIELDS = [ - self::YEARS => 'y', - self::MONTHS => 'm', - self::DAYS => 'd', - self::HOURS => 'h', - self::MINUTES => 'i', - self::SECONDS => 's', - self::INVERT => 'r', - ]; - private $fields; - private $pad; - - /** - * @param string[]|null $fields The date fields - * @param bool $pad Whether to use padding - */ - public function __construct(array $fields = null, bool $pad = false) - { - $this->fields = $fields ?? ['years', 'months', 'days', 'hours', 'minutes', 'seconds', 'invert']; - $this->pad = $pad; - } - - /** - * Transforms a normalized date interval into an interval array. - * - * @param \DateInterval $dateInterval Normalized date interval - * - * @return array - * - * @throws UnexpectedTypeException if the given value is not a \DateInterval instance - */ - public function transform($dateInterval) - { - if (null === $dateInterval) { - return array_intersect_key( - [ - 'years' => '', - 'months' => '', - 'weeks' => '', - 'days' => '', - 'hours' => '', - 'minutes' => '', - 'seconds' => '', - 'invert' => false, - ], - array_flip($this->fields) - ); - } - if (!$dateInterval instanceof \DateInterval) { - throw new UnexpectedTypeException($dateInterval, \DateInterval::class); - } - $result = []; - foreach (self::AVAILABLE_FIELDS as $field => $char) { - $result[$field] = $dateInterval->format('%'.($this->pad ? strtoupper($char) : $char)); - } - if (\in_array('weeks', $this->fields, true)) { - $result['weeks'] = '0'; - if (isset($result['days']) && (int) $result['days'] >= 7) { - $result['weeks'] = (string) floor($result['days'] / 7); - $result['days'] = (string) ($result['days'] % 7); - } - } - $result['invert'] = '-' === $result['invert']; - $result = array_intersect_key($result, array_flip($this->fields)); - - return $result; - } - - /** - * Transforms an interval array into a normalized date interval. - * - * @param array $value Interval array - * - * @return \DateInterval|null - * - * @throws UnexpectedTypeException if the given value is not an array - * @throws TransformationFailedException if the value could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - if (!\is_array($value)) { - throw new UnexpectedTypeException($value, 'array'); - } - if ('' === implode('', $value)) { - return null; - } - $emptyFields = []; - foreach ($this->fields as $field) { - if (!isset($value[$field])) { - $emptyFields[] = $field; - } - } - if (\count($emptyFields) > 0) { - throw new TransformationFailedException(sprintf('The fields "%s" should not be empty.', implode('", "', $emptyFields))); - } - if (isset($value['invert']) && !\is_bool($value['invert'])) { - throw new TransformationFailedException('The value of "invert" must be boolean.'); - } - foreach (self::AVAILABLE_FIELDS as $field => $char) { - if ('invert' !== $field && isset($value[$field]) && !ctype_digit((string) $value[$field])) { - throw new TransformationFailedException(sprintf('This amount of "%s" is invalid.', $field)); - } - } - try { - if (!empty($value['weeks'])) { - $interval = sprintf( - 'P%sY%sM%sWT%sH%sM%sS', - empty($value['years']) ? '0' : $value['years'], - empty($value['months']) ? '0' : $value['months'], - empty($value['weeks']) ? '0' : $value['weeks'], - empty($value['hours']) ? '0' : $value['hours'], - empty($value['minutes']) ? '0' : $value['minutes'], - empty($value['seconds']) ? '0' : $value['seconds'] - ); - } else { - $interval = sprintf( - 'P%sY%sM%sDT%sH%sM%sS', - empty($value['years']) ? '0' : $value['years'], - empty($value['months']) ? '0' : $value['months'], - empty($value['days']) ? '0' : $value['days'], - empty($value['hours']) ? '0' : $value['hours'], - empty($value['minutes']) ? '0' : $value['minutes'], - empty($value['seconds']) ? '0' : $value['seconds'] - ); - } - $dateInterval = new \DateInterval($interval); - if (isset($value['invert'])) { - $dateInterval->invert = $value['invert'] ? 1 : 0; - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateInterval; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php deleted file mode 100644 index 723c344f9..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a date string and a DateInterval object. - * - * @author Steffen Roßkamp - */ -class DateIntervalToStringTransformer implements DataTransformerInterface -{ - private $format; - - /** - * Transforms a \DateInterval instance to a string. - * - * @see \DateInterval::format() for supported formats - * - * @param string $format The date format - */ - public function __construct(string $format = 'P%yY%mM%dDT%hH%iM%sS') - { - $this->format = $format; - } - - /** - * Transforms a DateInterval object into a date string with the configured format. - * - * @param \DateInterval|null $value A DateInterval object - * - * @return string - * - * @throws UnexpectedTypeException if the given value is not a \DateInterval instance - */ - public function transform($value) - { - if (null === $value) { - return ''; - } - if (!$value instanceof \DateInterval) { - throw new UnexpectedTypeException($value, \DateInterval::class); - } - - return $value->format($this->format); - } - - /** - * Transforms a date string in the configured format into a DateInterval object. - * - * @param string $value An ISO 8601 or date string like date interval presentation - * - * @return \DateInterval|null - * - * @throws UnexpectedTypeException if the given value is not a string - * @throws TransformationFailedException if the date interval could not be parsed - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - if (!\is_string($value)) { - throw new UnexpectedTypeException($value, 'string'); - } - if ('' === $value) { - return null; - } - if (!$this->isISO8601($value)) { - throw new TransformationFailedException('Non ISO 8601 date strings are not supported yet.'); - } - $valuePattern = '/^'.preg_replace('/%([yYmMdDhHiIsSwW])(\w)/', '(?P<$1>\d+)$2', $this->format).'$/'; - if (!preg_match($valuePattern, $value)) { - throw new TransformationFailedException(sprintf('Value "%s" contains intervals not accepted by format "%s".', $value, $this->format)); - } - try { - $dateInterval = new \DateInterval($value); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateInterval; - } - - private function isISO8601(string $string): bool - { - return preg_match('/^P(?=\w*(?:\d|%\w))(?:\d+Y|%[yY]Y)?(?:\d+M|%[mM]M)?(?:(?:\d+D|%[dD]D)|(?:\d+W|%[wW]W))?(?:T(?:\d+H|[hH]H)?(?:\d+M|[iI]M)?(?:\d+S|[sS]S)?)?$/', $string); - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php deleted file mode 100644 index 6eb40af9d..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a DateTimeImmutable object and a DateTime object. - * - * @author Valentin Udaltsov - */ -final class DateTimeImmutableToDateTimeTransformer implements DataTransformerInterface -{ - /** - * Transforms a DateTimeImmutable into a DateTime object. - * - * @param \DateTimeImmutable|null $value A DateTimeImmutable object - * - * @throws TransformationFailedException If the given value is not a \DateTimeImmutable - */ - public function transform($value): ?\DateTime - { - if (null === $value) { - return null; - } - - if (!$value instanceof \DateTimeImmutable) { - throw new TransformationFailedException('Expected a \DateTimeImmutable.'); - } - - if (\PHP_VERSION_ID >= 70300) { - return \DateTime::createFromImmutable($value); - } - - return \DateTime::createFromFormat('U.u', $value->format('U.u'))->setTimezone($value->getTimezone()); - } - - /** - * Transforms a DateTime object into a DateTimeImmutable object. - * - * @param \DateTime|null $value A DateTime object - * - * @throws TransformationFailedException If the given value is not a \DateTime - */ - public function reverseTransform($value): ?\DateTimeImmutable - { - if (null === $value) { - return null; - } - - if (!$value instanceof \DateTime) { - throw new TransformationFailedException('Expected a \DateTime.'); - } - - return \DateTimeImmutable::createFromMutable($value); - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php deleted file mode 100644 index 710dfb596..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php +++ /dev/null @@ -1,184 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a normalized time and a localized time string/array. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToArrayTransformer extends BaseDateTimeTransformer -{ - private $pad; - private $fields; - private $referenceDate; - - /** - * @param string|null $inputTimezone The input timezone - * @param string|null $outputTimezone The output timezone - * @param string[]|null $fields The date fields - * @param bool $pad Whether to use padding - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null, array $fields = null, bool $pad = false, \DateTimeInterface $referenceDate = null) - { - parent::__construct($inputTimezone, $outputTimezone); - - $this->fields = $fields ?? ['year', 'month', 'day', 'hour', 'minute', 'second']; - $this->pad = $pad; - $this->referenceDate = $referenceDate ?? new \DateTimeImmutable('1970-01-01 00:00:00'); - } - - /** - * Transforms a normalized date into a localized date. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return array - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return array_intersect_key([ - 'year' => '', - 'month' => '', - 'day' => '', - 'hour' => '', - 'minute' => '', - 'second' => '', - ], array_flip($this->fields)); - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - if ($this->inputTimezone !== $this->outputTimezone) { - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } - - $result = array_intersect_key([ - 'year' => $dateTime->format('Y'), - 'month' => $dateTime->format('m'), - 'day' => $dateTime->format('d'), - 'hour' => $dateTime->format('H'), - 'minute' => $dateTime->format('i'), - 'second' => $dateTime->format('s'), - ], array_flip($this->fields)); - - if (!$this->pad) { - foreach ($result as &$entry) { - // remove leading zeros - $entry = (string) (int) $entry; - } - // unset reference to keep scope clear - unset($entry); - } - - return $result; - } - - /** - * Transforms a localized date into a normalized date. - * - * @param array $value Localized date - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not an array, - * if the value could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if (!\is_array($value)) { - throw new TransformationFailedException('Expected an array.'); - } - - if ('' === implode('', $value)) { - return null; - } - - $emptyFields = []; - - foreach ($this->fields as $field) { - if (!isset($value[$field])) { - $emptyFields[] = $field; - } - } - - if (\count($emptyFields) > 0) { - throw new TransformationFailedException(sprintf('The fields "%s" should not be empty.', implode('", "', $emptyFields))); - } - - if (isset($value['month']) && !ctype_digit((string) $value['month'])) { - throw new TransformationFailedException('This month is invalid.'); - } - - if (isset($value['day']) && !ctype_digit((string) $value['day'])) { - throw new TransformationFailedException('This day is invalid.'); - } - - if (isset($value['year']) && !ctype_digit((string) $value['year'])) { - throw new TransformationFailedException('This year is invalid.'); - } - - if (!empty($value['month']) && !empty($value['day']) && !empty($value['year']) && false === checkdate($value['month'], $value['day'], $value['year'])) { - throw new TransformationFailedException('This is an invalid date.'); - } - - if (isset($value['hour']) && !ctype_digit((string) $value['hour'])) { - throw new TransformationFailedException('This hour is invalid.'); - } - - if (isset($value['minute']) && !ctype_digit((string) $value['minute'])) { - throw new TransformationFailedException('This minute is invalid.'); - } - - if (isset($value['second']) && !ctype_digit((string) $value['second'])) { - throw new TransformationFailedException('This second is invalid.'); - } - - try { - $dateTime = new \DateTime(sprintf( - '%s-%s-%s %s:%s:%s', - empty($value['year']) ? $this->referenceDate->format('Y') : $value['year'], - empty($value['month']) ? $this->referenceDate->format('m') : $value['month'], - empty($value['day']) ? $this->referenceDate->format('d') : $value['day'], - $value['hour'] ?? $this->referenceDate->format('H'), - $value['minute'] ?? $this->referenceDate->format('i'), - $value['second'] ?? $this->referenceDate->format('s') - ), - new \DateTimeZone($this->outputTimezone) - ); - - if ($this->inputTimezone !== $this->outputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateTime; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php deleted file mode 100644 index ebbc76b71..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Franz Wilding - * @author Bernhard Schussek - * @author Fred Cox - */ -class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer -{ - public const HTML5_FORMAT = 'Y-m-d\\TH:i:s'; - - /** - * Transforms a \DateTime into a local date and time string. - * - * According to the HTML standard, the input string of a datetime-local - * input is an RFC3339 date followed by 'T', followed by an RFC3339 time. - * https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-local-date-and-time-string - * - * @param \DateTime|\DateTimeInterface $dateTime A DateTime object - * - * @return string - * - * @throws TransformationFailedException If the given value is not an - * instance of \DateTime or \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTime && !$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTime or \DateTimeInterface.'); - } - - if ($this->inputTimezone !== $this->outputTimezone) { - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } - - return $dateTime->format(self::HTML5_FORMAT); - } - - /** - * Transforms a local date and time string into a \DateTime. - * - * When transforming back to DateTime the regex is slightly laxer, taking into - * account rules for parsing a local date and time string - * https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#parse-a-local-date-and-time-string - * - * @param string $dateTimeLocal Formatted string - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a string, - * if the value could not be transformed - */ - public function reverseTransform($dateTimeLocal) - { - if (!\is_string($dateTimeLocal)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $dateTimeLocal) { - return null; - } - - // to maintain backwards compatibility we do not strictly validate the submitted date - // see https://github.com/symfony/symfony/issues/28699 - if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})[T ]\d{2}:\d{2}(?::\d{2})?/', $dateTimeLocal, $matches)) { - throw new TransformationFailedException(sprintf('The date "%s" is not a valid date.', $dateTimeLocal)); - } - - try { - $dateTime = new \DateTime($dateTimeLocal, new \DateTimeZone($this->outputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - - if (!checkdate($matches[2], $matches[3], $matches[1])) { - throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); - } - - return $dateTime; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php deleted file mode 100644 index 7c8a4bcb2..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a normalized time and a localized time string. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer -{ - private $dateFormat; - private $timeFormat; - private $pattern; - private $calendar; - - /** - * @see BaseDateTimeTransformer::formats for available format options - * - * @param string|null $inputTimezone The name of the input timezone - * @param string|null $outputTimezone The name of the output timezone - * @param int|null $dateFormat The date format - * @param int|null $timeFormat The time format - * @param int $calendar One of the \IntlDateFormatter calendar constants - * @param string|null $pattern A pattern to pass to \IntlDateFormatter - * - * @throws UnexpectedTypeException If a format is not supported or if a timezone is not a string - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null, int $dateFormat = null, int $timeFormat = null, int $calendar = \IntlDateFormatter::GREGORIAN, string $pattern = null) - { - parent::__construct($inputTimezone, $outputTimezone); - - if (null === $dateFormat) { - $dateFormat = \IntlDateFormatter::MEDIUM; - } - - if (null === $timeFormat) { - $timeFormat = \IntlDateFormatter::SHORT; - } - - if (!\in_array($dateFormat, self::$formats, true)) { - throw new UnexpectedTypeException($dateFormat, implode('", "', self::$formats)); - } - - if (!\in_array($timeFormat, self::$formats, true)) { - throw new UnexpectedTypeException($timeFormat, implode('", "', self::$formats)); - } - - $this->dateFormat = $dateFormat; - $this->timeFormat = $timeFormat; - $this->calendar = $calendar; - $this->pattern = $pattern; - } - - /** - * Transforms a normalized date into a localized date string/array. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return string - * - * @throws TransformationFailedException if the given value is not a \DateTimeInterface - * or if the date could not be transformed - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - $value = $this->getIntlDateFormatter()->format($dateTime->getTimestamp()); - - if (0 != intl_get_error_code()) { - throw new TransformationFailedException(intl_get_error_message()); - } - - return $value; - } - - /** - * Transforms a localized date string/array into a normalized date. - * - * @param string|array $value Localized date string/array - * - * @return \DateTime|null - * - * @throws TransformationFailedException if the given value is not a string, - * if the date could not be parsed - */ - public function reverseTransform($value) - { - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $value) { - return null; - } - - // date-only patterns require parsing to be done in UTC, as midnight might not exist in the local timezone due - // to DST changes - $dateOnly = $this->isPatternDateOnly(); - $dateFormatter = $this->getIntlDateFormatter($dateOnly); - - try { - $timestamp = @$dateFormatter->parse($value); - } catch (\IntlException $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if (0 != intl_get_error_code()) { - throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code()); - } elseif ($timestamp > 253402214400) { - // This timestamp represents UTC midnight of 9999-12-31 to prevent 5+ digit years - throw new TransformationFailedException('Years beyond 9999 are not supported.'); - } elseif (false === $timestamp) { - // the value couldn't be parsed but the Intl extension didn't report an error code, this - // could be the case when the Intl polyfill is used which always returns 0 as the error code - throw new TransformationFailedException(sprintf('"%s" could not be parsed as a date.', $value)); - } - - try { - if ($dateOnly) { - // we only care about year-month-date, which has been delivered as a timestamp pointing to UTC midnight - $dateTime = new \DateTime(gmdate('Y-m-d', $timestamp), new \DateTimeZone($this->outputTimezone)); - } else { - // read timestamp into DateTime object - the formatter delivers a timestamp - $dateTime = new \DateTime(sprintf('@%s', $timestamp)); - } - // set timezone separately, as it would be ignored if set via the constructor, - // see https://php.net/datetime.construct - $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if ($this->outputTimezone !== $this->inputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - - return $dateTime; - } - - /** - * Returns a preconfigured IntlDateFormatter instance. - * - * @param bool $ignoreTimezone Use UTC regardless of the configured timezone - * - * @return \IntlDateFormatter - * - * @throws TransformationFailedException in case the date formatter cannot be constructed - */ - protected function getIntlDateFormatter(bool $ignoreTimezone = false) - { - $dateFormat = $this->dateFormat; - $timeFormat = $this->timeFormat; - $timezone = new \DateTimeZone($ignoreTimezone ? 'UTC' : $this->outputTimezone); - - $calendar = $this->calendar; - $pattern = $this->pattern; - - $intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern ?? ''); - - // new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323 - if (!$intlDateFormatter) { - throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code()); - } - - $intlDateFormatter->setLenient(false); - - return $intlDateFormatter; - } - - /** - * Checks if the pattern contains only a date. - * - * @return bool - */ - protected function isPatternDateOnly() - { - if (null === $this->pattern) { - return false; - } - - // strip escaped text - $pattern = preg_replace("#'(.*?)'#", '', $this->pattern); - - // check for the absence of time-related placeholders - return 0 === preg_match('#[ahHkKmsSAzZOvVxX]#', $pattern); - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php deleted file mode 100644 index e0cdbcfac..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer -{ - /** - * Transforms a normalized date into a localized date. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return string - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - if ($this->inputTimezone !== $this->outputTimezone) { - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } - - return preg_replace('/\+00:00$/', 'Z', $dateTime->format('c')); - } - - /** - * Transforms a formatted string following RFC 3339 into a normalized date. - * - * @param string $rfc3339 Formatted string - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a string, - * if the value could not be transformed - */ - public function reverseTransform($rfc3339) - { - if (!\is_string($rfc3339)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $rfc3339) { - return null; - } - - if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))$/', $rfc3339, $matches)) { - throw new TransformationFailedException(sprintf('The date "%s" is not a valid date.', $rfc3339)); - } - - try { - $dateTime = new \DateTime($rfc3339); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - - if (!checkdate($matches[2], $matches[3], $matches[1])) { - throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); - } - - return $dateTime; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php deleted file mode 100644 index 9e680b1c7..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a date string and a DateTime object. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToStringTransformer extends BaseDateTimeTransformer -{ - /** - * Format used for generating strings. - * - * @var string - */ - private $generateFormat; - - /** - * Format used for parsing strings. - * - * Different than the {@link $generateFormat} because formats for parsing - * support additional characters in PHP that are not supported for - * generating strings. - * - * @var string - */ - private $parseFormat; - - /** - * Transforms a \DateTime instance to a string. - * - * @see \DateTime::format() for supported formats - * - * @param string|null $inputTimezone The name of the input timezone - * @param string|null $outputTimezone The name of the output timezone - * @param string $format The date format - * @param string|null $parseFormat The parse format when different from $format - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null, string $format = 'Y-m-d H:i:s', string $parseFormat = null) - { - parent::__construct($inputTimezone, $outputTimezone); - - $this->generateFormat = $format; - $this->parseFormat = $parseFormat ?? $format; - - // See https://php.net/datetime.createfromformat - // The character "|" in the format makes sure that the parts of a date - // that are *not* specified in the format are reset to the corresponding - // values from 1970-01-01 00:00:00 instead of the current time. - // Without "|" and "Y-m-d", "2010-02-03" becomes "2010-02-03 12:32:47", - // where the time corresponds to the current server time. - // With "|" and "Y-m-d", "2010-02-03" becomes "2010-02-03 00:00:00", - // which is at least deterministic and thus used here. - if (!str_contains($this->parseFormat, '|')) { - $this->parseFormat .= '|'; - } - } - - /** - * Transforms a DateTime object into a date string with the configured format - * and timezone. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return string - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - - return $dateTime->format($this->generateFormat); - } - - /** - * Transforms a date string in the configured timezone into a DateTime object. - * - * @param string $value A value as produced by PHP's date() function - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a string, - * or could not be transformed - */ - public function reverseTransform($value) - { - if (empty($value)) { - return null; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - $outputTz = new \DateTimeZone($this->outputTimezone); - $dateTime = \DateTime::createFromFormat($this->parseFormat, $value, $outputTz); - - $lastErrors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warning_count' => 0]; - - if (0 < $lastErrors['warning_count'] || 0 < $lastErrors['error_count']) { - throw new TransformationFailedException(implode(', ', array_merge(array_values($lastErrors['warnings']), array_values($lastErrors['errors'])))); - } - - try { - if ($this->inputTimezone !== $this->outputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateTime; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php deleted file mode 100644 index f6c38ba4d..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a timestamp and a DateTime object. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToTimestampTransformer extends BaseDateTimeTransformer -{ - /** - * Transforms a DateTime object into a timestamp in the configured timezone. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return int|null - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return null; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - return $dateTime->getTimestamp(); - } - - /** - * Transforms a timestamp in the configured timezone into a DateTime object. - * - * @param string $value A timestamp - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a timestamp - * or if the given timestamp is invalid - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - try { - $dateTime = new \DateTime(); - $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - $dateTime->setTimestamp($value); - - if ($this->inputTimezone !== $this->outputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateTime; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php deleted file mode 100644 index 6dfccdfd3..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a timezone identifier string and a DateTimeZone object. - * - * @author Roland Franssen - */ -class DateTimeZoneToStringTransformer implements DataTransformerInterface -{ - private $multiple; - - public function __construct(bool $multiple = false) - { - $this->multiple = $multiple; - } - - /** - * {@inheritdoc} - */ - public function transform($dateTimeZone) - { - if (null === $dateTimeZone) { - return null; - } - - if ($this->multiple) { - if (!\is_array($dateTimeZone)) { - throw new TransformationFailedException('Expected an array of \DateTimeZone objects.'); - } - - return array_map([new self(), 'transform'], $dateTimeZone); - } - - if (!$dateTimeZone instanceof \DateTimeZone) { - throw new TransformationFailedException('Expected a \DateTimeZone object.'); - } - - return $dateTimeZone->getName(); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if ($this->multiple) { - if (!\is_array($value)) { - throw new TransformationFailedException('Expected an array of timezone identifier strings.'); - } - - return array_map([new self(), 'reverseTransform'], $value); - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a timezone identifier string.'); - } - - try { - return new \DateTimeZone($value); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php deleted file mode 100644 index 1ba914062..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between an integer and a localized number with grouping - * (each thousand) and comma separators. - * - * @author Bernhard Schussek - */ -class IntegerToLocalizedStringTransformer extends NumberToLocalizedStringTransformer -{ - /** - * Constructs a transformer. - * - * @param bool $grouping Whether thousands should be grouped - * @param int $roundingMode One of the ROUND_ constants in this class - * @param string|null $locale locale used for transforming - */ - public function __construct(?bool $grouping = false, ?int $roundingMode = \NumberFormatter::ROUND_DOWN, string $locale = null) - { - parent::__construct(0, $grouping, $roundingMode, $locale); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - $decimalSeparator = $this->getNumberFormatter()->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); - - if (\is_string($value) && str_contains($value, $decimalSeparator)) { - throw new TransformationFailedException(sprintf('The value "%s" is not a valid integer.', $value)); - } - - $result = parent::reverseTransform($value); - - return null !== $result ? (int) $result : null; - } - - /** - * @internal - */ - protected function castParsedValue($value) - { - return $value; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php deleted file mode 100644 index aa4629f2e..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a timezone identifier string and a IntlTimeZone object. - * - * @author Roland Franssen - */ -class IntlTimeZoneToStringTransformer implements DataTransformerInterface -{ - private $multiple; - - public function __construct(bool $multiple = false) - { - $this->multiple = $multiple; - } - - /** - * {@inheritdoc} - */ - public function transform($intlTimeZone) - { - if (null === $intlTimeZone) { - return null; - } - - if ($this->multiple) { - if (!\is_array($intlTimeZone)) { - throw new TransformationFailedException('Expected an array of \IntlTimeZone objects.'); - } - - return array_map([new self(), 'transform'], $intlTimeZone); - } - - if (!$intlTimeZone instanceof \IntlTimeZone) { - throw new TransformationFailedException('Expected a \IntlTimeZone object.'); - } - - return $intlTimeZone->getID(); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - if (null === $value) { - return; - } - - if ($this->multiple) { - if (!\is_array($value)) { - throw new TransformationFailedException('Expected an array of timezone identifier strings.'); - } - - return array_map([new self(), 'reverseTransform'], $value); - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a timezone identifier string.'); - } - - $intlTimeZone = \IntlTimeZone::createTimeZone($value); - - if ('Etc/Unknown' === $intlTimeZone->getID()) { - throw new TransformationFailedException(sprintf('Unknown timezone identifier "%s".', $value)); - } - - return $intlTimeZone; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php deleted file mode 100644 index 9784fe673..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a normalized format and a localized money string. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransformer -{ - private $divisor; - - public function __construct(?int $scale = 2, ?bool $grouping = true, ?int $roundingMode = \NumberFormatter::ROUND_HALFUP, ?int $divisor = 1, string $locale = null) - { - parent::__construct($scale ?? 2, $grouping ?? true, $roundingMode, $locale); - - $this->divisor = $divisor ?? 1; - } - - /** - * Transforms a normalized format into a localized money string. - * - * @param int|float|null $value Normalized number - * - * @return string - * - * @throws TransformationFailedException if the given value is not numeric or - * if the value cannot be transformed - */ - public function transform($value) - { - if (null !== $value && 1 !== $this->divisor) { - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - $value /= $this->divisor; - } - - return parent::transform($value); - } - - /** - * Transforms a localized money string into a normalized format. - * - * @param string $value Localized money string - * - * @return int|float|null - * - * @throws TransformationFailedException if the given value is not a string - * or if the value cannot be transformed - */ - public function reverseTransform($value) - { - $value = parent::reverseTransform($value); - if (null !== $value && 1 !== $this->divisor) { - $value = (float) (string) ($value * $this->divisor); - } - - return $value; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php deleted file mode 100644 index 53e564b13..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ /dev/null @@ -1,265 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a number type and a localized number with grouping - * (each thousand) and comma separators. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class NumberToLocalizedStringTransformer implements DataTransformerInterface -{ - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_CEILING instead. - */ - public const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_FLOOR instead. - */ - public const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_UP instead. - */ - public const ROUND_UP = \NumberFormatter::ROUND_UP; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_DOWN instead. - */ - public const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFEVEN instead. - */ - public const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFUP instead. - */ - public const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFDOWN instead. - */ - public const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN; - - protected $grouping; - - protected $roundingMode; - - private $scale; - private $locale; - - public function __construct(int $scale = null, ?bool $grouping = false, ?int $roundingMode = \NumberFormatter::ROUND_HALFUP, string $locale = null) - { - $this->scale = $scale; - $this->grouping = $grouping ?? false; - $this->roundingMode = $roundingMode ?? \NumberFormatter::ROUND_HALFUP; - $this->locale = $locale; - } - - /** - * Transforms a number type into localized number. - * - * @param int|float|null $value Number value - * - * @return string - * - * @throws TransformationFailedException if the given value is not numeric - * or if the value cannot be transformed - */ - public function transform($value) - { - if (null === $value) { - return ''; - } - - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - $formatter = $this->getNumberFormatter(); - $value = $formatter->format($value); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - // Convert non-breaking and narrow non-breaking spaces to normal ones - $value = str_replace(["\xc2\xa0", "\xe2\x80\xaf"], ' ', $value); - - return $value; - } - - /** - * Transforms a localized number into an integer or float. - * - * @param string $value The localized value - * - * @return int|float|null - * - * @throws TransformationFailedException if the given value is not a string - * or if the value cannot be transformed - */ - public function reverseTransform($value) - { - if (null !== $value && !\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - if (null === $value || '' === $value) { - return null; - } - - if (\in_array($value, ['NaN', 'NAN', 'nan'], true)) { - throw new TransformationFailedException('"NaN" is not a valid number.'); - } - - $position = 0; - $formatter = $this->getNumberFormatter(); - $groupSep = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL); - $decSep = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); - - if ('.' !== $decSep && (!$this->grouping || '.' !== $groupSep)) { - $value = str_replace('.', $decSep, $value); - } - - if (',' !== $decSep && (!$this->grouping || ',' !== $groupSep)) { - $value = str_replace(',', $decSep, $value); - } - - if (str_contains($value, $decSep)) { - $type = \NumberFormatter::TYPE_DOUBLE; - } else { - $type = \PHP_INT_SIZE === 8 - ? \NumberFormatter::TYPE_INT64 - : \NumberFormatter::TYPE_INT32; - } - - $result = $formatter->parse($value, $type, $position); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - if ($result >= \PHP_INT_MAX || $result <= -\PHP_INT_MAX) { - throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like.'); - } - - $result = $this->castParsedValue($result); - - if (false !== $encoding = mb_detect_encoding($value, null, true)) { - $length = mb_strlen($value, $encoding); - $remainder = mb_substr($value, $position, $length, $encoding); - } else { - $length = \strlen($value); - $remainder = substr($value, $position, $length); - } - - // After parsing, position holds the index of the character where the - // parsing stopped - if ($position < $length) { - // Check if there are unrecognized characters at the end of the - // number (excluding whitespace characters) - $remainder = trim($remainder, " \t\n\r\0\x0b\xc2\xa0"); - - if ('' !== $remainder) { - throw new TransformationFailedException(sprintf('The number contains unrecognized characters: "%s".', $remainder)); - } - } - - // NumberFormatter::parse() does not round - return $this->round($result); - } - - /** - * Returns a preconfigured \NumberFormatter instance. - * - * @return \NumberFormatter - */ - protected function getNumberFormatter() - { - $formatter = new \NumberFormatter($this->locale ?? \Locale::getDefault(), \NumberFormatter::DECIMAL); - - if (null !== $this->scale) { - $formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->scale); - $formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode); - } - - $formatter->setAttribute(\NumberFormatter::GROUPING_USED, $this->grouping); - - return $formatter; - } - - /** - * @internal - */ - protected function castParsedValue($value) - { - if (\is_int($value) && $value === (int) $float = (float) $value) { - return $float; - } - - return $value; - } - - /** - * Rounds a number according to the configured scale and rounding mode. - * - * @param int|float $number A number - * - * @return int|float - */ - private function round($number) - { - if (null !== $this->scale && null !== $this->roundingMode) { - // shift number to maintain the correct scale during rounding - $roundingCoef = 10 ** $this->scale; - // string representation to avoid rounding errors, similar to bcmul() - $number = (string) ($number * $roundingCoef); - - switch ($this->roundingMode) { - case \NumberFormatter::ROUND_CEILING: - $number = ceil($number); - break; - case \NumberFormatter::ROUND_FLOOR: - $number = floor($number); - break; - case \NumberFormatter::ROUND_UP: - $number = $number > 0 ? ceil($number) : floor($number); - break; - case \NumberFormatter::ROUND_DOWN: - $number = $number > 0 ? floor($number) : ceil($number); - break; - case \NumberFormatter::ROUND_HALFEVEN: - $number = round($number, 0, \PHP_ROUND_HALF_EVEN); - break; - case \NumberFormatter::ROUND_HALFUP: - $number = round($number, 0, \PHP_ROUND_HALF_UP); - break; - case \NumberFormatter::ROUND_HALFDOWN: - $number = round($number, 0, \PHP_ROUND_HALF_DOWN); - break; - } - - $number = 1 === $roundingCoef ? (int) $number : $number / $roundingCoef; - } - - return $number; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php deleted file mode 100644 index 5b97f0190..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a normalized format (integer or float) and a percentage value. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class PercentToLocalizedStringTransformer implements DataTransformerInterface -{ - public const FRACTIONAL = 'fractional'; - public const INTEGER = 'integer'; - - protected static $types = [ - self::FRACTIONAL, - self::INTEGER, - ]; - - private $roundingMode; - private $type; - private $scale; - private $html5Format; - - /** - * @see self::$types for a list of supported types - * - * @param int|null $roundingMode A value from \NumberFormatter, such as \NumberFormatter::ROUND_HALFUP - * @param bool $html5Format Use an HTML5 specific format, see https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats - * - * @throws UnexpectedTypeException if the given value of type is unknown - */ - public function __construct(int $scale = null, string $type = null, int $roundingMode = null, bool $html5Format = false) - { - if (null === $type) { - $type = self::FRACTIONAL; - } - - if (null === $roundingMode && (\func_num_args() < 4 || func_get_arg(3))) { - trigger_deprecation('symfony/form', '5.1', 'Not passing a rounding mode to "%s()" is deprecated. Starting with Symfony 6.0 it will default to "\NumberFormatter::ROUND_HALFUP".', __METHOD__); - } - - if (!\in_array($type, self::$types, true)) { - throw new UnexpectedTypeException($type, implode('", "', self::$types)); - } - - $this->type = $type; - $this->scale = $scale ?? 0; - $this->roundingMode = $roundingMode; - $this->html5Format = $html5Format; - } - - /** - * Transforms between a normalized format (integer or float) into a percentage value. - * - * @param int|float $value Normalized value - * - * @return string - * - * @throws TransformationFailedException if the given value is not numeric or - * if the value could not be transformed - */ - public function transform($value) - { - if (null === $value) { - return ''; - } - - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - if (self::FRACTIONAL == $this->type) { - $value *= 100; - } - - $formatter = $this->getNumberFormatter(); - $value = $formatter->format($value); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - // replace the UTF-8 non break spaces - return $value; - } - - /** - * Transforms between a percentage value into a normalized format (integer or float). - * - * @param string $value Percentage value - * - * @return int|float|null - * - * @throws TransformationFailedException if the given value is not a string or - * if the value could not be transformed - */ - public function reverseTransform($value) - { - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $value) { - return null; - } - - $position = 0; - $formatter = $this->getNumberFormatter(); - $groupSep = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL); - $decSep = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); - $grouping = $formatter->getAttribute(\NumberFormatter::GROUPING_USED); - - if ('.' !== $decSep && (!$grouping || '.' !== $groupSep)) { - $value = str_replace('.', $decSep, $value); - } - - if (',' !== $decSep && (!$grouping || ',' !== $groupSep)) { - $value = str_replace(',', $decSep, $value); - } - - if (str_contains($value, $decSep)) { - $type = \NumberFormatter::TYPE_DOUBLE; - } else { - $type = \PHP_INT_SIZE === 8 ? \NumberFormatter::TYPE_INT64 : \NumberFormatter::TYPE_INT32; - } - - // replace normal spaces so that the formatter can read them - $result = $formatter->parse(str_replace(' ', "\xc2\xa0", $value), $type, $position); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - if (self::FRACTIONAL == $this->type) { - $result /= 100; - } - - if (\function_exists('mb_detect_encoding') && false !== $encoding = mb_detect_encoding($value, null, true)) { - $length = mb_strlen($value, $encoding); - $remainder = mb_substr($value, $position, $length, $encoding); - } else { - $length = \strlen($value); - $remainder = substr($value, $position, $length); - } - - // After parsing, position holds the index of the character where the - // parsing stopped - if ($position < $length) { - // Check if there are unrecognized characters at the end of the - // number (excluding whitespace characters) - $remainder = trim($remainder, " \t\n\r\0\x0b\xc2\xa0"); - - if ('' !== $remainder) { - throw new TransformationFailedException(sprintf('The number contains unrecognized characters: "%s".', $remainder)); - } - } - - return $this->round($result); - } - - /** - * Returns a preconfigured \NumberFormatter instance. - * - * @return \NumberFormatter - */ - protected function getNumberFormatter() - { - // Values used in HTML5 number inputs should be formatted as in "1234.5", ie. 'en' format without grouping, - // according to https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats - $formatter = new \NumberFormatter($this->html5Format ? 'en' : \Locale::getDefault(), \NumberFormatter::DECIMAL); - - if ($this->html5Format) { - $formatter->setAttribute(\NumberFormatter::GROUPING_USED, 0); - } - - $formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->scale); - - if (null !== $this->roundingMode) { - $formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode); - } - - return $formatter; - } - - /** - * Rounds a number according to the configured scale and rounding mode. - * - * @param int|float $number A number - * - * @return int|float - */ - private function round($number) - { - if (null !== $this->scale && null !== $this->roundingMode) { - // shift number to maintain the correct scale during rounding - $roundingCoef = 10 ** $this->scale; - - if (self::FRACTIONAL == $this->type) { - $roundingCoef *= 100; - } - - // string representation to avoid rounding errors, similar to bcmul() - $number = (string) ($number * $roundingCoef); - - switch ($this->roundingMode) { - case \NumberFormatter::ROUND_CEILING: - $number = ceil($number); - break; - case \NumberFormatter::ROUND_FLOOR: - $number = floor($number); - break; - case \NumberFormatter::ROUND_UP: - $number = $number > 0 ? ceil($number) : floor($number); - break; - case \NumberFormatter::ROUND_DOWN: - $number = $number > 0 ? floor($number) : ceil($number); - break; - case \NumberFormatter::ROUND_HALFEVEN: - $number = round($number, 0, \PHP_ROUND_HALF_EVEN); - break; - case \NumberFormatter::ROUND_HALFUP: - $number = round($number, 0, \PHP_ROUND_HALF_UP); - break; - case \NumberFormatter::ROUND_HALFDOWN: - $number = round($number, 0, \PHP_ROUND_HALF_DOWN); - break; - } - - $number = 1 === $roundingCoef ? (int) $number : $number / $roundingCoef; - } - - return $number; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php deleted file mode 100644 index 27e60b430..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -class StringToFloatTransformer implements DataTransformerInterface -{ - private $scale; - - public function __construct(int $scale = null) - { - $this->scale = $scale; - } - - /** - * @param mixed $value - * - * @return float|null - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!\is_string($value) || !is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric string.'); - } - - return (float) $value; - } - - /** - * @param mixed $value - * - * @return string|null - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if (!\is_int($value) && !\is_float($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - if ($this->scale > 0) { - return number_format((float) $value, $this->scale, '.', ''); - } - - return (string) $value; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php deleted file mode 100644 index 33b57db73..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Uid\Ulid; - -/** - * Transforms between a ULID string and a Ulid object. - * - * @author Pavel Dyakonov - */ -class UlidToStringTransformer implements DataTransformerInterface -{ - /** - * Transforms a Ulid object into a string. - * - * @param Ulid $value A Ulid object - * - * @return string|null - * - * @throws TransformationFailedException If the given value is not a Ulid object - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!$value instanceof Ulid) { - throw new TransformationFailedException('Expected a Ulid.'); - } - - return (string) $value; - } - - /** - * Transforms a ULID string into a Ulid object. - * - * @param string $value A ULID string - * - * @return Ulid|null - * - * @throws TransformationFailedException If the given value is not a string, - * or could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value || '' === $value) { - return null; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - try { - $ulid = new Ulid($value); - } catch (\InvalidArgumentException $e) { - throw new TransformationFailedException(sprintf('The value "%s" is not a valid ULID.', $value), $e->getCode(), $e); - } - - return $ulid; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php deleted file mode 100644 index c4775bb12..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Uid\Uuid; - -/** - * Transforms between a UUID string and a Uuid object. - * - * @author Pavel Dyakonov - */ -class UuidToStringTransformer implements DataTransformerInterface -{ - /** - * Transforms a Uuid object into a string. - * - * @param Uuid $value A Uuid object - * - * @return string|null - * - * @throws TransformationFailedException If the given value is not a Uuid object - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!$value instanceof Uuid) { - throw new TransformationFailedException('Expected a Uuid.'); - } - - return (string) $value; - } - - /** - * Transforms a UUID string into a Uuid object. - * - * @param string $value A UUID string - * - * @return Uuid|null - * - * @throws TransformationFailedException If the given value is not a string, - * or could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value || '' === $value) { - return null; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - if (!Uuid::isValid($value)) { - throw new TransformationFailedException(sprintf('The value "%s" is not a valid UUID.', $value)); - } - - try { - return Uuid::fromString($value); - } catch (\InvalidArgumentException $e) { - throw new TransformationFailedException(sprintf('The value "%s" is not a valid UUID.', $value), $e->getCode(), $e); - } - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php deleted file mode 100644 index 5249e3b36..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ValueToDuplicatesTransformer implements DataTransformerInterface -{ - private $keys; - - public function __construct(array $keys) - { - $this->keys = $keys; - } - - /** - * Duplicates the given value through the array. - * - * @param mixed $value The value - * - * @return array - */ - public function transform($value) - { - $result = []; - - foreach ($this->keys as $key) { - $result[$key] = $value; - } - - return $result; - } - - /** - * Extracts the duplicated value from an array. - * - * @return mixed - * - * @throws TransformationFailedException if the given value is not an array or - * if the given array cannot be transformed - */ - public function reverseTransform($array) - { - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $result = current($array); - $emptyKeys = []; - - foreach ($this->keys as $key) { - if (isset($array[$key]) && '' !== $array[$key] && false !== $array[$key] && [] !== $array[$key]) { - if ($array[$key] !== $result) { - throw new TransformationFailedException('All values in the array should be the same.'); - } - } else { - $emptyKeys[] = $key; - } - } - - if (\count($emptyKeys) > 0) { - if (\count($emptyKeys) == \count($this->keys)) { - // All keys empty - return null; - } - - throw new TransformationFailedException(sprintf('The keys "%s" should not be empty.', implode('", "', $emptyKeys))); - } - - return $result; - } -} diff --git a/lib/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php b/lib/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php deleted file mode 100644 index d7349bbc9..000000000 --- a/lib/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between an ISO 8601 week date string and an array. - * - * @author Damien Fayet - */ -class WeekToArrayTransformer implements DataTransformerInterface -{ - /** - * Transforms a string containing an ISO 8601 week date into an array. - * - * @param string|null $value A week date string - * - * @return array{year: int|null, week: int|null} - * - * @throws TransformationFailedException If the given value is not a string, - * or if the given value does not follow the right format - */ - public function transform($value) - { - if (null === $value) { - return ['year' => null, 'week' => null]; - } - - if (!\is_string($value)) { - throw new TransformationFailedException(sprintf('Value is expected to be a string but was "%s".', get_debug_type($value))); - } - - if (0 === preg_match('/^(?P\d{4})-W(?P\d{2})$/', $value, $matches)) { - throw new TransformationFailedException('Given data does not follow the date format "Y-\WW".'); - } - - return [ - 'year' => (int) $matches['year'], - 'week' => (int) $matches['week'], - ]; - } - - /** - * Transforms an array into a week date string. - * - * @param array{year: int|null, week: int|null} $value - * - * @return string|null A week date string following the format Y-\WW - * - * @throws TransformationFailedException If the given value cannot be merged in a valid week date string, - * or if the obtained week date does not exists - */ - public function reverseTransform($value) - { - if (null === $value || [] === $value) { - return null; - } - - if (!\is_array($value)) { - throw new TransformationFailedException(sprintf('Value is expected to be an array, but was "%s".', get_debug_type($value))); - } - - if (!\array_key_exists('year', $value)) { - throw new TransformationFailedException('Key "year" is missing.'); - } - - if (!\array_key_exists('week', $value)) { - throw new TransformationFailedException('Key "week" is missing.'); - } - - if ($additionalKeys = array_diff(array_keys($value), ['year', 'week'])) { - throw new TransformationFailedException(sprintf('Expected only keys "year" and "week" to be present, but also got ["%s"].', implode('", "', $additionalKeys))); - } - - if (null === $value['year'] && null === $value['week']) { - return null; - } - - if (!\is_int($value['year'])) { - throw new TransformationFailedException(sprintf('Year is expected to be an integer, but was "%s".', get_debug_type($value['year']))); - } - - if (!\is_int($value['week'])) { - throw new TransformationFailedException(sprintf('Week is expected to be an integer, but was "%s".', get_debug_type($value['week']))); - } - - // The 28th December is always in the last week of the year - if (date('W', strtotime('28th December '.$value['year'])) < $value['week']) { - throw new TransformationFailedException(sprintf('Week "%d" does not exist for year "%d".', $value['week'], $value['year'])); - } - - return sprintf('%d-W%02d', $value['year'], $value['week']); - } -} diff --git a/lib/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php b/lib/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php deleted file mode 100644 index c49721228..000000000 --- a/lib/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; - -/** - * Adds a protocol to a URL if it doesn't already have one. - * - * @author Bernhard Schussek - */ -class FixUrlProtocolListener implements EventSubscriberInterface -{ - private $defaultProtocol; - - /** - * @param string|null $defaultProtocol The URL scheme to add when there is none or null to not modify the data - */ - public function __construct(?string $defaultProtocol = 'http') - { - $this->defaultProtocol = $defaultProtocol; - } - - public function onSubmit(FormEvent $event) - { - $data = $event->getData(); - - if ($this->defaultProtocol && $data && \is_string($data) && !preg_match('~^(?:[/.]|[\w+.-]+://|[^:/?@#]++@)~', $data)) { - $event->setData($this->defaultProtocol.'://'.$data); - } - } - - public static function getSubscribedEvents() - { - return [FormEvents::SUBMIT => 'onSubmit']; - } -} diff --git a/lib/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php b/lib/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php deleted file mode 100644 index cd4a3b543..000000000 --- a/lib/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; - -/** - * @author Bernhard Schussek - */ -class MergeCollectionListener implements EventSubscriberInterface -{ - private $allowAdd; - private $allowDelete; - - /** - * @param bool $allowAdd Whether values might be added to the collection - * @param bool $allowDelete Whether values might be removed from the collection - */ - public function __construct(bool $allowAdd = false, bool $allowDelete = false) - { - $this->allowAdd = $allowAdd; - $this->allowDelete = $allowDelete; - } - - public static function getSubscribedEvents() - { - return [ - FormEvents::SUBMIT => 'onSubmit', - ]; - } - - public function onSubmit(FormEvent $event) - { - $dataToMergeInto = $event->getForm()->getNormData(); - $data = $event->getData(); - - if (null === $data) { - $data = []; - } - - if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'); - } - - if (null !== $dataToMergeInto && !\is_array($dataToMergeInto) && !($dataToMergeInto instanceof \Traversable && $dataToMergeInto instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($dataToMergeInto, 'array or (\Traversable and \ArrayAccess)'); - } - - // If we are not allowed to change anything, return immediately - if ($data === $dataToMergeInto || (!$this->allowAdd && !$this->allowDelete)) { - $event->setData($dataToMergeInto); - - return; - } - - if (null === $dataToMergeInto) { - // No original data was set. Set it if allowed - if ($this->allowAdd) { - $dataToMergeInto = $data; - } - } else { - // Calculate delta - $itemsToAdd = \is_object($data) ? clone $data : $data; - $itemsToDelete = []; - - foreach ($dataToMergeInto as $beforeKey => $beforeItem) { - foreach ($data as $afterKey => $afterItem) { - if ($afterItem === $beforeItem) { - // Item found, next original item - unset($itemsToAdd[$afterKey]); - continue 2; - } - } - - // Item not found, remember for deletion - $itemsToDelete[] = $beforeKey; - } - - // Remove deleted items before adding to free keys that are to be - // replaced - if ($this->allowDelete) { - foreach ($itemsToDelete as $key) { - unset($dataToMergeInto[$key]); - } - } - - // Add remaining items - if ($this->allowAdd) { - foreach ($itemsToAdd as $key => $item) { - if (!isset($dataToMergeInto[$key])) { - $dataToMergeInto[$key] = $item; - } else { - $dataToMergeInto[] = $item; - } - } - } - } - - $event->setData($dataToMergeInto); - } -} diff --git a/lib/symfony/form/Extension/Core/EventListener/ResizeFormListener.php b/lib/symfony/form/Extension/Core/EventListener/ResizeFormListener.php deleted file mode 100644 index 813456b95..000000000 --- a/lib/symfony/form/Extension/Core/EventListener/ResizeFormListener.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; - -/** - * Resize a collection form element based on the data sent from the client. - * - * @author Bernhard Schussek - */ -class ResizeFormListener implements EventSubscriberInterface -{ - protected $type; - protected $options; - protected $allowAdd; - protected $allowDelete; - - private $deleteEmpty; - - /** - * @param bool $allowAdd Whether children could be added to the group - * @param bool $allowDelete Whether children could be removed from the group - * @param bool|callable $deleteEmpty - */ - public function __construct(string $type, array $options = [], bool $allowAdd = false, bool $allowDelete = false, $deleteEmpty = false) - { - $this->type = $type; - $this->allowAdd = $allowAdd; - $this->allowDelete = $allowDelete; - $this->options = $options; - $this->deleteEmpty = $deleteEmpty; - } - - public static function getSubscribedEvents() - { - return [ - FormEvents::PRE_SET_DATA => 'preSetData', - FormEvents::PRE_SUBMIT => 'preSubmit', - // (MergeCollectionListener, MergeDoctrineCollectionListener) - FormEvents::SUBMIT => ['onSubmit', 50], - ]; - } - - public function preSetData(FormEvent $event) - { - $form = $event->getForm(); - $data = $event->getData(); - - if (null === $data) { - $data = []; - } - - if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'); - } - - // First remove all rows - foreach ($form as $name => $child) { - $form->remove($name); - } - - // Then add all rows again in the correct order - foreach ($data as $name => $value) { - $form->add($name, $this->type, array_replace([ - 'property_path' => '['.$name.']', - ], $this->options)); - } - } - - public function preSubmit(FormEvent $event) - { - $form = $event->getForm(); - $data = $event->getData(); - - if (!\is_array($data)) { - $data = []; - } - - // Remove all empty rows - if ($this->allowDelete) { - foreach ($form as $name => $child) { - if (!isset($data[$name])) { - $form->remove($name); - } - } - } - - // Add all additional rows - if ($this->allowAdd) { - foreach ($data as $name => $value) { - if (!$form->has($name)) { - $form->add($name, $this->type, array_replace([ - 'property_path' => '['.$name.']', - ], $this->options)); - } - } - } - } - - public function onSubmit(FormEvent $event) - { - $form = $event->getForm(); - $data = $event->getData(); - - // At this point, $data is an array or an array-like object that already contains the - // new entries, which were added by the data mapper. The data mapper ignores existing - // entries, so we need to manually unset removed entries in the collection. - - if (null === $data) { - $data = []; - } - - if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'); - } - - if ($this->deleteEmpty) { - $previousData = $form->getData(); - /** @var FormInterface $child */ - foreach ($form as $name => $child) { - if (!$child->isValid() || !$child->isSynchronized()) { - continue; - } - - $isNew = !isset($previousData[$name]); - $isEmpty = \is_callable($this->deleteEmpty) ? ($this->deleteEmpty)($child->getData()) : $child->isEmpty(); - - // $isNew can only be true if allowAdd is true, so we don't - // need to check allowAdd again - if ($isEmpty && ($isNew || $this->allowDelete)) { - unset($data[$name]); - $form->remove($name); - } - } - } - - // The data mapper only adds, but does not remove items, so do this - // here - if ($this->allowDelete) { - $toDelete = []; - - foreach ($data as $name => $child) { - if (!$form->has($name)) { - $toDelete[] = $name; - } - } - - foreach ($toDelete as $name) { - unset($data[$name]); - } - } - - $event->setData($data); - } -} diff --git a/lib/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php b/lib/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php deleted file mode 100644 index 70a7c19c2..000000000 --- a/lib/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Christian Flothmann - */ -class TransformationFailureListener implements EventSubscriberInterface -{ - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - public static function getSubscribedEvents() - { - return [ - FormEvents::POST_SUBMIT => ['convertTransformationFailureToFormError', -1024], - ]; - } - - public function convertTransformationFailureToFormError(FormEvent $event) - { - $form = $event->getForm(); - - if (null === $form->getTransformationFailure() || !$form->isValid()) { - return; - } - - foreach ($form as $child) { - if (!$child->isSynchronized()) { - return; - } - } - - $clientDataAsString = \is_scalar($form->getViewData()) ? (string) $form->getViewData() : get_debug_type($form->getViewData()); - $messageTemplate = $form->getConfig()->getOption('invalid_message', 'The value {{ value }} is not valid.'); - $messageParameters = array_replace(['{{ value }}' => $clientDataAsString], $form->getConfig()->getOption('invalid_message_parameters', [])); - - if (null !== $this->translator) { - $message = $this->translator->trans($messageTemplate, $messageParameters); - } else { - $message = strtr($messageTemplate, $messageParameters); - } - - $form->addError(new FormError($message, $messageTemplate, $messageParameters, null, $form->getTransformationFailure())); - } -} diff --git a/lib/symfony/form/Extension/Core/EventListener/TrimListener.php b/lib/symfony/form/Extension/Core/EventListener/TrimListener.php deleted file mode 100644 index be8c38a85..000000000 --- a/lib/symfony/form/Extension/Core/EventListener/TrimListener.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\Util\StringUtil; - -/** - * Trims string data. - * - * @author Bernhard Schussek - */ -class TrimListener implements EventSubscriberInterface -{ - public function preSubmit(FormEvent $event) - { - $data = $event->getData(); - - if (!\is_string($data)) { - return; - } - - $event->setData(StringUtil::trim($data)); - } - - public static function getSubscribedEvents() - { - return [FormEvents::PRE_SUBMIT => 'preSubmit']; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/BaseType.php b/lib/symfony/form/Extension/Core/Type/BaseType.php deleted file mode 100644 index 55efb652d..000000000 --- a/lib/symfony/form/Extension/Core/Type/BaseType.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractRendererEngine; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * Encapsulates common logic of {@link FormType} and {@link ButtonType}. - * - * This type does not appear in the form's type inheritance chain and as such - * cannot be extended (via {@link \Symfony\Component\Form\FormExtensionInterface}) nor themed. - * - * @author Bernhard Schussek - */ -abstract class BaseType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->setDisabled($options['disabled']); - $builder->setAutoInitialize($options['auto_initialize']); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $name = $form->getName(); - $blockName = $options['block_name'] ?: $form->getName(); - $translationDomain = $options['translation_domain']; - $labelTranslationParameters = $options['label_translation_parameters']; - $attrTranslationParameters = $options['attr_translation_parameters']; - $labelFormat = $options['label_format']; - - if ($view->parent) { - if ('' !== ($parentFullName = $view->parent->vars['full_name'])) { - $id = sprintf('%s_%s', $view->parent->vars['id'], $name); - $fullName = sprintf('%s[%s]', $parentFullName, $name); - $uniqueBlockPrefix = sprintf('%s_%s', $view->parent->vars['unique_block_prefix'], $blockName); - } else { - $id = $name; - $fullName = $name; - $uniqueBlockPrefix = '_'.$blockName; - } - - if (null === $translationDomain) { - $translationDomain = $view->parent->vars['translation_domain']; - } - - $labelTranslationParameters = array_merge($view->parent->vars['label_translation_parameters'], $labelTranslationParameters); - $attrTranslationParameters = array_merge($view->parent->vars['attr_translation_parameters'], $attrTranslationParameters); - - if (!$labelFormat) { - $labelFormat = $view->parent->vars['label_format']; - } - - $rootFormAttrOption = $form->getRoot()->getConfig()->getOption('form_attr'); - if ($options['form_attr'] || $rootFormAttrOption) { - $options['attr']['form'] = \is_string($rootFormAttrOption) ? $rootFormAttrOption : $form->getRoot()->getName(); - if (empty($options['attr']['form'])) { - throw new LogicException('"form_attr" option must be a string identifier on root form when it has no id.'); - } - } - } else { - $id = \is_string($options['form_attr']) ? $options['form_attr'] : $name; - $fullName = $name; - $uniqueBlockPrefix = '_'.$blockName; - - // Strip leading underscores and digits. These are allowed in - // form names, but not in HTML4 ID attributes. - // https://www.w3.org/TR/html401/struct/global#adef-id - $id = ltrim($id, '_0123456789'); - } - - $blockPrefixes = []; - for ($type = $form->getConfig()->getType(); null !== $type; $type = $type->getParent()) { - array_unshift($blockPrefixes, $type->getBlockPrefix()); - } - if (null !== $options['block_prefix']) { - $blockPrefixes[] = $options['block_prefix']; - } - $blockPrefixes[] = $uniqueBlockPrefix; - - $view->vars = array_replace($view->vars, [ - 'form' => $view, - 'id' => $id, - 'name' => $name, - 'full_name' => $fullName, - 'disabled' => $form->isDisabled(), - 'label' => $options['label'], - 'label_format' => $labelFormat, - 'label_html' => $options['label_html'], - 'multipart' => false, - 'attr' => $options['attr'], - 'block_prefixes' => $blockPrefixes, - 'unique_block_prefix' => $uniqueBlockPrefix, - 'row_attr' => $options['row_attr'], - 'translation_domain' => $translationDomain, - 'label_translation_parameters' => $labelTranslationParameters, - 'attr_translation_parameters' => $attrTranslationParameters, - 'priority' => $options['priority'], - // Using the block name here speeds up performance in collection - // forms, where each entry has the same full block name. - // Including the type is important too, because if rows of a - // collection form have different types (dynamically), they should - // be rendered differently. - // https://github.com/symfony/symfony/issues/5038 - AbstractRendererEngine::CACHE_KEY_VAR => $uniqueBlockPrefix.'_'.$form->getConfig()->getType()->getBlockPrefix(), - ]); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'block_name' => null, - 'block_prefix' => null, - 'disabled' => false, - 'label' => null, - 'label_format' => null, - 'row_attr' => [], - 'label_html' => false, - 'label_translation_parameters' => [], - 'attr_translation_parameters' => [], - 'attr' => [], - 'translation_domain' => null, - 'auto_initialize' => true, - 'priority' => 0, - 'form_attr' => false, - ]); - - $resolver->setAllowedTypes('block_prefix', ['null', 'string']); - $resolver->setAllowedTypes('attr', 'array'); - $resolver->setAllowedTypes('row_attr', 'array'); - $resolver->setAllowedTypes('label_html', 'bool'); - $resolver->setAllowedTypes('priority', 'int'); - $resolver->setAllowedTypes('form_attr', ['bool', 'string']); - - $resolver->setInfo('priority', 'The form rendering priority (higher priorities will be rendered first)'); - } -} diff --git a/lib/symfony/form/Extension/Core/Type/BirthdayType.php b/lib/symfony/form/Extension/Core/Type/BirthdayType.php deleted file mode 100644 index 50d8b1e21..000000000 --- a/lib/symfony/form/Extension/Core/Type/BirthdayType.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class BirthdayType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'years' => range((int) date('Y') - 120, date('Y')), - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid birthdate.'; - }, - ]); - - $resolver->setAllowedTypes('years', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return DateType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'birthday'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/ButtonType.php b/lib/symfony/form/Extension/Core/Type/ButtonType.php deleted file mode 100644 index ba2f8dfe0..000000000 --- a/lib/symfony/form/Extension/Core/Type/ButtonType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\ButtonTypeInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A form button. - * - * @author Bernhard Schussek - */ -class ButtonType extends BaseType implements ButtonTypeInterface -{ - /** - * {@inheritdoc} - */ - public function getParent() - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'button'; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - parent::configureOptions($resolver); - - $resolver->setDefault('auto_initialize', false); - } -} diff --git a/lib/symfony/form/Extension/Core/Type/CheckboxType.php b/lib/symfony/form/Extension/Core/Type/CheckboxType.php deleted file mode 100644 index 6de35b9d4..000000000 --- a/lib/symfony/form/Extension/Core/Type/CheckboxType.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CheckboxType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Unlike in other types, where the data is NULL by default, it - // needs to be a Boolean here. setData(null) is not acceptable - // for checkboxes and radio buttons (unless a custom model - // transformer handles this case). - // We cannot solve this case via overriding the "data" option, because - // doing so also calls setDataLocked(true). - $builder->setData($options['data'] ?? false); - $builder->addViewTransformer(new BooleanToStringTransformer($options['value'], $options['false_values'])); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars = array_replace($view->vars, [ - 'value' => $options['value'], - 'checked' => null !== $form->getViewData(), - ]); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $emptyData = function (FormInterface $form, $viewData) { - return $viewData; - }; - - $resolver->setDefaults([ - 'value' => '1', - 'empty_data' => $emptyData, - 'compound' => false, - 'false_values' => [null], - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The checkbox has an invalid value.'; - }, - 'is_empty_callback' => static function ($modelData): bool { - return false === $modelData; - }, - ]); - - $resolver->setAllowedTypes('false_values', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'checkbox'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/ChoiceType.php b/lib/symfony/form/Extension/Core/Type/ChoiceType.php deleted file mode 100644 index 3881d1fb8..000000000 --- a/lib/symfony/form/Extension/Core/Type/ChoiceType.php +++ /dev/null @@ -1,501 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceAttr; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFieldName; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFilter; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLabel; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLoader; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceTranslationParameters; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceValue; -use Symfony\Component\Form\ChoiceList\Factory\Cache\GroupBy; -use Symfony\Component\Form\ChoiceList\Factory\Cache\PreferredChoice; -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface; -use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; -use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Component\Form\ChoiceList\View\ChoiceView; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper; -use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper; -use Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\ChoiceToValueTransformer; -use Symfony\Component\Form\Extension\Core\EventListener\MergeCollectionListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Contracts\Translation\TranslatorInterface; - -class ChoiceType extends AbstractType -{ - private $choiceListFactory; - private $translator; - - /** - * @param TranslatorInterface $translator - */ - public function __construct(ChoiceListFactoryInterface $choiceListFactory = null, $translator = null) - { - $this->choiceListFactory = $choiceListFactory ?? new CachingFactoryDecorator( - new PropertyAccessDecorator( - new DefaultChoiceListFactory() - ) - ); - - if (null !== $translator && !$translator instanceof TranslatorInterface) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be han instance of "%s", "%s" given.', __METHOD__, TranslatorInterface::class, \is_object($translator) ? \get_class($translator) : \gettype($translator))); - } - $this->translator = $translator; - - // BC, to be removed in 6.0 - if ($this->choiceListFactory instanceof CachingFactoryDecorator) { - return; - } - - $ref = new \ReflectionMethod($this->choiceListFactory, 'createListFromChoices'); - - if ($ref->getNumberOfParameters() < 3) { - trigger_deprecation('symfony/form', '5.1', 'Not defining a third parameter "callable|null $filter" in "%s::%s()" is deprecated.', $ref->class, $ref->name); - } - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $unknownValues = []; - $choiceList = $this->createChoiceList($options); - $builder->setAttribute('choice_list', $choiceList); - - if ($options['expanded']) { - $builder->setDataMapper($options['multiple'] ? new CheckboxListMapper() : new RadioListMapper()); - - // Initialize all choices before doing the index check below. - // This helps in cases where index checks are optimized for non - // initialized choice lists. For example, when using an SQL driver, - // the index check would read in one SQL query and the initialization - // requires another SQL query. When the initialization is done first, - // one SQL query is sufficient. - - $choiceListView = $this->createChoiceListView($choiceList, $options); - $builder->setAttribute('choice_list_view', $choiceListView); - - // Check if the choices already contain the empty value - // Only add the placeholder option if this is not the case - if (null !== $options['placeholder'] && 0 === \count($choiceList->getChoicesForValues(['']))) { - $placeholderView = new ChoiceView(null, '', $options['placeholder']); - - // "placeholder" is a reserved name - $this->addSubForm($builder, 'placeholder', $placeholderView, $options); - } - - $this->addSubForms($builder, $choiceListView->preferredChoices, $options); - $this->addSubForms($builder, $choiceListView->choices, $options); - } - - if ($options['expanded'] || $options['multiple']) { - // Make sure that scalar, submitted values are converted to arrays - // which can be submitted to the checkboxes/radio buttons - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($choiceList, $options, &$unknownValues) { - $form = $event->getForm(); - $data = $event->getData(); - - // Since the type always use mapper an empty array will not be - // considered as empty in Form::submit(), we need to evaluate - // empty data here so its value is submitted to sub forms - if (null === $data) { - $emptyData = $form->getConfig()->getEmptyData(); - $data = $emptyData instanceof \Closure ? $emptyData($form, $data) : $emptyData; - } - - // Convert the submitted data to a string, if scalar, before - // casting it to an array - if (!\is_array($data)) { - if ($options['multiple']) { - throw new TransformationFailedException('Expected an array.'); - } - - $data = (array) (string) $data; - } - - // A map from submitted values to integers - $valueMap = array_flip($data); - - // Make a copy of the value map to determine whether any unknown - // values were submitted - $unknownValues = $valueMap; - - // Reconstruct the data as mapping from child names to values - $knownValues = []; - - if ($options['expanded']) { - /** @var FormInterface $child */ - foreach ($form as $child) { - $value = $child->getConfig()->getOption('value'); - - // Add the value to $data with the child's name as key - if (isset($valueMap[$value])) { - $knownValues[$child->getName()] = $value; - unset($unknownValues[$value]); - continue; - } else { - $knownValues[$child->getName()] = null; - } - } - } else { - foreach ($data as $value) { - if ($choiceList->getChoicesForValues([$value])) { - $knownValues[] = $value; - unset($unknownValues[$value]); - } - } - } - - // The empty value is always known, independent of whether a - // field exists for it or not - unset($unknownValues['']); - - // Throw exception if unknown values were submitted (multiple choices will be handled in a different event listener below) - if (\count($unknownValues) > 0 && !$options['multiple']) { - throw new TransformationFailedException(sprintf('The choices "%s" do not exist in the choice list.', implode('", "', array_keys($unknownValues)))); - } - - $event->setData($knownValues); - }); - } - - if ($options['multiple']) { - $messageTemplate = $options['invalid_message'] ?? 'The value {{ value }} is not valid.'; - - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use (&$unknownValues, $messageTemplate) { - // Throw exception if unknown values were submitted - if (\count($unknownValues) > 0) { - $form = $event->getForm(); - - $clientDataAsString = \is_scalar($form->getViewData()) ? (string) $form->getViewData() : (\is_array($form->getViewData()) ? implode('", "', array_keys($unknownValues)) : \gettype($form->getViewData())); - - if (null !== $this->translator) { - $message = $this->translator->trans($messageTemplate, ['{{ value }}' => $clientDataAsString], 'validators'); - } else { - $message = strtr($messageTemplate, ['{{ value }}' => $clientDataAsString]); - } - - $form->addError(new FormError($message, $messageTemplate, ['{{ value }}' => $clientDataAsString], null, new TransformationFailedException(sprintf('The choices "%s" do not exist in the choice list.', $clientDataAsString)))); - } - }); - - // tag without "multiple" option or list of radio inputs - $builder->addViewTransformer(new ChoiceToValueTransformer($choiceList)); - } - - if ($options['multiple'] && $options['by_reference']) { - // Make sure the collection created during the client->norm - // transformation is merged back into the original collection - $builder->addEventSubscriber(new MergeCollectionListener(true, true)); - } - - // To avoid issues when the submitted choices are arrays (i.e. array to string conversions), - // we have to ensure that all elements of the submitted choice data are NULL, strings or ints. - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { - $data = $event->getData(); - - if (!\is_array($data)) { - return; - } - - foreach ($data as $v) { - if (null !== $v && !\is_string($v) && !\is_int($v)) { - throw new TransformationFailedException('All choices submitted must be NULL, strings or ints.'); - } - } - }, 256); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $choiceTranslationDomain = $options['choice_translation_domain']; - if ($view->parent && null === $choiceTranslationDomain) { - $choiceTranslationDomain = $view->vars['translation_domain']; - } - - /** @var ChoiceListInterface $choiceList */ - $choiceList = $form->getConfig()->getAttribute('choice_list'); - - /** @var ChoiceListView $choiceListView */ - $choiceListView = $form->getConfig()->hasAttribute('choice_list_view') - ? $form->getConfig()->getAttribute('choice_list_view') - : $this->createChoiceListView($choiceList, $options); - - $view->vars = array_replace($view->vars, [ - 'multiple' => $options['multiple'], - 'expanded' => $options['expanded'], - 'preferred_choices' => $choiceListView->preferredChoices, - 'choices' => $choiceListView->choices, - 'separator' => '-------------------', - 'placeholder' => null, - 'choice_translation_domain' => $choiceTranslationDomain, - 'choice_translation_parameters' => $options['choice_translation_parameters'], - ]); - - // The decision, whether a choice is selected, is potentially done - // thousand of times during the rendering of a template. Provide a - // closure here that is optimized for the value of the form, to - // avoid making the type check inside the closure. - if ($options['multiple']) { - $view->vars['is_selected'] = function ($choice, array $values) { - return \in_array($choice, $values, true); - }; - } else { - $view->vars['is_selected'] = function ($choice, $value) { - return $choice === $value; - }; - } - - // Check if the choices already contain the empty value - $view->vars['placeholder_in_choices'] = $choiceListView->hasPlaceholder(); - - // Only add the empty value option if this is not the case - if (null !== $options['placeholder'] && !$view->vars['placeholder_in_choices']) { - $view->vars['placeholder'] = $options['placeholder']; - } - - if ($options['multiple'] && !$options['expanded']) { - // Add "[]" to the name in case a select tag with multiple options is - // displayed. Otherwise only one of the selected options is sent in the - // POST request. - $view->vars['full_name'] .= '[]'; - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - if ($options['expanded']) { - // Radio buttons should have the same name as the parent - $childName = $view->vars['full_name']; - - // Checkboxes should append "[]" to allow multiple selection - if ($options['multiple']) { - $childName .= '[]'; - } - - foreach ($view as $childView) { - $childView->vars['full_name'] = $childName; - } - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $emptyData = function (Options $options) { - if ($options['expanded'] && !$options['multiple']) { - return null; - } - - if ($options['multiple']) { - return []; - } - - return ''; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) { - if ($options['multiple']) { - // never use an empty value for this case - return null; - } elseif ($options['required'] && ($options['expanded'] || isset($options['attr']['size']) && $options['attr']['size'] > 1)) { - // placeholder for required radio buttons or a select with size > 1 does not make sense - return null; - } elseif (false === $placeholder) { - // an empty value should be added but the user decided otherwise - return null; - } elseif ($options['expanded'] && '' === $placeholder) { - // never use an empty label for radio buttons - return 'None'; - } - - // empty value has been set explicitly - return $placeholder; - }; - - $compound = function (Options $options) { - return $options['expanded']; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (true === $choiceTranslationDomain) { - return $options['translation_domain']; - } - - return $choiceTranslationDomain; - }; - - $resolver->setDefaults([ - 'multiple' => false, - 'expanded' => false, - 'choices' => [], - 'choice_filter' => null, - 'choice_loader' => null, - 'choice_label' => null, - 'choice_name' => null, - 'choice_value' => null, - 'choice_attr' => null, - 'choice_translation_parameters' => [], - 'preferred_choices' => [], - 'group_by' => null, - 'empty_data' => $emptyData, - 'placeholder' => $placeholderDefault, - 'error_bubbling' => false, - 'compound' => $compound, - // The view data is always a string or an array of strings, - // even if the "data" option is manually set to an object. - // See https://github.com/symfony/symfony/pull/5582 - 'data_class' => null, - 'choice_translation_domain' => true, - 'trim' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The selected choice is invalid.'; - }, - ]); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - - $resolver->setAllowedTypes('choices', ['null', 'array', \Traversable::class]); - $resolver->setAllowedTypes('choice_translation_domain', ['null', 'bool', 'string']); - $resolver->setAllowedTypes('choice_loader', ['null', ChoiceLoaderInterface::class, ChoiceLoader::class]); - $resolver->setAllowedTypes('choice_filter', ['null', 'callable', 'string', PropertyPath::class, ChoiceFilter::class]); - $resolver->setAllowedTypes('choice_label', ['null', 'bool', 'callable', 'string', PropertyPath::class, ChoiceLabel::class]); - $resolver->setAllowedTypes('choice_name', ['null', 'callable', 'string', PropertyPath::class, ChoiceFieldName::class]); - $resolver->setAllowedTypes('choice_value', ['null', 'callable', 'string', PropertyPath::class, ChoiceValue::class]); - $resolver->setAllowedTypes('choice_attr', ['null', 'array', 'callable', 'string', PropertyPath::class, ChoiceAttr::class]); - $resolver->setAllowedTypes('choice_translation_parameters', ['null', 'array', 'callable', ChoiceTranslationParameters::class]); - $resolver->setAllowedTypes('preferred_choices', ['array', \Traversable::class, 'callable', 'string', PropertyPath::class, PreferredChoice::class]); - $resolver->setAllowedTypes('group_by', ['null', 'callable', 'string', PropertyPath::class, GroupBy::class]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'choice'; - } - - /** - * Adds the sub fields for an expanded choice field. - */ - private function addSubForms(FormBuilderInterface $builder, array $choiceViews, array $options) - { - foreach ($choiceViews as $name => $choiceView) { - // Flatten groups - if (\is_array($choiceView)) { - $this->addSubForms($builder, $choiceView, $options); - continue; - } - - if ($choiceView instanceof ChoiceGroupView) { - $this->addSubForms($builder, $choiceView->choices, $options); - continue; - } - - $this->addSubForm($builder, $name, $choiceView, $options); - } - } - - private function addSubForm(FormBuilderInterface $builder, string $name, ChoiceView $choiceView, array $options) - { - $choiceOpts = [ - 'value' => $choiceView->value, - 'label' => $choiceView->label, - 'label_html' => $options['label_html'], - 'attr' => $choiceView->attr, - 'label_translation_parameters' => $choiceView->labelTranslationParameters, - 'translation_domain' => $options['choice_translation_domain'], - 'block_name' => 'entry', - ]; - - if ($options['multiple']) { - $choiceType = CheckboxType::class; - // The user can check 0 or more checkboxes. If required - // is true, they are required to check all of them. - $choiceOpts['required'] = false; - } else { - $choiceType = RadioType::class; - } - - $builder->add($name, $choiceType, $choiceOpts); - } - - private function createChoiceList(array $options) - { - if (null !== $options['choice_loader']) { - return $this->choiceListFactory->createListFromLoader( - $options['choice_loader'], - $options['choice_value'], - $options['choice_filter'] - ); - } - - // Harden against NULL values (like in EntityType and ModelType) - $choices = null !== $options['choices'] ? $options['choices'] : []; - - return $this->choiceListFactory->createListFromChoices( - $choices, - $options['choice_value'], - $options['choice_filter'] - ); - } - - private function createChoiceListView(ChoiceListInterface $choiceList, array $options) - { - return $this->choiceListFactory->createView( - $choiceList, - $options['preferred_choices'], - $options['choice_label'], - $options['choice_name'], - $options['group_by'], - $options['choice_attr'], - $options['choice_translation_parameters'] - ); - } -} diff --git a/lib/symfony/form/Extension/Core/Type/CollectionType.php b/lib/symfony/form/Extension/Core/Type/CollectionType.php deleted file mode 100644 index 5cabf1665..000000000 --- a/lib/symfony/form/Extension/Core/Type/CollectionType.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CollectionType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if ($options['allow_add'] && $options['prototype']) { - $prototypeOptions = array_replace([ - 'required' => $options['required'], - 'label' => $options['prototype_name'].'label__', - ], $options['entry_options']); - - if (null !== $options['prototype_data']) { - $prototypeOptions['data'] = $options['prototype_data']; - } - - $prototype = $builder->create($options['prototype_name'], $options['entry_type'], $prototypeOptions); - $builder->setAttribute('prototype', $prototype->getForm()); - } - - $resizeListener = new ResizeFormListener( - $options['entry_type'], - $options['entry_options'], - $options['allow_add'], - $options['allow_delete'], - $options['delete_empty'] - ); - - $builder->addEventSubscriber($resizeListener); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars = array_replace($view->vars, [ - 'allow_add' => $options['allow_add'], - 'allow_delete' => $options['allow_delete'], - ]); - - if ($form->getConfig()->hasAttribute('prototype')) { - $prototype = $form->getConfig()->getAttribute('prototype'); - $view->vars['prototype'] = $prototype->setParent($form)->createView($view); - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $prefixOffset = -2; - // check if the entry type also defines a block prefix - /** @var FormInterface $entry */ - foreach ($form as $entry) { - if ($entry->getConfig()->getOption('block_prefix')) { - --$prefixOffset; - } - - break; - } - - foreach ($view as $entryView) { - array_splice($entryView->vars['block_prefixes'], $prefixOffset, 0, 'collection_entry'); - } - - /** @var FormInterface $prototype */ - if ($prototype = $form->getConfig()->getAttribute('prototype')) { - if ($view->vars['prototype']->vars['multipart']) { - $view->vars['multipart'] = true; - } - - if ($prefixOffset > -3 && $prototype->getConfig()->getOption('block_prefix')) { - --$prefixOffset; - } - - array_splice($view->vars['prototype']->vars['block_prefixes'], $prefixOffset, 0, 'collection_entry'); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $entryOptionsNormalizer = function (Options $options, $value) { - $value['block_name'] = 'entry'; - - return $value; - }; - - $resolver->setDefaults([ - 'allow_add' => false, - 'allow_delete' => false, - 'prototype' => true, - 'prototype_data' => null, - 'prototype_name' => '__name__', - 'entry_type' => TextType::class, - 'entry_options' => [], - 'delete_empty' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The collection is invalid.'; - }, - ]); - - $resolver->setNormalizer('entry_options', $entryOptionsNormalizer); - $resolver->setAllowedTypes('delete_empty', ['bool', 'callable']); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'collection'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/ColorType.php b/lib/symfony/form/Extension/Core/Type/ColorType.php deleted file mode 100644 index 4609a1aff..000000000 --- a/lib/symfony/form/Extension/Core/Type/ColorType.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Contracts\Translation\TranslatorInterface; - -class ColorType extends AbstractType -{ - /** - * @see https://www.w3.org/TR/html52/sec-forms.html#color-state-typecolor - */ - private const HTML5_PATTERN = '/^#[0-9a-f]{6}$/i'; - - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!$options['html5']) { - return; - } - - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event): void { - $value = $event->getData(); - if (null === $value || '' === $value) { - return; - } - - if (\is_string($value) && preg_match(self::HTML5_PATTERN, $value)) { - return; - } - - $messageTemplate = 'This value is not a valid HTML5 color.'; - $messageParameters = [ - '{{ value }}' => \is_scalar($value) ? (string) $value : \gettype($value), - ]; - $message = $this->translator ? $this->translator->trans($messageTemplate, $messageParameters, 'validators') : $messageTemplate; - - $event->getForm()->addError(new FormError($message, $messageTemplate, $messageParameters)); - }); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid color.'; - }, - ]); - - $resolver->setAllowedTypes('html5', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'color'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/CountryType.php b/lib/symfony/form/Extension/Core/Type/CountryType.php deleted file mode 100644 index 85293bc28..000000000 --- a/lib/symfony/form/Extension/Core/Type/CountryType.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Countries; -use Symfony\Component\Intl\Intl; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CountryType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - $alpha3 = $options['alpha3']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale, $alpha3) { - return array_flip($alpha3 ? Countries::getAlpha3Names($choiceTranslationLocale) : Countries::getNames($choiceTranslationLocale)); - }), [$choiceTranslationLocale, $alpha3]); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'alpha3' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid country.'; - }, - ]); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - $resolver->setAllowedTypes('alpha3', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'country'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/CurrencyType.php b/lib/symfony/form/Extension/Core/Type/CurrencyType.php deleted file mode 100644 index 427b493f7..000000000 --- a/lib/symfony/form/Extension/Core/Type/CurrencyType.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Currencies; -use Symfony\Component\Intl\Intl; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CurrencyType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale) { - return array_flip(Currencies::getNames($choiceTranslationLocale)); - }), $choiceTranslationLocale); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid currency.'; - }, - ]); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'currency'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/DateIntervalType.php b/lib/symfony/form/Extension/Core/Type/DateIntervalType.php deleted file mode 100644 index 4c05557fa..000000000 --- a/lib/symfony/form/Extension/Core/Type/DateIntervalType.php +++ /dev/null @@ -1,291 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\InvalidConfigurationException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateIntervalToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateIntervalToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Steffen Roßkamp - */ -class DateIntervalType extends AbstractType -{ - private const TIME_PARTS = [ - 'years', - 'months', - 'weeks', - 'days', - 'hours', - 'minutes', - 'seconds', - ]; - private const WIDGETS = [ - 'text' => TextType::class, - 'integer' => IntegerType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!$options['with_years'] && !$options['with_months'] && !$options['with_weeks'] && !$options['with_days'] && !$options['with_hours'] && !$options['with_minutes'] && !$options['with_seconds']) { - throw new InvalidConfigurationException('You must enable at least one interval field.'); - } - if ($options['with_invert'] && 'single_text' === $options['widget']) { - throw new InvalidConfigurationException('The single_text widget does not support invertible intervals.'); - } - if ($options['with_weeks'] && $options['with_days']) { - throw new InvalidConfigurationException('You cannot enable weeks and days fields together.'); - } - $format = 'P'; - $parts = []; - if ($options['with_years']) { - $format .= '%yY'; - $parts[] = 'years'; - } - if ($options['with_months']) { - $format .= '%mM'; - $parts[] = 'months'; - } - if ($options['with_weeks']) { - $format .= '%wW'; - $parts[] = 'weeks'; - } - if ($options['with_days']) { - $format .= '%dD'; - $parts[] = 'days'; - } - if ($options['with_hours'] || $options['with_minutes'] || $options['with_seconds']) { - $format .= 'T'; - } - if ($options['with_hours']) { - $format .= '%hH'; - $parts[] = 'hours'; - } - if ($options['with_minutes']) { - $format .= '%iM'; - $parts[] = 'minutes'; - } - if ($options['with_seconds']) { - $format .= '%sS'; - $parts[] = 'seconds'; - } - if ($options['with_invert']) { - $parts[] = 'invert'; - } - if ('single_text' === $options['widget']) { - $builder->addViewTransformer(new DateIntervalToStringTransformer($format)); - } else { - foreach (self::TIME_PARTS as $part) { - if ($options['with_'.$part]) { - $childOptions = [ - 'error_bubbling' => true, - 'label' => $options['labels'][$part], - // Append generic carry-along options - 'required' => $options['required'], - 'translation_domain' => $options['translation_domain'], - // when compound the array entries are ignored, we need to cascade the configuration here - 'empty_data' => $options['empty_data'][$part] ?? null, - ]; - if ('choice' === $options['widget']) { - $childOptions['choice_translation_domain'] = false; - $childOptions['choices'] = $options[$part]; - $childOptions['placeholder'] = $options['placeholder'][$part]; - } - $childForm = $builder->create($part, self::WIDGETS[$options['widget']], $childOptions); - if ('integer' === $options['widget']) { - $childForm->addModelTransformer( - new ReversedTransformer( - new IntegerToLocalizedStringTransformer() - ) - ); - } - $builder->add($childForm); - } - } - if ($options['with_invert']) { - $builder->add('invert', CheckboxType::class, [ - 'label' => $options['labels']['invert'], - 'error_bubbling' => true, - 'required' => false, - 'translation_domain' => $options['translation_domain'], - ]); - } - $builder->addViewTransformer(new DateIntervalToArrayTransformer($parts, 'text' === $options['widget'])); - } - if ('string' === $options['input']) { - $builder->addModelTransformer( - new ReversedTransformer( - new DateIntervalToStringTransformer($format) - ) - ); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer( - new ReversedTransformer( - new DateIntervalToArrayTransformer($parts) - ) - ); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $vars = [ - 'widget' => $options['widget'], - 'with_invert' => $options['with_invert'], - ]; - foreach (self::TIME_PARTS as $part) { - $vars['with_'.$part] = $options['with_'.$part]; - } - $view->vars = array_replace($view->vars, $vars); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - $emptyData = function (Options $options) { - return 'single_text' === $options['widget'] ? '' : []; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge(array_fill_keys(self::TIME_PARTS, $default), $placeholder); - } - - return array_fill_keys(self::TIME_PARTS, $placeholder); - }; - - $labelsNormalizer = function (Options $options, array $labels) { - return array_replace([ - 'years' => null, - 'months' => null, - 'days' => null, - 'weeks' => null, - 'hours' => null, - 'minutes' => null, - 'seconds' => null, - 'invert' => 'Negative interval', - ], array_filter($labels, function ($label) { - return null !== $label; - })); - }; - - $resolver->setDefaults([ - 'with_years' => true, - 'with_months' => true, - 'with_days' => true, - 'with_weeks' => false, - 'with_hours' => false, - 'with_minutes' => false, - 'with_seconds' => false, - 'with_invert' => false, - 'years' => range(0, 100), - 'months' => range(0, 12), - 'weeks' => range(0, 52), - 'days' => range(0, 31), - 'hours' => range(0, 24), - 'minutes' => range(0, 60), - 'seconds' => range(0, 60), - 'widget' => 'choice', - 'input' => 'dateinterval', - 'placeholder' => $placeholderDefault, - 'by_reference' => true, - 'error_bubbling' => false, - // If initialized with a \DateInterval object, FormType initializes - // this option to "\DateInterval". Since the internal, normalized - // representation is not \DateInterval, but an array, we need to unset - // this option. - 'data_class' => null, - 'compound' => $compound, - 'empty_data' => $emptyData, - 'labels' => [], - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please choose a valid date interval.'; - }, - ]); - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('labels', $labelsNormalizer); - - $resolver->setAllowedValues( - 'input', - [ - 'dateinterval', - 'string', - 'array', - ] - ); - $resolver->setAllowedValues( - 'widget', - [ - 'single_text', - 'text', - 'integer', - 'choice', - ] - ); - // Don't clone \DateInterval classes, as i.e. format() - // does not work after that - $resolver->setAllowedValues('by_reference', true); - - $resolver->setAllowedTypes('years', 'array'); - $resolver->setAllowedTypes('months', 'array'); - $resolver->setAllowedTypes('weeks', 'array'); - $resolver->setAllowedTypes('days', 'array'); - $resolver->setAllowedTypes('hours', 'array'); - $resolver->setAllowedTypes('minutes', 'array'); - $resolver->setAllowedTypes('seconds', 'array'); - $resolver->setAllowedTypes('with_years', 'bool'); - $resolver->setAllowedTypes('with_months', 'bool'); - $resolver->setAllowedTypes('with_weeks', 'bool'); - $resolver->setAllowedTypes('with_days', 'bool'); - $resolver->setAllowedTypes('with_hours', 'bool'); - $resolver->setAllowedTypes('with_minutes', 'bool'); - $resolver->setAllowedTypes('with_seconds', 'bool'); - $resolver->setAllowedTypes('with_invert', 'bool'); - $resolver->setAllowedTypes('labels', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'dateinterval'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/DateTimeType.php b/lib/symfony/form/Extension/Core/Type/DateTimeType.php deleted file mode 100644 index 2f397f8ed..000000000 --- a/lib/symfony/form/Extension/Core/Type/DateTimeType.php +++ /dev/null @@ -1,362 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToPartsTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DataTransformerChain; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5LocalDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class DateTimeType extends AbstractType -{ - public const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM; - public const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM; - - /** - * The HTML5 datetime-local format as defined in - * http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local. - */ - public const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; - - private const ACCEPTED_FORMATS = [ - \IntlDateFormatter::FULL, - \IntlDateFormatter::LONG, - \IntlDateFormatter::MEDIUM, - \IntlDateFormatter::SHORT, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $parts = ['year', 'month', 'day', 'hour']; - $dateParts = ['year', 'month', 'day']; - $timeParts = ['hour']; - - if ($options['with_minutes']) { - $parts[] = 'minute'; - $timeParts[] = 'minute'; - } - - if ($options['with_seconds']) { - $parts[] = 'second'; - $timeParts[] = 'second'; - } - - $dateFormat = \is_int($options['date_format']) ? $options['date_format'] : self::DEFAULT_DATE_FORMAT; - $timeFormat = self::DEFAULT_TIME_FORMAT; - $calendar = \IntlDateFormatter::GREGORIAN; - $pattern = \is_string($options['format']) ? $options['format'] : null; - - if (!\in_array($dateFormat, self::ACCEPTED_FORMATS, true)) { - throw new InvalidOptionsException('The "date_format" option must be one of the IntlDateFormatter constants (FULL, LONG, MEDIUM, SHORT) or a string representing a custom format.'); - } - - if ('single_text' === $options['widget']) { - if (self::HTML5_FORMAT === $pattern) { - $builder->addViewTransformer(new DateTimeToHtml5LocalDateTimeTransformer( - $options['model_timezone'], - $options['view_timezone'] - )); - } else { - $builder->addViewTransformer(new DateTimeToLocalizedStringTransformer( - $options['model_timezone'], - $options['view_timezone'], - $dateFormat, - $timeFormat, - $calendar, - $pattern - )); - } - } else { - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - // Only pass a subset of the options to children - $dateOptions = array_intersect_key($options, array_flip([ - 'years', - 'months', - 'days', - 'placeholder', - 'choice_translation_domain', - 'required', - 'translation_domain', - 'html5', - 'invalid_message', - 'invalid_message_parameters', - ])); - - if ($emptyData instanceof \Closure) { - $lazyEmptyData = static function ($option) use ($emptyData) { - return static function (FormInterface $form) use ($emptyData, $option) { - $emptyData = $emptyData($form->getParent()); - - return $emptyData[$option] ?? ''; - }; - }; - - $dateOptions['empty_data'] = $lazyEmptyData('date'); - } elseif (isset($emptyData['date'])) { - $dateOptions['empty_data'] = $emptyData['date']; - } - - $timeOptions = array_intersect_key($options, array_flip([ - 'hours', - 'minutes', - 'seconds', - 'with_minutes', - 'with_seconds', - 'placeholder', - 'choice_translation_domain', - 'required', - 'translation_domain', - 'html5', - 'invalid_message', - 'invalid_message_parameters', - ])); - - if ($emptyData instanceof \Closure) { - $timeOptions['empty_data'] = $lazyEmptyData('time'); - } elseif (isset($emptyData['time'])) { - $timeOptions['empty_data'] = $emptyData['time']; - } - - if (false === $options['label']) { - $dateOptions['label'] = false; - $timeOptions['label'] = false; - } - - if (null !== $options['date_widget']) { - $dateOptions['widget'] = $options['date_widget']; - } - - if (null !== $options['date_label']) { - $dateOptions['label'] = $options['date_label']; - } - - if (null !== $options['time_widget']) { - $timeOptions['widget'] = $options['time_widget']; - } - - if (null !== $options['time_label']) { - $timeOptions['label'] = $options['time_label']; - } - - if (null !== $options['date_format']) { - $dateOptions['format'] = $options['date_format']; - } - - $dateOptions['input'] = $timeOptions['input'] = 'array'; - $dateOptions['error_bubbling'] = $timeOptions['error_bubbling'] = true; - - $builder - ->addViewTransformer(new DataTransformerChain([ - new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts), - new ArrayToPartsTransformer([ - 'date' => $dateParts, - 'time' => $timeParts, - ]), - ])) - ->add('date', DateType::class, $dateOptions) - ->add('time', TimeType::class, $timeOptions) - ; - } - - if ('datetime_immutable' === $options['input']) { - $builder->addModelTransformer(new DateTimeImmutableToDateTimeTransformer()); - } elseif ('string' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToStringTransformer($options['model_timezone'], $options['model_timezone'], $options['input_format']) - )); - } elseif ('timestamp' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToTimestampTransformer($options['model_timezone'], $options['model_timezone']) - )); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], $parts) - )); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['widget'] = $options['widget']; - - // Change the input to an HTML5 datetime input if - // * the widget is set to "single_text" - // * the format matches the one expected by HTML5 - // * the html5 is set to true - if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format']) { - $view->vars['type'] = 'datetime-local'; - - // we need to force the browser to display the seconds by - // adding the HTML attribute step if not already defined. - // Otherwise the browser will not display and so not send the seconds - // therefore the value will always be considered as invalid. - if ($options['with_seconds'] && !isset($view->vars['attr']['step'])) { - $view->vars['attr']['step'] = 1; - } - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - // Defaults to the value of "widget" - $dateWidget = function (Options $options) { - return 'single_text' === $options['widget'] ? null : $options['widget']; - }; - - // Defaults to the value of "widget" - $timeWidget = function (Options $options) { - return 'single_text' === $options['widget'] ? null : $options['widget']; - }; - - $resolver->setDefaults([ - 'input' => 'datetime', - 'model_timezone' => null, - 'view_timezone' => null, - 'format' => self::HTML5_FORMAT, - 'date_format' => null, - 'widget' => null, - 'date_widget' => $dateWidget, - 'time_widget' => $timeWidget, - 'with_minutes' => true, - 'with_seconds' => false, - 'html5' => true, - // Don't modify \DateTime classes by reference, we treat - // them like immutable value objects - 'by_reference' => false, - 'error_bubbling' => false, - // If initialized with a \DateTime object, FormType initializes - // this option to "\DateTime". Since the internal, normalized - // representation is not \DateTime, but an array, we need to unset - // this option. - 'data_class' => null, - 'compound' => $compound, - 'date_label' => null, - 'time_label' => null, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'input_format' => 'Y-m-d H:i:s', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid date and time.'; - }, - ]); - - // Don't add some defaults in order to preserve the defaults - // set in DateType and TimeType - $resolver->setDefined([ - 'placeholder', - 'choice_translation_domain', - 'years', - 'months', - 'days', - 'hours', - 'minutes', - 'seconds', - ]); - - $resolver->setAllowedValues('input', [ - 'datetime', - 'datetime_immutable', - 'string', - 'timestamp', - 'array', - ]); - $resolver->setAllowedValues('date_widget', [ - null, // inherit default from DateType - 'single_text', - 'text', - 'choice', - ]); - $resolver->setAllowedValues('time_widget', [ - null, // inherit default from TimeType - 'single_text', - 'text', - 'choice', - ]); - // This option will overwrite "date_widget" and "time_widget" options - $resolver->setAllowedValues('widget', [ - null, // default, don't overwrite options - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('input_format', 'string'); - - $resolver->setNormalizer('date_format', function (Options $options, $dateFormat) { - if (null !== $dateFormat && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format']) { - throw new LogicException(sprintf('Cannot use the "date_format" option of the "%s" with an HTML5 date.', self::class)); - } - - return $dateFormat; - }); - $resolver->setNormalizer('date_widget', function (Options $options, $dateWidget) { - if (null !== $dateWidget && 'single_text' === $options['widget']) { - throw new LogicException(sprintf('Cannot use the "date_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class)); - } - - return $dateWidget; - }); - $resolver->setNormalizer('time_widget', function (Options $options, $timeWidget) { - if (null !== $timeWidget && 'single_text' === $options['widget']) { - throw new LogicException(sprintf('Cannot use the "time_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class)); - } - - return $timeWidget; - }); - $resolver->setNormalizer('html5', function (Options $options, $html5) { - if ($html5 && self::HTML5_FORMAT !== $options['format']) { - throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is enabled.', self::class)); - } - - return $html5; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'datetime'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/DateType.php b/lib/symfony/form/Extension/Core/Type/DateType.php deleted file mode 100644 index 1a46a8084..000000000 --- a/lib/symfony/form/Extension/Core/Type/DateType.php +++ /dev/null @@ -1,405 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class DateType extends AbstractType -{ - public const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM; - public const HTML5_FORMAT = 'yyyy-MM-dd'; - - private const ACCEPTED_FORMATS = [ - \IntlDateFormatter::FULL, - \IntlDateFormatter::LONG, - \IntlDateFormatter::MEDIUM, - \IntlDateFormatter::SHORT, - ]; - - private const WIDGETS = [ - 'text' => TextType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $dateFormat = \is_int($options['format']) ? $options['format'] : self::DEFAULT_FORMAT; - $timeFormat = \IntlDateFormatter::NONE; - $calendar = \IntlDateFormatter::GREGORIAN; - $pattern = \is_string($options['format']) ? $options['format'] : ''; - - if (!\in_array($dateFormat, self::ACCEPTED_FORMATS, true)) { - throw new InvalidOptionsException('The "format" option must be one of the IntlDateFormatter constants (FULL, LONG, MEDIUM, SHORT) or a string representing a custom format.'); - } - - if ('single_text' === $options['widget']) { - if ('' !== $pattern && !str_contains($pattern, 'y') && !str_contains($pattern, 'M') && !str_contains($pattern, 'd')) { - throw new InvalidOptionsException(sprintf('The "format" option should contain the letters "y", "M" or "d". Its current value is "%s".', $pattern)); - } - - $builder->addViewTransformer(new DateTimeToLocalizedStringTransformer( - $options['model_timezone'], - $options['view_timezone'], - $dateFormat, - $timeFormat, - $calendar, - $pattern - )); - } else { - if ('' !== $pattern && (!str_contains($pattern, 'y') || !str_contains($pattern, 'M') || !str_contains($pattern, 'd'))) { - throw new InvalidOptionsException(sprintf('The "format" option should contain the letters "y", "M" and "d". Its current value is "%s".', $pattern)); - } - - $yearOptions = $monthOptions = $dayOptions = [ - 'error_bubbling' => true, - 'empty_data' => '', - ]; - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - - if ($emptyData instanceof \Closure) { - $lazyEmptyData = static function ($option) use ($emptyData) { - return static function (FormInterface $form) use ($emptyData, $option) { - $emptyData = $emptyData($form->getParent()); - - return $emptyData[$option] ?? ''; - }; - }; - - $yearOptions['empty_data'] = $lazyEmptyData('year'); - $monthOptions['empty_data'] = $lazyEmptyData('month'); - $dayOptions['empty_data'] = $lazyEmptyData('day'); - } else { - if (isset($emptyData['year'])) { - $yearOptions['empty_data'] = $emptyData['year']; - } - if (isset($emptyData['month'])) { - $monthOptions['empty_data'] = $emptyData['month']; - } - if (isset($emptyData['day'])) { - $dayOptions['empty_data'] = $emptyData['day']; - } - } - - if (isset($options['invalid_message'])) { - $dayOptions['invalid_message'] = $options['invalid_message']; - $monthOptions['invalid_message'] = $options['invalid_message']; - $yearOptions['invalid_message'] = $options['invalid_message']; - } - - if (isset($options['invalid_message_parameters'])) { - $dayOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $monthOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $yearOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - } - - $formatter = new \IntlDateFormatter( - \Locale::getDefault(), - $dateFormat, - $timeFormat, - // see https://bugs.php.net/66323 - class_exists(\IntlTimeZone::class, false) ? \IntlTimeZone::createDefault() : null, - $calendar, - $pattern - ); - - // new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323 - if (!$formatter) { - throw new InvalidOptionsException(intl_get_error_message(), intl_get_error_code()); - } - - $formatter->setLenient(false); - - if ('choice' === $options['widget']) { - // Only pass a subset of the options to children - $yearOptions['choices'] = $this->formatTimestamps($formatter, '/y+/', $this->listYears($options['years'])); - $yearOptions['placeholder'] = $options['placeholder']['year']; - $yearOptions['choice_translation_domain'] = $options['choice_translation_domain']['year']; - $monthOptions['choices'] = $this->formatTimestamps($formatter, '/[M|L]+/', $this->listMonths($options['months'])); - $monthOptions['placeholder'] = $options['placeholder']['month']; - $monthOptions['choice_translation_domain'] = $options['choice_translation_domain']['month']; - $dayOptions['choices'] = $this->formatTimestamps($formatter, '/d+/', $this->listDays($options['days'])); - $dayOptions['placeholder'] = $options['placeholder']['day']; - $dayOptions['choice_translation_domain'] = $options['choice_translation_domain']['day']; - } - - // Append generic carry-along options - foreach (['required', 'translation_domain'] as $passOpt) { - $yearOptions[$passOpt] = $monthOptions[$passOpt] = $dayOptions[$passOpt] = $options[$passOpt]; - } - - $builder - ->add('year', self::WIDGETS[$options['widget']], $yearOptions) - ->add('month', self::WIDGETS[$options['widget']], $monthOptions) - ->add('day', self::WIDGETS[$options['widget']], $dayOptions) - ->addViewTransformer(new DateTimeToArrayTransformer( - $options['model_timezone'], $options['view_timezone'], ['year', 'month', 'day'] - )) - ->setAttribute('formatter', $formatter) - ; - } - - if ('datetime_immutable' === $options['input']) { - $builder->addModelTransformer(new DateTimeImmutableToDateTimeTransformer()); - } elseif ('string' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToStringTransformer($options['model_timezone'], $options['model_timezone'], $options['input_format']) - )); - } elseif ('timestamp' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToTimestampTransformer($options['model_timezone'], $options['model_timezone']) - )); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], ['year', 'month', 'day']) - )); - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $view->vars['widget'] = $options['widget']; - - // Change the input to an HTML5 date input if - // * the widget is set to "single_text" - // * the format matches the one expected by HTML5 - // * the html5 is set to true - if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format']) { - $view->vars['type'] = 'date'; - } - - if ($form->getConfig()->hasAttribute('formatter')) { - $pattern = $form->getConfig()->getAttribute('formatter')->getPattern(); - - // remove special characters unless the format was explicitly specified - if (!\is_string($options['format'])) { - // remove quoted strings first - $pattern = preg_replace('/\'[^\']+\'/', '', $pattern); - - // remove remaining special chars - $pattern = preg_replace('/[^yMd]+/', '', $pattern); - } - - // set right order with respect to locale (e.g.: de_DE=dd.MM.yy; en_US=M/d/yy) - // lookup various formats at http://userguide.icu-project.org/formatparse/datetime - if (preg_match('/^([yMd]+)[^yMd]*([yMd]+)[^yMd]*([yMd]+)$/', $pattern)) { - $pattern = preg_replace(['/y+/', '/M+/', '/d+/'], ['{{ year }}', '{{ month }}', '{{ day }}'], $pattern); - } else { - // default fallback - $pattern = '{{ year }}{{ month }}{{ day }}'; - } - - $view->vars['date_pattern'] = $pattern; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge( - ['year' => $default, 'month' => $default, 'day' => $default], - $placeholder - ); - } - - return [ - 'year' => $placeholder, - 'month' => $placeholder, - 'day' => $placeholder, - ]; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (\is_array($choiceTranslationDomain)) { - $default = false; - - return array_replace( - ['year' => $default, 'month' => $default, 'day' => $default], - $choiceTranslationDomain - ); - } - - return [ - 'year' => $choiceTranslationDomain, - 'month' => $choiceTranslationDomain, - 'day' => $choiceTranslationDomain, - ]; - }; - - $format = function (Options $options) { - return 'single_text' === $options['widget'] ? self::HTML5_FORMAT : self::DEFAULT_FORMAT; - }; - - $resolver->setDefaults([ - 'years' => range((int) date('Y') - 5, (int) date('Y') + 5), - 'months' => range(1, 12), - 'days' => range(1, 31), - 'widget' => 'choice', - 'input' => 'datetime', - 'format' => $format, - 'model_timezone' => null, - 'view_timezone' => null, - 'placeholder' => $placeholderDefault, - 'html5' => true, - // Don't modify \DateTime classes by reference, we treat - // them like immutable value objects - 'by_reference' => false, - 'error_bubbling' => false, - // If initialized with a \DateTime object, FormType initializes - // this option to "\DateTime". Since the internal, normalized - // representation is not \DateTime, but an array, we need to unset - // this option. - 'data_class' => null, - 'compound' => $compound, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'choice_translation_domain' => false, - 'input_format' => 'Y-m-d', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid date.'; - }, - ]); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - - $resolver->setAllowedValues('input', [ - 'datetime', - 'datetime_immutable', - 'string', - 'timestamp', - 'array', - ]); - $resolver->setAllowedValues('widget', [ - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('format', ['int', 'string']); - $resolver->setAllowedTypes('years', 'array'); - $resolver->setAllowedTypes('months', 'array'); - $resolver->setAllowedTypes('days', 'array'); - $resolver->setAllowedTypes('input_format', 'string'); - - $resolver->setNormalizer('html5', function (Options $options, $html5) { - if ($html5 && 'single_text' === $options['widget'] && self::HTML5_FORMAT !== $options['format']) { - throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is enabled.', self::class)); - } - - return $html5; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'date'; - } - - private function formatTimestamps(\IntlDateFormatter $formatter, string $regex, array $timestamps) - { - $pattern = $formatter->getPattern(); - $timezone = $formatter->getTimeZoneId(); - $formattedTimestamps = []; - - $formatter->setTimeZone('UTC'); - - if (preg_match($regex, $pattern, $matches)) { - $formatter->setPattern($matches[0]); - - foreach ($timestamps as $timestamp => $choice) { - $formattedTimestamps[$formatter->format($timestamp)] = $choice; - } - - // I'd like to clone the formatter above, but then we get a - // segmentation fault, so let's restore the old state instead - $formatter->setPattern($pattern); - } - - $formatter->setTimeZone($timezone); - - return $formattedTimestamps; - } - - private function listYears(array $years) - { - $result = []; - - foreach ($years as $year) { - $result[\PHP_INT_SIZE === 4 ? \DateTime::createFromFormat('Y e', $year.' UTC')->format('U') : gmmktime(0, 0, 0, 6, 15, $year)] = $year; - } - - return $result; - } - - private function listMonths(array $months) - { - $result = []; - - foreach ($months as $month) { - $result[gmmktime(0, 0, 0, $month, 15)] = $month; - } - - return $result; - } - - private function listDays(array $days) - { - $result = []; - - foreach ($days as $day) { - $result[gmmktime(0, 0, 0, 5, $day)] = $day; - } - - return $result; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/EmailType.php b/lib/symfony/form/Extension/Core/Type/EmailType.php deleted file mode 100644 index 486bc0217..000000000 --- a/lib/symfony/form/Extension/Core/Type/EmailType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class EmailType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid email address.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'email'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/EnumType.php b/lib/symfony/form/Extension/Core/Type/EnumType.php deleted file mode 100644 index c251cdbd0..000000000 --- a/lib/symfony/form/Extension/Core/Type/EnumType.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A choice type for native PHP enums. - * - * @author Alexander M. Turek - */ -final class EnumType extends AbstractType -{ - public function configureOptions(OptionsResolver $resolver): void - { - $resolver - ->setRequired(['class']) - ->setAllowedTypes('class', 'string') - ->setAllowedValues('class', \Closure::fromCallable('enum_exists')) - ->setDefault('choices', static function (Options $options): array { - return $options['class']::cases(); - }) - ->setDefault('choice_label', static function (\UnitEnum $choice): string { - return $choice->name; - }) - ->setDefault('choice_value', static function (Options $options): ?\Closure { - if (!is_a($options['class'], \BackedEnum::class, true)) { - return null; - } - - return static function (?\BackedEnum $choice): ?string { - if (null === $choice) { - return null; - } - - return (string) $choice->value; - }; - }) - ; - } - - public function getParent(): string - { - return ChoiceType::class; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/FileType.php b/lib/symfony/form/Extension/Core/Type/FileType.php deleted file mode 100644 index b66b7ff5d..000000000 --- a/lib/symfony/form/Extension/Core/Type/FileType.php +++ /dev/null @@ -1,255 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FileUploadError; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Contracts\Translation\TranslatorInterface; - -class FileType extends AbstractType -{ - public const KIB_BYTES = 1024; - public const MIB_BYTES = 1048576; - - private const SUFFIXES = [ - 1 => 'bytes', - self::KIB_BYTES => 'KiB', - self::MIB_BYTES => 'MiB', - ]; - - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Ensure that submitted data is always an uploaded file or an array of some - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) { - $form = $event->getForm(); - $requestHandler = $form->getConfig()->getRequestHandler(); - - if ($options['multiple']) { - $data = []; - $files = $event->getData(); - - if (!\is_array($files)) { - $files = []; - } - - foreach ($files as $file) { - if ($requestHandler->isFileUpload($file)) { - $data[] = $file; - - if (method_exists($requestHandler, 'getUploadFileError') && null !== $errorCode = $requestHandler->getUploadFileError($file)) { - $form->addError($this->getFileUploadError($errorCode)); - } - } - } - - // Since the array is never considered empty in the view data format - // on submission, we need to evaluate the configured empty data here - if ([] === $data) { - $emptyData = $form->getConfig()->getEmptyData(); - $data = $emptyData instanceof \Closure ? $emptyData($form, $data) : $emptyData; - } - - $event->setData($data); - } elseif ($requestHandler->isFileUpload($event->getData()) && method_exists($requestHandler, 'getUploadFileError') && null !== $errorCode = $requestHandler->getUploadFileError($event->getData())) { - $form->addError($this->getFileUploadError($errorCode)); - } elseif (!$requestHandler->isFileUpload($event->getData())) { - $event->setData(null); - } - }); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['multiple']) { - $view->vars['full_name'] .= '[]'; - $view->vars['attr']['multiple'] = 'multiple'; - } - - $view->vars = array_replace($view->vars, [ - 'type' => 'file', - 'value' => '', - ]); - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $view->vars['multipart'] = true; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $dataClass = null; - if (class_exists(\Symfony\Component\HttpFoundation\File\File::class)) { - $dataClass = function (Options $options) { - return $options['multiple'] ? null : 'Symfony\Component\HttpFoundation\File\File'; - }; - } - - $emptyData = function (Options $options) { - return $options['multiple'] ? [] : null; - }; - - $resolver->setDefaults([ - 'compound' => false, - 'data_class' => $dataClass, - 'empty_data' => $emptyData, - 'multiple' => false, - 'allow_file_upload' => true, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid file.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'file'; - } - - private function getFileUploadError(int $errorCode) - { - $messageParameters = []; - - if (\UPLOAD_ERR_INI_SIZE === $errorCode) { - [$limitAsString, $suffix] = $this->factorizeSizes(0, self::getMaxFilesize()); - $messageTemplate = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; - $messageParameters = [ - '{{ limit }}' => $limitAsString, - '{{ suffix }}' => $suffix, - ]; - } elseif (\UPLOAD_ERR_FORM_SIZE === $errorCode) { - $messageTemplate = 'The file is too large.'; - } else { - $messageTemplate = 'The file could not be uploaded.'; - } - - if (null !== $this->translator) { - $message = $this->translator->trans($messageTemplate, $messageParameters, 'validators'); - } else { - $message = strtr($messageTemplate, $messageParameters); - } - - return new FileUploadError($message, $messageTemplate, $messageParameters); - } - - /** - * Returns the maximum size of an uploaded file as configured in php.ini. - * - * This method should be kept in sync with Symfony\Component\HttpFoundation\File\UploadedFile::getMaxFilesize(). - * - * @return int|float The maximum size of an uploaded file in bytes (returns float if size > PHP_INT_MAX) - */ - private static function getMaxFilesize() - { - $iniMax = strtolower(\ini_get('upload_max_filesize')); - - if ('' === $iniMax) { - return \PHP_INT_MAX; - } - - $max = ltrim($iniMax, '+'); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($iniMax, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } - - /** - * Converts the limit to the smallest possible number - * (i.e. try "MB", then "kB", then "bytes"). - * - * This method should be kept in sync with Symfony\Component\Validator\Constraints\FileValidator::factorizeSizes(). - * - * @param int|float $limit - */ - private function factorizeSizes(int $size, $limit) - { - $coef = self::MIB_BYTES; - $coefFactor = self::KIB_BYTES; - - $limitAsString = (string) ($limit / $coef); - - // Restrict the limit to 2 decimals (without rounding! we - // need the precise value) - while (self::moreDecimalsThan($limitAsString, 2)) { - $coef /= $coefFactor; - $limitAsString = (string) ($limit / $coef); - } - - // Convert size to the same measure, but round to 2 decimals - $sizeAsString = (string) round($size / $coef, 2); - - // If the size and limit produce the same string output - // (due to rounding), reduce the coefficient - while ($sizeAsString === $limitAsString) { - $coef /= $coefFactor; - $limitAsString = (string) ($limit / $coef); - $sizeAsString = (string) round($size / $coef, 2); - } - - return [$limitAsString, self::SUFFIXES[$coef]]; - } - - /** - * This method should be kept in sync with Symfony\Component\Validator\Constraints\FileValidator::moreDecimalsThan(). - */ - private static function moreDecimalsThan(string $double, int $numberOfDecimals): bool - { - return \strlen($double) > \strlen(round($double, $numberOfDecimals)); - } -} diff --git a/lib/symfony/form/Extension/Core/Type/FormType.php b/lib/symfony/form/Extension/Core/Type/FormType.php deleted file mode 100644 index bd8ba13a3..000000000 --- a/lib/symfony/form/Extension/Core/Type/FormType.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataAccessor\CallbackAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\ChainAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; -use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; -use Symfony\Component\Form\Extension\Core\EventListener\TrimListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormConfigBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\Translation\TranslatableMessage; - -class FormType extends BaseType -{ - private $dataMapper; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->dataMapper = new DataMapper(new ChainAccessor([ - new CallbackAccessor(), - new PropertyPathAccessor($propertyAccessor ?? PropertyAccess::createPropertyAccessor()), - ])); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - parent::buildForm($builder, $options); - - $isDataOptionSet = \array_key_exists('data', $options); - - $builder - ->setRequired($options['required']) - ->setErrorBubbling($options['error_bubbling']) - ->setEmptyData($options['empty_data']) - ->setPropertyPath($options['property_path']) - ->setMapped($options['mapped']) - ->setByReference($options['by_reference']) - ->setInheritData($options['inherit_data']) - ->setCompound($options['compound']) - ->setData($isDataOptionSet ? $options['data'] : null) - ->setDataLocked($isDataOptionSet) - ->setDataMapper($options['compound'] ? $this->dataMapper : null) - ->setMethod($options['method']) - ->setAction($options['action']); - - if ($options['trim']) { - $builder->addEventSubscriber(new TrimListener()); - } - - if (!method_exists($builder, 'setIsEmptyCallback')) { - trigger_deprecation('symfony/form', '5.1', 'Not implementing the "%s::setIsEmptyCallback()" method in "%s" is deprecated.', FormConfigBuilderInterface::class, get_debug_type($builder)); - - return; - } - - $builder->setIsEmptyCallback($options['is_empty_callback']); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - parent::buildView($view, $form, $options); - - $name = $form->getName(); - $helpTranslationParameters = $options['help_translation_parameters']; - - if ($view->parent) { - if ('' === $name) { - throw new LogicException('Form node with empty name can be used only as root form node.'); - } - - // Complex fields are read-only if they themselves or their parents are. - if (!isset($view->vars['attr']['readonly']) && isset($view->parent->vars['attr']['readonly']) && false !== $view->parent->vars['attr']['readonly']) { - $view->vars['attr']['readonly'] = true; - } - - $helpTranslationParameters = array_merge($view->parent->vars['help_translation_parameters'], $helpTranslationParameters); - } - - $formConfig = $form->getConfig(); - $view->vars = array_replace($view->vars, [ - 'errors' => $form->getErrors(), - 'valid' => $form->isSubmitted() ? $form->isValid() : true, - 'value' => $form->getViewData(), - 'data' => $form->getNormData(), - 'required' => $form->isRequired(), - 'size' => null, - 'label_attr' => $options['label_attr'], - 'help' => $options['help'], - 'help_attr' => $options['help_attr'], - 'help_html' => $options['help_html'], - 'help_translation_parameters' => $helpTranslationParameters, - 'compound' => $formConfig->getCompound(), - 'method' => $formConfig->getMethod(), - 'action' => $formConfig->getAction(), - 'submitted' => $form->isSubmitted(), - ]); - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $multipart = false; - - foreach ($view->children as $child) { - if ($child->vars['multipart']) { - $multipart = true; - break; - } - } - - $view->vars['multipart'] = $multipart; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - parent::configureOptions($resolver); - - // Derive "data_class" option from passed "data" object - $dataClass = function (Options $options) { - return isset($options['data']) && \is_object($options['data']) ? \get_class($options['data']) : null; - }; - - // Derive "empty_data" closure from "data_class" option - $emptyData = function (Options $options) { - $class = $options['data_class']; - - if (null !== $class) { - return function (FormInterface $form) use ($class) { - return $form->isEmpty() && !$form->isRequired() ? null : new $class(); - }; - } - - return function (FormInterface $form) { - return $form->getConfig()->getCompound() ? [] : ''; - }; - }; - - // Wrap "post_max_size_message" in a closure to translate it lazily - $uploadMaxSizeMessage = function (Options $options) { - return function () use ($options) { - return $options['post_max_size_message']; - }; - }; - - // For any form that is not represented by a single HTML control, - // errors should bubble up by default - $errorBubbling = function (Options $options) { - return $options['compound'] && !$options['inherit_data']; - }; - - // If data is given, the form is locked to that data - // (independent of its value) - $resolver->setDefined([ - 'data', - ]); - - $resolver->setDefaults([ - 'data_class' => $dataClass, - 'empty_data' => $emptyData, - 'trim' => true, - 'required' => true, - 'property_path' => null, - 'mapped' => true, - 'by_reference' => true, - 'error_bubbling' => $errorBubbling, - 'label_attr' => [], - 'inherit_data' => false, - 'compound' => true, - 'method' => 'POST', - // According to RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt) - // section 4.2., empty URIs are considered same-document references - 'action' => '', - 'attr' => [], - 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', - 'upload_max_size_message' => $uploadMaxSizeMessage, // internal - 'allow_file_upload' => false, - 'help' => null, - 'help_attr' => [], - 'help_html' => false, - 'help_translation_parameters' => [], - 'invalid_message' => 'This value is not valid.', - 'invalid_message_parameters' => [], - 'is_empty_callback' => null, - 'getter' => null, - 'setter' => null, - ]); - - $resolver->setAllowedTypes('label_attr', 'array'); - $resolver->setAllowedTypes('action', 'string'); - $resolver->setAllowedTypes('upload_max_size_message', ['callable']); - $resolver->setAllowedTypes('help', ['string', 'null', TranslatableMessage::class]); - $resolver->setAllowedTypes('help_attr', 'array'); - $resolver->setAllowedTypes('help_html', 'bool'); - $resolver->setAllowedTypes('is_empty_callback', ['null', 'callable']); - $resolver->setAllowedTypes('getter', ['null', 'callable']); - $resolver->setAllowedTypes('setter', ['null', 'callable']); - - $resolver->setInfo('getter', 'A callable that accepts two arguments (the view data and the current form field) and must return a value.'); - $resolver->setInfo('setter', 'A callable that accepts three arguments (a reference to the view data, the submitted value and the current form field).'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'form'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/HiddenType.php b/lib/symfony/form/Extension/Core/Type/HiddenType.php deleted file mode 100644 index f4258ec01..000000000 --- a/lib/symfony/form/Extension/Core/Type/HiddenType.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class HiddenType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - // hidden fields cannot have a required attribute - 'required' => false, - // Pass errors to the parent - 'error_bubbling' => true, - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The hidden field is invalid.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'hidden'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/IntegerType.php b/lib/symfony/form/Extension/Core/Type/IntegerType.php deleted file mode 100644 index a1cd058a9..000000000 --- a/lib/symfony/form/Extension/Core/Type/IntegerType.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class IntegerType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addViewTransformer(new IntegerToLocalizedStringTransformer($options['grouping'], $options['rounding_mode'], !$options['grouping'] ? 'en' : null)); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['grouping']) { - $view->vars['type'] = 'text'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'grouping' => false, - // Integer cast rounds towards 0, so do the same when displaying fractions - 'rounding_mode' => \NumberFormatter::ROUND_DOWN, - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter an integer.'; - }, - ]); - - $resolver->setAllowedValues('rounding_mode', [ - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'integer'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/LanguageType.php b/lib/symfony/form/Extension/Core/Type/LanguageType.php deleted file mode 100644 index 7bcbda207..000000000 --- a/lib/symfony/form/Extension/Core/Type/LanguageType.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Exception\MissingResourceException; -use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Languages; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class LanguageType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - $choiceTranslationLocale = $options['choice_translation_locale']; - $useAlpha3Codes = $options['alpha3']; - $choiceSelfTranslation = $options['choice_self_translation']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale, $useAlpha3Codes, $choiceSelfTranslation) { - if (true === $choiceSelfTranslation) { - foreach (Languages::getLanguageCodes() as $alpha2Code) { - try { - $languageCode = $useAlpha3Codes ? Languages::getAlpha3Code($alpha2Code) : $alpha2Code; - $languagesList[$languageCode] = Languages::getName($alpha2Code, $alpha2Code); - } catch (MissingResourceException $e) { - // ignore errors like "Couldn't read the indices for the locale 'meta'" - } - } - } else { - $languagesList = $useAlpha3Codes ? Languages::getAlpha3Names($choiceTranslationLocale) : Languages::getNames($choiceTranslationLocale); - } - - return array_flip($languagesList); - }), [$choiceTranslationLocale, $useAlpha3Codes, $choiceSelfTranslation]); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'alpha3' => false, - 'choice_self_translation' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid language.'; - }, - ]); - - $resolver->setAllowedTypes('choice_self_translation', ['bool']); - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - $resolver->setAllowedTypes('alpha3', 'bool'); - - $resolver->setNormalizer('choice_self_translation', function (Options $options, $value) { - if (true === $value && $options['choice_translation_locale']) { - throw new LogicException('Cannot use the "choice_self_translation" and "choice_translation_locale" options at the same time. Remove one of them.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'language'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/LocaleType.php b/lib/symfony/form/Extension/Core/Type/LocaleType.php deleted file mode 100644 index 14113e4ac..000000000 --- a/lib/symfony/form/Extension/Core/Type/LocaleType.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Locales; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class LocaleType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale) { - return array_flip(Locales::getNames($choiceTranslationLocale)); - }), $choiceTranslationLocale); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid locale.'; - }, - ]); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'locale'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/MoneyType.php b/lib/symfony/form/Extension/Core/Type/MoneyType.php deleted file mode 100644 index 6bf7a201f..000000000 --- a/lib/symfony/form/Extension/Core/Type/MoneyType.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\MoneyToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class MoneyType extends AbstractType -{ - protected static $patterns = []; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Values used in HTML5 number inputs should be formatted as in "1234.5", ie. 'en' format without grouping, - // according to https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats - $builder - ->addViewTransformer(new MoneyToLocalizedStringTransformer( - $options['scale'], - $options['grouping'], - $options['rounding_mode'], - $options['divisor'], - $options['html5'] ? 'en' : null - )) - ; - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['money_pattern'] = self::getPattern($options['currency']); - - if ($options['html5']) { - $view->vars['type'] = 'number'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'scale' => 2, - 'grouping' => false, - 'rounding_mode' => \NumberFormatter::ROUND_HALFUP, - 'divisor' => 1, - 'currency' => 'EUR', - 'compound' => false, - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid money amount.'; - }, - ]); - - $resolver->setAllowedValues('rounding_mode', [ - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - - $resolver->setAllowedTypes('scale', 'int'); - - $resolver->setAllowedTypes('html5', 'bool'); - - $resolver->setNormalizer('grouping', function (Options $options, $value) { - if ($value && $options['html5']) { - throw new LogicException('Cannot use the "grouping" option when the "html5" option is enabled.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'money'; - } - - /** - * Returns the pattern for this locale in UTF-8. - * - * The pattern contains the placeholder "{{ widget }}" where the HTML tag should - * be inserted - */ - protected static function getPattern(?string $currency) - { - if (!$currency) { - return '{{ widget }}'; - } - - $locale = \Locale::getDefault(); - - if (!isset(self::$patterns[$locale])) { - self::$patterns[$locale] = []; - } - - if (!isset(self::$patterns[$locale][$currency])) { - $format = new \NumberFormatter($locale, \NumberFormatter::CURRENCY); - $pattern = $format->formatCurrency('123', $currency); - - // the spacings between currency symbol and number are ignored, because - // a single space leads to better readability in combination with input - // fields - - // the regex also considers non-break spaces (0xC2 or 0xA0 in UTF-8) - - preg_match('/^([^\s\xc2\xa0]*)[\s\xc2\xa0]*123(?:[,.]0+)?[\s\xc2\xa0]*([^\s\xc2\xa0]*)$/u', $pattern, $matches); - - if (!empty($matches[1])) { - self::$patterns[$locale][$currency] = $matches[1].' {{ widget }}'; - } elseif (!empty($matches[2])) { - self::$patterns[$locale][$currency] = '{{ widget }} '.$matches[2]; - } else { - self::$patterns[$locale][$currency] = '{{ widget }}'; - } - } - - return self::$patterns[$locale][$currency]; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/NumberType.php b/lib/symfony/form/Extension/Core/Type/NumberType.php deleted file mode 100644 index 2f6ac6cc2..000000000 --- a/lib/symfony/form/Extension/Core/Type/NumberType.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\StringToFloatTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class NumberType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addViewTransformer(new NumberToLocalizedStringTransformer( - $options['scale'], - $options['grouping'], - $options['rounding_mode'], - $options['html5'] ? 'en' : null - )); - - if ('string' === $options['input']) { - $builder->addModelTransformer(new StringToFloatTransformer($options['scale'])); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['html5']) { - $view->vars['type'] = 'number'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - // default scale is locale specific (usually around 3) - 'scale' => null, - 'grouping' => false, - 'rounding_mode' => \NumberFormatter::ROUND_HALFUP, - 'compound' => false, - 'input' => 'number', - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a number.'; - }, - ]); - - $resolver->setAllowedValues('rounding_mode', [ - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - $resolver->setAllowedValues('input', ['number', 'string']); - $resolver->setAllowedTypes('scale', ['null', 'int']); - $resolver->setAllowedTypes('html5', 'bool'); - - $resolver->setNormalizer('grouping', function (Options $options, $value) { - if (true === $value && $options['html5']) { - throw new LogicException('Cannot use the "grouping" option when the "html5" option is enabled.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'number'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/PasswordType.php b/lib/symfony/form/Extension/Core/Type/PasswordType.php deleted file mode 100644 index 779f94d43..000000000 --- a/lib/symfony/form/Extension/Core/Type/PasswordType.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class PasswordType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['always_empty'] || !$form->isSubmitted()) { - $view->vars['value'] = ''; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'always_empty' => true, - 'trim' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The password is invalid.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'password'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/PercentType.php b/lib/symfony/form/Extension/Core/Type/PercentType.php deleted file mode 100644 index 90e8fa6e1..000000000 --- a/lib/symfony/form/Extension/Core/Type/PercentType.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class PercentType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addViewTransformer(new PercentToLocalizedStringTransformer( - $options['scale'], - $options['type'], - $options['rounding_mode'], - $options['html5'] - )); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['symbol'] = $options['symbol']; - - if ($options['html5']) { - $view->vars['type'] = 'number'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'scale' => 0, - 'rounding_mode' => function (Options $options) { - trigger_deprecation('symfony/form', '5.1', 'Not configuring the "rounding_mode" option is deprecated. It will default to "\NumberFormatter::ROUND_HALFUP" in Symfony 6.0.'); - - return null; - }, - 'symbol' => '%', - 'type' => 'fractional', - 'compound' => false, - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a percentage value.'; - }, - ]); - - $resolver->setAllowedValues('type', [ - 'fractional', - 'integer', - ]); - $resolver->setAllowedValues('rounding_mode', [ - null, - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - $resolver->setAllowedTypes('scale', 'int'); - $resolver->setAllowedTypes('symbol', ['bool', 'string']); - $resolver->setDeprecated('rounding_mode', 'symfony/form', '5.1', function (Options $options, $roundingMode) { - if (null === $roundingMode) { - return 'Not configuring the "rounding_mode" option is deprecated. It will default to "\NumberFormatter::ROUND_HALFUP" in Symfony 6.0.'; - } - - return ''; - }); - $resolver->setAllowedTypes('html5', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'percent'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/RadioType.php b/lib/symfony/form/Extension/Core/Type/RadioType.php deleted file mode 100644 index ed999f52b..000000000 --- a/lib/symfony/form/Extension/Core/Type/RadioType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class RadioType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid option.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return CheckboxType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'radio'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/RangeType.php b/lib/symfony/form/Extension/Core/Type/RangeType.php deleted file mode 100644 index 73ec6e163..000000000 --- a/lib/symfony/form/Extension/Core/Type/RangeType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class RangeType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please choose a valid range.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'range'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/RepeatedType.php b/lib/symfony/form/Extension/Core/Type/RepeatedType.php deleted file mode 100644 index 16fa1a7bb..000000000 --- a/lib/symfony/form/Extension/Core/Type/RepeatedType.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\ValueToDuplicatesTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class RepeatedType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Overwrite required option for child fields - $options['first_options']['required'] = $options['required']; - $options['second_options']['required'] = $options['required']; - - if (!isset($options['options']['error_bubbling'])) { - $options['options']['error_bubbling'] = $options['error_bubbling']; - } - - // children fields must always be mapped - $defaultOptions = ['mapped' => true]; - - $builder - ->addViewTransformer(new ValueToDuplicatesTransformer([ - $options['first_name'], - $options['second_name'], - ])) - ->add($options['first_name'], $options['type'], array_merge($options['options'], $options['first_options'], $defaultOptions)) - ->add($options['second_name'], $options['type'], array_merge($options['options'], $options['second_options'], $defaultOptions)) - ; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'type' => TextType::class, - 'options' => [], - 'first_options' => [], - 'second_options' => [], - 'first_name' => 'first', - 'second_name' => 'second', - 'error_bubbling' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The values do not match.'; - }, - ]); - - $resolver->setAllowedTypes('options', 'array'); - $resolver->setAllowedTypes('first_options', 'array'); - $resolver->setAllowedTypes('second_options', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'repeated'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/ResetType.php b/lib/symfony/form/Extension/Core/Type/ResetType.php deleted file mode 100644 index ce8013d1b..000000000 --- a/lib/symfony/form/Extension/Core/Type/ResetType.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ButtonTypeInterface; - -/** - * A reset button. - * - * @author Bernhard Schussek - */ -class ResetType extends AbstractType implements ButtonTypeInterface -{ - /** - * {@inheritdoc} - */ - public function getParent() - { - return ButtonType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'reset'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/SearchType.php b/lib/symfony/form/Extension/Core/Type/SearchType.php deleted file mode 100644 index 682277e61..000000000 --- a/lib/symfony/form/Extension/Core/Type/SearchType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class SearchType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid search term.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'search'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/SubmitType.php b/lib/symfony/form/Extension/Core/Type/SubmitType.php deleted file mode 100644 index 945156efc..000000000 --- a/lib/symfony/form/Extension/Core/Type/SubmitType.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\SubmitButtonTypeInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A submit button. - * - * @author Bernhard Schussek - */ -class SubmitType extends AbstractType implements SubmitButtonTypeInterface -{ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['clicked'] = $form->isClicked(); - - if (!$options['validate']) { - $view->vars['attr']['formnovalidate'] = true; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefault('validate', true); - $resolver->setAllowedTypes('validate', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ButtonType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'submit'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/TelType.php b/lib/symfony/form/Extension/Core/Type/TelType.php deleted file mode 100644 index bc25fd94c..000000000 --- a/lib/symfony/form/Extension/Core/Type/TelType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TelType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please provide a valid phone number.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'tel'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/TextType.php b/lib/symfony/form/Extension/Core/Type/TextType.php deleted file mode 100644 index 72d21c3dd..000000000 --- a/lib/symfony/form/Extension/Core/Type/TextType.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TextType extends AbstractType implements DataTransformerInterface -{ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // When empty_data is explicitly set to an empty string, - // a string should always be returned when NULL is submitted - // This gives more control and thus helps preventing some issues - // with PHP 7 which allows type hinting strings in functions - // See https://github.com/symfony/symfony/issues/5906#issuecomment-203189375 - if ('' === $options['empty_data']) { - $builder->addViewTransformer($this); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'compound' => false, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'text'; - } - - /** - * {@inheritdoc} - */ - public function transform($data) - { - // Model data should not be transformed - return $data; - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($data) - { - return $data ?? ''; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/TextareaType.php b/lib/symfony/form/Extension/Core/Type/TextareaType.php deleted file mode 100644 index 173b7ef53..000000000 --- a/lib/symfony/form/Extension/Core/Type/TextareaType.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; - -class TextareaType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['pattern'] = null; - unset($view->vars['attr']['pattern']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'textarea'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/TimeType.php b/lib/symfony/form/Extension/Core/Type/TimeType.php deleted file mode 100644 index 6b56a120e..000000000 --- a/lib/symfony/form/Extension/Core/Type/TimeType.php +++ /dev/null @@ -1,388 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\InvalidConfigurationException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TimeType extends AbstractType -{ - private const WIDGETS = [ - 'text' => TextType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $parts = ['hour']; - $format = 'H'; - - if ($options['with_seconds'] && !$options['with_minutes']) { - throw new InvalidConfigurationException('You cannot disable minutes if you have enabled seconds.'); - } - - if (null !== $options['reference_date'] && $options['reference_date']->getTimezone()->getName() !== $options['model_timezone']) { - throw new InvalidConfigurationException(sprintf('The configured "model_timezone" (%s) must match the timezone of the "reference_date" (%s).', $options['model_timezone'], $options['reference_date']->getTimezone()->getName())); - } - - if ($options['with_minutes']) { - $format .= ':i'; - $parts[] = 'minute'; - } - - if ($options['with_seconds']) { - $format .= ':s'; - $parts[] = 'second'; - } - - if ('single_text' === $options['widget']) { - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $e) use ($options) { - $data = $e->getData(); - if ($data && preg_match('/^(?P\d{2}):(?P\d{2})(?::(?P\d{2})(?:\.\d+)?)?$/', $data, $matches)) { - if ($options['with_seconds']) { - // handle seconds ignored by user's browser when with_seconds enabled - // https://codereview.chromium.org/450533009/ - $e->setData(sprintf('%s:%s:%s', $matches['hours'], $matches['minutes'], $matches['seconds'] ?? '00')); - } else { - $e->setData(sprintf('%s:%s', $matches['hours'], $matches['minutes'])); - } - } - }); - - $parseFormat = null; - - if (null !== $options['reference_date']) { - $parseFormat = 'Y-m-d '.$format; - - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) { - $data = $event->getData(); - - if (preg_match('/^\d{2}:\d{2}(:\d{2})?$/', $data)) { - $event->setData($options['reference_date']->format('Y-m-d ').$data); - } - }); - } - - $builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format, $parseFormat)); - } else { - $hourOptions = $minuteOptions = $secondOptions = [ - 'error_bubbling' => true, - 'empty_data' => '', - ]; - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - - if ($emptyData instanceof \Closure) { - $lazyEmptyData = static function ($option) use ($emptyData) { - return static function (FormInterface $form) use ($emptyData, $option) { - $emptyData = $emptyData($form->getParent()); - - return $emptyData[$option] ?? ''; - }; - }; - - $hourOptions['empty_data'] = $lazyEmptyData('hour'); - } elseif (isset($emptyData['hour'])) { - $hourOptions['empty_data'] = $emptyData['hour']; - } - - if (isset($options['invalid_message'])) { - $hourOptions['invalid_message'] = $options['invalid_message']; - $minuteOptions['invalid_message'] = $options['invalid_message']; - $secondOptions['invalid_message'] = $options['invalid_message']; - } - - if (isset($options['invalid_message_parameters'])) { - $hourOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $minuteOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $secondOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - } - - if ('choice' === $options['widget']) { - $hours = $minutes = []; - - foreach ($options['hours'] as $hour) { - $hours[str_pad($hour, 2, '0', \STR_PAD_LEFT)] = $hour; - } - - // Only pass a subset of the options to children - $hourOptions['choices'] = $hours; - $hourOptions['placeholder'] = $options['placeholder']['hour']; - $hourOptions['choice_translation_domain'] = $options['choice_translation_domain']['hour']; - - if ($options['with_minutes']) { - foreach ($options['minutes'] as $minute) { - $minutes[str_pad($minute, 2, '0', \STR_PAD_LEFT)] = $minute; - } - - $minuteOptions['choices'] = $minutes; - $minuteOptions['placeholder'] = $options['placeholder']['minute']; - $minuteOptions['choice_translation_domain'] = $options['choice_translation_domain']['minute']; - } - - if ($options['with_seconds']) { - $seconds = []; - - foreach ($options['seconds'] as $second) { - $seconds[str_pad($second, 2, '0', \STR_PAD_LEFT)] = $second; - } - - $secondOptions['choices'] = $seconds; - $secondOptions['placeholder'] = $options['placeholder']['second']; - $secondOptions['choice_translation_domain'] = $options['choice_translation_domain']['second']; - } - - // Append generic carry-along options - foreach (['required', 'translation_domain'] as $passOpt) { - $hourOptions[$passOpt] = $options[$passOpt]; - - if ($options['with_minutes']) { - $minuteOptions[$passOpt] = $options[$passOpt]; - } - - if ($options['with_seconds']) { - $secondOptions[$passOpt] = $options[$passOpt]; - } - } - } - - $builder->add('hour', self::WIDGETS[$options['widget']], $hourOptions); - - if ($options['with_minutes']) { - if ($emptyData instanceof \Closure) { - $minuteOptions['empty_data'] = $lazyEmptyData('minute'); - } elseif (isset($emptyData['minute'])) { - $minuteOptions['empty_data'] = $emptyData['minute']; - } - $builder->add('minute', self::WIDGETS[$options['widget']], $minuteOptions); - } - - if ($options['with_seconds']) { - if ($emptyData instanceof \Closure) { - $secondOptions['empty_data'] = $lazyEmptyData('second'); - } elseif (isset($emptyData['second'])) { - $secondOptions['empty_data'] = $emptyData['second']; - } - $builder->add('second', self::WIDGETS[$options['widget']], $secondOptions); - } - - $builder->addViewTransformer(new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts, 'text' === $options['widget'], $options['reference_date'])); - } - - if ('datetime_immutable' === $options['input']) { - $builder->addModelTransformer(new DateTimeImmutableToDateTimeTransformer()); - } elseif ('string' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToStringTransformer($options['model_timezone'], $options['model_timezone'], $options['input_format']) - )); - } elseif ('timestamp' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToTimestampTransformer($options['model_timezone'], $options['model_timezone']) - )); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], $parts, 'text' === $options['widget'], $options['reference_date']) - )); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars = array_replace($view->vars, [ - 'widget' => $options['widget'], - 'with_minutes' => $options['with_minutes'], - 'with_seconds' => $options['with_seconds'], - ]); - - // Change the input to an HTML5 time input if - // * the widget is set to "single_text" - // * the html5 is set to true - if ($options['html5'] && 'single_text' === $options['widget']) { - $view->vars['type'] = 'time'; - - // we need to force the browser to display the seconds by - // adding the HTML attribute step if not already defined. - // Otherwise the browser will not display and so not send the seconds - // therefore the value will always be considered as invalid. - if ($options['with_seconds'] && !isset($view->vars['attr']['step'])) { - $view->vars['attr']['step'] = 1; - } - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge( - ['hour' => $default, 'minute' => $default, 'second' => $default], - $placeholder - ); - } - - return [ - 'hour' => $placeholder, - 'minute' => $placeholder, - 'second' => $placeholder, - ]; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (\is_array($choiceTranslationDomain)) { - $default = false; - - return array_replace( - ['hour' => $default, 'minute' => $default, 'second' => $default], - $choiceTranslationDomain - ); - } - - return [ - 'hour' => $choiceTranslationDomain, - 'minute' => $choiceTranslationDomain, - 'second' => $choiceTranslationDomain, - ]; - }; - - $modelTimezone = static function (Options $options, $value): ?string { - if (null !== $value) { - return $value; - } - - if (null !== $options['reference_date']) { - return $options['reference_date']->getTimezone()->getName(); - } - - return null; - }; - - $viewTimezone = static function (Options $options, $value): ?string { - if (null !== $value) { - return $value; - } - - if (null !== $options['model_timezone'] && null === $options['reference_date']) { - return $options['model_timezone']; - } - - return null; - }; - - $resolver->setDefaults([ - 'hours' => range(0, 23), - 'minutes' => range(0, 59), - 'seconds' => range(0, 59), - 'widget' => 'choice', - 'input' => 'datetime', - 'input_format' => 'H:i:s', - 'with_minutes' => true, - 'with_seconds' => false, - 'model_timezone' => $modelTimezone, - 'view_timezone' => $viewTimezone, - 'reference_date' => null, - 'placeholder' => $placeholderDefault, - 'html5' => true, - // Don't modify \DateTime classes by reference, we treat - // them like immutable value objects - 'by_reference' => false, - 'error_bubbling' => false, - // If initialized with a \DateTime object, FormType initializes - // this option to "\DateTime". Since the internal, normalized - // representation is not \DateTime, but an array, we need to unset - // this option. - 'data_class' => null, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'compound' => $compound, - 'choice_translation_domain' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid time.'; - }, - ]); - - $resolver->setNormalizer('view_timezone', function (Options $options, $viewTimezone): ?string { - if (null !== $options['model_timezone'] && $viewTimezone !== $options['model_timezone'] && null === $options['reference_date']) { - throw new LogicException('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is not supported.'); - } - - return $viewTimezone; - }); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - - $resolver->setAllowedValues('input', [ - 'datetime', - 'datetime_immutable', - 'string', - 'timestamp', - 'array', - ]); - $resolver->setAllowedValues('widget', [ - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('hours', 'array'); - $resolver->setAllowedTypes('minutes', 'array'); - $resolver->setAllowedTypes('seconds', 'array'); - $resolver->setAllowedTypes('input_format', 'string'); - $resolver->setAllowedTypes('model_timezone', ['null', 'string']); - $resolver->setAllowedTypes('view_timezone', ['null', 'string']); - $resolver->setAllowedTypes('reference_date', ['null', \DateTimeInterface::class]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'time'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/TimezoneType.php b/lib/symfony/form/Extension/Core/Type/TimezoneType.php deleted file mode 100644 index 31b5df5c3..000000000 --- a/lib/symfony/form/Extension/Core/Type/TimezoneType.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeZoneToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\IntlTimeZoneToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Timezones; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TimezoneType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if ('datetimezone' === $options['input']) { - $builder->addModelTransformer(new DateTimeZoneToStringTransformer($options['multiple'])); - } elseif ('intltimezone' === $options['input']) { - $builder->addModelTransformer(new IntlTimeZoneToStringTransformer($options['multiple'])); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'intl' => false, - 'choice_loader' => function (Options $options) { - $input = $options['input']; - - if ($options['intl']) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s" with option "intl=true". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($input, $choiceTranslationLocale) { - return self::getIntlTimezones($input, $choiceTranslationLocale); - }), [$input, $choiceTranslationLocale]); - } - - return ChoiceList::lazy($this, function () use ($input) { - return self::getPhpTimezones($input); - }, $input); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'input' => 'string', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid timezone.'; - }, - 'regions' => \DateTimeZone::ALL, - ]); - - $resolver->setAllowedTypes('intl', ['bool']); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - $resolver->setNormalizer('choice_translation_locale', function (Options $options, $value) { - if (null !== $value && !$options['intl']) { - throw new LogicException('The "choice_translation_locale" option can only be used if the "intl" option is set to true.'); - } - - return $value; - }); - - $resolver->setAllowedValues('input', ['string', 'datetimezone', 'intltimezone']); - $resolver->setNormalizer('input', function (Options $options, $value) { - if ('intltimezone' === $value && !class_exists(\IntlTimeZone::class)) { - throw new LogicException('Cannot use "intltimezone" input because the PHP intl extension is not available.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'timezone'; - } - - private static function getPhpTimezones(string $input): array - { - $timezones = []; - - foreach (\DateTimeZone::listIdentifiers(\DateTimeZone::ALL) as $timezone) { - if ('intltimezone' === $input && 'Etc/Unknown' === \IntlTimeZone::createTimeZone($timezone)->getID()) { - continue; - } - - $timezones[str_replace(['/', '_'], [' / ', ' '], $timezone)] = $timezone; - } - - return $timezones; - } - - private static function getIntlTimezones(string $input, string $locale = null): array - { - $timezones = array_flip(Timezones::getNames($locale)); - - if ('intltimezone' === $input) { - foreach ($timezones as $name => $timezone) { - if ('Etc/Unknown' === \IntlTimeZone::createTimeZone($timezone)->getID()) { - unset($timezones[$name]); - } - } - } - - return $timezones; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/TransformationFailureExtension.php b/lib/symfony/form/Extension/Core/Type/TransformationFailureExtension.php deleted file mode 100644 index f766633c9..000000000 --- a/lib/symfony/form/Extension/Core/Type/TransformationFailureExtension.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\EventListener\TransformationFailureListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Christian Flothmann - */ -class TransformationFailureExtension extends AbstractTypeExtension -{ - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!isset($options['constraints'])) { - $builder->addEventSubscriber(new TransformationFailureListener($this->translator)); - } - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/UlidType.php b/lib/symfony/form/Extension/Core/Type/UlidType.php deleted file mode 100644 index 640d38ffa..000000000 --- a/lib/symfony/form/Extension/Core/Type/UlidType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\UlidToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Pavel Dyakonov - */ -class UlidType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder - ->addViewTransformer(new UlidToStringTransformer()) - ; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid ULID.'; - }, - ]); - } -} diff --git a/lib/symfony/form/Extension/Core/Type/UrlType.php b/lib/symfony/form/Extension/Core/Type/UrlType.php deleted file mode 100644 index f294a10ac..000000000 --- a/lib/symfony/form/Extension/Core/Type/UrlType.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class UrlType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (null !== $options['default_protocol']) { - $builder->addEventSubscriber(new FixUrlProtocolListener($options['default_protocol'])); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['default_protocol']) { - $view->vars['attr']['inputmode'] = 'url'; - $view->vars['type'] = 'text'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'default_protocol' => 'http', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid URL.'; - }, - ]); - - $resolver->setAllowedTypes('default_protocol', ['null', 'string']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'url'; - } -} diff --git a/lib/symfony/form/Extension/Core/Type/UuidType.php b/lib/symfony/form/Extension/Core/Type/UuidType.php deleted file mode 100644 index 0c27802b3..000000000 --- a/lib/symfony/form/Extension/Core/Type/UuidType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\UuidToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Pavel Dyakonov - */ -class UuidType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder - ->addViewTransformer(new UuidToStringTransformer()) - ; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid UUID.'; - }, - ]); - } -} diff --git a/lib/symfony/form/Extension/Core/Type/WeekType.php b/lib/symfony/form/Extension/Core/Type/WeekType.php deleted file mode 100644 index b7f8887d9..000000000 --- a/lib/symfony/form/Extension/Core/Type/WeekType.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\WeekToArrayTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class WeekType extends AbstractType -{ - private const WIDGETS = [ - 'text' => IntegerType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if ('string' === $options['input']) { - $builder->addModelTransformer(new WeekToArrayTransformer()); - } - - if ('single_text' === $options['widget']) { - $builder->addViewTransformer(new ReversedTransformer(new WeekToArrayTransformer())); - } else { - $yearOptions = $weekOptions = [ - 'error_bubbling' => true, - 'empty_data' => '', - ]; - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - - $yearOptions['empty_data'] = $emptyData['year'] ?? ''; - $weekOptions['empty_data'] = $emptyData['week'] ?? ''; - - if (isset($options['invalid_message'])) { - $yearOptions['invalid_message'] = $options['invalid_message']; - $weekOptions['invalid_message'] = $options['invalid_message']; - } - - if (isset($options['invalid_message_parameters'])) { - $yearOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $weekOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - } - - if ('choice' === $options['widget']) { - // Only pass a subset of the options to children - $yearOptions['choices'] = array_combine($options['years'], $options['years']); - $yearOptions['placeholder'] = $options['placeholder']['year']; - $yearOptions['choice_translation_domain'] = $options['choice_translation_domain']['year']; - - $weekOptions['choices'] = array_combine($options['weeks'], $options['weeks']); - $weekOptions['placeholder'] = $options['placeholder']['week']; - $weekOptions['choice_translation_domain'] = $options['choice_translation_domain']['week']; - - // Append generic carry-along options - foreach (['required', 'translation_domain'] as $passOpt) { - $yearOptions[$passOpt] = $options[$passOpt]; - $weekOptions[$passOpt] = $options[$passOpt]; - } - } - - $builder->add('year', self::WIDGETS[$options['widget']], $yearOptions); - $builder->add('week', self::WIDGETS[$options['widget']], $weekOptions); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['widget'] = $options['widget']; - - if ($options['html5']) { - $view->vars['type'] = 'week'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge( - ['year' => $default, 'week' => $default], - $placeholder - ); - } - - return [ - 'year' => $placeholder, - 'week' => $placeholder, - ]; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (\is_array($choiceTranslationDomain)) { - $default = false; - - return array_replace( - ['year' => $default, 'week' => $default], - $choiceTranslationDomain - ); - } - - return [ - 'year' => $choiceTranslationDomain, - 'week' => $choiceTranslationDomain, - ]; - }; - - $resolver->setDefaults([ - 'years' => range(date('Y') - 10, date('Y') + 10), - 'weeks' => array_combine(range(1, 53), range(1, 53)), - 'widget' => 'single_text', - 'input' => 'array', - 'placeholder' => $placeholderDefault, - 'html5' => static function (Options $options) { - return 'single_text' === $options['widget']; - }, - 'error_bubbling' => false, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'compound' => $compound, - 'choice_translation_domain' => false, - 'invalid_message' => static function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) ? $previousValue : 'Please enter a valid week.'; - }, - ]); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - $resolver->setNormalizer('html5', function (Options $options, $html5) { - if ($html5 && 'single_text' !== $options['widget']) { - throw new LogicException(sprintf('The "widget" option of "%s" must be set to "single_text" when the "html5" option is enabled.', self::class)); - } - - return $html5; - }); - - $resolver->setAllowedValues('input', [ - 'string', - 'array', - ]); - - $resolver->setAllowedValues('widget', [ - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('years', 'int[]'); - $resolver->setAllowedTypes('weeks', 'int[]'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'week'; - } -} diff --git a/lib/symfony/form/Extension/Csrf/CsrfExtension.php b/lib/symfony/form/Extension/Csrf/CsrfExtension.php deleted file mode 100644 index 609a371ea..000000000 --- a/lib/symfony/form/Extension/Csrf/CsrfExtension.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Csrf; - -use Symfony\Component\Form\AbstractExtension; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * This extension protects forms by using a CSRF token. - * - * @author Bernhard Schussek - */ -class CsrfExtension extends AbstractExtension -{ - private $tokenManager; - private $translator; - private $translationDomain; - - public function __construct(CsrfTokenManagerInterface $tokenManager, TranslatorInterface $translator = null, string $translationDomain = null) - { - $this->tokenManager = $tokenManager; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - } - - /** - * {@inheritdoc} - */ - protected function loadTypeExtensions() - { - return [ - new Type\FormTypeCsrfExtension($this->tokenManager, true, '_token', $this->translator, $this->translationDomain), - ]; - } -} diff --git a/lib/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php b/lib/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php deleted file mode 100644 index 37548ef55..000000000 --- a/lib/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Csrf\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\Util\ServerParams; -use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class CsrfValidationListener implements EventSubscriberInterface -{ - private $fieldName; - private $tokenManager; - private $tokenId; - private $errorMessage; - private $translator; - private $translationDomain; - private $serverParams; - - public static function getSubscribedEvents() - { - return [ - FormEvents::PRE_SUBMIT => 'preSubmit', - ]; - } - - public function __construct(string $fieldName, CsrfTokenManagerInterface $tokenManager, string $tokenId, string $errorMessage, TranslatorInterface $translator = null, string $translationDomain = null, ServerParams $serverParams = null) - { - $this->fieldName = $fieldName; - $this->tokenManager = $tokenManager; - $this->tokenId = $tokenId; - $this->errorMessage = $errorMessage; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - $this->serverParams = $serverParams ?? new ServerParams(); - } - - public function preSubmit(FormEvent $event) - { - $form = $event->getForm(); - $postRequestSizeExceeded = 'POST' === $form->getConfig()->getMethod() && $this->serverParams->hasPostMaxSizeBeenExceeded(); - - if ($form->isRoot() && $form->getConfig()->getOption('compound') && !$postRequestSizeExceeded) { - $data = $event->getData(); - - $csrfValue = \is_string($data[$this->fieldName] ?? null) ? $data[$this->fieldName] : null; - $csrfToken = new CsrfToken($this->tokenId, $csrfValue); - - if (null === $csrfValue || !$this->tokenManager->isTokenValid($csrfToken)) { - $errorMessage = $this->errorMessage; - - if (null !== $this->translator) { - $errorMessage = $this->translator->trans($errorMessage, [], $this->translationDomain); - } - - $form->addError(new FormError($errorMessage, $errorMessage, [], null, $csrfToken)); - } - - if (\is_array($data)) { - unset($data[$this->fieldName]); - $event->setData($data); - } - } - } -} diff --git a/lib/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/lib/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php deleted file mode 100644 index cd17b8e94..000000000 --- a/lib/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Csrf\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Core\Type\HiddenType; -use Symfony\Component\Form\Extension\Csrf\EventListener\CsrfValidationListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\Util\ServerParams; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class FormTypeCsrfExtension extends AbstractTypeExtension -{ - private $defaultTokenManager; - private $defaultEnabled; - private $defaultFieldName; - private $translator; - private $translationDomain; - private $serverParams; - - public function __construct(CsrfTokenManagerInterface $defaultTokenManager, bool $defaultEnabled = true, string $defaultFieldName = '_token', TranslatorInterface $translator = null, string $translationDomain = null, ServerParams $serverParams = null) - { - $this->defaultTokenManager = $defaultTokenManager; - $this->defaultEnabled = $defaultEnabled; - $this->defaultFieldName = $defaultFieldName; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - $this->serverParams = $serverParams; - } - - /** - * Adds a CSRF field to the form when the CSRF protection is enabled. - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!$options['csrf_protection']) { - return; - } - - $builder - ->addEventSubscriber(new CsrfValidationListener( - $options['csrf_field_name'], - $options['csrf_token_manager'], - $options['csrf_token_id'] ?: ($builder->getName() ?: \get_class($builder->getType()->getInnerType())), - $options['csrf_message'], - $this->translator, - $this->translationDomain, - $this->serverParams - )) - ; - } - - /** - * Adds a CSRF field to the root form view. - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - if ($options['csrf_protection'] && !$view->parent && $options['compound']) { - $factory = $form->getConfig()->getFormFactory(); - $tokenId = $options['csrf_token_id'] ?: ($form->getName() ?: \get_class($form->getConfig()->getType()->getInnerType())); - $data = (string) $options['csrf_token_manager']->getToken($tokenId); - - $csrfForm = $factory->createNamed($options['csrf_field_name'], HiddenType::class, $data, [ - 'block_prefix' => 'csrf_token', - 'mapped' => false, - ]); - - $view->children[$options['csrf_field_name']] = $csrfForm->createView($view); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'csrf_protection' => $this->defaultEnabled, - 'csrf_field_name' => $this->defaultFieldName, - 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', - 'csrf_token_manager' => $this->defaultTokenManager, - 'csrf_token_id' => null, - ]); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/lib/symfony/form/Extension/DataCollector/DataCollectorExtension.php b/lib/symfony/form/Extension/DataCollector/DataCollectorExtension.php deleted file mode 100644 index 4b23513b7..000000000 --- a/lib/symfony/form/Extension/DataCollector/DataCollectorExtension.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\AbstractExtension; - -/** - * Extension for collecting data of the forms on a page. - * - * @author Robert Schönthal - * @author Bernhard Schussek - */ -class DataCollectorExtension extends AbstractExtension -{ - private $dataCollector; - - public function __construct(FormDataCollectorInterface $dataCollector) - { - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - protected function loadTypeExtensions() - { - return [ - new Type\DataCollectorTypeExtension($this->dataCollector), - ]; - } -} diff --git a/lib/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php b/lib/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php deleted file mode 100644 index 77595ab38..000000000 --- a/lib/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; - -/** - * Listener that invokes a data collector for the {@link FormEvents::POST_SET_DATA} - * and {@link FormEvents::POST_SUBMIT} events. - * - * @author Bernhard Schussek - */ -class DataCollectorListener implements EventSubscriberInterface -{ - private $dataCollector; - - public function __construct(FormDataCollectorInterface $dataCollector) - { - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [ - // High priority in order to be called as soon as possible - FormEvents::POST_SET_DATA => ['postSetData', 255], - // Low priority in order to be called as late as possible - FormEvents::POST_SUBMIT => ['postSubmit', -255], - ]; - } - - /** - * Listener for the {@link FormEvents::POST_SET_DATA} event. - */ - public function postSetData(FormEvent $event) - { - if ($event->getForm()->isRoot()) { - // Collect basic information about each form - $this->dataCollector->collectConfiguration($event->getForm()); - - // Collect the default data - $this->dataCollector->collectDefaultData($event->getForm()); - } - } - - /** - * Listener for the {@link FormEvents::POST_SUBMIT} event. - */ - public function postSubmit(FormEvent $event) - { - if ($event->getForm()->isRoot()) { - // Collect the submitted data of each form - $this->dataCollector->collectSubmittedData($event->getForm()); - - // Assemble a form tree - // This is done again after the view is built, but we need it here as the view is not always created. - $this->dataCollector->buildPreliminaryFormTree($event->getForm()); - } - } -} diff --git a/lib/symfony/form/Extension/DataCollector/FormDataCollector.php b/lib/symfony/form/Extension/DataCollector/FormDataCollector.php deleted file mode 100644 index 2fe2fbed1..000000000 --- a/lib/symfony/form/Extension/DataCollector/FormDataCollector.php +++ /dev/null @@ -1,343 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\Validator\ConstraintViolationInterface; -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Caster\ClassStub; -use Symfony\Component\VarDumper\Caster\StubCaster; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Data collector for {@link FormInterface} instances. - * - * @author Robert Schönthal - * @author Bernhard Schussek - * - * @final - */ -class FormDataCollector extends DataCollector implements FormDataCollectorInterface -{ - private $dataExtractor; - - /** - * Stores the collected data per {@link FormInterface} instance. - * - * Uses the hashes of the forms as keys. This is preferable over using - * {@link \SplObjectStorage}, because in this way no references are kept - * to the {@link FormInterface} instances. - * - * @var array - */ - private $dataByForm; - - /** - * Stores the collected data per {@link FormView} instance. - * - * Uses the hashes of the views as keys. This is preferable over using - * {@link \SplObjectStorage}, because in this way no references are kept - * to the {@link FormView} instances. - * - * @var array - */ - private $dataByView; - - /** - * Connects {@link FormView} with {@link FormInterface} instances. - * - * Uses the hashes of the views as keys and the hashes of the forms as - * values. This is preferable over storing the objects directly, because - * this way they can safely be discarded by the GC. - * - * @var array - */ - private $formsByView; - - public function __construct(FormDataExtractorInterface $dataExtractor) - { - if (!class_exists(ClassStub::class)) { - throw new \LogicException(sprintf('The VarDumper component is needed for using the "%s" class. Install symfony/var-dumper version 3.4 or above.', __CLASS__)); - } - - $this->dataExtractor = $dataExtractor; - - $this->reset(); - } - - /** - * Does nothing. The data is collected during the form event listeners. - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - } - - public function reset() - { - $this->data = [ - 'forms' => [], - 'forms_by_hash' => [], - 'nb_errors' => 0, - ]; - } - - /** - * {@inheritdoc} - */ - public function associateFormWithView(FormInterface $form, FormView $view) - { - $this->formsByView[spl_object_hash($view)] = spl_object_hash($form); - } - - /** - * {@inheritdoc} - */ - public function collectConfiguration(FormInterface $form) - { - $hash = spl_object_hash($form); - - if (!isset($this->dataByForm[$hash])) { - $this->dataByForm[$hash] = []; - } - - $this->dataByForm[$hash] = array_replace( - $this->dataByForm[$hash], - $this->dataExtractor->extractConfiguration($form) - ); - - foreach ($form as $child) { - $this->collectConfiguration($child); - } - } - - /** - * {@inheritdoc} - */ - public function collectDefaultData(FormInterface $form) - { - $hash = spl_object_hash($form); - - if (!isset($this->dataByForm[$hash])) { - // field was created by form event - $this->collectConfiguration($form); - } - - $this->dataByForm[$hash] = array_replace( - $this->dataByForm[$hash], - $this->dataExtractor->extractDefaultData($form) - ); - - foreach ($form as $child) { - $this->collectDefaultData($child); - } - } - - /** - * {@inheritdoc} - */ - public function collectSubmittedData(FormInterface $form) - { - $hash = spl_object_hash($form); - - if (!isset($this->dataByForm[$hash])) { - // field was created by form event - $this->collectConfiguration($form); - $this->collectDefaultData($form); - } - - $this->dataByForm[$hash] = array_replace( - $this->dataByForm[$hash], - $this->dataExtractor->extractSubmittedData($form) - ); - - // Count errors - if (isset($this->dataByForm[$hash]['errors'])) { - $this->data['nb_errors'] += \count($this->dataByForm[$hash]['errors']); - } - - foreach ($form as $child) { - $this->collectSubmittedData($child); - - // Expand current form if there are children with errors - if (empty($this->dataByForm[$hash]['has_children_error'])) { - $childData = $this->dataByForm[spl_object_hash($child)]; - $this->dataByForm[$hash]['has_children_error'] = !empty($childData['has_children_error']) || !empty($childData['errors']); - } - } - } - - /** - * {@inheritdoc} - */ - public function collectViewVariables(FormView $view) - { - $hash = spl_object_hash($view); - - if (!isset($this->dataByView[$hash])) { - $this->dataByView[$hash] = []; - } - - $this->dataByView[$hash] = array_replace( - $this->dataByView[$hash], - $this->dataExtractor->extractViewVariables($view) - ); - - foreach ($view->children as $child) { - $this->collectViewVariables($child); - } - } - - /** - * {@inheritdoc} - */ - public function buildPreliminaryFormTree(FormInterface $form) - { - $this->data['forms'][$form->getName()] = &$this->recursiveBuildPreliminaryFormTree($form, $this->data['forms_by_hash']); - } - - /** - * {@inheritdoc} - */ - public function buildFinalFormTree(FormInterface $form, FormView $view) - { - $this->data['forms'][$form->getName()] = &$this->recursiveBuildFinalFormTree($form, $view, $this->data['forms_by_hash']); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'form'; - } - - /** - * {@inheritdoc} - */ - public function getData() - { - return $this->data; - } - - /** - * @internal - */ - public function __sleep(): array - { - foreach ($this->data['forms_by_hash'] as &$form) { - if (isset($form['type_class']) && !$form['type_class'] instanceof ClassStub) { - $form['type_class'] = new ClassStub($form['type_class']); - } - } - - $this->data = $this->cloneVar($this->data); - - return parent::__sleep(); - } - - /** - * {@inheritdoc} - */ - protected function getCasters(): array - { - return parent::getCasters() + [ - \Exception::class => function (\Exception $e, array $a, Stub $s) { - foreach (["\0Exception\0previous", "\0Exception\0trace"] as $k) { - if (isset($a[$k])) { - unset($a[$k]); - ++$s->cut; - } - } - - return $a; - }, - FormInterface::class => function (FormInterface $f, array $a) { - return [ - Caster::PREFIX_VIRTUAL.'name' => $f->getName(), - Caster::PREFIX_VIRTUAL.'type_class' => new ClassStub(\get_class($f->getConfig()->getType()->getInnerType())), - ]; - }, - FormView::class => [StubCaster::class, 'cutInternals'], - ConstraintViolationInterface::class => function (ConstraintViolationInterface $v, array $a) { - return [ - Caster::PREFIX_VIRTUAL.'root' => $v->getRoot(), - Caster::PREFIX_VIRTUAL.'path' => $v->getPropertyPath(), - Caster::PREFIX_VIRTUAL.'value' => $v->getInvalidValue(), - ]; - }, - ]; - } - - private function &recursiveBuildPreliminaryFormTree(FormInterface $form, array &$outputByHash) - { - $hash = spl_object_hash($form); - - $output = &$outputByHash[$hash]; - $output = $this->dataByForm[$hash] - ?? []; - - $output['children'] = []; - - foreach ($form as $name => $child) { - $output['children'][$name] = &$this->recursiveBuildPreliminaryFormTree($child, $outputByHash); - } - - return $output; - } - - private function &recursiveBuildFinalFormTree(FormInterface $form = null, FormView $view, array &$outputByHash) - { - $viewHash = spl_object_hash($view); - $formHash = null; - - if (null !== $form) { - $formHash = spl_object_hash($form); - } elseif (isset($this->formsByView[$viewHash])) { - // The FormInterface instance of the CSRF token is never contained in - // the FormInterface tree of the form, so we need to get the - // corresponding FormInterface instance for its view in a different way - $formHash = $this->formsByView[$viewHash]; - } - if (null !== $formHash) { - $output = &$outputByHash[$formHash]; - } - - $output = $this->dataByView[$viewHash] - ?? []; - - if (null !== $formHash) { - $output = array_replace( - $output, - $this->dataByForm[$formHash] - ?? [] - ); - } - - $output['children'] = []; - - foreach ($view->children as $name => $childView) { - // The CSRF token, for example, is never added to the form tree. - // It is only present in the view. - $childForm = null !== $form && $form->has($name) - ? $form->get($name) - : null; - - $output['children'][$name] = &$this->recursiveBuildFinalFormTree($childForm, $childView, $outputByHash); - } - - return $output; - } -} diff --git a/lib/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php b/lib/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php deleted file mode 100644 index 64b8f83c4..000000000 --- a/lib/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * Collects and structures information about forms. - * - * @author Bernhard Schussek - */ -interface FormDataCollectorInterface extends DataCollectorInterface -{ - /** - * Stores configuration data of the given form and its children. - */ - public function collectConfiguration(FormInterface $form); - - /** - * Stores the default data of the given form and its children. - */ - public function collectDefaultData(FormInterface $form); - - /** - * Stores the submitted data of the given form and its children. - */ - public function collectSubmittedData(FormInterface $form); - - /** - * Stores the view variables of the given form view and its children. - */ - public function collectViewVariables(FormView $view); - - /** - * Specifies that the given objects represent the same conceptual form. - */ - public function associateFormWithView(FormInterface $form, FormView $view); - - /** - * Assembles the data collected about the given form and its children as - * a tree-like data structure. - * - * The result can be queried using {@link getData()}. - */ - public function buildPreliminaryFormTree(FormInterface $form); - - /** - * Assembles the data collected about the given form and its children as - * a tree-like data structure. - * - * The result can be queried using {@link getData()}. - * - * Contrary to {@link buildPreliminaryFormTree()}, a {@link FormView} - * object has to be passed. The tree structure of this view object will be - * used for structuring the resulting data. That means, if a child is - * present in the view, but not in the form, it will be present in the final - * data array anyway. - * - * When {@link FormView} instances are present in the view tree, for which - * no corresponding {@link FormInterface} objects can be found in the form - * tree, only the view data will be included in the result. If a - * corresponding {@link FormInterface} exists otherwise, call - * {@link associateFormWithView()} before calling this method. - */ - public function buildFinalFormTree(FormInterface $form, FormView $view); - - /** - * Returns all collected data. - * - * @return array|Data - */ - public function getData(); -} diff --git a/lib/symfony/form/Extension/DataCollector/FormDataExtractor.php b/lib/symfony/form/Extension/DataCollector/FormDataExtractor.php deleted file mode 100644 index 9cecc720e..000000000 --- a/lib/symfony/form/Extension/DataCollector/FormDataExtractor.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Validator\ConstraintViolationInterface; - -/** - * Default implementation of {@link FormDataExtractorInterface}. - * - * @author Bernhard Schussek - */ -class FormDataExtractor implements FormDataExtractorInterface -{ - /** - * {@inheritdoc} - */ - public function extractConfiguration(FormInterface $form) - { - $data = [ - 'id' => $this->buildId($form), - 'name' => $form->getName(), - 'type_class' => \get_class($form->getConfig()->getType()->getInnerType()), - 'synchronized' => $form->isSynchronized(), - 'passed_options' => [], - 'resolved_options' => [], - ]; - - foreach ($form->getConfig()->getAttribute('data_collector/passed_options', []) as $option => $value) { - $data['passed_options'][$option] = $value; - } - - foreach ($form->getConfig()->getOptions() as $option => $value) { - $data['resolved_options'][$option] = $value; - } - - ksort($data['passed_options']); - ksort($data['resolved_options']); - - return $data; - } - - /** - * {@inheritdoc} - */ - public function extractDefaultData(FormInterface $form) - { - $data = [ - 'default_data' => [ - 'norm' => $form->getNormData(), - ], - 'submitted_data' => [], - ]; - - if ($form->getData() !== $form->getNormData()) { - $data['default_data']['model'] = $form->getData(); - } - - if ($form->getViewData() !== $form->getNormData()) { - $data['default_data']['view'] = $form->getViewData(); - } - - return $data; - } - - /** - * {@inheritdoc} - */ - public function extractSubmittedData(FormInterface $form) - { - $data = [ - 'submitted_data' => [ - 'norm' => $form->getNormData(), - ], - 'errors' => [], - ]; - - if ($form->getViewData() !== $form->getNormData()) { - $data['submitted_data']['view'] = $form->getViewData(); - } - - if ($form->getData() !== $form->getNormData()) { - $data['submitted_data']['model'] = $form->getData(); - } - - foreach ($form->getErrors() as $error) { - $errorData = [ - 'message' => $error->getMessage(), - 'origin' => \is_object($error->getOrigin()) - ? spl_object_hash($error->getOrigin()) - : null, - 'trace' => [], - ]; - - $cause = $error->getCause(); - - while (null !== $cause) { - if ($cause instanceof ConstraintViolationInterface) { - $errorData['trace'][] = $cause; - $cause = method_exists($cause, 'getCause') ? $cause->getCause() : null; - - continue; - } - - if ($cause instanceof \Exception) { - $errorData['trace'][] = $cause; - $cause = $cause->getPrevious(); - - continue; - } - - $errorData['trace'][] = $cause; - - break; - } - - $data['errors'][] = $errorData; - } - - $data['synchronized'] = $form->isSynchronized(); - - return $data; - } - - /** - * {@inheritdoc} - */ - public function extractViewVariables(FormView $view) - { - $data = [ - 'id' => $view->vars['id'] ?? null, - 'name' => $view->vars['name'] ?? null, - 'view_vars' => [], - ]; - - foreach ($view->vars as $varName => $value) { - $data['view_vars'][$varName] = $value; - } - - ksort($data['view_vars']); - - return $data; - } - - /** - * Recursively builds an HTML ID for a form. - */ - private function buildId(FormInterface $form): string - { - $id = $form->getName(); - - if (null !== $form->getParent()) { - $id = $this->buildId($form->getParent()).'_'.$id; - } - - return $id; - } -} diff --git a/lib/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php b/lib/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php deleted file mode 100644 index 7e82286ad..000000000 --- a/lib/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; - -/** - * Extracts arrays of information out of forms. - * - * @author Bernhard Schussek - */ -interface FormDataExtractorInterface -{ - /** - * Extracts the configuration data of a form. - * - * @return array - */ - public function extractConfiguration(FormInterface $form); - - /** - * Extracts the default data of a form. - * - * @return array - */ - public function extractDefaultData(FormInterface $form); - - /** - * Extracts the submitted data of a form. - * - * @return array - */ - public function extractSubmittedData(FormInterface $form); - - /** - * Extracts the view variables of a form. - * - * @return array - */ - public function extractViewVariables(FormView $view); -} diff --git a/lib/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php b/lib/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php deleted file mode 100644 index 54358d5d4..000000000 --- a/lib/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\Proxy; - -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ResolvedFormTypeInterface; - -/** - * Proxy that invokes a data collector when creating a form and its view. - * - * @author Bernhard Schussek - */ -class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface -{ - private $proxiedType; - private $dataCollector; - - public function __construct(ResolvedFormTypeInterface $proxiedType, FormDataCollectorInterface $dataCollector) - { - $this->proxiedType = $proxiedType; - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return $this->proxiedType->getBlockPrefix(); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->proxiedType->getParent(); - } - - /** - * {@inheritdoc} - */ - public function getInnerType() - { - return $this->proxiedType->getInnerType(); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions() - { - return $this->proxiedType->getTypeExtensions(); - } - - /** - * {@inheritdoc} - */ - public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []) - { - $builder = $this->proxiedType->createBuilder($factory, $name, $options); - - $builder->setAttribute('data_collector/passed_options', $options); - $builder->setType($this); - - return $builder; - } - - /** - * {@inheritdoc} - */ - public function createView(FormInterface $form, FormView $parent = null) - { - return $this->proxiedType->createView($form, $parent); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $this->proxiedType->buildForm($builder, $options); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $this->proxiedType->buildView($view, $form, $options); - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $this->proxiedType->finishView($view, $form, $options); - - // Remember which view belongs to which form instance, so that we can - // get the collected data for a view when its form instance is not - // available (e.g. CSRF token) - $this->dataCollector->associateFormWithView($form, $view); - - // Since the CSRF token is only present in the FormView tree, we also - // need to check the FormView tree instead of calling isRoot() on the - // FormInterface tree - if (null === $view->parent) { - $this->dataCollector->collectViewVariables($view); - - // Re-assemble data, in case FormView instances were added, for - // which no FormInterface instances were present (e.g. CSRF token). - // Since finishView() is called after finishing the views of all - // children, we can safely assume that information has been - // collected about the complete form tree. - $this->dataCollector->buildFinalFormTree($form, $view); - } - } - - /** - * {@inheritdoc} - */ - public function getOptionsResolver() - { - return $this->proxiedType->getOptionsResolver(); - } -} diff --git a/lib/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php b/lib/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php deleted file mode 100644 index 068d5cc0b..000000000 --- a/lib/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\Proxy; - -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormTypeInterface; -use Symfony\Component\Form\ResolvedFormTypeFactoryInterface; -use Symfony\Component\Form\ResolvedFormTypeInterface; - -/** - * Proxy that wraps resolved types into {@link ResolvedTypeDataCollectorProxy} - * instances. - * - * @author Bernhard Schussek - */ -class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface -{ - private $proxiedFactory; - private $dataCollector; - - public function __construct(ResolvedFormTypeFactoryInterface $proxiedFactory, FormDataCollectorInterface $dataCollector) - { - $this->proxiedFactory = $proxiedFactory; - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null) - { - return new ResolvedTypeDataCollectorProxy( - $this->proxiedFactory->createResolvedType($type, $typeExtensions, $parent), - $this->dataCollector - ); - } -} diff --git a/lib/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php b/lib/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php deleted file mode 100644 index d25fd132c..000000000 --- a/lib/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener; -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormBuilderInterface; - -/** - * Type extension for collecting data of a form with this type. - * - * @author Robert Schönthal - * @author Bernhard Schussek - */ -class DataCollectorTypeExtension extends AbstractTypeExtension -{ - /** - * @var DataCollectorListener - */ - private $listener; - - public function __construct(FormDataCollectorInterface $dataCollector) - { - $this->listener = new DataCollectorListener($dataCollector); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addEventSubscriber($this->listener); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/lib/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php b/lib/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php deleted file mode 100644 index 5d61a0693..000000000 --- a/lib/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DependencyInjection; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\FormExtensionInterface; -use Symfony\Component\Form\FormTypeGuesserChain; - -class DependencyInjectionExtension implements FormExtensionInterface -{ - private $guesser; - private $guesserLoaded = false; - private $typeContainer; - private $typeExtensionServices; - private $guesserServices; - - /** - * @param iterable[] $typeExtensionServices - */ - public function __construct(ContainerInterface $typeContainer, array $typeExtensionServices, iterable $guesserServices) - { - $this->typeContainer = $typeContainer; - $this->typeExtensionServices = $typeExtensionServices; - $this->guesserServices = $guesserServices; - } - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (!$this->typeContainer->has($name)) { - throw new InvalidArgumentException(sprintf('The field type "%s" is not registered in the service container.', $name)); - } - - return $this->typeContainer->get($name); - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - return $this->typeContainer->has($name); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions(string $name) - { - $extensions = []; - - if (isset($this->typeExtensionServices[$name])) { - foreach ($this->typeExtensionServices[$name] as $extension) { - $extensions[] = $extension; - - $extendedTypes = []; - foreach ($extension::getExtendedTypes() as $extendedType) { - $extendedTypes[] = $extendedType; - } - - // validate the result of getExtendedTypes() to ensure it is consistent with the service definition - if (!\in_array($name, $extendedTypes, true)) { - throw new InvalidArgumentException(sprintf('The extended type "%s" specified for the type extension class "%s" does not match any of the actual extended types (["%s"]).', $name, \get_class($extension), implode('", "', $extendedTypes))); - } - } - } - - return $extensions; - } - - /** - * {@inheritdoc} - */ - public function hasTypeExtensions(string $name) - { - return isset($this->typeExtensionServices[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - if (!$this->guesserLoaded) { - $this->guesserLoaded = true; - $guessers = []; - - foreach ($this->guesserServices as $serviceId => $service) { - $guessers[] = $service; - } - - if ($guessers) { - $this->guesser = new FormTypeGuesserChain($guessers); - } - } - - return $this->guesser; - } -} diff --git a/lib/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php b/lib/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php deleted file mode 100644 index 27305ada4..000000000 --- a/lib/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\HttpFoundation; - -use Symfony\Component\Form\AbstractExtension; - -/** - * Integrates the HttpFoundation component with the Form library. - * - * @author Bernhard Schussek - */ -class HttpFoundationExtension extends AbstractExtension -{ - protected function loadTypeExtensions() - { - return [ - new Type\FormTypeHttpFoundationExtension(), - ]; - } -} diff --git a/lib/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php b/lib/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php deleted file mode 100644 index 05503ff52..000000000 --- a/lib/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\HttpFoundation; - -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\RequestHandlerInterface; -use Symfony\Component\Form\Util\ServerParams; -use Symfony\Component\HttpFoundation\File\File; -use Symfony\Component\HttpFoundation\File\UploadedFile; -use Symfony\Component\HttpFoundation\Request; - -/** - * A request processor using the {@link Request} class of the HttpFoundation - * component. - * - * @author Bernhard Schussek - */ -class HttpFoundationRequestHandler implements RequestHandlerInterface -{ - private $serverParams; - - public function __construct(ServerParams $serverParams = null) - { - $this->serverParams = $serverParams ?? new ServerParams(); - } - - /** - * {@inheritdoc} - */ - public function handleRequest(FormInterface $form, $request = null) - { - if (!$request instanceof Request) { - throw new UnexpectedTypeException($request, 'Symfony\Component\HttpFoundation\Request'); - } - - $name = $form->getName(); - $method = $form->getConfig()->getMethod(); - - if ($method !== $request->getMethod()) { - return; - } - - // For request methods that must not have a request body we fetch data - // from the query string. Otherwise we look for data in the request body. - if ('GET' === $method || 'HEAD' === $method || 'TRACE' === $method) { - if ('' === $name) { - $data = $request->query->all(); - } else { - // Don't submit GET requests if the form's name does not exist - // in the request - if (!$request->query->has($name)) { - return; - } - - $data = $request->query->all()[$name]; - } - } else { - // Mark the form with an error if the uploaded size was too large - // This is done here and not in FormValidator because $_POST is - // empty when that error occurs. Hence the form is never submitted. - if ($this->serverParams->hasPostMaxSizeBeenExceeded()) { - // Submit the form, but don't clear the default values - $form->submit(null, false); - - $form->addError(new FormError( - $form->getConfig()->getOption('upload_max_size_message')(), - null, - ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()] - )); - - return; - } - - if ('' === $name) { - $params = $request->request->all(); - $files = $request->files->all(); - } elseif ($request->request->has($name) || $request->files->has($name)) { - $default = $form->getConfig()->getCompound() ? [] : null; - $params = $request->request->all()[$name] ?? $default; - $files = $request->files->get($name, $default); - } else { - // Don't submit the form if it is not present in the request - return; - } - - if (\is_array($params) && \is_array($files)) { - $data = array_replace_recursive($params, $files); - } else { - $data = $params ?: $files; - } - } - - // Don't auto-submit the form unless at least one field is present. - if ('' === $name && \count(array_intersect_key($data, $form->all())) <= 0) { - return; - } - - $form->submit($data, 'PATCH' !== $method); - } - - /** - * {@inheritdoc} - */ - public function isFileUpload($data) - { - return $data instanceof File; - } - - /** - * @return int|null - */ - public function getUploadFileError($data) - { - if (!$data instanceof UploadedFile || $data->isValid()) { - return null; - } - - return $data->getError(); - } -} diff --git a/lib/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php b/lib/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php deleted file mode 100644 index 0d77f06ce..000000000 --- a/lib/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\HttpFoundation\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\RequestHandlerInterface; - -/** - * @author Bernhard Schussek - */ -class FormTypeHttpFoundationExtension extends AbstractTypeExtension -{ - private $requestHandler; - - public function __construct(RequestHandlerInterface $requestHandler = null) - { - $this->requestHandler = $requestHandler ?? new HttpFoundationRequestHandler(); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->setRequestHandler($this->requestHandler); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/lib/symfony/form/Extension/Validator/Constraints/Form.php b/lib/symfony/form/Extension/Validator/Constraints/Form.php deleted file mode 100644 index 49291e671..000000000 --- a/lib/symfony/form/Extension/Validator/Constraints/Form.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @author Bernhard Schussek - */ -class Form extends Constraint -{ - public const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca'; - public const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854'; - - protected static $errorNames = [ - self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR', - self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', - ]; - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return self::CLASS_CONSTRAINT; - } -} diff --git a/lib/symfony/form/Extension/Validator/Constraints/FormValidator.php b/lib/symfony/form/Extension/Validator/Constraints/FormValidator.php deleted file mode 100644 index 47982f3fc..000000000 --- a/lib/symfony/form/Extension/Validator/Constraints/FormValidator.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Constraints; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Composite; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\Constraints\Valid; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class FormValidator extends ConstraintValidator -{ - /** - * @var \SplObjectStorage> - */ - private $resolvedGroups; - - /** - * {@inheritdoc} - */ - public function validate($form, Constraint $formConstraint) - { - if (!$formConstraint instanceof Form) { - throw new UnexpectedTypeException($formConstraint, Form::class); - } - - if (!$form instanceof FormInterface) { - return; - } - - /* @var FormInterface $form */ - $config = $form->getConfig(); - - $validator = $this->context->getValidator()->inContext($this->context); - - if ($form->isSubmitted() && $form->isSynchronized()) { - // Validate the form data only if transformation succeeded - $groups = $this->getValidationGroups($form); - - if (!$groups) { - return; - } - - $data = $form->getData(); - // Validate the data against its own constraints - $validateDataGraph = $form->isRoot() - && (\is_object($data) || \is_array($data)) - && (($groups && \is_array($groups)) || ($groups instanceof GroupSequence && $groups->groups)) - ; - - // Validate the data against the constraints defined in the form - /** @var Constraint[] $constraints */ - $constraints = $config->getOption('constraints', []); - - $hasChildren = $form->count() > 0; - - if ($hasChildren && $form->isRoot()) { - $this->resolvedGroups = new \SplObjectStorage(); - } - - if ($groups instanceof GroupSequence) { - // Validate the data, the form AND nested fields in sequence - $violationsCount = $this->context->getViolations()->count(); - - foreach ($groups->groups as $group) { - if ($validateDataGraph) { - $validator->atPath('data')->validate($data, null, $group); - } - - if ($groupedConstraints = self::getConstraintsInGroups($constraints, $group)) { - $validator->atPath('data')->validate($data, $groupedConstraints, $group); - } - - foreach ($form->all() as $field) { - if ($field->isSubmitted()) { - // remember to validate this field in one group only - // otherwise resolving the groups would reuse the same - // sequence recursively, thus some fields could fail - // in different steps without breaking early enough - $this->resolvedGroups[$field] = (array) $group; - $fieldFormConstraint = new Form(); - $fieldFormConstraint->groups = $group; - $this->context->setNode($this->context->getValue(), $field, $this->context->getMetadata(), $this->context->getPropertyPath()); - $validator->atPath(sprintf('children[%s]', $field->getName()))->validate($field, $fieldFormConstraint, $group); - } - } - - if ($violationsCount < $this->context->getViolations()->count()) { - break; - } - } - } else { - if ($validateDataGraph) { - $validator->atPath('data')->validate($data, null, $groups); - } - - $groupedConstraints = []; - - foreach ($constraints as $constraint) { - // For the "Valid" constraint, validate the data in all groups - if ($constraint instanceof Valid) { - if (\is_object($data) || \is_array($data)) { - $validator->atPath('data')->validate($data, $constraint, $groups); - } - - continue; - } - - // Otherwise validate a constraint only once for the first - // matching group - foreach ($groups as $group) { - if (\in_array($group, $constraint->groups)) { - $groupedConstraints[$group][] = $constraint; - - // Prevent duplicate validation - if (!$constraint instanceof Composite) { - continue 2; - } - } - } - } - - foreach ($groupedConstraints as $group => $constraint) { - $validator->atPath('data')->validate($data, $constraint, $group); - } - - foreach ($form->all() as $field) { - if ($field->isSubmitted()) { - $this->resolvedGroups[$field] = $groups; - $this->context->setNode($this->context->getValue(), $field, $this->context->getMetadata(), $this->context->getPropertyPath()); - $validator->atPath(sprintf('children[%s]', $field->getName()))->validate($field, $formConstraint); - } - } - } - - if ($hasChildren && $form->isRoot()) { - // destroy storage to avoid memory leaks - $this->resolvedGroups = new \SplObjectStorage(); - } - } elseif (!$form->isSynchronized()) { - $childrenSynchronized = true; - - /** @var FormInterface $child */ - foreach ($form as $child) { - if (!$child->isSynchronized()) { - $childrenSynchronized = false; - $this->context->setNode($this->context->getValue(), $child, $this->context->getMetadata(), $this->context->getPropertyPath()); - $validator->atPath(sprintf('children[%s]', $child->getName()))->validate($child, $formConstraint); - } - } - - // Mark the form with an error if it is not synchronized BUT all - // of its children are synchronized. If any child is not - // synchronized, an error is displayed there already and showing - // a second error in its parent form is pointless, or worse, may - // lead to duplicate errors if error bubbling is enabled on the - // child. - // See also https://github.com/symfony/symfony/issues/4359 - if ($childrenSynchronized) { - $clientDataAsString = \is_scalar($form->getViewData()) - ? (string) $form->getViewData() - : get_debug_type($form->getViewData()); - - $failure = $form->getTransformationFailure(); - - $this->context->setConstraint($formConstraint); - $this->context->buildViolation($failure->getInvalidMessage() ?? $config->getOption('invalid_message')) - ->setParameters(array_replace( - ['{{ value }}' => $clientDataAsString], - $config->getOption('invalid_message_parameters'), - $failure->getInvalidMessageParameters() - )) - ->setInvalidValue($form->getViewData()) - ->setCode(Form::NOT_SYNCHRONIZED_ERROR) - ->setCause($failure) - ->addViolation(); - } - } - - // Mark the form with an error if it contains extra fields - if (!$config->getOption('allow_extra_fields') && \count($form->getExtraData()) > 0) { - $this->context->setConstraint($formConstraint); - $this->context->buildViolation($config->getOption('extra_fields_message', '')) - ->setParameter('{{ extra_fields }}', '"'.implode('", "', array_keys($form->getExtraData())).'"') - ->setPlural(\count($form->getExtraData())) - ->setInvalidValue($form->getExtraData()) - ->setCode(Form::NO_SUCH_FIELD_ERROR) - ->addViolation(); - } - } - - /** - * Returns the validation groups of the given form. - * - * @return string|GroupSequence|array - */ - private function getValidationGroups(FormInterface $form) - { - // Determine the clicked button of the complete form tree - $clickedButton = null; - - if (method_exists($form, 'getClickedButton')) { - $clickedButton = $form->getClickedButton(); - } - - if (null !== $clickedButton) { - $groups = $clickedButton->getConfig()->getOption('validation_groups'); - - if (null !== $groups) { - return self::resolveValidationGroups($groups, $form); - } - } - - do { - $groups = $form->getConfig()->getOption('validation_groups'); - - if (null !== $groups) { - return self::resolveValidationGroups($groups, $form); - } - - if (isset($this->resolvedGroups[$form])) { - return $this->resolvedGroups[$form]; - } - - $form = $form->getParent(); - } while (null !== $form); - - return [Constraint::DEFAULT_GROUP]; - } - - /** - * Post-processes the validation groups option for a given form. - * - * @param string|GroupSequence|array|callable $groups The validation groups - * - * @return GroupSequence|array - */ - private static function resolveValidationGroups($groups, FormInterface $form) - { - if (!\is_string($groups) && \is_callable($groups)) { - $groups = $groups($form); - } - - if ($groups instanceof GroupSequence) { - return $groups; - } - - return (array) $groups; - } - - private static function getConstraintsInGroups($constraints, $group) - { - $groups = (array) $group; - - return array_filter($constraints, static function (Constraint $constraint) use ($groups) { - foreach ($groups as $group) { - if (\in_array($group, $constraint->groups, true)) { - return true; - } - } - - return false; - }); - } -} diff --git a/lib/symfony/form/Extension/Validator/EventListener/ValidationListener.php b/lib/symfony/form/Extension/Validator/EventListener/ValidationListener.php deleted file mode 100644 index 867a5768a..000000000 --- a/lib/symfony/form/Extension/Validator/EventListener/ValidationListener.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Extension\Validator\Constraints\Form; -use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Validator\Validator\ValidatorInterface; - -/** - * @author Bernhard Schussek - */ -class ValidationListener implements EventSubscriberInterface -{ - private $validator; - - private $violationMapper; - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [FormEvents::POST_SUBMIT => 'validateForm']; - } - - public function __construct(ValidatorInterface $validator, ViolationMapperInterface $violationMapper) - { - $this->validator = $validator; - $this->violationMapper = $violationMapper; - } - - public function validateForm(FormEvent $event) - { - $form = $event->getForm(); - - if ($form->isRoot()) { - // Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator. - foreach ($this->validator->validate($form) as $violation) { - // Allow the "invalid" constraint to be put onto - // non-synchronized forms - $allowNonSynchronized = $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode(); - - $this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized); - } - } - } -} diff --git a/lib/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php b/lib/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php deleted file mode 100644 index 0e9e2a9d7..000000000 --- a/lib/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Validator\Constraints\GroupSequence; - -/** - * Encapsulates common logic of {@link FormTypeValidatorExtension} and - * {@link SubmitTypeValidatorExtension}. - * - * @author Bernhard Schussek - */ -abstract class BaseValidatorExtension extends AbstractTypeExtension -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - // Make sure that validation groups end up as null, closure or array - $validationGroupsNormalizer = function (Options $options, $groups) { - if (false === $groups) { - return []; - } - - if (empty($groups)) { - return null; - } - - if (\is_callable($groups)) { - return $groups; - } - - if ($groups instanceof GroupSequence) { - return $groups; - } - - return (array) $groups; - }; - - $resolver->setDefaults([ - 'validation_groups' => null, - ]); - - $resolver->setNormalizer('validation_groups', $validationGroupsNormalizer); - } -} diff --git a/lib/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php b/lib/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php deleted file mode 100644 index d4c520ce8..000000000 --- a/lib/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener; -use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormRendererInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class FormTypeValidatorExtension extends BaseValidatorExtension -{ - private $validator; - private $violationMapper; - private $legacyErrorMessages; - - public function __construct(ValidatorInterface $validator, bool $legacyErrorMessages = true, FormRendererInterface $formRenderer = null, TranslatorInterface $translator = null) - { - $this->validator = $validator; - $this->violationMapper = new ViolationMapper($formRenderer, $translator); - $this->legacyErrorMessages = $legacyErrorMessages; - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addEventSubscriber(new ValidationListener($this->validator, $this->violationMapper)); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - parent::configureOptions($resolver); - - // Constraint should always be converted to an array - $constraintsNormalizer = function (Options $options, $constraints) { - return \is_object($constraints) ? [$constraints] : (array) $constraints; - }; - - $resolver->setDefaults([ - 'error_mapping' => [], - 'constraints' => [], - 'invalid_message' => 'This value is not valid.', - 'invalid_message_parameters' => [], - 'legacy_error_messages' => $this->legacyErrorMessages, - 'allow_extra_fields' => false, - 'extra_fields_message' => 'This form should not contain extra fields.', - ]); - $resolver->setAllowedTypes('constraints', [Constraint::class, Constraint::class.'[]']); - $resolver->setAllowedTypes('legacy_error_messages', 'bool'); - $resolver->setDeprecated('legacy_error_messages', 'symfony/form', '5.2', function (Options $options, $value) { - if (true === $value) { - return 'Setting the "legacy_error_messages" option to "true" is deprecated. It will be disabled in Symfony 6.0.'; - } - - return ''; - }); - - $resolver->setNormalizer('constraints', $constraintsNormalizer); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/lib/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php b/lib/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php deleted file mode 100644 index 4bda0b27d..000000000 --- a/lib/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\RepeatedType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -class RepeatedTypeValidatorExtension extends AbstractTypeExtension -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - // Map errors to the first field - $errorMapping = function (Options $options) { - return ['.' => $options['first_name']]; - }; - - $resolver->setDefaults([ - 'error_mapping' => $errorMapping, - ]); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [RepeatedType::class]; - } -} diff --git a/lib/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php b/lib/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php deleted file mode 100644 index ea273d0ad..000000000 --- a/lib/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\Extension\Core\Type\SubmitType; - -/** - * @author Bernhard Schussek - */ -class SubmitTypeValidatorExtension extends BaseValidatorExtension -{ - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [SubmitType::class]; - } -} diff --git a/lib/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php b/lib/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php deleted file mode 100644 index 21e4fe20e..000000000 --- a/lib/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Abdellatif Ait boudad - * @author David Badura - */ -class UploadValidatorExtension extends AbstractTypeExtension -{ - private $translator; - private $translationDomain; - - public function __construct(TranslatorInterface $translator, string $translationDomain = null) - { - $this->translator = $translator; - $this->translationDomain = $translationDomain; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $translator = $this->translator; - $translationDomain = $this->translationDomain; - $resolver->setNormalizer('upload_max_size_message', function (Options $options, $message) use ($translator, $translationDomain) { - return function () use ($translator, $translationDomain, $message) { - return $translator->trans($message(), [], $translationDomain); - }; - }); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/lib/symfony/form/Extension/Validator/Util/ServerParams.php b/lib/symfony/form/Extension/Validator/Util/ServerParams.php deleted file mode 100644 index 98e9f0c98..000000000 --- a/lib/symfony/form/Extension/Validator/Util/ServerParams.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Util; - -use Symfony\Component\Form\Util\ServerParams as BaseServerParams; - -trigger_deprecation('symfony/form', '5.1', 'The "%s" class is deprecated. Use "%s" instead.', ServerParams::class, BaseServerParams::class); - -/** - * @author Bernhard Schussek - * - * @deprecated since Symfony 5.1. Use {@see BaseServerParams} instead. - */ -class ServerParams extends BaseServerParams -{ -} diff --git a/lib/symfony/form/Extension/Validator/ValidatorExtension.php b/lib/symfony/form/Extension/Validator/ValidatorExtension.php deleted file mode 100644 index 3a5728a82..000000000 --- a/lib/symfony/form/Extension/Validator/ValidatorExtension.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator; - -use Symfony\Component\Form\AbstractExtension; -use Symfony\Component\Form\Extension\Validator\Constraints\Form; -use Symfony\Component\Form\FormRendererInterface; -use Symfony\Component\Validator\Constraints\Traverse; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Extension supporting the Symfony Validator component in forms. - * - * @author Bernhard Schussek - */ -class ValidatorExtension extends AbstractExtension -{ - private $validator; - private $formRenderer; - private $translator; - private $legacyErrorMessages; - - public function __construct(ValidatorInterface $validator, bool $legacyErrorMessages = true, FormRendererInterface $formRenderer = null, TranslatorInterface $translator = null) - { - $this->legacyErrorMessages = $legacyErrorMessages; - - $metadata = $validator->getMetadataFor('Symfony\Component\Form\Form'); - - // Register the form constraints in the validator programmatically. - // This functionality is required when using the Form component without - // the DIC, where the XML file is loaded automatically. Thus the following - // code must be kept synchronized with validation.xml - - /* @var $metadata ClassMetadata */ - $metadata->addConstraint(new Form()); - $metadata->addConstraint(new Traverse(false)); - - $this->validator = $validator; - $this->formRenderer = $formRenderer; - $this->translator = $translator; - } - - public function loadTypeGuesser() - { - return new ValidatorTypeGuesser($this->validator); - } - - protected function loadTypeExtensions() - { - return [ - new Type\FormTypeValidatorExtension($this->validator, $this->legacyErrorMessages, $this->formRenderer, $this->translator), - new Type\RepeatedTypeValidatorExtension(), - new Type\SubmitTypeValidatorExtension(), - ]; - } -} diff --git a/lib/symfony/form/Extension/Validator/ValidatorTypeGuesser.php b/lib/symfony/form/Extension/Validator/ValidatorTypeGuesser.php deleted file mode 100644 index 24470bad5..000000000 --- a/lib/symfony/form/Extension/Validator/ValidatorTypeGuesser.php +++ /dev/null @@ -1,283 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator; - -use Symfony\Component\Form\FormTypeGuesserInterface; -use Symfony\Component\Form\Guess\Guess; -use Symfony\Component\Form\Guess\TypeGuess; -use Symfony\Component\Form\Guess\ValueGuess; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Mapping\ClassMetadataInterface; -use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; - -class ValidatorTypeGuesser implements FormTypeGuesserInterface -{ - private $metadataFactory; - - public function __construct(MetadataFactoryInterface $metadataFactory) - { - $this->metadataFactory = $metadataFactory; - } - - /** - * {@inheritdoc} - */ - public function guessType(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessTypeForConstraint($constraint); - }); - } - - /** - * {@inheritdoc} - */ - public function guessRequired(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessRequiredForConstraint($constraint); - // If we don't find any constraint telling otherwise, we can assume - // that a field is not required (with LOW_CONFIDENCE) - }, false); - } - - /** - * {@inheritdoc} - */ - public function guessMaxLength(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessMaxLengthForConstraint($constraint); - }); - } - - /** - * {@inheritdoc} - */ - public function guessPattern(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessPatternForConstraint($constraint); - }); - } - - /** - * Guesses a field class name for a given constraint. - * - * @return TypeGuess|null - */ - public function guessTypeForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\Type': - switch ($constraint->type) { - case 'array': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', [], Guess::MEDIUM_CONFIDENCE); - case 'boolean': - case 'bool': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', [], Guess::MEDIUM_CONFIDENCE); - - case 'double': - case 'float': - case 'numeric': - case 'real': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::MEDIUM_CONFIDENCE); - - case 'integer': - case 'int': - case 'long': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\IntegerType', [], Guess::MEDIUM_CONFIDENCE); - - case \DateTime::class: - case '\DateTime': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', [], Guess::MEDIUM_CONFIDENCE); - - case 'string': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::LOW_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Country': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CountryType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Currency': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CurrencyType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Date': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\DateTime': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateTimeType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Email': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\EmailType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\File': - case 'Symfony\Component\Validator\Constraints\Image': - $options = []; - if ($constraint->mimeTypes) { - $options = ['attr' => ['accept' => implode(',', (array) $constraint->mimeTypes)]]; - } - - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\FileType', $options, Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Language': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LanguageType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Locale': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LocaleType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Time': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TimeType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Url': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\UrlType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Ip': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::MEDIUM_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Length': - case 'Symfony\Component\Validator\Constraints\Regex': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::LOW_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Range': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::LOW_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Count': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', [], Guess::LOW_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\IsTrue': - case 'Symfony\Component\Validator\Constraints\IsFalse': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', [], Guess::MEDIUM_CONFIDENCE); - } - - return null; - } - - /** - * Guesses whether a field is required based on the given constraint. - * - * @return ValueGuess|null - */ - public function guessRequiredForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\NotNull': - case 'Symfony\Component\Validator\Constraints\NotBlank': - case 'Symfony\Component\Validator\Constraints\IsTrue': - return new ValueGuess(true, Guess::HIGH_CONFIDENCE); - } - - return null; - } - - /** - * Guesses a field's maximum length based on the given constraint. - * - * @return ValueGuess|null - */ - public function guessMaxLengthForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\Length': - if (is_numeric($constraint->max)) { - return new ValueGuess($constraint->max, Guess::HIGH_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Type': - if (\in_array($constraint->type, ['double', 'float', 'numeric', 'real'])) { - return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Range': - if (is_numeric($constraint->max)) { - return new ValueGuess(\strlen((string) $constraint->max), Guess::LOW_CONFIDENCE); - } - break; - } - - return null; - } - - /** - * Guesses a field's pattern based on the given constraint. - * - * @return ValueGuess|null - */ - public function guessPatternForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\Length': - if (is_numeric($constraint->min)) { - return new ValueGuess(sprintf('.{%s,}', (string) $constraint->min), Guess::LOW_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Regex': - $htmlPattern = $constraint->getHtmlPattern(); - - if (null !== $htmlPattern) { - return new ValueGuess($htmlPattern, Guess::HIGH_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Range': - if (is_numeric($constraint->min)) { - return new ValueGuess(sprintf('.{%s,}', \strlen((string) $constraint->min)), Guess::LOW_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Type': - if (\in_array($constraint->type, ['double', 'float', 'numeric', 'real'])) { - return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); - } - break; - } - - return null; - } - - /** - * Iterates over the constraints of a property, executes a constraints on - * them and returns the best guess. - * - * @param \Closure $closure The closure that returns a guess - * for a given constraint - * @param mixed $defaultValue The default value assumed if no other value - * can be guessed - * - * @return Guess|null - */ - protected function guess(string $class, string $property, \Closure $closure, $defaultValue = null) - { - $guesses = []; - $classMetadata = $this->metadataFactory->getMetadataFor($class); - - if ($classMetadata instanceof ClassMetadataInterface && $classMetadata->hasPropertyMetadata($property)) { - foreach ($classMetadata->getPropertyMetadata($property) as $memberMetadata) { - foreach ($memberMetadata->getConstraints() as $constraint) { - if ($guess = $closure($constraint)) { - $guesses[] = $guess; - } - } - } - } - - if (null !== $defaultValue) { - $guesses[] = new ValueGuess($defaultValue, Guess::LOW_CONFIDENCE); - } - - return Guess::getBestGuess($guesses); - } -} diff --git a/lib/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php b/lib/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php deleted file mode 100644 index d9342de6e..000000000 --- a/lib/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\Exception\ErrorMappingException; -use Symfony\Component\Form\FormInterface; - -/** - * @author Bernhard Schussek - */ -class MappingRule -{ - private $origin; - private $propertyPath; - private $targetPath; - - public function __construct(FormInterface $origin, string $propertyPath, string $targetPath) - { - $this->origin = $origin; - $this->propertyPath = $propertyPath; - $this->targetPath = $targetPath; - } - - /** - * @return FormInterface - */ - public function getOrigin() - { - return $this->origin; - } - - /** - * Matches a property path against the rule path. - * - * If the rule matches, the form mapped by the rule is returned. - * Otherwise this method returns false. - * - * @return FormInterface|null - */ - public function match(string $propertyPath) - { - return $propertyPath === $this->propertyPath ? $this->getTarget() : null; - } - - /** - * Matches a property path against a prefix of the rule path. - * - * @return bool - */ - public function isPrefix(string $propertyPath) - { - $length = \strlen($propertyPath); - $prefix = substr($this->propertyPath, 0, $length); - $next = $this->propertyPath[$length] ?? null; - - return $prefix === $propertyPath && ('[' === $next || '.' === $next); - } - - /** - * @return FormInterface - * - * @throws ErrorMappingException - */ - public function getTarget() - { - $childNames = explode('.', $this->targetPath); - $target = $this->origin; - - foreach ($childNames as $childName) { - if (!$target->has($childName)) { - throw new ErrorMappingException(sprintf('The child "%s" of "%s" mapped by the rule "%s" in "%s" does not exist.', $childName, $target->getName(), $this->targetPath, $this->origin->getName())); - } - $target = $target->get($childName); - } - - return $target; - } -} diff --git a/lib/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php b/lib/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php deleted file mode 100644 index 0efd168e3..000000000 --- a/lib/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\PropertyAccess\PropertyPath; - -/** - * @author Bernhard Schussek - */ -class RelativePath extends PropertyPath -{ - private $root; - - public function __construct(FormInterface $root, string $propertyPath) - { - parent::__construct($propertyPath); - - $this->root = $root; - } - - /** - * @return FormInterface - */ - public function getRoot() - { - return $this->root; - } -} diff --git a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php b/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php deleted file mode 100644 index 1fb1d1fb0..000000000 --- a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php +++ /dev/null @@ -1,343 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\FileUploadError; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormRendererInterface; -use Symfony\Component\Form\Util\InheritDataAwareIterator; -use Symfony\Component\PropertyAccess\PropertyPathBuilder; -use Symfony\Component\PropertyAccess\PropertyPathIterator; -use Symfony\Component\PropertyAccess\PropertyPathIteratorInterface; -use Symfony\Component\Validator\Constraints\File; -use Symfony\Component\Validator\ConstraintViolation; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class ViolationMapper implements ViolationMapperInterface -{ - private $formRenderer; - private $translator; - private $allowNonSynchronized = false; - - public function __construct(FormRendererInterface $formRenderer = null, TranslatorInterface $translator = null) - { - $this->formRenderer = $formRenderer; - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false) - { - $this->allowNonSynchronized = $allowNonSynchronized; - - // The scope is the currently found most specific form that - // an error should be mapped to. After setting the scope, the - // mapper will try to continue to find more specific matches in - // the children of scope. If it cannot, the error will be - // mapped to this scope. - $scope = null; - - $violationPath = null; - $relativePath = null; - $match = false; - - // Don't create a ViolationPath instance for empty property paths - if ('' !== $violation->getPropertyPath()) { - $violationPath = new ViolationPath($violation->getPropertyPath()); - $relativePath = $this->reconstructPath($violationPath, $form); - } - - // This case happens if the violation path is empty and thus - // the violation should be mapped to the root form - if (null === $violationPath) { - $scope = $form; - } - - // In general, mapping happens from the root form to the leaf forms - // First, the rules of the root form are applied to determine - // the subsequent descendant. The rules of this descendant are then - // applied to find the next and so on, until we have found the - // most specific form that matches the violation. - - // If any of the forms found in this process is not synchronized, - // mapping is aborted. Non-synchronized forms could not reverse - // transform the value entered by the user, thus any further violations - // caused by the (invalid) reverse transformed value should be - // ignored. - - if (null !== $relativePath) { - // Set the scope to the root of the relative path - // This root will usually be $form. If the path contains - // an unmapped form though, the last unmapped form found - // will be the root of the path. - $scope = $relativePath->getRoot(); - $it = new PropertyPathIterator($relativePath); - - while ($this->acceptsErrors($scope) && null !== ($child = $this->matchChild($scope, $it))) { - $scope = $child; - $it->next(); - $match = true; - } - } - - // This case happens if an error happened in the data under a - // form inheriting its parent data that does not match any of the - // children of that form. - if (null !== $violationPath && !$match) { - // If we could not map the error to anything more specific - // than the root element, map it to the innermost directly - // mapped form of the violation path - // e.g. "children[foo].children[bar].data.baz" - // Here the innermost directly mapped child is "bar" - - $scope = $form; - $it = new ViolationPathIterator($violationPath); - - // Note: acceptsErrors() will always return true for forms inheriting - // their parent data, because these forms can never be non-synchronized - // (they don't do any data transformation on their own) - while ($this->acceptsErrors($scope) && $it->valid() && $it->mapsForm()) { - if (!$scope->has($it->current())) { - // Break if we find a reference to a non-existing child - break; - } - - $scope = $scope->get($it->current()); - $it->next(); - } - } - - // Follow dot rules until we have the final target - $mapping = $scope->getConfig()->getOption('error_mapping'); - - while ($this->acceptsErrors($scope) && isset($mapping['.'])) { - $dotRule = new MappingRule($scope, '.', $mapping['.']); - $scope = $dotRule->getTarget(); - $mapping = $scope->getConfig()->getOption('error_mapping'); - } - - // Only add the error if the form is synchronized - if ($this->acceptsErrors($scope)) { - if ($violation->getConstraint() instanceof File && (string) \UPLOAD_ERR_INI_SIZE === $violation->getCode()) { - $errorsTarget = $scope; - - while (null !== $errorsTarget->getParent() && $errorsTarget->getConfig()->getErrorBubbling()) { - $errorsTarget = $errorsTarget->getParent(); - } - - $errors = $errorsTarget->getErrors(); - $errorsTarget->clearErrors(); - - foreach ($errors as $error) { - if (!$error instanceof FileUploadError) { - $errorsTarget->addError($error); - } - } - } - - $message = $violation->getMessage(); - $messageTemplate = $violation->getMessageTemplate(); - - if (false !== strpos($message, '{{ label }}') || false !== strpos($messageTemplate, '{{ label }}')) { - $form = $scope; - - do { - $labelFormat = $form->getConfig()->getOption('label_format'); - } while (null === $labelFormat && null !== $form = $form->getParent()); - - if (null !== $labelFormat) { - $label = str_replace( - [ - '%name%', - '%id%', - ], - [ - $scope->getName(), - (string) $scope->getPropertyPath(), - ], - $labelFormat - ); - } else { - $label = $scope->getConfig()->getOption('label'); - } - - if (false !== $label) { - if (null === $label && null !== $this->formRenderer) { - $label = $this->formRenderer->humanize($scope->getName()); - } elseif (null === $label) { - $label = $scope->getName(); - } - - if (null !== $this->translator) { - $form = $scope; - $translationParameters[] = $form->getConfig()->getOption('label_translation_parameters', []); - - do { - $translationDomain = $form->getConfig()->getOption('translation_domain'); - array_unshift( - $translationParameters, - $form->getConfig()->getOption('label_translation_parameters', []) - ); - } while (null === $translationDomain && null !== $form = $form->getParent()); - - $translationParameters = array_merge([], ...$translationParameters); - - $label = $this->translator->trans( - $label, - $translationParameters, - $translationDomain - ); - } - - $message = str_replace('{{ label }}', $label, $message); - $messageTemplate = str_replace('{{ label }}', $label, $messageTemplate); - } - } - - $scope->addError(new FormError( - $message, - $messageTemplate, - $violation->getParameters(), - $violation->getPlural(), - $violation - )); - } - } - - /** - * Tries to match the beginning of the property path at the - * current position against the children of the scope. - * - * If a matching child is found, it is returned. Otherwise - * null is returned. - */ - private function matchChild(FormInterface $form, PropertyPathIteratorInterface $it): ?FormInterface - { - $target = null; - $chunk = ''; - $foundAtIndex = null; - - // Construct mapping rules for the given form - $rules = []; - - foreach ($form->getConfig()->getOption('error_mapping') as $propertyPath => $targetPath) { - // Dot rules are considered at the very end - if ('.' !== $propertyPath) { - $rules[] = new MappingRule($form, $propertyPath, $targetPath); - } - } - - $children = iterator_to_array(new \RecursiveIteratorIterator(new InheritDataAwareIterator($form)), false); - - while ($it->valid()) { - if ($it->isIndex()) { - $chunk .= '['.$it->current().']'; - } else { - $chunk .= ('' === $chunk ? '' : '.').$it->current(); - } - - // Test mapping rules as long as we have any - foreach ($rules as $key => $rule) { - /* @var MappingRule $rule */ - - // Mapping rule matches completely, terminate. - if (null !== ($form = $rule->match($chunk))) { - return $form; - } - - // Keep only rules that have $chunk as prefix - if (!$rule->isPrefix($chunk)) { - unset($rules[$key]); - } - } - - /** @var FormInterface $child */ - foreach ($children as $i => $child) { - $childPath = (string) $child->getPropertyPath(); - if ($childPath === $chunk) { - $target = $child; - $foundAtIndex = $it->key(); - } elseif (str_starts_with($childPath, $chunk)) { - continue; - } - - unset($children[$i]); - } - - $it->next(); - } - - if (null !== $foundAtIndex) { - $it->seek($foundAtIndex); - } - - return $target; - } - - /** - * Reconstructs a property path from a violation path and a form tree. - */ - private function reconstructPath(ViolationPath $violationPath, FormInterface $origin): ?RelativePath - { - $propertyPathBuilder = new PropertyPathBuilder($violationPath); - $it = $violationPath->getIterator(); - $scope = $origin; - - // Remember the current index in the builder - $i = 0; - - // Expand elements that map to a form (like "children[address]") - for ($it->rewind(); $it->valid() && $it->mapsForm(); $it->next()) { - if (!$scope->has($it->current())) { - // Scope relates to a form that does not exist - // Bail out - break; - } - - // Process child form - $scope = $scope->get($it->current()); - - if ($scope->getConfig()->getInheritData()) { - // Form inherits its parent data - // Cut the piece out of the property path and proceed - $propertyPathBuilder->remove($i); - } else { - /* @var \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath */ - $propertyPath = $scope->getPropertyPath(); - - if (null === $propertyPath) { - // Property path of a mapped form is null - // Should not happen, bail out - break; - } - - $propertyPathBuilder->replace($i, 1, $propertyPath); - $i += $propertyPath->getLength(); - } - } - - $finalPath = $propertyPathBuilder->getPropertyPath(); - - return null !== $finalPath ? new RelativePath($origin, $finalPath) : null; - } - - private function acceptsErrors(FormInterface $form): bool - { - return $this->allowNonSynchronized || $form->isSynchronized(); - } -} diff --git a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php b/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php deleted file mode 100644 index 57ed1c84c..000000000 --- a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Validator\ConstraintViolation; - -/** - * @author Bernhard Schussek - */ -interface ViolationMapperInterface -{ - /** - * Maps a constraint violation to a form in the form tree under - * the given form. - * - * @param bool $allowNonSynchronized Whether to allow mapping to non-synchronized forms - */ - public function mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false); -} diff --git a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php b/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php deleted file mode 100644 index 625c0b99f..000000000 --- a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php +++ /dev/null @@ -1,256 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\Exception\OutOfBoundsException; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class ViolationPath implements \IteratorAggregate, PropertyPathInterface -{ - /** - * @var list - */ - private $elements = []; - - /** - * @var array - */ - private $isIndex = []; - - /** - * @var array - */ - private $mapsForm = []; - - /** - * @var string - */ - private $pathAsString = ''; - - /** - * @var int - */ - private $length = 0; - - /** - * Creates a new violation path from a string. - * - * @param string $violationPath The property path of a {@link \Symfony\Component\Validator\ConstraintViolation} object - */ - public function __construct(string $violationPath) - { - $path = new PropertyPath($violationPath); - $elements = $path->getElements(); - $data = false; - - for ($i = 0, $l = \count($elements); $i < $l; ++$i) { - if (!$data) { - // The element "data" has not yet been passed - if ('children' === $elements[$i] && $path->isProperty($i)) { - // Skip element "children" - ++$i; - - // Next element must exist and must be an index - // Otherwise consider this the end of the path - if ($i >= $l || !$path->isIndex($i)) { - break; - } - - // All the following index items (regardless if .children is - // explicitly used) are children and grand-children - for (; $i < $l && $path->isIndex($i); ++$i) { - $this->elements[] = $elements[$i]; - $this->isIndex[] = true; - $this->mapsForm[] = true; - } - - // Rewind the pointer as the last element above didn't match - // (even if the pointer was moved forward) - --$i; - } elseif ('data' === $elements[$i] && $path->isProperty($i)) { - // Skip element "data" - ++$i; - - // End of path - if ($i >= $l) { - break; - } - - $this->elements[] = $elements[$i]; - $this->isIndex[] = $path->isIndex($i); - $this->mapsForm[] = false; - $data = true; - } else { - // Neither "children" nor "data" property found - // Consider this the end of the path - break; - } - } else { - // Already after the "data" element - // Pick everything as is - $this->elements[] = $elements[$i]; - $this->isIndex[] = $path->isIndex($i); - $this->mapsForm[] = false; - } - } - - $this->length = \count($this->elements); - - $this->buildString(); - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return $this->pathAsString; - } - - /** - * {@inheritdoc} - */ - public function getLength() - { - return $this->length; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - if ($this->length <= 1) { - return null; - } - - $parent = clone $this; - - --$parent->length; - array_pop($parent->elements); - array_pop($parent->isIndex); - array_pop($parent->mapsForm); - - $parent->buildString(); - - return $parent; - } - - /** - * {@inheritdoc} - */ - public function getElements() - { - return $this->elements; - } - - /** - * {@inheritdoc} - */ - public function getElement(int $index) - { - if (!isset($this->elements[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return $this->elements[$index]; - } - - /** - * {@inheritdoc} - */ - public function isProperty(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return !$this->isIndex[$index]; - } - - /** - * {@inheritdoc} - */ - public function isIndex(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return $this->isIndex[$index]; - } - - /** - * Returns whether an element maps directly to a form. - * - * Consider the following violation path: - * - * children[address].children[office].data.street - * - * In this example, "address" and "office" map to forms, while - * "street does not. - * - * @return bool - * - * @throws OutOfBoundsException if the offset is invalid - */ - public function mapsForm(int $index) - { - if (!isset($this->mapsForm[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return $this->mapsForm[$index]; - } - - /** - * Returns a new iterator for this path. - * - * @return ViolationPathIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new ViolationPathIterator($this); - } - - /** - * Builds the string representation from the elements. - */ - private function buildString() - { - $this->pathAsString = ''; - $data = false; - - foreach ($this->elements as $index => $element) { - if ($this->mapsForm[$index]) { - $this->pathAsString .= ".children[$element]"; - } elseif (!$data) { - $this->pathAsString .= '.data'.($this->isIndex[$index] ? "[$element]" : ".$element"); - $data = true; - } else { - $this->pathAsString .= $this->isIndex[$index] ? "[$element]" : ".$element"; - } - } - - if ('' !== $this->pathAsString) { - // remove leading dot - $this->pathAsString = substr($this->pathAsString, 1); - } - } -} diff --git a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php b/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php deleted file mode 100644 index 50baa4533..000000000 --- a/lib/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\PropertyAccess\PropertyPathIterator; - -/** - * @author Bernhard Schussek - */ -class ViolationPathIterator extends PropertyPathIterator -{ - public function __construct(ViolationPath $violationPath) - { - parent::__construct($violationPath); - } - - public function mapsForm() - { - return $this->path->mapsForm($this->key()); - } -} diff --git a/lib/symfony/form/FileUploadError.php b/lib/symfony/form/FileUploadError.php deleted file mode 100644 index 20142b203..000000000 --- a/lib/symfony/form/FileUploadError.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @internal - */ -class FileUploadError extends FormError -{ -} diff --git a/lib/symfony/form/Form.php b/lib/symfony/form/Form.php deleted file mode 100644 index 0c36032f1..000000000 --- a/lib/symfony/form/Form.php +++ /dev/null @@ -1,1194 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Event\PostSetDataEvent; -use Symfony\Component\Form\Event\PostSubmitEvent; -use Symfony\Component\Form\Event\PreSetDataEvent; -use Symfony\Component\Form\Event\PreSubmitEvent; -use Symfony\Component\Form\Event\SubmitEvent; -use Symfony\Component\Form\Exception\AlreadySubmittedException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Exception\OutOfBoundsException; -use Symfony\Component\Form\Exception\RuntimeException; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Extension\Core\Type\TextType; -use Symfony\Component\Form\Util\FormUtil; -use Symfony\Component\Form\Util\InheritDataAwareIterator; -use Symfony\Component\Form\Util\OrderedHashMap; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Form represents a form. - * - * To implement your own form fields, you need to have a thorough understanding - * of the data flow within a form. A form stores its data in three different - * representations: - * - * (1) the "model" format required by the form's object - * (2) the "normalized" format for internal processing - * (3) the "view" format used for display simple fields - * or map children model data for compound fields - * - * A date field, for example, may store a date as "Y-m-d" string (1) in the - * object. To facilitate processing in the field, this value is normalized - * to a DateTime object (2). In the HTML representation of your form, a - * localized string (3) may be presented to and modified by the user, or it could be an array of values - * to be mapped to choices fields. - * - * In most cases, format (1) and format (2) will be the same. For example, - * a checkbox field uses a Boolean value for both internal processing and - * storage in the object. In these cases you need to set a view transformer - * to convert between formats (2) and (3). You can do this by calling - * addViewTransformer(). - * - * In some cases though it makes sense to make format (1) configurable. To - * demonstrate this, let's extend our above date field to store the value - * either as "Y-m-d" string or as timestamp. Internally we still want to - * use a DateTime object for processing. To convert the data from string/integer - * to DateTime you can set a model transformer by calling - * addModelTransformer(). The normalized data is then converted to the displayed - * data as described before. - * - * The conversions (1) -> (2) -> (3) use the transform methods of the transformers. - * The conversions (3) -> (2) -> (1) use the reverseTransform methods of the transformers. - * - * @author Fabien Potencier - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterface -{ - /** - * @var FormConfigInterface - */ - private $config; - - /** - * @var FormInterface|null - */ - private $parent; - - /** - * A map of FormInterface instances. - * - * @var OrderedHashMap - */ - private $children; - - /** - * @var FormError[] - */ - private $errors = []; - - /** - * @var bool - */ - private $submitted = false; - - /** - * The button that was used to submit the form. - * - * @var FormInterface|ClickableInterface|null - */ - private $clickedButton; - - /** - * @var mixed - */ - private $modelData; - - /** - * @var mixed - */ - private $normData; - - /** - * @var mixed - */ - private $viewData; - - /** - * The submitted values that don't belong to any children. - * - * @var array - */ - private $extraData = []; - - /** - * The transformation failure generated during submission, if any. - * - * @var TransformationFailedException|null - */ - private $transformationFailure; - - /** - * Whether the form's data has been initialized. - * - * When the data is initialized with its default value, that default value - * is passed through the transformer chain in order to synchronize the - * model, normalized and view format for the first time. This is done - * lazily in order to save performance when {@link setData()} is called - * manually, making the initialization with the configured default value - * superfluous. - * - * @var bool - */ - private $defaultDataSet = false; - - /** - * Whether setData() is currently being called. - * - * @var bool - */ - private $lockSetData = false; - - /** - * @var string - */ - private $name = ''; - - /** - * Whether the form inherits its underlying data from its parent. - * - * @var bool - */ - private $inheritData; - - /** - * @var PropertyPathInterface|null - */ - private $propertyPath; - - /** - * @throws LogicException if a data mapper is not provided for a compound form - */ - public function __construct(FormConfigInterface $config) - { - // Compound forms always need a data mapper, otherwise calls to - // `setData` and `add` will not lead to the correct population of - // the child forms. - if ($config->getCompound() && !$config->getDataMapper()) { - throw new LogicException('Compound forms need a data mapper.'); - } - - // If the form inherits the data from its parent, it is not necessary - // to call setData() with the default data. - if ($this->inheritData = $config->getInheritData()) { - $this->defaultDataSet = true; - } - - $this->config = $config; - $this->children = new OrderedHashMap(); - $this->name = $config->getName(); - } - - public function __clone() - { - $this->children = clone $this->children; - - foreach ($this->children as $key => $child) { - $this->children[$key] = clone $child; - } - } - - /** - * {@inheritdoc} - */ - public function getConfig() - { - return $this->config; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getPropertyPath() - { - if ($this->propertyPath || $this->propertyPath = $this->config->getPropertyPath()) { - return $this->propertyPath; - } - - if ('' === $this->name) { - return null; - } - - $parent = $this->parent; - - while ($parent && $parent->getConfig()->getInheritData()) { - $parent = $parent->getParent(); - } - - if ($parent && null === $parent->getConfig()->getDataClass()) { - $this->propertyPath = new PropertyPath('['.$this->name.']'); - } else { - $this->propertyPath = new PropertyPath($this->name); - } - - return $this->propertyPath; - } - - /** - * {@inheritdoc} - */ - public function isRequired() - { - if (null === $this->parent || $this->parent->isRequired()) { - return $this->config->getRequired(); - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function isDisabled() - { - if (null === $this->parent || !$this->parent->isDisabled()) { - return $this->config->getDisabled(); - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function setParent(FormInterface $parent = null) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot set the parent of a submitted form.'); - } - - if (null !== $parent && '' === $this->name) { - throw new LogicException('A form with an empty name cannot have a parent form.'); - } - - $this->parent = $parent; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->parent; - } - - /** - * {@inheritdoc} - */ - public function getRoot() - { - return $this->parent ? $this->parent->getRoot() : $this; - } - - /** - * {@inheritdoc} - */ - public function isRoot() - { - return null === $this->parent; - } - - /** - * {@inheritdoc} - */ - public function setData($modelData) - { - // If the form is submitted while disabled, it is set to submitted, but the data is not - // changed. In such cases (i.e. when the form is not initialized yet) don't - // abort this method. - if ($this->submitted && $this->defaultDataSet) { - throw new AlreadySubmittedException('You cannot change the data of a submitted form.'); - } - - // If the form inherits its parent's data, disallow data setting to - // prevent merge conflicts - if ($this->inheritData) { - throw new RuntimeException('You cannot change the data of a form inheriting its parent data.'); - } - - // Don't allow modifications of the configured data if the data is locked - if ($this->config->getDataLocked() && $modelData !== $this->config->getData()) { - return $this; - } - - if (\is_object($modelData) && !$this->config->getByReference()) { - $modelData = clone $modelData; - } - - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call setData(). You should call setData() on the FormEvent object instead.'); - } - - $this->lockSetData = true; - $dispatcher = $this->config->getEventDispatcher(); - - // Hook to change content of the model data before transformation and mapping children - if ($dispatcher->hasListeners(FormEvents::PRE_SET_DATA)) { - $event = new PreSetDataEvent($this, $modelData); - $dispatcher->dispatch($event, FormEvents::PRE_SET_DATA); - $modelData = $event->getData(); - } - - // Treat data as strings unless a transformer exists - if (\is_scalar($modelData) && !$this->config->getViewTransformers() && !$this->config->getModelTransformers()) { - $modelData = (string) $modelData; - } - - // Synchronize representations - must not change the content! - // Transformation exceptions are not caught on initialization - $normData = $this->modelToNorm($modelData); - $viewData = $this->normToView($normData); - - // Validate if view data matches data class (unless empty) - if (!FormUtil::isEmpty($viewData)) { - $dataClass = $this->config->getDataClass(); - - if (null !== $dataClass && !$viewData instanceof $dataClass) { - $actualType = get_debug_type($viewData); - - throw new LogicException('The form\'s view data is expected to be a "'.$dataClass.'", but it is a "'.$actualType.'". You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms "'.$actualType.'" to an instance of "'.$dataClass.'".'); - } - } - - $this->modelData = $modelData; - $this->normData = $normData; - $this->viewData = $viewData; - $this->defaultDataSet = true; - $this->lockSetData = false; - - // Compound forms don't need to invoke this method if they don't have children - if (\count($this->children) > 0) { - // Update child forms from the data (unless their config data is locked) - $this->config->getDataMapper()->mapDataToForms($viewData, new \RecursiveIteratorIterator(new InheritDataAwareIterator($this->children))); - } - - if ($dispatcher->hasListeners(FormEvents::POST_SET_DATA)) { - $event = new PostSetDataEvent($this, $modelData); - $dispatcher->dispatch($event, FormEvents::POST_SET_DATA); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getData() - { - if ($this->inheritData) { - if (!$this->parent) { - throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); - } - - return $this->parent->getData(); - } - - if (!$this->defaultDataSet) { - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call getData() if the form data has not already been set. You should call getData() on the FormEvent object instead.'); - } - - $this->setData($this->config->getData()); - } - - return $this->modelData; - } - - /** - * {@inheritdoc} - */ - public function getNormData() - { - if ($this->inheritData) { - if (!$this->parent) { - throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); - } - - return $this->parent->getNormData(); - } - - if (!$this->defaultDataSet) { - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call getNormData() if the form data has not already been set.'); - } - - $this->setData($this->config->getData()); - } - - return $this->normData; - } - - /** - * {@inheritdoc} - */ - public function getViewData() - { - if ($this->inheritData) { - if (!$this->parent) { - throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); - } - - return $this->parent->getViewData(); - } - - if (!$this->defaultDataSet) { - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call getViewData() if the form data has not already been set.'); - } - - $this->setData($this->config->getData()); - } - - return $this->viewData; - } - - /** - * {@inheritdoc} - */ - public function getExtraData() - { - return $this->extraData; - } - - /** - * {@inheritdoc} - */ - public function initialize() - { - if (null !== $this->parent) { - throw new RuntimeException('Only root forms should be initialized.'); - } - - // Guarantee that the *_SET_DATA events have been triggered once the - // form is initialized. This makes sure that dynamically added or - // removed fields are already visible after initialization. - if (!$this->defaultDataSet) { - $this->setData($this->config->getData()); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function handleRequest($request = null) - { - $this->config->getRequestHandler()->handleRequest($this, $request); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function submit($submittedData, bool $clearMissing = true) - { - if ($this->submitted) { - throw new AlreadySubmittedException('A form can only be submitted once.'); - } - - // Initialize errors in the very beginning so we're sure - // they are collectable during submission only - $this->errors = []; - - // Obviously, a disabled form should not change its data upon submission. - if ($this->isDisabled()) { - $this->submitted = true; - - return $this; - } - - // The data must be initialized if it was not initialized yet. - // This is necessary to guarantee that the *_SET_DATA listeners - // are always invoked before submit() takes place. - if (!$this->defaultDataSet) { - $this->setData($this->config->getData()); - } - - // Treat false as NULL to support binding false to checkboxes. - // Don't convert NULL to a string here in order to determine later - // whether an empty value has been submitted or whether no value has - // been submitted at all. This is important for processing checkboxes - // and radio buttons with empty values. - if (false === $submittedData) { - $submittedData = null; - } elseif (\is_scalar($submittedData)) { - $submittedData = (string) $submittedData; - } elseif ($this->config->getRequestHandler()->isFileUpload($submittedData)) { - if (!$this->config->getOption('allow_file_upload')) { - $submittedData = null; - $this->transformationFailure = new TransformationFailedException('Submitted data was expected to be text or number, file upload given.'); - } - } elseif (\is_array($submittedData) && !$this->config->getCompound() && !$this->config->getOption('multiple', false)) { - $submittedData = null; - $this->transformationFailure = new TransformationFailedException('Submitted data was expected to be text or number, array given.'); - } - - $dispatcher = $this->config->getEventDispatcher(); - - $modelData = null; - $normData = null; - $viewData = null; - - try { - if (null !== $this->transformationFailure) { - throw $this->transformationFailure; - } - - // Hook to change content of the data submitted by the browser - if ($dispatcher->hasListeners(FormEvents::PRE_SUBMIT)) { - $event = new PreSubmitEvent($this, $submittedData); - $dispatcher->dispatch($event, FormEvents::PRE_SUBMIT); - $submittedData = $event->getData(); - } - - // Check whether the form is compound. - // This check is preferable over checking the number of children, - // since forms without children may also be compound. - // (think of empty collection forms) - if ($this->config->getCompound()) { - if (null === $submittedData) { - $submittedData = []; - } - - if (!\is_array($submittedData)) { - throw new TransformationFailedException('Compound forms expect an array or NULL on submission.'); - } - - foreach ($this->children as $name => $child) { - $isSubmitted = \array_key_exists($name, $submittedData); - - if ($isSubmitted || $clearMissing) { - $child->submit($isSubmitted ? $submittedData[$name] : null, $clearMissing); - unset($submittedData[$name]); - - if (null !== $this->clickedButton) { - continue; - } - - if ($child instanceof ClickableInterface && $child->isClicked()) { - $this->clickedButton = $child; - - continue; - } - - if (method_exists($child, 'getClickedButton') && null !== $child->getClickedButton()) { - $this->clickedButton = $child->getClickedButton(); - } - } - } - - $this->extraData = $submittedData; - } - - // Forms that inherit their parents' data also are not processed, - // because then it would be too difficult to merge the changes in - // the child and the parent form. Instead, the parent form also takes - // changes in the grandchildren (i.e. children of the form that inherits - // its parent's data) into account. - // (see InheritDataAwareIterator below) - if (!$this->inheritData) { - // If the form is compound, the view data is merged with the data - // of the children using the data mapper. - // If the form is not compound, the view data is assigned to the submitted data. - $viewData = $this->config->getCompound() ? $this->viewData : $submittedData; - - if (FormUtil::isEmpty($viewData)) { - $emptyData = $this->config->getEmptyData(); - - if ($emptyData instanceof \Closure) { - $emptyData = $emptyData($this, $viewData); - } - - $viewData = $emptyData; - } - - // Merge form data from children into existing view data - // It is not necessary to invoke this method if the form has no children, - // even if it is compound. - if (\count($this->children) > 0) { - // Use InheritDataAwareIterator to process children of - // descendants that inherit this form's data. - // These descendants will not be submitted normally (see the check - // for $this->config->getInheritData() above) - $this->config->getDataMapper()->mapFormsToData( - new \RecursiveIteratorIterator(new InheritDataAwareIterator($this->children)), - $viewData - ); - } - - // Normalize data to unified representation - $normData = $this->viewToNorm($viewData); - - // Hook to change content of the data in the normalized - // representation - if ($dispatcher->hasListeners(FormEvents::SUBMIT)) { - $event = new SubmitEvent($this, $normData); - $dispatcher->dispatch($event, FormEvents::SUBMIT); - $normData = $event->getData(); - } - - // Synchronize representations - must not change the content! - $modelData = $this->normToModel($normData); - $viewData = $this->normToView($normData); - } - } catch (TransformationFailedException $e) { - $this->transformationFailure = $e; - - // If $viewData was not yet set, set it to $submittedData so that - // the erroneous data is accessible on the form. - // Forms that inherit data never set any data, because the getters - // forward to the parent form's getters anyway. - if (null === $viewData && !$this->inheritData) { - $viewData = $submittedData; - } - } - - $this->submitted = true; - $this->modelData = $modelData; - $this->normData = $normData; - $this->viewData = $viewData; - - if ($dispatcher->hasListeners(FormEvents::POST_SUBMIT)) { - $event = new PostSubmitEvent($this, $viewData); - $dispatcher->dispatch($event, FormEvents::POST_SUBMIT); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addError(FormError $error) - { - if (null === $error->getOrigin()) { - $error->setOrigin($this); - } - - if ($this->parent && $this->config->getErrorBubbling()) { - $this->parent->addError($error); - } else { - $this->errors[] = $error; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function isSubmitted() - { - return $this->submitted; - } - - /** - * {@inheritdoc} - */ - public function isSynchronized() - { - return null === $this->transformationFailure; - } - - /** - * {@inheritdoc} - */ - public function getTransformationFailure() - { - return $this->transformationFailure; - } - - /** - * {@inheritdoc} - */ - public function isEmpty() - { - foreach ($this->children as $child) { - if (!$child->isEmpty()) { - return false; - } - } - - if (!method_exists($this->config, 'getIsEmptyCallback')) { - trigger_deprecation('symfony/form', '5.1', 'Not implementing the "%s::getIsEmptyCallback()" method in "%s" is deprecated.', FormConfigInterface::class, \get_class($this->config)); - - $isEmptyCallback = null; - } else { - $isEmptyCallback = $this->config->getIsEmptyCallback(); - } - - if (null !== $isEmptyCallback) { - return $isEmptyCallback($this->modelData); - } - - return FormUtil::isEmpty($this->modelData) || - // arrays, countables - ((\is_array($this->modelData) || $this->modelData instanceof \Countable) && 0 === \count($this->modelData)) || - // traversables that are not countable - ($this->modelData instanceof \Traversable && 0 === iterator_count($this->modelData)); - } - - /** - * {@inheritdoc} - */ - public function isValid() - { - if (!$this->submitted) { - throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().'); - } - - if ($this->isDisabled()) { - return true; - } - - return 0 === \count($this->getErrors(true)); - } - - /** - * Returns the button that was used to submit the form. - * - * @return FormInterface|ClickableInterface|null - */ - public function getClickedButton() - { - if ($this->clickedButton) { - return $this->clickedButton; - } - - return $this->parent && method_exists($this->parent, 'getClickedButton') ? $this->parent->getClickedButton() : null; - } - - /** - * {@inheritdoc} - */ - public function getErrors(bool $deep = false, bool $flatten = true) - { - $errors = $this->errors; - - // Copy the errors of nested forms to the $errors array - if ($deep) { - foreach ($this as $child) { - /** @var FormInterface $child */ - if ($child->isSubmitted() && $child->isValid()) { - continue; - } - - $iterator = $child->getErrors(true, $flatten); - - if (0 === \count($iterator)) { - continue; - } - - if ($flatten) { - foreach ($iterator as $error) { - $errors[] = $error; - } - } else { - $errors[] = $iterator; - } - } - } - - return new FormErrorIterator($this, $errors); - } - - /** - * {@inheritdoc} - */ - public function clearErrors(bool $deep = false): self - { - $this->errors = []; - - if ($deep) { - // Clear errors from children - foreach ($this as $child) { - if ($child instanceof ClearableErrorsInterface) { - $child->clearErrors(true); - } - } - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function all() - { - return iterator_to_array($this->children); - } - - /** - * {@inheritdoc} - */ - public function add($child, string $type = null, array $options = []) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot add children to a submitted form.'); - } - - if (!$this->config->getCompound()) { - throw new LogicException('You cannot add children to a simple form. Maybe you should set the option "compound" to true?'); - } - - if (!$child instanceof FormInterface) { - if (!\is_string($child) && !\is_int($child)) { - throw new UnexpectedTypeException($child, 'string or Symfony\Component\Form\FormInterface'); - } - - $child = (string) $child; - - if (null !== $type && !\is_string($type)) { - throw new UnexpectedTypeException($type, 'string or null'); - } - - // Never initialize child forms automatically - $options['auto_initialize'] = false; - - if (null === $type && null === $this->config->getDataClass()) { - $type = TextType::class; - } - - if (null === $type) { - $child = $this->config->getFormFactory()->createForProperty($this->config->getDataClass(), $child, null, $options); - } else { - $child = $this->config->getFormFactory()->createNamed($child, $type, null, $options); - } - } elseif ($child->getConfig()->getAutoInitialize()) { - throw new RuntimeException(sprintf('Automatic initialization is only supported on root forms. You should set the "auto_initialize" option to false on the field "%s".', $child->getName())); - } - - $this->children[$child->getName()] = $child; - - $child->setParent($this); - - // If setData() is currently being called, there is no need to call - // mapDataToForms() here, as mapDataToForms() is called at the end - // of setData() anyway. Not doing this check leads to an endless - // recursion when initializing the form lazily and an event listener - // (such as ResizeFormListener) adds fields depending on the data: - // - // * setData() is called, the form is not initialized yet - // * add() is called by the listener (setData() is not complete, so - // the form is still not initialized) - // * getViewData() is called - // * setData() is called since the form is not initialized yet - // * ... endless recursion ... - // - // Also skip data mapping if setData() has not been called yet. - // setData() will be called upon form initialization and data mapping - // will take place by then. - if (!$this->lockSetData && $this->defaultDataSet && !$this->inheritData) { - $viewData = $this->getViewData(); - $this->config->getDataMapper()->mapDataToForms( - $viewData, - new \RecursiveIteratorIterator(new InheritDataAwareIterator(new \ArrayIterator([$child->getName() => $child]))) - ); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot remove children from a submitted form.'); - } - - if (isset($this->children[$name])) { - if (!$this->children[$name]->isSubmitted()) { - $this->children[$name]->setParent(null); - } - - unset($this->children[$name]); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return isset($this->children[$name]); - } - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - if (isset($this->children[$name])) { - return $this->children[$name]; - } - - throw new OutOfBoundsException(sprintf('Child "%s" does not exist.', $name)); - } - - /** - * Returns whether a child with the given name exists (implements the \ArrayAccess interface). - * - * @param string $name The name of the child - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($name) - { - return $this->has($name); - } - - /** - * Returns the child with the given name (implements the \ArrayAccess interface). - * - * @param string $name The name of the child - * - * @return FormInterface - * - * @throws OutOfBoundsException if the named child does not exist - */ - #[\ReturnTypeWillChange] - public function offsetGet($name) - { - return $this->get($name); - } - - /** - * Adds a child to the form (implements the \ArrayAccess interface). - * - * @param string $name Ignored. The name of the child is used - * @param FormInterface $child The child to be added - * - * @return void - * - * @throws AlreadySubmittedException if the form has already been submitted - * @throws LogicException when trying to add a child to a non-compound form - * - * @see self::add() - */ - #[\ReturnTypeWillChange] - public function offsetSet($name, $child) - { - $this->add($child); - } - - /** - * Removes the child with the given name from the form (implements the \ArrayAccess interface). - * - * @param string $name The name of the child to remove - * - * @return void - * - * @throws AlreadySubmittedException if the form has already been submitted - */ - #[\ReturnTypeWillChange] - public function offsetUnset($name) - { - $this->remove($name); - } - - /** - * Returns the iterator for this group. - * - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return $this->children; - } - - /** - * Returns the number of form children (implements the \Countable interface). - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->children); - } - - /** - * {@inheritdoc} - */ - public function createView(FormView $parent = null) - { - if (null === $parent && $this->parent) { - $parent = $this->parent->createView(); - } - - $type = $this->config->getType(); - $options = $this->config->getOptions(); - - // The methods createView(), buildView() and finishView() are called - // explicitly here in order to be able to override either of them - // in a custom resolved form type. - $view = $type->createView($this, $parent); - - $type->buildView($view, $this, $options); - - foreach ($this->children as $name => $child) { - $view->children[$name] = $child->createView($view); - } - - $this->sort($view->children); - - $type->finishView($view, $this, $options); - - return $view; - } - - /** - * Sorts view fields based on their priority value. - */ - private function sort(array &$children): void - { - $c = []; - $i = 0; - $needsSorting = false; - foreach ($children as $name => $child) { - $c[$name] = ['p' => $child->vars['priority'] ?? 0, 'i' => $i++]; - - if (0 !== $c[$name]['p']) { - $needsSorting = true; - } - } - - if (!$needsSorting) { - return; - } - - uksort($children, static function ($a, $b) use ($c): int { - return [$c[$b]['p'], $c[$a]['i']] <=> [$c[$a]['p'], $c[$b]['i']]; - }); - } - - /** - * Normalizes the underlying data if a model transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the underlying data cannot be transformed to "normalized" format - */ - private function modelToNorm($value) - { - try { - foreach ($this->config->getModelTransformers() as $transformer) { - $value = $transformer->transform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to transform data for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } - - /** - * Reverse transforms a value if a model transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the value cannot be transformed to "model" format - */ - private function normToModel($value) - { - try { - $transformers = $this->config->getModelTransformers(); - - for ($i = \count($transformers) - 1; $i >= 0; --$i) { - $value = $transformers[$i]->reverseTransform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } - - /** - * Transforms the value if a view transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the normalized value cannot be transformed to "view" format - */ - private function normToView($value) - { - // Scalar values should be converted to strings to - // facilitate differentiation between empty ("") and zero (0). - // Only do this for simple forms, as the resulting value in - // compound forms is passed to the data mapper and thus should - // not be converted to a string before. - if (!($transformers = $this->config->getViewTransformers()) && !$this->config->getCompound()) { - return null === $value || \is_scalar($value) ? (string) $value : $value; - } - - try { - foreach ($transformers as $transformer) { - $value = $transformer->transform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to transform value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } - - /** - * Reverse transforms a value if a view transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the submitted value cannot be transformed to "normalized" format - */ - private function viewToNorm($value) - { - if (!$transformers = $this->config->getViewTransformers()) { - return '' === $value ? null : $value; - } - - try { - for ($i = \count($transformers) - 1; $i >= 0; --$i) { - $value = $transformers[$i]->reverseTransform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } -} diff --git a/lib/symfony/form/FormBuilder.php b/lib/symfony/form/FormBuilder.php deleted file mode 100644 index 37fca950a..000000000 --- a/lib/symfony/form/FormBuilder.php +++ /dev/null @@ -1,254 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Extension\Core\Type\TextType; - -/** - * A builder for creating {@link Form} instances. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormBuilderInterface -{ - /** - * The children of the form builder. - * - * @var FormBuilderInterface[] - */ - private $children = []; - - /** - * The data of children who haven't been converted to form builders yet. - * - * @var array - */ - private $unresolvedChildren = []; - - public function __construct(?string $name, ?string $dataClass, EventDispatcherInterface $dispatcher, FormFactoryInterface $factory, array $options = []) - { - parent::__construct($name, $dataClass, $dispatcher, $options); - - $this->setFormFactory($factory); - } - - /** - * {@inheritdoc} - */ - public function add($child, string $type = null, array $options = []) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if ($child instanceof FormBuilderInterface) { - $this->children[$child->getName()] = $child; - - // In case an unresolved child with the same name exists - unset($this->unresolvedChildren[$child->getName()]); - - return $this; - } - - if (!\is_string($child) && !\is_int($child)) { - throw new UnexpectedTypeException($child, 'string or Symfony\Component\Form\FormBuilderInterface'); - } - - if (null !== $type && !\is_string($type)) { - throw new UnexpectedTypeException($type, 'string or null'); - } - - // Add to "children" to maintain order - $this->children[$child] = null; - $this->unresolvedChildren[$child] = [$type, $options]; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function create($name, string $type = null, array $options = []) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if (null === $type && null === $this->getDataClass()) { - $type = TextType::class; - } - - if (null !== $type) { - return $this->getFormFactory()->createNamedBuilder($name, $type, null, $options); - } - - return $this->getFormFactory()->createBuilderForProperty($this->getDataClass(), $name, null, $options); - } - - /** - * {@inheritdoc} - */ - public function get($name) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if (isset($this->unresolvedChildren[$name])) { - return $this->resolveChild($name); - } - - if (isset($this->children[$name])) { - return $this->children[$name]; - } - - throw new InvalidArgumentException(sprintf('The child with the name "%s" does not exist.', $name)); - } - - /** - * {@inheritdoc} - */ - public function remove($name) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - unset($this->unresolvedChildren[$name], $this->children[$name]); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function has($name) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - return isset($this->unresolvedChildren[$name]) || isset($this->children[$name]); - } - - /** - * {@inheritdoc} - */ - public function all() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->resolveChildren(); - - return $this->children; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - return \count($this->children); - } - - /** - * {@inheritdoc} - */ - public function getFormConfig() - { - /** @var $config self */ - $config = parent::getFormConfig(); - - $config->children = []; - $config->unresolvedChildren = []; - - return $config; - } - - /** - * {@inheritdoc} - */ - public function getForm() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->resolveChildren(); - - $form = new Form($this->getFormConfig()); - - foreach ($this->children as $child) { - // Automatic initialization is only supported on root forms - $form->add($child->setAutoInitialize(false)->getForm()); - } - - if ($this->getAutoInitialize()) { - // Automatically initialize the form if it is configured so - $form->initialize(); - } - - return $form; - } - - /** - * {@inheritdoc} - * - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - return new \ArrayIterator($this->all()); - } - - /** - * Converts an unresolved child into a {@link FormBuilderInterface} instance. - */ - private function resolveChild(string $name): FormBuilderInterface - { - [$type, $options] = $this->unresolvedChildren[$name]; - - unset($this->unresolvedChildren[$name]); - - return $this->children[$name] = $this->create($name, $type, $options); - } - - /** - * Converts all unresolved children into {@link FormBuilder} instances. - */ - private function resolveChildren() - { - foreach ($this->unresolvedChildren as $name => $info) { - $this->children[$name] = $this->create($name, $info[0], $info[1]); - } - - $this->unresolvedChildren = []; - } -} diff --git a/lib/symfony/form/FormBuilderInterface.php b/lib/symfony/form/FormBuilderInterface.php deleted file mode 100644 index 52bf5b679..000000000 --- a/lib/symfony/form/FormBuilderInterface.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - * - * @extends \Traversable - */ -interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuilderInterface -{ - /** - * Adds a new field to this group. A field must have a unique name within - * the group. Otherwise the existing field is overwritten. - * - * If you add a nested group, this group should also be represented in the - * object hierarchy. - * - * @param string|FormBuilderInterface $child - * @param array $options - * - * @return static - */ - public function add($child, string $type = null, array $options = []); - - /** - * Creates a form builder. - * - * @param string $name The name of the form or the name of the property - * @param string|null $type The type of the form or null if name is a property - * @param array $options - * - * @return self - */ - public function create(string $name, string $type = null, array $options = []); - - /** - * Returns a child by name. - * - * @return self - * - * @throws Exception\InvalidArgumentException if the given child does not exist - */ - public function get(string $name); - - /** - * Removes the field with the given name. - * - * @return static - */ - public function remove(string $name); - - /** - * Returns whether a field with the given name exists. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns the children. - * - * @return array - */ - public function all(); - - /** - * Creates the form. - * - * @return FormInterface - */ - public function getForm(); -} diff --git a/lib/symfony/form/FormConfigBuilder.php b/lib/symfony/form/FormConfigBuilder.php deleted file mode 100644 index b511c2f13..000000000 --- a/lib/symfony/form/FormConfigBuilder.php +++ /dev/null @@ -1,811 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\EventDispatcher\ImmutableEventDispatcher; -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * A basic form configuration. - * - * @author Bernhard Schussek - */ -class FormConfigBuilder implements FormConfigBuilderInterface -{ - /** - * Caches a globally unique {@link NativeRequestHandler} instance. - * - * @var NativeRequestHandler - */ - private static $nativeRequestHandler; - - protected $locked = false; - private $dispatcher; - private $name; - - /** - * @var PropertyPathInterface|string|null - */ - private $propertyPath; - - private $mapped = true; - private $byReference = true; - private $inheritData = false; - private $compound = false; - - /** - * @var ResolvedFormTypeInterface - */ - private $type; - - private $viewTransformers = []; - private $modelTransformers = []; - - /** - * @var DataMapperInterface|null - */ - private $dataMapper; - - private $required = true; - private $disabled = false; - private $errorBubbling = false; - - /** - * @var mixed - */ - private $emptyData; - - private $attributes = []; - - /** - * @var mixed - */ - private $data; - - /** - * @var string|null - */ - private $dataClass; - - private $dataLocked = false; - - /** - * @var FormFactoryInterface|null - */ - private $formFactory; - - private $action = ''; - private $method = 'POST'; - - /** - * @var RequestHandlerInterface|null - */ - private $requestHandler; - - private $autoInitialize = false; - private $options; - private $isEmptyCallback; - - /** - * Creates an empty form configuration. - * - * @param string|null $name The form name - * @param string|null $dataClass The class of the form's data - * - * @throws InvalidArgumentException if the data class is not a valid class or if - * the name contains invalid characters - */ - public function __construct(?string $name, ?string $dataClass, EventDispatcherInterface $dispatcher, array $options = []) - { - self::validateName($name); - - if (null !== $dataClass && !class_exists($dataClass) && !interface_exists($dataClass, false)) { - throw new InvalidArgumentException(sprintf('Class "%s" not found. Is the "data_class" form option set correctly?', $dataClass)); - } - - $this->name = (string) $name; - $this->dataClass = $dataClass; - $this->dispatcher = $dispatcher; - $this->options = $options; - } - - /** - * {@inheritdoc} - */ - public function addEventListener(string $eventName, callable $listener, int $priority = 0) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dispatcher->addListener($eventName, $listener, $priority); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addEventSubscriber(EventSubscriberInterface $subscriber) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dispatcher->addSubscriber($subscriber); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if ($forcePrepend) { - array_unshift($this->viewTransformers, $viewTransformer); - } else { - $this->viewTransformers[] = $viewTransformer; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function resetViewTransformers() - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->viewTransformers = []; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if ($forceAppend) { - $this->modelTransformers[] = $modelTransformer; - } else { - array_unshift($this->modelTransformers, $modelTransformer); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function resetModelTransformers() - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->modelTransformers = []; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getEventDispatcher() - { - if ($this->locked && !$this->dispatcher instanceof ImmutableEventDispatcher) { - $this->dispatcher = new ImmutableEventDispatcher($this->dispatcher); - } - - return $this->dispatcher; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getPropertyPath() - { - return $this->propertyPath; - } - - /** - * {@inheritdoc} - */ - public function getMapped() - { - return $this->mapped; - } - - /** - * {@inheritdoc} - */ - public function getByReference() - { - return $this->byReference; - } - - /** - * {@inheritdoc} - */ - public function getInheritData() - { - return $this->inheritData; - } - - /** - * {@inheritdoc} - */ - public function getCompound() - { - return $this->compound; - } - - /** - * {@inheritdoc} - */ - public function getType() - { - return $this->type; - } - - /** - * {@inheritdoc} - */ - public function getViewTransformers() - { - return $this->viewTransformers; - } - - /** - * {@inheritdoc} - */ - public function getModelTransformers() - { - return $this->modelTransformers; - } - - /** - * {@inheritdoc} - */ - public function getDataMapper() - { - return $this->dataMapper; - } - - /** - * {@inheritdoc} - */ - public function getRequired() - { - return $this->required; - } - - /** - * {@inheritdoc} - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * {@inheritdoc} - */ - public function getErrorBubbling() - { - return $this->errorBubbling; - } - - /** - * {@inheritdoc} - */ - public function getEmptyData() - { - return $this->emptyData; - } - - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function hasAttribute(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * {@inheritdoc} - */ - public function getAttribute(string $name, $default = null) - { - return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function getData() - { - return $this->data; - } - - /** - * {@inheritdoc} - */ - public function getDataClass() - { - return $this->dataClass; - } - - /** - * {@inheritdoc} - */ - public function getDataLocked() - { - return $this->dataLocked; - } - - /** - * {@inheritdoc} - */ - public function getFormFactory() - { - if (!isset($this->formFactory)) { - throw new BadMethodCallException('The form factory must be set before retrieving it.'); - } - - return $this->formFactory; - } - - /** - * {@inheritdoc} - */ - public function getAction() - { - return $this->action; - } - - /** - * {@inheritdoc} - */ - public function getMethod() - { - return $this->method; - } - - /** - * {@inheritdoc} - */ - public function getRequestHandler() - { - if (null === $this->requestHandler) { - if (null === self::$nativeRequestHandler) { - self::$nativeRequestHandler = new NativeRequestHandler(); - } - $this->requestHandler = self::$nativeRequestHandler; - } - - return $this->requestHandler; - } - - /** - * {@inheritdoc} - */ - public function getAutoInitialize() - { - return $this->autoInitialize; - } - - /** - * {@inheritdoc} - */ - public function getOptions() - { - return $this->options; - } - - /** - * {@inheritdoc} - */ - public function hasOption(string $name) - { - return \array_key_exists($name, $this->options); - } - - /** - * {@inheritdoc} - */ - public function getOption(string $name, $default = null) - { - return \array_key_exists($name, $this->options) ? $this->options[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function getIsEmptyCallback(): ?callable - { - return $this->isEmptyCallback; - } - - /** - * {@inheritdoc} - */ - public function setAttribute(string $name, $value) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->attributes[$name] = $value; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAttributes(array $attributes) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->attributes = $attributes; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDataMapper(DataMapperInterface $dataMapper = null) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dataMapper = $dataMapper; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDisabled(bool $disabled) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->disabled = $disabled; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setEmptyData($emptyData) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->emptyData = $emptyData; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setErrorBubbling(bool $errorBubbling) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->errorBubbling = $errorBubbling; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setRequired(bool $required) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->required = $required; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setPropertyPath($propertyPath) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) { - $propertyPath = new PropertyPath($propertyPath); - } - - $this->propertyPath = $propertyPath; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setMapped(bool $mapped) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->mapped = $mapped; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setByReference(bool $byReference) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->byReference = $byReference; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setInheritData(bool $inheritData) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->inheritData = $inheritData; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setCompound(bool $compound) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->compound = $compound; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setType(ResolvedFormTypeInterface $type) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->type = $type; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setData($data) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->data = $data; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDataLocked(bool $locked) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dataLocked = $locked; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setFormFactory(FormFactoryInterface $formFactory) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->formFactory = $formFactory; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAction(string $action) - { - if ($this->locked) { - throw new BadMethodCallException('The config builder cannot be modified anymore.'); - } - - $this->action = $action; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setMethod(string $method) - { - if ($this->locked) { - throw new BadMethodCallException('The config builder cannot be modified anymore.'); - } - - $this->method = strtoupper($method); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setRequestHandler(RequestHandlerInterface $requestHandler) - { - if ($this->locked) { - throw new BadMethodCallException('The config builder cannot be modified anymore.'); - } - - $this->requestHandler = $requestHandler; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAutoInitialize(bool $initialize) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->autoInitialize = $initialize; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormConfig() - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - // This method should be idempotent, so clone the builder - $config = clone $this; - $config->locked = true; - - return $config; - } - - /** - * {@inheritdoc} - */ - public function setIsEmptyCallback(?callable $isEmptyCallback) - { - $this->isEmptyCallback = $isEmptyCallback; - - return $this; - } - - /** - * Validates whether the given variable is a valid form name. - * - * @throws InvalidArgumentException if the name contains invalid characters - * - * @internal - */ - final public static function validateName(?string $name) - { - if (!self::isValidName($name)) { - throw new InvalidArgumentException(sprintf('The name "%s" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").', $name)); - } - } - - /** - * Returns whether the given variable contains a valid form name. - * - * A name is accepted if it - * - * * is empty - * * starts with a letter, digit or underscore - * * contains only letters, digits, numbers, underscores ("_"), - * hyphens ("-") and colons (":") - */ - final public static function isValidName(?string $name): bool - { - return '' === $name || null === $name || preg_match('/^[a-zA-Z0-9_][a-zA-Z0-9_\-:]*$/D', $name); - } -} diff --git a/lib/symfony/form/FormConfigBuilderInterface.php b/lib/symfony/form/FormConfigBuilderInterface.php deleted file mode 100644 index 757fa2584..000000000 --- a/lib/symfony/form/FormConfigBuilderInterface.php +++ /dev/null @@ -1,254 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * @author Bernhard Schussek - * - * @method $this setIsEmptyCallback(callable|null $isEmptyCallback) Sets the callback that will be called to determine if the model data of the form is empty or not - not implementing it is deprecated since Symfony 5.1 - */ -interface FormConfigBuilderInterface extends FormConfigInterface -{ - /** - * Adds an event listener to an event on this form. - * - * @param int $priority The priority of the listener. Listeners - * with a higher priority are called before - * listeners with a lower priority. - * - * @return $this - */ - public function addEventListener(string $eventName, callable $listener, int $priority = 0); - - /** - * Adds an event subscriber for events on this form. - * - * @return $this - */ - public function addEventSubscriber(EventSubscriberInterface $subscriber); - - /** - * Appends / prepends a transformer to the view transformer chain. - * - * The transform method of the transformer is used to convert data from the - * normalized to the view format. - * The reverseTransform method of the transformer is used to convert from the - * view to the normalized format. - * - * @param bool $forcePrepend If set to true, prepend instead of appending - * - * @return $this - */ - public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false); - - /** - * Clears the view transformers. - * - * @return $this - */ - public function resetViewTransformers(); - - /** - * Prepends / appends a transformer to the normalization transformer chain. - * - * The transform method of the transformer is used to convert data from the - * model to the normalized format. - * The reverseTransform method of the transformer is used to convert from the - * normalized to the model format. - * - * @param bool $forceAppend If set to true, append instead of prepending - * - * @return $this - */ - public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false); - - /** - * Clears the normalization transformers. - * - * @return $this - */ - public function resetModelTransformers(); - - /** - * Sets the value for an attribute. - * - * @param mixed $value The value of the attribute - * - * @return $this - */ - public function setAttribute(string $name, $value); - - /** - * Sets the attributes. - * - * @return $this - */ - public function setAttributes(array $attributes); - - /** - * Sets the data mapper used by the form. - * - * @return $this - */ - public function setDataMapper(DataMapperInterface $dataMapper = null); - - /** - * Sets whether the form is disabled. - * - * @return $this - */ - public function setDisabled(bool $disabled); - - /** - * Sets the data used for the client data when no value is submitted. - * - * @param mixed $emptyData The empty data - * - * @return $this - */ - public function setEmptyData($emptyData); - - /** - * Sets whether errors bubble up to the parent. - * - * @return $this - */ - public function setErrorBubbling(bool $errorBubbling); - - /** - * Sets whether this field is required to be filled out when submitted. - * - * @return $this - */ - public function setRequired(bool $required); - - /** - * Sets the property path that the form should be mapped to. - * - * @param string|PropertyPathInterface|null $propertyPath The property path or null if the path should be set - * automatically based on the form's name - * - * @return $this - */ - public function setPropertyPath($propertyPath); - - /** - * Sets whether the form should be mapped to an element of its - * parent's data. - * - * @return $this - */ - public function setMapped(bool $mapped); - - /** - * Sets whether the form's data should be modified by reference. - * - * @return $this - */ - public function setByReference(bool $byReference); - - /** - * Sets whether the form should read and write the data of its parent. - * - * @return $this - */ - public function setInheritData(bool $inheritData); - - /** - * Sets whether the form should be compound. - * - * @return $this - * - * @see FormConfigInterface::getCompound() - */ - public function setCompound(bool $compound); - - /** - * Sets the resolved type. - * - * @return $this - */ - public function setType(ResolvedFormTypeInterface $type); - - /** - * Sets the initial data of the form. - * - * @param mixed $data The data of the form in model format - * - * @return $this - */ - public function setData($data); - - /** - * Locks the form's data to the data passed in the configuration. - * - * A form with locked data is restricted to the data passed in - * this configuration. The data can only be modified then by - * submitting the form or using PRE_SET_DATA event. - * - * It means data passed to a factory method or mapped from the - * parent will be ignored. - * - * @return $this - */ - public function setDataLocked(bool $locked); - - /** - * Sets the form factory used for creating new forms. - */ - public function setFormFactory(FormFactoryInterface $formFactory); - - /** - * Sets the target URL of the form. - * - * @return $this - */ - public function setAction(string $action); - - /** - * Sets the HTTP method used by the form. - * - * @return $this - */ - public function setMethod(string $method); - - /** - * Sets the request handler used by the form. - * - * @return $this - */ - public function setRequestHandler(RequestHandlerInterface $requestHandler); - - /** - * Sets whether the form should be initialized automatically. - * - * Should be set to true only for root forms. - * - * @param bool $initialize True to initialize the form automatically, - * false to suppress automatic initialization. - * In the second case, you need to call - * {@link FormInterface::initialize()} manually. - * - * @return $this - */ - public function setAutoInitialize(bool $initialize); - - /** - * Builds and returns the form configuration. - * - * @return FormConfigInterface - */ - public function getFormConfig(); -} diff --git a/lib/symfony/form/FormConfigInterface.php b/lib/symfony/form/FormConfigInterface.php deleted file mode 100644 index e332feb1e..000000000 --- a/lib/symfony/form/FormConfigInterface.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * The configuration of a {@link Form} object. - * - * @author Bernhard Schussek - * - * @method callable|null getIsEmptyCallback() Returns a callable that takes the model data as argument and that returns if it is empty or not - not implementing it is deprecated since Symfony 5.1 - */ -interface FormConfigInterface -{ - /** - * Returns the event dispatcher used to dispatch form events. - * - * @return EventDispatcherInterface - */ - public function getEventDispatcher(); - - /** - * Returns the name of the form used as HTTP parameter. - * - * @return string - */ - public function getName(); - - /** - * Returns the property path that the form should be mapped to. - * - * @return PropertyPathInterface|null - */ - public function getPropertyPath(); - - /** - * Returns whether the form should be mapped to an element of its - * parent's data. - * - * @return bool - */ - public function getMapped(); - - /** - * Returns whether the form's data should be modified by reference. - * - * @return bool - */ - public function getByReference(); - - /** - * Returns whether the form should read and write the data of its parent. - * - * @return bool - */ - public function getInheritData(); - - /** - * Returns whether the form is compound. - * - * This property is independent of whether the form actually has - * children. A form can be compound and have no children at all, like - * for example an empty collection form. - * The contrary is not possible, a form which is not compound - * cannot have any children. - * - * @return bool - */ - public function getCompound(); - - /** - * Returns the resolved form type used to construct the form. - * - * @return ResolvedFormTypeInterface - */ - public function getType(); - - /** - * Returns the view transformers of the form. - * - * @return DataTransformerInterface[] - */ - public function getViewTransformers(); - - /** - * Returns the model transformers of the form. - * - * @return DataTransformerInterface[] - */ - public function getModelTransformers(); - - /** - * Returns the data mapper of the compound form or null for a simple form. - * - * @return DataMapperInterface|null - */ - public function getDataMapper(); - - /** - * Returns whether the form is required. - * - * @return bool - */ - public function getRequired(); - - /** - * Returns whether the form is disabled. - * - * @return bool - */ - public function getDisabled(); - - /** - * Returns whether errors attached to the form will bubble to its parent. - * - * @return bool - */ - public function getErrorBubbling(); - - /** - * Used when the view data is empty on submission. - * - * When the form is compound it will also be used to map the - * children data. - * - * The empty data must match the view format as it will passed to the first view transformer's - * "reverseTransform" method. - * - * @return mixed - */ - public function getEmptyData(); - - /** - * Returns additional attributes of the form. - * - * @return array - */ - public function getAttributes(); - - /** - * Returns whether the attribute with the given name exists. - * - * @return bool - */ - public function hasAttribute(string $name); - - /** - * Returns the value of the given attribute. - * - * @param mixed $default The value returned if the attribute does not exist - * - * @return mixed - */ - public function getAttribute(string $name, $default = null); - - /** - * Returns the initial data of the form. - * - * @return mixed - */ - public function getData(); - - /** - * Returns the class of the view data or null if the data is scalar or an array. - * - * @return string|null - */ - public function getDataClass(); - - /** - * Returns whether the form's data is locked. - * - * A form with locked data is restricted to the data passed in - * this configuration. The data can only be modified then by - * submitting the form. - * - * @return bool - */ - public function getDataLocked(); - - /** - * Returns the form factory used for creating new forms. - * - * @return FormFactoryInterface - */ - public function getFormFactory(); - - /** - * Returns the target URL of the form. - * - * @return string - */ - public function getAction(); - - /** - * Returns the HTTP method used by the form. - * - * @return string - */ - public function getMethod(); - - /** - * Returns the request handler used by the form. - * - * @return RequestHandlerInterface - */ - public function getRequestHandler(); - - /** - * Returns whether the form should be initialized upon creation. - * - * @return bool - */ - public function getAutoInitialize(); - - /** - * Returns all options passed during the construction of the form. - * - * @return array The passed options - */ - public function getOptions(); - - /** - * Returns whether a specific option exists. - * - * @return bool - */ - public function hasOption(string $name); - - /** - * Returns the value of a specific option. - * - * @param mixed $default The value returned if the option does not exist - * - * @return mixed - */ - public function getOption(string $name, $default = null); -} diff --git a/lib/symfony/form/FormError.php b/lib/symfony/form/FormError.php deleted file mode 100644 index e03f3eef5..000000000 --- a/lib/symfony/form/FormError.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; - -/** - * Wraps errors in forms. - * - * @author Bernhard Schussek - */ -class FormError -{ - protected $messageTemplate; - protected $messageParameters; - protected $messagePluralization; - - private $message; - private $cause; - - /** - * The form that spawned this error. - * - * @var FormInterface - */ - private $origin; - - /** - * Any array key in $messageParameters will be used as a placeholder in - * $messageTemplate. - * - * @param string $message The translated error message - * @param string|null $messageTemplate The template for the error message - * @param array $messageParameters The parameters that should be - * substituted in the message template - * @param int|null $messagePluralization The value for error message pluralization - * @param mixed $cause The cause of the error - * - * @see \Symfony\Component\Translation\Translator - */ - public function __construct(string $message, string $messageTemplate = null, array $messageParameters = [], int $messagePluralization = null, $cause = null) - { - $this->message = $message; - $this->messageTemplate = $messageTemplate ?: $message; - $this->messageParameters = $messageParameters; - $this->messagePluralization = $messagePluralization; - $this->cause = $cause; - } - - /** - * Returns the error message. - * - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Returns the error message template. - * - * @return string - */ - public function getMessageTemplate() - { - return $this->messageTemplate; - } - - /** - * Returns the parameters to be inserted in the message template. - * - * @return array - */ - public function getMessageParameters() - { - return $this->messageParameters; - } - - /** - * Returns the value for error message pluralization. - * - * @return int|null - */ - public function getMessagePluralization() - { - return $this->messagePluralization; - } - - /** - * Returns the cause of this error. - * - * @return mixed - */ - public function getCause() - { - return $this->cause; - } - - /** - * Sets the form that caused this error. - * - * This method must only be called once. - * - * @throws BadMethodCallException If the method is called more than once - */ - public function setOrigin(FormInterface $origin) - { - if (null !== $this->origin) { - throw new BadMethodCallException('setOrigin() must only be called once.'); - } - - $this->origin = $origin; - } - - /** - * Returns the form that caused this error. - * - * @return FormInterface|null - */ - public function getOrigin() - { - return $this->origin; - } -} diff --git a/lib/symfony/form/FormErrorIterator.php b/lib/symfony/form/FormErrorIterator.php deleted file mode 100644 index 9ee2f0e8f..000000000 --- a/lib/symfony/form/FormErrorIterator.php +++ /dev/null @@ -1,316 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Exception\OutOfBoundsException; -use Symfony\Component\Validator\ConstraintViolation; - -/** - * Iterates over the errors of a form. - * - * This class supports recursive iteration. In order to iterate recursively, - * pass a structure of {@link FormError} and {@link FormErrorIterator} objects - * to the $errors constructor argument. - * - * You can also wrap the iterator into a {@link \RecursiveIteratorIterator} to - * flatten the recursive structure into a flat list of errors. - * - * @author Bernhard Schussek - * - * @template T of FormError|FormErrorIterator - * - * @implements \ArrayAccess - * @implements \RecursiveIterator - * @implements \SeekableIterator - */ -class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \ArrayAccess, \Countable -{ - /** - * The prefix used for indenting nested error messages. - */ - public const INDENTATION = ' '; - - private $form; - - /** - * @var list - */ - private $errors; - - /** - * @param list $errors - * - * @throws InvalidArgumentException If the errors are invalid - */ - public function __construct(FormInterface $form, array $errors) - { - foreach ($errors as $error) { - if (!($error instanceof FormError || $error instanceof self)) { - throw new InvalidArgumentException(sprintf('The errors must be instances of "Symfony\Component\Form\FormError" or "%s". Got: "%s".', __CLASS__, get_debug_type($error))); - } - } - - $this->form = $form; - $this->errors = $errors; - } - - /** - * Returns all iterated error messages as string. - * - * @return string - */ - public function __toString() - { - $string = ''; - - foreach ($this->errors as $error) { - if ($error instanceof FormError) { - $string .= 'ERROR: '.$error->getMessage()."\n"; - } else { - /* @var self $error */ - $string .= $error->getForm()->getName().":\n"; - $string .= self::indent((string) $error); - } - } - - return $string; - } - - /** - * Returns the iterated form. - * - * @return FormInterface - */ - public function getForm() - { - return $this->form; - } - - /** - * Returns the current element of the iterator. - * - * @return T An error or an iterator containing nested errors - */ - #[\ReturnTypeWillChange] - public function current() - { - return current($this->errors); - } - - /** - * Advances the iterator to the next position. - */ - #[\ReturnTypeWillChange] - public function next() - { - next($this->errors); - } - - /** - * Returns the current position of the iterator. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function key() - { - return key($this->errors); - } - - /** - * Returns whether the iterator's position is valid. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function valid() - { - return null !== key($this->errors); - } - - /** - * Sets the iterator's position to the beginning. - * - * This method detects if errors have been added to the form since the - * construction of the iterator. - */ - #[\ReturnTypeWillChange] - public function rewind() - { - reset($this->errors); - } - - /** - * Returns whether a position exists in the iterator. - * - * @param int $position The position - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($position) - { - return isset($this->errors[$position]); - } - - /** - * Returns the element at a position in the iterator. - * - * @param int $position The position - * - * @return T - * - * @throws OutOfBoundsException If the given position does not exist - */ - #[\ReturnTypeWillChange] - public function offsetGet($position) - { - if (!isset($this->errors[$position])) { - throw new OutOfBoundsException('The offset '.$position.' does not exist.'); - } - - return $this->errors[$position]; - } - - /** - * Unsupported method. - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetSet($position, $value) - { - throw new BadMethodCallException('The iterator doesn\'t support modification of elements.'); - } - - /** - * Unsupported method. - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetUnset($position) - { - throw new BadMethodCallException('The iterator doesn\'t support modification of elements.'); - } - - /** - * Returns whether the current element of the iterator can be recursed - * into. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren() - { - return current($this->errors) instanceof self; - } - - /** - * @return self - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - if (!$this->hasChildren()) { - trigger_deprecation('symfony/form', '5.4', 'Calling "%s()" if the current element is not iterable is deprecated, call "%s" to get the current element.', __METHOD__, self::class.'::current()'); - // throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()')); - } - - /** @var self $children */ - $children = current($this->errors); - - return $children; - } - - /** - * Returns the number of elements in the iterator. - * - * Note that this is not the total number of errors, if the constructor - * parameter $deep was set to true! In that case, you should wrap the - * iterator into a {@link \RecursiveIteratorIterator} with the standard mode - * {@link \RecursiveIteratorIterator::LEAVES_ONLY} and count the result. - * - * $iterator = new \RecursiveIteratorIterator($form->getErrors(true)); - * $count = count(iterator_to_array($iterator)); - * - * Alternatively, set the constructor argument $flatten to true as well. - * - * $count = count($form->getErrors(true, true)); - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->errors); - } - - /** - * Sets the position of the iterator. - * - * @param int $position The new position - * - * @return void - * - * @throws OutOfBoundsException If the position is invalid - */ - #[\ReturnTypeWillChange] - public function seek($position) - { - if (!isset($this->errors[$position])) { - throw new OutOfBoundsException('The offset '.$position.' does not exist.'); - } - - reset($this->errors); - - while ($position !== key($this->errors)) { - next($this->errors); - } - } - - /** - * Creates iterator for errors with specific codes. - * - * @param string|string[] $codes The codes to find - * - * @return static - */ - public function findByCodes($codes) - { - $codes = (array) $codes; - $errors = []; - foreach ($this as $error) { - $cause = $error->getCause(); - if ($cause instanceof ConstraintViolation && \in_array($cause->getCode(), $codes, true)) { - $errors[] = $error; - } - } - - return new static($this->form, $errors); - } - - /** - * Utility function for indenting multi-line strings. - */ - private static function indent(string $string): string - { - return rtrim(self::INDENTATION.str_replace("\n", "\n".self::INDENTATION, $string), ' '); - } -} diff --git a/lib/symfony/form/FormEvent.php b/lib/symfony/form/FormEvent.php deleted file mode 100644 index c466fafdc..000000000 --- a/lib/symfony/form/FormEvent.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Contracts\EventDispatcher\Event; - -/** - * @author Bernhard Schussek - */ -class FormEvent extends Event -{ - private $form; - protected $data; - - /** - * @param mixed $data The data - */ - public function __construct(FormInterface $form, $data) - { - $this->form = $form; - $this->data = $data; - } - - /** - * Returns the form at the source of the event. - * - * @return FormInterface - */ - public function getForm() - { - return $this->form; - } - - /** - * Returns the data associated with this event. - * - * @return mixed - */ - public function getData() - { - return $this->data; - } - - /** - * Allows updating with some filtered data. - * - * @param mixed $data - */ - public function setData($data) - { - $this->data = $data; - } -} diff --git a/lib/symfony/form/FormEvents.php b/lib/symfony/form/FormEvents.php deleted file mode 100644 index cf4d97f55..000000000 --- a/lib/symfony/form/FormEvents.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Event\PostSetDataEvent; -use Symfony\Component\Form\Event\PostSubmitEvent; -use Symfony\Component\Form\Event\PreSetDataEvent; -use Symfony\Component\Form\Event\PreSubmitEvent; -use Symfony\Component\Form\Event\SubmitEvent; - -/** - * To learn more about how form events work check the documentation - * entry at {@link https://symfony.com/doc/any/components/form/form_events.html}. - * - * To learn how to dynamically modify forms using events check the cookbook - * entry at {@link https://symfony.com/doc/any/cookbook/form/dynamic_form_modification.html}. - * - * @author Bernhard Schussek - */ -final class FormEvents -{ - /** - * The PRE_SUBMIT event is dispatched at the beginning of the Form::submit() method. - * - * It can be used to: - * - Change data from the request, before submitting the data to the form. - * - Add or remove form fields, before submitting the data to the form. - * - * @Event("Symfony\Component\Form\Event\PreSubmitEvent") - */ - public const PRE_SUBMIT = 'form.pre_submit'; - - /** - * The SUBMIT event is dispatched after the Form::submit() method - * has changed the view data by the request data, or submitted and mapped - * the children if the form is compound, and after reverse transformation - * to normalized representation. - * - * It's also dispatched just before the Form::submit() method transforms back - * the normalized data to the model and view data. - * - * So at this stage children of compound forms are submitted and synchronized, unless - * their transformation failed, but a parent would still be at the PRE_SUBMIT level. - * - * Since the current form is not synchronized yet, it is still possible to add and - * remove fields. - * - * @Event("Symfony\Component\Form\Event\SubmitEvent") - */ - public const SUBMIT = 'form.submit'; - - /** - * The FormEvents::POST_SUBMIT event is dispatched at the very end of the Form::submit(). - * - * It this stage the model and view data may have been denormalized. Otherwise the form - * is desynchronized because transformation failed during submission. - * - * It can be used to fetch data after denormalization. - * - * The event attaches the current view data. To know whether this is the renormalized data - * or the invalid request data, call Form::isSynchronized() first. - * - * @Event("Symfony\Component\Form\Event\PostSubmitEvent") - */ - public const POST_SUBMIT = 'form.post_submit'; - - /** - * The FormEvents::PRE_SET_DATA event is dispatched at the beginning of the Form::setData() method. - * - * It can be used to: - * - Modify the data given during pre-population; - * - Keep synchronized the form depending on the data (adding or removing fields dynamically). - * - * @Event("Symfony\Component\Form\Event\PreSetDataEvent") - */ - public const PRE_SET_DATA = 'form.pre_set_data'; - - /** - * The FormEvents::POST_SET_DATA event is dispatched at the end of the Form::setData() method. - * - * This event can be used to modify the form depending on the final state of the underlying data - * accessible in every representation: model, normalized and view. - * - * @Event("Symfony\Component\Form\Event\PostSetDataEvent") - */ - public const POST_SET_DATA = 'form.post_set_data'; - - /** - * Event aliases. - * - * These aliases can be consumed by RegisterListenersPass. - */ - public const ALIASES = [ - PreSubmitEvent::class => self::PRE_SUBMIT, - SubmitEvent::class => self::SUBMIT, - PostSubmitEvent::class => self::POST_SUBMIT, - PreSetDataEvent::class => self::PRE_SET_DATA, - PostSetDataEvent::class => self::POST_SET_DATA, - ]; - - private function __construct() - { - } -} diff --git a/lib/symfony/form/FormExtensionInterface.php b/lib/symfony/form/FormExtensionInterface.php deleted file mode 100644 index 8fafcee2a..000000000 --- a/lib/symfony/form/FormExtensionInterface.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Interface for extensions which provide types, type extensions and a guesser. - */ -interface FormExtensionInterface -{ - /** - * Returns a type by name. - * - * @param string $name The name of the type - * - * @return FormTypeInterface - * - * @throws Exception\InvalidArgumentException if the given type is not supported by this extension - */ - public function getType(string $name); - - /** - * Returns whether the given type is supported. - * - * @param string $name The name of the type - * - * @return bool - */ - public function hasType(string $name); - - /** - * Returns the extensions for the given type. - * - * @param string $name The name of the type - * - * @return FormTypeExtensionInterface[] - */ - public function getTypeExtensions(string $name); - - /** - * Returns whether this extension provides type extensions for the given type. - * - * @param string $name The name of the type - * - * @return bool - */ - public function hasTypeExtensions(string $name); - - /** - * Returns the type guesser provided by this extension. - * - * @return FormTypeGuesserInterface|null - */ - public function getTypeGuesser(); -} diff --git a/lib/symfony/form/FormFactory.php b/lib/symfony/form/FormFactory.php deleted file mode 100644 index b3185d1a3..000000000 --- a/lib/symfony/form/FormFactory.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Core\Type\TextType; - -class FormFactory implements FormFactoryInterface -{ - private $registry; - - public function __construct(FormRegistryInterface $registry) - { - $this->registry = $registry; - } - - /** - * {@inheritdoc} - */ - public function create(string $type = FormType::class, $data = null, array $options = []) - { - return $this->createBuilder($type, $data, $options)->getForm(); - } - - /** - * {@inheritdoc} - */ - public function createNamed(string $name, string $type = FormType::class, $data = null, array $options = []) - { - return $this->createNamedBuilder($name, $type, $data, $options)->getForm(); - } - - /** - * {@inheritdoc} - */ - public function createForProperty(string $class, string $property, $data = null, array $options = []) - { - return $this->createBuilderForProperty($class, $property, $data, $options)->getForm(); - } - - /** - * {@inheritdoc} - */ - public function createBuilder(string $type = FormType::class, $data = null, array $options = []) - { - return $this->createNamedBuilder($this->registry->getType($type)->getBlockPrefix(), $type, $data, $options); - } - - /** - * {@inheritdoc} - */ - public function createNamedBuilder(string $name, string $type = FormType::class, $data = null, array $options = []) - { - if (null !== $data && !\array_key_exists('data', $options)) { - $options['data'] = $data; - } - - $type = $this->registry->getType($type); - - $builder = $type->createBuilder($this, $name, $options); - - // Explicitly call buildForm() in order to be able to override either - // createBuilder() or buildForm() in the resolved form type - $type->buildForm($builder, $builder->getOptions()); - - return $builder; - } - - /** - * {@inheritdoc} - */ - public function createBuilderForProperty(string $class, string $property, $data = null, array $options = []) - { - if (null === $guesser = $this->registry->getTypeGuesser()) { - return $this->createNamedBuilder($property, TextType::class, $data, $options); - } - - $typeGuess = $guesser->guessType($class, $property); - $maxLengthGuess = $guesser->guessMaxLength($class, $property); - $requiredGuess = $guesser->guessRequired($class, $property); - $patternGuess = $guesser->guessPattern($class, $property); - - $type = $typeGuess ? $typeGuess->getType() : TextType::class; - - $maxLength = $maxLengthGuess ? $maxLengthGuess->getValue() : null; - $pattern = $patternGuess ? $patternGuess->getValue() : null; - - if (null !== $pattern) { - $options = array_replace_recursive(['attr' => ['pattern' => $pattern]], $options); - } - - if (null !== $maxLength) { - $options = array_replace_recursive(['attr' => ['maxlength' => $maxLength]], $options); - } - - if ($requiredGuess) { - $options = array_merge(['required' => $requiredGuess->getValue()], $options); - } - - // user options may override guessed options - if ($typeGuess) { - $attrs = []; - $typeGuessOptions = $typeGuess->getOptions(); - if (isset($typeGuessOptions['attr']) && isset($options['attr'])) { - $attrs = ['attr' => array_merge($typeGuessOptions['attr'], $options['attr'])]; - } - - $options = array_merge($typeGuessOptions, $options, $attrs); - } - - return $this->createNamedBuilder($property, $type, $data, $options); - } -} diff --git a/lib/symfony/form/FormFactoryBuilder.php b/lib/symfony/form/FormFactoryBuilder.php deleted file mode 100644 index 735a17e8e..000000000 --- a/lib/symfony/form/FormFactoryBuilder.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\CoreExtension; - -/** - * The default implementation of FormFactoryBuilderInterface. - * - * @author Bernhard Schussek - */ -class FormFactoryBuilder implements FormFactoryBuilderInterface -{ - private $forceCoreExtension; - - /** - * @var ResolvedFormTypeFactoryInterface - */ - private $resolvedTypeFactory; - - /** - * @var FormExtensionInterface[] - */ - private $extensions = []; - - /** - * @var FormTypeInterface[] - */ - private $types = []; - - /** - * @var FormTypeExtensionInterface[][] - */ - private $typeExtensions = []; - - /** - * @var FormTypeGuesserInterface[] - */ - private $typeGuessers = []; - - public function __construct(bool $forceCoreExtension = false) - { - $this->forceCoreExtension = $forceCoreExtension; - } - - /** - * {@inheritdoc} - */ - public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory) - { - $this->resolvedTypeFactory = $resolvedTypeFactory; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addExtension(FormExtensionInterface $extension) - { - $this->extensions[] = $extension; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addExtensions(array $extensions) - { - $this->extensions = array_merge($this->extensions, $extensions); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addType(FormTypeInterface $type) - { - $this->types[] = $type; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypes(array $types) - { - foreach ($types as $type) { - $this->types[] = $type; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeExtension(FormTypeExtensionInterface $typeExtension) - { - foreach ($typeExtension::getExtendedTypes() as $extendedType) { - $this->typeExtensions[$extendedType][] = $typeExtension; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeExtensions(array $typeExtensions) - { - foreach ($typeExtensions as $typeExtension) { - $this->addTypeExtension($typeExtension); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser) - { - $this->typeGuessers[] = $typeGuesser; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeGuessers(array $typeGuessers) - { - $this->typeGuessers = array_merge($this->typeGuessers, $typeGuessers); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormFactory() - { - $extensions = $this->extensions; - - if ($this->forceCoreExtension) { - $hasCoreExtension = false; - - foreach ($extensions as $extension) { - if ($extension instanceof CoreExtension) { - $hasCoreExtension = true; - break; - } - } - - if (!$hasCoreExtension) { - array_unshift($extensions, new CoreExtension()); - } - } - - if (\count($this->types) > 0 || \count($this->typeExtensions) > 0 || \count($this->typeGuessers) > 0) { - if (\count($this->typeGuessers) > 1) { - $typeGuesser = new FormTypeGuesserChain($this->typeGuessers); - } else { - $typeGuesser = $this->typeGuessers[0] ?? null; - } - - $extensions[] = new PreloadedExtension($this->types, $this->typeExtensions, $typeGuesser); - } - - $registry = new FormRegistry($extensions, $this->resolvedTypeFactory ?? new ResolvedFormTypeFactory()); - - return new FormFactory($registry); - } -} diff --git a/lib/symfony/form/FormFactoryBuilderInterface.php b/lib/symfony/form/FormFactoryBuilderInterface.php deleted file mode 100644 index e3b0a7b3e..000000000 --- a/lib/symfony/form/FormFactoryBuilderInterface.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A builder for FormFactoryInterface objects. - * - * @author Bernhard Schussek - */ -interface FormFactoryBuilderInterface -{ - /** - * Sets the factory for creating ResolvedFormTypeInterface instances. - * - * @return $this - */ - public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory); - - /** - * Adds an extension to be loaded by the factory. - * - * @return $this - */ - public function addExtension(FormExtensionInterface $extension); - - /** - * Adds a list of extensions to be loaded by the factory. - * - * @param FormExtensionInterface[] $extensions The extensions - * - * @return $this - */ - public function addExtensions(array $extensions); - - /** - * Adds a form type to the factory. - * - * @return $this - */ - public function addType(FormTypeInterface $type); - - /** - * Adds a list of form types to the factory. - * - * @param FormTypeInterface[] $types The form types - * - * @return $this - */ - public function addTypes(array $types); - - /** - * Adds a form type extension to the factory. - * - * @return $this - */ - public function addTypeExtension(FormTypeExtensionInterface $typeExtension); - - /** - * Adds a list of form type extensions to the factory. - * - * @param FormTypeExtensionInterface[] $typeExtensions The form type extensions - * - * @return $this - */ - public function addTypeExtensions(array $typeExtensions); - - /** - * Adds a type guesser to the factory. - * - * @return $this - */ - public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser); - - /** - * Adds a list of type guessers to the factory. - * - * @param FormTypeGuesserInterface[] $typeGuessers The type guessers - * - * @return $this - */ - public function addTypeGuessers(array $typeGuessers); - - /** - * Builds and returns the factory. - * - * @return FormFactoryInterface - */ - public function getFormFactory(); -} diff --git a/lib/symfony/form/FormFactoryInterface.php b/lib/symfony/form/FormFactoryInterface.php deleted file mode 100644 index c5f2485fd..000000000 --- a/lib/symfony/form/FormFactoryInterface.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; - -/** - * Allows creating a form based on a name, a class or a property. - * - * @author Bernhard Schussek - */ -interface FormFactoryInterface -{ - /** - * Returns a form. - * - * @see createBuilder() - * - * @param mixed $data The initial data - * - * @return FormInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function create(string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form. - * - * @see createNamedBuilder() - * - * @param mixed $data The initial data - * - * @return FormInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function createNamed(string $name, string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form for a property of a class. - * - * @see createBuilderForProperty() - * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * @param mixed $data The initial data - * - * @return FormInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the form type - */ - public function createForProperty(string $class, string $property, $data = null, array $options = []); - - /** - * Returns a form builder. - * - * @param mixed $data The initial data - * - * @return FormBuilderInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function createBuilder(string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form builder. - * - * @param mixed $data The initial data - * - * @return FormBuilderInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function createNamedBuilder(string $name, string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form builder for a property of a class. - * - * If any of the 'required' and type options can be guessed, - * and are not provided in the options argument, the guessed value is used. - * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * @param mixed $data The initial data - * - * @return FormBuilderInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the form type - */ - public function createBuilderForProperty(string $class, string $property, $data = null, array $options = []); -} diff --git a/lib/symfony/form/FormInterface.php b/lib/symfony/form/FormInterface.php deleted file mode 100644 index 6cc6b4ed7..000000000 --- a/lib/symfony/form/FormInterface.php +++ /dev/null @@ -1,328 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * A form group bundling multiple forms in a hierarchical structure. - * - * @author Bernhard Schussek - * - * @extends \ArrayAccess - * @extends \Traversable - */ -interface FormInterface extends \ArrayAccess, \Traversable, \Countable -{ - /** - * Sets the parent form. - * - * @param FormInterface|null $parent The parent form or null if it's the root - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - * @throws Exception\LogicException when trying to set a parent for a form with - * an empty name - */ - public function setParent(self $parent = null); - - /** - * Returns the parent form. - * - * @return self|null - */ - public function getParent(); - - /** - * Adds or replaces a child to the form. - * - * @param FormInterface|string $child The FormInterface instance or the name of the child - * @param string|null $type The child's type, if a name was passed - * @param array $options The child's options, if a name was passed - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - * @throws Exception\LogicException when trying to add a child to a non-compound form - * @throws Exception\UnexpectedTypeException if $child or $type has an unexpected type - */ - public function add($child, string $type = null, array $options = []); - - /** - * Returns the child with the given name. - * - * @return self - * - * @throws Exception\OutOfBoundsException if the named child does not exist - */ - public function get(string $name); - - /** - * Returns whether a child with the given name exists. - * - * @return bool - */ - public function has(string $name); - - /** - * Removes a child from the form. - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - */ - public function remove(string $name); - - /** - * Returns all children in this group. - * - * @return self[] - */ - public function all(); - - /** - * Returns the errors of this form. - * - * @param bool $deep Whether to include errors of child forms as well - * @param bool $flatten Whether to flatten the list of errors in case - * $deep is set to true - * - * @return FormErrorIterator - */ - public function getErrors(bool $deep = false, bool $flatten = true); - - /** - * Updates the form with default model data. - * - * @param mixed $modelData The data formatted as expected for the underlying object - * - * @return $this - * - * @throws Exception\AlreadySubmittedException If the form has already been submitted - * @throws Exception\LogicException if the view data does not match the expected type - * according to {@link FormConfigInterface::getDataClass} - * @throws Exception\RuntimeException If listeners try to call setData in a cycle or if - * the form inherits data from its parent - * @throws Exception\TransformationFailedException if the synchronization failed - */ - public function setData($modelData); - - /** - * Returns the model data in the format needed for the underlying object. - * - * @return mixed When the field is not submitted, the default data is returned. - * When the field is submitted, the default data has been bound - * to the submitted view data. - * - * @throws Exception\RuntimeException If the form inherits data but has no parent - */ - public function getData(); - - /** - * Returns the normalized data of the field, used as internal bridge - * between model data and view data. - * - * @return mixed When the field is not submitted, the default data is returned. - * When the field is submitted, the normalized submitted data - * is returned if the field is synchronized with the view data, - * null otherwise. - * - * @throws Exception\RuntimeException If the form inherits data but has no parent - */ - public function getNormData(); - - /** - * Returns the view data of the field. - * - * It may be defined by {@link FormConfigInterface::getDataClass}. - * - * There are two cases: - * - * - When the form is compound the view data is mapped to the children. - * Each child will use its mapped data as model data. - * It can be an array, an object or null. - * - * - When the form is simple its view data is used to be bound - * to the submitted data. - * It can be a string or an array. - * - * In both cases the view data is the actual altered data on submission. - * - * @return mixed - * - * @throws Exception\RuntimeException If the form inherits data but has no parent - */ - public function getViewData(); - - /** - * Returns the extra submitted data. - * - * @return array The submitted data which do not belong to a child - */ - public function getExtraData(); - - /** - * Returns the form's configuration. - * - * @return FormConfigInterface - */ - public function getConfig(); - - /** - * Returns whether the form is submitted. - * - * @return bool - */ - public function isSubmitted(); - - /** - * Returns the name by which the form is identified in forms. - * - * Only root forms are allowed to have an empty name. - * - * @return string - */ - public function getName(); - - /** - * Returns the property path that the form is mapped to. - * - * @return PropertyPathInterface|null - */ - public function getPropertyPath(); - - /** - * Adds an error to this form. - * - * @return $this - */ - public function addError(FormError $error); - - /** - * Returns whether the form and all children are valid. - * - * @throws Exception\LogicException if the form is not submitted - * - * @return bool - */ - public function isValid(); - - /** - * Returns whether the form is required to be filled out. - * - * If the form has a parent and the parent is not required, this method - * will always return false. Otherwise the value set with setRequired() - * is returned. - * - * @return bool - */ - public function isRequired(); - - /** - * Returns whether this form is disabled. - * - * The content of a disabled form is displayed, but not allowed to be - * modified. The validation of modified disabled forms should fail. - * - * Forms whose parents are disabled are considered disabled regardless of - * their own state. - * - * @return bool - */ - public function isDisabled(); - - /** - * Returns whether the form is empty. - * - * @return bool - */ - public function isEmpty(); - - /** - * Returns whether the data in the different formats is synchronized. - * - * If the data is not synchronized, you can get the transformation failure - * by calling {@link getTransformationFailure()}. - * - * If the form is not submitted, this method always returns true. - * - * @return bool - */ - public function isSynchronized(); - - /** - * Returns the data transformation failure, if any, during submission. - * - * @return Exception\TransformationFailedException|null - */ - public function getTransformationFailure(); - - /** - * Initializes the form tree. - * - * Should be called on the root form after constructing the tree. - * - * @return $this - * - * @throws Exception\RuntimeException If the form is not the root - */ - public function initialize(); - - /** - * Inspects the given request and calls {@link submit()} if the form was - * submitted. - * - * Internally, the request is forwarded to the configured - * {@link RequestHandlerInterface} instance, which determines whether to - * submit the form or not. - * - * @param mixed $request The request to handle - * - * @return $this - */ - public function handleRequest($request = null); - - /** - * Submits data to the form. - * - * @param string|array|null $submittedData The submitted data - * @param bool $clearMissing Whether to set fields to NULL - * when they are missing in the - * submitted data. This argument - * is only used in compound form - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - */ - public function submit($submittedData, bool $clearMissing = true); - - /** - * Returns the root of the form tree. - * - * @return self - */ - public function getRoot(); - - /** - * Returns whether the field is the root of the form tree. - * - * @return bool - */ - public function isRoot(); - - /** - * @return FormView - */ - public function createView(FormView $parent = null); -} diff --git a/lib/symfony/form/FormRegistry.php b/lib/symfony/form/FormRegistry.php deleted file mode 100644 index 90087a6a8..000000000 --- a/lib/symfony/form/FormRegistry.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\ExceptionInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * The central registry of the Form component. - * - * @author Bernhard Schussek - */ -class FormRegistry implements FormRegistryInterface -{ - /** - * @var FormExtensionInterface[] - */ - private $extensions = []; - - /** - * @var ResolvedFormTypeInterface[] - */ - private $types = []; - - /** - * @var FormTypeGuesserInterface|false|null - */ - private $guesser = false; - - /** - * @var ResolvedFormTypeFactoryInterface - */ - private $resolvedTypeFactory; - - private $checkedTypes = []; - - /** - * @param FormExtensionInterface[] $extensions - * - * @throws UnexpectedTypeException if any extension does not implement FormExtensionInterface - */ - public function __construct(array $extensions, ResolvedFormTypeFactoryInterface $resolvedTypeFactory) - { - foreach ($extensions as $extension) { - if (!$extension instanceof FormExtensionInterface) { - throw new UnexpectedTypeException($extension, FormExtensionInterface::class); - } - } - - $this->extensions = $extensions; - $this->resolvedTypeFactory = $resolvedTypeFactory; - } - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (!isset($this->types[$name])) { - $type = null; - - foreach ($this->extensions as $extension) { - if ($extension->hasType($name)) { - $type = $extension->getType($name); - break; - } - } - - if (!$type) { - // Support fully-qualified class names - if (!class_exists($name)) { - throw new InvalidArgumentException(sprintf('Could not load type "%s": class does not exist.', $name)); - } - if (!is_subclass_of($name, FormTypeInterface::class)) { - throw new InvalidArgumentException(sprintf('Could not load type "%s": class does not implement "Symfony\Component\Form\FormTypeInterface".', $name)); - } - - $type = new $name(); - } - - $this->types[$name] = $this->resolveType($type); - } - - return $this->types[$name]; - } - - /** - * Wraps a type into a ResolvedFormTypeInterface implementation and connects it with its parent type. - */ - private function resolveType(FormTypeInterface $type): ResolvedFormTypeInterface - { - $parentType = $type->getParent(); - $fqcn = \get_class($type); - - if (isset($this->checkedTypes[$fqcn])) { - $types = implode(' > ', array_merge(array_keys($this->checkedTypes), [$fqcn])); - throw new LogicException(sprintf('Circular reference detected for form type "%s" (%s).', $fqcn, $types)); - } - - $this->checkedTypes[$fqcn] = true; - - $typeExtensions = []; - try { - foreach ($this->extensions as $extension) { - $typeExtensions[] = $extension->getTypeExtensions($fqcn); - } - - return $this->resolvedTypeFactory->createResolvedType( - $type, - array_merge([], ...$typeExtensions), - $parentType ? $this->getType($parentType) : null - ); - } finally { - unset($this->checkedTypes[$fqcn]); - } - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - if (isset($this->types[$name])) { - return true; - } - - try { - $this->getType($name); - } catch (ExceptionInterface $e) { - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - if (false === $this->guesser) { - $guessers = []; - - foreach ($this->extensions as $extension) { - $guesser = $extension->getTypeGuesser(); - - if ($guesser) { - $guessers[] = $guesser; - } - } - - $this->guesser = !empty($guessers) ? new FormTypeGuesserChain($guessers) : null; - } - - return $this->guesser; - } - - /** - * {@inheritdoc} - */ - public function getExtensions() - { - return $this->extensions; - } -} diff --git a/lib/symfony/form/FormRegistryInterface.php b/lib/symfony/form/FormRegistryInterface.php deleted file mode 100644 index f39174b19..000000000 --- a/lib/symfony/form/FormRegistryInterface.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * The central registry of the Form component. - * - * @author Bernhard Schussek - */ -interface FormRegistryInterface -{ - /** - * Returns a form type by name. - * - * This methods registers the type extensions from the form extensions. - * - * @return ResolvedFormTypeInterface - * - * @throws Exception\InvalidArgumentException if the type cannot be retrieved from any extension - */ - public function getType(string $name); - - /** - * Returns whether the given form type is supported. - * - * @return bool - */ - public function hasType(string $name); - - /** - * Returns the guesser responsible for guessing types. - * - * @return FormTypeGuesserInterface|null - */ - public function getTypeGuesser(); - - /** - * Returns the extensions loaded by the framework. - * - * @return FormExtensionInterface[] - */ - public function getExtensions(); -} diff --git a/lib/symfony/form/FormRenderer.php b/lib/symfony/form/FormRenderer.php deleted file mode 100644 index 2f8f35199..000000000 --- a/lib/symfony/form/FormRenderer.php +++ /dev/null @@ -1,303 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Twig\Environment; - -/** - * Renders a form into HTML using a rendering engine. - * - * @author Bernhard Schussek - */ -class FormRenderer implements FormRendererInterface -{ - public const CACHE_KEY_VAR = 'unique_block_prefix'; - - private $engine; - private $csrfTokenManager; - private $blockNameHierarchyMap = []; - private $hierarchyLevelMap = []; - private $variableStack = []; - - public function __construct(FormRendererEngineInterface $engine, CsrfTokenManagerInterface $csrfTokenManager = null) - { - $this->engine = $engine; - $this->csrfTokenManager = $csrfTokenManager; - } - - /** - * {@inheritdoc} - */ - public function getEngine() - { - return $this->engine; - } - - /** - * {@inheritdoc} - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true) - { - $this->engine->setTheme($view, $themes, $useDefaultThemes); - } - - /** - * {@inheritdoc} - */ - public function renderCsrfToken(string $tokenId) - { - if (null === $this->csrfTokenManager) { - throw new BadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct(). Try running "composer require symfony/security-csrf".'); - } - - return $this->csrfTokenManager->getToken($tokenId)->getValue(); - } - - /** - * {@inheritdoc} - */ - public function renderBlock(FormView $view, string $blockName, array $variables = []) - { - $resource = $this->engine->getResourceForBlockName($view, $blockName); - - if (!$resource) { - throw new LogicException(sprintf('No block "%s" found while rendering the form.', $blockName)); - } - - $viewCacheKey = $view->vars[self::CACHE_KEY_VAR]; - - // The variables are cached globally for a view (instead of for the - // current suffix) - if (!isset($this->variableStack[$viewCacheKey])) { - $this->variableStack[$viewCacheKey] = []; - - // The default variable scope contains all view variables, merged with - // the variables passed explicitly to the helper - $scopeVariables = $view->vars; - - $varInit = true; - } else { - // Reuse the current scope and merge it with the explicitly passed variables - $scopeVariables = end($this->variableStack[$viewCacheKey]); - - $varInit = false; - } - - // Merge the passed with the existing attributes - if (isset($variables['attr']) && isset($scopeVariables['attr'])) { - $variables['attr'] = array_replace($scopeVariables['attr'], $variables['attr']); - } - - // Merge the passed with the exist *label* attributes - if (isset($variables['label_attr']) && isset($scopeVariables['label_attr'])) { - $variables['label_attr'] = array_replace($scopeVariables['label_attr'], $variables['label_attr']); - } - - // Do not use array_replace_recursive(), otherwise array variables - // cannot be overwritten - $variables = array_replace($scopeVariables, $variables); - - $this->variableStack[$viewCacheKey][] = $variables; - - // Do the rendering - $html = $this->engine->renderBlock($view, $resource, $blockName, $variables); - - // Clear the stack - array_pop($this->variableStack[$viewCacheKey]); - - if ($varInit) { - unset($this->variableStack[$viewCacheKey]); - } - - return $html; - } - - /** - * {@inheritdoc} - */ - public function searchAndRenderBlock(FormView $view, string $blockNameSuffix, array $variables = []) - { - $renderOnlyOnce = 'row' === $blockNameSuffix || 'widget' === $blockNameSuffix; - - if ($renderOnlyOnce && $view->isRendered()) { - // This is not allowed, because it would result in rendering same IDs multiple times, which is not valid. - throw new BadMethodCallException(sprintf('Field "%s" has already been rendered, save the result of previous render call to a variable and output that instead.', $view->vars['name'])); - } - - // The cache key for storing the variables and types - $viewCacheKey = $view->vars[self::CACHE_KEY_VAR]; - $viewAndSuffixCacheKey = $viewCacheKey.$blockNameSuffix; - - // In templates, we have to deal with two kinds of block hierarchies: - // - // +---------+ +---------+ - // | Theme B | -------> | Theme A | - // +---------+ +---------+ - // - // form_widget -------> form_widget - // ^ - // | - // choice_widget -----> choice_widget - // - // The first kind of hierarchy is the theme hierarchy. This allows to - // override the block "choice_widget" from Theme A in the extending - // Theme B. This kind of inheritance needs to be supported by the - // template engine and, for example, offers "parent()" or similar - // functions to fall back from the custom to the parent implementation. - // - // The second kind of hierarchy is the form type hierarchy. This allows - // to implement a custom "choice_widget" block (no matter in which theme), - // or to fallback to the block of the parent type, which would be - // "form_widget" in this example (again, no matter in which theme). - // If the designer wants to explicitly fallback to "form_widget" in their - // custom "choice_widget", for example because they only want to wrap - // a
    around the original implementation, they can call the - // widget() function again to render the block for the parent type. - // - // The second kind is implemented in the following blocks. - if (!isset($this->blockNameHierarchyMap[$viewAndSuffixCacheKey])) { - // INITIAL CALL - // Calculate the hierarchy of template blocks and start on - // the bottom level of the hierarchy (= "__
    " block) - $blockNameHierarchy = []; - foreach ($view->vars['block_prefixes'] as $blockNamePrefix) { - $blockNameHierarchy[] = $blockNamePrefix.'_'.$blockNameSuffix; - } - $hierarchyLevel = \count($blockNameHierarchy) - 1; - - $hierarchyInit = true; - } else { - // RECURSIVE CALL - // If a block recursively calls searchAndRenderBlock() again, resume rendering - // using the parent type in the hierarchy. - $blockNameHierarchy = $this->blockNameHierarchyMap[$viewAndSuffixCacheKey]; - $hierarchyLevel = $this->hierarchyLevelMap[$viewAndSuffixCacheKey] - 1; - - $hierarchyInit = false; - } - - // The variables are cached globally for a view (instead of for the - // current suffix) - if (!isset($this->variableStack[$viewCacheKey])) { - $this->variableStack[$viewCacheKey] = []; - - // The default variable scope contains all view variables, merged with - // the variables passed explicitly to the helper - $scopeVariables = $view->vars; - - $varInit = true; - } else { - // Reuse the current scope and merge it with the explicitly passed variables - $scopeVariables = end($this->variableStack[$viewCacheKey]); - - $varInit = false; - } - - // Load the resource where this block can be found - $resource = $this->engine->getResourceForBlockNameHierarchy($view, $blockNameHierarchy, $hierarchyLevel); - - // Update the current hierarchy level to the one at which the resource was - // found. For example, if looking for "choice_widget", but only a resource - // is found for its parent "form_widget", then the level is updated here - // to the parent level. - $hierarchyLevel = $this->engine->getResourceHierarchyLevel($view, $blockNameHierarchy, $hierarchyLevel); - - // The actually existing block name in $resource - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - // Escape if no resource exists for this block - if (!$resource) { - if (\count($blockNameHierarchy) !== \count(array_unique($blockNameHierarchy))) { - throw new LogicException(sprintf('Unable to render the form because the block names array contains duplicates: "%s".', implode('", "', array_reverse($blockNameHierarchy)))); - } - - throw new LogicException(sprintf('Unable to render the form as none of the following blocks exist: "%s".', implode('", "', array_reverse($blockNameHierarchy)))); - } - - // Merge the passed with the existing attributes - if (isset($variables['attr']) && isset($scopeVariables['attr'])) { - $variables['attr'] = array_replace($scopeVariables['attr'], $variables['attr']); - } - - // Merge the passed with the exist *label* attributes - if (isset($variables['label_attr']) && isset($scopeVariables['label_attr'])) { - $variables['label_attr'] = array_replace($scopeVariables['label_attr'], $variables['label_attr']); - } - - // Do not use array_replace_recursive(), otherwise array variables - // cannot be overwritten - $variables = array_replace($scopeVariables, $variables); - - // In order to make recursive calls possible, we need to store the block hierarchy, - // the current level of the hierarchy and the variables so that this method can - // resume rendering one level higher of the hierarchy when it is called recursively. - // - // We need to store these values in maps (associative arrays) because within a - // call to widget() another call to widget() can be made, but for a different view - // object. These nested calls should not override each other. - $this->blockNameHierarchyMap[$viewAndSuffixCacheKey] = $blockNameHierarchy; - $this->hierarchyLevelMap[$viewAndSuffixCacheKey] = $hierarchyLevel; - - // We also need to store the variables for the view so that we can render other - // blocks for the same view using the same variables as in the outer block. - $this->variableStack[$viewCacheKey][] = $variables; - - // Do the rendering - $html = $this->engine->renderBlock($view, $resource, $blockName, $variables); - - // Clear the stack - array_pop($this->variableStack[$viewCacheKey]); - - // Clear the caches if they were filled for the first time within - // this function call - if ($hierarchyInit) { - unset($this->blockNameHierarchyMap[$viewAndSuffixCacheKey], $this->hierarchyLevelMap[$viewAndSuffixCacheKey]); - } - - if ($varInit) { - unset($this->variableStack[$viewCacheKey]); - } - - if ($renderOnlyOnce) { - $view->setRendered(); - } - - return $html; - } - - /** - * {@inheritdoc} - */ - public function humanize(string $text) - { - return ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $text)))); - } - - /** - * @internal - */ - public function encodeCurrency(Environment $environment, string $text, string $widget = ''): string - { - if ('UTF-8' === $charset = $environment->getCharset()) { - $text = htmlspecialchars($text, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8'); - } else { - $text = htmlentities($text, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8'); - $text = iconv('UTF-8', $charset, $text); - $widget = iconv('UTF-8', $charset, $widget); - } - - return str_replace('{{ widget }}', $widget, $text); - } -} diff --git a/lib/symfony/form/FormRendererEngineInterface.php b/lib/symfony/form/FormRendererEngineInterface.php deleted file mode 100644 index 67b88c90c..000000000 --- a/lib/symfony/form/FormRendererEngineInterface.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Adapter for rendering form templates with a specific templating engine. - * - * @author Bernhard Schussek - */ -interface FormRendererEngineInterface -{ - /** - * Sets the theme(s) to be used for rendering a view and its children. - * - * @param FormView $view The view to assign the theme(s) to - * @param mixed $themes The theme(s). The type of these themes - * is open to the implementation. - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true); - - /** - * Returns the resource for a block name. - * - * The resource is first searched in the themes attached to $view, then - * in the themes of its parent view and so on, until a resource was found. - * - * The type of the resource is decided by the implementation. The resource - * is later passed to {@link renderBlock()} by the rendering algorithm. - * - * @param FormView $view The view for determining the used themes. - * First the themes attached directly to the - * view with {@link setTheme()} are considered, - * then the ones of its parent etc. - * - * @return mixed the renderer resource or false, if none was found - */ - public function getResourceForBlockName(FormView $view, string $blockName); - - /** - * Returns the resource for a block hierarchy. - * - * A block hierarchy is an array which starts with the root of the hierarchy - * and continues with the child of that root, the child of that child etc. - * The following is an example for a block hierarchy: - * - * form_widget - * text_widget - * url_widget - * - * In this example, "url_widget" is the most specific block, while the other - * blocks are its ancestors in the hierarchy. - * - * The second parameter $hierarchyLevel determines the level of the hierarchy - * that should be rendered. For example, if $hierarchyLevel is 2 for the - * above hierarchy, the engine will first look for the block "url_widget", - * then, if that does not exist, for the block "text_widget" etc. - * - * The type of the resource is decided by the implementation. The resource - * is later passed to {@link renderBlock()} by the rendering algorithm. - * - * @param FormView $view The view for determining the used themes. - * First the themes attached directly to - * the view with {@link setTheme()} are - * considered, then the ones of its parent etc. - * @param string[] $blockNameHierarchy The block name hierarchy, with the root block - * at the beginning - * @param int $hierarchyLevel The level in the hierarchy at which to start - * looking. Level 0 indicates the root block, i.e. - * the first element of $blockNameHierarchy. - * - * @return mixed The renderer resource or false, if none was found - */ - public function getResourceForBlockNameHierarchy(FormView $view, array $blockNameHierarchy, int $hierarchyLevel); - - /** - * Returns the hierarchy level at which a resource can be found. - * - * A block hierarchy is an array which starts with the root of the hierarchy - * and continues with the child of that root, the child of that child etc. - * The following is an example for a block hierarchy: - * - * form_widget - * text_widget - * url_widget - * - * The second parameter $hierarchyLevel determines the level of the hierarchy - * that should be rendered. - * - * If we call this method with the hierarchy level 2, the engine will first - * look for a resource for block "url_widget". If such a resource exists, - * the method returns 2. Otherwise it tries to find a resource for block - * "text_widget" (at level 1) and, again, returns 1 if a resource was found. - * The method continues to look for resources until the root level was - * reached and nothing was found. In this case false is returned. - * - * The type of the resource is decided by the implementation. The resource - * is later passed to {@link renderBlock()} by the rendering algorithm. - * - * @param FormView $view The view for determining the used themes. - * First the themes attached directly to - * the view with {@link setTheme()} are - * considered, then the ones of its parent etc. - * @param string[] $blockNameHierarchy The block name hierarchy, with the root block - * at the beginning - * @param int $hierarchyLevel The level in the hierarchy at which to start - * looking. Level 0 indicates the root block, i.e. - * the first element of $blockNameHierarchy. - * - * @return int|false - */ - public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel); - - /** - * Renders a block in the given renderer resource. - * - * The resource can be obtained by calling {@link getResourceForBlock()} - * or {@link getResourceForBlockHierarchy()}. The type of the resource is - * decided by the implementation. - * - * @param FormView $view The view to render - * @param mixed $resource The renderer resource - * @param array $variables The variables to pass to the template - * - * @return string - */ - public function renderBlock(FormView $view, $resource, string $blockName, array $variables = []); -} diff --git a/lib/symfony/form/FormRendererInterface.php b/lib/symfony/form/FormRendererInterface.php deleted file mode 100644 index 04af58baf..000000000 --- a/lib/symfony/form/FormRendererInterface.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Renders a form into HTML. - * - * @author Bernhard Schussek - */ -interface FormRendererInterface -{ - /** - * Returns the engine used by this renderer. - * - * @return FormRendererEngineInterface - */ - public function getEngine(); - - /** - * Sets the theme(s) to be used for rendering a view and its children. - * - * @param FormView $view The view to assign the theme(s) to - * @param mixed $themes The theme(s). The type of these themes - * is open to the implementation. - * @param bool $useDefaultThemes If true, will use default themes specified - * in the renderer - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true); - - /** - * Renders a named block of the form theme. - * - * @param FormView $view The view for which to render the block - * @param array $variables The variables to pass to the template - * - * @return string - */ - public function renderBlock(FormView $view, string $blockName, array $variables = []); - - /** - * Searches and renders a block for a given name suffix. - * - * The block is searched by combining the block names stored in the - * form view with the given suffix. If a block name is found, that - * block is rendered. - * - * If this method is called recursively, the block search is continued - * where a block was found before. - * - * @param FormView $view The view for which to render the block - * @param array $variables The variables to pass to the template - * - * @return string - */ - public function searchAndRenderBlock(FormView $view, string $blockNameSuffix, array $variables = []); - - /** - * Renders a CSRF token. - * - * Use this helper for CSRF protection without the overhead of creating a - * form. - * - * - * - * Check the token in your action using the same token ID. - * - * // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface - * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { - * throw new \RuntimeException('CSRF attack detected.'); - * } - * - * @return string - */ - public function renderCsrfToken(string $tokenId); - - /** - * Makes a technical name human readable. - * - * Sequences of underscores are replaced by single spaces. The first letter - * of the resulting string is capitalized, while all other letters are - * turned to lowercase. - * - * @return string - */ - public function humanize(string $text); -} diff --git a/lib/symfony/form/FormTypeExtensionInterface.php b/lib/symfony/form/FormTypeExtensionInterface.php deleted file mode 100644 index 6810f0ae9..000000000 --- a/lib/symfony/form/FormTypeExtensionInterface.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -interface FormTypeExtensionInterface -{ - /** - * Builds the form. - * - * This method is called after the extended type has built the form to - * further modify it. - * - * @see FormTypeInterface::buildForm() - */ - public function buildForm(FormBuilderInterface $builder, array $options); - - /** - * Builds the view. - * - * This method is called after the extended type has built the view to - * further modify it. - * - * @see FormTypeInterface::buildView() - */ - public function buildView(FormView $view, FormInterface $form, array $options); - - /** - * Finishes the view. - * - * This method is called after the extended type has finished the view to - * further modify it. - * - * @see FormTypeInterface::finishView() - */ - public function finishView(FormView $view, FormInterface $form, array $options); - - public function configureOptions(OptionsResolver $resolver); - - /** - * Gets the extended types. - * - * @return string[] - */ - public static function getExtendedTypes(): iterable; -} diff --git a/lib/symfony/form/FormTypeGuesserChain.php b/lib/symfony/form/FormTypeGuesserChain.php deleted file mode 100644 index 2763d9081..000000000 --- a/lib/symfony/form/FormTypeGuesserChain.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Guess\Guess; - -class FormTypeGuesserChain implements FormTypeGuesserInterface -{ - private $guessers = []; - - /** - * @param FormTypeGuesserInterface[] $guessers - * - * @throws UnexpectedTypeException if any guesser does not implement FormTypeGuesserInterface - */ - public function __construct(iterable $guessers) - { - $tmpGuessers = []; - foreach ($guessers as $guesser) { - if (!$guesser instanceof FormTypeGuesserInterface) { - throw new UnexpectedTypeException($guesser, FormTypeGuesserInterface::class); - } - - if ($guesser instanceof self) { - $tmpGuessers[] = $guesser->guessers; - } else { - $tmpGuessers[] = [$guesser]; - } - } - - $this->guessers = array_merge([], ...$tmpGuessers); - } - - /** - * {@inheritdoc} - */ - public function guessType(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessType($class, $property); - }); - } - - /** - * {@inheritdoc} - */ - public function guessRequired(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessRequired($class, $property); - }); - } - - /** - * {@inheritdoc} - */ - public function guessMaxLength(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessMaxLength($class, $property); - }); - } - - /** - * {@inheritdoc} - */ - public function guessPattern(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessPattern($class, $property); - }); - } - - /** - * Executes a closure for each guesser and returns the best guess from the - * return values. - * - * @param \Closure $closure The closure to execute. Accepts a guesser - * as argument and should return a Guess instance - */ - private function guess(\Closure $closure): ?Guess - { - $guesses = []; - - foreach ($this->guessers as $guesser) { - if ($guess = $closure($guesser)) { - $guesses[] = $guess; - } - } - - return Guess::getBestGuess($guesses); - } -} diff --git a/lib/symfony/form/FormTypeGuesserInterface.php b/lib/symfony/form/FormTypeGuesserInterface.php deleted file mode 100644 index 61e2c5f80..000000000 --- a/lib/symfony/form/FormTypeGuesserInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - */ -interface FormTypeGuesserInterface -{ - /** - * Returns a field guess for a property name of a class. - * - * @return Guess\TypeGuess|null - */ - public function guessType(string $class, string $property); - - /** - * Returns a guess whether a property of a class is required. - * - * @return Guess\ValueGuess|null - */ - public function guessRequired(string $class, string $property); - - /** - * Returns a guess about the field's maximum length. - * - * @return Guess\ValueGuess|null - */ - public function guessMaxLength(string $class, string $property); - - /** - * Returns a guess about the field's pattern. - * - * - When you have a min value, you guess a min length of this min (LOW_CONFIDENCE) - * - Then line below, if this value is a float type, this is wrong so you guess null with MEDIUM_CONFIDENCE to override the previous guess. - * Example: - * You want a float greater than 5, 4.512313 is not valid but length(4.512314) > length(5) - * - * @see https://github.com/symfony/symfony/pull/3927 - * - * @return Guess\ValueGuess|null - */ - public function guessPattern(string $class, string $property); -} diff --git a/lib/symfony/form/FormTypeInterface.php b/lib/symfony/form/FormTypeInterface.php deleted file mode 100644 index 2b9066a51..000000000 --- a/lib/symfony/form/FormTypeInterface.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -interface FormTypeInterface -{ - /** - * Builds the form. - * - * This method is called for each type in the hierarchy starting from the - * top most type. Type extensions can further modify the form. - * - * @param array $options - * - * @see FormTypeExtensionInterface::buildForm() - */ - public function buildForm(FormBuilderInterface $builder, array $options); - - /** - * Builds the form view. - * - * This method is called for each type in the hierarchy starting from the - * top most type. Type extensions can further modify the view. - * - * A view of a form is built before the views of the child forms are built. - * This means that you cannot access child views in this method. If you need - * to do so, move your logic to {@link finishView()} instead. - * - * @param array $options - * - * @see FormTypeExtensionInterface::buildView() - */ - public function buildView(FormView $view, FormInterface $form, array $options); - - /** - * Finishes the form view. - * - * This method gets called for each type in the hierarchy starting from the - * top most type. Type extensions can further modify the view. - * - * When this method is called, views of the form's children have already - * been built and finished and can be accessed. You should only implement - * such logic in this method that actually accesses child views. For everything - * else you are recommended to implement {@link buildView()} instead. - * - * @param array $options - * - * @see FormTypeExtensionInterface::finishView() - */ - public function finishView(FormView $view, FormInterface $form, array $options); - - /** - * Configures the options for this type. - */ - public function configureOptions(OptionsResolver $resolver); - - /** - * Returns the prefix of the template block name for this type. - * - * The block prefix defaults to the underscored short class name with - * the "Type" suffix removed (e.g. "UserProfileType" => "user_profile"). - * - * @return string - */ - public function getBlockPrefix(); - - /** - * Returns the name of the parent type. - * - * @return string|null - */ - public function getParent(); -} diff --git a/lib/symfony/form/FormView.php b/lib/symfony/form/FormView.php deleted file mode 100644 index 0162208e6..000000000 --- a/lib/symfony/form/FormView.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; - -/** - * @author Bernhard Schussek - * - * @implements \ArrayAccess - * @implements \IteratorAggregate - */ -class FormView implements \ArrayAccess, \IteratorAggregate, \Countable -{ - /** - * The variables assigned to this view. - */ - public $vars = [ - 'value' => null, - 'attr' => [], - ]; - - /** - * The parent view. - */ - public $parent; - - /** - * The child views. - * - * @var array - */ - public $children = []; - - /** - * Is the form attached to this renderer rendered? - * - * Rendering happens when either the widget or the row method was called. - * Row implicitly includes widget, however certain rendering mechanisms - * have to skip widget rendering when a row is rendered. - * - * @var bool - */ - private $rendered = false; - - private $methodRendered = false; - - public function __construct(self $parent = null) - { - $this->parent = $parent; - } - - /** - * Returns whether the view was already rendered. - * - * @return bool - */ - public function isRendered() - { - if (true === $this->rendered || 0 === \count($this->children)) { - return $this->rendered; - } - - foreach ($this->children as $child) { - if (!$child->isRendered()) { - return false; - } - } - - return $this->rendered = true; - } - - /** - * Marks the view as rendered. - * - * @return $this - */ - public function setRendered() - { - $this->rendered = true; - - return $this; - } - - /** - * @return bool - */ - public function isMethodRendered() - { - return $this->methodRendered; - } - - public function setMethodRendered() - { - $this->methodRendered = true; - } - - /** - * Returns a child by name (implements \ArrayAccess). - * - * @param int|string $name The child name - * - * @return self - */ - #[\ReturnTypeWillChange] - public function offsetGet($name) - { - return $this->children[$name]; - } - - /** - * Returns whether the given child exists (implements \ArrayAccess). - * - * @param int|string $name The child name - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($name) - { - return isset($this->children[$name]); - } - - /** - * Implements \ArrayAccess. - * - * @return void - * - * @throws BadMethodCallException always as setting a child by name is not allowed - */ - #[\ReturnTypeWillChange] - public function offsetSet($name, $value) - { - throw new BadMethodCallException('Not supported.'); - } - - /** - * Removes a child (implements \ArrayAccess). - * - * @param int|string $name The child name - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($name) - { - unset($this->children[$name]); - } - - /** - * Returns an iterator to iterate over children (implements \IteratorAggregate). - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->children); - } - - /** - * Implements \Countable. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->children); - } -} diff --git a/lib/symfony/form/Forms.php b/lib/symfony/form/Forms.php deleted file mode 100644 index 020e75eff..000000000 --- a/lib/symfony/form/Forms.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Entry point of the Form component. - * - * Use this class to conveniently create new form factories: - * - * use Symfony\Component\Form\Forms; - * - * $formFactory = Forms::createFormFactory(); - * - * $form = $formFactory->createBuilder() - * ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') - * ->add('color', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', [ - * 'choices' => ['Red' => 'r', 'Blue' => 'b'], - * ]) - * ->getForm(); - * - * You can also add custom extensions to the form factory: - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new AcmeExtension()) - * ->getFormFactory(); - * - * If you create custom form types or type extensions, it is - * generally recommended to create your own extensions that lazily - * load these types and type extensions. In projects where performance - * does not matter that much, you can also pass them directly to the - * form factory: - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addType(new PersonType()) - * ->addType(new PhoneNumberType()) - * ->addTypeExtension(new FormTypeHelpTextExtension()) - * ->getFormFactory(); - * - * Support for the Validator component is provided by ValidatorExtension. - * This extension needs a validator object to function properly: - * - * use Symfony\Component\Validator\Validation; - * use Symfony\Component\Form\Extension\Validator\ValidatorExtension; - * - * $validator = Validation::createValidator(); - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new ValidatorExtension($validator)) - * ->getFormFactory(); - * - * @author Bernhard Schussek - */ -final class Forms -{ - /** - * Creates a form factory with the default configuration. - */ - public static function createFormFactory(): FormFactoryInterface - { - return self::createFormFactoryBuilder()->getFormFactory(); - } - - /** - * Creates a form factory builder with the default configuration. - */ - public static function createFormFactoryBuilder(): FormFactoryBuilderInterface - { - return new FormFactoryBuilder(true); - } - - /** - * This class cannot be instantiated. - */ - private function __construct() - { - } -} diff --git a/lib/symfony/form/Guess/Guess.php b/lib/symfony/form/Guess/Guess.php deleted file mode 100644 index 935bbfea1..000000000 --- a/lib/symfony/form/Guess/Guess.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Guess; - -use Symfony\Component\Form\Exception\InvalidArgumentException; - -/** - * Base class for guesses made by TypeGuesserInterface implementation. - * - * Each instance contains a confidence value about the correctness of the guess. - * Thus an instance with confidence HIGH_CONFIDENCE is more likely to be - * correct than an instance with confidence LOW_CONFIDENCE. - * - * @author Bernhard Schussek - */ -abstract class Guess -{ - /** - * Marks an instance with a value that is extremely likely to be correct. - */ - public const VERY_HIGH_CONFIDENCE = 3; - - /** - * Marks an instance with a value that is very likely to be correct. - */ - public const HIGH_CONFIDENCE = 2; - - /** - * Marks an instance with a value that is likely to be correct. - */ - public const MEDIUM_CONFIDENCE = 1; - - /** - * Marks an instance with a value that may be correct. - */ - public const LOW_CONFIDENCE = 0; - - /** - * The confidence about the correctness of the value. - * - * One of VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE, MEDIUM_CONFIDENCE - * and LOW_CONFIDENCE. - * - * @var int - */ - private $confidence; - - /** - * Returns the guess most likely to be correct from a list of guesses. - * - * If there are multiple guesses with the same, highest confidence, the - * returned guess is any of them. - * - * @param static[] $guesses An array of guesses - * - * @return static|null - */ - public static function getBestGuess(array $guesses) - { - $result = null; - $maxConfidence = -1; - - foreach ($guesses as $guess) { - if ($maxConfidence < $confidence = $guess->getConfidence()) { - $maxConfidence = $confidence; - $result = $guess; - } - } - - return $result; - } - - /** - * @throws InvalidArgumentException if the given value of confidence is unknown - */ - public function __construct(int $confidence) - { - if (self::VERY_HIGH_CONFIDENCE !== $confidence && self::HIGH_CONFIDENCE !== $confidence && - self::MEDIUM_CONFIDENCE !== $confidence && self::LOW_CONFIDENCE !== $confidence) { - throw new InvalidArgumentException('The confidence should be one of the constants defined in Guess.'); - } - - $this->confidence = $confidence; - } - - /** - * Returns the confidence that the guessed value is correct. - * - * @return int One of the constants VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE, - * MEDIUM_CONFIDENCE and LOW_CONFIDENCE - */ - public function getConfidence() - { - return $this->confidence; - } -} diff --git a/lib/symfony/form/Guess/TypeGuess.php b/lib/symfony/form/Guess/TypeGuess.php deleted file mode 100644 index ff0c6a749..000000000 --- a/lib/symfony/form/Guess/TypeGuess.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Guess; - -/** - * Contains a guessed class name and a list of options for creating an instance - * of that class. - * - * @author Bernhard Schussek - */ -class TypeGuess extends Guess -{ - private $type; - private $options; - - /** - * @param string $type The guessed field type - * @param array $options The options for creating instances of the - * guessed class - * @param int $confidence The confidence that the guessed class name - * is correct - */ - public function __construct(string $type, array $options, int $confidence) - { - parent::__construct($confidence); - - $this->type = $type; - $this->options = $options; - } - - /** - * Returns the guessed field type. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Returns the guessed options for creating instances of the guessed type. - * - * @return array - */ - public function getOptions() - { - return $this->options; - } -} diff --git a/lib/symfony/form/Guess/ValueGuess.php b/lib/symfony/form/Guess/ValueGuess.php deleted file mode 100644 index fe19dfeb0..000000000 --- a/lib/symfony/form/Guess/ValueGuess.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Guess; - -/** - * Contains a guessed value. - * - * @author Bernhard Schussek - */ -class ValueGuess extends Guess -{ - private $value; - - /** - * @param string|int|bool|null $value The guessed value - * @param int $confidence The confidence that the guessed class name - * is correct - */ - public function __construct($value, int $confidence) - { - parent::__construct($confidence); - - $this->value = $value; - } - - /** - * Returns the guessed value. - * - * @return string|int|bool|null - */ - public function getValue() - { - return $this->value; - } -} diff --git a/lib/symfony/form/LICENSE b/lib/symfony/form/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/form/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/form/NativeRequestHandler.php b/lib/symfony/form/NativeRequestHandler.php deleted file mode 100644 index 7b39ad3a1..000000000 --- a/lib/symfony/form/NativeRequestHandler.php +++ /dev/null @@ -1,256 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Util\ServerParams; - -/** - * A request handler using PHP super globals $_GET, $_POST and $_SERVER. - * - * @author Bernhard Schussek - */ -class NativeRequestHandler implements RequestHandlerInterface -{ - private $serverParams; - - /** - * The allowed keys of the $_FILES array. - */ - private const FILE_KEYS = [ - 'error', - 'name', - 'size', - 'tmp_name', - 'type', - ]; - - public function __construct(ServerParams $params = null) - { - $this->serverParams = $params ?? new ServerParams(); - } - - /** - * {@inheritdoc} - * - * @throws Exception\UnexpectedTypeException If the $request is not null - */ - public function handleRequest(FormInterface $form, $request = null) - { - if (null !== $request) { - throw new UnexpectedTypeException($request, 'null'); - } - - $name = $form->getName(); - $method = $form->getConfig()->getMethod(); - - if ($method !== self::getRequestMethod()) { - return; - } - - // For request methods that must not have a request body we fetch data - // from the query string. Otherwise we look for data in the request body. - if ('GET' === $method || 'HEAD' === $method || 'TRACE' === $method) { - if ('' === $name) { - $data = $_GET; - } else { - // Don't submit GET requests if the form's name does not exist - // in the request - if (!isset($_GET[$name])) { - return; - } - - $data = $_GET[$name]; - } - } else { - // Mark the form with an error if the uploaded size was too large - // This is done here and not in FormValidator because $_POST is - // empty when that error occurs. Hence the form is never submitted. - if ($this->serverParams->hasPostMaxSizeBeenExceeded()) { - // Submit the form, but don't clear the default values - $form->submit(null, false); - - $form->addError(new FormError( - $form->getConfig()->getOption('upload_max_size_message')(), - null, - ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()] - )); - - return; - } - - $fixedFiles = []; - foreach ($_FILES as $fileKey => $file) { - $fixedFiles[$fileKey] = self::stripEmptyFiles(self::fixPhpFilesArray($file)); - } - - if ('' === $name) { - $params = $_POST; - $files = $fixedFiles; - } elseif (\array_key_exists($name, $_POST) || \array_key_exists($name, $fixedFiles)) { - $default = $form->getConfig()->getCompound() ? [] : null; - $params = \array_key_exists($name, $_POST) ? $_POST[$name] : $default; - $files = \array_key_exists($name, $fixedFiles) ? $fixedFiles[$name] : $default; - } else { - // Don't submit the form if it is not present in the request - return; - } - - if (\is_array($params) && \is_array($files)) { - $data = array_replace_recursive($params, $files); - } else { - $data = $params ?: $files; - } - } - - // Don't auto-submit the form unless at least one field is present. - if ('' === $name && \count(array_intersect_key($data, $form->all())) <= 0) { - return; - } - - if (\is_array($data) && \array_key_exists('_method', $data) && $method === $data['_method'] && !$form->has('_method')) { - unset($data['_method']); - } - - $form->submit($data, 'PATCH' !== $method); - } - - /** - * {@inheritdoc} - */ - public function isFileUpload($data) - { - // POST data will always be strings or arrays of strings. Thus, we can be sure - // that the submitted data is a file upload if the "error" value is an integer - // (this value must have been injected by PHP itself). - return \is_array($data) && isset($data['error']) && \is_int($data['error']); - } - - /** - * @return int|null - */ - public function getUploadFileError($data) - { - if (!\is_array($data)) { - return null; - } - - if (!isset($data['error'])) { - return null; - } - - if (!\is_int($data['error'])) { - return null; - } - - if (\UPLOAD_ERR_OK === $data['error']) { - return null; - } - - return $data['error']; - } - - /** - * Returns the method used to submit the request to the server. - */ - private static function getRequestMethod(): string - { - $method = isset($_SERVER['REQUEST_METHOD']) - ? strtoupper($_SERVER['REQUEST_METHOD']) - : 'GET'; - - if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { - $method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']); - } - - return $method; - } - - /** - * Fixes a malformed PHP $_FILES array. - * - * PHP has a bug that the format of the $_FILES array differs, depending on - * whether the uploaded file fields had normal field names or array-like - * field names ("normal" vs. "parent[child]"). - * - * This method fixes the array to look like the "normal" $_FILES array. - * - * It's safe to pass an already converted array, in which case this method - * just returns the original array unmodified. - * - * This method is identical to {@link \Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray} - * and should be kept as such in order to port fixes quickly and easily. - * - * @return mixed - */ - private static function fixPhpFilesArray($data) - { - if (!\is_array($data)) { - return $data; - } - - // Remove extra key added by PHP 8.1. - unset($data['full_path']); - $keys = array_keys($data); - sort($keys); - - if (self::FILE_KEYS !== $keys || !isset($data['name']) || !\is_array($data['name'])) { - return $data; - } - - $files = $data; - foreach (self::FILE_KEYS as $k) { - unset($files[$k]); - } - - foreach ($data['name'] as $key => $name) { - $files[$key] = self::fixPhpFilesArray([ - 'error' => $data['error'][$key], - 'name' => $name, - 'type' => $data['type'][$key], - 'tmp_name' => $data['tmp_name'][$key], - 'size' => $data['size'][$key], - ]); - } - - return $files; - } - - /** - * Sets empty uploaded files to NULL in the given uploaded files array. - * - * @return mixed - */ - private static function stripEmptyFiles($data) - { - if (!\is_array($data)) { - return $data; - } - - $keys = array_keys($data); - sort($keys); - - if (self::FILE_KEYS === $keys) { - if (\UPLOAD_ERR_NO_FILE === $data['error']) { - return null; - } - - return $data; - } - - foreach ($data as $key => $value) { - $data[$key] = self::stripEmptyFiles($value); - } - - return $data; - } -} diff --git a/lib/symfony/form/PreloadedExtension.php b/lib/symfony/form/PreloadedExtension.php deleted file mode 100644 index c6767dc3e..000000000 --- a/lib/symfony/form/PreloadedExtension.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\InvalidArgumentException; - -/** - * A form extension with preloaded types, type extensions and type guessers. - * - * @author Bernhard Schussek - */ -class PreloadedExtension implements FormExtensionInterface -{ - private $types = []; - private $typeExtensions = []; - private $typeGuesser; - - /** - * Creates a new preloaded extension. - * - * @param FormTypeInterface[] $types The types that the extension should support - * @param FormTypeExtensionInterface[][] $typeExtensions The type extensions that the extension should support - */ - public function __construct(array $types, array $typeExtensions, FormTypeGuesserInterface $typeGuesser = null) - { - $this->typeExtensions = $typeExtensions; - $this->typeGuesser = $typeGuesser; - - foreach ($types as $type) { - $this->types[\get_class($type)] = $type; - } - } - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (!isset($this->types[$name])) { - throw new InvalidArgumentException(sprintf('The type "%s" cannot be loaded by this extension.', $name)); - } - - return $this->types[$name]; - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - return isset($this->types[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions(string $name) - { - return $this->typeExtensions[$name] - ?? []; - } - - /** - * {@inheritdoc} - */ - public function hasTypeExtensions(string $name) - { - return !empty($this->typeExtensions[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - return $this->typeGuesser; - } -} diff --git a/lib/symfony/form/README.md b/lib/symfony/form/README.md deleted file mode 100644 index 0cda654d7..000000000 --- a/lib/symfony/form/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Form Component -============== - -The Form component allows you to easily create, process and reuse HTML forms. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/form.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/form/RequestHandlerInterface.php b/lib/symfony/form/RequestHandlerInterface.php deleted file mode 100644 index 65d86e224..000000000 --- a/lib/symfony/form/RequestHandlerInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Submits forms if they were submitted. - * - * @author Bernhard Schussek - */ -interface RequestHandlerInterface -{ - /** - * Submits a form if it was submitted. - * - * @param mixed $request The current request - */ - public function handleRequest(FormInterface $form, $request = null); - - /** - * Returns true if the given data is a file upload. - * - * @param mixed $data The form field data - * - * @return bool - */ - public function isFileUpload($data); -} diff --git a/lib/symfony/form/ResolvedFormType.php b/lib/symfony/form/ResolvedFormType.php deleted file mode 100644 index b484c9149..000000000 --- a/lib/symfony/form/ResolvedFormType.php +++ /dev/null @@ -1,224 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\OptionsResolver\Exception\ExceptionInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A wrapper for a form type and its extensions. - * - * @author Bernhard Schussek - */ -class ResolvedFormType implements ResolvedFormTypeInterface -{ - /** - * @var FormTypeInterface - */ - private $innerType; - - /** - * @var FormTypeExtensionInterface[] - */ - private $typeExtensions; - - /** - * @var ResolvedFormTypeInterface|null - */ - private $parent; - - /** - * @var OptionsResolver - */ - private $optionsResolver; - - /** - * @param FormTypeExtensionInterface[] $typeExtensions - */ - public function __construct(FormTypeInterface $innerType, array $typeExtensions = [], ResolvedFormTypeInterface $parent = null) - { - foreach ($typeExtensions as $extension) { - if (!$extension instanceof FormTypeExtensionInterface) { - throw new UnexpectedTypeException($extension, FormTypeExtensionInterface::class); - } - } - - $this->innerType = $innerType; - $this->typeExtensions = $typeExtensions; - $this->parent = $parent; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return $this->innerType->getBlockPrefix(); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->parent; - } - - /** - * {@inheritdoc} - */ - public function getInnerType() - { - return $this->innerType; - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions() - { - return $this->typeExtensions; - } - - /** - * {@inheritdoc} - */ - public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []) - { - try { - $options = $this->getOptionsResolver()->resolve($options); - } catch (ExceptionInterface $e) { - throw new $e(sprintf('An error has occurred resolving the options of the form "%s": ', get_debug_type($this->getInnerType())).$e->getMessage(), $e->getCode(), $e); - } - - // Should be decoupled from the specific option at some point - $dataClass = $options['data_class'] ?? null; - - $builder = $this->newBuilder($name, $dataClass, $factory, $options); - $builder->setType($this); - - return $builder; - } - - /** - * {@inheritdoc} - */ - public function createView(FormInterface $form, FormView $parent = null) - { - return $this->newView($parent); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (null !== $this->parent) { - $this->parent->buildForm($builder, $options); - } - - $this->innerType->buildForm($builder, $options); - - foreach ($this->typeExtensions as $extension) { - $extension->buildForm($builder, $options); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if (null !== $this->parent) { - $this->parent->buildView($view, $form, $options); - } - - $this->innerType->buildView($view, $form, $options); - - foreach ($this->typeExtensions as $extension) { - $extension->buildView($view, $form, $options); - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - if (null !== $this->parent) { - $this->parent->finishView($view, $form, $options); - } - - $this->innerType->finishView($view, $form, $options); - - foreach ($this->typeExtensions as $extension) { - /* @var FormTypeExtensionInterface $extension */ - $extension->finishView($view, $form, $options); - } - } - - /** - * {@inheritdoc} - */ - public function getOptionsResolver() - { - if (null === $this->optionsResolver) { - if (null !== $this->parent) { - $this->optionsResolver = clone $this->parent->getOptionsResolver(); - } else { - $this->optionsResolver = new OptionsResolver(); - } - - $this->innerType->configureOptions($this->optionsResolver); - - foreach ($this->typeExtensions as $extension) { - $extension->configureOptions($this->optionsResolver); - } - } - - return $this->optionsResolver; - } - - /** - * Creates a new builder instance. - * - * Override this method if you want to customize the builder class. - * - * @return FormBuilderInterface - */ - protected function newBuilder(string $name, ?string $dataClass, FormFactoryInterface $factory, array $options) - { - if ($this->innerType instanceof ButtonTypeInterface) { - return new ButtonBuilder($name, $options); - } - - if ($this->innerType instanceof SubmitButtonTypeInterface) { - return new SubmitButtonBuilder($name, $options); - } - - return new FormBuilder($name, $dataClass, new EventDispatcher(), $factory, $options); - } - - /** - * Creates a new view instance. - * - * Override this method if you want to customize the view class. - * - * @return FormView - */ - protected function newView(FormView $parent = null) - { - return new FormView($parent); - } -} diff --git a/lib/symfony/form/ResolvedFormTypeFactory.php b/lib/symfony/form/ResolvedFormTypeFactory.php deleted file mode 100644 index d93d1c06d..000000000 --- a/lib/symfony/form/ResolvedFormTypeFactory.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - */ -class ResolvedFormTypeFactory implements ResolvedFormTypeFactoryInterface -{ - /** - * {@inheritdoc} - */ - public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null) - { - return new ResolvedFormType($type, $typeExtensions, $parent); - } -} diff --git a/lib/symfony/form/ResolvedFormTypeFactoryInterface.php b/lib/symfony/form/ResolvedFormTypeFactoryInterface.php deleted file mode 100644 index 4f133e039..000000000 --- a/lib/symfony/form/ResolvedFormTypeFactoryInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Creates ResolvedFormTypeInterface instances. - * - * This interface allows you to use your custom ResolvedFormTypeInterface - * implementation, within which you can customize the concrete FormBuilderInterface - * implementations or FormView subclasses that are used by the framework. - * - * @author Bernhard Schussek - */ -interface ResolvedFormTypeFactoryInterface -{ - /** - * Resolves a form type. - * - * @param FormTypeExtensionInterface[] $typeExtensions - * - * @return ResolvedFormTypeInterface - * - * @throws Exception\UnexpectedTypeException if the types parent {@link FormTypeInterface::getParent()} is not a string - * @throws Exception\InvalidArgumentException if the types parent cannot be retrieved from any extension - */ - public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null); -} diff --git a/lib/symfony/form/ResolvedFormTypeInterface.php b/lib/symfony/form/ResolvedFormTypeInterface.php deleted file mode 100644 index 6074af9cb..000000000 --- a/lib/symfony/form/ResolvedFormTypeInterface.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A wrapper for a form type and its extensions. - * - * @author Bernhard Schussek - */ -interface ResolvedFormTypeInterface -{ - /** - * Returns the prefix of the template block name for this type. - * - * @return string - */ - public function getBlockPrefix(); - - /** - * Returns the parent type. - * - * @return self|null - */ - public function getParent(); - - /** - * Returns the wrapped form type. - * - * @return FormTypeInterface - */ - public function getInnerType(); - - /** - * Returns the extensions of the wrapped form type. - * - * @return FormTypeExtensionInterface[] - */ - public function getTypeExtensions(); - - /** - * Creates a new form builder for this type. - * - * @param string $name The name for the builder - * - * @return FormBuilderInterface - */ - public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []); - - /** - * Creates a new form view for a form of this type. - * - * @return FormView - */ - public function createView(FormInterface $form, FormView $parent = null); - - /** - * Configures a form builder for the type hierarchy. - */ - public function buildForm(FormBuilderInterface $builder, array $options); - - /** - * Configures a form view for the type hierarchy. - * - * It is called before the children of the view are built. - */ - public function buildView(FormView $view, FormInterface $form, array $options); - - /** - * Finishes a form view for the type hierarchy. - * - * It is called after the children of the view have been built. - */ - public function finishView(FormView $view, FormInterface $form, array $options); - - /** - * Returns the configured options resolver used for this type. - * - * @return OptionsResolver - */ - public function getOptionsResolver(); -} diff --git a/lib/symfony/form/Resources/config/validation.xml b/lib/symfony/form/Resources/config/validation.xml deleted file mode 100644 index 918f101f4..000000000 --- a/lib/symfony/form/Resources/config/validation.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/lib/symfony/form/Resources/translations/validators.af.xlf b/lib/symfony/form/Resources/translations/validators.af.xlf deleted file mode 100644 index 58cd939cf..000000000 --- a/lib/symfony/form/Resources/translations/validators.af.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Hierdie vorm moet nie ekstra velde bevat nie. - - - The uploaded file was too large. Please try to upload a smaller file. - Die opgelaaide lêer was te groot. Probeer asseblief 'n kleiner lêer. - - - The CSRF token is invalid. Please try to resubmit the form. - Die CSRF-teken is ongeldig. Probeer asseblief om die vorm weer in te dien. - - - This value is not a valid HTML5 color. - Hierdie waarde is nie 'n geldige HTML5 kleur nie. - - - Please enter a valid birthdate. - Voer asseblief 'n geldige geboortedatum in. - - - The selected choice is invalid. - Die gekiesde opsie is nie geldig nie. - - - The collection is invalid. - Die versameling is nie geldig nie. - - - Please select a valid color. - Kies asseblief 'n geldige kleur. - - - Please select a valid country. - Kies asseblief 'n geldige land. - - - Please select a valid currency. - Kies asseblief 'n geldige geldeenheid. - - - Please choose a valid date interval. - Kies asseblief 'n geldige datum interval. - - - Please enter a valid date and time. - Voer asseblilef 'n geldige datum en tyd in. - - - Please enter a valid date. - Voer asseblief 'n geldige datum in. - - - Please select a valid file. - Kies asseblief 'n geldige lêer. - - - The hidden field is invalid. - Die versteekte veld is nie geldig nie. - - - Please enter an integer. - Voer asseblief 'n geldige heeltal in. - - - Please select a valid language. - Kies assblief 'n geldige taal. - - - Please select a valid locale. - Voer assebliefn 'n geldige locale in. - - - Please enter a valid money amount. - Voer asseblief 'n geldige bedrag in. - - - Please enter a number. - Voer asseblief 'n nommer in. - - - The password is invalid. - Die wagwoord is ongeldig. - - - Please enter a percentage value. - Voer asseblief 'n geldige persentasie waarde in. - - - The values do not match. - Die waardes is nie dieselfde nie. - - - Please enter a valid time. - Voer asseblief 'n geldige tyd in time. - - - Please select a valid timezone. - Kies asseblief 'n geldige tydsone. - - - Please enter a valid URL. - Voer asseblief 'n geldige URL in. - - - Please enter a valid search term. - Voer asseblief 'n geldige soek term in. - - - Please provide a valid phone number. - Verskaf asseblief 'n geldige telefoonnommer. - - - The checkbox has an invalid value. - Die blokkie het 'n ongeldige waarde. - - - Please enter a valid email address. - Voer asseblief 'n geldige e-pos adres in. - - - Please select a valid option. - Kies asseblief 'n geldige opsie. - - - Please select a valid range. - Kies asseblief 'n geldige reeks. - - - Please enter a valid week. - Voer assblief 'n geldige week in. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.ar.xlf b/lib/symfony/form/Resources/translations/validators.ar.xlf deleted file mode 100644 index e30daaf1d..000000000 --- a/lib/symfony/form/Resources/translations/validators.ar.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - هذا النموذج يجب الا يحتوى على اى حقول اضافية. - - - The uploaded file was too large. Please try to upload a smaller file. - مساحة الملف المرسل كبيرة. من فضلك حاول ارسال ملف اصغر. - - - The CSRF token is invalid. Please try to resubmit the form. - قيمة رمز الموقع غير صحيحة. من فضلك اعد ارسال النموذج. - - - This value is not a valid HTML5 color. - هذه القيمة ليست لون HTML5 صالحًا. - - - Please enter a valid birthdate. - الرجاء ادخال تاريخ ميلاد صالح. - - - The selected choice is invalid. - الاختيار المحدد غير صالح. - - - The collection is invalid. - المجموعة غير صالحة. - - - Please select a valid color. - الرجاء اختيار لون صالح. - - - Please select a valid country. - الرجاء اختيار بلد صالح. - - - Please select a valid currency. - الرجاء اختيار عملة صالحة. - - - Please choose a valid date interval. - الرجاء اختيار فاصل زمني صالح. - - - Please enter a valid date and time. - الرجاء إدخال تاريخ ووقت صالحين. - - - Please enter a valid date. - الرجاء إدخال تاريخ صالح. - - - Please select a valid file. - الرجاء اختيار ملف صالح. - - - The hidden field is invalid. - الحقل المخفي غير صالح. - - - Please enter an integer. - الرجاء إدخال عدد صحيح. - - - Please select a valid language. - الرجاء اختيار لغة صالحة. - - - Please select a valid locale. - الرجاء اختيار لغة صالحة. - - - Please enter a valid money amount. - الرجاء إدخال مبلغ مالي صالح. - - - Please enter a number. - الرجاء إدخال رقم. - - - The password is invalid. - كلمة المرور غير صحيحة. - - - Please enter a percentage value. - الرجاء إدخال قيمة النسبة المئوية. - - - The values do not match. - القيم لا تتطابق. - - - Please enter a valid time. - الرجاء إدخال وقت صالح. - - - Please select a valid timezone. - الرجاء تحديد منطقة زمنية صالحة. - - - Please enter a valid URL. - أدخل عنوان الرابط صحيح من فضلك. - - - Please enter a valid search term. - الرجاء إدخال مصطلح البحث ساري المفعول. - - - Please provide a valid phone number. - يرجى تقديم رقم هاتف صالح. - - - The checkbox has an invalid value. - خانة الاختيار لها قيمة غير صالحة. - - - Please enter a valid email address. - رجاء قم بإدخال بريد الكتروني صحيح - - - Please select a valid option. - الرجاء تحديد خيار صالح. - - - Please select a valid range. - يرجى تحديد نطاق صالح. - - - Please enter a valid week. - الرجاء إدخال أسبوع صالح. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.az.xlf b/lib/symfony/form/Resources/translations/validators.az.xlf deleted file mode 100644 index b9269706d..000000000 --- a/lib/symfony/form/Resources/translations/validators.az.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Bu formada əlavə sahə olmamalıdır. - - - The uploaded file was too large. Please try to upload a smaller file. - Yüklənən fayl çox böyükdür. Lütfən daha kiçik fayl yükləyin. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF nişanı yanlışdır. Lütfen formanı yenidən göndərin. - - - This value is not a valid HTML5 color. - Bu dəyər doğru bir HTML5 rəngi deyil. - - - Please enter a valid birthdate. - Zəhmət olmasa doğru bir doğum günü daxil edin. - - - The selected choice is invalid. - Seçilmiş seçim doğru deyil. - - - The collection is invalid. - Kolleksiya doğru deyil. - - - Please select a valid color. - Zəhmət olmasa doğru bir rəng seçin. - - - Please select a valid country. - Zəhmət olmasa doğru bir ölkə seçin. - - - Please select a valid currency. - Zəhmət olmasa doğru bir valyuta seçin. - - - Please choose a valid date interval. - Zəhmət olmasa doğru bir tarix aralığı seçin. - - - Please enter a valid date and time. - Zəhmət olmasa doğru bir tarix ve saat daxil edin. - - - Please enter a valid date. - Zəhmət olmasa doğru bir tarix daxil edin. - - - Please select a valid file. - Zəhmət olmasa doğru bir fayl seçin. - - - The hidden field is invalid. - Gizli sahə doğru deyil. - - - Please enter an integer. - Zəhmət olmasa bir tam ədəd daxil edin. - - - Please select a valid language. - Zəhmət olmasa doğru bir dil seçin. - - - Please select a valid locale. - Zəhmət olmasa doğru bir yer seçin. - - - Please enter a valid money amount. - Zəhmət olmasa doğru bir pul miqdarı daxil edin. - - - Please enter a number. - Zəhmət olmasa doğru bir rəqəm daxil edin. - - - The password is invalid. - Parol doğru deyil. - - - Please enter a percentage value. - Zəhmət olmasa doğru bir faiz dəyəri daxil edin. - - - The values do not match. - Dəyərlər örtüşmür. - - - Please enter a valid time. - Zəhmət olmasa doğru bir saat daxil edin. - - - Please select a valid timezone. - Zəhmət olmasa doğru bir saat qurşağı seçin. - - - Please enter a valid URL. - Zəhmət olmasa doğru bir URL daxil edin. - - - Please enter a valid search term. - Zəhmət olmasa doğru bir axtarış termini daxil edin. - - - Please provide a valid phone number. - Zəhmət olmasa doğru bir telefon nömrəsi seçin. - - - The checkbox has an invalid value. - Seçim qutusunda doğru olmayan dəyər var. - - - Please enter a valid email address. - Zəhmət olmasa doğru bir e-poçt seçin. - - - Please select a valid option. - Zəhmət olmasa doğru bir variant seçin. - - - Please select a valid range. - Zəhmət olmasa doğru bir aralıq seçin. - - - Please enter a valid week. - Zəhmət olmasa doğru bir həftə seçin. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.be.xlf b/lib/symfony/form/Resources/translations/validators.be.xlf deleted file mode 100644 index 0513ca1dc..000000000 --- a/lib/symfony/form/Resources/translations/validators.be.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Гэта форма не павінна мець дадатковых палей. - - - The uploaded file was too large. Please try to upload a smaller file. - Запампаваны файл быў занадта вялікім. Калі ласка, паспрабуйце запампаваць файл меншага памеру. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-токен не сапраўдны. Калі ласка, паспрабуйце яшчэ раз адправіць форму. - - - This value is not a valid HTML5 color. - Значэнне не з'яўляецца карэктным HTML5 колерам. - - - Please enter a valid birthdate. - Калі ласка, увядзіце карэктную дату нараджэння. - - - The selected choice is invalid. - Выбраны варыянт некарэктны. - - - The collection is invalid. - Калекцыя некарэктна. - - - Please select a valid color. - Калі ласка, выберыце карэктны колер. - - - Please select a valid country. - Калі ласка, выберыце карэктную краіну. - - - Please select a valid currency. - Калі ласка, выберыце карэктную валюту. - - - Please choose a valid date interval. - Калі ласка, выберыце карэктны інтэрвал дат. - - - Please enter a valid date and time. - Калі ласка, увядзіце карэктныя дату і час. - - - Please enter a valid date. - Калі ласка, увядзіце карэктную дату. - - - Please select a valid file. - Калі ласка, выберыце карэктны файл. - - - The hidden field is invalid. - Значэнне схаванага поля некарэктна. - - - Please enter an integer. - Калі ласка, увядзіце цэлы лік. - - - Please select a valid language. - Калі ласка, выберыце карэктную мову. - - - Please select a valid locale. - Калі ласка, выберыце карэктную лакаль. - - - Please enter a valid money amount. - Калі ласка, увядзіце карэктную колькасць грошай. - - - Please enter a number. - Калі ласка, увядзіце нумар. - - - The password is invalid. - Няправільны пароль. - - - Please enter a percentage value. - Калі ласка, увядзіце працэнтнае значэнне. - - - The values do not match. - Значэнні не супадаюць. - - - Please enter a valid time. - Калі ласка, увядзіце карэктны час. - - - Please select a valid timezone. - Калі ласка, выберыце карэктны гадзінны пояс. - - - Please enter a valid URL. - Калі ласка, увядзіце карэктны URL. - - - Please enter a valid search term. - Калі ласка, увядзіце карэктны пошукавы запыт. - - - Please provide a valid phone number. - Калі ласка, увядзіце карэктны нумар тэлефона. - - - The checkbox has an invalid value. - Флажок мае некарэктнае значэнне. - - - Please enter a valid email address. - Калі ласка, увядзіце карэктны адрас электроннай пошты. - - - Please select a valid option. - Калі ласка, выберыце карэктны варыянт. - - - Please select a valid range. - Калі ласка, выберыце карэктны дыяпазон. - - - Please enter a valid week. - Калі ласка, увядзіце карэктны тыдзень. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.bg.xlf b/lib/symfony/form/Resources/translations/validators.bg.xlf deleted file mode 100644 index 32fa94331..000000000 --- a/lib/symfony/form/Resources/translations/validators.bg.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Тази форма не трябва да съдържа допълнителни полета. - - - The uploaded file was too large. Please try to upload a smaller file. - Каченият файл е твърде голям. Моля, опитайте да качите по-малък файл. - - - The CSRF token is invalid. Please try to resubmit the form. - Невалиден CSRF токен. Моля, опитайте да изпратите формата отново. - - - This value is not a valid HTML5 color. - Стойността не е валиден HTML5 цвят. - - - Please enter a valid birthdate. - Моля въведете валидна дата на раждане. - - - The selected choice is invalid. - Избраните стойности не са валидни. - - - The collection is invalid. - Колекцията не е валидна. - - - Please select a valid color. - Моля изберете валиден цвят. - - - Please select a valid country. - Моля изберете валидна държава. - - - Please select a valid currency. - Моля изберете валидна валута. - - - Please choose a valid date interval. - Моля изберете валиден интервал от дати. - - - Please enter a valid date and time. - Моля въведете валидни дата и час. - - - Please enter a valid date. - Моля въведете валидна дата. - - - Please select a valid file. - Моля изберете валиден файл. - - - The hidden field is invalid. - Скритото поле е невалидно. - - - Please enter an integer. - Моля попълнете цяло число. - - - Please select a valid language. - Моля изберете валиден език. - - - Please select a valid locale. - Моля изберете валиден език. - - - Please enter a valid money amount. - Моля въведете валидна парична сума. - - - Please enter a number. - Моля въведете число. - - - The password is invalid. - Паролата е невалидна. - - - Please enter a percentage value. - Моля въведете процентна стойност. - - - The values do not match. - Стойностите не съвпадат. - - - Please enter a valid time. - Моля въведете валидно време. - - - Please select a valid timezone. - Моля изберете валидна часова зона. - - - Please enter a valid URL. - Моля въведете валиден URL. - - - Please enter a valid search term. - Моля въведете валидно търсене. - - - Please provide a valid phone number. - Моля осигурете валиден телефонен номер. - - - The checkbox has an invalid value. - Отметката има невалидна стойност. - - - Please enter a valid email address. - Моля въведете валидна ел. поща. - - - Please select a valid option. - Моля изберете валидна опция. - - - Please select a valid range. - Моля изберете валиден обхват. - - - Please enter a valid week. - Моля въведете валидна седмица. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.bs.xlf b/lib/symfony/form/Resources/translations/validators.bs.xlf deleted file mode 100644 index 319f91544..000000000 --- a/lib/symfony/form/Resources/translations/validators.bs.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ovaj obrazac ne bi trebalo da sadrži dodatna polja. - - - The uploaded file was too large. Please try to upload a smaller file. - Prenijeta (uploaded) datoteka je prevelika. Molim pokušajte prenijeti manju datoteku. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrijednost nije ispravna. Molim pokušajte ponovo da pošaljete obrazac. - - - This value is not a valid HTML5 color. - Ova vrijednost nije važeća HTML5 boja. - - - Please enter a valid birthdate. - Molim upišite ispravan datum rođenja. - - - The selected choice is invalid. - Odabrani izbor nije ispravan. - - - The collection is invalid. - Ova kolekcija nije ispravna. - - - Please select a valid color. - Molim izaberite ispravnu boju. - - - Please select a valid country. - Molim izaberite ispravnu državu. - - - Please select a valid currency. - Molim izaberite ispravnu valutu. - - - Please choose a valid date interval. - Molim izaberite ispravan datumski interval. - - - Please enter a valid date and time. - Molim upišite ispravan datum i vrijeme. - - - Please enter a valid date. - Molim upišite ispravan datum. - - - Please select a valid file. - Molim izaberite ispravnu datoteku. - - - The hidden field is invalid. - Skriveno polje nije ispravno. - - - Please enter an integer. - Molim upišite cijeli broj (integer). - - - Please select a valid language. - Molim izaberite ispravan jezik. - - - Please select a valid locale. - Molim izaberite ispravnu lokalizaciju. - - - Please enter a valid money amount. - Molim upišite ispravnu količinu novca. - - - Please enter a number. - Molim upišite broj. - - - The password is invalid. - Ova lozinka nije ispravna. - - - Please enter a percentage value. - Molim upišite procentualnu vrijednost. - - - The values do not match. - Date vrijednosti se ne poklapaju. - - - Please enter a valid time. - Molim upišite ispravno vrijeme. - - - Please select a valid timezone. - Molim izaberite ispravnu vremensku zonu. - - - Please enter a valid URL. - Molim upišite ispravan URL. - - - Please enter a valid search term. - Molim upišite ispravan termin za pretragu. - - - Please provide a valid phone number. - Molim navedite ispravan broj telefona. - - - The checkbox has an invalid value. - Polje za potvrdu sadrži neispravnu vrijednost. - - - Please enter a valid email address. - Molim upišite ispravnu email adresu. - - - Please select a valid option. - Molim izaberite ispravnu opciju. - - - Please select a valid range. - Molim izaberite ispravan opseg. - - - Please enter a valid week. - Molim upišite ispravnu sedmicu. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.ca.xlf b/lib/symfony/form/Resources/translations/validators.ca.xlf deleted file mode 100644 index 693796080..000000000 --- a/lib/symfony/form/Resources/translations/validators.ca.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Aquest formulari no hauria de contenir camps addicionals. - - - The uploaded file was too large. Please try to upload a smaller file. - L'arxiu pujat és massa gran. Per favor, pugi un arxiu més petit. - - - The CSRF token is invalid. Please try to resubmit the form. - El token CSRF no és vàlid. Per favor, provi d'enviar novament el formulari. - - - This value is not a valid HTML5 color. - Aquest valor no és un color HTML5 valid. - - - Please enter a valid birthdate. - Per favor introdueix una data d'aniversari valida. - - - The selected choice is invalid. - L'opció escollida és invalida. - - - The collection is invalid. - La col·lecció és invalida. - - - Please select a valid color. - Per favor selecciona un color vàlid. - - - Please select a valid country. - Per favor selecciona una ciutat vàlida. - - - Please select a valid currency. - Per favor selecciona una moneda vàlida. - - - Please choose a valid date interval. - Per favor escull un interval de dates vàlides. - - - Please enter a valid date and time. - Per favor introdueix una data i temps vàlid. - - - Please enter a valid date. - Per favor introdueix una data vàlida. - - - Please select a valid file. - Per favor selecciona un arxiu vàlid. - - - The hidden field is invalid. - El camp ocult és invàlid. - - - Please enter an integer. - Per favor introdueix un enter. - - - Please select a valid language. - Per favor selecciona un idioma vàlid. - - - Please select a valid locale. - Per favor seleccioneu una configuració regional vàlida - - - Please enter a valid money amount. - Per favor introdueix una quantitat de diners vàlids. - - - Please enter a number. - Per favor introdueix un número. - - - The password is invalid. - La contrasenya es invàlida. - - - Please enter a percentage value. - Per favor introdueix un valor percentual. - - - The values do not match. - Els valors no coincideixen. - - - Please enter a valid time. - Per favor introdueix un temps vàlid. - - - Please select a valid timezone. - Per favor selecciona una zona horària vàlida. - - - Please enter a valid URL. - Per favor introdueix una URL vàlida. - - - Please enter a valid search term. - Per favor introdueix un concepte de cerca vàlid. - - - Please provide a valid phone number. - Per favor introdueix un número de telèfon vàlid. - - - The checkbox has an invalid value. - La casella de selecció te un valor invàlid. - - - Please enter a valid email address. - Per favor introdueix un correu electrònic vàlid. - - - Please select a valid option. - Per favor selecciona una opció vàlida. - - - Please select a valid range. - Per favor selecciona un rang vàlid. - - - Please enter a valid week. - Per favor introdueix una setmana vàlida. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.cs.xlf b/lib/symfony/form/Resources/translations/validators.cs.xlf deleted file mode 100644 index 3c4052b1c..000000000 --- a/lib/symfony/form/Resources/translations/validators.cs.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Tato skupina polí nesmí obsahovat další pole. - - - The uploaded file was too large. Please try to upload a smaller file. - Nahraný soubor je příliš velký. Nahrajte prosím menší soubor. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token je neplatný. Zkuste prosím znovu odeslat formulář. - - - This value is not a valid HTML5 color. - Tato hodnota není platná HTML5 barva. - - - Please enter a valid birthdate. - Prosím zadejte platný datum narození. - - - The selected choice is invalid. - Vybraná možnost není platná. - - - The collection is invalid. - Kolekce není platná. - - - Please select a valid color. - Prosím vyberte platnou barvu. - - - Please select a valid country. - Prosím vyberte platnou zemi. - - - Please select a valid currency. - Prosím vyberte platnou měnu. - - - Please choose a valid date interval. - Prosím vyberte platné rozpětí dat. - - - Please enter a valid date and time. - Prosím zadejte platný datum a čas. - - - Please enter a valid date. - Prosím zadejte platný datum. - - - Please select a valid file. - Prosím vyberte platný soubor. - - - The hidden field is invalid. - Skryté pole není platné. - - - Please enter an integer. - Prosím zadejte číslo. - - - Please select a valid language. - Prosím zadejte platný jazyk. - - - Please select a valid locale. - Prosím zadejte platný jazyk. - - - Please enter a valid money amount. - Prosím zadejte platnou částku. - - - Please enter a number. - Prosím zadejte číslo. - - - The password is invalid. - Heslo není platné. - - - Please enter a percentage value. - Prosím zadejte procentuální hodnotu. - - - The values do not match. - Hodnoty se neshodují. - - - Please enter a valid time. - Prosím zadejte platný čas. - - - Please select a valid timezone. - Prosím vyberte platné časové pásmo. - - - Please enter a valid URL. - Prosím zadejte platnou URL. - - - Please enter a valid search term. - Prosím zadejte platný výraz k vyhledání. - - - Please provide a valid phone number. - Prosím zadejte platné telefonní číslo. - - - The checkbox has an invalid value. - Zaškrtávací políčko má neplatnou hodnotu. - - - Please enter a valid email address. - Prosím zadejte platnou emailovou adresu. - - - Please select a valid option. - Prosím vyberte platnou možnost. - - - Please select a valid range. - Prosím vyberte platný rozsah. - - - Please enter a valid week. - Prosím zadejte platný týden. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.da.xlf b/lib/symfony/form/Resources/translations/validators.da.xlf deleted file mode 100644 index b4f078ff3..000000000 --- a/lib/symfony/form/Resources/translations/validators.da.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppen må ikke indeholde ekstra felter. - - - The uploaded file was too large. Please try to upload a smaller file. - Den uploadede fil var for stor. Upload venligst en mindre fil. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-token er ugyldig. Prøv venligst at genindsende. - - - This value is not a valid HTML5 color. - Værdien er ikke en gyldig HTML5 farve. - - - Please enter a valid birthdate. - Indtast venligst en gyldig fødselsdato. - - - The selected choice is invalid. - Den valgte mulighed er ugyldig . - - - The collection is invalid. - Samlingen er ugyldig. - - - Please select a valid color. - Vælg venligst en gyldig farve. - - - Please select a valid country. - Vælg venligst et gyldigt land. - - - Please select a valid currency. - Vælg venligst en gyldig valuta. - - - Please choose a valid date interval. - Vælg venligst et gyldigt datointerval. - - - Please enter a valid date and time. - Vælg venligst en gyldig dato og tid. - - - Please enter a valid date. - Vælg venligst en gyldig dato. - - - Please select a valid file. - Vælg venligst en gyldig fil. - - - The hidden field is invalid. - Det skjulte felt er ugyldigt. - - - Please enter an integer. - Indsæt veligst et heltal. - - - Please select a valid language. - Vælg venligst et gyldigt sprog. - - - Please select a valid locale. - Vælg venligst en gyldigt sprogkode. - - - Please enter a valid money amount. - Vælg venligst et gyldigt beløb. - - - Please enter a number. - Indtast venligst et nummer. - - - The password is invalid. - Passwordet er ugyldigt. - - - Please enter a percentage value. - Indtast venligst en procentværdi. - - - The values do not match. - Værdierne er ikke ens. - - - Please enter a valid time. - Indtast venligst en gyldig tid. - - - Please select a valid timezone. - Vælg venligst en gyldig tidszone. - - - Please enter a valid URL. - Indtast venligst en gyldig URL. - - - Please enter a valid search term. - Indtast venligst et gyldigt søgeord. - - - Please provide a valid phone number. - Giv venligst et gyldigt telefonnummer. - - - The checkbox has an invalid value. - Checkboxen har en ugyldigt værdi. - - - Please enter a valid email address. - Indtast venligst en gyldig e-mailadresse. - - - Please select a valid option. - Vælg venligst en gyldig mulighed. - - - Please select a valid range. - Vælg venligst et gyldigt interval . - - - Please enter a valid week. - Indtast venligst en gyldig uge. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.de.xlf b/lib/symfony/form/Resources/translations/validators.de.xlf deleted file mode 100644 index 7b30839f9..000000000 --- a/lib/symfony/form/Resources/translations/validators.de.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Dieses Formular sollte keine zusätzlichen Felder enthalten. - - - The uploaded file was too large. Please try to upload a smaller file. - Die hochgeladene Datei ist zu groß. Versuchen Sie bitte eine kleinere Datei hochzuladen. - - - The CSRF token is invalid. Please try to resubmit the form. - Der CSRF-Token ist ungültig. Versuchen Sie bitte, das Formular erneut zu senden. - - - This value is not a valid HTML5 color. - Dieser Wert ist keine gültige HTML5 Farbe. - - - Please enter a valid birthdate. - Bitte geben Sie ein gültiges Geburtsdatum ein. - - - The selected choice is invalid. - Die Auswahl ist ungültig. - - - The collection is invalid. - Diese Gruppe von Feldern ist ungültig. - - - Please select a valid color. - Bitte geben Sie eine gültige Farbe ein. - - - Please select a valid country. - Bitte wählen Sie ein gültiges Land aus. - - - Please select a valid currency. - Bitte wählen Sie eine gültige Währung aus. - - - Please choose a valid date interval. - Bitte wählen Sie ein gültiges Datumsintervall. - - - Please enter a valid date and time. - Bitte geben Sie ein gültiges Datum samt Uhrzeit ein. - - - Please enter a valid date. - Bitte geben Sie ein gültiges Datum ein. - - - Please select a valid file. - Bitte wählen Sie eine gültige Datei. - - - The hidden field is invalid. - Das versteckte Feld ist ungültig. - - - Please enter an integer. - Bitte geben Sie eine ganze Zahl ein. - - - Please select a valid language. - Bitte wählen Sie eine gültige Sprache. - - - Please select a valid locale. - Bitte wählen Sie eine gültige Locale-Einstellung aus. - - - Please enter a valid money amount. - Bitte geben Sie einen gültigen Geldbetrag ein. - - - Please enter a number. - Bitte geben Sie eine gültige Zahl ein. - - - The password is invalid. - Das Kennwort ist ungültig. - - - Please enter a percentage value. - Bitte geben Sie einen gültigen Prozentwert ein. - - - The values do not match. - Die Werte stimmen nicht überein. - - - Please enter a valid time. - Bitte geben Sie eine gültige Uhrzeit ein. - - - Please select a valid timezone. - Bitte wählen Sie eine gültige Zeitzone. - - - Please enter a valid URL. - Bitte geben Sie eine gültige URL ein. - - - Please enter a valid search term. - Bitte geben Sie einen gültigen Suchbegriff ein. - - - Please provide a valid phone number. - Bitte geben Sie eine gültige Telefonnummer ein. - - - The checkbox has an invalid value. - Das Kontrollkästchen hat einen ungültigen Wert. - - - Please enter a valid email address. - Bitte geben Sie eine gültige E-Mail-Adresse ein. - - - Please select a valid option. - Bitte wählen Sie eine gültige Option. - - - Please select a valid range. - Bitte wählen Sie einen gültigen Bereich. - - - Please enter a valid week. - Bitte geben Sie eine gültige Woche ein. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.el.xlf b/lib/symfony/form/Resources/translations/validators.el.xlf deleted file mode 100644 index 595630e76..000000000 --- a/lib/symfony/form/Resources/translations/validators.el.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Αυτή η φόρμα δεν πρέπει να περιέχει επιπλέον πεδία. - - - The uploaded file was too large. Please try to upload a smaller file. - Το αρχείο είναι πολύ μεγάλο. Παρακαλούμε προσπαθήστε να ανεβάσετε ένα μικρότερο αρχείο. - - - The CSRF token is invalid. Please try to resubmit the form. - Το CSRF token δεν είναι έγκυρο. Παρακαλούμε δοκιμάστε να υποβάλετε τη φόρμα ξανά. - - - This value is not a valid HTML5 color. - Αυτή η τιμή δέν έναι έγκυρο χρώμα HTML5. - - - Please enter a valid birthdate. - Παρακαλόυμε ειχάγεται μία έγκυρη ημερομηνία γέννησης. - - - The selected choice is invalid. - Η επιλεγμένη επιλογή δέν είναι έγκυρη. - - - The collection is invalid. - Η συλλογή δέν είναι έγκυρη. - - - Please select a valid color. - Παρακαλούμε επιλέξτε ένα έγκυρο χρώμα. - - - Please select a valid country. - Παρακαλούμε επιλέξτε μία έγκυρη χώρα. - - - Please select a valid currency. - Παρακαλούμε επιλέξτε ένα έγυρο νόμισμα. - - - Please choose a valid date interval. - Παρακαλούμε επιλέξτε ένα έγκυρο διάστημα ημερομηνίας. - - - Please enter a valid date and time. - Παρακαλούμε εισαγάγετε μια έγκυρη ημερομηνία και ώρα. - - - Please enter a valid date. - Παρακαλούμε εισάγετε μία έγκυρη ημερομηνία. - - - Please select a valid file. - Παρακαλούμε επιλέξτε ένα έγκυρο αρχείο. - - - The hidden field is invalid. - Το κρυφό πεδίο δέν είναι έγκυρο. - - - Please enter an integer. - Παρακαλούμε εισάγετε έναν ακέραιο αριθμό. - - - Please select a valid language. - Παρακαλούμε επιλέξτε μία έγκυρη γλώσσα. - - - Please select a valid locale. - Παρακαλούμε επιλέξτε μία έγκυρη τοπικοποίηση. - - - Please enter a valid money amount. - Παρακαλούμε εισάγετε ένα έγκυρο χρηματικό ποσό. - - - Please enter a number. - Παρακαλούμε εισάγετε έναν αριθμό. - - - The password is invalid. - Ο κωδικός δέν είναι έγκυρος. - - - Please enter a percentage value. - Παρακαλούμε εισάγετε μία ποσοστιαία τιμή. - - - The values do not match. - Οι τιμές δέν ταιριάζουν. - - - Please enter a valid time. - Παρακαλούμε εισάγετε μία έγκυρη ώρα. - - - Please select a valid timezone. - Παρακαλούμε επιλέξτε μία έγυρη ζώνη ώρας. - - - Please enter a valid URL. - Παρακαλούμε εισάγετε μια έγκυρη διεύθυνση URL. - - - Please enter a valid search term. - Παρακαλούμε εισάγετε έναν έγκυρο όρο αναζήτησης. - - - Please provide a valid phone number. - Παρακαλούμε καταχωρίστε έναν έγκυρο αριθμό τηλεφώνου. - - - The checkbox has an invalid value. - Το πλαίσιο ελέγχου έχει μή έγκυρη τιμή. - - - Please enter a valid email address. - Παρακαλούμε εισάγετε μία έγκυρη ηλεκτρονική διεύθυνση. - - - Please select a valid option. - Παρακαλούμε επιλέξτε μία έγκυρη επιλογή. - - - Please select a valid range. - Παρακαλούμε επιλέξτε ένα έγυρο εύρος. - - - Please enter a valid week. - Παρακαλούμε εισάγετε μία έγκυρη εβδομάδα. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.en.xlf b/lib/symfony/form/Resources/translations/validators.en.xlf deleted file mode 100644 index e556c40b6..000000000 --- a/lib/symfony/form/Resources/translations/validators.en.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - This form should not contain extra fields. - - - The uploaded file was too large. Please try to upload a smaller file. - The uploaded file was too large. Please try to upload a smaller file. - - - The CSRF token is invalid. Please try to resubmit the form. - The CSRF token is invalid. Please try to resubmit the form. - - - This value is not a valid HTML5 color. - This value is not a valid HTML5 color. - - - Please enter a valid birthdate. - Please enter a valid birthdate. - - - The selected choice is invalid. - The selected choice is invalid. - - - The collection is invalid. - The collection is invalid. - - - Please select a valid color. - Please select a valid color. - - - Please select a valid country. - Please select a valid country. - - - Please select a valid currency. - Please select a valid currency. - - - Please choose a valid date interval. - Please choose a valid date interval. - - - Please enter a valid date and time. - Please enter a valid date and time. - - - Please enter a valid date. - Please enter a valid date. - - - Please select a valid file. - Please select a valid file. - - - The hidden field is invalid. - The hidden field is invalid. - - - Please enter an integer. - Please enter an integer. - - - Please select a valid language. - Please select a valid language. - - - Please select a valid locale. - Please select a valid locale. - - - Please enter a valid money amount. - Please enter a valid money amount. - - - Please enter a number. - Please enter a number. - - - The password is invalid. - The password is invalid. - - - Please enter a percentage value. - Please enter a percentage value. - - - The values do not match. - The values do not match. - - - Please enter a valid time. - Please enter a valid time. - - - Please select a valid timezone. - Please select a valid timezone. - - - Please enter a valid URL. - Please enter a valid URL. - - - Please enter a valid search term. - Please enter a valid search term. - - - Please provide a valid phone number. - Please provide a valid phone number. - - - The checkbox has an invalid value. - The checkbox has an invalid value. - - - Please enter a valid email address. - Please enter a valid email address. - - - Please select a valid option. - Please select a valid option. - - - Please select a valid range. - Please select a valid range. - - - Please enter a valid week. - Please enter a valid week. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.es.xlf b/lib/symfony/form/Resources/translations/validators.es.xlf deleted file mode 100644 index c143e009e..000000000 --- a/lib/symfony/form/Resources/translations/validators.es.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulario no debería contener campos adicionales. - - - The uploaded file was too large. Please try to upload a smaller file. - El archivo subido es demasiado grande. Por favor, suba un archivo más pequeño. - - - The CSRF token is invalid. Please try to resubmit the form. - El token CSRF no es válido. Por favor, pruebe a enviar nuevamente el formulario. - - - This value is not a valid HTML5 color. - Este valor no es un color HTML5 válido. - - - Please enter a valid birthdate. - Por favor, ingrese una fecha de cumpleaños válida. - - - The selected choice is invalid. - La opción seleccionada no es válida. - - - The collection is invalid. - La colección no es válida. - - - Please select a valid color. - Por favor, seleccione un color válido. - - - Please select a valid country. - Por favor, seleccione un país válido. - - - Please select a valid currency. - Por favor, seleccione una moneda válida. - - - Please choose a valid date interval. - Por favor, elija un intervalo de fechas válido. - - - Please enter a valid date and time. - Por favor, ingrese una fecha y hora válidas. - - - Please enter a valid date. - Por favor, ingrese una fecha valida. - - - Please select a valid file. - Por favor, seleccione un archivo válido. - - - The hidden field is invalid. - El campo oculto no es válido. - - - Please enter an integer. - Por favor, ingrese un número entero. - - - Please select a valid language. - Por favor, seleccione un idioma válido. - - - Please select a valid locale. - Por favor, seleccione una configuración regional válida. - - - Please enter a valid money amount. - Por favor, ingrese una cantidad de dinero válida. - - - Please enter a number. - Por favor, ingrese un número. - - - The password is invalid. - La contraseña no es válida. - - - Please enter a percentage value. - Por favor, ingrese un valor porcentual. - - - The values do not match. - Los valores no coinciden. - - - Please enter a valid time. - Por favor, ingrese una hora válida. - - - Please select a valid timezone. - Por favor, seleccione una zona horaria válida. - - - Please enter a valid URL. - Por favor, ingrese una URL válida. - - - Please enter a valid search term. - Por favor, ingrese un término de búsqueda válido. - - - Please provide a valid phone number. - Por favor, proporcione un número de teléfono válido. - - - The checkbox has an invalid value. - La casilla de verificación tiene un valor inválido. - - - Please enter a valid email address. - Por favor, ingrese una dirección de correo electrónico válida. - - - Please select a valid option. - Por favor, seleccione una opción válida. - - - Please select a valid range. - Por favor, seleccione un rango válido. - - - Please enter a valid week. - Por favor, ingrese una semana válida. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.et.xlf b/lib/symfony/form/Resources/translations/validators.et.xlf deleted file mode 100644 index 6524c86b1..000000000 --- a/lib/symfony/form/Resources/translations/validators.et.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Väljade grupp ei tohiks sisalda lisaväljasid. - - - The uploaded file was too large. Please try to upload a smaller file. - Üleslaaditud fail oli liiga suur. Palun proovi uuesti väiksema failiga. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-märgis on vigane. Palun proovi vormi uuesti esitada. - - - This value is not a valid HTML5 color. - See väärtus ei ole korrektne HTML5 värv. - - - Please enter a valid birthdate. - Palun sisesta korrektne sünnikuupäev. - - - The selected choice is invalid. - Tehtud valik on vigane. - - - The collection is invalid. - Kogum on vigane. - - - Please select a valid color. - Palun vali korrektne värv. - - - Please select a valid country. - Palun vali korrektne riik. - - - Please select a valid currency. - Palun vali korrektne valuuta. - - - Please choose a valid date interval. - Palun vali korrektne kuupäevade vahemik. - - - Please enter a valid date and time. - Palun sisesta korrektne kuupäev ja kellaaeg. - - - Please enter a valid date. - Palun sisesta korrektne kuupäev. - - - Please select a valid file. - Palun vali korrektne fail. - - - The hidden field is invalid. - Peidetud väli on vigane. - - - Please enter an integer. - Palun sisesta täisarv. - - - Please select a valid language. - Palun vali korrektne keel. - - - Please select a valid locale. - Palun vali korrektne keelekood. - - - Please enter a valid money amount. - Palun sisesta korrektne rahaline väärtus. - - - Please enter a number. - Palun sisesta number. - - - The password is invalid. - Vigane parool. - - - Please enter a percentage value. - Palun sisesta protsendiline väärtus. - - - The values do not match. - Väärtused ei klapi. - - - Please enter a valid time. - Palun sisesta korrektne aeg. - - - Please select a valid timezone. - Palun vali korrektne ajavöönd. - - - Please enter a valid URL. - Palun sisesta korrektne URL. - - - Please enter a valid search term. - Palun sisesta korrektne otsingutermin. - - - Please provide a valid phone number. - Palun sisesta korrektne telefoninumber. - - - The checkbox has an invalid value. - Märkeruudu väärtus on vigane. - - - Please enter a valid email address. - Palun sisesta korrektne e-posti aadress. - - - Please select a valid option. - Palun tee korrektne valik. - - - Please select a valid range. - Palun vali korrektne vahemik. - - - Please enter a valid week. - Palun sisesta korrektne nädal. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.eu.xlf b/lib/symfony/form/Resources/translations/validators.eu.xlf deleted file mode 100644 index f43ab35a4..000000000 --- a/lib/symfony/form/Resources/translations/validators.eu.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Formulario honek ez luke aparteko eremurik eduki behar. - - - The uploaded file was too large. Please try to upload a smaller file. - Igotako fitxategia handiegia da. Mesedez saiatu fitxategi txikiago bat igotzen. - - - The CSRF token is invalid. - CSRF tokena ez da egokia. - - - This value is not a valid HTML5 color. - Balio hori ez da HTML5 kolore onargarria. - - - Please enter a valid birthdate. - Mesedez, sartu baliozko urtebetetze-eguna. - - - The selected choice is invalid. - Hautatutako aukera ez da egokia. - - - The collection is invalid. - Bilduma ez da baliozkoa. - - - Please select a valid color. - Mesedez, hautatu baliozko kolore bat. - - - Please select a valid country. - Mesedez, hautatu baliozko herrialde bat. - - - Please select a valid currency. - Mesedez, hautatu baliozko moneta bat. - - - Please choose a valid date interval. - Mesedez, hautatu baliozko data-tarte bat. - - - Please enter a valid date and time. - Mesedez, sartu baliozko data eta ordua. - - - Please enter a valid date. - Mesedez, sartu baliozko data bat. - - - Please select a valid file. - Mesedez, hautatu baliozko fitxategi bat. - - - The hidden field is invalid. - Eremu ezkutua ez da baliozkoa. - - - Please enter an integer. - Mesedez, sartu zenbaki oso bat. - - - Please select a valid language. - Mesedez, hautatu baliozko hizkuntza bat. - - - Please select a valid locale. - Mesedez, hautatu baliozko eskualde-konfigurazio bat. - - - Please enter a valid money amount. - Mesedez, sartu baliozko diru-kopuru bat. - - - Please enter a number. - Mesedez, sartu zenbaki bat. - - - The password is invalid. - Pasahitza ez da zuzena. - - - Please enter a percentage value. - Mesedez, sartu portzentajezko balio bat. - - - The values do not match. - Balioak ez datoz bat. - - - Please enter a valid time. - Mesedez, sartu baliozko ordu bat. - - - Please select a valid timezone. - Mesedez, hautatu baliozko ordu-eremua. - - - Please enter a valid URL. - Mesedez, sartu baliozko URL bat. - - - Please enter a valid search term. - Mesedez, sartu bilaketa-termino onargarri bat. - - - Please provide a valid phone number. - Mesedez, eman baliozko telefono-zenbaki bat. - - - The checkbox has an invalid value. - Egiaztatze-laukiak balio baliogabea du. - - - Please enter a valid email address. - Mesedez, sartu baliozko helbide elektroniko bat. - - - Please select a valid option. - Mesedez, hautatu baliozko aukera bat. - - - Please select a valid range. - Mesedez, hautatu baliozko tarte bat. - - - Please enter a valid week. - Mesedez, sartu baliozko aste bat. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.fa.xlf b/lib/symfony/form/Resources/translations/validators.fa.xlf deleted file mode 100644 index 4a98eea8e..000000000 --- a/lib/symfony/form/Resources/translations/validators.fa.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - این فرم نباید شامل فیلدهای اضافی باشد. - - - The uploaded file was too large. Please try to upload a smaller file. - فایل بارگذاری‌شده بسیار بزرگ است. لطفاً فایل کوچک‌تری را بارگذاری نمایید. - - - The CSRF token is invalid. Please try to resubmit the form. - توکن CSRF نامعتبر است. لطفاً فرم را مجدداً ارسال نمایید. - - - This value is not a valid HTML5 color. - این مقدار یک رنگ معتبر HTML5 نیست. - - - Please enter a valid birthdate. - لطفاً یک تاریخ تولد معتبر وارد نمایید. - - - The selected choice is invalid. - گزینه‌ انتخاب‌ شده نامعتبر است. - - - The collection is invalid. - این مجموعه نامعتبر است. - - - Please select a valid color. - لطفاً یک رنگ معتبر انتخاب کنید. - - - Please select a valid country. - لطفاً یک کشور معتبر انتخاب کنید. - - - Please select a valid currency. - لطفاً یک واحد پول معتبر انتخاب کنید. - - - Please choose a valid date interval. - لطفاً یک بازه‌ زمانی معتبر انتخاب کنید. - - - Please enter a valid date and time. - لطفاً یک تاریخ و زمان معتبر وارد کنید. - - - Please enter a valid date. - لطفاً یک تاریخ معتبر وارد کنید. - - - Please select a valid file. - لطفاً یک فایل معتبر انتخاب کنید. - - - The hidden field is invalid. - فیلد مخفی نامعتبر است. - - - Please enter an integer. - لطفاً یک عدد صحیح وارد کنید. - - - Please select a valid language. - لطفاً یک زبان معتبر انتخاب کنید. - - - Please select a valid locale. - لطفاً یک منطقه‌جغرافیایی (locale) معتبر انتخاب کنید. - - - Please enter a valid money amount. - لطفاً یک مقدار پول معتبر وارد کنید. - - - Please enter a number. - لطفاً یک عدد وارد کنید. - - - The password is invalid. - رمزعبور نامعتبر است. - - - Please enter a percentage value. - لطفاً یک درصد معتبر وارد کنید. - - - The values do not match. - مقادیر تطابق ندارند. - - - Please enter a valid time. - لطفاً یک زمان معتبر وارد کنید. - - - Please select a valid timezone. - لطفاً یک منطقه‌زمانی معتبر وارد کنید. - - - Please enter a valid URL. - لطفاً یک URL معتبر وارد کنید. - - - Please enter a valid search term. - لطفاً یک عبارت جستجوی معتبر وارد کنید. - - - Please provide a valid phone number. - لطفاً یک شماره تلفن معتبر وارد کنید. - - - The checkbox has an invalid value. - کادر انتخاب (checkbox) دارای مقداری نامعتبر است. - - - Please enter a valid email address. - لطفاً یک آدرس رایانامه (ایمیل) معتبر وارد کنید. - - - Please select a valid option. - لطفاً یک گزینه‌ معتبر انتخاب کنید. - - - Please select a valid range. - لطفاً یک محدوده‌ معتبر انتخاب کنید. - - - Please enter a valid week. - لطفاً یک هفته‌ معتبر وارد کنید. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.fi.xlf b/lib/symfony/form/Resources/translations/validators.fi.xlf deleted file mode 100644 index 7ad87b546..000000000 --- a/lib/symfony/form/Resources/translations/validators.fi.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Tämä lomake ei voi sisältää ylimääräisiä kenttiä. - - - The uploaded file was too large. Please try to upload a smaller file. - Ladattu tiedosto on liian iso. Ole hyvä ja lataa pienempi tiedosto. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-tarkiste on virheellinen. Ole hyvä ja yritä lähettää lomake uudestaan. - - - This value is not a valid HTML5 color. - Tämä arvo ei ole kelvollinen HTML5-väri. - - - Please enter a valid birthdate. - Syötä kelvollinen syntymäaika. - - - The selected choice is invalid. - Valittu vaihtoehto ei kelpaa. - - - The collection is invalid. - Ryhmä ei kelpaa. - - - Please select a valid color. - Valitse kelvollinen väri. - - - Please select a valid country. - Valitse kelvollinen maa. - - - Please select a valid currency. - Valitse kelvollinen valuutta. - - - Please choose a valid date interval. - Valitse kelvollinen aikaväli. - - - Please enter a valid date and time. - Syötä kelvolliset päivä ja aika. - - - Please enter a valid date. - Syötä kelvollinen päivä. - - - Please select a valid file. - Valitse kelvollinen tiedosto. - - - The hidden field is invalid. - Piilotettu kenttä ei ole kelvollinen. - - - Please enter an integer. - Syötä kokonaisluku. - - - Please select a valid language. - Valitse kelvollinen kieli. - - - Please select a valid locale. - Valitse kelvollinen kielikoodi. - - - Please enter a valid money amount. - Syötä kelvollinen rahasumma. - - - Please enter a number. - Syötä numero. - - - The password is invalid. - Salasana ei kelpaa. - - - Please enter a percentage value. - Syötä prosenttiluku. - - - The values do not match. - Arvot eivät vastaa toisiaan. - - - Please enter a valid time. - Syötä kelvollinen kellonaika. - - - Please select a valid timezone. - Valitse kelvollinen aikavyöhyke. - - - Please enter a valid URL. - Syötä kelvollinen URL. - - - Please enter a valid search term. - Syötä kelvollinen hakusana. - - - Please provide a valid phone number. - Anna kelvollinen puhelinnumero. - - - The checkbox has an invalid value. - Valintaruudun arvo ei kelpaa. - - - Please enter a valid email address. - Syötä kelvollinen sähköpostiosoite. - - - Please select a valid option. - Valitse kelvollinen vaihtoehto. - - - Please select a valid range. - Valitse kelvollinen väli. - - - Please enter a valid week. - Syötä kelvollinen viikko. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.fr.xlf b/lib/symfony/form/Resources/translations/validators.fr.xlf deleted file mode 100644 index d65826467..000000000 --- a/lib/symfony/form/Resources/translations/validators.fr.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ce formulaire ne doit pas contenir de champs supplémentaires. - - - The uploaded file was too large. Please try to upload a smaller file. - Le fichier téléchargé est trop volumineux. Merci d'essayer d'envoyer un fichier plus petit. - - - The CSRF token is invalid. Please try to resubmit the form. - Le jeton CSRF est invalide. Veuillez renvoyer le formulaire. - - - This value is not a valid HTML5 color. - Cette valeur n'est pas une couleur HTML5 valide. - - - Please enter a valid birthdate. - Veuillez entrer une date de naissance valide. - - - The selected choice is invalid. - Le choix sélectionné est invalide. - - - The collection is invalid. - La collection est invalide. - - - Please select a valid color. - Veuillez sélectionner une couleur valide. - - - Please select a valid country. - Veuillez sélectionner un pays valide. - - - Please select a valid currency. - Veuillez sélectionner une devise valide. - - - Please choose a valid date interval. - Veuillez choisir un intervalle de dates valide. - - - Please enter a valid date and time. - Veuillez saisir une date et une heure valides. - - - Please enter a valid date. - Veuillez entrer une date valide. - - - Please select a valid file. - Veuillez sélectionner un fichier valide. - - - The hidden field is invalid. - Le champ masqué n'est pas valide. - - - Please enter an integer. - Veuillez saisir un entier. - - - Please select a valid language. - Veuillez sélectionner une langue valide. - - - Please select a valid locale. - Veuillez sélectionner une langue valide. - - - Please enter a valid money amount. - Veuillez saisir un montant valide. - - - Please enter a number. - Veuillez saisir un nombre. - - - The password is invalid. - Le mot de passe est invalide. - - - Please enter a percentage value. - Veuillez saisir un pourcentage valide. - - - The values do not match. - Les valeurs ne correspondent pas. - - - Please enter a valid time. - Veuillez saisir une heure valide. - - - Please select a valid timezone. - Veuillez sélectionner un fuseau horaire valide. - - - Please enter a valid URL. - Veuillez saisir une URL valide. - - - Please enter a valid search term. - Veuillez saisir un terme de recherche valide. - - - Please provide a valid phone number. - Veuillez fournir un numéro de téléphone valide. - - - The checkbox has an invalid value. - La case à cocher a une valeur non valide. - - - Please enter a valid email address. - Veuillez saisir une adresse email valide. - - - Please select a valid option. - Veuillez sélectionner une option valide. - - - Please select a valid range. - Veuillez sélectionner une plage valide. - - - Please enter a valid week. - Veuillez entrer une semaine valide. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.gl.xlf b/lib/symfony/form/Resources/translations/validators.gl.xlf deleted file mode 100644 index 5ef404a48..000000000 --- a/lib/symfony/form/Resources/translations/validators.gl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulario non debería conter campos adicionais. - - - The uploaded file was too large. Please try to upload a smaller file. - O arquivo subido é demasiado grande. Por favor, suba un arquivo máis pequeno. - - - The CSRF token is invalid. Please try to resubmit the form. - O token CSRF non é válido. Por favor, probe a enviar novamente o formulario. - - - This value is not a valid HTML5 color. - Este valor non é unha cor HTML5 válida. - - - Please enter a valid birthdate. - Insire unha data de aniversario válida. - - - The selected choice is invalid. - A opción seleccionada non é válida. - - - The collection is invalid. - A colección non é válida. - - - Please select a valid color. - Por favor, seleccione unha cor válida. - - - Please select a valid country. - Por favor, seleccione un país válido. - - - Please select a valid currency. - Por favor, seleccione unha moeda válida. - - - Please choose a valid date interval. - Por favor, escolla un intervalo de datas válido. - - - Please enter a valid date and time. - Por favor, introduza unha data e hora válidas. - - - Please enter a valid date. - Por favor, introduce unha data válida. - - - Please select a valid file. - Por favor, seleccione un ficheiro válido. - - - The hidden field is invalid. - O campo oculto non é válido. - - - Please enter an integer. - Por favor, introduza un número enteiro. - - - Please select a valid language. - Por favor, selecciona un idioma válido. - - - Please select a valid locale. - Por favor, seleccione unha configuración rexional válida. - - - Please enter a valid money amount. - Por favor, introduza unha cantidade de diñeiro válida. - - - Please enter a number. - Por favor, introduza un número. - - - The password is invalid. - O contrasinal non é válido. - - - Please enter a percentage value. - Por favor, introduza un valor porcentual. - - - The values do not match. - Os valores non coinciden. - - - Please enter a valid time. - Por favor, introduza unha hora válida. - - - Please select a valid timezone. - Por favor, selecciona unha zona horaria válida. - - - Please enter a valid URL. - Por favor, introduce un URL válido. - - - Please enter a valid search term. - Por favor, introduce un termo de busca válido. - - - Please provide a valid phone number. - Por favor, fornecer un número de teléfono válido. - - - The checkbox has an invalid value. - A caixa de verificación ten un valor non válido. - - - Please enter a valid email address. - Por favor, introduce un enderezo de correo electrónico válido. - - - Please select a valid option. - Por favor, seleccione unha opción válida. - - - Please select a valid range. - Por favor, seleccione un intervalo válido. - - - Please enter a valid week. - Por favor, introduce unha semana válida. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.he.xlf b/lib/symfony/form/Resources/translations/validators.he.xlf deleted file mode 100644 index efd68b880..000000000 --- a/lib/symfony/form/Resources/translations/validators.he.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - הטופס לא צריך להכיל שדות נוספים. - - - The uploaded file was too large. Please try to upload a smaller file. - הקובץ שהועלה גדול מדי. נסה להעלות קובץ קטן יותר. - - - The CSRF token is invalid. Please try to resubmit the form. - אסימון CSRF אינו חוקי. אנא נסה לשלוח שוב את הטופס. - - - This value is not a valid HTML5 color. - ערך זה אינו צבע HTML5 חוקי. - - - Please enter a valid birthdate. - נא להזין את תאריך לידה תקני. - - - The selected choice is invalid. - הבחירה שנבחרה אינה חוקית. - - - The collection is invalid. - האוסף אינו חוקי. - - - Please select a valid color. - אנא בחר צבע חוקי. - - - Please select a valid country. - אנא בחר מדינה חוקית. - - - Please select a valid currency. - אנא בחר מטבע חוקי. - - - Please choose a valid date interval. - אנא בחר מרווח תאריכים חוקי. - - - Please enter a valid date and time. - אנא הזן תאריך ושעה תקנים. - - - Please enter a valid date. - נא להזין תאריך חוקי. - - - Please select a valid file. - אנא בחר קובץ חוקי. - - - The hidden field is invalid. - השדה הנסתר אינו חוקי. - - - Please enter an integer. - אנא הזן מספר שלם. - - - Please select a valid language. - אנא בחר שפה חוקי. - - - Please select a valid locale. - אנא בחר שפה מקומית. - - - Please enter a valid money amount. - אנא הזן סכום כסף חוקי. - - - Please enter a number. - אנא הזן מספר. - - - The password is invalid. - הסיסמה אינה חוקית. - - - Please enter a percentage value. - אנא הזן ערך באחוזים. - - - The values do not match. - הערכים אינם תואמים. - - - Please enter a valid time. - אנא הזן שעה חוקי. - - - Please select a valid timezone. - אנא בחר אזור זמן חוקי. - - - Please enter a valid URL. - נא להזין את כתובת אתר חוקית. - - - Please enter a valid search term. - אנא הזן מונח חיפוש חוקי. - - - Please provide a valid phone number. - אנא ספק מספר טלפון חוקי. - - - The checkbox has an invalid value. - לתיבת הסימון יש ערך לא חוקי. - - - Please enter a valid email address. - אנא הזן כתובת דוא"ל תקנית. - - - Please select a valid option. - אנא בחר אפשרות חוקית. - - - Please select a valid range. - אנא בחר טווח חוקי. - - - Please enter a valid week. - אנא הזן שבוע תקף. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.hr.xlf b/lib/symfony/form/Resources/translations/validators.hr.xlf deleted file mode 100644 index 9f17b5ea1..000000000 --- a/lib/symfony/form/Resources/translations/validators.hr.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ovaj obrazac ne smije sadržavati dodatna polja. - - - The uploaded file was too large. Please try to upload a smaller file. - Prenesena datoteka je prevelika. Molim pokušajte prenijeti manju datoteku. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrijednost nije ispravna. Pokušajte ponovo poslati obrazac. - - - This value is not a valid HTML5 color. - Ova vrijednost nije važeća HTML5 boja. - - - Please enter a valid birthdate. - Molim upišite ispravan datum rođenja. - - - The selected choice is invalid. - Odabrani izbor nije ispravan. - - - The collection is invalid. - Kolekcija nije ispravna. - - - Please select a valid color. - Molim odaberite ispravnu boju. - - - Please select a valid country. - Molim odaberite ispravnu državu. - - - Please select a valid currency. - Molim odaberite ispravnu valutu. - - - Please choose a valid date interval. - Molim odaberite ispravni vremenski interval. - - - Please enter a valid date and time. - Molim unesite ispravni datum i vrijeme. - - - Please enter a valid date. - Molim odaberite ispravan datum. - - - Please select a valid file. - Molim odaberite ispravnu datoteku. - - - The hidden field is invalid. - Skriveno polje nije ispravno. - - - Please enter an integer. - Molim unesite cijeli broj. - - - Please select a valid language. - Molim odaberite ispravan jezik. - - - Please select a valid locale. - Molim odaberite ispravnu lokalizaciju. - - - Please enter a valid money amount. - Molim unesite ispravan iznos novca. - - - Please enter a number. - Molim unesite broj. - - - The password is invalid. - Ova lozinka nije ispravna. - - - Please enter a percentage value. - Molim unesite vrijednost postotka. - - - The values do not match. - Ove vrijednosti se ne poklapaju. - - - Please enter a valid time. - Molim unesite ispravno vrijeme. - - - Please select a valid timezone. - Molim odaberite ispravnu vremensku zonu. - - - Please enter a valid URL. - Molim unesite ispravan URL. - - - Please enter a valid search term. - Molim unesite ispravan pojam za pretraživanje. - - - Please provide a valid phone number. - Molim navedite ispravan telefonski broj. - - - The checkbox has an invalid value. - Polje za potvrdu sadrži neispravnu vrijednost. - - - Please enter a valid email address. - Molim unesite valjanu adresu elektronske pošte. - - - Please select a valid option. - Molim odaberite ispravnu opciju. - - - Please select a valid range. - Molim odaberite ispravan raspon. - - - Please enter a valid week. - Molim unesite ispravni tjedan. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.hu.xlf b/lib/symfony/form/Resources/translations/validators.hu.xlf deleted file mode 100644 index 3b70461d3..000000000 --- a/lib/symfony/form/Resources/translations/validators.hu.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ez a mezőcsoport nem tartalmazhat extra mezőket. - - - The uploaded file was too large. Please try to upload a smaller file. - A feltöltött fájl túl nagy. Kérem, próbáljon egy kisebb fájlt feltölteni. - - - The CSRF token is invalid. Please try to resubmit the form. - Érvénytelen CSRF token. Kérem, próbálja újra elküldeni az űrlapot. - - - This value is not a valid HTML5 color. - Ez az érték nem egy érvényes HTML5 szín. - - - Please enter a valid birthdate. - Kérjük, adjon meg egy valós születési dátumot. - - - The selected choice is invalid. - A kiválasztott opció érvénytelen. - - - The collection is invalid. - A gyűjtemény érvénytelen. - - - Please select a valid color. - Kérjük, válasszon egy érvényes színt. - - - Please select a valid country. - Kérjük, válasszon egy érvényes országot. - - - Please select a valid currency. - Kérjük, válasszon egy érvényes pénznemet. - - - Please choose a valid date interval. - Kérjük, válasszon egy érvényes dátumintervallumot. - - - Please enter a valid date and time. - Kérjük, adjon meg egy érvényes dátumot és időpontot. - - - Please enter a valid date. - Kérjük, adjon meg egy érvényes dátumot. - - - Please select a valid file. - Kérjük, válasszon egy érvényes fájlt. - - - The hidden field is invalid. - A rejtett mező érvénytelen. - - - Please enter an integer. - Kérjük, adjon meg egy egész számot. - - - Please select a valid language. - Kérjük, válasszon egy érvényes nyelvet. - - - Please select a valid locale. - Kérjük, válasszon egy érvényes területi beállítást. - - - Please enter a valid money amount. - Kérjük, adjon meg egy érvényes pénzösszeget. - - - Please enter a number. - Kérjük, adjon meg egy számot. - - - The password is invalid. - A jelszó érvénytelen. - - - Please enter a percentage value. - Kérjük, adjon meg egy százalékos értéket. - - - The values do not match. - Az értékek nem egyeznek. - - - Please enter a valid time. - Kérjük, adjon meg egy érvényes időpontot. - - - Please select a valid timezone. - Kérjük, válasszon érvényes időzónát. - - - Please enter a valid URL. - Kérjük, adjon meg egy érvényes URL-t. - - - Please enter a valid search term. - Kérjük, adjon meg egy érvényes keresési kifejezést. - - - Please provide a valid phone number. - Kérjük, adjon egy érvényes telefonszámot - - - The checkbox has an invalid value. - A jelölőnégyzet értéke érvénytelen. - - - Please enter a valid email address. - Kérjük valós e-mail címet adjon meg. - - - Please select a valid option. - Kérjük, válasszon egy érvényes beállítást. - - - Please select a valid range. - Kérjük, válasszon egy érvényes tartományt. - - - Please enter a valid week. - Kérjük, adjon meg egy érvényes hetet. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.hy.xlf b/lib/symfony/form/Resources/translations/validators.hy.xlf deleted file mode 100644 index 10ac326fb..000000000 --- a/lib/symfony/form/Resources/translations/validators.hy.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Այս ձևը չպետք է պարունակի լրացուցիչ տողեր։ - - - The uploaded file was too large. Please try to upload a smaller file. - Վերբեռնված ֆայլը չափազանց մեծ է. Խնդրվում է վերբեռնել ավելի փոքր չափսի ֆայլ։ - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF արժեքը անթույլատրելի է. Փորձեք նորից ուղարկել ձևը։ - - - This value is not a valid HTML5 color. - Այս արժեքը վավեր HTML5 գույն չէ։ - - - Please enter a valid birthdate. - Խնդրում ենք մուտքագրել վավեր ծննդյան ամսաթիվ։ - - - The selected choice is invalid. - Ընտրված ընտրությունն անվավեր է։ - - - The collection is invalid. - Համախումբն անվավեր է։ - - - Please select a valid color. - Խնդրում ենք ընտրել վավեր գույն։ - - - Please select a valid country. - Խնդրում ենք ընտրել վավեր երկիր։ - - - Please select a valid currency. - Խնդրում ենք ընտրել վավեր արժույթ։ - - - Please choose a valid date interval. - Խնդրում ենք ընտրել ճիշտ ամսաթվերի միջակայք։ - - - Please enter a valid date and time. - Խնդրում ենք մուտքագրել վավեր ամսաթիվ և ժամ։ - - - Please enter a valid date. - Խնդրում ենք մուտքագրել վավեր ամսաթիվ։ - - - Please select a valid file. - Խնդրում ենք ընտրել վավեր ֆայլ։ - - - The hidden field is invalid. - Թաքնված դաշտը անվավեր է։ - - - Please enter an integer. - Խնդրում ենք մուտքագրել ամբողջ թիվ։ - - - Please select a valid language. - Խնդրում ենք ընտրել վավեր լեզու։ - - - Please select a valid locale. - Խնդրում ենք ընտրել վավեր տեղայնացում։ - - - Please enter a valid money amount. - Խնդրում ենք մուտքագրել վավեր գումար։ - - - Please enter a number. - Խնդրում ենք մուտքագրել համար։ - - - The password is invalid. - Գաղտնաբառն անվավեր է։ - - - Please enter a percentage value. - Խնդրում ենք մուտքագրել տոկոսային արժեք։ - - - The values do not match. - Արժեքները չեն համընկնում։ - - - Please enter a valid time. - Մուտքագրեք վավեր ժամանակ։ - - - Please select a valid timezone. - Խնդրում ենք ընտրել վավեր ժամային գոտի։ - - - Please enter a valid URL. - Խնդրում ենք մուտքագրել վավեր URL։ - - - Please enter a valid search term. - Խնդրում ենք մուտքագրել վավեր որոնման տերմին։ - - - Please provide a valid phone number. - Խնդրում ենք տրամադրել վավեր հեռախոսահամար։ - - - The checkbox has an invalid value. - Նշման վանդակը անվավեր արժեք ունի։ - - - Please enter a valid email address. - Խնդրում ենք մուտքագրել վավեր էլ-հասցե։ - - - Please select a valid option. - Խնդրում ենք ընտրել ճիշտ տարբերակ։ - - - Please select a valid range. - Խնդրում ենք ընտրել վավեր տիրույթ։ - - - Please enter a valid week. - Մուտքագրեք վավեր շաբաթ։ - - - - diff --git a/lib/symfony/form/Resources/translations/validators.id.xlf b/lib/symfony/form/Resources/translations/validators.id.xlf deleted file mode 100644 index 535f9e6b1..000000000 --- a/lib/symfony/form/Resources/translations/validators.id.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Gabungan kolom tidak boleh mengandung kolom tambahan. - - - The uploaded file was too large. Please try to upload a smaller file. - Berkas yang di unggah terlalu besar. Silahkan coba unggah berkas yang lebih kecil. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-Token tidak sah. Silahkan coba kirim ulang formulir. - - - This value is not a valid HTML5 color. - Nilai ini bukan merupakan HTML5 color yang sah. - - - Please enter a valid birthdate. - Silahkan masukkan tanggal lahir yang sah. - - - The selected choice is invalid. - Pilihan yang dipilih tidak sah. - - - The collection is invalid. - Koleksi tidak sah. - - - Please select a valid color. - Silahkan pilih warna yang sah. - - - Please select a valid country. - Silahkan pilih negara yang sah. - - - Please select a valid currency. - Silahkan pilih mata uang yang sah. - - - Please choose a valid date interval. - Silahkan pilih interval tanggal yang sah. - - - Please enter a valid date and time. - Silahkan masukkan tanggal dan waktu yang sah. - - - Please enter a valid date. - Silahkan masukkan tanggal yang sah. - - - Please select a valid file. - Silahkan pilih berkas yang sah. - - - The hidden field is invalid. - Ruas yang tersembunyi tidak sah. - - - Please enter an integer. - Silahkan masukkan angka. - - - Please select a valid language. - Silahlan pilih bahasa yang sah. - - - Please select a valid locale. - Silahkan pilih local yang sah. - - - Please enter a valid money amount. - Silahkan masukkan nilai uang yang sah. - - - Please enter a number. - Silahkan masukkan sebuah angka - - - The password is invalid. - Kata sandi tidak sah. - - - Please enter a percentage value. - Silahkan masukkan sebuah nilai persentase. - - - The values do not match. - Nilainya tidak cocok. - - - Please enter a valid time. - Silahkan masukkan waktu yang sah. - - - Please select a valid timezone. - Silahkan pilih zona waktu yang sah. - - - Please enter a valid URL. - Silahkan masukkan URL yang sah. - - - Please enter a valid search term. - Silahkan masukkan kata pencarian yang sah. - - - Please provide a valid phone number. - Silahkan sediakan nomor telepon yang sah. - - - The checkbox has an invalid value. - Nilai dari checkbox tidak sah. - - - Please enter a valid email address. - Silahkan masukkan alamat surel yang sah. - - - Please select a valid option. - Silahkan pilih opsi yang sah. - - - Please select a valid range. - Silahkan pilih rentang yang sah. - - - Please enter a valid week. - Silahkan masukkan minggu yang sah. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.it.xlf b/lib/symfony/form/Resources/translations/validators.it.xlf deleted file mode 100644 index 1a8eee3ac..000000000 --- a/lib/symfony/form/Resources/translations/validators.it.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Questo form non dovrebbe contenere nessun campo extra. - - - The uploaded file was too large. Please try to upload a smaller file. - Il file caricato è troppo grande. Per favore, carica un file più piccolo. - - - The CSRF token is invalid. Please try to resubmit the form. - Il token CSRF non è valido. Prova a reinviare il form. - - - This value is not a valid HTML5 color. - Il valore non è un colore HTML5 valido. - - - Please enter a valid birthdate. - Per favore, inserisci una data di compleanno valida. - - - The selected choice is invalid. - La scelta selezionata non è valida. - - - The collection is invalid. - La collezione non è valida. - - - Please select a valid color. - Per favore, seleziona un colore valido. - - - Please select a valid country. - Per favore, seleziona un paese valido. - - - Please select a valid currency. - Per favore, seleziona una valuta valida. - - - Please choose a valid date interval. - Per favore, scegli un intervallo di date valido. - - - Please enter a valid date and time. - Per favore, inserisci una data e ora valida. - - - Please enter a valid date. - Per favore, inserisci una data valida. - - - Please select a valid file. - Per favore, seleziona un file valido. - - - The hidden field is invalid. - Il campo nascosto non è valido. - - - Please enter an integer. - Per favore, inserisci un numero intero. - - - Please select a valid language. - Per favore, seleziona una lingua valida. - - - Please select a valid locale. - Per favore, seleziona una lingua valida. - - - Please enter a valid money amount. - Per favore, inserisci un importo valido. - - - Please enter a number. - Per favore, inserisci un numero. - - - The password is invalid. - La password non è valida. - - - Please enter a percentage value. - Per favore, inserisci un valore percentuale. - - - The values do not match. - I valori non corrispondono. - - - Please enter a valid time. - Per favore, inserisci un orario valido. - - - Please select a valid timezone. - Per favore, seleziona un fuso orario valido. - - - Please enter a valid URL. - Per favore, inserisci un URL valido. - - - Please enter a valid search term. - Per favore, inserisci un termine di ricerca valido. - - - Please provide a valid phone number. - Per favore, indica un numero di telefono valido. - - - The checkbox has an invalid value. - La casella di selezione non ha un valore valido. - - - Please enter a valid email address. - Per favore, indica un indirizzo email valido. - - - Please select a valid option. - Per favore, seleziona un'opzione valida. - - - Please select a valid range. - Per favore, seleziona un intervallo valido. - - - Please enter a valid week. - Per favore, inserisci una settimana valida. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.ja.xlf b/lib/symfony/form/Resources/translations/validators.ja.xlf deleted file mode 100644 index ea2226ce4..000000000 --- a/lib/symfony/form/Resources/translations/validators.ja.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - フィールドグループに追加のフィールドを含んではなりません。 - - - The uploaded file was too large. Please try to upload a smaller file. - アップロードされたファイルが大きすぎます。小さなファイルで再度アップロードしてください。 - - - The CSRF token is invalid. Please try to resubmit the form. - CSRFトークンが無効です、再送信してください。 - - - This value is not a valid HTML5 color. - 有効なHTML5の色ではありません。 - - - Please enter a valid birthdate. - 有効な生年月日を入力してください。 - - - The selected choice is invalid. - 選択した値は無効です。 - - - The collection is invalid. - コレクションは無効です。 - - - Please select a valid color. - 有効な色を選択してください。 - - - Please select a valid country. - 有効な国を選択してください。 - - - Please select a valid currency. - 有効な通貨を選択してください。 - - - Please choose a valid date interval. - 有効な日付間隔を選択してください。 - - - Please enter a valid date and time. - 有効な日時を入力してください。 - - - Please enter a valid date. - 有効な日付を入力してください。 - - - Please select a valid file. - 有効なファイルを選択してください。 - - - The hidden field is invalid. - 隠しフィールドが無効です。 - - - Please enter an integer. - 整数で入力してください。 - - - Please select a valid language. - 有効な言語を選択してください。 - - - Please select a valid locale. - 有効なロケールを選択してください。 - - - Please enter a valid money amount. - 有効な金額を入力してください。 - - - Please enter a number. - 数値で入力してください。 - - - The password is invalid. - パスワードが無効です。 - - - Please enter a percentage value. - パーセント値で入力してください。 - - - The values do not match. - 値が一致しません。 - - - Please enter a valid time. - 有効な時間を入力してください。 - - - Please select a valid timezone. - 有効なタイムゾーンを選択してください。 - - - Please enter a valid URL. - 有効なURLを入力してください。 - - - Please enter a valid search term. - 有効な検索語を入力してください。 - - - Please provide a valid phone number. - 有効な電話番号を入力してください。 - - - The checkbox has an invalid value. - チェックボックスの値が無効です。 - - - Please enter a valid email address. - 有効なメールアドレスを入力してください。 - - - Please select a valid option. - 有効な値を選択してください。 - - - Please select a valid range. - 有効な範囲を選択してください。 - - - Please enter a valid week. - 有効な週を入力してください。 - - - - diff --git a/lib/symfony/form/Resources/translations/validators.lb.xlf b/lib/symfony/form/Resources/translations/validators.lb.xlf deleted file mode 100644 index e989264f9..000000000 --- a/lib/symfony/form/Resources/translations/validators.lb.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Dës Feldergrupp sollt keng zousätzlech Felder enthalen. - - - The uploaded file was too large. Please try to upload a smaller file. - De geschécktene Fichier ass ze grouss. Versicht wann ech gelift ee méi klenge Fichier eropzelueden. - - - The CSRF token is invalid. Please try to resubmit the form. - Den CSRF-Token ass ongëlteg. Versicht wann ech gelift de Formulaire nach eng Kéier ze schécken. - - - This value is not a valid HTML5 color. - Dëse Wäert ass keng gëlteg HTML5-Faarf. - - - Please enter a valid birthdate. - W.e.g. e gëltege Gebuertsdatum aginn. - - - The selected choice is invalid. - Den ausgewielte Choix ass ongëlteg. - - - The collection is invalid. - D'Kollektioun ass ongëlteg. - - - Please select a valid color. - W.e.g. eng gëlteg Faarf auswielen. - - - Please select a valid country. - W.e.g. e gëltegt Land auswielen. - - - Please select a valid currency. - W.e.g. eng gëlteg Wärung auswielen. - - - Please choose a valid date interval. - W.e.g. e gëltegen Datumsinterval aginn. - - - Please enter a valid date and time. - W.e.g. eng gëlteg Datum an Zäit aginn. - - - Please enter a valid date. - W.e.g. eng gëltegen Datum aginn. - - - Please select a valid file. - W.e.g. e gëltege Fichier auswielen. - - - The hidden field is invalid. - Dat verstoppte Feld ass ongëlteg. - - - Please enter an integer. - W.e.g. eng ganz Zuel aginn. - - - Please select a valid language. - W.e.g. e gëltegt Sprooch auswielen. - - - Please select a valid locale. - W.e.g. e gëltegt Regionalschema auswielen. - - - Please enter a valid money amount. - W.e.g. eng gëlteg Geldzomm aginn. - - - Please enter a number. - W.e.g. eng Zuel aginn. - - - The password is invalid. - D'Passwuert ass ongëlteg. - - - Please enter a percentage value. - W.e.g. e Prozentwäert aginn. - - - The values do not match. - D'Wäerter stëmmen net iwwereneen. - - - Please enter a valid time. - W.e.g. eng gëlteg Zäit aginn. - - - Please select a valid timezone. - W.e.g. eng gëlteg Zäitzon auswielen. - - - Please enter a valid URL. - W.e.g. eng gëlteg URL aginn. - - - Please enter a valid search term. - W.e.g. e gëltege Sichbegrëff aginn. - - - Please provide a valid phone number. - W.e.g. eng gëlteg Telefonsnummer uginn. - - - The checkbox has an invalid value. - D'Ukräizfeld huet en ongëltege Wäert. - - - Please enter a valid email address. - W.e.g. eng gëlteg E-Mail-Adress aginn. - - - Please select a valid option. - W.e.g. eng gëlteg Optioun auswielen. - - - Please select a valid range. - W.e.g. eng gëlteg Spannbreet auswielen. - - - Please enter a valid week. - W.e.g. eng gëlteg Woch aginn. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.lt.xlf b/lib/symfony/form/Resources/translations/validators.lt.xlf deleted file mode 100644 index 5613c42b5..000000000 --- a/lib/symfony/form/Resources/translations/validators.lt.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Forma negali turėti papildomų laukų. - - - The uploaded file was too large. Please try to upload a smaller file. - Įkelta byla yra per didelė. bandykite įkelti mažesnę. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF kodas nepriimtinas. Bandykite siųsti formos užklausą dar kartą. - - - This value is not a valid HTML5 color. - Ši reikšmė nėra HTML5 spalva. - - - Please enter a valid birthdate. - Prašome įvesti tinkamą gimimo datą. - - - The selected choice is invalid. - Pasirinktas pasirinkimas yra neteisingas. - - - The collection is invalid. - Neteisingas sąrašas. - - - Please select a valid color. - Prašome pasirinkti tinkamą spalvą. - - - Please select a valid country. - Prašome pasirinkti tinkamą šalį. - - - Please select a valid currency. - Prašome pasirinkti tinkamą valiutą. - - - Please choose a valid date interval. - Prašome pasirinkti tinkamą datos intervalą. - - - Please enter a valid date and time. - Prašome įvesti tinkamą datą ir laiką. - - - Please enter a valid date. - Prašome įvesti tinkamą datą. - - - Please select a valid file. - Prašome pasirinkti tinkamą bylą. - - - The hidden field is invalid. - Klaidingas paslėptasis laukas. - - - Please enter an integer. - Prašome įvesti sveiką skaičių. - - - Please select a valid language. - Prašome pasirinkti tinkamą kalbą. - - - Please select a valid locale. - Prašome pasirinkti tinkamą lokalę. - - - Please enter a valid money amount. - Prašome įvesti tinkamą pinigų sumą. - - - Please enter a number. - Prašome įvesti numerį. - - - The password is invalid. - Klaidingas slaptažodis. - - - Please enter a percentage value. - Prašome įvesti procentinę reikšmę. - - - The values do not match. - Reikšmės nesutampa. - - - Please enter a valid time. - Prašome įvesti tinkamą laiką. - - - Please select a valid timezone. - Prašome pasirinkti tinkamą laiko zoną. - - - Please enter a valid URL. - Prašome įvesti tinkamą URL. - - - Please enter a valid search term. - Prašome įvesti tinkamą paieškos terminą. - - - Please provide a valid phone number. - Prašome pateikti tinkamą telefono numerį. - - - The checkbox has an invalid value. - Klaidinga žymimajo langelio reikšmė. - - - Please enter a valid email address. - Prašome įvesti tinkamą el. pašto adresą. - - - Please select a valid option. - Prašome pasirinkti tinkamą parinktį. - - - Please select a valid range. - Prašome pasirinkti tinkamą diapozoną. - - - Please enter a valid week. - Prašome įvesti tinkamą savaitę. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.lv.xlf b/lib/symfony/form/Resources/translations/validators.lv.xlf deleted file mode 100644 index 54711cb5f..000000000 --- a/lib/symfony/form/Resources/translations/validators.lv.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Šajā veidlapā nevajadzētu būt papildus ievades laukiem. - - - The uploaded file was too large. Please try to upload a smaller file. - Augšupielādētā faila izmērs bija par lielu. Lūdzu mēģiniet augšupielādēt mazāka izmēra failu. - - - The CSRF token is invalid. Please try to resubmit the form. - Dotais CSRF talons nav derīgs. Lūdzu mēģiniet vēlreiz iesniegt veidlapu. - - - This value is not a valid HTML5 color. - Šī vertība nav derīga HTML5 krāsa. - - - Please enter a valid birthdate. - Lūdzu, ievadiet derīgu dzimšanas datumu. - - - The selected choice is invalid. - Iezīmētā izvēle nav derīga. - - - The collection is invalid. - Kolekcija nav derīga. - - - Please select a valid color. - Lūdzu, izvēlieties derīgu krāsu. - - - Please select a valid country. - Lūdzu, izvēlieties derīgu valsti. - - - Please select a valid currency. - Lūdzu, izvēlieties derīgu valūtu. - - - Please choose a valid date interval. - Lūdzu, izvēlieties derīgu datumu intervālu. - - - Please enter a valid date and time. - Lūdzu, ievadiet derīgu datumu un laiku. - - - Please enter a valid date. - Lūdzu, ievadiet derīgu datumu. - - - Please select a valid file. - Lūdzu, izvēlieties derīgu failu. - - - The hidden field is invalid. - Slēptā lauka vērtība ir nederīga. - - - Please enter an integer. - Lūdzu, ievadiet veselu skaitli. - - - Please select a valid language. - Lūdzu, izvēlieties derīgu valodu. - - - Please select a valid locale. - Lūdzu, izvēlieties derīgu lokalizāciju. - - - Please enter a valid money amount. - Lūdzu, ievadiet derīgu naudas lielumu. - - - Please enter a number. - Lūdzu, ievadiet skaitli. - - - The password is invalid. - Parole ir nederīga. - - - Please enter a percentage value. - Lūdzu, ievadiet procentuālo lielumu. - - - The values do not match. - Vērtības nesakrīt. - - - Please enter a valid time. - Lūdzu, ievadiet derīgu laiku. - - - Please select a valid timezone. - Lūdzu, izvēlieties derīgu laika zonu. - - - Please enter a valid URL. - Lūdzu, ievadiet derīgu URL. - - - Please enter a valid search term. - Lūdzu, ievadiet derīgu meklēšanas nosacījumu. - - - Please provide a valid phone number. - Lūdzu, ievadiet derīgu tālruņa numuru. - - - The checkbox has an invalid value. - Izvēles rūtiņai ir nederīga vērtība. - - - Please enter a valid email address. - Lūdzu, ievadiet derīgu e-pasta adresi. - - - Please select a valid option. - Lūdzu, izvēlieties derīgu opciju. - - - Please select a valid range. - Lūdzu, izvēlieties derīgu diapazonu. - - - Please enter a valid week. - Lūdzu, ievadiet derīgu nedēļu. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.mn.xlf b/lib/symfony/form/Resources/translations/validators.mn.xlf deleted file mode 100644 index 620112d88..000000000 --- a/lib/symfony/form/Resources/translations/validators.mn.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Форм нэмэлт талбар багтаах боломжгүй. - - - The uploaded file was too large. Please try to upload a smaller file. - Upload хийсэн файл хэтэрхий том байна. Бага хэмжээтэй файл оруулна уу. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token буруу байна. Формоо дахин илгээнэ үү. - - - This value is not a valid HTML5 color. - Энэ утга зөв HTML5 өнгө биш байна. - - - Please enter a valid birthdate. - Зөв төрсөн он сар оруулна уу. - - - The selected choice is invalid. - Сонгосон утга буруу байна. - - - The collection is invalid. - Цуглуулга буруу байна. - - - Please select a valid color. - Үнэн зөв өнгө сонгоно уу. - - - Please select a valid country. - Үнэн зөв улс сонгоно уу. - - - Please select a valid currency. - Үнэн зөв мөнгөн тэмдэгт сонгоно уу. - - - Please choose a valid date interval. - Үнэн зөв цагын зай сонгоно уу. - - - Please enter a valid date and time. - Үнэн зөв он цаг оруулна уу. - - - Please enter a valid date. - Үнэн зөв он цаг өдөр оруулна уу. - - - Please select a valid file. - Үнэн зөв файл сонгоно уу. - - - The hidden field is invalid. - Нууц талбарын утга буруу байна. - - - Please enter an integer. - Бүхэл тоо оруулна уу. - - - Please select a valid language. - Үнэн зөв хэл сонгоно уу. - - - Please select a valid locale. - Үнэн зөв бүс сонгоно уу. - - - Please enter a valid money amount. - Үнэн зөв мөнгөний хэмжээ сонгоно уу. - - - Please enter a number. - Тоо оруулна уу. - - - The password is invalid. - Нууц үг буруу байна. - - - Please enter a percentage value. - Хувь утга оруулна уу. - - - The values do not match. - Утга хоорондоо таарахгүй байна. - - - Please enter a valid time. - Үнэн зөв цаг оруулна уу. - - - Please select a valid timezone. - Үнэн зөв цагын бүс оруулна уу. - - - Please enter a valid URL. - Үнэн зөв URL оруулна уу. - - - Please enter a valid search term. - Үнэн зөв хайх утга оруулна уу. - - - Please provide a valid phone number. - Үнэн зөв утасны дугаар оруулна уу. - - - The checkbox has an invalid value. - Сонгох хайрцаг буруу утгатай байна. - - - Please enter a valid email address. - Үнэн зөв и-мэйл хаяг оруулна уу. - - - Please select a valid option. - Үнэн зөв сонголт сонгоно уу. - - - Please select a valid range. - Үнэн зөв хязгаарын утга сонгоно уу. - - - Please enter a valid week. - Үнэн зөв долоо хоног сонгоно уу. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.my.xlf b/lib/symfony/form/Resources/translations/validators.my.xlf deleted file mode 100644 index b0180c551..000000000 --- a/lib/symfony/form/Resources/translations/validators.my.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - ဤ ဖောင်သည် field အပိုများ မပါ၀င်သင့်ပါ။ - - - The uploaded file was too large. Please try to upload a smaller file. - Upload တင်သောဖိုင်သည်အလွန်ကြီးလွန်းသည်။ ကျေးဇူးပြု၍ သေးငယ်သည့်ဖိုင်ကိုတင်ရန်ကြိုးစားပါ။ - - - The CSRF token is invalid. Please try to resubmit the form. - သင့်လျှော်သော် CSRF တိုကင် မဟုတ်ပါ။ ကျေးဇူးပြု၍ဖောင်ကိုပြန်တင်ပါ။ - - - This value is not a valid HTML5 color. - ဤတန်ဖိုးသည် သင့်လျှော်သော် HTML5 အရောင်မဟုတ်ပါ။ - - - Please enter a valid birthdate. - ကျေးဇူးပြု၍ မှန်ကန်သောမွေးနေ့ကိုထည့်ပါ။ - - - The selected choice is invalid. - သင့် ရွေးချယ်မှုသည်မမှန်ကန်ပါ။ - - - The collection is invalid. - ဤ collection သည်သင့်လျှော်သော် collection မဟုတ်ပါ။ - - - Please select a valid color. - ကျေးဇူးပြု၍ မှန်ကန်သောအရောင်ကိုရွေးပါ။ - - - Please select a valid country. - ကျေးဇူးပြု၍ မှန်ကန်သောနိုင်ငံကိုရွေးပါ။ - - - Please select a valid currency. - ကျေးဇူးပြု၍ မှန်ကန်သောငွေကြေးကိုရွေးပါ။ - - - Please choose a valid date interval. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ရက်စွဲကိုရွေးပါ။ - - - Please enter a valid date and time. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ရက်စွဲနှင့်အချိန် ကိုထည့်ပါ။ - - - Please enter a valid date. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ရက်စွဲကိုထည့်ပါ။ - - - Please select a valid file. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ဖိုင်ကိုရွေးချယ်ပါ။ - - - The hidden field is invalid. - မသင့် လျှော်သော် hidden field ဖြစ်နေသည်။ - - - Please enter an integer. - ကျေးဇူးပြု၍ Integer တန်ဖိုးသာထည့်ပါ။ - - - Please select a valid language. - ကျေးဇူးပြု၍ မှန်ကန်သော ဘာသာစကားကိုရွေးချယ်ပါ။ - - - Please select a valid locale. - ကျေးဇူးပြု၍ မှန်ကန်သော locale ကိုရွေးချယ်ပါ။ - - - Please enter a valid money amount. - ကျေးဇူးပြု၍ မှန်ကန်သော ပိုက်ဆံပမာဏ ကိုထည့်ပါ။ - - - Please enter a number. - ကျေးဇူးပြု၍ မှန်ကန်သော နံပါတ် ကိုရွေးချယ်ပါ။ - - - The password is invalid. - မှန်ကန်သောစကား၀ှက်မဟုတ်ပါ။ - - - Please enter a percentage value. - ကျေးဇူးပြု၍ ရာခိုင်နှုန်းတန်ဖိုးထည့်ပါ။ - - - The values do not match. - တန်ဖိုးများကိုက်ညီမှုမရှိပါ။ - - - Please enter a valid time. - ကျေးဇူးပြု၍ မှန်ကန်သောအချိန်ကိုထည့်ပါ။ - - - Please select a valid timezone. - ကျေးဇူးပြု၍ မှန်ကန်သောအချိန်ဇုန်ကိုရွေးပါ။ - - - Please enter a valid URL. - ကျေးဇူးပြု၍ သင့်လျှော်သော် URL ကိုရွေးပါ။ - - - Please enter a valid search term. - ကျေးဇူးပြု၍ သင့် လျှော်သော်ရှာဖွေမှု term များထည့်ပါ။ - - - Please provide a valid phone number. - ကျေးဇူးပြု၍ သင့် လျှော်သော်ရှာဖွေမှု ဖုန်းနံပါတ်ထည့်ပါ။ - - - The checkbox has an invalid value. - Checkbox တန်ဖိုးသည် မှန်ကန်မှုမရှိပါ။ - - - Please enter a valid email address. - ကျေးဇူးပြု၍ မှန်ကန်သော် email လိပ်စာထည့်ပါ။ - - - Please select a valid option. - ကျေးဇူးပြု၍ မှန်ကန်သော် ရွေးချယ်မှု ကိုရွေးပါ။ - - - Please select a valid range. - ကျေးဇူးပြု၍ မှန်ကန်သော အပိုင်းအခြား ကိုရွေးပါ။ - - - Please enter a valid week. - ကျေးဇူးပြု၍ မှန်ကန်သောရက်သတ္တပတ်ကိုထည့်ပါ။ - - - - diff --git a/lib/symfony/form/Resources/translations/validators.nb.xlf b/lib/symfony/form/Resources/translations/validators.nb.xlf deleted file mode 100644 index 1d8385086..000000000 --- a/lib/symfony/form/Resources/translations/validators.nb.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppen må ikke inneholde ekstra felter. - - - The uploaded file was too large. Please try to upload a smaller file. - Den opplastede filen var for stor. Vennligst last opp en mindre fil. - - - The CSRF token is invalid. - CSRF nøkkelen er ugyldig. - - - This value is not a valid HTML5 color. - Denne verdien er ikke en gyldig HTML5-farge. - - - Please enter a valid birthdate. - Vennligst oppgi gyldig fødselsdato. - - - The selected choice is invalid. - Det valgte valget er ugyldig. - - - The collection is invalid. - Samlingen er ugyldig. - - - Please select a valid color. - Velg en gyldig farge. - - - Please select a valid country. - Vennligst velg et gyldig land. - - - Please select a valid currency. - Vennligst velg en gyldig valuta. - - - Please choose a valid date interval. - Vennligst velg et gyldig datointervall. - - - Please enter a valid date and time. - Vennligst angi en gyldig dato og tid. - - - Please enter a valid date. - Vennligst oppgi en gyldig dato. - - - Please select a valid file. - Vennligst velg en gyldig fil. - - - The hidden field is invalid. - Det skjulte feltet er ugyldig. - - - Please enter an integer. - Vennligst skriv inn et heltall. - - - Please select a valid language. - Vennligst velg et gyldig språk. - - - Please select a valid locale. - Vennligst velg et gyldig sted. - - - Please enter a valid money amount. - Vennligst angi et gyldig pengebeløp. - - - Please enter a number. - Vennligst skriv inn et nummer. - - - The password is invalid. - Passordet er ugyldig. - - - Please enter a percentage value. - Vennligst angi en prosentverdi. - - - The values do not match. - Verdiene stemmer ikke overens. - - - Please enter a valid time. - Vennligst angi et gyldig tidspunkt. - - - Please select a valid timezone. - Vennligst velg en gyldig tidssone. - - - Please enter a valid URL. - Vennligst skriv inn en gyldig URL. - - - Please enter a valid search term. - Vennligst angi et gyldig søketerm. - - - Please provide a valid phone number. - Vennligst oppgi et gyldig telefonnummer. - - - The checkbox has an invalid value. - Avkrysningsboksen har en ugyldig verdi. - - - Please enter a valid email address. - Vennligst skriv inn en gyldig e-post adresse. - - - Please select a valid option. - Vennligst velg et gyldig alternativ. - - - Please select a valid range. - Vennligst velg et gyldig område. - - - Please enter a valid week. - Vennligst skriv inn en gyldig uke. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.nl.xlf b/lib/symfony/form/Resources/translations/validators.nl.xlf deleted file mode 100644 index 7aa56ebf1..000000000 --- a/lib/symfony/form/Resources/translations/validators.nl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Dit formulier mag geen extra velden bevatten. - - - The uploaded file was too large. Please try to upload a smaller file. - Het geüploade bestand is te groot. Probeer een kleiner bestand te uploaden. - - - The CSRF token is invalid. Please try to resubmit the form. - De CSRF-token is ongeldig. Probeer het formulier opnieuw te versturen. - - - This value is not a valid HTML5 color. - Dit is geen geldige HTML5 kleur. - - - Please enter a valid birthdate. - Vul een geldige geboortedatum in. - - - The selected choice is invalid. - Deze keuze is ongeldig. - - - The collection is invalid. - Deze collectie is ongeldig. - - - Please select a valid color. - Kies een geldige kleur. - - - Please select a valid country. - Kies een geldige landnaam. - - - Please select a valid currency. - Kies een geldige valuta. - - - Please choose a valid date interval. - Kies een geldig tijdinterval. - - - Please enter a valid date and time. - Vul een geldige datum en tijd in. - - - Please enter a valid date. - Vul een geldige datum in. - - - Please select a valid file. - Kies een geldig bestand. - - - The hidden field is invalid. - Het verborgen veld is incorrect. - - - Please enter an integer. - Vul een geldig getal in. - - - Please select a valid language. - Kies een geldige taal. - - - Please select a valid locale. - Kies een geldige locale. - - - Please enter a valid money amount. - Vul een geldig bedrag in. - - - Please enter a number. - Vul een geldig getal in. - - - The password is invalid. - Het wachtwoord is incorrect. - - - Please enter a percentage value. - Vul een geldig percentage in. - - - The values do not match. - De waardes komen niet overeen. - - - Please enter a valid time. - Vul een geldige tijd in. - - - Please select a valid timezone. - Vul een geldige tijdzone in. - - - Please enter a valid URL. - Vul een geldige URL in. - - - Please enter a valid search term. - Vul een geldige zoekterm in. - - - Please provide a valid phone number. - Vul een geldig telefoonnummer in. - - - The checkbox has an invalid value. - De checkbox heeft een incorrecte waarde. - - - Please enter a valid email address. - Vul een geldig e-mailadres in. - - - Please select a valid option. - Kies een geldige optie. - - - Please select a valid range. - Kies een geldig bereik. - - - Please enter a valid week. - Vul een geldige week in. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.nn.xlf b/lib/symfony/form/Resources/translations/validators.nn.xlf deleted file mode 100644 index 9fac1bf34..000000000 --- a/lib/symfony/form/Resources/translations/validators.nn.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppa kan ikkje innehalde ekstra felt. - - - The uploaded file was too large. Please try to upload a smaller file. - Fila du lasta opp var for stor. Last opp ei mindre fil. - - - The CSRF token is invalid. - CSRF-nøkkelen er ikkje gyldig. - - - This value is not a valid HTML5 color. - Verdien er ikkje ein gyldig HTML5-farge. - - - Please enter a valid birthdate. - Gje opp ein gyldig fødselsdato. - - - The selected choice is invalid. - Valget du gjorde er ikkje gyldig. - - - The collection is invalid. - Samlinga er ikkje gyldig. - - - Please select a valid color. - Gje opp ein gyldig farge. - - - Please select a valid country. - Gje opp eit gyldig land. - - - Please select a valid currency. - Gje opp ein gyldig valuta. - - - Please choose a valid date interval. - Gje opp eit gyldig datointervall. - - - Please enter a valid date and time. - Gje opp ein gyldig dato og tid. - - - Please enter a valid date. - Gje opp ein gyldig dato. - - - Please select a valid file. - Velg ei gyldig fil. - - - The hidden field is invalid. - Det skjulte feltet er ikkje gyldig. - - - Please enter an integer. - Gje opp eit heiltal. - - - Please select a valid language. - Gje opp eit gyldig språk. - - - Please select a valid locale. - Gje opp eit gyldig locale. - - - Please enter a valid money amount. - Gje opp ein gyldig sum pengar. - - - Please enter a number. - Gje opp eit nummer. - - - The password is invalid. - Passordet er ikkje gyldig. - - - Please enter a percentage value. - Gje opp ein prosentverdi. - - - The values do not match. - Verdiane er ikkje eins. - - - Please enter a valid time. - Gje opp ei gyldig tid. - - - Please select a valid timezone. - Gje opp ei gyldig tidssone. - - - Please enter a valid URL. - Gje opp ein gyldig URL. - - - Please enter a valid search term. - Gje opp gyldige søkjeord. - - - Please provide a valid phone number. - Gje opp eit gyldig telefonnummer. - - - The checkbox has an invalid value. - Sjekkboksen har ein ugyldig verdi. - - - Please enter a valid email address. - Gje opp ei gyldig e-postadresse. - - - Please select a valid option. - Velg eit gyldig vilkår. - - - Please select a valid range. - Velg eit gyldig spenn. - - - Please enter a valid week. - Gje opp ei gyldig veke. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.no.xlf b/lib/symfony/form/Resources/translations/validators.no.xlf deleted file mode 100644 index 1d8385086..000000000 --- a/lib/symfony/form/Resources/translations/validators.no.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppen må ikke inneholde ekstra felter. - - - The uploaded file was too large. Please try to upload a smaller file. - Den opplastede filen var for stor. Vennligst last opp en mindre fil. - - - The CSRF token is invalid. - CSRF nøkkelen er ugyldig. - - - This value is not a valid HTML5 color. - Denne verdien er ikke en gyldig HTML5-farge. - - - Please enter a valid birthdate. - Vennligst oppgi gyldig fødselsdato. - - - The selected choice is invalid. - Det valgte valget er ugyldig. - - - The collection is invalid. - Samlingen er ugyldig. - - - Please select a valid color. - Velg en gyldig farge. - - - Please select a valid country. - Vennligst velg et gyldig land. - - - Please select a valid currency. - Vennligst velg en gyldig valuta. - - - Please choose a valid date interval. - Vennligst velg et gyldig datointervall. - - - Please enter a valid date and time. - Vennligst angi en gyldig dato og tid. - - - Please enter a valid date. - Vennligst oppgi en gyldig dato. - - - Please select a valid file. - Vennligst velg en gyldig fil. - - - The hidden field is invalid. - Det skjulte feltet er ugyldig. - - - Please enter an integer. - Vennligst skriv inn et heltall. - - - Please select a valid language. - Vennligst velg et gyldig språk. - - - Please select a valid locale. - Vennligst velg et gyldig sted. - - - Please enter a valid money amount. - Vennligst angi et gyldig pengebeløp. - - - Please enter a number. - Vennligst skriv inn et nummer. - - - The password is invalid. - Passordet er ugyldig. - - - Please enter a percentage value. - Vennligst angi en prosentverdi. - - - The values do not match. - Verdiene stemmer ikke overens. - - - Please enter a valid time. - Vennligst angi et gyldig tidspunkt. - - - Please select a valid timezone. - Vennligst velg en gyldig tidssone. - - - Please enter a valid URL. - Vennligst skriv inn en gyldig URL. - - - Please enter a valid search term. - Vennligst angi et gyldig søketerm. - - - Please provide a valid phone number. - Vennligst oppgi et gyldig telefonnummer. - - - The checkbox has an invalid value. - Avkrysningsboksen har en ugyldig verdi. - - - Please enter a valid email address. - Vennligst skriv inn en gyldig e-post adresse. - - - Please select a valid option. - Vennligst velg et gyldig alternativ. - - - Please select a valid range. - Vennligst velg et gyldig område. - - - Please enter a valid week. - Vennligst skriv inn en gyldig uke. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.pl.xlf b/lib/symfony/form/Resources/translations/validators.pl.xlf deleted file mode 100644 index d553f2a17..000000000 --- a/lib/symfony/form/Resources/translations/validators.pl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ten formularz nie powinien zawierać dodatkowych pól. - - - The uploaded file was too large. Please try to upload a smaller file. - Wgrany plik był za duży. Proszę spróbować wgrać mniejszy plik. - - - The CSRF token is invalid. Please try to resubmit the form. - Token CSRF jest nieprawidłowy. Proszę spróbować wysłać formularz ponownie. - - - This value is not a valid HTML5 color. - Ta wartość nie jest prawidłowym kolorem HTML5. - - - Please enter a valid birthdate. - Proszę wprowadzić prawidłową datę urodzenia. - - - The selected choice is invalid. - Wybrana wartość jest nieprawidłowa. - - - The collection is invalid. - Zbiór jest nieprawidłowy. - - - Please select a valid color. - Proszę wybrać prawidłowy kolor. - - - Please select a valid country. - Proszę wybrać prawidłowy kraj. - - - Please select a valid currency. - Proszę wybrać prawidłową walutę. - - - Please choose a valid date interval. - Proszę wybrać prawidłowy przedział czasowy. - - - Please enter a valid date and time. - Proszę wprowadzić prawidłową datę i czas. - - - Please enter a valid date. - Proszę wprowadzić prawidłową datę. - - - Please select a valid file. - Proszę wybrać prawidłowy plik. - - - The hidden field is invalid. - Ukryte pole jest nieprawidłowe. - - - Please enter an integer. - Proszę wprowadzić liczbę całkowitą. - - - Please select a valid language. - Proszę wybrać prawidłowy język. - - - Please select a valid locale. - Proszę wybrać prawidłową lokalizację. - - - Please enter a valid money amount. - Proszę wybrać prawidłową ilość pieniędzy. - - - Please enter a number. - Proszę wprowadzić liczbę. - - - The password is invalid. - Hasło jest nieprawidłowe. - - - Please enter a percentage value. - Proszę wprowadzić wartość procentową. - - - The values do not match. - Wartości się nie zgadzają. - - - Please enter a valid time. - Proszę wprowadzić prawidłowy czas. - - - Please select a valid timezone. - Proszę wybrać prawidłową strefę czasową. - - - Please enter a valid URL. - Proszę wprowadzić prawidłowy adres URL. - - - Please enter a valid search term. - Proszę wprowadzić prawidłowy termin wyszukiwania. - - - Please provide a valid phone number. - Proszę wprowadzić prawidłowy numer telefonu. - - - The checkbox has an invalid value. - Pole wyboru posiada nieprawidłową wartość. - - - Please enter a valid email address. - Proszę wprowadzić prawidłowy adres email. - - - Please select a valid option. - Proszę wybrać prawidłową opcję. - - - Please select a valid range. - Proszę wybrać prawidłowy zakres. - - - Please enter a valid week. - Proszę wybrać prawidłowy tydzień. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.pt.xlf b/lib/symfony/form/Resources/translations/validators.pt.xlf deleted file mode 100644 index 6ce1c3242..000000000 --- a/lib/symfony/form/Resources/translations/validators.pt.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulário não deveria possuir mais campos. - - - The uploaded file was too large. Please try to upload a smaller file. - O ficheiro enviado é muito grande. Por favor, tente enviar um ficheiro menor. - - - The CSRF token is invalid. Please try to resubmit the form. - O token CSRF está inválido. Por favor, tente enviar o formulário novamente. - - - This value is not a valid HTML5 color. - Este valor não é uma cor HTML5 válida. - - - Please enter a valid birthdate. - Por favor, informe uma data de nascimento válida. - - - The selected choice is invalid. - A escolha seleccionada é inválida. - - - The collection is invalid. - A coleção é inválida. - - - Please select a valid color. - Por favor, selecione uma cor válida. - - - Please select a valid country. - Por favor, selecione um país válido. - - - Please select a valid currency. - Por favor, selecione uma moeda válida. - - - Please choose a valid date interval. - Por favor, escolha um intervalo de datas válido. - - - Please enter a valid date and time. - Por favor, informe uma data e horário válidos. - - - Please enter a valid date. - Por favor, informe uma data válida. - - - Please select a valid file. - Por favor, selecione um ficheiro válido. - - - The hidden field is invalid. - O campo oculto é inválido. - - - Please enter an integer. - Por favor, informe um inteiro. - - - Please select a valid language. - Por favor selecione um idioma válido. - - - Please select a valid locale. - Por favor, selecione um locale válido. - - - Please enter a valid money amount. - Por favor, informe um valor monetário válido. - - - Please enter a number. - Por favor, informe um número. - - - The password is invalid. - A palavra-passe é inválida. - - - Please enter a percentage value. - Por favor, informe um valor percentual. - - - The values do not match. - Os valores não correspondem. - - - Please enter a valid time. - Por favor, informe uma hora válida. - - - Please select a valid timezone. - Por favor, selecione um fuso horário válido. - - - Please enter a valid URL. - Por favor, informe uma URL válida. - - - Please enter a valid search term. - Por favor, informe um termo de busca válido. - - - Please provide a valid phone number. - Por favor, infome um número de telefone válido. - - - The checkbox has an invalid value. - O checkbox possui um valor inválido. - - - Please enter a valid email address. - Por favor, informe um endereço de email válido. - - - Please select a valid option. - Por favor, selecione uma opção válida. - - - Please select a valid range. - Por favor, selecione um intervalo válido. - - - Please enter a valid week. - Por favor, selecione uma semana válida. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.pt_BR.xlf b/lib/symfony/form/Resources/translations/validators.pt_BR.xlf deleted file mode 100644 index 37717fe98..000000000 --- a/lib/symfony/form/Resources/translations/validators.pt_BR.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulário não deve conter campos adicionais. - - - The uploaded file was too large. Please try to upload a smaller file. - O arquivo enviado é muito grande. Por favor, tente enviar um arquivo menor. - - - The CSRF token is invalid. Please try to resubmit the form. - O token CSRF é inválido. Por favor, tente reenviar o formulário. - - - This value is not a valid HTML5 color. - Este valor não é uma cor HTML5 válida. - - - Please enter a valid birthdate. - Por favor, informe uma data de nascimento válida. - - - The selected choice is invalid. - A escolha selecionada é inválida. - - - The collection is invalid. - A coleção é inválida. - - - Please select a valid color. - Por favor, selecione uma cor válida. - - - Please select a valid country. - Por favor, selecione um país válido. - - - Please select a valid currency. - Por favor, selecione uma moeda válida. - - - Please choose a valid date interval. - Por favor, escolha um intervalo de datas válido. - - - Please enter a valid date and time. - Por favor, informe uma data e horário válidos. - - - Please enter a valid date. - Por favor, informe uma data válida. - - - Please select a valid file. - Por favor, selecione um arquivo válido. - - - The hidden field is invalid. - O campo oculto é inválido. - - - Please enter an integer. - Por favor, informe um número inteiro. - - - Please select a valid language. - Por favor, selecione um idioma válido. - - - Please select a valid locale. - Por favor, selecione uma configuração de local válida. - - - Please enter a valid money amount. - Por favor, informe um valor monetário válido. - - - Please enter a number. - Por favor, informe um número. - - - The password is invalid. - A senha é inválida. - - - Please enter a percentage value. - Por favor, informe um valor percentual. - - - The values do not match. - Os valores não conferem. - - - Please enter a valid time. - Por favor, informe um horário válido. - - - Please select a valid timezone. - Por favor, selecione um fuso horário válido. - - - Please enter a valid URL. - Por favor, informe uma URL válida. - - - Please enter a valid search term. - Por favor, informe um termo de busca válido. - - - Please provide a valid phone number. - Por favor, informe um telefone válido. - - - The checkbox has an invalid value. - A caixa de seleção possui um valor inválido. - - - Please enter a valid email address. - Por favor, informe um endereço de e-mail válido. - - - Please select a valid option. - Por favor, selecione uma opção válida. - - - Please select a valid range. - Por favor, selecione um intervalo válido. - - - Please enter a valid week. - Por favor, informe uma semana válida. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.ro.xlf b/lib/symfony/form/Resources/translations/validators.ro.xlf deleted file mode 100644 index a7dc62b57..000000000 --- a/lib/symfony/form/Resources/translations/validators.ro.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Acest formular nu ar trebui să conțină câmpuri suplimentare. - - - The uploaded file was too large. Please try to upload a smaller file. - Fișierul încărcat a fost prea mare. Vă rugăm sa încărcați un fișier mai mic. - - - The CSRF token is invalid. Please try to resubmit the form. - Token-ul CSRF este invalid. Vă rugăm să retrimiteți formularul. - - - This value is not a valid HTML5 color. - Această valoare nu este un cod de culoare HTML5 valid. - - - Please enter a valid birthdate. - Vă rugăm să introduceți o dată de naștere validă. - - - The selected choice is invalid. - Valoarea selectată este invalidă. - - - The collection is invalid. - Colecția nu este validă. - - - Please select a valid color. - Vă rugăm să selectați o culoare validă. - - - Please select a valid country. - Vă rugăm să selectați o țară validă. - - - Please select a valid currency. - Vă rugăm să selectați o monedă validă. - - - Please choose a valid date interval. - Vă rugăm să selectați un interval de zile valid. - - - Please enter a valid date and time. - Vă rugăm să introduceți o dată și o oră validă. - - - Please enter a valid date. - Vă rugăm să introduceți o dată validă. - - - Please select a valid file. - Vă rugăm să selectați un fișier valid. - - - The hidden field is invalid. - Câmpul ascuns este invalid. - - - Please enter an integer. - Vă rugăm să introduceți un număr întreg. - - - Please select a valid language. - Vă rugăm să selectați o limbă validă. - - - Please select a valid locale. - Vă rugăm să selectați o setare locală validă. - - - Please enter a valid money amount. - Vă rugăm să introduceți o valoare monetară corectă. - - - Please enter a number. - Vă rugăm să introduceți un număr. - - - The password is invalid. - Parola nu este validă. - - - Please enter a percentage value. - Vă rugăm să introduceți o valoare procentuală. - - - The values do not match. - Valorile nu coincid. - - - Please enter a valid time. - Vă rugăm să introduceți o oră validă. - - - Please select a valid timezone. - Vă rugăm să selectați un fus orar valid. - - - Please enter a valid URL. - Vă rugăm să introduceți un URL valid. - - - Please enter a valid search term. - Vă rugăm să introduceți un termen de căutare valid. - - - Please provide a valid phone number. - Vă rugăm să introduceți un număr de telefon valid. - - - The checkbox has an invalid value. - Bifa nu are o valoare validă. - - - Please enter a valid email address. - Vă rugăm să introduceți o adresă de email validă. - - - Please select a valid option. - Vă rugăm să selectați o opțiune validă. - - - Please select a valid range. - Vă rugăm să selectați un interval valid. - - - Please enter a valid week. - Vă rugăm să introduceți o săptămână validă. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.ru.xlf b/lib/symfony/form/Resources/translations/validators.ru.xlf deleted file mode 100644 index b11b7cef5..000000000 --- a/lib/symfony/form/Resources/translations/validators.ru.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Эта форма не должна содержать дополнительных полей. - - - The uploaded file was too large. Please try to upload a smaller file. - Загруженный файл слишком большой. Пожалуйста, попробуйте загрузить файл меньшего размера. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF значение недопустимо. Пожалуйста, попробуйте повторить отправку формы. - - - This value is not a valid HTML5 color. - Значение не является допустимым HTML5 цветом. - - - Please enter a valid birthdate. - Пожалуйста, введите действительную дату рождения. - - - The selected choice is invalid. - Выбранный вариант недопустим. - - - The collection is invalid. - Коллекция недопустима. - - - Please select a valid color. - Пожалуйста, выберите допустимый цвет. - - - Please select a valid country. - Пожалуйста, выберите действительную страну. - - - Please select a valid currency. - Пожалуйста, выберите действительную валюту. - - - Please choose a valid date interval. - Пожалуйста, выберите действительный период. - - - Please enter a valid date and time. - Пожалуйста, введите действительные дату и время. - - - Please enter a valid date. - Пожалуйста, введите действительную дату. - - - Please select a valid file. - Пожалуйста, выберите допустимый файл. - - - The hidden field is invalid. - Значение скрытого поля недопустимо. - - - Please enter an integer. - Пожалуйста, введите целое число. - - - Please select a valid language. - Пожалуйста, выберите допустимый язык. - - - Please select a valid locale. - Пожалуйста, выберите допустимую локаль. - - - Please enter a valid money amount. - Пожалуйста, введите допустимое количество денег. - - - Please enter a number. - Пожалуйста, введите номер. - - - The password is invalid. - Пароль недействителен. - - - Please enter a percentage value. - Пожалуйста, введите процентное значение. - - - The values do not match. - Значения не совпадают. - - - Please enter a valid time. - Пожалуйста, введите действительное время. - - - Please select a valid timezone. - Пожалуйста, выберите действительный часовой пояс. - - - Please enter a valid URL. - Пожалуйста, введите действительный URL. - - - Please enter a valid search term. - Пожалуйста, введите действительный поисковый запрос. - - - Please provide a valid phone number. - Пожалуйста, введите действительный номер телефона. - - - The checkbox has an invalid value. - Флажок имеет недопустимое значение. - - - Please enter a valid email address. - Пожалуйста, введите допустимый email адрес. - - - Please select a valid option. - Пожалуйста, выберите допустимый вариант. - - - Please select a valid range. - Пожалуйста, выберите допустимый диапазон. - - - Please enter a valid week. - Пожалуйста, введите действительную неделю. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.sk.xlf b/lib/symfony/form/Resources/translations/validators.sk.xlf deleted file mode 100644 index 06b2bbdbe..000000000 --- a/lib/symfony/form/Resources/translations/validators.sk.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Polia by nemali obsahovať ďalšie prvky. - - - The uploaded file was too large. Please try to upload a smaller file. - Odoslaný súbor je príliš veľký. Prosím odošlite súbor s menšou veľkosťou. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token je neplatný. Prosím skúste znovu odoslať formulár. - - - This value is not a valid HTML5 color. - Táto hodnota nie je platná HTML5 farba. - - - Please enter a valid birthdate. - Prosím zadajte platný dátum narodenia. - - - The selected choice is invalid. - Vybraná možnosť je neplatná. - - - The collection is invalid. - Kolekcia je neplatná. - - - Please select a valid color. - Prosím vyberte platnú farbu. - - - Please select a valid country. - Prosím vyberte platnú krajinu. - - - Please select a valid currency. - Prosím vyberte platnú menu. - - - Please choose a valid date interval. - Prosím vyberte platný rozsah dát. - - - Please enter a valid date and time. - Prosím zadajte platný dátum a čas. - - - Please enter a valid date. - Prosím zadajte platný dátum. - - - Please select a valid file. - Prosím vyberte platný súbor. - - - The hidden field is invalid. - Skryté pole je neplatné. - - - Please enter an integer. - Prosím zadajte celé číslo. - - - Please select a valid language. - Prosím vyberte platný jazyk. - - - Please select a valid locale. - Prosím vyberte platné miestne nastavenia. - - - Please enter a valid money amount. - Prosím zadajte platnú čiastku. - - - Please enter a number. - Prosím zadajte číslo. - - - The password is invalid. - Heslo je neprávne. - - - Please enter a percentage value. - Prosím zadajte percentuálnu hodnotu. - - - The values do not match. - Hodnoty nie sú zhodné. - - - Please enter a valid time. - Prosím zadajte platný čas. - - - Please select a valid timezone. - Prosím vyberte platné časové pásmo. - - - Please enter a valid URL. - Prosím zadajte platnú URL. - - - Please enter a valid search term. - Prosím zadajte platný vyhľadávací výraz. - - - Please provide a valid phone number. - Prosím zadajte platné telefónne číslo. - - - The checkbox has an invalid value. - Zaškrtávacie políčko má neplatnú hodnotu. - - - Please enter a valid email address. - Prosím zadajte platnú emailovú adresu. - - - Please select a valid option. - Prosím vyberte platnú možnosť. - - - Please select a valid range. - Prosím vyberte platný rozsah. - - - Please enter a valid week. - Prosím zadajte platný týždeň. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.sl.xlf b/lib/symfony/form/Resources/translations/validators.sl.xlf deleted file mode 100644 index 7e6a3fb85..000000000 --- a/lib/symfony/form/Resources/translations/validators.sl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ta obrazec ne sme vsebovati dodatnih polj. - - - The uploaded file was too large. Please try to upload a smaller file. - Naložena datoteka je prevelika. Prosimo, poizkusite naložiti manjšo. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrednost je napačna. Prosimo, ponovno pošljite obrazec. - - - This value is not a valid HTML5 color. - Ta vrednost ni veljavna barva HTML5. - - - Please enter a valid birthdate. - Prosimo, vnesite veljaven rojstni datum. - - - The selected choice is invalid. - Izbira ni veljavna. - - - The collection is invalid. - Zbirka ni veljavna. - - - Please select a valid color. - Prosimo, izberite veljavno barvo. - - - Please select a valid country. - Prosimo, izberite veljavno državo. - - - Please select a valid currency. - Prosimo, izberite veljavno valuto. - - - Please choose a valid date interval. - Prosimo, izberite veljaven datumski interval. - - - Please enter a valid date and time. - Prosimo, vnesite veljaven datum in čas. - - - Please enter a valid date. - Prosimo, izberite veljaven datum. - - - Please select a valid file. - Prosimo, izberite veljavno datoteko. - - - The hidden field is invalid. - Skrito polje ni veljavno. - - - Please enter an integer. - Prosimo, vnesite celo število. - - - Please select a valid language. - Prosimo, izberite veljaven jezik. - - - Please select a valid locale. - Prosimo, izberite veljavne področne nastavitve. - - - Please enter a valid money amount. - Prosimo, vnesite veljaven denarni znesek. - - - Please enter a number. - Prosimo, vnesite številko. - - - The password is invalid. - Geslo ni veljavno. - - - Please enter a percentage value. - Prosimo, vnesite odstotno vrednost. - - - The values do not match. - Vrednosti se ne ujemajo. - - - Please enter a valid time. - Prosimo, vnesite veljaven čas. - - - Please select a valid timezone. - Prosimo, izberite veljaven časovni pas. - - - Please enter a valid URL. - Prosimo, vnesite veljaven URL. - - - Please enter a valid search term. - Prosimo, vnesite veljaven iskalni izraz. - - - Please provide a valid phone number. - Prosimo, podajte veljavno telefonsko številko. - - - The checkbox has an invalid value. - Potrditveno polje vsebuje neveljavno vrednost. - - - Please enter a valid email address. - Prosimo, vnesite veljaven e-poštni naslov. - - - Please select a valid option. - Prosimo, izberite veljavno možnost. - - - Please select a valid range. - Prosimo, izberite veljaven obseg. - - - Please enter a valid week. - Prosimo, vnesite veljaven teden. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.sq.xlf b/lib/symfony/form/Resources/translations/validators.sq.xlf deleted file mode 100644 index 3224f6e38..000000000 --- a/lib/symfony/form/Resources/translations/validators.sq.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Kjo formë nuk duhet të përmbajë fusha shtesë. - - - The uploaded file was too large. Please try to upload a smaller file. - Skedari i ngarkuar ishte shumë i madh. Ju lutemi provoni të ngarkoni një skedar më të vogël. - - - The CSRF token is invalid. Please try to resubmit the form. - Vlera CSRF është e pavlefshme. Ju lutemi provoni të ridërgoni formën. - - - This value is not a valid HTML5 color. - Kjo vlerë nuk është një ngjyrë e vlefshme HTML5. - - - Please enter a valid birthdate. - Ju lutemi shkruani një datëlindje të vlefshme. - - - The selected choice is invalid. - Opsioni i zgjedhur është i pavlefshëm. - - - The collection is invalid. - Koleksioni është i pavlefshëm. - - - Please select a valid color. - Ju lutemi zgjidhni një ngjyrë të vlefshme. - - - Please select a valid country. - Ju lutemi zgjidhni një shtet të vlefshëm. - - - Please select a valid currency. - Ju lutemi zgjidhni një monedhë të vlefshme. - - - Please choose a valid date interval. - Ju lutemi zgjidhni një interval të vlefshëm të datës. - - - Please enter a valid date and time. - Ju lutemi shkruani një datë dhe orë të vlefshme. - - - Please enter a valid date. - Ju lutemi shkruani një datë të vlefshme. - - - Please select a valid file. - Ju lutemi zgjidhni një skedar të vlefshëm. - - - The hidden field is invalid. - Fusha e fshehur është e pavlefshme. - - - Please enter an integer. - Ju lutemi shkruani një numër të plotë. - - - Please select a valid language. - Please select a valid language. - - - Please select a valid locale. - Ju lutemi zgjidhni një lokale të vlefshme. - - - Please enter a valid money amount. - Ju lutemi shkruani një shumë të vlefshme parash. - - - Please enter a number. - Ju lutemi shkruani një numër. - - - The password is invalid. - Fjalëkalimi është i pavlefshëm. - - - Please enter a percentage value. - Ju lutemi shkruani një vlerë përqindjeje. - - - The values do not match. - Vlerat nuk përputhen. - - - Please enter a valid time. - Ju lutemi shkruani një kohë të vlefshme. - - - Please select a valid timezone. - Ju lutemi zgjidhni një zonë kohore të vlefshme. - - - Please enter a valid URL. - Ju lutemi shkruani një URL të vlefshme. - - - Please enter a valid search term. - Ju lutemi shkruani një term të vlefshëm kërkimi. - - - Please provide a valid phone number. - Ju lutemi jepni një numër telefoni të vlefshëm. - - - The checkbox has an invalid value. - Kutia e zgjedhjes ka një vlerë të pavlefshme. - - - Please enter a valid email address. - Ju lutemi shkruani një adresë të vlefshme emaili. - - - Please select a valid option. - Ju lutemi zgjidhni një opsion të vlefshëm. - - - Please select a valid range. - Ju lutemi zgjidhni një diapazon të vlefshëm. - - - Please enter a valid week. - Ju lutemi shkruani një javë të vlefshme. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.sr_Cyrl.xlf b/lib/symfony/form/Resources/translations/validators.sr_Cyrl.xlf deleted file mode 100644 index a5610e0ea..000000000 --- a/lib/symfony/form/Resources/translations/validators.sr_Cyrl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Овај формулар не треба да садржи додатна поља. - - - The uploaded file was too large. Please try to upload a smaller file. - Отпремљена датотека је била превелика. Молим покушајте отпремање мање датотеке. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF вредност није исправна. Покушајте поново. - - - This value is not a valid HTML5 color. - Ова вредност није исправна HTML5 боја. - - - Please enter a valid birthdate. - Молим упишите исправан датум рођења. - - - The selected choice is invalid. - Одабрани избор није исправан. - - - The collection is invalid. - Ова колекција није исправна. - - - Please select a valid color. - Молим изаберите исправну боју. - - - Please select a valid country. - Молим изаберите исправну државу. - - - Please select a valid currency. - Молим изаберите исправну валуту. - - - Please choose a valid date interval. - Молим изаберите исправан датумски интервал. - - - Please enter a valid date and time. - Молим упишите исправан датум и време. - - - Please enter a valid date. - Молим упишите исправан датум. - - - Please select a valid file. - Молим изаберите исправну датотеку. - - - The hidden field is invalid. - Скривено поље није исправно. - - - Please enter an integer. - Молим упишите цео број (integer). - - - Please select a valid language. - Молим изаберите исправан језик. - - - Please select a valid locale. - Молим изаберите исправну локализацију. - - - Please enter a valid money amount. - Молим упишите исправну количину новца. - - - Please enter a number. - Молим упишите број. - - - The password is invalid. - Ова лозинка није исправна. - - - Please enter a percentage value. - Молим упишите процентуалну вредност. - - - The values do not match. - Дате вредности се не поклапају. - - - Please enter a valid time. - Молим упишите исправно време. - - - Please select a valid timezone. - Молим изаберите исправну временску зону. - - - Please enter a valid URL. - Молим упишите исправан URL. - - - Please enter a valid search term. - Молим упишите исправан термин за претрагу. - - - Please provide a valid phone number. - Молим наведите исправан број телефона. - - - The checkbox has an invalid value. - Поље за потврду садржи неисправну вредност. - - - Please enter a valid email address. - Молим упишите исправну email адресу. - - - Please select a valid option. - Молим изаберите исправну опцију. - - - Please select a valid range. - Молим изаберите исправан опсег. - - - Please enter a valid week. - Молим упишите исправну седмицу. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.sr_Latn.xlf b/lib/symfony/form/Resources/translations/validators.sr_Latn.xlf deleted file mode 100644 index 02fb5aa56..000000000 --- a/lib/symfony/form/Resources/translations/validators.sr_Latn.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ovaj formular ne treba da sadrži dodatna polja. - - - The uploaded file was too large. Please try to upload a smaller file. - Otpremljena datoteka je bila prevelika. Molim pokušajte otpremanje manje datoteke. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrednost nije ispravna. Pokušajte ponovo. - - - This value is not a valid HTML5 color. - Ova vrednost nije ispravna HTML5 boja. - - - Please enter a valid birthdate. - Molim upišite ispravan datum rođenja. - - - The selected choice is invalid. - Odabrani izbor nije ispravan. - - - The collection is invalid. - Ova kolekcija nije ispravna. - - - Please select a valid color. - Molim izaberite ispravnu boju. - - - Please select a valid country. - Molim izaberite ispravnu državu. - - - Please select a valid currency. - Molim izaberite ispravnu valutu. - - - Please choose a valid date interval. - Molim izaberite ispravan datumski interval. - - - Please enter a valid date and time. - Molim upišite ispravan datum i vreme. - - - Please enter a valid date. - Molim upišite ispravan datum. - - - Please select a valid file. - Molim izaberite ispravnu datoteku. - - - The hidden field is invalid. - Skriveno polje nije ispravno. - - - Please enter an integer. - Molim upišite ceo broj (integer). - - - Please select a valid language. - Molim izaberite ispravan jezik. - - - Please select a valid locale. - Molim izaberite ispravnu lokalizaciju. - - - Please enter a valid money amount. - Molim upišite ispravnu količinu novca. - - - Please enter a number. - Molim upišite broj. - - - The password is invalid. - Ova lozinka nije ispravna. - - - Please enter a percentage value. - Molim upišite procentualnu vrednost. - - - The values do not match. - Date vrednosti se ne poklapaju. - - - Please enter a valid time. - Molim upišite ispravno vreme. - - - Please select a valid timezone. - Molim izaberite ispravnu vremensku zonu. - - - Please enter a valid URL. - Molim upišite ispravan URL. - - - Please enter a valid search term. - Molim upišite ispravan termin za pretragu. - - - Please provide a valid phone number. - Molim navedite ispravan broj telefona. - - - The checkbox has an invalid value. - Polje za potvrdu sadrži neispravnu vrednost. - - - Please enter a valid email address. - Molim upišite ispravnu email adresu. - - - Please select a valid option. - Molim izaberite ispravnu opciju. - - - Please select a valid range. - Molim izaberite ispravan opseg. - - - Please enter a valid week. - Molim upišite ispravnu sedmicu. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.sv.xlf b/lib/symfony/form/Resources/translations/validators.sv.xlf deleted file mode 100644 index 43e925628..000000000 --- a/lib/symfony/form/Resources/translations/validators.sv.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Formuläret kan inte innehålla extra fält. - - - The uploaded file was too large. Please try to upload a smaller file. - Den uppladdade filen var för stor. Försök ladda upp en mindre fil. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-elementet är inte giltigt. Försök att skicka formuläret igen. - - - This value is not a valid HTML5 color. - Värdet är inte en giltig HTML5-färg. - - - Please enter a valid birthdate. - Ange ett giltigt födelsedatum. - - - The selected choice is invalid. - Det valda alternativet är ogiltigt. - - - The collection is invalid. - Den här samlingen är ogiltig. - - - Please select a valid color. - Välj en giltig färg. - - - Please select a valid country. - Välj ett land. - - - Please select a valid currency. - Välj en valuta. - - - Please choose a valid date interval. - Välj ett giltigt datumintervall. - - - Please enter a valid date and time. - Ange ett giltigt datum och tid. - - - Please enter a valid date. - Ange ett giltigt datum. - - - Please select a valid file. - Välj en fil. - - - The hidden field is invalid. - Det dolda fältet är ogiltigt. - - - Please enter an integer. - Ange ett heltal. - - - Please select a valid language. - Välj språk. - - - Please select a valid locale. - Välj plats. - - - Please enter a valid money amount. - Ange en giltig summa pengar. - - - Please enter a number. - Ange en siffra. - - - The password is invalid. - Lösenordet är ogiltigt. - - - Please enter a percentage value. - Ange ett procentuellt värde. - - - The values do not match. - De angivna värdena stämmer inte överens. - - - Please enter a valid time. - Ange en giltig tid. - - - Please select a valid timezone. - Välj en tidszon. - - - Please enter a valid URL. - Ange en giltig URL. - - - Please enter a valid search term. - Ange ett giltigt sökbegrepp. - - - Please provide a valid phone number. - Ange ett giltigt telefonnummer. - - - The checkbox has an invalid value. - Kryssrutan har ett ogiltigt värde. - - - Please enter a valid email address. - Ange en giltig e-postadress. - - - Please select a valid option. - Välj ett alternativ. - - - Please select a valid range. - Välj ett intervall. - - - Please enter a valid week. - Ange en giltig vecka. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.th.xlf b/lib/symfony/form/Resources/translations/validators.th.xlf deleted file mode 100644 index 060dc9ec4..000000000 --- a/lib/symfony/form/Resources/translations/validators.th.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - ฟอร์มนี้ไม่ควรมี extra fields - - - The uploaded file was too large. Please try to upload a smaller file. - ไฟล์ที่อัพโหลดมีขนาดใหญ่เกินไป กรุณาลองอัพโหลดใหม่อีกครั้งด้วยไฟล์ที่มีขนาดเล็กลง - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token ไม่ถูกต้อง กรุณาลองส่งแบบฟอร์มใหม่ - - - This value is not a valid HTML5 color. - ค่านี้ไม่ใช่ค่าที่ถูกต้องของค่าสี HTML5 - - - Please enter a valid birthdate. - กรุณากรอกวันเดือนปีเกิดที่ถูกต้อง - - - The selected choice is invalid. - ตัวเลือกที่เลิอกไม่ถูกต้อง - - - The collection is invalid. - คอเล็กชั่นไม่ถูกต้อง - - - Please select a valid color. - กรุณาเลือกค่าสีที่ถูกต้อง - - - Please select a valid country. - กรุณาเลือกประเทศที่ถูกต้อง - - - Please select a valid currency. - กรุุณาเลิอกค่าสกุลเงินที่ถูกต้อง - - - Please choose a valid date interval. - กรุณณากรอกช่วงวันที่ที่ถูกต้อง - - - Please enter a valid date and time. - กรุณณากรอกค่าเวลาและวันที่ที่ถูกต้อง - - - Please enter a valid date. - กรุณณากรอกค่าวันที่ที่ถูกต้อง - - - Please select a valid file. - กรุณาเลือกไฟล์ที่ถูกต้อง - - - The hidden field is invalid. - ค่า Hidden field ไม่ถูกต้อง - - - Please enter an integer. - กรุณากรอกตัวเลขจำนวนเต็ม - - - Please select a valid language. - กรุณาเลือกภาษาที่ถูกต้อง - - - Please select a valid locale. - กรุณาเลือกท้องถิ่นที่ถูกต้อง - - - Please enter a valid money amount. - กรุณากรอกจำนวนเงินที่ถูกต้อง - - - Please enter a number. - กรุณากรอกตัวเลข - - - The password is invalid. - รหัสผ่านไม่ถูกต้อง - - - Please enter a percentage value. - กรุณากรอกค่าเปอร์เซ็นต์ - - - The values do not match. - ค่าทั้งสองไม่ตรงกัน - - - Please enter a valid time. - กรุณากรอกค่าเวลาที่ถูกต้อง - - - Please select a valid timezone. - กรุณาเลือกค่าเขตเวลาที่ถูกต้อง - - - Please enter a valid URL. - กรุณากรอก URL ที่ถูกต้อง - - - Please enter a valid search term. - กรุณากรอกคำค้นหาที่ถูกต้อง - - - Please provide a valid phone number. - กรุณากรอกเบอร์โทรศัพท์ที่ถูกต้อง - - - The checkbox has an invalid value. - Checkbox มีค่าที่ไม่ถูกต้อง - - - Please enter a valid email address. - กรุณากรอกที่อยู่อีเมล์ที่ถูกต้อง - - - Please select a valid option. - กรุณาเลือกตัวเลือกที่ถูกต้อง - - - Please select a valid range. - กรุณาเลือกค่าช่วงที่ถูกต้อง - - - Please enter a valid week. - กรุณากรอกค่าสัปดาห์ที่ถูกต้อง - - - - diff --git a/lib/symfony/form/Resources/translations/validators.tl.xlf b/lib/symfony/form/Resources/translations/validators.tl.xlf deleted file mode 100644 index 272e33129..000000000 --- a/lib/symfony/form/Resources/translations/validators.tl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ang pormang itong ay hindi dapat magkarron ng dagdag na mga patlang. - - - The uploaded file was too large. Please try to upload a smaller file. - Ang ini-upload na file ay masyadong malaki. Pakiulit muling mag-upload ng mas maliit na file. - - - The CSRF token is invalid. Please try to resubmit the form. - Hindi balido ang CSRF token. Maagpasa muli ng isang pang porma. - - - This value is not a valid HTML5 color. - Ang halagang ito ay hindi wastong HTML5 color. - - - Please enter a valid birthdate. - Pakilagay ang tamang petsa ng kapanganakan. - - - The selected choice is invalid. - Ang pinagpiliang sagot ay hindi tama. - - - The collection is invalid. - Hindi balido ang koleksyon. - - - Please select a valid color. - Pakipiliin ang nararapat na kulay. - - - Please select a valid country. - Pakipiliin ang nararapat na bansa. - - - Please select a valid currency. - Pakipiliin ang tamang pananalapi. - - - Please choose a valid date interval. - Piliin ang wastong agwat ng petsa. - - - Please enter a valid date and time. - Piliin ang wastong petsa at oras. - - - Please enter a valid date. - Ilagay ang wastong petsa. - - - Please select a valid file. - Piliin ang balidong file. - - - The hidden field is invalid. - Hindi balido ang field na nakatago. - - - Please enter an integer. - Pakilagay ang integer. - - - Please select a valid language. - Piliin ang nararapat na lengguwahe. - - - Please select a valid locale. - Pakipili ang nararapat na locale. - - - Please enter a valid money amount. - Pakilagay ang tamang halaga ng pera. - - - Please enter a number. - Ilagay ang numero. - - - The password is invalid. - Hindi balido ang password. - - - Please enter a percentage value. - Pakilagay ang tamang porsyento ng halaga. - - - The values do not match. - Hindi tugma ang mga halaga. - - - Please enter a valid time. - Pakilagay ang tamang oras. - - - Please select a valid timezone. - Pakilagay ang tamang sona ng oras. - - - Please enter a valid URL. - Pakilagay ang balidong URL. - - - Please enter a valid search term. - Pakilagay ang balidong katagang sinasaliksik. - - - Please provide a valid phone number. - Pakilagay ang balidong numero ng telepono. - - - The checkbox has an invalid value. - Ang checkbox ay mayroon hindi balidong halaga. - - - Please enter a valid email address. - Pakilagay ang balidong email address. - - - Please select a valid option. - Pakipiliin ang balidong pagpipilian. - - - Please select a valid range. - Pakipilian ang balidong layo. - - - Please enter a valid week. - Pakilagay ang balidong linggo. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.tr.xlf b/lib/symfony/form/Resources/translations/validators.tr.xlf deleted file mode 100644 index d1ddc1d0e..000000000 --- a/lib/symfony/form/Resources/translations/validators.tr.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Form ekstra alanlar içeremez. - - - The uploaded file was too large. Please try to upload a smaller file. - Yüklenen dosya boyutu çok yüksek. Lütfen daha küçük bir dosya yüklemeyi deneyin. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF fişi geçersiz. Formu tekrar göndermeyi deneyin. - - - This value is not a valid HTML5 color. - Bu değer, geçerli bir HTML5 rengi değil. - - - Please enter a valid birthdate. - Lütfen geçerli bir doğum tarihi girin. - - - The selected choice is invalid. - Seçilen seçim geçersiz. - - - The collection is invalid. - Koleksiyon geçersiz. - - - Please select a valid color. - Lütfen geçerli bir renk seçin. - - - Please select a valid country. - Lütfen geçerli bir ülke seçin. - - - Please select a valid currency. - Lütfen geçerli bir para birimi seçin. - - - Please choose a valid date interval. - Lütfen geçerli bir tarih aralığı seçin. - - - Please enter a valid date and time. - Lütfen geçerli bir tarih ve saat girin. - - - Please enter a valid date. - Lütfen geçerli bir tarih giriniz. - - - Please select a valid file. - Lütfen geçerli bir dosya seçin. - - - The hidden field is invalid. - Gizli alan geçersiz. - - - Please enter an integer. - Lütfen bir tam sayı girin. - - - Please select a valid language. - Lütfen geçerli bir dil seçin. - - - Please select a valid locale. - Lütfen geçerli bir yerel ayar seçin. - - - Please enter a valid money amount. - Lütfen geçerli bir para tutarı girin. - - - Please enter a number. - Lütfen bir numara giriniz. - - - The password is invalid. - Şifre geçersiz. - - - Please enter a percentage value. - Lütfen bir yüzde değeri girin. - - - The values do not match. - Değerler eşleşmiyor. - - - Please enter a valid time. - Lütfen geçerli bir zaman girin. - - - Please select a valid timezone. - Lütfen geçerli bir saat dilimi seçin. - - - Please enter a valid URL. - Lütfen geçerli bir giriniz URL. - - - Please enter a valid search term. - Lütfen geçerli bir arama terimi girin. - - - Please provide a valid phone number. - lütfen geçerli bir telefon numarası sağlayın. - - - The checkbox has an invalid value. - Onay kutusunda geçersiz bir değer var. - - - Please enter a valid email address. - Lütfen geçerli bir e-posta adresi girin. - - - Please select a valid option. - Lütfen geçerli bir seçenek seçin. - - - Please select a valid range. - Lütfen geçerli bir aralık seçin. - - - Please enter a valid week. - Lütfen geçerli bir hafta girin. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.uk.xlf b/lib/symfony/form/Resources/translations/validators.uk.xlf deleted file mode 100644 index ca707bcff..000000000 --- a/lib/symfony/form/Resources/translations/validators.uk.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ця форма не повинна містити додаткових полів. - - - The uploaded file was too large. Please try to upload a smaller file. - Завантажений файл занадто великий. Будь ласка, спробуйте завантажити файл меншого розміру. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF значення недопустиме. Будь ласка, спробуйте відправити форму знову. - - - This value is not a valid HTML5 color. - Це значення не є допустимим кольором HTML5. - - - Please enter a valid birthdate. - Будь ласка, введіть дійсну дату народження. - - - The selected choice is invalid. - Обраний варіант недійсний. - - - The collection is invalid. - Колекція недійсна. - - - Please select a valid color. - Будь ласка, оберіть дійсний колір. - - - Please select a valid country. - Будь ласка, оберіть дійсну країну. - - - Please select a valid currency. - Будь ласка, оберіть дійсну валюту. - - - Please choose a valid date interval. - Будь ласка, оберіть дійсний інтервал дати. - - - Please enter a valid date and time. - Будь ласка, введіть дійсну дату та час. - - - Please enter a valid date. - Будь ласка, введіть дійсну дату. - - - Please select a valid file. - Будь ласка, оберіть дійсний файл. - - - The hidden field is invalid. - Приховане поле недійсне. - - - Please enter an integer. - Будь ласка, введіть ціле число. - - - Please select a valid language. - Будь ласка, оберіть дійсну мову. - - - Please select a valid locale. - Будь ласка, оберіть дійсну локаль. - - - Please enter a valid money amount. - Будь ласка, введіть дійсну суму грошей. - - - Please enter a number. - Будь ласка, введіть число. - - - The password is invalid. - Пароль недійсний. - - - Please enter a percentage value. - Будь ласка, введіть процентне значення. - - - The values do not match. - Значення не збігаються. - - - Please enter a valid time. - Будь ласка, введіть дійсний час. - - - Please select a valid timezone. - Будь ласка, оберіть дійсний часовий пояс. - - - Please enter a valid URL. - Будь ласка, введіть дійсну URL-адресу. - - - Please enter a valid search term. - Будь ласка, введіть дійсний пошуковий термін. - - - Please provide a valid phone number. - Будь ласка, введіть дійсний номер телефону. - - - The checkbox has an invalid value. - Прапорець має недійсне значення. - - - Please enter a valid email address. - Будь ласка, введіть дійсну адресу електронної пошти. - - - Please select a valid option. - Будь ласка, оберіть дійсний варіант. - - - Please select a valid range. - Будь ласка, оберіть дійсний діапазон. - - - Please enter a valid week. - Будь ласка, введіть дійсний тиждень. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.ur.xlf b/lib/symfony/form/Resources/translations/validators.ur.xlf deleted file mode 100644 index 1ec61be6d..000000000 --- a/lib/symfony/form/Resources/translations/validators.ur.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - اس فارم میں اضافی فیلڈز نہیں ہونی چاہئیں - - - The uploaded file was too large. Please try to upload a smaller file. - اپ لوڈ کردھ فائل بہت بڑی تھی۔ براہ کرم ایک چھوٹی فائل اپ لوڈ کرنے کی کوشش کریں - - - The CSRF token is invalid. Please try to resubmit the form. - ٹوکن غلط ہے۔ براۓ کرم فارم کو دوبارہ جمع کرانے کی کوشش کریں CSRF - - - This value is not a valid HTML5 color. - ر نگ نھیں ھےHTML یھ ولیو در ست - - - Please enter a valid birthdate. - براۓ کرم درست تاریخ پیدائش درج کریں - - - The selected choice is invalid. - منتخب کردہ انتخاب غلط ہے - - - The collection is invalid. - یھ مجموعہ غلط ہے - - - Please select a valid color. - براۓ کرم ایک درست رنگ منتخب کریں - - - Please select a valid country. - براۓ کرم ایک درست ملک منتخب کریں - - - Please select a valid currency. - براۓ کرم ایک درست کرنسی منتخب کریں - - - Please choose a valid date interval. - براۓ کرم ایک درست تاریخی وقفھہ منتخب کریں - - - Please enter a valid date and time. - براۓ کرم ایک درست تاریخ اور وقت درج کریں - - - Please enter a valid date. - براۓ کرم ایک درست تاریخ درج کریں - - - Please select a valid file. - براۓ کرم ایک درست فائل منتخب کریں - - - The hidden field is invalid. - پوشیدھہ فیلڈ غلط ہے - - - Please enter an integer. - براۓ کرم ایک عدد درج کریں - - - Please select a valid language. - براۓ کرم ایک درست زبان منتخب کریں - - - Please select a valid locale. - براۓ کرم ایک درست مقام منتخب کریں - - - Please enter a valid money amount. - براۓ کرم ایک درست رقم درج کریں - - - Please enter a number. - براۓ کرم ایک نمبر درج کریں - - - The password is invalid. - پاس ورڈ غلط ہے - - - Please enter a percentage value. - براہ کرم فیصد کی ويلو درج کریں - - - The values do not match. - ويليوذ ٹھيک نہیں ہیں - - - Please enter a valid time. - براۓ کرم ایک درست وقت درج کریں - - - Please select a valid timezone. - براۓ کرم ایک درست ٹائم زون منتخب کریں - - - Please enter a valid URL. - براۓ کرم ایک درست ادريس درج کریں - - - Please enter a valid search term. - براۓ کرم ایک درست ويلو تلاش کيلۓ درج کریں - - - Please provide a valid phone number. - براۓ کرم ایک درست فون نمبر فراہم کریں - - - The checkbox has an invalid value. - چیک باکس میں ایک غلط ويلو ہے - - - Please enter a valid email address. - براۓ مہربانی قابل قبول ای میل ایڈریس لکھیں - - - Please select a valid option. - براۓ کرم ایک درست آپشن منتخب کریں - - - Please select a valid range. - براۓ کرم ایک درست رینج منتخب کریں - - - Please enter a valid week. - براۓ کرم ایک درست ہفتہ درج کریں - - - - diff --git a/lib/symfony/form/Resources/translations/validators.uz.xlf b/lib/symfony/form/Resources/translations/validators.uz.xlf deleted file mode 100644 index 58591d69e..000000000 --- a/lib/symfony/form/Resources/translations/validators.uz.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ushbu fo'rmada qo'shimcha maydonlar bo'lmasligi kerak. - - - The uploaded file was too large. Please try to upload a smaller file. - Yuklab olingan fayl juda katta. Iltimos, kichikroq faylni yuklashga harakat qiling. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF qiymati yaroqsiz. Fo'rmani qayta yuborishga harakat qiling. - - - This value is not a valid HTML5 color. - Qiymat noto'g'ri, HTML5 rangi emas. - - - Please enter a valid birthdate. - Iltimos, tug'ilgan kuningizni to'g'ri kiriting. - - - The selected choice is invalid. - Tanlangan parametr noto'g'ri. - - - The collection is invalid. - Kolleksiya noto'g'ri - - - Please select a valid color. - Iltimos, to'g'ri rang tanlang. - - - Please select a valid country. - Iltimos, to'g'ri mamlakatni tanlang. - - - Please select a valid currency. - Iltimos, to'g'ri valyutani tanlang. - - - Please choose a valid date interval. - Iltimos, to'g'ri sana oralig'ini tanlang. - - - Please enter a valid date and time. - Iltimos, to'g'ri sana va vaqtni kiriting. - - - Please enter a valid date. - Iltimos, to'g'ri sanani kiriting. - - - Please select a valid file. - Iltimos, to'g'ri faylni tanlang. - - - The hidden field is invalid. - Yashirin maydon qiymati yaroqsiz. - - - Please enter an integer. - Iltimos, butun son kiriting. - - - Please select a valid language. - Iltimos, to'g'ri tilni tanlang. - - - Please select a valid locale. - Iltimos, to'g'ri localni tanlang. - - - Please enter a valid money amount. - Iltimos, tegishli miqdordagi pulni kiriting. - - - Please enter a number. - Iltimos, raqam kiriting. - - - The password is invalid. - Parol noto'g'ri. - - - Please enter a percentage value. - Iltimos, foyizli qiymat kiriting. - - - The values do not match. - Qiymatlar mos kelmaydi. - - - Please enter a valid time. - Iltimos, to'g'ri vaqtni tanlang. - - - Please select a valid timezone. - Iltimos, to'g'ri vaqt zonasini tanlang. - - - Please enter a valid URL. - Iltimos, to'g'ri URL kiriting. - - - Please enter a valid search term. - Iltimos, to'g'ri qidiruv so'zini kiriting. - - - Please provide a valid phone number. - Iltimos, to'g'ri telefon raqamini kiriting. - - - The checkbox has an invalid value. - Belgilash katagida yaroqsiz qiymat mavjud. - - - Please enter a valid email address. - Iltimos, to'g'ri email kiriting. - - - Please select a valid option. - Iltimos, yaroqli variantni tanlang. - - - Please select a valid range. - Iltimos, yaroqli oraliqni tanlang. - - - Please enter a valid week. - Iltimos, haqiqiy haftani kiriting. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.vi.xlf b/lib/symfony/form/Resources/translations/validators.vi.xlf deleted file mode 100644 index 6a8f2bd86..000000000 --- a/lib/symfony/form/Resources/translations/validators.vi.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Mẫu này không nên chứa trường mở rộng. - - - The uploaded file was too large. Please try to upload a smaller file. - Tập tin tải lên quá lớn. Vui lòng thử lại với tập tin nhỏ hơn. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token không hợp lệ. Vui lòng thử lại. - - - This value is not a valid HTML5 color. - Giá trị này không phải là màu HTML5 hợp lệ. - - - Please enter a valid birthdate. - Vui lòng nhập ngày sinh hợp lệ. - - - The selected choice is invalid. - Lựa chọn không hợp lệ. - - - The collection is invalid. - Danh sách không hợp lệ. - - - Please select a valid color. - Vui lòng chọn một màu hợp lệ. - - - Please select a valid country. - Vui lòng chọn đất nước hợp lệ. - - - Please select a valid currency. - Vui lòng chọn tiền tệ hợp lệ. - - - Please choose a valid date interval. - Vui lòng chọn một khoảng thời gian hợp lệ. - - - Please enter a valid date and time. - Vui lòng nhập ngày và thời gian hợp lệ. - - - Please enter a valid date. - Vui lòng nhập ngày hợp lệ. - - - Please select a valid file. - Vui lòng chọn tệp hợp lệ. - - - The hidden field is invalid. - Phạm vi ẩn không hợp lệ. - - - Please enter an integer. - Vui lòng nhập một số nguyên. - - - Please select a valid language. - Vui lòng chọn ngôn ngữ hợp lệ. - - - Please select a valid locale. - Vui lòng chọn miền hợp lệ. - - - Please enter a valid money amount. - Vui lòng nhập một khoảng tiền hợp lệ. - - - Please enter a number. - Vui lòng nhập một con số. - - - The password is invalid. - Mật khẩu không hợp lệ. - - - Please enter a percentage value. - Vui lòng nhập một giá trị phần trăm. - - - The values do not match. - Các giá trị không phù hợp. - - - Please enter a valid time. - Vui lòng nhập thời gian hợp lệ. - - - Please select a valid timezone. - Vui lòng chọn múi giờ hợp lệ. - - - Please enter a valid URL. - Vui lòng nhập một URL hợp lệ. - - - Please enter a valid search term. - Vui lòng nhập chuỗi tìm kiếm hợp lệ. - - - Please provide a valid phone number. - Vui lòng cung cấp số điện thoại hợp lệ. - - - The checkbox has an invalid value. - Hộp kiểm có một giá trị không hợp lệ. - - - Please enter a valid email address. - Vui lòng nhập địa chỉ email hợp lệ. - - - Please select a valid option. - Vui lòng chọn một phương án hợp lệ. - - - Please select a valid range. - Vui lòng nhập một phạm vi hợp lệ. - - - Please enter a valid week. - Vui lòng nhập một tuần hợp lệ. - - - - diff --git a/lib/symfony/form/Resources/translations/validators.zh_CN.xlf b/lib/symfony/form/Resources/translations/validators.zh_CN.xlf deleted file mode 100644 index 3106db2bd..000000000 --- a/lib/symfony/form/Resources/translations/validators.zh_CN.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - 该表单中不可有额外字段. - - - The uploaded file was too large. Please try to upload a smaller file. - 上传文件太大, 请重新尝试上传一个较小的文件. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF 验证符无效, 请重新提交. - - - This value is not a valid HTML5 color. - 该数值不是个有效的 HTML5 颜色。 - - - Please enter a valid birthdate. - 请输入有效的生日日期。 - - - The selected choice is invalid. - 所选的选项无效。 - - - The collection is invalid. - 集合无效。 - - - Please select a valid color. - 请选择有效的颜色。 - - - Please select a valid country. - 请选择有效的国家。 - - - Please select a valid currency. - 请选择有效的货币。 - - - Please choose a valid date interval. - 请选择有效的日期间隔。 - - - Please enter a valid date and time. - 请输入有效的日期与时间。 - - - Please enter a valid date. - 请输入有效的日期。 - - - Please select a valid file. - 请选择有效的文件。 - - - The hidden field is invalid. - 隐藏字段无效。 - - - Please enter an integer. - 请输入整数。 - - - Please select a valid language. - 请选择有效的语言。 - - - Please select a valid locale. - 请选择有效的语言环境。 - - - Please enter a valid money amount. - 请输入正确的金额。 - - - Please enter a number. - 请输入数字。 - - - The password is invalid. - 密码无效。 - - - Please enter a percentage value. - 请输入百分比值。 - - - The values do not match. - 数值不匹配。 - - - Please enter a valid time. - 请输入有效的时间。 - - - Please select a valid timezone. - 请选择有效的时区。 - - - Please enter a valid URL. - 请输入有效的网址。 - - - Please enter a valid search term. - 请输入有效的搜索词。 - - - Please provide a valid phone number. - 请提供有效的手机号码。 - - - The checkbox has an invalid value. - 无效的选框值。 - - - Please enter a valid email address. - 请输入有效的电子邮件地址。 - - - Please select a valid option. - 请选择有效的选项。 - - - Please select a valid range. - 请选择有效的范围。 - - - Please enter a valid week. - 请输入有效的星期。 - - - - diff --git a/lib/symfony/form/Resources/translations/validators.zh_TW.xlf b/lib/symfony/form/Resources/translations/validators.zh_TW.xlf deleted file mode 100644 index 858b9db42..000000000 --- a/lib/symfony/form/Resources/translations/validators.zh_TW.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - 該表單中不可有額外字段。 - - - The uploaded file was too large. Please try to upload a smaller file. - 上傳文件太大, 請重新嘗試上傳一個較小的文件。 - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF 驗證符無效, 請重新提交。 - - - This value is not a valid HTML5 color. - 該數值不是個有效的 HTML5 顏色。 - - - Please enter a valid birthdate. - 請輸入有效的生日日期。 - - - The selected choice is invalid. - 所選的選項無效。 - - - The collection is invalid. - 集合無效。 - - - Please select a valid color. - 請選擇有效的顏色。 - - - Please select a valid country. - 請選擇有效的國家。 - - - Please select a valid currency. - 請選擇有效的貨幣。 - - - Please choose a valid date interval. - 請選擇有效的日期間隔。 - - - Please enter a valid date and time. - 請輸入有效的日期與時間。 - - - Please enter a valid date. - 請輸入有效的日期。 - - - Please select a valid file. - 請選擇有效的文件。 - - - The hidden field is invalid. - 隱藏字段無效。 - - - Please enter an integer. - 請輸入整數。 - - - Please select a valid language. - 請選擇有效的語言。 - - - Please select a valid locale. - 請選擇有效的語言環境。 - - - Please enter a valid money amount. - 請輸入正確的金額。 - - - Please enter a number. - 請輸入數字。 - - - The password is invalid. - 密碼無效。 - - - Please enter a percentage value. - 請輸入百分比值。 - - - The values do not match. - 數值不匹配。 - - - Please enter a valid time. - 請輸入有效的時間。 - - - Please select a valid timezone. - 請選擇有效的時區。 - - - Please enter a valid URL. - 請輸入有效的網址。 - - - Please enter a valid search term. - 請輸入有效的搜索詞。 - - - Please provide a valid phone number. - 請提供有效的手機號碼。 - - - The checkbox has an invalid value. - 無效的選框值。 - - - Please enter a valid email address. - 請輸入有效的電子郵件地址。 - - - Please select a valid option. - 請選擇有效的選項。 - - - Please select a valid range. - 請選擇有效的範圍。 - - - Please enter a valid week. - 請輸入有效的星期。 - - - - diff --git a/lib/symfony/form/ReversedTransformer.php b/lib/symfony/form/ReversedTransformer.php deleted file mode 100644 index 8089e47bf..000000000 --- a/lib/symfony/form/ReversedTransformer.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Reverses a transformer. - * - * When the transform() method is called, the reversed transformer's - * reverseTransform() method is called and vice versa. - * - * @author Bernhard Schussek - */ -class ReversedTransformer implements DataTransformerInterface -{ - protected $reversedTransformer; - - public function __construct(DataTransformerInterface $reversedTransformer) - { - $this->reversedTransformer = $reversedTransformer; - } - - /** - * {@inheritdoc} - */ - public function transform($value) - { - return $this->reversedTransformer->reverseTransform($value); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - return $this->reversedTransformer->transform($value); - } -} diff --git a/lib/symfony/form/SubmitButton.php b/lib/symfony/form/SubmitButton.php deleted file mode 100644 index 520f223e2..000000000 --- a/lib/symfony/form/SubmitButton.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A button that submits the form. - * - * @author Bernhard Schussek - */ -class SubmitButton extends Button implements ClickableInterface -{ - private $clicked = false; - - /** - * {@inheritdoc} - */ - public function isClicked() - { - return $this->clicked; - } - - /** - * Submits data to the button. - * - * @param array|string|null $submittedData The data - * @param bool $clearMissing Not used - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - */ - public function submit($submittedData, bool $clearMissing = true) - { - if ($this->getConfig()->getDisabled()) { - $this->clicked = false; - - return $this; - } - - parent::submit($submittedData, $clearMissing); - - $this->clicked = null !== $submittedData; - - return $this; - } -} diff --git a/lib/symfony/form/SubmitButtonBuilder.php b/lib/symfony/form/SubmitButtonBuilder.php deleted file mode 100644 index 3045e0ddd..000000000 --- a/lib/symfony/form/SubmitButtonBuilder.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A builder for {@link SubmitButton} instances. - * - * @author Bernhard Schussek - */ -class SubmitButtonBuilder extends ButtonBuilder -{ - /** - * Creates the button. - * - * @return SubmitButton - */ - public function getForm() - { - return new SubmitButton($this->getFormConfig()); - } -} diff --git a/lib/symfony/form/SubmitButtonTypeInterface.php b/lib/symfony/form/SubmitButtonTypeInterface.php deleted file mode 100644 index f7ac13f7e..000000000 --- a/lib/symfony/form/SubmitButtonTypeInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A type that should be converted into a {@link SubmitButton} instance. - * - * @author Bernhard Schussek - */ -interface SubmitButtonTypeInterface extends FormTypeInterface -{ -} diff --git a/lib/symfony/form/Test/FormBuilderInterface.php b/lib/symfony/form/Test/FormBuilderInterface.php deleted file mode 100644 index 185a8a12d..000000000 --- a/lib/symfony/form/Test/FormBuilderInterface.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\Form\FormBuilderInterface as BaseFormBuilderInterface; - -interface FormBuilderInterface extends \Iterator, BaseFormBuilderInterface -{ -} diff --git a/lib/symfony/form/Test/FormIntegrationTestCase.php b/lib/symfony/form/Test/FormIntegrationTestCase.php deleted file mode 100644 index 4feb8df5a..000000000 --- a/lib/symfony/form/Test/FormIntegrationTestCase.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\Forms; - -/** - * @author Bernhard Schussek - */ -abstract class FormIntegrationTestCase extends TestCase -{ - /** - * @var FormFactoryInterface - */ - protected $factory; - - protected function setUp(): void - { - $this->factory = Forms::createFormFactoryBuilder() - ->addExtensions($this->getExtensions()) - ->addTypeExtensions($this->getTypeExtensions()) - ->addTypes($this->getTypes()) - ->addTypeGuessers($this->getTypeGuessers()) - ->getFormFactory(); - } - - protected function getExtensions() - { - return []; - } - - protected function getTypeExtensions() - { - return []; - } - - protected function getTypes() - { - return []; - } - - protected function getTypeGuessers() - { - return []; - } -} diff --git a/lib/symfony/form/Test/FormInterface.php b/lib/symfony/form/Test/FormInterface.php deleted file mode 100644 index 4af460308..000000000 --- a/lib/symfony/form/Test/FormInterface.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\Form\FormInterface as BaseFormInterface; - -interface FormInterface extends \Iterator, BaseFormInterface -{ -} diff --git a/lib/symfony/form/Test/FormPerformanceTestCase.php b/lib/symfony/form/Test/FormPerformanceTestCase.php deleted file mode 100644 index 732f9ec3d..000000000 --- a/lib/symfony/form/Test/FormPerformanceTestCase.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\Form\Tests\VersionAwareTest; - -/** - * Base class for performance tests. - * - * Copied from Doctrine 2's OrmPerformanceTestCase. - * - * @author robo - * @author Bernhard Schussek - */ -abstract class FormPerformanceTestCase extends FormIntegrationTestCase -{ - use VersionAwareTest; - - /** - * @var int - */ - protected $maxRunningTime = 0; - - /** - * {@inheritdoc} - */ - protected function runTest() - { - $s = microtime(true); - parent::runTest(); - $time = microtime(true) - $s; - - if (0 != $this->maxRunningTime && $time > $this->maxRunningTime) { - $this->fail(sprintf('expected running time: <= %s but was: %s', $this->maxRunningTime, $time)); - } - } - - /** - * @throws \InvalidArgumentException - */ - public function setMaxRunningTime(int $maxRunningTime) - { - if ($maxRunningTime < 0) { - throw new \InvalidArgumentException(); - } - - $this->maxRunningTime = $maxRunningTime; - } - - /** - * @return int - */ - public function getMaxRunningTime() - { - return $this->maxRunningTime; - } -} diff --git a/lib/symfony/form/Test/Traits/ValidatorExtensionTrait.php b/lib/symfony/form/Test/Traits/ValidatorExtensionTrait.php deleted file mode 100644 index b4b35fadf..000000000 --- a/lib/symfony/form/Test/Traits/ValidatorExtensionTrait.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test\Traits; - -use Symfony\Component\Form\Extension\Validator\ValidatorExtension; -use Symfony\Component\Form\Test\TypeTestCase; -use Symfony\Component\Validator\ConstraintViolationList; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Validator\ValidatorInterface; - -trait ValidatorExtensionTrait -{ - /** - * @var ValidatorInterface|null - */ - protected $validator; - - protected function getValidatorExtension(): ValidatorExtension - { - if (!interface_exists(ValidatorInterface::class)) { - throw new \Exception('In order to use the "ValidatorExtensionTrait", the symfony/validator component must be installed.'); - } - - if (!$this instanceof TypeTestCase) { - throw new \Exception(sprintf('The trait "ValidatorExtensionTrait" can only be added to a class that extends "%s".', TypeTestCase::class)); - } - - $this->validator = $this->createMock(ValidatorInterface::class); - $metadata = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([''])->setMethods(['addPropertyConstraint'])->getMock(); - $this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata)); - $this->validator->expects($this->any())->method('validate')->will($this->returnValue(new ConstraintViolationList())); - - return new ValidatorExtension($this->validator, false); - } -} diff --git a/lib/symfony/form/Test/TypeTestCase.php b/lib/symfony/form/Test/TypeTestCase.php deleted file mode 100644 index a925c555e..000000000 --- a/lib/symfony/form/Test/TypeTestCase.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Form\FormBuilder; -use Symfony\Component\Form\Test\Traits\ValidatorExtensionTrait; - -abstract class TypeTestCase extends FormIntegrationTestCase -{ - /** - * @var FormBuilder - */ - protected $builder; - - /** - * @var EventDispatcherInterface - */ - protected $dispatcher; - - protected function setUp(): void - { - parent::setUp(); - - $this->dispatcher = $this->createMock(EventDispatcherInterface::class); - $this->builder = new FormBuilder('', null, $this->dispatcher, $this->factory); - } - - protected function tearDown(): void - { - if (\in_array(ValidatorExtensionTrait::class, class_uses($this))) { - $this->validator = null; - } - } - - protected function getExtensions() - { - $extensions = []; - - if (\in_array(ValidatorExtensionTrait::class, class_uses($this))) { - $extensions[] = $this->getValidatorExtension(); - } - - return $extensions; - } - - public static function assertDateTimeEquals(\DateTime $expected, \DateTime $actual) - { - self::assertEquals($expected->format('c'), $actual->format('c')); - } - - public static function assertDateIntervalEquals(\DateInterval $expected, \DateInterval $actual) - { - self::assertEquals($expected->format('%RP%yY%mM%dDT%hH%iM%sS'), $actual->format('%RP%yY%mM%dDT%hH%iM%sS')); - } -} diff --git a/lib/symfony/form/Util/FormUtil.php b/lib/symfony/form/Util/FormUtil.php deleted file mode 100644 index fed96de4f..000000000 --- a/lib/symfony/form/Util/FormUtil.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * @author Bernhard Schussek - */ -class FormUtil -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Returns whether the given data is empty. - * - * This logic is reused multiple times throughout the processing of - * a form and needs to be consistent. PHP keyword `empty` cannot - * be used as it also considers 0 and "0" to be empty. - * - * @param mixed $data - * - * @return bool - */ - public static function isEmpty($data) - { - // Should not do a check for [] === $data!!! - // This method is used in occurrences where arrays are - // not considered to be empty, ever. - return null === $data || '' === $data; - } -} diff --git a/lib/symfony/form/Util/InheritDataAwareIterator.php b/lib/symfony/form/Util/InheritDataAwareIterator.php deleted file mode 100644 index 7cba17dbe..000000000 --- a/lib/symfony/form/Util/InheritDataAwareIterator.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * Iterator that traverses an array of forms. - * - * Contrary to \ArrayIterator, this iterator recognizes changes in the original - * array during iteration. - * - * You can wrap the iterator into a {@link \RecursiveIteratorIterator} in order to - * enter any child form that inherits its parent's data and iterate the children - * of that form as well. - * - * @author Bernhard Schussek - */ -class InheritDataAwareIterator extends \IteratorIterator implements \RecursiveIterator -{ - /** - * {@inheritdoc} - * - * @return static - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - return new static($this->current()); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren() - { - return (bool) $this->current()->getConfig()->getInheritData(); - } -} diff --git a/lib/symfony/form/Util/OptionsResolverWrapper.php b/lib/symfony/form/Util/OptionsResolverWrapper.php deleted file mode 100644 index 078f93dd9..000000000 --- a/lib/symfony/form/Util/OptionsResolverWrapper.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -use Symfony\Component\OptionsResolver\Exception\AccessException; -use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class OptionsResolverWrapper extends OptionsResolver -{ - private $undefined = []; - - /** - * @return $this - */ - public function setNormalizer(string $option, \Closure $normalizer): self - { - try { - parent::setNormalizer($option, $normalizer); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @return $this - */ - public function setAllowedValues(string $option, $allowedValues): self - { - try { - parent::setAllowedValues($option, $allowedValues); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @return $this - */ - public function addAllowedValues(string $option, $allowedValues): self - { - try { - parent::addAllowedValues($option, $allowedValues); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @param string|array $allowedTypes - * - * @return $this - */ - public function setAllowedTypes(string $option, $allowedTypes): self - { - try { - parent::setAllowedTypes($option, $allowedTypes); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @param string|array $allowedTypes - * - * @return $this - */ - public function addAllowedTypes(string $option, $allowedTypes): self - { - try { - parent::addAllowedTypes($option, $allowedTypes); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - public function resolve(array $options = []): array - { - throw new AccessException('Resolve options is not supported.'); - } - - public function getUndefinedOptions(): array - { - return array_keys($this->undefined); - } -} diff --git a/lib/symfony/form/Util/OrderedHashMap.php b/lib/symfony/form/Util/OrderedHashMap.php deleted file mode 100644 index 7d84cbe22..000000000 --- a/lib/symfony/form/Util/OrderedHashMap.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * A hash map which keeps track of deletions and additions. - * - * Like in associative arrays, elements can be mapped to integer or string keys. - * Unlike associative arrays, the map keeps track of the order in which keys - * were added and removed. This order is reflected during iteration. - * - * The map supports concurrent modification during iteration. That means that - * you can insert and remove elements from within a foreach loop and the - * iterator will reflect those changes accordingly. - * - * While elements that are added during the loop are recognized by the iterator, - * changed elements are not. Otherwise the loop could be infinite if each loop - * changes the current element: - * - * $map = new OrderedHashMap(); - * $map[1] = 1; - * $map[2] = 2; - * $map[3] = 3; - * - * foreach ($map as $index => $value) { - * echo "$index: $value\n" - * if (1 === $index) { - * $map[1] = 4; - * $map[] = 5; - * } - * } - * - * print_r(iterator_to_array($map)); - * - * // => 1: 1 - * // 2: 2 - * // 3: 3 - * // 4: 5 - * // Array - * // ( - * // [1] => 4 - * // [2] => 2 - * // [3] => 3 - * // [4] => 5 - * // ) - * - * The map also supports multiple parallel iterators. That means that you can - * nest foreach loops without affecting each other's iteration: - * - * foreach ($map as $index => $value) { - * foreach ($map as $index2 => $value2) { - * // ... - * } - * } - * - * @author Bernhard Schussek - * - * @template TKey of array-key - * @template TValue - * - * @implements \ArrayAccess - * @implements \IteratorAggregate - */ -class OrderedHashMap implements \ArrayAccess, \IteratorAggregate, \Countable -{ - /** - * The elements of the map, indexed by their keys. - * - * @var array - */ - private $elements = []; - - /** - * The keys of the map in the order in which they were inserted or changed. - * - * @var list - */ - private $orderedKeys = []; - - /** - * References to the cursors of all open iterators. - * - * @var array - */ - private $managedCursors = []; - - /** - * Creates a new map. - * - * @param array $elements The elements to insert initially - */ - public function __construct(array $elements = []) - { - $this->elements = $elements; - $this->orderedKeys = array_keys($elements); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return isset($this->elements[$key]); - } - - /** - * {@inheritdoc} - * - * @return TValue - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - if (!isset($this->elements[$key])) { - throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $key)); - } - - return $this->elements[$key]; - } - - /** - * {@inheritdoc} - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - if (null === $key || !isset($this->elements[$key])) { - if (null === $key) { - $key = [] === $this->orderedKeys - // If the array is empty, use 0 as key - ? 0 - // Imitate PHP behavior of generating a key that equals - // the highest existing integer key + 1 - : 1 + (int) max($this->orderedKeys); - } - - $this->orderedKeys[] = (string) $key; - } - - $this->elements[$key] = $value; - } - - /** - * {@inheritdoc} - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - if (false !== ($position = array_search((string) $key, $this->orderedKeys))) { - array_splice($this->orderedKeys, $position, 1); - unset($this->elements[$key]); - - foreach ($this->managedCursors as $i => $cursor) { - if ($cursor >= $position) { - --$this->managedCursors[$i]; - } - } - } - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new OrderedHashMapIterator($this->elements, $this->orderedKeys, $this->managedCursors); - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->elements); - } -} diff --git a/lib/symfony/form/Util/OrderedHashMapIterator.php b/lib/symfony/form/Util/OrderedHashMapIterator.php deleted file mode 100644 index e91e33301..000000000 --- a/lib/symfony/form/Util/OrderedHashMapIterator.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * Iterator for {@link OrderedHashMap} objects. - * - * @author Bernhard Schussek - * - * @internal - * - * @template-covariant TKey of array-key - * @template-covariant TValue - * - * @implements \Iterator - */ -class OrderedHashMapIterator implements \Iterator -{ - /** - * @var array - */ - private $elements; - - /** - * @var list - */ - private $orderedKeys; - - /** - * @var int - */ - private $cursor = 0; - - /** - * @var int - */ - private $cursorId; - - /** - * @var array - */ - private $managedCursors; - - /** - * @var TKey|null - */ - private $key; - - /** - * @var TValue|null - */ - private $current; - - /** - * @param array $elements The elements of the map, indexed by their - * keys - * @param list $orderedKeys The keys of the map in the order in which - * they should be iterated - * @param array $managedCursors An array from which to reference the - * iterator's cursor as long as it is alive. - * This array is managed by the corresponding - * {@link OrderedHashMap} instance to support - * recognizing the deletion of elements. - */ - public function __construct(array &$elements, array &$orderedKeys, array &$managedCursors) - { - $this->elements = &$elements; - $this->orderedKeys = &$orderedKeys; - $this->managedCursors = &$managedCursors; - $this->cursorId = \count($managedCursors); - - $this->managedCursors[$this->cursorId] = &$this->cursor; - } - - public function __sleep(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - /** - * Removes the iterator's cursors from the managed cursors of the - * corresponding {@link OrderedHashMap} instance. - */ - public function __destruct() - { - // Use array_splice() instead of unset() to prevent holes in the - // array indices, which would break the initialization of $cursorId - array_splice($this->managedCursors, $this->cursorId, 1); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - #[\ReturnTypeWillChange] - public function current() - { - return $this->current; - } - - /** - * {@inheritdoc} - */ - public function next(): void - { - ++$this->cursor; - - if (isset($this->orderedKeys[$this->cursor])) { - $this->key = $this->orderedKeys[$this->cursor]; - $this->current = $this->elements[$this->key]; - } else { - $this->key = null; - $this->current = null; - } - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - #[\ReturnTypeWillChange] - public function key() - { - if (null === $this->key) { - return null; - } - - $array = [$this->key => null]; - - return key($array); - } - - /** - * {@inheritdoc} - */ - public function valid(): bool - { - return null !== $this->key; - } - - /** - * {@inheritdoc} - */ - public function rewind(): void - { - $this->cursor = 0; - - if (isset($this->orderedKeys[0])) { - $this->key = $this->orderedKeys[0]; - $this->current = $this->elements[$this->key]; - } else { - $this->key = null; - $this->current = null; - } - } -} diff --git a/lib/symfony/form/Util/ServerParams.php b/lib/symfony/form/Util/ServerParams.php deleted file mode 100644 index ebe09f60e..000000000 --- a/lib/symfony/form/Util/ServerParams.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -use Symfony\Component\HttpFoundation\RequestStack; - -/** - * @author Bernhard Schussek - */ -class ServerParams -{ - private $requestStack; - - public function __construct(RequestStack $requestStack = null) - { - $this->requestStack = $requestStack; - } - - /** - * Returns true if the POST max size has been exceeded in the request. - * - * @return bool - */ - public function hasPostMaxSizeBeenExceeded() - { - $contentLength = $this->getContentLength(); - $maxContentLength = $this->getPostMaxSize(); - - return $maxContentLength && $contentLength > $maxContentLength; - } - - /** - * Returns maximum post size in bytes. - * - * @return int|float|null - */ - public function getPostMaxSize() - { - $iniMax = strtolower($this->getNormalizedIniPostMaxSize()); - - if ('' === $iniMax) { - return null; - } - - $max = ltrim($iniMax, '+'); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($iniMax, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } - - /** - * Returns the normalized "post_max_size" ini setting. - * - * @return string - */ - public function getNormalizedIniPostMaxSize() - { - return strtoupper(trim(\ini_get('post_max_size'))); - } - - /** - * Returns the content length of the request. - * - * @return mixed - */ - public function getContentLength() - { - if (null !== $this->requestStack && null !== $request = $this->requestStack->getCurrentRequest()) { - return $request->server->get('CONTENT_LENGTH'); - } - - return isset($_SERVER['CONTENT_LENGTH']) - ? (int) $_SERVER['CONTENT_LENGTH'] - : null; - } -} diff --git a/lib/symfony/form/Util/StringUtil.php b/lib/symfony/form/Util/StringUtil.php deleted file mode 100644 index db60f95d1..000000000 --- a/lib/symfony/form/Util/StringUtil.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * @author Issei Murasawa - * @author Bernhard Schussek - */ -class StringUtil -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Returns the trimmed data. - * - * @return string - */ - public static function trim(string $string) - { - if (null !== $result = @preg_replace('/^[\pZ\p{Cc}\p{Cf}]+|[\pZ\p{Cc}\p{Cf}]+$/u', '', $string)) { - return $result; - } - - return trim($string); - } - - /** - * Converts a fully-qualified class name to a block prefix. - * - * @param string $fqcn The fully-qualified class name - * - * @return string|null - */ - public static function fqcnToBlockPrefix(string $fqcn) - { - // Non-greedy ("+?") to match "type" suffix, if present - if (preg_match('~([^\\\\]+?)(type)?$~i', $fqcn, $matches)) { - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $matches[1])); - } - - return null; - } -} diff --git a/lib/symfony/form/composer.json b/lib/symfony/form/composer.json deleted file mode 100644 index e6be770b8..000000000 --- a/lib/symfony/form/composer.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "symfony/form", - "type": "library", - "description": "Allows to easily create, process and reuse HTML forms", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/options-resolver": "^5.1|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.23", - "symfony/property-access": "^5.0.8|^6.0", - "symfony/service-contracts": "^1.1|^2|^3" - }, - "require-dev": { - "doctrine/collections": "^1.0|^2.0", - "symfony/validator": "^4.4.17|^5.1.9|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<4.4", - "symfony/doctrine-bridge": "<4.4", - "symfony/error-handler": "<4.4.5", - "symfony/framework-bundle": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<4.4", - "symfony/translation-contracts": "<1.1.7", - "symfony/twig-bridge": "<4.4" - }, - "suggest": { - "symfony/validator": "For form validation.", - "symfony/security-csrf": "For protecting forms against CSRF attacks.", - "symfony/twig-bridge": "For templating with Twig." - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Form\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/framework-bundle/CHANGELOG.md b/lib/symfony/framework-bundle/CHANGELOG.md deleted file mode 100644 index ea913ef98..000000000 --- a/lib/symfony/framework-bundle/CHANGELOG.md +++ /dev/null @@ -1,492 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `set_locale_from_accept_language` config option to automatically set the request locale based on the `Accept-Language` - HTTP request header and the `framework.enabled_locales` config option - * Add `set_content_language_from_locale` config option to automatically set the `Content-Language` HTTP response header based on the Request locale - * Deprecate the `framework.translator.enabled_locales`, use `framework.enabled_locales` instead - * Add autowiring alias for `HttpCache\StoreInterface` - * Add the ability to enable the profiler using a request query parameter, body parameter or attribute - * Deprecate the `AdapterInterface` autowiring alias, use `CacheItemPoolInterface` instead - * Deprecate the public `profiler` service to private - * Deprecate `get()`, `has()`, `getDoctrine()`, and `dispatchMessage()` in `AbstractController`, use method/constructor injection instead - * Deprecate the `cache.adapter.doctrine` service - * Add support for resetting container services after each messenger message - * Add `configureContainer()`, `configureRoutes()`, `getConfigDir()` and `getBundlesPath()` to `MicroKernelTrait` - * Add support for configuring log level, and status code by exception class - * Bind the `default_context` parameter onto serializer's encoders and normalizers - * Add support for `statusCode` default parameter when loading a template directly from route using the `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` controller - * Deprecate `translation:update` command, use `translation:extract` instead - * Add `PhpStanExtractor` support for the PropertyInfo component - * Add `cache.adapter.doctrine_dbal` service to replace `cache.adapter.pdo` when a Doctrine DBAL connection is used. - -5.3 ---- - - * Deprecate the `session.storage` alias and `session.storage.*` services, use the `session.storage.factory` alias and `session.storage.factory.*` services instead - * Deprecate the `framework.session.storage_id` configuration option, use the `framework.session.storage_factory_id` configuration option instead - * Deprecate the `session` service and the `SessionInterface` alias, use the `Request::getSession()` or the new `RequestStack::getSession()` methods instead - * Add `AbstractController::renderForm()` to render a form and set the appropriate HTTP status code - * Add support for configuring PHP error level to log levels - * Add the `dispatcher` option to `debug:event-dispatcher` - * Add the `event_dispatcher.dispatcher` tag - * Add `assertResponseFormatSame()` in `BrowserKitAssertionsTrait` - * Add support for configuring UUID factory services - * Add tag `assets.package` to register asset packages - * Add support to use a PSR-6 compatible cache for Doctrine annotations - * Deprecate all other values than "none", "php_array" and "file" for `framework.annotation.cache` - * Add `KernelTestCase::getContainer()` as the best way to get a container in tests - * Rename the container parameter `profiler_listener.only_master_requests` to `profiler_listener.only_main_requests` - * Add service `fragment.uri_generator` to generate the URI of a fragment - * Deprecate registering workflow services as public - * Deprecate option `--xliff-version` of the `translation:update` command, use e.g. `--format=xlf20` instead - * Deprecate option `--output-format` of the `translation:update` command, use e.g. `--format=xlf20` instead - -5.2.0 ------ - - * Added `framework.http_cache` configuration tree - * Added `framework.trusted_proxies` and `framework.trusted_headers` configuration options - * Deprecated the public `form.factory`, `form.type.file`, `translator`, `security.csrf.token_manager`, `serializer`, - `cache_clearer`, `filesystem` and `validator` services to private. - * Added `TemplateAwareDataCollectorInterface` and `AbstractDataCollector` to simplify custom data collector creation and leverage autoconfiguration - * Add `cache.adapter.redis_tag_aware` tag to use `RedisCacheAwareAdapter` - * added `framework.http_client.retry_failing` configuration tree - * added `assertCheckboxChecked()` and `assertCheckboxNotChecked()` in `WebTestCase` - * added `assertFormValue()` and `assertNoFormValue()` in `WebTestCase` - * Added "--as-tree=3" option to `translation:update` command to dump messages as a tree-like structure. The given value defines the level where to switch to inline YAML - * Deprecated the `lock.RESOURCE_NAME` and `lock.RESOURCE_NAME.store` services and the `lock`, `LockInterface`, `lock.store` and `PersistingStoreInterface` aliases, use `lock.RESOURCE_NAME.factory`, `lock.factory` or `LockFactory` instead. - -5.1.0 ------ - * Removed `--no-backup` option from `translation:update` command (broken since `5.0.0`) - * Added link to source for controllers registered as named services - * Added link to source on controller on `router:match`/`debug:router` (when `framework.ide` is configured) - * Added the `framework.router.default_uri` configuration option to configure the default `RequestContext` - * Made `MicroKernelTrait::configureContainer()` compatible with `ContainerConfigurator` - * Added a new `mailer.message_bus` option to configure or disable the message bus to use to send mails. - * Added flex-compatible default implementation for `MicroKernelTrait::registerBundles()` - * Deprecated passing a `RouteCollectionBuilder` to `MicroKernelTrait::configureRoutes()`, type-hint `RoutingConfigurator` instead - * The `TemplateController` now accepts context argument - * Deprecated *not* setting the "framework.router.utf8" configuration option as it will default to `true` in Symfony 6.0 - * Added tag `routing.expression_language_function` to define functions available in route conditions - * Added `debug:container --deprecations` option to see compile-time deprecations. - * Made `BrowserKitAssertionsTrait` report the original error message in case of a failure - * Added ability for `config:dump-reference` and `debug:config` to dump and debug kernel container extension configuration. - * Deprecated `session.attribute_bag` service and `session.flash_bag` service. - -5.0.0 ------ - - * Removed support to load translation resources from the legacy directories `src/Resources/translations/` and `src/Resources//translations/` - * Removed `ControllerNameParser`. - * Removed `ResolveControllerNameSubscriber` - * Removed support for `bundle:controller:action` to reference controllers. Use `serviceOrFqcn::method` instead - * Removed support for PHP templating, use Twig instead - * Removed `Controller`, use `AbstractController` instead - * Removed `Client`, use `KernelBrowser` instead - * Removed `ContainerAwareCommand`, use dependency injection instead - * Removed the `validation.strict_email` option, use `validation.email_validation_mode` instead - * Removed the `cache.app.simple` service and its corresponding PSR-16 autowiring alias - * Removed cache-related compiler passes and `RequestDataCollector` - * Removed the `translator.selector` and `session.save_listener` services - * Removed `SecurityUserValueResolver`, use `UserValueResolver` instead - * Removed `routing.loader.service`. - * Service route loaders must be tagged with `routing.route_loader`. - * Added `slugger` service and `SluggerInterface` alias - * Removed the `lock.store.flock`, `lock.store.semaphore`, `lock.store.memcached.abstract` and `lock.store.redis.abstract` services. - * Removed the `router.cache_class_prefix` parameter. - -4.4.0 ------ - - * Added `lint:container` command to check that services wiring matches type declarations - * Added `MailerAssertionsTrait` - * Deprecated support for `templating` engine in `TemplateController`, use Twig instead - * Deprecated the `$parser` argument of `ControllerResolver::__construct()` and `DelegatingLoader::__construct()` - * Deprecated the `controller_name_converter` and `resolve_controller_name_subscriber` services - * The `ControllerResolver` and `DelegatingLoader` classes have been marked as `final` - * Added support for configuring chained cache pools - * Deprecated calling `WebTestCase::createClient()` while a kernel has been booted, ensure the kernel is shut down before calling the method - * Deprecated `routing.loader.service`, use `routing.loader.container` instead. - * Not tagging service route loaders with `routing.route_loader` has been deprecated. - * Overriding the methods `KernelTestCase::tearDown()` and `WebTestCase::tearDown()` without the `void` return-type is deprecated. - * Added new `error_controller` configuration to handle system exceptions - * Added sort option for `translation:update` command. - * [BC Break] The `framework.messenger.routing.senders` config key is not deeply merged anymore. - * Added `secrets:*` commands to deal with secrets seamlessly. - * Made `framework.session.handler_id` accept a DSN - * Marked the `RouterDataCollector` class as `@final`. - * [BC Break] The `framework.messenger.buses..middleware` config key is not deeply merged anymore. - * Moved `MailerAssertionsTrait` in `KernelTestCase` - -4.3.0 ------ - - * Deprecated the `framework.templating` option, configure the Twig bundle instead. - * Added `WebTestAssertionsTrait` (included by default in `WebTestCase`) - * Renamed `Client` to `KernelBrowser` - * Not passing the project directory to the constructor of the `AssetsInstallCommand` is deprecated. This argument will - be mandatory in 5.0. - * Deprecated the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead - * Added the ability to specify a custom `serializer` option for each - transport under`framework.messenger.transports`. - * Added the `RegisterLocaleAwareServicesPass` and configured the `LocaleAwareListener` - * [BC Break] When using Messenger, the default transport changed from - using Symfony's serializer service to use `PhpSerializer`, which uses - PHP's native `serialize()` and `unserialize()` functions. To use the - original serialization method, set the `framework.messenger.default_serializer` - config option to `messenger.transport.symfony_serializer`. Or set the - `serializer` option under one specific `transport`. - * [BC Break] The `framework.messenger.serializer` config key changed to - `framework.messenger.default_serializer`, which holds the string service - id and `framework.messenger.symfony_serializer`, which configures the - options if you're using Symfony's serializer. - * [BC Break] Removed the `framework.messenger.routing.send_and_handle` configuration. - Instead of setting it to true, configure a `SyncTransport` and route messages to it. - * Added information about deprecated aliases in `debug:autowiring` - * Added php ini session options `sid_length` and `sid_bits_per_character` - to the `session` section of the configuration - * Added support for Translator paths, Twig paths in translation commands. - * Added support for PHP files with translations in translation commands. - * Added support for boolean container parameters within routes. - * Added the `messenger:setup-transports` command to setup messenger transports - * Added a `InMemoryTransport` to Messenger. Use it with a DSN starting with `in-memory://`. - * Added `framework.property_access.throw_exception_on_invalid_property_path` config option. - * Added `cache:pool:list` command to list all available cache pools. - -4.2.0 ------ - - * Added a `AbstractController::addLink()` method to add Link headers to the current response - * Allowed configuring taggable cache pools via a new `framework.cache.pools.tags` option (bool|service-id) - * Allowed configuring PDO-based cache pools via a new `cache.adapter.pdo` abstract service - * Deprecated auto-injection of the container in AbstractController instances, register them as service subscribers instead - * Deprecated processing of services tagged `security.expression_language_provider` in favor of a new `AddExpressionLanguageProvidersPass` in SecurityBundle. - * Deprecated the `Symfony\Bundle\FrameworkBundle\Controller\Controller` class in favor of `Symfony\Bundle\FrameworkBundle\Controller\AbstractController`. - * Enabled autoconfiguration for `Psr\Log\LoggerAwareInterface` - * Added new "auto" mode for `framework.session.cookie_secure` to turn it on when HTTPS is used - * Removed the `framework.messenger.encoder` and `framework.messenger.decoder` options. Use the `framework.messenger.serializer.id` option to replace the Messenger serializer. - * Deprecated the `ContainerAwareCommand` class in favor of `Symfony\Component\Console\Command\Command` - * Made `debug:container` and `debug:autowiring` ignore backslashes in service ids - * Deprecated the `Templating\Helper\TranslatorHelper::transChoice()` method, use the `trans()` one instead with a `%count%` parameter - * Deprecated `CacheCollectorPass`. Use `Symfony\Component\Cache\DependencyInjection\CacheCollectorPass` instead. - * Deprecated `CachePoolClearerPass`. Use `Symfony\Component\Cache\DependencyInjection\CachePoolClearerPass` instead. - * Deprecated `CachePoolPass`. Use `Symfony\Component\Cache\DependencyInjection\CachePoolPass` instead. - * Deprecated `CachePoolPrunerPass`. Use `Symfony\Component\Cache\DependencyInjection\CachePoolPrunerPass` instead. - * Deprecated support for legacy translations directories `src/Resources/translations/` and `src/Resources//translations/`, use `translations/` instead. - * Deprecated support for the legacy directory structure in `translation:update` and `debug:translation` commands. - -4.1.0 ------ - - * Allowed to pass an optional `LoggerInterface $logger` instance to the `Router` - * Added a new `parameter_bag` service with related autowiring aliases to access parameters as-a-service - * Allowed the `Router` to work with any PSR-11 container - * Added option in workflow dump command to label graph with a custom label - * Using a `RouterInterface` that does not implement the `WarmableInterface` is deprecated. - * Warming up a router in `RouterCacheWarmer` that does not implement the `WarmableInterface` is deprecated and will not - be supported anymore in 5.0. - * The `RequestDataCollector` class has been deprecated. Use the `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector` class instead. - * The `RedirectController` class allows for 307/308 HTTP status codes - * Deprecated `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method` instead where `serviceOrFqcn` - is either the service ID or the FQCN of the controller. - * Deprecated `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser` - * The `container.service_locator` tag of `ServiceLocator`s is now autoconfigured. - * Add the ability to search a route in `debug:router`. - * Add the ability to use SameSite cookies for sessions. - -4.0.0 ------ - - * The default `type` option of the `framework.workflows.*` configuration entries is `state_machine` - * removed `AddConsoleCommandPass`, `AddConstraintValidatorsPass`, - `AddValidatorInitializersPass`, `CompilerDebugDumpPass`, `ConfigCachePass`, - `ControllerArgumentValueResolverPass`, `FormPass`, `PropertyInfoPass`, - `RoutingResolverPass`, `SerializerPass`, `ValidateWorkflowsPass` - * made `Translator::__construct()` `$defaultLocale` argument required - * removed `SessionListener`, `TestSessionListener` - * Removed `cache:clear` warmup part along with the `--no-optional-warmers` option - * Removed core form types services registration when unnecessary - * Removed `framework.serializer.cache` option and `serializer.mapping.cache.apc`, `serializer.mapping.cache.doctrine.apc` services - * Removed `ConstraintValidatorFactory` - * Removed class parameters related to routing - * Removed absolute template paths support in the template name parser - * Removed support of the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`. - * Removed the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods. - * Removed the "framework.validation.cache" configuration option. Configure the "cache.validator" service under "framework.cache.pools" instead. - * Removed `PhpStringTokenParser`, use `Symfony\Component\Translation\Extractor\PhpStringTokenParser` instead. - * Removed `PhpExtractor`, use `Symfony\Component\Translation\Extractor\PhpExtractor` instead. - * Removed the `use_strict_mode` session option, it's is now enabled by default - -3.4.0 ------ - - * Added `translator.default_path` option and parameter - * Session `use_strict_mode` is now enabled by default and the corresponding option has been deprecated - * Made the `cache:clear` command to *not* clear "app" PSR-6 cache pools anymore, - but to still clear "system" ones; use the `cache:pool:clear` command to clear "app" pools instead - * Always register a minimalist logger that writes in `stderr` - * Deprecated `profiler.matcher` option - * Added support for `EventSubscriberInterface` on `MicroKernelTrait` - * Removed `doctrine/cache` from the list of required dependencies in `composer.json` - * Deprecated `validator.mapping.cache.doctrine.apc` service - * The `symfony/stopwatch` dependency has been removed, require it via `composer - require symfony/stopwatch` in your `dev` environment. - * Deprecated using the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`. - * Deprecated the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods. - * Deprecated `AddCacheClearerPass`, use tagged iterator arguments instead. - * Deprecated `AddCacheWarmerPass`, use tagged iterator arguments instead. - * Deprecated `TranslationDumperPass`, use - `Symfony\Component\Translation\DependencyInjection\TranslationDumperPass` instead - * Deprecated `TranslationExtractorPass`, use - `Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass` instead - * Deprecated `TranslatorPass`, use - `Symfony\Component\Translation\DependencyInjection\TranslatorPass` instead - * Added `command` attribute to the `console.command` tag which takes the command - name as value, using it makes the command lazy - * Added `cache:pool:prune` command to allow manual stale cache item pruning of supported PSR-6 and PSR-16 cache pool - implementations - * Deprecated `Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader`, use - `Symfony\Component\Translation\Reader\TranslationReader` instead - * Deprecated `translation.loader` service, use `translation.reader` instead - * `AssetsInstallCommand::__construct()` now takes an instance of - `Symfony\Component\Filesystem\Filesystem` as first argument - * `CacheClearCommand::__construct()` now takes an instance of - `Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface` as - first argument - * `CachePoolClearCommand::__construct()` now takes an instance of - `Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer` as - first argument - * `EventDispatcherDebugCommand::__construct()` now takes an instance of - `Symfony\Component\EventDispatcher\EventDispatcherInterface` as - first argument - * `RouterDebugCommand::__construct()` now takes an instance of - `Symfony\Component\Routing\RouterInterface` as - first argument - * `RouterMatchCommand::__construct()` now takes an instance of - `Symfony\Component\Routing\RouterInterface` as - first argument - * `TranslationDebugCommand::__construct()` now takes an instance of - `Symfony\Component\Translation\TranslatorInterface` as - first argument - * `TranslationUpdateCommand::__construct()` now takes an instance of - `Symfony\Component\Translation\TranslatorInterface` as - first argument - * `AssetsInstallCommand`, `CacheClearCommand`, `CachePoolClearCommand`, - `EventDispatcherDebugCommand`, `RouterDebugCommand`, `RouterMatchCommand`, - `TranslationDebugCommand`, `TranslationUpdateCommand`, `XliffLintCommand` - and `YamlLintCommand` classes have been marked as final - * Added `asset.request_context.base_path` and `asset.request_context.secure` parameters - to provide a default request context in case the stack is empty (similar to `router.request_context.*` parameters) - * Display environment variables managed by `Dotenv` in `AboutCommand` - -3.3.0 ------ - - * Not defining the `type` option of the `framework.workflows.*` configuration entries is deprecated. - The default value will be `state_machine` in Symfony 4.0. - * Deprecated the `CompilerDebugDumpPass` class - * Deprecated the "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter - * Added a new version strategy option called "json_manifest_path" - that allows you to use the `JsonManifestVersionStrategy`. - * Added `Symfony\Bundle\FrameworkBundle\Controller\AbstractController`. It provides - the same helpers as the `Controller` class, but does not allow accessing the dependency - injection container, in order to encourage explicit dependency declarations. - * Added support for the `controller.service_arguments` tag, for injecting services into controllers' actions - * Changed default configuration for - assets/forms/validation/translation/serialization/csrf from `canBeEnabled()` to - `canBeDisabled()` when Flex is used - * The server:* commands and their associated router files were moved to WebServerBundle - * Translation related services are not loaded anymore when the `framework.translator` option - is disabled. - * Added `GlobalVariables::getToken()` - * Deprecated `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass`. Use `Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead. - * Added configurable paths for validation files - * Deprecated `SerializerPass`, use `Symfony\Component\Serializer\DependencyInjection\SerializerPass` instead - * Deprecated `FormPass`, use `Symfony\Component\Form\DependencyInjection\FormPass` instead - * Deprecated `SessionListener` - * Deprecated `TestSessionListener` - * Deprecated `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass`. - Use tagged iterator arguments instead. - * Deprecated `PropertyInfoPass`, use `Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass` instead - * Deprecated `ControllerArgumentValueResolverPass`. Use - `Symfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass` instead - * Deprecated `RoutingResolverPass`, use `Symfony\Component\Routing\DependencyInjection\RoutingResolverPass` instead - * [BC BREAK] The `server:run`, `server:start`, `server:stop` and - `server:status` console commands have been moved to a dedicated bundle. - Require `symfony/web-server-bundle` in your composer.json and register - `Symfony\Bundle\WebServerBundle\WebServerBundle` in your AppKernel to use them. - * Added `$defaultLocale` as 3rd argument of `Translator::__construct()` - making `Translator` works with any PSR-11 container - * Added `framework.serializer.mapping` config option allowing to define custom - serialization mapping files and directories - * Deprecated `AddValidatorInitializersPass`, use - `Symfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass` instead - * Deprecated `AddConstraintValidatorsPass`, use - `Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass` instead - * Deprecated `ValidateWorkflowsPass`, use - `Symfony\Component\Workflow\DependencyInjection\ValidateWorkflowsPass` instead - * Deprecated `ConstraintValidatorFactory`, use - `Symfony\Component\Validator\ContainerConstraintValidatorFactory` instead. - * Deprecated `PhpStringTokenParser`, use - `Symfony\Component\Translation\Extractor\PhpStringTokenParser` instead. - * Deprecated `PhpExtractor`, use - `Symfony\Component\Translation\Extractor\PhpExtractor` instead. - -3.2.0 ------ - - * Removed `doctrine/annotations` from the list of required dependencies in `composer.json` - * Removed `symfony/security-core` and `symfony/security-csrf` from the list of required dependencies in `composer.json` - * Removed `symfony/templating` from the list of required dependencies in `composer.json` - * Removed `symfony/translation` from the list of required dependencies in `composer.json` - * Removed `symfony/asset` from the list of required dependencies in `composer.json` - * The `Resources/public/images/*` files have been removed. - * The `Resources/public/css/*.css` files have been removed (they are now inlined in TwigBundle). - * Added possibility to prioritize form type extensions with `'priority'` attribute on tags `form.type_extension` - -3.1.0 ------ - - * Added `Controller::json` to simplify creating JSON responses when using the Serializer component - * Deprecated absolute template paths support in the template name parser - * Deprecated using core form types without dependencies as services - * Added `Symfony\Component\HttpHernel\DataCollector\RequestDataCollector::onKernelResponse()` - * Added `Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector` - * The `framework.serializer.cache` option and the service `serializer.mapping.cache.apc` have been - deprecated. APCu should now be automatically used when available. - -3.0.0 ------ - - * removed `validator.api` parameter - * removed `alias` option of the `form.type` tag - -2.8.0 ------ - - * Deprecated the `alias` option of the `form.type_extension` tag in favor of the - `extended_type`/`extended-type` option - * Deprecated the `alias` option of the `form.type` tag - * Deprecated the Shell - -2.7.0 ------ - - * Added possibility to extract translation messages from a file or files besides extracting from a directory - * Added `TranslationsCacheWarmer` to create catalogues at warmup - -2.6.0 ------ - - * Added helper commands (`server:start`, `server:stop` and `server:status`) to control the built-in web - server in the background - * Added `Controller::isCsrfTokenValid` helper - * Added configuration for the PropertyAccess component - * Added `Controller::redirectToRoute` helper - * Added `Controller::addFlash` helper - * Added `Controller::isGranted` helper - * Added `Controller::denyAccessUnlessGranted` helper - * Deprecated `app.security` in twig as `app.user` and `is_granted()` are already available - -2.5.0 ------ - - * Added `translation:debug` command - * Added `--no-backup` option to `translation:update` command - * Added `config:debug` command - * Added `yaml:lint` command - * Deprecated the `RouterApacheDumperCommand` which will be removed in Symfony 3.0. - -2.4.0 ------ - - * allowed multiple IP addresses in profiler matcher settings - * added stopwatch helper to time templates with the WebProfilerBundle - * added service definition for "security.secure_random" service - * added service definitions for the new Security CSRF sub-component - -2.3.0 ------ - - * [BC BREAK] added a way to disable the profiler (when disabling the profiler, it is now completely removed) - To get the same "disabled" behavior as before, set `enabled` to `true` and `collect` to `false` - * [BC BREAK] the `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass` was moved - to `Component\HttpKernel\DependencyInjection\RegisterListenersPass` - * added ControllerNameParser::build() which converts a controller short notation (a:b:c) to a class::method notation - * added possibility to run PHP built-in server in production environment - * added possibility to load the serializer component in the service container - * added route debug information when using the `router:match` command - * added `TimedPhpEngine` - * added `--clean` option to the `translation:update` command - * added `http_method_override` option - * added support for default templates per render tag - * added FormHelper::form(), FormHelper::start() and FormHelper::end() - * deprecated FormHelper::enctype() in favor of FormHelper::start() - * RedirectController actions now receive the Request instance via the method signature. - -2.2.0 ------ - - * added a new `uri_signer` service to help sign URIs - * deprecated `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` and `Symfony\Bundle\FrameworkBundle\HttpKernel::forward()` - * deprecated the `Symfony\Bundle\FrameworkBundle\HttpKernel` class in favor of `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel` - * added support for adding new HTTP content rendering strategies (like ESI and Hinclude) - in the DIC via the `kernel.fragment_renderer` tag - * [BC BREAK] restricted the `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method to only accept URIs or ControllerReference instances - * `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method signature changed and the first argument - must now be a URI or a ControllerReference instance (the `generateInternalUri()` method was removed) - * The internal routes (`Resources/config/routing/internal.xml`) have been removed and replaced with a listener (`Symfony\Component\HttpKernel\EventListener\FragmentListener`) - * The `render` method of the `actions` templating helper signature and arguments changed - * replaced Symfony\Bundle\FrameworkBundle\Controller\TraceableControllerResolver by Symfony\Component\HttpKernel\Controller\TraceableControllerResolver - * replaced Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher by Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher - * added Client::enableProfiler() - * a new parameter has been added to the DIC: `router.request_context.base_url` - You can customize it for your functional tests or for generating URLs with - the right base URL when your are in the CLI context. - * added support for default templates per render tag - -2.1.0 ------ - - * moved the translation files to the Form and Validator components - * changed the default extension for XLIFF files from .xliff to .xlf - * moved Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher - * moved Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareTraceableEventDispatcher - * added a router:match command - * added a config:dump-reference command - * added a server:run command - * added kernel.event_subscriber tag - * added a way to create relative symlinks when running assets:install command (--relative option) - * added Controller::getUser() - * [BC BREAK] assets_base_urls and base_urls merging strategy has changed - * changed the default profiler storage to use the filesystem instead of SQLite - * added support for placeholders in route defaults and requirements (replaced - by the value set in the service container) - * added Filesystem component as a dependency - * added support for hinclude (use ``standalone: 'js'`` in render tag) - * session options: lifetime, path, domain, secure, httponly were deprecated. - Prefixed versions should now be used instead: cookie_lifetime, cookie_path, - cookie_domain, cookie_secure, cookie_httponly - * [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure', - 'httponly' are now prefixed with cookie_ when dumped to the container - * Added `handler_id` configuration under `session` key to represent `session.handler` - service, defaults to `session.handler.native_file`. - * Added `gc_maxlifetime`, `gc_probability`, and `gc_divisor` to session - configuration. This means session garbage collection has a - `gc_probability`/`gc_divisor` chance of being run. The `gc_maxlifetime` defines - how long a session can idle for. It is different from cookie lifetime which - declares how long a cookie can be stored on the remote client. - * Removed 'auto_start' configuration parameter from session config. The session will - start on demand. - * [BC BREAK] TemplateNameParser::parseFromFilename() has been moved to a dedicated - parser: TemplateFilenameParser::parse(). - * [BC BREAK] Kernel parameters are replaced by their value wherever they appear - in Route patterns, requirements and defaults. Use '%%' as the escaped value for '%'. - * [BC BREAK] Switched behavior of flash messages to expire flash messages on retrieval - using Symfony\Component\HttpFoundation\Session\Flash\FlashBag as opposed to on - next pageload regardless of whether they are displayed or not. diff --git a/lib/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php deleted file mode 100644 index 17e066045..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; - -abstract class AbstractPhpFileCacheWarmer implements CacheWarmerInterface -{ - private $phpArrayFile; - - /** - * @param string $phpArrayFile The PHP file where metadata are cached - */ - public function __construct(string $phpArrayFile) - { - $this->phpArrayFile = $phpArrayFile; - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } - - /** - * {@inheritdoc} - * - * @return string[] A list of classes to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir) - { - $arrayAdapter = new ArrayAdapter(); - - spl_autoload_register([ClassExistenceResource::class, 'throwOnRequiredClass']); - try { - if (!$this->doWarmUp($cacheDir, $arrayAdapter)) { - return []; - } - } finally { - spl_autoload_unregister([ClassExistenceResource::class, 'throwOnRequiredClass']); - } - - // the ArrayAdapter stores the values serialized - // to avoid mutation of the data after it was written to the cache - // so here we un-serialize the values first - $values = array_map(function ($val) { return null !== $val ? unserialize($val) : null; }, $arrayAdapter->getValues()); - - return $this->warmUpPhpArrayAdapter(new PhpArrayAdapter($this->phpArrayFile, new NullAdapter()), $values); - } - - /** - * @return string[] A list of classes to preload on PHP 7.4+ - */ - protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array $values) - { - return (array) $phpArrayAdapter->warmUp($values); - } - - /** - * @internal - */ - final protected function ignoreAutoloadException(string $class, \Exception $exception): void - { - try { - ClassExistenceResource::throwOnRequiredClass($class, $exception); - } catch (\ReflectionException $e) { - } - } - - /** - * @return bool false if there is nothing to warm-up - */ - abstract protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter); -} diff --git a/lib/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php deleted file mode 100644 index 550440017..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Doctrine\Common\Annotations\AnnotationException; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Annotations\Reader; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; - -/** - * Warms up annotation caches for classes found in composer's autoload class map - * and declared in DI bundle extensions using the addAnnotatedClassesToCache method. - * - * @author Titouan Galopin - */ -class AnnotationsCacheWarmer extends AbstractPhpFileCacheWarmer -{ - private $annotationReader; - private $excludeRegexp; - private $debug; - - /** - * @param string $phpArrayFile The PHP file where annotations are cached - */ - public function __construct(Reader $annotationReader, string $phpArrayFile, string $excludeRegexp = null, bool $debug = false) - { - parent::__construct($phpArrayFile); - $this->annotationReader = $annotationReader; - $this->excludeRegexp = $excludeRegexp; - $this->debug = $debug; - } - - /** - * {@inheritdoc} - */ - protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter) - { - $annotatedClassPatterns = $cacheDir.'/annotations.map'; - - if (!is_file($annotatedClassPatterns)) { - return true; - } - - $annotatedClasses = include $annotatedClassPatterns; - $reader = new PsrCachedReader($this->annotationReader, $arrayAdapter, $this->debug); - - foreach ($annotatedClasses as $class) { - if (null !== $this->excludeRegexp && preg_match($this->excludeRegexp, $class)) { - continue; - } - try { - $this->readAllComponents($reader, $class); - } catch (\Exception $e) { - $this->ignoreAutoloadException($class, $e); - } - } - - return true; - } - - /** - * @return string[] A list of classes to preload on PHP 7.4+ - */ - protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array $values) - { - // make sure we don't cache null values - $values = array_filter($values, function ($val) { return null !== $val; }); - - return parent::warmUpPhpArrayAdapter($phpArrayAdapter, $values); - } - - private function readAllComponents(Reader $reader, string $class) - { - $reflectionClass = new \ReflectionClass($class); - - try { - $reader->getClassAnnotations($reflectionClass); - } catch (AnnotationException $e) { - /* - * Ignore any AnnotationException to not break the cache warming process if an Annotation is badly - * configured or could not be found / read / etc. - * - * In particular cases, an Annotation in your code can be used and defined only for a specific - * environment but is always added to the annotations.map file by some Symfony default behaviors, - * and you always end up with a not found Annotation. - */ - } - - foreach ($reflectionClass->getMethods() as $reflectionMethod) { - try { - $reader->getMethodAnnotations($reflectionMethod); - } catch (AnnotationException $e) { - } - } - - foreach ($reflectionClass->getProperties() as $reflectionProperty) { - try { - $reader->getPropertyAnnotations($reflectionProperty); - } catch (AnnotationException $e) { - } - } - } -} diff --git a/lib/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php deleted file mode 100644 index 79bca2403..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; - -/** - * Clears the cache pools when warming up the cache. - * - * Do not use in production! - * - * @author Teoh Han Hui - * - * @internal - */ -final class CachePoolClearerCacheWarmer implements CacheWarmerInterface -{ - private $poolClearer; - private $pools; - - /** - * @param string[] $pools - */ - public function __construct(Psr6CacheClearer $poolClearer, array $pools = []) - { - $this->poolClearer = $poolClearer; - $this->pools = $pools; - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDirectory): array - { - foreach ($this->pools as $pool) { - if ($this->poolClearer->hasPool($pool)) { - $this->poolClearer->clearPool($pool); - } - } - - return []; - } - - /** - * {@inheritdoc} - */ - public function isOptional(): bool - { - // optional cache warmers are not run when handling the request - return false; - } -} diff --git a/lib/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php deleted file mode 100644 index ed20bbcb6..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Config\Builder\ConfigBuilderGenerator; -use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Generate all config builders. - * - * @author Tobias Nyholm - */ -class ConfigBuilderCacheWarmer implements CacheWarmerInterface -{ - private $kernel; - private $logger; - - public function __construct(KernelInterface $kernel, LoggerInterface $logger = null) - { - $this->kernel = $kernel; - $this->logger = $logger; - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDir) - { - $generator = new ConfigBuilderGenerator($cacheDir); - - foreach ($this->kernel->getBundles() as $bundle) { - $extension = $bundle->getContainerExtension(); - if (null === $extension) { - continue; - } - - try { - $this->dumpExtension($extension, $generator); - } catch (\Exception $e) { - if ($this->logger) { - $this->logger->warning('Failed to generate ConfigBuilder for extension {extensionClass}.', ['exception' => $e, 'extensionClass' => \get_class($extension)]); - } - } - } - - // No need to preload anything - return []; - } - - private function dumpExtension(ExtensionInterface $extension, ConfigBuilderGeneratorInterface $generator): void - { - $configuration = null; - if ($extension instanceof ConfigurationInterface) { - $configuration = $extension; - } elseif ($extension instanceof ConfigurationExtensionInterface) { - $configuration = $extension->getConfiguration([], new ContainerBuilder($this->kernel->getContainer()->getParameterBag())); - } - - if (!$configuration) { - return; - } - - $generator->build($configuration); - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } -} diff --git a/lib/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php deleted file mode 100644 index 6cdf176bb..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Routing\RouterInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * Generates the router matcher and generator classes. - * - * @author Fabien Potencier - * - * @final - */ -class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - // As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected. - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function warmUp(string $cacheDir): array - { - $router = $this->container->get('router'); - - if ($router instanceof WarmableInterface) { - return (array) $router->warmUp($cacheDir); - } - - throw new \LogicException(sprintf('The router "%s" cannot be warmed up because it does not implement "%s".', get_debug_type($router), WarmableInterface::class)); - } - - /** - * {@inheritdoc} - */ - public function isOptional(): bool - { - return true; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices(): array - { - return [ - 'router' => RouterInterface::class, - ]; - } -} diff --git a/lib/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php deleted file mode 100644 index 0ada0ffc9..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Doctrine\Common\Annotations\AnnotationException; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Loader\LoaderChain; -use Symfony\Component\Serializer\Mapping\Loader\LoaderInterface; -use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; -use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; - -/** - * Warms up XML and YAML serializer metadata. - * - * @author Titouan Galopin - */ -class SerializerCacheWarmer extends AbstractPhpFileCacheWarmer -{ - private $loaders; - - /** - * @param LoaderInterface[] $loaders The serializer metadata loaders - * @param string $phpArrayFile The PHP file where metadata are cached - */ - public function __construct(array $loaders, string $phpArrayFile) - { - parent::__construct($phpArrayFile); - $this->loaders = $loaders; - } - - /** - * {@inheritdoc} - */ - protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter) - { - if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { - return false; - } - - $metadataFactory = new CacheClassMetadataFactory(new ClassMetadataFactory(new LoaderChain($this->loaders)), $arrayAdapter); - - foreach ($this->extractSupportedLoaders($this->loaders) as $loader) { - foreach ($loader->getMappedClasses() as $mappedClass) { - try { - $metadataFactory->getMetadataFor($mappedClass); - } catch (AnnotationException $e) { - // ignore failing annotations - } catch (\Exception $e) { - $this->ignoreAutoloadException($mappedClass, $e); - } - } - } - - return true; - } - - /** - * @param LoaderInterface[] $loaders - * - * @return XmlFileLoader[]|YamlFileLoader[] - */ - private function extractSupportedLoaders(array $loaders): array - { - $supportedLoaders = []; - - foreach ($loaders as $loader) { - if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) { - $supportedLoaders[] = $loader; - } elseif ($loader instanceof LoaderChain) { - $supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getLoaders())); - } - } - - return $supportedLoaders; - } -} diff --git a/lib/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php deleted file mode 100644 index e3efc8090..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Generates the catalogues for translations. - * - * @author Xavier Leune - */ -class TranslationsCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface -{ - private $container; - private $translator; - - public function __construct(ContainerInterface $container) - { - // As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected. - $this->container = $container; - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDir) - { - if (null === $this->translator) { - $this->translator = $this->container->get('translator'); - } - - if ($this->translator instanceof WarmableInterface) { - return (array) $this->translator->warmUp($cacheDir); - } - - return []; - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices() - { - return [ - 'translator' => TranslatorInterface::class, - ]; - } -} diff --git a/lib/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php b/lib/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php deleted file mode 100644 index 3c6d582c4..000000000 --- a/lib/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Doctrine\Common\Annotations\AnnotationException; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; -use Symfony\Component\Validator\Mapping\Loader\LoaderChain; -use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; -use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; -use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; -use Symfony\Component\Validator\ValidatorBuilder; - -/** - * Warms up XML and YAML validator metadata. - * - * @author Titouan Galopin - */ -class ValidatorCacheWarmer extends AbstractPhpFileCacheWarmer -{ - private $validatorBuilder; - - /** - * @param string $phpArrayFile The PHP file where metadata are cached - */ - public function __construct(ValidatorBuilder $validatorBuilder, string $phpArrayFile) - { - parent::__construct($phpArrayFile); - $this->validatorBuilder = $validatorBuilder; - } - - /** - * {@inheritdoc} - */ - protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter) - { - if (!method_exists($this->validatorBuilder, 'getLoaders')) { - return false; - } - - $loaders = $this->validatorBuilder->getLoaders(); - $metadataFactory = new LazyLoadingMetadataFactory(new LoaderChain($loaders), $arrayAdapter); - - foreach ($this->extractSupportedLoaders($loaders) as $loader) { - foreach ($loader->getMappedClasses() as $mappedClass) { - try { - if ($metadataFactory->hasMetadataFor($mappedClass)) { - $metadataFactory->getMetadataFor($mappedClass); - } - } catch (AnnotationException $e) { - // ignore failing annotations - } catch (\Exception $e) { - $this->ignoreAutoloadException($mappedClass, $e); - } - } - } - - return true; - } - - /** - * @return string[] A list of classes to preload on PHP 7.4+ - */ - protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array $values) - { - // make sure we don't cache null values - $values = array_filter($values, function ($val) { return null !== $val; }); - - return parent::warmUpPhpArrayAdapter($phpArrayAdapter, $values); - } - - /** - * @param LoaderInterface[] $loaders - * - * @return XmlFileLoader[]|YamlFileLoader[] - */ - private function extractSupportedLoaders(array $loaders): array - { - $supportedLoaders = []; - - foreach ($loaders as $loader) { - if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) { - $supportedLoaders[] = $loader; - } elseif ($loader instanceof LoaderChain) { - $supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getLoaders())); - } - } - - return $supportedLoaders; - } -} diff --git a/lib/symfony/framework-bundle/Command/AboutCommand.php b/lib/symfony/framework-bundle/Command/AboutCommand.php deleted file mode 100644 index e9660e55b..000000000 --- a/lib/symfony/framework-bundle/Command/AboutCommand.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\TableSeparator; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * A console command to display information about the current installation. - * - * @author Roland Franssen - * - * @final - */ -class AboutCommand extends Command -{ - protected static $defaultName = 'about'; - protected static $defaultDescription = 'Display information about the current project'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOT' -The %command.name% command displays information about the current Symfony project. - -The PHP section displays important configuration that could affect your application. The values might -be different between web and CLI. -EOT - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - if (method_exists($kernel, 'getBuildDir')) { - $buildDir = $kernel->getBuildDir(); - } else { - $buildDir = $kernel->getCacheDir(); - } - - $rows = [ - ['Symfony'], - new TableSeparator(), - ['Version', Kernel::VERSION], - ['Long-Term Support', 4 === Kernel::MINOR_VERSION ? 'Yes' : 'No'], - ['End of maintenance', Kernel::END_OF_MAINTENANCE.(self::isExpired(Kernel::END_OF_MAINTENANCE) ? ' Expired' : ' ('.self::daysBeforeExpiration(Kernel::END_OF_MAINTENANCE).')')], - ['End of life', Kernel::END_OF_LIFE.(self::isExpired(Kernel::END_OF_LIFE) ? ' Expired' : ' ('.self::daysBeforeExpiration(Kernel::END_OF_LIFE).')')], - new TableSeparator(), - ['Kernel'], - new TableSeparator(), - ['Type', \get_class($kernel)], - ['Environment', $kernel->getEnvironment()], - ['Debug', $kernel->isDebug() ? 'true' : 'false'], - ['Charset', $kernel->getCharset()], - ['Cache directory', self::formatPath($kernel->getCacheDir(), $kernel->getProjectDir()).' ('.self::formatFileSize($kernel->getCacheDir()).')'], - ['Build directory', self::formatPath($buildDir, $kernel->getProjectDir()).' ('.self::formatFileSize($buildDir).')'], - ['Log directory', self::formatPath($kernel->getLogDir(), $kernel->getProjectDir()).' ('.self::formatFileSize($kernel->getLogDir()).')'], - new TableSeparator(), - ['PHP'], - new TableSeparator(), - ['Version', \PHP_VERSION], - ['Architecture', (\PHP_INT_SIZE * 8).' bits'], - ['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'], - ['Timezone', date_default_timezone_get().' ('.(new \DateTime())->format(\DateTime::W3C).')'], - ['OPcache', \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'], - ['APCu', \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'], - ['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'], - ]; - - $io->table([], $rows); - - return 0; - } - - private static function formatPath(string $path, string $baseDir): string - { - return preg_replace('~^'.preg_quote($baseDir, '~').'~', '.', $path); - } - - private static function formatFileSize(string $path): string - { - if (is_file($path)) { - $size = filesize($path) ?: 0; - } else { - $size = 0; - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS | \RecursiveDirectoryIterator::FOLLOW_SYMLINKS)) as $file) { - if ($file->isReadable()) { - $size += $file->getSize(); - } - } - } - - return Helper::formatMemory($size); - } - - private static function isExpired(string $date): bool - { - $date = \DateTime::createFromFormat('d/m/Y', '01/'.$date); - - return false !== $date && new \DateTime() > $date->modify('last day of this month 23:59:59'); - } - - private static function daysBeforeExpiration(string $date): string - { - $date = \DateTime::createFromFormat('d/m/Y', '01/'.$date); - - return (new \DateTime())->diff($date->modify('last day of this month 23:59:59'))->format('in %R%a days'); - } -} diff --git a/lib/symfony/framework-bundle/Command/AbstractConfigCommand.php b/lib/symfony/framework-bundle/Command/AbstractConfigCommand.php deleted file mode 100644 index f0d5a9814..000000000 --- a/lib/symfony/framework-bundle/Command/AbstractConfigCommand.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\StyleInterface; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; - -/** - * A console command for dumping available configuration reference. - * - * @author Kevin Bond - * @author Wouter J - * @author Grégoire Pineau - */ -abstract class AbstractConfigCommand extends ContainerDebugCommand -{ - /** - * @param OutputInterface|StyleInterface $output - */ - protected function listBundles($output) - { - $title = 'Available registered bundles with their extension alias if available'; - $headers = ['Bundle name', 'Extension alias']; - $rows = []; - - $bundles = $this->getApplication()->getKernel()->getBundles(); - usort($bundles, function ($bundleA, $bundleB) { - return strcmp($bundleA->getName(), $bundleB->getName()); - }); - - foreach ($bundles as $bundle) { - $extension = $bundle->getContainerExtension(); - $rows[] = [$bundle->getName(), $extension ? $extension->getAlias() : '']; - } - - if ($output instanceof StyleInterface) { - $output->title($title); - $output->table($headers, $rows); - } else { - $output->writeln($title); - $table = new Table($output); - $table->setHeaders($headers)->setRows($rows)->render(); - } - } - - /** - * @return ExtensionInterface - */ - protected function findExtension(string $name) - { - $bundles = $this->initializeBundles(); - $minScore = \INF; - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface)) { - if ($name === $kernel->getAlias()) { - return $kernel; - } - - if ($kernel->getAlias()) { - $distance = levenshtein($name, $kernel->getAlias()); - - if ($distance < $minScore) { - $guess = $kernel->getAlias(); - $minScore = $distance; - } - } - } - - foreach ($bundles as $bundle) { - if ($name === $bundle->getName()) { - if (!$bundle->getContainerExtension()) { - throw new \LogicException(sprintf('Bundle "%s" does not have a container extension.', $name)); - } - - return $bundle->getContainerExtension(); - } - - $distance = levenshtein($name, $bundle->getName()); - - if ($distance < $minScore) { - $guess = $bundle->getName(); - $minScore = $distance; - } - } - - $container = $this->getContainerBuilder($kernel); - - if ($container->hasExtension($name)) { - return $container->getExtension($name); - } - - foreach ($container->getExtensions() as $extension) { - $distance = levenshtein($name, $extension->getAlias()); - - if ($distance < $minScore) { - $guess = $extension->getAlias(); - $minScore = $distance; - } - } - - if (!str_ends_with($name, 'Bundle')) { - $message = sprintf('No extensions with configuration available for "%s".', $name); - } else { - $message = sprintf('No extension with alias "%s" is enabled.', $name); - } - - if (isset($guess) && $minScore < 3) { - $message .= sprintf("\n\nDid you mean \"%s\"?", $guess); - } - - throw new LogicException($message); - } - - public function validateConfiguration(ExtensionInterface $extension, $configuration) - { - if (!$configuration) { - throw new \LogicException(sprintf('The extension with alias "%s" does not have its getConfiguration() method setup.', $extension->getAlias())); - } - - if (!$configuration instanceof ConfigurationInterface) { - throw new \LogicException(sprintf('Configuration class "%s" should implement ConfigurationInterface in order to be dumpable.', get_debug_type($configuration))); - } - } - - private function initializeBundles() - { - // Re-build bundle manually to initialize DI extensions that can be extended by other bundles in their build() method - // as this method is not called when the container is loaded from the cache. - $kernel = $this->getApplication()->getKernel(); - $container = $this->getContainerBuilder($kernel); - $bundles = $kernel->getBundles(); - foreach ($bundles as $bundle) { - if ($extension = $bundle->getContainerExtension()) { - $container->registerExtension($extension); - } - } - - foreach ($bundles as $bundle) { - $bundle->build($container); - } - - return $bundles; - } -} diff --git a/lib/symfony/framework-bundle/Command/AssetsInstallCommand.php b/lib/symfony/framework-bundle/Command/AssetsInstallCommand.php deleted file mode 100644 index 870e686de..000000000 --- a/lib/symfony/framework-bundle/Command/AssetsInstallCommand.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Command that places bundle web assets into a given directory. - * - * @author Fabien Potencier - * @author Gábor Egyed - * - * @final - */ -class AssetsInstallCommand extends Command -{ - public const METHOD_COPY = 'copy'; - public const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink'; - public const METHOD_RELATIVE_SYMLINK = 'relative symlink'; - - protected static $defaultName = 'assets:install'; - protected static $defaultDescription = 'Install bundle\'s web assets under a public directory'; - - private $filesystem; - private $projectDir; - - public function __construct(Filesystem $filesystem, string $projectDir) - { - parent::__construct(); - - $this->filesystem = $filesystem; - $this->projectDir = $projectDir; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('target', InputArgument::OPTIONAL, 'The target directory', null), - ]) - ->addOption('symlink', null, InputOption::VALUE_NONE, 'Symlink the assets instead of copying them') - ->addOption('relative', null, InputOption::VALUE_NONE, 'Make relative symlinks') - ->addOption('no-cleanup', null, InputOption::VALUE_NONE, 'Do not remove the assets of the bundles that no longer exist') - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOT' -The %command.name% command installs bundle assets into a given -directory (e.g. the public directory). - - php %command.full_name% public - -A "bundles" directory will be created inside the target directory and the -"Resources/public" directory of each bundle will be copied into it. - -To create a symlink to each bundle instead of copying its assets, use the ---symlink option (will fall back to hard copies when symbolic links aren't possible: - - php %command.full_name% public --symlink - -To make symlink relative, add the --relative option: - - php %command.full_name% public --symlink --relative - -EOT - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - $targetArg = rtrim($input->getArgument('target') ?? '', '/'); - if (!$targetArg) { - $targetArg = $this->getPublicDirectory($kernel->getContainer()); - } - - if (!is_dir($targetArg)) { - $targetArg = $kernel->getProjectDir().'/'.$targetArg; - - if (!is_dir($targetArg)) { - throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $targetArg)); - } - } - - $bundlesDir = $targetArg.'/bundles/'; - - $io = new SymfonyStyle($input, $output); - $io->newLine(); - - if ($input->getOption('relative')) { - $expectedMethod = self::METHOD_RELATIVE_SYMLINK; - $io->text('Trying to install assets as relative symbolic links.'); - } elseif ($input->getOption('symlink')) { - $expectedMethod = self::METHOD_ABSOLUTE_SYMLINK; - $io->text('Trying to install assets as absolute symbolic links.'); - } else { - $expectedMethod = self::METHOD_COPY; - $io->text('Installing assets as hard copies.'); - } - - $io->newLine(); - - $rows = []; - $copyUsed = false; - $exitCode = 0; - $validAssetDirs = []; - /** @var BundleInterface $bundle */ - foreach ($kernel->getBundles() as $bundle) { - if (!is_dir($originDir = $bundle->getPath().'/Resources/public') && !is_dir($originDir = $bundle->getPath().'/public')) { - continue; - } - - $assetDir = preg_replace('/bundle$/', '', strtolower($bundle->getName())); - $targetDir = $bundlesDir.$assetDir; - $validAssetDirs[] = $assetDir; - - if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $message = sprintf("%s\n-> %s", $bundle->getName(), $targetDir); - } else { - $message = $bundle->getName(); - } - - try { - $this->filesystem->remove($targetDir); - - if (self::METHOD_RELATIVE_SYMLINK === $expectedMethod) { - $method = $this->relativeSymlinkWithFallback($originDir, $targetDir); - } elseif (self::METHOD_ABSOLUTE_SYMLINK === $expectedMethod) { - $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir); - } else { - $method = $this->hardCopy($originDir, $targetDir); - } - - if (self::METHOD_COPY === $method) { - $copyUsed = true; - } - - if ($method === $expectedMethod) { - $rows[] = [sprintf('%s', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method]; - } else { - $rows[] = [sprintf('%s', '\\' === \DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method]; - } - } catch (\Exception $e) { - $exitCode = 1; - $rows[] = [sprintf('%s', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage()]; - } - } - // remove the assets of the bundles that no longer exist - if (!$input->getOption('no-cleanup') && is_dir($bundlesDir)) { - $dirsToRemove = Finder::create()->depth(0)->directories()->exclude($validAssetDirs)->in($bundlesDir); - $this->filesystem->remove($dirsToRemove); - } - - if ($rows) { - $io->table(['', 'Bundle', 'Method / Error'], $rows); - } - - if (0 !== $exitCode) { - $io->error('Some errors occurred while installing assets.'); - } else { - if ($copyUsed) { - $io->note('Some assets were installed via copy. If you make changes to these assets you have to run this command again.'); - } - $io->success($rows ? 'All assets were successfully installed.' : 'No assets were provided by any bundle.'); - } - - return $exitCode; - } - - /** - * Try to create relative symlink. - * - * Falling back to absolute symlink and finally hard copy. - */ - private function relativeSymlinkWithFallback(string $originDir, string $targetDir): string - { - try { - $this->symlink($originDir, $targetDir, true); - $method = self::METHOD_RELATIVE_SYMLINK; - } catch (IOException $e) { - $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir); - } - - return $method; - } - - /** - * Try to create absolute symlink. - * - * Falling back to hard copy. - */ - private function absoluteSymlinkWithFallback(string $originDir, string $targetDir): string - { - try { - $this->symlink($originDir, $targetDir); - $method = self::METHOD_ABSOLUTE_SYMLINK; - } catch (IOException $e) { - // fall back to copy - $method = $this->hardCopy($originDir, $targetDir); - } - - return $method; - } - - /** - * Creates symbolic link. - * - * @throws IOException if link cannot be created - */ - private function symlink(string $originDir, string $targetDir, bool $relative = false) - { - if ($relative) { - $this->filesystem->mkdir(\dirname($targetDir)); - $originDir = $this->filesystem->makePathRelative($originDir, realpath(\dirname($targetDir))); - } - $this->filesystem->symlink($originDir, $targetDir); - if (!file_exists($targetDir)) { - throw new IOException(sprintf('Symbolic link "%s" was created but appears to be broken.', $targetDir), 0, null, $targetDir); - } - } - - /** - * Copies origin to target. - */ - private function hardCopy(string $originDir, string $targetDir): string - { - $this->filesystem->mkdir($targetDir, 0777); - // We use a custom iterator to ignore VCS files - $this->filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir)); - - return self::METHOD_COPY; - } - - private function getPublicDirectory(ContainerInterface $container): string - { - $defaultPublicDir = 'public'; - - if (null === $this->projectDir && !$container->hasParameter('kernel.project_dir')) { - return $defaultPublicDir; - } - - $composerFilePath = ($this->projectDir ?? $container->getParameter('kernel.project_dir')).'/composer.json'; - - if (!file_exists($composerFilePath)) { - return $defaultPublicDir; - } - - $composerConfig = json_decode(file_get_contents($composerFilePath), true); - - return $composerConfig['extra']['public-dir'] ?? $defaultPublicDir; - } -} diff --git a/lib/symfony/framework-bundle/Command/BuildDebugContainerTrait.php b/lib/symfony/framework-bundle/Command/BuildDebugContainerTrait.php deleted file mode 100644 index 785027dbc..000000000 --- a/lib/symfony/framework-bundle/Command/BuildDebugContainerTrait.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * @internal - * - * @author Robin Chalas - * @author Nicolas Grekas - */ -trait BuildDebugContainerTrait -{ - protected $containerBuilder; - - /** - * Loads the ContainerBuilder from the cache. - * - * @throws \LogicException - */ - protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilder - { - if ($this->containerBuilder) { - return $this->containerBuilder; - } - - if (!$kernel->isDebug() || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) { - $buildContainer = \Closure::bind(function () { - $this->initializeBundles(); - - return $this->buildContainer(); - }, $kernel, \get_class($kernel)); - $container = $buildContainer(); - $container->getCompilerPassConfig()->setRemovingPasses([]); - $container->getCompilerPassConfig()->setAfterRemovingPasses([]); - $container->compile(); - } else { - (new XmlFileLoader($container = new ContainerBuilder(), new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump')); - $locatorPass = new ServiceLocatorTagPass(); - $locatorPass->process($container); - - $container->getCompilerPassConfig()->setBeforeOptimizationPasses([]); - $container->getCompilerPassConfig()->setOptimizationPasses([]); - $container->getCompilerPassConfig()->setBeforeRemovingPasses([]); - } - - return $this->containerBuilder = $container; - } -} diff --git a/lib/symfony/framework-bundle/Command/CacheClearCommand.php b/lib/symfony/framework-bundle/Command/CacheClearCommand.php deleted file mode 100644 index b0d556539..000000000 --- a/lib/symfony/framework-bundle/Command/CacheClearCommand.php +++ /dev/null @@ -1,261 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Dumper\Preloader; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface; -use Symfony\Component\HttpKernel\RebootableInterface; - -/** - * Clear and Warmup the cache. - * - * @author Francis Besset - * @author Fabien Potencier - * - * @final - */ -class CacheClearCommand extends Command -{ - protected static $defaultName = 'cache:clear'; - protected static $defaultDescription = 'Clear the cache'; - - private $cacheClearer; - private $filesystem; - - public function __construct(CacheClearerInterface $cacheClearer, Filesystem $filesystem = null) - { - parent::__construct(); - - $this->cacheClearer = $cacheClearer; - $this->filesystem = $filesystem ?? new Filesystem(); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputOption('no-warmup', '', InputOption::VALUE_NONE, 'Do not warm up the cache'), - new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command clears and warms up the application cache for a given environment -and debug mode: - - php %command.full_name% --env=dev - php %command.full_name% --env=prod --no-debug -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $fs = $this->filesystem; - $io = new SymfonyStyle($input, $output); - - $kernel = $this->getApplication()->getKernel(); - $realCacheDir = $kernel->getContainer()->getParameter('kernel.cache_dir'); - $realBuildDir = $kernel->getContainer()->hasParameter('kernel.build_dir') ? $kernel->getContainer()->getParameter('kernel.build_dir') : $realCacheDir; - // the old cache dir name must not be longer than the real one to avoid exceeding - // the maximum length of a directory or file path within it (esp. Windows MAX_PATH) - $oldCacheDir = substr($realCacheDir, 0, -1).(str_ends_with($realCacheDir, '~') ? '+' : '~'); - $fs->remove($oldCacheDir); - - if (!is_writable($realCacheDir)) { - throw new RuntimeException(sprintf('Unable to write in the "%s" directory.', $realCacheDir)); - } - - $useBuildDir = $realBuildDir !== $realCacheDir; - $oldBuildDir = substr($realBuildDir, 0, -1).('~' === substr($realBuildDir, -1) ? '+' : '~'); - if ($useBuildDir) { - $fs->remove($oldBuildDir); - - if (!is_writable($realBuildDir)) { - throw new RuntimeException(sprintf('Unable to write in the "%s" directory.', $realBuildDir)); - } - - if ($this->isNfs($realCacheDir)) { - $fs->remove($realCacheDir); - } else { - $fs->rename($realCacheDir, $oldCacheDir); - } - $fs->mkdir($realCacheDir); - } - - $io->comment(sprintf('Clearing the cache for the %s environment with debug %s', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - if ($useBuildDir) { - $this->cacheClearer->clear($realBuildDir); - } - $this->cacheClearer->clear($realCacheDir); - - // The current event dispatcher is stale, let's not use it anymore - $this->getApplication()->setDispatcher(new EventDispatcher()); - - $containerFile = (new \ReflectionObject($kernel->getContainer()))->getFileName(); - $containerDir = basename(\dirname($containerFile)); - - // the warmup cache dir name must have the same length as the real one - // to avoid the many problems in serialized resources files - $warmupDir = substr($realBuildDir, 0, -1).('_' === substr($realBuildDir, -1) ? '-' : '_'); - - if ($output->isVerbose() && $fs->exists($warmupDir)) { - $io->comment('Clearing outdated warmup directory...'); - } - $fs->remove($warmupDir); - - if ($_SERVER['REQUEST_TIME'] <= filemtime($containerFile) && filemtime($containerFile) <= time()) { - if ($output->isVerbose()) { - $io->comment('Cache is fresh.'); - } - if (!$input->getOption('no-warmup') && !$input->getOption('no-optional-warmers')) { - if ($output->isVerbose()) { - $io->comment('Warming up optional cache...'); - } - $warmer = $kernel->getContainer()->get('cache_warmer'); - // non optional warmers already ran during container compilation - $warmer->enableOnlyOptionalWarmers(); - $preload = (array) $warmer->warmUp($realCacheDir); - - if ($preload && file_exists($preloadFile = $realCacheDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - } - } else { - $fs->mkdir($warmupDir); - - if (!$input->getOption('no-warmup')) { - if ($output->isVerbose()) { - $io->comment('Warming up cache...'); - } - $this->warmup($warmupDir, $realCacheDir, !$input->getOption('no-optional-warmers')); - } - - if (!$fs->exists($warmupDir.'/'.$containerDir)) { - $fs->rename($realBuildDir.'/'.$containerDir, $warmupDir.'/'.$containerDir); - touch($warmupDir.'/'.$containerDir.'.legacy'); - } - - if ($this->isNfs($realBuildDir)) { - $io->note('For better performances, you should move the cache and log directories to a non-shared folder of the VM.'); - $fs->remove($realBuildDir); - } else { - $fs->rename($realBuildDir, $oldBuildDir); - } - - $fs->rename($warmupDir, $realBuildDir); - - if ($output->isVerbose()) { - $io->comment('Removing old build and cache directory...'); - } - - if ($useBuildDir) { - try { - $fs->remove($oldBuildDir); - } catch (IOException $e) { - if ($output->isVerbose()) { - $io->warning($e->getMessage()); - } - } - } - - try { - $fs->remove($oldCacheDir); - } catch (IOException $e) { - if ($output->isVerbose()) { - $io->warning($e->getMessage()); - } - } - } - - if ($output->isVerbose()) { - $io->comment('Finished'); - } - - $io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully cleared.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - - return 0; - } - - private function isNfs(string $dir): bool - { - static $mounts = null; - - if (null === $mounts) { - $mounts = []; - if ('/' === \DIRECTORY_SEPARATOR && $files = @file('/proc/mounts')) { - foreach ($files as $mount) { - $mount = \array_slice(explode(' ', $mount), 1, -3); - if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) { - continue; - } - $mounts[] = implode(' ', $mount).'/'; - } - } - } - foreach ($mounts as $mount) { - if (0 === strpos($dir, $mount)) { - return true; - } - } - - return false; - } - - private function warmup(string $warmupDir, string $realBuildDir, bool $enableOptionalWarmers = true) - { - // create a temporary kernel - $kernel = $this->getApplication()->getKernel(); - if (!$kernel instanceof RebootableInterface) { - throw new \LogicException('Calling "cache:clear" with a kernel that does not implement "Symfony\Component\HttpKernel\RebootableInterface" is not supported.'); - } - $kernel->reboot($warmupDir); - - // warmup temporary dir - if ($enableOptionalWarmers) { - $warmer = $kernel->getContainer()->get('cache_warmer'); - // non optional warmers already ran during container compilation - $warmer->enableOnlyOptionalWarmers(); - $preload = (array) $warmer->warmUp($warmupDir); - - if ($preload && file_exists($preloadFile = $warmupDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - } - - // fix references to cached files with the real cache directory name - $search = [$warmupDir, str_replace('\\', '\\\\', $warmupDir)]; - $replace = str_replace('\\', '/', $realBuildDir); - foreach (Finder::create()->files()->in($warmupDir) as $file) { - $content = str_replace($search, $replace, file_get_contents($file), $count); - if ($count) { - file_put_contents($file, $content); - } - } - } -} diff --git a/lib/symfony/framework-bundle/Command/CachePoolClearCommand.php b/lib/symfony/framework-bundle/Command/CachePoolClearCommand.php deleted file mode 100644 index b72924dfa..000000000 --- a/lib/symfony/framework-bundle/Command/CachePoolClearCommand.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; - -/** - * Clear cache pools. - * - * @author Nicolas Grekas - */ -final class CachePoolClearCommand extends Command -{ - protected static $defaultName = 'cache:pool:clear'; - protected static $defaultDescription = 'Clear cache pools'; - - private $poolClearer; - private $poolNames; - - /** - * @param string[]|null $poolNames - */ - public function __construct(Psr6CacheClearer $poolClearer, array $poolNames = null) - { - parent::__construct(); - - $this->poolClearer = $poolClearer; - $this->poolNames = $poolNames; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('pools', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'A list of cache pools or cache pool clearers'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command clears the given cache pools or cache pool clearers. - - %command.full_name% [...] -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $kernel = $this->getApplication()->getKernel(); - $pools = []; - $clearers = []; - - foreach ($input->getArgument('pools') as $id) { - if ($this->poolClearer->hasPool($id)) { - $pools[$id] = $id; - } else { - $pool = $kernel->getContainer()->get($id); - - if ($pool instanceof CacheItemPoolInterface) { - $pools[$id] = $pool; - } elseif ($pool instanceof Psr6CacheClearer) { - $clearers[$id] = $pool; - } else { - throw new InvalidArgumentException(sprintf('"%s" is not a cache pool nor a cache clearer.', $id)); - } - } - } - - foreach ($clearers as $id => $clearer) { - $io->comment(sprintf('Calling cache clearer: %s', $id)); - $clearer->clear($kernel->getContainer()->getParameter('kernel.cache_dir')); - } - - $failure = false; - foreach ($pools as $id => $pool) { - $io->comment(sprintf('Clearing cache pool: %s', $id)); - - if ($pool instanceof CacheItemPoolInterface) { - if (!$pool->clear()) { - $io->warning(sprintf('Cache pool "%s" could not be cleared.', $pool)); - $failure = true; - } - } else { - if (false === $this->poolClearer->clearPool($id)) { - $io->warning(sprintf('Cache pool "%s" could not be cleared.', $pool)); - $failure = true; - } - } - } - - if ($failure) { - return 1; - } - - $io->success('Cache was successfully cleared.'); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if (\is_array($this->poolNames) && $input->mustSuggestArgumentValuesFor('pools')) { - $suggestions->suggestValues($this->poolNames); - } - } -} diff --git a/lib/symfony/framework-bundle/Command/CachePoolDeleteCommand.php b/lib/symfony/framework-bundle/Command/CachePoolDeleteCommand.php deleted file mode 100644 index b36d48cfe..000000000 --- a/lib/symfony/framework-bundle/Command/CachePoolDeleteCommand.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; - -/** - * Delete an item from a cache pool. - * - * @author Pierre du Plessis - */ -final class CachePoolDeleteCommand extends Command -{ - protected static $defaultName = 'cache:pool:delete'; - protected static $defaultDescription = 'Delete an item from a cache pool'; - - private $poolClearer; - private $poolNames; - - /** - * @param string[]|null $poolNames - */ - public function __construct(Psr6CacheClearer $poolClearer, array $poolNames = null) - { - parent::__construct(); - - $this->poolClearer = $poolClearer; - $this->poolNames = $poolNames; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('pool', InputArgument::REQUIRED, 'The cache pool from which to delete an item'), - new InputArgument('key', InputArgument::REQUIRED, 'The cache key to delete from the pool'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% deletes an item from a given cache pool. - - %command.full_name% -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $pool = $input->getArgument('pool'); - $key = $input->getArgument('key'); - $cachePool = $this->poolClearer->getPool($pool); - - if (!$cachePool->hasItem($key)) { - $io->note(sprintf('Cache item "%s" does not exist in cache pool "%s".', $key, $pool)); - - return 0; - } - - if (!$cachePool->deleteItem($key)) { - throw new \Exception(sprintf('Cache item "%s" could not be deleted.', $key)); - } - - $io->success(sprintf('Cache item "%s" was successfully deleted.', $key)); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if (\is_array($this->poolNames) && $input->mustSuggestArgumentValuesFor('pool')) { - $suggestions->suggestValues($this->poolNames); - } - } -} diff --git a/lib/symfony/framework-bundle/Command/CachePoolListCommand.php b/lib/symfony/framework-bundle/Command/CachePoolListCommand.php deleted file mode 100644 index 0ad33241d..000000000 --- a/lib/symfony/framework-bundle/Command/CachePoolListCommand.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * List available cache pools. - * - * @author Tobias Nyholm - */ -final class CachePoolListCommand extends Command -{ - protected static $defaultName = 'cache:pool:list'; - protected static $defaultDescription = 'List available cache pools'; - - private $poolNames; - - /** - * @param string[] $poolNames - */ - public function __construct(array $poolNames) - { - parent::__construct(); - - $this->poolNames = $poolNames; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command lists all available cache pools. -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $io->table(['Pool name'], array_map(function ($pool) { - return [$pool]; - }, $this->poolNames)); - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/CachePoolPruneCommand.php b/lib/symfony/framework-bundle/Command/CachePoolPruneCommand.php deleted file mode 100644 index 8d1035294..000000000 --- a/lib/symfony/framework-bundle/Command/CachePoolPruneCommand.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * Cache pool pruner command. - * - * @author Rob Frawley 2nd - */ -final class CachePoolPruneCommand extends Command -{ - protected static $defaultName = 'cache:pool:prune'; - protected static $defaultDescription = 'Prune cache pools'; - - private $pools; - - /** - * @param iterable $pools - */ - public function __construct(iterable $pools) - { - parent::__construct(); - - $this->pools = $pools; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command deletes all expired items from all pruneable pools. - - %command.full_name% -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - foreach ($this->pools as $name => $pool) { - $io->comment(sprintf('Pruning cache pool: %s', $name)); - $pool->prune(); - } - - $io->success('Successfully pruned cache pool(s).'); - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/CacheWarmupCommand.php b/lib/symfony/framework-bundle/Command/CacheWarmupCommand.php deleted file mode 100644 index ddaf9eb63..000000000 --- a/lib/symfony/framework-bundle/Command/CacheWarmupCommand.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Dumper\Preloader; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate; - -/** - * Warmup the cache. - * - * @author Fabien Potencier - * - * @final - */ -class CacheWarmupCommand extends Command -{ - protected static $defaultName = 'cache:warmup'; - protected static $defaultDescription = 'Warm up an empty cache'; - - private $cacheWarmer; - - public function __construct(CacheWarmerAggregate $cacheWarmer) - { - parent::__construct(); - - $this->cacheWarmer = $cacheWarmer; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command warms up the cache. - -Before running this command, the cache must be empty. - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $kernel = $this->getApplication()->getKernel(); - $io->comment(sprintf('Warming up the cache for the %s environment with debug %s', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - - if (!$input->getOption('no-optional-warmers')) { - $this->cacheWarmer->enableOptionalWarmers(); - } - - $preload = $this->cacheWarmer->warmUp($cacheDir = $kernel->getContainer()->getParameter('kernel.cache_dir')); - - if ($preload && file_exists($preloadFile = $cacheDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - - $io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully warmed.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/ConfigDebugCommand.php b/lib/symfony/framework-bundle/Command/ConfigDebugCommand.php deleted file mode 100644 index 12e501baa..000000000 --- a/lib/symfony/framework-bundle/Command/ConfigDebugCommand.php +++ /dev/null @@ -1,240 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Processor; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Compiler\ValidateEnvPlaceholdersPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\Yaml\Yaml; - -/** - * A console command for dumping available configuration reference. - * - * @author Grégoire Pineau - * - * @final - */ -class ConfigDebugCommand extends AbstractConfigCommand -{ - protected static $defaultName = 'debug:config'; - protected static $defaultDescription = 'Dump the current configuration for an extension'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'), - new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command dumps the current configuration for an -extension/bundle. - -Either the extension alias or bundle name can be used: - - php %command.full_name% framework - php %command.full_name% FrameworkBundle - -For dumping a specific option, add its path as second argument: - - php %command.full_name% framework serializer.enabled - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - if (null === $name = $input->getArgument('name')) { - $this->listBundles($errorIo); - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface - && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface) - && $kernel->getAlias() - ) { - $errorIo->table(['Kernel Extension'], [[$kernel->getAlias()]]); - } - - $errorIo->comment('Provide the name of a bundle as the first argument of this command to dump its configuration. (e.g. debug:config FrameworkBundle)'); - $errorIo->comment('For dumping a specific option, add its path as the second argument of this command. (e.g. debug:config FrameworkBundle serializer to dump the framework.serializer configuration)'); - - return 0; - } - - $extension = $this->findExtension($name); - $extensionAlias = $extension->getAlias(); - $container = $this->compileContainer(); - - $config = $this->getConfig($extension, $container); - - if (null === $path = $input->getArgument('path')) { - $io->title( - sprintf('Current configuration for %s', $name === $extensionAlias ? sprintf('extension with alias "%s"', $extensionAlias) : sprintf('"%s"', $name)) - ); - - $io->writeln(Yaml::dump([$extensionAlias => $config], 10)); - - return 0; - } - - try { - $config = $this->getConfigForPath($config, $path, $extensionAlias); - } catch (LogicException $e) { - $errorIo->error($e->getMessage()); - - return 1; - } - - $io->title(sprintf('Current configuration for "%s.%s"', $extensionAlias, $path)); - - $io->writeln(Yaml::dump($config, 10)); - - return 0; - } - - private function compileContainer(): ContainerBuilder - { - $kernel = clone $this->getApplication()->getKernel(); - $kernel->boot(); - - $method = new \ReflectionMethod($kernel, 'buildContainer'); - $method->setAccessible(true); - $container = $method->invoke($kernel); - $container->getCompiler()->compile($container); - - return $container; - } - - /** - * Iterate over configuration until the last step of the given path. - * - * @throws LogicException If the configuration does not exist - * - * @return mixed - */ - private function getConfigForPath(array $config, string $path, string $alias) - { - $steps = explode('.', $path); - - foreach ($steps as $step) { - if (!\array_key_exists($step, $config)) { - throw new LogicException(sprintf('Unable to find configuration for "%s.%s".', $alias, $path)); - } - - $config = $config[$step]; - } - - return $config; - } - - private function getConfigForExtension(ExtensionInterface $extension, ContainerBuilder $container): array - { - $extensionAlias = $extension->getAlias(); - - $extensionConfig = []; - foreach ($container->getCompilerPassConfig()->getPasses() as $pass) { - if ($pass instanceof ValidateEnvPlaceholdersPass) { - $extensionConfig = $pass->getExtensionConfig(); - break; - } - } - - if (isset($extensionConfig[$extensionAlias])) { - return $extensionConfig[$extensionAlias]; - } - - // Fall back to default config if the extension has one - - if (!$extension instanceof ConfigurationExtensionInterface) { - throw new \LogicException(sprintf('The extension with alias "%s" does not have configuration.', $extensionAlias)); - } - - $configs = $container->getExtensionConfig($extensionAlias); - $configuration = $extension->getConfiguration($configs, $container); - $this->validateConfiguration($extension, $configuration); - - return (new Processor())->processConfiguration($configuration, $configs); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues($this->getAvailableBundles(!preg_match('/^[A-Z]/', $input->getCompletionValue()))); - - return; - } - - if ($input->mustSuggestArgumentValuesFor('path') && null !== $name = $input->getArgument('name')) { - try { - $config = $this->getConfig($this->findExtension($name), $this->compileContainer()); - $paths = array_keys(self::buildPathsCompletion($config)); - $suggestions->suggestValues($paths); - } catch (LogicException $e) { - } - } - } - - private function getAvailableBundles(bool $alias): array - { - $availableBundles = []; - foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) { - $availableBundles[] = $alias ? $bundle->getContainerExtension()->getAlias() : $bundle->getName(); - } - - return $availableBundles; - } - - private function getConfig(ExtensionInterface $extension, ContainerBuilder $container) - { - return $container->resolveEnvPlaceholders( - $container->getParameterBag()->resolveValue( - $this->getConfigForExtension($extension, $container) - ) - ); - } - - private static function buildPathsCompletion(array $paths, string $prefix = ''): array - { - $completionPaths = []; - foreach ($paths as $key => $values) { - if (\is_array($values)) { - $completionPaths = $completionPaths + self::buildPathsCompletion($values, $prefix.$key.'.'); - } else { - $completionPaths[$prefix.$key] = null; - } - } - - return $completionPaths; - } -} diff --git a/lib/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php b/lib/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php deleted file mode 100644 index 63e6496bd..000000000 --- a/lib/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php +++ /dev/null @@ -1,190 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper; -use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\Yaml\Yaml; - -/** - * A console command for dumping available configuration reference. - * - * @author Kevin Bond - * @author Wouter J - * @author Grégoire Pineau - * - * @final - */ -class ConfigDumpReferenceCommand extends AbstractConfigCommand -{ - protected static $defaultName = 'config:dump-reference'; - protected static $defaultDescription = 'Dump the default configuration for an extension'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'), - new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (yaml or xml)', 'yaml'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command dumps the default configuration for an -extension/bundle. - -Either the extension alias or bundle name can be used: - - php %command.full_name% framework - php %command.full_name% FrameworkBundle - -With the --format option specifies the format of the configuration, -this is either yaml or xml. -When the option is not provided, yaml is used. - - php %command.full_name% FrameworkBundle --format=xml - -For dumping a specific option, add its path as second argument (only available for the yaml format): - - php %command.full_name% framework http_client.default_options - -EOF - ) - ; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - if (null === $name = $input->getArgument('name')) { - $this->listBundles($errorIo); - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface - && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface) - && $kernel->getAlias() - ) { - $errorIo->table(['Kernel Extension'], [[$kernel->getAlias()]]); - } - - $errorIo->comment([ - 'Provide the name of a bundle as the first argument of this command to dump its default configuration. (e.g. config:dump-reference FrameworkBundle)', - 'For dumping a specific option, add its path as the second argument of this command. (e.g. config:dump-reference FrameworkBundle http_client.default_options to dump the framework.http_client.default_options configuration)', - ]); - - return 0; - } - - $extension = $this->findExtension($name); - - if ($extension instanceof ConfigurationInterface) { - $configuration = $extension; - } else { - $configuration = $extension->getConfiguration([], $this->getContainerBuilder($this->getApplication()->getKernel())); - } - - $this->validateConfiguration($extension, $configuration); - - $format = $input->getOption('format'); - - if ('yaml' === $format && !class_exists(Yaml::class)) { - $errorIo->error('Setting the "format" option to "yaml" requires the Symfony Yaml component. Try running "composer install symfony/yaml" or use "--format=xml" instead.'); - - return 1; - } - - $path = $input->getArgument('path'); - - if (null !== $path && 'yaml' !== $format) { - $errorIo->error('The "path" option is only available for the "yaml" format.'); - - return 1; - } - - if ($name === $extension->getAlias()) { - $message = sprintf('Default configuration for extension with alias: "%s"', $name); - } else { - $message = sprintf('Default configuration for "%s"', $name); - } - - if (null !== $path) { - $message .= sprintf(' at path "%s"', $path); - } - - switch ($format) { - case 'yaml': - $io->writeln(sprintf('# %s', $message)); - $dumper = new YamlReferenceDumper(); - break; - case 'xml': - $io->writeln(sprintf('', $message)); - $dumper = new XmlReferenceDumper(); - break; - default: - $io->writeln($message); - throw new InvalidArgumentException('Only the yaml and xml formats are supported.'); - } - - $io->writeln(null === $path ? $dumper->dump($configuration, $extension->getNamespace()) : $dumper->dumpAtPath($configuration, $path)); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues($this->getAvailableBundles()); - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues($this->getAvailableFormatOptions()); - } - } - - private function getAvailableBundles(): array - { - $bundles = []; - - foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) { - $bundles[] = $bundle->getName(); - $bundles[] = $bundle->getContainerExtension()->getAlias(); - } - - return $bundles; - } - - private function getAvailableFormatOptions(): array - { - return ['yaml', 'xml']; - } -} diff --git a/lib/symfony/framework-bundle/Command/ContainerDebugCommand.php b/lib/symfony/framework-bundle/Command/ContainerDebugCommand.php deleted file mode 100644 index 8dfebe4ae..000000000 --- a/lib/symfony/framework-bundle/Command/ContainerDebugCommand.php +++ /dev/null @@ -1,313 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; - -/** - * A console command for retrieving information about services. - * - * @author Ryan Weaver - * - * @internal - */ -class ContainerDebugCommand extends Command -{ - use BuildDebugContainerTrait; - - protected static $defaultName = 'debug:container'; - protected static $defaultDescription = 'Display current services for an application'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'), - new InputOption('show-arguments', null, InputOption::VALUE_NONE, 'Show arguments in services'), - new InputOption('show-hidden', null, InputOption::VALUE_NONE, 'Show hidden (internal) services'), - new InputOption('tag', null, InputOption::VALUE_REQUIRED, 'Show all services with a specific tag'), - new InputOption('tags', null, InputOption::VALUE_NONE, 'Display tagged services for an application'), - new InputOption('parameter', null, InputOption::VALUE_REQUIRED, 'Display a specific parameter for an application'), - new InputOption('parameters', null, InputOption::VALUE_NONE, 'Display parameters for an application'), - new InputOption('types', null, InputOption::VALUE_NONE, 'Display types (classes/interfaces) available in the container'), - new InputOption('env-var', null, InputOption::VALUE_REQUIRED, 'Display a specific environment variable used in the container'), - new InputOption('env-vars', null, InputOption::VALUE_NONE, 'Display environment variables used in the container'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), - new InputOption('deprecations', null, InputOption::VALUE_NONE, 'Display deprecations generated when compiling and warming up the container'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays all configured public services: - - php %command.full_name% - -To see deprecations generated during container compilation and cache warmup, use the --deprecations option: - - php %command.full_name% --deprecations - -To get specific information about a service, specify its name: - - php %command.full_name% validator - -To get specific information about a service including all its arguments, use the --show-arguments flag: - - php %command.full_name% validator --show-arguments - -To see available types that can be used for autowiring, use the --types flag: - - php %command.full_name% --types - -To see environment variables used by the container, use the --env-vars flag: - - php %command.full_name% --env-vars - -Display a specific environment variable by specifying its name with the --env-var option: - - php %command.full_name% --env-var=APP_ENV - -Use the --tags option to display tagged public services grouped by tag: - - php %command.full_name% --tags - -Find all services with a specific tag by specifying the tag name with the --tag option: - - php %command.full_name% --tag=form.type - -Use the --parameters option to display all parameters: - - php %command.full_name% --parameters - -Display a specific parameter by specifying its name with the --parameter option: - - php %command.full_name% --parameter=kernel.debug - -By default, internal services are hidden. You can display them -using the --show-hidden flag: - - php %command.full_name% --show-hidden - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - $this->validateInput($input); - $kernel = $this->getApplication()->getKernel(); - $object = $this->getContainerBuilder($kernel); - - if ($input->getOption('env-vars')) { - $options = ['env-vars' => true]; - } elseif ($envVar = $input->getOption('env-var')) { - $options = ['env-vars' => true, 'name' => $envVar]; - } elseif ($input->getOption('types')) { - $options = []; - $options['filter'] = [$this, 'filterToServiceTypes']; - } elseif ($input->getOption('parameters')) { - $parameters = []; - foreach ($object->getParameterBag()->all() as $k => $v) { - $parameters[$k] = $object->resolveEnvPlaceholders($v); - } - $object = new ParameterBag($parameters); - $options = []; - } elseif ($parameter = $input->getOption('parameter')) { - $options = ['parameter' => $parameter]; - } elseif ($input->getOption('tags')) { - $options = ['group_by' => 'tags']; - } elseif ($tag = $input->getOption('tag')) { - $options = ['tag' => $tag]; - } elseif ($name = $input->getArgument('name')) { - $name = $this->findProperServiceName($input, $errorIo, $object, $name, $input->getOption('show-hidden')); - $options = ['id' => $name]; - } elseif ($input->getOption('deprecations')) { - $options = ['deprecations' => true]; - } else { - $options = []; - } - - $helper = new DescriptorHelper(); - $options['format'] = $input->getOption('format'); - $options['show_arguments'] = $input->getOption('show-arguments'); - $options['show_hidden'] = $input->getOption('show-hidden'); - $options['raw_text'] = $input->getOption('raw'); - $options['output'] = $io; - $options['is_debug'] = $kernel->isDebug(); - - try { - $helper->describe($io, $object, $options); - - if (isset($options['id']) && isset($kernel->getContainer()->getRemovedIds()[$options['id']])) { - $errorIo->note(sprintf('The "%s" service or alias has been removed or inlined when the container was compiled.', $options['id'])); - } - } catch (ServiceNotFoundException $e) { - if ('' !== $e->getId() && '@' === $e->getId()[0]) { - throw new ServiceNotFoundException($e->getId(), $e->getSourceId(), null, [substr($e->getId(), 1)]); - } - - throw $e; - } - - if (!$input->getArgument('name') && !$input->getOption('tag') && !$input->getOption('parameter') && !$input->getOption('env-vars') && !$input->getOption('env-var') && $input->isInteractive()) { - if ($input->getOption('tags')) { - $errorIo->comment('To search for a specific tag, re-run this command with a search term. (e.g. debug:container --tag=form.type)'); - } elseif ($input->getOption('parameters')) { - $errorIo->comment('To search for a specific parameter, re-run this command with a search term. (e.g. debug:container --parameter=kernel.debug)'); - } elseif (!$input->getOption('deprecations')) { - $errorIo->comment('To search for a specific service, re-run this command with a search term. (e.g. debug:container log)'); - } - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - - return; - } - - $kernel = $this->getApplication()->getKernel(); - $object = $this->getContainerBuilder($kernel); - - if ($input->mustSuggestArgumentValuesFor('name') - && !$input->getOption('tag') && !$input->getOption('tags') - && !$input->getOption('parameter') && !$input->getOption('parameters') - && !$input->getOption('env-var') && !$input->getOption('env-vars') - && !$input->getOption('types') && !$input->getOption('deprecations') - ) { - $suggestions->suggestValues($this->findServiceIdsContaining( - $object, - $input->getCompletionValue(), - (bool) $input->getOption('show-hidden') - )); - - return; - } - - if ($input->mustSuggestOptionValuesFor('tag')) { - $suggestions->suggestValues($object->findTags()); - - return; - } - - if ($input->mustSuggestOptionValuesFor('parameter')) { - $suggestions->suggestValues(array_keys($object->getParameterBag()->all())); - } - } - - /** - * Validates input arguments and options. - * - * @throws \InvalidArgumentException - */ - protected function validateInput(InputInterface $input) - { - $options = ['tags', 'tag', 'parameters', 'parameter']; - - $optionsCount = 0; - foreach ($options as $option) { - if ($input->getOption($option)) { - ++$optionsCount; - } - } - - $name = $input->getArgument('name'); - if ((null !== $name) && ($optionsCount > 0)) { - throw new InvalidArgumentException('The options tags, tag, parameters & parameter cannot be combined with the service name argument.'); - } elseif ((null === $name) && $optionsCount > 1) { - throw new InvalidArgumentException('The options tags, tag, parameters & parameter cannot be combined together.'); - } - } - - private function findProperServiceName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, string $name, bool $showHidden): string - { - $name = ltrim($name, '\\'); - - if ($builder->has($name) || !$input->isInteractive()) { - return $name; - } - - $matchingServices = $this->findServiceIdsContaining($builder, $name, $showHidden); - if (empty($matchingServices)) { - throw new InvalidArgumentException(sprintf('No services found that match "%s".', $name)); - } - - if (1 === \count($matchingServices)) { - return $matchingServices[0]; - } - - return $io->choice('Select one of the following services to display its information', $matchingServices); - } - - private function findServiceIdsContaining(ContainerBuilder $builder, string $name, bool $showHidden): array - { - $serviceIds = $builder->getServiceIds(); - $foundServiceIds = $foundServiceIdsIgnoringBackslashes = []; - foreach ($serviceIds as $serviceId) { - if (!$showHidden && str_starts_with($serviceId, '.')) { - continue; - } - if (false !== stripos(str_replace('\\', '', $serviceId), $name)) { - $foundServiceIdsIgnoringBackslashes[] = $serviceId; - } - if ('' === $name || false !== stripos($serviceId, $name)) { - $foundServiceIds[] = $serviceId; - } - } - - return $foundServiceIds ?: $foundServiceIdsIgnoringBackslashes; - } - - /** - * @internal - */ - public function filterToServiceTypes(string $serviceId): bool - { - // filter out things that could not be valid class names - if (!preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))^(?&V)(?:\\\\(?&V))*+(?: \$(?&V))?$/', $serviceId)) { - return false; - } - - // if the id has a \, assume it is a class - if (str_contains($serviceId, '\\')) { - return true; - } - - return class_exists($serviceId) || interface_exists($serviceId, false); - } -} diff --git a/lib/symfony/framework-bundle/Command/ContainerLintCommand.php b/lib/symfony/framework-bundle/Command/ContainerLintCommand.php deleted file mode 100644 index 337f1f420..000000000 --- a/lib/symfony/framework-bundle/Command/ContainerLintCommand.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Compiler\CheckTypeDeclarationsPass; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\HttpKernel\Kernel; - -final class ContainerLintCommand extends Command -{ - protected static $defaultName = 'lint:container'; - protected static $defaultDescription = 'Ensure that arguments injected into services match type declarations'; - - /** - * @var ContainerBuilder - */ - private $containerBuilder; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp('This command parses service definitions and ensures that injected values match the type declarations of each services\' class.') - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - try { - $container = $this->getContainerBuilder(); - } catch (RuntimeException $e) { - $errorIo->error($e->getMessage()); - - return 2; - } - - $container->setParameter('container.build_time', time()); - - try { - $container->compile(); - } catch (InvalidArgumentException $e) { - $errorIo->error($e->getMessage()); - - return 1; - } - - $io->success('The container was linted successfully: all services are injected with values that are compatible with their type declarations.'); - - return 0; - } - - private function getContainerBuilder(): ContainerBuilder - { - if ($this->containerBuilder) { - return $this->containerBuilder; - } - - $kernel = $this->getApplication()->getKernel(); - $kernelContainer = $kernel->getContainer(); - - if (!$kernel->isDebug() || !(new ConfigCache($kernelContainer->getParameter('debug.container.dump'), true))->isFresh()) { - if (!$kernel instanceof Kernel) { - throw new RuntimeException(sprintf('This command does not support the application kernel: "%s" does not extend "%s".', get_debug_type($kernel), Kernel::class)); - } - - $buildContainer = \Closure::bind(function (): ContainerBuilder { - $this->initializeBundles(); - - return $this->buildContainer(); - }, $kernel, \get_class($kernel)); - $container = $buildContainer(); - - $skippedIds = []; - } else { - if (!$kernelContainer instanceof Container) { - throw new RuntimeException(sprintf('This command does not support the application container: "%s" does not extend "%s".', get_debug_type($kernelContainer), Container::class)); - } - - (new XmlFileLoader($container = new ContainerBuilder($parameterBag = new EnvPlaceholderParameterBag()), new FileLocator()))->load($kernelContainer->getParameter('debug.container.dump')); - - $refl = new \ReflectionProperty($parameterBag, 'resolved'); - $refl->setAccessible(true); - $refl->setValue($parameterBag, true); - - $skippedIds = []; - foreach ($container->getServiceIds() as $serviceId) { - if (str_starts_with($serviceId, '.errored.')) { - $skippedIds[$serviceId] = true; - } - } - - $container->getCompilerPassConfig()->setBeforeOptimizationPasses([]); - $container->getCompilerPassConfig()->setOptimizationPasses([]); - $container->getCompilerPassConfig()->setBeforeRemovingPasses([]); - } - - $container->setParameter('container.build_hash', 'lint_container'); - $container->setParameter('container.build_id', 'lint_container'); - - $container->addCompilerPass(new CheckTypeDeclarationsPass(true, $skippedIds), PassConfig::TYPE_AFTER_REMOVING, -100); - - return $this->containerBuilder = $container; - } -} diff --git a/lib/symfony/framework-bundle/Command/DebugAutowiringCommand.php b/lib/symfony/framework-bundle/Command/DebugAutowiringCommand.php deleted file mode 100644 index e1e3c9534..000000000 --- a/lib/symfony/framework-bundle/Command/DebugAutowiringCommand.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\Descriptor; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * A console command for autowiring information. - * - * @author Ryan Weaver - * - * @internal - */ -class DebugAutowiringCommand extends ContainerDebugCommand -{ - protected static $defaultName = 'debug:autowiring'; - protected static $defaultDescription = 'List classes/interfaces you can use for autowiring'; - - private $supportsHref; - private $fileLinkFormatter; - - public function __construct(string $name = null, FileLinkFormatter $fileLinkFormatter = null) - { - $this->supportsHref = method_exists(OutputFormatterStyle::class, 'setHref'); - $this->fileLinkFormatter = $fileLinkFormatter; - parent::__construct($name); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('search', InputArgument::OPTIONAL, 'A search filter'), - new InputOption('all', null, InputOption::VALUE_NONE, 'Show also services that are not aliased'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays the classes and interfaces that -you can use as type-hints for autowiring: - - php %command.full_name% - -You can also pass a search term to filter the list: - - php %command.full_name% log - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - $builder = $this->getContainerBuilder($this->getApplication()->getKernel()); - $serviceIds = $builder->getServiceIds(); - $serviceIds = array_filter($serviceIds, [$this, 'filterToServiceTypes']); - - if ($search = $input->getArgument('search')) { - $searchNormalized = preg_replace('/[^a-zA-Z0-9\x7f-\xff $]++/', '', $search); - - $serviceIds = array_filter($serviceIds, function ($serviceId) use ($searchNormalized) { - return false !== stripos(str_replace('\\', '', $serviceId), $searchNormalized) && !str_starts_with($serviceId, '.'); - }); - - if (empty($serviceIds)) { - $errorIo->error(sprintf('No autowirable classes or interfaces found matching "%s"', $search)); - - return 1; - } - } - - uasort($serviceIds, 'strnatcmp'); - - $io->title('Autowirable Types'); - $io->text('The following classes & interfaces can be used as type-hints when autowiring:'); - if ($search) { - $io->text(sprintf('(only showing classes/interfaces matching %s)', $search)); - } - $hasAlias = []; - $all = $input->getOption('all'); - $previousId = '-'; - $serviceIdsNb = 0; - foreach ($serviceIds as $serviceId) { - $text = []; - $resolvedServiceId = $serviceId; - if (!str_starts_with($serviceId, $previousId)) { - $text[] = ''; - if ('' !== $description = Descriptor::getClassDescription($serviceId, $resolvedServiceId)) { - if (isset($hasAlias[$serviceId])) { - continue; - } - $text[] = $description; - } - $previousId = $serviceId.' $'; - } - - $serviceLine = sprintf('%s', $serviceId); - if ($this->supportsHref && '' !== $fileLink = $this->getFileLink($serviceId)) { - $serviceLine = sprintf('%s', $fileLink, $serviceId); - } - - if ($builder->hasAlias($serviceId)) { - $hasAlias[$serviceId] = true; - $serviceAlias = $builder->getAlias($serviceId); - $serviceLine .= ' ('.$serviceAlias.')'; - - if ($serviceAlias->isDeprecated()) { - $serviceLine .= ' - deprecated'; - } - } elseif (!$all) { - ++$serviceIdsNb; - continue; - } - $text[] = $serviceLine; - $io->text($text); - } - - $io->newLine(); - - if (0 < $serviceIdsNb) { - $io->text(sprintf('%s more concrete service%s would be displayed when adding the "--all" option.', $serviceIdsNb, $serviceIdsNb > 1 ? 's' : '')); - } - if ($all) { - $io->text('Pro-tip: use interfaces in your type-hints instead of classes to benefit from the dependency inversion principle.'); - } - - $io->newLine(); - - return 0; - } - - private function getFileLink(string $class): string - { - if (null === $this->fileLinkFormatter - || (null === $r = $this->getContainerBuilder($this->getApplication()->getKernel())->getReflectionClass($class, false))) { - return ''; - } - - return (string) $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('search')) { - $builder = $this->getContainerBuilder($this->getApplication()->getKernel()); - - $suggestions->suggestValues(array_filter($builder->getServiceIds(), [$this, 'filterToServiceTypes'])); - } - } -} diff --git a/lib/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php b/lib/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php deleted file mode 100644 index cfc9ae2fb..000000000 --- a/lib/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\Service\ServiceProviderInterface; - -/** - * A console command for retrieving information about event dispatcher. - * - * @author Matthieu Auger - * - * @final - */ -class EventDispatcherDebugCommand extends Command -{ - private const DEFAULT_DISPATCHER = 'event_dispatcher'; - - protected static $defaultName = 'debug:event-dispatcher'; - protected static $defaultDescription = 'Display configured listeners for an application'; - private $dispatchers; - - public function __construct(ContainerInterface $dispatchers) - { - parent::__construct(); - - $this->dispatchers = $dispatchers; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('event', InputArgument::OPTIONAL, 'An event name or a part of the event name'), - new InputOption('dispatcher', null, InputOption::VALUE_REQUIRED, 'To view events of a specific event dispatcher', self::DEFAULT_DISPATCHER), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays all configured listeners: - - php %command.full_name% - -To get specific listeners for an event, specify its name: - - php %command.full_name% kernel.request -EOF - ) - ; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $options = []; - $dispatcherServiceName = $input->getOption('dispatcher'); - if (!$this->dispatchers->has($dispatcherServiceName)) { - $io->getErrorStyle()->error(sprintf('Event dispatcher "%s" is not available.', $dispatcherServiceName)); - - return 1; - } - - $dispatcher = $this->dispatchers->get($dispatcherServiceName); - - if ($event = $input->getArgument('event')) { - if ($dispatcher->hasListeners($event)) { - $options = ['event' => $event]; - } else { - // if there is no direct match, try find partial matches - $events = $this->searchForEvent($dispatcher, $event); - if (0 === \count($events)) { - $io->getErrorStyle()->warning(sprintf('The event "%s" does not have any registered listeners.', $event)); - - return 0; - } elseif (1 === \count($events)) { - $options = ['event' => $events[array_key_first($events)]]; - } else { - $options = ['events' => $events]; - } - } - } - - $helper = new DescriptorHelper(); - - if (self::DEFAULT_DISPATCHER !== $dispatcherServiceName) { - $options['dispatcher_service_name'] = $dispatcherServiceName; - } - - $options['format'] = $input->getOption('format'); - $options['raw_text'] = $input->getOption('raw'); - $options['output'] = $io; - $helper->describe($io, $dispatcher, $options); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('event')) { - $dispatcherServiceName = $input->getOption('dispatcher'); - if ($this->dispatchers->has($dispatcherServiceName)) { - $dispatcher = $this->dispatchers->get($dispatcherServiceName); - $suggestions->suggestValues(array_keys($dispatcher->getListeners())); - } - - return; - } - - if ($input->mustSuggestOptionValuesFor('dispatcher')) { - if ($this->dispatchers instanceof ServiceProviderInterface) { - $suggestions->suggestValues(array_keys($this->dispatchers->getProvidedServices())); - } - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues((new DescriptorHelper())->getFormats()); - } - } - - private function searchForEvent(EventDispatcherInterface $dispatcher, string $needle): array - { - $output = []; - $lcNeedle = strtolower($needle); - $allEvents = array_keys($dispatcher->getListeners()); - foreach ($allEvents as $event) { - if (str_contains(strtolower($event), $lcNeedle)) { - $output[] = $event; - } - } - - return $output; - } -} diff --git a/lib/symfony/framework-bundle/Command/RouterDebugCommand.php b/lib/symfony/framework-bundle/Command/RouterDebugCommand.php deleted file mode 100644 index cf929f987..000000000 --- a/lib/symfony/framework-bundle/Command/RouterDebugCommand.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RouterInterface; - -/** - * A console command for retrieving information about routes. - * - * @author Fabien Potencier - * @author Tobias Schultze - * - * @final - */ -class RouterDebugCommand extends Command -{ - use BuildDebugContainerTrait; - - protected static $defaultName = 'debug:router'; - protected static $defaultDescription = 'Display current routes for an application'; - private $router; - private $fileLinkFormatter; - - public function __construct(RouterInterface $router, FileLinkFormatter $fileLinkFormatter = null) - { - parent::__construct(); - - $this->router = $router; - $this->fileLinkFormatter = $fileLinkFormatter; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'A route name'), - new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw route(s)'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% displays the configured routes: - - php %command.full_name% - -EOF - ) - ; - } - - /** - * {@inheritdoc} - * - * @throws InvalidArgumentException When route does not exist - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $name = $input->getArgument('name'); - $helper = new DescriptorHelper($this->fileLinkFormatter); - $routes = $this->router->getRouteCollection(); - $container = null; - if ($this->fileLinkFormatter) { - $container = function () { - return $this->getContainerBuilder($this->getApplication()->getKernel()); - }; - } - - if ($name) { - $route = $routes->get($name); - $matchingRoutes = $this->findRouteNameContaining($name, $routes); - - if (!$input->isInteractive() && !$route && \count($matchingRoutes) > 1) { - $helper->describe($io, $this->findRouteContaining($name, $routes), [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - 'show_controllers' => $input->getOption('show-controllers'), - 'output' => $io, - ]); - - return 0; - } - - if (!$route && $matchingRoutes) { - $default = 1 === \count($matchingRoutes) ? $matchingRoutes[0] : null; - $name = $io->choice('Select one of the matching routes', $matchingRoutes, $default); - $route = $routes->get($name); - } - - if (!$route) { - throw new InvalidArgumentException(sprintf('The route "%s" does not exist.', $name)); - } - - $helper->describe($io, $route, [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - 'name' => $name, - 'output' => $io, - 'container' => $container, - ]); - } else { - $helper->describe($io, $routes, [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - 'show_controllers' => $input->getOption('show-controllers'), - 'output' => $io, - 'container' => $container, - ]); - } - - return 0; - } - - private function findRouteNameContaining(string $name, RouteCollection $routes): array - { - $foundRoutesNames = []; - foreach ($routes as $routeName => $route) { - if (false !== stripos($routeName, $name)) { - $foundRoutesNames[] = $routeName; - } - } - - return $foundRoutesNames; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->router->getRouteCollection()->all())); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - } - } - - private function findRouteContaining(string $name, RouteCollection $routes): RouteCollection - { - $foundRoutes = new RouteCollection(); - foreach ($routes as $routeName => $route) { - if (false !== stripos($routeName, $name)) { - $foundRoutes->add($routeName, $route); - } - } - - return $foundRoutes; - } -} diff --git a/lib/symfony/framework-bundle/Command/RouterMatchCommand.php b/lib/symfony/framework-bundle/Command/RouterMatchCommand.php deleted file mode 100644 index 6cceb945d..000000000 --- a/lib/symfony/framework-bundle/Command/RouterMatchCommand.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; -use Symfony\Component\Routing\RouterInterface; - -/** - * A console command to test route matching. - * - * @author Fabien Potencier - * - * @final - */ -class RouterMatchCommand extends Command -{ - protected static $defaultName = 'router:match'; - protected static $defaultDescription = 'Help debug routes by simulating a path info match'; - - private $router; - private $expressionLanguageProviders; - - /** - * @param iterable $expressionLanguageProviders - */ - public function __construct(RouterInterface $router, iterable $expressionLanguageProviders = []) - { - parent::__construct(); - - $this->router = $router; - $this->expressionLanguageProviders = $expressionLanguageProviders; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('path_info', InputArgument::REQUIRED, 'A path info'), - new InputOption('method', null, InputOption::VALUE_REQUIRED, 'Set the HTTP method'), - new InputOption('scheme', null, InputOption::VALUE_REQUIRED, 'Set the URI scheme (usually http or https)'), - new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Set the URI host'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% shows which routes match a given request and which don't and for what reason: - - php %command.full_name% /foo - -or - - php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $context = $this->router->getContext(); - if (null !== $method = $input->getOption('method')) { - $context->setMethod($method); - } - if (null !== $scheme = $input->getOption('scheme')) { - $context->setScheme($scheme); - } - if (null !== $host = $input->getOption('host')) { - $context->setHost($host); - } - - $matcher = new TraceableUrlMatcher($this->router->getRouteCollection(), $context); - foreach ($this->expressionLanguageProviders as $provider) { - $matcher->addExpressionLanguageProvider($provider); - } - - $traces = $matcher->getTraces($input->getArgument('path_info')); - - $io->newLine(); - - $matches = false; - foreach ($traces as $trace) { - if (TraceableUrlMatcher::ROUTE_ALMOST_MATCHES == $trace['level']) { - $io->text(sprintf('Route "%s" almost matches but %s', $trace['name'], lcfirst($trace['log']))); - } elseif (TraceableUrlMatcher::ROUTE_MATCHES == $trace['level']) { - $io->success(sprintf('Route "%s" matches', $trace['name'])); - - $routerDebugCommand = $this->getApplication()->find('debug:router'); - $routerDebugCommand->run(new ArrayInput(['name' => $trace['name']]), $output); - - $matches = true; - } elseif ($input->getOption('verbose')) { - $io->text(sprintf('Route "%s" does not match: %s', $trace['name'], $trace['log'])); - } - } - - if (!$matches) { - $io->error(sprintf('None of the routes match the path "%s"', $input->getArgument('path_info'))); - - return 1; - } - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php b/lib/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php deleted file mode 100644 index 0e07d88fa..000000000 --- a/lib/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsDecryptToLocalCommand extends Command -{ - protected static $defaultName = 'secrets:decrypt-to-local'; - protected static $defaultDescription = 'Decrypt all secrets and stores them in the local vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('force', 'f', InputOption::VALUE_NONE, 'Force overriding of secrets that already exist in the local vault') - ->setHelp(<<<'EOF' -The %command.name% command decrypts all secrets and copies them in the local vault. - - %command.full_name% - -When the option --force is provided, secrets that already exist in the local vault are overriden. - - %command.full_name% --force -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - - if (null === $this->localVault) { - $io->error('The local vault is disabled.'); - - return 1; - } - - $secrets = $this->vault->list(true); - - $io->comment(sprintf('%d secret%s found in the vault.', \count($secrets), 1 !== \count($secrets) ? 's' : '')); - - $skipped = 0; - if (!$input->getOption('force')) { - foreach ($this->localVault->list() as $k => $v) { - if (isset($secrets[$k])) { - ++$skipped; - unset($secrets[$k]); - } - } - } - - if ($skipped > 0) { - $io->warning([ - sprintf('%d secret%s already overridden in the local vault and will be skipped.', $skipped, 1 !== $skipped ? 's are' : ' is'), - 'Use the --force flag to override these.', - ]); - } - - foreach ($secrets as $k => $v) { - if (null === $v) { - $io->error($this->vault->getLastMessage() ?? sprintf('Secret "%s" has been skipped as there was an error reading it.', $k)); - continue; - } - - $this->localVault->seal($k, $v); - $io->note($this->localVault->getLastMessage()); - } - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php b/lib/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php deleted file mode 100644 index 79f51c51a..000000000 --- a/lib/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsEncryptFromLocalCommand extends Command -{ - protected static $defaultName = 'secrets:encrypt-from-local'; - protected static $defaultDescription = 'Encrypt all local secrets to the vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command encrypts all locally overridden secrets to the vault. - - %command.full_name% -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - - if (null === $this->localVault) { - $io->error('The local vault is disabled.'); - - return 1; - } - - foreach ($this->vault->list(true) as $name => $value) { - $localValue = $this->localVault->reveal($name); - - if (null !== $localValue && $value !== $localValue) { - $this->vault->seal($name, $localValue); - } elseif (null !== $message = $this->localVault->getLastMessage()) { - $io->error($message); - - return 1; - } - } - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php b/lib/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php deleted file mode 100644 index a9440b4c8..000000000 --- a/lib/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsGenerateKeysCommand extends Command -{ - protected static $defaultName = 'secrets:generate-keys'; - protected static $defaultDescription = 'Generate new encryption keys'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') - ->addOption('rotate', 'r', InputOption::VALUE_NONE, 'Re-encrypt existing secrets with the newly generated keys.') - ->setHelp(<<<'EOF' -The %command.name% command generates a new encryption key. - - %command.full_name% - -If encryption keys already exist, the command must be called with -the --rotate option in order to override those keys and re-encrypt -existing secrets. - - %command.full_name% --rotate -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - $vault = $input->getOption('local') ? $this->localVault : $this->vault; - - if (null === $vault) { - $io->success('The local vault is disabled.'); - - return 1; - } - - if (!$input->getOption('rotate')) { - if ($vault->generateKeys()) { - $io->success($vault->getLastMessage()); - - if ($this->vault === $vault) { - $io->caution('DO NOT COMMIT THE DECRYPTION KEY FOR THE PROD ENVIRONMENT⚠️'); - } - - return 0; - } - - $io->warning($vault->getLastMessage()); - - return 1; - } - - $secrets = []; - foreach ($vault->list(true) as $name => $value) { - if (null === $value) { - $io->error($vault->getLastMessage()); - - return 1; - } - - $secrets[$name] = $value; - } - - if (!$vault->generateKeys(true)) { - $io->warning($vault->getLastMessage()); - - return 1; - } - - $io->success($vault->getLastMessage()); - - if ($secrets) { - foreach ($secrets as $name => $value) { - $vault->seal($name, $value); - } - - $io->comment('Existing secrets have been rotated to the new keys.'); - } - - if ($this->vault === $vault) { - $io->caution('DO NOT COMMIT THE DECRYPTION KEY FOR THE PROD ENVIRONMENT⚠️'); - } - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/SecretsListCommand.php b/lib/symfony/framework-bundle/Command/SecretsListCommand.php deleted file mode 100644 index 0b13e0cf2..000000000 --- a/lib/symfony/framework-bundle/Command/SecretsListCommand.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\Dumper; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsListCommand extends Command -{ - protected static $defaultName = 'secrets:list'; - protected static $defaultDescription = 'List all secrets'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('reveal', 'r', InputOption::VALUE_NONE, 'Display decrypted values alongside names') - ->setHelp(<<<'EOF' -The %command.name% command list all stored secrets. - - %command.full_name% - -When the option --reveal is provided, the decrypted secrets are also displayed. - - %command.full_name% --reveal -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - - $io->comment('Use "%env()%" to reference a secret in a config file.'); - - if (!$reveal = $input->getOption('reveal')) { - $io->comment(sprintf('To reveal the secrets run php %s %s --reveal', $_SERVER['PHP_SELF'], $this->getName())); - } - - $secrets = $this->vault->list($reveal); - $localSecrets = null !== $this->localVault ? $this->localVault->list($reveal) : null; - - $rows = []; - - $dump = new Dumper($output); - $dump = static function (?string $v) use ($dump) { - return null === $v ? '******' : $dump($v); - }; - - foreach ($secrets as $name => $value) { - $rows[$name] = [$name, $dump($value)]; - } - - if (null !== $message = $this->vault->getLastMessage()) { - $io->comment($message); - } - - foreach ($localSecrets ?? [] as $name => $value) { - if (isset($rows[$name])) { - $rows[$name][] = $dump($value); - } - } - - if (null !== $this->localVault && null !== $message = $this->localVault->getLastMessage()) { - $io->comment($message); - } - - (new SymfonyStyle($input, $output)) - ->table(['Secret', 'Value'] + (null !== $localSecrets ? [2 => 'Local Value'] : []), $rows); - - $io->comment("Local values override secret values.\nUse secrets:set --local to define them."); - - return 0; - } -} diff --git a/lib/symfony/framework-bundle/Command/SecretsRemoveCommand.php b/lib/symfony/framework-bundle/Command/SecretsRemoveCommand.php deleted file mode 100644 index 0451ef300..000000000 --- a/lib/symfony/framework-bundle/Command/SecretsRemoveCommand.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsRemoveCommand extends Command -{ - protected static $defaultName = 'secrets:remove'; - protected static $defaultDescription = 'Remove a secret from the vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('name', InputArgument::REQUIRED, 'The name of the secret') - ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') - ->setHelp(<<<'EOF' -The %command.name% command removes a secret from the vault. - - %command.full_name% -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - $vault = $input->getOption('local') ? $this->localVault : $this->vault; - - if (null === $vault) { - $io->success('The local vault is disabled.'); - - return 1; - } - - if ($vault->remove($name = $input->getArgument('name'))) { - $io->success($vault->getLastMessage() ?? 'Secret was removed from the vault.'); - } else { - $io->comment($vault->getLastMessage() ?? 'Secret was not found in the vault.'); - } - - if ($this->vault === $vault && null !== $this->localVault->reveal($name)) { - $io->comment('Note that this secret is overridden in the local vault.'); - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if (!$input->mustSuggestArgumentValuesFor('name')) { - return; - } - - $vaultKeys = array_keys($this->vault->list(false)); - if ($input->getOption('local')) { - if (null === $this->localVault) { - return; - } - $vaultKeys = array_intersect($vaultKeys, array_keys($this->localVault->list(false))); - } - - $suggestions->suggestValues($vaultKeys); - } -} diff --git a/lib/symfony/framework-bundle/Command/SecretsSetCommand.php b/lib/symfony/framework-bundle/Command/SecretsSetCommand.php deleted file mode 100644 index 412247da7..000000000 --- a/lib/symfony/framework-bundle/Command/SecretsSetCommand.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsSetCommand extends Command -{ - protected static $defaultName = 'secrets:set'; - protected static $defaultDescription = 'Set a secret in the vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('name', InputArgument::REQUIRED, 'The name of the secret') - ->addArgument('file', InputArgument::OPTIONAL, 'A file where to read the secret from or "-" for reading from STDIN') - ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') - ->addOption('random', 'r', InputOption::VALUE_OPTIONAL, 'Generate a random value.', false) - ->setHelp(<<<'EOF' -The %command.name% command stores a secret in the vault. - - %command.full_name% - -To reference secrets in services.yaml or any other config -files, use "%env()%". - -By default, the secret value should be entered interactively. -Alternatively, provide a file where to read the secret from: - - php %command.full_name% filename - -Use "-" as a file name to read from STDIN: - - cat filename | php %command.full_name% - - -Use --local to override secrets for local needs. -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output; - $io = new SymfonyStyle($input, $errOutput); - $name = $input->getArgument('name'); - $vault = $input->getOption('local') ? $this->localVault : $this->vault; - - if (null === $vault) { - $io->error('The local vault is disabled.'); - - return 1; - } - - if ($this->localVault === $vault && !\array_key_exists($name, $this->vault->list())) { - $io->error(sprintf('Secret "%s" does not exist in the vault, you cannot override it locally.', $name)); - - return 1; - } - - if (0 < $random = $input->getOption('random') ?? 16) { - $value = strtr(substr(base64_encode(random_bytes($random)), 0, $random), '+/', '-_'); - } elseif (!$file = $input->getArgument('file')) { - $value = $io->askHidden('Please type the secret value'); - - if (null === $value) { - $io->warning('No value provided: using empty string'); - $value = ''; - } - } elseif ('-' === $file) { - $value = file_get_contents('php://stdin'); - } elseif (is_file($file) && is_readable($file)) { - $value = file_get_contents($file); - } elseif (!is_file($file)) { - throw new \InvalidArgumentException(sprintf('File not found: "%s".', $file)); - } elseif (!is_readable($file)) { - throw new \InvalidArgumentException(sprintf('File is not readable: "%s".', $file)); - } - - if ($vault->generateKeys()) { - $io->success($vault->getLastMessage()); - - if ($this->vault === $vault) { - $io->caution('DO NOT COMMIT THE DECRYPTION KEY FOR THE PROD ENVIRONMENT⚠️'); - } - } - - $vault->seal($name, $value); - - $io->success($vault->getLastMessage() ?? 'Secret was successfully stored in the vault.'); - - if (0 < $random) { - $errOutput->write(' // The generated random value is: '); - $output->write($value); - $errOutput->writeln(''); - $io->newLine(); - } - - if ($this->vault === $vault && null !== $this->localVault->reveal($name)) { - $io->comment('Note that this secret is overridden in the local vault.'); - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->vault->list(false))); - } - } -} diff --git a/lib/symfony/framework-bundle/Command/TranslationDebugCommand.php b/lib/symfony/framework-bundle/Command/TranslationDebugCommand.php deleted file mode 100644 index 006fd2505..000000000 --- a/lib/symfony/framework-bundle/Command/TranslationDebugCommand.php +++ /dev/null @@ -1,418 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\Translation\Catalogue\MergeOperation; -use Symfony\Component\Translation\DataCollectorTranslator; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\LoggingTranslator; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Translator; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Helps finding unused or missing translation messages in a given locale - * and comparing them with the fallback ones. - * - * @author Florian Voutzinos - * - * @final - */ -class TranslationDebugCommand extends Command -{ - public const EXIT_CODE_GENERAL_ERROR = 64; - public const EXIT_CODE_MISSING = 65; - public const EXIT_CODE_UNUSED = 66; - public const EXIT_CODE_FALLBACK = 68; - public const MESSAGE_MISSING = 0; - public const MESSAGE_UNUSED = 1; - public const MESSAGE_EQUALS_FALLBACK = 2; - - protected static $defaultName = 'debug:translation'; - protected static $defaultDescription = 'Display translation messages information'; - - private $translator; - private $reader; - private $extractor; - private $defaultTransPath; - private $defaultViewsPath; - private $transPaths; - private $codePaths; - private $enabledLocales; - - public function __construct(TranslatorInterface $translator, TranslationReaderInterface $reader, ExtractorInterface $extractor, string $defaultTransPath = null, string $defaultViewsPath = null, array $transPaths = [], array $codePaths = [], array $enabledLocales = []) - { - parent::__construct(); - - $this->translator = $translator; - $this->reader = $reader; - $this->extractor = $extractor; - $this->defaultTransPath = $defaultTransPath; - $this->defaultViewsPath = $defaultViewsPath; - $this->transPaths = $transPaths; - $this->codePaths = $codePaths; - $this->enabledLocales = $enabledLocales; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), - new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'), - new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'), - new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Display only missing messages'), - new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Display only unused messages'), - new InputOption('all', null, InputOption::VALUE_NONE, 'Load messages from all registered bundles'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command helps finding unused or missing translation -messages and comparing them with the fallback ones by inspecting the -templates and translation files of a given bundle or the default translations directory. - -You can display information about bundle translations in a specific locale: - - php %command.full_name% en AcmeDemoBundle - -You can also specify a translation domain for the search: - - php %command.full_name% --domain=messages en AcmeDemoBundle - -You can only display missing messages: - - php %command.full_name% --only-missing en AcmeDemoBundle - -You can only display unused messages: - - php %command.full_name% --only-unused en AcmeDemoBundle - -You can display information about application translations in a specific locale: - - php %command.full_name% en - -You can display information about translations in all registered bundles in a specific locale: - - php %command.full_name% --all en - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $locale = $input->getArgument('locale'); - $domain = $input->getOption('domain'); - - $exitCode = self::SUCCESS; - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - // Define Root Paths - $transPaths = $this->getRootTransPaths(); - $codePaths = $this->getRootCodePaths($kernel); - - // Override with provided Bundle info - if (null !== $input->getArgument('bundle')) { - try { - $bundle = $kernel->getBundle($input->getArgument('bundle')); - $bundleDir = $bundle->getPath(); - $transPaths = [is_dir($bundleDir.'/Resources/translations') ? $bundleDir.'/Resources/translations' : $bundleDir.'/translations']; - $codePaths = [is_dir($bundleDir.'/Resources/views') ? $bundleDir.'/Resources/views' : $bundleDir.'/templates']; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - } catch (\InvalidArgumentException $e) { - // such a bundle does not exist, so treat the argument as path - $path = $input->getArgument('bundle'); - - $transPaths = [$path.'/translations']; - $codePaths = [$path.'/templates']; - - if (!is_dir($transPaths[0])) { - throw new InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0])); - } - } - } elseif ($input->getOption('all')) { - foreach ($kernel->getBundles() as $bundle) { - $bundleDir = $bundle->getPath(); - $transPaths[] = is_dir($bundleDir.'/Resources/translations') ? $bundleDir.'/Resources/translations' : $bundle->getPath().'/translations'; - $codePaths[] = is_dir($bundleDir.'/Resources/views') ? $bundleDir.'/Resources/views' : $bundle->getPath().'/templates'; - } - } - - // Extract used messages - $extractedCatalogue = $this->extractMessages($locale, $codePaths); - - // Load defined messages - $currentCatalogue = $this->loadCurrentMessages($locale, $transPaths); - - // Merge defined and extracted messages to get all message ids - $mergeOperation = new MergeOperation($extractedCatalogue, $currentCatalogue); - $allMessages = $mergeOperation->getResult()->all($domain); - if (null !== $domain) { - $allMessages = [$domain => $allMessages]; - } - - // No defined or extracted messages - if (empty($allMessages) || null !== $domain && empty($allMessages[$domain])) { - $outputMessage = sprintf('No defined or extracted messages for locale "%s"', $locale); - - if (null !== $domain) { - $outputMessage .= sprintf(' and domain "%s"', $domain); - } - - $io->getErrorStyle()->warning($outputMessage); - - return self::EXIT_CODE_GENERAL_ERROR; - } - - // Load the fallback catalogues - $fallbackCatalogues = $this->loadFallbackCatalogues($locale, $transPaths); - - // Display header line - $headers = ['State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale)]; - foreach ($fallbackCatalogues as $fallbackCatalogue) { - $headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale()); - } - $rows = []; - // Iterate all message ids and determine their state - foreach ($allMessages as $domain => $messages) { - foreach (array_keys($messages) as $messageId) { - $value = $currentCatalogue->get($messageId, $domain); - $states = []; - - if ($extractedCatalogue->defines($messageId, $domain)) { - if (!$currentCatalogue->defines($messageId, $domain)) { - $states[] = self::MESSAGE_MISSING; - - if (!$input->getOption('only-unused')) { - $exitCode = $exitCode | self::EXIT_CODE_MISSING; - } - } - } elseif ($currentCatalogue->defines($messageId, $domain)) { - $states[] = self::MESSAGE_UNUSED; - - if (!$input->getOption('only-missing')) { - $exitCode = $exitCode | self::EXIT_CODE_UNUSED; - } - } - - if (!\in_array(self::MESSAGE_UNUSED, $states) && $input->getOption('only-unused') - || !\in_array(self::MESSAGE_MISSING, $states) && $input->getOption('only-missing') - ) { - continue; - } - - foreach ($fallbackCatalogues as $fallbackCatalogue) { - if ($fallbackCatalogue->defines($messageId, $domain) && $value === $fallbackCatalogue->get($messageId, $domain)) { - $states[] = self::MESSAGE_EQUALS_FALLBACK; - - $exitCode = $exitCode | self::EXIT_CODE_FALLBACK; - - break; - } - } - - $row = [$this->formatStates($states), $domain, $this->formatId($messageId), $this->sanitizeString($value)]; - foreach ($fallbackCatalogues as $fallbackCatalogue) { - $row[] = $this->sanitizeString($fallbackCatalogue->get($messageId, $domain)); - } - - $rows[] = $row; - } - } - - $io->table($headers, $rows); - - return $exitCode; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('locale')) { - $suggestions->suggestValues($this->enabledLocales); - - return; - } - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - if ($input->mustSuggestArgumentValuesFor('bundle')) { - $availableBundles = []; - foreach ($kernel->getBundles() as $bundle) { - $availableBundles[] = $bundle->getName(); - - if ($extension = $bundle->getContainerExtension()) { - $availableBundles[] = $extension->getAlias(); - } - } - - $suggestions->suggestValues($availableBundles); - - return; - } - - if ($input->mustSuggestOptionValuesFor('domain')) { - $locale = $input->getArgument('locale'); - - $mergeOperation = new MergeOperation( - $this->extractMessages($locale, $this->getRootCodePaths($kernel)), - $this->loadCurrentMessages($locale, $this->getRootTransPaths()) - ); - - $suggestions->suggestValues($mergeOperation->getDomains()); - } - } - - private function formatState(int $state): string - { - if (self::MESSAGE_MISSING === $state) { - return ' missing '; - } - - if (self::MESSAGE_UNUSED === $state) { - return ' unused '; - } - - if (self::MESSAGE_EQUALS_FALLBACK === $state) { - return ' fallback '; - } - - return $state; - } - - private function formatStates(array $states): string - { - $result = []; - foreach ($states as $state) { - $result[] = $this->formatState($state); - } - - return implode(' ', $result); - } - - private function formatId(string $id): string - { - return sprintf('%s', $id); - } - - private function sanitizeString(string $string, int $length = 40): string - { - $string = trim(preg_replace('/\s+/', ' ', $string)); - - if (false !== $encoding = mb_detect_encoding($string, null, true)) { - if (mb_strlen($string, $encoding) > $length) { - return mb_substr($string, 0, $length - 3, $encoding).'...'; - } - } elseif (\strlen($string) > $length) { - return substr($string, 0, $length - 3).'...'; - } - - return $string; - } - - private function extractMessages(string $locale, array $transPaths): MessageCatalogue - { - $extractedCatalogue = new MessageCatalogue($locale); - foreach ($transPaths as $path) { - if (is_dir($path) || is_file($path)) { - $this->extractor->extract($path, $extractedCatalogue); - } - } - - return $extractedCatalogue; - } - - private function loadCurrentMessages(string $locale, array $transPaths): MessageCatalogue - { - $currentCatalogue = new MessageCatalogue($locale); - foreach ($transPaths as $path) { - if (is_dir($path)) { - $this->reader->read($path, $currentCatalogue); - } - } - - return $currentCatalogue; - } - - /** - * @return MessageCatalogue[] - */ - private function loadFallbackCatalogues(string $locale, array $transPaths): array - { - $fallbackCatalogues = []; - if ($this->translator instanceof Translator || $this->translator instanceof DataCollectorTranslator || $this->translator instanceof LoggingTranslator) { - foreach ($this->translator->getFallbackLocales() as $fallbackLocale) { - if ($fallbackLocale === $locale) { - continue; - } - - $fallbackCatalogue = new MessageCatalogue($fallbackLocale); - foreach ($transPaths as $path) { - if (is_dir($path)) { - $this->reader->read($path, $fallbackCatalogue); - } - } - $fallbackCatalogues[] = $fallbackCatalogue; - } - } - - return $fallbackCatalogues; - } - - private function getRootTransPaths(): array - { - $transPaths = $this->transPaths; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - - return $transPaths; - } - - private function getRootCodePaths(KernelInterface $kernel): array - { - $codePaths = $this->codePaths; - $codePaths[] = $kernel->getProjectDir().'/src'; - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - - return $codePaths; - } -} diff --git a/lib/symfony/framework-bundle/Command/TranslationUpdateCommand.php b/lib/symfony/framework-bundle/Command/TranslationUpdateCommand.php deleted file mode 100644 index f0e1dc887..000000000 --- a/lib/symfony/framework-bundle/Command/TranslationUpdateCommand.php +++ /dev/null @@ -1,473 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\Translation\Catalogue\MergeOperation; -use Symfony\Component\Translation\Catalogue\TargetOperation; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Writer\TranslationWriterInterface; - -/** - * A command that parses templates to extract translation messages and adds them - * into the translation files. - * - * @author Michel Salib - * - * @final - */ -class TranslationUpdateCommand extends Command -{ - private const ASC = 'asc'; - private const DESC = 'desc'; - private const SORT_ORDERS = [self::ASC, self::DESC]; - private const FORMATS = [ - 'xlf12' => ['xlf', '1.2'], - 'xlf20' => ['xlf', '2.0'], - ]; - - protected static $defaultName = 'translation:extract|translation:update'; - protected static $defaultDescription = 'Extract missing translations keys from code to translation files.'; - - private $writer; - private $reader; - private $extractor; - private $defaultLocale; - private $defaultTransPath; - private $defaultViewsPath; - private $transPaths; - private $codePaths; - private $enabledLocales; - - public function __construct(TranslationWriterInterface $writer, TranslationReaderInterface $reader, ExtractorInterface $extractor, string $defaultLocale, string $defaultTransPath = null, string $defaultViewsPath = null, array $transPaths = [], array $codePaths = [], array $enabledLocales = []) - { - parent::__construct(); - - $this->writer = $writer; - $this->reader = $reader; - $this->extractor = $extractor; - $this->defaultLocale = $defaultLocale; - $this->defaultTransPath = $defaultTransPath; - $this->defaultViewsPath = $defaultViewsPath; - $this->transPaths = $transPaths; - $this->codePaths = $codePaths; - $this->enabledLocales = $enabledLocales; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), - new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'), - new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'), - new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format (deprecated)'), - new InputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'xlf12'), - new InputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'), - new InputOption('force', null, InputOption::VALUE_NONE, 'Should the extract be done'), - new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'), - new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to extract'), - new InputOption('xliff-version', null, InputOption::VALUE_OPTIONAL, 'Override the default xliff version (deprecated)'), - new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically', 'asc'), - new InputOption('as-tree', null, InputOption::VALUE_OPTIONAL, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command extracts translation strings from templates -of a given bundle or the default translations directory. It can display them or merge -the new ones into the translation files. - -When new translation strings are found it can automatically add a prefix to the translation -message. - -Example running against a Bundle (AcmeBundle) - - php %command.full_name% --dump-messages en AcmeBundle - php %command.full_name% --force --prefix="new_" fr AcmeBundle - -Example running against default messages directory - - php %command.full_name% --dump-messages en - php %command.full_name% --force --prefix="new_" fr - -You can sort the output with the --sort flag: - - php %command.full_name% --dump-messages --sort=asc en AcmeBundle - php %command.full_name% --dump-messages --sort=desc fr - -You can dump a tree-like structure using the yaml format with --as-tree flag: - - php %command.full_name% --force --format=yaml --as-tree=3 en AcmeBundle - php %command.full_name% --force --format=yaml --sort=asc --as-tree=3 fr - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $output instanceof ConsoleOutputInterface ? new SymfonyStyle($input, $output->getErrorOutput()) : $io; - - if ('translation:update' === $input->getFirstArgument()) { - $errorIo->caution('Command "translation:update" is deprecated since version 5.4 and will be removed in Symfony 6.0. Use "translation:extract" instead.'); - } - - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - // check presence of force or dump-message - if (true !== $input->getOption('force') && true !== $input->getOption('dump-messages')) { - $errorIo->error('You must choose one of --force or --dump-messages'); - - return 1; - } - - $format = $input->getOption('output-format') ?: $input->getOption('format'); - $xliffVersion = $input->getOption('xliff-version') ?? '1.2'; - - if ($input->getOption('xliff-version')) { - $errorIo->warning(sprintf('The "--xliff-version" option is deprecated since version 5.3, use "--format=xlf%d" instead.', 10 * $xliffVersion)); - } - - if ($input->getOption('output-format')) { - $errorIo->warning(sprintf('The "--output-format" option is deprecated since version 5.3, use "--format=xlf%d" instead.', 10 * $xliffVersion)); - } - - if (\in_array($format, array_keys(self::FORMATS), true)) { - [$format, $xliffVersion] = self::FORMATS[$format]; - } - - // check format - $supportedFormats = $this->writer->getFormats(); - if (!\in_array($format, $supportedFormats, true)) { - $errorIo->error(['Wrong output format', 'Supported formats are: '.implode(', ', $supportedFormats).', xlf12 and xlf20.']); - - return 1; - } - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - // Define Root Paths - $transPaths = $this->getRootTransPaths(); - $codePaths = $this->getRootCodePaths($kernel); - - $currentName = 'default directory'; - - // Override with provided Bundle info - if (null !== $input->getArgument('bundle')) { - try { - $foundBundle = $kernel->getBundle($input->getArgument('bundle')); - $bundleDir = $foundBundle->getPath(); - $transPaths = [is_dir($bundleDir.'/Resources/translations') ? $bundleDir.'/Resources/translations' : $bundleDir.'/translations']; - $codePaths = [is_dir($bundleDir.'/Resources/views') ? $bundleDir.'/Resources/views' : $bundleDir.'/templates']; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - $currentName = $foundBundle->getName(); - } catch (\InvalidArgumentException $e) { - // such a bundle does not exist, so treat the argument as path - $path = $input->getArgument('bundle'); - - $transPaths = [$path.'/translations']; - $codePaths = [$path.'/templates']; - - if (!is_dir($transPaths[0])) { - throw new InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0])); - } - } - } - - $io->title('Translation Messages Extractor and Dumper'); - $io->comment(sprintf('Generating "%s" translation files for "%s"', $input->getArgument('locale'), $currentName)); - - $io->comment('Parsing templates...'); - $extractedCatalogue = $this->extractMessages($input->getArgument('locale'), $codePaths, $input->getOption('prefix')); - - $io->comment('Loading translation files...'); - $currentCatalogue = $this->loadCurrentMessages($input->getArgument('locale'), $transPaths); - - if (null !== $domain = $input->getOption('domain')) { - $currentCatalogue = $this->filterCatalogue($currentCatalogue, $domain); - $extractedCatalogue = $this->filterCatalogue($extractedCatalogue, $domain); - } - - // process catalogues - $operation = $input->getOption('clean') - ? new TargetOperation($currentCatalogue, $extractedCatalogue) - : new MergeOperation($currentCatalogue, $extractedCatalogue); - - // Exit if no messages found. - if (!\count($operation->getDomains())) { - $errorIo->warning('No translation messages were found.'); - - return 0; - } - - $resultMessage = 'Translation files were successfully updated'; - - $operation->moveMessagesToIntlDomainsIfPossible('new'); - - // show compiled list of messages - if (true === $input->getOption('dump-messages')) { - $extractedMessagesCount = 0; - $io->newLine(); - foreach ($operation->getDomains() as $domain) { - $newKeys = array_keys($operation->getNewMessages($domain)); - $allKeys = array_keys($operation->getMessages($domain)); - - $list = array_merge( - array_diff($allKeys, $newKeys), - array_map(function ($id) { - return sprintf('%s', $id); - }, $newKeys), - array_map(function ($id) { - return sprintf('%s', $id); - }, array_keys($operation->getObsoleteMessages($domain))) - ); - - $domainMessagesCount = \count($list); - - if ($sort = $input->getOption('sort')) { - $sort = strtolower($sort); - if (!\in_array($sort, self::SORT_ORDERS, true)) { - $errorIo->error(['Wrong sort order', 'Supported formats are: '.implode(', ', self::SORT_ORDERS).'.']); - - return 1; - } - - if (self::DESC === $sort) { - rsort($list); - } else { - sort($list); - } - } - - $io->section(sprintf('Messages extracted for domain "%s" (%d message%s)', $domain, $domainMessagesCount, $domainMessagesCount > 1 ? 's' : '')); - $io->listing($list); - - $extractedMessagesCount += $domainMessagesCount; - } - - if ('xlf' === $format) { - $io->comment(sprintf('Xliff output version is %s', $xliffVersion)); - } - - $resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was'); - } - - // save the files - if (true === $input->getOption('force')) { - $io->comment('Writing files...'); - - $bundleTransPath = false; - foreach ($transPaths as $path) { - if (is_dir($path)) { - $bundleTransPath = $path; - } - } - - if (!$bundleTransPath) { - $bundleTransPath = end($transPaths); - } - - $this->writer->write($operation->getResult(), $format, ['path' => $bundleTransPath, 'default_locale' => $this->defaultLocale, 'xliff_version' => $xliffVersion, 'as_tree' => $input->getOption('as-tree'), 'inline' => $input->getOption('as-tree') ?? 0]); - - if (true === $input->getOption('dump-messages')) { - $resultMessage .= ' and translation files were updated'; - } - } - - $io->success($resultMessage.'.'); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('locale')) { - $suggestions->suggestValues($this->enabledLocales); - - return; - } - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - if ($input->mustSuggestArgumentValuesFor('bundle')) { - $bundles = []; - - foreach ($kernel->getBundles() as $bundle) { - $bundles[] = $bundle->getName(); - if ($bundle->getContainerExtension()) { - $bundles[] = $bundle->getContainerExtension()->getAlias(); - } - } - - $suggestions->suggestValues($bundles); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(array_merge( - $this->writer->getFormats(), - array_keys(self::FORMATS) - )); - - return; - } - - if ($input->mustSuggestOptionValuesFor('domain') && $locale = $input->getArgument('locale')) { - $extractedCatalogue = $this->extractMessages($locale, $this->getRootCodePaths($kernel), $input->getOption('prefix')); - - $currentCatalogue = $this->loadCurrentMessages($locale, $this->getRootTransPaths()); - - // process catalogues - $operation = $input->getOption('clean') - ? new TargetOperation($currentCatalogue, $extractedCatalogue) - : new MergeOperation($currentCatalogue, $extractedCatalogue); - - $suggestions->suggestValues($operation->getDomains()); - - return; - } - - if ($input->mustSuggestOptionValuesFor('sort')) { - $suggestions->suggestValues(self::SORT_ORDERS); - } - } - - private function filterCatalogue(MessageCatalogue $catalogue, string $domain): MessageCatalogue - { - $filteredCatalogue = new MessageCatalogue($catalogue->getLocale()); - - // extract intl-icu messages only - $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; - if ($intlMessages = $catalogue->all($intlDomain)) { - $filteredCatalogue->add($intlMessages, $intlDomain); - } - - // extract all messages and subtract intl-icu messages - if ($messages = array_diff($catalogue->all($domain), $intlMessages)) { - $filteredCatalogue->add($messages, $domain); - } - foreach ($catalogue->getResources() as $resource) { - $filteredCatalogue->addResource($resource); - } - - if ($metadata = $catalogue->getMetadata('', $intlDomain)) { - foreach ($metadata as $k => $v) { - $filteredCatalogue->setMetadata($k, $v, $intlDomain); - } - } - - if ($metadata = $catalogue->getMetadata('', $domain)) { - foreach ($metadata as $k => $v) { - $filteredCatalogue->setMetadata($k, $v, $domain); - } - } - - return $filteredCatalogue; - } - - private function extractMessages(string $locale, array $transPaths, string $prefix): MessageCatalogue - { - $extractedCatalogue = new MessageCatalogue($locale); - $this->extractor->setPrefix($prefix); - $transPaths = $this->filterDuplicateTransPaths($transPaths); - foreach ($transPaths as $path) { - if (is_dir($path) || is_file($path)) { - $this->extractor->extract($path, $extractedCatalogue); - } - } - - return $extractedCatalogue; - } - - private function filterDuplicateTransPaths(array $transPaths): array - { - $transPaths = array_filter(array_map('realpath', $transPaths)); - - sort($transPaths); - - $filteredPaths = []; - - foreach ($transPaths as $path) { - foreach ($filteredPaths as $filteredPath) { - if (str_starts_with($path, $filteredPath.\DIRECTORY_SEPARATOR)) { - continue 2; - } - } - - $filteredPaths[] = $path; - } - - return $filteredPaths; - } - - private function loadCurrentMessages(string $locale, array $transPaths): MessageCatalogue - { - $currentCatalogue = new MessageCatalogue($locale); - foreach ($transPaths as $path) { - if (is_dir($path)) { - $this->reader->read($path, $currentCatalogue); - } - } - - return $currentCatalogue; - } - - private function getRootTransPaths(): array - { - $transPaths = $this->transPaths; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - - return $transPaths; - } - - private function getRootCodePaths(KernelInterface $kernel): array - { - $codePaths = $this->codePaths; - $codePaths[] = $kernel->getProjectDir().'/src'; - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - - return $codePaths; - } -} diff --git a/lib/symfony/framework-bundle/Command/WorkflowDumpCommand.php b/lib/symfony/framework-bundle/Command/WorkflowDumpCommand.php deleted file mode 100644 index 89d29b981..000000000 --- a/lib/symfony/framework-bundle/Command/WorkflowDumpCommand.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Workflow\Definition; -use Symfony\Component\Workflow\Dumper\GraphvizDumper; -use Symfony\Component\Workflow\Dumper\MermaidDumper; -use Symfony\Component\Workflow\Dumper\PlantUmlDumper; -use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper; -use Symfony\Component\Workflow\Marking; - -/** - * @author Grégoire Pineau - * - * @final - */ -class WorkflowDumpCommand extends Command -{ - protected static $defaultName = 'workflow:dump'; - protected static $defaultDescription = 'Dump a workflow'; - /** - * string is the service id. - * - * @var array - */ - private $workflows = []; - - private const DUMP_FORMAT_OPTIONS = [ - 'puml', - 'mermaid', - 'dot', - ]; - - public function __construct(array $workflows) - { - parent::__construct(); - - $this->workflows = $workflows; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'), - new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'), - new InputOption('label', 'l', InputOption::VALUE_REQUIRED, 'Label a graph'), - new InputOption('dump-format', null, InputOption::VALUE_REQUIRED, 'The dump format ['.implode('|', self::DUMP_FORMAT_OPTIONS).']', 'dot'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command dumps the graphical representation of a -workflow in different formats - -DOT: %command.full_name% | dot -Tpng > workflow.png -PUML: %command.full_name% --dump-format=puml | java -jar plantuml.jar -p > workflow.png -MERMAID: %command.full_name% --dump-format=mermaid | mmdc -o workflow.svg -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $workflowName = $input->getArgument('name'); - - $workflow = null; - - if (isset($this->workflows['workflow.'.$workflowName])) { - $workflow = $this->workflows['workflow.'.$workflowName]; - $type = 'workflow'; - } elseif (isset($this->workflows['state_machine.'.$workflowName])) { - $workflow = $this->workflows['state_machine.'.$workflowName]; - $type = 'state_machine'; - } - - if (null === $workflow) { - throw new InvalidArgumentException(sprintf('No service found for "workflow.%1$s" nor "state_machine.%1$s".', $workflowName)); - } - - switch ($input->getOption('dump-format')) { - case 'puml': - $transitionType = 'workflow' === $type ? PlantUmlDumper::WORKFLOW_TRANSITION : PlantUmlDumper::STATEMACHINE_TRANSITION; - $dumper = new PlantUmlDumper($transitionType); - break; - - case 'mermaid': - $transitionType = 'workflow' === $type ? MermaidDumper::TRANSITION_TYPE_WORKFLOW : MermaidDumper::TRANSITION_TYPE_STATEMACHINE; - $dumper = new MermaidDumper($transitionType); - break; - - case 'dot': - default: - $dumper = ('workflow' === $type) ? new GraphvizDumper() : new StateMachineGraphvizDumper(); - } - - $marking = new Marking(); - - foreach ($input->getArgument('marking') as $place) { - $marking->mark($place); - } - - $options = [ - 'name' => $workflowName, - 'nofooter' => true, - 'graph' => [ - 'label' => $input->getOption('label'), - ], - ]; - $output->writeln($dumper->dump($workflow, $marking, $options)); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->workflows)); - } - - if ($input->mustSuggestOptionValuesFor('dump-format')) { - $suggestions->suggestValues(self::DUMP_FORMAT_OPTIONS); - } - } -} diff --git a/lib/symfony/framework-bundle/Command/XliffLintCommand.php b/lib/symfony/framework-bundle/Command/XliffLintCommand.php deleted file mode 100644 index b1f631739..000000000 --- a/lib/symfony/framework-bundle/Command/XliffLintCommand.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Translation\Command\XliffLintCommand as BaseLintCommand; - -/** - * Validates XLIFF files syntax and outputs encountered errors. - * - * @author Grégoire Pineau - * @author Robin Chalas - * @author Javier Eguiluz - * - * @final - */ -class XliffLintCommand extends BaseLintCommand -{ - protected static $defaultName = 'lint:xliff'; - protected static $defaultDescription = 'Lints an XLIFF file and outputs encountered errors'; - - public function __construct() - { - $directoryIteratorProvider = function ($directory, $default) { - if (!is_dir($directory)) { - $directory = $this->getApplication()->getKernel()->locateResource($directory); - } - - return $default($directory); - }; - - $isReadableProvider = function ($fileOrDirectory, $default) { - return str_starts_with($fileOrDirectory, '@') || $default($fileOrDirectory); - }; - - parent::__construct(null, $directoryIteratorProvider, $isReadableProvider); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - parent::configure(); - - $this->setHelp($this->getHelp().<<<'EOF' - -Or find all files in a bundle: - - php %command.full_name% @AcmeDemoBundle - -EOF - ); - } -} diff --git a/lib/symfony/framework-bundle/Command/YamlLintCommand.php b/lib/symfony/framework-bundle/Command/YamlLintCommand.php deleted file mode 100644 index 3a432f275..000000000 --- a/lib/symfony/framework-bundle/Command/YamlLintCommand.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Yaml\Command\LintCommand as BaseLintCommand; - -/** - * Validates YAML files syntax and outputs encountered errors. - * - * @author Grégoire Pineau - * @author Robin Chalas - * - * @final - */ -class YamlLintCommand extends BaseLintCommand -{ - protected static $defaultName = 'lint:yaml'; - protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors'; - - public function __construct() - { - $directoryIteratorProvider = function ($directory, $default) { - if (!is_dir($directory)) { - $directory = $this->getApplication()->getKernel()->locateResource($directory); - } - - return $default($directory); - }; - - $isReadableProvider = function ($fileOrDirectory, $default) { - return str_starts_with($fileOrDirectory, '@') || $default($fileOrDirectory); - }; - - parent::__construct(null, $directoryIteratorProvider, $isReadableProvider); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - parent::configure(); - - $this->setHelp($this->getHelp().<<<'EOF' - -Or find all files in a bundle: - - php %command.full_name% @AcmeDemoBundle - -EOF - ); - } -} diff --git a/lib/symfony/framework-bundle/Console/Application.php b/lib/symfony/framework-bundle/Console/Application.php deleted file mode 100644 index 55510b9d5..000000000 --- a/lib/symfony/framework-bundle/Console/Application.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console; - -use Symfony\Component\Console\Application as BaseApplication; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\HttpKernel\Bundle\Bundle; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * @author Fabien Potencier - */ -class Application extends BaseApplication -{ - private $kernel; - private $commandsRegistered = false; - private $registrationErrors = []; - - public function __construct(KernelInterface $kernel) - { - $this->kernel = $kernel; - - parent::__construct('Symfony', Kernel::VERSION); - - $inputDefinition = $this->getDefinition(); - $inputDefinition->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', $kernel->getEnvironment())); - $inputDefinition->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switch off debug mode.')); - } - - /** - * Gets the Kernel associated with this Console. - * - * @return KernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->kernel->getContainer()->has('services_resetter')) { - $this->kernel->getContainer()->get('services_resetter')->reset(); - } - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - */ - public function doRun(InputInterface $input, OutputInterface $output) - { - $this->registerCommands(); - - if ($this->registrationErrors) { - $this->renderRegistrationErrors($input, $output); - } - - $this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher')); - - return parent::doRun($input, $output); - } - - /** - * {@inheritdoc} - */ - protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) - { - if (!$command instanceof ListCommand) { - if ($this->registrationErrors) { - $this->renderRegistrationErrors($input, $output); - $this->registrationErrors = []; - } - - return parent::doRunCommand($command, $input, $output); - } - - $returnCode = parent::doRunCommand($command, $input, $output); - - if ($this->registrationErrors) { - $this->renderRegistrationErrors($input, $output); - $this->registrationErrors = []; - } - - return $returnCode; - } - - /** - * {@inheritdoc} - */ - public function find(string $name) - { - $this->registerCommands(); - - return parent::find($name); - } - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - $this->registerCommands(); - - $command = parent::get($name); - - if ($command instanceof ContainerAwareInterface) { - $command->setContainer($this->kernel->getContainer()); - } - - return $command; - } - - /** - * {@inheritdoc} - */ - public function all(string $namespace = null) - { - $this->registerCommands(); - - return parent::all($namespace); - } - - /** - * {@inheritdoc} - */ - public function getLongVersion() - { - return parent::getLongVersion().sprintf(' (env: %s, debug: %s) #StandWithUkraine https://sf.to/ukraine', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'); - } - - public function add(Command $command) - { - $this->registerCommands(); - - return parent::add($command); - } - - protected function registerCommands() - { - if ($this->commandsRegistered) { - return; - } - - $this->commandsRegistered = true; - - $this->kernel->boot(); - - $container = $this->kernel->getContainer(); - - foreach ($this->kernel->getBundles() as $bundle) { - if ($bundle instanceof Bundle) { - try { - $bundle->registerCommands($this); - } catch (\Throwable $e) { - $this->registrationErrors[] = $e; - } - } - } - - if ($container->has('console.command_loader')) { - $this->setCommandLoader($container->get('console.command_loader')); - } - - if ($container->hasParameter('console.command.ids')) { - $lazyCommandIds = $container->hasParameter('console.lazy_command.ids') ? $container->getParameter('console.lazy_command.ids') : []; - foreach ($container->getParameter('console.command.ids') as $id) { - if (!isset($lazyCommandIds[$id])) { - try { - $this->add($container->get($id)); - } catch (\Throwable $e) { - $this->registrationErrors[] = $e; - } - } - } - } - } - - private function renderRegistrationErrors(InputInterface $input, OutputInterface $output) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - (new SymfonyStyle($input, $output))->warning('Some commands could not be registered:'); - - foreach ($this->registrationErrors as $error) { - $this->doRenderThrowable($error, $output); - } - } -} diff --git a/lib/symfony/framework-bundle/Console/Descriptor/Descriptor.php b/lib/symfony/framework-bundle/Console/Descriptor/Descriptor.php deleted file mode 100644 index 537d6d08c..000000000 --- a/lib/symfony/framework-bundle/Console/Descriptor/Descriptor.php +++ /dev/null @@ -1,380 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\Console\Descriptor\DescriptorInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -abstract class Descriptor implements DescriptorInterface -{ - /** - * @var OutputInterface - */ - protected $output; - - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, $object, array $options = []) - { - $this->output = $output; - - switch (true) { - case $object instanceof RouteCollection: - $this->describeRouteCollection($object, $options); - break; - case $object instanceof Route: - $this->describeRoute($object, $options); - break; - case $object instanceof ParameterBag: - $this->describeContainerParameters($object, $options); - break; - case $object instanceof ContainerBuilder && !empty($options['env-vars']): - $this->describeContainerEnvVars($this->getContainerEnvVars($object), $options); - break; - case $object instanceof ContainerBuilder && isset($options['group_by']) && 'tags' === $options['group_by']: - $this->describeContainerTags($object, $options); - break; - case $object instanceof ContainerBuilder && isset($options['id']): - $this->describeContainerService($this->resolveServiceDefinition($object, $options['id']), $options, $object); - break; - case $object instanceof ContainerBuilder && isset($options['parameter']): - $this->describeContainerParameter($object->resolveEnvPlaceholders($object->getParameter($options['parameter'])), $options); - break; - case $object instanceof ContainerBuilder && isset($options['deprecations']): - $this->describeContainerDeprecations($object, $options); - break; - case $object instanceof ContainerBuilder: - $this->describeContainerServices($object, $options); - break; - case $object instanceof Definition: - $this->describeContainerDefinition($object, $options); - break; - case $object instanceof Alias: - $this->describeContainerAlias($object, $options); - break; - case $object instanceof EventDispatcherInterface: - $this->describeEventDispatcherListeners($object, $options); - break; - case \is_callable($object): - $this->describeCallable($object, $options); - break; - default: - throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))); - } - } - - protected function getOutput(): OutputInterface - { - return $this->output; - } - - protected function write(string $content, bool $decorated = false) - { - $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW); - } - - abstract protected function describeRouteCollection(RouteCollection $routes, array $options = []); - - abstract protected function describeRoute(Route $route, array $options = []); - - abstract protected function describeContainerParameters(ParameterBag $parameters, array $options = []); - - abstract protected function describeContainerTags(ContainerBuilder $builder, array $options = []); - - /** - * Describes a container service by its name. - * - * Common options are: - * * name: name of described service - * - * @param Definition|Alias|object $service - */ - abstract protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null); - - /** - * Describes container services. - * - * Common options are: - * * tag: filters described services by given tag - */ - abstract protected function describeContainerServices(ContainerBuilder $builder, array $options = []); - - abstract protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void; - - abstract protected function describeContainerDefinition(Definition $definition, array $options = []); - - abstract protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null); - - abstract protected function describeContainerParameter($parameter, array $options = []); - - abstract protected function describeContainerEnvVars(array $envs, array $options = []); - - /** - * Describes event dispatcher listeners. - * - * Common options are: - * * name: name of listened event - */ - abstract protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []); - - /** - * Describes a callable. - * - * @param mixed $callable - */ - abstract protected function describeCallable($callable, array $options = []); - - /** - * Formats a value as string. - * - * @param mixed $value - */ - protected function formatValue($value): string - { - if ($value instanceof \UnitEnum) { - return ltrim(var_export($value, true), '\\'); - } - - if (\is_object($value)) { - return sprintf('object(%s)', \get_class($value)); - } - - if (\is_string($value)) { - return $value; - } - - return preg_replace("/\n\s*/s", '', var_export($value, true)); - } - - /** - * Formats a parameter. - * - * @param mixed $value - */ - protected function formatParameter($value): string - { - if ($value instanceof \UnitEnum) { - return ltrim(var_export($value, true), '\\'); - } - - // Recursively search for enum values, so we can replace it - // before json_encode (which will not display anything for \UnitEnum otherwise) - if (\is_array($value)) { - array_walk_recursive($value, static function (&$value) { - if ($value instanceof \UnitEnum) { - $value = ltrim(var_export($value, true), '\\'); - } - }); - } - - if (\is_bool($value) || \is_array($value) || (null === $value)) { - $jsonString = json_encode($value); - - if (preg_match('/^(.{60})./us', $jsonString, $matches)) { - return $matches[1].'...'; - } - - return $jsonString; - } - - return (string) $value; - } - - /** - * @return mixed - */ - protected function resolveServiceDefinition(ContainerBuilder $builder, string $serviceId) - { - if ($builder->hasDefinition($serviceId)) { - return $builder->getDefinition($serviceId); - } - - // Some service IDs don't have a Definition, they're aliases - if ($builder->hasAlias($serviceId)) { - return $builder->getAlias($serviceId); - } - - if ('service_container' === $serviceId) { - return (new Definition(ContainerInterface::class))->setPublic(true)->setSynthetic(true); - } - - // the service has been injected in some special way, just return the service - return $builder->get($serviceId); - } - - protected function findDefinitionsByTag(ContainerBuilder $builder, bool $showHidden): array - { - $definitions = []; - $tags = $builder->findTags(); - asort($tags); - - foreach ($tags as $tag) { - foreach ($builder->findTaggedServiceIds($tag) as $serviceId => $attributes) { - $definition = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - if (!isset($definitions[$tag])) { - $definitions[$tag] = []; - } - - $definitions[$tag][$serviceId] = $definition; - } - } - - return $definitions; - } - - protected function sortParameters(ParameterBag $parameters) - { - $parameters = $parameters->all(); - ksort($parameters); - - return $parameters; - } - - protected function sortServiceIds(array $serviceIds) - { - asort($serviceIds); - - return $serviceIds; - } - - protected function sortTaggedServicesByPriority(array $services): array - { - $maxPriority = []; - foreach ($services as $service => $tags) { - $maxPriority[$service] = \PHP_INT_MIN; - foreach ($tags as $tag) { - $currentPriority = $tag['priority'] ?? 0; - if ($maxPriority[$service] < $currentPriority) { - $maxPriority[$service] = $currentPriority; - } - } - } - uasort($maxPriority, function ($a, $b) { - return $b <=> $a; - }); - - return array_keys($maxPriority); - } - - protected function sortTagsByPriority(array $tags): array - { - $sortedTags = []; - foreach ($tags as $tagName => $tag) { - $sortedTags[$tagName] = $this->sortByPriority($tag); - } - - return $sortedTags; - } - - protected function sortByPriority(array $tag): array - { - usort($tag, function ($a, $b) { - return ($b['priority'] ?? 0) <=> ($a['priority'] ?? 0); - }); - - return $tag; - } - - public static function getClassDescription(string $class, string &$resolvedClass = null): string - { - $resolvedClass = $class; - try { - $resource = new ClassExistenceResource($class, false); - - // isFresh() will explode ONLY if a parent class/trait does not exist - $resource->isFresh(0); - - $r = new \ReflectionClass($class); - $resolvedClass = $r->name; - - if ($docComment = $r->getDocComment()) { - $docComment = preg_split('#\n\s*\*\s*[\n@]#', substr($docComment, 3, -2), 2)[0]; - - return trim(preg_replace('#\s*\n\s*\*\s*#', ' ', $docComment)); - } - } catch (\ReflectionException $e) { - } - - return ''; - } - - private function getContainerEnvVars(ContainerBuilder $container): array - { - if (!$container->hasParameter('debug.container.dump')) { - return []; - } - - if (!is_file($container->getParameter('debug.container.dump'))) { - return []; - } - - $file = file_get_contents($container->getParameter('debug.container.dump')); - preg_match_all('{%env\(((?:\w++:)*+\w++)\)%}', $file, $envVars); - $envVars = array_unique($envVars[1]); - - $bag = $container->getParameterBag(); - $getDefaultParameter = function (string $name) { - return parent::get($name); - }; - $getDefaultParameter = $getDefaultParameter->bindTo($bag, \get_class($bag)); - - $getEnvReflection = new \ReflectionMethod($container, 'getEnv'); - $getEnvReflection->setAccessible(true); - - $envs = []; - - foreach ($envVars as $env) { - $processor = 'string'; - if (false !== $i = strrpos($name = $env, ':')) { - $name = substr($env, $i + 1); - $processor = substr($env, 0, $i); - } - $defaultValue = ($hasDefault = $container->hasParameter("env($name)")) ? $getDefaultParameter("env($name)") : null; - if (false === ($runtimeValue = $_ENV[$name] ?? $_SERVER[$name] ?? getenv($name))) { - $runtimeValue = null; - } - $processedValue = ($hasRuntime = null !== $runtimeValue) || $hasDefault ? $getEnvReflection->invoke($container, $env) : null; - $envs["$name$processor"] = [ - 'name' => $name, - 'processor' => $processor, - 'default_available' => $hasDefault, - 'default_value' => $defaultValue, - 'runtime_available' => $hasRuntime, - 'runtime_value' => $runtimeValue, - 'processed_value' => $processedValue, - ]; - } - ksort($envs); - - return array_values($envs); - } -} diff --git a/lib/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php b/lib/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php deleted file mode 100644 index 0ad063343..000000000 --- a/lib/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php +++ /dev/null @@ -1,420 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class JsonDescriptor extends Descriptor -{ - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $data = []; - foreach ($routes->all() as $name => $route) { - $data[$name] = $this->getRouteData($route); - } - - $this->writeData($data, $options); - } - - protected function describeRoute(Route $route, array $options = []) - { - $this->writeData($this->getRouteData($route), $options); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $this->writeData($this->sortParameters($parameters), $options); - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $data = []; - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $data[$tag] = []; - foreach ($definitions as $definition) { - $data[$tag][] = $this->getContainerDefinitionData($definition, true); - } - } - - $this->writeData($data, $options); - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - if ($service instanceof Alias) { - $this->describeContainerAlias($service, $options, $builder); - } elseif ($service instanceof Definition) { - $this->writeData($this->getContainerDefinitionData($service, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']), $options); - } else { - $this->writeData(\get_class($service), $options); - } - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $serviceIds = isset($options['tag']) && $options['tag'] - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($options['tag'])) - : $this->sortServiceIds($builder->getServiceIds()); - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $omitTags = isset($options['omit_tags']) && $options['omit_tags']; - $showArguments = isset($options['show_arguments']) && $options['show_arguments']; - $data = ['definitions' => [], 'aliases' => [], 'services' => []]; - - if (isset($options['filter'])) { - $serviceIds = array_filter($serviceIds, $options['filter']); - } - - foreach ($serviceIds as $serviceId) { - $service = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - if ($service instanceof Alias) { - $data['aliases'][$serviceId] = $this->getContainerAliasData($service); - } elseif ($service instanceof Definition) { - $data['definitions'][$serviceId] = $this->getContainerDefinitionData($service, $omitTags, $showArguments); - } else { - $data['services'][$serviceId] = \get_class($service); - } - } - - $this->writeData($data, $options); - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - $this->writeData($this->getContainerDefinitionData($definition, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']), $options); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - if (!$builder) { - $this->writeData($this->getContainerAliasData($alias), $options); - - return; - } - - $this->writeData( - [$this->getContainerAliasData($alias), $this->getContainerDefinitionData($builder->getDefinition((string) $alias), isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments'])], - array_merge($options, ['id' => (string) $alias]) - ); - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $this->writeData($this->getEventDispatcherListenersData($eventDispatcher, $options), $options); - } - - protected function describeCallable($callable, array $options = []) - { - $this->writeData($this->getCallableData($callable), $options); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $key = $options['parameter'] ?? ''; - - $this->writeData([$key => $parameter], $options); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - throw new LogicException('Using the JSON format to debug environment variables is not supported.'); - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - throw new RuntimeException('The deprecation file does not exist, please try warming the cache first.'); - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $formattedLogs[] = [ - 'message' => $log['message'], - 'file' => $log['file'], - 'line' => $log['line'], - 'count' => $log['count'], - ]; - $remainingCount += $log['count']; - } - - $this->writeData(['remainingCount' => $remainingCount, 'deprecations' => $formattedLogs], $options); - } - - private function writeData(array $data, array $options) - { - $flags = $options['json_encoding'] ?? 0; - - // Recursively search for enum values, so we can replace it - // before json_encode (which will not display anything for \UnitEnum otherwise) - array_walk_recursive($data, static function (&$value) { - if ($value instanceof \UnitEnum) { - $value = ltrim(var_export($value, true), '\\'); - } - }); - - $this->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n"); - } - - protected function getRouteData(Route $route): array - { - $data = [ - 'path' => $route->getPath(), - 'pathRegex' => $route->compile()->getRegex(), - 'host' => '' !== $route->getHost() ? $route->getHost() : 'ANY', - 'hostRegex' => '' !== $route->getHost() ? $route->compile()->getHostRegex() : '', - 'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', - 'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', - 'class' => \get_class($route), - 'defaults' => $route->getDefaults(), - 'requirements' => $route->getRequirements() ?: 'NO CUSTOM', - 'options' => $route->getOptions(), - ]; - - if ('' !== $route->getCondition()) { - $data['condition'] = $route->getCondition(); - } - - return $data; - } - - private function getContainerDefinitionData(Definition $definition, bool $omitTags = false, bool $showArguments = false): array - { - $data = [ - 'class' => (string) $definition->getClass(), - 'public' => $definition->isPublic() && !$definition->isPrivate(), - 'synthetic' => $definition->isSynthetic(), - 'lazy' => $definition->isLazy(), - 'shared' => $definition->isShared(), - 'abstract' => $definition->isAbstract(), - 'autowire' => $definition->isAutowired(), - 'autoconfigure' => $definition->isAutoconfigured(), - ]; - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $data['description'] = $classDescription; - } - - if ($showArguments) { - $data['arguments'] = $this->describeValue($definition->getArguments(), $omitTags, $showArguments); - } - - $data['file'] = $definition->getFile(); - - if ($factory = $definition->getFactory()) { - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $data['factory_service'] = (string) $factory[0]; - } elseif ($factory[0] instanceof Definition) { - $data['factory_service'] = sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'class not configured'); - } else { - $data['factory_class'] = $factory[0]; - } - $data['factory_method'] = $factory[1]; - } else { - $data['factory_function'] = $factory; - } - } - - $calls = $definition->getMethodCalls(); - if (\count($calls) > 0) { - $data['calls'] = []; - foreach ($calls as $callData) { - $data['calls'][] = $callData[0]; - } - } - - if (!$omitTags) { - $data['tags'] = []; - foreach ($this->sortTagsByPriority($definition->getTags()) as $tagName => $tagData) { - foreach ($tagData as $parameters) { - $data['tags'][] = ['name' => $tagName, 'parameters' => $parameters]; - } - } - } - - return $data; - } - - private function getContainerAliasData(Alias $alias): array - { - return [ - 'service' => (string) $alias, - 'public' => $alias->isPublic() && !$alias->isPrivate(), - ]; - } - - private function getEventDispatcherListenersData(EventDispatcherInterface $eventDispatcher, array $options): array - { - $data = []; - $event = \array_key_exists('event', $options) ? $options['event'] : null; - - if (null !== $event) { - foreach ($eventDispatcher->getListeners($event) as $listener) { - $l = $this->getCallableData($listener); - $l['priority'] = $eventDispatcher->getListenerPriority($event, $listener); - $data[] = $l; - } - } else { - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - ksort($registeredListeners); - - foreach ($registeredListeners as $eventListened => $eventListeners) { - foreach ($eventListeners as $eventListener) { - $l = $this->getCallableData($eventListener); - $l['priority'] = $eventDispatcher->getListenerPriority($eventListened, $eventListener); - $data[$eventListened][] = $l; - } - } - } - - return $data; - } - - private function getCallableData($callable): array - { - $data = []; - - if (\is_array($callable)) { - $data['type'] = 'function'; - - if (\is_object($callable[0])) { - $data['name'] = $callable[1]; - $data['class'] = \get_class($callable[0]); - } else { - if (!str_starts_with($callable[1], 'parent::')) { - $data['name'] = $callable[1]; - $data['class'] = $callable[0]; - $data['static'] = true; - } else { - $data['name'] = substr($callable[1], 8); - $data['class'] = $callable[0]; - $data['static'] = true; - $data['parent'] = true; - } - } - - return $data; - } - - if (\is_string($callable)) { - $data['type'] = 'function'; - - if (!str_contains($callable, '::')) { - $data['name'] = $callable; - } else { - $callableParts = explode('::', $callable); - - $data['name'] = $callableParts[1]; - $data['class'] = $callableParts[0]; - $data['static'] = true; - } - - return $data; - } - - if ($callable instanceof \Closure) { - $data['type'] = 'closure'; - - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return $data; - } - $data['name'] = $r->name; - - if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { - $data['class'] = $class->name; - if (!$r->getClosureThis()) { - $data['static'] = true; - } - } - - return $data; - } - - if (method_exists($callable, '__invoke')) { - $data['type'] = 'object'; - $data['name'] = \get_class($callable); - - return $data; - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } - - private function describeValue($value, bool $omitTags, bool $showArguments) - { - if (\is_array($value)) { - $data = []; - foreach ($value as $k => $v) { - $data[$k] = $this->describeValue($v, $omitTags, $showArguments); - } - - return $data; - } - - if ($value instanceof ServiceClosureArgument) { - $value = $value->getValues()[0]; - } - - if ($value instanceof Reference) { - return [ - 'type' => 'service', - 'id' => (string) $value, - ]; - } - - if ($value instanceof AbstractArgument) { - return ['type' => 'abstract', 'text' => $value->getText()]; - } - - if ($value instanceof ArgumentInterface) { - return $this->describeValue($value->getValues(), $omitTags, $showArguments); - } - - if ($value instanceof Definition) { - return $this->getContainerDefinitionData($value, $omitTags, $showArguments); - } - - return $value; - } -} diff --git a/lib/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php b/lib/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php deleted file mode 100644 index a3fbabc6d..000000000 --- a/lib/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php +++ /dev/null @@ -1,414 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class MarkdownDescriptor extends Descriptor -{ - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $first = true; - foreach ($routes->all() as $name => $route) { - if ($first) { - $first = false; - } else { - $this->write("\n\n"); - } - $this->describeRoute($route, ['name' => $name]); - } - $this->write("\n"); - } - - protected function describeRoute(Route $route, array $options = []) - { - $output = '- Path: '.$route->getPath() - ."\n".'- Path Regex: '.$route->compile()->getRegex() - ."\n".'- Host: '.('' !== $route->getHost() ? $route->getHost() : 'ANY') - ."\n".'- Host Regex: '.('' !== $route->getHost() ? $route->compile()->getHostRegex() : '') - ."\n".'- Scheme: '.($route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY') - ."\n".'- Method: '.($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY') - ."\n".'- Class: '.\get_class($route) - ."\n".'- Defaults: '.$this->formatRouterConfig($route->getDefaults()) - ."\n".'- Requirements: '.($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM') - ."\n".'- Options: '.$this->formatRouterConfig($route->getOptions()); - - if ('' !== $route->getCondition()) { - $output .= "\n".'- Condition: '.$route->getCondition(); - } - - $this->write(isset($options['name']) - ? $options['name']."\n".str_repeat('-', \strlen($options['name']))."\n\n".$output - : $output); - $this->write("\n"); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $this->write("Container parameters\n====================\n"); - foreach ($this->sortParameters($parameters) as $key => $value) { - $this->write(sprintf("\n- `%s`: `%s`", $key, $this->formatParameter($value))); - } - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $this->write("Container tags\n=============="); - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $this->write("\n\n".$tag."\n".str_repeat('-', \strlen($tag))); - foreach ($definitions as $serviceId => $definition) { - $this->write("\n\n"); - $this->describeContainerDefinition($definition, ['omit_tags' => true, 'id' => $serviceId]); - } - } - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - $childOptions = array_merge($options, ['id' => $options['id'], 'as_array' => true]); - - if ($service instanceof Alias) { - $this->describeContainerAlias($service, $childOptions, $builder); - } elseif ($service instanceof Definition) { - $this->describeContainerDefinition($service, $childOptions); - } else { - $this->write(sprintf('**`%s`:** `%s`', $options['id'], \get_class($service))); - } - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - throw new RuntimeException('The deprecation file does not exist, please try warming the cache first.'); - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - if (0 === \count($logs)) { - $this->write("## There are no deprecations in the logs!\n"); - - return; - } - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $formattedLogs[] = sprintf("- %sx: \"%s\" in %s:%s\n", $log['count'], $log['message'], $log['file'], $log['line']); - $remainingCount += $log['count']; - } - - $this->write(sprintf("## Remaining deprecations (%s)\n\n", $remainingCount)); - foreach ($formattedLogs as $formattedLog) { - $this->write($formattedLog); - } - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - - $title = $showHidden ? 'Hidden services' : 'Services'; - if (isset($options['tag'])) { - $title .= ' with tag `'.$options['tag'].'`'; - } - $this->write($title."\n".str_repeat('=', \strlen($title))); - - $serviceIds = isset($options['tag']) && $options['tag'] - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($options['tag'])) - : $this->sortServiceIds($builder->getServiceIds()); - $showArguments = isset($options['show_arguments']) && $options['show_arguments']; - $services = ['definitions' => [], 'aliases' => [], 'services' => []]; - - if (isset($options['filter'])) { - $serviceIds = array_filter($serviceIds, $options['filter']); - } - - foreach ($serviceIds as $serviceId) { - $service = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - if ($service instanceof Alias) { - $services['aliases'][$serviceId] = $service; - } elseif ($service instanceof Definition) { - $services['definitions'][$serviceId] = $service; - } else { - $services['services'][$serviceId] = $service; - } - } - - if (!empty($services['definitions'])) { - $this->write("\n\nDefinitions\n-----------\n"); - foreach ($services['definitions'] as $id => $service) { - $this->write("\n"); - $this->describeContainerDefinition($service, ['id' => $id, 'show_arguments' => $showArguments]); - } - } - - if (!empty($services['aliases'])) { - $this->write("\n\nAliases\n-------\n"); - foreach ($services['aliases'] as $id => $service) { - $this->write("\n"); - $this->describeContainerAlias($service, ['id' => $id]); - } - } - - if (!empty($services['services'])) { - $this->write("\n\nServices\n--------\n"); - foreach ($services['services'] as $id => $service) { - $this->write("\n"); - $this->write(sprintf('- `%s`: `%s`', $id, \get_class($service))); - } - } - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - $output = ''; - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $output .= '- Description: `'.$classDescription.'`'."\n"; - } - - $output .= '- Class: `'.$definition->getClass().'`' - ."\n".'- Public: '.($definition->isPublic() && !$definition->isPrivate() ? 'yes' : 'no') - ."\n".'- Synthetic: '.($definition->isSynthetic() ? 'yes' : 'no') - ."\n".'- Lazy: '.($definition->isLazy() ? 'yes' : 'no') - ."\n".'- Shared: '.($definition->isShared() ? 'yes' : 'no') - ."\n".'- Abstract: '.($definition->isAbstract() ? 'yes' : 'no') - ."\n".'- Autowired: '.($definition->isAutowired() ? 'yes' : 'no') - ."\n".'- Autoconfigured: '.($definition->isAutoconfigured() ? 'yes' : 'no') - ; - - if (isset($options['show_arguments']) && $options['show_arguments']) { - $output .= "\n".'- Arguments: '.($definition->getArguments() ? 'yes' : 'no'); - } - - if ($definition->getFile()) { - $output .= "\n".'- File: `'.$definition->getFile().'`'; - } - - if ($factory = $definition->getFactory()) { - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $output .= "\n".'- Factory Service: `'.$factory[0].'`'; - } elseif ($factory[0] instanceof Definition) { - $output .= "\n".sprintf('- Factory Service: inline factory service (%s)', $factory[0]->getClass() ? sprintf('`%s`', $factory[0]->getClass()) : 'not configured'); - } else { - $output .= "\n".'- Factory Class: `'.$factory[0].'`'; - } - $output .= "\n".'- Factory Method: `'.$factory[1].'`'; - } else { - $output .= "\n".'- Factory Function: `'.$factory.'`'; - } - } - - $calls = $definition->getMethodCalls(); - foreach ($calls as $callData) { - $output .= "\n".'- Call: `'.$callData[0].'`'; - } - - if (!(isset($options['omit_tags']) && $options['omit_tags'])) { - foreach ($this->sortTagsByPriority($definition->getTags()) as $tagName => $tagData) { - foreach ($tagData as $parameters) { - $output .= "\n".'- Tag: `'.$tagName.'`'; - foreach ($parameters as $name => $value) { - $output .= "\n".' - '.ucfirst($name).': '.$value; - } - } - } - } - - $this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - $output = '- Service: `'.$alias.'`' - ."\n".'- Public: '.($alias->isPublic() && !$alias->isPrivate() ? 'yes' : 'no'); - - if (!isset($options['id'])) { - $this->write($output); - - return; - } - - $this->write(sprintf("### %s\n\n%s\n", $options['id'], $output)); - - if (!$builder) { - return; - } - - $this->write("\n"); - $this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias])); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $this->write(isset($options['parameter']) ? sprintf("%s\n%s\n\n%s", $options['parameter'], str_repeat('=', \strlen($options['parameter'])), $this->formatParameter($parameter)) : $parameter); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - throw new LogicException('Using the markdown format to debug environment variables is not supported.'); - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $event = $options['event'] ?? null; - $dispatcherServiceName = $options['dispatcher_service_name'] ?? null; - - $title = 'Registered listeners'; - - if (null !== $dispatcherServiceName) { - $title .= sprintf(' of event dispatcher "%s"', $dispatcherServiceName); - } - - if (null !== $event) { - $title .= sprintf(' for event `%s` ordered by descending priority', $event); - $registeredListeners = $eventDispatcher->getListeners($event); - } else { - // Try to see if "events" exists - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - } - - $this->write(sprintf('# %s', $title)."\n"); - - if (null !== $event) { - foreach ($registeredListeners as $order => $listener) { - $this->write("\n".sprintf('## Listener %d', $order + 1)."\n"); - $this->describeCallable($listener); - $this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($event, $listener))."\n"); - } - } else { - ksort($registeredListeners); - - foreach ($registeredListeners as $eventListened => $eventListeners) { - $this->write("\n".sprintf('## %s', $eventListened)."\n"); - - foreach ($eventListeners as $order => $eventListener) { - $this->write("\n".sprintf('### Listener %d', $order + 1)."\n"); - $this->describeCallable($eventListener); - $this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($eventListened, $eventListener))."\n"); - } - } - } - } - - protected function describeCallable($callable, array $options = []) - { - $string = ''; - - if (\is_array($callable)) { - $string .= "\n- Type: `function`"; - - if (\is_object($callable[0])) { - $string .= "\n".sprintf('- Name: `%s`', $callable[1]); - $string .= "\n".sprintf('- Class: `%s`', \get_class($callable[0])); - } else { - if (!str_starts_with($callable[1], 'parent::')) { - $string .= "\n".sprintf('- Name: `%s`', $callable[1]); - $string .= "\n".sprintf('- Class: `%s`', $callable[0]); - $string .= "\n- Static: yes"; - } else { - $string .= "\n".sprintf('- Name: `%s`', substr($callable[1], 8)); - $string .= "\n".sprintf('- Class: `%s`', $callable[0]); - $string .= "\n- Static: yes"; - $string .= "\n- Parent: yes"; - } - } - - return $this->write($string."\n"); - } - - if (\is_string($callable)) { - $string .= "\n- Type: `function`"; - - if (!str_contains($callable, '::')) { - $string .= "\n".sprintf('- Name: `%s`', $callable); - } else { - $callableParts = explode('::', $callable); - - $string .= "\n".sprintf('- Name: `%s`', $callableParts[1]); - $string .= "\n".sprintf('- Class: `%s`', $callableParts[0]); - $string .= "\n- Static: yes"; - } - - return $this->write($string."\n"); - } - - if ($callable instanceof \Closure) { - $string .= "\n- Type: `closure`"; - - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return $this->write($string."\n"); - } - $string .= "\n".sprintf('- Name: `%s`', $r->name); - - if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { - $string .= "\n".sprintf('- Class: `%s`', $class->name); - if (!$r->getClosureThis()) { - $string .= "\n- Static: yes"; - } - } - - return $this->write($string."\n"); - } - - if (method_exists($callable, '__invoke')) { - $string .= "\n- Type: `object`"; - $string .= "\n".sprintf('- Name: `%s`', \get_class($callable)); - - return $this->write($string."\n"); - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } - - private function formatRouterConfig(array $array): string - { - if (!$array) { - return 'NONE'; - } - - $string = ''; - ksort($array); - foreach ($array as $name => $value) { - $string .= "\n".' - `'.$name.'`: '.$this->formatValue($value); - } - - return $string; - } -} diff --git a/lib/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php b/lib/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php deleted file mode 100644 index e7eb18762..000000000 --- a/lib/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php +++ /dev/null @@ -1,638 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\Dumper; -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class TextDescriptor extends Descriptor -{ - private $fileLinkFormatter; - - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this->fileLinkFormatter = $fileLinkFormatter; - } - - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $showControllers = isset($options['show_controllers']) && $options['show_controllers']; - - $tableHeaders = ['Name', 'Method', 'Scheme', 'Host', 'Path']; - if ($showControllers) { - $tableHeaders[] = 'Controller'; - } - - $tableRows = []; - foreach ($routes->all() as $name => $route) { - $controller = $route->getDefault('_controller'); - - $row = [ - $name, - $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', - $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', - '' !== $route->getHost() ? $route->getHost() : 'ANY', - $this->formatControllerLink($controller, $route->getPath(), $options['container'] ?? null), - ]; - - if ($showControllers) { - $row[] = $controller ? $this->formatControllerLink($controller, $this->formatCallable($controller), $options['container'] ?? null) : ''; - } - - $tableRows[] = $row; - } - - if (isset($options['output'])) { - $options['output']->table($tableHeaders, $tableRows); - } else { - $table = new Table($this->getOutput()); - $table->setHeaders($tableHeaders)->setRows($tableRows); - $table->render(); - } - } - - protected function describeRoute(Route $route, array $options = []) - { - $defaults = $route->getDefaults(); - if (isset($defaults['_controller'])) { - $defaults['_controller'] = $this->formatControllerLink($defaults['_controller'], $this->formatCallable($defaults['_controller']), $options['container'] ?? null); - } - - $tableHeaders = ['Property', 'Value']; - $tableRows = [ - ['Route Name', $options['name'] ?? ''], - ['Path', $route->getPath()], - ['Path Regex', $route->compile()->getRegex()], - ['Host', '' !== $route->getHost() ? $route->getHost() : 'ANY'], - ['Host Regex', '' !== $route->getHost() ? $route->compile()->getHostRegex() : ''], - ['Scheme', $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY'], - ['Method', $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY'], - ['Requirements', $route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM'], - ['Class', \get_class($route)], - ['Defaults', $this->formatRouterConfig($defaults)], - ['Options', $this->formatRouterConfig($route->getOptions())], - ]; - - if ('' !== $route->getCondition()) { - $tableRows[] = ['Condition', $route->getCondition()]; - } - - $table = new Table($this->getOutput()); - $table->setHeaders($tableHeaders)->setRows($tableRows); - $table->render(); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $tableHeaders = ['Parameter', 'Value']; - - $tableRows = []; - foreach ($this->sortParameters($parameters) as $parameter => $value) { - $tableRows[] = [$parameter, $this->formatParameter($value)]; - } - - $options['output']->title('Symfony Container Parameters'); - $options['output']->table($tableHeaders, $tableRows); - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - - if ($showHidden) { - $options['output']->title('Symfony Container Hidden Tags'); - } else { - $options['output']->title('Symfony Container Tags'); - } - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $options['output']->section(sprintf('"%s" tag', $tag)); - $options['output']->listing(array_keys($definitions)); - } - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - if ($service instanceof Alias) { - $this->describeContainerAlias($service, $options, $builder); - } elseif ($service instanceof Definition) { - $this->describeContainerDefinition($service, $options); - } else { - $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); - $options['output']->table( - ['Service ID', 'Class'], - [ - [$options['id'] ?? '-', \get_class($service)], - ] - ); - } - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $showTag = $options['tag'] ?? null; - - if ($showHidden) { - $title = 'Symfony Container Hidden Services'; - } else { - $title = 'Symfony Container Services'; - } - - if ($showTag) { - $title .= sprintf(' Tagged with "%s" Tag', $options['tag']); - } - - $options['output']->title($title); - - $serviceIds = isset($options['tag']) && $options['tag'] - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($options['tag'])) - : $this->sortServiceIds($builder->getServiceIds()); - $maxTags = []; - - if (isset($options['filter'])) { - $serviceIds = array_filter($serviceIds, $options['filter']); - } - - foreach ($serviceIds as $key => $serviceId) { - $definition = $this->resolveServiceDefinition($builder, $serviceId); - - // filter out hidden services unless shown explicitly - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - unset($serviceIds[$key]); - continue; - } - - if ($definition instanceof Definition) { - if ($showTag) { - $tags = $definition->getTag($showTag); - foreach ($tags as $tag) { - foreach ($tag as $key => $value) { - if (!isset($maxTags[$key])) { - $maxTags[$key] = \strlen($key); - } - if (\strlen($value) > $maxTags[$key]) { - $maxTags[$key] = \strlen($value); - } - } - } - } - } - } - - $tagsCount = \count($maxTags); - $tagsNames = array_keys($maxTags); - - $tableHeaders = array_merge(['Service ID'], $tagsNames, ['Class name']); - $tableRows = []; - $rawOutput = isset($options['raw_text']) && $options['raw_text']; - foreach ($serviceIds as $serviceId) { - $definition = $this->resolveServiceDefinition($builder, $serviceId); - - $styledServiceId = $rawOutput ? $serviceId : sprintf('%s', OutputFormatter::escape($serviceId)); - if ($definition instanceof Definition) { - if ($showTag) { - foreach ($this->sortByPriority($definition->getTag($showTag)) as $key => $tag) { - $tagValues = []; - foreach ($tagsNames as $tagName) { - $tagValues[] = $tag[$tagName] ?? ''; - } - if (0 === $key) { - $tableRows[] = array_merge([$serviceId], $tagValues, [$definition->getClass()]); - } else { - $tableRows[] = array_merge([' (same service as previous, another tag)'], $tagValues, ['']); - } - } - } else { - $tableRows[] = [$styledServiceId, $definition->getClass()]; - } - } elseif ($definition instanceof Alias) { - $alias = $definition; - $tableRows[] = array_merge([$styledServiceId, sprintf('alias for "%s"', $alias)], $tagsCount ? array_fill(0, $tagsCount, '') : []); - } else { - $tableRows[] = array_merge([$styledServiceId, \get_class($definition)], $tagsCount ? array_fill(0, $tagsCount, '') : []); - } - } - - $options['output']->table($tableHeaders, $tableRows); - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - if (isset($options['id'])) { - $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); - } - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $options['output']->text($classDescription."\n"); - } - - $tableHeaders = ['Option', 'Value']; - - $tableRows[] = ['Service ID', $options['id'] ?? '-']; - $tableRows[] = ['Class', $definition->getClass() ?: '-']; - - $omitTags = isset($options['omit_tags']) && $options['omit_tags']; - if (!$omitTags && ($tags = $definition->getTags())) { - $tagInformation = []; - foreach ($tags as $tagName => $tagData) { - foreach ($tagData as $tagParameters) { - $parameters = array_map(function ($key, $value) { - return sprintf('%s: %s', $key, $value); - }, array_keys($tagParameters), array_values($tagParameters)); - $parameters = implode(', ', $parameters); - - if ('' === $parameters) { - $tagInformation[] = sprintf('%s', $tagName); - } else { - $tagInformation[] = sprintf('%s (%s)', $tagName, $parameters); - } - } - } - $tagInformation = implode("\n", $tagInformation); - } else { - $tagInformation = '-'; - } - $tableRows[] = ['Tags', $tagInformation]; - - $calls = $definition->getMethodCalls(); - if (\count($calls) > 0) { - $callInformation = []; - foreach ($calls as $call) { - $callInformation[] = $call[0]; - } - $tableRows[] = ['Calls', implode(', ', $callInformation)]; - } - - $tableRows[] = ['Public', $definition->isPublic() && !$definition->isPrivate() ? 'yes' : 'no']; - $tableRows[] = ['Synthetic', $definition->isSynthetic() ? 'yes' : 'no']; - $tableRows[] = ['Lazy', $definition->isLazy() ? 'yes' : 'no']; - $tableRows[] = ['Shared', $definition->isShared() ? 'yes' : 'no']; - $tableRows[] = ['Abstract', $definition->isAbstract() ? 'yes' : 'no']; - $tableRows[] = ['Autowired', $definition->isAutowired() ? 'yes' : 'no']; - $tableRows[] = ['Autoconfigured', $definition->isAutoconfigured() ? 'yes' : 'no']; - - if ($definition->getFile()) { - $tableRows[] = ['Required File', $definition->getFile() ?: '-']; - } - - if ($factory = $definition->getFactory()) { - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $tableRows[] = ['Factory Service', $factory[0]]; - } elseif ($factory[0] instanceof Definition) { - $tableRows[] = ['Factory Service', sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'class not configured')]; - } else { - $tableRows[] = ['Factory Class', $factory[0]]; - } - $tableRows[] = ['Factory Method', $factory[1]]; - } else { - $tableRows[] = ['Factory Function', $factory]; - } - } - - $showArguments = isset($options['show_arguments']) && $options['show_arguments']; - $argumentsInformation = []; - if ($showArguments && ($arguments = $definition->getArguments())) { - foreach ($arguments as $argument) { - if ($argument instanceof ServiceClosureArgument) { - $argument = $argument->getValues()[0]; - } - if ($argument instanceof Reference) { - $argumentsInformation[] = sprintf('Service(%s)', (string) $argument); - } elseif ($argument instanceof IteratorArgument) { - if ($argument instanceof TaggedIteratorArgument) { - $argumentsInformation[] = sprintf('Tagged Iterator for "%s"%s', $argument->getTag(), $options['is_debug'] ? '' : sprintf(' (%d element(s))', \count($argument->getValues()))); - } else { - $argumentsInformation[] = sprintf('Iterator (%d element(s))', \count($argument->getValues())); - } - - foreach ($argument->getValues() as $ref) { - $argumentsInformation[] = sprintf('- Service(%s)', $ref); - } - } elseif ($argument instanceof ServiceLocatorArgument) { - $argumentsInformation[] = sprintf('Service locator (%d element(s))', \count($argument->getValues())); - } elseif ($argument instanceof Definition) { - $argumentsInformation[] = 'Inlined Service'; - } elseif ($argument instanceof \UnitEnum) { - $argumentsInformation[] = ltrim(var_export($argument, true), '\\'); - } elseif ($argument instanceof AbstractArgument) { - $argumentsInformation[] = sprintf('Abstract argument (%s)', $argument->getText()); - } else { - $argumentsInformation[] = \is_array($argument) ? sprintf('Array (%d element(s))', \count($argument)) : $argument; - } - } - - $tableRows[] = ['Arguments', implode("\n", $argumentsInformation)]; - } - - $options['output']->table($tableHeaders, $tableRows); - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - $options['output']->warning('The deprecation file does not exist, please try warming the cache first.'); - - return; - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - if (0 === \count($logs)) { - $options['output']->success('There are no deprecations in the logs!'); - - return; - } - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $formattedLogs[] = sprintf("%sx: %s\n in %s:%s", $log['count'], $log['message'], $log['file'], $log['line']); - $remainingCount += $log['count']; - } - $options['output']->title(sprintf('Remaining deprecations (%s)', $remainingCount)); - $options['output']->listing($formattedLogs); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - if ($alias->isPublic() && !$alias->isPrivate()) { - $options['output']->comment(sprintf('This service is a public alias for the service %s', (string) $alias)); - } else { - $options['output']->comment(sprintf('This service is a private alias for the service %s', (string) $alias)); - } - - if (!$builder) { - return; - } - - $this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias])); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $options['output']->table( - ['Parameter', 'Value'], - [ - [$options['parameter'], $this->formatParameter($parameter), - ], - ]); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - $dump = new Dumper($this->output); - $options['output']->title('Symfony Container Environment Variables'); - - if (null !== $name = $options['name'] ?? null) { - $options['output']->comment('Displaying detailed environment variable usage matching '.$name); - - $matches = false; - foreach ($envs as $env) { - if ($name === $env['name'] || false !== stripos($env['name'], $name)) { - $matches = true; - $options['output']->section('%env('.$env['processor'].':'.$env['name'].')%'); - $options['output']->table([], [ - ['Default value', $env['default_available'] ? $dump($env['default_value']) : 'n/a'], - ['Real value', $env['runtime_available'] ? $dump($env['runtime_value']) : 'n/a'], - ['Processed value', $env['default_available'] || $env['runtime_available'] ? $dump($env['processed_value']) : 'n/a'], - ]); - } - } - - if (!$matches) { - $options['output']->block('None of the environment variables match this name.'); - } else { - $options['output']->comment('Note real values might be different between web and CLI.'); - } - - return; - } - - if (!$envs) { - $options['output']->block('No environment variables are being used.'); - - return; - } - - $rows = []; - $missing = []; - foreach ($envs as $env) { - if (isset($rows[$env['name']])) { - continue; - } - - $rows[$env['name']] = [ - $env['name'], - $env['default_available'] ? $dump($env['default_value']) : 'n/a', - $env['runtime_available'] ? $dump($env['runtime_value']) : 'n/a', - ]; - if (!$env['default_available'] && !$env['runtime_available']) { - $missing[$env['name']] = true; - } - } - - $options['output']->table(['Name', 'Default value', 'Real value'], $rows); - $options['output']->comment('Note real values might be different between web and CLI.'); - - if ($missing) { - $options['output']->warning('The following variables are missing:'); - $options['output']->listing(array_keys($missing)); - } - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $event = $options['event'] ?? null; - $dispatcherServiceName = $options['dispatcher_service_name'] ?? null; - - $title = 'Registered Listeners'; - - if (null !== $dispatcherServiceName) { - $title .= sprintf(' of Event Dispatcher "%s"', $dispatcherServiceName); - } - - if (null !== $event) { - $title .= sprintf(' for "%s" Event', $event); - $registeredListeners = $eventDispatcher->getListeners($event); - } else { - $title .= ' Grouped by Event'; - // Try to see if "events" exists - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - } - - $options['output']->title($title); - if (null !== $event) { - $this->renderEventListenerTable($eventDispatcher, $event, $registeredListeners, $options['output']); - } else { - ksort($registeredListeners); - foreach ($registeredListeners as $eventListened => $eventListeners) { - $options['output']->section(sprintf('"%s" event', $eventListened)); - $this->renderEventListenerTable($eventDispatcher, $eventListened, $eventListeners, $options['output']); - } - } - } - - protected function describeCallable($callable, array $options = []) - { - $this->writeText($this->formatCallable($callable), $options); - } - - private function renderEventListenerTable(EventDispatcherInterface $eventDispatcher, string $event, array $eventListeners, SymfonyStyle $io) - { - $tableHeaders = ['Order', 'Callable', 'Priority']; - $tableRows = []; - - foreach ($eventListeners as $order => $listener) { - $tableRows[] = [sprintf('#%d', $order + 1), $this->formatCallable($listener), $eventDispatcher->getListenerPriority($event, $listener)]; - } - - $io->table($tableHeaders, $tableRows); - } - - private function formatRouterConfig(array $config): string - { - if (empty($config)) { - return 'NONE'; - } - - ksort($config); - - $configAsString = ''; - foreach ($config as $key => $value) { - $configAsString .= sprintf("\n%s: %s", $key, $this->formatValue($value)); - } - - return trim($configAsString); - } - - private function formatControllerLink($controller, string $anchorText, callable $getContainer = null): string - { - if (null === $this->fileLinkFormatter) { - return $anchorText; - } - - try { - if (null === $controller) { - return $anchorText; - } elseif (\is_array($controller)) { - $r = new \ReflectionMethod($controller[0], $controller[1]); - } elseif ($controller instanceof \Closure) { - $r = new \ReflectionFunction($controller); - } elseif (method_exists($controller, '__invoke')) { - $r = new \ReflectionMethod($controller, '__invoke'); - } elseif (!\is_string($controller)) { - return $anchorText; - } elseif (str_contains($controller, '::')) { - $r = new \ReflectionMethod($controller); - } else { - $r = new \ReflectionFunction($controller); - } - } catch (\ReflectionException $e) { - if (\is_array($controller)) { - $controller = implode('::', $controller); - } - - $id = $controller; - $method = '__invoke'; - - if ($pos = strpos($controller, '::')) { - $id = substr($controller, 0, $pos); - $method = substr($controller, $pos + 2); - } - - if (!$getContainer || !($container = $getContainer()) || !$container->has($id)) { - return $anchorText; - } - - try { - $r = new \ReflectionMethod($container->findDefinition($id)->getClass(), $method); - } catch (\ReflectionException $e) { - return $anchorText; - } - } - - $fileLink = $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); - if ($fileLink) { - return sprintf('%s', $fileLink, $anchorText); - } - - return $anchorText; - } - - private function formatCallable($callable): string - { - if (\is_array($callable)) { - if (\is_object($callable[0])) { - return sprintf('%s::%s()', \get_class($callable[0]), $callable[1]); - } - - return sprintf('%s::%s()', $callable[0], $callable[1]); - } - - if (\is_string($callable)) { - return sprintf('%s()', $callable); - } - - if ($callable instanceof \Closure) { - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return 'Closure()'; - } - if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { - return sprintf('%s::%s()', $class->name, $r->name); - } - - return $r->name.'()'; - } - - if (method_exists($callable, '__invoke')) { - return sprintf('%s::__invoke()', \get_class($callable)); - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } - - private function writeText(string $content, array $options = []) - { - $this->write( - isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, - isset($options['raw_output']) ? !$options['raw_output'] : true - ); - } -} diff --git a/lib/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php b/lib/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php deleted file mode 100644 index 350452f33..000000000 --- a/lib/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php +++ /dev/null @@ -1,570 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class XmlDescriptor extends Descriptor -{ - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $this->writeDocument($this->getRouteCollectionDocument($routes)); - } - - protected function describeRoute(Route $route, array $options = []) - { - $this->writeDocument($this->getRouteDocument($route, $options['name'] ?? null)); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $this->writeDocument($this->getContainerParametersDocument($parameters)); - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_hidden']) && $options['show_hidden'])); - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - $this->writeDocument($this->getContainerServiceDocument($service, $options['id'], $builder, isset($options['show_arguments']) && $options['show_arguments'])); - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $this->writeDocument($this->getContainerServicesDocument($builder, $options['tag'] ?? null, isset($options['show_hidden']) && $options['show_hidden'], isset($options['show_arguments']) && $options['show_arguments'], $options['filter'] ?? null)); - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - $this->writeDocument($this->getContainerDefinitionDocument($definition, $options['id'] ?? null, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments'])); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($dom->importNode($this->getContainerAliasDocument($alias, $options['id'] ?? null)->childNodes->item(0), true)); - - if (!$builder) { - $this->writeDocument($dom); - - return; - } - - $dom->appendChild($dom->importNode($this->getContainerDefinitionDocument($builder->getDefinition((string) $alias), (string) $alias)->childNodes->item(0), true)); - - $this->writeDocument($dom); - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $this->writeDocument($this->getEventDispatcherListenersDocument($eventDispatcher, $options)); - } - - protected function describeCallable($callable, array $options = []) - { - $this->writeDocument($this->getCallableDocument($callable)); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $this->writeDocument($this->getContainerParameterDocument($parameter, $options)); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - throw new LogicException('Using the XML format to debug environment variables is not supported.'); - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - throw new RuntimeException('The deprecation file does not exist, please try warming the cache first.'); - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($deprecationsXML = $dom->createElement('deprecations')); - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $deprecationsXML->appendChild($deprecationXML = $dom->createElement('deprecation')); - $deprecationXML->setAttribute('count', $log['count']); - $deprecationXML->appendChild($dom->createElement('message', $log['message'])); - $deprecationXML->appendChild($dom->createElement('file', $log['file'])); - $deprecationXML->appendChild($dom->createElement('line', $log['line'])); - $remainingCount += $log['count']; - } - - $deprecationsXML->setAttribute('remainingCount', $remainingCount); - - $this->writeDocument($dom); - } - - private function writeDocument(\DOMDocument $dom) - { - $dom->formatOutput = true; - $this->write($dom->saveXML()); - } - - private function getRouteCollectionDocument(RouteCollection $routes): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($routesXML = $dom->createElement('routes')); - - foreach ($routes->all() as $name => $route) { - $routeXML = $this->getRouteDocument($route, $name); - $routesXML->appendChild($routesXML->ownerDocument->importNode($routeXML->childNodes->item(0), true)); - } - - return $dom; - } - - private function getRouteDocument(Route $route, string $name = null): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($routeXML = $dom->createElement('route')); - - if ($name) { - $routeXML->setAttribute('name', $name); - } - - $routeXML->setAttribute('class', \get_class($route)); - - $routeXML->appendChild($pathXML = $dom->createElement('path')); - $pathXML->setAttribute('regex', $route->compile()->getRegex()); - $pathXML->appendChild(new \DOMText($route->getPath())); - - if ('' !== $route->getHost()) { - $routeXML->appendChild($hostXML = $dom->createElement('host')); - $hostXML->setAttribute('regex', $route->compile()->getHostRegex()); - $hostXML->appendChild(new \DOMText($route->getHost())); - } - - foreach ($route->getSchemes() as $scheme) { - $routeXML->appendChild($schemeXML = $dom->createElement('scheme')); - $schemeXML->appendChild(new \DOMText($scheme)); - } - - foreach ($route->getMethods() as $method) { - $routeXML->appendChild($methodXML = $dom->createElement('method')); - $methodXML->appendChild(new \DOMText($method)); - } - - if ($route->getDefaults()) { - $routeXML->appendChild($defaultsXML = $dom->createElement('defaults')); - foreach ($route->getDefaults() as $attribute => $value) { - $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); - $defaultXML->setAttribute('key', $attribute); - $defaultXML->appendChild(new \DOMText($this->formatValue($value))); - } - } - - $originRequirements = $requirements = $route->getRequirements(); - unset($requirements['_scheme'], $requirements['_method']); - if ($requirements) { - $routeXML->appendChild($requirementsXML = $dom->createElement('requirements')); - foreach ($originRequirements as $attribute => $pattern) { - $requirementsXML->appendChild($requirementXML = $dom->createElement('requirement')); - $requirementXML->setAttribute('key', $attribute); - $requirementXML->appendChild(new \DOMText($pattern)); - } - } - - if ($route->getOptions()) { - $routeXML->appendChild($optionsXML = $dom->createElement('options')); - foreach ($route->getOptions() as $name => $value) { - $optionsXML->appendChild($optionXML = $dom->createElement('option')); - $optionXML->setAttribute('key', $name); - $optionXML->appendChild(new \DOMText($this->formatValue($value))); - } - } - - if ('' !== $route->getCondition()) { - $routeXML->appendChild($conditionXML = $dom->createElement('condition')); - $conditionXML->appendChild(new \DOMText($route->getCondition())); - } - - return $dom; - } - - private function getContainerParametersDocument(ParameterBag $parameters): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($parametersXML = $dom->createElement('parameters')); - - foreach ($this->sortParameters($parameters) as $key => $value) { - $parametersXML->appendChild($parameterXML = $dom->createElement('parameter')); - $parameterXML->setAttribute('key', $key); - $parameterXML->appendChild(new \DOMText($this->formatParameter($value))); - } - - return $dom; - } - - private function getContainerTagsDocument(ContainerBuilder $builder, bool $showHidden = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($containerXML = $dom->createElement('container')); - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $containerXML->appendChild($tagXML = $dom->createElement('tag')); - $tagXML->setAttribute('name', $tag); - - foreach ($definitions as $serviceId => $definition) { - $definitionXML = $this->getContainerDefinitionDocument($definition, $serviceId, true); - $tagXML->appendChild($dom->importNode($definitionXML->childNodes->item(0), true)); - } - } - - return $dom; - } - - private function getContainerServiceDocument(object $service, string $id, ContainerBuilder $builder = null, bool $showArguments = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - - if ($service instanceof Alias) { - $dom->appendChild($dom->importNode($this->getContainerAliasDocument($service, $id)->childNodes->item(0), true)); - if ($builder) { - $dom->appendChild($dom->importNode($this->getContainerDefinitionDocument($builder->getDefinition((string) $service), (string) $service, false, $showArguments)->childNodes->item(0), true)); - } - } elseif ($service instanceof Definition) { - $dom->appendChild($dom->importNode($this->getContainerDefinitionDocument($service, $id, false, $showArguments)->childNodes->item(0), true)); - } else { - $dom->appendChild($serviceXML = $dom->createElement('service')); - $serviceXML->setAttribute('id', $id); - $serviceXML->setAttribute('class', \get_class($service)); - } - - return $dom; - } - - private function getContainerServicesDocument(ContainerBuilder $builder, string $tag = null, bool $showHidden = false, bool $showArguments = false, callable $filter = null): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($containerXML = $dom->createElement('container')); - - $serviceIds = $tag - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($tag)) - : $this->sortServiceIds($builder->getServiceIds()); - if ($filter) { - $serviceIds = array_filter($serviceIds, $filter); - } - - foreach ($serviceIds as $serviceId) { - $service = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - $serviceXML = $this->getContainerServiceDocument($service, $serviceId, null, $showArguments); - $containerXML->appendChild($containerXML->ownerDocument->importNode($serviceXML->childNodes->item(0), true)); - } - - return $dom; - } - - private function getContainerDefinitionDocument(Definition $definition, string $id = null, bool $omitTags = false, bool $showArguments = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($serviceXML = $dom->createElement('definition')); - - if ($id) { - $serviceXML->setAttribute('id', $id); - } - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $serviceXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createCDATASection($classDescription)); - } - - $serviceXML->setAttribute('class', $definition->getClass() ?? ''); - - if ($factory = $definition->getFactory()) { - $serviceXML->appendChild($factoryXML = $dom->createElement('factory')); - - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $factoryXML->setAttribute('service', (string) $factory[0]); - } elseif ($factory[0] instanceof Definition) { - $factoryXML->setAttribute('service', sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'not configured')); - } else { - $factoryXML->setAttribute('class', $factory[0]); - } - $factoryXML->setAttribute('method', $factory[1]); - } else { - $factoryXML->setAttribute('function', $factory); - } - } - - $serviceXML->setAttribute('public', $definition->isPublic() && !$definition->isPrivate() ? 'true' : 'false'); - $serviceXML->setAttribute('synthetic', $definition->isSynthetic() ? 'true' : 'false'); - $serviceXML->setAttribute('lazy', $definition->isLazy() ? 'true' : 'false'); - $serviceXML->setAttribute('shared', $definition->isShared() ? 'true' : 'false'); - $serviceXML->setAttribute('abstract', $definition->isAbstract() ? 'true' : 'false'); - $serviceXML->setAttribute('autowired', $definition->isAutowired() ? 'true' : 'false'); - $serviceXML->setAttribute('autoconfigured', $definition->isAutoconfigured() ? 'true' : 'false'); - $serviceXML->setAttribute('file', $definition->getFile() ?? ''); - - $calls = $definition->getMethodCalls(); - if (\count($calls) > 0) { - $serviceXML->appendChild($callsXML = $dom->createElement('calls')); - foreach ($calls as $callData) { - $callsXML->appendChild($callXML = $dom->createElement('call')); - $callXML->setAttribute('method', $callData[0]); - if ($callData[2] ?? false) { - $callXML->setAttribute('returns-clone', 'true'); - } - } - } - - if ($showArguments) { - foreach ($this->getArgumentNodes($definition->getArguments(), $dom) as $node) { - $serviceXML->appendChild($node); - } - } - - if (!$omitTags) { - if ($tags = $this->sortTagsByPriority($definition->getTags())) { - $serviceXML->appendChild($tagsXML = $dom->createElement('tags')); - foreach ($tags as $tagName => $tagData) { - foreach ($tagData as $parameters) { - $tagsXML->appendChild($tagXML = $dom->createElement('tag')); - $tagXML->setAttribute('name', $tagName); - foreach ($parameters as $name => $value) { - $tagXML->appendChild($parameterXML = $dom->createElement('parameter')); - $parameterXML->setAttribute('name', $name); - $parameterXML->appendChild(new \DOMText($this->formatParameter($value))); - } - } - } - } - } - - return $dom; - } - - /** - * @return \DOMNode[] - */ - private function getArgumentNodes(array $arguments, \DOMDocument $dom): array - { - $nodes = []; - - foreach ($arguments as $argumentKey => $argument) { - $argumentXML = $dom->createElement('argument'); - - if (\is_string($argumentKey)) { - $argumentXML->setAttribute('key', $argumentKey); - } - - if ($argument instanceof ServiceClosureArgument) { - $argument = $argument->getValues()[0]; - } - - if ($argument instanceof Reference) { - $argumentXML->setAttribute('type', 'service'); - $argumentXML->setAttribute('id', (string) $argument); - } elseif ($argument instanceof IteratorArgument || $argument instanceof ServiceLocatorArgument) { - $argumentXML->setAttribute('type', $argument instanceof IteratorArgument ? 'iterator' : 'service_locator'); - - foreach ($this->getArgumentNodes($argument->getValues(), $dom) as $childArgumentXML) { - $argumentXML->appendChild($childArgumentXML); - } - } elseif ($argument instanceof Definition) { - $argumentXML->appendChild($dom->importNode($this->getContainerDefinitionDocument($argument, null, false, true)->childNodes->item(0), true)); - } elseif ($argument instanceof AbstractArgument) { - $argumentXML->setAttribute('type', 'abstract'); - $argumentXML->appendChild(new \DOMText($argument->getText())); - } elseif (\is_array($argument)) { - $argumentXML->setAttribute('type', 'collection'); - - foreach ($this->getArgumentNodes($argument, $dom) as $childArgumentXML) { - $argumentXML->appendChild($childArgumentXML); - } - } elseif ($argument instanceof \UnitEnum) { - $argumentXML->setAttribute('type', 'constant'); - $argumentXML->appendChild(new \DOMText(ltrim(var_export($argument, true), '\\'))); - } else { - $argumentXML->appendChild(new \DOMText($argument)); - } - - $nodes[] = $argumentXML; - } - - return $nodes; - } - - private function getContainerAliasDocument(Alias $alias, string $id = null): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($aliasXML = $dom->createElement('alias')); - - if ($id) { - $aliasXML->setAttribute('id', $id); - } - - $aliasXML->setAttribute('service', (string) $alias); - $aliasXML->setAttribute('public', $alias->isPublic() && !$alias->isPrivate() ? 'true' : 'false'); - - return $dom; - } - - private function getContainerParameterDocument($parameter, array $options = []): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($parameterXML = $dom->createElement('parameter')); - - if (isset($options['parameter'])) { - $parameterXML->setAttribute('key', $options['parameter']); - } - - $parameterXML->appendChild(new \DOMText($this->formatParameter($parameter))); - - return $dom; - } - - private function getEventDispatcherListenersDocument(EventDispatcherInterface $eventDispatcher, array $options): \DOMDocument - { - $event = \array_key_exists('event', $options) ? $options['event'] : null; - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($eventDispatcherXML = $dom->createElement('event-dispatcher')); - - if (null !== $event) { - $registeredListeners = $eventDispatcher->getListeners($event); - $this->appendEventListenerDocument($eventDispatcher, $event, $eventDispatcherXML, $registeredListeners); - } else { - // Try to see if "events" exists - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - ksort($registeredListeners); - - foreach ($registeredListeners as $eventListened => $eventListeners) { - $eventDispatcherXML->appendChild($eventXML = $dom->createElement('event')); - $eventXML->setAttribute('name', $eventListened); - - $this->appendEventListenerDocument($eventDispatcher, $eventListened, $eventXML, $eventListeners); - } - } - - return $dom; - } - - private function appendEventListenerDocument(EventDispatcherInterface $eventDispatcher, string $event, \DOMElement $element, array $eventListeners) - { - foreach ($eventListeners as $listener) { - $callableXML = $this->getCallableDocument($listener); - $callableXML->childNodes->item(0)->setAttribute('priority', $eventDispatcher->getListenerPriority($event, $listener)); - - $element->appendChild($element->ownerDocument->importNode($callableXML->childNodes->item(0), true)); - } - } - - private function getCallableDocument($callable): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($callableXML = $dom->createElement('callable')); - - if (\is_array($callable)) { - $callableXML->setAttribute('type', 'function'); - - if (\is_object($callable[0])) { - $callableXML->setAttribute('name', $callable[1]); - $callableXML->setAttribute('class', \get_class($callable[0])); - } else { - if (!str_starts_with($callable[1], 'parent::')) { - $callableXML->setAttribute('name', $callable[1]); - $callableXML->setAttribute('class', $callable[0]); - $callableXML->setAttribute('static', 'true'); - } else { - $callableXML->setAttribute('name', substr($callable[1], 8)); - $callableXML->setAttribute('class', $callable[0]); - $callableXML->setAttribute('static', 'true'); - $callableXML->setAttribute('parent', 'true'); - } - } - - return $dom; - } - - if (\is_string($callable)) { - $callableXML->setAttribute('type', 'function'); - - if (!str_contains($callable, '::')) { - $callableXML->setAttribute('name', $callable); - } else { - $callableParts = explode('::', $callable); - - $callableXML->setAttribute('name', $callableParts[1]); - $callableXML->setAttribute('class', $callableParts[0]); - $callableXML->setAttribute('static', 'true'); - } - - return $dom; - } - - if ($callable instanceof \Closure) { - $callableXML->setAttribute('type', 'closure'); - - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return $dom; - } - $callableXML->setAttribute('name', $r->name); - - if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { - $callableXML->setAttribute('class', $class->name); - if (!$r->getClosureThis()) { - $callableXML->setAttribute('static', 'true'); - } - } - - return $dom; - } - - if (method_exists($callable, '__invoke')) { - $callableXML->setAttribute('type', 'object'); - $callableXML->setAttribute('name', \get_class($callable)); - - return $dom; - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } -} diff --git a/lib/symfony/framework-bundle/Console/Helper/DescriptorHelper.php b/lib/symfony/framework-bundle/Console/Helper/DescriptorHelper.php deleted file mode 100644 index 1f17c9994..000000000 --- a/lib/symfony/framework-bundle/Console/Helper/DescriptorHelper.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Helper; - -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\JsonDescriptor; -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\MarkdownDescriptor; -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor; -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * @author Jean-François Simon - * - * @internal - */ -class DescriptorHelper extends BaseDescriptorHelper -{ - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this - ->register('txt', new TextDescriptor($fileLinkFormatter)) - ->register('xml', new XmlDescriptor()) - ->register('json', new JsonDescriptor()) - ->register('md', new MarkdownDescriptor()) - ; - } -} diff --git a/lib/symfony/framework-bundle/Controller/AbstractController.php b/lib/symfony/framework-bundle/Controller/AbstractController.php deleted file mode 100644 index f6eff3f61..000000000 --- a/lib/symfony/framework-bundle/Controller/AbstractController.php +++ /dev/null @@ -1,476 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Doctrine\Persistence\ManagerRegistry; -use Psr\Container\ContainerInterface; -use Psr\Link\LinkInterface; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\HttpFoundation\BinaryFileResponse; -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\ResponseHeaderBag; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\Messenger\Envelope; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\RouterInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Serializer\SerializerInterface; -use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener; -use Symfony\Component\WebLink\GenericLinkProvider; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Twig\Environment; - -/** - * Provides shortcuts for HTTP-related features in controllers. - * - * @author Fabien Potencier - */ -abstract class AbstractController implements ServiceSubscriberInterface -{ - /** - * @var ContainerInterface - */ - protected $container; - - /** - * @required - */ - public function setContainer(ContainerInterface $container): ?ContainerInterface - { - $previous = $this->container; - $this->container = $container; - - return $previous; - } - - /** - * Gets a container parameter by its name. - * - * @return array|bool|float|int|string|\UnitEnum|null - */ - protected function getParameter(string $name) - { - if (!$this->container->has('parameter_bag')) { - throw new ServiceNotFoundException('parameter_bag.', null, null, [], sprintf('The "%s::getParameter()" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller.', static::class)); - } - - return $this->container->get('parameter_bag')->get($name); - } - - public static function getSubscribedServices() - { - return [ - 'router' => '?'.RouterInterface::class, - 'request_stack' => '?'.RequestStack::class, - 'http_kernel' => '?'.HttpKernelInterface::class, - 'serializer' => '?'.SerializerInterface::class, - 'session' => '?'.SessionInterface::class, - 'security.authorization_checker' => '?'.AuthorizationCheckerInterface::class, - 'twig' => '?'.Environment::class, - 'doctrine' => '?'.ManagerRegistry::class, // to be removed in 6.0 - 'form.factory' => '?'.FormFactoryInterface::class, - 'security.token_storage' => '?'.TokenStorageInterface::class, - 'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class, - 'parameter_bag' => '?'.ContainerBagInterface::class, - 'message_bus' => '?'.MessageBusInterface::class, // to be removed in 6.0 - 'messenger.default_bus' => '?'.MessageBusInterface::class, // to be removed in 6.0 - ]; - } - - /** - * Returns true if the service id is defined. - * - * @deprecated since Symfony 5.4, use method or constructor injection in your controller instead - */ - protected function has(string $id): bool - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, use method or constructor injection in your controller instead.', __METHOD__); - - return $this->container->has($id); - } - - /** - * Gets a container service by its id. - * - * @return object The service - * - * @deprecated since Symfony 5.4, use method or constructor injection in your controller instead - */ - protected function get(string $id): object - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, use method or constructor injection in your controller instead.', __METHOD__); - - return $this->container->get($id); - } - - /** - * Generates a URL from the given parameters. - * - * @see UrlGeneratorInterface - */ - protected function generateUrl(string $route, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string - { - return $this->container->get('router')->generate($route, $parameters, $referenceType); - } - - /** - * Forwards the request to another controller. - * - * @param string $controller The controller name (a string like Bundle\BlogBundle\Controller\PostController::indexAction) - */ - protected function forward(string $controller, array $path = [], array $query = []): Response - { - $request = $this->container->get('request_stack')->getCurrentRequest(); - $path['_controller'] = $controller; - $subRequest = $request->duplicate($query, null, $path); - - return $this->container->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST); - } - - /** - * Returns a RedirectResponse to the given URL. - */ - protected function redirect(string $url, int $status = 302): RedirectResponse - { - return new RedirectResponse($url, $status); - } - - /** - * Returns a RedirectResponse to the given route with the given parameters. - */ - protected function redirectToRoute(string $route, array $parameters = [], int $status = 302): RedirectResponse - { - return $this->redirect($this->generateUrl($route, $parameters), $status); - } - - /** - * Returns a JsonResponse that uses the serializer component if enabled, or json_encode. - */ - protected function json($data, int $status = 200, array $headers = [], array $context = []): JsonResponse - { - if ($this->container->has('serializer')) { - $json = $this->container->get('serializer')->serialize($data, 'json', array_merge([ - 'json_encode_options' => JsonResponse::DEFAULT_ENCODING_OPTIONS, - ], $context)); - - return new JsonResponse($json, $status, $headers, true); - } - - return new JsonResponse($data, $status, $headers); - } - - /** - * Returns a BinaryFileResponse object with original or customized file name and disposition header. - * - * @param \SplFileInfo|string $file File object or path to file to be sent as response - */ - protected function file($file, string $fileName = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT): BinaryFileResponse - { - $response = new BinaryFileResponse($file); - $response->setContentDisposition($disposition, null === $fileName ? $response->getFile()->getFilename() : $fileName); - - return $response; - } - - /** - * Adds a flash message to the current session for type. - * - * @throws \LogicException - */ - protected function addFlash(string $type, $message): void - { - try { - $this->container->get('request_stack')->getSession()->getFlashBag()->add($type, $message); - } catch (SessionNotFoundException $e) { - throw new \LogicException('You cannot use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".', 0, $e); - } - } - - /** - * Checks if the attribute is granted against the current authentication token and optionally supplied subject. - * - * @throws \LogicException - */ - protected function isGranted($attribute, $subject = null): bool - { - if (!$this->container->has('security.authorization_checker')) { - throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); - } - - return $this->container->get('security.authorization_checker')->isGranted($attribute, $subject); - } - - /** - * Throws an exception unless the attribute is granted against the current authentication token and optionally - * supplied subject. - * - * @throws AccessDeniedException - */ - protected function denyAccessUnlessGranted($attribute, $subject = null, string $message = 'Access Denied.'): void - { - if (!$this->isGranted($attribute, $subject)) { - $exception = $this->createAccessDeniedException($message); - $exception->setAttributes($attribute); - $exception->setSubject($subject); - - throw $exception; - } - } - - /** - * Returns a rendered view. - */ - protected function renderView(string $view, array $parameters = []): string - { - if (!$this->container->has('twig')) { - throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".'); - } - - return $this->container->get('twig')->render($view, $parameters); - } - - /** - * Renders a view. - */ - protected function render(string $view, array $parameters = [], Response $response = null): Response - { - $content = $this->renderView($view, $parameters); - - if (null === $response) { - $response = new Response(); - } - - $response->setContent($content); - - return $response; - } - - /** - * Renders a view and sets the appropriate status code when a form is listed in parameters. - * - * If an invalid form is found in the list of parameters, a 422 status code is returned. - */ - protected function renderForm(string $view, array $parameters = [], Response $response = null): Response - { - if (null === $response) { - $response = new Response(); - } - - foreach ($parameters as $k => $v) { - if ($v instanceof FormView) { - throw new \LogicException(sprintf('Passing a FormView to "%s::renderForm()" is not supported, pass directly the form instead for parameter "%s".', get_debug_type($this), $k)); - } - - if (!$v instanceof FormInterface) { - continue; - } - - $parameters[$k] = $v->createView(); - - if (200 === $response->getStatusCode() && $v->isSubmitted() && !$v->isValid()) { - $response->setStatusCode(422); - } - } - - return $this->render($view, $parameters, $response); - } - - /** - * Streams a view. - */ - protected function stream(string $view, array $parameters = [], StreamedResponse $response = null): StreamedResponse - { - if (!$this->container->has('twig')) { - throw new \LogicException('You cannot use the "stream" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".'); - } - - $twig = $this->container->get('twig'); - - $callback = function () use ($twig, $view, $parameters) { - $twig->display($view, $parameters); - }; - - if (null === $response) { - return new StreamedResponse($callback); - } - - $response->setCallback($callback); - - return $response; - } - - /** - * Returns a NotFoundHttpException. - * - * This will result in a 404 response code. Usage example: - * - * throw $this->createNotFoundException('Page not found!'); - */ - protected function createNotFoundException(string $message = 'Not Found', \Throwable $previous = null): NotFoundHttpException - { - return new NotFoundHttpException($message, $previous); - } - - /** - * Returns an AccessDeniedException. - * - * This will result in a 403 response code. Usage example: - * - * throw $this->createAccessDeniedException('Unable to access this page!'); - * - * @throws \LogicException If the Security component is not available - */ - protected function createAccessDeniedException(string $message = 'Access Denied.', \Throwable $previous = null): AccessDeniedException - { - if (!class_exists(AccessDeniedException::class)) { - throw new \LogicException('You cannot use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".'); - } - - return new AccessDeniedException($message, $previous); - } - - /** - * Creates and returns a Form instance from the type of the form. - */ - protected function createForm(string $type, $data = null, array $options = []): FormInterface - { - return $this->container->get('form.factory')->create($type, $data, $options); - } - - /** - * Creates and returns a form builder instance. - */ - protected function createFormBuilder($data = null, array $options = []): FormBuilderInterface - { - return $this->container->get('form.factory')->createBuilder(FormType::class, $data, $options); - } - - /** - * Shortcut to return the Doctrine Registry service. - * - * @throws \LogicException If DoctrineBundle is not available - * - * @deprecated since Symfony 5.4, inject an instance of ManagerRegistry in your controller instead - */ - protected function getDoctrine(): ManagerRegistry - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, inject an instance of ManagerRegistry in your controller instead.', __METHOD__); - - if (!$this->container->has('doctrine')) { - throw new \LogicException('The DoctrineBundle is not registered in your application. Try running "composer require symfony/orm-pack".'); - } - - return $this->container->get('doctrine'); - } - - /** - * Get a user from the Security Token Storage. - * - * @return UserInterface|null - * - * @throws \LogicException If SecurityBundle is not available - * - * @see TokenInterface::getUser() - */ - protected function getUser() - { - if (!$this->container->has('security.token_storage')) { - throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); - } - - if (null === $token = $this->container->get('security.token_storage')->getToken()) { - return null; - } - - // @deprecated since 5.4, $user will always be a UserInterface instance - if (!\is_object($user = $token->getUser())) { - // e.g. anonymous authentication - return null; - } - - return $user; - } - - /** - * Checks the validity of a CSRF token. - * - * @param string $id The id used when generating the token - * @param string|null $token The actual token sent with the request that should be validated - */ - protected function isCsrfTokenValid(string $id, ?string $token): bool - { - if (!$this->container->has('security.csrf.token_manager')) { - throw new \LogicException('CSRF protection is not enabled in your application. Enable it with the "csrf_protection" key in "config/packages/framework.yaml".'); - } - - return $this->container->get('security.csrf.token_manager')->isTokenValid(new CsrfToken($id, $token)); - } - - /** - * Dispatches a message to the bus. - * - * @param object|Envelope $message The message or the message pre-wrapped in an envelope - * - * @deprecated since Symfony 5.4, inject an instance of MessageBusInterface in your controller instead - */ - protected function dispatchMessage(object $message, array $stamps = []): Envelope - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, inject an instance of MessageBusInterface in your controller instead.', __METHOD__); - - if (!$this->container->has('messenger.default_bus')) { - $message = class_exists(Envelope::class) ? 'You need to define the "messenger.default_bus" configuration option.' : 'Try running "composer require symfony/messenger".'; - throw new \LogicException('The message bus is not enabled in your application. '.$message); - } - - return $this->container->get('messenger.default_bus')->dispatch($message, $stamps); - } - - /** - * Adds a Link HTTP header to the current response. - * - * @see https://tools.ietf.org/html/rfc5988 - */ - protected function addLink(Request $request, LinkInterface $link): void - { - if (!class_exists(AddLinkHeaderListener::class)) { - throw new \LogicException('You cannot use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".'); - } - - if (null === $linkProvider = $request->attributes->get('_links')) { - $request->attributes->set('_links', new GenericLinkProvider([$link])); - - return; - } - - $request->attributes->set('_links', $linkProvider->withLink($link)); - } -} diff --git a/lib/symfony/framework-bundle/Controller/ControllerResolver.php b/lib/symfony/framework-bundle/Controller/ControllerResolver.php deleted file mode 100644 index 0539c1ee7..000000000 --- a/lib/symfony/framework-bundle/Controller/ControllerResolver.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver; - -/** - * @author Fabien Potencier - * - * @final - */ -class ControllerResolver extends ContainerControllerResolver -{ - /** - * {@inheritdoc} - */ - protected function instantiateController(string $class): object - { - $controller = parent::instantiateController($class); - - if ($controller instanceof ContainerAwareInterface) { - $controller->setContainer($this->container); - } - if ($controller instanceof AbstractController) { - if (null === $previousContainer = $controller->setContainer($this->container)) { - throw new \LogicException(sprintf('"%s" has no container set, did you forget to define it as a service subscriber?', $class)); - } else { - $controller->setContainer($previousContainer); - } - } - - return $controller; - } -} diff --git a/lib/symfony/framework-bundle/Controller/RedirectController.php b/lib/symfony/framework-bundle/Controller/RedirectController.php deleted file mode 100644 index 6a0fed64f..000000000 --- a/lib/symfony/framework-bundle/Controller/RedirectController.php +++ /dev/null @@ -1,189 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Symfony\Component\HttpFoundation\HeaderUtils; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - -/** - * Redirects a request to another URL. - * - * @author Fabien Potencier - * - * @final - */ -class RedirectController -{ - private $router; - private $httpPort; - private $httpsPort; - - public function __construct(UrlGeneratorInterface $router = null, int $httpPort = null, int $httpsPort = null) - { - $this->router = $router; - $this->httpPort = $httpPort; - $this->httpsPort = $httpsPort; - } - - /** - * Redirects to another route with the given name. - * - * The response status code is 302 if the permanent parameter is false (default), - * and 301 if the redirection is permanent. - * - * In case the route name is empty, the status code will be 404 when permanent is false - * and 410 otherwise. - * - * @param string $route The route name to redirect to - * @param bool $permanent Whether the redirection is permanent - * @param bool|array $ignoreAttributes Whether to ignore attributes or an array of attributes to ignore - * @param bool $keepRequestMethod Whether redirect action should keep HTTP request method - * - * @throws HttpException In case the route name is empty - */ - public function redirectAction(Request $request, string $route, bool $permanent = false, $ignoreAttributes = false, bool $keepRequestMethod = false, bool $keepQueryParams = false): Response - { - if ('' == $route) { - throw new HttpException($permanent ? 410 : 404); - } - - $attributes = []; - if (false === $ignoreAttributes || \is_array($ignoreAttributes)) { - $attributes = $request->attributes->get('_route_params'); - - if ($keepQueryParams) { - if ($query = $request->server->get('QUERY_STRING')) { - $query = HeaderUtils::parseQuery($query); - } else { - $query = $request->query->all(); - } - - $attributes = array_merge($query, $attributes); - } - - unset($attributes['route'], $attributes['permanent'], $attributes['ignoreAttributes'], $attributes['keepRequestMethod'], $attributes['keepQueryParams']); - if ($ignoreAttributes) { - $attributes = array_diff_key($attributes, array_flip($ignoreAttributes)); - } - } - - if ($keepRequestMethod) { - $statusCode = $permanent ? 308 : 307; - } else { - $statusCode = $permanent ? 301 : 302; - } - - return new RedirectResponse($this->router->generate($route, $attributes, UrlGeneratorInterface::ABSOLUTE_URL), $statusCode); - } - - /** - * Redirects to a URL. - * - * The response status code is 302 if the permanent parameter is false (default), - * and 301 if the redirection is permanent. - * - * In case the path is empty, the status code will be 404 when permanent is false - * and 410 otherwise. - * - * @param string $path The absolute path or URL to redirect to - * @param bool $permanent Whether the redirect is permanent or not - * @param string|null $scheme The URL scheme (null to keep the current one) - * @param int|null $httpPort The HTTP port (null to keep the current one for the same scheme or the default configured port) - * @param int|null $httpsPort The HTTPS port (null to keep the current one for the same scheme or the default configured port) - * @param bool $keepRequestMethod Whether redirect action should keep HTTP request method - * - * @throws HttpException In case the path is empty - */ - public function urlRedirectAction(Request $request, string $path, bool $permanent = false, string $scheme = null, int $httpPort = null, int $httpsPort = null, bool $keepRequestMethod = false): Response - { - if ('' == $path) { - throw new HttpException($permanent ? 410 : 404); - } - - if ($keepRequestMethod) { - $statusCode = $permanent ? 308 : 307; - } else { - $statusCode = $permanent ? 301 : 302; - } - - // redirect if the path is a full URL - if (parse_url($path, \PHP_URL_SCHEME)) { - return new RedirectResponse($path, $statusCode); - } - - if (null === $scheme) { - $scheme = $request->getScheme(); - } - - if ($qs = $request->server->get('QUERY_STRING') ?: $request->getQueryString()) { - if (!str_contains($path, '?')) { - $qs = '?'.$qs; - } else { - $qs = '&'.$qs; - } - } - - $port = ''; - if ('http' === $scheme) { - if (null === $httpPort) { - if ('http' === $request->getScheme()) { - $httpPort = $request->getPort(); - } else { - $httpPort = $this->httpPort; - } - } - - if (null !== $httpPort && 80 != $httpPort) { - $port = ":$httpPort"; - } - } elseif ('https' === $scheme) { - if (null === $httpsPort) { - if ('https' === $request->getScheme()) { - $httpsPort = $request->getPort(); - } else { - $httpsPort = $this->httpsPort; - } - } - - if (null !== $httpsPort && 443 != $httpsPort) { - $port = ":$httpsPort"; - } - } - - $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$path.$qs; - - return new RedirectResponse($url, $statusCode); - } - - public function __invoke(Request $request): Response - { - $p = $request->attributes->get('_route_params', []); - - if (\array_key_exists('route', $p)) { - if (\array_key_exists('path', $p)) { - throw new \RuntimeException(sprintf('Ambiguous redirection settings, use the "path" or "route" parameter, not both: "%s" and "%s" found respectively in "%s" routing configuration.', $p['path'], $p['route'], $request->attributes->get('_route'))); - } - - return $this->redirectAction($request, $p['route'], $p['permanent'] ?? false, $p['ignoreAttributes'] ?? false, $p['keepRequestMethod'] ?? false, $p['keepQueryParams'] ?? false); - } - - if (\array_key_exists('path', $p)) { - return $this->urlRedirectAction($request, $p['path'], $p['permanent'] ?? false, $p['scheme'] ?? null, $p['httpPort'] ?? null, $p['httpsPort'] ?? null, $p['keepRequestMethod'] ?? false); - } - - throw new \RuntimeException(sprintf('The parameter "path" or "route" is required to configure the redirect action in "%s" routing configuration.', $request->attributes->get('_route'))); - } -} diff --git a/lib/symfony/framework-bundle/Controller/TemplateController.php b/lib/symfony/framework-bundle/Controller/TemplateController.php deleted file mode 100644 index 2283dbc91..000000000 --- a/lib/symfony/framework-bundle/Controller/TemplateController.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Symfony\Component\HttpFoundation\Response; -use Twig\Environment; - -/** - * TemplateController. - * - * @author Fabien Potencier - * - * @final - */ -class TemplateController -{ - private $twig; - - public function __construct(Environment $twig = null) - { - $this->twig = $twig; - } - - /** - * Renders a template. - * - * @param string $template The template name - * @param int|null $maxAge Max age for client caching - * @param int|null $sharedAge Max age for shared (proxy) caching - * @param bool|null $private Whether or not caching should apply for client caches only - * @param array $context The context (arguments) of the template - * @param int $statusCode The HTTP status code to return with the response. Defaults to 200 - */ - public function templateAction(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null, array $context = [], int $statusCode = 200): Response - { - if (null === $this->twig) { - throw new \LogicException('You cannot use the TemplateController if the Twig Bundle is not available.'); - } - - $response = new Response($this->twig->render($template, $context), $statusCode); - - if ($maxAge) { - $response->setMaxAge($maxAge); - } - - if (null !== $sharedAge) { - $response->setSharedMaxAge($sharedAge); - } - - if ($private) { - $response->setPrivate(); - } elseif (false === $private || (null === $private && (null !== $maxAge || null !== $sharedAge))) { - $response->setPublic(); - } - - return $response; - } - - public function __invoke(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null, array $context = [], int $statusCode = 200): Response - { - return $this->templateAction($template, $maxAge, $sharedAge, $private, $context, $statusCode); - } -} diff --git a/lib/symfony/framework-bundle/DataCollector/AbstractDataCollector.php b/lib/symfony/framework-bundle/DataCollector/AbstractDataCollector.php deleted file mode 100644 index 7fa1ee2d3..000000000 --- a/lib/symfony/framework-bundle/DataCollector/AbstractDataCollector.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DataCollector; - -use Symfony\Component\HttpKernel\DataCollector\DataCollector; - -/** - * @author Laurent VOULLEMIER - */ -abstract class AbstractDataCollector extends DataCollector implements TemplateAwareDataCollectorInterface -{ - public function getName(): string - { - return static::class; - } - - public function reset(): void - { - $this->data = []; - } - - public static function getTemplate(): ?string - { - return null; - } -} diff --git a/lib/symfony/framework-bundle/DataCollector/RouterDataCollector.php b/lib/symfony/framework-bundle/DataCollector/RouterDataCollector.php deleted file mode 100644 index c5d0673de..000000000 --- a/lib/symfony/framework-bundle/DataCollector/RouterDataCollector.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DataCollector; - -use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\DataCollector\RouterDataCollector as BaseRouterDataCollector; - -/** - * @author Fabien Potencier - * - * @final - */ -class RouterDataCollector extends BaseRouterDataCollector -{ - public function guessRoute(Request $request, $controller) - { - if (\is_array($controller)) { - $controller = $controller[0]; - } - - if ($controller instanceof RedirectController) { - return $request->attributes->get('_route'); - } - - return parent::guessRoute($request, $controller); - } -} diff --git a/lib/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php b/lib/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php deleted file mode 100644 index 5ef17abc5..000000000 --- a/lib/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DataCollector; - -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; - -/** - * @author Laurent VOULLEMIER - */ -interface TemplateAwareDataCollectorInterface extends DataCollectorInterface -{ - public static function getTemplate(): ?string; -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php deleted file mode 100644 index d7db6ebf0..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @internal - */ -class AddAnnotationsCachedReaderPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - // "annotations.cached_reader" is wired late so that any passes using - // "annotation_reader" at build time don't get any cache - foreach ($container->findTaggedServiceIds('annotations.cached_reader') as $id => $tags) { - $reader = $container->getDefinition($id); - $properties = $reader->getProperties(); - - if (isset($properties['cacheProviderBackup'])) { - $provider = $properties['cacheProviderBackup']->getValues()[0]; - unset($properties['cacheProviderBackup']); - $reader->setProperties($properties); - $reader->replaceArgument(1, $provider); - } elseif (4 <= \count($arguments = $reader->getArguments()) && $arguments[3] instanceof ServiceClosureArgument) { - $arguments[1] = $arguments[3]->getValues()[0]; - unset($arguments[3]); - $reader->setArguments($arguments); - } - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php deleted file mode 100644 index 51b297554..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -class AddDebugLogProcessorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('profiler')) { - return; - } - if (!$container->hasDefinition('monolog.logger_prototype')) { - return; - } - if (!$container->hasDefinition('debug.log_processor')) { - return; - } - - $definition = $container->getDefinition('monolog.logger_prototype'); - $definition->setConfigurator([__CLASS__, 'configureLogger']); - $definition->addMethodCall('pushProcessor', [new Reference('debug.log_processor')]); - } - - public static function configureLogger($logger) - { - if (\is_object($logger) && method_exists($logger, 'removeDebugLogger') && \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - $logger->removeDebugLogger(); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php deleted file mode 100644 index 3e2f2768e..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Registers the expression language providers. - * - * @author Fabien Potencier - */ -class AddExpressionLanguageProvidersPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - // routing - if ($container->has('router.default')) { - $definition = $container->findDefinition('router.default'); - foreach ($container->findTaggedServiceIds('routing.expression_language_provider', true) as $id => $attributes) { - $definition->addMethodCall('addExpressionLanguageProvider', [new Reference($id)]); - } - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php deleted file mode 100644 index 3fc79f0ee..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -class AssetsContextPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('assets.context')) { - return; - } - - if (!$container->hasDefinition('router.request_context')) { - $container->setParameter('asset.request_context.base_path', $container->getParameter('asset.request_context.base_path') ?? ''); - $container->setParameter('asset.request_context.secure', $container->getParameter('asset.request_context.secure') ?? false); - - return; - } - - $context = $container->getDefinition('assets.context'); - - if (null === $container->getParameter('asset.request_context.base_path')) { - $context->replaceArgument(1, (new Definition('string'))->setFactory([new Reference('router.request_context'), 'getBaseUrl'])); - } - - if (null === $container->getParameter('asset.request_context.secure')) { - $context->replaceArgument(2, (new Definition('bool'))->setFactory([new Reference('router.request_context'), 'isSecure'])); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php deleted file mode 100644 index 0df5420c7..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Dumper\XmlDumper; - -/** - * Dumps the ContainerBuilder to a cache file so that it can be used by - * debugging tools such as the debug:container console command. - * - * @author Ryan Weaver - * @author Fabien Potencier - */ -class ContainerBuilderDebugDumpPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - $cache = new ConfigCache($container->getParameter('debug.container.dump'), true); - if (!$cache->isFresh()) { - $cache->write((new XmlDumper($container))->dump(), $container->getResources()); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php deleted file mode 100644 index ee2bbb652..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @author Christian Flothmann - */ -class DataCollectorTranslatorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->has('translator')) { - return; - } - - $translatorClass = $container->getParameterBag()->resolveValue($container->findDefinition('translator')->getClass()); - - if (!is_subclass_of($translatorClass, 'Symfony\Component\Translation\TranslatorBagInterface')) { - $container->removeDefinition('translator.data_collector'); - $container->removeDefinition('data_collector.translation'); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php deleted file mode 100644 index 80cbe52e6..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\Translation\TranslatorBagInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Abdellatif Ait boudad - */ -class LoggingTranslatorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasAlias('logger') || !$container->hasAlias('translator')) { - return; - } - - if ($container->hasParameter('translator.logging') && $container->getParameter('translator.logging')) { - $translatorAlias = $container->getAlias('translator'); - $definition = $container->getDefinition((string) $translatorAlias); - $class = $container->getParameterBag()->resolveValue($definition->getClass()); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias)); - } - if ($r->isSubclassOf(TranslatorInterface::class) && $r->isSubclassOf(TranslatorBagInterface::class)) { - $container->getDefinition('translator.logging')->setDecoratedService('translator'); - $warmer = $container->getDefinition('translation.warmer'); - $subscriberAttributes = $warmer->getTag('container.service_subscriber'); - $warmer->clearTag('container.service_subscriber'); - - foreach ($subscriberAttributes as $k => $v) { - if ((!isset($v['id']) || 'translator' !== $v['id']) && (!isset($v['key']) || 'translator' !== $v['key'])) { - $warmer->addTag('container.service_subscriber', $v); - } - } - $warmer->addTag('container.service_subscriber', ['key' => 'translator', 'id' => 'translator.logging.inner']); - } - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php deleted file mode 100644 index 7200b12b9..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Bundle\FrameworkBundle\DataCollector\TemplateAwareDataCollectorInterface; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds tagged data_collector services to profiler service. - * - * @author Fabien Potencier - */ -class ProfilerPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition('profiler')) { - return; - } - - $definition = $container->getDefinition('profiler'); - - $collectors = new \SplPriorityQueue(); - $order = \PHP_INT_MAX; - foreach ($container->findTaggedServiceIds('data_collector', true) as $id => $attributes) { - $priority = $attributes[0]['priority'] ?? 0; - $template = null; - - $collectorClass = $container->findDefinition($id)->getClass(); - $isTemplateAware = is_subclass_of($collectorClass, TemplateAwareDataCollectorInterface::class); - if (isset($attributes[0]['template']) || $isTemplateAware) { - $idForTemplate = $attributes[0]['id'] ?? $collectorClass; - if (!$idForTemplate) { - throw new InvalidArgumentException(sprintf('Data collector service "%s" must have an id attribute in order to specify a template.', $id)); - } - $template = [$idForTemplate, $attributes[0]['template'] ?? $collectorClass::getTemplate()]; - } - - $collectors->insert([$id, $template], [$priority, --$order]); - } - - $templates = []; - foreach ($collectors as $collector) { - $definition->addMethodCall('add', [new Reference($collector[0])]); - $templates[$collector[0]] = $collector[1]; - } - - $container->setParameter('data_collector.templates', $templates); - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php deleted file mode 100644 index 8b6479c4f..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @author Ahmed TAILOULOUTE - */ -class RemoveUnusedSessionMarshallingHandlerPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('session.marshalling_handler')) { - return; - } - - $isMarshallerDecorated = false; - - foreach ($container->getDefinitions() as $definition) { - $decorated = $definition->getDecoratedService(); - if (null !== $decorated && 'session.marshaller' === $decorated[0]) { - $isMarshallerDecorated = true; - - break; - } - } - - if (!$isMarshallerDecorated) { - $container->removeDefinition('session.marshalling_handler'); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php deleted file mode 100644 index 7230fc9fb..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @internal to be removed in 6.0 - */ -class SessionPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->has('session.factory')) { - return; - } - - // BC layer: Make "session" an alias of ".session.do-not-use" when not overridden by the user - if (!$container->has('session')) { - $alias = $container->setAlias('session', '.session.do-not-use'); - $alias->setDeprecated('symfony/framework-bundle', '5.3', 'The "%alias_id%" service and "SessionInterface" alias are deprecated, use "$requestStack->getSession()" instead.'); - // restore previous behavior - $alias->setPublic(true); - - return; - } - - if ($container->hasDefinition('session')) { - $definition = $container->getDefinition('session'); - $definition->setDeprecated('symfony/framework-bundle', '5.3', 'The "%service_id%" service and "SessionInterface" alias are deprecated, use "$requestStack->getSession()" instead.'); - } else { - $alias = $container->getAlias('session'); - $alias->setDeprecated('symfony/framework-bundle', '5.3', 'The "%alias_id%" and "SessionInterface" aliases are deprecated, use "$requestStack->getSession()" instead.'); - $definition = $container->findDefinition('session'); - } - - // Convert internal service `.session.do-not-use` into alias of `session`. - $container->setAlias('.session.do-not-use', 'session'); - - $bags = [ - 'session.flash_bag' => $container->hasDefinition('session.flash_bag') ? $container->getDefinition('session.flash_bag') : null, - 'session.attribute_bag' => $container->hasDefinition('session.attribute_bag') ? $container->getDefinition('session.attribute_bag') : null, - ]; - - foreach ($definition->getArguments() as $v) { - if (!$v instanceof Reference || !isset($bags[$bag = (string) $v]) || !\is_array($factory = $bags[$bag]->getFactory())) { - continue; - } - - if ([0, 1] !== array_keys($factory) || !$factory[0] instanceof Reference || !\in_array((string) $factory[0], ['session', '.session.do-not-use'], true)) { - continue; - } - - if ('get'.ucfirst(substr($bag, 8, -4)).'Bag' !== $factory[1]) { - continue; - } - - $bags[$bag]->setFactory(null); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php deleted file mode 100644 index 942eb635b..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class TestServiceContainerRealRefPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('test.private_services_locator')) { - return; - } - - $privateContainer = $container->getDefinition('test.private_services_locator'); - $definitions = $container->getDefinitions(); - $privateServices = $privateContainer->getArgument(0); - - foreach ($privateServices as $id => $argument) { - if (isset($definitions[$target = (string) $argument->getValues()[0]])) { - $argument->setValues([new Reference($target)]); - } else { - unset($privateServices[$id]); - } - } - - foreach ($container->getAliases() as $id => $target) { - while ($container->hasAlias($target = (string) $target)) { - $target = $container->getAlias($target); - } - - if ($definitions[$target]->hasTag('container.private')) { - $privateServices[$id] = new ServiceClosureArgument(new Reference($target)); - } - } - - $privateContainer->replaceArgument(0, $privateServices); - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php deleted file mode 100644 index bc1e5a936..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class TestServiceContainerWeakRefPass implements CompilerPassInterface -{ - private $privateTagName; - - public function __construct(string $privateTagName = 'container.private') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/framework-bundle', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->privateTagName = $privateTagName; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('test.private_services_locator')) { - return; - } - - $privateServices = []; - $definitions = $container->getDefinitions(); - $hasErrors = method_exists(Definition::class, 'hasErrors') ? 'hasErrors' : 'getErrors'; - - foreach ($definitions as $id => $definition) { - if ($id && '.' !== $id[0] && (!$definition->isPublic() || $definition->isPrivate() || $definition->hasTag($this->privateTagName)) && !$definition->$hasErrors() && !$definition->isAbstract()) { - $privateServices[$id] = new Reference($id, ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - } - - $aliases = $container->getAliases(); - - foreach ($aliases as $id => $alias) { - if ($id && '.' !== $id[0] && (!$alias->isPublic() || $alias->isPrivate())) { - while (isset($aliases[$target = (string) $alias])) { - $alias = $aliases[$target]; - } - if (isset($definitions[$target]) && !$definitions[$target]->$hasErrors() && !$definitions[$target]->isAbstract()) { - $privateServices[$id] = new Reference($target, ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - } - } - - if ($privateServices) { - $id = (string) ServiceLocatorTagPass::register($container, $privateServices); - $container->setDefinition('test.private_services_locator', $container->getDefinition($id))->setPublic(true); - $container->removeDefinition($id); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php deleted file mode 100644 index 386ee7d0c..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Find all service tags which are defined, but not used and yield a warning log message. - * - * @author Florian Pfitzer - */ -class UnusedTagsPass implements CompilerPassInterface -{ - private const KNOWN_TAGS = [ - 'annotations.cached_reader', - 'assets.package', - 'auto_alias', - 'cache.pool', - 'cache.pool.clearer', - 'chatter.transport_factory', - 'config_cache.resource_checker', - 'console.command', - 'container.do_not_inline', - 'container.env_var_loader', - 'container.env_var_processor', - 'container.hot_path', - 'container.no_preload', - 'container.preload', - 'container.private', - 'container.reversible', - 'container.service_locator', - 'container.service_locator_context', - 'container.service_subscriber', - 'container.stack', - 'controller.argument_value_resolver', - 'controller.service_arguments', - 'data_collector', - 'event_dispatcher.dispatcher', - 'form.type', - 'form.type_extension', - 'form.type_guesser', - 'http_client.client', - 'kernel.cache_clearer', - 'kernel.cache_warmer', - 'kernel.event_listener', - 'kernel.event_subscriber', - 'kernel.fragment_renderer', - 'kernel.locale_aware', - 'kernel.reset', - 'ldap', - 'mailer.transport_factory', - 'messenger.bus', - 'messenger.message_handler', - 'messenger.receiver', - 'messenger.transport_factory', - 'mime.mime_type_guesser', - 'monolog.logger', - 'notifier.channel', - 'property_info.access_extractor', - 'property_info.initializable_extractor', - 'property_info.list_extractor', - 'property_info.type_extractor', - 'proxy', - 'routing.expression_language_function', - 'routing.expression_language_provider', - 'routing.loader', - 'routing.route_loader', - 'security.authenticator.login_linker', - 'security.expression_language_provider', - 'security.remember_me_aware', - 'security.remember_me_handler', - 'security.voter', - 'serializer.encoder', - 'serializer.normalizer', - 'texter.transport_factory', - 'translation.dumper', - 'translation.extractor', - 'translation.loader', - 'translation.provider_factory', - 'twig.extension', - 'twig.loader', - 'twig.runtime', - 'validator.auto_mapper', - 'validator.constraint_validator', - 'validator.initializer', - ]; - - public function process(ContainerBuilder $container) - { - $tags = array_unique(array_merge($container->findTags(), self::KNOWN_TAGS)); - - foreach ($container->findUnusedTags() as $tag) { - // skip known tags - if (\in_array($tag, self::KNOWN_TAGS)) { - continue; - } - - // check for typos - $candidates = []; - foreach ($tags as $definedTag) { - if ($definedTag === $tag) { - continue; - } - - if (str_contains($definedTag, $tag) || levenshtein($tag, $definedTag) <= \strlen($tag) / 3) { - $candidates[] = $definedTag; - } - } - - $services = array_keys($container->findTaggedServiceIds($tag)); - $message = sprintf('Tag "%s" was defined on service(s) "%s", but was never used.', $tag, implode('", "', $services)); - if (!empty($candidates)) { - $message .= sprintf(' Did you mean "%s"?', implode('", "', $candidates)); - } - - $container->log($this, $message); - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php b/lib/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php deleted file mode 100644 index ad62e1938..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * @author Christian Flothmann - * @author Grégoire Pineau - */ -class WorkflowGuardListenerPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasParameter('workflow.has_guard_listeners')) { - return; - } - - $container->getParameterBag()->remove('workflow.has_guard_listeners'); - - $servicesNeeded = [ - 'security.token_storage', - 'security.authorization_checker', - 'security.authentication.trust_resolver', - 'security.role_hierarchy', - ]; - - foreach ($servicesNeeded as $service) { - if (!$container->has($service)) { - throw new LogicException(sprintf('The "%s" service is needed to be able to use the workflow guard listener.', $service)); - } - } - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/Configuration.php b/lib/symfony/framework-bundle/DependencyInjection/Configuration.php deleted file mode 100644 index c70a07635..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,2075 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; - -use Doctrine\Common\Annotations\Annotation; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Cache\Cache; -use Doctrine\DBAL\Connection; -use Psr\Log\LogLevel; -use Symfony\Bundle\FullStack; -use Symfony\Component\Asset\Package; -use Symfony\Component\Cache\Adapter\DoctrineAdapter; -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\NodeBuilder; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\Form\Form; -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\Lock\Lock; -use Symfony\Component\Lock\Store\SemaphoreStore; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Notifier\Notifier; -use Symfony\Component\PropertyAccess\PropertyAccessor; -use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; -use Symfony\Component\RateLimiter\Policy\TokenBucketLimiter; -use Symfony\Component\Serializer\Serializer; -use Symfony\Component\Translation\Translator; -use Symfony\Component\Uid\Factory\UuidFactory; -use Symfony\Component\Validator\Validation; -use Symfony\Component\WebLink\HttpHeaderSerializer; -use Symfony\Component\Workflow\WorkflowEvents; - -/** - * FrameworkExtension configuration structure. - */ -class Configuration implements ConfigurationInterface -{ - private $debug; - - /** - * @param bool $debug Whether debugging is enabled or not - */ - public function __construct(bool $debug) - { - $this->debug = $debug; - } - - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder('framework'); - $rootNode = $treeBuilder->getRootNode(); - - $rootNode - ->beforeNormalization() - ->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']) && class_exists(Package::class); }) - ->then(function ($v) { - $v['assets'] = []; - - return $v; - }) - ->end() - ->fixXmlConfig('enabled_locale') - ->children() - ->scalarNode('secret')->end() - ->scalarNode('http_method_override') - ->info("Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. Note: When using the HttpCache, you need to call the method in your front controller instead") - ->defaultTrue() - ->end() - ->scalarNode('ide')->defaultNull()->end() - ->booleanNode('test')->end() - ->scalarNode('default_locale')->defaultValue('en')->end() - ->booleanNode('set_locale_from_accept_language') - ->info('Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed).') - ->defaultFalse() - ->end() - ->booleanNode('set_content_language_from_locale') - ->info('Whether to set the Content-Language HTTP header on the Response using the Request locale.') - ->defaultFalse() - ->end() - ->arrayNode('enabled_locales') - ->info('Defines the possible locales for the application. This list is used for generating translations files, but also to restrict which locales are allowed when it is set from Accept-Language header (using "set_locale_from_accept_language").') - ->prototype('scalar')->end() - ->end() - ->arrayNode('trusted_hosts') - ->beforeNormalization()->ifString()->then(function ($v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->end() - ->scalarNode('trusted_proxies')->end() - ->arrayNode('trusted_headers') - ->fixXmlConfig('trusted_header') - ->performNoDeepMerging() - ->defaultValue(['x-forwarded-for', 'x-forwarded-port', 'x-forwarded-proto']) - ->beforeNormalization()->ifString()->then(function ($v) { return $v ? array_map('trim', explode(',', $v)) : []; })->end() - ->enumPrototype() - ->values([ - 'forwarded', - 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix', - ]) - ->end() - ->end() - ->scalarNode('error_controller') - ->defaultValue('error_controller') - ->end() - ->end() - ; - - $willBeAvailable = static function (string $package, string $class, string $parentPackage = null) { - $parentPackages = (array) $parentPackage; - $parentPackages[] = 'symfony/framework-bundle'; - - return ContainerBuilder::willBeAvailable($package, $class, $parentPackages, true); - }; - - $enableIfStandalone = static function (string $package, string $class) use ($willBeAvailable) { - return !class_exists(FullStack::class) && $willBeAvailable($package, $class) ? 'canBeDisabled' : 'canBeEnabled'; - }; - - $this->addCsrfSection($rootNode); - $this->addFormSection($rootNode, $enableIfStandalone); - $this->addHttpCacheSection($rootNode); - $this->addEsiSection($rootNode); - $this->addSsiSection($rootNode); - $this->addFragmentsSection($rootNode); - $this->addProfilerSection($rootNode); - $this->addWorkflowSection($rootNode); - $this->addRouterSection($rootNode); - $this->addSessionSection($rootNode); - $this->addRequestSection($rootNode); - $this->addAssetsSection($rootNode, $enableIfStandalone); - $this->addTranslatorSection($rootNode, $enableIfStandalone); - $this->addValidationSection($rootNode, $enableIfStandalone, $willBeAvailable); - $this->addAnnotationsSection($rootNode, $willBeAvailable); - $this->addSerializerSection($rootNode, $enableIfStandalone, $willBeAvailable); - $this->addPropertyAccessSection($rootNode, $willBeAvailable); - $this->addPropertyInfoSection($rootNode, $enableIfStandalone); - $this->addCacheSection($rootNode, $willBeAvailable); - $this->addPhpErrorsSection($rootNode); - $this->addExceptionsSection($rootNode); - $this->addWebLinkSection($rootNode, $enableIfStandalone); - $this->addLockSection($rootNode, $enableIfStandalone); - $this->addMessengerSection($rootNode, $enableIfStandalone); - $this->addRobotsIndexSection($rootNode); - $this->addHttpClientSection($rootNode, $enableIfStandalone); - $this->addMailerSection($rootNode, $enableIfStandalone); - $this->addSecretsSection($rootNode); - $this->addNotifierSection($rootNode, $enableIfStandalone); - $this->addRateLimiterSection($rootNode, $enableIfStandalone); - $this->addUidSection($rootNode, $enableIfStandalone); - - return $treeBuilder; - } - - private function addSecretsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('secrets') - ->canBeDisabled() - ->children() - ->scalarNode('vault_directory')->defaultValue('%kernel.project_dir%/config/secrets/%kernel.runtime_environment%')->cannotBeEmpty()->end() - ->scalarNode('local_dotenv_file')->defaultValue('%kernel.project_dir%/.env.%kernel.environment%.local')->end() - ->scalarNode('decryption_env_var')->defaultValue('base64:default::SYMFONY_DECRYPTION_SECRET')->end() - ->end() - ->end() - ->end() - ; - } - - private function addCsrfSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('csrf_protection') - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->addDefaultsIfNotSet() - ->children() - // defaults to framework.session.enabled && !class_exists(FullStack::class) && interface_exists(CsrfTokenManagerInterface::class) - ->booleanNode('enabled')->defaultNull()->end() - ->end() - ->end() - ->end() - ; - } - - private function addFormSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('form') - ->info('form configuration') - ->{$enableIfStandalone('symfony/form', Form::class)}() - ->children() - ->arrayNode('csrf_protection') - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->addDefaultsIfNotSet() - ->children() - ->booleanNode('enabled')->defaultNull()->end() // defaults to framework.csrf_protection.enabled - ->scalarNode('field_name')->defaultValue('_token')->end() - ->end() - ->end() - // to be set to false in Symfony 6.0 - ->booleanNode('legacy_error_messages') - ->defaultTrue() - ->validate() - ->ifTrue() - ->then(function ($v) { - trigger_deprecation('symfony/framework-bundle', '5.2', 'Setting the "framework.form.legacy_error_messages" option to "true" is deprecated. It will have no effect as of Symfony 6.0.'); - - return $v; - }) - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addHttpCacheSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('http_cache') - ->info('HTTP cache configuration') - ->canBeEnabled() - ->fixXmlConfig('private_header') - ->children() - ->booleanNode('debug')->defaultValue('%kernel.debug%')->end() - ->enumNode('trace_level') - ->values(['none', 'short', 'full']) - ->end() - ->scalarNode('trace_header')->end() - ->integerNode('default_ttl')->end() - ->arrayNode('private_headers') - ->performNoDeepMerging() - ->scalarPrototype()->end() - ->end() - ->booleanNode('allow_reload')->end() - ->booleanNode('allow_revalidate')->end() - ->integerNode('stale_while_revalidate')->end() - ->integerNode('stale_if_error')->end() - ->end() - ->end() - ->end() - ; - } - - private function addEsiSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('esi') - ->info('esi configuration') - ->canBeEnabled() - ->end() - ->end() - ; - } - - private function addSsiSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('ssi') - ->info('ssi configuration') - ->canBeEnabled() - ->end() - ->end(); - } - - private function addFragmentsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('fragments') - ->info('fragments configuration') - ->canBeEnabled() - ->children() - ->scalarNode('hinclude_default_template')->defaultNull()->end() - ->scalarNode('path')->defaultValue('/_fragment')->end() - ->end() - ->end() - ->end() - ; - } - - private function addProfilerSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('profiler') - ->info('profiler configuration') - ->canBeEnabled() - ->children() - ->booleanNode('collect')->defaultTrue()->end() - ->scalarNode('collect_parameter')->defaultNull()->info('The name of the parameter to use to enable or disable collection on a per request basis')->end() - ->booleanNode('only_exceptions')->defaultFalse()->end() - ->booleanNode('only_main_requests')->defaultFalse()->end() - ->booleanNode('only_master_requests')->setDeprecated('symfony/framework-bundle', '5.3', 'Option "%node%" at "%path%" is deprecated, use "only_main_requests" instead.')->defaultFalse()->end() - ->scalarNode('dsn')->defaultValue('file:%kernel.cache_dir%/profiler')->end() - ->end() - ->end() - ->end() - ; - } - - private function addWorkflowSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('workflow') - ->children() - ->arrayNode('workflows') - ->canBeEnabled() - ->beforeNormalization() - ->always(function ($v) { - if (\is_array($v) && true === $v['enabled']) { - $workflows = $v; - unset($workflows['enabled']); - - if (1 === \count($workflows) && isset($workflows[0]['enabled']) && 1 === \count($workflows[0])) { - $workflows = []; - } - - if (1 === \count($workflows) && isset($workflows['workflows']) && !array_is_list($workflows['workflows']) && !empty(array_diff(array_keys($workflows['workflows']), ['audit_trail', 'type', 'marking_store', 'supports', 'support_strategy', 'initial_marking', 'places', 'transitions']))) { - $workflows = $workflows['workflows']; - } - - foreach ($workflows as $key => $workflow) { - if (isset($workflow['enabled']) && false === $workflow['enabled']) { - throw new LogicException(sprintf('Cannot disable a single workflow. Remove the configuration for the workflow "%s" instead.', $workflow['name'])); - } - - unset($workflows[$key]['enabled']); - } - - $v = [ - 'enabled' => true, - 'workflows' => $workflows, - ]; - } - - return $v; - }) - ->end() - ->children() - ->arrayNode('workflows') - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('support') - ->fixXmlConfig('place') - ->fixXmlConfig('transition') - ->fixXmlConfig('event_to_dispatch', 'events_to_dispatch') - ->children() - ->arrayNode('audit_trail') - ->canBeEnabled() - ->end() - ->enumNode('type') - ->values(['workflow', 'state_machine']) - ->defaultValue('state_machine') - ->end() - ->arrayNode('marking_store') - ->children() - ->enumNode('type') - ->values(['method']) - ->end() - ->scalarNode('property') - ->defaultValue('marking') - ->end() - ->scalarNode('service') - ->cannotBeEmpty() - ->end() - ->end() - ->end() - ->arrayNode('supports') - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return [$v]; }) - ->end() - ->prototype('scalar') - ->cannotBeEmpty() - ->validate() - ->ifTrue(function ($v) { return !class_exists($v) && !interface_exists($v, false); }) - ->thenInvalid('The supported class or interface "%s" does not exist.') - ->end() - ->end() - ->end() - ->scalarNode('support_strategy') - ->cannotBeEmpty() - ->end() - ->arrayNode('initial_marking') - ->beforeNormalization()->castToArray()->end() - ->defaultValue([]) - ->prototype('scalar')->end() - ->end() - ->variableNode('events_to_dispatch') - ->defaultValue(null) - ->validate() - ->ifTrue(function ($v) { - if (null === $v) { - return false; - } - if (!\is_array($v)) { - return true; - } - - foreach ($v as $value) { - if (!\is_string($value)) { - return true; - } - if (class_exists(WorkflowEvents::class) && !\in_array($value, WorkflowEvents::ALIASES)) { - return true; - } - } - - return false; - }) - ->thenInvalid('The value must be "null" or an array of workflow events (like ["workflow.enter"]).') - ->end() - ->info('Select which Transition events should be dispatched for this Workflow') - ->example(['workflow.enter', 'workflow.transition']) - ->end() - ->arrayNode('places') - ->beforeNormalization() - ->always() - ->then(function ($places) { - // It's an indexed array of shape ['place1', 'place2'] - if (isset($places[0]) && \is_string($places[0])) { - return array_map(function (string $place) { - return ['name' => $place]; - }, $places); - } - - // It's an indexed array, we let the validation occur - if (isset($places[0]) && \is_array($places[0])) { - return $places; - } - - foreach ($places as $name => $place) { - if (\is_array($place) && \array_key_exists('name', $place)) { - continue; - } - $place['name'] = $name; - $places[$name] = $place; - } - - return array_values($places); - }) - ->end() - ->isRequired() - ->requiresAtLeastOneElement() - ->prototype('array') - ->children() - ->scalarNode('name') - ->isRequired() - ->cannotBeEmpty() - ->end() - ->arrayNode('metadata') - ->normalizeKeys(false) - ->defaultValue([]) - ->example(['color' => 'blue', 'description' => 'Workflow to manage article.']) - ->prototype('variable') - ->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('transitions') - ->beforeNormalization() - ->always() - ->then(function ($transitions) { - // It's an indexed array, we let the validation occur - if (isset($transitions[0]) && \is_array($transitions[0])) { - return $transitions; - } - - foreach ($transitions as $name => $transition) { - if (\is_array($transition) && \array_key_exists('name', $transition)) { - continue; - } - $transition['name'] = $name; - $transitions[$name] = $transition; - } - - return $transitions; - }) - ->end() - ->isRequired() - ->requiresAtLeastOneElement() - ->prototype('array') - ->children() - ->scalarNode('name') - ->isRequired() - ->cannotBeEmpty() - ->end() - ->scalarNode('guard') - ->cannotBeEmpty() - ->info('An expression to block the transition') - ->example('is_fully_authenticated() and is_granted(\'ROLE_JOURNALIST\') and subject.getTitle() == \'My first article\'') - ->end() - ->arrayNode('from') - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return [$v]; }) - ->end() - ->requiresAtLeastOneElement() - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->arrayNode('to') - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return [$v]; }) - ->end() - ->requiresAtLeastOneElement() - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->arrayNode('metadata') - ->normalizeKeys(false) - ->defaultValue([]) - ->example(['color' => 'blue', 'description' => 'Workflow to manage article.']) - ->prototype('variable') - ->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('metadata') - ->normalizeKeys(false) - ->defaultValue([]) - ->example(['color' => 'blue', 'description' => 'Workflow to manage article.']) - ->prototype('variable') - ->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { - return $v['supports'] && isset($v['support_strategy']); - }) - ->thenInvalid('"supports" and "support_strategy" cannot be used together.') - ->end() - ->validate() - ->ifTrue(function ($v) { - return !$v['supports'] && !isset($v['support_strategy']); - }) - ->thenInvalid('"supports" or "support_strategy" should be configured.') - ->end() - ->beforeNormalization() - ->always() - ->then(function ($values) { - // Special case to deal with XML when the user wants an empty array - if (\array_key_exists('event_to_dispatch', $values) && null === $values['event_to_dispatch']) { - $values['events_to_dispatch'] = []; - unset($values['event_to_dispatch']); - } - - return $values; - }) - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRouterSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('router') - ->info('router configuration') - ->canBeEnabled() - ->children() - ->scalarNode('resource')->isRequired()->end() - ->scalarNode('type')->end() - ->scalarNode('default_uri') - ->info('The default URI used to generate URLs in a non-HTTP context') - ->defaultNull() - ->end() - ->scalarNode('http_port')->defaultValue(80)->end() - ->scalarNode('https_port')->defaultValue(443)->end() - ->scalarNode('strict_requirements') - ->info( - "set to true to throw an exception when a parameter does not match the requirements\n". - "set to false to disable exceptions when a parameter does not match the requirements (and return null instead)\n". - "set to null to disable parameter checks against requirements\n". - "'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production" - ) - ->defaultTrue() - ->end() - ->booleanNode('utf8')->defaultNull()->end() - ->end() - ->end() - ->end() - ; - } - - private function addSessionSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('session') - ->info('session configuration') - ->canBeEnabled() - ->beforeNormalization() - ->ifTrue(function ($v) { - return \is_array($v) && isset($v['storage_id']) && isset($v['storage_factory_id']); - }) - ->thenInvalid('You cannot use both "storage_id" and "storage_factory_id" at the same time under "framework.session"') - ->end() - ->children() - ->scalarNode('storage_id')->defaultValue('session.storage.native')->end() - ->scalarNode('storage_factory_id')->defaultNull()->end() - ->scalarNode('handler_id')->defaultValue('session.handler.native_file')->end() - ->scalarNode('name') - ->validate() - ->ifTrue(function ($v) { - parse_str($v, $parsed); - - return implode('&', array_keys($parsed)) !== (string) $v; - }) - ->thenInvalid('Session name %s contains illegal character(s)') - ->end() - ->end() - ->scalarNode('cookie_lifetime')->end() - ->scalarNode('cookie_path')->end() - ->scalarNode('cookie_domain')->end() - ->enumNode('cookie_secure')->values([true, false, 'auto'])->end() - ->booleanNode('cookie_httponly')->defaultTrue()->end() - ->enumNode('cookie_samesite')->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT, Cookie::SAMESITE_NONE])->defaultNull()->end() - ->booleanNode('use_cookies')->end() - ->scalarNode('gc_divisor')->end() - ->scalarNode('gc_probability')->defaultValue(1)->end() - ->scalarNode('gc_maxlifetime')->end() - ->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end() - ->integerNode('metadata_update_threshold') - ->defaultValue(0) - ->info('seconds to wait between 2 session metadata updates') - ->end() - ->integerNode('sid_length') - ->min(22) - ->max(256) - ->end() - ->integerNode('sid_bits_per_character') - ->min(4) - ->max(6) - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRequestSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('request') - ->info('request configuration') - ->canBeEnabled() - ->fixXmlConfig('format') - ->children() - ->arrayNode('formats') - ->useAttributeAsKey('name') - ->prototype('array') - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && isset($v['mime_type']); }) - ->then(function ($v) { return $v['mime_type']; }) - ->end() - ->beforeNormalization()->castToArray()->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addAssetsSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('assets') - ->info('assets configuration') - ->{$enableIfStandalone('symfony/asset', Package::class)}() - ->fixXmlConfig('base_url') - ->children() - ->booleanNode('strict_mode') - ->info('Throw an exception if an entry is missing from the manifest.json') - ->defaultFalse() - ->end() - ->scalarNode('version_strategy')->defaultNull()->end() - ->scalarNode('version')->defaultNull()->end() - ->scalarNode('version_format')->defaultValue('%%s?%%s')->end() - ->scalarNode('json_manifest_path')->defaultNull()->end() - ->scalarNode('base_path')->defaultValue('')->end() - ->arrayNode('base_urls') - ->requiresAtLeastOneElement() - ->beforeNormalization()->castToArray()->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['version']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets".') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "json_manifest_path" at the same time under "assets".') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version" and "json_manifest_path" at the same time under "assets".') - ->end() - ->fixXmlConfig('package') - ->children() - ->arrayNode('packages') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('base_url') - ->children() - ->booleanNode('strict_mode') - ->info('Throw an exception if an entry is missing from the manifest.json') - ->defaultFalse() - ->end() - ->scalarNode('version_strategy')->defaultNull()->end() - ->scalarNode('version') - ->beforeNormalization() - ->ifTrue(function ($v) { return '' === $v; }) - ->then(function ($v) { return; }) - ->end() - ->end() - ->scalarNode('version_format')->defaultNull()->end() - ->scalarNode('json_manifest_path')->defaultNull()->end() - ->scalarNode('base_path')->defaultValue('')->end() - ->arrayNode('base_urls') - ->requiresAtLeastOneElement() - ->beforeNormalization()->castToArray()->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['version']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets" packages.') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "json_manifest_path" at the same time under "assets" packages.') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version" and "json_manifest_path" at the same time under "assets" packages.') - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addTranslatorSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('translator') - ->info('translator configuration') - ->{$enableIfStandalone('symfony/translation', Translator::class)}() - ->fixXmlConfig('fallback') - ->fixXmlConfig('path') - ->fixXmlConfig('enabled_locale') - ->fixXmlConfig('provider') - ->children() - ->arrayNode('fallbacks') - ->info('Defaults to the value of "default_locale".') - ->beforeNormalization()->ifString()->then(function ($v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->defaultValue([]) - ->end() - ->booleanNode('logging')->defaultValue(false)->end() - ->scalarNode('formatter')->defaultValue('translator.formatter.default')->end() - ->scalarNode('cache_dir')->defaultValue('%kernel.cache_dir%/translations')->end() - ->scalarNode('default_path') - ->info('The default path used to load translations') - ->defaultValue('%kernel.project_dir%/translations') - ->end() - ->arrayNode('paths') - ->prototype('scalar')->end() - ->end() - ->arrayNode('enabled_locales') - ->setDeprecated('symfony/framework-bundle', '5.3', 'Option "%node%" at "%path%" is deprecated, set the "framework.enabled_locales" option instead.') - ->prototype('scalar')->end() - ->defaultValue([]) - ->end() - ->arrayNode('pseudo_localization') - ->canBeEnabled() - ->fixXmlConfig('localizable_html_attribute') - ->children() - ->booleanNode('accents')->defaultTrue()->end() - ->floatNode('expansion_factor') - ->min(1.0) - ->defaultValue(1.0) - ->end() - ->booleanNode('brackets')->defaultTrue()->end() - ->booleanNode('parse_html')->defaultFalse()->end() - ->arrayNode('localizable_html_attributes') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('providers') - ->info('Translation providers you can read/write your translations from') - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('domain') - ->fixXmlConfig('locale') - ->children() - ->scalarNode('dsn')->end() - ->arrayNode('domains') - ->prototype('scalar')->end() - ->defaultValue([]) - ->end() - ->arrayNode('locales') - ->prototype('scalar')->end() - ->defaultValue([]) - ->info('If not set, all locales listed under framework.enabled_locales are used.') - ->end() - ->end() - ->end() - ->defaultValue([]) - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addValidationSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('validation') - ->info('validation configuration') - ->{$enableIfStandalone('symfony/validator', Validation::class)}() - ->children() - ->scalarNode('cache')->end() - ->booleanNode('enable_annotations')->{!class_exists(FullStack::class) && (\PHP_VERSION_ID >= 80000 || $willBeAvailable('doctrine/annotations', Annotation::class, 'symfony/validator')) ? 'defaultTrue' : 'defaultFalse'}()->end() - ->arrayNode('static_method') - ->defaultValue(['loadValidatorMetadata']) - ->prototype('scalar')->end() - ->treatFalseLike([]) - ->validate()->castToArray()->end() - ->end() - ->scalarNode('translation_domain')->defaultValue('validators')->end() - ->enumNode('email_validation_mode')->values(['html5', 'loose', 'strict'])->end() - ->arrayNode('mapping') - ->addDefaultsIfNotSet() - ->fixXmlConfig('path') - ->children() - ->arrayNode('paths') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('not_compromised_password') - ->canBeDisabled() - ->children() - ->booleanNode('enabled') - ->defaultTrue() - ->info('When disabled, compromised passwords will be accepted as valid.') - ->end() - ->scalarNode('endpoint') - ->defaultNull() - ->info('API endpoint for the NotCompromisedPassword Validator.') - ->end() - ->end() - ->end() - ->arrayNode('auto_mapping') - ->info('A collection of namespaces for which auto-mapping will be enabled by default, or null to opt-in with the EnableAutoMapping constraint.') - ->example([ - 'App\\Entity\\' => [], - 'App\\WithSpecificLoaders\\' => ['validator.property_info_loader'], - ]) - ->useAttributeAsKey('namespace') - ->normalizeKeys(false) - ->beforeNormalization() - ->ifArray() - ->then(function (array $values): array { - foreach ($values as $k => $v) { - if (isset($v['service'])) { - continue; - } - - if (isset($v['namespace'])) { - $values[$k]['services'] = []; - continue; - } - - if (!\is_array($v)) { - $values[$v]['services'] = []; - unset($values[$k]); - continue; - } - - $tmp = $v; - unset($values[$k]); - $values[$k]['services'] = $tmp; - } - - return $values; - }) - ->end() - ->arrayPrototype() - ->fixXmlConfig('service') - ->children() - ->arrayNode('services') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addAnnotationsSection(ArrayNodeDefinition $rootNode, callable $willBeAvailable) - { - $doctrineCache = $willBeAvailable('doctrine/cache', Cache::class, 'doctrine/annotations'); - $psr6Cache = $willBeAvailable('symfony/cache', PsrCachedReader::class, 'doctrine/annotations'); - - $rootNode - ->children() - ->arrayNode('annotations') - ->info('annotation configuration') - ->{$willBeAvailable('doctrine/annotations', Annotation::class) ? 'canBeDisabled' : 'canBeEnabled'}() - ->children() - ->scalarNode('cache')->defaultValue(($doctrineCache || $psr6Cache) ? 'php_array' : 'none')->end() - ->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end() - ->booleanNode('debug')->defaultValue($this->debug)->end() - ->end() - ->end() - ->end() - ; - } - - private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('serializer') - ->info('serializer configuration') - ->{$enableIfStandalone('symfony/serializer', Serializer::class)}() - ->children() - ->booleanNode('enable_annotations')->{!class_exists(FullStack::class) && (\PHP_VERSION_ID >= 80000 || $willBeAvailable('doctrine/annotations', Annotation::class, 'symfony/serializer')) ? 'defaultTrue' : 'defaultFalse'}()->end() - ->scalarNode('name_converter')->end() - ->scalarNode('circular_reference_handler')->end() - ->scalarNode('max_depth_handler')->end() - ->arrayNode('mapping') - ->addDefaultsIfNotSet() - ->fixXmlConfig('path') - ->children() - ->arrayNode('paths') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('default_context') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->defaultValue([]) - ->prototype('variable')->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addPropertyAccessSection(ArrayNodeDefinition $rootNode, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('property_access') - ->addDefaultsIfNotSet() - ->info('Property access configuration') - ->{$willBeAvailable('symfony/property-access', PropertyAccessor::class) ? 'canBeDisabled' : 'canBeEnabled'}() - ->children() - ->booleanNode('magic_call')->defaultFalse()->end() - ->booleanNode('magic_get')->defaultTrue()->end() - ->booleanNode('magic_set')->defaultTrue()->end() - ->booleanNode('throw_exception_on_invalid_index')->defaultFalse()->end() - ->booleanNode('throw_exception_on_invalid_property_path')->defaultTrue()->end() - ->end() - ->end() - ->end() - ; - } - - private function addPropertyInfoSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('property_info') - ->info('Property info configuration') - ->{$enableIfStandalone('symfony/property-info', PropertyInfoExtractorInterface::class)}() - ->end() - ->end() - ; - } - - private function addCacheSection(ArrayNodeDefinition $rootNode, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('cache') - ->info('Cache configuration') - ->addDefaultsIfNotSet() - ->fixXmlConfig('pool') - ->children() - ->scalarNode('prefix_seed') - ->info('Used to namespace cache keys when using several apps with the same shared backend') - ->defaultValue('_%kernel.project_dir%.%kernel.container_class%') - ->example('my-application-name/%kernel.environment%') - ->end() - ->scalarNode('app') - ->info('App related cache pools configuration') - ->defaultValue('cache.adapter.filesystem') - ->end() - ->scalarNode('system') - ->info('System related cache pools configuration') - ->defaultValue('cache.adapter.system') - ->end() - ->scalarNode('directory')->defaultValue('%kernel.cache_dir%/pools/app')->end() - ->scalarNode('default_doctrine_provider')->end() - ->scalarNode('default_psr6_provider')->end() - ->scalarNode('default_redis_provider')->defaultValue('redis://localhost')->end() - ->scalarNode('default_memcached_provider')->defaultValue('memcached://localhost')->end() - ->scalarNode('default_doctrine_dbal_provider')->defaultValue('database_connection')->end() - ->scalarNode('default_pdo_provider')->defaultValue($willBeAvailable('doctrine/dbal', Connection::class) && class_exists(DoctrineAdapter::class) ? 'database_connection' : null)->end() - ->arrayNode('pools') - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('adapter') - ->beforeNormalization() - ->ifTrue(function ($v) { return isset($v['provider']) && \is_array($v['adapters'] ?? $v['adapter'] ?? null) && 1 < \count($v['adapters'] ?? $v['adapter']); }) - ->thenInvalid('Pool cannot have a "provider" while more than one adapter is defined') - ->end() - ->children() - ->arrayNode('adapters') - ->performNoDeepMerging() - ->info('One or more adapters to chain for creating the pool, defaults to "cache.app".') - ->beforeNormalization()->castToArray()->end() - ->beforeNormalization() - ->always()->then(function ($values) { - if ([0] === array_keys($values) && \is_array($values[0])) { - return $values[0]; - } - $adapters = []; - - foreach ($values as $k => $v) { - if (\is_int($k) && \is_string($v)) { - $adapters[] = $v; - } elseif (!\is_array($v)) { - $adapters[$k] = $v; - } elseif (isset($v['provider'])) { - $adapters[$v['provider']] = $v['name'] ?? $v; - } else { - $adapters[] = $v['name'] ?? $v; - } - } - - return $adapters; - }) - ->end() - ->prototype('scalar')->end() - ->end() - ->scalarNode('tags')->defaultNull()->end() - ->booleanNode('public')->defaultFalse()->end() - ->scalarNode('default_lifetime') - ->info('Default lifetime of the pool') - ->example('"300" for 5 minutes expressed in seconds, "PT5M" for five minutes expressed as ISO 8601 time interval, or "5 minutes" as a date expression') - ->end() - ->scalarNode('provider') - ->info('Overwrite the setting from the default provider for this adapter.') - ->end() - ->scalarNode('early_expiration_message_bus') - ->example('"messenger.default_bus" to send early expiration events to the default Messenger bus.') - ->end() - ->scalarNode('clearer')->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { return isset($v['cache.app']) || isset($v['cache.system']); }) - ->thenInvalid('"cache.app" and "cache.system" are reserved names') - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addPhpErrorsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('php_errors') - ->info('PHP errors handling configuration') - ->addDefaultsIfNotSet() - ->children() - ->variableNode('log') - ->info('Use the application logger instead of the PHP logger for logging PHP errors.') - ->example('"true" to use the default configuration: log all errors. "false" to disable. An integer bit field of E_* constants, or an array mapping E_* constants to log levels.') - ->defaultValue($this->debug) - ->treatNullLike($this->debug) - ->beforeNormalization() - ->ifArray() - ->then(function (array $v): array { - if (!($v[0]['type'] ?? false)) { - return $v; - } - - // Fix XML normalization - - $ret = []; - foreach ($v as ['type' => $type, 'logLevel' => $logLevel]) { - $ret[$type] = $logLevel; - } - - return $ret; - }) - ->end() - ->validate() - ->ifTrue(function ($v) { return !(\is_int($v) || \is_bool($v) || \is_array($v)); }) - ->thenInvalid('The "php_errors.log" parameter should be either an integer, a boolean, or an array') - ->end() - ->end() - ->booleanNode('throw') - ->info('Throw PHP errors as \ErrorException instances.') - ->defaultValue($this->debug) - ->treatNullLike($this->debug) - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addExceptionsSection(ArrayNodeDefinition $rootNode) - { - $logLevels = (new \ReflectionClass(LogLevel::class))->getConstants(); - - $rootNode - ->fixXmlConfig('exception') - ->children() - ->arrayNode('exceptions') - ->info('Exception handling configuration') - ->useAttributeAsKey('class') - ->beforeNormalization() - // Handle legacy XML configuration - ->ifArray() - ->then(function (array $v): array { - if (!\array_key_exists('exception', $v)) { - return $v; - } - - $v = $v['exception']; - unset($v['exception']); - - foreach ($v as &$exception) { - $exception['class'] = $exception['name']; - unset($exception['name']); - } - - return $v; - }) - ->end() - ->prototype('array') - ->children() - ->scalarNode('log_level') - ->info('The level of log message. Null to let Symfony decide.') - ->validate() - ->ifTrue(function ($v) use ($logLevels) { return null !== $v && !\in_array($v, $logLevels, true); }) - ->thenInvalid(sprintf('The log level is not valid. Pick one among "%s".', implode('", "', $logLevels))) - ->end() - ->defaultNull() - ->end() - ->scalarNode('status_code') - ->info('The status code of the response. Null or 0 to let Symfony decide.') - ->beforeNormalization() - ->ifTrue(function ($v) { return 0 === $v; }) - ->then(function ($v) { return null; }) - ->end() - ->validate() - ->ifTrue(function ($v) { return null !== $v && ($v < 100 || $v > 599); }) - ->thenInvalid('The status code is not valid. Pick a value between 100 and 599.') - ->end() - ->defaultNull() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addLockSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('lock') - ->info('Lock configuration') - ->{$enableIfStandalone('symfony/lock', Lock::class)}() - ->beforeNormalization() - ->ifString()->then(function ($v) { return ['enabled' => true, 'resources' => $v]; }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && !isset($v['enabled']); }) - ->then(function ($v) { return $v + ['enabled' => true]; }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && !isset($v['resources']) && !isset($v['resource']); }) - ->then(function ($v) { - $e = $v['enabled']; - unset($v['enabled']); - - return ['enabled' => $e, 'resources' => $v]; - }) - ->end() - ->addDefaultsIfNotSet() - ->validate() - ->ifTrue(static function (array $config) { return $config['enabled'] && !$config['resources']; }) - ->thenInvalid('At least one resource must be defined.') - ->end() - ->fixXmlConfig('resource') - ->children() - ->arrayNode('resources') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->defaultValue(['default' => [class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphore' : 'flock']]) - ->beforeNormalization() - ->ifString()->then(function ($v) { return ['default' => $v]; }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && array_is_list($v); }) - ->then(function ($v) { - $resources = []; - foreach ($v as $resource) { - $resources[] = \is_array($resource) && isset($resource['name']) - ? [$resource['name'] => $resource['value']] - : ['default' => $resource] - ; - } - - return array_merge_recursive([], ...$resources); - }) - ->end() - ->prototype('array') - ->performNoDeepMerging() - ->beforeNormalization()->ifString()->then(function ($v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addWebLinkSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('web_link') - ->info('web links configuration') - ->{$enableIfStandalone('symfony/weblink', HttpHeaderSerializer::class)}() - ->end() - ->end() - ; - } - - private function addMessengerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('messenger') - ->info('Messenger configuration') - ->{$enableIfStandalone('symfony/messenger', MessageBusInterface::class)}() - ->fixXmlConfig('transport') - ->fixXmlConfig('bus', 'buses') - ->validate() - ->ifTrue(function ($v) { return isset($v['buses']) && \count($v['buses']) > 1 && null === $v['default_bus']; }) - ->thenInvalid('You must specify the "default_bus" if you define more than one bus.') - ->end() - ->validate() - ->ifTrue(static function ($v): bool { return isset($v['buses']) && null !== $v['default_bus'] && !isset($v['buses'][$v['default_bus']]); }) - ->then(static function (array $v): void { throw new InvalidConfigurationException(sprintf('The specified default bus "%s" is not configured. Available buses are "%s".', $v['default_bus'], implode('", "', array_keys($v['buses'])))); }) - ->end() - ->children() - ->arrayNode('routing') - ->normalizeKeys(false) - ->useAttributeAsKey('message_class') - ->beforeNormalization() - ->always() - ->then(function ($config) { - if (!\is_array($config)) { - return []; - } - // If XML config with only one routing attribute - if (2 === \count($config) && isset($config['message-class']) && isset($config['sender'])) { - $config = [0 => $config]; - } - - $newConfig = []; - foreach ($config as $k => $v) { - if (!\is_int($k)) { - $newConfig[$k] = [ - 'senders' => $v['senders'] ?? (\is_array($v) ? array_values($v) : [$v]), - ]; - } else { - $newConfig[$v['message-class']]['senders'] = array_map( - function ($a) { - return \is_string($a) ? $a : $a['service']; - }, - array_values($v['sender']) - ); - } - } - - return $newConfig; - }) - ->end() - ->prototype('array') - ->performNoDeepMerging() - ->children() - ->arrayNode('senders') - ->requiresAtLeastOneElement() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('serializer') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('default_serializer') - ->defaultValue('messenger.transport.native_php_serializer') - ->info('Service id to use as the default serializer for the transports.') - ->end() - ->arrayNode('symfony_serializer') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('format')->defaultValue('json')->info('Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default).')->end() - ->arrayNode('context') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->defaultValue([]) - ->info('Context array for the messenger.transport.symfony_serializer service (which is not the serializer used by default).') - ->prototype('variable')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('transports') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->arrayPrototype() - ->beforeNormalization() - ->ifString() - ->then(function (string $dsn) { - return ['dsn' => $dsn]; - }) - ->end() - ->fixXmlConfig('option') - ->children() - ->scalarNode('dsn')->end() - ->scalarNode('serializer')->defaultNull()->info('Service id of a custom serializer to use.')->end() - ->arrayNode('options') - ->normalizeKeys(false) - ->defaultValue([]) - ->prototype('variable') - ->end() - ->end() - ->scalarNode('failure_transport') - ->defaultNull() - ->info('Transport name to send failed messages to (after all retries have failed).') - ->end() - ->arrayNode('retry_strategy') - ->addDefaultsIfNotSet() - ->beforeNormalization() - ->always(function ($v) { - if (isset($v['service']) && (isset($v['max_retries']) || isset($v['delay']) || isset($v['multiplier']) || isset($v['max_delay']))) { - throw new \InvalidArgumentException('The "service" cannot be used along with the other "retry_strategy" options.'); - } - - return $v; - }) - ->end() - ->children() - ->scalarNode('service')->defaultNull()->info('Service id to override the retry strategy entirely')->end() - ->integerNode('max_retries')->defaultValue(3)->min(0)->end() - ->integerNode('delay')->defaultValue(1000)->min(0)->info('Time in ms to delay (or the initial value when multiplier is used)')->end() - ->floatNode('multiplier')->defaultValue(2)->min(1)->info('If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries))')->end() - ->integerNode('max_delay')->defaultValue(0)->min(0)->info('Max time in ms that a retry should ever be delayed (0 = infinite)')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->scalarNode('failure_transport') - ->defaultNull() - ->info('Transport name to send failed messages to (after all retries have failed).') - ->end() - ->booleanNode('reset_on_message') - ->defaultNull() - ->info('Reset container services after each message.') - ->end() - ->scalarNode('default_bus')->defaultNull()->end() - ->arrayNode('buses') - ->defaultValue(['messenger.bus.default' => ['default_middleware' => true, 'middleware' => []]]) - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->arrayPrototype() - ->addDefaultsIfNotSet() - ->children() - ->enumNode('default_middleware') - ->values([true, false, 'allow_no_handlers']) - ->defaultTrue() - ->end() - ->arrayNode('middleware') - ->performNoDeepMerging() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_string($v) || (\is_array($v) && !\is_int(key($v))); }) - ->then(function ($v) { return [$v]; }) - ->end() - ->defaultValue([]) - ->arrayPrototype() - ->beforeNormalization() - ->always() - ->then(function ($middleware): array { - if (!\is_array($middleware)) { - return ['id' => $middleware]; - } - if (isset($middleware['id'])) { - return $middleware; - } - if (1 < \count($middleware)) { - throw new \InvalidArgumentException('Invalid middleware at path "framework.messenger": a map with a single factory id as key and its arguments as value was expected, '.json_encode($middleware).' given.'); - } - - return [ - 'id' => key($middleware), - 'arguments' => current($middleware), - ]; - }) - ->end() - ->fixXmlConfig('argument') - ->children() - ->scalarNode('id')->isRequired()->cannotBeEmpty()->end() - ->arrayNode('arguments') - ->normalizeKeys(false) - ->defaultValue([]) - ->prototype('variable') - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRobotsIndexSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->booleanNode('disallow_search_engine_index') - ->info('Enabled by default when debug is enabled.') - ->defaultValue($this->debug) - ->treatNullLike($this->debug) - ->end() - ->end() - ; - } - - private function addHttpClientSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('http_client') - ->info('HTTP Client configuration') - ->{$enableIfStandalone('symfony/http-client', HttpClient::class)}() - ->fixXmlConfig('scoped_client') - ->beforeNormalization() - ->always(function ($config) { - if (empty($config['scoped_clients']) || !\is_array($config['default_options']['retry_failed'] ?? null)) { - return $config; - } - - foreach ($config['scoped_clients'] as &$scopedConfig) { - if (!isset($scopedConfig['retry_failed']) || true === $scopedConfig['retry_failed']) { - $scopedConfig['retry_failed'] = $config['default_options']['retry_failed']; - continue; - } - if (\is_array($scopedConfig['retry_failed'])) { - $scopedConfig['retry_failed'] = $scopedConfig['retry_failed'] + $config['default_options']['retry_failed']; - } - } - - return $config; - }) - ->end() - ->children() - ->integerNode('max_host_connections') - ->info('The maximum number of connections to a single host.') - ->end() - ->arrayNode('default_options') - ->fixXmlConfig('header') - ->children() - ->arrayNode('headers') - ->info('Associative array: header => value(s).') - ->useAttributeAsKey('name') - ->normalizeKeys(false) - ->variablePrototype()->end() - ->end() - ->integerNode('max_redirects') - ->info('The maximum number of redirects to follow.') - ->end() - ->scalarNode('http_version') - ->info('The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.') - ->end() - ->arrayNode('resolve') - ->info('Associative array: domain => IP.') - ->useAttributeAsKey('host') - ->beforeNormalization() - ->always(function ($config) { - if (!\is_array($config)) { - return []; - } - if (!isset($config['host'], $config['value']) || \count($config) > 2) { - return $config; - } - - return [$config['host'] => $config['value']]; - }) - ->end() - ->normalizeKeys(false) - ->scalarPrototype()->end() - ->end() - ->scalarNode('proxy') - ->info('The URL of the proxy to pass requests through or null for automatic detection.') - ->end() - ->scalarNode('no_proxy') - ->info('A comma separated list of hosts that do not require a proxy to be reached.') - ->end() - ->floatNode('timeout') - ->info('The idle timeout, defaults to the "default_socket_timeout" ini parameter.') - ->end() - ->floatNode('max_duration') - ->info('The maximum execution time for the request+response as a whole.') - ->end() - ->scalarNode('bindto') - ->info('A network interface name, IP address, a host name or a UNIX socket to bind to.') - ->end() - ->booleanNode('verify_peer') - ->info('Indicates if the peer should be verified in an SSL/TLS context.') - ->end() - ->booleanNode('verify_host') - ->info('Indicates if the host should exist as a certificate common name.') - ->end() - ->scalarNode('cafile') - ->info('A certificate authority file.') - ->end() - ->scalarNode('capath') - ->info('A directory that contains multiple certificate authority files.') - ->end() - ->scalarNode('local_cert') - ->info('A PEM formatted certificate file.') - ->end() - ->scalarNode('local_pk') - ->info('A private key file.') - ->end() - ->scalarNode('passphrase') - ->info('The passphrase used to encrypt the "local_pk" file.') - ->end() - ->scalarNode('ciphers') - ->info('A list of SSL/TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...)') - ->end() - ->arrayNode('peer_fingerprint') - ->info('Associative array: hashing algorithm => hash(es).') - ->normalizeKeys(false) - ->children() - ->variableNode('sha1')->end() - ->variableNode('pin-sha256')->end() - ->variableNode('md5')->end() - ->end() - ->end() - ->append($this->addHttpClientRetrySection()) - ->end() - ->end() - ->scalarNode('mock_response_factory') - ->info('The id of the service that should generate mock responses. It should be either an invokable or an iterable.') - ->end() - ->arrayNode('scoped_clients') - ->useAttributeAsKey('name') - ->normalizeKeys(false) - ->arrayPrototype() - ->fixXmlConfig('header') - ->beforeNormalization() - ->always() - ->then(function ($config) { - if (!class_exists(HttpClient::class)) { - throw new LogicException('HttpClient support cannot be enabled as the component is not installed. Try running "composer require symfony/http-client".'); - } - - return \is_array($config) ? $config : ['base_uri' => $config]; - }) - ->end() - ->validate() - ->ifTrue(function ($v) { return !isset($v['scope']) && !isset($v['base_uri']); }) - ->thenInvalid('Either "scope" or "base_uri" should be defined.') - ->end() - ->validate() - ->ifTrue(function ($v) { return !empty($v['query']) && !isset($v['base_uri']); }) - ->thenInvalid('"query" applies to "base_uri" but no base URI is defined.') - ->end() - ->children() - ->scalarNode('scope') - ->info('The regular expression that the request URL must match before adding the other options. When none is provided, the base URI is used instead.') - ->cannotBeEmpty() - ->end() - ->scalarNode('base_uri') - ->info('The URI to resolve relative URLs, following rules in RFC 3985, section 2.') - ->cannotBeEmpty() - ->end() - ->scalarNode('auth_basic') - ->info('An HTTP Basic authentication "username:password".') - ->end() - ->scalarNode('auth_bearer') - ->info('A token enabling HTTP Bearer authorization.') - ->end() - ->scalarNode('auth_ntlm') - ->info('A "username:password" pair to use Microsoft NTLM authentication (requires the cURL extension).') - ->end() - ->arrayNode('query') - ->info('Associative array of query string values merged with the base URI.') - ->useAttributeAsKey('key') - ->beforeNormalization() - ->always(function ($config) { - if (!\is_array($config)) { - return []; - } - if (!isset($config['key'], $config['value']) || \count($config) > 2) { - return $config; - } - - return [$config['key'] => $config['value']]; - }) - ->end() - ->normalizeKeys(false) - ->scalarPrototype()->end() - ->end() - ->arrayNode('headers') - ->info('Associative array: header => value(s).') - ->useAttributeAsKey('name') - ->normalizeKeys(false) - ->variablePrototype()->end() - ->end() - ->integerNode('max_redirects') - ->info('The maximum number of redirects to follow.') - ->end() - ->scalarNode('http_version') - ->info('The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.') - ->end() - ->arrayNode('resolve') - ->info('Associative array: domain => IP.') - ->useAttributeAsKey('host') - ->beforeNormalization() - ->always(function ($config) { - if (!\is_array($config)) { - return []; - } - if (!isset($config['host'], $config['value']) || \count($config) > 2) { - return $config; - } - - return [$config['host'] => $config['value']]; - }) - ->end() - ->normalizeKeys(false) - ->scalarPrototype()->end() - ->end() - ->scalarNode('proxy') - ->info('The URL of the proxy to pass requests through or null for automatic detection.') - ->end() - ->scalarNode('no_proxy') - ->info('A comma separated list of hosts that do not require a proxy to be reached.') - ->end() - ->floatNode('timeout') - ->info('The idle timeout, defaults to the "default_socket_timeout" ini parameter.') - ->end() - ->floatNode('max_duration') - ->info('The maximum execution time for the request+response as a whole.') - ->end() - ->scalarNode('bindto') - ->info('A network interface name, IP address, a host name or a UNIX socket to bind to.') - ->end() - ->booleanNode('verify_peer') - ->info('Indicates if the peer should be verified in an SSL/TLS context.') - ->end() - ->booleanNode('verify_host') - ->info('Indicates if the host should exist as a certificate common name.') - ->end() - ->scalarNode('cafile') - ->info('A certificate authority file.') - ->end() - ->scalarNode('capath') - ->info('A directory that contains multiple certificate authority files.') - ->end() - ->scalarNode('local_cert') - ->info('A PEM formatted certificate file.') - ->end() - ->scalarNode('local_pk') - ->info('A private key file.') - ->end() - ->scalarNode('passphrase') - ->info('The passphrase used to encrypt the "local_pk" file.') - ->end() - ->scalarNode('ciphers') - ->info('A list of SSL/TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...)') - ->end() - ->arrayNode('peer_fingerprint') - ->info('Associative array: hashing algorithm => hash(es).') - ->normalizeKeys(false) - ->children() - ->variableNode('sha1')->end() - ->variableNode('pin-sha256')->end() - ->variableNode('md5')->end() - ->end() - ->end() - ->append($this->addHttpClientRetrySection()) - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addHttpClientRetrySection() - { - $root = new NodeBuilder(); - - return $root - ->arrayNode('retry_failed') - ->fixXmlConfig('http_code') - ->canBeEnabled() - ->addDefaultsIfNotSet() - ->beforeNormalization() - ->always(function ($v) { - if (isset($v['retry_strategy']) && (isset($v['http_codes']) || isset($v['delay']) || isset($v['multiplier']) || isset($v['max_delay']) || isset($v['jitter']))) { - throw new \InvalidArgumentException('The "retry_strategy" option cannot be used along with the "http_codes", "delay", "multiplier", "max_delay" or "jitter" options.'); - } - - return $v; - }) - ->end() - ->children() - ->scalarNode('retry_strategy')->defaultNull()->info('service id to override the retry strategy')->end() - ->arrayNode('http_codes') - ->performNoDeepMerging() - ->beforeNormalization() - ->ifArray() - ->then(static function ($v) { - $list = []; - foreach ($v as $key => $val) { - if (is_numeric($val)) { - $list[] = ['code' => $val]; - } elseif (\is_array($val)) { - if (isset($val['code']) || isset($val['methods'])) { - $list[] = $val; - } else { - $list[] = ['code' => $key, 'methods' => $val]; - } - } elseif (true === $val || null === $val) { - $list[] = ['code' => $key]; - } - } - - return $list; - }) - ->end() - ->useAttributeAsKey('code') - ->arrayPrototype() - ->fixXmlConfig('method') - ->children() - ->integerNode('code')->end() - ->arrayNode('methods') - ->beforeNormalization() - ->ifArray() - ->then(function ($v) { - return array_map('strtoupper', $v); - }) - ->end() - ->prototype('scalar')->end() - ->info('A list of HTTP methods that triggers a retry for this status code. When empty, all methods are retried') - ->end() - ->end() - ->end() - ->info('A list of HTTP status code that triggers a retry') - ->end() - ->integerNode('max_retries')->defaultValue(3)->min(0)->end() - ->integerNode('delay')->defaultValue(1000)->min(0)->info('Time in ms to delay (or the initial value when multiplier is used)')->end() - ->floatNode('multiplier')->defaultValue(2)->min(1)->info('If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries)')->end() - ->integerNode('max_delay')->defaultValue(0)->min(0)->info('Max time in ms that a retry should ever be delayed (0 = infinite)')->end() - ->floatNode('jitter')->defaultValue(0.1)->min(0)->max(1)->info('Randomness in percent (between 0 and 1) to apply to the delay')->end() - ->end() - ; - } - - private function addMailerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('mailer') - ->info('Mailer configuration') - ->{$enableIfStandalone('symfony/mailer', Mailer::class)}() - ->validate() - ->ifTrue(function ($v) { return isset($v['dsn']) && \count($v['transports']); }) - ->thenInvalid('"dsn" and "transports" cannot be used together.') - ->end() - ->fixXmlConfig('transport') - ->fixXmlConfig('header') - ->children() - ->scalarNode('message_bus')->defaultNull()->info('The message bus to use. Defaults to the default bus if the Messenger component is installed.')->end() - ->scalarNode('dsn')->defaultNull()->end() - ->arrayNode('transports') - ->useAttributeAsKey('name') - ->prototype('scalar')->end() - ->end() - ->arrayNode('envelope') - ->info('Mailer Envelope configuration') - ->children() - ->scalarNode('sender')->end() - ->arrayNode('recipients') - ->performNoDeepMerging() - ->beforeNormalization() - ->ifArray() - ->then(function ($v) { - return array_filter(array_values($v)); - }) - ->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('headers') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->prototype('array') - ->normalizeKeys(false) - ->beforeNormalization() - ->ifTrue(function ($v) { return !\is_array($v) || array_keys($v) !== ['value']; }) - ->then(function ($v) { return ['value' => $v]; }) - ->end() - ->children() - ->variableNode('value')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addNotifierSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('notifier') - ->info('Notifier configuration') - ->{$enableIfStandalone('symfony/notifier', Notifier::class)}() - ->fixXmlConfig('chatter_transport') - ->children() - ->arrayNode('chatter_transports') - ->useAttributeAsKey('name') - ->prototype('scalar')->end() - ->end() - ->end() - ->fixXmlConfig('texter_transport') - ->children() - ->arrayNode('texter_transports') - ->useAttributeAsKey('name') - ->prototype('scalar')->end() - ->end() - ->end() - ->children() - ->booleanNode('notification_on_failed_messages')->defaultFalse()->end() - ->end() - ->children() - ->arrayNode('channel_policy') - ->useAttributeAsKey('name') - ->prototype('array') - ->beforeNormalization()->ifString()->then(function (string $v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->fixXmlConfig('admin_recipient') - ->children() - ->arrayNode('admin_recipients') - ->prototype('array') - ->children() - ->scalarNode('email')->cannotBeEmpty()->end() - ->scalarNode('phone')->defaultValue('')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRateLimiterSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('rate_limiter') - ->info('Rate limiter configuration') - ->{$enableIfStandalone('symfony/rate-limiter', TokenBucketLimiter::class)}() - ->fixXmlConfig('limiter') - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && !isset($v['limiters']) && !isset($v['limiter']); }) - ->then(function (array $v) { - $newV = [ - 'enabled' => $v['enabled'] ?? true, - ]; - unset($v['enabled']); - - $newV['limiters'] = $v; - - return $newV; - }) - ->end() - ->children() - ->arrayNode('limiters') - ->useAttributeAsKey('name') - ->arrayPrototype() - ->children() - ->scalarNode('lock_factory') - ->info('The service ID of the lock factory used by this limiter (or null to disable locking)') - ->defaultValue('lock.factory') - ->end() - ->scalarNode('cache_pool') - ->info('The cache pool to use for storing the current limiter state') - ->defaultValue('cache.rate_limiter') - ->end() - ->scalarNode('storage_service') - ->info('The service ID of a custom storage implementation, this precedes any configured "cache_pool"') - ->defaultNull() - ->end() - ->enumNode('policy') - ->info('The algorithm to be used by this limiter') - ->isRequired() - ->values(['fixed_window', 'token_bucket', 'sliding_window', 'no_limit']) - ->end() - ->integerNode('limit') - ->info('The maximum allowed hits in a fixed interval or burst') - ->isRequired() - ->end() - ->scalarNode('interval') - ->info('Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).') - ->end() - ->arrayNode('rate') - ->info('Configures the fill rate if "policy" is set to "token_bucket"') - ->children() - ->scalarNode('interval') - ->info('Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).') - ->end() - ->integerNode('amount')->info('Amount of tokens to add each interval')->defaultValue(1)->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addUidSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('uid') - ->info('Uid configuration') - ->{$enableIfStandalone('symfony/uid', UuidFactory::class)}() - ->addDefaultsIfNotSet() - ->children() - ->enumNode('default_uuid_version') - ->defaultValue(6) - ->values([6, 4, 1]) - ->end() - ->enumNode('name_based_uuid_version') - ->defaultValue(5) - ->values([5, 3]) - ->end() - ->scalarNode('name_based_uuid_namespace') - ->cannotBeEmpty() - ->end() - ->enumNode('time_based_uuid_version') - ->defaultValue(6) - ->values([6, 1]) - ->end() - ->scalarNode('time_based_uuid_node') - ->cannotBeEmpty() - ->end() - ->end() - ->end() - ->end() - ; - } -} diff --git a/lib/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php b/lib/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php deleted file mode 100644 index 00412e5c6..000000000 --- a/lib/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php +++ /dev/null @@ -1,2717 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; - -use Composer\InstalledVersions; -use Doctrine\Common\Annotations\AnnotationRegistry; -use Doctrine\Common\Annotations\Reader; -use Http\Client\HttpClient; -use phpDocumentor\Reflection\DocBlockFactoryInterface; -use phpDocumentor\Reflection\Types\ContextFactory; -use PHPStan\PhpDocParser\Parser\PhpDocParser; -use Psr\Cache\CacheItemPoolInterface; -use Psr\Container\ContainerInterface as PsrContainerInterface; -use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; -use Psr\Http\Client\ClientInterface; -use Psr\Log\LoggerAwareInterface; -use Symfony\Bridge\Monolog\Processor\DebugProcessor; -use Symfony\Bridge\Twig\Extension\CsrfExtension; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Bundle\FrameworkBundle\Routing\AnnotatedRouteControllerLoader; -use Symfony\Bundle\FrameworkBundle\Routing\RouteLoaderInterface; -use Symfony\Bundle\FullStack; -use Symfony\Bundle\MercureBundle\MercureBundle; -use Symfony\Component\Asset\PackageInterface; -use Symfony\Component\BrowserKit\AbstractBrowser; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\DoctrineAdapter; -use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter; -use Symfony\Component\Cache\Adapter\TagAwareAdapter; -use Symfony\Component\Cache\DependencyInjection\CachePoolPass; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Config\ResourceCheckerInterface; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\EnvVarLoaderInterface; -use Symfony\Component\DependencyInjection\EnvVarProcessorInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\Dotenv\Command\DebugCommand; -use Symfony\Component\EventDispatcher\Attribute\AsEventListener; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Finder\Finder; -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\Form; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeGuesserInterface; -use Symfony\Component\Form\FormTypeInterface; -use Symfony\Component\HttpClient\MockHttpClient; -use Symfony\Component\HttpClient\Retry\GenericRetryStrategy; -use Symfony\Component\HttpClient\RetryableHttpClient; -use Symfony\Component\HttpClient\ScopingHttpClient; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; -use Symfony\Component\HttpKernel\Attribute\AsController; -use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\Lock\Lock; -use Symfony\Component\Lock\LockFactory; -use Symfony\Component\Lock\LockInterface; -use Symfony\Component\Lock\PersistingStoreInterface; -use Symfony\Component\Lock\Store\StoreFactory; -use Symfony\Component\Lock\StoreInterface; -use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory; -use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory; -use Symfony\Component\Mailer\Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory; -use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Mercure\HubRegistry; -use Symfony\Component\Messenger\Attribute\AsMessageHandler; -use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory; -use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory; -use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory; -use Symfony\Component\Messenger\Bridge\Redis\Transport\RedisTransportFactory; -use Symfony\Component\Messenger\Handler\BatchHandlerInterface; -use Symfony\Component\Messenger\Handler\MessageHandlerInterface; -use Symfony\Component\Messenger\MessageBus; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Messenger\Middleware\RouterContextMiddleware; -use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface; -use Symfony\Component\Messenger\Transport\TransportFactoryInterface; -use Symfony\Component\Messenger\Transport\TransportInterface; -use Symfony\Component\Mime\Header\Headers; -use Symfony\Component\Mime\MimeTypeGuesserInterface; -use Symfony\Component\Mime\MimeTypes; -use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; -use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; -use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; -use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; -use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory; -use Symfony\Component\Notifier\Bridge\Expo\ExpoTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\Firebase\FirebaseTransportFactory; -use Symfony\Component\Notifier\Bridge\FreeMobile\FreeMobileTransportFactory; -use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransportFactory; -use Symfony\Component\Notifier\Bridge\Gitter\GitterTransportFactory; -use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Infobip\InfobipTransportFactory; -use Symfony\Component\Notifier\Bridge\Iqsms\IqsmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LightSms\LightSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInTransportFactory; -use Symfony\Component\Notifier\Bridge\Mailjet\MailjetTransportFactory as MailjetNotifierTransportFactory; -use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransportFactory; -use Symfony\Component\Notifier\Bridge\Mercure\MercureTransportFactory; -use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdTransport; -use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaTransportFactory; -use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransportFactory; -use Symfony\Component\Notifier\Bridge\Mobyt\MobytTransportFactory; -use Symfony\Component\Notifier\Bridge\Nexmo\NexmoTransportFactory; -use Symfony\Component\Notifier\Bridge\Octopush\OctopushTransportFactory; -use Symfony\Component\Notifier\Bridge\OneSignal\OneSignalTransportFactory; -use Symfony\Component\Notifier\Bridge\OvhCloud\OvhCloudTransportFactory; -use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Sendinblue\SendinblueTransportFactory as SendinblueNotifierTransportFactory; -use Symfony\Component\Notifier\Bridge\Sinch\SinchTransportFactory; -use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory; -use Symfony\Component\Notifier\Bridge\Sms77\Sms77TransportFactory; -use Symfony\Component\Notifier\Bridge\Smsapi\SmsapiTransportFactory; -use Symfony\Component\Notifier\Bridge\SmsBiuras\SmsBiurasTransportFactory; -use Symfony\Component\Notifier\Bridge\Smsc\SmscTransportFactory; -use Symfony\Component\Notifier\Bridge\SpotHit\SpotHitTransportFactory; -use Symfony\Component\Notifier\Bridge\Telegram\TelegramTransportFactory; -use Symfony\Component\Notifier\Bridge\Telnyx\TelnyxTransportFactory; -use Symfony\Component\Notifier\Bridge\TurboSms\TurboSmsTransport; -use Symfony\Component\Notifier\Bridge\Twilio\TwilioTransportFactory; -use Symfony\Component\Notifier\Bridge\Vonage\VonageTransportFactory; -use Symfony\Component\Notifier\Bridge\Yunpian\YunpianTransportFactory; -use Symfony\Component\Notifier\Bridge\Zulip\ZulipTransportFactory; -use Symfony\Component\Notifier\ChatterInterface; -use Symfony\Component\Notifier\Notifier; -use Symfony\Component\Notifier\Recipient\Recipient; -use Symfony\Component\Notifier\TexterInterface; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface as NotifierTransportFactoryInterface; -use Symfony\Component\PropertyAccess\PropertyAccessor; -use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor; -use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; -use Symfony\Component\RateLimiter\LimiterInterface; -use Symfony\Component\RateLimiter\RateLimiterFactory; -use Symfony\Component\RateLimiter\Storage\CacheStorage; -use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; -use Symfony\Component\Routing\Loader\AnnotationFileLoader; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Serializer\Encoder\DecoderInterface; -use Symfony\Component\Serializer\Encoder\EncoderInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -use Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\String\LazyString; -use Symfony\Component\String\Slugger\SluggerInterface; -use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory; -use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory; -use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory; -use Symfony\Component\Translation\Command\XliffLintCommand as BaseXliffLintCommand; -use Symfony\Component\Translation\PseudoLocalizationTranslator; -use Symfony\Component\Translation\Translator; -use Symfony\Component\Uid\Factory\UuidFactory; -use Symfony\Component\Uid\UuidV4; -use Symfony\Component\Validator\ConstraintValidatorInterface; -use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader; -use Symfony\Component\Validator\ObjectInitializerInterface; -use Symfony\Component\Validator\Validation; -use Symfony\Component\WebLink\HttpHeaderSerializer; -use Symfony\Component\Workflow; -use Symfony\Component\Workflow\WorkflowInterface; -use Symfony\Component\Yaml\Command\LintCommand as BaseYamlLintCommand; -use Symfony\Component\Yaml\Yaml; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\CallbackInterface; -use Symfony\Contracts\Cache\TagAwareCacheInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\Service\ResetInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Symfony\Contracts\Translation\LocaleAwareInterface; - -/** - * Process the configuration and prepare the dependency injection container with - * parameters and services. - */ -class FrameworkExtension extends Extension -{ - private $formConfigEnabled = false; - private $translationConfigEnabled = false; - private $sessionConfigEnabled = false; - private $annotationsConfigEnabled = false; - private $validatorConfigEnabled = false; - private $messengerConfigEnabled = false; - private $mailerConfigEnabled = false; - private $httpClientConfigEnabled = false; - private $notifierConfigEnabled = false; - private $propertyAccessConfigEnabled = false; - private static $lockConfigEnabled = false; - - /** - * Responds to the app.config configuration parameter. - * - * @throws LogicException - */ - public function load(array $configs, ContainerBuilder $container) - { - if (!class_exists(InstalledVersions::class)) { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Configuring Symfony without the Composer Runtime API is deprecated. Consider upgrading to Composer 2.1 or later.'); - } - - $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); - - $loader->load('web.php'); - $loader->load('services.php'); - $loader->load('fragment_renderer.php'); - $loader->load('error_renderer.php'); - - if (ContainerBuilder::willBeAvailable('psr/event-dispatcher', PsrEventDispatcherInterface::class, ['symfony/framework-bundle'], true)) { - $container->setAlias(PsrEventDispatcherInterface::class, 'event_dispatcher'); - } - - $container->registerAliasForArgument('parameter_bag', PsrContainerInterface::class); - - if ($this->hasConsole()) { - $loader->load('console.php'); - - if (!class_exists(BaseXliffLintCommand::class)) { - $container->removeDefinition('console.command.xliff_lint'); - } - if (!class_exists(BaseYamlLintCommand::class)) { - $container->removeDefinition('console.command.yaml_lint'); - } - - if (!class_exists(DebugCommand::class)) { - $container->removeDefinition('console.command.dotenv_debug'); - } - } - - // Load Cache configuration first as it is used by other components - $loader->load('cache.php'); - - $configuration = $this->getConfiguration($configs, $container); - $config = $this->processConfiguration($configuration, $configs); - - $this->annotationsConfigEnabled = $this->isConfigEnabled($container, $config['annotations']); - $this->translationConfigEnabled = $this->isConfigEnabled($container, $config['translator']); - - // A translator must always be registered (as support is included by - // default in the Form and Validator component). If disabled, an identity - // translator will be used and everything will still work as expected. - if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form']) || $this->isConfigEnabled($container, $config['validation'])) { - if (!class_exists(Translator::class) && $this->isConfigEnabled($container, $config['translator'])) { - throw new LogicException('Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation".'); - } - - if (class_exists(Translator::class)) { - $loader->load('identity_translator.php'); - } - } - - $container->getDefinition('locale_listener')->replaceArgument(3, $config['set_locale_from_accept_language']); - $container->getDefinition('response_listener')->replaceArgument(1, $config['set_content_language_from_locale']); - - // If the slugger is used but the String component is not available, we should throw an error - if (!ContainerBuilder::willBeAvailable('symfony/string', SluggerInterface::class, ['symfony/framework-bundle'], true)) { - $container->register('slugger', 'stdClass') - ->addError('You cannot use the "slugger" service since the String component is not installed. Try running "composer require symfony/string".'); - } else { - if (!ContainerBuilder::willBeAvailable('symfony/translation', LocaleAwareInterface::class, ['symfony/framework-bundle'], true)) { - $container->register('slugger', 'stdClass') - ->addError('You cannot use the "slugger" service since the Translation contracts are not installed. Try running "composer require symfony/translation".'); - } - - if (!\extension_loaded('intl') && !\defined('PHPUNIT_COMPOSER_INSTALL')) { - trigger_deprecation('', '', 'Please install the "intl" PHP extension for best performance.'); - } - } - - if (isset($config['secret'])) { - $container->setParameter('kernel.secret', $config['secret']); - } - - $container->setParameter('kernel.http_method_override', $config['http_method_override']); - $container->setParameter('kernel.trusted_hosts', $config['trusted_hosts']); - $container->setParameter('kernel.default_locale', $config['default_locale']); - $container->setParameter('kernel.enabled_locales', $config['enabled_locales']); - $container->setParameter('kernel.error_controller', $config['error_controller']); - - if (($config['trusted_proxies'] ?? false) && ($config['trusted_headers'] ?? false)) { - $container->setParameter('kernel.trusted_proxies', $config['trusted_proxies']); - $container->setParameter('kernel.trusted_headers', $this->resolveTrustedHeaders($config['trusted_headers'])); - } - - if (!$container->hasParameter('debug.file_link_format')) { - $container->setParameter('debug.file_link_format', $config['ide']); - } - - if (!empty($config['test'])) { - $loader->load('test.php'); - - if (!class_exists(AbstractBrowser::class)) { - $container->removeDefinition('test.client'); - } - } - - if ($this->isConfigEnabled($container, $config['request'])) { - $this->registerRequestConfiguration($config['request'], $container, $loader); - } - - if ($this->isConfigEnabled($container, $config['assets'])) { - if (!class_exists(\Symfony\Component\Asset\Package::class)) { - throw new LogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".'); - } - - $this->registerAssetsConfiguration($config['assets'], $container, $loader); - } - - if ($this->httpClientConfigEnabled = $this->isConfigEnabled($container, $config['http_client'])) { - $this->registerHttpClientConfiguration($config['http_client'], $container, $loader, $config['profiler']); - } - - if ($this->mailerConfigEnabled = $this->isConfigEnabled($container, $config['mailer'])) { - $this->registerMailerConfiguration($config['mailer'], $container, $loader); - } - - $propertyInfoEnabled = $this->isConfigEnabled($container, $config['property_info']); - $this->registerHttpCacheConfiguration($config['http_cache'], $container, $config['http_method_override']); - $this->registerEsiConfiguration($config['esi'], $container, $loader); - $this->registerSsiConfiguration($config['ssi'], $container, $loader); - $this->registerFragmentsConfiguration($config['fragments'], $container, $loader); - $this->registerTranslatorConfiguration($config['translator'], $container, $loader, $config['default_locale'], $config['enabled_locales']); - $this->registerWorkflowConfiguration($config['workflows'], $container, $loader); - $this->registerDebugConfiguration($config['php_errors'], $container, $loader); - // @deprecated since Symfony 5.4, in 6.0 change to: - // $this->registerRouterConfiguration($config['router'], $container, $loader, $config['enabled_locales']); - $this->registerRouterConfiguration($config['router'], $container, $loader, $config['translator']['enabled_locales'] ?: $config['enabled_locales']); - $this->registerAnnotationsConfiguration($config['annotations'], $container, $loader); - $this->registerPropertyAccessConfiguration($config['property_access'], $container, $loader); - $this->registerSecretsConfiguration($config['secrets'], $container, $loader); - - $container->getDefinition('exception_listener')->replaceArgument(3, $config['exceptions']); - - if ($this->isConfigEnabled($container, $config['serializer'])) { - if (!class_exists(\Symfony\Component\Serializer\Serializer::class)) { - throw new LogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".'); - } - - $this->registerSerializerConfiguration($config['serializer'], $container, $loader); - } - - if ($propertyInfoEnabled) { - $this->registerPropertyInfoConfiguration($container, $loader); - } - - if (self::$lockConfigEnabled = $this->isConfigEnabled($container, $config['lock'])) { - $this->registerLockConfiguration($config['lock'], $container, $loader); - } - - if ($this->isConfigEnabled($container, $config['rate_limiter'])) { - if (!interface_exists(LimiterInterface::class)) { - throw new LogicException('Rate limiter support cannot be enabled as the RateLimiter component is not installed. Try running "composer require symfony/rate-limiter".'); - } - - $this->registerRateLimiterConfiguration($config['rate_limiter'], $container, $loader); - } - - if ($this->isConfigEnabled($container, $config['web_link'])) { - if (!class_exists(HttpHeaderSerializer::class)) { - throw new LogicException('WebLink support cannot be enabled as the WebLink component is not installed. Try running "composer require symfony/weblink".'); - } - - $loader->load('web_link.php'); - } - - if ($this->isConfigEnabled($container, $config['uid'])) { - if (!class_exists(UuidFactory::class)) { - throw new LogicException('Uid support cannot be enabled as the Uid component is not installed. Try running "composer require symfony/uid".'); - } - - $this->registerUidConfiguration($config['uid'], $container, $loader); - } - - // register cache before session so both can share the connection services - $this->registerCacheConfiguration($config['cache'], $container); - - if ($this->isConfigEnabled($container, $config['session'])) { - if (!\extension_loaded('session')) { - throw new LogicException('Session support cannot be enabled as the session extension is not installed. See https://php.net/session.installation for instructions.'); - } - - $this->sessionConfigEnabled = true; - $this->registerSessionConfiguration($config['session'], $container, $loader); - if (!empty($config['test'])) { - // test listener will replace the existing session listener - // as we are aliasing to avoid duplicated registered events - $container->setAlias('session_listener', 'test.session.listener'); - } - } elseif (!empty($config['test'])) { - $container->removeDefinition('test.session.listener'); - } - - // csrf depends on session being registered - if (null === $config['csrf_protection']['enabled']) { - $config['csrf_protection']['enabled'] = $this->sessionConfigEnabled && !class_exists(FullStack::class) && ContainerBuilder::willBeAvailable('symfony/security-csrf', CsrfTokenManagerInterface::class, ['symfony/framework-bundle'], true); - } - $this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader); - - // form depends on csrf being registered - if ($this->isConfigEnabled($container, $config['form'])) { - if (!class_exists(Form::class)) { - throw new LogicException('Form support cannot be enabled as the Form component is not installed. Try running "composer require symfony/form".'); - } - - $this->formConfigEnabled = true; - $this->registerFormConfiguration($config, $container, $loader); - - if (ContainerBuilder::willBeAvailable('symfony/validator', Validation::class, ['symfony/framework-bundle', 'symfony/form'], true)) { - $config['validation']['enabled'] = true; - } else { - $container->setParameter('validator.translation_domain', 'validators'); - - $container->removeDefinition('form.type_extension.form.validator'); - $container->removeDefinition('form.type_guesser.validator'); - } - } else { - $container->removeDefinition('console.command.form_debug'); - } - - // validation depends on form, annotations being registered - $this->registerValidationConfiguration($config['validation'], $container, $loader, $propertyInfoEnabled); - - // messenger depends on validation being registered - if ($this->messengerConfigEnabled = $this->isConfigEnabled($container, $config['messenger'])) { - $this->registerMessengerConfiguration($config['messenger'], $container, $loader, $config['validation']); - } else { - $container->removeDefinition('console.command.messenger_consume_messages'); - $container->removeDefinition('console.command.messenger_debug'); - $container->removeDefinition('console.command.messenger_stop_workers'); - $container->removeDefinition('console.command.messenger_setup_transports'); - $container->removeDefinition('console.command.messenger_failed_messages_retry'); - $container->removeDefinition('console.command.messenger_failed_messages_show'); - $container->removeDefinition('console.command.messenger_failed_messages_remove'); - $container->removeDefinition('cache.messenger.restart_workers_signal'); - - if ($container->hasDefinition('messenger.transport.amqp.factory') && !class_exists(AmqpTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class)) { - $container->getDefinition('messenger.transport.amqp.factory') - ->setClass(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class) - ->addTag('messenger.transport_factory'); - } else { - $container->removeDefinition('messenger.transport.amqp.factory'); - } - } - - if ($container->hasDefinition('messenger.transport.redis.factory') && !class_exists(RedisTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class)) { - $container->getDefinition('messenger.transport.redis.factory') - ->setClass(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class) - ->addTag('messenger.transport_factory'); - } else { - $container->removeDefinition('messenger.transport.redis.factory'); - } - } - } - - // notifier depends on messenger, mailer being registered - if ($this->notifierConfigEnabled = $this->isConfigEnabled($container, $config['notifier'])) { - $this->registerNotifierConfiguration($config['notifier'], $container, $loader); - } - - // profiler depends on form, validation, translation, messenger, mailer, http-client, notifier being registered - $this->registerProfilerConfiguration($config['profiler'], $container, $loader); - - $this->addAnnotatedClassesToCompile([ - '**\\Controller\\', - '**\\Entity\\', - - // Added explicitly so that we don't rely on the class map being dumped to make it work - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController', - ]); - - if (ContainerBuilder::willBeAvailable('symfony/mime', MimeTypes::class, ['symfony/framework-bundle'], true)) { - $loader->load('mime_type.php'); - } - - $container->registerForAutoconfiguration(PackageInterface::class) - ->addTag('assets.package'); - $container->registerForAutoconfiguration(Command::class) - ->addTag('console.command'); - $container->registerForAutoconfiguration(ResourceCheckerInterface::class) - ->addTag('config_cache.resource_checker'); - $container->registerForAutoconfiguration(EnvVarLoaderInterface::class) - ->addTag('container.env_var_loader'); - $container->registerForAutoconfiguration(EnvVarProcessorInterface::class) - ->addTag('container.env_var_processor'); - $container->registerForAutoconfiguration(CallbackInterface::class) - ->addTag('container.reversible'); - $container->registerForAutoconfiguration(ServiceLocator::class) - ->addTag('container.service_locator'); - $container->registerForAutoconfiguration(ServiceSubscriberInterface::class) - ->addTag('container.service_subscriber'); - $container->registerForAutoconfiguration(ArgumentValueResolverInterface::class) - ->addTag('controller.argument_value_resolver'); - $container->registerForAutoconfiguration(AbstractController::class) - ->addTag('controller.service_arguments'); - $container->registerForAutoconfiguration(DataCollectorInterface::class) - ->addTag('data_collector'); - $container->registerForAutoconfiguration(FormTypeInterface::class) - ->addTag('form.type'); - $container->registerForAutoconfiguration(FormTypeGuesserInterface::class) - ->addTag('form.type_guesser'); - $container->registerForAutoconfiguration(FormTypeExtensionInterface::class) - ->addTag('form.type_extension'); - $container->registerForAutoconfiguration(CacheClearerInterface::class) - ->addTag('kernel.cache_clearer'); - $container->registerForAutoconfiguration(CacheWarmerInterface::class) - ->addTag('kernel.cache_warmer'); - $container->registerForAutoconfiguration(EventDispatcherInterface::class) - ->addTag('event_dispatcher.dispatcher'); - $container->registerForAutoconfiguration(EventSubscriberInterface::class) - ->addTag('kernel.event_subscriber'); - $container->registerForAutoconfiguration(LocaleAwareInterface::class) - ->addTag('kernel.locale_aware'); - $container->registerForAutoconfiguration(ResetInterface::class) - ->addTag('kernel.reset', ['method' => 'reset']); - - if (!interface_exists(MarshallerInterface::class)) { - $container->registerForAutoconfiguration(ResettableInterface::class) - ->addTag('kernel.reset', ['method' => 'reset']); - } - - $container->registerForAutoconfiguration(PropertyListExtractorInterface::class) - ->addTag('property_info.list_extractor'); - $container->registerForAutoconfiguration(PropertyTypeExtractorInterface::class) - ->addTag('property_info.type_extractor'); - $container->registerForAutoconfiguration(PropertyDescriptionExtractorInterface::class) - ->addTag('property_info.description_extractor'); - $container->registerForAutoconfiguration(PropertyAccessExtractorInterface::class) - ->addTag('property_info.access_extractor'); - $container->registerForAutoconfiguration(PropertyInitializableExtractorInterface::class) - ->addTag('property_info.initializable_extractor'); - $container->registerForAutoconfiguration(EncoderInterface::class) - ->addTag('serializer.encoder'); - $container->registerForAutoconfiguration(DecoderInterface::class) - ->addTag('serializer.encoder'); - $container->registerForAutoconfiguration(NormalizerInterface::class) - ->addTag('serializer.normalizer'); - $container->registerForAutoconfiguration(DenormalizerInterface::class) - ->addTag('serializer.normalizer'); - $container->registerForAutoconfiguration(ConstraintValidatorInterface::class) - ->addTag('validator.constraint_validator'); - $container->registerForAutoconfiguration(ObjectInitializerInterface::class) - ->addTag('validator.initializer'); - $container->registerForAutoconfiguration(MessageHandlerInterface::class) - ->addTag('messenger.message_handler'); - $container->registerForAutoconfiguration(BatchHandlerInterface::class) - ->addTag('messenger.message_handler'); - $container->registerForAutoconfiguration(TransportFactoryInterface::class) - ->addTag('messenger.transport_factory'); - $container->registerForAutoconfiguration(MimeTypeGuesserInterface::class) - ->addTag('mime.mime_type_guesser'); - $container->registerForAutoconfiguration(LoggerAwareInterface::class) - ->addMethodCall('setLogger', [new Reference('logger')]); - - $container->registerAttributeForAutoconfiguration(AsEventListener::class, static function (ChildDefinition $definition, AsEventListener $attribute, \Reflector $reflector) { - $tagAttributes = get_object_vars($attribute); - if ($reflector instanceof \ReflectionMethod) { - if (isset($tagAttributes['method'])) { - throw new LogicException(sprintf('AsEventListener attribute cannot declare a method on "%s::%s()".', $reflector->class, $reflector->name)); - } - $tagAttributes['method'] = $reflector->getName(); - } - $definition->addTag('kernel.event_listener', $tagAttributes); - }); - $container->registerAttributeForAutoconfiguration(AsController::class, static function (ChildDefinition $definition, AsController $attribute): void { - $definition->addTag('controller.service_arguments'); - }); - $container->registerAttributeForAutoconfiguration(AsMessageHandler::class, static function (ChildDefinition $definition, AsMessageHandler $attribute): void { - $tagAttributes = get_object_vars($attribute); - $tagAttributes['from_transport'] = $tagAttributes['fromTransport']; - unset($tagAttributes['fromTransport']); - - $definition->addTag('messenger.message_handler', $tagAttributes); - }); - - if (!$container->getParameter('kernel.debug')) { - // remove tagged iterator argument for resource checkers - $container->getDefinition('config_cache_factory')->setArguments([]); - } - - if (!$config['disallow_search_engine_index'] ?? false) { - $container->removeDefinition('disallow_search_engine_index_response_listener'); - } - - $container->registerForAutoconfiguration(RouteLoaderInterface::class) - ->addTag('routing.route_loader'); - - $container->setParameter('container.behavior_describing_tags', [ - 'annotations.cached_reader', - 'container.do_not_inline', - 'container.service_locator', - 'container.service_subscriber', - 'kernel.event_subscriber', - 'kernel.event_listener', - 'kernel.locale_aware', - 'kernel.reset', - ]); - } - - /** - * {@inheritdoc} - */ - public function getConfiguration(array $config, ContainerBuilder $container) - { - return new Configuration($container->getParameter('kernel.debug')); - } - - protected function hasConsole(): bool - { - return class_exists(Application::class); - } - - private function registerFormConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('form.php'); - - $container->getDefinition('form.type_extension.form.validator')->setArgument(1, $config['form']['legacy_error_messages']); - - if (null === $config['form']['csrf_protection']['enabled']) { - $config['form']['csrf_protection']['enabled'] = $config['csrf_protection']['enabled']; - } - - if ($this->isConfigEnabled($container, $config['form']['csrf_protection'])) { - if (!$container->hasDefinition('security.csrf.token_generator')) { - throw new \LogicException('To use form CSRF protection, "framework.csrf_protection" must be enabled.'); - } - - $loader->load('form_csrf.php'); - - $container->setParameter('form.type_extension.csrf.enabled', true); - $container->setParameter('form.type_extension.csrf.field_name', $config['form']['csrf_protection']['field_name']); - } else { - $container->setParameter('form.type_extension.csrf.enabled', false); - } - - if (!ContainerBuilder::willBeAvailable('symfony/translation', Translator::class, ['symfony/framework-bundle', 'symfony/form'], true)) { - $container->removeDefinition('form.type_extension.upload.validator'); - } - if (!method_exists(CachingFactoryDecorator::class, 'reset')) { - $container->getDefinition('form.choice_list_factory.cached') - ->clearTag('kernel.reset') - ; - } - } - - private function registerHttpCacheConfiguration(array $config, ContainerBuilder $container, bool $httpMethodOverride) - { - $options = $config; - unset($options['enabled']); - - if (!$options['private_headers']) { - unset($options['private_headers']); - } - - $container->getDefinition('http_cache') - ->setPublic($config['enabled']) - ->replaceArgument(3, $options); - - if ($httpMethodOverride) { - $container->getDefinition('http_cache') - ->addArgument((new Definition('void')) - ->setFactory([Request::class, 'enableHttpMethodParameterOverride']) - ); - } - } - - private function registerEsiConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('fragment.renderer.esi'); - - return; - } - - $loader->load('esi.php'); - } - - private function registerSsiConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('fragment.renderer.ssi'); - - return; - } - - $loader->load('ssi.php'); - } - - private function registerFragmentsConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('fragment.renderer.hinclude'); - - return; - } - - $container->setParameter('fragment.renderer.hinclude.global_template', $config['hinclude_default_template']); - - $loader->load('fragment_listener.php'); - $container->setParameter('fragment.path', $config['path']); - } - - private function registerProfilerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - // this is needed for the WebProfiler to work even if the profiler is disabled - $container->setParameter('data_collector.templates', []); - - return; - } - - $loader->load('profiling.php'); - $loader->load('collectors.php'); - $loader->load('cache_debug.php'); - - if ($this->formConfigEnabled) { - $loader->load('form_debug.php'); - } - - if ($this->validatorConfigEnabled) { - $loader->load('validator_debug.php'); - } - - if ($this->translationConfigEnabled) { - $loader->load('translation_debug.php'); - - $container->getDefinition('translator.data_collector')->setDecoratedService('translator'); - } - - if ($this->messengerConfigEnabled) { - $loader->load('messenger_debug.php'); - } - - if ($this->mailerConfigEnabled) { - $loader->load('mailer_debug.php'); - } - - if ($this->httpClientConfigEnabled) { - $loader->load('http_client_debug.php'); - } - - if ($this->notifierConfigEnabled) { - $loader->load('notifier_debug.php'); - } - - $container->setParameter('profiler_listener.only_exceptions', $config['only_exceptions']); - $container->setParameter('profiler_listener.only_main_requests', $config['only_main_requests'] || $config['only_master_requests']); - - // Choose storage class based on the DSN - [$class] = explode(':', $config['dsn'], 2); - if ('file' !== $class) { - throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class)); - } - - $container->setParameter('profiler.storage.dsn', $config['dsn']); - - $container->getDefinition('profiler') - ->addArgument($config['collect']) - ->addTag('kernel.reset', ['method' => 'reset']); - - $container->getDefinition('profiler_listener') - ->addArgument($config['collect_parameter']); - } - - private function registerWorkflowConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$config['enabled']) { - $container->removeDefinition('console.command.workflow_dump'); - - return; - } - - if (!class_exists(Workflow\Workflow::class)) { - throw new LogicException('Workflow support cannot be enabled as the Workflow component is not installed. Try running "composer require symfony/workflow".'); - } - - $loader->load('workflow.php'); - - $registryDefinition = $container->getDefinition('workflow.registry'); - - $workflows = []; - - foreach ($config['workflows'] as $name => $workflow) { - $type = $workflow['type']; - $workflowId = sprintf('%s.%s', $type, $name); - - // Process Metadata (workflow + places (transition is done in the "create transition" block)) - $metadataStoreDefinition = new Definition(Workflow\Metadata\InMemoryMetadataStore::class, [[], [], null]); - if ($workflow['metadata']) { - $metadataStoreDefinition->replaceArgument(0, $workflow['metadata']); - } - $placesMetadata = []; - foreach ($workflow['places'] as $place) { - if ($place['metadata']) { - $placesMetadata[$place['name']] = $place['metadata']; - } - } - if ($placesMetadata) { - $metadataStoreDefinition->replaceArgument(1, $placesMetadata); - } - - // Create transitions - $transitions = []; - $guardsConfiguration = []; - $transitionsMetadataDefinition = new Definition(\SplObjectStorage::class); - // Global transition counter per workflow - $transitionCounter = 0; - foreach ($workflow['transitions'] as $transition) { - if ('workflow' === $type) { - $transitionDefinition = new Definition(Workflow\Transition::class, [$transition['name'], $transition['from'], $transition['to']]); - $transitionDefinition->setPublic(false); - $transitionId = sprintf('.%s.transition.%s', $workflowId, $transitionCounter++); - $container->setDefinition($transitionId, $transitionDefinition); - $transitions[] = new Reference($transitionId); - if (isset($transition['guard'])) { - $configuration = new Definition(Workflow\EventListener\GuardExpression::class); - $configuration->addArgument(new Reference($transitionId)); - $configuration->addArgument($transition['guard']); - $configuration->setPublic(false); - $eventName = sprintf('workflow.%s.guard.%s', $name, $transition['name']); - $guardsConfiguration[$eventName][] = $configuration; - } - if ($transition['metadata']) { - $transitionsMetadataDefinition->addMethodCall('attach', [ - new Reference($transitionId), - $transition['metadata'], - ]); - } - } elseif ('state_machine' === $type) { - foreach ($transition['from'] as $from) { - foreach ($transition['to'] as $to) { - $transitionDefinition = new Definition(Workflow\Transition::class, [$transition['name'], $from, $to]); - $transitionDefinition->setPublic(false); - $transitionId = sprintf('.%s.transition.%s', $workflowId, $transitionCounter++); - $container->setDefinition($transitionId, $transitionDefinition); - $transitions[] = new Reference($transitionId); - if (isset($transition['guard'])) { - $configuration = new Definition(Workflow\EventListener\GuardExpression::class); - $configuration->addArgument(new Reference($transitionId)); - $configuration->addArgument($transition['guard']); - $configuration->setPublic(false); - $eventName = sprintf('workflow.%s.guard.%s', $name, $transition['name']); - $guardsConfiguration[$eventName][] = $configuration; - } - if ($transition['metadata']) { - $transitionsMetadataDefinition->addMethodCall('attach', [ - new Reference($transitionId), - $transition['metadata'], - ]); - } - } - } - } - } - $metadataStoreDefinition->replaceArgument(2, $transitionsMetadataDefinition); - $container->setDefinition(sprintf('%s.metadata_store', $workflowId), $metadataStoreDefinition); - - // Create places - $places = array_column($workflow['places'], 'name'); - $initialMarking = $workflow['initial_marking'] ?? []; - - // Create a Definition - $definitionDefinition = new Definition(Workflow\Definition::class); - $definitionDefinition->setPublic(false); - $definitionDefinition->addArgument($places); - $definitionDefinition->addArgument($transitions); - $definitionDefinition->addArgument($initialMarking); - $definitionDefinition->addArgument(new Reference(sprintf('%s.metadata_store', $workflowId))); - - $workflows[$workflowId] = $definitionDefinition; - - // Create MarkingStore - if (isset($workflow['marking_store']['type'])) { - $markingStoreDefinition = new ChildDefinition('workflow.marking_store.method'); - $markingStoreDefinition->setArguments([ - 'state_machine' === $type, // single state - $workflow['marking_store']['property'], - ]); - } elseif (isset($workflow['marking_store']['service'])) { - $markingStoreDefinition = new Reference($workflow['marking_store']['service']); - } - - // Create Workflow - $workflowDefinition = new ChildDefinition(sprintf('%s.abstract', $type)); - $workflowDefinition->replaceArgument(0, new Reference(sprintf('%s.definition', $workflowId))); - $workflowDefinition->replaceArgument(1, $markingStoreDefinition ?? null); - $workflowDefinition->replaceArgument(3, $name); - $workflowDefinition->replaceArgument(4, $workflow['events_to_dispatch']); - $workflowDefinition->addTag('container.private', [ - 'package' => 'symfony/framework-bundle', - 'version' => '5.3', - ]); - - // Store to container - $container->setDefinition($workflowId, $workflowDefinition); - $container->setDefinition(sprintf('%s.definition', $workflowId), $definitionDefinition); - $container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name.'.'.$type); - - // Validate Workflow - if ('state_machine' === $workflow['type']) { - $validator = new Workflow\Validator\StateMachineValidator(); - } else { - $validator = new Workflow\Validator\WorkflowValidator(); - } - - $trs = array_map(function (Reference $ref) use ($container): Workflow\Transition { - return $container->get((string) $ref); - }, $transitions); - $realDefinition = new Workflow\Definition($places, $trs, $initialMarking); - $validator->validate($realDefinition, $name); - - // Add workflow to Registry - if ($workflow['supports']) { - foreach ($workflow['supports'] as $supportedClassName) { - $strategyDefinition = new Definition(Workflow\SupportStrategy\InstanceOfSupportStrategy::class, [$supportedClassName]); - $strategyDefinition->setPublic(false); - $registryDefinition->addMethodCall('addWorkflow', [new Reference($workflowId), $strategyDefinition]); - } - } elseif (isset($workflow['support_strategy'])) { - $registryDefinition->addMethodCall('addWorkflow', [new Reference($workflowId), new Reference($workflow['support_strategy'])]); - } - - // Enable the AuditTrail - if ($workflow['audit_trail']['enabled']) { - $listener = new Definition(Workflow\EventListener\AuditTrailListener::class); - $listener->addTag('monolog.logger', ['channel' => 'workflow']); - $listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.leave', $name), 'method' => 'onLeave']); - $listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.transition', $name), 'method' => 'onTransition']); - $listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.enter', $name), 'method' => 'onEnter']); - $listener->addArgument(new Reference('logger')); - $container->setDefinition(sprintf('.%s.listener.audit_trail', $workflowId), $listener); - } - - // Add Guard Listener - if ($guardsConfiguration) { - if (!class_exists(ExpressionLanguage::class)) { - throw new LogicException('Cannot guard workflows as the ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'); - } - - if (!class_exists(Security::class)) { - throw new LogicException('Cannot guard workflows as the Security component is not installed. Try running "composer require symfony/security-core".'); - } - - $guard = new Definition(Workflow\EventListener\GuardListener::class); - - $guard->setArguments([ - $guardsConfiguration, - new Reference('workflow.security.expression_language'), - new Reference('security.token_storage'), - new Reference('security.authorization_checker'), - new Reference('security.authentication.trust_resolver'), - new Reference('security.role_hierarchy'), - new Reference('validator', ContainerInterface::NULL_ON_INVALID_REFERENCE), - ]); - foreach ($guardsConfiguration as $eventName => $config) { - $guard->addTag('kernel.event_listener', ['event' => $eventName, 'method' => 'onTransition']); - } - - $container->setDefinition(sprintf('.%s.listener.guard', $workflowId), $guard); - $container->setParameter('workflow.has_guard_listeners', true); - } - } - - $commandDumpDefinition = $container->getDefinition('console.command.workflow_dump'); - $commandDumpDefinition->setArgument(0, $workflows); - } - - private function registerDebugConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('debug_prod.php'); - - if (class_exists(Stopwatch::class)) { - $container->register('debug.stopwatch', Stopwatch::class) - ->addArgument(true) - ->addTag('kernel.reset', ['method' => 'reset']); - $container->setAlias(Stopwatch::class, new Alias('debug.stopwatch', false)); - } - - $debug = $container->getParameter('kernel.debug'); - - if ($debug) { - $container->setParameter('debug.container.dump', '%kernel.build_dir%/%kernel.container_class%.xml'); - } - - if ($debug && class_exists(Stopwatch::class)) { - $loader->load('debug.php'); - } - - $definition = $container->findDefinition('debug.debug_handlers_listener'); - - if (false === $config['log']) { - $definition->replaceArgument(1, null); - } elseif (true !== $config['log']) { - $definition->replaceArgument(2, $config['log']); - } - - if (!$config['throw']) { - $container->setParameter('debug.error_handler.throw_at', 0); - } - - if ($debug && class_exists(DebugProcessor::class)) { - $definition = new Definition(DebugProcessor::class); - $definition->setPublic(false); - $definition->addArgument(new Reference('request_stack')); - $container->setDefinition('debug.log_processor', $definition); - } - } - - private function registerRouterConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, array $enabledLocales = []) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.router_debug'); - $container->removeDefinition('console.command.router_match'); - $container->removeDefinition('messenger.middleware.router_context'); - - return; - } - if (!class_exists(RouterContextMiddleware::class)) { - $container->removeDefinition('messenger.middleware.router_context'); - } - - $loader->load('routing.php'); - - if (null === $config['utf8']) { - trigger_deprecation('symfony/framework-bundle', '5.1', 'Not setting the "framework.router.utf8" configuration option is deprecated, it will default to "true" in version 6.0.'); - } - - if ($config['utf8']) { - $container->getDefinition('routing.loader')->replaceArgument(1, ['utf8' => true]); - } - - if ($enabledLocales) { - $enabledLocales = implode('|', array_map('preg_quote', $enabledLocales)); - $container->getDefinition('routing.loader')->replaceArgument(2, ['_locale' => $enabledLocales]); - } - - if (!ContainerBuilder::willBeAvailable('symfony/expression-language', ExpressionLanguage::class, ['symfony/framework-bundle', 'symfony/routing'], true)) { - $container->removeDefinition('router.expression_language_provider'); - } - - $container->setParameter('router.resource', $config['resource']); - $router = $container->findDefinition('router.default'); - $argument = $router->getArgument(2); - $argument['strict_requirements'] = $config['strict_requirements']; - if (isset($config['type'])) { - $argument['resource_type'] = $config['type']; - } - $router->replaceArgument(2, $argument); - - $container->setParameter('request_listener.http_port', $config['http_port']); - $container->setParameter('request_listener.https_port', $config['https_port']); - - if (null !== $config['default_uri']) { - $container->getDefinition('router.request_context') - ->replaceArgument(0, $config['default_uri']); - } - - if (\PHP_VERSION_ID < 80000 && !$this->annotationsConfigEnabled) { - return; - } - - $container->register('routing.loader.annotation', AnnotatedRouteControllerLoader::class) - ->setPublic(false) - ->addTag('routing.loader', ['priority' => -10]) - ->setArguments([ - new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE), - '%kernel.environment%', - ]); - - $container->register('routing.loader.annotation.directory', AnnotationDirectoryLoader::class) - ->setPublic(false) - ->addTag('routing.loader', ['priority' => -10]) - ->setArguments([ - new Reference('file_locator'), - new Reference('routing.loader.annotation'), - ]); - - $container->register('routing.loader.annotation.file', AnnotationFileLoader::class) - ->setPublic(false) - ->addTag('routing.loader', ['priority' => -10]) - ->setArguments([ - new Reference('file_locator'), - new Reference('routing.loader.annotation'), - ]); - } - - private function registerSessionConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('session.php'); - - // session storage - if (null === $config['storage_factory_id']) { - trigger_deprecation('symfony/framework-bundle', '5.3', 'Not setting the "framework.session.storage_factory_id" configuration option is deprecated, it will default to "session.storage.factory.native" and will replace the "framework.session.storage_id" configuration option in version 6.0.'); - $container->setAlias('session.storage', $config['storage_id']); - $container->setAlias('session.storage.factory', 'session.storage.factory.service'); - } else { - $container->setAlias('session.storage.factory', $config['storage_factory_id']); - - $container->removeAlias(SessionStorageInterface::class); - $container->removeDefinition('session.storage.metadata_bag'); - $container->removeDefinition('session.storage.native'); - $container->removeDefinition('session.storage.php_bridge'); - $container->removeDefinition('session.storage.mock_file'); - $container->removeAlias('session.storage.filesystem'); - } - - $options = ['cache_limiter' => '0']; - foreach (['name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'cookie_samesite', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor', 'sid_length', 'sid_bits_per_character'] as $key) { - if (isset($config[$key])) { - $options[$key] = $config[$key]; - } - } - - if ('auto' === ($options['cookie_secure'] ?? null)) { - if (null === $config['storage_factory_id']) { - $locator = $container->getDefinition('session_listener')->getArgument(0); - $locator->setValues($locator->getValues() + [ - 'session_storage' => new Reference('session.storage', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), - 'request_stack' => new Reference('request_stack'), - ]); - } else { - $container->getDefinition('session.storage.factory.native')->replaceArgument(3, true); - $container->getDefinition('session.storage.factory.php_bridge')->replaceArgument(2, true); - } - } - - $container->setParameter('session.storage.options', $options); - - // session handler (the internal callback registered with PHP session management) - if (null === $config['handler_id']) { - // Set the handler class to be null - if ($container->hasDefinition('session.storage.native')) { - $container->getDefinition('session.storage.native')->replaceArgument(1, null); - $container->getDefinition('session.storage.php_bridge')->replaceArgument(0, null); - } else { - $container->getDefinition('session.storage.factory.native')->replaceArgument(1, null); - $container->getDefinition('session.storage.factory.php_bridge')->replaceArgument(0, null); - } - - $container->setAlias('session.handler', 'session.handler.native_file'); - } else { - $container->resolveEnvPlaceholders($config['handler_id'], null, $usedEnvs); - - if ($usedEnvs || preg_match('#^[a-z]++://#', $config['handler_id'])) { - $id = '.cache_connection.'.ContainerBuilder::hash($config['handler_id']); - - $container->getDefinition('session.abstract_handler') - ->replaceArgument(0, $container->hasDefinition($id) ? new Reference($id) : $config['handler_id']); - - $container->setAlias('session.handler', 'session.abstract_handler'); - } else { - $container->setAlias('session.handler', $config['handler_id']); - } - } - - $container->setParameter('session.save_path', $config['save_path']); - - $container->setParameter('session.metadata.update_threshold', $config['metadata_update_threshold']); - } - - private function registerRequestConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if ($config['formats']) { - $loader->load('request.php'); - - $listener = $container->getDefinition('request.add_request_formats_listener'); - $listener->replaceArgument(0, $config['formats']); - } - } - - private function registerAssetsConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('assets.php'); - - if ($config['version_strategy']) { - $defaultVersion = new Reference($config['version_strategy']); - } else { - $defaultVersion = $this->createVersion($container, $config['version'], $config['version_format'], $config['json_manifest_path'], '_default', $config['strict_mode']); - } - - $defaultPackage = $this->createPackageDefinition($config['base_path'], $config['base_urls'], $defaultVersion); - $container->setDefinition('assets._default_package', $defaultPackage); - - foreach ($config['packages'] as $name => $package) { - if (null !== $package['version_strategy']) { - $version = new Reference($package['version_strategy']); - } elseif (!\array_key_exists('version', $package) && null === $package['json_manifest_path']) { - // if neither version nor json_manifest_path are specified, use the default - $version = $defaultVersion; - } else { - // let format fallback to main version_format - $format = $package['version_format'] ?: $config['version_format']; - $version = $package['version'] ?? null; - $version = $this->createVersion($container, $version, $format, $package['json_manifest_path'], $name, $package['strict_mode']); - } - - $packageDefinition = $this->createPackageDefinition($package['base_path'], $package['base_urls'], $version) - ->addTag('assets.package', ['package' => $name]); - $container->setDefinition('assets._package_'.$name, $packageDefinition); - $container->registerAliasForArgument('assets._package_'.$name, PackageInterface::class, $name.'.package'); - } - } - - /** - * Returns a definition for an asset package. - */ - private function createPackageDefinition(?string $basePath, array $baseUrls, Reference $version): Definition - { - if ($basePath && $baseUrls) { - throw new \LogicException('An asset package cannot have base URLs and base paths.'); - } - - $package = new ChildDefinition($baseUrls ? 'assets.url_package' : 'assets.path_package'); - $package - ->setPublic(false) - ->replaceArgument(0, $baseUrls ?: $basePath) - ->replaceArgument(1, $version) - ; - - return $package; - } - - private function createVersion(ContainerBuilder $container, ?string $version, ?string $format, ?string $jsonManifestPath, string $name, bool $strictMode): Reference - { - // Configuration prevents $version and $jsonManifestPath from being set - if (null !== $version) { - $def = new ChildDefinition('assets.static_version_strategy'); - $def - ->replaceArgument(0, $version) - ->replaceArgument(1, $format) - ; - $container->setDefinition('assets._version_'.$name, $def); - - return new Reference('assets._version_'.$name); - } - - if (null !== $jsonManifestPath) { - $def = new ChildDefinition('assets.json_manifest_version_strategy'); - $def->replaceArgument(0, $jsonManifestPath); - $def->replaceArgument(2, $strictMode); - $container->setDefinition('assets._version_'.$name, $def); - - return new Reference('assets._version_'.$name); - } - - return new Reference('assets.empty_version_strategy'); - } - - private function registerTranslatorConfiguration(array $config, ContainerBuilder $container, LoaderInterface $loader, string $defaultLocale, array $enabledLocales) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.translation_debug'); - $container->removeDefinition('console.command.translation_extract'); - $container->removeDefinition('console.command.translation_pull'); - $container->removeDefinition('console.command.translation_push'); - - return; - } - - $loader->load('translation.php'); - $loader->load('translation_providers.php'); - - // Use the "real" translator instead of the identity default - $container->setAlias('translator', 'translator.default')->setPublic(true); - $container->setAlias('translator.formatter', new Alias($config['formatter'], false)); - $translator = $container->findDefinition('translator.default'); - $translator->addMethodCall('setFallbackLocales', [$config['fallbacks'] ?: [$defaultLocale]]); - - $defaultOptions = $translator->getArgument(4); - $defaultOptions['cache_dir'] = $config['cache_dir']; - $translator->setArgument(4, $defaultOptions); - - // @deprecated since Symfony 5.4, in 6.0 change to: - // $translator->setArgument(5, $enabledLocales); - $translator->setArgument(5, $config['enabled_locales'] ?: $enabledLocales); - - $container->setParameter('translator.logging', $config['logging']); - $container->setParameter('translator.default_path', $config['default_path']); - - // Discover translation directories - $dirs = []; - $transPaths = []; - $nonExistingDirs = []; - if (ContainerBuilder::willBeAvailable('symfony/validator', Validation::class, ['symfony/framework-bundle', 'symfony/translation'], true)) { - $r = new \ReflectionClass(Validation::class); - - $dirs[] = $transPaths[] = \dirname($r->getFileName()).'/Resources/translations'; - } - if (ContainerBuilder::willBeAvailable('symfony/form', Form::class, ['symfony/framework-bundle', 'symfony/translation'], true)) { - $r = new \ReflectionClass(Form::class); - - $dirs[] = $transPaths[] = \dirname($r->getFileName()).'/Resources/translations'; - } - if (ContainerBuilder::willBeAvailable('symfony/security-core', AuthenticationException::class, ['symfony/framework-bundle', 'symfony/translation'], true)) { - $r = new \ReflectionClass(AuthenticationException::class); - - $dirs[] = $transPaths[] = \dirname($r->getFileName(), 2).'/Resources/translations'; - } - $defaultDir = $container->getParameterBag()->resolveValue($config['default_path']); - foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { - if ($container->fileExists($dir = $bundle['path'].'/Resources/translations') || $container->fileExists($dir = $bundle['path'].'/translations')) { - $dirs[] = $dir; - } else { - $nonExistingDirs[] = $dir; - } - } - - foreach ($config['paths'] as $dir) { - if ($container->fileExists($dir)) { - $dirs[] = $transPaths[] = $dir; - } else { - throw new \UnexpectedValueException(sprintf('"%s" defined in translator.paths does not exist or is not a directory.', $dir)); - } - } - - if ($container->hasDefinition('console.command.translation_debug')) { - $container->getDefinition('console.command.translation_debug')->replaceArgument(5, $transPaths); - } - - if ($container->hasDefinition('console.command.translation_extract')) { - $container->getDefinition('console.command.translation_extract')->replaceArgument(6, $transPaths); - } - - if (null === $defaultDir) { - // allow null - } elseif ($container->fileExists($defaultDir)) { - $dirs[] = $defaultDir; - } else { - $nonExistingDirs[] = $defaultDir; - } - - // Register translation resources - if ($dirs) { - $files = []; - - foreach ($dirs as $dir) { - $finder = Finder::create() - ->followLinks() - ->files() - ->filter(function (\SplFileInfo $file) { - return 2 <= substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename()); - }) - ->in($dir) - ->sortByName() - ; - foreach ($finder as $file) { - $fileNameParts = explode('.', basename($file)); - $locale = $fileNameParts[\count($fileNameParts) - 2]; - if (!isset($files[$locale])) { - $files[$locale] = []; - } - - $files[$locale][] = (string) $file; - } - } - - $projectDir = $container->getParameter('kernel.project_dir'); - - $options = array_merge( - $translator->getArgument(4), - [ - 'resource_files' => $files, - 'scanned_directories' => $scannedDirectories = array_merge($dirs, $nonExistingDirs), - 'cache_vary' => [ - 'scanned_directories' => array_map(static function (string $dir) use ($projectDir): string { - return str_starts_with($dir, $projectDir.'/') ? substr($dir, 1 + \strlen($projectDir)) : $dir; - }, $scannedDirectories), - ], - ] - ); - - $translator->replaceArgument(4, $options); - } - - if ($config['pseudo_localization']['enabled']) { - $options = $config['pseudo_localization']; - unset($options['enabled']); - - $container - ->register('translator.pseudo', PseudoLocalizationTranslator::class) - ->setDecoratedService('translator', null, -1) // Lower priority than "translator.data_collector" - ->setArguments([ - new Reference('translator.pseudo.inner'), - $options, - ]); - } - - $classToServices = [ - CrowdinProviderFactory::class => 'translation.provider_factory.crowdin', - LocoProviderFactory::class => 'translation.provider_factory.loco', - LokaliseProviderFactory::class => 'translation.provider_factory.lokalise', - ]; - - $parentPackages = ['symfony/framework-bundle', 'symfony/translation', 'symfony/http-client']; - - foreach ($classToServices as $class => $service) { - $package = substr($service, \strlen('translation.provider_factory.')); - - if (!$container->hasDefinition('http_client') || !ContainerBuilder::willBeAvailable(sprintf('symfony/%s-translation-provider', $package), $class, $parentPackages, true)) { - $container->removeDefinition($service); - } - } - - if (!$config['providers']) { - return; - } - - // @deprecated since Symfony 5.4, in 6.0 change to: - // $locales = $enabledLocales; - $locales = $config['enabled_locales'] ?: $enabledLocales; - - foreach ($config['providers'] as $provider) { - if ($provider['locales']) { - $locales += $provider['locales']; - } - } - - $locales = array_unique($locales); - - $container->getDefinition('console.command.translation_pull') - ->replaceArgument(4, array_merge($transPaths, [$config['default_path']])) - ->replaceArgument(5, $locales) - ; - - $container->getDefinition('console.command.translation_push') - ->replaceArgument(2, array_merge($transPaths, [$config['default_path']])) - ->replaceArgument(3, $locales) - ; - - $container->getDefinition('translation.provider_collection_factory') - ->replaceArgument(1, $locales) - ; - - $container->getDefinition('translation.provider_collection')->setArgument(0, $config['providers']); - } - - private function registerValidationConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, bool $propertyInfoEnabled) - { - if (!$this->validatorConfigEnabled = $this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.validator_debug'); - - return; - } - - if (!class_exists(Validation::class)) { - throw new LogicException('Validation support cannot be enabled as the Validator component is not installed. Try running "composer require symfony/validator".'); - } - - if (!isset($config['email_validation_mode'])) { - $config['email_validation_mode'] = 'loose'; - } - - $loader->load('validator.php'); - - $validatorBuilder = $container->getDefinition('validator.builder'); - - $container->setParameter('validator.translation_domain', $config['translation_domain']); - - $files = ['xml' => [], 'yml' => []]; - $this->registerValidatorMapping($container, $config, $files); - - if (!empty($files['xml'])) { - $validatorBuilder->addMethodCall('addXmlMappings', [$files['xml']]); - } - - if (!empty($files['yml'])) { - $validatorBuilder->addMethodCall('addYamlMappings', [$files['yml']]); - } - - $definition = $container->findDefinition('validator.email'); - $definition->replaceArgument(0, $config['email_validation_mode']); - - if (\array_key_exists('enable_annotations', $config) && $config['enable_annotations']) { - if (!$this->annotationsConfigEnabled && \PHP_VERSION_ID < 80000) { - throw new \LogicException('"enable_annotations" on the validator cannot be set as the PHP version is lower than 8 and Doctrine Annotations support is disabled. Consider upgrading PHP.'); - } - - $validatorBuilder->addMethodCall('enableAnnotationMapping', [true]); - if ($this->annotationsConfigEnabled) { - $validatorBuilder->addMethodCall('setDoctrineAnnotationReader', [new Reference('annotation_reader')]); - } - } - - if (\array_key_exists('static_method', $config) && $config['static_method']) { - foreach ($config['static_method'] as $methodName) { - $validatorBuilder->addMethodCall('addMethodMapping', [$methodName]); - } - } - - if (!$container->getParameter('kernel.debug')) { - $validatorBuilder->addMethodCall('setMappingCache', [new Reference('validator.mapping.cache.adapter')]); - } - - $container->setParameter('validator.auto_mapping', $config['auto_mapping']); - if (!$propertyInfoEnabled || !class_exists(PropertyInfoLoader::class)) { - $container->removeDefinition('validator.property_info_loader'); - } - - $container - ->getDefinition('validator.not_compromised_password') - ->setArgument(2, $config['not_compromised_password']['enabled']) - ->setArgument(3, $config['not_compromised_password']['endpoint']) - ; - - if (!class_exists(ExpressionLanguage::class)) { - $container->removeDefinition('validator.expression_language'); - } - } - - private function registerValidatorMapping(ContainerBuilder $container, array $config, array &$files) - { - $fileRecorder = function ($extension, $path) use (&$files) { - $files['yaml' === $extension ? 'yml' : $extension][] = $path; - }; - - if (ContainerBuilder::willBeAvailable('symfony/form', Form::class, ['symfony/framework-bundle', 'symfony/validator'], true)) { - $reflClass = new \ReflectionClass(Form::class); - $fileRecorder('xml', \dirname($reflClass->getFileName()).'/Resources/config/validation.xml'); - } - - foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) { - $configDir = is_dir($bundle['path'].'/Resources/config') ? $bundle['path'].'/Resources/config' : $bundle['path'].'/config'; - - if ( - $container->fileExists($file = $configDir.'/validation.yaml', false) || - $container->fileExists($file = $configDir.'/validation.yml', false) - ) { - $fileRecorder('yml', $file); - } - - if ($container->fileExists($file = $configDir.'/validation.xml', false)) { - $fileRecorder('xml', $file); - } - - if ($container->fileExists($dir = $configDir.'/validation', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - } - - $projectDir = $container->getParameter('kernel.project_dir'); - if ($container->fileExists($dir = $projectDir.'/config/validator', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - - $this->registerMappingFilesFromConfig($container, $config, $fileRecorder); - } - - private function registerMappingFilesFromDir(string $dir, callable $fileRecorder) - { - foreach (Finder::create()->followLinks()->files()->in($dir)->name('/\.(xml|ya?ml)$/')->sortByName() as $file) { - $fileRecorder($file->getExtension(), $file->getRealPath()); - } - } - - private function registerMappingFilesFromConfig(ContainerBuilder $container, array $config, callable $fileRecorder) - { - foreach ($config['mapping']['paths'] as $path) { - if (is_dir($path)) { - $this->registerMappingFilesFromDir($path, $fileRecorder); - $container->addResource(new DirectoryResource($path, '/^$/')); - } elseif ($container->fileExists($path, false)) { - if (!preg_match('/\.(xml|ya?ml)$/', $path, $matches)) { - throw new \RuntimeException(sprintf('Unsupported mapping type in "%s", supported types are XML & Yaml.', $path)); - } - $fileRecorder($matches[1], $path); - } else { - throw new \RuntimeException(sprintf('Could not open file or directory "%s".', $path)); - } - } - } - - private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container, LoaderInterface $loader) - { - if (!$this->annotationsConfigEnabled) { - return; - } - - if (!class_exists(\Doctrine\Common\Annotations\Annotation::class)) { - throw new LogicException('Annotations cannot be enabled as the Doctrine Annotation library is not installed. Try running "composer require doctrine/annotations".'); - } - - $loader->load('annotations.php'); - - // registerUniqueLoader exists since doctrine/annotations v1.6 - if (!method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) { - // registerLoader exists only in doctrine/annotations v1 - if (method_exists(AnnotationRegistry::class, 'registerLoader')) { - $container->getDefinition('annotations.dummy_registry') - ->setMethodCalls([['registerLoader', ['class_exists']]]); - } else { - // remove the dummy registry when doctrine/annotations v2 is used - $container->removeDefinition('annotations.dummy_registry'); - } - } - - if ('none' === $config['cache']) { - $container->removeDefinition('annotations.cached_reader'); - - return; - } - - $cacheService = $config['cache']; - if (\in_array($config['cache'], ['php_array', 'file'])) { - if ('php_array' === $config['cache']) { - $cacheService = 'annotations.cache_adapter'; - - // Enable warmer only if PHP array is used for cache - $definition = $container->findDefinition('annotations.cache_warmer'); - $definition->addTag('kernel.cache_warmer'); - } elseif ('file' === $config['cache']) { - $cacheService = 'annotations.filesystem_cache_adapter'; - $cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']); - - if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { - throw new \RuntimeException(sprintf('Could not create cache directory "%s".', $cacheDir)); - } - - $container - ->getDefinition('annotations.filesystem_cache_adapter') - ->replaceArgument(2, $cacheDir) - ; - } - } else { - trigger_deprecation('symfony/framework-bundle', '5.3', 'Using a custom service for "framework.annotation.cache" is deprecated, only values "none", "php_array" and "file" are valid in version 6.0.'); - } - - $container - ->getDefinition('annotations.cached_reader') - ->replaceArgument(2, $config['debug']) - // reference the cache provider without using it until AddAnnotationsCachedReaderPass runs - ->addArgument(new ServiceClosureArgument(new Reference($cacheService))) - ; - - $container->setAlias('annotation_reader', 'annotations.cached_reader'); - $container->setAlias(Reader::class, new Alias('annotations.cached_reader', false)); - $container->removeDefinition('annotations.psr_cached_reader'); - } - - private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->propertyAccessConfigEnabled = $this->isConfigEnabled($container, $config)) { - return; - } - - $loader->load('property_access.php'); - - $magicMethods = PropertyAccessor::DISALLOW_MAGIC_METHODS; - $magicMethods |= $config['magic_call'] ? PropertyAccessor::MAGIC_CALL : 0; - $magicMethods |= $config['magic_get'] ? PropertyAccessor::MAGIC_GET : 0; - $magicMethods |= $config['magic_set'] ? PropertyAccessor::MAGIC_SET : 0; - - $throw = PropertyAccessor::DO_NOT_THROW; - $throw |= $config['throw_exception_on_invalid_index'] ? PropertyAccessor::THROW_ON_INVALID_INDEX : 0; - $throw |= $config['throw_exception_on_invalid_property_path'] ? PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH : 0; - - $container - ->getDefinition('property_accessor') - ->replaceArgument(0, $magicMethods) - ->replaceArgument(1, $throw) - ->replaceArgument(3, new Reference(PropertyReadInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE)) - ->replaceArgument(4, new Reference(PropertyWriteInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE)) - ; - } - - private function registerSecretsConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.secrets_set'); - $container->removeDefinition('console.command.secrets_list'); - $container->removeDefinition('console.command.secrets_remove'); - $container->removeDefinition('console.command.secrets_generate_key'); - $container->removeDefinition('console.command.secrets_decrypt_to_local'); - $container->removeDefinition('console.command.secrets_encrypt_from_local'); - - return; - } - - $loader->load('secrets.php'); - - $container->getDefinition('secrets.vault')->replaceArgument(0, $config['vault_directory']); - - if ($config['local_dotenv_file']) { - $container->getDefinition('secrets.local_vault')->replaceArgument(0, $config['local_dotenv_file']); - } else { - $container->removeDefinition('secrets.local_vault'); - } - - if ($config['decryption_env_var']) { - if (!preg_match('/^(?:[-.\w]*+:)*+\w++$/', $config['decryption_env_var'])) { - throw new InvalidArgumentException(sprintf('Invalid value "%s" set as "decryption_env_var": only "word" characters are allowed.', $config['decryption_env_var'])); - } - - if (ContainerBuilder::willBeAvailable('symfony/string', LazyString::class, ['symfony/framework-bundle'], true)) { - $container->getDefinition('secrets.decryption_key')->replaceArgument(1, $config['decryption_env_var']); - } else { - $container->getDefinition('secrets.vault')->replaceArgument(1, "%env({$config['decryption_env_var']})%"); - $container->removeDefinition('secrets.decryption_key'); - } - } else { - $container->getDefinition('secrets.vault')->replaceArgument(1, null); - $container->removeDefinition('secrets.decryption_key'); - } - } - - private function registerSecurityCsrfConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - return; - } - - if (!class_exists(\Symfony\Component\Security\Csrf\CsrfToken::class)) { - throw new LogicException('CSRF support cannot be enabled as the Security CSRF component is not installed. Try running "composer require symfony/security-csrf".'); - } - - if (!$this->sessionConfigEnabled) { - throw new \LogicException('CSRF protection needs sessions to be enabled.'); - } - - // Enable services for CSRF protection (even without forms) - $loader->load('security_csrf.php'); - - if (!class_exists(CsrfExtension::class)) { - $container->removeDefinition('twig.extension.security_csrf'); - } - } - - private function registerSerializerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('serializer.php'); - if ($container->getParameter('kernel.debug')) { - $container->removeDefinition('serializer.mapping.cache_class_metadata_factory'); - } - - $chainLoader = $container->getDefinition('serializer.mapping.chain_loader'); - - if (!$this->propertyAccessConfigEnabled) { - $container->removeAlias('serializer.property_accessor'); - $container->removeDefinition('serializer.normalizer.object'); - } - - if (!class_exists(Yaml::class)) { - $container->removeDefinition('serializer.encoder.yaml'); - } - - if (!class_exists(UnwrappingDenormalizer::class) || !$this->propertyAccessConfigEnabled) { - $container->removeDefinition('serializer.denormalizer.unwrapping'); - } - - if (!class_exists(Headers::class)) { - $container->removeDefinition('serializer.normalizer.mime_message'); - } - - $serializerLoaders = []; - if (isset($config['enable_annotations']) && $config['enable_annotations']) { - if (\PHP_VERSION_ID < 80000 && !$this->annotationsConfigEnabled) { - throw new \LogicException('"enable_annotations" on the serializer cannot be set as the PHP version is lower than 8 and Annotations support is disabled. Consider upgrading PHP.'); - } - - $annotationLoader = new Definition( - 'Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader', - [new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE)] - ); - $annotationLoader->setPublic(false); - - $serializerLoaders[] = $annotationLoader; - } - - $fileRecorder = function ($extension, $path) use (&$serializerLoaders) { - $definition = new Definition(\in_array($extension, ['yaml', 'yml']) ? 'Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader' : 'Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader', [$path]); - $definition->setPublic(false); - $serializerLoaders[] = $definition; - }; - - foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) { - $configDir = is_dir($bundle['path'].'/Resources/config') ? $bundle['path'].'/Resources/config' : $bundle['path'].'/config'; - - if ($container->fileExists($file = $configDir.'/serialization.xml', false)) { - $fileRecorder('xml', $file); - } - - if ( - $container->fileExists($file = $configDir.'/serialization.yaml', false) || - $container->fileExists($file = $configDir.'/serialization.yml', false) - ) { - $fileRecorder('yml', $file); - } - - if ($container->fileExists($dir = $configDir.'/serialization', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - } - - $projectDir = $container->getParameter('kernel.project_dir'); - if ($container->fileExists($dir = $projectDir.'/config/serializer', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - - $this->registerMappingFilesFromConfig($container, $config, $fileRecorder); - - $chainLoader->replaceArgument(0, $serializerLoaders); - $container->getDefinition('serializer.mapping.cache_warmer')->replaceArgument(0, $serializerLoaders); - - if (isset($config['name_converter']) && $config['name_converter']) { - $container->getDefinition('serializer.name_converter.metadata_aware')->setArgument(1, new Reference($config['name_converter'])); - } - - if (isset($config['circular_reference_handler']) && $config['circular_reference_handler']) { - $arguments = $container->getDefinition('serializer.normalizer.object')->getArguments(); - $context = ($arguments[6] ?? []) + ['circular_reference_handler' => new Reference($config['circular_reference_handler'])]; - $container->getDefinition('serializer.normalizer.object')->setArgument(5, null); - $container->getDefinition('serializer.normalizer.object')->setArgument(6, $context); - } - - if ($config['max_depth_handler'] ?? false) { - $defaultContext = $container->getDefinition('serializer.normalizer.object')->getArgument(6); - $defaultContext += ['max_depth_handler' => new Reference($config['max_depth_handler'])]; - $container->getDefinition('serializer.normalizer.object')->replaceArgument(6, $defaultContext); - } - - if (isset($config['default_context']) && $config['default_context']) { - $container->setParameter('serializer.default_context', $config['default_context']); - } - } - - private function registerPropertyInfoConfiguration(ContainerBuilder $container, PhpFileLoader $loader) - { - if (!interface_exists(PropertyInfoExtractorInterface::class)) { - throw new LogicException('PropertyInfo support cannot be enabled as the PropertyInfo component is not installed. Try running "composer require symfony/property-info".'); - } - - $loader->load('property_info.php'); - - if ( - ContainerBuilder::willBeAvailable('phpstan/phpdoc-parser', PhpDocParser::class, ['symfony/framework-bundle', 'symfony/property-info'], true) - && ContainerBuilder::willBeAvailable('phpdocumentor/type-resolver', ContextFactory::class, ['symfony/framework-bundle', 'symfony/property-info'], true) - ) { - $definition = $container->register('property_info.phpstan_extractor', PhpStanExtractor::class); - $definition->addTag('property_info.type_extractor', ['priority' => -1000]); - } - - if (ContainerBuilder::willBeAvailable('phpdocumentor/reflection-docblock', DocBlockFactoryInterface::class, ['symfony/framework-bundle', 'symfony/property-info'], true)) { - $definition = $container->register('property_info.php_doc_extractor', 'Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor'); - $definition->addTag('property_info.description_extractor', ['priority' => -1000]); - $definition->addTag('property_info.type_extractor', ['priority' => -1001]); - } - - if ($container->getParameter('kernel.debug')) { - $container->removeDefinition('property_info.cache'); - } - } - - private function registerLockConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('lock.php'); - - foreach ($config['resources'] as $resourceName => $resourceStores) { - if (0 === \count($resourceStores)) { - continue; - } - - // Generate stores - $storeDefinitions = []; - foreach ($resourceStores as $resourceStore) { - $storeDsn = $container->resolveEnvPlaceholders($resourceStore, null, $usedEnvs); - $storeDefinition = new Definition(interface_exists(StoreInterface::class) ? StoreInterface::class : PersistingStoreInterface::class); - $storeDefinition->setFactory([StoreFactory::class, 'createStore']); - $storeDefinition->setArguments([$resourceStore]); - - $container->setDefinition($storeDefinitionId = '.lock.'.$resourceName.'.store.'.$container->hash($storeDsn), $storeDefinition); - - $storeDefinition = new Reference($storeDefinitionId); - - $storeDefinitions[] = $storeDefinition; - } - - // Wrap array of stores with CombinedStore - if (\count($storeDefinitions) > 1) { - $combinedDefinition = new ChildDefinition('lock.store.combined.abstract'); - $combinedDefinition->replaceArgument(0, $storeDefinitions); - $container->setDefinition('lock.'.$resourceName.'.store', $combinedDefinition)->setDeprecated('symfony/framework-bundle', '5.2', 'The "%service_id%" service is deprecated, use "lock.'.$resourceName.'.factory" instead.'); - $container->setDefinition($storeDefinitionId = '.lock.'.$resourceName.'.store.'.$container->hash($resourceStores), $combinedDefinition); - } else { - $container->setAlias('lock.'.$resourceName.'.store', (new Alias($storeDefinitionId, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "lock.'.$resourceName.'.factory" instead.')); - } - - // Generate factories for each resource - $factoryDefinition = new ChildDefinition('lock.factory.abstract'); - $factoryDefinition->replaceArgument(0, new Reference($storeDefinitionId)); - $container->setDefinition('lock.'.$resourceName.'.factory', $factoryDefinition); - - // Generate services for lock instances - $lockDefinition = new Definition(Lock::class); - $lockDefinition->setPublic(false); - $lockDefinition->setFactory([new Reference('lock.'.$resourceName.'.factory'), 'createLock']); - $lockDefinition->setArguments([$resourceName]); - $container->setDefinition('lock.'.$resourceName, $lockDefinition)->setDeprecated('symfony/framework-bundle', '5.2', 'The "%service_id%" service is deprecated, use "lock.'.$resourceName.'.factory" instead.'); - - // provide alias for default resource - if ('default' === $resourceName) { - $container->setAlias('lock.store', (new Alias($storeDefinitionId, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "lock.factory" instead.')); - $container->setAlias('lock.factory', new Alias('lock.'.$resourceName.'.factory', false)); - $container->setAlias('lock', (new Alias('lock.'.$resourceName, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "lock.factory" instead.')); - $container->setAlias(PersistingStoreInterface::class, (new Alias($storeDefinitionId, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.'" instead.')); - $container->setAlias(LockFactory::class, new Alias('lock.factory', false)); - $container->setAlias(LockInterface::class, (new Alias('lock.'.$resourceName, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.'" instead.')); - } else { - $container->registerAliasForArgument($storeDefinitionId, PersistingStoreInterface::class, $resourceName.'.lock.store')->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.' '.$resourceName.'LockFactory" instead.'); - $container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName.'.lock.factory'); - $container->registerAliasForArgument('lock.'.$resourceName, LockInterface::class, $resourceName.'.lock')->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.' $'.$resourceName.'LockFactory" instead.'); - } - } - } - - private function registerMessengerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, array $validationConfig) - { - if (!interface_exists(MessageBusInterface::class)) { - throw new LogicException('Messenger support cannot be enabled as the Messenger component is not installed. Try running "composer require symfony/messenger".'); - } - - $loader->load('messenger.php'); - - if (!interface_exists(DenormalizerInterface::class)) { - $container->removeDefinition('serializer.normalizer.flatten_exception'); - } - - if (ContainerBuilder::willBeAvailable('symfony/amqp-messenger', AmqpTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.amqp.factory')->addTag('messenger.transport_factory'); - } - - if (ContainerBuilder::willBeAvailable('symfony/redis-messenger', RedisTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.redis.factory')->addTag('messenger.transport_factory'); - } - - if (ContainerBuilder::willBeAvailable('symfony/amazon-sqs-messenger', AmazonSqsTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.sqs.factory')->addTag('messenger.transport_factory'); - } - - if (ContainerBuilder::willBeAvailable('symfony/beanstalkd-messenger', BeanstalkdTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.beanstalkd.factory')->addTag('messenger.transport_factory'); - } - - if (null === $config['default_bus'] && 1 === \count($config['buses'])) { - $config['default_bus'] = key($config['buses']); - } - - $defaultMiddleware = [ - 'before' => [ - ['id' => 'add_bus_name_stamp_middleware'], - ['id' => 'reject_redelivered_message_middleware'], - ['id' => 'dispatch_after_current_bus'], - ['id' => 'failed_message_processing_middleware'], - ], - 'after' => [ - ['id' => 'send_message'], - ['id' => 'handle_message'], - ], - ]; - foreach ($config['buses'] as $busId => $bus) { - $middleware = $bus['middleware']; - - if ($bus['default_middleware']) { - if ('allow_no_handlers' === $bus['default_middleware']) { - $defaultMiddleware['after'][1]['arguments'] = [true]; - } else { - unset($defaultMiddleware['after'][1]['arguments']); - } - - // argument to add_bus_name_stamp_middleware - $defaultMiddleware['before'][0]['arguments'] = [$busId]; - - $middleware = array_merge($defaultMiddleware['before'], $middleware, $defaultMiddleware['after']); - } - - foreach ($middleware as $middlewareItem) { - if (!$validationConfig['enabled'] && \in_array($middlewareItem['id'], ['validation', 'messenger.middleware.validation'], true)) { - throw new LogicException('The Validation middleware is only available when the Validator component is installed and enabled. Try running "composer require symfony/validator".'); - } - } - - if ($container->getParameter('kernel.debug') && class_exists(Stopwatch::class)) { - array_unshift($middleware, ['id' => 'traceable', 'arguments' => [$busId]]); - } - - $container->setParameter($busId.'.middleware', $middleware); - $container->register($busId, MessageBus::class)->addArgument([])->addTag('messenger.bus'); - - if ($busId === $config['default_bus']) { - $container->setAlias('messenger.default_bus', $busId)->setPublic(true); - $container->setAlias(MessageBusInterface::class, $busId); - } else { - $container->registerAliasForArgument($busId, MessageBusInterface::class); - } - } - - if (empty($config['transports'])) { - $container->removeDefinition('messenger.transport.symfony_serializer'); - $container->removeDefinition('messenger.transport.amqp.factory'); - $container->removeDefinition('messenger.transport.redis.factory'); - $container->removeDefinition('messenger.transport.sqs.factory'); - $container->removeDefinition('messenger.transport.beanstalkd.factory'); - $container->removeAlias(SerializerInterface::class); - } else { - $container->getDefinition('messenger.transport.symfony_serializer') - ->replaceArgument(1, $config['serializer']['symfony_serializer']['format']) - ->replaceArgument(2, $config['serializer']['symfony_serializer']['context']); - $container->setAlias('messenger.default_serializer', $config['serializer']['default_serializer']); - } - - $failureTransports = []; - if ($config['failure_transport']) { - if (!isset($config['transports'][$config['failure_transport']])) { - throw new LogicException(sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $config['failure_transport'])); - } - - $container->setAlias('messenger.failure_transports.default', 'messenger.transport.'.$config['failure_transport']); - $failureTransports[] = $config['failure_transport']; - } - - $failureTransportsByName = []; - foreach ($config['transports'] as $name => $transport) { - if ($transport['failure_transport']) { - $failureTransports[] = $transport['failure_transport']; - $failureTransportsByName[$name] = $transport['failure_transport']; - } elseif ($config['failure_transport']) { - $failureTransportsByName[$name] = $config['failure_transport']; - } - } - - $senderAliases = []; - $transportRetryReferences = []; - foreach ($config['transports'] as $name => $transport) { - $serializerId = $transport['serializer'] ?? 'messenger.default_serializer'; - $transportDefinition = (new Definition(TransportInterface::class)) - ->setFactory([new Reference('messenger.transport_factory'), 'createTransport']) - ->setArguments([$transport['dsn'], $transport['options'] + ['transport_name' => $name], new Reference($serializerId)]) - ->addTag('messenger.receiver', [ - 'alias' => $name, - 'is_failure_transport' => \in_array($name, $failureTransports), - ] - ) - ; - $container->setDefinition($transportId = 'messenger.transport.'.$name, $transportDefinition); - $senderAliases[$name] = $transportId; - - if (null !== $transport['retry_strategy']['service']) { - $transportRetryReferences[$name] = new Reference($transport['retry_strategy']['service']); - } else { - $retryServiceId = sprintf('messenger.retry.multiplier_retry_strategy.%s', $name); - $retryDefinition = new ChildDefinition('messenger.retry.abstract_multiplier_retry_strategy'); - $retryDefinition - ->replaceArgument(0, $transport['retry_strategy']['max_retries']) - ->replaceArgument(1, $transport['retry_strategy']['delay']) - ->replaceArgument(2, $transport['retry_strategy']['multiplier']) - ->replaceArgument(3, $transport['retry_strategy']['max_delay']); - $container->setDefinition($retryServiceId, $retryDefinition); - - $transportRetryReferences[$name] = new Reference($retryServiceId); - } - } - - $senderReferences = []; - // alias => service_id - foreach ($senderAliases as $alias => $serviceId) { - $senderReferences[$alias] = new Reference($serviceId); - } - // service_id => service_id - foreach ($senderAliases as $serviceId) { - $senderReferences[$serviceId] = new Reference($serviceId); - } - - foreach ($config['transports'] as $name => $transport) { - if ($transport['failure_transport']) { - if (!isset($senderReferences[$transport['failure_transport']])) { - throw new LogicException(sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $transport['failure_transport'])); - } - } - } - - $failureTransportReferencesByTransportName = array_map(function ($failureTransportName) use ($senderReferences) { - return $senderReferences[$failureTransportName]; - }, $failureTransportsByName); - - $messageToSendersMapping = []; - foreach ($config['routing'] as $message => $messageConfiguration) { - if ('*' !== $message && !class_exists($message) && !interface_exists($message, false)) { - throw new LogicException(sprintf('Invalid Messenger routing configuration: class or interface "%s" not found.', $message)); - } - - // make sure senderAliases contains all senders - foreach ($messageConfiguration['senders'] as $sender) { - if (!isset($senderReferences[$sender])) { - throw new LogicException(sprintf('Invalid Messenger routing configuration: the "%s" class is being routed to a sender called "%s". This is not a valid transport or service id.', $message, $sender)); - } - } - - $messageToSendersMapping[$message] = $messageConfiguration['senders']; - } - - $sendersServiceLocator = ServiceLocatorTagPass::register($container, $senderReferences); - - $container->getDefinition('messenger.senders_locator') - ->replaceArgument(0, $messageToSendersMapping) - ->replaceArgument(1, $sendersServiceLocator) - ; - - $container->getDefinition('messenger.retry.send_failed_message_for_retry_listener') - ->replaceArgument(0, $sendersServiceLocator) - ; - - $container->getDefinition('messenger.retry_strategy_locator') - ->replaceArgument(0, $transportRetryReferences); - - if (\count($failureTransports) > 0) { - $container->getDefinition('console.command.messenger_failed_messages_retry') - ->replaceArgument(0, $config['failure_transport']); - $container->getDefinition('console.command.messenger_failed_messages_show') - ->replaceArgument(0, $config['failure_transport']); - $container->getDefinition('console.command.messenger_failed_messages_remove') - ->replaceArgument(0, $config['failure_transport']); - - $failureTransportsByTransportNameServiceLocator = ServiceLocatorTagPass::register($container, $failureTransportReferencesByTransportName); - $container->getDefinition('messenger.failure.send_failed_message_to_failure_transport_listener') - ->replaceArgument(0, $failureTransportsByTransportNameServiceLocator); - } else { - $container->removeDefinition('messenger.failure.send_failed_message_to_failure_transport_listener'); - $container->removeDefinition('console.command.messenger_failed_messages_retry'); - $container->removeDefinition('console.command.messenger_failed_messages_show'); - $container->removeDefinition('console.command.messenger_failed_messages_remove'); - } - - if (false === $config['reset_on_message']) { - throw new LogicException('The "framework.messenger.reset_on_message" configuration option can be set to "true" only. To prevent services resetting after each message you can set the "--no-reset" option in "messenger:consume" command.'); - } - - if (!$container->hasDefinition('console.command.messenger_consume_messages')) { - $container->removeDefinition('messenger.listener.reset_services'); - } elseif (null === $config['reset_on_message']) { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Not setting the "framework.messenger.reset_on_message" configuration option is deprecated, it will default to "true" in version 6.0.'); - - $container->getDefinition('console.command.messenger_consume_messages')->replaceArgument(5, null); - $container->removeDefinition('messenger.listener.reset_services'); - } - } - - private function registerCacheConfiguration(array $config, ContainerBuilder $container) - { - if (!class_exists(DefaultMarshaller::class)) { - $container->removeDefinition('cache.default_marshaller'); - } - - if (!class_exists(DoctrineAdapter::class)) { - $container->removeDefinition('cache.adapter.doctrine'); - } - - if (!class_exists(DoctrineDbalAdapter::class)) { - $container->removeDefinition('cache.adapter.doctrine_dbal'); - } - - $version = new Parameter('container.build_id'); - $container->getDefinition('cache.adapter.apcu')->replaceArgument(2, $version); - $container->getDefinition('cache.adapter.system')->replaceArgument(2, $version); - $container->getDefinition('cache.adapter.filesystem')->replaceArgument(2, $config['directory']); - - if (isset($config['prefix_seed'])) { - $container->setParameter('cache.prefix.seed', $config['prefix_seed']); - } - if ($container->hasParameter('cache.prefix.seed')) { - // Inline any env vars referenced in the parameter - $container->setParameter('cache.prefix.seed', $container->resolveEnvPlaceholders($container->getParameter('cache.prefix.seed'), true)); - } - foreach (['doctrine', 'psr6', 'redis', 'memcached', 'doctrine_dbal', 'pdo'] as $name) { - if (isset($config[$name = 'default_'.$name.'_provider'])) { - $container->setAlias('cache.'.$name, new Alias(CachePoolPass::getServiceProvider($container, $config[$name]), false)); - } - } - foreach (['app', 'system'] as $name) { - $config['pools']['cache.'.$name] = [ - 'adapters' => [$config[$name]], - 'public' => true, - 'tags' => false, - ]; - } - foreach ($config['pools'] as $name => $pool) { - $pool['adapters'] = $pool['adapters'] ?: ['cache.app']; - - $isRedisTagAware = ['cache.adapter.redis_tag_aware'] === $pool['adapters']; - foreach ($pool['adapters'] as $provider => $adapter) { - if (($config['pools'][$adapter]['adapters'] ?? null) === ['cache.adapter.redis_tag_aware']) { - $isRedisTagAware = true; - } elseif ($config['pools'][$adapter]['tags'] ?? false) { - $pool['adapters'][$provider] = $adapter = '.'.$adapter.'.inner'; - } - } - - if (1 === \count($pool['adapters'])) { - if (!isset($pool['provider']) && !\is_int($provider)) { - $pool['provider'] = $provider; - } - $definition = new ChildDefinition($adapter); - } else { - $definition = new Definition(ChainAdapter::class, [$pool['adapters'], 0]); - $pool['reset'] = 'reset'; - } - - if ($isRedisTagAware && 'cache.app' === $name) { - $container->setAlias('cache.app.taggable', $name); - } elseif ($isRedisTagAware) { - $tagAwareId = $name; - $container->setAlias('.'.$name.'.inner', $name); - } elseif ($pool['tags']) { - if (true !== $pool['tags'] && ($config['pools'][$pool['tags']]['tags'] ?? false)) { - $pool['tags'] = '.'.$pool['tags'].'.inner'; - } - $container->register($name, TagAwareAdapter::class) - ->addArgument(new Reference('.'.$name.'.inner')) - ->addArgument(true !== $pool['tags'] ? new Reference($pool['tags']) : null) - ->setPublic($pool['public']) - ; - - if (method_exists(TagAwareAdapter::class, 'setLogger')) { - $container - ->getDefinition($name) - ->addMethodCall('setLogger', [new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]) - ->addTag('monolog.logger', ['channel' => 'cache']); - } - - $pool['name'] = $tagAwareId = $name; - $pool['public'] = false; - $name = '.'.$name.'.inner'; - } elseif (!\in_array($name, ['cache.app', 'cache.system'], true)) { - $tagAwareId = '.'.$name.'.taggable'; - $container->register($tagAwareId, TagAwareAdapter::class) - ->addArgument(new Reference($name)) - ; - } - - if (!\in_array($name, ['cache.app', 'cache.system'], true)) { - $container->registerAliasForArgument($tagAwareId, TagAwareCacheInterface::class, $pool['name'] ?? $name); - $container->registerAliasForArgument($name, CacheInterface::class, $pool['name'] ?? $name); - $container->registerAliasForArgument($name, CacheItemPoolInterface::class, $pool['name'] ?? $name); - } - - $definition->setPublic($pool['public']); - unset($pool['adapters'], $pool['public'], $pool['tags']); - - $definition->addTag('cache.pool', $pool); - $container->setDefinition($name, $definition); - } - - if (method_exists(PropertyAccessor::class, 'createCache')) { - $propertyAccessDefinition = $container->register('cache.property_access', AdapterInterface::class); - $propertyAccessDefinition->setPublic(false); - - if (!$container->getParameter('kernel.debug')) { - $propertyAccessDefinition->setFactory([PropertyAccessor::class, 'createCache']); - $propertyAccessDefinition->setArguments(['', 0, $version, new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]); - $propertyAccessDefinition->addTag('cache.pool', ['clearer' => 'cache.system_clearer']); - $propertyAccessDefinition->addTag('monolog.logger', ['channel' => 'cache']); - } else { - $propertyAccessDefinition->setClass(ArrayAdapter::class); - $propertyAccessDefinition->setArguments([0, false]); - } - } - } - - private function registerHttpClientConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, array $profilerConfig) - { - $loader->load('http_client.php'); - - $options = $config['default_options'] ?? []; - $retryOptions = $options['retry_failed'] ?? ['enabled' => false]; - unset($options['retry_failed']); - $container->getDefinition('http_client')->setArguments([$options, $config['max_host_connections'] ?? 6]); - - if (!$hasPsr18 = ContainerBuilder::willBeAvailable('psr/http-client', ClientInterface::class, ['symfony/framework-bundle', 'symfony/http-client'], true)) { - $container->removeDefinition('psr18.http_client'); - $container->removeAlias(ClientInterface::class); - } - - if (!ContainerBuilder::willBeAvailable('php-http/httplug', HttpClient::class, ['symfony/framework-bundle', 'symfony/http-client'], true)) { - $container->removeDefinition(HttpClient::class); - } - - if ($this->isConfigEnabled($container, $retryOptions)) { - $this->registerRetryableHttpClient($retryOptions, 'http_client', $container); - } - - $httpClientId = ($retryOptions['enabled'] ?? false) ? 'http_client.retryable.inner' : ($this->isConfigEnabled($container, $profilerConfig) ? '.debug.http_client.inner' : 'http_client'); - foreach ($config['scoped_clients'] as $name => $scopeConfig) { - if ('http_client' === $name) { - throw new InvalidArgumentException(sprintf('Invalid scope name: "%s" is reserved.', $name)); - } - - $scope = $scopeConfig['scope'] ?? null; - unset($scopeConfig['scope']); - $retryOptions = $scopeConfig['retry_failed'] ?? ['enabled' => false]; - unset($scopeConfig['retry_failed']); - - if (null === $scope) { - $baseUri = $scopeConfig['base_uri']; - unset($scopeConfig['base_uri']); - - $container->register($name, ScopingHttpClient::class) - ->setFactory([ScopingHttpClient::class, 'forBaseUri']) - ->setArguments([new Reference($httpClientId), $baseUri, $scopeConfig]) - ->addTag('http_client.client') - ; - } else { - $container->register($name, ScopingHttpClient::class) - ->setArguments([new Reference($httpClientId), [$scope => $scopeConfig], $scope]) - ->addTag('http_client.client') - ; - } - - if ($this->isConfigEnabled($container, $retryOptions)) { - $this->registerRetryableHttpClient($retryOptions, $name, $container); - } - - $container->registerAliasForArgument($name, HttpClientInterface::class); - - if ($hasPsr18) { - $container->setDefinition('psr18.'.$name, new ChildDefinition('psr18.http_client')) - ->replaceArgument(0, new Reference($name)); - - $container->registerAliasForArgument('psr18.'.$name, ClientInterface::class, $name); - } - } - - if ($responseFactoryId = $config['mock_response_factory'] ?? null) { - $container->register($httpClientId.'.mock_client', MockHttpClient::class) - ->setDecoratedService($httpClientId, null, -10) // lower priority than TraceableHttpClient - ->setArguments([new Reference($responseFactoryId)]); - } - } - - private function registerRetryableHttpClient(array $options, string $name, ContainerBuilder $container) - { - if (!class_exists(RetryableHttpClient::class)) { - throw new LogicException('Support for retrying failed requests requires symfony/http-client 5.2 or higher, try upgrading.'); - } - - if (null !== $options['retry_strategy']) { - $retryStrategy = new Reference($options['retry_strategy']); - } else { - $retryStrategy = new ChildDefinition('http_client.abstract_retry_strategy'); - $codes = []; - foreach ($options['http_codes'] as $code => $codeOptions) { - if ($codeOptions['methods']) { - $codes[$code] = $codeOptions['methods']; - } else { - $codes[] = $code; - } - } - - $retryStrategy - ->replaceArgument(0, $codes ?: GenericRetryStrategy::DEFAULT_RETRY_STATUS_CODES) - ->replaceArgument(1, $options['delay']) - ->replaceArgument(2, $options['multiplier']) - ->replaceArgument(3, $options['max_delay']) - ->replaceArgument(4, $options['jitter']); - $container->setDefinition($name.'.retry_strategy', $retryStrategy); - - $retryStrategy = new Reference($name.'.retry_strategy'); - } - - $container - ->register($name.'.retryable', RetryableHttpClient::class) - ->setDecoratedService($name, null, 10) // higher priority than TraceableHttpClient - ->setArguments([new Reference($name.'.retryable.inner'), $retryStrategy, $options['max_retries'], new Reference('logger')]) - ->addTag('monolog.logger', ['channel' => 'http_client']); - } - - private function registerMailerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!class_exists(Mailer::class)) { - throw new LogicException('Mailer support cannot be enabled as the component is not installed. Try running "composer require symfony/mailer".'); - } - - $loader->load('mailer.php'); - $loader->load('mailer_transports.php'); - if (!\count($config['transports']) && null === $config['dsn']) { - $config['dsn'] = 'smtp://null'; - } - $transports = $config['dsn'] ? ['main' => $config['dsn']] : $config['transports']; - $container->getDefinition('mailer.transports')->setArgument(0, $transports); - $container->getDefinition('mailer.default_transport')->setArgument(0, current($transports)); - - $container->removeDefinition('mailer.logger_message_listener'); - $container->setAlias('mailer.logger_message_listener', (new Alias('mailer.message_logger_listener'))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "mailer.message_logger_listener" instead.')); - - $mailer = $container->getDefinition('mailer.mailer'); - if (false === $messageBus = $config['message_bus']) { - $mailer->replaceArgument(1, null); - } else { - $mailer->replaceArgument(1, $messageBus ? new Reference($messageBus) : new Reference('messenger.default_bus', ContainerInterface::NULL_ON_INVALID_REFERENCE)); - } - - $classToServices = [ - GmailTransportFactory::class => 'mailer.transport_factory.gmail', - MailgunTransportFactory::class => 'mailer.transport_factory.mailgun', - MailjetTransportFactory::class => 'mailer.transport_factory.mailjet', - MandrillTransportFactory::class => 'mailer.transport_factory.mailchimp', - OhMySmtpTransportFactory::class => 'mailer.transport_factory.ohmysmtp', - PostmarkTransportFactory::class => 'mailer.transport_factory.postmark', - SendgridTransportFactory::class => 'mailer.transport_factory.sendgrid', - SendinblueTransportFactory::class => 'mailer.transport_factory.sendinblue', - SesTransportFactory::class => 'mailer.transport_factory.amazon', - ]; - - foreach ($classToServices as $class => $service) { - $package = substr($service, \strlen('mailer.transport_factory.')); - - if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-mailer', 'gmail' === $package ? 'google' : $package), $class, ['symfony/framework-bundle', 'symfony/mailer'], true)) { - $container->removeDefinition($service); - } - } - - $envelopeListener = $container->getDefinition('mailer.envelope_listener'); - $envelopeListener->setArgument(0, $config['envelope']['sender'] ?? null); - $envelopeListener->setArgument(1, $config['envelope']['recipients'] ?? null); - - if ($config['headers']) { - $headers = new Definition(Headers::class); - foreach ($config['headers'] as $name => $data) { - $value = $data['value']; - if (\in_array(strtolower($name), ['from', 'to', 'cc', 'bcc', 'reply-to'])) { - $value = (array) $value; - } - $headers->addMethodCall('addHeader', [$name, $value]); - } - $messageListener = $container->getDefinition('mailer.message_listener'); - $messageListener->setArgument(0, $headers); - } else { - $container->removeDefinition('mailer.message_listener'); - } - } - - private function registerNotifierConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!class_exists(Notifier::class)) { - throw new LogicException('Notifier support cannot be enabled as the component is not installed. Try running "composer require symfony/notifier".'); - } - - $loader->load('notifier.php'); - $loader->load('notifier_transports.php'); - - if ($config['chatter_transports']) { - $container->getDefinition('chatter.transports')->setArgument(0, $config['chatter_transports']); - } else { - $container->removeDefinition('chatter'); - $container->removeAlias(ChatterInterface::class); - } - if ($config['texter_transports']) { - $container->getDefinition('texter.transports')->setArgument(0, $config['texter_transports']); - } else { - $container->removeDefinition('texter'); - $container->removeAlias(TexterInterface::class); - } - - if ($this->mailerConfigEnabled) { - $sender = $container->getDefinition('mailer.envelope_listener')->getArgument(0); - $container->getDefinition('notifier.channel.email')->setArgument(2, $sender); - } else { - $container->removeDefinition('notifier.channel.email'); - } - - if ($this->messengerConfigEnabled) { - if ($config['notification_on_failed_messages']) { - $container->getDefinition('notifier.failed_message_listener')->addTag('kernel.event_subscriber'); - } - - // as we have a bus, the channels don't need the transports - $container->getDefinition('notifier.channel.chat')->setArgument(0, null); - if ($container->hasDefinition('notifier.channel.email')) { - $container->getDefinition('notifier.channel.email')->setArgument(0, null); - } - $container->getDefinition('notifier.channel.sms')->setArgument(0, null); - $container->getDefinition('notifier.channel.push')->setArgument(0, null); - } - - $container->getDefinition('notifier.channel_policy')->setArgument(0, $config['channel_policy']); - - $container->registerForAutoconfiguration(NotifierTransportFactoryInterface::class) - ->addTag('chatter.transport_factory'); - - $container->registerForAutoconfiguration(NotifierTransportFactoryInterface::class) - ->addTag('texter.transport_factory'); - - $classToServices = [ - AllMySmsTransportFactory::class => 'notifier.transport_factory.all-my-sms', - AmazonSnsTransportFactory::class => 'notifier.transport_factory.amazon-sns', - ClickatellTransportFactory::class => 'notifier.transport_factory.clickatell', - DiscordTransportFactory::class => 'notifier.transport_factory.discord', - EsendexTransportFactory::class => 'notifier.transport_factory.esendex', - ExpoTransportFactory::class => 'notifier.transport_factory.expo', - FakeChatTransportFactory::class => 'notifier.transport_factory.fake-chat', - FakeSmsTransportFactory::class => 'notifier.transport_factory.fake-sms', - FirebaseTransportFactory::class => 'notifier.transport_factory.firebase', - FreeMobileTransportFactory::class => 'notifier.transport_factory.free-mobile', - GatewayApiTransportFactory::class => 'notifier.transport_factory.gateway-api', - GitterTransportFactory::class => 'notifier.transport_factory.gitter', - GoogleChatTransportFactory::class => 'notifier.transport_factory.google-chat', - InfobipTransportFactory::class => 'notifier.transport_factory.infobip', - IqsmsTransportFactory::class => 'notifier.transport_factory.iqsms', - LightSmsTransportFactory::class => 'notifier.transport_factory.light-sms', - LinkedInTransportFactory::class => 'notifier.transport_factory.linked-in', - MailjetNotifierTransportFactory::class => 'notifier.transport_factory.mailjet', - MattermostTransportFactory::class => 'notifier.transport_factory.mattermost', - MercureTransportFactory::class => 'notifier.transport_factory.mercure', - MessageBirdTransport::class => 'notifier.transport_factory.message-bird', - MessageMediaTransportFactory::class => 'notifier.transport_factory.message-media', - MicrosoftTeamsTransportFactory::class => 'notifier.transport_factory.microsoft-teams', - MobytTransportFactory::class => 'notifier.transport_factory.mobyt', - NexmoTransportFactory::class => 'notifier.transport_factory.nexmo', - OctopushTransportFactory::class => 'notifier.transport_factory.octopush', - OneSignalTransportFactory::class => 'notifier.transport_factory.one-signal', - OvhCloudTransportFactory::class => 'notifier.transport_factory.ovh-cloud', - RocketChatTransportFactory::class => 'notifier.transport_factory.rocket-chat', - SendinblueNotifierTransportFactory::class => 'notifier.transport_factory.sendinblue', - SinchTransportFactory::class => 'notifier.transport_factory.sinch', - SlackTransportFactory::class => 'notifier.transport_factory.slack', - Sms77TransportFactory::class => 'notifier.transport_factory.sms77', - SmsapiTransportFactory::class => 'notifier.transport_factory.smsapi', - SmsBiurasTransportFactory::class => 'notifier.transport_factory.sms-biuras', - SmscTransportFactory::class => 'notifier.transport_factory.smsc', - SpotHitTransportFactory::class => 'notifier.transport_factory.spot-hit', - TelegramTransportFactory::class => 'notifier.transport_factory.telegram', - TelnyxTransportFactory::class => 'notifier.transport_factory.telnyx', - TurboSmsTransport::class => 'notifier.transport_factory.turbo-sms', - TwilioTransportFactory::class => 'notifier.transport_factory.twilio', - VonageTransportFactory::class => 'notifier.transport_factory.vonage', - YunpianTransportFactory::class => 'notifier.transport_factory.yunpian', - ZulipTransportFactory::class => 'notifier.transport_factory.zulip', - ]; - - $parentPackages = ['symfony/framework-bundle', 'symfony/notifier']; - - foreach ($classToServices as $class => $service) { - $package = substr($service, \strlen('notifier.transport_factory.')); - - if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-notifier', $package), $class, $parentPackages, true)) { - $container->removeDefinition($service); - $container->removeAlias(str_replace('-', '', $service)); // @deprecated to be removed in 6.0 - } - } - - if (ContainerBuilder::willBeAvailable('symfony/mercure-notifier', MercureTransportFactory::class, $parentPackages, true) && ContainerBuilder::willBeAvailable('symfony/mercure-bundle', MercureBundle::class, $parentPackages, true) && \in_array(MercureBundle::class, $container->getParameter('kernel.bundles'), true)) { - $container->getDefinition($classToServices[MercureTransportFactory::class]) - ->replaceArgument('$registry', new Reference(HubRegistry::class)); - } elseif (ContainerBuilder::willBeAvailable('symfony/mercure-notifier', MercureTransportFactory::class, $parentPackages, true)) { - $container->removeDefinition($classToServices[MercureTransportFactory::class]); - } - - if (ContainerBuilder::willBeAvailable('symfony/fake-chat-notifier', FakeChatTransportFactory::class, ['symfony/framework-bundle', 'symfony/notifier', 'symfony/mailer'], true)) { - $container->getDefinition($classToServices[FakeChatTransportFactory::class]) - ->replaceArgument('$mailer', new Reference('mailer')) - ->replaceArgument('$logger', new Reference('logger')); - } - - if (ContainerBuilder::willBeAvailable('symfony/fake-sms-notifier', FakeSmsTransportFactory::class, ['symfony/framework-bundle', 'symfony/notifier', 'symfony/mailer'], true)) { - $container->getDefinition($classToServices[FakeSmsTransportFactory::class]) - ->replaceArgument('$mailer', new Reference('mailer')) - ->replaceArgument('$logger', new Reference('logger')); - } - - if (isset($config['admin_recipients'])) { - $notifier = $container->getDefinition('notifier'); - foreach ($config['admin_recipients'] as $i => $recipient) { - $id = 'notifier.admin_recipient.'.$i; - $container->setDefinition($id, new Definition(Recipient::class, [$recipient['email'], $recipient['phone']])); - $notifier->addMethodCall('addAdminRecipient', [new Reference($id)]); - } - } - } - - private function registerRateLimiterConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('rate_limiter.php'); - - foreach ($config['limiters'] as $name => $limiterConfig) { - self::registerRateLimiter($container, $name, $limiterConfig); - } - } - - public static function registerRateLimiter(ContainerBuilder $container, string $name, array $limiterConfig) - { - // default configuration (when used by other DI extensions) - $limiterConfig += ['lock_factory' => 'lock.factory', 'cache_pool' => 'cache.rate_limiter']; - - $limiter = $container->setDefinition($limiterId = 'limiter.'.$name, new ChildDefinition('limiter')); - - if (null !== $limiterConfig['lock_factory']) { - if (!self::$lockConfigEnabled) { - throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be installed and configured.', $name)); - } - - $limiter->replaceArgument(2, new Reference($limiterConfig['lock_factory'])); - } - unset($limiterConfig['lock_factory']); - - $storageId = $limiterConfig['storage_service'] ?? null; - if (null === $storageId) { - $container->register($storageId = 'limiter.storage.'.$name, CacheStorage::class)->addArgument(new Reference($limiterConfig['cache_pool'])); - } - - $limiter->replaceArgument(1, new Reference($storageId)); - unset($limiterConfig['storage_service']); - unset($limiterConfig['cache_pool']); - - $limiterConfig['id'] = $name; - $limiter->replaceArgument(0, $limiterConfig); - - $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter'); - } - - private function registerUidConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('uid.php'); - - $container->getDefinition('uuid.factory') - ->setArguments([ - $config['default_uuid_version'], - $config['time_based_uuid_version'], - $config['name_based_uuid_version'], - UuidV4::class, - $config['time_based_uuid_node'] ?? null, - $config['name_based_uuid_namespace'] ?? null, - ]) - ; - - if (isset($config['name_based_uuid_namespace'])) { - $container->getDefinition('name_based_uuid.factory') - ->setArguments([$config['name_based_uuid_namespace']]); - } - } - - private function resolveTrustedHeaders(array $headers): int - { - $trustedHeaders = 0; - - foreach ($headers as $h) { - switch ($h) { - case 'forwarded': $trustedHeaders |= Request::HEADER_FORWARDED; break; - case 'x-forwarded-for': $trustedHeaders |= Request::HEADER_X_FORWARDED_FOR; break; - case 'x-forwarded-host': $trustedHeaders |= Request::HEADER_X_FORWARDED_HOST; break; - case 'x-forwarded-proto': $trustedHeaders |= Request::HEADER_X_FORWARDED_PROTO; break; - case 'x-forwarded-port': $trustedHeaders |= Request::HEADER_X_FORWARDED_PORT; break; - case 'x-forwarded-prefix': $trustedHeaders |= Request::HEADER_X_FORWARDED_PREFIX; break; - } - } - - return $trustedHeaders; - } - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return \dirname(__DIR__).'/Resources/config/schema'; - } - - public function getNamespace() - { - return 'http://symfony.com/schema/dic/symfony'; - } -} diff --git a/lib/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php b/lib/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php deleted file mode 100644 index 53cae12eb..000000000 --- a/lib/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\EventListener; - -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * Suggests a package, that should be installed (via composer), - * if the package is missing, and the input command namespace can be mapped to a Symfony bundle. - * - * @author Przemysław Bogusz - * - * @internal - */ -final class SuggestMissingPackageSubscriber implements EventSubscriberInterface -{ - private const PACKAGES = [ - 'doctrine' => [ - 'fixtures' => ['DoctrineFixturesBundle', 'doctrine/doctrine-fixtures-bundle --dev'], - 'mongodb' => ['DoctrineMongoDBBundle', 'doctrine/mongodb-odm-bundle'], - '_default' => ['Doctrine ORM', 'symfony/orm-pack'], - ], - 'generate' => [ - '_default' => ['SensioGeneratorBundle', 'sensio/generator-bundle'], - ], - 'make' => [ - '_default' => ['MakerBundle', 'symfony/maker-bundle --dev'], - ], - 'server' => [ - '_default' => ['Debug Bundle', 'symfony/debug-bundle --dev'], - ], - ]; - - public function onConsoleError(ConsoleErrorEvent $event): void - { - if (!$event->getError() instanceof CommandNotFoundException) { - return; - } - - [$namespace, $command] = explode(':', $event->getInput()->getFirstArgument()) + [1 => '']; - - if (!isset(self::PACKAGES[$namespace])) { - return; - } - - if (isset(self::PACKAGES[$namespace][$command])) { - $suggestion = self::PACKAGES[$namespace][$command]; - $exact = true; - } else { - $suggestion = self::PACKAGES[$namespace]['_default']; - $exact = false; - } - - $error = $event->getError(); - - if ($error->getAlternatives() && !$exact) { - return; - } - - $message = sprintf("%s\n\nYou may be looking for a command provided by the \"%s\" which is currently not installed. Try running \"composer require %s\".", $error->getMessage(), $suggestion[0], $suggestion[1]); - $event->setError(new CommandNotFoundException($message)); - } - - public static function getSubscribedEvents(): array - { - return [ - ConsoleEvents::ERROR => ['onConsoleError', 0], - ]; - } -} diff --git a/lib/symfony/framework-bundle/FrameworkBundle.php b/lib/symfony/framework-bundle/FrameworkBundle.php deleted file mode 100644 index 4ec54eccf..000000000 --- a/lib/symfony/framework-bundle/FrameworkBundle.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle; - -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AssetsContextPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RemoveUnusedSessionMarshallingHandlerPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SessionPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerRealRefPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerWeakRefPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass; -use Symfony\Component\Cache\Adapter\ApcuAdapter; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\Cache\Adapter\PhpFilesAdapter; -use Symfony\Component\Cache\DependencyInjection\CacheCollectorPass; -use Symfony\Component\Cache\DependencyInjection\CachePoolClearerPass; -use Symfony\Component\Cache\DependencyInjection\CachePoolPass; -use Symfony\Component\Cache\DependencyInjection\CachePoolPrunerPass; -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\Compiler\RegisterReverseContainerPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\Dotenv\Dotenv; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass; -use Symfony\Component\Form\DependencyInjection\FormPass; -use Symfony\Component\HttpClient\DependencyInjection\HttpClientPass; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Bundle\Bundle; -use Symfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass; -use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass; -use Symfony\Component\HttpKernel\DependencyInjection\LoggerPass; -use Symfony\Component\HttpKernel\DependencyInjection\RegisterControllerArgumentLocatorsPass; -use Symfony\Component\HttpKernel\DependencyInjection\RegisterLocaleAwareServicesPass; -use Symfony\Component\HttpKernel\DependencyInjection\RemoveEmptyControllerArgumentLocatorsPass; -use Symfony\Component\HttpKernel\DependencyInjection\ResettableServicePass; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Messenger\DependencyInjection\MessengerPass; -use Symfony\Component\Mime\DependencyInjection\AddMimeTypeGuesserPass; -use Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass; -use Symfony\Component\Routing\DependencyInjection\RoutingResolverPass; -use Symfony\Component\Serializer\DependencyInjection\SerializerPass; -use Symfony\Component\Translation\DependencyInjection\TranslationDumperPass; -use Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass; -use Symfony\Component\Translation\DependencyInjection\TranslatorPass; -use Symfony\Component\Translation\DependencyInjection\TranslatorPathsPass; -use Symfony\Component\Validator\DependencyInjection\AddAutoMappingConfigurationPass; -use Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass; -use Symfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; - -// Help opcache.preload discover always-needed symbols -class_exists(ApcuAdapter::class); -class_exists(ArrayAdapter::class); -class_exists(ChainAdapter::class); -class_exists(PhpArrayAdapter::class); -class_exists(PhpFilesAdapter::class); -class_exists(Dotenv::class); -class_exists(ErrorHandler::class); -class_exists(Hydrator::class); -class_exists(Registry::class); - -/** - * Bundle. - * - * @author Fabien Potencier - */ -class FrameworkBundle extends Bundle -{ - public function boot() - { - ErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true); - - if ($this->container->getParameter('kernel.http_method_override')) { - Request::enableHttpMethodParameterOverride(); - } - } - - public function build(ContainerBuilder $container) - { - parent::build($container); - - $registerListenersPass = new RegisterListenersPass(); - $registerListenersPass->setHotPathEvents([ - KernelEvents::REQUEST, - KernelEvents::CONTROLLER, - KernelEvents::CONTROLLER_ARGUMENTS, - KernelEvents::RESPONSE, - KernelEvents::FINISH_REQUEST, - ]); - if (class_exists(ConsoleEvents::class)) { - $registerListenersPass->setNoPreloadEvents([ - ConsoleEvents::COMMAND, - ConsoleEvents::TERMINATE, - ConsoleEvents::ERROR, - ]); - } - - $container->addCompilerPass(new AssetsContextPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION); - $container->addCompilerPass(new LoggerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); - $container->addCompilerPass(new RegisterControllerArgumentLocatorsPass()); - $container->addCompilerPass(new RemoveEmptyControllerArgumentLocatorsPass(), PassConfig::TYPE_BEFORE_REMOVING); - $container->addCompilerPass(new RoutingResolverPass()); - $container->addCompilerPass(new DataCollectorTranslatorPass()); - $container->addCompilerPass(new ProfilerPass()); - // must be registered before removing private services as some might be listeners/subscribers - // but as late as possible to get resolved parameters - $container->addCompilerPass($registerListenersPass, PassConfig::TYPE_BEFORE_REMOVING); - $this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class); - $container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_AFTER_REMOVING, -255); - $this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class); - $this->addCompilerPassIfExists($container, AddConsoleCommandPass::class, PassConfig::TYPE_BEFORE_REMOVING); - // must be registered as late as possible to get access to all Twig paths registered in - // twig.template_iterator definition - $this->addCompilerPassIfExists($container, TranslatorPass::class, PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); - $this->addCompilerPassIfExists($container, TranslatorPathsPass::class, PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new LoggingTranslatorPass()); - $container->addCompilerPass(new AddExpressionLanguageProvidersPass(false)); - $this->addCompilerPassIfExists($container, TranslationExtractorPass::class); - $this->addCompilerPassIfExists($container, TranslationDumperPass::class); - $container->addCompilerPass(new FragmentRendererPass()); - $this->addCompilerPassIfExists($container, SerializerPass::class); - $this->addCompilerPassIfExists($container, PropertyInfoPass::class); - $container->addCompilerPass(new ControllerArgumentValueResolverPass()); - $container->addCompilerPass(new CachePoolPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 32); - $container->addCompilerPass(new CachePoolClearerPass(), PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new CachePoolPrunerPass(), PassConfig::TYPE_AFTER_REMOVING); - $this->addCompilerPassIfExists($container, FormPass::class); - $container->addCompilerPass(new WorkflowGuardListenerPass()); - $container->addCompilerPass(new ResettableServicePass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); - $container->addCompilerPass(new RegisterLocaleAwareServicesPass()); - $container->addCompilerPass(new TestServiceContainerWeakRefPass(), PassConfig::TYPE_BEFORE_REMOVING, -32); - $container->addCompilerPass(new TestServiceContainerRealRefPass(), PassConfig::TYPE_AFTER_REMOVING); - $this->addCompilerPassIfExists($container, AddMimeTypeGuesserPass::class); - $this->addCompilerPassIfExists($container, MessengerPass::class); - $this->addCompilerPassIfExists($container, HttpClientPass::class); - $this->addCompilerPassIfExists($container, AddAutoMappingConfigurationPass::class); - $container->addCompilerPass(new RegisterReverseContainerPass(true)); - $container->addCompilerPass(new RegisterReverseContainerPass(false), PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new RemoveUnusedSessionMarshallingHandlerPass()); - $container->addCompilerPass(new SessionPass()); - - if ($container->getParameter('kernel.debug')) { - $container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 2); - $container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_BEFORE_REMOVING, -255); - $container->addCompilerPass(new CacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING); - } - } - - private function addCompilerPassIfExists(ContainerBuilder $container, string $class, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) - { - $container->addResource(new ClassExistenceResource($class)); - - if (class_exists($class)) { - $container->addCompilerPass(new $class(), $type, $priority); - } - } -} diff --git a/lib/symfony/framework-bundle/HttpCache/HttpCache.php b/lib/symfony/framework-bundle/HttpCache/HttpCache.php deleted file mode 100644 index fe38c4adc..000000000 --- a/lib/symfony/framework-bundle/HttpCache/HttpCache.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpCache\Esi; -use Symfony\Component\HttpKernel\HttpCache\HttpCache as BaseHttpCache; -use Symfony\Component\HttpKernel\HttpCache\Store; -use Symfony\Component\HttpKernel\HttpCache\StoreInterface; -use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Manages HTTP cache objects in a Container. - * - * @author Fabien Potencier - */ -class HttpCache extends BaseHttpCache -{ - protected $cacheDir; - protected $kernel; - - private $store; - private $surrogate; - private $options; - - /** - * @param string|StoreInterface $cache The cache directory (default used if null) or the storage instance - */ - public function __construct(KernelInterface $kernel, $cache = null, SurrogateInterface $surrogate = null, array $options = null) - { - $this->kernel = $kernel; - $this->surrogate = $surrogate; - $this->options = $options ?? []; - - if ($cache instanceof StoreInterface) { - $this->store = $cache; - } elseif (null !== $cache && !\is_string($cache)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be a string or a SurrogateInterface, "%s" given.', __METHOD__, get_debug_type($cache))); - } else { - $this->cacheDir = $cache; - } - - if (null === $options && $kernel->isDebug()) { - $this->options = ['debug' => true]; - } - - if ($this->options['debug'] ?? false) { - $this->options += ['stale_if_error' => 0]; - } - - parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge($this->options, $this->getOptions())); - } - - /** - * {@inheritdoc} - */ - protected function forward(Request $request, bool $catch = false, Response $entry = null) - { - $this->getKernel()->boot(); - $this->getKernel()->getContainer()->set('cache', $this); - - return parent::forward($request, $catch, $entry); - } - - /** - * Returns an array of options to customize the Cache configuration. - * - * @return array - */ - protected function getOptions() - { - return []; - } - - /** - * @return SurrogateInterface - */ - protected function createSurrogate() - { - return $this->surrogate ?? new Esi(); - } - - /** - * @return StoreInterface - */ - protected function createStore() - { - return $this->store ?? new Store($this->cacheDir ?: $this->kernel->getCacheDir().'/http_cache'); - } -} diff --git a/lib/symfony/framework-bundle/Kernel/MicroKernelTrait.php b/lib/symfony/framework-bundle/Kernel/MicroKernelTrait.php deleted file mode 100644 index c25f90d63..000000000 --- a/lib/symfony/framework-bundle/Kernel/MicroKernelTrait.php +++ /dev/null @@ -1,234 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Kernel; - -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader as ContainerPhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; -use Symfony\Component\Routing\Loader\PhpFileLoader as RoutingPhpFileLoader; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RouteCollectionBuilder; - -/** - * A Kernel that provides configuration hooks. - * - * @author Ryan Weaver - * @author Fabien Potencier - */ -trait MicroKernelTrait -{ - /** - * Configures the container. - * - * You can register extensions: - * - * $container->extension('framework', [ - * 'secret' => '%secret%' - * ]); - * - * Or services: - * - * $container->services()->set('halloween', 'FooBundle\HalloweenProvider'); - * - * Or parameters: - * - * $container->parameters()->set('halloween', 'lot of fun'); - */ - private function configureContainer(ContainerConfigurator $container, LoaderInterface $loader, ContainerBuilder $builder): void - { - $configDir = $this->getConfigDir(); - - $container->import($configDir.'/{packages}/*.yaml'); - $container->import($configDir.'/{packages}/'.$this->environment.'/*.yaml'); - - if (is_file($configDir.'/services.yaml')) { - $container->import($configDir.'/services.yaml'); - $container->import($configDir.'/{services}_'.$this->environment.'.yaml'); - } else { - $container->import($configDir.'/{services}.php'); - } - } - - /** - * Adds or imports routes into your application. - * - * $routes->import($this->getConfigDir().'/*.{yaml,php}'); - * $routes - * ->add('admin_dashboard', '/admin') - * ->controller('App\Controller\AdminController::dashboard') - * ; - */ - private function configureRoutes(RoutingConfigurator $routes): void - { - $configDir = $this->getConfigDir(); - - $routes->import($configDir.'/{routes}/'.$this->environment.'/*.yaml'); - $routes->import($configDir.'/{routes}/*.yaml'); - - if (is_file($configDir.'/routes.yaml')) { - $routes->import($configDir.'/routes.yaml'); - } else { - $routes->import($configDir.'/{routes}.php'); - } - } - - /** - * Gets the path to the configuration directory. - */ - private function getConfigDir(): string - { - return $this->getProjectDir().'/config'; - } - - /** - * Gets the path to the bundles configuration file. - */ - private function getBundlesPath(): string - { - return $this->getConfigDir().'/bundles.php'; - } - - /** - * {@inheritdoc} - */ - public function getCacheDir(): string - { - if (isset($_SERVER['APP_CACHE_DIR'])) { - return $_SERVER['APP_CACHE_DIR'].'/'.$this->environment; - } - - return parent::getCacheDir(); - } - - /** - * {@inheritdoc} - */ - public function getLogDir(): string - { - return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir(); - } - - /** - * {@inheritdoc} - */ - public function registerBundles(): iterable - { - $contents = require $this->getBundlesPath(); - foreach ($contents as $class => $envs) { - if ($envs[$this->environment] ?? $envs['all'] ?? false) { - yield new $class(); - } - } - } - - /** - * {@inheritdoc} - */ - public function registerContainerConfiguration(LoaderInterface $loader) - { - $loader->load(function (ContainerBuilder $container) use ($loader) { - $container->loadFromExtension('framework', [ - 'router' => [ - 'resource' => 'kernel::loadRoutes', - 'type' => 'service', - ], - ]); - - $kernelClass = false !== strpos(static::class, "@anonymous\0") ? parent::class : static::class; - - if (!$container->hasDefinition('kernel')) { - $container->register('kernel', $kernelClass) - ->addTag('controller.service_arguments') - ->setAutoconfigured(true) - ->setSynthetic(true) - ->setPublic(true) - ; - } - - $kernelDefinition = $container->getDefinition('kernel'); - $kernelDefinition->addTag('routing.route_loader'); - - $container->addObjectResource($this); - $container->fileExists($this->getBundlesPath()); - - $configureContainer = new \ReflectionMethod($this, 'configureContainer'); - $configuratorClass = $configureContainer->getNumberOfParameters() > 0 && ($type = $configureContainer->getParameters()[0]->getType()) instanceof \ReflectionNamedType && !$type->isBuiltin() ? $type->getName() : null; - - if ($configuratorClass && !is_a(ContainerConfigurator::class, $configuratorClass, true)) { - $configureContainer->getClosure($this)($container, $loader); - - return; - } - - $file = (new \ReflectionObject($this))->getFileName(); - /* @var ContainerPhpFileLoader $kernelLoader */ - $kernelLoader = $loader->getResolver()->resolve($file); - $kernelLoader->setCurrentDir(\dirname($file)); - $instanceof = &\Closure::bind(function &() { return $this->instanceof; }, $kernelLoader, $kernelLoader)(); - - $valuePreProcessor = AbstractConfigurator::$valuePreProcessor; - AbstractConfigurator::$valuePreProcessor = function ($value) { - return $this === $value ? new Reference('kernel') : $value; - }; - - try { - $configureContainer->getClosure($this)(new ContainerConfigurator($container, $kernelLoader, $instanceof, $file, $file, $this->getEnvironment()), $loader, $container); - } finally { - $instanceof = []; - $kernelLoader->registerAliasesForSinglyImplementedInterfaces(); - AbstractConfigurator::$valuePreProcessor = $valuePreProcessor; - } - - $container->setAlias($kernelClass, 'kernel')->setPublic(true); - }); - } - - /** - * @internal - */ - public function loadRoutes(LoaderInterface $loader): RouteCollection - { - $file = (new \ReflectionObject($this))->getFileName(); - /* @var RoutingPhpFileLoader $kernelLoader */ - $kernelLoader = $loader->getResolver()->resolve($file, 'php'); - $kernelLoader->setCurrentDir(\dirname($file)); - $collection = new RouteCollection(); - - $configureRoutes = new \ReflectionMethod($this, 'configureRoutes'); - $configuratorClass = $configureRoutes->getNumberOfParameters() > 0 && ($type = $configureRoutes->getParameters()[0]->getType()) instanceof \ReflectionNamedType && !$type->isBuiltin() ? $type->getName() : null; - - if ($configuratorClass && !is_a(RoutingConfigurator::class, $configuratorClass, true)) { - trigger_deprecation('symfony/framework-bundle', '5.1', 'Using type "%s" for argument 1 of method "%s:configureRoutes()" is deprecated, use "%s" instead.', RouteCollectionBuilder::class, self::class, RoutingConfigurator::class); - - $routes = new RouteCollectionBuilder($loader); - $this->configureRoutes($routes); - - return $routes->build(); - } - - $configureRoutes->getClosure($this)(new RoutingConfigurator($collection, $kernelLoader, $file, $file, $this->getEnvironment())); - - foreach ($collection as $route) { - $controller = $route->getDefault('_controller'); - - if (\is_array($controller) && [0, 1] === array_keys($controller) && $this === $controller[0]) { - $route->setDefault('_controller', ['kernel', $controller[1]]); - } - } - - return $collection; - } -} diff --git a/lib/symfony/framework-bundle/KernelBrowser.php b/lib/symfony/framework-bundle/KernelBrowser.php deleted file mode 100644 index a02853012..000000000 --- a/lib/symfony/framework-bundle/KernelBrowser.php +++ /dev/null @@ -1,262 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle; - -use Symfony\Bundle\FrameworkBundle\Test\TestBrowserToken; -use Symfony\Component\BrowserKit\Cookie; -use Symfony\Component\BrowserKit\CookieJar; -use Symfony\Component\BrowserKit\History; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelBrowser; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\HttpKernel\Profiler\Profile as HttpProfile; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Simulates a browser and makes requests to a Kernel object. - * - * @author Fabien Potencier - */ -class KernelBrowser extends HttpKernelBrowser -{ - private $hasPerformedRequest = false; - private $profiler = false; - private $reboot = true; - - /** - * {@inheritdoc} - */ - public function __construct(KernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) - { - parent::__construct($kernel, $server, $history, $cookieJar); - } - - /** - * Returns the container. - * - * @return ContainerInterface - */ - public function getContainer() - { - $container = $this->kernel->getContainer(); - - return $container->has('test.service_container') ? $container->get('test.service_container') : $container; - } - - /** - * Returns the kernel. - * - * @return KernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * Gets the profile associated with the current Response. - * - * @return HttpProfile|false|null - */ - public function getProfile() - { - if (null === $this->response || !$this->getContainer()->has('profiler')) { - return false; - } - - return $this->getContainer()->get('profiler')->loadProfileFromResponse($this->response); - } - - /** - * Enables the profiler for the very next request. - * - * If the profiler is not enabled, the call to this method does nothing. - */ - public function enableProfiler() - { - if ($this->getContainer()->has('profiler')) { - $this->profiler = true; - } - } - - /** - * Disables kernel reboot between requests. - * - * By default, the Client reboots the Kernel for each request. This method - * allows to keep the same kernel across requests. - */ - public function disableReboot() - { - $this->reboot = false; - } - - /** - * Enables kernel reboot between requests. - */ - public function enableReboot() - { - $this->reboot = true; - } - - /** - * @param UserInterface $user - * - * @return $this - */ - public function loginUser(object $user, string $firewallContext = 'main'): self - { - if (!interface_exists(UserInterface::class)) { - throw new \LogicException(sprintf('"%s" requires symfony/security-core to be installed.', __METHOD__)); - } - - if (!$user instanceof UserInterface) { - throw new \LogicException(sprintf('The first argument of "%s" must be instance of "%s", "%s" provided.', __METHOD__, UserInterface::class, \is_object($user) ? \get_class($user) : \gettype($user))); - } - - $token = new TestBrowserToken($user->getRoles(), $user, $firewallContext); - // @deprecated since Symfony 5.4 - if (method_exists($token, 'setAuthenticated')) { - $token->setAuthenticated(true, false); - } - - $container = $this->getContainer(); - $container->get('security.untracked_token_storage')->setToken($token); - - if ($container->has('session.factory')) { - $session = $container->get('session.factory')->createSession(); - } elseif ($container->has('session')) { - $session = $container->get('session'); - } else { - return $this; - } - - $session->set('_security_'.$firewallContext, serialize($token)); - $session->save(); - - $domains = array_unique(array_map(function (Cookie $cookie) use ($session) { - return $cookie->getName() === $session->getName() ? $cookie->getDomain() : ''; - }, $this->getCookieJar()->all())) ?: ['']; - foreach ($domains as $domain) { - $cookie = new Cookie($session->getName(), $session->getId(), null, null, $domain); - $this->getCookieJar()->set($cookie); - } - - return $this; - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return Response - */ - protected function doRequest(object $request) - { - // avoid shutting down the Kernel if no request has been performed yet - // WebTestCase::createClient() boots the Kernel but do not handle a request - if ($this->hasPerformedRequest && $this->reboot) { - $this->kernel->boot(); - $this->kernel->shutdown(); - } else { - $this->hasPerformedRequest = true; - } - - if ($this->profiler) { - $this->profiler = false; - - $this->kernel->boot(); - $this->getContainer()->get('profiler')->enable(); - } - - return parent::doRequest($request); - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return Response - */ - protected function doRequestInProcess(object $request) - { - $response = parent::doRequestInProcess($request); - - $this->profiler = false; - - return $response; - } - - /** - * Returns the script to execute when the request must be insulated. - * - * It assumes that the autoloader is named 'autoload.php' and that it is - * stored in the same directory as the kernel (this is the case for the - * Symfony Standard Edition). If this is not your case, create your own - * client and override this method. - * - * @param Request $request - * - * @return string - */ - protected function getScript(object $request) - { - $kernel = var_export(serialize($this->kernel), true); - $request = var_export(serialize($request), true); - $errorReporting = error_reporting(); - - $requires = ''; - foreach (get_declared_classes() as $class) { - if (str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $file = \dirname($r->getFileName(), 2).'/autoload.php'; - if (is_file($file)) { - $requires .= 'require_once '.var_export($file, true).";\n"; - } - } - } - - if (!$requires) { - throw new \RuntimeException('Composer autoloader not found.'); - } - - $requires .= 'require_once '.var_export((new \ReflectionObject($this->kernel))->getFileName(), true).";\n"; - - $profilerCode = ''; - if ($this->profiler) { - $profilerCode = <<<'EOF' -$container = $kernel->getContainer(); -$container = $container->has('test.service_container') ? $container->get('test.service_container') : $container; -$container->get('profiler')->enable(); -EOF; - } - - $code = <<boot(); -$profilerCode - -\$request = unserialize($request); -EOF; - - return $code.$this->getHandleScript(); - } -} diff --git a/lib/symfony/framework-bundle/LICENSE b/lib/symfony/framework-bundle/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/framework-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/framework-bundle/README.md b/lib/symfony/framework-bundle/README.md deleted file mode 100644 index 76c7700fa..000000000 --- a/lib/symfony/framework-bundle/README.md +++ /dev/null @@ -1,13 +0,0 @@ -FrameworkBundle -=============== - -FrameworkBundle provides a tight integration between Symfony components and the -Symfony full-stack framework. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/framework-bundle/Resources/bin/check-unused-known-tags.php b/lib/symfony/framework-bundle/Resources/bin/check-unused-known-tags.php deleted file mode 100644 index 55658f5b1..000000000 --- a/lib/symfony/framework-bundle/Resources/bin/check-unused-known-tags.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if ('cli' !== \PHP_SAPI) { - throw new Exception('This script must be run from the command line.'); -} - -require dirname(__DIR__, 6).'/vendor/autoload.php'; - -use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\UnusedTagsPassUtils; - -$target = dirname(__DIR__, 2).'/DependencyInjection/Compiler/UnusedTagsPass.php'; -$contents = file_get_contents($target); -$contents = preg_replace('{private const KNOWN_TAGS = \[(.+?)\];}sm', "private const KNOWN_TAGS = [\n '".implode("',\n '", UnusedTagsPassUtils::getDefinedTags())."',\n ];", $contents); -file_put_contents($target, $contents); diff --git a/lib/symfony/framework-bundle/Resources/config/annotations.php b/lib/symfony/framework-bundle/Resources/config/annotations.php deleted file mode 100644 index 33a2f4698..000000000 --- a/lib/symfony/framework-bundle/Resources/config/annotations.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Doctrine\Common\Annotations\AnnotationReader; -use Doctrine\Common\Annotations\AnnotationRegistry; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Annotations\Reader; -use Doctrine\Common\Cache\Psr6\DoctrineProvider; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('annotations.reader', AnnotationReader::class) - ->call('addGlobalIgnoredName', [ - 'required', - service('annotations.dummy_registry')->nullOnInvalid(), // dummy arg to register class_exists as annotation loader only when required - ]) - - ->set('annotations.dummy_registry', AnnotationRegistry::class) - ->call('registerUniqueLoader', ['class_exists']) - - ->set('annotations.cached_reader', PsrCachedReader::class) - ->args([ - service('annotations.reader'), - inline_service(ArrayAdapter::class), - abstract_arg('Debug-Flag'), - ]) - ->tag('annotations.cached_reader') - ->tag('container.do_not_inline') - - ->set('annotations.filesystem_cache_adapter', FilesystemAdapter::class) - ->args([ - '', - 0, - abstract_arg('Cache-Directory'), - ]) - - ->set('annotations.filesystem_cache', DoctrineProvider::class) - ->factory([DoctrineProvider::class, 'wrap']) - ->args([ - service('annotations.filesystem_cache_adapter'), - ]) - ->deprecate('symfony/framework-bundle', '5.4', '"%service_id% is deprecated"') - - ->set('annotations.cache_warmer', AnnotationsCacheWarmer::class) - ->args([ - service('annotations.reader'), - param('kernel.cache_dir').'/annotations.php', - '#^Symfony\\\\(?:Component\\\\HttpKernel\\\\|Bundle\\\\FrameworkBundle\\\\Controller\\\\(?!.*Controller$))#', - param('kernel.debug'), - ]) - - ->set('annotations.cache_adapter', PhpArrayAdapter::class) - ->factory([PhpArrayAdapter::class, 'create']) - ->args([ - param('kernel.cache_dir').'/annotations.php', - service('cache.annotations'), - ]) - ->tag('container.hot_path') - - ->set('annotations.cache', DoctrineProvider::class) - ->factory([DoctrineProvider::class, 'wrap']) - ->args([ - service('annotations.cache_adapter'), - ]) - ->deprecate('symfony/framework-bundle', '5.4', '"%service_id% is deprecated"') - - ->alias('annotation_reader', 'annotations.reader') - ->alias(Reader::class, 'annotation_reader'); -}; diff --git a/lib/symfony/framework-bundle/Resources/config/assets.php b/lib/symfony/framework-bundle/Resources/config/assets.php deleted file mode 100644 index 1e250aab4..000000000 --- a/lib/symfony/framework-bundle/Resources/config/assets.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Asset\Context\RequestStackContext; -use Symfony\Component\Asset\Package; -use Symfony\Component\Asset\Packages; -use Symfony\Component\Asset\PathPackage; -use Symfony\Component\Asset\UrlPackage; -use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; -use Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy; -use Symfony\Component\Asset\VersionStrategy\RemoteJsonManifestVersionStrategy; -use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('asset.request_context.base_path', null) - ->set('asset.request_context.secure', null) - ; - - $container->services() - ->set('assets.packages', Packages::class) - ->args([ - service('assets._default_package'), - tagged_iterator('assets.package', 'package'), - ]) - - ->alias(Packages::class, 'assets.packages') - - ->set('assets.empty_package', Package::class) - ->args([ - service('assets.empty_version_strategy'), - ]) - - ->alias('assets._default_package', 'assets.empty_package') - - ->set('assets.context', RequestStackContext::class) - ->args([ - service('request_stack'), - param('asset.request_context.base_path'), - param('asset.request_context.secure'), - ]) - - ->set('assets.path_package', PathPackage::class) - ->abstract() - ->args([ - abstract_arg('base path'), - abstract_arg('version strategy'), - service('assets.context'), - ]) - - ->set('assets.url_package', UrlPackage::class) - ->abstract() - ->args([ - abstract_arg('base URLs'), - abstract_arg('version strategy'), - service('assets.context'), - ]) - - ->set('assets.static_version_strategy', StaticVersionStrategy::class) - ->abstract() - ->args([ - abstract_arg('version'), - abstract_arg('format'), - ]) - - ->set('assets.empty_version_strategy', EmptyVersionStrategy::class) - - ->set('assets.json_manifest_version_strategy', JsonManifestVersionStrategy::class) - ->abstract() - ->args([ - abstract_arg('manifest path'), - service('http_client')->nullOnInvalid(), - false, - ]) - - ->set('assets.remote_json_manifest_version_strategy', RemoteJsonManifestVersionStrategy::class) - ->abstract() - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "assets.json_manifest_version_strategy" instead.') - ->args([ - abstract_arg('manifest url'), - service('http_client'), - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/cache.php b/lib/symfony/framework-bundle/Resources/config/cache.php deleted file mode 100644 index e333e5f54..000000000 --- a/lib/symfony/framework-bundle/Resources/config/cache.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\ApcuAdapter; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\DoctrineAdapter; -use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\MemcachedAdapter; -use Symfony\Component\Cache\Adapter\PdoAdapter; -use Symfony\Component\Cache\Adapter\ProxyAdapter; -use Symfony\Component\Cache\Adapter\RedisAdapter; -use Symfony\Component\Cache\Adapter\RedisTagAwareAdapter; -use Symfony\Component\Cache\Adapter\TagAwareAdapter; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Messenger\EarlyExpirationHandler; -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('cache.app') - ->parent('cache.adapter.filesystem') - ->public() - ->tag('cache.pool', ['clearer' => 'cache.app_clearer']) - - ->set('cache.app.taggable', TagAwareAdapter::class) - ->args([service('cache.app')]) - - ->set('cache.system') - ->parent('cache.adapter.system') - ->public() - ->tag('cache.pool') - - ->set('cache.validator') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.serializer') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.annotations') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.property_info') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.messenger.restart_workers_signal') - ->parent('cache.app') - ->private() - ->tag('cache.pool') - - ->set('cache.adapter.system', AdapterInterface::class) - ->abstract() - ->factory([AbstractAdapter::class, 'createSystemCache']) - ->args([ - '', // namespace - 0, // default lifetime - abstract_arg('version'), - sprintf('%s/pools/system', param('kernel.cache_dir')), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('cache.pool', ['clearer' => 'cache.system_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.apcu', ApcuAdapter::class) - ->abstract() - ->args([ - '', // namespace - 0, // default lifetime - abstract_arg('version'), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.doctrine', DoctrineAdapter::class) - ->abstract() - ->args([ - abstract_arg('Doctrine provider service'), - '', // namespace - 0, // default lifetime - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_doctrine_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - ->deprecate('symfony/framework-bundle', '5.4', 'The "%service_id%" service inherits from "cache.adapter.doctrine" which is deprecated.') - - ->set('cache.adapter.filesystem', FilesystemAdapter::class) - ->abstract() - ->args([ - '', // namespace - 0, // default lifetime - sprintf('%s/pools/app', param('kernel.cache_dir')), - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.psr6', ProxyAdapter::class) - ->abstract() - ->args([ - abstract_arg('PSR-6 provider service'), - '', // namespace - 0, // default lifetime - ]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_psr6_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - - ->set('cache.adapter.redis', RedisAdapter::class) - ->abstract() - ->args([ - abstract_arg('Redis connection service'), - '', // namespace - 0, // default lifetime - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_redis_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.redis_tag_aware', RedisTagAwareAdapter::class) - ->abstract() - ->args([ - abstract_arg('Redis connection service'), - '', // namespace - 0, // default lifetime - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_redis_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.memcached', MemcachedAdapter::class) - ->abstract() - ->args([ - abstract_arg('Memcached connection service'), - '', // namespace - 0, // default lifetime - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_memcached_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.doctrine_dbal', DoctrineDbalAdapter::class) - ->abstract() - ->args([ - abstract_arg('DBAL connection service'), - '', // namespace - 0, // default lifetime - [], // table options - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_doctrine_dbal_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.pdo', PdoAdapter::class) - ->abstract() - ->args([ - abstract_arg('PDO connection service'), - '', // namespace - 0, // default lifetime - [], // table options - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_pdo_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.array', ArrayAdapter::class) - ->abstract() - ->args([ - 0, // default lifetime - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.default_marshaller', DefaultMarshaller::class) - ->args([ - null, // use igbinary_serialize() when available - '%kernel.debug%', - ]) - - ->set('cache.early_expiration_handler', EarlyExpirationHandler::class) - ->args([ - service('reverse_container'), - ]) - ->tag('messenger.message_handler') - - ->set('cache.default_clearer', Psr6CacheClearer::class) - ->args([ - [], - ]) - - ->set('cache.system_clearer') - ->parent('cache.default_clearer') - ->public() - - ->set('cache.global_clearer') - ->parent('cache.default_clearer') - ->public() - - ->alias('cache.app_clearer', 'cache.default_clearer') - ->public() - - ->alias(CacheItemPoolInterface::class, 'cache.app') - - ->alias(AdapterInterface::class, 'cache.app') - ->deprecate('symfony/framework-bundle', '5.4', sprintf('The "%%alias_id%%" alias is deprecated, use "%s" instead.', CacheItemPoolInterface::class)) - - ->alias(CacheInterface::class, 'cache.app') - - ->alias(TagAwareCacheInterface::class, 'cache.app.taggable') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/cache_debug.php b/lib/symfony/framework-bundle/Resources/config/cache_debug.php deleted file mode 100644 index 8f29d9f1d..000000000 --- a/lib/symfony/framework-bundle/Resources/config/cache_debug.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\CacheWarmer\CachePoolClearerCacheWarmer; -use Symfony\Component\Cache\DataCollector\CacheDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - // DataCollector (public to prevent inlining, made private in CacheCollectorPass) - ->set('data_collector.cache', CacheDataCollector::class) - ->public() - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/cache.html.twig', - 'id' => 'cache', - 'priority' => 275, - ]) - - // CacheWarmer used in dev to clear cache pool - ->set('cache_pool_clearer.cache_warmer', CachePoolClearerCacheWarmer::class) - ->args([ - service('cache.system_clearer'), - [ - 'cache.validator', - 'cache.serializer', - ], - ]) - ->tag('kernel.cache_warmer', ['priority' => 64]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/collectors.php b/lib/symfony/framework-bundle/Resources/config/collectors.php deleted file mode 100644 index abf9ded5e..000000000 --- a/lib/symfony/framework-bundle/Resources/config/collectors.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector; -use Symfony\Component\HttpKernel\DataCollector\AjaxDataCollector; -use Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector; -use Symfony\Component\HttpKernel\DataCollector\EventDataCollector; -use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; -use Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector; -use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector; -use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; -use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector; -use Symfony\Component\HttpKernel\KernelEvents; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('data_collector.config', ConfigDataCollector::class) - ->call('setKernel', [service('kernel')->ignoreOnInvalid()]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/config.html.twig', 'id' => 'config', 'priority' => -255]) - - ->set('data_collector.request', RequestDataCollector::class) - ->args([ - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('data_collector', ['template' => '@WebProfiler/Collector/request.html.twig', 'id' => 'request', 'priority' => 335]) - - ->set('data_collector.request.session_collector', \Closure::class) - ->factory([\Closure::class, 'fromCallable']) - ->args([[service('data_collector.request'), 'collectSessionUsage']]) - - ->set('data_collector.ajax', AjaxDataCollector::class) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/ajax.html.twig', 'id' => 'ajax', 'priority' => 315]) - - ->set('data_collector.exception', ExceptionDataCollector::class) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/exception.html.twig', 'id' => 'exception', 'priority' => 305]) - - ->set('data_collector.events', EventDataCollector::class) - ->args([ - service('debug.event_dispatcher')->ignoreOnInvalid(), - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/events.html.twig', 'id' => 'events', 'priority' => 290]) - - ->set('data_collector.logger', LoggerDataCollector::class) - ->args([ - service('logger')->ignoreOnInvalid(), - sprintf('%s/%s', param('kernel.build_dir'), param('kernel.container_class')), - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'profiler']) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/logger.html.twig', 'id' => 'logger', 'priority' => 300]) - - ->set('data_collector.time', TimeDataCollector::class) - ->args([ - service('kernel')->ignoreOnInvalid(), - service('debug.stopwatch')->ignoreOnInvalid(), - ]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/time.html.twig', 'id' => 'time', 'priority' => 330]) - - ->set('data_collector.memory', MemoryDataCollector::class) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/memory.html.twig', 'id' => 'memory', 'priority' => 325]) - - ->set('data_collector.router', RouterDataCollector::class) - ->tag('kernel.event_listener', ['event' => KernelEvents::CONTROLLER, 'method' => 'onKernelController']) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/router.html.twig', 'id' => 'router', 'priority' => 285]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/console.php b/lib/symfony/framework-bundle/Resources/config/console.php deleted file mode 100644 index 610a83add..000000000 --- a/lib/symfony/framework-bundle/Resources/config/console.php +++ /dev/null @@ -1,331 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Command\AboutCommand; -use Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand; -use Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand; -use Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand; -use Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand; -use Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand; -use Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand; -use Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsDecryptToLocalCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsEncryptFromLocalCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsGenerateKeysCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsListCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsRemoveCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsSetCommand; -use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand; -use Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand; -use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand; -use Symfony\Bundle\FrameworkBundle\EventListener\SuggestMissingPackageSubscriber; -use Symfony\Component\Console\EventListener\ErrorListener; -use Symfony\Component\Dotenv\Command\DebugCommand as DotenvDebugCommand; -use Symfony\Component\Messenger\Command\ConsumeMessagesCommand; -use Symfony\Component\Messenger\Command\DebugCommand; -use Symfony\Component\Messenger\Command\FailedMessagesRemoveCommand; -use Symfony\Component\Messenger\Command\FailedMessagesRetryCommand; -use Symfony\Component\Messenger\Command\FailedMessagesShowCommand; -use Symfony\Component\Messenger\Command\SetupTransportsCommand; -use Symfony\Component\Messenger\Command\StopWorkersCommand; -use Symfony\Component\Translation\Command\TranslationPullCommand; -use Symfony\Component\Translation\Command\TranslationPushCommand; -use Symfony\Component\Translation\Command\XliffLintCommand; -use Symfony\Component\Validator\Command\DebugCommand as ValidatorDebugCommand; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('console.error_listener', ErrorListener::class) - ->args([ - service('logger')->nullOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'console']) - - ->set('console.suggest_missing_package_subscriber', SuggestMissingPackageSubscriber::class) - ->tag('kernel.event_subscriber') - - ->set('console.command.about', AboutCommand::class) - ->tag('console.command') - - ->set('console.command.assets_install', AssetsInstallCommand::class) - ->args([ - service('filesystem'), - param('kernel.project_dir'), - ]) - ->tag('console.command') - - ->set('console.command.cache_clear', CacheClearCommand::class) - ->args([ - service('cache_clearer'), - service('filesystem'), - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_clear', CachePoolClearCommand::class) - ->args([ - service('cache.global_clearer'), - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_prune', CachePoolPruneCommand::class) - ->args([ - [], - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_delete', CachePoolDeleteCommand::class) - ->args([ - service('cache.global_clearer'), - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_list', CachePoolListCommand::class) - ->args([ - null, - ]) - ->tag('console.command') - - ->set('console.command.cache_warmup', CacheWarmupCommand::class) - ->args([ - service('cache_warmer'), - ]) - ->tag('console.command') - - ->set('console.command.config_debug', ConfigDebugCommand::class) - ->tag('console.command') - - ->set('console.command.config_dump_reference', ConfigDumpReferenceCommand::class) - ->tag('console.command') - - ->set('console.command.container_debug', ContainerDebugCommand::class) - ->tag('console.command') - - ->set('console.command.container_lint', ContainerLintCommand::class) - ->tag('console.command') - - ->set('console.command.debug_autowiring', DebugAutowiringCommand::class) - ->args([ - null, - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.dotenv_debug', DotenvDebugCommand::class) - ->args([ - param('kernel.environment'), - param('kernel.project_dir'), - ]) - ->tag('console.command') - - ->set('console.command.event_dispatcher_debug', EventDispatcherDebugCommand::class) - ->args([ - tagged_locator('event_dispatcher.dispatcher', 'name'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_consume_messages', ConsumeMessagesCommand::class) - ->args([ - abstract_arg('Routable message bus'), - service('messenger.receiver_locator'), - service('event_dispatcher'), - service('logger')->nullOnInvalid(), - [], // Receiver names - service('messenger.listener.reset_services')->nullOnInvalid(), - [], // Bus names - ]) - ->tag('console.command') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('console.command.messenger_setup_transports', SetupTransportsCommand::class) - ->args([ - service('messenger.receiver_locator'), - [], // Receiver names - ]) - ->tag('console.command') - - ->set('console.command.messenger_debug', DebugCommand::class) - ->args([ - [], // Message to handlers mapping - ]) - ->tag('console.command') - - ->set('console.command.messenger_stop_workers', StopWorkersCommand::class) - ->args([ - service('cache.messenger.restart_workers_signal'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_failed_messages_retry', FailedMessagesRetryCommand::class) - ->args([ - abstract_arg('Default failure receiver name'), - abstract_arg('Receivers'), - service('messenger.routable_message_bus'), - service('event_dispatcher'), - service('logger'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_failed_messages_show', FailedMessagesShowCommand::class) - ->args([ - abstract_arg('Default failure receiver name'), - abstract_arg('Receivers'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_failed_messages_remove', FailedMessagesRemoveCommand::class) - ->args([ - abstract_arg('Default failure receiver name'), - abstract_arg('Receivers'), - ]) - ->tag('console.command') - - ->set('console.command.router_debug', RouterDebugCommand::class) - ->args([ - service('router'), - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.router_match', RouterMatchCommand::class) - ->args([ - service('router'), - tagged_iterator('routing.expression_language_provider'), - ]) - ->tag('console.command') - - ->set('console.command.translation_debug', TranslationDebugCommand::class) - ->args([ - service('translator'), - service('translation.reader'), - service('translation.extractor'), - param('translator.default_path'), - null, // twig.default_path - [], // Translator paths - [], // Twig paths - param('kernel.enabled_locales'), - ]) - ->tag('console.command') - - ->set('console.command.translation_extract', TranslationUpdateCommand::class) - ->args([ - service('translation.writer'), - service('translation.reader'), - service('translation.extractor'), - param('kernel.default_locale'), - param('translator.default_path'), - null, // twig.default_path - [], // Translator paths - [], // Twig paths - param('kernel.enabled_locales'), - ]) - ->tag('console.command') - - ->set('console.command.validator_debug', ValidatorDebugCommand::class) - ->args([ - service('validator'), - ]) - ->tag('console.command') - - ->set('console.command.translation_pull', TranslationPullCommand::class) - ->args([ - service('translation.provider_collection'), - service('translation.writer'), - service('translation.reader'), - param('kernel.default_locale'), - [], // Translator paths - [], // Enabled locales - ]) - ->tag('console.command', ['command' => 'translation:pull']) - - ->set('console.command.translation_push', TranslationPushCommand::class) - ->args([ - service('translation.provider_collection'), - service('translation.reader'), - [], // Translator paths - [], // Enabled locales - ]) - ->tag('console.command', ['command' => 'translation:push']) - - ->set('console.command.workflow_dump', WorkflowDumpCommand::class) - ->tag('console.command') - - ->set('console.command.xliff_lint', XliffLintCommand::class) - ->tag('console.command') - - ->set('console.command.yaml_lint', YamlLintCommand::class) - ->tag('console.command') - - ->set('console.command.form_debug', \Symfony\Component\Form\Command\DebugCommand::class) - ->args([ - service('form.registry'), - [], // All form types namespaces are stored here by FormPass - [], // All services form types are stored here by FormPass - [], // All type extensions are stored here by FormPass - [], // All type guessers are stored here by FormPass - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_set', SecretsSetCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_remove', SecretsRemoveCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_generate_key', SecretsGenerateKeysCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_list', SecretsListCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_decrypt_to_local', SecretsDecryptToLocalCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_encrypt_from_local', SecretsEncryptFromLocalCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/debug.php b/lib/symfony/framework-bundle/Resources/config/debug.php deleted file mode 100644 index cfaad8c1d..000000000 --- a/lib/symfony/framework-bundle/Resources/config/debug.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\NotTaggedControllerValueResolver; -use Symfony\Component\HttpKernel\Controller\TraceableArgumentResolver; -use Symfony\Component\HttpKernel\Controller\TraceableControllerResolver; -use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('debug.event_dispatcher', TraceableEventDispatcher::class) - ->decorate('event_dispatcher') - ->args([ - service('debug.event_dispatcher.inner'), - service('debug.stopwatch'), - service('logger')->nullOnInvalid(), - service('request_stack')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'event']) - ->tag('kernel.reset', ['method' => 'reset']) - - ->set('debug.controller_resolver', TraceableControllerResolver::class) - ->decorate('controller_resolver') - ->args([ - service('debug.controller_resolver.inner'), - service('debug.stopwatch'), - ]) - - ->set('debug.argument_resolver', TraceableArgumentResolver::class) - ->decorate('argument_resolver') - ->args([ - service('debug.argument_resolver.inner'), - service('debug.stopwatch'), - ]) - - ->set('argument_resolver.not_tagged_controller', NotTaggedControllerValueResolver::class) - ->args([abstract_arg('Controller argument, set in FrameworkExtension')]) - ->tag('controller.argument_value_resolver', ['priority' => -200]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/debug_prod.php b/lib/symfony/framework-bundle/Resources/config/debug_prod.php deleted file mode 100644 index f381b018f..000000000 --- a/lib/symfony/framework-bundle/Resources/config/debug_prod.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener; - -return static function (ContainerConfigurator $container) { - $container->parameters()->set('debug.error_handler.throw_at', -1); - - $container->services() - ->set('debug.debug_handlers_listener', DebugHandlersListener::class) - ->args([ - null, // Exception handler - service('monolog.logger.php')->nullOnInvalid(), - null, // Log levels map for enabled error levels - param('debug.error_handler.throw_at'), - param('kernel.debug'), - param('kernel.debug'), - service('monolog.logger.deprecation')->nullOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'php']) - - ->set('debug.file_link_formatter', FileLinkFormatter::class) - ->args([param('debug.file_link_format')]) - - ->alias(FileLinkFormatter::class, 'debug.file_link_formatter') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/error_renderer.php b/lib/symfony/framework-bundle/Resources/config/error_renderer.php deleted file mode 100644 index 67f28ce44..000000000 --- a/lib/symfony/framework-bundle/Resources/config/error_renderer.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('error_handler.error_renderer.html', HtmlErrorRenderer::class) - ->args([ - inline_service() - ->factory([HtmlErrorRenderer::class, 'isDebug']) - ->args([ - service('request_stack'), - param('kernel.debug'), - ]), - param('kernel.charset'), - service('debug.file_link_formatter')->nullOnInvalid(), - param('kernel.project_dir'), - inline_service() - ->factory([HtmlErrorRenderer::class, 'getAndCleanOutputBuffer']) - ->args([service('request_stack')]), - service('logger')->nullOnInvalid(), - ]) - - ->alias('error_renderer.html', 'error_handler.error_renderer.html') - ->alias('error_renderer', 'error_renderer.html') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/esi.php b/lib/symfony/framework-bundle/Resources/config/esi.php deleted file mode 100644 index 7ac9f9053..000000000 --- a/lib/symfony/framework-bundle/Resources/config/esi.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\SurrogateListener; -use Symfony\Component\HttpKernel\HttpCache\Esi; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('esi', Esi::class) - - ->set('esi_listener', SurrogateListener::class) - ->args([service('esi')->ignoreOnInvalid()]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/form.php b/lib/symfony/framework-bundle/Resources/config/form.php deleted file mode 100644 index e4c0745c6..000000000 --- a/lib/symfony/framework-bundle/Resources/config/form.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; -use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\ColorType; -use Symfony\Component\Form\Extension\Core\Type\FileType; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Core\Type\SubmitType; -use Symfony\Component\Form\Extension\Core\Type\TransformationFailureExtension; -use Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension; -use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; -use Symfony\Component\Form\Extension\HttpFoundation\Type\FormTypeHttpFoundationExtension; -use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension; -use Symfony\Component\Form\Extension\Validator\Type\RepeatedTypeValidatorExtension; -use Symfony\Component\Form\Extension\Validator\Type\SubmitTypeValidatorExtension; -use Symfony\Component\Form\Extension\Validator\Type\UploadValidatorExtension; -use Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser; -use Symfony\Component\Form\FormFactory; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\FormRegistry; -use Symfony\Component\Form\FormRegistryInterface; -use Symfony\Component\Form\ResolvedFormTypeFactory; -use Symfony\Component\Form\ResolvedFormTypeFactoryInterface; -use Symfony\Component\Form\Util\ServerParams; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('form.resolved_type_factory', ResolvedFormTypeFactory::class) - - ->alias(ResolvedFormTypeFactoryInterface::class, 'form.resolved_type_factory') - - ->set('form.registry', FormRegistry::class) - ->args([ - [ - /* - * We don't need to be able to add more extensions. - * more types can be registered with the form.type tag - * more type extensions can be registered with the form.type_extension tag - * more type_guessers can be registered with the form.type_guesser tag - */ - service('form.extension'), - ], - service('form.resolved_type_factory'), - ]) - - ->alias(FormRegistryInterface::class, 'form.registry') - - ->set('form.factory', FormFactory::class) - ->public() - ->args([service('form.registry')]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->alias(FormFactoryInterface::class, 'form.factory') - - ->set('form.extension', DependencyInjectionExtension::class) - ->args([ - abstract_arg('All services with tag "form.type" are stored in a service locator by FormPass'), - abstract_arg('All services with tag "form.type_extension" are stored here by FormPass'), - abstract_arg('All services with tag "form.type_guesser" are stored here by FormPass'), - ]) - - ->set('form.type_guesser.validator', ValidatorTypeGuesser::class) - ->args([service('validator.mapping.class_metadata_factory')]) - ->tag('form.type_guesser') - - ->alias('form.property_accessor', 'property_accessor') - - ->set('form.choice_list_factory.default', DefaultChoiceListFactory::class) - - ->set('form.choice_list_factory.property_access', PropertyAccessDecorator::class) - ->args([ - service('form.choice_list_factory.default'), - service('form.property_accessor'), - ]) - - ->set('form.choice_list_factory.cached', CachingFactoryDecorator::class) - ->args([service('form.choice_list_factory.property_access')]) - ->tag('kernel.reset', ['method' => 'reset']) - - ->alias('form.choice_list_factory', 'form.choice_list_factory.cached') - - ->set('form.type.form', FormType::class) - ->args([service('form.property_accessor')]) - ->tag('form.type') - - ->set('form.type.choice', ChoiceType::class) - ->args([ - service('form.choice_list_factory'), - service('translator')->ignoreOnInvalid(), - ]) - ->tag('form.type') - - ->set('form.type.file', FileType::class) - ->public() - ->args([service('translator')->ignoreOnInvalid()]) - ->tag('form.type') - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->set('form.type.color', ColorType::class) - ->args([service('translator')->ignoreOnInvalid()]) - ->tag('form.type') - - ->set('form.type_extension.form.transformation_failure_handling', TransformationFailureExtension::class) - ->args([service('translator')->ignoreOnInvalid()]) - ->tag('form.type_extension', ['extended-type' => FormType::class]) - - ->set('form.type_extension.form.http_foundation', FormTypeHttpFoundationExtension::class) - ->args([service('form.type_extension.form.request_handler')]) - ->tag('form.type_extension') - - ->set('form.type_extension.form.request_handler', HttpFoundationRequestHandler::class) - ->args([service('form.server_params')]) - - ->set('form.server_params', ServerParams::class) - ->args([service('request_stack')]) - - ->set('form.type_extension.form.validator', FormTypeValidatorExtension::class) - ->args([ - service('validator'), - true, - service('twig.form.renderer')->ignoreOnInvalid(), - service('translator')->ignoreOnInvalid(), - ]) - ->tag('form.type_extension', ['extended-type' => FormType::class]) - - ->set('form.type_extension.repeated.validator', RepeatedTypeValidatorExtension::class) - ->tag('form.type_extension') - - ->set('form.type_extension.submit.validator', SubmitTypeValidatorExtension::class) - ->tag('form.type_extension', ['extended-type' => SubmitType::class]) - - ->set('form.type_extension.upload.validator', UploadValidatorExtension::class) - ->args([ - service('translator'), - param('validator.translation_domain'), - ]) - ->tag('form.type_extension') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/form_csrf.php b/lib/symfony/framework-bundle/Resources/config/form_csrf.php deleted file mode 100644 index c8e5e973e..000000000 --- a/lib/symfony/framework-bundle/Resources/config/form_csrf.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('form.type_extension.csrf', FormTypeCsrfExtension::class) - ->args([ - service('security.csrf.token_manager'), - param('form.type_extension.csrf.enabled'), - param('form.type_extension.csrf.field_name'), - service('translator')->nullOnInvalid(), - param('validator.translation_domain'), - service('form.server_params'), - ]) - ->tag('form.type_extension') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/form_debug.php b/lib/symfony/framework-bundle/Resources/config/form_debug.php deleted file mode 100644 index f5e2c3ecd..000000000 --- a/lib/symfony/framework-bundle/Resources/config/form_debug.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Form\Extension\DataCollector\FormDataCollector; -use Symfony\Component\Form\Extension\DataCollector\FormDataExtractor; -use Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeFactoryDataCollectorProxy; -use Symfony\Component\Form\Extension\DataCollector\Type\DataCollectorTypeExtension; -use Symfony\Component\Form\ResolvedFormTypeFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('form.resolved_type_factory', ResolvedTypeFactoryDataCollectorProxy::class) - ->args([ - inline_service(ResolvedFormTypeFactory::class), - service('data_collector.form'), - ]) - - ->set('form.type_extension.form.data_collector', DataCollectorTypeExtension::class) - ->args([service('data_collector.form')]) - ->tag('form.type_extension') - - ->set('data_collector.form.extractor', FormDataExtractor::class) - - ->set('data_collector.form', FormDataCollector::class) - ->args([service('data_collector.form.extractor')]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/form.html.twig', 'id' => 'form', 'priority' => 310]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/fragment_listener.php b/lib/symfony/framework-bundle/Resources/config/fragment_listener.php deleted file mode 100644 index 465c30426..000000000 --- a/lib/symfony/framework-bundle/Resources/config/fragment_listener.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\FragmentListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('fragment.listener', FragmentListener::class) - ->args([service('uri_signer'), param('fragment.path')]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/fragment_renderer.php b/lib/symfony/framework-bundle/Resources/config/fragment_renderer.php deleted file mode 100644 index 76f49c633..000000000 --- a/lib/symfony/framework-bundle/Resources/config/fragment_renderer.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler; -use Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer; -use Symfony\Component\HttpKernel\Fragment\FragmentUriGenerator; -use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface; -use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer; -use Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer; -use Symfony\Component\HttpKernel\Fragment\SsiFragmentRenderer; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('fragment.renderer.hinclude.global_template', null) - ->set('fragment.path', '/_fragment') - ; - - $container->services() - ->set('fragment.handler', LazyLoadingFragmentHandler::class) - ->args([ - abstract_arg('fragment renderer locator'), - service('request_stack'), - param('kernel.debug'), - ]) - - ->set('fragment.uri_generator', FragmentUriGenerator::class) - ->args([param('fragment.path'), service('uri_signer'), service('request_stack')]) - ->alias(FragmentUriGeneratorInterface::class, 'fragment.uri_generator') - - ->set('fragment.renderer.inline', InlineFragmentRenderer::class) - ->args([service('http_kernel'), service('event_dispatcher')]) - ->call('setFragmentPath', [param('fragment.path')]) - ->tag('kernel.fragment_renderer', ['alias' => 'inline']) - - ->set('fragment.renderer.hinclude', HIncludeFragmentRenderer::class) - ->args([ - service('twig')->nullOnInvalid(), - service('uri_signer'), - param('fragment.renderer.hinclude.global_template'), - ]) - ->call('setFragmentPath', [param('fragment.path')]) - - ->set('fragment.renderer.esi', EsiFragmentRenderer::class) - ->args([ - service('esi')->nullOnInvalid(), - service('fragment.renderer.inline'), - service('uri_signer'), - ]) - ->call('setFragmentPath', [param('fragment.path')]) - ->tag('kernel.fragment_renderer', ['alias' => 'esi']) - - ->set('fragment.renderer.ssi', SsiFragmentRenderer::class) - ->args([ - service('ssi')->nullOnInvalid(), - service('fragment.renderer.inline'), - service('uri_signer'), - ]) - ->call('setFragmentPath', [param('fragment.path')]) - ->tag('kernel.fragment_renderer', ['alias' => 'ssi']) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/http_client.php b/lib/symfony/framework-bundle/Resources/config/http_client.php deleted file mode 100644 index ba70b90ad..000000000 --- a/lib/symfony/framework-bundle/Resources/config/http_client.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Http\Client\ClientInterface; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Component\HttpClient\HttplugClient; -use Symfony\Component\HttpClient\Psr18Client; -use Symfony\Component\HttpClient\Retry\GenericRetryStrategy; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('http_client', HttpClientInterface::class) - ->factory([HttpClient::class, 'create']) - ->args([ - [], // default options - abstract_arg('max host connections'), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'http_client']) - ->tag('kernel.reset', ['method' => 'reset', 'on_invalid' => 'ignore']) - ->tag('http_client.client') - - ->alias(HttpClientInterface::class, 'http_client') - - ->set('psr18.http_client', Psr18Client::class) - ->args([ - service('http_client'), - service(ResponseFactoryInterface::class)->ignoreOnInvalid(), - service(StreamFactoryInterface::class)->ignoreOnInvalid(), - ]) - - ->alias(ClientInterface::class, 'psr18.http_client') - - ->set(\Http\Client\HttpClient::class, HttplugClient::class) - ->args([ - service('http_client'), - service(ResponseFactoryInterface::class)->ignoreOnInvalid(), - service(StreamFactoryInterface::class)->ignoreOnInvalid(), - ]) - - ->set('http_client.abstract_retry_strategy', GenericRetryStrategy::class) - ->abstract() - ->args([ - abstract_arg('http codes'), - abstract_arg('delay ms'), - abstract_arg('multiplier'), - abstract_arg('max delay ms'), - abstract_arg('jitter'), - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/http_client_debug.php b/lib/symfony/framework-bundle/Resources/config/http_client_debug.php deleted file mode 100644 index 44031eb5f..000000000 --- a/lib/symfony/framework-bundle/Resources/config/http_client_debug.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpClient\DataCollector\HttpClientDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('data_collector.http_client', HttpClientDataCollector::class) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/http_client.html.twig', - 'id' => 'http_client', - 'priority' => 250, - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/identity_translator.php b/lib/symfony/framework-bundle/Resources/config/identity_translator.php deleted file mode 100644 index a9066e1f0..000000000 --- a/lib/symfony/framework-bundle/Resources/config/identity_translator.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Translation\IdentityTranslator; -use Symfony\Contracts\Translation\TranslatorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translator', IdentityTranslator::class) - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - ->alias(TranslatorInterface::class, 'translator') - - ->set('identity_translator', IdentityTranslator::class) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/lock.php b/lib/symfony/framework-bundle/Resources/config/lock.php deleted file mode 100644 index 4e1463621..000000000 --- a/lib/symfony/framework-bundle/Resources/config/lock.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Lock\LockFactory; -use Symfony\Component\Lock\Store\CombinedStore; -use Symfony\Component\Lock\Strategy\ConsensusStrategy; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('lock.store.combined.abstract', CombinedStore::class)->abstract() - ->args([abstract_arg('List of stores'), service('lock.strategy.majority')]) - - ->set('lock.strategy.majority', ConsensusStrategy::class) - - ->set('lock.factory.abstract', LockFactory::class)->abstract() - ->args([abstract_arg('Store')]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'lock']) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/mailer.php b/lib/symfony/framework-bundle/Resources/config/mailer.php deleted file mode 100644 index b15b29270..000000000 --- a/lib/symfony/framework-bundle/Resources/config/mailer.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mailer\EventListener\EnvelopeListener; -use Symfony\Component\Mailer\EventListener\MessageListener; -use Symfony\Component\Mailer\EventListener\MessageLoggerListener; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Mailer\MailerInterface; -use Symfony\Component\Mailer\Messenger\MessageHandler; -use Symfony\Component\Mailer\Transport; -use Symfony\Component\Mailer\Transport\TransportInterface; -use Symfony\Component\Mailer\Transport\Transports; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mailer.mailer', Mailer::class) - ->args([ - service('mailer.transports'), - abstract_arg('message bus'), - service('event_dispatcher')->ignoreOnInvalid(), - ]) - ->alias('mailer', 'mailer.mailer') - ->alias(MailerInterface::class, 'mailer.mailer') - - ->set('mailer.transports', Transports::class) - ->factory([service('mailer.transport_factory'), 'fromStrings']) - ->args([ - abstract_arg('transports'), - ]) - - ->set('mailer.transport_factory', Transport::class) - ->args([ - tagged_iterator('mailer.transport_factory'), - ]) - - ->set('mailer.default_transport', TransportInterface::class) - ->factory([service('mailer.transport_factory'), 'fromString']) - ->args([ - abstract_arg('env(MAILER_DSN)'), - ]) - ->alias(TransportInterface::class, 'mailer.default_transport') - - ->set('mailer.messenger.message_handler', MessageHandler::class) - ->args([ - service('mailer.transports'), - ]) - ->tag('messenger.message_handler') - - ->set('mailer.envelope_listener', EnvelopeListener::class) - ->args([ - abstract_arg('sender'), - abstract_arg('recipients'), - ]) - ->tag('kernel.event_subscriber') - - ->set('mailer.message_listener', MessageListener::class) - ->args([ - abstract_arg('headers'), - ]) - ->tag('kernel.event_subscriber') - - ->set('mailer.logger_message_listener', MessageLoggerListener::class) - ->tag('kernel.event_subscriber') - ->tag('kernel.reset', ['method' => 'reset']) - ->deprecate('symfony/framework-bundle', '5.2', 'The "%service_id%" service is deprecated, use "mailer.message_logger_listener" instead.') - - ->set('mailer.message_logger_listener', MessageLoggerListener::class) - ->tag('kernel.event_subscriber') - ->tag('kernel.reset', ['method' => 'reset']) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/mailer_debug.php b/lib/symfony/framework-bundle/Resources/config/mailer_debug.php deleted file mode 100644 index cdb205750..000000000 --- a/lib/symfony/framework-bundle/Resources/config/mailer_debug.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mailer\DataCollector\MessageDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mailer.data_collector', MessageDataCollector::class) - ->args([ - service('mailer.message_logger_listener'), - ]) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/mailer.html.twig', - 'id' => 'mailer', - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/mailer_transports.php b/lib/symfony/framework-bundle/Resources/config/mailer_transports.php deleted file mode 100644 index 7bddfa756..000000000 --- a/lib/symfony/framework-bundle/Resources/config/mailer_transports.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory; -use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory; -use Symfony\Component\Mailer\Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory; -use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory; -use Symfony\Component\Mailer\Transport\AbstractTransportFactory; -use Symfony\Component\Mailer\Transport\NativeTransportFactory; -use Symfony\Component\Mailer\Transport\NullTransportFactory; -use Symfony\Component\Mailer\Transport\SendmailTransportFactory; -use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mailer.transport_factory.abstract', AbstractTransportFactory::class) - ->abstract() - ->args([ - service('event_dispatcher'), - service('http_client')->ignoreOnInvalid(), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'mailer']) - - ->set('mailer.transport_factory.amazon', SesTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.gmail', GmailTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.mailchimp', MandrillTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.mailjet', MailjetTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.mailgun', MailgunTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.postmark', PostmarkTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.sendgrid', SendgridTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.null', NullTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.sendmail', SendmailTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.sendinblue', SendinblueTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.ohmysmtp', OhMySmtpTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.smtp', EsmtpTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory', ['priority' => -100]) - - ->set('mailer.transport_factory.native', NativeTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory'); -}; diff --git a/lib/symfony/framework-bundle/Resources/config/messenger.php b/lib/symfony/framework-bundle/Resources/config/messenger.php deleted file mode 100644 index 813d50300..000000000 --- a/lib/symfony/framework-bundle/Resources/config/messenger.php +++ /dev/null @@ -1,215 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory; -use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory; -use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory; -use Symfony\Component\Messenger\Bridge\Redis\Transport\RedisTransportFactory; -use Symfony\Component\Messenger\EventListener\AddErrorDetailsStampListener; -use Symfony\Component\Messenger\EventListener\DispatchPcntlSignalListener; -use Symfony\Component\Messenger\EventListener\ResetServicesListener; -use Symfony\Component\Messenger\EventListener\SendFailedMessageForRetryListener; -use Symfony\Component\Messenger\EventListener\SendFailedMessageToFailureTransportListener; -use Symfony\Component\Messenger\EventListener\StopWorkerOnCustomStopExceptionListener; -use Symfony\Component\Messenger\EventListener\StopWorkerOnRestartSignalListener; -use Symfony\Component\Messenger\EventListener\StopWorkerOnSigtermSignalListener; -use Symfony\Component\Messenger\Middleware\AddBusNameStampMiddleware; -use Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware; -use Symfony\Component\Messenger\Middleware\FailedMessageProcessingMiddleware; -use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware; -use Symfony\Component\Messenger\Middleware\RejectRedeliveredMessageMiddleware; -use Symfony\Component\Messenger\Middleware\RouterContextMiddleware; -use Symfony\Component\Messenger\Middleware\SendMessageMiddleware; -use Symfony\Component\Messenger\Middleware\TraceableMiddleware; -use Symfony\Component\Messenger\Middleware\ValidationMiddleware; -use Symfony\Component\Messenger\Retry\MultiplierRetryStrategy; -use Symfony\Component\Messenger\RoutableMessageBus; -use Symfony\Component\Messenger\Transport\InMemoryTransportFactory; -use Symfony\Component\Messenger\Transport\Sender\SendersLocator; -use Symfony\Component\Messenger\Transport\Serialization\Normalizer\FlattenExceptionNormalizer; -use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer; -use Symfony\Component\Messenger\Transport\Serialization\Serializer; -use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface; -use Symfony\Component\Messenger\Transport\Sync\SyncTransportFactory; -use Symfony\Component\Messenger\Transport\TransportFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->alias(SerializerInterface::class, 'messenger.default_serializer') - - // Asynchronous - ->set('messenger.senders_locator', SendersLocator::class) - ->args([ - abstract_arg('per message senders map'), - abstract_arg('senders service locator'), - ]) - ->set('messenger.middleware.send_message', SendMessageMiddleware::class) - ->args([ - service('messenger.senders_locator'), - service('event_dispatcher'), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'messenger']) - - // Message encoding/decoding - ->set('messenger.transport.symfony_serializer', Serializer::class) - ->args([ - service('serializer'), - abstract_arg('format'), - abstract_arg('context'), - ]) - - ->set('serializer.normalizer.flatten_exception', FlattenExceptionNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -880]) - - ->set('messenger.transport.native_php_serializer', PhpSerializer::class) - - // Middleware - ->set('messenger.middleware.handle_message', HandleMessageMiddleware::class) - ->abstract() - ->args([ - abstract_arg('bus handler resolver'), - ]) - ->tag('monolog.logger', ['channel' => 'messenger']) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - - ->set('messenger.middleware.add_bus_name_stamp_middleware', AddBusNameStampMiddleware::class) - ->abstract() - - ->set('messenger.middleware.dispatch_after_current_bus', DispatchAfterCurrentBusMiddleware::class) - - ->set('messenger.middleware.validation', ValidationMiddleware::class) - ->args([ - service('validator'), - ]) - - ->set('messenger.middleware.reject_redelivered_message_middleware', RejectRedeliveredMessageMiddleware::class) - - ->set('messenger.middleware.failed_message_processing_middleware', FailedMessageProcessingMiddleware::class) - - ->set('messenger.middleware.traceable', TraceableMiddleware::class) - ->abstract() - ->args([ - service('debug.stopwatch'), - ]) - - ->set('messenger.middleware.router_context', RouterContextMiddleware::class) - ->args([ - service('router'), - ]) - - // Discovery - ->set('messenger.receiver_locator', ServiceLocator::class) - ->args([ - [], - ]) - ->tag('container.service_locator') - - // Transports - ->set('messenger.transport_factory', TransportFactory::class) - ->args([ - tagged_iterator('messenger.transport_factory'), - ]) - - ->set('messenger.transport.amqp.factory', AmqpTransportFactory::class) - - ->set('messenger.transport.redis.factory', RedisTransportFactory::class) - - ->set('messenger.transport.sync.factory', SyncTransportFactory::class) - ->args([ - service('messenger.routable_message_bus'), - ]) - ->tag('messenger.transport_factory') - - ->set('messenger.transport.in_memory.factory', InMemoryTransportFactory::class) - ->tag('messenger.transport_factory') - ->tag('kernel.reset', ['method' => 'reset']) - - ->set('messenger.transport.sqs.factory', AmazonSqsTransportFactory::class) - ->args([ - service('logger')->ignoreOnInvalid(), - ]) - - ->set('messenger.transport.beanstalkd.factory', BeanstalkdTransportFactory::class) - - // retry - ->set('messenger.retry_strategy_locator', ServiceLocator::class) - ->args([ - [], - ]) - ->tag('container.service_locator') - - ->set('messenger.retry.abstract_multiplier_retry_strategy', MultiplierRetryStrategy::class) - ->abstract() - ->args([ - abstract_arg('max retries'), - abstract_arg('delay ms'), - abstract_arg('multiplier'), - abstract_arg('max delay ms'), - ]) - - // worker event listener - ->set('messenger.retry.send_failed_message_for_retry_listener', SendFailedMessageForRetryListener::class) - ->args([ - abstract_arg('senders service locator'), - service('messenger.retry_strategy_locator'), - service('logger')->ignoreOnInvalid(), - service('event_dispatcher'), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('messenger.failure.add_error_details_stamp_listener', AddErrorDetailsStampListener::class) - ->tag('kernel.event_subscriber') - - ->set('messenger.failure.send_failed_message_to_failure_transport_listener', SendFailedMessageToFailureTransportListener::class) - ->args([ - abstract_arg('failure transports'), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('messenger.listener.dispatch_pcntl_signal_listener', DispatchPcntlSignalListener::class) - ->tag('kernel.event_subscriber') - - ->set('messenger.listener.stop_worker_on_restart_signal_listener', StopWorkerOnRestartSignalListener::class) - ->args([ - service('cache.messenger.restart_workers_signal'), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('messenger.listener.stop_worker_on_sigterm_signal_listener', StopWorkerOnSigtermSignalListener::class) - ->args([ - service('logger')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - - ->set('messenger.listener.stop_worker_on_stop_exception_listener', StopWorkerOnCustomStopExceptionListener::class) - ->tag('kernel.event_subscriber') - - ->set('messenger.listener.reset_services', ResetServicesListener::class) - ->args([ - service('services_resetter'), - ]) - - ->set('messenger.routable_message_bus', RoutableMessageBus::class) - ->args([ - abstract_arg('message bus locator'), - service('messenger.default_bus'), - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/messenger_debug.php b/lib/symfony/framework-bundle/Resources/config/messenger_debug.php deleted file mode 100644 index 58f9be1f9..000000000 --- a/lib/symfony/framework-bundle/Resources/config/messenger_debug.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Messenger\DataCollector\MessengerDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('data_collector.messenger', MessengerDataCollector::class) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/messenger.html.twig', - 'id' => 'messenger', - 'priority' => 100, - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/mime_type.php b/lib/symfony/framework-bundle/Resources/config/mime_type.php deleted file mode 100644 index a7e9bbd91..000000000 --- a/lib/symfony/framework-bundle/Resources/config/mime_type.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mime\MimeTypeGuesserInterface; -use Symfony\Component\Mime\MimeTypes; -use Symfony\Component\Mime\MimeTypesInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mime_types', MimeTypes::class) - ->call('setDefault', [service('mime_types')]) - - ->alias(MimeTypesInterface::class, 'mime_types') - ->alias(MimeTypeGuesserInterface::class, 'mime_types') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/notifier.php b/lib/symfony/framework-bundle/Resources/config/notifier.php deleted file mode 100644 index 73beb2c34..000000000 --- a/lib/symfony/framework-bundle/Resources/config/notifier.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Monolog\Handler\NotifierHandler; -use Symfony\Component\Notifier\Channel\BrowserChannel; -use Symfony\Component\Notifier\Channel\ChannelPolicy; -use Symfony\Component\Notifier\Channel\ChatChannel; -use Symfony\Component\Notifier\Channel\EmailChannel; -use Symfony\Component\Notifier\Channel\PushChannel; -use Symfony\Component\Notifier\Channel\SmsChannel; -use Symfony\Component\Notifier\Chatter; -use Symfony\Component\Notifier\ChatterInterface; -use Symfony\Component\Notifier\EventListener\NotificationLoggerListener; -use Symfony\Component\Notifier\EventListener\SendFailedMessageToNotifierListener; -use Symfony\Component\Notifier\Message\ChatMessage; -use Symfony\Component\Notifier\Message\PushMessage; -use Symfony\Component\Notifier\Message\SmsMessage; -use Symfony\Component\Notifier\Messenger\MessageHandler; -use Symfony\Component\Notifier\Notifier; -use Symfony\Component\Notifier\NotifierInterface; -use Symfony\Component\Notifier\Texter; -use Symfony\Component\Notifier\TexterInterface; -use Symfony\Component\Notifier\Transport; -use Symfony\Component\Notifier\Transport\Transports; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('notifier', Notifier::class) - ->args([tagged_locator('notifier.channel', 'channel'), service('notifier.channel_policy')->ignoreOnInvalid()]) - - ->alias(NotifierInterface::class, 'notifier') - - ->set('notifier.channel_policy', ChannelPolicy::class) - ->args([[]]) - - ->set('notifier.channel.browser', BrowserChannel::class) - ->args([service('request_stack')]) - ->tag('notifier.channel', ['channel' => 'browser']) - - ->set('notifier.channel.chat', ChatChannel::class) - ->args([service('chatter.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'chat']) - - ->set('notifier.channel.sms', SmsChannel::class) - ->args([service('texter.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'sms']) - - ->set('notifier.channel.email', EmailChannel::class) - ->args([service('mailer.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'email']) - - ->set('notifier.channel.push', PushChannel::class) - ->args([service('texter.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'push']) - - ->set('notifier.monolog_handler', NotifierHandler::class) - ->args([service('notifier')]) - - ->set('notifier.failed_message_listener', SendFailedMessageToNotifierListener::class) - ->args([service('notifier')]) - - ->set('chatter', Chatter::class) - ->args([ - service('chatter.transports'), - service('messenger.default_bus')->ignoreOnInvalid(), - service('event_dispatcher')->ignoreOnInvalid(), - ]) - - ->alias(ChatterInterface::class, 'chatter') - - ->set('chatter.transports', Transports::class) - ->factory([service('chatter.transport_factory'), 'fromStrings']) - ->args([[]]) - - ->set('chatter.transport_factory', Transport::class) - ->args([tagged_iterator('chatter.transport_factory')]) - - ->set('chatter.messenger.chat_handler', MessageHandler::class) - ->args([service('chatter.transports')]) - ->tag('messenger.message_handler', ['handles' => ChatMessage::class]) - - ->set('texter', Texter::class) - ->args([ - service('texter.transports'), - service('messenger.default_bus')->ignoreOnInvalid(), - service('event_dispatcher')->ignoreOnInvalid(), - ]) - - ->alias(TexterInterface::class, 'texter') - - ->set('texter.transports', Transports::class) - ->factory([service('texter.transport_factory'), 'fromStrings']) - ->args([[]]) - - ->set('texter.transport_factory', Transport::class) - ->args([tagged_iterator('texter.transport_factory')]) - - ->set('texter.messenger.sms_handler', MessageHandler::class) - ->args([service('texter.transports')]) - ->tag('messenger.message_handler', ['handles' => SmsMessage::class]) - - ->set('texter.messenger.push_handler', MessageHandler::class) - ->args([service('texter.transports')]) - ->tag('messenger.message_handler', ['handles' => PushMessage::class]) - - ->set('notifier.logger_notification_listener', NotificationLoggerListener::class) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/notifier_debug.php b/lib/symfony/framework-bundle/Resources/config/notifier_debug.php deleted file mode 100644 index 6147d34e4..000000000 --- a/lib/symfony/framework-bundle/Resources/config/notifier_debug.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Notifier\DataCollector\NotificationDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('notifier.data_collector', NotificationDataCollector::class) - ->args([service('notifier.logger_notification_listener')]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/notifier.html.twig', 'id' => 'notifier']) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/notifier_transports.php b/lib/symfony/framework-bundle/Resources/config/notifier_transports.php deleted file mode 100644 index c07028847..000000000 --- a/lib/symfony/framework-bundle/Resources/config/notifier_transports.php +++ /dev/null @@ -1,277 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; -use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; -use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; -use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; -use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory; -use Symfony\Component\Notifier\Bridge\Expo\ExpoTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\Firebase\FirebaseTransportFactory; -use Symfony\Component\Notifier\Bridge\FreeMobile\FreeMobileTransportFactory; -use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransportFactory; -use Symfony\Component\Notifier\Bridge\Gitter\GitterTransportFactory; -use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Infobip\InfobipTransportFactory; -use Symfony\Component\Notifier\Bridge\Iqsms\IqsmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LightSms\LightSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInTransportFactory; -use Symfony\Component\Notifier\Bridge\Mailjet\MailjetTransportFactory; -use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransportFactory; -use Symfony\Component\Notifier\Bridge\Mercure\MercureTransportFactory; -use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdTransportFactory; -use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaTransportFactory; -use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransportFactory; -use Symfony\Component\Notifier\Bridge\Mobyt\MobytTransportFactory; -use Symfony\Component\Notifier\Bridge\Nexmo\NexmoTransportFactory; -use Symfony\Component\Notifier\Bridge\Octopush\OctopushTransportFactory; -use Symfony\Component\Notifier\Bridge\OneSignal\OneSignalTransportFactory; -use Symfony\Component\Notifier\Bridge\OvhCloud\OvhCloudTransportFactory; -use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Sendinblue\SendinblueTransportFactory; -use Symfony\Component\Notifier\Bridge\Sinch\SinchTransportFactory; -use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory; -use Symfony\Component\Notifier\Bridge\Sms77\Sms77TransportFactory; -use Symfony\Component\Notifier\Bridge\Smsapi\SmsapiTransportFactory; -use Symfony\Component\Notifier\Bridge\SmsBiuras\SmsBiurasTransportFactory; -use Symfony\Component\Notifier\Bridge\Smsc\SmscTransportFactory; -use Symfony\Component\Notifier\Bridge\SpotHit\SpotHitTransportFactory; -use Symfony\Component\Notifier\Bridge\Telegram\TelegramTransportFactory; -use Symfony\Component\Notifier\Bridge\Telnyx\TelnyxTransportFactory; -use Symfony\Component\Notifier\Bridge\TurboSms\TurboSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\Twilio\TwilioTransportFactory; -use Symfony\Component\Notifier\Bridge\Vonage\VonageTransportFactory; -use Symfony\Component\Notifier\Bridge\Yunpian\YunpianTransportFactory; -use Symfony\Component\Notifier\Bridge\Zulip\ZulipTransportFactory; -use Symfony\Component\Notifier\Transport\AbstractTransportFactory; -use Symfony\Component\Notifier\Transport\NullTransportFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->alias('notifier.transport_factory.allmysms', 'notifier.transport_factory.all-my-sms') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.all-my-sms" instead.') - ->alias('notifier.transport_factory.fakechat', 'notifier.transport_factory.fake-chat') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.fake-chat" instead.') - ->alias('notifier.transport_factory.fakesms', 'notifier.transport_factory.fake-sms') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.fake-sms" instead.') - ->alias('notifier.transport_factory.freemobile', 'notifier.transport_factory.free-mobile') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.free-mobile" instead.') - ->alias('notifier.transport_factory.gatewayapi', 'notifier.transport_factory.gateway-api') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.gateway-api" instead.') - ->alias('notifier.transport_factory.googlechat', 'notifier.transport_factory.google-chat') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.google-chat" instead.') - ->alias('notifier.transport_factory.lightsms', 'notifier.transport_factory.light-sms') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.light-sms" instead.') - ->alias('notifier.transport_factory.linkedin', 'notifier.transport_factory.linked-in') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.linked-in" instead.') - ->alias('notifier.transport_factory.microsoftteams', 'notifier.transport_factory.microsoft-teams') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.microsoft-teams" instead.') - ->alias('notifier.transport_factory.onesignal', 'notifier.transport_factory.one-signal') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.one-signal" instead.') - ->alias('notifier.transport_factory.ovhcloud', 'notifier.transport_factory.ovh-cloud') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.ovh-cloud" instead.') - ->alias('notifier.transport_factory.rocketchat', 'notifier.transport_factory.rocket-chat') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.rocket-chat" instead.') - ->alias('notifier.transport_factory.spothit', 'notifier.transport_factory.spot-hit') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.spot-hit" instead.') - - ->set('notifier.transport_factory.abstract', AbstractTransportFactory::class) - ->abstract() - ->args([service('event_dispatcher'), service('http_client')->ignoreOnInvalid()]) - - ->set('notifier.transport_factory.slack', SlackTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.linked-in', LinkedInTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.telegram', TelegramTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.mattermost', MattermostTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.nexmo', NexmoTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%service_id% service is deprecated, use "notifier.transport_factory.vonage" instead.') - - ->set('notifier.transport_factory.vonage', VonageTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.rocket-chat', RocketChatTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.google-chat', GoogleChatTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.twilio', TwilioTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.all-my-sms', AllMySmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.firebase', FirebaseTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.free-mobile', FreeMobileTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.spot-hit', SpotHitTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.fake-chat', FakeChatTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.fake-sms', FakeSmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.ovh-cloud', OvhCloudTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sinch', SinchTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.zulip', ZulipTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.infobip', InfobipTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.mobyt', MobytTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.smsapi', SmsapiTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.esendex', EsendexTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sendinblue', SendinblueTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.iqsms', IqsmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.octopush', OctopushTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.discord', DiscordTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.microsoft-teams', MicrosoftTeamsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.gateway-api', GatewayApiTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.mercure', MercureTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.gitter', GitterTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.clickatell', ClickatellTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.amazon-sns', AmazonSnsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.null', NullTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.light-sms', LightSmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sms-biuras', SmsBiurasTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.smsc', SmscTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.message-bird', MessageBirdTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.message-media', MessageMediaTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.telnyx', TelnyxTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.mailjet', MailjetTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.yunpian', YunpianTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.turbo-sms', TurboSmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sms77', Sms77TransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.one-signal', OneSignalTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.expo', ExpoTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/profiling.php b/lib/symfony/framework-bundle/Resources/config/profiling.php deleted file mode 100644 index 221217896..000000000 --- a/lib/symfony/framework-bundle/Resources/config/profiling.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\ProfilerListener; -use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage; -use Symfony\Component\HttpKernel\Profiler\Profiler; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('profiler', Profiler::class) - ->public() - ->args([service('profiler.storage'), service('logger')->nullOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'profiler']) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.4']) - - ->set('profiler.storage', FileProfilerStorage::class) - ->args([param('profiler.storage.dsn')]) - - ->set('profiler_listener', ProfilerListener::class) - ->args([ - service('profiler'), - service('request_stack'), - null, - param('profiler_listener.only_exceptions'), - param('profiler_listener.only_main_requests'), - ]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/property_access.php b/lib/symfony/framework-bundle/Resources/config/property_access.php deleted file mode 100644 index 85ab9f18e..000000000 --- a/lib/symfony/framework-bundle/Resources/config/property_access.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\PropertyAccess\PropertyAccessor; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('property_accessor', PropertyAccessor::class) - ->args([ - abstract_arg('magic methods allowed, set by the extension'), - abstract_arg('throw exceptions, set by the extension'), - service('cache.property_access')->ignoreOnInvalid(), - abstract_arg('propertyReadInfoExtractor, set by the extension'), - abstract_arg('propertyWriteInfoExtractor, set by the extension'), - ]) - - ->alias(PropertyAccessorInterface::class, 'property_accessor') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/property_info.php b/lib/symfony/framework-bundle/Resources/config/property_info.php deleted file mode 100644 index 90587839d..000000000 --- a/lib/symfony/framework-bundle/Resources/config/property_info.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; -use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInfoCacheExtractor; -use Symfony\Component\PropertyInfo\PropertyInfoExtractor; -use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('property_info', PropertyInfoExtractor::class) - ->args([[], [], [], [], []]) - - ->alias(PropertyAccessExtractorInterface::class, 'property_info') - ->alias(PropertyDescriptionExtractorInterface::class, 'property_info') - ->alias(PropertyInfoExtractorInterface::class, 'property_info') - ->alias(PropertyTypeExtractorInterface::class, 'property_info') - ->alias(PropertyListExtractorInterface::class, 'property_info') - ->alias(PropertyInitializableExtractorInterface::class, 'property_info') - - ->set('property_info.cache', PropertyInfoCacheExtractor::class) - ->decorate('property_info') - ->args([service('property_info.cache.inner'), service('cache.property_info')]) - - // Extractor - ->set('property_info.reflection_extractor', ReflectionExtractor::class) - ->tag('property_info.list_extractor', ['priority' => -1000]) - ->tag('property_info.type_extractor', ['priority' => -1002]) - ->tag('property_info.access_extractor', ['priority' => -1000]) - ->tag('property_info.initializable_extractor', ['priority' => -1000]) - - ->alias(PropertyReadInfoExtractorInterface::class, 'property_info.reflection_extractor') - ->alias(PropertyWriteInfoExtractorInterface::class, 'property_info.reflection_extractor') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/rate_limiter.php b/lib/symfony/framework-bundle/Resources/config/rate_limiter.php deleted file mode 100644 index 727a1f636..000000000 --- a/lib/symfony/framework-bundle/Resources/config/rate_limiter.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\RateLimiter\RateLimiterFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('cache.rate_limiter') - ->parent('cache.app') - ->tag('cache.pool') - - ->set('limiter', RateLimiterFactory::class) - ->abstract() - ->args([ - abstract_arg('config'), - abstract_arg('storage'), - null, - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/request.php b/lib/symfony/framework-bundle/Resources/config/request.php deleted file mode 100644 index ef8fc9a5e..000000000 --- a/lib/symfony/framework-bundle/Resources/config/request.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('request.add_request_formats_listener', AddRequestFormatsListener::class) - ->args([abstract_arg('formats')]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/routing.php b/lib/symfony/framework-bundle/Resources/config/routing.php deleted file mode 100644 index 09e340ff8..000000000 --- a/lib/symfony/framework-bundle/Resources/config/routing.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer; -use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; -use Symfony\Bundle\FrameworkBundle\Controller\TemplateController; -use Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader; -use Symfony\Bundle\FrameworkBundle\Routing\RedirectableCompiledUrlMatcher; -use Symfony\Bundle\FrameworkBundle\Routing\Router; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\HttpKernel\EventListener\RouterListener; -use Symfony\Component\Routing\Generator\CompiledUrlGenerator; -use Symfony\Component\Routing\Generator\Dumper\CompiledUrlGeneratorDumper; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\Loader\ContainerLoader; -use Symfony\Component\Routing\Loader\DirectoryLoader; -use Symfony\Component\Routing\Loader\GlobFileLoader; -use Symfony\Component\Routing\Loader\PhpFileLoader; -use Symfony\Component\Routing\Loader\XmlFileLoader; -use Symfony\Component\Routing\Loader\YamlFileLoader; -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper; -use Symfony\Component\Routing\Matcher\ExpressionLanguageProvider; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RequestContextAwareInterface; -use Symfony\Component\Routing\RouterInterface; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('router.request_context.host', 'localhost') - ->set('router.request_context.scheme', 'http') - ->set('router.request_context.base_url', '') - ; - - $container->services() - ->set('routing.resolver', LoaderResolver::class) - - ->set('routing.loader.xml', XmlFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.yml', YamlFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.php', PhpFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.glob', GlobFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.directory', DirectoryLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.container', ContainerLoader::class) - ->args([ - tagged_locator('routing.route_loader'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader', DelegatingLoader::class) - ->public() - ->args([ - service('routing.resolver'), - [], // Default options - [], // Default requirements - ]) - - ->set('router.default', Router::class) - ->args([ - service(ContainerInterface::class), - param('router.resource'), - [ - 'cache_dir' => param('kernel.cache_dir'), - 'debug' => param('kernel.debug'), - 'generator_class' => CompiledUrlGenerator::class, - 'generator_dumper_class' => CompiledUrlGeneratorDumper::class, - 'matcher_class' => RedirectableCompiledUrlMatcher::class, - 'matcher_dumper_class' => CompiledUrlMatcherDumper::class, - ], - service('router.request_context')->ignoreOnInvalid(), - service('parameter_bag')->ignoreOnInvalid(), - service('logger')->ignoreOnInvalid(), - param('kernel.default_locale'), - ]) - ->call('setConfigCacheFactory', [ - service('config_cache_factory'), - ]) - ->tag('monolog.logger', ['channel' => 'router']) - ->tag('container.service_subscriber', ['id' => 'routing.loader']) - ->alias('router', 'router.default') - ->public() - ->alias(RouterInterface::class, 'router') - ->alias(UrlGeneratorInterface::class, 'router') - ->alias(UrlMatcherInterface::class, 'router') - ->alias(RequestContextAwareInterface::class, 'router') - - ->set('router.request_context', RequestContext::class) - ->factory([RequestContext::class, 'fromUri']) - ->args([ - param('router.request_context.base_url'), - param('router.request_context.host'), - param('router.request_context.scheme'), - param('request_listener.http_port'), - param('request_listener.https_port'), - ]) - ->call('setParameter', [ - '_functions', - service('router.expression_language_provider')->ignoreOnInvalid(), - ]) - ->alias(RequestContext::class, 'router.request_context') - - ->set('router.expression_language_provider', ExpressionLanguageProvider::class) - ->args([ - tagged_locator('routing.expression_language_function', 'function'), - ]) - ->tag('routing.expression_language_provider') - - ->set('router.cache_warmer', RouterCacheWarmer::class) - ->args([service(ContainerInterface::class)]) - ->tag('container.service_subscriber', ['id' => 'router']) - ->tag('kernel.cache_warmer') - - ->set('router_listener', RouterListener::class) - ->args([ - service('router'), - service('request_stack'), - service('router.request_context')->ignoreOnInvalid(), - service('logger')->ignoreOnInvalid(), - param('kernel.project_dir'), - param('kernel.debug'), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'request']) - - ->set(RedirectController::class) - ->public() - ->args([ - service('router'), - inline_service('int') - ->factory([service('router.request_context'), 'getHttpPort']), - inline_service('int') - ->factory([service('router.request_context'), 'getHttpsPort']), - ]) - - ->set(TemplateController::class) - ->args([ - service('twig')->ignoreOnInvalid(), - ]) - ->public() - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/routing/errors.xml b/lib/symfony/framework-bundle/Resources/config/routing/errors.xml deleted file mode 100644 index 13a9cc407..000000000 --- a/lib/symfony/framework-bundle/Resources/config/routing/errors.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - error_controller::preview - html - \d+ - - diff --git a/lib/symfony/framework-bundle/Resources/config/schema/symfony-1.0.xsd b/lib/symfony/framework-bundle/Resources/config/schema/symfony-1.0.xsd deleted file mode 100644 index d4be9fb6f..000000000 --- a/lib/symfony/framework-bundle/Resources/config/schema/symfony-1.0.xsd +++ /dev/null @@ -1,829 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/symfony/framework-bundle/Resources/config/secrets.php b/lib/symfony/framework-bundle/Resources/config/secrets.php deleted file mode 100644 index a21d28270..000000000 --- a/lib/symfony/framework-bundle/Resources/config/secrets.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault; -use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('secrets.vault', SodiumVault::class) - ->args([ - abstract_arg('Secret dir, set in FrameworkExtension'), - service('secrets.decryption_key')->ignoreOnInvalid(), - ]) - ->tag('container.env_var_loader') - - ->set('secrets.decryption_key') - ->parent('container.env') - ->args([abstract_arg('Decryption env var, set in FrameworkExtension')]) - - ->set('secrets.local_vault', DotenvVault::class) - ->args([abstract_arg('.env file path, set in FrameworkExtension')]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/security_csrf.php b/lib/symfony/framework-bundle/Resources/config/security_csrf.php deleted file mode 100644 index 9644d5b44..000000000 --- a/lib/symfony/framework-bundle/Resources/config/security_csrf.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Extension\CsrfExtension; -use Symfony\Bridge\Twig\Extension\CsrfRuntime; -use Symfony\Component\Security\Csrf\CsrfTokenManager; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface; -use Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator; -use Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage; -use Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.csrf.token_generator', UriSafeTokenGenerator::class) - - ->alias(TokenGeneratorInterface::class, 'security.csrf.token_generator') - - ->set('security.csrf.token_storage', SessionTokenStorage::class) - ->args([service('request_stack')]) - - ->alias(TokenStorageInterface::class, 'security.csrf.token_storage') - - ->set('security.csrf.token_manager', CsrfTokenManager::class) - ->public() - ->args([ - service('security.csrf.token_generator'), - service('security.csrf.token_storage'), - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->alias(CsrfTokenManagerInterface::class, 'security.csrf.token_manager') - - ->set('twig.runtime.security_csrf', CsrfRuntime::class) - ->args([service('security.csrf.token_manager')]) - ->tag('twig.runtime') - - ->set('twig.extension.security_csrf', CsrfExtension::class) - ->tag('twig.extension') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/serializer.php b/lib/symfony/framework-bundle/Resources/config/serializer.php deleted file mode 100644 index ca0cf9b53..000000000 --- a/lib/symfony/framework-bundle/Resources/config/serializer.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer; -use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor; -use Symfony\Component\Serializer\Encoder\CsvEncoder; -use Symfony\Component\Serializer\Encoder\DecoderInterface; -use Symfony\Component\Serializer\Encoder\EncoderInterface; -use Symfony\Component\Serializer\Encoder\JsonEncoder; -use Symfony\Component\Serializer\Encoder\XmlEncoder; -use Symfony\Component\Serializer\Encoder\YamlEncoder; -use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata; -use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface; -use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; -use Symfony\Component\Serializer\Mapping\Loader\LoaderChain; -use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; -use Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter; -use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; -use Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer; -use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer; -use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; -use Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer; -use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; -use Symfony\Component\Serializer\Normalizer\DateTimeZoneNormalizer; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; -use Symfony\Component\Serializer\Normalizer\FormErrorNormalizer; -use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer; -use Symfony\Component\Serializer\Normalizer\MimeMessageNormalizer; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; -use Symfony\Component\Serializer\Normalizer\ProblemNormalizer; -use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; -use Symfony\Component\Serializer\Normalizer\UidNormalizer; -use Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer; -use Symfony\Component\Serializer\Serializer; -use Symfony\Component\Serializer\SerializerInterface; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('serializer.mapping.cache.file', '%kernel.cache_dir%/serialization.php') - ; - - $container->services() - ->set('serializer', Serializer::class) - ->public() - ->args([[], []]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->alias(SerializerInterface::class, 'serializer') - ->alias(NormalizerInterface::class, 'serializer') - ->alias(DenormalizerInterface::class, 'serializer') - ->alias(EncoderInterface::class, 'serializer') - ->alias(DecoderInterface::class, 'serializer') - - ->alias('serializer.property_accessor', 'property_accessor') - - // Discriminator Map - ->set('serializer.mapping.class_discriminator_resolver', ClassDiscriminatorFromClassMetadata::class) - ->args([service('serializer.mapping.class_metadata_factory')]) - - ->alias(ClassDiscriminatorResolverInterface::class, 'serializer.mapping.class_discriminator_resolver') - - // Normalizer - ->set('serializer.normalizer.constraint_violation_list', ConstraintViolationListNormalizer::class) - ->args([1 => service('serializer.name_converter.metadata_aware')]) - ->autowire(true) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.mime_message', MimeMessageNormalizer::class) - ->args([service('serializer.normalizer.property')]) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.datetimezone', DateTimeZoneNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.dateinterval', DateIntervalNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.data_uri', DataUriNormalizer::class) - ->args([service('mime_types')->nullOnInvalid()]) - ->tag('serializer.normalizer', ['priority' => -920]) - - ->set('serializer.normalizer.datetime', DateTimeNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -910]) - - ->set('serializer.normalizer.json_serializable', JsonSerializableNormalizer::class) - ->args([null, null]) - ->tag('serializer.normalizer', ['priority' => -950]) - - ->set('serializer.normalizer.problem', ProblemNormalizer::class) - ->args([param('kernel.debug')]) - ->tag('serializer.normalizer', ['priority' => -890]) - - ->set('serializer.denormalizer.unwrapping', UnwrappingDenormalizer::class) - ->args([service('serializer.property_accessor')]) - ->tag('serializer.normalizer', ['priority' => 1000]) - - ->set('serializer.normalizer.uid', UidNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -890]) - - ->set('serializer.normalizer.form_error', FormErrorNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.object', ObjectNormalizer::class) - ->args([ - service('serializer.mapping.class_metadata_factory'), - service('serializer.name_converter.metadata_aware'), - service('serializer.property_accessor'), - service('property_info')->ignoreOnInvalid(), - service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), - null, - ]) - ->tag('serializer.normalizer', ['priority' => -1000]) - - ->alias(ObjectNormalizer::class, 'serializer.normalizer.object') - - ->set('serializer.normalizer.property', PropertyNormalizer::class) - ->args([ - service('serializer.mapping.class_metadata_factory'), - service('serializer.name_converter.metadata_aware'), - service('property_info')->ignoreOnInvalid(), - service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), - null, - ]) - - ->alias(PropertyNormalizer::class, 'serializer.normalizer.property') - - ->set('serializer.denormalizer.array', ArrayDenormalizer::class) - ->tag('serializer.normalizer', ['priority' => -990]) - - // Loader - ->set('serializer.mapping.chain_loader', LoaderChain::class) - ->args([[]]) - - // Class Metadata Factory - ->set('serializer.mapping.class_metadata_factory', ClassMetadataFactory::class) - ->args([service('serializer.mapping.chain_loader')]) - - ->alias(ClassMetadataFactoryInterface::class, 'serializer.mapping.class_metadata_factory') - - // Cache - ->set('serializer.mapping.cache_warmer', SerializerCacheWarmer::class) - ->args([abstract_arg('The serializer metadata loaders'), param('serializer.mapping.cache.file')]) - ->tag('kernel.cache_warmer') - - ->set('serializer.mapping.cache.symfony', CacheItemPoolInterface::class) - ->factory([PhpArrayAdapter::class, 'create']) - ->args([param('serializer.mapping.cache.file'), service('cache.serializer')]) - - ->set('serializer.mapping.cache_class_metadata_factory', CacheClassMetadataFactory::class) - ->decorate('serializer.mapping.class_metadata_factory') - ->args([ - service('serializer.mapping.cache_class_metadata_factory.inner'), - service('serializer.mapping.cache.symfony'), - ]) - - // Encoders - ->set('serializer.encoder.xml', XmlEncoder::class) - ->tag('serializer.encoder') - - ->set('serializer.encoder.json', JsonEncoder::class) - ->args([null, null]) - ->tag('serializer.encoder') - - ->set('serializer.encoder.yaml', YamlEncoder::class) - ->args([null, null]) - ->tag('serializer.encoder') - - ->set('serializer.encoder.csv', CsvEncoder::class) - ->tag('serializer.encoder') - - // Name converter - ->set('serializer.name_converter.camel_case_to_snake_case', CamelCaseToSnakeCaseNameConverter::class) - - ->set('serializer.name_converter.metadata_aware', MetadataAwareNameConverter::class) - ->args([service('serializer.mapping.class_metadata_factory')]) - - // PropertyInfo extractor - ->set('property_info.serializer_extractor', SerializerExtractor::class) - ->args([service('serializer.mapping.class_metadata_factory')]) - ->tag('property_info.list_extractor', ['priority' => -999]) - - // ErrorRenderer integration - ->alias('error_renderer', 'error_renderer.serializer') - ->alias('error_renderer.serializer', 'error_handler.error_renderer.serializer') - - ->set('error_handler.error_renderer.serializer', SerializerErrorRenderer::class) - ->args([ - service('serializer'), - inline_service() - ->factory([SerializerErrorRenderer::class, 'getPreferredFormat']) - ->args([service('request_stack')]), - service('error_renderer.html'), - inline_service() - ->factory([HtmlErrorRenderer::class, 'isDebug']) - ->args([service('request_stack'), param('kernel.debug')]), - ]) - ; - - if (interface_exists(\BackedEnum::class)) { - $container->services() - ->set('serializer.normalizer.backed_enum', BackedEnumNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - ; - } -}; diff --git a/lib/symfony/framework-bundle/Resources/config/services.php b/lib/symfony/framework-bundle/Resources/config/services.php deleted file mode 100644 index a26dfb5ad..000000000 --- a/lib/symfony/framework-bundle/Resources/config/services.php +++ /dev/null @@ -1,218 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\CacheWarmer\ConfigBuilderCacheWarmer; -use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache; -use Symfony\Component\Config\Resource\SelfCheckingResourceChecker; -use Symfony\Component\Config\ResourceCheckerConfigCacheFactory; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker; -use Symfony\Component\DependencyInjection\EnvVarProcessor; -use Symfony\Component\DependencyInjection\ParameterBag\ContainerBag; -use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcherInterfaceComponentAlias; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\UrlHelper; -use Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate; -use Symfony\Component\HttpKernel\Config\FileLocator; -use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; -use Symfony\Component\HttpKernel\EventListener\LocaleAwareListener; -use Symfony\Component\HttpKernel\HttpCache\Store; -use Symfony\Component\HttpKernel\HttpCache\StoreInterface; -use Symfony\Component\HttpKernel\HttpKernel; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\HttpKernel\UriSigner; -use Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner; -use Symfony\Component\Runtime\Runner\Symfony\ResponseRunner; -use Symfony\Component\Runtime\SymfonyRuntime; -use Symfony\Component\String\LazyString; -use Symfony\Component\String\Slugger\AsciiSlugger; -use Symfony\Component\String\Slugger\SluggerInterface; -use Symfony\Component\Workflow\WorkflowEvents; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -return static function (ContainerConfigurator $container) { - // this parameter is used at compile time in RegisterListenersPass - $container->parameters()->set('event_dispatcher.event_aliases', array_merge( - class_exists(ConsoleEvents::class) ? ConsoleEvents::ALIASES : [], - class_exists(FormEvents::class) ? FormEvents::ALIASES : [], - KernelEvents::ALIASES, - class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : [] - )); - - $container->services() - - ->set('parameter_bag', ContainerBag::class) - ->args([ - service('service_container'), - ]) - ->alias(ContainerBagInterface::class, 'parameter_bag') - ->alias(ParameterBagInterface::class, 'parameter_bag') - - ->set('event_dispatcher', EventDispatcher::class) - ->public() - ->tag('container.hot_path') - ->tag('event_dispatcher.dispatcher', ['name' => 'event_dispatcher']) - ->alias(EventDispatcherInterfaceComponentAlias::class, 'event_dispatcher') - ->alias(EventDispatcherInterface::class, 'event_dispatcher') - - ->set('http_kernel', HttpKernel::class) - ->public() - ->args([ - service('event_dispatcher'), - service('controller_resolver'), - service('request_stack'), - service('argument_resolver'), - ]) - ->tag('container.hot_path') - ->tag('container.preload', ['class' => HttpKernelRunner::class]) - ->tag('container.preload', ['class' => ResponseRunner::class]) - ->tag('container.preload', ['class' => SymfonyRuntime::class]) - ->alias(HttpKernelInterface::class, 'http_kernel') - - ->set('request_stack', RequestStack::class) - ->public() - ->alias(RequestStack::class, 'request_stack') - - ->set('http_cache', HttpCache::class) - ->args([ - service('kernel'), - service('http_cache.store'), - service('esi')->nullOnInvalid(), - abstract_arg('options'), - ]) - ->tag('container.hot_path') - - ->set('http_cache.store', Store::class) - ->args([ - param('kernel.cache_dir').'/http_cache', - ]) - ->alias(StoreInterface::class, 'http_cache.store') - - ->set('url_helper', UrlHelper::class) - ->args([ - service('request_stack'), - service('router.request_context')->ignoreOnInvalid(), - ]) - ->alias(UrlHelper::class, 'url_helper') - - ->set('cache_warmer', CacheWarmerAggregate::class) - ->public() - ->args([ - tagged_iterator('kernel.cache_warmer'), - param('kernel.debug'), - sprintf('%s/%sDeprecations.log', param('kernel.build_dir'), param('kernel.container_class')), - ]) - ->tag('container.no_preload') - - ->set('cache_clearer', ChainCacheClearer::class) - ->public() - ->args([ - tagged_iterator('kernel.cache_clearer'), - ]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->set('kernel') - ->synthetic() - ->public() - ->alias(KernelInterface::class, 'kernel') - - ->set('filesystem', Filesystem::class) - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - ->alias(Filesystem::class, 'filesystem') - - ->set('file_locator', FileLocator::class) - ->args([ - service('kernel'), - ]) - ->alias(FileLocator::class, 'file_locator') - - ->set('uri_signer', UriSigner::class) - ->args([ - param('kernel.secret'), - ]) - ->alias(UriSigner::class, 'uri_signer') - - ->set('config_cache_factory', ResourceCheckerConfigCacheFactory::class) - ->args([ - tagged_iterator('config_cache.resource_checker'), - ]) - - ->set('dependency_injection.config.container_parameters_resource_checker', ContainerParametersResourceChecker::class) - ->args([ - service('service_container'), - ]) - ->tag('config_cache.resource_checker', ['priority' => -980]) - - ->set('config.resource.self_checking_resource_checker', SelfCheckingResourceChecker::class) - ->tag('config_cache.resource_checker', ['priority' => -990]) - - ->set('services_resetter', ServicesResetter::class) - ->public() - - ->set('reverse_container', ReverseContainer::class) - ->args([ - service('service_container'), - service_locator([]), - ]) - ->alias(ReverseContainer::class, 'reverse_container') - - ->set('locale_aware_listener', LocaleAwareListener::class) - ->args([ - [], // locale aware services - service('request_stack'), - ]) - ->tag('kernel.event_subscriber') - - ->set('container.env_var_processor', EnvVarProcessor::class) - ->args([ - service('service_container'), - tagged_iterator('container.env_var_loader'), - ]) - ->tag('container.env_var_processor') - - ->set('slugger', AsciiSlugger::class) - ->args([ - param('kernel.default_locale'), - ]) - ->tag('kernel.locale_aware') - ->alias(SluggerInterface::class, 'slugger') - - ->set('container.getenv', \Closure::class) - ->factory([\Closure::class, 'fromCallable']) - ->args([ - [service('service_container'), 'getEnv'], - ]) - ->tag('routing.expression_language_function', ['function' => 'env']) - - // inherit from this service to lazily access env vars - ->set('container.env', LazyString::class) - ->abstract() - ->factory([LazyString::class, 'fromCallable']) - ->args([ - service('container.getenv'), - ]) - ->set('config_builder.warmer', ConfigBuilderCacheWarmer::class) - ->args([service(KernelInterface::class), service('logger')->nullOnInvalid()]) - ->tag('kernel.cache_warmer') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/session.php b/lib/symfony/framework-bundle/Resources/config/session.php deleted file mode 100644 index 43c0000dd..000000000 --- a/lib/symfony/framework-bundle/Resources/config/session.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Session\DeprecatedSessionFactory; -use Symfony\Bundle\FrameworkBundle\Session\ServiceSessionFactory; -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionFactory; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\AbstractSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\IdentityMarshaller; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\MarshallingSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; -use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorageFactory; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory; -use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorageFactory; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; -use Symfony\Component\HttpKernel\EventListener\SessionListener; - -return static function (ContainerConfigurator $container) { - $container->parameters()->set('session.metadata.storage_key', '_sf2_meta'); - - $container->services() - ->set('.session.do-not-use', Session::class) // to be removed in 6.0 - ->factory([service('session.factory'), 'createSession']) - ->set('session.factory', SessionFactory::class) - ->args([ - service('request_stack'), - service('session.storage.factory'), - [service('session_listener'), 'onSessionUsage'], - ]) - - ->set('session.storage.factory.native', NativeSessionStorageFactory::class) - ->args([ - param('session.storage.options'), - service('session.handler'), - inline_service(MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]), - false, - ]) - ->set('session.storage.factory.php_bridge', PhpBridgeSessionStorageFactory::class) - ->args([ - service('session.handler'), - inline_service(MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]), - false, - ]) - ->set('session.storage.factory.mock_file', MockFileSessionStorageFactory::class) - ->args([ - param('kernel.cache_dir').'/sessions', - 'MOCKSESSID', - inline_service(MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]), - ]) - ->set('session.storage.factory.service', ServiceSessionFactory::class) - ->args([ - service('session.storage'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.native", "session.storage.factory.php_bridge" or "session.storage.factory.mock_file" instead.') - - ->set('.session.deprecated', SessionInterface::class) // to be removed in 6.0 - ->factory([inline_service(DeprecatedSessionFactory::class)->args([service('request_stack')]), 'getSession']) - ->alias(SessionInterface::class, '.session.do-not-use') - ->deprecate('symfony/framework-bundle', '5.3', 'The "%alias_id%" and "SessionInterface" aliases are deprecated, use "$requestStack->getSession()" instead.') - ->alias(SessionStorageInterface::class, 'session.storage') - ->deprecate('symfony/framework-bundle', '5.3', 'The "%alias_id%" alias is deprecated, use "session.storage.factory" instead.') - ->alias(\SessionHandlerInterface::class, 'session.handler') - - ->set('session.storage.metadata_bag', MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, create your own "session.storage.factory" instead.') - - ->set('session.storage.native', NativeSessionStorage::class) - ->args([ - param('session.storage.options'), - service('session.handler'), - service('session.storage.metadata_bag'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.native" instead.') - - ->set('session.storage.php_bridge', PhpBridgeSessionStorage::class) - ->args([ - service('session.handler'), - service('session.storage.metadata_bag'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.php_bridge" instead.') - - ->set('session.flash_bag', FlashBag::class) - ->factory([service('.session.do-not-use'), 'getFlashBag']) - ->deprecate('symfony/framework-bundle', '5.1', 'The "%service_id%" service is deprecated, use "$session->getFlashBag()" instead.') - ->alias(FlashBagInterface::class, 'session.flash_bag') - - ->set('session.attribute_bag', AttributeBag::class) - ->factory([service('.session.do-not-use'), 'getBag']) - ->args(['attributes']) - ->deprecate('symfony/framework-bundle', '5.1', 'The "%service_id%" service is deprecated, use "$session->getAttributeBag()" instead.') - - ->set('session.storage.mock_file', MockFileSessionStorage::class) - ->args([ - param('kernel.cache_dir').'/sessions', - 'MOCKSESSID', - service('session.storage.metadata_bag'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.mock_file" instead.') - - ->set('session.handler.native_file', StrictSessionHandler::class) - ->args([ - inline_service(NativeFileSessionHandler::class) - ->args([param('session.save_path')]), - ]) - - ->set('session.abstract_handler', AbstractSessionHandler::class) - ->factory([SessionHandlerFactory::class, 'createHandler']) - ->args([abstract_arg('A string or a connection object')]) - - ->set('session_listener', SessionListener::class) - ->args([ - service_locator([ - 'session_factory' => service('session.factory')->ignoreOnInvalid(), - 'session' => service('.session.do-not-use')->ignoreOnInvalid(), - 'initialized_session' => service('.session.do-not-use')->ignoreOnUninitialized(), - 'logger' => service('logger')->ignoreOnInvalid(), - 'session_collector' => service('data_collector.request.session_collector')->ignoreOnInvalid(), - ]), - param('kernel.debug'), - param('session.storage.options'), - ]) - ->tag('kernel.event_subscriber') - ->tag('kernel.reset', ['method' => 'reset']) - - // for BC - ->alias('session.storage.filesystem', 'session.storage.mock_file') - ->deprecate('symfony/framework-bundle', '5.3', 'The "%alias_id%" alias is deprecated, use "session.storage.factory.mock_file" instead.') - - ->set('session.marshaller', IdentityMarshaller::class) - - ->set('session.marshalling_handler', MarshallingSessionHandler::class) - ->decorate('session.handler') - ->args([ - service('session.marshalling_handler.inner'), - service('session.marshaller'), - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/ssi.php b/lib/symfony/framework-bundle/Resources/config/ssi.php deleted file mode 100644 index d41aa74d1..000000000 --- a/lib/symfony/framework-bundle/Resources/config/ssi.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\SurrogateListener; -use Symfony\Component\HttpKernel\HttpCache\Ssi; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('ssi', Ssi::class) - - ->set('ssi_listener', SurrogateListener::class) - ->args([service('ssi')->ignoreOnInvalid()]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/test.php b/lib/symfony/framework-bundle/Resources/config/test.php deleted file mode 100644 index 76709595b..000000000 --- a/lib/symfony/framework-bundle/Resources/config/test.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\KernelBrowser; -use Symfony\Bundle\FrameworkBundle\Test\TestContainer; -use Symfony\Component\BrowserKit\CookieJar; -use Symfony\Component\BrowserKit\History; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\HttpKernel\EventListener\SessionListener; - -return static function (ContainerConfigurator $container) { - $container->parameters()->set('test.client.parameters', []); - - $container->services() - ->set('test.client', KernelBrowser::class) - ->args([ - service('kernel'), - param('test.client.parameters'), - service('test.client.history'), - service('test.client.cookiejar'), - ]) - ->share(false) - ->public() - - ->set('test.client.history', History::class)->share(false) - ->set('test.client.cookiejar', CookieJar::class)->share(false) - - ->set('test.session.listener', SessionListener::class) - ->args([ - service_locator([ - 'session' => service('.session.do-not-use')->ignoreOnInvalid(), - 'session_factory' => service('session.factory')->ignoreOnInvalid(), - ]), - param('kernel.debug'), - param('session.storage.options'), - ]) - ->tag('kernel.event_subscriber') - - ->set('test.service_container', TestContainer::class) - ->args([ - service('kernel'), - 'test.private_services_locator', - ]) - ->public() - - ->set('test.private_services_locator', ServiceLocator::class) - ->args([abstract_arg('callable collection')]) - ->public() - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/translation.php b/lib/symfony/framework-bundle/Resources/config/translation.php deleted file mode 100644 index 706e4928e..000000000 --- a/lib/symfony/framework-bundle/Resources/config/translation.php +++ /dev/null @@ -1,162 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\TranslationsCacheWarmer; -use Symfony\Bundle\FrameworkBundle\Translation\Translator; -use Symfony\Component\Translation\Dumper\CsvFileDumper; -use Symfony\Component\Translation\Dumper\IcuResFileDumper; -use Symfony\Component\Translation\Dumper\IniFileDumper; -use Symfony\Component\Translation\Dumper\JsonFileDumper; -use Symfony\Component\Translation\Dumper\MoFileDumper; -use Symfony\Component\Translation\Dumper\PhpFileDumper; -use Symfony\Component\Translation\Dumper\PoFileDumper; -use Symfony\Component\Translation\Dumper\QtFileDumper; -use Symfony\Component\Translation\Dumper\XliffFileDumper; -use Symfony\Component\Translation\Dumper\YamlFileDumper; -use Symfony\Component\Translation\Extractor\ChainExtractor; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\Extractor\PhpExtractor; -use Symfony\Component\Translation\Formatter\MessageFormatter; -use Symfony\Component\Translation\Loader\CsvFileLoader; -use Symfony\Component\Translation\Loader\IcuDatFileLoader; -use Symfony\Component\Translation\Loader\IcuResFileLoader; -use Symfony\Component\Translation\Loader\IniFileLoader; -use Symfony\Component\Translation\Loader\JsonFileLoader; -use Symfony\Component\Translation\Loader\MoFileLoader; -use Symfony\Component\Translation\Loader\PhpFileLoader; -use Symfony\Component\Translation\Loader\PoFileLoader; -use Symfony\Component\Translation\Loader\QtFileLoader; -use Symfony\Component\Translation\Loader\XliffFileLoader; -use Symfony\Component\Translation\Loader\YamlFileLoader; -use Symfony\Component\Translation\LoggingTranslator; -use Symfony\Component\Translation\Reader\TranslationReader; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Writer\TranslationWriter; -use Symfony\Component\Translation\Writer\TranslationWriterInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translator.default', Translator::class) - ->args([ - abstract_arg('translation loaders locator'), - service('translator.formatter'), - param('kernel.default_locale'), - abstract_arg('translation loaders ids'), - [ - 'cache_dir' => param('kernel.cache_dir').'/translations', - 'debug' => param('kernel.debug'), - ], - abstract_arg('enabled locales'), - ]) - ->call('setConfigCacheFactory', [service('config_cache_factory')]) - ->tag('kernel.locale_aware') - - ->alias(TranslatorInterface::class, 'translator') - - ->set('translator.logging', LoggingTranslator::class) - ->args([ - service('translator.logging.inner'), - service('logger'), - ]) - ->tag('monolog.logger', ['channel' => 'translation']) - - ->set('translator.formatter.default', MessageFormatter::class) - ->args([service('identity_translator')]) - - ->set('translation.loader.php', PhpFileLoader::class) - ->tag('translation.loader', ['alias' => 'php']) - - ->set('translation.loader.yml', YamlFileLoader::class) - ->tag('translation.loader', ['alias' => 'yaml', 'legacy-alias' => 'yml']) - - ->set('translation.loader.xliff', XliffFileLoader::class) - ->tag('translation.loader', ['alias' => 'xlf', 'legacy-alias' => 'xliff']) - - ->set('translation.loader.po', PoFileLoader::class) - ->tag('translation.loader', ['alias' => 'po']) - - ->set('translation.loader.mo', MoFileLoader::class) - ->tag('translation.loader', ['alias' => 'mo']) - - ->set('translation.loader.qt', QtFileLoader::class) - ->tag('translation.loader', ['alias' => 'ts']) - - ->set('translation.loader.csv', CsvFileLoader::class) - ->tag('translation.loader', ['alias' => 'csv']) - - ->set('translation.loader.res', IcuResFileLoader::class) - ->tag('translation.loader', ['alias' => 'res']) - - ->set('translation.loader.dat', IcuDatFileLoader::class) - ->tag('translation.loader', ['alias' => 'dat']) - - ->set('translation.loader.ini', IniFileLoader::class) - ->tag('translation.loader', ['alias' => 'ini']) - - ->set('translation.loader.json', JsonFileLoader::class) - ->tag('translation.loader', ['alias' => 'json']) - - ->set('translation.dumper.php', PhpFileDumper::class) - ->tag('translation.dumper', ['alias' => 'php']) - - ->set('translation.dumper.xliff', XliffFileDumper::class) - ->tag('translation.dumper', ['alias' => 'xlf']) - - ->set('translation.dumper.po', PoFileDumper::class) - ->tag('translation.dumper', ['alias' => 'po']) - - ->set('translation.dumper.mo', MoFileDumper::class) - ->tag('translation.dumper', ['alias' => 'mo']) - - ->set('translation.dumper.yml', YamlFileDumper::class) - ->tag('translation.dumper', ['alias' => 'yml']) - - ->set('translation.dumper.yaml', YamlFileDumper::class) - ->args(['yaml']) - ->tag('translation.dumper', ['alias' => 'yaml']) - - ->set('translation.dumper.qt', QtFileDumper::class) - ->tag('translation.dumper', ['alias' => 'ts']) - - ->set('translation.dumper.csv', CsvFileDumper::class) - ->tag('translation.dumper', ['alias' => 'csv']) - - ->set('translation.dumper.ini', IniFileDumper::class) - ->tag('translation.dumper', ['alias' => 'ini']) - - ->set('translation.dumper.json', JsonFileDumper::class) - ->tag('translation.dumper', ['alias' => 'json']) - - ->set('translation.dumper.res', IcuResFileDumper::class) - ->tag('translation.dumper', ['alias' => 'res']) - - ->set('translation.extractor.php', PhpExtractor::class) - ->tag('translation.extractor', ['alias' => 'php']) - - ->set('translation.reader', TranslationReader::class) - ->alias(TranslationReaderInterface::class, 'translation.reader') - - ->set('translation.extractor', ChainExtractor::class) - ->alias(ExtractorInterface::class, 'translation.extractor') - - ->set('translation.writer', TranslationWriter::class) - ->alias(TranslationWriterInterface::class, 'translation.writer') - - ->set('translation.warmer', TranslationsCacheWarmer::class) - ->args([service(ContainerInterface::class)]) - ->tag('container.service_subscriber', ['id' => 'translator']) - ->tag('kernel.cache_warmer') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/translation_debug.php b/lib/symfony/framework-bundle/Resources/config/translation_debug.php deleted file mode 100644 index 7a8330181..000000000 --- a/lib/symfony/framework-bundle/Resources/config/translation_debug.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Translation\DataCollector\TranslationDataCollector; -use Symfony\Component\Translation\DataCollectorTranslator; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translator.data_collector', DataCollectorTranslator::class) - ->args([service('translator.data_collector.inner')]) - - ->set('data_collector.translation', TranslationDataCollector::class) - ->args([service('translator.data_collector')]) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/translation.html.twig', - 'id' => 'translation', - 'priority' => 275, - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/translation_providers.php b/lib/symfony/framework-bundle/Resources/config/translation_providers.php deleted file mode 100644 index cd140f077..000000000 --- a/lib/symfony/framework-bundle/Resources/config/translation_providers.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory; -use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory; -use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory; -use Symfony\Component\Translation\Provider\NullProviderFactory; -use Symfony\Component\Translation\Provider\TranslationProviderCollection; -use Symfony\Component\Translation\Provider\TranslationProviderCollectionFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translation.provider_collection', TranslationProviderCollection::class) - ->factory([service('translation.provider_collection_factory'), 'fromConfig']) - ->args([ - [], // Providers - ]) - - ->set('translation.provider_collection_factory', TranslationProviderCollectionFactory::class) - ->args([ - tagged_iterator('translation.provider_factory'), - [], // Enabled locales - ]) - - ->set('translation.provider_factory.null', NullProviderFactory::class) - ->tag('translation.provider_factory') - - ->set('translation.provider_factory.crowdin', CrowdinProviderFactory::class) - ->args([ - service('http_client'), - service('logger'), - param('kernel.default_locale'), - service('translation.loader.xliff'), - service('translation.dumper.xliff'), - ]) - ->tag('translation.provider_factory') - - ->set('translation.provider_factory.loco', LocoProviderFactory::class) - ->args([ - service('http_client'), - service('logger'), - param('kernel.default_locale'), - service('translation.loader.xliff'), - ]) - ->tag('translation.provider_factory') - - ->set('translation.provider_factory.lokalise', LokaliseProviderFactory::class) - ->args([ - service('http_client'), - service('logger'), - param('kernel.default_locale'), - service('translation.loader.xliff'), - ]) - ->tag('translation.provider_factory') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/uid.php b/lib/symfony/framework-bundle/Resources/config/uid.php deleted file mode 100644 index 840fb97b5..000000000 --- a/lib/symfony/framework-bundle/Resources/config/uid.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Uid\Factory\NameBasedUuidFactory; -use Symfony\Component\Uid\Factory\RandomBasedUuidFactory; -use Symfony\Component\Uid\Factory\TimeBasedUuidFactory; -use Symfony\Component\Uid\Factory\UlidFactory; -use Symfony\Component\Uid\Factory\UuidFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('ulid.factory', UlidFactory::class) - ->alias(UlidFactory::class, 'ulid.factory') - - ->set('uuid.factory', UuidFactory::class) - ->alias(UuidFactory::class, 'uuid.factory') - - ->set('name_based_uuid.factory', NameBasedUuidFactory::class) - ->factory([service('uuid.factory'), 'nameBased']) - ->args([abstract_arg('Please set the "framework.uid.name_based_uuid_namespace" configuration option to use the "name_based_uuid.factory" service')]) - ->alias(NameBasedUuidFactory::class, 'name_based_uuid.factory') - - ->set('random_based_uuid.factory', RandomBasedUuidFactory::class) - ->factory([service('uuid.factory'), 'randomBased']) - ->alias(RandomBasedUuidFactory::class, 'random_based_uuid.factory') - - ->set('time_based_uuid.factory', TimeBasedUuidFactory::class) - ->factory([service('uuid.factory'), 'timeBased']) - ->alias(TimeBasedUuidFactory::class, 'time_based_uuid.factory') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/validator.php b/lib/symfony/framework-bundle/Resources/config/validator.php deleted file mode 100644 index 700ea69ed..000000000 --- a/lib/symfony/framework-bundle/Resources/config/validator.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Validator\Constraints\EmailValidator; -use Symfony\Component\Validator\Constraints\ExpressionValidator; -use Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator; -use Symfony\Component\Validator\ContainerConstraintValidatorFactory; -use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader; -use Symfony\Component\Validator\Validation; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Component\Validator\ValidatorBuilder; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('validator.mapping.cache.file', param('kernel.cache_dir').'/validation.php'); - - $container->services() - ->set('validator', ValidatorInterface::class) - ->public() - ->factory([service('validator.builder'), 'getValidator']) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - ->alias(ValidatorInterface::class, 'validator') - - ->set('validator.builder', ValidatorBuilder::class) - ->factory([Validation::class, 'createValidatorBuilder']) - ->call('setConstraintValidatorFactory', [ - service('validator.validator_factory'), - ]) - ->call('setTranslator', [ - service('translator')->ignoreOnInvalid(), - ]) - ->call('setTranslationDomain', [ - param('validator.translation_domain'), - ]) - ->alias('validator.mapping.class_metadata_factory', 'validator') - - ->set('validator.mapping.cache_warmer', ValidatorCacheWarmer::class) - ->args([ - service('validator.builder'), - param('validator.mapping.cache.file'), - ]) - ->tag('kernel.cache_warmer') - - ->set('validator.mapping.cache.adapter', PhpArrayAdapter::class) - ->factory([PhpArrayAdapter::class, 'create']) - ->args([ - param('validator.mapping.cache.file'), - service('cache.validator'), - ]) - - ->set('validator.validator_factory', ContainerConstraintValidatorFactory::class) - ->args([ - abstract_arg('Constraint validators locator'), - ]) - - ->set('validator.expression', ExpressionValidator::class) - ->args([service('validator.expression_language')->nullOnInvalid()]) - ->tag('validator.constraint_validator', [ - 'alias' => 'validator.expression', - ]) - - ->set('validator.expression_language', ExpressionLanguage::class) - ->args([service('cache.validator_expression_language')->nullOnInvalid()]) - - ->set('cache.validator_expression_language') - ->parent('cache.system') - ->tag('cache.pool') - - ->set('validator.email', EmailValidator::class) - ->args([ - abstract_arg('Default mode'), - ]) - ->tag('validator.constraint_validator', [ - 'alias' => EmailValidator::class, - ]) - - ->set('validator.not_compromised_password', NotCompromisedPasswordValidator::class) - ->args([ - service('http_client')->nullOnInvalid(), - param('kernel.charset'), - false, - ]) - ->tag('validator.constraint_validator', [ - 'alias' => NotCompromisedPasswordValidator::class, - ]) - - ->set('validator.property_info_loader', PropertyInfoLoader::class) - ->args([ - service('property_info'), - service('property_info'), - service('property_info'), - ]) - ->tag('validator.auto_mapper') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/validator_debug.php b/lib/symfony/framework-bundle/Resources/config/validator_debug.php deleted file mode 100644 index e9fe44114..000000000 --- a/lib/symfony/framework-bundle/Resources/config/validator_debug.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Validator\DataCollector\ValidatorDataCollector; -use Symfony\Component\Validator\Validator\TraceableValidator; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('debug.validator', TraceableValidator::class) - ->decorate('validator', null, 255) - ->args([ - service('debug.validator.inner'), - ]) - ->tag('kernel.reset', [ - 'method' => 'reset', - ]) - - ->set('data_collector.validator', ValidatorDataCollector::class) - ->args([ - service('debug.validator'), - ]) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/validator.html.twig', - 'id' => 'validator', - 'priority' => 320, - ]) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/web.php b/lib/symfony/framework-bundle/Resources/config/web.php deleted file mode 100644 index 53613d3b5..000000000 --- a/lib/symfony/framework-bundle/Resources/config/web.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver; -use Symfony\Component\HttpKernel\Controller\ErrorController; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; -use Symfony\Component\HttpKernel\EventListener\DisallowRobotsIndexingListener; -use Symfony\Component\HttpKernel\EventListener\ErrorListener; -use Symfony\Component\HttpKernel\EventListener\LocaleListener; -use Symfony\Component\HttpKernel\EventListener\ResponseListener; -use Symfony\Component\HttpKernel\EventListener\StreamedResponseListener; -use Symfony\Component\HttpKernel\EventListener\ValidateRequestListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('controller_resolver', ControllerResolver::class) - ->args([ - service('service_container'), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'request']) - - ->set('argument_metadata_factory', ArgumentMetadataFactory::class) - - ->set('argument_resolver', ArgumentResolver::class) - ->args([ - service('argument_metadata_factory'), - abstract_arg('argument value resolvers'), - ]) - - ->set('argument_resolver.request_attribute', RequestAttributeValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => 100]) - - ->set('argument_resolver.request', RequestValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => 50]) - - ->set('argument_resolver.session', SessionValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => 50]) - - ->set('argument_resolver.service', ServiceValueResolver::class) - ->args([ - abstract_arg('service locator, set in RegisterControllerArgumentLocatorsPass'), - ]) - ->tag('controller.argument_value_resolver', ['priority' => -50]) - - ->set('argument_resolver.default', DefaultValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => -100]) - - ->set('argument_resolver.variadic', VariadicValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => -150]) - - ->set('response_listener', ResponseListener::class) - ->args([ - param('kernel.charset'), - abstract_arg('The "set_content_language_from_locale" config value'), - ]) - ->tag('kernel.event_subscriber') - - ->set('streamed_response_listener', StreamedResponseListener::class) - ->tag('kernel.event_subscriber') - - ->set('locale_listener', LocaleListener::class) - ->args([ - service('request_stack'), - param('kernel.default_locale'), - service('router')->ignoreOnInvalid(), - abstract_arg('The "set_locale_from_accept_language" config value'), - param('kernel.enabled_locales'), - ]) - ->tag('kernel.event_subscriber') - - ->set('validate_request_listener', ValidateRequestListener::class) - ->tag('kernel.event_subscriber') - - ->set('disallow_search_engine_index_response_listener', DisallowRobotsIndexingListener::class) - ->tag('kernel.event_subscriber') - - ->set('error_controller', ErrorController::class) - ->public() - ->args([ - service('http_kernel'), - param('kernel.error_controller'), - service('error_renderer'), - ]) - - ->set('exception_listener', ErrorListener::class) - ->args([ - param('kernel.error_controller'), - service('logger')->nullOnInvalid(), - param('kernel.debug'), - abstract_arg('an exceptions to log & status code mapping'), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'request']) - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/web_link.php b/lib/symfony/framework-bundle/Resources/config/web_link.php deleted file mode 100644 index 0b0e79db8..000000000 --- a/lib/symfony/framework-bundle/Resources/config/web_link.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('web_link.add_link_header_listener', AddLinkHeaderListener::class) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/framework-bundle/Resources/config/workflow.php b/lib/symfony/framework-bundle/Resources/config/workflow.php deleted file mode 100644 index 909bb5aca..000000000 --- a/lib/symfony/framework-bundle/Resources/config/workflow.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Workflow\EventListener\ExpressionLanguage; -use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore; -use Symfony\Component\Workflow\Registry; -use Symfony\Component\Workflow\StateMachine; -use Symfony\Component\Workflow\Workflow; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('workflow.abstract', Workflow::class) - ->args([ - abstract_arg('workflow definition'), - abstract_arg('marking store'), - service('event_dispatcher')->ignoreOnInvalid(), - abstract_arg('workflow name'), - abstract_arg('events to dispatch'), - ]) - ->abstract() - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.3']) - ->set('state_machine.abstract', StateMachine::class) - ->args([ - abstract_arg('workflow definition'), - abstract_arg('marking store'), - service('event_dispatcher')->ignoreOnInvalid(), - abstract_arg('workflow name'), - abstract_arg('events to dispatch'), - ]) - ->abstract() - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.3']) - ->set('workflow.marking_store.method', MethodMarkingStore::class) - ->abstract() - ->set('workflow.registry', Registry::class) - ->alias(Registry::class, 'workflow.registry') - ->set('workflow.security.expression_language', ExpressionLanguage::class) - ; -}; diff --git a/lib/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php b/lib/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php deleted file mode 100644 index 511e87058..000000000 --- a/lib/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Symfony\Component\Routing\Loader\AnnotationClassLoader; -use Symfony\Component\Routing\Route; - -/** - * AnnotatedRouteControllerLoader is an implementation of AnnotationClassLoader - * that sets the '_controller' default based on the class and method names. - * - * @author Fabien Potencier - */ -class AnnotatedRouteControllerLoader extends AnnotationClassLoader -{ - /** - * Configures the _controller default parameter of a given Route instance. - */ - protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot) - { - if ('__invoke' === $method->getName()) { - $route->setDefault('_controller', $class->getName()); - } else { - $route->setDefault('_controller', $class->getName().'::'.$method->getName()); - } - } - - /** - * Makes the default route name more sane by removing common keywords. - * - * @return string - */ - protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) - { - $name = preg_replace('/(bundle|controller)_/', '_', parent::getDefaultRouteName($class, $method)); - - if (str_ends_with($method->name, 'Action') || str_ends_with($method->name, '_action')) { - $name = preg_replace('/action(_\d+)?$/', '\\1', $name); - } - - return str_replace('__', '_', $name); - } -} diff --git a/lib/symfony/framework-bundle/Routing/DelegatingLoader.php b/lib/symfony/framework-bundle/Routing/DelegatingLoader.php deleted file mode 100644 index e130bd2fa..000000000 --- a/lib/symfony/framework-bundle/Routing/DelegatingLoader.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoader; -use Symfony\Component\Config\Loader\LoaderResolverInterface; -use Symfony\Component\Routing\RouteCollection; - -/** - * DelegatingLoader delegates route loading to other loaders using a loader resolver. - * - * This implementation resolves the _controller attribute from the short notation - * to the fully-qualified form (from a:b:c to class::method). - * - * @author Fabien Potencier - * - * @final - */ -class DelegatingLoader extends BaseDelegatingLoader -{ - private $loading = false; - private $defaultOptions; - private $defaultRequirements; - - public function __construct(LoaderResolverInterface $resolver, array $defaultOptions = [], array $defaultRequirements = []) - { - $this->defaultOptions = $defaultOptions; - $this->defaultRequirements = $defaultRequirements; - - parent::__construct($resolver); - } - - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null): RouteCollection - { - if ($this->loading) { - // This can happen if a fatal error occurs in parent::load(). - // Here is the scenario: - // - while routes are being loaded by parent::load() below, a fatal error - // occurs (e.g. parse error in a controller while loading annotations); - // - PHP abruptly empties the stack trace, bypassing all catch/finally blocks; - // it then calls the registered shutdown functions; - // - the ErrorHandler catches the fatal error and re-injects it for rendering - // thanks to HttpKernel->terminateWithException() (that calls handleException()); - // - at this stage, if we try to load the routes again, we must prevent - // the fatal error from occurring a second time, - // otherwise the PHP process would be killed immediately; - // - while rendering the exception page, the router can be required - // (by e.g. the web profiler that needs to generate an URL); - // - this handles the case and prevents the second fatal error - // by triggering an exception beforehand. - - throw new LoaderLoadException($resource, null, 0, null, $type); - } - $this->loading = true; - - try { - $collection = parent::load($resource, $type); - } finally { - $this->loading = false; - } - - foreach ($collection->all() as $route) { - if ($this->defaultOptions) { - $route->setOptions($route->getOptions() + $this->defaultOptions); - } - if ($this->defaultRequirements) { - $route->setRequirements($route->getRequirements() + $this->defaultRequirements); - } - if (!\is_string($controller = $route->getDefault('_controller'))) { - continue; - } - - if (str_contains($controller, '::')) { - continue; - } - - $route->setDefault('_controller', $controller); - } - - return $collection; - } -} diff --git a/lib/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php b/lib/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php deleted file mode 100644 index dba9d6d96..000000000 --- a/lib/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Symfony\Component\Routing\Matcher\CompiledUrlMatcher; -use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; - -/** - * @author Fabien Potencier - * - * @internal - */ -class RedirectableCompiledUrlMatcher extends CompiledUrlMatcher implements RedirectableUrlMatcherInterface -{ - /** - * {@inheritdoc} - */ - public function redirect(string $path, string $route, string $scheme = null): array - { - return [ - '_controller' => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirectAction', - 'path' => $path, - 'permanent' => true, - 'scheme' => $scheme, - 'httpPort' => $this->context->getHttpPort(), - 'httpsPort' => $this->context->getHttpsPort(), - '_route' => $route, - ]; - } -} diff --git a/lib/symfony/framework-bundle/Routing/RouteLoaderInterface.php b/lib/symfony/framework-bundle/Routing/RouteLoaderInterface.php deleted file mode 100644 index d1cb55a7a..000000000 --- a/lib/symfony/framework-bundle/Routing/RouteLoaderInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -/** - * Marker interface for service route loaders. - */ -interface RouteLoaderInterface -{ -} diff --git a/lib/symfony/framework-bundle/Routing/Router.php b/lib/symfony/framework-bundle/Routing/Router.php deleted file mode 100644 index 8e36efe0a..000000000 --- a/lib/symfony/framework-bundle/Routing/Router.php +++ /dev/null @@ -1,210 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Psr\Container\ContainerInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\DependencyInjection\Config\ContainerParametersResource; -use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Router as BaseRouter; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * This Router creates the Loader only when the cache is empty. - * - * @author Fabien Potencier - */ -class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberInterface -{ - private $container; - private $collectedParameters = []; - private $paramFetcher; - - /** - * @param mixed $resource The main resource to load - */ - public function __construct(ContainerInterface $container, $resource, array $options = [], RequestContext $context = null, ContainerInterface $parameters = null, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->container = $container; - $this->resource = $resource; - $this->context = $context ?? new RequestContext(); - $this->logger = $logger; - $this->setOptions($options); - - if ($parameters) { - $this->paramFetcher = \Closure::fromCallable([$parameters, 'get']); - } elseif ($container instanceof SymfonyContainerInterface) { - $this->paramFetcher = \Closure::fromCallable([$container, 'getParameter']); - } else { - throw new \LogicException(sprintf('You should either pass a "%s" instance or provide the $parameters argument of the "%s" method.', SymfonyContainerInterface::class, __METHOD__)); - } - - $this->defaultLocale = $defaultLocale; - } - - /** - * {@inheritdoc} - */ - public function getRouteCollection() - { - if (null === $this->collection) { - $this->collection = $this->container->get('routing.loader')->load($this->resource, $this->options['resource_type']); - $this->resolveParameters($this->collection); - $this->collection->addResource(new ContainerParametersResource($this->collectedParameters)); - - try { - $containerFile = ($this->paramFetcher)('kernel.cache_dir').'/'.($this->paramFetcher)('kernel.container_class').'.php'; - if (file_exists($containerFile)) { - $this->collection->addResource(new FileResource($containerFile)); - } else { - $this->collection->addResource(new FileExistenceResource($containerFile)); - } - } catch (ParameterNotFoundException $exception) { - } - } - - return $this->collection; - } - - /** - * {@inheritdoc} - * - * @return string[] A list of classes to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir) - { - $currentDir = $this->getOption('cache_dir'); - - // force cache generation - $this->setOption('cache_dir', $cacheDir); - $this->getMatcher(); - $this->getGenerator(); - - $this->setOption('cache_dir', $currentDir); - - return [ - $this->getOption('generator_class'), - $this->getOption('matcher_class'), - ]; - } - - /** - * Replaces placeholders with service container parameter values in: - * - the route defaults, - * - the route requirements, - * - the route path, - * - the route host, - * - the route schemes, - * - the route methods. - */ - private function resolveParameters(RouteCollection $collection) - { - foreach ($collection as $route) { - foreach ($route->getDefaults() as $name => $value) { - $route->setDefault($name, $this->resolve($value)); - } - - foreach ($route->getRequirements() as $name => $value) { - $route->setRequirement($name, $this->resolve($value)); - } - - $route->setPath($this->resolve($route->getPath())); - $route->setHost($this->resolve($route->getHost())); - - $schemes = []; - foreach ($route->getSchemes() as $scheme) { - $schemes[] = explode('|', $this->resolve($scheme)); - } - $route->setSchemes(array_merge([], ...$schemes)); - - $methods = []; - foreach ($route->getMethods() as $method) { - $methods[] = explode('|', $this->resolve($method)); - } - $route->setMethods(array_merge([], ...$methods)); - $route->setCondition($this->resolve($route->getCondition())); - } - } - - /** - * Recursively replaces placeholders with the service container parameters. - * - * @param mixed $value The source which might contain "%placeholders%" - * - * @return mixed The source with the placeholders replaced by the container - * parameters. Arrays are resolved recursively. - * - * @throws ParameterNotFoundException When a placeholder does not exist as a container parameter - * @throws RuntimeException When a container value is not a string or a numeric value - */ - private function resolve($value) - { - if (\is_array($value)) { - foreach ($value as $key => $val) { - $value[$key] = $this->resolve($val); - } - - return $value; - } - - if (!\is_string($value)) { - return $value; - } - - $escapedValue = preg_replace_callback('/%%|%([^%\s]++)%/', function ($match) use ($value) { - // skip %% - if (!isset($match[1])) { - return '%%'; - } - - if (preg_match('/^env\((?:\w++:)*+\w++\)$/', $match[1])) { - throw new RuntimeException(sprintf('Using "%%%s%%" is not allowed in routing configuration.', $match[1])); - } - - $resolved = ($this->paramFetcher)($match[1]); - - if (\is_scalar($resolved)) { - $this->collectedParameters[$match[1]] = $resolved; - - if (\is_string($resolved)) { - $resolved = $this->resolve($resolved); - } - - if (\is_scalar($resolved)) { - return false === $resolved ? '0' : (string) $resolved; - } - } - - throw new RuntimeException(sprintf('The container parameter "%s", used in the route configuration value "%s", must be a string or numeric, but it is of type "%s".', $match[1], $value, get_debug_type($resolved))); - }, $value); - - return str_replace('%%', '%', $escapedValue); - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices() - { - return [ - 'routing.loader' => LoaderInterface::class, - ]; - } -} diff --git a/lib/symfony/framework-bundle/Secrets/AbstractVault.php b/lib/symfony/framework-bundle/Secrets/AbstractVault.php deleted file mode 100644 index eeecbbb68..000000000 --- a/lib/symfony/framework-bundle/Secrets/AbstractVault.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Secrets; - -/** - * @author Nicolas Grekas - * - * @internal - */ -abstract class AbstractVault -{ - protected $lastMessage; - - public function getLastMessage(): ?string - { - return $this->lastMessage; - } - - abstract public function generateKeys(bool $override = false): bool; - - abstract public function seal(string $name, string $value): void; - - abstract public function reveal(string $name): ?string; - - abstract public function remove(string $name): bool; - - abstract public function list(bool $reveal = false): array; - - protected function validateName(string $name): void - { - if (!preg_match('/^\w++$/D', $name)) { - throw new \LogicException(sprintf('Invalid secret name "%s": only "word" characters are allowed.', $name)); - } - } - - protected function getPrettyPath(string $path) - { - return str_replace(getcwd().\DIRECTORY_SEPARATOR, '', $path); - } -} diff --git a/lib/symfony/framework-bundle/Secrets/DotenvVault.php b/lib/symfony/framework-bundle/Secrets/DotenvVault.php deleted file mode 100644 index 7c6f6987e..000000000 --- a/lib/symfony/framework-bundle/Secrets/DotenvVault.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Secrets; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class DotenvVault extends AbstractVault -{ - private $dotenvFile; - - public function __construct(string $dotenvFile) - { - $this->dotenvFile = strtr($dotenvFile, '/', \DIRECTORY_SEPARATOR); - } - - public function generateKeys(bool $override = false): bool - { - $this->lastMessage = 'The dotenv vault doesn\'t encrypt secrets thus doesn\'t need keys.'; - - return false; - } - - public function seal(string $name, string $value): void - { - $this->lastMessage = null; - $this->validateName($name); - $v = str_replace("'", "'\\''", $value); - - $content = is_file($this->dotenvFile) ? file_get_contents($this->dotenvFile) : ''; - $content = preg_replace("/^$name=((\\\\'|'[^']++')++|.*)/m", "$name='$v'", $content, -1, $count); - - if (!$count) { - $content .= "$name='$v'\n"; - } - - file_put_contents($this->dotenvFile, $content); - - $this->lastMessage = sprintf('Secret "%s" %s in "%s".', $name, $count ? 'added' : 'updated', $this->getPrettyPath($this->dotenvFile)); - } - - public function reveal(string $name): ?string - { - $this->lastMessage = null; - $this->validateName($name); - $v = \is_string($_SERVER[$name] ?? null) && !str_starts_with($name, 'HTTP_') ? $_SERVER[$name] : ($_ENV[$name] ?? null); - - if (null === $v) { - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath($this->dotenvFile)); - - return null; - } - - return $v; - } - - public function remove(string $name): bool - { - $this->lastMessage = null; - $this->validateName($name); - - $content = is_file($this->dotenvFile) ? file_get_contents($this->dotenvFile) : ''; - $content = preg_replace("/^$name=((\\\\'|'[^']++')++|.*)\n?/m", '', $content, -1, $count); - - if ($count) { - file_put_contents($this->dotenvFile, $content); - $this->lastMessage = sprintf('Secret "%s" removed from file "%s".', $name, $this->getPrettyPath($this->dotenvFile)); - - return true; - } - - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath($this->dotenvFile)); - - return false; - } - - public function list(bool $reveal = false): array - { - $this->lastMessage = null; - $secrets = []; - - foreach ($_ENV as $k => $v) { - if (preg_match('/^\w+$/D', $k)) { - $secrets[$k] = $reveal ? $v : null; - } - } - - foreach ($_SERVER as $k => $v) { - if (\is_string($v) && preg_match('/^\w+$/D', $k)) { - $secrets[$k] = $reveal ? $v : null; - } - } - - return $secrets; - } -} diff --git a/lib/symfony/framework-bundle/Secrets/SodiumVault.php b/lib/symfony/framework-bundle/Secrets/SodiumVault.php deleted file mode 100644 index a9c86ab04..000000000 --- a/lib/symfony/framework-bundle/Secrets/SodiumVault.php +++ /dev/null @@ -1,233 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Secrets; - -use Symfony\Component\DependencyInjection\EnvVarLoaderInterface; -use Symfony\Component\VarExporter\VarExporter; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -class SodiumVault extends AbstractVault implements EnvVarLoaderInterface -{ - private $encryptionKey; - private $decryptionKey; - private $pathPrefix; - private $secretsDir; - - /** - * @param string|\Stringable|null $decryptionKey A string or a stringable object that defines the private key to use to decrypt the vault - * or null to store generated keys in the provided $secretsDir - */ - public function __construct(string $secretsDir, $decryptionKey = null) - { - if (null !== $decryptionKey && !\is_string($decryptionKey) && !(\is_object($decryptionKey) && method_exists($decryptionKey, '__toString'))) { - throw new \TypeError(sprintf('Decryption key should be a string or an object that implements the __toString() method, "%s" given.', get_debug_type($decryptionKey))); - } - - $this->pathPrefix = rtrim(strtr($secretsDir, '/', \DIRECTORY_SEPARATOR), \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR.basename($secretsDir).'.'; - $this->decryptionKey = $decryptionKey; - $this->secretsDir = $secretsDir; - } - - public function generateKeys(bool $override = false): bool - { - $this->lastMessage = null; - - if (null === $this->encryptionKey && '' !== $this->decryptionKey = (string) $this->decryptionKey) { - $this->lastMessage = 'Cannot generate keys when a decryption key has been provided while instantiating the vault.'; - - return false; - } - - try { - $this->loadKeys(); - } catch (\RuntimeException $e) { - // ignore failures to load keys - } - - if ('' !== $this->decryptionKey && !is_file($this->pathPrefix.'encrypt.public.php')) { - $this->export('encrypt.public', $this->encryptionKey); - } - - if (!$override && null !== $this->encryptionKey) { - $this->lastMessage = sprintf('Sodium keys already exist at "%s*.{public,private}" and won\'t be overridden.', $this->getPrettyPath($this->pathPrefix)); - - return false; - } - - $this->decryptionKey = sodium_crypto_box_keypair(); - $this->encryptionKey = sodium_crypto_box_publickey($this->decryptionKey); - - $this->export('encrypt.public', $this->encryptionKey); - $this->export('decrypt.private', $this->decryptionKey); - - $this->lastMessage = sprintf('Sodium keys have been generated at "%s*.public/private.php".', $this->getPrettyPath($this->pathPrefix)); - - return true; - } - - public function seal(string $name, string $value): void - { - $this->lastMessage = null; - $this->validateName($name); - $this->loadKeys(); - $filename = $this->getFilename($name); - $this->export($filename, sodium_crypto_box_seal($value, $this->encryptionKey ?? sodium_crypto_box_publickey($this->decryptionKey))); - - $list = $this->list(); - $list[$name] = null; - uksort($list, 'strnatcmp'); - file_put_contents($this->pathPrefix.'list.php', sprintf("lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - } - - public function reveal(string $name): ?string - { - $this->lastMessage = null; - $this->validateName($name); - - $filename = $this->getFilename($name); - if (!is_file($file = $this->pathPrefix.$filename.'.php')) { - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return null; - } - - if (!\function_exists('sodium_crypto_box_seal')) { - $this->lastMessage = sprintf('Secret "%s" cannot be revealed as the "sodium" PHP extension missing. Try running "composer require paragonie/sodium_compat" if you cannot enable the extension."', $name); - - return null; - } - - $this->loadKeys(); - - if ('' === $this->decryptionKey) { - $this->lastMessage = sprintf('Secret "%s" cannot be revealed as no decryption key was found in "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return null; - } - - if (false === $value = sodium_crypto_box_seal_open(include $file, $this->decryptionKey)) { - $this->lastMessage = sprintf('Secret "%s" cannot be revealed as the wrong decryption key was provided for "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return null; - } - - return $value; - } - - public function remove(string $name): bool - { - $this->lastMessage = null; - $this->validateName($name); - - $filename = $this->getFilename($name); - if (!is_file($file = $this->pathPrefix.$filename.'.php')) { - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return false; - } - - $list = $this->list(); - unset($list[$name]); - file_put_contents($this->pathPrefix.'list.php', sprintf("lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return @unlink($file) || !file_exists($file); - } - - public function list(bool $reveal = false): array - { - $this->lastMessage = null; - - if (!is_file($file = $this->pathPrefix.'list.php')) { - return []; - } - - $secrets = include $file; - - if (!$reveal) { - return $secrets; - } - - foreach ($secrets as $name => $value) { - $secrets[$name] = $this->reveal($name); - } - - return $secrets; - } - - public function loadEnvVars(): array - { - return $this->list(true); - } - - private function loadKeys(): void - { - if (!\function_exists('sodium_crypto_box_seal')) { - throw new \LogicException('The "sodium" PHP extension is required to deal with secrets. Alternatively, try running "composer require paragonie/sodium_compat" if you cannot enable the extension.".'); - } - - if (null !== $this->encryptionKey || '' !== $this->decryptionKey = (string) $this->decryptionKey) { - return; - } - - if (is_file($this->pathPrefix.'decrypt.private.php')) { - $this->decryptionKey = (string) include $this->pathPrefix.'decrypt.private.php'; - } - - if (is_file($this->pathPrefix.'encrypt.public.php')) { - $this->encryptionKey = (string) include $this->pathPrefix.'encrypt.public.php'; - } elseif ('' !== $this->decryptionKey) { - $this->encryptionKey = sodium_crypto_box_publickey($this->decryptionKey); - } else { - throw new \RuntimeException(sprintf('Encryption key not found in "%s".', \dirname($this->pathPrefix))); - } - } - - private function export(string $filename, string $data): void - { - $b64 = 'decrypt.private' === $filename ? '// SYMFONY_DECRYPTION_SECRET='.base64_encode($data)."\n" : ''; - $name = basename($this->pathPrefix.$filename); - $data = str_replace('%', '\x', rawurlencode($data)); - $data = sprintf("createSecretsDir(); - - if (false === file_put_contents($this->pathPrefix.$filename.'.php', $data, \LOCK_EX)) { - $e = error_get_last(); - throw new \ErrorException($e['message'] ?? 'Failed to write secrets data.', 0, $e['type'] ?? \E_USER_WARNING); - } - } - - private function createSecretsDir(): void - { - if ($this->secretsDir && !is_dir($this->secretsDir) && !@mkdir($this->secretsDir, 0777, true) && !is_dir($this->secretsDir)) { - throw new \RuntimeException(sprintf('Unable to create the secrets directory (%s).', $this->secretsDir)); - } - - $this->secretsDir = null; - } - - private function getFilename(string $name): string - { - // The MD5 hash allows making secrets case-sensitive. The filename is not enough on Windows. - return $name.'.'.substr(md5($name), 0, 6); - } -} diff --git a/lib/symfony/framework-bundle/Session/DeprecatedSessionFactory.php b/lib/symfony/framework-bundle/Session/DeprecatedSessionFactory.php deleted file mode 100644 index faa29a1c7..000000000 --- a/lib/symfony/framework-bundle/Session/DeprecatedSessionFactory.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Session; - -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Provides session and trigger deprecation. - * - * Used by service that should trigger deprecation when accessed by the user. - * - * @author Jérémy Derussé - * - * @internal to be removed in 6.0 - */ -class DeprecatedSessionFactory -{ - private $requestStack; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - } - - public function getSession(): ?SessionInterface - { - trigger_deprecation('symfony/framework-bundle', '5.3', 'The "session" service and "SessionInterface" alias are deprecated, use "$requestStack->getSession()" instead.'); - - try { - return $this->requestStack->getSession(); - } catch (SessionNotFoundException $e) { - return null; - } - } -} diff --git a/lib/symfony/framework-bundle/Session/ServiceSessionFactory.php b/lib/symfony/framework-bundle/Session/ServiceSessionFactory.php deleted file mode 100644 index c05737501..000000000 --- a/lib/symfony/framework-bundle/Session/ServiceSessionFactory.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Session; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; - -/** - * @author Jérémy Derussé - * - * @internal to be removed in Symfony 6 - */ -final class ServiceSessionFactory implements SessionStorageFactoryInterface -{ - private $storage; - - public function __construct(SessionStorageInterface $storage) - { - $this->storage = $storage; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - if ($this->storage instanceof NativeSessionStorage && $request && $request->isSecure()) { - $this->storage->setOptions(['cookie_secure' => true]); - } - - return $this->storage; - } -} diff --git a/lib/symfony/framework-bundle/Translation/Translator.php b/lib/symfony/framework-bundle/Translation/Translator.php deleted file mode 100644 index 5173f8a8e..000000000 --- a/lib/symfony/framework-bundle/Translation/Translator.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Translation; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; -use Symfony\Component\Translation\Translator as BaseTranslator; - -/** - * @author Fabien Potencier - */ -class Translator extends BaseTranslator implements WarmableInterface -{ - protected $container; - protected $loaderIds; - - protected $options = [ - 'cache_dir' => null, - 'debug' => false, - 'resource_files' => [], - 'scanned_directories' => [], - 'cache_vary' => [], - ]; - - /** - * @var list - */ - private $resourceLocales; - - /** - * Holds parameters from addResource() calls so we can defer the actual - * parent::addResource() calls until initialize() is executed. - * - * @var array[] - */ - private $resources = []; - - /** - * @var string[][] - */ - private $resourceFiles; - - /** - * @var string[] - */ - private $scannedDirectories; - - /** - * @var string[] - */ - private $enabledLocales; - - /** - * Constructor. - * - * Available options: - * - * * cache_dir: The cache directory (or null to disable caching) - * * debug: Whether to enable debugging or not (false by default) - * * resource_files: List of translation resources available grouped by locale. - * * cache_vary: An array of data that is serialized to generate the cached catalogue name. - * - * @throws InvalidArgumentException - */ - public function __construct(ContainerInterface $container, MessageFormatterInterface $formatter, string $defaultLocale, array $loaderIds = [], array $options = [], array $enabledLocales = []) - { - $this->container = $container; - $this->loaderIds = $loaderIds; - $this->enabledLocales = $enabledLocales; - - // check option names - if ($diff = array_diff(array_keys($options), array_keys($this->options))) { - throw new InvalidArgumentException(sprintf('The Translator does not support the following options: \'%s\'.', implode('\', \'', $diff))); - } - - $this->options = array_merge($this->options, $options); - $this->resourceLocales = array_keys($this->options['resource_files']); - $this->resourceFiles = $this->options['resource_files']; - $this->scannedDirectories = $this->options['scanned_directories']; - - parent::__construct($defaultLocale, $formatter, $this->options['cache_dir'], $this->options['debug'], $this->options['cache_vary']); - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDir) - { - // skip warmUp when translator doesn't use cache - if (null === $this->options['cache_dir']) { - return []; - } - - $localesToWarmUp = $this->enabledLocales ?: array_merge($this->getFallbackLocales(), [$this->getLocale()], $this->resourceLocales); - - foreach (array_unique($localesToWarmUp) as $locale) { - // reset catalogue in case it's already loaded during the dump of the other locales. - if (isset($this->catalogues[$locale])) { - unset($this->catalogues[$locale]); - } - - $this->loadCatalogue($locale); - } - - return []; - } - - public function addResource(string $format, $resource, string $locale, string $domain = null) - { - if ($this->resourceFiles) { - $this->addResourceFiles(); - } - $this->resources[] = [$format, $resource, $locale, $domain]; - } - - /** - * {@inheritdoc} - */ - protected function initializeCatalogue(string $locale) - { - $this->initialize(); - parent::initializeCatalogue($locale); - } - - /** - * @internal - */ - protected function doLoadCatalogue(string $locale): void - { - parent::doLoadCatalogue($locale); - - foreach ($this->scannedDirectories as $directory) { - $resourceClass = file_exists($directory) ? DirectoryResource::class : FileExistenceResource::class; - $this->catalogues[$locale]->addResource(new $resourceClass($directory)); - } - } - - protected function initialize() - { - if ($this->resourceFiles) { - $this->addResourceFiles(); - } - foreach ($this->resources as $params) { - [$format, $resource, $locale, $domain] = $params; - parent::addResource($format, $resource, $locale, $domain); - } - $this->resources = []; - - foreach ($this->loaderIds as $id => $aliases) { - foreach ($aliases as $alias) { - $this->addLoader($alias, $this->container->get($id)); - } - } - } - - private function addResourceFiles(): void - { - $filesByLocale = $this->resourceFiles; - $this->resourceFiles = []; - - foreach ($filesByLocale as $files) { - foreach ($files as $file) { - // filename is domain.locale.format - $fileNameParts = explode('.', basename($file)); - $format = array_pop($fileNameParts); - $locale = array_pop($fileNameParts); - $domain = implode('.', $fileNameParts); - $this->addResource($format, $file, $locale, $domain); - } - } - } -} diff --git a/lib/symfony/framework-bundle/composer.json b/lib/symfony/framework-bundle/composer.json deleted file mode 100644 index 089e2e082..000000000 --- a/lib/symfony/framework-bundle/composer.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "symfony/framework-bundle", - "type": "symfony-bundle", - "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "ext-xml": "*", - "symfony/cache": "^5.2|^6.0", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^5.4.5|^6.0.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^5.1|^6.0", - "symfony/error-handler": "^4.4.1|^5.0.1|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/routing": "^5.3|^6.0" - }, - "require-dev": { - "doctrine/annotations": "^1.13.1|^2", - "doctrine/cache": "^1.11|^2.0", - "doctrine/persistence": "^1.3|^2|^3", - "symfony/asset": "^5.3|^6.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/console": "^5.4.9|^6.0.9", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dom-crawler": "^4.4.30|^5.3.7|^6.0", - "symfony/dotenv": "^5.1|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/form": "^5.2|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/mailer": "^5.2|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/notifier": "^5.4|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/security-bundle": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/string": "^5.0|^6.0", - "symfony/translation": "^5.3|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0", - "symfony/workflow": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/property-info": "^4.4|^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "twig/twig": "^2.10|^3.0" - }, - "conflict": { - "doctrine/annotations": "<1.13.1", - "doctrine/cache": "<1.11", - "doctrine/persistence": "<1.3", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "phpunit/phpunit": "<5.4.3", - "symfony/asset": "<5.3", - "symfony/console": "<5.2.5", - "symfony/dotenv": "<5.1", - "symfony/dom-crawler": "<4.4", - "symfony/http-client": "<4.4", - "symfony/form": "<5.2", - "symfony/lock": "<4.4", - "symfony/mailer": "<5.2", - "symfony/messenger": "<5.4", - "symfony/mime": "<4.4", - "symfony/property-info": "<4.4", - "symfony/property-access": "<5.3", - "symfony/serializer": "<5.2", - "symfony/service-contracts": ">=3.0", - "symfony/security-csrf": "<5.3", - "symfony/stopwatch": "<4.4", - "symfony/translation": "<5.3", - "symfony/twig-bridge": "<4.4", - "symfony/twig-bundle": "<4.4", - "symfony/validator": "<5.2", - "symfony/web-profiler-bundle": "<4.4", - "symfony/workflow": "<5.2" - }, - "suggest": { - "ext-apcu": "For best performance of the system caches", - "symfony/console": "For using the console commands", - "symfony/form": "For using forms", - "symfony/serializer": "For using the serializer service", - "symfony/validator": "For using validation", - "symfony/yaml": "For using the debug:config and lint:yaml commands", - "symfony/property-info": "For using the property_info service", - "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering" - }, - "autoload": { - "psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/http-foundation/AcceptHeader.php b/lib/symfony/http-foundation/AcceptHeader.php deleted file mode 100644 index 057c6b530..000000000 --- a/lib/symfony/http-foundation/AcceptHeader.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -// Help opcache.preload discover always-needed symbols -class_exists(AcceptHeaderItem::class); - -/** - * Represents an Accept-* header. - * - * An accept header is compound with a list of items, - * sorted by descending quality. - * - * @author Jean-François Simon - */ -class AcceptHeader -{ - /** - * @var AcceptHeaderItem[] - */ - private $items = []; - - /** - * @var bool - */ - private $sorted = true; - - /** - * @param AcceptHeaderItem[] $items - */ - public function __construct(array $items) - { - foreach ($items as $item) { - $this->add($item); - } - } - - /** - * Builds an AcceptHeader instance from a string. - * - * @return self - */ - public static function fromString(?string $headerValue) - { - $index = 0; - - $parts = HeaderUtils::split($headerValue ?? '', ',;='); - - return new self(array_map(function ($subParts) use (&$index) { - $part = array_shift($subParts); - $attributes = HeaderUtils::combine($subParts); - - $item = new AcceptHeaderItem($part[0], $attributes); - $item->setIndex($index++); - - return $item; - }, $parts)); - } - - /** - * Returns header value's string representation. - * - * @return string - */ - public function __toString() - { - return implode(',', $this->items); - } - - /** - * Tests if header has given value. - * - * @return bool - */ - public function has(string $value) - { - return isset($this->items[$value]); - } - - /** - * Returns given value's item, if exists. - * - * @return AcceptHeaderItem|null - */ - public function get(string $value) - { - return $this->items[$value] ?? $this->items[explode('/', $value)[0].'/*'] ?? $this->items['*/*'] ?? $this->items['*'] ?? null; - } - - /** - * Adds an item. - * - * @return $this - */ - public function add(AcceptHeaderItem $item) - { - $this->items[$item->getValue()] = $item; - $this->sorted = false; - - return $this; - } - - /** - * Returns all items. - * - * @return AcceptHeaderItem[] - */ - public function all() - { - $this->sort(); - - return $this->items; - } - - /** - * Filters items on their value using given regex. - * - * @return self - */ - public function filter(string $pattern) - { - return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) { - return preg_match($pattern, $item->getValue()); - })); - } - - /** - * Returns first item. - * - * @return AcceptHeaderItem|null - */ - public function first() - { - $this->sort(); - - return !empty($this->items) ? reset($this->items) : null; - } - - /** - * Sorts items by descending quality. - */ - private function sort(): void - { - if (!$this->sorted) { - uasort($this->items, function (AcceptHeaderItem $a, AcceptHeaderItem $b) { - $qA = $a->getQuality(); - $qB = $b->getQuality(); - - if ($qA === $qB) { - return $a->getIndex() > $b->getIndex() ? 1 : -1; - } - - return $qA > $qB ? -1 : 1; - }); - - $this->sorted = true; - } - } -} diff --git a/lib/symfony/http-foundation/AcceptHeaderItem.php b/lib/symfony/http-foundation/AcceptHeaderItem.php deleted file mode 100644 index 8b86eee67..000000000 --- a/lib/symfony/http-foundation/AcceptHeaderItem.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Represents an Accept-* header item. - * - * @author Jean-François Simon - */ -class AcceptHeaderItem -{ - private $value; - private $quality = 1.0; - private $index = 0; - private $attributes = []; - - public function __construct(string $value, array $attributes = []) - { - $this->value = $value; - foreach ($attributes as $name => $value) { - $this->setAttribute($name, $value); - } - } - - /** - * Builds an AcceptHeaderInstance instance from a string. - * - * @return self - */ - public static function fromString(?string $itemValue) - { - $parts = HeaderUtils::split($itemValue ?? '', ';='); - - $part = array_shift($parts); - $attributes = HeaderUtils::combine($parts); - - return new self($part[0], $attributes); - } - - /** - * Returns header value's string representation. - * - * @return string - */ - public function __toString() - { - $string = $this->value.($this->quality < 1 ? ';q='.$this->quality : ''); - if (\count($this->attributes) > 0) { - $string .= '; '.HeaderUtils::toString($this->attributes, ';'); - } - - return $string; - } - - /** - * Set the item value. - * - * @return $this - */ - public function setValue(string $value) - { - $this->value = $value; - - return $this; - } - - /** - * Returns the item value. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Set the item quality. - * - * @return $this - */ - public function setQuality(float $quality) - { - $this->quality = $quality; - - return $this; - } - - /** - * Returns the item quality. - * - * @return float - */ - public function getQuality() - { - return $this->quality; - } - - /** - * Set the item index. - * - * @return $this - */ - public function setIndex(int $index) - { - $this->index = $index; - - return $this; - } - - /** - * Returns the item index. - * - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Tests if an attribute exists. - * - * @return bool - */ - public function hasAttribute(string $name) - { - return isset($this->attributes[$name]); - } - - /** - * Returns an attribute by its name. - * - * @param mixed $default - * - * @return mixed - */ - public function getAttribute(string $name, $default = null) - { - return $this->attributes[$name] ?? $default; - } - - /** - * Returns all attributes. - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Set an attribute. - * - * @return $this - */ - public function setAttribute(string $name, string $value) - { - if ('q' === $name) { - $this->quality = (float) $value; - } else { - $this->attributes[$name] = $value; - } - - return $this; - } -} diff --git a/lib/symfony/http-foundation/BinaryFileResponse.php b/lib/symfony/http-foundation/BinaryFileResponse.php deleted file mode 100644 index 6d7b80ad1..000000000 --- a/lib/symfony/http-foundation/BinaryFileResponse.php +++ /dev/null @@ -1,407 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\File; - -/** - * BinaryFileResponse represents an HTTP response delivering a file. - * - * @author Niklas Fiekas - * @author stealth35 - * @author Igor Wiedler - * @author Jordan Alliot - * @author Sergey Linnik - */ -class BinaryFileResponse extends Response -{ - protected static $trustXSendfileTypeHeader = false; - - /** - * @var File - */ - protected $file; - protected $offset = 0; - protected $maxlen = -1; - protected $deleteFileAfterSend = false; - protected $chunkSize = 8 * 1024; - - /** - * @param \SplFileInfo|string $file The file to stream - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $public Files are public by default - * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename - * @param bool $autoEtag Whether the ETag header should be automatically set - * @param bool $autoLastModified Whether the Last-Modified header should be automatically set - */ - public function __construct($file, int $status = 200, array $headers = [], bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - parent::__construct(null, $status, $headers); - - $this->setFile($file, $contentDisposition, $autoEtag, $autoLastModified); - - if ($public) { - $this->setPublic(); - } - } - - /** - * @param \SplFileInfo|string $file The file to stream - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $public Files are public by default - * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename - * @param bool $autoEtag Whether the ETag header should be automatically set - * @param bool $autoLastModified Whether the Last-Modified header should be automatically set - * - * @return static - * - * @deprecated since Symfony 5.2, use __construct() instead. - */ - public static function create($file = null, int $status = 200, array $headers = [], bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - trigger_deprecation('symfony/http-foundation', '5.2', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); - } - - /** - * Sets the file to stream. - * - * @param \SplFileInfo|string $file The file to stream - * - * @return $this - * - * @throws FileException - */ - public function setFile($file, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - if (!$file instanceof File) { - if ($file instanceof \SplFileInfo) { - $file = new File($file->getPathname()); - } else { - $file = new File((string) $file); - } - } - - if (!$file->isReadable()) { - throw new FileException('File must be readable.'); - } - - $this->file = $file; - - if ($autoEtag) { - $this->setAutoEtag(); - } - - if ($autoLastModified) { - $this->setAutoLastModified(); - } - - if ($contentDisposition) { - $this->setContentDisposition($contentDisposition); - } - - return $this; - } - - /** - * Gets the file. - * - * @return File - */ - public function getFile() - { - return $this->file; - } - - /** - * Sets the response stream chunk size. - * - * @return $this - */ - public function setChunkSize(int $chunkSize): self - { - if ($chunkSize < 1 || $chunkSize > \PHP_INT_MAX) { - throw new \LogicException('The chunk size of a BinaryFileResponse cannot be less than 1 or greater than PHP_INT_MAX.'); - } - - $this->chunkSize = $chunkSize; - - return $this; - } - - /** - * Automatically sets the Last-Modified header according the file modification date. - * - * @return $this - */ - public function setAutoLastModified() - { - $this->setLastModified(\DateTime::createFromFormat('U', $this->file->getMTime())); - - return $this; - } - - /** - * Automatically sets the ETag header according to the checksum of the file. - * - * @return $this - */ - public function setAutoEtag() - { - $this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true))); - - return $this; - } - - /** - * Sets the Content-Disposition header with the given filename. - * - * @param string $disposition ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT - * @param string $filename Optionally use this UTF-8 encoded filename instead of the real name of the file - * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename - * - * @return $this - */ - public function setContentDisposition(string $disposition, string $filename = '', string $filenameFallback = '') - { - if ('' === $filename) { - $filename = $this->file->getFilename(); - } - - if ('' === $filenameFallback && (!preg_match('/^[\x20-\x7e]*$/', $filename) || str_contains($filename, '%'))) { - $encoding = mb_detect_encoding($filename, null, true) ?: '8bit'; - - for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { - $char = mb_substr($filename, $i, 1, $encoding); - - if ('%' === $char || \ord($char) < 32 || \ord($char) > 126) { - $filenameFallback .= '_'; - } else { - $filenameFallback .= $char; - } - } - } - - $dispositionHeader = $this->headers->makeDisposition($disposition, $filename, $filenameFallback); - $this->headers->set('Content-Disposition', $dispositionHeader); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function prepare(Request $request) - { - if ($this->isInformational() || $this->isEmpty()) { - parent::prepare($request); - - $this->maxlen = 0; - - return $this; - } - - if (!$this->headers->has('Content-Type')) { - $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream'); - } - - parent::prepare($request); - - $this->offset = 0; - $this->maxlen = -1; - - if (false === $fileSize = $this->file->getSize()) { - return $this; - } - $this->headers->remove('Transfer-Encoding'); - $this->headers->set('Content-Length', $fileSize); - - if (!$this->headers->has('Accept-Ranges')) { - // Only accept ranges on safe HTTP methods - $this->headers->set('Accept-Ranges', $request->isMethodSafe() ? 'bytes' : 'none'); - } - - if (self::$trustXSendfileTypeHeader && $request->headers->has('X-Sendfile-Type')) { - // Use X-Sendfile, do not send any content. - $type = $request->headers->get('X-Sendfile-Type'); - $path = $this->file->getRealPath(); - // Fall back to scheme://path for stream wrapped locations. - if (false === $path) { - $path = $this->file->getPathname(); - } - if ('x-accel-redirect' === strtolower($type)) { - // Do X-Accel-Mapping substitutions. - // @link https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/#x-accel-redirect - $parts = HeaderUtils::split($request->headers->get('X-Accel-Mapping', ''), ',='); - foreach ($parts as $part) { - [$pathPrefix, $location] = $part; - if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) { - $path = $location.substr($path, \strlen($pathPrefix)); - // Only set X-Accel-Redirect header if a valid URI can be produced - // as nginx does not serve arbitrary file paths. - $this->headers->set($type, $path); - $this->maxlen = 0; - break; - } - } - } else { - $this->headers->set($type, $path); - $this->maxlen = 0; - } - } elseif ($request->headers->has('Range') && $request->isMethod('GET')) { - // Process the range headers. - if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) { - $range = $request->headers->get('Range'); - - if (str_starts_with($range, 'bytes=')) { - [$start, $end] = explode('-', substr($range, 6), 2) + [0]; - - $end = ('' === $end) ? $fileSize - 1 : (int) $end; - - if ('' === $start) { - $start = $fileSize - $end; - $end = $fileSize - 1; - } else { - $start = (int) $start; - } - - if ($start <= $end) { - $end = min($end, $fileSize - 1); - if ($start < 0 || $start > $end) { - $this->setStatusCode(416); - $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize)); - } elseif ($end - $start < $fileSize - 1) { - $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; - $this->offset = $start; - - $this->setStatusCode(206); - $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize)); - $this->headers->set('Content-Length', $end - $start + 1); - } - } - } - } - } - - if ($request->isMethod('HEAD')) { - $this->maxlen = 0; - } - - return $this; - } - - private function hasValidIfRangeHeader(?string $header): bool - { - if ($this->getEtag() === $header) { - return true; - } - - if (null === $lastModified = $this->getLastModified()) { - return false; - } - - return $lastModified->format('D, d M Y H:i:s').' GMT' === $header; - } - - /** - * {@inheritdoc} - */ - public function sendContent() - { - try { - if (!$this->isSuccessful()) { - return parent::sendContent(); - } - - if (0 === $this->maxlen) { - return $this; - } - - $out = fopen('php://output', 'w'); - $file = fopen($this->file->getPathname(), 'r'); - - ignore_user_abort(true); - - if (0 !== $this->offset) { - fseek($file, $this->offset); - } - - $length = $this->maxlen; - while ($length && !feof($file)) { - $read = ($length > $this->chunkSize) ? $this->chunkSize : $length; - $length -= $read; - - stream_copy_to_stream($file, $out, $read); - - if (connection_aborted()) { - break; - } - } - - fclose($out); - fclose($file); - } finally { - if ($this->deleteFileAfterSend && is_file($this->file->getPathname())) { - unlink($this->file->getPathname()); - } - } - - return $this; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException when the content is not null - */ - public function setContent(?string $content) - { - if (null !== $content) { - throw new \LogicException('The content cannot be set on a BinaryFileResponse instance.'); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getContent() - { - return false; - } - - /** - * Trust X-Sendfile-Type header. - */ - public static function trustXSendfileTypeHeader() - { - self::$trustXSendfileTypeHeader = true; - } - - /** - * If this is set to true, the file will be unlinked after the request is sent - * Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used. - * - * @return $this - */ - public function deleteFileAfterSend(bool $shouldDelete = true) - { - $this->deleteFileAfterSend = $shouldDelete; - - return $this; - } -} diff --git a/lib/symfony/http-foundation/CHANGELOG.md b/lib/symfony/http-foundation/CHANGELOG.md deleted file mode 100644 index ad7607add..000000000 --- a/lib/symfony/http-foundation/CHANGELOG.md +++ /dev/null @@ -1,296 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate passing `null` as `$requestIp` to `IpUtils::__checkIp()`, `IpUtils::__checkIp4()` or `IpUtils::__checkIp6()`, pass an empty string instead. - * Add the `litespeed_finish_request` method to work with Litespeed - * Deprecate `upload_progress.*` and `url_rewriter.tags` session options - * Allow setting session options via DSN - -5.3 ---- - - * Add the `SessionFactory`, `NativeSessionStorageFactory`, `PhpBridgeSessionStorageFactory` and `MockFileSessionStorageFactory` classes - * Calling `Request::getSession()` when there is no available session throws a `SessionNotFoundException` - * Add the `RequestStack::getSession` method - * Deprecate the `NamespacedAttributeBag` class - * Add `ResponseFormatSame` PHPUnit constraint - * Deprecate the `RequestStack::getMasterRequest()` method and add `getMainRequest()` as replacement - -5.2.0 ------ - - * added support for `X-Forwarded-Prefix` header - * added `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names - * added `File::getContent()` - * added ability to use comma separated ip addresses for `RequestMatcher::matchIps()` - * added `Request::toArray()` to parse a JSON request body to an array - * added `RateLimiter\RequestRateLimiterInterface` and `RateLimiter\AbstractRequestRateLimiter` - * deprecated not passing a `Closure` together with `FILTER_CALLBACK` to `ParameterBag::filter()`; wrap your filter in a closure instead. - * Deprecated the `Request::HEADER_X_FORWARDED_ALL` constant, use either `HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO` or `HEADER_X_FORWARDED_AWS_ELB` or `HEADER_X_FORWARDED_TRAEFIK` constants instead. - * Deprecated `BinaryFileResponse::create()`, use `__construct()` instead - -5.1.0 ------ - - * added `Cookie::withValue`, `Cookie::withDomain`, `Cookie::withExpires`, - `Cookie::withPath`, `Cookie::withSecure`, `Cookie::withHttpOnly`, - `Cookie::withRaw`, `Cookie::withSameSite` - * Deprecate `Response::create()`, `JsonResponse::create()`, - `RedirectResponse::create()`, and `StreamedResponse::create()` methods (use - `__construct()` instead) - * added `Request::preferSafeContent()` and `Response::setContentSafe()` to handle "safe" HTTP preference - according to [RFC 8674](https://tools.ietf.org/html/rfc8674) - * made the Mime component an optional dependency - * added `MarshallingSessionHandler`, `IdentityMarshaller` - * made `Session` accept a callback to report when the session is being used - * Add support for all core cache control directives - * Added `Symfony\Component\HttpFoundation\InputBag` - * Deprecated retrieving non-string values using `InputBag::get()`, use `InputBag::all()` if you need access to the collection of values - -5.0.0 ------ - - * made `Cookie` auto-secure and lax by default - * removed classes in the `MimeType` namespace, use the Symfony Mime component instead - * removed method `UploadedFile::getClientSize()` and the related constructor argument - * made `Request::getSession()` throw if the session has not been set before - * removed `Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL` - * passing a null url when instantiating a `RedirectResponse` is not allowed - -4.4.0 ------ - - * passing arguments to `Request::isMethodSafe()` is deprecated. - * `ApacheRequest` is deprecated, use the `Request` class instead. - * passing a third argument to `HeaderBag::get()` is deprecated, use method `all()` instead - * [BC BREAK] `PdoSessionHandler` with MySQL changed the type of the lifetime column, - make sure to run `ALTER TABLE sessions MODIFY sess_lifetime INTEGER UNSIGNED NOT NULL` to - update your database. - * `PdoSessionHandler` now precalculates the expiry timestamp in the lifetime column, - make sure to run `CREATE INDEX EXPIRY ON sessions (sess_lifetime)` to update your database - to speed up garbage collection of expired sessions. - * added `SessionHandlerFactory` to create session handlers with a DSN - * added `IpUtils::anonymize()` to help with GDPR compliance. - -4.3.0 ------ - - * added PHPUnit constraints: `RequestAttributeValueSame`, `ResponseCookieValueSame`, `ResponseHasCookie`, - `ResponseHasHeader`, `ResponseHeaderSame`, `ResponseIsRedirected`, `ResponseIsSuccessful`, and `ResponseStatusCodeSame` - * deprecated `MimeTypeGuesserInterface` and `ExtensionGuesserInterface` in favor of `Symfony\Component\Mime\MimeTypesInterface`. - * deprecated `MimeType` and `MimeTypeExtensionGuesser` in favor of `Symfony\Component\Mime\MimeTypes`. - * deprecated `FileBinaryMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileBinaryMimeTypeGuesser`. - * deprecated `FileinfoMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileinfoMimeTypeGuesser`. - * added `UrlHelper` that allows to get an absolute URL and a relative path for a given path - -4.2.0 ------ - - * the default value of the "$secure" and "$samesite" arguments of Cookie's constructor - will respectively change from "false" to "null" and from "null" to "lax" in Symfony - 5.0, you should define their values explicitly or use "Cookie::create()" instead. - * added `matchPort()` in RequestMatcher - -4.1.3 ------ - - * [BC BREAK] Support for the IIS-only `X_ORIGINAL_URL` and `X_REWRITE_URL` - HTTP headers has been dropped for security reasons. - -4.1.0 ------ - - * Query string normalization uses `parse_str()` instead of custom parsing logic. - * Passing the file size to the constructor of the `UploadedFile` class is deprecated. - * The `getClientSize()` method of the `UploadedFile` class is deprecated. Use `getSize()` instead. - * added `RedisSessionHandler` to use Redis as a session storage - * The `get()` method of the `AcceptHeader` class now takes into account the - `*` and `*/*` default values (if they are present in the Accept HTTP header) - when looking for items. - * deprecated `Request::getSession()` when no session has been set. Use `Request::hasSession()` instead. - * added `CannotWriteFileException`, `ExtensionFileException`, `FormSizeFileException`, - `IniSizeFileException`, `NoFileException`, `NoTmpDirFileException`, `PartialFileException` to - handle failed `UploadedFile`. - * added `MigratingSessionHandler` for migrating between two session handlers without losing sessions - * added `HeaderUtils`. - -4.0.0 ------ - - * the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` - methods have been removed - * the `Request::HEADER_CLIENT_IP` constant has been removed, use - `Request::HEADER_X_FORWARDED_FOR` instead - * the `Request::HEADER_CLIENT_HOST` constant has been removed, use - `Request::HEADER_X_FORWARDED_HOST` instead - * the `Request::HEADER_CLIENT_PROTO` constant has been removed, use - `Request::HEADER_X_FORWARDED_PROTO` instead - * the `Request::HEADER_CLIENT_PORT` constant has been removed, use - `Request::HEADER_X_FORWARDED_PORT` instead - * checking for cacheable HTTP methods using the `Request::isMethodSafe()` - method (by not passing `false` as its argument) is not supported anymore and - throws a `\BadMethodCallException` - * the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes have been removed - * setting session save handlers that do not implement `\SessionHandlerInterface` in - `NativeSessionStorage::setSaveHandler()` is not supported anymore and throws a - `\TypeError` - -3.4.0 ------ - - * implemented PHP 7.0's `SessionUpdateTimestampHandlerInterface` with a new - `AbstractSessionHandler` base class and a new `StrictSessionHandler` wrapper - * deprecated the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes - * deprecated setting session save handlers that do not implement `\SessionHandlerInterface` in `NativeSessionStorage::setSaveHandler()` - * deprecated using `MongoDbSessionHandler` with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb instead - * deprecated `MemcacheSessionHandler`; use `MemcachedSessionHandler` instead - -3.3.0 ------ - - * the `Request::setTrustedProxies()` method takes a new `$trustedHeaderSet` argument, - see https://symfony.com/doc/current/deployment/proxies.html for more info, - * deprecated the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` methods, - * added `File\Stream`, to be passed to `BinaryFileResponse` when the size of the served file is unknown, - disabling `Range` and `Content-Length` handling, switching to chunked encoding instead - * added the `Cookie::fromString()` method that allows to create a cookie from a - raw header string - -3.1.0 ------ - - * Added support for creating `JsonResponse` with a string of JSON data - -3.0.0 ------ - - * The precedence of parameters returned from `Request::get()` changed from "GET, PATH, BODY" to "PATH, GET, BODY" - -2.8.0 ------ - - * Finding deep items in `ParameterBag::get()` is deprecated since version 2.8 and - will be removed in 3.0. - -2.6.0 ------ - - * PdoSessionHandler changes - - implemented different session locking strategies to prevent loss of data by concurrent access to the same session - - [BC BREAK] save session data in a binary column without base64_encode - - [BC BREAK] added lifetime column to the session table which allows to have different lifetimes for each session - - implemented lazy connections that are only opened when a session is used by either passing a dsn string - explicitly or falling back to session.save_path ini setting - - added a createTable method that initializes a correctly defined table depending on the database vendor - -2.5.0 ------ - - * added `JsonResponse::setEncodingOptions()` & `JsonResponse::getEncodingOptions()` for easier manipulation - of the options used while encoding data to JSON format. - -2.4.0 ------ - - * added RequestStack - * added Request::getEncodings() - * added accessors methods to session handlers - -2.3.0 ------ - - * added support for ranges of IPs in trusted proxies - * `UploadedFile::isValid` now returns false if the file was not uploaded via HTTP (in a non-test mode) - * Improved error-handling of `\Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler` - to ensure the supplied PDO handler throws Exceptions on error (as the class expects). Added related test cases - to verify that Exceptions are properly thrown when the PDO queries fail. - -2.2.0 ------ - - * fixed the Request::create() precedence (URI information always take precedence now) - * added Request::getTrustedProxies() - * deprecated Request::isProxyTrusted() - * [BC BREAK] JsonResponse does not turn a top level empty array to an object anymore, use an ArrayObject to enforce objects - * added a IpUtils class to check if an IP belongs to a CIDR - * added Request::getRealMethod() to get the "real" HTTP method (getMethod() returns the "intended" HTTP method) - * disabled _method request parameter support by default (call Request::enableHttpMethodParameterOverride() to - enable it, and Request::getHttpMethodParameterOverride() to check if it is supported) - * Request::splitHttpAcceptHeader() method is deprecated and will be removed in 2.3 - * Deprecated Flashbag::count() and \Countable interface, will be removed in 2.3 - -2.1.0 ------ - - * added Request::getSchemeAndHttpHost() and Request::getUserInfo() - * added a fluent interface to the Response class - * added Request::isProxyTrusted() - * added JsonResponse - * added a getTargetUrl method to RedirectResponse - * added support for streamed responses - * made Response::prepare() method the place to enforce HTTP specification - * [BC BREAK] moved management of the locale from the Session class to the Request class - * added a generic access to the PHP built-in filter mechanism: ParameterBag::filter() - * made FileBinaryMimeTypeGuesser command configurable - * added Request::getUser() and Request::getPassword() - * added support for the PATCH method in Request - * removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3 - * added ResponseHeaderBag::makeDisposition() (implements RFC 6266) - * made mimetype to extension conversion configurable - * [BC BREAK] Moved all session related classes and interfaces into own namespace, as - `Symfony\Component\HttpFoundation\Session` and renamed classes accordingly. - Session handlers are located in the subnamespace `Symfony\Component\HttpFoundation\Session\Handler`. - * SessionHandlers must implement `\SessionHandlerInterface` or extend from the - `Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class. - * Added internal storage driver proxy mechanism for forward compatibility with - PHP 5.4 `\SessionHandler` class. - * Added session handlers for custom Memcache, Memcached and Null session save handlers. - * [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`. - * [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and - `remove()`. Added `getBag()`, `registerBag()`. The `NativeSessionStorage` class - is a mediator for the session storage internals including the session handlers - which do the real work of participating in the internal PHP session workflow. - * [BC BREAK] Introduced mock implementations of `SessionStorage` to enable unit - and functional testing without starting real PHP sessions. Removed - `ArraySessionStorage`, and replaced with `MockArraySessionStorage` for unit - tests; removed `FilesystemSessionStorage`, and replaced with`MockFileSessionStorage` - for functional tests. These do not interact with global session ini - configuration values, session functions or `$_SESSION` superglobal. This means - they can be configured directly allowing multiple instances to work without - conflicting in the same PHP process. - * [BC BREAK] Removed the `close()` method from the `Session` class, as this is - now redundant. - * Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()` - `getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead - which returns a `FlashBagInterface`. - * `Session->clear()` now only clears session attributes as before it cleared - flash messages and attributes. `Session->getFlashBag()->all()` clears flashes now. - * Session data is now managed by `SessionBagInterface` to better encapsulate - session data. - * Refactored session attribute and flash messages system to their own - `SessionBagInterface` implementations. - * Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This - implementation is ESI compatible. - * Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire - behavior of messages auto expiring after one page page load. Messages must - be retrieved by `get()` or `all()`. - * Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate - attributes storage behavior from 2.0.x (default). - * Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for - namespace session attributes. - * Flash API can stores messages in an array so there may be multiple messages - per flash type. The old `Session` class API remains without BC break as it - will allow single messages as before. - * Added basic session meta-data to the session to record session create time, - last updated time, and the lifetime of the session cookie that was provided - to the client. - * Request::getClientIp() method doesn't take a parameter anymore but bases - itself on the trustProxy parameter. - * Added isMethod() to Request object. - * [BC BREAK] The methods `getPathInfo()`, `getBaseUrl()` and `getBasePath()` of - a `Request` now all return a raw value (vs a urldecoded value before). Any call - to one of these methods must be checked and wrapped in a `rawurldecode()` if - needed. diff --git a/lib/symfony/http-foundation/Cookie.php b/lib/symfony/http-foundation/Cookie.php deleted file mode 100644 index b4b26c015..000000000 --- a/lib/symfony/http-foundation/Cookie.php +++ /dev/null @@ -1,422 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Represents a cookie. - * - * @author Johannes M. Schmitt - */ -class Cookie -{ - public const SAMESITE_NONE = 'none'; - public const SAMESITE_LAX = 'lax'; - public const SAMESITE_STRICT = 'strict'; - - protected $name; - protected $value; - protected $domain; - protected $expire; - protected $path; - protected $secure; - protected $httpOnly; - - private $raw; - private $sameSite; - private $secureDefault = false; - - private const RESERVED_CHARS_LIST = "=,; \t\r\n\v\f"; - private const RESERVED_CHARS_FROM = ['=', ',', ';', ' ', "\t", "\r", "\n", "\v", "\f"]; - private const RESERVED_CHARS_TO = ['%3D', '%2C', '%3B', '%20', '%09', '%0D', '%0A', '%0B', '%0C']; - - /** - * Creates cookie from raw header string. - * - * @return static - */ - public static function fromString(string $cookie, bool $decode = false) - { - $data = [ - 'expires' => 0, - 'path' => '/', - 'domain' => null, - 'secure' => false, - 'httponly' => false, - 'raw' => !$decode, - 'samesite' => null, - ]; - - $parts = HeaderUtils::split($cookie, ';='); - $part = array_shift($parts); - - $name = $decode ? urldecode($part[0]) : $part[0]; - $value = isset($part[1]) ? ($decode ? urldecode($part[1]) : $part[1]) : null; - - $data = HeaderUtils::combine($parts) + $data; - $data['expires'] = self::expiresTimestamp($data['expires']); - - if (isset($data['max-age']) && ($data['max-age'] > 0 || $data['expires'] > time())) { - $data['expires'] = time() + (int) $data['max-age']; - } - - return new static($name, $value, $data['expires'], $data['path'], $data['domain'], $data['secure'], $data['httponly'], $data['raw'], $data['samesite']); - } - - public static function create(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = self::SAMESITE_LAX): self - { - return new self($name, $value, $expire, $path, $domain, $secure, $httpOnly, $raw, $sameSite); - } - - /** - * @param string $name The name of the cookie - * @param string|null $value The value of the cookie - * @param int|string|\DateTimeInterface $expire The time the cookie expires - * @param string $path The path on the server in which the cookie will be available on - * @param string|null $domain The domain that the cookie is available to - * @param bool|null $secure Whether the client should send back the cookie only over HTTPS or null to auto-enable this when the request is already using HTTPS - * @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol - * @param bool $raw Whether the cookie value should be sent with no url encoding - * @param string|null $sameSite Whether the cookie will be available for cross-site requests - * - * @throws \InvalidArgumentException - */ - public function __construct(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = 'lax') - { - // from PHP source code - if ($raw && false !== strpbrk($name, self::RESERVED_CHARS_LIST)) { - throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); - } - - if (empty($name)) { - throw new \InvalidArgumentException('The cookie name cannot be empty.'); - } - - $this->name = $name; - $this->value = $value; - $this->domain = $domain; - $this->expire = self::expiresTimestamp($expire); - $this->path = empty($path) ? '/' : $path; - $this->secure = $secure; - $this->httpOnly = $httpOnly; - $this->raw = $raw; - $this->sameSite = $this->withSameSite($sameSite)->sameSite; - } - - /** - * Creates a cookie copy with a new value. - * - * @return static - */ - public function withValue(?string $value): self - { - $cookie = clone $this; - $cookie->value = $value; - - return $cookie; - } - - /** - * Creates a cookie copy with a new domain that the cookie is available to. - * - * @return static - */ - public function withDomain(?string $domain): self - { - $cookie = clone $this; - $cookie->domain = $domain; - - return $cookie; - } - - /** - * Creates a cookie copy with a new time the cookie expires. - * - * @param int|string|\DateTimeInterface $expire - * - * @return static - */ - public function withExpires($expire = 0): self - { - $cookie = clone $this; - $cookie->expire = self::expiresTimestamp($expire); - - return $cookie; - } - - /** - * Converts expires formats to a unix timestamp. - * - * @param int|string|\DateTimeInterface $expire - */ - private static function expiresTimestamp($expire = 0): int - { - // convert expiration time to a Unix timestamp - if ($expire instanceof \DateTimeInterface) { - $expire = $expire->format('U'); - } elseif (!is_numeric($expire)) { - $expire = strtotime($expire); - - if (false === $expire) { - throw new \InvalidArgumentException('The cookie expiration time is not valid.'); - } - } - - return 0 < $expire ? (int) $expire : 0; - } - - /** - * Creates a cookie copy with a new path on the server in which the cookie will be available on. - * - * @return static - */ - public function withPath(string $path): self - { - $cookie = clone $this; - $cookie->path = '' === $path ? '/' : $path; - - return $cookie; - } - - /** - * Creates a cookie copy that only be transmitted over a secure HTTPS connection from the client. - * - * @return static - */ - public function withSecure(bool $secure = true): self - { - $cookie = clone $this; - $cookie->secure = $secure; - - return $cookie; - } - - /** - * Creates a cookie copy that be accessible only through the HTTP protocol. - * - * @return static - */ - public function withHttpOnly(bool $httpOnly = true): self - { - $cookie = clone $this; - $cookie->httpOnly = $httpOnly; - - return $cookie; - } - - /** - * Creates a cookie copy that uses no url encoding. - * - * @return static - */ - public function withRaw(bool $raw = true): self - { - if ($raw && false !== strpbrk($this->name, self::RESERVED_CHARS_LIST)) { - throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $this->name)); - } - - $cookie = clone $this; - $cookie->raw = $raw; - - return $cookie; - } - - /** - * Creates a cookie copy with SameSite attribute. - * - * @return static - */ - public function withSameSite(?string $sameSite): self - { - if ('' === $sameSite) { - $sameSite = null; - } elseif (null !== $sameSite) { - $sameSite = strtolower($sameSite); - } - - if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, self::SAMESITE_NONE, null], true)) { - throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); - } - - $cookie = clone $this; - $cookie->sameSite = $sameSite; - - return $cookie; - } - - /** - * Returns the cookie as a string. - * - * @return string - */ - public function __toString() - { - if ($this->isRaw()) { - $str = $this->getName(); - } else { - $str = str_replace(self::RESERVED_CHARS_FROM, self::RESERVED_CHARS_TO, $this->getName()); - } - - $str .= '='; - - if ('' === (string) $this->getValue()) { - $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; Max-Age=0'; - } else { - $str .= $this->isRaw() ? $this->getValue() : rawurlencode($this->getValue()); - - if (0 !== $this->getExpiresTime()) { - $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()).'; Max-Age='.$this->getMaxAge(); - } - } - - if ($this->getPath()) { - $str .= '; path='.$this->getPath(); - } - - if ($this->getDomain()) { - $str .= '; domain='.$this->getDomain(); - } - - if (true === $this->isSecure()) { - $str .= '; secure'; - } - - if (true === $this->isHttpOnly()) { - $str .= '; httponly'; - } - - if (null !== $this->getSameSite()) { - $str .= '; samesite='.$this->getSameSite(); - } - - return $str; - } - - /** - * Gets the name of the cookie. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Gets the value of the cookie. - * - * @return string|null - */ - public function getValue() - { - return $this->value; - } - - /** - * Gets the domain that the cookie is available to. - * - * @return string|null - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Gets the time the cookie expires. - * - * @return int - */ - public function getExpiresTime() - { - return $this->expire; - } - - /** - * Gets the max-age attribute. - * - * @return int - */ - public function getMaxAge() - { - $maxAge = $this->expire - time(); - - return 0 >= $maxAge ? 0 : $maxAge; - } - - /** - * Gets the path on the server in which the cookie will be available on. - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client. - * - * @return bool - */ - public function isSecure() - { - return $this->secure ?? $this->secureDefault; - } - - /** - * Checks whether the cookie will be made accessible only through the HTTP protocol. - * - * @return bool - */ - public function isHttpOnly() - { - return $this->httpOnly; - } - - /** - * Whether this cookie is about to be cleared. - * - * @return bool - */ - public function isCleared() - { - return 0 !== $this->expire && $this->expire < time(); - } - - /** - * Checks if the cookie value should be sent with no url encoding. - * - * @return bool - */ - public function isRaw() - { - return $this->raw; - } - - /** - * Gets the SameSite attribute. - * - * @return string|null - */ - public function getSameSite() - { - return $this->sameSite; - } - - /** - * @param bool $default The default value of the "secure" flag when it is set to null - */ - public function setSecureDefault(bool $default): void - { - $this->secureDefault = $default; - } -} diff --git a/lib/symfony/http-foundation/Exception/BadRequestException.php b/lib/symfony/http-foundation/Exception/BadRequestException.php deleted file mode 100644 index e4bb309c4..000000000 --- a/lib/symfony/http-foundation/Exception/BadRequestException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a user sends a malformed request. - */ -class BadRequestException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/lib/symfony/http-foundation/Exception/ConflictingHeadersException.php b/lib/symfony/http-foundation/Exception/ConflictingHeadersException.php deleted file mode 100644 index 5fcf5b426..000000000 --- a/lib/symfony/http-foundation/Exception/ConflictingHeadersException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * The HTTP request contains headers with conflicting information. - * - * @author Magnus Nordlander - */ -class ConflictingHeadersException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/lib/symfony/http-foundation/Exception/JsonException.php b/lib/symfony/http-foundation/Exception/JsonException.php deleted file mode 100644 index 5990e760e..000000000 --- a/lib/symfony/http-foundation/Exception/JsonException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Thrown by Request::toArray() when the content cannot be JSON-decoded. - * - * @author Tobias Nyholm - */ -final class JsonException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/lib/symfony/http-foundation/Exception/RequestExceptionInterface.php b/lib/symfony/http-foundation/Exception/RequestExceptionInterface.php deleted file mode 100644 index 478d0dc7e..000000000 --- a/lib/symfony/http-foundation/Exception/RequestExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Interface for Request exceptions. - * - * Exceptions implementing this interface should trigger an HTTP 400 response in the application code. - */ -interface RequestExceptionInterface -{ -} diff --git a/lib/symfony/http-foundation/Exception/SessionNotFoundException.php b/lib/symfony/http-foundation/Exception/SessionNotFoundException.php deleted file mode 100644 index 94b0cb69a..000000000 --- a/lib/symfony/http-foundation/Exception/SessionNotFoundException.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a session does not exist. This happens in the following cases: - * - the session is not enabled - * - attempt to read a session outside a request context (ie. cli script). - * - * @author Jérémy Derussé - */ -class SessionNotFoundException extends \LogicException implements RequestExceptionInterface -{ - public function __construct(string $message = 'There is currently no session available.', int $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - } -} diff --git a/lib/symfony/http-foundation/Exception/SuspiciousOperationException.php b/lib/symfony/http-foundation/Exception/SuspiciousOperationException.php deleted file mode 100644 index ae7a5f133..000000000 --- a/lib/symfony/http-foundation/Exception/SuspiciousOperationException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a user has performed an operation that should be considered - * suspicious from a security perspective. - */ -class SuspiciousOperationException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/lib/symfony/http-foundation/ExpressionRequestMatcher.php b/lib/symfony/http-foundation/ExpressionRequestMatcher.php deleted file mode 100644 index 26bed7d37..000000000 --- a/lib/symfony/http-foundation/ExpressionRequestMatcher.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; - -/** - * ExpressionRequestMatcher uses an expression to match a Request. - * - * @author Fabien Potencier - */ -class ExpressionRequestMatcher extends RequestMatcher -{ - private $language; - private $expression; - - public function setExpression(ExpressionLanguage $language, $expression) - { - $this->language = $language; - $this->expression = $expression; - } - - public function matches(Request $request) - { - if (!$this->language) { - throw new \LogicException('Unable to match the request as the expression language is not available.'); - } - - return $this->language->evaluate($this->expression, [ - 'request' => $request, - 'method' => $request->getMethod(), - 'path' => rawurldecode($request->getPathInfo()), - 'host' => $request->getHost(), - 'ip' => $request->getClientIp(), - 'attributes' => $request->attributes->all(), - ]) && parent::matches($request); - } -} diff --git a/lib/symfony/http-foundation/File/Exception/AccessDeniedException.php b/lib/symfony/http-foundation/File/Exception/AccessDeniedException.php deleted file mode 100644 index 136d2a9f5..000000000 --- a/lib/symfony/http-foundation/File/Exception/AccessDeniedException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when the access on a file was denied. - * - * @author Bernhard Schussek - */ -class AccessDeniedException extends FileException -{ - public function __construct(string $path) - { - parent::__construct(sprintf('The file %s could not be accessed', $path)); - } -} diff --git a/lib/symfony/http-foundation/File/Exception/CannotWriteFileException.php b/lib/symfony/http-foundation/File/Exception/CannotWriteFileException.php deleted file mode 100644 index c49f53a6c..000000000 --- a/lib/symfony/http-foundation/File/Exception/CannotWriteFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_CANT_WRITE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class CannotWriteFileException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/ExtensionFileException.php b/lib/symfony/http-foundation/File/Exception/ExtensionFileException.php deleted file mode 100644 index ed83499c0..000000000 --- a/lib/symfony/http-foundation/File/Exception/ExtensionFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_EXTENSION error occurred with UploadedFile. - * - * @author Florent Mata - */ -class ExtensionFileException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/FileException.php b/lib/symfony/http-foundation/File/Exception/FileException.php deleted file mode 100644 index fad5133e1..000000000 --- a/lib/symfony/http-foundation/File/Exception/FileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an error occurred in the component File. - * - * @author Bernhard Schussek - */ -class FileException extends \RuntimeException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/FileNotFoundException.php b/lib/symfony/http-foundation/File/Exception/FileNotFoundException.php deleted file mode 100644 index 31bdf68fe..000000000 --- a/lib/symfony/http-foundation/File/Exception/FileNotFoundException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when a file was not found. - * - * @author Bernhard Schussek - */ -class FileNotFoundException extends FileException -{ - public function __construct(string $path) - { - parent::__construct(sprintf('The file "%s" does not exist', $path)); - } -} diff --git a/lib/symfony/http-foundation/File/Exception/FormSizeFileException.php b/lib/symfony/http-foundation/File/Exception/FormSizeFileException.php deleted file mode 100644 index 8741be088..000000000 --- a/lib/symfony/http-foundation/File/Exception/FormSizeFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_FORM_SIZE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class FormSizeFileException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/IniSizeFileException.php b/lib/symfony/http-foundation/File/Exception/IniSizeFileException.php deleted file mode 100644 index c8fde6103..000000000 --- a/lib/symfony/http-foundation/File/Exception/IniSizeFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_INI_SIZE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class IniSizeFileException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/NoFileException.php b/lib/symfony/http-foundation/File/Exception/NoFileException.php deleted file mode 100644 index 4b48cc779..000000000 --- a/lib/symfony/http-foundation/File/Exception/NoFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_NO_FILE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class NoFileException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/NoTmpDirFileException.php b/lib/symfony/http-foundation/File/Exception/NoTmpDirFileException.php deleted file mode 100644 index bdead2d91..000000000 --- a/lib/symfony/http-foundation/File/Exception/NoTmpDirFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_NO_TMP_DIR error occurred with UploadedFile. - * - * @author Florent Mata - */ -class NoTmpDirFileException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/PartialFileException.php b/lib/symfony/http-foundation/File/Exception/PartialFileException.php deleted file mode 100644 index 4641efb55..000000000 --- a/lib/symfony/http-foundation/File/Exception/PartialFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_PARTIAL error occurred with UploadedFile. - * - * @author Florent Mata - */ -class PartialFileException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/Exception/UnexpectedTypeException.php b/lib/symfony/http-foundation/File/Exception/UnexpectedTypeException.php deleted file mode 100644 index 8533f99a8..000000000 --- a/lib/symfony/http-foundation/File/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -class UnexpectedTypeException extends FileException -{ - public function __construct($value, string $expectedType) - { - parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, get_debug_type($value))); - } -} diff --git a/lib/symfony/http-foundation/File/Exception/UploadException.php b/lib/symfony/http-foundation/File/Exception/UploadException.php deleted file mode 100644 index 7074e7653..000000000 --- a/lib/symfony/http-foundation/File/Exception/UploadException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an error occurred during file upload. - * - * @author Bernhard Schussek - */ -class UploadException extends FileException -{ -} diff --git a/lib/symfony/http-foundation/File/File.php b/lib/symfony/http-foundation/File/File.php deleted file mode 100644 index d941577d2..000000000 --- a/lib/symfony/http-foundation/File/File.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; -use Symfony\Component\Mime\MimeTypes; - -/** - * A file in the file system. - * - * @author Bernhard Schussek - */ -class File extends \SplFileInfo -{ - /** - * Constructs a new file from the given path. - * - * @param string $path The path to the file - * @param bool $checkPath Whether to check the path or not - * - * @throws FileNotFoundException If the given path is not a file - */ - public function __construct(string $path, bool $checkPath = true) - { - if ($checkPath && !is_file($path)) { - throw new FileNotFoundException($path); - } - - parent::__construct($path); - } - - /** - * Returns the extension based on the mime type. - * - * If the mime type is unknown, returns null. - * - * This method uses the mime type as guessed by getMimeType() - * to guess the file extension. - * - * @return string|null - * - * @see MimeTypes - * @see getMimeType() - */ - public function guessExtension() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the extension as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->getExtensions($this->getMimeType())[0] ?? null; - } - - /** - * Returns the mime type of the file. - * - * The mime type is guessed using a MimeTypeGuesserInterface instance, - * which uses finfo_file() then the "file" system binary, - * depending on which of those are available. - * - * @return string|null - * - * @see MimeTypes - */ - public function getMimeType() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the mime type as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->guessMimeType($this->getPathname()); - } - - /** - * Moves the file to a new location. - * - * @return self - * - * @throws FileException if the target file could not be created - */ - public function move(string $directory, string $name = null) - { - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $renamed = rename($this->getPathname(), $target); - } finally { - restore_error_handler(); - } - if (!$renamed) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod($target, 0666 & ~umask()); - - return $target; - } - - public function getContent(): string - { - $content = file_get_contents($this->getPathname()); - - if (false === $content) { - throw new FileException(sprintf('Could not get the content of the file "%s".', $this->getPathname())); - } - - return $content; - } - - /** - * @return self - */ - protected function getTargetFile(string $directory, string $name = null) - { - if (!is_dir($directory)) { - if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) { - throw new FileException(sprintf('Unable to create the "%s" directory.', $directory)); - } - } elseif (!is_writable($directory)) { - throw new FileException(sprintf('Unable to write in the "%s" directory.', $directory)); - } - - $target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); - - return new self($target, false); - } - - /** - * Returns locale independent base name of the given path. - * - * @return string - */ - protected function getName(string $name) - { - $originalName = str_replace('\\', '/', $name); - $pos = strrpos($originalName, '/'); - $originalName = false === $pos ? $originalName : substr($originalName, $pos + 1); - - return $originalName; - } -} diff --git a/lib/symfony/http-foundation/File/Stream.php b/lib/symfony/http-foundation/File/Stream.php deleted file mode 100644 index cef3e0397..000000000 --- a/lib/symfony/http-foundation/File/Stream.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -/** - * A PHP stream of unknown size. - * - * @author Nicolas Grekas - */ -class Stream extends File -{ - /** - * {@inheritdoc} - * - * @return int|false - */ - #[\ReturnTypeWillChange] - public function getSize() - { - return false; - } -} diff --git a/lib/symfony/http-foundation/File/UploadedFile.php b/lib/symfony/http-foundation/File/UploadedFile.php deleted file mode 100644 index fcc629913..000000000 --- a/lib/symfony/http-foundation/File/UploadedFile.php +++ /dev/null @@ -1,290 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -use Symfony\Component\HttpFoundation\File\Exception\CannotWriteFileException; -use Symfony\Component\HttpFoundation\File\Exception\ExtensionFileException; -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; -use Symfony\Component\HttpFoundation\File\Exception\FormSizeFileException; -use Symfony\Component\HttpFoundation\File\Exception\IniSizeFileException; -use Symfony\Component\HttpFoundation\File\Exception\NoFileException; -use Symfony\Component\HttpFoundation\File\Exception\NoTmpDirFileException; -use Symfony\Component\HttpFoundation\File\Exception\PartialFileException; -use Symfony\Component\Mime\MimeTypes; - -/** - * A file uploaded through a form. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - * @author Fabien Potencier - */ -class UploadedFile extends File -{ - private $test; - private $originalName; - private $mimeType; - private $error; - - /** - * Accepts the information of the uploaded file as provided by the PHP global $_FILES. - * - * The file object is only created when the uploaded file is valid (i.e. when the - * isValid() method returns true). Otherwise the only methods that could be called - * on an UploadedFile instance are: - * - * * getClientOriginalName, - * * getClientMimeType, - * * isValid, - * * getError. - * - * Calling any other method on an non-valid instance will cause an unpredictable result. - * - * @param string $path The full temporary path to the file - * @param string $originalName The original file name of the uploaded file - * @param string|null $mimeType The type of the file as provided by PHP; null defaults to application/octet-stream - * @param int|null $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants); null defaults to UPLOAD_ERR_OK - * @param bool $test Whether the test mode is active - * Local files are used in test mode hence the code should not enforce HTTP uploads - * - * @throws FileException If file_uploads is disabled - * @throws FileNotFoundException If the file does not exist - */ - public function __construct(string $path, string $originalName, string $mimeType = null, int $error = null, bool $test = false) - { - $this->originalName = $this->getName($originalName); - $this->mimeType = $mimeType ?: 'application/octet-stream'; - $this->error = $error ?: \UPLOAD_ERR_OK; - $this->test = $test; - - parent::__construct($path, \UPLOAD_ERR_OK === $this->error); - } - - /** - * Returns the original file name. - * - * It is extracted from the request from which the file has been uploaded. - * Then it should not be considered as a safe value. - * - * @return string - */ - public function getClientOriginalName() - { - return $this->originalName; - } - - /** - * Returns the original file extension. - * - * It is extracted from the original file name that was uploaded. - * Then it should not be considered as a safe value. - * - * @return string - */ - public function getClientOriginalExtension() - { - return pathinfo($this->originalName, \PATHINFO_EXTENSION); - } - - /** - * Returns the file mime type. - * - * The client mime type is extracted from the request from which the file - * was uploaded, so it should not be considered as a safe value. - * - * For a trusted mime type, use getMimeType() instead (which guesses the mime - * type based on the file content). - * - * @return string - * - * @see getMimeType() - */ - public function getClientMimeType() - { - return $this->mimeType; - } - - /** - * Returns the extension based on the client mime type. - * - * If the mime type is unknown, returns null. - * - * This method uses the mime type as guessed by getClientMimeType() - * to guess the file extension. As such, the extension returned - * by this method cannot be trusted. - * - * For a trusted extension, use guessExtension() instead (which guesses - * the extension based on the guessed mime type for the file). - * - * @return string|null - * - * @see guessExtension() - * @see getClientMimeType() - */ - public function guessClientExtension() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the extension as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->getExtensions($this->getClientMimeType())[0] ?? null; - } - - /** - * Returns the upload error. - * - * If the upload was successful, the constant UPLOAD_ERR_OK is returned. - * Otherwise one of the other UPLOAD_ERR_XXX constants is returned. - * - * @return int - */ - public function getError() - { - return $this->error; - } - - /** - * Returns whether the file has been uploaded with HTTP and no error occurred. - * - * @return bool - */ - public function isValid() - { - $isOk = \UPLOAD_ERR_OK === $this->error; - - return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname()); - } - - /** - * Moves the file to a new location. - * - * @return File - * - * @throws FileException if, for any reason, the file could not have been moved - */ - public function move(string $directory, string $name = null) - { - if ($this->isValid()) { - if ($this->test) { - return parent::move($directory, $name); - } - - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $moved = move_uploaded_file($this->getPathname(), $target); - } finally { - restore_error_handler(); - } - if (!$moved) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod($target, 0666 & ~umask()); - - return $target; - } - - switch ($this->error) { - case \UPLOAD_ERR_INI_SIZE: - throw new IniSizeFileException($this->getErrorMessage()); - case \UPLOAD_ERR_FORM_SIZE: - throw new FormSizeFileException($this->getErrorMessage()); - case \UPLOAD_ERR_PARTIAL: - throw new PartialFileException($this->getErrorMessage()); - case \UPLOAD_ERR_NO_FILE: - throw new NoFileException($this->getErrorMessage()); - case \UPLOAD_ERR_CANT_WRITE: - throw new CannotWriteFileException($this->getErrorMessage()); - case \UPLOAD_ERR_NO_TMP_DIR: - throw new NoTmpDirFileException($this->getErrorMessage()); - case \UPLOAD_ERR_EXTENSION: - throw new ExtensionFileException($this->getErrorMessage()); - } - - throw new FileException($this->getErrorMessage()); - } - - /** - * Returns the maximum size of an uploaded file as configured in php.ini. - * - * @return int|float The maximum size of an uploaded file in bytes (returns float if size > PHP_INT_MAX) - */ - public static function getMaxFilesize() - { - $sizePostMax = self::parseFilesize(\ini_get('post_max_size')); - $sizeUploadMax = self::parseFilesize(\ini_get('upload_max_filesize')); - - return min($sizePostMax ?: \PHP_INT_MAX, $sizeUploadMax ?: \PHP_INT_MAX); - } - - /** - * Returns the given size from an ini value in bytes. - * - * @return int|float Returns float if size > PHP_INT_MAX - */ - private static function parseFilesize(string $size) - { - if ('' === $size) { - return 0; - } - - $size = strtolower($size); - - $max = ltrim($size, '+'); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($size, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } - - /** - * Returns an informative upload error message. - * - * @return string - */ - public function getErrorMessage() - { - static $errors = [ - \UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', - \UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', - \UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', - \UPLOAD_ERR_NO_FILE => 'No file was uploaded.', - \UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', - \UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', - \UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', - ]; - - $errorCode = $this->error; - $maxFilesize = \UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0; - $message = $errors[$errorCode] ?? 'The file "%s" was not uploaded due to an unknown error.'; - - return sprintf($message, $this->getClientOriginalName(), $maxFilesize); - } -} diff --git a/lib/symfony/http-foundation/FileBag.php b/lib/symfony/http-foundation/FileBag.php deleted file mode 100644 index ff5ab7778..000000000 --- a/lib/symfony/http-foundation/FileBag.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\File\UploadedFile; - -/** - * FileBag is a container for uploaded files. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - */ -class FileBag extends ParameterBag -{ - private const FILE_KEYS = ['error', 'name', 'size', 'tmp_name', 'type']; - - /** - * @param array|UploadedFile[] $parameters An array of HTTP files - */ - public function __construct(array $parameters = []) - { - $this->replace($parameters); - } - - /** - * {@inheritdoc} - */ - public function replace(array $files = []) - { - $this->parameters = []; - $this->add($files); - } - - /** - * {@inheritdoc} - */ - public function set(string $key, $value) - { - if (!\is_array($value) && !$value instanceof UploadedFile) { - throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); - } - - parent::set($key, $this->convertFileInformation($value)); - } - - /** - * {@inheritdoc} - */ - public function add(array $files = []) - { - foreach ($files as $key => $file) { - $this->set($key, $file); - } - } - - /** - * Converts uploaded files to UploadedFile instances. - * - * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information - * - * @return UploadedFile[]|UploadedFile|null - */ - protected function convertFileInformation($file) - { - if ($file instanceof UploadedFile) { - return $file; - } - - $file = $this->fixPhpFilesArray($file); - $keys = array_keys($file); - sort($keys); - - if (self::FILE_KEYS == $keys) { - if (\UPLOAD_ERR_NO_FILE == $file['error']) { - $file = null; - } else { - $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error'], false); - } - } else { - $file = array_map(function ($v) { return $v instanceof UploadedFile || \is_array($v) ? $this->convertFileInformation($v) : $v; }, $file); - if (array_keys($keys) === $keys) { - $file = array_filter($file); - } - } - - return $file; - } - - /** - * Fixes a malformed PHP $_FILES array. - * - * PHP has a bug that the format of the $_FILES array differs, depending on - * whether the uploaded file fields had normal field names or array-like - * field names ("normal" vs. "parent[child]"). - * - * This method fixes the array to look like the "normal" $_FILES array. - * - * It's safe to pass an already converted array, in which case this method - * just returns the original array unmodified. - * - * @return array - */ - protected function fixPhpFilesArray(array $data) - { - // Remove extra key added by PHP 8.1. - unset($data['full_path']); - $keys = array_keys($data); - sort($keys); - - if (self::FILE_KEYS != $keys || !isset($data['name']) || !\is_array($data['name'])) { - return $data; - } - - $files = $data; - foreach (self::FILE_KEYS as $k) { - unset($files[$k]); - } - - foreach ($data['name'] as $key => $name) { - $files[$key] = $this->fixPhpFilesArray([ - 'error' => $data['error'][$key], - 'name' => $name, - 'type' => $data['type'][$key], - 'tmp_name' => $data['tmp_name'][$key], - 'size' => $data['size'][$key], - ]); - } - - return $files; - } -} diff --git a/lib/symfony/http-foundation/HeaderBag.php b/lib/symfony/http-foundation/HeaderBag.php deleted file mode 100644 index 4683a6840..000000000 --- a/lib/symfony/http-foundation/HeaderBag.php +++ /dev/null @@ -1,295 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * HeaderBag is a container for HTTP headers. - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate> - */ -class HeaderBag implements \IteratorAggregate, \Countable -{ - protected const UPPER = '_ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - protected const LOWER = '-abcdefghijklmnopqrstuvwxyz'; - - /** - * @var array> - */ - protected $headers = []; - protected $cacheControl = []; - - public function __construct(array $headers = []) - { - foreach ($headers as $key => $values) { - $this->set($key, $values); - } - } - - /** - * Returns the headers as a string. - * - * @return string - */ - public function __toString() - { - if (!$headers = $this->all()) { - return ''; - } - - ksort($headers); - $max = max(array_map('strlen', array_keys($headers))) + 1; - $content = ''; - foreach ($headers as $name => $values) { - $name = ucwords($name, '-'); - foreach ($values as $value) { - $content .= sprintf("%-{$max}s %s\r\n", $name.':', $value); - } - } - - return $content; - } - - /** - * Returns the headers. - * - * @param string|null $key The name of the headers to return or null to get them all - * - * @return array>|array - */ - public function all(string $key = null) - { - if (null !== $key) { - return $this->headers[strtr($key, self::UPPER, self::LOWER)] ?? []; - } - - return $this->headers; - } - - /** - * Returns the parameter keys. - * - * @return string[] - */ - public function keys() - { - return array_keys($this->all()); - } - - /** - * Replaces the current HTTP headers by a new set. - */ - public function replace(array $headers = []) - { - $this->headers = []; - $this->add($headers); - } - - /** - * Adds new headers the current HTTP headers set. - */ - public function add(array $headers) - { - foreach ($headers as $key => $values) { - $this->set($key, $values); - } - } - - /** - * Returns the first header by name or the default one. - * - * @return string|null - */ - public function get(string $key, string $default = null) - { - $headers = $this->all($key); - - if (!$headers) { - return $default; - } - - if (null === $headers[0]) { - return null; - } - - return (string) $headers[0]; - } - - /** - * Sets a header by name. - * - * @param string|string[]|null $values The value or an array of values - * @param bool $replace Whether to replace the actual value or not (true by default) - */ - public function set(string $key, $values, bool $replace = true) - { - $key = strtr($key, self::UPPER, self::LOWER); - - if (\is_array($values)) { - $values = array_values($values); - - if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = $values; - } else { - $this->headers[$key] = array_merge($this->headers[$key], $values); - } - } else { - if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = [$values]; - } else { - $this->headers[$key][] = $values; - } - } - - if ('cache-control' === $key) { - $this->cacheControl = $this->parseCacheControl(implode(', ', $this->headers[$key])); - } - } - - /** - * Returns true if the HTTP header is defined. - * - * @return bool - */ - public function has(string $key) - { - return \array_key_exists(strtr($key, self::UPPER, self::LOWER), $this->all()); - } - - /** - * Returns true if the given HTTP header contains the given value. - * - * @return bool - */ - public function contains(string $key, string $value) - { - return \in_array($value, $this->all($key)); - } - - /** - * Removes a header. - */ - public function remove(string $key) - { - $key = strtr($key, self::UPPER, self::LOWER); - - unset($this->headers[$key]); - - if ('cache-control' === $key) { - $this->cacheControl = []; - } - } - - /** - * Returns the HTTP header value converted to a date. - * - * @return \DateTimeInterface|null - * - * @throws \RuntimeException When the HTTP header is not parseable - */ - public function getDate(string $key, \DateTime $default = null) - { - if (null === $value = $this->get($key)) { - return $default; - } - - if (false === $date = \DateTime::createFromFormat(\DATE_RFC2822, $value)) { - throw new \RuntimeException(sprintf('The "%s" HTTP header is not parseable (%s).', $key, $value)); - } - - return $date; - } - - /** - * Adds a custom Cache-Control directive. - * - * @param bool|string $value The Cache-Control directive value - */ - public function addCacheControlDirective(string $key, $value = true) - { - $this->cacheControl[$key] = $value; - - $this->set('Cache-Control', $this->getCacheControlHeader()); - } - - /** - * Returns true if the Cache-Control directive is defined. - * - * @return bool - */ - public function hasCacheControlDirective(string $key) - { - return \array_key_exists($key, $this->cacheControl); - } - - /** - * Returns a Cache-Control directive value by name. - * - * @return bool|string|null - */ - public function getCacheControlDirective(string $key) - { - return $this->cacheControl[$key] ?? null; - } - - /** - * Removes a Cache-Control directive. - */ - public function removeCacheControlDirective(string $key) - { - unset($this->cacheControl[$key]); - - $this->set('Cache-Control', $this->getCacheControlHeader()); - } - - /** - * Returns an iterator for headers. - * - * @return \ArrayIterator> - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->headers); - } - - /** - * Returns the number of headers. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->headers); - } - - protected function getCacheControlHeader() - { - ksort($this->cacheControl); - - return HeaderUtils::toString($this->cacheControl, ','); - } - - /** - * Parses a Cache-Control HTTP header. - * - * @return array - */ - protected function parseCacheControl(string $header) - { - $parts = HeaderUtils::split($header, ',='); - - return HeaderUtils::combine($parts); - } -} diff --git a/lib/symfony/http-foundation/HeaderUtils.php b/lib/symfony/http-foundation/HeaderUtils.php deleted file mode 100644 index 1d56be080..000000000 --- a/lib/symfony/http-foundation/HeaderUtils.php +++ /dev/null @@ -1,293 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * HTTP header utility functions. - * - * @author Christian Schmidt - */ -class HeaderUtils -{ - public const DISPOSITION_ATTACHMENT = 'attachment'; - public const DISPOSITION_INLINE = 'inline'; - - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Splits an HTTP header by one or more separators. - * - * Example: - * - * HeaderUtils::split("da, en-gb;q=0.8", ",;") - * // => ['da'], ['en-gb', 'q=0.8']] - * - * @param string $separators List of characters to split on, ordered by - * precedence, e.g. ",", ";=", or ",;=" - * - * @return array Nested array with as many levels as there are characters in - * $separators - */ - public static function split(string $header, string $separators): array - { - $quotedSeparators = preg_quote($separators, '/'); - - preg_match_all(' - / - (?!\s) - (?: - # quoted-string - "(?:[^"\\\\]|\\\\.)*(?:"|\\\\|$) - | - # token - [^"'.$quotedSeparators.']+ - )+ - (?['.$quotedSeparators.']) - \s* - /x', trim($header), $matches, \PREG_SET_ORDER); - - return self::groupParts($matches, $separators); - } - - /** - * Combines an array of arrays into one associative array. - * - * Each of the nested arrays should have one or two elements. The first - * value will be used as the keys in the associative array, and the second - * will be used as the values, or true if the nested array only contains one - * element. Array keys are lowercased. - * - * Example: - * - * HeaderUtils::combine([["foo", "abc"], ["bar"]]) - * // => ["foo" => "abc", "bar" => true] - */ - public static function combine(array $parts): array - { - $assoc = []; - foreach ($parts as $part) { - $name = strtolower($part[0]); - $value = $part[1] ?? true; - $assoc[$name] = $value; - } - - return $assoc; - } - - /** - * Joins an associative array into a string for use in an HTTP header. - * - * The key and value of each entry are joined with "=", and all entries - * are joined with the specified separator and an additional space (for - * readability). Values are quoted if necessary. - * - * Example: - * - * HeaderUtils::toString(["foo" => "abc", "bar" => true, "baz" => "a b c"], ",") - * // => 'foo=abc, bar, baz="a b c"' - */ - public static function toString(array $assoc, string $separator): string - { - $parts = []; - foreach ($assoc as $name => $value) { - if (true === $value) { - $parts[] = $name; - } else { - $parts[] = $name.'='.self::quote($value); - } - } - - return implode($separator.' ', $parts); - } - - /** - * Encodes a string as a quoted string, if necessary. - * - * If a string contains characters not allowed by the "token" construct in - * the HTTP specification, it is backslash-escaped and enclosed in quotes - * to match the "quoted-string" construct. - */ - public static function quote(string $s): string - { - if (preg_match('/^[a-z0-9!#$%&\'*.^_`|~-]+$/i', $s)) { - return $s; - } - - return '"'.addcslashes($s, '"\\"').'"'; - } - - /** - * Decodes a quoted string. - * - * If passed an unquoted string that matches the "token" construct (as - * defined in the HTTP specification), it is passed through verbatimly. - */ - public static function unquote(string $s): string - { - return preg_replace('/\\\\(.)|"/', '$1', $s); - } - - /** - * Generates an HTTP Content-Disposition field-value. - * - * @param string $disposition One of "inline" or "attachment" - * @param string $filename A unicode string - * @param string $filenameFallback A string containing only ASCII characters that - * is semantically equivalent to $filename. If the filename is already ASCII, - * it can be omitted, or just copied from $filename - * - * @throws \InvalidArgumentException - * - * @see RFC 6266 - */ - public static function makeDisposition(string $disposition, string $filename, string $filenameFallback = ''): string - { - if (!\in_array($disposition, [self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE])) { - throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); - } - - if ('' === $filenameFallback) { - $filenameFallback = $filename; - } - - // filenameFallback is not ASCII. - if (!preg_match('/^[\x20-\x7e]*$/', $filenameFallback)) { - throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.'); - } - - // percent characters aren't safe in fallback. - if (str_contains($filenameFallback, '%')) { - throw new \InvalidArgumentException('The filename fallback cannot contain the "%" character.'); - } - - // path separators aren't allowed in either. - if (str_contains($filename, '/') || str_contains($filename, '\\') || str_contains($filenameFallback, '/') || str_contains($filenameFallback, '\\')) { - throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.'); - } - - $params = ['filename' => $filenameFallback]; - if ($filename !== $filenameFallback) { - $params['filename*'] = "utf-8''".rawurlencode($filename); - } - - return $disposition.'; '.self::toString($params, ';'); - } - - /** - * Like parse_str(), but preserves dots in variable names. - */ - public static function parseQuery(string $query, bool $ignoreBrackets = false, string $separator = '&'): array - { - $q = []; - - foreach (explode($separator, $query) as $v) { - if (false !== $i = strpos($v, "\0")) { - $v = substr($v, 0, $i); - } - - if (false === $i = strpos($v, '=')) { - $k = urldecode($v); - $v = ''; - } else { - $k = urldecode(substr($v, 0, $i)); - $v = substr($v, $i); - } - - if (false !== $i = strpos($k, "\0")) { - $k = substr($k, 0, $i); - } - - $k = ltrim($k, ' '); - - if ($ignoreBrackets) { - $q[$k][] = urldecode(substr($v, 1)); - - continue; - } - - if (false === $i = strpos($k, '[')) { - $q[] = bin2hex($k).$v; - } else { - $q[] = bin2hex(substr($k, 0, $i)).rawurlencode(substr($k, $i)).$v; - } - } - - if ($ignoreBrackets) { - return $q; - } - - parse_str(implode('&', $q), $q); - - $query = []; - - foreach ($q as $k => $v) { - if (false !== $i = strpos($k, '_')) { - $query[substr_replace($k, hex2bin(substr($k, 0, $i)).'[', 0, 1 + $i)] = $v; - } else { - $query[hex2bin($k)] = $v; - } - } - - return $query; - } - - private static function groupParts(array $matches, string $separators, bool $first = true): array - { - $separator = $separators[0]; - $partSeparators = substr($separators, 1); - - $i = 0; - $partMatches = []; - $previousMatchWasSeparator = false; - foreach ($matches as $match) { - if (!$first && $previousMatchWasSeparator && isset($match['separator']) && $match['separator'] === $separator) { - $previousMatchWasSeparator = true; - $partMatches[$i][] = $match; - } elseif (isset($match['separator']) && $match['separator'] === $separator) { - $previousMatchWasSeparator = true; - ++$i; - } else { - $previousMatchWasSeparator = false; - $partMatches[$i][] = $match; - } - } - - $parts = []; - if ($partSeparators) { - foreach ($partMatches as $matches) { - $parts[] = self::groupParts($matches, $partSeparators, false); - } - } else { - foreach ($partMatches as $matches) { - $parts[] = self::unquote($matches[0][0]); - } - - if (!$first && 2 < \count($parts)) { - $parts = [ - $parts[0], - implode($separator, \array_slice($parts, 1)), - ]; - } - } - - return $parts; - } -} diff --git a/lib/symfony/http-foundation/InputBag.php b/lib/symfony/http-foundation/InputBag.php deleted file mode 100644 index a9d3cd82a..000000000 --- a/lib/symfony/http-foundation/InputBag.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\BadRequestException; - -/** - * InputBag is a container for user input values such as $_GET, $_POST, $_REQUEST, and $_COOKIE. - * - * @author Saif Eddin Gmati - */ -final class InputBag extends ParameterBag -{ - /** - * Returns a scalar input value by name. - * - * @param string|int|float|bool|null $default The default value if the input key does not exist - * - * @return string|int|float|bool|null - */ - public function get(string $key, $default = null) - { - if (null !== $default && !\is_scalar($default) && !(\is_object($default) && method_exists($default, '__toString'))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Passing a non-scalar value as 2nd argument to "%s()" is deprecated, pass a scalar or null instead.', __METHOD__); - } - - $value = parent::get($key, $this); - - if (null !== $value && $this !== $value && !\is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Retrieving a non-scalar value from "%s()" is deprecated, and will throw a "%s" exception in Symfony 6.0, use "%s::all($key)" instead.', __METHOD__, BadRequestException::class, __CLASS__); - } - - return $this === $value ? $default : $value; - } - - /** - * {@inheritdoc} - */ - public function all(string $key = null): array - { - return parent::all($key); - } - - /** - * Replaces the current input values by a new set. - */ - public function replace(array $inputs = []) - { - $this->parameters = []; - $this->add($inputs); - } - - /** - * Adds input values. - */ - public function add(array $inputs = []) - { - foreach ($inputs as $input => $value) { - $this->set($input, $value); - } - } - - /** - * Sets an input by name. - * - * @param string|int|float|bool|array|null $value - */ - public function set(string $key, $value) - { - if (null !== $value && !\is_scalar($value) && !\is_array($value) && !method_exists($value, '__toString')) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Passing "%s" as a 2nd Argument to "%s()" is deprecated, pass a scalar, array, or null instead.', get_debug_type($value), __METHOD__); - } - - $this->parameters[$key] = $value; - } - - /** - * {@inheritdoc} - */ - public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = []) - { - $value = $this->has($key) ? $this->all()[$key] : $default; - - // Always turn $options into an array - this allows filter_var option shortcuts. - if (!\is_array($options) && $options) { - $options = ['flags' => $options]; - } - - if (\is_array($value) && !(($options['flags'] ?? 0) & (\FILTER_REQUIRE_ARRAY | \FILTER_FORCE_ARRAY))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Filtering an array value with "%s()" without passing the FILTER_REQUIRE_ARRAY or FILTER_FORCE_ARRAY flag is deprecated', __METHOD__); - - if (!isset($options['flags'])) { - $options['flags'] = \FILTER_REQUIRE_ARRAY; - } - } - - if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) { - trigger_deprecation('symfony/http-foundation', '5.2', 'Not passing a Closure together with FILTER_CALLBACK to "%s()" is deprecated. Wrap your filter in a closure instead.', __METHOD__); - // throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null))); - } - - return filter_var($value, $filter, $options); - } -} diff --git a/lib/symfony/http-foundation/IpUtils.php b/lib/symfony/http-foundation/IpUtils.php deleted file mode 100644 index 2f31284e3..000000000 --- a/lib/symfony/http-foundation/IpUtils.php +++ /dev/null @@ -1,216 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Http utility functions. - * - * @author Fabien Potencier - */ -class IpUtils -{ - private static $checkedIps = []; - - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets. - * - * @param string|array $ips List of IPs or subnets (can be a string if only a single one) - * - * @return bool - */ - public static function checkIp(?string $requestIp, $ips) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - if (!\is_array($ips)) { - $ips = [$ips]; - } - - $method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4'; - - foreach ($ips as $ip) { - if (self::$method($requestIp, $ip)) { - return true; - } - } - - return false; - } - - /** - * Compares two IPv4 addresses. - * In case a subnet is given, it checks if it contains the request IP. - * - * @param string $ip IPv4 address or subnet in CIDR notation - * - * @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet - */ - public static function checkIp4(?string $requestIp, string $ip) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - $cacheKey = $requestIp.'-'.$ip; - if (isset(self::$checkedIps[$cacheKey])) { - return self::$checkedIps[$cacheKey]; - } - - if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { - return self::$checkedIps[$cacheKey] = false; - } - - if (str_contains($ip, '/')) { - [$address, $netmask] = explode('/', $ip, 2); - - if ('0' === $netmask) { - return self::$checkedIps[$cacheKey] = false !== filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4); - } - - if ($netmask < 0 || $netmask > 32) { - return self::$checkedIps[$cacheKey] = false; - } - } else { - $address = $ip; - $netmask = 32; - } - - if (false === ip2long($address)) { - return self::$checkedIps[$cacheKey] = false; - } - - return self::$checkedIps[$cacheKey] = 0 === substr_compare(sprintf('%032b', ip2long($requestIp)), sprintf('%032b', ip2long($address)), 0, $netmask); - } - - /** - * Compares two IPv6 addresses. - * In case a subnet is given, it checks if it contains the request IP. - * - * @author David Soria Parra - * - * @see https://github.com/dsp/v6tools - * - * @param string $ip IPv6 address or subnet in CIDR notation - * - * @return bool - * - * @throws \RuntimeException When IPV6 support is not enabled - */ - public static function checkIp6(?string $requestIp, string $ip) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - $cacheKey = $requestIp.'-'.$ip; - if (isset(self::$checkedIps[$cacheKey])) { - return self::$checkedIps[$cacheKey]; - } - - if (!((\extension_loaded('sockets') && \defined('AF_INET6')) || @inet_pton('::1'))) { - throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".'); - } - - // Check to see if we were given a IP4 $requestIp or $ip by mistake - if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - return self::$checkedIps[$cacheKey] = false; - } - - if (str_contains($ip, '/')) { - [$address, $netmask] = explode('/', $ip, 2); - - if (!filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - return self::$checkedIps[$cacheKey] = false; - } - - if ('0' === $netmask) { - return (bool) unpack('n*', @inet_pton($address)); - } - - if ($netmask < 1 || $netmask > 128) { - return self::$checkedIps[$cacheKey] = false; - } - } else { - if (!filter_var($ip, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - return self::$checkedIps[$cacheKey] = false; - } - - $address = $ip; - $netmask = 128; - } - - $bytesAddr = unpack('n*', @inet_pton($address)); - $bytesTest = unpack('n*', @inet_pton($requestIp)); - - if (!$bytesAddr || !$bytesTest) { - return self::$checkedIps[$cacheKey] = false; - } - - for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) { - $left = $netmask - 16 * ($i - 1); - $left = ($left <= 16) ? $left : 16; - $mask = ~(0xFFFF >> $left) & 0xFFFF; - if (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) { - return self::$checkedIps[$cacheKey] = false; - } - } - - return self::$checkedIps[$cacheKey] = true; - } - - /** - * Anonymizes an IP/IPv6. - * - * Removes the last byte for v4 and the last 8 bytes for v6 IPs - */ - public static function anonymize(string $ip): string - { - $wrappedIPv6 = false; - if ('[' === substr($ip, 0, 1) && ']' === substr($ip, -1, 1)) { - $wrappedIPv6 = true; - $ip = substr($ip, 1, -1); - } - - $packedAddress = inet_pton($ip); - if (4 === \strlen($packedAddress)) { - $mask = '255.255.255.0'; - } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff:ffff'))) { - $mask = '::ffff:ffff:ff00'; - } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff'))) { - $mask = '::ffff:ff00'; - } else { - $mask = 'ffff:ffff:ffff:ffff:0000:0000:0000:0000'; - } - $ip = inet_ntop($packedAddress & inet_pton($mask)); - - if ($wrappedIPv6) { - $ip = '['.$ip.']'; - } - - return $ip; - } -} diff --git a/lib/symfony/http-foundation/JsonResponse.php b/lib/symfony/http-foundation/JsonResponse.php deleted file mode 100644 index 501a6387d..000000000 --- a/lib/symfony/http-foundation/JsonResponse.php +++ /dev/null @@ -1,221 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Response represents an HTTP response in JSON format. - * - * Note that this class does not force the returned JSON content to be an - * object. It is however recommended that you do return an object as it - * protects yourself against XSSI and JSON-JavaScript Hijacking. - * - * @see https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md#always-return-json-with-an-object-on-the-outside - * - * @author Igor Wiedler - */ -class JsonResponse extends Response -{ - protected $data; - protected $callback; - - // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. - // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT - public const DEFAULT_ENCODING_OPTIONS = 15; - - protected $encodingOptions = self::DEFAULT_ENCODING_OPTIONS; - - /** - * @param mixed $data The response data - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $json If the data is already a JSON string - */ - public function __construct($data = null, int $status = 200, array $headers = [], bool $json = false) - { - parent::__construct('', $status, $headers); - - if ($json && !\is_string($data) && !is_numeric($data) && !\is_callable([$data, '__toString'])) { - throw new \TypeError(sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data))); - } - - if (null === $data) { - $data = new \ArrayObject(); - } - - $json ? $this->setJson($data) : $this->setData($data); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return JsonResponse::create(['key' => 'value']) - * ->setSharedMaxAge(300); - * - * @param mixed $data The JSON response data - * @param int $status The response status code - * @param array $headers An array of response headers - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($data = null, int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($data, $status, $headers); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return JsonResponse::fromJsonString('{"key": "value"}') - * ->setSharedMaxAge(300); - * - * @param string $data The JSON response string - * @param int $status The response status code - * @param array $headers An array of response headers - * - * @return static - */ - public static function fromJsonString(string $data, int $status = 200, array $headers = []) - { - return new static($data, $status, $headers, true); - } - - /** - * Sets the JSONP callback. - * - * @param string|null $callback The JSONP callback or null to use none - * - * @return $this - * - * @throws \InvalidArgumentException When the callback name is not valid - */ - public function setCallback(string $callback = null) - { - if (null !== $callback) { - // partially taken from https://geekality.net/2011/08/03/valid-javascript-identifier/ - // partially taken from https://github.com/willdurand/JsonpCallbackValidator - // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. - // (c) William Durand - $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?:\[(?:"(?:\\\.|[^"\\\])*"|\'(?:\\\.|[^\'\\\])*\'|\d+)\])*?$/u'; - $reserved = [ - 'break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', - 'debugger', 'function', 'this', 'with', 'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 'extends', 'super', 'const', 'export', - 'import', 'implements', 'let', 'private', 'public', 'yield', 'interface', 'package', 'protected', 'static', 'null', 'true', 'false', - ]; - $parts = explode('.', $callback); - foreach ($parts as $part) { - if (!preg_match($pattern, $part) || \in_array($part, $reserved, true)) { - throw new \InvalidArgumentException('The callback name is not valid.'); - } - } - } - - $this->callback = $callback; - - return $this->update(); - } - - /** - * Sets a raw string containing a JSON document to be sent. - * - * @return $this - */ - public function setJson(string $json) - { - $this->data = $json; - - return $this->update(); - } - - /** - * Sets the data to be sent as JSON. - * - * @param mixed $data - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function setData($data = []) - { - try { - $data = json_encode($data, $this->encodingOptions); - } catch (\Exception $e) { - if ('Exception' === \get_class($e) && str_starts_with($e->getMessage(), 'Failed calling ')) { - throw $e->getPrevious() ?: $e; - } - throw $e; - } - - if (\PHP_VERSION_ID >= 70300 && (\JSON_THROW_ON_ERROR & $this->encodingOptions)) { - return $this->setJson($data); - } - - if (\JSON_ERROR_NONE !== json_last_error()) { - throw new \InvalidArgumentException(json_last_error_msg()); - } - - return $this->setJson($data); - } - - /** - * Returns options used while encoding data to JSON. - * - * @return int - */ - public function getEncodingOptions() - { - return $this->encodingOptions; - } - - /** - * Sets options used while encoding data to JSON. - * - * @return $this - */ - public function setEncodingOptions(int $encodingOptions) - { - $this->encodingOptions = $encodingOptions; - - return $this->setData(json_decode($this->data)); - } - - /** - * Updates the content and headers according to the JSON data and callback. - * - * @return $this - */ - protected function update() - { - if (null !== $this->callback) { - // Not using application/javascript for compatibility reasons with older browsers. - $this->headers->set('Content-Type', 'text/javascript'); - - return $this->setContent(sprintf('/**/%s(%s);', $this->callback, $this->data)); - } - - // Only set the header when there is none or when it equals 'text/javascript' (from a previous update with callback) - // in order to not overwrite a custom definition. - if (!$this->headers->has('Content-Type') || 'text/javascript' === $this->headers->get('Content-Type')) { - $this->headers->set('Content-Type', 'application/json'); - } - - return $this->setContent($this->data); - } -} diff --git a/lib/symfony/http-foundation/LICENSE b/lib/symfony/http-foundation/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/http-foundation/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/http-foundation/ParameterBag.php b/lib/symfony/http-foundation/ParameterBag.php deleted file mode 100644 index e1f89d69e..000000000 --- a/lib/symfony/http-foundation/ParameterBag.php +++ /dev/null @@ -1,228 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\BadRequestException; - -/** - * ParameterBag is a container for key/value pairs. - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate - */ -class ParameterBag implements \IteratorAggregate, \Countable -{ - /** - * Parameter storage. - */ - protected $parameters; - - public function __construct(array $parameters = []) - { - $this->parameters = $parameters; - } - - /** - * Returns the parameters. - * - * @param string|null $key The name of the parameter to return or null to get them all - * - * @return array - */ - public function all(/* string $key = null */) - { - $key = \func_num_args() > 0 ? func_get_arg(0) : null; - - if (null === $key) { - return $this->parameters; - } - - if (!\is_array($value = $this->parameters[$key] ?? [])) { - throw new BadRequestException(sprintf('Unexpected value for parameter "%s": expecting "array", got "%s".', $key, get_debug_type($value))); - } - - return $value; - } - - /** - * Returns the parameter keys. - * - * @return array - */ - public function keys() - { - return array_keys($this->parameters); - } - - /** - * Replaces the current parameters by a new set. - */ - public function replace(array $parameters = []) - { - $this->parameters = $parameters; - } - - /** - * Adds parameters. - */ - public function add(array $parameters = []) - { - $this->parameters = array_replace($this->parameters, $parameters); - } - - /** - * Returns a parameter by name. - * - * @param mixed $default The default value if the parameter key does not exist - * - * @return mixed - */ - public function get(string $key, $default = null) - { - return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; - } - - /** - * Sets a parameter by name. - * - * @param mixed $value The value - */ - public function set(string $key, $value) - { - $this->parameters[$key] = $value; - } - - /** - * Returns true if the parameter is defined. - * - * @return bool - */ - public function has(string $key) - { - return \array_key_exists($key, $this->parameters); - } - - /** - * Removes a parameter. - */ - public function remove(string $key) - { - unset($this->parameters[$key]); - } - - /** - * Returns the alphabetic characters of the parameter value. - * - * @return string - */ - public function getAlpha(string $key, string $default = '') - { - return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default)); - } - - /** - * Returns the alphabetic characters and digits of the parameter value. - * - * @return string - */ - public function getAlnum(string $key, string $default = '') - { - return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default)); - } - - /** - * Returns the digits of the parameter value. - * - * @return string - */ - public function getDigits(string $key, string $default = '') - { - // we need to remove - and + because they're allowed in the filter - return str_replace(['-', '+'], '', $this->filter($key, $default, \FILTER_SANITIZE_NUMBER_INT)); - } - - /** - * Returns the parameter value converted to integer. - * - * @return int - */ - public function getInt(string $key, int $default = 0) - { - return (int) $this->get($key, $default); - } - - /** - * Returns the parameter value converted to boolean. - * - * @return bool - */ - public function getBoolean(string $key, bool $default = false) - { - return $this->filter($key, $default, \FILTER_VALIDATE_BOOLEAN); - } - - /** - * Filter key. - * - * @param mixed $default Default = null - * @param int $filter FILTER_* constant - * @param mixed $options Filter options - * - * @see https://php.net/filter-var - * - * @return mixed - */ - public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = []) - { - $value = $this->get($key, $default); - - // Always turn $options into an array - this allows filter_var option shortcuts. - if (!\is_array($options) && $options) { - $options = ['flags' => $options]; - } - - // Add a convenience check for arrays. - if (\is_array($value) && !isset($options['flags'])) { - $options['flags'] = \FILTER_REQUIRE_ARRAY; - } - - if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) { - trigger_deprecation('symfony/http-foundation', '5.2', 'Not passing a Closure together with FILTER_CALLBACK to "%s()" is deprecated. Wrap your filter in a closure instead.', __METHOD__); - // throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null))); - } - - return filter_var($value, $filter, $options); - } - - /** - * Returns an iterator for parameters. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->parameters); - } - - /** - * Returns the number of parameters. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->parameters); - } -} diff --git a/lib/symfony/http-foundation/README.md b/lib/symfony/http-foundation/README.md deleted file mode 100644 index 424f2c4f0..000000000 --- a/lib/symfony/http-foundation/README.md +++ /dev/null @@ -1,28 +0,0 @@ -HttpFoundation Component -======================== - -The HttpFoundation component defines an object-oriented layer for the HTTP -specification. - -Sponsor -------- - -The HttpFoundation component for Symfony 5.4/6.0 is [backed][1] by [Laravel][2]. - -Laravel is a PHP web development framework that is passionate about maximum developer -happiness. Laravel is built using a variety of bespoke and Symfony based components. - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/http_foundation.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://laravel.com/ -[3]: https://symfony.com/sponsor diff --git a/lib/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php b/lib/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php deleted file mode 100644 index a6dd993b7..000000000 --- a/lib/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\RateLimiter; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\RateLimiter\LimiterInterface; -use Symfony\Component\RateLimiter\Policy\NoLimiter; -use Symfony\Component\RateLimiter\RateLimit; - -/** - * An implementation of RequestRateLimiterInterface that - * fits most use-cases. - * - * @author Wouter de Jong - */ -abstract class AbstractRequestRateLimiter implements RequestRateLimiterInterface -{ - public function consume(Request $request): RateLimit - { - $limiters = $this->getLimiters($request); - if (0 === \count($limiters)) { - $limiters = [new NoLimiter()]; - } - - $minimalRateLimit = null; - foreach ($limiters as $limiter) { - $rateLimit = $limiter->consume(1); - - $minimalRateLimit = $minimalRateLimit ? self::getMinimalRateLimit($minimalRateLimit, $rateLimit) : $rateLimit; - } - - return $minimalRateLimit; - } - - public function reset(Request $request): void - { - foreach ($this->getLimiters($request) as $limiter) { - $limiter->reset(); - } - } - - /** - * @return LimiterInterface[] a set of limiters using keys extracted from the request - */ - abstract protected function getLimiters(Request $request): array; - - private static function getMinimalRateLimit(RateLimit $first, RateLimit $second): RateLimit - { - if ($first->isAccepted() !== $second->isAccepted()) { - return $first->isAccepted() ? $second : $first; - } - - $firstRemainingTokens = $first->getRemainingTokens(); - $secondRemainingTokens = $second->getRemainingTokens(); - - if ($firstRemainingTokens === $secondRemainingTokens) { - return $first->getRetryAfter() < $second->getRetryAfter() ? $second : $first; - } - - return $firstRemainingTokens > $secondRemainingTokens ? $second : $first; - } -} diff --git a/lib/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php b/lib/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php deleted file mode 100644 index 4c87a40a8..000000000 --- a/lib/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\RateLimiter; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\RateLimiter\RateLimit; - -/** - * A special type of limiter that deals with requests. - * - * This allows to limit on different types of information - * from the requests. - * - * @author Wouter de Jong - */ -interface RequestRateLimiterInterface -{ - public function consume(Request $request): RateLimit; - - public function reset(Request $request): void; -} diff --git a/lib/symfony/http-foundation/RedirectResponse.php b/lib/symfony/http-foundation/RedirectResponse.php deleted file mode 100644 index 2103280c6..000000000 --- a/lib/symfony/http-foundation/RedirectResponse.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RedirectResponse represents an HTTP response doing a redirect. - * - * @author Fabien Potencier - */ -class RedirectResponse extends Response -{ - protected $targetUrl; - - /** - * Creates a redirect response so that it conforms to the rules defined for a redirect status code. - * - * @param string $url The URL to redirect to. The URL should be a full URL, with schema etc., - * but practically every browser redirects on paths only as well - * @param int $status The status code (302 by default) - * @param array $headers The headers (Location is always set to the given URL) - * - * @throws \InvalidArgumentException - * - * @see https://tools.ietf.org/html/rfc2616#section-10.3 - */ - public function __construct(string $url, int $status = 302, array $headers = []) - { - parent::__construct('', $status, $headers); - - $this->setTargetUrl($url); - - if (!$this->isRedirect()) { - throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status)); - } - - if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) { - $this->headers->remove('cache-control'); - } - } - - /** - * Factory method for chainability. - * - * @param string $url The URL to redirect to - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($url = '', int $status = 302, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($url, $status, $headers); - } - - /** - * Returns the target URL. - * - * @return string - */ - public function getTargetUrl() - { - return $this->targetUrl; - } - - /** - * Sets the redirect target of this response. - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function setTargetUrl(string $url) - { - if ('' === $url) { - throw new \InvalidArgumentException('Cannot redirect to an empty URL.'); - } - - $this->targetUrl = $url; - - $this->setContent( - sprintf(' - - - - - - Redirecting to %1$s - - - Redirecting to %1$s. - -', htmlspecialchars($url, \ENT_QUOTES, 'UTF-8'))); - - $this->headers->set('Location', $url); - - return $this; - } -} diff --git a/lib/symfony/http-foundation/Request.php b/lib/symfony/http-foundation/Request.php deleted file mode 100644 index 10f779d27..000000000 --- a/lib/symfony/http-foundation/Request.php +++ /dev/null @@ -1,2148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; -use Symfony\Component\HttpFoundation\Exception\JsonException; -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(AcceptHeader::class); -class_exists(FileBag::class); -class_exists(HeaderBag::class); -class_exists(HeaderUtils::class); -class_exists(InputBag::class); -class_exists(ParameterBag::class); -class_exists(ServerBag::class); - -/** - * Request represents an HTTP request. - * - * The methods dealing with URL accept / return a raw path (% encoded): - * * getBasePath - * * getBaseUrl - * * getPathInfo - * * getRequestUri - * * getUri - * * getUriForPath - * - * @author Fabien Potencier - */ -class Request -{ - public const HEADER_FORWARDED = 0b000001; // When using RFC 7239 - public const HEADER_X_FORWARDED_FOR = 0b000010; - public const HEADER_X_FORWARDED_HOST = 0b000100; - public const HEADER_X_FORWARDED_PROTO = 0b001000; - public const HEADER_X_FORWARDED_PORT = 0b010000; - public const HEADER_X_FORWARDED_PREFIX = 0b100000; - - /** @deprecated since Symfony 5.2, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead. */ - public const HEADER_X_FORWARDED_ALL = 0b1011110; // All "X-Forwarded-*" headers sent by "usual" reverse proxy - public const HEADER_X_FORWARDED_AWS_ELB = 0b0011010; // AWS ELB doesn't send X-Forwarded-Host - public const HEADER_X_FORWARDED_TRAEFIK = 0b0111110; // All "X-Forwarded-*" headers sent by Traefik reverse proxy - - public const METHOD_HEAD = 'HEAD'; - public const METHOD_GET = 'GET'; - public const METHOD_POST = 'POST'; - public const METHOD_PUT = 'PUT'; - public const METHOD_PATCH = 'PATCH'; - public const METHOD_DELETE = 'DELETE'; - public const METHOD_PURGE = 'PURGE'; - public const METHOD_OPTIONS = 'OPTIONS'; - public const METHOD_TRACE = 'TRACE'; - public const METHOD_CONNECT = 'CONNECT'; - - /** - * @var string[] - */ - protected static $trustedProxies = []; - - /** - * @var string[] - */ - protected static $trustedHostPatterns = []; - - /** - * @var string[] - */ - protected static $trustedHosts = []; - - protected static $httpMethodParameterOverride = false; - - /** - * Custom parameters. - * - * @var ParameterBag - */ - public $attributes; - - /** - * Request body parameters ($_POST). - * - * @var InputBag - */ - public $request; - - /** - * Query string parameters ($_GET). - * - * @var InputBag - */ - public $query; - - /** - * Server and execution environment parameters ($_SERVER). - * - * @var ServerBag - */ - public $server; - - /** - * Uploaded files ($_FILES). - * - * @var FileBag - */ - public $files; - - /** - * Cookies ($_COOKIE). - * - * @var InputBag - */ - public $cookies; - - /** - * Headers (taken from the $_SERVER). - * - * @var HeaderBag - */ - public $headers; - - /** - * @var string|resource|false|null - */ - protected $content; - - /** - * @var array - */ - protected $languages; - - /** - * @var array - */ - protected $charsets; - - /** - * @var array - */ - protected $encodings; - - /** - * @var array - */ - protected $acceptableContentTypes; - - /** - * @var string - */ - protected $pathInfo; - - /** - * @var string - */ - protected $requestUri; - - /** - * @var string - */ - protected $baseUrl; - - /** - * @var string - */ - protected $basePath; - - /** - * @var string - */ - protected $method; - - /** - * @var string - */ - protected $format; - - /** - * @var SessionInterface|callable(): SessionInterface - */ - protected $session; - - /** - * @var string - */ - protected $locale; - - /** - * @var string - */ - protected $defaultLocale = 'en'; - - /** - * @var array - */ - protected static $formats; - - protected static $requestFactory; - - /** - * @var string|null - */ - private $preferredFormat; - private $isHostValid = true; - private $isForwardedValid = true; - - /** - * @var bool|null - */ - private $isSafeContentPreferred; - - private static $trustedHeaderSet = -1; - - private const FORWARDED_PARAMS = [ - self::HEADER_X_FORWARDED_FOR => 'for', - self::HEADER_X_FORWARDED_HOST => 'host', - self::HEADER_X_FORWARDED_PROTO => 'proto', - self::HEADER_X_FORWARDED_PORT => 'host', - ]; - - /** - * Names for headers that can be trusted when - * using trusted proxies. - * - * The FORWARDED header is the standard as of rfc7239. - * - * The other headers are non-standard, but widely used - * by popular reverse proxies (like Apache mod_proxy or Amazon EC2). - */ - private const TRUSTED_HEADERS = [ - self::HEADER_FORWARDED => 'FORWARDED', - self::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', - self::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', - self::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', - self::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - self::HEADER_X_FORWARDED_PREFIX => 'X_FORWARDED_PREFIX', - ]; - - /** - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string|resource|null $content The raw body data - */ - public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Sets the parameters for this request. - * - * This method also re-initializes all properties. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string|resource|null $content The raw body data - */ - public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $this->request = new InputBag($request); - $this->query = new InputBag($query); - $this->attributes = new ParameterBag($attributes); - $this->cookies = new InputBag($cookies); - $this->files = new FileBag($files); - $this->server = new ServerBag($server); - $this->headers = new HeaderBag($this->server->getHeaders()); - - $this->content = $content; - $this->languages = null; - $this->charsets = null; - $this->encodings = null; - $this->acceptableContentTypes = null; - $this->pathInfo = null; - $this->requestUri = null; - $this->baseUrl = null; - $this->basePath = null; - $this->method = null; - $this->format = null; - } - - /** - * Creates a new request with values from PHP's super globals. - * - * @return static - */ - public static function createFromGlobals() - { - $request = self::createRequestFromFactory($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER); - - if (str_starts_with($request->headers->get('CONTENT_TYPE', ''), 'application/x-www-form-urlencoded') - && \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH']) - ) { - parse_str($request->getContent(), $data); - $request->request = new InputBag($data); - } - - return $request; - } - - /** - * Creates a Request based on a given URI and configuration. - * - * The information contained in the URI always take precedence - * over the other information (server and parameters). - * - * @param string $uri The URI - * @param string $method The HTTP method - * @param array $parameters The query (GET) or request (POST) parameters - * @param array $cookies The request cookies ($_COOKIE) - * @param array $files The request files ($_FILES) - * @param array $server The server parameters ($_SERVER) - * @param string|resource|null $content The raw body data - * - * @return static - */ - public static function create(string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $server = array_replace([ - 'SERVER_NAME' => 'localhost', - 'SERVER_PORT' => 80, - 'HTTP_HOST' => 'localhost', - 'HTTP_USER_AGENT' => 'Symfony', - 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', - 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', - 'REMOTE_ADDR' => '127.0.0.1', - 'SCRIPT_NAME' => '', - 'SCRIPT_FILENAME' => '', - 'SERVER_PROTOCOL' => 'HTTP/1.1', - 'REQUEST_TIME' => time(), - 'REQUEST_TIME_FLOAT' => microtime(true), - ], $server); - - $server['PATH_INFO'] = ''; - $server['REQUEST_METHOD'] = strtoupper($method); - - $components = parse_url($uri); - if (isset($components['host'])) { - $server['SERVER_NAME'] = $components['host']; - $server['HTTP_HOST'] = $components['host']; - } - - if (isset($components['scheme'])) { - if ('https' === $components['scheme']) { - $server['HTTPS'] = 'on'; - $server['SERVER_PORT'] = 443; - } else { - unset($server['HTTPS']); - $server['SERVER_PORT'] = 80; - } - } - - if (isset($components['port'])) { - $server['SERVER_PORT'] = $components['port']; - $server['HTTP_HOST'] .= ':'.$components['port']; - } - - if (isset($components['user'])) { - $server['PHP_AUTH_USER'] = $components['user']; - } - - if (isset($components['pass'])) { - $server['PHP_AUTH_PW'] = $components['pass']; - } - - if (!isset($components['path'])) { - $components['path'] = '/'; - } - - switch (strtoupper($method)) { - case 'POST': - case 'PUT': - case 'DELETE': - if (!isset($server['CONTENT_TYPE'])) { - $server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; - } - // no break - case 'PATCH': - $request = $parameters; - $query = []; - break; - default: - $request = []; - $query = $parameters; - break; - } - - $queryString = ''; - if (isset($components['query'])) { - parse_str(html_entity_decode($components['query']), $qs); - - if ($query) { - $query = array_replace($qs, $query); - $queryString = http_build_query($query, '', '&'); - } else { - $query = $qs; - $queryString = $components['query']; - } - } elseif ($query) { - $queryString = http_build_query($query, '', '&'); - } - - $server['REQUEST_URI'] = $components['path'].('' !== $queryString ? '?'.$queryString : ''); - $server['QUERY_STRING'] = $queryString; - - return self::createRequestFromFactory($query, $request, [], $cookies, $files, $server, $content); - } - - /** - * Sets a callable able to create a Request instance. - * - * This is mainly useful when you need to override the Request class - * to keep BC with an existing system. It should not be used for any - * other purpose. - */ - public static function setFactory(?callable $callable) - { - self::$requestFactory = $callable; - } - - /** - * Clones a request and overrides some of its parameters. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * - * @return static - */ - public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) - { - $dup = clone $this; - if (null !== $query) { - $dup->query = new InputBag($query); - } - if (null !== $request) { - $dup->request = new InputBag($request); - } - if (null !== $attributes) { - $dup->attributes = new ParameterBag($attributes); - } - if (null !== $cookies) { - $dup->cookies = new InputBag($cookies); - } - if (null !== $files) { - $dup->files = new FileBag($files); - } - if (null !== $server) { - $dup->server = new ServerBag($server); - $dup->headers = new HeaderBag($dup->server->getHeaders()); - } - $dup->languages = null; - $dup->charsets = null; - $dup->encodings = null; - $dup->acceptableContentTypes = null; - $dup->pathInfo = null; - $dup->requestUri = null; - $dup->baseUrl = null; - $dup->basePath = null; - $dup->method = null; - $dup->format = null; - - if (!$dup->get('_format') && $this->get('_format')) { - $dup->attributes->set('_format', $this->get('_format')); - } - - if (!$dup->getRequestFormat(null)) { - $dup->setRequestFormat($this->getRequestFormat(null)); - } - - return $dup; - } - - /** - * Clones the current request. - * - * Note that the session is not cloned as duplicated requests - * are most of the time sub-requests of the main one. - */ - public function __clone() - { - $this->query = clone $this->query; - $this->request = clone $this->request; - $this->attributes = clone $this->attributes; - $this->cookies = clone $this->cookies; - $this->files = clone $this->files; - $this->server = clone $this->server; - $this->headers = clone $this->headers; - } - - /** - * Returns the request as a string. - * - * @return string - */ - public function __toString() - { - $content = $this->getContent(); - - $cookieHeader = ''; - $cookies = []; - - foreach ($this->cookies as $k => $v) { - $cookies[] = \is_array($v) ? http_build_query([$k => $v], '', '; ', \PHP_QUERY_RFC3986) : "$k=$v"; - } - - if ($cookies) { - $cookieHeader = 'Cookie: '.implode('; ', $cookies)."\r\n"; - } - - return - sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n". - $this->headers. - $cookieHeader."\r\n". - $content; - } - - /** - * Overrides the PHP global variables according to this request instance. - * - * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. - * $_FILES is never overridden, see rfc1867 - */ - public function overrideGlobals() - { - $this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), '', '&'))); - - $_GET = $this->query->all(); - $_POST = $this->request->all(); - $_SERVER = $this->server->all(); - $_COOKIE = $this->cookies->all(); - - foreach ($this->headers->all() as $key => $value) { - $key = strtoupper(str_replace('-', '_', $key)); - if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) { - $_SERVER[$key] = implode(', ', $value); - } else { - $_SERVER['HTTP_'.$key] = implode(', ', $value); - } - } - - $request = ['g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE]; - - $requestOrder = \ini_get('request_order') ?: \ini_get('variables_order'); - $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; - - $_REQUEST = [[]]; - - foreach (str_split($requestOrder) as $order) { - $_REQUEST[] = $request[$order]; - } - - $_REQUEST = array_merge(...$_REQUEST); - } - - /** - * Sets a list of trusted proxies. - * - * You should only list the reverse proxies that you manage directly. - * - * @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR'] - * @param int $trustedHeaderSet A bit field of Request::HEADER_*, to set which headers to trust from your proxies - */ - public static function setTrustedProxies(array $proxies, int $trustedHeaderSet) - { - if (self::HEADER_X_FORWARDED_ALL === $trustedHeaderSet) { - trigger_deprecation('symfony/http-foundation', '5.2', 'The "HEADER_X_FORWARDED_ALL" constant is deprecated, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.'); - } - self::$trustedProxies = array_reduce($proxies, function ($proxies, $proxy) { - if ('REMOTE_ADDR' !== $proxy) { - $proxies[] = $proxy; - } elseif (isset($_SERVER['REMOTE_ADDR'])) { - $proxies[] = $_SERVER['REMOTE_ADDR']; - } - - return $proxies; - }, []); - self::$trustedHeaderSet = $trustedHeaderSet; - } - - /** - * Gets the list of trusted proxies. - * - * @return array - */ - public static function getTrustedProxies() - { - return self::$trustedProxies; - } - - /** - * Gets the set of trusted headers from trusted proxies. - * - * @return int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies - */ - public static function getTrustedHeaderSet() - { - return self::$trustedHeaderSet; - } - - /** - * Sets a list of trusted host patterns. - * - * You should only list the hosts you manage using regexs. - * - * @param array $hostPatterns A list of trusted host patterns - */ - public static function setTrustedHosts(array $hostPatterns) - { - self::$trustedHostPatterns = array_map(function ($hostPattern) { - return sprintf('{%s}i', $hostPattern); - }, $hostPatterns); - // we need to reset trusted hosts on trusted host patterns change - self::$trustedHosts = []; - } - - /** - * Gets the list of trusted host patterns. - * - * @return array - */ - public static function getTrustedHosts() - { - return self::$trustedHostPatterns; - } - - /** - * Normalizes a query string. - * - * It builds a normalized query string, where keys/value pairs are alphabetized, - * have consistent escaping and unneeded delimiters are removed. - * - * @return string - */ - public static function normalizeQueryString(?string $qs) - { - if ('' === ($qs ?? '')) { - return ''; - } - - $qs = HeaderUtils::parseQuery($qs); - ksort($qs); - - return http_build_query($qs, '', '&', \PHP_QUERY_RFC3986); - } - - /** - * Enables support for the _method request parameter to determine the intended HTTP method. - * - * Be warned that enabling this feature might lead to CSRF issues in your code. - * Check that you are using CSRF tokens when required. - * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered - * and used to send a "PUT" or "DELETE" request via the _method request parameter. - * If these methods are not protected against CSRF, this presents a possible vulnerability. - * - * The HTTP method can only be overridden when the real HTTP method is POST. - */ - public static function enableHttpMethodParameterOverride() - { - self::$httpMethodParameterOverride = true; - } - - /** - * Checks whether support for the _method request parameter is enabled. - * - * @return bool - */ - public static function getHttpMethodParameterOverride() - { - return self::$httpMethodParameterOverride; - } - - /** - * Gets a "parameter" value from any bag. - * - * This method is mainly useful for libraries that want to provide some flexibility. If you don't need the - * flexibility in controllers, it is better to explicitly get request parameters from the appropriate - * public property instead (attributes, query, request). - * - * Order of precedence: PATH (routing placeholders or custom attributes), GET, POST - * - * @param mixed $default The default value if the parameter key does not exist - * - * @return mixed - * - * @internal since Symfony 5.4, use explicit input sources instead - */ - public function get(string $key, $default = null) - { - if ($this !== $result = $this->attributes->get($key, $this)) { - return $result; - } - - if ($this->query->has($key)) { - return $this->query->all()[$key]; - } - - if ($this->request->has($key)) { - return $this->request->all()[$key]; - } - - return $default; - } - - /** - * Gets the Session. - * - * @return SessionInterface - */ - public function getSession() - { - $session = $this->session; - if (!$session instanceof SessionInterface && null !== $session) { - $this->setSession($session = $session()); - } - - if (null === $session) { - throw new SessionNotFoundException('Session has not been set.'); - } - - return $session; - } - - /** - * Whether the request contains a Session which was started in one of the - * previous requests. - * - * @return bool - */ - public function hasPreviousSession() - { - // the check for $this->session avoids malicious users trying to fake a session cookie with proper name - return $this->hasSession() && $this->cookies->has($this->getSession()->getName()); - } - - /** - * Whether the request contains a Session object. - * - * This method does not give any information about the state of the session object, - * like whether the session is started or not. It is just a way to check if this Request - * is associated with a Session instance. - * - * @param bool $skipIfUninitialized When true, ignores factories injected by `setSessionFactory` - * - * @return bool - */ - public function hasSession(/* bool $skipIfUninitialized = false */) - { - $skipIfUninitialized = \func_num_args() > 0 ? func_get_arg(0) : false; - - return null !== $this->session && (!$skipIfUninitialized || $this->session instanceof SessionInterface); - } - - public function setSession(SessionInterface $session) - { - $this->session = $session; - } - - /** - * @internal - * - * @param callable(): SessionInterface $factory - */ - public function setSessionFactory(callable $factory) - { - $this->session = $factory; - } - - /** - * Returns the client IP addresses. - * - * In the returned array the most trusted IP address is first, and the - * least trusted one last. The "real" client IP address is the last one, - * but this is also the least trusted one. Trusted proxies are stripped. - * - * Use this method carefully; you should use getClientIp() instead. - * - * @return array - * - * @see getClientIp() - */ - public function getClientIps() - { - $ip = $this->server->get('REMOTE_ADDR'); - - if (!$this->isFromTrustedProxy()) { - return [$ip]; - } - - return $this->getTrustedValues(self::HEADER_X_FORWARDED_FOR, $ip) ?: [$ip]; - } - - /** - * Returns the client IP address. - * - * This method can read the client IP address from the "X-Forwarded-For" header - * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" - * header value is a comma+space separated list of IP addresses, the left-most - * being the original client, and each successive proxy that passed the request - * adding the IP address where it received the request from. - * - * If your reverse proxy uses a different header name than "X-Forwarded-For", - * ("Client-Ip" for instance), configure it via the $trustedHeaderSet - * argument of the Request::setTrustedProxies() method instead. - * - * @return string|null - * - * @see getClientIps() - * @see https://wikipedia.org/wiki/X-Forwarded-For - */ - public function getClientIp() - { - $ipAddresses = $this->getClientIps(); - - return $ipAddresses[0]; - } - - /** - * Returns current script name. - * - * @return string - */ - public function getScriptName() - { - return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME', '')); - } - - /** - * Returns the path being requested relative to the executed script. - * - * The path info always starts with a /. - * - * Suppose this request is instantiated from /mysite on localhost: - * - * * http://localhost/mysite returns an empty string - * * http://localhost/mysite/about returns '/about' - * * http://localhost/mysite/enco%20ded returns '/enco%20ded' - * * http://localhost/mysite/about?var=1 returns '/about' - * - * @return string The raw path (i.e. not urldecoded) - */ - public function getPathInfo() - { - if (null === $this->pathInfo) { - $this->pathInfo = $this->preparePathInfo(); - } - - return $this->pathInfo; - } - - /** - * Returns the root path from which this request is executed. - * - * Suppose that an index.php file instantiates this request object: - * - * * http://localhost/index.php returns an empty string - * * http://localhost/index.php/page returns an empty string - * * http://localhost/web/index.php returns '/web' - * * http://localhost/we%20b/index.php returns '/we%20b' - * - * @return string The raw path (i.e. not urldecoded) - */ - public function getBasePath() - { - if (null === $this->basePath) { - $this->basePath = $this->prepareBasePath(); - } - - return $this->basePath; - } - - /** - * Returns the root URL from which this request is executed. - * - * The base URL never ends with a /. - * - * This is similar to getBasePath(), except that it also includes the - * script filename (e.g. index.php) if one exists. - * - * @return string The raw URL (i.e. not urldecoded) - */ - public function getBaseUrl() - { - $trustedPrefix = ''; - - // the proxy prefix must be prepended to any prefix being needed at the webserver level - if ($this->isFromTrustedProxy() && $trustedPrefixValues = $this->getTrustedValues(self::HEADER_X_FORWARDED_PREFIX)) { - $trustedPrefix = rtrim($trustedPrefixValues[0], '/'); - } - - return $trustedPrefix.$this->getBaseUrlReal(); - } - - /** - * Returns the real base URL received by the webserver from which this request is executed. - * The URL does not include trusted reverse proxy prefix. - * - * @return string The raw URL (i.e. not urldecoded) - */ - private function getBaseUrlReal(): string - { - if (null === $this->baseUrl) { - $this->baseUrl = $this->prepareBaseUrl(); - } - - return $this->baseUrl; - } - - /** - * Gets the request's scheme. - * - * @return string - */ - public function getScheme() - { - return $this->isSecure() ? 'https' : 'http'; - } - - /** - * Returns the port on which the request is made. - * - * This method can read the client port from the "X-Forwarded-Port" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Port" header must contain the client port. - * - * @return int|string|null Can be a string if fetched from the server bag - */ - public function getPort() - { - if ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_PORT)) { - $host = $host[0]; - } elseif ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_HOST)) { - $host = $host[0]; - } elseif (!$host = $this->headers->get('HOST')) { - return $this->server->get('SERVER_PORT'); - } - - if ('[' === $host[0]) { - $pos = strpos($host, ':', strrpos($host, ']')); - } else { - $pos = strrpos($host, ':'); - } - - if (false !== $pos && $port = substr($host, $pos + 1)) { - return (int) $port; - } - - return 'https' === $this->getScheme() ? 443 : 80; - } - - /** - * Returns the user. - * - * @return string|null - */ - public function getUser() - { - return $this->headers->get('PHP_AUTH_USER'); - } - - /** - * Returns the password. - * - * @return string|null - */ - public function getPassword() - { - return $this->headers->get('PHP_AUTH_PW'); - } - - /** - * Gets the user info. - * - * @return string|null A user name if any and, optionally, scheme-specific information about how to gain authorization to access the server - */ - public function getUserInfo() - { - $userinfo = $this->getUser(); - - $pass = $this->getPassword(); - if ('' != $pass) { - $userinfo .= ":$pass"; - } - - return $userinfo; - } - - /** - * Returns the HTTP host being requested. - * - * The port name will be appended to the host if it's non-standard. - * - * @return string - */ - public function getHttpHost() - { - $scheme = $this->getScheme(); - $port = $this->getPort(); - - if (('http' == $scheme && 80 == $port) || ('https' == $scheme && 443 == $port)) { - return $this->getHost(); - } - - return $this->getHost().':'.$port; - } - - /** - * Returns the requested URI (path and query string). - * - * @return string The raw URI (i.e. not URI decoded) - */ - public function getRequestUri() - { - if (null === $this->requestUri) { - $this->requestUri = $this->prepareRequestUri(); - } - - return $this->requestUri; - } - - /** - * Gets the scheme and HTTP host. - * - * If the URL was called with basic authentication, the user - * and the password are not added to the generated string. - * - * @return string - */ - public function getSchemeAndHttpHost() - { - return $this->getScheme().'://'.$this->getHttpHost(); - } - - /** - * Generates a normalized URI (URL) for the Request. - * - * @return string - * - * @see getQueryString() - */ - public function getUri() - { - if (null !== $qs = $this->getQueryString()) { - $qs = '?'.$qs; - } - - return $this->getSchemeAndHttpHost().$this->getBaseUrl().$this->getPathInfo().$qs; - } - - /** - * Generates a normalized URI for the given path. - * - * @param string $path A path to use instead of the current one - * - * @return string - */ - public function getUriForPath(string $path) - { - return $this->getSchemeAndHttpHost().$this->getBaseUrl().$path; - } - - /** - * Returns the path as relative reference from the current Request path. - * - * Only the URIs path component (no schema, host etc.) is relevant and must be given. - * Both paths must be absolute and not contain relative parts. - * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. - * Furthermore, they can be used to reduce the link size in documents. - * - * Example target paths, given a base path of "/a/b/c/d": - * - "/a/b/c/d" -> "" - * - "/a/b/c/" -> "./" - * - "/a/b/" -> "../" - * - "/a/b/c/other" -> "other" - * - "/a/x/y" -> "../../x/y" - * - * @return string - */ - public function getRelativeUriForPath(string $path) - { - // be sure that we are dealing with an absolute path - if (!isset($path[0]) || '/' !== $path[0]) { - return $path; - } - - if ($path === $basePath = $this->getPathInfo()) { - return ''; - } - - $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); - $targetDirs = explode('/', substr($path, 1)); - array_pop($sourceDirs); - $targetFile = array_pop($targetDirs); - - foreach ($sourceDirs as $i => $dir) { - if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { - unset($sourceDirs[$i], $targetDirs[$i]); - } else { - break; - } - } - - $targetDirs[] = $targetFile; - $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs); - - // A reference to the same base directory or an empty subdirectory must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name - // (see https://tools.ietf.org/html/rfc3986#section-4.2). - return !isset($path[0]) || '/' === $path[0] - || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) - ? "./$path" : $path; - } - - /** - * Generates the normalized query string for the Request. - * - * It builds a normalized query string, where keys/value pairs are alphabetized - * and have consistent escaping. - * - * @return string|null - */ - public function getQueryString() - { - $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); - - return '' === $qs ? null : $qs; - } - - /** - * Checks whether the request is secure or not. - * - * This method can read the client protocol from the "X-Forwarded-Proto" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". - * - * @return bool - */ - public function isSecure() - { - if ($this->isFromTrustedProxy() && $proto = $this->getTrustedValues(self::HEADER_X_FORWARDED_PROTO)) { - return \in_array(strtolower($proto[0]), ['https', 'on', 'ssl', '1'], true); - } - - $https = $this->server->get('HTTPS'); - - return !empty($https) && 'off' !== strtolower($https); - } - - /** - * Returns the host name. - * - * This method can read the client host name from the "X-Forwarded-Host" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Host" header must contain the client host name. - * - * @return string - * - * @throws SuspiciousOperationException when the host name is invalid or not trusted - */ - public function getHost() - { - if ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_HOST)) { - $host = $host[0]; - } elseif (!$host = $this->headers->get('HOST')) { - if (!$host = $this->server->get('SERVER_NAME')) { - $host = $this->server->get('SERVER_ADDR', ''); - } - } - - // trim and remove port number from host - // host is lowercase as per RFC 952/2181 - $host = strtolower(preg_replace('/:\d+$/', '', trim($host))); - - // as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user) - // check that it does not contain forbidden characters (see RFC 952 and RFC 2181) - // use preg_replace() instead of preg_match() to prevent DoS attacks with long host names - if ($host && '' !== preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $host)) { - if (!$this->isHostValid) { - return ''; - } - $this->isHostValid = false; - - throw new SuspiciousOperationException(sprintf('Invalid Host "%s".', $host)); - } - - if (\count(self::$trustedHostPatterns) > 0) { - // to avoid host header injection attacks, you should provide a list of trusted host patterns - - if (\in_array($host, self::$trustedHosts)) { - return $host; - } - - foreach (self::$trustedHostPatterns as $pattern) { - if (preg_match($pattern, $host)) { - self::$trustedHosts[] = $host; - - return $host; - } - } - - if (!$this->isHostValid) { - return ''; - } - $this->isHostValid = false; - - throw new SuspiciousOperationException(sprintf('Untrusted Host "%s".', $host)); - } - - return $host; - } - - /** - * Sets the request method. - */ - public function setMethod(string $method) - { - $this->method = null; - $this->server->set('REQUEST_METHOD', $method); - } - - /** - * Gets the request "intended" method. - * - * If the X-HTTP-Method-Override header is set, and if the method is a POST, - * then it is used to determine the "real" intended HTTP method. - * - * The _method request parameter can also be used to determine the HTTP method, - * but only if enableHttpMethodParameterOverride() has been called. - * - * The method is always an uppercased string. - * - * @return string - * - * @see getRealMethod() - */ - public function getMethod() - { - if (null !== $this->method) { - return $this->method; - } - - $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); - - if ('POST' !== $this->method) { - return $this->method; - } - - $method = $this->headers->get('X-HTTP-METHOD-OVERRIDE'); - - if (!$method && self::$httpMethodParameterOverride) { - $method = $this->request->get('_method', $this->query->get('_method', 'POST')); - } - - if (!\is_string($method)) { - return $this->method; - } - - $method = strtoupper($method); - - if (\in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'PATCH', 'PURGE', 'TRACE'], true)) { - return $this->method = $method; - } - - if (!preg_match('/^[A-Z]++$/D', $method)) { - throw new SuspiciousOperationException(sprintf('Invalid method override "%s".', $method)); - } - - return $this->method = $method; - } - - /** - * Gets the "real" request method. - * - * @return string - * - * @see getMethod() - */ - public function getRealMethod() - { - return strtoupper($this->server->get('REQUEST_METHOD', 'GET')); - } - - /** - * Gets the mime type associated with the format. - * - * @return string|null - */ - public function getMimeType(string $format) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - return isset(static::$formats[$format]) ? static::$formats[$format][0] : null; - } - - /** - * Gets the mime types associated with the format. - * - * @return array - */ - public static function getMimeTypes(string $format) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - return static::$formats[$format] ?? []; - } - - /** - * Gets the format associated with the mime type. - * - * @return string|null - */ - public function getFormat(?string $mimeType) - { - $canonicalMimeType = null; - if ($mimeType && false !== $pos = strpos($mimeType, ';')) { - $canonicalMimeType = trim(substr($mimeType, 0, $pos)); - } - - if (null === static::$formats) { - static::initializeFormats(); - } - - foreach (static::$formats as $format => $mimeTypes) { - if (\in_array($mimeType, (array) $mimeTypes)) { - return $format; - } - if (null !== $canonicalMimeType && \in_array($canonicalMimeType, (array) $mimeTypes)) { - return $format; - } - } - - return null; - } - - /** - * Associates a format with mime types. - * - * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) - */ - public function setFormat(?string $format, $mimeTypes) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes]; - } - - /** - * Gets the request format. - * - * Here is the process to determine the format: - * - * * format defined by the user (with setRequestFormat()) - * * _format request attribute - * * $default - * - * @see getPreferredFormat - * - * @return string|null - */ - public function getRequestFormat(?string $default = 'html') - { - if (null === $this->format) { - $this->format = $this->attributes->get('_format'); - } - - return $this->format ?? $default; - } - - /** - * Sets the request format. - */ - public function setRequestFormat(?string $format) - { - $this->format = $format; - } - - /** - * Gets the format associated with the request. - * - * @return string|null - */ - public function getContentType() - { - return $this->getFormat($this->headers->get('CONTENT_TYPE', '')); - } - - /** - * Sets the default locale. - */ - public function setDefaultLocale(string $locale) - { - $this->defaultLocale = $locale; - - if (null === $this->locale) { - $this->setPhpDefaultLocale($locale); - } - } - - /** - * Get the default locale. - * - * @return string - */ - public function getDefaultLocale() - { - return $this->defaultLocale; - } - - /** - * Sets the locale. - */ - public function setLocale(string $locale) - { - $this->setPhpDefaultLocale($this->locale = $locale); - } - - /** - * Get the locale. - * - * @return string - */ - public function getLocale() - { - return null === $this->locale ? $this->defaultLocale : $this->locale; - } - - /** - * Checks if the request method is of specified type. - * - * @param string $method Uppercase request method (GET, POST etc) - * - * @return bool - */ - public function isMethod(string $method) - { - return $this->getMethod() === strtoupper($method); - } - - /** - * Checks whether or not the method is safe. - * - * @see https://tools.ietf.org/html/rfc7231#section-4.2.1 - * - * @return bool - */ - public function isMethodSafe() - { - return \in_array($this->getMethod(), ['GET', 'HEAD', 'OPTIONS', 'TRACE']); - } - - /** - * Checks whether or not the method is idempotent. - * - * @return bool - */ - public function isMethodIdempotent() - { - return \in_array($this->getMethod(), ['HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE']); - } - - /** - * Checks whether the method is cacheable or not. - * - * @see https://tools.ietf.org/html/rfc7231#section-4.2.3 - * - * @return bool - */ - public function isMethodCacheable() - { - return \in_array($this->getMethod(), ['GET', 'HEAD']); - } - - /** - * Returns the protocol version. - * - * If the application is behind a proxy, the protocol version used in the - * requests between the client and the proxy and between the proxy and the - * server might be different. This returns the former (from the "Via" header) - * if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns - * the latter (from the "SERVER_PROTOCOL" server parameter). - * - * @return string|null - */ - public function getProtocolVersion() - { - if ($this->isFromTrustedProxy()) { - preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via') ?? '', $matches); - - if ($matches) { - return 'HTTP/'.$matches[2]; - } - } - - return $this->server->get('SERVER_PROTOCOL'); - } - - /** - * Returns the request body content. - * - * @param bool $asResource If true, a resource will be returned - * - * @return string|resource - */ - public function getContent(bool $asResource = false) - { - $currentContentIsResource = \is_resource($this->content); - - if (true === $asResource) { - if ($currentContentIsResource) { - rewind($this->content); - - return $this->content; - } - - // Content passed in parameter (test) - if (\is_string($this->content)) { - $resource = fopen('php://temp', 'r+'); - fwrite($resource, $this->content); - rewind($resource); - - return $resource; - } - - $this->content = false; - - return fopen('php://input', 'r'); - } - - if ($currentContentIsResource) { - rewind($this->content); - - return stream_get_contents($this->content); - } - - if (null === $this->content || false === $this->content) { - $this->content = file_get_contents('php://input'); - } - - return $this->content; - } - - /** - * Gets the request body decoded as array, typically from a JSON payload. - * - * @throws JsonException When the body cannot be decoded to an array - * - * @return array - */ - public function toArray() - { - if ('' === $content = $this->getContent()) { - throw new JsonException('Request body is empty.'); - } - - try { - $content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0)); - } catch (\JsonException $e) { - throw new JsonException('Could not decode request body.', $e->getCode(), $e); - } - - if (\PHP_VERSION_ID < 70300 && \JSON_ERROR_NONE !== json_last_error()) { - throw new JsonException('Could not decode request body: '.json_last_error_msg(), json_last_error()); - } - - if (!\is_array($content)) { - throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned.', get_debug_type($content))); - } - - return $content; - } - - /** - * Gets the Etags. - * - * @return array - */ - public function getETags() - { - return preg_split('/\s*,\s*/', $this->headers->get('If-None-Match', ''), -1, \PREG_SPLIT_NO_EMPTY); - } - - /** - * @return bool - */ - public function isNoCache() - { - return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma'); - } - - /** - * Gets the preferred format for the response by inspecting, in the following order: - * * the request format set using setRequestFormat; - * * the values of the Accept HTTP header. - * - * Note that if you use this method, you should send the "Vary: Accept" header - * in the response to prevent any issues with intermediary HTTP caches. - */ - public function getPreferredFormat(?string $default = 'html'): ?string - { - if (null !== $this->preferredFormat || null !== $this->preferredFormat = $this->getRequestFormat(null)) { - return $this->preferredFormat; - } - - foreach ($this->getAcceptableContentTypes() as $mimeType) { - if ($this->preferredFormat = $this->getFormat($mimeType)) { - return $this->preferredFormat; - } - } - - return $default; - } - - /** - * Returns the preferred language. - * - * @param string[] $locales An array of ordered available locales - * - * @return string|null - */ - public function getPreferredLanguage(array $locales = null) - { - $preferredLanguages = $this->getLanguages(); - - if (empty($locales)) { - return $preferredLanguages[0] ?? null; - } - - if (!$preferredLanguages) { - return $locales[0]; - } - - $extendedPreferredLanguages = []; - foreach ($preferredLanguages as $language) { - $extendedPreferredLanguages[] = $language; - if (false !== $position = strpos($language, '_')) { - $superLanguage = substr($language, 0, $position); - if (!\in_array($superLanguage, $preferredLanguages)) { - $extendedPreferredLanguages[] = $superLanguage; - } - } - } - - $preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales)); - - return $preferredLanguages[0] ?? $locales[0]; - } - - /** - * Gets a list of languages acceptable by the client browser ordered in the user browser preferences. - * - * @return array - */ - public function getLanguages() - { - if (null !== $this->languages) { - return $this->languages; - } - - $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); - $this->languages = []; - foreach ($languages as $acceptHeaderItem) { - $lang = $acceptHeaderItem->getValue(); - if (str_contains($lang, '-')) { - $codes = explode('-', $lang); - if ('i' === $codes[0]) { - // Language not listed in ISO 639 that are not variants - // of any listed language, which can be registered with the - // i-prefix, such as i-cherokee - if (\count($codes) > 1) { - $lang = $codes[1]; - } - } else { - for ($i = 0, $max = \count($codes); $i < $max; ++$i) { - if (0 === $i) { - $lang = strtolower($codes[0]); - } else { - $lang .= '_'.strtoupper($codes[$i]); - } - } - } - } - - $this->languages[] = $lang; - } - - return $this->languages; - } - - /** - * Gets a list of charsets acceptable by the client browser in preferable order. - * - * @return array - */ - public function getCharsets() - { - if (null !== $this->charsets) { - return $this->charsets; - } - - return $this->charsets = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all())); - } - - /** - * Gets a list of encodings acceptable by the client browser in preferable order. - * - * @return array - */ - public function getEncodings() - { - if (null !== $this->encodings) { - return $this->encodings; - } - - return $this->encodings = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all())); - } - - /** - * Gets a list of content types acceptable by the client browser in preferable order. - * - * @return array - */ - public function getAcceptableContentTypes() - { - if (null !== $this->acceptableContentTypes) { - return $this->acceptableContentTypes; - } - - return $this->acceptableContentTypes = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all())); - } - - /** - * Returns true if the request is an XMLHttpRequest. - * - * It works if your JavaScript library sets an X-Requested-With HTTP header. - * It is known to work with common JavaScript frameworks: - * - * @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript - * - * @return bool - */ - public function isXmlHttpRequest() - { - return 'XMLHttpRequest' == $this->headers->get('X-Requested-With'); - } - - /** - * Checks whether the client browser prefers safe content or not according to RFC8674. - * - * @see https://tools.ietf.org/html/rfc8674 - */ - public function preferSafeContent(): bool - { - if (null !== $this->isSafeContentPreferred) { - return $this->isSafeContentPreferred; - } - - if (!$this->isSecure()) { - // see https://tools.ietf.org/html/rfc8674#section-3 - return $this->isSafeContentPreferred = false; - } - - return $this->isSafeContentPreferred = AcceptHeader::fromString($this->headers->get('Prefer'))->has('safe'); - } - - /* - * The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24) - * - * Code subject to the new BSD license (https://framework.zend.com/license). - * - * Copyright (c) 2005-2010 Zend Technologies USA Inc. (https://www.zend.com/) - */ - - protected function prepareRequestUri() - { - $requestUri = ''; - - if ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { - // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) - $requestUri = $this->server->get('UNENCODED_URL'); - $this->server->remove('UNENCODED_URL'); - $this->server->remove('IIS_WasUrlRewritten'); - } elseif ($this->server->has('REQUEST_URI')) { - $requestUri = $this->server->get('REQUEST_URI'); - - if ('' !== $requestUri && '/' === $requestUri[0]) { - // To only use path and query remove the fragment. - if (false !== $pos = strpos($requestUri, '#')) { - $requestUri = substr($requestUri, 0, $pos); - } - } else { - // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, - // only use URL path. - $uriComponents = parse_url($requestUri); - - if (isset($uriComponents['path'])) { - $requestUri = $uriComponents['path']; - } - - if (isset($uriComponents['query'])) { - $requestUri .= '?'.$uriComponents['query']; - } - } - } elseif ($this->server->has('ORIG_PATH_INFO')) { - // IIS 5.0, PHP as CGI - $requestUri = $this->server->get('ORIG_PATH_INFO'); - if ('' != $this->server->get('QUERY_STRING')) { - $requestUri .= '?'.$this->server->get('QUERY_STRING'); - } - $this->server->remove('ORIG_PATH_INFO'); - } - - // normalize the request URI to ease creating sub-requests from this request - $this->server->set('REQUEST_URI', $requestUri); - - return $requestUri; - } - - /** - * Prepares the base URL. - * - * @return string - */ - protected function prepareBaseUrl() - { - $filename = basename($this->server->get('SCRIPT_FILENAME', '')); - - if (basename($this->server->get('SCRIPT_NAME', '')) === $filename) { - $baseUrl = $this->server->get('SCRIPT_NAME'); - } elseif (basename($this->server->get('PHP_SELF', '')) === $filename) { - $baseUrl = $this->server->get('PHP_SELF'); - } elseif (basename($this->server->get('ORIG_SCRIPT_NAME', '')) === $filename) { - $baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); // 1and1 shared hosting compatibility - } else { - // Backtrack up the script_filename to find the portion matching - // php_self - $path = $this->server->get('PHP_SELF', ''); - $file = $this->server->get('SCRIPT_FILENAME', ''); - $segs = explode('/', trim($file, '/')); - $segs = array_reverse($segs); - $index = 0; - $last = \count($segs); - $baseUrl = ''; - do { - $seg = $segs[$index]; - $baseUrl = '/'.$seg.$baseUrl; - ++$index; - } while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos); - } - - // Does the baseUrl have anything in common with the request_uri? - $requestUri = $this->getRequestUri(); - if ('' !== $requestUri && '/' !== $requestUri[0]) { - $requestUri = '/'.$requestUri; - } - - if ($baseUrl && null !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) { - // full $baseUrl matches - return $prefix; - } - - if ($baseUrl && null !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.\DIRECTORY_SEPARATOR).'/')) { - // directory portion of $baseUrl matches - return rtrim($prefix, '/'.\DIRECTORY_SEPARATOR); - } - - $truncatedRequestUri = $requestUri; - if (false !== $pos = strpos($requestUri, '?')) { - $truncatedRequestUri = substr($requestUri, 0, $pos); - } - - $basename = basename($baseUrl ?? ''); - if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) { - // no match whatsoever; set it blank - return ''; - } - - // If using mod_rewrite or ISAPI_Rewrite strip the script filename - // out of baseUrl. $pos !== 0 makes sure it is not matching a value - // from PATH_INFO or QUERY_STRING - if (\strlen($requestUri) >= \strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && 0 !== $pos) { - $baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl)); - } - - return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR); - } - - /** - * Prepares the base path. - * - * @return string - */ - protected function prepareBasePath() - { - $baseUrl = $this->getBaseUrl(); - if (empty($baseUrl)) { - return ''; - } - - $filename = basename($this->server->get('SCRIPT_FILENAME')); - if (basename($baseUrl) === $filename) { - $basePath = \dirname($baseUrl); - } else { - $basePath = $baseUrl; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - $basePath = str_replace('\\', '/', $basePath); - } - - return rtrim($basePath, '/'); - } - - /** - * Prepares the path info. - * - * @return string - */ - protected function preparePathInfo() - { - if (null === ($requestUri = $this->getRequestUri())) { - return '/'; - } - - // Remove the query string from REQUEST_URI - if (false !== $pos = strpos($requestUri, '?')) { - $requestUri = substr($requestUri, 0, $pos); - } - if ('' !== $requestUri && '/' !== $requestUri[0]) { - $requestUri = '/'.$requestUri; - } - - if (null === ($baseUrl = $this->getBaseUrlReal())) { - return $requestUri; - } - - $pathInfo = substr($requestUri, \strlen($baseUrl)); - if (false === $pathInfo || '' === $pathInfo) { - // If substr() returns false then PATH_INFO is set to an empty string - return '/'; - } - - return $pathInfo; - } - - /** - * Initializes HTTP request formats. - */ - protected static function initializeFormats() - { - static::$formats = [ - 'html' => ['text/html', 'application/xhtml+xml'], - 'txt' => ['text/plain'], - 'js' => ['application/javascript', 'application/x-javascript', 'text/javascript'], - 'css' => ['text/css'], - 'json' => ['application/json', 'application/x-json'], - 'jsonld' => ['application/ld+json'], - 'xml' => ['text/xml', 'application/xml', 'application/x-xml'], - 'rdf' => ['application/rdf+xml'], - 'atom' => ['application/atom+xml'], - 'rss' => ['application/rss+xml'], - 'form' => ['application/x-www-form-urlencoded', 'multipart/form-data'], - ]; - } - - private function setPhpDefaultLocale(string $locale): void - { - // if either the class Locale doesn't exist, or an exception is thrown when - // setting the default locale, the intl module is not installed, and - // the call can be ignored: - try { - if (class_exists(\Locale::class, false)) { - \Locale::setDefault($locale); - } - } catch (\Exception $e) { - } - } - - /** - * Returns the prefix as encoded in the string when the string starts with - * the given prefix, null otherwise. - */ - private function getUrlencodedPrefix(string $string, string $prefix): ?string - { - if (!str_starts_with(rawurldecode($string), $prefix)) { - return null; - } - - $len = \strlen($prefix); - - if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) { - return $match[0]; - } - - return null; - } - - private static function createRequestFromFactory(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): self - { - if (self::$requestFactory) { - $request = (self::$requestFactory)($query, $request, $attributes, $cookies, $files, $server, $content); - - if (!$request instanceof self) { - throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.'); - } - - return $request; - } - - return new static($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Indicates whether this request originated from a trusted proxy. - * - * This can be useful to determine whether or not to trust the - * contents of a proxy-specific header. - * - * @return bool - */ - public function isFromTrustedProxy() - { - return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR', ''), self::$trustedProxies); - } - - private function getTrustedValues(int $type, string $ip = null): array - { - $clientValues = []; - $forwardedValues = []; - - if ((self::$trustedHeaderSet & $type) && $this->headers->has(self::TRUSTED_HEADERS[$type])) { - foreach (explode(',', $this->headers->get(self::TRUSTED_HEADERS[$type])) as $v) { - $clientValues[] = (self::HEADER_X_FORWARDED_PORT === $type ? '0.0.0.0:' : '').trim($v); - } - } - - if ((self::$trustedHeaderSet & self::HEADER_FORWARDED) && (isset(self::FORWARDED_PARAMS[$type])) && $this->headers->has(self::TRUSTED_HEADERS[self::HEADER_FORWARDED])) { - $forwarded = $this->headers->get(self::TRUSTED_HEADERS[self::HEADER_FORWARDED]); - $parts = HeaderUtils::split($forwarded, ',;='); - $forwardedValues = []; - $param = self::FORWARDED_PARAMS[$type]; - foreach ($parts as $subParts) { - if (null === $v = HeaderUtils::combine($subParts)[$param] ?? null) { - continue; - } - if (self::HEADER_X_FORWARDED_PORT === $type) { - if (str_ends_with($v, ']') || false === $v = strrchr($v, ':')) { - $v = $this->isSecure() ? ':443' : ':80'; - } - $v = '0.0.0.0'.$v; - } - $forwardedValues[] = $v; - } - } - - if (null !== $ip) { - $clientValues = $this->normalizeAndFilterClientIps($clientValues, $ip); - $forwardedValues = $this->normalizeAndFilterClientIps($forwardedValues, $ip); - } - - if ($forwardedValues === $clientValues || !$clientValues) { - return $forwardedValues; - } - - if (!$forwardedValues) { - return $clientValues; - } - - if (!$this->isForwardedValid) { - return null !== $ip ? ['0.0.0.0', $ip] : []; - } - $this->isForwardedValid = false; - - throw new ConflictingHeadersException(sprintf('The request has both a trusted "%s" header and a trusted "%s" header, conflicting with each other. You should either configure your proxy to remove one of them, or configure your project to distrust the offending one.', self::TRUSTED_HEADERS[self::HEADER_FORWARDED], self::TRUSTED_HEADERS[$type])); - } - - private function normalizeAndFilterClientIps(array $clientIps, string $ip): array - { - if (!$clientIps) { - return []; - } - $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from - $firstTrustedIp = null; - - foreach ($clientIps as $key => $clientIp) { - if (strpos($clientIp, '.')) { - // Strip :port from IPv4 addresses. This is allowed in Forwarded - // and may occur in X-Forwarded-For. - $i = strpos($clientIp, ':'); - if ($i) { - $clientIps[$key] = $clientIp = substr($clientIp, 0, $i); - } - } elseif (str_starts_with($clientIp, '[')) { - // Strip brackets and :port from IPv6 addresses. - $i = strpos($clientIp, ']', 1); - $clientIps[$key] = $clientIp = substr($clientIp, 1, $i - 1); - } - - if (!filter_var($clientIp, \FILTER_VALIDATE_IP)) { - unset($clientIps[$key]); - - continue; - } - - if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { - unset($clientIps[$key]); - - // Fallback to this when the client IP falls into the range of trusted proxies - if (null === $firstTrustedIp) { - $firstTrustedIp = $clientIp; - } - } - } - - // Now the IP chain contains only untrusted proxies and the client IP - return $clientIps ? array_reverse($clientIps) : [$firstTrustedIp]; - } -} diff --git a/lib/symfony/http-foundation/RequestMatcher.php b/lib/symfony/http-foundation/RequestMatcher.php deleted file mode 100644 index f2645f9ae..000000000 --- a/lib/symfony/http-foundation/RequestMatcher.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RequestMatcher compares a pre-defined set of checks against a Request instance. - * - * @author Fabien Potencier - */ -class RequestMatcher implements RequestMatcherInterface -{ - /** - * @var string|null - */ - private $path; - - /** - * @var string|null - */ - private $host; - - /** - * @var int|null - */ - private $port; - - /** - * @var string[] - */ - private $methods = []; - - /** - * @var string[] - */ - private $ips = []; - - /** - * @var array - */ - private $attributes = []; - - /** - * @var string[] - */ - private $schemes = []; - - /** - * @param string|string[]|null $methods - * @param string|string[]|null $ips - * @param string|string[]|null $schemes - */ - public function __construct(string $path = null, string $host = null, $methods = null, $ips = null, array $attributes = [], $schemes = null, int $port = null) - { - $this->matchPath($path); - $this->matchHost($host); - $this->matchMethod($methods); - $this->matchIps($ips); - $this->matchScheme($schemes); - $this->matchPort($port); - - foreach ($attributes as $k => $v) { - $this->matchAttribute($k, $v); - } - } - - /** - * Adds a check for the HTTP scheme. - * - * @param string|string[]|null $scheme An HTTP scheme or an array of HTTP schemes - */ - public function matchScheme($scheme) - { - $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : []; - } - - /** - * Adds a check for the URL host name. - */ - public function matchHost(?string $regexp) - { - $this->host = $regexp; - } - - /** - * Adds a check for the the URL port. - * - * @param int|null $port The port number to connect to - */ - public function matchPort(?int $port) - { - $this->port = $port; - } - - /** - * Adds a check for the URL path info. - */ - public function matchPath(?string $regexp) - { - $this->path = $regexp; - } - - /** - * Adds a check for the client IP. - * - * @param string $ip A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 - */ - public function matchIp(string $ip) - { - $this->matchIps($ip); - } - - /** - * Adds a check for the client IP. - * - * @param string|string[]|null $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 - */ - public function matchIps($ips) - { - $ips = null !== $ips ? (array) $ips : []; - - $this->ips = array_reduce($ips, static function (array $ips, string $ip) { - return array_merge($ips, preg_split('/\s*,\s*/', $ip)); - }, []); - } - - /** - * Adds a check for the HTTP method. - * - * @param string|string[]|null $method An HTTP method or an array of HTTP methods - */ - public function matchMethod($method) - { - $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : []; - } - - /** - * Adds a check for request attribute. - */ - public function matchAttribute(string $key, string $regexp) - { - $this->attributes[$key] = $regexp; - } - - /** - * {@inheritdoc} - */ - public function matches(Request $request) - { - if ($this->schemes && !\in_array($request->getScheme(), $this->schemes, true)) { - return false; - } - - if ($this->methods && !\in_array($request->getMethod(), $this->methods, true)) { - return false; - } - - foreach ($this->attributes as $key => $pattern) { - $requestAttribute = $request->attributes->get($key); - if (!\is_string($requestAttribute)) { - return false; - } - if (!preg_match('{'.$pattern.'}', $requestAttribute)) { - return false; - } - } - - if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getPathInfo()))) { - return false; - } - - if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getHost())) { - return false; - } - - if (null !== $this->port && 0 < $this->port && $request->getPort() !== $this->port) { - return false; - } - - if (IpUtils::checkIp($request->getClientIp() ?? '', $this->ips)) { - return true; - } - - // Note to future implementors: add additional checks above the - // foreach above or else your check might not be run! - return 0 === \count($this->ips); - } -} diff --git a/lib/symfony/http-foundation/RequestMatcherInterface.php b/lib/symfony/http-foundation/RequestMatcherInterface.php deleted file mode 100644 index c2e147858..000000000 --- a/lib/symfony/http-foundation/RequestMatcherInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RequestMatcherInterface is an interface for strategies to match a Request. - * - * @author Fabien Potencier - */ -interface RequestMatcherInterface -{ - /** - * Decides whether the rule(s) implemented by the strategy matches the supplied request. - * - * @return bool - */ - public function matches(Request $request); -} diff --git a/lib/symfony/http-foundation/RequestStack.php b/lib/symfony/http-foundation/RequestStack.php deleted file mode 100644 index 855b51816..000000000 --- a/lib/symfony/http-foundation/RequestStack.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Request stack that controls the lifecycle of requests. - * - * @author Benjamin Eberlei - */ -class RequestStack -{ - /** - * @var Request[] - */ - private $requests = []; - - /** - * Pushes a Request on the stack. - * - * This method should generally not be called directly as the stack - * management should be taken care of by the application itself. - */ - public function push(Request $request) - { - $this->requests[] = $request; - } - - /** - * Pops the current request from the stack. - * - * This operation lets the current request go out of scope. - * - * This method should generally not be called directly as the stack - * management should be taken care of by the application itself. - * - * @return Request|null - */ - public function pop() - { - if (!$this->requests) { - return null; - } - - return array_pop($this->requests); - } - - /** - * @return Request|null - */ - public function getCurrentRequest() - { - return end($this->requests) ?: null; - } - - /** - * Gets the main request. - * - * Be warned that making your code aware of the main request - * might make it un-compatible with other features of your framework - * like ESI support. - */ - public function getMainRequest(): ?Request - { - if (!$this->requests) { - return null; - } - - return $this->requests[0]; - } - - /** - * Gets the master request. - * - * @return Request|null - * - * @deprecated since symfony/http-foundation 5.3, use getMainRequest() instead - */ - public function getMasterRequest() - { - trigger_deprecation('symfony/http-foundation', '5.3', '"%s()" is deprecated, use "getMainRequest()" instead.', __METHOD__); - - return $this->getMainRequest(); - } - - /** - * Returns the parent request of the current. - * - * Be warned that making your code aware of the parent request - * might make it un-compatible with other features of your framework - * like ESI support. - * - * If current Request is the main request, it returns null. - * - * @return Request|null - */ - public function getParentRequest() - { - $pos = \count($this->requests) - 2; - - return $this->requests[$pos] ?? null; - } - - /** - * Gets the current session. - * - * @throws SessionNotFoundException - */ - public function getSession(): SessionInterface - { - if ((null !== $request = end($this->requests) ?: null) && $request->hasSession()) { - return $request->getSession(); - } - - throw new SessionNotFoundException(); - } -} diff --git a/lib/symfony/http-foundation/Response.php b/lib/symfony/http-foundation/Response.php deleted file mode 100644 index d5c8cb45c..000000000 --- a/lib/symfony/http-foundation/Response.php +++ /dev/null @@ -1,1286 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -// Help opcache.preload discover always-needed symbols -class_exists(ResponseHeaderBag::class); - -/** - * Response represents an HTTP response. - * - * @author Fabien Potencier - */ -class Response -{ - public const HTTP_CONTINUE = 100; - public const HTTP_SWITCHING_PROTOCOLS = 101; - public const HTTP_PROCESSING = 102; // RFC2518 - public const HTTP_EARLY_HINTS = 103; // RFC8297 - public const HTTP_OK = 200; - public const HTTP_CREATED = 201; - public const HTTP_ACCEPTED = 202; - public const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; - public const HTTP_NO_CONTENT = 204; - public const HTTP_RESET_CONTENT = 205; - public const HTTP_PARTIAL_CONTENT = 206; - public const HTTP_MULTI_STATUS = 207; // RFC4918 - public const HTTP_ALREADY_REPORTED = 208; // RFC5842 - public const HTTP_IM_USED = 226; // RFC3229 - public const HTTP_MULTIPLE_CHOICES = 300; - public const HTTP_MOVED_PERMANENTLY = 301; - public const HTTP_FOUND = 302; - public const HTTP_SEE_OTHER = 303; - public const HTTP_NOT_MODIFIED = 304; - public const HTTP_USE_PROXY = 305; - public const HTTP_RESERVED = 306; - public const HTTP_TEMPORARY_REDIRECT = 307; - public const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 - public const HTTP_BAD_REQUEST = 400; - public const HTTP_UNAUTHORIZED = 401; - public const HTTP_PAYMENT_REQUIRED = 402; - public const HTTP_FORBIDDEN = 403; - public const HTTP_NOT_FOUND = 404; - public const HTTP_METHOD_NOT_ALLOWED = 405; - public const HTTP_NOT_ACCEPTABLE = 406; - public const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; - public const HTTP_REQUEST_TIMEOUT = 408; - public const HTTP_CONFLICT = 409; - public const HTTP_GONE = 410; - public const HTTP_LENGTH_REQUIRED = 411; - public const HTTP_PRECONDITION_FAILED = 412; - public const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; - public const HTTP_REQUEST_URI_TOO_LONG = 414; - public const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; - public const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; - public const HTTP_EXPECTATION_FAILED = 417; - public const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 - public const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 - public const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 - public const HTTP_LOCKED = 423; // RFC4918 - public const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 - public const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 - public const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 - public const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 - public const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 - public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 - public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; // RFC7725 - public const HTTP_INTERNAL_SERVER_ERROR = 500; - public const HTTP_NOT_IMPLEMENTED = 501; - public const HTTP_BAD_GATEWAY = 502; - public const HTTP_SERVICE_UNAVAILABLE = 503; - public const HTTP_GATEWAY_TIMEOUT = 504; - public const HTTP_VERSION_NOT_SUPPORTED = 505; - public const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 - public const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 - public const HTTP_LOOP_DETECTED = 508; // RFC5842 - public const HTTP_NOT_EXTENDED = 510; // RFC2774 - public const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585 - - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control - */ - private const HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES = [ - 'must_revalidate' => false, - 'no_cache' => false, - 'no_store' => false, - 'no_transform' => false, - 'public' => false, - 'private' => false, - 'proxy_revalidate' => false, - 'max_age' => true, - 's_maxage' => true, - 'immutable' => false, - 'last_modified' => true, - 'etag' => true, - ]; - - /** - * @var ResponseHeaderBag - */ - public $headers; - - /** - * @var string - */ - protected $content; - - /** - * @var string - */ - protected $version; - - /** - * @var int - */ - protected $statusCode; - - /** - * @var string - */ - protected $statusText; - - /** - * @var string - */ - protected $charset; - - /** - * Status codes translation table. - * - * The list of codes is complete according to the - * {@link https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml Hypertext Transfer Protocol (HTTP) Status Code Registry} - * (last updated 2021-10-01). - * - * Unless otherwise noted, the status code is defined in RFC2616. - * - * @var array - */ - public static $statusTexts = [ - 100 => 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', // RFC2518 - 103 => 'Early Hints', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', // RFC4918 - 208 => 'Already Reported', // RFC5842 - 226 => 'IM Used', // RFC3229 - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', // RFC7238 - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Content Too Large', // RFC-ietf-httpbis-semantics - 414 => 'URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', // RFC2324 - 421 => 'Misdirected Request', // RFC7540 - 422 => 'Unprocessable Content', // RFC-ietf-httpbis-semantics - 423 => 'Locked', // RFC4918 - 424 => 'Failed Dependency', // RFC4918 - 425 => 'Too Early', // RFC-ietf-httpbis-replay-04 - 426 => 'Upgrade Required', // RFC2817 - 428 => 'Precondition Required', // RFC6585 - 429 => 'Too Many Requests', // RFC6585 - 431 => 'Request Header Fields Too Large', // RFC6585 - 451 => 'Unavailable For Legal Reasons', // RFC7725 - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates', // RFC2295 - 507 => 'Insufficient Storage', // RFC4918 - 508 => 'Loop Detected', // RFC5842 - 510 => 'Not Extended', // RFC2774 - 511 => 'Network Authentication Required', // RFC6585 - ]; - - /** - * @throws \InvalidArgumentException When the HTTP status code is not valid - */ - public function __construct(?string $content = '', int $status = 200, array $headers = []) - { - $this->headers = new ResponseHeaderBag($headers); - $this->setContent($content); - $this->setStatusCode($status); - $this->setProtocolVersion('1.0'); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return Response::create($body, 200) - * ->setSharedMaxAge(300); - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create(?string $content = '', int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($content, $status, $headers); - } - - /** - * Returns the Response as an HTTP string. - * - * The string representation of the Response is the same as the - * one that will be sent to the client only if the prepare() method - * has been called before. - * - * @return string - * - * @see prepare() - */ - public function __toString() - { - return - sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n". - $this->headers."\r\n". - $this->getContent(); - } - - /** - * Clones the current Response instance. - */ - public function __clone() - { - $this->headers = clone $this->headers; - } - - /** - * Prepares the Response before it is sent to the client. - * - * This method tweaks the Response to ensure that it is - * compliant with RFC 2616. Most of the changes are based on - * the Request that is "associated" with this Response. - * - * @return $this - */ - public function prepare(Request $request) - { - $headers = $this->headers; - - if ($this->isInformational() || $this->isEmpty()) { - $this->setContent(null); - $headers->remove('Content-Type'); - $headers->remove('Content-Length'); - // prevent PHP from sending the Content-Type header based on default_mimetype - ini_set('default_mimetype', ''); - } else { - // Content-type based on the Request - if (!$headers->has('Content-Type')) { - $format = $request->getRequestFormat(null); - if (null !== $format && $mimeType = $request->getMimeType($format)) { - $headers->set('Content-Type', $mimeType); - } - } - - // Fix Content-Type - $charset = $this->charset ?: 'UTF-8'; - if (!$headers->has('Content-Type')) { - $headers->set('Content-Type', 'text/html; charset='.$charset); - } elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) { - // add the charset - $headers->set('Content-Type', $headers->get('Content-Type').'; charset='.$charset); - } - - // Fix Content-Length - if ($headers->has('Transfer-Encoding')) { - $headers->remove('Content-Length'); - } - - if ($request->isMethod('HEAD')) { - // cf. RFC2616 14.13 - $length = $headers->get('Content-Length'); - $this->setContent(null); - if ($length) { - $headers->set('Content-Length', $length); - } - } - } - - // Fix protocol - if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) { - $this->setProtocolVersion('1.1'); - } - - // Check if we need to send extra expire info headers - if ('1.0' == $this->getProtocolVersion() && str_contains($headers->get('Cache-Control', ''), 'no-cache')) { - $headers->set('pragma', 'no-cache'); - $headers->set('expires', -1); - } - - $this->ensureIEOverSSLCompatibility($request); - - if ($request->isSecure()) { - foreach ($headers->getCookies() as $cookie) { - $cookie->setSecureDefault(true); - } - } - - return $this; - } - - /** - * Sends HTTP headers. - * - * @return $this - */ - public function sendHeaders() - { - // headers have already been sent by the developer - if (headers_sent()) { - return $this; - } - - // headers - foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) { - $replace = 0 === strcasecmp($name, 'Content-Type'); - foreach ($values as $value) { - header($name.': '.$value, $replace, $this->statusCode); - } - } - - // cookies - foreach ($this->headers->getCookies() as $cookie) { - header('Set-Cookie: '.$cookie, false, $this->statusCode); - } - - // status - header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); - - return $this; - } - - /** - * Sends content for the current web response. - * - * @return $this - */ - public function sendContent() - { - echo $this->content; - - return $this; - } - - /** - * Sends HTTP headers and content. - * - * @return $this - */ - public function send() - { - $this->sendHeaders(); - $this->sendContent(); - - if (\function_exists('fastcgi_finish_request')) { - fastcgi_finish_request(); - } elseif (\function_exists('litespeed_finish_request')) { - litespeed_finish_request(); - } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - static::closeOutputBuffers(0, true); - flush(); - } - - return $this; - } - - /** - * Sets the response content. - * - * @return $this - */ - public function setContent(?string $content) - { - $this->content = $content ?? ''; - - return $this; - } - - /** - * Gets the current response content. - * - * @return string|false - */ - public function getContent() - { - return $this->content; - } - - /** - * Sets the HTTP protocol version (1.0 or 1.1). - * - * @return $this - * - * @final - */ - public function setProtocolVersion(string $version): object - { - $this->version = $version; - - return $this; - } - - /** - * Gets the HTTP protocol version. - * - * @final - */ - public function getProtocolVersion(): string - { - return $this->version; - } - - /** - * Sets the response status code. - * - * If the status text is null it will be automatically populated for the known - * status codes and left empty otherwise. - * - * @return $this - * - * @throws \InvalidArgumentException When the HTTP status code is not valid - * - * @final - */ - public function setStatusCode(int $code, string $text = null): object - { - $this->statusCode = $code; - if ($this->isInvalid()) { - throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code)); - } - - if (null === $text) { - $this->statusText = self::$statusTexts[$code] ?? 'unknown status'; - - return $this; - } - - if (false === $text) { - $this->statusText = ''; - - return $this; - } - - $this->statusText = $text; - - return $this; - } - - /** - * Retrieves the status code for the current web response. - * - * @final - */ - public function getStatusCode(): int - { - return $this->statusCode; - } - - /** - * Sets the response charset. - * - * @return $this - * - * @final - */ - public function setCharset(string $charset): object - { - $this->charset = $charset; - - return $this; - } - - /** - * Retrieves the response charset. - * - * @final - */ - public function getCharset(): ?string - { - return $this->charset; - } - - /** - * Returns true if the response may safely be kept in a shared (surrogate) cache. - * - * Responses marked "private" with an explicit Cache-Control directive are - * considered uncacheable. - * - * Responses with neither a freshness lifetime (Expires, max-age) nor cache - * validator (Last-Modified, ETag) are considered uncacheable because there is - * no way to tell when or how to remove them from the cache. - * - * Note that RFC 7231 and RFC 7234 possibly allow for a more permissive implementation, - * for example "status codes that are defined as cacheable by default [...] - * can be reused by a cache with heuristic expiration unless otherwise indicated" - * (https://tools.ietf.org/html/rfc7231#section-6.1) - * - * @final - */ - public function isCacheable(): bool - { - if (!\in_array($this->statusCode, [200, 203, 300, 301, 302, 404, 410])) { - return false; - } - - if ($this->headers->hasCacheControlDirective('no-store') || $this->headers->getCacheControlDirective('private')) { - return false; - } - - return $this->isValidateable() || $this->isFresh(); - } - - /** - * Returns true if the response is "fresh". - * - * Fresh responses may be served from cache without any interaction with the - * origin. A response is considered fresh when it includes a Cache-Control/max-age - * indicator or Expires header and the calculated age is less than the freshness lifetime. - * - * @final - */ - public function isFresh(): bool - { - return $this->getTtl() > 0; - } - - /** - * Returns true if the response includes headers that can be used to validate - * the response with the origin server using a conditional GET request. - * - * @final - */ - public function isValidateable(): bool - { - return $this->headers->has('Last-Modified') || $this->headers->has('ETag'); - } - - /** - * Marks the response as "private". - * - * It makes the response ineligible for serving other clients. - * - * @return $this - * - * @final - */ - public function setPrivate(): object - { - $this->headers->removeCacheControlDirective('public'); - $this->headers->addCacheControlDirective('private'); - - return $this; - } - - /** - * Marks the response as "public". - * - * It makes the response eligible for serving other clients. - * - * @return $this - * - * @final - */ - public function setPublic(): object - { - $this->headers->addCacheControlDirective('public'); - $this->headers->removeCacheControlDirective('private'); - - return $this; - } - - /** - * Marks the response as "immutable". - * - * @return $this - * - * @final - */ - public function setImmutable(bool $immutable = true): object - { - if ($immutable) { - $this->headers->addCacheControlDirective('immutable'); - } else { - $this->headers->removeCacheControlDirective('immutable'); - } - - return $this; - } - - /** - * Returns true if the response is marked as "immutable". - * - * @final - */ - public function isImmutable(): bool - { - return $this->headers->hasCacheControlDirective('immutable'); - } - - /** - * Returns true if the response must be revalidated by shared caches once it has become stale. - * - * This method indicates that the response must not be served stale by a - * cache in any circumstance without first revalidating with the origin. - * When present, the TTL of the response should not be overridden to be - * greater than the value provided by the origin. - * - * @final - */ - public function mustRevalidate(): bool - { - return $this->headers->hasCacheControlDirective('must-revalidate') || $this->headers->hasCacheControlDirective('proxy-revalidate'); - } - - /** - * Returns the Date header as a DateTime instance. - * - * @throws \RuntimeException When the header is not parseable - * - * @final - */ - public function getDate(): ?\DateTimeInterface - { - return $this->headers->getDate('Date'); - } - - /** - * Sets the Date header. - * - * @return $this - * - * @final - */ - public function setDate(\DateTimeInterface $date): object - { - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Date', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the age of the response in seconds. - * - * @final - */ - public function getAge(): int - { - if (null !== $age = $this->headers->get('Age')) { - return (int) $age; - } - - return max(time() - (int) $this->getDate()->format('U'), 0); - } - - /** - * Marks the response stale by setting the Age header to be equal to the maximum age of the response. - * - * @return $this - */ - public function expire() - { - if ($this->isFresh()) { - $this->headers->set('Age', $this->getMaxAge()); - $this->headers->remove('Expires'); - } - - return $this; - } - - /** - * Returns the value of the Expires header as a DateTime instance. - * - * @final - */ - public function getExpires(): ?\DateTimeInterface - { - try { - return $this->headers->getDate('Expires'); - } catch (\RuntimeException $e) { - // according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past - return \DateTime::createFromFormat('U', time() - 172800); - } - } - - /** - * Sets the Expires HTTP header with a DateTime instance. - * - * Passing null as value will remove the header. - * - * @return $this - * - * @final - */ - public function setExpires(\DateTimeInterface $date = null): object - { - if (null === $date) { - $this->headers->remove('Expires'); - - return $this; - } - - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Expires', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the number of seconds after the time specified in the response's Date - * header when the response should no longer be considered fresh. - * - * First, it checks for a s-maxage directive, then a max-age directive, and then it falls - * back on an expires header. It returns null when no maximum age can be established. - * - * @final - */ - public function getMaxAge(): ?int - { - if ($this->headers->hasCacheControlDirective('s-maxage')) { - return (int) $this->headers->getCacheControlDirective('s-maxage'); - } - - if ($this->headers->hasCacheControlDirective('max-age')) { - return (int) $this->headers->getCacheControlDirective('max-age'); - } - - if (null !== $this->getExpires()) { - return (int) $this->getExpires()->format('U') - (int) $this->getDate()->format('U'); - } - - return null; - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh. - * - * This methods sets the Cache-Control max-age directive. - * - * @return $this - * - * @final - */ - public function setMaxAge(int $value): object - { - $this->headers->addCacheControlDirective('max-age', $value); - - return $this; - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh by shared caches. - * - * This methods sets the Cache-Control s-maxage directive. - * - * @return $this - * - * @final - */ - public function setSharedMaxAge(int $value): object - { - $this->setPublic(); - $this->headers->addCacheControlDirective('s-maxage', $value); - - return $this; - } - - /** - * Returns the response's time-to-live in seconds. - * - * It returns null when no freshness information is present in the response. - * - * When the responses TTL is <= 0, the response may not be served from cache without first - * revalidating with the origin. - * - * @final - */ - public function getTtl(): ?int - { - $maxAge = $this->getMaxAge(); - - return null !== $maxAge ? $maxAge - $this->getAge() : null; - } - - /** - * Sets the response's time-to-live for shared caches in seconds. - * - * This method adjusts the Cache-Control/s-maxage directive. - * - * @return $this - * - * @final - */ - public function setTtl(int $seconds): object - { - $this->setSharedMaxAge($this->getAge() + $seconds); - - return $this; - } - - /** - * Sets the response's time-to-live for private/client caches in seconds. - * - * This method adjusts the Cache-Control/max-age directive. - * - * @return $this - * - * @final - */ - public function setClientTtl(int $seconds): object - { - $this->setMaxAge($this->getAge() + $seconds); - - return $this; - } - - /** - * Returns the Last-Modified HTTP header as a DateTime instance. - * - * @throws \RuntimeException When the HTTP header is not parseable - * - * @final - */ - public function getLastModified(): ?\DateTimeInterface - { - return $this->headers->getDate('Last-Modified'); - } - - /** - * Sets the Last-Modified HTTP header with a DateTime instance. - * - * Passing null as value will remove the header. - * - * @return $this - * - * @final - */ - public function setLastModified(\DateTimeInterface $date = null): object - { - if (null === $date) { - $this->headers->remove('Last-Modified'); - - return $this; - } - - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the literal value of the ETag HTTP header. - * - * @final - */ - public function getEtag(): ?string - { - return $this->headers->get('ETag'); - } - - /** - * Sets the ETag value. - * - * @param string|null $etag The ETag unique identifier or null to remove the header - * @param bool $weak Whether you want a weak ETag or not - * - * @return $this - * - * @final - */ - public function setEtag(string $etag = null, bool $weak = false): object - { - if (null === $etag) { - $this->headers->remove('Etag'); - } else { - if (!str_starts_with($etag, '"')) { - $etag = '"'.$etag.'"'; - } - - $this->headers->set('ETag', (true === $weak ? 'W/' : '').$etag); - } - - return $this; - } - - /** - * Sets the response's cache headers (validation and/or expiration). - * - * Available options are: must_revalidate, no_cache, no_store, no_transform, public, private, proxy_revalidate, max_age, s_maxage, immutable, last_modified and etag. - * - * @return $this - * - * @throws \InvalidArgumentException - * - * @final - */ - public function setCache(array $options): object - { - if ($diff = array_diff(array_keys($options), array_keys(self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES))) { - throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff))); - } - - if (isset($options['etag'])) { - $this->setEtag($options['etag']); - } - - if (isset($options['last_modified'])) { - $this->setLastModified($options['last_modified']); - } - - if (isset($options['max_age'])) { - $this->setMaxAge($options['max_age']); - } - - if (isset($options['s_maxage'])) { - $this->setSharedMaxAge($options['s_maxage']); - } - - foreach (self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES as $directive => $hasValue) { - if (!$hasValue && isset($options[$directive])) { - if ($options[$directive]) { - $this->headers->addCacheControlDirective(str_replace('_', '-', $directive)); - } else { - $this->headers->removeCacheControlDirective(str_replace('_', '-', $directive)); - } - } - } - - if (isset($options['public'])) { - if ($options['public']) { - $this->setPublic(); - } else { - $this->setPrivate(); - } - } - - if (isset($options['private'])) { - if ($options['private']) { - $this->setPrivate(); - } else { - $this->setPublic(); - } - } - - return $this; - } - - /** - * Modifies the response so that it conforms to the rules defined for a 304 status code. - * - * This sets the status, removes the body, and discards any headers - * that MUST NOT be included in 304 responses. - * - * @return $this - * - * @see https://tools.ietf.org/html/rfc2616#section-10.3.5 - * - * @final - */ - public function setNotModified(): object - { - $this->setStatusCode(304); - $this->setContent(null); - - // remove headers that MUST NOT be included with 304 Not Modified responses - foreach (['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'] as $header) { - $this->headers->remove($header); - } - - return $this; - } - - /** - * Returns true if the response includes a Vary header. - * - * @final - */ - public function hasVary(): bool - { - return null !== $this->headers->get('Vary'); - } - - /** - * Returns an array of header names given in the Vary header. - * - * @final - */ - public function getVary(): array - { - if (!$vary = $this->headers->all('Vary')) { - return []; - } - - $ret = []; - foreach ($vary as $item) { - $ret[] = preg_split('/[\s,]+/', $item); - } - - return array_merge([], ...$ret); - } - - /** - * Sets the Vary header. - * - * @param string|array $headers - * @param bool $replace Whether to replace the actual value or not (true by default) - * - * @return $this - * - * @final - */ - public function setVary($headers, bool $replace = true): object - { - $this->headers->set('Vary', $headers, $replace); - - return $this; - } - - /** - * Determines if the Response validators (ETag, Last-Modified) match - * a conditional value specified in the Request. - * - * If the Response is not modified, it sets the status code to 304 and - * removes the actual content by calling the setNotModified() method. - * - * @final - */ - public function isNotModified(Request $request): bool - { - if (!$request->isMethodCacheable()) { - return false; - } - - $notModified = false; - $lastModified = $this->headers->get('Last-Modified'); - $modifiedSince = $request->headers->get('If-Modified-Since'); - - if (($ifNoneMatchEtags = $request->getETags()) && (null !== $etag = $this->getEtag())) { - if (0 == strncmp($etag, 'W/', 2)) { - $etag = substr($etag, 2); - } - - // Use weak comparison as per https://tools.ietf.org/html/rfc7232#section-3.2. - foreach ($ifNoneMatchEtags as $ifNoneMatchEtag) { - if (0 == strncmp($ifNoneMatchEtag, 'W/', 2)) { - $ifNoneMatchEtag = substr($ifNoneMatchEtag, 2); - } - - if ($ifNoneMatchEtag === $etag || '*' === $ifNoneMatchEtag) { - $notModified = true; - break; - } - } - } - // Only do If-Modified-Since date comparison when If-None-Match is not present as per https://tools.ietf.org/html/rfc7232#section-3.3. - elseif ($modifiedSince && $lastModified) { - $notModified = strtotime($modifiedSince) >= strtotime($lastModified); - } - - if ($notModified) { - $this->setNotModified(); - } - - return $notModified; - } - - /** - * Is response invalid? - * - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - * - * @final - */ - public function isInvalid(): bool - { - return $this->statusCode < 100 || $this->statusCode >= 600; - } - - /** - * Is response informative? - * - * @final - */ - public function isInformational(): bool - { - return $this->statusCode >= 100 && $this->statusCode < 200; - } - - /** - * Is response successful? - * - * @final - */ - public function isSuccessful(): bool - { - return $this->statusCode >= 200 && $this->statusCode < 300; - } - - /** - * Is the response a redirect? - * - * @final - */ - public function isRedirection(): bool - { - return $this->statusCode >= 300 && $this->statusCode < 400; - } - - /** - * Is there a client error? - * - * @final - */ - public function isClientError(): bool - { - return $this->statusCode >= 400 && $this->statusCode < 500; - } - - /** - * Was there a server side error? - * - * @final - */ - public function isServerError(): bool - { - return $this->statusCode >= 500 && $this->statusCode < 600; - } - - /** - * Is the response OK? - * - * @final - */ - public function isOk(): bool - { - return 200 === $this->statusCode; - } - - /** - * Is the response forbidden? - * - * @final - */ - public function isForbidden(): bool - { - return 403 === $this->statusCode; - } - - /** - * Is the response a not found error? - * - * @final - */ - public function isNotFound(): bool - { - return 404 === $this->statusCode; - } - - /** - * Is the response a redirect of some form? - * - * @final - */ - public function isRedirect(string $location = null): bool - { - return \in_array($this->statusCode, [201, 301, 302, 303, 307, 308]) && (null === $location ?: $location == $this->headers->get('Location')); - } - - /** - * Is the response empty? - * - * @final - */ - public function isEmpty(): bool - { - return \in_array($this->statusCode, [204, 304]); - } - - /** - * Cleans or flushes output buffers up to target level. - * - * Resulting level can be greater than target level if a non-removable buffer has been encountered. - * - * @final - */ - public static function closeOutputBuffers(int $targetLevel, bool $flush): void - { - $status = ob_get_status(true); - $level = \count($status); - $flags = \PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? \PHP_OUTPUT_HANDLER_FLUSHABLE : \PHP_OUTPUT_HANDLER_CLEANABLE); - - while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) { - if ($flush) { - ob_end_flush(); - } else { - ob_end_clean(); - } - } - } - - /** - * Marks a response as safe according to RFC8674. - * - * @see https://tools.ietf.org/html/rfc8674 - */ - public function setContentSafe(bool $safe = true): void - { - if ($safe) { - $this->headers->set('Preference-Applied', 'safe'); - } elseif ('safe' === $this->headers->get('Preference-Applied')) { - $this->headers->remove('Preference-Applied'); - } - - $this->setVary('Prefer', false); - } - - /** - * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9. - * - * @see http://support.microsoft.com/kb/323308 - * - * @final - */ - protected function ensureIEOverSSLCompatibility(Request $request): void - { - if (false !== stripos($this->headers->get('Content-Disposition') ?? '', 'attachment') && 1 == preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT') ?? '', $match) && true === $request->isSecure()) { - if ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) { - $this->headers->remove('Cache-Control'); - } - } - } -} diff --git a/lib/symfony/http-foundation/ResponseHeaderBag.php b/lib/symfony/http-foundation/ResponseHeaderBag.php deleted file mode 100644 index 1df13fa21..000000000 --- a/lib/symfony/http-foundation/ResponseHeaderBag.php +++ /dev/null @@ -1,291 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * ResponseHeaderBag is a container for Response HTTP headers. - * - * @author Fabien Potencier - */ -class ResponseHeaderBag extends HeaderBag -{ - public const COOKIES_FLAT = 'flat'; - public const COOKIES_ARRAY = 'array'; - - public const DISPOSITION_ATTACHMENT = 'attachment'; - public const DISPOSITION_INLINE = 'inline'; - - protected $computedCacheControl = []; - protected $cookies = []; - protected $headerNames = []; - - public function __construct(array $headers = []) - { - parent::__construct($headers); - - if (!isset($this->headers['cache-control'])) { - $this->set('Cache-Control', ''); - } - - /* RFC2616 - 14.18 says all Responses need to have a Date */ - if (!isset($this->headers['date'])) { - $this->initDate(); - } - } - - /** - * Returns the headers, with original capitalizations. - * - * @return array - */ - public function allPreserveCase() - { - $headers = []; - foreach ($this->all() as $name => $value) { - $headers[$this->headerNames[$name] ?? $name] = $value; - } - - return $headers; - } - - public function allPreserveCaseWithoutCookies() - { - $headers = $this->allPreserveCase(); - if (isset($this->headerNames['set-cookie'])) { - unset($headers[$this->headerNames['set-cookie']]); - } - - return $headers; - } - - /** - * {@inheritdoc} - */ - public function replace(array $headers = []) - { - $this->headerNames = []; - - parent::replace($headers); - - if (!isset($this->headers['cache-control'])) { - $this->set('Cache-Control', ''); - } - - if (!isset($this->headers['date'])) { - $this->initDate(); - } - } - - /** - * {@inheritdoc} - */ - public function all(string $key = null) - { - $headers = parent::all(); - - if (null !== $key) { - $key = strtr($key, self::UPPER, self::LOWER); - - return 'set-cookie' !== $key ? $headers[$key] ?? [] : array_map('strval', $this->getCookies()); - } - - foreach ($this->getCookies() as $cookie) { - $headers['set-cookie'][] = (string) $cookie; - } - - return $headers; - } - - /** - * {@inheritdoc} - */ - public function set(string $key, $values, bool $replace = true) - { - $uniqueKey = strtr($key, self::UPPER, self::LOWER); - - if ('set-cookie' === $uniqueKey) { - if ($replace) { - $this->cookies = []; - } - foreach ((array) $values as $cookie) { - $this->setCookie(Cookie::fromString($cookie)); - } - $this->headerNames[$uniqueKey] = $key; - - return; - } - - $this->headerNames[$uniqueKey] = $key; - - parent::set($key, $values, $replace); - - // ensure the cache-control header has sensible defaults - if (\in_array($uniqueKey, ['cache-control', 'etag', 'last-modified', 'expires'], true) && '' !== $computed = $this->computeCacheControlValue()) { - $this->headers['cache-control'] = [$computed]; - $this->headerNames['cache-control'] = 'Cache-Control'; - $this->computedCacheControl = $this->parseCacheControl($computed); - } - } - - /** - * {@inheritdoc} - */ - public function remove(string $key) - { - $uniqueKey = strtr($key, self::UPPER, self::LOWER); - unset($this->headerNames[$uniqueKey]); - - if ('set-cookie' === $uniqueKey) { - $this->cookies = []; - - return; - } - - parent::remove($key); - - if ('cache-control' === $uniqueKey) { - $this->computedCacheControl = []; - } - - if ('date' === $uniqueKey) { - $this->initDate(); - } - } - - /** - * {@inheritdoc} - */ - public function hasCacheControlDirective(string $key) - { - return \array_key_exists($key, $this->computedCacheControl); - } - - /** - * {@inheritdoc} - */ - public function getCacheControlDirective(string $key) - { - return $this->computedCacheControl[$key] ?? null; - } - - public function setCookie(Cookie $cookie) - { - $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; - $this->headerNames['set-cookie'] = 'Set-Cookie'; - } - - /** - * Removes a cookie from the array, but does not unset it in the browser. - */ - public function removeCookie(string $name, ?string $path = '/', string $domain = null) - { - if (null === $path) { - $path = '/'; - } - - unset($this->cookies[$domain][$path][$name]); - - if (empty($this->cookies[$domain][$path])) { - unset($this->cookies[$domain][$path]); - - if (empty($this->cookies[$domain])) { - unset($this->cookies[$domain]); - } - } - - if (empty($this->cookies)) { - unset($this->headerNames['set-cookie']); - } - } - - /** - * Returns an array with all cookies. - * - * @return Cookie[] - * - * @throws \InvalidArgumentException When the $format is invalid - */ - public function getCookies(string $format = self::COOKIES_FLAT) - { - if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) { - throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY]))); - } - - if (self::COOKIES_ARRAY === $format) { - return $this->cookies; - } - - $flattenedCookies = []; - foreach ($this->cookies as $path) { - foreach ($path as $cookies) { - foreach ($cookies as $cookie) { - $flattenedCookies[] = $cookie; - } - } - } - - return $flattenedCookies; - } - - /** - * Clears a cookie in the browser. - */ - public function clearCookie(string $name, ?string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, string $sameSite = null) - { - $this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite)); - } - - /** - * @see HeaderUtils::makeDisposition() - */ - public function makeDisposition(string $disposition, string $filename, string $filenameFallback = '') - { - return HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback); - } - - /** - * Returns the calculated value of the cache-control header. - * - * This considers several other headers and calculates or modifies the - * cache-control header to a sensible, conservative value. - * - * @return string - */ - protected function computeCacheControlValue() - { - if (!$this->cacheControl) { - if ($this->has('Last-Modified') || $this->has('Expires')) { - return 'private, must-revalidate'; // allows for heuristic expiration (RFC 7234 Section 4.2.2) in the case of "Last-Modified" - } - - // conservative by default - return 'no-cache, private'; - } - - $header = $this->getCacheControlHeader(); - if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) { - return $header; - } - - // public if s-maxage is defined, private otherwise - if (!isset($this->cacheControl['s-maxage'])) { - return $header.', private'; - } - - return $header; - } - - private function initDate(): void - { - $this->set('Date', gmdate('D, d M Y H:i:s').' GMT'); - } -} diff --git a/lib/symfony/http-foundation/ServerBag.php b/lib/symfony/http-foundation/ServerBag.php deleted file mode 100644 index 25688d523..000000000 --- a/lib/symfony/http-foundation/ServerBag.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * ServerBag is a container for HTTP headers from the $_SERVER variable. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - * @author Robert Kiss - */ -class ServerBag extends ParameterBag -{ - /** - * Gets the HTTP headers. - * - * @return array - */ - public function getHeaders() - { - $headers = []; - foreach ($this->parameters as $key => $value) { - if (str_starts_with($key, 'HTTP_')) { - $headers[substr($key, 5)] = $value; - } elseif (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) { - $headers[$key] = $value; - } - } - - if (isset($this->parameters['PHP_AUTH_USER'])) { - $headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER']; - $headers['PHP_AUTH_PW'] = $this->parameters['PHP_AUTH_PW'] ?? ''; - } else { - /* - * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default - * For this workaround to work, add these lines to your .htaccess file: - * RewriteCond %{HTTP:Authorization} .+ - * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] - * - * A sample .htaccess file: - * RewriteEngine On - * RewriteCond %{HTTP:Authorization} .+ - * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] - * RewriteCond %{REQUEST_FILENAME} !-f - * RewriteRule ^(.*)$ app.php [QSA,L] - */ - - $authorizationHeader = null; - if (isset($this->parameters['HTTP_AUTHORIZATION'])) { - $authorizationHeader = $this->parameters['HTTP_AUTHORIZATION']; - } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) { - $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION']; - } - - if (null !== $authorizationHeader) { - if (0 === stripos($authorizationHeader, 'basic ')) { - // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic - $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); - if (2 == \count($exploded)) { - [$headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']] = $exploded; - } - } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) { - // In some circumstances PHP_AUTH_DIGEST needs to be set - $headers['PHP_AUTH_DIGEST'] = $authorizationHeader; - $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader; - } elseif (0 === stripos($authorizationHeader, 'bearer ')) { - /* - * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables, - * I'll just set $headers['AUTHORIZATION'] here. - * https://php.net/reserved.variables.server - */ - $headers['AUTHORIZATION'] = $authorizationHeader; - } - } - } - - if (isset($headers['AUTHORIZATION'])) { - return $headers; - } - - // PHP_AUTH_USER/PHP_AUTH_PW - if (isset($headers['PHP_AUTH_USER'])) { - $headers['AUTHORIZATION'] = 'Basic '.base64_encode($headers['PHP_AUTH_USER'].':'.($headers['PHP_AUTH_PW'] ?? '')); - } elseif (isset($headers['PHP_AUTH_DIGEST'])) { - $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST']; - } - - return $headers; - } -} diff --git a/lib/symfony/http-foundation/Session/Attribute/AttributeBag.php b/lib/symfony/http-foundation/Session/Attribute/AttributeBag.php deleted file mode 100644 index f4f051c7a..000000000 --- a/lib/symfony/http-foundation/Session/Attribute/AttributeBag.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -/** - * This class relates to session attribute storage. - * - * @implements \IteratorAggregate - */ -class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable -{ - private $name = 'attributes'; - private $storageKey; - - protected $attributes = []; - - /** - * @param string $storageKey The key used to store attributes in the session - */ - public function __construct(string $storageKey = '_sf2_attributes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$attributes) - { - $this->attributes = &$attributes; - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $this->attributes[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function replace(array $attributes) - { - $this->attributes = []; - foreach ($attributes as $key => $value) { - $this->set($key, $value); - } - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - $retval = null; - if (\array_key_exists($name, $this->attributes)) { - $retval = $this->attributes[$name]; - unset($this->attributes[$name]); - } - - return $retval; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $return = $this->attributes; - $this->attributes = []; - - return $return; - } - - /** - * Returns an iterator for attributes. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->attributes); - } - - /** - * Returns the number of attributes. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->attributes); - } -} diff --git a/lib/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php b/lib/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php deleted file mode 100644 index cb5069681..000000000 --- a/lib/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * Attributes store. - * - * @author Drak - */ -interface AttributeBagInterface extends SessionBagInterface -{ - /** - * Checks if an attribute is defined. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns an attribute. - * - * @param mixed $default The default value if not found - * - * @return mixed - */ - public function get(string $name, $default = null); - - /** - * Sets an attribute. - * - * @param mixed $value - */ - public function set(string $name, $value); - - /** - * Returns attributes. - * - * @return array - */ - public function all(); - - public function replace(array $attributes); - - /** - * Removes an attribute. - * - * @return mixed The removed value or null when it does not exist - */ - public function remove(string $name); -} diff --git a/lib/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/lib/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php deleted file mode 100644 index 864b35fb7..000000000 --- a/lib/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -trigger_deprecation('symfony/http-foundation', '5.3', 'The "%s" class is deprecated.', NamespacedAttributeBag::class); - -/** - * This class provides structured storage of session attributes using - * a name spacing character in the key. - * - * @author Drak - * - * @deprecated since Symfony 5.3 - */ -class NamespacedAttributeBag extends AttributeBag -{ - private $namespaceCharacter; - - /** - * @param string $storageKey Session storage key - * @param string $namespaceCharacter Namespace character to use in keys - */ - public function __construct(string $storageKey = '_sf2_attributes', string $namespaceCharacter = '/') - { - $this->namespaceCharacter = $namespaceCharacter; - parent::__construct($storageKey); - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is - $attributes = $this->resolveAttributePath($name); - $name = $this->resolveKey($name); - - if (null === $attributes) { - return false; - } - - return \array_key_exists($name, $attributes); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is - $attributes = $this->resolveAttributePath($name); - $name = $this->resolveKey($name); - - if (null === $attributes) { - return $default; - } - - return \array_key_exists($name, $attributes) ? $attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $attributes = &$this->resolveAttributePath($name, true); - $name = $this->resolveKey($name); - $attributes[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - $retval = null; - $attributes = &$this->resolveAttributePath($name); - $name = $this->resolveKey($name); - if (null !== $attributes && \array_key_exists($name, $attributes)) { - $retval = $attributes[$name]; - unset($attributes[$name]); - } - - return $retval; - } - - /** - * Resolves a path in attributes property and returns it as a reference. - * - * This method allows structured namespacing of session attributes. - * - * @param string $name Key name - * @param bool $writeContext Write context, default false - * - * @return array|null - */ - protected function &resolveAttributePath(string $name, bool $writeContext = false) - { - $array = &$this->attributes; - $name = (str_starts_with($name, $this->namespaceCharacter)) ? substr($name, 1) : $name; - - // Check if there is anything to do, else return - if (!$name) { - return $array; - } - - $parts = explode($this->namespaceCharacter, $name); - if (\count($parts) < 2) { - if (!$writeContext) { - return $array; - } - - $array[$parts[0]] = []; - - return $array; - } - - unset($parts[\count($parts) - 1]); - - foreach ($parts as $part) { - if (null !== $array && !\array_key_exists($part, $array)) { - if (!$writeContext) { - $null = null; - - return $null; - } - - $array[$part] = []; - } - - $array = &$array[$part]; - } - - return $array; - } - - /** - * Resolves the key from the name. - * - * This is the last part in a dot separated string. - * - * @return string - */ - protected function resolveKey(string $name) - { - if (false !== $pos = strrpos($name, $this->namespaceCharacter)) { - $name = substr($name, $pos + 1); - } - - return $name; - } -} diff --git a/lib/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php b/lib/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php deleted file mode 100644 index 8aab3a122..000000000 --- a/lib/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -/** - * AutoExpireFlashBag flash message container. - * - * @author Drak - */ -class AutoExpireFlashBag implements FlashBagInterface -{ - private $name = 'flashes'; - private $flashes = ['display' => [], 'new' => []]; - private $storageKey; - - /** - * @param string $storageKey The key used to store flashes in the session - */ - public function __construct(string $storageKey = '_symfony_flashes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$flashes) - { - $this->flashes = &$flashes; - - // The logic: messages from the last request will be stored in new, so we move them to previous - // This request we will show what is in 'display'. What is placed into 'new' this time round will - // be moved to display next time round. - $this->flashes['display'] = \array_key_exists('new', $this->flashes) ? $this->flashes['new'] : []; - $this->flashes['new'] = []; - } - - /** - * {@inheritdoc} - */ - public function add(string $type, $message) - { - $this->flashes['new'][$type][] = $message; - } - - /** - * {@inheritdoc} - */ - public function peek(string $type, array $default = []) - { - return $this->has($type) ? $this->flashes['display'][$type] : $default; - } - - /** - * {@inheritdoc} - */ - public function peekAll() - { - return \array_key_exists('display', $this->flashes) ? $this->flashes['display'] : []; - } - - /** - * {@inheritdoc} - */ - public function get(string $type, array $default = []) - { - $return = $default; - - if (!$this->has($type)) { - return $return; - } - - if (isset($this->flashes['display'][$type])) { - $return = $this->flashes['display'][$type]; - unset($this->flashes['display'][$type]); - } - - return $return; - } - - /** - * {@inheritdoc} - */ - public function all() - { - $return = $this->flashes['display']; - $this->flashes['display'] = []; - - return $return; - } - - /** - * {@inheritdoc} - */ - public function setAll(array $messages) - { - $this->flashes['new'] = $messages; - } - - /** - * {@inheritdoc} - */ - public function set(string $type, $messages) - { - $this->flashes['new'][$type] = (array) $messages; - } - - /** - * {@inheritdoc} - */ - public function has(string $type) - { - return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; - } - - /** - * {@inheritdoc} - */ - public function keys() - { - return array_keys($this->flashes['display']); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->all(); - } -} diff --git a/lib/symfony/http-foundation/Session/Flash/FlashBag.php b/lib/symfony/http-foundation/Session/Flash/FlashBag.php deleted file mode 100644 index 88df7508a..000000000 --- a/lib/symfony/http-foundation/Session/Flash/FlashBag.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -/** - * FlashBag flash message container. - * - * @author Drak - */ -class FlashBag implements FlashBagInterface -{ - private $name = 'flashes'; - private $flashes = []; - private $storageKey; - - /** - * @param string $storageKey The key used to store flashes in the session - */ - public function __construct(string $storageKey = '_symfony_flashes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$flashes) - { - $this->flashes = &$flashes; - } - - /** - * {@inheritdoc} - */ - public function add(string $type, $message) - { - $this->flashes[$type][] = $message; - } - - /** - * {@inheritdoc} - */ - public function peek(string $type, array $default = []) - { - return $this->has($type) ? $this->flashes[$type] : $default; - } - - /** - * {@inheritdoc} - */ - public function peekAll() - { - return $this->flashes; - } - - /** - * {@inheritdoc} - */ - public function get(string $type, array $default = []) - { - if (!$this->has($type)) { - return $default; - } - - $return = $this->flashes[$type]; - - unset($this->flashes[$type]); - - return $return; - } - - /** - * {@inheritdoc} - */ - public function all() - { - $return = $this->peekAll(); - $this->flashes = []; - - return $return; - } - - /** - * {@inheritdoc} - */ - public function set(string $type, $messages) - { - $this->flashes[$type] = (array) $messages; - } - - /** - * {@inheritdoc} - */ - public function setAll(array $messages) - { - $this->flashes = $messages; - } - - /** - * {@inheritdoc} - */ - public function has(string $type) - { - return \array_key_exists($type, $this->flashes) && $this->flashes[$type]; - } - - /** - * {@inheritdoc} - */ - public function keys() - { - return array_keys($this->flashes); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->all(); - } -} diff --git a/lib/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/lib/symfony/http-foundation/Session/Flash/FlashBagInterface.php deleted file mode 100644 index 8713e71d0..000000000 --- a/lib/symfony/http-foundation/Session/Flash/FlashBagInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * FlashBagInterface. - * - * @author Drak - */ -interface FlashBagInterface extends SessionBagInterface -{ - /** - * Adds a flash message for the given type. - * - * @param mixed $message - */ - public function add(string $type, $message); - - /** - * Registers one or more messages for a given type. - * - * @param string|array $messages - */ - public function set(string $type, $messages); - - /** - * Gets flash messages for a given type. - * - * @param string $type Message category type - * @param array $default Default value if $type does not exist - * - * @return array - */ - public function peek(string $type, array $default = []); - - /** - * Gets all flash messages. - * - * @return array - */ - public function peekAll(); - - /** - * Gets and clears flash from the stack. - * - * @param array $default Default value if $type does not exist - * - * @return array - */ - public function get(string $type, array $default = []); - - /** - * Gets and clears flashes from the stack. - * - * @return array - */ - public function all(); - - /** - * Sets all flash messages. - */ - public function setAll(array $messages); - - /** - * Has flash messages for a given type? - * - * @return bool - */ - public function has(string $type); - - /** - * Returns a list of all defined types. - * - * @return array - */ - public function keys(); -} diff --git a/lib/symfony/http-foundation/Session/Session.php b/lib/symfony/http-foundation/Session/Session.php deleted file mode 100644 index 022e3986f..000000000 --- a/lib/symfony/http-foundation/Session/Session.php +++ /dev/null @@ -1,285 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(AttributeBag::class); -class_exists(FlashBag::class); -class_exists(SessionBagProxy::class); - -/** - * @author Fabien Potencier - * @author Drak - * - * @implements \IteratorAggregate - */ -class Session implements SessionInterface, \IteratorAggregate, \Countable -{ - protected $storage; - - private $flashName; - private $attributeName; - private $data = []; - private $usageIndex = 0; - private $usageReporter; - - public function __construct(SessionStorageInterface $storage = null, AttributeBagInterface $attributes = null, FlashBagInterface $flashes = null, callable $usageReporter = null) - { - $this->storage = $storage ?? new NativeSessionStorage(); - $this->usageReporter = $usageReporter; - - $attributes = $attributes ?? new AttributeBag(); - $this->attributeName = $attributes->getName(); - $this->registerBag($attributes); - - $flashes = $flashes ?? new FlashBag(); - $this->flashName = $flashes->getName(); - $this->registerBag($flashes); - } - - /** - * {@inheritdoc} - */ - public function start() - { - return $this->storage->start(); - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return $this->getAttributeBag()->has($name); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - return $this->getAttributeBag()->get($name, $default); - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $this->getAttributeBag()->set($name, $value); - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->getAttributeBag()->all(); - } - - /** - * {@inheritdoc} - */ - public function replace(array $attributes) - { - $this->getAttributeBag()->replace($attributes); - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - return $this->getAttributeBag()->remove($name); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $this->getAttributeBag()->clear(); - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->storage->isStarted(); - } - - /** - * Returns an iterator for attributes. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->getAttributeBag()->all()); - } - - /** - * Returns the number of attributes. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->getAttributeBag()->all()); - } - - public function &getUsageIndex(): int - { - return $this->usageIndex; - } - - /** - * @internal - */ - public function isEmpty(): bool - { - if ($this->isStarted()) { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - } - foreach ($this->data as &$data) { - if (!empty($data)) { - return false; - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function invalidate(int $lifetime = null) - { - $this->storage->clear(); - - return $this->migrate(true, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function migrate(bool $destroy = false, int $lifetime = null) - { - return $this->storage->regenerate($destroy, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function save() - { - $this->storage->save(); - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->storage->getId(); - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - if ($this->storage->getId() !== $id) { - $this->storage->setId($id); - } - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->storage->getName(); - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->storage->setName($name); - } - - /** - * {@inheritdoc} - */ - public function getMetadataBag() - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return $this->storage->getMetadataBag(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex, $this->usageReporter)); - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - $bag = $this->storage->getBag($name); - - return method_exists($bag, 'getBag') ? $bag->getBag() : $bag; - } - - /** - * Gets the flashbag interface. - * - * @return FlashBagInterface - */ - public function getFlashBag() - { - return $this->getBag($this->flashName); - } - - /** - * Gets the attributebag interface. - * - * Note that this method was added to help with IDE autocompletion. - */ - private function getAttributeBag(): AttributeBagInterface - { - return $this->getBag($this->attributeName); - } -} diff --git a/lib/symfony/http-foundation/Session/SessionBagInterface.php b/lib/symfony/http-foundation/Session/SessionBagInterface.php deleted file mode 100644 index 8e37d06d6..000000000 --- a/lib/symfony/http-foundation/Session/SessionBagInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * Session Bag store. - * - * @author Drak - */ -interface SessionBagInterface -{ - /** - * Gets this bag's name. - * - * @return string - */ - public function getName(); - - /** - * Initializes the Bag. - */ - public function initialize(array &$array); - - /** - * Gets the storage key for this bag. - * - * @return string - */ - public function getStorageKey(); - - /** - * Clears out data from bag. - * - * @return mixed Whatever data was contained - */ - public function clear(); -} diff --git a/lib/symfony/http-foundation/Session/SessionBagProxy.php b/lib/symfony/http-foundation/Session/SessionBagProxy.php deleted file mode 100644 index 90aa010c9..000000000 --- a/lib/symfony/http-foundation/Session/SessionBagProxy.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class SessionBagProxy implements SessionBagInterface -{ - private $bag; - private $data; - private $usageIndex; - private $usageReporter; - - public function __construct(SessionBagInterface $bag, array &$data, ?int &$usageIndex, ?callable $usageReporter) - { - $this->bag = $bag; - $this->data = &$data; - $this->usageIndex = &$usageIndex; - $this->usageReporter = $usageReporter; - } - - public function getBag(): SessionBagInterface - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return $this->bag; - } - - public function isEmpty(): bool - { - if (!isset($this->data[$this->bag->getStorageKey()])) { - return true; - } - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return empty($this->data[$this->bag->getStorageKey()]); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return $this->bag->getName(); - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$array): void - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - $this->data[$this->bag->getStorageKey()] = &$array; - - $this->bag->initialize($array); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey(): string - { - return $this->bag->getStorageKey(); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->bag->clear(); - } -} diff --git a/lib/symfony/http-foundation/Session/SessionFactory.php b/lib/symfony/http-foundation/Session/SessionFactory.php deleted file mode 100644 index 04c4b06a0..000000000 --- a/lib/symfony/http-foundation/Session/SessionFactory.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(Session::class); - -/** - * @author Jérémy Derussé - */ -class SessionFactory implements SessionFactoryInterface -{ - private $requestStack; - private $storageFactory; - private $usageReporter; - - public function __construct(RequestStack $requestStack, SessionStorageFactoryInterface $storageFactory, callable $usageReporter = null) - { - $this->requestStack = $requestStack; - $this->storageFactory = $storageFactory; - $this->usageReporter = $usageReporter; - } - - public function createSession(): SessionInterface - { - return new Session($this->storageFactory->createStorage($this->requestStack->getMainRequest()), null, null, $this->usageReporter); - } -} diff --git a/lib/symfony/http-foundation/Session/SessionFactoryInterface.php b/lib/symfony/http-foundation/Session/SessionFactoryInterface.php deleted file mode 100644 index b24fdc495..000000000 --- a/lib/symfony/http-foundation/Session/SessionFactoryInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * @author Kevin Bond - */ -interface SessionFactoryInterface -{ - public function createSession(): SessionInterface; -} diff --git a/lib/symfony/http-foundation/Session/SessionInterface.php b/lib/symfony/http-foundation/Session/SessionInterface.php deleted file mode 100644 index b2f09fd0d..000000000 --- a/lib/symfony/http-foundation/Session/SessionInterface.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; - -/** - * Interface for the session. - * - * @author Drak - */ -interface SessionInterface -{ - /** - * Starts the session storage. - * - * @return bool - * - * @throws \RuntimeException if session fails to start - */ - public function start(); - - /** - * Returns the session ID. - * - * @return string - */ - public function getId(); - - /** - * Sets the session ID. - */ - public function setId(string $id); - - /** - * Returns the session name. - * - * @return string - */ - public function getName(); - - /** - * Sets the session name. - */ - public function setName(string $name); - - /** - * Invalidates the current session. - * - * Clears all session attributes and flashes and regenerates the - * session and deletes the old session from persistence. - * - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - */ - public function invalidate(int $lifetime = null); - - /** - * Migrates the current session to a new session id while maintaining all - * session attributes. - * - * @param bool $destroy Whether to delete the old session or leave it to garbage collection - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - */ - public function migrate(bool $destroy = false, int $lifetime = null); - - /** - * Force the session to be saved and closed. - * - * This method is generally not required for real sessions as - * the session will be automatically saved at the end of - * code execution. - */ - public function save(); - - /** - * Checks if an attribute is defined. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns an attribute. - * - * @param mixed $default The default value if not found - * - * @return mixed - */ - public function get(string $name, $default = null); - - /** - * Sets an attribute. - * - * @param mixed $value - */ - public function set(string $name, $value); - - /** - * Returns attributes. - * - * @return array - */ - public function all(); - - /** - * Sets attributes. - */ - public function replace(array $attributes); - - /** - * Removes an attribute. - * - * @return mixed The removed value or null when it does not exist - */ - public function remove(string $name); - - /** - * Clears all attributes. - */ - public function clear(); - - /** - * Checks if the session was started. - * - * @return bool - */ - public function isStarted(); - - /** - * Registers a SessionBagInterface with the session. - */ - public function registerBag(SessionBagInterface $bag); - - /** - * Gets a bag instance by name. - * - * @return SessionBagInterface - */ - public function getBag(string $name); - - /** - * Gets session meta. - * - * @return MetadataBag - */ - public function getMetadataBag(); -} diff --git a/lib/symfony/http-foundation/Session/SessionUtils.php b/lib/symfony/http-foundation/Session/SessionUtils.php deleted file mode 100644 index b5bce4a88..000000000 --- a/lib/symfony/http-foundation/Session/SessionUtils.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * Session utility functions. - * - * @author Nicolas Grekas - * @author Rémon van de Kamp - * - * @internal - */ -final class SessionUtils -{ - /** - * Finds the session header amongst the headers that are to be sent, removes it, and returns - * it so the caller can process it further. - */ - public static function popSessionCookie(string $sessionName, string $sessionId): ?string - { - $sessionCookie = null; - $sessionCookiePrefix = sprintf(' %s=', urlencode($sessionName)); - $sessionCookieWithId = sprintf('%s%s;', $sessionCookiePrefix, urlencode($sessionId)); - $otherCookies = []; - foreach (headers_list() as $h) { - if (0 !== stripos($h, 'Set-Cookie:')) { - continue; - } - if (11 === strpos($h, $sessionCookiePrefix, 11)) { - $sessionCookie = $h; - - if (11 !== strpos($h, $sessionCookieWithId, 11)) { - $otherCookies[] = $h; - } - } else { - $otherCookies[] = $h; - } - } - if (null === $sessionCookie) { - return null; - } - - header_remove('Set-Cookie'); - foreach ($otherCookies as $h) { - header($h, false); - } - - return $sessionCookie; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php deleted file mode 100644 index 35d7b4b81..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php +++ /dev/null @@ -1,155 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\HttpFoundation\Session\SessionUtils; - -/** - * This abstract session handler provides a generic implementation - * of the PHP 7.0 SessionUpdateTimestampHandlerInterface, - * enabling strict and lazy session handling. - * - * @author Nicolas Grekas - */ -abstract class AbstractSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - private $sessionName; - private $prefetchId; - private $prefetchData; - private $newSessionId; - private $igbinaryEmptyData; - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $this->sessionName = $sessionName; - if (!headers_sent() && !\ini_get('session.cache_limiter') && '0' !== \ini_get('session.cache_limiter')) { - header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) \ini_get('session.cache_expire'))); - } - - return true; - } - - /** - * @return string - */ - abstract protected function doRead(string $sessionId); - - /** - * @return bool - */ - abstract protected function doWrite(string $sessionId, string $data); - - /** - * @return bool - */ - abstract protected function doDestroy(string $sessionId); - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - $this->prefetchData = $this->read($sessionId); - $this->prefetchId = $sessionId; - - if (\PHP_VERSION_ID < 70317 || (70400 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70405)) { - // work around https://bugs.php.net/79413 - foreach (debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { - if (!isset($frame['class']) && isset($frame['function']) && \in_array($frame['function'], ['session_regenerate_id', 'session_create_id'], true)) { - return '' === $this->prefetchData; - } - } - } - - return '' !== $this->prefetchData; - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - if (null !== $this->prefetchId) { - $prefetchId = $this->prefetchId; - $prefetchData = $this->prefetchData; - $this->prefetchId = $this->prefetchData = null; - - if ($prefetchId === $sessionId || '' === $prefetchData) { - $this->newSessionId = '' === $prefetchData ? $sessionId : null; - - return $prefetchData; - } - } - - $data = $this->doRead($sessionId); - $this->newSessionId = '' === $data ? $sessionId : null; - - return $data; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - if (null === $this->igbinaryEmptyData) { - // see https://github.com/igbinary/igbinary/issues/146 - $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize([]) : ''; - } - if ('' === $data || $this->igbinaryEmptyData === $data) { - return $this->destroy($sessionId); - } - $this->newSessionId = null; - - return $this->doWrite($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) { - if (!$this->sessionName) { - throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class)); - } - $cookie = SessionUtils::popSessionCookie($this->sessionName, $sessionId); - - /* - * We send an invalidation Set-Cookie header (zero lifetime) - * when either the session was started or a cookie with - * the session name was sent by the client (in which case - * we know it's invalid as a valid session cookie would've - * started the session). - */ - if (null === $cookie || isset($_COOKIE[$this->sessionName])) { - if (\PHP_VERSION_ID < 70300) { - setcookie($this->sessionName, '', 0, \ini_get('session.cookie_path'), \ini_get('session.cookie_domain'), filter_var(\ini_get('session.cookie_secure'), \FILTER_VALIDATE_BOOLEAN), filter_var(\ini_get('session.cookie_httponly'), \FILTER_VALIDATE_BOOLEAN)); - } else { - $params = session_get_cookie_params(); - unset($params['lifetime']); - setcookie($this->sessionName, '', $params); - } - } - } - - return $this->newSessionId === $sessionId || $this->doDestroy($sessionId); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php b/lib/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php deleted file mode 100644 index bea3a323e..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Ahmed TAILOULOUTE - */ -class IdentityMarshaller implements MarshallerInterface -{ - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - foreach ($values as $key => $value) { - if (!\is_string($value)) { - throw new \LogicException(sprintf('%s accepts only string as data.', __METHOD__)); - } - } - - return $values; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value): string - { - return $value; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php deleted file mode 100644 index c321c8c93..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Ahmed TAILOULOUTE - */ -class MarshallingSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - private $handler; - private $marshaller; - - public function __construct(AbstractSessionHandler $handler, MarshallerInterface $marshaller) - { - $this->handler = $handler; - $this->marshaller = $marshaller; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $name) - { - return $this->handler->open($savePath, $name); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - return $this->handler->destroy($sessionId); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - return $this->marshaller->unmarshall($this->handler->read($sessionId)); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - $failed = []; - $marshalledData = $this->marshaller->marshall(['data' => $data], $failed); - - if (isset($failed['data'])) { - return false; - } - - return $this->handler->write($sessionId, $marshalledData['data']); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return $this->handler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->handler->updateTimestamp($sessionId, $data); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php deleted file mode 100644 index e0ec4d2d9..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Memcached based session storage handler based on the Memcached class - * provided by the PHP memcached extension. - * - * @see https://php.net/memcached - * - * @author Drak - */ -class MemcachedSessionHandler extends AbstractSessionHandler -{ - private $memcached; - - /** - * @var int Time to live in seconds - */ - private $ttl; - - /** - * @var string Key prefix for shared environments - */ - private $prefix; - - /** - * Constructor. - * - * List of available options: - * * prefix: The prefix to use for the memcached keys in order to avoid collision - * * ttl: The time to live in seconds. - * - * @throws \InvalidArgumentException When unsupported options are passed - */ - public function __construct(\Memcached $memcached, array $options = []) - { - $this->memcached = $memcached; - - if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime', 'ttl'])) { - throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff))); - } - - $this->ttl = $options['expiretime'] ?? $options['ttl'] ?? null; - $this->prefix = $options['prefix'] ?? 'sf2s'; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->memcached->quit(); - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return $this->memcached->get($this->prefix.$sessionId) ?: ''; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $this->memcached->touch($this->prefix.$sessionId, $this->getCompatibleTtl()); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return $this->memcached->set($this->prefix.$sessionId, $data, $this->getCompatibleTtl()); - } - - private function getCompatibleTtl(): int - { - $ttl = (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime')); - - // If the relative TTL that is used exceeds 30 days, memcached will treat the value as Unix time. - // We have to convert it to an absolute Unix time at this point, to make sure the TTL is correct. - if ($ttl > 60 * 60 * 24 * 30) { - $ttl += time(); - } - - return $ttl; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $result = $this->memcached->delete($this->prefix.$sessionId); - - return $result || \Memcached::RES_NOTFOUND == $this->memcached->getResultCode(); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - // not required here because memcached will auto expire the records anyhow. - return 0; - } - - /** - * Return a Memcached instance. - * - * @return \Memcached - */ - protected function getMemcached() - { - return $this->memcached; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php deleted file mode 100644 index bf27ca6cc..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Migrating session handler for migrating from one handler to another. It reads - * from the current handler and writes both the current and new ones. - * - * It ignores errors from the new handler. - * - * @author Ross Motley - * @author Oliver Radwell - */ -class MigratingSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - /** - * @var \SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface - */ - private $currentHandler; - - /** - * @var \SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface - */ - private $writeOnlyHandler; - - public function __construct(\SessionHandlerInterface $currentHandler, \SessionHandlerInterface $writeOnlyHandler) - { - if (!$currentHandler instanceof \SessionUpdateTimestampHandlerInterface) { - $currentHandler = new StrictSessionHandler($currentHandler); - } - if (!$writeOnlyHandler instanceof \SessionUpdateTimestampHandlerInterface) { - $writeOnlyHandler = new StrictSessionHandler($writeOnlyHandler); - } - - $this->currentHandler = $currentHandler; - $this->writeOnlyHandler = $writeOnlyHandler; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - $result = $this->currentHandler->close(); - $this->writeOnlyHandler->close(); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - $result = $this->currentHandler->destroy($sessionId); - $this->writeOnlyHandler->destroy($sessionId); - - return $result; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - $result = $this->currentHandler->gc($maxlifetime); - $this->writeOnlyHandler->gc($maxlifetime); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $result = $this->currentHandler->open($savePath, $sessionName); - $this->writeOnlyHandler->open($savePath, $sessionName); - - return $result; - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - // No reading from new handler until switch-over - return $this->currentHandler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $sessionData) - { - $result = $this->currentHandler->write($sessionId, $sessionData); - $this->writeOnlyHandler->write($sessionId, $sessionData); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - // No reading from new handler until switch-over - return $this->currentHandler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $sessionData) - { - $result = $this->currentHandler->updateTimestamp($sessionId, $sessionData); - $this->writeOnlyHandler->updateTimestamp($sessionId, $sessionData); - - return $result; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php deleted file mode 100644 index ef8f71942..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ /dev/null @@ -1,193 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use MongoDB\BSON\Binary; -use MongoDB\BSON\UTCDateTime; -use MongoDB\Client; -use MongoDB\Collection; - -/** - * Session handler using the mongodb/mongodb package and MongoDB driver extension. - * - * @author Markus Bachmann - * - * @see https://packagist.org/packages/mongodb/mongodb - * @see https://php.net/mongodb - */ -class MongoDbSessionHandler extends AbstractSessionHandler -{ - private $mongo; - - /** - * @var Collection - */ - private $collection; - - /** - * @var array - */ - private $options; - - /** - * Constructor. - * - * List of available options: - * * database: The name of the database [required] - * * collection: The name of the collection [required] - * * id_field: The field name for storing the session id [default: _id] - * * data_field: The field name for storing the session data [default: data] - * * time_field: The field name for storing the timestamp [default: time] - * * expiry_field: The field name for storing the expiry-timestamp [default: expires_at]. - * - * It is strongly recommended to put an index on the `expiry_field` for - * garbage-collection. Alternatively it's possible to automatically expire - * the sessions in the database as described below: - * - * A TTL collections can be used on MongoDB 2.2+ to cleanup expired sessions - * automatically. Such an index can for example look like this: - * - * db..createIndex( - * { "": 1 }, - * { "expireAfterSeconds": 0 } - * ) - * - * More details on: https://docs.mongodb.org/manual/tutorial/expire-data/ - * - * If you use such an index, you can drop `gc_probability` to 0 since - * no garbage-collection is required. - * - * @throws \InvalidArgumentException When "database" or "collection" not provided - */ - public function __construct(Client $mongo, array $options) - { - if (!isset($options['database']) || !isset($options['collection'])) { - throw new \InvalidArgumentException('You must provide the "database" and "collection" option for MongoDBSessionHandler.'); - } - - $this->mongo = $mongo; - - $this->options = array_merge([ - 'id_field' => '_id', - 'data_field' => 'data', - 'time_field' => 'time', - 'expiry_field' => 'expires_at', - ], $options); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $this->getCollection()->deleteOne([ - $this->options['id_field'] => $sessionId, - ]); - - return true; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->getCollection()->deleteMany([ - $this->options['expiry_field'] => ['$lt' => new UTCDateTime()], - ])->getDeletedCount(); - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - $expiry = new UTCDateTime((time() + (int) \ini_get('session.gc_maxlifetime')) * 1000); - - $fields = [ - $this->options['time_field'] => new UTCDateTime(), - $this->options['expiry_field'] => $expiry, - $this->options['data_field'] => new Binary($data, Binary::TYPE_OLD_BINARY), - ]; - - $this->getCollection()->updateOne( - [$this->options['id_field'] => $sessionId], - ['$set' => $fields], - ['upsert' => true] - ); - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $expiry = new UTCDateTime((time() + (int) \ini_get('session.gc_maxlifetime')) * 1000); - - $this->getCollection()->updateOne( - [$this->options['id_field'] => $sessionId], - ['$set' => [ - $this->options['time_field'] => new UTCDateTime(), - $this->options['expiry_field'] => $expiry, - ]] - ); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - $dbData = $this->getCollection()->findOne([ - $this->options['id_field'] => $sessionId, - $this->options['expiry_field'] => ['$gte' => new UTCDateTime()], - ]); - - if (null === $dbData) { - return ''; - } - - return $dbData[$this->options['data_field']]->getData(); - } - - private function getCollection(): Collection - { - if (null === $this->collection) { - $this->collection = $this->mongo->selectCollection($this->options['database'], $this->options['collection']); - } - - return $this->collection; - } - - /** - * @return Client - */ - protected function getMongo() - { - return $this->mongo; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php deleted file mode 100644 index 1ca4bfeb0..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Native session handler using PHP's built in file storage. - * - * @author Drak - */ -class NativeFileSessionHandler extends \SessionHandler -{ - /** - * @param string $savePath Path of directory to save session files - * Default null will leave setting as defined by PHP. - * '/path', 'N;/path', or 'N;octal-mode;/path - * - * @see https://php.net/session.configuration#ini.session.save-path for further details. - * - * @throws \InvalidArgumentException On invalid $savePath - * @throws \RuntimeException When failing to create the save directory - */ - public function __construct(string $savePath = null) - { - if (null === $savePath) { - $savePath = \ini_get('session.save_path'); - } - - $baseDir = $savePath; - - if ($count = substr_count($savePath, ';')) { - if ($count > 2) { - throw new \InvalidArgumentException(sprintf('Invalid argument $savePath \'%s\'.', $savePath)); - } - - // characters after last ';' are the path - $baseDir = ltrim(strrchr($savePath, ';'), ';'); - } - - if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, true) && !is_dir($baseDir)) { - throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $baseDir)); - } - - ini_set('session.save_path', $savePath); - ini_set('session.save_handler', 'files'); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php deleted file mode 100644 index 4331dbe50..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Can be used in unit testing or in a situations where persisted sessions are not desired. - * - * @author Drak - */ -class NullSessionHandler extends AbstractSessionHandler -{ - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return ''; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - return true; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return 0; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php deleted file mode 100644 index 24c98940d..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ /dev/null @@ -1,943 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Session handler using a PDO connection to read and write data. - * - * It works with MySQL, PostgreSQL, Oracle, SQL Server and SQLite and implements - * different locking strategies to handle concurrent access to the same session. - * Locking is necessary to prevent loss of data due to race conditions and to keep - * the session data consistent between read() and write(). With locking, requests - * for the same session will wait until the other one finished writing. For this - * reason it's best practice to close a session as early as possible to improve - * concurrency. PHPs internal files session handler also implements locking. - * - * Attention: Since SQLite does not support row level locks but locks the whole database, - * it means only one session can be accessed at a time. Even different sessions would wait - * for another to finish. So saving session in SQLite should only be considered for - * development or prototypes. - * - * Session data is a binary string that can contain non-printable characters like the null byte. - * For this reason it must be saved in a binary column in the database like BLOB in MySQL. - * Saving it in a character column could corrupt the data. You can use createTable() - * to initialize a correctly defined table. - * - * @see https://php.net/sessionhandlerinterface - * - * @author Fabien Potencier - * @author Michael Williams - * @author Tobias Schultze - */ -class PdoSessionHandler extends AbstractSessionHandler -{ - /** - * No locking is done. This means sessions are prone to loss of data due to - * race conditions of concurrent requests to the same session. The last session - * write will win in this case. It might be useful when you implement your own - * logic to deal with this like an optimistic approach. - */ - public const LOCK_NONE = 0; - - /** - * Creates an application-level lock on a session. The disadvantage is that the - * lock is not enforced by the database and thus other, unaware parts of the - * application could still concurrently modify the session. The advantage is it - * does not require a transaction. - * This mode is not available for SQLite and not yet implemented for oci and sqlsrv. - */ - public const LOCK_ADVISORY = 1; - - /** - * Issues a real row lock. Since it uses a transaction between opening and - * closing a session, you have to be careful when you use same database connection - * that you also use for your application logic. This mode is the default because - * it's the only reliable solution across DBMSs. - */ - public const LOCK_TRANSACTIONAL = 2; - - private const MAX_LIFETIME = 315576000; - - /** - * @var \PDO|null PDO instance or null when not connected yet - */ - private $pdo; - - /** - * DSN string or null for session.save_path or false when lazy connection disabled. - * - * @var string|false|null - */ - private $dsn = false; - - /** - * @var string|null - */ - private $driver; - - /** - * @var string - */ - private $table = 'sessions'; - - /** - * @var string - */ - private $idCol = 'sess_id'; - - /** - * @var string - */ - private $dataCol = 'sess_data'; - - /** - * @var string - */ - private $lifetimeCol = 'sess_lifetime'; - - /** - * @var string - */ - private $timeCol = 'sess_time'; - - /** - * Username when lazy-connect. - * - * @var string - */ - private $username = ''; - - /** - * Password when lazy-connect. - * - * @var string - */ - private $password = ''; - - /** - * Connection options when lazy-connect. - * - * @var array - */ - private $connectionOptions = []; - - /** - * The strategy for locking, see constants. - * - * @var int - */ - private $lockMode = self::LOCK_TRANSACTIONAL; - - /** - * It's an array to support multiple reads before closing which is manual, non-standard usage. - * - * @var \PDOStatement[] An array of statements to release advisory locks - */ - private $unlockStatements = []; - - /** - * True when the current session exists but expired according to session.gc_maxlifetime. - * - * @var bool - */ - private $sessionExpired = false; - - /** - * Whether a transaction is active. - * - * @var bool - */ - private $inTransaction = false; - - /** - * Whether gc() has been called. - * - * @var bool - */ - private $gcCalled = false; - - /** - * You can either pass an existing database connection as PDO instance or - * pass a DSN string that will be used to lazy-connect to the database - * when the session is actually used. Furthermore it's possible to pass null - * which will then use the session.save_path ini setting as PDO DSN parameter. - * - * List of available options: - * * db_table: The name of the table [default: sessions] - * * db_id_col: The column where to store the session id [default: sess_id] - * * db_data_col: The column where to store the session data [default: sess_data] - * * db_lifetime_col: The column where to store the lifetime [default: sess_lifetime] - * * db_time_col: The column where to store the timestamp [default: sess_time] - * * db_username: The username when lazy-connect [default: ''] - * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: []] - * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] - * - * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or URL string or null - * - * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION - */ - public function __construct($pdoOrDsn = null, array $options = []) - { - if ($pdoOrDsn instanceof \PDO) { - if (\PDO::ERRMODE_EXCEPTION !== $pdoOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); - } - - $this->pdo = $pdoOrDsn; - $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); - } elseif (\is_string($pdoOrDsn) && str_contains($pdoOrDsn, '://')) { - $this->dsn = $this->buildDsnFromUrl($pdoOrDsn); - } else { - $this->dsn = $pdoOrDsn; - } - - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->username = $options['db_username'] ?? $this->username; - $this->password = $options['db_password'] ?? $this->password; - $this->connectionOptions = $options['db_connection_options'] ?? $this->connectionOptions; - $this->lockMode = $options['lock_mode'] ?? $this->lockMode; - } - - /** - * Creates the table to store sessions which can be called once for setup. - * - * Session ID is saved in a column of maximum length 128 because that is enough even - * for a 512 bit configured session.hash_function like Whirlpool. Session data is - * saved in a BLOB. One could also use a shorter inlined varbinary column - * if one was sure the data fits into it. - * - * @throws \PDOException When the table already exists - * @throws \DomainException When an unsupported PDO driver is used - */ - public function createTable() - { - // connect if we are not yet - $this->getConnection(); - - switch ($this->driver) { - case 'mysql': - // We use varbinary for the ID column because it prevents unwanted conversions: - // - character set conversions between server and client - // - trailing space removal - // - case-insensitivity - // - language processing like é == e - $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB"; - break; - case 'sqlite': - $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'pgsql': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'oci': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'sqlsrv': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - default: - throw new \DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver)); - } - - try { - $this->pdo->exec($sql); - $this->pdo->exec("CREATE INDEX EXPIRY ON $this->table ($this->lifetimeCol)"); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - - /** - * Returns true when the current session exists but expired according to session.gc_maxlifetime. - * - * Can be used to distinguish between a new session and one that expired due to inactivity. - * - * @return bool - */ - public function isSessionExpired() - { - return $this->sessionExpired; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $this->sessionExpired = false; - - if (null === $this->pdo) { - $this->connect($this->dsn ?: $savePath); - } - - return parent::open($savePath, $sessionName); - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - try { - return parent::read($sessionId); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - // We delay gc() to close() so that it is executed outside the transactional and blocking read-write process. - // This way, pruning expired sessions does not block them from being started while the current session is used. - $this->gcCalled = true; - - return 0; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - // delete the record associated with this id - $sql = "DELETE FROM $this->table WHERE $this->idCol = :id"; - - try { - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->execute(); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - $maxlifetime = (int) \ini_get('session.gc_maxlifetime'); - - try { - // We use a single MERGE SQL query when supported by the database. - $mergeStmt = $this->getMergeStatement($sessionId, $data, $maxlifetime); - if (null !== $mergeStmt) { - $mergeStmt->execute(); - - return true; - } - - $updateStmt = $this->getUpdateStatement($sessionId, $data, $maxlifetime); - $updateStmt->execute(); - - // When MERGE is not supported, like in Postgres < 9.5, we have to use this approach that can result in - // duplicate key errors when the same session is written simultaneously (given the LOCK_NONE behavior). - // We can just catch such an error and re-execute the update. This is similar to a serializable - // transaction with retry logic on serialization failures but without the overhead and without possible - // false positives due to longer gap locking. - if (!$updateStmt->rowCount()) { - try { - $insertStmt = $this->getInsertStatement($sessionId, $data, $maxlifetime); - $insertStmt->execute(); - } catch (\PDOException $e) { - // Handle integrity violation SQLSTATE 23000 (or a subclass like 23505 in Postgres) for duplicate keys - if (str_starts_with($e->getCode(), '23')) { - $updateStmt->execute(); - } else { - throw $e; - } - } - } - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $expiry = time() + (int) \ini_get('session.gc_maxlifetime'); - - try { - $updateStmt = $this->pdo->prepare( - "UPDATE $this->table SET $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id" - ); - $updateStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $updateStmt->bindParam(':expiry', $expiry, \PDO::PARAM_INT); - $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); - $updateStmt->execute(); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - $this->commit(); - - while ($unlockStmt = array_shift($this->unlockStatements)) { - $unlockStmt->execute(); - } - - if ($this->gcCalled) { - $this->gcCalled = false; - - // delete the session records that have expired - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time AND $this->lifetimeCol > :min"; - $stmt = $this->pdo->prepare($sql); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT); - $stmt->execute(); - // to be removed in 6.0 - if ('mysql' === $this->driver) { - $legacySql = "DELETE FROM $this->table WHERE $this->lifetimeCol <= :min AND $this->lifetimeCol + $this->timeCol < :time"; - } else { - $legacySql = "DELETE FROM $this->table WHERE $this->lifetimeCol <= :min AND $this->lifetimeCol < :time - $this->timeCol"; - } - - $stmt = $this->pdo->prepare($legacySql); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT); - $stmt->execute(); - } - - if (false !== $this->dsn) { - $this->pdo = null; // only close lazy-connection - $this->driver = null; - } - - return true; - } - - /** - * Lazy-connects to the database. - */ - private function connect(string $dsn): void - { - $this->pdo = new \PDO($dsn, $this->username, $this->password, $this->connectionOptions); - $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); - } - - /** - * Builds a PDO DSN from a URL-like connection string. - * - * @todo implement missing support for oci DSN (which look totally different from other PDO ones) - */ - private function buildDsnFromUrl(string $dsnOrUrl): string - { - // (pdo_)?sqlite3?:///... => (pdo_)?sqlite3?://localhost/... or else the URL will be invalid - $url = preg_replace('#^((?:pdo_)?sqlite3?):///#', '$1://localhost/', $dsnOrUrl); - - $params = parse_url($url); - - if (false === $params) { - return $dsnOrUrl; // If the URL is not valid, let's assume it might be a DSN already. - } - - $params = array_map('rawurldecode', $params); - - // Override the default username and password. Values passed through options will still win over these in the constructor. - if (isset($params['user'])) { - $this->username = $params['user']; - } - - if (isset($params['pass'])) { - $this->password = $params['pass']; - } - - if (!isset($params['scheme'])) { - throw new \InvalidArgumentException('URLs without scheme are not supported to configure the PdoSessionHandler.'); - } - - $driverAliasMap = [ - 'mssql' => 'sqlsrv', - 'mysql2' => 'mysql', // Amazon RDS, for some weird reason - 'postgres' => 'pgsql', - 'postgresql' => 'pgsql', - 'sqlite3' => 'sqlite', - ]; - - $driver = $driverAliasMap[$params['scheme']] ?? $params['scheme']; - - // Doctrine DBAL supports passing its internal pdo_* driver names directly too (allowing both dashes and underscores). This allows supporting the same here. - if (str_starts_with($driver, 'pdo_') || str_starts_with($driver, 'pdo-')) { - $driver = substr($driver, 4); - } - - $dsn = null; - switch ($driver) { - case 'mysql': - $dsn = 'mysql:'; - if ('' !== ($params['query'] ?? '')) { - $queryParams = []; - parse_str($params['query'], $queryParams); - if ('' !== ($queryParams['charset'] ?? '')) { - $dsn .= 'charset='.$queryParams['charset'].';'; - } - - if ('' !== ($queryParams['unix_socket'] ?? '')) { - $dsn .= 'unix_socket='.$queryParams['unix_socket'].';'; - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= 'dbname='.$dbName.';'; - } - - return $dsn; - } - } - // If "unix_socket" is not in the query, we continue with the same process as pgsql - // no break - case 'pgsql': - $dsn ?? $dsn = 'pgsql:'; - - if (isset($params['host']) && '' !== $params['host']) { - $dsn .= 'host='.$params['host'].';'; - } - - if (isset($params['port']) && '' !== $params['port']) { - $dsn .= 'port='.$params['port'].';'; - } - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= 'dbname='.$dbName.';'; - } - - return $dsn; - - case 'sqlite': - return 'sqlite:'.substr($params['path'], 1); - - case 'sqlsrv': - $dsn = 'sqlsrv:server='; - - if (isset($params['host'])) { - $dsn .= $params['host']; - } - - if (isset($params['port']) && '' !== $params['port']) { - $dsn .= ','.$params['port']; - } - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= ';Database='.$dbName; - } - - return $dsn; - - default: - throw new \InvalidArgumentException(sprintf('The scheme "%s" is not supported by the PdoSessionHandler URL configuration. Pass a PDO DSN directly.', $params['scheme'])); - } - } - - /** - * Helper method to begin a transaction. - * - * Since SQLite does not support row level locks, we have to acquire a reserved lock - * on the database immediately. Because of https://bugs.php.net/42766 we have to create - * such a transaction manually which also means we cannot use PDO::commit or - * PDO::rollback or PDO::inTransaction for SQLite. - * - * Also MySQLs default isolation, REPEATABLE READ, causes deadlock for different sessions - * due to https://percona.com/blog/2013/12/12/one-more-innodb-gap-lock-to-avoid/ . - * So we change it to READ COMMITTED. - */ - private function beginTransaction(): void - { - if (!$this->inTransaction) { - if ('sqlite' === $this->driver) { - $this->pdo->exec('BEGIN IMMEDIATE TRANSACTION'); - } else { - if ('mysql' === $this->driver) { - $this->pdo->exec('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - } - $this->pdo->beginTransaction(); - } - $this->inTransaction = true; - } - } - - /** - * Helper method to commit a transaction. - */ - private function commit(): void - { - if ($this->inTransaction) { - try { - // commit read-write transaction which also releases the lock - if ('sqlite' === $this->driver) { - $this->pdo->exec('COMMIT'); - } else { - $this->pdo->commit(); - } - $this->inTransaction = false; - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - } - - /** - * Helper method to rollback a transaction. - */ - private function rollback(): void - { - // We only need to rollback if we are in a transaction. Otherwise the resulting - // error would hide the real problem why rollback was called. We might not be - // in a transaction when not using the transactional locking behavior or when - // two callbacks (e.g. destroy and write) are invoked that both fail. - if ($this->inTransaction) { - if ('sqlite' === $this->driver) { - $this->pdo->exec('ROLLBACK'); - } else { - $this->pdo->rollBack(); - } - $this->inTransaction = false; - } - } - - /** - * Reads the session data in respect to the different locking strategies. - * - * We need to make sure we do not return session data that is already considered garbage according - * to the session.gc_maxlifetime setting because gc() is called after read() and only sometimes. - * - * @return string - */ - protected function doRead(string $sessionId) - { - if (self::LOCK_ADVISORY === $this->lockMode) { - $this->unlockStatements[] = $this->doAdvisoryLock($sessionId); - } - - $selectSql = $this->getSelectSql(); - $selectStmt = $this->pdo->prepare($selectSql); - $selectStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $insertStmt = null; - - while (true) { - $selectStmt->execute(); - $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); - - if ($sessionRows) { - $expiry = (int) $sessionRows[0][1]; - if ($expiry <= self::MAX_LIFETIME) { - $expiry += $sessionRows[0][2]; - } - - if ($expiry < time()) { - $this->sessionExpired = true; - - return ''; - } - - return \is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; - } - - if (null !== $insertStmt) { - $this->rollback(); - throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.'); - } - - if (!filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { - // In strict mode, session fixation is not possible: new sessions always start with a unique - // random id, so that concurrency is not possible and this code path can be skipped. - // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block - // until other connections to the session are committed. - try { - $insertStmt = $this->getInsertStatement($sessionId, '', 0); - $insertStmt->execute(); - } catch (\PDOException $e) { - // Catch duplicate key error because other connection created the session already. - // It would only not be the case when the other connection destroyed the session. - if (str_starts_with($e->getCode(), '23')) { - // Retrieve finished session data written by concurrent connection by restarting the loop. - // We have to start a new transaction as a failed query will mark the current transaction as - // aborted in PostgreSQL and disallow further queries within it. - $this->rollback(); - $this->beginTransaction(); - continue; - } - - throw $e; - } - } - - return ''; - } - } - - /** - * Executes an application-level lock on the database. - * - * @return \PDOStatement The statement that needs to be executed later to release the lock - * - * @throws \DomainException When an unsupported PDO driver is used - * - * @todo implement missing advisory locks - * - for oci using DBMS_LOCK.REQUEST - * - for sqlsrv using sp_getapplock with LockOwner = Session - */ - private function doAdvisoryLock(string $sessionId): \PDOStatement - { - switch ($this->driver) { - case 'mysql': - // MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced. - $lockId = substr($sessionId, 0, 64); - // should we handle the return value? 0 on timeout, null on error - // we use a timeout of 50 seconds which is also the default for innodb_lock_wait_timeout - $stmt = $this->pdo->prepare('SELECT GET_LOCK(:key, 50)'); - $stmt->bindValue(':key', $lockId, \PDO::PARAM_STR); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('DO RELEASE_LOCK(:key)'); - $releaseStmt->bindValue(':key', $lockId, \PDO::PARAM_STR); - - return $releaseStmt; - case 'pgsql': - // Obtaining an exclusive session level advisory lock requires an integer key. - // When session.sid_bits_per_character > 4, the session id can contain non-hex-characters. - // So we cannot just use hexdec(). - if (4 === \PHP_INT_SIZE) { - $sessionInt1 = $this->convertStringToInt($sessionId); - $sessionInt2 = $this->convertStringToInt(substr($sessionId, 4, 4)); - - $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key1, :key2)'); - $stmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); - $stmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key1, :key2)'); - $releaseStmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); - $releaseStmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); - } else { - $sessionBigInt = $this->convertStringToInt($sessionId); - - $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key)'); - $stmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key)'); - $releaseStmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); - } - - return $releaseStmt; - case 'sqlite': - throw new \DomainException('SQLite does not support advisory locks.'); - default: - throw new \DomainException(sprintf('Advisory locks are currently not implemented for PDO driver "%s".', $this->driver)); - } - } - - /** - * Encodes the first 4 (when PHP_INT_SIZE == 4) or 8 characters of the string as an integer. - * - * Keep in mind, PHP integers are signed. - */ - private function convertStringToInt(string $string): int - { - if (4 === \PHP_INT_SIZE) { - return (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); - } - - $int1 = (\ord($string[7]) << 24) + (\ord($string[6]) << 16) + (\ord($string[5]) << 8) + \ord($string[4]); - $int2 = (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); - - return $int2 + ($int1 << 32); - } - - /** - * Return a locking or nonlocking SQL query to read session information. - * - * @throws \DomainException When an unsupported PDO driver is used - */ - private function getSelectSql(): string - { - if (self::LOCK_TRANSACTIONAL === $this->lockMode) { - $this->beginTransaction(); - - // selecting the time column should be removed in 6.0 - switch ($this->driver) { - case 'mysql': - case 'oci': - case 'pgsql': - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id FOR UPDATE"; - case 'sqlsrv': - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WITH (UPDLOCK, ROWLOCK) WHERE $this->idCol = :id"; - case 'sqlite': - // we already locked when starting transaction - break; - default: - throw new \DomainException(sprintf('Transactional locks are currently not implemented for PDO driver "%s".', $this->driver)); - } - } - - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id"; - } - - /** - * Returns an insert statement supported by the database for writing session data. - */ - private function getInsertStatement(string $sessionId, string $sessionData, int $maxlifetime): \PDOStatement - { - switch ($this->driver) { - case 'oci': - $data = fopen('php://memory', 'r+'); - fwrite($data, $sessionData); - rewind($data); - $sql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, EMPTY_BLOB(), :expiry, :time) RETURNING $this->dataCol into :data"; - break; - default: - $data = $sessionData; - $sql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time)"; - break; - } - - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - - return $stmt; - } - - /** - * Returns an update statement supported by the database for writing session data. - */ - private function getUpdateStatement(string $sessionId, string $sessionData, int $maxlifetime): \PDOStatement - { - switch ($this->driver) { - case 'oci': - $data = fopen('php://memory', 'r+'); - fwrite($data, $sessionData); - rewind($data); - $sql = "UPDATE $this->table SET $this->dataCol = EMPTY_BLOB(), $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id RETURNING $this->dataCol into :data"; - break; - default: - $data = $sessionData; - $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id"; - break; - } - - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - - return $stmt; - } - - /** - * Returns a merge/upsert (i.e. insert or update) statement when supported by the database for writing session data. - */ - private function getMergeStatement(string $sessionId, string $data, int $maxlifetime): ?\PDOStatement - { - switch (true) { - case 'mysql' === $this->driver: - $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time) ". - "ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'sqlsrv' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/ - $mergeSql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $this->driver: - $mergeSql = "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time)"; - break; - case 'pgsql' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '9.5', '>='): - $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time) ". - "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - // MERGE is not supported with LOBs: https://oracle.com/technetwork/articles/fuecks-lobs-095315.html - return null; - } - - $mergeStmt = $this->pdo->prepare($mergeSql); - - if ('sqlsrv' === $this->driver) { - $mergeStmt->bindParam(1, $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(2, $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(3, $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(4, time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(5, time(), \PDO::PARAM_INT); - $mergeStmt->bindParam(6, $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(7, time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(8, time(), \PDO::PARAM_INT); - } else { - $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); - } - - return $mergeStmt; - } - - /** - * Return a PDO instance. - * - * @return \PDO - */ - protected function getConnection() - { - if (null === $this->pdo) { - $this->connect($this->dsn ?: \ini_get('session.save_path')); - } - - return $this->pdo; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php deleted file mode 100644 index 31954e677..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Predis\Response\ErrorInterface; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; - -/** - * Redis based session storage handler based on the Redis class - * provided by the PHP redis extension. - * - * @author Dalibor Karlović - */ -class RedisSessionHandler extends AbstractSessionHandler -{ - private $redis; - - /** - * @var string Key prefix for shared environments - */ - private $prefix; - - /** - * @var int Time to live in seconds - */ - private $ttl; - - /** - * List of available options: - * * prefix: The prefix to use for the keys in order to avoid collision on the Redis server - * * ttl: The time to live in seconds. - * - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis - * - * @throws \InvalidArgumentException When unsupported client or options are passed - */ - public function __construct($redis, array $options = []) - { - if ( - !$redis instanceof \Redis && - !$redis instanceof \RedisArray && - !$redis instanceof \RedisCluster && - !$redis instanceof \Predis\ClientInterface && - !$redis instanceof RedisProxy && - !$redis instanceof RedisClusterProxy - ) { - throw new \InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redis))); - } - - if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) { - throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff))); - } - - $this->redis = $redis; - $this->prefix = $options['prefix'] ?? 'sf_s'; - $this->ttl = $options['ttl'] ?? null; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId): string - { - return $this->redis->get($this->prefix.$sessionId) ?: ''; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data): bool - { - $result = $this->redis->setEx($this->prefix.$sessionId, (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime')), $data); - - return $result && !$result instanceof ErrorInterface; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId): bool - { - static $unlink = true; - - if ($unlink) { - try { - $unlink = false !== $this->redis->unlink($this->prefix.$sessionId); - } catch (\Throwable $e) { - $unlink = false; - } - } - - if (!$unlink) { - $this->redis->del($this->prefix.$sessionId); - } - - return true; - } - - /** - * {@inheritdoc} - */ - #[\ReturnTypeWillChange] - public function close(): bool - { - return true; - } - - /** - * {@inheritdoc} - * - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return 0; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime'))); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php b/lib/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php deleted file mode 100644 index f3f7b201d..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Doctrine\DBAL\DriverManager; -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; - -/** - * @author Nicolas Grekas - */ -class SessionHandlerFactory -{ - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy|\Memcached|\PDO|string $connection Connection or DSN - */ - public static function createHandler($connection): AbstractSessionHandler - { - if (!\is_string($connection) && !\is_object($connection)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a string or a connection object, "%s" given.', __METHOD__, get_debug_type($connection))); - } - - if ($options = \is_string($connection) ? parse_url($connection) : false) { - parse_str($options['query'] ?? '', $options); - } - - switch (true) { - case $connection instanceof \Redis: - case $connection instanceof \RedisArray: - case $connection instanceof \RedisCluster: - case $connection instanceof \Predis\ClientInterface: - case $connection instanceof RedisProxy: - case $connection instanceof RedisClusterProxy: - return new RedisSessionHandler($connection); - - case $connection instanceof \Memcached: - return new MemcachedSessionHandler($connection); - - case $connection instanceof \PDO: - return new PdoSessionHandler($connection); - - case !\is_string($connection): - throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', get_debug_type($connection))); - case str_starts_with($connection, 'file://'): - $savePath = substr($connection, 7); - - return new StrictSessionHandler(new NativeFileSessionHandler('' === $savePath ? null : $savePath)); - - case str_starts_with($connection, 'redis:'): - case str_starts_with($connection, 'rediss:'): - case str_starts_with($connection, 'memcached:'): - if (!class_exists(AbstractAdapter::class)) { - throw new \InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $connection)); - } - $handlerClass = str_starts_with($connection, 'memcached:') ? MemcachedSessionHandler::class : RedisSessionHandler::class; - $connection = AbstractAdapter::createConnection($connection, ['lazy' => true]); - - return new $handlerClass($connection, array_intersect_key($options ?: [], ['prefix' => 1, 'ttl' => 1])); - - case str_starts_with($connection, 'pdo_oci://'): - if (!class_exists(DriverManager::class)) { - throw new \InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require doctrine/dbal".', $connection)); - } - $connection = DriverManager::getConnection(['url' => $connection])->getWrappedConnection(); - // no break; - - case str_starts_with($connection, 'mssql://'): - case str_starts_with($connection, 'mysql://'): - case str_starts_with($connection, 'mysql2://'): - case str_starts_with($connection, 'pgsql://'): - case str_starts_with($connection, 'postgres://'): - case str_starts_with($connection, 'postgresql://'): - case str_starts_with($connection, 'sqlsrv://'): - case str_starts_with($connection, 'sqlite://'): - case str_starts_with($connection, 'sqlite3://'): - return new PdoSessionHandler($connection, $options ?: []); - } - - throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', $connection)); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php b/lib/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php deleted file mode 100644 index f7c385f64..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Adds basic `SessionUpdateTimestampHandlerInterface` behaviors to another `SessionHandlerInterface`. - * - * @author Nicolas Grekas - */ -class StrictSessionHandler extends AbstractSessionHandler -{ - private $handler; - private $doDestroy; - - public function __construct(\SessionHandlerInterface $handler) - { - if ($handler instanceof \SessionUpdateTimestampHandlerInterface) { - throw new \LogicException(sprintf('"%s" is already an instance of "SessionUpdateTimestampHandlerInterface", you cannot wrap it with "%s".', get_debug_type($handler), self::class)); - } - - $this->handler = $handler; - } - - /** - * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. - * - * @internal - */ - public function isWrapper(): bool - { - return $this->handler instanceof \SessionHandler; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - parent::open($savePath, $sessionName); - - return $this->handler->open($savePath, $sessionName); - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return $this->handler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->write($sessionId, $data); - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return $this->handler->write($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - $this->doDestroy = true; - $destroyed = parent::destroy($sessionId); - - return $this->doDestroy ? $this->doDestroy($sessionId) : $destroyed; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $this->doDestroy = false; - - return $this->handler->destroy($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/MetadataBag.php b/lib/symfony/http-foundation/Session/Storage/MetadataBag.php deleted file mode 100644 index 595a9e23c..000000000 --- a/lib/symfony/http-foundation/Session/Storage/MetadataBag.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * Metadata container. - * - * Adds metadata to the session. - * - * @author Drak - */ -class MetadataBag implements SessionBagInterface -{ - public const CREATED = 'c'; - public const UPDATED = 'u'; - public const LIFETIME = 'l'; - - /** - * @var string - */ - private $name = '__metadata'; - - /** - * @var string - */ - private $storageKey; - - /** - * @var array - */ - protected $meta = [self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0]; - - /** - * Unix timestamp. - * - * @var int - */ - private $lastUsed; - - /** - * @var int - */ - private $updateThreshold; - - /** - * @param string $storageKey The key used to store bag in the session - * @param int $updateThreshold The time to wait between two UPDATED updates - */ - public function __construct(string $storageKey = '_sf2_meta', int $updateThreshold = 0) - { - $this->storageKey = $storageKey; - $this->updateThreshold = $updateThreshold; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$array) - { - $this->meta = &$array; - - if (isset($array[self::CREATED])) { - $this->lastUsed = $this->meta[self::UPDATED]; - - $timeStamp = time(); - if ($timeStamp - $array[self::UPDATED] >= $this->updateThreshold) { - $this->meta[self::UPDATED] = $timeStamp; - } - } else { - $this->stampCreated(); - } - } - - /** - * Gets the lifetime that the session cookie was set with. - * - * @return int - */ - public function getLifetime() - { - return $this->meta[self::LIFETIME]; - } - - /** - * Stamps a new session's metadata. - * - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - */ - public function stampNew(int $lifetime = null) - { - $this->stampCreated($lifetime); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * Gets the created timestamp metadata. - * - * @return int Unix timestamp - */ - public function getCreated() - { - return $this->meta[self::CREATED]; - } - - /** - * Gets the last used metadata. - * - * @return int Unix timestamp - */ - public function getLastUsed() - { - return $this->lastUsed; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // nothing to do - return null; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * Sets name. - */ - public function setName(string $name) - { - $this->name = $name; - } - - private function stampCreated(int $lifetime = null): void - { - $timeStamp = time(); - $this->meta[self::CREATED] = $this->meta[self::UPDATED] = $this->lastUsed = $timeStamp; - $this->meta[self::LIFETIME] = $lifetime ?? (int) \ini_get('session.cookie_lifetime'); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/lib/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php deleted file mode 100644 index c5c2bb073..000000000 --- a/lib/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * MockArraySessionStorage mocks the session for unit tests. - * - * No PHP session is actually started since a session can be initialized - * and shutdown only once per PHP execution cycle. - * - * When doing functional testing, you should use MockFileSessionStorage instead. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - * @author Drak - */ -class MockArraySessionStorage implements SessionStorageInterface -{ - /** - * @var string - */ - protected $id = ''; - - /** - * @var string - */ - protected $name; - - /** - * @var bool - */ - protected $started = false; - - /** - * @var bool - */ - protected $closed = false; - - /** - * @var array - */ - protected $data = []; - - /** - * @var MetadataBag - */ - protected $metadataBag; - - /** - * @var array|SessionBagInterface[] - */ - protected $bags = []; - - public function __construct(string $name = 'MOCKSESSID', MetadataBag $metaBag = null) - { - $this->name = $name; - $this->setMetadataBag($metaBag); - } - - public function setSessionData(array $array) - { - $this->data = $array; - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (empty($this->id)) { - $this->id = $this->generateId(); - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, int $lifetime = null) - { - if (!$this->started) { - $this->start(); - } - - $this->metadataBag->stampNew($lifetime); - $this->id = $this->generateId(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->id; - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - if ($this->started) { - throw new \LogicException('Cannot set session ID after the session has started.'); - } - - $this->id = $id; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function save() - { - if (!$this->started || $this->closed) { - throw new \RuntimeException('Trying to save a session that was not started yet or was already closed.'); - } - // nothing to do since we don't persist the session data - $this->closed = false; - $this->started = false; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // clear out the session - $this->data = []; - - // reconnect the bags to the session - $this->loadSession(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - $this->bags[$bag->getName()] = $bag; - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - if (!isset($this->bags[$name])) { - throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name)); - } - - if (!$this->started) { - $this->start(); - } - - return $this->bags[$name]; - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->started; - } - - public function setMetadataBag(MetadataBag $bag = null) - { - if (null === $bag) { - $bag = new MetadataBag(); - } - - $this->metadataBag = $bag; - } - - /** - * Gets the MetadataBag. - * - * @return MetadataBag - */ - public function getMetadataBag() - { - return $this->metadataBag; - } - - /** - * Generates a session ID. - * - * This doesn't need to be particularly cryptographically secure since this is just - * a mock. - * - * @return string - */ - protected function generateId() - { - return hash('sha256', uniqid('ss_mock_', true)); - } - - protected function loadSession() - { - $bags = array_merge($this->bags, [$this->metadataBag]); - - foreach ($bags as $bag) { - $key = $bag->getStorageKey(); - $this->data[$key] = $this->data[$key] ?? []; - $bag->initialize($this->data[$key]); - } - - $this->started = true; - $this->closed = false; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/lib/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php deleted file mode 100644 index 8e32a45e3..000000000 --- a/lib/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -/** - * MockFileSessionStorage is used to mock sessions for - * functional testing where you may need to persist session data - * across separate PHP processes. - * - * No PHP session is actually started since a session can be initialized - * and shutdown only once per PHP execution cycle and this class does - * not pollute any session related globals, including session_*() functions - * or session.* PHP ini directives. - * - * @author Drak - */ -class MockFileSessionStorage extends MockArraySessionStorage -{ - private $savePath; - - /** - * @param string|null $savePath Path of directory to save session files - */ - public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null) - { - if (null === $savePath) { - $savePath = sys_get_temp_dir(); - } - - if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) { - throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $savePath)); - } - - $this->savePath = $savePath; - - parent::__construct($name, $metaBag); - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (!$this->id) { - $this->id = $this->generateId(); - } - - $this->read(); - - $this->started = true; - - return true; - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, int $lifetime = null) - { - if (!$this->started) { - $this->start(); - } - - if ($destroy) { - $this->destroy(); - } - - return parent::regenerate($destroy, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function save() - { - if (!$this->started) { - throw new \RuntimeException('Trying to save a session that was not started yet or was already closed.'); - } - - $data = $this->data; - - foreach ($this->bags as $bag) { - if (empty($data[$key = $bag->getStorageKey()])) { - unset($data[$key]); - } - } - if ([$key = $this->metadataBag->getStorageKey()] === array_keys($data)) { - unset($data[$key]); - } - - try { - if ($data) { - $path = $this->getFilePath(); - $tmp = $path.bin2hex(random_bytes(6)); - file_put_contents($tmp, serialize($data)); - rename($tmp, $path); - } else { - $this->destroy(); - } - } finally { - $this->data = $data; - } - - // this is needed when the session object is re-used across multiple requests - // in functional tests. - $this->started = false; - } - - /** - * Deletes a session from persistent storage. - * Deliberately leaves session data in memory intact. - */ - private function destroy(): void - { - set_error_handler(static function () {}); - try { - unlink($this->getFilePath()); - } finally { - restore_error_handler(); - } - } - - /** - * Calculate path to file. - */ - private function getFilePath(): string - { - return $this->savePath.'/'.$this->id.'.mocksess'; - } - - /** - * Reads session from storage and loads session. - */ - private function read(): void - { - set_error_handler(static function () {}); - try { - $data = file_get_contents($this->getFilePath()); - } finally { - restore_error_handler(); - } - - $this->data = $data ? unserialize($data) : []; - - $this->loadSession(); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php b/lib/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php deleted file mode 100644 index d0da1e169..000000000 --- a/lib/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(MockFileSessionStorage::class); - -/** - * @author Jérémy Derussé - */ -class MockFileSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $savePath; - private $name; - private $metaBag; - - /** - * @see MockFileSessionStorage constructor. - */ - public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null) - { - $this->savePath = $savePath; - $this->name = $name; - $this->metaBag = $metaBag; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - return new MockFileSessionStorage($this->savePath, $this->name, $this->metaBag); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/lib/symfony/http-foundation/Session/Storage/NativeSessionStorage.php deleted file mode 100644 index a50c8270f..000000000 --- a/lib/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ /dev/null @@ -1,506 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; -use Symfony\Component\HttpFoundation\Session\SessionUtils; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; - -// Help opcache.preload discover always-needed symbols -class_exists(MetadataBag::class); -class_exists(StrictSessionHandler::class); -class_exists(SessionHandlerProxy::class); - -/** - * This provides a base class for session attribute storage. - * - * @author Drak - */ -class NativeSessionStorage implements SessionStorageInterface -{ - /** - * @var SessionBagInterface[] - */ - protected $bags = []; - - /** - * @var bool - */ - protected $started = false; - - /** - * @var bool - */ - protected $closed = false; - - /** - * @var AbstractProxy|\SessionHandlerInterface - */ - protected $saveHandler; - - /** - * @var MetadataBag - */ - protected $metadataBag; - - /** - * @var string|null - */ - private $emulateSameSite; - - /** - * Depending on how you want the storage driver to behave you probably - * want to override this constructor entirely. - * - * List of options for $options array with their defaults. - * - * @see https://php.net/session.configuration for options - * but we omit 'session.' from the beginning of the keys for convenience. - * - * ("auto_start", is not supported as it tells PHP to start a session before - * PHP starts to execute user-land code. Setting during runtime has no effect). - * - * cache_limiter, "" (use "0" to prevent headers from being sent entirely). - * cache_expire, "0" - * cookie_domain, "" - * cookie_httponly, "" - * cookie_lifetime, "0" - * cookie_path, "/" - * cookie_secure, "" - * cookie_samesite, null - * gc_divisor, "100" - * gc_maxlifetime, "1440" - * gc_probability, "1" - * lazy_write, "1" - * name, "PHPSESSID" - * referer_check, "" - * serialize_handler, "php" - * use_strict_mode, "1" - * use_cookies, "1" - * use_only_cookies, "1" - * use_trans_sid, "0" - * sid_length, "32" - * sid_bits_per_character, "5" - * trans_sid_hosts, $_SERVER['HTTP_HOST'] - * trans_sid_tags, "a=href,area=href,frame=src,form=" - * - * @param AbstractProxy|\SessionHandlerInterface|null $handler - */ - public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null) - { - if (!\extension_loaded('session')) { - throw new \LogicException('PHP extension "session" is required.'); - } - - $options += [ - 'cache_limiter' => '', - 'cache_expire' => 0, - 'use_cookies' => 1, - 'lazy_write' => 1, - 'use_strict_mode' => 1, - ]; - - session_register_shutdown(); - - $this->setMetadataBag($metaBag); - $this->setOptions($options); - $this->setSaveHandler($handler); - } - - /** - * Gets the save handler instance. - * - * @return AbstractProxy|\SessionHandlerInterface - */ - public function getSaveHandler() - { - return $this->saveHandler; - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (\PHP_SESSION_ACTIVE === session_status()) { - throw new \RuntimeException('Failed to start the session: already started by PHP.'); - } - - if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) { - throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); - } - - $sessionId = $_COOKIE[session_name()] ?? null; - /* - * Explanation of the session ID regular expression: `/^[a-zA-Z0-9,-]{22,250}$/`. - * - * ---------- Part 1 - * - * The part `[a-zA-Z0-9,-]` is related to the PHP ini directive `session.sid_bits_per_character` defined as 6. - * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character. - * Allowed values are integers such as: - * - 4 for range `a-f0-9` - * - 5 for range `a-v0-9` - * - 6 for range `a-zA-Z0-9,-` - * - * ---------- Part 2 - * - * The part `{22,250}` is related to the PHP ini directive `session.sid_length`. - * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-length. - * Allowed values are integers between 22 and 256, but we use 250 for the max. - * - * Where does the 250 come from? - * - The length of Windows and Linux filenames is limited to 255 bytes. Then the max must not exceed 255. - * - The session filename prefix is `sess_`, a 5 bytes string. Then the max must not exceed 255 - 5 = 250. - * - * ---------- Conclusion - * - * The parts 1 and 2 prevent the warning below: - * `PHP Warning: SessionHandler::read(): Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed.` - * - * The part 2 prevents the warning below: - * `PHP Warning: SessionHandler::read(): open(filepath, O_RDWR) failed: No such file or directory (2).` - */ - if ($sessionId && $this->saveHandler instanceof AbstractProxy && 'files' === $this->saveHandler->getSaveHandlerName() && !preg_match('/^[a-zA-Z0-9,-]{22,250}$/', $sessionId)) { - // the session ID in the header is invalid, create a new one - session_id(session_create_id()); - } - - // ok to try and start the session - if (!session_start()) { - throw new \RuntimeException('Failed to start the session.'); - } - - if (null !== $this->emulateSameSite) { - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); - if (null !== $originalCookie) { - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); - } - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->saveHandler->getId(); - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - $this->saveHandler->setId($id); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->saveHandler->getName(); - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->saveHandler->setName($name); - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, int $lifetime = null) - { - // Cannot regenerate the session ID for non-active sessions. - if (\PHP_SESSION_ACTIVE !== session_status()) { - return false; - } - - if (headers_sent()) { - return false; - } - - if (null !== $lifetime && $lifetime != \ini_get('session.cookie_lifetime')) { - $this->save(); - ini_set('session.cookie_lifetime', $lifetime); - $this->start(); - } - - if ($destroy) { - $this->metadataBag->stampNew(); - } - - $isRegenerated = session_regenerate_id($destroy); - - if (null !== $this->emulateSameSite) { - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); - if (null !== $originalCookie) { - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); - } - } - - return $isRegenerated; - } - - /** - * {@inheritdoc} - */ - public function save() - { - // Store a copy so we can restore the bags in case the session was not left empty - $session = $_SESSION; - - foreach ($this->bags as $bag) { - if (empty($_SESSION[$key = $bag->getStorageKey()])) { - unset($_SESSION[$key]); - } - } - if ($_SESSION && [$key = $this->metadataBag->getStorageKey()] === array_keys($_SESSION)) { - unset($_SESSION[$key]); - } - - // Register error handler to add information about the current save handler - $previousHandler = set_error_handler(function ($type, $msg, $file, $line) use (&$previousHandler) { - if (\E_WARNING === $type && str_starts_with($msg, 'session_write_close():')) { - $handler = $this->saveHandler instanceof SessionHandlerProxy ? $this->saveHandler->getHandler() : $this->saveHandler; - $msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', \get_class($handler)); - } - - return $previousHandler ? $previousHandler($type, $msg, $file, $line) : false; - }); - - try { - session_write_close(); - } finally { - restore_error_handler(); - - // Restore only if not empty - if ($_SESSION) { - $_SESSION = $session; - } - } - - $this->closed = true; - $this->started = false; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // clear out the session - $_SESSION = []; - - // reconnect the bags to the session - $this->loadSession(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - if ($this->started) { - throw new \LogicException('Cannot register a bag when the session is already started.'); - } - - $this->bags[$bag->getName()] = $bag; - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - if (!isset($this->bags[$name])) { - throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name)); - } - - if (!$this->started && $this->saveHandler->isActive()) { - $this->loadSession(); - } elseif (!$this->started) { - $this->start(); - } - - return $this->bags[$name]; - } - - public function setMetadataBag(MetadataBag $metaBag = null) - { - if (null === $metaBag) { - $metaBag = new MetadataBag(); - } - - $this->metadataBag = $metaBag; - } - - /** - * Gets the MetadataBag. - * - * @return MetadataBag - */ - public function getMetadataBag() - { - return $this->metadataBag; - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->started; - } - - /** - * Sets session.* ini variables. - * - * For convenience we omit 'session.' from the beginning of the keys. - * Explicitly ignores other ini keys. - * - * @param array $options Session ini directives [key => value] - * - * @see https://php.net/session.configuration - */ - public function setOptions(array $options) - { - if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) { - return; - } - - $validOptions = array_flip([ - 'cache_expire', 'cache_limiter', 'cookie_domain', 'cookie_httponly', - 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'cookie_samesite', - 'gc_divisor', 'gc_maxlifetime', 'gc_probability', - 'lazy_write', 'name', 'referer_check', - 'serialize_handler', 'use_strict_mode', 'use_cookies', - 'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled', - 'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name', - 'upload_progress.freq', 'upload_progress.min_freq', 'url_rewriter.tags', - 'sid_length', 'sid_bits_per_character', 'trans_sid_hosts', 'trans_sid_tags', - ]); - - foreach ($options as $key => $value) { - if (isset($validOptions[$key])) { - if (str_starts_with($key, 'upload_progress.')) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. The settings prefixed with "session.upload_progress." can not be changed at runtime.', $key); - continue; - } - if ('url_rewriter.tags' === $key) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. Use "trans_sid_tags" instead.', $key); - } - if ('cookie_samesite' === $key && \PHP_VERSION_ID < 70300) { - // PHP < 7.3 does not support same_site cookies. We will emulate it in - // the start() method instead. - $this->emulateSameSite = $value; - continue; - } - if ('cookie_secure' === $key && 'auto' === $value) { - continue; - } - ini_set('url_rewriter.tags' !== $key ? 'session.'.$key : $key, $value); - } - } - } - - /** - * Registers session save handler as a PHP session handler. - * - * To use internal PHP session save handlers, override this method using ini_set with - * session.save_handler and session.save_path e.g. - * - * ini_set('session.save_handler', 'files'); - * ini_set('session.save_path', '/tmp'); - * - * or pass in a \SessionHandler instance which configures session.save_handler in the - * constructor, for a template see NativeFileSessionHandler. - * - * @see https://php.net/session-set-save-handler - * @see https://php.net/sessionhandlerinterface - * @see https://php.net/sessionhandler - * - * @param AbstractProxy|\SessionHandlerInterface|null $saveHandler - * - * @throws \InvalidArgumentException - */ - public function setSaveHandler($saveHandler = null) - { - if (!$saveHandler instanceof AbstractProxy && - !$saveHandler instanceof \SessionHandlerInterface && - null !== $saveHandler) { - throw new \InvalidArgumentException('Must be instance of AbstractProxy; implement \SessionHandlerInterface; or be null.'); - } - - // Wrap $saveHandler in proxy and prevent double wrapping of proxy - if (!$saveHandler instanceof AbstractProxy && $saveHandler instanceof \SessionHandlerInterface) { - $saveHandler = new SessionHandlerProxy($saveHandler); - } elseif (!$saveHandler instanceof AbstractProxy) { - $saveHandler = new SessionHandlerProxy(new StrictSessionHandler(new \SessionHandler())); - } - $this->saveHandler = $saveHandler; - - if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) { - return; - } - - if ($this->saveHandler instanceof SessionHandlerProxy) { - session_set_save_handler($this->saveHandler, false); - } - } - - /** - * Load the session with attributes. - * - * After starting the session, PHP retrieves the session from whatever handlers - * are set to (either PHP's internal, or a custom save handler set with session_set_save_handler()). - * PHP takes the return value from the read() handler, unserializes it - * and populates $_SESSION with the result automatically. - */ - protected function loadSession(array &$session = null) - { - if (null === $session) { - $session = &$_SESSION; - } - - $bags = array_merge($this->bags, [$this->metadataBag]); - - foreach ($bags as $bag) { - $key = $bag->getStorageKey(); - $session[$key] = isset($session[$key]) && \is_array($session[$key]) ? $session[$key] : []; - $bag->initialize($session[$key]); - } - - $this->started = true; - $this->closed = false; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php b/lib/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php deleted file mode 100644 index a7d7411ff..000000000 --- a/lib/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(NativeSessionStorage::class); - -/** - * @author Jérémy Derussé - */ -class NativeSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $options; - private $handler; - private $metaBag; - private $secure; - - /** - * @see NativeSessionStorage constructor. - */ - public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null, bool $secure = false) - { - $this->options = $options; - $this->handler = $handler; - $this->metaBag = $metaBag; - $this->secure = $secure; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - $storage = new NativeSessionStorage($this->options, $this->handler, $this->metaBag); - if ($this->secure && $request && $request->isSecure()) { - $storage->setOptions(['cookie_secure' => true]); - } - - return $storage; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php b/lib/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php deleted file mode 100644 index 72dbef134..000000000 --- a/lib/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; - -/** - * Allows session to be started by PHP and managed by Symfony. - * - * @author Drak - */ -class PhpBridgeSessionStorage extends NativeSessionStorage -{ - /** - * @param AbstractProxy|\SessionHandlerInterface|null $handler - */ - public function __construct($handler = null, MetadataBag $metaBag = null) - { - if (!\extension_loaded('session')) { - throw new \LogicException('PHP extension "session" is required.'); - } - - $this->setMetadataBag($metaBag); - $this->setSaveHandler($handler); - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags and nothing else that may be set - // since the purpose of this driver is to share a handler - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // reconnect the bags to the session - $this->loadSession(); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php b/lib/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php deleted file mode 100644 index 173ef71de..000000000 --- a/lib/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(PhpBridgeSessionStorage::class); - -/** - * @author Jérémy Derussé - */ -class PhpBridgeSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $handler; - private $metaBag; - private $secure; - - /** - * @see PhpBridgeSessionStorage constructor. - */ - public function __construct($handler = null, MetadataBag $metaBag = null, bool $secure = false) - { - $this->handler = $handler; - $this->metaBag = $metaBag; - $this->secure = $secure; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - $storage = new PhpBridgeSessionStorage($this->handler, $this->metaBag); - if ($this->secure && $request && $request->isSecure()) { - $storage->setOptions(['cookie_secure' => true]); - } - - return $storage; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php b/lib/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php deleted file mode 100644 index edd04dff8..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; - -/** - * @author Drak - */ -abstract class AbstractProxy -{ - /** - * Flag if handler wraps an internal PHP session handler (using \SessionHandler). - * - * @var bool - */ - protected $wrapper = false; - - /** - * @var string - */ - protected $saveHandlerName; - - /** - * Gets the session.save_handler name. - * - * @return string|null - */ - public function getSaveHandlerName() - { - return $this->saveHandlerName; - } - - /** - * Is this proxy handler and instance of \SessionHandlerInterface. - * - * @return bool - */ - public function isSessionHandlerInterface() - { - return $this instanceof \SessionHandlerInterface; - } - - /** - * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. - * - * @return bool - */ - public function isWrapper() - { - return $this->wrapper; - } - - /** - * Has a session started? - * - * @return bool - */ - public function isActive() - { - return \PHP_SESSION_ACTIVE === session_status(); - } - - /** - * Gets the session ID. - * - * @return string - */ - public function getId() - { - return session_id(); - } - - /** - * Sets the session ID. - * - * @throws \LogicException - */ - public function setId(string $id) - { - if ($this->isActive()) { - throw new \LogicException('Cannot change the ID of an active session.'); - } - - session_id($id); - } - - /** - * Gets the session name. - * - * @return string - */ - public function getName() - { - return session_name(); - } - - /** - * Sets the session name. - * - * @throws \LogicException - */ - public function setName(string $name) - { - if ($this->isActive()) { - throw new \LogicException('Cannot change the name of an active session.'); - } - - session_name($name); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/lib/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php deleted file mode 100644 index 0defa4a7a..000000000 --- a/lib/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; - -use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; - -/** - * @author Drak - */ -class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - protected $handler; - - public function __construct(\SessionHandlerInterface $handler) - { - $this->handler = $handler; - $this->wrapper = $handler instanceof \SessionHandler; - $this->saveHandlerName = $this->wrapper || ($handler instanceof StrictSessionHandler && $handler->isWrapper()) ? \ini_get('session.save_handler') : 'user'; - } - - /** - * @return \SessionHandlerInterface - */ - public function getHandler() - { - return $this->handler; - } - - // \SessionHandlerInterface - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - return $this->handler->open($savePath, $sessionName); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return string|false - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - return $this->handler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - return $this->handler->write($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - return $this->handler->destroy($sessionId); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data); - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php b/lib/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php deleted file mode 100644 index d17c60aeb..000000000 --- a/lib/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -/** - * @author Jérémy Derussé - * - * @internal to be removed in Symfony 6 - */ -final class ServiceSessionFactory implements SessionStorageFactoryInterface -{ - private $storage; - - public function __construct(SessionStorageInterface $storage) - { - $this->storage = $storage; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - if ($this->storage instanceof NativeSessionStorage && $request && $request->isSecure()) { - $this->storage->setOptions(['cookie_secure' => true]); - } - - return $this->storage; - } -} diff --git a/lib/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php b/lib/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php deleted file mode 100644 index d03f0da4c..000000000 --- a/lib/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -/** - * @author Jérémy Derussé - */ -interface SessionStorageFactoryInterface -{ - /** - * Creates a new instance of SessionStorageInterface. - */ - public function createStorage(?Request $request): SessionStorageInterface; -} diff --git a/lib/symfony/http-foundation/Session/Storage/SessionStorageInterface.php b/lib/symfony/http-foundation/Session/Storage/SessionStorageInterface.php deleted file mode 100644 index b7f66e7c7..000000000 --- a/lib/symfony/http-foundation/Session/Storage/SessionStorageInterface.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * StorageInterface. - * - * @author Fabien Potencier - * @author Drak - */ -interface SessionStorageInterface -{ - /** - * Starts the session. - * - * @return bool - * - * @throws \RuntimeException if something goes wrong starting the session - */ - public function start(); - - /** - * Checks if the session is started. - * - * @return bool - */ - public function isStarted(); - - /** - * Returns the session ID. - * - * @return string - */ - public function getId(); - - /** - * Sets the session ID. - */ - public function setId(string $id); - - /** - * Returns the session name. - * - * @return string - */ - public function getName(); - - /** - * Sets the session name. - */ - public function setName(string $name); - - /** - * Regenerates id that represents this storage. - * - * This method must invoke session_regenerate_id($destroy) unless - * this interface is used for a storage object designed for unit - * or functional testing where a real PHP session would interfere - * with testing. - * - * Note regenerate+destroy should not clear the session data in memory - * only delete the session data from persistent storage. - * - * Care: When regenerating the session ID no locking is involved in PHP's - * session design. See https://bugs.php.net/61470 for a discussion. - * So you must make sure the regenerated session is saved BEFORE sending the - * headers with the new ID. Symfony's HttpKernel offers a listener for this. - * See Symfony\Component\HttpKernel\EventListener\SaveSessionListener. - * Otherwise session data could get lost again for concurrent requests with the - * new ID. One result could be that you get logged out after just logging in. - * - * @param bool $destroy Destroy session when regenerating? - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - * - * @throws \RuntimeException If an error occurs while regenerating this storage - */ - public function regenerate(bool $destroy = false, int $lifetime = null); - - /** - * Force the session to be saved and closed. - * - * This method must invoke session_write_close() unless this interface is - * used for a storage object design for unit or functional testing where - * a real PHP session would interfere with testing, in which case - * it should actually persist the session data if required. - * - * @throws \RuntimeException if the session is saved without being started, or if the session - * is already closed - */ - public function save(); - - /** - * Clear all session data in memory. - */ - public function clear(); - - /** - * Gets a SessionBagInterface by name. - * - * @return SessionBagInterface - * - * @throws \InvalidArgumentException If the bag does not exist - */ - public function getBag(string $name); - - /** - * Registers a SessionBagInterface for use. - */ - public function registerBag(SessionBagInterface $bag); - - /** - * @return MetadataBag - */ - public function getMetadataBag(); -} diff --git a/lib/symfony/http-foundation/StreamedResponse.php b/lib/symfony/http-foundation/StreamedResponse.php deleted file mode 100644 index 676cd6687..000000000 --- a/lib/symfony/http-foundation/StreamedResponse.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * StreamedResponse represents a streamed HTTP response. - * - * A StreamedResponse uses a callback for its content. - * - * The callback should use the standard PHP functions like echo - * to stream the response back to the client. The flush() function - * can also be used if needed. - * - * @see flush() - * - * @author Fabien Potencier - */ -class StreamedResponse extends Response -{ - protected $callback; - protected $streamed; - private $headersSent; - - public function __construct(callable $callback = null, int $status = 200, array $headers = []) - { - parent::__construct(null, $status, $headers); - - if (null !== $callback) { - $this->setCallback($callback); - } - $this->streamed = false; - $this->headersSent = false; - } - - /** - * Factory method for chainability. - * - * @param callable|null $callback A valid PHP callback or null to set it later - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($callback = null, int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($callback, $status, $headers); - } - - /** - * Sets the PHP callback associated with this Response. - * - * @return $this - */ - public function setCallback(callable $callback) - { - $this->callback = $callback; - - return $this; - } - - /** - * {@inheritdoc} - * - * This method only sends the headers once. - * - * @return $this - */ - public function sendHeaders() - { - if ($this->headersSent) { - return $this; - } - - $this->headersSent = true; - - return parent::sendHeaders(); - } - - /** - * {@inheritdoc} - * - * This method only sends the content once. - * - * @return $this - */ - public function sendContent() - { - if ($this->streamed) { - return $this; - } - - $this->streamed = true; - - if (null === $this->callback) { - throw new \LogicException('The Response callback must not be null.'); - } - - ($this->callback)(); - - return $this; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException when the content is not null - * - * @return $this - */ - public function setContent(?string $content) - { - if (null !== $content) { - throw new \LogicException('The content cannot be set on a StreamedResponse instance.'); - } - - $this->streamed = true; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getContent() - { - return false; - } -} diff --git a/lib/symfony/http-foundation/UrlHelper.php b/lib/symfony/http-foundation/UrlHelper.php deleted file mode 100644 index c15f101cd..000000000 --- a/lib/symfony/http-foundation/UrlHelper.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\Routing\RequestContext; - -/** - * A helper service for manipulating URLs within and outside the request scope. - * - * @author Valentin Udaltsov - */ -final class UrlHelper -{ - private $requestStack; - private $requestContext; - - public function __construct(RequestStack $requestStack, RequestContext $requestContext = null) - { - $this->requestStack = $requestStack; - $this->requestContext = $requestContext; - } - - public function getAbsoluteUrl(string $path): string - { - if (str_contains($path, '://') || '//' === substr($path, 0, 2)) { - return $path; - } - - if (null === $request = $this->requestStack->getMainRequest()) { - return $this->getAbsoluteUrlFromContext($path); - } - - if ('#' === $path[0]) { - $path = $request->getRequestUri().$path; - } elseif ('?' === $path[0]) { - $path = $request->getPathInfo().$path; - } - - if (!$path || '/' !== $path[0]) { - $prefix = $request->getPathInfo(); - $last = \strlen($prefix) - 1; - if ($last !== $pos = strrpos($prefix, '/')) { - $prefix = substr($prefix, 0, $pos).'/'; - } - - return $request->getUriForPath($prefix.$path); - } - - return $request->getSchemeAndHttpHost().$path; - } - - public function getRelativePath(string $path): string - { - if (str_contains($path, '://') || '//' === substr($path, 0, 2)) { - return $path; - } - - if (null === $request = $this->requestStack->getMainRequest()) { - return $path; - } - - return $request->getRelativeUriForPath($path); - } - - private function getAbsoluteUrlFromContext(string $path): string - { - if (null === $this->requestContext || '' === $host = $this->requestContext->getHost()) { - return $path; - } - - $scheme = $this->requestContext->getScheme(); - $port = ''; - - if ('http' === $scheme && 80 !== $this->requestContext->getHttpPort()) { - $port = ':'.$this->requestContext->getHttpPort(); - } elseif ('https' === $scheme && 443 !== $this->requestContext->getHttpsPort()) { - $port = ':'.$this->requestContext->getHttpsPort(); - } - - if ('#' === $path[0]) { - $queryString = $this->requestContext->getQueryString(); - $path = $this->requestContext->getPathInfo().($queryString ? '?'.$queryString : '').$path; - } elseif ('?' === $path[0]) { - $path = $this->requestContext->getPathInfo().$path; - } - - if ('/' !== $path[0]) { - $path = rtrim($this->requestContext->getBaseUrl(), '/').'/'.$path; - } - - return $scheme.'://'.$host.$port.$path; - } -} diff --git a/lib/symfony/http-foundation/composer.json b/lib/symfony/http-foundation/composer.json deleted file mode 100644 index cb8d59ffe..000000000 --- a/lib/symfony/http-foundation/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "symfony/http-foundation", - "type": "library", - "description": "Defines an object-oriented layer for the HTTP specification", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" - }, - "suggest" : { - "symfony/mime": "To use the file extension guesser" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/http-kernel/Attribute/ArgumentInterface.php b/lib/symfony/http-kernel/Attribute/ArgumentInterface.php deleted file mode 100644 index 78769f1ac..000000000 --- a/lib/symfony/http-kernel/Attribute/ArgumentInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Attribute; - -trigger_deprecation('symfony/http-kernel', '5.3', 'The "%s" interface is deprecated.', ArgumentInterface::class); - -/** - * Marker interface for controller argument attributes. - * - * @deprecated since Symfony 5.3 - */ -interface ArgumentInterface -{ -} diff --git a/lib/symfony/http-kernel/Attribute/AsController.php b/lib/symfony/http-kernel/Attribute/AsController.php deleted file mode 100644 index ef3710451..000000000 --- a/lib/symfony/http-kernel/Attribute/AsController.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Attribute; - -/** - * Service tag to autoconfigure controllers. - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class AsController -{ - public function __construct() - { - } -} diff --git a/lib/symfony/http-kernel/Bundle/Bundle.php b/lib/symfony/http-kernel/Bundle/Bundle.php deleted file mode 100644 index 54a1d10b9..000000000 --- a/lib/symfony/http-kernel/Bundle/Bundle.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Bundle; - -use Symfony\Component\Console\Application; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerAwareTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; - -/** - * An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions. - * - * @author Fabien Potencier - */ -abstract class Bundle implements BundleInterface -{ - use ContainerAwareTrait; - - protected $name; - protected $extension; - protected $path; - private $namespace; - - /** - * {@inheritdoc} - */ - public function boot() - { - } - - /** - * {@inheritdoc} - */ - public function shutdown() - { - } - - /** - * {@inheritdoc} - * - * This method can be overridden to register compilation passes, - * other extensions, ... - */ - public function build(ContainerBuilder $container) - { - } - - /** - * Returns the bundle's container extension. - * - * @return ExtensionInterface|null - * - * @throws \LogicException - */ - public function getContainerExtension() - { - if (null === $this->extension) { - $extension = $this->createContainerExtension(); - - if (null !== $extension) { - if (!$extension instanceof ExtensionInterface) { - throw new \LogicException(sprintf('Extension "%s" must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_debug_type($extension))); - } - - // check naming convention - $basename = preg_replace('/Bundle$/', '', $this->getName()); - $expectedAlias = Container::underscore($basename); - - if ($expectedAlias != $extension->getAlias()) { - throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias())); - } - - $this->extension = $extension; - } else { - $this->extension = false; - } - } - - return $this->extension ?: null; - } - - /** - * {@inheritdoc} - */ - public function getNamespace() - { - if (null === $this->namespace) { - $this->parseClassName(); - } - - return $this->namespace; - } - - /** - * {@inheritdoc} - */ - public function getPath() - { - if (null === $this->path) { - $reflected = new \ReflectionObject($this); - $this->path = \dirname($reflected->getFileName()); - } - - return $this->path; - } - - /** - * Returns the bundle name (the class short name). - */ - final public function getName(): string - { - if (null === $this->name) { - $this->parseClassName(); - } - - return $this->name; - } - - public function registerCommands(Application $application) - { - } - - /** - * Returns the bundle's container extension class. - * - * @return string - */ - protected function getContainerExtensionClass() - { - $basename = preg_replace('/Bundle$/', '', $this->getName()); - - return $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension'; - } - - /** - * Creates the bundle's container extension. - * - * @return ExtensionInterface|null - */ - protected function createContainerExtension() - { - return class_exists($class = $this->getContainerExtensionClass()) ? new $class() : null; - } - - private function parseClassName() - { - $pos = strrpos(static::class, '\\'); - $this->namespace = false === $pos ? '' : substr(static::class, 0, $pos); - if (null === $this->name) { - $this->name = false === $pos ? static::class : substr(static::class, $pos + 1); - } - } -} diff --git a/lib/symfony/http-kernel/Bundle/BundleInterface.php b/lib/symfony/http-kernel/Bundle/BundleInterface.php deleted file mode 100644 index fdc13e0c8..000000000 --- a/lib/symfony/http-kernel/Bundle/BundleInterface.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Bundle; - -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; - -/** - * BundleInterface. - * - * @author Fabien Potencier - */ -interface BundleInterface extends ContainerAwareInterface -{ - /** - * Boots the Bundle. - */ - public function boot(); - - /** - * Shutdowns the Bundle. - */ - public function shutdown(); - - /** - * Builds the bundle. - * - * It is only ever called once when the cache is empty. - */ - public function build(ContainerBuilder $container); - - /** - * Returns the container extension that should be implicitly loaded. - * - * @return ExtensionInterface|null - */ - public function getContainerExtension(); - - /** - * Returns the bundle name (the class short name). - * - * @return string - */ - public function getName(); - - /** - * Gets the Bundle namespace. - * - * @return string - */ - public function getNamespace(); - - /** - * Gets the Bundle directory path. - * - * The path should always be returned as a Unix path (with /). - * - * @return string - */ - public function getPath(); -} diff --git a/lib/symfony/http-kernel/CHANGELOG.md b/lib/symfony/http-kernel/CHANGELOG.md deleted file mode 100644 index d0dc2076c..000000000 --- a/lib/symfony/http-kernel/CHANGELOG.md +++ /dev/null @@ -1,317 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add the ability to enable the profiler using a request query parameter, body parameter or attribute - * Deprecate `AbstractTestSessionListener` and `TestSessionListener`, use `AbstractSessionListener` and `SessionListener` instead - * Deprecate the `fileLinkFormat` parameter of `DebugHandlersListener` - * Add support for configuring log level, and status code by exception class - * Allow ignoring "kernel.reset" methods that don't exist with "on_invalid" attribute - -5.3 ---- - - * Deprecate `ArgumentInterface` - * Add `ArgumentMetadata::getAttributes()` - * Deprecate `ArgumentMetadata::getAttribute()`, use `getAttributes()` instead - * Mark the class `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` as internal - * Deprecate returning a `ContainerBuilder` from `KernelInterface::registerContainerConfiguration()` - * Deprecate `HttpKernelInterface::MASTER_REQUEST` and add `HttpKernelInterface::MAIN_REQUEST` as replacement - * Deprecate `KernelEvent::isMasterRequest()` and add `isMainRequest()` as replacement - * Add `#[AsController]` attribute for declaring standalone controllers on PHP 8 - * Add `FragmentUriGeneratorInterface` and `FragmentUriGenerator` to generate the URI of a fragment - -5.2.0 ------ - - * added session usage - * made the public `http_cache` service handle requests when available - * allowed enabling trusted hosts and proxies using new `kernel.trusted_hosts`, - `kernel.trusted_proxies` and `kernel.trusted_headers` parameters - * content of request parameter `_password` is now also hidden - in the request profiler raw content section - * Allowed adding attributes on controller arguments that will be passed to argument resolvers. - * kernels implementing the `ExtensionInterface` will now be auto-registered to the container - * added parameter `kernel.runtime_environment`, defined as `%env(default:kernel.environment:APP_RUNTIME_ENV)%` - * do not set a default `Accept` HTTP header when using `HttpKernelBrowser` - -5.1.0 ------ - - * allowed to use a specific logger channel for deprecations - * made `WarmableInterface::warmUp()` return a list of classes or files to preload on PHP 7.4+; - not returning an array is deprecated - * made kernels implementing `WarmableInterface` be part of the cache warmup stage - * deprecated support for `service:action` syntax to reference controllers, use `serviceOrFqcn::method` instead - * allowed using public aliases to reference controllers - * added session usage reporting when the `_stateless` attribute of the request is set to `true` - * added `AbstractSessionListener::onSessionUsage()` to report when the session is used while a request is stateless - -5.0.0 ------ - - * removed support for getting the container from a non-booted kernel - * removed the first and second constructor argument of `ConfigDataCollector` - * removed `ConfigDataCollector::getApplicationName()` - * removed `ConfigDataCollector::getApplicationVersion()` - * removed support for `Symfony\Component\Templating\EngineInterface` in `HIncludeFragmentRenderer`, use a `Twig\Environment` only - * removed `TranslatorListener` in favor of `LocaleAwareListener` - * removed `getRootDir()` and `getName()` from `Kernel` and `KernelInterface` - * removed `FilterControllerArgumentsEvent`, use `ControllerArgumentsEvent` instead - * removed `FilterControllerEvent`, use `ControllerEvent` instead - * removed `FilterResponseEvent`, use `ResponseEvent` instead - * removed `GetResponseEvent`, use `RequestEvent` instead - * removed `GetResponseForControllerResultEvent`, use `ViewEvent` instead - * removed `GetResponseForExceptionEvent`, use `ExceptionEvent` instead - * removed `PostResponseEvent`, use `TerminateEvent` instead - * removed `SaveSessionListener` in favor of `AbstractSessionListener` - * removed `Client`, use `HttpKernelBrowser` instead - * added method `getProjectDir()` to `KernelInterface` - * removed methods `serialize` and `unserialize` from `DataCollector`, store the serialized state in the data property instead - * made `ProfilerStorageInterface` internal - * removed the second and third argument of `KernelInterface::locateResource` - * removed the second and third argument of `FileLocator::__construct` - * removed loading resources from `%kernel.root_dir%/Resources` and `%kernel.root_dir%` as - fallback directories. - * removed class `ExceptionListener`, use `ErrorListener` instead - -4.4.0 ------ - - * The `DebugHandlersListener` class has been marked as `final` - * Added new Bundle directory convention consistent with standard skeletons - * Deprecated the second and third argument of `KernelInterface::locateResource` - * Deprecated the second and third argument of `FileLocator::__construct` - * Deprecated loading resources from `%kernel.root_dir%/Resources` and `%kernel.root_dir%` as - fallback directories. Resources like service definitions are usually loaded relative to the - current directory or with a glob pattern. The fallback directories have never been advocated - so you likely do not use those in any app based on the SF Standard or Flex edition. - * Marked all dispatched event classes as `@final` - * Added `ErrorController` to enable the preview and error rendering mechanism - * Getting the container from a non-booted kernel is deprecated. - * Marked the `AjaxDataCollector`, `ConfigDataCollector`, `EventDataCollector`, - `ExceptionDataCollector`, `LoggerDataCollector`, `MemoryDataCollector`, - `RequestDataCollector` and `TimeDataCollector` classes as `@final`. - * Marked the `RouterDataCollector::collect()` method as `@final`. - * The `DataCollectorInterface::collect()` and `Profiler::collect()` methods third parameter signature - will be `\Throwable $exception = null` instead of `\Exception $exception = null` in Symfony 5.0. - * Deprecated methods `ExceptionEvent::get/setException()`, use `get/setThrowable()` instead - * Deprecated class `ExceptionListener`, use `ErrorListener` instead - -4.3.0 ------ - - * renamed `Client` to `HttpKernelBrowser` - * `KernelInterface` doesn't extend `Serializable` anymore - * deprecated the `Kernel::serialize()` and `unserialize()` methods - * increased the priority of `Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener` - * made `Symfony\Component\HttpKernel\EventListener\LocaleListener` set the default locale early - * deprecated `TranslatorListener` in favor of `LocaleAwareListener` - * added the registration of all `LocaleAwareInterface` implementations into the `LocaleAwareListener` - * made `FileLinkFormatter` final and not implement `Serializable` anymore - * the base `DataCollector` doesn't implement `Serializable` anymore, you should - store all the serialized state in the data property instead - * `DumpDataCollector` has been marked as `final` - * added an event listener to prevent search engines from indexing applications in debug mode. - * renamed `FilterControllerArgumentsEvent` to `ControllerArgumentsEvent` - * renamed `FilterControllerEvent` to `ControllerEvent` - * renamed `FilterResponseEvent` to `ResponseEvent` - * renamed `GetResponseEvent` to `RequestEvent` - * renamed `GetResponseForControllerResultEvent` to `ViewEvent` - * renamed `GetResponseForExceptionEvent` to `ExceptionEvent` - * renamed `PostResponseEvent` to `TerminateEvent` - * added `HttpClientKernel` for handling requests with an `HttpClientInterface` instance - * added `trace_header` and `trace_level` configuration options to `HttpCache` - -4.2.0 ------ - - * deprecated `KernelInterface::getRootDir()` and the `kernel.root_dir` parameter - * deprecated `KernelInterface::getName()` and the `kernel.name` parameter - * deprecated the first and second constructor argument of `ConfigDataCollector` - * deprecated `ConfigDataCollector::getApplicationName()` - * deprecated `ConfigDataCollector::getApplicationVersion()` - -4.1.0 ------ - - * added orphaned events support to `EventDataCollector` - * `ExceptionListener` now logs exceptions at priority `0` (previously logged at `-128`) - * Added support for using `service::method` to reference controllers, making it consistent with other cases. It is recommended over the `service:action` syntax with a single colon, which will be deprecated in the future. - * Added the ability to profile individual argument value resolvers via the - `Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver` - -4.0.0 ------ - - * removed the `DataCollector::varToString()` method, use `DataCollector::cloneVar()` - instead - * using the `DataCollector::cloneVar()` method requires the VarDumper component - * removed the `ValueExporter` class - * removed `ControllerResolverInterface::getArguments()` - * removed `TraceableControllerResolver::getArguments()` - * removed `ControllerResolver::getArguments()` and the ability to resolve arguments - * removed the `argument_resolver` service dependency from the `debug.controller_resolver` - * removed `LazyLoadingFragmentHandler::addRendererService()` - * removed `Psr6CacheClearer::addPool()` - * removed `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()` - * removed `Kernel::loadClassCache()`, `Kernel::doLoadClassCache()`, `Kernel::setClassCache()`, - and `Kernel::getEnvParameters()` - * support for the `X-Status-Code` when handling exceptions in the `HttpKernel` - has been dropped, use the `HttpKernel::allowCustomResponseCode()` method - instead - * removed convention-based commands registration - * removed the `ChainCacheClearer::add()` method - * removed the `CacheaWarmerAggregate::add()` and `setWarmers()` methods - * made `CacheWarmerAggregate` and `ChainCacheClearer` classes final - -3.4.0 ------ - - * added a minimalist PSR-3 `Logger` class that writes in `stderr` - * made kernels implementing `CompilerPassInterface` able to process the container - * deprecated bundle inheritance - * added `RebootableInterface` and implemented it in `Kernel` - * deprecated commands auto registration - * deprecated `EnvParametersResource` - * added `Symfony\Component\HttpKernel\Client::catchExceptions()` - * deprecated the `ChainCacheClearer::add()` method - * deprecated the `CacheaWarmerAggregate::add()` and `setWarmers()` methods - * made `CacheWarmerAggregate` and `ChainCacheClearer` classes final - * added the possibility to reset the profiler to its initial state - * deprecated data collectors without a `reset()` method - * deprecated implementing `DebugLoggerInterface` without a `clear()` method - -3.3.0 ------ - - * added `kernel.project_dir` and `Kernel::getProjectDir()` - * deprecated `kernel.root_dir` and `Kernel::getRootDir()` - * deprecated `Kernel::getEnvParameters()` - * deprecated the special `SYMFONY__` environment variables - * added the possibility to change the query string parameter used by `UriSigner` - * deprecated `LazyLoadingFragmentHandler::addRendererService()` - * deprecated `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()` - * deprecated `Psr6CacheClearer::addPool()` - -3.2.0 ------ - - * deprecated `DataCollector::varToString()`, use `cloneVar()` instead - * changed surrogate capability name in `AbstractSurrogate::addSurrogateCapability` to 'symfony' - * Added `ControllerArgumentValueResolverPass` - -3.1.0 ------ - * deprecated passing objects as URI attributes to the ESI and SSI renderers - * deprecated `ControllerResolver::getArguments()` - * added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` - * added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` as argument to `HttpKernel` - * added `Symfony\Component\HttpKernel\Controller\ArgumentResolver` - * added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getMethod()` - * added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getRedirect()` - * added the `kernel.controller_arguments` event, triggered after controller arguments have been resolved - -3.0.0 ------ - - * removed `Symfony\Component\HttpKernel\Kernel::init()` - * removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()` - * removed `Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher::setProfiler()` - * removed `Symfony\Component\HttpKernel\EventListener\FragmentListener::getLocalIpAddresses()` - * removed `Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()` - * removed `Symfony\Component\HttpKernel\EventListener\RouterListener::setRequest()` - * removed `Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest()` - * removed `Symfony\Component\HttpKernel\Fragment\FragmentHandler::setRequest()` - * removed `Symfony\Component\HttpKernel\HttpCache\Esi::hasSurrogateEsiCapability()` - * removed `Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateEsiCapability()` - * removed `Symfony\Component\HttpKernel\HttpCache\Esi::needsEsiParsing()` - * removed `Symfony\Component\HttpKernel\HttpCache\HttpCache::getEsi()` - * removed `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel` - * removed `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass` - * removed `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` - * removed `Symfony\Component\HttpKernel\EventListener\EsiListener` - * removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategy` - * removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategyInterface` - * removed `Symfony\Component\HttpKernel\Log\LoggerInterface` - * removed `Symfony\Component\HttpKernel\Log\NullLogger` - * removed `Symfony\Component\HttpKernel\Profiler::import()` - * removed `Symfony\Component\HttpKernel\Profiler::export()` - -2.8.0 ------ - - * deprecated `Profiler::import` and `Profiler::export` - -2.7.0 ------ - - * added the HTTP status code to profiles - -2.6.0 ------ - - * deprecated `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener`, use `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` instead - * deprecated unused method `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle` - -2.5.0 ------ - - * deprecated `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`, use `Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass` instead - -2.4.0 ------ - - * added event listeners for the session - * added the KernelEvents::FINISH_REQUEST event - -2.3.0 ------ - - * [BC BREAK] renamed `Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener` to `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` and changed its constructor - * deprecated `Symfony\Component\HttpKernel\Debug\ErrorHandler`, `Symfony\Component\HttpKernel\Debug\ExceptionHandler`, - `Symfony\Component\HttpKernel\Exception\FatalErrorException` and `Symfony\Component\HttpKernel\Exception\FlattenException` - * deprecated `Symfony\Component\HttpKernel\Kernel::init()` - * added the possibility to specify an id an extra attributes to hinclude tags - * added the collect of data if a controller is a Closure in the Request collector - * pass exceptions from the ExceptionListener to the logger using the logging context to allow for more - detailed messages - -2.2.0 ------ - - * [BC BREAK] the path info for sub-request is now always _fragment (or whatever you configured instead of the default) - * added Symfony\Component\HttpKernel\EventListener\FragmentListener - * added Symfony\Component\HttpKernel\UriSigner - * added Symfony\Component\HttpKernel\FragmentRenderer and rendering strategies (in Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface) - * added Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel - * added ControllerReference to create reference of Controllers (used in the FragmentRenderer class) - * [BC BREAK] renamed TimeDataCollector::getTotalTime() to - TimeDataCollector::getDuration() - * updated the MemoryDataCollector to include the memory used in the - kernel.terminate event listeners - * moved the Stopwatch classes to a new component - * added TraceableControllerResolver - * added TraceableEventDispatcher (removed ContainerAwareTraceableEventDispatcher) - * added support for WinCache opcode cache in ConfigDataCollector - -2.1.0 ------ - - * [BC BREAK] the charset is now configured via the Kernel::getCharset() method - * [BC BREAK] the current locale for the user is not stored anymore in the session - * added the HTTP method to the profiler storage - * updated all listeners to implement EventSubscriberInterface - * added TimeDataCollector - * added ContainerAwareTraceableEventDispatcher - * moved TraceableEventDispatcherInterface to the EventDispatcher component - * added RouterListener, LocaleListener, and StreamedResponseListener - * added CacheClearerInterface (and ChainCacheClearer) - * added a kernel.terminate event (via TerminableInterface and PostResponseEvent) - * added a Stopwatch class - * added WarmableInterface - * improved extensibility between bundles - * added profiler storages for Memcache(d), File-based, MongoDB, Redis - * moved Filesystem class to its own component diff --git a/lib/symfony/http-kernel/CacheClearer/CacheClearerInterface.php b/lib/symfony/http-kernel/CacheClearer/CacheClearerInterface.php deleted file mode 100644 index 270f690e5..000000000 --- a/lib/symfony/http-kernel/CacheClearer/CacheClearerInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheClearer; - -/** - * CacheClearerInterface. - * - * @author Dustin Dobervich - */ -interface CacheClearerInterface -{ - /** - * Clears any caches necessary. - */ - public function clear(string $cacheDir); -} diff --git a/lib/symfony/http-kernel/CacheClearer/ChainCacheClearer.php b/lib/symfony/http-kernel/CacheClearer/ChainCacheClearer.php deleted file mode 100644 index a875d899d..000000000 --- a/lib/symfony/http-kernel/CacheClearer/ChainCacheClearer.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheClearer; - -/** - * ChainCacheClearer. - * - * @author Dustin Dobervich - * - * @final - */ -class ChainCacheClearer implements CacheClearerInterface -{ - private $clearers; - - /** - * @param iterable $clearers - */ - public function __construct(iterable $clearers = []) - { - $this->clearers = $clearers; - } - - /** - * {@inheritdoc} - */ - public function clear(string $cacheDir) - { - foreach ($this->clearers as $clearer) { - $clearer->clear($cacheDir); - } - } -} diff --git a/lib/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php b/lib/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php deleted file mode 100644 index a074060e4..000000000 --- a/lib/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheClearer; - -use Psr\Cache\CacheItemPoolInterface; - -/** - * @author Nicolas Grekas - */ -class Psr6CacheClearer implements CacheClearerInterface -{ - private $pools = []; - - /** - * @param array $pools - */ - public function __construct(array $pools = []) - { - $this->pools = $pools; - } - - /** - * @return bool - */ - public function hasPool(string $name) - { - return isset($this->pools[$name]); - } - - /** - * @return CacheItemPoolInterface - * - * @throws \InvalidArgumentException If the cache pool with the given name does not exist - */ - public function getPool(string $name) - { - if (!$this->hasPool($name)) { - throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name)); - } - - return $this->pools[$name]; - } - - /** - * @return bool - * - * @throws \InvalidArgumentException If the cache pool with the given name does not exist - */ - public function clearPool(string $name) - { - if (!isset($this->pools[$name])) { - throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name)); - } - - return $this->pools[$name]->clear(); - } - - /** - * {@inheritdoc} - */ - public function clear(string $cacheDir) - { - foreach ($this->pools as $pool) { - $pool->clear(); - } - } -} diff --git a/lib/symfony/http-kernel/CacheWarmer/CacheWarmer.php b/lib/symfony/http-kernel/CacheWarmer/CacheWarmer.php deleted file mode 100644 index aef42d62f..000000000 --- a/lib/symfony/http-kernel/CacheWarmer/CacheWarmer.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Abstract cache warmer that knows how to write a file to the cache. - * - * @author Fabien Potencier - */ -abstract class CacheWarmer implements CacheWarmerInterface -{ - protected function writeCacheFile(string $file, $content) - { - $tmpFile = @tempnam(\dirname($file), basename($file)); - if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { - @chmod($file, 0666 & ~umask()); - - return; - } - - throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $file)); - } -} diff --git a/lib/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php b/lib/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php deleted file mode 100644 index 67f9ed50b..000000000 --- a/lib/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Aggregates several cache warmers into a single one. - * - * @author Fabien Potencier - * - * @final - */ -class CacheWarmerAggregate implements CacheWarmerInterface -{ - private $warmers; - private $debug; - private $deprecationLogsFilepath; - private $optionalsEnabled = false; - private $onlyOptionalsEnabled = false; - - /** - * @param iterable $warmers - */ - public function __construct(iterable $warmers = [], bool $debug = false, string $deprecationLogsFilepath = null) - { - $this->warmers = $warmers; - $this->debug = $debug; - $this->deprecationLogsFilepath = $deprecationLogsFilepath; - } - - public function enableOptionalWarmers() - { - $this->optionalsEnabled = true; - } - - public function enableOnlyOptionalWarmers() - { - $this->onlyOptionalsEnabled = $this->optionalsEnabled = true; - } - - /** - * {@inheritdoc} - */ - public function warmUp(string $cacheDir): array - { - if ($collectDeprecations = $this->debug && !\defined('PHPUNIT_COMPOSER_INSTALL')) { - $collectedLogs = []; - $previousHandler = set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { - if (\E_USER_DEPRECATED !== $type && \E_DEPRECATED !== $type) { - return $previousHandler ? $previousHandler($type, $message, $file, $line) : false; - } - - if (isset($collectedLogs[$message])) { - ++$collectedLogs[$message]['count']; - - return null; - } - - $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 3); - // Clean the trace by removing first frames added by the error handler itself. - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $backtrace = \array_slice($backtrace, 1 + $i); - break; - } - } - - $collectedLogs[$message] = [ - 'type' => $type, - 'message' => $message, - 'file' => $file, - 'line' => $line, - 'trace' => $backtrace, - 'count' => 1, - ]; - - return null; - }); - } - - $preload = []; - try { - foreach ($this->warmers as $warmer) { - if (!$this->optionalsEnabled && $warmer->isOptional()) { - continue; - } - if ($this->onlyOptionalsEnabled && !$warmer->isOptional()) { - continue; - } - - $preload[] = array_values((array) $warmer->warmUp($cacheDir)); - } - } finally { - if ($collectDeprecations) { - restore_error_handler(); - - if (is_file($this->deprecationLogsFilepath)) { - $previousLogs = unserialize(file_get_contents($this->deprecationLogsFilepath)); - if (\is_array($previousLogs)) { - $collectedLogs = array_merge($previousLogs, $collectedLogs); - } - } - - file_put_contents($this->deprecationLogsFilepath, serialize(array_values($collectedLogs))); - } - } - - return array_values(array_unique(array_merge([], ...$preload))); - } - - /** - * {@inheritdoc} - */ - public function isOptional(): bool - { - return false; - } -} diff --git a/lib/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php b/lib/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php deleted file mode 100644 index 1f1740b7e..000000000 --- a/lib/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Interface for classes able to warm up the cache. - * - * @author Fabien Potencier - */ -interface CacheWarmerInterface extends WarmableInterface -{ - /** - * Checks whether this warmer is optional or not. - * - * Optional warmers can be ignored on certain conditions. - * - * A warmer should return true if the cache can be - * generated incrementally and on-demand. - * - * @return bool - */ - public function isOptional(); -} diff --git a/lib/symfony/http-kernel/CacheWarmer/WarmableInterface.php b/lib/symfony/http-kernel/CacheWarmer/WarmableInterface.php deleted file mode 100644 index 2f442cb53..000000000 --- a/lib/symfony/http-kernel/CacheWarmer/WarmableInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Interface for classes that support warming their cache. - * - * @author Fabien Potencier - */ -interface WarmableInterface -{ - /** - * Warms up the cache. - * - * @return string[] A list of classes or files to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir); -} diff --git a/lib/symfony/http-kernel/Config/FileLocator.php b/lib/symfony/http-kernel/Config/FileLocator.php deleted file mode 100644 index 6eca98635..000000000 --- a/lib/symfony/http-kernel/Config/FileLocator.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Config; - -use Symfony\Component\Config\FileLocator as BaseFileLocator; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * FileLocator uses the KernelInterface to locate resources in bundles. - * - * @author Fabien Potencier - */ -class FileLocator extends BaseFileLocator -{ - private $kernel; - - public function __construct(KernelInterface $kernel) - { - $this->kernel = $kernel; - - parent::__construct(); - } - - /** - * {@inheritdoc} - */ - public function locate(string $file, string $currentPath = null, bool $first = true) - { - if (isset($file[0]) && '@' === $file[0]) { - $resource = $this->kernel->locateResource($file); - - return $first ? $resource : [$resource]; - } - - return parent::locate($file, $currentPath, $first); - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver.php deleted file mode 100644 index a54140b7e..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface; - -/** - * Responsible for resolving the arguments passed to an action. - * - * @author Iltar van der Berg - */ -final class ArgumentResolver implements ArgumentResolverInterface -{ - private $argumentMetadataFactory; - private $argumentValueResolvers; - - /** - * @param iterable $argumentValueResolvers - */ - public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = []) - { - $this->argumentMetadataFactory = $argumentMetadataFactory ?? new ArgumentMetadataFactory(); - $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); - } - - /** - * {@inheritdoc} - */ - public function getArguments(Request $request, callable $controller): array - { - $arguments = []; - - foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller) as $metadata) { - foreach ($this->argumentValueResolvers as $resolver) { - if (!$resolver->supports($request, $metadata)) { - continue; - } - - $resolved = $resolver->resolve($request, $metadata); - - $atLeastOne = false; - foreach ($resolved as $append) { - $atLeastOne = true; - $arguments[] = $append; - } - - if (!$atLeastOne) { - throw new \InvalidArgumentException(sprintf('"%s::resolve()" must yield at least one value.', get_debug_type($resolver))); - } - - // continue to the next controller argument - continue 2; - } - - $representative = $controller; - - if (\is_array($representative)) { - $representative = sprintf('%s::%s()', \get_class($representative[0]), $representative[1]); - } elseif (\is_object($representative)) { - $representative = \get_class($representative); - } - - throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.', $representative, $metadata->getName())); - } - - return $arguments; - } - - /** - * @return iterable - */ - public static function getDefaultArgumentValueResolvers(): iterable - { - return [ - new RequestAttributeValueResolver(), - new RequestValueResolver(), - new SessionValueResolver(), - new DefaultValueResolver(), - new VariadicValueResolver(), - ]; - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php deleted file mode 100644 index 32a0e071d..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields the default value defined in the action signature when no value has been given. - * - * @author Iltar van der Berg - */ -final class DefaultValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return $argument->hasDefaultValue() || (null !== $argument->getType() && $argument->isNullable() && !$argument->isVariadic()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $argument->hasDefaultValue() ? $argument->getDefaultValue() : null; - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php deleted file mode 100644 index 48ea6e742..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Provides an intuitive error message when controller fails because it is not registered as a service. - * - * @author Simeon Kolev - */ -final class NotTaggedControllerValueResolver implements ArgumentValueResolverInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - $controller = $request->attributes->get('_controller'); - - if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { - $controller = $controller[0].'::'.$controller[1]; - } elseif (!\is_string($controller) || '' === $controller) { - return false; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) { - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); - } - - return false === $this->container->has($controller); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - if (\is_array($controller = $request->attributes->get('_controller'))) { - $controller = $controller[0].'::'.$controller[1]; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller)) { - $controller = (false !== $i = strrpos($controller, ':')) - ? substr($controller, 0, $i).strtolower(substr($controller, $i)) - : $controller.'::__invoke'; - } - - $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); - $message = sprintf('Could not resolve %s, maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?', $what); - - throw new RuntimeException($message); - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php deleted file mode 100644 index c62d327b6..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields a non-variadic argument's value from the request attributes. - * - * @author Iltar van der Berg - */ -final class RequestAttributeValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return !$argument->isVariadic() && $request->attributes->has($argument->getName()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $request->attributes->get($argument->getName()); - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php deleted file mode 100644 index 75cbd97ed..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields the same instance as the request object passed along. - * - * @author Iltar van der Berg - */ -final class RequestValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $request; - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php deleted file mode 100644 index 4ffb8c99e..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields a service keyed by _controller and argument name. - * - * @author Nicolas Grekas - */ -final class ServiceValueResolver implements ArgumentValueResolverInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - $controller = $request->attributes->get('_controller'); - - if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { - $controller = $controller[0].'::'.$controller[1]; - } elseif (!\is_string($controller) || '' === $controller) { - return false; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) { - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); - } - - return $this->container->has($controller) && $this->container->get($controller)->has($argument->getName()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - if (\is_array($controller = $request->attributes->get('_controller'))) { - $controller = $controller[0].'::'.$controller[1]; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller)) { - $i = strrpos($controller, ':'); - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); - } - - try { - yield $this->container->get($controller)->get($argument->getName()); - } catch (RuntimeException $e) { - $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); - $message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage()); - - if ($e->getMessage() === $message) { - $message = sprintf('Cannot resolve %s: %s', $what, $message); - } - - $r = new \ReflectionProperty($e, 'message'); - $r->setAccessible(true); - $r->setValue($e, $message); - - throw $e; - } - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php deleted file mode 100644 index a1e6b4315..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields the Session. - * - * @author Iltar van der Berg - */ -final class SessionValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - if (!$request->hasSession()) { - return false; - } - - $type = $argument->getType(); - if (SessionInterface::class !== $type && !is_subclass_of($type, SessionInterface::class)) { - return false; - } - - return $request->getSession() instanceof $type; - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $request->getSession(); - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php deleted file mode 100644 index bde3c90c1..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * Provides timing information via the stopwatch. - * - * @author Iltar van der Berg - */ -final class TraceableValueResolver implements ArgumentValueResolverInterface -{ - private $inner; - private $stopwatch; - - public function __construct(ArgumentValueResolverInterface $inner, Stopwatch $stopwatch) - { - $this->inner = $inner; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - $method = \get_class($this->inner).'::'.__FUNCTION__; - $this->stopwatch->start($method, 'controller.argument_value_resolver'); - - $return = $this->inner->supports($request, $argument); - - $this->stopwatch->stop($method); - - return $return; - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - $method = \get_class($this->inner).'::'.__FUNCTION__; - $this->stopwatch->start($method, 'controller.argument_value_resolver'); - - yield from $this->inner->resolve($request, $argument); - - $this->stopwatch->stop($method); - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php b/lib/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php deleted file mode 100644 index a8f7e0f44..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields a variadic argument's values from the request attributes. - * - * @author Iltar van der Berg - */ -final class VariadicValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return $argument->isVariadic() && $request->attributes->has($argument->getName()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - $values = $request->attributes->get($argument->getName()); - - if (!\is_array($values)) { - throw new \InvalidArgumentException(sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), get_debug_type($values))); - } - - yield from $values; - } -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentResolverInterface.php b/lib/symfony/http-kernel/Controller/ArgumentResolverInterface.php deleted file mode 100644 index 30e4783e8..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentResolverInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; - -/** - * An ArgumentResolverInterface instance knows how to determine the - * arguments for a specific action. - * - * @author Fabien Potencier - */ -interface ArgumentResolverInterface -{ - /** - * Returns the arguments to pass to the controller. - * - * @return array - * - * @throws \RuntimeException When no value could be provided for a required argument - */ - public function getArguments(Request $request, callable $controller); -} diff --git a/lib/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php b/lib/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php deleted file mode 100644 index 1317707b1..000000000 --- a/lib/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Responsible for resolving the value of an argument based on its metadata. - * - * @author Iltar van der Berg - */ -interface ArgumentValueResolverInterface -{ - /** - * Whether this resolver can resolve the value for the given ArgumentMetadata. - * - * @return bool - */ - public function supports(Request $request, ArgumentMetadata $argument); - - /** - * Returns the possible value(s). - * - * @return iterable - */ - public function resolve(Request $request, ArgumentMetadata $argument); -} diff --git a/lib/symfony/http-kernel/Controller/ContainerControllerResolver.php b/lib/symfony/http-kernel/Controller/ContainerControllerResolver.php deleted file mode 100644 index 3b9468465..000000000 --- a/lib/symfony/http-kernel/Controller/ContainerControllerResolver.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Psr\Container\ContainerInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\DependencyInjection\Container; - -/** - * A controller resolver searching for a controller in a psr-11 container when using the "service::method" notation. - * - * @author Fabien Potencier - * @author Maxime Steinhausser - */ -class ContainerControllerResolver extends ControllerResolver -{ - protected $container; - - public function __construct(ContainerInterface $container, LoggerInterface $logger = null) - { - $this->container = $container; - - parent::__construct($logger); - } - - protected function createController(string $controller) - { - if (1 === substr_count($controller, ':')) { - $controller = str_replace(':', '::', $controller); - trigger_deprecation('symfony/http-kernel', '5.1', 'Referencing controllers with a single colon is deprecated. Use "%s" instead.', $controller); - } - - return parent::createController($controller); - } - - /** - * {@inheritdoc} - */ - protected function instantiateController(string $class) - { - $class = ltrim($class, '\\'); - - if ($this->container->has($class)) { - return $this->container->get($class); - } - - try { - return parent::instantiateController($class); - } catch (\Error $e) { - } - - $this->throwExceptionIfControllerWasRemoved($class, $e); - - if ($e instanceof \ArgumentCountError) { - throw new \InvalidArgumentException(sprintf('Controller "%s" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service?', $class), 0, $e); - } - - throw new \InvalidArgumentException(sprintf('Controller "%s" does neither exist as service nor as class.', $class), 0, $e); - } - - private function throwExceptionIfControllerWasRemoved(string $controller, \Throwable $previous) - { - if ($this->container instanceof Container && isset($this->container->getRemovedIds()[$controller])) { - throw new \InvalidArgumentException(sprintf('Controller "%s" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?', $controller), 0, $previous); - } - } -} diff --git a/lib/symfony/http-kernel/Controller/ControllerReference.php b/lib/symfony/http-kernel/Controller/ControllerReference.php deleted file mode 100644 index b4fdadd21..000000000 --- a/lib/symfony/http-kernel/Controller/ControllerReference.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; - -/** - * Acts as a marker and a data holder for a Controller. - * - * Some methods in Symfony accept both a URI (as a string) or a controller as - * an argument. In the latter case, instead of passing an array representing - * the controller, you can use an instance of this class. - * - * @author Fabien Potencier - * - * @see FragmentRendererInterface - */ -class ControllerReference -{ - public $controller; - public $attributes = []; - public $query = []; - - /** - * @param string $controller The controller name - * @param array $attributes An array of parameters to add to the Request attributes - * @param array $query An array of parameters to add to the Request query string - */ - public function __construct(string $controller, array $attributes = [], array $query = []) - { - $this->controller = $controller; - $this->attributes = $attributes; - $this->query = $query; - } -} diff --git a/lib/symfony/http-kernel/Controller/ControllerResolver.php b/lib/symfony/http-kernel/Controller/ControllerResolver.php deleted file mode 100644 index 8abbadd48..000000000 --- a/lib/symfony/http-kernel/Controller/ControllerResolver.php +++ /dev/null @@ -1,220 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; - -/** - * This implementation uses the '_controller' request attribute to determine - * the controller to execute. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class ControllerResolver implements ControllerResolverInterface -{ - private $logger; - - public function __construct(LoggerInterface $logger = null) - { - $this->logger = $logger; - } - - /** - * {@inheritdoc} - */ - public function getController(Request $request) - { - if (!$controller = $request->attributes->get('_controller')) { - if (null !== $this->logger) { - $this->logger->warning('Unable to look for the controller as the "_controller" parameter is missing.'); - } - - return false; - } - - if (\is_array($controller)) { - if (isset($controller[0]) && \is_string($controller[0]) && isset($controller[1])) { - try { - $controller[0] = $this->instantiateController($controller[0]); - } catch (\Error|\LogicException $e) { - try { - // We cannot just check is_callable but have to use reflection because a non-static method - // can still be called statically in PHP but we don't want that. This is deprecated in PHP 7, so we - // could simplify this with PHP 8. - if ((new \ReflectionMethod($controller[0], $controller[1]))->isStatic()) { - return $controller; - } - } catch (\ReflectionException $reflectionException) { - throw $e; - } - - throw $e; - } - } - - if (!\is_callable($controller)) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($controller)); - } - - return $controller; - } - - if (\is_object($controller)) { - if (!\is_callable($controller)) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($controller)); - } - - return $controller; - } - - if (\function_exists($controller)) { - return $controller; - } - - try { - $callable = $this->createController($controller); - } catch (\InvalidArgumentException $e) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e); - } - - if (!\is_callable($callable)) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($callable)); - } - - return $callable; - } - - /** - * Returns a callable for the given controller. - * - * @return callable - * - * @throws \InvalidArgumentException When the controller cannot be created - */ - protected function createController(string $controller) - { - if (!str_contains($controller, '::')) { - $controller = $this->instantiateController($controller); - - if (!\is_callable($controller)) { - throw new \InvalidArgumentException($this->getControllerError($controller)); - } - - return $controller; - } - - [$class, $method] = explode('::', $controller, 2); - - try { - $controller = [$this->instantiateController($class), $method]; - } catch (\Error|\LogicException $e) { - try { - if ((new \ReflectionMethod($class, $method))->isStatic()) { - return $class.'::'.$method; - } - } catch (\ReflectionException $reflectionException) { - throw $e; - } - - throw $e; - } - - if (!\is_callable($controller)) { - throw new \InvalidArgumentException($this->getControllerError($controller)); - } - - return $controller; - } - - /** - * Returns an instantiated controller. - * - * @return object - */ - protected function instantiateController(string $class) - { - return new $class(); - } - - private function getControllerError($callable): string - { - if (\is_string($callable)) { - if (str_contains($callable, '::')) { - $callable = explode('::', $callable, 2); - } else { - return sprintf('Function "%s" does not exist.', $callable); - } - } - - if (\is_object($callable)) { - $availableMethods = $this->getClassMethodsWithoutMagicMethods($callable); - $alternativeMsg = $availableMethods ? sprintf(' or use one of the available methods: "%s"', implode('", "', $availableMethods)) : ''; - - return sprintf('Controller class "%s" cannot be called without a method name. You need to implement "__invoke"%s.', get_debug_type($callable), $alternativeMsg); - } - - if (!\is_array($callable)) { - return sprintf('Invalid type for controller given, expected string, array or object, got "%s".', get_debug_type($callable)); - } - - if (!isset($callable[0]) || !isset($callable[1]) || 2 !== \count($callable)) { - return 'Invalid array callable, expected [controller, method].'; - } - - [$controller, $method] = $callable; - - if (\is_string($controller) && !class_exists($controller)) { - return sprintf('Class "%s" does not exist.', $controller); - } - - $className = \is_object($controller) ? get_debug_type($controller) : $controller; - - if (method_exists($controller, $method)) { - return sprintf('Method "%s" on class "%s" should be public and non-abstract.', $method, $className); - } - - $collection = $this->getClassMethodsWithoutMagicMethods($controller); - - $alternatives = []; - - foreach ($collection as $item) { - $lev = levenshtein($method, $item); - - if ($lev <= \strlen($method) / 3 || str_contains($item, $method)) { - $alternatives[] = $item; - } - } - - asort($alternatives); - - $message = sprintf('Expected method "%s" on class "%s"', $method, $className); - - if (\count($alternatives) > 0) { - $message .= sprintf(', did you mean "%s"?', implode('", "', $alternatives)); - } else { - $message .= sprintf('. Available methods: "%s".', implode('", "', $collection)); - } - - return $message; - } - - private function getClassMethodsWithoutMagicMethods($classOrObject): array - { - $methods = get_class_methods($classOrObject); - - return array_filter($methods, function (string $method) { - return 0 !== strncmp($method, '__', 2); - }); - } -} diff --git a/lib/symfony/http-kernel/Controller/ControllerResolverInterface.php b/lib/symfony/http-kernel/Controller/ControllerResolverInterface.php deleted file mode 100644 index 8b70a88f6..000000000 --- a/lib/symfony/http-kernel/Controller/ControllerResolverInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; - -/** - * A ControllerResolverInterface implementation knows how to determine the - * controller to execute based on a Request object. - * - * A Controller can be any valid PHP callable. - * - * @author Fabien Potencier - */ -interface ControllerResolverInterface -{ - /** - * Returns the Controller instance associated with a Request. - * - * As several resolvers can exist for a single application, a resolver must - * return false when it is not able to determine the controller. - * - * The resolver must only throw an exception when it should be able to load a - * controller but cannot because of some errors made by the developer. - * - * @return callable|false A PHP callable representing the Controller, - * or false if this resolver is not able to determine the controller - * - * @throws \LogicException If a controller was found based on the request but it is not callable - */ - public function getController(Request $request); -} diff --git a/lib/symfony/http-kernel/Controller/ErrorController.php b/lib/symfony/http-kernel/Controller/ErrorController.php deleted file mode 100644 index b6c440103..000000000 --- a/lib/symfony/http-kernel/Controller/ErrorController.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Renders error or exception pages from a given FlattenException. - * - * @author Yonel Ceruto - * @author Matthias Pigulla - */ -class ErrorController -{ - private $kernel; - private $controller; - private $errorRenderer; - - public function __construct(HttpKernelInterface $kernel, $controller, ErrorRendererInterface $errorRenderer) - { - $this->kernel = $kernel; - $this->controller = $controller; - $this->errorRenderer = $errorRenderer; - } - - public function __invoke(\Throwable $exception): Response - { - $exception = $this->errorRenderer->render($exception); - - return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders()); - } - - public function preview(Request $request, int $code): Response - { - /* - * This Request mimics the parameters set by - * \Symfony\Component\HttpKernel\EventListener\ErrorListener::duplicateRequest, with - * the additional "showException" flag. - */ - $subRequest = $request->duplicate(null, null, [ - '_controller' => $this->controller, - 'exception' => new HttpException($code, 'This is a sample exception.'), - 'logger' => null, - 'showException' => false, - ]); - - return $this->kernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); - } -} diff --git a/lib/symfony/http-kernel/Controller/TraceableArgumentResolver.php b/lib/symfony/http-kernel/Controller/TraceableArgumentResolver.php deleted file mode 100644 index e22cf082c..000000000 --- a/lib/symfony/http-kernel/Controller/TraceableArgumentResolver.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * @author Fabien Potencier - */ -class TraceableArgumentResolver implements ArgumentResolverInterface -{ - private $resolver; - private $stopwatch; - - public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stopwatch) - { - $this->resolver = $resolver; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function getArguments(Request $request, callable $controller) - { - $e = $this->stopwatch->start('controller.get_arguments'); - - $ret = $this->resolver->getArguments($request, $controller); - - $e->stop(); - - return $ret; - } -} diff --git a/lib/symfony/http-kernel/Controller/TraceableControllerResolver.php b/lib/symfony/http-kernel/Controller/TraceableControllerResolver.php deleted file mode 100644 index bf6b6aa1f..000000000 --- a/lib/symfony/http-kernel/Controller/TraceableControllerResolver.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * @author Fabien Potencier - */ -class TraceableControllerResolver implements ControllerResolverInterface -{ - private $resolver; - private $stopwatch; - - public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch) - { - $this->resolver = $resolver; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function getController(Request $request) - { - $e = $this->stopwatch->start('controller.get_callable'); - - $ret = $this->resolver->getController($request); - - $e->stop(); - - return $ret; - } -} diff --git a/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php b/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php deleted file mode 100644 index 1a9ebc0c3..000000000 --- a/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\ControllerMetadata; - -use Symfony\Component\HttpKernel\Attribute\ArgumentInterface; - -/** - * Responsible for storing metadata of an argument. - * - * @author Iltar van der Berg - */ -class ArgumentMetadata -{ - public const IS_INSTANCEOF = 2; - - private $name; - private $type; - private $isVariadic; - private $hasDefaultValue; - private $defaultValue; - private $isNullable; - private $attributes; - - /** - * @param object[] $attributes - */ - public function __construct(string $name, ?string $type, bool $isVariadic, bool $hasDefaultValue, $defaultValue, bool $isNullable = false, $attributes = []) - { - $this->name = $name; - $this->type = $type; - $this->isVariadic = $isVariadic; - $this->hasDefaultValue = $hasDefaultValue; - $this->defaultValue = $defaultValue; - $this->isNullable = $isNullable || null === $type || ($hasDefaultValue && null === $defaultValue); - - if (null === $attributes || $attributes instanceof ArgumentInterface) { - trigger_deprecation('symfony/http-kernel', '5.3', 'The "%s" constructor expects an array of PHP attributes as last argument, %s given.', __CLASS__, get_debug_type($attributes)); - $attributes = $attributes ? [$attributes] : []; - } - - $this->attributes = $attributes; - } - - /** - * Returns the name as given in PHP, $foo would yield "foo". - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Returns the type of the argument. - * - * The type is the PHP class in 5.5+ and additionally the basic type in PHP 7.0+. - * - * @return string|null - */ - public function getType() - { - return $this->type; - } - - /** - * Returns whether the argument is defined as "...$variadic". - * - * @return bool - */ - public function isVariadic() - { - return $this->isVariadic; - } - - /** - * Returns whether the argument has a default value. - * - * Implies whether an argument is optional. - * - * @return bool - */ - public function hasDefaultValue() - { - return $this->hasDefaultValue; - } - - /** - * Returns whether the argument accepts null values. - * - * @return bool - */ - public function isNullable() - { - return $this->isNullable; - } - - /** - * Returns the default value of the argument. - * - * @throws \LogicException if no default value is present; {@see self::hasDefaultValue()} - * - * @return mixed - */ - public function getDefaultValue() - { - if (!$this->hasDefaultValue) { - throw new \LogicException(sprintf('Argument $%s does not have a default value. Use "%s::hasDefaultValue()" to avoid this exception.', $this->name, __CLASS__)); - } - - return $this->defaultValue; - } - - /** - * Returns the attribute (if any) that was set on the argument. - */ - public function getAttribute(): ?ArgumentInterface - { - trigger_deprecation('symfony/http-kernel', '5.3', 'Method "%s()" is deprecated, use "getAttributes()" instead.', __METHOD__); - - if (!$this->attributes) { - return null; - } - - return $this->attributes[0] instanceof ArgumentInterface ? $this->attributes[0] : null; - } - - /** - * @return object[] - */ - public function getAttributes(string $name = null, int $flags = 0): array - { - if (!$name) { - return $this->attributes; - } - - $attributes = []; - if ($flags & self::IS_INSTANCEOF) { - foreach ($this->attributes as $attribute) { - if ($attribute instanceof $name) { - $attributes[] = $attribute; - } - } - } else { - foreach ($this->attributes as $attribute) { - if (\get_class($attribute) === $name) { - $attributes[] = $attribute; - } - } - } - - return $attributes; - } -} diff --git a/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php b/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php deleted file mode 100644 index 85bb805f3..000000000 --- a/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\ControllerMetadata; - -/** - * Builds {@see ArgumentMetadata} objects based on the given Controller. - * - * @author Iltar van der Berg - */ -final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface -{ - /** - * {@inheritdoc} - */ - public function createArgumentMetadata($controller): array - { - $arguments = []; - - if (\is_array($controller)) { - $reflection = new \ReflectionMethod($controller[0], $controller[1]); - $class = $reflection->class; - } elseif (\is_object($controller) && !$controller instanceof \Closure) { - $reflection = new \ReflectionMethod($controller, '__invoke'); - $class = $reflection->class; - } else { - $reflection = new \ReflectionFunction($controller); - if ($class = str_contains($reflection->name, '{closure}') ? null : (\PHP_VERSION_ID >= 80111 ? $reflection->getClosureCalledClass() : $reflection->getClosureScopeClass())) { - $class = $class->name; - } - } - - foreach ($reflection->getParameters() as $param) { - $attributes = []; - if (\PHP_VERSION_ID >= 80000) { - foreach ($param->getAttributes() as $reflectionAttribute) { - if (class_exists($reflectionAttribute->getName())) { - $attributes[] = $reflectionAttribute->newInstance(); - } - } - } - - $arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param, $class), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull(), $attributes); - } - - return $arguments; - } - - /** - * Returns an associated type to the given parameter if available. - */ - private function getType(\ReflectionParameter $parameter, ?string $class): ?string - { - if (!$type = $parameter->getType()) { - return null; - } - $name = $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type; - - if (null !== $class) { - switch (strtolower($name)) { - case 'self': - return $class; - case 'parent': - return get_parent_class($class) ?: null; - } - } - - return $name; - } -} diff --git a/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php b/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php deleted file mode 100644 index a34befc22..000000000 --- a/lib/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\ControllerMetadata; - -/** - * Builds method argument data. - * - * @author Iltar van der Berg - */ -interface ArgumentMetadataFactoryInterface -{ - /** - * @param string|object|array $controller The controller to resolve the arguments for - * - * @return ArgumentMetadata[] - */ - public function createArgumentMetadata($controller); -} diff --git a/lib/symfony/http-kernel/DataCollector/AjaxDataCollector.php b/lib/symfony/http-kernel/DataCollector/AjaxDataCollector.php deleted file mode 100644 index fda6a4eaa..000000000 --- a/lib/symfony/http-kernel/DataCollector/AjaxDataCollector.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * @author Bart van den Burg - * - * @final - */ -class AjaxDataCollector extends DataCollector -{ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - // all collecting is done client side - } - - public function reset() - { - // all collecting is done client side - } - - public function getName(): string - { - return 'ajax'; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/ConfigDataCollector.php b/lib/symfony/http-kernel/DataCollector/ConfigDataCollector.php deleted file mode 100644 index 9819507aa..000000000 --- a/lib/symfony/http-kernel/DataCollector/ConfigDataCollector.php +++ /dev/null @@ -1,275 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * @author Fabien Potencier - * - * @final - */ -class ConfigDataCollector extends DataCollector implements LateDataCollectorInterface -{ - /** - * @var KernelInterface - */ - private $kernel; - - /** - * Sets the Kernel associated with this Request. - */ - public function setKernel(KernelInterface $kernel = null) - { - $this->kernel = $kernel; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE); - $eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE); - - $this->data = [ - 'token' => $response->headers->get('X-Debug-Token'), - 'symfony_version' => Kernel::VERSION, - 'symfony_minor_version' => sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), - 'symfony_lts' => 4 === Kernel::MINOR_VERSION, - 'symfony_state' => $this->determineSymfonyState(), - 'symfony_eom' => $eom->format('F Y'), - 'symfony_eol' => $eol->format('F Y'), - 'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a', - 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', - 'php_version' => \PHP_VERSION, - 'php_architecture' => \PHP_INT_SIZE * 8, - 'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', - 'php_timezone' => date_default_timezone_get(), - 'xdebug_enabled' => \extension_loaded('xdebug'), - 'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), - 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), - 'bundles' => [], - 'sapi_name' => \PHP_SAPI, - ]; - - if (isset($this->kernel)) { - foreach ($this->kernel->getBundles() as $name => $bundle) { - $this->data['bundles'][$name] = new ClassStub(\get_class($bundle)); - } - } - - if (preg_match('~^(\d+(?:\.\d+)*)(.+)?$~', $this->data['php_version'], $matches) && isset($matches[2])) { - $this->data['php_version'] = $matches[1]; - $this->data['php_version_extra'] = $matches[2]; - } - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - } - - public function lateCollect() - { - $this->data = $this->cloneVar($this->data); - } - - /** - * Gets the token. - */ - public function getToken(): ?string - { - return $this->data['token']; - } - - /** - * Gets the Symfony version. - */ - public function getSymfonyVersion(): string - { - return $this->data['symfony_version']; - } - - /** - * Returns the state of the current Symfony release. - * - * @return string One of: unknown, dev, stable, eom, eol - */ - public function getSymfonyState(): string - { - return $this->data['symfony_state']; - } - - /** - * Returns the minor Symfony version used (without patch numbers of extra - * suffix like "RC", "beta", etc.). - */ - public function getSymfonyMinorVersion(): string - { - return $this->data['symfony_minor_version']; - } - - /** - * Returns if the current Symfony version is a Long-Term Support one. - */ - public function isSymfonyLts(): bool - { - return $this->data['symfony_lts']; - } - - /** - * Returns the human readable date when this Symfony version ends its - * maintenance period. - */ - public function getSymfonyEom(): string - { - return $this->data['symfony_eom']; - } - - /** - * Returns the human readable date when this Symfony version reaches its - * "end of life" and won't receive bugs or security fixes. - */ - public function getSymfonyEol(): string - { - return $this->data['symfony_eol']; - } - - /** - * Gets the PHP version. - */ - public function getPhpVersion(): string - { - return $this->data['php_version']; - } - - /** - * Gets the PHP version extra part. - */ - public function getPhpVersionExtra(): ?string - { - return $this->data['php_version_extra'] ?? null; - } - - /** - * @return int The PHP architecture as number of bits (e.g. 32 or 64) - */ - public function getPhpArchitecture(): int - { - return $this->data['php_architecture']; - } - - public function getPhpIntlLocale(): string - { - return $this->data['php_intl_locale']; - } - - public function getPhpTimezone(): string - { - return $this->data['php_timezone']; - } - - /** - * Gets the environment. - */ - public function getEnv(): string - { - return $this->data['env']; - } - - /** - * Returns true if the debug is enabled. - * - * @return bool|string true if debug is enabled, false otherwise or a string if no kernel was set - */ - public function isDebug() - { - return $this->data['debug']; - } - - /** - * Returns true if the XDebug is enabled. - */ - public function hasXDebug(): bool - { - return $this->data['xdebug_enabled']; - } - - /** - * Returns true if APCu is enabled. - */ - public function hasApcu(): bool - { - return $this->data['apcu_enabled']; - } - - /** - * Returns true if Zend OPcache is enabled. - */ - public function hasZendOpcache(): bool - { - return $this->data['zend_opcache_enabled']; - } - - public function getBundles() - { - return $this->data['bundles']; - } - - /** - * Gets the PHP SAPI name. - */ - public function getSapiName(): string - { - return $this->data['sapi_name']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'config'; - } - - /** - * Tries to retrieve information about the current Symfony version. - * - * @return string One of: dev, stable, eom, eol - */ - private function determineSymfonyState(): string - { - $now = new \DateTime(); - $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE)->modify('last day of this month'); - $eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE)->modify('last day of this month'); - - if ($now > $eol) { - $versionState = 'eol'; - } elseif ($now > $eom) { - $versionState = 'eom'; - } elseif ('' !== Kernel::EXTRA_VERSION) { - $versionState = 'dev'; - } else { - $versionState = 'stable'; - } - - return $versionState; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/DataCollector.php b/lib/symfony/http-kernel/DataCollector/DataCollector.php deleted file mode 100644 index ccaf66da0..000000000 --- a/lib/symfony/http-kernel/DataCollector/DataCollector.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\VarDumper\Caster\CutStub; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * DataCollector. - * - * Children of this class must store the collected data in the data property. - * - * @author Fabien Potencier - * @author Bernhard Schussek - */ -abstract class DataCollector implements DataCollectorInterface -{ - /** - * @var array|Data - */ - protected $data = []; - - /** - * @var ClonerInterface - */ - private $cloner; - - /** - * Converts the variable into a serializable Data instance. - * - * This array can be displayed in the template using - * the VarDumper component. - * - * @param mixed $var - * - * @return Data - */ - protected function cloneVar($var) - { - if ($var instanceof Data) { - return $var; - } - if (null === $this->cloner) { - $this->cloner = new VarCloner(); - $this->cloner->setMaxItems(-1); - $this->cloner->addCasters($this->getCasters()); - } - - return $this->cloner->cloneVar($var); - } - - /** - * @return callable[] The casters to add to the cloner - */ - protected function getCasters() - { - $casters = [ - '*' => function ($v, array $a, Stub $s, $isNested) { - if (!$v instanceof Stub) { - foreach ($a as $k => $v) { - if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) { - $a[$k] = new CutStub($v); - } - } - } - - return $a; - }, - ] + ReflectionCaster::UNSET_CLOSURE_FILE_INFO; - - return $casters; - } - - /** - * @return array - */ - public function __sleep() - { - return ['data']; - } - - public function __wakeup() - { - } - - /** - * @internal to prevent implementing \Serializable - */ - final protected function serialize() - { - } - - /** - * @internal to prevent implementing \Serializable - */ - final protected function unserialize($data) - { - } -} diff --git a/lib/symfony/http-kernel/DataCollector/DataCollectorInterface.php b/lib/symfony/http-kernel/DataCollector/DataCollectorInterface.php deleted file mode 100644 index 1cb865fd6..000000000 --- a/lib/symfony/http-kernel/DataCollector/DataCollectorInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Contracts\Service\ResetInterface; - -/** - * DataCollectorInterface. - * - * @author Fabien Potencier - */ -interface DataCollectorInterface extends ResetInterface -{ - /** - * Collects data for the given Request and Response. - */ - public function collect(Request $request, Response $response, \Throwable $exception = null); - - /** - * Returns the name of the collector. - * - * @return string - */ - public function getName(); -} diff --git a/lib/symfony/http-kernel/DataCollector/DumpDataCollector.php b/lib/symfony/http-kernel/DataCollector/DumpDataCollector.php deleted file mode 100644 index 08026e562..000000000 --- a/lib/symfony/http-kernel/DataCollector/DumpDataCollector.php +++ /dev/null @@ -1,292 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; -use Symfony\Component\VarDumper\Dumper\DataDumperInterface; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Server\Connection; - -/** - * @author Nicolas Grekas - * - * @final - */ -class DumpDataCollector extends DataCollector implements DataDumperInterface -{ - private $stopwatch; - private $fileLinkFormat; - private $dataCount = 0; - private $isCollected = true; - private $clonesCount = 0; - private $clonesIndex = 0; - private $rootRefs; - private $charset; - private $requestStack; - private $dumper; - private $sourceContextProvider; - - /** - * @param string|FileLinkFormatter|null $fileLinkFormat - * @param DataDumperInterface|Connection|null $dumper - */ - public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, string $charset = null, RequestStack $requestStack = null, $dumper = null) - { - $fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->stopwatch = $stopwatch; - $this->fileLinkFormat = $fileLinkFormat instanceof FileLinkFormatter && false === $fileLinkFormat->format('', 0) ? false : $fileLinkFormat; - $this->charset = $charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8'; - $this->requestStack = $requestStack; - $this->dumper = $dumper; - - // All clones share these properties by reference: - $this->rootRefs = [ - &$this->data, - &$this->dataCount, - &$this->isCollected, - &$this->clonesCount, - ]; - - $this->sourceContextProvider = $dumper instanceof Connection && isset($dumper->getContextProviders()['source']) ? $dumper->getContextProviders()['source'] : new SourceContextProvider($this->charset); - } - - public function __clone() - { - $this->clonesIndex = ++$this->clonesCount; - } - - public function dump(Data $data) - { - if ($this->stopwatch) { - $this->stopwatch->start('dump'); - } - - ['name' => $name, 'file' => $file, 'line' => $line, 'file_excerpt' => $fileExcerpt] = $this->sourceContextProvider->getContext(); - - if ($this->dumper instanceof Connection) { - if (!$this->dumper->write($data)) { - $this->isCollected = false; - } - } elseif ($this->dumper) { - $this->doDump($this->dumper, $data, $name, $file, $line); - } else { - $this->isCollected = false; - } - - if (!$this->dataCount) { - $this->data = []; - } - $this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt'); - ++$this->dataCount; - - if ($this->stopwatch) { - $this->stopwatch->stop('dump'); - } - } - - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (!$this->dataCount) { - $this->data = []; - } - - // Sub-requests and programmatic calls stay in the collected profile. - if ($this->dumper || ($this->requestStack && $this->requestStack->getMainRequest() !== $request) || $request->isXmlHttpRequest() || $request->headers->has('Origin')) { - return; - } - - // In all other conditions that remove the web debug toolbar, dumps are written on the output. - if (!$this->requestStack - || !$response->headers->has('X-Debug-Token') - || $response->isRedirection() - || ($response->headers->has('Content-Type') && !str_contains($response->headers->get('Content-Type'), 'html')) - || 'html' !== $request->getRequestFormat() - || false === strripos($response->getContent(), '') - ) { - if ($response->headers->has('Content-Type') && str_contains($response->headers->get('Content-Type'), 'html')) { - $dumper = new HtmlDumper('php://output', $this->charset); - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } else { - $dumper = new CliDumper('php://output', $this->charset); - if (method_exists($dumper, 'setDisplayOptions')) { - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } - } - - foreach ($this->data as $dump) { - $this->doDump($dumper, $dump['data'], $dump['name'], $dump['file'], $dump['line']); - } - } - } - - public function reset() - { - if ($this->stopwatch) { - $this->stopwatch->reset(); - } - $this->data = []; - $this->dataCount = 0; - $this->isCollected = true; - $this->clonesCount = 0; - $this->clonesIndex = 0; - } - - /** - * @internal - */ - public function __sleep(): array - { - if (!$this->dataCount) { - $this->data = []; - } - - if ($this->clonesCount !== $this->clonesIndex) { - return []; - } - - $this->data[] = $this->fileLinkFormat; - $this->data[] = $this->charset; - $this->dataCount = 0; - $this->isCollected = true; - - return parent::__sleep(); - } - - /** - * @internal - */ - public function __wakeup() - { - parent::__wakeup(); - - $charset = array_pop($this->data); - $fileLinkFormat = array_pop($this->data); - $this->dataCount = \count($this->data); - foreach ($this->data as $dump) { - if (!\is_string($dump['name']) || !\is_string($dump['file']) || !\is_int($dump['line'])) { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - } - - self::__construct($this->stopwatch, \is_string($fileLinkFormat) || $fileLinkFormat instanceof FileLinkFormatter ? $fileLinkFormat : null, \is_string($charset) ? $charset : null); - } - - public function getDumpsCount(): int - { - return $this->dataCount; - } - - public function getDumps(string $format, int $maxDepthLimit = -1, int $maxItemsPerDepth = -1): array - { - $data = fopen('php://memory', 'r+'); - - if ('html' === $format) { - $dumper = new HtmlDumper($data, $this->charset); - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } else { - throw new \InvalidArgumentException(sprintf('Invalid dump format: "%s".', $format)); - } - $dumps = []; - - if (!$this->dataCount) { - return $this->data = []; - } - - foreach ($this->data as $dump) { - $dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth)); - $dump['data'] = stream_get_contents($data, -1, 0); - ftruncate($data, 0); - rewind($data); - $dumps[] = $dump; - } - - return $dumps; - } - - public function getName(): string - { - return 'dump'; - } - - public function __destruct() - { - if (0 === $this->clonesCount-- && !$this->isCollected && $this->dataCount) { - $this->clonesCount = 0; - $this->isCollected = true; - - $h = headers_list(); - $i = \count($h); - array_unshift($h, 'Content-Type: '.\ini_get('default_mimetype')); - while (0 !== stripos($h[$i], 'Content-Type:')) { - --$i; - } - - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && stripos($h[$i], 'html')) { - $dumper = new HtmlDumper('php://output', $this->charset); - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } else { - $dumper = new CliDumper('php://output', $this->charset); - if (method_exists($dumper, 'setDisplayOptions')) { - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } - } - - foreach ($this->data as $i => $dump) { - $this->data[$i] = null; - $this->doDump($dumper, $dump['data'], $dump['name'], $dump['file'], $dump['line']); - } - - $this->data = []; - $this->dataCount = 0; - } - } - - private function doDump(DataDumperInterface $dumper, Data $data, string $name, string $file, int $line) - { - if ($dumper instanceof CliDumper) { - $contextDumper = function ($name, $file, $line, $fmt) { - if ($this instanceof HtmlDumper) { - if ($file) { - $s = $this->style('meta', '%s'); - $f = strip_tags($this->style('', $file)); - $name = strip_tags($this->style('', $name)); - if ($fmt && $link = \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line)) { - $name = sprintf(''.$s.'', strip_tags($this->style('', $link)), $f, $name); - } else { - $name = sprintf(''.$s.'', $f, $name); - } - } else { - $name = $this->style('meta', $name); - } - $this->line = $name.' on line '.$this->style('meta', $line).':'; - } else { - $this->line = $this->style('meta', $name).' on line '.$this->style('meta', $line).':'; - } - $this->dumpLine(0); - }; - $contextDumper = $contextDumper->bindTo($dumper, $dumper); - $contextDumper($name, $file, $line, $this->fileLinkFormat); - } else { - $cloner = new VarCloner(); - $dumper->dump($cloner->cloneVar($name.' on line '.$line.':')); - } - $dumper->dump($data); - } -} diff --git a/lib/symfony/http-kernel/DataCollector/EventDataCollector.php b/lib/symfony/http-kernel/DataCollector/EventDataCollector.php deleted file mode 100644 index a81355336..000000000 --- a/lib/symfony/http-kernel/DataCollector/EventDataCollector.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Fabien Potencier - * - * @final - */ -class EventDataCollector extends DataCollector implements LateDataCollectorInterface -{ - protected $dispatcher; - private $requestStack; - private $currentRequest; - - public function __construct(EventDispatcherInterface $dispatcher = null, RequestStack $requestStack = null) - { - $this->dispatcher = $dispatcher; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; - $this->data = [ - 'called_listeners' => [], - 'not_called_listeners' => [], - 'orphaned_events' => [], - ]; - } - - public function reset() - { - $this->data = []; - - if ($this->dispatcher instanceof ResetInterface) { - $this->dispatcher->reset(); - } - } - - public function lateCollect() - { - if ($this->dispatcher instanceof TraceableEventDispatcher) { - $this->setCalledListeners($this->dispatcher->getCalledListeners($this->currentRequest)); - $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners($this->currentRequest)); - $this->setOrphanedEvents($this->dispatcher->getOrphanedEvents($this->currentRequest)); - } - - $this->data = $this->cloneVar($this->data); - } - - /** - * @param array $listeners An array of called listeners - * - * @see TraceableEventDispatcher - */ - public function setCalledListeners(array $listeners) - { - $this->data['called_listeners'] = $listeners; - } - - /** - * @see TraceableEventDispatcher - * - * @return array|Data - */ - public function getCalledListeners() - { - return $this->data['called_listeners']; - } - - /** - * @see TraceableEventDispatcher - */ - public function setNotCalledListeners(array $listeners) - { - $this->data['not_called_listeners'] = $listeners; - } - - /** - * @see TraceableEventDispatcher - * - * @return array|Data - */ - public function getNotCalledListeners() - { - return $this->data['not_called_listeners']; - } - - /** - * @param array $events An array of orphaned events - * - * @see TraceableEventDispatcher - */ - public function setOrphanedEvents(array $events) - { - $this->data['orphaned_events'] = $events; - } - - /** - * @see TraceableEventDispatcher - * - * @return array|Data - */ - public function getOrphanedEvents() - { - return $this->data['orphaned_events']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'events'; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/ExceptionDataCollector.php b/lib/symfony/http-kernel/DataCollector/ExceptionDataCollector.php deleted file mode 100644 index 14bbbb364..000000000 --- a/lib/symfony/http-kernel/DataCollector/ExceptionDataCollector.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * @author Fabien Potencier - * - * @final - */ -class ExceptionDataCollector extends DataCollector -{ - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (null !== $exception) { - $this->data = [ - 'exception' => FlattenException::createFromThrowable($exception), - ]; - } - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - } - - public function hasException(): bool - { - return isset($this->data['exception']); - } - - /** - * @return \Exception|FlattenException - */ - public function getException() - { - return $this->data['exception']; - } - - public function getMessage(): string - { - return $this->data['exception']->getMessage(); - } - - public function getCode(): int - { - return $this->data['exception']->getCode(); - } - - public function getStatusCode(): int - { - return $this->data['exception']->getStatusCode(); - } - - public function getTrace(): array - { - return $this->data['exception']->getTrace(); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'exception'; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php b/lib/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php deleted file mode 100644 index 012332de4..000000000 --- a/lib/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -/** - * LateDataCollectorInterface. - * - * @author Fabien Potencier - */ -interface LateDataCollectorInterface -{ - /** - * Collects data as late as possible. - */ - public function lateCollect(); -} diff --git a/lib/symfony/http-kernel/DataCollector/LoggerDataCollector.php b/lib/symfony/http-kernel/DataCollector/LoggerDataCollector.php deleted file mode 100644 index 2bbd2a039..000000000 --- a/lib/symfony/http-kernel/DataCollector/LoggerDataCollector.php +++ /dev/null @@ -1,358 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; - -/** - * @author Fabien Potencier - * - * @final - */ -class LoggerDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $logger; - private $containerPathPrefix; - private $currentRequest; - private $requestStack; - private $processedLogs; - - public function __construct(object $logger = null, string $containerPathPrefix = null, RequestStack $requestStack = null) - { - if (null !== $logger && $logger instanceof DebugLoggerInterface) { - $this->logger = $logger; - } - - $this->containerPathPrefix = $containerPathPrefix; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->logger instanceof DebugLoggerInterface) { - $this->logger->clear(); - } - $this->data = []; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - if (null !== $this->logger) { - $containerDeprecationLogs = $this->getContainerDeprecationLogs(); - $this->data = $this->computeErrorsCount($containerDeprecationLogs); - // get compiler logs later (only when they are needed) to improve performance - $this->data['compiler_logs'] = []; - $this->data['compiler_logs_filepath'] = $this->containerPathPrefix.'Compiler.log'; - $this->data['logs'] = $this->sanitizeLogs(array_merge($this->logger->getLogs($this->currentRequest), $containerDeprecationLogs)); - $this->data = $this->cloneVar($this->data); - } - $this->currentRequest = null; - } - - public function getLogs() - { - return $this->data['logs'] ?? []; - } - - public function getProcessedLogs() - { - if (null !== $this->processedLogs) { - return $this->processedLogs; - } - - $rawLogs = $this->getLogs(); - if ([] === $rawLogs) { - return $this->processedLogs = $rawLogs; - } - - $logs = []; - foreach ($this->getLogs()->getValue() as $rawLog) { - $rawLogData = $rawLog->getValue(); - - if ($rawLogData['priority']->getValue() > 300) { - $logType = 'error'; - } elseif (isset($rawLogData['scream']) && false === $rawLogData['scream']->getValue()) { - $logType = 'deprecation'; - } elseif (isset($rawLogData['scream']) && true === $rawLogData['scream']->getValue()) { - $logType = 'silenced'; - } else { - $logType = 'regular'; - } - - $logs[] = [ - 'type' => $logType, - 'errorCount' => $rawLog['errorCount'] ?? 1, - 'timestamp' => $rawLogData['timestamp_rfc3339']->getValue(), - 'priority' => $rawLogData['priority']->getValue(), - 'priorityName' => $rawLogData['priorityName']->getValue(), - 'channel' => $rawLogData['channel']->getValue(), - 'message' => $rawLogData['message'], - 'context' => $rawLogData['context'], - ]; - } - - // sort logs from oldest to newest - usort($logs, static function ($logA, $logB) { - return $logA['timestamp'] <=> $logB['timestamp']; - }); - - return $this->processedLogs = $logs; - } - - public function getFilters() - { - $filters = [ - 'channel' => [], - 'priority' => [ - 'Debug' => 100, - 'Info' => 200, - 'Notice' => 250, - 'Warning' => 300, - 'Error' => 400, - 'Critical' => 500, - 'Alert' => 550, - 'Emergency' => 600, - ], - ]; - - $allChannels = []; - foreach ($this->getProcessedLogs() as $log) { - if ('' === trim($log['channel'] ?? '')) { - continue; - } - - $allChannels[] = $log['channel']; - } - $channels = array_unique($allChannels); - sort($channels); - $filters['channel'] = $channels; - - return $filters; - } - - public function getPriorities() - { - return $this->data['priorities'] ?? []; - } - - public function countErrors() - { - return $this->data['error_count'] ?? 0; - } - - public function countDeprecations() - { - return $this->data['deprecation_count'] ?? 0; - } - - public function countWarnings() - { - return $this->data['warning_count'] ?? 0; - } - - public function countScreams() - { - return $this->data['scream_count'] ?? 0; - } - - public function getCompilerLogs() - { - return $this->cloneVar($this->getContainerCompilerLogs($this->data['compiler_logs_filepath'] ?? null)); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'logger'; - } - - private function getContainerDeprecationLogs(): array - { - if (null === $this->containerPathPrefix || !is_file($file = $this->containerPathPrefix.'Deprecations.log')) { - return []; - } - - if ('' === $logContent = trim(file_get_contents($file))) { - return []; - } - - $bootTime = filemtime($file); - $logs = []; - foreach (unserialize($logContent) as $log) { - $log['context'] = ['exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])]; - $log['timestamp'] = $bootTime; - $log['timestamp_rfc3339'] = (new \DateTimeImmutable())->setTimestamp($bootTime)->format(\DateTimeInterface::RFC3339_EXTENDED); - $log['priority'] = 100; - $log['priorityName'] = 'DEBUG'; - $log['channel'] = null; - $log['scream'] = false; - unset($log['type'], $log['file'], $log['line'], $log['trace'], $log['trace'], $log['count']); - $logs[] = $log; - } - - return $logs; - } - - private function getContainerCompilerLogs(string $compilerLogsFilepath = null): array - { - if (!is_file($compilerLogsFilepath)) { - return []; - } - - $logs = []; - foreach (file($compilerLogsFilepath, \FILE_IGNORE_NEW_LINES) as $log) { - $log = explode(': ', $log, 2); - if (!isset($log[1]) || !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $log[0])) { - $log = ['Unknown Compiler Pass', implode(': ', $log)]; - } - - $logs[$log[0]][] = ['message' => $log[1]]; - } - - return $logs; - } - - private function sanitizeLogs(array $logs) - { - $sanitizedLogs = []; - $silencedLogs = []; - - foreach ($logs as $log) { - if (!$this->isSilencedOrDeprecationErrorLog($log)) { - $sanitizedLogs[] = $log; - - continue; - } - - $message = '_'.$log['message']; - $exception = $log['context']['exception']; - - if ($exception instanceof SilencedErrorContext) { - if (isset($silencedLogs[$h = spl_object_hash($exception)])) { - continue; - } - $silencedLogs[$h] = true; - - if (!isset($sanitizedLogs[$message])) { - $sanitizedLogs[$message] = $log + [ - 'errorCount' => 0, - 'scream' => true, - ]; - } - $sanitizedLogs[$message]['errorCount'] += $exception->count; - - continue; - } - - $errorId = md5("{$exception->getSeverity()}/{$exception->getLine()}/{$exception->getFile()}\0{$message}", true); - - if (isset($sanitizedLogs[$errorId])) { - ++$sanitizedLogs[$errorId]['errorCount']; - } else { - $log += [ - 'errorCount' => 1, - 'scream' => false, - ]; - - $sanitizedLogs[$errorId] = $log; - } - } - - return array_values($sanitizedLogs); - } - - private function isSilencedOrDeprecationErrorLog(array $log): bool - { - if (!isset($log['context']['exception'])) { - return false; - } - - $exception = $log['context']['exception']; - - if ($exception instanceof SilencedErrorContext) { - return true; - } - - if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), [\E_DEPRECATED, \E_USER_DEPRECATED], true)) { - return true; - } - - return false; - } - - private function computeErrorsCount(array $containerDeprecationLogs): array - { - $silencedLogs = []; - $count = [ - 'error_count' => $this->logger->countErrors($this->currentRequest), - 'deprecation_count' => 0, - 'warning_count' => 0, - 'scream_count' => 0, - 'priorities' => [], - ]; - - foreach ($this->logger->getLogs($this->currentRequest) as $log) { - if (isset($count['priorities'][$log['priority']])) { - ++$count['priorities'][$log['priority']]['count']; - } else { - $count['priorities'][$log['priority']] = [ - 'count' => 1, - 'name' => $log['priorityName'], - ]; - } - if ('WARNING' === $log['priorityName']) { - ++$count['warning_count']; - } - - if ($this->isSilencedOrDeprecationErrorLog($log)) { - $exception = $log['context']['exception']; - if ($exception instanceof SilencedErrorContext) { - if (isset($silencedLogs[$h = spl_object_hash($exception)])) { - continue; - } - $silencedLogs[$h] = true; - $count['scream_count'] += $exception->count; - } else { - ++$count['deprecation_count']; - } - } - } - - foreach ($containerDeprecationLogs as $deprecationLog) { - $count['deprecation_count'] += $deprecationLog['context']['exception']->count; - } - - ksort($count['priorities']); - - return $count; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/MemoryDataCollector.php b/lib/symfony/http-kernel/DataCollector/MemoryDataCollector.php deleted file mode 100644 index 53a1f9e44..000000000 --- a/lib/symfony/http-kernel/DataCollector/MemoryDataCollector.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * @author Fabien Potencier - * - * @final - */ -class MemoryDataCollector extends DataCollector implements LateDataCollectorInterface -{ - public function __construct() - { - $this->reset(); - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $this->updateMemoryUsage(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = [ - 'memory' => 0, - 'memory_limit' => $this->convertToBytes(\ini_get('memory_limit')), - ]; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - $this->updateMemoryUsage(); - } - - public function getMemory(): int - { - return $this->data['memory']; - } - - /** - * @return int|float - */ - public function getMemoryLimit() - { - return $this->data['memory_limit']; - } - - public function updateMemoryUsage() - { - $this->data['memory'] = memory_get_peak_usage(true); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'memory'; - } - - /** - * @return int|float - */ - private function convertToBytes(string $memoryLimit) - { - if ('-1' === $memoryLimit) { - return -1; - } - - $memoryLimit = strtolower($memoryLimit); - $max = strtolower(ltrim($memoryLimit, '+')); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($memoryLimit, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/RequestDataCollector.php b/lib/symfony/http-kernel/DataCollector/RequestDataCollector.php deleted file mode 100644 index 5717000f2..000000000 --- a/lib/symfony/http-kernel/DataCollector/RequestDataCollector.php +++ /dev/null @@ -1,504 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\ParameterBag; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\Event\ControllerEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Fabien Potencier - * - * @final - */ -class RequestDataCollector extends DataCollector implements EventSubscriberInterface, LateDataCollectorInterface -{ - /** - * @var \SplObjectStorage - */ - private $controllers; - private $sessionUsages = []; - private $requestStack; - - public function __construct(RequestStack $requestStack = null) - { - $this->controllers = new \SplObjectStorage(); - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - // attributes are serialized and as they can be anything, they need to be converted to strings. - $attributes = []; - $route = ''; - foreach ($request->attributes->all() as $key => $value) { - if ('_route' === $key) { - $route = \is_object($value) ? $value->getPath() : $value; - $attributes[$key] = $route; - } else { - $attributes[$key] = $value; - } - } - - $content = $request->getContent(); - - $sessionMetadata = []; - $sessionAttributes = []; - $flashes = []; - if ($request->hasSession()) { - $session = $request->getSession(); - if ($session->isStarted()) { - $sessionMetadata['Created'] = date(\DATE_RFC822, $session->getMetadataBag()->getCreated()); - $sessionMetadata['Last used'] = date(\DATE_RFC822, $session->getMetadataBag()->getLastUsed()); - $sessionMetadata['Lifetime'] = $session->getMetadataBag()->getLifetime(); - $sessionAttributes = $session->all(); - $flashes = $session->getFlashBag()->peekAll(); - } - } - - $statusCode = $response->getStatusCode(); - - $responseCookies = []; - foreach ($response->headers->getCookies() as $cookie) { - $responseCookies[$cookie->getName()] = $cookie; - } - - $dotenvVars = []; - foreach (explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '') as $name) { - if ('' !== $name && isset($_ENV[$name])) { - $dotenvVars[$name] = $_ENV[$name]; - } - } - - $this->data = [ - 'method' => $request->getMethod(), - 'format' => $request->getRequestFormat(), - 'content_type' => $response->headers->get('Content-Type', 'text/html'), - 'status_text' => Response::$statusTexts[$statusCode] ?? '', - 'status_code' => $statusCode, - 'request_query' => $request->query->all(), - 'request_request' => $request->request->all(), - 'request_files' => $request->files->all(), - 'request_headers' => $request->headers->all(), - 'request_server' => $request->server->all(), - 'request_cookies' => $request->cookies->all(), - 'request_attributes' => $attributes, - 'route' => $route, - 'response_headers' => $response->headers->all(), - 'response_cookies' => $responseCookies, - 'session_metadata' => $sessionMetadata, - 'session_attributes' => $sessionAttributes, - 'session_usages' => array_values($this->sessionUsages), - 'stateless_check' => $this->requestStack && ($mainRequest = $this->requestStack->getMainRequest()) && $mainRequest->attributes->get('_stateless', false), - 'flashes' => $flashes, - 'path_info' => $request->getPathInfo(), - 'controller' => 'n/a', - 'locale' => $request->getLocale(), - 'dotenv_vars' => $dotenvVars, - ]; - - if (isset($this->data['request_headers']['php-auth-pw'])) { - $this->data['request_headers']['php-auth-pw'] = '******'; - } - - if (isset($this->data['request_server']['PHP_AUTH_PW'])) { - $this->data['request_server']['PHP_AUTH_PW'] = '******'; - } - - if (isset($this->data['request_request']['_password'])) { - $encodedPassword = rawurlencode($this->data['request_request']['_password']); - $content = str_replace('_password='.$encodedPassword, '_password=******', $content); - $this->data['request_request']['_password'] = '******'; - } - - $this->data['content'] = $content; - - foreach ($this->data as $key => $value) { - if (!\is_array($value)) { - continue; - } - if ('request_headers' === $key || 'response_headers' === $key) { - $this->data[$key] = array_map(function ($v) { return isset($v[0]) && !isset($v[1]) ? $v[0] : $v; }, $value); - } - } - - if (isset($this->controllers[$request])) { - $this->data['controller'] = $this->parseController($this->controllers[$request]); - unset($this->controllers[$request]); - } - - if ($request->attributes->has('_redirected') && $redirectCookie = $request->cookies->get('sf_redirect')) { - $this->data['redirect'] = json_decode($redirectCookie, true); - - $response->headers->clearCookie('sf_redirect'); - } - - if ($response->isRedirect()) { - $response->headers->setCookie(new Cookie( - 'sf_redirect', - json_encode([ - 'token' => $response->headers->get('x-debug-token'), - 'route' => $request->attributes->get('_route', 'n/a'), - 'method' => $request->getMethod(), - 'controller' => $this->parseController($request->attributes->get('_controller')), - 'status_code' => $statusCode, - 'status_text' => Response::$statusTexts[$statusCode], - ]), - 0, '/', null, $request->isSecure(), true, false, 'lax' - )); - } - - $this->data['identifier'] = $this->data['route'] ?: (\is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']); - - if ($response->headers->has('x-previous-debug-token')) { - $this->data['forward_token'] = $response->headers->get('x-previous-debug-token'); - } - } - - public function lateCollect() - { - $this->data = $this->cloneVar($this->data); - } - - public function reset() - { - $this->data = []; - $this->controllers = new \SplObjectStorage(); - $this->sessionUsages = []; - } - - public function getMethod() - { - return $this->data['method']; - } - - public function getPathInfo() - { - return $this->data['path_info']; - } - - public function getRequestRequest() - { - return new ParameterBag($this->data['request_request']->getValue()); - } - - public function getRequestQuery() - { - return new ParameterBag($this->data['request_query']->getValue()); - } - - public function getRequestFiles() - { - return new ParameterBag($this->data['request_files']->getValue()); - } - - public function getRequestHeaders() - { - return new ParameterBag($this->data['request_headers']->getValue()); - } - - public function getRequestServer(bool $raw = false) - { - return new ParameterBag($this->data['request_server']->getValue($raw)); - } - - public function getRequestCookies(bool $raw = false) - { - return new ParameterBag($this->data['request_cookies']->getValue($raw)); - } - - public function getRequestAttributes() - { - return new ParameterBag($this->data['request_attributes']->getValue()); - } - - public function getResponseHeaders() - { - return new ParameterBag($this->data['response_headers']->getValue()); - } - - public function getResponseCookies() - { - return new ParameterBag($this->data['response_cookies']->getValue()); - } - - public function getSessionMetadata() - { - return $this->data['session_metadata']->getValue(); - } - - public function getSessionAttributes() - { - return $this->data['session_attributes']->getValue(); - } - - public function getStatelessCheck() - { - return $this->data['stateless_check']; - } - - public function getSessionUsages() - { - return $this->data['session_usages']; - } - - public function getFlashes() - { - return $this->data['flashes']->getValue(); - } - - public function getContent() - { - return $this->data['content']; - } - - public function isJsonRequest() - { - return 1 === preg_match('{^application/(?:\w+\++)*json$}i', $this->data['request_headers']['content-type']); - } - - public function getPrettyJson() - { - $decoded = json_decode($this->getContent()); - - return \JSON_ERROR_NONE === json_last_error() ? json_encode($decoded, \JSON_PRETTY_PRINT) : null; - } - - public function getContentType() - { - return $this->data['content_type']; - } - - public function getStatusText() - { - return $this->data['status_text']; - } - - public function getStatusCode() - { - return $this->data['status_code']; - } - - public function getFormat() - { - return $this->data['format']; - } - - public function getLocale() - { - return $this->data['locale']; - } - - public function getDotenvVars() - { - return new ParameterBag($this->data['dotenv_vars']->getValue()); - } - - /** - * Gets the route name. - * - * The _route request attributes is automatically set by the Router Matcher. - */ - public function getRoute(): string - { - return $this->data['route']; - } - - public function getIdentifier() - { - return $this->data['identifier']; - } - - /** - * Gets the route parameters. - * - * The _route_params request attributes is automatically set by the RouterListener. - */ - public function getRouteParams(): array - { - return isset($this->data['request_attributes']['_route_params']) ? $this->data['request_attributes']['_route_params']->getValue() : []; - } - - /** - * Gets the parsed controller. - * - * @return array|string|Data The controller as a string or array of data - * with keys 'class', 'method', 'file' and 'line' - */ - public function getController() - { - return $this->data['controller']; - } - - /** - * Gets the previous request attributes. - * - * @return array|Data|false A legacy array of data from the previous redirection response - * or false otherwise - */ - public function getRedirect() - { - return $this->data['redirect'] ?? false; - } - - public function getForwardToken() - { - return $this->data['forward_token'] ?? null; - } - - public function onKernelController(ControllerEvent $event) - { - $this->controllers[$event->getRequest()] = $event->getController(); - } - - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - if ($event->getRequest()->cookies->has('sf_redirect')) { - $event->getRequest()->attributes->set('_redirected', true); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::CONTROLLER => 'onKernelController', - KernelEvents::RESPONSE => 'onKernelResponse', - ]; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'request'; - } - - public function collectSessionUsage(): void - { - $trace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS); - - $traceEndIndex = \count($trace) - 1; - for ($i = $traceEndIndex; $i > 0; --$i) { - if (null !== ($class = $trace[$i]['class'] ?? null) && (is_subclass_of($class, SessionInterface::class) || is_subclass_of($class, SessionBagInterface::class))) { - $traceEndIndex = $i; - break; - } - } - - if ((\count($trace) - 1) === $traceEndIndex) { - return; - } - - // Remove part of the backtrace that belongs to session only - array_splice($trace, 0, $traceEndIndex); - - // Merge identical backtraces generated by internal call reports - $name = sprintf('%s:%s', $trace[1]['class'] ?? $trace[0]['file'], $trace[0]['line']); - if (!\array_key_exists($name, $this->sessionUsages)) { - $this->sessionUsages[$name] = [ - 'name' => $name, - 'file' => $trace[0]['file'], - 'line' => $trace[0]['line'], - 'trace' => $trace, - ]; - } - } - - /** - * @param string|object|array|null $controller The controller to parse - * - * @return array|string An array of controller data or a simple string - */ - private function parseController($controller) - { - if (\is_string($controller) && str_contains($controller, '::')) { - $controller = explode('::', $controller); - } - - if (\is_array($controller)) { - try { - $r = new \ReflectionMethod($controller[0], $controller[1]); - - return [ - 'class' => \is_object($controller[0]) ? get_debug_type($controller[0]) : $controller[0], - 'method' => $controller[1], - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - } catch (\ReflectionException $e) { - if (\is_callable($controller)) { - // using __call or __callStatic - return [ - 'class' => \is_object($controller[0]) ? get_debug_type($controller[0]) : $controller[0], - 'method' => $controller[1], - 'file' => 'n/a', - 'line' => 'n/a', - ]; - } - } - } - - if ($controller instanceof \Closure) { - $r = new \ReflectionFunction($controller); - - $controller = [ - 'class' => $r->getName(), - 'method' => null, - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - - if (str_contains($r->name, '{closure}')) { - return $controller; - } - $controller['method'] = $r->name; - - if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { - $controller['class'] = $class->name; - } else { - return $r->name; - } - - return $controller; - } - - if (\is_object($controller)) { - $r = new \ReflectionClass($controller); - - return [ - 'class' => $r->getName(), - 'method' => null, - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - } - - return \is_string($controller) ? $controller : 'n/a'; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/RouterDataCollector.php b/lib/symfony/http-kernel/DataCollector/RouterDataCollector.php deleted file mode 100644 index 372ede037..000000000 --- a/lib/symfony/http-kernel/DataCollector/RouterDataCollector.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\ControllerEvent; - -/** - * @author Fabien Potencier - */ -class RouterDataCollector extends DataCollector -{ - /** - * @var \SplObjectStorage - */ - protected $controllers; - - public function __construct() - { - $this->reset(); - } - - /** - * {@inheritdoc} - * - * @final - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if ($response instanceof RedirectResponse) { - $this->data['redirect'] = true; - $this->data['url'] = $response->getTargetUrl(); - - if ($this->controllers->contains($request)) { - $this->data['route'] = $this->guessRoute($request, $this->controllers[$request]); - } - } - - unset($this->controllers[$request]); - } - - public function reset() - { - $this->controllers = new \SplObjectStorage(); - - $this->data = [ - 'redirect' => false, - 'url' => null, - 'route' => null, - ]; - } - - protected function guessRoute(Request $request, $controller) - { - return 'n/a'; - } - - /** - * Remembers the controller associated to each request. - */ - public function onKernelController(ControllerEvent $event) - { - $this->controllers[$event->getRequest()] = $event->getController(); - } - - /** - * @return bool Whether this request will result in a redirect - */ - public function getRedirect() - { - return $this->data['redirect']; - } - - /** - * @return string|null - */ - public function getTargetUrl() - { - return $this->data['url']; - } - - /** - * @return string|null - */ - public function getTargetRoute() - { - return $this->data['route']; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'router'; - } -} diff --git a/lib/symfony/http-kernel/DataCollector/TimeDataCollector.php b/lib/symfony/http-kernel/DataCollector/TimeDataCollector.php deleted file mode 100644 index 43799060f..000000000 --- a/lib/symfony/http-kernel/DataCollector/TimeDataCollector.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\Stopwatch\StopwatchEvent; - -/** - * @author Fabien Potencier - * - * @final - */ -class TimeDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $kernel; - private $stopwatch; - - public function __construct(KernelInterface $kernel = null, Stopwatch $stopwatch = null) - { - $this->kernel = $kernel; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (null !== $this->kernel) { - $startTime = $this->kernel->getStartTime(); - } else { - $startTime = $request->server->get('REQUEST_TIME_FLOAT'); - } - - $this->data = [ - 'token' => $request->attributes->get('_stopwatch_token'), - 'start_time' => $startTime * 1000, - 'events' => [], - 'stopwatch_installed' => class_exists(Stopwatch::class, false), - ]; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - - if (null !== $this->stopwatch) { - $this->stopwatch->reset(); - } - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - if (null !== $this->stopwatch && isset($this->data['token'])) { - $this->setEvents($this->stopwatch->getSectionEvents($this->data['token'])); - } - unset($this->data['token']); - } - - /** - * @param StopwatchEvent[] $events The request events - */ - public function setEvents(array $events) - { - foreach ($events as $event) { - $event->ensureStopped(); - } - - $this->data['events'] = $events; - } - - /** - * @return StopwatchEvent[] - */ - public function getEvents(): array - { - return $this->data['events']; - } - - /** - * Gets the request elapsed time. - */ - public function getDuration(): float - { - if (!isset($this->data['events']['__section__'])) { - return 0; - } - - $lastEvent = $this->data['events']['__section__']; - - return $lastEvent->getOrigin() + $lastEvent->getDuration() - $this->getStartTime(); - } - - /** - * Gets the initialization time. - * - * This is the time spent until the beginning of the request handling. - */ - public function getInitTime(): float - { - if (!isset($this->data['events']['__section__'])) { - return 0; - } - - return $this->data['events']['__section__']->getOrigin() - $this->getStartTime(); - } - - public function getStartTime(): float - { - return $this->data['start_time']; - } - - public function isStopwatchInstalled(): bool - { - return $this->data['stopwatch_installed']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'time'; - } -} diff --git a/lib/symfony/http-kernel/Debug/FileLinkFormatter.php b/lib/symfony/http-kernel/Debug/FileLinkFormatter.php deleted file mode 100644 index 9ac688cc5..000000000 --- a/lib/symfony/http-kernel/Debug/FileLinkFormatter.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Debug; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - -/** - * Formats debug file links. - * - * @author Jérémy Romey - * - * @final - */ -class FileLinkFormatter -{ - private const FORMATS = [ - 'textmate' => 'txmt://open?url=file://%f&line=%l', - 'macvim' => 'mvim://open?url=file://%f&line=%l', - 'emacs' => 'emacs://open?url=file://%f&line=%l', - 'sublime' => 'subl://open?url=file://%f&line=%l', - 'phpstorm' => 'phpstorm://open?file=%f&line=%l', - 'atom' => 'atom://core/open/file?filename=%f&line=%l', - 'vscode' => 'vscode://file/%f:%l', - ]; - - private $fileLinkFormat; - private $requestStack; - private $baseDir; - private $urlFormat; - - /** - * @param string|array|null $fileLinkFormat - * @param string|\Closure $urlFormat the URL format, or a closure that returns it on-demand - */ - public function __construct($fileLinkFormat = null, RequestStack $requestStack = null, string $baseDir = null, $urlFormat = null) - { - if (!\is_array($fileLinkFormat) && $fileLinkFormat = (self::FORMATS[$fileLinkFormat] ?? $fileLinkFormat) ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) { - $i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, \PREG_SPLIT_DELIM_CAPTURE); - } - - $this->fileLinkFormat = $fileLinkFormat; - $this->requestStack = $requestStack; - $this->baseDir = $baseDir; - $this->urlFormat = $urlFormat; - } - - public function format(string $file, int $line) - { - if ($fmt = $this->getFileLinkFormat()) { - for ($i = 1; isset($fmt[$i]); ++$i) { - if (str_starts_with($file, $k = $fmt[$i++])) { - $file = substr_replace($file, $fmt[$i], 0, \strlen($k)); - break; - } - } - - return strtr($fmt[0], ['%f' => $file, '%l' => $line]); - } - - return false; - } - - /** - * @internal - */ - public function __sleep(): array - { - $this->fileLinkFormat = $this->getFileLinkFormat(); - - return ['fileLinkFormat']; - } - - /** - * @internal - */ - public static function generateUrlFormat(UrlGeneratorInterface $router, string $routeName, string $queryString): ?string - { - try { - return $router->generate($routeName).$queryString; - } catch (\Throwable $e) { - return null; - } - } - - private function getFileLinkFormat() - { - if ($this->fileLinkFormat) { - return $this->fileLinkFormat; - } - - if ($this->requestStack && $this->baseDir && $this->urlFormat) { - $request = $this->requestStack->getMainRequest(); - - if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) { - return [ - $request->getSchemeAndHttpHost().$this->urlFormat, - $this->baseDir.\DIRECTORY_SEPARATOR, '', - ]; - } - } - - return null; - } -} diff --git a/lib/symfony/http-kernel/Debug/TraceableEventDispatcher.php b/lib/symfony/http-kernel/Debug/TraceableEventDispatcher.php deleted file mode 100644 index fd1cf9e58..000000000 --- a/lib/symfony/http-kernel/Debug/TraceableEventDispatcher.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Debug; - -use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Collects some data about event listeners. - * - * This event dispatcher delegates the dispatching to another one. - * - * @author Fabien Potencier - */ -class TraceableEventDispatcher extends BaseTraceableEventDispatcher -{ - /** - * {@inheritdoc} - */ - protected function beforeDispatch(string $eventName, object $event) - { - switch ($eventName) { - case KernelEvents::REQUEST: - $event->getRequest()->attributes->set('_stopwatch_token', substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); - $this->stopwatch->openSection(); - break; - case KernelEvents::VIEW: - case KernelEvents::RESPONSE: - // stop only if a controller has been executed - if ($this->stopwatch->isStarted('controller')) { - $this->stopwatch->stop('controller'); - } - break; - case KernelEvents::TERMINATE: - $sectionId = $event->getRequest()->attributes->get('_stopwatch_token'); - if (null === $sectionId) { - break; - } - // There is a very special case when using built-in AppCache class as kernel wrapper, in the case - // of an ESI request leading to a `stale` response [B] inside a `fresh` cached response [A]. - // In this case, `$token` contains the [B] debug token, but the open `stopwatch` section ID - // is equal to the [A] debug token. Trying to reopen section with the [B] token throws an exception - // which must be caught. - try { - $this->stopwatch->openSection($sectionId); - } catch (\LogicException $e) { - } - break; - } - } - - /** - * {@inheritdoc} - */ - protected function afterDispatch(string $eventName, object $event) - { - switch ($eventName) { - case KernelEvents::CONTROLLER_ARGUMENTS: - $this->stopwatch->start('controller', 'section'); - break; - case KernelEvents::RESPONSE: - $sectionId = $event->getRequest()->attributes->get('_stopwatch_token'); - if (null === $sectionId) { - break; - } - $this->stopwatch->stopSection($sectionId); - break; - case KernelEvents::TERMINATE: - // In the special case described in the `preDispatch` method above, the `$token` section - // does not exist, then closing it throws an exception which must be caught. - $sectionId = $event->getRequest()->attributes->get('_stopwatch_token'); - if (null === $sectionId) { - break; - } - try { - $this->stopwatch->stopSection($sectionId); - } catch (\LogicException $e) { - } - break; - } - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/lib/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php deleted file mode 100644 index 4bb60b41f..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Composer\Autoload\ClassLoader; -use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\HttpKernel\Kernel; - -/** - * Sets the classes to compile in the cache for the container. - * - * @author Fabien Potencier - */ -class AddAnnotatedClassesToCachePass implements CompilerPassInterface -{ - private $kernel; - - public function __construct(Kernel $kernel) - { - $this->kernel = $kernel; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $annotatedClasses = []; - foreach ($container->getExtensions() as $extension) { - if ($extension instanceof Extension) { - $annotatedClasses[] = $extension->getAnnotatedClassesToCompile(); - } - } - - $annotatedClasses = array_merge($this->kernel->getAnnotatedClassesToCompile(), ...$annotatedClasses); - - $existingClasses = $this->getClassesInComposerClassMaps(); - - $annotatedClasses = $container->getParameterBag()->resolveValue($annotatedClasses); - $this->kernel->setAnnotatedClassCache($this->expandClasses($annotatedClasses, $existingClasses)); - } - - /** - * Expands the given class patterns using a list of existing classes. - * - * @param array $patterns The class patterns to expand - * @param array $classes The existing classes to match against the patterns - */ - private function expandClasses(array $patterns, array $classes): array - { - $expanded = []; - - // Explicit classes declared in the patterns are returned directly - foreach ($patterns as $key => $pattern) { - if (!str_ends_with($pattern, '\\') && !str_contains($pattern, '*')) { - unset($patterns[$key]); - $expanded[] = ltrim($pattern, '\\'); - } - } - - // Match patterns with the classes list - $regexps = $this->patternsToRegexps($patterns); - - foreach ($classes as $class) { - $class = ltrim($class, '\\'); - - if ($this->matchAnyRegexps($class, $regexps)) { - $expanded[] = $class; - } - } - - return array_unique($expanded); - } - - private function getClassesInComposerClassMaps(): array - { - $classes = []; - - foreach (spl_autoload_functions() as $function) { - if (!\is_array($function)) { - continue; - } - - if ($function[0] instanceof DebugClassLoader || $function[0] instanceof LegacyDebugClassLoader) { - $function = $function[0]->getClassLoader(); - } - - if (\is_array($function) && $function[0] instanceof ClassLoader) { - $classes += array_filter($function[0]->getClassMap()); - } - } - - return array_keys($classes); - } - - private function patternsToRegexps(array $patterns): array - { - $regexps = []; - - foreach ($patterns as $pattern) { - // Escape user input - $regex = preg_quote(ltrim($pattern, '\\')); - - // Wildcards * and ** - $regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']); - - // If this class does not end by a slash, anchor the end - if ('\\' !== substr($regex, -1)) { - $regex .= '$'; - } - - $regexps[] = '{^\\\\'.$regex.'}'; - } - - return $regexps; - } - - private function matchAnyRegexps(string $class, array $regexps): bool - { - $isTest = str_contains($class, 'Test'); - - foreach ($regexps as $regex) { - if ($isTest && !str_contains($regex, 'Test')) { - continue; - } - - if (preg_match($regex, '\\'.$class)) { - return true; - } - } - - return false; - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php b/lib/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php deleted file mode 100644 index 072c35f1c..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * This extension sub-class provides first-class integration with the - * Config/Definition Component. - * - * You can use this as base class if - * - * a) you use the Config/Definition component for configuration, - * b) your configuration class is named "Configuration", and - * c) the configuration class resides in the DependencyInjection sub-folder. - * - * @author Johannes M. Schmitt - */ -abstract class ConfigurableExtension extends Extension -{ - /** - * {@inheritdoc} - */ - final public function load(array $configs, ContainerBuilder $container) - { - $this->loadInternal($this->processConfiguration($this->getConfiguration($configs, $container), $configs), $container); - } - - /** - * Configures the passed container according to the merged configuration. - */ - abstract protected function loadInternal(array $mergedConfig, ContainerBuilder $container); -} diff --git a/lib/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php b/lib/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php deleted file mode 100644 index d925ed6b0..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * Gathers and configures the argument value resolvers. - * - * @author Iltar van der Berg - */ -class ControllerArgumentValueResolverPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $argumentResolverService; - private $argumentValueResolverTag; - private $traceableResolverStopwatch; - - public function __construct(string $argumentResolverService = 'argument_resolver', string $argumentValueResolverTag = 'controller.argument_value_resolver', string $traceableResolverStopwatch = 'debug.stopwatch') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->argumentResolverService = $argumentResolverService; - $this->argumentValueResolverTag = $argumentValueResolverTag; - $this->traceableResolverStopwatch = $traceableResolverStopwatch; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->argumentResolverService)) { - return; - } - - $resolvers = $this->findAndSortTaggedServices($this->argumentValueResolverTag, $container); - - if ($container->getParameter('kernel.debug') && class_exists(Stopwatch::class) && $container->has($this->traceableResolverStopwatch)) { - foreach ($resolvers as $resolverReference) { - $id = (string) $resolverReference; - $container->register("debug.$id", TraceableValueResolver::class) - ->setDecoratedService($id) - ->setArguments([new Reference("debug.$id.inner"), new Reference($this->traceableResolverStopwatch)]); - } - } - - $container - ->getDefinition($this->argumentResolverService) - ->replaceArgument(1, new IteratorArgument($resolvers)) - ; - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/Extension.php b/lib/symfony/http-kernel/DependencyInjection/Extension.php deleted file mode 100644 index 4090fd822..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/Extension.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension; - -/** - * Allow adding classes to the class cache. - * - * @author Fabien Potencier - */ -abstract class Extension extends BaseExtension -{ - private $annotatedClasses = []; - - /** - * Gets the annotated classes to cache. - * - * @return array - */ - public function getAnnotatedClassesToCompile() - { - return $this->annotatedClasses; - } - - /** - * Adds annotated classes to the class cache. - * - * @param array $annotatedClasses An array of class patterns - */ - public function addAnnotatedClassesToCompile(array $annotatedClasses) - { - $this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php b/lib/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php deleted file mode 100644 index f26baeca9..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; - -/** - * Adds services tagged kernel.fragment_renderer as HTTP content rendering strategies. - * - * @author Fabien Potencier - */ -class FragmentRendererPass implements CompilerPassInterface -{ - private $handlerService; - private $rendererTag; - - public function __construct(string $handlerService = 'fragment.handler', string $rendererTag = 'kernel.fragment_renderer') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->handlerService = $handlerService; - $this->rendererTag = $rendererTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->handlerService)) { - return; - } - - $definition = $container->getDefinition($this->handlerService); - $renderers = []; - foreach ($container->findTaggedServiceIds($this->rendererTag, true) as $id => $tags) { - $def = $container->getDefinition($id); - $class = $container->getParameterBag()->resolveValue($def->getClass()); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(FragmentRendererInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, FragmentRendererInterface::class)); - } - - foreach ($tags as $tag) { - $renderers[$tag['alias']] = new Reference($id); - } - } - - $definition->replaceArgument(0, ServiceLocatorTagPass::register($container, $renderers)); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php b/lib/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php deleted file mode 100644 index f25328704..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Fragment\FragmentHandler; - -/** - * Lazily loads fragment renderers from the dependency injection container. - * - * @author Fabien Potencier - */ -class LazyLoadingFragmentHandler extends FragmentHandler -{ - private $container; - - /** - * @var array - */ - private $initialized = []; - - public function __construct(ContainerInterface $container, RequestStack $requestStack, bool $debug = false) - { - $this->container = $container; - - parent::__construct($requestStack, [], $debug); - } - - /** - * {@inheritdoc} - */ - public function render($uri, string $renderer = 'inline', array $options = []) - { - if (!isset($this->initialized[$renderer]) && $this->container->has($renderer)) { - $this->addRenderer($this->container->get($renderer)); - $this->initialized[$renderer] = true; - } - - return parent::render($uri, $renderer, $options); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/LoggerPass.php b/lib/symfony/http-kernel/DependencyInjection/LoggerPass.php deleted file mode 100644 index b6df1f6e6..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/LoggerPass.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Psr\Log\LoggerInterface; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\Log\Logger; - -/** - * Registers the default logger if necessary. - * - * @author Kévin Dunglas - */ -class LoggerPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $container->setAlias(LoggerInterface::class, 'logger') - ->setPublic(false); - - if ($container->has('logger')) { - return; - } - - $container->register('logger', Logger::class) - ->setPublic(false); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php b/lib/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php deleted file mode 100644 index 5f0f0d8de..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass as BaseMergeExtensionConfigurationPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Ensures certain extensions are always loaded. - * - * @author Kris Wallsmith - */ -class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPass -{ - private $extensions; - - /** - * @param string[] $extensions - */ - public function __construct(array $extensions) - { - $this->extensions = $extensions; - } - - public function process(ContainerBuilder $container) - { - foreach ($this->extensions as $extension) { - if (!\count($container->getExtensionConfig($extension))) { - $container->loadFromExtension($extension, []); - } - } - - parent::process($container); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/lib/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php deleted file mode 100644 index 3dbaff564..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ /dev/null @@ -1,224 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Creates the service-locators required by ServiceValueResolver. - * - * @author Nicolas Grekas - */ -class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface -{ - private $resolverServiceId; - private $controllerTag; - private $controllerLocator; - private $notTaggedControllerResolverServiceId; - - public function __construct(string $resolverServiceId = 'argument_resolver.service', string $controllerTag = 'controller.service_arguments', string $controllerLocator = 'argument_resolver.controller_locator', string $notTaggedControllerResolverServiceId = 'argument_resolver.not_tagged_controller') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->resolverServiceId = $resolverServiceId; - $this->controllerTag = $controllerTag; - $this->controllerLocator = $controllerLocator; - $this->notTaggedControllerResolverServiceId = $notTaggedControllerResolverServiceId; - } - - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition($this->resolverServiceId) && false === $container->hasDefinition($this->notTaggedControllerResolverServiceId)) { - return; - } - - $parameterBag = $container->getParameterBag(); - $controllers = []; - - $publicAliases = []; - foreach ($container->getAliases() as $id => $alias) { - if ($alias->isPublic() && !$alias->isPrivate()) { - $publicAliases[(string) $alias][] = $id; - } - } - - foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { - $def = $container->getDefinition($id); - $def->setPublic(true); - $class = $def->getClass(); - $autowire = $def->isAutowired(); - $bindings = $def->getBindings(); - - // resolve service class, taking parent definitions into account - while ($def instanceof ChildDefinition) { - $def = $container->findDefinition($def->getParent()); - $class = $class ?: $def->getClass(); - $bindings += $def->getBindings(); - } - $class = $parameterBag->resolveValue($class); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - $isContainerAware = $r->implementsInterface(ContainerAwareInterface::class) || is_subclass_of($class, AbstractController::class); - - // get regular public methods - $methods = []; - $arguments = []; - foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $r) { - if ('setContainer' === $r->name && $isContainerAware) { - continue; - } - if (!$r->isConstructor() && !$r->isDestructor() && !$r->isAbstract()) { - $methods[strtolower($r->name)] = [$r, $r->getParameters()]; - } - } - - // validate and collect explicit per-actions and per-arguments service references - foreach ($tags as $attributes) { - if (!isset($attributes['action']) && !isset($attributes['argument']) && !isset($attributes['id'])) { - $autowire = true; - continue; - } - foreach (['action', 'argument', 'id'] as $k) { - if (!isset($attributes[$k][0])) { - throw new InvalidArgumentException(sprintf('Missing "%s" attribute on tag "%s" %s for service "%s".', $k, $this->controllerTag, json_encode($attributes, \JSON_UNESCAPED_UNICODE), $id)); - } - } - if (!isset($methods[$action = strtolower($attributes['action'])])) { - throw new InvalidArgumentException(sprintf('Invalid "action" attribute on tag "%s" for service "%s": no public "%s()" method found on class "%s".', $this->controllerTag, $id, $attributes['action'], $class)); - } - [$r, $parameters] = $methods[$action]; - $found = false; - - foreach ($parameters as $p) { - if ($attributes['argument'] === $p->name) { - if (!isset($arguments[$r->name][$p->name])) { - $arguments[$r->name][$p->name] = $attributes['id']; - } - $found = true; - break; - } - } - - if (!$found) { - throw new InvalidArgumentException(sprintf('Invalid "%s" tag for service "%s": method "%s()" has no "%s" argument on class "%s".', $this->controllerTag, $id, $r->name, $attributes['argument'], $class)); - } - } - - foreach ($methods as [$r, $parameters]) { - /** @var \ReflectionMethod $r */ - - // create a per-method map of argument-names to service/type-references - $args = []; - foreach ($parameters as $p) { - /** @var \ReflectionParameter $p */ - $type = ltrim($target = (string) ProxyHelper::getTypeHint($r, $p), '\\'); - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - - if (isset($arguments[$r->name][$p->name])) { - $target = $arguments[$r->name][$p->name]; - if ('?' !== $target[0]) { - $invalidBehavior = ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE; - } elseif ('' === $target = (string) substr($target, 1)) { - throw new InvalidArgumentException(sprintf('A "%s" tag must have non-empty "id" attributes for service "%s".', $this->controllerTag, $id)); - } elseif ($p->allowsNull() && !$p->isOptional()) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } - } elseif (isset($bindings[$bindingName = $type.' $'.$name = Target::parseName($p)]) || isset($bindings[$bindingName = '$'.$name]) || isset($bindings[$bindingName = $type])) { - $binding = $bindings[$bindingName]; - - [$bindingValue, $bindingId, , $bindingType, $bindingFile] = $binding->getValues(); - $binding->setValues([$bindingValue, $bindingId, true, $bindingType, $bindingFile]); - - if (!$bindingValue instanceof Reference) { - $args[$p->name] = new Reference('.value.'.$container->hash($bindingValue)); - $container->register((string) $args[$p->name], 'mixed') - ->setFactory('current') - ->addArgument([$bindingValue]); - } else { - $args[$p->name] = $bindingValue; - } - - continue; - } elseif (!$type || !$autowire || '\\' !== $target[0]) { - continue; - } elseif (is_subclass_of($type, \UnitEnum::class)) { - // do not attempt to register enum typed arguments if not already present in bindings - continue; - } elseif (!$p->allowsNull()) { - $invalidBehavior = ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE; - } - - if (Request::class === $type || SessionInterface::class === $type || Response::class === $type) { - continue; - } - - if ($type && !$p->isOptional() && !$p->allowsNull() && !class_exists($type) && !interface_exists($type, false)) { - $message = sprintf('Cannot determine controller argument for "%s::%s()": the $%s argument is type-hinted with the non-existent class or interface: "%s".', $class, $r->name, $p->name, $type); - - // see if the type-hint lives in the same namespace as the controller - if (0 === strncmp($type, $class, strrpos($class, '\\'))) { - $message .= ' Did you forget to add a use statement?'; - } - - $container->register($erroredId = '.errored.'.$container->hash($message), $type) - ->addError($message); - - $args[$p->name] = new Reference($erroredId, ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE); - } else { - $target = ltrim($target, '\\'); - $args[$p->name] = $type ? new TypedReference($target, $type, $invalidBehavior, Target::parseName($p)) : new Reference($target, $invalidBehavior); - } - } - // register the maps as a per-method service-locators - if ($args) { - $controllers[$id.'::'.$r->name] = ServiceLocatorTagPass::register($container, $args); - - foreach ($publicAliases[$id] ?? [] as $alias) { - $controllers[$alias.'::'.$r->name] = clone $controllers[$id.'::'.$r->name]; - } - } - } - } - - $controllerLocatorRef = ServiceLocatorTagPass::register($container, $controllers); - - if ($container->hasDefinition($this->resolverServiceId)) { - $container->getDefinition($this->resolverServiceId) - ->replaceArgument(0, $controllerLocatorRef); - } - - if ($container->hasDefinition($this->notTaggedControllerResolverServiceId)) { - $container->getDefinition($this->notTaggedControllerResolverServiceId) - ->replaceArgument(0, $controllerLocatorRef); - } - - $container->setAlias($this->controllerLocator, (string) $controllerLocatorRef); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php b/lib/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php deleted file mode 100644 index f0b801b8d..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Register all services that have the "kernel.locale_aware" tag into the listener. - * - * @author Pierre Bobiet - */ -class RegisterLocaleAwareServicesPass implements CompilerPassInterface -{ - private $listenerServiceId; - private $localeAwareTag; - - public function __construct(string $listenerServiceId = 'locale_aware_listener', string $localeAwareTag = 'kernel.locale_aware') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->listenerServiceId = $listenerServiceId; - $this->localeAwareTag = $localeAwareTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->listenerServiceId)) { - return; - } - - $services = []; - - foreach ($container->findTaggedServiceIds($this->localeAwareTag) as $id => $tags) { - $services[] = new Reference($id); - } - - if (!$services) { - $container->removeDefinition($this->listenerServiceId); - - return; - } - - $container - ->getDefinition($this->listenerServiceId) - ->setArgument(0, new IteratorArgument($services)) - ; - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php b/lib/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php deleted file mode 100644 index 2d077a0cb..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Removes empty service-locators registered for ServiceValueResolver. - * - * @author Nicolas Grekas - */ -class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface -{ - private $controllerLocator; - - public function __construct(string $controllerLocator = 'argument_resolver.controller_locator') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->controllerLocator = $controllerLocator; - } - - public function process(ContainerBuilder $container) - { - $controllerLocator = $container->findDefinition($this->controllerLocator); - $controllers = $controllerLocator->getArgument(0); - - foreach ($controllers as $controller => $argumentRef) { - $argumentLocator = $container->getDefinition((string) $argumentRef->getValues()[0]); - - if (!$argumentLocator->getArgument(0)) { - // remove empty argument locators - $reason = sprintf('Removing service-argument resolver for controller "%s": no corresponding services exist for the referenced types.', $controller); - } else { - // any methods listed for call-at-instantiation cannot be actions - $reason = false; - [$id, $action] = explode('::', $controller); - - if ($container->hasAlias($id)) { - continue; - } - - $controllerDef = $container->getDefinition($id); - foreach ($controllerDef->getMethodCalls() as [$method]) { - if (0 === strcasecmp($action, $method)) { - $reason = sprintf('Removing method "%s" of service "%s" from controller candidates: the method is called at instantiation, thus cannot be an action.', $action, $id); - break; - } - } - if (!$reason) { - // see Symfony\Component\HttpKernel\Controller\ContainerControllerResolver - $controllers[$id.':'.$action] = $argumentRef; - - if ('__invoke' === $action) { - $controllers[$id] = $argumentRef; - } - continue; - } - } - - unset($controllers[$controller]); - $container->log($this, $reason); - } - - $controllerLocator->replaceArgument(0, $controllers); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/ResettableServicePass.php b/lib/symfony/http-kernel/DependencyInjection/ResettableServicePass.php deleted file mode 100644 index 2e4cd6927..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/ResettableServicePass.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Alexander M. Turek - */ -class ResettableServicePass implements CompilerPassInterface -{ - private $tagName; - - public function __construct(string $tagName = 'kernel.reset') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->tagName = $tagName; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->has('services_resetter')) { - return; - } - - $services = $methods = []; - - foreach ($container->findTaggedServiceIds($this->tagName, true) as $id => $tags) { - $services[$id] = new Reference($id, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE); - - foreach ($tags as $attributes) { - if (!isset($attributes['method'])) { - throw new RuntimeException(sprintf('Tag "%s" requires the "method" attribute to be set.', $this->tagName)); - } - - if (!isset($methods[$id])) { - $methods[$id] = []; - } - - if ('ignore' === ($attributes['on_invalid'] ?? null)) { - $attributes['method'] = '?'.$attributes['method']; - } - - $methods[$id][] = $attributes['method']; - } - } - - if (!$services) { - $container->removeAlias('services_resetter'); - $container->removeDefinition('services_resetter'); - - return; - } - - $container->findDefinition('services_resetter') - ->setArgument(0, new IteratorArgument($services)) - ->setArgument(1, $methods); - } -} diff --git a/lib/symfony/http-kernel/DependencyInjection/ServicesResetter.php b/lib/symfony/http-kernel/DependencyInjection/ServicesResetter.php deleted file mode 100644 index 0063deca3..000000000 --- a/lib/symfony/http-kernel/DependencyInjection/ServicesResetter.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Contracts\Service\ResetInterface; - -/** - * Resets provided services. - * - * @author Alexander M. Turek - * @author Nicolas Grekas - * - * @internal - */ -class ServicesResetter implements ResetInterface -{ - private $resettableServices; - private $resetMethods; - - /** - * @param \Traversable $resettableServices - * @param array $resetMethods - */ - public function __construct(\Traversable $resettableServices, array $resetMethods) - { - $this->resettableServices = $resettableServices; - $this->resetMethods = $resetMethods; - } - - public function reset() - { - foreach ($this->resettableServices as $id => $service) { - foreach ((array) $this->resetMethods[$id] as $resetMethod) { - if ('?' === $resetMethod[0] && !method_exists($service, $resetMethod = substr($resetMethod, 1))) { - continue; - } - - $service->$resetMethod(); - } - } - } -} diff --git a/lib/symfony/http-kernel/Event/ControllerArgumentsEvent.php b/lib/symfony/http-kernel/Event/ControllerArgumentsEvent.php deleted file mode 100644 index d075ee90b..000000000 --- a/lib/symfony/http-kernel/Event/ControllerArgumentsEvent.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows filtering of controller arguments. - * - * You can call getController() to retrieve the controller and getArguments - * to retrieve the current arguments. With setArguments() you can replace - * arguments that are used to call the controller. - * - * Arguments set in the event must be compatible with the signature of the - * controller. - * - * @author Christophe Coevoet - */ -final class ControllerArgumentsEvent extends KernelEvent -{ - private $controller; - private $arguments; - - public function __construct(HttpKernelInterface $kernel, callable $controller, array $arguments, Request $request, ?int $requestType) - { - parent::__construct($kernel, $request, $requestType); - - $this->controller = $controller; - $this->arguments = $arguments; - } - - public function getController(): callable - { - return $this->controller; - } - - public function setController(callable $controller) - { - $this->controller = $controller; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function setArguments(array $arguments) - { - $this->arguments = $arguments; - } -} diff --git a/lib/symfony/http-kernel/Event/ControllerEvent.php b/lib/symfony/http-kernel/Event/ControllerEvent.php deleted file mode 100644 index da88800e2..000000000 --- a/lib/symfony/http-kernel/Event/ControllerEvent.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows filtering of a controller callable. - * - * You can call getController() to retrieve the current controller. With - * setController() you can set a new controller that is used in the processing - * of the request. - * - * Controllers should be callables. - * - * @author Bernhard Schussek - */ -final class ControllerEvent extends KernelEvent -{ - private $controller; - - public function __construct(HttpKernelInterface $kernel, callable $controller, Request $request, ?int $requestType) - { - parent::__construct($kernel, $request, $requestType); - - $this->setController($controller); - } - - public function getController(): callable - { - return $this->controller; - } - - public function setController(callable $controller): void - { - $this->controller = $controller; - } -} diff --git a/lib/symfony/http-kernel/Event/ExceptionEvent.php b/lib/symfony/http-kernel/Event/ExceptionEvent.php deleted file mode 100644 index a18fbd31f..000000000 --- a/lib/symfony/http-kernel/Event/ExceptionEvent.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to create a response for a thrown exception. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * You can also call setThrowable() to replace the thrown exception. This - * exception will be thrown if no response is set during processing of this - * event. - * - * @author Bernhard Schussek - */ -final class ExceptionEvent extends RequestEvent -{ - private $throwable; - - /** - * @var bool - */ - private $allowCustomResponseCode = false; - - public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Throwable $e) - { - parent::__construct($kernel, $request, $requestType); - - $this->setThrowable($e); - } - - public function getThrowable(): \Throwable - { - return $this->throwable; - } - - /** - * Replaces the thrown exception. - * - * This exception will be thrown if no response is set in the event. - */ - public function setThrowable(\Throwable $exception): void - { - $this->throwable = $exception; - } - - /** - * Mark the event as allowing a custom response code. - */ - public function allowCustomResponseCode(): void - { - $this->allowCustomResponseCode = true; - } - - /** - * Returns true if the event allows a custom response code. - */ - public function isAllowingCustomResponseCode(): bool - { - return $this->allowCustomResponseCode; - } -} diff --git a/lib/symfony/http-kernel/Event/FinishRequestEvent.php b/lib/symfony/http-kernel/Event/FinishRequestEvent.php deleted file mode 100644 index 306a7ad1c..000000000 --- a/lib/symfony/http-kernel/Event/FinishRequestEvent.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -/** - * Triggered whenever a request is fully processed. - * - * @author Benjamin Eberlei - */ -final class FinishRequestEvent extends KernelEvent -{ -} diff --git a/lib/symfony/http-kernel/Event/KernelEvent.php b/lib/symfony/http-kernel/Event/KernelEvent.php deleted file mode 100644 index d9d425e11..000000000 --- a/lib/symfony/http-kernel/Event/KernelEvent.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Base class for events thrown in the HttpKernel component. - * - * @author Bernhard Schussek - */ -class KernelEvent extends Event -{ - private $kernel; - private $request; - private $requestType; - - /** - * @param int $requestType The request type the kernel is currently processing; one of - * HttpKernelInterface::MAIN_REQUEST or HttpKernelInterface::SUB_REQUEST - */ - public function __construct(HttpKernelInterface $kernel, Request $request, ?int $requestType) - { - $this->kernel = $kernel; - $this->request = $request; - $this->requestType = $requestType; - } - - /** - * Returns the kernel in which this event was thrown. - * - * @return HttpKernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * Returns the request the kernel is currently processing. - * - * @return Request - */ - public function getRequest() - { - return $this->request; - } - - /** - * Returns the request type the kernel is currently processing. - * - * @return int One of HttpKernelInterface::MAIN_REQUEST and - * HttpKernelInterface::SUB_REQUEST - */ - public function getRequestType() - { - return $this->requestType; - } - - /** - * Checks if this is the main request. - */ - public function isMainRequest(): bool - { - return HttpKernelInterface::MAIN_REQUEST === $this->requestType; - } - - /** - * Checks if this is a master request. - * - * @return bool - * - * @deprecated since symfony/http-kernel 5.3, use isMainRequest() instead - */ - public function isMasterRequest() - { - trigger_deprecation('symfony/http-kernel', '5.3', '"%s()" is deprecated, use "isMainRequest()" instead.', __METHOD__); - - return $this->isMainRequest(); - } -} diff --git a/lib/symfony/http-kernel/Event/RequestEvent.php b/lib/symfony/http-kernel/Event/RequestEvent.php deleted file mode 100644 index 30ffcdcbd..000000000 --- a/lib/symfony/http-kernel/Event/RequestEvent.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Response; - -/** - * Allows to create a response for a request. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * @author Bernhard Schussek - */ -class RequestEvent extends KernelEvent -{ - private $response; - - /** - * Returns the response object. - * - * @return Response|null - */ - public function getResponse() - { - return $this->response; - } - - /** - * Sets a response and stops event propagation. - */ - public function setResponse(Response $response) - { - $this->response = $response; - - $this->stopPropagation(); - } - - /** - * Returns whether a response was set. - * - * @return bool - */ - public function hasResponse() - { - return null !== $this->response; - } -} diff --git a/lib/symfony/http-kernel/Event/ResponseEvent.php b/lib/symfony/http-kernel/Event/ResponseEvent.php deleted file mode 100644 index 1e56ebea2..000000000 --- a/lib/symfony/http-kernel/Event/ResponseEvent.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to filter a Response object. - * - * You can call getResponse() to retrieve the current response. With - * setResponse() you can set a new response that will be returned to the - * browser. - * - * @author Bernhard Schussek - */ -final class ResponseEvent extends KernelEvent -{ - private $response; - - public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, Response $response) - { - parent::__construct($kernel, $request, $requestType); - - $this->setResponse($response); - } - - public function getResponse(): Response - { - return $this->response; - } - - public function setResponse(Response $response): void - { - $this->response = $response; - } -} diff --git a/lib/symfony/http-kernel/Event/TerminateEvent.php b/lib/symfony/http-kernel/Event/TerminateEvent.php deleted file mode 100644 index 014ca535f..000000000 --- a/lib/symfony/http-kernel/Event/TerminateEvent.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to execute logic after a response was sent. - * - * Since it's only triggered on main requests, the `getRequestType()` method - * will always return the value of `HttpKernelInterface::MAIN_REQUEST`. - * - * @author Jordi Boggiano - */ -final class TerminateEvent extends KernelEvent -{ - private $response; - - public function __construct(HttpKernelInterface $kernel, Request $request, Response $response) - { - parent::__construct($kernel, $request, HttpKernelInterface::MAIN_REQUEST); - - $this->response = $response; - } - - public function getResponse(): Response - { - return $this->response; - } -} diff --git a/lib/symfony/http-kernel/Event/ViewEvent.php b/lib/symfony/http-kernel/Event/ViewEvent.php deleted file mode 100644 index 88211da41..000000000 --- a/lib/symfony/http-kernel/Event/ViewEvent.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to create a response for the return value of a controller. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * @author Bernhard Schussek - */ -final class ViewEvent extends RequestEvent -{ - /** - * The return value of the controller. - * - * @var mixed - */ - private $controllerResult; - - public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, $controllerResult) - { - parent::__construct($kernel, $request, $requestType); - - $this->controllerResult = $controllerResult; - } - - /** - * Returns the return value of the controller. - * - * @return mixed - */ - public function getControllerResult() - { - return $this->controllerResult; - } - - /** - * Assigns the return value of the controller. - * - * @param mixed $controllerResult The controller return value - */ - public function setControllerResult($controllerResult): void - { - $this->controllerResult = $controllerResult; - } -} diff --git a/lib/symfony/http-kernel/EventListener/AbstractSessionListener.php b/lib/symfony/http-kernel/EventListener/AbstractSessionListener.php deleted file mode 100644 index 27749b24b..000000000 --- a/lib/symfony/http-kernel/EventListener/AbstractSessionListener.php +++ /dev/null @@ -1,315 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Container\ContainerInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\Session\SessionUtils; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Exception\UnexpectedSessionUsageException; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Sets the session onto the request on the "kernel.request" event and saves - * it on the "kernel.response" event. - * - * In addition, if the session has been started it overrides the Cache-Control - * header in such a way that all caching is disabled in that case. - * If you have a scenario where caching responses with session information in - * them makes sense, you can disable this behaviour by setting the header - * AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER on the response. - * - * @author Johannes M. Schmitt - * @author Tobias Schultze - * - * @internal - */ -abstract class AbstractSessionListener implements EventSubscriberInterface, ResetInterface -{ - public const NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'; - - protected $container; - private $sessionUsageStack = []; - private $debug; - - /** - * @var array - */ - private $sessionOptions; - - public function __construct(ContainerInterface $container = null, bool $debug = false, array $sessionOptions = []) - { - $this->container = $container; - $this->debug = $debug; - $this->sessionOptions = $sessionOptions; - } - - public function onKernelRequest(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $request = $event->getRequest(); - if (!$request->hasSession()) { - // This variable prevents calling `$this->getSession()` twice in case the Request (and the below factory) is cloned - $sess = null; - $request->setSessionFactory(function () use (&$sess, $request) { - if (!$sess) { - $sess = $this->getSession(); - - /* - * For supporting sessions in php runtime with runners like roadrunner or swoole, the session - * cookie needs to be read from the cookie bag and set on the session storage. - * - * Do not set it when a native php session is active. - */ - if ($sess && !$sess->isStarted() && \PHP_SESSION_ACTIVE !== session_status()) { - $sessionId = $sess->getId() ?: $request->cookies->get($sess->getName(), ''); - $sess->setId($sessionId); - } - } - - return $sess; - }); - } - - $session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null; - $this->sessionUsageStack[] = $session instanceof Session ? $session->getUsageIndex() : 0; - } - - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest() || (!$this->container->has('initialized_session') && !$event->getRequest()->hasSession())) { - return; - } - - $response = $event->getResponse(); - $autoCacheControl = !$response->headers->has(self::NO_AUTO_CACHE_CONTROL_HEADER); - // Always remove the internal header if present - $response->headers->remove(self::NO_AUTO_CACHE_CONTROL_HEADER); - - if (!$session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : ($event->getRequest()->hasSession() ? $event->getRequest()->getSession() : null)) { - return; - } - - if ($session->isStarted()) { - /* - * Saves the session, in case it is still open, before sending the response/headers. - * - * This ensures several things in case the developer did not save the session explicitly: - * - * * If a session save handler without locking is used, it ensures the data is available - * on the next request, e.g. after a redirect. PHPs auto-save at script end via - * session_register_shutdown is executed after fastcgi_finish_request. So in this case - * the data could be missing the next request because it might not be saved the moment - * the new request is processed. - * * A locking save handler (e.g. the native 'files') circumvents concurrency problems like - * the one above. But by saving the session before long-running things in the terminate event, - * we ensure the session is not blocked longer than needed. - * * When regenerating the session ID no locking is involved in PHPs session design. See - * https://bugs.php.net/61470 for a discussion. So in this case, the session must - * be saved anyway before sending the headers with the new session ID. Otherwise session - * data could get lost again for concurrent requests with the new ID. One result could be - * that you get logged out after just logging in. - * - * This listener should be executed as one of the last listeners, so that previous listeners - * can still operate on the open session. This prevents the overhead of restarting it. - * Listeners after closing the session can still work with the session as usual because - * Symfonys session implementation starts the session on demand. So writing to it after - * it is saved will just restart it. - */ - $session->save(); - - /* - * For supporting sessions in php runtime with runners like roadrunner or swoole the session - * cookie need to be written on the response object and should not be written by PHP itself. - */ - $sessionName = $session->getName(); - $sessionId = $session->getId(); - $sessionOptions = $this->getSessionOptions($this->sessionOptions); - $sessionCookiePath = $sessionOptions['cookie_path'] ?? '/'; - $sessionCookieDomain = $sessionOptions['cookie_domain'] ?? null; - $sessionCookieSecure = $sessionOptions['cookie_secure'] ?? false; - $sessionCookieHttpOnly = $sessionOptions['cookie_httponly'] ?? true; - $sessionCookieSameSite = $sessionOptions['cookie_samesite'] ?? Cookie::SAMESITE_LAX; - $sessionUseCookies = $sessionOptions['use_cookies'] ?? true; - - SessionUtils::popSessionCookie($sessionName, $sessionId); - - if ($sessionUseCookies) { - $request = $event->getRequest(); - $requestSessionCookieId = $request->cookies->get($sessionName); - - $isSessionEmpty = $session->isEmpty() && empty($_SESSION); // checking $_SESSION to keep compatibility with native sessions - if ($requestSessionCookieId && $isSessionEmpty) { - // PHP internally sets the session cookie value to "deleted" when setcookie() is called with empty string $value argument - // which happens in \Symfony\Component\HttpFoundation\Session\Storage\Handler\AbstractSessionHandler::destroy - // when the session gets invalidated (for example on logout) so we must handle this case here too - // otherwise we would send two Set-Cookie headers back with the response - SessionUtils::popSessionCookie($sessionName, 'deleted'); - $response->headers->clearCookie( - $sessionName, - $sessionCookiePath, - $sessionCookieDomain, - $sessionCookieSecure, - $sessionCookieHttpOnly, - $sessionCookieSameSite - ); - } elseif ($sessionId !== $requestSessionCookieId && !$isSessionEmpty) { - $expire = 0; - $lifetime = $sessionOptions['cookie_lifetime'] ?? null; - if ($lifetime) { - $expire = time() + $lifetime; - } - - $response->headers->setCookie( - Cookie::create( - $sessionName, - $sessionId, - $expire, - $sessionCookiePath, - $sessionCookieDomain, - $sessionCookieSecure, - $sessionCookieHttpOnly, - false, - $sessionCookieSameSite - ) - ); - } - } - } - - if ($session instanceof Session ? $session->getUsageIndex() === end($this->sessionUsageStack) : !$session->isStarted()) { - return; - } - - if ($autoCacheControl) { - $maxAge = $response->headers->hasCacheControlDirective('public') ? 0 : (int) $response->getMaxAge(); - $response - ->setExpires(new \DateTimeImmutable('+'.$maxAge.' seconds')) - ->setPrivate() - ->setMaxAge($maxAge) - ->headers->addCacheControlDirective('must-revalidate'); - } - - if (!$event->getRequest()->attributes->get('_stateless', false)) { - return; - } - - if ($this->debug) { - throw new UnexpectedSessionUsageException('Session was used while the request was declared stateless.'); - } - - if ($this->container->has('logger')) { - $this->container->get('logger')->warning('Session was used while the request was declared stateless.'); - } - } - - public function onFinishRequest(FinishRequestEvent $event) - { - if ($event->isMainRequest()) { - array_pop($this->sessionUsageStack); - } - } - - public function onSessionUsage(): void - { - if (!$this->debug) { - return; - } - - if ($this->container && $this->container->has('session_collector')) { - $this->container->get('session_collector')(); - } - - if (!$requestStack = $this->container && $this->container->has('request_stack') ? $this->container->get('request_stack') : null) { - return; - } - - $stateless = false; - $clonedRequestStack = clone $requestStack; - while (null !== ($request = $clonedRequestStack->pop()) && !$stateless) { - $stateless = $request->attributes->get('_stateless'); - } - - if (!$stateless) { - return; - } - - if (!$session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : $requestStack->getCurrentRequest()->getSession()) { - return; - } - - if ($session->isStarted()) { - $session->save(); - } - - throw new UnexpectedSessionUsageException('Session was used while the request was declared stateless.'); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => ['onKernelRequest', 128], - // low priority to come after regular response listeners, but higher than StreamedResponseListener - KernelEvents::RESPONSE => ['onKernelResponse', -1000], - KernelEvents::FINISH_REQUEST => ['onFinishRequest'], - ]; - } - - public function reset(): void - { - if (\PHP_SESSION_ACTIVE === session_status()) { - session_abort(); - } - - session_unset(); - $_SESSION = []; - - if (!headers_sent()) { // session id can only be reset when no headers were so we check for headers_sent first - session_id(''); - } - } - - /** - * Gets the session object. - * - * @return SessionInterface|null - */ - abstract protected function getSession(); - - private function getSessionOptions(array $sessionOptions): array - { - $mergedSessionOptions = []; - - foreach (session_get_cookie_params() as $key => $value) { - $mergedSessionOptions['cookie_'.$key] = $value; - } - - foreach ($sessionOptions as $key => $value) { - // do the same logic as in the NativeSessionStorage - if ('cookie_secure' === $key && 'auto' === $value) { - continue; - } - $mergedSessionOptions[$key] = $value; - } - - return $mergedSessionOptions; - } -} diff --git a/lib/symfony/http-kernel/EventListener/AbstractTestSessionListener.php b/lib/symfony/http-kernel/EventListener/AbstractTestSessionListener.php deleted file mode 100644 index 838c2944b..000000000 --- a/lib/symfony/http-kernel/EventListener/AbstractTestSessionListener.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -trigger_deprecation('symfony/http-kernel', '5.4', '"%s" is deprecated use "%s" instead.', AbstractTestSessionListener::class, AbstractSessionListener::class); - -/** - * TestSessionListener. - * - * Saves session in test environment. - * - * @author Bulat Shakirzyanov - * @author Fabien Potencier - * - * @internal - * - * @deprecated since Symfony 5.4, use AbstractSessionListener instead - */ -abstract class AbstractTestSessionListener implements EventSubscriberInterface -{ - private $sessionId; - private $sessionOptions; - - public function __construct(array $sessionOptions = []) - { - $this->sessionOptions = $sessionOptions; - } - - public function onKernelRequest(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - // bootstrap the session - if ($event->getRequest()->hasSession()) { - $session = $event->getRequest()->getSession(); - } elseif (!$session = $this->getSession()) { - return; - } - - $cookies = $event->getRequest()->cookies; - - if ($cookies->has($session->getName())) { - $this->sessionId = $cookies->get($session->getName()); - $session->setId($this->sessionId); - } - } - - /** - * Checks if session was initialized and saves if current request is the main request - * Runs on 'kernel.response' in test environment. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $request = $event->getRequest(); - if (!$request->hasSession()) { - return; - } - - $session = $request->getSession(); - if ($wasStarted = $session->isStarted()) { - $session->save(); - } - - if ($session instanceof Session ? !$session->isEmpty() || (null !== $this->sessionId && $session->getId() !== $this->sessionId) : $wasStarted) { - $params = session_get_cookie_params() + ['samesite' => null]; - foreach ($this->sessionOptions as $k => $v) { - if (str_starts_with($k, 'cookie_')) { - $params[substr($k, 7)] = $v; - } - } - - foreach ($event->getResponse()->headers->getCookies() as $cookie) { - if ($session->getName() === $cookie->getName() && $params['path'] === $cookie->getPath() && $params['domain'] == $cookie->getDomain()) { - return; - } - } - - $event->getResponse()->headers->setCookie(new Cookie($session->getName(), $session->getId(), 0 === $params['lifetime'] ? 0 : time() + $params['lifetime'], $params['path'], $params['domain'], $params['secure'], $params['httponly'], false, $params['samesite'] ?: null)); - $this->sessionId = $session->getId(); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => ['onKernelRequest', 127], // AFTER SessionListener - KernelEvents::RESPONSE => ['onKernelResponse', -128], - ]; - } - - /** - * Gets the session object. - * - * @return SessionInterface|null - */ - abstract protected function getSession(); -} diff --git a/lib/symfony/http-kernel/EventListener/AddRequestFormatsListener.php b/lib/symfony/http-kernel/EventListener/AddRequestFormatsListener.php deleted file mode 100644 index 9e896adb3..000000000 --- a/lib/symfony/http-kernel/EventListener/AddRequestFormatsListener.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Adds configured formats to each request. - * - * @author Gildas Quemener - * - * @final - */ -class AddRequestFormatsListener implements EventSubscriberInterface -{ - protected $formats; - - public function __construct(array $formats) - { - $this->formats = $formats; - } - - /** - * Adds request formats. - */ - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - foreach ($this->formats as $format => $mimeTypes) { - $request->setFormat($format, $mimeTypes); - } - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents(): array - { - return [KernelEvents::REQUEST => ['onKernelRequest', 100]]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/DebugHandlersListener.php b/lib/symfony/http-kernel/EventListener/DebugHandlersListener.php deleted file mode 100644 index bd124f94d..000000000 --- a/lib/symfony/http-kernel/EventListener/DebugHandlersListener.php +++ /dev/null @@ -1,190 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleEvent; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\KernelEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Configures errors and exceptions handlers. - * - * @author Nicolas Grekas - * - * @final - * - * @internal since Symfony 5.3 - */ -class DebugHandlersListener implements EventSubscriberInterface -{ - private $earlyHandler; - private $exceptionHandler; - private $logger; - private $deprecationLogger; - private $levels; - private $throwAt; - private $scream; - private $scope; - private $firstCall = true; - private $hasTerminatedWithException; - - /** - * @param callable|null $exceptionHandler A handler that must support \Throwable instances that will be called on Exception - * @param array|int|null $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants - * @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value - * @param bool $scream Enables/disables screaming mode, where even silenced errors are logged - * @param bool $scope Enables/disables scoping mode - */ - public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = \E_ALL, ?int $throwAt = \E_ALL, bool $scream = true, $scope = true, $deprecationLogger = null, $fileLinkFormat = null) - { - if (!\is_bool($scope)) { - trigger_deprecation('symfony/http-kernel', '5.4', 'Passing a $fileLinkFormat is deprecated.'); - $scope = $deprecationLogger; - $deprecationLogger = $fileLinkFormat; - } - - $handler = set_exception_handler('is_int'); - $this->earlyHandler = \is_array($handler) ? $handler[0] : null; - restore_exception_handler(); - - $this->exceptionHandler = $exceptionHandler; - $this->logger = $logger; - $this->levels = $levels ?? \E_ALL; - $this->throwAt = \is_int($throwAt) ? $throwAt : (null === $throwAt ? null : ($throwAt ? \E_ALL : null)); - $this->scream = $scream; - $this->scope = $scope; - $this->deprecationLogger = $deprecationLogger; - } - - /** - * Configures the error handler. - */ - public function configure(object $event = null) - { - if ($event instanceof ConsoleEvent && !\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - return; - } - if (!$event instanceof KernelEvent ? !$this->firstCall : !$event->isMainRequest()) { - return; - } - $this->firstCall = $this->hasTerminatedWithException = false; - - $handler = set_exception_handler('is_int'); - $handler = \is_array($handler) ? $handler[0] : null; - restore_exception_handler(); - - if (!$handler instanceof ErrorHandler) { - $handler = $this->earlyHandler; - } - - if ($handler instanceof ErrorHandler) { - if ($this->logger || $this->deprecationLogger) { - $this->setDefaultLoggers($handler); - if (\is_array($this->levels)) { - $levels = 0; - foreach ($this->levels as $type => $log) { - $levels |= $type; - } - } else { - $levels = $this->levels; - } - - if ($this->scream) { - $handler->screamAt($levels); - } - if ($this->scope) { - $handler->scopeAt($levels & ~\E_USER_DEPRECATED & ~\E_DEPRECATED); - } else { - $handler->scopeAt(0, true); - } - $this->logger = $this->deprecationLogger = $this->levels = null; - } - if (null !== $this->throwAt) { - $handler->throwAt($this->throwAt, true); - } - } - if (!$this->exceptionHandler) { - if ($event instanceof KernelEvent) { - if (method_exists($kernel = $event->getKernel(), 'terminateWithException')) { - $request = $event->getRequest(); - $hasRun = &$this->hasTerminatedWithException; - $this->exceptionHandler = static function (\Throwable $e) use ($kernel, $request, &$hasRun) { - if ($hasRun) { - throw $e; - } - - $hasRun = true; - $kernel->terminateWithException($e, $request); - }; - } - } elseif ($event instanceof ConsoleEvent && $app = $event->getCommand()->getApplication()) { - $output = $event->getOutput(); - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - $this->exceptionHandler = static function (\Throwable $e) use ($app, $output) { - $app->renderThrowable($e, $output); - }; - } - } - if ($this->exceptionHandler) { - if ($handler instanceof ErrorHandler) { - $handler->setExceptionHandler($this->exceptionHandler); - } - $this->exceptionHandler = null; - } - } - - private function setDefaultLoggers(ErrorHandler $handler): void - { - if (\is_array($this->levels)) { - $levelsDeprecatedOnly = []; - $levelsWithoutDeprecated = []; - foreach ($this->levels as $type => $log) { - if (\E_DEPRECATED == $type || \E_USER_DEPRECATED == $type) { - $levelsDeprecatedOnly[$type] = $log; - } else { - $levelsWithoutDeprecated[$type] = $log; - } - } - } else { - $levelsDeprecatedOnly = $this->levels & (\E_DEPRECATED | \E_USER_DEPRECATED); - $levelsWithoutDeprecated = $this->levels & ~\E_DEPRECATED & ~\E_USER_DEPRECATED; - } - - $defaultLoggerLevels = $this->levels; - if ($this->deprecationLogger && $levelsDeprecatedOnly) { - $handler->setDefaultLogger($this->deprecationLogger, $levelsDeprecatedOnly); - $defaultLoggerLevels = $levelsWithoutDeprecated; - } - - if ($this->logger && $defaultLoggerLevels) { - $handler->setDefaultLogger($this->logger, $defaultLoggerLevels); - } - } - - public static function getSubscribedEvents(): array - { - $events = [KernelEvents::REQUEST => ['configure', 2048]]; - - if (\defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { - $events[ConsoleEvents::COMMAND] = ['configure', 2048]; - } - - return $events; - } -} diff --git a/lib/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php b/lib/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php deleted file mode 100644 index 6607e49e9..000000000 --- a/lib/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Ensures that the application is not indexed by search engines. - * - * @author Gary PEGEOT - */ -class DisallowRobotsIndexingListener implements EventSubscriberInterface -{ - private const HEADER_NAME = 'X-Robots-Tag'; - - public function onResponse(ResponseEvent $event): void - { - if (!$event->getResponse()->headers->has(static::HEADER_NAME)) { - $event->getResponse()->headers->set(static::HEADER_NAME, 'noindex'); - } - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [ - KernelEvents::RESPONSE => ['onResponse', -255], - ]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/DumpListener.php b/lib/symfony/http-kernel/EventListener/DumpListener.php deleted file mode 100644 index 30908a4f4..000000000 --- a/lib/symfony/http-kernel/EventListener/DumpListener.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Dumper\DataDumperInterface; -use Symfony\Component\VarDumper\Server\Connection; -use Symfony\Component\VarDumper\VarDumper; - -/** - * Configures dump() handler. - * - * @author Nicolas Grekas - */ -class DumpListener implements EventSubscriberInterface -{ - private $cloner; - private $dumper; - private $connection; - - public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper, Connection $connection = null) - { - $this->cloner = $cloner; - $this->dumper = $dumper; - $this->connection = $connection; - } - - public function configure() - { - $cloner = $this->cloner; - $dumper = $this->dumper; - $connection = $this->connection; - - VarDumper::setHandler(static function ($var) use ($cloner, $dumper, $connection) { - $data = $cloner->cloneVar($var); - - if (!$connection || !$connection->write($data)) { - $dumper->dump($data); - } - }); - } - - public static function getSubscribedEvents() - { - if (!class_exists(ConsoleEvents::class)) { - return []; - } - - // Register early to have a working dump() as early as possible - return [ConsoleEvents::COMMAND => ['configure', 1024]]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/ErrorListener.php b/lib/symfony/http-kernel/EventListener/ErrorListener.php deleted file mode 100644 index b6fd0a357..000000000 --- a/lib/symfony/http-kernel/EventListener/ErrorListener.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Debug\Exception\FlattenException as LegacyFlattenException; -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; - -/** - * @author Fabien Potencier - */ -class ErrorListener implements EventSubscriberInterface -{ - protected $controller; - protected $logger; - protected $debug; - /** - * @var array|null}> - */ - protected $exceptionsMapping; - - /** - * @param array|null}> $exceptionsMapping - */ - public function __construct($controller, LoggerInterface $logger = null, bool $debug = false, array $exceptionsMapping = []) - { - $this->controller = $controller; - $this->logger = $logger; - $this->debug = $debug; - $this->exceptionsMapping = $exceptionsMapping; - } - - public function logKernelException(ExceptionEvent $event) - { - $throwable = $event->getThrowable(); - $logLevel = null; - - foreach ($this->exceptionsMapping as $class => $config) { - if ($throwable instanceof $class && $config['log_level']) { - $logLevel = $config['log_level']; - break; - } - } - - foreach ($this->exceptionsMapping as $class => $config) { - if (!$throwable instanceof $class || !$config['status_code']) { - continue; - } - if (!$throwable instanceof HttpExceptionInterface || $throwable->getStatusCode() !== $config['status_code']) { - $headers = $throwable instanceof HttpExceptionInterface ? $throwable->getHeaders() : []; - $throwable = new HttpException($config['status_code'], $throwable->getMessage(), $throwable, $headers); - $event->setThrowable($throwable); - } - break; - } - - $e = FlattenException::createFromThrowable($throwable); - - $this->logException($throwable, sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine()), $logLevel); - } - - public function onKernelException(ExceptionEvent $event) - { - if (null === $this->controller) { - return; - } - - $throwable = $event->getThrowable(); - $request = $this->duplicateRequest($throwable, $event->getRequest()); - - try { - $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); - } catch (\Exception $e) { - $f = FlattenException::createFromThrowable($e); - - $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine())); - - $prev = $e; - do { - if ($throwable === $wrapper = $prev) { - throw $e; - } - } while ($prev = $wrapper->getPrevious()); - - $prev = new \ReflectionProperty($wrapper instanceof \Exception ? \Exception::class : \Error::class, 'previous'); - $prev->setAccessible(true); - $prev->setValue($wrapper, $throwable); - - throw $e; - } - - $event->setResponse($response); - - if ($this->debug) { - $event->getRequest()->attributes->set('_remove_csp_headers', true); - } - } - - public function removeCspHeader(ResponseEvent $event): void - { - if ($this->debug && $event->getRequest()->attributes->get('_remove_csp_headers', false)) { - $event->getResponse()->headers->remove('Content-Security-Policy'); - } - } - - public function onControllerArguments(ControllerArgumentsEvent $event) - { - $e = $event->getRequest()->attributes->get('exception'); - - if (!$e instanceof \Throwable || false === $k = array_search($e, $event->getArguments(), true)) { - return; - } - - $r = new \ReflectionFunction(\Closure::fromCallable($event->getController())); - $r = $r->getParameters()[$k] ?? null; - - if ($r && (!($r = $r->getType()) instanceof \ReflectionNamedType || \in_array($r->getName(), [FlattenException::class, LegacyFlattenException::class], true))) { - $arguments = $event->getArguments(); - $arguments[$k] = FlattenException::createFromThrowable($e); - $event->setArguments($arguments); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::CONTROLLER_ARGUMENTS => 'onControllerArguments', - KernelEvents::EXCEPTION => [ - ['logKernelException', 0], - ['onKernelException', -128], - ], - KernelEvents::RESPONSE => ['removeCspHeader', -128], - ]; - } - - /** - * Logs an exception. - */ - protected function logException(\Throwable $exception, string $message, string $logLevel = null): void - { - if (null !== $this->logger) { - if (null !== $logLevel) { - $this->logger->log($logLevel, $message, ['exception' => $exception]); - } elseif (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) { - $this->logger->critical($message, ['exception' => $exception]); - } else { - $this->logger->error($message, ['exception' => $exception]); - } - } - } - - /** - * Clones the request for the exception. - */ - protected function duplicateRequest(\Throwable $exception, Request $request): Request - { - $attributes = [ - '_controller' => $this->controller, - 'exception' => $exception, - 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, - ]; - $request = $request->duplicate(null, null, $attributes); - $request->setMethod('GET'); - - return $request; - } -} diff --git a/lib/symfony/http-kernel/EventListener/FragmentListener.php b/lib/symfony/http-kernel/EventListener/FragmentListener.php deleted file mode 100644 index c01d9ad49..000000000 --- a/lib/symfony/http-kernel/EventListener/FragmentListener.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\UriSigner; - -/** - * Handles content fragments represented by special URIs. - * - * All URL paths starting with /_fragment are handled as - * content fragments by this listener. - * - * Throws an AccessDeniedHttpException exception if the request - * is not signed or if it is not an internal sub-request. - * - * @author Fabien Potencier - * - * @final - */ -class FragmentListener implements EventSubscriberInterface -{ - private $signer; - private $fragmentPath; - - /** - * @param string $fragmentPath The path that triggers this listener - */ - public function __construct(UriSigner $signer, string $fragmentPath = '/_fragment') - { - $this->signer = $signer; - $this->fragmentPath = $fragmentPath; - } - - /** - * Fixes request attributes when the path is '/_fragment'. - * - * @throws AccessDeniedHttpException if the request does not come from a trusted IP - */ - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - - if ($this->fragmentPath !== rawurldecode($request->getPathInfo())) { - return; - } - - if ($request->attributes->has('_controller')) { - // Is a sub-request: no need to parse _path but it should still be removed from query parameters as below. - $request->query->remove('_path'); - - return; - } - - if ($event->isMainRequest()) { - $this->validateRequest($request); - } - - parse_str($request->query->get('_path', ''), $attributes); - $request->attributes->add($attributes); - $request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', []), $attributes)); - $request->query->remove('_path'); - } - - protected function validateRequest(Request $request) - { - // is the Request safe? - if (!$request->isMethodSafe()) { - throw new AccessDeniedHttpException(); - } - - // is the Request signed? - if ($this->signer->checkRequest($request)) { - return; - } - - throw new AccessDeniedHttpException(); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [['onKernelRequest', 48]], - ]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/LocaleAwareListener.php b/lib/symfony/http-kernel/EventListener/LocaleAwareListener.php deleted file mode 100644 index a126f06ec..000000000 --- a/lib/symfony/http-kernel/EventListener/LocaleAwareListener.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Contracts\Translation\LocaleAwareInterface; - -/** - * Pass the current locale to the provided services. - * - * @author Pierre Bobiet - */ -class LocaleAwareListener implements EventSubscriberInterface -{ - private $localeAwareServices; - private $requestStack; - - /** - * @param iterable $localeAwareServices - */ - public function __construct(iterable $localeAwareServices, RequestStack $requestStack) - { - $this->localeAwareServices = $localeAwareServices; - $this->requestStack = $requestStack; - } - - public function onKernelRequest(RequestEvent $event): void - { - $this->setLocale($event->getRequest()->getLocale(), $event->getRequest()->getDefaultLocale()); - } - - public function onKernelFinishRequest(FinishRequestEvent $event): void - { - if (null === $parentRequest = $this->requestStack->getParentRequest()) { - foreach ($this->localeAwareServices as $service) { - $service->setLocale($event->getRequest()->getDefaultLocale()); - } - - return; - } - - $this->setLocale($parentRequest->getLocale(), $parentRequest->getDefaultLocale()); - } - - public static function getSubscribedEvents() - { - return [ - // must be registered after the Locale listener - KernelEvents::REQUEST => [['onKernelRequest', 15]], - KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', -15]], - ]; - } - - private function setLocale(string $locale, string $defaultLocale): void - { - foreach ($this->localeAwareServices as $service) { - try { - $service->setLocale($locale); - } catch (\InvalidArgumentException $e) { - $service->setLocale($defaultLocale); - } - } - } -} diff --git a/lib/symfony/http-kernel/EventListener/LocaleListener.php b/lib/symfony/http-kernel/EventListener/LocaleListener.php deleted file mode 100644 index f19e13649..000000000 --- a/lib/symfony/http-kernel/EventListener/LocaleListener.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\KernelEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * Initializes the locale based on the current request. - * - * @author Fabien Potencier - * - * @final - */ -class LocaleListener implements EventSubscriberInterface -{ - private $router; - private $defaultLocale; - private $requestStack; - private $useAcceptLanguageHeader; - private $enabledLocales; - - public function __construct(RequestStack $requestStack, string $defaultLocale = 'en', RequestContextAwareInterface $router = null, bool $useAcceptLanguageHeader = false, array $enabledLocales = []) - { - $this->defaultLocale = $defaultLocale; - $this->requestStack = $requestStack; - $this->router = $router; - $this->useAcceptLanguageHeader = $useAcceptLanguageHeader; - $this->enabledLocales = $enabledLocales; - } - - public function setDefaultLocale(KernelEvent $event) - { - $event->getRequest()->setDefaultLocale($this->defaultLocale); - } - - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - - $this->setLocale($request); - $this->setRouterContext($request); - } - - public function onKernelFinishRequest(FinishRequestEvent $event) - { - if (null !== $parentRequest = $this->requestStack->getParentRequest()) { - $this->setRouterContext($parentRequest); - } - } - - private function setLocale(Request $request) - { - if ($locale = $request->attributes->get('_locale')) { - $request->setLocale($locale); - } elseif ($this->useAcceptLanguageHeader && $this->enabledLocales && ($preferredLanguage = $request->getPreferredLanguage($this->enabledLocales))) { - $request->setLocale($preferredLanguage); - $request->attributes->set('_vary_by_language', true); - } - } - - private function setRouterContext(Request $request) - { - if (null !== $this->router) { - $this->router->getContext()->setParameter('_locale', $request->getLocale()); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [ - ['setDefaultLocale', 100], - // must be registered after the Router to have access to the _locale - ['onKernelRequest', 16], - ], - KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], - ]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/ProfilerListener.php b/lib/symfony/http-kernel/EventListener/ProfilerListener.php deleted file mode 100644 index adbafe62e..000000000 --- a/lib/symfony/http-kernel/EventListener/ProfilerListener.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestMatcherInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Event\TerminateEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Profiler\Profile; -use Symfony\Component\HttpKernel\Profiler\Profiler; - -/** - * ProfilerListener collects data for the current request by listening to the kernel events. - * - * @author Fabien Potencier - * - * @final - */ -class ProfilerListener implements EventSubscriberInterface -{ - protected $profiler; - protected $matcher; - protected $onlyException; - protected $onlyMainRequests; - protected $exception; - /** @var \SplObjectStorage */ - protected $profiles; - protected $requestStack; - protected $collectParameter; - /** @var \SplObjectStorage */ - protected $parents; - - /** - * @param bool $onlyException True if the profiler only collects data when an exception occurs, false otherwise - * @param bool $onlyMainRequests True if the profiler only collects data when the request is the main request, false otherwise - */ - public function __construct(Profiler $profiler, RequestStack $requestStack, RequestMatcherInterface $matcher = null, bool $onlyException = false, bool $onlyMainRequests = false, string $collectParameter = null) - { - $this->profiler = $profiler; - $this->matcher = $matcher; - $this->onlyException = $onlyException; - $this->onlyMainRequests = $onlyMainRequests; - $this->profiles = new \SplObjectStorage(); - $this->parents = new \SplObjectStorage(); - $this->requestStack = $requestStack; - $this->collectParameter = $collectParameter; - } - - /** - * Handles the onKernelException event. - */ - public function onKernelException(ExceptionEvent $event) - { - if ($this->onlyMainRequests && !$event->isMainRequest()) { - return; - } - - $this->exception = $event->getThrowable(); - } - - /** - * Handles the onKernelResponse event. - */ - public function onKernelResponse(ResponseEvent $event) - { - if ($this->onlyMainRequests && !$event->isMainRequest()) { - return; - } - - if ($this->onlyException && null === $this->exception) { - return; - } - - $request = $event->getRequest(); - if (null !== $this->collectParameter && null !== $collectParameterValue = $request->get($this->collectParameter)) { - true === $collectParameterValue || filter_var($collectParameterValue, \FILTER_VALIDATE_BOOLEAN) ? $this->profiler->enable() : $this->profiler->disable(); - } - - $exception = $this->exception; - $this->exception = null; - - if (null !== $this->matcher && !$this->matcher->matches($request)) { - return; - } - - $session = $request->hasPreviousSession() && $request->hasSession() ? $request->getSession() : null; - - if ($session instanceof Session) { - $usageIndexValue = $usageIndexReference = &$session->getUsageIndex(); - $usageIndexReference = \PHP_INT_MIN; - } - - try { - if (!$profile = $this->profiler->collect($request, $event->getResponse(), $exception)) { - return; - } - } finally { - if ($session instanceof Session) { - $usageIndexReference = $usageIndexValue; - } - } - - $this->profiles[$request] = $profile; - - $this->parents[$request] = $this->requestStack->getParentRequest(); - } - - public function onKernelTerminate(TerminateEvent $event) - { - // attach children to parents - foreach ($this->profiles as $request) { - if (null !== $parentRequest = $this->parents[$request]) { - if (isset($this->profiles[$parentRequest])) { - $this->profiles[$parentRequest]->addChild($this->profiles[$request]); - } - } - } - - // save profiles - foreach ($this->profiles as $request) { - $this->profiler->saveProfile($this->profiles[$request]); - } - - $this->profiles = new \SplObjectStorage(); - $this->parents = new \SplObjectStorage(); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => ['onKernelResponse', -100], - KernelEvents::EXCEPTION => ['onKernelException', 0], - KernelEvents::TERMINATE => ['onKernelTerminate', -1024], - ]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/ResponseListener.php b/lib/symfony/http-kernel/EventListener/ResponseListener.php deleted file mode 100644 index a4090159b..000000000 --- a/lib/symfony/http-kernel/EventListener/ResponseListener.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * ResponseListener fixes the Response headers based on the Request. - * - * @author Fabien Potencier - * - * @final - */ -class ResponseListener implements EventSubscriberInterface -{ - private $charset; - private $addContentLanguageHeader; - - public function __construct(string $charset, bool $addContentLanguageHeader = false) - { - $this->charset = $charset; - $this->addContentLanguageHeader = $addContentLanguageHeader; - } - - /** - * Filters the Response. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $response = $event->getResponse(); - - if (null === $response->getCharset()) { - $response->setCharset($this->charset); - } - - if ($this->addContentLanguageHeader && !$response->isInformational() && !$response->isEmpty() && !$response->headers->has('Content-Language')) { - $response->headers->set('Content-Language', $event->getRequest()->getLocale()); - } - - if ($event->getRequest()->attributes->get('_vary_by_language')) { - $response->setVary('Accept-Language', false); - } - - $response->prepare($event->getRequest()); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => 'onKernelResponse', - ]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/RouterListener.php b/lib/symfony/http-kernel/EventListener/RouterListener.php deleted file mode 100644 index 7c4da9892..000000000 --- a/lib/symfony/http-kernel/EventListener/RouterListener.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Matcher\RequestMatcherInterface; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * Initializes the context from the request and sets request attributes based on a matching route. - * - * @author Fabien Potencier - * @author Yonel Ceruto - * - * @final - */ -class RouterListener implements EventSubscriberInterface -{ - private $matcher; - private $context; - private $logger; - private $requestStack; - private $projectDir; - private $debug; - - /** - * @param UrlMatcherInterface|RequestMatcherInterface $matcher The Url or Request matcher - * @param RequestContext|null $context The RequestContext (can be null when $matcher implements RequestContextAwareInterface) - * - * @throws \InvalidArgumentException - */ - public function __construct($matcher, RequestStack $requestStack, RequestContext $context = null, LoggerInterface $logger = null, string $projectDir = null, bool $debug = true) - { - if (!$matcher instanceof UrlMatcherInterface && !$matcher instanceof RequestMatcherInterface) { - throw new \InvalidArgumentException('Matcher must either implement UrlMatcherInterface or RequestMatcherInterface.'); - } - - if (null === $context && !$matcher instanceof RequestContextAwareInterface) { - throw new \InvalidArgumentException('You must either pass a RequestContext or the matcher must implement RequestContextAwareInterface.'); - } - - $this->matcher = $matcher; - $this->context = $context ?? $matcher->getContext(); - $this->requestStack = $requestStack; - $this->logger = $logger; - $this->projectDir = $projectDir; - $this->debug = $debug; - } - - private function setCurrentRequest(Request $request = null) - { - if (null !== $request) { - try { - $this->context->fromRequest($request); - } catch (\UnexpectedValueException $e) { - throw new BadRequestHttpException($e->getMessage(), $e, $e->getCode()); - } - } - } - - /** - * After a sub-request is done, we need to reset the routing context to the parent request so that the URL generator - * operates on the correct context again. - */ - public function onKernelFinishRequest(FinishRequestEvent $event) - { - $this->setCurrentRequest($this->requestStack->getParentRequest()); - } - - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - - $this->setCurrentRequest($request); - - if ($request->attributes->has('_controller')) { - // routing is already done - return; - } - - // add attributes based on the request (routing) - try { - // matching a request is more powerful than matching a URL path + context, so try that first - if ($this->matcher instanceof RequestMatcherInterface) { - $parameters = $this->matcher->matchRequest($request); - } else { - $parameters = $this->matcher->match($request->getPathInfo()); - } - - if (null !== $this->logger) { - $this->logger->info('Matched route "{route}".', [ - 'route' => $parameters['_route'] ?? 'n/a', - 'route_parameters' => $parameters, - 'request_uri' => $request->getUri(), - 'method' => $request->getMethod(), - ]); - } - - $request->attributes->add($parameters); - unset($parameters['_route'], $parameters['_controller']); - $request->attributes->set('_route_params', $parameters); - } catch (ResourceNotFoundException $e) { - $message = sprintf('No route found for "%s %s"', $request->getMethod(), $request->getUriForPath($request->getPathInfo())); - - if ($referer = $request->headers->get('referer')) { - $message .= sprintf(' (from "%s")', $referer); - } - - throw new NotFoundHttpException($message, $e); - } catch (MethodNotAllowedException $e) { - $message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getUriForPath($request->getPathInfo()), implode(', ', $e->getAllowedMethods())); - - throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e); - } - } - - public function onKernelException(ExceptionEvent $event) - { - if (!$this->debug || !($e = $event->getThrowable()) instanceof NotFoundHttpException) { - return; - } - - if ($e->getPrevious() instanceof NoConfigurationException) { - $event->setResponse($this->createWelcomeResponse()); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [['onKernelRequest', 32]], - KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], - KernelEvents::EXCEPTION => ['onKernelException', -64], - ]; - } - - private function createWelcomeResponse(): Response - { - $version = Kernel::VERSION; - $projectDir = realpath((string) $this->projectDir).\DIRECTORY_SEPARATOR; - $docVersion = substr(Kernel::VERSION, 0, 3); - - ob_start(); - include \dirname(__DIR__).'/Resources/welcome.html.php'; - - return new Response(ob_get_clean(), Response::HTTP_NOT_FOUND); - } -} diff --git a/lib/symfony/http-kernel/EventListener/SessionListener.php b/lib/symfony/http-kernel/EventListener/SessionListener.php deleted file mode 100644 index 61887fde6..000000000 --- a/lib/symfony/http-kernel/EventListener/SessionListener.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpKernel\Event\RequestEvent; - -/** - * Sets the session in the request. - * - * When the passed container contains a "session_storage" entry which - * holds a NativeSessionStorage instance, the "cookie_secure" option - * will be set to true whenever the current main request is secure. - * - * @author Fabien Potencier - * - * @final - */ -class SessionListener extends AbstractSessionListener -{ - public function onKernelRequest(RequestEvent $event) - { - parent::onKernelRequest($event); - - if (!$event->isMainRequest() || (!$this->container->has('session') && !$this->container->has('session_factory'))) { - return; - } - - if ($this->container->has('session_storage') - && ($storage = $this->container->get('session_storage')) instanceof NativeSessionStorage - && ($mainRequest = $this->container->get('request_stack')->getMainRequest()) - && $mainRequest->isSecure() - ) { - $storage->setOptions(['cookie_secure' => true]); - } - } - - protected function getSession(): ?SessionInterface - { - if ($this->container->has('session')) { - return $this->container->get('session'); - } - - if ($this->container->has('session_factory')) { - return $this->container->get('session_factory')->createSession(); - } - - return null; - } -} diff --git a/lib/symfony/http-kernel/EventListener/StreamedResponseListener.php b/lib/symfony/http-kernel/EventListener/StreamedResponseListener.php deleted file mode 100644 index b3f7ca40f..000000000 --- a/lib/symfony/http-kernel/EventListener/StreamedResponseListener.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * StreamedResponseListener is responsible for sending the Response - * to the client. - * - * @author Fabien Potencier - * - * @final - */ -class StreamedResponseListener implements EventSubscriberInterface -{ - /** - * Filters the Response. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $response = $event->getResponse(); - - if ($response instanceof StreamedResponse) { - $response->send(); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => ['onKernelResponse', -1024], - ]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/SurrogateListener.php b/lib/symfony/http-kernel/EventListener/SurrogateListener.php deleted file mode 100644 index 9081bff65..000000000 --- a/lib/symfony/http-kernel/EventListener/SurrogateListener.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\HttpCache\HttpCache; -use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates. - * - * @author Fabien Potencier - * - * @final - */ -class SurrogateListener implements EventSubscriberInterface -{ - private $surrogate; - - public function __construct(SurrogateInterface $surrogate = null) - { - $this->surrogate = $surrogate; - } - - /** - * Filters the Response. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $kernel = $event->getKernel(); - $surrogate = $this->surrogate; - if ($kernel instanceof HttpCache) { - $surrogate = $kernel->getSurrogate(); - if (null !== $this->surrogate && $this->surrogate->getName() !== $surrogate->getName()) { - $surrogate = $this->surrogate; - } - } - - if (null === $surrogate) { - return; - } - - $surrogate->addSurrogateControl($event->getResponse()); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => 'onKernelResponse', - ]; - } -} diff --git a/lib/symfony/http-kernel/EventListener/TestSessionListener.php b/lib/symfony/http-kernel/EventListener/TestSessionListener.php deleted file mode 100644 index 45fa312be..000000000 --- a/lib/symfony/http-kernel/EventListener/TestSessionListener.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -trigger_deprecation('symfony/http-kernel', '5.4', '"%s" is deprecated, use "%s" instead.', TestSessionListener::class, SessionListener::class); - -/** - * Sets the session in the request. - * - * @author Fabien Potencier - * - * @final - * - * @deprecated since Symfony 5.4, use SessionListener instead - */ -class TestSessionListener extends AbstractTestSessionListener -{ - private $container; - - public function __construct(ContainerInterface $container, array $sessionOptions = []) - { - $this->container = $container; - parent::__construct($sessionOptions); - } - - protected function getSession(): ?SessionInterface - { - if ($this->container->has('session')) { - return $this->container->get('session'); - } - - return null; - } -} diff --git a/lib/symfony/http-kernel/EventListener/ValidateRequestListener.php b/lib/symfony/http-kernel/EventListener/ValidateRequestListener.php deleted file mode 100644 index caa0f32aa..000000000 --- a/lib/symfony/http-kernel/EventListener/ValidateRequestListener.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Validates Requests. - * - * @author Magnus Nordlander - * - * @final - */ -class ValidateRequestListener implements EventSubscriberInterface -{ - /** - * Performs the validation. - */ - public function onKernelRequest(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - $request = $event->getRequest(); - - if ($request::getTrustedProxies()) { - $request->getClientIps(); - } - - $request->getHost(); - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [ - ['onKernelRequest', 256], - ], - ]; - } -} diff --git a/lib/symfony/http-kernel/Exception/AccessDeniedHttpException.php b/lib/symfony/http-kernel/Exception/AccessDeniedHttpException.php deleted file mode 100644 index 58680a327..000000000 --- a/lib/symfony/http-kernel/Exception/AccessDeniedHttpException.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Fabien Potencier - * @author Christophe Coevoet - */ -class AccessDeniedHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(403, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/BadRequestHttpException.php b/lib/symfony/http-kernel/Exception/BadRequestHttpException.php deleted file mode 100644 index f530f7db4..000000000 --- a/lib/symfony/http-kernel/Exception/BadRequestHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class BadRequestHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(400, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/ConflictHttpException.php b/lib/symfony/http-kernel/Exception/ConflictHttpException.php deleted file mode 100644 index 79c36041c..000000000 --- a/lib/symfony/http-kernel/Exception/ConflictHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class ConflictHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(409, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php b/lib/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php deleted file mode 100644 index 54c80be90..000000000 --- a/lib/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Grégoire Pineau - */ -class ControllerDoesNotReturnResponseException extends \LogicException -{ - public function __construct(string $message, callable $controller, string $file, int $line) - { - parent::__construct($message); - - if (!$controllerDefinition = $this->parseControllerDefinition($controller)) { - return; - } - - $this->file = $controllerDefinition['file']; - $this->line = $controllerDefinition['line']; - $r = new \ReflectionProperty(\Exception::class, 'trace'); - $r->setAccessible(true); - $r->setValue($this, array_merge([ - [ - 'line' => $line, - 'file' => $file, - ], - ], $this->getTrace())); - } - - private function parseControllerDefinition(callable $controller): ?array - { - if (\is_string($controller) && str_contains($controller, '::')) { - $controller = explode('::', $controller); - } - - if (\is_array($controller)) { - try { - $r = new \ReflectionMethod($controller[0], $controller[1]); - - return [ - 'file' => $r->getFileName(), - 'line' => $r->getEndLine(), - ]; - } catch (\ReflectionException $e) { - return null; - } - } - - if ($controller instanceof \Closure) { - $r = new \ReflectionFunction($controller); - - return [ - 'file' => $r->getFileName(), - 'line' => $r->getEndLine(), - ]; - } - - if (\is_object($controller)) { - $r = new \ReflectionClass($controller); - - try { - $line = $r->getMethod('__invoke')->getEndLine(); - } catch (\ReflectionException $e) { - $line = $r->getEndLine(); - } - - return [ - 'file' => $r->getFileName(), - 'line' => $line, - ]; - } - - return null; - } -} diff --git a/lib/symfony/http-kernel/Exception/GoneHttpException.php b/lib/symfony/http-kernel/Exception/GoneHttpException.php deleted file mode 100644 index 9ea65057b..000000000 --- a/lib/symfony/http-kernel/Exception/GoneHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class GoneHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(410, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/HttpException.php b/lib/symfony/http-kernel/Exception/HttpException.php deleted file mode 100644 index 249fe366d..000000000 --- a/lib/symfony/http-kernel/Exception/HttpException.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * HttpException. - * - * @author Kris Wallsmith - */ -class HttpException extends \RuntimeException implements HttpExceptionInterface -{ - private $statusCode; - private $headers; - - public function __construct(int $statusCode, ?string $message = '', \Throwable $previous = null, array $headers = [], ?int $code = 0) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $this->statusCode = $statusCode; - $this->headers = $headers; - - parent::__construct($message, $code, $previous); - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function getHeaders() - { - return $this->headers; - } - - /** - * Set response headers. - * - * @param array $headers Response headers - */ - public function setHeaders(array $headers) - { - $this->headers = $headers; - } -} diff --git a/lib/symfony/http-kernel/Exception/HttpExceptionInterface.php b/lib/symfony/http-kernel/Exception/HttpExceptionInterface.php deleted file mode 100644 index 4ae050945..000000000 --- a/lib/symfony/http-kernel/Exception/HttpExceptionInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * Interface for HTTP error exceptions. - * - * @author Kris Wallsmith - */ -interface HttpExceptionInterface extends \Throwable -{ - /** - * Returns the status code. - * - * @return int - */ - public function getStatusCode(); - - /** - * Returns response headers. - * - * @return array - */ - public function getHeaders(); -} diff --git a/lib/symfony/http-kernel/Exception/InvalidMetadataException.php b/lib/symfony/http-kernel/Exception/InvalidMetadataException.php deleted file mode 100644 index 129267ab0..000000000 --- a/lib/symfony/http-kernel/Exception/InvalidMetadataException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -class InvalidMetadataException extends \LogicException -{ -} diff --git a/lib/symfony/http-kernel/Exception/LengthRequiredHttpException.php b/lib/symfony/http-kernel/Exception/LengthRequiredHttpException.php deleted file mode 100644 index fcac13785..000000000 --- a/lib/symfony/http-kernel/Exception/LengthRequiredHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class LengthRequiredHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(411, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php b/lib/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php deleted file mode 100644 index 37576bcac..000000000 --- a/lib/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Kris Wallsmith - */ -class MethodNotAllowedHttpException extends HttpException -{ - /** - * @param string[] $allow An array of allowed methods - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct(array $allow, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $headers['Allow'] = strtoupper(implode(', ', $allow)); - - parent::__construct(405, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/NotAcceptableHttpException.php b/lib/symfony/http-kernel/Exception/NotAcceptableHttpException.php deleted file mode 100644 index 5a422406b..000000000 --- a/lib/symfony/http-kernel/Exception/NotAcceptableHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class NotAcceptableHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(406, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/NotFoundHttpException.php b/lib/symfony/http-kernel/Exception/NotFoundHttpException.php deleted file mode 100644 index a475113c5..000000000 --- a/lib/symfony/http-kernel/Exception/NotFoundHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Fabien Potencier - */ -class NotFoundHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(404, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/PreconditionFailedHttpException.php b/lib/symfony/http-kernel/Exception/PreconditionFailedHttpException.php deleted file mode 100644 index e23740a28..000000000 --- a/lib/symfony/http-kernel/Exception/PreconditionFailedHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class PreconditionFailedHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(412, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php b/lib/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php deleted file mode 100644 index 5c31fae82..000000000 --- a/lib/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - * - * @see http://tools.ietf.org/html/rfc6585 - */ -class PreconditionRequiredHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(428, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php b/lib/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php deleted file mode 100644 index d5681bbeb..000000000 --- a/lib/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class ServiceUnavailableHttpException extends HttpException -{ - /** - * @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - if ($retryAfter) { - $headers['Retry-After'] = $retryAfter; - } - - parent::__construct(503, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/TooManyRequestsHttpException.php b/lib/symfony/http-kernel/Exception/TooManyRequestsHttpException.php deleted file mode 100644 index fd74402b5..000000000 --- a/lib/symfony/http-kernel/Exception/TooManyRequestsHttpException.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - * - * @see http://tools.ietf.org/html/rfc6585 - */ -class TooManyRequestsHttpException extends HttpException -{ - /** - * @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - if ($retryAfter) { - $headers['Retry-After'] = $retryAfter; - } - - parent::__construct(429, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/UnauthorizedHttpException.php b/lib/symfony/http-kernel/Exception/UnauthorizedHttpException.php deleted file mode 100644 index aeb9713a3..000000000 --- a/lib/symfony/http-kernel/Exception/UnauthorizedHttpException.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class UnauthorizedHttpException extends HttpException -{ - /** - * @param string $challenge WWW-Authenticate challenge string - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct(string $challenge, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $headers['WWW-Authenticate'] = $challenge; - - parent::__construct(401, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php b/lib/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php deleted file mode 100644 index 0145b1691..000000000 --- a/lib/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Mathias Arlaud - */ -class UnexpectedSessionUsageException extends \LogicException -{ -} diff --git a/lib/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php b/lib/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php deleted file mode 100644 index 7b828b1d9..000000000 --- a/lib/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Steve Hutchins - */ -class UnprocessableEntityHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(422, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php b/lib/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php deleted file mode 100644 index 7908423f4..000000000 --- a/lib/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class UnsupportedMediaTypeHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(415, $message, $previous, $headers, $code); - } -} diff --git a/lib/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php b/lib/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php deleted file mode 100644 index 4e4d028b4..000000000 --- a/lib/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; -use Symfony\Component\HttpKernel\UriSigner; - -/** - * Implements Surrogate rendering strategy. - * - * @author Fabien Potencier - */ -abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRenderer -{ - private $surrogate; - private $inlineStrategy; - private $signer; - - /** - * The "fallback" strategy when surrogate is not available should always be an - * instance of InlineFragmentRenderer. - * - * @param FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported - */ - public function __construct(SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null) - { - $this->surrogate = $surrogate; - $this->inlineStrategy = $inlineStrategy; - $this->signer = $signer; - } - - /** - * {@inheritdoc} - * - * Note that if the current Request has no surrogate capability, this method - * falls back to use the inline rendering strategy. - * - * Additional available options: - * - * * alt: an alternative URI to render in case of an error - * * comment: a comment to add when returning the surrogate tag - * - * Note, that not all surrogate strategies support all options. For now - * 'alt' and 'comment' are only supported by ESI. - * - * @see Symfony\Component\HttpKernel\HttpCache\SurrogateInterface - */ - public function render($uri, Request $request, array $options = []) - { - if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) { - if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) { - throw new \InvalidArgumentException('Passing non-scalar values as part of URI attributes to the ESI and SSI rendering strategies is not supported. Use a different rendering strategy or pass scalar values.'); - } - - return $this->inlineStrategy->render($uri, $request, $options); - } - - if ($uri instanceof ControllerReference) { - $uri = $this->generateSignedFragmentUri($uri, $request); - } - - $alt = $options['alt'] ?? null; - if ($alt instanceof ControllerReference) { - $alt = $this->generateSignedFragmentUri($alt, $request); - } - - $tag = $this->surrogate->renderIncludeTag($uri, $alt, $options['ignore_errors'] ?? false, $options['comment'] ?? ''); - - return new Response($tag); - } - - private function generateSignedFragmentUri(ControllerReference $uri, Request $request): string - { - return (new FragmentUriGenerator($this->fragmentPath, $this->signer))->generate($uri, $request); - } - - private function containsNonScalars(array $values): bool - { - foreach ($values as $value) { - if (\is_scalar($value) || null === $value) { - continue; - } - - if (!\is_array($value) || $this->containsNonScalars($value)) { - return true; - } - } - - return false; - } -} diff --git a/lib/symfony/http-kernel/Fragment/EsiFragmentRenderer.php b/lib/symfony/http-kernel/Fragment/EsiFragmentRenderer.php deleted file mode 100644 index a4570e3be..000000000 --- a/lib/symfony/http-kernel/Fragment/EsiFragmentRenderer.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -/** - * Implements the ESI rendering strategy. - * - * @author Fabien Potencier - */ -class EsiFragmentRenderer extends AbstractSurrogateFragmentRenderer -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'esi'; - } -} diff --git a/lib/symfony/http-kernel/Fragment/FragmentHandler.php b/lib/symfony/http-kernel/Fragment/FragmentHandler.php deleted file mode 100644 index 1ecaaef1a..000000000 --- a/lib/symfony/http-kernel/Fragment/FragmentHandler.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\Exception\HttpException; - -/** - * Renders a URI that represents a resource fragment. - * - * This class handles the rendering of resource fragments that are included into - * a main resource. The handling of the rendering is managed by specialized renderers. - * - * @author Fabien Potencier - * - * @see FragmentRendererInterface - */ -class FragmentHandler -{ - private $debug; - private $renderers = []; - private $requestStack; - - /** - * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances - * @param bool $debug Whether the debug mode is enabled or not - */ - public function __construct(RequestStack $requestStack, array $renderers = [], bool $debug = false) - { - $this->requestStack = $requestStack; - foreach ($renderers as $renderer) { - $this->addRenderer($renderer); - } - $this->debug = $debug; - } - - /** - * Adds a renderer. - */ - public function addRenderer(FragmentRendererInterface $renderer) - { - $this->renderers[$renderer->getName()] = $renderer; - } - - /** - * Renders a URI and returns the Response content. - * - * Available options: - * - * * ignore_errors: true to return an empty string in case of an error - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @return string|null - * - * @throws \InvalidArgumentException when the renderer does not exist - * @throws \LogicException when no main request is being handled - */ - public function render($uri, string $renderer = 'inline', array $options = []) - { - if (!isset($options['ignore_errors'])) { - $options['ignore_errors'] = !$this->debug; - } - - if (!isset($this->renderers[$renderer])) { - throw new \InvalidArgumentException(sprintf('The "%s" renderer does not exist.', $renderer)); - } - - if (!$request = $this->requestStack->getCurrentRequest()) { - throw new \LogicException('Rendering a fragment can only be done when handling a Request.'); - } - - return $this->deliver($this->renderers[$renderer]->render($uri, $request, $options)); - } - - /** - * Delivers the Response as a string. - * - * When the Response is a StreamedResponse, the content is streamed immediately - * instead of being returned. - * - * @return string|null The Response content or null when the Response is streamed - * - * @throws \RuntimeException when the Response is not successful - */ - protected function deliver(Response $response) - { - if (!$response->isSuccessful()) { - $responseStatusCode = $response->getStatusCode(); - throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %d).', $this->requestStack->getCurrentRequest()->getUri(), $responseStatusCode), 0, new HttpException($responseStatusCode)); - } - - if (!$response instanceof StreamedResponse) { - return $response->getContent(); - } - - $response->sendContent(); - - return null; - } -} diff --git a/lib/symfony/http-kernel/Fragment/FragmentRendererInterface.php b/lib/symfony/http-kernel/Fragment/FragmentRendererInterface.php deleted file mode 100644 index 568b1781a..000000000 --- a/lib/symfony/http-kernel/Fragment/FragmentRendererInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; - -/** - * Interface implemented by all rendering strategies. - * - * @author Fabien Potencier - */ -interface FragmentRendererInterface -{ - /** - * Renders a URI and returns the Response content. - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @return Response - */ - public function render($uri, Request $request, array $options = []); - - /** - * Gets the name of the strategy. - * - * @return string - */ - public function getName(); -} diff --git a/lib/symfony/http-kernel/Fragment/FragmentUriGenerator.php b/lib/symfony/http-kernel/Fragment/FragmentUriGenerator.php deleted file mode 100644 index 4c0fac997..000000000 --- a/lib/symfony/http-kernel/Fragment/FragmentUriGenerator.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\UriSigner; - -/** - * Generates a fragment URI. - * - * @author Kévin Dunglas - * @author Fabien Potencier - */ -final class FragmentUriGenerator implements FragmentUriGeneratorInterface -{ - private $fragmentPath; - private $signer; - private $requestStack; - - public function __construct(string $fragmentPath, UriSigner $signer = null, RequestStack $requestStack = null) - { - $this->fragmentPath = $fragmentPath; - $this->signer = $signer; - $this->requestStack = $requestStack; - } - - /** - * {@inheritDoc} - */ - public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string - { - if (null === $request && (null === $this->requestStack || null === $request = $this->requestStack->getCurrentRequest())) { - throw new \LogicException('Generating a fragment URL can only be done when handling a Request.'); - } - - if ($sign && null === $this->signer) { - throw new \LogicException('You must use a URI when using the ESI rendering strategy or set a URL signer.'); - } - - if ($strict) { - $this->checkNonScalar($controller->attributes); - } - - // We need to forward the current _format and _locale values as we don't have - // a proper routing pattern to do the job for us. - // This makes things inconsistent if you switch from rendering a controller - // to rendering a route if the route pattern does not contain the special - // _format and _locale placeholders. - if (!isset($controller->attributes['_format'])) { - $controller->attributes['_format'] = $request->getRequestFormat(); - } - if (!isset($controller->attributes['_locale'])) { - $controller->attributes['_locale'] = $request->getLocale(); - } - - $controller->attributes['_controller'] = $controller->controller; - $controller->query['_path'] = http_build_query($controller->attributes, '', '&'); - $path = $this->fragmentPath.'?'.http_build_query($controller->query, '', '&'); - - // we need to sign the absolute URI, but want to return the path only. - $fragmentUri = $sign || $absolute ? $request->getUriForPath($path) : $request->getBaseUrl().$path; - - if (!$sign) { - return $fragmentUri; - } - - $fragmentUri = $this->signer->sign($fragmentUri); - - return $absolute ? $fragmentUri : substr($fragmentUri, \strlen($request->getSchemeAndHttpHost())); - } - - private function checkNonScalar(array $values): void - { - foreach ($values as $key => $value) { - if (\is_array($value)) { - $this->checkNonScalar($value); - } elseif (!\is_scalar($value) && null !== $value) { - throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key)); - } - } - } -} diff --git a/lib/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php b/lib/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php deleted file mode 100644 index b211f5e37..000000000 --- a/lib/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ControllerReference; - -/** - * Interface implemented by rendering strategies able to generate an URL for a fragment. - * - * @author Kévin Dunglas - */ -interface FragmentUriGeneratorInterface -{ - /** - * Generates a fragment URI for a given controller. - * - * @param bool $absolute Whether to generate an absolute URL or not - * @param bool $strict Whether to allow non-scalar attributes or not - * @param bool $sign Whether to sign the URL or not - */ - public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string; -} diff --git a/lib/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/lib/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php deleted file mode 100644 index 446ce2d9d..000000000 --- a/lib/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\UriSigner; -use Twig\Environment; - -/** - * Implements the Hinclude rendering strategy. - * - * @author Fabien Potencier - */ -class HIncludeFragmentRenderer extends RoutableFragmentRenderer -{ - private $globalDefaultTemplate; - private $signer; - private $twig; - private $charset; - - /** - * @param string $globalDefaultTemplate The global default content (it can be a template name or the content) - */ - public function __construct(Environment $twig = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8') - { - $this->twig = $twig; - $this->globalDefaultTemplate = $globalDefaultTemplate; - $this->signer = $signer; - $this->charset = $charset; - } - - /** - * Checks if a templating engine has been set. - * - * @return bool - */ - public function hasTemplating() - { - return null !== $this->twig; - } - - /** - * {@inheritdoc} - * - * Additional available options: - * - * * default: The default content (it can be a template name or the content) - * * id: An optional hx:include tag id attribute - * * attributes: An optional array of hx:include tag attributes - */ - public function render($uri, Request $request, array $options = []) - { - if ($uri instanceof ControllerReference) { - $uri = (new FragmentUriGenerator($this->fragmentPath, $this->signer))->generate($uri, $request); - } - - // We need to replace ampersands in the URI with the encoded form in order to return valid html/xml content. - $uri = str_replace('&', '&', $uri); - - $template = $options['default'] ?? $this->globalDefaultTemplate; - if (null !== $this->twig && $template && $this->twig->getLoader()->exists($template)) { - $content = $this->twig->render($template); - } else { - $content = $template; - } - - $attributes = isset($options['attributes']) && \is_array($options['attributes']) ? $options['attributes'] : []; - if (isset($options['id']) && $options['id']) { - $attributes['id'] = $options['id']; - } - $renderedAttributes = ''; - if (\count($attributes) > 0) { - $flags = \ENT_QUOTES | \ENT_SUBSTITUTE; - foreach ($attributes as $attribute => $value) { - $renderedAttributes .= sprintf( - ' %s="%s"', - htmlspecialchars($attribute, $flags, $this->charset, false), - htmlspecialchars($value, $flags, $this->charset, false) - ); - } - } - - return new Response(sprintf('%s', $uri, $renderedAttributes, $content)); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'hinclude'; - } -} diff --git a/lib/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/lib/symfony/http-kernel/Fragment/InlineFragmentRenderer.php deleted file mode 100644 index ea45fdcb3..000000000 --- a/lib/symfony/http-kernel/Fragment/InlineFragmentRenderer.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\HttpCache\SubRequestHandler; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * Implements the inline rendering strategy where the Request is rendered by the current HTTP kernel. - * - * @author Fabien Potencier - */ -class InlineFragmentRenderer extends RoutableFragmentRenderer -{ - private $kernel; - private $dispatcher; - - public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null) - { - $this->kernel = $kernel; - $this->dispatcher = $dispatcher; - } - - /** - * {@inheritdoc} - * - * Additional available options: - * - * * alt: an alternative URI to render in case of an error - */ - public function render($uri, Request $request, array $options = []) - { - $reference = null; - if ($uri instanceof ControllerReference) { - $reference = $uri; - - // Remove attributes from the generated URI because if not, the Symfony - // routing system will use them to populate the Request attributes. We don't - // want that as we want to preserve objects (so we manually set Request attributes - // below instead) - $attributes = $reference->attributes; - $reference->attributes = []; - - // The request format and locale might have been overridden by the user - foreach (['_format', '_locale'] as $key) { - if (isset($attributes[$key])) { - $reference->attributes[$key] = $attributes[$key]; - } - } - - $uri = $this->generateFragmentUri($uri, $request, false, false); - - $reference->attributes = array_merge($attributes, $reference->attributes); - } - - $subRequest = $this->createSubRequest($uri, $request); - - // override Request attributes as they can be objects (which are not supported by the generated URI) - if (null !== $reference) { - $subRequest->attributes->add($reference->attributes); - } - - $level = ob_get_level(); - try { - return SubRequestHandler::handle($this->kernel, $subRequest, HttpKernelInterface::SUB_REQUEST, false); - } catch (\Exception $e) { - // we dispatch the exception event to trigger the logging - // the response that comes back is ignored - if (isset($options['ignore_errors']) && $options['ignore_errors'] && $this->dispatcher) { - $event = new ExceptionEvent($this->kernel, $request, HttpKernelInterface::SUB_REQUEST, $e); - - $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); - } - - // let's clean up the output buffers that were created by the sub-request - Response::closeOutputBuffers($level, false); - - if (isset($options['alt'])) { - $alt = $options['alt']; - unset($options['alt']); - - return $this->render($alt, $request, $options); - } - - if (!isset($options['ignore_errors']) || !$options['ignore_errors']) { - throw $e; - } - - return new Response(); - } - } - - protected function createSubRequest(string $uri, Request $request) - { - $cookies = $request->cookies->all(); - $server = $request->server->all(); - - unset($server['HTTP_IF_MODIFIED_SINCE']); - unset($server['HTTP_IF_NONE_MATCH']); - - $subRequest = Request::create($uri, 'get', [], $cookies, [], $server); - if ($request->headers->has('Surrogate-Capability')) { - $subRequest->headers->set('Surrogate-Capability', $request->headers->get('Surrogate-Capability')); - } - - static $setSession; - - if (null === $setSession) { - $setSession = \Closure::bind(static function ($subRequest, $request) { $subRequest->session = $request->session; }, null, Request::class); - } - $setSession($subRequest, $request); - - if ($request->get('_format')) { - $subRequest->attributes->set('_format', $request->get('_format')); - } - if ($request->getDefaultLocale() !== $request->getLocale()) { - $subRequest->setLocale($request->getLocale()); - } - - return $subRequest; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'inline'; - } -} diff --git a/lib/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php b/lib/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php deleted file mode 100644 index e922ffb64..000000000 --- a/lib/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\EventListener\FragmentListener; - -/** - * Adds the possibility to generate a fragment URI for a given Controller. - * - * @author Fabien Potencier - */ -abstract class RoutableFragmentRenderer implements FragmentRendererInterface -{ - /** - * @internal - */ - protected $fragmentPath = '/_fragment'; - - /** - * Sets the fragment path that triggers the fragment listener. - * - * @see FragmentListener - */ - public function setFragmentPath(string $path) - { - $this->fragmentPath = $path; - } - - /** - * Generates a fragment URI for a given controller. - * - * @param bool $absolute Whether to generate an absolute URL or not - * @param bool $strict Whether to allow non-scalar attributes or not - * - * @return string - */ - protected function generateFragmentUri(ControllerReference $reference, Request $request, bool $absolute = false, bool $strict = true) - { - return (new FragmentUriGenerator($this->fragmentPath))->generate($reference, $request, $absolute, $strict, false); - } -} diff --git a/lib/symfony/http-kernel/Fragment/SsiFragmentRenderer.php b/lib/symfony/http-kernel/Fragment/SsiFragmentRenderer.php deleted file mode 100644 index 45e7122f0..000000000 --- a/lib/symfony/http-kernel/Fragment/SsiFragmentRenderer.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -/** - * Implements the SSI rendering strategy. - * - * @author Sebastian Krebs - */ -class SsiFragmentRenderer extends AbstractSurrogateFragmentRenderer -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'ssi'; - } -} diff --git a/lib/symfony/http-kernel/HttpCache/AbstractSurrogate.php b/lib/symfony/http-kernel/HttpCache/AbstractSurrogate.php deleted file mode 100644 index f2d809e8d..000000000 --- a/lib/symfony/http-kernel/HttpCache/AbstractSurrogate.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Abstract class implementing Surrogate capabilities to Request and Response instances. - * - * @author Fabien Potencier - * @author Robin Chalas - */ -abstract class AbstractSurrogate implements SurrogateInterface -{ - protected $contentTypes; - protected $phpEscapeMap = [ - ['', '', '', ''], - ]; - - /** - * @param array $contentTypes An array of content-type that should be parsed for Surrogate information - * (default: text/html, text/xml, application/xhtml+xml, and application/xml) - */ - public function __construct(array $contentTypes = ['text/html', 'text/xml', 'application/xhtml+xml', 'application/xml']) - { - $this->contentTypes = $contentTypes; - } - - /** - * Returns a new cache strategy instance. - * - * @return ResponseCacheStrategyInterface - */ - public function createCacheStrategy() - { - return new ResponseCacheStrategy(); - } - - /** - * {@inheritdoc} - */ - public function hasSurrogateCapability(Request $request) - { - if (null === $value = $request->headers->get('Surrogate-Capability')) { - return false; - } - - return str_contains($value, sprintf('%s/1.0', strtoupper($this->getName()))); - } - - /** - * {@inheritdoc} - */ - public function addSurrogateCapability(Request $request) - { - $current = $request->headers->get('Surrogate-Capability'); - $new = sprintf('symfony="%s/1.0"', strtoupper($this->getName())); - - $request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new); - } - - /** - * {@inheritdoc} - */ - public function needsParsing(Response $response) - { - if (!$control = $response->headers->get('Surrogate-Control')) { - return false; - } - - $pattern = sprintf('#content="[^"]*%s/1.0[^"]*"#', strtoupper($this->getName())); - - return (bool) preg_match($pattern, $control); - } - - /** - * {@inheritdoc} - */ - public function handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors) - { - $subRequest = Request::create($uri, Request::METHOD_GET, [], $cache->getRequest()->cookies->all(), [], $cache->getRequest()->server->all()); - - try { - $response = $cache->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true); - - if (!$response->isSuccessful() && Response::HTTP_NOT_MODIFIED !== $response->getStatusCode()) { - throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %d).', $subRequest->getUri(), $response->getStatusCode())); - } - - return $response->getContent(); - } catch (\Exception $e) { - if ($alt) { - return $this->handle($cache, $alt, '', $ignoreErrors); - } - - if (!$ignoreErrors) { - throw $e; - } - } - - return ''; - } - - /** - * Remove the Surrogate from the Surrogate-Control header. - */ - protected function removeFromControl(Response $response) - { - if (!$response->headers->has('Surrogate-Control')) { - return; - } - - $value = $response->headers->get('Surrogate-Control'); - $upperName = strtoupper($this->getName()); - - if (sprintf('content="%s/1.0"', $upperName) == $value) { - $response->headers->remove('Surrogate-Control'); - } elseif (preg_match(sprintf('#,\s*content="%s/1.0"#', $upperName), $value)) { - $response->headers->set('Surrogate-Control', preg_replace(sprintf('#,\s*content="%s/1.0"#', $upperName), '', $value)); - } elseif (preg_match(sprintf('#content="%s/1.0",\s*#', $upperName), $value)) { - $response->headers->set('Surrogate-Control', preg_replace(sprintf('#content="%s/1.0",\s*#', $upperName), '', $value)); - } - } -} diff --git a/lib/symfony/http-kernel/HttpCache/Esi.php b/lib/symfony/http-kernel/HttpCache/Esi.php deleted file mode 100644 index cd6a00a10..000000000 --- a/lib/symfony/http-kernel/HttpCache/Esi.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Esi implements the ESI capabilities to Request and Response instances. - * - * For more information, read the following W3C notes: - * - * * ESI Language Specification 1.0 (http://www.w3.org/TR/esi-lang) - * - * * Edge Architecture Specification (http://www.w3.org/TR/edge-arch) - * - * @author Fabien Potencier - */ -class Esi extends AbstractSurrogate -{ - public function getName() - { - return 'esi'; - } - - /** - * {@inheritdoc} - */ - public function addSurrogateControl(Response $response) - { - if (str_contains($response->getContent(), 'headers->set('Surrogate-Control', 'content="ESI/1.0"'); - } - } - - /** - * {@inheritdoc} - */ - public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '') - { - $html = sprintf('', - $uri, - $ignoreErrors ? ' onerror="continue"' : '', - $alt ? sprintf(' alt="%s"', $alt) : '' - ); - - if (!empty($comment)) { - return sprintf("\n%s", $comment, $html); - } - - return $html; - } - - /** - * {@inheritdoc} - */ - public function process(Request $request, Response $response) - { - $type = $response->headers->get('Content-Type'); - if (empty($type)) { - $type = 'text/html'; - } - - $parts = explode(';', $type); - if (!\in_array($parts[0], $this->contentTypes)) { - return $response; - } - - // we don't use a proper XML parser here as we can have ESI tags in a plain text response - $content = $response->getContent(); - $content = preg_replace('#.*?#s', '', $content); - $content = preg_replace('#]+>#s', '', $content); - - $chunks = preg_split('##', $content, -1, \PREG_SPLIT_DELIM_CAPTURE); - $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); - - $i = 1; - while (isset($chunks[$i])) { - $options = []; - preg_match_all('/(src|onerror|alt)="([^"]*?)"/', $chunks[$i], $matches, \PREG_SET_ORDER); - foreach ($matches as $set) { - $options[$set[1]] = $set[2]; - } - - if (!isset($options['src'])) { - throw new \RuntimeException('Unable to process an ESI tag without a "src" attribute.'); - } - - $chunks[$i] = sprintf('surrogate->handle($this, %s, %s, %s) ?>'."\n", - var_export($options['src'], true), - var_export($options['alt'] ?? '', true), - isset($options['onerror']) && 'continue' === $options['onerror'] ? 'true' : 'false' - ); - ++$i; - $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); - ++$i; - } - $content = implode('', $chunks); - - $response->setContent($content); - $response->headers->set('X-Body-Eval', 'ESI'); - - // remove ESI/1.0 from the Surrogate-Control header - $this->removeFromControl($response); - - return $response; - } -} diff --git a/lib/symfony/http-kernel/HttpCache/HttpCache.php b/lib/symfony/http-kernel/HttpCache/HttpCache.php deleted file mode 100644 index 28be364c1..000000000 --- a/lib/symfony/http-kernel/HttpCache/HttpCache.php +++ /dev/null @@ -1,737 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\TerminableInterface; - -/** - * Cache provides HTTP caching. - * - * @author Fabien Potencier - */ -class HttpCache implements HttpKernelInterface, TerminableInterface -{ - private $kernel; - private $store; - private $request; - private $surrogate; - private $surrogateCacheStrategy; - private $options = []; - private $traces = []; - - /** - * Constructor. - * - * The available options are: - * - * * debug If true, exceptions are thrown when things go wrong. Otherwise, the cache - * will try to carry on and deliver a meaningful response. - * - * * trace_level May be one of 'none', 'short' and 'full'. For 'short', a concise trace of the - * main request will be added as an HTTP header. 'full' will add traces for all - * requests (including ESI subrequests). (default: 'full' if in debug; 'none' otherwise) - * - * * trace_header Header name to use for traces. (default: X-Symfony-Cache) - * - * * default_ttl The number of seconds that a cache entry should be considered - * fresh when no explicit freshness information is provided in - * a response. Explicit Cache-Control or Expires headers - * override this value. (default: 0) - * - * * private_headers Set of request headers that trigger "private" cache-control behavior - * on responses that don't explicitly state whether the response is - * public or private via a Cache-Control directive. (default: Authorization and Cookie) - * - * * allow_reload Specifies whether the client can force a cache reload by including a - * Cache-Control "no-cache" directive in the request. Set it to ``true`` - * for compliance with RFC 2616. (default: false) - * - * * allow_revalidate Specifies whether the client can force a cache revalidate by including - * a Cache-Control "max-age=0" directive in the request. Set it to ``true`` - * for compliance with RFC 2616. (default: false) - * - * * stale_while_revalidate Specifies the default number of seconds (the granularity is the second as the - * Response TTL precision is a second) during which the cache can immediately return - * a stale response while it revalidates it in the background (default: 2). - * This setting is overridden by the stale-while-revalidate HTTP Cache-Control - * extension (see RFC 5861). - * - * * stale_if_error Specifies the default number of seconds (the granularity is the second) during which - * the cache can serve a stale response when an error is encountered (default: 60). - * This setting is overridden by the stale-if-error HTTP Cache-Control extension - * (see RFC 5861). - */ - public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = []) - { - $this->store = $store; - $this->kernel = $kernel; - $this->surrogate = $surrogate; - - // needed in case there is a fatal error because the backend is too slow to respond - register_shutdown_function([$this->store, 'cleanup']); - - $this->options = array_merge([ - 'debug' => false, - 'default_ttl' => 0, - 'private_headers' => ['Authorization', 'Cookie'], - 'allow_reload' => false, - 'allow_revalidate' => false, - 'stale_while_revalidate' => 2, - 'stale_if_error' => 60, - 'trace_level' => 'none', - 'trace_header' => 'X-Symfony-Cache', - ], $options); - - if (!isset($options['trace_level'])) { - $this->options['trace_level'] = $this->options['debug'] ? 'full' : 'none'; - } - } - - /** - * Gets the current store. - * - * @return StoreInterface - */ - public function getStore() - { - return $this->store; - } - - /** - * Returns an array of events that took place during processing of the last request. - * - * @return array - */ - public function getTraces() - { - return $this->traces; - } - - private function addTraces(Response $response) - { - $traceString = null; - - if ('full' === $this->options['trace_level']) { - $traceString = $this->getLog(); - } - - if ('short' === $this->options['trace_level'] && $masterId = array_key_first($this->traces)) { - $traceString = implode('/', $this->traces[$masterId]); - } - - if (null !== $traceString) { - $response->headers->add([$this->options['trace_header'] => $traceString]); - } - } - - /** - * Returns a log message for the events of the last request processing. - * - * @return string - */ - public function getLog() - { - $log = []; - foreach ($this->traces as $request => $traces) { - $log[] = sprintf('%s: %s', $request, implode(', ', $traces)); - } - - return implode('; ', $log); - } - - /** - * Gets the Request instance associated with the main request. - * - * @return Request - */ - public function getRequest() - { - return $this->request; - } - - /** - * Gets the Kernel instance. - * - * @return HttpKernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * Gets the Surrogate instance. - * - * @return SurrogateInterface - * - * @throws \LogicException - */ - public function getSurrogate() - { - return $this->surrogate; - } - - /** - * {@inheritdoc} - */ - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) - { - // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism - if (HttpKernelInterface::MAIN_REQUEST === $type) { - $this->traces = []; - // Keep a clone of the original request for surrogates so they can access it. - // We must clone here to get a separate instance because the application will modify the request during - // the application flow (we know it always does because we do ourselves by setting REMOTE_ADDR to 127.0.0.1 - // and adding the X-Forwarded-For header, see HttpCache::forward()). - $this->request = clone $request; - if (null !== $this->surrogate) { - $this->surrogateCacheStrategy = $this->surrogate->createCacheStrategy(); - } - } - - $this->traces[$this->getTraceKey($request)] = []; - - if (!$request->isMethodSafe()) { - $response = $this->invalidate($request, $catch); - } elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) { - $response = $this->pass($request, $catch); - } elseif ($this->options['allow_reload'] && $request->isNoCache()) { - /* - If allow_reload is configured and the client requests "Cache-Control: no-cache", - reload the cache by fetching a fresh response and caching it (if possible). - */ - $this->record($request, 'reload'); - $response = $this->fetch($request, $catch); - } else { - $response = $this->lookup($request, $catch); - } - - $this->restoreResponseBody($request, $response); - - if (HttpKernelInterface::MAIN_REQUEST === $type) { - $this->addTraces($response); - } - - if (null !== $this->surrogate) { - if (HttpKernelInterface::MAIN_REQUEST === $type) { - $this->surrogateCacheStrategy->update($response); - } else { - $this->surrogateCacheStrategy->add($response); - } - } - - $response->prepare($request); - - $response->isNotModified($request); - - return $response; - } - - /** - * {@inheritdoc} - */ - public function terminate(Request $request, Response $response) - { - if ($this->getKernel() instanceof TerminableInterface) { - $this->getKernel()->terminate($request, $response); - } - } - - /** - * Forwards the Request to the backend without storing the Response in the cache. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - */ - protected function pass(Request $request, bool $catch = false) - { - $this->record($request, 'pass'); - - return $this->forward($request, $catch); - } - - /** - * Invalidates non-safe methods (like POST, PUT, and DELETE). - * - * @param bool $catch Whether to process exceptions - * - * @return Response - * - * @throws \Exception - * - * @see RFC2616 13.10 - */ - protected function invalidate(Request $request, bool $catch = false) - { - $response = $this->pass($request, $catch); - - // invalidate only when the response is successful - if ($response->isSuccessful() || $response->isRedirect()) { - try { - $this->store->invalidate($request); - - // As per the RFC, invalidate Location and Content-Location URLs if present - foreach (['Location', 'Content-Location'] as $header) { - if ($uri = $response->headers->get($header)) { - $subRequest = Request::create($uri, 'get', [], [], [], $request->server->all()); - - $this->store->invalidate($subRequest); - } - } - - $this->record($request, 'invalidate'); - } catch (\Exception $e) { - $this->record($request, 'invalidate-failed'); - - if ($this->options['debug']) { - throw $e; - } - } - } - - return $response; - } - - /** - * Lookups a Response from the cache for the given Request. - * - * When a matching cache entry is found and is fresh, it uses it as the - * response without forwarding any request to the backend. When a matching - * cache entry is found but is stale, it attempts to "validate" the entry with - * the backend using conditional GET. When no matching cache entry is found, - * it triggers "miss" processing. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - * - * @throws \Exception - */ - protected function lookup(Request $request, bool $catch = false) - { - try { - $entry = $this->store->lookup($request); - } catch (\Exception $e) { - $this->record($request, 'lookup-failed'); - - if ($this->options['debug']) { - throw $e; - } - - return $this->pass($request, $catch); - } - - if (null === $entry) { - $this->record($request, 'miss'); - - return $this->fetch($request, $catch); - } - - if (!$this->isFreshEnough($request, $entry)) { - $this->record($request, 'stale'); - - return $this->validate($request, $entry, $catch); - } - - if ($entry->headers->hasCacheControlDirective('no-cache')) { - return $this->validate($request, $entry, $catch); - } - - $this->record($request, 'fresh'); - - $entry->headers->set('Age', $entry->getAge()); - - return $entry; - } - - /** - * Validates that a cache entry is fresh. - * - * The original request is used as a template for a conditional - * GET request with the backend. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - */ - protected function validate(Request $request, Response $entry, bool $catch = false) - { - $subRequest = clone $request; - - // send no head requests because we want content - if ('HEAD' === $request->getMethod()) { - $subRequest->setMethod('GET'); - } - - // add our cached last-modified validator - if ($entry->headers->has('Last-Modified')) { - $subRequest->headers->set('If-Modified-Since', $entry->headers->get('Last-Modified')); - } - - // Add our cached etag validator to the environment. - // We keep the etags from the client to handle the case when the client - // has a different private valid entry which is not cached here. - $cachedEtags = $entry->getEtag() ? [$entry->getEtag()] : []; - $requestEtags = $request->getETags(); - if ($etags = array_unique(array_merge($cachedEtags, $requestEtags))) { - $subRequest->headers->set('If-None-Match', implode(', ', $etags)); - } - - $response = $this->forward($subRequest, $catch, $entry); - - if (304 == $response->getStatusCode()) { - $this->record($request, 'valid'); - - // return the response and not the cache entry if the response is valid but not cached - $etag = $response->getEtag(); - if ($etag && \in_array($etag, $requestEtags) && !\in_array($etag, $cachedEtags)) { - return $response; - } - - $entry = clone $entry; - $entry->headers->remove('Date'); - - foreach (['Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified'] as $name) { - if ($response->headers->has($name)) { - $entry->headers->set($name, $response->headers->get($name)); - } - } - - $response = $entry; - } else { - $this->record($request, 'invalid'); - } - - if ($response->isCacheable()) { - $this->store($request, $response); - } - - return $response; - } - - /** - * Unconditionally fetches a fresh response from the backend and - * stores it in the cache if is cacheable. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - */ - protected function fetch(Request $request, bool $catch = false) - { - $subRequest = clone $request; - - // send no head requests because we want content - if ('HEAD' === $request->getMethod()) { - $subRequest->setMethod('GET'); - } - - // avoid that the backend sends no content - $subRequest->headers->remove('If-Modified-Since'); - $subRequest->headers->remove('If-None-Match'); - - $response = $this->forward($subRequest, $catch); - - if ($response->isCacheable()) { - $this->store($request, $response); - } - - return $response; - } - - /** - * Forwards the Request to the backend and returns the Response. - * - * All backend requests (cache passes, fetches, cache validations) - * run through this method. - * - * @param bool $catch Whether to catch exceptions or not - * @param Response|null $entry A Response instance (the stale entry if present, null otherwise) - * - * @return Response - */ - protected function forward(Request $request, bool $catch = false, Response $entry = null) - { - if ($this->surrogate) { - $this->surrogate->addSurrogateCapability($request); - } - - // always a "master" request (as the real master request can be in cache) - $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch); - - /* - * Support stale-if-error given on Responses or as a config option. - * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual - * Cache-Control directives) that - * - * A cache MUST NOT generate a stale response if it is prohibited by an - * explicit in-protocol directive (e.g., by a "no-store" or "no-cache" - * cache directive, a "must-revalidate" cache-response-directive, or an - * applicable "s-maxage" or "proxy-revalidate" cache-response-directive; - * see Section 5.2.2). - * - * https://tools.ietf.org/html/rfc7234#section-4.2.4 - * - * We deviate from this in one detail, namely that we *do* serve entries in the - * stale-if-error case even if they have a `s-maxage` Cache-Control directive. - */ - if (null !== $entry - && \in_array($response->getStatusCode(), [500, 502, 503, 504]) - && !$entry->headers->hasCacheControlDirective('no-cache') - && !$entry->mustRevalidate() - ) { - if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) { - $age = $this->options['stale_if_error']; - } - - /* - * stale-if-error gives the (extra) time that the Response may be used *after* it has become stale. - * So we compare the time the $entry has been sitting in the cache already with the - * time it was fresh plus the allowed grace period. - */ - if ($entry->getAge() <= $entry->getMaxAge() + $age) { - $this->record($request, 'stale-if-error'); - - return $entry; - } - } - - /* - RFC 7231 Sect. 7.1.1.2 says that a server that does not have a reasonably accurate - clock MUST NOT send a "Date" header, although it MUST send one in most other cases - except for 1xx or 5xx responses where it MAY do so. - - Anyway, a client that received a message without a "Date" header MUST add it. - */ - if (!$response->headers->has('Date')) { - $response->setDate(\DateTime::createFromFormat('U', time())); - } - - $this->processResponseBody($request, $response); - - if ($this->isPrivateRequest($request) && !$response->headers->hasCacheControlDirective('public')) { - $response->setPrivate(); - } elseif ($this->options['default_ttl'] > 0 && null === $response->getTtl() && !$response->headers->getCacheControlDirective('must-revalidate')) { - $response->setTtl($this->options['default_ttl']); - } - - return $response; - } - - /** - * Checks whether the cache entry is "fresh enough" to satisfy the Request. - * - * @return bool - */ - protected function isFreshEnough(Request $request, Response $entry) - { - if (!$entry->isFresh()) { - return $this->lock($request, $entry); - } - - if ($this->options['allow_revalidate'] && null !== $maxAge = $request->headers->getCacheControlDirective('max-age')) { - return $maxAge > 0 && $maxAge >= $entry->getAge(); - } - - return true; - } - - /** - * Locks a Request during the call to the backend. - * - * @return bool true if the cache entry can be returned even if it is staled, false otherwise - */ - protected function lock(Request $request, Response $entry) - { - // try to acquire a lock to call the backend - $lock = $this->store->lock($request); - - if (true === $lock) { - // we have the lock, call the backend - return false; - } - - // there is already another process calling the backend - - // May we serve a stale response? - if ($this->mayServeStaleWhileRevalidate($entry)) { - $this->record($request, 'stale-while-revalidate'); - - return true; - } - - // wait for the lock to be released - if ($this->waitForLock($request)) { - // replace the current entry with the fresh one - $new = $this->lookup($request); - $entry->headers = $new->headers; - $entry->setContent($new->getContent()); - $entry->setStatusCode($new->getStatusCode()); - $entry->setProtocolVersion($new->getProtocolVersion()); - foreach ($new->headers->getCookies() as $cookie) { - $entry->headers->setCookie($cookie); - } - } else { - // backend is slow as hell, send a 503 response (to avoid the dog pile effect) - $entry->setStatusCode(503); - $entry->setContent('503 Service Unavailable'); - $entry->headers->set('Retry-After', 10); - } - - return true; - } - - /** - * Writes the Response to the cache. - * - * @throws \Exception - */ - protected function store(Request $request, Response $response) - { - try { - $this->store->write($request, $response); - - $this->record($request, 'store'); - - $response->headers->set('Age', $response->getAge()); - } catch (\Exception $e) { - $this->record($request, 'store-failed'); - - if ($this->options['debug']) { - throw $e; - } - } - - // now that the response is cached, release the lock - $this->store->unlock($request); - } - - /** - * Restores the Response body. - */ - private function restoreResponseBody(Request $request, Response $response) - { - if ($response->headers->has('X-Body-Eval')) { - ob_start(); - - if ($response->headers->has('X-Body-File')) { - include $response->headers->get('X-Body-File'); - } else { - eval('; ?>'.$response->getContent().'setContent(ob_get_clean()); - $response->headers->remove('X-Body-Eval'); - if (!$response->headers->has('Transfer-Encoding')) { - $response->headers->set('Content-Length', \strlen($response->getContent())); - } - } elseif ($response->headers->has('X-Body-File')) { - // Response does not include possibly dynamic content (ESI, SSI), so we need - // not handle the content for HEAD requests - if (!$request->isMethod('HEAD')) { - $response->setContent(file_get_contents($response->headers->get('X-Body-File'))); - } - } else { - return; - } - - $response->headers->remove('X-Body-File'); - } - - protected function processResponseBody(Request $request, Response $response) - { - if (null !== $this->surrogate && $this->surrogate->needsParsing($response)) { - $this->surrogate->process($request, $response); - } - } - - /** - * Checks if the Request includes authorization or other sensitive information - * that should cause the Response to be considered private by default. - */ - private function isPrivateRequest(Request $request): bool - { - foreach ($this->options['private_headers'] as $key) { - $key = strtolower(str_replace('HTTP_', '', $key)); - - if ('cookie' === $key) { - if (\count($request->cookies->all())) { - return true; - } - } elseif ($request->headers->has($key)) { - return true; - } - } - - return false; - } - - /** - * Records that an event took place. - */ - private function record(Request $request, string $event) - { - $this->traces[$this->getTraceKey($request)][] = $event; - } - - /** - * Calculates the key we use in the "trace" array for a given request. - */ - private function getTraceKey(Request $request): string - { - $path = $request->getPathInfo(); - if ($qs = $request->getQueryString()) { - $path .= '?'.$qs; - } - - return $request->getMethod().' '.$path; - } - - /** - * Checks whether the given (cached) response may be served as "stale" when a revalidation - * is currently in progress. - */ - private function mayServeStaleWhileRevalidate(Response $entry): bool - { - $timeout = $entry->headers->getCacheControlDirective('stale-while-revalidate'); - - if (null === $timeout) { - $timeout = $this->options['stale_while_revalidate']; - } - - return abs($entry->getTtl() ?? 0) < $timeout; - } - - /** - * Waits for the store to release a locked entry. - */ - private function waitForLock(Request $request): bool - { - $wait = 0; - while ($this->store->isLocked($request) && $wait < 100) { - usleep(50000); - ++$wait; - } - - return $wait < 100; - } -} diff --git a/lib/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php b/lib/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php deleted file mode 100644 index cf8682257..000000000 --- a/lib/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php +++ /dev/null @@ -1,234 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Response; - -/** - * ResponseCacheStrategy knows how to compute the Response cache HTTP header - * based on the different response cache headers. - * - * This implementation changes the main response TTL to the smallest TTL received - * or force validation if one of the surrogates has validation cache strategy. - * - * @author Fabien Potencier - */ -class ResponseCacheStrategy implements ResponseCacheStrategyInterface -{ - /** - * Cache-Control headers that are sent to the final response if they appear in ANY of the responses. - */ - private const OVERRIDE_DIRECTIVES = ['private', 'no-cache', 'no-store', 'no-transform', 'must-revalidate', 'proxy-revalidate']; - - /** - * Cache-Control headers that are sent to the final response if they appear in ALL of the responses. - */ - private const INHERIT_DIRECTIVES = ['public', 'immutable']; - - private $embeddedResponses = 0; - private $isNotCacheableResponseEmbedded = false; - private $age = 0; - private $flagDirectives = [ - 'no-cache' => null, - 'no-store' => null, - 'no-transform' => null, - 'must-revalidate' => null, - 'proxy-revalidate' => null, - 'public' => null, - 'private' => null, - 'immutable' => null, - ]; - private $ageDirectives = [ - 'max-age' => null, - 's-maxage' => null, - 'expires' => null, - ]; - - /** - * {@inheritdoc} - */ - public function add(Response $response) - { - ++$this->embeddedResponses; - - foreach (self::OVERRIDE_DIRECTIVES as $directive) { - if ($response->headers->hasCacheControlDirective($directive)) { - $this->flagDirectives[$directive] = true; - } - } - - foreach (self::INHERIT_DIRECTIVES as $directive) { - if (false !== $this->flagDirectives[$directive]) { - $this->flagDirectives[$directive] = $response->headers->hasCacheControlDirective($directive); - } - } - - $age = $response->getAge(); - $this->age = max($this->age, $age); - - if ($this->willMakeFinalResponseUncacheable($response)) { - $this->isNotCacheableResponseEmbedded = true; - - return; - } - - $isHeuristicallyCacheable = $response->headers->hasCacheControlDirective('public'); - $maxAge = $response->headers->hasCacheControlDirective('max-age') ? (int) $response->headers->getCacheControlDirective('max-age') : null; - $this->storeRelativeAgeDirective('max-age', $maxAge, $age, $isHeuristicallyCacheable); - $sharedMaxAge = $response->headers->hasCacheControlDirective('s-maxage') ? (int) $response->headers->getCacheControlDirective('s-maxage') : $maxAge; - $this->storeRelativeAgeDirective('s-maxage', $sharedMaxAge, $age, $isHeuristicallyCacheable); - - $expires = $response->getExpires(); - $expires = null !== $expires ? (int) $expires->format('U') - (int) $response->getDate()->format('U') : null; - $this->storeRelativeAgeDirective('expires', $expires >= 0 ? $expires : null, 0, $isHeuristicallyCacheable); - } - - /** - * {@inheritdoc} - */ - public function update(Response $response) - { - // if we have no embedded Response, do nothing - if (0 === $this->embeddedResponses) { - return; - } - - // Remove validation related headers of the master response, - // because some of the response content comes from at least - // one embedded response (which likely has a different caching strategy). - $response->setEtag(null); - $response->setLastModified(null); - - $this->add($response); - - $response->headers->set('Age', $this->age); - - if ($this->isNotCacheableResponseEmbedded) { - if ($this->flagDirectives['no-store']) { - $response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); - } else { - $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); - } - - return; - } - - $flags = array_filter($this->flagDirectives); - - if (isset($flags['must-revalidate'])) { - $flags['no-cache'] = true; - } - - $response->headers->set('Cache-Control', implode(', ', array_keys($flags))); - - $maxAge = null; - - if (is_numeric($this->ageDirectives['max-age'])) { - $maxAge = $this->ageDirectives['max-age'] + $this->age; - $response->headers->addCacheControlDirective('max-age', $maxAge); - } - - if (is_numeric($this->ageDirectives['s-maxage'])) { - $sMaxage = $this->ageDirectives['s-maxage'] + $this->age; - - if ($maxAge !== $sMaxage) { - $response->headers->addCacheControlDirective('s-maxage', $sMaxage); - } - } - - if (is_numeric($this->ageDirectives['expires'])) { - $date = clone $response->getDate(); - $date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds'); - $response->setExpires($date); - } - } - - /** - * RFC2616, Section 13.4. - * - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4 - */ - private function willMakeFinalResponseUncacheable(Response $response): bool - { - // RFC2616: A response received with a status code of 200, 203, 300, 301 or 410 - // MAY be stored by a cache […] unless a cache-control directive prohibits caching. - if ($response->headers->hasCacheControlDirective('no-cache') - || $response->headers->getCacheControlDirective('no-store') - ) { - return true; - } - - // Last-Modified and Etag headers cannot be merged, they render the response uncacheable - // by default (except if the response also has max-age etc.). - if (\in_array($response->getStatusCode(), [200, 203, 300, 301, 410]) - && null === $response->getLastModified() - && null === $response->getEtag() - ) { - return false; - } - - // RFC2616: A response received with any other status code (e.g. status codes 302 and 307) - // MUST NOT be returned in a reply to a subsequent request unless there are - // cache-control directives or another header(s) that explicitly allow it. - $cacheControl = ['max-age', 's-maxage', 'must-revalidate', 'proxy-revalidate', 'public', 'private']; - foreach ($cacheControl as $key) { - if ($response->headers->hasCacheControlDirective($key)) { - return false; - } - } - - if ($response->headers->has('Expires')) { - return false; - } - - return true; - } - - /** - * Store lowest max-age/s-maxage/expires for the final response. - * - * The response might have been stored in cache a while ago. To keep things comparable, - * we have to subtract the age so that the value is normalized for an age of 0. - * - * If the value is lower than the currently stored value, we update the value, to keep a rolling - * minimal value of each instruction. - * - * If the value is NULL and the isHeuristicallyCacheable parameter is false, the directive will - * not be set on the final response. In this case, not all responses had the directive set and no - * value can be found that satisfies the requirements of all responses. The directive will be dropped - * from the final response. - * - * If the isHeuristicallyCacheable parameter is true, however, the current response has been marked - * as cacheable in a public (shared) cache, but did not provide an explicit lifetime that would serve - * as an upper bound. In this case, we can proceed and possibly keep the directive on the final response. - */ - private function storeRelativeAgeDirective(string $directive, ?int $value, int $age, bool $isHeuristicallyCacheable) - { - if (null === $value) { - if ($isHeuristicallyCacheable) { - /* - * See https://datatracker.ietf.org/doc/html/rfc7234#section-4.2.2 - * This particular response does not require maximum lifetime; heuristics might be applied. - * Other responses, however, might have more stringent requirements on maximum lifetime. - * So, return early here so that the final response can have the more limiting value set. - */ - return; - } - $this->ageDirectives[$directive] = false; - } - - if (false !== $this->ageDirectives[$directive]) { - $value -= $age; - $this->ageDirectives[$directive] = null !== $this->ageDirectives[$directive] ? min($this->ageDirectives[$directive], $value) : $value; - } - } -} diff --git a/lib/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php b/lib/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php deleted file mode 100644 index e282299ae..000000000 --- a/lib/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Response; - -/** - * ResponseCacheStrategyInterface implementations know how to compute the - * Response cache HTTP header based on the different response cache headers. - * - * @author Fabien Potencier - */ -interface ResponseCacheStrategyInterface -{ - /** - * Adds a Response. - */ - public function add(Response $response); - - /** - * Updates the Response HTTP headers based on the embedded Responses. - */ - public function update(Response $response); -} diff --git a/lib/symfony/http-kernel/HttpCache/Ssi.php b/lib/symfony/http-kernel/HttpCache/Ssi.php deleted file mode 100644 index f114e05cf..000000000 --- a/lib/symfony/http-kernel/HttpCache/Ssi.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Ssi implements the SSI capabilities to Request and Response instances. - * - * @author Sebastian Krebs - */ -class Ssi extends AbstractSurrogate -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'ssi'; - } - - /** - * {@inheritdoc} - */ - public function addSurrogateControl(Response $response) - { - if (str_contains($response->getContent(), '', $uri); - } - - /** - * {@inheritdoc} - */ - public function process(Request $request, Response $response) - { - $type = $response->headers->get('Content-Type'); - if (empty($type)) { - $type = 'text/html'; - } - - $parts = explode(';', $type); - if (!\in_array($parts[0], $this->contentTypes)) { - return $response; - } - - // we don't use a proper XML parser here as we can have SSI tags in a plain text response - $content = $response->getContent(); - - $chunks = preg_split('##', $content, -1, \PREG_SPLIT_DELIM_CAPTURE); - $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); - - $i = 1; - while (isset($chunks[$i])) { - $options = []; - preg_match_all('/(virtual)="([^"]*?)"/', $chunks[$i], $matches, \PREG_SET_ORDER); - foreach ($matches as $set) { - $options[$set[1]] = $set[2]; - } - - if (!isset($options['virtual'])) { - throw new \RuntimeException('Unable to process an SSI tag without a "virtual" attribute.'); - } - - $chunks[$i] = sprintf('surrogate->handle($this, %s, \'\', false) ?>'."\n", - var_export($options['virtual'], true) - ); - ++$i; - $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); - ++$i; - } - $content = implode('', $chunks); - - $response->setContent($content); - $response->headers->set('X-Body-Eval', 'SSI'); - - // remove SSI/1.0 from the Surrogate-Control header - $this->removeFromControl($response); - - return $response; - } -} diff --git a/lib/symfony/http-kernel/HttpCache/Store.php b/lib/symfony/http-kernel/HttpCache/Store.php deleted file mode 100644 index 8087e0cb1..000000000 --- a/lib/symfony/http-kernel/HttpCache/Store.php +++ /dev/null @@ -1,489 +0,0 @@ - - * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Store implements all the logic for storing cache metadata (Request and Response headers). - * - * @author Fabien Potencier - */ -class Store implements StoreInterface -{ - protected $root; - /** @var \SplObjectStorage */ - private $keyCache; - /** @var array */ - private $locks = []; - private $options; - - /** - * Constructor. - * - * The available options are: - * - * * private_headers Set of response headers that should not be stored - * when a response is cached. (default: Set-Cookie) - * - * @throws \RuntimeException - */ - public function __construct(string $root, array $options = []) - { - $this->root = $root; - if (!is_dir($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { - throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); - } - $this->keyCache = new \SplObjectStorage(); - $this->options = array_merge([ - 'private_headers' => ['Set-Cookie'], - ], $options); - } - - /** - * Cleanups storage. - */ - public function cleanup() - { - // unlock everything - foreach ($this->locks as $lock) { - flock($lock, \LOCK_UN); - fclose($lock); - } - - $this->locks = []; - } - - /** - * Tries to lock the cache for a given Request, without blocking. - * - * @return bool|string true if the lock is acquired, the path to the current lock otherwise - */ - public function lock(Request $request) - { - $key = $this->getCacheKey($request); - - if (!isset($this->locks[$key])) { - $path = $this->getPath($key); - if (!is_dir(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { - return $path; - } - $h = fopen($path, 'c'); - if (!flock($h, \LOCK_EX | \LOCK_NB)) { - fclose($h); - - return $path; - } - - $this->locks[$key] = $h; - } - - return true; - } - - /** - * Releases the lock for the given Request. - * - * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise - */ - public function unlock(Request $request) - { - $key = $this->getCacheKey($request); - - if (isset($this->locks[$key])) { - flock($this->locks[$key], \LOCK_UN); - fclose($this->locks[$key]); - unset($this->locks[$key]); - - return true; - } - - return false; - } - - public function isLocked(Request $request) - { - $key = $this->getCacheKey($request); - - if (isset($this->locks[$key])) { - return true; // shortcut if lock held by this process - } - - if (!is_file($path = $this->getPath($key))) { - return false; - } - - $h = fopen($path, 'r'); - flock($h, \LOCK_EX | \LOCK_NB, $wouldBlock); - flock($h, \LOCK_UN); // release the lock we just acquired - fclose($h); - - return (bool) $wouldBlock; - } - - /** - * Locates a cached Response for the Request provided. - * - * @return Response|null - */ - public function lookup(Request $request) - { - $key = $this->getCacheKey($request); - - if (!$entries = $this->getMetadata($key)) { - return null; - } - - // find a cached entry that matches the request. - $match = null; - foreach ($entries as $entry) { - if ($this->requestsMatch(isset($entry[1]['vary'][0]) ? implode(', ', $entry[1]['vary']) : '', $request->headers->all(), $entry[0])) { - $match = $entry; - - break; - } - } - - if (null === $match) { - return null; - } - - $headers = $match[1]; - if (file_exists($path = $this->getPath($headers['x-content-digest'][0]))) { - return $this->restoreResponse($headers, $path); - } - - // TODO the metaStore referenced an entity that doesn't exist in - // the entityStore. We definitely want to return nil but we should - // also purge the entry from the meta-store when this is detected. - return null; - } - - /** - * Writes a cache entry to the store for the given Request and Response. - * - * Existing entries are read and any that match the response are removed. This - * method calls write with the new list of cache entries. - * - * @return string - * - * @throws \RuntimeException - */ - public function write(Request $request, Response $response) - { - $key = $this->getCacheKey($request); - $storedEnv = $this->persistRequest($request); - - if ($response->headers->has('X-Body-File')) { - // Assume the response came from disk, but at least perform some safeguard checks - if (!$response->headers->has('X-Content-Digest')) { - throw new \RuntimeException('A restored response must have the X-Content-Digest header.'); - } - - $digest = $response->headers->get('X-Content-Digest'); - if ($this->getPath($digest) !== $response->headers->get('X-Body-File')) { - throw new \RuntimeException('X-Body-File and X-Content-Digest do not match.'); - } - // Everything seems ok, omit writing content to disk - } else { - $digest = $this->generateContentDigest($response); - $response->headers->set('X-Content-Digest', $digest); - - if (!$this->save($digest, $response->getContent(), false)) { - throw new \RuntimeException('Unable to store the entity.'); - } - - if (!$response->headers->has('Transfer-Encoding')) { - $response->headers->set('Content-Length', \strlen($response->getContent())); - } - } - - // read existing cache entries, remove non-varying, and add this one to the list - $entries = []; - $vary = $response->headers->get('vary'); - foreach ($this->getMetadata($key) as $entry) { - if (!isset($entry[1]['vary'][0])) { - $entry[1]['vary'] = ['']; - } - - if ($entry[1]['vary'][0] != $vary || !$this->requestsMatch($vary ?? '', $entry[0], $storedEnv)) { - $entries[] = $entry; - } - } - - $headers = $this->persistResponse($response); - unset($headers['age']); - - foreach ($this->options['private_headers'] as $h) { - unset($headers[strtolower($h)]); - } - - array_unshift($entries, [$storedEnv, $headers]); - - if (!$this->save($key, serialize($entries))) { - throw new \RuntimeException('Unable to store the metadata.'); - } - - return $key; - } - - /** - * Returns content digest for $response. - * - * @return string - */ - protected function generateContentDigest(Response $response) - { - return 'en'.hash('sha256', $response->getContent()); - } - - /** - * Invalidates all cache entries that match the request. - * - * @throws \RuntimeException - */ - public function invalidate(Request $request) - { - $modified = false; - $key = $this->getCacheKey($request); - - $entries = []; - foreach ($this->getMetadata($key) as $entry) { - $response = $this->restoreResponse($entry[1]); - if ($response->isFresh()) { - $response->expire(); - $modified = true; - $entries[] = [$entry[0], $this->persistResponse($response)]; - } else { - $entries[] = $entry; - } - } - - if ($modified && !$this->save($key, serialize($entries))) { - throw new \RuntimeException('Unable to store the metadata.'); - } - } - - /** - * Determines whether two Request HTTP header sets are non-varying based on - * the vary response header value provided. - * - * @param string|null $vary A Response vary header - * @param array $env1 A Request HTTP header array - * @param array $env2 A Request HTTP header array - */ - private function requestsMatch(?string $vary, array $env1, array $env2): bool - { - if (empty($vary)) { - return true; - } - - foreach (preg_split('/[\s,]+/', $vary) as $header) { - $key = str_replace('_', '-', strtolower($header)); - $v1 = $env1[$key] ?? null; - $v2 = $env2[$key] ?? null; - if ($v1 !== $v2) { - return false; - } - } - - return true; - } - - /** - * Gets all data associated with the given key. - * - * Use this method only if you know what you are doing. - */ - private function getMetadata(string $key): array - { - if (!$entries = $this->load($key)) { - return []; - } - - return unserialize($entries) ?: []; - } - - /** - * Purges data for the given URL. - * - * This method purges both the HTTP and the HTTPS version of the cache entry. - * - * @return bool true if the URL exists with either HTTP or HTTPS scheme and has been purged, false otherwise - */ - public function purge(string $url) - { - $http = preg_replace('#^https:#', 'http:', $url); - $https = preg_replace('#^http:#', 'https:', $url); - - $purgedHttp = $this->doPurge($http); - $purgedHttps = $this->doPurge($https); - - return $purgedHttp || $purgedHttps; - } - - /** - * Purges data for the given URL. - */ - private function doPurge(string $url): bool - { - $key = $this->getCacheKey(Request::create($url)); - if (isset($this->locks[$key])) { - flock($this->locks[$key], \LOCK_UN); - fclose($this->locks[$key]); - unset($this->locks[$key]); - } - - if (is_file($path = $this->getPath($key))) { - unlink($path); - - return true; - } - - return false; - } - - /** - * Loads data for the given key. - */ - private function load(string $key): ?string - { - $path = $this->getPath($key); - - return is_file($path) && false !== ($contents = @file_get_contents($path)) ? $contents : null; - } - - /** - * Save data for the given key. - */ - private function save(string $key, string $data, bool $overwrite = true): bool - { - $path = $this->getPath($key); - - if (!$overwrite && file_exists($path)) { - return true; - } - - if (isset($this->locks[$key])) { - $fp = $this->locks[$key]; - @ftruncate($fp, 0); - @fseek($fp, 0); - $len = @fwrite($fp, $data); - if (\strlen($data) !== $len) { - @ftruncate($fp, 0); - - return false; - } - } else { - if (!is_dir(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { - return false; - } - - $tmpFile = tempnam(\dirname($path), basename($path)); - if (false === $fp = @fopen($tmpFile, 'w')) { - @unlink($tmpFile); - - return false; - } - @fwrite($fp, $data); - @fclose($fp); - - if ($data != file_get_contents($tmpFile)) { - @unlink($tmpFile); - - return false; - } - - if (false === @rename($tmpFile, $path)) { - @unlink($tmpFile); - - return false; - } - } - - @chmod($path, 0666 & ~umask()); - - return true; - } - - public function getPath(string $key) - { - return $this->root.\DIRECTORY_SEPARATOR.substr($key, 0, 2).\DIRECTORY_SEPARATOR.substr($key, 2, 2).\DIRECTORY_SEPARATOR.substr($key, 4, 2).\DIRECTORY_SEPARATOR.substr($key, 6); - } - - /** - * Generates a cache key for the given Request. - * - * This method should return a key that must only depend on a - * normalized version of the request URI. - * - * If the same URI can have more than one representation, based on some - * headers, use a Vary header to indicate them, and each representation will - * be stored independently under the same cache key. - * - * @return string - */ - protected function generateCacheKey(Request $request) - { - return 'md'.hash('sha256', $request->getUri()); - } - - /** - * Returns a cache key for the given Request. - */ - private function getCacheKey(Request $request): string - { - if (isset($this->keyCache[$request])) { - return $this->keyCache[$request]; - } - - return $this->keyCache[$request] = $this->generateCacheKey($request); - } - - /** - * Persists the Request HTTP headers. - */ - private function persistRequest(Request $request): array - { - return $request->headers->all(); - } - - /** - * Persists the Response HTTP headers. - */ - private function persistResponse(Response $response): array - { - $headers = $response->headers->all(); - $headers['X-Status'] = [$response->getStatusCode()]; - - return $headers; - } - - /** - * Restores a Response from the HTTP headers and body. - */ - private function restoreResponse(array $headers, string $path = null): Response - { - $status = $headers['X-Status'][0]; - unset($headers['X-Status']); - - if (null !== $path) { - $headers['X-Body-File'] = [$path]; - } - - return new Response($path, $status, $headers); - } -} diff --git a/lib/symfony/http-kernel/HttpCache/StoreInterface.php b/lib/symfony/http-kernel/HttpCache/StoreInterface.php deleted file mode 100644 index 3d07ef3fc..000000000 --- a/lib/symfony/http-kernel/HttpCache/StoreInterface.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Interface implemented by HTTP cache stores. - * - * @author Fabien Potencier - */ -interface StoreInterface -{ - /** - * Locates a cached Response for the Request provided. - * - * @return Response|null - */ - public function lookup(Request $request); - - /** - * Writes a cache entry to the store for the given Request and Response. - * - * Existing entries are read and any that match the response are removed. This - * method calls write with the new list of cache entries. - * - * @return string The key under which the response is stored - */ - public function write(Request $request, Response $response); - - /** - * Invalidates all cache entries that match the request. - */ - public function invalidate(Request $request); - - /** - * Locks the cache for a given Request. - * - * @return bool|string true if the lock is acquired, the path to the current lock otherwise - */ - public function lock(Request $request); - - /** - * Releases the lock for the given Request. - * - * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise - */ - public function unlock(Request $request); - - /** - * Returns whether or not a lock exists. - * - * @return bool true if lock exists, false otherwise - */ - public function isLocked(Request $request); - - /** - * Purges data for the given URL. - * - * @return bool true if the URL exists and has been purged, false otherwise - */ - public function purge(string $url); - - /** - * Cleanups storage. - */ - public function cleanup(); -} diff --git a/lib/symfony/http-kernel/HttpCache/SubRequestHandler.php b/lib/symfony/http-kernel/HttpCache/SubRequestHandler.php deleted file mode 100644 index 253071f07..000000000 --- a/lib/symfony/http-kernel/HttpCache/SubRequestHandler.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\IpUtils; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class SubRequestHandler -{ - public static function handle(HttpKernelInterface $kernel, Request $request, int $type, bool $catch): Response - { - // save global state related to trusted headers and proxies - $trustedProxies = Request::getTrustedProxies(); - $trustedHeaderSet = Request::getTrustedHeaderSet(); - - // remove untrusted values - $remoteAddr = $request->server->get('REMOTE_ADDR'); - if (!$remoteAddr || !IpUtils::checkIp($remoteAddr, $trustedProxies)) { - $trustedHeaders = [ - 'FORWARDED' => $trustedHeaderSet & Request::HEADER_FORWARDED, - 'X_FORWARDED_FOR' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_FOR, - 'X_FORWARDED_HOST' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_HOST, - 'X_FORWARDED_PROTO' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PROTO, - 'X_FORWARDED_PORT' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PORT, - 'X_FORWARDED_PREFIX' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PREFIX, - ]; - foreach (array_filter($trustedHeaders) as $name => $key) { - $request->headers->remove($name); - $request->server->remove('HTTP_'.$name); - } - } - - // compute trusted values, taking any trusted proxies into account - $trustedIps = []; - $trustedValues = []; - foreach (array_reverse($request->getClientIps()) as $ip) { - $trustedIps[] = $ip; - $trustedValues[] = sprintf('for="%s"', $ip); - } - if ($ip !== $remoteAddr) { - $trustedIps[] = $remoteAddr; - $trustedValues[] = sprintf('for="%s"', $remoteAddr); - } - - // set trusted values, reusing as much as possible the global trusted settings - if (Request::HEADER_FORWARDED & $trustedHeaderSet) { - $trustedValues[0] .= sprintf(';host="%s";proto=%s', $request->getHttpHost(), $request->getScheme()); - $request->headers->set('Forwarded', $v = implode(', ', $trustedValues)); - $request->server->set('HTTP_FORWARDED', $v); - } - if (Request::HEADER_X_FORWARDED_FOR & $trustedHeaderSet) { - $request->headers->set('X-Forwarded-For', $v = implode(', ', $trustedIps)); - $request->server->set('HTTP_X_FORWARDED_FOR', $v); - } elseif (!(Request::HEADER_FORWARDED & $trustedHeaderSet)) { - Request::setTrustedProxies($trustedProxies, $trustedHeaderSet | Request::HEADER_X_FORWARDED_FOR); - $request->headers->set('X-Forwarded-For', $v = implode(', ', $trustedIps)); - $request->server->set('HTTP_X_FORWARDED_FOR', $v); - } - - // fix the client IP address by setting it to 127.0.0.1, - // which is the core responsibility of this method - $request->server->set('REMOTE_ADDR', '127.0.0.1'); - - // ensure 127.0.0.1 is set as trusted proxy - if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) { - Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet()); - } - - try { - return $kernel->handle($request, $type, $catch); - } finally { - // restore global state - Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); - } - } -} diff --git a/lib/symfony/http-kernel/HttpCache/SurrogateInterface.php b/lib/symfony/http-kernel/HttpCache/SurrogateInterface.php deleted file mode 100644 index 3f3c74a97..000000000 --- a/lib/symfony/http-kernel/HttpCache/SurrogateInterface.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -interface SurrogateInterface -{ - /** - * Returns surrogate name. - * - * @return string - */ - public function getName(); - - /** - * Returns a new cache strategy instance. - * - * @return ResponseCacheStrategyInterface - */ - public function createCacheStrategy(); - - /** - * Checks that at least one surrogate has Surrogate capability. - * - * @return bool - */ - public function hasSurrogateCapability(Request $request); - - /** - * Adds Surrogate-capability to the given Request. - */ - public function addSurrogateCapability(Request $request); - - /** - * Adds HTTP headers to specify that the Response needs to be parsed for Surrogate. - * - * This method only adds an Surrogate HTTP header if the Response has some Surrogate tags. - */ - public function addSurrogateControl(Response $response); - - /** - * Checks that the Response needs to be parsed for Surrogate tags. - * - * @return bool - */ - public function needsParsing(Response $response); - - /** - * Renders a Surrogate tag. - * - * @param string $alt An alternate URI - * @param string $comment A comment to add as an esi:include tag - * - * @return string - */ - public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = ''); - - /** - * Replaces a Response Surrogate tags with the included resource content. - * - * @return Response - */ - public function process(Request $request, Response $response); - - /** - * Handles a Surrogate from the cache. - * - * @param string $alt An alternative URI - * - * @return string - * - * @throws \RuntimeException - * @throws \Exception - */ - public function handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors); -} diff --git a/lib/symfony/http-kernel/HttpClientKernel.php b/lib/symfony/http-kernel/HttpClientKernel.php deleted file mode 100644 index 58ca82e5a..000000000 --- a/lib/symfony/http-kernel/HttpClientKernel.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\ResponseHeaderBag; -use Symfony\Component\Mime\Part\AbstractPart; -use Symfony\Component\Mime\Part\DataPart; -use Symfony\Component\Mime\Part\Multipart\FormDataPart; -use Symfony\Component\Mime\Part\TextPart; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ResponseHeaderBag::class); - -/** - * An implementation of a Symfony HTTP kernel using a "real" HTTP client. - * - * @author Fabien Potencier - */ -final class HttpClientKernel implements HttpKernelInterface -{ - private $client; - - public function __construct(HttpClientInterface $client = null) - { - if (null === $client && !class_exists(HttpClient::class)) { - throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__)); - } - - $this->client = $client ?? HttpClient::create(); - } - - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response - { - $headers = $this->getHeaders($request); - $body = ''; - if (null !== $part = $this->getBody($request)) { - $headers = array_merge($headers, $part->getPreparedHeaders()->toArray()); - $body = $part->bodyToIterable(); - } - $response = $this->client->request($request->getMethod(), $request->getUri(), [ - 'headers' => $headers, - 'body' => $body, - ] + $request->attributes->get('http_client_options', [])); - - $response = new Response($response->getContent(!$catch), $response->getStatusCode(), $response->getHeaders(!$catch)); - - $response->headers->remove('X-Body-File'); - $response->headers->remove('X-Body-Eval'); - $response->headers->remove('X-Content-Digest'); - - $response->headers = new class($response->headers->all()) extends ResponseHeaderBag { - protected function computeCacheControlValue(): string - { - return $this->getCacheControlHeader(); // preserve the original value - } - }; - - return $response; - } - - private function getBody(Request $request): ?AbstractPart - { - if (\in_array($request->getMethod(), ['GET', 'HEAD'])) { - return null; - } - - if (!class_exists(AbstractPart::class)) { - throw new \LogicException('You cannot pass non-empty bodies as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - if ($content = $request->getContent()) { - return new TextPart($content, 'utf-8', 'plain', '8bit'); - } - - $fields = $request->request->all(); - foreach ($request->files->all() as $name => $file) { - $fields[$name] = DataPart::fromPath($file->getPathname(), $file->getClientOriginalName(), $file->getClientMimeType()); - } - - return new FormDataPart($fields); - } - - private function getHeaders(Request $request): array - { - $headers = []; - foreach ($request->headers as $key => $value) { - $headers[$key] = $value; - } - $cookies = []; - foreach ($request->cookies->all() as $name => $value) { - $cookies[] = $name.'='.$value; - } - if ($cookies) { - $headers['cookie'] = implode('; ', $cookies); - } - - return $headers; - } -} diff --git a/lib/symfony/http-kernel/HttpKernel.php b/lib/symfony/http-kernel/HttpKernel.php deleted file mode 100644 index 38102e252..000000000 --- a/lib/symfony/http-kernel/HttpKernel.php +++ /dev/null @@ -1,299 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; -use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; -use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; -use Symfony\Component\HttpKernel\Event\ControllerEvent; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Event\TerminateEvent; -use Symfony\Component\HttpKernel\Event\ViewEvent; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ControllerArgumentsEvent::class); -class_exists(ControllerEvent::class); -class_exists(ExceptionEvent::class); -class_exists(FinishRequestEvent::class); -class_exists(RequestEvent::class); -class_exists(ResponseEvent::class); -class_exists(TerminateEvent::class); -class_exists(ViewEvent::class); -class_exists(KernelEvents::class); - -/** - * HttpKernel notifies events to convert a Request object to a Response one. - * - * @author Fabien Potencier - */ -class HttpKernel implements HttpKernelInterface, TerminableInterface -{ - protected $dispatcher; - protected $resolver; - protected $requestStack; - private $argumentResolver; - - public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null, ArgumentResolverInterface $argumentResolver = null) - { - $this->dispatcher = $dispatcher; - $this->resolver = $resolver; - $this->requestStack = $requestStack ?? new RequestStack(); - $this->argumentResolver = $argumentResolver ?? new ArgumentResolver(); - } - - /** - * {@inheritdoc} - */ - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) - { - $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); - - $this->requestStack->push($request); - try { - return $this->handleRaw($request, $type); - } catch (\Exception $e) { - if ($e instanceof RequestExceptionInterface) { - $e = new BadRequestHttpException($e->getMessage(), $e); - } - if (false === $catch) { - $this->finishRequest($request, $type); - - throw $e; - } - - return $this->handleThrowable($e, $request, $type); - } finally { - $this->requestStack->pop(); - } - } - - /** - * {@inheritdoc} - */ - public function terminate(Request $request, Response $response) - { - $this->dispatcher->dispatch(new TerminateEvent($this, $request, $response), KernelEvents::TERMINATE); - } - - /** - * @internal - */ - public function terminateWithException(\Throwable $exception, Request $request = null) - { - if (!$request = $request ?: $this->requestStack->getMainRequest()) { - throw $exception; - } - - if ($pop = $request !== $this->requestStack->getMainRequest()) { - $this->requestStack->push($request); - } - - try { - $response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST); - } finally { - if ($pop) { - $this->requestStack->pop(); - } - } - - $response->sendHeaders(); - $response->sendContent(); - - $this->terminate($request, $response); - } - - /** - * Handles a request to convert it to a response. - * - * Exceptions are not caught. - * - * @throws \LogicException If one of the listener does not behave as expected - * @throws NotFoundHttpException When controller cannot be found - */ - private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response - { - // request - $event = new RequestEvent($this, $request, $type); - $this->dispatcher->dispatch($event, KernelEvents::REQUEST); - - if ($event->hasResponse()) { - return $this->filterResponse($event->getResponse(), $request, $type); - } - - // load controller - if (false === $controller = $this->resolver->getController($request)) { - throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo())); - } - - $event = new ControllerEvent($this, $controller, $request, $type); - $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER); - $controller = $event->getController(); - - // controller arguments - $arguments = $this->argumentResolver->getArguments($request, $controller); - - $event = new ControllerArgumentsEvent($this, $controller, $arguments, $request, $type); - $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS); - $controller = $event->getController(); - $arguments = $event->getArguments(); - - // call controller - $response = $controller(...$arguments); - - // view - if (!$response instanceof Response) { - $event = new ViewEvent($this, $request, $type, $response); - $this->dispatcher->dispatch($event, KernelEvents::VIEW); - - if ($event->hasResponse()) { - $response = $event->getResponse(); - } else { - $msg = sprintf('The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned %s.', $this->varToString($response)); - - // the user may have forgotten to return something - if (null === $response) { - $msg .= ' Did you forget to add a return statement somewhere in your controller?'; - } - - throw new ControllerDoesNotReturnResponseException($msg, $controller, __FILE__, __LINE__ - 17); - } - } - - return $this->filterResponse($response, $request, $type); - } - - /** - * Filters a response object. - * - * @throws \RuntimeException if the passed object is not a Response instance - */ - private function filterResponse(Response $response, Request $request, int $type): Response - { - $event = new ResponseEvent($this, $request, $type, $response); - - $this->dispatcher->dispatch($event, KernelEvents::RESPONSE); - - $this->finishRequest($request, $type); - - return $event->getResponse(); - } - - /** - * Publishes the finish request event, then pop the request from the stack. - * - * Note that the order of the operations is important here, otherwise - * operations such as {@link RequestStack::getParentRequest()} can lead to - * weird results. - */ - private function finishRequest(Request $request, int $type) - { - $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST); - } - - /** - * Handles a throwable by trying to convert it to a Response. - * - * @throws \Exception - */ - private function handleThrowable(\Throwable $e, Request $request, int $type): Response - { - $event = new ExceptionEvent($this, $request, $type, $e); - $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); - - // a listener might have replaced the exception - $e = $event->getThrowable(); - - if (!$event->hasResponse()) { - $this->finishRequest($request, $type); - - throw $e; - } - - $response = $event->getResponse(); - - // the developer asked for a specific status code - if (!$event->isAllowingCustomResponseCode() && !$response->isClientError() && !$response->isServerError() && !$response->isRedirect()) { - // ensure that we actually have an error response - if ($e instanceof HttpExceptionInterface) { - // keep the HTTP status code and headers - $response->setStatusCode($e->getStatusCode()); - $response->headers->add($e->getHeaders()); - } else { - $response->setStatusCode(500); - } - } - - try { - return $this->filterResponse($response, $request, $type); - } catch (\Exception $e) { - return $response; - } - } - - /** - * Returns a human-readable string for the specified variable. - */ - private function varToString($var): string - { - if (\is_object($var)) { - return sprintf('an object of type %s', \get_class($var)); - } - - if (\is_array($var)) { - $a = []; - foreach ($var as $k => $v) { - $a[] = sprintf('%s => ...', $k); - } - - return sprintf('an array ([%s])', mb_substr(implode(', ', $a), 0, 255)); - } - - if (\is_resource($var)) { - return sprintf('a resource (%s)', get_resource_type($var)); - } - - if (null === $var) { - return 'null'; - } - - if (false === $var) { - return 'a boolean value (false)'; - } - - if (true === $var) { - return 'a boolean value (true)'; - } - - if (\is_string($var)) { - return sprintf('a string ("%s%s")', mb_substr($var, 0, 255), mb_strlen($var) > 255 ? '...' : ''); - } - - if (is_numeric($var)) { - return sprintf('a number (%s)', (string) $var); - } - - return (string) $var; - } -} diff --git a/lib/symfony/http-kernel/HttpKernelBrowser.php b/lib/symfony/http-kernel/HttpKernelBrowser.php deleted file mode 100644 index 643134f1b..000000000 --- a/lib/symfony/http-kernel/HttpKernelBrowser.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\BrowserKit\AbstractBrowser; -use Symfony\Component\BrowserKit\CookieJar; -use Symfony\Component\BrowserKit\History; -use Symfony\Component\BrowserKit\Request as DomRequest; -use Symfony\Component\BrowserKit\Response as DomResponse; -use Symfony\Component\HttpFoundation\File\UploadedFile; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Simulates a browser and makes requests to an HttpKernel instance. - * - * @author Fabien Potencier - * - * @method Request getRequest() - * @method Response getResponse() - */ -class HttpKernelBrowser extends AbstractBrowser -{ - protected $kernel; - private $catchExceptions = true; - - /** - * @param array $server The server parameters (equivalent of $_SERVER) - */ - public function __construct(HttpKernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) - { - // These class properties must be set before calling the parent constructor, as it may depend on it. - $this->kernel = $kernel; - $this->followRedirects = false; - - parent::__construct($server, $history, $cookieJar); - } - - /** - * Sets whether to catch exceptions when the kernel is handling a request. - */ - public function catchExceptions(bool $catchExceptions) - { - $this->catchExceptions = $catchExceptions; - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return Response - */ - protected function doRequest(object $request) - { - $response = $this->kernel->handle($request, HttpKernelInterface::MAIN_REQUEST, $this->catchExceptions); - - if ($this->kernel instanceof TerminableInterface) { - $this->kernel->terminate($request, $response); - } - - return $response; - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return string - */ - protected function getScript(object $request) - { - $kernel = var_export(serialize($this->kernel), true); - $request = var_export(serialize($request), true); - - $errorReporting = error_reporting(); - - $requires = ''; - foreach (get_declared_classes() as $class) { - if (0 === strpos($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $file = \dirname($r->getFileName(), 2).'/autoload.php'; - if (file_exists($file)) { - $requires .= 'require_once '.var_export($file, true).";\n"; - } - } - } - - if (!$requires) { - throw new \RuntimeException('Composer autoloader not found.'); - } - - $code = <<getHandleScript(); - } - - protected function getHandleScript() - { - return <<<'EOF' -$response = $kernel->handle($request); - -if ($kernel instanceof Symfony\Component\HttpKernel\TerminableInterface) { - $kernel->terminate($request, $response); -} - -echo serialize($response); -EOF; - } - - /** - * {@inheritdoc} - * - * @return Request - */ - protected function filterRequest(DomRequest $request) - { - $httpRequest = Request::create($request->getUri(), $request->getMethod(), $request->getParameters(), $request->getCookies(), $request->getFiles(), $server = $request->getServer(), $request->getContent()); - if (!isset($server['HTTP_ACCEPT'])) { - $httpRequest->headers->remove('Accept'); - } - - foreach ($this->filterFiles($httpRequest->files->all()) as $key => $value) { - $httpRequest->files->set($key, $value); - } - - return $httpRequest; - } - - /** - * Filters an array of files. - * - * This method created test instances of UploadedFile so that the move() - * method can be called on those instances. - * - * If the size of a file is greater than the allowed size (from php.ini) then - * an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE. - * - * @see UploadedFile - * - * @return array - */ - protected function filterFiles(array $files) - { - $filtered = []; - foreach ($files as $key => $value) { - if (\is_array($value)) { - $filtered[$key] = $this->filterFiles($value); - } elseif ($value instanceof UploadedFile) { - if ($value->isValid() && $value->getSize() > UploadedFile::getMaxFilesize()) { - $filtered[$key] = new UploadedFile( - '', - $value->getClientOriginalName(), - $value->getClientMimeType(), - \UPLOAD_ERR_INI_SIZE, - true - ); - } else { - $filtered[$key] = new UploadedFile( - $value->getPathname(), - $value->getClientOriginalName(), - $value->getClientMimeType(), - $value->getError(), - true - ); - } - } - } - - return $filtered; - } - - /** - * {@inheritdoc} - * - * @param Response $response - * - * @return DomResponse - */ - protected function filterResponse(object $response) - { - // this is needed to support StreamedResponse - ob_start(); - $response->sendContent(); - $content = ob_get_clean(); - - return new DomResponse($content, $response->getStatusCode(), $response->headers->all()); - } -} diff --git a/lib/symfony/http-kernel/HttpKernelInterface.php b/lib/symfony/http-kernel/HttpKernelInterface.php deleted file mode 100644 index 0449240e7..000000000 --- a/lib/symfony/http-kernel/HttpKernelInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * HttpKernelInterface handles a Request to convert it to a Response. - * - * @author Fabien Potencier - */ -interface HttpKernelInterface -{ - public const MAIN_REQUEST = 1; - public const SUB_REQUEST = 2; - - /** - * @deprecated since symfony/http-kernel 5.3, use MAIN_REQUEST instead. - * To ease the migration, this constant won't be removed until Symfony 7.0. - */ - public const MASTER_REQUEST = self::MAIN_REQUEST; - - /** - * Handles a Request to convert it to a Response. - * - * When $catch is true, the implementation must catch all exceptions - * and do its best to convert them to a Response instance. - * - * @param int $type The type of the request - * (one of HttpKernelInterface::MAIN_REQUEST or HttpKernelInterface::SUB_REQUEST) - * @param bool $catch Whether to catch exceptions or not - * - * @return Response - * - * @throws \Exception When an Exception occurs during processing - */ - public function handle(Request $request, int $type = self::MAIN_REQUEST, bool $catch = true); -} diff --git a/lib/symfony/http-kernel/Kernel.php b/lib/symfony/http-kernel/Kernel.php deleted file mode 100644 index b2ccc7d95..000000000 --- a/lib/symfony/http-kernel/Kernel.php +++ /dev/null @@ -1,881 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; -use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; -use Symfony\Component\Config\Builder\ConfigBuilderGenerator; -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\Config\Loader\DelegatingLoader; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Dumper\PhpDumper; -use Symfony\Component\DependencyInjection\Dumper\Preloader; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\ClosureLoader; -use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; -use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; -use Symfony\Component\DependencyInjection\Loader\IniFileLoader; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\HttpKernel\Config\FileLocator; -use Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass; -use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; - -// Help opcache.preload discover always-needed symbols -class_exists(ConfigCache::class); - -/** - * The Kernel is the heart of the Symfony system. - * - * It manages an environment made of bundles. - * - * Environment names must always start with a letter and - * they must only contain letters and numbers. - * - * @author Fabien Potencier - */ -abstract class Kernel implements KernelInterface, RebootableInterface, TerminableInterface -{ - /** - * @var array - */ - protected $bundles = []; - - protected $container; - protected $environment; - protected $debug; - protected $booted = false; - protected $startTime; - - private $projectDir; - private $warmupDir; - private $requestStackSize = 0; - private $resetServices = false; - - /** - * @var array - */ - private static $freshCache = []; - - public const VERSION = '5.4.20'; - public const VERSION_ID = 50420; - public const MAJOR_VERSION = 5; - public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 20; - public const EXTRA_VERSION = ''; - - public const END_OF_MAINTENANCE = '11/2024'; - public const END_OF_LIFE = '11/2025'; - - public function __construct(string $environment, bool $debug) - { - if (!$this->environment = $environment) { - throw new \InvalidArgumentException(sprintf('Invalid environment provided to "%s": the environment cannot be empty.', get_debug_type($this))); - } - - $this->debug = $debug; - } - - public function __clone() - { - $this->booted = false; - $this->container = null; - $this->requestStackSize = 0; - $this->resetServices = false; - } - - /** - * {@inheritdoc} - */ - public function boot() - { - if (true === $this->booted) { - if (!$this->requestStackSize && $this->resetServices) { - if ($this->container->has('services_resetter')) { - $this->container->get('services_resetter')->reset(); - } - $this->resetServices = false; - if ($this->debug) { - $this->startTime = microtime(true); - } - } - - return; - } - - if (null === $this->container) { - $this->preBoot(); - } - - foreach ($this->getBundles() as $bundle) { - $bundle->setContainer($this->container); - $bundle->boot(); - } - - $this->booted = true; - } - - /** - * {@inheritdoc} - */ - public function reboot(?string $warmupDir) - { - $this->shutdown(); - $this->warmupDir = $warmupDir; - $this->boot(); - } - - /** - * {@inheritdoc} - */ - public function terminate(Request $request, Response $response) - { - if (false === $this->booted) { - return; - } - - if ($this->getHttpKernel() instanceof TerminableInterface) { - $this->getHttpKernel()->terminate($request, $response); - } - } - - /** - * {@inheritdoc} - */ - public function shutdown() - { - if (false === $this->booted) { - return; - } - - $this->booted = false; - - foreach ($this->getBundles() as $bundle) { - $bundle->shutdown(); - $bundle->setContainer(null); - } - - $this->container = null; - $this->requestStackSize = 0; - $this->resetServices = false; - } - - /** - * {@inheritdoc} - */ - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) - { - if (!$this->booted) { - $container = $this->container ?? $this->preBoot(); - - if ($container->has('http_cache')) { - return $container->get('http_cache')->handle($request, $type, $catch); - } - } - - $this->boot(); - ++$this->requestStackSize; - $this->resetServices = true; - - try { - return $this->getHttpKernel()->handle($request, $type, $catch); - } finally { - --$this->requestStackSize; - } - } - - /** - * Gets an HTTP kernel from the container. - * - * @return HttpKernelInterface - */ - protected function getHttpKernel() - { - return $this->container->get('http_kernel'); - } - - /** - * {@inheritdoc} - */ - public function getBundles() - { - return $this->bundles; - } - - /** - * {@inheritdoc} - */ - public function getBundle(string $name) - { - if (!isset($this->bundles[$name])) { - throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the "registerBundles()" method of your "%s.php" file?', $name, get_debug_type($this))); - } - - return $this->bundles[$name]; - } - - /** - * {@inheritdoc} - */ - public function locateResource(string $name) - { - if ('@' !== $name[0]) { - throw new \InvalidArgumentException(sprintf('A resource name must start with @ ("%s" given).', $name)); - } - - if (str_contains($name, '..')) { - throw new \RuntimeException(sprintf('File name "%s" contains invalid characters (..).', $name)); - } - - $bundleName = substr($name, 1); - $path = ''; - if (str_contains($bundleName, '/')) { - [$bundleName, $path] = explode('/', $bundleName, 2); - } - - $bundle = $this->getBundle($bundleName); - if (file_exists($file = $bundle->getPath().'/'.$path)) { - return $file; - } - - throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name)); - } - - /** - * {@inheritdoc} - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return $this->debug; - } - - /** - * Gets the application root dir (path of the project's composer file). - * - * @return string - */ - public function getProjectDir() - { - if (null === $this->projectDir) { - $r = new \ReflectionObject($this); - - if (!is_file($dir = $r->getFileName())) { - throw new \LogicException(sprintf('Cannot auto-detect project dir for kernel of class "%s".', $r->name)); - } - - $dir = $rootDir = \dirname($dir); - while (!is_file($dir.'/composer.json')) { - if ($dir === \dirname($dir)) { - return $this->projectDir = $rootDir; - } - $dir = \dirname($dir); - } - $this->projectDir = $dir; - } - - return $this->projectDir; - } - - /** - * {@inheritdoc} - */ - public function getContainer() - { - if (!$this->container) { - throw new \LogicException('Cannot retrieve the container from a non-booted kernel.'); - } - - return $this->container; - } - - /** - * @internal - */ - public function setAnnotatedClassCache(array $annotatedClasses) - { - file_put_contents(($this->warmupDir ?: $this->getBuildDir()).'/annotations.map', sprintf('debug && null !== $this->startTime ? $this->startTime : -\INF; - } - - /** - * {@inheritdoc} - */ - public function getCacheDir() - { - return $this->getProjectDir().'/var/cache/'.$this->environment; - } - - /** - * {@inheritdoc} - */ - public function getBuildDir(): string - { - // Returns $this->getCacheDir() for backward compatibility - return $this->getCacheDir(); - } - - /** - * {@inheritdoc} - */ - public function getLogDir() - { - return $this->getProjectDir().'/var/log'; - } - - /** - * {@inheritdoc} - */ - public function getCharset() - { - return 'UTF-8'; - } - - /** - * Gets the patterns defining the classes to parse and cache for annotations. - */ - public function getAnnotatedClassesToCompile(): array - { - return []; - } - - /** - * Initializes bundles. - * - * @throws \LogicException if two bundles share a common name - */ - protected function initializeBundles() - { - // init bundles - $this->bundles = []; - foreach ($this->registerBundles() as $bundle) { - $name = $bundle->getName(); - if (isset($this->bundles[$name])) { - throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s".', $name)); - } - $this->bundles[$name] = $bundle; - } - } - - /** - * The extension point similar to the Bundle::build() method. - * - * Use this method to register compiler passes and manipulate the container during the building process. - */ - protected function build(ContainerBuilder $container) - { - } - - /** - * Gets the container class. - * - * @throws \InvalidArgumentException If the generated classname is invalid - * - * @return string - */ - protected function getContainerClass() - { - $class = static::class; - $class = str_contains($class, "@anonymous\0") ? get_parent_class($class).str_replace('.', '_', ContainerBuilder::hash($class)) : $class; - $class = str_replace('\\', '_', $class).ucfirst($this->environment).($this->debug ? 'Debug' : '').'Container'; - - if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $class)) { - throw new \InvalidArgumentException(sprintf('The environment "%s" contains invalid characters, it can only contain characters allowed in PHP class names.', $this->environment)); - } - - return $class; - } - - /** - * Gets the container's base class. - * - * All names except Container must be fully qualified. - * - * @return string - */ - protected function getContainerBaseClass() - { - return 'Container'; - } - - /** - * Initializes the service container. - * - * The built version of the service container is used when fresh, otherwise the - * container is built. - */ - protected function initializeContainer() - { - $class = $this->getContainerClass(); - $buildDir = $this->warmupDir ?: $this->getBuildDir(); - $cache = new ConfigCache($buildDir.'/'.$class.'.php', $this->debug); - $cachePath = $cache->getPath(); - - // Silence E_WARNING to ignore "include" failures - don't use "@" to prevent silencing fatal errors - $errorLevel = error_reporting(\E_ALL ^ \E_WARNING); - - try { - if (is_file($cachePath) && \is_object($this->container = include $cachePath) - && (!$this->debug || (self::$freshCache[$cachePath] ?? $cache->isFresh())) - ) { - self::$freshCache[$cachePath] = true; - $this->container->set('kernel', $this); - error_reporting($errorLevel); - - return; - } - } catch (\Throwable $e) { - } - - $oldContainer = \is_object($this->container) ? new \ReflectionClass($this->container) : $this->container = null; - - try { - is_dir($buildDir) ?: mkdir($buildDir, 0777, true); - - if ($lock = fopen($cachePath.'.lock', 'w')) { - if (!flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock) && !flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) { - fclose($lock); - $lock = null; - } elseif (!is_file($cachePath) || !\is_object($this->container = include $cachePath)) { - $this->container = null; - } elseif (!$oldContainer || \get_class($this->container) !== $oldContainer->name) { - flock($lock, \LOCK_UN); - fclose($lock); - $this->container->set('kernel', $this); - - return; - } - } - } catch (\Throwable $e) { - } finally { - error_reporting($errorLevel); - } - - if ($collectDeprecations = $this->debug && !\defined('PHPUNIT_COMPOSER_INSTALL')) { - $collectedLogs = []; - $previousHandler = set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { - if (\E_USER_DEPRECATED !== $type && \E_DEPRECATED !== $type) { - return $previousHandler ? $previousHandler($type, $message, $file, $line) : false; - } - - if (isset($collectedLogs[$message])) { - ++$collectedLogs[$message]['count']; - - return null; - } - - $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 5); - // Clean the trace by removing first frames added by the error handler itself. - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $backtrace = \array_slice($backtrace, 1 + $i); - break; - } - } - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (!isset($backtrace[$i]['file'], $backtrace[$i]['line'], $backtrace[$i]['function'])) { - continue; - } - if (!isset($backtrace[$i]['class']) && 'trigger_deprecation' === $backtrace[$i]['function']) { - $file = $backtrace[$i]['file']; - $line = $backtrace[$i]['line']; - $backtrace = \array_slice($backtrace, 1 + $i); - break; - } - } - - // Remove frames added by DebugClassLoader. - for ($i = \count($backtrace) - 2; 0 < $i; --$i) { - if (\in_array($backtrace[$i]['class'] ?? null, [DebugClassLoader::class, LegacyDebugClassLoader::class], true)) { - $backtrace = [$backtrace[$i + 1]]; - break; - } - } - - $collectedLogs[$message] = [ - 'type' => $type, - 'message' => $message, - 'file' => $file, - 'line' => $line, - 'trace' => [$backtrace[0]], - 'count' => 1, - ]; - - return null; - }); - } - - try { - $container = null; - $container = $this->buildContainer(); - $container->compile(); - } finally { - if ($collectDeprecations) { - restore_error_handler(); - - @file_put_contents($buildDir.'/'.$class.'Deprecations.log', serialize(array_values($collectedLogs))); - @file_put_contents($buildDir.'/'.$class.'Compiler.log', null !== $container ? implode("\n", $container->getCompiler()->getLog()) : ''); - } - } - - $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); - - if ($lock) { - flock($lock, \LOCK_UN); - fclose($lock); - } - - $this->container = require $cachePath; - $this->container->set('kernel', $this); - - if ($oldContainer && \get_class($this->container) !== $oldContainer->name) { - // Because concurrent requests might still be using them, - // old container files are not removed immediately, - // but on a next dump of the container. - static $legacyContainers = []; - $oldContainerDir = \dirname($oldContainer->getFileName()); - $legacyContainers[$oldContainerDir.'.legacy'] = true; - foreach (glob(\dirname($oldContainerDir).\DIRECTORY_SEPARATOR.'*.legacy', \GLOB_NOSORT) as $legacyContainer) { - if (!isset($legacyContainers[$legacyContainer]) && @unlink($legacyContainer)) { - (new Filesystem())->remove(substr($legacyContainer, 0, -7)); - } - } - - touch($oldContainerDir.'.legacy'); - } - - $preload = $this instanceof WarmableInterface ? (array) $this->warmUp($this->container->getParameter('kernel.cache_dir')) : []; - - if ($this->container->has('cache_warmer')) { - $preload = array_merge($preload, (array) $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'))); - } - - if ($preload && method_exists(Preloader::class, 'append') && file_exists($preloadFile = $buildDir.'/'.$class.'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - } - - /** - * Returns the kernel parameters. - * - * @return array - */ - protected function getKernelParameters() - { - $bundles = []; - $bundlesMetadata = []; - - foreach ($this->bundles as $name => $bundle) { - $bundles[$name] = \get_class($bundle); - $bundlesMetadata[$name] = [ - 'path' => $bundle->getPath(), - 'namespace' => $bundle->getNamespace(), - ]; - } - - return [ - 'kernel.project_dir' => realpath($this->getProjectDir()) ?: $this->getProjectDir(), - 'kernel.environment' => $this->environment, - 'kernel.runtime_environment' => '%env(default:kernel.environment:APP_RUNTIME_ENV)%', - 'kernel.debug' => $this->debug, - 'kernel.build_dir' => realpath($buildDir = $this->warmupDir ?: $this->getBuildDir()) ?: $buildDir, - 'kernel.cache_dir' => realpath($cacheDir = ($this->getCacheDir() === $this->getBuildDir() ? ($this->warmupDir ?: $this->getCacheDir()) : $this->getCacheDir())) ?: $cacheDir, - 'kernel.logs_dir' => realpath($this->getLogDir()) ?: $this->getLogDir(), - 'kernel.bundles' => $bundles, - 'kernel.bundles_metadata' => $bundlesMetadata, - 'kernel.charset' => $this->getCharset(), - 'kernel.container_class' => $this->getContainerClass(), - ]; - } - - /** - * Builds the service container. - * - * @return ContainerBuilder - * - * @throws \RuntimeException - */ - protected function buildContainer() - { - foreach (['cache' => $this->getCacheDir(), 'build' => $this->warmupDir ?: $this->getBuildDir(), 'logs' => $this->getLogDir()] as $name => $dir) { - if (!is_dir($dir)) { - if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) { - throw new \RuntimeException(sprintf('Unable to create the "%s" directory (%s).', $name, $dir)); - } - } elseif (!is_writable($dir)) { - throw new \RuntimeException(sprintf('Unable to write in the "%s" directory (%s).', $name, $dir)); - } - } - - $container = $this->getContainerBuilder(); - $container->addObjectResource($this); - $this->prepareContainer($container); - - if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Returning a ContainerBuilder from "%s::registerContainerConfiguration()" is deprecated.', get_debug_type($this)); - $container->merge($cont); - } - - $container->addCompilerPass(new AddAnnotatedClassesToCachePass($this)); - - return $container; - } - - /** - * Prepares the ContainerBuilder before it is compiled. - */ - protected function prepareContainer(ContainerBuilder $container) - { - $extensions = []; - foreach ($this->bundles as $bundle) { - if ($extension = $bundle->getContainerExtension()) { - $container->registerExtension($extension); - } - - if ($this->debug) { - $container->addObjectResource($bundle); - } - } - - foreach ($this->bundles as $bundle) { - $bundle->build($container); - } - - $this->build($container); - - foreach ($container->getExtensions() as $extension) { - $extensions[] = $extension->getAlias(); - } - - // ensure these extensions are implicitly loaded - $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions)); - } - - /** - * Gets a new ContainerBuilder instance used to build the service container. - * - * @return ContainerBuilder - */ - protected function getContainerBuilder() - { - $container = new ContainerBuilder(); - $container->getParameterBag()->add($this->getKernelParameters()); - - if ($this instanceof ExtensionInterface) { - $container->registerExtension($this); - } - if ($this instanceof CompilerPassInterface) { - $container->addCompilerPass($this, PassConfig::TYPE_BEFORE_OPTIMIZATION, -10000); - } - if (class_exists(\ProxyManager\Configuration::class) && class_exists(RuntimeInstantiator::class)) { - $container->setProxyInstantiator(new RuntimeInstantiator()); - } - - return $container; - } - - /** - * Dumps the service container to PHP code in the cache. - * - * @param string $class The name of the class to generate - * @param string $baseClass The name of the container's base class - */ - protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, string $class, string $baseClass) - { - // cache the container - $dumper = new PhpDumper($container); - - if (class_exists(\ProxyManager\Configuration::class) && class_exists(ProxyDumper::class)) { - $dumper->setProxyDumper(new ProxyDumper()); - } - - $content = $dumper->dump([ - 'class' => $class, - 'base_class' => $baseClass, - 'file' => $cache->getPath(), - 'as_files' => true, - 'debug' => $this->debug, - 'build_time' => $container->hasParameter('kernel.container_build_time') ? $container->getParameter('kernel.container_build_time') : time(), - 'preload_classes' => array_map('get_class', $this->bundles), - ]); - - $rootCode = array_pop($content); - $dir = \dirname($cache->getPath()).'/'; - $fs = new Filesystem(); - - foreach ($content as $file => $code) { - $fs->dumpFile($dir.$file, $code); - @chmod($dir.$file, 0666 & ~umask()); - } - $legacyFile = \dirname($dir.key($content)).'.legacy'; - if (is_file($legacyFile)) { - @unlink($legacyFile); - } - - $cache->write($rootCode, $container->getResources()); - } - - /** - * Returns a loader for the container. - * - * @return DelegatingLoader - */ - protected function getContainerLoader(ContainerInterface $container) - { - $env = $this->getEnvironment(); - $locator = new FileLocator($this); - $resolver = new LoaderResolver([ - new XmlFileLoader($container, $locator, $env), - new YamlFileLoader($container, $locator, $env), - new IniFileLoader($container, $locator, $env), - new PhpFileLoader($container, $locator, $env, class_exists(ConfigBuilderGenerator::class) ? new ConfigBuilderGenerator($this->getBuildDir()) : null), - new GlobFileLoader($container, $locator, $env), - new DirectoryLoader($container, $locator, $env), - new ClosureLoader($container, $env), - ]); - - return new DelegatingLoader($resolver); - } - - private function preBoot(): ContainerInterface - { - if ($this->debug) { - $this->startTime = microtime(true); - } - if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) { - putenv('SHELL_VERBOSITY=3'); - $_ENV['SHELL_VERBOSITY'] = 3; - $_SERVER['SHELL_VERBOSITY'] = 3; - } - - $this->initializeBundles(); - $this->initializeContainer(); - - $container = $this->container; - - if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts = $container->getParameter('kernel.trusted_hosts')) { - Request::setTrustedHosts($trustedHosts); - } - - if ($container->hasParameter('kernel.trusted_proxies') && $container->hasParameter('kernel.trusted_headers') && $trustedProxies = $container->getParameter('kernel.trusted_proxies')) { - Request::setTrustedProxies(\is_array($trustedProxies) ? $trustedProxies : array_map('trim', explode(',', $trustedProxies)), $container->getParameter('kernel.trusted_headers')); - } - - return $container; - } - - /** - * Removes comments from a PHP source string. - * - * We don't use the PHP php_strip_whitespace() function - * as we want the content to be readable and well-formatted. - * - * @return string - */ - public static function stripComments(string $source) - { - if (!\function_exists('token_get_all')) { - return $source; - } - - $rawChunk = ''; - $output = ''; - $tokens = token_get_all($source); - $ignoreSpace = false; - for ($i = 0; isset($tokens[$i]); ++$i) { - $token = $tokens[$i]; - if (!isset($token[1]) || 'b"' === $token) { - $rawChunk .= $token; - } elseif (\T_START_HEREDOC === $token[0]) { - $output .= $rawChunk.$token[1]; - do { - $token = $tokens[++$i]; - $output .= isset($token[1]) && 'b"' !== $token ? $token[1] : $token; - } while (\T_END_HEREDOC !== $token[0]); - $rawChunk = ''; - } elseif (\T_WHITESPACE === $token[0]) { - if ($ignoreSpace) { - $ignoreSpace = false; - - continue; - } - - // replace multiple new lines with a single newline - $rawChunk .= preg_replace(['/\n{2,}/S'], "\n", $token[1]); - } elseif (\in_array($token[0], [\T_COMMENT, \T_DOC_COMMENT])) { - if (!\in_array($rawChunk[\strlen($rawChunk) - 1], [' ', "\n", "\r", "\t"], true)) { - $rawChunk .= ' '; - } - $ignoreSpace = true; - } else { - $rawChunk .= $token[1]; - - // The PHP-open tag already has a new-line - if (\T_OPEN_TAG === $token[0]) { - $ignoreSpace = true; - } else { - $ignoreSpace = false; - } - } - } - - $output .= $rawChunk; - - unset($tokens, $rawChunk); - gc_mem_caches(); - - return $output; - } - - /** - * @return array - */ - public function __sleep() - { - return ['environment', 'debug']; - } - - public function __wakeup() - { - if (\is_object($this->environment) || \is_object($this->debug)) { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - $this->__construct($this->environment, $this->debug); - } -} diff --git a/lib/symfony/http-kernel/KernelEvents.php b/lib/symfony/http-kernel/KernelEvents.php deleted file mode 100644 index 3d47f6080..000000000 --- a/lib/symfony/http-kernel/KernelEvents.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; -use Symfony\Component\HttpKernel\Event\ControllerEvent; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Event\TerminateEvent; -use Symfony\Component\HttpKernel\Event\ViewEvent; - -/** - * Contains all events thrown in the HttpKernel component. - * - * @author Bernhard Schussek - */ -final class KernelEvents -{ - /** - * The REQUEST event occurs at the very beginning of request - * dispatching. - * - * This event allows you to create a response for a request before any - * other code in the framework is executed. - * - * @Event("Symfony\Component\HttpKernel\Event\RequestEvent") - */ - public const REQUEST = 'kernel.request'; - - /** - * The EXCEPTION event occurs when an uncaught exception appears. - * - * This event allows you to create a response for a thrown exception or - * to modify the thrown exception. - * - * @Event("Symfony\Component\HttpKernel\Event\ExceptionEvent") - */ - public const EXCEPTION = 'kernel.exception'; - - /** - * The CONTROLLER event occurs once a controller was found for - * handling a request. - * - * This event allows you to change the controller that will handle the - * request. - * - * @Event("Symfony\Component\HttpKernel\Event\ControllerEvent") - */ - public const CONTROLLER = 'kernel.controller'; - - /** - * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved. - * - * This event allows you to change the arguments that will be passed to - * the controller. - * - * @Event("Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent") - */ - public const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; - - /** - * The VIEW event occurs when the return value of a controller - * is not a Response instance. - * - * This event allows you to create a response for the return value of the - * controller. - * - * @Event("Symfony\Component\HttpKernel\Event\ViewEvent") - */ - public const VIEW = 'kernel.view'; - - /** - * The RESPONSE event occurs once a response was created for - * replying to a request. - * - * This event allows you to modify or replace the response that will be - * replied. - * - * @Event("Symfony\Component\HttpKernel\Event\ResponseEvent") - */ - public const RESPONSE = 'kernel.response'; - - /** - * The FINISH_REQUEST event occurs when a response was generated for a request. - * - * This event allows you to reset the global and environmental state of - * the application, when it was changed during the request. - * - * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent") - */ - public const FINISH_REQUEST = 'kernel.finish_request'; - - /** - * The TERMINATE event occurs once a response was sent. - * - * This event allows you to run expensive post-response jobs. - * - * @Event("Symfony\Component\HttpKernel\Event\TerminateEvent") - */ - public const TERMINATE = 'kernel.terminate'; - - /** - * Event aliases. - * - * These aliases can be consumed by RegisterListenersPass. - */ - public const ALIASES = [ - ControllerArgumentsEvent::class => self::CONTROLLER_ARGUMENTS, - ControllerEvent::class => self::CONTROLLER, - ResponseEvent::class => self::RESPONSE, - FinishRequestEvent::class => self::FINISH_REQUEST, - RequestEvent::class => self::REQUEST, - ViewEvent::class => self::VIEW, - ExceptionEvent::class => self::EXCEPTION, - TerminateEvent::class => self::TERMINATE, - ]; -} diff --git a/lib/symfony/http-kernel/KernelInterface.php b/lib/symfony/http-kernel/KernelInterface.php deleted file mode 100644 index 41135a6d8..000000000 --- a/lib/symfony/http-kernel/KernelInterface.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; - -/** - * The Kernel is the heart of the Symfony system. - * - * It manages an environment made of application kernel and bundles. - * - * @method string getBuildDir() Returns the build directory - not implementing it is deprecated since Symfony 5.2. - * This directory should be used to store build artifacts, and can be read-only at runtime. - * Caches written at runtime should be stored in the "cache directory" ({@see KernelInterface::getCacheDir()}). - * - * @author Fabien Potencier - */ -interface KernelInterface extends HttpKernelInterface -{ - /** - * Returns an array of bundles to register. - * - * @return iterable - */ - public function registerBundles(); - - /** - * Loads the container configuration. - */ - public function registerContainerConfiguration(LoaderInterface $loader); - - /** - * Boots the current kernel. - */ - public function boot(); - - /** - * Shutdowns the kernel. - * - * This method is mainly useful when doing functional testing. - */ - public function shutdown(); - - /** - * Gets the registered bundle instances. - * - * @return array - */ - public function getBundles(); - - /** - * Returns a bundle. - * - * @return BundleInterface - * - * @throws \InvalidArgumentException when the bundle is not enabled - */ - public function getBundle(string $name); - - /** - * Returns the file path for a given bundle resource. - * - * A Resource can be a file or a directory. - * - * The resource name must follow the following pattern: - * - * "@BundleName/path/to/a/file.something" - * - * where BundleName is the name of the bundle - * and the remaining part is the relative path in the bundle. - * - * @return string - * - * @throws \InvalidArgumentException if the file cannot be found or the name is not valid - * @throws \RuntimeException if the name contains invalid/unsafe characters - */ - public function locateResource(string $name); - - /** - * Gets the environment. - * - * @return string - */ - public function getEnvironment(); - - /** - * Checks if debug mode is enabled. - * - * @return bool - */ - public function isDebug(); - - /** - * Gets the project dir (path of the project's composer file). - * - * @return string - */ - public function getProjectDir(); - - /** - * Gets the current container. - * - * @return ContainerInterface - */ - public function getContainer(); - - /** - * Gets the request start time (not available if debug is disabled). - * - * @return float - */ - public function getStartTime(); - - /** - * Gets the cache directory. - * - * Since Symfony 5.2, the cache directory should be used for caches that are written at runtime. - * For caches and artifacts that can be warmed at compile-time and deployed as read-only, - * use the new "build directory" returned by the {@see getBuildDir()} method. - * - * @return string - */ - public function getCacheDir(); - - /** - * Gets the log directory. - * - * @return string - */ - public function getLogDir(); - - /** - * Gets the charset of the application. - * - * @return string - */ - public function getCharset(); -} diff --git a/lib/symfony/http-kernel/LICENSE b/lib/symfony/http-kernel/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/http-kernel/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/http-kernel/Log/DebugLoggerInterface.php b/lib/symfony/http-kernel/Log/DebugLoggerInterface.php deleted file mode 100644 index 19ff0db18..000000000 --- a/lib/symfony/http-kernel/Log/DebugLoggerInterface.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Log; - -use Symfony\Component\HttpFoundation\Request; - -/** - * DebugLoggerInterface. - * - * @author Fabien Potencier - */ -interface DebugLoggerInterface -{ - /** - * Returns an array of logs. - * - * A log is an array with the following mandatory keys: - * timestamp, message, priority, and priorityName. - * It can also have an optional context key containing an array. - * - * @return array - */ - public function getLogs(Request $request = null); - - /** - * Returns the number of errors. - * - * @return int - */ - public function countErrors(Request $request = null); - - /** - * Removes all log records. - */ - public function clear(); -} diff --git a/lib/symfony/http-kernel/Log/Logger.php b/lib/symfony/http-kernel/Log/Logger.php deleted file mode 100644 index c2a45bb95..000000000 --- a/lib/symfony/http-kernel/Log/Logger.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Log; - -use Psr\Log\AbstractLogger; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; - -/** - * Minimalist PSR-3 logger designed to write in stderr or any other stream. - * - * @author Kévin Dunglas - */ -class Logger extends AbstractLogger -{ - private const LEVELS = [ - LogLevel::DEBUG => 0, - LogLevel::INFO => 1, - LogLevel::NOTICE => 2, - LogLevel::WARNING => 3, - LogLevel::ERROR => 4, - LogLevel::CRITICAL => 5, - LogLevel::ALERT => 6, - LogLevel::EMERGENCY => 7, - ]; - - private $minLevelIndex; - private $formatter; - - /** @var resource|null */ - private $handle; - - /** - * @param string|resource|null $output - */ - public function __construct(string $minLevel = null, $output = null, callable $formatter = null) - { - if (null === $minLevel) { - $minLevel = null === $output || 'php://stdout' === $output || 'php://stderr' === $output ? LogLevel::ERROR : LogLevel::WARNING; - - if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) { - switch ((int) ($_ENV['SHELL_VERBOSITY'] ?? $_SERVER['SHELL_VERBOSITY'])) { - case -1: $minLevel = LogLevel::ERROR; - break; - case 1: $minLevel = LogLevel::NOTICE; - break; - case 2: $minLevel = LogLevel::INFO; - break; - case 3: $minLevel = LogLevel::DEBUG; - break; - } - } - } - - if (!isset(self::LEVELS[$minLevel])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $minLevel)); - } - - $this->minLevelIndex = self::LEVELS[$minLevel]; - $this->formatter = $formatter ?: [$this, 'format']; - if ($output && false === $this->handle = \is_resource($output) ? $output : @fopen($output, 'a')) { - throw new InvalidArgumentException(sprintf('Unable to open "%s".', $output)); - } - } - - /** - * {@inheritdoc} - * - * @return void - */ - public function log($level, $message, array $context = []) - { - if (!isset(self::LEVELS[$level])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); - } - - if (self::LEVELS[$level] < $this->minLevelIndex) { - return; - } - - $formatter = $this->formatter; - if ($this->handle) { - @fwrite($this->handle, $formatter($level, $message, $context).\PHP_EOL); - } else { - error_log($formatter($level, $message, $context, false)); - } - } - - private function format(string $level, string $message, array $context, bool $prefixDate = true): string - { - if (str_contains($message, '{')) { - $replacements = []; - foreach ($context as $key => $val) { - if (null === $val || \is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { - $replacements["{{$key}}"] = $val; - } elseif ($val instanceof \DateTimeInterface) { - $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); - } elseif (\is_object($val)) { - $replacements["{{$key}}"] = '[object '.\get_class($val).']'; - } else { - $replacements["{{$key}}"] = '['.\gettype($val).']'; - } - } - - $message = strtr($message, $replacements); - } - - $log = sprintf('[%s] %s', $level, $message); - if ($prefixDate) { - $log = date(\DateTime::RFC3339).' '.$log; - } - - return $log; - } -} diff --git a/lib/symfony/http-kernel/Profiler/FileProfilerStorage.php b/lib/symfony/http-kernel/Profiler/FileProfilerStorage.php deleted file mode 100644 index 0b5a780ab..000000000 --- a/lib/symfony/http-kernel/Profiler/FileProfilerStorage.php +++ /dev/null @@ -1,311 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -/** - * Storage for profiler using files. - * - * @author Alexandre Salomé - */ -class FileProfilerStorage implements ProfilerStorageInterface -{ - /** - * Folder where profiler data are stored. - * - * @var string - */ - private $folder; - - /** - * Constructs the file storage using a "dsn-like" path. - * - * Example : "file:/path/to/the/storage/folder" - * - * @throws \RuntimeException - */ - public function __construct(string $dsn) - { - if (!str_starts_with($dsn, 'file:')) { - throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use FileStorage with an invalid dsn "%s". The expected format is "file:/path/to/the/storage/folder".', $dsn)); - } - $this->folder = substr($dsn, 5); - - if (!is_dir($this->folder) && false === @mkdir($this->folder, 0777, true) && !is_dir($this->folder)) { - throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $this->folder)); - } - } - - /** - * {@inheritdoc} - */ - public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null, string $statusCode = null): array - { - $file = $this->getIndexFilename(); - - if (!file_exists($file)) { - return []; - } - - $file = fopen($file, 'r'); - fseek($file, 0, \SEEK_END); - - $result = []; - while (\count($result) < $limit && $line = $this->readLineFromFile($file)) { - $values = str_getcsv($line); - [$csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode] = $values; - $csvTime = (int) $csvTime; - - if ($ip && !str_contains($csvIp, $ip) || $url && !str_contains($csvUrl, $url) || $method && !str_contains($csvMethod, $method) || $statusCode && !str_contains($csvStatusCode, $statusCode)) { - continue; - } - - if (!empty($start) && $csvTime < $start) { - continue; - } - - if (!empty($end) && $csvTime > $end) { - continue; - } - - $result[$csvToken] = [ - 'token' => $csvToken, - 'ip' => $csvIp, - 'method' => $csvMethod, - 'url' => $csvUrl, - 'time' => $csvTime, - 'parent' => $csvParent, - 'status_code' => $csvStatusCode, - ]; - } - - fclose($file); - - return array_values($result); - } - - /** - * {@inheritdoc} - */ - public function purge() - { - $flags = \FilesystemIterator::SKIP_DOTS; - $iterator = new \RecursiveDirectoryIterator($this->folder, $flags); - $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST); - - foreach ($iterator as $file) { - if (is_file($file)) { - unlink($file); - } else { - rmdir($file); - } - } - } - - /** - * {@inheritdoc} - */ - public function read(string $token): ?Profile - { - return $this->doRead($token); - } - - /** - * {@inheritdoc} - * - * @throws \RuntimeException - */ - public function write(Profile $profile): bool - { - $file = $this->getFilename($profile->getToken()); - - $profileIndexed = is_file($file); - if (!$profileIndexed) { - // Create directory - $dir = \dirname($file); - if (!is_dir($dir) && false === @mkdir($dir, 0777, true) && !is_dir($dir)) { - throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $dir)); - } - } - - $profileToken = $profile->getToken(); - // when there are errors in sub-requests, the parent and/or children tokens - // may equal the profile token, resulting in infinite loops - $parentToken = $profile->getParentToken() !== $profileToken ? $profile->getParentToken() : null; - $childrenToken = array_filter(array_map(function (Profile $p) use ($profileToken) { - return $profileToken !== $p->getToken() ? $p->getToken() : null; - }, $profile->getChildren())); - - // Store profile - $data = [ - 'token' => $profileToken, - 'parent' => $parentToken, - 'children' => $childrenToken, - 'data' => $profile->getCollectors(), - 'ip' => $profile->getIp(), - 'method' => $profile->getMethod(), - 'url' => $profile->getUrl(), - 'time' => $profile->getTime(), - 'status_code' => $profile->getStatusCode(), - ]; - - $data = serialize($data); - - if (\function_exists('gzencode')) { - $data = gzencode($data, 3); - } - - if (false === file_put_contents($file, $data, \LOCK_EX)) { - return false; - } - - if (!$profileIndexed) { - // Add to index - if (false === $file = fopen($this->getIndexFilename(), 'a')) { - return false; - } - - fputcsv($file, [ - $profile->getToken(), - $profile->getIp(), - $profile->getMethod(), - $profile->getUrl(), - $profile->getTime(), - $profile->getParentToken(), - $profile->getStatusCode(), - ]); - fclose($file); - } - - return true; - } - - /** - * Gets filename to store data, associated to the token. - * - * @return string - */ - protected function getFilename(string $token) - { - // Uses 4 last characters, because first are mostly the same. - $folderA = substr($token, -2, 2); - $folderB = substr($token, -4, 2); - - return $this->folder.'/'.$folderA.'/'.$folderB.'/'.$token; - } - - /** - * Gets the index filename. - * - * @return string - */ - protected function getIndexFilename() - { - return $this->folder.'/index.csv'; - } - - /** - * Reads a line in the file, backward. - * - * This function automatically skips the empty lines and do not include the line return in result value. - * - * @param resource $file The file resource, with the pointer placed at the end of the line to read - * - * @return mixed - */ - protected function readLineFromFile($file) - { - $line = ''; - $position = ftell($file); - - if (0 === $position) { - return null; - } - - while (true) { - $chunkSize = min($position, 1024); - $position -= $chunkSize; - fseek($file, $position); - - if (0 === $chunkSize) { - // bof reached - break; - } - - $buffer = fread($file, $chunkSize); - - if (false === ($upTo = strrpos($buffer, "\n"))) { - $line = $buffer.$line; - continue; - } - - $position += $upTo; - $line = substr($buffer, $upTo + 1).$line; - fseek($file, max(0, $position), \SEEK_SET); - - if ('' !== $line) { - break; - } - } - - return '' === $line ? null : $line; - } - - protected function createProfileFromData(string $token, array $data, Profile $parent = null) - { - $profile = new Profile($token); - $profile->setIp($data['ip']); - $profile->setMethod($data['method']); - $profile->setUrl($data['url']); - $profile->setTime($data['time']); - $profile->setStatusCode($data['status_code']); - $profile->setCollectors($data['data']); - - if (!$parent && $data['parent']) { - $parent = $this->read($data['parent']); - } - - if ($parent) { - $profile->setParent($parent); - } - - foreach ($data['children'] as $token) { - if (null !== $childProfile = $this->doRead($token, $profile)) { - $profile->addChild($childProfile); - } - } - - return $profile; - } - - private function doRead($token, Profile $profile = null): ?Profile - { - if (!$token || !file_exists($file = $this->getFilename($token))) { - return null; - } - - $h = fopen($file, 'r'); - flock($h, \LOCK_SH); - $data = stream_get_contents($h); - flock($h, \LOCK_UN); - fclose($h); - - if (\function_exists('gzdecode')) { - $data = @gzdecode($data) ?: $data; - } - - if (!$data = unserialize($data)) { - return null; - } - - return $this->createProfileFromData($token, $data, $profile); - } -} diff --git a/lib/symfony/http-kernel/Profiler/Profile.php b/lib/symfony/http-kernel/Profiler/Profile.php deleted file mode 100644 index a622403e1..000000000 --- a/lib/symfony/http-kernel/Profiler/Profile.php +++ /dev/null @@ -1,270 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; - -/** - * Profile. - * - * @author Fabien Potencier - */ -class Profile -{ - private $token; - - /** - * @var DataCollectorInterface[] - */ - private $collectors = []; - - private $ip; - private $method; - private $url; - private $time; - private $statusCode; - - /** - * @var Profile - */ - private $parent; - - /** - * @var Profile[] - */ - private $children = []; - - public function __construct(string $token) - { - $this->token = $token; - } - - public function setToken(string $token) - { - $this->token = $token; - } - - /** - * Gets the token. - * - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * Sets the parent token. - */ - public function setParent(self $parent) - { - $this->parent = $parent; - } - - /** - * Returns the parent profile. - * - * @return self|null - */ - public function getParent() - { - return $this->parent; - } - - /** - * Returns the parent token. - * - * @return string|null - */ - public function getParentToken() - { - return $this->parent ? $this->parent->getToken() : null; - } - - /** - * Returns the IP. - * - * @return string|null - */ - public function getIp() - { - return $this->ip; - } - - public function setIp(?string $ip) - { - $this->ip = $ip; - } - - /** - * Returns the request method. - * - * @return string|null - */ - public function getMethod() - { - return $this->method; - } - - public function setMethod(string $method) - { - $this->method = $method; - } - - /** - * Returns the URL. - * - * @return string|null - */ - public function getUrl() - { - return $this->url; - } - - public function setUrl(?string $url) - { - $this->url = $url; - } - - /** - * @return int - */ - public function getTime() - { - return $this->time ?? 0; - } - - public function setTime(int $time) - { - $this->time = $time; - } - - public function setStatusCode(int $statusCode) - { - $this->statusCode = $statusCode; - } - - /** - * @return int|null - */ - public function getStatusCode() - { - return $this->statusCode; - } - - /** - * Finds children profilers. - * - * @return self[] - */ - public function getChildren() - { - return $this->children; - } - - /** - * Sets children profiler. - * - * @param Profile[] $children - */ - public function setChildren(array $children) - { - $this->children = []; - foreach ($children as $child) { - $this->addChild($child); - } - } - - /** - * Adds the child token. - */ - public function addChild(self $child) - { - $this->children[] = $child; - $child->setParent($this); - } - - public function getChildByToken(string $token): ?self - { - foreach ($this->children as $child) { - if ($token === $child->getToken()) { - return $child; - } - } - - return null; - } - - /** - * Gets a Collector by name. - * - * @return DataCollectorInterface - * - * @throws \InvalidArgumentException if the collector does not exist - */ - public function getCollector(string $name) - { - if (!isset($this->collectors[$name])) { - throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name)); - } - - return $this->collectors[$name]; - } - - /** - * Gets the Collectors associated with this profile. - * - * @return DataCollectorInterface[] - */ - public function getCollectors() - { - return $this->collectors; - } - - /** - * Sets the Collectors associated with this profile. - * - * @param DataCollectorInterface[] $collectors - */ - public function setCollectors(array $collectors) - { - $this->collectors = []; - foreach ($collectors as $collector) { - $this->addCollector($collector); - } - } - - /** - * Adds a Collector. - */ - public function addCollector(DataCollectorInterface $collector) - { - $this->collectors[$collector->getName()] = $collector; - } - - /** - * @return bool - */ - public function hasCollector(string $name) - { - return isset($this->collectors[$name]); - } - - /** - * @return array - */ - public function __sleep() - { - return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode']; - } -} diff --git a/lib/symfony/http-kernel/Profiler/Profiler.php b/lib/symfony/http-kernel/Profiler/Profiler.php deleted file mode 100644 index 25e126f73..000000000 --- a/lib/symfony/http-kernel/Profiler/Profiler.php +++ /dev/null @@ -1,253 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Profiler. - * - * @author Fabien Potencier - */ -class Profiler implements ResetInterface -{ - private $storage; - - /** - * @var DataCollectorInterface[] - */ - private $collectors = []; - - private $logger; - private $initiallyEnabled = true; - private $enabled = true; - - public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger = null, bool $enable = true) - { - $this->storage = $storage; - $this->logger = $logger; - $this->initiallyEnabled = $this->enabled = $enable; - } - - /** - * Disables the profiler. - */ - public function disable() - { - $this->enabled = false; - } - - /** - * Enables the profiler. - */ - public function enable() - { - $this->enabled = true; - } - - /** - * Loads the Profile for the given Response. - * - * @return Profile|null - */ - public function loadProfileFromResponse(Response $response) - { - if (!$token = $response->headers->get('X-Debug-Token')) { - return null; - } - - return $this->loadProfile($token); - } - - /** - * Loads the Profile for the given token. - * - * @return Profile|null - */ - public function loadProfile(string $token) - { - return $this->storage->read($token); - } - - /** - * Saves a Profile. - * - * @return bool - */ - public function saveProfile(Profile $profile) - { - // late collect - foreach ($profile->getCollectors() as $collector) { - if ($collector instanceof LateDataCollectorInterface) { - $collector->lateCollect(); - } - } - - if (!($ret = $this->storage->write($profile)) && null !== $this->logger) { - $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]); - } - - return $ret; - } - - /** - * Purges all data from the storage. - */ - public function purge() - { - $this->storage->purge(); - } - - /** - * Finds profiler tokens for the given criteria. - * - * @param string|null $limit The maximum number of tokens to return - * @param string|null $start The start date to search from - * @param string|null $end The end date to search to - * - * @return array - * - * @see https://php.net/datetime.formats for the supported date/time formats - */ - public function find(?string $ip, ?string $url, ?string $limit, ?string $method, ?string $start, ?string $end, string $statusCode = null) - { - return $this->storage->find($ip, $url, $limit, $method, $this->getTimestamp($start), $this->getTimestamp($end), $statusCode); - } - - /** - * Collects data for the given Response. - * - * @return Profile|null - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (false === $this->enabled) { - return null; - } - - $profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); - $profile->setTime(time()); - $profile->setUrl($request->getUri()); - $profile->setMethod($request->getMethod()); - $profile->setStatusCode($response->getStatusCode()); - try { - $profile->setIp($request->getClientIp()); - } catch (ConflictingHeadersException $e) { - $profile->setIp('Unknown'); - } - - if ($prevToken = $response->headers->get('X-Debug-Token')) { - $response->headers->set('X-Previous-Debug-Token', $prevToken); - } - - $response->headers->set('X-Debug-Token', $profile->getToken()); - - foreach ($this->collectors as $collector) { - $collector->collect($request, $response, $exception); - - // we need to clone for sub-requests - $profile->addCollector(clone $collector); - } - - return $profile; - } - - public function reset() - { - foreach ($this->collectors as $collector) { - $collector->reset(); - } - $this->enabled = $this->initiallyEnabled; - } - - /** - * Gets the Collectors associated with this profiler. - * - * @return array - */ - public function all() - { - return $this->collectors; - } - - /** - * Sets the Collectors associated with this profiler. - * - * @param DataCollectorInterface[] $collectors An array of collectors - */ - public function set(array $collectors = []) - { - $this->collectors = []; - foreach ($collectors as $collector) { - $this->add($collector); - } - } - - /** - * Adds a Collector. - */ - public function add(DataCollectorInterface $collector) - { - $this->collectors[$collector->getName()] = $collector; - } - - /** - * Returns true if a Collector for the given name exists. - * - * @param string $name A collector name - * - * @return bool - */ - public function has(string $name) - { - return isset($this->collectors[$name]); - } - - /** - * Gets a Collector by name. - * - * @param string $name A collector name - * - * @return DataCollectorInterface - * - * @throws \InvalidArgumentException if the collector does not exist - */ - public function get(string $name) - { - if (!isset($this->collectors[$name])) { - throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name)); - } - - return $this->collectors[$name]; - } - - private function getTimestamp(?string $value): ?int - { - if (null === $value || '' === $value) { - return null; - } - - try { - $value = new \DateTime(is_numeric($value) ? '@'.$value : $value); - } catch (\Exception $e) { - return null; - } - - return $value->getTimestamp(); - } -} diff --git a/lib/symfony/http-kernel/Profiler/ProfilerStorageInterface.php b/lib/symfony/http-kernel/Profiler/ProfilerStorageInterface.php deleted file mode 100644 index 95d72f46b..000000000 --- a/lib/symfony/http-kernel/Profiler/ProfilerStorageInterface.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -/** - * ProfilerStorageInterface. - * - * This interface exists for historical reasons. The only supported - * implementation is FileProfilerStorage. - * - * As the profiler must only be used on non-production servers, the file storage - * is more than enough and no other implementations will ever be supported. - * - * @internal - * - * @author Fabien Potencier - */ -interface ProfilerStorageInterface -{ - /** - * Finds profiler tokens for the given criteria. - * - * @param int|null $limit The maximum number of tokens to return - * @param int|null $start The start date to search from - * @param int|null $end The end date to search to - */ - public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null): array; - - /** - * Reads data associated with the given token. - * - * The method returns false if the token does not exist in the storage. - */ - public function read(string $token): ?Profile; - - /** - * Saves a Profile. - */ - public function write(Profile $profile): bool; - - /** - * Purges all data from the database. - */ - public function purge(); -} diff --git a/lib/symfony/http-kernel/README.md b/lib/symfony/http-kernel/README.md deleted file mode 100644 index ca5041782..000000000 --- a/lib/symfony/http-kernel/README.md +++ /dev/null @@ -1,31 +0,0 @@ -HttpKernel Component -==================== - -The HttpKernel component provides a structured process for converting a Request -into a Response by making use of the EventDispatcher component. It's flexible -enough to create full-stack frameworks, micro-frameworks or advanced CMS systems like Drupal. - -Sponsor -------- - -The HttpKernel component for Symfony 5.4/6.0 is [backed][1] by [Les-Tilleuls.coop][2]. - -Les-Tilleuls.coop is a team of 50+ Symfony experts who can help you design, develop and -fix your projects. We provide a wide range of professional services including development, -consulting, coaching, training and audits. We also are highly skilled in JS, Go and DevOps. -We are a worker cooperative! - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/http_kernel.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://les-tilleuls.coop -[3]: https://symfony.com/sponsor diff --git a/lib/symfony/http-kernel/RebootableInterface.php b/lib/symfony/http-kernel/RebootableInterface.php deleted file mode 100644 index e257237da..000000000 --- a/lib/symfony/http-kernel/RebootableInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -/** - * Allows the Kernel to be rebooted using a temporary cache directory. - * - * @author Nicolas Grekas - */ -interface RebootableInterface -{ - /** - * Reboots a kernel. - * - * The getBuildDir() method of a rebootable kernel should not be called - * while building the container. Use the %kernel.build_dir% parameter instead. - * - * @param string|null $warmupDir pass null to reboot in the regular build directory - */ - public function reboot(?string $warmupDir); -} diff --git a/lib/symfony/http-kernel/Resources/welcome.html.php b/lib/symfony/http-kernel/Resources/welcome.html.php deleted file mode 100644 index b25f99b3d..000000000 --- a/lib/symfony/http-kernel/Resources/welcome.html.php +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Welcome to Symfony! - - - -
    -
    - -

    - You're seeing this page because you haven't configured any homepage URL and debug mode is enabled. -

    -
    - -
    -
    - -

    Welcome to Symfony

    -
    - -
    - - - - - - -

    Your application is now ready and you can start working on it.

    -
    - - -
    - -
    - -
    -
    - - diff --git a/lib/symfony/http-kernel/TerminableInterface.php b/lib/symfony/http-kernel/TerminableInterface.php deleted file mode 100644 index 8aa331979..000000000 --- a/lib/symfony/http-kernel/TerminableInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Terminable extends the Kernel request/response cycle with dispatching a post - * response event after sending the response and before shutting down the kernel. - * - * @author Jordi Boggiano - * @author Pierre Minnieur - */ -interface TerminableInterface -{ - /** - * Terminates a request/response cycle. - * - * Should be called after sending the response and before shutting down the kernel. - */ - public function terminate(Request $request, Response $response); -} diff --git a/lib/symfony/http-kernel/UriSigner.php b/lib/symfony/http-kernel/UriSigner.php deleted file mode 100644 index 38931ce17..000000000 --- a/lib/symfony/http-kernel/UriSigner.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Request; - -/** - * Signs URIs. - * - * @author Fabien Potencier - */ -class UriSigner -{ - private $secret; - private $parameter; - - /** - * @param string $secret A secret - * @param string $parameter Query string parameter to use - */ - public function __construct(string $secret, string $parameter = '_hash') - { - $this->secret = $secret; - $this->parameter = $parameter; - } - - /** - * Signs a URI. - * - * The given URI is signed by adding the query string parameter - * which value depends on the URI and the secret. - * - * @return string - */ - public function sign(string $uri) - { - $url = parse_url($uri); - if (isset($url['query'])) { - parse_str($url['query'], $params); - } else { - $params = []; - } - - $uri = $this->buildUrl($url, $params); - $params[$this->parameter] = $this->computeHash($uri); - - return $this->buildUrl($url, $params); - } - - /** - * Checks that a URI contains the correct hash. - * - * @return bool - */ - public function check(string $uri) - { - $url = parse_url($uri); - if (isset($url['query'])) { - parse_str($url['query'], $params); - } else { - $params = []; - } - - if (empty($params[$this->parameter])) { - return false; - } - - $hash = $params[$this->parameter]; - unset($params[$this->parameter]); - - return hash_equals($this->computeHash($this->buildUrl($url, $params)), $hash); - } - - public function checkRequest(Request $request): bool - { - $qs = ($qs = $request->server->get('QUERY_STRING')) ? '?'.$qs : ''; - - // we cannot use $request->getUri() here as we want to work with the original URI (no query string reordering) - return $this->check($request->getSchemeAndHttpHost().$request->getBaseUrl().$request->getPathInfo().$qs); - } - - private function computeHash(string $uri): string - { - return base64_encode(hash_hmac('sha256', $uri, $this->secret, true)); - } - - private function buildUrl(array $url, array $params = []): string - { - ksort($params, \SORT_STRING); - $url['query'] = http_build_query($params, '', '&'); - - $scheme = isset($url['scheme']) ? $url['scheme'].'://' : ''; - $host = $url['host'] ?? ''; - $port = isset($url['port']) ? ':'.$url['port'] : ''; - $user = $url['user'] ?? ''; - $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; - $pass = ($user || $pass) ? "$pass@" : ''; - $path = $url['path'] ?? ''; - $query = isset($url['query']) && $url['query'] ? '?'.$url['query'] : ''; - $fragment = isset($url['fragment']) ? '#'.$url['fragment'] : ''; - - return $scheme.$user.$pass.$host.$port.$path.$query.$fragment; - } -} diff --git a/lib/symfony/http-kernel/composer.json b/lib/symfony/http-kernel/composer.json deleted file mode 100644 index 09682db49..000000000 --- a/lib/symfony/http-kernel/composer.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "symfony/http-kernel", - "type": "library", - "description": "Provides a structured process for converting a Request into a Response", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "psr/log": "^1|^2" - }, - "require-dev": { - "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", - "psr/cache": "^1.0|^2.0|^3.0", - "twig/twig": "^2.13|^3.0.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/form": "<5.0", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", - "twig/twig": "<2.13" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\HttpKernel\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/options-resolver/CHANGELOG.md b/lib/symfony/options-resolver/CHANGELOG.md deleted file mode 100644 index 84c45946a..000000000 --- a/lib/symfony/options-resolver/CHANGELOG.md +++ /dev/null @@ -1,81 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - - * Add prototype definition for nested options - -5.1.0 ------ - - * added fluent configuration of options using `OptionResolver::define()` - * added `setInfo()` and `getInfo()` methods - * updated the signature of method `OptionsResolver::setDeprecated()` to `OptionsResolver::setDeprecation(string $option, string $package, string $version, $message)` - * deprecated `OptionsResolverIntrospector::getDeprecationMessage()`, use `OptionsResolverIntrospector::getDeprecation()` instead - -5.0.0 ------ - - * added argument `$triggerDeprecation` to `OptionsResolver::offsetGet()` - -4.3.0 ------ - - * added `OptionsResolver::addNormalizer` method - -4.2.0 ------ - - * added support for nested options definition - * added `setDeprecated` and `isDeprecated` methods - -3.4.0 ------ - - * added `OptionsResolverIntrospector` to inspect options definitions inside an `OptionsResolver` instance - * added array of types support in allowed types (e.g int[]) - -2.6.0 ------ - - * deprecated OptionsResolverInterface - * [BC BREAK] removed "array" type hint from OptionsResolverInterface methods - setRequired(), setAllowedValues(), addAllowedValues(), setAllowedTypes() and - addAllowedTypes() - * added OptionsResolver::setDefault() - * added OptionsResolver::hasDefault() - * added OptionsResolver::setNormalizer() - * added OptionsResolver::isRequired() - * added OptionsResolver::getRequiredOptions() - * added OptionsResolver::isMissing() - * added OptionsResolver::getMissingOptions() - * added OptionsResolver::setDefined() - * added OptionsResolver::isDefined() - * added OptionsResolver::getDefinedOptions() - * added OptionsResolver::remove() - * added OptionsResolver::clear() - * deprecated OptionsResolver::replaceDefaults() - * deprecated OptionsResolver::setOptional() in favor of setDefined() - * deprecated OptionsResolver::isKnown() in favor of isDefined() - * [BC BREAK] OptionsResolver::isRequired() returns true now if a required - option has a default value set - * [BC BREAK] merged Options into OptionsResolver and turned Options into an - interface - * deprecated Options::overload() (now in OptionsResolver) - * deprecated Options::set() (now in OptionsResolver) - * deprecated Options::get() (now in OptionsResolver) - * deprecated Options::has() (now in OptionsResolver) - * deprecated Options::replace() (now in OptionsResolver) - * [BC BREAK] Options::get() (now in OptionsResolver) can only be used within - lazy option/normalizer closures now - * [BC BREAK] removed Traversable interface from Options since using within - lazy option/normalizer closures resulted in exceptions - * [BC BREAK] removed Options::all() since using within lazy option/normalizer - closures resulted in exceptions - * [BC BREAK] OptionDefinitionException now extends LogicException instead of - RuntimeException - * [BC BREAK] normalizers are not executed anymore for unset options - * normalizers are executed after validating the options now - * [BC BREAK] an UndefinedOptionsException is now thrown instead of an - InvalidOptionsException when non-existing options are passed diff --git a/lib/symfony/options-resolver/Debug/OptionsResolverIntrospector.php b/lib/symfony/options-resolver/Debug/OptionsResolverIntrospector.php deleted file mode 100644 index 95909f32e..000000000 --- a/lib/symfony/options-resolver/Debug/OptionsResolverIntrospector.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Debug; - -use Symfony\Component\OptionsResolver\Exception\NoConfigurationException; -use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Maxime Steinhausser - * - * @final - */ -class OptionsResolverIntrospector -{ - private $get; - - public function __construct(OptionsResolver $optionsResolver) - { - $this->get = \Closure::bind(function ($property, $option, $message) { - /** @var OptionsResolver $this */ - if (!$this->isDefined($option)) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist.', $option)); - } - - if (!\array_key_exists($option, $this->{$property})) { - throw new NoConfigurationException($message); - } - - return $this->{$property}[$option]; - }, $optionsResolver, $optionsResolver); - } - - /** - * @return mixed - * - * @throws NoConfigurationException on no configured value - */ - public function getDefault(string $option) - { - return ($this->get)('defaults', $option, sprintf('No default value was set for the "%s" option.', $option)); - } - - /** - * @return \Closure[] - * - * @throws NoConfigurationException on no configured closures - */ - public function getLazyClosures(string $option): array - { - return ($this->get)('lazy', $option, sprintf('No lazy closures were set for the "%s" option.', $option)); - } - - /** - * @return string[] - * - * @throws NoConfigurationException on no configured types - */ - public function getAllowedTypes(string $option): array - { - return ($this->get)('allowedTypes', $option, sprintf('No allowed types were set for the "%s" option.', $option)); - } - - /** - * @return mixed[] - * - * @throws NoConfigurationException on no configured values - */ - public function getAllowedValues(string $option): array - { - return ($this->get)('allowedValues', $option, sprintf('No allowed values were set for the "%s" option.', $option)); - } - - /** - * @throws NoConfigurationException on no configured normalizer - */ - public function getNormalizer(string $option): \Closure - { - return current($this->getNormalizers($option)); - } - - /** - * @throws NoConfigurationException when no normalizer is configured - */ - public function getNormalizers(string $option): array - { - return ($this->get)('normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option)); - } - - /** - * @return string|\Closure - * - * @throws NoConfigurationException on no configured deprecation - * - * @deprecated since Symfony 5.1, use "getDeprecation()" instead. - */ - public function getDeprecationMessage(string $option) - { - trigger_deprecation('symfony/options-resolver', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__); - - return $this->getDeprecation($option)['message']; - } - - /** - * @throws NoConfigurationException on no configured deprecation - */ - public function getDeprecation(string $option): array - { - return ($this->get)('deprecated', $option, sprintf('No deprecation was set for the "%s" option.', $option)); - } -} diff --git a/lib/symfony/options-resolver/Exception/AccessException.php b/lib/symfony/options-resolver/Exception/AccessException.php deleted file mode 100644 index c12b68064..000000000 --- a/lib/symfony/options-resolver/Exception/AccessException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when trying to read an option outside of or write it inside of - * {@link \Symfony\Component\OptionsResolver\Options::resolve()}. - * - * @author Bernhard Schussek - */ -class AccessException extends \LogicException implements ExceptionInterface -{ -} diff --git a/lib/symfony/options-resolver/Exception/ExceptionInterface.php b/lib/symfony/options-resolver/Exception/ExceptionInterface.php deleted file mode 100644 index ea99d050e..000000000 --- a/lib/symfony/options-resolver/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Marker interface for all exceptions thrown by the OptionsResolver component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/options-resolver/Exception/InvalidArgumentException.php b/lib/symfony/options-resolver/Exception/InvalidArgumentException.php deleted file mode 100644 index 6d421d68b..000000000 --- a/lib/symfony/options-resolver/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when an argument is invalid. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/options-resolver/Exception/InvalidOptionsException.php b/lib/symfony/options-resolver/Exception/InvalidOptionsException.php deleted file mode 100644 index 6fd4f125f..000000000 --- a/lib/symfony/options-resolver/Exception/InvalidOptionsException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when the value of an option does not match its validation rules. - * - * You should make sure a valid value is passed to the option. - * - * @author Bernhard Schussek - */ -class InvalidOptionsException extends InvalidArgumentException -{ -} diff --git a/lib/symfony/options-resolver/Exception/MissingOptionsException.php b/lib/symfony/options-resolver/Exception/MissingOptionsException.php deleted file mode 100644 index faa487f16..000000000 --- a/lib/symfony/options-resolver/Exception/MissingOptionsException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Exception thrown when a required option is missing. - * - * Add the option to the passed options array. - * - * @author Bernhard Schussek - */ -class MissingOptionsException extends InvalidArgumentException -{ -} diff --git a/lib/symfony/options-resolver/Exception/NoConfigurationException.php b/lib/symfony/options-resolver/Exception/NoConfigurationException.php deleted file mode 100644 index 6693ec14d..000000000 --- a/lib/symfony/options-resolver/Exception/NoConfigurationException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector; - -/** - * Thrown when trying to introspect an option definition property - * for which no value was configured inside the OptionsResolver instance. - * - * @see OptionsResolverIntrospector - * - * @author Maxime Steinhausser - */ -class NoConfigurationException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/options-resolver/Exception/NoSuchOptionException.php b/lib/symfony/options-resolver/Exception/NoSuchOptionException.php deleted file mode 100644 index 4c3280f4c..000000000 --- a/lib/symfony/options-resolver/Exception/NoSuchOptionException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when trying to read an option that has no value set. - * - * When accessing optional options from within a lazy option or normalizer you should first - * check whether the optional option is set. You can do this with `isset($options['optional'])`. - * In contrast to the {@link UndefinedOptionsException}, this is a runtime exception that can - * occur when evaluating lazy options. - * - * @author Tobias Schultze - */ -class NoSuchOptionException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/lib/symfony/options-resolver/Exception/OptionDefinitionException.php b/lib/symfony/options-resolver/Exception/OptionDefinitionException.php deleted file mode 100644 index e8e339d44..000000000 --- a/lib/symfony/options-resolver/Exception/OptionDefinitionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when two lazy options have a cyclic dependency. - * - * @author Bernhard Schussek - */ -class OptionDefinitionException extends \LogicException implements ExceptionInterface -{ -} diff --git a/lib/symfony/options-resolver/Exception/UndefinedOptionsException.php b/lib/symfony/options-resolver/Exception/UndefinedOptionsException.php deleted file mode 100644 index 6ca3fce47..000000000 --- a/lib/symfony/options-resolver/Exception/UndefinedOptionsException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Exception thrown when an undefined option is passed. - * - * You should remove the options in question from your code or define them - * beforehand. - * - * @author Bernhard Schussek - */ -class UndefinedOptionsException extends InvalidArgumentException -{ -} diff --git a/lib/symfony/options-resolver/LICENSE b/lib/symfony/options-resolver/LICENSE deleted file mode 100644 index 0138f8f07..000000000 --- a/lib/symfony/options-resolver/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/options-resolver/OptionConfigurator.php b/lib/symfony/options-resolver/OptionConfigurator.php deleted file mode 100644 index 62f03d064..000000000 --- a/lib/symfony/options-resolver/OptionConfigurator.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -use Symfony\Component\OptionsResolver\Exception\AccessException; - -final class OptionConfigurator -{ - private $name; - private $resolver; - - public function __construct(string $name, OptionsResolver $resolver) - { - $this->name = $name; - $this->resolver = $resolver; - $this->resolver->setDefined($name); - } - - /** - * Adds allowed types for this option. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function allowedTypes(string ...$types): self - { - $this->resolver->setAllowedTypes($this->name, $types); - - return $this; - } - - /** - * Sets allowed values for this option. - * - * @param mixed ...$values One or more acceptable values/closures - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function allowedValues(...$values): self - { - $this->resolver->setAllowedValues($this->name, $values); - - return $this; - } - - /** - * Sets the default value for this option. - * - * @param mixed $value The default value of the option - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function default($value): self - { - $this->resolver->setDefault($this->name, $value); - - return $this; - } - - /** - * Defines an option configurator with the given name. - */ - public function define(string $option): self - { - return $this->resolver->define($option); - } - - /** - * Marks this option as deprecated. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string|\Closure $message The deprecation message to use - * - * @return $this - */ - public function deprecated(string $package, string $version, $message = 'The option "%name%" is deprecated.'): self - { - $this->resolver->setDeprecated($this->name, $package, $version, $message); - - return $this; - } - - /** - * Sets the normalizer for this option. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function normalize(\Closure $normalizer): self - { - $this->resolver->setNormalizer($this->name, $normalizer); - - return $this; - } - - /** - * Marks this option as required. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function required(): self - { - $this->resolver->setRequired($this->name); - - return $this; - } - - /** - * Sets an info message for an option. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function info(string $info): self - { - $this->resolver->setInfo($this->name, $info); - - return $this; - } -} diff --git a/lib/symfony/options-resolver/Options.php b/lib/symfony/options-resolver/Options.php deleted file mode 100644 index d444ec423..000000000 --- a/lib/symfony/options-resolver/Options.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -/** - * Contains resolved option values. - * - * @author Bernhard Schussek - * @author Tobias Schultze - */ -interface Options extends \ArrayAccess, \Countable -{ -} diff --git a/lib/symfony/options-resolver/OptionsResolver.php b/lib/symfony/options-resolver/OptionsResolver.php deleted file mode 100644 index 3db291f99..000000000 --- a/lib/symfony/options-resolver/OptionsResolver.php +++ /dev/null @@ -1,1347 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -use Symfony\Component\OptionsResolver\Exception\AccessException; -use Symfony\Component\OptionsResolver\Exception\InvalidArgumentException; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; -use Symfony\Component\OptionsResolver\Exception\NoSuchOptionException; -use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; -use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; - -/** - * Validates options and merges them with default values. - * - * @author Bernhard Schussek - * @author Tobias Schultze - */ -class OptionsResolver implements Options -{ - private const VALIDATION_FUNCTIONS = [ - 'bool' => 'is_bool', - 'boolean' => 'is_bool', - 'int' => 'is_int', - 'integer' => 'is_int', - 'long' => 'is_int', - 'float' => 'is_float', - 'double' => 'is_float', - 'real' => 'is_float', - 'numeric' => 'is_numeric', - 'string' => 'is_string', - 'scalar' => 'is_scalar', - 'array' => 'is_array', - 'iterable' => 'is_iterable', - 'countable' => 'is_countable', - 'callable' => 'is_callable', - 'object' => 'is_object', - 'resource' => 'is_resource', - ]; - - /** - * The names of all defined options. - */ - private $defined = []; - - /** - * The default option values. - */ - private $defaults = []; - - /** - * A list of closure for nested options. - * - * @var \Closure[][] - */ - private $nested = []; - - /** - * The names of required options. - */ - private $required = []; - - /** - * The resolved option values. - */ - private $resolved = []; - - /** - * A list of normalizer closures. - * - * @var \Closure[][] - */ - private $normalizers = []; - - /** - * A list of accepted values for each option. - */ - private $allowedValues = []; - - /** - * A list of accepted types for each option. - */ - private $allowedTypes = []; - - /** - * A list of info messages for each option. - */ - private $info = []; - - /** - * A list of closures for evaluating lazy options. - */ - private $lazy = []; - - /** - * A list of lazy options whose closure is currently being called. - * - * This list helps detecting circular dependencies between lazy options. - */ - private $calling = []; - - /** - * A list of deprecated options. - */ - private $deprecated = []; - - /** - * The list of options provided by the user. - */ - private $given = []; - - /** - * Whether the instance is locked for reading. - * - * Once locked, the options cannot be changed anymore. This is - * necessary in order to avoid inconsistencies during the resolving - * process. If any option is changed after being read, all evaluated - * lazy options that depend on this option would become invalid. - */ - private $locked = false; - - private $parentsOptions = []; - - /** - * Whether the whole options definition is marked as array prototype. - */ - private $prototype; - - /** - * The prototype array's index that is being read. - */ - private $prototypeIndex; - - /** - * Sets the default value of a given option. - * - * If the default value should be set based on other options, you can pass - * a closure with the following signature: - * - * function (Options $options) { - * // ... - * } - * - * The closure will be evaluated when {@link resolve()} is called. The - * closure has access to the resolved values of other options through the - * passed {@link Options} instance: - * - * function (Options $options) { - * if (isset($options['port'])) { - * // ... - * } - * } - * - * If you want to access the previously set default value, add a second - * argument to the closure's signature: - * - * $options->setDefault('name', 'Default Name'); - * - * $options->setDefault('name', function (Options $options, $previousValue) { - * // 'Default Name' === $previousValue - * }); - * - * This is mostly useful if the configuration of the {@link Options} object - * is spread across different locations of your code, such as base and - * sub-classes. - * - * If you want to define nested options, you can pass a closure with the - * following signature: - * - * $options->setDefault('database', function (OptionsResolver $resolver) { - * $resolver->setDefined(['dbname', 'host', 'port', 'user', 'pass']); - * } - * - * To get access to the parent options, add a second argument to the closure's - * signature: - * - * function (OptionsResolver $resolver, Options $parent) { - * // 'default' === $parent['connection'] - * } - * - * @param string $option The name of the option - * @param mixed $value The default value of the option - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefault(string $option, $value) - { - // Setting is not possible once resolving starts, because then lazy - // options could manipulate the state of the object, leading to - // inconsistent results. - if ($this->locked) { - throw new AccessException('Default values cannot be set from a lazy option or normalizer.'); - } - - // If an option is a closure that should be evaluated lazily, store it - // in the "lazy" property. - if ($value instanceof \Closure) { - $reflClosure = new \ReflectionFunction($value); - $params = $reflClosure->getParameters(); - - if (isset($params[0]) && Options::class === $this->getParameterClassName($params[0])) { - // Initialize the option if no previous value exists - if (!isset($this->defaults[$option])) { - $this->defaults[$option] = null; - } - - // Ignore previous lazy options if the closure has no second parameter - if (!isset($this->lazy[$option]) || !isset($params[1])) { - $this->lazy[$option] = []; - } - - // Store closure for later evaluation - $this->lazy[$option][] = $value; - $this->defined[$option] = true; - - // Make sure the option is processed and is not nested anymore - unset($this->resolved[$option], $this->nested[$option]); - - return $this; - } - - if (isset($params[0]) && null !== ($type = $params[0]->getType()) && self::class === $type->getName() && (!isset($params[1]) || (($type = $params[1]->getType()) instanceof \ReflectionNamedType && Options::class === $type->getName()))) { - // Store closure for later evaluation - $this->nested[$option][] = $value; - $this->defaults[$option] = []; - $this->defined[$option] = true; - - // Make sure the option is processed and is not lazy anymore - unset($this->resolved[$option], $this->lazy[$option]); - - return $this; - } - } - - // This option is not lazy nor nested anymore - unset($this->lazy[$option], $this->nested[$option]); - - // Yet undefined options can be marked as resolved, because we only need - // to resolve options with lazy closures, normalizers or validation - // rules, none of which can exist for undefined options - // If the option was resolved before, update the resolved value - if (!isset($this->defined[$option]) || \array_key_exists($option, $this->resolved)) { - $this->resolved[$option] = $value; - } - - $this->defaults[$option] = $value; - $this->defined[$option] = true; - - return $this; - } - - /** - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefaults(array $defaults) - { - foreach ($defaults as $option => $value) { - $this->setDefault($option, $value); - } - - return $this; - } - - /** - * Returns whether a default value is set for an option. - * - * Returns true if {@link setDefault()} was called for this option. - * An option is also considered set if it was set to null. - * - * @return bool - */ - public function hasDefault(string $option) - { - return \array_key_exists($option, $this->defaults); - } - - /** - * Marks one or more options as required. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setRequired($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be made required from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - $this->defined[$option] = true; - $this->required[$option] = true; - } - - return $this; - } - - /** - * Returns whether an option is required. - * - * An option is required if it was passed to {@link setRequired()}. - * - * @return bool - */ - public function isRequired(string $option) - { - return isset($this->required[$option]); - } - - /** - * Returns the names of all required options. - * - * @return string[] - * - * @see isRequired() - */ - public function getRequiredOptions() - { - return array_keys($this->required); - } - - /** - * Returns whether an option is missing a default value. - * - * An option is missing if it was passed to {@link setRequired()}, but not - * to {@link setDefault()}. This option must be passed explicitly to - * {@link resolve()}, otherwise an exception will be thrown. - * - * @return bool - */ - public function isMissing(string $option) - { - return isset($this->required[$option]) && !\array_key_exists($option, $this->defaults); - } - - /** - * Returns the names of all options missing a default value. - * - * @return string[] - */ - public function getMissingOptions() - { - return array_keys(array_diff_key($this->required, $this->defaults)); - } - - /** - * Defines a valid option name. - * - * Defines an option name without setting a default value. The option will - * be accepted when passed to {@link resolve()}. When not passed, the - * option will not be included in the resolved options. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefined($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be defined from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - $this->defined[$option] = true; - } - - return $this; - } - - /** - * Returns whether an option is defined. - * - * Returns true for any option passed to {@link setDefault()}, - * {@link setRequired()} or {@link setDefined()}. - * - * @return bool - */ - public function isDefined(string $option) - { - return isset($this->defined[$option]); - } - - /** - * Returns the names of all defined options. - * - * @return string[] - * - * @see isDefined() - */ - public function getDefinedOptions() - { - return array_keys($this->defined); - } - - public function isNested(string $option): bool - { - return isset($this->nested[$option]); - } - - /** - * Deprecates an option, allowed types or values. - * - * Instead of passing the message, you may also pass a closure with the - * following signature: - * - * function (Options $options, $value): string { - * // ... - * } - * - * The closure receives the value as argument and should return a string. - * Return an empty string to ignore the option deprecation. - * - * The closure is invoked when {@link resolve()} is called. The parameter - * passed to the closure is the value of the option after validating it - * and before normalizing it. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string|\Closure $message The deprecation message to use - * - * @return $this - */ - public function setDeprecated(string $option/* , string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self - { - if ($this->locked) { - throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist, defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $args = \func_get_args(); - - if (\func_num_args() < 3) { - trigger_deprecation('symfony/options-resolver', '5.1', 'The signature of method "%s()" requires 2 new arguments: "string $package, string $version", not defining them is deprecated.', __METHOD__); - - $message = $args[1] ?? 'The option "%name%" is deprecated.'; - $package = $version = ''; - } else { - $package = $args[1]; - $version = $args[2]; - $message = $args[3] ?? 'The option "%name%" is deprecated.'; - } - - if (!\is_string($message) && !$message instanceof \Closure) { - throw new InvalidArgumentException(sprintf('Invalid type for deprecation message argument, expected string or \Closure, but got "%s".', get_debug_type($message))); - } - - // ignore if empty string - if ('' === $message) { - return $this; - } - - $this->deprecated[$option] = [ - 'package' => $package, - 'version' => $version, - 'message' => $message, - ]; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - public function isDeprecated(string $option): bool - { - return isset($this->deprecated[$option]); - } - - /** - * Sets the normalizer for an option. - * - * The normalizer should be a closure with the following signature: - * - * function (Options $options, $value) { - * // ... - * } - * - * The closure is invoked when {@link resolve()} is called. The closure - * has access to the resolved values of other options through the passed - * {@link Options} instance. - * - * The second parameter passed to the closure is the value of - * the option. - * - * The resolved option value is set to the return value of the closure. - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setNormalizer(string $option, \Closure $normalizer) - { - if ($this->locked) { - throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->normalizers[$option] = [$normalizer]; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds a normalizer for an option. - * - * The normalizer should be a closure with the following signature: - * - * function (Options $options, $value): mixed { - * // ... - * } - * - * The closure is invoked when {@link resolve()} is called. The closure - * has access to the resolved values of other options through the passed - * {@link Options} instance. - * - * The second parameter passed to the closure is the value of - * the option. - * - * The resolved option value is set to the return value of the closure. - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addNormalizer(string $option, \Closure $normalizer, bool $forcePrepend = false): self - { - if ($this->locked) { - throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - if ($forcePrepend) { - $this->normalizers[$option] = $this->normalizers[$option] ?? []; - array_unshift($this->normalizers[$option], $normalizer); - } else { - $this->normalizers[$option][] = $normalizer; - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Sets allowed values for an option. - * - * Instead of passing values, you may also pass a closures with the - * following signature: - * - * function ($value) { - * // return true or false - * } - * - * The closure receives the value as argument and should return true to - * accept the value and false to reject the value. - * - * @param string $option The option name - * @param mixed $allowedValues One or more acceptable values/closures - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setAllowedValues(string $option, $allowedValues) - { - if ($this->locked) { - throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->allowedValues[$option] = \is_array($allowedValues) ? $allowedValues : [$allowedValues]; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds allowed values for an option. - * - * The values are merged with the allowed values defined previously. - * - * Instead of passing values, you may also pass a closures with the - * following signature: - * - * function ($value) { - * // return true or false - * } - * - * The closure receives the value as argument and should return true to - * accept the value and false to reject the value. - * - * @param string $option The option name - * @param mixed $allowedValues One or more acceptable values/closures - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addAllowedValues(string $option, $allowedValues) - { - if ($this->locked) { - throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - if (!\is_array($allowedValues)) { - $allowedValues = [$allowedValues]; - } - - if (!isset($this->allowedValues[$option])) { - $this->allowedValues[$option] = $allowedValues; - } else { - $this->allowedValues[$option] = array_merge($this->allowedValues[$option], $allowedValues); - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Sets allowed types for an option. - * - * Any type for which a corresponding is_() function exists is - * acceptable. Additionally, fully-qualified class or interface names may - * be passed. - * - * @param string|string[] $allowedTypes One or more accepted types - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setAllowedTypes(string $option, $allowedTypes) - { - if ($this->locked) { - throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->allowedTypes[$option] = (array) $allowedTypes; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds allowed types for an option. - * - * The types are merged with the allowed types defined previously. - * - * Any type for which a corresponding is_() function exists is - * acceptable. Additionally, fully-qualified class or interface names may - * be passed. - * - * @param string|string[] $allowedTypes One or more accepted types - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addAllowedTypes(string $option, $allowedTypes) - { - if ($this->locked) { - throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - if (!isset($this->allowedTypes[$option])) { - $this->allowedTypes[$option] = (array) $allowedTypes; - } else { - $this->allowedTypes[$option] = array_merge($this->allowedTypes[$option], (array) $allowedTypes); - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Defines an option configurator with the given name. - */ - public function define(string $option): OptionConfigurator - { - if (isset($this->defined[$option])) { - throw new OptionDefinitionException(sprintf('The option "%s" is already defined.', $option)); - } - - return new OptionConfigurator($option, $this); - } - - /** - * Sets an info message for an option. - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setInfo(string $option, string $info): self - { - if ($this->locked) { - throw new AccessException('The Info message cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->info[$option] = $info; - - return $this; - } - - /** - * Gets the info message for an option. - */ - public function getInfo(string $option): ?string - { - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - return $this->info[$option] ?? null; - } - - /** - * Marks the whole options definition as array prototype. - * - * @return $this - * - * @throws AccessException If called from a lazy option, a normalizer or a root definition - */ - public function setPrototype(bool $prototype): self - { - if ($this->locked) { - throw new AccessException('The prototype property cannot be set from a lazy option or normalizer.'); - } - - if (null === $this->prototype && $prototype) { - throw new AccessException('The prototype property cannot be set from a root definition.'); - } - - $this->prototype = $prototype; - - return $this; - } - - public function isPrototype(): bool - { - return $this->prototype ?? false; - } - - /** - * Removes the option with the given name. - * - * Undefined options are ignored. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function remove($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be removed from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]); - unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option], $this->info[$option]); - } - - return $this; - } - - /** - * Removes all options. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function clear() - { - if ($this->locked) { - throw new AccessException('Options cannot be cleared from a lazy option or normalizer.'); - } - - $this->defined = []; - $this->defaults = []; - $this->nested = []; - $this->required = []; - $this->resolved = []; - $this->lazy = []; - $this->normalizers = []; - $this->allowedTypes = []; - $this->allowedValues = []; - $this->deprecated = []; - $this->info = []; - - return $this; - } - - /** - * Merges options with the default values stored in the container and - * validates them. - * - * Exceptions are thrown if: - * - * - Undefined options are passed; - * - Required options are missing; - * - Options have invalid types; - * - Options have invalid values. - * - * @return array - * - * @throws UndefinedOptionsException If an option name is undefined - * @throws InvalidOptionsException If an option doesn't fulfill the - * specified validation rules - * @throws MissingOptionsException If a required option is missing - * @throws OptionDefinitionException If there is a cyclic dependency between - * lazy options and/or normalizers - * @throws NoSuchOptionException If a lazy option reads an unavailable option - * @throws AccessException If called from a lazy option or normalizer - */ - public function resolve(array $options = []) - { - if ($this->locked) { - throw new AccessException('Options cannot be resolved from a lazy option or normalizer.'); - } - - // Allow this method to be called multiple times - $clone = clone $this; - - // Make sure that no unknown options are passed - $diff = array_diff_key($options, $clone->defined); - - if (\count($diff) > 0) { - ksort($clone->defined); - ksort($diff); - - throw new UndefinedOptionsException(sprintf((\count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".', $this->formatOptions(array_keys($diff)), implode('", "', array_keys($clone->defined)))); - } - - // Override options set by the user - foreach ($options as $option => $value) { - $clone->given[$option] = true; - $clone->defaults[$option] = $value; - unset($clone->resolved[$option], $clone->lazy[$option]); - } - - // Check whether any required option is missing - $diff = array_diff_key($clone->required, $clone->defaults); - - if (\count($diff) > 0) { - ksort($diff); - - throw new MissingOptionsException(sprintf(\count($diff) > 1 ? 'The required options "%s" are missing.' : 'The required option "%s" is missing.', $this->formatOptions(array_keys($diff)))); - } - - // Lock the container - $clone->locked = true; - - // Now process the individual options. Use offsetGet(), which resolves - // the option itself and any options that the option depends on - foreach ($clone->defaults as $option => $_) { - $clone->offsetGet($option); - } - - return $clone->resolved; - } - - /** - * Returns the resolved value of an option. - * - * @param bool $triggerDeprecation Whether to trigger the deprecation or not (true by default) - * - * @return mixed - * - * @throws AccessException If accessing this method outside of - * {@link resolve()} - * @throws NoSuchOptionException If the option is not set - * @throws InvalidOptionsException If the option doesn't fulfill the - * specified validation rules - * @throws OptionDefinitionException If there is a cyclic dependency between - * lazy options and/or normalizers - */ - #[\ReturnTypeWillChange] - public function offsetGet($option, bool $triggerDeprecation = true) - { - if (!$this->locked) { - throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); - } - - // Shortcut for resolved options - if (isset($this->resolved[$option]) || \array_key_exists($option, $this->resolved)) { - if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || $this->calling) && \is_string($this->deprecated[$option]['message'])) { - trigger_deprecation($this->deprecated[$option]['package'], $this->deprecated[$option]['version'], strtr($this->deprecated[$option]['message'], ['%name%' => $option])); - } - - return $this->resolved[$option]; - } - - // Check whether the option is set at all - if (!isset($this->defaults[$option]) && !\array_key_exists($option, $this->defaults)) { - if (!isset($this->defined[$option])) { - throw new NoSuchOptionException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - throw new NoSuchOptionException(sprintf('The optional option "%s" has no value set. You should make sure it is set with "isset" before reading it.', $this->formatOptions([$option]))); - } - - $value = $this->defaults[$option]; - - // Resolve the option if it is a nested definition - if (isset($this->nested[$option])) { - // If the closure is already being called, we have a cyclic dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - if (!\is_array($value)) { - throw new InvalidOptionsException(sprintf('The nested option "%s" with value %s is expected to be of type array, but is of type "%s".', $this->formatOptions([$option]), $this->formatValue($value), get_debug_type($value))); - } - - // The following section must be protected from cyclic calls. - $this->calling[$option] = true; - try { - $resolver = new self(); - $resolver->prototype = false; - $resolver->parentsOptions = $this->parentsOptions; - $resolver->parentsOptions[] = $option; - foreach ($this->nested[$option] as $closure) { - $closure($resolver, $this); - } - - if ($resolver->prototype) { - $values = []; - foreach ($value as $index => $prototypeValue) { - if (!\is_array($prototypeValue)) { - throw new InvalidOptionsException(sprintf('The value of the option "%s" is expected to be of type array of array, but is of type array of "%s".', $this->formatOptions([$option]), get_debug_type($prototypeValue))); - } - - $resolver->prototypeIndex = $index; - $values[$index] = $resolver->resolve($prototypeValue); - } - $value = $values; - } else { - $value = $resolver->resolve($value); - } - } finally { - $resolver->prototypeIndex = null; - unset($this->calling[$option]); - } - } - - // Resolve the option if the default value is lazily evaluated - if (isset($this->lazy[$option])) { - // If the closure is already being called, we have a cyclic - // dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - // The following section must be protected from cyclic - // calls. Set $calling for the current $option to detect a cyclic - // dependency - // BEGIN - $this->calling[$option] = true; - try { - foreach ($this->lazy[$option] as $closure) { - $value = $closure($this, $value); - } - } finally { - unset($this->calling[$option]); - } - // END - } - - // Validate the type of the resolved option - if (isset($this->allowedTypes[$option])) { - $valid = true; - $invalidTypes = []; - - foreach ($this->allowedTypes[$option] as $type) { - if ($valid = $this->verifyTypes($type, $value, $invalidTypes)) { - break; - } - } - - if (!$valid) { - $fmtActualValue = $this->formatValue($value); - $fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]); - $fmtProvidedTypes = implode('|', array_keys($invalidTypes)); - $allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) { - return str_ends_with($item, '[]'); - })) > 0; - - if (\is_array($value) && $allowedContainsArrayType) { - throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but one of the elements is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes)); - } - - throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes)); - } - } - - // Validate the value of the resolved option - if (isset($this->allowedValues[$option])) { - $success = false; - $printableAllowedValues = []; - - foreach ($this->allowedValues[$option] as $allowedValue) { - if ($allowedValue instanceof \Closure) { - if ($allowedValue($value)) { - $success = true; - break; - } - - // Don't include closures in the exception message - continue; - } - - if ($value === $allowedValue) { - $success = true; - break; - } - - $printableAllowedValues[] = $allowedValue; - } - - if (!$success) { - $message = sprintf( - 'The option "%s" with value %s is invalid.', - $option, - $this->formatValue($value) - ); - - if (\count($printableAllowedValues) > 0) { - $message .= sprintf( - ' Accepted values are: %s.', - $this->formatValues($printableAllowedValues) - ); - } - - if (isset($this->info[$option])) { - $message .= sprintf(' Info: %s.', $this->info[$option]); - } - - throw new InvalidOptionsException($message); - } - } - - // Check whether the option is deprecated - // and it is provided by the user or is being called from a lazy evaluation - if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || ($this->calling && \is_string($this->deprecated[$option]['message'])))) { - $deprecation = $this->deprecated[$option]; - $message = $this->deprecated[$option]['message']; - - if ($message instanceof \Closure) { - // If the closure is already being called, we have a cyclic dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - $this->calling[$option] = true; - try { - if (!\is_string($message = $message($this, $value))) { - throw new InvalidOptionsException(sprintf('Invalid type for deprecation message, expected string but got "%s", return an empty string to ignore.', get_debug_type($message))); - } - } finally { - unset($this->calling[$option]); - } - } - - if ('' !== $message) { - trigger_deprecation($deprecation['package'], $deprecation['version'], strtr($message, ['%name%' => $option])); - } - } - - // Normalize the validated option - if (isset($this->normalizers[$option])) { - // If the closure is already being called, we have a cyclic - // dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - // The following section must be protected from cyclic - // calls. Set $calling for the current $option to detect a cyclic - // dependency - // BEGIN - $this->calling[$option] = true; - try { - foreach ($this->normalizers[$option] as $normalizer) { - $value = $normalizer($this, $value); - } - } finally { - unset($this->calling[$option]); - } - // END - } - - // Mark as resolved - $this->resolved[$option] = $value; - - return $value; - } - - private function verifyTypes(string $type, $value, array &$invalidTypes, int $level = 0): bool - { - if (\is_array($value) && '[]' === substr($type, -2)) { - $type = substr($type, 0, -2); - $valid = true; - - foreach ($value as $val) { - if (!$this->verifyTypes($type, $val, $invalidTypes, $level + 1)) { - $valid = false; - } - } - - return $valid; - } - - if (('null' === $type && null === $value) || (isset(self::VALIDATION_FUNCTIONS[$type]) ? self::VALIDATION_FUNCTIONS[$type]($value) : $value instanceof $type)) { - return true; - } - - if (!$invalidTypes || $level > 0) { - $invalidTypes[get_debug_type($value)] = true; - } - - return false; - } - - /** - * Returns whether a resolved option with the given name exists. - * - * @param string $option The option name - * - * @return bool - * - * @throws AccessException If accessing this method outside of {@link resolve()} - * - * @see \ArrayAccess::offsetExists() - */ - #[\ReturnTypeWillChange] - public function offsetExists($option) - { - if (!$this->locked) { - throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); - } - - return \array_key_exists($option, $this->defaults); - } - - /** - * Not supported. - * - * @return void - * - * @throws AccessException - */ - #[\ReturnTypeWillChange] - public function offsetSet($option, $value) - { - throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.'); - } - - /** - * Not supported. - * - * @return void - * - * @throws AccessException - */ - #[\ReturnTypeWillChange] - public function offsetUnset($option) - { - throw new AccessException('Removing options via array access is not supported. Use remove() instead.'); - } - - /** - * Returns the number of set options. - * - * This may be only a subset of the defined options. - * - * @return int - * - * @throws AccessException If accessing this method outside of {@link resolve()} - * - * @see \Countable::count() - */ - #[\ReturnTypeWillChange] - public function count() - { - if (!$this->locked) { - throw new AccessException('Counting is only supported within closures of lazy options and normalizers.'); - } - - return \count($this->defaults); - } - - /** - * Returns a string representation of the value. - * - * This method returns the equivalent PHP tokens for most scalar types - * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped - * in double quotes ("). - * - * @param mixed $value The value to format as string - */ - private function formatValue($value): string - { - if (\is_object($value)) { - return \get_class($value); - } - - if (\is_array($value)) { - return 'array'; - } - - if (\is_string($value)) { - return '"'.$value.'"'; - } - - if (\is_resource($value)) { - return 'resource'; - } - - if (null === $value) { - return 'null'; - } - - if (false === $value) { - return 'false'; - } - - if (true === $value) { - return 'true'; - } - - return (string) $value; - } - - /** - * Returns a string representation of a list of values. - * - * Each of the values is converted to a string using - * {@link formatValue()}. The values are then concatenated with commas. - * - * @see formatValue() - */ - private function formatValues(array $values): string - { - foreach ($values as $key => $value) { - $values[$key] = $this->formatValue($value); - } - - return implode(', ', $values); - } - - private function formatOptions(array $options): string - { - if ($this->parentsOptions) { - $prefix = array_shift($this->parentsOptions); - if ($this->parentsOptions) { - $prefix .= sprintf('[%s]', implode('][', $this->parentsOptions)); - } - - if ($this->prototype && null !== $this->prototypeIndex) { - $prefix .= sprintf('[%s]', $this->prototypeIndex); - } - - $options = array_map(static function (string $option) use ($prefix): string { - return sprintf('%s[%s]', $prefix, $option); - }, $options); - } - - return implode('", "', $options); - } - - private function getParameterClassName(\ReflectionParameter $parameter): ?string - { - if (!($type = $parameter->getType()) instanceof \ReflectionNamedType || $type->isBuiltin()) { - return null; - } - - return $type->getName(); - } -} diff --git a/lib/symfony/options-resolver/README.md b/lib/symfony/options-resolver/README.md deleted file mode 100644 index c63b9005e..000000000 --- a/lib/symfony/options-resolver/README.md +++ /dev/null @@ -1,15 +0,0 @@ -OptionsResolver Component -========================= - -The OptionsResolver component is `array_replace` on steroids. It allows you to -create an options system with required options, defaults, validation (type, -value), normalization and more. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/options_resolver.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/options-resolver/composer.json b/lib/symfony/options-resolver/composer.json deleted file mode 100644 index a38d1bd04..000000000 --- a/lib/symfony/options-resolver/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "symfony/options-resolver", - "type": "library", - "description": "Provides an improved replacement for the array_replace PHP function", - "keywords": ["options", "config", "configuration"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/polyfill-ctype/Ctype.php b/lib/symfony/polyfill-ctype/Ctype.php deleted file mode 100644 index ba75a2c95..000000000 --- a/lib/symfony/polyfill-ctype/Ctype.php +++ /dev/null @@ -1,232 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Ctype; - -/** - * Ctype implementation through regex. - * - * @internal - * - * @author Gert de Pagter - */ -final class Ctype -{ - /** - * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. - * - * @see https://php.net/ctype-alnum - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_alnum($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); - } - - /** - * Returns TRUE if every character in text is a letter, FALSE otherwise. - * - * @see https://php.net/ctype-alpha - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_alpha($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); - } - - /** - * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. - * - * @see https://php.net/ctype-cntrl - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_cntrl($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); - } - - /** - * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. - * - * @see https://php.net/ctype-digit - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_digit($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); - } - - /** - * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. - * - * @see https://php.net/ctype-graph - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_graph($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); - } - - /** - * Returns TRUE if every character in text is a lowercase letter. - * - * @see https://php.net/ctype-lower - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_lower($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); - } - - /** - * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. - * - * @see https://php.net/ctype-print - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_print($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); - } - - /** - * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. - * - * @see https://php.net/ctype-punct - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_punct($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); - } - - /** - * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. - * - * @see https://php.net/ctype-space - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_space($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); - } - - /** - * Returns TRUE if every character in text is an uppercase letter. - * - * @see https://php.net/ctype-upper - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_upper($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); - } - - /** - * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. - * - * @see https://php.net/ctype-xdigit - * - * @param mixed $text - * - * @return bool - */ - public static function ctype_xdigit($text) - { - $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); - } - - /** - * Converts integers to their char versions according to normal ctype behaviour, if needed. - * - * If an integer between -128 and 255 inclusive is provided, - * it is interpreted as the ASCII value of a single character - * (negative values have 256 added in order to allow characters in the Extended ASCII range). - * Any other integer is interpreted as a string containing the decimal digits of the integer. - * - * @param mixed $int - * @param string $function - * - * @return mixed - */ - private static function convert_int_to_char_for_ctype($int, $function) - { - if (!\is_int($int)) { - return $int; - } - - if ($int < -128 || $int > 255) { - return (string) $int; - } - - if (\PHP_VERSION_ID >= 80100) { - @trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED); - } - - if ($int < 0) { - $int += 256; - } - - return \chr($int); - } -} diff --git a/lib/symfony/polyfill-ctype/LICENSE b/lib/symfony/polyfill-ctype/LICENSE deleted file mode 100644 index 3f853aaf3..000000000 --- a/lib/symfony/polyfill-ctype/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-ctype/README.md b/lib/symfony/polyfill-ctype/README.md deleted file mode 100644 index b144d03c3..000000000 --- a/lib/symfony/polyfill-ctype/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Symfony Polyfill / Ctype -======================== - -This component provides `ctype_*` functions to users who run php versions without the ctype extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-ctype/bootstrap.php b/lib/symfony/polyfill-ctype/bootstrap.php deleted file mode 100644 index d54524b31..000000000 --- a/lib/symfony/polyfill-ctype/bootstrap.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Ctype as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('ctype_alnum')) { - function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } -} -if (!function_exists('ctype_alpha')) { - function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } -} -if (!function_exists('ctype_cntrl')) { - function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } -} -if (!function_exists('ctype_digit')) { - function ctype_digit($text) { return p\Ctype::ctype_digit($text); } -} -if (!function_exists('ctype_graph')) { - function ctype_graph($text) { return p\Ctype::ctype_graph($text); } -} -if (!function_exists('ctype_lower')) { - function ctype_lower($text) { return p\Ctype::ctype_lower($text); } -} -if (!function_exists('ctype_print')) { - function ctype_print($text) { return p\Ctype::ctype_print($text); } -} -if (!function_exists('ctype_punct')) { - function ctype_punct($text) { return p\Ctype::ctype_punct($text); } -} -if (!function_exists('ctype_space')) { - function ctype_space($text) { return p\Ctype::ctype_space($text); } -} -if (!function_exists('ctype_upper')) { - function ctype_upper($text) { return p\Ctype::ctype_upper($text); } -} -if (!function_exists('ctype_xdigit')) { - function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } -} diff --git a/lib/symfony/polyfill-ctype/bootstrap80.php b/lib/symfony/polyfill-ctype/bootstrap80.php deleted file mode 100644 index ab2f8611d..000000000 --- a/lib/symfony/polyfill-ctype/bootstrap80.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Ctype as p; - -if (!function_exists('ctype_alnum')) { - function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } -} -if (!function_exists('ctype_alpha')) { - function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); } -} -if (!function_exists('ctype_cntrl')) { - function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); } -} -if (!function_exists('ctype_digit')) { - function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); } -} -if (!function_exists('ctype_graph')) { - function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); } -} -if (!function_exists('ctype_lower')) { - function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); } -} -if (!function_exists('ctype_print')) { - function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); } -} -if (!function_exists('ctype_punct')) { - function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); } -} -if (!function_exists('ctype_space')) { - function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); } -} -if (!function_exists('ctype_upper')) { - function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); } -} -if (!function_exists('ctype_xdigit')) { - function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); } -} diff --git a/lib/symfony/polyfill-ctype/composer.json b/lib/symfony/polyfill-ctype/composer.json deleted file mode 100644 index ee5c931cd..000000000 --- a/lib/symfony/polyfill-ctype/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "symfony/polyfill-ctype", - "type": "library", - "description": "Symfony polyfill for ctype functions", - "keywords": ["polyfill", "compatibility", "portable", "ctype"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-intl-grapheme/Grapheme.php b/lib/symfony/polyfill-intl-grapheme/Grapheme.php deleted file mode 100644 index 6f7c0c78d..000000000 --- a/lib/symfony/polyfill-intl-grapheme/Grapheme.php +++ /dev/null @@ -1,247 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Grapheme; - -\define('SYMFONY_GRAPHEME_CLUSTER_RX', ((float) \PCRE_VERSION < 10 ? (float) \PCRE_VERSION >= 8.32 : (float) \PCRE_VERSION >= 10.39) ? '\X' : Grapheme::GRAPHEME_CLUSTER_RX); - -/** - * Partial intl implementation in pure PHP. - * - * Implemented: - * - grapheme_extract - Extract a sequence of grapheme clusters from a text buffer, which must be encoded in UTF-8 - * - grapheme_stripos - Find position (in grapheme units) of first occurrence of a case-insensitive string - * - grapheme_stristr - Returns part of haystack string from the first occurrence of case-insensitive needle to the end of haystack - * - grapheme_strlen - Get string length in grapheme units - * - grapheme_strpos - Find position (in grapheme units) of first occurrence of a string - * - grapheme_strripos - Find position (in grapheme units) of last occurrence of a case-insensitive string - * - grapheme_strrpos - Find position (in grapheme units) of last occurrence of a string - * - grapheme_strstr - Returns part of haystack string from the first occurrence of needle to the end of haystack - * - grapheme_substr - Return part of a string - * - * @author Nicolas Grekas - * - * @internal - */ -final class Grapheme -{ - // (CRLF|([ZWNJ-ZWJ]|T+|L*(LV?V+|LV|LVT)T*|L+|[^Control])[Extend]*|[Control]) - // This regular expression is a work around for http://bugs.exim.org/1279 - public const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])'; - - private const CASE_FOLD = [ - ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], - ]; - - public static function grapheme_extract($s, $size, $type = \GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0) - { - if (0 > $start) { - $start = \strlen($s) + $start; - } - - if (!is_scalar($s)) { - $hasError = false; - set_error_handler(function () use (&$hasError) { $hasError = true; }); - $next = substr($s, $start); - restore_error_handler(); - if ($hasError) { - substr($s, $start); - $s = ''; - } else { - $s = $next; - } - } else { - $s = substr($s, $start); - } - $size = (int) $size; - $type = (int) $type; - $start = (int) $start; - - if (\GRAPHEME_EXTR_COUNT !== $type && \GRAPHEME_EXTR_MAXBYTES !== $type && \GRAPHEME_EXTR_MAXCHARS !== $type) { - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError('grapheme_extract(): Argument #3 ($type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS'); - } - - if (!isset($s[0]) || 0 > $size || 0 > $start) { - return false; - } - if (0 === $size) { - return ''; - } - - $next = $start; - - $s = preg_split('/('.SYMFONY_GRAPHEME_CLUSTER_RX.')/u', "\r\n".$s, $size + 1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); - - if (!isset($s[1])) { - return false; - } - - $i = 1; - $ret = ''; - - do { - if (\GRAPHEME_EXTR_COUNT === $type) { - --$size; - } elseif (\GRAPHEME_EXTR_MAXBYTES === $type) { - $size -= \strlen($s[$i]); - } else { - $size -= iconv_strlen($s[$i], 'UTF-8//IGNORE'); - } - - if ($size >= 0) { - $ret .= $s[$i]; - } - } while (isset($s[++$i]) && $size > 0); - - $next += \strlen($ret); - - return $ret; - } - - public static function grapheme_strlen($s) - { - preg_replace('/'.SYMFONY_GRAPHEME_CLUSTER_RX.'/u', '', $s, -1, $len); - - return 0 === $len && '' !== $s ? null : $len; - } - - public static function grapheme_substr($s, $start, $len = null) - { - if (null === $len) { - $len = 2147483647; - } - - preg_match_all('/'.SYMFONY_GRAPHEME_CLUSTER_RX.'/u', $s, $s); - - $slen = \count($s[0]); - $start = (int) $start; - - if (0 > $start) { - $start += $slen; - } - if (0 > $start) { - if (\PHP_VERSION_ID < 80000) { - return false; - } - - $start = 0; - } - if ($start >= $slen) { - return \PHP_VERSION_ID >= 80000 ? '' : false; - } - - $rem = $slen - $start; - - if (0 > $len) { - $len += $rem; - } - if (0 === $len) { - return ''; - } - if (0 > $len) { - return \PHP_VERSION_ID >= 80000 ? '' : false; - } - if ($len > $rem) { - $len = $rem; - } - - return implode('', \array_slice($s[0], $start, $len)); - } - - public static function grapheme_strpos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 0); - } - - public static function grapheme_stripos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 1); - } - - public static function grapheme_strrpos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 2); - } - - public static function grapheme_strripos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 3); - } - - public static function grapheme_stristr($s, $needle, $beforeNeedle = false) - { - return mb_stristr($s, $needle, $beforeNeedle, 'UTF-8'); - } - - public static function grapheme_strstr($s, $needle, $beforeNeedle = false) - { - return mb_strstr($s, $needle, $beforeNeedle, 'UTF-8'); - } - - private static function grapheme_position($s, $needle, $offset, $mode) - { - $needle = (string) $needle; - if (80000 > \PHP_VERSION_ID && !preg_match('/./us', $needle)) { - return false; - } - $s = (string) $s; - if (!preg_match('/./us', $s)) { - return false; - } - if ($offset > 0) { - $s = self::grapheme_substr($s, $offset); - } elseif ($offset < 0) { - if (2 > $mode) { - $offset += self::grapheme_strlen($s); - $s = self::grapheme_substr($s, $offset); - if (0 > $offset) { - $offset = 0; - } - } elseif (0 > $offset += self::grapheme_strlen($needle)) { - $s = self::grapheme_substr($s, 0, $offset); - $offset = 0; - } else { - $offset = 0; - } - } - - // As UTF-8 is self-synchronizing, and we have ensured the strings are valid UTF-8, - // we can use normal binary string functions here. For case-insensitive searches, - // case fold the strings first. - $caseInsensitive = $mode & 1; - $reverse = $mode & 2; - if ($caseInsensitive) { - // Use the same case folding mode as mbstring does for mb_stripos(). - // Stick to SIMPLE case folding to avoid changing the length of the string, which - // might result in offsets being shifted. - $mode = \defined('MB_CASE_FOLD_SIMPLE') ? \MB_CASE_FOLD_SIMPLE : \MB_CASE_LOWER; - $s = mb_convert_case($s, $mode, 'UTF-8'); - $needle = mb_convert_case($needle, $mode, 'UTF-8'); - - if (!\defined('MB_CASE_FOLD_SIMPLE')) { - $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); - $needle = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $needle); - } - } - if ($reverse) { - $needlePos = strrpos($s, $needle); - } else { - $needlePos = strpos($s, $needle); - } - - return false !== $needlePos ? self::grapheme_strlen(substr($s, 0, $needlePos)) + $offset : false; - } -} diff --git a/lib/symfony/polyfill-intl-grapheme/LICENSE b/lib/symfony/polyfill-intl-grapheme/LICENSE deleted file mode 100644 index 4cd8bdd30..000000000 --- a/lib/symfony/polyfill-intl-grapheme/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-intl-grapheme/README.md b/lib/symfony/polyfill-intl-grapheme/README.md deleted file mode 100644 index f55d92c5c..000000000 --- a/lib/symfony/polyfill-intl-grapheme/README.md +++ /dev/null @@ -1,31 +0,0 @@ -Symfony Polyfill / Intl: Grapheme -================================= - -This component provides a partial, native PHP implementation of the -[Grapheme functions](https://php.net/intl.grapheme) from the -[Intl](https://php.net/intl) extension. - -- [`grapheme_extract`](https://php.net/grapheme_extract): Extract a sequence of grapheme - clusters from a text buffer, which must be encoded in UTF-8 -- [`grapheme_stripos`](https://php.net/grapheme_stripos): Find position (in grapheme units) - of first occurrence of a case-insensitive string -- [`grapheme_stristr`](https://php.net/grapheme_stristr): Returns part of haystack string - from the first occurrence of case-insensitive needle to the end of haystack -- [`grapheme_strlen`](https://php.net/grapheme_strlen): Get string length in grapheme units -- [`grapheme_strpos`](https://php.net/grapheme_strpos): Find position (in grapheme units) - of first occurrence of a string -- [`grapheme_strripos`](https://php.net/grapheme_strripos): Find position (in grapheme units) - of last occurrence of a case-insensitive string -- [`grapheme_strrpos`](https://php.net/grapheme_strrpos): Find position (in grapheme units) - of last occurrence of a string -- [`grapheme_strstr`](https://php.net/grapheme_strstr): Returns part of haystack string from - the first occurrence of needle to the end of haystack -- [`grapheme_substr`](https://php.net/grapheme_substr): Return part of a string - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-intl-grapheme/bootstrap.php b/lib/symfony/polyfill-intl-grapheme/bootstrap.php deleted file mode 100644 index a9ea03c7e..000000000 --- a/lib/symfony/polyfill-intl-grapheme/bootstrap.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Grapheme as p; - -if (extension_loaded('intl')) { - return; -} - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!defined('GRAPHEME_EXTR_COUNT')) { - define('GRAPHEME_EXTR_COUNT', 0); -} -if (!defined('GRAPHEME_EXTR_MAXBYTES')) { - define('GRAPHEME_EXTR_MAXBYTES', 1); -} -if (!defined('GRAPHEME_EXTR_MAXCHARS')) { - define('GRAPHEME_EXTR_MAXCHARS', 2); -} - -if (!function_exists('grapheme_extract')) { - function grapheme_extract($haystack, $size, $type = 0, $start = 0, &$next = 0) { return p\Grapheme::grapheme_extract($haystack, $size, $type, $start, $next); } -} -if (!function_exists('grapheme_stripos')) { - function grapheme_stripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_stripos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_stristr')) { - function grapheme_stristr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_stristr($haystack, $needle, $beforeNeedle); } -} -if (!function_exists('grapheme_strlen')) { - function grapheme_strlen($input) { return p\Grapheme::grapheme_strlen($input); } -} -if (!function_exists('grapheme_strpos')) { - function grapheme_strpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strpos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_strripos')) { - function grapheme_strripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strripos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_strrpos')) { - function grapheme_strrpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strrpos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_strstr')) { - function grapheme_strstr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_strstr($haystack, $needle, $beforeNeedle); } -} -if (!function_exists('grapheme_substr')) { - function grapheme_substr($string, $offset, $length = null) { return p\Grapheme::grapheme_substr($string, $offset, $length); } -} diff --git a/lib/symfony/polyfill-intl-grapheme/bootstrap80.php b/lib/symfony/polyfill-intl-grapheme/bootstrap80.php deleted file mode 100644 index b8c078677..000000000 --- a/lib/symfony/polyfill-intl-grapheme/bootstrap80.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Grapheme as p; - -if (!defined('GRAPHEME_EXTR_COUNT')) { - define('GRAPHEME_EXTR_COUNT', 0); -} -if (!defined('GRAPHEME_EXTR_MAXBYTES')) { - define('GRAPHEME_EXTR_MAXBYTES', 1); -} -if (!defined('GRAPHEME_EXTR_MAXCHARS')) { - define('GRAPHEME_EXTR_MAXCHARS', 2); -} - -if (!function_exists('grapheme_extract')) { - function grapheme_extract(?string $haystack, ?int $size, ?int $type = GRAPHEME_EXTR_COUNT, ?int $offset = 0, &$next = null): string|false { return p\Grapheme::grapheme_extract((string) $haystack, (int) $size, (int) $type, (int) $offset, $next); } -} -if (!function_exists('grapheme_stripos')) { - function grapheme_stripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_stripos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_stristr')) { - function grapheme_stristr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_stristr((string) $haystack, (string) $needle, (bool) $beforeNeedle); } -} -if (!function_exists('grapheme_strlen')) { - function grapheme_strlen(?string $string): int|false|null { return p\Grapheme::grapheme_strlen((string) $string); } -} -if (!function_exists('grapheme_strpos')) { - function grapheme_strpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strpos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_strripos')) { - function grapheme_strripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strripos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_strrpos')) { - function grapheme_strrpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strrpos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_strstr')) { - function grapheme_strstr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_strstr((string) $haystack, (string) $needle, (bool) $beforeNeedle); } -} -if (!function_exists('grapheme_substr')) { - function grapheme_substr(?string $string, ?int $offset, ?int $length = null): string|false { return p\Grapheme::grapheme_substr((string) $string, (int) $offset, $length); } -} diff --git a/lib/symfony/polyfill-intl-grapheme/composer.json b/lib/symfony/polyfill-intl-grapheme/composer.json deleted file mode 100644 index 824c96f93..000000000 --- a/lib/symfony/polyfill-intl-grapheme/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/polyfill-intl-grapheme", - "type": "library", - "description": "Symfony polyfill for intl's grapheme_* functions", - "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "grapheme"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-intl": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-intl-icu/Collator.php b/lib/symfony/polyfill-intl-icu/Collator.php deleted file mode 100644 index 685522ba6..000000000 --- a/lib/symfony/polyfill-intl-icu/Collator.php +++ /dev/null @@ -1,262 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentValueNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; - -/** - * Replacement for PHP's native {@link \Collator} class. - * - * The only methods currently supported in this class are: - * - * - {@link \__construct} - * - {@link create} - * - {@link asort} - * - {@link getErrorCode} - * - {@link getErrorMessage} - * - {@link getLocale} - * - * @author Igor Wiedler - * @author Bernhard Schussek - * - * @internal - */ -abstract class Collator -{ - /* Attribute constants */ - public const FRENCH_COLLATION = 0; - public const ALTERNATE_HANDLING = 1; - public const CASE_FIRST = 2; - public const CASE_LEVEL = 3; - public const NORMALIZATION_MODE = 4; - public const STRENGTH = 5; - public const HIRAGANA_QUATERNARY_MODE = 6; - public const NUMERIC_COLLATION = 7; - - /* Attribute constants values */ - public const DEFAULT_VALUE = -1; - - public const PRIMARY = 0; - public const SECONDARY = 1; - public const TERTIARY = 2; - public const DEFAULT_STRENGTH = 2; - public const QUATERNARY = 3; - public const IDENTICAL = 15; - - public const OFF = 16; - public const ON = 17; - - public const SHIFTED = 20; - public const NON_IGNORABLE = 21; - - public const LOWER_FIRST = 24; - public const UPPER_FIRST = 25; - - /* Sorting options */ - public const SORT_REGULAR = 0; - public const SORT_NUMERIC = 2; - public const SORT_STRING = 1; - - /** - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - */ - public function __construct(?string $locale) - { - if ('en' !== $locale && null !== $locale) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); - } - } - - /** - * Static constructor. - * - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * - * @return static - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - */ - public static function create(?string $locale) - { - return new static($locale); - } - - /** - * Sort array maintaining index association. - * - * @param array &$array Input array - * @param int $flags Flags for sorting, can be one of the following: - * Collator::SORT_REGULAR - compare items normally (don't change types) - * Collator::SORT_NUMERIC - compare items numerically - * Collator::SORT_STRING - compare items as strings - * - * @return bool True on success or false on failure - */ - public function asort(array &$array, int $flags = self::SORT_REGULAR) - { - $intlToPlainFlagMap = [ - self::SORT_REGULAR => \SORT_REGULAR, - self::SORT_NUMERIC => \SORT_NUMERIC, - self::SORT_STRING => \SORT_STRING, - ]; - - $plainSortFlag = $intlToPlainFlagMap[$flags] ?? self::SORT_REGULAR; - - return asort($array, $plainSortFlag); - } - - /** - * Not supported. Compare two Unicode strings. - * - * @return bool|int - * - * @see https://php.net/collator.compare - * - * @throws MethodNotImplementedException - */ - public function compare(string $string1, string $string2) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Get a value of an integer collator attribute. - * - * @return bool|int The attribute value on success or false on error - * - * @see https://php.net/collator.getattribute - * - * @throws MethodNotImplementedException - */ - public function getAttribute(int $attribute) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns collator's last error code. Always returns the U_ZERO_ERROR class constant value. - * - * @return int The error code from last collator call - */ - public function getErrorCode() - { - return Icu::U_ZERO_ERROR; - } - - /** - * Returns collator's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. - * - * @return string The error message from last collator call - */ - public function getErrorMessage() - { - return 'U_ZERO_ERROR'; - } - - /** - * Returns the collator's locale. - * - * @return string The locale used to create the collator. Currently always - * returns "en". - */ - public function getLocale(int $type = Locale::ACTUAL_LOCALE) - { - return 'en'; - } - - /** - * Not supported. Get sorting key for a string. - * - * @return string The collation key for $string - * - * @see https://php.net/collator.getsortkey - * - * @throws MethodNotImplementedException - */ - public function getSortKey(string $string) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Get current collator's strength. - * - * @return bool|int The current collator's strength or false on failure - * - * @see https://php.net/collator.getstrength - * - * @throws MethodNotImplementedException - */ - public function getStrength() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set a collator's attribute. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.setattribute - * - * @throws MethodNotImplementedException - */ - public function setAttribute(int $attribute, int $value) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set the collator's strength. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.setstrength - * - * @throws MethodNotImplementedException - */ - public function setStrength(int $strength) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Sort array using specified collator and sort keys. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.sortwithsortkeys - * - * @throws MethodNotImplementedException - */ - public function sortWithSortKeys(array &$array) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Sort array using specified collator. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.sort - * - * @throws MethodNotImplementedException - */ - public function sort(array &$array, int $flags = self::SORT_REGULAR) - { - throw new MethodNotImplementedException(__METHOD__); - } -} diff --git a/lib/symfony/polyfill-intl-icu/Currencies.php b/lib/symfony/polyfill-intl-icu/Currencies.php deleted file mode 100644 index 90b1efa69..000000000 --- a/lib/symfony/polyfill-intl-icu/Currencies.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Currencies -{ - private static $data; - - public static function getSymbol(string $currency): ?string - { - $data = self::$data ?? self::$data = require __DIR__.'/Resources/currencies.php'; - - return $data[$currency][0] ?? $data[strtoupper($currency)][0] ?? null; - } - - public static function getFractionDigits(string $currency): int - { - $data = self::$data ?? self::$data = require __DIR__.'/Resources/currencies.php'; - - return $data[$currency][1] ?? $data[strtoupper($currency)][1] ?? $data['DEFAULT'][1]; - } - - public static function getRoundingIncrement(string $currency): int - { - $data = self::$data ?? self::$data = require __DIR__.'/Resources/currencies.php'; - - return $data[$currency][2] ?? $data[strtoupper($currency)][2] ?? $data['DEFAULT'][2]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php deleted file mode 100644 index 196c604be..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for AM/PM markers format. - * - * @author Igor Wiedler - * - * @internal - */ -class AmPmTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - return $dateTime->format('A'); - } - - public function getReverseMatchingRegExp(int $length): string - { - return 'AM|PM'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'marker' => $matched, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php deleted file mode 100644 index 6eedd2444..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for day of week format. - * - * @author Igor Wiedler - * - * @internal - */ -class DayOfWeekTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - $dayOfWeek = $dateTime->format('l'); - switch ($length) { - case 4: - return $dayOfWeek; - case 5: - return $dayOfWeek[0]; - case 6: - return substr($dayOfWeek, 0, 2); - default: - return substr($dayOfWeek, 0, 3); - } - } - - public function getReverseMatchingRegExp(int $length): string - { - switch ($length) { - case 4: - return 'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday'; - case 5: - return '[MTWFS]'; - case 6: - return 'Mo|Tu|We|Th|Fr|Sa|Su'; - default: - return 'Mon|Tue|Wed|Thu|Fri|Sat|Sun'; - } - } - - public function extractDateOptions(string $matched, int $length): array - { - return []; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php deleted file mode 100644 index ed78853e0..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for day of year format. - * - * @author Igor Wiedler - * - * @internal - */ -class DayOfYearTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - $dayOfYear = (int) $dateTime->format('z') + 1; - - return $this->padLeft($dayOfYear, $length); - } - - public function getReverseMatchingRegExp(int $length): string - { - return '\d{'.$length.'}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return []; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php deleted file mode 100644 index bdce79e6e..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for day format. - * - * @author Igor Wiedler - * - * @internal - */ -class DayTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - return $this->padLeft($dateTime->format('j'), $length); - } - - public function getReverseMatchingRegExp(int $length): string - { - return 1 === $length ? '\d{1,2}' : '\d{1,'.$length.'}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'day' => (int) $matched, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php deleted file mode 100644 index 02d071da5..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php +++ /dev/null @@ -1,312 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -use Symfony\Polyfill\Intl\Icu\Exception\NotImplementedException; -use Symfony\Polyfill\Intl\Icu\Icu; - -/** - * Parser and formatter for date formats. - * - * @author Igor Wiedler - * - * @internal - */ -class FullTransformer -{ - private $quoteMatch = "'(?:[^']+|'')*'"; - private $implementedChars = 'MLydQqhDEaHkKmsz'; - private $notImplementedChars = 'GYuwWFgecSAZvVW'; - private $regExp; - - /** - * @var Transformer[] - */ - private $transformers; - - private $pattern; - private $timezone; - - /** - * @param string $pattern The pattern to be used to format and/or parse values - * @param string $timezone The timezone to perform the date/time calculations - */ - public function __construct(string $pattern, string $timezone) - { - $this->pattern = $pattern; - $this->timezone = $timezone; - - $implementedCharsMatch = $this->buildCharsMatch($this->implementedChars); - $notImplementedCharsMatch = $this->buildCharsMatch($this->notImplementedChars); - $this->regExp = "/($this->quoteMatch|$implementedCharsMatch|$notImplementedCharsMatch)/"; - - $this->transformers = [ - 'M' => new MonthTransformer(), - 'L' => new MonthTransformer(), - 'y' => new YearTransformer(), - 'd' => new DayTransformer(), - 'q' => new QuarterTransformer(), - 'Q' => new QuarterTransformer(), - 'h' => new Hour1201Transformer(), - 'D' => new DayOfYearTransformer(), - 'E' => new DayOfWeekTransformer(), - 'a' => new AmPmTransformer(), - 'H' => new Hour2400Transformer(), - 'K' => new Hour1200Transformer(), - 'k' => new Hour2401Transformer(), - 'm' => new MinuteTransformer(), - 's' => new SecondTransformer(), - 'z' => new TimezoneTransformer(), - ]; - } - - /** - * Format a DateTime using ICU dateformat pattern. - * - * @return string The formatted value - */ - public function format(\DateTime $dateTime): string - { - $formatted = preg_replace_callback($this->regExp, function ($matches) use ($dateTime) { - return $this->formatReplace($matches[0], $dateTime); - }, $this->pattern); - - return $formatted; - } - - /** - * Return the formatted ICU value for the matched date characters. - * - * @throws NotImplementedException When it encounters a not implemented date character - */ - private function formatReplace(string $dateChars, \DateTime $dateTime): string - { - $length = \strlen($dateChars); - - if ($this->isQuoteMatch($dateChars)) { - return $this->replaceQuoteMatch($dateChars); - } - - if (isset($this->transformers[$dateChars[0]])) { - $transformer = $this->transformers[$dateChars[0]]; - - return $transformer->format($dateTime, $length); - } - - // handle unimplemented characters - if (false !== strpos($this->notImplementedChars, $dateChars[0])) { - throw new NotImplementedException(sprintf('Unimplemented date character "%s" in format "%s".', $dateChars[0], $this->pattern)); - } - - return ''; - } - - /** - * Parse a pattern based string to a timestamp value. - * - * @param \DateTime $dateTime A configured DateTime object to use to perform the date calculation - * @param string $value String to convert to a time value - * - * @return int|false The corresponding Unix timestamp - * - * @throws \InvalidArgumentException When the value can not be matched with pattern - */ - public function parse(\DateTime $dateTime, string $value) - { - $reverseMatchingRegExp = $this->getReverseMatchingRegExp($this->pattern); - $reverseMatchingRegExp = '/^'.$reverseMatchingRegExp.'$/'; - - $options = []; - - if (preg_match($reverseMatchingRegExp, $value, $matches)) { - $matches = $this->normalizeArray($matches); - - foreach ($this->transformers as $char => $transformer) { - if (isset($matches[$char])) { - $length = \strlen($matches[$char]['pattern']); - $options = array_merge($options, $transformer->extractDateOptions($matches[$char]['value'], $length)); - } - } - - // reset error code and message - Icu::setError(Icu::U_ZERO_ERROR); - - return $this->calculateUnixTimestamp($dateTime, $options); - } - - // behave like the intl extension - Icu::setError(Icu::U_PARSE_ERROR, 'Date parsing failed'); - - return false; - } - - /** - * Retrieve a regular expression to match with a formatted value. - * - * @return string The reverse matching regular expression with named captures being formed by the - * transformer index in the $transformer array - */ - private function getReverseMatchingRegExp(string $pattern): string - { - $escapedPattern = preg_quote($pattern, '/'); - - // ICU 4.8 recognizes slash ("/") in a value to be parsed as a dash ("-") and vice-versa - // when parsing a date/time value - $escapedPattern = preg_replace('/\\\[\-|\/]/', '[\/\-]', $escapedPattern); - - $reverseMatchingRegExp = preg_replace_callback($this->regExp, function ($matches) { - $length = \strlen($matches[0]); - $transformerIndex = $matches[0][0]; - - $dateChars = $matches[0]; - if ($this->isQuoteMatch($dateChars)) { - return $this->replaceQuoteMatch($dateChars); - } - - if (isset($this->transformers[$transformerIndex])) { - $transformer = $this->transformers[$transformerIndex]; - $captureName = str_repeat($transformerIndex, $length); - - return "(?P<$captureName>".$transformer->getReverseMatchingRegExp($length).')'; - } - - return null; - }, $escapedPattern); - - return $reverseMatchingRegExp; - } - - /** - * Check if the first char of a string is a single quote. - */ - private function isQuoteMatch(string $quoteMatch): bool - { - return "'" === $quoteMatch[0]; - } - - /** - * Replaces single quotes at the start or end of a string with two single quotes. - */ - private function replaceQuoteMatch(string $quoteMatch): string - { - if (preg_match("/^'+$/", $quoteMatch)) { - return str_replace("''", "'", $quoteMatch); - } - - return str_replace("''", "'", substr($quoteMatch, 1, -1)); - } - - /** - * Builds a chars match regular expression. - */ - private function buildCharsMatch(string $specialChars): string - { - $specialCharsArray = str_split($specialChars); - - $specialCharsMatch = implode('|', array_map(function ($char) { - return $char.'+'; - }, $specialCharsArray)); - - return $specialCharsMatch; - } - - /** - * Normalize a preg_replace match array, removing the numeric keys and returning an associative array - * with the value and pattern values for the matched Transformer. - */ - private function normalizeArray(array $data): array - { - $ret = []; - - foreach ($data as $key => $value) { - if (!\is_string($key)) { - continue; - } - - $ret[$key[0]] = [ - 'value' => $value, - 'pattern' => $key, - ]; - } - - return $ret; - } - - /** - * Calculates the Unix timestamp based on the matched values by the reverse matching regular - * expression of parse(). - * - * @return bool|int The calculated timestamp or false if matched date is invalid - */ - private function calculateUnixTimestamp(\DateTime $dateTime, array $options) - { - $options = $this->getDefaultValueForOptions($options); - - $year = $options['year']; - $month = $options['month']; - $day = $options['day']; - $hour = $options['hour']; - $hourInstance = $options['hourInstance']; - $minute = $options['minute']; - $second = $options['second']; - $marker = $options['marker']; - $timezone = $options['timezone']; - - // If month is false, return immediately (intl behavior) - if (false === $month) { - Icu::setError(Icu::U_PARSE_ERROR, 'Date parsing failed'); - - return false; - } - - // Normalize hour - if ($hourInstance instanceof HourTransformer) { - $hour = $hourInstance->normalizeHour($hour, $marker); - } - - // Set the timezone if different from the default one - if (null !== $timezone && $timezone !== $this->timezone) { - $dateTime->setTimezone(new \DateTimeZone($timezone)); - } - - // Normalize yy year - preg_match_all($this->regExp, $this->pattern, $matches); - if (\in_array('yy', $matches[0])) { - $dateTime->setTimestamp(time()); - $year = $year > (int) $dateTime->format('y') + 20 ? 1900 + $year : 2000 + $year; - } - - $dateTime->setDate($year, $month, $day); - $dateTime->setTime($hour, $minute, $second); - - return $dateTime->getTimestamp(); - } - - /** - * Add sensible default values for missing items in the extracted date/time options array. The values - * are base in the beginning of the Unix era. - */ - private function getDefaultValueForOptions(array $options): array - { - return [ - 'year' => $options['year'] ?? 1970, - 'month' => $options['month'] ?? 1, - 'day' => $options['day'] ?? 1, - 'hour' => $options['hour'] ?? 0, - 'hourInstance' => $options['hourInstance'] ?? null, - 'minute' => $options['minute'] ?? 0, - 'second' => $options['second'] ?? 0, - 'marker' => $options['marker'] ?? null, - 'timezone' => $options['timezone'] ?? null, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php deleted file mode 100644 index 839632a94..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 12 hour format (0-11). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour1200Transformer extends HourTransformer -{ - public function format(\DateTime $dateTime, int $length): string - { - $hourOfDay = $dateTime->format('g'); - $hourOfDay = '12' === $hourOfDay ? '0' : $hourOfDay; - - return $this->padLeft($hourOfDay, $length); - } - - public function normalizeHour(int $hour, string $marker = null): int - { - if ('PM' === $marker) { - $hour += 12; - } - - return $hour; - } - - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php deleted file mode 100644 index 12c0694d5..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 12 hour format (1-12). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour1201Transformer extends HourTransformer -{ - public function format(\DateTime $dateTime, int $length): string - { - return $this->padLeft($dateTime->format('g'), $length); - } - - public function normalizeHour(int $hour, string $marker = null): int - { - if ('PM' !== $marker && 12 === $hour) { - $hour = 0; - } elseif ('PM' === $marker && 12 !== $hour) { - // If PM and hour is not 12 (1-12), sum 12 hour - $hour += 12; - } - - return $hour; - } - - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php deleted file mode 100644 index 32f585f8a..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 24 hour format (0-23). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour2400Transformer extends HourTransformer -{ - public function format(\DateTime $dateTime, int $length): string - { - return $this->padLeft($dateTime->format('G'), $length); - } - - public function normalizeHour(int $hour, string $marker = null): int - { - if ('AM' === $marker) { - $hour = 0; - } elseif ('PM' === $marker) { - $hour = 12; - } - - return $hour; - } - - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php deleted file mode 100644 index e7c8bb0a4..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 24 hour format (1-24). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour2401Transformer extends HourTransformer -{ - public function format(\DateTime $dateTime, int $length): string - { - $hourOfDay = $dateTime->format('G'); - $hourOfDay = '0' === $hourOfDay ? '24' : $hourOfDay; - - return $this->padLeft($hourOfDay, $length); - } - - public function normalizeHour(int $hour, string $marker = null): int - { - if ((null === $marker && 24 === $hour) || 'AM' === $marker) { - $hour = 0; - } elseif ('PM' === $marker) { - $hour = 12; - } - - return $hour; - } - - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php deleted file mode 100644 index b042ccf79..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Base class for hour transformers. - * - * @author Eriksen Costa - * - * @internal - */ -abstract class HourTransformer extends Transformer -{ - /** - * Returns a normalized hour value suitable for the hour transformer type. - * - * @param int $hour The hour value - * @param string $marker An optional AM/PM marker - * - * @return int The normalized hour value - */ - abstract public function normalizeHour(int $hour, string $marker = null): int; -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php deleted file mode 100644 index e8bddc6fd..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for minute format. - * - * @author Igor Wiedler - * - * @internal - */ -class MinuteTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - $minuteOfHour = (int) $dateTime->format('i'); - - return $this->padLeft($minuteOfHour, $length); - } - - public function getReverseMatchingRegExp(int $length): string - { - return 1 === $length ? '\d{1,2}' : '\d{'.$length.'}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'minute' => (int) $matched, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php deleted file mode 100644 index 6712ed282..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for month format. - * - * @author Igor Wiedler - * - * @internal - */ -class MonthTransformer extends Transformer -{ - protected static $months = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', - ]; - - /** - * Short months names (first 3 letters). - */ - protected static $shortMonths = []; - - /** - * Flipped $months array, $name => $index. - */ - protected static $flippedMonths = []; - - /** - * Flipped $shortMonths array, $name => $index. - */ - protected static $flippedShortMonths = []; - - public function __construct() - { - if (0 === \count(self::$shortMonths)) { - self::$shortMonths = array_map(function ($month) { - return substr($month, 0, 3); - }, self::$months); - - self::$flippedMonths = array_flip(self::$months); - self::$flippedShortMonths = array_flip(self::$shortMonths); - } - } - - public function format(\DateTime $dateTime, int $length): string - { - $matchLengthMap = [ - 1 => 'n', - 2 => 'm', - 3 => 'M', - 4 => 'F', - ]; - - if (isset($matchLengthMap[$length])) { - return $dateTime->format($matchLengthMap[$length]); - } - - if (5 === $length) { - return substr($dateTime->format('M'), 0, 1); - } - - return $this->padLeft($dateTime->format('m'), $length); - } - - public function getReverseMatchingRegExp(int $length): string - { - switch ($length) { - case 1: - $regExp = '\d{1,2}'; - break; - case 3: - $regExp = implode('|', self::$shortMonths); - break; - case 4: - $regExp = implode('|', self::$months); - break; - case 5: - $regExp = '[JFMASOND]'; - break; - default: - $regExp = '\d{1,'.$length.'}'; - break; - } - - return $regExp; - } - - public function extractDateOptions(string $matched, int $length): array - { - if (!is_numeric($matched)) { - if (3 === $length) { - $matched = self::$flippedShortMonths[$matched] + 1; - } elseif (4 === $length) { - $matched = self::$flippedMonths[$matched] + 1; - } elseif (5 === $length) { - // IntlDateFormatter::parse() always returns false for MMMMM or LLLLL - $matched = false; - } - } else { - $matched = (int) $matched; - } - - return [ - 'month' => $matched, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php deleted file mode 100644 index a549deeda..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for quarter format. - * - * @author Igor Wiedler - * - * @internal - */ -class QuarterTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - $month = (int) $dateTime->format('n'); - $quarter = (int) floor(($month - 1) / 3) + 1; - switch ($length) { - case 1: - case 2: - return $this->padLeft($quarter, $length); - case 3: - return 'Q'.$quarter; - case 4: - $map = [1 => '1st quarter', 2 => '2nd quarter', 3 => '3rd quarter', 4 => '4th quarter']; - - return $map[$quarter]; - default: - if (\defined('INTL_ICU_VERSION') && version_compare(\INTL_ICU_VERSION, '70.1', '<')) { - $map = [1 => '1st quarter', 2 => '2nd quarter', 3 => '3rd quarter', 4 => '4th quarter']; - - return $map[$quarter]; - } else { - return $quarter; - } - } - } - - public function getReverseMatchingRegExp(int $length): string - { - switch ($length) { - case 1: - case 2: - return '\d{'.$length.'}'; - case 3: - return 'Q\d'; - default: - return '(?:1st|2nd|3rd|4th) quarter'; - } - } - - public function extractDateOptions(string $matched, int $length): array - { - return []; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php deleted file mode 100644 index fcb1028f4..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for the second format. - * - * @author Igor Wiedler - * - * @internal - */ -class SecondTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - $secondOfMinute = (int) $dateTime->format('s'); - - return $this->padLeft($secondOfMinute, $length); - } - - public function getReverseMatchingRegExp(int $length): string - { - return 1 === $length ? '\d{1,2}' : '\d{'.$length.'}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'second' => (int) $matched, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php deleted file mode 100644 index bab7a96f8..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -use Symfony\Polyfill\Intl\Icu\Exception\NotImplementedException; - -/** - * Parser and formatter for time zone format. - * - * @author Igor Wiedler - * - * @internal - */ -class TimezoneTransformer extends Transformer -{ - /** - * @throws NotImplementedException When time zone is different than UTC or GMT (Etc/GMT) - */ - public function format(\DateTime $dateTime, int $length): string - { - $timeZone = substr($dateTime->getTimezone()->getName(), 0, 3); - - if (!\in_array($timeZone, ['Etc', 'UTC', 'GMT'])) { - throw new NotImplementedException('Time zone different than GMT or UTC is not supported as a formatting output.'); - } - - if ('Etc' === $timeZone) { - // i.e. Etc/GMT+1, Etc/UTC, Etc/Zulu - $timeZone = substr($dateTime->getTimezone()->getName(), 4); - } - - // From ICU >= 59.1 GMT and UTC are no longer unified - if (\in_array($timeZone, ['UTC', 'UCT', 'Universal', 'Zulu'])) { - // offset is not supported with UTC - return $length > 3 ? 'Coordinated Universal Time' : 'UTC'; - } - - $offset = (int) $dateTime->format('O'); - - // From ICU >= 4.8, the zero offset is no more used, example: GMT instead of GMT+00:00 - if (0 === $offset) { - return $length > 3 ? 'Greenwich Mean Time' : 'GMT'; - } - - if ($length > 3) { - return $dateTime->format('\G\M\TP'); - } - - return sprintf('GMT%s%d', $offset >= 0 ? '+' : '', $offset / 100); - } - - public function getReverseMatchingRegExp(int $length): string - { - return 'GMT[+-]\d{2}:?\d{2}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'timezone' => self::getEtcTimeZoneId($matched), - ]; - } - - /** - * Get an Etc/GMT timezone identifier for the specified timezone. - * - * The PHP documentation for timezones states to not use the 'Other' time zones because them exists - * "for backwards compatibility". However all Etc/GMT time zones are in the tz database 'etcetera' file, - * which indicates they are not deprecated (neither are old names). - * - * Only GMT, Etc/Universal, Etc/Zulu, Etc/Greenwich, Etc/GMT-0, Etc/GMT+0 and Etc/GMT0 are old names and - * are linked to Etc/GMT or Etc/UTC. - * - * @param string $formattedTimeZone A GMT timezone string (GMT-03:00, e.g.) - * - * @return string A timezone identifier - * - * @see https://php.net/timezones.others - * - * @throws NotImplementedException When the GMT time zone have minutes offset different than zero - * @throws \InvalidArgumentException When the value can not be matched with pattern - */ - public static function getEtcTimeZoneId(string $formattedTimeZone): string - { - if (preg_match('/GMT(?P[+-])(?P\d{2}):?(?P\d{2})/', $formattedTimeZone, $matches)) { - $hours = (int) $matches['hours']; - $minutes = (int) $matches['minutes']; - $signal = '-' === $matches['signal'] ? '+' : '-'; - - if (0 < $minutes) { - throw new NotImplementedException(sprintf('It is not possible to use a GMT time zone with minutes offset different than zero (0). GMT time zone tried: "%s".', $formattedTimeZone)); - } - - return 'Etc/GMT'.(0 !== $hours ? $signal.$hours : ''); - } - - throw new \InvalidArgumentException(sprintf('The GMT time zone "%s" does not match with the supported formats GMT[+-]HH:MM or GMT[+-]HHMM.', $formattedTimeZone)); - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/Transformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/Transformer.php deleted file mode 100644 index 7f8bf25b5..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/Transformer.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for date formats. - * - * @author Igor Wiedler - * - * @internal - */ -abstract class Transformer -{ - /** - * Format a value using a configured DateTime as date/time source. - * - * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value - * @param int $length The formatted value string length - * - * @return string The formatted value - */ - abstract public function format(\DateTime $dateTime, int $length): string; - - /** - * Returns a reverse matching regular expression of a string generated by format(). - * - * @param int $length The length of the value to be reverse matched - * - * @return string The reverse matching regular expression - */ - abstract public function getReverseMatchingRegExp(int $length): string; - - /** - * Extract date options from a matched value returned by the processing of the reverse matching - * regular expression. - * - * @param string $matched The matched value - * @param int $length The length of the Transformer pattern string - * - * @return array An associative array - */ - abstract public function extractDateOptions(string $matched, int $length): array; - - /** - * Pad a string with zeros to the left. - * - * @param string $value The string to be padded - * @param int $length The length to pad - * - * @return string The padded string - */ - protected function padLeft(string $value, int $length): string - { - return str_pad($value, $length, '0', \STR_PAD_LEFT); - } -} diff --git a/lib/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php b/lib/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php deleted file mode 100644 index a27ce8555..000000000 --- a/lib/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for year format. - * - * @author Igor Wiedler - * - * @internal - */ -class YearTransformer extends Transformer -{ - public function format(\DateTime $dateTime, int $length): string - { - if (2 === $length) { - return $dateTime->format('y'); - } - - return $this->padLeft($dateTime->format('Y'), $length); - } - - public function getReverseMatchingRegExp(int $length): string - { - return 2 === $length ? '\d{2}' : '\d{1,4}'; - } - - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'year' => (int) $matched, - ]; - } -} diff --git a/lib/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php b/lib/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php deleted file mode 100644 index a453b5e2f..000000000 --- a/lib/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * Base ExceptionInterface for the Intl component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php b/lib/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php deleted file mode 100644 index db120a340..000000000 --- a/lib/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * @author Eriksen Costa - */ -class MethodArgumentNotImplementedException extends NotImplementedException -{ - /** - * @param string $methodName The method name that raised the exception - * @param string $argName The argument name that is not implemented - */ - public function __construct(string $methodName, string $argName) - { - $message = sprintf('The %s() method\'s argument $%s behavior is not implemented.', $methodName, $argName); - parent::__construct($message); - } -} diff --git a/lib/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php b/lib/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php deleted file mode 100644 index bd9204234..000000000 --- a/lib/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * @author Eriksen Costa - */ -class MethodArgumentValueNotImplementedException extends NotImplementedException -{ - /** - * @param string $methodName The method name that raised the exception - * @param string $argName The argument name - * @param mixed $argValue The argument value that is not implemented - * @param string $additionalMessage An optional additional message to append to the exception message - */ - public function __construct(string $methodName, string $argName, $argValue, string $additionalMessage = '') - { - $message = sprintf( - 'The %s() method\'s argument $%s value %s behavior is not implemented.%s', - $methodName, - $argName, - var_export($argValue, true), - '' !== $additionalMessage ? ' '.$additionalMessage.'. ' : '' - ); - - parent::__construct($message); - } -} diff --git a/lib/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php b/lib/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php deleted file mode 100644 index 9e1a43985..000000000 --- a/lib/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * @author Eriksen Costa - */ -class MethodNotImplementedException extends NotImplementedException -{ - /** - * @param string $methodName The name of the method - */ - public function __construct(string $methodName) - { - parent::__construct(sprintf('The %s() is not implemented.', $methodName)); - } -} diff --git a/lib/symfony/polyfill-intl-icu/Exception/NotImplementedException.php b/lib/symfony/polyfill-intl-icu/Exception/NotImplementedException.php deleted file mode 100644 index 929b9334d..000000000 --- a/lib/symfony/polyfill-intl-icu/Exception/NotImplementedException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * Base exception class for not implemented behaviors of the intl extension in the Locale component. - * - * @author Eriksen Costa - */ -class NotImplementedException extends RuntimeException -{ - public const INTL_INSTALL_MESSAGE = 'Please install the "intl" extension for full localization capabilities.'; - - /** - * @param string $message The exception message. A note to install the intl extension is appended to this string - */ - public function __construct(string $message) - { - parent::__construct($message.' '.self::INTL_INSTALL_MESSAGE); - } -} diff --git a/lib/symfony/polyfill-intl-icu/Exception/RuntimeException.php b/lib/symfony/polyfill-intl-icu/Exception/RuntimeException.php deleted file mode 100644 index ceedffe8e..000000000 --- a/lib/symfony/polyfill-intl-icu/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * RuntimeException for the Intl component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/polyfill-intl-icu/Icu.php b/lib/symfony/polyfill-intl-icu/Icu.php deleted file mode 100644 index b9590f43d..000000000 --- a/lib/symfony/polyfill-intl-icu/Icu.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -/** - * Provides fake static versions of the global functions in the intl extension. - * - * @author Bernhard Schussek - * - * @internal - */ -abstract class Icu -{ - /** - * Indicates that no error occurred. - */ - public const U_ZERO_ERROR = 0; - - /** - * Indicates that an invalid argument was passed. - */ - public const U_ILLEGAL_ARGUMENT_ERROR = 1; - - /** - * Indicates that the parse() operation failed. - */ - public const U_PARSE_ERROR = 9; - - /** - * All known error codes. - */ - private static $errorCodes = [ - self::U_ZERO_ERROR => 'U_ZERO_ERROR', - self::U_ILLEGAL_ARGUMENT_ERROR => 'U_ILLEGAL_ARGUMENT_ERROR', - self::U_PARSE_ERROR => 'U_PARSE_ERROR', - ]; - - /** - * The error code of the last operation. - */ - private static $errorCode = self::U_ZERO_ERROR; - - /** - * The error code of the last operation. - */ - private static $errorMessage = 'U_ZERO_ERROR'; - - /** - * Returns whether the error code indicates a failure. - * - * @param int $errorCode The error code returned by Icu::getErrorCode() - */ - public static function isFailure(int $errorCode): bool - { - return isset(self::$errorCodes[$errorCode]) - && $errorCode > self::U_ZERO_ERROR; - } - - /** - * Returns the error code of the last operation. - * - * Returns Icu::U_ZERO_ERROR if no error occurred. - * - * @return int - */ - public static function getErrorCode() - { - return self::$errorCode; - } - - /** - * Returns the error message of the last operation. - * - * Returns "U_ZERO_ERROR" if no error occurred. - */ - public static function getErrorMessage(): string - { - return self::$errorMessage; - } - - /** - * Returns the symbolic name for a given error code. - * - * @param int $code The error code returned by Icu::getErrorCode() - */ - public static function getErrorName(int $code): string - { - return self::$errorCodes[$code] ?? '[BOGUS UErrorCode]'; - } - - /** - * Sets the current error. - * - * @param int $code One of the error constants in this class - * @param string $message The ICU class error message - * - * @throws \InvalidArgumentException If the code is not one of the error constants in this class - */ - public static function setError(int $code, string $message = '') - { - if (!isset(self::$errorCodes[$code])) { - throw new \InvalidArgumentException(sprintf('No such error code: "%s".', $code)); - } - - self::$errorMessage = $message ? sprintf('%s: %s', $message, self::$errorCodes[$code]) : self::$errorCodes[$code]; - self::$errorCode = $code; - } -} diff --git a/lib/symfony/polyfill-intl-icu/IntlDateFormatter.php b/lib/symfony/polyfill-intl-icu/IntlDateFormatter.php deleted file mode 100644 index 402a07c0e..000000000 --- a/lib/symfony/polyfill-intl-icu/IntlDateFormatter.php +++ /dev/null @@ -1,645 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\DateFormat\FullTransformer; -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentValueNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; - -/** - * Replacement for PHP's native {@link \IntlDateFormatter} class. - * - * The only methods currently supported in this class are: - * - * - {@link __construct} - * - {@link create} - * - {@link format} - * - {@link getCalendar} - * - {@link getDateType} - * - {@link getErrorCode} - * - {@link getErrorMessage} - * - {@link getLocale} - * - {@link getPattern} - * - {@link getTimeType} - * - {@link getTimeZoneId} - * - {@link isLenient} - * - {@link parse} - * - {@link setLenient} - * - {@link setPattern} - * - {@link setTimeZoneId} - * - {@link setTimeZone} - * - * @author Igor Wiedler - * @author Bernhard Schussek - * - * @internal - */ -abstract class IntlDateFormatter -{ - /** - * The error code from the last operation. - * - * @var int - */ - protected $errorCode = Icu::U_ZERO_ERROR; - - /** - * The error message from the last operation. - * - * @var string - */ - protected $errorMessage = 'U_ZERO_ERROR'; - - /* date/time format types */ - public const NONE = -1; - public const FULL = 0; - public const LONG = 1; - public const MEDIUM = 2; - public const SHORT = 3; - - /* date format types */ - public const RELATIVE_FULL = 128; - public const RELATIVE_LONG = 129; - public const RELATIVE_MEDIUM = 130; - public const RELATIVE_SHORT = 131; - - /* calendar formats */ - public const TRADITIONAL = 0; - public const GREGORIAN = 1; - - /** - * Patterns used to format the date when no pattern is provided. - */ - private $defaultDateFormats = [ - self::NONE => '', - self::FULL => 'EEEE, MMMM d, y', - self::LONG => 'MMMM d, y', - self::MEDIUM => 'MMM d, y', - self::SHORT => 'M/d/yy', - self::RELATIVE_FULL => 'EEEE, MMMM d, y', - self::RELATIVE_LONG => 'MMMM d, y', - self::RELATIVE_MEDIUM => 'MMM d, y', - self::RELATIVE_SHORT => 'M/d/yy', - ]; - - /** - * Patterns used to format the time when no pattern is provided. - */ - private $defaultTimeFormats = [ - self::FULL => 'h:mm:ss a zzzz', - self::LONG => 'h:mm:ss a z', - self::MEDIUM => 'h:mm:ss a', - self::SHORT => 'h:mm a', - ]; - - private $dateType; - private $timeType; - - /** - * @var string - */ - private $pattern; - - /** - * @var \DateTimeZone - */ - private $dateTimeZone; - - /** - * @var bool - */ - private $uninitializedTimeZoneId = false; - - /** - * @var string - */ - private $timezoneId; - - /** - * @var bool - */ - private $isRelativeDateType = false; - - /** - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier - * @param \IntlCalendar|int|null $calendar Calendar to use for formatting or parsing. The only currently - * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN") - * - * @see https://php.net/intldateformatter.create - * @see http://userguide.icu-project.org/formatparse/datetime - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When $calendar different than GREGORIAN is passed - */ - public function __construct(?string $locale, ?int $dateType, ?int $timeType, $timezone = null, $calendar = null, ?string $pattern = '') - { - if ('en' !== $locale && null !== $locale) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); - } - - if (self::GREGORIAN !== $calendar && null !== $calendar) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'calendar', $calendar, 'Only the GREGORIAN calendar is supported'); - } - - if (\PHP_VERSION_ID >= 80100) { - if (null === $dateType) { - @trigger_error('Passing null to parameter #2 ($dateType) of type int is deprecated', \E_USER_DEPRECATED); - } - - if (null === $timeType) { - @trigger_error('Passing null to parameter #3 ($timeType) of type int is deprecated', \E_USER_DEPRECATED); - } - } - - $this->dateType = $dateType ?? self::FULL; - $this->timeType = $timeType ?? self::FULL; - - if ('' === ($pattern ?? '')) { - $pattern = $this->getDefaultPattern(); - } - - $this->setPattern($pattern); - $this->setTimeZone($timezone); - - if (\in_array($this->dateType, [self::RELATIVE_FULL, self::RELATIVE_LONG, self::RELATIVE_MEDIUM, self::RELATIVE_SHORT], true)) { - $this->isRelativeDateType = true; - } - } - - /** - * Static constructor. - * - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier - * @param \IntlCalendar|int|null $calendar Calendar to use for formatting or parsing; default is Gregorian - * One of the calendar constants - * - * @return static - * - * @see https://php.net/intldateformatter.create - * @see http://userguide.icu-project.org/formatparse/datetime - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When $calendar different than GREGORIAN is passed - */ - public static function create(?string $locale, ?int $dateType, ?int $timeType, $timezone = null, int $calendar = null, ?string $pattern = '') - { - return new static($locale, $dateType, $timeType, $timezone, $calendar, $pattern); - } - - /** - * Format the date/time value (timestamp) as a string. - * - * @param int|string|\DateTimeInterface $datetime The timestamp to format - * - * @return string|bool The formatted value or false if formatting failed - * - * @see https://php.net/intldateformatter.format - * - * @throws MethodArgumentValueNotImplementedException If one of the formatting characters is not implemented - */ - public function format($datetime) - { - // intl allows timestamps to be passed as arrays - we don't - if (\is_array($datetime)) { - $message = 'Only Unix timestamps and DateTime objects are supported'; - - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'datetime', $datetime, $message); - } - - if (\is_string($datetime) && $dt = \DateTime::createFromFormat('U', $datetime)) { - $datetime = $dt; - } - - // behave like the intl extension - $argumentError = null; - if (!\is_int($datetime) && !$datetime instanceof \DateTimeInterface) { - $argumentError = sprintf('datefmt_format: string \'%s\' is not numeric, which would be required for it to be a valid date', $datetime); - } - - if (null !== $argumentError) { - Icu::setError(Icu::U_ILLEGAL_ARGUMENT_ERROR, $argumentError); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return false; - } - - if ($datetime instanceof \DateTimeInterface) { - $datetime = $datetime->format('U'); - } - - $pattern = $this->getPattern(); - $formatted = ''; - - if ($this->isRelativeDateType && $formatted = $this->getRelativeDateFormat($datetime)) { - if (self::NONE === $this->timeType) { - $pattern = ''; - } else { - $pattern = $this->defaultTimeFormats[$this->timeType]; - if (\in_array($this->dateType, [self::RELATIVE_MEDIUM, self::RELATIVE_SHORT], true)) { - $formatted .= ', '; - } else { - $formatted .= ' at '; - } - } - } - - $transformer = new FullTransformer($pattern, $this->getTimeZoneId()); - $formatted .= $transformer->format($this->createDateTime($datetime)); - - // behave like the intl extension - Icu::setError(Icu::U_ZERO_ERROR); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return $formatted; - } - - /** - * Not supported. Formats an object. - * - * @return string The formatted value - * - * @see https://php.net/intldateformatter.formatobject - * - * @throws MethodNotImplementedException - */ - public static function formatObject($datetime, $format = null, string $locale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns the formatter's calendar. - * - * @return int The calendar being used by the formatter. Currently always returns - * IntlDateFormatter::GREGORIAN. - * - * @see https://php.net/intldateformatter.getcalendar - */ - public function getCalendar() - { - return self::GREGORIAN; - } - - /** - * Not supported. Returns the formatter's calendar object. - * - * @return object The calendar's object being used by the formatter - * - * @see https://php.net/intldateformatter.getcalendarobject - * - * @throws MethodNotImplementedException - */ - public function getCalendarObject() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns the formatter's datetype. - * - * @return int The current value of the formatter - * - * @see https://php.net/intldateformatter.getdatetype - */ - public function getDateType() - { - return $this->dateType; - } - - /** - * Returns formatter's last error code. Always returns the U_ZERO_ERROR class constant value. - * - * @return int The error code from last formatter call - * - * @see https://php.net/intldateformatter.geterrorcode - */ - public function getErrorCode() - { - return $this->errorCode; - } - - /** - * Returns formatter's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. - * - * @return string The error message from last formatter call - * - * @see https://php.net/intldateformatter.geterrormessage - */ - public function getErrorMessage() - { - return $this->errorMessage; - } - - /** - * Returns the formatter's locale. - * - * @param int $type Not supported. The locale name type to return (Locale::VALID_LOCALE or Locale::ACTUAL_LOCALE) - * - * @return string The locale used to create the formatter. Currently always - * returns "en". - * - * @see https://php.net/intldateformatter.getlocale - */ - public function getLocale(int $type = Locale::ACTUAL_LOCALE) - { - return 'en'; - } - - /** - * Returns the formatter's pattern. - * - * @return string The pattern string used by the formatter - * - * @see https://php.net/intldateformatter.getpattern - */ - public function getPattern() - { - return $this->pattern; - } - - /** - * Returns the formatter's time type. - * - * @return int The time type used by the formatter - * - * @see https://php.net/intldateformatter.gettimetype - */ - public function getTimeType() - { - return $this->timeType; - } - - /** - * Returns the formatter's timezone identifier. - * - * @return string The timezone identifier used by the formatter - * - * @see https://php.net/intldateformatter.gettimezoneid - */ - public function getTimeZoneId() - { - if (!$this->uninitializedTimeZoneId) { - return $this->timezoneId; - } - - return date_default_timezone_get(); - } - - /** - * Not supported. Returns the formatter's timezone. - * - * @return mixed The timezone used by the formatter - * - * @see https://php.net/intldateformatter.gettimezone - * - * @throws MethodNotImplementedException - */ - public function getTimeZone() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns whether the formatter is lenient. - * - * @return bool Currently always returns false - * - * @see https://php.net/intldateformatter.islenient - * - * @throws MethodNotImplementedException - */ - public function isLenient() - { - return false; - } - - /** - * Not supported. Parse string to a field-based time value. - * - * @return string Localtime compatible array of integers: contains 24 hour clock value in tm_hour field - * - * @see https://php.net/intldateformatter.localtime - * - * @throws MethodNotImplementedException - */ - public function localtime(string $string, &$offset = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Parse string to a timestamp value. - * - * @return int|false Parsed value as a timestamp - * - * @see https://php.net/intldateformatter.parse - * - * @throws MethodArgumentNotImplementedException When $offset different than null, behavior not implemented - */ - public function parse(string $string, &$offset = null) - { - // We don't calculate the position when parsing the value - if (null !== $offset) { - throw new MethodArgumentNotImplementedException(__METHOD__, 'offset'); - } - - $dateTime = $this->createDateTime(0); - $transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId()); - - $timestamp = $transformer->parse($dateTime, $string); - - // behave like the intl extension. FullTransformer::parse() set the proper error - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return $timestamp; - } - - /** - * Not supported. Set the formatter's calendar. - * - * @param \IntlCalendar|int|null $calendar - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.setcalendar - * - * @throws MethodNotImplementedException - */ - public function setCalendar($calendar) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Set the leniency of the parser. - * - * Define if the parser is strict or lenient in interpreting inputs that do not match the pattern - * exactly. Enabling lenient parsing allows the parser to accept otherwise flawed date or time - * patterns, parsing as much as possible to obtain a value. Extra space, unrecognized tokens, or - * invalid values ("February 30th") are not accepted. - * - * @param bool $lenient Sets whether the parser is lenient or not. Currently - * only false (strict) is supported. - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.setlenient - * - * @throws MethodArgumentValueNotImplementedException When $lenient is true - */ - public function setLenient(bool $lenient) - { - if ($lenient) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'lenient', $lenient, 'Only the strict parser is supported'); - } - - return true; - } - - /** - * Set the formatter's pattern. - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.setpattern - * @see http://userguide.icu-project.org/formatparse/datetime - */ - public function setPattern(string $pattern) - { - $this->pattern = $pattern; - - return true; - } - - /** - * Sets formatterʼs timezone. - * - * @param \IntlTimeZone|\DateTimeZone|string|null $timezone - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.settimezone - */ - public function setTimeZone($timezone) - { - if ($timezone instanceof \IntlTimeZone) { - $timezone = $timezone->getID(); - } - - if ($timezone instanceof \DateTimeZone) { - $timezone = $timezone->getName(); - - // DateTimeZone returns the GMT offset timezones without the leading GMT, while our parsing requires it. - if (!empty($timezone) && ('+' === $timezone[0] || '-' === $timezone[0])) { - $timezone = 'GMT'.$timezone; - } - } - - if (null === $timezone) { - $timezone = date_default_timezone_get(); - - $this->uninitializedTimeZoneId = true; - } - - // Backup original passed time zone - $timezoneId = $timezone; - - // Get an Etc/GMT time zone that is accepted for \DateTimeZone - if ('GMT' !== $timezone && 0 === strpos($timezone, 'GMT')) { - try { - $timezone = DateFormat\TimezoneTransformer::getEtcTimeZoneId($timezone); - } catch (\InvalidArgumentException $e) { - // Does nothing, will fallback to UTC - } - } - - try { - $this->dateTimeZone = new \DateTimeZone($timezone); - if ('GMT' !== $timezone && $this->dateTimeZone->getName() !== $timezone) { - $timezoneId = $this->getTimeZoneId(); - } - } catch (\Exception $e) { - $timezoneId = $timezone = $this->getTimeZoneId(); - $this->dateTimeZone = new \DateTimeZone($timezone); - } - - $this->timezoneId = $timezoneId; - - return true; - } - - /** - * Create and returns a DateTime object with the specified timestamp and with the - * current time zone. - * - * @return \DateTime - */ - protected function createDateTime($timestamp) - { - $dateTime = \DateTime::createFromFormat('U', $timestamp); - $dateTime->setTimezone($this->dateTimeZone); - - return $dateTime; - } - - /** - * Returns a pattern string based in the datetype and timetype values. - * - * @return string - */ - protected function getDefaultPattern() - { - $pattern = ''; - if (self::NONE !== $this->dateType) { - $pattern = $this->defaultDateFormats[$this->dateType]; - } - if (self::NONE !== $this->timeType) { - if (\in_array($this->dateType, [self::FULL, self::LONG, self::RELATIVE_FULL, self::RELATIVE_LONG], true)) { - $pattern .= ' \'at\' '; - } elseif (self::NONE !== $this->dateType) { - $pattern .= ', '; - } - $pattern .= $this->defaultTimeFormats[$this->timeType]; - } - - return $pattern; - } - - private function getRelativeDateFormat(int $timestamp): string - { - $today = $this->createDateTime(time()); - $today->setTime(0, 0, 0); - - $datetime = $this->createDateTime($timestamp); - $datetime->setTime(0, 0, 0); - - $interval = $today->diff($datetime); - - if (false !== $interval) { - if (0 === $interval->days) { - return 'today'; - } - - if (1 === $interval->days) { - return 1 === $interval->invert ? 'yesterday' : 'tomorrow'; - } - } - - return ''; - } -} diff --git a/lib/symfony/polyfill-intl-icu/LICENSE b/lib/symfony/polyfill-intl-icu/LICENSE deleted file mode 100644 index 9e936ec04..000000000 --- a/lib/symfony/polyfill-intl-icu/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-intl-icu/Locale.php b/lib/symfony/polyfill-intl-icu/Locale.php deleted file mode 100644 index 91a157d93..000000000 --- a/lib/symfony/polyfill-intl-icu/Locale.php +++ /dev/null @@ -1,310 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; - -/** - * Replacement for PHP's native {@link \Locale} class. - * - * The only methods supported in this class are `getDefault` and `canonicalize`. - * All other methods will throw an exception when used. - * - * @author Eriksen Costa - * @author Bernhard Schussek - * - * @internal - */ -abstract class Locale -{ - public const DEFAULT_LOCALE = null; - - /* Locale method constants */ - public const ACTUAL_LOCALE = 0; - public const VALID_LOCALE = 1; - - /* Language tags constants */ - public const LANG_TAG = 'language'; - public const EXTLANG_TAG = 'extlang'; - public const SCRIPT_TAG = 'script'; - public const REGION_TAG = 'region'; - public const VARIANT_TAG = 'variant'; - public const GRANDFATHERED_LANG_TAG = 'grandfathered'; - public const PRIVATE_TAG = 'private'; - - /** - * Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616. - * - * @return string The corresponding locale code - * - * @see https://php.net/locale.acceptfromhttp - * - * @throws MethodNotImplementedException - */ - public static function acceptFromHttp(string $header) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns a canonicalized locale string. - * - * This polyfill doesn't implement the full-spec algorithm. It only - * canonicalizes locale strings handled by the `LocaleBundle` class. - * - * @return string - */ - public static function canonicalize(string $locale) - { - if ('' === $locale || '.' === $locale[0]) { - return self::getDefault(); - } - - if (!preg_match('/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i', $locale, $m)) { - return $locale; - } - - if (!empty($m[4])) { - return strtolower($m[1]).'_'.ucfirst(strtolower($m[2].$m[3])).'_'.strtoupper($m[4]); - } - - if (!empty($m[3])) { - return strtolower($m[1]).'_'.ucfirst(strtolower($m[2].$m[3])); - } - - return strtolower($m[1]).'_'.strtoupper($m[2]); - } - - /** - * Not supported. Returns a correctly ordered and delimited locale code. - * - * @return string The corresponding locale code - * - * @see https://php.net/locale.composelocale - * - * @throws MethodNotImplementedException - */ - public static function composeLocale(array $subtags) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Checks if a language tag filter matches with locale. - * - * @return string The corresponding locale code - * - * @see https://php.net/locale.filtermatches - * - * @throws MethodNotImplementedException - */ - public static function filterMatches(string $languageTag, string $locale, bool $canonicalize = false) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the variants for the input locale. - * - * @return array The locale variants - * - * @see https://php.net/locale.getallvariants - * - * @throws MethodNotImplementedException - */ - public static function getAllVariants(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns the default locale. - * - * @return string The default locale code. Always returns 'en' - * - * @see https://php.net/locale.getdefault - */ - public static function getDefault() - { - return 'en'; - } - - /** - * Not supported. Returns the localized display name for the locale language. - * - * @return string The localized language display name - * - * @see https://php.net/locale.getdisplaylanguage - * - * @throws MethodNotImplementedException - */ - public static function getDisplayLanguage(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale. - * - * @return string The localized locale display name - * - * @see https://php.net/locale.getdisplayname - * - * @throws MethodNotImplementedException - */ - public static function getDisplayName(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale region. - * - * @return string The localized region display name - * - * @see https://php.net/locale.getdisplayregion - * - * @throws MethodNotImplementedException - */ - public static function getDisplayRegion(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale script. - * - * @return string The localized script display name - * - * @see https://php.net/locale.getdisplayscript - * - * @throws MethodNotImplementedException - */ - public static function getDisplayScript(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale variant. - * - * @return string The localized variant display name - * - * @see https://php.net/locale.getdisplayvariant - * - * @throws MethodNotImplementedException - */ - public static function getDisplayVariant(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the keywords for the locale. - * - * @return array Associative array with the extracted variants - * - * @see https://php.net/locale.getkeywords - * - * @throws MethodNotImplementedException - */ - public static function getKeywords(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the primary language for the locale. - * - * @return string|null The extracted language code or null in case of error - * - * @see https://php.net/locale.getprimarylanguage - * - * @throws MethodNotImplementedException - */ - public static function getPrimaryLanguage(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the region for the locale. - * - * @return string|null The extracted region code or null if not present - * - * @see https://php.net/locale.getregion - * - * @throws MethodNotImplementedException - */ - public static function getRegion(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the script for the locale. - * - * @return string|null The extracted script code or null if not present - * - * @see https://php.net/locale.getscript - * - * @throws MethodNotImplementedException - */ - public static function getScript(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the closest language tag for the locale. - * - * @see https://php.net/locale.lookup - * - * @throws MethodNotImplementedException - */ - public static function lookup(array $languageTag, string $locale, bool $canonicalize = false, string $defaultLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns an associative array of locale identifier subtags. - * - * @return array Associative array with the extracted subtags - * - * @see https://php.net/locale.parselocale - * - * @throws MethodNotImplementedException - */ - public static function parseLocale(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Sets the default runtime locale. - * - * @return bool true on success or false on failure - * - * @see https://php.net/locale.setdefault - * - * @throws MethodNotImplementedException - */ - public static function setDefault(string $locale) - { - if ('en' !== $locale) { - throw new MethodNotImplementedException(__METHOD__); - } - - return true; - } -} diff --git a/lib/symfony/polyfill-intl-icu/NumberFormatter.php b/lib/symfony/polyfill-intl-icu/NumberFormatter.php deleted file mode 100644 index 9c79e3f36..000000000 --- a/lib/symfony/polyfill-intl-icu/NumberFormatter.php +++ /dev/null @@ -1,835 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentValueNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\NotImplementedException; - -/** - * Replacement for PHP's native {@link \NumberFormatter} class. - * - * The only methods currently supported in this class are: - * - * - {@link __construct} - * - {@link create} - * - {@link formatCurrency} - * - {@link format} - * - {@link getAttribute} - * - {@link getErrorCode} - * - {@link getErrorMessage} - * - {@link getLocale} - * - {@link parse} - * - {@link setAttribute} - * - * @author Eriksen Costa - * @author Bernhard Schussek - * - * @internal - */ -abstract class NumberFormatter -{ - /* Format style constants */ - public const PATTERN_DECIMAL = 0; - public const DECIMAL = 1; - public const CURRENCY = 2; - public const PERCENT = 3; - public const SCIENTIFIC = 4; - public const SPELLOUT = 5; - public const ORDINAL = 6; - public const DURATION = 7; - public const PATTERN_RULEBASED = 9; - public const IGNORE = 0; - public const DEFAULT_STYLE = 1; - - /* Format type constants */ - public const TYPE_DEFAULT = 0; - public const TYPE_INT32 = 1; - public const TYPE_INT64 = 2; - public const TYPE_DOUBLE = 3; - public const TYPE_CURRENCY = 4; - - /* Numeric attribute constants */ - public const PARSE_INT_ONLY = 0; - public const GROUPING_USED = 1; - public const DECIMAL_ALWAYS_SHOWN = 2; - public const MAX_INTEGER_DIGITS = 3; - public const MIN_INTEGER_DIGITS = 4; - public const INTEGER_DIGITS = 5; - public const MAX_FRACTION_DIGITS = 6; - public const MIN_FRACTION_DIGITS = 7; - public const FRACTION_DIGITS = 8; - public const MULTIPLIER = 9; - public const GROUPING_SIZE = 10; - public const ROUNDING_MODE = 11; - public const ROUNDING_INCREMENT = 12; - public const FORMAT_WIDTH = 13; - public const PADDING_POSITION = 14; - public const SECONDARY_GROUPING_SIZE = 15; - public const SIGNIFICANT_DIGITS_USED = 16; - public const MIN_SIGNIFICANT_DIGITS = 17; - public const MAX_SIGNIFICANT_DIGITS = 18; - public const LENIENT_PARSE = 19; - - /* Text attribute constants */ - public const POSITIVE_PREFIX = 0; - public const POSITIVE_SUFFIX = 1; - public const NEGATIVE_PREFIX = 2; - public const NEGATIVE_SUFFIX = 3; - public const PADDING_CHARACTER = 4; - public const CURRENCY_CODE = 5; - public const DEFAULT_RULESET = 6; - public const PUBLIC_RULESETS = 7; - - /* Format symbol constants */ - public const DECIMAL_SEPARATOR_SYMBOL = 0; - public const GROUPING_SEPARATOR_SYMBOL = 1; - public const PATTERN_SEPARATOR_SYMBOL = 2; - public const PERCENT_SYMBOL = 3; - public const ZERO_DIGIT_SYMBOL = 4; - public const DIGIT_SYMBOL = 5; - public const MINUS_SIGN_SYMBOL = 6; - public const PLUS_SIGN_SYMBOL = 7; - public const CURRENCY_SYMBOL = 8; - public const INTL_CURRENCY_SYMBOL = 9; - public const MONETARY_SEPARATOR_SYMBOL = 10; - public const EXPONENTIAL_SYMBOL = 11; - public const PERMILL_SYMBOL = 12; - public const PAD_ESCAPE_SYMBOL = 13; - public const INFINITY_SYMBOL = 14; - public const NAN_SYMBOL = 15; - public const SIGNIFICANT_DIGIT_SYMBOL = 16; - public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; - - /* Rounding mode values used by NumberFormatter::setAttribute() with NumberFormatter::ROUNDING_MODE attribute */ - public const ROUND_CEILING = 0; - public const ROUND_FLOOR = 1; - public const ROUND_DOWN = 2; - public const ROUND_UP = 3; - public const ROUND_HALFEVEN = 4; - public const ROUND_HALFDOWN = 5; - public const ROUND_HALFUP = 6; - - /* Pad position values used by NumberFormatter::setAttribute() with NumberFormatter::PADDING_POSITION attribute */ - public const PAD_BEFORE_PREFIX = 0; - public const PAD_AFTER_PREFIX = 1; - public const PAD_BEFORE_SUFFIX = 2; - public const PAD_AFTER_SUFFIX = 3; - - /** - * The error code from the last operation. - * - * @var int - */ - protected $errorCode = Icu::U_ZERO_ERROR; - - /** - * The error message from the last operation. - * - * @var string - */ - protected $errorMessage = 'U_ZERO_ERROR'; - - /** - * @var int - */ - private $style; - - /** - * Default values for the en locale. - */ - private $attributes = [ - self::FRACTION_DIGITS => 0, - self::GROUPING_USED => 1, - self::ROUNDING_MODE => self::ROUND_HALFEVEN, - ]; - - /** - * Holds the initialized attributes code. - */ - private $initializedAttributes = []; - - /** - * The supported styles to the constructor $styles argument. - */ - private static $supportedStyles = [ - 'CURRENCY' => self::CURRENCY, - 'DECIMAL' => self::DECIMAL, - ]; - - /** - * Supported attributes to the setAttribute() $attr argument. - */ - private static $supportedAttributes = [ - 'FRACTION_DIGITS' => self::FRACTION_DIGITS, - 'GROUPING_USED' => self::GROUPING_USED, - 'ROUNDING_MODE' => self::ROUNDING_MODE, - ]; - - /** - * The available rounding modes for setAttribute() usage with - * NumberFormatter::ROUNDING_MODE. NumberFormatter::ROUND_DOWN - * and NumberFormatter::ROUND_UP does not have a PHP only equivalent. - */ - private static $roundingModes = [ - 'ROUND_HALFEVEN' => self::ROUND_HALFEVEN, - 'ROUND_HALFDOWN' => self::ROUND_HALFDOWN, - 'ROUND_HALFUP' => self::ROUND_HALFUP, - 'ROUND_CEILING' => self::ROUND_CEILING, - 'ROUND_FLOOR' => self::ROUND_FLOOR, - 'ROUND_DOWN' => self::ROUND_DOWN, - 'ROUND_UP' => self::ROUND_UP, - ]; - - /** - * The mapping between NumberFormatter rounding modes to the available - * modes in PHP's round() function. - * - * @see https://php.net/round - */ - private static $phpRoundingMap = [ - self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN, - self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN, - self::ROUND_HALFUP => \PHP_ROUND_HALF_UP, - ]; - - /** - * The list of supported rounding modes which aren't available modes in - * PHP's round() function, but there's an equivalent. Keys are rounding - * modes, values does not matter. - */ - private static $customRoundingList = [ - self::ROUND_CEILING => true, - self::ROUND_FLOOR => true, - self::ROUND_DOWN => true, - self::ROUND_UP => true, - ]; - - /** - * The maximum value of the integer type in 32 bit platforms. - */ - private static $int32Max = 2147483647; - - /** - * The maximum value of the integer type in 64 bit platforms. - * - * @var int|float - */ - private static $int64Max = 9223372036854775807; - - private static $enSymbols = [ - self::DECIMAL => ['.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','], - self::CURRENCY => ['.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','], - ]; - - private static $enTextAttributes = [ - self::DECIMAL => ['', '', '-', '', ' ', 'XXX', ''], - self::CURRENCY => ['¤', '', '-¤', '', ' ', 'XXX'], - ]; - - /** - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $style Style of the formatting, one of the format style constants. - * The only supported styles are NumberFormatter::DECIMAL - * and NumberFormatter::CURRENCY. - * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or - * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax - * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation - * - * @see https://php.net/numberformatter.create - * @see https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1DecimalFormat.html#details - * @see https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1RuleBasedNumberFormat.html#details - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When the $style is not supported - * @throws MethodArgumentNotImplementedException When the pattern value is different than null - */ - public function __construct(?string $locale = 'en', int $style = null, string $pattern = null) - { - if ('en' !== $locale && null !== $locale) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); - } - - if (!\in_array($style, self::$supportedStyles)) { - $message = sprintf('The available styles are: %s.', implode(', ', array_keys(self::$supportedStyles))); - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'style', $style, $message); - } - - if (null !== $pattern) { - throw new MethodArgumentNotImplementedException(__METHOD__, 'pattern'); - } - - $this->style = $style; - } - - /** - * Static constructor. - * - * @param string|null $locale The locale code. The only supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $style Style of the formatting, one of the format style constants. - * The only currently supported styles are NumberFormatter::DECIMAL - * and NumberFormatter::CURRENCY. - * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or - * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax - * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation - * - * @return static - * - * @see https://php.net/numberformatter.create - * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details - * @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When the $style is not supported - * @throws MethodArgumentNotImplementedException When the pattern value is different than null - */ - public static function create(?string $locale = 'en', int $style = null, string $pattern = null) - { - return new static($locale, $style, $pattern); - } - - /** - * Format a currency value. - * - * @return string The formatted currency value - * - * @see https://php.net/numberformatter.formatcurrency - * @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes - */ - public function formatCurrency(float $amount, string $currency) - { - if (self::DECIMAL === $this->style) { - return $this->format($amount); - } - - if (null === $symbol = Currencies::getSymbol($currency)) { - return false; - } - $fractionDigits = Currencies::getFractionDigits($currency); - - $amount = $this->roundCurrency($amount, $currency); - - $negative = false; - if (0 > $amount) { - $negative = true; - $amount *= -1; - } - - $amount = $this->formatNumber($amount, $fractionDigits); - - // There's a non-breaking space after the currency code (i.e. CRC 100), but not if the currency has a symbol (i.e. £100). - $ret = $symbol.(mb_strlen($symbol, 'UTF-8') > 2 ? "\xc2\xa0" : '').$amount; - - return $negative ? '-'.$ret : $ret; - } - - /** - * Format a number. - * - * @param int|float $num The value to format - * @param int $type Type of the formatting, one of the format type constants. - * Only type NumberFormatter::TYPE_DEFAULT is currently supported. - * - * @return bool|string The formatted value or false on error - * - * @see https://php.net/numberformatter.format - * - * @throws NotImplementedException If the method is called with the class $style 'CURRENCY' - * @throws MethodArgumentValueNotImplementedException If the $type is different than TYPE_DEFAULT - */ - public function format($num, int $type = self::TYPE_DEFAULT) - { - // The original NumberFormatter does not support this format type - if (self::TYPE_CURRENCY === $type) { - if (\PHP_VERSION_ID >= 80000) { - throw new \ValueError(sprintf('The format type must be a NumberFormatter::TYPE_* constant (%s given).', $type)); - } - - trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING); - - return false; - } - - if (self::CURRENCY === $this->style) { - throw new NotImplementedException(sprintf('"%s()" method does not support the formatting of currencies (instance with CURRENCY style). "%s".', __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE)); - } - - // Only the default type is supported. - if (self::TYPE_DEFAULT !== $type) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'type', $type, 'Only TYPE_DEFAULT is supported'); - } - - $fractionDigits = $this->getAttribute(self::FRACTION_DIGITS); - - $num = $this->round($num, $fractionDigits); - $num = $this->formatNumber($num, $fractionDigits); - - // behave like the intl extension - $this->resetError(); - - return $num; - } - - /** - * Returns an attribute value. - * - * @return int|false The attribute value on success or false on error - * - * @see https://php.net/numberformatter.getattribute - */ - public function getAttribute(int $attribute) - { - return $this->attributes[$attribute] ?? null; - } - - /** - * Returns formatter's last error code. Always returns the U_ZERO_ERROR class constant value. - * - * @return int The error code from last formatter call - * - * @see https://php.net/numberformatter.geterrorcode - */ - public function getErrorCode() - { - return $this->errorCode; - } - - /** - * Returns formatter's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. - * - * @return string The error message from last formatter call - * - * @see https://php.net/numberformatter.geterrormessage - */ - public function getErrorMessage() - { - return $this->errorMessage; - } - - /** - * Returns the formatter's locale. - * - * The parameter $type is currently ignored. - * - * @param int $type Not supported. The locale name type to return (Locale::VALID_LOCALE or Locale::ACTUAL_LOCALE) - * - * @return string The locale used to create the formatter. Currently always - * returns "en". - * - * @see https://php.net/numberformatter.getlocale - */ - public function getLocale(int $type = Locale::ACTUAL_LOCALE) - { - return 'en'; - } - - /** - * Not supported. Returns the formatter's pattern. - * - * @return string|false The pattern string used by the formatter or false on error - * - * @see https://php.net/numberformatter.getpattern - * - * @throws MethodNotImplementedException - */ - public function getPattern() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns a formatter symbol value. - * - * @return string|false The symbol value or false on error - * - * @see https://php.net/numberformatter.getsymbol - */ - public function getSymbol(int $symbol) - { - return \array_key_exists($this->style, self::$enSymbols) && \array_key_exists($symbol, self::$enSymbols[$this->style]) ? self::$enSymbols[$this->style][$symbol] : false; - } - - /** - * Not supported. Returns a formatter text attribute value. - * - * @return string|false The attribute value or false on error - * - * @see https://php.net/numberformatter.gettextattribute - */ - public function getTextAttribute(int $attribute) - { - return \array_key_exists($this->style, self::$enTextAttributes) && \array_key_exists($attribute, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attribute] : false; - } - - /** - * Not supported. Parse a currency number. - * - * @return float|false The parsed numeric value or false on error - * - * @see https://php.net/numberformatter.parsecurrency - * - * @throws MethodNotImplementedException - */ - public function parseCurrency(string $string, &$currency, &$offset = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Parse a number. - * - * @return int|float|false The parsed value or false on error - * - * @see https://php.net/numberformatter.parse - */ - public function parse(string $string, int $type = self::TYPE_DOUBLE, &$offset = null) - { - if (self::TYPE_DEFAULT === $type || self::TYPE_CURRENCY === $type) { - if (\PHP_VERSION_ID >= 80000) { - throw new \ValueError(sprintf('The format type must be a NumberFormatter::TYPE_* constant (%d given).', $type)); - } - - trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING); - - return false; - } - - // Any invalid number at the end of the string is removed. - // Only numbers and the fraction separator is expected in the string. - // If grouping is used, grouping separator also becomes a valid character. - $groupingMatch = $this->getAttribute(self::GROUPING_USED) ? '|(?P\d++(,{1}\d+)++(\.\d*+)?)' : ''; - if (preg_match("/^-?(?:\.\d++{$groupingMatch}|\d++(\.\d*+)?)/", $string, $matches)) { - $string = $matches[0]; - $offset = \strlen($string); - // value is not valid if grouping is used, but digits are not grouped in groups of three - if ($error = isset($matches['grouping']) && !preg_match('/^-?(?:\d{1,3}+)?(?:(?:,\d{3})++|\d*+)(?:\.\d*+)?$/', $string)) { - // the position on error is 0 for positive and 1 for negative numbers - $offset = 0 === strpos($string, '-') ? 1 : 0; - } - } else { - $error = true; - $offset = 0; - } - - if ($error) { - Icu::setError(Icu::U_PARSE_ERROR, 'Number parsing failed'); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return false; - } - - $string = str_replace(',', '', $string); - $string = $this->convertValueDataType($string, $type); - - // behave like the intl extension - $this->resetError(); - - return $string; - } - - /** - * Set an attribute. - * - * @param int|float $value - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.setattribute - * - * @throws MethodArgumentValueNotImplementedException When the $attribute is not supported - * @throws MethodArgumentValueNotImplementedException When the $value is not supported - */ - public function setAttribute(int $attribute, $value) - { - if (!\in_array($attribute, self::$supportedAttributes)) { - $message = sprintf( - 'The available attributes are: %s', - implode(', ', array_keys(self::$supportedAttributes)) - ); - - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'attribute', $value, $message); - } - - if (self::$supportedAttributes['ROUNDING_MODE'] === $attribute && $this->isInvalidRoundingMode($value)) { - $message = sprintf( - 'The supported values for ROUNDING_MODE are: %s', - implode(', ', array_keys(self::$roundingModes)) - ); - - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'attribute', $value, $message); - } - - if (self::$supportedAttributes['GROUPING_USED'] === $attribute) { - $value = $this->normalizeGroupingUsedValue($value); - } - - if (self::$supportedAttributes['FRACTION_DIGITS'] === $attribute) { - $value = $this->normalizeFractionDigitsValue($value); - if ($value < 0) { - // ignore negative values but do not raise an error - return true; - } - } - - $this->attributes[$attribute] = $value; - $this->initializedAttributes[$attribute] = true; - - return true; - } - - /** - * Not supported. Set the formatter's pattern. - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.setpattern - * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details - * - * @throws MethodNotImplementedException - */ - public function setPattern(string $pattern) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set the formatter's symbol. - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.setsymbol - * - * @throws MethodNotImplementedException - */ - public function setSymbol(int $symbol, string $value) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set a text attribute. - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.settextattribute - * - * @throws MethodNotImplementedException - */ - public function setTextAttribute(int $attribute, string $value) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Set the error to the default U_ZERO_ERROR. - */ - protected function resetError() - { - Icu::setError(Icu::U_ZERO_ERROR); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - } - - /** - * Rounds a currency value, applying increment rounding if applicable. - * - * When a currency have a rounding increment, an extra round is made after the first one. The rounding factor is - * determined in the ICU data and is explained as of: - * - * "the rounding increment is given in units of 10^(-fraction_digits)" - * - * The only actual rounding data as of this writing, is CHF. - * - * @see http://en.wikipedia.org/wiki/Swedish_rounding - * @see http://www.docjar.com/html/api/com/ibm/icu/util/Currency.java.html#1007 - */ - private function roundCurrency(float $value, string $currency): float - { - $fractionDigits = Currencies::getFractionDigits($currency); - $roundingIncrement = Currencies::getRoundingIncrement($currency); - - // Round with the formatter rounding mode - $value = $this->round($value, $fractionDigits); - - // Swiss rounding - if (0 < $roundingIncrement && 0 < $fractionDigits) { - $roundingFactor = $roundingIncrement / 10 ** $fractionDigits; - $value = round($value / $roundingFactor) * $roundingFactor; - } - - return $value; - } - - /** - * Rounds a value. - * - * @param int|float $value The value to round - * - * @return int|float The rounded value - */ - private function round($value, int $precision) - { - $precision = $this->getUninitializedPrecision($value, $precision); - - $roundingModeAttribute = $this->getAttribute(self::ROUNDING_MODE); - if (isset(self::$phpRoundingMap[$roundingModeAttribute])) { - $value = round($value, $precision, self::$phpRoundingMap[$roundingModeAttribute]); - } elseif (isset(self::$customRoundingList[$roundingModeAttribute])) { - $roundingCoef = 10 ** $precision; - $value *= $roundingCoef; - $value = (float) (string) $value; - - switch ($roundingModeAttribute) { - case self::ROUND_CEILING: - $value = ceil($value); - break; - case self::ROUND_FLOOR: - $value = floor($value); - break; - case self::ROUND_UP: - $value = $value > 0 ? ceil($value) : floor($value); - break; - case self::ROUND_DOWN: - $value = $value > 0 ? floor($value) : ceil($value); - break; - } - - $value /= $roundingCoef; - } - - return $value; - } - - /** - * Formats a number. - * - * @param int|float $value The numeric value to format - */ - private function formatNumber($value, int $precision): string - { - $precision = $this->getUninitializedPrecision($value, $precision); - - return number_format($value, $precision, '.', $this->getAttribute(self::GROUPING_USED) ? ',' : ''); - } - - /** - * Returns the precision value if the DECIMAL style is being used and the FRACTION_DIGITS attribute is uninitialized. - * - * @param int|float $value The value to get the precision from if the FRACTION_DIGITS attribute is uninitialized - */ - private function getUninitializedPrecision($value, int $precision): int - { - if (self::CURRENCY === $this->style) { - return $precision; - } - - if (!$this->isInitializedAttribute(self::FRACTION_DIGITS)) { - preg_match('/.*\.(.*)/', (string) $value, $digits); - if (isset($digits[1])) { - $precision = \strlen($digits[1]); - } - } - - return $precision; - } - - /** - * Check if the attribute is initialized (value set by client code). - */ - private function isInitializedAttribute(string $attr): bool - { - return isset($this->initializedAttributes[$attr]); - } - - /** - * Returns the numeric value using the $type to convert to the right data type. - * - * @param mixed $value The value to be converted - * - * @return int|float|false The converted value - */ - private function convertValueDataType($value, int $type) - { - if (self::TYPE_DOUBLE === $type) { - $value = (float) $value; - } elseif (self::TYPE_INT32 === $type) { - $value = $this->getInt32Value($value); - } elseif (self::TYPE_INT64 === $type) { - $value = $this->getInt64Value($value); - } - - return $value; - } - - /** - * Convert the value data type to int or returns false if the value is out of the integer value range. - * - * @return int|false The converted value - */ - private function getInt32Value($value) - { - if ($value > self::$int32Max || $value < -self::$int32Max - 1) { - return false; - } - - return (int) $value; - } - - /** - * Convert the value data type to int or returns false if the value is out of the integer value range. - * - * @return int|float|false The converted value - */ - private function getInt64Value($value) - { - if ($value > self::$int64Max || $value < -self::$int64Max - 1) { - return false; - } - - if (\PHP_INT_SIZE !== 8 && ($value > self::$int32Max || $value < -self::$int32Max - 1)) { - return (float) $value; - } - - return (int) $value; - } - - /** - * Check if the rounding mode is invalid. - */ - private function isInvalidRoundingMode(int $value): bool - { - if (\in_array($value, self::$roundingModes, true)) { - return false; - } - - return true; - } - - /** - * Returns the normalized value for the GROUPING_USED attribute. Any value that can be converted to int will be - * cast to Boolean and then to int again. This way, negative values are converted to 1 and string values to 0. - */ - private function normalizeGroupingUsedValue($value): int - { - return (int) (bool) (int) $value; - } - - /** - * Returns the normalized value for the FRACTION_DIGITS attribute. - */ - private function normalizeFractionDigitsValue($value): int - { - return (int) $value; - } -} diff --git a/lib/symfony/polyfill-intl-icu/README.md b/lib/symfony/polyfill-intl-icu/README.md deleted file mode 100644 index b7faedc5d..000000000 --- a/lib/symfony/polyfill-intl-icu/README.md +++ /dev/null @@ -1,23 +0,0 @@ -Symfony Polyfill / Intl: ICU -============================ - -This package provides fallback implementations when the -[Intl](https://php.net/intl) extension is not installed. -It is limited to the "en" locale and to: - -- [`intl_is_failure()`](https://php.net/intl-is-failure) -- [`intl_get_error_code()`](https://php.net/intl-get-error-code) -- [`intl_get_error_message()`](https://php.net/intl-get-error-message) -- [`intl_error_name()`](https://php.net/intl-error-name) -- [`Collator`](https://php.net/Collator) -- [`NumberFormatter`](https://php.net/NumberFormatter) -- [`Locale`](https://php.net/Locale) -- [`IntlDateFormatter`](https://php.net/IntlDateFormatter) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-intl-icu/Resources/currencies.php b/lib/symfony/polyfill-intl-icu/Resources/currencies.php deleted file mode 100644 index f802b7a89..000000000 --- a/lib/symfony/polyfill-intl-icu/Resources/currencies.php +++ /dev/null @@ -1,1321 +0,0 @@ - - array ( - 0 => 'ADP', - 1 => 0, - 2 => 0, - ), - 'AED' => - array ( - 0 => 'AED', - ), - 'AFA' => - array ( - 0 => 'AFA', - ), - 'AFN' => - array ( - 0 => 'AFN', - 1 => 0, - 2 => 0, - ), - 'ALK' => - array ( - 0 => 'ALK', - ), - 'ALL' => - array ( - 0 => 'ALL', - 1 => 0, - 2 => 0, - ), - 'AMD' => - array ( - 0 => 'AMD', - 1 => 2, - 2 => 0, - ), - 'ANG' => - array ( - 0 => 'ANG', - ), - 'AOA' => - array ( - 0 => 'AOA', - ), - 'AOK' => - array ( - 0 => 'AOK', - ), - 'AON' => - array ( - 0 => 'AON', - ), - 'AOR' => - array ( - 0 => 'AOR', - ), - 'ARA' => - array ( - 0 => 'ARA', - ), - 'ARL' => - array ( - 0 => 'ARL', - ), - 'ARM' => - array ( - 0 => 'ARM', - ), - 'ARP' => - array ( - 0 => 'ARP', - ), - 'ARS' => - array ( - 0 => 'ARS', - ), - 'ATS' => - array ( - 0 => 'ATS', - ), - 'AUD' => - array ( - 0 => 'A$', - ), - 'AWG' => - array ( - 0 => 'AWG', - ), - 'AZM' => - array ( - 0 => 'AZM', - ), - 'AZN' => - array ( - 0 => 'AZN', - ), - 'BAD' => - array ( - 0 => 'BAD', - ), - 'BAM' => - array ( - 0 => 'BAM', - ), - 'BAN' => - array ( - 0 => 'BAN', - ), - 'BBD' => - array ( - 0 => 'BBD', - ), - 'BDT' => - array ( - 0 => 'BDT', - ), - 'BEC' => - array ( - 0 => 'BEC', - ), - 'BEF' => - array ( - 0 => 'BEF', - ), - 'BEL' => - array ( - 0 => 'BEL', - ), - 'BGL' => - array ( - 0 => 'BGL', - ), - 'BGM' => - array ( - 0 => 'BGM', - ), - 'BGN' => - array ( - 0 => 'BGN', - ), - 'BGO' => - array ( - 0 => 'BGO', - ), - 'BHD' => - array ( - 0 => 'BHD', - 1 => 3, - 2 => 0, - ), - 'BIF' => - array ( - 0 => 'BIF', - 1 => 0, - 2 => 0, - ), - 'BMD' => - array ( - 0 => 'BMD', - ), - 'BND' => - array ( - 0 => 'BND', - ), - 'BOB' => - array ( - 0 => 'BOB', - ), - 'BOL' => - array ( - 0 => 'BOL', - ), - 'BOP' => - array ( - 0 => 'BOP', - ), - 'BOV' => - array ( - 0 => 'BOV', - ), - 'BRB' => - array ( - 0 => 'BRB', - ), - 'BRC' => - array ( - 0 => 'BRC', - ), - 'BRE' => - array ( - 0 => 'BRE', - ), - 'BRL' => - array ( - 0 => 'R$', - ), - 'BRN' => - array ( - 0 => 'BRN', - ), - 'BRR' => - array ( - 0 => 'BRR', - ), - 'BRZ' => - array ( - 0 => 'BRZ', - ), - 'BSD' => - array ( - 0 => 'BSD', - ), - 'BTN' => - array ( - 0 => 'BTN', - ), - 'BUK' => - array ( - 0 => 'BUK', - ), - 'BWP' => - array ( - 0 => 'BWP', - ), - 'BYB' => - array ( - 0 => 'BYB', - ), - 'BYN' => - array ( - 0 => 'BYN', - 1 => 2, - 2 => 0, - ), - 'BYR' => - array ( - 0 => 'BYR', - 1 => 0, - 2 => 0, - ), - 'BZD' => - array ( - 0 => 'BZD', - ), - 'CAD' => - array ( - 0 => 'CA$', - 1 => 2, - 2 => 0, - ), - 'CDF' => - array ( - 0 => 'CDF', - ), - 'CHE' => - array ( - 0 => 'CHE', - ), - 'CHF' => - array ( - 0 => 'CHF', - 1 => 2, - 2 => 0, - ), - 'CHW' => - array ( - 0 => 'CHW', - ), - 'CLE' => - array ( - 0 => 'CLE', - ), - 'CLF' => - array ( - 0 => 'CLF', - 1 => 4, - 2 => 0, - ), - 'CLP' => - array ( - 0 => 'CLP', - 1 => 0, - 2 => 0, - ), - 'CNH' => - array ( - 0 => 'CNH', - ), - 'CNX' => - array ( - 0 => 'CNX', - ), - 'CNY' => - array ( - 0 => 'CN¥', - ), - 'COP' => - array ( - 0 => 'COP', - 1 => 2, - 2 => 0, - ), - 'COU' => - array ( - 0 => 'COU', - ), - 'CRC' => - array ( - 0 => 'CRC', - 1 => 2, - 2 => 0, - ), - 'CSD' => - array ( - 0 => 'CSD', - ), - 'CSK' => - array ( - 0 => 'CSK', - ), - 'CUC' => - array ( - 0 => 'CUC', - ), - 'CUP' => - array ( - 0 => 'CUP', - ), - 'CVE' => - array ( - 0 => 'CVE', - ), - 'CYP' => - array ( - 0 => 'CYP', - ), - 'CZK' => - array ( - 0 => 'CZK', - 1 => 2, - 2 => 0, - ), - 'DDM' => - array ( - 0 => 'DDM', - ), - 'DEM' => - array ( - 0 => 'DEM', - ), - 'DJF' => - array ( - 0 => 'DJF', - 1 => 0, - 2 => 0, - ), - 'DKK' => - array ( - 0 => 'DKK', - 1 => 2, - 2 => 0, - ), - 'DOP' => - array ( - 0 => 'DOP', - ), - 'DZD' => - array ( - 0 => 'DZD', - ), - 'ECS' => - array ( - 0 => 'ECS', - ), - 'ECV' => - array ( - 0 => 'ECV', - ), - 'EEK' => - array ( - 0 => 'EEK', - ), - 'EGP' => - array ( - 0 => 'EGP', - ), - 'ERN' => - array ( - 0 => 'ERN', - ), - 'ESA' => - array ( - 0 => 'ESA', - ), - 'ESB' => - array ( - 0 => 'ESB', - ), - 'ESP' => - array ( - 0 => 'ESP', - 1 => 0, - 2 => 0, - ), - 'ETB' => - array ( - 0 => 'ETB', - ), - 'EUR' => - array ( - 0 => '€', - ), - 'FIM' => - array ( - 0 => 'FIM', - ), - 'FJD' => - array ( - 0 => 'FJD', - ), - 'FKP' => - array ( - 0 => 'FKP', - ), - 'FRF' => - array ( - 0 => 'FRF', - ), - 'GBP' => - array ( - 0 => '£', - ), - 'GEK' => - array ( - 0 => 'GEK', - ), - 'GEL' => - array ( - 0 => 'GEL', - ), - 'GHC' => - array ( - 0 => 'GHC', - ), - 'GHS' => - array ( - 0 => 'GHS', - ), - 'GIP' => - array ( - 0 => 'GIP', - ), - 'GMD' => - array ( - 0 => 'GMD', - ), - 'GNF' => - array ( - 0 => 'GNF', - 1 => 0, - 2 => 0, - ), - 'GNS' => - array ( - 0 => 'GNS', - ), - 'GQE' => - array ( - 0 => 'GQE', - ), - 'GRD' => - array ( - 0 => 'GRD', - ), - 'GTQ' => - array ( - 0 => 'GTQ', - ), - 'GWE' => - array ( - 0 => 'GWE', - ), - 'GWP' => - array ( - 0 => 'GWP', - ), - 'GYD' => - array ( - 0 => 'GYD', - 1 => 2, - 2 => 0, - ), - 'HKD' => - array ( - 0 => 'HK$', - ), - 'HNL' => - array ( - 0 => 'HNL', - ), - 'HRD' => - array ( - 0 => 'HRD', - ), - 'HRK' => - array ( - 0 => 'HRK', - ), - 'HTG' => - array ( - 0 => 'HTG', - ), - 'HUF' => - array ( - 0 => 'HUF', - 1 => 2, - 2 => 0, - ), - 'IDR' => - array ( - 0 => 'IDR', - 1 => 2, - 2 => 0, - ), - 'IEP' => - array ( - 0 => 'IEP', - ), - 'ILP' => - array ( - 0 => 'ILP', - ), - 'ILR' => - array ( - 0 => 'ILR', - ), - 'ILS' => - array ( - 0 => '₪', - ), - 'INR' => - array ( - 0 => '₹', - ), - 'IQD' => - array ( - 0 => 'IQD', - 1 => 0, - 2 => 0, - ), - 'IRR' => - array ( - 0 => 'IRR', - 1 => 0, - 2 => 0, - ), - 'ISJ' => - array ( - 0 => 'ISJ', - ), - 'ISK' => - array ( - 0 => 'ISK', - 1 => 0, - 2 => 0, - ), - 'ITL' => - array ( - 0 => 'ITL', - 1 => 0, - 2 => 0, - ), - 'JMD' => - array ( - 0 => 'JMD', - ), - 'JOD' => - array ( - 0 => 'JOD', - 1 => 3, - 2 => 0, - ), - 'JPY' => - array ( - 0 => '¥', - 1 => 0, - 2 => 0, - ), - 'KES' => - array ( - 0 => 'KES', - ), - 'KGS' => - array ( - 0 => 'KGS', - ), - 'KHR' => - array ( - 0 => 'KHR', - ), - 'KMF' => - array ( - 0 => 'KMF', - 1 => 0, - 2 => 0, - ), - 'KPW' => - array ( - 0 => 'KPW', - 1 => 0, - 2 => 0, - ), - 'KRH' => - array ( - 0 => 'KRH', - ), - 'KRO' => - array ( - 0 => 'KRO', - ), - 'KRW' => - array ( - 0 => '₩', - 1 => 0, - 2 => 0, - ), - 'KWD' => - array ( - 0 => 'KWD', - 1 => 3, - 2 => 0, - ), - 'KYD' => - array ( - 0 => 'KYD', - ), - 'KZT' => - array ( - 0 => 'KZT', - ), - 'LAK' => - array ( - 0 => 'LAK', - 1 => 0, - 2 => 0, - ), - 'LBP' => - array ( - 0 => 'LBP', - 1 => 0, - 2 => 0, - ), - 'LKR' => - array ( - 0 => 'LKR', - ), - 'LRD' => - array ( - 0 => 'LRD', - ), - 'LSL' => - array ( - 0 => 'LSL', - ), - 'LTL' => - array ( - 0 => 'LTL', - ), - 'LTT' => - array ( - 0 => 'LTT', - ), - 'LUC' => - array ( - 0 => 'LUC', - ), - 'LUF' => - array ( - 0 => 'LUF', - 1 => 0, - 2 => 0, - ), - 'LUL' => - array ( - 0 => 'LUL', - ), - 'LVL' => - array ( - 0 => 'LVL', - ), - 'LVR' => - array ( - 0 => 'LVR', - ), - 'LYD' => - array ( - 0 => 'LYD', - 1 => 3, - 2 => 0, - ), - 'MAD' => - array ( - 0 => 'MAD', - ), - 'MAF' => - array ( - 0 => 'MAF', - ), - 'MCF' => - array ( - 0 => 'MCF', - ), - 'MDC' => - array ( - 0 => 'MDC', - ), - 'MDL' => - array ( - 0 => 'MDL', - ), - 'MGA' => - array ( - 0 => 'MGA', - 1 => 0, - 2 => 0, - ), - 'MGF' => - array ( - 0 => 'MGF', - 1 => 0, - 2 => 0, - ), - 'MKD' => - array ( - 0 => 'MKD', - ), - 'MKN' => - array ( - 0 => 'MKN', - ), - 'MLF' => - array ( - 0 => 'MLF', - ), - 'MMK' => - array ( - 0 => 'MMK', - 1 => 0, - 2 => 0, - ), - 'MNT' => - array ( - 0 => 'MNT', - 1 => 2, - 2 => 0, - ), - 'MOP' => - array ( - 0 => 'MOP', - ), - 'MRO' => - array ( - 0 => 'MRO', - 1 => 0, - 2 => 0, - ), - 'MRU' => - array ( - 0 => 'MRU', - ), - 'MTL' => - array ( - 0 => 'MTL', - ), - 'MTP' => - array ( - 0 => 'MTP', - ), - 'MUR' => - array ( - 0 => 'MUR', - 1 => 2, - 2 => 0, - ), - 'MVP' => - array ( - 0 => 'MVP', - ), - 'MVR' => - array ( - 0 => 'MVR', - ), - 'MWK' => - array ( - 0 => 'MWK', - ), - 'MXN' => - array ( - 0 => 'MX$', - ), - 'MXP' => - array ( - 0 => 'MXP', - ), - 'MXV' => - array ( - 0 => 'MXV', - ), - 'MYR' => - array ( - 0 => 'MYR', - ), - 'MZE' => - array ( - 0 => 'MZE', - ), - 'MZM' => - array ( - 0 => 'MZM', - ), - 'MZN' => - array ( - 0 => 'MZN', - ), - 'NAD' => - array ( - 0 => 'NAD', - ), - 'NGN' => - array ( - 0 => 'NGN', - ), - 'NIC' => - array ( - 0 => 'NIC', - ), - 'NIO' => - array ( - 0 => 'NIO', - ), - 'NLG' => - array ( - 0 => 'NLG', - ), - 'NOK' => - array ( - 0 => 'NOK', - 1 => 2, - 2 => 0, - ), - 'NPR' => - array ( - 0 => 'NPR', - ), - 'NZD' => - array ( - 0 => 'NZ$', - ), - 'OMR' => - array ( - 0 => 'OMR', - 1 => 3, - 2 => 0, - ), - 'PAB' => - array ( - 0 => 'PAB', - ), - 'PEI' => - array ( - 0 => 'PEI', - ), - 'PEN' => - array ( - 0 => 'PEN', - ), - 'PES' => - array ( - 0 => 'PES', - ), - 'PGK' => - array ( - 0 => 'PGK', - ), - 'PHP' => - array ( - 0 => '₱', - ), - 'PKR' => - array ( - 0 => 'PKR', - 1 => 2, - 2 => 0, - ), - 'PLN' => - array ( - 0 => 'PLN', - ), - 'PLZ' => - array ( - 0 => 'PLZ', - ), - 'PTE' => - array ( - 0 => 'PTE', - ), - 'PYG' => - array ( - 0 => 'PYG', - 1 => 0, - 2 => 0, - ), - 'QAR' => - array ( - 0 => 'QAR', - ), - 'RHD' => - array ( - 0 => 'RHD', - ), - 'ROL' => - array ( - 0 => 'ROL', - ), - 'RON' => - array ( - 0 => 'RON', - ), - 'RSD' => - array ( - 0 => 'RSD', - 1 => 0, - 2 => 0, - ), - 'RUB' => - array ( - 0 => 'RUB', - ), - 'RUR' => - array ( - 0 => 'RUR', - ), - 'RWF' => - array ( - 0 => 'RWF', - 1 => 0, - 2 => 0, - ), - 'SAR' => - array ( - 0 => 'SAR', - ), - 'SBD' => - array ( - 0 => 'SBD', - ), - 'SCR' => - array ( - 0 => 'SCR', - ), - 'SDD' => - array ( - 0 => 'SDD', - ), - 'SDG' => - array ( - 0 => 'SDG', - ), - 'SDP' => - array ( - 0 => 'SDP', - ), - 'SEK' => - array ( - 0 => 'SEK', - 1 => 2, - 2 => 0, - ), - 'SGD' => - array ( - 0 => 'SGD', - ), - 'SHP' => - array ( - 0 => 'SHP', - ), - 'SIT' => - array ( - 0 => 'SIT', - ), - 'SKK' => - array ( - 0 => 'SKK', - ), - 'SLE' => - array ( - 0 => 'SLE', - 1 => 2, - 2 => 0, - ), - 'SLL' => - array ( - 0 => 'SLL', - 1 => 0, - 2 => 0, - ), - 'SOS' => - array ( - 0 => 'SOS', - 1 => 0, - 2 => 0, - ), - 'SRD' => - array ( - 0 => 'SRD', - ), - 'SRG' => - array ( - 0 => 'SRG', - ), - 'SSP' => - array ( - 0 => 'SSP', - ), - 'STD' => - array ( - 0 => 'STD', - 1 => 0, - 2 => 0, - ), - 'STN' => - array ( - 0 => 'STN', - ), - 'SUR' => - array ( - 0 => 'SUR', - ), - 'SVC' => - array ( - 0 => 'SVC', - ), - 'SYP' => - array ( - 0 => 'SYP', - 1 => 0, - 2 => 0, - ), - 'SZL' => - array ( - 0 => 'SZL', - ), - 'THB' => - array ( - 0 => 'THB', - ), - 'TJR' => - array ( - 0 => 'TJR', - ), - 'TJS' => - array ( - 0 => 'TJS', - ), - 'TMM' => - array ( - 0 => 'TMM', - 1 => 0, - 2 => 0, - ), - 'TMT' => - array ( - 0 => 'TMT', - ), - 'TND' => - array ( - 0 => 'TND', - 1 => 3, - 2 => 0, - ), - 'TOP' => - array ( - 0 => 'TOP', - ), - 'TPE' => - array ( - 0 => 'TPE', - ), - 'TRL' => - array ( - 0 => 'TRL', - 1 => 0, - 2 => 0, - ), - 'TRY' => - array ( - 0 => 'TRY', - ), - 'TTD' => - array ( - 0 => 'TTD', - ), - 'TWD' => - array ( - 0 => 'NT$', - 1 => 2, - 2 => 0, - ), - 'TZS' => - array ( - 0 => 'TZS', - 1 => 2, - 2 => 0, - ), - 'UAH' => - array ( - 0 => 'UAH', - ), - 'UAK' => - array ( - 0 => 'UAK', - ), - 'UGS' => - array ( - 0 => 'UGS', - ), - 'UGX' => - array ( - 0 => 'UGX', - 1 => 0, - 2 => 0, - ), - 'USD' => - array ( - 0 => '$', - ), - 'USN' => - array ( - 0 => 'USN', - ), - 'USS' => - array ( - 0 => 'USS', - ), - 'UYI' => - array ( - 0 => 'UYI', - 1 => 0, - 2 => 0, - ), - 'UYP' => - array ( - 0 => 'UYP', - ), - 'UYU' => - array ( - 0 => 'UYU', - ), - 'UYW' => - array ( - 0 => 'UYW', - 1 => 4, - 2 => 0, - ), - 'UZS' => - array ( - 0 => 'UZS', - 1 => 2, - 2 => 0, - ), - 'VEB' => - array ( - 0 => 'VEB', - ), - 'VED' => - array ( - 0 => 'VED', - ), - 'VEF' => - array ( - 0 => 'VEF', - 1 => 2, - 2 => 0, - ), - 'VES' => - array ( - 0 => 'VES', - ), - 'VND' => - array ( - 0 => '₫', - 1 => 0, - 2 => 0, - ), - 'VNN' => - array ( - 0 => 'VNN', - ), - 'VUV' => - array ( - 0 => 'VUV', - 1 => 0, - 2 => 0, - ), - 'WST' => - array ( - 0 => 'WST', - ), - 'XAF' => - array ( - 0 => 'FCFA', - 1 => 0, - 2 => 0, - ), - 'XCD' => - array ( - 0 => 'EC$', - ), - 'XEU' => - array ( - 0 => 'XEU', - ), - 'XFO' => - array ( - 0 => 'XFO', - ), - 'XFU' => - array ( - 0 => 'XFU', - ), - 'XOF' => - array ( - 0 => 'F CFA', - 1 => 0, - 2 => 0, - ), - 'XPF' => - array ( - 0 => 'CFPF', - 1 => 0, - 2 => 0, - ), - 'XRE' => - array ( - 0 => 'XRE', - ), - 'YDD' => - array ( - 0 => 'YDD', - ), - 'YER' => - array ( - 0 => 'YER', - 1 => 0, - 2 => 0, - ), - 'YUD' => - array ( - 0 => 'YUD', - ), - 'YUM' => - array ( - 0 => 'YUM', - ), - 'YUN' => - array ( - 0 => 'YUN', - ), - 'YUR' => - array ( - 0 => 'YUR', - ), - 'ZAL' => - array ( - 0 => 'ZAL', - ), - 'ZAR' => - array ( - 0 => 'ZAR', - ), - 'ZMK' => - array ( - 0 => 'ZMK', - 1 => 0, - 2 => 0, - ), - 'ZMW' => - array ( - 0 => 'ZMW', - ), - 'ZRN' => - array ( - 0 => 'ZRN', - ), - 'ZRZ' => - array ( - 0 => 'ZRZ', - ), - 'ZWD' => - array ( - 0 => 'ZWD', - 1 => 0, - 2 => 0, - ), - 'ZWL' => - array ( - 0 => 'ZWL', - ), - 'ZWR' => - array ( - 0 => 'ZWR', - ), - 'DEFAULT' => - array ( - 1 => 2, - 2 => 0, - ), -); diff --git a/lib/symfony/polyfill-intl-icu/Resources/stubs/Collator.php b/lib/symfony/polyfill-intl-icu/Resources/stubs/Collator.php deleted file mode 100644 index a1efbcb80..000000000 --- a/lib/symfony/polyfill-intl-icu/Resources/stubs/Collator.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\Collator as CollatorPolyfill; - -/** - * Stub implementation for the Collator class of the intl extension. - * - * @author Bernhard Schussek - */ -class Collator extends CollatorPolyfill -{ -} diff --git a/lib/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php b/lib/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php deleted file mode 100644 index e7012008e..000000000 --- a/lib/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\IntlDateFormatter as IntlDateFormatterPolyfill; - -/** - * Stub implementation for the IntlDateFormatter class of the intl extension. - * - * @author Bernhard Schussek - */ -class IntlDateFormatter extends IntlDateFormatterPolyfill -{ -} diff --git a/lib/symfony/polyfill-intl-icu/Resources/stubs/Locale.php b/lib/symfony/polyfill-intl-icu/Resources/stubs/Locale.php deleted file mode 100644 index f1b951e13..000000000 --- a/lib/symfony/polyfill-intl-icu/Resources/stubs/Locale.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\Locale as LocalePolyfill; - -/** - * Stub implementation for the Locale class of the intl extension. - * - * @author Bernhard Schussek - */ -class Locale extends LocalePolyfill -{ -} diff --git a/lib/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php b/lib/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php deleted file mode 100644 index 9288b9dd6..000000000 --- a/lib/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\NumberFormatter as NumberFormatterPolyfill; - -/** - * Stub implementation for the NumberFormatter class of the intl extension. - * - * @author Bernhard Schussek - * - * @see IntlNumberFormatter - */ -class NumberFormatter extends NumberFormatterPolyfill -{ -} diff --git a/lib/symfony/polyfill-intl-icu/bootstrap.php b/lib/symfony/polyfill-intl-icu/bootstrap.php deleted file mode 100644 index 77d754379..000000000 --- a/lib/symfony/polyfill-intl-icu/bootstrap.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu as p; - -if (extension_loaded('intl')) { - return; -} - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('intl_is_failure')) { - function intl_is_failure($errorCode) { return p\Icu::isFailure($errorCode); } -} -if (!function_exists('intl_get_error_code')) { - function intl_get_error_code() { return p\Icu::getErrorCode(); } -} -if (!function_exists('intl_get_error_message')) { - function intl_get_error_message() { return p\Icu::getErrorMessage(); } -} -if (!function_exists('intl_error_name')) { - function intl_error_name($errorCode) { return p\Icu::getErrorName($errorCode); } -} diff --git a/lib/symfony/polyfill-intl-icu/bootstrap80.php b/lib/symfony/polyfill-intl-icu/bootstrap80.php deleted file mode 100644 index ee1653a38..000000000 --- a/lib/symfony/polyfill-intl-icu/bootstrap80.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu as p; - -if (!function_exists('intl_is_failure')) { - function intl_is_failure(?int $errorCode): bool { return p\Icu::isFailure((int) $errorCode); } -} -if (!function_exists('intl_get_error_code')) { - function intl_get_error_code(): int { return p\Icu::getErrorCode(); } -} -if (!function_exists('intl_get_error_message')) { - function intl_get_error_message(): string { return p\Icu::getErrorMessage(); } -} -if (!function_exists('intl_error_name')) { - function intl_error_name(?int $errorCode): string { return p\Icu::getErrorName((int) $errorCode); } -} diff --git a/lib/symfony/polyfill-intl-icu/composer.json b/lib/symfony/polyfill-intl-icu/composer.json deleted file mode 100644 index 761d80a69..000000000 --- a/lib/symfony/polyfill-intl-icu/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/polyfill-intl-icu", - "type": "library", - "description": "Symfony polyfill for intl's ICU-related data and classes", - "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "icu"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "files": [ "bootstrap.php" ], - "psr-4": { "Symfony\\Polyfill\\Intl\\Icu\\": "" }, - "classmap": [ "Resources/stubs" ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "suggest": { - "ext-intl": "For best performance and support of other locales than \"en\"" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-intl-idn/Idn.php b/lib/symfony/polyfill-intl-idn/Idn.php deleted file mode 100644 index fee3026df..000000000 --- a/lib/symfony/polyfill-intl-idn/Idn.php +++ /dev/null @@ -1,925 +0,0 @@ - and Trevor Rowbotham - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Idn; - -use Exception; -use Normalizer; -use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; -use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; - -/** - * @see https://www.unicode.org/reports/tr46/ - * - * @internal - */ -final class Idn -{ - public const ERROR_EMPTY_LABEL = 1; - public const ERROR_LABEL_TOO_LONG = 2; - public const ERROR_DOMAIN_NAME_TOO_LONG = 4; - public const ERROR_LEADING_HYPHEN = 8; - public const ERROR_TRAILING_HYPHEN = 0x10; - public const ERROR_HYPHEN_3_4 = 0x20; - public const ERROR_LEADING_COMBINING_MARK = 0x40; - public const ERROR_DISALLOWED = 0x80; - public const ERROR_PUNYCODE = 0x100; - public const ERROR_LABEL_HAS_DOT = 0x200; - public const ERROR_INVALID_ACE_LABEL = 0x400; - public const ERROR_BIDI = 0x800; - public const ERROR_CONTEXTJ = 0x1000; - public const ERROR_CONTEXTO_PUNCTUATION = 0x2000; - public const ERROR_CONTEXTO_DIGITS = 0x4000; - - public const INTL_IDNA_VARIANT_2003 = 0; - public const INTL_IDNA_VARIANT_UTS46 = 1; - - public const IDNA_DEFAULT = 0; - public const IDNA_ALLOW_UNASSIGNED = 1; - public const IDNA_USE_STD3_RULES = 2; - public const IDNA_CHECK_BIDI = 4; - public const IDNA_CHECK_CONTEXTJ = 8; - public const IDNA_NONTRANSITIONAL_TO_ASCII = 16; - public const IDNA_NONTRANSITIONAL_TO_UNICODE = 32; - - public const MAX_DOMAIN_SIZE = 253; - public const MAX_LABEL_SIZE = 63; - - public const BASE = 36; - public const TMIN = 1; - public const TMAX = 26; - public const SKEW = 38; - public const DAMP = 700; - public const INITIAL_BIAS = 72; - public const INITIAL_N = 128; - public const DELIMITER = '-'; - public const MAX_INT = 2147483647; - - /** - * Contains the numeric value of a basic code point (for use in representing integers) in the - * range 0 to BASE-1, or -1 if b is does not represent a value. - * - * @var array - */ - private static $basicToDigit = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, - - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, - - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - ]; - - /** - * @var array - */ - private static $virama; - - /** - * @var array - */ - private static $mapped; - - /** - * @var array - */ - private static $ignored; - - /** - * @var array - */ - private static $deviation; - - /** - * @var array - */ - private static $disallowed; - - /** - * @var array - */ - private static $disallowed_STD3_mapped; - - /** - * @var array - */ - private static $disallowed_STD3_valid; - - /** - * @var bool - */ - private static $mappingTableLoaded = false; - - /** - * @see https://www.unicode.org/reports/tr46/#ToASCII - * - * @param string $domainName - * @param int $options - * @param int $variant - * @param array $idna_info - * - * @return string|false - */ - public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) - { - if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { - @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); - } - - $options = [ - 'CheckHyphens' => true, - 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), - 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), - 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), - 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII), - 'VerifyDnsLength' => true, - ]; - $info = new Info(); - $labels = self::process((string) $domainName, $options, $info); - - foreach ($labels as $i => $label) { - // Only convert labels to punycode that contain non-ASCII code points - if (1 === preg_match('/[^\x00-\x7F]/', $label)) { - try { - $label = 'xn--'.self::punycodeEncode($label); - } catch (Exception $e) { - $info->errors |= self::ERROR_PUNYCODE; - } - - $labels[$i] = $label; - } - } - - if ($options['VerifyDnsLength']) { - self::validateDomainAndLabelLength($labels, $info); - } - - $idna_info = [ - 'result' => implode('.', $labels), - 'isTransitionalDifferent' => $info->transitionalDifferent, - 'errors' => $info->errors, - ]; - - return 0 === $info->errors ? $idna_info['result'] : false; - } - - /** - * @see https://www.unicode.org/reports/tr46/#ToUnicode - * - * @param string $domainName - * @param int $options - * @param int $variant - * @param array $idna_info - * - * @return string|false - */ - public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) - { - if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { - @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); - } - - $info = new Info(); - $labels = self::process((string) $domainName, [ - 'CheckHyphens' => true, - 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), - 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), - 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), - 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_UNICODE), - ], $info); - $idna_info = [ - 'result' => implode('.', $labels), - 'isTransitionalDifferent' => $info->transitionalDifferent, - 'errors' => $info->errors, - ]; - - return 0 === $info->errors ? $idna_info['result'] : false; - } - - /** - * @param string $label - * - * @return bool - */ - private static function isValidContextJ(array $codePoints, $label) - { - if (!isset(self::$virama)) { - self::$virama = require __DIR__.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'unidata'.\DIRECTORY_SEPARATOR.'virama.php'; - } - - $offset = 0; - - foreach ($codePoints as $i => $codePoint) { - if (0x200C !== $codePoint && 0x200D !== $codePoint) { - continue; - } - - if (!isset($codePoints[$i - 1])) { - return false; - } - - // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True; - if (isset(self::$virama[$codePoints[$i - 1]])) { - continue; - } - - // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then - // True; - // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}] - if (0x200C === $codePoint && 1 === preg_match(Regex::ZWNJ, $label, $matches, \PREG_OFFSET_CAPTURE, $offset)) { - $offset += \strlen($matches[1][0]); - - continue; - } - - return false; - } - - return true; - } - - /** - * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap - * - * @param string $input - * @param array $options - * - * @return string - */ - private static function mapCodePoints($input, array $options, Info $info) - { - $str = ''; - $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; - $transitional = $options['Transitional_Processing']; - - foreach (self::utf8Decode($input) as $codePoint) { - $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); - - switch ($data['status']) { - case 'disallowed': - $info->errors |= self::ERROR_DISALLOWED; - - // no break. - - case 'valid': - $str .= mb_chr($codePoint, 'utf-8'); - - break; - - case 'ignored': - // Do nothing. - break; - - case 'mapped': - $str .= $data['mapping']; - - break; - - case 'deviation': - $info->transitionalDifferent = true; - $str .= ($transitional ? $data['mapping'] : mb_chr($codePoint, 'utf-8')); - - break; - } - } - - return $str; - } - - /** - * @see https://www.unicode.org/reports/tr46/#Processing - * - * @param string $domain - * @param array $options - * - * @return array - */ - private static function process($domain, array $options, Info $info) - { - // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and - // we need to respect the VerifyDnsLength option. - $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength']; - - if ($checkForEmptyLabels && '' === $domain) { - $info->errors |= self::ERROR_EMPTY_LABEL; - - return [$domain]; - } - - // Step 1. Map each code point in the domain name string - $domain = self::mapCodePoints($domain, $options, $info); - - // Step 2. Normalize the domain name string to Unicode Normalization Form C. - if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) { - $domain = Normalizer::normalize($domain, Normalizer::FORM_C); - } - - // Step 3. Break the string into labels at U+002E (.) FULL STOP. - $labels = explode('.', $domain); - $lastLabelIndex = \count($labels) - 1; - - // Step 4. Convert and validate each label in the domain name string. - foreach ($labels as $i => $label) { - $validationOptions = $options; - - if ('xn--' === substr($label, 0, 4)) { - try { - $label = self::punycodeDecode(substr($label, 4)); - } catch (Exception $e) { - $info->errors |= self::ERROR_PUNYCODE; - - continue; - } - - $validationOptions['Transitional_Processing'] = false; - $labels[$i] = $label; - } - - self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex); - } - - if ($info->bidiDomain && !$info->validBidiDomain) { - $info->errors |= self::ERROR_BIDI; - } - - // Any input domain name string that does not record an error has been successfully - // processed according to this specification. Conversely, if an input domain_name string - // causes an error, then the processing of the input domain_name string fails. Determining - // what to do with error input is up to the caller, and not in the scope of this document. - return $labels; - } - - /** - * @see https://tools.ietf.org/html/rfc5893#section-2 - * - * @param string $label - */ - private static function validateBidiLabel($label, Info $info) - { - if (1 === preg_match(Regex::RTL_LABEL, $label)) { - $info->bidiDomain = true; - - // Step 1. The first character must be a character with Bidi property L, R, or AL. - // If it has the R or AL property, it is an RTL label - if (1 !== preg_match(Regex::BIDI_STEP_1_RTL, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES, - // CS, ET, ON, BN, or NSM are allowed. - if (1 === preg_match(Regex::BIDI_STEP_2, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 3. In an RTL label, the end of the label must be a character with Bidi property - // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM. - if (1 !== preg_match(Regex::BIDI_STEP_3, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa. - if (1 === preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === preg_match(Regex::BIDI_STEP_4_EN, $label)) { - $info->validBidiDomain = false; - - return; - } - - return; - } - - // We are a LTR label - // Step 1. The first character must be a character with Bidi property L, R, or AL. - // If it has the L property, it is an LTR label. - if (1 !== preg_match(Regex::BIDI_STEP_1_LTR, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 5. In an LTR label, only characters with the Bidi properties L, EN, - // ES, CS, ET, ON, BN, or NSM are allowed. - if (1 === preg_match(Regex::BIDI_STEP_5, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or - // EN, followed by zero or more characters with Bidi property NSM. - if (1 !== preg_match(Regex::BIDI_STEP_6, $label)) { - $info->validBidiDomain = false; - - return; - } - } - - /** - * @param array $labels - */ - private static function validateDomainAndLabelLength(array $labels, Info $info) - { - $maxDomainSize = self::MAX_DOMAIN_SIZE; - $length = \count($labels); - - // Number of "." delimiters. - $domainLength = $length - 1; - - // If the last label is empty and it is not the first label, then it is the root label. - // Increase the max size by 1, making it 254, to account for the root label's "." - // delimiter. This also means we don't need to check the last label's length for being too - // long. - if ($length > 1 && '' === $labels[$length - 1]) { - ++$maxDomainSize; - --$length; - } - - for ($i = 0; $i < $length; ++$i) { - $bytes = \strlen($labels[$i]); - $domainLength += $bytes; - - if ($bytes > self::MAX_LABEL_SIZE) { - $info->errors |= self::ERROR_LABEL_TOO_LONG; - } - } - - if ($domainLength > $maxDomainSize) { - $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG; - } - } - - /** - * @see https://www.unicode.org/reports/tr46/#Validity_Criteria - * - * @param string $label - * @param array $options - * @param bool $canBeEmpty - */ - private static function validateLabel($label, Info $info, array $options, $canBeEmpty) - { - if ('' === $label) { - if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) { - $info->errors |= self::ERROR_EMPTY_LABEL; - } - - return; - } - - // Step 1. The label must be in Unicode Normalization Form C. - if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) { - $info->errors |= self::ERROR_INVALID_ACE_LABEL; - } - - $codePoints = self::utf8Decode($label); - - if ($options['CheckHyphens']) { - // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character - // in both the thrid and fourth positions. - if (isset($codePoints[2], $codePoints[3]) && 0x002D === $codePoints[2] && 0x002D === $codePoints[3]) { - $info->errors |= self::ERROR_HYPHEN_3_4; - } - - // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D - // HYPHEN-MINUS character. - if ('-' === substr($label, 0, 1)) { - $info->errors |= self::ERROR_LEADING_HYPHEN; - } - - if ('-' === substr($label, -1, 1)) { - $info->errors |= self::ERROR_TRAILING_HYPHEN; - } - } - - // Step 4. The label must not contain a U+002E (.) FULL STOP. - if (false !== strpos($label, '.')) { - $info->errors |= self::ERROR_LABEL_HAS_DOT; - } - - // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark. - if (1 === preg_match(Regex::COMBINING_MARK, $label)) { - $info->errors |= self::ERROR_LEADING_COMBINING_MARK; - } - - // Step 6. Each code point in the label must only have certain status values according to - // Section 5, IDNA Mapping Table: - $transitional = $options['Transitional_Processing']; - $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; - - foreach ($codePoints as $codePoint) { - $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); - $status = $data['status']; - - if ('valid' === $status || (!$transitional && 'deviation' === $status)) { - continue; - } - - $info->errors |= self::ERROR_DISALLOWED; - - break; - } - - // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in - // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA) - // [IDNA2008]. - if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) { - $info->errors |= self::ERROR_CONTEXTJ; - } - - // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must - // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2. - if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) { - self::validateBidiLabel($label, $info); - } - } - - /** - * @see https://tools.ietf.org/html/rfc3492#section-6.2 - * - * @param string $input - * - * @return string - */ - private static function punycodeDecode($input) - { - $n = self::INITIAL_N; - $out = 0; - $i = 0; - $bias = self::INITIAL_BIAS; - $lastDelimIndex = strrpos($input, self::DELIMITER); - $b = false === $lastDelimIndex ? 0 : $lastDelimIndex; - $inputLength = \strlen($input); - $output = []; - $bytes = array_map('ord', str_split($input)); - - for ($j = 0; $j < $b; ++$j) { - if ($bytes[$j] > 0x7F) { - throw new Exception('Invalid input'); - } - - $output[$out++] = $input[$j]; - } - - if ($b > 0) { - ++$b; - } - - for ($in = $b; $in < $inputLength; ++$out) { - $oldi = $i; - $w = 1; - - for ($k = self::BASE; /* no condition */; $k += self::BASE) { - if ($in >= $inputLength) { - throw new Exception('Invalid input'); - } - - $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; - - if ($digit < 0) { - throw new Exception('Invalid input'); - } - - if ($digit > intdiv(self::MAX_INT - $i, $w)) { - throw new Exception('Integer overflow'); - } - - $i += $digit * $w; - - if ($k <= $bias) { - $t = self::TMIN; - } elseif ($k >= $bias + self::TMAX) { - $t = self::TMAX; - } else { - $t = $k - $bias; - } - - if ($digit < $t) { - break; - } - - $baseMinusT = self::BASE - $t; - - if ($w > intdiv(self::MAX_INT, $baseMinusT)) { - throw new Exception('Integer overflow'); - } - - $w *= $baseMinusT; - } - - $outPlusOne = $out + 1; - $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); - - if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { - throw new Exception('Integer overflow'); - } - - $n += intdiv($i, $outPlusOne); - $i %= $outPlusOne; - array_splice($output, $i++, 0, [mb_chr($n, 'utf-8')]); - } - - return implode('', $output); - } - - /** - * @see https://tools.ietf.org/html/rfc3492#section-6.3 - * - * @param string $input - * - * @return string - */ - private static function punycodeEncode($input) - { - $n = self::INITIAL_N; - $delta = 0; - $out = 0; - $bias = self::INITIAL_BIAS; - $inputLength = 0; - $output = ''; - $iter = self::utf8Decode($input); - - foreach ($iter as $codePoint) { - ++$inputLength; - - if ($codePoint < 0x80) { - $output .= \chr($codePoint); - ++$out; - } - } - - $h = $out; - $b = $out; - - if ($b > 0) { - $output .= self::DELIMITER; - ++$out; - } - - while ($h < $inputLength) { - $m = self::MAX_INT; - - foreach ($iter as $codePoint) { - if ($codePoint >= $n && $codePoint < $m) { - $m = $codePoint; - } - } - - if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { - throw new Exception('Integer overflow'); - } - - $delta += ($m - $n) * ($h + 1); - $n = $m; - - foreach ($iter as $codePoint) { - if ($codePoint < $n && 0 === ++$delta) { - throw new Exception('Integer overflow'); - } - - if ($codePoint === $n) { - $q = $delta; - - for ($k = self::BASE; /* no condition */; $k += self::BASE) { - if ($k <= $bias) { - $t = self::TMIN; - } elseif ($k >= $bias + self::TMAX) { - $t = self::TMAX; - } else { - $t = $k - $bias; - } - - if ($q < $t) { - break; - } - - $qMinusT = $q - $t; - $baseMinusT = self::BASE - $t; - $output .= self::encodeDigit($t + ($qMinusT) % ($baseMinusT), false); - ++$out; - $q = intdiv($qMinusT, $baseMinusT); - } - - $output .= self::encodeDigit($q, false); - ++$out; - $bias = self::adaptBias($delta, $h + 1, $h === $b); - $delta = 0; - ++$h; - } - } - - ++$delta; - ++$n; - } - - return $output; - } - - /** - * @see https://tools.ietf.org/html/rfc3492#section-6.1 - * - * @param int $delta - * @param int $numPoints - * @param bool $firstTime - * - * @return int - */ - private static function adaptBias($delta, $numPoints, $firstTime) - { - // xxx >> 1 is a faster way of doing intdiv(xxx, 2) - $delta = $firstTime ? intdiv($delta, self::DAMP) : $delta >> 1; - $delta += intdiv($delta, $numPoints); - $k = 0; - - while ($delta > ((self::BASE - self::TMIN) * self::TMAX) >> 1) { - $delta = intdiv($delta, self::BASE - self::TMIN); - $k += self::BASE; - } - - return $k + intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW); - } - - /** - * @param int $d - * @param bool $flag - * - * @return string - */ - private static function encodeDigit($d, $flag) - { - return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5)); - } - - /** - * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any - * invalid byte sequences will be replaced by a U+FFFD replacement code point. - * - * @see https://encoding.spec.whatwg.org/#utf-8-decoder - * - * @param string $input - * - * @return array - */ - private static function utf8Decode($input) - { - $bytesSeen = 0; - $bytesNeeded = 0; - $lowerBoundary = 0x80; - $upperBoundary = 0xBF; - $codePoint = 0; - $codePoints = []; - $length = \strlen($input); - - for ($i = 0; $i < $length; ++$i) { - $byte = \ord($input[$i]); - - if (0 === $bytesNeeded) { - if ($byte >= 0x00 && $byte <= 0x7F) { - $codePoints[] = $byte; - - continue; - } - - if ($byte >= 0xC2 && $byte <= 0xDF) { - $bytesNeeded = 1; - $codePoint = $byte & 0x1F; - } elseif ($byte >= 0xE0 && $byte <= 0xEF) { - if (0xE0 === $byte) { - $lowerBoundary = 0xA0; - } elseif (0xED === $byte) { - $upperBoundary = 0x9F; - } - - $bytesNeeded = 2; - $codePoint = $byte & 0xF; - } elseif ($byte >= 0xF0 && $byte <= 0xF4) { - if (0xF0 === $byte) { - $lowerBoundary = 0x90; - } elseif (0xF4 === $byte) { - $upperBoundary = 0x8F; - } - - $bytesNeeded = 3; - $codePoint = $byte & 0x7; - } else { - $codePoints[] = 0xFFFD; - } - - continue; - } - - if ($byte < $lowerBoundary || $byte > $upperBoundary) { - $codePoint = 0; - $bytesNeeded = 0; - $bytesSeen = 0; - $lowerBoundary = 0x80; - $upperBoundary = 0xBF; - --$i; - $codePoints[] = 0xFFFD; - - continue; - } - - $lowerBoundary = 0x80; - $upperBoundary = 0xBF; - $codePoint = ($codePoint << 6) | ($byte & 0x3F); - - if (++$bytesSeen !== $bytesNeeded) { - continue; - } - - $codePoints[] = $codePoint; - $codePoint = 0; - $bytesNeeded = 0; - $bytesSeen = 0; - } - - // String unexpectedly ended, so append a U+FFFD code point. - if (0 !== $bytesNeeded) { - $codePoints[] = 0xFFFD; - } - - return $codePoints; - } - - /** - * @param int $codePoint - * @param bool $useSTD3ASCIIRules - * - * @return array{status: string, mapping?: string} - */ - private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules) - { - if (!self::$mappingTableLoaded) { - self::$mappingTableLoaded = true; - self::$mapped = require __DIR__.'/Resources/unidata/mapped.php'; - self::$ignored = require __DIR__.'/Resources/unidata/ignored.php'; - self::$deviation = require __DIR__.'/Resources/unidata/deviation.php'; - self::$disallowed = require __DIR__.'/Resources/unidata/disallowed.php'; - self::$disallowed_STD3_mapped = require __DIR__.'/Resources/unidata/disallowed_STD3_mapped.php'; - self::$disallowed_STD3_valid = require __DIR__.'/Resources/unidata/disallowed_STD3_valid.php'; - } - - if (isset(self::$mapped[$codePoint])) { - return ['status' => 'mapped', 'mapping' => self::$mapped[$codePoint]]; - } - - if (isset(self::$ignored[$codePoint])) { - return ['status' => 'ignored']; - } - - if (isset(self::$deviation[$codePoint])) { - return ['status' => 'deviation', 'mapping' => self::$deviation[$codePoint]]; - } - - if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) { - return ['status' => 'disallowed']; - } - - $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]); - - if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) { - $status = 'disallowed'; - - if (!$useSTD3ASCIIRules) { - $status = $isDisallowedMapped ? 'mapped' : 'valid'; - } - - if ($isDisallowedMapped) { - return ['status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]]; - } - - return ['status' => $status]; - } - - return ['status' => 'valid']; - } -} diff --git a/lib/symfony/polyfill-intl-idn/Info.php b/lib/symfony/polyfill-intl-idn/Info.php deleted file mode 100644 index 25c3582b2..000000000 --- a/lib/symfony/polyfill-intl-idn/Info.php +++ /dev/null @@ -1,23 +0,0 @@ - and Trevor Rowbotham - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Idn; - -/** - * @internal - */ -class Info -{ - public $bidiDomain = false; - public $errors = 0; - public $validBidiDomain = true; - public $transitionalDifferent = false; -} diff --git a/lib/symfony/polyfill-intl-idn/LICENSE b/lib/symfony/polyfill-intl-idn/LICENSE deleted file mode 100644 index 03c5e2577..000000000 --- a/lib/symfony/polyfill-intl-idn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-intl-idn/README.md b/lib/symfony/polyfill-intl-idn/README.md deleted file mode 100644 index cae551705..000000000 --- a/lib/symfony/polyfill-intl-idn/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Symfony Polyfill / Intl: Idn -============================ - -This component provides [`idn_to_ascii`](https://php.net/idn-to-ascii) and [`idn_to_utf8`](https://php.net/idn-to-utf8) functions to users who run php versions without the [Intl](https://php.net/intl) extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php deleted file mode 100644 index 5bb70e48a..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php +++ /dev/null @@ -1,375 +0,0 @@ -= 128 && $codePoint <= 159) { - return true; - } - - if ($codePoint >= 2155 && $codePoint <= 2207) { - return true; - } - - if ($codePoint >= 3676 && $codePoint <= 3712) { - return true; - } - - if ($codePoint >= 3808 && $codePoint <= 3839) { - return true; - } - - if ($codePoint >= 4059 && $codePoint <= 4095) { - return true; - } - - if ($codePoint >= 4256 && $codePoint <= 4293) { - return true; - } - - if ($codePoint >= 6849 && $codePoint <= 6911) { - return true; - } - - if ($codePoint >= 11859 && $codePoint <= 11903) { - return true; - } - - if ($codePoint >= 42955 && $codePoint <= 42996) { - return true; - } - - if ($codePoint >= 55296 && $codePoint <= 57343) { - return true; - } - - if ($codePoint >= 57344 && $codePoint <= 63743) { - return true; - } - - if ($codePoint >= 64218 && $codePoint <= 64255) { - return true; - } - - if ($codePoint >= 64976 && $codePoint <= 65007) { - return true; - } - - if ($codePoint >= 65630 && $codePoint <= 65663) { - return true; - } - - if ($codePoint >= 65953 && $codePoint <= 65999) { - return true; - } - - if ($codePoint >= 66046 && $codePoint <= 66175) { - return true; - } - - if ($codePoint >= 66518 && $codePoint <= 66559) { - return true; - } - - if ($codePoint >= 66928 && $codePoint <= 67071) { - return true; - } - - if ($codePoint >= 67432 && $codePoint <= 67583) { - return true; - } - - if ($codePoint >= 67760 && $codePoint <= 67807) { - return true; - } - - if ($codePoint >= 67904 && $codePoint <= 67967) { - return true; - } - - if ($codePoint >= 68256 && $codePoint <= 68287) { - return true; - } - - if ($codePoint >= 68528 && $codePoint <= 68607) { - return true; - } - - if ($codePoint >= 68681 && $codePoint <= 68735) { - return true; - } - - if ($codePoint >= 68922 && $codePoint <= 69215) { - return true; - } - - if ($codePoint >= 69298 && $codePoint <= 69375) { - return true; - } - - if ($codePoint >= 69466 && $codePoint <= 69551) { - return true; - } - - if ($codePoint >= 70207 && $codePoint <= 70271) { - return true; - } - - if ($codePoint >= 70517 && $codePoint <= 70655) { - return true; - } - - if ($codePoint >= 70874 && $codePoint <= 71039) { - return true; - } - - if ($codePoint >= 71134 && $codePoint <= 71167) { - return true; - } - - if ($codePoint >= 71370 && $codePoint <= 71423) { - return true; - } - - if ($codePoint >= 71488 && $codePoint <= 71679) { - return true; - } - - if ($codePoint >= 71740 && $codePoint <= 71839) { - return true; - } - - if ($codePoint >= 72026 && $codePoint <= 72095) { - return true; - } - - if ($codePoint >= 72441 && $codePoint <= 72703) { - return true; - } - - if ($codePoint >= 72887 && $codePoint <= 72959) { - return true; - } - - if ($codePoint >= 73130 && $codePoint <= 73439) { - return true; - } - - if ($codePoint >= 73465 && $codePoint <= 73647) { - return true; - } - - if ($codePoint >= 74650 && $codePoint <= 74751) { - return true; - } - - if ($codePoint >= 75076 && $codePoint <= 77823) { - return true; - } - - if ($codePoint >= 78905 && $codePoint <= 82943) { - return true; - } - - if ($codePoint >= 83527 && $codePoint <= 92159) { - return true; - } - - if ($codePoint >= 92784 && $codePoint <= 92879) { - return true; - } - - if ($codePoint >= 93072 && $codePoint <= 93759) { - return true; - } - - if ($codePoint >= 93851 && $codePoint <= 93951) { - return true; - } - - if ($codePoint >= 94112 && $codePoint <= 94175) { - return true; - } - - if ($codePoint >= 101590 && $codePoint <= 101631) { - return true; - } - - if ($codePoint >= 101641 && $codePoint <= 110591) { - return true; - } - - if ($codePoint >= 110879 && $codePoint <= 110927) { - return true; - } - - if ($codePoint >= 111356 && $codePoint <= 113663) { - return true; - } - - if ($codePoint >= 113828 && $codePoint <= 118783) { - return true; - } - - if ($codePoint >= 119366 && $codePoint <= 119519) { - return true; - } - - if ($codePoint >= 119673 && $codePoint <= 119807) { - return true; - } - - if ($codePoint >= 121520 && $codePoint <= 122879) { - return true; - } - - if ($codePoint >= 122923 && $codePoint <= 123135) { - return true; - } - - if ($codePoint >= 123216 && $codePoint <= 123583) { - return true; - } - - if ($codePoint >= 123648 && $codePoint <= 124927) { - return true; - } - - if ($codePoint >= 125143 && $codePoint <= 125183) { - return true; - } - - if ($codePoint >= 125280 && $codePoint <= 126064) { - return true; - } - - if ($codePoint >= 126133 && $codePoint <= 126208) { - return true; - } - - if ($codePoint >= 126270 && $codePoint <= 126463) { - return true; - } - - if ($codePoint >= 126652 && $codePoint <= 126703) { - return true; - } - - if ($codePoint >= 126706 && $codePoint <= 126975) { - return true; - } - - if ($codePoint >= 127406 && $codePoint <= 127461) { - return true; - } - - if ($codePoint >= 127590 && $codePoint <= 127743) { - return true; - } - - if ($codePoint >= 129202 && $codePoint <= 129279) { - return true; - } - - if ($codePoint >= 129751 && $codePoint <= 129791) { - return true; - } - - if ($codePoint >= 129995 && $codePoint <= 130031) { - return true; - } - - if ($codePoint >= 130042 && $codePoint <= 131069) { - return true; - } - - if ($codePoint >= 173790 && $codePoint <= 173823) { - return true; - } - - if ($codePoint >= 191457 && $codePoint <= 194559) { - return true; - } - - if ($codePoint >= 195102 && $codePoint <= 196605) { - return true; - } - - if ($codePoint >= 201547 && $codePoint <= 262141) { - return true; - } - - if ($codePoint >= 262144 && $codePoint <= 327677) { - return true; - } - - if ($codePoint >= 327680 && $codePoint <= 393213) { - return true; - } - - if ($codePoint >= 393216 && $codePoint <= 458749) { - return true; - } - - if ($codePoint >= 458752 && $codePoint <= 524285) { - return true; - } - - if ($codePoint >= 524288 && $codePoint <= 589821) { - return true; - } - - if ($codePoint >= 589824 && $codePoint <= 655357) { - return true; - } - - if ($codePoint >= 655360 && $codePoint <= 720893) { - return true; - } - - if ($codePoint >= 720896 && $codePoint <= 786429) { - return true; - } - - if ($codePoint >= 786432 && $codePoint <= 851965) { - return true; - } - - if ($codePoint >= 851968 && $codePoint <= 917501) { - return true; - } - - if ($codePoint >= 917536 && $codePoint <= 917631) { - return true; - } - - if ($codePoint >= 917632 && $codePoint <= 917759) { - return true; - } - - if ($codePoint >= 918000 && $codePoint <= 983037) { - return true; - } - - if ($codePoint >= 983040 && $codePoint <= 1048573) { - return true; - } - - if ($codePoint >= 1048576 && $codePoint <= 1114109) { - return true; - } - - return false; - } -} diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/Regex.php deleted file mode 100644 index 5c1c51dde..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/Regex.php +++ /dev/null @@ -1,24 +0,0 @@ - 'ss', - 962 => 'σ', - 8204 => '', - 8205 => '', -); diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php deleted file mode 100644 index 25a5f564d..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php +++ /dev/null @@ -1,2638 +0,0 @@ - true, - 889 => true, - 896 => true, - 897 => true, - 898 => true, - 899 => true, - 907 => true, - 909 => true, - 930 => true, - 1216 => true, - 1328 => true, - 1367 => true, - 1368 => true, - 1419 => true, - 1420 => true, - 1424 => true, - 1480 => true, - 1481 => true, - 1482 => true, - 1483 => true, - 1484 => true, - 1485 => true, - 1486 => true, - 1487 => true, - 1515 => true, - 1516 => true, - 1517 => true, - 1518 => true, - 1525 => true, - 1526 => true, - 1527 => true, - 1528 => true, - 1529 => true, - 1530 => true, - 1531 => true, - 1532 => true, - 1533 => true, - 1534 => true, - 1535 => true, - 1536 => true, - 1537 => true, - 1538 => true, - 1539 => true, - 1540 => true, - 1541 => true, - 1564 => true, - 1565 => true, - 1757 => true, - 1806 => true, - 1807 => true, - 1867 => true, - 1868 => true, - 1970 => true, - 1971 => true, - 1972 => true, - 1973 => true, - 1974 => true, - 1975 => true, - 1976 => true, - 1977 => true, - 1978 => true, - 1979 => true, - 1980 => true, - 1981 => true, - 1982 => true, - 1983 => true, - 2043 => true, - 2044 => true, - 2094 => true, - 2095 => true, - 2111 => true, - 2140 => true, - 2141 => true, - 2143 => true, - 2229 => true, - 2248 => true, - 2249 => true, - 2250 => true, - 2251 => true, - 2252 => true, - 2253 => true, - 2254 => true, - 2255 => true, - 2256 => true, - 2257 => true, - 2258 => true, - 2274 => true, - 2436 => true, - 2445 => true, - 2446 => true, - 2449 => true, - 2450 => true, - 2473 => true, - 2481 => true, - 2483 => true, - 2484 => true, - 2485 => true, - 2490 => true, - 2491 => true, - 2501 => true, - 2502 => true, - 2505 => true, - 2506 => true, - 2511 => true, - 2512 => true, - 2513 => true, - 2514 => true, - 2515 => true, - 2516 => true, - 2517 => true, - 2518 => true, - 2520 => true, - 2521 => true, - 2522 => true, - 2523 => true, - 2526 => true, - 2532 => true, - 2533 => true, - 2559 => true, - 2560 => true, - 2564 => true, - 2571 => true, - 2572 => true, - 2573 => true, - 2574 => true, - 2577 => true, - 2578 => true, - 2601 => true, - 2609 => true, - 2612 => true, - 2615 => true, - 2618 => true, - 2619 => true, - 2621 => true, - 2627 => true, - 2628 => true, - 2629 => true, - 2630 => true, - 2633 => true, - 2634 => true, - 2638 => true, - 2639 => true, - 2640 => true, - 2642 => true, - 2643 => true, - 2644 => true, - 2645 => true, - 2646 => true, - 2647 => true, - 2648 => true, - 2653 => true, - 2655 => true, - 2656 => true, - 2657 => true, - 2658 => true, - 2659 => true, - 2660 => true, - 2661 => true, - 2679 => true, - 2680 => true, - 2681 => true, - 2682 => true, - 2683 => true, - 2684 => true, - 2685 => true, - 2686 => true, - 2687 => true, - 2688 => true, - 2692 => true, - 2702 => true, - 2706 => true, - 2729 => true, - 2737 => true, - 2740 => true, - 2746 => true, - 2747 => true, - 2758 => true, - 2762 => true, - 2766 => true, - 2767 => true, - 2769 => true, - 2770 => true, - 2771 => true, - 2772 => true, - 2773 => true, - 2774 => true, - 2775 => true, - 2776 => true, - 2777 => true, - 2778 => true, - 2779 => true, - 2780 => true, - 2781 => true, - 2782 => true, - 2783 => true, - 2788 => true, - 2789 => true, - 2802 => true, - 2803 => true, - 2804 => true, - 2805 => true, - 2806 => true, - 2807 => true, - 2808 => true, - 2816 => true, - 2820 => true, - 2829 => true, - 2830 => true, - 2833 => true, - 2834 => true, - 2857 => true, - 2865 => true, - 2868 => true, - 2874 => true, - 2875 => true, - 2885 => true, - 2886 => true, - 2889 => true, - 2890 => true, - 2894 => true, - 2895 => true, - 2896 => true, - 2897 => true, - 2898 => true, - 2899 => true, - 2900 => true, - 2904 => true, - 2905 => true, - 2906 => true, - 2907 => true, - 2910 => true, - 2916 => true, - 2917 => true, - 2936 => true, - 2937 => true, - 2938 => true, - 2939 => true, - 2940 => true, - 2941 => true, - 2942 => true, - 2943 => true, - 2944 => true, - 2945 => true, - 2948 => true, - 2955 => true, - 2956 => true, - 2957 => true, - 2961 => true, - 2966 => true, - 2967 => true, - 2968 => true, - 2971 => true, - 2973 => true, - 2976 => true, - 2977 => true, - 2978 => true, - 2981 => true, - 2982 => true, - 2983 => true, - 2987 => true, - 2988 => true, - 2989 => true, - 3002 => true, - 3003 => true, - 3004 => true, - 3005 => true, - 3011 => true, - 3012 => true, - 3013 => true, - 3017 => true, - 3022 => true, - 3023 => true, - 3025 => true, - 3026 => true, - 3027 => true, - 3028 => true, - 3029 => true, - 3030 => true, - 3032 => true, - 3033 => true, - 3034 => true, - 3035 => true, - 3036 => true, - 3037 => true, - 3038 => true, - 3039 => true, - 3040 => true, - 3041 => true, - 3042 => true, - 3043 => true, - 3044 => true, - 3045 => true, - 3067 => true, - 3068 => true, - 3069 => true, - 3070 => true, - 3071 => true, - 3085 => true, - 3089 => true, - 3113 => true, - 3130 => true, - 3131 => true, - 3132 => true, - 3141 => true, - 3145 => true, - 3150 => true, - 3151 => true, - 3152 => true, - 3153 => true, - 3154 => true, - 3155 => true, - 3156 => true, - 3159 => true, - 3163 => true, - 3164 => true, - 3165 => true, - 3166 => true, - 3167 => true, - 3172 => true, - 3173 => true, - 3184 => true, - 3185 => true, - 3186 => true, - 3187 => true, - 3188 => true, - 3189 => true, - 3190 => true, - 3213 => true, - 3217 => true, - 3241 => true, - 3252 => true, - 3258 => true, - 3259 => true, - 3269 => true, - 3273 => true, - 3278 => true, - 3279 => true, - 3280 => true, - 3281 => true, - 3282 => true, - 3283 => true, - 3284 => true, - 3287 => true, - 3288 => true, - 3289 => true, - 3290 => true, - 3291 => true, - 3292 => true, - 3293 => true, - 3295 => true, - 3300 => true, - 3301 => true, - 3312 => true, - 3315 => true, - 3316 => true, - 3317 => true, - 3318 => true, - 3319 => true, - 3320 => true, - 3321 => true, - 3322 => true, - 3323 => true, - 3324 => true, - 3325 => true, - 3326 => true, - 3327 => true, - 3341 => true, - 3345 => true, - 3397 => true, - 3401 => true, - 3408 => true, - 3409 => true, - 3410 => true, - 3411 => true, - 3428 => true, - 3429 => true, - 3456 => true, - 3460 => true, - 3479 => true, - 3480 => true, - 3481 => true, - 3506 => true, - 3516 => true, - 3518 => true, - 3519 => true, - 3527 => true, - 3528 => true, - 3529 => true, - 3531 => true, - 3532 => true, - 3533 => true, - 3534 => true, - 3541 => true, - 3543 => true, - 3552 => true, - 3553 => true, - 3554 => true, - 3555 => true, - 3556 => true, - 3557 => true, - 3568 => true, - 3569 => true, - 3573 => true, - 3574 => true, - 3575 => true, - 3576 => true, - 3577 => true, - 3578 => true, - 3579 => true, - 3580 => true, - 3581 => true, - 3582 => true, - 3583 => true, - 3584 => true, - 3643 => true, - 3644 => true, - 3645 => true, - 3646 => true, - 3715 => true, - 3717 => true, - 3723 => true, - 3748 => true, - 3750 => true, - 3774 => true, - 3775 => true, - 3781 => true, - 3783 => true, - 3790 => true, - 3791 => true, - 3802 => true, - 3803 => true, - 3912 => true, - 3949 => true, - 3950 => true, - 3951 => true, - 3952 => true, - 3992 => true, - 4029 => true, - 4045 => true, - 4294 => true, - 4296 => true, - 4297 => true, - 4298 => true, - 4299 => true, - 4300 => true, - 4302 => true, - 4303 => true, - 4447 => true, - 4448 => true, - 4681 => true, - 4686 => true, - 4687 => true, - 4695 => true, - 4697 => true, - 4702 => true, - 4703 => true, - 4745 => true, - 4750 => true, - 4751 => true, - 4785 => true, - 4790 => true, - 4791 => true, - 4799 => true, - 4801 => true, - 4806 => true, - 4807 => true, - 4823 => true, - 4881 => true, - 4886 => true, - 4887 => true, - 4955 => true, - 4956 => true, - 4989 => true, - 4990 => true, - 4991 => true, - 5018 => true, - 5019 => true, - 5020 => true, - 5021 => true, - 5022 => true, - 5023 => true, - 5110 => true, - 5111 => true, - 5118 => true, - 5119 => true, - 5760 => true, - 5789 => true, - 5790 => true, - 5791 => true, - 5881 => true, - 5882 => true, - 5883 => true, - 5884 => true, - 5885 => true, - 5886 => true, - 5887 => true, - 5901 => true, - 5909 => true, - 5910 => true, - 5911 => true, - 5912 => true, - 5913 => true, - 5914 => true, - 5915 => true, - 5916 => true, - 5917 => true, - 5918 => true, - 5919 => true, - 5943 => true, - 5944 => true, - 5945 => true, - 5946 => true, - 5947 => true, - 5948 => true, - 5949 => true, - 5950 => true, - 5951 => true, - 5972 => true, - 5973 => true, - 5974 => true, - 5975 => true, - 5976 => true, - 5977 => true, - 5978 => true, - 5979 => true, - 5980 => true, - 5981 => true, - 5982 => true, - 5983 => true, - 5997 => true, - 6001 => true, - 6004 => true, - 6005 => true, - 6006 => true, - 6007 => true, - 6008 => true, - 6009 => true, - 6010 => true, - 6011 => true, - 6012 => true, - 6013 => true, - 6014 => true, - 6015 => true, - 6068 => true, - 6069 => true, - 6110 => true, - 6111 => true, - 6122 => true, - 6123 => true, - 6124 => true, - 6125 => true, - 6126 => true, - 6127 => true, - 6138 => true, - 6139 => true, - 6140 => true, - 6141 => true, - 6142 => true, - 6143 => true, - 6150 => true, - 6158 => true, - 6159 => true, - 6170 => true, - 6171 => true, - 6172 => true, - 6173 => true, - 6174 => true, - 6175 => true, - 6265 => true, - 6266 => true, - 6267 => true, - 6268 => true, - 6269 => true, - 6270 => true, - 6271 => true, - 6315 => true, - 6316 => true, - 6317 => true, - 6318 => true, - 6319 => true, - 6390 => true, - 6391 => true, - 6392 => true, - 6393 => true, - 6394 => true, - 6395 => true, - 6396 => true, - 6397 => true, - 6398 => true, - 6399 => true, - 6431 => true, - 6444 => true, - 6445 => true, - 6446 => true, - 6447 => true, - 6460 => true, - 6461 => true, - 6462 => true, - 6463 => true, - 6465 => true, - 6466 => true, - 6467 => true, - 6510 => true, - 6511 => true, - 6517 => true, - 6518 => true, - 6519 => true, - 6520 => true, - 6521 => true, - 6522 => true, - 6523 => true, - 6524 => true, - 6525 => true, - 6526 => true, - 6527 => true, - 6572 => true, - 6573 => true, - 6574 => true, - 6575 => true, - 6602 => true, - 6603 => true, - 6604 => true, - 6605 => true, - 6606 => true, - 6607 => true, - 6619 => true, - 6620 => true, - 6621 => true, - 6684 => true, - 6685 => true, - 6751 => true, - 6781 => true, - 6782 => true, - 6794 => true, - 6795 => true, - 6796 => true, - 6797 => true, - 6798 => true, - 6799 => true, - 6810 => true, - 6811 => true, - 6812 => true, - 6813 => true, - 6814 => true, - 6815 => true, - 6830 => true, - 6831 => true, - 6988 => true, - 6989 => true, - 6990 => true, - 6991 => true, - 7037 => true, - 7038 => true, - 7039 => true, - 7156 => true, - 7157 => true, - 7158 => true, - 7159 => true, - 7160 => true, - 7161 => true, - 7162 => true, - 7163 => true, - 7224 => true, - 7225 => true, - 7226 => true, - 7242 => true, - 7243 => true, - 7244 => true, - 7305 => true, - 7306 => true, - 7307 => true, - 7308 => true, - 7309 => true, - 7310 => true, - 7311 => true, - 7355 => true, - 7356 => true, - 7368 => true, - 7369 => true, - 7370 => true, - 7371 => true, - 7372 => true, - 7373 => true, - 7374 => true, - 7375 => true, - 7419 => true, - 7420 => true, - 7421 => true, - 7422 => true, - 7423 => true, - 7674 => true, - 7958 => true, - 7959 => true, - 7966 => true, - 7967 => true, - 8006 => true, - 8007 => true, - 8014 => true, - 8015 => true, - 8024 => true, - 8026 => true, - 8028 => true, - 8030 => true, - 8062 => true, - 8063 => true, - 8117 => true, - 8133 => true, - 8148 => true, - 8149 => true, - 8156 => true, - 8176 => true, - 8177 => true, - 8181 => true, - 8191 => true, - 8206 => true, - 8207 => true, - 8228 => true, - 8229 => true, - 8230 => true, - 8232 => true, - 8233 => true, - 8234 => true, - 8235 => true, - 8236 => true, - 8237 => true, - 8238 => true, - 8289 => true, - 8290 => true, - 8291 => true, - 8293 => true, - 8294 => true, - 8295 => true, - 8296 => true, - 8297 => true, - 8298 => true, - 8299 => true, - 8300 => true, - 8301 => true, - 8302 => true, - 8303 => true, - 8306 => true, - 8307 => true, - 8335 => true, - 8349 => true, - 8350 => true, - 8351 => true, - 8384 => true, - 8385 => true, - 8386 => true, - 8387 => true, - 8388 => true, - 8389 => true, - 8390 => true, - 8391 => true, - 8392 => true, - 8393 => true, - 8394 => true, - 8395 => true, - 8396 => true, - 8397 => true, - 8398 => true, - 8399 => true, - 8433 => true, - 8434 => true, - 8435 => true, - 8436 => true, - 8437 => true, - 8438 => true, - 8439 => true, - 8440 => true, - 8441 => true, - 8442 => true, - 8443 => true, - 8444 => true, - 8445 => true, - 8446 => true, - 8447 => true, - 8498 => true, - 8579 => true, - 8588 => true, - 8589 => true, - 8590 => true, - 8591 => true, - 9255 => true, - 9256 => true, - 9257 => true, - 9258 => true, - 9259 => true, - 9260 => true, - 9261 => true, - 9262 => true, - 9263 => true, - 9264 => true, - 9265 => true, - 9266 => true, - 9267 => true, - 9268 => true, - 9269 => true, - 9270 => true, - 9271 => true, - 9272 => true, - 9273 => true, - 9274 => true, - 9275 => true, - 9276 => true, - 9277 => true, - 9278 => true, - 9279 => true, - 9291 => true, - 9292 => true, - 9293 => true, - 9294 => true, - 9295 => true, - 9296 => true, - 9297 => true, - 9298 => true, - 9299 => true, - 9300 => true, - 9301 => true, - 9302 => true, - 9303 => true, - 9304 => true, - 9305 => true, - 9306 => true, - 9307 => true, - 9308 => true, - 9309 => true, - 9310 => true, - 9311 => true, - 9352 => true, - 9353 => true, - 9354 => true, - 9355 => true, - 9356 => true, - 9357 => true, - 9358 => true, - 9359 => true, - 9360 => true, - 9361 => true, - 9362 => true, - 9363 => true, - 9364 => true, - 9365 => true, - 9366 => true, - 9367 => true, - 9368 => true, - 9369 => true, - 9370 => true, - 9371 => true, - 11124 => true, - 11125 => true, - 11158 => true, - 11311 => true, - 11359 => true, - 11508 => true, - 11509 => true, - 11510 => true, - 11511 => true, - 11512 => true, - 11558 => true, - 11560 => true, - 11561 => true, - 11562 => true, - 11563 => true, - 11564 => true, - 11566 => true, - 11567 => true, - 11624 => true, - 11625 => true, - 11626 => true, - 11627 => true, - 11628 => true, - 11629 => true, - 11630 => true, - 11633 => true, - 11634 => true, - 11635 => true, - 11636 => true, - 11637 => true, - 11638 => true, - 11639 => true, - 11640 => true, - 11641 => true, - 11642 => true, - 11643 => true, - 11644 => true, - 11645 => true, - 11646 => true, - 11671 => true, - 11672 => true, - 11673 => true, - 11674 => true, - 11675 => true, - 11676 => true, - 11677 => true, - 11678 => true, - 11679 => true, - 11687 => true, - 11695 => true, - 11703 => true, - 11711 => true, - 11719 => true, - 11727 => true, - 11735 => true, - 11743 => true, - 11930 => true, - 12020 => true, - 12021 => true, - 12022 => true, - 12023 => true, - 12024 => true, - 12025 => true, - 12026 => true, - 12027 => true, - 12028 => true, - 12029 => true, - 12030 => true, - 12031 => true, - 12246 => true, - 12247 => true, - 12248 => true, - 12249 => true, - 12250 => true, - 12251 => true, - 12252 => true, - 12253 => true, - 12254 => true, - 12255 => true, - 12256 => true, - 12257 => true, - 12258 => true, - 12259 => true, - 12260 => true, - 12261 => true, - 12262 => true, - 12263 => true, - 12264 => true, - 12265 => true, - 12266 => true, - 12267 => true, - 12268 => true, - 12269 => true, - 12270 => true, - 12271 => true, - 12272 => true, - 12273 => true, - 12274 => true, - 12275 => true, - 12276 => true, - 12277 => true, - 12278 => true, - 12279 => true, - 12280 => true, - 12281 => true, - 12282 => true, - 12283 => true, - 12284 => true, - 12285 => true, - 12286 => true, - 12287 => true, - 12352 => true, - 12439 => true, - 12440 => true, - 12544 => true, - 12545 => true, - 12546 => true, - 12547 => true, - 12548 => true, - 12592 => true, - 12644 => true, - 12687 => true, - 12772 => true, - 12773 => true, - 12774 => true, - 12775 => true, - 12776 => true, - 12777 => true, - 12778 => true, - 12779 => true, - 12780 => true, - 12781 => true, - 12782 => true, - 12783 => true, - 12831 => true, - 13250 => true, - 13255 => true, - 13272 => true, - 40957 => true, - 40958 => true, - 40959 => true, - 42125 => true, - 42126 => true, - 42127 => true, - 42183 => true, - 42184 => true, - 42185 => true, - 42186 => true, - 42187 => true, - 42188 => true, - 42189 => true, - 42190 => true, - 42191 => true, - 42540 => true, - 42541 => true, - 42542 => true, - 42543 => true, - 42544 => true, - 42545 => true, - 42546 => true, - 42547 => true, - 42548 => true, - 42549 => true, - 42550 => true, - 42551 => true, - 42552 => true, - 42553 => true, - 42554 => true, - 42555 => true, - 42556 => true, - 42557 => true, - 42558 => true, - 42559 => true, - 42744 => true, - 42745 => true, - 42746 => true, - 42747 => true, - 42748 => true, - 42749 => true, - 42750 => true, - 42751 => true, - 42944 => true, - 42945 => true, - 43053 => true, - 43054 => true, - 43055 => true, - 43066 => true, - 43067 => true, - 43068 => true, - 43069 => true, - 43070 => true, - 43071 => true, - 43128 => true, - 43129 => true, - 43130 => true, - 43131 => true, - 43132 => true, - 43133 => true, - 43134 => true, - 43135 => true, - 43206 => true, - 43207 => true, - 43208 => true, - 43209 => true, - 43210 => true, - 43211 => true, - 43212 => true, - 43213 => true, - 43226 => true, - 43227 => true, - 43228 => true, - 43229 => true, - 43230 => true, - 43231 => true, - 43348 => true, - 43349 => true, - 43350 => true, - 43351 => true, - 43352 => true, - 43353 => true, - 43354 => true, - 43355 => true, - 43356 => true, - 43357 => true, - 43358 => true, - 43389 => true, - 43390 => true, - 43391 => true, - 43470 => true, - 43482 => true, - 43483 => true, - 43484 => true, - 43485 => true, - 43519 => true, - 43575 => true, - 43576 => true, - 43577 => true, - 43578 => true, - 43579 => true, - 43580 => true, - 43581 => true, - 43582 => true, - 43583 => true, - 43598 => true, - 43599 => true, - 43610 => true, - 43611 => true, - 43715 => true, - 43716 => true, - 43717 => true, - 43718 => true, - 43719 => true, - 43720 => true, - 43721 => true, - 43722 => true, - 43723 => true, - 43724 => true, - 43725 => true, - 43726 => true, - 43727 => true, - 43728 => true, - 43729 => true, - 43730 => true, - 43731 => true, - 43732 => true, - 43733 => true, - 43734 => true, - 43735 => true, - 43736 => true, - 43737 => true, - 43738 => true, - 43767 => true, - 43768 => true, - 43769 => true, - 43770 => true, - 43771 => true, - 43772 => true, - 43773 => true, - 43774 => true, - 43775 => true, - 43776 => true, - 43783 => true, - 43784 => true, - 43791 => true, - 43792 => true, - 43799 => true, - 43800 => true, - 43801 => true, - 43802 => true, - 43803 => true, - 43804 => true, - 43805 => true, - 43806 => true, - 43807 => true, - 43815 => true, - 43823 => true, - 43884 => true, - 43885 => true, - 43886 => true, - 43887 => true, - 44014 => true, - 44015 => true, - 44026 => true, - 44027 => true, - 44028 => true, - 44029 => true, - 44030 => true, - 44031 => true, - 55204 => true, - 55205 => true, - 55206 => true, - 55207 => true, - 55208 => true, - 55209 => true, - 55210 => true, - 55211 => true, - 55212 => true, - 55213 => true, - 55214 => true, - 55215 => true, - 55239 => true, - 55240 => true, - 55241 => true, - 55242 => true, - 55292 => true, - 55293 => true, - 55294 => true, - 55295 => true, - 64110 => true, - 64111 => true, - 64263 => true, - 64264 => true, - 64265 => true, - 64266 => true, - 64267 => true, - 64268 => true, - 64269 => true, - 64270 => true, - 64271 => true, - 64272 => true, - 64273 => true, - 64274 => true, - 64280 => true, - 64281 => true, - 64282 => true, - 64283 => true, - 64284 => true, - 64311 => true, - 64317 => true, - 64319 => true, - 64322 => true, - 64325 => true, - 64450 => true, - 64451 => true, - 64452 => true, - 64453 => true, - 64454 => true, - 64455 => true, - 64456 => true, - 64457 => true, - 64458 => true, - 64459 => true, - 64460 => true, - 64461 => true, - 64462 => true, - 64463 => true, - 64464 => true, - 64465 => true, - 64466 => true, - 64832 => true, - 64833 => true, - 64834 => true, - 64835 => true, - 64836 => true, - 64837 => true, - 64838 => true, - 64839 => true, - 64840 => true, - 64841 => true, - 64842 => true, - 64843 => true, - 64844 => true, - 64845 => true, - 64846 => true, - 64847 => true, - 64912 => true, - 64913 => true, - 64968 => true, - 64969 => true, - 64970 => true, - 64971 => true, - 64972 => true, - 64973 => true, - 64974 => true, - 64975 => true, - 65022 => true, - 65023 => true, - 65042 => true, - 65049 => true, - 65050 => true, - 65051 => true, - 65052 => true, - 65053 => true, - 65054 => true, - 65055 => true, - 65072 => true, - 65106 => true, - 65107 => true, - 65127 => true, - 65132 => true, - 65133 => true, - 65134 => true, - 65135 => true, - 65141 => true, - 65277 => true, - 65278 => true, - 65280 => true, - 65440 => true, - 65471 => true, - 65472 => true, - 65473 => true, - 65480 => true, - 65481 => true, - 65488 => true, - 65489 => true, - 65496 => true, - 65497 => true, - 65501 => true, - 65502 => true, - 65503 => true, - 65511 => true, - 65519 => true, - 65520 => true, - 65521 => true, - 65522 => true, - 65523 => true, - 65524 => true, - 65525 => true, - 65526 => true, - 65527 => true, - 65528 => true, - 65529 => true, - 65530 => true, - 65531 => true, - 65532 => true, - 65533 => true, - 65534 => true, - 65535 => true, - 65548 => true, - 65575 => true, - 65595 => true, - 65598 => true, - 65614 => true, - 65615 => true, - 65787 => true, - 65788 => true, - 65789 => true, - 65790 => true, - 65791 => true, - 65795 => true, - 65796 => true, - 65797 => true, - 65798 => true, - 65844 => true, - 65845 => true, - 65846 => true, - 65935 => true, - 65949 => true, - 65950 => true, - 65951 => true, - 66205 => true, - 66206 => true, - 66207 => true, - 66257 => true, - 66258 => true, - 66259 => true, - 66260 => true, - 66261 => true, - 66262 => true, - 66263 => true, - 66264 => true, - 66265 => true, - 66266 => true, - 66267 => true, - 66268 => true, - 66269 => true, - 66270 => true, - 66271 => true, - 66300 => true, - 66301 => true, - 66302 => true, - 66303 => true, - 66340 => true, - 66341 => true, - 66342 => true, - 66343 => true, - 66344 => true, - 66345 => true, - 66346 => true, - 66347 => true, - 66348 => true, - 66379 => true, - 66380 => true, - 66381 => true, - 66382 => true, - 66383 => true, - 66427 => true, - 66428 => true, - 66429 => true, - 66430 => true, - 66431 => true, - 66462 => true, - 66500 => true, - 66501 => true, - 66502 => true, - 66503 => true, - 66718 => true, - 66719 => true, - 66730 => true, - 66731 => true, - 66732 => true, - 66733 => true, - 66734 => true, - 66735 => true, - 66772 => true, - 66773 => true, - 66774 => true, - 66775 => true, - 66812 => true, - 66813 => true, - 66814 => true, - 66815 => true, - 66856 => true, - 66857 => true, - 66858 => true, - 66859 => true, - 66860 => true, - 66861 => true, - 66862 => true, - 66863 => true, - 66916 => true, - 66917 => true, - 66918 => true, - 66919 => true, - 66920 => true, - 66921 => true, - 66922 => true, - 66923 => true, - 66924 => true, - 66925 => true, - 66926 => true, - 67383 => true, - 67384 => true, - 67385 => true, - 67386 => true, - 67387 => true, - 67388 => true, - 67389 => true, - 67390 => true, - 67391 => true, - 67414 => true, - 67415 => true, - 67416 => true, - 67417 => true, - 67418 => true, - 67419 => true, - 67420 => true, - 67421 => true, - 67422 => true, - 67423 => true, - 67590 => true, - 67591 => true, - 67593 => true, - 67638 => true, - 67641 => true, - 67642 => true, - 67643 => true, - 67645 => true, - 67646 => true, - 67670 => true, - 67743 => true, - 67744 => true, - 67745 => true, - 67746 => true, - 67747 => true, - 67748 => true, - 67749 => true, - 67750 => true, - 67827 => true, - 67830 => true, - 67831 => true, - 67832 => true, - 67833 => true, - 67834 => true, - 67868 => true, - 67869 => true, - 67870 => true, - 67898 => true, - 67899 => true, - 67900 => true, - 67901 => true, - 67902 => true, - 68024 => true, - 68025 => true, - 68026 => true, - 68027 => true, - 68048 => true, - 68049 => true, - 68100 => true, - 68103 => true, - 68104 => true, - 68105 => true, - 68106 => true, - 68107 => true, - 68116 => true, - 68120 => true, - 68150 => true, - 68151 => true, - 68155 => true, - 68156 => true, - 68157 => true, - 68158 => true, - 68169 => true, - 68170 => true, - 68171 => true, - 68172 => true, - 68173 => true, - 68174 => true, - 68175 => true, - 68185 => true, - 68186 => true, - 68187 => true, - 68188 => true, - 68189 => true, - 68190 => true, - 68191 => true, - 68327 => true, - 68328 => true, - 68329 => true, - 68330 => true, - 68343 => true, - 68344 => true, - 68345 => true, - 68346 => true, - 68347 => true, - 68348 => true, - 68349 => true, - 68350 => true, - 68351 => true, - 68406 => true, - 68407 => true, - 68408 => true, - 68438 => true, - 68439 => true, - 68467 => true, - 68468 => true, - 68469 => true, - 68470 => true, - 68471 => true, - 68498 => true, - 68499 => true, - 68500 => true, - 68501 => true, - 68502 => true, - 68503 => true, - 68504 => true, - 68509 => true, - 68510 => true, - 68511 => true, - 68512 => true, - 68513 => true, - 68514 => true, - 68515 => true, - 68516 => true, - 68517 => true, - 68518 => true, - 68519 => true, - 68520 => true, - 68787 => true, - 68788 => true, - 68789 => true, - 68790 => true, - 68791 => true, - 68792 => true, - 68793 => true, - 68794 => true, - 68795 => true, - 68796 => true, - 68797 => true, - 68798 => true, - 68799 => true, - 68851 => true, - 68852 => true, - 68853 => true, - 68854 => true, - 68855 => true, - 68856 => true, - 68857 => true, - 68904 => true, - 68905 => true, - 68906 => true, - 68907 => true, - 68908 => true, - 68909 => true, - 68910 => true, - 68911 => true, - 69247 => true, - 69290 => true, - 69294 => true, - 69295 => true, - 69416 => true, - 69417 => true, - 69418 => true, - 69419 => true, - 69420 => true, - 69421 => true, - 69422 => true, - 69423 => true, - 69580 => true, - 69581 => true, - 69582 => true, - 69583 => true, - 69584 => true, - 69585 => true, - 69586 => true, - 69587 => true, - 69588 => true, - 69589 => true, - 69590 => true, - 69591 => true, - 69592 => true, - 69593 => true, - 69594 => true, - 69595 => true, - 69596 => true, - 69597 => true, - 69598 => true, - 69599 => true, - 69623 => true, - 69624 => true, - 69625 => true, - 69626 => true, - 69627 => true, - 69628 => true, - 69629 => true, - 69630 => true, - 69631 => true, - 69710 => true, - 69711 => true, - 69712 => true, - 69713 => true, - 69744 => true, - 69745 => true, - 69746 => true, - 69747 => true, - 69748 => true, - 69749 => true, - 69750 => true, - 69751 => true, - 69752 => true, - 69753 => true, - 69754 => true, - 69755 => true, - 69756 => true, - 69757 => true, - 69758 => true, - 69821 => true, - 69826 => true, - 69827 => true, - 69828 => true, - 69829 => true, - 69830 => true, - 69831 => true, - 69832 => true, - 69833 => true, - 69834 => true, - 69835 => true, - 69836 => true, - 69837 => true, - 69838 => true, - 69839 => true, - 69865 => true, - 69866 => true, - 69867 => true, - 69868 => true, - 69869 => true, - 69870 => true, - 69871 => true, - 69882 => true, - 69883 => true, - 69884 => true, - 69885 => true, - 69886 => true, - 69887 => true, - 69941 => true, - 69960 => true, - 69961 => true, - 69962 => true, - 69963 => true, - 69964 => true, - 69965 => true, - 69966 => true, - 69967 => true, - 70007 => true, - 70008 => true, - 70009 => true, - 70010 => true, - 70011 => true, - 70012 => true, - 70013 => true, - 70014 => true, - 70015 => true, - 70112 => true, - 70133 => true, - 70134 => true, - 70135 => true, - 70136 => true, - 70137 => true, - 70138 => true, - 70139 => true, - 70140 => true, - 70141 => true, - 70142 => true, - 70143 => true, - 70162 => true, - 70279 => true, - 70281 => true, - 70286 => true, - 70302 => true, - 70314 => true, - 70315 => true, - 70316 => true, - 70317 => true, - 70318 => true, - 70319 => true, - 70379 => true, - 70380 => true, - 70381 => true, - 70382 => true, - 70383 => true, - 70394 => true, - 70395 => true, - 70396 => true, - 70397 => true, - 70398 => true, - 70399 => true, - 70404 => true, - 70413 => true, - 70414 => true, - 70417 => true, - 70418 => true, - 70441 => true, - 70449 => true, - 70452 => true, - 70458 => true, - 70469 => true, - 70470 => true, - 70473 => true, - 70474 => true, - 70478 => true, - 70479 => true, - 70481 => true, - 70482 => true, - 70483 => true, - 70484 => true, - 70485 => true, - 70486 => true, - 70488 => true, - 70489 => true, - 70490 => true, - 70491 => true, - 70492 => true, - 70500 => true, - 70501 => true, - 70509 => true, - 70510 => true, - 70511 => true, - 70748 => true, - 70754 => true, - 70755 => true, - 70756 => true, - 70757 => true, - 70758 => true, - 70759 => true, - 70760 => true, - 70761 => true, - 70762 => true, - 70763 => true, - 70764 => true, - 70765 => true, - 70766 => true, - 70767 => true, - 70768 => true, - 70769 => true, - 70770 => true, - 70771 => true, - 70772 => true, - 70773 => true, - 70774 => true, - 70775 => true, - 70776 => true, - 70777 => true, - 70778 => true, - 70779 => true, - 70780 => true, - 70781 => true, - 70782 => true, - 70783 => true, - 70856 => true, - 70857 => true, - 70858 => true, - 70859 => true, - 70860 => true, - 70861 => true, - 70862 => true, - 70863 => true, - 71094 => true, - 71095 => true, - 71237 => true, - 71238 => true, - 71239 => true, - 71240 => true, - 71241 => true, - 71242 => true, - 71243 => true, - 71244 => true, - 71245 => true, - 71246 => true, - 71247 => true, - 71258 => true, - 71259 => true, - 71260 => true, - 71261 => true, - 71262 => true, - 71263 => true, - 71277 => true, - 71278 => true, - 71279 => true, - 71280 => true, - 71281 => true, - 71282 => true, - 71283 => true, - 71284 => true, - 71285 => true, - 71286 => true, - 71287 => true, - 71288 => true, - 71289 => true, - 71290 => true, - 71291 => true, - 71292 => true, - 71293 => true, - 71294 => true, - 71295 => true, - 71353 => true, - 71354 => true, - 71355 => true, - 71356 => true, - 71357 => true, - 71358 => true, - 71359 => true, - 71451 => true, - 71452 => true, - 71468 => true, - 71469 => true, - 71470 => true, - 71471 => true, - 71923 => true, - 71924 => true, - 71925 => true, - 71926 => true, - 71927 => true, - 71928 => true, - 71929 => true, - 71930 => true, - 71931 => true, - 71932 => true, - 71933 => true, - 71934 => true, - 71943 => true, - 71944 => true, - 71946 => true, - 71947 => true, - 71956 => true, - 71959 => true, - 71990 => true, - 71993 => true, - 71994 => true, - 72007 => true, - 72008 => true, - 72009 => true, - 72010 => true, - 72011 => true, - 72012 => true, - 72013 => true, - 72014 => true, - 72015 => true, - 72104 => true, - 72105 => true, - 72152 => true, - 72153 => true, - 72165 => true, - 72166 => true, - 72167 => true, - 72168 => true, - 72169 => true, - 72170 => true, - 72171 => true, - 72172 => true, - 72173 => true, - 72174 => true, - 72175 => true, - 72176 => true, - 72177 => true, - 72178 => true, - 72179 => true, - 72180 => true, - 72181 => true, - 72182 => true, - 72183 => true, - 72184 => true, - 72185 => true, - 72186 => true, - 72187 => true, - 72188 => true, - 72189 => true, - 72190 => true, - 72191 => true, - 72264 => true, - 72265 => true, - 72266 => true, - 72267 => true, - 72268 => true, - 72269 => true, - 72270 => true, - 72271 => true, - 72355 => true, - 72356 => true, - 72357 => true, - 72358 => true, - 72359 => true, - 72360 => true, - 72361 => true, - 72362 => true, - 72363 => true, - 72364 => true, - 72365 => true, - 72366 => true, - 72367 => true, - 72368 => true, - 72369 => true, - 72370 => true, - 72371 => true, - 72372 => true, - 72373 => true, - 72374 => true, - 72375 => true, - 72376 => true, - 72377 => true, - 72378 => true, - 72379 => true, - 72380 => true, - 72381 => true, - 72382 => true, - 72383 => true, - 72713 => true, - 72759 => true, - 72774 => true, - 72775 => true, - 72776 => true, - 72777 => true, - 72778 => true, - 72779 => true, - 72780 => true, - 72781 => true, - 72782 => true, - 72783 => true, - 72813 => true, - 72814 => true, - 72815 => true, - 72848 => true, - 72849 => true, - 72872 => true, - 72967 => true, - 72970 => true, - 73015 => true, - 73016 => true, - 73017 => true, - 73019 => true, - 73022 => true, - 73032 => true, - 73033 => true, - 73034 => true, - 73035 => true, - 73036 => true, - 73037 => true, - 73038 => true, - 73039 => true, - 73050 => true, - 73051 => true, - 73052 => true, - 73053 => true, - 73054 => true, - 73055 => true, - 73062 => true, - 73065 => true, - 73103 => true, - 73106 => true, - 73113 => true, - 73114 => true, - 73115 => true, - 73116 => true, - 73117 => true, - 73118 => true, - 73119 => true, - 73649 => true, - 73650 => true, - 73651 => true, - 73652 => true, - 73653 => true, - 73654 => true, - 73655 => true, - 73656 => true, - 73657 => true, - 73658 => true, - 73659 => true, - 73660 => true, - 73661 => true, - 73662 => true, - 73663 => true, - 73714 => true, - 73715 => true, - 73716 => true, - 73717 => true, - 73718 => true, - 73719 => true, - 73720 => true, - 73721 => true, - 73722 => true, - 73723 => true, - 73724 => true, - 73725 => true, - 73726 => true, - 74863 => true, - 74869 => true, - 74870 => true, - 74871 => true, - 74872 => true, - 74873 => true, - 74874 => true, - 74875 => true, - 74876 => true, - 74877 => true, - 74878 => true, - 74879 => true, - 78895 => true, - 78896 => true, - 78897 => true, - 78898 => true, - 78899 => true, - 78900 => true, - 78901 => true, - 78902 => true, - 78903 => true, - 78904 => true, - 92729 => true, - 92730 => true, - 92731 => true, - 92732 => true, - 92733 => true, - 92734 => true, - 92735 => true, - 92767 => true, - 92778 => true, - 92779 => true, - 92780 => true, - 92781 => true, - 92910 => true, - 92911 => true, - 92918 => true, - 92919 => true, - 92920 => true, - 92921 => true, - 92922 => true, - 92923 => true, - 92924 => true, - 92925 => true, - 92926 => true, - 92927 => true, - 92998 => true, - 92999 => true, - 93000 => true, - 93001 => true, - 93002 => true, - 93003 => true, - 93004 => true, - 93005 => true, - 93006 => true, - 93007 => true, - 93018 => true, - 93026 => true, - 93048 => true, - 93049 => true, - 93050 => true, - 93051 => true, - 93052 => true, - 94027 => true, - 94028 => true, - 94029 => true, - 94030 => true, - 94088 => true, - 94089 => true, - 94090 => true, - 94091 => true, - 94092 => true, - 94093 => true, - 94094 => true, - 94181 => true, - 94182 => true, - 94183 => true, - 94184 => true, - 94185 => true, - 94186 => true, - 94187 => true, - 94188 => true, - 94189 => true, - 94190 => true, - 94191 => true, - 94194 => true, - 94195 => true, - 94196 => true, - 94197 => true, - 94198 => true, - 94199 => true, - 94200 => true, - 94201 => true, - 94202 => true, - 94203 => true, - 94204 => true, - 94205 => true, - 94206 => true, - 94207 => true, - 100344 => true, - 100345 => true, - 100346 => true, - 100347 => true, - 100348 => true, - 100349 => true, - 100350 => true, - 100351 => true, - 110931 => true, - 110932 => true, - 110933 => true, - 110934 => true, - 110935 => true, - 110936 => true, - 110937 => true, - 110938 => true, - 110939 => true, - 110940 => true, - 110941 => true, - 110942 => true, - 110943 => true, - 110944 => true, - 110945 => true, - 110946 => true, - 110947 => true, - 110952 => true, - 110953 => true, - 110954 => true, - 110955 => true, - 110956 => true, - 110957 => true, - 110958 => true, - 110959 => true, - 113771 => true, - 113772 => true, - 113773 => true, - 113774 => true, - 113775 => true, - 113789 => true, - 113790 => true, - 113791 => true, - 113801 => true, - 113802 => true, - 113803 => true, - 113804 => true, - 113805 => true, - 113806 => true, - 113807 => true, - 113818 => true, - 113819 => true, - 119030 => true, - 119031 => true, - 119032 => true, - 119033 => true, - 119034 => true, - 119035 => true, - 119036 => true, - 119037 => true, - 119038 => true, - 119039 => true, - 119079 => true, - 119080 => true, - 119155 => true, - 119156 => true, - 119157 => true, - 119158 => true, - 119159 => true, - 119160 => true, - 119161 => true, - 119162 => true, - 119273 => true, - 119274 => true, - 119275 => true, - 119276 => true, - 119277 => true, - 119278 => true, - 119279 => true, - 119280 => true, - 119281 => true, - 119282 => true, - 119283 => true, - 119284 => true, - 119285 => true, - 119286 => true, - 119287 => true, - 119288 => true, - 119289 => true, - 119290 => true, - 119291 => true, - 119292 => true, - 119293 => true, - 119294 => true, - 119295 => true, - 119540 => true, - 119541 => true, - 119542 => true, - 119543 => true, - 119544 => true, - 119545 => true, - 119546 => true, - 119547 => true, - 119548 => true, - 119549 => true, - 119550 => true, - 119551 => true, - 119639 => true, - 119640 => true, - 119641 => true, - 119642 => true, - 119643 => true, - 119644 => true, - 119645 => true, - 119646 => true, - 119647 => true, - 119893 => true, - 119965 => true, - 119968 => true, - 119969 => true, - 119971 => true, - 119972 => true, - 119975 => true, - 119976 => true, - 119981 => true, - 119994 => true, - 119996 => true, - 120004 => true, - 120070 => true, - 120075 => true, - 120076 => true, - 120085 => true, - 120093 => true, - 120122 => true, - 120127 => true, - 120133 => true, - 120135 => true, - 120136 => true, - 120137 => true, - 120145 => true, - 120486 => true, - 120487 => true, - 120780 => true, - 120781 => true, - 121484 => true, - 121485 => true, - 121486 => true, - 121487 => true, - 121488 => true, - 121489 => true, - 121490 => true, - 121491 => true, - 121492 => true, - 121493 => true, - 121494 => true, - 121495 => true, - 121496 => true, - 121497 => true, - 121498 => true, - 121504 => true, - 122887 => true, - 122905 => true, - 122906 => true, - 122914 => true, - 122917 => true, - 123181 => true, - 123182 => true, - 123183 => true, - 123198 => true, - 123199 => true, - 123210 => true, - 123211 => true, - 123212 => true, - 123213 => true, - 123642 => true, - 123643 => true, - 123644 => true, - 123645 => true, - 123646 => true, - 125125 => true, - 125126 => true, - 125260 => true, - 125261 => true, - 125262 => true, - 125263 => true, - 125274 => true, - 125275 => true, - 125276 => true, - 125277 => true, - 126468 => true, - 126496 => true, - 126499 => true, - 126501 => true, - 126502 => true, - 126504 => true, - 126515 => true, - 126520 => true, - 126522 => true, - 126524 => true, - 126525 => true, - 126526 => true, - 126527 => true, - 126528 => true, - 126529 => true, - 126531 => true, - 126532 => true, - 126533 => true, - 126534 => true, - 126536 => true, - 126538 => true, - 126540 => true, - 126544 => true, - 126547 => true, - 126549 => true, - 126550 => true, - 126552 => true, - 126554 => true, - 126556 => true, - 126558 => true, - 126560 => true, - 126563 => true, - 126565 => true, - 126566 => true, - 126571 => true, - 126579 => true, - 126584 => true, - 126589 => true, - 126591 => true, - 126602 => true, - 126620 => true, - 126621 => true, - 126622 => true, - 126623 => true, - 126624 => true, - 126628 => true, - 126634 => true, - 127020 => true, - 127021 => true, - 127022 => true, - 127023 => true, - 127124 => true, - 127125 => true, - 127126 => true, - 127127 => true, - 127128 => true, - 127129 => true, - 127130 => true, - 127131 => true, - 127132 => true, - 127133 => true, - 127134 => true, - 127135 => true, - 127151 => true, - 127152 => true, - 127168 => true, - 127184 => true, - 127222 => true, - 127223 => true, - 127224 => true, - 127225 => true, - 127226 => true, - 127227 => true, - 127228 => true, - 127229 => true, - 127230 => true, - 127231 => true, - 127232 => true, - 127491 => true, - 127492 => true, - 127493 => true, - 127494 => true, - 127495 => true, - 127496 => true, - 127497 => true, - 127498 => true, - 127499 => true, - 127500 => true, - 127501 => true, - 127502 => true, - 127503 => true, - 127548 => true, - 127549 => true, - 127550 => true, - 127551 => true, - 127561 => true, - 127562 => true, - 127563 => true, - 127564 => true, - 127565 => true, - 127566 => true, - 127567 => true, - 127570 => true, - 127571 => true, - 127572 => true, - 127573 => true, - 127574 => true, - 127575 => true, - 127576 => true, - 127577 => true, - 127578 => true, - 127579 => true, - 127580 => true, - 127581 => true, - 127582 => true, - 127583 => true, - 128728 => true, - 128729 => true, - 128730 => true, - 128731 => true, - 128732 => true, - 128733 => true, - 128734 => true, - 128735 => true, - 128749 => true, - 128750 => true, - 128751 => true, - 128765 => true, - 128766 => true, - 128767 => true, - 128884 => true, - 128885 => true, - 128886 => true, - 128887 => true, - 128888 => true, - 128889 => true, - 128890 => true, - 128891 => true, - 128892 => true, - 128893 => true, - 128894 => true, - 128895 => true, - 128985 => true, - 128986 => true, - 128987 => true, - 128988 => true, - 128989 => true, - 128990 => true, - 128991 => true, - 129004 => true, - 129005 => true, - 129006 => true, - 129007 => true, - 129008 => true, - 129009 => true, - 129010 => true, - 129011 => true, - 129012 => true, - 129013 => true, - 129014 => true, - 129015 => true, - 129016 => true, - 129017 => true, - 129018 => true, - 129019 => true, - 129020 => true, - 129021 => true, - 129022 => true, - 129023 => true, - 129036 => true, - 129037 => true, - 129038 => true, - 129039 => true, - 129096 => true, - 129097 => true, - 129098 => true, - 129099 => true, - 129100 => true, - 129101 => true, - 129102 => true, - 129103 => true, - 129114 => true, - 129115 => true, - 129116 => true, - 129117 => true, - 129118 => true, - 129119 => true, - 129160 => true, - 129161 => true, - 129162 => true, - 129163 => true, - 129164 => true, - 129165 => true, - 129166 => true, - 129167 => true, - 129198 => true, - 129199 => true, - 129401 => true, - 129484 => true, - 129620 => true, - 129621 => true, - 129622 => true, - 129623 => true, - 129624 => true, - 129625 => true, - 129626 => true, - 129627 => true, - 129628 => true, - 129629 => true, - 129630 => true, - 129631 => true, - 129646 => true, - 129647 => true, - 129653 => true, - 129654 => true, - 129655 => true, - 129659 => true, - 129660 => true, - 129661 => true, - 129662 => true, - 129663 => true, - 129671 => true, - 129672 => true, - 129673 => true, - 129674 => true, - 129675 => true, - 129676 => true, - 129677 => true, - 129678 => true, - 129679 => true, - 129705 => true, - 129706 => true, - 129707 => true, - 129708 => true, - 129709 => true, - 129710 => true, - 129711 => true, - 129719 => true, - 129720 => true, - 129721 => true, - 129722 => true, - 129723 => true, - 129724 => true, - 129725 => true, - 129726 => true, - 129727 => true, - 129731 => true, - 129732 => true, - 129733 => true, - 129734 => true, - 129735 => true, - 129736 => true, - 129737 => true, - 129738 => true, - 129739 => true, - 129740 => true, - 129741 => true, - 129742 => true, - 129743 => true, - 129939 => true, - 131070 => true, - 131071 => true, - 177973 => true, - 177974 => true, - 177975 => true, - 177976 => true, - 177977 => true, - 177978 => true, - 177979 => true, - 177980 => true, - 177981 => true, - 177982 => true, - 177983 => true, - 178206 => true, - 178207 => true, - 183970 => true, - 183971 => true, - 183972 => true, - 183973 => true, - 183974 => true, - 183975 => true, - 183976 => true, - 183977 => true, - 183978 => true, - 183979 => true, - 183980 => true, - 183981 => true, - 183982 => true, - 183983 => true, - 194664 => true, - 194676 => true, - 194847 => true, - 194911 => true, - 195007 => true, - 196606 => true, - 196607 => true, - 262142 => true, - 262143 => true, - 327678 => true, - 327679 => true, - 393214 => true, - 393215 => true, - 458750 => true, - 458751 => true, - 524286 => true, - 524287 => true, - 589822 => true, - 589823 => true, - 655358 => true, - 655359 => true, - 720894 => true, - 720895 => true, - 786430 => true, - 786431 => true, - 851966 => true, - 851967 => true, - 917502 => true, - 917503 => true, - 917504 => true, - 917505 => true, - 917506 => true, - 917507 => true, - 917508 => true, - 917509 => true, - 917510 => true, - 917511 => true, - 917512 => true, - 917513 => true, - 917514 => true, - 917515 => true, - 917516 => true, - 917517 => true, - 917518 => true, - 917519 => true, - 917520 => true, - 917521 => true, - 917522 => true, - 917523 => true, - 917524 => true, - 917525 => true, - 917526 => true, - 917527 => true, - 917528 => true, - 917529 => true, - 917530 => true, - 917531 => true, - 917532 => true, - 917533 => true, - 917534 => true, - 917535 => true, - 983038 => true, - 983039 => true, - 1048574 => true, - 1048575 => true, - 1114110 => true, - 1114111 => true, -); diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php deleted file mode 100644 index 54f21cc0c..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php +++ /dev/null @@ -1,308 +0,0 @@ - ' ', - 168 => ' ̈', - 175 => ' ̄', - 180 => ' ́', - 184 => ' ̧', - 728 => ' ̆', - 729 => ' ̇', - 730 => ' ̊', - 731 => ' ̨', - 732 => ' ̃', - 733 => ' ̋', - 890 => ' ι', - 894 => ';', - 900 => ' ́', - 901 => ' ̈́', - 8125 => ' ̓', - 8127 => ' ̓', - 8128 => ' ͂', - 8129 => ' ̈͂', - 8141 => ' ̓̀', - 8142 => ' ̓́', - 8143 => ' ̓͂', - 8157 => ' ̔̀', - 8158 => ' ̔́', - 8159 => ' ̔͂', - 8173 => ' ̈̀', - 8174 => ' ̈́', - 8175 => '`', - 8189 => ' ́', - 8190 => ' ̔', - 8192 => ' ', - 8193 => ' ', - 8194 => ' ', - 8195 => ' ', - 8196 => ' ', - 8197 => ' ', - 8198 => ' ', - 8199 => ' ', - 8200 => ' ', - 8201 => ' ', - 8202 => ' ', - 8215 => ' ̳', - 8239 => ' ', - 8252 => '!!', - 8254 => ' ̅', - 8263 => '??', - 8264 => '?!', - 8265 => '!?', - 8287 => ' ', - 8314 => '+', - 8316 => '=', - 8317 => '(', - 8318 => ')', - 8330 => '+', - 8332 => '=', - 8333 => '(', - 8334 => ')', - 8448 => 'a/c', - 8449 => 'a/s', - 8453 => 'c/o', - 8454 => 'c/u', - 9332 => '(1)', - 9333 => '(2)', - 9334 => '(3)', - 9335 => '(4)', - 9336 => '(5)', - 9337 => '(6)', - 9338 => '(7)', - 9339 => '(8)', - 9340 => '(9)', - 9341 => '(10)', - 9342 => '(11)', - 9343 => '(12)', - 9344 => '(13)', - 9345 => '(14)', - 9346 => '(15)', - 9347 => '(16)', - 9348 => '(17)', - 9349 => '(18)', - 9350 => '(19)', - 9351 => '(20)', - 9372 => '(a)', - 9373 => '(b)', - 9374 => '(c)', - 9375 => '(d)', - 9376 => '(e)', - 9377 => '(f)', - 9378 => '(g)', - 9379 => '(h)', - 9380 => '(i)', - 9381 => '(j)', - 9382 => '(k)', - 9383 => '(l)', - 9384 => '(m)', - 9385 => '(n)', - 9386 => '(o)', - 9387 => '(p)', - 9388 => '(q)', - 9389 => '(r)', - 9390 => '(s)', - 9391 => '(t)', - 9392 => '(u)', - 9393 => '(v)', - 9394 => '(w)', - 9395 => '(x)', - 9396 => '(y)', - 9397 => '(z)', - 10868 => '::=', - 10869 => '==', - 10870 => '===', - 12288 => ' ', - 12443 => ' ゙', - 12444 => ' ゚', - 12800 => '(ᄀ)', - 12801 => '(ᄂ)', - 12802 => '(ᄃ)', - 12803 => '(ᄅ)', - 12804 => '(ᄆ)', - 12805 => '(ᄇ)', - 12806 => '(ᄉ)', - 12807 => '(ᄋ)', - 12808 => '(ᄌ)', - 12809 => '(ᄎ)', - 12810 => '(ᄏ)', - 12811 => '(ᄐ)', - 12812 => '(ᄑ)', - 12813 => '(ᄒ)', - 12814 => '(가)', - 12815 => '(나)', - 12816 => '(다)', - 12817 => '(라)', - 12818 => '(마)', - 12819 => '(바)', - 12820 => '(사)', - 12821 => '(아)', - 12822 => '(자)', - 12823 => '(차)', - 12824 => '(카)', - 12825 => '(타)', - 12826 => '(파)', - 12827 => '(하)', - 12828 => '(주)', - 12829 => '(오전)', - 12830 => '(오후)', - 12832 => '(一)', - 12833 => '(二)', - 12834 => '(三)', - 12835 => '(四)', - 12836 => '(五)', - 12837 => '(六)', - 12838 => '(七)', - 12839 => '(八)', - 12840 => '(九)', - 12841 => '(十)', - 12842 => '(月)', - 12843 => '(火)', - 12844 => '(水)', - 12845 => '(木)', - 12846 => '(金)', - 12847 => '(土)', - 12848 => '(日)', - 12849 => '(株)', - 12850 => '(有)', - 12851 => '(社)', - 12852 => '(名)', - 12853 => '(特)', - 12854 => '(財)', - 12855 => '(祝)', - 12856 => '(労)', - 12857 => '(代)', - 12858 => '(呼)', - 12859 => '(学)', - 12860 => '(監)', - 12861 => '(企)', - 12862 => '(資)', - 12863 => '(協)', - 12864 => '(祭)', - 12865 => '(休)', - 12866 => '(自)', - 12867 => '(至)', - 64297 => '+', - 64606 => ' ٌّ', - 64607 => ' ٍّ', - 64608 => ' َّ', - 64609 => ' ُّ', - 64610 => ' ِّ', - 64611 => ' ّٰ', - 65018 => 'صلى الله عليه وسلم', - 65019 => 'جل جلاله', - 65040 => ',', - 65043 => ':', - 65044 => ';', - 65045 => '!', - 65046 => '?', - 65075 => '_', - 65076 => '_', - 65077 => '(', - 65078 => ')', - 65079 => '{', - 65080 => '}', - 65095 => '[', - 65096 => ']', - 65097 => ' ̅', - 65098 => ' ̅', - 65099 => ' ̅', - 65100 => ' ̅', - 65101 => '_', - 65102 => '_', - 65103 => '_', - 65104 => ',', - 65108 => ';', - 65109 => ':', - 65110 => '?', - 65111 => '!', - 65113 => '(', - 65114 => ')', - 65115 => '{', - 65116 => '}', - 65119 => '#', - 65120 => '&', - 65121 => '*', - 65122 => '+', - 65124 => '<', - 65125 => '>', - 65126 => '=', - 65128 => '\\', - 65129 => '$', - 65130 => '%', - 65131 => '@', - 65136 => ' ً', - 65138 => ' ٌ', - 65140 => ' ٍ', - 65142 => ' َ', - 65144 => ' ُ', - 65146 => ' ِ', - 65148 => ' ّ', - 65150 => ' ْ', - 65281 => '!', - 65282 => '"', - 65283 => '#', - 65284 => '$', - 65285 => '%', - 65286 => '&', - 65287 => '\'', - 65288 => '(', - 65289 => ')', - 65290 => '*', - 65291 => '+', - 65292 => ',', - 65295 => '/', - 65306 => ':', - 65307 => ';', - 65308 => '<', - 65309 => '=', - 65310 => '>', - 65311 => '?', - 65312 => '@', - 65339 => '[', - 65340 => '\\', - 65341 => ']', - 65342 => '^', - 65343 => '_', - 65344 => '`', - 65371 => '{', - 65372 => '|', - 65373 => '}', - 65374 => '~', - 65507 => ' ̄', - 127233 => '0,', - 127234 => '1,', - 127235 => '2,', - 127236 => '3,', - 127237 => '4,', - 127238 => '5,', - 127239 => '6,', - 127240 => '7,', - 127241 => '8,', - 127242 => '9,', - 127248 => '(a)', - 127249 => '(b)', - 127250 => '(c)', - 127251 => '(d)', - 127252 => '(e)', - 127253 => '(f)', - 127254 => '(g)', - 127255 => '(h)', - 127256 => '(i)', - 127257 => '(j)', - 127258 => '(k)', - 127259 => '(l)', - 127260 => '(m)', - 127261 => '(n)', - 127262 => '(o)', - 127263 => '(p)', - 127264 => '(q)', - 127265 => '(r)', - 127266 => '(s)', - 127267 => '(t)', - 127268 => '(u)', - 127269 => '(v)', - 127270 => '(w)', - 127271 => '(x)', - 127272 => '(y)', - 127273 => '(z)', -); diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php deleted file mode 100644 index 223396ec4..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php +++ /dev/null @@ -1,71 +0,0 @@ - true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true, - 10 => true, - 11 => true, - 12 => true, - 13 => true, - 14 => true, - 15 => true, - 16 => true, - 17 => true, - 18 => true, - 19 => true, - 20 => true, - 21 => true, - 22 => true, - 23 => true, - 24 => true, - 25 => true, - 26 => true, - 27 => true, - 28 => true, - 29 => true, - 30 => true, - 31 => true, - 32 => true, - 33 => true, - 34 => true, - 35 => true, - 36 => true, - 37 => true, - 38 => true, - 39 => true, - 40 => true, - 41 => true, - 42 => true, - 43 => true, - 44 => true, - 47 => true, - 58 => true, - 59 => true, - 60 => true, - 61 => true, - 62 => true, - 63 => true, - 64 => true, - 91 => true, - 92 => true, - 93 => true, - 94 => true, - 95 => true, - 96 => true, - 123 => true, - 124 => true, - 125 => true, - 126 => true, - 127 => true, - 8800 => true, - 8814 => true, - 8815 => true, -); diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/ignored.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/ignored.php deleted file mode 100644 index b37784413..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/ignored.php +++ /dev/null @@ -1,273 +0,0 @@ - true, - 847 => true, - 6155 => true, - 6156 => true, - 6157 => true, - 8203 => true, - 8288 => true, - 8292 => true, - 65024 => true, - 65025 => true, - 65026 => true, - 65027 => true, - 65028 => true, - 65029 => true, - 65030 => true, - 65031 => true, - 65032 => true, - 65033 => true, - 65034 => true, - 65035 => true, - 65036 => true, - 65037 => true, - 65038 => true, - 65039 => true, - 65279 => true, - 113824 => true, - 113825 => true, - 113826 => true, - 113827 => true, - 917760 => true, - 917761 => true, - 917762 => true, - 917763 => true, - 917764 => true, - 917765 => true, - 917766 => true, - 917767 => true, - 917768 => true, - 917769 => true, - 917770 => true, - 917771 => true, - 917772 => true, - 917773 => true, - 917774 => true, - 917775 => true, - 917776 => true, - 917777 => true, - 917778 => true, - 917779 => true, - 917780 => true, - 917781 => true, - 917782 => true, - 917783 => true, - 917784 => true, - 917785 => true, - 917786 => true, - 917787 => true, - 917788 => true, - 917789 => true, - 917790 => true, - 917791 => true, - 917792 => true, - 917793 => true, - 917794 => true, - 917795 => true, - 917796 => true, - 917797 => true, - 917798 => true, - 917799 => true, - 917800 => true, - 917801 => true, - 917802 => true, - 917803 => true, - 917804 => true, - 917805 => true, - 917806 => true, - 917807 => true, - 917808 => true, - 917809 => true, - 917810 => true, - 917811 => true, - 917812 => true, - 917813 => true, - 917814 => true, - 917815 => true, - 917816 => true, - 917817 => true, - 917818 => true, - 917819 => true, - 917820 => true, - 917821 => true, - 917822 => true, - 917823 => true, - 917824 => true, - 917825 => true, - 917826 => true, - 917827 => true, - 917828 => true, - 917829 => true, - 917830 => true, - 917831 => true, - 917832 => true, - 917833 => true, - 917834 => true, - 917835 => true, - 917836 => true, - 917837 => true, - 917838 => true, - 917839 => true, - 917840 => true, - 917841 => true, - 917842 => true, - 917843 => true, - 917844 => true, - 917845 => true, - 917846 => true, - 917847 => true, - 917848 => true, - 917849 => true, - 917850 => true, - 917851 => true, - 917852 => true, - 917853 => true, - 917854 => true, - 917855 => true, - 917856 => true, - 917857 => true, - 917858 => true, - 917859 => true, - 917860 => true, - 917861 => true, - 917862 => true, - 917863 => true, - 917864 => true, - 917865 => true, - 917866 => true, - 917867 => true, - 917868 => true, - 917869 => true, - 917870 => true, - 917871 => true, - 917872 => true, - 917873 => true, - 917874 => true, - 917875 => true, - 917876 => true, - 917877 => true, - 917878 => true, - 917879 => true, - 917880 => true, - 917881 => true, - 917882 => true, - 917883 => true, - 917884 => true, - 917885 => true, - 917886 => true, - 917887 => true, - 917888 => true, - 917889 => true, - 917890 => true, - 917891 => true, - 917892 => true, - 917893 => true, - 917894 => true, - 917895 => true, - 917896 => true, - 917897 => true, - 917898 => true, - 917899 => true, - 917900 => true, - 917901 => true, - 917902 => true, - 917903 => true, - 917904 => true, - 917905 => true, - 917906 => true, - 917907 => true, - 917908 => true, - 917909 => true, - 917910 => true, - 917911 => true, - 917912 => true, - 917913 => true, - 917914 => true, - 917915 => true, - 917916 => true, - 917917 => true, - 917918 => true, - 917919 => true, - 917920 => true, - 917921 => true, - 917922 => true, - 917923 => true, - 917924 => true, - 917925 => true, - 917926 => true, - 917927 => true, - 917928 => true, - 917929 => true, - 917930 => true, - 917931 => true, - 917932 => true, - 917933 => true, - 917934 => true, - 917935 => true, - 917936 => true, - 917937 => true, - 917938 => true, - 917939 => true, - 917940 => true, - 917941 => true, - 917942 => true, - 917943 => true, - 917944 => true, - 917945 => true, - 917946 => true, - 917947 => true, - 917948 => true, - 917949 => true, - 917950 => true, - 917951 => true, - 917952 => true, - 917953 => true, - 917954 => true, - 917955 => true, - 917956 => true, - 917957 => true, - 917958 => true, - 917959 => true, - 917960 => true, - 917961 => true, - 917962 => true, - 917963 => true, - 917964 => true, - 917965 => true, - 917966 => true, - 917967 => true, - 917968 => true, - 917969 => true, - 917970 => true, - 917971 => true, - 917972 => true, - 917973 => true, - 917974 => true, - 917975 => true, - 917976 => true, - 917977 => true, - 917978 => true, - 917979 => true, - 917980 => true, - 917981 => true, - 917982 => true, - 917983 => true, - 917984 => true, - 917985 => true, - 917986 => true, - 917987 => true, - 917988 => true, - 917989 => true, - 917990 => true, - 917991 => true, - 917992 => true, - 917993 => true, - 917994 => true, - 917995 => true, - 917996 => true, - 917997 => true, - 917998 => true, - 917999 => true, -); diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/mapped.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/mapped.php deleted file mode 100644 index 9b85fe9d3..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/mapped.php +++ /dev/null @@ -1,5778 +0,0 @@ - 'a', - 66 => 'b', - 67 => 'c', - 68 => 'd', - 69 => 'e', - 70 => 'f', - 71 => 'g', - 72 => 'h', - 73 => 'i', - 74 => 'j', - 75 => 'k', - 76 => 'l', - 77 => 'm', - 78 => 'n', - 79 => 'o', - 80 => 'p', - 81 => 'q', - 82 => 'r', - 83 => 's', - 84 => 't', - 85 => 'u', - 86 => 'v', - 87 => 'w', - 88 => 'x', - 89 => 'y', - 90 => 'z', - 170 => 'a', - 178 => '2', - 179 => '3', - 181 => 'μ', - 185 => '1', - 186 => 'o', - 188 => '1⁄4', - 189 => '1⁄2', - 190 => '3⁄4', - 192 => 'à', - 193 => 'á', - 194 => 'â', - 195 => 'ã', - 196 => 'ä', - 197 => 'å', - 198 => 'æ', - 199 => 'ç', - 200 => 'è', - 201 => 'é', - 202 => 'ê', - 203 => 'ë', - 204 => 'ì', - 205 => 'í', - 206 => 'î', - 207 => 'ï', - 208 => 'ð', - 209 => 'ñ', - 210 => 'ò', - 211 => 'ó', - 212 => 'ô', - 213 => 'õ', - 214 => 'ö', - 216 => 'ø', - 217 => 'ù', - 218 => 'ú', - 219 => 'û', - 220 => 'ü', - 221 => 'ý', - 222 => 'þ', - 256 => 'ā', - 258 => 'ă', - 260 => 'ą', - 262 => 'ć', - 264 => 'ĉ', - 266 => 'ċ', - 268 => 'č', - 270 => 'ď', - 272 => 'đ', - 274 => 'ē', - 276 => 'ĕ', - 278 => 'ė', - 280 => 'ę', - 282 => 'ě', - 284 => 'ĝ', - 286 => 'ğ', - 288 => 'ġ', - 290 => 'ģ', - 292 => 'ĥ', - 294 => 'ħ', - 296 => 'ĩ', - 298 => 'ī', - 300 => 'ĭ', - 302 => 'į', - 304 => 'i̇', - 306 => 'ij', - 307 => 'ij', - 308 => 'ĵ', - 310 => 'ķ', - 313 => 'ĺ', - 315 => 'ļ', - 317 => 'ľ', - 319 => 'l·', - 320 => 'l·', - 321 => 'ł', - 323 => 'ń', - 325 => 'ņ', - 327 => 'ň', - 329 => 'ʼn', - 330 => 'ŋ', - 332 => 'ō', - 334 => 'ŏ', - 336 => 'ő', - 338 => 'œ', - 340 => 'ŕ', - 342 => 'ŗ', - 344 => 'ř', - 346 => 'ś', - 348 => 'ŝ', - 350 => 'ş', - 352 => 'š', - 354 => 'ţ', - 356 => 'ť', - 358 => 'ŧ', - 360 => 'ũ', - 362 => 'ū', - 364 => 'ŭ', - 366 => 'ů', - 368 => 'ű', - 370 => 'ų', - 372 => 'ŵ', - 374 => 'ŷ', - 376 => 'ÿ', - 377 => 'ź', - 379 => 'ż', - 381 => 'ž', - 383 => 's', - 385 => 'ɓ', - 386 => 'ƃ', - 388 => 'ƅ', - 390 => 'ɔ', - 391 => 'ƈ', - 393 => 'ɖ', - 394 => 'ɗ', - 395 => 'ƌ', - 398 => 'ǝ', - 399 => 'ə', - 400 => 'ɛ', - 401 => 'ƒ', - 403 => 'ɠ', - 404 => 'ɣ', - 406 => 'ɩ', - 407 => 'ɨ', - 408 => 'ƙ', - 412 => 'ɯ', - 413 => 'ɲ', - 415 => 'ɵ', - 416 => 'ơ', - 418 => 'ƣ', - 420 => 'ƥ', - 422 => 'ʀ', - 423 => 'ƨ', - 425 => 'ʃ', - 428 => 'ƭ', - 430 => 'ʈ', - 431 => 'ư', - 433 => 'ʊ', - 434 => 'ʋ', - 435 => 'ƴ', - 437 => 'ƶ', - 439 => 'ʒ', - 440 => 'ƹ', - 444 => 'ƽ', - 452 => 'dž', - 453 => 'dž', - 454 => 'dž', - 455 => 'lj', - 456 => 'lj', - 457 => 'lj', - 458 => 'nj', - 459 => 'nj', - 460 => 'nj', - 461 => 'ǎ', - 463 => 'ǐ', - 465 => 'ǒ', - 467 => 'ǔ', - 469 => 'ǖ', - 471 => 'ǘ', - 473 => 'ǚ', - 475 => 'ǜ', - 478 => 'ǟ', - 480 => 'ǡ', - 482 => 'ǣ', - 484 => 'ǥ', - 486 => 'ǧ', - 488 => 'ǩ', - 490 => 'ǫ', - 492 => 'ǭ', - 494 => 'ǯ', - 497 => 'dz', - 498 => 'dz', - 499 => 'dz', - 500 => 'ǵ', - 502 => 'ƕ', - 503 => 'ƿ', - 504 => 'ǹ', - 506 => 'ǻ', - 508 => 'ǽ', - 510 => 'ǿ', - 512 => 'ȁ', - 514 => 'ȃ', - 516 => 'ȅ', - 518 => 'ȇ', - 520 => 'ȉ', - 522 => 'ȋ', - 524 => 'ȍ', - 526 => 'ȏ', - 528 => 'ȑ', - 530 => 'ȓ', - 532 => 'ȕ', - 534 => 'ȗ', - 536 => 'ș', - 538 => 'ț', - 540 => 'ȝ', - 542 => 'ȟ', - 544 => 'ƞ', - 546 => 'ȣ', - 548 => 'ȥ', - 550 => 'ȧ', - 552 => 'ȩ', - 554 => 'ȫ', - 556 => 'ȭ', - 558 => 'ȯ', - 560 => 'ȱ', - 562 => 'ȳ', - 570 => 'ⱥ', - 571 => 'ȼ', - 573 => 'ƚ', - 574 => 'ⱦ', - 577 => 'ɂ', - 579 => 'ƀ', - 580 => 'ʉ', - 581 => 'ʌ', - 582 => 'ɇ', - 584 => 'ɉ', - 586 => 'ɋ', - 588 => 'ɍ', - 590 => 'ɏ', - 688 => 'h', - 689 => 'ɦ', - 690 => 'j', - 691 => 'r', - 692 => 'ɹ', - 693 => 'ɻ', - 694 => 'ʁ', - 695 => 'w', - 696 => 'y', - 736 => 'ɣ', - 737 => 'l', - 738 => 's', - 739 => 'x', - 740 => 'ʕ', - 832 => '̀', - 833 => '́', - 835 => '̓', - 836 => '̈́', - 837 => 'ι', - 880 => 'ͱ', - 882 => 'ͳ', - 884 => 'ʹ', - 886 => 'ͷ', - 895 => 'ϳ', - 902 => 'ά', - 903 => '·', - 904 => 'έ', - 905 => 'ή', - 906 => 'ί', - 908 => 'ό', - 910 => 'ύ', - 911 => 'ώ', - 913 => 'α', - 914 => 'β', - 915 => 'γ', - 916 => 'δ', - 917 => 'ε', - 918 => 'ζ', - 919 => 'η', - 920 => 'θ', - 921 => 'ι', - 922 => 'κ', - 923 => 'λ', - 924 => 'μ', - 925 => 'ν', - 926 => 'ξ', - 927 => 'ο', - 928 => 'π', - 929 => 'ρ', - 931 => 'σ', - 932 => 'τ', - 933 => 'υ', - 934 => 'φ', - 935 => 'χ', - 936 => 'ψ', - 937 => 'ω', - 938 => 'ϊ', - 939 => 'ϋ', - 975 => 'ϗ', - 976 => 'β', - 977 => 'θ', - 978 => 'υ', - 979 => 'ύ', - 980 => 'ϋ', - 981 => 'φ', - 982 => 'π', - 984 => 'ϙ', - 986 => 'ϛ', - 988 => 'ϝ', - 990 => 'ϟ', - 992 => 'ϡ', - 994 => 'ϣ', - 996 => 'ϥ', - 998 => 'ϧ', - 1000 => 'ϩ', - 1002 => 'ϫ', - 1004 => 'ϭ', - 1006 => 'ϯ', - 1008 => 'κ', - 1009 => 'ρ', - 1010 => 'σ', - 1012 => 'θ', - 1013 => 'ε', - 1015 => 'ϸ', - 1017 => 'σ', - 1018 => 'ϻ', - 1021 => 'ͻ', - 1022 => 'ͼ', - 1023 => 'ͽ', - 1024 => 'ѐ', - 1025 => 'ё', - 1026 => 'ђ', - 1027 => 'ѓ', - 1028 => 'є', - 1029 => 'ѕ', - 1030 => 'і', - 1031 => 'ї', - 1032 => 'ј', - 1033 => 'љ', - 1034 => 'њ', - 1035 => 'ћ', - 1036 => 'ќ', - 1037 => 'ѝ', - 1038 => 'ў', - 1039 => 'џ', - 1040 => 'а', - 1041 => 'б', - 1042 => 'в', - 1043 => 'г', - 1044 => 'д', - 1045 => 'е', - 1046 => 'ж', - 1047 => 'з', - 1048 => 'и', - 1049 => 'й', - 1050 => 'к', - 1051 => 'л', - 1052 => 'м', - 1053 => 'н', - 1054 => 'о', - 1055 => 'п', - 1056 => 'р', - 1057 => 'с', - 1058 => 'т', - 1059 => 'у', - 1060 => 'ф', - 1061 => 'х', - 1062 => 'ц', - 1063 => 'ч', - 1064 => 'ш', - 1065 => 'щ', - 1066 => 'ъ', - 1067 => 'ы', - 1068 => 'ь', - 1069 => 'э', - 1070 => 'ю', - 1071 => 'я', - 1120 => 'ѡ', - 1122 => 'ѣ', - 1124 => 'ѥ', - 1126 => 'ѧ', - 1128 => 'ѩ', - 1130 => 'ѫ', - 1132 => 'ѭ', - 1134 => 'ѯ', - 1136 => 'ѱ', - 1138 => 'ѳ', - 1140 => 'ѵ', - 1142 => 'ѷ', - 1144 => 'ѹ', - 1146 => 'ѻ', - 1148 => 'ѽ', - 1150 => 'ѿ', - 1152 => 'ҁ', - 1162 => 'ҋ', - 1164 => 'ҍ', - 1166 => 'ҏ', - 1168 => 'ґ', - 1170 => 'ғ', - 1172 => 'ҕ', - 1174 => 'җ', - 1176 => 'ҙ', - 1178 => 'қ', - 1180 => 'ҝ', - 1182 => 'ҟ', - 1184 => 'ҡ', - 1186 => 'ң', - 1188 => 'ҥ', - 1190 => 'ҧ', - 1192 => 'ҩ', - 1194 => 'ҫ', - 1196 => 'ҭ', - 1198 => 'ү', - 1200 => 'ұ', - 1202 => 'ҳ', - 1204 => 'ҵ', - 1206 => 'ҷ', - 1208 => 'ҹ', - 1210 => 'һ', - 1212 => 'ҽ', - 1214 => 'ҿ', - 1217 => 'ӂ', - 1219 => 'ӄ', - 1221 => 'ӆ', - 1223 => 'ӈ', - 1225 => 'ӊ', - 1227 => 'ӌ', - 1229 => 'ӎ', - 1232 => 'ӑ', - 1234 => 'ӓ', - 1236 => 'ӕ', - 1238 => 'ӗ', - 1240 => 'ә', - 1242 => 'ӛ', - 1244 => 'ӝ', - 1246 => 'ӟ', - 1248 => 'ӡ', - 1250 => 'ӣ', - 1252 => 'ӥ', - 1254 => 'ӧ', - 1256 => 'ө', - 1258 => 'ӫ', - 1260 => 'ӭ', - 1262 => 'ӯ', - 1264 => 'ӱ', - 1266 => 'ӳ', - 1268 => 'ӵ', - 1270 => 'ӷ', - 1272 => 'ӹ', - 1274 => 'ӻ', - 1276 => 'ӽ', - 1278 => 'ӿ', - 1280 => 'ԁ', - 1282 => 'ԃ', - 1284 => 'ԅ', - 1286 => 'ԇ', - 1288 => 'ԉ', - 1290 => 'ԋ', - 1292 => 'ԍ', - 1294 => 'ԏ', - 1296 => 'ԑ', - 1298 => 'ԓ', - 1300 => 'ԕ', - 1302 => 'ԗ', - 1304 => 'ԙ', - 1306 => 'ԛ', - 1308 => 'ԝ', - 1310 => 'ԟ', - 1312 => 'ԡ', - 1314 => 'ԣ', - 1316 => 'ԥ', - 1318 => 'ԧ', - 1320 => 'ԩ', - 1322 => 'ԫ', - 1324 => 'ԭ', - 1326 => 'ԯ', - 1329 => 'ա', - 1330 => 'բ', - 1331 => 'գ', - 1332 => 'դ', - 1333 => 'ե', - 1334 => 'զ', - 1335 => 'է', - 1336 => 'ը', - 1337 => 'թ', - 1338 => 'ժ', - 1339 => 'ի', - 1340 => 'լ', - 1341 => 'խ', - 1342 => 'ծ', - 1343 => 'կ', - 1344 => 'հ', - 1345 => 'ձ', - 1346 => 'ղ', - 1347 => 'ճ', - 1348 => 'մ', - 1349 => 'յ', - 1350 => 'ն', - 1351 => 'շ', - 1352 => 'ո', - 1353 => 'չ', - 1354 => 'պ', - 1355 => 'ջ', - 1356 => 'ռ', - 1357 => 'ս', - 1358 => 'վ', - 1359 => 'տ', - 1360 => 'ր', - 1361 => 'ց', - 1362 => 'ւ', - 1363 => 'փ', - 1364 => 'ք', - 1365 => 'օ', - 1366 => 'ֆ', - 1415 => 'եւ', - 1653 => 'اٴ', - 1654 => 'وٴ', - 1655 => 'ۇٴ', - 1656 => 'يٴ', - 2392 => 'क़', - 2393 => 'ख़', - 2394 => 'ग़', - 2395 => 'ज़', - 2396 => 'ड़', - 2397 => 'ढ़', - 2398 => 'फ़', - 2399 => 'य़', - 2524 => 'ড়', - 2525 => 'ঢ়', - 2527 => 'য়', - 2611 => 'ਲ਼', - 2614 => 'ਸ਼', - 2649 => 'ਖ਼', - 2650 => 'ਗ਼', - 2651 => 'ਜ਼', - 2654 => 'ਫ਼', - 2908 => 'ଡ଼', - 2909 => 'ଢ଼', - 3635 => 'ํา', - 3763 => 'ໍາ', - 3804 => 'ຫນ', - 3805 => 'ຫມ', - 3852 => '་', - 3907 => 'གྷ', - 3917 => 'ཌྷ', - 3922 => 'དྷ', - 3927 => 'བྷ', - 3932 => 'ཛྷ', - 3945 => 'ཀྵ', - 3955 => 'ཱི', - 3957 => 'ཱུ', - 3958 => 'ྲྀ', - 3959 => 'ྲཱྀ', - 3960 => 'ླྀ', - 3961 => 'ླཱྀ', - 3969 => 'ཱྀ', - 3987 => 'ྒྷ', - 3997 => 'ྜྷ', - 4002 => 'ྡྷ', - 4007 => 'ྦྷ', - 4012 => 'ྫྷ', - 4025 => 'ྐྵ', - 4295 => 'ⴧ', - 4301 => 'ⴭ', - 4348 => 'ნ', - 5112 => 'Ᏸ', - 5113 => 'Ᏹ', - 5114 => 'Ᏺ', - 5115 => 'Ᏻ', - 5116 => 'Ᏼ', - 5117 => 'Ᏽ', - 7296 => 'в', - 7297 => 'д', - 7298 => 'о', - 7299 => 'с', - 7300 => 'т', - 7301 => 'т', - 7302 => 'ъ', - 7303 => 'ѣ', - 7304 => 'ꙋ', - 7312 => 'ა', - 7313 => 'ბ', - 7314 => 'გ', - 7315 => 'დ', - 7316 => 'ე', - 7317 => 'ვ', - 7318 => 'ზ', - 7319 => 'თ', - 7320 => 'ი', - 7321 => 'კ', - 7322 => 'ლ', - 7323 => 'მ', - 7324 => 'ნ', - 7325 => 'ო', - 7326 => 'პ', - 7327 => 'ჟ', - 7328 => 'რ', - 7329 => 'ს', - 7330 => 'ტ', - 7331 => 'უ', - 7332 => 'ფ', - 7333 => 'ქ', - 7334 => 'ღ', - 7335 => 'ყ', - 7336 => 'შ', - 7337 => 'ჩ', - 7338 => 'ც', - 7339 => 'ძ', - 7340 => 'წ', - 7341 => 'ჭ', - 7342 => 'ხ', - 7343 => 'ჯ', - 7344 => 'ჰ', - 7345 => 'ჱ', - 7346 => 'ჲ', - 7347 => 'ჳ', - 7348 => 'ჴ', - 7349 => 'ჵ', - 7350 => 'ჶ', - 7351 => 'ჷ', - 7352 => 'ჸ', - 7353 => 'ჹ', - 7354 => 'ჺ', - 7357 => 'ჽ', - 7358 => 'ჾ', - 7359 => 'ჿ', - 7468 => 'a', - 7469 => 'æ', - 7470 => 'b', - 7472 => 'd', - 7473 => 'e', - 7474 => 'ǝ', - 7475 => 'g', - 7476 => 'h', - 7477 => 'i', - 7478 => 'j', - 7479 => 'k', - 7480 => 'l', - 7481 => 'm', - 7482 => 'n', - 7484 => 'o', - 7485 => 'ȣ', - 7486 => 'p', - 7487 => 'r', - 7488 => 't', - 7489 => 'u', - 7490 => 'w', - 7491 => 'a', - 7492 => 'ɐ', - 7493 => 'ɑ', - 7494 => 'ᴂ', - 7495 => 'b', - 7496 => 'd', - 7497 => 'e', - 7498 => 'ə', - 7499 => 'ɛ', - 7500 => 'ɜ', - 7501 => 'g', - 7503 => 'k', - 7504 => 'm', - 7505 => 'ŋ', - 7506 => 'o', - 7507 => 'ɔ', - 7508 => 'ᴖ', - 7509 => 'ᴗ', - 7510 => 'p', - 7511 => 't', - 7512 => 'u', - 7513 => 'ᴝ', - 7514 => 'ɯ', - 7515 => 'v', - 7516 => 'ᴥ', - 7517 => 'β', - 7518 => 'γ', - 7519 => 'δ', - 7520 => 'φ', - 7521 => 'χ', - 7522 => 'i', - 7523 => 'r', - 7524 => 'u', - 7525 => 'v', - 7526 => 'β', - 7527 => 'γ', - 7528 => 'ρ', - 7529 => 'φ', - 7530 => 'χ', - 7544 => 'н', - 7579 => 'ɒ', - 7580 => 'c', - 7581 => 'ɕ', - 7582 => 'ð', - 7583 => 'ɜ', - 7584 => 'f', - 7585 => 'ɟ', - 7586 => 'ɡ', - 7587 => 'ɥ', - 7588 => 'ɨ', - 7589 => 'ɩ', - 7590 => 'ɪ', - 7591 => 'ᵻ', - 7592 => 'ʝ', - 7593 => 'ɭ', - 7594 => 'ᶅ', - 7595 => 'ʟ', - 7596 => 'ɱ', - 7597 => 'ɰ', - 7598 => 'ɲ', - 7599 => 'ɳ', - 7600 => 'ɴ', - 7601 => 'ɵ', - 7602 => 'ɸ', - 7603 => 'ʂ', - 7604 => 'ʃ', - 7605 => 'ƫ', - 7606 => 'ʉ', - 7607 => 'ʊ', - 7608 => 'ᴜ', - 7609 => 'ʋ', - 7610 => 'ʌ', - 7611 => 'z', - 7612 => 'ʐ', - 7613 => 'ʑ', - 7614 => 'ʒ', - 7615 => 'θ', - 7680 => 'ḁ', - 7682 => 'ḃ', - 7684 => 'ḅ', - 7686 => 'ḇ', - 7688 => 'ḉ', - 7690 => 'ḋ', - 7692 => 'ḍ', - 7694 => 'ḏ', - 7696 => 'ḑ', - 7698 => 'ḓ', - 7700 => 'ḕ', - 7702 => 'ḗ', - 7704 => 'ḙ', - 7706 => 'ḛ', - 7708 => 'ḝ', - 7710 => 'ḟ', - 7712 => 'ḡ', - 7714 => 'ḣ', - 7716 => 'ḥ', - 7718 => 'ḧ', - 7720 => 'ḩ', - 7722 => 'ḫ', - 7724 => 'ḭ', - 7726 => 'ḯ', - 7728 => 'ḱ', - 7730 => 'ḳ', - 7732 => 'ḵ', - 7734 => 'ḷ', - 7736 => 'ḹ', - 7738 => 'ḻ', - 7740 => 'ḽ', - 7742 => 'ḿ', - 7744 => 'ṁ', - 7746 => 'ṃ', - 7748 => 'ṅ', - 7750 => 'ṇ', - 7752 => 'ṉ', - 7754 => 'ṋ', - 7756 => 'ṍ', - 7758 => 'ṏ', - 7760 => 'ṑ', - 7762 => 'ṓ', - 7764 => 'ṕ', - 7766 => 'ṗ', - 7768 => 'ṙ', - 7770 => 'ṛ', - 7772 => 'ṝ', - 7774 => 'ṟ', - 7776 => 'ṡ', - 7778 => 'ṣ', - 7780 => 'ṥ', - 7782 => 'ṧ', - 7784 => 'ṩ', - 7786 => 'ṫ', - 7788 => 'ṭ', - 7790 => 'ṯ', - 7792 => 'ṱ', - 7794 => 'ṳ', - 7796 => 'ṵ', - 7798 => 'ṷ', - 7800 => 'ṹ', - 7802 => 'ṻ', - 7804 => 'ṽ', - 7806 => 'ṿ', - 7808 => 'ẁ', - 7810 => 'ẃ', - 7812 => 'ẅ', - 7814 => 'ẇ', - 7816 => 'ẉ', - 7818 => 'ẋ', - 7820 => 'ẍ', - 7822 => 'ẏ', - 7824 => 'ẑ', - 7826 => 'ẓ', - 7828 => 'ẕ', - 7834 => 'aʾ', - 7835 => 'ṡ', - 7838 => 'ss', - 7840 => 'ạ', - 7842 => 'ả', - 7844 => 'ấ', - 7846 => 'ầ', - 7848 => 'ẩ', - 7850 => 'ẫ', - 7852 => 'ậ', - 7854 => 'ắ', - 7856 => 'ằ', - 7858 => 'ẳ', - 7860 => 'ẵ', - 7862 => 'ặ', - 7864 => 'ẹ', - 7866 => 'ẻ', - 7868 => 'ẽ', - 7870 => 'ế', - 7872 => 'ề', - 7874 => 'ể', - 7876 => 'ễ', - 7878 => 'ệ', - 7880 => 'ỉ', - 7882 => 'ị', - 7884 => 'ọ', - 7886 => 'ỏ', - 7888 => 'ố', - 7890 => 'ồ', - 7892 => 'ổ', - 7894 => 'ỗ', - 7896 => 'ộ', - 7898 => 'ớ', - 7900 => 'ờ', - 7902 => 'ở', - 7904 => 'ỡ', - 7906 => 'ợ', - 7908 => 'ụ', - 7910 => 'ủ', - 7912 => 'ứ', - 7914 => 'ừ', - 7916 => 'ử', - 7918 => 'ữ', - 7920 => 'ự', - 7922 => 'ỳ', - 7924 => 'ỵ', - 7926 => 'ỷ', - 7928 => 'ỹ', - 7930 => 'ỻ', - 7932 => 'ỽ', - 7934 => 'ỿ', - 7944 => 'ἀ', - 7945 => 'ἁ', - 7946 => 'ἂ', - 7947 => 'ἃ', - 7948 => 'ἄ', - 7949 => 'ἅ', - 7950 => 'ἆ', - 7951 => 'ἇ', - 7960 => 'ἐ', - 7961 => 'ἑ', - 7962 => 'ἒ', - 7963 => 'ἓ', - 7964 => 'ἔ', - 7965 => 'ἕ', - 7976 => 'ἠ', - 7977 => 'ἡ', - 7978 => 'ἢ', - 7979 => 'ἣ', - 7980 => 'ἤ', - 7981 => 'ἥ', - 7982 => 'ἦ', - 7983 => 'ἧ', - 7992 => 'ἰ', - 7993 => 'ἱ', - 7994 => 'ἲ', - 7995 => 'ἳ', - 7996 => 'ἴ', - 7997 => 'ἵ', - 7998 => 'ἶ', - 7999 => 'ἷ', - 8008 => 'ὀ', - 8009 => 'ὁ', - 8010 => 'ὂ', - 8011 => 'ὃ', - 8012 => 'ὄ', - 8013 => 'ὅ', - 8025 => 'ὑ', - 8027 => 'ὓ', - 8029 => 'ὕ', - 8031 => 'ὗ', - 8040 => 'ὠ', - 8041 => 'ὡ', - 8042 => 'ὢ', - 8043 => 'ὣ', - 8044 => 'ὤ', - 8045 => 'ὥ', - 8046 => 'ὦ', - 8047 => 'ὧ', - 8049 => 'ά', - 8051 => 'έ', - 8053 => 'ή', - 8055 => 'ί', - 8057 => 'ό', - 8059 => 'ύ', - 8061 => 'ώ', - 8064 => 'ἀι', - 8065 => 'ἁι', - 8066 => 'ἂι', - 8067 => 'ἃι', - 8068 => 'ἄι', - 8069 => 'ἅι', - 8070 => 'ἆι', - 8071 => 'ἇι', - 8072 => 'ἀι', - 8073 => 'ἁι', - 8074 => 'ἂι', - 8075 => 'ἃι', - 8076 => 'ἄι', - 8077 => 'ἅι', - 8078 => 'ἆι', - 8079 => 'ἇι', - 8080 => 'ἠι', - 8081 => 'ἡι', - 8082 => 'ἢι', - 8083 => 'ἣι', - 8084 => 'ἤι', - 8085 => 'ἥι', - 8086 => 'ἦι', - 8087 => 'ἧι', - 8088 => 'ἠι', - 8089 => 'ἡι', - 8090 => 'ἢι', - 8091 => 'ἣι', - 8092 => 'ἤι', - 8093 => 'ἥι', - 8094 => 'ἦι', - 8095 => 'ἧι', - 8096 => 'ὠι', - 8097 => 'ὡι', - 8098 => 'ὢι', - 8099 => 'ὣι', - 8100 => 'ὤι', - 8101 => 'ὥι', - 8102 => 'ὦι', - 8103 => 'ὧι', - 8104 => 'ὠι', - 8105 => 'ὡι', - 8106 => 'ὢι', - 8107 => 'ὣι', - 8108 => 'ὤι', - 8109 => 'ὥι', - 8110 => 'ὦι', - 8111 => 'ὧι', - 8114 => 'ὰι', - 8115 => 'αι', - 8116 => 'άι', - 8119 => 'ᾶι', - 8120 => 'ᾰ', - 8121 => 'ᾱ', - 8122 => 'ὰ', - 8123 => 'ά', - 8124 => 'αι', - 8126 => 'ι', - 8130 => 'ὴι', - 8131 => 'ηι', - 8132 => 'ήι', - 8135 => 'ῆι', - 8136 => 'ὲ', - 8137 => 'έ', - 8138 => 'ὴ', - 8139 => 'ή', - 8140 => 'ηι', - 8147 => 'ΐ', - 8152 => 'ῐ', - 8153 => 'ῑ', - 8154 => 'ὶ', - 8155 => 'ί', - 8163 => 'ΰ', - 8168 => 'ῠ', - 8169 => 'ῡ', - 8170 => 'ὺ', - 8171 => 'ύ', - 8172 => 'ῥ', - 8178 => 'ὼι', - 8179 => 'ωι', - 8180 => 'ώι', - 8183 => 'ῶι', - 8184 => 'ὸ', - 8185 => 'ό', - 8186 => 'ὼ', - 8187 => 'ώ', - 8188 => 'ωι', - 8209 => '‐', - 8243 => '′′', - 8244 => '′′′', - 8246 => '‵‵', - 8247 => '‵‵‵', - 8279 => '′′′′', - 8304 => '0', - 8305 => 'i', - 8308 => '4', - 8309 => '5', - 8310 => '6', - 8311 => '7', - 8312 => '8', - 8313 => '9', - 8315 => '−', - 8319 => 'n', - 8320 => '0', - 8321 => '1', - 8322 => '2', - 8323 => '3', - 8324 => '4', - 8325 => '5', - 8326 => '6', - 8327 => '7', - 8328 => '8', - 8329 => '9', - 8331 => '−', - 8336 => 'a', - 8337 => 'e', - 8338 => 'o', - 8339 => 'x', - 8340 => 'ə', - 8341 => 'h', - 8342 => 'k', - 8343 => 'l', - 8344 => 'm', - 8345 => 'n', - 8346 => 'p', - 8347 => 's', - 8348 => 't', - 8360 => 'rs', - 8450 => 'c', - 8451 => '°c', - 8455 => 'ɛ', - 8457 => '°f', - 8458 => 'g', - 8459 => 'h', - 8460 => 'h', - 8461 => 'h', - 8462 => 'h', - 8463 => 'ħ', - 8464 => 'i', - 8465 => 'i', - 8466 => 'l', - 8467 => 'l', - 8469 => 'n', - 8470 => 'no', - 8473 => 'p', - 8474 => 'q', - 8475 => 'r', - 8476 => 'r', - 8477 => 'r', - 8480 => 'sm', - 8481 => 'tel', - 8482 => 'tm', - 8484 => 'z', - 8486 => 'ω', - 8488 => 'z', - 8490 => 'k', - 8491 => 'å', - 8492 => 'b', - 8493 => 'c', - 8495 => 'e', - 8496 => 'e', - 8497 => 'f', - 8499 => 'm', - 8500 => 'o', - 8501 => 'א', - 8502 => 'ב', - 8503 => 'ג', - 8504 => 'ד', - 8505 => 'i', - 8507 => 'fax', - 8508 => 'π', - 8509 => 'γ', - 8510 => 'γ', - 8511 => 'π', - 8512 => '∑', - 8517 => 'd', - 8518 => 'd', - 8519 => 'e', - 8520 => 'i', - 8521 => 'j', - 8528 => '1⁄7', - 8529 => '1⁄9', - 8530 => '1⁄10', - 8531 => '1⁄3', - 8532 => '2⁄3', - 8533 => '1⁄5', - 8534 => '2⁄5', - 8535 => '3⁄5', - 8536 => '4⁄5', - 8537 => '1⁄6', - 8538 => '5⁄6', - 8539 => '1⁄8', - 8540 => '3⁄8', - 8541 => '5⁄8', - 8542 => '7⁄8', - 8543 => '1⁄', - 8544 => 'i', - 8545 => 'ii', - 8546 => 'iii', - 8547 => 'iv', - 8548 => 'v', - 8549 => 'vi', - 8550 => 'vii', - 8551 => 'viii', - 8552 => 'ix', - 8553 => 'x', - 8554 => 'xi', - 8555 => 'xii', - 8556 => 'l', - 8557 => 'c', - 8558 => 'd', - 8559 => 'm', - 8560 => 'i', - 8561 => 'ii', - 8562 => 'iii', - 8563 => 'iv', - 8564 => 'v', - 8565 => 'vi', - 8566 => 'vii', - 8567 => 'viii', - 8568 => 'ix', - 8569 => 'x', - 8570 => 'xi', - 8571 => 'xii', - 8572 => 'l', - 8573 => 'c', - 8574 => 'd', - 8575 => 'm', - 8585 => '0⁄3', - 8748 => '∫∫', - 8749 => '∫∫∫', - 8751 => '∮∮', - 8752 => '∮∮∮', - 9001 => '〈', - 9002 => '〉', - 9312 => '1', - 9313 => '2', - 9314 => '3', - 9315 => '4', - 9316 => '5', - 9317 => '6', - 9318 => '7', - 9319 => '8', - 9320 => '9', - 9321 => '10', - 9322 => '11', - 9323 => '12', - 9324 => '13', - 9325 => '14', - 9326 => '15', - 9327 => '16', - 9328 => '17', - 9329 => '18', - 9330 => '19', - 9331 => '20', - 9398 => 'a', - 9399 => 'b', - 9400 => 'c', - 9401 => 'd', - 9402 => 'e', - 9403 => 'f', - 9404 => 'g', - 9405 => 'h', - 9406 => 'i', - 9407 => 'j', - 9408 => 'k', - 9409 => 'l', - 9410 => 'm', - 9411 => 'n', - 9412 => 'o', - 9413 => 'p', - 9414 => 'q', - 9415 => 'r', - 9416 => 's', - 9417 => 't', - 9418 => 'u', - 9419 => 'v', - 9420 => 'w', - 9421 => 'x', - 9422 => 'y', - 9423 => 'z', - 9424 => 'a', - 9425 => 'b', - 9426 => 'c', - 9427 => 'd', - 9428 => 'e', - 9429 => 'f', - 9430 => 'g', - 9431 => 'h', - 9432 => 'i', - 9433 => 'j', - 9434 => 'k', - 9435 => 'l', - 9436 => 'm', - 9437 => 'n', - 9438 => 'o', - 9439 => 'p', - 9440 => 'q', - 9441 => 'r', - 9442 => 's', - 9443 => 't', - 9444 => 'u', - 9445 => 'v', - 9446 => 'w', - 9447 => 'x', - 9448 => 'y', - 9449 => 'z', - 9450 => '0', - 10764 => '∫∫∫∫', - 10972 => '⫝̸', - 11264 => 'ⰰ', - 11265 => 'ⰱ', - 11266 => 'ⰲ', - 11267 => 'ⰳ', - 11268 => 'ⰴ', - 11269 => 'ⰵ', - 11270 => 'ⰶ', - 11271 => 'ⰷ', - 11272 => 'ⰸ', - 11273 => 'ⰹ', - 11274 => 'ⰺ', - 11275 => 'ⰻ', - 11276 => 'ⰼ', - 11277 => 'ⰽ', - 11278 => 'ⰾ', - 11279 => 'ⰿ', - 11280 => 'ⱀ', - 11281 => 'ⱁ', - 11282 => 'ⱂ', - 11283 => 'ⱃ', - 11284 => 'ⱄ', - 11285 => 'ⱅ', - 11286 => 'ⱆ', - 11287 => 'ⱇ', - 11288 => 'ⱈ', - 11289 => 'ⱉ', - 11290 => 'ⱊ', - 11291 => 'ⱋ', - 11292 => 'ⱌ', - 11293 => 'ⱍ', - 11294 => 'ⱎ', - 11295 => 'ⱏ', - 11296 => 'ⱐ', - 11297 => 'ⱑ', - 11298 => 'ⱒ', - 11299 => 'ⱓ', - 11300 => 'ⱔ', - 11301 => 'ⱕ', - 11302 => 'ⱖ', - 11303 => 'ⱗ', - 11304 => 'ⱘ', - 11305 => 'ⱙ', - 11306 => 'ⱚ', - 11307 => 'ⱛ', - 11308 => 'ⱜ', - 11309 => 'ⱝ', - 11310 => 'ⱞ', - 11360 => 'ⱡ', - 11362 => 'ɫ', - 11363 => 'ᵽ', - 11364 => 'ɽ', - 11367 => 'ⱨ', - 11369 => 'ⱪ', - 11371 => 'ⱬ', - 11373 => 'ɑ', - 11374 => 'ɱ', - 11375 => 'ɐ', - 11376 => 'ɒ', - 11378 => 'ⱳ', - 11381 => 'ⱶ', - 11388 => 'j', - 11389 => 'v', - 11390 => 'ȿ', - 11391 => 'ɀ', - 11392 => 'ⲁ', - 11394 => 'ⲃ', - 11396 => 'ⲅ', - 11398 => 'ⲇ', - 11400 => 'ⲉ', - 11402 => 'ⲋ', - 11404 => 'ⲍ', - 11406 => 'ⲏ', - 11408 => 'ⲑ', - 11410 => 'ⲓ', - 11412 => 'ⲕ', - 11414 => 'ⲗ', - 11416 => 'ⲙ', - 11418 => 'ⲛ', - 11420 => 'ⲝ', - 11422 => 'ⲟ', - 11424 => 'ⲡ', - 11426 => 'ⲣ', - 11428 => 'ⲥ', - 11430 => 'ⲧ', - 11432 => 'ⲩ', - 11434 => 'ⲫ', - 11436 => 'ⲭ', - 11438 => 'ⲯ', - 11440 => 'ⲱ', - 11442 => 'ⲳ', - 11444 => 'ⲵ', - 11446 => 'ⲷ', - 11448 => 'ⲹ', - 11450 => 'ⲻ', - 11452 => 'ⲽ', - 11454 => 'ⲿ', - 11456 => 'ⳁ', - 11458 => 'ⳃ', - 11460 => 'ⳅ', - 11462 => 'ⳇ', - 11464 => 'ⳉ', - 11466 => 'ⳋ', - 11468 => 'ⳍ', - 11470 => 'ⳏ', - 11472 => 'ⳑ', - 11474 => 'ⳓ', - 11476 => 'ⳕ', - 11478 => 'ⳗ', - 11480 => 'ⳙ', - 11482 => 'ⳛ', - 11484 => 'ⳝ', - 11486 => 'ⳟ', - 11488 => 'ⳡ', - 11490 => 'ⳣ', - 11499 => 'ⳬ', - 11501 => 'ⳮ', - 11506 => 'ⳳ', - 11631 => 'ⵡ', - 11935 => '母', - 12019 => '龟', - 12032 => '一', - 12033 => '丨', - 12034 => '丶', - 12035 => '丿', - 12036 => '乙', - 12037 => '亅', - 12038 => '二', - 12039 => '亠', - 12040 => '人', - 12041 => '儿', - 12042 => '入', - 12043 => '八', - 12044 => '冂', - 12045 => '冖', - 12046 => '冫', - 12047 => '几', - 12048 => '凵', - 12049 => '刀', - 12050 => '力', - 12051 => '勹', - 12052 => '匕', - 12053 => '匚', - 12054 => '匸', - 12055 => '十', - 12056 => '卜', - 12057 => '卩', - 12058 => '厂', - 12059 => '厶', - 12060 => '又', - 12061 => '口', - 12062 => '囗', - 12063 => '土', - 12064 => '士', - 12065 => '夂', - 12066 => '夊', - 12067 => '夕', - 12068 => '大', - 12069 => '女', - 12070 => '子', - 12071 => '宀', - 12072 => '寸', - 12073 => '小', - 12074 => '尢', - 12075 => '尸', - 12076 => '屮', - 12077 => '山', - 12078 => '巛', - 12079 => '工', - 12080 => '己', - 12081 => '巾', - 12082 => '干', - 12083 => '幺', - 12084 => '广', - 12085 => '廴', - 12086 => '廾', - 12087 => '弋', - 12088 => '弓', - 12089 => '彐', - 12090 => '彡', - 12091 => '彳', - 12092 => '心', - 12093 => '戈', - 12094 => '戶', - 12095 => '手', - 12096 => '支', - 12097 => '攴', - 12098 => '文', - 12099 => '斗', - 12100 => '斤', - 12101 => '方', - 12102 => '无', - 12103 => '日', - 12104 => '曰', - 12105 => '月', - 12106 => '木', - 12107 => '欠', - 12108 => '止', - 12109 => '歹', - 12110 => '殳', - 12111 => '毋', - 12112 => '比', - 12113 => '毛', - 12114 => '氏', - 12115 => '气', - 12116 => '水', - 12117 => '火', - 12118 => '爪', - 12119 => '父', - 12120 => '爻', - 12121 => '爿', - 12122 => '片', - 12123 => '牙', - 12124 => '牛', - 12125 => '犬', - 12126 => '玄', - 12127 => '玉', - 12128 => '瓜', - 12129 => '瓦', - 12130 => '甘', - 12131 => '生', - 12132 => '用', - 12133 => '田', - 12134 => '疋', - 12135 => '疒', - 12136 => '癶', - 12137 => '白', - 12138 => '皮', - 12139 => '皿', - 12140 => '目', - 12141 => '矛', - 12142 => '矢', - 12143 => '石', - 12144 => '示', - 12145 => '禸', - 12146 => '禾', - 12147 => '穴', - 12148 => '立', - 12149 => '竹', - 12150 => '米', - 12151 => '糸', - 12152 => '缶', - 12153 => '网', - 12154 => '羊', - 12155 => '羽', - 12156 => '老', - 12157 => '而', - 12158 => '耒', - 12159 => '耳', - 12160 => '聿', - 12161 => '肉', - 12162 => '臣', - 12163 => '自', - 12164 => '至', - 12165 => '臼', - 12166 => '舌', - 12167 => '舛', - 12168 => '舟', - 12169 => '艮', - 12170 => '色', - 12171 => '艸', - 12172 => '虍', - 12173 => '虫', - 12174 => '血', - 12175 => '行', - 12176 => '衣', - 12177 => '襾', - 12178 => '見', - 12179 => '角', - 12180 => '言', - 12181 => '谷', - 12182 => '豆', - 12183 => '豕', - 12184 => '豸', - 12185 => '貝', - 12186 => '赤', - 12187 => '走', - 12188 => '足', - 12189 => '身', - 12190 => '車', - 12191 => '辛', - 12192 => '辰', - 12193 => '辵', - 12194 => '邑', - 12195 => '酉', - 12196 => '釆', - 12197 => '里', - 12198 => '金', - 12199 => '長', - 12200 => '門', - 12201 => '阜', - 12202 => '隶', - 12203 => '隹', - 12204 => '雨', - 12205 => '靑', - 12206 => '非', - 12207 => '面', - 12208 => '革', - 12209 => '韋', - 12210 => '韭', - 12211 => '音', - 12212 => '頁', - 12213 => '風', - 12214 => '飛', - 12215 => '食', - 12216 => '首', - 12217 => '香', - 12218 => '馬', - 12219 => '骨', - 12220 => '高', - 12221 => '髟', - 12222 => '鬥', - 12223 => '鬯', - 12224 => '鬲', - 12225 => '鬼', - 12226 => '魚', - 12227 => '鳥', - 12228 => '鹵', - 12229 => '鹿', - 12230 => '麥', - 12231 => '麻', - 12232 => '黃', - 12233 => '黍', - 12234 => '黑', - 12235 => '黹', - 12236 => '黽', - 12237 => '鼎', - 12238 => '鼓', - 12239 => '鼠', - 12240 => '鼻', - 12241 => '齊', - 12242 => '齒', - 12243 => '龍', - 12244 => '龜', - 12245 => '龠', - 12290 => '.', - 12342 => '〒', - 12344 => '十', - 12345 => '卄', - 12346 => '卅', - 12447 => 'より', - 12543 => 'コト', - 12593 => 'ᄀ', - 12594 => 'ᄁ', - 12595 => 'ᆪ', - 12596 => 'ᄂ', - 12597 => 'ᆬ', - 12598 => 'ᆭ', - 12599 => 'ᄃ', - 12600 => 'ᄄ', - 12601 => 'ᄅ', - 12602 => 'ᆰ', - 12603 => 'ᆱ', - 12604 => 'ᆲ', - 12605 => 'ᆳ', - 12606 => 'ᆴ', - 12607 => 'ᆵ', - 12608 => 'ᄚ', - 12609 => 'ᄆ', - 12610 => 'ᄇ', - 12611 => 'ᄈ', - 12612 => 'ᄡ', - 12613 => 'ᄉ', - 12614 => 'ᄊ', - 12615 => 'ᄋ', - 12616 => 'ᄌ', - 12617 => 'ᄍ', - 12618 => 'ᄎ', - 12619 => 'ᄏ', - 12620 => 'ᄐ', - 12621 => 'ᄑ', - 12622 => 'ᄒ', - 12623 => 'ᅡ', - 12624 => 'ᅢ', - 12625 => 'ᅣ', - 12626 => 'ᅤ', - 12627 => 'ᅥ', - 12628 => 'ᅦ', - 12629 => 'ᅧ', - 12630 => 'ᅨ', - 12631 => 'ᅩ', - 12632 => 'ᅪ', - 12633 => 'ᅫ', - 12634 => 'ᅬ', - 12635 => 'ᅭ', - 12636 => 'ᅮ', - 12637 => 'ᅯ', - 12638 => 'ᅰ', - 12639 => 'ᅱ', - 12640 => 'ᅲ', - 12641 => 'ᅳ', - 12642 => 'ᅴ', - 12643 => 'ᅵ', - 12645 => 'ᄔ', - 12646 => 'ᄕ', - 12647 => 'ᇇ', - 12648 => 'ᇈ', - 12649 => 'ᇌ', - 12650 => 'ᇎ', - 12651 => 'ᇓ', - 12652 => 'ᇗ', - 12653 => 'ᇙ', - 12654 => 'ᄜ', - 12655 => 'ᇝ', - 12656 => 'ᇟ', - 12657 => 'ᄝ', - 12658 => 'ᄞ', - 12659 => 'ᄠ', - 12660 => 'ᄢ', - 12661 => 'ᄣ', - 12662 => 'ᄧ', - 12663 => 'ᄩ', - 12664 => 'ᄫ', - 12665 => 'ᄬ', - 12666 => 'ᄭ', - 12667 => 'ᄮ', - 12668 => 'ᄯ', - 12669 => 'ᄲ', - 12670 => 'ᄶ', - 12671 => 'ᅀ', - 12672 => 'ᅇ', - 12673 => 'ᅌ', - 12674 => 'ᇱ', - 12675 => 'ᇲ', - 12676 => 'ᅗ', - 12677 => 'ᅘ', - 12678 => 'ᅙ', - 12679 => 'ᆄ', - 12680 => 'ᆅ', - 12681 => 'ᆈ', - 12682 => 'ᆑ', - 12683 => 'ᆒ', - 12684 => 'ᆔ', - 12685 => 'ᆞ', - 12686 => 'ᆡ', - 12690 => '一', - 12691 => '二', - 12692 => '三', - 12693 => '四', - 12694 => '上', - 12695 => '中', - 12696 => '下', - 12697 => '甲', - 12698 => '乙', - 12699 => '丙', - 12700 => '丁', - 12701 => '天', - 12702 => '地', - 12703 => '人', - 12868 => '問', - 12869 => '幼', - 12870 => '文', - 12871 => '箏', - 12880 => 'pte', - 12881 => '21', - 12882 => '22', - 12883 => '23', - 12884 => '24', - 12885 => '25', - 12886 => '26', - 12887 => '27', - 12888 => '28', - 12889 => '29', - 12890 => '30', - 12891 => '31', - 12892 => '32', - 12893 => '33', - 12894 => '34', - 12895 => '35', - 12896 => 'ᄀ', - 12897 => 'ᄂ', - 12898 => 'ᄃ', - 12899 => 'ᄅ', - 12900 => 'ᄆ', - 12901 => 'ᄇ', - 12902 => 'ᄉ', - 12903 => 'ᄋ', - 12904 => 'ᄌ', - 12905 => 'ᄎ', - 12906 => 'ᄏ', - 12907 => 'ᄐ', - 12908 => 'ᄑ', - 12909 => 'ᄒ', - 12910 => '가', - 12911 => '나', - 12912 => '다', - 12913 => '라', - 12914 => '마', - 12915 => '바', - 12916 => '사', - 12917 => '아', - 12918 => '자', - 12919 => '차', - 12920 => '카', - 12921 => '타', - 12922 => '파', - 12923 => '하', - 12924 => '참고', - 12925 => '주의', - 12926 => '우', - 12928 => '一', - 12929 => '二', - 12930 => '三', - 12931 => '四', - 12932 => '五', - 12933 => '六', - 12934 => '七', - 12935 => '八', - 12936 => '九', - 12937 => '十', - 12938 => '月', - 12939 => '火', - 12940 => '水', - 12941 => '木', - 12942 => '金', - 12943 => '土', - 12944 => '日', - 12945 => '株', - 12946 => '有', - 12947 => '社', - 12948 => '名', - 12949 => '特', - 12950 => '財', - 12951 => '祝', - 12952 => '労', - 12953 => '秘', - 12954 => '男', - 12955 => '女', - 12956 => '適', - 12957 => '優', - 12958 => '印', - 12959 => '注', - 12960 => '項', - 12961 => '休', - 12962 => '写', - 12963 => '正', - 12964 => '上', - 12965 => '中', - 12966 => '下', - 12967 => '左', - 12968 => '右', - 12969 => '医', - 12970 => '宗', - 12971 => '学', - 12972 => '監', - 12973 => '企', - 12974 => '資', - 12975 => '協', - 12976 => '夜', - 12977 => '36', - 12978 => '37', - 12979 => '38', - 12980 => '39', - 12981 => '40', - 12982 => '41', - 12983 => '42', - 12984 => '43', - 12985 => '44', - 12986 => '45', - 12987 => '46', - 12988 => '47', - 12989 => '48', - 12990 => '49', - 12991 => '50', - 12992 => '1月', - 12993 => '2月', - 12994 => '3月', - 12995 => '4月', - 12996 => '5月', - 12997 => '6月', - 12998 => '7月', - 12999 => '8月', - 13000 => '9月', - 13001 => '10月', - 13002 => '11月', - 13003 => '12月', - 13004 => 'hg', - 13005 => 'erg', - 13006 => 'ev', - 13007 => 'ltd', - 13008 => 'ア', - 13009 => 'イ', - 13010 => 'ウ', - 13011 => 'エ', - 13012 => 'オ', - 13013 => 'カ', - 13014 => 'キ', - 13015 => 'ク', - 13016 => 'ケ', - 13017 => 'コ', - 13018 => 'サ', - 13019 => 'シ', - 13020 => 'ス', - 13021 => 'セ', - 13022 => 'ソ', - 13023 => 'タ', - 13024 => 'チ', - 13025 => 'ツ', - 13026 => 'テ', - 13027 => 'ト', - 13028 => 'ナ', - 13029 => 'ニ', - 13030 => 'ヌ', - 13031 => 'ネ', - 13032 => 'ノ', - 13033 => 'ハ', - 13034 => 'ヒ', - 13035 => 'フ', - 13036 => 'ヘ', - 13037 => 'ホ', - 13038 => 'マ', - 13039 => 'ミ', - 13040 => 'ム', - 13041 => 'メ', - 13042 => 'モ', - 13043 => 'ヤ', - 13044 => 'ユ', - 13045 => 'ヨ', - 13046 => 'ラ', - 13047 => 'リ', - 13048 => 'ル', - 13049 => 'レ', - 13050 => 'ロ', - 13051 => 'ワ', - 13052 => 'ヰ', - 13053 => 'ヱ', - 13054 => 'ヲ', - 13055 => '令和', - 13056 => 'アパート', - 13057 => 'アルファ', - 13058 => 'アンペア', - 13059 => 'アール', - 13060 => 'イニング', - 13061 => 'インチ', - 13062 => 'ウォン', - 13063 => 'エスクード', - 13064 => 'エーカー', - 13065 => 'オンス', - 13066 => 'オーム', - 13067 => 'カイリ', - 13068 => 'カラット', - 13069 => 'カロリー', - 13070 => 'ガロン', - 13071 => 'ガンマ', - 13072 => 'ギガ', - 13073 => 'ギニー', - 13074 => 'キュリー', - 13075 => 'ギルダー', - 13076 => 'キロ', - 13077 => 'キログラム', - 13078 => 'キロメートル', - 13079 => 'キロワット', - 13080 => 'グラム', - 13081 => 'グラムトン', - 13082 => 'クルゼイロ', - 13083 => 'クローネ', - 13084 => 'ケース', - 13085 => 'コルナ', - 13086 => 'コーポ', - 13087 => 'サイクル', - 13088 => 'サンチーム', - 13089 => 'シリング', - 13090 => 'センチ', - 13091 => 'セント', - 13092 => 'ダース', - 13093 => 'デシ', - 13094 => 'ドル', - 13095 => 'トン', - 13096 => 'ナノ', - 13097 => 'ノット', - 13098 => 'ハイツ', - 13099 => 'パーセント', - 13100 => 'パーツ', - 13101 => 'バーレル', - 13102 => 'ピアストル', - 13103 => 'ピクル', - 13104 => 'ピコ', - 13105 => 'ビル', - 13106 => 'ファラッド', - 13107 => 'フィート', - 13108 => 'ブッシェル', - 13109 => 'フラン', - 13110 => 'ヘクタール', - 13111 => 'ペソ', - 13112 => 'ペニヒ', - 13113 => 'ヘルツ', - 13114 => 'ペンス', - 13115 => 'ページ', - 13116 => 'ベータ', - 13117 => 'ポイント', - 13118 => 'ボルト', - 13119 => 'ホン', - 13120 => 'ポンド', - 13121 => 'ホール', - 13122 => 'ホーン', - 13123 => 'マイクロ', - 13124 => 'マイル', - 13125 => 'マッハ', - 13126 => 'マルク', - 13127 => 'マンション', - 13128 => 'ミクロン', - 13129 => 'ミリ', - 13130 => 'ミリバール', - 13131 => 'メガ', - 13132 => 'メガトン', - 13133 => 'メートル', - 13134 => 'ヤード', - 13135 => 'ヤール', - 13136 => 'ユアン', - 13137 => 'リットル', - 13138 => 'リラ', - 13139 => 'ルピー', - 13140 => 'ルーブル', - 13141 => 'レム', - 13142 => 'レントゲン', - 13143 => 'ワット', - 13144 => '0点', - 13145 => '1点', - 13146 => '2点', - 13147 => '3点', - 13148 => '4点', - 13149 => '5点', - 13150 => '6点', - 13151 => '7点', - 13152 => '8点', - 13153 => '9点', - 13154 => '10点', - 13155 => '11点', - 13156 => '12点', - 13157 => '13点', - 13158 => '14点', - 13159 => '15点', - 13160 => '16点', - 13161 => '17点', - 13162 => '18点', - 13163 => '19点', - 13164 => '20点', - 13165 => '21点', - 13166 => '22点', - 13167 => '23点', - 13168 => '24点', - 13169 => 'hpa', - 13170 => 'da', - 13171 => 'au', - 13172 => 'bar', - 13173 => 'ov', - 13174 => 'pc', - 13175 => 'dm', - 13176 => 'dm2', - 13177 => 'dm3', - 13178 => 'iu', - 13179 => '平成', - 13180 => '昭和', - 13181 => '大正', - 13182 => '明治', - 13183 => '株式会社', - 13184 => 'pa', - 13185 => 'na', - 13186 => 'μa', - 13187 => 'ma', - 13188 => 'ka', - 13189 => 'kb', - 13190 => 'mb', - 13191 => 'gb', - 13192 => 'cal', - 13193 => 'kcal', - 13194 => 'pf', - 13195 => 'nf', - 13196 => 'μf', - 13197 => 'μg', - 13198 => 'mg', - 13199 => 'kg', - 13200 => 'hz', - 13201 => 'khz', - 13202 => 'mhz', - 13203 => 'ghz', - 13204 => 'thz', - 13205 => 'μl', - 13206 => 'ml', - 13207 => 'dl', - 13208 => 'kl', - 13209 => 'fm', - 13210 => 'nm', - 13211 => 'μm', - 13212 => 'mm', - 13213 => 'cm', - 13214 => 'km', - 13215 => 'mm2', - 13216 => 'cm2', - 13217 => 'm2', - 13218 => 'km2', - 13219 => 'mm3', - 13220 => 'cm3', - 13221 => 'm3', - 13222 => 'km3', - 13223 => 'm∕s', - 13224 => 'm∕s2', - 13225 => 'pa', - 13226 => 'kpa', - 13227 => 'mpa', - 13228 => 'gpa', - 13229 => 'rad', - 13230 => 'rad∕s', - 13231 => 'rad∕s2', - 13232 => 'ps', - 13233 => 'ns', - 13234 => 'μs', - 13235 => 'ms', - 13236 => 'pv', - 13237 => 'nv', - 13238 => 'μv', - 13239 => 'mv', - 13240 => 'kv', - 13241 => 'mv', - 13242 => 'pw', - 13243 => 'nw', - 13244 => 'μw', - 13245 => 'mw', - 13246 => 'kw', - 13247 => 'mw', - 13248 => 'kω', - 13249 => 'mω', - 13251 => 'bq', - 13252 => 'cc', - 13253 => 'cd', - 13254 => 'c∕kg', - 13256 => 'db', - 13257 => 'gy', - 13258 => 'ha', - 13259 => 'hp', - 13260 => 'in', - 13261 => 'kk', - 13262 => 'km', - 13263 => 'kt', - 13264 => 'lm', - 13265 => 'ln', - 13266 => 'log', - 13267 => 'lx', - 13268 => 'mb', - 13269 => 'mil', - 13270 => 'mol', - 13271 => 'ph', - 13273 => 'ppm', - 13274 => 'pr', - 13275 => 'sr', - 13276 => 'sv', - 13277 => 'wb', - 13278 => 'v∕m', - 13279 => 'a∕m', - 13280 => '1日', - 13281 => '2日', - 13282 => '3日', - 13283 => '4日', - 13284 => '5日', - 13285 => '6日', - 13286 => '7日', - 13287 => '8日', - 13288 => '9日', - 13289 => '10日', - 13290 => '11日', - 13291 => '12日', - 13292 => '13日', - 13293 => '14日', - 13294 => '15日', - 13295 => '16日', - 13296 => '17日', - 13297 => '18日', - 13298 => '19日', - 13299 => '20日', - 13300 => '21日', - 13301 => '22日', - 13302 => '23日', - 13303 => '24日', - 13304 => '25日', - 13305 => '26日', - 13306 => '27日', - 13307 => '28日', - 13308 => '29日', - 13309 => '30日', - 13310 => '31日', - 13311 => 'gal', - 42560 => 'ꙁ', - 42562 => 'ꙃ', - 42564 => 'ꙅ', - 42566 => 'ꙇ', - 42568 => 'ꙉ', - 42570 => 'ꙋ', - 42572 => 'ꙍ', - 42574 => 'ꙏ', - 42576 => 'ꙑ', - 42578 => 'ꙓ', - 42580 => 'ꙕ', - 42582 => 'ꙗ', - 42584 => 'ꙙ', - 42586 => 'ꙛ', - 42588 => 'ꙝ', - 42590 => 'ꙟ', - 42592 => 'ꙡ', - 42594 => 'ꙣ', - 42596 => 'ꙥ', - 42598 => 'ꙧ', - 42600 => 'ꙩ', - 42602 => 'ꙫ', - 42604 => 'ꙭ', - 42624 => 'ꚁ', - 42626 => 'ꚃ', - 42628 => 'ꚅ', - 42630 => 'ꚇ', - 42632 => 'ꚉ', - 42634 => 'ꚋ', - 42636 => 'ꚍ', - 42638 => 'ꚏ', - 42640 => 'ꚑ', - 42642 => 'ꚓ', - 42644 => 'ꚕ', - 42646 => 'ꚗ', - 42648 => 'ꚙ', - 42650 => 'ꚛ', - 42652 => 'ъ', - 42653 => 'ь', - 42786 => 'ꜣ', - 42788 => 'ꜥ', - 42790 => 'ꜧ', - 42792 => 'ꜩ', - 42794 => 'ꜫ', - 42796 => 'ꜭ', - 42798 => 'ꜯ', - 42802 => 'ꜳ', - 42804 => 'ꜵ', - 42806 => 'ꜷ', - 42808 => 'ꜹ', - 42810 => 'ꜻ', - 42812 => 'ꜽ', - 42814 => 'ꜿ', - 42816 => 'ꝁ', - 42818 => 'ꝃ', - 42820 => 'ꝅ', - 42822 => 'ꝇ', - 42824 => 'ꝉ', - 42826 => 'ꝋ', - 42828 => 'ꝍ', - 42830 => 'ꝏ', - 42832 => 'ꝑ', - 42834 => 'ꝓ', - 42836 => 'ꝕ', - 42838 => 'ꝗ', - 42840 => 'ꝙ', - 42842 => 'ꝛ', - 42844 => 'ꝝ', - 42846 => 'ꝟ', - 42848 => 'ꝡ', - 42850 => 'ꝣ', - 42852 => 'ꝥ', - 42854 => 'ꝧ', - 42856 => 'ꝩ', - 42858 => 'ꝫ', - 42860 => 'ꝭ', - 42862 => 'ꝯ', - 42864 => 'ꝯ', - 42873 => 'ꝺ', - 42875 => 'ꝼ', - 42877 => 'ᵹ', - 42878 => 'ꝿ', - 42880 => 'ꞁ', - 42882 => 'ꞃ', - 42884 => 'ꞅ', - 42886 => 'ꞇ', - 42891 => 'ꞌ', - 42893 => 'ɥ', - 42896 => 'ꞑ', - 42898 => 'ꞓ', - 42902 => 'ꞗ', - 42904 => 'ꞙ', - 42906 => 'ꞛ', - 42908 => 'ꞝ', - 42910 => 'ꞟ', - 42912 => 'ꞡ', - 42914 => 'ꞣ', - 42916 => 'ꞥ', - 42918 => 'ꞧ', - 42920 => 'ꞩ', - 42922 => 'ɦ', - 42923 => 'ɜ', - 42924 => 'ɡ', - 42925 => 'ɬ', - 42926 => 'ɪ', - 42928 => 'ʞ', - 42929 => 'ʇ', - 42930 => 'ʝ', - 42931 => 'ꭓ', - 42932 => 'ꞵ', - 42934 => 'ꞷ', - 42936 => 'ꞹ', - 42938 => 'ꞻ', - 42940 => 'ꞽ', - 42942 => 'ꞿ', - 42946 => 'ꟃ', - 42948 => 'ꞔ', - 42949 => 'ʂ', - 42950 => 'ᶎ', - 42951 => 'ꟈ', - 42953 => 'ꟊ', - 42997 => 'ꟶ', - 43000 => 'ħ', - 43001 => 'œ', - 43868 => 'ꜧ', - 43869 => 'ꬷ', - 43870 => 'ɫ', - 43871 => 'ꭒ', - 43881 => 'ʍ', - 43888 => 'Ꭰ', - 43889 => 'Ꭱ', - 43890 => 'Ꭲ', - 43891 => 'Ꭳ', - 43892 => 'Ꭴ', - 43893 => 'Ꭵ', - 43894 => 'Ꭶ', - 43895 => 'Ꭷ', - 43896 => 'Ꭸ', - 43897 => 'Ꭹ', - 43898 => 'Ꭺ', - 43899 => 'Ꭻ', - 43900 => 'Ꭼ', - 43901 => 'Ꭽ', - 43902 => 'Ꭾ', - 43903 => 'Ꭿ', - 43904 => 'Ꮀ', - 43905 => 'Ꮁ', - 43906 => 'Ꮂ', - 43907 => 'Ꮃ', - 43908 => 'Ꮄ', - 43909 => 'Ꮅ', - 43910 => 'Ꮆ', - 43911 => 'Ꮇ', - 43912 => 'Ꮈ', - 43913 => 'Ꮉ', - 43914 => 'Ꮊ', - 43915 => 'Ꮋ', - 43916 => 'Ꮌ', - 43917 => 'Ꮍ', - 43918 => 'Ꮎ', - 43919 => 'Ꮏ', - 43920 => 'Ꮐ', - 43921 => 'Ꮑ', - 43922 => 'Ꮒ', - 43923 => 'Ꮓ', - 43924 => 'Ꮔ', - 43925 => 'Ꮕ', - 43926 => 'Ꮖ', - 43927 => 'Ꮗ', - 43928 => 'Ꮘ', - 43929 => 'Ꮙ', - 43930 => 'Ꮚ', - 43931 => 'Ꮛ', - 43932 => 'Ꮜ', - 43933 => 'Ꮝ', - 43934 => 'Ꮞ', - 43935 => 'Ꮟ', - 43936 => 'Ꮠ', - 43937 => 'Ꮡ', - 43938 => 'Ꮢ', - 43939 => 'Ꮣ', - 43940 => 'Ꮤ', - 43941 => 'Ꮥ', - 43942 => 'Ꮦ', - 43943 => 'Ꮧ', - 43944 => 'Ꮨ', - 43945 => 'Ꮩ', - 43946 => 'Ꮪ', - 43947 => 'Ꮫ', - 43948 => 'Ꮬ', - 43949 => 'Ꮭ', - 43950 => 'Ꮮ', - 43951 => 'Ꮯ', - 43952 => 'Ꮰ', - 43953 => 'Ꮱ', - 43954 => 'Ꮲ', - 43955 => 'Ꮳ', - 43956 => 'Ꮴ', - 43957 => 'Ꮵ', - 43958 => 'Ꮶ', - 43959 => 'Ꮷ', - 43960 => 'Ꮸ', - 43961 => 'Ꮹ', - 43962 => 'Ꮺ', - 43963 => 'Ꮻ', - 43964 => 'Ꮼ', - 43965 => 'Ꮽ', - 43966 => 'Ꮾ', - 43967 => 'Ꮿ', - 63744 => '豈', - 63745 => '更', - 63746 => '車', - 63747 => '賈', - 63748 => '滑', - 63749 => '串', - 63750 => '句', - 63751 => '龜', - 63752 => '龜', - 63753 => '契', - 63754 => '金', - 63755 => '喇', - 63756 => '奈', - 63757 => '懶', - 63758 => '癩', - 63759 => '羅', - 63760 => '蘿', - 63761 => '螺', - 63762 => '裸', - 63763 => '邏', - 63764 => '樂', - 63765 => '洛', - 63766 => '烙', - 63767 => '珞', - 63768 => '落', - 63769 => '酪', - 63770 => '駱', - 63771 => '亂', - 63772 => '卵', - 63773 => '欄', - 63774 => '爛', - 63775 => '蘭', - 63776 => '鸞', - 63777 => '嵐', - 63778 => '濫', - 63779 => '藍', - 63780 => '襤', - 63781 => '拉', - 63782 => '臘', - 63783 => '蠟', - 63784 => '廊', - 63785 => '朗', - 63786 => '浪', - 63787 => '狼', - 63788 => '郎', - 63789 => '來', - 63790 => '冷', - 63791 => '勞', - 63792 => '擄', - 63793 => '櫓', - 63794 => '爐', - 63795 => '盧', - 63796 => '老', - 63797 => '蘆', - 63798 => '虜', - 63799 => '路', - 63800 => '露', - 63801 => '魯', - 63802 => '鷺', - 63803 => '碌', - 63804 => '祿', - 63805 => '綠', - 63806 => '菉', - 63807 => '錄', - 63808 => '鹿', - 63809 => '論', - 63810 => '壟', - 63811 => '弄', - 63812 => '籠', - 63813 => '聾', - 63814 => '牢', - 63815 => '磊', - 63816 => '賂', - 63817 => '雷', - 63818 => '壘', - 63819 => '屢', - 63820 => '樓', - 63821 => '淚', - 63822 => '漏', - 63823 => '累', - 63824 => '縷', - 63825 => '陋', - 63826 => '勒', - 63827 => '肋', - 63828 => '凜', - 63829 => '凌', - 63830 => '稜', - 63831 => '綾', - 63832 => '菱', - 63833 => '陵', - 63834 => '讀', - 63835 => '拏', - 63836 => '樂', - 63837 => '諾', - 63838 => '丹', - 63839 => '寧', - 63840 => '怒', - 63841 => '率', - 63842 => '異', - 63843 => '北', - 63844 => '磻', - 63845 => '便', - 63846 => '復', - 63847 => '不', - 63848 => '泌', - 63849 => '數', - 63850 => '索', - 63851 => '參', - 63852 => '塞', - 63853 => '省', - 63854 => '葉', - 63855 => '說', - 63856 => '殺', - 63857 => '辰', - 63858 => '沈', - 63859 => '拾', - 63860 => '若', - 63861 => '掠', - 63862 => '略', - 63863 => '亮', - 63864 => '兩', - 63865 => '凉', - 63866 => '梁', - 63867 => '糧', - 63868 => '良', - 63869 => '諒', - 63870 => '量', - 63871 => '勵', - 63872 => '呂', - 63873 => '女', - 63874 => '廬', - 63875 => '旅', - 63876 => '濾', - 63877 => '礪', - 63878 => '閭', - 63879 => '驪', - 63880 => '麗', - 63881 => '黎', - 63882 => '力', - 63883 => '曆', - 63884 => '歷', - 63885 => '轢', - 63886 => '年', - 63887 => '憐', - 63888 => '戀', - 63889 => '撚', - 63890 => '漣', - 63891 => '煉', - 63892 => '璉', - 63893 => '秊', - 63894 => '練', - 63895 => '聯', - 63896 => '輦', - 63897 => '蓮', - 63898 => '連', - 63899 => '鍊', - 63900 => '列', - 63901 => '劣', - 63902 => '咽', - 63903 => '烈', - 63904 => '裂', - 63905 => '說', - 63906 => '廉', - 63907 => '念', - 63908 => '捻', - 63909 => '殮', - 63910 => '簾', - 63911 => '獵', - 63912 => '令', - 63913 => '囹', - 63914 => '寧', - 63915 => '嶺', - 63916 => '怜', - 63917 => '玲', - 63918 => '瑩', - 63919 => '羚', - 63920 => '聆', - 63921 => '鈴', - 63922 => '零', - 63923 => '靈', - 63924 => '領', - 63925 => '例', - 63926 => '禮', - 63927 => '醴', - 63928 => '隸', - 63929 => '惡', - 63930 => '了', - 63931 => '僚', - 63932 => '寮', - 63933 => '尿', - 63934 => '料', - 63935 => '樂', - 63936 => '燎', - 63937 => '療', - 63938 => '蓼', - 63939 => '遼', - 63940 => '龍', - 63941 => '暈', - 63942 => '阮', - 63943 => '劉', - 63944 => '杻', - 63945 => '柳', - 63946 => '流', - 63947 => '溜', - 63948 => '琉', - 63949 => '留', - 63950 => '硫', - 63951 => '紐', - 63952 => '類', - 63953 => '六', - 63954 => '戮', - 63955 => '陸', - 63956 => '倫', - 63957 => '崙', - 63958 => '淪', - 63959 => '輪', - 63960 => '律', - 63961 => '慄', - 63962 => '栗', - 63963 => '率', - 63964 => '隆', - 63965 => '利', - 63966 => '吏', - 63967 => '履', - 63968 => '易', - 63969 => '李', - 63970 => '梨', - 63971 => '泥', - 63972 => '理', - 63973 => '痢', - 63974 => '罹', - 63975 => '裏', - 63976 => '裡', - 63977 => '里', - 63978 => '離', - 63979 => '匿', - 63980 => '溺', - 63981 => '吝', - 63982 => '燐', - 63983 => '璘', - 63984 => '藺', - 63985 => '隣', - 63986 => '鱗', - 63987 => '麟', - 63988 => '林', - 63989 => '淋', - 63990 => '臨', - 63991 => '立', - 63992 => '笠', - 63993 => '粒', - 63994 => '狀', - 63995 => '炙', - 63996 => '識', - 63997 => '什', - 63998 => '茶', - 63999 => '刺', - 64000 => '切', - 64001 => '度', - 64002 => '拓', - 64003 => '糖', - 64004 => '宅', - 64005 => '洞', - 64006 => '暴', - 64007 => '輻', - 64008 => '行', - 64009 => '降', - 64010 => '見', - 64011 => '廓', - 64012 => '兀', - 64013 => '嗀', - 64016 => '塚', - 64018 => '晴', - 64021 => '凞', - 64022 => '猪', - 64023 => '益', - 64024 => '礼', - 64025 => '神', - 64026 => '祥', - 64027 => '福', - 64028 => '靖', - 64029 => '精', - 64030 => '羽', - 64032 => '蘒', - 64034 => '諸', - 64037 => '逸', - 64038 => '都', - 64042 => '飯', - 64043 => '飼', - 64044 => '館', - 64045 => '鶴', - 64046 => '郞', - 64047 => '隷', - 64048 => '侮', - 64049 => '僧', - 64050 => '免', - 64051 => '勉', - 64052 => '勤', - 64053 => '卑', - 64054 => '喝', - 64055 => '嘆', - 64056 => '器', - 64057 => '塀', - 64058 => '墨', - 64059 => '層', - 64060 => '屮', - 64061 => '悔', - 64062 => '慨', - 64063 => '憎', - 64064 => '懲', - 64065 => '敏', - 64066 => '既', - 64067 => '暑', - 64068 => '梅', - 64069 => '海', - 64070 => '渚', - 64071 => '漢', - 64072 => '煮', - 64073 => '爫', - 64074 => '琢', - 64075 => '碑', - 64076 => '社', - 64077 => '祉', - 64078 => '祈', - 64079 => '祐', - 64080 => '祖', - 64081 => '祝', - 64082 => '禍', - 64083 => '禎', - 64084 => '穀', - 64085 => '突', - 64086 => '節', - 64087 => '練', - 64088 => '縉', - 64089 => '繁', - 64090 => '署', - 64091 => '者', - 64092 => '臭', - 64093 => '艹', - 64094 => '艹', - 64095 => '著', - 64096 => '褐', - 64097 => '視', - 64098 => '謁', - 64099 => '謹', - 64100 => '賓', - 64101 => '贈', - 64102 => '辶', - 64103 => '逸', - 64104 => '難', - 64105 => '響', - 64106 => '頻', - 64107 => '恵', - 64108 => '𤋮', - 64109 => '舘', - 64112 => '並', - 64113 => '况', - 64114 => '全', - 64115 => '侀', - 64116 => '充', - 64117 => '冀', - 64118 => '勇', - 64119 => '勺', - 64120 => '喝', - 64121 => '啕', - 64122 => '喙', - 64123 => '嗢', - 64124 => '塚', - 64125 => '墳', - 64126 => '奄', - 64127 => '奔', - 64128 => '婢', - 64129 => '嬨', - 64130 => '廒', - 64131 => '廙', - 64132 => '彩', - 64133 => '徭', - 64134 => '惘', - 64135 => '慎', - 64136 => '愈', - 64137 => '憎', - 64138 => '慠', - 64139 => '懲', - 64140 => '戴', - 64141 => '揄', - 64142 => '搜', - 64143 => '摒', - 64144 => '敖', - 64145 => '晴', - 64146 => '朗', - 64147 => '望', - 64148 => '杖', - 64149 => '歹', - 64150 => '殺', - 64151 => '流', - 64152 => '滛', - 64153 => '滋', - 64154 => '漢', - 64155 => '瀞', - 64156 => '煮', - 64157 => '瞧', - 64158 => '爵', - 64159 => '犯', - 64160 => '猪', - 64161 => '瑱', - 64162 => '甆', - 64163 => '画', - 64164 => '瘝', - 64165 => '瘟', - 64166 => '益', - 64167 => '盛', - 64168 => '直', - 64169 => '睊', - 64170 => '着', - 64171 => '磌', - 64172 => '窱', - 64173 => '節', - 64174 => '类', - 64175 => '絛', - 64176 => '練', - 64177 => '缾', - 64178 => '者', - 64179 => '荒', - 64180 => '華', - 64181 => '蝹', - 64182 => '襁', - 64183 => '覆', - 64184 => '視', - 64185 => '調', - 64186 => '諸', - 64187 => '請', - 64188 => '謁', - 64189 => '諾', - 64190 => '諭', - 64191 => '謹', - 64192 => '變', - 64193 => '贈', - 64194 => '輸', - 64195 => '遲', - 64196 => '醙', - 64197 => '鉶', - 64198 => '陼', - 64199 => '難', - 64200 => '靖', - 64201 => '韛', - 64202 => '響', - 64203 => '頋', - 64204 => '頻', - 64205 => '鬒', - 64206 => '龜', - 64207 => '𢡊', - 64208 => '𢡄', - 64209 => '𣏕', - 64210 => '㮝', - 64211 => '䀘', - 64212 => '䀹', - 64213 => '𥉉', - 64214 => '𥳐', - 64215 => '𧻓', - 64216 => '齃', - 64217 => '龎', - 64256 => 'ff', - 64257 => 'fi', - 64258 => 'fl', - 64259 => 'ffi', - 64260 => 'ffl', - 64261 => 'st', - 64262 => 'st', - 64275 => 'մն', - 64276 => 'մե', - 64277 => 'մի', - 64278 => 'վն', - 64279 => 'մխ', - 64285 => 'יִ', - 64287 => 'ײַ', - 64288 => 'ע', - 64289 => 'א', - 64290 => 'ד', - 64291 => 'ה', - 64292 => 'כ', - 64293 => 'ל', - 64294 => 'ם', - 64295 => 'ר', - 64296 => 'ת', - 64298 => 'שׁ', - 64299 => 'שׂ', - 64300 => 'שּׁ', - 64301 => 'שּׂ', - 64302 => 'אַ', - 64303 => 'אָ', - 64304 => 'אּ', - 64305 => 'בּ', - 64306 => 'גּ', - 64307 => 'דּ', - 64308 => 'הּ', - 64309 => 'וּ', - 64310 => 'זּ', - 64312 => 'טּ', - 64313 => 'יּ', - 64314 => 'ךּ', - 64315 => 'כּ', - 64316 => 'לּ', - 64318 => 'מּ', - 64320 => 'נּ', - 64321 => 'סּ', - 64323 => 'ףּ', - 64324 => 'פּ', - 64326 => 'צּ', - 64327 => 'קּ', - 64328 => 'רּ', - 64329 => 'שּ', - 64330 => 'תּ', - 64331 => 'וֹ', - 64332 => 'בֿ', - 64333 => 'כֿ', - 64334 => 'פֿ', - 64335 => 'אל', - 64336 => 'ٱ', - 64337 => 'ٱ', - 64338 => 'ٻ', - 64339 => 'ٻ', - 64340 => 'ٻ', - 64341 => 'ٻ', - 64342 => 'پ', - 64343 => 'پ', - 64344 => 'پ', - 64345 => 'پ', - 64346 => 'ڀ', - 64347 => 'ڀ', - 64348 => 'ڀ', - 64349 => 'ڀ', - 64350 => 'ٺ', - 64351 => 'ٺ', - 64352 => 'ٺ', - 64353 => 'ٺ', - 64354 => 'ٿ', - 64355 => 'ٿ', - 64356 => 'ٿ', - 64357 => 'ٿ', - 64358 => 'ٹ', - 64359 => 'ٹ', - 64360 => 'ٹ', - 64361 => 'ٹ', - 64362 => 'ڤ', - 64363 => 'ڤ', - 64364 => 'ڤ', - 64365 => 'ڤ', - 64366 => 'ڦ', - 64367 => 'ڦ', - 64368 => 'ڦ', - 64369 => 'ڦ', - 64370 => 'ڄ', - 64371 => 'ڄ', - 64372 => 'ڄ', - 64373 => 'ڄ', - 64374 => 'ڃ', - 64375 => 'ڃ', - 64376 => 'ڃ', - 64377 => 'ڃ', - 64378 => 'چ', - 64379 => 'چ', - 64380 => 'چ', - 64381 => 'چ', - 64382 => 'ڇ', - 64383 => 'ڇ', - 64384 => 'ڇ', - 64385 => 'ڇ', - 64386 => 'ڍ', - 64387 => 'ڍ', - 64388 => 'ڌ', - 64389 => 'ڌ', - 64390 => 'ڎ', - 64391 => 'ڎ', - 64392 => 'ڈ', - 64393 => 'ڈ', - 64394 => 'ژ', - 64395 => 'ژ', - 64396 => 'ڑ', - 64397 => 'ڑ', - 64398 => 'ک', - 64399 => 'ک', - 64400 => 'ک', - 64401 => 'ک', - 64402 => 'گ', - 64403 => 'گ', - 64404 => 'گ', - 64405 => 'گ', - 64406 => 'ڳ', - 64407 => 'ڳ', - 64408 => 'ڳ', - 64409 => 'ڳ', - 64410 => 'ڱ', - 64411 => 'ڱ', - 64412 => 'ڱ', - 64413 => 'ڱ', - 64414 => 'ں', - 64415 => 'ں', - 64416 => 'ڻ', - 64417 => 'ڻ', - 64418 => 'ڻ', - 64419 => 'ڻ', - 64420 => 'ۀ', - 64421 => 'ۀ', - 64422 => 'ہ', - 64423 => 'ہ', - 64424 => 'ہ', - 64425 => 'ہ', - 64426 => 'ھ', - 64427 => 'ھ', - 64428 => 'ھ', - 64429 => 'ھ', - 64430 => 'ے', - 64431 => 'ے', - 64432 => 'ۓ', - 64433 => 'ۓ', - 64467 => 'ڭ', - 64468 => 'ڭ', - 64469 => 'ڭ', - 64470 => 'ڭ', - 64471 => 'ۇ', - 64472 => 'ۇ', - 64473 => 'ۆ', - 64474 => 'ۆ', - 64475 => 'ۈ', - 64476 => 'ۈ', - 64477 => 'ۇٴ', - 64478 => 'ۋ', - 64479 => 'ۋ', - 64480 => 'ۅ', - 64481 => 'ۅ', - 64482 => 'ۉ', - 64483 => 'ۉ', - 64484 => 'ې', - 64485 => 'ې', - 64486 => 'ې', - 64487 => 'ې', - 64488 => 'ى', - 64489 => 'ى', - 64490 => 'ئا', - 64491 => 'ئا', - 64492 => 'ئە', - 64493 => 'ئە', - 64494 => 'ئو', - 64495 => 'ئو', - 64496 => 'ئۇ', - 64497 => 'ئۇ', - 64498 => 'ئۆ', - 64499 => 'ئۆ', - 64500 => 'ئۈ', - 64501 => 'ئۈ', - 64502 => 'ئې', - 64503 => 'ئې', - 64504 => 'ئې', - 64505 => 'ئى', - 64506 => 'ئى', - 64507 => 'ئى', - 64508 => 'ی', - 64509 => 'ی', - 64510 => 'ی', - 64511 => 'ی', - 64512 => 'ئج', - 64513 => 'ئح', - 64514 => 'ئم', - 64515 => 'ئى', - 64516 => 'ئي', - 64517 => 'بج', - 64518 => 'بح', - 64519 => 'بخ', - 64520 => 'بم', - 64521 => 'بى', - 64522 => 'بي', - 64523 => 'تج', - 64524 => 'تح', - 64525 => 'تخ', - 64526 => 'تم', - 64527 => 'تى', - 64528 => 'تي', - 64529 => 'ثج', - 64530 => 'ثم', - 64531 => 'ثى', - 64532 => 'ثي', - 64533 => 'جح', - 64534 => 'جم', - 64535 => 'حج', - 64536 => 'حم', - 64537 => 'خج', - 64538 => 'خح', - 64539 => 'خم', - 64540 => 'سج', - 64541 => 'سح', - 64542 => 'سخ', - 64543 => 'سم', - 64544 => 'صح', - 64545 => 'صم', - 64546 => 'ضج', - 64547 => 'ضح', - 64548 => 'ضخ', - 64549 => 'ضم', - 64550 => 'طح', - 64551 => 'طم', - 64552 => 'ظم', - 64553 => 'عج', - 64554 => 'عم', - 64555 => 'غج', - 64556 => 'غم', - 64557 => 'فج', - 64558 => 'فح', - 64559 => 'فخ', - 64560 => 'فم', - 64561 => 'فى', - 64562 => 'في', - 64563 => 'قح', - 64564 => 'قم', - 64565 => 'قى', - 64566 => 'قي', - 64567 => 'كا', - 64568 => 'كج', - 64569 => 'كح', - 64570 => 'كخ', - 64571 => 'كل', - 64572 => 'كم', - 64573 => 'كى', - 64574 => 'كي', - 64575 => 'لج', - 64576 => 'لح', - 64577 => 'لخ', - 64578 => 'لم', - 64579 => 'لى', - 64580 => 'لي', - 64581 => 'مج', - 64582 => 'مح', - 64583 => 'مخ', - 64584 => 'مم', - 64585 => 'مى', - 64586 => 'مي', - 64587 => 'نج', - 64588 => 'نح', - 64589 => 'نخ', - 64590 => 'نم', - 64591 => 'نى', - 64592 => 'ني', - 64593 => 'هج', - 64594 => 'هم', - 64595 => 'هى', - 64596 => 'هي', - 64597 => 'يج', - 64598 => 'يح', - 64599 => 'يخ', - 64600 => 'يم', - 64601 => 'يى', - 64602 => 'يي', - 64603 => 'ذٰ', - 64604 => 'رٰ', - 64605 => 'ىٰ', - 64612 => 'ئر', - 64613 => 'ئز', - 64614 => 'ئم', - 64615 => 'ئن', - 64616 => 'ئى', - 64617 => 'ئي', - 64618 => 'بر', - 64619 => 'بز', - 64620 => 'بم', - 64621 => 'بن', - 64622 => 'بى', - 64623 => 'بي', - 64624 => 'تر', - 64625 => 'تز', - 64626 => 'تم', - 64627 => 'تن', - 64628 => 'تى', - 64629 => 'تي', - 64630 => 'ثر', - 64631 => 'ثز', - 64632 => 'ثم', - 64633 => 'ثن', - 64634 => 'ثى', - 64635 => 'ثي', - 64636 => 'فى', - 64637 => 'في', - 64638 => 'قى', - 64639 => 'قي', - 64640 => 'كا', - 64641 => 'كل', - 64642 => 'كم', - 64643 => 'كى', - 64644 => 'كي', - 64645 => 'لم', - 64646 => 'لى', - 64647 => 'لي', - 64648 => 'ما', - 64649 => 'مم', - 64650 => 'نر', - 64651 => 'نز', - 64652 => 'نم', - 64653 => 'نن', - 64654 => 'نى', - 64655 => 'ني', - 64656 => 'ىٰ', - 64657 => 'ير', - 64658 => 'يز', - 64659 => 'يم', - 64660 => 'ين', - 64661 => 'يى', - 64662 => 'يي', - 64663 => 'ئج', - 64664 => 'ئح', - 64665 => 'ئخ', - 64666 => 'ئم', - 64667 => 'ئه', - 64668 => 'بج', - 64669 => 'بح', - 64670 => 'بخ', - 64671 => 'بم', - 64672 => 'به', - 64673 => 'تج', - 64674 => 'تح', - 64675 => 'تخ', - 64676 => 'تم', - 64677 => 'ته', - 64678 => 'ثم', - 64679 => 'جح', - 64680 => 'جم', - 64681 => 'حج', - 64682 => 'حم', - 64683 => 'خج', - 64684 => 'خم', - 64685 => 'سج', - 64686 => 'سح', - 64687 => 'سخ', - 64688 => 'سم', - 64689 => 'صح', - 64690 => 'صخ', - 64691 => 'صم', - 64692 => 'ضج', - 64693 => 'ضح', - 64694 => 'ضخ', - 64695 => 'ضم', - 64696 => 'طح', - 64697 => 'ظم', - 64698 => 'عج', - 64699 => 'عم', - 64700 => 'غج', - 64701 => 'غم', - 64702 => 'فج', - 64703 => 'فح', - 64704 => 'فخ', - 64705 => 'فم', - 64706 => 'قح', - 64707 => 'قم', - 64708 => 'كج', - 64709 => 'كح', - 64710 => 'كخ', - 64711 => 'كل', - 64712 => 'كم', - 64713 => 'لج', - 64714 => 'لح', - 64715 => 'لخ', - 64716 => 'لم', - 64717 => 'له', - 64718 => 'مج', - 64719 => 'مح', - 64720 => 'مخ', - 64721 => 'مم', - 64722 => 'نج', - 64723 => 'نح', - 64724 => 'نخ', - 64725 => 'نم', - 64726 => 'نه', - 64727 => 'هج', - 64728 => 'هم', - 64729 => 'هٰ', - 64730 => 'يج', - 64731 => 'يح', - 64732 => 'يخ', - 64733 => 'يم', - 64734 => 'يه', - 64735 => 'ئم', - 64736 => 'ئه', - 64737 => 'بم', - 64738 => 'به', - 64739 => 'تم', - 64740 => 'ته', - 64741 => 'ثم', - 64742 => 'ثه', - 64743 => 'سم', - 64744 => 'سه', - 64745 => 'شم', - 64746 => 'شه', - 64747 => 'كل', - 64748 => 'كم', - 64749 => 'لم', - 64750 => 'نم', - 64751 => 'نه', - 64752 => 'يم', - 64753 => 'يه', - 64754 => 'ـَّ', - 64755 => 'ـُّ', - 64756 => 'ـِّ', - 64757 => 'طى', - 64758 => 'طي', - 64759 => 'عى', - 64760 => 'عي', - 64761 => 'غى', - 64762 => 'غي', - 64763 => 'سى', - 64764 => 'سي', - 64765 => 'شى', - 64766 => 'شي', - 64767 => 'حى', - 64768 => 'حي', - 64769 => 'جى', - 64770 => 'جي', - 64771 => 'خى', - 64772 => 'خي', - 64773 => 'صى', - 64774 => 'صي', - 64775 => 'ضى', - 64776 => 'ضي', - 64777 => 'شج', - 64778 => 'شح', - 64779 => 'شخ', - 64780 => 'شم', - 64781 => 'شر', - 64782 => 'سر', - 64783 => 'صر', - 64784 => 'ضر', - 64785 => 'طى', - 64786 => 'طي', - 64787 => 'عى', - 64788 => 'عي', - 64789 => 'غى', - 64790 => 'غي', - 64791 => 'سى', - 64792 => 'سي', - 64793 => 'شى', - 64794 => 'شي', - 64795 => 'حى', - 64796 => 'حي', - 64797 => 'جى', - 64798 => 'جي', - 64799 => 'خى', - 64800 => 'خي', - 64801 => 'صى', - 64802 => 'صي', - 64803 => 'ضى', - 64804 => 'ضي', - 64805 => 'شج', - 64806 => 'شح', - 64807 => 'شخ', - 64808 => 'شم', - 64809 => 'شر', - 64810 => 'سر', - 64811 => 'صر', - 64812 => 'ضر', - 64813 => 'شج', - 64814 => 'شح', - 64815 => 'شخ', - 64816 => 'شم', - 64817 => 'سه', - 64818 => 'شه', - 64819 => 'طم', - 64820 => 'سج', - 64821 => 'سح', - 64822 => 'سخ', - 64823 => 'شج', - 64824 => 'شح', - 64825 => 'شخ', - 64826 => 'طم', - 64827 => 'ظم', - 64828 => 'اً', - 64829 => 'اً', - 64848 => 'تجم', - 64849 => 'تحج', - 64850 => 'تحج', - 64851 => 'تحم', - 64852 => 'تخم', - 64853 => 'تمج', - 64854 => 'تمح', - 64855 => 'تمخ', - 64856 => 'جمح', - 64857 => 'جمح', - 64858 => 'حمي', - 64859 => 'حمى', - 64860 => 'سحج', - 64861 => 'سجح', - 64862 => 'سجى', - 64863 => 'سمح', - 64864 => 'سمح', - 64865 => 'سمج', - 64866 => 'سمم', - 64867 => 'سمم', - 64868 => 'صحح', - 64869 => 'صحح', - 64870 => 'صمم', - 64871 => 'شحم', - 64872 => 'شحم', - 64873 => 'شجي', - 64874 => 'شمخ', - 64875 => 'شمخ', - 64876 => 'شمم', - 64877 => 'شمم', - 64878 => 'ضحى', - 64879 => 'ضخم', - 64880 => 'ضخم', - 64881 => 'طمح', - 64882 => 'طمح', - 64883 => 'طمم', - 64884 => 'طمي', - 64885 => 'عجم', - 64886 => 'عمم', - 64887 => 'عمم', - 64888 => 'عمى', - 64889 => 'غمم', - 64890 => 'غمي', - 64891 => 'غمى', - 64892 => 'فخم', - 64893 => 'فخم', - 64894 => 'قمح', - 64895 => 'قمم', - 64896 => 'لحم', - 64897 => 'لحي', - 64898 => 'لحى', - 64899 => 'لجج', - 64900 => 'لجج', - 64901 => 'لخم', - 64902 => 'لخم', - 64903 => 'لمح', - 64904 => 'لمح', - 64905 => 'محج', - 64906 => 'محم', - 64907 => 'محي', - 64908 => 'مجح', - 64909 => 'مجم', - 64910 => 'مخج', - 64911 => 'مخم', - 64914 => 'مجخ', - 64915 => 'همج', - 64916 => 'همم', - 64917 => 'نحم', - 64918 => 'نحى', - 64919 => 'نجم', - 64920 => 'نجم', - 64921 => 'نجى', - 64922 => 'نمي', - 64923 => 'نمى', - 64924 => 'يمم', - 64925 => 'يمم', - 64926 => 'بخي', - 64927 => 'تجي', - 64928 => 'تجى', - 64929 => 'تخي', - 64930 => 'تخى', - 64931 => 'تمي', - 64932 => 'تمى', - 64933 => 'جمي', - 64934 => 'جحى', - 64935 => 'جمى', - 64936 => 'سخى', - 64937 => 'صحي', - 64938 => 'شحي', - 64939 => 'ضحي', - 64940 => 'لجي', - 64941 => 'لمي', - 64942 => 'يحي', - 64943 => 'يجي', - 64944 => 'يمي', - 64945 => 'ممي', - 64946 => 'قمي', - 64947 => 'نحي', - 64948 => 'قمح', - 64949 => 'لحم', - 64950 => 'عمي', - 64951 => 'كمي', - 64952 => 'نجح', - 64953 => 'مخي', - 64954 => 'لجم', - 64955 => 'كمم', - 64956 => 'لجم', - 64957 => 'نجح', - 64958 => 'جحي', - 64959 => 'حجي', - 64960 => 'مجي', - 64961 => 'فمي', - 64962 => 'بحي', - 64963 => 'كمم', - 64964 => 'عجم', - 64965 => 'صمم', - 64966 => 'سخي', - 64967 => 'نجي', - 65008 => 'صلے', - 65009 => 'قلے', - 65010 => 'الله', - 65011 => 'اكبر', - 65012 => 'محمد', - 65013 => 'صلعم', - 65014 => 'رسول', - 65015 => 'عليه', - 65016 => 'وسلم', - 65017 => 'صلى', - 65020 => 'ریال', - 65041 => '、', - 65047 => '〖', - 65048 => '〗', - 65073 => '—', - 65074 => '–', - 65081 => '〔', - 65082 => '〕', - 65083 => '【', - 65084 => '】', - 65085 => '《', - 65086 => '》', - 65087 => '〈', - 65088 => '〉', - 65089 => '「', - 65090 => '」', - 65091 => '『', - 65092 => '』', - 65105 => '、', - 65112 => '—', - 65117 => '〔', - 65118 => '〕', - 65123 => '-', - 65137 => 'ـً', - 65143 => 'ـَ', - 65145 => 'ـُ', - 65147 => 'ـِ', - 65149 => 'ـّ', - 65151 => 'ـْ', - 65152 => 'ء', - 65153 => 'آ', - 65154 => 'آ', - 65155 => 'أ', - 65156 => 'أ', - 65157 => 'ؤ', - 65158 => 'ؤ', - 65159 => 'إ', - 65160 => 'إ', - 65161 => 'ئ', - 65162 => 'ئ', - 65163 => 'ئ', - 65164 => 'ئ', - 65165 => 'ا', - 65166 => 'ا', - 65167 => 'ب', - 65168 => 'ب', - 65169 => 'ب', - 65170 => 'ب', - 65171 => 'ة', - 65172 => 'ة', - 65173 => 'ت', - 65174 => 'ت', - 65175 => 'ت', - 65176 => 'ت', - 65177 => 'ث', - 65178 => 'ث', - 65179 => 'ث', - 65180 => 'ث', - 65181 => 'ج', - 65182 => 'ج', - 65183 => 'ج', - 65184 => 'ج', - 65185 => 'ح', - 65186 => 'ح', - 65187 => 'ح', - 65188 => 'ح', - 65189 => 'خ', - 65190 => 'خ', - 65191 => 'خ', - 65192 => 'خ', - 65193 => 'د', - 65194 => 'د', - 65195 => 'ذ', - 65196 => 'ذ', - 65197 => 'ر', - 65198 => 'ر', - 65199 => 'ز', - 65200 => 'ز', - 65201 => 'س', - 65202 => 'س', - 65203 => 'س', - 65204 => 'س', - 65205 => 'ش', - 65206 => 'ش', - 65207 => 'ش', - 65208 => 'ش', - 65209 => 'ص', - 65210 => 'ص', - 65211 => 'ص', - 65212 => 'ص', - 65213 => 'ض', - 65214 => 'ض', - 65215 => 'ض', - 65216 => 'ض', - 65217 => 'ط', - 65218 => 'ط', - 65219 => 'ط', - 65220 => 'ط', - 65221 => 'ظ', - 65222 => 'ظ', - 65223 => 'ظ', - 65224 => 'ظ', - 65225 => 'ع', - 65226 => 'ع', - 65227 => 'ع', - 65228 => 'ع', - 65229 => 'غ', - 65230 => 'غ', - 65231 => 'غ', - 65232 => 'غ', - 65233 => 'ف', - 65234 => 'ف', - 65235 => 'ف', - 65236 => 'ف', - 65237 => 'ق', - 65238 => 'ق', - 65239 => 'ق', - 65240 => 'ق', - 65241 => 'ك', - 65242 => 'ك', - 65243 => 'ك', - 65244 => 'ك', - 65245 => 'ل', - 65246 => 'ل', - 65247 => 'ل', - 65248 => 'ل', - 65249 => 'م', - 65250 => 'م', - 65251 => 'م', - 65252 => 'م', - 65253 => 'ن', - 65254 => 'ن', - 65255 => 'ن', - 65256 => 'ن', - 65257 => 'ه', - 65258 => 'ه', - 65259 => 'ه', - 65260 => 'ه', - 65261 => 'و', - 65262 => 'و', - 65263 => 'ى', - 65264 => 'ى', - 65265 => 'ي', - 65266 => 'ي', - 65267 => 'ي', - 65268 => 'ي', - 65269 => 'لآ', - 65270 => 'لآ', - 65271 => 'لأ', - 65272 => 'لأ', - 65273 => 'لإ', - 65274 => 'لإ', - 65275 => 'لا', - 65276 => 'لا', - 65293 => '-', - 65294 => '.', - 65296 => '0', - 65297 => '1', - 65298 => '2', - 65299 => '3', - 65300 => '4', - 65301 => '5', - 65302 => '6', - 65303 => '7', - 65304 => '8', - 65305 => '9', - 65313 => 'a', - 65314 => 'b', - 65315 => 'c', - 65316 => 'd', - 65317 => 'e', - 65318 => 'f', - 65319 => 'g', - 65320 => 'h', - 65321 => 'i', - 65322 => 'j', - 65323 => 'k', - 65324 => 'l', - 65325 => 'm', - 65326 => 'n', - 65327 => 'o', - 65328 => 'p', - 65329 => 'q', - 65330 => 'r', - 65331 => 's', - 65332 => 't', - 65333 => 'u', - 65334 => 'v', - 65335 => 'w', - 65336 => 'x', - 65337 => 'y', - 65338 => 'z', - 65345 => 'a', - 65346 => 'b', - 65347 => 'c', - 65348 => 'd', - 65349 => 'e', - 65350 => 'f', - 65351 => 'g', - 65352 => 'h', - 65353 => 'i', - 65354 => 'j', - 65355 => 'k', - 65356 => 'l', - 65357 => 'm', - 65358 => 'n', - 65359 => 'o', - 65360 => 'p', - 65361 => 'q', - 65362 => 'r', - 65363 => 's', - 65364 => 't', - 65365 => 'u', - 65366 => 'v', - 65367 => 'w', - 65368 => 'x', - 65369 => 'y', - 65370 => 'z', - 65375 => '⦅', - 65376 => '⦆', - 65377 => '.', - 65378 => '「', - 65379 => '」', - 65380 => '、', - 65381 => '・', - 65382 => 'ヲ', - 65383 => 'ァ', - 65384 => 'ィ', - 65385 => 'ゥ', - 65386 => 'ェ', - 65387 => 'ォ', - 65388 => 'ャ', - 65389 => 'ュ', - 65390 => 'ョ', - 65391 => 'ッ', - 65392 => 'ー', - 65393 => 'ア', - 65394 => 'イ', - 65395 => 'ウ', - 65396 => 'エ', - 65397 => 'オ', - 65398 => 'カ', - 65399 => 'キ', - 65400 => 'ク', - 65401 => 'ケ', - 65402 => 'コ', - 65403 => 'サ', - 65404 => 'シ', - 65405 => 'ス', - 65406 => 'セ', - 65407 => 'ソ', - 65408 => 'タ', - 65409 => 'チ', - 65410 => 'ツ', - 65411 => 'テ', - 65412 => 'ト', - 65413 => 'ナ', - 65414 => 'ニ', - 65415 => 'ヌ', - 65416 => 'ネ', - 65417 => 'ノ', - 65418 => 'ハ', - 65419 => 'ヒ', - 65420 => 'フ', - 65421 => 'ヘ', - 65422 => 'ホ', - 65423 => 'マ', - 65424 => 'ミ', - 65425 => 'ム', - 65426 => 'メ', - 65427 => 'モ', - 65428 => 'ヤ', - 65429 => 'ユ', - 65430 => 'ヨ', - 65431 => 'ラ', - 65432 => 'リ', - 65433 => 'ル', - 65434 => 'レ', - 65435 => 'ロ', - 65436 => 'ワ', - 65437 => 'ン', - 65438 => '゙', - 65439 => '゚', - 65441 => 'ᄀ', - 65442 => 'ᄁ', - 65443 => 'ᆪ', - 65444 => 'ᄂ', - 65445 => 'ᆬ', - 65446 => 'ᆭ', - 65447 => 'ᄃ', - 65448 => 'ᄄ', - 65449 => 'ᄅ', - 65450 => 'ᆰ', - 65451 => 'ᆱ', - 65452 => 'ᆲ', - 65453 => 'ᆳ', - 65454 => 'ᆴ', - 65455 => 'ᆵ', - 65456 => 'ᄚ', - 65457 => 'ᄆ', - 65458 => 'ᄇ', - 65459 => 'ᄈ', - 65460 => 'ᄡ', - 65461 => 'ᄉ', - 65462 => 'ᄊ', - 65463 => 'ᄋ', - 65464 => 'ᄌ', - 65465 => 'ᄍ', - 65466 => 'ᄎ', - 65467 => 'ᄏ', - 65468 => 'ᄐ', - 65469 => 'ᄑ', - 65470 => 'ᄒ', - 65474 => 'ᅡ', - 65475 => 'ᅢ', - 65476 => 'ᅣ', - 65477 => 'ᅤ', - 65478 => 'ᅥ', - 65479 => 'ᅦ', - 65482 => 'ᅧ', - 65483 => 'ᅨ', - 65484 => 'ᅩ', - 65485 => 'ᅪ', - 65486 => 'ᅫ', - 65487 => 'ᅬ', - 65490 => 'ᅭ', - 65491 => 'ᅮ', - 65492 => 'ᅯ', - 65493 => 'ᅰ', - 65494 => 'ᅱ', - 65495 => 'ᅲ', - 65498 => 'ᅳ', - 65499 => 'ᅴ', - 65500 => 'ᅵ', - 65504 => '¢', - 65505 => '£', - 65506 => '¬', - 65508 => '¦', - 65509 => '¥', - 65510 => '₩', - 65512 => '│', - 65513 => '←', - 65514 => '↑', - 65515 => '→', - 65516 => '↓', - 65517 => '■', - 65518 => '○', - 66560 => '𐐨', - 66561 => '𐐩', - 66562 => '𐐪', - 66563 => '𐐫', - 66564 => '𐐬', - 66565 => '𐐭', - 66566 => '𐐮', - 66567 => '𐐯', - 66568 => '𐐰', - 66569 => '𐐱', - 66570 => '𐐲', - 66571 => '𐐳', - 66572 => '𐐴', - 66573 => '𐐵', - 66574 => '𐐶', - 66575 => '𐐷', - 66576 => '𐐸', - 66577 => '𐐹', - 66578 => '𐐺', - 66579 => '𐐻', - 66580 => '𐐼', - 66581 => '𐐽', - 66582 => '𐐾', - 66583 => '𐐿', - 66584 => '𐑀', - 66585 => '𐑁', - 66586 => '𐑂', - 66587 => '𐑃', - 66588 => '𐑄', - 66589 => '𐑅', - 66590 => '𐑆', - 66591 => '𐑇', - 66592 => '𐑈', - 66593 => '𐑉', - 66594 => '𐑊', - 66595 => '𐑋', - 66596 => '𐑌', - 66597 => '𐑍', - 66598 => '𐑎', - 66599 => '𐑏', - 66736 => '𐓘', - 66737 => '𐓙', - 66738 => '𐓚', - 66739 => '𐓛', - 66740 => '𐓜', - 66741 => '𐓝', - 66742 => '𐓞', - 66743 => '𐓟', - 66744 => '𐓠', - 66745 => '𐓡', - 66746 => '𐓢', - 66747 => '𐓣', - 66748 => '𐓤', - 66749 => '𐓥', - 66750 => '𐓦', - 66751 => '𐓧', - 66752 => '𐓨', - 66753 => '𐓩', - 66754 => '𐓪', - 66755 => '𐓫', - 66756 => '𐓬', - 66757 => '𐓭', - 66758 => '𐓮', - 66759 => '𐓯', - 66760 => '𐓰', - 66761 => '𐓱', - 66762 => '𐓲', - 66763 => '𐓳', - 66764 => '𐓴', - 66765 => '𐓵', - 66766 => '𐓶', - 66767 => '𐓷', - 66768 => '𐓸', - 66769 => '𐓹', - 66770 => '𐓺', - 66771 => '𐓻', - 68736 => '𐳀', - 68737 => '𐳁', - 68738 => '𐳂', - 68739 => '𐳃', - 68740 => '𐳄', - 68741 => '𐳅', - 68742 => '𐳆', - 68743 => '𐳇', - 68744 => '𐳈', - 68745 => '𐳉', - 68746 => '𐳊', - 68747 => '𐳋', - 68748 => '𐳌', - 68749 => '𐳍', - 68750 => '𐳎', - 68751 => '𐳏', - 68752 => '𐳐', - 68753 => '𐳑', - 68754 => '𐳒', - 68755 => '𐳓', - 68756 => '𐳔', - 68757 => '𐳕', - 68758 => '𐳖', - 68759 => '𐳗', - 68760 => '𐳘', - 68761 => '𐳙', - 68762 => '𐳚', - 68763 => '𐳛', - 68764 => '𐳜', - 68765 => '𐳝', - 68766 => '𐳞', - 68767 => '𐳟', - 68768 => '𐳠', - 68769 => '𐳡', - 68770 => '𐳢', - 68771 => '𐳣', - 68772 => '𐳤', - 68773 => '𐳥', - 68774 => '𐳦', - 68775 => '𐳧', - 68776 => '𐳨', - 68777 => '𐳩', - 68778 => '𐳪', - 68779 => '𐳫', - 68780 => '𐳬', - 68781 => '𐳭', - 68782 => '𐳮', - 68783 => '𐳯', - 68784 => '𐳰', - 68785 => '𐳱', - 68786 => '𐳲', - 71840 => '𑣀', - 71841 => '𑣁', - 71842 => '𑣂', - 71843 => '𑣃', - 71844 => '𑣄', - 71845 => '𑣅', - 71846 => '𑣆', - 71847 => '𑣇', - 71848 => '𑣈', - 71849 => '𑣉', - 71850 => '𑣊', - 71851 => '𑣋', - 71852 => '𑣌', - 71853 => '𑣍', - 71854 => '𑣎', - 71855 => '𑣏', - 71856 => '𑣐', - 71857 => '𑣑', - 71858 => '𑣒', - 71859 => '𑣓', - 71860 => '𑣔', - 71861 => '𑣕', - 71862 => '𑣖', - 71863 => '𑣗', - 71864 => '𑣘', - 71865 => '𑣙', - 71866 => '𑣚', - 71867 => '𑣛', - 71868 => '𑣜', - 71869 => '𑣝', - 71870 => '𑣞', - 71871 => '𑣟', - 93760 => '𖹠', - 93761 => '𖹡', - 93762 => '𖹢', - 93763 => '𖹣', - 93764 => '𖹤', - 93765 => '𖹥', - 93766 => '𖹦', - 93767 => '𖹧', - 93768 => '𖹨', - 93769 => '𖹩', - 93770 => '𖹪', - 93771 => '𖹫', - 93772 => '𖹬', - 93773 => '𖹭', - 93774 => '𖹮', - 93775 => '𖹯', - 93776 => '𖹰', - 93777 => '𖹱', - 93778 => '𖹲', - 93779 => '𖹳', - 93780 => '𖹴', - 93781 => '𖹵', - 93782 => '𖹶', - 93783 => '𖹷', - 93784 => '𖹸', - 93785 => '𖹹', - 93786 => '𖹺', - 93787 => '𖹻', - 93788 => '𖹼', - 93789 => '𖹽', - 93790 => '𖹾', - 93791 => '𖹿', - 119134 => '𝅗𝅥', - 119135 => '𝅘𝅥', - 119136 => '𝅘𝅥𝅮', - 119137 => '𝅘𝅥𝅯', - 119138 => '𝅘𝅥𝅰', - 119139 => '𝅘𝅥𝅱', - 119140 => '𝅘𝅥𝅲', - 119227 => '𝆹𝅥', - 119228 => '𝆺𝅥', - 119229 => '𝆹𝅥𝅮', - 119230 => '𝆺𝅥𝅮', - 119231 => '𝆹𝅥𝅯', - 119232 => '𝆺𝅥𝅯', - 119808 => 'a', - 119809 => 'b', - 119810 => 'c', - 119811 => 'd', - 119812 => 'e', - 119813 => 'f', - 119814 => 'g', - 119815 => 'h', - 119816 => 'i', - 119817 => 'j', - 119818 => 'k', - 119819 => 'l', - 119820 => 'm', - 119821 => 'n', - 119822 => 'o', - 119823 => 'p', - 119824 => 'q', - 119825 => 'r', - 119826 => 's', - 119827 => 't', - 119828 => 'u', - 119829 => 'v', - 119830 => 'w', - 119831 => 'x', - 119832 => 'y', - 119833 => 'z', - 119834 => 'a', - 119835 => 'b', - 119836 => 'c', - 119837 => 'd', - 119838 => 'e', - 119839 => 'f', - 119840 => 'g', - 119841 => 'h', - 119842 => 'i', - 119843 => 'j', - 119844 => 'k', - 119845 => 'l', - 119846 => 'm', - 119847 => 'n', - 119848 => 'o', - 119849 => 'p', - 119850 => 'q', - 119851 => 'r', - 119852 => 's', - 119853 => 't', - 119854 => 'u', - 119855 => 'v', - 119856 => 'w', - 119857 => 'x', - 119858 => 'y', - 119859 => 'z', - 119860 => 'a', - 119861 => 'b', - 119862 => 'c', - 119863 => 'd', - 119864 => 'e', - 119865 => 'f', - 119866 => 'g', - 119867 => 'h', - 119868 => 'i', - 119869 => 'j', - 119870 => 'k', - 119871 => 'l', - 119872 => 'm', - 119873 => 'n', - 119874 => 'o', - 119875 => 'p', - 119876 => 'q', - 119877 => 'r', - 119878 => 's', - 119879 => 't', - 119880 => 'u', - 119881 => 'v', - 119882 => 'w', - 119883 => 'x', - 119884 => 'y', - 119885 => 'z', - 119886 => 'a', - 119887 => 'b', - 119888 => 'c', - 119889 => 'd', - 119890 => 'e', - 119891 => 'f', - 119892 => 'g', - 119894 => 'i', - 119895 => 'j', - 119896 => 'k', - 119897 => 'l', - 119898 => 'm', - 119899 => 'n', - 119900 => 'o', - 119901 => 'p', - 119902 => 'q', - 119903 => 'r', - 119904 => 's', - 119905 => 't', - 119906 => 'u', - 119907 => 'v', - 119908 => 'w', - 119909 => 'x', - 119910 => 'y', - 119911 => 'z', - 119912 => 'a', - 119913 => 'b', - 119914 => 'c', - 119915 => 'd', - 119916 => 'e', - 119917 => 'f', - 119918 => 'g', - 119919 => 'h', - 119920 => 'i', - 119921 => 'j', - 119922 => 'k', - 119923 => 'l', - 119924 => 'm', - 119925 => 'n', - 119926 => 'o', - 119927 => 'p', - 119928 => 'q', - 119929 => 'r', - 119930 => 's', - 119931 => 't', - 119932 => 'u', - 119933 => 'v', - 119934 => 'w', - 119935 => 'x', - 119936 => 'y', - 119937 => 'z', - 119938 => 'a', - 119939 => 'b', - 119940 => 'c', - 119941 => 'd', - 119942 => 'e', - 119943 => 'f', - 119944 => 'g', - 119945 => 'h', - 119946 => 'i', - 119947 => 'j', - 119948 => 'k', - 119949 => 'l', - 119950 => 'm', - 119951 => 'n', - 119952 => 'o', - 119953 => 'p', - 119954 => 'q', - 119955 => 'r', - 119956 => 's', - 119957 => 't', - 119958 => 'u', - 119959 => 'v', - 119960 => 'w', - 119961 => 'x', - 119962 => 'y', - 119963 => 'z', - 119964 => 'a', - 119966 => 'c', - 119967 => 'd', - 119970 => 'g', - 119973 => 'j', - 119974 => 'k', - 119977 => 'n', - 119978 => 'o', - 119979 => 'p', - 119980 => 'q', - 119982 => 's', - 119983 => 't', - 119984 => 'u', - 119985 => 'v', - 119986 => 'w', - 119987 => 'x', - 119988 => 'y', - 119989 => 'z', - 119990 => 'a', - 119991 => 'b', - 119992 => 'c', - 119993 => 'd', - 119995 => 'f', - 119997 => 'h', - 119998 => 'i', - 119999 => 'j', - 120000 => 'k', - 120001 => 'l', - 120002 => 'm', - 120003 => 'n', - 120005 => 'p', - 120006 => 'q', - 120007 => 'r', - 120008 => 's', - 120009 => 't', - 120010 => 'u', - 120011 => 'v', - 120012 => 'w', - 120013 => 'x', - 120014 => 'y', - 120015 => 'z', - 120016 => 'a', - 120017 => 'b', - 120018 => 'c', - 120019 => 'd', - 120020 => 'e', - 120021 => 'f', - 120022 => 'g', - 120023 => 'h', - 120024 => 'i', - 120025 => 'j', - 120026 => 'k', - 120027 => 'l', - 120028 => 'm', - 120029 => 'n', - 120030 => 'o', - 120031 => 'p', - 120032 => 'q', - 120033 => 'r', - 120034 => 's', - 120035 => 't', - 120036 => 'u', - 120037 => 'v', - 120038 => 'w', - 120039 => 'x', - 120040 => 'y', - 120041 => 'z', - 120042 => 'a', - 120043 => 'b', - 120044 => 'c', - 120045 => 'd', - 120046 => 'e', - 120047 => 'f', - 120048 => 'g', - 120049 => 'h', - 120050 => 'i', - 120051 => 'j', - 120052 => 'k', - 120053 => 'l', - 120054 => 'm', - 120055 => 'n', - 120056 => 'o', - 120057 => 'p', - 120058 => 'q', - 120059 => 'r', - 120060 => 's', - 120061 => 't', - 120062 => 'u', - 120063 => 'v', - 120064 => 'w', - 120065 => 'x', - 120066 => 'y', - 120067 => 'z', - 120068 => 'a', - 120069 => 'b', - 120071 => 'd', - 120072 => 'e', - 120073 => 'f', - 120074 => 'g', - 120077 => 'j', - 120078 => 'k', - 120079 => 'l', - 120080 => 'm', - 120081 => 'n', - 120082 => 'o', - 120083 => 'p', - 120084 => 'q', - 120086 => 's', - 120087 => 't', - 120088 => 'u', - 120089 => 'v', - 120090 => 'w', - 120091 => 'x', - 120092 => 'y', - 120094 => 'a', - 120095 => 'b', - 120096 => 'c', - 120097 => 'd', - 120098 => 'e', - 120099 => 'f', - 120100 => 'g', - 120101 => 'h', - 120102 => 'i', - 120103 => 'j', - 120104 => 'k', - 120105 => 'l', - 120106 => 'm', - 120107 => 'n', - 120108 => 'o', - 120109 => 'p', - 120110 => 'q', - 120111 => 'r', - 120112 => 's', - 120113 => 't', - 120114 => 'u', - 120115 => 'v', - 120116 => 'w', - 120117 => 'x', - 120118 => 'y', - 120119 => 'z', - 120120 => 'a', - 120121 => 'b', - 120123 => 'd', - 120124 => 'e', - 120125 => 'f', - 120126 => 'g', - 120128 => 'i', - 120129 => 'j', - 120130 => 'k', - 120131 => 'l', - 120132 => 'm', - 120134 => 'o', - 120138 => 's', - 120139 => 't', - 120140 => 'u', - 120141 => 'v', - 120142 => 'w', - 120143 => 'x', - 120144 => 'y', - 120146 => 'a', - 120147 => 'b', - 120148 => 'c', - 120149 => 'd', - 120150 => 'e', - 120151 => 'f', - 120152 => 'g', - 120153 => 'h', - 120154 => 'i', - 120155 => 'j', - 120156 => 'k', - 120157 => 'l', - 120158 => 'm', - 120159 => 'n', - 120160 => 'o', - 120161 => 'p', - 120162 => 'q', - 120163 => 'r', - 120164 => 's', - 120165 => 't', - 120166 => 'u', - 120167 => 'v', - 120168 => 'w', - 120169 => 'x', - 120170 => 'y', - 120171 => 'z', - 120172 => 'a', - 120173 => 'b', - 120174 => 'c', - 120175 => 'd', - 120176 => 'e', - 120177 => 'f', - 120178 => 'g', - 120179 => 'h', - 120180 => 'i', - 120181 => 'j', - 120182 => 'k', - 120183 => 'l', - 120184 => 'm', - 120185 => 'n', - 120186 => 'o', - 120187 => 'p', - 120188 => 'q', - 120189 => 'r', - 120190 => 's', - 120191 => 't', - 120192 => 'u', - 120193 => 'v', - 120194 => 'w', - 120195 => 'x', - 120196 => 'y', - 120197 => 'z', - 120198 => 'a', - 120199 => 'b', - 120200 => 'c', - 120201 => 'd', - 120202 => 'e', - 120203 => 'f', - 120204 => 'g', - 120205 => 'h', - 120206 => 'i', - 120207 => 'j', - 120208 => 'k', - 120209 => 'l', - 120210 => 'm', - 120211 => 'n', - 120212 => 'o', - 120213 => 'p', - 120214 => 'q', - 120215 => 'r', - 120216 => 's', - 120217 => 't', - 120218 => 'u', - 120219 => 'v', - 120220 => 'w', - 120221 => 'x', - 120222 => 'y', - 120223 => 'z', - 120224 => 'a', - 120225 => 'b', - 120226 => 'c', - 120227 => 'd', - 120228 => 'e', - 120229 => 'f', - 120230 => 'g', - 120231 => 'h', - 120232 => 'i', - 120233 => 'j', - 120234 => 'k', - 120235 => 'l', - 120236 => 'm', - 120237 => 'n', - 120238 => 'o', - 120239 => 'p', - 120240 => 'q', - 120241 => 'r', - 120242 => 's', - 120243 => 't', - 120244 => 'u', - 120245 => 'v', - 120246 => 'w', - 120247 => 'x', - 120248 => 'y', - 120249 => 'z', - 120250 => 'a', - 120251 => 'b', - 120252 => 'c', - 120253 => 'd', - 120254 => 'e', - 120255 => 'f', - 120256 => 'g', - 120257 => 'h', - 120258 => 'i', - 120259 => 'j', - 120260 => 'k', - 120261 => 'l', - 120262 => 'm', - 120263 => 'n', - 120264 => 'o', - 120265 => 'p', - 120266 => 'q', - 120267 => 'r', - 120268 => 's', - 120269 => 't', - 120270 => 'u', - 120271 => 'v', - 120272 => 'w', - 120273 => 'x', - 120274 => 'y', - 120275 => 'z', - 120276 => 'a', - 120277 => 'b', - 120278 => 'c', - 120279 => 'd', - 120280 => 'e', - 120281 => 'f', - 120282 => 'g', - 120283 => 'h', - 120284 => 'i', - 120285 => 'j', - 120286 => 'k', - 120287 => 'l', - 120288 => 'm', - 120289 => 'n', - 120290 => 'o', - 120291 => 'p', - 120292 => 'q', - 120293 => 'r', - 120294 => 's', - 120295 => 't', - 120296 => 'u', - 120297 => 'v', - 120298 => 'w', - 120299 => 'x', - 120300 => 'y', - 120301 => 'z', - 120302 => 'a', - 120303 => 'b', - 120304 => 'c', - 120305 => 'd', - 120306 => 'e', - 120307 => 'f', - 120308 => 'g', - 120309 => 'h', - 120310 => 'i', - 120311 => 'j', - 120312 => 'k', - 120313 => 'l', - 120314 => 'm', - 120315 => 'n', - 120316 => 'o', - 120317 => 'p', - 120318 => 'q', - 120319 => 'r', - 120320 => 's', - 120321 => 't', - 120322 => 'u', - 120323 => 'v', - 120324 => 'w', - 120325 => 'x', - 120326 => 'y', - 120327 => 'z', - 120328 => 'a', - 120329 => 'b', - 120330 => 'c', - 120331 => 'd', - 120332 => 'e', - 120333 => 'f', - 120334 => 'g', - 120335 => 'h', - 120336 => 'i', - 120337 => 'j', - 120338 => 'k', - 120339 => 'l', - 120340 => 'm', - 120341 => 'n', - 120342 => 'o', - 120343 => 'p', - 120344 => 'q', - 120345 => 'r', - 120346 => 's', - 120347 => 't', - 120348 => 'u', - 120349 => 'v', - 120350 => 'w', - 120351 => 'x', - 120352 => 'y', - 120353 => 'z', - 120354 => 'a', - 120355 => 'b', - 120356 => 'c', - 120357 => 'd', - 120358 => 'e', - 120359 => 'f', - 120360 => 'g', - 120361 => 'h', - 120362 => 'i', - 120363 => 'j', - 120364 => 'k', - 120365 => 'l', - 120366 => 'm', - 120367 => 'n', - 120368 => 'o', - 120369 => 'p', - 120370 => 'q', - 120371 => 'r', - 120372 => 's', - 120373 => 't', - 120374 => 'u', - 120375 => 'v', - 120376 => 'w', - 120377 => 'x', - 120378 => 'y', - 120379 => 'z', - 120380 => 'a', - 120381 => 'b', - 120382 => 'c', - 120383 => 'd', - 120384 => 'e', - 120385 => 'f', - 120386 => 'g', - 120387 => 'h', - 120388 => 'i', - 120389 => 'j', - 120390 => 'k', - 120391 => 'l', - 120392 => 'm', - 120393 => 'n', - 120394 => 'o', - 120395 => 'p', - 120396 => 'q', - 120397 => 'r', - 120398 => 's', - 120399 => 't', - 120400 => 'u', - 120401 => 'v', - 120402 => 'w', - 120403 => 'x', - 120404 => 'y', - 120405 => 'z', - 120406 => 'a', - 120407 => 'b', - 120408 => 'c', - 120409 => 'd', - 120410 => 'e', - 120411 => 'f', - 120412 => 'g', - 120413 => 'h', - 120414 => 'i', - 120415 => 'j', - 120416 => 'k', - 120417 => 'l', - 120418 => 'm', - 120419 => 'n', - 120420 => 'o', - 120421 => 'p', - 120422 => 'q', - 120423 => 'r', - 120424 => 's', - 120425 => 't', - 120426 => 'u', - 120427 => 'v', - 120428 => 'w', - 120429 => 'x', - 120430 => 'y', - 120431 => 'z', - 120432 => 'a', - 120433 => 'b', - 120434 => 'c', - 120435 => 'd', - 120436 => 'e', - 120437 => 'f', - 120438 => 'g', - 120439 => 'h', - 120440 => 'i', - 120441 => 'j', - 120442 => 'k', - 120443 => 'l', - 120444 => 'm', - 120445 => 'n', - 120446 => 'o', - 120447 => 'p', - 120448 => 'q', - 120449 => 'r', - 120450 => 's', - 120451 => 't', - 120452 => 'u', - 120453 => 'v', - 120454 => 'w', - 120455 => 'x', - 120456 => 'y', - 120457 => 'z', - 120458 => 'a', - 120459 => 'b', - 120460 => 'c', - 120461 => 'd', - 120462 => 'e', - 120463 => 'f', - 120464 => 'g', - 120465 => 'h', - 120466 => 'i', - 120467 => 'j', - 120468 => 'k', - 120469 => 'l', - 120470 => 'm', - 120471 => 'n', - 120472 => 'o', - 120473 => 'p', - 120474 => 'q', - 120475 => 'r', - 120476 => 's', - 120477 => 't', - 120478 => 'u', - 120479 => 'v', - 120480 => 'w', - 120481 => 'x', - 120482 => 'y', - 120483 => 'z', - 120484 => 'ı', - 120485 => 'ȷ', - 120488 => 'α', - 120489 => 'β', - 120490 => 'γ', - 120491 => 'δ', - 120492 => 'ε', - 120493 => 'ζ', - 120494 => 'η', - 120495 => 'θ', - 120496 => 'ι', - 120497 => 'κ', - 120498 => 'λ', - 120499 => 'μ', - 120500 => 'ν', - 120501 => 'ξ', - 120502 => 'ο', - 120503 => 'π', - 120504 => 'ρ', - 120505 => 'θ', - 120506 => 'σ', - 120507 => 'τ', - 120508 => 'υ', - 120509 => 'φ', - 120510 => 'χ', - 120511 => 'ψ', - 120512 => 'ω', - 120513 => '∇', - 120514 => 'α', - 120515 => 'β', - 120516 => 'γ', - 120517 => 'δ', - 120518 => 'ε', - 120519 => 'ζ', - 120520 => 'η', - 120521 => 'θ', - 120522 => 'ι', - 120523 => 'κ', - 120524 => 'λ', - 120525 => 'μ', - 120526 => 'ν', - 120527 => 'ξ', - 120528 => 'ο', - 120529 => 'π', - 120530 => 'ρ', - 120531 => 'σ', - 120532 => 'σ', - 120533 => 'τ', - 120534 => 'υ', - 120535 => 'φ', - 120536 => 'χ', - 120537 => 'ψ', - 120538 => 'ω', - 120539 => '∂', - 120540 => 'ε', - 120541 => 'θ', - 120542 => 'κ', - 120543 => 'φ', - 120544 => 'ρ', - 120545 => 'π', - 120546 => 'α', - 120547 => 'β', - 120548 => 'γ', - 120549 => 'δ', - 120550 => 'ε', - 120551 => 'ζ', - 120552 => 'η', - 120553 => 'θ', - 120554 => 'ι', - 120555 => 'κ', - 120556 => 'λ', - 120557 => 'μ', - 120558 => 'ν', - 120559 => 'ξ', - 120560 => 'ο', - 120561 => 'π', - 120562 => 'ρ', - 120563 => 'θ', - 120564 => 'σ', - 120565 => 'τ', - 120566 => 'υ', - 120567 => 'φ', - 120568 => 'χ', - 120569 => 'ψ', - 120570 => 'ω', - 120571 => '∇', - 120572 => 'α', - 120573 => 'β', - 120574 => 'γ', - 120575 => 'δ', - 120576 => 'ε', - 120577 => 'ζ', - 120578 => 'η', - 120579 => 'θ', - 120580 => 'ι', - 120581 => 'κ', - 120582 => 'λ', - 120583 => 'μ', - 120584 => 'ν', - 120585 => 'ξ', - 120586 => 'ο', - 120587 => 'π', - 120588 => 'ρ', - 120589 => 'σ', - 120590 => 'σ', - 120591 => 'τ', - 120592 => 'υ', - 120593 => 'φ', - 120594 => 'χ', - 120595 => 'ψ', - 120596 => 'ω', - 120597 => '∂', - 120598 => 'ε', - 120599 => 'θ', - 120600 => 'κ', - 120601 => 'φ', - 120602 => 'ρ', - 120603 => 'π', - 120604 => 'α', - 120605 => 'β', - 120606 => 'γ', - 120607 => 'δ', - 120608 => 'ε', - 120609 => 'ζ', - 120610 => 'η', - 120611 => 'θ', - 120612 => 'ι', - 120613 => 'κ', - 120614 => 'λ', - 120615 => 'μ', - 120616 => 'ν', - 120617 => 'ξ', - 120618 => 'ο', - 120619 => 'π', - 120620 => 'ρ', - 120621 => 'θ', - 120622 => 'σ', - 120623 => 'τ', - 120624 => 'υ', - 120625 => 'φ', - 120626 => 'χ', - 120627 => 'ψ', - 120628 => 'ω', - 120629 => '∇', - 120630 => 'α', - 120631 => 'β', - 120632 => 'γ', - 120633 => 'δ', - 120634 => 'ε', - 120635 => 'ζ', - 120636 => 'η', - 120637 => 'θ', - 120638 => 'ι', - 120639 => 'κ', - 120640 => 'λ', - 120641 => 'μ', - 120642 => 'ν', - 120643 => 'ξ', - 120644 => 'ο', - 120645 => 'π', - 120646 => 'ρ', - 120647 => 'σ', - 120648 => 'σ', - 120649 => 'τ', - 120650 => 'υ', - 120651 => 'φ', - 120652 => 'χ', - 120653 => 'ψ', - 120654 => 'ω', - 120655 => '∂', - 120656 => 'ε', - 120657 => 'θ', - 120658 => 'κ', - 120659 => 'φ', - 120660 => 'ρ', - 120661 => 'π', - 120662 => 'α', - 120663 => 'β', - 120664 => 'γ', - 120665 => 'δ', - 120666 => 'ε', - 120667 => 'ζ', - 120668 => 'η', - 120669 => 'θ', - 120670 => 'ι', - 120671 => 'κ', - 120672 => 'λ', - 120673 => 'μ', - 120674 => 'ν', - 120675 => 'ξ', - 120676 => 'ο', - 120677 => 'π', - 120678 => 'ρ', - 120679 => 'θ', - 120680 => 'σ', - 120681 => 'τ', - 120682 => 'υ', - 120683 => 'φ', - 120684 => 'χ', - 120685 => 'ψ', - 120686 => 'ω', - 120687 => '∇', - 120688 => 'α', - 120689 => 'β', - 120690 => 'γ', - 120691 => 'δ', - 120692 => 'ε', - 120693 => 'ζ', - 120694 => 'η', - 120695 => 'θ', - 120696 => 'ι', - 120697 => 'κ', - 120698 => 'λ', - 120699 => 'μ', - 120700 => 'ν', - 120701 => 'ξ', - 120702 => 'ο', - 120703 => 'π', - 120704 => 'ρ', - 120705 => 'σ', - 120706 => 'σ', - 120707 => 'τ', - 120708 => 'υ', - 120709 => 'φ', - 120710 => 'χ', - 120711 => 'ψ', - 120712 => 'ω', - 120713 => '∂', - 120714 => 'ε', - 120715 => 'θ', - 120716 => 'κ', - 120717 => 'φ', - 120718 => 'ρ', - 120719 => 'π', - 120720 => 'α', - 120721 => 'β', - 120722 => 'γ', - 120723 => 'δ', - 120724 => 'ε', - 120725 => 'ζ', - 120726 => 'η', - 120727 => 'θ', - 120728 => 'ι', - 120729 => 'κ', - 120730 => 'λ', - 120731 => 'μ', - 120732 => 'ν', - 120733 => 'ξ', - 120734 => 'ο', - 120735 => 'π', - 120736 => 'ρ', - 120737 => 'θ', - 120738 => 'σ', - 120739 => 'τ', - 120740 => 'υ', - 120741 => 'φ', - 120742 => 'χ', - 120743 => 'ψ', - 120744 => 'ω', - 120745 => '∇', - 120746 => 'α', - 120747 => 'β', - 120748 => 'γ', - 120749 => 'δ', - 120750 => 'ε', - 120751 => 'ζ', - 120752 => 'η', - 120753 => 'θ', - 120754 => 'ι', - 120755 => 'κ', - 120756 => 'λ', - 120757 => 'μ', - 120758 => 'ν', - 120759 => 'ξ', - 120760 => 'ο', - 120761 => 'π', - 120762 => 'ρ', - 120763 => 'σ', - 120764 => 'σ', - 120765 => 'τ', - 120766 => 'υ', - 120767 => 'φ', - 120768 => 'χ', - 120769 => 'ψ', - 120770 => 'ω', - 120771 => '∂', - 120772 => 'ε', - 120773 => 'θ', - 120774 => 'κ', - 120775 => 'φ', - 120776 => 'ρ', - 120777 => 'π', - 120778 => 'ϝ', - 120779 => 'ϝ', - 120782 => '0', - 120783 => '1', - 120784 => '2', - 120785 => '3', - 120786 => '4', - 120787 => '5', - 120788 => '6', - 120789 => '7', - 120790 => '8', - 120791 => '9', - 120792 => '0', - 120793 => '1', - 120794 => '2', - 120795 => '3', - 120796 => '4', - 120797 => '5', - 120798 => '6', - 120799 => '7', - 120800 => '8', - 120801 => '9', - 120802 => '0', - 120803 => '1', - 120804 => '2', - 120805 => '3', - 120806 => '4', - 120807 => '5', - 120808 => '6', - 120809 => '7', - 120810 => '8', - 120811 => '9', - 120812 => '0', - 120813 => '1', - 120814 => '2', - 120815 => '3', - 120816 => '4', - 120817 => '5', - 120818 => '6', - 120819 => '7', - 120820 => '8', - 120821 => '9', - 120822 => '0', - 120823 => '1', - 120824 => '2', - 120825 => '3', - 120826 => '4', - 120827 => '5', - 120828 => '6', - 120829 => '7', - 120830 => '8', - 120831 => '9', - 125184 => '𞤢', - 125185 => '𞤣', - 125186 => '𞤤', - 125187 => '𞤥', - 125188 => '𞤦', - 125189 => '𞤧', - 125190 => '𞤨', - 125191 => '𞤩', - 125192 => '𞤪', - 125193 => '𞤫', - 125194 => '𞤬', - 125195 => '𞤭', - 125196 => '𞤮', - 125197 => '𞤯', - 125198 => '𞤰', - 125199 => '𞤱', - 125200 => '𞤲', - 125201 => '𞤳', - 125202 => '𞤴', - 125203 => '𞤵', - 125204 => '𞤶', - 125205 => '𞤷', - 125206 => '𞤸', - 125207 => '𞤹', - 125208 => '𞤺', - 125209 => '𞤻', - 125210 => '𞤼', - 125211 => '𞤽', - 125212 => '𞤾', - 125213 => '𞤿', - 125214 => '𞥀', - 125215 => '𞥁', - 125216 => '𞥂', - 125217 => '𞥃', - 126464 => 'ا', - 126465 => 'ب', - 126466 => 'ج', - 126467 => 'د', - 126469 => 'و', - 126470 => 'ز', - 126471 => 'ح', - 126472 => 'ط', - 126473 => 'ي', - 126474 => 'ك', - 126475 => 'ل', - 126476 => 'م', - 126477 => 'ن', - 126478 => 'س', - 126479 => 'ع', - 126480 => 'ف', - 126481 => 'ص', - 126482 => 'ق', - 126483 => 'ر', - 126484 => 'ش', - 126485 => 'ت', - 126486 => 'ث', - 126487 => 'خ', - 126488 => 'ذ', - 126489 => 'ض', - 126490 => 'ظ', - 126491 => 'غ', - 126492 => 'ٮ', - 126493 => 'ں', - 126494 => 'ڡ', - 126495 => 'ٯ', - 126497 => 'ب', - 126498 => 'ج', - 126500 => 'ه', - 126503 => 'ح', - 126505 => 'ي', - 126506 => 'ك', - 126507 => 'ل', - 126508 => 'م', - 126509 => 'ن', - 126510 => 'س', - 126511 => 'ع', - 126512 => 'ف', - 126513 => 'ص', - 126514 => 'ق', - 126516 => 'ش', - 126517 => 'ت', - 126518 => 'ث', - 126519 => 'خ', - 126521 => 'ض', - 126523 => 'غ', - 126530 => 'ج', - 126535 => 'ح', - 126537 => 'ي', - 126539 => 'ل', - 126541 => 'ن', - 126542 => 'س', - 126543 => 'ع', - 126545 => 'ص', - 126546 => 'ق', - 126548 => 'ش', - 126551 => 'خ', - 126553 => 'ض', - 126555 => 'غ', - 126557 => 'ں', - 126559 => 'ٯ', - 126561 => 'ب', - 126562 => 'ج', - 126564 => 'ه', - 126567 => 'ح', - 126568 => 'ط', - 126569 => 'ي', - 126570 => 'ك', - 126572 => 'م', - 126573 => 'ن', - 126574 => 'س', - 126575 => 'ع', - 126576 => 'ف', - 126577 => 'ص', - 126578 => 'ق', - 126580 => 'ش', - 126581 => 'ت', - 126582 => 'ث', - 126583 => 'خ', - 126585 => 'ض', - 126586 => 'ظ', - 126587 => 'غ', - 126588 => 'ٮ', - 126590 => 'ڡ', - 126592 => 'ا', - 126593 => 'ب', - 126594 => 'ج', - 126595 => 'د', - 126596 => 'ه', - 126597 => 'و', - 126598 => 'ز', - 126599 => 'ح', - 126600 => 'ط', - 126601 => 'ي', - 126603 => 'ل', - 126604 => 'م', - 126605 => 'ن', - 126606 => 'س', - 126607 => 'ع', - 126608 => 'ف', - 126609 => 'ص', - 126610 => 'ق', - 126611 => 'ر', - 126612 => 'ش', - 126613 => 'ت', - 126614 => 'ث', - 126615 => 'خ', - 126616 => 'ذ', - 126617 => 'ض', - 126618 => 'ظ', - 126619 => 'غ', - 126625 => 'ب', - 126626 => 'ج', - 126627 => 'د', - 126629 => 'و', - 126630 => 'ز', - 126631 => 'ح', - 126632 => 'ط', - 126633 => 'ي', - 126635 => 'ل', - 126636 => 'م', - 126637 => 'ن', - 126638 => 'س', - 126639 => 'ع', - 126640 => 'ف', - 126641 => 'ص', - 126642 => 'ق', - 126643 => 'ر', - 126644 => 'ش', - 126645 => 'ت', - 126646 => 'ث', - 126647 => 'خ', - 126648 => 'ذ', - 126649 => 'ض', - 126650 => 'ظ', - 126651 => 'غ', - 127274 => '〔s〕', - 127275 => 'c', - 127276 => 'r', - 127277 => 'cd', - 127278 => 'wz', - 127280 => 'a', - 127281 => 'b', - 127282 => 'c', - 127283 => 'd', - 127284 => 'e', - 127285 => 'f', - 127286 => 'g', - 127287 => 'h', - 127288 => 'i', - 127289 => 'j', - 127290 => 'k', - 127291 => 'l', - 127292 => 'm', - 127293 => 'n', - 127294 => 'o', - 127295 => 'p', - 127296 => 'q', - 127297 => 'r', - 127298 => 's', - 127299 => 't', - 127300 => 'u', - 127301 => 'v', - 127302 => 'w', - 127303 => 'x', - 127304 => 'y', - 127305 => 'z', - 127306 => 'hv', - 127307 => 'mv', - 127308 => 'sd', - 127309 => 'ss', - 127310 => 'ppv', - 127311 => 'wc', - 127338 => 'mc', - 127339 => 'md', - 127340 => 'mr', - 127376 => 'dj', - 127488 => 'ほか', - 127489 => 'ココ', - 127490 => 'サ', - 127504 => '手', - 127505 => '字', - 127506 => '双', - 127507 => 'デ', - 127508 => '二', - 127509 => '多', - 127510 => '解', - 127511 => '天', - 127512 => '交', - 127513 => '映', - 127514 => '無', - 127515 => '料', - 127516 => '前', - 127517 => '後', - 127518 => '再', - 127519 => '新', - 127520 => '初', - 127521 => '終', - 127522 => '生', - 127523 => '販', - 127524 => '声', - 127525 => '吹', - 127526 => '演', - 127527 => '投', - 127528 => '捕', - 127529 => '一', - 127530 => '三', - 127531 => '遊', - 127532 => '左', - 127533 => '中', - 127534 => '右', - 127535 => '指', - 127536 => '走', - 127537 => '打', - 127538 => '禁', - 127539 => '空', - 127540 => '合', - 127541 => '満', - 127542 => '有', - 127543 => '月', - 127544 => '申', - 127545 => '割', - 127546 => '営', - 127547 => '配', - 127552 => '〔本〕', - 127553 => '〔三〕', - 127554 => '〔二〕', - 127555 => '〔安〕', - 127556 => '〔点〕', - 127557 => '〔打〕', - 127558 => '〔盗〕', - 127559 => '〔勝〕', - 127560 => '〔敗〕', - 127568 => '得', - 127569 => '可', - 130032 => '0', - 130033 => '1', - 130034 => '2', - 130035 => '3', - 130036 => '4', - 130037 => '5', - 130038 => '6', - 130039 => '7', - 130040 => '8', - 130041 => '9', - 194560 => '丽', - 194561 => '丸', - 194562 => '乁', - 194563 => '𠄢', - 194564 => '你', - 194565 => '侮', - 194566 => '侻', - 194567 => '倂', - 194568 => '偺', - 194569 => '備', - 194570 => '僧', - 194571 => '像', - 194572 => '㒞', - 194573 => '𠘺', - 194574 => '免', - 194575 => '兔', - 194576 => '兤', - 194577 => '具', - 194578 => '𠔜', - 194579 => '㒹', - 194580 => '內', - 194581 => '再', - 194582 => '𠕋', - 194583 => '冗', - 194584 => '冤', - 194585 => '仌', - 194586 => '冬', - 194587 => '况', - 194588 => '𩇟', - 194589 => '凵', - 194590 => '刃', - 194591 => '㓟', - 194592 => '刻', - 194593 => '剆', - 194594 => '割', - 194595 => '剷', - 194596 => '㔕', - 194597 => '勇', - 194598 => '勉', - 194599 => '勤', - 194600 => '勺', - 194601 => '包', - 194602 => '匆', - 194603 => '北', - 194604 => '卉', - 194605 => '卑', - 194606 => '博', - 194607 => '即', - 194608 => '卽', - 194609 => '卿', - 194610 => '卿', - 194611 => '卿', - 194612 => '𠨬', - 194613 => '灰', - 194614 => '及', - 194615 => '叟', - 194616 => '𠭣', - 194617 => '叫', - 194618 => '叱', - 194619 => '吆', - 194620 => '咞', - 194621 => '吸', - 194622 => '呈', - 194623 => '周', - 194624 => '咢', - 194625 => '哶', - 194626 => '唐', - 194627 => '啓', - 194628 => '啣', - 194629 => '善', - 194630 => '善', - 194631 => '喙', - 194632 => '喫', - 194633 => '喳', - 194634 => '嗂', - 194635 => '圖', - 194636 => '嘆', - 194637 => '圗', - 194638 => '噑', - 194639 => '噴', - 194640 => '切', - 194641 => '壮', - 194642 => '城', - 194643 => '埴', - 194644 => '堍', - 194645 => '型', - 194646 => '堲', - 194647 => '報', - 194648 => '墬', - 194649 => '𡓤', - 194650 => '売', - 194651 => '壷', - 194652 => '夆', - 194653 => '多', - 194654 => '夢', - 194655 => '奢', - 194656 => '𡚨', - 194657 => '𡛪', - 194658 => '姬', - 194659 => '娛', - 194660 => '娧', - 194661 => '姘', - 194662 => '婦', - 194663 => '㛮', - 194665 => '嬈', - 194666 => '嬾', - 194667 => '嬾', - 194668 => '𡧈', - 194669 => '寃', - 194670 => '寘', - 194671 => '寧', - 194672 => '寳', - 194673 => '𡬘', - 194674 => '寿', - 194675 => '将', - 194677 => '尢', - 194678 => '㞁', - 194679 => '屠', - 194680 => '屮', - 194681 => '峀', - 194682 => '岍', - 194683 => '𡷤', - 194684 => '嵃', - 194685 => '𡷦', - 194686 => '嵮', - 194687 => '嵫', - 194688 => '嵼', - 194689 => '巡', - 194690 => '巢', - 194691 => '㠯', - 194692 => '巽', - 194693 => '帨', - 194694 => '帽', - 194695 => '幩', - 194696 => '㡢', - 194697 => '𢆃', - 194698 => '㡼', - 194699 => '庰', - 194700 => '庳', - 194701 => '庶', - 194702 => '廊', - 194703 => '𪎒', - 194704 => '廾', - 194705 => '𢌱', - 194706 => '𢌱', - 194707 => '舁', - 194708 => '弢', - 194709 => '弢', - 194710 => '㣇', - 194711 => '𣊸', - 194712 => '𦇚', - 194713 => '形', - 194714 => '彫', - 194715 => '㣣', - 194716 => '徚', - 194717 => '忍', - 194718 => '志', - 194719 => '忹', - 194720 => '悁', - 194721 => '㤺', - 194722 => '㤜', - 194723 => '悔', - 194724 => '𢛔', - 194725 => '惇', - 194726 => '慈', - 194727 => '慌', - 194728 => '慎', - 194729 => '慌', - 194730 => '慺', - 194731 => '憎', - 194732 => '憲', - 194733 => '憤', - 194734 => '憯', - 194735 => '懞', - 194736 => '懲', - 194737 => '懶', - 194738 => '成', - 194739 => '戛', - 194740 => '扝', - 194741 => '抱', - 194742 => '拔', - 194743 => '捐', - 194744 => '𢬌', - 194745 => '挽', - 194746 => '拼', - 194747 => '捨', - 194748 => '掃', - 194749 => '揤', - 194750 => '𢯱', - 194751 => '搢', - 194752 => '揅', - 194753 => '掩', - 194754 => '㨮', - 194755 => '摩', - 194756 => '摾', - 194757 => '撝', - 194758 => '摷', - 194759 => '㩬', - 194760 => '敏', - 194761 => '敬', - 194762 => '𣀊', - 194763 => '旣', - 194764 => '書', - 194765 => '晉', - 194766 => '㬙', - 194767 => '暑', - 194768 => '㬈', - 194769 => '㫤', - 194770 => '冒', - 194771 => '冕', - 194772 => '最', - 194773 => '暜', - 194774 => '肭', - 194775 => '䏙', - 194776 => '朗', - 194777 => '望', - 194778 => '朡', - 194779 => '杞', - 194780 => '杓', - 194781 => '𣏃', - 194782 => '㭉', - 194783 => '柺', - 194784 => '枅', - 194785 => '桒', - 194786 => '梅', - 194787 => '𣑭', - 194788 => '梎', - 194789 => '栟', - 194790 => '椔', - 194791 => '㮝', - 194792 => '楂', - 194793 => '榣', - 194794 => '槪', - 194795 => '檨', - 194796 => '𣚣', - 194797 => '櫛', - 194798 => '㰘', - 194799 => '次', - 194800 => '𣢧', - 194801 => '歔', - 194802 => '㱎', - 194803 => '歲', - 194804 => '殟', - 194805 => '殺', - 194806 => '殻', - 194807 => '𣪍', - 194808 => '𡴋', - 194809 => '𣫺', - 194810 => '汎', - 194811 => '𣲼', - 194812 => '沿', - 194813 => '泍', - 194814 => '汧', - 194815 => '洖', - 194816 => '派', - 194817 => '海', - 194818 => '流', - 194819 => '浩', - 194820 => '浸', - 194821 => '涅', - 194822 => '𣴞', - 194823 => '洴', - 194824 => '港', - 194825 => '湮', - 194826 => '㴳', - 194827 => '滋', - 194828 => '滇', - 194829 => '𣻑', - 194830 => '淹', - 194831 => '潮', - 194832 => '𣽞', - 194833 => '𣾎', - 194834 => '濆', - 194835 => '瀹', - 194836 => '瀞', - 194837 => '瀛', - 194838 => '㶖', - 194839 => '灊', - 194840 => '災', - 194841 => '灷', - 194842 => '炭', - 194843 => '𠔥', - 194844 => '煅', - 194845 => '𤉣', - 194846 => '熜', - 194848 => '爨', - 194849 => '爵', - 194850 => '牐', - 194851 => '𤘈', - 194852 => '犀', - 194853 => '犕', - 194854 => '𤜵', - 194855 => '𤠔', - 194856 => '獺', - 194857 => '王', - 194858 => '㺬', - 194859 => '玥', - 194860 => '㺸', - 194861 => '㺸', - 194862 => '瑇', - 194863 => '瑜', - 194864 => '瑱', - 194865 => '璅', - 194866 => '瓊', - 194867 => '㼛', - 194868 => '甤', - 194869 => '𤰶', - 194870 => '甾', - 194871 => '𤲒', - 194872 => '異', - 194873 => '𢆟', - 194874 => '瘐', - 194875 => '𤾡', - 194876 => '𤾸', - 194877 => '𥁄', - 194878 => '㿼', - 194879 => '䀈', - 194880 => '直', - 194881 => '𥃳', - 194882 => '𥃲', - 194883 => '𥄙', - 194884 => '𥄳', - 194885 => '眞', - 194886 => '真', - 194887 => '真', - 194888 => '睊', - 194889 => '䀹', - 194890 => '瞋', - 194891 => '䁆', - 194892 => '䂖', - 194893 => '𥐝', - 194894 => '硎', - 194895 => '碌', - 194896 => '磌', - 194897 => '䃣', - 194898 => '𥘦', - 194899 => '祖', - 194900 => '𥚚', - 194901 => '𥛅', - 194902 => '福', - 194903 => '秫', - 194904 => '䄯', - 194905 => '穀', - 194906 => '穊', - 194907 => '穏', - 194908 => '𥥼', - 194909 => '𥪧', - 194910 => '𥪧', - 194912 => '䈂', - 194913 => '𥮫', - 194914 => '篆', - 194915 => '築', - 194916 => '䈧', - 194917 => '𥲀', - 194918 => '糒', - 194919 => '䊠', - 194920 => '糨', - 194921 => '糣', - 194922 => '紀', - 194923 => '𥾆', - 194924 => '絣', - 194925 => '䌁', - 194926 => '緇', - 194927 => '縂', - 194928 => '繅', - 194929 => '䌴', - 194930 => '𦈨', - 194931 => '𦉇', - 194932 => '䍙', - 194933 => '𦋙', - 194934 => '罺', - 194935 => '𦌾', - 194936 => '羕', - 194937 => '翺', - 194938 => '者', - 194939 => '𦓚', - 194940 => '𦔣', - 194941 => '聠', - 194942 => '𦖨', - 194943 => '聰', - 194944 => '𣍟', - 194945 => '䏕', - 194946 => '育', - 194947 => '脃', - 194948 => '䐋', - 194949 => '脾', - 194950 => '媵', - 194951 => '𦞧', - 194952 => '𦞵', - 194953 => '𣎓', - 194954 => '𣎜', - 194955 => '舁', - 194956 => '舄', - 194957 => '辞', - 194958 => '䑫', - 194959 => '芑', - 194960 => '芋', - 194961 => '芝', - 194962 => '劳', - 194963 => '花', - 194964 => '芳', - 194965 => '芽', - 194966 => '苦', - 194967 => '𦬼', - 194968 => '若', - 194969 => '茝', - 194970 => '荣', - 194971 => '莭', - 194972 => '茣', - 194973 => '莽', - 194974 => '菧', - 194975 => '著', - 194976 => '荓', - 194977 => '菊', - 194978 => '菌', - 194979 => '菜', - 194980 => '𦰶', - 194981 => '𦵫', - 194982 => '𦳕', - 194983 => '䔫', - 194984 => '蓱', - 194985 => '蓳', - 194986 => '蔖', - 194987 => '𧏊', - 194988 => '蕤', - 194989 => '𦼬', - 194990 => '䕝', - 194991 => '䕡', - 194992 => '𦾱', - 194993 => '𧃒', - 194994 => '䕫', - 194995 => '虐', - 194996 => '虜', - 194997 => '虧', - 194998 => '虩', - 194999 => '蚩', - 195000 => '蚈', - 195001 => '蜎', - 195002 => '蛢', - 195003 => '蝹', - 195004 => '蜨', - 195005 => '蝫', - 195006 => '螆', - 195008 => '蟡', - 195009 => '蠁', - 195010 => '䗹', - 195011 => '衠', - 195012 => '衣', - 195013 => '𧙧', - 195014 => '裗', - 195015 => '裞', - 195016 => '䘵', - 195017 => '裺', - 195018 => '㒻', - 195019 => '𧢮', - 195020 => '𧥦', - 195021 => '䚾', - 195022 => '䛇', - 195023 => '誠', - 195024 => '諭', - 195025 => '變', - 195026 => '豕', - 195027 => '𧲨', - 195028 => '貫', - 195029 => '賁', - 195030 => '贛', - 195031 => '起', - 195032 => '𧼯', - 195033 => '𠠄', - 195034 => '跋', - 195035 => '趼', - 195036 => '跰', - 195037 => '𠣞', - 195038 => '軔', - 195039 => '輸', - 195040 => '𨗒', - 195041 => '𨗭', - 195042 => '邔', - 195043 => '郱', - 195044 => '鄑', - 195045 => '𨜮', - 195046 => '鄛', - 195047 => '鈸', - 195048 => '鋗', - 195049 => '鋘', - 195050 => '鉼', - 195051 => '鏹', - 195052 => '鐕', - 195053 => '𨯺', - 195054 => '開', - 195055 => '䦕', - 195056 => '閷', - 195057 => '𨵷', - 195058 => '䧦', - 195059 => '雃', - 195060 => '嶲', - 195061 => '霣', - 195062 => '𩅅', - 195063 => '𩈚', - 195064 => '䩮', - 195065 => '䩶', - 195066 => '韠', - 195067 => '𩐊', - 195068 => '䪲', - 195069 => '𩒖', - 195070 => '頋', - 195071 => '頋', - 195072 => '頩', - 195073 => '𩖶', - 195074 => '飢', - 195075 => '䬳', - 195076 => '餩', - 195077 => '馧', - 195078 => '駂', - 195079 => '駾', - 195080 => '䯎', - 195081 => '𩬰', - 195082 => '鬒', - 195083 => '鱀', - 195084 => '鳽', - 195085 => '䳎', - 195086 => '䳭', - 195087 => '鵧', - 195088 => '𪃎', - 195089 => '䳸', - 195090 => '𪄅', - 195091 => '𪈎', - 195092 => '𪊑', - 195093 => '麻', - 195094 => '䵖', - 195095 => '黹', - 195096 => '黾', - 195097 => '鼅', - 195098 => '鼏', - 195099 => '鼖', - 195100 => '鼻', - 195101 => '𪘀', -); diff --git a/lib/symfony/polyfill-intl-idn/Resources/unidata/virama.php b/lib/symfony/polyfill-intl-idn/Resources/unidata/virama.php deleted file mode 100644 index 1958e37ed..000000000 --- a/lib/symfony/polyfill-intl-idn/Resources/unidata/virama.php +++ /dev/null @@ -1,65 +0,0 @@ - 9, - 2509 => 9, - 2637 => 9, - 2765 => 9, - 2893 => 9, - 3021 => 9, - 3149 => 9, - 3277 => 9, - 3387 => 9, - 3388 => 9, - 3405 => 9, - 3530 => 9, - 3642 => 9, - 3770 => 9, - 3972 => 9, - 4153 => 9, - 4154 => 9, - 5908 => 9, - 5940 => 9, - 6098 => 9, - 6752 => 9, - 6980 => 9, - 7082 => 9, - 7083 => 9, - 7154 => 9, - 7155 => 9, - 11647 => 9, - 43014 => 9, - 43052 => 9, - 43204 => 9, - 43347 => 9, - 43456 => 9, - 43766 => 9, - 44013 => 9, - 68159 => 9, - 69702 => 9, - 69759 => 9, - 69817 => 9, - 69939 => 9, - 69940 => 9, - 70080 => 9, - 70197 => 9, - 70378 => 9, - 70477 => 9, - 70722 => 9, - 70850 => 9, - 71103 => 9, - 71231 => 9, - 71350 => 9, - 71467 => 9, - 71737 => 9, - 71997 => 9, - 71998 => 9, - 72160 => 9, - 72244 => 9, - 72263 => 9, - 72345 => 9, - 72767 => 9, - 73028 => 9, - 73029 => 9, - 73111 => 9, -); diff --git a/lib/symfony/polyfill-intl-idn/bootstrap.php b/lib/symfony/polyfill-intl-idn/bootstrap.php deleted file mode 100644 index 57c78356c..000000000 --- a/lib/symfony/polyfill-intl-idn/bootstrap.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Idn as p; - -if (extension_loaded('intl')) { - return; -} - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!defined('U_IDNA_PROHIBITED_ERROR')) { - define('U_IDNA_PROHIBITED_ERROR', 66560); -} -if (!defined('U_IDNA_ERROR_START')) { - define('U_IDNA_ERROR_START', 66560); -} -if (!defined('U_IDNA_UNASSIGNED_ERROR')) { - define('U_IDNA_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { - define('U_IDNA_CHECK_BIDI_ERROR', 66562); -} -if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { - define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); -} -if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { - define('U_IDNA_ACE_PREFIX_ERROR', 66564); -} -if (!defined('U_IDNA_VERIFICATION_ERROR')) { - define('U_IDNA_VERIFICATION_ERROR', 66565); -} -if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { - define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); -} -if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { - define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); -} -if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { - define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); -} -if (!defined('U_IDNA_ERROR_LIMIT')) { - define('U_IDNA_ERROR_LIMIT', 66569); -} -if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { - define('U_STRINGPREP_PROHIBITED_ERROR', 66560); -} -if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { - define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { - define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); -} -if (!defined('IDNA_DEFAULT')) { - define('IDNA_DEFAULT', 0); -} -if (!defined('IDNA_ALLOW_UNASSIGNED')) { - define('IDNA_ALLOW_UNASSIGNED', 1); -} -if (!defined('IDNA_USE_STD3_RULES')) { - define('IDNA_USE_STD3_RULES', 2); -} -if (!defined('IDNA_CHECK_BIDI')) { - define('IDNA_CHECK_BIDI', 4); -} -if (!defined('IDNA_CHECK_CONTEXTJ')) { - define('IDNA_CHECK_CONTEXTJ', 8); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { - define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { - define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); -} -if (!defined('INTL_IDNA_VARIANT_2003')) { - define('INTL_IDNA_VARIANT_2003', 0); -} -if (!defined('INTL_IDNA_VARIANT_UTS46')) { - define('INTL_IDNA_VARIANT_UTS46', 1); -} -if (!defined('IDNA_ERROR_EMPTY_LABEL')) { - define('IDNA_ERROR_EMPTY_LABEL', 1); -} -if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { - define('IDNA_ERROR_LABEL_TOO_LONG', 2); -} -if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { - define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); -} -if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { - define('IDNA_ERROR_LEADING_HYPHEN', 8); -} -if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { - define('IDNA_ERROR_TRAILING_HYPHEN', 16); -} -if (!defined('IDNA_ERROR_HYPHEN_3_4')) { - define('IDNA_ERROR_HYPHEN_3_4', 32); -} -if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { - define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); -} -if (!defined('IDNA_ERROR_DISALLOWED')) { - define('IDNA_ERROR_DISALLOWED', 128); -} -if (!defined('IDNA_ERROR_PUNYCODE')) { - define('IDNA_ERROR_PUNYCODE', 256); -} -if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { - define('IDNA_ERROR_LABEL_HAS_DOT', 512); -} -if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { - define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); -} -if (!defined('IDNA_ERROR_BIDI')) { - define('IDNA_ERROR_BIDI', 2048); -} -if (!defined('IDNA_ERROR_CONTEXTJ')) { - define('IDNA_ERROR_CONTEXTJ', 4096); -} - -if (\PHP_VERSION_ID < 70400) { - if (!function_exists('idn_to_ascii')) { - function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } - } - if (!function_exists('idn_to_utf8')) { - function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } - } -} else { - if (!function_exists('idn_to_ascii')) { - function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } - } - if (!function_exists('idn_to_utf8')) { - function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } - } -} diff --git a/lib/symfony/polyfill-intl-idn/bootstrap80.php b/lib/symfony/polyfill-intl-idn/bootstrap80.php deleted file mode 100644 index a62c2d69b..000000000 --- a/lib/symfony/polyfill-intl-idn/bootstrap80.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Idn as p; - -if (!defined('U_IDNA_PROHIBITED_ERROR')) { - define('U_IDNA_PROHIBITED_ERROR', 66560); -} -if (!defined('U_IDNA_ERROR_START')) { - define('U_IDNA_ERROR_START', 66560); -} -if (!defined('U_IDNA_UNASSIGNED_ERROR')) { - define('U_IDNA_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { - define('U_IDNA_CHECK_BIDI_ERROR', 66562); -} -if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { - define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); -} -if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { - define('U_IDNA_ACE_PREFIX_ERROR', 66564); -} -if (!defined('U_IDNA_VERIFICATION_ERROR')) { - define('U_IDNA_VERIFICATION_ERROR', 66565); -} -if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { - define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); -} -if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { - define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); -} -if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { - define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); -} -if (!defined('U_IDNA_ERROR_LIMIT')) { - define('U_IDNA_ERROR_LIMIT', 66569); -} -if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { - define('U_STRINGPREP_PROHIBITED_ERROR', 66560); -} -if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { - define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { - define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); -} -if (!defined('IDNA_DEFAULT')) { - define('IDNA_DEFAULT', 0); -} -if (!defined('IDNA_ALLOW_UNASSIGNED')) { - define('IDNA_ALLOW_UNASSIGNED', 1); -} -if (!defined('IDNA_USE_STD3_RULES')) { - define('IDNA_USE_STD3_RULES', 2); -} -if (!defined('IDNA_CHECK_BIDI')) { - define('IDNA_CHECK_BIDI', 4); -} -if (!defined('IDNA_CHECK_CONTEXTJ')) { - define('IDNA_CHECK_CONTEXTJ', 8); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { - define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { - define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); -} -if (!defined('INTL_IDNA_VARIANT_UTS46')) { - define('INTL_IDNA_VARIANT_UTS46', 1); -} -if (!defined('IDNA_ERROR_EMPTY_LABEL')) { - define('IDNA_ERROR_EMPTY_LABEL', 1); -} -if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { - define('IDNA_ERROR_LABEL_TOO_LONG', 2); -} -if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { - define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); -} -if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { - define('IDNA_ERROR_LEADING_HYPHEN', 8); -} -if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { - define('IDNA_ERROR_TRAILING_HYPHEN', 16); -} -if (!defined('IDNA_ERROR_HYPHEN_3_4')) { - define('IDNA_ERROR_HYPHEN_3_4', 32); -} -if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { - define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); -} -if (!defined('IDNA_ERROR_DISALLOWED')) { - define('IDNA_ERROR_DISALLOWED', 128); -} -if (!defined('IDNA_ERROR_PUNYCODE')) { - define('IDNA_ERROR_PUNYCODE', 256); -} -if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { - define('IDNA_ERROR_LABEL_HAS_DOT', 512); -} -if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { - define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); -} -if (!defined('IDNA_ERROR_BIDI')) { - define('IDNA_ERROR_BIDI', 2048); -} -if (!defined('IDNA_ERROR_CONTEXTJ')) { - define('IDNA_ERROR_CONTEXTJ', 4096); -} - -if (!function_exists('idn_to_ascii')) { - function idn_to_ascii(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); } -} -if (!function_exists('idn_to_utf8')) { - function idn_to_utf8(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); } -} diff --git a/lib/symfony/polyfill-intl-idn/composer.json b/lib/symfony/polyfill-intl-idn/composer.json deleted file mode 100644 index 71030a2ed..000000000 --- a/lib/symfony/polyfill-intl-idn/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "symfony/polyfill-intl-idn", - "type": "library", - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "idn"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-intl": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-intl-normalizer/LICENSE b/lib/symfony/polyfill-intl-normalizer/LICENSE deleted file mode 100644 index 4cd8bdd30..000000000 --- a/lib/symfony/polyfill-intl-normalizer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-intl-normalizer/Normalizer.php b/lib/symfony/polyfill-intl-normalizer/Normalizer.php deleted file mode 100644 index 4443c2322..000000000 --- a/lib/symfony/polyfill-intl-normalizer/Normalizer.php +++ /dev/null @@ -1,310 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Normalizer; - -/** - * Normalizer is a PHP fallback implementation of the Normalizer class provided by the intl extension. - * - * It has been validated with Unicode 6.3 Normalization Conformance Test. - * See http://www.unicode.org/reports/tr15/ for detailed info about Unicode normalizations. - * - * @author Nicolas Grekas - * - * @internal - */ -class Normalizer -{ - public const FORM_D = \Normalizer::FORM_D; - public const FORM_KD = \Normalizer::FORM_KD; - public const FORM_C = \Normalizer::FORM_C; - public const FORM_KC = \Normalizer::FORM_KC; - public const NFD = \Normalizer::NFD; - public const NFKD = \Normalizer::NFKD; - public const NFC = \Normalizer::NFC; - public const NFKC = \Normalizer::NFKC; - - private static $C; - private static $D; - private static $KD; - private static $cC; - private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - - public static function isNormalized(string $s, int $form = self::FORM_C) - { - if (!\in_array($form, [self::NFD, self::NFKD, self::NFC, self::NFKC])) { - return false; - } - if (!isset($s[strspn($s, self::$ASCII)])) { - return true; - } - if (self::NFC == $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) { - return true; - } - - return self::normalize($s, $form) === $s; - } - - public static function normalize(string $s, int $form = self::FORM_C) - { - if (!preg_match('//u', $s)) { - return false; - } - - switch ($form) { - case self::NFC: $C = true; $K = false; break; - case self::NFD: $C = false; $K = false; break; - case self::NFKC: $C = true; $K = true; break; - case self::NFKD: $C = false; $K = true; break; - default: - if (\defined('Normalizer::NONE') && \Normalizer::NONE == $form) { - return $s; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError('normalizer_normalize(): Argument #2 ($form) must be a a valid normalization form'); - } - - if ('' === $s) { - return ''; - } - - if ($K && null === self::$KD) { - self::$KD = self::getData('compatibilityDecomposition'); - } - - if (null === self::$D) { - self::$D = self::getData('canonicalDecomposition'); - self::$cC = self::getData('combiningClass'); - } - - if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { - mb_internal_encoding('8bit'); - } - - $r = self::decompose($s, $K); - - if ($C) { - if (null === self::$C) { - self::$C = self::getData('canonicalComposition'); - } - - $r = self::recompose($r); - } - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } - - return $r; - } - - private static function recompose($s) - { - $ASCII = self::$ASCII; - $compMap = self::$C; - $combClass = self::$cC; - $ulenMask = self::$ulenMask; - - $result = $tail = ''; - - $i = $s[0] < "\x80" ? 1 : $ulenMask[$s[0] & "\xF0"]; - $len = \strlen($s); - - $lastUchr = substr($s, 0, $i); - $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0; - - while ($i < $len) { - if ($s[$i] < "\x80") { - // ASCII chars - - if ($tail) { - $lastUchr .= $tail; - $tail = ''; - } - - if ($j = strspn($s, $ASCII, $i + 1)) { - $lastUchr .= substr($s, $i, $j); - $i += $j; - } - - $result .= $lastUchr; - $lastUchr = $s[$i]; - $lastUcls = 0; - ++$i; - continue; - } - - $ulen = $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - - if ($lastUchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $lastUchr - || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr - || $lastUcls) { - // Table lookup and combining chars composition - - $ucls = $combClass[$uchr] ?? 0; - - if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) { - $lastUchr = $compMap[$lastUchr.$uchr]; - } elseif ($lastUcls = $ucls) { - $tail .= $uchr; - } else { - if ($tail) { - $lastUchr .= $tail; - $tail = ''; - } - - $result .= $lastUchr; - $lastUchr = $uchr; - } - } else { - // Hangul chars - - $L = \ord($lastUchr[2]) - 0x80; - $V = \ord($uchr[2]) - 0xA1; - $T = 0; - - $uchr = substr($s, $i + $ulen, 3); - - if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") { - $T = \ord($uchr[2]) - 0xA7; - 0 > $T && $T += 0x40; - $ulen += 3; - } - - $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; - $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F); - } - - $i += $ulen; - } - - return $result.$lastUchr.$tail; - } - - private static function decompose($s, $c) - { - $result = ''; - - $ASCII = self::$ASCII; - $decompMap = self::$D; - $combClass = self::$cC; - $ulenMask = self::$ulenMask; - if ($c) { - $compatMap = self::$KD; - } - - $c = []; - $i = 0; - $len = \strlen($s); - - while ($i < $len) { - if ($s[$i] < "\x80") { - // ASCII chars - - if ($c) { - ksort($c); - $result .= implode('', $c); - $c = []; - } - - $j = 1 + strspn($s, $ASCII, $i + 1); - $result .= substr($s, $i, $j); - $i += $j; - continue; - } - - $ulen = $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) { - // Table lookup - - if ($uchr !== $j = $compatMap[$uchr] ?? ($decompMap[$uchr] ?? $uchr)) { - $uchr = $j; - - $j = \strlen($uchr); - $ulen = $uchr[0] < "\x80" ? 1 : $ulenMask[$uchr[0] & "\xF0"]; - - if ($ulen != $j) { - // Put trailing chars in $s - - $j -= $ulen; - $i -= $j; - - if (0 > $i) { - $s = str_repeat(' ', -$i).$s; - $len -= $i; - $i = 0; - } - - while ($j--) { - $s[$i + $j] = $uchr[$ulen + $j]; - } - - $uchr = substr($uchr, 0, $ulen); - } - } - if (isset($combClass[$uchr])) { - // Combining chars, for sorting - - if (!isset($c[$combClass[$uchr]])) { - $c[$combClass[$uchr]] = ''; - } - $c[$combClass[$uchr]] .= $uchr; - continue; - } - } else { - // Hangul chars - - $uchr = unpack('C*', $uchr); - $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; - - $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588)) - ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28)); - - if ($j %= 28) { - $uchr .= $j < 25 - ? ("\xE1\x86".\chr(0xA7 + $j)) - : ("\xE1\x87".\chr(0x67 + $j)); - } - } - if ($c) { - ksort($c); - $result .= implode('', $c); - $c = []; - } - - $result .= $uchr; - } - - if ($c) { - ksort($c); - $result .= implode('', $c); - } - - return $result; - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { - return require $file; - } - - return false; - } -} diff --git a/lib/symfony/polyfill-intl-normalizer/README.md b/lib/symfony/polyfill-intl-normalizer/README.md deleted file mode 100644 index b9b762e85..000000000 --- a/lib/symfony/polyfill-intl-normalizer/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Symfony Polyfill / Intl: Normalizer -=================================== - -This component provides a fallback implementation for the -[`Normalizer`](https://php.net/Normalizer) class provided -by the [Intl](https://php.net/intl) extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php b/lib/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php deleted file mode 100644 index 0fdfc890a..000000000 --- a/lib/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php +++ /dev/null @@ -1,17 +0,0 @@ - 'À', - 'Á' => 'Á', - 'Â' => 'Â', - 'Ã' => 'Ã', - 'Ä' => 'Ä', - 'Å' => 'Å', - 'Ç' => 'Ç', - 'È' => 'È', - 'É' => 'É', - 'Ê' => 'Ê', - 'Ë' => 'Ë', - 'Ì' => 'Ì', - 'Í' => 'Í', - 'Î' => 'Î', - 'Ï' => 'Ï', - 'Ñ' => 'Ñ', - 'Ò' => 'Ò', - 'Ó' => 'Ó', - 'Ô' => 'Ô', - 'Õ' => 'Õ', - 'Ö' => 'Ö', - 'Ù' => 'Ù', - 'Ú' => 'Ú', - 'Û' => 'Û', - 'Ü' => 'Ü', - 'Ý' => 'Ý', - 'à' => 'à', - 'á' => 'á', - 'â' => 'â', - 'ã' => 'ã', - 'ä' => 'ä', - 'å' => 'å', - 'ç' => 'ç', - 'è' => 'è', - 'é' => 'é', - 'ê' => 'ê', - 'ë' => 'ë', - 'ì' => 'ì', - 'í' => 'í', - 'î' => 'î', - 'ï' => 'ï', - 'ñ' => 'ñ', - 'ò' => 'ò', - 'ó' => 'ó', - 'ô' => 'ô', - 'õ' => 'õ', - 'ö' => 'ö', - 'ù' => 'ù', - 'ú' => 'ú', - 'û' => 'û', - 'ü' => 'ü', - 'ý' => 'ý', - 'ÿ' => 'ÿ', - 'Ā' => 'Ā', - 'ā' => 'ā', - 'Ă' => 'Ă', - 'ă' => 'ă', - 'Ą' => 'Ą', - 'ą' => 'ą', - 'Ć' => 'Ć', - 'ć' => 'ć', - 'Ĉ' => 'Ĉ', - 'ĉ' => 'ĉ', - 'Ċ' => 'Ċ', - 'ċ' => 'ċ', - 'Č' => 'Č', - 'č' => 'č', - 'Ď' => 'Ď', - 'ď' => 'ď', - 'Ē' => 'Ē', - 'ē' => 'ē', - 'Ĕ' => 'Ĕ', - 'ĕ' => 'ĕ', - 'Ė' => 'Ė', - 'ė' => 'ė', - 'Ę' => 'Ę', - 'ę' => 'ę', - 'Ě' => 'Ě', - 'ě' => 'ě', - 'Ĝ' => 'Ĝ', - 'ĝ' => 'ĝ', - 'Ğ' => 'Ğ', - 'ğ' => 'ğ', - 'Ġ' => 'Ġ', - 'ġ' => 'ġ', - 'Ģ' => 'Ģ', - 'ģ' => 'ģ', - 'Ĥ' => 'Ĥ', - 'ĥ' => 'ĥ', - 'Ĩ' => 'Ĩ', - 'ĩ' => 'ĩ', - 'Ī' => 'Ī', - 'ī' => 'ī', - 'Ĭ' => 'Ĭ', - 'ĭ' => 'ĭ', - 'Į' => 'Į', - 'į' => 'į', - 'İ' => 'İ', - 'Ĵ' => 'Ĵ', - 'ĵ' => 'ĵ', - 'Ķ' => 'Ķ', - 'ķ' => 'ķ', - 'Ĺ' => 'Ĺ', - 'ĺ' => 'ĺ', - 'Ļ' => 'Ļ', - 'ļ' => 'ļ', - 'Ľ' => 'Ľ', - 'ľ' => 'ľ', - 'Ń' => 'Ń', - 'ń' => 'ń', - 'Ņ' => 'Ņ', - 'ņ' => 'ņ', - 'Ň' => 'Ň', - 'ň' => 'ň', - 'Ō' => 'Ō', - 'ō' => 'ō', - 'Ŏ' => 'Ŏ', - 'ŏ' => 'ŏ', - 'Ő' => 'Ő', - 'ő' => 'ő', - 'Ŕ' => 'Ŕ', - 'ŕ' => 'ŕ', - 'Ŗ' => 'Ŗ', - 'ŗ' => 'ŗ', - 'Ř' => 'Ř', - 'ř' => 'ř', - 'Ś' => 'Ś', - 'ś' => 'ś', - 'Ŝ' => 'Ŝ', - 'ŝ' => 'ŝ', - 'Ş' => 'Ş', - 'ş' => 'ş', - 'Š' => 'Š', - 'š' => 'š', - 'Ţ' => 'Ţ', - 'ţ' => 'ţ', - 'Ť' => 'Ť', - 'ť' => 'ť', - 'Ũ' => 'Ũ', - 'ũ' => 'ũ', - 'Ū' => 'Ū', - 'ū' => 'ū', - 'Ŭ' => 'Ŭ', - 'ŭ' => 'ŭ', - 'Ů' => 'Ů', - 'ů' => 'ů', - 'Ű' => 'Ű', - 'ű' => 'ű', - 'Ų' => 'Ų', - 'ų' => 'ų', - 'Ŵ' => 'Ŵ', - 'ŵ' => 'ŵ', - 'Ŷ' => 'Ŷ', - 'ŷ' => 'ŷ', - 'Ÿ' => 'Ÿ', - 'Ź' => 'Ź', - 'ź' => 'ź', - 'Ż' => 'Ż', - 'ż' => 'ż', - 'Ž' => 'Ž', - 'ž' => 'ž', - 'Ơ' => 'Ơ', - 'ơ' => 'ơ', - 'Ư' => 'Ư', - 'ư' => 'ư', - 'Ǎ' => 'Ǎ', - 'ǎ' => 'ǎ', - 'Ǐ' => 'Ǐ', - 'ǐ' => 'ǐ', - 'Ǒ' => 'Ǒ', - 'ǒ' => 'ǒ', - 'Ǔ' => 'Ǔ', - 'ǔ' => 'ǔ', - 'Ǖ' => 'Ǖ', - 'ǖ' => 'ǖ', - 'Ǘ' => 'Ǘ', - 'ǘ' => 'ǘ', - 'Ǚ' => 'Ǚ', - 'ǚ' => 'ǚ', - 'Ǜ' => 'Ǜ', - 'ǜ' => 'ǜ', - 'Ǟ' => 'Ǟ', - 'ǟ' => 'ǟ', - 'Ǡ' => 'Ǡ', - 'ǡ' => 'ǡ', - 'Ǣ' => 'Ǣ', - 'ǣ' => 'ǣ', - 'Ǧ' => 'Ǧ', - 'ǧ' => 'ǧ', - 'Ǩ' => 'Ǩ', - 'ǩ' => 'ǩ', - 'Ǫ' => 'Ǫ', - 'ǫ' => 'ǫ', - 'Ǭ' => 'Ǭ', - 'ǭ' => 'ǭ', - 'Ǯ' => 'Ǯ', - 'ǯ' => 'ǯ', - 'ǰ' => 'ǰ', - 'Ǵ' => 'Ǵ', - 'ǵ' => 'ǵ', - 'Ǹ' => 'Ǹ', - 'ǹ' => 'ǹ', - 'Ǻ' => 'Ǻ', - 'ǻ' => 'ǻ', - 'Ǽ' => 'Ǽ', - 'ǽ' => 'ǽ', - 'Ǿ' => 'Ǿ', - 'ǿ' => 'ǿ', - 'Ȁ' => 'Ȁ', - 'ȁ' => 'ȁ', - 'Ȃ' => 'Ȃ', - 'ȃ' => 'ȃ', - 'Ȅ' => 'Ȅ', - 'ȅ' => 'ȅ', - 'Ȇ' => 'Ȇ', - 'ȇ' => 'ȇ', - 'Ȉ' => 'Ȉ', - 'ȉ' => 'ȉ', - 'Ȋ' => 'Ȋ', - 'ȋ' => 'ȋ', - 'Ȍ' => 'Ȍ', - 'ȍ' => 'ȍ', - 'Ȏ' => 'Ȏ', - 'ȏ' => 'ȏ', - 'Ȑ' => 'Ȑ', - 'ȑ' => 'ȑ', - 'Ȓ' => 'Ȓ', - 'ȓ' => 'ȓ', - 'Ȕ' => 'Ȕ', - 'ȕ' => 'ȕ', - 'Ȗ' => 'Ȗ', - 'ȗ' => 'ȗ', - 'Ș' => 'Ș', - 'ș' => 'ș', - 'Ț' => 'Ț', - 'ț' => 'ț', - 'Ȟ' => 'Ȟ', - 'ȟ' => 'ȟ', - 'Ȧ' => 'Ȧ', - 'ȧ' => 'ȧ', - 'Ȩ' => 'Ȩ', - 'ȩ' => 'ȩ', - 'Ȫ' => 'Ȫ', - 'ȫ' => 'ȫ', - 'Ȭ' => 'Ȭ', - 'ȭ' => 'ȭ', - 'Ȯ' => 'Ȯ', - 'ȯ' => 'ȯ', - 'Ȱ' => 'Ȱ', - 'ȱ' => 'ȱ', - 'Ȳ' => 'Ȳ', - 'ȳ' => 'ȳ', - '΅' => '΅', - 'Ά' => 'Ά', - 'Έ' => 'Έ', - 'Ή' => 'Ή', - 'Ί' => 'Ί', - 'Ό' => 'Ό', - 'Ύ' => 'Ύ', - 'Ώ' => 'Ώ', - 'ΐ' => 'ΐ', - 'Ϊ' => 'Ϊ', - 'Ϋ' => 'Ϋ', - 'ά' => 'ά', - 'έ' => 'έ', - 'ή' => 'ή', - 'ί' => 'ί', - 'ΰ' => 'ΰ', - 'ϊ' => 'ϊ', - 'ϋ' => 'ϋ', - 'ό' => 'ό', - 'ύ' => 'ύ', - 'ώ' => 'ώ', - 'ϓ' => 'ϓ', - 'ϔ' => 'ϔ', - 'Ѐ' => 'Ѐ', - 'Ё' => 'Ё', - 'Ѓ' => 'Ѓ', - 'Ї' => 'Ї', - 'Ќ' => 'Ќ', - 'Ѝ' => 'Ѝ', - 'Ў' => 'Ў', - 'Й' => 'Й', - 'й' => 'й', - 'ѐ' => 'ѐ', - 'ё' => 'ё', - 'ѓ' => 'ѓ', - 'ї' => 'ї', - 'ќ' => 'ќ', - 'ѝ' => 'ѝ', - 'ў' => 'ў', - 'Ѷ' => 'Ѷ', - 'ѷ' => 'ѷ', - 'Ӂ' => 'Ӂ', - 'ӂ' => 'ӂ', - 'Ӑ' => 'Ӑ', - 'ӑ' => 'ӑ', - 'Ӓ' => 'Ӓ', - 'ӓ' => 'ӓ', - 'Ӗ' => 'Ӗ', - 'ӗ' => 'ӗ', - 'Ӛ' => 'Ӛ', - 'ӛ' => 'ӛ', - 'Ӝ' => 'Ӝ', - 'ӝ' => 'ӝ', - 'Ӟ' => 'Ӟ', - 'ӟ' => 'ӟ', - 'Ӣ' => 'Ӣ', - 'ӣ' => 'ӣ', - 'Ӥ' => 'Ӥ', - 'ӥ' => 'ӥ', - 'Ӧ' => 'Ӧ', - 'ӧ' => 'ӧ', - 'Ӫ' => 'Ӫ', - 'ӫ' => 'ӫ', - 'Ӭ' => 'Ӭ', - 'ӭ' => 'ӭ', - 'Ӯ' => 'Ӯ', - 'ӯ' => 'ӯ', - 'Ӱ' => 'Ӱ', - 'ӱ' => 'ӱ', - 'Ӳ' => 'Ӳ', - 'ӳ' => 'ӳ', - 'Ӵ' => 'Ӵ', - 'ӵ' => 'ӵ', - 'Ӹ' => 'Ӹ', - 'ӹ' => 'ӹ', - 'آ' => 'آ', - 'أ' => 'أ', - 'ؤ' => 'ؤ', - 'إ' => 'إ', - 'ئ' => 'ئ', - 'ۀ' => 'ۀ', - 'ۂ' => 'ۂ', - 'ۓ' => 'ۓ', - 'ऩ' => 'ऩ', - 'ऱ' => 'ऱ', - 'ऴ' => 'ऴ', - 'ো' => 'ো', - 'ৌ' => 'ৌ', - 'ୈ' => 'ୈ', - 'ୋ' => 'ୋ', - 'ୌ' => 'ୌ', - 'ஔ' => 'ஔ', - 'ொ' => 'ொ', - 'ோ' => 'ோ', - 'ௌ' => 'ௌ', - 'ై' => 'ై', - 'ೀ' => 'ೀ', - 'ೇ' => 'ೇ', - 'ೈ' => 'ೈ', - 'ೊ' => 'ೊ', - 'ೋ' => 'ೋ', - 'ൊ' => 'ൊ', - 'ോ' => 'ോ', - 'ൌ' => 'ൌ', - 'ේ' => 'ේ', - 'ො' => 'ො', - 'ෝ' => 'ෝ', - 'ෞ' => 'ෞ', - 'ဦ' => 'ဦ', - 'ᬆ' => 'ᬆ', - 'ᬈ' => 'ᬈ', - 'ᬊ' => 'ᬊ', - 'ᬌ' => 'ᬌ', - 'ᬎ' => 'ᬎ', - 'ᬒ' => 'ᬒ', - 'ᬻ' => 'ᬻ', - 'ᬽ' => 'ᬽ', - 'ᭀ' => 'ᭀ', - 'ᭁ' => 'ᭁ', - 'ᭃ' => 'ᭃ', - 'Ḁ' => 'Ḁ', - 'ḁ' => 'ḁ', - 'Ḃ' => 'Ḃ', - 'ḃ' => 'ḃ', - 'Ḅ' => 'Ḅ', - 'ḅ' => 'ḅ', - 'Ḇ' => 'Ḇ', - 'ḇ' => 'ḇ', - 'Ḉ' => 'Ḉ', - 'ḉ' => 'ḉ', - 'Ḋ' => 'Ḋ', - 'ḋ' => 'ḋ', - 'Ḍ' => 'Ḍ', - 'ḍ' => 'ḍ', - 'Ḏ' => 'Ḏ', - 'ḏ' => 'ḏ', - 'Ḑ' => 'Ḑ', - 'ḑ' => 'ḑ', - 'Ḓ' => 'Ḓ', - 'ḓ' => 'ḓ', - 'Ḕ' => 'Ḕ', - 'ḕ' => 'ḕ', - 'Ḗ' => 'Ḗ', - 'ḗ' => 'ḗ', - 'Ḙ' => 'Ḙ', - 'ḙ' => 'ḙ', - 'Ḛ' => 'Ḛ', - 'ḛ' => 'ḛ', - 'Ḝ' => 'Ḝ', - 'ḝ' => 'ḝ', - 'Ḟ' => 'Ḟ', - 'ḟ' => 'ḟ', - 'Ḡ' => 'Ḡ', - 'ḡ' => 'ḡ', - 'Ḣ' => 'Ḣ', - 'ḣ' => 'ḣ', - 'Ḥ' => 'Ḥ', - 'ḥ' => 'ḥ', - 'Ḧ' => 'Ḧ', - 'ḧ' => 'ḧ', - 'Ḩ' => 'Ḩ', - 'ḩ' => 'ḩ', - 'Ḫ' => 'Ḫ', - 'ḫ' => 'ḫ', - 'Ḭ' => 'Ḭ', - 'ḭ' => 'ḭ', - 'Ḯ' => 'Ḯ', - 'ḯ' => 'ḯ', - 'Ḱ' => 'Ḱ', - 'ḱ' => 'ḱ', - 'Ḳ' => 'Ḳ', - 'ḳ' => 'ḳ', - 'Ḵ' => 'Ḵ', - 'ḵ' => 'ḵ', - 'Ḷ' => 'Ḷ', - 'ḷ' => 'ḷ', - 'Ḹ' => 'Ḹ', - 'ḹ' => 'ḹ', - 'Ḻ' => 'Ḻ', - 'ḻ' => 'ḻ', - 'Ḽ' => 'Ḽ', - 'ḽ' => 'ḽ', - 'Ḿ' => 'Ḿ', - 'ḿ' => 'ḿ', - 'Ṁ' => 'Ṁ', - 'ṁ' => 'ṁ', - 'Ṃ' => 'Ṃ', - 'ṃ' => 'ṃ', - 'Ṅ' => 'Ṅ', - 'ṅ' => 'ṅ', - 'Ṇ' => 'Ṇ', - 'ṇ' => 'ṇ', - 'Ṉ' => 'Ṉ', - 'ṉ' => 'ṉ', - 'Ṋ' => 'Ṋ', - 'ṋ' => 'ṋ', - 'Ṍ' => 'Ṍ', - 'ṍ' => 'ṍ', - 'Ṏ' => 'Ṏ', - 'ṏ' => 'ṏ', - 'Ṑ' => 'Ṑ', - 'ṑ' => 'ṑ', - 'Ṓ' => 'Ṓ', - 'ṓ' => 'ṓ', - 'Ṕ' => 'Ṕ', - 'ṕ' => 'ṕ', - 'Ṗ' => 'Ṗ', - 'ṗ' => 'ṗ', - 'Ṙ' => 'Ṙ', - 'ṙ' => 'ṙ', - 'Ṛ' => 'Ṛ', - 'ṛ' => 'ṛ', - 'Ṝ' => 'Ṝ', - 'ṝ' => 'ṝ', - 'Ṟ' => 'Ṟ', - 'ṟ' => 'ṟ', - 'Ṡ' => 'Ṡ', - 'ṡ' => 'ṡ', - 'Ṣ' => 'Ṣ', - 'ṣ' => 'ṣ', - 'Ṥ' => 'Ṥ', - 'ṥ' => 'ṥ', - 'Ṧ' => 'Ṧ', - 'ṧ' => 'ṧ', - 'Ṩ' => 'Ṩ', - 'ṩ' => 'ṩ', - 'Ṫ' => 'Ṫ', - 'ṫ' => 'ṫ', - 'Ṭ' => 'Ṭ', - 'ṭ' => 'ṭ', - 'Ṯ' => 'Ṯ', - 'ṯ' => 'ṯ', - 'Ṱ' => 'Ṱ', - 'ṱ' => 'ṱ', - 'Ṳ' => 'Ṳ', - 'ṳ' => 'ṳ', - 'Ṵ' => 'Ṵ', - 'ṵ' => 'ṵ', - 'Ṷ' => 'Ṷ', - 'ṷ' => 'ṷ', - 'Ṹ' => 'Ṹ', - 'ṹ' => 'ṹ', - 'Ṻ' => 'Ṻ', - 'ṻ' => 'ṻ', - 'Ṽ' => 'Ṽ', - 'ṽ' => 'ṽ', - 'Ṿ' => 'Ṿ', - 'ṿ' => 'ṿ', - 'Ẁ' => 'Ẁ', - 'ẁ' => 'ẁ', - 'Ẃ' => 'Ẃ', - 'ẃ' => 'ẃ', - 'Ẅ' => 'Ẅ', - 'ẅ' => 'ẅ', - 'Ẇ' => 'Ẇ', - 'ẇ' => 'ẇ', - 'Ẉ' => 'Ẉ', - 'ẉ' => 'ẉ', - 'Ẋ' => 'Ẋ', - 'ẋ' => 'ẋ', - 'Ẍ' => 'Ẍ', - 'ẍ' => 'ẍ', - 'Ẏ' => 'Ẏ', - 'ẏ' => 'ẏ', - 'Ẑ' => 'Ẑ', - 'ẑ' => 'ẑ', - 'Ẓ' => 'Ẓ', - 'ẓ' => 'ẓ', - 'Ẕ' => 'Ẕ', - 'ẕ' => 'ẕ', - 'ẖ' => 'ẖ', - 'ẗ' => 'ẗ', - 'ẘ' => 'ẘ', - 'ẙ' => 'ẙ', - 'ẛ' => 'ẛ', - 'Ạ' => 'Ạ', - 'ạ' => 'ạ', - 'Ả' => 'Ả', - 'ả' => 'ả', - 'Ấ' => 'Ấ', - 'ấ' => 'ấ', - 'Ầ' => 'Ầ', - 'ầ' => 'ầ', - 'Ẩ' => 'Ẩ', - 'ẩ' => 'ẩ', - 'Ẫ' => 'Ẫ', - 'ẫ' => 'ẫ', - 'Ậ' => 'Ậ', - 'ậ' => 'ậ', - 'Ắ' => 'Ắ', - 'ắ' => 'ắ', - 'Ằ' => 'Ằ', - 'ằ' => 'ằ', - 'Ẳ' => 'Ẳ', - 'ẳ' => 'ẳ', - 'Ẵ' => 'Ẵ', - 'ẵ' => 'ẵ', - 'Ặ' => 'Ặ', - 'ặ' => 'ặ', - 'Ẹ' => 'Ẹ', - 'ẹ' => 'ẹ', - 'Ẻ' => 'Ẻ', - 'ẻ' => 'ẻ', - 'Ẽ' => 'Ẽ', - 'ẽ' => 'ẽ', - 'Ế' => 'Ế', - 'ế' => 'ế', - 'Ề' => 'Ề', - 'ề' => 'ề', - 'Ể' => 'Ể', - 'ể' => 'ể', - 'Ễ' => 'Ễ', - 'ễ' => 'ễ', - 'Ệ' => 'Ệ', - 'ệ' => 'ệ', - 'Ỉ' => 'Ỉ', - 'ỉ' => 'ỉ', - 'Ị' => 'Ị', - 'ị' => 'ị', - 'Ọ' => 'Ọ', - 'ọ' => 'ọ', - 'Ỏ' => 'Ỏ', - 'ỏ' => 'ỏ', - 'Ố' => 'Ố', - 'ố' => 'ố', - 'Ồ' => 'Ồ', - 'ồ' => 'ồ', - 'Ổ' => 'Ổ', - 'ổ' => 'ổ', - 'Ỗ' => 'Ỗ', - 'ỗ' => 'ỗ', - 'Ộ' => 'Ộ', - 'ộ' => 'ộ', - 'Ớ' => 'Ớ', - 'ớ' => 'ớ', - 'Ờ' => 'Ờ', - 'ờ' => 'ờ', - 'Ở' => 'Ở', - 'ở' => 'ở', - 'Ỡ' => 'Ỡ', - 'ỡ' => 'ỡ', - 'Ợ' => 'Ợ', - 'ợ' => 'ợ', - 'Ụ' => 'Ụ', - 'ụ' => 'ụ', - 'Ủ' => 'Ủ', - 'ủ' => 'ủ', - 'Ứ' => 'Ứ', - 'ứ' => 'ứ', - 'Ừ' => 'Ừ', - 'ừ' => 'ừ', - 'Ử' => 'Ử', - 'ử' => 'ử', - 'Ữ' => 'Ữ', - 'ữ' => 'ữ', - 'Ự' => 'Ự', - 'ự' => 'ự', - 'Ỳ' => 'Ỳ', - 'ỳ' => 'ỳ', - 'Ỵ' => 'Ỵ', - 'ỵ' => 'ỵ', - 'Ỷ' => 'Ỷ', - 'ỷ' => 'ỷ', - 'Ỹ' => 'Ỹ', - 'ỹ' => 'ỹ', - 'ἀ' => 'ἀ', - 'ἁ' => 'ἁ', - 'ἂ' => 'ἂ', - 'ἃ' => 'ἃ', - 'ἄ' => 'ἄ', - 'ἅ' => 'ἅ', - 'ἆ' => 'ἆ', - 'ἇ' => 'ἇ', - 'Ἀ' => 'Ἀ', - 'Ἁ' => 'Ἁ', - 'Ἂ' => 'Ἂ', - 'Ἃ' => 'Ἃ', - 'Ἄ' => 'Ἄ', - 'Ἅ' => 'Ἅ', - 'Ἆ' => 'Ἆ', - 'Ἇ' => 'Ἇ', - 'ἐ' => 'ἐ', - 'ἑ' => 'ἑ', - 'ἒ' => 'ἒ', - 'ἓ' => 'ἓ', - 'ἔ' => 'ἔ', - 'ἕ' => 'ἕ', - 'Ἐ' => 'Ἐ', - 'Ἑ' => 'Ἑ', - 'Ἒ' => 'Ἒ', - 'Ἓ' => 'Ἓ', - 'Ἔ' => 'Ἔ', - 'Ἕ' => 'Ἕ', - 'ἠ' => 'ἠ', - 'ἡ' => 'ἡ', - 'ἢ' => 'ἢ', - 'ἣ' => 'ἣ', - 'ἤ' => 'ἤ', - 'ἥ' => 'ἥ', - 'ἦ' => 'ἦ', - 'ἧ' => 'ἧ', - 'Ἠ' => 'Ἠ', - 'Ἡ' => 'Ἡ', - 'Ἢ' => 'Ἢ', - 'Ἣ' => 'Ἣ', - 'Ἤ' => 'Ἤ', - 'Ἥ' => 'Ἥ', - 'Ἦ' => 'Ἦ', - 'Ἧ' => 'Ἧ', - 'ἰ' => 'ἰ', - 'ἱ' => 'ἱ', - 'ἲ' => 'ἲ', - 'ἳ' => 'ἳ', - 'ἴ' => 'ἴ', - 'ἵ' => 'ἵ', - 'ἶ' => 'ἶ', - 'ἷ' => 'ἷ', - 'Ἰ' => 'Ἰ', - 'Ἱ' => 'Ἱ', - 'Ἲ' => 'Ἲ', - 'Ἳ' => 'Ἳ', - 'Ἴ' => 'Ἴ', - 'Ἵ' => 'Ἵ', - 'Ἶ' => 'Ἶ', - 'Ἷ' => 'Ἷ', - 'ὀ' => 'ὀ', - 'ὁ' => 'ὁ', - 'ὂ' => 'ὂ', - 'ὃ' => 'ὃ', - 'ὄ' => 'ὄ', - 'ὅ' => 'ὅ', - 'Ὀ' => 'Ὀ', - 'Ὁ' => 'Ὁ', - 'Ὂ' => 'Ὂ', - 'Ὃ' => 'Ὃ', - 'Ὄ' => 'Ὄ', - 'Ὅ' => 'Ὅ', - 'ὐ' => 'ὐ', - 'ὑ' => 'ὑ', - 'ὒ' => 'ὒ', - 'ὓ' => 'ὓ', - 'ὔ' => 'ὔ', - 'ὕ' => 'ὕ', - 'ὖ' => 'ὖ', - 'ὗ' => 'ὗ', - 'Ὑ' => 'Ὑ', - 'Ὓ' => 'Ὓ', - 'Ὕ' => 'Ὕ', - 'Ὗ' => 'Ὗ', - 'ὠ' => 'ὠ', - 'ὡ' => 'ὡ', - 'ὢ' => 'ὢ', - 'ὣ' => 'ὣ', - 'ὤ' => 'ὤ', - 'ὥ' => 'ὥ', - 'ὦ' => 'ὦ', - 'ὧ' => 'ὧ', - 'Ὠ' => 'Ὠ', - 'Ὡ' => 'Ὡ', - 'Ὢ' => 'Ὢ', - 'Ὣ' => 'Ὣ', - 'Ὤ' => 'Ὤ', - 'Ὥ' => 'Ὥ', - 'Ὦ' => 'Ὦ', - 'Ὧ' => 'Ὧ', - 'ὰ' => 'ὰ', - 'ὲ' => 'ὲ', - 'ὴ' => 'ὴ', - 'ὶ' => 'ὶ', - 'ὸ' => 'ὸ', - 'ὺ' => 'ὺ', - 'ὼ' => 'ὼ', - 'ᾀ' => 'ᾀ', - 'ᾁ' => 'ᾁ', - 'ᾂ' => 'ᾂ', - 'ᾃ' => 'ᾃ', - 'ᾄ' => 'ᾄ', - 'ᾅ' => 'ᾅ', - 'ᾆ' => 'ᾆ', - 'ᾇ' => 'ᾇ', - 'ᾈ' => 'ᾈ', - 'ᾉ' => 'ᾉ', - 'ᾊ' => 'ᾊ', - 'ᾋ' => 'ᾋ', - 'ᾌ' => 'ᾌ', - 'ᾍ' => 'ᾍ', - 'ᾎ' => 'ᾎ', - 'ᾏ' => 'ᾏ', - 'ᾐ' => 'ᾐ', - 'ᾑ' => 'ᾑ', - 'ᾒ' => 'ᾒ', - 'ᾓ' => 'ᾓ', - 'ᾔ' => 'ᾔ', - 'ᾕ' => 'ᾕ', - 'ᾖ' => 'ᾖ', - 'ᾗ' => 'ᾗ', - 'ᾘ' => 'ᾘ', - 'ᾙ' => 'ᾙ', - 'ᾚ' => 'ᾚ', - 'ᾛ' => 'ᾛ', - 'ᾜ' => 'ᾜ', - 'ᾝ' => 'ᾝ', - 'ᾞ' => 'ᾞ', - 'ᾟ' => 'ᾟ', - 'ᾠ' => 'ᾠ', - 'ᾡ' => 'ᾡ', - 'ᾢ' => 'ᾢ', - 'ᾣ' => 'ᾣ', - 'ᾤ' => 'ᾤ', - 'ᾥ' => 'ᾥ', - 'ᾦ' => 'ᾦ', - 'ᾧ' => 'ᾧ', - 'ᾨ' => 'ᾨ', - 'ᾩ' => 'ᾩ', - 'ᾪ' => 'ᾪ', - 'ᾫ' => 'ᾫ', - 'ᾬ' => 'ᾬ', - 'ᾭ' => 'ᾭ', - 'ᾮ' => 'ᾮ', - 'ᾯ' => 'ᾯ', - 'ᾰ' => 'ᾰ', - 'ᾱ' => 'ᾱ', - 'ᾲ' => 'ᾲ', - 'ᾳ' => 'ᾳ', - 'ᾴ' => 'ᾴ', - 'ᾶ' => 'ᾶ', - 'ᾷ' => 'ᾷ', - 'Ᾰ' => 'Ᾰ', - 'Ᾱ' => 'Ᾱ', - 'Ὰ' => 'Ὰ', - 'ᾼ' => 'ᾼ', - '῁' => '῁', - 'ῂ' => 'ῂ', - 'ῃ' => 'ῃ', - 'ῄ' => 'ῄ', - 'ῆ' => 'ῆ', - 'ῇ' => 'ῇ', - 'Ὲ' => 'Ὲ', - 'Ὴ' => 'Ὴ', - 'ῌ' => 'ῌ', - '῍' => '῍', - '῎' => '῎', - '῏' => '῏', - 'ῐ' => 'ῐ', - 'ῑ' => 'ῑ', - 'ῒ' => 'ῒ', - 'ῖ' => 'ῖ', - 'ῗ' => 'ῗ', - 'Ῐ' => 'Ῐ', - 'Ῑ' => 'Ῑ', - 'Ὶ' => 'Ὶ', - '῝' => '῝', - '῞' => '῞', - '῟' => '῟', - 'ῠ' => 'ῠ', - 'ῡ' => 'ῡ', - 'ῢ' => 'ῢ', - 'ῤ' => 'ῤ', - 'ῥ' => 'ῥ', - 'ῦ' => 'ῦ', - 'ῧ' => 'ῧ', - 'Ῠ' => 'Ῠ', - 'Ῡ' => 'Ῡ', - 'Ὺ' => 'Ὺ', - 'Ῥ' => 'Ῥ', - '῭' => '῭', - 'ῲ' => 'ῲ', - 'ῳ' => 'ῳ', - 'ῴ' => 'ῴ', - 'ῶ' => 'ῶ', - 'ῷ' => 'ῷ', - 'Ὸ' => 'Ὸ', - 'Ὼ' => 'Ὼ', - 'ῼ' => 'ῼ', - '↚' => '↚', - '↛' => '↛', - '↮' => '↮', - '⇍' => '⇍', - '⇎' => '⇎', - '⇏' => '⇏', - '∄' => '∄', - '∉' => '∉', - '∌' => '∌', - '∤' => '∤', - '∦' => '∦', - '≁' => '≁', - '≄' => '≄', - '≇' => '≇', - '≉' => '≉', - '≠' => '≠', - '≢' => '≢', - '≭' => '≭', - '≮' => '≮', - '≯' => '≯', - '≰' => '≰', - '≱' => '≱', - '≴' => '≴', - '≵' => '≵', - '≸' => '≸', - '≹' => '≹', - '⊀' => '⊀', - '⊁' => '⊁', - '⊄' => '⊄', - '⊅' => '⊅', - '⊈' => '⊈', - '⊉' => '⊉', - '⊬' => '⊬', - '⊭' => '⊭', - '⊮' => '⊮', - '⊯' => '⊯', - '⋠' => '⋠', - '⋡' => '⋡', - '⋢' => '⋢', - '⋣' => '⋣', - '⋪' => '⋪', - '⋫' => '⋫', - '⋬' => '⋬', - '⋭' => '⋭', - 'が' => 'が', - 'ぎ' => 'ぎ', - 'ぐ' => 'ぐ', - 'げ' => 'げ', - 'ご' => 'ご', - 'ざ' => 'ざ', - 'じ' => 'じ', - 'ず' => 'ず', - 'ぜ' => 'ぜ', - 'ぞ' => 'ぞ', - 'だ' => 'だ', - 'ぢ' => 'ぢ', - 'づ' => 'づ', - 'で' => 'で', - 'ど' => 'ど', - 'ば' => 'ば', - 'ぱ' => 'ぱ', - 'び' => 'び', - 'ぴ' => 'ぴ', - 'ぶ' => 'ぶ', - 'ぷ' => 'ぷ', - 'べ' => 'べ', - 'ぺ' => 'ぺ', - 'ぼ' => 'ぼ', - 'ぽ' => 'ぽ', - 'ゔ' => 'ゔ', - 'ゞ' => 'ゞ', - 'ガ' => 'ガ', - 'ギ' => 'ギ', - 'グ' => 'グ', - 'ゲ' => 'ゲ', - 'ゴ' => 'ゴ', - 'ザ' => 'ザ', - 'ジ' => 'ジ', - 'ズ' => 'ズ', - 'ゼ' => 'ゼ', - 'ゾ' => 'ゾ', - 'ダ' => 'ダ', - 'ヂ' => 'ヂ', - 'ヅ' => 'ヅ', - 'デ' => 'デ', - 'ド' => 'ド', - 'バ' => 'バ', - 'パ' => 'パ', - 'ビ' => 'ビ', - 'ピ' => 'ピ', - 'ブ' => 'ブ', - 'プ' => 'プ', - 'ベ' => 'ベ', - 'ペ' => 'ペ', - 'ボ' => 'ボ', - 'ポ' => 'ポ', - 'ヴ' => 'ヴ', - 'ヷ' => 'ヷ', - 'ヸ' => 'ヸ', - 'ヹ' => 'ヹ', - 'ヺ' => 'ヺ', - 'ヾ' => 'ヾ', - '𑂚' => '𑂚', - '𑂜' => '𑂜', - '𑂫' => '𑂫', - '𑄮' => '𑄮', - '𑄯' => '𑄯', - '𑍋' => '𑍋', - '𑍌' => '𑍌', - '𑒻' => '𑒻', - '𑒼' => '𑒼', - '𑒾' => '𑒾', - '𑖺' => '𑖺', - '𑖻' => '𑖻', - '𑤸' => '𑤸', -); diff --git a/lib/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php b/lib/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php deleted file mode 100644 index 5a3e8e096..000000000 --- a/lib/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php +++ /dev/null @@ -1,2065 +0,0 @@ - 'À', - 'Á' => 'Á', - 'Â' => 'Â', - 'Ã' => 'Ã', - 'Ä' => 'Ä', - 'Å' => 'Å', - 'Ç' => 'Ç', - 'È' => 'È', - 'É' => 'É', - 'Ê' => 'Ê', - 'Ë' => 'Ë', - 'Ì' => 'Ì', - 'Í' => 'Í', - 'Î' => 'Î', - 'Ï' => 'Ï', - 'Ñ' => 'Ñ', - 'Ò' => 'Ò', - 'Ó' => 'Ó', - 'Ô' => 'Ô', - 'Õ' => 'Õ', - 'Ö' => 'Ö', - 'Ù' => 'Ù', - 'Ú' => 'Ú', - 'Û' => 'Û', - 'Ü' => 'Ü', - 'Ý' => 'Ý', - 'à' => 'à', - 'á' => 'á', - 'â' => 'â', - 'ã' => 'ã', - 'ä' => 'ä', - 'å' => 'å', - 'ç' => 'ç', - 'è' => 'è', - 'é' => 'é', - 'ê' => 'ê', - 'ë' => 'ë', - 'ì' => 'ì', - 'í' => 'í', - 'î' => 'î', - 'ï' => 'ï', - 'ñ' => 'ñ', - 'ò' => 'ò', - 'ó' => 'ó', - 'ô' => 'ô', - 'õ' => 'õ', - 'ö' => 'ö', - 'ù' => 'ù', - 'ú' => 'ú', - 'û' => 'û', - 'ü' => 'ü', - 'ý' => 'ý', - 'ÿ' => 'ÿ', - 'Ā' => 'Ā', - 'ā' => 'ā', - 'Ă' => 'Ă', - 'ă' => 'ă', - 'Ą' => 'Ą', - 'ą' => 'ą', - 'Ć' => 'Ć', - 'ć' => 'ć', - 'Ĉ' => 'Ĉ', - 'ĉ' => 'ĉ', - 'Ċ' => 'Ċ', - 'ċ' => 'ċ', - 'Č' => 'Č', - 'č' => 'č', - 'Ď' => 'Ď', - 'ď' => 'ď', - 'Ē' => 'Ē', - 'ē' => 'ē', - 'Ĕ' => 'Ĕ', - 'ĕ' => 'ĕ', - 'Ė' => 'Ė', - 'ė' => 'ė', - 'Ę' => 'Ę', - 'ę' => 'ę', - 'Ě' => 'Ě', - 'ě' => 'ě', - 'Ĝ' => 'Ĝ', - 'ĝ' => 'ĝ', - 'Ğ' => 'Ğ', - 'ğ' => 'ğ', - 'Ġ' => 'Ġ', - 'ġ' => 'ġ', - 'Ģ' => 'Ģ', - 'ģ' => 'ģ', - 'Ĥ' => 'Ĥ', - 'ĥ' => 'ĥ', - 'Ĩ' => 'Ĩ', - 'ĩ' => 'ĩ', - 'Ī' => 'Ī', - 'ī' => 'ī', - 'Ĭ' => 'Ĭ', - 'ĭ' => 'ĭ', - 'Į' => 'Į', - 'į' => 'į', - 'İ' => 'İ', - 'Ĵ' => 'Ĵ', - 'ĵ' => 'ĵ', - 'Ķ' => 'Ķ', - 'ķ' => 'ķ', - 'Ĺ' => 'Ĺ', - 'ĺ' => 'ĺ', - 'Ļ' => 'Ļ', - 'ļ' => 'ļ', - 'Ľ' => 'Ľ', - 'ľ' => 'ľ', - 'Ń' => 'Ń', - 'ń' => 'ń', - 'Ņ' => 'Ņ', - 'ņ' => 'ņ', - 'Ň' => 'Ň', - 'ň' => 'ň', - 'Ō' => 'Ō', - 'ō' => 'ō', - 'Ŏ' => 'Ŏ', - 'ŏ' => 'ŏ', - 'Ő' => 'Ő', - 'ő' => 'ő', - 'Ŕ' => 'Ŕ', - 'ŕ' => 'ŕ', - 'Ŗ' => 'Ŗ', - 'ŗ' => 'ŗ', - 'Ř' => 'Ř', - 'ř' => 'ř', - 'Ś' => 'Ś', - 'ś' => 'ś', - 'Ŝ' => 'Ŝ', - 'ŝ' => 'ŝ', - 'Ş' => 'Ş', - 'ş' => 'ş', - 'Š' => 'Š', - 'š' => 'š', - 'Ţ' => 'Ţ', - 'ţ' => 'ţ', - 'Ť' => 'Ť', - 'ť' => 'ť', - 'Ũ' => 'Ũ', - 'ũ' => 'ũ', - 'Ū' => 'Ū', - 'ū' => 'ū', - 'Ŭ' => 'Ŭ', - 'ŭ' => 'ŭ', - 'Ů' => 'Ů', - 'ů' => 'ů', - 'Ű' => 'Ű', - 'ű' => 'ű', - 'Ų' => 'Ų', - 'ų' => 'ų', - 'Ŵ' => 'Ŵ', - 'ŵ' => 'ŵ', - 'Ŷ' => 'Ŷ', - 'ŷ' => 'ŷ', - 'Ÿ' => 'Ÿ', - 'Ź' => 'Ź', - 'ź' => 'ź', - 'Ż' => 'Ż', - 'ż' => 'ż', - 'Ž' => 'Ž', - 'ž' => 'ž', - 'Ơ' => 'Ơ', - 'ơ' => 'ơ', - 'Ư' => 'Ư', - 'ư' => 'ư', - 'Ǎ' => 'Ǎ', - 'ǎ' => 'ǎ', - 'Ǐ' => 'Ǐ', - 'ǐ' => 'ǐ', - 'Ǒ' => 'Ǒ', - 'ǒ' => 'ǒ', - 'Ǔ' => 'Ǔ', - 'ǔ' => 'ǔ', - 'Ǖ' => 'Ǖ', - 'ǖ' => 'ǖ', - 'Ǘ' => 'Ǘ', - 'ǘ' => 'ǘ', - 'Ǚ' => 'Ǚ', - 'ǚ' => 'ǚ', - 'Ǜ' => 'Ǜ', - 'ǜ' => 'ǜ', - 'Ǟ' => 'Ǟ', - 'ǟ' => 'ǟ', - 'Ǡ' => 'Ǡ', - 'ǡ' => 'ǡ', - 'Ǣ' => 'Ǣ', - 'ǣ' => 'ǣ', - 'Ǧ' => 'Ǧ', - 'ǧ' => 'ǧ', - 'Ǩ' => 'Ǩ', - 'ǩ' => 'ǩ', - 'Ǫ' => 'Ǫ', - 'ǫ' => 'ǫ', - 'Ǭ' => 'Ǭ', - 'ǭ' => 'ǭ', - 'Ǯ' => 'Ǯ', - 'ǯ' => 'ǯ', - 'ǰ' => 'ǰ', - 'Ǵ' => 'Ǵ', - 'ǵ' => 'ǵ', - 'Ǹ' => 'Ǹ', - 'ǹ' => 'ǹ', - 'Ǻ' => 'Ǻ', - 'ǻ' => 'ǻ', - 'Ǽ' => 'Ǽ', - 'ǽ' => 'ǽ', - 'Ǿ' => 'Ǿ', - 'ǿ' => 'ǿ', - 'Ȁ' => 'Ȁ', - 'ȁ' => 'ȁ', - 'Ȃ' => 'Ȃ', - 'ȃ' => 'ȃ', - 'Ȅ' => 'Ȅ', - 'ȅ' => 'ȅ', - 'Ȇ' => 'Ȇ', - 'ȇ' => 'ȇ', - 'Ȉ' => 'Ȉ', - 'ȉ' => 'ȉ', - 'Ȋ' => 'Ȋ', - 'ȋ' => 'ȋ', - 'Ȍ' => 'Ȍ', - 'ȍ' => 'ȍ', - 'Ȏ' => 'Ȏ', - 'ȏ' => 'ȏ', - 'Ȑ' => 'Ȑ', - 'ȑ' => 'ȑ', - 'Ȓ' => 'Ȓ', - 'ȓ' => 'ȓ', - 'Ȕ' => 'Ȕ', - 'ȕ' => 'ȕ', - 'Ȗ' => 'Ȗ', - 'ȗ' => 'ȗ', - 'Ș' => 'Ș', - 'ș' => 'ș', - 'Ț' => 'Ț', - 'ț' => 'ț', - 'Ȟ' => 'Ȟ', - 'ȟ' => 'ȟ', - 'Ȧ' => 'Ȧ', - 'ȧ' => 'ȧ', - 'Ȩ' => 'Ȩ', - 'ȩ' => 'ȩ', - 'Ȫ' => 'Ȫ', - 'ȫ' => 'ȫ', - 'Ȭ' => 'Ȭ', - 'ȭ' => 'ȭ', - 'Ȯ' => 'Ȯ', - 'ȯ' => 'ȯ', - 'Ȱ' => 'Ȱ', - 'ȱ' => 'ȱ', - 'Ȳ' => 'Ȳ', - 'ȳ' => 'ȳ', - '̀' => '̀', - '́' => '́', - '̓' => '̓', - '̈́' => '̈́', - 'ʹ' => 'ʹ', - ';' => ';', - '΅' => '΅', - 'Ά' => 'Ά', - '·' => '·', - 'Έ' => 'Έ', - 'Ή' => 'Ή', - 'Ί' => 'Ί', - 'Ό' => 'Ό', - 'Ύ' => 'Ύ', - 'Ώ' => 'Ώ', - 'ΐ' => 'ΐ', - 'Ϊ' => 'Ϊ', - 'Ϋ' => 'Ϋ', - 'ά' => 'ά', - 'έ' => 'έ', - 'ή' => 'ή', - 'ί' => 'ί', - 'ΰ' => 'ΰ', - 'ϊ' => 'ϊ', - 'ϋ' => 'ϋ', - 'ό' => 'ό', - 'ύ' => 'ύ', - 'ώ' => 'ώ', - 'ϓ' => 'ϓ', - 'ϔ' => 'ϔ', - 'Ѐ' => 'Ѐ', - 'Ё' => 'Ё', - 'Ѓ' => 'Ѓ', - 'Ї' => 'Ї', - 'Ќ' => 'Ќ', - 'Ѝ' => 'Ѝ', - 'Ў' => 'Ў', - 'Й' => 'Й', - 'й' => 'й', - 'ѐ' => 'ѐ', - 'ё' => 'ё', - 'ѓ' => 'ѓ', - 'ї' => 'ї', - 'ќ' => 'ќ', - 'ѝ' => 'ѝ', - 'ў' => 'ў', - 'Ѷ' => 'Ѷ', - 'ѷ' => 'ѷ', - 'Ӂ' => 'Ӂ', - 'ӂ' => 'ӂ', - 'Ӑ' => 'Ӑ', - 'ӑ' => 'ӑ', - 'Ӓ' => 'Ӓ', - 'ӓ' => 'ӓ', - 'Ӗ' => 'Ӗ', - 'ӗ' => 'ӗ', - 'Ӛ' => 'Ӛ', - 'ӛ' => 'ӛ', - 'Ӝ' => 'Ӝ', - 'ӝ' => 'ӝ', - 'Ӟ' => 'Ӟ', - 'ӟ' => 'ӟ', - 'Ӣ' => 'Ӣ', - 'ӣ' => 'ӣ', - 'Ӥ' => 'Ӥ', - 'ӥ' => 'ӥ', - 'Ӧ' => 'Ӧ', - 'ӧ' => 'ӧ', - 'Ӫ' => 'Ӫ', - 'ӫ' => 'ӫ', - 'Ӭ' => 'Ӭ', - 'ӭ' => 'ӭ', - 'Ӯ' => 'Ӯ', - 'ӯ' => 'ӯ', - 'Ӱ' => 'Ӱ', - 'ӱ' => 'ӱ', - 'Ӳ' => 'Ӳ', - 'ӳ' => 'ӳ', - 'Ӵ' => 'Ӵ', - 'ӵ' => 'ӵ', - 'Ӹ' => 'Ӹ', - 'ӹ' => 'ӹ', - 'آ' => 'آ', - 'أ' => 'أ', - 'ؤ' => 'ؤ', - 'إ' => 'إ', - 'ئ' => 'ئ', - 'ۀ' => 'ۀ', - 'ۂ' => 'ۂ', - 'ۓ' => 'ۓ', - 'ऩ' => 'ऩ', - 'ऱ' => 'ऱ', - 'ऴ' => 'ऴ', - 'क़' => 'क़', - 'ख़' => 'ख़', - 'ग़' => 'ग़', - 'ज़' => 'ज़', - 'ड़' => 'ड़', - 'ढ़' => 'ढ़', - 'फ़' => 'फ़', - 'य़' => 'य़', - 'ো' => 'ো', - 'ৌ' => 'ৌ', - 'ড়' => 'ড়', - 'ঢ়' => 'ঢ়', - 'য়' => 'য়', - 'ਲ਼' => 'ਲ਼', - 'ਸ਼' => 'ਸ਼', - 'ਖ਼' => 'ਖ਼', - 'ਗ਼' => 'ਗ਼', - 'ਜ਼' => 'ਜ਼', - 'ਫ਼' => 'ਫ਼', - 'ୈ' => 'ୈ', - 'ୋ' => 'ୋ', - 'ୌ' => 'ୌ', - 'ଡ଼' => 'ଡ଼', - 'ଢ଼' => 'ଢ଼', - 'ஔ' => 'ஔ', - 'ொ' => 'ொ', - 'ோ' => 'ோ', - 'ௌ' => 'ௌ', - 'ై' => 'ై', - 'ೀ' => 'ೀ', - 'ೇ' => 'ೇ', - 'ೈ' => 'ೈ', - 'ೊ' => 'ೊ', - 'ೋ' => 'ೋ', - 'ൊ' => 'ൊ', - 'ോ' => 'ോ', - 'ൌ' => 'ൌ', - 'ේ' => 'ේ', - 'ො' => 'ො', - 'ෝ' => 'ෝ', - 'ෞ' => 'ෞ', - 'གྷ' => 'གྷ', - 'ཌྷ' => 'ཌྷ', - 'དྷ' => 'དྷ', - 'བྷ' => 'བྷ', - 'ཛྷ' => 'ཛྷ', - 'ཀྵ' => 'ཀྵ', - 'ཱི' => 'ཱི', - 'ཱུ' => 'ཱུ', - 'ྲྀ' => 'ྲྀ', - 'ླྀ' => 'ླྀ', - 'ཱྀ' => 'ཱྀ', - 'ྒྷ' => 'ྒྷ', - 'ྜྷ' => 'ྜྷ', - 'ྡྷ' => 'ྡྷ', - 'ྦྷ' => 'ྦྷ', - 'ྫྷ' => 'ྫྷ', - 'ྐྵ' => 'ྐྵ', - 'ဦ' => 'ဦ', - 'ᬆ' => 'ᬆ', - 'ᬈ' => 'ᬈ', - 'ᬊ' => 'ᬊ', - 'ᬌ' => 'ᬌ', - 'ᬎ' => 'ᬎ', - 'ᬒ' => 'ᬒ', - 'ᬻ' => 'ᬻ', - 'ᬽ' => 'ᬽ', - 'ᭀ' => 'ᭀ', - 'ᭁ' => 'ᭁ', - 'ᭃ' => 'ᭃ', - 'Ḁ' => 'Ḁ', - 'ḁ' => 'ḁ', - 'Ḃ' => 'Ḃ', - 'ḃ' => 'ḃ', - 'Ḅ' => 'Ḅ', - 'ḅ' => 'ḅ', - 'Ḇ' => 'Ḇ', - 'ḇ' => 'ḇ', - 'Ḉ' => 'Ḉ', - 'ḉ' => 'ḉ', - 'Ḋ' => 'Ḋ', - 'ḋ' => 'ḋ', - 'Ḍ' => 'Ḍ', - 'ḍ' => 'ḍ', - 'Ḏ' => 'Ḏ', - 'ḏ' => 'ḏ', - 'Ḑ' => 'Ḑ', - 'ḑ' => 'ḑ', - 'Ḓ' => 'Ḓ', - 'ḓ' => 'ḓ', - 'Ḕ' => 'Ḕ', - 'ḕ' => 'ḕ', - 'Ḗ' => 'Ḗ', - 'ḗ' => 'ḗ', - 'Ḙ' => 'Ḙ', - 'ḙ' => 'ḙ', - 'Ḛ' => 'Ḛ', - 'ḛ' => 'ḛ', - 'Ḝ' => 'Ḝ', - 'ḝ' => 'ḝ', - 'Ḟ' => 'Ḟ', - 'ḟ' => 'ḟ', - 'Ḡ' => 'Ḡ', - 'ḡ' => 'ḡ', - 'Ḣ' => 'Ḣ', - 'ḣ' => 'ḣ', - 'Ḥ' => 'Ḥ', - 'ḥ' => 'ḥ', - 'Ḧ' => 'Ḧ', - 'ḧ' => 'ḧ', - 'Ḩ' => 'Ḩ', - 'ḩ' => 'ḩ', - 'Ḫ' => 'Ḫ', - 'ḫ' => 'ḫ', - 'Ḭ' => 'Ḭ', - 'ḭ' => 'ḭ', - 'Ḯ' => 'Ḯ', - 'ḯ' => 'ḯ', - 'Ḱ' => 'Ḱ', - 'ḱ' => 'ḱ', - 'Ḳ' => 'Ḳ', - 'ḳ' => 'ḳ', - 'Ḵ' => 'Ḵ', - 'ḵ' => 'ḵ', - 'Ḷ' => 'Ḷ', - 'ḷ' => 'ḷ', - 'Ḹ' => 'Ḹ', - 'ḹ' => 'ḹ', - 'Ḻ' => 'Ḻ', - 'ḻ' => 'ḻ', - 'Ḽ' => 'Ḽ', - 'ḽ' => 'ḽ', - 'Ḿ' => 'Ḿ', - 'ḿ' => 'ḿ', - 'Ṁ' => 'Ṁ', - 'ṁ' => 'ṁ', - 'Ṃ' => 'Ṃ', - 'ṃ' => 'ṃ', - 'Ṅ' => 'Ṅ', - 'ṅ' => 'ṅ', - 'Ṇ' => 'Ṇ', - 'ṇ' => 'ṇ', - 'Ṉ' => 'Ṉ', - 'ṉ' => 'ṉ', - 'Ṋ' => 'Ṋ', - 'ṋ' => 'ṋ', - 'Ṍ' => 'Ṍ', - 'ṍ' => 'ṍ', - 'Ṏ' => 'Ṏ', - 'ṏ' => 'ṏ', - 'Ṑ' => 'Ṑ', - 'ṑ' => 'ṑ', - 'Ṓ' => 'Ṓ', - 'ṓ' => 'ṓ', - 'Ṕ' => 'Ṕ', - 'ṕ' => 'ṕ', - 'Ṗ' => 'Ṗ', - 'ṗ' => 'ṗ', - 'Ṙ' => 'Ṙ', - 'ṙ' => 'ṙ', - 'Ṛ' => 'Ṛ', - 'ṛ' => 'ṛ', - 'Ṝ' => 'Ṝ', - 'ṝ' => 'ṝ', - 'Ṟ' => 'Ṟ', - 'ṟ' => 'ṟ', - 'Ṡ' => 'Ṡ', - 'ṡ' => 'ṡ', - 'Ṣ' => 'Ṣ', - 'ṣ' => 'ṣ', - 'Ṥ' => 'Ṥ', - 'ṥ' => 'ṥ', - 'Ṧ' => 'Ṧ', - 'ṧ' => 'ṧ', - 'Ṩ' => 'Ṩ', - 'ṩ' => 'ṩ', - 'Ṫ' => 'Ṫ', - 'ṫ' => 'ṫ', - 'Ṭ' => 'Ṭ', - 'ṭ' => 'ṭ', - 'Ṯ' => 'Ṯ', - 'ṯ' => 'ṯ', - 'Ṱ' => 'Ṱ', - 'ṱ' => 'ṱ', - 'Ṳ' => 'Ṳ', - 'ṳ' => 'ṳ', - 'Ṵ' => 'Ṵ', - 'ṵ' => 'ṵ', - 'Ṷ' => 'Ṷ', - 'ṷ' => 'ṷ', - 'Ṹ' => 'Ṹ', - 'ṹ' => 'ṹ', - 'Ṻ' => 'Ṻ', - 'ṻ' => 'ṻ', - 'Ṽ' => 'Ṽ', - 'ṽ' => 'ṽ', - 'Ṿ' => 'Ṿ', - 'ṿ' => 'ṿ', - 'Ẁ' => 'Ẁ', - 'ẁ' => 'ẁ', - 'Ẃ' => 'Ẃ', - 'ẃ' => 'ẃ', - 'Ẅ' => 'Ẅ', - 'ẅ' => 'ẅ', - 'Ẇ' => 'Ẇ', - 'ẇ' => 'ẇ', - 'Ẉ' => 'Ẉ', - 'ẉ' => 'ẉ', - 'Ẋ' => 'Ẋ', - 'ẋ' => 'ẋ', - 'Ẍ' => 'Ẍ', - 'ẍ' => 'ẍ', - 'Ẏ' => 'Ẏ', - 'ẏ' => 'ẏ', - 'Ẑ' => 'Ẑ', - 'ẑ' => 'ẑ', - 'Ẓ' => 'Ẓ', - 'ẓ' => 'ẓ', - 'Ẕ' => 'Ẕ', - 'ẕ' => 'ẕ', - 'ẖ' => 'ẖ', - 'ẗ' => 'ẗ', - 'ẘ' => 'ẘ', - 'ẙ' => 'ẙ', - 'ẛ' => 'ẛ', - 'Ạ' => 'Ạ', - 'ạ' => 'ạ', - 'Ả' => 'Ả', - 'ả' => 'ả', - 'Ấ' => 'Ấ', - 'ấ' => 'ấ', - 'Ầ' => 'Ầ', - 'ầ' => 'ầ', - 'Ẩ' => 'Ẩ', - 'ẩ' => 'ẩ', - 'Ẫ' => 'Ẫ', - 'ẫ' => 'ẫ', - 'Ậ' => 'Ậ', - 'ậ' => 'ậ', - 'Ắ' => 'Ắ', - 'ắ' => 'ắ', - 'Ằ' => 'Ằ', - 'ằ' => 'ằ', - 'Ẳ' => 'Ẳ', - 'ẳ' => 'ẳ', - 'Ẵ' => 'Ẵ', - 'ẵ' => 'ẵ', - 'Ặ' => 'Ặ', - 'ặ' => 'ặ', - 'Ẹ' => 'Ẹ', - 'ẹ' => 'ẹ', - 'Ẻ' => 'Ẻ', - 'ẻ' => 'ẻ', - 'Ẽ' => 'Ẽ', - 'ẽ' => 'ẽ', - 'Ế' => 'Ế', - 'ế' => 'ế', - 'Ề' => 'Ề', - 'ề' => 'ề', - 'Ể' => 'Ể', - 'ể' => 'ể', - 'Ễ' => 'Ễ', - 'ễ' => 'ễ', - 'Ệ' => 'Ệ', - 'ệ' => 'ệ', - 'Ỉ' => 'Ỉ', - 'ỉ' => 'ỉ', - 'Ị' => 'Ị', - 'ị' => 'ị', - 'Ọ' => 'Ọ', - 'ọ' => 'ọ', - 'Ỏ' => 'Ỏ', - 'ỏ' => 'ỏ', - 'Ố' => 'Ố', - 'ố' => 'ố', - 'Ồ' => 'Ồ', - 'ồ' => 'ồ', - 'Ổ' => 'Ổ', - 'ổ' => 'ổ', - 'Ỗ' => 'Ỗ', - 'ỗ' => 'ỗ', - 'Ộ' => 'Ộ', - 'ộ' => 'ộ', - 'Ớ' => 'Ớ', - 'ớ' => 'ớ', - 'Ờ' => 'Ờ', - 'ờ' => 'ờ', - 'Ở' => 'Ở', - 'ở' => 'ở', - 'Ỡ' => 'Ỡ', - 'ỡ' => 'ỡ', - 'Ợ' => 'Ợ', - 'ợ' => 'ợ', - 'Ụ' => 'Ụ', - 'ụ' => 'ụ', - 'Ủ' => 'Ủ', - 'ủ' => 'ủ', - 'Ứ' => 'Ứ', - 'ứ' => 'ứ', - 'Ừ' => 'Ừ', - 'ừ' => 'ừ', - 'Ử' => 'Ử', - 'ử' => 'ử', - 'Ữ' => 'Ữ', - 'ữ' => 'ữ', - 'Ự' => 'Ự', - 'ự' => 'ự', - 'Ỳ' => 'Ỳ', - 'ỳ' => 'ỳ', - 'Ỵ' => 'Ỵ', - 'ỵ' => 'ỵ', - 'Ỷ' => 'Ỷ', - 'ỷ' => 'ỷ', - 'Ỹ' => 'Ỹ', - 'ỹ' => 'ỹ', - 'ἀ' => 'ἀ', - 'ἁ' => 'ἁ', - 'ἂ' => 'ἂ', - 'ἃ' => 'ἃ', - 'ἄ' => 'ἄ', - 'ἅ' => 'ἅ', - 'ἆ' => 'ἆ', - 'ἇ' => 'ἇ', - 'Ἀ' => 'Ἀ', - 'Ἁ' => 'Ἁ', - 'Ἂ' => 'Ἂ', - 'Ἃ' => 'Ἃ', - 'Ἄ' => 'Ἄ', - 'Ἅ' => 'Ἅ', - 'Ἆ' => 'Ἆ', - 'Ἇ' => 'Ἇ', - 'ἐ' => 'ἐ', - 'ἑ' => 'ἑ', - 'ἒ' => 'ἒ', - 'ἓ' => 'ἓ', - 'ἔ' => 'ἔ', - 'ἕ' => 'ἕ', - 'Ἐ' => 'Ἐ', - 'Ἑ' => 'Ἑ', - 'Ἒ' => 'Ἒ', - 'Ἓ' => 'Ἓ', - 'Ἔ' => 'Ἔ', - 'Ἕ' => 'Ἕ', - 'ἠ' => 'ἠ', - 'ἡ' => 'ἡ', - 'ἢ' => 'ἢ', - 'ἣ' => 'ἣ', - 'ἤ' => 'ἤ', - 'ἥ' => 'ἥ', - 'ἦ' => 'ἦ', - 'ἧ' => 'ἧ', - 'Ἠ' => 'Ἠ', - 'Ἡ' => 'Ἡ', - 'Ἢ' => 'Ἢ', - 'Ἣ' => 'Ἣ', - 'Ἤ' => 'Ἤ', - 'Ἥ' => 'Ἥ', - 'Ἦ' => 'Ἦ', - 'Ἧ' => 'Ἧ', - 'ἰ' => 'ἰ', - 'ἱ' => 'ἱ', - 'ἲ' => 'ἲ', - 'ἳ' => 'ἳ', - 'ἴ' => 'ἴ', - 'ἵ' => 'ἵ', - 'ἶ' => 'ἶ', - 'ἷ' => 'ἷ', - 'Ἰ' => 'Ἰ', - 'Ἱ' => 'Ἱ', - 'Ἲ' => 'Ἲ', - 'Ἳ' => 'Ἳ', - 'Ἴ' => 'Ἴ', - 'Ἵ' => 'Ἵ', - 'Ἶ' => 'Ἶ', - 'Ἷ' => 'Ἷ', - 'ὀ' => 'ὀ', - 'ὁ' => 'ὁ', - 'ὂ' => 'ὂ', - 'ὃ' => 'ὃ', - 'ὄ' => 'ὄ', - 'ὅ' => 'ὅ', - 'Ὀ' => 'Ὀ', - 'Ὁ' => 'Ὁ', - 'Ὂ' => 'Ὂ', - 'Ὃ' => 'Ὃ', - 'Ὄ' => 'Ὄ', - 'Ὅ' => 'Ὅ', - 'ὐ' => 'ὐ', - 'ὑ' => 'ὑ', - 'ὒ' => 'ὒ', - 'ὓ' => 'ὓ', - 'ὔ' => 'ὔ', - 'ὕ' => 'ὕ', - 'ὖ' => 'ὖ', - 'ὗ' => 'ὗ', - 'Ὑ' => 'Ὑ', - 'Ὓ' => 'Ὓ', - 'Ὕ' => 'Ὕ', - 'Ὗ' => 'Ὗ', - 'ὠ' => 'ὠ', - 'ὡ' => 'ὡ', - 'ὢ' => 'ὢ', - 'ὣ' => 'ὣ', - 'ὤ' => 'ὤ', - 'ὥ' => 'ὥ', - 'ὦ' => 'ὦ', - 'ὧ' => 'ὧ', - 'Ὠ' => 'Ὠ', - 'Ὡ' => 'Ὡ', - 'Ὢ' => 'Ὢ', - 'Ὣ' => 'Ὣ', - 'Ὤ' => 'Ὤ', - 'Ὥ' => 'Ὥ', - 'Ὦ' => 'Ὦ', - 'Ὧ' => 'Ὧ', - 'ὰ' => 'ὰ', - 'ά' => 'ά', - 'ὲ' => 'ὲ', - 'έ' => 'έ', - 'ὴ' => 'ὴ', - 'ή' => 'ή', - 'ὶ' => 'ὶ', - 'ί' => 'ί', - 'ὸ' => 'ὸ', - 'ό' => 'ό', - 'ὺ' => 'ὺ', - 'ύ' => 'ύ', - 'ὼ' => 'ὼ', - 'ώ' => 'ώ', - 'ᾀ' => 'ᾀ', - 'ᾁ' => 'ᾁ', - 'ᾂ' => 'ᾂ', - 'ᾃ' => 'ᾃ', - 'ᾄ' => 'ᾄ', - 'ᾅ' => 'ᾅ', - 'ᾆ' => 'ᾆ', - 'ᾇ' => 'ᾇ', - 'ᾈ' => 'ᾈ', - 'ᾉ' => 'ᾉ', - 'ᾊ' => 'ᾊ', - 'ᾋ' => 'ᾋ', - 'ᾌ' => 'ᾌ', - 'ᾍ' => 'ᾍ', - 'ᾎ' => 'ᾎ', - 'ᾏ' => 'ᾏ', - 'ᾐ' => 'ᾐ', - 'ᾑ' => 'ᾑ', - 'ᾒ' => 'ᾒ', - 'ᾓ' => 'ᾓ', - 'ᾔ' => 'ᾔ', - 'ᾕ' => 'ᾕ', - 'ᾖ' => 'ᾖ', - 'ᾗ' => 'ᾗ', - 'ᾘ' => 'ᾘ', - 'ᾙ' => 'ᾙ', - 'ᾚ' => 'ᾚ', - 'ᾛ' => 'ᾛ', - 'ᾜ' => 'ᾜ', - 'ᾝ' => 'ᾝ', - 'ᾞ' => 'ᾞ', - 'ᾟ' => 'ᾟ', - 'ᾠ' => 'ᾠ', - 'ᾡ' => 'ᾡ', - 'ᾢ' => 'ᾢ', - 'ᾣ' => 'ᾣ', - 'ᾤ' => 'ᾤ', - 'ᾥ' => 'ᾥ', - 'ᾦ' => 'ᾦ', - 'ᾧ' => 'ᾧ', - 'ᾨ' => 'ᾨ', - 'ᾩ' => 'ᾩ', - 'ᾪ' => 'ᾪ', - 'ᾫ' => 'ᾫ', - 'ᾬ' => 'ᾬ', - 'ᾭ' => 'ᾭ', - 'ᾮ' => 'ᾮ', - 'ᾯ' => 'ᾯ', - 'ᾰ' => 'ᾰ', - 'ᾱ' => 'ᾱ', - 'ᾲ' => 'ᾲ', - 'ᾳ' => 'ᾳ', - 'ᾴ' => 'ᾴ', - 'ᾶ' => 'ᾶ', - 'ᾷ' => 'ᾷ', - 'Ᾰ' => 'Ᾰ', - 'Ᾱ' => 'Ᾱ', - 'Ὰ' => 'Ὰ', - 'Ά' => 'Ά', - 'ᾼ' => 'ᾼ', - 'ι' => 'ι', - '῁' => '῁', - 'ῂ' => 'ῂ', - 'ῃ' => 'ῃ', - 'ῄ' => 'ῄ', - 'ῆ' => 'ῆ', - 'ῇ' => 'ῇ', - 'Ὲ' => 'Ὲ', - 'Έ' => 'Έ', - 'Ὴ' => 'Ὴ', - 'Ή' => 'Ή', - 'ῌ' => 'ῌ', - '῍' => '῍', - '῎' => '῎', - '῏' => '῏', - 'ῐ' => 'ῐ', - 'ῑ' => 'ῑ', - 'ῒ' => 'ῒ', - 'ΐ' => 'ΐ', - 'ῖ' => 'ῖ', - 'ῗ' => 'ῗ', - 'Ῐ' => 'Ῐ', - 'Ῑ' => 'Ῑ', - 'Ὶ' => 'Ὶ', - 'Ί' => 'Ί', - '῝' => '῝', - '῞' => '῞', - '῟' => '῟', - 'ῠ' => 'ῠ', - 'ῡ' => 'ῡ', - 'ῢ' => 'ῢ', - 'ΰ' => 'ΰ', - 'ῤ' => 'ῤ', - 'ῥ' => 'ῥ', - 'ῦ' => 'ῦ', - 'ῧ' => 'ῧ', - 'Ῠ' => 'Ῠ', - 'Ῡ' => 'Ῡ', - 'Ὺ' => 'Ὺ', - 'Ύ' => 'Ύ', - 'Ῥ' => 'Ῥ', - '῭' => '῭', - '΅' => '΅', - '`' => '`', - 'ῲ' => 'ῲ', - 'ῳ' => 'ῳ', - 'ῴ' => 'ῴ', - 'ῶ' => 'ῶ', - 'ῷ' => 'ῷ', - 'Ὸ' => 'Ὸ', - 'Ό' => 'Ό', - 'Ὼ' => 'Ὼ', - 'Ώ' => 'Ώ', - 'ῼ' => 'ῼ', - '´' => '´', - ' ' => ' ', - ' ' => ' ', - 'Ω' => 'Ω', - 'K' => 'K', - 'Å' => 'Å', - '↚' => '↚', - '↛' => '↛', - '↮' => '↮', - '⇍' => '⇍', - '⇎' => '⇎', - '⇏' => '⇏', - '∄' => '∄', - '∉' => '∉', - '∌' => '∌', - '∤' => '∤', - '∦' => '∦', - '≁' => '≁', - '≄' => '≄', - '≇' => '≇', - '≉' => '≉', - '≠' => '≠', - '≢' => '≢', - '≭' => '≭', - '≮' => '≮', - '≯' => '≯', - '≰' => '≰', - '≱' => '≱', - '≴' => '≴', - '≵' => '≵', - '≸' => '≸', - '≹' => '≹', - '⊀' => '⊀', - '⊁' => '⊁', - '⊄' => '⊄', - '⊅' => '⊅', - '⊈' => '⊈', - '⊉' => '⊉', - '⊬' => '⊬', - '⊭' => '⊭', - '⊮' => '⊮', - '⊯' => '⊯', - '⋠' => '⋠', - '⋡' => '⋡', - '⋢' => '⋢', - '⋣' => '⋣', - '⋪' => '⋪', - '⋫' => '⋫', - '⋬' => '⋬', - '⋭' => '⋭', - '〈' => '〈', - '〉' => '〉', - '⫝̸' => '⫝̸', - 'が' => 'が', - 'ぎ' => 'ぎ', - 'ぐ' => 'ぐ', - 'げ' => 'げ', - 'ご' => 'ご', - 'ざ' => 'ざ', - 'じ' => 'じ', - 'ず' => 'ず', - 'ぜ' => 'ぜ', - 'ぞ' => 'ぞ', - 'だ' => 'だ', - 'ぢ' => 'ぢ', - 'づ' => 'づ', - 'で' => 'で', - 'ど' => 'ど', - 'ば' => 'ば', - 'ぱ' => 'ぱ', - 'び' => 'び', - 'ぴ' => 'ぴ', - 'ぶ' => 'ぶ', - 'ぷ' => 'ぷ', - 'べ' => 'べ', - 'ぺ' => 'ぺ', - 'ぼ' => 'ぼ', - 'ぽ' => 'ぽ', - 'ゔ' => 'ゔ', - 'ゞ' => 'ゞ', - 'ガ' => 'ガ', - 'ギ' => 'ギ', - 'グ' => 'グ', - 'ゲ' => 'ゲ', - 'ゴ' => 'ゴ', - 'ザ' => 'ザ', - 'ジ' => 'ジ', - 'ズ' => 'ズ', - 'ゼ' => 'ゼ', - 'ゾ' => 'ゾ', - 'ダ' => 'ダ', - 'ヂ' => 'ヂ', - 'ヅ' => 'ヅ', - 'デ' => 'デ', - 'ド' => 'ド', - 'バ' => 'バ', - 'パ' => 'パ', - 'ビ' => 'ビ', - 'ピ' => 'ピ', - 'ブ' => 'ブ', - 'プ' => 'プ', - 'ベ' => 'ベ', - 'ペ' => 'ペ', - 'ボ' => 'ボ', - 'ポ' => 'ポ', - 'ヴ' => 'ヴ', - 'ヷ' => 'ヷ', - 'ヸ' => 'ヸ', - 'ヹ' => 'ヹ', - 'ヺ' => 'ヺ', - 'ヾ' => 'ヾ', - '豈' => '豈', - '更' => '更', - '車' => '車', - '賈' => '賈', - '滑' => '滑', - '串' => '串', - '句' => '句', - '龜' => '龜', - '龜' => '龜', - '契' => '契', - '金' => '金', - '喇' => '喇', - '奈' => '奈', - '懶' => '懶', - '癩' => '癩', - '羅' => '羅', - '蘿' => '蘿', - '螺' => '螺', - '裸' => '裸', - '邏' => '邏', - '樂' => '樂', - '洛' => '洛', - '烙' => '烙', - '珞' => '珞', - '落' => '落', - '酪' => '酪', - '駱' => '駱', - '亂' => '亂', - '卵' => '卵', - '欄' => '欄', - '爛' => '爛', - '蘭' => '蘭', - '鸞' => '鸞', - '嵐' => '嵐', - '濫' => '濫', - '藍' => '藍', - '襤' => '襤', - '拉' => '拉', - '臘' => '臘', - '蠟' => '蠟', - '廊' => '廊', - '朗' => '朗', - '浪' => '浪', - '狼' => '狼', - '郎' => '郎', - '來' => '來', - '冷' => '冷', - '勞' => '勞', - '擄' => '擄', - '櫓' => '櫓', - '爐' => '爐', - '盧' => '盧', - '老' => '老', - '蘆' => '蘆', - '虜' => '虜', - '路' => '路', - '露' => '露', - '魯' => '魯', - '鷺' => '鷺', - '碌' => '碌', - '祿' => '祿', - '綠' => '綠', - '菉' => '菉', - '錄' => '錄', - '鹿' => '鹿', - '論' => '論', - '壟' => '壟', - '弄' => '弄', - '籠' => '籠', - '聾' => '聾', - '牢' => '牢', - '磊' => '磊', - '賂' => '賂', - '雷' => '雷', - '壘' => '壘', - '屢' => '屢', - '樓' => '樓', - '淚' => '淚', - '漏' => '漏', - '累' => '累', - '縷' => '縷', - '陋' => '陋', - '勒' => '勒', - '肋' => '肋', - '凜' => '凜', - '凌' => '凌', - '稜' => '稜', - '綾' => '綾', - '菱' => '菱', - '陵' => '陵', - '讀' => '讀', - '拏' => '拏', - '樂' => '樂', - '諾' => '諾', - '丹' => '丹', - '寧' => '寧', - '怒' => '怒', - '率' => '率', - '異' => '異', - '北' => '北', - '磻' => '磻', - '便' => '便', - '復' => '復', - '不' => '不', - '泌' => '泌', - '數' => '數', - '索' => '索', - '參' => '參', - '塞' => '塞', - '省' => '省', - '葉' => '葉', - '說' => '說', - '殺' => '殺', - '辰' => '辰', - '沈' => '沈', - '拾' => '拾', - '若' => '若', - '掠' => '掠', - '略' => '略', - '亮' => '亮', - '兩' => '兩', - '凉' => '凉', - '梁' => '梁', - '糧' => '糧', - '良' => '良', - '諒' => '諒', - '量' => '量', - '勵' => '勵', - '呂' => '呂', - '女' => '女', - '廬' => '廬', - '旅' => '旅', - '濾' => '濾', - '礪' => '礪', - '閭' => '閭', - '驪' => '驪', - '麗' => '麗', - '黎' => '黎', - '力' => '力', - '曆' => '曆', - '歷' => '歷', - '轢' => '轢', - '年' => '年', - '憐' => '憐', - '戀' => '戀', - '撚' => '撚', - '漣' => '漣', - '煉' => '煉', - '璉' => '璉', - '秊' => '秊', - '練' => '練', - '聯' => '聯', - '輦' => '輦', - '蓮' => '蓮', - '連' => '連', - '鍊' => '鍊', - '列' => '列', - '劣' => '劣', - '咽' => '咽', - '烈' => '烈', - '裂' => '裂', - '說' => '說', - '廉' => '廉', - '念' => '念', - '捻' => '捻', - '殮' => '殮', - '簾' => '簾', - '獵' => '獵', - '令' => '令', - '囹' => '囹', - '寧' => '寧', - '嶺' => '嶺', - '怜' => '怜', - '玲' => '玲', - '瑩' => '瑩', - '羚' => '羚', - '聆' => '聆', - '鈴' => '鈴', - '零' => '零', - '靈' => '靈', - '領' => '領', - '例' => '例', - '禮' => '禮', - '醴' => '醴', - '隸' => '隸', - '惡' => '惡', - '了' => '了', - '僚' => '僚', - '寮' => '寮', - '尿' => '尿', - '料' => '料', - '樂' => '樂', - '燎' => '燎', - '療' => '療', - '蓼' => '蓼', - '遼' => '遼', - '龍' => '龍', - '暈' => '暈', - '阮' => '阮', - '劉' => '劉', - '杻' => '杻', - '柳' => '柳', - '流' => '流', - '溜' => '溜', - '琉' => '琉', - '留' => '留', - '硫' => '硫', - '紐' => '紐', - '類' => '類', - '六' => '六', - '戮' => '戮', - '陸' => '陸', - '倫' => '倫', - '崙' => '崙', - '淪' => '淪', - '輪' => '輪', - '律' => '律', - '慄' => '慄', - '栗' => '栗', - '率' => '率', - '隆' => '隆', - '利' => '利', - '吏' => '吏', - '履' => '履', - '易' => '易', - '李' => '李', - '梨' => '梨', - '泥' => '泥', - '理' => '理', - '痢' => '痢', - '罹' => '罹', - '裏' => '裏', - '裡' => '裡', - '里' => '里', - '離' => '離', - '匿' => '匿', - '溺' => '溺', - '吝' => '吝', - '燐' => '燐', - '璘' => '璘', - '藺' => '藺', - '隣' => '隣', - '鱗' => '鱗', - '麟' => '麟', - '林' => '林', - '淋' => '淋', - '臨' => '臨', - '立' => '立', - '笠' => '笠', - '粒' => '粒', - '狀' => '狀', - '炙' => '炙', - '識' => '識', - '什' => '什', - '茶' => '茶', - '刺' => '刺', - '切' => '切', - '度' => '度', - '拓' => '拓', - '糖' => '糖', - '宅' => '宅', - '洞' => '洞', - '暴' => '暴', - '輻' => '輻', - '行' => '行', - '降' => '降', - '見' => '見', - '廓' => '廓', - '兀' => '兀', - '嗀' => '嗀', - '塚' => '塚', - '晴' => '晴', - '凞' => '凞', - '猪' => '猪', - '益' => '益', - '礼' => '礼', - '神' => '神', - '祥' => '祥', - '福' => '福', - '靖' => '靖', - '精' => '精', - '羽' => '羽', - '蘒' => '蘒', - '諸' => '諸', - '逸' => '逸', - '都' => '都', - '飯' => '飯', - '飼' => '飼', - '館' => '館', - '鶴' => '鶴', - '郞' => '郞', - '隷' => '隷', - '侮' => '侮', - '僧' => '僧', - '免' => '免', - '勉' => '勉', - '勤' => '勤', - '卑' => '卑', - '喝' => '喝', - '嘆' => '嘆', - '器' => '器', - '塀' => '塀', - '墨' => '墨', - '層' => '層', - '屮' => '屮', - '悔' => '悔', - '慨' => '慨', - '憎' => '憎', - '懲' => '懲', - '敏' => '敏', - '既' => '既', - '暑' => '暑', - '梅' => '梅', - '海' => '海', - '渚' => '渚', - '漢' => '漢', - '煮' => '煮', - '爫' => '爫', - '琢' => '琢', - '碑' => '碑', - '社' => '社', - '祉' => '祉', - '祈' => '祈', - '祐' => '祐', - '祖' => '祖', - '祝' => '祝', - '禍' => '禍', - '禎' => '禎', - '穀' => '穀', - '突' => '突', - '節' => '節', - '練' => '練', - '縉' => '縉', - '繁' => '繁', - '署' => '署', - '者' => '者', - '臭' => '臭', - '艹' => '艹', - '艹' => '艹', - '著' => '著', - '褐' => '褐', - '視' => '視', - '謁' => '謁', - '謹' => '謹', - '賓' => '賓', - '贈' => '贈', - '辶' => '辶', - '逸' => '逸', - '難' => '難', - '響' => '響', - '頻' => '頻', - '恵' => '恵', - '𤋮' => '𤋮', - '舘' => '舘', - '並' => '並', - '况' => '况', - '全' => '全', - '侀' => '侀', - '充' => '充', - '冀' => '冀', - '勇' => '勇', - '勺' => '勺', - '喝' => '喝', - '啕' => '啕', - '喙' => '喙', - '嗢' => '嗢', - '塚' => '塚', - '墳' => '墳', - '奄' => '奄', - '奔' => '奔', - '婢' => '婢', - '嬨' => '嬨', - '廒' => '廒', - '廙' => '廙', - '彩' => '彩', - '徭' => '徭', - '惘' => '惘', - '慎' => '慎', - '愈' => '愈', - '憎' => '憎', - '慠' => '慠', - '懲' => '懲', - '戴' => '戴', - '揄' => '揄', - '搜' => '搜', - '摒' => '摒', - '敖' => '敖', - '晴' => '晴', - '朗' => '朗', - '望' => '望', - '杖' => '杖', - '歹' => '歹', - '殺' => '殺', - '流' => '流', - '滛' => '滛', - '滋' => '滋', - '漢' => '漢', - '瀞' => '瀞', - '煮' => '煮', - '瞧' => '瞧', - '爵' => '爵', - '犯' => '犯', - '猪' => '猪', - '瑱' => '瑱', - '甆' => '甆', - '画' => '画', - '瘝' => '瘝', - '瘟' => '瘟', - '益' => '益', - '盛' => '盛', - '直' => '直', - '睊' => '睊', - '着' => '着', - '磌' => '磌', - '窱' => '窱', - '節' => '節', - '类' => '类', - '絛' => '絛', - '練' => '練', - '缾' => '缾', - '者' => '者', - '荒' => '荒', - '華' => '華', - '蝹' => '蝹', - '襁' => '襁', - '覆' => '覆', - '視' => '視', - '調' => '調', - '諸' => '諸', - '請' => '請', - '謁' => '謁', - '諾' => '諾', - '諭' => '諭', - '謹' => '謹', - '變' => '變', - '贈' => '贈', - '輸' => '輸', - '遲' => '遲', - '醙' => '醙', - '鉶' => '鉶', - '陼' => '陼', - '難' => '難', - '靖' => '靖', - '韛' => '韛', - '響' => '響', - '頋' => '頋', - '頻' => '頻', - '鬒' => '鬒', - '龜' => '龜', - '𢡊' => '𢡊', - '𢡄' => '𢡄', - '𣏕' => '𣏕', - '㮝' => '㮝', - '䀘' => '䀘', - '䀹' => '䀹', - '𥉉' => '𥉉', - '𥳐' => '𥳐', - '𧻓' => '𧻓', - '齃' => '齃', - '龎' => '龎', - 'יִ' => 'יִ', - 'ײַ' => 'ײַ', - 'שׁ' => 'שׁ', - 'שׂ' => 'שׂ', - 'שּׁ' => 'שּׁ', - 'שּׂ' => 'שּׂ', - 'אַ' => 'אַ', - 'אָ' => 'אָ', - 'אּ' => 'אּ', - 'בּ' => 'בּ', - 'גּ' => 'גּ', - 'דּ' => 'דּ', - 'הּ' => 'הּ', - 'וּ' => 'וּ', - 'זּ' => 'זּ', - 'טּ' => 'טּ', - 'יּ' => 'יּ', - 'ךּ' => 'ךּ', - 'כּ' => 'כּ', - 'לּ' => 'לּ', - 'מּ' => 'מּ', - 'נּ' => 'נּ', - 'סּ' => 'סּ', - 'ףּ' => 'ףּ', - 'פּ' => 'פּ', - 'צּ' => 'צּ', - 'קּ' => 'קּ', - 'רּ' => 'רּ', - 'שּ' => 'שּ', - 'תּ' => 'תּ', - 'וֹ' => 'וֹ', - 'בֿ' => 'בֿ', - 'כֿ' => 'כֿ', - 'פֿ' => 'פֿ', - '𑂚' => '𑂚', - '𑂜' => '𑂜', - '𑂫' => '𑂫', - '𑄮' => '𑄮', - '𑄯' => '𑄯', - '𑍋' => '𑍋', - '𑍌' => '𑍌', - '𑒻' => '𑒻', - '𑒼' => '𑒼', - '𑒾' => '𑒾', - '𑖺' => '𑖺', - '𑖻' => '𑖻', - '𑤸' => '𑤸', - '𝅗𝅥' => '𝅗𝅥', - '𝅘𝅥' => '𝅘𝅥', - '𝅘𝅥𝅮' => '𝅘𝅥𝅮', - '𝅘𝅥𝅯' => '𝅘𝅥𝅯', - '𝅘𝅥𝅰' => '𝅘𝅥𝅰', - '𝅘𝅥𝅱' => '𝅘𝅥𝅱', - '𝅘𝅥𝅲' => '𝅘𝅥𝅲', - '𝆹𝅥' => '𝆹𝅥', - '𝆺𝅥' => '𝆺𝅥', - '𝆹𝅥𝅮' => '𝆹𝅥𝅮', - '𝆺𝅥𝅮' => '𝆺𝅥𝅮', - '𝆹𝅥𝅯' => '𝆹𝅥𝅯', - '𝆺𝅥𝅯' => '𝆺𝅥𝅯', - '丽' => '丽', - '丸' => '丸', - '乁' => '乁', - '𠄢' => '𠄢', - '你' => '你', - '侮' => '侮', - '侻' => '侻', - '倂' => '倂', - '偺' => '偺', - '備' => '備', - '僧' => '僧', - '像' => '像', - '㒞' => '㒞', - '𠘺' => '𠘺', - '免' => '免', - '兔' => '兔', - '兤' => '兤', - '具' => '具', - '𠔜' => '𠔜', - '㒹' => '㒹', - '內' => '內', - '再' => '再', - '𠕋' => '𠕋', - '冗' => '冗', - '冤' => '冤', - '仌' => '仌', - '冬' => '冬', - '况' => '况', - '𩇟' => '𩇟', - '凵' => '凵', - '刃' => '刃', - '㓟' => '㓟', - '刻' => '刻', - '剆' => '剆', - '割' => '割', - '剷' => '剷', - '㔕' => '㔕', - '勇' => '勇', - '勉' => '勉', - '勤' => '勤', - '勺' => '勺', - '包' => '包', - '匆' => '匆', - '北' => '北', - '卉' => '卉', - '卑' => '卑', - '博' => '博', - '即' => '即', - '卽' => '卽', - '卿' => '卿', - '卿' => '卿', - '卿' => '卿', - '𠨬' => '𠨬', - '灰' => '灰', - '及' => '及', - '叟' => '叟', - '𠭣' => '𠭣', - '叫' => '叫', - '叱' => '叱', - '吆' => '吆', - '咞' => '咞', - '吸' => '吸', - '呈' => '呈', - '周' => '周', - '咢' => '咢', - '哶' => '哶', - '唐' => '唐', - '啓' => '啓', - '啣' => '啣', - '善' => '善', - '善' => '善', - '喙' => '喙', - '喫' => '喫', - '喳' => '喳', - '嗂' => '嗂', - '圖' => '圖', - '嘆' => '嘆', - '圗' => '圗', - '噑' => '噑', - '噴' => '噴', - '切' => '切', - '壮' => '壮', - '城' => '城', - '埴' => '埴', - '堍' => '堍', - '型' => '型', - '堲' => '堲', - '報' => '報', - '墬' => '墬', - '𡓤' => '𡓤', - '売' => '売', - '壷' => '壷', - '夆' => '夆', - '多' => '多', - '夢' => '夢', - '奢' => '奢', - '𡚨' => '𡚨', - '𡛪' => '𡛪', - '姬' => '姬', - '娛' => '娛', - '娧' => '娧', - '姘' => '姘', - '婦' => '婦', - '㛮' => '㛮', - '㛼' => '㛼', - '嬈' => '嬈', - '嬾' => '嬾', - '嬾' => '嬾', - '𡧈' => '𡧈', - '寃' => '寃', - '寘' => '寘', - '寧' => '寧', - '寳' => '寳', - '𡬘' => '𡬘', - '寿' => '寿', - '将' => '将', - '当' => '当', - '尢' => '尢', - '㞁' => '㞁', - '屠' => '屠', - '屮' => '屮', - '峀' => '峀', - '岍' => '岍', - '𡷤' => '𡷤', - '嵃' => '嵃', - '𡷦' => '𡷦', - '嵮' => '嵮', - '嵫' => '嵫', - '嵼' => '嵼', - '巡' => '巡', - '巢' => '巢', - '㠯' => '㠯', - '巽' => '巽', - '帨' => '帨', - '帽' => '帽', - '幩' => '幩', - '㡢' => '㡢', - '𢆃' => '𢆃', - '㡼' => '㡼', - '庰' => '庰', - '庳' => '庳', - '庶' => '庶', - '廊' => '廊', - '𪎒' => '𪎒', - '廾' => '廾', - '𢌱' => '𢌱', - '𢌱' => '𢌱', - '舁' => '舁', - '弢' => '弢', - '弢' => '弢', - '㣇' => '㣇', - '𣊸' => '𣊸', - '𦇚' => '𦇚', - '形' => '形', - '彫' => '彫', - '㣣' => '㣣', - '徚' => '徚', - '忍' => '忍', - '志' => '志', - '忹' => '忹', - '悁' => '悁', - '㤺' => '㤺', - '㤜' => '㤜', - '悔' => '悔', - '𢛔' => '𢛔', - '惇' => '惇', - '慈' => '慈', - '慌' => '慌', - '慎' => '慎', - '慌' => '慌', - '慺' => '慺', - '憎' => '憎', - '憲' => '憲', - '憤' => '憤', - '憯' => '憯', - '懞' => '懞', - '懲' => '懲', - '懶' => '懶', - '成' => '成', - '戛' => '戛', - '扝' => '扝', - '抱' => '抱', - '拔' => '拔', - '捐' => '捐', - '𢬌' => '𢬌', - '挽' => '挽', - '拼' => '拼', - '捨' => '捨', - '掃' => '掃', - '揤' => '揤', - '𢯱' => '𢯱', - '搢' => '搢', - '揅' => '揅', - '掩' => '掩', - '㨮' => '㨮', - '摩' => '摩', - '摾' => '摾', - '撝' => '撝', - '摷' => '摷', - '㩬' => '㩬', - '敏' => '敏', - '敬' => '敬', - '𣀊' => '𣀊', - '旣' => '旣', - '書' => '書', - '晉' => '晉', - '㬙' => '㬙', - '暑' => '暑', - '㬈' => '㬈', - '㫤' => '㫤', - '冒' => '冒', - '冕' => '冕', - '最' => '最', - '暜' => '暜', - '肭' => '肭', - '䏙' => '䏙', - '朗' => '朗', - '望' => '望', - '朡' => '朡', - '杞' => '杞', - '杓' => '杓', - '𣏃' => '𣏃', - '㭉' => '㭉', - '柺' => '柺', - '枅' => '枅', - '桒' => '桒', - '梅' => '梅', - '𣑭' => '𣑭', - '梎' => '梎', - '栟' => '栟', - '椔' => '椔', - '㮝' => '㮝', - '楂' => '楂', - '榣' => '榣', - '槪' => '槪', - '檨' => '檨', - '𣚣' => '𣚣', - '櫛' => '櫛', - '㰘' => '㰘', - '次' => '次', - '𣢧' => '𣢧', - '歔' => '歔', - '㱎' => '㱎', - '歲' => '歲', - '殟' => '殟', - '殺' => '殺', - '殻' => '殻', - '𣪍' => '𣪍', - '𡴋' => '𡴋', - '𣫺' => '𣫺', - '汎' => '汎', - '𣲼' => '𣲼', - '沿' => '沿', - '泍' => '泍', - '汧' => '汧', - '洖' => '洖', - '派' => '派', - '海' => '海', - '流' => '流', - '浩' => '浩', - '浸' => '浸', - '涅' => '涅', - '𣴞' => '𣴞', - '洴' => '洴', - '港' => '港', - '湮' => '湮', - '㴳' => '㴳', - '滋' => '滋', - '滇' => '滇', - '𣻑' => '𣻑', - '淹' => '淹', - '潮' => '潮', - '𣽞' => '𣽞', - '𣾎' => '𣾎', - '濆' => '濆', - '瀹' => '瀹', - '瀞' => '瀞', - '瀛' => '瀛', - '㶖' => '㶖', - '灊' => '灊', - '災' => '災', - '灷' => '灷', - '炭' => '炭', - '𠔥' => '𠔥', - '煅' => '煅', - '𤉣' => '𤉣', - '熜' => '熜', - '𤎫' => '𤎫', - '爨' => '爨', - '爵' => '爵', - '牐' => '牐', - '𤘈' => '𤘈', - '犀' => '犀', - '犕' => '犕', - '𤜵' => '𤜵', - '𤠔' => '𤠔', - '獺' => '獺', - '王' => '王', - '㺬' => '㺬', - '玥' => '玥', - '㺸' => '㺸', - '㺸' => '㺸', - '瑇' => '瑇', - '瑜' => '瑜', - '瑱' => '瑱', - '璅' => '璅', - '瓊' => '瓊', - '㼛' => '㼛', - '甤' => '甤', - '𤰶' => '𤰶', - '甾' => '甾', - '𤲒' => '𤲒', - '異' => '異', - '𢆟' => '𢆟', - '瘐' => '瘐', - '𤾡' => '𤾡', - '𤾸' => '𤾸', - '𥁄' => '𥁄', - '㿼' => '㿼', - '䀈' => '䀈', - '直' => '直', - '𥃳' => '𥃳', - '𥃲' => '𥃲', - '𥄙' => '𥄙', - '𥄳' => '𥄳', - '眞' => '眞', - '真' => '真', - '真' => '真', - '睊' => '睊', - '䀹' => '䀹', - '瞋' => '瞋', - '䁆' => '䁆', - '䂖' => '䂖', - '𥐝' => '𥐝', - '硎' => '硎', - '碌' => '碌', - '磌' => '磌', - '䃣' => '䃣', - '𥘦' => '𥘦', - '祖' => '祖', - '𥚚' => '𥚚', - '𥛅' => '𥛅', - '福' => '福', - '秫' => '秫', - '䄯' => '䄯', - '穀' => '穀', - '穊' => '穊', - '穏' => '穏', - '𥥼' => '𥥼', - '𥪧' => '𥪧', - '𥪧' => '𥪧', - '竮' => '竮', - '䈂' => '䈂', - '𥮫' => '𥮫', - '篆' => '篆', - '築' => '築', - '䈧' => '䈧', - '𥲀' => '𥲀', - '糒' => '糒', - '䊠' => '䊠', - '糨' => '糨', - '糣' => '糣', - '紀' => '紀', - '𥾆' => '𥾆', - '絣' => '絣', - '䌁' => '䌁', - '緇' => '緇', - '縂' => '縂', - '繅' => '繅', - '䌴' => '䌴', - '𦈨' => '𦈨', - '𦉇' => '𦉇', - '䍙' => '䍙', - '𦋙' => '𦋙', - '罺' => '罺', - '𦌾' => '𦌾', - '羕' => '羕', - '翺' => '翺', - '者' => '者', - '𦓚' => '𦓚', - '𦔣' => '𦔣', - '聠' => '聠', - '𦖨' => '𦖨', - '聰' => '聰', - '𣍟' => '𣍟', - '䏕' => '䏕', - '育' => '育', - '脃' => '脃', - '䐋' => '䐋', - '脾' => '脾', - '媵' => '媵', - '𦞧' => '𦞧', - '𦞵' => '𦞵', - '𣎓' => '𣎓', - '𣎜' => '𣎜', - '舁' => '舁', - '舄' => '舄', - '辞' => '辞', - '䑫' => '䑫', - '芑' => '芑', - '芋' => '芋', - '芝' => '芝', - '劳' => '劳', - '花' => '花', - '芳' => '芳', - '芽' => '芽', - '苦' => '苦', - '𦬼' => '𦬼', - '若' => '若', - '茝' => '茝', - '荣' => '荣', - '莭' => '莭', - '茣' => '茣', - '莽' => '莽', - '菧' => '菧', - '著' => '著', - '荓' => '荓', - '菊' => '菊', - '菌' => '菌', - '菜' => '菜', - '𦰶' => '𦰶', - '𦵫' => '𦵫', - '𦳕' => '𦳕', - '䔫' => '䔫', - '蓱' => '蓱', - '蓳' => '蓳', - '蔖' => '蔖', - '𧏊' => '𧏊', - '蕤' => '蕤', - '𦼬' => '𦼬', - '䕝' => '䕝', - '䕡' => '䕡', - '𦾱' => '𦾱', - '𧃒' => '𧃒', - '䕫' => '䕫', - '虐' => '虐', - '虜' => '虜', - '虧' => '虧', - '虩' => '虩', - '蚩' => '蚩', - '蚈' => '蚈', - '蜎' => '蜎', - '蛢' => '蛢', - '蝹' => '蝹', - '蜨' => '蜨', - '蝫' => '蝫', - '螆' => '螆', - '䗗' => '䗗', - '蟡' => '蟡', - '蠁' => '蠁', - '䗹' => '䗹', - '衠' => '衠', - '衣' => '衣', - '𧙧' => '𧙧', - '裗' => '裗', - '裞' => '裞', - '䘵' => '䘵', - '裺' => '裺', - '㒻' => '㒻', - '𧢮' => '𧢮', - '𧥦' => '𧥦', - '䚾' => '䚾', - '䛇' => '䛇', - '誠' => '誠', - '諭' => '諭', - '變' => '變', - '豕' => '豕', - '𧲨' => '𧲨', - '貫' => '貫', - '賁' => '賁', - '贛' => '贛', - '起' => '起', - '𧼯' => '𧼯', - '𠠄' => '𠠄', - '跋' => '跋', - '趼' => '趼', - '跰' => '跰', - '𠣞' => '𠣞', - '軔' => '軔', - '輸' => '輸', - '𨗒' => '𨗒', - '𨗭' => '𨗭', - '邔' => '邔', - '郱' => '郱', - '鄑' => '鄑', - '𨜮' => '𨜮', - '鄛' => '鄛', - '鈸' => '鈸', - '鋗' => '鋗', - '鋘' => '鋘', - '鉼' => '鉼', - '鏹' => '鏹', - '鐕' => '鐕', - '𨯺' => '𨯺', - '開' => '開', - '䦕' => '䦕', - '閷' => '閷', - '𨵷' => '𨵷', - '䧦' => '䧦', - '雃' => '雃', - '嶲' => '嶲', - '霣' => '霣', - '𩅅' => '𩅅', - '𩈚' => '𩈚', - '䩮' => '䩮', - '䩶' => '䩶', - '韠' => '韠', - '𩐊' => '𩐊', - '䪲' => '䪲', - '𩒖' => '𩒖', - '頋' => '頋', - '頋' => '頋', - '頩' => '頩', - '𩖶' => '𩖶', - '飢' => '飢', - '䬳' => '䬳', - '餩' => '餩', - '馧' => '馧', - '駂' => '駂', - '駾' => '駾', - '䯎' => '䯎', - '𩬰' => '𩬰', - '鬒' => '鬒', - '鱀' => '鱀', - '鳽' => '鳽', - '䳎' => '䳎', - '䳭' => '䳭', - '鵧' => '鵧', - '𪃎' => '𪃎', - '䳸' => '䳸', - '𪄅' => '𪄅', - '𪈎' => '𪈎', - '𪊑' => '𪊑', - '麻' => '麻', - '䵖' => '䵖', - '黹' => '黹', - '黾' => '黾', - '鼅' => '鼅', - '鼏' => '鼏', - '鼖' => '鼖', - '鼻' => '鼻', - '𪘀' => '𪘀', -); diff --git a/lib/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php b/lib/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php deleted file mode 100644 index ec90f36eb..000000000 --- a/lib/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php +++ /dev/null @@ -1,876 +0,0 @@ - 230, - '́' => 230, - '̂' => 230, - '̃' => 230, - '̄' => 230, - '̅' => 230, - '̆' => 230, - '̇' => 230, - '̈' => 230, - '̉' => 230, - '̊' => 230, - '̋' => 230, - '̌' => 230, - '̍' => 230, - '̎' => 230, - '̏' => 230, - '̐' => 230, - '̑' => 230, - '̒' => 230, - '̓' => 230, - '̔' => 230, - '̕' => 232, - '̖' => 220, - '̗' => 220, - '̘' => 220, - '̙' => 220, - '̚' => 232, - '̛' => 216, - '̜' => 220, - '̝' => 220, - '̞' => 220, - '̟' => 220, - '̠' => 220, - '̡' => 202, - '̢' => 202, - '̣' => 220, - '̤' => 220, - '̥' => 220, - '̦' => 220, - '̧' => 202, - '̨' => 202, - '̩' => 220, - '̪' => 220, - '̫' => 220, - '̬' => 220, - '̭' => 220, - '̮' => 220, - '̯' => 220, - '̰' => 220, - '̱' => 220, - '̲' => 220, - '̳' => 220, - '̴' => 1, - '̵' => 1, - '̶' => 1, - '̷' => 1, - '̸' => 1, - '̹' => 220, - '̺' => 220, - '̻' => 220, - '̼' => 220, - '̽' => 230, - '̾' => 230, - '̿' => 230, - '̀' => 230, - '́' => 230, - '͂' => 230, - '̓' => 230, - '̈́' => 230, - 'ͅ' => 240, - '͆' => 230, - '͇' => 220, - '͈' => 220, - '͉' => 220, - '͊' => 230, - '͋' => 230, - '͌' => 230, - '͍' => 220, - '͎' => 220, - '͐' => 230, - '͑' => 230, - '͒' => 230, - '͓' => 220, - '͔' => 220, - '͕' => 220, - '͖' => 220, - '͗' => 230, - '͘' => 232, - '͙' => 220, - '͚' => 220, - '͛' => 230, - '͜' => 233, - '͝' => 234, - '͞' => 234, - '͟' => 233, - '͠' => 234, - '͡' => 234, - '͢' => 233, - 'ͣ' => 230, - 'ͤ' => 230, - 'ͥ' => 230, - 'ͦ' => 230, - 'ͧ' => 230, - 'ͨ' => 230, - 'ͩ' => 230, - 'ͪ' => 230, - 'ͫ' => 230, - 'ͬ' => 230, - 'ͭ' => 230, - 'ͮ' => 230, - 'ͯ' => 230, - '҃' => 230, - '҄' => 230, - '҅' => 230, - '҆' => 230, - '҇' => 230, - '֑' => 220, - '֒' => 230, - '֓' => 230, - '֔' => 230, - '֕' => 230, - '֖' => 220, - '֗' => 230, - '֘' => 230, - '֙' => 230, - '֚' => 222, - '֛' => 220, - '֜' => 230, - '֝' => 230, - '֞' => 230, - '֟' => 230, - '֠' => 230, - '֡' => 230, - '֢' => 220, - '֣' => 220, - '֤' => 220, - '֥' => 220, - '֦' => 220, - '֧' => 220, - '֨' => 230, - '֩' => 230, - '֪' => 220, - '֫' => 230, - '֬' => 230, - '֭' => 222, - '֮' => 228, - '֯' => 230, - 'ְ' => 10, - 'ֱ' => 11, - 'ֲ' => 12, - 'ֳ' => 13, - 'ִ' => 14, - 'ֵ' => 15, - 'ֶ' => 16, - 'ַ' => 17, - 'ָ' => 18, - 'ֹ' => 19, - 'ֺ' => 19, - 'ֻ' => 20, - 'ּ' => 21, - 'ֽ' => 22, - 'ֿ' => 23, - 'ׁ' => 24, - 'ׂ' => 25, - 'ׄ' => 230, - 'ׅ' => 220, - 'ׇ' => 18, - 'ؐ' => 230, - 'ؑ' => 230, - 'ؒ' => 230, - 'ؓ' => 230, - 'ؔ' => 230, - 'ؕ' => 230, - 'ؖ' => 230, - 'ؗ' => 230, - 'ؘ' => 30, - 'ؙ' => 31, - 'ؚ' => 32, - 'ً' => 27, - 'ٌ' => 28, - 'ٍ' => 29, - 'َ' => 30, - 'ُ' => 31, - 'ِ' => 32, - 'ّ' => 33, - 'ْ' => 34, - 'ٓ' => 230, - 'ٔ' => 230, - 'ٕ' => 220, - 'ٖ' => 220, - 'ٗ' => 230, - '٘' => 230, - 'ٙ' => 230, - 'ٚ' => 230, - 'ٛ' => 230, - 'ٜ' => 220, - 'ٝ' => 230, - 'ٞ' => 230, - 'ٟ' => 220, - 'ٰ' => 35, - 'ۖ' => 230, - 'ۗ' => 230, - 'ۘ' => 230, - 'ۙ' => 230, - 'ۚ' => 230, - 'ۛ' => 230, - 'ۜ' => 230, - '۟' => 230, - '۠' => 230, - 'ۡ' => 230, - 'ۢ' => 230, - 'ۣ' => 220, - 'ۤ' => 230, - 'ۧ' => 230, - 'ۨ' => 230, - '۪' => 220, - '۫' => 230, - '۬' => 230, - 'ۭ' => 220, - 'ܑ' => 36, - 'ܰ' => 230, - 'ܱ' => 220, - 'ܲ' => 230, - 'ܳ' => 230, - 'ܴ' => 220, - 'ܵ' => 230, - 'ܶ' => 230, - 'ܷ' => 220, - 'ܸ' => 220, - 'ܹ' => 220, - 'ܺ' => 230, - 'ܻ' => 220, - 'ܼ' => 220, - 'ܽ' => 230, - 'ܾ' => 220, - 'ܿ' => 230, - '݀' => 230, - '݁' => 230, - '݂' => 220, - '݃' => 230, - '݄' => 220, - '݅' => 230, - '݆' => 220, - '݇' => 230, - '݈' => 220, - '݉' => 230, - '݊' => 230, - '߫' => 230, - '߬' => 230, - '߭' => 230, - '߮' => 230, - '߯' => 230, - '߰' => 230, - '߱' => 230, - '߲' => 220, - '߳' => 230, - '߽' => 220, - 'ࠖ' => 230, - 'ࠗ' => 230, - '࠘' => 230, - '࠙' => 230, - 'ࠛ' => 230, - 'ࠜ' => 230, - 'ࠝ' => 230, - 'ࠞ' => 230, - 'ࠟ' => 230, - 'ࠠ' => 230, - 'ࠡ' => 230, - 'ࠢ' => 230, - 'ࠣ' => 230, - 'ࠥ' => 230, - 'ࠦ' => 230, - 'ࠧ' => 230, - 'ࠩ' => 230, - 'ࠪ' => 230, - 'ࠫ' => 230, - 'ࠬ' => 230, - '࠭' => 230, - '࡙' => 220, - '࡚' => 220, - '࡛' => 220, - '࣓' => 220, - 'ࣔ' => 230, - 'ࣕ' => 230, - 'ࣖ' => 230, - 'ࣗ' => 230, - 'ࣘ' => 230, - 'ࣙ' => 230, - 'ࣚ' => 230, - 'ࣛ' => 230, - 'ࣜ' => 230, - 'ࣝ' => 230, - 'ࣞ' => 230, - 'ࣟ' => 230, - '࣠' => 230, - '࣡' => 230, - 'ࣣ' => 220, - 'ࣤ' => 230, - 'ࣥ' => 230, - 'ࣦ' => 220, - 'ࣧ' => 230, - 'ࣨ' => 230, - 'ࣩ' => 220, - '࣪' => 230, - '࣫' => 230, - '࣬' => 230, - '࣭' => 220, - '࣮' => 220, - '࣯' => 220, - 'ࣰ' => 27, - 'ࣱ' => 28, - 'ࣲ' => 29, - 'ࣳ' => 230, - 'ࣴ' => 230, - 'ࣵ' => 230, - 'ࣶ' => 220, - 'ࣷ' => 230, - 'ࣸ' => 230, - 'ࣹ' => 220, - 'ࣺ' => 220, - 'ࣻ' => 230, - 'ࣼ' => 230, - 'ࣽ' => 230, - 'ࣾ' => 230, - 'ࣿ' => 230, - '़' => 7, - '्' => 9, - '॑' => 230, - '॒' => 220, - '॓' => 230, - '॔' => 230, - '়' => 7, - '্' => 9, - '৾' => 230, - '਼' => 7, - '੍' => 9, - '઼' => 7, - '્' => 9, - '଼' => 7, - '୍' => 9, - '்' => 9, - '్' => 9, - 'ౕ' => 84, - 'ౖ' => 91, - '಼' => 7, - '್' => 9, - '഻' => 9, - '഼' => 9, - '്' => 9, - '්' => 9, - 'ุ' => 103, - 'ู' => 103, - 'ฺ' => 9, - '่' => 107, - '้' => 107, - '๊' => 107, - '๋' => 107, - 'ຸ' => 118, - 'ູ' => 118, - '຺' => 9, - '່' => 122, - '້' => 122, - '໊' => 122, - '໋' => 122, - '༘' => 220, - '༙' => 220, - '༵' => 220, - '༷' => 220, - '༹' => 216, - 'ཱ' => 129, - 'ི' => 130, - 'ུ' => 132, - 'ེ' => 130, - 'ཻ' => 130, - 'ོ' => 130, - 'ཽ' => 130, - 'ྀ' => 130, - 'ྂ' => 230, - 'ྃ' => 230, - '྄' => 9, - '྆' => 230, - '྇' => 230, - '࿆' => 220, - '့' => 7, - '္' => 9, - '်' => 9, - 'ႍ' => 220, - '፝' => 230, - '፞' => 230, - '፟' => 230, - '᜔' => 9, - '᜴' => 9, - '្' => 9, - '៝' => 230, - 'ᢩ' => 228, - '᤹' => 222, - '᤺' => 230, - '᤻' => 220, - 'ᨗ' => 230, - 'ᨘ' => 220, - '᩠' => 9, - '᩵' => 230, - '᩶' => 230, - '᩷' => 230, - '᩸' => 230, - '᩹' => 230, - '᩺' => 230, - '᩻' => 230, - '᩼' => 230, - '᩿' => 220, - '᪰' => 230, - '᪱' => 230, - '᪲' => 230, - '᪳' => 230, - '᪴' => 230, - '᪵' => 220, - '᪶' => 220, - '᪷' => 220, - '᪸' => 220, - '᪹' => 220, - '᪺' => 220, - '᪻' => 230, - '᪼' => 230, - '᪽' => 220, - 'ᪿ' => 220, - 'ᫀ' => 220, - '᬴' => 7, - '᭄' => 9, - '᭫' => 230, - '᭬' => 220, - '᭭' => 230, - '᭮' => 230, - '᭯' => 230, - '᭰' => 230, - '᭱' => 230, - '᭲' => 230, - '᭳' => 230, - '᮪' => 9, - '᮫' => 9, - '᯦' => 7, - '᯲' => 9, - '᯳' => 9, - '᰷' => 7, - '᳐' => 230, - '᳑' => 230, - '᳒' => 230, - '᳔' => 1, - '᳕' => 220, - '᳖' => 220, - '᳗' => 220, - '᳘' => 220, - '᳙' => 220, - '᳚' => 230, - '᳛' => 230, - '᳜' => 220, - '᳝' => 220, - '᳞' => 220, - '᳟' => 220, - '᳠' => 230, - '᳢' => 1, - '᳣' => 1, - '᳤' => 1, - '᳥' => 1, - '᳦' => 1, - '᳧' => 1, - '᳨' => 1, - '᳭' => 220, - '᳴' => 230, - '᳸' => 230, - '᳹' => 230, - '᷀' => 230, - '᷁' => 230, - '᷂' => 220, - '᷃' => 230, - '᷄' => 230, - '᷅' => 230, - '᷆' => 230, - '᷇' => 230, - '᷈' => 230, - '᷉' => 230, - '᷊' => 220, - '᷋' => 230, - '᷌' => 230, - '᷍' => 234, - '᷎' => 214, - '᷏' => 220, - '᷐' => 202, - '᷑' => 230, - '᷒' => 230, - 'ᷓ' => 230, - 'ᷔ' => 230, - 'ᷕ' => 230, - 'ᷖ' => 230, - 'ᷗ' => 230, - 'ᷘ' => 230, - 'ᷙ' => 230, - 'ᷚ' => 230, - 'ᷛ' => 230, - 'ᷜ' => 230, - 'ᷝ' => 230, - 'ᷞ' => 230, - 'ᷟ' => 230, - 'ᷠ' => 230, - 'ᷡ' => 230, - 'ᷢ' => 230, - 'ᷣ' => 230, - 'ᷤ' => 230, - 'ᷥ' => 230, - 'ᷦ' => 230, - 'ᷧ' => 230, - 'ᷨ' => 230, - 'ᷩ' => 230, - 'ᷪ' => 230, - 'ᷫ' => 230, - 'ᷬ' => 230, - 'ᷭ' => 230, - 'ᷮ' => 230, - 'ᷯ' => 230, - 'ᷰ' => 230, - 'ᷱ' => 230, - 'ᷲ' => 230, - 'ᷳ' => 230, - 'ᷴ' => 230, - '᷵' => 230, - '᷶' => 232, - '᷷' => 228, - '᷸' => 228, - '᷹' => 220, - '᷻' => 230, - '᷼' => 233, - '᷽' => 220, - '᷾' => 230, - '᷿' => 220, - '⃐' => 230, - '⃑' => 230, - '⃒' => 1, - '⃓' => 1, - '⃔' => 230, - '⃕' => 230, - '⃖' => 230, - '⃗' => 230, - '⃘' => 1, - '⃙' => 1, - '⃚' => 1, - '⃛' => 230, - '⃜' => 230, - '⃡' => 230, - '⃥' => 1, - '⃦' => 1, - '⃧' => 230, - '⃨' => 220, - '⃩' => 230, - '⃪' => 1, - '⃫' => 1, - '⃬' => 220, - '⃭' => 220, - '⃮' => 220, - '⃯' => 220, - '⃰' => 230, - '⳯' => 230, - '⳰' => 230, - '⳱' => 230, - '⵿' => 9, - 'ⷠ' => 230, - 'ⷡ' => 230, - 'ⷢ' => 230, - 'ⷣ' => 230, - 'ⷤ' => 230, - 'ⷥ' => 230, - 'ⷦ' => 230, - 'ⷧ' => 230, - 'ⷨ' => 230, - 'ⷩ' => 230, - 'ⷪ' => 230, - 'ⷫ' => 230, - 'ⷬ' => 230, - 'ⷭ' => 230, - 'ⷮ' => 230, - 'ⷯ' => 230, - 'ⷰ' => 230, - 'ⷱ' => 230, - 'ⷲ' => 230, - 'ⷳ' => 230, - 'ⷴ' => 230, - 'ⷵ' => 230, - 'ⷶ' => 230, - 'ⷷ' => 230, - 'ⷸ' => 230, - 'ⷹ' => 230, - 'ⷺ' => 230, - 'ⷻ' => 230, - 'ⷼ' => 230, - 'ⷽ' => 230, - 'ⷾ' => 230, - 'ⷿ' => 230, - '〪' => 218, - '〫' => 228, - '〬' => 232, - '〭' => 222, - '〮' => 224, - '〯' => 224, - '゙' => 8, - '゚' => 8, - '꙯' => 230, - 'ꙴ' => 230, - 'ꙵ' => 230, - 'ꙶ' => 230, - 'ꙷ' => 230, - 'ꙸ' => 230, - 'ꙹ' => 230, - 'ꙺ' => 230, - 'ꙻ' => 230, - '꙼' => 230, - '꙽' => 230, - 'ꚞ' => 230, - 'ꚟ' => 230, - '꛰' => 230, - '꛱' => 230, - '꠆' => 9, - '꠬' => 9, - '꣄' => 9, - '꣠' => 230, - '꣡' => 230, - '꣢' => 230, - '꣣' => 230, - '꣤' => 230, - '꣥' => 230, - '꣦' => 230, - '꣧' => 230, - '꣨' => 230, - '꣩' => 230, - '꣪' => 230, - '꣫' => 230, - '꣬' => 230, - '꣭' => 230, - '꣮' => 230, - '꣯' => 230, - '꣰' => 230, - '꣱' => 230, - '꤫' => 220, - '꤬' => 220, - '꤭' => 220, - '꥓' => 9, - '꦳' => 7, - '꧀' => 9, - 'ꪰ' => 230, - 'ꪲ' => 230, - 'ꪳ' => 230, - 'ꪴ' => 220, - 'ꪷ' => 230, - 'ꪸ' => 230, - 'ꪾ' => 230, - '꪿' => 230, - '꫁' => 230, - '꫶' => 9, - '꯭' => 9, - 'ﬞ' => 26, - '︠' => 230, - '︡' => 230, - '︢' => 230, - '︣' => 230, - '︤' => 230, - '︥' => 230, - '︦' => 230, - '︧' => 220, - '︨' => 220, - '︩' => 220, - '︪' => 220, - '︫' => 220, - '︬' => 220, - '︭' => 220, - '︮' => 230, - '︯' => 230, - '𐇽' => 220, - '𐋠' => 220, - '𐍶' => 230, - '𐍷' => 230, - '𐍸' => 230, - '𐍹' => 230, - '𐍺' => 230, - '𐨍' => 220, - '𐨏' => 230, - '𐨸' => 230, - '𐨹' => 1, - '𐨺' => 220, - '𐨿' => 9, - '𐫥' => 230, - '𐫦' => 220, - '𐴤' => 230, - '𐴥' => 230, - '𐴦' => 230, - '𐴧' => 230, - '𐺫' => 230, - '𐺬' => 230, - '𐽆' => 220, - '𐽇' => 220, - '𐽈' => 230, - '𐽉' => 230, - '𐽊' => 230, - '𐽋' => 220, - '𐽌' => 230, - '𐽍' => 220, - '𐽎' => 220, - '𐽏' => 220, - '𐽐' => 220, - '𑁆' => 9, - '𑁿' => 9, - '𑂹' => 9, - '𑂺' => 7, - '𑄀' => 230, - '𑄁' => 230, - '𑄂' => 230, - '𑄳' => 9, - '𑄴' => 9, - '𑅳' => 7, - '𑇀' => 9, - '𑇊' => 7, - '𑈵' => 9, - '𑈶' => 7, - '𑋩' => 7, - '𑋪' => 9, - '𑌻' => 7, - '𑌼' => 7, - '𑍍' => 9, - '𑍦' => 230, - '𑍧' => 230, - '𑍨' => 230, - '𑍩' => 230, - '𑍪' => 230, - '𑍫' => 230, - '𑍬' => 230, - '𑍰' => 230, - '𑍱' => 230, - '𑍲' => 230, - '𑍳' => 230, - '𑍴' => 230, - '𑑂' => 9, - '𑑆' => 7, - '𑑞' => 230, - '𑓂' => 9, - '𑓃' => 7, - '𑖿' => 9, - '𑗀' => 7, - '𑘿' => 9, - '𑚶' => 9, - '𑚷' => 7, - '𑜫' => 9, - '𑠹' => 9, - '𑠺' => 7, - '𑤽' => 9, - '𑤾' => 9, - '𑥃' => 7, - '𑧠' => 9, - '𑨴' => 9, - '𑩇' => 9, - '𑪙' => 9, - '𑰿' => 9, - '𑵂' => 7, - '𑵄' => 9, - '𑵅' => 9, - '𑶗' => 9, - '𖫰' => 1, - '𖫱' => 1, - '𖫲' => 1, - '𖫳' => 1, - '𖫴' => 1, - '𖬰' => 230, - '𖬱' => 230, - '𖬲' => 230, - '𖬳' => 230, - '𖬴' => 230, - '𖬵' => 230, - '𖬶' => 230, - '𖿰' => 6, - '𖿱' => 6, - '𛲞' => 1, - '𝅥' => 216, - '𝅦' => 216, - '𝅧' => 1, - '𝅨' => 1, - '𝅩' => 1, - '𝅭' => 226, - '𝅮' => 216, - '𝅯' => 216, - '𝅰' => 216, - '𝅱' => 216, - '𝅲' => 216, - '𝅻' => 220, - '𝅼' => 220, - '𝅽' => 220, - '𝅾' => 220, - '𝅿' => 220, - '𝆀' => 220, - '𝆁' => 220, - '𝆂' => 220, - '𝆅' => 230, - '𝆆' => 230, - '𝆇' => 230, - '𝆈' => 230, - '𝆉' => 230, - '𝆊' => 220, - '𝆋' => 220, - '𝆪' => 230, - '𝆫' => 230, - '𝆬' => 230, - '𝆭' => 230, - '𝉂' => 230, - '𝉃' => 230, - '𝉄' => 230, - '𞀀' => 230, - '𞀁' => 230, - '𞀂' => 230, - '𞀃' => 230, - '𞀄' => 230, - '𞀅' => 230, - '𞀆' => 230, - '𞀈' => 230, - '𞀉' => 230, - '𞀊' => 230, - '𞀋' => 230, - '𞀌' => 230, - '𞀍' => 230, - '𞀎' => 230, - '𞀏' => 230, - '𞀐' => 230, - '𞀑' => 230, - '𞀒' => 230, - '𞀓' => 230, - '𞀔' => 230, - '𞀕' => 230, - '𞀖' => 230, - '𞀗' => 230, - '𞀘' => 230, - '𞀛' => 230, - '𞀜' => 230, - '𞀝' => 230, - '𞀞' => 230, - '𞀟' => 230, - '𞀠' => 230, - '𞀡' => 230, - '𞀣' => 230, - '𞀤' => 230, - '𞀦' => 230, - '𞀧' => 230, - '𞀨' => 230, - '𞀩' => 230, - '𞀪' => 230, - '𞄰' => 230, - '𞄱' => 230, - '𞄲' => 230, - '𞄳' => 230, - '𞄴' => 230, - '𞄵' => 230, - '𞄶' => 230, - '𞋬' => 230, - '𞋭' => 230, - '𞋮' => 230, - '𞋯' => 230, - '𞣐' => 220, - '𞣑' => 220, - '𞣒' => 220, - '𞣓' => 220, - '𞣔' => 220, - '𞣕' => 220, - '𞣖' => 220, - '𞥄' => 230, - '𞥅' => 230, - '𞥆' => 230, - '𞥇' => 230, - '𞥈' => 230, - '𞥉' => 230, - '𞥊' => 7, -); diff --git a/lib/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php b/lib/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php deleted file mode 100644 index 157490289..000000000 --- a/lib/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php +++ /dev/null @@ -1,3695 +0,0 @@ - ' ', - '¨' => ' ̈', - 'ª' => 'a', - '¯' => ' ̄', - '²' => '2', - '³' => '3', - '´' => ' ́', - 'µ' => 'μ', - '¸' => ' ̧', - '¹' => '1', - 'º' => 'o', - '¼' => '1⁄4', - '½' => '1⁄2', - '¾' => '3⁄4', - 'IJ' => 'IJ', - 'ij' => 'ij', - 'Ŀ' => 'L·', - 'ŀ' => 'l·', - 'ʼn' => 'ʼn', - 'ſ' => 's', - 'DŽ' => 'DŽ', - 'Dž' => 'Dž', - 'dž' => 'dž', - 'LJ' => 'LJ', - 'Lj' => 'Lj', - 'lj' => 'lj', - 'NJ' => 'NJ', - 'Nj' => 'Nj', - 'nj' => 'nj', - 'DZ' => 'DZ', - 'Dz' => 'Dz', - 'dz' => 'dz', - 'ʰ' => 'h', - 'ʱ' => 'ɦ', - 'ʲ' => 'j', - 'ʳ' => 'r', - 'ʴ' => 'ɹ', - 'ʵ' => 'ɻ', - 'ʶ' => 'ʁ', - 'ʷ' => 'w', - 'ʸ' => 'y', - '˘' => ' ̆', - '˙' => ' ̇', - '˚' => ' ̊', - '˛' => ' ̨', - '˜' => ' ̃', - '˝' => ' ̋', - 'ˠ' => 'ɣ', - 'ˡ' => 'l', - 'ˢ' => 's', - 'ˣ' => 'x', - 'ˤ' => 'ʕ', - 'ͺ' => ' ͅ', - '΄' => ' ́', - '΅' => ' ̈́', - 'ϐ' => 'β', - 'ϑ' => 'θ', - 'ϒ' => 'Υ', - 'ϓ' => 'Ύ', - 'ϔ' => 'Ϋ', - 'ϕ' => 'φ', - 'ϖ' => 'π', - 'ϰ' => 'κ', - 'ϱ' => 'ρ', - 'ϲ' => 'ς', - 'ϴ' => 'Θ', - 'ϵ' => 'ε', - 'Ϲ' => 'Σ', - 'և' => 'եւ', - 'ٵ' => 'اٴ', - 'ٶ' => 'وٴ', - 'ٷ' => 'ۇٴ', - 'ٸ' => 'يٴ', - 'ำ' => 'ํา', - 'ຳ' => 'ໍາ', - 'ໜ' => 'ຫນ', - 'ໝ' => 'ຫມ', - '༌' => '་', - 'ཷ' => 'ྲཱྀ', - 'ཹ' => 'ླཱྀ', - 'ჼ' => 'ნ', - 'ᴬ' => 'A', - 'ᴭ' => 'Æ', - 'ᴮ' => 'B', - 'ᴰ' => 'D', - 'ᴱ' => 'E', - 'ᴲ' => 'Ǝ', - 'ᴳ' => 'G', - 'ᴴ' => 'H', - 'ᴵ' => 'I', - 'ᴶ' => 'J', - 'ᴷ' => 'K', - 'ᴸ' => 'L', - 'ᴹ' => 'M', - 'ᴺ' => 'N', - 'ᴼ' => 'O', - 'ᴽ' => 'Ȣ', - 'ᴾ' => 'P', - 'ᴿ' => 'R', - 'ᵀ' => 'T', - 'ᵁ' => 'U', - 'ᵂ' => 'W', - 'ᵃ' => 'a', - 'ᵄ' => 'ɐ', - 'ᵅ' => 'ɑ', - 'ᵆ' => 'ᴂ', - 'ᵇ' => 'b', - 'ᵈ' => 'd', - 'ᵉ' => 'e', - 'ᵊ' => 'ə', - 'ᵋ' => 'ɛ', - 'ᵌ' => 'ɜ', - 'ᵍ' => 'g', - 'ᵏ' => 'k', - 'ᵐ' => 'm', - 'ᵑ' => 'ŋ', - 'ᵒ' => 'o', - 'ᵓ' => 'ɔ', - 'ᵔ' => 'ᴖ', - 'ᵕ' => 'ᴗ', - 'ᵖ' => 'p', - 'ᵗ' => 't', - 'ᵘ' => 'u', - 'ᵙ' => 'ᴝ', - 'ᵚ' => 'ɯ', - 'ᵛ' => 'v', - 'ᵜ' => 'ᴥ', - 'ᵝ' => 'β', - 'ᵞ' => 'γ', - 'ᵟ' => 'δ', - 'ᵠ' => 'φ', - 'ᵡ' => 'χ', - 'ᵢ' => 'i', - 'ᵣ' => 'r', - 'ᵤ' => 'u', - 'ᵥ' => 'v', - 'ᵦ' => 'β', - 'ᵧ' => 'γ', - 'ᵨ' => 'ρ', - 'ᵩ' => 'φ', - 'ᵪ' => 'χ', - 'ᵸ' => 'н', - 'ᶛ' => 'ɒ', - 'ᶜ' => 'c', - 'ᶝ' => 'ɕ', - 'ᶞ' => 'ð', - 'ᶟ' => 'ɜ', - 'ᶠ' => 'f', - 'ᶡ' => 'ɟ', - 'ᶢ' => 'ɡ', - 'ᶣ' => 'ɥ', - 'ᶤ' => 'ɨ', - 'ᶥ' => 'ɩ', - 'ᶦ' => 'ɪ', - 'ᶧ' => 'ᵻ', - 'ᶨ' => 'ʝ', - 'ᶩ' => 'ɭ', - 'ᶪ' => 'ᶅ', - 'ᶫ' => 'ʟ', - 'ᶬ' => 'ɱ', - 'ᶭ' => 'ɰ', - 'ᶮ' => 'ɲ', - 'ᶯ' => 'ɳ', - 'ᶰ' => 'ɴ', - 'ᶱ' => 'ɵ', - 'ᶲ' => 'ɸ', - 'ᶳ' => 'ʂ', - 'ᶴ' => 'ʃ', - 'ᶵ' => 'ƫ', - 'ᶶ' => 'ʉ', - 'ᶷ' => 'ʊ', - 'ᶸ' => 'ᴜ', - 'ᶹ' => 'ʋ', - 'ᶺ' => 'ʌ', - 'ᶻ' => 'z', - 'ᶼ' => 'ʐ', - 'ᶽ' => 'ʑ', - 'ᶾ' => 'ʒ', - 'ᶿ' => 'θ', - 'ẚ' => 'aʾ', - 'ẛ' => 'ṡ', - '᾽' => ' ̓', - '᾿' => ' ̓', - '῀' => ' ͂', - '῁' => ' ̈͂', - '῍' => ' ̓̀', - '῎' => ' ̓́', - '῏' => ' ̓͂', - '῝' => ' ̔̀', - '῞' => ' ̔́', - '῟' => ' ̔͂', - '῭' => ' ̈̀', - '΅' => ' ̈́', - '´' => ' ́', - '῾' => ' ̔', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - '‑' => '‐', - '‗' => ' ̳', - '․' => '.', - '‥' => '..', - '…' => '...', - ' ' => ' ', - '″' => '′′', - '‴' => '′′′', - '‶' => '‵‵', - '‷' => '‵‵‵', - '‼' => '!!', - '‾' => ' ̅', - '⁇' => '??', - '⁈' => '?!', - '⁉' => '!?', - '⁗' => '′′′′', - ' ' => ' ', - '⁰' => '0', - 'ⁱ' => 'i', - '⁴' => '4', - '⁵' => '5', - '⁶' => '6', - '⁷' => '7', - '⁸' => '8', - '⁹' => '9', - '⁺' => '+', - '⁻' => '−', - '⁼' => '=', - '⁽' => '(', - '⁾' => ')', - 'ⁿ' => 'n', - '₀' => '0', - '₁' => '1', - '₂' => '2', - '₃' => '3', - '₄' => '4', - '₅' => '5', - '₆' => '6', - '₇' => '7', - '₈' => '8', - '₉' => '9', - '₊' => '+', - '₋' => '−', - '₌' => '=', - '₍' => '(', - '₎' => ')', - 'ₐ' => 'a', - 'ₑ' => 'e', - 'ₒ' => 'o', - 'ₓ' => 'x', - 'ₔ' => 'ə', - 'ₕ' => 'h', - 'ₖ' => 'k', - 'ₗ' => 'l', - 'ₘ' => 'm', - 'ₙ' => 'n', - 'ₚ' => 'p', - 'ₛ' => 's', - 'ₜ' => 't', - '₨' => 'Rs', - '℀' => 'a/c', - '℁' => 'a/s', - 'ℂ' => 'C', - '℃' => '°C', - '℅' => 'c/o', - '℆' => 'c/u', - 'ℇ' => 'Ɛ', - '℉' => '°F', - 'ℊ' => 'g', - 'ℋ' => 'H', - 'ℌ' => 'H', - 'ℍ' => 'H', - 'ℎ' => 'h', - 'ℏ' => 'ħ', - 'ℐ' => 'I', - 'ℑ' => 'I', - 'ℒ' => 'L', - 'ℓ' => 'l', - 'ℕ' => 'N', - '№' => 'No', - 'ℙ' => 'P', - 'ℚ' => 'Q', - 'ℛ' => 'R', - 'ℜ' => 'R', - 'ℝ' => 'R', - '℠' => 'SM', - '℡' => 'TEL', - '™' => 'TM', - 'ℤ' => 'Z', - 'ℨ' => 'Z', - 'ℬ' => 'B', - 'ℭ' => 'C', - 'ℯ' => 'e', - 'ℰ' => 'E', - 'ℱ' => 'F', - 'ℳ' => 'M', - 'ℴ' => 'o', - 'ℵ' => 'א', - 'ℶ' => 'ב', - 'ℷ' => 'ג', - 'ℸ' => 'ד', - 'ℹ' => 'i', - '℻' => 'FAX', - 'ℼ' => 'π', - 'ℽ' => 'γ', - 'ℾ' => 'Γ', - 'ℿ' => 'Π', - '⅀' => '∑', - 'ⅅ' => 'D', - 'ⅆ' => 'd', - 'ⅇ' => 'e', - 'ⅈ' => 'i', - 'ⅉ' => 'j', - '⅐' => '1⁄7', - '⅑' => '1⁄9', - '⅒' => '1⁄10', - '⅓' => '1⁄3', - '⅔' => '2⁄3', - '⅕' => '1⁄5', - '⅖' => '2⁄5', - '⅗' => '3⁄5', - '⅘' => '4⁄5', - '⅙' => '1⁄6', - '⅚' => '5⁄6', - '⅛' => '1⁄8', - '⅜' => '3⁄8', - '⅝' => '5⁄8', - '⅞' => '7⁄8', - '⅟' => '1⁄', - 'Ⅰ' => 'I', - 'Ⅱ' => 'II', - 'Ⅲ' => 'III', - 'Ⅳ' => 'IV', - 'Ⅴ' => 'V', - 'Ⅵ' => 'VI', - 'Ⅶ' => 'VII', - 'Ⅷ' => 'VIII', - 'Ⅸ' => 'IX', - 'Ⅹ' => 'X', - 'Ⅺ' => 'XI', - 'Ⅻ' => 'XII', - 'Ⅼ' => 'L', - 'Ⅽ' => 'C', - 'Ⅾ' => 'D', - 'Ⅿ' => 'M', - 'ⅰ' => 'i', - 'ⅱ' => 'ii', - 'ⅲ' => 'iii', - 'ⅳ' => 'iv', - 'ⅴ' => 'v', - 'ⅵ' => 'vi', - 'ⅶ' => 'vii', - 'ⅷ' => 'viii', - 'ⅸ' => 'ix', - 'ⅹ' => 'x', - 'ⅺ' => 'xi', - 'ⅻ' => 'xii', - 'ⅼ' => 'l', - 'ⅽ' => 'c', - 'ⅾ' => 'd', - 'ⅿ' => 'm', - '↉' => '0⁄3', - '∬' => '∫∫', - '∭' => '∫∫∫', - '∯' => '∮∮', - '∰' => '∮∮∮', - '①' => '1', - '②' => '2', - '③' => '3', - '④' => '4', - '⑤' => '5', - '⑥' => '6', - '⑦' => '7', - '⑧' => '8', - '⑨' => '9', - '⑩' => '10', - '⑪' => '11', - '⑫' => '12', - '⑬' => '13', - '⑭' => '14', - '⑮' => '15', - '⑯' => '16', - '⑰' => '17', - '⑱' => '18', - '⑲' => '19', - '⑳' => '20', - '⑴' => '(1)', - '⑵' => '(2)', - '⑶' => '(3)', - '⑷' => '(4)', - '⑸' => '(5)', - '⑹' => '(6)', - '⑺' => '(7)', - '⑻' => '(8)', - '⑼' => '(9)', - '⑽' => '(10)', - '⑾' => '(11)', - '⑿' => '(12)', - '⒀' => '(13)', - '⒁' => '(14)', - '⒂' => '(15)', - '⒃' => '(16)', - '⒄' => '(17)', - '⒅' => '(18)', - '⒆' => '(19)', - '⒇' => '(20)', - '⒈' => '1.', - '⒉' => '2.', - '⒊' => '3.', - '⒋' => '4.', - '⒌' => '5.', - '⒍' => '6.', - '⒎' => '7.', - '⒏' => '8.', - '⒐' => '9.', - '⒑' => '10.', - '⒒' => '11.', - '⒓' => '12.', - '⒔' => '13.', - '⒕' => '14.', - '⒖' => '15.', - '⒗' => '16.', - '⒘' => '17.', - '⒙' => '18.', - '⒚' => '19.', - '⒛' => '20.', - '⒜' => '(a)', - '⒝' => '(b)', - '⒞' => '(c)', - '⒟' => '(d)', - '⒠' => '(e)', - '⒡' => '(f)', - '⒢' => '(g)', - '⒣' => '(h)', - '⒤' => '(i)', - '⒥' => '(j)', - '⒦' => '(k)', - '⒧' => '(l)', - '⒨' => '(m)', - '⒩' => '(n)', - '⒪' => '(o)', - '⒫' => '(p)', - '⒬' => '(q)', - '⒭' => '(r)', - '⒮' => '(s)', - '⒯' => '(t)', - '⒰' => '(u)', - '⒱' => '(v)', - '⒲' => '(w)', - '⒳' => '(x)', - '⒴' => '(y)', - '⒵' => '(z)', - 'Ⓐ' => 'A', - 'Ⓑ' => 'B', - 'Ⓒ' => 'C', - 'Ⓓ' => 'D', - 'Ⓔ' => 'E', - 'Ⓕ' => 'F', - 'Ⓖ' => 'G', - 'Ⓗ' => 'H', - 'Ⓘ' => 'I', - 'Ⓙ' => 'J', - 'Ⓚ' => 'K', - 'Ⓛ' => 'L', - 'Ⓜ' => 'M', - 'Ⓝ' => 'N', - 'Ⓞ' => 'O', - 'Ⓟ' => 'P', - 'Ⓠ' => 'Q', - 'Ⓡ' => 'R', - 'Ⓢ' => 'S', - 'Ⓣ' => 'T', - 'Ⓤ' => 'U', - 'Ⓥ' => 'V', - 'Ⓦ' => 'W', - 'Ⓧ' => 'X', - 'Ⓨ' => 'Y', - 'Ⓩ' => 'Z', - 'ⓐ' => 'a', - 'ⓑ' => 'b', - 'ⓒ' => 'c', - 'ⓓ' => 'd', - 'ⓔ' => 'e', - 'ⓕ' => 'f', - 'ⓖ' => 'g', - 'ⓗ' => 'h', - 'ⓘ' => 'i', - 'ⓙ' => 'j', - 'ⓚ' => 'k', - 'ⓛ' => 'l', - 'ⓜ' => 'm', - 'ⓝ' => 'n', - 'ⓞ' => 'o', - 'ⓟ' => 'p', - 'ⓠ' => 'q', - 'ⓡ' => 'r', - 'ⓢ' => 's', - 'ⓣ' => 't', - 'ⓤ' => 'u', - 'ⓥ' => 'v', - 'ⓦ' => 'w', - 'ⓧ' => 'x', - 'ⓨ' => 'y', - 'ⓩ' => 'z', - '⓪' => '0', - '⨌' => '∫∫∫∫', - '⩴' => '::=', - '⩵' => '==', - '⩶' => '===', - 'ⱼ' => 'j', - 'ⱽ' => 'V', - 'ⵯ' => 'ⵡ', - '⺟' => '母', - '⻳' => '龟', - '⼀' => '一', - '⼁' => '丨', - '⼂' => '丶', - '⼃' => '丿', - '⼄' => '乙', - '⼅' => '亅', - '⼆' => '二', - '⼇' => '亠', - '⼈' => '人', - '⼉' => '儿', - '⼊' => '入', - '⼋' => '八', - '⼌' => '冂', - '⼍' => '冖', - '⼎' => '冫', - '⼏' => '几', - '⼐' => '凵', - '⼑' => '刀', - '⼒' => '力', - '⼓' => '勹', - '⼔' => '匕', - '⼕' => '匚', - '⼖' => '匸', - '⼗' => '十', - '⼘' => '卜', - '⼙' => '卩', - '⼚' => '厂', - '⼛' => '厶', - '⼜' => '又', - '⼝' => '口', - '⼞' => '囗', - '⼟' => '土', - '⼠' => '士', - '⼡' => '夂', - '⼢' => '夊', - '⼣' => '夕', - '⼤' => '大', - '⼥' => '女', - '⼦' => '子', - '⼧' => '宀', - '⼨' => '寸', - '⼩' => '小', - '⼪' => '尢', - '⼫' => '尸', - '⼬' => '屮', - '⼭' => '山', - '⼮' => '巛', - '⼯' => '工', - '⼰' => '己', - '⼱' => '巾', - '⼲' => '干', - '⼳' => '幺', - '⼴' => '广', - '⼵' => '廴', - '⼶' => '廾', - '⼷' => '弋', - '⼸' => '弓', - '⼹' => '彐', - '⼺' => '彡', - '⼻' => '彳', - '⼼' => '心', - '⼽' => '戈', - '⼾' => '戶', - '⼿' => '手', - '⽀' => '支', - '⽁' => '攴', - '⽂' => '文', - '⽃' => '斗', - '⽄' => '斤', - '⽅' => '方', - '⽆' => '无', - '⽇' => '日', - '⽈' => '曰', - '⽉' => '月', - '⽊' => '木', - '⽋' => '欠', - '⽌' => '止', - '⽍' => '歹', - '⽎' => '殳', - '⽏' => '毋', - '⽐' => '比', - '⽑' => '毛', - '⽒' => '氏', - '⽓' => '气', - '⽔' => '水', - '⽕' => '火', - '⽖' => '爪', - '⽗' => '父', - '⽘' => '爻', - '⽙' => '爿', - '⽚' => '片', - '⽛' => '牙', - '⽜' => '牛', - '⽝' => '犬', - '⽞' => '玄', - '⽟' => '玉', - '⽠' => '瓜', - '⽡' => '瓦', - '⽢' => '甘', - '⽣' => '生', - '⽤' => '用', - '⽥' => '田', - '⽦' => '疋', - '⽧' => '疒', - '⽨' => '癶', - '⽩' => '白', - '⽪' => '皮', - '⽫' => '皿', - '⽬' => '目', - '⽭' => '矛', - '⽮' => '矢', - '⽯' => '石', - '⽰' => '示', - '⽱' => '禸', - '⽲' => '禾', - '⽳' => '穴', - '⽴' => '立', - '⽵' => '竹', - '⽶' => '米', - '⽷' => '糸', - '⽸' => '缶', - '⽹' => '网', - '⽺' => '羊', - '⽻' => '羽', - '⽼' => '老', - '⽽' => '而', - '⽾' => '耒', - '⽿' => '耳', - '⾀' => '聿', - '⾁' => '肉', - '⾂' => '臣', - '⾃' => '自', - '⾄' => '至', - '⾅' => '臼', - '⾆' => '舌', - '⾇' => '舛', - '⾈' => '舟', - '⾉' => '艮', - '⾊' => '色', - '⾋' => '艸', - '⾌' => '虍', - '⾍' => '虫', - '⾎' => '血', - '⾏' => '行', - '⾐' => '衣', - '⾑' => '襾', - '⾒' => '見', - '⾓' => '角', - '⾔' => '言', - '⾕' => '谷', - '⾖' => '豆', - '⾗' => '豕', - '⾘' => '豸', - '⾙' => '貝', - '⾚' => '赤', - '⾛' => '走', - '⾜' => '足', - '⾝' => '身', - '⾞' => '車', - '⾟' => '辛', - '⾠' => '辰', - '⾡' => '辵', - '⾢' => '邑', - '⾣' => '酉', - '⾤' => '釆', - '⾥' => '里', - '⾦' => '金', - '⾧' => '長', - '⾨' => '門', - '⾩' => '阜', - '⾪' => '隶', - '⾫' => '隹', - '⾬' => '雨', - '⾭' => '靑', - '⾮' => '非', - '⾯' => '面', - '⾰' => '革', - '⾱' => '韋', - '⾲' => '韭', - '⾳' => '音', - '⾴' => '頁', - '⾵' => '風', - '⾶' => '飛', - '⾷' => '食', - '⾸' => '首', - '⾹' => '香', - '⾺' => '馬', - '⾻' => '骨', - '⾼' => '高', - '⾽' => '髟', - '⾾' => '鬥', - '⾿' => '鬯', - '⿀' => '鬲', - '⿁' => '鬼', - '⿂' => '魚', - '⿃' => '鳥', - '⿄' => '鹵', - '⿅' => '鹿', - '⿆' => '麥', - '⿇' => '麻', - '⿈' => '黃', - '⿉' => '黍', - '⿊' => '黑', - '⿋' => '黹', - '⿌' => '黽', - '⿍' => '鼎', - '⿎' => '鼓', - '⿏' => '鼠', - '⿐' => '鼻', - '⿑' => '齊', - '⿒' => '齒', - '⿓' => '龍', - '⿔' => '龜', - '⿕' => '龠', - ' ' => ' ', - '〶' => '〒', - '〸' => '十', - '〹' => '卄', - '〺' => '卅', - '゛' => ' ゙', - '゜' => ' ゚', - 'ゟ' => 'より', - 'ヿ' => 'コト', - 'ㄱ' => 'ᄀ', - 'ㄲ' => 'ᄁ', - 'ㄳ' => 'ᆪ', - 'ㄴ' => 'ᄂ', - 'ㄵ' => 'ᆬ', - 'ㄶ' => 'ᆭ', - 'ㄷ' => 'ᄃ', - 'ㄸ' => 'ᄄ', - 'ㄹ' => 'ᄅ', - 'ㄺ' => 'ᆰ', - 'ㄻ' => 'ᆱ', - 'ㄼ' => 'ᆲ', - 'ㄽ' => 'ᆳ', - 'ㄾ' => 'ᆴ', - 'ㄿ' => 'ᆵ', - 'ㅀ' => 'ᄚ', - 'ㅁ' => 'ᄆ', - 'ㅂ' => 'ᄇ', - 'ㅃ' => 'ᄈ', - 'ㅄ' => 'ᄡ', - 'ㅅ' => 'ᄉ', - 'ㅆ' => 'ᄊ', - 'ㅇ' => 'ᄋ', - 'ㅈ' => 'ᄌ', - 'ㅉ' => 'ᄍ', - 'ㅊ' => 'ᄎ', - 'ㅋ' => 'ᄏ', - 'ㅌ' => 'ᄐ', - 'ㅍ' => 'ᄑ', - 'ㅎ' => 'ᄒ', - 'ㅏ' => 'ᅡ', - 'ㅐ' => 'ᅢ', - 'ㅑ' => 'ᅣ', - 'ㅒ' => 'ᅤ', - 'ㅓ' => 'ᅥ', - 'ㅔ' => 'ᅦ', - 'ㅕ' => 'ᅧ', - 'ㅖ' => 'ᅨ', - 'ㅗ' => 'ᅩ', - 'ㅘ' => 'ᅪ', - 'ㅙ' => 'ᅫ', - 'ㅚ' => 'ᅬ', - 'ㅛ' => 'ᅭ', - 'ㅜ' => 'ᅮ', - 'ㅝ' => 'ᅯ', - 'ㅞ' => 'ᅰ', - 'ㅟ' => 'ᅱ', - 'ㅠ' => 'ᅲ', - 'ㅡ' => 'ᅳ', - 'ㅢ' => 'ᅴ', - 'ㅣ' => 'ᅵ', - 'ㅤ' => 'ᅠ', - 'ㅥ' => 'ᄔ', - 'ㅦ' => 'ᄕ', - 'ㅧ' => 'ᇇ', - 'ㅨ' => 'ᇈ', - 'ㅩ' => 'ᇌ', - 'ㅪ' => 'ᇎ', - 'ㅫ' => 'ᇓ', - 'ㅬ' => 'ᇗ', - 'ㅭ' => 'ᇙ', - 'ㅮ' => 'ᄜ', - 'ㅯ' => 'ᇝ', - 'ㅰ' => 'ᇟ', - 'ㅱ' => 'ᄝ', - 'ㅲ' => 'ᄞ', - 'ㅳ' => 'ᄠ', - 'ㅴ' => 'ᄢ', - 'ㅵ' => 'ᄣ', - 'ㅶ' => 'ᄧ', - 'ㅷ' => 'ᄩ', - 'ㅸ' => 'ᄫ', - 'ㅹ' => 'ᄬ', - 'ㅺ' => 'ᄭ', - 'ㅻ' => 'ᄮ', - 'ㅼ' => 'ᄯ', - 'ㅽ' => 'ᄲ', - 'ㅾ' => 'ᄶ', - 'ㅿ' => 'ᅀ', - 'ㆀ' => 'ᅇ', - 'ㆁ' => 'ᅌ', - 'ㆂ' => 'ᇱ', - 'ㆃ' => 'ᇲ', - 'ㆄ' => 'ᅗ', - 'ㆅ' => 'ᅘ', - 'ㆆ' => 'ᅙ', - 'ㆇ' => 'ᆄ', - 'ㆈ' => 'ᆅ', - 'ㆉ' => 'ᆈ', - 'ㆊ' => 'ᆑ', - 'ㆋ' => 'ᆒ', - 'ㆌ' => 'ᆔ', - 'ㆍ' => 'ᆞ', - 'ㆎ' => 'ᆡ', - '㆒' => '一', - '㆓' => '二', - '㆔' => '三', - '㆕' => '四', - '㆖' => '上', - '㆗' => '中', - '㆘' => '下', - '㆙' => '甲', - '㆚' => '乙', - '㆛' => '丙', - '㆜' => '丁', - '㆝' => '天', - '㆞' => '地', - '㆟' => '人', - '㈀' => '(ᄀ)', - '㈁' => '(ᄂ)', - '㈂' => '(ᄃ)', - '㈃' => '(ᄅ)', - '㈄' => '(ᄆ)', - '㈅' => '(ᄇ)', - '㈆' => '(ᄉ)', - '㈇' => '(ᄋ)', - '㈈' => '(ᄌ)', - '㈉' => '(ᄎ)', - '㈊' => '(ᄏ)', - '㈋' => '(ᄐ)', - '㈌' => '(ᄑ)', - '㈍' => '(ᄒ)', - '㈎' => '(가)', - '㈏' => '(나)', - '㈐' => '(다)', - '㈑' => '(라)', - '㈒' => '(마)', - '㈓' => '(바)', - '㈔' => '(사)', - '㈕' => '(아)', - '㈖' => '(자)', - '㈗' => '(차)', - '㈘' => '(카)', - '㈙' => '(타)', - '㈚' => '(파)', - '㈛' => '(하)', - '㈜' => '(주)', - '㈝' => '(오전)', - '㈞' => '(오후)', - '㈠' => '(一)', - '㈡' => '(二)', - '㈢' => '(三)', - '㈣' => '(四)', - '㈤' => '(五)', - '㈥' => '(六)', - '㈦' => '(七)', - '㈧' => '(八)', - '㈨' => '(九)', - '㈩' => '(十)', - '㈪' => '(月)', - '㈫' => '(火)', - '㈬' => '(水)', - '㈭' => '(木)', - '㈮' => '(金)', - '㈯' => '(土)', - '㈰' => '(日)', - '㈱' => '(株)', - '㈲' => '(有)', - '㈳' => '(社)', - '㈴' => '(名)', - '㈵' => '(特)', - '㈶' => '(財)', - '㈷' => '(祝)', - '㈸' => '(労)', - '㈹' => '(代)', - '㈺' => '(呼)', - '㈻' => '(学)', - '㈼' => '(監)', - '㈽' => '(企)', - '㈾' => '(資)', - '㈿' => '(協)', - '㉀' => '(祭)', - '㉁' => '(休)', - '㉂' => '(自)', - '㉃' => '(至)', - '㉄' => '問', - '㉅' => '幼', - '㉆' => '文', - '㉇' => '箏', - '㉐' => 'PTE', - '㉑' => '21', - '㉒' => '22', - '㉓' => '23', - '㉔' => '24', - '㉕' => '25', - '㉖' => '26', - '㉗' => '27', - '㉘' => '28', - '㉙' => '29', - '㉚' => '30', - '㉛' => '31', - '㉜' => '32', - '㉝' => '33', - '㉞' => '34', - '㉟' => '35', - '㉠' => 'ᄀ', - '㉡' => 'ᄂ', - '㉢' => 'ᄃ', - '㉣' => 'ᄅ', - '㉤' => 'ᄆ', - '㉥' => 'ᄇ', - '㉦' => 'ᄉ', - '㉧' => 'ᄋ', - '㉨' => 'ᄌ', - '㉩' => 'ᄎ', - '㉪' => 'ᄏ', - '㉫' => 'ᄐ', - '㉬' => 'ᄑ', - '㉭' => 'ᄒ', - '㉮' => '가', - '㉯' => '나', - '㉰' => '다', - '㉱' => '라', - '㉲' => '마', - '㉳' => '바', - '㉴' => '사', - '㉵' => '아', - '㉶' => '자', - '㉷' => '차', - '㉸' => '카', - '㉹' => '타', - '㉺' => '파', - '㉻' => '하', - '㉼' => '참고', - '㉽' => '주의', - '㉾' => '우', - '㊀' => '一', - '㊁' => '二', - '㊂' => '三', - '㊃' => '四', - '㊄' => '五', - '㊅' => '六', - '㊆' => '七', - '㊇' => '八', - '㊈' => '九', - '㊉' => '十', - '㊊' => '月', - '㊋' => '火', - '㊌' => '水', - '㊍' => '木', - '㊎' => '金', - '㊏' => '土', - '㊐' => '日', - '㊑' => '株', - '㊒' => '有', - '㊓' => '社', - '㊔' => '名', - '㊕' => '特', - '㊖' => '財', - '㊗' => '祝', - '㊘' => '労', - '㊙' => '秘', - '㊚' => '男', - '㊛' => '女', - '㊜' => '適', - '㊝' => '優', - '㊞' => '印', - '㊟' => '注', - '㊠' => '項', - '㊡' => '休', - '㊢' => '写', - '㊣' => '正', - '㊤' => '上', - '㊥' => '中', - '㊦' => '下', - '㊧' => '左', - '㊨' => '右', - '㊩' => '医', - '㊪' => '宗', - '㊫' => '学', - '㊬' => '監', - '㊭' => '企', - '㊮' => '資', - '㊯' => '協', - '㊰' => '夜', - '㊱' => '36', - '㊲' => '37', - '㊳' => '38', - '㊴' => '39', - '㊵' => '40', - '㊶' => '41', - '㊷' => '42', - '㊸' => '43', - '㊹' => '44', - '㊺' => '45', - '㊻' => '46', - '㊼' => '47', - '㊽' => '48', - '㊾' => '49', - '㊿' => '50', - '㋀' => '1月', - '㋁' => '2月', - '㋂' => '3月', - '㋃' => '4月', - '㋄' => '5月', - '㋅' => '6月', - '㋆' => '7月', - '㋇' => '8月', - '㋈' => '9月', - '㋉' => '10月', - '㋊' => '11月', - '㋋' => '12月', - '㋌' => 'Hg', - '㋍' => 'erg', - '㋎' => 'eV', - '㋏' => 'LTD', - '㋐' => 'ア', - '㋑' => 'イ', - '㋒' => 'ウ', - '㋓' => 'エ', - '㋔' => 'オ', - '㋕' => 'カ', - '㋖' => 'キ', - '㋗' => 'ク', - '㋘' => 'ケ', - '㋙' => 'コ', - '㋚' => 'サ', - '㋛' => 'シ', - '㋜' => 'ス', - '㋝' => 'セ', - '㋞' => 'ソ', - '㋟' => 'タ', - '㋠' => 'チ', - '㋡' => 'ツ', - '㋢' => 'テ', - '㋣' => 'ト', - '㋤' => 'ナ', - '㋥' => 'ニ', - '㋦' => 'ヌ', - '㋧' => 'ネ', - '㋨' => 'ノ', - '㋩' => 'ハ', - '㋪' => 'ヒ', - '㋫' => 'フ', - '㋬' => 'ヘ', - '㋭' => 'ホ', - '㋮' => 'マ', - '㋯' => 'ミ', - '㋰' => 'ム', - '㋱' => 'メ', - '㋲' => 'モ', - '㋳' => 'ヤ', - '㋴' => 'ユ', - '㋵' => 'ヨ', - '㋶' => 'ラ', - '㋷' => 'リ', - '㋸' => 'ル', - '㋹' => 'レ', - '㋺' => 'ロ', - '㋻' => 'ワ', - '㋼' => 'ヰ', - '㋽' => 'ヱ', - '㋾' => 'ヲ', - '㋿' => '令和', - '㌀' => 'アパート', - '㌁' => 'アルファ', - '㌂' => 'アンペア', - '㌃' => 'アール', - '㌄' => 'イニング', - '㌅' => 'インチ', - '㌆' => 'ウォン', - '㌇' => 'エスクード', - '㌈' => 'エーカー', - '㌉' => 'オンス', - '㌊' => 'オーム', - '㌋' => 'カイリ', - '㌌' => 'カラット', - '㌍' => 'カロリー', - '㌎' => 'ガロン', - '㌏' => 'ガンマ', - '㌐' => 'ギガ', - '㌑' => 'ギニー', - '㌒' => 'キュリー', - '㌓' => 'ギルダー', - '㌔' => 'キロ', - '㌕' => 'キログラム', - '㌖' => 'キロメートル', - '㌗' => 'キロワット', - '㌘' => 'グラム', - '㌙' => 'グラムトン', - '㌚' => 'クルゼイロ', - '㌛' => 'クローネ', - '㌜' => 'ケース', - '㌝' => 'コルナ', - '㌞' => 'コーポ', - '㌟' => 'サイクル', - '㌠' => 'サンチーム', - '㌡' => 'シリング', - '㌢' => 'センチ', - '㌣' => 'セント', - '㌤' => 'ダース', - '㌥' => 'デシ', - '㌦' => 'ドル', - '㌧' => 'トン', - '㌨' => 'ナノ', - '㌩' => 'ノット', - '㌪' => 'ハイツ', - '㌫' => 'パーセント', - '㌬' => 'パーツ', - '㌭' => 'バーレル', - '㌮' => 'ピアストル', - '㌯' => 'ピクル', - '㌰' => 'ピコ', - '㌱' => 'ビル', - '㌲' => 'ファラッド', - '㌳' => 'フィート', - '㌴' => 'ブッシェル', - '㌵' => 'フラン', - '㌶' => 'ヘクタール', - '㌷' => 'ペソ', - '㌸' => 'ペニヒ', - '㌹' => 'ヘルツ', - '㌺' => 'ペンス', - '㌻' => 'ページ', - '㌼' => 'ベータ', - '㌽' => 'ポイント', - '㌾' => 'ボルト', - '㌿' => 'ホン', - '㍀' => 'ポンド', - '㍁' => 'ホール', - '㍂' => 'ホーン', - '㍃' => 'マイクロ', - '㍄' => 'マイル', - '㍅' => 'マッハ', - '㍆' => 'マルク', - '㍇' => 'マンション', - '㍈' => 'ミクロン', - '㍉' => 'ミリ', - '㍊' => 'ミリバール', - '㍋' => 'メガ', - '㍌' => 'メガトン', - '㍍' => 'メートル', - '㍎' => 'ヤード', - '㍏' => 'ヤール', - '㍐' => 'ユアン', - '㍑' => 'リットル', - '㍒' => 'リラ', - '㍓' => 'ルピー', - '㍔' => 'ルーブル', - '㍕' => 'レム', - '㍖' => 'レントゲン', - '㍗' => 'ワット', - '㍘' => '0点', - '㍙' => '1点', - '㍚' => '2点', - '㍛' => '3点', - '㍜' => '4点', - '㍝' => '5点', - '㍞' => '6点', - '㍟' => '7点', - '㍠' => '8点', - '㍡' => '9点', - '㍢' => '10点', - '㍣' => '11点', - '㍤' => '12点', - '㍥' => '13点', - '㍦' => '14点', - '㍧' => '15点', - '㍨' => '16点', - '㍩' => '17点', - '㍪' => '18点', - '㍫' => '19点', - '㍬' => '20点', - '㍭' => '21点', - '㍮' => '22点', - '㍯' => '23点', - '㍰' => '24点', - '㍱' => 'hPa', - '㍲' => 'da', - '㍳' => 'AU', - '㍴' => 'bar', - '㍵' => 'oV', - '㍶' => 'pc', - '㍷' => 'dm', - '㍸' => 'dm2', - '㍹' => 'dm3', - '㍺' => 'IU', - '㍻' => '平成', - '㍼' => '昭和', - '㍽' => '大正', - '㍾' => '明治', - '㍿' => '株式会社', - '㎀' => 'pA', - '㎁' => 'nA', - '㎂' => 'μA', - '㎃' => 'mA', - '㎄' => 'kA', - '㎅' => 'KB', - '㎆' => 'MB', - '㎇' => 'GB', - '㎈' => 'cal', - '㎉' => 'kcal', - '㎊' => 'pF', - '㎋' => 'nF', - '㎌' => 'μF', - '㎍' => 'μg', - '㎎' => 'mg', - '㎏' => 'kg', - '㎐' => 'Hz', - '㎑' => 'kHz', - '㎒' => 'MHz', - '㎓' => 'GHz', - '㎔' => 'THz', - '㎕' => 'μl', - '㎖' => 'ml', - '㎗' => 'dl', - '㎘' => 'kl', - '㎙' => 'fm', - '㎚' => 'nm', - '㎛' => 'μm', - '㎜' => 'mm', - '㎝' => 'cm', - '㎞' => 'km', - '㎟' => 'mm2', - '㎠' => 'cm2', - '㎡' => 'm2', - '㎢' => 'km2', - '㎣' => 'mm3', - '㎤' => 'cm3', - '㎥' => 'm3', - '㎦' => 'km3', - '㎧' => 'm∕s', - '㎨' => 'm∕s2', - '㎩' => 'Pa', - '㎪' => 'kPa', - '㎫' => 'MPa', - '㎬' => 'GPa', - '㎭' => 'rad', - '㎮' => 'rad∕s', - '㎯' => 'rad∕s2', - '㎰' => 'ps', - '㎱' => 'ns', - '㎲' => 'μs', - '㎳' => 'ms', - '㎴' => 'pV', - '㎵' => 'nV', - '㎶' => 'μV', - '㎷' => 'mV', - '㎸' => 'kV', - '㎹' => 'MV', - '㎺' => 'pW', - '㎻' => 'nW', - '㎼' => 'μW', - '㎽' => 'mW', - '㎾' => 'kW', - '㎿' => 'MW', - '㏀' => 'kΩ', - '㏁' => 'MΩ', - '㏂' => 'a.m.', - '㏃' => 'Bq', - '㏄' => 'cc', - '㏅' => 'cd', - '㏆' => 'C∕kg', - '㏇' => 'Co.', - '㏈' => 'dB', - '㏉' => 'Gy', - '㏊' => 'ha', - '㏋' => 'HP', - '㏌' => 'in', - '㏍' => 'KK', - '㏎' => 'KM', - '㏏' => 'kt', - '㏐' => 'lm', - '㏑' => 'ln', - '㏒' => 'log', - '㏓' => 'lx', - '㏔' => 'mb', - '㏕' => 'mil', - '㏖' => 'mol', - '㏗' => 'PH', - '㏘' => 'p.m.', - '㏙' => 'PPM', - '㏚' => 'PR', - '㏛' => 'sr', - '㏜' => 'Sv', - '㏝' => 'Wb', - '㏞' => 'V∕m', - '㏟' => 'A∕m', - '㏠' => '1日', - '㏡' => '2日', - '㏢' => '3日', - '㏣' => '4日', - '㏤' => '5日', - '㏥' => '6日', - '㏦' => '7日', - '㏧' => '8日', - '㏨' => '9日', - '㏩' => '10日', - '㏪' => '11日', - '㏫' => '12日', - '㏬' => '13日', - '㏭' => '14日', - '㏮' => '15日', - '㏯' => '16日', - '㏰' => '17日', - '㏱' => '18日', - '㏲' => '19日', - '㏳' => '20日', - '㏴' => '21日', - '㏵' => '22日', - '㏶' => '23日', - '㏷' => '24日', - '㏸' => '25日', - '㏹' => '26日', - '㏺' => '27日', - '㏻' => '28日', - '㏼' => '29日', - '㏽' => '30日', - '㏾' => '31日', - '㏿' => 'gal', - 'ꚜ' => 'ъ', - 'ꚝ' => 'ь', - 'ꝰ' => 'ꝯ', - 'ꟸ' => 'Ħ', - 'ꟹ' => 'œ', - 'ꭜ' => 'ꜧ', - 'ꭝ' => 'ꬷ', - 'ꭞ' => 'ɫ', - 'ꭟ' => 'ꭒ', - 'ꭩ' => 'ʍ', - 'ff' => 'ff', - 'fi' => 'fi', - 'fl' => 'fl', - 'ffi' => 'ffi', - 'ffl' => 'ffl', - 'ſt' => 'st', - 'st' => 'st', - 'ﬓ' => 'մն', - 'ﬔ' => 'մե', - 'ﬕ' => 'մի', - 'ﬖ' => 'վն', - 'ﬗ' => 'մխ', - 'ﬠ' => 'ע', - 'ﬡ' => 'א', - 'ﬢ' => 'ד', - 'ﬣ' => 'ה', - 'ﬤ' => 'כ', - 'ﬥ' => 'ל', - 'ﬦ' => 'ם', - 'ﬧ' => 'ר', - 'ﬨ' => 'ת', - '﬩' => '+', - 'ﭏ' => 'אל', - 'ﭐ' => 'ٱ', - 'ﭑ' => 'ٱ', - 'ﭒ' => 'ٻ', - 'ﭓ' => 'ٻ', - 'ﭔ' => 'ٻ', - 'ﭕ' => 'ٻ', - 'ﭖ' => 'پ', - 'ﭗ' => 'پ', - 'ﭘ' => 'پ', - 'ﭙ' => 'پ', - 'ﭚ' => 'ڀ', - 'ﭛ' => 'ڀ', - 'ﭜ' => 'ڀ', - 'ﭝ' => 'ڀ', - 'ﭞ' => 'ٺ', - 'ﭟ' => 'ٺ', - 'ﭠ' => 'ٺ', - 'ﭡ' => 'ٺ', - 'ﭢ' => 'ٿ', - 'ﭣ' => 'ٿ', - 'ﭤ' => 'ٿ', - 'ﭥ' => 'ٿ', - 'ﭦ' => 'ٹ', - 'ﭧ' => 'ٹ', - 'ﭨ' => 'ٹ', - 'ﭩ' => 'ٹ', - 'ﭪ' => 'ڤ', - 'ﭫ' => 'ڤ', - 'ﭬ' => 'ڤ', - 'ﭭ' => 'ڤ', - 'ﭮ' => 'ڦ', - 'ﭯ' => 'ڦ', - 'ﭰ' => 'ڦ', - 'ﭱ' => 'ڦ', - 'ﭲ' => 'ڄ', - 'ﭳ' => 'ڄ', - 'ﭴ' => 'ڄ', - 'ﭵ' => 'ڄ', - 'ﭶ' => 'ڃ', - 'ﭷ' => 'ڃ', - 'ﭸ' => 'ڃ', - 'ﭹ' => 'ڃ', - 'ﭺ' => 'چ', - 'ﭻ' => 'چ', - 'ﭼ' => 'چ', - 'ﭽ' => 'چ', - 'ﭾ' => 'ڇ', - 'ﭿ' => 'ڇ', - 'ﮀ' => 'ڇ', - 'ﮁ' => 'ڇ', - 'ﮂ' => 'ڍ', - 'ﮃ' => 'ڍ', - 'ﮄ' => 'ڌ', - 'ﮅ' => 'ڌ', - 'ﮆ' => 'ڎ', - 'ﮇ' => 'ڎ', - 'ﮈ' => 'ڈ', - 'ﮉ' => 'ڈ', - 'ﮊ' => 'ژ', - 'ﮋ' => 'ژ', - 'ﮌ' => 'ڑ', - 'ﮍ' => 'ڑ', - 'ﮎ' => 'ک', - 'ﮏ' => 'ک', - 'ﮐ' => 'ک', - 'ﮑ' => 'ک', - 'ﮒ' => 'گ', - 'ﮓ' => 'گ', - 'ﮔ' => 'گ', - 'ﮕ' => 'گ', - 'ﮖ' => 'ڳ', - 'ﮗ' => 'ڳ', - 'ﮘ' => 'ڳ', - 'ﮙ' => 'ڳ', - 'ﮚ' => 'ڱ', - 'ﮛ' => 'ڱ', - 'ﮜ' => 'ڱ', - 'ﮝ' => 'ڱ', - 'ﮞ' => 'ں', - 'ﮟ' => 'ں', - 'ﮠ' => 'ڻ', - 'ﮡ' => 'ڻ', - 'ﮢ' => 'ڻ', - 'ﮣ' => 'ڻ', - 'ﮤ' => 'ۀ', - 'ﮥ' => 'ۀ', - 'ﮦ' => 'ہ', - 'ﮧ' => 'ہ', - 'ﮨ' => 'ہ', - 'ﮩ' => 'ہ', - 'ﮪ' => 'ھ', - 'ﮫ' => 'ھ', - 'ﮬ' => 'ھ', - 'ﮭ' => 'ھ', - 'ﮮ' => 'ے', - 'ﮯ' => 'ے', - 'ﮰ' => 'ۓ', - 'ﮱ' => 'ۓ', - 'ﯓ' => 'ڭ', - 'ﯔ' => 'ڭ', - 'ﯕ' => 'ڭ', - 'ﯖ' => 'ڭ', - 'ﯗ' => 'ۇ', - 'ﯘ' => 'ۇ', - 'ﯙ' => 'ۆ', - 'ﯚ' => 'ۆ', - 'ﯛ' => 'ۈ', - 'ﯜ' => 'ۈ', - 'ﯝ' => 'ۇٴ', - 'ﯞ' => 'ۋ', - 'ﯟ' => 'ۋ', - 'ﯠ' => 'ۅ', - 'ﯡ' => 'ۅ', - 'ﯢ' => 'ۉ', - 'ﯣ' => 'ۉ', - 'ﯤ' => 'ې', - 'ﯥ' => 'ې', - 'ﯦ' => 'ې', - 'ﯧ' => 'ې', - 'ﯨ' => 'ى', - 'ﯩ' => 'ى', - 'ﯪ' => 'ئا', - 'ﯫ' => 'ئا', - 'ﯬ' => 'ئە', - 'ﯭ' => 'ئە', - 'ﯮ' => 'ئو', - 'ﯯ' => 'ئو', - 'ﯰ' => 'ئۇ', - 'ﯱ' => 'ئۇ', - 'ﯲ' => 'ئۆ', - 'ﯳ' => 'ئۆ', - 'ﯴ' => 'ئۈ', - 'ﯵ' => 'ئۈ', - 'ﯶ' => 'ئې', - 'ﯷ' => 'ئې', - 'ﯸ' => 'ئې', - 'ﯹ' => 'ئى', - 'ﯺ' => 'ئى', - 'ﯻ' => 'ئى', - 'ﯼ' => 'ی', - 'ﯽ' => 'ی', - 'ﯾ' => 'ی', - 'ﯿ' => 'ی', - 'ﰀ' => 'ئج', - 'ﰁ' => 'ئح', - 'ﰂ' => 'ئم', - 'ﰃ' => 'ئى', - 'ﰄ' => 'ئي', - 'ﰅ' => 'بج', - 'ﰆ' => 'بح', - 'ﰇ' => 'بخ', - 'ﰈ' => 'بم', - 'ﰉ' => 'بى', - 'ﰊ' => 'بي', - 'ﰋ' => 'تج', - 'ﰌ' => 'تح', - 'ﰍ' => 'تخ', - 'ﰎ' => 'تم', - 'ﰏ' => 'تى', - 'ﰐ' => 'تي', - 'ﰑ' => 'ثج', - 'ﰒ' => 'ثم', - 'ﰓ' => 'ثى', - 'ﰔ' => 'ثي', - 'ﰕ' => 'جح', - 'ﰖ' => 'جم', - 'ﰗ' => 'حج', - 'ﰘ' => 'حم', - 'ﰙ' => 'خج', - 'ﰚ' => 'خح', - 'ﰛ' => 'خم', - 'ﰜ' => 'سج', - 'ﰝ' => 'سح', - 'ﰞ' => 'سخ', - 'ﰟ' => 'سم', - 'ﰠ' => 'صح', - 'ﰡ' => 'صم', - 'ﰢ' => 'ضج', - 'ﰣ' => 'ضح', - 'ﰤ' => 'ضخ', - 'ﰥ' => 'ضم', - 'ﰦ' => 'طح', - 'ﰧ' => 'طم', - 'ﰨ' => 'ظم', - 'ﰩ' => 'عج', - 'ﰪ' => 'عم', - 'ﰫ' => 'غج', - 'ﰬ' => 'غم', - 'ﰭ' => 'فج', - 'ﰮ' => 'فح', - 'ﰯ' => 'فخ', - 'ﰰ' => 'فم', - 'ﰱ' => 'فى', - 'ﰲ' => 'في', - 'ﰳ' => 'قح', - 'ﰴ' => 'قم', - 'ﰵ' => 'قى', - 'ﰶ' => 'قي', - 'ﰷ' => 'كا', - 'ﰸ' => 'كج', - 'ﰹ' => 'كح', - 'ﰺ' => 'كخ', - 'ﰻ' => 'كل', - 'ﰼ' => 'كم', - 'ﰽ' => 'كى', - 'ﰾ' => 'كي', - 'ﰿ' => 'لج', - 'ﱀ' => 'لح', - 'ﱁ' => 'لخ', - 'ﱂ' => 'لم', - 'ﱃ' => 'لى', - 'ﱄ' => 'لي', - 'ﱅ' => 'مج', - 'ﱆ' => 'مح', - 'ﱇ' => 'مخ', - 'ﱈ' => 'مم', - 'ﱉ' => 'مى', - 'ﱊ' => 'مي', - 'ﱋ' => 'نج', - 'ﱌ' => 'نح', - 'ﱍ' => 'نخ', - 'ﱎ' => 'نم', - 'ﱏ' => 'نى', - 'ﱐ' => 'ني', - 'ﱑ' => 'هج', - 'ﱒ' => 'هم', - 'ﱓ' => 'هى', - 'ﱔ' => 'هي', - 'ﱕ' => 'يج', - 'ﱖ' => 'يح', - 'ﱗ' => 'يخ', - 'ﱘ' => 'يم', - 'ﱙ' => 'يى', - 'ﱚ' => 'يي', - 'ﱛ' => 'ذٰ', - 'ﱜ' => 'رٰ', - 'ﱝ' => 'ىٰ', - 'ﱞ' => ' ٌّ', - 'ﱟ' => ' ٍّ', - 'ﱠ' => ' َّ', - 'ﱡ' => ' ُّ', - 'ﱢ' => ' ِّ', - 'ﱣ' => ' ّٰ', - 'ﱤ' => 'ئر', - 'ﱥ' => 'ئز', - 'ﱦ' => 'ئم', - 'ﱧ' => 'ئن', - 'ﱨ' => 'ئى', - 'ﱩ' => 'ئي', - 'ﱪ' => 'بر', - 'ﱫ' => 'بز', - 'ﱬ' => 'بم', - 'ﱭ' => 'بن', - 'ﱮ' => 'بى', - 'ﱯ' => 'بي', - 'ﱰ' => 'تر', - 'ﱱ' => 'تز', - 'ﱲ' => 'تم', - 'ﱳ' => 'تن', - 'ﱴ' => 'تى', - 'ﱵ' => 'تي', - 'ﱶ' => 'ثر', - 'ﱷ' => 'ثز', - 'ﱸ' => 'ثم', - 'ﱹ' => 'ثن', - 'ﱺ' => 'ثى', - 'ﱻ' => 'ثي', - 'ﱼ' => 'فى', - 'ﱽ' => 'في', - 'ﱾ' => 'قى', - 'ﱿ' => 'قي', - 'ﲀ' => 'كا', - 'ﲁ' => 'كل', - 'ﲂ' => 'كم', - 'ﲃ' => 'كى', - 'ﲄ' => 'كي', - 'ﲅ' => 'لم', - 'ﲆ' => 'لى', - 'ﲇ' => 'لي', - 'ﲈ' => 'ما', - 'ﲉ' => 'مم', - 'ﲊ' => 'نر', - 'ﲋ' => 'نز', - 'ﲌ' => 'نم', - 'ﲍ' => 'نن', - 'ﲎ' => 'نى', - 'ﲏ' => 'ني', - 'ﲐ' => 'ىٰ', - 'ﲑ' => 'ير', - 'ﲒ' => 'يز', - 'ﲓ' => 'يم', - 'ﲔ' => 'ين', - 'ﲕ' => 'يى', - 'ﲖ' => 'يي', - 'ﲗ' => 'ئج', - 'ﲘ' => 'ئح', - 'ﲙ' => 'ئخ', - 'ﲚ' => 'ئم', - 'ﲛ' => 'ئه', - 'ﲜ' => 'بج', - 'ﲝ' => 'بح', - 'ﲞ' => 'بخ', - 'ﲟ' => 'بم', - 'ﲠ' => 'به', - 'ﲡ' => 'تج', - 'ﲢ' => 'تح', - 'ﲣ' => 'تخ', - 'ﲤ' => 'تم', - 'ﲥ' => 'ته', - 'ﲦ' => 'ثم', - 'ﲧ' => 'جح', - 'ﲨ' => 'جم', - 'ﲩ' => 'حج', - 'ﲪ' => 'حم', - 'ﲫ' => 'خج', - 'ﲬ' => 'خم', - 'ﲭ' => 'سج', - 'ﲮ' => 'سح', - 'ﲯ' => 'سخ', - 'ﲰ' => 'سم', - 'ﲱ' => 'صح', - 'ﲲ' => 'صخ', - 'ﲳ' => 'صم', - 'ﲴ' => 'ضج', - 'ﲵ' => 'ضح', - 'ﲶ' => 'ضخ', - 'ﲷ' => 'ضم', - 'ﲸ' => 'طح', - 'ﲹ' => 'ظم', - 'ﲺ' => 'عج', - 'ﲻ' => 'عم', - 'ﲼ' => 'غج', - 'ﲽ' => 'غم', - 'ﲾ' => 'فج', - 'ﲿ' => 'فح', - 'ﳀ' => 'فخ', - 'ﳁ' => 'فم', - 'ﳂ' => 'قح', - 'ﳃ' => 'قم', - 'ﳄ' => 'كج', - 'ﳅ' => 'كح', - 'ﳆ' => 'كخ', - 'ﳇ' => 'كل', - 'ﳈ' => 'كم', - 'ﳉ' => 'لج', - 'ﳊ' => 'لح', - 'ﳋ' => 'لخ', - 'ﳌ' => 'لم', - 'ﳍ' => 'له', - 'ﳎ' => 'مج', - 'ﳏ' => 'مح', - 'ﳐ' => 'مخ', - 'ﳑ' => 'مم', - 'ﳒ' => 'نج', - 'ﳓ' => 'نح', - 'ﳔ' => 'نخ', - 'ﳕ' => 'نم', - 'ﳖ' => 'نه', - 'ﳗ' => 'هج', - 'ﳘ' => 'هم', - 'ﳙ' => 'هٰ', - 'ﳚ' => 'يج', - 'ﳛ' => 'يح', - 'ﳜ' => 'يخ', - 'ﳝ' => 'يم', - 'ﳞ' => 'يه', - 'ﳟ' => 'ئم', - 'ﳠ' => 'ئه', - 'ﳡ' => 'بم', - 'ﳢ' => 'به', - 'ﳣ' => 'تم', - 'ﳤ' => 'ته', - 'ﳥ' => 'ثم', - 'ﳦ' => 'ثه', - 'ﳧ' => 'سم', - 'ﳨ' => 'سه', - 'ﳩ' => 'شم', - 'ﳪ' => 'شه', - 'ﳫ' => 'كل', - 'ﳬ' => 'كم', - 'ﳭ' => 'لم', - 'ﳮ' => 'نم', - 'ﳯ' => 'نه', - 'ﳰ' => 'يم', - 'ﳱ' => 'يه', - 'ﳲ' => 'ـَّ', - 'ﳳ' => 'ـُّ', - 'ﳴ' => 'ـِّ', - 'ﳵ' => 'طى', - 'ﳶ' => 'طي', - 'ﳷ' => 'عى', - 'ﳸ' => 'عي', - 'ﳹ' => 'غى', - 'ﳺ' => 'غي', - 'ﳻ' => 'سى', - 'ﳼ' => 'سي', - 'ﳽ' => 'شى', - 'ﳾ' => 'شي', - 'ﳿ' => 'حى', - 'ﴀ' => 'حي', - 'ﴁ' => 'جى', - 'ﴂ' => 'جي', - 'ﴃ' => 'خى', - 'ﴄ' => 'خي', - 'ﴅ' => 'صى', - 'ﴆ' => 'صي', - 'ﴇ' => 'ضى', - 'ﴈ' => 'ضي', - 'ﴉ' => 'شج', - 'ﴊ' => 'شح', - 'ﴋ' => 'شخ', - 'ﴌ' => 'شم', - 'ﴍ' => 'شر', - 'ﴎ' => 'سر', - 'ﴏ' => 'صر', - 'ﴐ' => 'ضر', - 'ﴑ' => 'طى', - 'ﴒ' => 'طي', - 'ﴓ' => 'عى', - 'ﴔ' => 'عي', - 'ﴕ' => 'غى', - 'ﴖ' => 'غي', - 'ﴗ' => 'سى', - 'ﴘ' => 'سي', - 'ﴙ' => 'شى', - 'ﴚ' => 'شي', - 'ﴛ' => 'حى', - 'ﴜ' => 'حي', - 'ﴝ' => 'جى', - 'ﴞ' => 'جي', - 'ﴟ' => 'خى', - 'ﴠ' => 'خي', - 'ﴡ' => 'صى', - 'ﴢ' => 'صي', - 'ﴣ' => 'ضى', - 'ﴤ' => 'ضي', - 'ﴥ' => 'شج', - 'ﴦ' => 'شح', - 'ﴧ' => 'شخ', - 'ﴨ' => 'شم', - 'ﴩ' => 'شر', - 'ﴪ' => 'سر', - 'ﴫ' => 'صر', - 'ﴬ' => 'ضر', - 'ﴭ' => 'شج', - 'ﴮ' => 'شح', - 'ﴯ' => 'شخ', - 'ﴰ' => 'شم', - 'ﴱ' => 'سه', - 'ﴲ' => 'شه', - 'ﴳ' => 'طم', - 'ﴴ' => 'سج', - 'ﴵ' => 'سح', - 'ﴶ' => 'سخ', - 'ﴷ' => 'شج', - 'ﴸ' => 'شح', - 'ﴹ' => 'شخ', - 'ﴺ' => 'طم', - 'ﴻ' => 'ظم', - 'ﴼ' => 'اً', - 'ﴽ' => 'اً', - 'ﵐ' => 'تجم', - 'ﵑ' => 'تحج', - 'ﵒ' => 'تحج', - 'ﵓ' => 'تحم', - 'ﵔ' => 'تخم', - 'ﵕ' => 'تمج', - 'ﵖ' => 'تمح', - 'ﵗ' => 'تمخ', - 'ﵘ' => 'جمح', - 'ﵙ' => 'جمح', - 'ﵚ' => 'حمي', - 'ﵛ' => 'حمى', - 'ﵜ' => 'سحج', - 'ﵝ' => 'سجح', - 'ﵞ' => 'سجى', - 'ﵟ' => 'سمح', - 'ﵠ' => 'سمح', - 'ﵡ' => 'سمج', - 'ﵢ' => 'سمم', - 'ﵣ' => 'سمم', - 'ﵤ' => 'صحح', - 'ﵥ' => 'صحح', - 'ﵦ' => 'صمم', - 'ﵧ' => 'شحم', - 'ﵨ' => 'شحم', - 'ﵩ' => 'شجي', - 'ﵪ' => 'شمخ', - 'ﵫ' => 'شمخ', - 'ﵬ' => 'شمم', - 'ﵭ' => 'شمم', - 'ﵮ' => 'ضحى', - 'ﵯ' => 'ضخم', - 'ﵰ' => 'ضخم', - 'ﵱ' => 'طمح', - 'ﵲ' => 'طمح', - 'ﵳ' => 'طمم', - 'ﵴ' => 'طمي', - 'ﵵ' => 'عجم', - 'ﵶ' => 'عمم', - 'ﵷ' => 'عمم', - 'ﵸ' => 'عمى', - 'ﵹ' => 'غمم', - 'ﵺ' => 'غمي', - 'ﵻ' => 'غمى', - 'ﵼ' => 'فخم', - 'ﵽ' => 'فخم', - 'ﵾ' => 'قمح', - 'ﵿ' => 'قمم', - 'ﶀ' => 'لحم', - 'ﶁ' => 'لحي', - 'ﶂ' => 'لحى', - 'ﶃ' => 'لجج', - 'ﶄ' => 'لجج', - 'ﶅ' => 'لخم', - 'ﶆ' => 'لخم', - 'ﶇ' => 'لمح', - 'ﶈ' => 'لمح', - 'ﶉ' => 'محج', - 'ﶊ' => 'محم', - 'ﶋ' => 'محي', - 'ﶌ' => 'مجح', - 'ﶍ' => 'مجم', - 'ﶎ' => 'مخج', - 'ﶏ' => 'مخم', - 'ﶒ' => 'مجخ', - 'ﶓ' => 'همج', - 'ﶔ' => 'همم', - 'ﶕ' => 'نحم', - 'ﶖ' => 'نحى', - 'ﶗ' => 'نجم', - 'ﶘ' => 'نجم', - 'ﶙ' => 'نجى', - 'ﶚ' => 'نمي', - 'ﶛ' => 'نمى', - 'ﶜ' => 'يمم', - 'ﶝ' => 'يمم', - 'ﶞ' => 'بخي', - 'ﶟ' => 'تجي', - 'ﶠ' => 'تجى', - 'ﶡ' => 'تخي', - 'ﶢ' => 'تخى', - 'ﶣ' => 'تمي', - 'ﶤ' => 'تمى', - 'ﶥ' => 'جمي', - 'ﶦ' => 'جحى', - 'ﶧ' => 'جمى', - 'ﶨ' => 'سخى', - 'ﶩ' => 'صحي', - 'ﶪ' => 'شحي', - 'ﶫ' => 'ضحي', - 'ﶬ' => 'لجي', - 'ﶭ' => 'لمي', - 'ﶮ' => 'يحي', - 'ﶯ' => 'يجي', - 'ﶰ' => 'يمي', - 'ﶱ' => 'ممي', - 'ﶲ' => 'قمي', - 'ﶳ' => 'نحي', - 'ﶴ' => 'قمح', - 'ﶵ' => 'لحم', - 'ﶶ' => 'عمي', - 'ﶷ' => 'كمي', - 'ﶸ' => 'نجح', - 'ﶹ' => 'مخي', - 'ﶺ' => 'لجم', - 'ﶻ' => 'كمم', - 'ﶼ' => 'لجم', - 'ﶽ' => 'نجح', - 'ﶾ' => 'جحي', - 'ﶿ' => 'حجي', - 'ﷀ' => 'مجي', - 'ﷁ' => 'فمي', - 'ﷂ' => 'بحي', - 'ﷃ' => 'كمم', - 'ﷄ' => 'عجم', - 'ﷅ' => 'صمم', - 'ﷆ' => 'سخي', - 'ﷇ' => 'نجي', - 'ﷰ' => 'صلے', - 'ﷱ' => 'قلے', - 'ﷲ' => 'الله', - 'ﷳ' => 'اكبر', - 'ﷴ' => 'محمد', - 'ﷵ' => 'صلعم', - 'ﷶ' => 'رسول', - 'ﷷ' => 'عليه', - 'ﷸ' => 'وسلم', - 'ﷹ' => 'صلى', - 'ﷺ' => 'صلى الله عليه وسلم', - 'ﷻ' => 'جل جلاله', - '﷼' => 'ریال', - '︐' => ',', - '︑' => '、', - '︒' => '。', - '︓' => ':', - '︔' => ';', - '︕' => '!', - '︖' => '?', - '︗' => '〖', - '︘' => '〗', - '︙' => '...', - '︰' => '..', - '︱' => '—', - '︲' => '–', - '︳' => '_', - '︴' => '_', - '︵' => '(', - '︶' => ')', - '︷' => '{', - '︸' => '}', - '︹' => '〔', - '︺' => '〕', - '︻' => '【', - '︼' => '】', - '︽' => '《', - '︾' => '》', - '︿' => '〈', - '﹀' => '〉', - '﹁' => '「', - '﹂' => '」', - '﹃' => '『', - '﹄' => '』', - '﹇' => '[', - '﹈' => ']', - '﹉' => ' ̅', - '﹊' => ' ̅', - '﹋' => ' ̅', - '﹌' => ' ̅', - '﹍' => '_', - '﹎' => '_', - '﹏' => '_', - '﹐' => ',', - '﹑' => '、', - '﹒' => '.', - '﹔' => ';', - '﹕' => ':', - '﹖' => '?', - '﹗' => '!', - '﹘' => '—', - '﹙' => '(', - '﹚' => ')', - '﹛' => '{', - '﹜' => '}', - '﹝' => '〔', - '﹞' => '〕', - '﹟' => '#', - '﹠' => '&', - '﹡' => '*', - '﹢' => '+', - '﹣' => '-', - '﹤' => '<', - '﹥' => '>', - '﹦' => '=', - '﹨' => '\\', - '﹩' => '$', - '﹪' => '%', - '﹫' => '@', - 'ﹰ' => ' ً', - 'ﹱ' => 'ـً', - 'ﹲ' => ' ٌ', - 'ﹴ' => ' ٍ', - 'ﹶ' => ' َ', - 'ﹷ' => 'ـَ', - 'ﹸ' => ' ُ', - 'ﹹ' => 'ـُ', - 'ﹺ' => ' ِ', - 'ﹻ' => 'ـِ', - 'ﹼ' => ' ّ', - 'ﹽ' => 'ـّ', - 'ﹾ' => ' ْ', - 'ﹿ' => 'ـْ', - 'ﺀ' => 'ء', - 'ﺁ' => 'آ', - 'ﺂ' => 'آ', - 'ﺃ' => 'أ', - 'ﺄ' => 'أ', - 'ﺅ' => 'ؤ', - 'ﺆ' => 'ؤ', - 'ﺇ' => 'إ', - 'ﺈ' => 'إ', - 'ﺉ' => 'ئ', - 'ﺊ' => 'ئ', - 'ﺋ' => 'ئ', - 'ﺌ' => 'ئ', - 'ﺍ' => 'ا', - 'ﺎ' => 'ا', - 'ﺏ' => 'ب', - 'ﺐ' => 'ب', - 'ﺑ' => 'ب', - 'ﺒ' => 'ب', - 'ﺓ' => 'ة', - 'ﺔ' => 'ة', - 'ﺕ' => 'ت', - 'ﺖ' => 'ت', - 'ﺗ' => 'ت', - 'ﺘ' => 'ت', - 'ﺙ' => 'ث', - 'ﺚ' => 'ث', - 'ﺛ' => 'ث', - 'ﺜ' => 'ث', - 'ﺝ' => 'ج', - 'ﺞ' => 'ج', - 'ﺟ' => 'ج', - 'ﺠ' => 'ج', - 'ﺡ' => 'ح', - 'ﺢ' => 'ح', - 'ﺣ' => 'ح', - 'ﺤ' => 'ح', - 'ﺥ' => 'خ', - 'ﺦ' => 'خ', - 'ﺧ' => 'خ', - 'ﺨ' => 'خ', - 'ﺩ' => 'د', - 'ﺪ' => 'د', - 'ﺫ' => 'ذ', - 'ﺬ' => 'ذ', - 'ﺭ' => 'ر', - 'ﺮ' => 'ر', - 'ﺯ' => 'ز', - 'ﺰ' => 'ز', - 'ﺱ' => 'س', - 'ﺲ' => 'س', - 'ﺳ' => 'س', - 'ﺴ' => 'س', - 'ﺵ' => 'ش', - 'ﺶ' => 'ش', - 'ﺷ' => 'ش', - 'ﺸ' => 'ش', - 'ﺹ' => 'ص', - 'ﺺ' => 'ص', - 'ﺻ' => 'ص', - 'ﺼ' => 'ص', - 'ﺽ' => 'ض', - 'ﺾ' => 'ض', - 'ﺿ' => 'ض', - 'ﻀ' => 'ض', - 'ﻁ' => 'ط', - 'ﻂ' => 'ط', - 'ﻃ' => 'ط', - 'ﻄ' => 'ط', - 'ﻅ' => 'ظ', - 'ﻆ' => 'ظ', - 'ﻇ' => 'ظ', - 'ﻈ' => 'ظ', - 'ﻉ' => 'ع', - 'ﻊ' => 'ع', - 'ﻋ' => 'ع', - 'ﻌ' => 'ع', - 'ﻍ' => 'غ', - 'ﻎ' => 'غ', - 'ﻏ' => 'غ', - 'ﻐ' => 'غ', - 'ﻑ' => 'ف', - 'ﻒ' => 'ف', - 'ﻓ' => 'ف', - 'ﻔ' => 'ف', - 'ﻕ' => 'ق', - 'ﻖ' => 'ق', - 'ﻗ' => 'ق', - 'ﻘ' => 'ق', - 'ﻙ' => 'ك', - 'ﻚ' => 'ك', - 'ﻛ' => 'ك', - 'ﻜ' => 'ك', - 'ﻝ' => 'ل', - 'ﻞ' => 'ل', - 'ﻟ' => 'ل', - 'ﻠ' => 'ل', - 'ﻡ' => 'م', - 'ﻢ' => 'م', - 'ﻣ' => 'م', - 'ﻤ' => 'م', - 'ﻥ' => 'ن', - 'ﻦ' => 'ن', - 'ﻧ' => 'ن', - 'ﻨ' => 'ن', - 'ﻩ' => 'ه', - 'ﻪ' => 'ه', - 'ﻫ' => 'ه', - 'ﻬ' => 'ه', - 'ﻭ' => 'و', - 'ﻮ' => 'و', - 'ﻯ' => 'ى', - 'ﻰ' => 'ى', - 'ﻱ' => 'ي', - 'ﻲ' => 'ي', - 'ﻳ' => 'ي', - 'ﻴ' => 'ي', - 'ﻵ' => 'لآ', - 'ﻶ' => 'لآ', - 'ﻷ' => 'لأ', - 'ﻸ' => 'لأ', - 'ﻹ' => 'لإ', - 'ﻺ' => 'لإ', - 'ﻻ' => 'لا', - 'ﻼ' => 'لا', - '!' => '!', - '"' => '"', - '#' => '#', - '$' => '$', - '%' => '%', - '&' => '&', - ''' => '\'', - '(' => '(', - ')' => ')', - '*' => '*', - '+' => '+', - ',' => ',', - '-' => '-', - '.' => '.', - '/' => '/', - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - '6' => '6', - '7' => '7', - '8' => '8', - '9' => '9', - ':' => ':', - ';' => ';', - '<' => '<', - '=' => '=', - '>' => '>', - '?' => '?', - '@' => '@', - 'A' => 'A', - 'B' => 'B', - 'C' => 'C', - 'D' => 'D', - 'E' => 'E', - 'F' => 'F', - 'G' => 'G', - 'H' => 'H', - 'I' => 'I', - 'J' => 'J', - 'K' => 'K', - 'L' => 'L', - 'M' => 'M', - 'N' => 'N', - 'O' => 'O', - 'P' => 'P', - 'Q' => 'Q', - 'R' => 'R', - 'S' => 'S', - 'T' => 'T', - 'U' => 'U', - 'V' => 'V', - 'W' => 'W', - 'X' => 'X', - 'Y' => 'Y', - 'Z' => 'Z', - '[' => '[', - '\' => '\\', - ']' => ']', - '^' => '^', - '_' => '_', - '`' => '`', - 'a' => 'a', - 'b' => 'b', - 'c' => 'c', - 'd' => 'd', - 'e' => 'e', - 'f' => 'f', - 'g' => 'g', - 'h' => 'h', - 'i' => 'i', - 'j' => 'j', - 'k' => 'k', - 'l' => 'l', - 'm' => 'm', - 'n' => 'n', - 'o' => 'o', - 'p' => 'p', - 'q' => 'q', - 'r' => 'r', - 's' => 's', - 't' => 't', - 'u' => 'u', - 'v' => 'v', - 'w' => 'w', - 'x' => 'x', - 'y' => 'y', - 'z' => 'z', - '{' => '{', - '|' => '|', - '}' => '}', - '~' => '~', - '⦅' => '⦅', - '⦆' => '⦆', - '。' => '。', - '「' => '「', - '」' => '」', - '、' => '、', - '・' => '・', - 'ヲ' => 'ヲ', - 'ァ' => 'ァ', - 'ィ' => 'ィ', - 'ゥ' => 'ゥ', - 'ェ' => 'ェ', - 'ォ' => 'ォ', - 'ャ' => 'ャ', - 'ュ' => 'ュ', - 'ョ' => 'ョ', - 'ッ' => 'ッ', - 'ー' => 'ー', - 'ア' => 'ア', - 'イ' => 'イ', - 'ウ' => 'ウ', - 'エ' => 'エ', - 'オ' => 'オ', - 'カ' => 'カ', - 'キ' => 'キ', - 'ク' => 'ク', - 'ケ' => 'ケ', - 'コ' => 'コ', - 'サ' => 'サ', - 'シ' => 'シ', - 'ス' => 'ス', - 'セ' => 'セ', - 'ソ' => 'ソ', - 'タ' => 'タ', - 'チ' => 'チ', - 'ツ' => 'ツ', - 'テ' => 'テ', - 'ト' => 'ト', - 'ナ' => 'ナ', - 'ニ' => 'ニ', - 'ヌ' => 'ヌ', - 'ネ' => 'ネ', - 'ノ' => 'ノ', - 'ハ' => 'ハ', - 'ヒ' => 'ヒ', - 'フ' => 'フ', - 'ヘ' => 'ヘ', - 'ホ' => 'ホ', - 'マ' => 'マ', - 'ミ' => 'ミ', - 'ム' => 'ム', - 'メ' => 'メ', - 'モ' => 'モ', - 'ヤ' => 'ヤ', - 'ユ' => 'ユ', - 'ヨ' => 'ヨ', - 'ラ' => 'ラ', - 'リ' => 'リ', - 'ル' => 'ル', - 'レ' => 'レ', - 'ロ' => 'ロ', - 'ワ' => 'ワ', - 'ン' => 'ン', - '゙' => '゙', - '゚' => '゚', - 'ᅠ' => 'ᅠ', - 'ᄀ' => 'ᄀ', - 'ᄁ' => 'ᄁ', - 'ᆪ' => 'ᆪ', - 'ᄂ' => 'ᄂ', - 'ᆬ' => 'ᆬ', - 'ᆭ' => 'ᆭ', - 'ᄃ' => 'ᄃ', - 'ᄄ' => 'ᄄ', - 'ᄅ' => 'ᄅ', - 'ᆰ' => 'ᆰ', - 'ᆱ' => 'ᆱ', - 'ᆲ' => 'ᆲ', - 'ᆳ' => 'ᆳ', - 'ᆴ' => 'ᆴ', - 'ᆵ' => 'ᆵ', - 'ᄚ' => 'ᄚ', - 'ᄆ' => 'ᄆ', - 'ᄇ' => 'ᄇ', - 'ᄈ' => 'ᄈ', - 'ᄡ' => 'ᄡ', - 'ᄉ' => 'ᄉ', - 'ᄊ' => 'ᄊ', - 'ᄋ' => 'ᄋ', - 'ᄌ' => 'ᄌ', - 'ᄍ' => 'ᄍ', - 'ᄎ' => 'ᄎ', - 'ᄏ' => 'ᄏ', - 'ᄐ' => 'ᄐ', - 'ᄑ' => 'ᄑ', - 'ᄒ' => 'ᄒ', - 'ᅡ' => 'ᅡ', - 'ᅢ' => 'ᅢ', - 'ᅣ' => 'ᅣ', - 'ᅤ' => 'ᅤ', - 'ᅥ' => 'ᅥ', - 'ᅦ' => 'ᅦ', - 'ᅧ' => 'ᅧ', - 'ᅨ' => 'ᅨ', - 'ᅩ' => 'ᅩ', - 'ᅪ' => 'ᅪ', - 'ᅫ' => 'ᅫ', - 'ᅬ' => 'ᅬ', - 'ᅭ' => 'ᅭ', - 'ᅮ' => 'ᅮ', - 'ᅯ' => 'ᅯ', - 'ᅰ' => 'ᅰ', - 'ᅱ' => 'ᅱ', - 'ᅲ' => 'ᅲ', - 'ᅳ' => 'ᅳ', - 'ᅴ' => 'ᅴ', - 'ᅵ' => 'ᅵ', - '¢' => '¢', - '£' => '£', - '¬' => '¬', - ' ̄' => ' ̄', - '¦' => '¦', - '¥' => '¥', - '₩' => '₩', - '│' => '│', - '←' => '←', - '↑' => '↑', - '→' => '→', - '↓' => '↓', - '■' => '■', - '○' => '○', - '𝐀' => 'A', - '𝐁' => 'B', - '𝐂' => 'C', - '𝐃' => 'D', - '𝐄' => 'E', - '𝐅' => 'F', - '𝐆' => 'G', - '𝐇' => 'H', - '𝐈' => 'I', - '𝐉' => 'J', - '𝐊' => 'K', - '𝐋' => 'L', - '𝐌' => 'M', - '𝐍' => 'N', - '𝐎' => 'O', - '𝐏' => 'P', - '𝐐' => 'Q', - '𝐑' => 'R', - '𝐒' => 'S', - '𝐓' => 'T', - '𝐔' => 'U', - '𝐕' => 'V', - '𝐖' => 'W', - '𝐗' => 'X', - '𝐘' => 'Y', - '𝐙' => 'Z', - '𝐚' => 'a', - '𝐛' => 'b', - '𝐜' => 'c', - '𝐝' => 'd', - '𝐞' => 'e', - '𝐟' => 'f', - '𝐠' => 'g', - '𝐡' => 'h', - '𝐢' => 'i', - '𝐣' => 'j', - '𝐤' => 'k', - '𝐥' => 'l', - '𝐦' => 'm', - '𝐧' => 'n', - '𝐨' => 'o', - '𝐩' => 'p', - '𝐪' => 'q', - '𝐫' => 'r', - '𝐬' => 's', - '𝐭' => 't', - '𝐮' => 'u', - '𝐯' => 'v', - '𝐰' => 'w', - '𝐱' => 'x', - '𝐲' => 'y', - '𝐳' => 'z', - '𝐴' => 'A', - '𝐵' => 'B', - '𝐶' => 'C', - '𝐷' => 'D', - '𝐸' => 'E', - '𝐹' => 'F', - '𝐺' => 'G', - '𝐻' => 'H', - '𝐼' => 'I', - '𝐽' => 'J', - '𝐾' => 'K', - '𝐿' => 'L', - '𝑀' => 'M', - '𝑁' => 'N', - '𝑂' => 'O', - '𝑃' => 'P', - '𝑄' => 'Q', - '𝑅' => 'R', - '𝑆' => 'S', - '𝑇' => 'T', - '𝑈' => 'U', - '𝑉' => 'V', - '𝑊' => 'W', - '𝑋' => 'X', - '𝑌' => 'Y', - '𝑍' => 'Z', - '𝑎' => 'a', - '𝑏' => 'b', - '𝑐' => 'c', - '𝑑' => 'd', - '𝑒' => 'e', - '𝑓' => 'f', - '𝑔' => 'g', - '𝑖' => 'i', - '𝑗' => 'j', - '𝑘' => 'k', - '𝑙' => 'l', - '𝑚' => 'm', - '𝑛' => 'n', - '𝑜' => 'o', - '𝑝' => 'p', - '𝑞' => 'q', - '𝑟' => 'r', - '𝑠' => 's', - '𝑡' => 't', - '𝑢' => 'u', - '𝑣' => 'v', - '𝑤' => 'w', - '𝑥' => 'x', - '𝑦' => 'y', - '𝑧' => 'z', - '𝑨' => 'A', - '𝑩' => 'B', - '𝑪' => 'C', - '𝑫' => 'D', - '𝑬' => 'E', - '𝑭' => 'F', - '𝑮' => 'G', - '𝑯' => 'H', - '𝑰' => 'I', - '𝑱' => 'J', - '𝑲' => 'K', - '𝑳' => 'L', - '𝑴' => 'M', - '𝑵' => 'N', - '𝑶' => 'O', - '𝑷' => 'P', - '𝑸' => 'Q', - '𝑹' => 'R', - '𝑺' => 'S', - '𝑻' => 'T', - '𝑼' => 'U', - '𝑽' => 'V', - '𝑾' => 'W', - '𝑿' => 'X', - '𝒀' => 'Y', - '𝒁' => 'Z', - '𝒂' => 'a', - '𝒃' => 'b', - '𝒄' => 'c', - '𝒅' => 'd', - '𝒆' => 'e', - '𝒇' => 'f', - '𝒈' => 'g', - '𝒉' => 'h', - '𝒊' => 'i', - '𝒋' => 'j', - '𝒌' => 'k', - '𝒍' => 'l', - '𝒎' => 'm', - '𝒏' => 'n', - '𝒐' => 'o', - '𝒑' => 'p', - '𝒒' => 'q', - '𝒓' => 'r', - '𝒔' => 's', - '𝒕' => 't', - '𝒖' => 'u', - '𝒗' => 'v', - '𝒘' => 'w', - '𝒙' => 'x', - '𝒚' => 'y', - '𝒛' => 'z', - '𝒜' => 'A', - '𝒞' => 'C', - '𝒟' => 'D', - '𝒢' => 'G', - '𝒥' => 'J', - '𝒦' => 'K', - '𝒩' => 'N', - '𝒪' => 'O', - '𝒫' => 'P', - '𝒬' => 'Q', - '𝒮' => 'S', - '𝒯' => 'T', - '𝒰' => 'U', - '𝒱' => 'V', - '𝒲' => 'W', - '𝒳' => 'X', - '𝒴' => 'Y', - '𝒵' => 'Z', - '𝒶' => 'a', - '𝒷' => 'b', - '𝒸' => 'c', - '𝒹' => 'd', - '𝒻' => 'f', - '𝒽' => 'h', - '𝒾' => 'i', - '𝒿' => 'j', - '𝓀' => 'k', - '𝓁' => 'l', - '𝓂' => 'm', - '𝓃' => 'n', - '𝓅' => 'p', - '𝓆' => 'q', - '𝓇' => 'r', - '𝓈' => 's', - '𝓉' => 't', - '𝓊' => 'u', - '𝓋' => 'v', - '𝓌' => 'w', - '𝓍' => 'x', - '𝓎' => 'y', - '𝓏' => 'z', - '𝓐' => 'A', - '𝓑' => 'B', - '𝓒' => 'C', - '𝓓' => 'D', - '𝓔' => 'E', - '𝓕' => 'F', - '𝓖' => 'G', - '𝓗' => 'H', - '𝓘' => 'I', - '𝓙' => 'J', - '𝓚' => 'K', - '𝓛' => 'L', - '𝓜' => 'M', - '𝓝' => 'N', - '𝓞' => 'O', - '𝓟' => 'P', - '𝓠' => 'Q', - '𝓡' => 'R', - '𝓢' => 'S', - '𝓣' => 'T', - '𝓤' => 'U', - '𝓥' => 'V', - '𝓦' => 'W', - '𝓧' => 'X', - '𝓨' => 'Y', - '𝓩' => 'Z', - '𝓪' => 'a', - '𝓫' => 'b', - '𝓬' => 'c', - '𝓭' => 'd', - '𝓮' => 'e', - '𝓯' => 'f', - '𝓰' => 'g', - '𝓱' => 'h', - '𝓲' => 'i', - '𝓳' => 'j', - '𝓴' => 'k', - '𝓵' => 'l', - '𝓶' => 'm', - '𝓷' => 'n', - '𝓸' => 'o', - '𝓹' => 'p', - '𝓺' => 'q', - '𝓻' => 'r', - '𝓼' => 's', - '𝓽' => 't', - '𝓾' => 'u', - '𝓿' => 'v', - '𝔀' => 'w', - '𝔁' => 'x', - '𝔂' => 'y', - '𝔃' => 'z', - '𝔄' => 'A', - '𝔅' => 'B', - '𝔇' => 'D', - '𝔈' => 'E', - '𝔉' => 'F', - '𝔊' => 'G', - '𝔍' => 'J', - '𝔎' => 'K', - '𝔏' => 'L', - '𝔐' => 'M', - '𝔑' => 'N', - '𝔒' => 'O', - '𝔓' => 'P', - '𝔔' => 'Q', - '𝔖' => 'S', - '𝔗' => 'T', - '𝔘' => 'U', - '𝔙' => 'V', - '𝔚' => 'W', - '𝔛' => 'X', - '𝔜' => 'Y', - '𝔞' => 'a', - '𝔟' => 'b', - '𝔠' => 'c', - '𝔡' => 'd', - '𝔢' => 'e', - '𝔣' => 'f', - '𝔤' => 'g', - '𝔥' => 'h', - '𝔦' => 'i', - '𝔧' => 'j', - '𝔨' => 'k', - '𝔩' => 'l', - '𝔪' => 'm', - '𝔫' => 'n', - '𝔬' => 'o', - '𝔭' => 'p', - '𝔮' => 'q', - '𝔯' => 'r', - '𝔰' => 's', - '𝔱' => 't', - '𝔲' => 'u', - '𝔳' => 'v', - '𝔴' => 'w', - '𝔵' => 'x', - '𝔶' => 'y', - '𝔷' => 'z', - '𝔸' => 'A', - '𝔹' => 'B', - '𝔻' => 'D', - '𝔼' => 'E', - '𝔽' => 'F', - '𝔾' => 'G', - '𝕀' => 'I', - '𝕁' => 'J', - '𝕂' => 'K', - '𝕃' => 'L', - '𝕄' => 'M', - '𝕆' => 'O', - '𝕊' => 'S', - '𝕋' => 'T', - '𝕌' => 'U', - '𝕍' => 'V', - '𝕎' => 'W', - '𝕏' => 'X', - '𝕐' => 'Y', - '𝕒' => 'a', - '𝕓' => 'b', - '𝕔' => 'c', - '𝕕' => 'd', - '𝕖' => 'e', - '𝕗' => 'f', - '𝕘' => 'g', - '𝕙' => 'h', - '𝕚' => 'i', - '𝕛' => 'j', - '𝕜' => 'k', - '𝕝' => 'l', - '𝕞' => 'm', - '𝕟' => 'n', - '𝕠' => 'o', - '𝕡' => 'p', - '𝕢' => 'q', - '𝕣' => 'r', - '𝕤' => 's', - '𝕥' => 't', - '𝕦' => 'u', - '𝕧' => 'v', - '𝕨' => 'w', - '𝕩' => 'x', - '𝕪' => 'y', - '𝕫' => 'z', - '𝕬' => 'A', - '𝕭' => 'B', - '𝕮' => 'C', - '𝕯' => 'D', - '𝕰' => 'E', - '𝕱' => 'F', - '𝕲' => 'G', - '𝕳' => 'H', - '𝕴' => 'I', - '𝕵' => 'J', - '𝕶' => 'K', - '𝕷' => 'L', - '𝕸' => 'M', - '𝕹' => 'N', - '𝕺' => 'O', - '𝕻' => 'P', - '𝕼' => 'Q', - '𝕽' => 'R', - '𝕾' => 'S', - '𝕿' => 'T', - '𝖀' => 'U', - '𝖁' => 'V', - '𝖂' => 'W', - '𝖃' => 'X', - '𝖄' => 'Y', - '𝖅' => 'Z', - '𝖆' => 'a', - '𝖇' => 'b', - '𝖈' => 'c', - '𝖉' => 'd', - '𝖊' => 'e', - '𝖋' => 'f', - '𝖌' => 'g', - '𝖍' => 'h', - '𝖎' => 'i', - '𝖏' => 'j', - '𝖐' => 'k', - '𝖑' => 'l', - '𝖒' => 'm', - '𝖓' => 'n', - '𝖔' => 'o', - '𝖕' => 'p', - '𝖖' => 'q', - '𝖗' => 'r', - '𝖘' => 's', - '𝖙' => 't', - '𝖚' => 'u', - '𝖛' => 'v', - '𝖜' => 'w', - '𝖝' => 'x', - '𝖞' => 'y', - '𝖟' => 'z', - '𝖠' => 'A', - '𝖡' => 'B', - '𝖢' => 'C', - '𝖣' => 'D', - '𝖤' => 'E', - '𝖥' => 'F', - '𝖦' => 'G', - '𝖧' => 'H', - '𝖨' => 'I', - '𝖩' => 'J', - '𝖪' => 'K', - '𝖫' => 'L', - '𝖬' => 'M', - '𝖭' => 'N', - '𝖮' => 'O', - '𝖯' => 'P', - '𝖰' => 'Q', - '𝖱' => 'R', - '𝖲' => 'S', - '𝖳' => 'T', - '𝖴' => 'U', - '𝖵' => 'V', - '𝖶' => 'W', - '𝖷' => 'X', - '𝖸' => 'Y', - '𝖹' => 'Z', - '𝖺' => 'a', - '𝖻' => 'b', - '𝖼' => 'c', - '𝖽' => 'd', - '𝖾' => 'e', - '𝖿' => 'f', - '𝗀' => 'g', - '𝗁' => 'h', - '𝗂' => 'i', - '𝗃' => 'j', - '𝗄' => 'k', - '𝗅' => 'l', - '𝗆' => 'm', - '𝗇' => 'n', - '𝗈' => 'o', - '𝗉' => 'p', - '𝗊' => 'q', - '𝗋' => 'r', - '𝗌' => 's', - '𝗍' => 't', - '𝗎' => 'u', - '𝗏' => 'v', - '𝗐' => 'w', - '𝗑' => 'x', - '𝗒' => 'y', - '𝗓' => 'z', - '𝗔' => 'A', - '𝗕' => 'B', - '𝗖' => 'C', - '𝗗' => 'D', - '𝗘' => 'E', - '𝗙' => 'F', - '𝗚' => 'G', - '𝗛' => 'H', - '𝗜' => 'I', - '𝗝' => 'J', - '𝗞' => 'K', - '𝗟' => 'L', - '𝗠' => 'M', - '𝗡' => 'N', - '𝗢' => 'O', - '𝗣' => 'P', - '𝗤' => 'Q', - '𝗥' => 'R', - '𝗦' => 'S', - '𝗧' => 'T', - '𝗨' => 'U', - '𝗩' => 'V', - '𝗪' => 'W', - '𝗫' => 'X', - '𝗬' => 'Y', - '𝗭' => 'Z', - '𝗮' => 'a', - '𝗯' => 'b', - '𝗰' => 'c', - '𝗱' => 'd', - '𝗲' => 'e', - '𝗳' => 'f', - '𝗴' => 'g', - '𝗵' => 'h', - '𝗶' => 'i', - '𝗷' => 'j', - '𝗸' => 'k', - '𝗹' => 'l', - '𝗺' => 'm', - '𝗻' => 'n', - '𝗼' => 'o', - '𝗽' => 'p', - '𝗾' => 'q', - '𝗿' => 'r', - '𝘀' => 's', - '𝘁' => 't', - '𝘂' => 'u', - '𝘃' => 'v', - '𝘄' => 'w', - '𝘅' => 'x', - '𝘆' => 'y', - '𝘇' => 'z', - '𝘈' => 'A', - '𝘉' => 'B', - '𝘊' => 'C', - '𝘋' => 'D', - '𝘌' => 'E', - '𝘍' => 'F', - '𝘎' => 'G', - '𝘏' => 'H', - '𝘐' => 'I', - '𝘑' => 'J', - '𝘒' => 'K', - '𝘓' => 'L', - '𝘔' => 'M', - '𝘕' => 'N', - '𝘖' => 'O', - '𝘗' => 'P', - '𝘘' => 'Q', - '𝘙' => 'R', - '𝘚' => 'S', - '𝘛' => 'T', - '𝘜' => 'U', - '𝘝' => 'V', - '𝘞' => 'W', - '𝘟' => 'X', - '𝘠' => 'Y', - '𝘡' => 'Z', - '𝘢' => 'a', - '𝘣' => 'b', - '𝘤' => 'c', - '𝘥' => 'd', - '𝘦' => 'e', - '𝘧' => 'f', - '𝘨' => 'g', - '𝘩' => 'h', - '𝘪' => 'i', - '𝘫' => 'j', - '𝘬' => 'k', - '𝘭' => 'l', - '𝘮' => 'm', - '𝘯' => 'n', - '𝘰' => 'o', - '𝘱' => 'p', - '𝘲' => 'q', - '𝘳' => 'r', - '𝘴' => 's', - '𝘵' => 't', - '𝘶' => 'u', - '𝘷' => 'v', - '𝘸' => 'w', - '𝘹' => 'x', - '𝘺' => 'y', - '𝘻' => 'z', - '𝘼' => 'A', - '𝘽' => 'B', - '𝘾' => 'C', - '𝘿' => 'D', - '𝙀' => 'E', - '𝙁' => 'F', - '𝙂' => 'G', - '𝙃' => 'H', - '𝙄' => 'I', - '𝙅' => 'J', - '𝙆' => 'K', - '𝙇' => 'L', - '𝙈' => 'M', - '𝙉' => 'N', - '𝙊' => 'O', - '𝙋' => 'P', - '𝙌' => 'Q', - '𝙍' => 'R', - '𝙎' => 'S', - '𝙏' => 'T', - '𝙐' => 'U', - '𝙑' => 'V', - '𝙒' => 'W', - '𝙓' => 'X', - '𝙔' => 'Y', - '𝙕' => 'Z', - '𝙖' => 'a', - '𝙗' => 'b', - '𝙘' => 'c', - '𝙙' => 'd', - '𝙚' => 'e', - '𝙛' => 'f', - '𝙜' => 'g', - '𝙝' => 'h', - '𝙞' => 'i', - '𝙟' => 'j', - '𝙠' => 'k', - '𝙡' => 'l', - '𝙢' => 'm', - '𝙣' => 'n', - '𝙤' => 'o', - '𝙥' => 'p', - '𝙦' => 'q', - '𝙧' => 'r', - '𝙨' => 's', - '𝙩' => 't', - '𝙪' => 'u', - '𝙫' => 'v', - '𝙬' => 'w', - '𝙭' => 'x', - '𝙮' => 'y', - '𝙯' => 'z', - '𝙰' => 'A', - '𝙱' => 'B', - '𝙲' => 'C', - '𝙳' => 'D', - '𝙴' => 'E', - '𝙵' => 'F', - '𝙶' => 'G', - '𝙷' => 'H', - '𝙸' => 'I', - '𝙹' => 'J', - '𝙺' => 'K', - '𝙻' => 'L', - '𝙼' => 'M', - '𝙽' => 'N', - '𝙾' => 'O', - '𝙿' => 'P', - '𝚀' => 'Q', - '𝚁' => 'R', - '𝚂' => 'S', - '𝚃' => 'T', - '𝚄' => 'U', - '𝚅' => 'V', - '𝚆' => 'W', - '𝚇' => 'X', - '𝚈' => 'Y', - '𝚉' => 'Z', - '𝚊' => 'a', - '𝚋' => 'b', - '𝚌' => 'c', - '𝚍' => 'd', - '𝚎' => 'e', - '𝚏' => 'f', - '𝚐' => 'g', - '𝚑' => 'h', - '𝚒' => 'i', - '𝚓' => 'j', - '𝚔' => 'k', - '𝚕' => 'l', - '𝚖' => 'm', - '𝚗' => 'n', - '𝚘' => 'o', - '𝚙' => 'p', - '𝚚' => 'q', - '𝚛' => 'r', - '𝚜' => 's', - '𝚝' => 't', - '𝚞' => 'u', - '𝚟' => 'v', - '𝚠' => 'w', - '𝚡' => 'x', - '𝚢' => 'y', - '𝚣' => 'z', - '𝚤' => 'ı', - '𝚥' => 'ȷ', - '𝚨' => 'Α', - '𝚩' => 'Β', - '𝚪' => 'Γ', - '𝚫' => 'Δ', - '𝚬' => 'Ε', - '𝚭' => 'Ζ', - '𝚮' => 'Η', - '𝚯' => 'Θ', - '𝚰' => 'Ι', - '𝚱' => 'Κ', - '𝚲' => 'Λ', - '𝚳' => 'Μ', - '𝚴' => 'Ν', - '𝚵' => 'Ξ', - '𝚶' => 'Ο', - '𝚷' => 'Π', - '𝚸' => 'Ρ', - '𝚹' => 'Θ', - '𝚺' => 'Σ', - '𝚻' => 'Τ', - '𝚼' => 'Υ', - '𝚽' => 'Φ', - '𝚾' => 'Χ', - '𝚿' => 'Ψ', - '𝛀' => 'Ω', - '𝛁' => '∇', - '𝛂' => 'α', - '𝛃' => 'β', - '𝛄' => 'γ', - '𝛅' => 'δ', - '𝛆' => 'ε', - '𝛇' => 'ζ', - '𝛈' => 'η', - '𝛉' => 'θ', - '𝛊' => 'ι', - '𝛋' => 'κ', - '𝛌' => 'λ', - '𝛍' => 'μ', - '𝛎' => 'ν', - '𝛏' => 'ξ', - '𝛐' => 'ο', - '𝛑' => 'π', - '𝛒' => 'ρ', - '𝛓' => 'ς', - '𝛔' => 'σ', - '𝛕' => 'τ', - '𝛖' => 'υ', - '𝛗' => 'φ', - '𝛘' => 'χ', - '𝛙' => 'ψ', - '𝛚' => 'ω', - '𝛛' => '∂', - '𝛜' => 'ε', - '𝛝' => 'θ', - '𝛞' => 'κ', - '𝛟' => 'φ', - '𝛠' => 'ρ', - '𝛡' => 'π', - '𝛢' => 'Α', - '𝛣' => 'Β', - '𝛤' => 'Γ', - '𝛥' => 'Δ', - '𝛦' => 'Ε', - '𝛧' => 'Ζ', - '𝛨' => 'Η', - '𝛩' => 'Θ', - '𝛪' => 'Ι', - '𝛫' => 'Κ', - '𝛬' => 'Λ', - '𝛭' => 'Μ', - '𝛮' => 'Ν', - '𝛯' => 'Ξ', - '𝛰' => 'Ο', - '𝛱' => 'Π', - '𝛲' => 'Ρ', - '𝛳' => 'Θ', - '𝛴' => 'Σ', - '𝛵' => 'Τ', - '𝛶' => 'Υ', - '𝛷' => 'Φ', - '𝛸' => 'Χ', - '𝛹' => 'Ψ', - '𝛺' => 'Ω', - '𝛻' => '∇', - '𝛼' => 'α', - '𝛽' => 'β', - '𝛾' => 'γ', - '𝛿' => 'δ', - '𝜀' => 'ε', - '𝜁' => 'ζ', - '𝜂' => 'η', - '𝜃' => 'θ', - '𝜄' => 'ι', - '𝜅' => 'κ', - '𝜆' => 'λ', - '𝜇' => 'μ', - '𝜈' => 'ν', - '𝜉' => 'ξ', - '𝜊' => 'ο', - '𝜋' => 'π', - '𝜌' => 'ρ', - '𝜍' => 'ς', - '𝜎' => 'σ', - '𝜏' => 'τ', - '𝜐' => 'υ', - '𝜑' => 'φ', - '𝜒' => 'χ', - '𝜓' => 'ψ', - '𝜔' => 'ω', - '𝜕' => '∂', - '𝜖' => 'ε', - '𝜗' => 'θ', - '𝜘' => 'κ', - '𝜙' => 'φ', - '𝜚' => 'ρ', - '𝜛' => 'π', - '𝜜' => 'Α', - '𝜝' => 'Β', - '𝜞' => 'Γ', - '𝜟' => 'Δ', - '𝜠' => 'Ε', - '𝜡' => 'Ζ', - '𝜢' => 'Η', - '𝜣' => 'Θ', - '𝜤' => 'Ι', - '𝜥' => 'Κ', - '𝜦' => 'Λ', - '𝜧' => 'Μ', - '𝜨' => 'Ν', - '𝜩' => 'Ξ', - '𝜪' => 'Ο', - '𝜫' => 'Π', - '𝜬' => 'Ρ', - '𝜭' => 'Θ', - '𝜮' => 'Σ', - '𝜯' => 'Τ', - '𝜰' => 'Υ', - '𝜱' => 'Φ', - '𝜲' => 'Χ', - '𝜳' => 'Ψ', - '𝜴' => 'Ω', - '𝜵' => '∇', - '𝜶' => 'α', - '𝜷' => 'β', - '𝜸' => 'γ', - '𝜹' => 'δ', - '𝜺' => 'ε', - '𝜻' => 'ζ', - '𝜼' => 'η', - '𝜽' => 'θ', - '𝜾' => 'ι', - '𝜿' => 'κ', - '𝝀' => 'λ', - '𝝁' => 'μ', - '𝝂' => 'ν', - '𝝃' => 'ξ', - '𝝄' => 'ο', - '𝝅' => 'π', - '𝝆' => 'ρ', - '𝝇' => 'ς', - '𝝈' => 'σ', - '𝝉' => 'τ', - '𝝊' => 'υ', - '𝝋' => 'φ', - '𝝌' => 'χ', - '𝝍' => 'ψ', - '𝝎' => 'ω', - '𝝏' => '∂', - '𝝐' => 'ε', - '𝝑' => 'θ', - '𝝒' => 'κ', - '𝝓' => 'φ', - '𝝔' => 'ρ', - '𝝕' => 'π', - '𝝖' => 'Α', - '𝝗' => 'Β', - '𝝘' => 'Γ', - '𝝙' => 'Δ', - '𝝚' => 'Ε', - '𝝛' => 'Ζ', - '𝝜' => 'Η', - '𝝝' => 'Θ', - '𝝞' => 'Ι', - '𝝟' => 'Κ', - '𝝠' => 'Λ', - '𝝡' => 'Μ', - '𝝢' => 'Ν', - '𝝣' => 'Ξ', - '𝝤' => 'Ο', - '𝝥' => 'Π', - '𝝦' => 'Ρ', - '𝝧' => 'Θ', - '𝝨' => 'Σ', - '𝝩' => 'Τ', - '𝝪' => 'Υ', - '𝝫' => 'Φ', - '𝝬' => 'Χ', - '𝝭' => 'Ψ', - '𝝮' => 'Ω', - '𝝯' => '∇', - '𝝰' => 'α', - '𝝱' => 'β', - '𝝲' => 'γ', - '𝝳' => 'δ', - '𝝴' => 'ε', - '𝝵' => 'ζ', - '𝝶' => 'η', - '𝝷' => 'θ', - '𝝸' => 'ι', - '𝝹' => 'κ', - '𝝺' => 'λ', - '𝝻' => 'μ', - '𝝼' => 'ν', - '𝝽' => 'ξ', - '𝝾' => 'ο', - '𝝿' => 'π', - '𝞀' => 'ρ', - '𝞁' => 'ς', - '𝞂' => 'σ', - '𝞃' => 'τ', - '𝞄' => 'υ', - '𝞅' => 'φ', - '𝞆' => 'χ', - '𝞇' => 'ψ', - '𝞈' => 'ω', - '𝞉' => '∂', - '𝞊' => 'ε', - '𝞋' => 'θ', - '𝞌' => 'κ', - '𝞍' => 'φ', - '𝞎' => 'ρ', - '𝞏' => 'π', - '𝞐' => 'Α', - '𝞑' => 'Β', - '𝞒' => 'Γ', - '𝞓' => 'Δ', - '𝞔' => 'Ε', - '𝞕' => 'Ζ', - '𝞖' => 'Η', - '𝞗' => 'Θ', - '𝞘' => 'Ι', - '𝞙' => 'Κ', - '𝞚' => 'Λ', - '𝞛' => 'Μ', - '𝞜' => 'Ν', - '𝞝' => 'Ξ', - '𝞞' => 'Ο', - '𝞟' => 'Π', - '𝞠' => 'Ρ', - '𝞡' => 'Θ', - '𝞢' => 'Σ', - '𝞣' => 'Τ', - '𝞤' => 'Υ', - '𝞥' => 'Φ', - '𝞦' => 'Χ', - '𝞧' => 'Ψ', - '𝞨' => 'Ω', - '𝞩' => '∇', - '𝞪' => 'α', - '𝞫' => 'β', - '𝞬' => 'γ', - '𝞭' => 'δ', - '𝞮' => 'ε', - '𝞯' => 'ζ', - '𝞰' => 'η', - '𝞱' => 'θ', - '𝞲' => 'ι', - '𝞳' => 'κ', - '𝞴' => 'λ', - '𝞵' => 'μ', - '𝞶' => 'ν', - '𝞷' => 'ξ', - '𝞸' => 'ο', - '𝞹' => 'π', - '𝞺' => 'ρ', - '𝞻' => 'ς', - '𝞼' => 'σ', - '𝞽' => 'τ', - '𝞾' => 'υ', - '𝞿' => 'φ', - '𝟀' => 'χ', - '𝟁' => 'ψ', - '𝟂' => 'ω', - '𝟃' => '∂', - '𝟄' => 'ε', - '𝟅' => 'θ', - '𝟆' => 'κ', - '𝟇' => 'φ', - '𝟈' => 'ρ', - '𝟉' => 'π', - '𝟊' => 'Ϝ', - '𝟋' => 'ϝ', - '𝟎' => '0', - '𝟏' => '1', - '𝟐' => '2', - '𝟑' => '3', - '𝟒' => '4', - '𝟓' => '5', - '𝟔' => '6', - '𝟕' => '7', - '𝟖' => '8', - '𝟗' => '9', - '𝟘' => '0', - '𝟙' => '1', - '𝟚' => '2', - '𝟛' => '3', - '𝟜' => '4', - '𝟝' => '5', - '𝟞' => '6', - '𝟟' => '7', - '𝟠' => '8', - '𝟡' => '9', - '𝟢' => '0', - '𝟣' => '1', - '𝟤' => '2', - '𝟥' => '3', - '𝟦' => '4', - '𝟧' => '5', - '𝟨' => '6', - '𝟩' => '7', - '𝟪' => '8', - '𝟫' => '9', - '𝟬' => '0', - '𝟭' => '1', - '𝟮' => '2', - '𝟯' => '3', - '𝟰' => '4', - '𝟱' => '5', - '𝟲' => '6', - '𝟳' => '7', - '𝟴' => '8', - '𝟵' => '9', - '𝟶' => '0', - '𝟷' => '1', - '𝟸' => '2', - '𝟹' => '3', - '𝟺' => '4', - '𝟻' => '5', - '𝟼' => '6', - '𝟽' => '7', - '𝟾' => '8', - '𝟿' => '9', - '𞸀' => 'ا', - '𞸁' => 'ب', - '𞸂' => 'ج', - '𞸃' => 'د', - '𞸅' => 'و', - '𞸆' => 'ز', - '𞸇' => 'ح', - '𞸈' => 'ط', - '𞸉' => 'ي', - '𞸊' => 'ك', - '𞸋' => 'ل', - '𞸌' => 'م', - '𞸍' => 'ن', - '𞸎' => 'س', - '𞸏' => 'ع', - '𞸐' => 'ف', - '𞸑' => 'ص', - '𞸒' => 'ق', - '𞸓' => 'ر', - '𞸔' => 'ش', - '𞸕' => 'ت', - '𞸖' => 'ث', - '𞸗' => 'خ', - '𞸘' => 'ذ', - '𞸙' => 'ض', - '𞸚' => 'ظ', - '𞸛' => 'غ', - '𞸜' => 'ٮ', - '𞸝' => 'ں', - '𞸞' => 'ڡ', - '𞸟' => 'ٯ', - '𞸡' => 'ب', - '𞸢' => 'ج', - '𞸤' => 'ه', - '𞸧' => 'ح', - '𞸩' => 'ي', - '𞸪' => 'ك', - '𞸫' => 'ل', - '𞸬' => 'م', - '𞸭' => 'ن', - '𞸮' => 'س', - '𞸯' => 'ع', - '𞸰' => 'ف', - '𞸱' => 'ص', - '𞸲' => 'ق', - '𞸴' => 'ش', - '𞸵' => 'ت', - '𞸶' => 'ث', - '𞸷' => 'خ', - '𞸹' => 'ض', - '𞸻' => 'غ', - '𞹂' => 'ج', - '𞹇' => 'ح', - '𞹉' => 'ي', - '𞹋' => 'ل', - '𞹍' => 'ن', - '𞹎' => 'س', - '𞹏' => 'ع', - '𞹑' => 'ص', - '𞹒' => 'ق', - '𞹔' => 'ش', - '𞹗' => 'خ', - '𞹙' => 'ض', - '𞹛' => 'غ', - '𞹝' => 'ں', - '𞹟' => 'ٯ', - '𞹡' => 'ب', - '𞹢' => 'ج', - '𞹤' => 'ه', - '𞹧' => 'ح', - '𞹨' => 'ط', - '𞹩' => 'ي', - '𞹪' => 'ك', - '𞹬' => 'م', - '𞹭' => 'ن', - '𞹮' => 'س', - '𞹯' => 'ع', - '𞹰' => 'ف', - '𞹱' => 'ص', - '𞹲' => 'ق', - '𞹴' => 'ش', - '𞹵' => 'ت', - '𞹶' => 'ث', - '𞹷' => 'خ', - '𞹹' => 'ض', - '𞹺' => 'ظ', - '𞹻' => 'غ', - '𞹼' => 'ٮ', - '𞹾' => 'ڡ', - '𞺀' => 'ا', - '𞺁' => 'ب', - '𞺂' => 'ج', - '𞺃' => 'د', - '𞺄' => 'ه', - '𞺅' => 'و', - '𞺆' => 'ز', - '𞺇' => 'ح', - '𞺈' => 'ط', - '𞺉' => 'ي', - '𞺋' => 'ل', - '𞺌' => 'م', - '𞺍' => 'ن', - '𞺎' => 'س', - '𞺏' => 'ع', - '𞺐' => 'ف', - '𞺑' => 'ص', - '𞺒' => 'ق', - '𞺓' => 'ر', - '𞺔' => 'ش', - '𞺕' => 'ت', - '𞺖' => 'ث', - '𞺗' => 'خ', - '𞺘' => 'ذ', - '𞺙' => 'ض', - '𞺚' => 'ظ', - '𞺛' => 'غ', - '𞺡' => 'ب', - '𞺢' => 'ج', - '𞺣' => 'د', - '𞺥' => 'و', - '𞺦' => 'ز', - '𞺧' => 'ح', - '𞺨' => 'ط', - '𞺩' => 'ي', - '𞺫' => 'ل', - '𞺬' => 'م', - '𞺭' => 'ن', - '𞺮' => 'س', - '𞺯' => 'ع', - '𞺰' => 'ف', - '𞺱' => 'ص', - '𞺲' => 'ق', - '𞺳' => 'ر', - '𞺴' => 'ش', - '𞺵' => 'ت', - '𞺶' => 'ث', - '𞺷' => 'خ', - '𞺸' => 'ذ', - '𞺹' => 'ض', - '𞺺' => 'ظ', - '𞺻' => 'غ', - '🄀' => '0.', - '🄁' => '0,', - '🄂' => '1,', - '🄃' => '2,', - '🄄' => '3,', - '🄅' => '4,', - '🄆' => '5,', - '🄇' => '6,', - '🄈' => '7,', - '🄉' => '8,', - '🄊' => '9,', - '🄐' => '(A)', - '🄑' => '(B)', - '🄒' => '(C)', - '🄓' => '(D)', - '🄔' => '(E)', - '🄕' => '(F)', - '🄖' => '(G)', - '🄗' => '(H)', - '🄘' => '(I)', - '🄙' => '(J)', - '🄚' => '(K)', - '🄛' => '(L)', - '🄜' => '(M)', - '🄝' => '(N)', - '🄞' => '(O)', - '🄟' => '(P)', - '🄠' => '(Q)', - '🄡' => '(R)', - '🄢' => '(S)', - '🄣' => '(T)', - '🄤' => '(U)', - '🄥' => '(V)', - '🄦' => '(W)', - '🄧' => '(X)', - '🄨' => '(Y)', - '🄩' => '(Z)', - '🄪' => '〔S〕', - '🄫' => 'C', - '🄬' => 'R', - '🄭' => 'CD', - '🄮' => 'WZ', - '🄰' => 'A', - '🄱' => 'B', - '🄲' => 'C', - '🄳' => 'D', - '🄴' => 'E', - '🄵' => 'F', - '🄶' => 'G', - '🄷' => 'H', - '🄸' => 'I', - '🄹' => 'J', - '🄺' => 'K', - '🄻' => 'L', - '🄼' => 'M', - '🄽' => 'N', - '🄾' => 'O', - '🄿' => 'P', - '🅀' => 'Q', - '🅁' => 'R', - '🅂' => 'S', - '🅃' => 'T', - '🅄' => 'U', - '🅅' => 'V', - '🅆' => 'W', - '🅇' => 'X', - '🅈' => 'Y', - '🅉' => 'Z', - '🅊' => 'HV', - '🅋' => 'MV', - '🅌' => 'SD', - '🅍' => 'SS', - '🅎' => 'PPV', - '🅏' => 'WC', - '🅪' => 'MC', - '🅫' => 'MD', - '🅬' => 'MR', - '🆐' => 'DJ', - '🈀' => 'ほか', - '🈁' => 'ココ', - '🈂' => 'サ', - '🈐' => '手', - '🈑' => '字', - '🈒' => '双', - '🈓' => 'デ', - '🈔' => '二', - '🈕' => '多', - '🈖' => '解', - '🈗' => '天', - '🈘' => '交', - '🈙' => '映', - '🈚' => '無', - '🈛' => '料', - '🈜' => '前', - '🈝' => '後', - '🈞' => '再', - '🈟' => '新', - '🈠' => '初', - '🈡' => '終', - '🈢' => '生', - '🈣' => '販', - '🈤' => '声', - '🈥' => '吹', - '🈦' => '演', - '🈧' => '投', - '🈨' => '捕', - '🈩' => '一', - '🈪' => '三', - '🈫' => '遊', - '🈬' => '左', - '🈭' => '中', - '🈮' => '右', - '🈯' => '指', - '🈰' => '走', - '🈱' => '打', - '🈲' => '禁', - '🈳' => '空', - '🈴' => '合', - '🈵' => '満', - '🈶' => '有', - '🈷' => '月', - '🈸' => '申', - '🈹' => '割', - '🈺' => '営', - '🈻' => '配', - '🉀' => '〔本〕', - '🉁' => '〔三〕', - '🉂' => '〔二〕', - '🉃' => '〔安〕', - '🉄' => '〔点〕', - '🉅' => '〔打〕', - '🉆' => '〔盗〕', - '🉇' => '〔勝〕', - '🉈' => '〔敗〕', - '🉐' => '得', - '🉑' => '可', - '🯰' => '0', - '🯱' => '1', - '🯲' => '2', - '🯳' => '3', - '🯴' => '4', - '🯵' => '5', - '🯶' => '6', - '🯷' => '7', - '🯸' => '8', - '🯹' => '9', -); diff --git a/lib/symfony/polyfill-intl-normalizer/bootstrap.php b/lib/symfony/polyfill-intl-normalizer/bootstrap.php deleted file mode 100644 index 3608e5c05..000000000 --- a/lib/symfony/polyfill-intl-normalizer/bootstrap.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Normalizer as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('normalizer_is_normalized')) { - function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); } -} -if (!function_exists('normalizer_normalize')) { - function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); } -} diff --git a/lib/symfony/polyfill-intl-normalizer/bootstrap80.php b/lib/symfony/polyfill-intl-normalizer/bootstrap80.php deleted file mode 100644 index e36d1a947..000000000 --- a/lib/symfony/polyfill-intl-normalizer/bootstrap80.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Normalizer as p; - -if (!function_exists('normalizer_is_normalized')) { - function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); } -} -if (!function_exists('normalizer_normalize')) { - function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); } -} diff --git a/lib/symfony/polyfill-intl-normalizer/composer.json b/lib/symfony/polyfill-intl-normalizer/composer.json deleted file mode 100644 index eb452bfd4..000000000 --- a/lib/symfony/polyfill-intl-normalizer/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "symfony/polyfill-intl-normalizer", - "type": "library", - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "normalizer"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "suggest": { - "ext-intl": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-mbstring/LICENSE b/lib/symfony/polyfill-mbstring/LICENSE deleted file mode 100644 index 4cd8bdd30..000000000 --- a/lib/symfony/polyfill-mbstring/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-mbstring/Mbstring.php b/lib/symfony/polyfill-mbstring/Mbstring.php deleted file mode 100644 index 693749f22..000000000 --- a/lib/symfony/polyfill-mbstring/Mbstring.php +++ /dev/null @@ -1,873 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Mbstring; - -/** - * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. - * - * Implemented: - * - mb_chr - Returns a specific character from its Unicode code point - * - mb_convert_encoding - Convert character encoding - * - mb_convert_variables - Convert character code in variable(s) - * - mb_decode_mimeheader - Decode string in MIME header field - * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED - * - mb_decode_numericentity - Decode HTML numeric string reference to character - * - mb_encode_numericentity - Encode character to HTML numeric string reference - * - mb_convert_case - Perform case folding on a string - * - mb_detect_encoding - Detect character encoding - * - mb_get_info - Get internal settings of mbstring - * - mb_http_input - Detect HTTP input character encoding - * - mb_http_output - Set/Get HTTP output character encoding - * - mb_internal_encoding - Set/Get internal character encoding - * - mb_list_encodings - Returns an array of all supported encodings - * - mb_ord - Returns the Unicode code point of a character - * - mb_output_handler - Callback function converts character encoding in output buffer - * - mb_scrub - Replaces ill-formed byte sequences with substitute characters - * - mb_strlen - Get string length - * - mb_strpos - Find position of first occurrence of string in a string - * - mb_strrpos - Find position of last occurrence of a string in a string - * - mb_str_split - Convert a string to an array - * - mb_strtolower - Make a string lowercase - * - mb_strtoupper - Make a string uppercase - * - mb_substitute_character - Set/Get substitution character - * - mb_substr - Get part of string - * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive - * - mb_stristr - Finds first occurrence of a string within another, case insensitive - * - mb_strrchr - Finds the last occurrence of a character in a string within another - * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive - * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive - * - mb_strstr - Finds first occurrence of a string within another - * - mb_strwidth - Return width of string - * - mb_substr_count - Count the number of substring occurrences - * - * Not implemented: - * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) - * - mb_ereg_* - Regular expression with multibyte support - * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable - * - mb_preferred_mime_name - Get MIME charset string - * - mb_regex_encoding - Returns current encoding for multibyte regex as string - * - mb_regex_set_options - Set/Get the default options for mbregex functions - * - mb_send_mail - Send encoded mail - * - mb_split - Split multibyte string using regular expression - * - mb_strcut - Get part of string - * - mb_strimwidth - Get truncated string with specified width - * - * @author Nicolas Grekas - * - * @internal - */ -final class Mbstring -{ - public const MB_CASE_FOLD = \PHP_INT_MAX; - - private const CASE_FOLD = [ - ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], - ]; - - private static $encodingList = ['ASCII', 'UTF-8']; - private static $language = 'neutral'; - private static $internalEncoding = 'UTF-8'; - - public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) - { - if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) { - $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); - } else { - $fromEncoding = self::getEncoding($fromEncoding); - } - - $toEncoding = self::getEncoding($toEncoding); - - if ('BASE64' === $fromEncoding) { - $s = base64_decode($s); - $fromEncoding = $toEncoding; - } - - if ('BASE64' === $toEncoding) { - return base64_encode($s); - } - - if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { - if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { - $fromEncoding = 'Windows-1252'; - } - if ('UTF-8' !== $fromEncoding) { - $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s); - } - - return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); - } - - if ('HTML-ENTITIES' === $fromEncoding) { - $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); - $fromEncoding = 'UTF-8'; - } - - return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s); - } - - public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) - { - $ok = true; - array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { - if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { - $ok = false; - } - }); - - return $ok ? $fromEncoding : false; - } - - public static function mb_decode_mimeheader($s) - { - return \iconv_mime_decode($s, 2, self::$internalEncoding); - } - - public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) - { - trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); - } - - public static function mb_decode_numericentity($s, $convmap, $encoding = null) - { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !is_scalar($encoding)) { - trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return ''; // Instead of null (cf. mb_encode_numericentity). - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $cnt = floor(\count($convmap) / 4) * 4; - - for ($i = 0; $i < $cnt; $i += 4) { - // collector_decode_htmlnumericentity ignores $convmap[$i + 3] - $convmap[$i] += $convmap[$i + 2]; - $convmap[$i + 1] += $convmap[$i + 2]; - } - - $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { - $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; - for ($i = 0; $i < $cnt; $i += 4) { - if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { - return self::mb_chr($c - $convmap[$i + 2]); - } - } - - return $m[0]; - }, $s); - - if (null === $encoding) { - return $s; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) - { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !is_scalar($encoding)) { - trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; // Instead of '' (cf. mb_decode_numericentity). - } - - if (null !== $is_hex && !is_scalar($is_hex)) { - trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $cnt = floor(\count($convmap) / 4) * 4; - $i = 0; - $len = \strlen($s); - $result = ''; - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - $c = self::mb_ord($uchr); - - for ($j = 0; $j < $cnt; $j += 4) { - if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { - $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; - $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; - continue 2; - } - } - $result .= $uchr; - } - - if (null === $encoding) { - return $result; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $result); - } - - public static function mb_convert_case($s, $mode, $encoding = null) - { - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - if (\MB_CASE_TITLE == $mode) { - static $titleRegexp = null; - if (null === $titleRegexp) { - $titleRegexp = self::getData('titleCaseRegexp'); - } - $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); - } else { - if (\MB_CASE_UPPER == $mode) { - static $upper = null; - if (null === $upper) { - $upper = self::getData('upperCase'); - } - $map = $upper; - } else { - if (self::MB_CASE_FOLD === $mode) { - $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); - } - - static $lower = null; - if (null === $lower) { - $lower = self::getData('lowerCase'); - } - $map = $lower; - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $i = 0; - $len = \strlen($s); - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if (isset($map[$uchr])) { - $uchr = $map[$uchr]; - $nlen = \strlen($uchr); - - if ($nlen == $ulen) { - $nlen = $i; - do { - $s[--$nlen] = $uchr[--$ulen]; - } while ($ulen); - } else { - $s = substr_replace($s, $uchr, $i - $ulen, $ulen); - $len += $nlen - $ulen; - $i += $nlen - $ulen; - } - } - } - } - - if (null === $encoding) { - return $s; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_internal_encoding($encoding = null) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - $normalizedEncoding = self::getEncoding($encoding); - - if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) { - self::$internalEncoding = $normalizedEncoding; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); - } - - public static function mb_language($lang = null) - { - if (null === $lang) { - return self::$language; - } - - switch ($normalizedLang = strtolower($lang)) { - case 'uni': - case 'neutral': - self::$language = $normalizedLang; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); - } - - public static function mb_list_encodings() - { - return ['UTF-8']; - } - - public static function mb_encoding_aliases($encoding) - { - switch (strtoupper($encoding)) { - case 'UTF8': - case 'UTF-8': - return ['utf8']; - } - - return false; - } - - public static function mb_check_encoding($var = null, $encoding = null) - { - if (null === $encoding) { - if (null === $var) { - return false; - } - $encoding = self::$internalEncoding; - } - - return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var); - } - - public static function mb_detect_encoding($str, $encodingList = null, $strict = false) - { - if (null === $encodingList) { - $encodingList = self::$encodingList; - } else { - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - } - - foreach ($encodingList as $enc) { - switch ($enc) { - case 'ASCII': - if (!preg_match('/[\x80-\xFF]/', $str)) { - return $enc; - } - break; - - case 'UTF8': - case 'UTF-8': - if (preg_match('//u', $str)) { - return 'UTF-8'; - } - break; - - default: - if (0 === strncmp($enc, 'ISO-8859-', 9)) { - return $enc; - } - } - } - - return false; - } - - public static function mb_detect_order($encodingList = null) - { - if (null === $encodingList) { - return self::$encodingList; - } - - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - - foreach ($encodingList as $enc) { - switch ($enc) { - default: - if (strncmp($enc, 'ISO-8859-', 9)) { - return false; - } - // no break - case 'ASCII': - case 'UTF8': - case 'UTF-8': - } - } - - self::$encodingList = $encodingList; - - return true; - } - - public static function mb_strlen($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return \strlen($s); - } - - return @\iconv_strlen($s, $encoding); - } - - public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strpos($haystack, $needle, $offset); - } - - $needle = (string) $needle; - if ('' === $needle) { - if (80000 > \PHP_VERSION_ID) { - trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); - - return false; - } - - return 0; - } - - return \iconv_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strrpos($haystack, $needle, $offset); - } - - if ($offset != (int) $offset) { - $offset = 0; - } elseif ($offset = (int) $offset) { - if ($offset < 0) { - if (0 > $offset += self::mb_strlen($needle)) { - $haystack = self::mb_substr($haystack, 0, $offset, $encoding); - } - $offset = 0; - } else { - $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); - } - } - - $pos = '' !== $needle || 80000 > \PHP_VERSION_ID - ? \iconv_strrpos($haystack, $needle, $encoding) - : self::mb_strlen($haystack, $encoding); - - return false !== $pos ? $offset + $pos : false; - } - - public static function mb_str_split($string, $split_length = 1, $encoding = null) - { - if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { - trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); - - return null; - } - - if (1 > $split_length = (int) $split_length) { - if (80000 > \PHP_VERSION_ID) { - trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); - return false; - } - - throw new \ValueError('Argument #2 ($length) must be greater than 0'); - } - - if (null === $encoding) { - $encoding = mb_internal_encoding(); - } - - if ('UTF-8' === $encoding = self::getEncoding($encoding)) { - $rx = '/('; - while (65535 < $split_length) { - $rx .= '.{65535}'; - $split_length -= 65535; - } - $rx .= '.{'.$split_length.'})/us'; - - return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); - } - - $result = []; - $length = mb_strlen($string, $encoding); - - for ($i = 0; $i < $length; $i += $split_length) { - $result[] = mb_substr($string, $i, $split_length, $encoding); - } - - return $result; - } - - public static function mb_strtolower($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); - } - - public static function mb_strtoupper($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); - } - - public static function mb_substitute_character($c = null) - { - if (null === $c) { - return 'none'; - } - if (0 === strcasecmp($c, 'none')) { - return true; - } - if (80000 > \PHP_VERSION_ID) { - return false; - } - if (\is_int($c) || 'long' === $c || 'entity' === $c) { - return false; - } - - throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); - } - - public static function mb_substr($s, $start, $length = null, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return (string) substr($s, $start, null === $length ? 2147483647 : $length); - } - - if ($start < 0) { - $start = \iconv_strlen($s, $encoding) + $start; - if ($start < 0) { - $start = 0; - } - } - - if (null === $length) { - $length = 2147483647; - } elseif ($length < 0) { - $length = \iconv_strlen($s, $encoding) + $length - $start; - if ($length < 0) { - return ''; - } - } - - return (string) \iconv_substr($s, $start, $length, $encoding); - } - - public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) - { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - - return self::mb_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) - { - $pos = self::mb_stripos($haystack, $needle, 0, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - $pos = strrpos($haystack, $needle); - } else { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = \iconv_strrpos($haystack, $needle, $encoding); - } - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) - { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = self::mb_strripos($haystack, $needle, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) - { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - - return self::mb_strrpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) - { - $pos = strpos($haystack, $needle); - if (false === $pos) { - return false; - } - if ($part) { - return substr($haystack, 0, $pos); - } - - return substr($haystack, $pos); - } - - public static function mb_get_info($type = 'all') - { - $info = [ - 'internal_encoding' => self::$internalEncoding, - 'http_output' => 'pass', - 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', - 'func_overload' => 0, - 'func_overload_list' => 'no overload', - 'mail_charset' => 'UTF-8', - 'mail_header_encoding' => 'BASE64', - 'mail_body_encoding' => 'BASE64', - 'illegal_chars' => 0, - 'encoding_translation' => 'Off', - 'language' => self::$language, - 'detect_order' => self::$encodingList, - 'substitute_character' => 'none', - 'strict_detection' => 'Off', - ]; - - if ('all' === $type) { - return $info; - } - if (isset($info[$type])) { - return $info[$type]; - } - - return false; - } - - public static function mb_http_input($type = '') - { - return false; - } - - public static function mb_http_output($encoding = null) - { - return null !== $encoding ? 'pass' === $encoding : 'pass'; - } - - public static function mb_strwidth($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - - if ('UTF-8' !== $encoding) { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); - - return ($wide << 1) + \iconv_strlen($s, 'UTF-8'); - } - - public static function mb_substr_count($haystack, $needle, $encoding = null) - { - return substr_count($haystack, $needle); - } - - public static function mb_output_handler($contents, $status) - { - return $contents; - } - - public static function mb_chr($code, $encoding = null) - { - if (0x80 > $code %= 0x200000) { - $s = \chr($code); - } elseif (0x800 > $code) { - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, $encoding, 'UTF-8'); - } - - return $s; - } - - public static function mb_ord($s, $encoding = null) - { - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, 'UTF-8', $encoding); - } - - if (1 === \strlen($s)) { - return \ord($s); - } - - $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $s[2] - 0x80; - } - - return $code; - } - - private static function getSubpart($pos, $part, $haystack, $encoding) - { - if (false === $pos) { - return false; - } - if ($part) { - return self::mb_substr($haystack, 0, $pos, $encoding); - } - - return self::mb_substr($haystack, $pos, null, $encoding); - } - - private static function html_encoding_callback(array $m) - { - $i = 1; - $entities = ''; - $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); - - while (isset($m[$i])) { - if (0x80 > $m[$i]) { - $entities .= \chr($m[$i++]); - continue; - } - if (0xF0 <= $m[$i]) { - $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } elseif (0xE0 <= $m[$i]) { - $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } else { - $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; - } - - $entities .= '&#'.$c.';'; - } - - return $entities; - } - - private static function title_case(array $s) - { - return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { - return require $file; - } - - return false; - } - - private static function getEncoding($encoding) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - if ('UTF-8' === $encoding) { - return 'UTF-8'; - } - - $encoding = strtoupper($encoding); - - if ('8BIT' === $encoding || 'BINARY' === $encoding) { - return 'CP850'; - } - - if ('UTF8' === $encoding) { - return 'UTF-8'; - } - - return $encoding; - } -} diff --git a/lib/symfony/polyfill-mbstring/README.md b/lib/symfony/polyfill-mbstring/README.md deleted file mode 100644 index 478b40da2..000000000 --- a/lib/symfony/polyfill-mbstring/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Symfony Polyfill / Mbstring -=========================== - -This component provides a partial, native PHP implementation for the -[Mbstring](https://php.net/mbstring) extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/lib/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php deleted file mode 100644 index fac60b081..000000000 --- a/lib/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +++ /dev/null @@ -1,1397 +0,0 @@ - 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - 'À' => 'à', - 'Á' => 'á', - 'Â' => 'â', - 'Ã' => 'ã', - 'Ä' => 'ä', - 'Å' => 'å', - 'Æ' => 'æ', - 'Ç' => 'ç', - 'È' => 'è', - 'É' => 'é', - 'Ê' => 'ê', - 'Ë' => 'ë', - 'Ì' => 'ì', - 'Í' => 'í', - 'Î' => 'î', - 'Ï' => 'ï', - 'Ð' => 'ð', - 'Ñ' => 'ñ', - 'Ò' => 'ò', - 'Ó' => 'ó', - 'Ô' => 'ô', - 'Õ' => 'õ', - 'Ö' => 'ö', - 'Ø' => 'ø', - 'Ù' => 'ù', - 'Ú' => 'ú', - 'Û' => 'û', - 'Ü' => 'ü', - 'Ý' => 'ý', - 'Þ' => 'þ', - 'Ā' => 'ā', - 'Ă' => 'ă', - 'Ą' => 'ą', - 'Ć' => 'ć', - 'Ĉ' => 'ĉ', - 'Ċ' => 'ċ', - 'Č' => 'č', - 'Ď' => 'ď', - 'Đ' => 'đ', - 'Ē' => 'ē', - 'Ĕ' => 'ĕ', - 'Ė' => 'ė', - 'Ę' => 'ę', - 'Ě' => 'ě', - 'Ĝ' => 'ĝ', - 'Ğ' => 'ğ', - 'Ġ' => 'ġ', - 'Ģ' => 'ģ', - 'Ĥ' => 'ĥ', - 'Ħ' => 'ħ', - 'Ĩ' => 'ĩ', - 'Ī' => 'ī', - 'Ĭ' => 'ĭ', - 'Į' => 'į', - 'İ' => 'i̇', - 'IJ' => 'ij', - 'Ĵ' => 'ĵ', - 'Ķ' => 'ķ', - 'Ĺ' => 'ĺ', - 'Ļ' => 'ļ', - 'Ľ' => 'ľ', - 'Ŀ' => 'ŀ', - 'Ł' => 'ł', - 'Ń' => 'ń', - 'Ņ' => 'ņ', - 'Ň' => 'ň', - 'Ŋ' => 'ŋ', - 'Ō' => 'ō', - 'Ŏ' => 'ŏ', - 'Ő' => 'ő', - 'Œ' => 'œ', - 'Ŕ' => 'ŕ', - 'Ŗ' => 'ŗ', - 'Ř' => 'ř', - 'Ś' => 'ś', - 'Ŝ' => 'ŝ', - 'Ş' => 'ş', - 'Š' => 'š', - 'Ţ' => 'ţ', - 'Ť' => 'ť', - 'Ŧ' => 'ŧ', - 'Ũ' => 'ũ', - 'Ū' => 'ū', - 'Ŭ' => 'ŭ', - 'Ů' => 'ů', - 'Ű' => 'ű', - 'Ų' => 'ų', - 'Ŵ' => 'ŵ', - 'Ŷ' => 'ŷ', - 'Ÿ' => 'ÿ', - 'Ź' => 'ź', - 'Ż' => 'ż', - 'Ž' => 'ž', - 'Ɓ' => 'ɓ', - 'Ƃ' => 'ƃ', - 'Ƅ' => 'ƅ', - 'Ɔ' => 'ɔ', - 'Ƈ' => 'ƈ', - 'Ɖ' => 'ɖ', - 'Ɗ' => 'ɗ', - 'Ƌ' => 'ƌ', - 'Ǝ' => 'ǝ', - 'Ə' => 'ə', - 'Ɛ' => 'ɛ', - 'Ƒ' => 'ƒ', - 'Ɠ' => 'ɠ', - 'Ɣ' => 'ɣ', - 'Ɩ' => 'ɩ', - 'Ɨ' => 'ɨ', - 'Ƙ' => 'ƙ', - 'Ɯ' => 'ɯ', - 'Ɲ' => 'ɲ', - 'Ɵ' => 'ɵ', - 'Ơ' => 'ơ', - 'Ƣ' => 'ƣ', - 'Ƥ' => 'ƥ', - 'Ʀ' => 'ʀ', - 'Ƨ' => 'ƨ', - 'Ʃ' => 'ʃ', - 'Ƭ' => 'ƭ', - 'Ʈ' => 'ʈ', - 'Ư' => 'ư', - 'Ʊ' => 'ʊ', - 'Ʋ' => 'ʋ', - 'Ƴ' => 'ƴ', - 'Ƶ' => 'ƶ', - 'Ʒ' => 'ʒ', - 'Ƹ' => 'ƹ', - 'Ƽ' => 'ƽ', - 'DŽ' => 'dž', - 'Dž' => 'dž', - 'LJ' => 'lj', - 'Lj' => 'lj', - 'NJ' => 'nj', - 'Nj' => 'nj', - 'Ǎ' => 'ǎ', - 'Ǐ' => 'ǐ', - 'Ǒ' => 'ǒ', - 'Ǔ' => 'ǔ', - 'Ǖ' => 'ǖ', - 'Ǘ' => 'ǘ', - 'Ǚ' => 'ǚ', - 'Ǜ' => 'ǜ', - 'Ǟ' => 'ǟ', - 'Ǡ' => 'ǡ', - 'Ǣ' => 'ǣ', - 'Ǥ' => 'ǥ', - 'Ǧ' => 'ǧ', - 'Ǩ' => 'ǩ', - 'Ǫ' => 'ǫ', - 'Ǭ' => 'ǭ', - 'Ǯ' => 'ǯ', - 'DZ' => 'dz', - 'Dz' => 'dz', - 'Ǵ' => 'ǵ', - 'Ƕ' => 'ƕ', - 'Ƿ' => 'ƿ', - 'Ǹ' => 'ǹ', - 'Ǻ' => 'ǻ', - 'Ǽ' => 'ǽ', - 'Ǿ' => 'ǿ', - 'Ȁ' => 'ȁ', - 'Ȃ' => 'ȃ', - 'Ȅ' => 'ȅ', - 'Ȇ' => 'ȇ', - 'Ȉ' => 'ȉ', - 'Ȋ' => 'ȋ', - 'Ȍ' => 'ȍ', - 'Ȏ' => 'ȏ', - 'Ȑ' => 'ȑ', - 'Ȓ' => 'ȓ', - 'Ȕ' => 'ȕ', - 'Ȗ' => 'ȗ', - 'Ș' => 'ș', - 'Ț' => 'ț', - 'Ȝ' => 'ȝ', - 'Ȟ' => 'ȟ', - 'Ƞ' => 'ƞ', - 'Ȣ' => 'ȣ', - 'Ȥ' => 'ȥ', - 'Ȧ' => 'ȧ', - 'Ȩ' => 'ȩ', - 'Ȫ' => 'ȫ', - 'Ȭ' => 'ȭ', - 'Ȯ' => 'ȯ', - 'Ȱ' => 'ȱ', - 'Ȳ' => 'ȳ', - 'Ⱥ' => 'ⱥ', - 'Ȼ' => 'ȼ', - 'Ƚ' => 'ƚ', - 'Ⱦ' => 'ⱦ', - 'Ɂ' => 'ɂ', - 'Ƀ' => 'ƀ', - 'Ʉ' => 'ʉ', - 'Ʌ' => 'ʌ', - 'Ɇ' => 'ɇ', - 'Ɉ' => 'ɉ', - 'Ɋ' => 'ɋ', - 'Ɍ' => 'ɍ', - 'Ɏ' => 'ɏ', - 'Ͱ' => 'ͱ', - 'Ͳ' => 'ͳ', - 'Ͷ' => 'ͷ', - 'Ϳ' => 'ϳ', - 'Ά' => 'ά', - 'Έ' => 'έ', - 'Ή' => 'ή', - 'Ί' => 'ί', - 'Ό' => 'ό', - 'Ύ' => 'ύ', - 'Ώ' => 'ώ', - 'Α' => 'α', - 'Β' => 'β', - 'Γ' => 'γ', - 'Δ' => 'δ', - 'Ε' => 'ε', - 'Ζ' => 'ζ', - 'Η' => 'η', - 'Θ' => 'θ', - 'Ι' => 'ι', - 'Κ' => 'κ', - 'Λ' => 'λ', - 'Μ' => 'μ', - 'Ν' => 'ν', - 'Ξ' => 'ξ', - 'Ο' => 'ο', - 'Π' => 'π', - 'Ρ' => 'ρ', - 'Σ' => 'σ', - 'Τ' => 'τ', - 'Υ' => 'υ', - 'Φ' => 'φ', - 'Χ' => 'χ', - 'Ψ' => 'ψ', - 'Ω' => 'ω', - 'Ϊ' => 'ϊ', - 'Ϋ' => 'ϋ', - 'Ϗ' => 'ϗ', - 'Ϙ' => 'ϙ', - 'Ϛ' => 'ϛ', - 'Ϝ' => 'ϝ', - 'Ϟ' => 'ϟ', - 'Ϡ' => 'ϡ', - 'Ϣ' => 'ϣ', - 'Ϥ' => 'ϥ', - 'Ϧ' => 'ϧ', - 'Ϩ' => 'ϩ', - 'Ϫ' => 'ϫ', - 'Ϭ' => 'ϭ', - 'Ϯ' => 'ϯ', - 'ϴ' => 'θ', - 'Ϸ' => 'ϸ', - 'Ϲ' => 'ϲ', - 'Ϻ' => 'ϻ', - 'Ͻ' => 'ͻ', - 'Ͼ' => 'ͼ', - 'Ͽ' => 'ͽ', - 'Ѐ' => 'ѐ', - 'Ё' => 'ё', - 'Ђ' => 'ђ', - 'Ѓ' => 'ѓ', - 'Є' => 'є', - 'Ѕ' => 'ѕ', - 'І' => 'і', - 'Ї' => 'ї', - 'Ј' => 'ј', - 'Љ' => 'љ', - 'Њ' => 'њ', - 'Ћ' => 'ћ', - 'Ќ' => 'ќ', - 'Ѝ' => 'ѝ', - 'Ў' => 'ў', - 'Џ' => 'џ', - 'А' => 'а', - 'Б' => 'б', - 'В' => 'в', - 'Г' => 'г', - 'Д' => 'д', - 'Е' => 'е', - 'Ж' => 'ж', - 'З' => 'з', - 'И' => 'и', - 'Й' => 'й', - 'К' => 'к', - 'Л' => 'л', - 'М' => 'м', - 'Н' => 'н', - 'О' => 'о', - 'П' => 'п', - 'Р' => 'р', - 'С' => 'с', - 'Т' => 'т', - 'У' => 'у', - 'Ф' => 'ф', - 'Х' => 'х', - 'Ц' => 'ц', - 'Ч' => 'ч', - 'Ш' => 'ш', - 'Щ' => 'щ', - 'Ъ' => 'ъ', - 'Ы' => 'ы', - 'Ь' => 'ь', - 'Э' => 'э', - 'Ю' => 'ю', - 'Я' => 'я', - 'Ѡ' => 'ѡ', - 'Ѣ' => 'ѣ', - 'Ѥ' => 'ѥ', - 'Ѧ' => 'ѧ', - 'Ѩ' => 'ѩ', - 'Ѫ' => 'ѫ', - 'Ѭ' => 'ѭ', - 'Ѯ' => 'ѯ', - 'Ѱ' => 'ѱ', - 'Ѳ' => 'ѳ', - 'Ѵ' => 'ѵ', - 'Ѷ' => 'ѷ', - 'Ѹ' => 'ѹ', - 'Ѻ' => 'ѻ', - 'Ѽ' => 'ѽ', - 'Ѿ' => 'ѿ', - 'Ҁ' => 'ҁ', - 'Ҋ' => 'ҋ', - 'Ҍ' => 'ҍ', - 'Ҏ' => 'ҏ', - 'Ґ' => 'ґ', - 'Ғ' => 'ғ', - 'Ҕ' => 'ҕ', - 'Җ' => 'җ', - 'Ҙ' => 'ҙ', - 'Қ' => 'қ', - 'Ҝ' => 'ҝ', - 'Ҟ' => 'ҟ', - 'Ҡ' => 'ҡ', - 'Ң' => 'ң', - 'Ҥ' => 'ҥ', - 'Ҧ' => 'ҧ', - 'Ҩ' => 'ҩ', - 'Ҫ' => 'ҫ', - 'Ҭ' => 'ҭ', - 'Ү' => 'ү', - 'Ұ' => 'ұ', - 'Ҳ' => 'ҳ', - 'Ҵ' => 'ҵ', - 'Ҷ' => 'ҷ', - 'Ҹ' => 'ҹ', - 'Һ' => 'һ', - 'Ҽ' => 'ҽ', - 'Ҿ' => 'ҿ', - 'Ӏ' => 'ӏ', - 'Ӂ' => 'ӂ', - 'Ӄ' => 'ӄ', - 'Ӆ' => 'ӆ', - 'Ӈ' => 'ӈ', - 'Ӊ' => 'ӊ', - 'Ӌ' => 'ӌ', - 'Ӎ' => 'ӎ', - 'Ӑ' => 'ӑ', - 'Ӓ' => 'ӓ', - 'Ӕ' => 'ӕ', - 'Ӗ' => 'ӗ', - 'Ә' => 'ә', - 'Ӛ' => 'ӛ', - 'Ӝ' => 'ӝ', - 'Ӟ' => 'ӟ', - 'Ӡ' => 'ӡ', - 'Ӣ' => 'ӣ', - 'Ӥ' => 'ӥ', - 'Ӧ' => 'ӧ', - 'Ө' => 'ө', - 'Ӫ' => 'ӫ', - 'Ӭ' => 'ӭ', - 'Ӯ' => 'ӯ', - 'Ӱ' => 'ӱ', - 'Ӳ' => 'ӳ', - 'Ӵ' => 'ӵ', - 'Ӷ' => 'ӷ', - 'Ӹ' => 'ӹ', - 'Ӻ' => 'ӻ', - 'Ӽ' => 'ӽ', - 'Ӿ' => 'ӿ', - 'Ԁ' => 'ԁ', - 'Ԃ' => 'ԃ', - 'Ԅ' => 'ԅ', - 'Ԇ' => 'ԇ', - 'Ԉ' => 'ԉ', - 'Ԋ' => 'ԋ', - 'Ԍ' => 'ԍ', - 'Ԏ' => 'ԏ', - 'Ԑ' => 'ԑ', - 'Ԓ' => 'ԓ', - 'Ԕ' => 'ԕ', - 'Ԗ' => 'ԗ', - 'Ԙ' => 'ԙ', - 'Ԛ' => 'ԛ', - 'Ԝ' => 'ԝ', - 'Ԟ' => 'ԟ', - 'Ԡ' => 'ԡ', - 'Ԣ' => 'ԣ', - 'Ԥ' => 'ԥ', - 'Ԧ' => 'ԧ', - 'Ԩ' => 'ԩ', - 'Ԫ' => 'ԫ', - 'Ԭ' => 'ԭ', - 'Ԯ' => 'ԯ', - 'Ա' => 'ա', - 'Բ' => 'բ', - 'Գ' => 'գ', - 'Դ' => 'դ', - 'Ե' => 'ե', - 'Զ' => 'զ', - 'Է' => 'է', - 'Ը' => 'ը', - 'Թ' => 'թ', - 'Ժ' => 'ժ', - 'Ի' => 'ի', - 'Լ' => 'լ', - 'Խ' => 'խ', - 'Ծ' => 'ծ', - 'Կ' => 'կ', - 'Հ' => 'հ', - 'Ձ' => 'ձ', - 'Ղ' => 'ղ', - 'Ճ' => 'ճ', - 'Մ' => 'մ', - 'Յ' => 'յ', - 'Ն' => 'ն', - 'Շ' => 'շ', - 'Ո' => 'ո', - 'Չ' => 'չ', - 'Պ' => 'պ', - 'Ջ' => 'ջ', - 'Ռ' => 'ռ', - 'Ս' => 'ս', - 'Վ' => 'վ', - 'Տ' => 'տ', - 'Ր' => 'ր', - 'Ց' => 'ց', - 'Ւ' => 'ւ', - 'Փ' => 'փ', - 'Ք' => 'ք', - 'Օ' => 'օ', - 'Ֆ' => 'ֆ', - 'Ⴀ' => 'ⴀ', - 'Ⴁ' => 'ⴁ', - 'Ⴂ' => 'ⴂ', - 'Ⴃ' => 'ⴃ', - 'Ⴄ' => 'ⴄ', - 'Ⴅ' => 'ⴅ', - 'Ⴆ' => 'ⴆ', - 'Ⴇ' => 'ⴇ', - 'Ⴈ' => 'ⴈ', - 'Ⴉ' => 'ⴉ', - 'Ⴊ' => 'ⴊ', - 'Ⴋ' => 'ⴋ', - 'Ⴌ' => 'ⴌ', - 'Ⴍ' => 'ⴍ', - 'Ⴎ' => 'ⴎ', - 'Ⴏ' => 'ⴏ', - 'Ⴐ' => 'ⴐ', - 'Ⴑ' => 'ⴑ', - 'Ⴒ' => 'ⴒ', - 'Ⴓ' => 'ⴓ', - 'Ⴔ' => 'ⴔ', - 'Ⴕ' => 'ⴕ', - 'Ⴖ' => 'ⴖ', - 'Ⴗ' => 'ⴗ', - 'Ⴘ' => 'ⴘ', - 'Ⴙ' => 'ⴙ', - 'Ⴚ' => 'ⴚ', - 'Ⴛ' => 'ⴛ', - 'Ⴜ' => 'ⴜ', - 'Ⴝ' => 'ⴝ', - 'Ⴞ' => 'ⴞ', - 'Ⴟ' => 'ⴟ', - 'Ⴠ' => 'ⴠ', - 'Ⴡ' => 'ⴡ', - 'Ⴢ' => 'ⴢ', - 'Ⴣ' => 'ⴣ', - 'Ⴤ' => 'ⴤ', - 'Ⴥ' => 'ⴥ', - 'Ⴧ' => 'ⴧ', - 'Ⴭ' => 'ⴭ', - 'Ꭰ' => 'ꭰ', - 'Ꭱ' => 'ꭱ', - 'Ꭲ' => 'ꭲ', - 'Ꭳ' => 'ꭳ', - 'Ꭴ' => 'ꭴ', - 'Ꭵ' => 'ꭵ', - 'Ꭶ' => 'ꭶ', - 'Ꭷ' => 'ꭷ', - 'Ꭸ' => 'ꭸ', - 'Ꭹ' => 'ꭹ', - 'Ꭺ' => 'ꭺ', - 'Ꭻ' => 'ꭻ', - 'Ꭼ' => 'ꭼ', - 'Ꭽ' => 'ꭽ', - 'Ꭾ' => 'ꭾ', - 'Ꭿ' => 'ꭿ', - 'Ꮀ' => 'ꮀ', - 'Ꮁ' => 'ꮁ', - 'Ꮂ' => 'ꮂ', - 'Ꮃ' => 'ꮃ', - 'Ꮄ' => 'ꮄ', - 'Ꮅ' => 'ꮅ', - 'Ꮆ' => 'ꮆ', - 'Ꮇ' => 'ꮇ', - 'Ꮈ' => 'ꮈ', - 'Ꮉ' => 'ꮉ', - 'Ꮊ' => 'ꮊ', - 'Ꮋ' => 'ꮋ', - 'Ꮌ' => 'ꮌ', - 'Ꮍ' => 'ꮍ', - 'Ꮎ' => 'ꮎ', - 'Ꮏ' => 'ꮏ', - 'Ꮐ' => 'ꮐ', - 'Ꮑ' => 'ꮑ', - 'Ꮒ' => 'ꮒ', - 'Ꮓ' => 'ꮓ', - 'Ꮔ' => 'ꮔ', - 'Ꮕ' => 'ꮕ', - 'Ꮖ' => 'ꮖ', - 'Ꮗ' => 'ꮗ', - 'Ꮘ' => 'ꮘ', - 'Ꮙ' => 'ꮙ', - 'Ꮚ' => 'ꮚ', - 'Ꮛ' => 'ꮛ', - 'Ꮜ' => 'ꮜ', - 'Ꮝ' => 'ꮝ', - 'Ꮞ' => 'ꮞ', - 'Ꮟ' => 'ꮟ', - 'Ꮠ' => 'ꮠ', - 'Ꮡ' => 'ꮡ', - 'Ꮢ' => 'ꮢ', - 'Ꮣ' => 'ꮣ', - 'Ꮤ' => 'ꮤ', - 'Ꮥ' => 'ꮥ', - 'Ꮦ' => 'ꮦ', - 'Ꮧ' => 'ꮧ', - 'Ꮨ' => 'ꮨ', - 'Ꮩ' => 'ꮩ', - 'Ꮪ' => 'ꮪ', - 'Ꮫ' => 'ꮫ', - 'Ꮬ' => 'ꮬ', - 'Ꮭ' => 'ꮭ', - 'Ꮮ' => 'ꮮ', - 'Ꮯ' => 'ꮯ', - 'Ꮰ' => 'ꮰ', - 'Ꮱ' => 'ꮱ', - 'Ꮲ' => 'ꮲ', - 'Ꮳ' => 'ꮳ', - 'Ꮴ' => 'ꮴ', - 'Ꮵ' => 'ꮵ', - 'Ꮶ' => 'ꮶ', - 'Ꮷ' => 'ꮷ', - 'Ꮸ' => 'ꮸ', - 'Ꮹ' => 'ꮹ', - 'Ꮺ' => 'ꮺ', - 'Ꮻ' => 'ꮻ', - 'Ꮼ' => 'ꮼ', - 'Ꮽ' => 'ꮽ', - 'Ꮾ' => 'ꮾ', - 'Ꮿ' => 'ꮿ', - 'Ᏸ' => 'ᏸ', - 'Ᏹ' => 'ᏹ', - 'Ᏺ' => 'ᏺ', - 'Ᏻ' => 'ᏻ', - 'Ᏼ' => 'ᏼ', - 'Ᏽ' => 'ᏽ', - 'Ა' => 'ა', - 'Ბ' => 'ბ', - 'Გ' => 'გ', - 'Დ' => 'დ', - 'Ე' => 'ე', - 'Ვ' => 'ვ', - 'Ზ' => 'ზ', - 'Თ' => 'თ', - 'Ი' => 'ი', - 'Კ' => 'კ', - 'Ლ' => 'ლ', - 'Მ' => 'მ', - 'Ნ' => 'ნ', - 'Ო' => 'ო', - 'Პ' => 'პ', - 'Ჟ' => 'ჟ', - 'Რ' => 'რ', - 'Ს' => 'ს', - 'Ტ' => 'ტ', - 'Უ' => 'უ', - 'Ფ' => 'ფ', - 'Ქ' => 'ქ', - 'Ღ' => 'ღ', - 'Ყ' => 'ყ', - 'Შ' => 'შ', - 'Ჩ' => 'ჩ', - 'Ც' => 'ც', - 'Ძ' => 'ძ', - 'Წ' => 'წ', - 'Ჭ' => 'ჭ', - 'Ხ' => 'ხ', - 'Ჯ' => 'ჯ', - 'Ჰ' => 'ჰ', - 'Ჱ' => 'ჱ', - 'Ჲ' => 'ჲ', - 'Ჳ' => 'ჳ', - 'Ჴ' => 'ჴ', - 'Ჵ' => 'ჵ', - 'Ჶ' => 'ჶ', - 'Ჷ' => 'ჷ', - 'Ჸ' => 'ჸ', - 'Ჹ' => 'ჹ', - 'Ჺ' => 'ჺ', - 'Ჽ' => 'ჽ', - 'Ჾ' => 'ჾ', - 'Ჿ' => 'ჿ', - 'Ḁ' => 'ḁ', - 'Ḃ' => 'ḃ', - 'Ḅ' => 'ḅ', - 'Ḇ' => 'ḇ', - 'Ḉ' => 'ḉ', - 'Ḋ' => 'ḋ', - 'Ḍ' => 'ḍ', - 'Ḏ' => 'ḏ', - 'Ḑ' => 'ḑ', - 'Ḓ' => 'ḓ', - 'Ḕ' => 'ḕ', - 'Ḗ' => 'ḗ', - 'Ḙ' => 'ḙ', - 'Ḛ' => 'ḛ', - 'Ḝ' => 'ḝ', - 'Ḟ' => 'ḟ', - 'Ḡ' => 'ḡ', - 'Ḣ' => 'ḣ', - 'Ḥ' => 'ḥ', - 'Ḧ' => 'ḧ', - 'Ḩ' => 'ḩ', - 'Ḫ' => 'ḫ', - 'Ḭ' => 'ḭ', - 'Ḯ' => 'ḯ', - 'Ḱ' => 'ḱ', - 'Ḳ' => 'ḳ', - 'Ḵ' => 'ḵ', - 'Ḷ' => 'ḷ', - 'Ḹ' => 'ḹ', - 'Ḻ' => 'ḻ', - 'Ḽ' => 'ḽ', - 'Ḿ' => 'ḿ', - 'Ṁ' => 'ṁ', - 'Ṃ' => 'ṃ', - 'Ṅ' => 'ṅ', - 'Ṇ' => 'ṇ', - 'Ṉ' => 'ṉ', - 'Ṋ' => 'ṋ', - 'Ṍ' => 'ṍ', - 'Ṏ' => 'ṏ', - 'Ṑ' => 'ṑ', - 'Ṓ' => 'ṓ', - 'Ṕ' => 'ṕ', - 'Ṗ' => 'ṗ', - 'Ṙ' => 'ṙ', - 'Ṛ' => 'ṛ', - 'Ṝ' => 'ṝ', - 'Ṟ' => 'ṟ', - 'Ṡ' => 'ṡ', - 'Ṣ' => 'ṣ', - 'Ṥ' => 'ṥ', - 'Ṧ' => 'ṧ', - 'Ṩ' => 'ṩ', - 'Ṫ' => 'ṫ', - 'Ṭ' => 'ṭ', - 'Ṯ' => 'ṯ', - 'Ṱ' => 'ṱ', - 'Ṳ' => 'ṳ', - 'Ṵ' => 'ṵ', - 'Ṷ' => 'ṷ', - 'Ṹ' => 'ṹ', - 'Ṻ' => 'ṻ', - 'Ṽ' => 'ṽ', - 'Ṿ' => 'ṿ', - 'Ẁ' => 'ẁ', - 'Ẃ' => 'ẃ', - 'Ẅ' => 'ẅ', - 'Ẇ' => 'ẇ', - 'Ẉ' => 'ẉ', - 'Ẋ' => 'ẋ', - 'Ẍ' => 'ẍ', - 'Ẏ' => 'ẏ', - 'Ẑ' => 'ẑ', - 'Ẓ' => 'ẓ', - 'Ẕ' => 'ẕ', - 'ẞ' => 'ß', - 'Ạ' => 'ạ', - 'Ả' => 'ả', - 'Ấ' => 'ấ', - 'Ầ' => 'ầ', - 'Ẩ' => 'ẩ', - 'Ẫ' => 'ẫ', - 'Ậ' => 'ậ', - 'Ắ' => 'ắ', - 'Ằ' => 'ằ', - 'Ẳ' => 'ẳ', - 'Ẵ' => 'ẵ', - 'Ặ' => 'ặ', - 'Ẹ' => 'ẹ', - 'Ẻ' => 'ẻ', - 'Ẽ' => 'ẽ', - 'Ế' => 'ế', - 'Ề' => 'ề', - 'Ể' => 'ể', - 'Ễ' => 'ễ', - 'Ệ' => 'ệ', - 'Ỉ' => 'ỉ', - 'Ị' => 'ị', - 'Ọ' => 'ọ', - 'Ỏ' => 'ỏ', - 'Ố' => 'ố', - 'Ồ' => 'ồ', - 'Ổ' => 'ổ', - 'Ỗ' => 'ỗ', - 'Ộ' => 'ộ', - 'Ớ' => 'ớ', - 'Ờ' => 'ờ', - 'Ở' => 'ở', - 'Ỡ' => 'ỡ', - 'Ợ' => 'ợ', - 'Ụ' => 'ụ', - 'Ủ' => 'ủ', - 'Ứ' => 'ứ', - 'Ừ' => 'ừ', - 'Ử' => 'ử', - 'Ữ' => 'ữ', - 'Ự' => 'ự', - 'Ỳ' => 'ỳ', - 'Ỵ' => 'ỵ', - 'Ỷ' => 'ỷ', - 'Ỹ' => 'ỹ', - 'Ỻ' => 'ỻ', - 'Ỽ' => 'ỽ', - 'Ỿ' => 'ỿ', - 'Ἀ' => 'ἀ', - 'Ἁ' => 'ἁ', - 'Ἂ' => 'ἂ', - 'Ἃ' => 'ἃ', - 'Ἄ' => 'ἄ', - 'Ἅ' => 'ἅ', - 'Ἆ' => 'ἆ', - 'Ἇ' => 'ἇ', - 'Ἐ' => 'ἐ', - 'Ἑ' => 'ἑ', - 'Ἒ' => 'ἒ', - 'Ἓ' => 'ἓ', - 'Ἔ' => 'ἔ', - 'Ἕ' => 'ἕ', - 'Ἠ' => 'ἠ', - 'Ἡ' => 'ἡ', - 'Ἢ' => 'ἢ', - 'Ἣ' => 'ἣ', - 'Ἤ' => 'ἤ', - 'Ἥ' => 'ἥ', - 'Ἦ' => 'ἦ', - 'Ἧ' => 'ἧ', - 'Ἰ' => 'ἰ', - 'Ἱ' => 'ἱ', - 'Ἲ' => 'ἲ', - 'Ἳ' => 'ἳ', - 'Ἴ' => 'ἴ', - 'Ἵ' => 'ἵ', - 'Ἶ' => 'ἶ', - 'Ἷ' => 'ἷ', - 'Ὀ' => 'ὀ', - 'Ὁ' => 'ὁ', - 'Ὂ' => 'ὂ', - 'Ὃ' => 'ὃ', - 'Ὄ' => 'ὄ', - 'Ὅ' => 'ὅ', - 'Ὑ' => 'ὑ', - 'Ὓ' => 'ὓ', - 'Ὕ' => 'ὕ', - 'Ὗ' => 'ὗ', - 'Ὠ' => 'ὠ', - 'Ὡ' => 'ὡ', - 'Ὢ' => 'ὢ', - 'Ὣ' => 'ὣ', - 'Ὤ' => 'ὤ', - 'Ὥ' => 'ὥ', - 'Ὦ' => 'ὦ', - 'Ὧ' => 'ὧ', - 'ᾈ' => 'ᾀ', - 'ᾉ' => 'ᾁ', - 'ᾊ' => 'ᾂ', - 'ᾋ' => 'ᾃ', - 'ᾌ' => 'ᾄ', - 'ᾍ' => 'ᾅ', - 'ᾎ' => 'ᾆ', - 'ᾏ' => 'ᾇ', - 'ᾘ' => 'ᾐ', - 'ᾙ' => 'ᾑ', - 'ᾚ' => 'ᾒ', - 'ᾛ' => 'ᾓ', - 'ᾜ' => 'ᾔ', - 'ᾝ' => 'ᾕ', - 'ᾞ' => 'ᾖ', - 'ᾟ' => 'ᾗ', - 'ᾨ' => 'ᾠ', - 'ᾩ' => 'ᾡ', - 'ᾪ' => 'ᾢ', - 'ᾫ' => 'ᾣ', - 'ᾬ' => 'ᾤ', - 'ᾭ' => 'ᾥ', - 'ᾮ' => 'ᾦ', - 'ᾯ' => 'ᾧ', - 'Ᾰ' => 'ᾰ', - 'Ᾱ' => 'ᾱ', - 'Ὰ' => 'ὰ', - 'Ά' => 'ά', - 'ᾼ' => 'ᾳ', - 'Ὲ' => 'ὲ', - 'Έ' => 'έ', - 'Ὴ' => 'ὴ', - 'Ή' => 'ή', - 'ῌ' => 'ῃ', - 'Ῐ' => 'ῐ', - 'Ῑ' => 'ῑ', - 'Ὶ' => 'ὶ', - 'Ί' => 'ί', - 'Ῠ' => 'ῠ', - 'Ῡ' => 'ῡ', - 'Ὺ' => 'ὺ', - 'Ύ' => 'ύ', - 'Ῥ' => 'ῥ', - 'Ὸ' => 'ὸ', - 'Ό' => 'ό', - 'Ὼ' => 'ὼ', - 'Ώ' => 'ώ', - 'ῼ' => 'ῳ', - 'Ω' => 'ω', - 'K' => 'k', - 'Å' => 'å', - 'Ⅎ' => 'ⅎ', - 'Ⅰ' => 'ⅰ', - 'Ⅱ' => 'ⅱ', - 'Ⅲ' => 'ⅲ', - 'Ⅳ' => 'ⅳ', - 'Ⅴ' => 'ⅴ', - 'Ⅵ' => 'ⅵ', - 'Ⅶ' => 'ⅶ', - 'Ⅷ' => 'ⅷ', - 'Ⅸ' => 'ⅸ', - 'Ⅹ' => 'ⅹ', - 'Ⅺ' => 'ⅺ', - 'Ⅻ' => 'ⅻ', - 'Ⅼ' => 'ⅼ', - 'Ⅽ' => 'ⅽ', - 'Ⅾ' => 'ⅾ', - 'Ⅿ' => 'ⅿ', - 'Ↄ' => 'ↄ', - 'Ⓐ' => 'ⓐ', - 'Ⓑ' => 'ⓑ', - 'Ⓒ' => 'ⓒ', - 'Ⓓ' => 'ⓓ', - 'Ⓔ' => 'ⓔ', - 'Ⓕ' => 'ⓕ', - 'Ⓖ' => 'ⓖ', - 'Ⓗ' => 'ⓗ', - 'Ⓘ' => 'ⓘ', - 'Ⓙ' => 'ⓙ', - 'Ⓚ' => 'ⓚ', - 'Ⓛ' => 'ⓛ', - 'Ⓜ' => 'ⓜ', - 'Ⓝ' => 'ⓝ', - 'Ⓞ' => 'ⓞ', - 'Ⓟ' => 'ⓟ', - 'Ⓠ' => 'ⓠ', - 'Ⓡ' => 'ⓡ', - 'Ⓢ' => 'ⓢ', - 'Ⓣ' => 'ⓣ', - 'Ⓤ' => 'ⓤ', - 'Ⓥ' => 'ⓥ', - 'Ⓦ' => 'ⓦ', - 'Ⓧ' => 'ⓧ', - 'Ⓨ' => 'ⓨ', - 'Ⓩ' => 'ⓩ', - 'Ⰰ' => 'ⰰ', - 'Ⰱ' => 'ⰱ', - 'Ⰲ' => 'ⰲ', - 'Ⰳ' => 'ⰳ', - 'Ⰴ' => 'ⰴ', - 'Ⰵ' => 'ⰵ', - 'Ⰶ' => 'ⰶ', - 'Ⰷ' => 'ⰷ', - 'Ⰸ' => 'ⰸ', - 'Ⰹ' => 'ⰹ', - 'Ⰺ' => 'ⰺ', - 'Ⰻ' => 'ⰻ', - 'Ⰼ' => 'ⰼ', - 'Ⰽ' => 'ⰽ', - 'Ⰾ' => 'ⰾ', - 'Ⰿ' => 'ⰿ', - 'Ⱀ' => 'ⱀ', - 'Ⱁ' => 'ⱁ', - 'Ⱂ' => 'ⱂ', - 'Ⱃ' => 'ⱃ', - 'Ⱄ' => 'ⱄ', - 'Ⱅ' => 'ⱅ', - 'Ⱆ' => 'ⱆ', - 'Ⱇ' => 'ⱇ', - 'Ⱈ' => 'ⱈ', - 'Ⱉ' => 'ⱉ', - 'Ⱊ' => 'ⱊ', - 'Ⱋ' => 'ⱋ', - 'Ⱌ' => 'ⱌ', - 'Ⱍ' => 'ⱍ', - 'Ⱎ' => 'ⱎ', - 'Ⱏ' => 'ⱏ', - 'Ⱐ' => 'ⱐ', - 'Ⱑ' => 'ⱑ', - 'Ⱒ' => 'ⱒ', - 'Ⱓ' => 'ⱓ', - 'Ⱔ' => 'ⱔ', - 'Ⱕ' => 'ⱕ', - 'Ⱖ' => 'ⱖ', - 'Ⱗ' => 'ⱗ', - 'Ⱘ' => 'ⱘ', - 'Ⱙ' => 'ⱙ', - 'Ⱚ' => 'ⱚ', - 'Ⱛ' => 'ⱛ', - 'Ⱜ' => 'ⱜ', - 'Ⱝ' => 'ⱝ', - 'Ⱞ' => 'ⱞ', - 'Ⱡ' => 'ⱡ', - 'Ɫ' => 'ɫ', - 'Ᵽ' => 'ᵽ', - 'Ɽ' => 'ɽ', - 'Ⱨ' => 'ⱨ', - 'Ⱪ' => 'ⱪ', - 'Ⱬ' => 'ⱬ', - 'Ɑ' => 'ɑ', - 'Ɱ' => 'ɱ', - 'Ɐ' => 'ɐ', - 'Ɒ' => 'ɒ', - 'Ⱳ' => 'ⱳ', - 'Ⱶ' => 'ⱶ', - 'Ȿ' => 'ȿ', - 'Ɀ' => 'ɀ', - 'Ⲁ' => 'ⲁ', - 'Ⲃ' => 'ⲃ', - 'Ⲅ' => 'ⲅ', - 'Ⲇ' => 'ⲇ', - 'Ⲉ' => 'ⲉ', - 'Ⲋ' => 'ⲋ', - 'Ⲍ' => 'ⲍ', - 'Ⲏ' => 'ⲏ', - 'Ⲑ' => 'ⲑ', - 'Ⲓ' => 'ⲓ', - 'Ⲕ' => 'ⲕ', - 'Ⲗ' => 'ⲗ', - 'Ⲙ' => 'ⲙ', - 'Ⲛ' => 'ⲛ', - 'Ⲝ' => 'ⲝ', - 'Ⲟ' => 'ⲟ', - 'Ⲡ' => 'ⲡ', - 'Ⲣ' => 'ⲣ', - 'Ⲥ' => 'ⲥ', - 'Ⲧ' => 'ⲧ', - 'Ⲩ' => 'ⲩ', - 'Ⲫ' => 'ⲫ', - 'Ⲭ' => 'ⲭ', - 'Ⲯ' => 'ⲯ', - 'Ⲱ' => 'ⲱ', - 'Ⲳ' => 'ⲳ', - 'Ⲵ' => 'ⲵ', - 'Ⲷ' => 'ⲷ', - 'Ⲹ' => 'ⲹ', - 'Ⲻ' => 'ⲻ', - 'Ⲽ' => 'ⲽ', - 'Ⲿ' => 'ⲿ', - 'Ⳁ' => 'ⳁ', - 'Ⳃ' => 'ⳃ', - 'Ⳅ' => 'ⳅ', - 'Ⳇ' => 'ⳇ', - 'Ⳉ' => 'ⳉ', - 'Ⳋ' => 'ⳋ', - 'Ⳍ' => 'ⳍ', - 'Ⳏ' => 'ⳏ', - 'Ⳑ' => 'ⳑ', - 'Ⳓ' => 'ⳓ', - 'Ⳕ' => 'ⳕ', - 'Ⳗ' => 'ⳗ', - 'Ⳙ' => 'ⳙ', - 'Ⳛ' => 'ⳛ', - 'Ⳝ' => 'ⳝ', - 'Ⳟ' => 'ⳟ', - 'Ⳡ' => 'ⳡ', - 'Ⳣ' => 'ⳣ', - 'Ⳬ' => 'ⳬ', - 'Ⳮ' => 'ⳮ', - 'Ⳳ' => 'ⳳ', - 'Ꙁ' => 'ꙁ', - 'Ꙃ' => 'ꙃ', - 'Ꙅ' => 'ꙅ', - 'Ꙇ' => 'ꙇ', - 'Ꙉ' => 'ꙉ', - 'Ꙋ' => 'ꙋ', - 'Ꙍ' => 'ꙍ', - 'Ꙏ' => 'ꙏ', - 'Ꙑ' => 'ꙑ', - 'Ꙓ' => 'ꙓ', - 'Ꙕ' => 'ꙕ', - 'Ꙗ' => 'ꙗ', - 'Ꙙ' => 'ꙙ', - 'Ꙛ' => 'ꙛ', - 'Ꙝ' => 'ꙝ', - 'Ꙟ' => 'ꙟ', - 'Ꙡ' => 'ꙡ', - 'Ꙣ' => 'ꙣ', - 'Ꙥ' => 'ꙥ', - 'Ꙧ' => 'ꙧ', - 'Ꙩ' => 'ꙩ', - 'Ꙫ' => 'ꙫ', - 'Ꙭ' => 'ꙭ', - 'Ꚁ' => 'ꚁ', - 'Ꚃ' => 'ꚃ', - 'Ꚅ' => 'ꚅ', - 'Ꚇ' => 'ꚇ', - 'Ꚉ' => 'ꚉ', - 'Ꚋ' => 'ꚋ', - 'Ꚍ' => 'ꚍ', - 'Ꚏ' => 'ꚏ', - 'Ꚑ' => 'ꚑ', - 'Ꚓ' => 'ꚓ', - 'Ꚕ' => 'ꚕ', - 'Ꚗ' => 'ꚗ', - 'Ꚙ' => 'ꚙ', - 'Ꚛ' => 'ꚛ', - 'Ꜣ' => 'ꜣ', - 'Ꜥ' => 'ꜥ', - 'Ꜧ' => 'ꜧ', - 'Ꜩ' => 'ꜩ', - 'Ꜫ' => 'ꜫ', - 'Ꜭ' => 'ꜭ', - 'Ꜯ' => 'ꜯ', - 'Ꜳ' => 'ꜳ', - 'Ꜵ' => 'ꜵ', - 'Ꜷ' => 'ꜷ', - 'Ꜹ' => 'ꜹ', - 'Ꜻ' => 'ꜻ', - 'Ꜽ' => 'ꜽ', - 'Ꜿ' => 'ꜿ', - 'Ꝁ' => 'ꝁ', - 'Ꝃ' => 'ꝃ', - 'Ꝅ' => 'ꝅ', - 'Ꝇ' => 'ꝇ', - 'Ꝉ' => 'ꝉ', - 'Ꝋ' => 'ꝋ', - 'Ꝍ' => 'ꝍ', - 'Ꝏ' => 'ꝏ', - 'Ꝑ' => 'ꝑ', - 'Ꝓ' => 'ꝓ', - 'Ꝕ' => 'ꝕ', - 'Ꝗ' => 'ꝗ', - 'Ꝙ' => 'ꝙ', - 'Ꝛ' => 'ꝛ', - 'Ꝝ' => 'ꝝ', - 'Ꝟ' => 'ꝟ', - 'Ꝡ' => 'ꝡ', - 'Ꝣ' => 'ꝣ', - 'Ꝥ' => 'ꝥ', - 'Ꝧ' => 'ꝧ', - 'Ꝩ' => 'ꝩ', - 'Ꝫ' => 'ꝫ', - 'Ꝭ' => 'ꝭ', - 'Ꝯ' => 'ꝯ', - 'Ꝺ' => 'ꝺ', - 'Ꝼ' => 'ꝼ', - 'Ᵹ' => 'ᵹ', - 'Ꝿ' => 'ꝿ', - 'Ꞁ' => 'ꞁ', - 'Ꞃ' => 'ꞃ', - 'Ꞅ' => 'ꞅ', - 'Ꞇ' => 'ꞇ', - 'Ꞌ' => 'ꞌ', - 'Ɥ' => 'ɥ', - 'Ꞑ' => 'ꞑ', - 'Ꞓ' => 'ꞓ', - 'Ꞗ' => 'ꞗ', - 'Ꞙ' => 'ꞙ', - 'Ꞛ' => 'ꞛ', - 'Ꞝ' => 'ꞝ', - 'Ꞟ' => 'ꞟ', - 'Ꞡ' => 'ꞡ', - 'Ꞣ' => 'ꞣ', - 'Ꞥ' => 'ꞥ', - 'Ꞧ' => 'ꞧ', - 'Ꞩ' => 'ꞩ', - 'Ɦ' => 'ɦ', - 'Ɜ' => 'ɜ', - 'Ɡ' => 'ɡ', - 'Ɬ' => 'ɬ', - 'Ɪ' => 'ɪ', - 'Ʞ' => 'ʞ', - 'Ʇ' => 'ʇ', - 'Ʝ' => 'ʝ', - 'Ꭓ' => 'ꭓ', - 'Ꞵ' => 'ꞵ', - 'Ꞷ' => 'ꞷ', - 'Ꞹ' => 'ꞹ', - 'Ꞻ' => 'ꞻ', - 'Ꞽ' => 'ꞽ', - 'Ꞿ' => 'ꞿ', - 'Ꟃ' => 'ꟃ', - 'Ꞔ' => 'ꞔ', - 'Ʂ' => 'ʂ', - 'Ᶎ' => 'ᶎ', - 'Ꟈ' => 'ꟈ', - 'Ꟊ' => 'ꟊ', - 'Ꟶ' => 'ꟶ', - 'A' => 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - '𐐀' => '𐐨', - '𐐁' => '𐐩', - '𐐂' => '𐐪', - '𐐃' => '𐐫', - '𐐄' => '𐐬', - '𐐅' => '𐐭', - '𐐆' => '𐐮', - '𐐇' => '𐐯', - '𐐈' => '𐐰', - '𐐉' => '𐐱', - '𐐊' => '𐐲', - '𐐋' => '𐐳', - '𐐌' => '𐐴', - '𐐍' => '𐐵', - '𐐎' => '𐐶', - '𐐏' => '𐐷', - '𐐐' => '𐐸', - '𐐑' => '𐐹', - '𐐒' => '𐐺', - '𐐓' => '𐐻', - '𐐔' => '𐐼', - '𐐕' => '𐐽', - '𐐖' => '𐐾', - '𐐗' => '𐐿', - '𐐘' => '𐑀', - '𐐙' => '𐑁', - '𐐚' => '𐑂', - '𐐛' => '𐑃', - '𐐜' => '𐑄', - '𐐝' => '𐑅', - '𐐞' => '𐑆', - '𐐟' => '𐑇', - '𐐠' => '𐑈', - '𐐡' => '𐑉', - '𐐢' => '𐑊', - '𐐣' => '𐑋', - '𐐤' => '𐑌', - '𐐥' => '𐑍', - '𐐦' => '𐑎', - '𐐧' => '𐑏', - '𐒰' => '𐓘', - '𐒱' => '𐓙', - '𐒲' => '𐓚', - '𐒳' => '𐓛', - '𐒴' => '𐓜', - '𐒵' => '𐓝', - '𐒶' => '𐓞', - '𐒷' => '𐓟', - '𐒸' => '𐓠', - '𐒹' => '𐓡', - '𐒺' => '𐓢', - '𐒻' => '𐓣', - '𐒼' => '𐓤', - '𐒽' => '𐓥', - '𐒾' => '𐓦', - '𐒿' => '𐓧', - '𐓀' => '𐓨', - '𐓁' => '𐓩', - '𐓂' => '𐓪', - '𐓃' => '𐓫', - '𐓄' => '𐓬', - '𐓅' => '𐓭', - '𐓆' => '𐓮', - '𐓇' => '𐓯', - '𐓈' => '𐓰', - '𐓉' => '𐓱', - '𐓊' => '𐓲', - '𐓋' => '𐓳', - '𐓌' => '𐓴', - '𐓍' => '𐓵', - '𐓎' => '𐓶', - '𐓏' => '𐓷', - '𐓐' => '𐓸', - '𐓑' => '𐓹', - '𐓒' => '𐓺', - '𐓓' => '𐓻', - '𐲀' => '𐳀', - '𐲁' => '𐳁', - '𐲂' => '𐳂', - '𐲃' => '𐳃', - '𐲄' => '𐳄', - '𐲅' => '𐳅', - '𐲆' => '𐳆', - '𐲇' => '𐳇', - '𐲈' => '𐳈', - '𐲉' => '𐳉', - '𐲊' => '𐳊', - '𐲋' => '𐳋', - '𐲌' => '𐳌', - '𐲍' => '𐳍', - '𐲎' => '𐳎', - '𐲏' => '𐳏', - '𐲐' => '𐳐', - '𐲑' => '𐳑', - '𐲒' => '𐳒', - '𐲓' => '𐳓', - '𐲔' => '𐳔', - '𐲕' => '𐳕', - '𐲖' => '𐳖', - '𐲗' => '𐳗', - '𐲘' => '𐳘', - '𐲙' => '𐳙', - '𐲚' => '𐳚', - '𐲛' => '𐳛', - '𐲜' => '𐳜', - '𐲝' => '𐳝', - '𐲞' => '𐳞', - '𐲟' => '𐳟', - '𐲠' => '𐳠', - '𐲡' => '𐳡', - '𐲢' => '𐳢', - '𐲣' => '𐳣', - '𐲤' => '𐳤', - '𐲥' => '𐳥', - '𐲦' => '𐳦', - '𐲧' => '𐳧', - '𐲨' => '𐳨', - '𐲩' => '𐳩', - '𐲪' => '𐳪', - '𐲫' => '𐳫', - '𐲬' => '𐳬', - '𐲭' => '𐳭', - '𐲮' => '𐳮', - '𐲯' => '𐳯', - '𐲰' => '𐳰', - '𐲱' => '𐳱', - '𐲲' => '𐳲', - '𑢠' => '𑣀', - '𑢡' => '𑣁', - '𑢢' => '𑣂', - '𑢣' => '𑣃', - '𑢤' => '𑣄', - '𑢥' => '𑣅', - '𑢦' => '𑣆', - '𑢧' => '𑣇', - '𑢨' => '𑣈', - '𑢩' => '𑣉', - '𑢪' => '𑣊', - '𑢫' => '𑣋', - '𑢬' => '𑣌', - '𑢭' => '𑣍', - '𑢮' => '𑣎', - '𑢯' => '𑣏', - '𑢰' => '𑣐', - '𑢱' => '𑣑', - '𑢲' => '𑣒', - '𑢳' => '𑣓', - '𑢴' => '𑣔', - '𑢵' => '𑣕', - '𑢶' => '𑣖', - '𑢷' => '𑣗', - '𑢸' => '𑣘', - '𑢹' => '𑣙', - '𑢺' => '𑣚', - '𑢻' => '𑣛', - '𑢼' => '𑣜', - '𑢽' => '𑣝', - '𑢾' => '𑣞', - '𑢿' => '𑣟', - '𖹀' => '𖹠', - '𖹁' => '𖹡', - '𖹂' => '𖹢', - '𖹃' => '𖹣', - '𖹄' => '𖹤', - '𖹅' => '𖹥', - '𖹆' => '𖹦', - '𖹇' => '𖹧', - '𖹈' => '𖹨', - '𖹉' => '𖹩', - '𖹊' => '𖹪', - '𖹋' => '𖹫', - '𖹌' => '𖹬', - '𖹍' => '𖹭', - '𖹎' => '𖹮', - '𖹏' => '𖹯', - '𖹐' => '𖹰', - '𖹑' => '𖹱', - '𖹒' => '𖹲', - '𖹓' => '𖹳', - '𖹔' => '𖹴', - '𖹕' => '𖹵', - '𖹖' => '𖹶', - '𖹗' => '𖹷', - '𖹘' => '𖹸', - '𖹙' => '𖹹', - '𖹚' => '𖹺', - '𖹛' => '𖹻', - '𖹜' => '𖹼', - '𖹝' => '𖹽', - '𖹞' => '𖹾', - '𖹟' => '𖹿', - '𞤀' => '𞤢', - '𞤁' => '𞤣', - '𞤂' => '𞤤', - '𞤃' => '𞤥', - '𞤄' => '𞤦', - '𞤅' => '𞤧', - '𞤆' => '𞤨', - '𞤇' => '𞤩', - '𞤈' => '𞤪', - '𞤉' => '𞤫', - '𞤊' => '𞤬', - '𞤋' => '𞤭', - '𞤌' => '𞤮', - '𞤍' => '𞤯', - '𞤎' => '𞤰', - '𞤏' => '𞤱', - '𞤐' => '𞤲', - '𞤑' => '𞤳', - '𞤒' => '𞤴', - '𞤓' => '𞤵', - '𞤔' => '𞤶', - '𞤕' => '𞤷', - '𞤖' => '𞤸', - '𞤗' => '𞤹', - '𞤘' => '𞤺', - '𞤙' => '𞤻', - '𞤚' => '𞤼', - '𞤛' => '𞤽', - '𞤜' => '𞤾', - '𞤝' => '𞤿', - '𞤞' => '𞥀', - '𞤟' => '𞥁', - '𞤠' => '𞥂', - '𞤡' => '𞥃', -); diff --git a/lib/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/lib/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php deleted file mode 100644 index 2a8f6e73b..000000000 --- a/lib/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +++ /dev/null @@ -1,5 +0,0 @@ - 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - 'µ' => 'Μ', - 'à' => 'À', - 'á' => 'Á', - 'â' => 'Â', - 'ã' => 'Ã', - 'ä' => 'Ä', - 'å' => 'Å', - 'æ' => 'Æ', - 'ç' => 'Ç', - 'è' => 'È', - 'é' => 'É', - 'ê' => 'Ê', - 'ë' => 'Ë', - 'ì' => 'Ì', - 'í' => 'Í', - 'î' => 'Î', - 'ï' => 'Ï', - 'ð' => 'Ð', - 'ñ' => 'Ñ', - 'ò' => 'Ò', - 'ó' => 'Ó', - 'ô' => 'Ô', - 'õ' => 'Õ', - 'ö' => 'Ö', - 'ø' => 'Ø', - 'ù' => 'Ù', - 'ú' => 'Ú', - 'û' => 'Û', - 'ü' => 'Ü', - 'ý' => 'Ý', - 'þ' => 'Þ', - 'ÿ' => 'Ÿ', - 'ā' => 'Ā', - 'ă' => 'Ă', - 'ą' => 'Ą', - 'ć' => 'Ć', - 'ĉ' => 'Ĉ', - 'ċ' => 'Ċ', - 'č' => 'Č', - 'ď' => 'Ď', - 'đ' => 'Đ', - 'ē' => 'Ē', - 'ĕ' => 'Ĕ', - 'ė' => 'Ė', - 'ę' => 'Ę', - 'ě' => 'Ě', - 'ĝ' => 'Ĝ', - 'ğ' => 'Ğ', - 'ġ' => 'Ġ', - 'ģ' => 'Ģ', - 'ĥ' => 'Ĥ', - 'ħ' => 'Ħ', - 'ĩ' => 'Ĩ', - 'ī' => 'Ī', - 'ĭ' => 'Ĭ', - 'į' => 'Į', - 'ı' => 'I', - 'ij' => 'IJ', - 'ĵ' => 'Ĵ', - 'ķ' => 'Ķ', - 'ĺ' => 'Ĺ', - 'ļ' => 'Ļ', - 'ľ' => 'Ľ', - 'ŀ' => 'Ŀ', - 'ł' => 'Ł', - 'ń' => 'Ń', - 'ņ' => 'Ņ', - 'ň' => 'Ň', - 'ŋ' => 'Ŋ', - 'ō' => 'Ō', - 'ŏ' => 'Ŏ', - 'ő' => 'Ő', - 'œ' => 'Œ', - 'ŕ' => 'Ŕ', - 'ŗ' => 'Ŗ', - 'ř' => 'Ř', - 'ś' => 'Ś', - 'ŝ' => 'Ŝ', - 'ş' => 'Ş', - 'š' => 'Š', - 'ţ' => 'Ţ', - 'ť' => 'Ť', - 'ŧ' => 'Ŧ', - 'ũ' => 'Ũ', - 'ū' => 'Ū', - 'ŭ' => 'Ŭ', - 'ů' => 'Ů', - 'ű' => 'Ű', - 'ų' => 'Ų', - 'ŵ' => 'Ŵ', - 'ŷ' => 'Ŷ', - 'ź' => 'Ź', - 'ż' => 'Ż', - 'ž' => 'Ž', - 'ſ' => 'S', - 'ƀ' => 'Ƀ', - 'ƃ' => 'Ƃ', - 'ƅ' => 'Ƅ', - 'ƈ' => 'Ƈ', - 'ƌ' => 'Ƌ', - 'ƒ' => 'Ƒ', - 'ƕ' => 'Ƕ', - 'ƙ' => 'Ƙ', - 'ƚ' => 'Ƚ', - 'ƞ' => 'Ƞ', - 'ơ' => 'Ơ', - 'ƣ' => 'Ƣ', - 'ƥ' => 'Ƥ', - 'ƨ' => 'Ƨ', - 'ƭ' => 'Ƭ', - 'ư' => 'Ư', - 'ƴ' => 'Ƴ', - 'ƶ' => 'Ƶ', - 'ƹ' => 'Ƹ', - 'ƽ' => 'Ƽ', - 'ƿ' => 'Ƿ', - 'Dž' => 'DŽ', - 'dž' => 'DŽ', - 'Lj' => 'LJ', - 'lj' => 'LJ', - 'Nj' => 'NJ', - 'nj' => 'NJ', - 'ǎ' => 'Ǎ', - 'ǐ' => 'Ǐ', - 'ǒ' => 'Ǒ', - 'ǔ' => 'Ǔ', - 'ǖ' => 'Ǖ', - 'ǘ' => 'Ǘ', - 'ǚ' => 'Ǚ', - 'ǜ' => 'Ǜ', - 'ǝ' => 'Ǝ', - 'ǟ' => 'Ǟ', - 'ǡ' => 'Ǡ', - 'ǣ' => 'Ǣ', - 'ǥ' => 'Ǥ', - 'ǧ' => 'Ǧ', - 'ǩ' => 'Ǩ', - 'ǫ' => 'Ǫ', - 'ǭ' => 'Ǭ', - 'ǯ' => 'Ǯ', - 'Dz' => 'DZ', - 'dz' => 'DZ', - 'ǵ' => 'Ǵ', - 'ǹ' => 'Ǹ', - 'ǻ' => 'Ǻ', - 'ǽ' => 'Ǽ', - 'ǿ' => 'Ǿ', - 'ȁ' => 'Ȁ', - 'ȃ' => 'Ȃ', - 'ȅ' => 'Ȅ', - 'ȇ' => 'Ȇ', - 'ȉ' => 'Ȉ', - 'ȋ' => 'Ȋ', - 'ȍ' => 'Ȍ', - 'ȏ' => 'Ȏ', - 'ȑ' => 'Ȑ', - 'ȓ' => 'Ȓ', - 'ȕ' => 'Ȕ', - 'ȗ' => 'Ȗ', - 'ș' => 'Ș', - 'ț' => 'Ț', - 'ȝ' => 'Ȝ', - 'ȟ' => 'Ȟ', - 'ȣ' => 'Ȣ', - 'ȥ' => 'Ȥ', - 'ȧ' => 'Ȧ', - 'ȩ' => 'Ȩ', - 'ȫ' => 'Ȫ', - 'ȭ' => 'Ȭ', - 'ȯ' => 'Ȯ', - 'ȱ' => 'Ȱ', - 'ȳ' => 'Ȳ', - 'ȼ' => 'Ȼ', - 'ȿ' => 'Ȿ', - 'ɀ' => 'Ɀ', - 'ɂ' => 'Ɂ', - 'ɇ' => 'Ɇ', - 'ɉ' => 'Ɉ', - 'ɋ' => 'Ɋ', - 'ɍ' => 'Ɍ', - 'ɏ' => 'Ɏ', - 'ɐ' => 'Ɐ', - 'ɑ' => 'Ɑ', - 'ɒ' => 'Ɒ', - 'ɓ' => 'Ɓ', - 'ɔ' => 'Ɔ', - 'ɖ' => 'Ɖ', - 'ɗ' => 'Ɗ', - 'ə' => 'Ə', - 'ɛ' => 'Ɛ', - 'ɜ' => 'Ɜ', - 'ɠ' => 'Ɠ', - 'ɡ' => 'Ɡ', - 'ɣ' => 'Ɣ', - 'ɥ' => 'Ɥ', - 'ɦ' => 'Ɦ', - 'ɨ' => 'Ɨ', - 'ɩ' => 'Ɩ', - 'ɪ' => 'Ɪ', - 'ɫ' => 'Ɫ', - 'ɬ' => 'Ɬ', - 'ɯ' => 'Ɯ', - 'ɱ' => 'Ɱ', - 'ɲ' => 'Ɲ', - 'ɵ' => 'Ɵ', - 'ɽ' => 'Ɽ', - 'ʀ' => 'Ʀ', - 'ʂ' => 'Ʂ', - 'ʃ' => 'Ʃ', - 'ʇ' => 'Ʇ', - 'ʈ' => 'Ʈ', - 'ʉ' => 'Ʉ', - 'ʊ' => 'Ʊ', - 'ʋ' => 'Ʋ', - 'ʌ' => 'Ʌ', - 'ʒ' => 'Ʒ', - 'ʝ' => 'Ʝ', - 'ʞ' => 'Ʞ', - 'ͅ' => 'Ι', - 'ͱ' => 'Ͱ', - 'ͳ' => 'Ͳ', - 'ͷ' => 'Ͷ', - 'ͻ' => 'Ͻ', - 'ͼ' => 'Ͼ', - 'ͽ' => 'Ͽ', - 'ά' => 'Ά', - 'έ' => 'Έ', - 'ή' => 'Ή', - 'ί' => 'Ί', - 'α' => 'Α', - 'β' => 'Β', - 'γ' => 'Γ', - 'δ' => 'Δ', - 'ε' => 'Ε', - 'ζ' => 'Ζ', - 'η' => 'Η', - 'θ' => 'Θ', - 'ι' => 'Ι', - 'κ' => 'Κ', - 'λ' => 'Λ', - 'μ' => 'Μ', - 'ν' => 'Ν', - 'ξ' => 'Ξ', - 'ο' => 'Ο', - 'π' => 'Π', - 'ρ' => 'Ρ', - 'ς' => 'Σ', - 'σ' => 'Σ', - 'τ' => 'Τ', - 'υ' => 'Υ', - 'φ' => 'Φ', - 'χ' => 'Χ', - 'ψ' => 'Ψ', - 'ω' => 'Ω', - 'ϊ' => 'Ϊ', - 'ϋ' => 'Ϋ', - 'ό' => 'Ό', - 'ύ' => 'Ύ', - 'ώ' => 'Ώ', - 'ϐ' => 'Β', - 'ϑ' => 'Θ', - 'ϕ' => 'Φ', - 'ϖ' => 'Π', - 'ϗ' => 'Ϗ', - 'ϙ' => 'Ϙ', - 'ϛ' => 'Ϛ', - 'ϝ' => 'Ϝ', - 'ϟ' => 'Ϟ', - 'ϡ' => 'Ϡ', - 'ϣ' => 'Ϣ', - 'ϥ' => 'Ϥ', - 'ϧ' => 'Ϧ', - 'ϩ' => 'Ϩ', - 'ϫ' => 'Ϫ', - 'ϭ' => 'Ϭ', - 'ϯ' => 'Ϯ', - 'ϰ' => 'Κ', - 'ϱ' => 'Ρ', - 'ϲ' => 'Ϲ', - 'ϳ' => 'Ϳ', - 'ϵ' => 'Ε', - 'ϸ' => 'Ϸ', - 'ϻ' => 'Ϻ', - 'а' => 'А', - 'б' => 'Б', - 'в' => 'В', - 'г' => 'Г', - 'д' => 'Д', - 'е' => 'Е', - 'ж' => 'Ж', - 'з' => 'З', - 'и' => 'И', - 'й' => 'Й', - 'к' => 'К', - 'л' => 'Л', - 'м' => 'М', - 'н' => 'Н', - 'о' => 'О', - 'п' => 'П', - 'р' => 'Р', - 'с' => 'С', - 'т' => 'Т', - 'у' => 'У', - 'ф' => 'Ф', - 'х' => 'Х', - 'ц' => 'Ц', - 'ч' => 'Ч', - 'ш' => 'Ш', - 'щ' => 'Щ', - 'ъ' => 'Ъ', - 'ы' => 'Ы', - 'ь' => 'Ь', - 'э' => 'Э', - 'ю' => 'Ю', - 'я' => 'Я', - 'ѐ' => 'Ѐ', - 'ё' => 'Ё', - 'ђ' => 'Ђ', - 'ѓ' => 'Ѓ', - 'є' => 'Є', - 'ѕ' => 'Ѕ', - 'і' => 'І', - 'ї' => 'Ї', - 'ј' => 'Ј', - 'љ' => 'Љ', - 'њ' => 'Њ', - 'ћ' => 'Ћ', - 'ќ' => 'Ќ', - 'ѝ' => 'Ѝ', - 'ў' => 'Ў', - 'џ' => 'Џ', - 'ѡ' => 'Ѡ', - 'ѣ' => 'Ѣ', - 'ѥ' => 'Ѥ', - 'ѧ' => 'Ѧ', - 'ѩ' => 'Ѩ', - 'ѫ' => 'Ѫ', - 'ѭ' => 'Ѭ', - 'ѯ' => 'Ѯ', - 'ѱ' => 'Ѱ', - 'ѳ' => 'Ѳ', - 'ѵ' => 'Ѵ', - 'ѷ' => 'Ѷ', - 'ѹ' => 'Ѹ', - 'ѻ' => 'Ѻ', - 'ѽ' => 'Ѽ', - 'ѿ' => 'Ѿ', - 'ҁ' => 'Ҁ', - 'ҋ' => 'Ҋ', - 'ҍ' => 'Ҍ', - 'ҏ' => 'Ҏ', - 'ґ' => 'Ґ', - 'ғ' => 'Ғ', - 'ҕ' => 'Ҕ', - 'җ' => 'Җ', - 'ҙ' => 'Ҙ', - 'қ' => 'Қ', - 'ҝ' => 'Ҝ', - 'ҟ' => 'Ҟ', - 'ҡ' => 'Ҡ', - 'ң' => 'Ң', - 'ҥ' => 'Ҥ', - 'ҧ' => 'Ҧ', - 'ҩ' => 'Ҩ', - 'ҫ' => 'Ҫ', - 'ҭ' => 'Ҭ', - 'ү' => 'Ү', - 'ұ' => 'Ұ', - 'ҳ' => 'Ҳ', - 'ҵ' => 'Ҵ', - 'ҷ' => 'Ҷ', - 'ҹ' => 'Ҹ', - 'һ' => 'Һ', - 'ҽ' => 'Ҽ', - 'ҿ' => 'Ҿ', - 'ӂ' => 'Ӂ', - 'ӄ' => 'Ӄ', - 'ӆ' => 'Ӆ', - 'ӈ' => 'Ӈ', - 'ӊ' => 'Ӊ', - 'ӌ' => 'Ӌ', - 'ӎ' => 'Ӎ', - 'ӏ' => 'Ӏ', - 'ӑ' => 'Ӑ', - 'ӓ' => 'Ӓ', - 'ӕ' => 'Ӕ', - 'ӗ' => 'Ӗ', - 'ә' => 'Ә', - 'ӛ' => 'Ӛ', - 'ӝ' => 'Ӝ', - 'ӟ' => 'Ӟ', - 'ӡ' => 'Ӡ', - 'ӣ' => 'Ӣ', - 'ӥ' => 'Ӥ', - 'ӧ' => 'Ӧ', - 'ө' => 'Ө', - 'ӫ' => 'Ӫ', - 'ӭ' => 'Ӭ', - 'ӯ' => 'Ӯ', - 'ӱ' => 'Ӱ', - 'ӳ' => 'Ӳ', - 'ӵ' => 'Ӵ', - 'ӷ' => 'Ӷ', - 'ӹ' => 'Ӹ', - 'ӻ' => 'Ӻ', - 'ӽ' => 'Ӽ', - 'ӿ' => 'Ӿ', - 'ԁ' => 'Ԁ', - 'ԃ' => 'Ԃ', - 'ԅ' => 'Ԅ', - 'ԇ' => 'Ԇ', - 'ԉ' => 'Ԉ', - 'ԋ' => 'Ԋ', - 'ԍ' => 'Ԍ', - 'ԏ' => 'Ԏ', - 'ԑ' => 'Ԑ', - 'ԓ' => 'Ԓ', - 'ԕ' => 'Ԕ', - 'ԗ' => 'Ԗ', - 'ԙ' => 'Ԙ', - 'ԛ' => 'Ԛ', - 'ԝ' => 'Ԝ', - 'ԟ' => 'Ԟ', - 'ԡ' => 'Ԡ', - 'ԣ' => 'Ԣ', - 'ԥ' => 'Ԥ', - 'ԧ' => 'Ԧ', - 'ԩ' => 'Ԩ', - 'ԫ' => 'Ԫ', - 'ԭ' => 'Ԭ', - 'ԯ' => 'Ԯ', - 'ա' => 'Ա', - 'բ' => 'Բ', - 'գ' => 'Գ', - 'դ' => 'Դ', - 'ե' => 'Ե', - 'զ' => 'Զ', - 'է' => 'Է', - 'ը' => 'Ը', - 'թ' => 'Թ', - 'ժ' => 'Ժ', - 'ի' => 'Ի', - 'լ' => 'Լ', - 'խ' => 'Խ', - 'ծ' => 'Ծ', - 'կ' => 'Կ', - 'հ' => 'Հ', - 'ձ' => 'Ձ', - 'ղ' => 'Ղ', - 'ճ' => 'Ճ', - 'մ' => 'Մ', - 'յ' => 'Յ', - 'ն' => 'Ն', - 'շ' => 'Շ', - 'ո' => 'Ո', - 'չ' => 'Չ', - 'պ' => 'Պ', - 'ջ' => 'Ջ', - 'ռ' => 'Ռ', - 'ս' => 'Ս', - 'վ' => 'Վ', - 'տ' => 'Տ', - 'ր' => 'Ր', - 'ց' => 'Ց', - 'ւ' => 'Ւ', - 'փ' => 'Փ', - 'ք' => 'Ք', - 'օ' => 'Օ', - 'ֆ' => 'Ֆ', - 'ა' => 'Ა', - 'ბ' => 'Ბ', - 'გ' => 'Გ', - 'დ' => 'Დ', - 'ე' => 'Ე', - 'ვ' => 'Ვ', - 'ზ' => 'Ზ', - 'თ' => 'Თ', - 'ი' => 'Ი', - 'კ' => 'Კ', - 'ლ' => 'Ლ', - 'მ' => 'Მ', - 'ნ' => 'Ნ', - 'ო' => 'Ო', - 'პ' => 'Პ', - 'ჟ' => 'Ჟ', - 'რ' => 'Რ', - 'ს' => 'Ს', - 'ტ' => 'Ტ', - 'უ' => 'Უ', - 'ფ' => 'Ფ', - 'ქ' => 'Ქ', - 'ღ' => 'Ღ', - 'ყ' => 'Ყ', - 'შ' => 'Შ', - 'ჩ' => 'Ჩ', - 'ც' => 'Ც', - 'ძ' => 'Ძ', - 'წ' => 'Წ', - 'ჭ' => 'Ჭ', - 'ხ' => 'Ხ', - 'ჯ' => 'Ჯ', - 'ჰ' => 'Ჰ', - 'ჱ' => 'Ჱ', - 'ჲ' => 'Ჲ', - 'ჳ' => 'Ჳ', - 'ჴ' => 'Ჴ', - 'ჵ' => 'Ჵ', - 'ჶ' => 'Ჶ', - 'ჷ' => 'Ჷ', - 'ჸ' => 'Ჸ', - 'ჹ' => 'Ჹ', - 'ჺ' => 'Ჺ', - 'ჽ' => 'Ჽ', - 'ჾ' => 'Ჾ', - 'ჿ' => 'Ჿ', - 'ᏸ' => 'Ᏸ', - 'ᏹ' => 'Ᏹ', - 'ᏺ' => 'Ᏺ', - 'ᏻ' => 'Ᏻ', - 'ᏼ' => 'Ᏼ', - 'ᏽ' => 'Ᏽ', - 'ᲀ' => 'В', - 'ᲁ' => 'Д', - 'ᲂ' => 'О', - 'ᲃ' => 'С', - 'ᲄ' => 'Т', - 'ᲅ' => 'Т', - 'ᲆ' => 'Ъ', - 'ᲇ' => 'Ѣ', - 'ᲈ' => 'Ꙋ', - 'ᵹ' => 'Ᵹ', - 'ᵽ' => 'Ᵽ', - 'ᶎ' => 'Ᶎ', - 'ḁ' => 'Ḁ', - 'ḃ' => 'Ḃ', - 'ḅ' => 'Ḅ', - 'ḇ' => 'Ḇ', - 'ḉ' => 'Ḉ', - 'ḋ' => 'Ḋ', - 'ḍ' => 'Ḍ', - 'ḏ' => 'Ḏ', - 'ḑ' => 'Ḑ', - 'ḓ' => 'Ḓ', - 'ḕ' => 'Ḕ', - 'ḗ' => 'Ḗ', - 'ḙ' => 'Ḙ', - 'ḛ' => 'Ḛ', - 'ḝ' => 'Ḝ', - 'ḟ' => 'Ḟ', - 'ḡ' => 'Ḡ', - 'ḣ' => 'Ḣ', - 'ḥ' => 'Ḥ', - 'ḧ' => 'Ḧ', - 'ḩ' => 'Ḩ', - 'ḫ' => 'Ḫ', - 'ḭ' => 'Ḭ', - 'ḯ' => 'Ḯ', - 'ḱ' => 'Ḱ', - 'ḳ' => 'Ḳ', - 'ḵ' => 'Ḵ', - 'ḷ' => 'Ḷ', - 'ḹ' => 'Ḹ', - 'ḻ' => 'Ḻ', - 'ḽ' => 'Ḽ', - 'ḿ' => 'Ḿ', - 'ṁ' => 'Ṁ', - 'ṃ' => 'Ṃ', - 'ṅ' => 'Ṅ', - 'ṇ' => 'Ṇ', - 'ṉ' => 'Ṉ', - 'ṋ' => 'Ṋ', - 'ṍ' => 'Ṍ', - 'ṏ' => 'Ṏ', - 'ṑ' => 'Ṑ', - 'ṓ' => 'Ṓ', - 'ṕ' => 'Ṕ', - 'ṗ' => 'Ṗ', - 'ṙ' => 'Ṙ', - 'ṛ' => 'Ṛ', - 'ṝ' => 'Ṝ', - 'ṟ' => 'Ṟ', - 'ṡ' => 'Ṡ', - 'ṣ' => 'Ṣ', - 'ṥ' => 'Ṥ', - 'ṧ' => 'Ṧ', - 'ṩ' => 'Ṩ', - 'ṫ' => 'Ṫ', - 'ṭ' => 'Ṭ', - 'ṯ' => 'Ṯ', - 'ṱ' => 'Ṱ', - 'ṳ' => 'Ṳ', - 'ṵ' => 'Ṵ', - 'ṷ' => 'Ṷ', - 'ṹ' => 'Ṹ', - 'ṻ' => 'Ṻ', - 'ṽ' => 'Ṽ', - 'ṿ' => 'Ṿ', - 'ẁ' => 'Ẁ', - 'ẃ' => 'Ẃ', - 'ẅ' => 'Ẅ', - 'ẇ' => 'Ẇ', - 'ẉ' => 'Ẉ', - 'ẋ' => 'Ẋ', - 'ẍ' => 'Ẍ', - 'ẏ' => 'Ẏ', - 'ẑ' => 'Ẑ', - 'ẓ' => 'Ẓ', - 'ẕ' => 'Ẕ', - 'ẛ' => 'Ṡ', - 'ạ' => 'Ạ', - 'ả' => 'Ả', - 'ấ' => 'Ấ', - 'ầ' => 'Ầ', - 'ẩ' => 'Ẩ', - 'ẫ' => 'Ẫ', - 'ậ' => 'Ậ', - 'ắ' => 'Ắ', - 'ằ' => 'Ằ', - 'ẳ' => 'Ẳ', - 'ẵ' => 'Ẵ', - 'ặ' => 'Ặ', - 'ẹ' => 'Ẹ', - 'ẻ' => 'Ẻ', - 'ẽ' => 'Ẽ', - 'ế' => 'Ế', - 'ề' => 'Ề', - 'ể' => 'Ể', - 'ễ' => 'Ễ', - 'ệ' => 'Ệ', - 'ỉ' => 'Ỉ', - 'ị' => 'Ị', - 'ọ' => 'Ọ', - 'ỏ' => 'Ỏ', - 'ố' => 'Ố', - 'ồ' => 'Ồ', - 'ổ' => 'Ổ', - 'ỗ' => 'Ỗ', - 'ộ' => 'Ộ', - 'ớ' => 'Ớ', - 'ờ' => 'Ờ', - 'ở' => 'Ở', - 'ỡ' => 'Ỡ', - 'ợ' => 'Ợ', - 'ụ' => 'Ụ', - 'ủ' => 'Ủ', - 'ứ' => 'Ứ', - 'ừ' => 'Ừ', - 'ử' => 'Ử', - 'ữ' => 'Ữ', - 'ự' => 'Ự', - 'ỳ' => 'Ỳ', - 'ỵ' => 'Ỵ', - 'ỷ' => 'Ỷ', - 'ỹ' => 'Ỹ', - 'ỻ' => 'Ỻ', - 'ỽ' => 'Ỽ', - 'ỿ' => 'Ỿ', - 'ἀ' => 'Ἀ', - 'ἁ' => 'Ἁ', - 'ἂ' => 'Ἂ', - 'ἃ' => 'Ἃ', - 'ἄ' => 'Ἄ', - 'ἅ' => 'Ἅ', - 'ἆ' => 'Ἆ', - 'ἇ' => 'Ἇ', - 'ἐ' => 'Ἐ', - 'ἑ' => 'Ἑ', - 'ἒ' => 'Ἒ', - 'ἓ' => 'Ἓ', - 'ἔ' => 'Ἔ', - 'ἕ' => 'Ἕ', - 'ἠ' => 'Ἠ', - 'ἡ' => 'Ἡ', - 'ἢ' => 'Ἢ', - 'ἣ' => 'Ἣ', - 'ἤ' => 'Ἤ', - 'ἥ' => 'Ἥ', - 'ἦ' => 'Ἦ', - 'ἧ' => 'Ἧ', - 'ἰ' => 'Ἰ', - 'ἱ' => 'Ἱ', - 'ἲ' => 'Ἲ', - 'ἳ' => 'Ἳ', - 'ἴ' => 'Ἴ', - 'ἵ' => 'Ἵ', - 'ἶ' => 'Ἶ', - 'ἷ' => 'Ἷ', - 'ὀ' => 'Ὀ', - 'ὁ' => 'Ὁ', - 'ὂ' => 'Ὂ', - 'ὃ' => 'Ὃ', - 'ὄ' => 'Ὄ', - 'ὅ' => 'Ὅ', - 'ὑ' => 'Ὑ', - 'ὓ' => 'Ὓ', - 'ὕ' => 'Ὕ', - 'ὗ' => 'Ὗ', - 'ὠ' => 'Ὠ', - 'ὡ' => 'Ὡ', - 'ὢ' => 'Ὢ', - 'ὣ' => 'Ὣ', - 'ὤ' => 'Ὤ', - 'ὥ' => 'Ὥ', - 'ὦ' => 'Ὦ', - 'ὧ' => 'Ὧ', - 'ὰ' => 'Ὰ', - 'ά' => 'Ά', - 'ὲ' => 'Ὲ', - 'έ' => 'Έ', - 'ὴ' => 'Ὴ', - 'ή' => 'Ή', - 'ὶ' => 'Ὶ', - 'ί' => 'Ί', - 'ὸ' => 'Ὸ', - 'ό' => 'Ό', - 'ὺ' => 'Ὺ', - 'ύ' => 'Ύ', - 'ὼ' => 'Ὼ', - 'ώ' => 'Ώ', - 'ᾀ' => 'ἈΙ', - 'ᾁ' => 'ἉΙ', - 'ᾂ' => 'ἊΙ', - 'ᾃ' => 'ἋΙ', - 'ᾄ' => 'ἌΙ', - 'ᾅ' => 'ἍΙ', - 'ᾆ' => 'ἎΙ', - 'ᾇ' => 'ἏΙ', - 'ᾐ' => 'ἨΙ', - 'ᾑ' => 'ἩΙ', - 'ᾒ' => 'ἪΙ', - 'ᾓ' => 'ἫΙ', - 'ᾔ' => 'ἬΙ', - 'ᾕ' => 'ἭΙ', - 'ᾖ' => 'ἮΙ', - 'ᾗ' => 'ἯΙ', - 'ᾠ' => 'ὨΙ', - 'ᾡ' => 'ὩΙ', - 'ᾢ' => 'ὪΙ', - 'ᾣ' => 'ὫΙ', - 'ᾤ' => 'ὬΙ', - 'ᾥ' => 'ὭΙ', - 'ᾦ' => 'ὮΙ', - 'ᾧ' => 'ὯΙ', - 'ᾰ' => 'Ᾰ', - 'ᾱ' => 'Ᾱ', - 'ᾳ' => 'ΑΙ', - 'ι' => 'Ι', - 'ῃ' => 'ΗΙ', - 'ῐ' => 'Ῐ', - 'ῑ' => 'Ῑ', - 'ῠ' => 'Ῠ', - 'ῡ' => 'Ῡ', - 'ῥ' => 'Ῥ', - 'ῳ' => 'ΩΙ', - 'ⅎ' => 'Ⅎ', - 'ⅰ' => 'Ⅰ', - 'ⅱ' => 'Ⅱ', - 'ⅲ' => 'Ⅲ', - 'ⅳ' => 'Ⅳ', - 'ⅴ' => 'Ⅴ', - 'ⅵ' => 'Ⅵ', - 'ⅶ' => 'Ⅶ', - 'ⅷ' => 'Ⅷ', - 'ⅸ' => 'Ⅸ', - 'ⅹ' => 'Ⅹ', - 'ⅺ' => 'Ⅺ', - 'ⅻ' => 'Ⅻ', - 'ⅼ' => 'Ⅼ', - 'ⅽ' => 'Ⅽ', - 'ⅾ' => 'Ⅾ', - 'ⅿ' => 'Ⅿ', - 'ↄ' => 'Ↄ', - 'ⓐ' => 'Ⓐ', - 'ⓑ' => 'Ⓑ', - 'ⓒ' => 'Ⓒ', - 'ⓓ' => 'Ⓓ', - 'ⓔ' => 'Ⓔ', - 'ⓕ' => 'Ⓕ', - 'ⓖ' => 'Ⓖ', - 'ⓗ' => 'Ⓗ', - 'ⓘ' => 'Ⓘ', - 'ⓙ' => 'Ⓙ', - 'ⓚ' => 'Ⓚ', - 'ⓛ' => 'Ⓛ', - 'ⓜ' => 'Ⓜ', - 'ⓝ' => 'Ⓝ', - 'ⓞ' => 'Ⓞ', - 'ⓟ' => 'Ⓟ', - 'ⓠ' => 'Ⓠ', - 'ⓡ' => 'Ⓡ', - 'ⓢ' => 'Ⓢ', - 'ⓣ' => 'Ⓣ', - 'ⓤ' => 'Ⓤ', - 'ⓥ' => 'Ⓥ', - 'ⓦ' => 'Ⓦ', - 'ⓧ' => 'Ⓧ', - 'ⓨ' => 'Ⓨ', - 'ⓩ' => 'Ⓩ', - 'ⰰ' => 'Ⰰ', - 'ⰱ' => 'Ⰱ', - 'ⰲ' => 'Ⰲ', - 'ⰳ' => 'Ⰳ', - 'ⰴ' => 'Ⰴ', - 'ⰵ' => 'Ⰵ', - 'ⰶ' => 'Ⰶ', - 'ⰷ' => 'Ⰷ', - 'ⰸ' => 'Ⰸ', - 'ⰹ' => 'Ⰹ', - 'ⰺ' => 'Ⰺ', - 'ⰻ' => 'Ⰻ', - 'ⰼ' => 'Ⰼ', - 'ⰽ' => 'Ⰽ', - 'ⰾ' => 'Ⰾ', - 'ⰿ' => 'Ⰿ', - 'ⱀ' => 'Ⱀ', - 'ⱁ' => 'Ⱁ', - 'ⱂ' => 'Ⱂ', - 'ⱃ' => 'Ⱃ', - 'ⱄ' => 'Ⱄ', - 'ⱅ' => 'Ⱅ', - 'ⱆ' => 'Ⱆ', - 'ⱇ' => 'Ⱇ', - 'ⱈ' => 'Ⱈ', - 'ⱉ' => 'Ⱉ', - 'ⱊ' => 'Ⱊ', - 'ⱋ' => 'Ⱋ', - 'ⱌ' => 'Ⱌ', - 'ⱍ' => 'Ⱍ', - 'ⱎ' => 'Ⱎ', - 'ⱏ' => 'Ⱏ', - 'ⱐ' => 'Ⱐ', - 'ⱑ' => 'Ⱑ', - 'ⱒ' => 'Ⱒ', - 'ⱓ' => 'Ⱓ', - 'ⱔ' => 'Ⱔ', - 'ⱕ' => 'Ⱕ', - 'ⱖ' => 'Ⱖ', - 'ⱗ' => 'Ⱗ', - 'ⱘ' => 'Ⱘ', - 'ⱙ' => 'Ⱙ', - 'ⱚ' => 'Ⱚ', - 'ⱛ' => 'Ⱛ', - 'ⱜ' => 'Ⱜ', - 'ⱝ' => 'Ⱝ', - 'ⱞ' => 'Ⱞ', - 'ⱡ' => 'Ⱡ', - 'ⱥ' => 'Ⱥ', - 'ⱦ' => 'Ⱦ', - 'ⱨ' => 'Ⱨ', - 'ⱪ' => 'Ⱪ', - 'ⱬ' => 'Ⱬ', - 'ⱳ' => 'Ⱳ', - 'ⱶ' => 'Ⱶ', - 'ⲁ' => 'Ⲁ', - 'ⲃ' => 'Ⲃ', - 'ⲅ' => 'Ⲅ', - 'ⲇ' => 'Ⲇ', - 'ⲉ' => 'Ⲉ', - 'ⲋ' => 'Ⲋ', - 'ⲍ' => 'Ⲍ', - 'ⲏ' => 'Ⲏ', - 'ⲑ' => 'Ⲑ', - 'ⲓ' => 'Ⲓ', - 'ⲕ' => 'Ⲕ', - 'ⲗ' => 'Ⲗ', - 'ⲙ' => 'Ⲙ', - 'ⲛ' => 'Ⲛ', - 'ⲝ' => 'Ⲝ', - 'ⲟ' => 'Ⲟ', - 'ⲡ' => 'Ⲡ', - 'ⲣ' => 'Ⲣ', - 'ⲥ' => 'Ⲥ', - 'ⲧ' => 'Ⲧ', - 'ⲩ' => 'Ⲩ', - 'ⲫ' => 'Ⲫ', - 'ⲭ' => 'Ⲭ', - 'ⲯ' => 'Ⲯ', - 'ⲱ' => 'Ⲱ', - 'ⲳ' => 'Ⲳ', - 'ⲵ' => 'Ⲵ', - 'ⲷ' => 'Ⲷ', - 'ⲹ' => 'Ⲹ', - 'ⲻ' => 'Ⲻ', - 'ⲽ' => 'Ⲽ', - 'ⲿ' => 'Ⲿ', - 'ⳁ' => 'Ⳁ', - 'ⳃ' => 'Ⳃ', - 'ⳅ' => 'Ⳅ', - 'ⳇ' => 'Ⳇ', - 'ⳉ' => 'Ⳉ', - 'ⳋ' => 'Ⳋ', - 'ⳍ' => 'Ⳍ', - 'ⳏ' => 'Ⳏ', - 'ⳑ' => 'Ⳑ', - 'ⳓ' => 'Ⳓ', - 'ⳕ' => 'Ⳕ', - 'ⳗ' => 'Ⳗ', - 'ⳙ' => 'Ⳙ', - 'ⳛ' => 'Ⳛ', - 'ⳝ' => 'Ⳝ', - 'ⳟ' => 'Ⳟ', - 'ⳡ' => 'Ⳡ', - 'ⳣ' => 'Ⳣ', - 'ⳬ' => 'Ⳬ', - 'ⳮ' => 'Ⳮ', - 'ⳳ' => 'Ⳳ', - 'ⴀ' => 'Ⴀ', - 'ⴁ' => 'Ⴁ', - 'ⴂ' => 'Ⴂ', - 'ⴃ' => 'Ⴃ', - 'ⴄ' => 'Ⴄ', - 'ⴅ' => 'Ⴅ', - 'ⴆ' => 'Ⴆ', - 'ⴇ' => 'Ⴇ', - 'ⴈ' => 'Ⴈ', - 'ⴉ' => 'Ⴉ', - 'ⴊ' => 'Ⴊ', - 'ⴋ' => 'Ⴋ', - 'ⴌ' => 'Ⴌ', - 'ⴍ' => 'Ⴍ', - 'ⴎ' => 'Ⴎ', - 'ⴏ' => 'Ⴏ', - 'ⴐ' => 'Ⴐ', - 'ⴑ' => 'Ⴑ', - 'ⴒ' => 'Ⴒ', - 'ⴓ' => 'Ⴓ', - 'ⴔ' => 'Ⴔ', - 'ⴕ' => 'Ⴕ', - 'ⴖ' => 'Ⴖ', - 'ⴗ' => 'Ⴗ', - 'ⴘ' => 'Ⴘ', - 'ⴙ' => 'Ⴙ', - 'ⴚ' => 'Ⴚ', - 'ⴛ' => 'Ⴛ', - 'ⴜ' => 'Ⴜ', - 'ⴝ' => 'Ⴝ', - 'ⴞ' => 'Ⴞ', - 'ⴟ' => 'Ⴟ', - 'ⴠ' => 'Ⴠ', - 'ⴡ' => 'Ⴡ', - 'ⴢ' => 'Ⴢ', - 'ⴣ' => 'Ⴣ', - 'ⴤ' => 'Ⴤ', - 'ⴥ' => 'Ⴥ', - 'ⴧ' => 'Ⴧ', - 'ⴭ' => 'Ⴭ', - 'ꙁ' => 'Ꙁ', - 'ꙃ' => 'Ꙃ', - 'ꙅ' => 'Ꙅ', - 'ꙇ' => 'Ꙇ', - 'ꙉ' => 'Ꙉ', - 'ꙋ' => 'Ꙋ', - 'ꙍ' => 'Ꙍ', - 'ꙏ' => 'Ꙏ', - 'ꙑ' => 'Ꙑ', - 'ꙓ' => 'Ꙓ', - 'ꙕ' => 'Ꙕ', - 'ꙗ' => 'Ꙗ', - 'ꙙ' => 'Ꙙ', - 'ꙛ' => 'Ꙛ', - 'ꙝ' => 'Ꙝ', - 'ꙟ' => 'Ꙟ', - 'ꙡ' => 'Ꙡ', - 'ꙣ' => 'Ꙣ', - 'ꙥ' => 'Ꙥ', - 'ꙧ' => 'Ꙧ', - 'ꙩ' => 'Ꙩ', - 'ꙫ' => 'Ꙫ', - 'ꙭ' => 'Ꙭ', - 'ꚁ' => 'Ꚁ', - 'ꚃ' => 'Ꚃ', - 'ꚅ' => 'Ꚅ', - 'ꚇ' => 'Ꚇ', - 'ꚉ' => 'Ꚉ', - 'ꚋ' => 'Ꚋ', - 'ꚍ' => 'Ꚍ', - 'ꚏ' => 'Ꚏ', - 'ꚑ' => 'Ꚑ', - 'ꚓ' => 'Ꚓ', - 'ꚕ' => 'Ꚕ', - 'ꚗ' => 'Ꚗ', - 'ꚙ' => 'Ꚙ', - 'ꚛ' => 'Ꚛ', - 'ꜣ' => 'Ꜣ', - 'ꜥ' => 'Ꜥ', - 'ꜧ' => 'Ꜧ', - 'ꜩ' => 'Ꜩ', - 'ꜫ' => 'Ꜫ', - 'ꜭ' => 'Ꜭ', - 'ꜯ' => 'Ꜯ', - 'ꜳ' => 'Ꜳ', - 'ꜵ' => 'Ꜵ', - 'ꜷ' => 'Ꜷ', - 'ꜹ' => 'Ꜹ', - 'ꜻ' => 'Ꜻ', - 'ꜽ' => 'Ꜽ', - 'ꜿ' => 'Ꜿ', - 'ꝁ' => 'Ꝁ', - 'ꝃ' => 'Ꝃ', - 'ꝅ' => 'Ꝅ', - 'ꝇ' => 'Ꝇ', - 'ꝉ' => 'Ꝉ', - 'ꝋ' => 'Ꝋ', - 'ꝍ' => 'Ꝍ', - 'ꝏ' => 'Ꝏ', - 'ꝑ' => 'Ꝑ', - 'ꝓ' => 'Ꝓ', - 'ꝕ' => 'Ꝕ', - 'ꝗ' => 'Ꝗ', - 'ꝙ' => 'Ꝙ', - 'ꝛ' => 'Ꝛ', - 'ꝝ' => 'Ꝝ', - 'ꝟ' => 'Ꝟ', - 'ꝡ' => 'Ꝡ', - 'ꝣ' => 'Ꝣ', - 'ꝥ' => 'Ꝥ', - 'ꝧ' => 'Ꝧ', - 'ꝩ' => 'Ꝩ', - 'ꝫ' => 'Ꝫ', - 'ꝭ' => 'Ꝭ', - 'ꝯ' => 'Ꝯ', - 'ꝺ' => 'Ꝺ', - 'ꝼ' => 'Ꝼ', - 'ꝿ' => 'Ꝿ', - 'ꞁ' => 'Ꞁ', - 'ꞃ' => 'Ꞃ', - 'ꞅ' => 'Ꞅ', - 'ꞇ' => 'Ꞇ', - 'ꞌ' => 'Ꞌ', - 'ꞑ' => 'Ꞑ', - 'ꞓ' => 'Ꞓ', - 'ꞔ' => 'Ꞔ', - 'ꞗ' => 'Ꞗ', - 'ꞙ' => 'Ꞙ', - 'ꞛ' => 'Ꞛ', - 'ꞝ' => 'Ꞝ', - 'ꞟ' => 'Ꞟ', - 'ꞡ' => 'Ꞡ', - 'ꞣ' => 'Ꞣ', - 'ꞥ' => 'Ꞥ', - 'ꞧ' => 'Ꞧ', - 'ꞩ' => 'Ꞩ', - 'ꞵ' => 'Ꞵ', - 'ꞷ' => 'Ꞷ', - 'ꞹ' => 'Ꞹ', - 'ꞻ' => 'Ꞻ', - 'ꞽ' => 'Ꞽ', - 'ꞿ' => 'Ꞿ', - 'ꟃ' => 'Ꟃ', - 'ꟈ' => 'Ꟈ', - 'ꟊ' => 'Ꟊ', - 'ꟶ' => 'Ꟶ', - 'ꭓ' => 'Ꭓ', - 'ꭰ' => 'Ꭰ', - 'ꭱ' => 'Ꭱ', - 'ꭲ' => 'Ꭲ', - 'ꭳ' => 'Ꭳ', - 'ꭴ' => 'Ꭴ', - 'ꭵ' => 'Ꭵ', - 'ꭶ' => 'Ꭶ', - 'ꭷ' => 'Ꭷ', - 'ꭸ' => 'Ꭸ', - 'ꭹ' => 'Ꭹ', - 'ꭺ' => 'Ꭺ', - 'ꭻ' => 'Ꭻ', - 'ꭼ' => 'Ꭼ', - 'ꭽ' => 'Ꭽ', - 'ꭾ' => 'Ꭾ', - 'ꭿ' => 'Ꭿ', - 'ꮀ' => 'Ꮀ', - 'ꮁ' => 'Ꮁ', - 'ꮂ' => 'Ꮂ', - 'ꮃ' => 'Ꮃ', - 'ꮄ' => 'Ꮄ', - 'ꮅ' => 'Ꮅ', - 'ꮆ' => 'Ꮆ', - 'ꮇ' => 'Ꮇ', - 'ꮈ' => 'Ꮈ', - 'ꮉ' => 'Ꮉ', - 'ꮊ' => 'Ꮊ', - 'ꮋ' => 'Ꮋ', - 'ꮌ' => 'Ꮌ', - 'ꮍ' => 'Ꮍ', - 'ꮎ' => 'Ꮎ', - 'ꮏ' => 'Ꮏ', - 'ꮐ' => 'Ꮐ', - 'ꮑ' => 'Ꮑ', - 'ꮒ' => 'Ꮒ', - 'ꮓ' => 'Ꮓ', - 'ꮔ' => 'Ꮔ', - 'ꮕ' => 'Ꮕ', - 'ꮖ' => 'Ꮖ', - 'ꮗ' => 'Ꮗ', - 'ꮘ' => 'Ꮘ', - 'ꮙ' => 'Ꮙ', - 'ꮚ' => 'Ꮚ', - 'ꮛ' => 'Ꮛ', - 'ꮜ' => 'Ꮜ', - 'ꮝ' => 'Ꮝ', - 'ꮞ' => 'Ꮞ', - 'ꮟ' => 'Ꮟ', - 'ꮠ' => 'Ꮠ', - 'ꮡ' => 'Ꮡ', - 'ꮢ' => 'Ꮢ', - 'ꮣ' => 'Ꮣ', - 'ꮤ' => 'Ꮤ', - 'ꮥ' => 'Ꮥ', - 'ꮦ' => 'Ꮦ', - 'ꮧ' => 'Ꮧ', - 'ꮨ' => 'Ꮨ', - 'ꮩ' => 'Ꮩ', - 'ꮪ' => 'Ꮪ', - 'ꮫ' => 'Ꮫ', - 'ꮬ' => 'Ꮬ', - 'ꮭ' => 'Ꮭ', - 'ꮮ' => 'Ꮮ', - 'ꮯ' => 'Ꮯ', - 'ꮰ' => 'Ꮰ', - 'ꮱ' => 'Ꮱ', - 'ꮲ' => 'Ꮲ', - 'ꮳ' => 'Ꮳ', - 'ꮴ' => 'Ꮴ', - 'ꮵ' => 'Ꮵ', - 'ꮶ' => 'Ꮶ', - 'ꮷ' => 'Ꮷ', - 'ꮸ' => 'Ꮸ', - 'ꮹ' => 'Ꮹ', - 'ꮺ' => 'Ꮺ', - 'ꮻ' => 'Ꮻ', - 'ꮼ' => 'Ꮼ', - 'ꮽ' => 'Ꮽ', - 'ꮾ' => 'Ꮾ', - 'ꮿ' => 'Ꮿ', - 'a' => 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - '𐐨' => '𐐀', - '𐐩' => '𐐁', - '𐐪' => '𐐂', - '𐐫' => '𐐃', - '𐐬' => '𐐄', - '𐐭' => '𐐅', - '𐐮' => '𐐆', - '𐐯' => '𐐇', - '𐐰' => '𐐈', - '𐐱' => '𐐉', - '𐐲' => '𐐊', - '𐐳' => '𐐋', - '𐐴' => '𐐌', - '𐐵' => '𐐍', - '𐐶' => '𐐎', - '𐐷' => '𐐏', - '𐐸' => '𐐐', - '𐐹' => '𐐑', - '𐐺' => '𐐒', - '𐐻' => '𐐓', - '𐐼' => '𐐔', - '𐐽' => '𐐕', - '𐐾' => '𐐖', - '𐐿' => '𐐗', - '𐑀' => '𐐘', - '𐑁' => '𐐙', - '𐑂' => '𐐚', - '𐑃' => '𐐛', - '𐑄' => '𐐜', - '𐑅' => '𐐝', - '𐑆' => '𐐞', - '𐑇' => '𐐟', - '𐑈' => '𐐠', - '𐑉' => '𐐡', - '𐑊' => '𐐢', - '𐑋' => '𐐣', - '𐑌' => '𐐤', - '𐑍' => '𐐥', - '𐑎' => '𐐦', - '𐑏' => '𐐧', - '𐓘' => '𐒰', - '𐓙' => '𐒱', - '𐓚' => '𐒲', - '𐓛' => '𐒳', - '𐓜' => '𐒴', - '𐓝' => '𐒵', - '𐓞' => '𐒶', - '𐓟' => '𐒷', - '𐓠' => '𐒸', - '𐓡' => '𐒹', - '𐓢' => '𐒺', - '𐓣' => '𐒻', - '𐓤' => '𐒼', - '𐓥' => '𐒽', - '𐓦' => '𐒾', - '𐓧' => '𐒿', - '𐓨' => '𐓀', - '𐓩' => '𐓁', - '𐓪' => '𐓂', - '𐓫' => '𐓃', - '𐓬' => '𐓄', - '𐓭' => '𐓅', - '𐓮' => '𐓆', - '𐓯' => '𐓇', - '𐓰' => '𐓈', - '𐓱' => '𐓉', - '𐓲' => '𐓊', - '𐓳' => '𐓋', - '𐓴' => '𐓌', - '𐓵' => '𐓍', - '𐓶' => '𐓎', - '𐓷' => '𐓏', - '𐓸' => '𐓐', - '𐓹' => '𐓑', - '𐓺' => '𐓒', - '𐓻' => '𐓓', - '𐳀' => '𐲀', - '𐳁' => '𐲁', - '𐳂' => '𐲂', - '𐳃' => '𐲃', - '𐳄' => '𐲄', - '𐳅' => '𐲅', - '𐳆' => '𐲆', - '𐳇' => '𐲇', - '𐳈' => '𐲈', - '𐳉' => '𐲉', - '𐳊' => '𐲊', - '𐳋' => '𐲋', - '𐳌' => '𐲌', - '𐳍' => '𐲍', - '𐳎' => '𐲎', - '𐳏' => '𐲏', - '𐳐' => '𐲐', - '𐳑' => '𐲑', - '𐳒' => '𐲒', - '𐳓' => '𐲓', - '𐳔' => '𐲔', - '𐳕' => '𐲕', - '𐳖' => '𐲖', - '𐳗' => '𐲗', - '𐳘' => '𐲘', - '𐳙' => '𐲙', - '𐳚' => '𐲚', - '𐳛' => '𐲛', - '𐳜' => '𐲜', - '𐳝' => '𐲝', - '𐳞' => '𐲞', - '𐳟' => '𐲟', - '𐳠' => '𐲠', - '𐳡' => '𐲡', - '𐳢' => '𐲢', - '𐳣' => '𐲣', - '𐳤' => '𐲤', - '𐳥' => '𐲥', - '𐳦' => '𐲦', - '𐳧' => '𐲧', - '𐳨' => '𐲨', - '𐳩' => '𐲩', - '𐳪' => '𐲪', - '𐳫' => '𐲫', - '𐳬' => '𐲬', - '𐳭' => '𐲭', - '𐳮' => '𐲮', - '𐳯' => '𐲯', - '𐳰' => '𐲰', - '𐳱' => '𐲱', - '𐳲' => '𐲲', - '𑣀' => '𑢠', - '𑣁' => '𑢡', - '𑣂' => '𑢢', - '𑣃' => '𑢣', - '𑣄' => '𑢤', - '𑣅' => '𑢥', - '𑣆' => '𑢦', - '𑣇' => '𑢧', - '𑣈' => '𑢨', - '𑣉' => '𑢩', - '𑣊' => '𑢪', - '𑣋' => '𑢫', - '𑣌' => '𑢬', - '𑣍' => '𑢭', - '𑣎' => '𑢮', - '𑣏' => '𑢯', - '𑣐' => '𑢰', - '𑣑' => '𑢱', - '𑣒' => '𑢲', - '𑣓' => '𑢳', - '𑣔' => '𑢴', - '𑣕' => '𑢵', - '𑣖' => '𑢶', - '𑣗' => '𑢷', - '𑣘' => '𑢸', - '𑣙' => '𑢹', - '𑣚' => '𑢺', - '𑣛' => '𑢻', - '𑣜' => '𑢼', - '𑣝' => '𑢽', - '𑣞' => '𑢾', - '𑣟' => '𑢿', - '𖹠' => '𖹀', - '𖹡' => '𖹁', - '𖹢' => '𖹂', - '𖹣' => '𖹃', - '𖹤' => '𖹄', - '𖹥' => '𖹅', - '𖹦' => '𖹆', - '𖹧' => '𖹇', - '𖹨' => '𖹈', - '𖹩' => '𖹉', - '𖹪' => '𖹊', - '𖹫' => '𖹋', - '𖹬' => '𖹌', - '𖹭' => '𖹍', - '𖹮' => '𖹎', - '𖹯' => '𖹏', - '𖹰' => '𖹐', - '𖹱' => '𖹑', - '𖹲' => '𖹒', - '𖹳' => '𖹓', - '𖹴' => '𖹔', - '𖹵' => '𖹕', - '𖹶' => '𖹖', - '𖹷' => '𖹗', - '𖹸' => '𖹘', - '𖹹' => '𖹙', - '𖹺' => '𖹚', - '𖹻' => '𖹛', - '𖹼' => '𖹜', - '𖹽' => '𖹝', - '𖹾' => '𖹞', - '𖹿' => '𖹟', - '𞤢' => '𞤀', - '𞤣' => '𞤁', - '𞤤' => '𞤂', - '𞤥' => '𞤃', - '𞤦' => '𞤄', - '𞤧' => '𞤅', - '𞤨' => '𞤆', - '𞤩' => '𞤇', - '𞤪' => '𞤈', - '𞤫' => '𞤉', - '𞤬' => '𞤊', - '𞤭' => '𞤋', - '𞤮' => '𞤌', - '𞤯' => '𞤍', - '𞤰' => '𞤎', - '𞤱' => '𞤏', - '𞤲' => '𞤐', - '𞤳' => '𞤑', - '𞤴' => '𞤒', - '𞤵' => '𞤓', - '𞤶' => '𞤔', - '𞤷' => '𞤕', - '𞤸' => '𞤖', - '𞤹' => '𞤗', - '𞤺' => '𞤘', - '𞤻' => '𞤙', - '𞤼' => '𞤚', - '𞤽' => '𞤛', - '𞤾' => '𞤜', - '𞤿' => '𞤝', - '𞥀' => '𞤞', - '𞥁' => '𞤟', - '𞥂' => '𞤠', - '𞥃' => '𞤡', - 'ß' => 'SS', - 'ff' => 'FF', - 'fi' => 'FI', - 'fl' => 'FL', - 'ffi' => 'FFI', - 'ffl' => 'FFL', - 'ſt' => 'ST', - 'st' => 'ST', - 'և' => 'ԵՒ', - 'ﬓ' => 'ՄՆ', - 'ﬔ' => 'ՄԵ', - 'ﬕ' => 'ՄԻ', - 'ﬖ' => 'ՎՆ', - 'ﬗ' => 'ՄԽ', - 'ʼn' => 'ʼN', - 'ΐ' => 'Ϊ́', - 'ΰ' => 'Ϋ́', - 'ǰ' => 'J̌', - 'ẖ' => 'H̱', - 'ẗ' => 'T̈', - 'ẘ' => 'W̊', - 'ẙ' => 'Y̊', - 'ẚ' => 'Aʾ', - 'ὐ' => 'Υ̓', - 'ὒ' => 'Υ̓̀', - 'ὔ' => 'Υ̓́', - 'ὖ' => 'Υ̓͂', - 'ᾶ' => 'Α͂', - 'ῆ' => 'Η͂', - 'ῒ' => 'Ϊ̀', - 'ΐ' => 'Ϊ́', - 'ῖ' => 'Ι͂', - 'ῗ' => 'Ϊ͂', - 'ῢ' => 'Ϋ̀', - 'ΰ' => 'Ϋ́', - 'ῤ' => 'Ρ̓', - 'ῦ' => 'Υ͂', - 'ῧ' => 'Ϋ͂', - 'ῶ' => 'Ω͂', - 'ᾈ' => 'ἈΙ', - 'ᾉ' => 'ἉΙ', - 'ᾊ' => 'ἊΙ', - 'ᾋ' => 'ἋΙ', - 'ᾌ' => 'ἌΙ', - 'ᾍ' => 'ἍΙ', - 'ᾎ' => 'ἎΙ', - 'ᾏ' => 'ἏΙ', - 'ᾘ' => 'ἨΙ', - 'ᾙ' => 'ἩΙ', - 'ᾚ' => 'ἪΙ', - 'ᾛ' => 'ἫΙ', - 'ᾜ' => 'ἬΙ', - 'ᾝ' => 'ἭΙ', - 'ᾞ' => 'ἮΙ', - 'ᾟ' => 'ἯΙ', - 'ᾨ' => 'ὨΙ', - 'ᾩ' => 'ὩΙ', - 'ᾪ' => 'ὪΙ', - 'ᾫ' => 'ὫΙ', - 'ᾬ' => 'ὬΙ', - 'ᾭ' => 'ὭΙ', - 'ᾮ' => 'ὮΙ', - 'ᾯ' => 'ὯΙ', - 'ᾼ' => 'ΑΙ', - 'ῌ' => 'ΗΙ', - 'ῼ' => 'ΩΙ', - 'ᾲ' => 'ᾺΙ', - 'ᾴ' => 'ΆΙ', - 'ῂ' => 'ῊΙ', - 'ῄ' => 'ΉΙ', - 'ῲ' => 'ῺΙ', - 'ῴ' => 'ΏΙ', - 'ᾷ' => 'Α͂Ι', - 'ῇ' => 'Η͂Ι', - 'ῷ' => 'Ω͂Ι', -); diff --git a/lib/symfony/polyfill-mbstring/bootstrap.php b/lib/symfony/polyfill-mbstring/bootstrap.php deleted file mode 100644 index 1fedd1f7c..000000000 --- a/lib/symfony/polyfill-mbstring/bootstrap.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('mb_convert_encoding')) { - function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language($language = null) { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/lib/symfony/polyfill-mbstring/bootstrap80.php b/lib/symfony/polyfill-mbstring/bootstrap80.php deleted file mode 100644 index 82f5ac4d0..000000000 --- a/lib/symfony/polyfill-mbstring/bootstrap80.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -if (!function_exists('mb_convert_encoding')) { - function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/lib/symfony/polyfill-mbstring/composer.json b/lib/symfony/polyfill-mbstring/composer.json deleted file mode 100644 index 9cd2e924e..000000000 --- a/lib/symfony/polyfill-mbstring/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "symfony/polyfill-mbstring", - "type": "library", - "description": "Symfony polyfill for the Mbstring extension", - "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-php72/LICENSE b/lib/symfony/polyfill-php72/LICENSE deleted file mode 100644 index 4cd8bdd30..000000000 --- a/lib/symfony/polyfill-php72/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-php72/Php72.php b/lib/symfony/polyfill-php72/Php72.php deleted file mode 100644 index 5e20d5bf8..000000000 --- a/lib/symfony/polyfill-php72/Php72.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php72; - -/** - * @author Nicolas Grekas - * @author Dariusz Rumiński - * - * @internal - */ -final class Php72 -{ - private static $hashMask; - - public static function utf8_encode($s) - { - $s .= $s; - $len = \strlen($s); - - for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { - switch (true) { - case $s[$i] < "\x80": $s[$j] = $s[$i]; break; - case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; - default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; - } - } - - return substr($s, 0, $j); - } - - public static function utf8_decode($s) - { - $s = (string) $s; - $len = \strlen($s); - - for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { - switch ($s[$i] & "\xF0") { - case "\xC0": - case "\xD0": - $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); - $s[$j] = $c < 256 ? \chr($c) : '?'; - break; - - case "\xF0": - ++$i; - // no break - - case "\xE0": - $s[$j] = '?'; - $i += 2; - break; - - default: - $s[$j] = $s[$i]; - } - } - - return substr($s, 0, $j); - } - - public static function php_os_family() - { - if ('\\' === \DIRECTORY_SEPARATOR) { - return 'Windows'; - } - - $map = [ - 'Darwin' => 'Darwin', - 'DragonFly' => 'BSD', - 'FreeBSD' => 'BSD', - 'NetBSD' => 'BSD', - 'OpenBSD' => 'BSD', - 'Linux' => 'Linux', - 'SunOS' => 'Solaris', - ]; - - return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown'; - } - - public static function spl_object_id($object) - { - if (null === self::$hashMask) { - self::initHashMask(); - } - if (null === $hash = spl_object_hash($object)) { - return; - } - - // On 32-bit systems, PHP_INT_SIZE is 4, - return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); - } - - public static function sapi_windows_vt100_support($stream, $enable = null) - { - if (!\is_resource($stream)) { - trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); - - return false; - } - - $meta = stream_get_meta_data($stream); - - if ('STDIO' !== $meta['stream_type']) { - trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING); - - return false; - } - - // We cannot actually disable vt100 support if it is set - if (false === $enable || !self::stream_isatty($stream)) { - return false; - } - - // The native function does not apply to stdin - $meta = array_map('strtolower', $meta); - $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; - - return !$stdin - && (false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM') - || 'Hyper' === getenv('TERM_PROGRAM')); - } - - public static function stream_isatty($stream) - { - if (!\is_resource($stream)) { - trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); - - return false; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - $stat = @fstat($stream); - // Check if formatted mode is S_IFCHR - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; - } - - return \function_exists('posix_isatty') && @posix_isatty($stream); - } - - private static function initHashMask() - { - $obj = (object) []; - self::$hashMask = -1; - - // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below - $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush']; - foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { - if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { - $frame['line'] = 0; - break; - } - } - if (!empty($frame['line'])) { - ob_start(); - debug_zval_dump($obj); - self::$hashMask = (int) substr(ob_get_clean(), 17); - } - - self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); - } - - public static function mb_chr($code, $encoding = null) - { - if (0x80 > $code %= 0x200000) { - $s = \chr($code); - } elseif (0x800 > $code) { - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - - if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) { - $s = mb_convert_encoding($s, $encoding, 'UTF-8'); - } - - return $s; - } - - public static function mb_ord($s, $encoding = null) - { - if (null === $encoding) { - $s = mb_convert_encoding($s, 'UTF-8'); - } elseif ('UTF-8' !== $encoding) { - $s = mb_convert_encoding($s, 'UTF-8', $encoding); - } - - if (1 === \strlen($s)) { - return \ord($s); - } - - $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $s[2] - 0x80; - } - - return $code; - } -} diff --git a/lib/symfony/polyfill-php72/README.md b/lib/symfony/polyfill-php72/README.md deleted file mode 100644 index ed1905055..000000000 --- a/lib/symfony/polyfill-php72/README.md +++ /dev/null @@ -1,35 +0,0 @@ -Symfony Polyfill / Php72 -======================== - -This component provides functions added to PHP 7.2 core: - -- [`spl_object_id`](https://php.net/spl_object_id) -- [`stream_isatty`](https://php.net/stream_isatty) - -And also functions added to PHP 7.2 mbstring: - -- [`mb_ord`](https://php.net/mb_ord) -- [`mb_chr`](https://php.net/mb_chr) -- [`mb_scrub`](https://php.net/mb_scrub) - -On Windows only: - -- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support) - -Moved to core since 7.2 (was in the optional XML extension earlier): - -- [`utf8_encode`](https://php.net/utf8_encode) -- [`utf8_decode`](https://php.net/utf8_decode) - -Also, it provides constants added to PHP 7.2: - -- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig) -- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-php72/bootstrap.php b/lib/symfony/polyfill-php72/bootstrap.php deleted file mode 100644 index b5c92d4c7..000000000 --- a/lib/symfony/polyfill-php72/bootstrap.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php72 as p; - -if (\PHP_VERSION_ID >= 70200) { - return; -} - -if (!defined('PHP_FLOAT_DIG')) { - define('PHP_FLOAT_DIG', 15); -} -if (!defined('PHP_FLOAT_EPSILON')) { - define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); -} -if (!defined('PHP_FLOAT_MIN')) { - define('PHP_FLOAT_MIN', 2.2250738585072E-308); -} -if (!defined('PHP_FLOAT_MAX')) { - define('PHP_FLOAT_MAX', 1.7976931348623157E+308); -} -if (!defined('PHP_OS_FAMILY')) { - define('PHP_OS_FAMILY', p\Php72::php_os_family()); -} - -if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { - function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } -} -if (!function_exists('stream_isatty')) { - function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } -} -if (!function_exists('utf8_encode')) { - function utf8_encode($string) { return p\Php72::utf8_encode($string); } -} -if (!function_exists('utf8_decode')) { - function utf8_decode($string) { return p\Php72::utf8_decode($string); } -} -if (!function_exists('spl_object_id')) { - function spl_object_id($object) { return p\Php72::spl_object_id($object); } -} -if (!function_exists('mb_ord')) { - function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } -} diff --git a/lib/symfony/polyfill-php72/composer.json b/lib/symfony/polyfill-php72/composer.json deleted file mode 100644 index 4eac690e0..000000000 --- a/lib/symfony/polyfill-php72/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symfony/polyfill-php72", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php72\\": "" }, - "files": [ "bootstrap.php" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-php73/LICENSE b/lib/symfony/polyfill-php73/LICENSE deleted file mode 100644 index 3f853aaf3..000000000 --- a/lib/symfony/polyfill-php73/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-php73/Php73.php b/lib/symfony/polyfill-php73/Php73.php deleted file mode 100644 index 65c35a6a1..000000000 --- a/lib/symfony/polyfill-php73/Php73.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php73; - -/** - * @author Gabriel Caruso - * @author Ion Bazan - * - * @internal - */ -final class Php73 -{ - public static $startAt = 1533462603; - - /** - * @param bool $asNum - * - * @return array|float|int - */ - public static function hrtime($asNum = false) - { - $ns = microtime(false); - $s = substr($ns, 11) - self::$startAt; - $ns = 1E9 * (float) $ns; - - if ($asNum) { - $ns += $s * 1E9; - - return \PHP_INT_SIZE === 4 ? $ns : (int) $ns; - } - - return [$s, (int) $ns]; - } -} diff --git a/lib/symfony/polyfill-php73/README.md b/lib/symfony/polyfill-php73/README.md deleted file mode 100644 index 032fafbda..000000000 --- a/lib/symfony/polyfill-php73/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Symfony Polyfill / Php73 -======================== - -This component provides functions added to PHP 7.3 core: - -- [`array_key_first`](https://php.net/array_key_first) -- [`array_key_last`](https://php.net/array_key_last) -- [`hrtime`](https://php.net/function.hrtime) -- [`is_countable`](https://php.net/is_countable) -- [`JsonException`](https://php.net/JsonException) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-php73/Resources/stubs/JsonException.php b/lib/symfony/polyfill-php73/Resources/stubs/JsonException.php deleted file mode 100644 index f06d6c269..000000000 --- a/lib/symfony/polyfill-php73/Resources/stubs/JsonException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 70300) { - class JsonException extends Exception - { - } -} diff --git a/lib/symfony/polyfill-php73/bootstrap.php b/lib/symfony/polyfill-php73/bootstrap.php deleted file mode 100644 index d6b215382..000000000 --- a/lib/symfony/polyfill-php73/bootstrap.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php73 as p; - -if (\PHP_VERSION_ID >= 70300) { - return; -} - -if (!function_exists('is_countable')) { - function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; } -} -if (!function_exists('hrtime')) { - require_once __DIR__.'/Php73.php'; - p\Php73::$startAt = (int) microtime(true); - function hrtime($as_number = false) { return p\Php73::hrtime($as_number); } -} -if (!function_exists('array_key_first')) { - function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } } -} -if (!function_exists('array_key_last')) { - function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); } -} diff --git a/lib/symfony/polyfill-php73/composer.json b/lib/symfony/polyfill-php73/composer.json deleted file mode 100644 index af0cf42d2..000000000 --- a/lib/symfony/polyfill-php73/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "symfony/polyfill-php73", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php73\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-php80/LICENSE b/lib/symfony/polyfill-php80/LICENSE deleted file mode 100644 index 5593b1d84..000000000 --- a/lib/symfony/polyfill-php80/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-php80/Php80.php b/lib/symfony/polyfill-php80/Php80.php deleted file mode 100644 index 362dd1a95..000000000 --- a/lib/symfony/polyfill-php80/Php80.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php80; - -/** - * @author Ion Bazan - * @author Nico Oelgart - * @author Nicolas Grekas - * - * @internal - */ -final class Php80 -{ - public static function fdiv(float $dividend, float $divisor): float - { - return @($dividend / $divisor); - } - - public static function get_debug_type($value): string - { - switch (true) { - case null === $value: return 'null'; - case \is_bool($value): return 'bool'; - case \is_string($value): return 'string'; - case \is_array($value): return 'array'; - case \is_int($value): return 'int'; - case \is_float($value): return 'float'; - case \is_object($value): break; - case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class'; - default: - if (null === $type = @get_resource_type($value)) { - return 'unknown'; - } - - if ('Unknown' === $type) { - $type = 'closed'; - } - - return "resource ($type)"; - } - - $class = \get_class($value); - - if (false === strpos($class, '@')) { - return $class; - } - - return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous'; - } - - public static function get_resource_id($res): int - { - if (!\is_resource($res) && null === @get_resource_type($res)) { - throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res))); - } - - return (int) $res; - } - - public static function preg_last_error_msg(): string - { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - return 'Internal error'; - case \PREG_BAD_UTF8_ERROR: - return 'Malformed UTF-8 characters, possibly incorrectly encoded'; - case \PREG_BAD_UTF8_OFFSET_ERROR: - return 'The offset did not correspond to the beginning of a valid UTF-8 code point'; - case \PREG_BACKTRACK_LIMIT_ERROR: - return 'Backtrack limit exhausted'; - case \PREG_RECURSION_LIMIT_ERROR: - return 'Recursion limit exhausted'; - case \PREG_JIT_STACKLIMIT_ERROR: - return 'JIT stack limit exhausted'; - case \PREG_NO_ERROR: - return 'No error'; - default: - return 'Unknown error'; - } - } - - public static function str_contains(string $haystack, string $needle): bool - { - return '' === $needle || false !== strpos($haystack, $needle); - } - - public static function str_starts_with(string $haystack, string $needle): bool - { - return 0 === strncmp($haystack, $needle, \strlen($needle)); - } - - public static function str_ends_with(string $haystack, string $needle): bool - { - if ('' === $needle || $needle === $haystack) { - return true; - } - - if ('' === $haystack) { - return false; - } - - $needleLength = \strlen($needle); - - return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength); - } -} diff --git a/lib/symfony/polyfill-php80/PhpToken.php b/lib/symfony/polyfill-php80/PhpToken.php deleted file mode 100644 index fe6e69105..000000000 --- a/lib/symfony/polyfill-php80/PhpToken.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php80; - -/** - * @author Fedonyuk Anton - * - * @internal - */ -class PhpToken implements \Stringable -{ - /** - * @var int - */ - public $id; - - /** - * @var string - */ - public $text; - - /** - * @var int - */ - public $line; - - /** - * @var int - */ - public $pos; - - public function __construct(int $id, string $text, int $line = -1, int $position = -1) - { - $this->id = $id; - $this->text = $text; - $this->line = $line; - $this->pos = $position; - } - - public function getTokenName(): ?string - { - if ('UNKNOWN' === $name = token_name($this->id)) { - $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text; - } - - return $name; - } - - /** - * @param int|string|array $kind - */ - public function is($kind): bool - { - foreach ((array) $kind as $value) { - if (\in_array($value, [$this->id, $this->text], true)) { - return true; - } - } - - return false; - } - - public function isIgnorable(): bool - { - return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true); - } - - public function __toString(): string - { - return (string) $this->text; - } - - /** - * @return static[] - */ - public static function tokenize(string $code, int $flags = 0): array - { - $line = 1; - $position = 0; - $tokens = token_get_all($code, $flags); - foreach ($tokens as $index => $token) { - if (\is_string($token)) { - $id = \ord($token); - $text = $token; - } else { - [$id, $text, $line] = $token; - } - $tokens[$index] = new static($id, $text, $line, $position); - $position += \strlen($text); - } - - return $tokens; - } -} diff --git a/lib/symfony/polyfill-php80/README.md b/lib/symfony/polyfill-php80/README.md deleted file mode 100644 index 3816c559d..000000000 --- a/lib/symfony/polyfill-php80/README.md +++ /dev/null @@ -1,25 +0,0 @@ -Symfony Polyfill / Php80 -======================== - -This component provides features added to PHP 8.0 core: - -- [`Stringable`](https://php.net/stringable) interface -- [`fdiv`](https://php.net/fdiv) -- [`ValueError`](https://php.net/valueerror) class -- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class -- `FILTER_VALIDATE_BOOL` constant -- [`get_debug_type`](https://php.net/get_debug_type) -- [`PhpToken`](https://php.net/phptoken) class -- [`preg_last_error_msg`](https://php.net/preg_last_error_msg) -- [`str_contains`](https://php.net/str_contains) -- [`str_starts_with`](https://php.net/str_starts_with) -- [`str_ends_with`](https://php.net/str_ends_with) -- [`get_resource_id`](https://php.net/get_resource_id) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-php80/Resources/stubs/Attribute.php b/lib/symfony/polyfill-php80/Resources/stubs/Attribute.php deleted file mode 100644 index 7ea6d2772..000000000 --- a/lib/symfony/polyfill-php80/Resources/stubs/Attribute.php +++ /dev/null @@ -1,22 +0,0 @@ -flags = $flags; - } -} diff --git a/lib/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/lib/symfony/polyfill-php80/Resources/stubs/PhpToken.php deleted file mode 100644 index 72f10812b..000000000 --- a/lib/symfony/polyfill-php80/Resources/stubs/PhpToken.php +++ /dev/null @@ -1,7 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php80 as p; - -if (\PHP_VERSION_ID >= 80000) { - return; -} - -if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { - define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); -} - -if (!function_exists('fdiv')) { - function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } -} -if (!function_exists('preg_last_error_msg')) { - function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } -} -if (!function_exists('str_contains')) { - function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_starts_with')) { - function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_ends_with')) { - function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('get_debug_type')) { - function get_debug_type($value): string { return p\Php80::get_debug_type($value); } -} -if (!function_exists('get_resource_id')) { - function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); } -} diff --git a/lib/symfony/polyfill-php80/composer.json b/lib/symfony/polyfill-php80/composer.json deleted file mode 100644 index cd3e9b65f..000000000 --- a/lib/symfony/polyfill-php80/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "symfony/polyfill-php80", - "type": "library", - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/polyfill-php81/LICENSE b/lib/symfony/polyfill-php81/LICENSE deleted file mode 100644 index efb17f98e..000000000 --- a/lib/symfony/polyfill-php81/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/polyfill-php81/Php81.php b/lib/symfony/polyfill-php81/Php81.php deleted file mode 100644 index f0507b765..000000000 --- a/lib/symfony/polyfill-php81/Php81.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php81; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class Php81 -{ - public static function array_is_list(array $array): bool - { - if ([] === $array || $array === array_values($array)) { - return true; - } - - $nextKey = -1; - - foreach ($array as $k => $v) { - if ($k !== ++$nextKey) { - return false; - } - } - - return true; - } -} diff --git a/lib/symfony/polyfill-php81/README.md b/lib/symfony/polyfill-php81/README.md deleted file mode 100644 index 7d8dd1907..000000000 --- a/lib/symfony/polyfill-php81/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Symfony Polyfill / Php81 -======================== - -This component provides features added to PHP 8.1 core: - -- [`array_is_list`](https://php.net/array_is_list) -- [`enum_exists`](https://php.net/enum-exists) -- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant -- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/lib/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php b/lib/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php deleted file mode 100644 index f4cad34f6..000000000 --- a/lib/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php +++ /dev/null @@ -1,11 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php81 as p; - -if (\PHP_VERSION_ID >= 80100) { - return; -} - -if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) { - define('MYSQLI_REFRESH_REPLICA', 64); -} - -if (!function_exists('array_is_list')) { - function array_is_list(array $array): bool { return p\Php81::array_is_list($array); } -} - -if (!function_exists('enum_exists')) { - function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; } -} diff --git a/lib/symfony/polyfill-php81/composer.json b/lib/symfony/polyfill-php81/composer.json deleted file mode 100644 index 014da788e..000000000 --- a/lib/symfony/polyfill-php81/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "symfony/polyfill-php81", - "type": "library", - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php81\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/lib/symfony/property-access/CHANGELOG.md b/lib/symfony/property-access/CHANGELOG.md deleted file mode 100644 index f90c6f5e7..000000000 --- a/lib/symfony/property-access/CHANGELOG.md +++ /dev/null @@ -1,70 +0,0 @@ -CHANGELOG -========= - -5.3.0 ------ - - * deprecate passing a boolean as the second argument of `PropertyAccessor::__construct()`, expecting a combination of bitwise flags instead - -5.2.0 ------ - - * deprecated passing a boolean as the first argument of `PropertyAccessor::__construct()`, expecting a combination of bitwise flags instead - * added the ability to disable usage of the magic `__get` & `__set` methods - -5.1.0 ------ - - * Added an `UninitializedPropertyException` - * Linking to PropertyInfo extractor to remove a lot of duplicate code - -4.4.0 ------ - - * deprecated passing `null` as `$defaultLifetime` 2nd argument of `PropertyAccessor::createCache()` method, - pass `0` instead - -4.3.0 ------ - - * added a `$throwExceptionOnInvalidPropertyPath` argument to the PropertyAccessor constructor. - * added `enableExceptionOnInvalidPropertyPath()`, `disableExceptionOnInvalidPropertyPath()` and - `isExceptionOnInvalidPropertyPath()` methods to `PropertyAccessorBuilder` - -4.0.0 ------ - - * removed the `StringUtil` class, use `Symfony\Component\Inflector\Inflector` - -3.1.0 ------ - - * deprecated the `StringUtil` class, use `Symfony\Component\Inflector\Inflector` - instead - -2.7.0 ------- - - * `UnexpectedTypeException` now expects three constructor arguments: The invalid property value, - the `PropertyPathInterface` object and the current index of the property path. - -2.5.0 ------- - - * allowed non alpha numeric characters in second level and deeper object properties names - * [BC BREAK] when accessing an index on an object that does not implement - ArrayAccess, a NoSuchIndexException is now thrown instead of the - semantically wrong NoSuchPropertyException - * [BC BREAK] added isReadable() and isWritable() to PropertyAccessorInterface - -2.3.0 ------- - - * added PropertyAccessorBuilder, to enable or disable the support of "__call" - * added support for "__call" in the PropertyAccessor (disabled by default) - * [BC BREAK] changed PropertyAccessor to continue its search for a property or - method even if a non-public match was found. Before, a PropertyAccessDeniedException - was thrown in this case. Class PropertyAccessDeniedException was removed - now. - * deprecated PropertyAccess::getPropertyAccessor - * added PropertyAccess::createPropertyAccessor and PropertyAccess::createPropertyAccessorBuilder diff --git a/lib/symfony/property-access/Exception/AccessException.php b/lib/symfony/property-access/Exception/AccessException.php deleted file mode 100644 index b3a854646..000000000 --- a/lib/symfony/property-access/Exception/AccessException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property path is not available. - * - * @author Stéphane Escandell - */ -class AccessException extends RuntimeException -{ -} diff --git a/lib/symfony/property-access/Exception/ExceptionInterface.php b/lib/symfony/property-access/Exception/ExceptionInterface.php deleted file mode 100644 index fabf9a080..000000000 --- a/lib/symfony/property-access/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Marker interface for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/property-access/Exception/InvalidArgumentException.php b/lib/symfony/property-access/Exception/InvalidArgumentException.php deleted file mode 100644 index 47bc7e150..000000000 --- a/lib/symfony/property-access/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Base InvalidArgumentException for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/property-access/Exception/InvalidPropertyPathException.php b/lib/symfony/property-access/Exception/InvalidPropertyPathException.php deleted file mode 100644 index 69de31cee..000000000 --- a/lib/symfony/property-access/Exception/InvalidPropertyPathException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property path is malformed. - * - * @author Bernhard Schussek - */ -class InvalidPropertyPathException extends RuntimeException -{ -} diff --git a/lib/symfony/property-access/Exception/NoSuchIndexException.php b/lib/symfony/property-access/Exception/NoSuchIndexException.php deleted file mode 100644 index 597b9904a..000000000 --- a/lib/symfony/property-access/Exception/NoSuchIndexException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when an index cannot be found. - * - * @author Stéphane Escandell - */ -class NoSuchIndexException extends AccessException -{ -} diff --git a/lib/symfony/property-access/Exception/NoSuchPropertyException.php b/lib/symfony/property-access/Exception/NoSuchPropertyException.php deleted file mode 100644 index 1c7eda5f8..000000000 --- a/lib/symfony/property-access/Exception/NoSuchPropertyException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property cannot be found. - * - * @author Bernhard Schussek - */ -class NoSuchPropertyException extends AccessException -{ -} diff --git a/lib/symfony/property-access/Exception/OutOfBoundsException.php b/lib/symfony/property-access/Exception/OutOfBoundsException.php deleted file mode 100644 index a3c45597d..000000000 --- a/lib/symfony/property-access/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Base OutOfBoundsException for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/lib/symfony/property-access/Exception/RuntimeException.php b/lib/symfony/property-access/Exception/RuntimeException.php deleted file mode 100644 index 9fe843e30..000000000 --- a/lib/symfony/property-access/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Base RuntimeException for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/property-access/Exception/UnexpectedTypeException.php b/lib/symfony/property-access/Exception/UnexpectedTypeException.php deleted file mode 100644 index 78bc41673..000000000 --- a/lib/symfony/property-access/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Thrown when a value does not match an expected type. - * - * @author Bernhard Schussek - */ -class UnexpectedTypeException extends RuntimeException -{ - /** - * @param mixed $value The unexpected value found while traversing property path - * @param int $pathIndex The property path index when the unexpected value was found - */ - public function __construct($value, PropertyPathInterface $path, int $pathIndex) - { - $message = sprintf( - 'PropertyAccessor requires a graph of objects or arrays to operate on, '. - 'but it found type "%s" while trying to traverse path "%s" at property "%s".', - \gettype($value), - (string) $path, - $path->getElement($pathIndex) - ); - - parent::__construct($message); - } -} diff --git a/lib/symfony/property-access/Exception/UninitializedPropertyException.php b/lib/symfony/property-access/Exception/UninitializedPropertyException.php deleted file mode 100644 index c0d69735d..000000000 --- a/lib/symfony/property-access/Exception/UninitializedPropertyException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property is not initialized. - * - * @author Jules Pietri - */ -class UninitializedPropertyException extends AccessException -{ -} diff --git a/lib/symfony/property-access/LICENSE b/lib/symfony/property-access/LICENSE deleted file mode 100644 index 0138f8f07..000000000 --- a/lib/symfony/property-access/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/property-access/PropertyAccess.php b/lib/symfony/property-access/PropertyAccess.php deleted file mode 100644 index 1953ac096..000000000 --- a/lib/symfony/property-access/PropertyAccess.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * Entry point of the PropertyAccess component. - * - * @author Bernhard Schussek - */ -final class PropertyAccess -{ - /** - * Creates a property accessor with the default configuration. - */ - public static function createPropertyAccessor(): PropertyAccessor - { - return self::createPropertyAccessorBuilder()->getPropertyAccessor(); - } - - public static function createPropertyAccessorBuilder(): PropertyAccessorBuilder - { - return new PropertyAccessorBuilder(); - } - - /** - * This class cannot be instantiated. - */ - private function __construct() - { - } -} diff --git a/lib/symfony/property-access/PropertyAccessor.php b/lib/symfony/property-access/PropertyAccessor.php deleted file mode 100644 index a611f2654..000000000 --- a/lib/symfony/property-access/PropertyAccessor.php +++ /dev/null @@ -1,748 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\ApcuAdapter; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\PropertyAccess\Exception\AccessException; -use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; -use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException; -use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException; -use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; -use Symfony\Component\PropertyInfo\PropertyReadInfo; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfo; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; - -/** - * Default implementation of {@link PropertyAccessorInterface}. - * - * @author Bernhard Schussek - * @author Kévin Dunglas - * @author Nicolas Grekas - */ -class PropertyAccessor implements PropertyAccessorInterface -{ - /** @var int Allow none of the magic methods */ - public const DISALLOW_MAGIC_METHODS = ReflectionExtractor::DISALLOW_MAGIC_METHODS; - /** @var int Allow magic __get methods */ - public const MAGIC_GET = ReflectionExtractor::ALLOW_MAGIC_GET; - /** @var int Allow magic __set methods */ - public const MAGIC_SET = ReflectionExtractor::ALLOW_MAGIC_SET; - /** @var int Allow magic __call methods */ - public const MAGIC_CALL = ReflectionExtractor::ALLOW_MAGIC_CALL; - - public const DO_NOT_THROW = 0; - public const THROW_ON_INVALID_INDEX = 1; - public const THROW_ON_INVALID_PROPERTY_PATH = 2; - - private const VALUE = 0; - private const REF = 1; - private const IS_REF_CHAINED = 2; - private const CACHE_PREFIX_READ = 'r'; - private const CACHE_PREFIX_WRITE = 'w'; - private const CACHE_PREFIX_PROPERTY_PATH = 'p'; - - private $magicMethodsFlags; - private $ignoreInvalidIndices; - private $ignoreInvalidProperty; - - /** - * @var CacheItemPoolInterface - */ - private $cacheItemPool; - - private $propertyPathCache = []; - - /** - * @var PropertyReadInfoExtractorInterface - */ - private $readInfoExtractor; - - /** - * @var PropertyWriteInfoExtractorInterface - */ - private $writeInfoExtractor; - private $readPropertyCache = []; - private $writePropertyCache = []; - private const RESULT_PROTO = [self::VALUE => null]; - - /** - * Should not be used by application code. Use - * {@link PropertyAccess::createPropertyAccessor()} instead. - * - * @param int $magicMethods A bitwise combination of the MAGIC_* constants - * to specify the allowed magic methods (__get, __set, __call) - * or self::DISALLOW_MAGIC_METHODS for none - * @param int $throw A bitwise combination of the THROW_* constants - * to specify when exceptions should be thrown - * @param PropertyReadInfoExtractorInterface $readInfoExtractor - * @param PropertyWriteInfoExtractorInterface $writeInfoExtractor - */ - public function __construct($magicMethods = self::MAGIC_GET | self::MAGIC_SET, $throw = self::THROW_ON_INVALID_PROPERTY_PATH, CacheItemPoolInterface $cacheItemPool = null, $readInfoExtractor = null, $writeInfoExtractor = null) - { - if (\is_bool($magicMethods)) { - trigger_deprecation('symfony/property-access', '5.2', 'Passing a boolean as the first argument to "%s()" is deprecated. Pass a combination of bitwise flags instead (i.e an integer).', __METHOD__); - - $magicMethods = ($magicMethods ? self::MAGIC_CALL : 0) | self::MAGIC_GET | self::MAGIC_SET; - } elseif (!\is_int($magicMethods)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be an integer, "%s" given.', __METHOD__, get_debug_type($readInfoExtractor))); - } - - if (\is_bool($throw)) { - trigger_deprecation('symfony/property-access', '5.3', 'Passing a boolean as the second argument to "%s()" is deprecated. Pass a combination of bitwise flags instead (i.e an integer).', __METHOD__); - - $throw = $throw ? self::THROW_ON_INVALID_INDEX : self::DO_NOT_THROW; - - if (!\is_bool($readInfoExtractor)) { - $throw |= self::THROW_ON_INVALID_PROPERTY_PATH; - } - } - - if (\is_bool($readInfoExtractor)) { - trigger_deprecation('symfony/property-access', '5.3', 'Passing a boolean as the fourth argument to "%s()" is deprecated. Pass a combination of bitwise flags as the second argument instead (i.e an integer).', __METHOD__); - - if ($readInfoExtractor) { - $throw |= self::THROW_ON_INVALID_PROPERTY_PATH; - } - - $readInfoExtractor = $writeInfoExtractor; - $writeInfoExtractor = 4 < \func_num_args() ? func_get_arg(4) : null; - } - - if (null !== $readInfoExtractor && !$readInfoExtractor instanceof PropertyReadInfoExtractorInterface) { - throw new \TypeError(sprintf('Argument 4 passed to "%s()" must be null or an instance of "%s", "%s" given.', __METHOD__, PropertyReadInfoExtractorInterface::class, get_debug_type($readInfoExtractor))); - } - - if (null !== $writeInfoExtractor && !$writeInfoExtractor instanceof PropertyWriteInfoExtractorInterface) { - throw new \TypeError(sprintf('Argument 5 passed to "%s()" must be null or an instance of "%s", "%s" given.', __METHOD__, PropertyWriteInfoExtractorInterface::class, get_debug_type($writeInfoExtractor))); - } - - $this->magicMethodsFlags = $magicMethods; - $this->ignoreInvalidIndices = 0 === ($throw & self::THROW_ON_INVALID_INDEX); - $this->cacheItemPool = $cacheItemPool instanceof NullAdapter ? null : $cacheItemPool; // Replace the NullAdapter by the null value - $this->ignoreInvalidProperty = 0 === ($throw & self::THROW_ON_INVALID_PROPERTY_PATH); - $this->readInfoExtractor = $readInfoExtractor ?? new ReflectionExtractor([], null, null, false); - $this->writeInfoExtractor = $writeInfoExtractor ?? new ReflectionExtractor(['set'], null, null, false); - } - - /** - * {@inheritdoc} - */ - public function getValue($objectOrArray, $propertyPath) - { - $zval = [ - self::VALUE => $objectOrArray, - ]; - - if (\is_object($objectOrArray) && false === strpbrk((string) $propertyPath, '.[')) { - return $this->readProperty($zval, $propertyPath, $this->ignoreInvalidProperty)[self::VALUE]; - } - - $propertyPath = $this->getPropertyPath($propertyPath); - - $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); - - return $propertyValues[\count($propertyValues) - 1][self::VALUE]; - } - - /** - * {@inheritdoc} - */ - public function setValue(&$objectOrArray, $propertyPath, $value) - { - if (\is_object($objectOrArray) && false === strpbrk((string) $propertyPath, '.[')) { - $zval = [ - self::VALUE => $objectOrArray, - ]; - - try { - $this->writeProperty($zval, $propertyPath, $value); - - return; - } catch (\TypeError $e) { - self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath, $e); - // It wasn't thrown in this class so rethrow it - throw $e; - } - } - - $propertyPath = $this->getPropertyPath($propertyPath); - - $zval = [ - self::VALUE => $objectOrArray, - self::REF => &$objectOrArray, - ]; - $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); - $overwrite = true; - - try { - for ($i = \count($propertyValues) - 1; 0 <= $i; --$i) { - $zval = $propertyValues[$i]; - unset($propertyValues[$i]); - - // You only need set value for current element if: - // 1. it's the parent of the last index element - // OR - // 2. its child is not passed by reference - // - // This may avoid unnecessary value setting process for array elements. - // For example: - // '[a][b][c]' => 'old-value' - // If you want to change its value to 'new-value', - // you only need set value for '[a][b][c]' and it's safe to ignore '[a][b]' and '[a]' - if ($overwrite) { - $property = $propertyPath->getElement($i); - - if ($propertyPath->isIndex($i)) { - if ($overwrite = !isset($zval[self::REF])) { - $ref = &$zval[self::REF]; - $ref = $zval[self::VALUE]; - } - $this->writeIndex($zval, $property, $value); - if ($overwrite) { - $zval[self::VALUE] = $zval[self::REF]; - } - } else { - $this->writeProperty($zval, $property, $value); - } - - // if current element is an object - // OR - // if current element's reference chain is not broken - current element - // as well as all its ancients in the property path are all passed by reference, - // then there is no need to continue the value setting process - if (\is_object($zval[self::VALUE]) || isset($zval[self::IS_REF_CHAINED])) { - break; - } - } - - $value = $zval[self::VALUE]; - } - } catch (\TypeError $e) { - self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath, $e); - - // It wasn't thrown in this class so rethrow it - throw $e; - } - } - - private static function throwInvalidArgumentException(string $message, array $trace, int $i, string $propertyPath, \Throwable $previous = null): void - { - if (!isset($trace[$i]['file']) || __FILE__ !== $trace[$i]['file']) { - return; - } - - if (\PHP_VERSION_ID < 80000) { - if (preg_match('/^Typed property \S+::\$\S+ must be (\S+), (\S+) used$/', $message, $matches)) { - [, $expectedType, $actualType] = $matches; - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $expectedType, 'NULL' === $actualType ? 'null' : $actualType, $propertyPath), 0, $previous); - } - - if (!str_starts_with($message, 'Argument ')) { - return; - } - - $pos = strpos($message, $delim = 'must be of the type ') ?: (strpos($message, $delim = 'must be an instance of ') ?: strpos($message, $delim = 'must implement interface ')); - $pos += \strlen($delim); - $j = strpos($message, ',', $pos); - $type = substr($message, 2 + $j, strpos($message, ' given', $j) - $j - 2); - $message = substr($message, $pos, $j - $pos); - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $message, 'NULL' === $type ? 'null' : $type, $propertyPath), 0, $previous); - } - - if (preg_match('/^\S+::\S+\(\): Argument #\d+ \(\$\S+\) must be of type (\S+), (\S+) given/', $message, $matches)) { - [, $expectedType, $actualType] = $matches; - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $expectedType, 'NULL' === $actualType ? 'null' : $actualType, $propertyPath), 0, $previous); - } - if (preg_match('/^Cannot assign (\S+) to property \S+::\$\S+ of type (\S+)$/', $message, $matches)) { - [, $actualType, $expectedType] = $matches; - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $expectedType, 'NULL' === $actualType ? 'null' : $actualType, $propertyPath), 0, $previous); - } - } - - /** - * {@inheritdoc} - */ - public function isReadable($objectOrArray, $propertyPath) - { - if (!$propertyPath instanceof PropertyPathInterface) { - $propertyPath = new PropertyPath($propertyPath); - } - - try { - $zval = [ - self::VALUE => $objectOrArray, - ]; - $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); - - return true; - } catch (AccessException $e) { - return false; - } catch (UnexpectedTypeException $e) { - return false; - } - } - - /** - * {@inheritdoc} - */ - public function isWritable($objectOrArray, $propertyPath) - { - $propertyPath = $this->getPropertyPath($propertyPath); - - try { - $zval = [ - self::VALUE => $objectOrArray, - ]; - $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); - - for ($i = \count($propertyValues) - 1; 0 <= $i; --$i) { - $zval = $propertyValues[$i]; - unset($propertyValues[$i]); - - if ($propertyPath->isIndex($i)) { - if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { - return false; - } - } elseif (!\is_object($zval[self::VALUE]) || !$this->isPropertyWritable($zval[self::VALUE], $propertyPath->getElement($i))) { - return false; - } - - if (\is_object($zval[self::VALUE])) { - return true; - } - } - - return true; - } catch (AccessException $e) { - return false; - } catch (UnexpectedTypeException $e) { - return false; - } - } - - /** - * Reads the path from an object up to a given path index. - * - * @throws UnexpectedTypeException if a value within the path is neither object nor array - * @throws NoSuchIndexException If a non-existing index is accessed - */ - private function readPropertiesUntil(array $zval, PropertyPathInterface $propertyPath, int $lastIndex, bool $ignoreInvalidIndices = true): array - { - if (!\is_object($zval[self::VALUE]) && !\is_array($zval[self::VALUE])) { - throw new UnexpectedTypeException($zval[self::VALUE], $propertyPath, 0); - } - - // Add the root object to the list - $propertyValues = [$zval]; - - for ($i = 0; $i < $lastIndex; ++$i) { - $property = $propertyPath->getElement($i); - $isIndex = $propertyPath->isIndex($i); - - if ($isIndex) { - // Create missing nested arrays on demand - if (($zval[self::VALUE] instanceof \ArrayAccess && !$zval[self::VALUE]->offsetExists($property)) || - (\is_array($zval[self::VALUE]) && !isset($zval[self::VALUE][$property]) && !\array_key_exists($property, $zval[self::VALUE])) - ) { - if (!$ignoreInvalidIndices) { - if (!\is_array($zval[self::VALUE])) { - if (!$zval[self::VALUE] instanceof \Traversable) { - throw new NoSuchIndexException(sprintf('Cannot read index "%s" while trying to traverse path "%s".', $property, (string) $propertyPath)); - } - - $zval[self::VALUE] = iterator_to_array($zval[self::VALUE]); - } - - throw new NoSuchIndexException(sprintf('Cannot read index "%s" while trying to traverse path "%s". Available indices are "%s".', $property, (string) $propertyPath, print_r(array_keys($zval[self::VALUE]), true))); - } - - if ($i + 1 < $propertyPath->getLength()) { - if (isset($zval[self::REF])) { - $zval[self::VALUE][$property] = []; - $zval[self::REF] = $zval[self::VALUE]; - } else { - $zval[self::VALUE] = [$property => []]; - } - } - } - - $zval = $this->readIndex($zval, $property); - } else { - $zval = $this->readProperty($zval, $property, $this->ignoreInvalidProperty); - } - - // the final value of the path must not be validated - if ($i + 1 < $propertyPath->getLength() && !\is_object($zval[self::VALUE]) && !\is_array($zval[self::VALUE])) { - throw new UnexpectedTypeException($zval[self::VALUE], $propertyPath, $i + 1); - } - - if (isset($zval[self::REF]) && (0 === $i || isset($propertyValues[$i - 1][self::IS_REF_CHAINED]))) { - // Set the IS_REF_CHAINED flag to true if: - // current property is passed by reference and - // it is the first element in the property path or - // the IS_REF_CHAINED flag of its parent element is true - // Basically, this flag is true only when the reference chain from the top element to current element is not broken - $zval[self::IS_REF_CHAINED] = true; - } - - $propertyValues[] = $zval; - } - - return $propertyValues; - } - - /** - * Reads a key from an array-like structure. - * - * @param string|int $index The key to read - * - * @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array - */ - private function readIndex(array $zval, $index): array - { - if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { - throw new NoSuchIndexException(sprintf('Cannot read index "%s" from object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, get_debug_type($zval[self::VALUE]))); - } - - $result = self::RESULT_PROTO; - - if (isset($zval[self::VALUE][$index])) { - $result[self::VALUE] = $zval[self::VALUE][$index]; - - if (!isset($zval[self::REF])) { - // Save creating references when doing read-only lookups - } elseif (\is_array($zval[self::VALUE])) { - $result[self::REF] = &$zval[self::REF][$index]; - } elseif (\is_object($result[self::VALUE])) { - $result[self::REF] = $result[self::VALUE]; - } - } - - return $result; - } - - /** - * Reads the value of a property from an object. - * - * @throws NoSuchPropertyException If $ignoreInvalidProperty is false and the property does not exist or is not public - */ - private function readProperty(array $zval, string $property, bool $ignoreInvalidProperty = false): array - { - if (!\is_object($zval[self::VALUE])) { - throw new NoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%1$s]" instead.', $property)); - } - - $result = self::RESULT_PROTO; - $object = $zval[self::VALUE]; - $class = \get_class($object); - $access = $this->getReadInfo($class, $property); - - if (null !== $access) { - $name = $access->getName(); - $type = $access->getType(); - - try { - if (PropertyReadInfo::TYPE_METHOD === $type) { - try { - $result[self::VALUE] = $object->$name(); - } catch (\TypeError $e) { - [$trace] = $e->getTrace(); - - // handle uninitialized properties in PHP >= 7 - if (__FILE__ === $trace['file'] - && $name === $trace['function'] - && $object instanceof $trace['class'] - && preg_match('/Return value (?:of .*::\w+\(\) )?must be of (?:the )?type (\w+), null returned$/', $e->getMessage(), $matches) - ) { - throw new UninitializedPropertyException(sprintf('The method "%s::%s()" returned "null", but expected type "%3$s". Did you forget to initialize a property or to make the return type nullable using "?%3$s"?', get_debug_type($object), $name, $matches[1]), 0, $e); - } - - throw $e; - } - } elseif (PropertyReadInfo::TYPE_PROPERTY === $type) { - if ($access->canBeReference() && !isset($object->$name) && !\array_key_exists($name, (array) $object) && (\PHP_VERSION_ID < 70400 || !(new \ReflectionProperty($class, $name))->hasType())) { - throw new UninitializedPropertyException(sprintf('The property "%s::$%s" is not initialized.', $class, $name)); - } - - $result[self::VALUE] = $object->$name; - - if (isset($zval[self::REF]) && $access->canBeReference()) { - $result[self::REF] = &$object->$name; - } - } - } catch (\Error $e) { - // handle uninitialized properties in PHP >= 7.4 - if (\PHP_VERSION_ID >= 70400 && preg_match('/^Typed property ([\w\\\\@]+)::\$(\w+) must not be accessed before initialization$/', $e->getMessage(), $matches)) { - $r = new \ReflectionProperty(str_contains($matches[1], '@anonymous') ? $class : $matches[1], $matches[2]); - $type = ($type = $r->getType()) instanceof \ReflectionNamedType ? $type->getName() : (string) $type; - - throw new UninitializedPropertyException(sprintf('The property "%s::$%s" is not readable because it is typed "%s". You should initialize it or declare a default value instead.', $matches[1], $r->getName(), $type), 0, $e); - } - - throw $e; - } - } elseif (property_exists($object, $property) && \array_key_exists($property, (array) $object)) { - $result[self::VALUE] = $object->$property; - if (isset($zval[self::REF])) { - $result[self::REF] = &$object->$property; - } - } elseif (!$ignoreInvalidProperty) { - throw new NoSuchPropertyException(sprintf('Can\'t get a way to read the property "%s" in class "%s".', $property, $class)); - } - - // Objects are always passed around by reference - if (isset($zval[self::REF]) && \is_object($result[self::VALUE])) { - $result[self::REF] = $result[self::VALUE]; - } - - return $result; - } - - /** - * Guesses how to read the property value. - */ - private function getReadInfo(string $class, string $property): ?PropertyReadInfo - { - $key = str_replace('\\', '.', $class).'..'.$property; - - if (isset($this->readPropertyCache[$key])) { - return $this->readPropertyCache[$key]; - } - - if ($this->cacheItemPool) { - $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_READ.rawurlencode($key)); - if ($item->isHit()) { - return $this->readPropertyCache[$key] = $item->get(); - } - } - - $accessor = $this->readInfoExtractor->getReadInfo($class, $property, [ - 'enable_getter_setter_extraction' => true, - 'enable_magic_methods_extraction' => $this->magicMethodsFlags, - 'enable_constructor_extraction' => false, - ]); - - if (isset($item)) { - $this->cacheItemPool->save($item->set($accessor)); - } - - return $this->readPropertyCache[$key] = $accessor; - } - - /** - * Sets the value of an index in a given array-accessible value. - * - * @param string|int $index The index to write at - * @param mixed $value The value to write - * - * @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array - */ - private function writeIndex(array $zval, $index, $value) - { - if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { - throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, get_debug_type($zval[self::VALUE]))); - } - - $zval[self::REF][$index] = $value; - } - - /** - * Sets the value of a property in the given object. - * - * @param mixed $value The value to write - * - * @throws NoSuchPropertyException if the property does not exist or is not public - */ - private function writeProperty(array $zval, string $property, $value) - { - if (!\is_object($zval[self::VALUE])) { - throw new NoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%1$s]" instead?', $property)); - } - - $object = $zval[self::VALUE]; - $class = \get_class($object); - $mutator = $this->getWriteInfo($class, $property, $value); - - if (PropertyWriteInfo::TYPE_NONE !== $mutator->getType()) { - $type = $mutator->getType(); - - if (PropertyWriteInfo::TYPE_METHOD === $type) { - $object->{$mutator->getName()}($value); - } elseif (PropertyWriteInfo::TYPE_PROPERTY === $type) { - $object->{$mutator->getName()} = $value; - } elseif (PropertyWriteInfo::TYPE_ADDER_AND_REMOVER === $type) { - $this->writeCollection($zval, $property, $value, $mutator->getAdderInfo(), $mutator->getRemoverInfo()); - } - } elseif ($object instanceof \stdClass && property_exists($object, $property)) { - $object->$property = $value; - } elseif (!$this->ignoreInvalidProperty) { - if ($mutator->hasErrors()) { - throw new NoSuchPropertyException(implode('. ', $mutator->getErrors()).'.'); - } - - throw new NoSuchPropertyException(sprintf('Could not determine access type for property "%s" in class "%s".', $property, get_debug_type($object))); - } - } - - /** - * Adjusts a collection-valued property by calling add*() and remove*() methods. - */ - private function writeCollection(array $zval, string $property, iterable $collection, PropertyWriteInfo $addMethod, PropertyWriteInfo $removeMethod) - { - // At this point the add and remove methods have been found - $previousValue = $this->readProperty($zval, $property); - $previousValue = $previousValue[self::VALUE]; - - $removeMethodName = $removeMethod->getName(); - $addMethodName = $addMethod->getName(); - - if ($previousValue instanceof \Traversable) { - $previousValue = iterator_to_array($previousValue); - } - if ($previousValue && \is_array($previousValue)) { - if (\is_object($collection)) { - $collection = iterator_to_array($collection); - } - foreach ($previousValue as $key => $item) { - if (!\in_array($item, $collection, true)) { - unset($previousValue[$key]); - $zval[self::VALUE]->$removeMethodName($item); - } - } - } else { - $previousValue = false; - } - - foreach ($collection as $item) { - if (!$previousValue || !\in_array($item, $previousValue, true)) { - $zval[self::VALUE]->$addMethodName($item); - } - } - } - - private function getWriteInfo(string $class, string $property, $value): PropertyWriteInfo - { - $useAdderAndRemover = is_iterable($value); - $key = str_replace('\\', '.', $class).'..'.$property.'..'.(int) $useAdderAndRemover; - - if (isset($this->writePropertyCache[$key])) { - return $this->writePropertyCache[$key]; - } - - if ($this->cacheItemPool) { - $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_WRITE.rawurlencode($key)); - if ($item->isHit()) { - return $this->writePropertyCache[$key] = $item->get(); - } - } - - $mutator = $this->writeInfoExtractor->getWriteInfo($class, $property, [ - 'enable_getter_setter_extraction' => true, - 'enable_magic_methods_extraction' => $this->magicMethodsFlags, - 'enable_constructor_extraction' => false, - 'enable_adder_remover_extraction' => $useAdderAndRemover, - ]); - - if (isset($item)) { - $this->cacheItemPool->save($item->set($mutator)); - } - - return $this->writePropertyCache[$key] = $mutator; - } - - /** - * Returns whether a property is writable in the given object. - */ - private function isPropertyWritable(object $object, string $property): bool - { - $mutatorForArray = $this->getWriteInfo(\get_class($object), $property, []); - - if (PropertyWriteInfo::TYPE_NONE !== $mutatorForArray->getType() || ($object instanceof \stdClass && property_exists($object, $property))) { - return true; - } - - $mutator = $this->getWriteInfo(\get_class($object), $property, ''); - - return PropertyWriteInfo::TYPE_NONE !== $mutator->getType() || ($object instanceof \stdClass && property_exists($object, $property)); - } - - /** - * Gets a PropertyPath instance and caches it. - * - * @param string|PropertyPath $propertyPath - */ - private function getPropertyPath($propertyPath): PropertyPath - { - if ($propertyPath instanceof PropertyPathInterface) { - // Don't call the copy constructor has it is not needed here - return $propertyPath; - } - - if (isset($this->propertyPathCache[$propertyPath])) { - return $this->propertyPathCache[$propertyPath]; - } - - if ($this->cacheItemPool) { - $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_PROPERTY_PATH.rawurlencode($propertyPath)); - if ($item->isHit()) { - return $this->propertyPathCache[$propertyPath] = $item->get(); - } - } - - $propertyPathInstance = new PropertyPath($propertyPath); - if (isset($item)) { - $item->set($propertyPathInstance); - $this->cacheItemPool->save($item); - } - - return $this->propertyPathCache[$propertyPath] = $propertyPathInstance; - } - - /** - * Creates the APCu adapter if applicable. - * - * @return AdapterInterface - * - * @throws \LogicException When the Cache Component isn't available - */ - public static function createCache(string $namespace, int $defaultLifetime, string $version, LoggerInterface $logger = null) - { - if (!class_exists(ApcuAdapter::class)) { - throw new \LogicException(sprintf('The Symfony Cache component must be installed to use "%s()".', __METHOD__)); - } - - if (!ApcuAdapter::isSupported()) { - return new NullAdapter(); - } - - $apcu = new ApcuAdapter($namespace, $defaultLifetime / 5, $version); - if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { - $apcu->setLogger(new NullLogger()); - } elseif (null !== $logger) { - $apcu->setLogger($logger); - } - - return $apcu; - } -} diff --git a/lib/symfony/property-access/PropertyAccessorBuilder.php b/lib/symfony/property-access/PropertyAccessorBuilder.php deleted file mode 100644 index 68c1984c6..000000000 --- a/lib/symfony/property-access/PropertyAccessorBuilder.php +++ /dev/null @@ -1,308 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; - -/** - * A configurable builder to create a PropertyAccessor. - * - * @author Jérémie Augustin - */ -class PropertyAccessorBuilder -{ - /** @var int */ - private $magicMethods = PropertyAccessor::MAGIC_GET | PropertyAccessor::MAGIC_SET; - private $throwExceptionOnInvalidIndex = false; - private $throwExceptionOnInvalidPropertyPath = true; - - /** - * @var CacheItemPoolInterface|null - */ - private $cacheItemPool; - - /** - * @var PropertyReadInfoExtractorInterface|null - */ - private $readInfoExtractor; - - /** - * @var PropertyWriteInfoExtractorInterface|null - */ - private $writeInfoExtractor; - - /** - * Enables the use of all magic methods by the PropertyAccessor. - * - * @return $this - */ - public function enableMagicMethods(): self - { - $this->magicMethods = PropertyAccessor::MAGIC_GET | PropertyAccessor::MAGIC_SET | PropertyAccessor::MAGIC_CALL; - - return $this; - } - - /** - * Disable the use of all magic methods by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicMethods(): self - { - $this->magicMethods = PropertyAccessor::DISALLOW_MAGIC_METHODS; - - return $this; - } - - /** - * Enables the use of "__call" by the PropertyAccessor. - * - * @return $this - */ - public function enableMagicCall() - { - $this->magicMethods |= PropertyAccessor::MAGIC_CALL; - - return $this; - } - - /** - * Enables the use of "__get" by the PropertyAccessor. - */ - public function enableMagicGet(): self - { - $this->magicMethods |= PropertyAccessor::MAGIC_GET; - - return $this; - } - - /** - * Enables the use of "__set" by the PropertyAccessor. - * - * @return $this - */ - public function enableMagicSet(): self - { - $this->magicMethods |= PropertyAccessor::MAGIC_SET; - - return $this; - } - - /** - * Disables the use of "__call" by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicCall() - { - $this->magicMethods &= ~PropertyAccessor::MAGIC_CALL; - - return $this; - } - - /** - * Disables the use of "__get" by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicGet(): self - { - $this->magicMethods &= ~PropertyAccessor::MAGIC_GET; - - return $this; - } - - /** - * Disables the use of "__set" by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicSet(): self - { - $this->magicMethods &= ~PropertyAccessor::MAGIC_SET; - - return $this; - } - - /** - * @return bool whether the use of "__call" by the PropertyAccessor is enabled - */ - public function isMagicCallEnabled() - { - return (bool) ($this->magicMethods & PropertyAccessor::MAGIC_CALL); - } - - /** - * @return bool whether the use of "__get" by the PropertyAccessor is enabled - */ - public function isMagicGetEnabled(): bool - { - return $this->magicMethods & PropertyAccessor::MAGIC_GET; - } - - /** - * @return bool whether the use of "__set" by the PropertyAccessor is enabled - */ - public function isMagicSetEnabled(): bool - { - return $this->magicMethods & PropertyAccessor::MAGIC_SET; - } - - /** - * Enables exceptions when reading a non-existing index. - * - * This has no influence on writing non-existing indices with PropertyAccessorInterface::setValue() - * which are always created on-the-fly. - * - * @return $this - */ - public function enableExceptionOnInvalidIndex() - { - $this->throwExceptionOnInvalidIndex = true; - - return $this; - } - - /** - * Disables exceptions when reading a non-existing index. - * - * Instead, null is returned when calling PropertyAccessorInterface::getValue() on a non-existing index. - * - * @return $this - */ - public function disableExceptionOnInvalidIndex() - { - $this->throwExceptionOnInvalidIndex = false; - - return $this; - } - - /** - * @return bool whether an exception is thrown or null is returned when reading a non-existing index - */ - public function isExceptionOnInvalidIndexEnabled() - { - return $this->throwExceptionOnInvalidIndex; - } - - /** - * Enables exceptions when reading a non-existing property. - * - * This has no influence on writing non-existing indices with PropertyAccessorInterface::setValue() - * which are always created on-the-fly. - * - * @return $this - */ - public function enableExceptionOnInvalidPropertyPath() - { - $this->throwExceptionOnInvalidPropertyPath = true; - - return $this; - } - - /** - * Disables exceptions when reading a non-existing index. - * - * Instead, null is returned when calling PropertyAccessorInterface::getValue() on a non-existing index. - * - * @return $this - */ - public function disableExceptionOnInvalidPropertyPath() - { - $this->throwExceptionOnInvalidPropertyPath = false; - - return $this; - } - - /** - * @return bool whether an exception is thrown or null is returned when reading a non-existing property - */ - public function isExceptionOnInvalidPropertyPath() - { - return $this->throwExceptionOnInvalidPropertyPath; - } - - /** - * Sets a cache system. - * - * @return $this - */ - public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null) - { - $this->cacheItemPool = $cacheItemPool; - - return $this; - } - - /** - * Gets the used cache system. - * - * @return CacheItemPoolInterface|null - */ - public function getCacheItemPool() - { - return $this->cacheItemPool; - } - - /** - * @return $this - */ - public function setReadInfoExtractor(?PropertyReadInfoExtractorInterface $readInfoExtractor) - { - $this->readInfoExtractor = $readInfoExtractor; - - return $this; - } - - public function getReadInfoExtractor(): ?PropertyReadInfoExtractorInterface - { - return $this->readInfoExtractor; - } - - /** - * @return $this - */ - public function setWriteInfoExtractor(?PropertyWriteInfoExtractorInterface $writeInfoExtractor) - { - $this->writeInfoExtractor = $writeInfoExtractor; - - return $this; - } - - public function getWriteInfoExtractor(): ?PropertyWriteInfoExtractorInterface - { - return $this->writeInfoExtractor; - } - - /** - * Builds and returns a new PropertyAccessor object. - * - * @return PropertyAccessorInterface - */ - public function getPropertyAccessor() - { - $throw = PropertyAccessor::DO_NOT_THROW; - - if ($this->throwExceptionOnInvalidIndex) { - $throw |= PropertyAccessor::THROW_ON_INVALID_INDEX; - } - - if ($this->throwExceptionOnInvalidPropertyPath) { - $throw |= PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH; - } - - return new PropertyAccessor($this->magicMethods, $throw, $this->cacheItemPool, $this->readInfoExtractor, $this->writeInfoExtractor); - } -} diff --git a/lib/symfony/property-access/PropertyAccessorInterface.php b/lib/symfony/property-access/PropertyAccessorInterface.php deleted file mode 100644 index c5226b2fe..000000000 --- a/lib/symfony/property-access/PropertyAccessorInterface.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * Writes and reads values to/from an object/array graph. - * - * @author Bernhard Schussek - */ -interface PropertyAccessorInterface -{ - /** - * Sets the value at the end of the property path of the object graph. - * - * Example: - * - * use Symfony\Component\PropertyAccess\PropertyAccess; - * - * $propertyAccessor = PropertyAccess::createPropertyAccessor(); - * - * echo $propertyAccessor->setValue($object, 'child.name', 'Fabien'); - * // equals echo $object->getChild()->setName('Fabien'); - * - * This method first tries to find a public setter for each property in the - * path. The name of the setter must be the camel-cased property name - * prefixed with "set". - * - * If the setter does not exist, this method tries to find a public - * property. The value of the property is then changed. - * - * If neither is found, an exception is thrown. - * - * @param object|array $objectOrArray The object or array to modify - * @param string|PropertyPathInterface $propertyPath The property path to modify - * @param mixed $value The value to set at the end of the property path - * - * @throws Exception\InvalidArgumentException If the property path is invalid - * @throws Exception\AccessException If a property/index does not exist or is not public - * @throws Exception\UnexpectedTypeException If a value within the path is neither object nor array - */ - public function setValue(&$objectOrArray, $propertyPath, $value); - - /** - * Returns the value at the end of the property path of the object graph. - * - * Example: - * - * use Symfony\Component\PropertyAccess\PropertyAccess; - * - * $propertyAccessor = PropertyAccess::createPropertyAccessor(); - * - * echo $propertyAccessor->getValue($object, 'child.name'); - * // equals echo $object->getChild()->getName(); - * - * This method first tries to find a public getter for each property in the - * path. The name of the getter must be the camel-cased property name - * prefixed with "get", "is", or "has". - * - * If the getter does not exist, this method tries to find a public - * property. The value of the property is then returned. - * - * If none of them are found, an exception is thrown. - * - * @param object|array $objectOrArray The object or array to traverse - * @param string|PropertyPathInterface $propertyPath The property path to read - * - * @return mixed - * - * @throws Exception\InvalidArgumentException If the property path is invalid - * @throws Exception\AccessException If a property/index does not exist or is not public - * @throws Exception\UnexpectedTypeException If a value within the path is neither object - * nor array - */ - public function getValue($objectOrArray, $propertyPath); - - /** - * Returns whether a value can be written at a given property path. - * - * Whenever this method returns true, {@link setValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $objectOrArray The object or array to check - * @param string|PropertyPathInterface $propertyPath The property path to check - * - * @return bool - * - * @throws Exception\InvalidArgumentException If the property path is invalid - */ - public function isWritable($objectOrArray, $propertyPath); - - /** - * Returns whether a property path can be read from an object graph. - * - * Whenever this method returns true, {@link getValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $objectOrArray The object or array to check - * @param string|PropertyPathInterface $propertyPath The property path to check - * - * @return bool - * - * @throws Exception\InvalidArgumentException If the property path is invalid - */ - public function isReadable($objectOrArray, $propertyPath); -} diff --git a/lib/symfony/property-access/PropertyPath.php b/lib/symfony/property-access/PropertyPath.php deleted file mode 100644 index e99c019a8..000000000 --- a/lib/symfony/property-access/PropertyPath.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException; -use Symfony\Component\PropertyAccess\Exception\OutOfBoundsException; - -/** - * Default implementation of {@link PropertyPathInterface}. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class PropertyPath implements \IteratorAggregate, PropertyPathInterface -{ - /** - * Character used for separating between plural and singular of an element. - */ - public const SINGULAR_SEPARATOR = '|'; - - /** - * The elements of the property path. - * - * @var list - */ - private $elements = []; - - /** - * The number of elements in the property path. - * - * @var int - */ - private $length; - - /** - * Contains a Boolean for each property in $elements denoting whether this - * element is an index. It is a property otherwise. - * - * @var array - */ - private $isIndex = []; - - /** - * String representation of the path. - * - * @var string - */ - private $pathAsString; - - /** - * Constructs a property path from a string. - * - * @param PropertyPath|string $propertyPath The property path as string or instance - * - * @throws InvalidArgumentException If the given path is not a string - * @throws InvalidPropertyPathException If the syntax of the property path is not valid - */ - public function __construct($propertyPath) - { - // Can be used as copy constructor - if ($propertyPath instanceof self) { - /* @var PropertyPath $propertyPath */ - $this->elements = $propertyPath->elements; - $this->length = $propertyPath->length; - $this->isIndex = $propertyPath->isIndex; - $this->pathAsString = $propertyPath->pathAsString; - - return; - } - if (!\is_string($propertyPath)) { - throw new InvalidArgumentException(sprintf('The property path constructor needs a string or an instance of "Symfony\Component\PropertyAccess\PropertyPath". Got: "%s".', get_debug_type($propertyPath))); - } - - if ('' === $propertyPath) { - throw new InvalidPropertyPathException('The property path should not be empty.'); - } - - $this->pathAsString = $propertyPath; - $position = 0; - $remaining = $propertyPath; - - // first element is evaluated differently - no leading dot for properties - $pattern = '/^(([^\.\[]++)|\[([^\]]++)\])(.*)/'; - - while (preg_match($pattern, $remaining, $matches)) { - if ('' !== $matches[2]) { - $element = $matches[2]; - $this->isIndex[] = false; - } else { - $element = $matches[3]; - $this->isIndex[] = true; - } - - $this->elements[] = $element; - - $position += \strlen($matches[1]); - $remaining = $matches[4]; - $pattern = '/^(\.([^\.|\[]++)|\[([^\]]++)\])(.*)/'; - } - - if ('' !== $remaining) { - throw new InvalidPropertyPathException(sprintf('Could not parse property path "%s". Unexpected token "%s" at position %d.', $propertyPath, $remaining[0], $position)); - } - - $this->length = \count($this->elements); - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return $this->pathAsString; - } - - /** - * {@inheritdoc} - */ - public function getLength() - { - return $this->length; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - if ($this->length <= 1) { - return null; - } - - $parent = clone $this; - - --$parent->length; - $parent->pathAsString = substr($parent->pathAsString, 0, max(strrpos($parent->pathAsString, '.'), strrpos($parent->pathAsString, '['))); - array_pop($parent->elements); - array_pop($parent->isIndex); - - return $parent; - } - - /** - * Returns a new iterator for this path. - * - * @return PropertyPathIteratorInterface - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new PropertyPathIterator($this); - } - - /** - * {@inheritdoc} - */ - public function getElements() - { - return $this->elements; - } - - /** - * {@inheritdoc} - */ - public function getElement(int $index) - { - if (!isset($this->elements[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index)); - } - - return $this->elements[$index]; - } - - /** - * {@inheritdoc} - */ - public function isProperty(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index)); - } - - return !$this->isIndex[$index]; - } - - /** - * {@inheritdoc} - */ - public function isIndex(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index)); - } - - return $this->isIndex[$index]; - } -} diff --git a/lib/symfony/property-access/PropertyPathBuilder.php b/lib/symfony/property-access/PropertyPathBuilder.php deleted file mode 100644 index b521f6ad1..000000000 --- a/lib/symfony/property-access/PropertyPathBuilder.php +++ /dev/null @@ -1,281 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Symfony\Component\PropertyAccess\Exception\OutOfBoundsException; - -/** - * @author Bernhard Schussek - */ -class PropertyPathBuilder -{ - private $elements = []; - private $isIndex = []; - - /** - * Creates a new property path builder. - * - * @param PropertyPathInterface|string|null $path The path to initially store - * in the builder. Optional. - */ - public function __construct($path = null) - { - if (null !== $path) { - $this->append($path); - } - } - - /** - * Appends a (sub-) path to the current path. - * - * @param PropertyPathInterface|string $path The path to append - * @param int $offset The offset where the appended - * piece starts in $path - * @param int $length The length of the appended piece - * If 0, the full path is appended - */ - public function append($path, int $offset = 0, int $length = 0) - { - if (\is_string($path)) { - $path = new PropertyPath($path); - } - - if (0 === $length) { - $end = $path->getLength(); - } else { - $end = $offset + $length; - } - - for (; $offset < $end; ++$offset) { - $this->elements[] = $path->getElement($offset); - $this->isIndex[] = $path->isIndex($offset); - } - } - - /** - * Appends an index element to the current path. - */ - public function appendIndex(string $name) - { - $this->elements[] = $name; - $this->isIndex[] = true; - } - - /** - * Appends a property element to the current path. - */ - public function appendProperty(string $name) - { - $this->elements[] = $name; - $this->isIndex[] = false; - } - - /** - * Removes elements from the current path. - * - * @throws OutOfBoundsException if offset is invalid - */ - public function remove(int $offset, int $length = 1) - { - if (!isset($this->elements[$offset])) { - throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset)); - } - - $this->resize($offset, $length, 0); - } - - /** - * Replaces a sub-path by a different (sub-) path. - * - * @param int $offset The offset at which to replace - * @param int $length The length of the piece to replace - * @param PropertyPathInterface|string $path The path to insert - * @param int $pathOffset The offset where the inserted piece - * starts in $path - * @param int $pathLength The length of the inserted piece - * If 0, the full path is inserted - * - * @throws OutOfBoundsException If the offset is invalid - */ - public function replace(int $offset, int $length, $path, int $pathOffset = 0, int $pathLength = 0) - { - if (\is_string($path)) { - $path = new PropertyPath($path); - } - - if ($offset < 0 && abs($offset) <= $this->getLength()) { - $offset = $this->getLength() + $offset; - } elseif (!isset($this->elements[$offset])) { - throw new OutOfBoundsException('The offset '.$offset.' is not within the property path'); - } - - if (0 === $pathLength) { - $pathLength = $path->getLength() - $pathOffset; - } - - $this->resize($offset, $length, $pathLength); - - for ($i = 0; $i < $pathLength; ++$i) { - $this->elements[$offset + $i] = $path->getElement($pathOffset + $i); - $this->isIndex[$offset + $i] = $path->isIndex($pathOffset + $i); - } - ksort($this->elements); - } - - /** - * Replaces a property element by an index element. - * - * @throws OutOfBoundsException If the offset is invalid - */ - public function replaceByIndex(int $offset, string $name = null) - { - if (!isset($this->elements[$offset])) { - throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset)); - } - - if (null !== $name) { - $this->elements[$offset] = $name; - } - - $this->isIndex[$offset] = true; - } - - /** - * Replaces an index element by a property element. - * - * @throws OutOfBoundsException If the offset is invalid - */ - public function replaceByProperty(int $offset, string $name = null) - { - if (!isset($this->elements[$offset])) { - throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset)); - } - - if (null !== $name) { - $this->elements[$offset] = $name; - } - - $this->isIndex[$offset] = false; - } - - /** - * Returns the length of the current path. - * - * @return int - */ - public function getLength() - { - return \count($this->elements); - } - - /** - * Returns the current property path. - * - * @return PropertyPathInterface|null - */ - public function getPropertyPath() - { - $pathAsString = $this->__toString(); - - return '' !== $pathAsString ? new PropertyPath($pathAsString) : null; - } - - /** - * Returns the current property path as string. - * - * @return string - */ - public function __toString() - { - $string = ''; - - foreach ($this->elements as $offset => $element) { - if ($this->isIndex[$offset]) { - $element = '['.$element.']'; - } elseif ('' !== $string) { - $string .= '.'; - } - - $string .= $element; - } - - return $string; - } - - /** - * Resizes the path so that a chunk of length $cutLength is - * removed at $offset and another chunk of length $insertionLength - * can be inserted. - */ - private function resize(int $offset, int $cutLength, int $insertionLength) - { - // Nothing else to do in this case - if ($insertionLength === $cutLength) { - return; - } - - $length = \count($this->elements); - - if ($cutLength > $insertionLength) { - // More elements should be removed than inserted - $diff = $cutLength - $insertionLength; - $newLength = $length - $diff; - - // Shift elements to the left (left-to-right until the new end) - // Max allowed offset to be shifted is such that - // $offset + $diff < $length (otherwise invalid index access) - // i.e. $offset < $length - $diff = $newLength - for ($i = $offset; $i < $newLength; ++$i) { - $this->elements[$i] = $this->elements[$i + $diff]; - $this->isIndex[$i] = $this->isIndex[$i + $diff]; - } - - // All remaining elements should be removed - $this->elements = \array_slice($this->elements, 0, $i); - $this->isIndex = \array_slice($this->isIndex, 0, $i); - } else { - $diff = $insertionLength - $cutLength; - - $newLength = $length + $diff; - $indexAfterInsertion = $offset + $insertionLength; - - // $diff <= $insertionLength - // $indexAfterInsertion >= $insertionLength - // => $diff <= $indexAfterInsertion - - // In each of the following loops, $i >= $diff must hold, - // otherwise ($i - $diff) becomes negative. - - // Shift old elements to the right to make up space for the - // inserted elements. This needs to be done left-to-right in - // order to preserve an ascending array index order - // Since $i = max($length, $indexAfterInsertion) and $indexAfterInsertion >= $diff, - // $i >= $diff is guaranteed. - for ($i = max($length, $indexAfterInsertion); $i < $newLength; ++$i) { - $this->elements[$i] = $this->elements[$i - $diff]; - $this->isIndex[$i] = $this->isIndex[$i - $diff]; - } - - // Shift remaining elements to the right. Do this right-to-left - // so we don't overwrite elements before copying them - // The last written index is the immediate index after the inserted - // string, because the indices before that will be overwritten - // anyway. - // Since $i >= $indexAfterInsertion and $indexAfterInsertion >= $diff, - // $i >= $diff is guaranteed. - for ($i = $length - 1; $i >= $indexAfterInsertion; --$i) { - $this->elements[$i] = $this->elements[$i - $diff]; - $this->isIndex[$i] = $this->isIndex[$i - $diff]; - } - } - } -} diff --git a/lib/symfony/property-access/PropertyPathInterface.php b/lib/symfony/property-access/PropertyPathInterface.php deleted file mode 100644 index d58ad328f..000000000 --- a/lib/symfony/property-access/PropertyPathInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * A sequence of property names or array indices. - * - * @author Bernhard Schussek - * - * @extends \Traversable - */ -interface PropertyPathInterface extends \Traversable -{ - /** - * Returns the string representation of the property path. - * - * @return string - */ - public function __toString(); - - /** - * Returns the length of the property path, i.e. the number of elements. - * - * @return int - */ - public function getLength(); - - /** - * Returns the parent property path. - * - * The parent property path is the one that contains the same items as - * this one except for the last one. - * - * If this property path only contains one item, null is returned. - * - * @return self|null - */ - public function getParent(); - - /** - * Returns the elements of the property path as array. - * - * @return list - */ - public function getElements(); - - /** - * Returns the element at the given index in the property path. - * - * @param int $index The index key - * - * @return string - * - * @throws Exception\OutOfBoundsException If the offset is invalid - */ - public function getElement(int $index); - - /** - * Returns whether the element at the given index is a property. - * - * @param int $index The index in the property path - * - * @return bool - * - * @throws Exception\OutOfBoundsException If the offset is invalid - */ - public function isProperty(int $index); - - /** - * Returns whether the element at the given index is an array index. - * - * @param int $index The index in the property path - * - * @return bool - * - * @throws Exception\OutOfBoundsException If the offset is invalid - */ - public function isIndex(int $index); -} diff --git a/lib/symfony/property-access/PropertyPathIterator.php b/lib/symfony/property-access/PropertyPathIterator.php deleted file mode 100644 index a3335e31b..000000000 --- a/lib/symfony/property-access/PropertyPathIterator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * Traverses a property path and provides additional methods to find out - * information about the current element. - * - * @author Bernhard Schussek - * - * @extends \ArrayIterator - */ -class PropertyPathIterator extends \ArrayIterator implements PropertyPathIteratorInterface -{ - protected $path; - - public function __construct(PropertyPathInterface $path) - { - parent::__construct($path->getElements()); - - $this->path = $path; - } - - /** - * {@inheritdoc} - */ - public function isIndex() - { - return $this->path->isIndex($this->key()); - } - - /** - * {@inheritdoc} - */ - public function isProperty() - { - return $this->path->isProperty($this->key()); - } -} diff --git a/lib/symfony/property-access/PropertyPathIteratorInterface.php b/lib/symfony/property-access/PropertyPathIteratorInterface.php deleted file mode 100644 index 0397f9c17..000000000 --- a/lib/symfony/property-access/PropertyPathIteratorInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * @author Bernhard Schussek - * - * @extends \SeekableIterator - */ -interface PropertyPathIteratorInterface extends \SeekableIterator -{ - /** - * Returns whether the current element in the property path is an array - * index. - * - * @return bool - */ - public function isIndex(); - - /** - * Returns whether the current element in the property path is a property - * name. - * - * @return bool - */ - public function isProperty(); -} diff --git a/lib/symfony/property-access/README.md b/lib/symfony/property-access/README.md deleted file mode 100644 index 29cb233a0..000000000 --- a/lib/symfony/property-access/README.md +++ /dev/null @@ -1,14 +0,0 @@ -PropertyAccess Component -======================== - -The PropertyAccess component provides functions to read and write from/to an -object or array using a simple string notation. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/property_access.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/property-access/composer.json b/lib/symfony/property-access/composer.json deleted file mode 100644 index b797151a0..000000000 --- a/lib/symfony/property-access/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/property-access", - "type": "library", - "description": "Provides functions to read and write from/to an object or array using a simple string notation", - "keywords": ["property", "index", "access", "object", "array", "extraction", "injection", "reflection", "property-path"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/property-info": "^5.2|^6.0" - }, - "require-dev": { - "symfony/cache": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/cache-implementation": "To cache access methods." - }, - "autoload": { - "psr-4": { "Symfony\\Component\\PropertyAccess\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/property-info/CHANGELOG.md b/lib/symfony/property-info/CHANGELOG.md deleted file mode 100644 index 8963b940e..000000000 --- a/lib/symfony/property-info/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add PhpStanExtractor - -5.3 ---- - - * Add support for multiple types for collection keys & values - * Deprecate the `Type::getCollectionKeyType()` and `Type::getCollectionValueType()` methods, use `Type::getCollectionKeyTypes()` and `Type::getCollectionValueTypes()` instead - -5.2.0 ------ - - * deprecated the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()` in favor of `enable_magic_methods_extraction` - -5.1.0 ------ - - * Add support for extracting accessor and mutator via PHP Reflection - -4.3.0 ------ - - * Added the ability to extract private and protected properties and methods on `ReflectionExtractor` - * Added the ability to extract property type based on its initial value - -4.2.0 ------ - - * added `PropertyInitializableExtractorInterface` to test if a property can be initialized through the constructor (implemented by `ReflectionExtractor`) - -3.3.0 ------ - - * Added `PropertyInfoPass` diff --git a/lib/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php b/lib/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php deleted file mode 100644 index cab31b365..000000000 --- a/lib/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Adds extractors to the property_info.constructor_extractor service. - * - * @author Dmitrii Poddubnyi - */ -final class PropertyInfoConstructorPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $service; - private $tag; - - public function __construct(string $service = 'property_info.constructor_extractor', string $tag = 'property_info.constructor_extractor') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->service = $service; - $this->tag = $tag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->service)) { - return; - } - $definition = $container->getDefinition($this->service); - - $listExtractors = $this->findAndSortTaggedServices($this->tag, $container); - $definition->replaceArgument(0, new IteratorArgument($listExtractors)); - } -} diff --git a/lib/symfony/property-info/DependencyInjection/PropertyInfoPass.php b/lib/symfony/property-info/DependencyInjection/PropertyInfoPass.php deleted file mode 100644 index 289b114f1..000000000 --- a/lib/symfony/property-info/DependencyInjection/PropertyInfoPass.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Adds extractors to the property_info service. - * - * @author Kévin Dunglas - */ -class PropertyInfoPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $propertyInfoService; - private $listExtractorTag; - private $typeExtractorTag; - private $descriptionExtractorTag; - private $accessExtractorTag; - private $initializableExtractorTag; - - public function __construct(string $propertyInfoService = 'property_info', string $listExtractorTag = 'property_info.list_extractor', string $typeExtractorTag = 'property_info.type_extractor', string $descriptionExtractorTag = 'property_info.description_extractor', string $accessExtractorTag = 'property_info.access_extractor', string $initializableExtractorTag = 'property_info.initializable_extractor') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->propertyInfoService = $propertyInfoService; - $this->listExtractorTag = $listExtractorTag; - $this->typeExtractorTag = $typeExtractorTag; - $this->descriptionExtractorTag = $descriptionExtractorTag; - $this->accessExtractorTag = $accessExtractorTag; - $this->initializableExtractorTag = $initializableExtractorTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->propertyInfoService)) { - return; - } - - $definition = $container->getDefinition($this->propertyInfoService); - - $listExtractors = $this->findAndSortTaggedServices($this->listExtractorTag, $container); - $definition->replaceArgument(0, new IteratorArgument($listExtractors)); - - $typeExtractors = $this->findAndSortTaggedServices($this->typeExtractorTag, $container); - $definition->replaceArgument(1, new IteratorArgument($typeExtractors)); - - $descriptionExtractors = $this->findAndSortTaggedServices($this->descriptionExtractorTag, $container); - $definition->replaceArgument(2, new IteratorArgument($descriptionExtractors)); - - $accessExtractors = $this->findAndSortTaggedServices($this->accessExtractorTag, $container); - $definition->replaceArgument(3, new IteratorArgument($accessExtractors)); - - $initializableExtractors = $this->findAndSortTaggedServices($this->initializableExtractorTag, $container); - $definition->setArgument(4, new IteratorArgument($initializableExtractors)); - } -} diff --git a/lib/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php b/lib/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php deleted file mode 100644 index cbde902e9..000000000 --- a/lib/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\Type; - -/** - * Infers the constructor argument type. - * - * @author Dmitrii Poddubnyi - * - * @internal - */ -interface ConstructorArgumentTypeExtractorInterface -{ - /** - * Gets types of an argument from constructor. - * - * @return Type[]|null - * - * @internal - */ - public function getTypesFromConstructor(string $class, string $property): ?array; -} diff --git a/lib/symfony/property-info/Extractor/ConstructorExtractor.php b/lib/symfony/property-info/Extractor/ConstructorExtractor.php deleted file mode 100644 index fb32634fb..000000000 --- a/lib/symfony/property-info/Extractor/ConstructorExtractor.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; - -/** - * Extracts the constructor argument type using ConstructorArgumentTypeExtractorInterface implementations. - * - * @author Dmitrii Poddubnyi - */ -final class ConstructorExtractor implements PropertyTypeExtractorInterface -{ - private $extractors; - - /** - * @param iterable $extractors - */ - public function __construct(iterable $extractors = []) - { - $this->extractors = $extractors; - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - foreach ($this->extractors as $extractor) { - $value = $extractor->getTypesFromConstructor($class, $property); - if (null !== $value) { - return $value; - } - } - - return null; - } -} diff --git a/lib/symfony/property-info/Extractor/PhpDocExtractor.php b/lib/symfony/property-info/Extractor/PhpDocExtractor.php deleted file mode 100644 index 2cecfcf8b..000000000 --- a/lib/symfony/property-info/Extractor/PhpDocExtractor.php +++ /dev/null @@ -1,360 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag; -use phpDocumentor\Reflection\DocBlockFactory; -use phpDocumentor\Reflection\DocBlockFactoryInterface; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\ContextFactory; -use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\Type; -use Symfony\Component\PropertyInfo\Util\PhpDocTypeHelper; - -/** - * Extracts data using a PHPDoc parser. - * - * @author Kévin Dunglas - * - * @final - */ -class PhpDocExtractor implements PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface -{ - public const PROPERTY = 0; - public const ACCESSOR = 1; - public const MUTATOR = 2; - - /** - * @var array - */ - private $docBlocks = []; - - /** - * @var Context[] - */ - private $contexts = []; - - private $docBlockFactory; - private $contextFactory; - private $phpDocTypeHelper; - private $mutatorPrefixes; - private $accessorPrefixes; - private $arrayMutatorPrefixes; - - /** - * @param string[]|null $mutatorPrefixes - * @param string[]|null $accessorPrefixes - * @param string[]|null $arrayMutatorPrefixes - */ - public function __construct(DocBlockFactoryInterface $docBlockFactory = null, array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) - { - if (!class_exists(DocBlockFactory::class)) { - throw new \LogicException(sprintf('Unable to use the "%s" class as the "phpdocumentor/reflection-docblock" package is not installed. Try running composer require "phpdocumentor/reflection-docblock".', __CLASS__)); - } - - $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance(); - $this->contextFactory = new ContextFactory(); - $this->phpDocTypeHelper = new PhpDocTypeHelper(); - $this->mutatorPrefixes = $mutatorPrefixes ?? ReflectionExtractor::$defaultMutatorPrefixes; - $this->accessorPrefixes = $accessorPrefixes ?? ReflectionExtractor::$defaultAccessorPrefixes; - $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes; - } - - /** - * {@inheritdoc} - */ - public function getShortDescription(string $class, string $property, array $context = []): ?string - { - /** @var $docBlock DocBlock */ - [$docBlock] = $this->getDocBlock($class, $property); - if (!$docBlock) { - return null; - } - - $shortDescription = $docBlock->getSummary(); - - if (!empty($shortDescription)) { - return $shortDescription; - } - - foreach ($docBlock->getTagsByName('var') as $var) { - if ($var && !$var instanceof InvalidTag) { - $varDescription = $var->getDescription()->render(); - - if (!empty($varDescription)) { - return $varDescription; - } - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getLongDescription(string $class, string $property, array $context = []): ?string - { - /** @var $docBlock DocBlock */ - [$docBlock] = $this->getDocBlock($class, $property); - if (!$docBlock) { - return null; - } - - $contents = $docBlock->getDescription()->render(); - - return '' === $contents ? null : $contents; - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - /** @var $docBlock DocBlock */ - [$docBlock, $source, $prefix] = $this->getDocBlock($class, $property); - if (!$docBlock) { - return null; - } - - switch ($source) { - case self::PROPERTY: - $tag = 'var'; - break; - - case self::ACCESSOR: - $tag = 'return'; - break; - - case self::MUTATOR: - $tag = 'param'; - break; - } - - $parentClass = null; - $types = []; - /** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */ - foreach ($docBlock->getTagsByName($tag) as $tag) { - if ($tag && !$tag instanceof InvalidTag && null !== $tag->getType()) { - foreach ($this->phpDocTypeHelper->getTypes($tag->getType()) as $type) { - switch ($type->getClassName()) { - case 'self': - case 'static': - $resolvedClass = $class; - break; - - case 'parent': - if (false !== $resolvedClass = $parentClass ?? $parentClass = get_parent_class($class)) { - break; - } - // no break - - default: - $types[] = $type; - continue 2; - } - - $types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $type->isNullable(), $resolvedClass, $type->isCollection(), $type->getCollectionKeyTypes(), $type->getCollectionValueTypes()); - } - } - } - - if (!isset($types[0])) { - return null; - } - - if (!\in_array($prefix, $this->arrayMutatorPrefixes)) { - return $types; - } - - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])]; - } - - /** - * {@inheritdoc} - */ - public function getTypesFromConstructor(string $class, string $property): ?array - { - $docBlock = $this->getDocBlockFromConstructor($class, $property); - - if (!$docBlock) { - return null; - } - - $types = []; - /** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */ - foreach ($docBlock->getTagsByName('param') as $tag) { - if ($tag && null !== $tag->getType()) { - $types[] = $this->phpDocTypeHelper->getTypes($tag->getType()); - } - } - - if (!isset($types[0]) || [] === $types[0]) { - return null; - } - - return array_merge([], ...$types); - } - - private function getDocBlockFromConstructor(string $class, string $property): ?DocBlock - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - $reflectionConstructor = $reflectionClass->getConstructor(); - if (!$reflectionConstructor) { - return null; - } - - try { - $docBlock = $this->docBlockFactory->create($reflectionConstructor, $this->contextFactory->createFromReflector($reflectionConstructor)); - - return $this->filterDocBlockParams($docBlock, $property); - } catch (\InvalidArgumentException $e) { - return null; - } - } - - private function filterDocBlockParams(DocBlock $docBlock, string $allowedParam): DocBlock - { - $tags = array_values(array_filter($docBlock->getTagsByName('param'), function ($tag) use ($allowedParam) { - return $tag instanceof DocBlock\Tags\Param && $allowedParam === $tag->getVariableName(); - })); - - return new DocBlock($docBlock->getSummary(), $docBlock->getDescription(), $tags, $docBlock->getContext(), - $docBlock->getLocation(), $docBlock->isTemplateStart(), $docBlock->isTemplateEnd()); - } - - /** - * @return array{DocBlock|null, int|null, string|null} - */ - private function getDocBlock(string $class, string $property): array - { - $propertyHash = sprintf('%s::%s', $class, $property); - - if (isset($this->docBlocks[$propertyHash])) { - return $this->docBlocks[$propertyHash]; - } - - $ucFirstProperty = ucfirst($property); - - switch (true) { - case $docBlock = $this->getDocBlockFromProperty($class, $property): - $data = [$docBlock, self::PROPERTY, null]; - break; - - case [$docBlock] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR): - $data = [$docBlock, self::ACCESSOR, null]; - break; - - case [$docBlock, $prefix] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::MUTATOR): - $data = [$docBlock, self::MUTATOR, $prefix]; - break; - - default: - $data = [null, null, null]; - } - - return $this->docBlocks[$propertyHash] = $data; - } - - private function getDocBlockFromProperty(string $class, string $property): ?DocBlock - { - // Use a ReflectionProperty instead of $class to get the parent class if applicable - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - } catch (\ReflectionException $e) { - return null; - } - - $reflector = $reflectionProperty->getDeclaringClass(); - - foreach ($reflector->getTraits() as $trait) { - if ($trait->hasProperty($property)) { - return $this->getDocBlockFromProperty($trait->getName(), $property); - } - } - - try { - return $this->docBlockFactory->create($reflectionProperty, $this->createFromReflector($reflector)); - } catch (\InvalidArgumentException|\RuntimeException $e) { - return null; - } - } - - /** - * @return array{DocBlock, string}|null - */ - private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array - { - $prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes; - $prefix = null; - - foreach ($prefixes as $prefix) { - $methodName = $prefix.$ucFirstProperty; - - try { - $reflectionMethod = new \ReflectionMethod($class, $methodName); - if ($reflectionMethod->isStatic()) { - continue; - } - - if ( - (self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters()) || - (self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1) - ) { - break; - } - } catch (\ReflectionException $e) { - // Try the next prefix if the method doesn't exist - } - } - - if (!isset($reflectionMethod)) { - return null; - } - - $reflector = $reflectionMethod->getDeclaringClass(); - - foreach ($reflector->getTraits() as $trait) { - if ($trait->hasMethod($methodName)) { - return $this->getDocBlockFromMethod($trait->getName(), $ucFirstProperty, $type); - } - } - - try { - return [$this->docBlockFactory->create($reflectionMethod, $this->createFromReflector($reflector)), $prefix]; - } catch (\InvalidArgumentException|\RuntimeException $e) { - return null; - } - } - - /** - * Prevents a lot of redundant calls to ContextFactory::createForNamespace(). - */ - private function createFromReflector(\ReflectionClass $reflector): Context - { - $cacheKey = $reflector->getNamespaceName().':'.$reflector->getFileName(); - - if (isset($this->contexts[$cacheKey])) { - return $this->contexts[$cacheKey]; - } - - $this->contexts[$cacheKey] = $this->contextFactory->createFromReflector($reflector); - - return $this->contexts[$cacheKey]; - } -} diff --git a/lib/symfony/property-info/Extractor/PhpStanExtractor.php b/lib/symfony/property-info/Extractor/PhpStanExtractor.php deleted file mode 100644 index a964b5036..000000000 --- a/lib/symfony/property-info/Extractor/PhpStanExtractor.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use phpDocumentor\Reflection\Types\ContextFactory; -use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; -use PHPStan\PhpDocParser\Lexer\Lexer; -use PHPStan\PhpDocParser\Parser\ConstExprParser; -use PHPStan\PhpDocParser\Parser\PhpDocParser; -use PHPStan\PhpDocParser\Parser\TokenIterator; -use PHPStan\PhpDocParser\Parser\TypeParser; -use Symfony\Component\PropertyInfo\PhpStan\NameScopeFactory; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\Type; -use Symfony\Component\PropertyInfo\Util\PhpStanTypeHelper; - -/** - * Extracts data using PHPStan parser. - * - * @author Baptiste Leduc - */ -final class PhpStanExtractor implements PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface -{ - private const PROPERTY = 0; - private const ACCESSOR = 1; - private const MUTATOR = 2; - - /** @var PhpDocParser */ - private $phpDocParser; - - /** @var Lexer */ - private $lexer; - - /** @var NameScopeFactory */ - private $nameScopeFactory; - - /** @var array */ - private $docBlocks = []; - private $phpStanTypeHelper; - private $mutatorPrefixes; - private $accessorPrefixes; - private $arrayMutatorPrefixes; - - /** - * @param list|null $mutatorPrefixes - * @param list|null $accessorPrefixes - * @param list|null $arrayMutatorPrefixes - */ - public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) - { - if (!class_exists(ContextFactory::class)) { - throw new \LogicException(sprintf('Unable to use the "%s" class as the "phpdocumentor/type-resolver" package is not installed. Try running composer require "phpdocumentor/type-resolver".', __CLASS__)); - } - - if (!class_exists(PhpDocParser::class)) { - throw new \LogicException(sprintf('Unable to use the "%s" class as the "phpstan/phpdoc-parser" package is not installed. Try running composer require "phpstan/phpdoc-parser".', __CLASS__)); - } - - $this->phpStanTypeHelper = new PhpStanTypeHelper(); - $this->mutatorPrefixes = $mutatorPrefixes ?? ReflectionExtractor::$defaultMutatorPrefixes; - $this->accessorPrefixes = $accessorPrefixes ?? ReflectionExtractor::$defaultAccessorPrefixes; - $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes; - - $this->phpDocParser = new PhpDocParser(new TypeParser(new ConstExprParser()), new ConstExprParser()); - $this->lexer = new Lexer(); - $this->nameScopeFactory = new NameScopeFactory(); - } - - public function getTypes(string $class, string $property, array $context = []): ?array - { - /** @var PhpDocNode|null $docNode */ - [$docNode, $source, $prefix, $declaringClass] = $this->getDocBlock($class, $property); - $nameScope = $this->nameScopeFactory->create($class, $declaringClass); - if (null === $docNode) { - return null; - } - - switch ($source) { - case self::PROPERTY: - $tag = '@var'; - break; - - case self::ACCESSOR: - $tag = '@return'; - break; - - case self::MUTATOR: - $tag = '@param'; - break; - } - - $parentClass = null; - $types = []; - foreach ($docNode->getTagsByName($tag) as $tagDocNode) { - if ($tagDocNode->value instanceof InvalidTagValueNode) { - continue; - } - - foreach ($this->phpStanTypeHelper->getTypes($tagDocNode->value, $nameScope) as $type) { - switch ($type->getClassName()) { - case 'self': - case 'static': - $resolvedClass = $class; - break; - - case 'parent': - if (false !== $resolvedClass = $parentClass ?? $parentClass = get_parent_class($class)) { - break; - } - // no break - - default: - $types[] = $type; - continue 2; - } - - $types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $type->isNullable(), $resolvedClass, $type->isCollection(), $type->getCollectionKeyTypes(), $type->getCollectionValueTypes()); - } - } - - if (!isset($types[0])) { - return null; - } - - if (!\in_array($prefix, $this->arrayMutatorPrefixes, true)) { - return $types; - } - - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])]; - } - - public function getTypesFromConstructor(string $class, string $property): ?array - { - if (null === $tagDocNode = $this->getDocBlockFromConstructor($class, $property)) { - return null; - } - - $types = []; - foreach ($this->phpStanTypeHelper->getTypes($tagDocNode, $this->nameScopeFactory->create($class)) as $type) { - $types[] = $type; - } - - if (!isset($types[0])) { - return null; - } - - return $types; - } - - private function getDocBlockFromConstructor(string $class, string $property): ?ParamTagValueNode - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - if (null === $reflectionConstructor = $reflectionClass->getConstructor()) { - return null; - } - - if (!$rawDocNode = $reflectionConstructor->getDocComment()) { - return null; - } - - $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); - $phpDocNode = $this->phpDocParser->parse($tokens); - $tokens->consumeTokenType(Lexer::TOKEN_END); - - return $this->filterDocBlockParams($phpDocNode, $property); - } - - private function filterDocBlockParams(PhpDocNode $docNode, string $allowedParam): ?ParamTagValueNode - { - $tags = array_values(array_filter($docNode->getTagsByName('@param'), function ($tagNode) use ($allowedParam) { - return $tagNode instanceof PhpDocTagNode && ('$'.$allowedParam) === $tagNode->value->parameterName; - })); - - if (!$tags) { - return null; - } - - return $tags[0]->value; - } - - /** - * @return array{PhpDocNode|null, int|null, string|null, string|null} - */ - private function getDocBlock(string $class, string $property): array - { - $propertyHash = $class.'::'.$property; - - if (isset($this->docBlocks[$propertyHash])) { - return $this->docBlocks[$propertyHash]; - } - - $ucFirstProperty = ucfirst($property); - - if ([$docBlock, $declaringClass] = $this->getDocBlockFromProperty($class, $property)) { - $data = [$docBlock, self::PROPERTY, null, $declaringClass]; - } elseif ([$docBlock, $_, $declaringClass] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR)) { - $data = [$docBlock, self::ACCESSOR, null, $declaringClass]; - } elseif ([$docBlock, $prefix, $declaringClass] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::MUTATOR)) { - $data = [$docBlock, self::MUTATOR, $prefix, $declaringClass]; - } else { - $data = [null, null, null, null]; - } - - return $this->docBlocks[$propertyHash] = $data; - } - - /** - * @return array{PhpDocNode, string}|null - */ - private function getDocBlockFromProperty(string $class, string $property): ?array - { - // Use a ReflectionProperty instead of $class to get the parent class if applicable - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - } catch (\ReflectionException $e) { - return null; - } - - if (null === $rawDocNode = $reflectionProperty->getDocComment() ?: null) { - return null; - } - - $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); - $phpDocNode = $this->phpDocParser->parse($tokens); - $tokens->consumeTokenType(Lexer::TOKEN_END); - - return [$phpDocNode, $reflectionProperty->class]; - } - - /** - * @return array{PhpDocNode, string, string}|null - */ - private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array - { - $prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes; - $prefix = null; - - foreach ($prefixes as $prefix) { - $methodName = $prefix.$ucFirstProperty; - - try { - $reflectionMethod = new \ReflectionMethod($class, $methodName); - if ($reflectionMethod->isStatic()) { - continue; - } - - if ( - (self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters()) - || (self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1) - ) { - break; - } - } catch (\ReflectionException $e) { - // Try the next prefix if the method doesn't exist - } - } - - if (!isset($reflectionMethod)) { - return null; - } - - if (null === $rawDocNode = $reflectionMethod->getDocComment() ?: null) { - return null; - } - - $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); - $phpDocNode = $this->phpDocParser->parse($tokens); - $tokens->consumeTokenType(Lexer::TOKEN_END); - - return [$phpDocNode, $prefix, $reflectionMethod->class]; - } -} diff --git a/lib/symfony/property-info/Extractor/ReflectionExtractor.php b/lib/symfony/property-info/Extractor/ReflectionExtractor.php deleted file mode 100644 index 4da591238..000000000 --- a/lib/symfony/property-info/Extractor/ReflectionExtractor.php +++ /dev/null @@ -1,885 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfo; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfo; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; -use Symfony\Component\PropertyInfo\Type; -use Symfony\Component\String\Inflector\EnglishInflector; -use Symfony\Component\String\Inflector\InflectorInterface; - -/** - * Extracts data using the reflection API. - * - * @author Kévin Dunglas - * - * @final - */ -class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface, PropertyInitializableExtractorInterface, PropertyReadInfoExtractorInterface, PropertyWriteInfoExtractorInterface, ConstructorArgumentTypeExtractorInterface -{ - /** - * @internal - */ - public static $defaultMutatorPrefixes = ['add', 'remove', 'set']; - - /** - * @internal - */ - public static $defaultAccessorPrefixes = ['get', 'is', 'has', 'can']; - - /** - * @internal - */ - public static $defaultArrayMutatorPrefixes = ['add', 'remove']; - - public const ALLOW_PRIVATE = 1; - public const ALLOW_PROTECTED = 2; - public const ALLOW_PUBLIC = 4; - - /** @var int Allow none of the magic methods */ - public const DISALLOW_MAGIC_METHODS = 0; - /** @var int Allow magic __get methods */ - public const ALLOW_MAGIC_GET = 1 << 0; - /** @var int Allow magic __set methods */ - public const ALLOW_MAGIC_SET = 1 << 1; - /** @var int Allow magic __call methods */ - public const ALLOW_MAGIC_CALL = 1 << 2; - - private const MAP_TYPES = [ - 'integer' => Type::BUILTIN_TYPE_INT, - 'boolean' => Type::BUILTIN_TYPE_BOOL, - 'double' => Type::BUILTIN_TYPE_FLOAT, - ]; - - private $mutatorPrefixes; - private $accessorPrefixes; - private $arrayMutatorPrefixes; - private $enableConstructorExtraction; - private $methodReflectionFlags; - private $magicMethodsFlags; - private $propertyReflectionFlags; - private $inflector; - - private $arrayMutatorPrefixesFirst; - private $arrayMutatorPrefixesLast; - - /** - * @param string[]|null $mutatorPrefixes - * @param string[]|null $accessorPrefixes - * @param string[]|null $arrayMutatorPrefixes - */ - public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null, bool $enableConstructorExtraction = true, int $accessFlags = self::ALLOW_PUBLIC, InflectorInterface $inflector = null, int $magicMethodsFlags = self::ALLOW_MAGIC_GET | self::ALLOW_MAGIC_SET) - { - $this->mutatorPrefixes = $mutatorPrefixes ?? self::$defaultMutatorPrefixes; - $this->accessorPrefixes = $accessorPrefixes ?? self::$defaultAccessorPrefixes; - $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? self::$defaultArrayMutatorPrefixes; - $this->enableConstructorExtraction = $enableConstructorExtraction; - $this->methodReflectionFlags = $this->getMethodsFlags($accessFlags); - $this->propertyReflectionFlags = $this->getPropertyFlags($accessFlags); - $this->magicMethodsFlags = $magicMethodsFlags; - $this->inflector = $inflector ?? new EnglishInflector(); - - $this->arrayMutatorPrefixesFirst = array_merge($this->arrayMutatorPrefixes, array_diff($this->mutatorPrefixes, $this->arrayMutatorPrefixes)); - $this->arrayMutatorPrefixesLast = array_reverse($this->arrayMutatorPrefixesFirst); - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $reflectionProperties = $reflectionClass->getProperties(); - - $properties = []; - foreach ($reflectionProperties as $reflectionProperty) { - if ($reflectionProperty->getModifiers() & $this->propertyReflectionFlags) { - $properties[$reflectionProperty->name] = $reflectionProperty->name; - } - } - - foreach ($reflectionClass->getMethods($this->methodReflectionFlags) as $reflectionMethod) { - if ($reflectionMethod->isStatic()) { - continue; - } - - $propertyName = $this->getPropertyName($reflectionMethod->name, $reflectionProperties); - if (!$propertyName || isset($properties[$propertyName])) { - continue; - } - if ($reflectionClass->hasProperty($lowerCasedPropertyName = lcfirst($propertyName)) || (!$reflectionClass->hasProperty($propertyName) && !preg_match('/^[A-Z]{2,}/', $propertyName))) { - $propertyName = $lowerCasedPropertyName; - } - $properties[$propertyName] = $propertyName; - } - - return $properties ? array_values($properties) : null; - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - if ($fromMutator = $this->extractFromMutator($class, $property)) { - return $fromMutator; - } - - if ($fromAccessor = $this->extractFromAccessor($class, $property)) { - return $fromAccessor; - } - - if ( - ($context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction) && - $fromConstructor = $this->extractFromConstructor($class, $property) - ) { - return $fromConstructor; - } - - if ($fromPropertyDeclaration = $this->extractFromPropertyDeclaration($class, $property)) { - return $fromPropertyDeclaration; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getTypesFromConstructor(string $class, string $property): ?array - { - try { - $reflection = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - if (!$reflectionConstructor = $reflection->getConstructor()) { - return null; - } - if (!$reflectionParameter = $this->getReflectionParameterFromConstructor($property, $reflectionConstructor)) { - return null; - } - if (!$reflectionType = $reflectionParameter->getType()) { - return null; - } - if (!$types = $this->extractFromReflectionType($reflectionType, $reflectionConstructor->getDeclaringClass())) { - return null; - } - - return $types; - } - - private function getReflectionParameterFromConstructor(string $property, \ReflectionMethod $reflectionConstructor): ?\ReflectionParameter - { - $reflectionParameter = null; - foreach ($reflectionConstructor->getParameters() as $reflectionParameter) { - if ($reflectionParameter->getName() === $property) { - return $reflectionParameter; - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function isReadable(string $class, string $property, array $context = []): ?bool - { - if ($this->isAllowedProperty($class, $property)) { - return true; - } - - return null !== $this->getReadInfo($class, $property, $context); - } - - /** - * {@inheritdoc} - */ - public function isWritable(string $class, string $property, array $context = []): ?bool - { - if ($this->isAllowedProperty($class, $property, true)) { - return true; - } - - [$reflectionMethod] = $this->getMutatorMethod($class, $property); - - return null !== $reflectionMethod; - } - - /** - * {@inheritdoc} - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - if (!$reflectionClass->isInstantiable()) { - return false; - } - - if ($constructor = $reflectionClass->getConstructor()) { - foreach ($constructor->getParameters() as $parameter) { - if ($property === $parameter->name) { - return true; - } - } - } elseif ($parentClass = $reflectionClass->getParentClass()) { - return $this->isInitializable($parentClass->getName(), $property); - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function getReadInfo(string $class, string $property, array $context = []): ?PropertyReadInfo - { - try { - $reflClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $allowGetterSetter = $context['enable_getter_setter_extraction'] ?? false; - $magicMethods = $context['enable_magic_methods_extraction'] ?? $this->magicMethodsFlags; - $allowMagicCall = (bool) ($magicMethods & self::ALLOW_MAGIC_CALL); - $allowMagicGet = (bool) ($magicMethods & self::ALLOW_MAGIC_GET); - - if (isset($context['enable_magic_call_extraction'])) { - trigger_deprecation('symfony/property-info', '5.2', 'Using the "enable_magic_call_extraction" context option in "%s()" is deprecated. Use "enable_magic_methods_extraction" instead.', __METHOD__); - - $allowMagicCall = $context['enable_magic_call_extraction'] ?? false; - } - - $hasProperty = $reflClass->hasProperty($property); - $camelProp = $this->camelize($property); - $getsetter = lcfirst($camelProp); // jQuery style, e.g. read: last(), write: last($item) - - foreach ($this->accessorPrefixes as $prefix) { - $methodName = $prefix.$camelProp; - - if ($reflClass->hasMethod($methodName) && $reflClass->getMethod($methodName)->getModifiers() & $this->methodReflectionFlags && !$reflClass->getMethod($methodName)->getNumberOfRequiredParameters()) { - $method = $reflClass->getMethod($methodName); - - return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $methodName, $this->getReadVisiblityForMethod($method), $method->isStatic(), false); - } - } - - if ($allowGetterSetter && $reflClass->hasMethod($getsetter) && ($reflClass->getMethod($getsetter)->getModifiers() & $this->methodReflectionFlags)) { - $method = $reflClass->getMethod($getsetter); - - return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $getsetter, $this->getReadVisiblityForMethod($method), $method->isStatic(), false); - } - - if ($allowMagicGet && $reflClass->hasMethod('__get') && ($reflClass->getMethod('__get')->getModifiers() & $this->methodReflectionFlags)) { - return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, PropertyReadInfo::VISIBILITY_PUBLIC, false, false); - } - - if ($hasProperty && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) { - $reflProperty = $reflClass->getProperty($property); - - return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, $this->getReadVisiblityForProperty($reflProperty), $reflProperty->isStatic(), true); - } - - if ($allowMagicCall && $reflClass->hasMethod('__call') && ($reflClass->getMethod('__call')->getModifiers() & $this->methodReflectionFlags)) { - return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, 'get'.$camelProp, PropertyReadInfo::VISIBILITY_PUBLIC, false, false); - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getWriteInfo(string $class, string $property, array $context = []): ?PropertyWriteInfo - { - try { - $reflClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $allowGetterSetter = $context['enable_getter_setter_extraction'] ?? false; - $magicMethods = $context['enable_magic_methods_extraction'] ?? $this->magicMethodsFlags; - $allowMagicCall = (bool) ($magicMethods & self::ALLOW_MAGIC_CALL); - $allowMagicSet = (bool) ($magicMethods & self::ALLOW_MAGIC_SET); - - if (isset($context['enable_magic_call_extraction'])) { - trigger_deprecation('symfony/property-info', '5.2', 'Using the "enable_magic_call_extraction" context option in "%s()" is deprecated. Use "enable_magic_methods_extraction" instead.', __METHOD__); - - $allowMagicCall = $context['enable_magic_call_extraction'] ?? false; - } - - $allowConstruct = $context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction; - $allowAdderRemover = $context['enable_adder_remover_extraction'] ?? true; - - $camelized = $this->camelize($property); - $constructor = $reflClass->getConstructor(); - $singulars = $this->inflector->singularize($camelized); - $errors = []; - - if (null !== $constructor && $allowConstruct) { - foreach ($constructor->getParameters() as $parameter) { - if ($parameter->getName() === $property) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_CONSTRUCTOR, $property); - } - } - } - - [$adderAccessName, $removerAccessName, $adderAndRemoverErrors] = $this->findAdderAndRemover($reflClass, $singulars); - if ($allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) { - $adderMethod = $reflClass->getMethod($adderAccessName); - $removerMethod = $reflClass->getMethod($removerAccessName); - - $mutator = new PropertyWriteInfo(PropertyWriteInfo::TYPE_ADDER_AND_REMOVER); - $mutator->setAdderInfo(new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $adderAccessName, $this->getWriteVisiblityForMethod($adderMethod), $adderMethod->isStatic())); - $mutator->setRemoverInfo(new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $removerAccessName, $this->getWriteVisiblityForMethod($removerMethod), $removerMethod->isStatic())); - - return $mutator; - } - - $errors[] = $adderAndRemoverErrors; - - foreach ($this->mutatorPrefixes as $mutatorPrefix) { - $methodName = $mutatorPrefix.$camelized; - - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, $methodName, 1); - if (!$accessible) { - $errors[] = $methodAccessibleErrors; - continue; - } - - $method = $reflClass->getMethod($methodName); - - if (!\in_array($mutatorPrefix, $this->arrayMutatorPrefixes, true)) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $methodName, $this->getWriteVisiblityForMethod($method), $method->isStatic()); - } - } - - $getsetter = lcfirst($camelized); - - if ($allowGetterSetter) { - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, $getsetter, 1); - if ($accessible) { - $method = $reflClass->getMethod($getsetter); - - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $getsetter, $this->getWriteVisiblityForMethod($method), $method->isStatic()); - } - - $errors[] = $methodAccessibleErrors; - } - - if ($reflClass->hasProperty($property) && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) { - $reflProperty = $reflClass->getProperty($property); - if (\PHP_VERSION_ID < 80100 || !$reflProperty->isReadOnly()) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, $this->getWriteVisiblityForProperty($reflProperty), $reflProperty->isStatic()); - } - - $errors[] = [sprintf('The property "%s" in class "%s" is a promoted readonly property.', $property, $reflClass->getName())]; - $allowMagicSet = $allowMagicCall = false; - } - - if ($allowMagicSet) { - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, '__set', 2); - if ($accessible) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, PropertyWriteInfo::VISIBILITY_PUBLIC, false); - } - - $errors[] = $methodAccessibleErrors; - } - - if ($allowMagicCall) { - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, '__call', 2); - if ($accessible) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, 'set'.$camelized, PropertyWriteInfo::VISIBILITY_PUBLIC, false); - } - - $errors[] = $methodAccessibleErrors; - } - - if (!$allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) { - $errors[] = [sprintf( - 'The property "%s" in class "%s" can be defined with the methods "%s()" but '. - 'the new value must be an array or an instance of \Traversable', - $property, - $reflClass->getName(), - implode('()", "', [$adderAccessName, $removerAccessName]) - )]; - } - - $noneProperty = new PropertyWriteInfo(); - $noneProperty->setErrors(array_merge([], ...$errors)); - - return $noneProperty; - } - - /** - * @return Type[]|null - */ - private function extractFromMutator(string $class, string $property): ?array - { - [$reflectionMethod, $prefix] = $this->getMutatorMethod($class, $property); - if (null === $reflectionMethod) { - return null; - } - - $reflectionParameters = $reflectionMethod->getParameters(); - $reflectionParameter = $reflectionParameters[0]; - - if (!$reflectionType = $reflectionParameter->getType()) { - return null; - } - $type = $this->extractFromReflectionType($reflectionType, $reflectionMethod->getDeclaringClass()); - - if (1 === \count($type) && \in_array($prefix, $this->arrayMutatorPrefixes)) { - $type = [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $type[0])]; - } - - return $type; - } - - /** - * Tries to extract type information from accessors. - * - * @return Type[]|null - */ - private function extractFromAccessor(string $class, string $property): ?array - { - [$reflectionMethod, $prefix] = $this->getAccessorMethod($class, $property); - if (null === $reflectionMethod) { - return null; - } - - if ($reflectionType = $reflectionMethod->getReturnType()) { - return $this->extractFromReflectionType($reflectionType, $reflectionMethod->getDeclaringClass()); - } - - if (\in_array($prefix, ['is', 'can', 'has'])) { - return [new Type(Type::BUILTIN_TYPE_BOOL)]; - } - - return null; - } - - /** - * Tries to extract type information from constructor. - * - * @return Type[]|null - */ - private function extractFromConstructor(string $class, string $property): ?array - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $constructor = $reflectionClass->getConstructor(); - - if (!$constructor) { - return null; - } - - foreach ($constructor->getParameters() as $parameter) { - if ($property !== $parameter->name) { - continue; - } - $reflectionType = $parameter->getType(); - - return $reflectionType ? $this->extractFromReflectionType($reflectionType, $constructor->getDeclaringClass()) : null; - } - - if ($parentClass = $reflectionClass->getParentClass()) { - return $this->extractFromConstructor($parentClass->getName(), $property); - } - - return null; - } - - private function extractFromPropertyDeclaration(string $class, string $property): ?array - { - try { - $reflectionClass = new \ReflectionClass($class); - - if (\PHP_VERSION_ID >= 70400) { - $reflectionProperty = $reflectionClass->getProperty($property); - $reflectionPropertyType = $reflectionProperty->getType(); - - if (null !== $reflectionPropertyType && $types = $this->extractFromReflectionType($reflectionPropertyType, $reflectionProperty->getDeclaringClass())) { - return $types; - } - } - } catch (\ReflectionException $e) { - return null; - } - - $defaultValue = $reflectionClass->getDefaultProperties()[$property] ?? null; - - if (null === $defaultValue) { - return null; - } - - $type = \gettype($defaultValue); - $type = static::MAP_TYPES[$type] ?? $type; - - return [new Type($type, $this->isNullableProperty($class, $property), null, Type::BUILTIN_TYPE_ARRAY === $type)]; - } - - private function extractFromReflectionType(\ReflectionType $reflectionType, \ReflectionClass $declaringClass): array - { - $types = []; - $nullable = $reflectionType->allowsNull(); - - foreach (($reflectionType instanceof \ReflectionUnionType || $reflectionType instanceof \ReflectionIntersectionType) ? $reflectionType->getTypes() : [$reflectionType] as $type) { - if (!$type instanceof \ReflectionNamedType) { - // Nested composite types are not supported yet. - return []; - } - - $phpTypeOrClass = $type->getName(); - if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass || 'never' === $phpTypeOrClass) { - continue; - } - - if (Type::BUILTIN_TYPE_ARRAY === $phpTypeOrClass) { - $types[] = new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true); - } elseif ('void' === $phpTypeOrClass) { - $types[] = new Type(Type::BUILTIN_TYPE_NULL, $nullable); - } elseif ($type->isBuiltin()) { - $types[] = new Type($phpTypeOrClass, $nullable); - } else { - $types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $nullable, $this->resolveTypeName($phpTypeOrClass, $declaringClass)); - } - } - - return $types; - } - - private function resolveTypeName(string $name, \ReflectionClass $declaringClass): string - { - if ('self' === $lcName = strtolower($name)) { - return $declaringClass->name; - } - if ('parent' === $lcName && $parent = $declaringClass->getParentClass()) { - return $parent->name; - } - - return $name; - } - - private function isNullableProperty(string $class, string $property): bool - { - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - - if (\PHP_VERSION_ID >= 70400) { - $reflectionPropertyType = $reflectionProperty->getType(); - - return null !== $reflectionPropertyType && $reflectionPropertyType->allowsNull(); - } - - return false; - } catch (\ReflectionException $e) { - // Return false if the property doesn't exist - } - - return false; - } - - private function isAllowedProperty(string $class, string $property, bool $writeAccessRequired = false): bool - { - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - - if (\PHP_VERSION_ID >= 80100 && $writeAccessRequired && $reflectionProperty->isReadOnly()) { - return false; - } - - return (bool) ($reflectionProperty->getModifiers() & $this->propertyReflectionFlags); - } catch (\ReflectionException $e) { - // Return false if the property doesn't exist - } - - return false; - } - - /** - * Gets the accessor method. - * - * Returns an array with a the instance of \ReflectionMethod as first key - * and the prefix of the method as second or null if not found. - */ - private function getAccessorMethod(string $class, string $property): ?array - { - $ucProperty = ucfirst($property); - - foreach ($this->accessorPrefixes as $prefix) { - try { - $reflectionMethod = new \ReflectionMethod($class, $prefix.$ucProperty); - if ($reflectionMethod->isStatic()) { - continue; - } - - if (0 === $reflectionMethod->getNumberOfRequiredParameters()) { - return [$reflectionMethod, $prefix]; - } - } catch (\ReflectionException $e) { - // Return null if the property doesn't exist - } - } - - return null; - } - - /** - * Returns an array with a the instance of \ReflectionMethod as first key - * and the prefix of the method as second or null if not found. - */ - private function getMutatorMethod(string $class, string $property): ?array - { - $ucProperty = ucfirst($property); - $ucSingulars = $this->inflector->singularize($ucProperty); - - $mutatorPrefixes = \in_array($ucProperty, $ucSingulars, true) ? $this->arrayMutatorPrefixesLast : $this->arrayMutatorPrefixesFirst; - - foreach ($mutatorPrefixes as $prefix) { - $names = [$ucProperty]; - if (\in_array($prefix, $this->arrayMutatorPrefixes)) { - $names = array_merge($names, $ucSingulars); - } - - foreach ($names as $name) { - try { - $reflectionMethod = new \ReflectionMethod($class, $prefix.$name); - if ($reflectionMethod->isStatic()) { - continue; - } - - // Parameter can be optional to allow things like: method(array $foo = null) - if ($reflectionMethod->getNumberOfParameters() >= 1) { - return [$reflectionMethod, $prefix]; - } - } catch (\ReflectionException $e) { - // Try the next prefix if the method doesn't exist - } - } - } - - return null; - } - - private function getPropertyName(string $methodName, array $reflectionProperties): ?string - { - $pattern = implode('|', array_merge($this->accessorPrefixes, $this->mutatorPrefixes)); - - if ('' !== $pattern && preg_match('/^('.$pattern.')(.+)$/i', $methodName, $matches)) { - if (!\in_array($matches[1], $this->arrayMutatorPrefixes)) { - return $matches[2]; - } - - foreach ($reflectionProperties as $reflectionProperty) { - foreach ($this->inflector->singularize($reflectionProperty->name) as $name) { - if (strtolower($name) === strtolower($matches[2])) { - return $reflectionProperty->name; - } - } - } - - return $matches[2]; - } - - return null; - } - - /** - * Searches for add and remove methods. - * - * @param \ReflectionClass $reflClass The reflection class for the given object - * @param array $singulars The singular form of the property name or null - * - * @return array An array containing the adder and remover when found and errors - */ - private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars): array - { - if (!\is_array($this->arrayMutatorPrefixes) && 2 !== \count($this->arrayMutatorPrefixes)) { - return [null, null, []]; - } - - [$addPrefix, $removePrefix] = $this->arrayMutatorPrefixes; - $errors = []; - - foreach ($singulars as $singular) { - $addMethod = $addPrefix.$singular; - $removeMethod = $removePrefix.$singular; - - [$addMethodFound, $addMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $addMethod, 1); - [$removeMethodFound, $removeMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $removeMethod, 1); - $errors[] = $addMethodAccessibleErrors; - $errors[] = $removeMethodAccessibleErrors; - - if ($addMethodFound && $removeMethodFound) { - return [$addMethod, $removeMethod, []]; - } - - if ($addMethodFound && !$removeMethodFound) { - $errors[] = [sprintf('The add method "%s" in class "%s" was found, but the corresponding remove method "%s" was not found', $addMethod, $reflClass->getName(), $removeMethod)]; - } elseif (!$addMethodFound && $removeMethodFound) { - $errors[] = [sprintf('The remove method "%s" in class "%s" was found, but the corresponding add method "%s" was not found', $removeMethod, $reflClass->getName(), $addMethod)]; - } - } - - return [null, null, array_merge([], ...$errors)]; - } - - /** - * Returns whether a method is public and has the number of required parameters and errors. - */ - private function isMethodAccessible(\ReflectionClass $class, string $methodName, int $parameters): array - { - $errors = []; - - if ($class->hasMethod($methodName)) { - $method = $class->getMethod($methodName); - - if (\ReflectionMethod::IS_PUBLIC === $this->methodReflectionFlags && !$method->isPublic()) { - $errors[] = sprintf('The method "%s" in class "%s" was found but does not have public access.', $methodName, $class->getName()); - } elseif ($method->getNumberOfRequiredParameters() > $parameters || $method->getNumberOfParameters() < $parameters) { - $errors[] = sprintf('The method "%s" in class "%s" requires %d arguments, but should accept only %d.', $methodName, $class->getName(), $method->getNumberOfRequiredParameters(), $parameters); - } else { - return [true, $errors]; - } - } - - return [false, $errors]; - } - - /** - * Camelizes a given string. - */ - private function camelize(string $string): string - { - return str_replace(' ', '', ucwords(str_replace('_', ' ', $string))); - } - - /** - * Return allowed reflection method flags. - */ - private function getMethodsFlags(int $accessFlags): int - { - $methodFlags = 0; - - if ($accessFlags & self::ALLOW_PUBLIC) { - $methodFlags |= \ReflectionMethod::IS_PUBLIC; - } - - if ($accessFlags & self::ALLOW_PRIVATE) { - $methodFlags |= \ReflectionMethod::IS_PRIVATE; - } - - if ($accessFlags & self::ALLOW_PROTECTED) { - $methodFlags |= \ReflectionMethod::IS_PROTECTED; - } - - return $methodFlags; - } - - /** - * Return allowed reflection property flags. - */ - private function getPropertyFlags(int $accessFlags): int - { - $propertyFlags = 0; - - if ($accessFlags & self::ALLOW_PUBLIC) { - $propertyFlags |= \ReflectionProperty::IS_PUBLIC; - } - - if ($accessFlags & self::ALLOW_PRIVATE) { - $propertyFlags |= \ReflectionProperty::IS_PRIVATE; - } - - if ($accessFlags & self::ALLOW_PROTECTED) { - $propertyFlags |= \ReflectionProperty::IS_PROTECTED; - } - - return $propertyFlags; - } - - private function getReadVisiblityForProperty(\ReflectionProperty $reflectionProperty): string - { - if ($reflectionProperty->isPrivate()) { - return PropertyReadInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionProperty->isProtected()) { - return PropertyReadInfo::VISIBILITY_PROTECTED; - } - - return PropertyReadInfo::VISIBILITY_PUBLIC; - } - - private function getReadVisiblityForMethod(\ReflectionMethod $reflectionMethod): string - { - if ($reflectionMethod->isPrivate()) { - return PropertyReadInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionMethod->isProtected()) { - return PropertyReadInfo::VISIBILITY_PROTECTED; - } - - return PropertyReadInfo::VISIBILITY_PUBLIC; - } - - private function getWriteVisiblityForProperty(\ReflectionProperty $reflectionProperty): string - { - if ($reflectionProperty->isPrivate()) { - return PropertyWriteInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionProperty->isProtected()) { - return PropertyWriteInfo::VISIBILITY_PROTECTED; - } - - return PropertyWriteInfo::VISIBILITY_PUBLIC; - } - - private function getWriteVisiblityForMethod(\ReflectionMethod $reflectionMethod): string - { - if ($reflectionMethod->isPrivate()) { - return PropertyWriteInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionMethod->isProtected()) { - return PropertyWriteInfo::VISIBILITY_PROTECTED; - } - - return PropertyWriteInfo::VISIBILITY_PUBLIC; - } -} diff --git a/lib/symfony/property-info/Extractor/SerializerExtractor.php b/lib/symfony/property-info/Extractor/SerializerExtractor.php deleted file mode 100644 index 08ff10d04..000000000 --- a/lib/symfony/property-info/Extractor/SerializerExtractor.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; - -/** - * Lists available properties using Symfony Serializer Component metadata. - * - * @author Kévin Dunglas - * - * @final - */ -class SerializerExtractor implements PropertyListExtractorInterface -{ - private $classMetadataFactory; - - public function __construct(ClassMetadataFactoryInterface $classMetadataFactory) - { - $this->classMetadataFactory = $classMetadataFactory; - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - if (!\array_key_exists('serializer_groups', $context) || (null !== $context['serializer_groups'] && !\is_array($context['serializer_groups']))) { - return null; - } - - if (!$this->classMetadataFactory->getMetadataFor($class)) { - return null; - } - - $properties = []; - $serializerClassMetadata = $this->classMetadataFactory->getMetadataFor($class); - - foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) { - $ignored = method_exists($serializerAttributeMetadata, 'isIgnored') && $serializerAttributeMetadata->isIgnored(); - if (!$ignored && (null === $context['serializer_groups'] || array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups()))) { - $properties[] = $serializerAttributeMetadata->getName(); - } - } - - return $properties; - } -} diff --git a/lib/symfony/property-info/LICENSE b/lib/symfony/property-info/LICENSE deleted file mode 100644 index 6e3afce69..000000000 --- a/lib/symfony/property-info/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/property-info/PhpStan/NameScope.php b/lib/symfony/property-info/PhpStan/NameScope.php deleted file mode 100644 index 7d9a5f9ac..000000000 --- a/lib/symfony/property-info/PhpStan/NameScope.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\PhpStan; - -/** - * NameScope class adapted from PHPStan code. - * - * @copyright Copyright (c) 2016, PHPStan https://github.com/phpstan/phpstan-src - * @copyright Copyright (c) 2016, Ondřej Mirtes - * @author Baptiste Leduc - * - * @internal - */ -final class NameScope -{ - private $calledClassName; - private $namespace; - /** @var array alias(string) => fullName(string) */ - private $uses; - - public function __construct(string $calledClassName, string $namespace, array $uses = []) - { - $this->calledClassName = $calledClassName; - $this->namespace = $namespace; - $this->uses = $uses; - } - - public function resolveStringName(string $name): string - { - if (0 === strpos($name, '\\')) { - return ltrim($name, '\\'); - } - - $nameParts = explode('\\', $name); - $firstNamePart = $nameParts[0]; - if (isset($this->uses[$firstNamePart])) { - if (1 === \count($nameParts)) { - return $this->uses[$firstNamePart]; - } - array_shift($nameParts); - - return sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts)); - } - - if (null !== $this->namespace) { - return sprintf('%s\\%s', $this->namespace, $name); - } - - return $name; - } - - public function resolveRootClass(): string - { - return $this->resolveStringName($this->calledClassName); - } -} diff --git a/lib/symfony/property-info/PhpStan/NameScopeFactory.php b/lib/symfony/property-info/PhpStan/NameScopeFactory.php deleted file mode 100644 index 32f2f330e..000000000 --- a/lib/symfony/property-info/PhpStan/NameScopeFactory.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\PhpStan; - -use phpDocumentor\Reflection\Types\ContextFactory; - -/** - * @author Baptiste Leduc - * - * @internal - */ -final class NameScopeFactory -{ - public function create(string $calledClassName, string $declaringClassName = null): NameScope - { - $declaringClassName = $declaringClassName ?? $calledClassName; - - $path = explode('\\', $calledClassName); - $calledClassName = array_pop($path); - - $declaringReflection = new \ReflectionClass($declaringClassName); - [$declaringNamespace, $declaringUses] = $this->extractFromFullClassName($declaringReflection); - $declaringUses = array_merge($declaringUses, $this->collectUses($declaringReflection)); - - return new NameScope($calledClassName, $declaringNamespace, $declaringUses); - } - - private function collectUses(\ReflectionClass $reflection): array - { - $uses = [$this->extractFromFullClassName($reflection)[1]]; - - foreach ($reflection->getTraits() as $traitReflection) { - $uses[] = $this->extractFromFullClassName($traitReflection)[1]; - } - - if (false !== $parentClass = $reflection->getParentClass()) { - $uses[] = $this->collectUses($parentClass); - } - - return $uses ? array_merge(...$uses) : []; - } - - private function extractFromFullClassName(\ReflectionClass $reflection): array - { - $namespace = trim($reflection->getNamespaceName(), '\\'); - $fileName = $reflection->getFileName(); - - if (\is_string($fileName) && is_file($fileName)) { - if (false === $contents = file_get_contents($fileName)) { - throw new \RuntimeException(sprintf('Unable to read file "%s".', $fileName)); - } - - $factory = new ContextFactory(); - $context = $factory->createForNamespace($namespace, $contents); - - return [$namespace, $context->getNamespaceAliases()]; - } - - return [$namespace, []]; - } -} diff --git a/lib/symfony/property-info/PropertyAccessExtractorInterface.php b/lib/symfony/property-info/PropertyAccessExtractorInterface.php deleted file mode 100644 index f9ee78713..000000000 --- a/lib/symfony/property-info/PropertyAccessExtractorInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Guesses if the property can be accessed or mutated. - * - * @author Kévin Dunglas - */ -interface PropertyAccessExtractorInterface -{ - /** - * Is the property readable? - * - * @return bool|null - */ - public function isReadable(string $class, string $property, array $context = []); - - /** - * Is the property writable? - * - * @return bool|null - */ - public function isWritable(string $class, string $property, array $context = []); -} diff --git a/lib/symfony/property-info/PropertyDescriptionExtractorInterface.php b/lib/symfony/property-info/PropertyDescriptionExtractorInterface.php deleted file mode 100644 index f37653753..000000000 --- a/lib/symfony/property-info/PropertyDescriptionExtractorInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Guesses the property's human readable description. - * - * @author Kévin Dunglas - */ -interface PropertyDescriptionExtractorInterface -{ - /** - * Gets the short description of the property. - * - * @return string|null - */ - public function getShortDescription(string $class, string $property, array $context = []); - - /** - * Gets the long description of the property. - * - * @return string|null - */ - public function getLongDescription(string $class, string $property, array $context = []); -} diff --git a/lib/symfony/property-info/PropertyInfoCacheExtractor.php b/lib/symfony/property-info/PropertyInfoCacheExtractor.php deleted file mode 100644 index ca7b32427..000000000 --- a/lib/symfony/property-info/PropertyInfoCacheExtractor.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -use Psr\Cache\CacheItemPoolInterface; - -/** - * Adds a PSR-6 cache layer on top of an extractor. - * - * @author Kévin Dunglas - * - * @final - */ -class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface, PropertyInitializableExtractorInterface -{ - private $propertyInfoExtractor; - private $cacheItemPool; - private $arrayCache = []; - - public function __construct(PropertyInfoExtractorInterface $propertyInfoExtractor, CacheItemPoolInterface $cacheItemPool) - { - $this->propertyInfoExtractor = $propertyInfoExtractor; - $this->cacheItemPool = $cacheItemPool; - } - - /** - * {@inheritdoc} - */ - public function isReadable(string $class, string $property, array $context = []): ?bool - { - return $this->extract('isReadable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isWritable(string $class, string $property, array $context = []): ?bool - { - return $this->extract('isWritable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getShortDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract('getShortDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getLongDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract('getLongDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - return $this->extract('getProperties', [$class, $context]); - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - return $this->extract('getTypes', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool - { - return $this->extract('isInitializable', [$class, $property, $context]); - } - - /** - * Retrieves the cached data if applicable or delegates to the decorated extractor. - * - * @return mixed - */ - private function extract(string $method, array $arguments) - { - try { - $serializedArguments = serialize($arguments); - } catch (\Exception $exception) { - // If arguments are not serializable, skip the cache - return $this->propertyInfoExtractor->{$method}(...$arguments); - } - - // Calling rawurlencode escapes special characters not allowed in PSR-6's keys - $key = rawurlencode($method.'.'.$serializedArguments); - - if (\array_key_exists($key, $this->arrayCache)) { - return $this->arrayCache[$key]; - } - - $item = $this->cacheItemPool->getItem($key); - - if ($item->isHit()) { - return $this->arrayCache[$key] = $item->get(); - } - - $value = $this->propertyInfoExtractor->{$method}(...$arguments); - $item->set($value); - $this->cacheItemPool->save($item); - - return $this->arrayCache[$key] = $value; - } -} diff --git a/lib/symfony/property-info/PropertyInfoExtractor.php b/lib/symfony/property-info/PropertyInfoExtractor.php deleted file mode 100644 index eca169f18..000000000 --- a/lib/symfony/property-info/PropertyInfoExtractor.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Default {@see PropertyInfoExtractorInterface} implementation. - * - * @author Kévin Dunglas - * - * @final - */ -class PropertyInfoExtractor implements PropertyInfoExtractorInterface, PropertyInitializableExtractorInterface -{ - private $listExtractors; - private $typeExtractors; - private $descriptionExtractors; - private $accessExtractors; - private $initializableExtractors; - - /** - * @param iterable $listExtractors - * @param iterable $typeExtractors - * @param iterable $descriptionExtractors - * @param iterable $accessExtractors - * @param iterable $initializableExtractors - */ - public function __construct(iterable $listExtractors = [], iterable $typeExtractors = [], iterable $descriptionExtractors = [], iterable $accessExtractors = [], iterable $initializableExtractors = []) - { - $this->listExtractors = $listExtractors; - $this->typeExtractors = $typeExtractors; - $this->descriptionExtractors = $descriptionExtractors; - $this->accessExtractors = $accessExtractors; - $this->initializableExtractors = $initializableExtractors; - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - return $this->extract($this->listExtractors, 'getProperties', [$class, $context]); - } - - /** - * {@inheritdoc} - */ - public function getShortDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract($this->descriptionExtractors, 'getShortDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getLongDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract($this->descriptionExtractors, 'getLongDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - return $this->extract($this->typeExtractors, 'getTypes', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isReadable(string $class, string $property, array $context = []): ?bool - { - return $this->extract($this->accessExtractors, 'isReadable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isWritable(string $class, string $property, array $context = []): ?bool - { - return $this->extract($this->accessExtractors, 'isWritable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool - { - return $this->extract($this->initializableExtractors, 'isInitializable', [$class, $property, $context]); - } - - /** - * Iterates over registered extractors and return the first value found. - * - * @param iterable $extractors - * @param list $arguments - * - * @return mixed - */ - private function extract(iterable $extractors, string $method, array $arguments) - { - foreach ($extractors as $extractor) { - if (null !== $value = $extractor->{$method}(...$arguments)) { - return $value; - } - } - - return null; - } -} diff --git a/lib/symfony/property-info/PropertyInfoExtractorInterface.php b/lib/symfony/property-info/PropertyInfoExtractorInterface.php deleted file mode 100644 index 889301865..000000000 --- a/lib/symfony/property-info/PropertyInfoExtractorInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Gets info about PHP class properties. - * - * A convenient interface inheriting all specific info interfaces. - * - * @author Kévin Dunglas - */ -interface PropertyInfoExtractorInterface extends PropertyTypeExtractorInterface, PropertyDescriptionExtractorInterface, PropertyAccessExtractorInterface, PropertyListExtractorInterface -{ -} diff --git a/lib/symfony/property-info/PropertyInitializableExtractorInterface.php b/lib/symfony/property-info/PropertyInitializableExtractorInterface.php deleted file mode 100644 index 13248fc19..000000000 --- a/lib/symfony/property-info/PropertyInitializableExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Guesses if the property can be initialized through the constructor. - * - * @author Kévin Dunglas - */ -interface PropertyInitializableExtractorInterface -{ - /** - * Is the property initializable? Returns true if a constructor's parameter matches the given property name. - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool; -} diff --git a/lib/symfony/property-info/PropertyListExtractorInterface.php b/lib/symfony/property-info/PropertyListExtractorInterface.php deleted file mode 100644 index 326e6cccb..000000000 --- a/lib/symfony/property-info/PropertyListExtractorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Extracts the list of properties available for the given class. - * - * @author Kévin Dunglas - */ -interface PropertyListExtractorInterface -{ - /** - * Gets the list of properties available for the given class. - * - * @return string[]|null - */ - public function getProperties(string $class, array $context = []); -} diff --git a/lib/symfony/property-info/PropertyReadInfo.php b/lib/symfony/property-info/PropertyReadInfo.php deleted file mode 100644 index ae1035244..000000000 --- a/lib/symfony/property-info/PropertyReadInfo.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * The property read info tells how a property can be read. - * - * @author Joel Wurtz - * - * @internal - */ -final class PropertyReadInfo -{ - public const TYPE_METHOD = 'method'; - public const TYPE_PROPERTY = 'property'; - - public const VISIBILITY_PUBLIC = 'public'; - public const VISIBILITY_PROTECTED = 'protected'; - public const VISIBILITY_PRIVATE = 'private'; - - private $type; - - private $name; - - private $visibility; - - private $static; - - private $byRef; - - public function __construct(string $type, string $name, string $visibility, bool $static, bool $byRef) - { - $this->type = $type; - $this->name = $name; - $this->visibility = $visibility; - $this->static = $static; - $this->byRef = $byRef; - } - - /** - * Get type of access. - */ - public function getType(): string - { - return $this->type; - } - - /** - * Get name of the access, which can be a method name or a property name, depending on the type. - */ - public function getName(): string - { - return $this->name; - } - - public function getVisibility(): string - { - return $this->visibility; - } - - public function isStatic(): bool - { - return $this->static; - } - - /** - * Whether this accessor can be accessed by reference. - */ - public function canBeReference(): bool - { - return $this->byRef; - } -} diff --git a/lib/symfony/property-info/PropertyReadInfoExtractorInterface.php b/lib/symfony/property-info/PropertyReadInfoExtractorInterface.php deleted file mode 100644 index 816b2825d..000000000 --- a/lib/symfony/property-info/PropertyReadInfoExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Extract read information for the property of a class. - * - * @author Joel Wurtz - */ -interface PropertyReadInfoExtractorInterface -{ - /** - * Get read information object for a given property of a class. - */ - public function getReadInfo(string $class, string $property, array $context = []): ?PropertyReadInfo; -} diff --git a/lib/symfony/property-info/PropertyTypeExtractorInterface.php b/lib/symfony/property-info/PropertyTypeExtractorInterface.php deleted file mode 100644 index 6da0bcb4c..000000000 --- a/lib/symfony/property-info/PropertyTypeExtractorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Type Extractor Interface. - * - * @author Kévin Dunglas - */ -interface PropertyTypeExtractorInterface -{ - /** - * Gets types of a property. - * - * @return Type[]|null - */ - public function getTypes(string $class, string $property, array $context = []); -} diff --git a/lib/symfony/property-info/PropertyWriteInfo.php b/lib/symfony/property-info/PropertyWriteInfo.php deleted file mode 100644 index b4e33b240..000000000 --- a/lib/symfony/property-info/PropertyWriteInfo.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * The write mutator defines how a property can be written. - * - * @author Joel Wurtz - * - * @internal - */ -final class PropertyWriteInfo -{ - public const TYPE_NONE = 'none'; - public const TYPE_METHOD = 'method'; - public const TYPE_PROPERTY = 'property'; - public const TYPE_ADDER_AND_REMOVER = 'adder_and_remover'; - public const TYPE_CONSTRUCTOR = 'constructor'; - - public const VISIBILITY_PUBLIC = 'public'; - public const VISIBILITY_PROTECTED = 'protected'; - public const VISIBILITY_PRIVATE = 'private'; - - private $type; - private $name; - private $visibility; - private $static; - private $adderInfo; - private $removerInfo; - private $errors = []; - - public function __construct(string $type = self::TYPE_NONE, string $name = null, string $visibility = null, bool $static = null) - { - $this->type = $type; - $this->name = $name; - $this->visibility = $visibility; - $this->static = $static; - } - - public function getType(): string - { - return $this->type; - } - - public function getName(): string - { - if (null === $this->name) { - throw new \LogicException("Calling getName() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->name; - } - - public function setAdderInfo(self $adderInfo): void - { - $this->adderInfo = $adderInfo; - } - - public function getAdderInfo(): self - { - if (null === $this->adderInfo) { - throw new \LogicException("Calling getAdderInfo() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->adderInfo; - } - - public function setRemoverInfo(self $removerInfo): void - { - $this->removerInfo = $removerInfo; - } - - public function getRemoverInfo(): self - { - if (null === $this->removerInfo) { - throw new \LogicException("Calling getRemoverInfo() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->removerInfo; - } - - public function getVisibility(): string - { - if (null === $this->visibility) { - throw new \LogicException("Calling getVisibility() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->visibility; - } - - public function isStatic(): bool - { - if (null === $this->static) { - throw new \LogicException("Calling isStatic() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->static; - } - - public function setErrors(array $errors): void - { - $this->errors = $errors; - } - - public function getErrors(): array - { - return $this->errors; - } - - public function hasErrors(): bool - { - return (bool) \count($this->errors); - } -} diff --git a/lib/symfony/property-info/PropertyWriteInfoExtractorInterface.php b/lib/symfony/property-info/PropertyWriteInfoExtractorInterface.php deleted file mode 100644 index f11346381..000000000 --- a/lib/symfony/property-info/PropertyWriteInfoExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Extract write information for the property of a class. - * - * @author Joel Wurtz - */ -interface PropertyWriteInfoExtractorInterface -{ - /** - * Get write information object for a given property of a class. - */ - public function getWriteInfo(string $class, string $property, array $context = []): ?PropertyWriteInfo; -} diff --git a/lib/symfony/property-info/README.md b/lib/symfony/property-info/README.md deleted file mode 100644 index da3514fc9..000000000 --- a/lib/symfony/property-info/README.md +++ /dev/null @@ -1,14 +0,0 @@ -PropertyInfo Component -====================== - -The PropertyInfo component extracts information about PHP class' properties -using metadata of popular sources. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/property_info.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/property-info/Type.php b/lib/symfony/property-info/Type.php deleted file mode 100644 index 5c1b5c124..000000000 --- a/lib/symfony/property-info/Type.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Type value object (immutable). - * - * @author Kévin Dunglas - * - * @final - */ -class Type -{ - public const BUILTIN_TYPE_INT = 'int'; - public const BUILTIN_TYPE_FLOAT = 'float'; - public const BUILTIN_TYPE_STRING = 'string'; - public const BUILTIN_TYPE_BOOL = 'bool'; - public const BUILTIN_TYPE_RESOURCE = 'resource'; - public const BUILTIN_TYPE_OBJECT = 'object'; - public const BUILTIN_TYPE_ARRAY = 'array'; - public const BUILTIN_TYPE_NULL = 'null'; - public const BUILTIN_TYPE_FALSE = 'false'; - public const BUILTIN_TYPE_TRUE = 'true'; - public const BUILTIN_TYPE_CALLABLE = 'callable'; - public const BUILTIN_TYPE_ITERABLE = 'iterable'; - - /** - * List of PHP builtin types. - * - * @var string[] - */ - public static $builtinTypes = [ - self::BUILTIN_TYPE_INT, - self::BUILTIN_TYPE_FLOAT, - self::BUILTIN_TYPE_STRING, - self::BUILTIN_TYPE_BOOL, - self::BUILTIN_TYPE_RESOURCE, - self::BUILTIN_TYPE_OBJECT, - self::BUILTIN_TYPE_ARRAY, - self::BUILTIN_TYPE_CALLABLE, - self::BUILTIN_TYPE_FALSE, - self::BUILTIN_TYPE_TRUE, - self::BUILTIN_TYPE_NULL, - self::BUILTIN_TYPE_ITERABLE, - ]; - - /** - * List of PHP builtin collection types. - * - * @var string[] - */ - public static $builtinCollectionTypes = [ - self::BUILTIN_TYPE_ARRAY, - self::BUILTIN_TYPE_ITERABLE, - ]; - - private $builtinType; - private $nullable; - private $class; - private $collection; - private $collectionKeyType; - private $collectionValueType; - - /** - * @param Type[]|Type|null $collectionKeyType - * @param Type[]|Type|null $collectionValueType - * - * @throws \InvalidArgumentException - */ - public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, $collectionKeyType = null, $collectionValueType = null) - { - if (!\in_array($builtinType, self::$builtinTypes)) { - throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType)); - } - - $this->builtinType = $builtinType; - $this->nullable = $nullable; - $this->class = $class; - $this->collection = $collection; - $this->collectionKeyType = $this->validateCollectionArgument($collectionKeyType, 5, '$collectionKeyType') ?? []; - $this->collectionValueType = $this->validateCollectionArgument($collectionValueType, 6, '$collectionValueType') ?? []; - } - - private function validateCollectionArgument($collectionArgument, int $argumentIndex, string $argumentName): ?array - { - if (null === $collectionArgument) { - return null; - } - - if (!\is_array($collectionArgument) && !$collectionArgument instanceof self) { - throw new \TypeError(sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument))); - } - - if (\is_array($collectionArgument)) { - foreach ($collectionArgument as $type) { - if (!$type instanceof self) { - throw new \TypeError(sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", array value "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument))); - } - } - - return $collectionArgument; - } - - return [$collectionArgument]; - } - - /** - * Gets built-in type. - * - * Can be bool, int, float, string, array, object, resource, null, callback or iterable. - */ - public function getBuiltinType(): string - { - return $this->builtinType; - } - - public function isNullable(): bool - { - return $this->nullable; - } - - /** - * Gets the class name. - * - * Only applicable if the built-in type is object. - */ - public function getClassName(): ?string - { - return $this->class; - } - - public function isCollection(): bool - { - return $this->collection; - } - - /** - * Gets collection key type. - * - * Only applicable for a collection type. - * - * @deprecated since Symfony 5.3, use "getCollectionKeyTypes()" instead - */ - public function getCollectionKeyType(): ?self - { - trigger_deprecation('symfony/property-info', '5.3', 'The "%s()" method is deprecated, use "getCollectionKeyTypes()" instead.', __METHOD__); - - $type = $this->getCollectionKeyTypes(); - if (0 === \count($type)) { - return null; - } - - if (\is_array($type)) { - [$type] = $type; - } - - return $type; - } - - /** - * Gets collection key types. - * - * Only applicable for a collection type. - * - * @return Type[] - */ - public function getCollectionKeyTypes(): array - { - return $this->collectionKeyType; - } - - /** - * Gets collection value type. - * - * Only applicable for a collection type. - * - * @deprecated since Symfony 5.3, use "getCollectionValueTypes()" instead - */ - public function getCollectionValueType(): ?self - { - trigger_deprecation('symfony/property-info', '5.3', 'The "%s()" method is deprecated, use "getCollectionValueTypes()" instead.', __METHOD__); - - return $this->getCollectionValueTypes()[0] ?? null; - } - - /** - * Gets collection value types. - * - * Only applicable for a collection type. - * - * @return Type[] - */ - public function getCollectionValueTypes(): array - { - return $this->collectionValueType; - } -} diff --git a/lib/symfony/property-info/Util/PhpDocTypeHelper.php b/lib/symfony/property-info/Util/PhpDocTypeHelper.php deleted file mode 100644 index 44a461498..000000000 --- a/lib/symfony/property-info/Util/PhpDocTypeHelper.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Util; - -use phpDocumentor\Reflection\PseudoTypes\ConstExpression; -use phpDocumentor\Reflection\PseudoTypes\List_; -use phpDocumentor\Reflection\Type as DocType; -use phpDocumentor\Reflection\Types\Array_; -use phpDocumentor\Reflection\Types\Collection; -use phpDocumentor\Reflection\Types\Compound; -use phpDocumentor\Reflection\Types\Null_; -use phpDocumentor\Reflection\Types\Nullable; -use Symfony\Component\PropertyInfo\Type; - -// Workaround for phpdocumentor/type-resolver < 1.6 -// We trigger the autoloader here, so we don't need to trigger it inside the loop later. -class_exists(List_::class); - -/** - * Transforms a php doc type to a {@link Type} instance. - * - * @author Kévin Dunglas - * @author Guilhem N. - */ -final class PhpDocTypeHelper -{ - /** - * Creates a {@see Type} from a PHPDoc type. - * - * @return Type[] - */ - public function getTypes(DocType $varType): array - { - if ($varType instanceof ConstExpression) { - // It's safer to fall back to other extractors here, as resolving const types correctly is not easy at the moment - return []; - } - - $types = []; - $nullable = false; - - if ($varType instanceof Nullable) { - $nullable = true; - $varType = $varType->getActualType(); - } - - if (!$varType instanceof Compound) { - if ($varType instanceof Null_) { - $nullable = true; - } - - $type = $this->createType($varType, $nullable); - if (null !== $type) { - $types[] = $type; - } - - return $types; - } - - $varTypes = []; - for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) { - $type = $varType->get($typeIndex); - - if ($type instanceof ConstExpression) { - // It's safer to fall back to other extractors here, as resolving const types correctly is not easy at the moment - return []; - } - - // If null is present, all types are nullable - if ($type instanceof Null_) { - $nullable = true; - continue; - } - - if ($type instanceof Nullable) { - $nullable = true; - $type = $type->getActualType(); - } - - $varTypes[] = $type; - } - - foreach ($varTypes as $varType) { - $type = $this->createType($varType, $nullable); - if (null !== $type) { - $types[] = $type; - } - } - - return $types; - } - - /** - * Creates a {@see Type} from a PHPDoc type. - */ - private function createType(DocType $type, bool $nullable, string $docType = null): ?Type - { - $docType = $docType ?? (string) $type; - - if ($type instanceof Collection) { - $fqsen = $type->getFqsen(); - if ($fqsen && 'list' === $fqsen->getName() && !class_exists(List_::class, false) && !class_exists((string) $fqsen)) { - // Workaround for phpdocumentor/type-resolver < 1.6 - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, new Type(Type::BUILTIN_TYPE_INT), $this->getTypes($type->getValueType())); - } - - [$phpType, $class] = $this->getPhpTypeAndClass((string) $fqsen); - - $keys = $this->getTypes($type->getKeyType()); - $values = $this->getTypes($type->getValueType()); - - return new Type($phpType, $nullable, $class, true, $keys, $values); - } - - // Cannot guess - if (!$docType || 'mixed' === $docType) { - return null; - } - - if (str_ends_with($docType, '[]') && $type instanceof Array_) { - $collectionKeyTypes = new Type(Type::BUILTIN_TYPE_INT); - $collectionValueTypes = $this->getTypes($type->getValueType()); - - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyTypes, $collectionValueTypes); - } - - if ((str_starts_with($docType, 'list<') || str_starts_with($docType, 'array<')) && $type instanceof Array_) { - // array is converted to x[] which is handled above - // so it's only necessary to handle array here - $collectionKeyTypes = $this->getTypes($type->getKeyType()); - $collectionValueTypes = $this->getTypes($type->getValueType()); - - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyTypes, $collectionValueTypes); - } - - $docType = $this->normalizeType($docType); - [$phpType, $class] = $this->getPhpTypeAndClass($docType); - - if ('array' === $docType) { - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, null, null); - } - - return new Type($phpType, $nullable, $class); - } - - private function normalizeType(string $docType): string - { - switch ($docType) { - case 'integer': - return 'int'; - - case 'boolean': - return 'bool'; - - // real is not part of the PHPDoc standard, so we ignore it - case 'double': - return 'float'; - - case 'callback': - return 'callable'; - - case 'void': - return 'null'; - - default: - return $docType; - } - } - - private function getPhpTypeAndClass(string $docType): array - { - if (\in_array($docType, Type::$builtinTypes)) { - return [$docType, null]; - } - - if (\in_array($docType, ['parent', 'self', 'static'], true)) { - return ['object', $docType]; - } - - return ['object', ltrim($docType, '\\')]; - } -} diff --git a/lib/symfony/property-info/Util/PhpStanTypeHelper.php b/lib/symfony/property-info/Util/PhpStanTypeHelper.php deleted file mode 100644 index 256122af7..000000000 --- a/lib/symfony/property-info/Util/PhpStanTypeHelper.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Util; - -use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode; -use PHPStan\PhpDocParser\Ast\Type\ArrayShapeNode; -use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode; -use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode; -use PHPStan\PhpDocParser\Ast\Type\CallableTypeParameterNode; -use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode; -use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode; -use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; -use PHPStan\PhpDocParser\Ast\Type\NullableTypeNode; -use PHPStan\PhpDocParser\Ast\Type\ThisTypeNode; -use PHPStan\PhpDocParser\Ast\Type\TypeNode; -use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode; -use Symfony\Component\PropertyInfo\PhpStan\NameScope; -use Symfony\Component\PropertyInfo\Type; - -/** - * Transforms a php doc tag value to a {@link Type} instance. - * - * @author Baptiste Leduc - * - * @internal - */ -final class PhpStanTypeHelper -{ - /** - * Creates a {@see Type} from a PhpDocTagValueNode type. - * - * @return Type[] - */ - public function getTypes(PhpDocTagValueNode $node, NameScope $nameScope): array - { - if ($node instanceof ParamTagValueNode || $node instanceof ReturnTagValueNode || $node instanceof VarTagValueNode) { - return $this->compressNullableType($this->extractTypes($node->type, $nameScope)); - } - - return []; - } - - /** - * Because PhpStan extract null as a separated type when Symfony / PHP compress it in the first available type we - * need this method to mimic how Symfony want null types. - * - * @param Type[] $types - * - * @return Type[] - */ - private function compressNullableType(array $types): array - { - $firstTypeIndex = null; - $nullableTypeIndex = null; - - foreach ($types as $k => $type) { - if (null === $firstTypeIndex && Type::BUILTIN_TYPE_NULL !== $type->getBuiltinType() && !$type->isNullable()) { - $firstTypeIndex = $k; - } - - if (null === $nullableTypeIndex && Type::BUILTIN_TYPE_NULL === $type->getBuiltinType()) { - $nullableTypeIndex = $k; - } - - if (null !== $firstTypeIndex && null !== $nullableTypeIndex) { - break; - } - } - - if (null !== $firstTypeIndex && null !== $nullableTypeIndex) { - $firstType = $types[$firstTypeIndex]; - $types[$firstTypeIndex] = new Type( - $firstType->getBuiltinType(), - true, - $firstType->getClassName(), - $firstType->isCollection(), - $firstType->getCollectionKeyTypes(), - $firstType->getCollectionValueTypes() - ); - unset($types[$nullableTypeIndex]); - } - - return array_values($types); - } - - /** - * @return Type[] - */ - private function extractTypes(TypeNode $node, NameScope $nameScope): array - { - if ($node instanceof UnionTypeNode) { - $types = []; - foreach ($node->types as $type) { - if ($type instanceof ConstTypeNode) { - // It's safer to fall back to other extractors here, as resolving const types correctly is not easy at the moment - return []; - } - foreach ($this->extractTypes($type, $nameScope) as $subType) { - $types[] = $subType; - } - } - - return $this->compressNullableType($types); - } - if ($node instanceof GenericTypeNode) { - [$mainType] = $this->extractTypes($node->type, $nameScope); - - if (Type::BUILTIN_TYPE_INT === $mainType->getBuiltinType()) { - return [$mainType]; - } - - $collectionKeyTypes = $mainType->getCollectionKeyTypes(); - $collectionKeyValues = []; - if (1 === \count($node->genericTypes)) { - foreach ($this->extractTypes($node->genericTypes[0], $nameScope) as $subType) { - $collectionKeyValues[] = $subType; - } - } elseif (2 === \count($node->genericTypes)) { - foreach ($this->extractTypes($node->genericTypes[0], $nameScope) as $keySubType) { - $collectionKeyTypes[] = $keySubType; - } - foreach ($this->extractTypes($node->genericTypes[1], $nameScope) as $valueSubType) { - $collectionKeyValues[] = $valueSubType; - } - } - - return [new Type($mainType->getBuiltinType(), $mainType->isNullable(), $mainType->getClassName(), true, $collectionKeyTypes, $collectionKeyValues)]; - } - if ($node instanceof ArrayShapeNode) { - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]; - } - if ($node instanceof ArrayTypeNode) { - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, [new Type(Type::BUILTIN_TYPE_INT)], $this->extractTypes($node->type, $nameScope))]; - } - if ($node instanceof CallableTypeNode || $node instanceof CallableTypeParameterNode) { - return [new Type(Type::BUILTIN_TYPE_CALLABLE)]; - } - if ($node instanceof NullableTypeNode) { - $subTypes = $this->extractTypes($node->type, $nameScope); - if (\count($subTypes) > 1) { - $subTypes[] = new Type(Type::BUILTIN_TYPE_NULL); - - return $subTypes; - } - - return [new Type($subTypes[0]->getBuiltinType(), true, $subTypes[0]->getClassName(), $subTypes[0]->isCollection(), $subTypes[0]->getCollectionKeyTypes(), $subTypes[0]->getCollectionValueTypes())]; - } - if ($node instanceof ThisTypeNode) { - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())]; - } - if ($node instanceof IdentifierTypeNode) { - if (\in_array($node->name, Type::$builtinTypes)) { - return [new Type($node->name, false, null, \in_array($node->name, Type::$builtinCollectionTypes))]; - } - - switch ($node->name) { - case 'integer': - return [new Type(Type::BUILTIN_TYPE_INT)]; - case 'list': - case 'non-empty-list': - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT))]; - case 'non-empty-array': - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]; - case 'mixed': - return []; // mixed seems to be ignored in all other extractors - case 'parent': - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $node->name)]; - case 'static': - case 'self': - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())]; - case 'void': - return [new Type(Type::BUILTIN_TYPE_NULL)]; - } - - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveStringName($node->name))]; - } - - return []; - } -} diff --git a/lib/symfony/property-info/composer.json b/lib/symfony/property-info/composer.json deleted file mode 100644 index 79af9e860..000000000 --- a/lib/symfony/property-info/composer.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "symfony/property-info", - "type": "library", - "description": "Extracts information about PHP class' properties using metadata of popular sources", - "keywords": [ - "property", - "type", - "phpdoc", - "symfony", - "validator", - "doctrine" - ], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/string": "^5.1|^6.0" - }, - "require-dev": { - "symfony/serializer": "^4.4|^5.0|^6.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "phpstan/phpdoc-parser": "^1.0", - "doctrine/annotations": "^1.10.4|^2" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/dependency-injection": "<4.4" - }, - "suggest": { - "psr/cache-implementation": "To cache results", - "symfony/doctrine-bridge": "To use Doctrine metadata", - "phpdocumentor/reflection-docblock": "To use the PHPDoc", - "symfony/serializer": "To use Serializer metadata" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\PropertyInfo\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/routing/Alias.php b/lib/symfony/routing/Alias.php deleted file mode 100644 index f3e1d5a85..000000000 --- a/lib/symfony/routing/Alias.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Routing\Exception\InvalidArgumentException; - -class Alias -{ - private $id; - private $deprecation = []; - - public function __construct(string $id) - { - $this->id = $id; - } - - /** - * @return static - */ - public function withId(string $id): self - { - $new = clone $this; - - $new->id = $id; - - return $new; - } - - /** - * Returns the target name of this alias. - * - * @return string The target name - */ - public function getId(): string - { - return $this->id; - } - - /** - * Whether this alias is deprecated, that means it should not be referenced anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function setDeprecated(string $package, string $version, string $message): self - { - if ('' !== $message) { - if (preg_match('#[\r\n]|\*/#', $message)) { - throw new InvalidArgumentException('Invalid characters found in deprecation template.'); - } - - if (!str_contains($message, '%alias_id%')) { - throw new InvalidArgumentException('The deprecation template must contain the "%alias_id%" placeholder.'); - } - } - - $this->deprecation = [ - 'package' => $package, - 'version' => $version, - 'message' => $message ?: 'The "%alias_id%" route alias is deprecated. You should stop using it, as it will be removed in the future.', - ]; - - return $this; - } - - public function isDeprecated(): bool - { - return (bool) $this->deprecation; - } - - /** - * @param string $name Route name relying on this alias - */ - public function getDeprecation(string $name): array - { - return [ - 'package' => $this->deprecation['package'], - 'version' => $this->deprecation['version'], - 'message' => str_replace('%alias_id%', $name, $this->deprecation['message']), - ]; - } -} diff --git a/lib/symfony/routing/Annotation/Route.php b/lib/symfony/routing/Annotation/Route.php deleted file mode 100644 index 81563df20..000000000 --- a/lib/symfony/routing/Annotation/Route.php +++ /dev/null @@ -1,272 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Annotation; - -/** - * Annotation class for @Route(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"CLASS", "METHOD"}) - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] -class Route -{ - private $path; - private $localizedPaths = []; - private $name; - private $requirements = []; - private $options = []; - private $defaults = []; - private $host; - private $methods = []; - private $schemes = []; - private $condition; - private $priority; - private $env; - - /** - * @param array|string $data data array managed by the Doctrine Annotations library or the path - * @param array|string|null $path - * @param string[] $requirements - * @param string[]|string $methods - * @param string[]|string $schemes - * - * @throws \BadMethodCallException - */ - public function __construct( - $data = [], - $path = null, - string $name = null, - array $requirements = [], - array $options = [], - array $defaults = [], - string $host = null, - $methods = [], - $schemes = [], - string $condition = null, - int $priority = null, - string $locale = null, - string $format = null, - bool $utf8 = null, - bool $stateless = null, - string $env = null - ) { - if (\is_string($data)) { - $data = ['path' => $data]; - } elseif (!\is_array($data)) { - throw new \TypeError(sprintf('"%s": Argument $data is expected to be a string or array, got "%s".', __METHOD__, get_debug_type($data))); - } elseif ([] !== $data) { - $deprecation = false; - foreach ($data as $key => $val) { - if (\in_array($key, ['path', 'name', 'requirements', 'options', 'defaults', 'host', 'methods', 'schemes', 'condition', 'priority', 'locale', 'format', 'utf8', 'stateless', 'env', 'value'])) { - $deprecation = true; - } - } - - if ($deprecation) { - trigger_deprecation('symfony/routing', '5.3', 'Passing an array as first argument to "%s" is deprecated. Use named arguments instead.', __METHOD__); - } else { - $localizedPaths = $data; - $data = ['path' => $localizedPaths]; - } - } - if (null !== $path && !\is_string($path) && !\is_array($path)) { - throw new \TypeError(sprintf('"%s": Argument $path is expected to be a string, array or null, got "%s".', __METHOD__, get_debug_type($path))); - } - - $data['path'] = $data['path'] ?? $path; - $data['name'] = $data['name'] ?? $name; - $data['requirements'] = $data['requirements'] ?? $requirements; - $data['options'] = $data['options'] ?? $options; - $data['defaults'] = $data['defaults'] ?? $defaults; - $data['host'] = $data['host'] ?? $host; - $data['methods'] = $data['methods'] ?? $methods; - $data['schemes'] = $data['schemes'] ?? $schemes; - $data['condition'] = $data['condition'] ?? $condition; - $data['priority'] = $data['priority'] ?? $priority; - $data['locale'] = $data['locale'] ?? $locale; - $data['format'] = $data['format'] ?? $format; - $data['utf8'] = $data['utf8'] ?? $utf8; - $data['stateless'] = $data['stateless'] ?? $stateless; - $data['env'] = $data['env'] ?? $env; - - $data = array_filter($data, static function ($value): bool { - return null !== $value; - }); - - if (isset($data['localized_paths'])) { - throw new \BadMethodCallException(sprintf('Unknown property "localized_paths" on annotation "%s".', static::class)); - } - - if (isset($data['value'])) { - $data[\is_array($data['value']) ? 'localized_paths' : 'path'] = $data['value']; - unset($data['value']); - } - - if (isset($data['path']) && \is_array($data['path'])) { - $data['localized_paths'] = $data['path']; - unset($data['path']); - } - - if (isset($data['locale'])) { - $data['defaults']['_locale'] = $data['locale']; - unset($data['locale']); - } - - if (isset($data['format'])) { - $data['defaults']['_format'] = $data['format']; - unset($data['format']); - } - - if (isset($data['utf8'])) { - $data['options']['utf8'] = filter_var($data['utf8'], \FILTER_VALIDATE_BOOLEAN) ?: false; - unset($data['utf8']); - } - - if (isset($data['stateless'])) { - $data['defaults']['_stateless'] = filter_var($data['stateless'], \FILTER_VALIDATE_BOOLEAN) ?: false; - unset($data['stateless']); - } - - foreach ($data as $key => $value) { - $method = 'set'.str_replace('_', '', $key); - if (!method_exists($this, $method)) { - throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, static::class)); - } - $this->$method($value); - } - } - - public function setPath(string $path) - { - $this->path = $path; - } - - public function getPath() - { - return $this->path; - } - - public function setLocalizedPaths(array $localizedPaths) - { - $this->localizedPaths = $localizedPaths; - } - - public function getLocalizedPaths(): array - { - return $this->localizedPaths; - } - - public function setHost(string $pattern) - { - $this->host = $pattern; - } - - public function getHost() - { - return $this->host; - } - - public function setName(string $name) - { - $this->name = $name; - } - - public function getName() - { - return $this->name; - } - - public function setRequirements(array $requirements) - { - $this->requirements = $requirements; - } - - public function getRequirements() - { - return $this->requirements; - } - - public function setOptions(array $options) - { - $this->options = $options; - } - - public function getOptions() - { - return $this->options; - } - - public function setDefaults(array $defaults) - { - $this->defaults = $defaults; - } - - public function getDefaults() - { - return $this->defaults; - } - - public function setSchemes($schemes) - { - $this->schemes = \is_array($schemes) ? $schemes : [$schemes]; - } - - public function getSchemes() - { - return $this->schemes; - } - - public function setMethods($methods) - { - $this->methods = \is_array($methods) ? $methods : [$methods]; - } - - public function getMethods() - { - return $this->methods; - } - - public function setCondition(?string $condition) - { - $this->condition = $condition; - } - - public function getCondition() - { - return $this->condition; - } - - public function setPriority(int $priority): void - { - $this->priority = $priority; - } - - public function getPriority(): ?int - { - return $this->priority; - } - - public function setEnv(?string $env): void - { - $this->env = $env; - } - - public function getEnv(): ?string - { - return $this->env; - } -} diff --git a/lib/symfony/routing/CHANGELOG.md b/lib/symfony/routing/CHANGELOG.md deleted file mode 100644 index b96638987..000000000 --- a/lib/symfony/routing/CHANGELOG.md +++ /dev/null @@ -1,296 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - - * Already encoded slashes are not decoded nor double-encoded anymore when generating URLs - * Add support for per-env configuration in XML and Yaml loaders - * Deprecate creating instances of the `Route` annotation class by passing an array of parameters - * Add `RoutingConfigurator::env()` to get the current environment - -5.2.0 ------ - - * Added support for inline definition of requirements and defaults for host - * Added support for `\A` and `\z` as regex start and end for route requirement - * Added support for `#[Route]` attributes - -5.1.0 ------ - - * added the protected method `PhpFileLoader::callConfigurator()` as extension point to ease custom routing configuration - * deprecated `RouteCollectionBuilder` in favor of `RoutingConfigurator`. - * added "priority" option to annotated routes - * added argument `$priority` to `RouteCollection::add()` - * deprecated the `RouteCompiler::REGEX_DELIMITER` constant - * added `ExpressionLanguageProvider` to expose extra functions to route conditions - * added support for a `stateless` keyword for configuring route stateless in PHP, YAML and XML configurations. - * added the "hosts" option to be able to configure the host per locale. - * added `RequestContext::fromUri()` to ease building the default context - -5.0.0 ------ - - * removed `PhpGeneratorDumper` and `PhpMatcherDumper` - * removed `generator_base_class`, `generator_cache_class`, `matcher_base_class` and `matcher_cache_class` router options - * `Serializable` implementing methods for `Route` and `CompiledRoute` are final - * removed referencing service route loaders with a single colon - * Removed `ServiceRouterLoader` and `ObjectRouteLoader`. - -4.4.0 ------ - - * Deprecated `ServiceRouterLoader` in favor of `ContainerLoader`. - * Deprecated `ObjectRouteLoader` in favor of `ObjectLoader`. - * Added a way to exclude patterns of resources from being imported by the `import()` method - -4.3.0 ------ - - * added `CompiledUrlMatcher` and `CompiledUrlMatcherDumper` - * added `CompiledUrlGenerator` and `CompiledUrlGeneratorDumper` - * deprecated `PhpGeneratorDumper` and `PhpMatcherDumper` - * deprecated `generator_base_class`, `generator_cache_class`, `matcher_base_class` and `matcher_cache_class` router options - * `Serializable` implementing methods for `Route` and `CompiledRoute` are marked as `@internal` and `@final`. - Instead of overwriting them, use `__serialize` and `__unserialize` as extension points which are forward compatible - with the new serialization methods in PHP 7.4. - * exposed `utf8` Route option, defaults "locale" and "format" in configuration loaders and configurators - * added support for invokable service route loaders - -4.2.0 ------ - - * added fallback to cultureless locale for internationalized routes - -4.0.0 ------ - - * dropped support for using UTF-8 route patterns without using the `utf8` option - * dropped support for using UTF-8 route requirements without using the `utf8` option - -3.4.0 ------ - - * Added `NoConfigurationException`. - * Added the possibility to define a prefix for all routes of a controller via @Route(name="prefix_") - * Added support for prioritized routing loaders. - * Add matched and default parameters to redirect responses - * Added support for a `controller` keyword for configuring route controllers in YAML and XML configurations. - -3.3.0 ------ - - * [DEPRECATION] Class parameters have been deprecated and will be removed in 4.0. - * router.options.generator_class - * router.options.generator_base_class - * router.options.generator_dumper_class - * router.options.matcher_class - * router.options.matcher_base_class - * router.options.matcher_dumper_class - * router.options.matcher.cache_class - * router.options.generator.cache_class - -3.2.0 ------ - - * Added support for `bool`, `int`, `float`, `string`, `list` and `map` defaults in XML configurations. - * Added support for UTF-8 requirements - -2.8.0 ------ - - * allowed specifying a directory to recursively load all routing configuration files it contains - * Added ObjectRouteLoader and ServiceRouteLoader that allow routes to be loaded - by calling a method on an object/service. - * [DEPRECATION] Deprecated the hardcoded value for the `$referenceType` argument of the `UrlGeneratorInterface::generate` method. - Use the constants defined in the `UrlGeneratorInterface` instead. - - Before: - - ```php - $router->generate('blog_show', ['slug' => 'my-blog-post'], true); - ``` - - After: - - ```php - use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - - $router->generate('blog_show', ['slug' => 'my-blog-post'], UrlGeneratorInterface::ABSOLUTE_URL); - ``` - -2.5.0 ------ - - * [DEPRECATION] The `ApacheMatcherDumper` and `ApacheUrlMatcher` were deprecated and - will be removed in Symfony 3.0, since the performance gains were minimal and - it's hard to replicate the behavior of PHP implementation. - -2.3.0 ------ - - * added RequestContext::getQueryString() - -2.2.0 ------ - - * [DEPRECATION] Several route settings have been renamed (the old ones will be removed in 3.0): - - * The `pattern` setting for a route has been deprecated in favor of `path` - * The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings - - Before: - - ```yaml - article_edit: - pattern: /article/{id} - requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' } - ``` - - ```xml - - POST|PUT - https - \d+ - - ``` - - ```php - $route = new Route(); - $route->setPattern('/article/{id}'); - $route->setRequirement('_method', 'POST|PUT'); - $route->setRequirement('_scheme', 'https'); - ``` - - After: - - ```yaml - article_edit: - path: /article/{id} - methods: [POST, PUT] - schemes: https - requirements: { 'id': '\d+' } - ``` - - ```xml - - \d+ - - ``` - - ```php - $route = new Route(); - $route->setPath('/article/{id}'); - $route->setMethods(['POST', 'PUT']); - $route->setSchemes('https'); - ``` - - * [BC BREAK] RouteCollection does not behave like a tree structure anymore but as - a flat array of Routes. So when using PHP to build the RouteCollection, you must - make sure to add routes to the sub-collection before adding it to the parent - collection (this is not relevant when using YAML or XML for Route definitions). - - Before: - - ```php - $rootCollection = new RouteCollection(); - $subCollection = new RouteCollection(); - $rootCollection->addCollection($subCollection); - $subCollection->add('foo', new Route('/foo')); - ``` - - After: - - ```php - $rootCollection = new RouteCollection(); - $subCollection = new RouteCollection(); - $subCollection->add('foo', new Route('/foo')); - $rootCollection->addCollection($subCollection); - ``` - - Also one must call `addCollection` from the bottom to the top hierarchy. - So the correct sequence is the following (and not the reverse): - - ```php - $childCollection->addCollection($grandchildCollection); - $rootCollection->addCollection($childCollection); - ``` - - * [DEPRECATION] The methods `RouteCollection::getParent()` and `RouteCollection::getRoot()` - have been deprecated and will be removed in Symfony 2.3. - * [BC BREAK] Misusing the `RouteCollection::addPrefix` method to add defaults, requirements - or options without adding a prefix is not supported anymore. So if you called `addPrefix` - with an empty prefix or `/` only (both have no relevance), like - `addPrefix('', $defaultsArray, $requirementsArray, $optionsArray)` - you need to use the new dedicated methods `addDefaults($defaultsArray)`, - `addRequirements($requirementsArray)` or `addOptions($optionsArray)` instead. - * [DEPRECATION] The `$options` parameter to `RouteCollection::addPrefix()` has been deprecated - because adding options has nothing to do with adding a path prefix. If you want to add options - to all child routes of a RouteCollection, you can use `addOptions()`. - * [DEPRECATION] The method `RouteCollection::getPrefix()` has been deprecated - because it suggested that all routes in the collection would have this prefix, which is - not necessarily true. On top of that, since there is no tree structure anymore, this method - is also useless. Don't worry about performance, prefix optimization for matching is still done - in the dumper, which was also improved in 2.2.0 to find even more grouping possibilities. - * [DEPRECATION] `RouteCollection::addCollection(RouteCollection $collection)` should now only be - used with a single parameter. The other params `$prefix`, `$default`, `$requirements` and `$options` - will still work, but have been deprecated. The `addPrefix` method should be used for this - use-case instead. - Before: `$parentCollection->addCollection($collection, '/prefix', [...], [...])` - After: - ```php - $collection->addPrefix('/prefix', [...], [...]); - $parentCollection->addCollection($collection); - ``` - * added support for the method default argument values when defining a @Route - * Adjacent placeholders without separator work now, e.g. `/{x}{y}{z}.{_format}`. - * Characters that function as separator between placeholders are now whitelisted - to fix routes with normal text around a variable, e.g. `/prefix{var}suffix`. - * [BC BREAK] The default requirement of a variable has been changed slightly. - Previously it disallowed the previous and the next char around a variable. Now - it disallows the slash (`/`) and the next char. Using the previous char added - no value and was problematic because the route `/index.{_format}` would be - matched by `/index.ht/ml`. - * The default requirement now uses possessive quantifiers when possible which - improves matching performance by up to 20% because it prevents backtracking - when it's not needed. - * The ConfigurableRequirementsInterface can now also be used to disable the requirements - check on URL generation completely by calling `setStrictRequirements(null)`. It - improves performance in production environment as you should know that params always - pass the requirements (otherwise it would break your link anyway). - * There is no restriction on the route name anymore. So non-alphanumeric characters - are now also allowed. - * [BC BREAK] `RouteCompilerInterface::compile(Route $route)` was made static - (only relevant if you implemented your own RouteCompiler). - * Added possibility to generate relative paths and network paths in the UrlGenerator, e.g. - "../parent-file" and "//example.com/dir/file". The third parameter in - `UrlGeneratorInterface::generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)` - now accepts more values and you should use the constants defined in `UrlGeneratorInterface` for - claritiy. The old method calls with a Boolean parameter will continue to work because they - equal the signature using the constants. - -2.1.0 ------ - - * added RequestMatcherInterface - * added RequestContext::fromRequest() - * the UrlMatcher does not throw a \LogicException anymore when the required - scheme is not the current one - * added TraceableUrlMatcher - * added the possibility to define options, default values and requirements - for placeholders in prefix, including imported routes - * added RouterInterface::getRouteCollection - * [BC BREAK] the UrlMatcher urldecodes the route parameters only once, they - were decoded twice before. Note that the `urldecode()` calls have been - changed for a single `rawurldecode()` in order to support `+` for input - paths. - * added RouteCollection::getRoot method to retrieve the root of a - RouteCollection tree - * [BC BREAK] made RouteCollection::setParent private which could not have - been used anyway without creating inconsistencies - * [BC BREAK] RouteCollection::remove also removes a route from parent - collections (not only from its children) - * added ConfigurableRequirementsInterface that allows to disable exceptions - (and generate empty URLs instead) when generating a route with an invalid - parameter value diff --git a/lib/symfony/routing/CompiledRoute.php b/lib/symfony/routing/CompiledRoute.php deleted file mode 100644 index 1449cdb92..000000000 --- a/lib/symfony/routing/CompiledRoute.php +++ /dev/null @@ -1,173 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * CompiledRoutes are returned by the RouteCompiler class. - * - * @author Fabien Potencier - */ -class CompiledRoute implements \Serializable -{ - private $variables; - private $tokens; - private $staticPrefix; - private $regex; - private $pathVariables; - private $hostVariables; - private $hostRegex; - private $hostTokens; - - /** - * @param string $staticPrefix The static prefix of the compiled route - * @param string $regex The regular expression to use to match this route - * @param array $tokens An array of tokens to use to generate URL for this route - * @param array $pathVariables An array of path variables - * @param string|null $hostRegex Host regex - * @param array $hostTokens Host tokens - * @param array $hostVariables An array of host variables - * @param array $variables An array of variables (variables defined in the path and in the host patterns) - */ - public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = []) - { - $this->staticPrefix = $staticPrefix; - $this->regex = $regex; - $this->tokens = $tokens; - $this->pathVariables = $pathVariables; - $this->hostRegex = $hostRegex; - $this->hostTokens = $hostTokens; - $this->hostVariables = $hostVariables; - $this->variables = $variables; - } - - public function __serialize(): array - { - return [ - 'vars' => $this->variables, - 'path_prefix' => $this->staticPrefix, - 'path_regex' => $this->regex, - 'path_tokens' => $this->tokens, - 'path_vars' => $this->pathVariables, - 'host_regex' => $this->hostRegex, - 'host_tokens' => $this->hostTokens, - 'host_vars' => $this->hostVariables, - ]; - } - - /** - * @internal - */ - final public function serialize(): string - { - return serialize($this->__serialize()); - } - - public function __unserialize(array $data): void - { - $this->variables = $data['vars']; - $this->staticPrefix = $data['path_prefix']; - $this->regex = $data['path_regex']; - $this->tokens = $data['path_tokens']; - $this->pathVariables = $data['path_vars']; - $this->hostRegex = $data['host_regex']; - $this->hostTokens = $data['host_tokens']; - $this->hostVariables = $data['host_vars']; - } - - /** - * @internal - */ - final public function unserialize($serialized) - { - $this->__unserialize(unserialize($serialized, ['allowed_classes' => false])); - } - - /** - * Returns the static prefix. - * - * @return string - */ - public function getStaticPrefix() - { - return $this->staticPrefix; - } - - /** - * Returns the regex. - * - * @return string - */ - public function getRegex() - { - return $this->regex; - } - - /** - * Returns the host regex. - * - * @return string|null - */ - public function getHostRegex() - { - return $this->hostRegex; - } - - /** - * Returns the tokens. - * - * @return array - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Returns the host tokens. - * - * @return array - */ - public function getHostTokens() - { - return $this->hostTokens; - } - - /** - * Returns the variables. - * - * @return array - */ - public function getVariables() - { - return $this->variables; - } - - /** - * Returns the path variables. - * - * @return array - */ - public function getPathVariables() - { - return $this->pathVariables; - } - - /** - * Returns the host variables. - * - * @return array - */ - public function getHostVariables() - { - return $this->hostVariables; - } -} diff --git a/lib/symfony/routing/DependencyInjection/RoutingResolverPass.php b/lib/symfony/routing/DependencyInjection/RoutingResolverPass.php deleted file mode 100644 index 0e9b9c893..000000000 --- a/lib/symfony/routing/DependencyInjection/RoutingResolverPass.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds tagged routing.loader services to routing.resolver service. - * - * @author Fabien Potencier - */ -class RoutingResolverPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $resolverServiceId; - private $loaderTag; - - public function __construct(string $resolverServiceId = 'routing.resolver', string $loaderTag = 'routing.loader') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/routing', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->resolverServiceId = $resolverServiceId; - $this->loaderTag = $loaderTag; - } - - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition($this->resolverServiceId)) { - return; - } - - $definition = $container->getDefinition($this->resolverServiceId); - - foreach ($this->findAndSortTaggedServices($this->loaderTag, $container) as $id) { - $definition->addMethodCall('addLoader', [new Reference($id)]); - } - } -} diff --git a/lib/symfony/routing/Exception/ExceptionInterface.php b/lib/symfony/routing/Exception/ExceptionInterface.php deleted file mode 100644 index 22e72b16b..000000000 --- a/lib/symfony/routing/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * ExceptionInterface. - * - * @author Alexandre Salomé - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/routing/Exception/InvalidArgumentException.php b/lib/symfony/routing/Exception/InvalidArgumentException.php deleted file mode 100644 index 950b9b15c..000000000 --- a/lib/symfony/routing/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/routing/Exception/InvalidParameterException.php b/lib/symfony/routing/Exception/InvalidParameterException.php deleted file mode 100644 index 94d841f4c..000000000 --- a/lib/symfony/routing/Exception/InvalidParameterException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when a parameter is not valid. - * - * @author Alexandre Salomé - */ -class InvalidParameterException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/routing/Exception/MethodNotAllowedException.php b/lib/symfony/routing/Exception/MethodNotAllowedException.php deleted file mode 100644 index 27cf2125e..000000000 --- a/lib/symfony/routing/Exception/MethodNotAllowedException.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * The resource was found but the request method is not allowed. - * - * This exception should trigger an HTTP 405 response in your application code. - * - * @author Kris Wallsmith - */ -class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface -{ - protected $allowedMethods = []; - - /** - * @param string[] $allowedMethods - */ - public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, \Throwable $previous = null) - { - if (null === $message) { - trigger_deprecation('symfony/routing', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - $this->allowedMethods = array_map('strtoupper', $allowedMethods); - - parent::__construct($message, $code, $previous); - } - - /** - * Gets the allowed HTTP methods. - * - * @return string[] - */ - public function getAllowedMethods() - { - return $this->allowedMethods; - } -} diff --git a/lib/symfony/routing/Exception/MissingMandatoryParametersException.php b/lib/symfony/routing/Exception/MissingMandatoryParametersException.php deleted file mode 100644 index 57f3a40df..000000000 --- a/lib/symfony/routing/Exception/MissingMandatoryParametersException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when a route cannot be generated because of missing - * mandatory parameters. - * - * @author Alexandre Salomé - */ -class MissingMandatoryParametersException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/routing/Exception/NoConfigurationException.php b/lib/symfony/routing/Exception/NoConfigurationException.php deleted file mode 100644 index 333bc7433..000000000 --- a/lib/symfony/routing/Exception/NoConfigurationException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when no routes are configured. - * - * @author Yonel Ceruto - */ -class NoConfigurationException extends ResourceNotFoundException -{ -} diff --git a/lib/symfony/routing/Exception/ResourceNotFoundException.php b/lib/symfony/routing/Exception/ResourceNotFoundException.php deleted file mode 100644 index ccbca1527..000000000 --- a/lib/symfony/routing/Exception/ResourceNotFoundException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * The resource was not found. - * - * This exception should trigger an HTTP 404 response in your application code. - * - * @author Kris Wallsmith - */ -class ResourceNotFoundException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/routing/Exception/RouteCircularReferenceException.php b/lib/symfony/routing/Exception/RouteCircularReferenceException.php deleted file mode 100644 index 841e35989..000000000 --- a/lib/symfony/routing/Exception/RouteCircularReferenceException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -class RouteCircularReferenceException extends RuntimeException -{ - public function __construct(string $routeId, array $path) - { - parent::__construct(sprintf('Circular reference detected for route "%s", path: "%s".', $routeId, implode(' -> ', $path))); - } -} diff --git a/lib/symfony/routing/Exception/RouteNotFoundException.php b/lib/symfony/routing/Exception/RouteNotFoundException.php deleted file mode 100644 index 24ab0b44a..000000000 --- a/lib/symfony/routing/Exception/RouteNotFoundException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when a route does not exist. - * - * @author Alexandre Salomé - */ -class RouteNotFoundException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/routing/Exception/RuntimeException.php b/lib/symfony/routing/Exception/RuntimeException.php deleted file mode 100644 index 48da62ec8..000000000 --- a/lib/symfony/routing/Exception/RuntimeException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/routing/Generator/CompiledUrlGenerator.php b/lib/symfony/routing/Generator/CompiledUrlGenerator.php deleted file mode 100644 index 8cbbf8f70..000000000 --- a/lib/symfony/routing/Generator/CompiledUrlGenerator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\RequestContext; - -/** - * Generates URLs based on rules dumped by CompiledUrlGeneratorDumper. - */ -class CompiledUrlGenerator extends UrlGenerator -{ - private $compiledRoutes = []; - private $defaultLocale; - - public function __construct(array $compiledRoutes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->compiledRoutes = $compiledRoutes; - $this->context = $context; - $this->logger = $logger; - $this->defaultLocale = $defaultLocale; - } - - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH) - { - $locale = $parameters['_locale'] - ?? $this->context->getParameter('_locale') - ?: $this->defaultLocale; - - if (null !== $locale) { - do { - if (($this->compiledRoutes[$name.'.'.$locale][1]['_canonical_route'] ?? null) === $name) { - $name .= '.'.$locale; - break; - } - } while (false !== $locale = strstr($locale, '_', true)); - } - - if (!isset($this->compiledRoutes[$name])) { - throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); - } - - [$variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes, $deprecations] = $this->compiledRoutes[$name] + [6 => []]; - - foreach ($deprecations as $deprecation) { - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - if (isset($defaults['_canonical_route']) && isset($defaults['_locale'])) { - if (!\in_array('_locale', $variables, true)) { - unset($parameters['_locale']); - } elseif (!isset($parameters['_locale'])) { - $parameters['_locale'] = $defaults['_locale']; - } - } - - return $this->doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, $requiredSchemes); - } -} diff --git a/lib/symfony/routing/Generator/ConfigurableRequirementsInterface.php b/lib/symfony/routing/Generator/ConfigurableRequirementsInterface.php deleted file mode 100644 index 568f7f775..000000000 --- a/lib/symfony/routing/Generator/ConfigurableRequirementsInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -/** - * ConfigurableRequirementsInterface must be implemented by URL generators that - * can be configured whether an exception should be generated when the parameters - * do not match the requirements. It is also possible to disable the requirements - * check for URL generation completely. - * - * The possible configurations and use-cases: - * - setStrictRequirements(true): Throw an exception for mismatching requirements. This - * is mostly useful in development environment. - * - setStrictRequirements(false): Don't throw an exception but return an empty string as URL for - * mismatching requirements and log the problem. Useful when you cannot control all - * params because they come from third party libs but don't want to have a 404 in - * production environment. It should log the mismatch so one can review it. - * - setStrictRequirements(null): Return the URL with the given parameters without - * checking the requirements at all. When generating a URL you should either trust - * your params or you validated them beforehand because otherwise it would break your - * link anyway. So in production environment you should know that params always pass - * the requirements. Thus this option allows to disable the check on URL generation for - * performance reasons (saving a preg_match for each requirement every time a URL is - * generated). - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -interface ConfigurableRequirementsInterface -{ - /** - * Enables or disables the exception on incorrect parameters. - * Passing null will deactivate the requirements check completely. - */ - public function setStrictRequirements(?bool $enabled); - - /** - * Returns whether to throw an exception on incorrect parameters. - * Null means the requirements check is deactivated completely. - * - * @return bool|null - */ - public function isStrictRequirements(); -} diff --git a/lib/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php b/lib/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php deleted file mode 100644 index 9c6740b61..000000000 --- a/lib/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator\Dumper; - -use Symfony\Component\Routing\Exception\RouteCircularReferenceException; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper; - -/** - * CompiledUrlGeneratorDumper creates a PHP array to be used with CompiledUrlGenerator. - * - * @author Fabien Potencier - * @author Tobias Schultze - * @author Nicolas Grekas - */ -class CompiledUrlGeneratorDumper extends GeneratorDumper -{ - public function getCompiledRoutes(): array - { - $compiledRoutes = []; - foreach ($this->getRoutes()->all() as $name => $route) { - $compiledRoute = $route->compile(); - - $compiledRoutes[$name] = [ - $compiledRoute->getVariables(), - $route->getDefaults(), - $route->getRequirements(), - $compiledRoute->getTokens(), - $compiledRoute->getHostTokens(), - $route->getSchemes(), - [], - ]; - } - - return $compiledRoutes; - } - - public function getCompiledAliases(): array - { - $routes = $this->getRoutes(); - $compiledAliases = []; - foreach ($routes->getAliases() as $name => $alias) { - $deprecations = $alias->isDeprecated() ? [$alias->getDeprecation($name)] : []; - $currentId = $alias->getId(); - $visited = []; - while (null !== $alias = $routes->getAlias($currentId) ?? null) { - if (false !== $searchKey = array_search($currentId, $visited)) { - $visited[] = $currentId; - - throw new RouteCircularReferenceException($currentId, \array_slice($visited, $searchKey)); - } - - if ($alias->isDeprecated()) { - $deprecations[] = $deprecation = $alias->getDeprecation($currentId); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - $visited[] = $currentId; - $currentId = $alias->getId(); - } - - if (null === $target = $routes->get($currentId)) { - throw new RouteNotFoundException(sprintf('Target route "%s" for alias "%s" does not exist.', $currentId, $name)); - } - - $compiledTarget = $target->compile(); - - $compiledAliases[$name] = [ - $compiledTarget->getVariables(), - $target->getDefaults(), - $target->getRequirements(), - $compiledTarget->getTokens(), - $compiledTarget->getHostTokens(), - $target->getSchemes(), - $deprecations, - ]; - } - - return $compiledAliases; - } - - /** - * {@inheritdoc} - */ - public function dump(array $options = []) - { - return <<generateDeclaredRoutes()} -]; - -EOF; - } - - /** - * Generates PHP code representing an array of defined routes - * together with the routes properties (e.g. requirements). - */ - private function generateDeclaredRoutes(): string - { - $routes = ''; - foreach ($this->getCompiledRoutes() as $name => $properties) { - $routes .= sprintf("\n '%s' => %s,", $name, CompiledUrlMatcherDumper::export($properties)); - } - - foreach ($this->getCompiledAliases() as $alias => $properties) { - $routes .= sprintf("\n '%s' => %s,", $alias, CompiledUrlMatcherDumper::export($properties)); - } - - return $routes; - } -} diff --git a/lib/symfony/routing/Generator/Dumper/GeneratorDumper.php b/lib/symfony/routing/Generator/Dumper/GeneratorDumper.php deleted file mode 100644 index 659c5ba1c..000000000 --- a/lib/symfony/routing/Generator/Dumper/GeneratorDumper.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * GeneratorDumper is the base class for all built-in generator dumpers. - * - * @author Fabien Potencier - */ -abstract class GeneratorDumper implements GeneratorDumperInterface -{ - private $routes; - - public function __construct(RouteCollection $routes) - { - $this->routes = $routes; - } - - /** - * {@inheritdoc} - */ - public function getRoutes() - { - return $this->routes; - } -} diff --git a/lib/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php b/lib/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php deleted file mode 100644 index d4a248a5b..000000000 --- a/lib/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * GeneratorDumperInterface is the interface that all generator dumper classes must implement. - * - * @author Fabien Potencier - */ -interface GeneratorDumperInterface -{ - /** - * Dumps a set of routes to a string representation of executable code - * that can then be used to generate a URL of such a route. - * - * @return string - */ - public function dump(array $options = []); - - /** - * Gets the routes to dump. - * - * @return RouteCollection - */ - public function getRoutes(); -} diff --git a/lib/symfony/routing/Generator/UrlGenerator.php b/lib/symfony/routing/Generator/UrlGenerator.php deleted file mode 100644 index acf3ead4f..000000000 --- a/lib/symfony/routing/Generator/UrlGenerator.php +++ /dev/null @@ -1,378 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Routing\Exception\InvalidParameterException; -use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RouteCollection; - -/** - * UrlGenerator can generate a URL or a path for any route in the RouteCollection - * based on the passed parameters. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInterface -{ - private const QUERY_FRAGMENT_DECODED = [ - // RFC 3986 explicitly allows those in the query/fragment to reference other URIs unencoded - '%2F' => '/', - '%3F' => '?', - // reserved chars that have no special meaning for HTTP URIs in a query or fragment - // this excludes esp. "&", "=" and also "+" because PHP would treat it as a space (form-encoded) - '%40' => '@', - '%3A' => ':', - '%21' => '!', - '%3B' => ';', - '%2C' => ',', - '%2A' => '*', - ]; - - protected $routes; - protected $context; - - /** - * @var bool|null - */ - protected $strictRequirements = true; - - protected $logger; - - private $defaultLocale; - - /** - * This array defines the characters (besides alphanumeric ones) that will not be percent-encoded in the path segment of the generated URL. - * - * PHP's rawurlencode() encodes all chars except "a-zA-Z0-9-._~" according to RFC 3986. But we want to allow some chars - * to be used in their literal form (reasons below). Other chars inside the path must of course be encoded, e.g. - * "?" and "#" (would be interpreted wrongly as query and fragment identifier), - * "'" and """ (are used as delimiters in HTML). - */ - protected $decodedChars = [ - // the slash can be used to designate a hierarchical structure and we want allow using it with this meaning - // some webservers don't allow the slash in encoded form in the path for security reasons anyway - // see http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss - '%2F' => '/', - '%252F' => '%2F', - // the following chars are general delimiters in the URI specification but have only special meaning in the authority component - // so they can safely be used in the path in unencoded form - '%40' => '@', - '%3A' => ':', - // these chars are only sub-delimiters that have no predefined meaning and can therefore be used literally - // so URI producing applications can use these chars to delimit subcomponents in a path segment without being encoded for better readability - '%3B' => ';', - '%2C' => ',', - '%3D' => '=', - '%2B' => '+', - '%21' => '!', - '%2A' => '*', - '%7C' => '|', - ]; - - public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->routes = $routes; - $this->context = $context; - $this->logger = $logger; - $this->defaultLocale = $defaultLocale; - } - - /** - * {@inheritdoc} - */ - public function setContext(RequestContext $context) - { - $this->context = $context; - } - - /** - * {@inheritdoc} - */ - public function getContext() - { - return $this->context; - } - - /** - * {@inheritdoc} - */ - public function setStrictRequirements(?bool $enabled) - { - $this->strictRequirements = $enabled; - } - - /** - * {@inheritdoc} - */ - public function isStrictRequirements() - { - return $this->strictRequirements; - } - - /** - * {@inheritdoc} - */ - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH) - { - $route = null; - $locale = $parameters['_locale'] - ?? $this->context->getParameter('_locale') - ?: $this->defaultLocale; - - if (null !== $locale) { - do { - if (null !== ($route = $this->routes->get($name.'.'.$locale)) && $route->getDefault('_canonical_route') === $name) { - break; - } - } while (false !== $locale = strstr($locale, '_', true)); - } - - if (null === $route = $route ?? $this->routes->get($name)) { - throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); - } - - // the Route has a cache of its own and is not recompiled as long as it does not get modified - $compiledRoute = $route->compile(); - - $defaults = $route->getDefaults(); - $variables = $compiledRoute->getVariables(); - - if (isset($defaults['_canonical_route']) && isset($defaults['_locale'])) { - if (!\in_array('_locale', $variables, true)) { - unset($parameters['_locale']); - } elseif (!isset($parameters['_locale'])) { - $parameters['_locale'] = $defaults['_locale']; - } - } - - return $this->doGenerate($variables, $defaults, $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens(), $route->getSchemes()); - } - - /** - * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route - * @throws InvalidParameterException When a parameter value for a placeholder is not correct because - * it does not match the requirement - * - * @return string - */ - protected function doGenerate(array $variables, array $defaults, array $requirements, array $tokens, array $parameters, string $name, int $referenceType, array $hostTokens, array $requiredSchemes = []) - { - $variables = array_flip($variables); - $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); - - // all params must be given - if ($diff = array_diff_key($variables, $mergedParams)) { - throw new MissingMandatoryParametersException(sprintf('Some mandatory parameters are missing ("%s") to generate a URL for route "%s".', implode('", "', array_keys($diff)), $name)); - } - - $url = ''; - $optional = true; - $message = 'Parameter "{parameter}" for route "{route}" must match "{expected}" ("{given}" given) to generate a corresponding URL.'; - foreach ($tokens as $token) { - if ('variable' === $token[0]) { - $varName = $token[3]; - // variable is not important by default - $important = $token[5] ?? false; - - if (!$optional || $important || !\array_key_exists($varName, $defaults) || (null !== $mergedParams[$varName] && (string) $mergedParams[$varName] !== (string) $defaults[$varName])) { - // check requirement (while ignoring look-around patterns) - if (null !== $this->strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements) { - throw new InvalidParameterException(strtr($message, ['{parameter}' => $varName, '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$varName]])); - } - - if ($this->logger) { - $this->logger->error($message, ['parameter' => $varName, 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$varName]]); - } - - return ''; - } - - $url = $token[1].$mergedParams[$varName].$url; - $optional = false; - } - } else { - // static text - $url = $token[1].$url; - $optional = false; - } - } - - if ('' === $url) { - $url = '/'; - } - - // the contexts base URL is already encoded (see Symfony\Component\HttpFoundation\Request) - $url = strtr(rawurlencode($url), $this->decodedChars); - - // the path segments "." and ".." are interpreted as relative reference when resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3 - // so we need to encode them as they are not used for this purpose here - // otherwise we would generate a URI that, when followed by a user agent (e.g. browser), does not match this route - $url = strtr($url, ['/../' => '/%2E%2E/', '/./' => '/%2E/']); - if (str_ends_with($url, '/..')) { - $url = substr($url, 0, -2).'%2E%2E'; - } elseif (str_ends_with($url, '/.')) { - $url = substr($url, 0, -1).'%2E'; - } - - $schemeAuthority = ''; - $host = $this->context->getHost(); - $scheme = $this->context->getScheme(); - - if ($requiredSchemes) { - if (!\in_array($scheme, $requiredSchemes, true)) { - $referenceType = self::ABSOLUTE_URL; - $scheme = current($requiredSchemes); - } - } - - if ($hostTokens) { - $routeHost = ''; - foreach ($hostTokens as $token) { - if ('variable' === $token[0]) { - // check requirement (while ignoring look-around patterns) - if (null !== $this->strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements) { - throw new InvalidParameterException(strtr($message, ['{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]])); - } - - if ($this->logger) { - $this->logger->error($message, ['parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]]]); - } - - return ''; - } - - $routeHost = $token[1].$mergedParams[$token[3]].$routeHost; - } else { - $routeHost = $token[1].$routeHost; - } - } - - if ($routeHost !== $host) { - $host = $routeHost; - if (self::ABSOLUTE_URL !== $referenceType) { - $referenceType = self::NETWORK_PATH; - } - } - } - - if (self::ABSOLUTE_URL === $referenceType || self::NETWORK_PATH === $referenceType) { - if ('' !== $host || ('' !== $scheme && 'http' !== $scheme && 'https' !== $scheme)) { - $port = ''; - if ('http' === $scheme && 80 !== $this->context->getHttpPort()) { - $port = ':'.$this->context->getHttpPort(); - } elseif ('https' === $scheme && 443 !== $this->context->getHttpsPort()) { - $port = ':'.$this->context->getHttpsPort(); - } - - $schemeAuthority = self::NETWORK_PATH === $referenceType || '' === $scheme ? '//' : "$scheme://"; - $schemeAuthority .= $host.$port; - } - } - - if (self::RELATIVE_PATH === $referenceType) { - $url = self::getRelativePath($this->context->getPathInfo(), $url); - } else { - $url = $schemeAuthority.$this->context->getBaseUrl().$url; - } - - // add a query string if needed - $extra = array_udiff_assoc(array_diff_key($parameters, $variables), $defaults, function ($a, $b) { - return $a == $b ? 0 : 1; - }); - - array_walk_recursive($extra, $caster = static function (&$v) use (&$caster) { - if (\is_object($v)) { - if ($vars = get_object_vars($v)) { - array_walk_recursive($vars, $caster); - $v = $vars; - } elseif (method_exists($v, '__toString')) { - $v = (string) $v; - } - } - }); - - // extract fragment - $fragment = $defaults['_fragment'] ?? ''; - - if (isset($extra['_fragment'])) { - $fragment = $extra['_fragment']; - unset($extra['_fragment']); - } - - if ($extra && $query = http_build_query($extra, '', '&', \PHP_QUERY_RFC3986)) { - $url .= '?'.strtr($query, self::QUERY_FRAGMENT_DECODED); - } - - if ('' !== $fragment) { - $url .= '#'.strtr(rawurlencode($fragment), self::QUERY_FRAGMENT_DECODED); - } - - return $url; - } - - /** - * Returns the target path as relative reference from the base path. - * - * Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash. - * Both paths must be absolute and not contain relative parts. - * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. - * Furthermore, they can be used to reduce the link size in documents. - * - * Example target paths, given a base path of "/a/b/c/d": - * - "/a/b/c/d" -> "" - * - "/a/b/c/" -> "./" - * - "/a/b/" -> "../" - * - "/a/b/c/other" -> "other" - * - "/a/x/y" -> "../../x/y" - * - * @param string $basePath The base path - * @param string $targetPath The target path - * - * @return string - */ - public static function getRelativePath(string $basePath, string $targetPath) - { - if ($basePath === $targetPath) { - return ''; - } - - $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); - $targetDirs = explode('/', isset($targetPath[0]) && '/' === $targetPath[0] ? substr($targetPath, 1) : $targetPath); - array_pop($sourceDirs); - $targetFile = array_pop($targetDirs); - - foreach ($sourceDirs as $i => $dir) { - if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { - unset($sourceDirs[$i], $targetDirs[$i]); - } else { - break; - } - } - - $targetDirs[] = $targetFile; - $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs); - - // A reference to the same base directory or an empty subdirectory must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name - // (see http://tools.ietf.org/html/rfc3986#section-4.2). - return '' === $path || '/' === $path[0] - || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) - ? "./$path" : $path; - } -} diff --git a/lib/symfony/routing/Generator/UrlGeneratorInterface.php b/lib/symfony/routing/Generator/UrlGeneratorInterface.php deleted file mode 100644 index c6d5005f9..000000000 --- a/lib/symfony/routing/Generator/UrlGeneratorInterface.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -use Symfony\Component\Routing\Exception\InvalidParameterException; -use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * UrlGeneratorInterface is the interface that all URL generator classes must implement. - * - * The constants in this interface define the different types of resource references that - * are declared in RFC 3986: http://tools.ietf.org/html/rfc3986 - * We are using the term "URL" instead of "URI" as this is more common in web applications - * and we do not need to distinguish them as the difference is mostly semantical and - * less technical. Generating URIs, i.e. representation-independent resource identifiers, - * is also possible. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -interface UrlGeneratorInterface extends RequestContextAwareInterface -{ - /** - * Generates an absolute URL, e.g. "http://example.com/dir/file". - */ - public const ABSOLUTE_URL = 0; - - /** - * Generates an absolute path, e.g. "/dir/file". - */ - public const ABSOLUTE_PATH = 1; - - /** - * Generates a relative path based on the current request path, e.g. "../parent-file". - * - * @see UrlGenerator::getRelativePath() - */ - public const RELATIVE_PATH = 2; - - /** - * Generates a network path, e.g. "//example.com/dir/file". - * Such reference reuses the current scheme but specifies the host. - */ - public const NETWORK_PATH = 3; - - /** - * Generates a URL or path for a specific route based on the given parameters. - * - * Parameters that reference placeholders in the route pattern will substitute them in the - * path or host. Extra params are added as query string to the URL. - * - * When the passed reference type cannot be generated for the route because it requires a different - * host or scheme than the current one, the method will return a more comprehensive reference - * that includes the required params. For example, when you call this method with $referenceType = ABSOLUTE_PATH - * but the route requires the https scheme whereas the current scheme is http, it will instead return an - * ABSOLUTE_URL with the https scheme and the current host. This makes sure the generated URL matches - * the route in any case. - * - * If there is no route with the given name, the generator must throw the RouteNotFoundException. - * - * The special parameter _fragment will be used as the document fragment suffixed to the final URL. - * - * @return string - * - * @throws RouteNotFoundException If the named route doesn't exist - * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route - * @throws InvalidParameterException When a parameter value for a placeholder is not correct because - * it does not match the requirement - */ - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH); -} diff --git a/lib/symfony/routing/LICENSE b/lib/symfony/routing/LICENSE deleted file mode 100644 index 88bf75bb4..000000000 --- a/lib/symfony/routing/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/routing/Loader/AnnotationClassLoader.php b/lib/symfony/routing/Loader/AnnotationClassLoader.php deleted file mode 100644 index ad5af5c94..000000000 --- a/lib/symfony/routing/Loader/AnnotationClassLoader.php +++ /dev/null @@ -1,394 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Doctrine\Common\Annotations\Reader; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Loader\LoaderResolverInterface; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\Annotation\Route as RouteAnnotation; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * AnnotationClassLoader loads routing information from a PHP class and its methods. - * - * You need to define an implementation for the configureRoute() method. Most of the - * time, this method should define some PHP callable to be called for the route - * (a controller in MVC speak). - * - * The @Route annotation can be set on the class (for global parameters), - * and on each method. - * - * The @Route annotation main value is the route path. The annotation also - * recognizes several parameters: requirements, options, defaults, schemes, - * methods, host, and name. The name parameter is mandatory. - * Here is an example of how you should be able to use it: - * /** - * * @Route("/Blog") - * * / - * class Blog - * { - * /** - * * @Route("/", name="blog_index") - * * / - * public function index() - * { - * } - * /** - * * @Route("/{id}", name="blog_post", requirements = {"id" = "\d+"}) - * * / - * public function show() - * { - * } - * } - * - * On PHP 8, the annotation class can be used as an attribute as well: - * #[Route('/Blog')] - * class Blog - * { - * #[Route('/', name: 'blog_index')] - * public function index() - * { - * } - * #[Route('/{id}', name: 'blog_post', requirements: ["id" => '\d+'])] - * public function show() - * { - * } - * } - - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -abstract class AnnotationClassLoader implements LoaderInterface -{ - protected $reader; - protected $env; - - /** - * @var string - */ - protected $routeAnnotationClass = RouteAnnotation::class; - - /** - * @var int - */ - protected $defaultRouteIndex = 0; - - public function __construct(Reader $reader = null, string $env = null) - { - $this->reader = $reader; - $this->env = $env; - } - - /** - * Sets the annotation class to read route properties from. - */ - public function setRouteAnnotationClass(string $class) - { - $this->routeAnnotationClass = $class; - } - - /** - * Loads from annotations from a class. - * - * @param string $class A class name - * - * @return RouteCollection - * - * @throws \InvalidArgumentException When route can't be parsed - */ - public function load($class, string $type = null) - { - if (!class_exists($class)) { - throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); - } - - $class = new \ReflectionClass($class); - if ($class->isAbstract()) { - throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class->getName())); - } - - $globals = $this->getGlobals($class); - - $collection = new RouteCollection(); - $collection->addResource(new FileResource($class->getFileName())); - - if ($globals['env'] && $this->env !== $globals['env']) { - return $collection; - } - - foreach ($class->getMethods() as $method) { - $this->defaultRouteIndex = 0; - foreach ($this->getAnnotations($method) as $annot) { - $this->addRoute($collection, $annot, $globals, $class, $method); - } - } - - if (0 === $collection->count() && $class->hasMethod('__invoke')) { - $globals = $this->resetGlobals(); - foreach ($this->getAnnotations($class) as $annot) { - $this->addRoute($collection, $annot, $globals, $class, $class->getMethod('__invoke')); - } - } - - return $collection; - } - - /** - * @param RouteAnnotation $annot or an object that exposes a similar interface - */ - protected function addRoute(RouteCollection $collection, object $annot, array $globals, \ReflectionClass $class, \ReflectionMethod $method) - { - if ($annot->getEnv() && $annot->getEnv() !== $this->env) { - return; - } - - $name = $annot->getName(); - if (null === $name) { - $name = $this->getDefaultRouteName($class, $method); - } - $name = $globals['name'].$name; - - $requirements = $annot->getRequirements(); - - foreach ($requirements as $placeholder => $requirement) { - if (\is_int($placeholder)) { - throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s::%s()"?', $placeholder, $requirement, $name, $class->getName(), $method->getName())); - } - } - - $defaults = array_replace($globals['defaults'], $annot->getDefaults()); - $requirements = array_replace($globals['requirements'], $requirements); - $options = array_replace($globals['options'], $annot->getOptions()); - $schemes = array_merge($globals['schemes'], $annot->getSchemes()); - $methods = array_merge($globals['methods'], $annot->getMethods()); - - $host = $annot->getHost(); - if (null === $host) { - $host = $globals['host']; - } - - $condition = $annot->getCondition() ?? $globals['condition']; - $priority = $annot->getPriority() ?? $globals['priority']; - - $path = $annot->getLocalizedPaths() ?: $annot->getPath(); - $prefix = $globals['localized_paths'] ?: $globals['path']; - $paths = []; - - if (\is_array($path)) { - if (!\is_array($prefix)) { - foreach ($path as $locale => $localePath) { - $paths[$locale] = $prefix.$localePath; - } - } elseif ($missing = array_diff_key($prefix, $path)) { - throw new \LogicException(sprintf('Route to "%s" is missing paths for locale(s) "%s".', $class->name.'::'.$method->name, implode('", "', array_keys($missing)))); - } else { - foreach ($path as $locale => $localePath) { - if (!isset($prefix[$locale])) { - throw new \LogicException(sprintf('Route to "%s" with locale "%s" is missing a corresponding prefix in class "%s".', $method->name, $locale, $class->name)); - } - - $paths[$locale] = $prefix[$locale].$localePath; - } - } - } elseif (\is_array($prefix)) { - foreach ($prefix as $locale => $localePrefix) { - $paths[$locale] = $localePrefix.$path; - } - } else { - $paths[] = $prefix.$path; - } - - foreach ($method->getParameters() as $param) { - if (isset($defaults[$param->name]) || !$param->isDefaultValueAvailable()) { - continue; - } - foreach ($paths as $locale => $path) { - if (preg_match(sprintf('/\{%s(?:<.*?>)?\}/', preg_quote($param->name)), $path)) { - $defaults[$param->name] = $param->getDefaultValue(); - break; - } - } - } - - foreach ($paths as $locale => $path) { - $route = $this->createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); - $this->configureRoute($route, $class, $method, $annot); - if (0 !== $locale) { - $route->setDefault('_locale', $locale); - $route->setRequirement('_locale', preg_quote($locale)); - $route->setDefault('_canonical_route', $name); - $collection->add($name.'.'.$locale, $route, $priority); - } else { - $collection->add($name, $route, $priority); - } - } - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type); - } - - /** - * {@inheritdoc} - */ - public function setResolver(LoaderResolverInterface $resolver) - { - } - - /** - * {@inheritdoc} - */ - public function getResolver() - { - } - - /** - * Gets the default route name for a class method. - * - * @return string - */ - protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) - { - $name = str_replace('\\', '_', $class->name).'_'.$method->name; - $name = \function_exists('mb_strtolower') && preg_match('//u', $name) ? mb_strtolower($name, 'UTF-8') : strtolower($name); - if ($this->defaultRouteIndex > 0) { - $name .= '_'.$this->defaultRouteIndex; - } - ++$this->defaultRouteIndex; - - return $name; - } - - protected function getGlobals(\ReflectionClass $class) - { - $globals = $this->resetGlobals(); - - $annot = null; - if (\PHP_VERSION_ID >= 80000 && ($attribute = $class->getAttributes($this->routeAnnotationClass, \ReflectionAttribute::IS_INSTANCEOF)[0] ?? null)) { - $annot = $attribute->newInstance(); - } - if (!$annot && $this->reader) { - $annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass); - } - - if ($annot) { - if (null !== $annot->getName()) { - $globals['name'] = $annot->getName(); - } - - if (null !== $annot->getPath()) { - $globals['path'] = $annot->getPath(); - } - - $globals['localized_paths'] = $annot->getLocalizedPaths(); - - if (null !== $annot->getRequirements()) { - $globals['requirements'] = $annot->getRequirements(); - } - - if (null !== $annot->getOptions()) { - $globals['options'] = $annot->getOptions(); - } - - if (null !== $annot->getDefaults()) { - $globals['defaults'] = $annot->getDefaults(); - } - - if (null !== $annot->getSchemes()) { - $globals['schemes'] = $annot->getSchemes(); - } - - if (null !== $annot->getMethods()) { - $globals['methods'] = $annot->getMethods(); - } - - if (null !== $annot->getHost()) { - $globals['host'] = $annot->getHost(); - } - - if (null !== $annot->getCondition()) { - $globals['condition'] = $annot->getCondition(); - } - - $globals['priority'] = $annot->getPriority() ?? 0; - $globals['env'] = $annot->getEnv(); - - foreach ($globals['requirements'] as $placeholder => $requirement) { - if (\is_int($placeholder)) { - throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" in "%s"?', $placeholder, $requirement, $class->getName())); - } - } - } - - return $globals; - } - - private function resetGlobals(): array - { - return [ - 'path' => null, - 'localized_paths' => [], - 'requirements' => [], - 'options' => [], - 'defaults' => [], - 'schemes' => [], - 'methods' => [], - 'host' => '', - 'condition' => '', - 'name' => '', - 'priority' => 0, - 'env' => null, - ]; - } - - protected function createRoute(string $path, array $defaults, array $requirements, array $options, ?string $host, array $schemes, array $methods, ?string $condition) - { - return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); - } - - abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot); - - /** - * @param \ReflectionClass|\ReflectionMethod $reflection - * - * @return iterable - */ - private function getAnnotations(object $reflection): iterable - { - if (\PHP_VERSION_ID >= 80000) { - foreach ($reflection->getAttributes($this->routeAnnotationClass, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { - yield $attribute->newInstance(); - } - } - - if (!$this->reader) { - return; - } - - $anntotations = $reflection instanceof \ReflectionClass - ? $this->reader->getClassAnnotations($reflection) - : $this->reader->getMethodAnnotations($reflection); - - foreach ($anntotations as $annotation) { - if ($annotation instanceof $this->routeAnnotationClass) { - yield $annotation; - } - } - } -} diff --git a/lib/symfony/routing/Loader/AnnotationDirectoryLoader.php b/lib/symfony/routing/Loader/AnnotationDirectoryLoader.php deleted file mode 100644 index ae825a39f..000000000 --- a/lib/symfony/routing/Loader/AnnotationDirectoryLoader.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Routing\RouteCollection; - -/** - * AnnotationDirectoryLoader loads routing information from annotations set - * on PHP classes and methods. - * - * @author Fabien Potencier - */ -class AnnotationDirectoryLoader extends AnnotationFileLoader -{ - /** - * Loads from annotations from a directory. - * - * @param string $path A directory path - * @param string|null $type The resource type - * - * @return RouteCollection - * - * @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed - */ - public function load($path, string $type = null) - { - if (!is_dir($dir = $this->locator->locate($path))) { - return parent::supports($path, $type) ? parent::load($path, $type) : new RouteCollection(); - } - - $collection = new RouteCollection(); - $collection->addResource(new DirectoryResource($dir, '/\.php$/')); - $files = iterator_to_array(new \RecursiveIteratorIterator( - new \RecursiveCallbackFilterIterator( - new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - function (\SplFileInfo $current) { - return '.' !== substr($current->getBasename(), 0, 1); - } - ), - \RecursiveIteratorIterator::LEAVES_ONLY - )); - usort($files, function (\SplFileInfo $a, \SplFileInfo $b) { - return (string) $a > (string) $b ? 1 : -1; - }); - - foreach ($files as $file) { - if (!$file->isFile() || !str_ends_with($file->getFilename(), '.php')) { - continue; - } - - if ($class = $this->findClass($file)) { - $refl = new \ReflectionClass($class); - if ($refl->isAbstract()) { - continue; - } - - $collection->addCollection($this->loader->load($class, $type)); - } - } - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - if ('annotation' === $type) { - return true; - } - - if ($type || !\is_string($resource)) { - return false; - } - - try { - return is_dir($this->locator->locate($resource)); - } catch (\Exception $e) { - return false; - } - } -} diff --git a/lib/symfony/routing/Loader/AnnotationFileLoader.php b/lib/symfony/routing/Loader/AnnotationFileLoader.php deleted file mode 100644 index 27af66ee6..000000000 --- a/lib/symfony/routing/Loader/AnnotationFileLoader.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\RouteCollection; - -/** - * AnnotationFileLoader loads routing information from annotations set - * on a PHP class and its methods. - * - * @author Fabien Potencier - */ -class AnnotationFileLoader extends FileLoader -{ - protected $loader; - - public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader) - { - if (!\function_exists('token_get_all')) { - throw new \LogicException('The Tokenizer extension is required for the routing annotation loaders.'); - } - - parent::__construct($locator); - - $this->loader = $loader; - } - - /** - * Loads from annotations from a file. - * - * @param string $file A PHP file path - * @param string|null $type The resource type - * - * @return RouteCollection|null - * - * @throws \InvalidArgumentException When the file does not exist or its routes cannot be parsed - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - $collection = new RouteCollection(); - if ($class = $this->findClass($path)) { - $refl = new \ReflectionClass($class); - if ($refl->isAbstract()) { - return null; - } - - $collection->addResource(new FileResource($path)); - $collection->addCollection($this->loader->load($class, $type)); - } - - gc_mem_caches(); - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'annotation' === $type); - } - - /** - * Returns the full class name for the first class in the file. - * - * @return string|false - */ - protected function findClass(string $file) - { - $class = false; - $namespace = false; - $tokens = token_get_all(file_get_contents($file)); - - if (1 === \count($tokens) && \T_INLINE_HTML === $tokens[0][0]) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the " true, \T_STRING => true]; - if (\defined('T_NAME_QUALIFIED')) { - $nsTokens[\T_NAME_QUALIFIED] = true; - } - for ($i = 0; isset($tokens[$i]); ++$i) { - $token = $tokens[$i]; - if (!isset($token[1])) { - continue; - } - - if (true === $class && \T_STRING === $token[0]) { - return $namespace.'\\'.$token[1]; - } - - if (true === $namespace && isset($nsTokens[$token[0]])) { - $namespace = $token[1]; - while (isset($tokens[++$i][1], $nsTokens[$tokens[$i][0]])) { - $namespace .= $tokens[$i][1]; - } - $token = $tokens[$i]; - } - - if (\T_CLASS === $token[0]) { - // Skip usage of ::class constant and anonymous classes - $skipClassToken = false; - for ($j = $i - 1; $j > 0; --$j) { - if (!isset($tokens[$j][1])) { - if ('(' === $tokens[$j] || ',' === $tokens[$j]) { - $skipClassToken = true; - } - break; - } - - if (\T_DOUBLE_COLON === $tokens[$j][0] || \T_NEW === $tokens[$j][0]) { - $skipClassToken = true; - break; - } elseif (!\in_array($tokens[$j][0], [\T_WHITESPACE, \T_DOC_COMMENT, \T_COMMENT])) { - break; - } - } - - if (!$skipClassToken) { - $class = true; - } - } - - if (\T_NAMESPACE === $token[0]) { - $namespace = true; - } - } - - return false; - } -} diff --git a/lib/symfony/routing/Loader/ClosureLoader.php b/lib/symfony/routing/Loader/ClosureLoader.php deleted file mode 100644 index 42f950f50..000000000 --- a/lib/symfony/routing/Loader/ClosureLoader.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\Routing\RouteCollection; - -/** - * ClosureLoader loads routes from a PHP closure. - * - * The Closure must return a RouteCollection instance. - * - * @author Fabien Potencier - */ -class ClosureLoader extends Loader -{ - /** - * Loads a Closure. - * - * @param \Closure $closure A Closure - * @param string|null $type The resource type - * - * @return RouteCollection - */ - public function load($closure, string $type = null) - { - return $closure($this->env); - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return $resource instanceof \Closure && (!$type || 'closure' === $type); - } -} diff --git a/lib/symfony/routing/Loader/Configurator/AliasConfigurator.php b/lib/symfony/routing/Loader/Configurator/AliasConfigurator.php deleted file mode 100644 index 4b2206e68..000000000 --- a/lib/symfony/routing/Loader/Configurator/AliasConfigurator.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\Routing\Alias; - -class AliasConfigurator -{ - private $alias; - - public function __construct(Alias $alias) - { - $this->alias = $alias; - } - - /** - * Whether this alias is deprecated, that means it should not be called anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function deprecate(string $package, string $version, string $message): self - { - $this->alias->setDeprecated($package, $version, $message); - - return $this; - } -} diff --git a/lib/symfony/routing/Loader/Configurator/CollectionConfigurator.php b/lib/symfony/routing/Loader/Configurator/CollectionConfigurator.php deleted file mode 100644 index 09274ccdc..000000000 --- a/lib/symfony/routing/Loader/Configurator/CollectionConfigurator.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class CollectionConfigurator -{ - use Traits\AddTrait; - use Traits\HostTrait; - use Traits\RouteTrait; - - private $parent; - private $parentConfigurator; - private $parentPrefixes; - private $host; - - public function __construct(RouteCollection $parent, string $name, self $parentConfigurator = null, array $parentPrefixes = null) - { - $this->parent = $parent; - $this->name = $name; - $this->collection = new RouteCollection(); - $this->route = new Route(''); - $this->parentConfigurator = $parentConfigurator; // for GC control - $this->parentPrefixes = $parentPrefixes; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if (null === $this->prefixes) { - $this->collection->addPrefix($this->route->getPath()); - } - if (null !== $this->host) { - $this->addHost($this->collection, $this->host); - } - - $this->parent->addCollection($this->collection); - } - - /** - * Creates a sub-collection. - */ - final public function collection(string $name = ''): self - { - return new self($this->collection, $this->name.$name, $this, $this->prefixes); - } - - /** - * Sets the prefix to add to the path of all child routes. - * - * @param string|array $prefix the prefix, or the localized prefixes - * - * @return $this - */ - final public function prefix($prefix): self - { - if (\is_array($prefix)) { - if (null === $this->parentPrefixes) { - // no-op - } elseif ($missing = array_diff_key($this->parentPrefixes, $prefix)) { - throw new \LogicException(sprintf('Collection "%s" is missing prefixes for locale(s) "%s".', $this->name, implode('", "', array_keys($missing)))); - } else { - foreach ($prefix as $locale => $localePrefix) { - if (!isset($this->parentPrefixes[$locale])) { - throw new \LogicException(sprintf('Collection "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $this->name, $locale)); - } - - $prefix[$locale] = $this->parentPrefixes[$locale].$localePrefix; - } - } - $this->prefixes = $prefix; - $this->route->setPath('/'); - } else { - $this->prefixes = null; - $this->route->setPath($prefix); - } - - return $this; - } - - /** - * Sets the host to use for all child routes. - * - * @param string|array $host the host, or the localized hosts - * - * @return $this - */ - final public function host($host): self - { - $this->host = $host; - - return $this; - } - - private function createRoute(string $path): Route - { - return (clone $this->route)->setPath($path); - } -} diff --git a/lib/symfony/routing/Loader/Configurator/ImportConfigurator.php b/lib/symfony/routing/Loader/Configurator/ImportConfigurator.php deleted file mode 100644 index 32f3efe3a..000000000 --- a/lib/symfony/routing/Loader/Configurator/ImportConfigurator.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class ImportConfigurator -{ - use Traits\HostTrait; - use Traits\PrefixTrait; - use Traits\RouteTrait; - - private $parent; - - public function __construct(RouteCollection $parent, RouteCollection $route) - { - $this->parent = $parent; - $this->route = $route; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->parent->addCollection($this->route); - } - - /** - * Sets the prefix to add to the path of all child routes. - * - * @param string|array $prefix the prefix, or the localized prefixes - * - * @return $this - */ - final public function prefix($prefix, bool $trailingSlashOnRoot = true): self - { - $this->addPrefix($this->route, $prefix, $trailingSlashOnRoot); - - return $this; - } - - /** - * Sets the prefix to add to the name of all child routes. - * - * @return $this - */ - final public function namePrefix(string $namePrefix): self - { - $this->route->addNamePrefix($namePrefix); - - return $this; - } - - /** - * Sets the host to use for all child routes. - * - * @param string|array $host the host, or the localized hosts - * - * @return $this - */ - final public function host($host): self - { - $this->addHost($this->route, $host); - - return $this; - } -} diff --git a/lib/symfony/routing/Loader/Configurator/RouteConfigurator.php b/lib/symfony/routing/Loader/Configurator/RouteConfigurator.php deleted file mode 100644 index bb6ce267a..000000000 --- a/lib/symfony/routing/Loader/Configurator/RouteConfigurator.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class RouteConfigurator -{ - use Traits\AddTrait; - use Traits\HostTrait; - use Traits\RouteTrait; - - protected $parentConfigurator; - - public function __construct(RouteCollection $collection, RouteCollection $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null) - { - $this->collection = $collection; - $this->route = $route; - $this->name = $name; - $this->parentConfigurator = $parentConfigurator; // for GC control - $this->prefixes = $prefixes; - } - - /** - * Sets the host to use for all child routes. - * - * @param string|array $host the host, or the localized hosts - * - * @return $this - */ - final public function host($host): self - { - $this->addHost($this->route, $host); - - return $this; - } -} diff --git a/lib/symfony/routing/Loader/Configurator/RoutingConfigurator.php b/lib/symfony/routing/Loader/Configurator/RoutingConfigurator.php deleted file mode 100644 index 4687bf681..000000000 --- a/lib/symfony/routing/Loader/Configurator/RoutingConfigurator.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\Loader\PhpFileLoader; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class RoutingConfigurator -{ - use Traits\AddTrait; - - private $loader; - private $path; - private $file; - private $env; - - public function __construct(RouteCollection $collection, PhpFileLoader $loader, string $path, string $file, string $env = null) - { - $this->collection = $collection; - $this->loader = $loader; - $this->path = $path; - $this->file = $file; - $this->env = $env; - } - - /** - * @param string|string[]|null $exclude Glob patterns to exclude from the import - */ - final public function import($resource, string $type = null, bool $ignoreErrors = false, $exclude = null): ImportConfigurator - { - $this->loader->setCurrentDir(\dirname($this->path)); - - $imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file, $exclude) ?: []; - if (!\is_array($imported)) { - return new ImportConfigurator($this->collection, $imported); - } - - $mergedCollection = new RouteCollection(); - foreach ($imported as $subCollection) { - $mergedCollection->addCollection($subCollection); - } - - return new ImportConfigurator($this->collection, $mergedCollection); - } - - final public function collection(string $name = ''): CollectionConfigurator - { - return new CollectionConfigurator($this->collection, $name); - } - - /** - * Get the current environment to be able to write conditional configuration. - */ - final public function env(): ?string - { - return $this->env; - } - - /** - * @return static - */ - final public function withPath(string $path): self - { - $clone = clone $this; - $clone->path = $clone->file = $path; - - return $clone; - } -} diff --git a/lib/symfony/routing/Loader/Configurator/Traits/AddTrait.php b/lib/symfony/routing/Loader/Configurator/Traits/AddTrait.php deleted file mode 100644 index 92b1bd0ea..000000000 --- a/lib/symfony/routing/Loader/Configurator/Traits/AddTrait.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Loader\Configurator\AliasConfigurator; -use Symfony\Component\Routing\Loader\Configurator\CollectionConfigurator; -use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -trait AddTrait -{ - use LocalizedRouteTrait; - - /** - * @var RouteCollection - */ - protected $collection; - protected $name = ''; - protected $prefixes; - - /** - * Adds a route. - * - * @param string|array $path the path, or the localized paths of the route - */ - public function add(string $name, $path): RouteConfigurator - { - $parentConfigurator = $this instanceof CollectionConfigurator ? $this : ($this instanceof RouteConfigurator ? $this->parentConfigurator : null); - $route = $this->createLocalizedRoute($this->collection, $name, $path, $this->name, $this->prefixes); - - return new RouteConfigurator($this->collection, $route, $this->name, $parentConfigurator, $this->prefixes); - } - - public function alias(string $name, string $alias): AliasConfigurator - { - return new AliasConfigurator($this->collection->addAlias($name, $alias)); - } - - /** - * Adds a route. - * - * @param string|array $path the path, or the localized paths of the route - */ - public function __invoke(string $name, $path): RouteConfigurator - { - return $this->add($name, $path); - } -} diff --git a/lib/symfony/routing/Loader/Configurator/Traits/HostTrait.php b/lib/symfony/routing/Loader/Configurator/Traits/HostTrait.php deleted file mode 100644 index 54ae6566a..000000000 --- a/lib/symfony/routing/Loader/Configurator/Traits/HostTrait.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\RouteCollection; - -/** - * @internal - */ -trait HostTrait -{ - final protected function addHost(RouteCollection $routes, $hosts) - { - if (!$hosts || !\is_array($hosts)) { - $routes->setHost($hosts ?: ''); - - return; - } - - foreach ($routes->all() as $name => $route) { - if (null === $locale = $route->getDefault('_locale')) { - $routes->remove($name); - foreach ($hosts as $locale => $host) { - $localizedRoute = clone $route; - $localizedRoute->setDefault('_locale', $locale); - $localizedRoute->setRequirement('_locale', preg_quote($locale)); - $localizedRoute->setDefault('_canonical_route', $name); - $localizedRoute->setHost($host); - $routes->add($name.'.'.$locale, $localizedRoute); - } - } elseif (!isset($hosts[$locale])) { - throw new \InvalidArgumentException(sprintf('Route "%s" with locale "%s" is missing a corresponding host in its parent collection.', $name, $locale)); - } else { - $route->setHost($hosts[$locale]); - $route->setRequirement('_locale', preg_quote($locale)); - $routes->add($name, $route); - } - } - } -} diff --git a/lib/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php b/lib/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php deleted file mode 100644 index 4734a4eac..000000000 --- a/lib/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @internal - * - * @author Nicolas Grekas - * @author Jules Pietri - */ -trait LocalizedRouteTrait -{ - /** - * Creates one or many routes. - * - * @param string|array $path the path, or the localized paths of the route - */ - final protected function createLocalizedRoute(RouteCollection $collection, string $name, $path, string $namePrefix = '', array $prefixes = null): RouteCollection - { - $paths = []; - - $routes = new RouteCollection(); - - if (\is_array($path)) { - if (null === $prefixes) { - $paths = $path; - } elseif ($missing = array_diff_key($prefixes, $path)) { - throw new \LogicException(sprintf('Route "%s" is missing routes for locale(s) "%s".', $name, implode('", "', array_keys($missing)))); - } else { - foreach ($path as $locale => $localePath) { - if (!isset($prefixes[$locale])) { - throw new \LogicException(sprintf('Route "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $name, $locale)); - } - - $paths[$locale] = $prefixes[$locale].$localePath; - } - } - } elseif (null !== $prefixes) { - foreach ($prefixes as $locale => $prefix) { - $paths[$locale] = $prefix.$path; - } - } else { - $routes->add($namePrefix.$name, $route = $this->createRoute($path)); - $collection->add($namePrefix.$name, $route); - - return $routes; - } - - foreach ($paths as $locale => $path) { - $routes->add($name.'.'.$locale, $route = $this->createRoute($path)); - $collection->add($namePrefix.$name.'.'.$locale, $route); - $route->setDefault('_locale', $locale); - $route->setRequirement('_locale', preg_quote($locale)); - $route->setDefault('_canonical_route', $namePrefix.$name); - } - - return $routes; - } - - private function createRoute(string $path): Route - { - return new Route($path); - } -} diff --git a/lib/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php b/lib/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php deleted file mode 100644 index 27053bcaf..000000000 --- a/lib/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @internal - * - * @author Nicolas Grekas - */ -trait PrefixTrait -{ - final protected function addPrefix(RouteCollection $routes, $prefix, bool $trailingSlashOnRoot) - { - if (\is_array($prefix)) { - foreach ($prefix as $locale => $localePrefix) { - $prefix[$locale] = trim(trim($localePrefix), '/'); - } - foreach ($routes->all() as $name => $route) { - if (null === $locale = $route->getDefault('_locale')) { - $routes->remove($name); - foreach ($prefix as $locale => $localePrefix) { - $localizedRoute = clone $route; - $localizedRoute->setDefault('_locale', $locale); - $localizedRoute->setRequirement('_locale', preg_quote($locale)); - $localizedRoute->setDefault('_canonical_route', $name); - $localizedRoute->setPath($localePrefix.(!$trailingSlashOnRoot && '/' === $route->getPath() ? '' : $route->getPath())); - $routes->add($name.'.'.$locale, $localizedRoute); - } - } elseif (!isset($prefix[$locale])) { - throw new \InvalidArgumentException(sprintf('Route "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $name, $locale)); - } else { - $route->setPath($prefix[$locale].(!$trailingSlashOnRoot && '/' === $route->getPath() ? '' : $route->getPath())); - $routes->add($name, $route); - } - } - - return; - } - - $routes->addPrefix($prefix); - if (!$trailingSlashOnRoot) { - $rootPath = (new Route(trim(trim($prefix), '/').'/'))->getPath(); - foreach ($routes->all() as $route) { - if ($route->getPath() === $rootPath) { - $route->setPath(rtrim($rootPath, '/')); - } - } - } - } -} diff --git a/lib/symfony/routing/Loader/Configurator/Traits/RouteTrait.php b/lib/symfony/routing/Loader/Configurator/Traits/RouteTrait.php deleted file mode 100644 index ac05d10e5..000000000 --- a/lib/symfony/routing/Loader/Configurator/Traits/RouteTrait.php +++ /dev/null @@ -1,175 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -trait RouteTrait -{ - /** - * @var RouteCollection|Route - */ - protected $route; - - /** - * Adds defaults. - * - * @return $this - */ - final public function defaults(array $defaults): self - { - $this->route->addDefaults($defaults); - - return $this; - } - - /** - * Adds requirements. - * - * @return $this - */ - final public function requirements(array $requirements): self - { - $this->route->addRequirements($requirements); - - return $this; - } - - /** - * Adds options. - * - * @return $this - */ - final public function options(array $options): self - { - $this->route->addOptions($options); - - return $this; - } - - /** - * Whether paths should accept utf8 encoding. - * - * @return $this - */ - final public function utf8(bool $utf8 = true): self - { - $this->route->addOptions(['utf8' => $utf8]); - - return $this; - } - - /** - * Sets the condition. - * - * @return $this - */ - final public function condition(string $condition): self - { - $this->route->setCondition($condition); - - return $this; - } - - /** - * Sets the pattern for the host. - * - * @return $this - */ - final public function host(string $pattern): self - { - $this->route->setHost($pattern); - - return $this; - } - - /** - * Sets the schemes (e.g. 'https') this route is restricted to. - * So an empty array means that any scheme is allowed. - * - * @param string[] $schemes - * - * @return $this - */ - final public function schemes(array $schemes): self - { - $this->route->setSchemes($schemes); - - return $this; - } - - /** - * Sets the HTTP methods (e.g. 'POST') this route is restricted to. - * So an empty array means that any method is allowed. - * - * @param string[] $methods - * - * @return $this - */ - final public function methods(array $methods): self - { - $this->route->setMethods($methods); - - return $this; - } - - /** - * Adds the "_controller" entry to defaults. - * - * @param callable|string|array $controller a callable or parseable pseudo-callable - * - * @return $this - */ - final public function controller($controller): self - { - $this->route->addDefaults(['_controller' => $controller]); - - return $this; - } - - /** - * Adds the "_locale" entry to defaults. - * - * @return $this - */ - final public function locale(string $locale): self - { - $this->route->addDefaults(['_locale' => $locale]); - - return $this; - } - - /** - * Adds the "_format" entry to defaults. - * - * @return $this - */ - final public function format(string $format): self - { - $this->route->addDefaults(['_format' => $format]); - - return $this; - } - - /** - * Adds the "_stateless" entry to defaults. - * - * @return $this - */ - final public function stateless(bool $stateless = true): self - { - $this->route->addDefaults(['_stateless' => $stateless]); - - return $this; - } -} diff --git a/lib/symfony/routing/Loader/ContainerLoader.php b/lib/symfony/routing/Loader/ContainerLoader.php deleted file mode 100644 index d8730aec6..000000000 --- a/lib/symfony/routing/Loader/ContainerLoader.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Psr\Container\ContainerInterface; - -/** - * A route loader that executes a service from a PSR-11 container to load the routes. - * - * @author Ryan Weaver - */ -class ContainerLoader extends ObjectLoader -{ - private $container; - - public function __construct(ContainerInterface $container, string $env = null) - { - $this->container = $container; - parent::__construct($env); - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return 'service' === $type && \is_string($resource); - } - - /** - * {@inheritdoc} - */ - protected function getObject(string $id) - { - return $this->container->get($id); - } -} diff --git a/lib/symfony/routing/Loader/DirectoryLoader.php b/lib/symfony/routing/Loader/DirectoryLoader.php deleted file mode 100644 index c0f349177..000000000 --- a/lib/symfony/routing/Loader/DirectoryLoader.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Routing\RouteCollection; - -class DirectoryLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - $collection = new RouteCollection(); - $collection->addResource(new DirectoryResource($path)); - - foreach (scandir($path) as $dir) { - if ('.' !== $dir[0]) { - $this->setCurrentDir($path); - $subPath = $path.'/'.$dir; - $subType = null; - - if (is_dir($subPath)) { - $subPath .= '/'; - $subType = 'directory'; - } - - $subCollection = $this->import($subPath, $subType, false, $path); - $collection->addCollection($subCollection); - } - } - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - // only when type is forced to directory, not to conflict with AnnotationLoader - - return 'directory' === $type; - } -} diff --git a/lib/symfony/routing/Loader/GlobFileLoader.php b/lib/symfony/routing/Loader/GlobFileLoader.php deleted file mode 100644 index 780fb15dc..000000000 --- a/lib/symfony/routing/Loader/GlobFileLoader.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Routing\RouteCollection; - -/** - * GlobFileLoader loads files from a glob pattern. - * - * @author Nicolas Grekas - */ -class GlobFileLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - $collection = new RouteCollection(); - - foreach ($this->glob($resource, false, $globResource) as $path => $info) { - $collection->addCollection($this->import($path)); - } - - $collection->addResource($globResource); - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return 'glob' === $type; - } -} diff --git a/lib/symfony/routing/Loader/ObjectLoader.php b/lib/symfony/routing/Loader/ObjectLoader.php deleted file mode 100644 index 062453908..000000000 --- a/lib/symfony/routing/Loader/ObjectLoader.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\RouteCollection; - -/** - * A route loader that calls a method on an object to load the routes. - * - * @author Ryan Weaver - */ -abstract class ObjectLoader extends Loader -{ - /** - * Returns the object that the method will be called on to load routes. - * - * For example, if your application uses a service container, - * the $id may be a service id. - * - * @return object - */ - abstract protected function getObject(string $id); - - /** - * Calls the object method that will load the routes. - * - * @param string $resource object_id::method - * @param string|null $type The resource type - * - * @return RouteCollection - */ - public function load($resource, string $type = null) - { - if (!preg_match('/^[^\:]+(?:::(?:[^\:]+))?$/', $resource)) { - throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the %s route loader: use the format "object_id::method" or "object_id" if your object class has an "__invoke" method.', $resource, \is_string($type) ? '"'.$type.'"' : 'object')); - } - - $parts = explode('::', $resource); - $method = $parts[1] ?? '__invoke'; - - $loaderObject = $this->getObject($parts[0]); - - if (!\is_object($loaderObject)) { - throw new \TypeError(sprintf('"%s:getObject()" must return an object: "%s" returned.', static::class, get_debug_type($loaderObject))); - } - - if (!\is_callable([$loaderObject, $method])) { - throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s".', $method, get_debug_type($loaderObject), $resource)); - } - - $routeCollection = $loaderObject->$method($this, $this->env); - - if (!$routeCollection instanceof RouteCollection) { - $type = get_debug_type($routeCollection); - - throw new \LogicException(sprintf('The "%s::%s()" method must return a RouteCollection: "%s" returned.', get_debug_type($loaderObject), $method, $type)); - } - - // make the object file tracked so that if it changes, the cache rebuilds - $this->addClassResource(new \ReflectionClass($loaderObject), $routeCollection); - - return $routeCollection; - } - - private function addClassResource(\ReflectionClass $class, RouteCollection $collection) - { - do { - if (is_file($class->getFileName())) { - $collection->addResource(new FileResource($class->getFileName())); - } - } while ($class = $class->getParentClass()); - } -} diff --git a/lib/symfony/routing/Loader/PhpFileLoader.php b/lib/symfony/routing/Loader/PhpFileLoader.php deleted file mode 100644 index 39ac81273..000000000 --- a/lib/symfony/routing/Loader/PhpFileLoader.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; -use Symfony\Component\Routing\RouteCollection; - -/** - * PhpFileLoader loads routes from a PHP file. - * - * The file must return a RouteCollection instance. - * - * @author Fabien Potencier - * @author Nicolas grekas - * @author Jules Pietri - */ -class PhpFileLoader extends FileLoader -{ - /** - * Loads a PHP file. - * - * @param string $file A PHP file path - * @param string|null $type The resource type - * - * @return RouteCollection - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - $this->setCurrentDir(\dirname($path)); - - // the closure forbids access to the private scope in the included file - $loader = $this; - $load = \Closure::bind(static function ($file) use ($loader) { - return include $file; - }, null, ProtectedPhpFileLoader::class); - - $result = $load($path); - - if (\is_object($result) && \is_callable($result)) { - $collection = $this->callConfigurator($result, $path, $file); - } else { - $collection = $result; - } - - $collection->addResource(new FileResource($path)); - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'php' === $type); - } - - protected function callConfigurator(callable $result, string $path, string $file): RouteCollection - { - $collection = new RouteCollection(); - - $result(new RoutingConfigurator($collection, $this, $path, $file, $this->env)); - - return $collection; - } -} - -/** - * @internal - */ -final class ProtectedPhpFileLoader extends PhpFileLoader -{ -} diff --git a/lib/symfony/routing/Loader/XmlFileLoader.php b/lib/symfony/routing/Loader/XmlFileLoader.php deleted file mode 100644 index 220153364..000000000 --- a/lib/symfony/routing/Loader/XmlFileLoader.php +++ /dev/null @@ -1,469 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\Routing\Loader\Configurator\Traits\HostTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\LocalizedRouteTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\PrefixTrait; -use Symfony\Component\Routing\RouteCollection; - -/** - * XmlFileLoader loads XML routing files. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class XmlFileLoader extends FileLoader -{ - use HostTrait; - use LocalizedRouteTrait; - use PrefixTrait; - - public const NAMESPACE_URI = 'http://symfony.com/schema/routing'; - public const SCHEME_PATH = '/schema/routing/routing-1.0.xsd'; - - /** - * Loads an XML file. - * - * @param string $file An XML file path - * @param string|null $type The resource type - * - * @return RouteCollection - * - * @throws \InvalidArgumentException when the file cannot be loaded or when the XML cannot be - * parsed because it does not validate against the scheme - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - $xml = $this->loadFile($path); - - $collection = new RouteCollection(); - $collection->addResource(new FileResource($path)); - - // process routes and imports - foreach ($xml->documentElement->childNodes as $node) { - if (!$node instanceof \DOMElement) { - continue; - } - - $this->parseNode($collection, $node, $path, $file); - } - - return $collection; - } - - /** - * Parses a node from a loaded XML file. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - protected function parseNode(RouteCollection $collection, \DOMElement $node, string $path, string $file) - { - if (self::NAMESPACE_URI !== $node->namespaceURI) { - return; - } - - switch ($node->localName) { - case 'route': - $this->parseRoute($collection, $node, $path); - break; - case 'import': - $this->parseImport($collection, $node, $path, $file); - break; - case 'when': - if (!$this->env || $node->getAttribute('env') !== $this->env) { - break; - } - foreach ($node->childNodes as $node) { - if ($node instanceof \DOMElement) { - $this->parseNode($collection, $node, $path, $file); - } - } - break; - default: - throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "route" or "import".', $node->localName, $path)); - } - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'xml' === $type); - } - - /** - * Parses a route and adds it to the RouteCollection. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - protected function parseRoute(RouteCollection $collection, \DOMElement $node, string $path) - { - if ('' === $id = $node->getAttribute('id')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have an "id" attribute.', $path)); - } - - if ('' !== $alias = $node->getAttribute('alias')) { - $alias = $collection->addAlias($id, $alias); - - if ($deprecationInfo = $this->parseDeprecation($node, $path)) { - $alias->setDeprecated($deprecationInfo['package'], $deprecationInfo['version'], $deprecationInfo['message']); - } - - return; - } - - $schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY); - $methods = preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, \PREG_SPLIT_NO_EMPTY); - - [$defaults, $requirements, $options, $condition, $paths, /* $prefixes */, $hosts] = $this->parseConfigs($node, $path); - - if (!$paths && '' === $node->getAttribute('path')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "path" attribute or child nodes.', $path)); - } - - if ($paths && '' !== $node->getAttribute('path')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must not have both a "path" attribute and child nodes.', $path)); - } - - $routes = $this->createLocalizedRoute($collection, $id, $paths ?: $node->getAttribute('path')); - $routes->addDefaults($defaults); - $routes->addRequirements($requirements); - $routes->addOptions($options); - $routes->setSchemes($schemes); - $routes->setMethods($methods); - $routes->setCondition($condition); - - if (null !== $hosts) { - $this->addHost($routes, $hosts); - } - } - - /** - * Parses an import and adds the routes in the resource to the RouteCollection. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - protected function parseImport(RouteCollection $collection, \DOMElement $node, string $path, string $file) - { - if ('' === $resource = $node->getAttribute('resource')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "resource" attribute.', $path)); - } - - $type = $node->getAttribute('type'); - $prefix = $node->getAttribute('prefix'); - $schemes = $node->hasAttribute('schemes') ? preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY) : null; - $methods = $node->hasAttribute('methods') ? preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, \PREG_SPLIT_NO_EMPTY) : null; - $trailingSlashOnRoot = $node->hasAttribute('trailing-slash-on-root') ? XmlUtils::phpize($node->getAttribute('trailing-slash-on-root')) : true; - $namePrefix = $node->getAttribute('name-prefix') ?: null; - - [$defaults, $requirements, $options, $condition, /* $paths */, $prefixes, $hosts] = $this->parseConfigs($node, $path); - - if ('' !== $prefix && $prefixes) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must not have both a "prefix" attribute and child nodes.', $path)); - } - - $exclude = []; - foreach ($node->childNodes as $child) { - if ($child instanceof \DOMElement && $child->localName === $exclude && self::NAMESPACE_URI === $child->namespaceURI) { - $exclude[] = $child->nodeValue; - } - } - - if ($node->hasAttribute('exclude')) { - if ($exclude) { - throw new \InvalidArgumentException('You cannot use both the attribute "exclude" and tags at the same time.'); - } - $exclude = [$node->getAttribute('exclude')]; - } - - $this->setCurrentDir(\dirname($path)); - - /** @var RouteCollection[] $imported */ - $imported = $this->import($resource, '' !== $type ? $type : null, false, $file, $exclude) ?: []; - - if (!\is_array($imported)) { - $imported = [$imported]; - } - - foreach ($imported as $subCollection) { - $this->addPrefix($subCollection, $prefixes ?: $prefix, $trailingSlashOnRoot); - - if (null !== $hosts) { - $this->addHost($subCollection, $hosts); - } - - if (null !== $condition) { - $subCollection->setCondition($condition); - } - if (null !== $schemes) { - $subCollection->setSchemes($schemes); - } - if (null !== $methods) { - $subCollection->setMethods($methods); - } - if (null !== $namePrefix) { - $subCollection->addNamePrefix($namePrefix); - } - $subCollection->addDefaults($defaults); - $subCollection->addRequirements($requirements); - $subCollection->addOptions($options); - - $collection->addCollection($subCollection); - } - } - - /** - * @return \DOMDocument - * - * @throws \InvalidArgumentException When loading of XML file fails because of syntax errors - * or when the XML structure is not as expected by the scheme - - * see validate() - */ - protected function loadFile(string $file) - { - return XmlUtils::loadFile($file, __DIR__.static::SCHEME_PATH); - } - - /** - * Parses the config elements (default, requirement, option). - * - * @throws \InvalidArgumentException When the XML is invalid - */ - private function parseConfigs(\DOMElement $node, string $path): array - { - $defaults = []; - $requirements = []; - $options = []; - $condition = null; - $prefixes = []; - $paths = []; - $hosts = []; - - /** @var \DOMElement $n */ - foreach ($node->getElementsByTagNameNS(self::NAMESPACE_URI, '*') as $n) { - if ($node !== $n->parentNode) { - continue; - } - - switch ($n->localName) { - case 'path': - $paths[$n->getAttribute('locale')] = trim($n->textContent); - break; - case 'host': - $hosts[$n->getAttribute('locale')] = trim($n->textContent); - break; - case 'prefix': - $prefixes[$n->getAttribute('locale')] = trim($n->textContent); - break; - case 'default': - if ($this->isElementValueNull($n)) { - $defaults[$n->getAttribute('key')] = null; - } else { - $defaults[$n->getAttribute('key')] = $this->parseDefaultsConfig($n, $path); - } - - break; - case 'requirement': - $requirements[$n->getAttribute('key')] = trim($n->textContent); - break; - case 'option': - $options[$n->getAttribute('key')] = XmlUtils::phpize(trim($n->textContent)); - break; - case 'condition': - $condition = trim($n->textContent); - break; - default: - throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "default", "requirement", "option" or "condition".', $n->localName, $path)); - } - } - - if ($controller = $node->getAttribute('controller')) { - if (isset($defaults['_controller'])) { - $name = $node->hasAttribute('id') ? sprintf('"%s".', $node->getAttribute('id')) : sprintf('the "%s" tag.', $node->tagName); - - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" attribute and the defaults key "_controller" for ', $path).$name); - } - - $defaults['_controller'] = $controller; - } - if ($node->hasAttribute('locale')) { - $defaults['_locale'] = $node->getAttribute('locale'); - } - if ($node->hasAttribute('format')) { - $defaults['_format'] = $node->getAttribute('format'); - } - if ($node->hasAttribute('utf8')) { - $options['utf8'] = XmlUtils::phpize($node->getAttribute('utf8')); - } - if ($stateless = $node->getAttribute('stateless')) { - if (isset($defaults['_stateless'])) { - $name = $node->hasAttribute('id') ? sprintf('"%s".', $node->getAttribute('id')) : sprintf('the "%s" tag.', $node->tagName); - - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "stateless" attribute and the defaults key "_stateless" for ', $path).$name); - } - - $defaults['_stateless'] = XmlUtils::phpize($stateless); - } - - if (!$hosts) { - $hosts = $node->hasAttribute('host') ? $node->getAttribute('host') : null; - } - - return [$defaults, $requirements, $options, $condition, $paths, $prefixes, $hosts]; - } - - /** - * Parses the "default" elements. - * - * @return array|bool|float|int|string|null - */ - private function parseDefaultsConfig(\DOMElement $element, string $path) - { - if ($this->isElementValueNull($element)) { - return null; - } - - // Check for existing element nodes in the default element. There can - // only be a single element inside a default element. So this element - // (if one was found) can safely be returned. - foreach ($element->childNodes as $child) { - if (!$child instanceof \DOMElement) { - continue; - } - - if (self::NAMESPACE_URI !== $child->namespaceURI) { - continue; - } - - return $this->parseDefaultNode($child, $path); - } - - // If the default element doesn't contain a nested "bool", "int", "float", - // "string", "list", or "map" element, the element contents will be treated - // as the string value of the associated default option. - return trim($element->textContent); - } - - /** - * Recursively parses the value of a "default" element. - * - * @return array|bool|float|int|string|null - * - * @throws \InvalidArgumentException when the XML is invalid - */ - private function parseDefaultNode(\DOMElement $node, string $path) - { - if ($this->isElementValueNull($node)) { - return null; - } - - switch ($node->localName) { - case 'bool': - return 'true' === trim($node->nodeValue) || '1' === trim($node->nodeValue); - case 'int': - return (int) trim($node->nodeValue); - case 'float': - return (float) trim($node->nodeValue); - case 'string': - return trim($node->nodeValue); - case 'list': - $list = []; - - foreach ($node->childNodes as $element) { - if (!$element instanceof \DOMElement) { - continue; - } - - if (self::NAMESPACE_URI !== $element->namespaceURI) { - continue; - } - - $list[] = $this->parseDefaultNode($element, $path); - } - - return $list; - case 'map': - $map = []; - - foreach ($node->childNodes as $element) { - if (!$element instanceof \DOMElement) { - continue; - } - - if (self::NAMESPACE_URI !== $element->namespaceURI) { - continue; - } - - $map[$element->getAttribute('key')] = $this->parseDefaultNode($element, $path); - } - - return $map; - default: - throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "bool", "int", "float", "string", "list", or "map".', $node->localName, $path)); - } - } - - private function isElementValueNull(\DOMElement $element): bool - { - $namespaceUri = 'http://www.w3.org/2001/XMLSchema-instance'; - - if (!$element->hasAttributeNS($namespaceUri, 'nil')) { - return false; - } - - return 'true' === $element->getAttributeNS($namespaceUri, 'nil') || '1' === $element->getAttributeNS($namespaceUri, 'nil'); - } - - /** - * Parses the deprecation elements. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - private function parseDeprecation(\DOMElement $node, string $path): array - { - $deprecatedNode = null; - foreach ($node->childNodes as $child) { - if (!$child instanceof \DOMElement || self::NAMESPACE_URI !== $child->namespaceURI) { - continue; - } - if ('deprecated' !== $child->localName) { - throw new \InvalidArgumentException(sprintf('Invalid child element "%s" defined for alias "%s" in "%s".', $child->localName, $node->getAttribute('id'), $path)); - } - - $deprecatedNode = $child; - } - - if (null === $deprecatedNode) { - return []; - } - - if (!$deprecatedNode->hasAttribute('package')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "package" attribute.', $path)); - } - if (!$deprecatedNode->hasAttribute('version')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "version" attribute.', $path)); - } - - return [ - 'package' => $deprecatedNode->getAttribute('package'), - 'version' => $deprecatedNode->getAttribute('version'), - 'message' => trim($deprecatedNode->nodeValue), - ]; - } -} diff --git a/lib/symfony/routing/Loader/YamlFileLoader.php b/lib/symfony/routing/Loader/YamlFileLoader.php deleted file mode 100644 index ae98a314e..000000000 --- a/lib/symfony/routing/Loader/YamlFileLoader.php +++ /dev/null @@ -1,314 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\Loader\Configurator\Traits\HostTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\LocalizedRouteTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\PrefixTrait; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser as YamlParser; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlFileLoader loads Yaml routing files. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class YamlFileLoader extends FileLoader -{ - use HostTrait; - use LocalizedRouteTrait; - use PrefixTrait; - - private const AVAILABLE_KEYS = [ - 'resource', 'type', 'prefix', 'path', 'host', 'schemes', 'methods', 'defaults', 'requirements', 'options', 'condition', 'controller', 'name_prefix', 'trailing_slash_on_root', 'locale', 'format', 'utf8', 'exclude', 'stateless', - ]; - private $yamlParser; - - /** - * Loads a Yaml file. - * - * @param string $file A Yaml file path - * @param string|null $type The resource type - * - * @return RouteCollection - * - * @throws \InvalidArgumentException When a route can't be parsed because YAML is invalid - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - if (!stream_is_local($path)) { - throw new \InvalidArgumentException(sprintf('This is not a local file "%s".', $path)); - } - - if (!file_exists($path)) { - throw new \InvalidArgumentException(sprintf('File "%s" not found.', $path)); - } - - if (null === $this->yamlParser) { - $this->yamlParser = new YamlParser(); - } - - try { - $parsedConfig = $this->yamlParser->parseFile($path, Yaml::PARSE_CONSTANT); - } catch (ParseException $e) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: ', $path).$e->getMessage(), 0, $e); - } - - $collection = new RouteCollection(); - $collection->addResource(new FileResource($path)); - - // empty file - if (null === $parsedConfig) { - return $collection; - } - - // not an array - if (!\is_array($parsedConfig)) { - throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path)); - } - - foreach ($parsedConfig as $name => $config) { - if (0 === strpos($name, 'when@')) { - if (!$this->env || 'when@'.$this->env !== $name) { - continue; - } - - foreach ($config as $name => $config) { - $this->validate($config, $name.'" when "@'.$this->env, $path); - - if (isset($config['resource'])) { - $this->parseImport($collection, $config, $path, $file); - } else { - $this->parseRoute($collection, $name, $config, $path); - } - } - - continue; - } - - $this->validate($config, $name, $path); - - if (isset($config['resource'])) { - $this->parseImport($collection, $config, $path, $file); - } else { - $this->parseRoute($collection, $name, $config, $path); - } - } - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), ['yml', 'yaml'], true) && (!$type || 'yaml' === $type); - } - - /** - * Parses a route and adds it to the RouteCollection. - */ - protected function parseRoute(RouteCollection $collection, string $name, array $config, string $path) - { - if (isset($config['alias'])) { - $alias = $collection->addAlias($name, $config['alias']); - $deprecation = $config['deprecated'] ?? null; - if (null !== $deprecation) { - $alias->setDeprecated( - $deprecation['package'], - $deprecation['version'], - $deprecation['message'] ?? '' - ); - } - - return; - } - - $defaults = $config['defaults'] ?? []; - $requirements = $config['requirements'] ?? []; - $options = $config['options'] ?? []; - - foreach ($requirements as $placeholder => $requirement) { - if (\is_int($placeholder)) { - throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s"?', $placeholder, $requirement, $name, $path)); - } - } - - if (isset($config['controller'])) { - $defaults['_controller'] = $config['controller']; - } - if (isset($config['locale'])) { - $defaults['_locale'] = $config['locale']; - } - if (isset($config['format'])) { - $defaults['_format'] = $config['format']; - } - if (isset($config['utf8'])) { - $options['utf8'] = $config['utf8']; - } - if (isset($config['stateless'])) { - $defaults['_stateless'] = $config['stateless']; - } - - $routes = $this->createLocalizedRoute($collection, $name, $config['path']); - $routes->addDefaults($defaults); - $routes->addRequirements($requirements); - $routes->addOptions($options); - $routes->setSchemes($config['schemes'] ?? []); - $routes->setMethods($config['methods'] ?? []); - $routes->setCondition($config['condition'] ?? null); - - if (isset($config['host'])) { - $this->addHost($routes, $config['host']); - } - } - - /** - * Parses an import and adds the routes in the resource to the RouteCollection. - */ - protected function parseImport(RouteCollection $collection, array $config, string $path, string $file) - { - $type = $config['type'] ?? null; - $prefix = $config['prefix'] ?? ''; - $defaults = $config['defaults'] ?? []; - $requirements = $config['requirements'] ?? []; - $options = $config['options'] ?? []; - $host = $config['host'] ?? null; - $condition = $config['condition'] ?? null; - $schemes = $config['schemes'] ?? null; - $methods = $config['methods'] ?? null; - $trailingSlashOnRoot = $config['trailing_slash_on_root'] ?? true; - $namePrefix = $config['name_prefix'] ?? null; - $exclude = $config['exclude'] ?? null; - - if (isset($config['controller'])) { - $defaults['_controller'] = $config['controller']; - } - if (isset($config['locale'])) { - $defaults['_locale'] = $config['locale']; - } - if (isset($config['format'])) { - $defaults['_format'] = $config['format']; - } - if (isset($config['utf8'])) { - $options['utf8'] = $config['utf8']; - } - if (isset($config['stateless'])) { - $defaults['_stateless'] = $config['stateless']; - } - - $this->setCurrentDir(\dirname($path)); - - /** @var RouteCollection[] $imported */ - $imported = $this->import($config['resource'], $type, false, $file, $exclude) ?: []; - - if (!\is_array($imported)) { - $imported = [$imported]; - } - - foreach ($imported as $subCollection) { - $this->addPrefix($subCollection, $prefix, $trailingSlashOnRoot); - - if (null !== $host) { - $this->addHost($subCollection, $host); - } - if (null !== $condition) { - $subCollection->setCondition($condition); - } - if (null !== $schemes) { - $subCollection->setSchemes($schemes); - } - if (null !== $methods) { - $subCollection->setMethods($methods); - } - if (null !== $namePrefix) { - $subCollection->addNamePrefix($namePrefix); - } - $subCollection->addDefaults($defaults); - $subCollection->addRequirements($requirements); - $subCollection->addOptions($options); - - $collection->addCollection($subCollection); - } - } - - /** - * Validates the route configuration. - * - * @param array $config A resource config - * @param string $name The config key - * @param string $path The loaded file path - * - * @throws \InvalidArgumentException If one of the provided config keys is not supported, - * something is missing or the combination is nonsense - */ - protected function validate($config, string $name, string $path) - { - if (!\is_array($config)) { - throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path)); - } - if (isset($config['alias'])) { - $this->validateAlias($config, $name, $path); - - return; - } - if ($extraKeys = array_diff(array_keys($config), self::AVAILABLE_KEYS)) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".', $path, $name, implode('", "', $extraKeys), implode('", "', self::AVAILABLE_KEYS))); - } - if (isset($config['resource']) && isset($config['path'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "resource" key and the "path" key for "%s". Choose between an import and a route definition.', $path, $name)); - } - if (!isset($config['resource']) && isset($config['type'])) { - throw new \InvalidArgumentException(sprintf('The "type" key for the route definition "%s" in "%s" is unsupported. It is only available for imports in combination with the "resource" key.', $name, $path)); - } - if (!isset($config['resource']) && !isset($config['path'])) { - throw new \InvalidArgumentException(sprintf('You must define a "path" for the route "%s" in file "%s".', $name, $path)); - } - if (isset($config['controller']) && isset($config['defaults']['_controller'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" key and the defaults key "_controller" for "%s".', $path, $name)); - } - if (isset($config['stateless']) && isset($config['defaults']['_stateless'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "stateless" key and the defaults key "_stateless" for "%s".', $path, $name)); - } - } - - /** - * @throws \InvalidArgumentException If one of the provided config keys is not supported, - * something is missing or the combination is nonsense - */ - private function validateAlias(array $config, string $name, string $path): void - { - foreach ($config as $key => $value) { - if (!\in_array($key, ['alias', 'deprecated'], true)) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify other keys than "alias" and "deprecated" for "%s".', $path, $name)); - } - - if ('deprecated' === $key) { - if (!isset($value['package'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must specify the attribute "package" of the "deprecated" option for "%s".', $path, $name)); - } - - if (!isset($value['version'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must specify the attribute "version" of the "deprecated" option for "%s".', $path, $name)); - } - } - } - } -} diff --git a/lib/symfony/routing/Loader/schema/routing/routing-1.0.xsd b/lib/symfony/routing/Loader/schema/routing/routing-1.0.xsd deleted file mode 100644 index 66c40a0d8..000000000 --- a/lib/symfony/routing/Loader/schema/routing/routing-1.0.xsd +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/symfony/routing/Matcher/CompiledUrlMatcher.php b/lib/symfony/routing/Matcher/CompiledUrlMatcher.php deleted file mode 100644 index ae13fd701..000000000 --- a/lib/symfony/routing/Matcher/CompiledUrlMatcher.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherTrait; -use Symfony\Component\Routing\RequestContext; - -/** - * Matches URLs based on rules dumped by CompiledUrlMatcherDumper. - * - * @author Nicolas Grekas - */ -class CompiledUrlMatcher extends UrlMatcher -{ - use CompiledUrlMatcherTrait; - - public function __construct(array $compiledRoutes, RequestContext $context) - { - $this->context = $context; - [$this->matchHost, $this->staticRoutes, $this->regexpList, $this->dynamicRoutes, $this->checkCondition] = $compiledRoutes; - } -} diff --git a/lib/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php b/lib/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php deleted file mode 100644 index 123130ed4..000000000 --- a/lib/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php +++ /dev/null @@ -1,501 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * CompiledUrlMatcherDumper creates PHP arrays to be used with CompiledUrlMatcher. - * - * @author Fabien Potencier - * @author Tobias Schultze - * @author Arnaud Le Blanc - * @author Nicolas Grekas - */ -class CompiledUrlMatcherDumper extends MatcherDumper -{ - private $expressionLanguage; - private $signalingException; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private $expressionLanguageProviders = []; - - /** - * {@inheritdoc} - */ - public function dump(array $options = []) - { - return <<generateCompiledRoutes()}]; - -EOF; - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * Generates the arrays for CompiledUrlMatcher's constructor. - */ - public function getCompiledRoutes(bool $forDump = false): array - { - // Group hosts by same-suffix, re-order when possible - $matchHost = false; - $routes = new StaticPrefixCollection(); - foreach ($this->getRoutes()->all() as $name => $route) { - if ($host = $route->getHost()) { - $matchHost = true; - $host = '/'.strtr(strrev($host), '}.{', '(/)'); - } - - $routes->addRoute($host ?: '/(.*)', [$name, $route]); - } - - if ($matchHost) { - $compiledRoutes = [true]; - $routes = $routes->populateCollection(new RouteCollection()); - } else { - $compiledRoutes = [false]; - $routes = $this->getRoutes(); - } - - [$staticRoutes, $dynamicRoutes] = $this->groupStaticRoutes($routes); - - $conditions = [null]; - $compiledRoutes[] = $this->compileStaticRoutes($staticRoutes, $conditions); - $chunkLimit = \count($dynamicRoutes); - - while (true) { - try { - $this->signalingException = new \RuntimeException('Compilation failed: regular expression is too large'); - $compiledRoutes = array_merge($compiledRoutes, $this->compileDynamicRoutes($dynamicRoutes, $matchHost, $chunkLimit, $conditions)); - - break; - } catch (\Exception $e) { - if (1 < $chunkLimit && $this->signalingException === $e) { - $chunkLimit = 1 + ($chunkLimit >> 1); - continue; - } - throw $e; - } - } - - if ($forDump) { - $compiledRoutes[2] = $compiledRoutes[4]; - } - unset($conditions[0]); - - if ($conditions) { - foreach ($conditions as $expression => $condition) { - $conditions[$expression] = "case {$condition}: return {$expression};"; - } - - $checkConditionCode = <<indent(implode("\n", $conditions), 3)} - } - } -EOF; - $compiledRoutes[4] = $forDump ? $checkConditionCode.",\n" : eval('return '.$checkConditionCode.';'); - } else { - $compiledRoutes[4] = $forDump ? " null, // \$checkCondition\n" : null; - } - - return $compiledRoutes; - } - - private function generateCompiledRoutes(): string - { - [$matchHost, $staticRoutes, $regexpCode, $dynamicRoutes, $checkConditionCode] = $this->getCompiledRoutes(true); - - $code = self::export($matchHost).', // $matchHost'."\n"; - - $code .= '[ // $staticRoutes'."\n"; - foreach ($staticRoutes as $path => $routes) { - $code .= sprintf(" %s => [\n", self::export($path)); - foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); - } - $code .= " ],\n"; - } - $code .= "],\n"; - - $code .= sprintf("[ // \$regexpList%s\n],\n", $regexpCode); - - $code .= '[ // $dynamicRoutes'."\n"; - foreach ($dynamicRoutes as $path => $routes) { - $code .= sprintf(" %s => [\n", self::export($path)); - foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); - } - $code .= " ],\n"; - } - $code .= "],\n"; - $code = preg_replace('/ => \[\n (\[.+?),\n \],/', ' => [$1],', $code); - - return $this->indent($code, 1).$checkConditionCode; - } - - /** - * Splits static routes from dynamic routes, so that they can be matched first, using a simple switch. - */ - private function groupStaticRoutes(RouteCollection $collection): array - { - $staticRoutes = $dynamicRegex = []; - $dynamicRoutes = new RouteCollection(); - - foreach ($collection->all() as $name => $route) { - $compiledRoute = $route->compile(); - $staticPrefix = rtrim($compiledRoute->getStaticPrefix(), '/'); - $hostRegex = $compiledRoute->getHostRegex(); - $regex = $compiledRoute->getRegex(); - if ($hasTrailingSlash = '/' !== $route->getPath()) { - $pos = strrpos($regex, '$'); - $hasTrailingSlash = '/' === $regex[$pos - 1]; - $regex = substr_replace($regex, '/?$', $pos - $hasTrailingSlash, 1 + $hasTrailingSlash); - } - - if (!$compiledRoute->getPathVariables()) { - $host = !$compiledRoute->getHostVariables() ? $route->getHost() : ''; - $url = $route->getPath(); - if ($hasTrailingSlash) { - $url = substr($url, 0, -1); - } - foreach ($dynamicRegex as [$hostRx, $rx, $prefix]) { - if (('' === $prefix || str_starts_with($url, $prefix)) && (preg_match($rx, $url) || preg_match($rx, $url.'/')) && (!$host || !$hostRx || preg_match($hostRx, $host))) { - $dynamicRegex[] = [$hostRegex, $regex, $staticPrefix]; - $dynamicRoutes->add($name, $route); - continue 2; - } - } - - $staticRoutes[$url][$name] = [$route, $hasTrailingSlash]; - } else { - $dynamicRegex[] = [$hostRegex, $regex, $staticPrefix]; - $dynamicRoutes->add($name, $route); - } - } - - return [$staticRoutes, $dynamicRoutes]; - } - - /** - * Compiles static routes in a switch statement. - * - * Condition-less paths are put in a static array in the switch's default, with generic matching logic. - * Paths that can match two or more routes, or have user-specified conditions are put in separate switch's cases. - * - * @throws \LogicException - */ - private function compileStaticRoutes(array $staticRoutes, array &$conditions): array - { - if (!$staticRoutes) { - return []; - } - $compiledRoutes = []; - - foreach ($staticRoutes as $url => $routes) { - $compiledRoutes[$url] = []; - foreach ($routes as $name => [$route, $hasTrailingSlash]) { - $compiledRoutes[$url][] = $this->compileRoute($route, $name, (!$route->compile()->getHostVariables() ? $route->getHost() : $route->compile()->getHostRegex()) ?: null, $hasTrailingSlash, false, $conditions); - } - } - - return $compiledRoutes; - } - - /** - * Compiles a regular expression followed by a switch statement to match dynamic routes. - * - * The regular expression matches both the host and the pathinfo at the same time. For stellar performance, - * it is built as a tree of patterns, with re-ordering logic to group same-prefix routes together when possible. - * - * Patterns are named so that we know which one matched (https://pcre.org/current/doc/html/pcre2syntax.html#SEC23). - * This name is used to "switch" to the additional logic required to match the final route. - * - * Condition-less paths are put in a static array in the switch's default, with generic matching logic. - * Paths that can match two or more routes, or have user-specified conditions are put in separate switch's cases. - * - * Last but not least: - * - Because it is not possible to mix unicode/non-unicode patterns in a single regexp, several of them can be generated. - * - The same regexp can be used several times when the logic in the switch rejects the match. When this happens, the - * matching-but-failing subpattern is excluded by replacing its name by "(*F)", which forces a failure-to-match. - * To ease this backlisting operation, the name of subpatterns is also the string offset where the replacement should occur. - */ - private function compileDynamicRoutes(RouteCollection $collection, bool $matchHost, int $chunkLimit, array &$conditions): array - { - if (!$collection->all()) { - return [[], [], '']; - } - $regexpList = []; - $code = ''; - $state = (object) [ - 'regexMark' => 0, - 'regex' => [], - 'routes' => [], - 'mark' => 0, - 'markTail' => 0, - 'hostVars' => [], - 'vars' => [], - ]; - $state->getVars = static function ($m) use ($state) { - if ('_route' === $m[1]) { - return '?:'; - } - - $state->vars[] = $m[1]; - - return ''; - }; - - $chunkSize = 0; - $prev = null; - $perModifiers = []; - foreach ($collection->all() as $name => $route) { - preg_match('#[a-zA-Z]*$#', $route->compile()->getRegex(), $rx); - if ($chunkLimit < ++$chunkSize || $prev !== $rx[0] && $route->compile()->getPathVariables()) { - $chunkSize = 1; - $routes = new RouteCollection(); - $perModifiers[] = [$rx[0], $routes]; - $prev = $rx[0]; - } - $routes->add($name, $route); - } - - foreach ($perModifiers as [$modifiers, $routes]) { - $prev = false; - $perHost = []; - foreach ($routes->all() as $name => $route) { - $regex = $route->compile()->getHostRegex(); - if ($prev !== $regex) { - $routes = new RouteCollection(); - $perHost[] = [$regex, $routes]; - $prev = $regex; - } - $routes->add($name, $route); - } - $prev = false; - $rx = '{^(?'; - $code .= "\n {$state->mark} => ".self::export($rx); - $startingMark = $state->mark; - $state->mark += \strlen($rx); - $state->regex = $rx; - - foreach ($perHost as [$hostRegex, $routes]) { - if ($matchHost) { - if ($hostRegex) { - preg_match('#^.\^(.*)\$.[a-zA-Z]*$#', $hostRegex, $rx); - $state->vars = []; - $hostRegex = '(?i:'.preg_replace_callback('#\?P<([^>]++)>#', $state->getVars, $rx[1]).')\.'; - $state->hostVars = $state->vars; - } else { - $hostRegex = '(?:(?:[^./]*+\.)++)'; - $state->hostVars = []; - } - $state->mark += \strlen($rx = ($prev ? ')' : '')."|{$hostRegex}(?"); - $code .= "\n .".self::export($rx); - $state->regex .= $rx; - $prev = true; - } - - $tree = new StaticPrefixCollection(); - foreach ($routes->all() as $name => $route) { - preg_match('#^.\^(.*)\$.[a-zA-Z]*$#', $route->compile()->getRegex(), $rx); - - $state->vars = []; - $regex = preg_replace_callback('#\?P<([^>]++)>#', $state->getVars, $rx[1]); - if ($hasTrailingSlash = '/' !== $regex && '/' === $regex[-1]) { - $regex = substr($regex, 0, -1); - } - $hasTrailingVar = (bool) preg_match('#\{\w+\}/?$#', $route->getPath()); - - $tree->addRoute($regex, [$name, $regex, $state->vars, $route, $hasTrailingSlash, $hasTrailingVar]); - } - - $code .= $this->compileStaticPrefixCollection($tree, $state, 0, $conditions); - } - if ($matchHost) { - $code .= "\n .')'"; - $state->regex .= ')'; - } - $rx = ")/?$}{$modifiers}"; - $code .= "\n .'{$rx}',"; - $state->regex .= $rx; - $state->markTail = 0; - - // if the regex is too large, throw a signaling exception to recompute with smaller chunk size - set_error_handler(function ($type, $message) { throw str_contains($message, $this->signalingException->getMessage()) ? $this->signalingException : new \ErrorException($message); }); - try { - preg_match($state->regex, ''); - } finally { - restore_error_handler(); - } - - $regexpList[$startingMark] = $state->regex; - } - - $state->routes[$state->mark][] = [null, null, null, null, false, false, 0]; - unset($state->getVars); - - return [$regexpList, $state->routes, $code]; - } - - /** - * Compiles a regexp tree of subpatterns that matches nested same-prefix routes. - * - * @param \stdClass $state A simple state object that keeps track of the progress of the compilation, - * and gathers the generated switch's "case" and "default" statements - */ - private function compileStaticPrefixCollection(StaticPrefixCollection $tree, \stdClass $state, int $prefixLen, array &$conditions): string - { - $code = ''; - $prevRegex = null; - $routes = $tree->getRoutes(); - - foreach ($routes as $i => $route) { - if ($route instanceof StaticPrefixCollection) { - $prevRegex = null; - $prefix = substr($route->getPrefix(), $prefixLen); - $state->mark += \strlen($rx = "|{$prefix}(?"); - $code .= "\n .".self::export($rx); - $state->regex .= $rx; - $code .= $this->indent($this->compileStaticPrefixCollection($route, $state, $prefixLen + \strlen($prefix), $conditions)); - $code .= "\n .')'"; - $state->regex .= ')'; - ++$state->markTail; - continue; - } - - [$name, $regex, $vars, $route, $hasTrailingSlash, $hasTrailingVar] = $route; - $compiledRoute = $route->compile(); - $vars = array_merge($state->hostVars, $vars); - - if ($compiledRoute->getRegex() === $prevRegex) { - $state->routes[$state->mark][] = $this->compileRoute($route, $name, $vars, $hasTrailingSlash, $hasTrailingVar, $conditions); - continue; - } - - $state->mark += 3 + $state->markTail + \strlen($regex) - $prefixLen; - $state->markTail = 2 + \strlen($state->mark); - $rx = sprintf('|%s(*:%s)', substr($regex, $prefixLen), $state->mark); - $code .= "\n .".self::export($rx); - $state->regex .= $rx; - - $prevRegex = $compiledRoute->getRegex(); - $state->routes[$state->mark] = [$this->compileRoute($route, $name, $vars, $hasTrailingSlash, $hasTrailingVar, $conditions)]; - } - - return $code; - } - - /** - * Compiles a single Route to PHP code used to match it against the path info. - */ - private function compileRoute(Route $route, string $name, $vars, bool $hasTrailingSlash, bool $hasTrailingVar, array &$conditions): array - { - $defaults = $route->getDefaults(); - - if (isset($defaults['_canonical_route'])) { - $name = $defaults['_canonical_route']; - unset($defaults['_canonical_route']); - } - - if ($condition = $route->getCondition()) { - $condition = $this->getExpressionLanguage()->compile($condition, ['context', 'request']); - $condition = $conditions[$condition] ?? $conditions[$condition] = (str_contains($condition, '$request') ? 1 : -1) * \count($conditions); - } else { - $condition = null; - } - - return [ - ['_route' => $name] + $defaults, - $vars, - array_flip($route->getMethods()) ?: null, - array_flip($route->getSchemes()) ?: null, - $hasTrailingSlash, - $hasTrailingVar, - $condition, - ]; - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (null === $this->expressionLanguage) { - if (!class_exists(ExpressionLanguage::class)) { - throw new \LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); - } - $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); - } - - return $this->expressionLanguage; - } - - private function indent(string $code, int $level = 1): string - { - return preg_replace('/^./m', str_repeat(' ', $level).'$0', $code); - } - - /** - * @internal - */ - public static function export($value): string - { - if (null === $value) { - return 'null'; - } - if (!\is_array($value)) { - if (\is_object($value)) { - throw new \InvalidArgumentException('Symfony\Component\Routing\Route cannot contain objects.'); - } - - return str_replace("\n", '\'."\n".\'', var_export($value, true)); - } - if (!$value) { - return '[]'; - } - - $i = 0; - $export = '['; - - foreach ($value as $k => $v) { - if ($i === $k) { - ++$i; - } else { - $export .= self::export($k).' => '; - - if (\is_int($k) && $i < $k) { - $i = 1 + $k; - } - } - - $export .= self::export($v).', '; - } - - return substr_replace($export, ']', -2); - } -} diff --git a/lib/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php b/lib/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php deleted file mode 100644 index bdb7ba3d0..000000000 --- a/lib/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; -use Symfony\Component\Routing\RequestContext; - -/** - * @author Nicolas Grekas - * - * @internal - * - * @property RequestContext $context - */ -trait CompiledUrlMatcherTrait -{ - private $matchHost = false; - private $staticRoutes = []; - private $regexpList = []; - private $dynamicRoutes = []; - - /** - * @var callable|null - */ - private $checkCondition; - - public function match(string $pathinfo): array - { - $allow = $allowSchemes = []; - if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) { - return $ret; - } - if ($allow) { - throw new MethodNotAllowedException(array_keys($allow)); - } - if (!$this instanceof RedirectableUrlMatcherInterface) { - throw new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); - } - if (!\in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) { - // no-op - } elseif ($allowSchemes) { - redirect_scheme: - $scheme = $this->context->getScheme(); - $this->context->setScheme(key($allowSchemes)); - try { - if ($ret = $this->doMatch($pathinfo)) { - return $this->redirect($pathinfo, $ret['_route'], $this->context->getScheme()) + $ret; - } - } finally { - $this->context->setScheme($scheme); - } - } elseif ('/' !== $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/') { - $pathinfo = $trimmedPathinfo === $pathinfo ? $pathinfo.'/' : $trimmedPathinfo; - if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) { - return $this->redirect($pathinfo, $ret['_route']) + $ret; - } - if ($allowSchemes) { - goto redirect_scheme; - } - } - - throw new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); - } - - private function doMatch(string $pathinfo, array &$allow = [], array &$allowSchemes = []): array - { - $allow = $allowSchemes = []; - $pathinfo = rawurldecode($pathinfo) ?: '/'; - $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/'; - $context = $this->context; - $requestMethod = $canonicalMethod = $context->getMethod(); - - if ($this->matchHost) { - $host = strtolower($context->getHost()); - } - - if ('HEAD' === $requestMethod) { - $canonicalMethod = 'GET'; - } - $supportsRedirections = 'GET' === $canonicalMethod && $this instanceof RedirectableUrlMatcherInterface; - - foreach ($this->staticRoutes[$trimmedPathinfo] ?? [] as [$ret, $requiredHost, $requiredMethods, $requiredSchemes, $hasTrailingSlash, , $condition]) { - if ($condition && !($this->checkCondition)($condition, $context, 0 < $condition ? $request ?? $request = $this->request ?: $this->createRequest($pathinfo) : null)) { - continue; - } - - if ($requiredHost) { - if ('{' !== $requiredHost[0] ? $requiredHost !== $host : !preg_match($requiredHost, $host, $hostMatches)) { - continue; - } - if ('{' === $requiredHost[0] && $hostMatches) { - $hostMatches['_route'] = $ret['_route']; - $ret = $this->mergeDefaults($hostMatches, $ret); - } - } - - if ('/' !== $pathinfo && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsRedirections && (!$requiredMethods || isset($requiredMethods['GET']))) { - return $allow = $allowSchemes = []; - } - continue; - } - - $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]); - if ($hasRequiredScheme && $requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) { - $allow += $requiredMethods; - continue; - } - - if (!$hasRequiredScheme) { - $allowSchemes += $requiredSchemes; - continue; - } - - return $ret; - } - - $matchedPathinfo = $this->matchHost ? $host.'.'.$pathinfo : $pathinfo; - - foreach ($this->regexpList as $offset => $regex) { - while (preg_match($regex, $matchedPathinfo, $matches)) { - foreach ($this->dynamicRoutes[$m = (int) $matches['MARK']] as [$ret, $vars, $requiredMethods, $requiredSchemes, $hasTrailingSlash, $hasTrailingVar, $condition]) { - if (null !== $condition) { - if (0 === $condition) { // marks the last route in the regexp - continue 3; - } - if (!($this->checkCondition)($condition, $context, 0 < $condition ? $request ?? $request = $this->request ?: $this->createRequest($pathinfo) : null)) { - continue; - } - } - - $hasTrailingVar = $trimmedPathinfo !== $pathinfo && $hasTrailingVar; - - if ($hasTrailingVar && ($hasTrailingSlash || (null === $n = $matches[\count($vars)] ?? null) || '/' !== ($n[-1] ?? '/')) && preg_match($regex, $this->matchHost ? $host.'.'.$trimmedPathinfo : $trimmedPathinfo, $n) && $m === (int) $n['MARK']) { - if ($hasTrailingSlash) { - $matches = $n; - } else { - $hasTrailingVar = false; - } - } - - if ('/' !== $pathinfo && !$hasTrailingVar && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsRedirections && (!$requiredMethods || isset($requiredMethods['GET']))) { - return $allow = $allowSchemes = []; - } - continue; - } - - foreach ($vars as $i => $v) { - if (isset($matches[1 + $i])) { - $ret[$v] = $matches[1 + $i]; - } - } - - if ($requiredSchemes && !isset($requiredSchemes[$context->getScheme()])) { - $allowSchemes += $requiredSchemes; - continue; - } - - if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) { - $allow += $requiredMethods; - continue; - } - - return $ret; - } - - $regex = substr_replace($regex, 'F', $m - $offset, 1 + \strlen($m)); - $offset += \strlen($m); - } - } - - if ('/' === $pathinfo && !$allow && !$allowSchemes) { - throw new NoConfigurationException(); - } - - return []; - } -} diff --git a/lib/symfony/routing/Matcher/Dumper/MatcherDumper.php b/lib/symfony/routing/Matcher/Dumper/MatcherDumper.php deleted file mode 100644 index ea51ab406..000000000 --- a/lib/symfony/routing/Matcher/Dumper/MatcherDumper.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * MatcherDumper is the abstract class for all built-in matcher dumpers. - * - * @author Fabien Potencier - */ -abstract class MatcherDumper implements MatcherDumperInterface -{ - private $routes; - - public function __construct(RouteCollection $routes) - { - $this->routes = $routes; - } - - /** - * {@inheritdoc} - */ - public function getRoutes() - { - return $this->routes; - } -} diff --git a/lib/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php b/lib/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php deleted file mode 100644 index 8e33802d3..000000000 --- a/lib/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * MatcherDumperInterface is the interface that all matcher dumper classes must implement. - * - * @author Fabien Potencier - */ -interface MatcherDumperInterface -{ - /** - * Dumps a set of routes to a string representation of executable code - * that can then be used to match a request against these routes. - * - * @return string - */ - public function dump(array $options = []); - - /** - * Gets the routes to dump. - * - * @return RouteCollection - */ - public function getRoutes(); -} diff --git a/lib/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php b/lib/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php deleted file mode 100644 index 97bd692a5..000000000 --- a/lib/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php +++ /dev/null @@ -1,205 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * Prefix tree of routes preserving routes order. - * - * @author Frank de Jonge - * @author Nicolas Grekas - * - * @internal - */ -class StaticPrefixCollection -{ - private $prefix; - - /** - * @var string[] - */ - private $staticPrefixes = []; - - /** - * @var string[] - */ - private $prefixes = []; - - /** - * @var array[]|self[] - */ - private $items = []; - - public function __construct(string $prefix = '/') - { - $this->prefix = $prefix; - } - - public function getPrefix(): string - { - return $this->prefix; - } - - /** - * @return array[]|self[] - */ - public function getRoutes(): array - { - return $this->items; - } - - /** - * Adds a route to a group. - * - * @param array|self $route - */ - public function addRoute(string $prefix, $route) - { - [$prefix, $staticPrefix] = $this->getCommonPrefix($prefix, $prefix); - - for ($i = \count($this->items) - 1; 0 <= $i; --$i) { - $item = $this->items[$i]; - - [$commonPrefix, $commonStaticPrefix] = $this->getCommonPrefix($prefix, $this->prefixes[$i]); - - if ($this->prefix === $commonPrefix) { - // the new route and a previous one have no common prefix, let's see if they are exclusive to each others - - if ($this->prefix !== $staticPrefix && $this->prefix !== $this->staticPrefixes[$i]) { - // the new route and the previous one have exclusive static prefixes - continue; - } - - if ($this->prefix === $staticPrefix && $this->prefix === $this->staticPrefixes[$i]) { - // the new route and the previous one have no static prefix - break; - } - - if ($this->prefixes[$i] !== $this->staticPrefixes[$i] && $this->prefix === $this->staticPrefixes[$i]) { - // the previous route is non-static and has no static prefix - break; - } - - if ($prefix !== $staticPrefix && $this->prefix === $staticPrefix) { - // the new route is non-static and has no static prefix - break; - } - - continue; - } - - if ($item instanceof self && $this->prefixes[$i] === $commonPrefix) { - // the new route is a child of a previous one, let's nest it - $item->addRoute($prefix, $route); - } else { - // the new route and a previous one have a common prefix, let's merge them - $child = new self($commonPrefix); - [$child->prefixes[0], $child->staticPrefixes[0]] = $child->getCommonPrefix($this->prefixes[$i], $this->prefixes[$i]); - [$child->prefixes[1], $child->staticPrefixes[1]] = $child->getCommonPrefix($prefix, $prefix); - $child->items = [$this->items[$i], $route]; - - $this->staticPrefixes[$i] = $commonStaticPrefix; - $this->prefixes[$i] = $commonPrefix; - $this->items[$i] = $child; - } - - return; - } - - // No optimised case was found, in this case we simple add the route for possible - // grouping when new routes are added. - $this->staticPrefixes[] = $staticPrefix; - $this->prefixes[] = $prefix; - $this->items[] = $route; - } - - /** - * Linearizes back a set of nested routes into a collection. - */ - public function populateCollection(RouteCollection $routes): RouteCollection - { - foreach ($this->items as $route) { - if ($route instanceof self) { - $route->populateCollection($routes); - } else { - $routes->add(...$route); - } - } - - return $routes; - } - - /** - * Gets the full and static common prefixes between two route patterns. - * - * The static prefix stops at last at the first opening bracket. - */ - private function getCommonPrefix(string $prefix, string $anotherPrefix): array - { - $baseLength = \strlen($this->prefix); - $end = min(\strlen($prefix), \strlen($anotherPrefix)); - $staticLength = null; - set_error_handler([__CLASS__, 'handleError']); - - try { - for ($i = $baseLength; $i < $end && $prefix[$i] === $anotherPrefix[$i]; ++$i) { - if ('(' === $prefix[$i]) { - $staticLength = $staticLength ?? $i; - for ($j = 1 + $i, $n = 1; $j < $end && 0 < $n; ++$j) { - if ($prefix[$j] !== $anotherPrefix[$j]) { - break 2; - } - if ('(' === $prefix[$j]) { - ++$n; - } elseif (')' === $prefix[$j]) { - --$n; - } elseif ('\\' === $prefix[$j] && (++$j === $end || $prefix[$j] !== $anotherPrefix[$j])) { - --$j; - break; - } - } - if (0 < $n) { - break; - } - if (('?' === ($prefix[$j] ?? '') || '?' === ($anotherPrefix[$j] ?? '')) && ($prefix[$j] ?? '') !== ($anotherPrefix[$j] ?? '')) { - break; - } - $subPattern = substr($prefix, $i, $j - $i); - if ($prefix !== $anotherPrefix && !preg_match('/^\(\[[^\]]++\]\+\+\)$/', $subPattern) && !preg_match('{(?> 6) && preg_match('//u', $prefix.' '.$anotherPrefix)) { - do { - // Prevent cutting in the middle of an UTF-8 characters - --$i; - } while (0b10 === (\ord($prefix[$i]) >> 6)); - } - - return [substr($prefix, 0, $i), substr($prefix, 0, $staticLength ?? $i)]; - } - - public static function handleError(int $type, string $msg) - { - return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length'); - } -} diff --git a/lib/symfony/routing/Matcher/ExpressionLanguageProvider.php b/lib/symfony/routing/Matcher/ExpressionLanguageProvider.php deleted file mode 100644 index 96bb7babf..000000000 --- a/lib/symfony/routing/Matcher/ExpressionLanguageProvider.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\ExpressionLanguage\ExpressionFunction; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Contracts\Service\ServiceProviderInterface; - -/** - * Exposes functions defined in the request context to route conditions. - * - * @author Ahmed TAILOULOUTE - */ -class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface -{ - private $functions; - - public function __construct(ServiceProviderInterface $functions) - { - $this->functions = $functions; - } - - /** - * {@inheritdoc} - */ - public function getFunctions() - { - $functions = []; - - foreach ($this->functions->getProvidedServices() as $function => $type) { - $functions[] = new ExpressionFunction( - $function, - static function (...$args) use ($function) { - return sprintf('($context->getParameter(\'_functions\')->get(%s)(%s))', var_export($function, true), implode(', ', $args)); - }, - function ($values, ...$args) use ($function) { - return $values['context']->getParameter('_functions')->get($function)(...$args); - } - ); - } - - return $functions; - } - - public function get(string $function): callable - { - return $this->functions->get($function); - } -} diff --git a/lib/symfony/routing/Matcher/RedirectableUrlMatcher.php b/lib/symfony/routing/Matcher/RedirectableUrlMatcher.php deleted file mode 100644 index 3cd7c81a6..000000000 --- a/lib/symfony/routing/Matcher/RedirectableUrlMatcher.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\Routing\Exception\ExceptionInterface; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; - -/** - * @author Fabien Potencier - */ -abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface -{ - /** - * {@inheritdoc} - */ - public function match(string $pathinfo) - { - try { - return parent::match($pathinfo); - } catch (ResourceNotFoundException $e) { - if (!\in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) { - throw $e; - } - - if ($this->allowSchemes) { - redirect_scheme: - $scheme = $this->context->getScheme(); - $this->context->setScheme(current($this->allowSchemes)); - try { - $ret = parent::match($pathinfo); - - return $this->redirect($pathinfo, $ret['_route'] ?? null, $this->context->getScheme()) + $ret; - } catch (ExceptionInterface $e2) { - throw $e; - } finally { - $this->context->setScheme($scheme); - } - } elseif ('/' === $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/') { - throw $e; - } else { - try { - $pathinfo = $trimmedPathinfo === $pathinfo ? $pathinfo.'/' : $trimmedPathinfo; - $ret = parent::match($pathinfo); - - return $this->redirect($pathinfo, $ret['_route'] ?? null) + $ret; - } catch (ExceptionInterface $e2) { - if ($this->allowSchemes) { - goto redirect_scheme; - } - throw $e; - } - } - } - } -} diff --git a/lib/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php b/lib/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php deleted file mode 100644 index d07f42093..000000000 --- a/lib/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -/** - * RedirectableUrlMatcherInterface knows how to redirect the user. - * - * @author Fabien Potencier - */ -interface RedirectableUrlMatcherInterface -{ - /** - * Redirects the user to another URL and returns the parameters for the redirection. - * - * @param string $path The path info to redirect to - * @param string $route The route name that matched - * @param string|null $scheme The URL scheme (null to keep the current one) - * - * @return array - */ - public function redirect(string $path, string $route, string $scheme = null); -} diff --git a/lib/symfony/routing/Matcher/RequestMatcherInterface.php b/lib/symfony/routing/Matcher/RequestMatcherInterface.php deleted file mode 100644 index c05016e82..000000000 --- a/lib/symfony/routing/Matcher/RequestMatcherInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; - -/** - * RequestMatcherInterface is the interface that all request matcher classes must implement. - * - * @author Fabien Potencier - */ -interface RequestMatcherInterface -{ - /** - * Tries to match a request with a set of routes. - * - * If the matcher cannot find information, it must throw one of the exceptions documented - * below. - * - * @return array - * - * @throws NoConfigurationException If no routing configuration could be found - * @throws ResourceNotFoundException If no matching resource could be found - * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed - */ - public function matchRequest(Request $request); -} diff --git a/lib/symfony/routing/Matcher/TraceableUrlMatcher.php b/lib/symfony/routing/Matcher/TraceableUrlMatcher.php deleted file mode 100644 index 9e8c4c42d..000000000 --- a/lib/symfony/routing/Matcher/TraceableUrlMatcher.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\ExceptionInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * TraceableUrlMatcher helps debug path info matching by tracing the match. - * - * @author Fabien Potencier - */ -class TraceableUrlMatcher extends UrlMatcher -{ - public const ROUTE_DOES_NOT_MATCH = 0; - public const ROUTE_ALMOST_MATCHES = 1; - public const ROUTE_MATCHES = 2; - - protected $traces; - - public function getTraces(string $pathinfo) - { - $this->traces = []; - - try { - $this->match($pathinfo); - } catch (ExceptionInterface $e) { - } - - return $this->traces; - } - - public function getTracesForRequest(Request $request) - { - $this->request = $request; - $traces = $this->getTraces($request->getPathInfo()); - $this->request = null; - - return $traces; - } - - protected function matchCollection(string $pathinfo, RouteCollection $routes) - { - // HEAD and GET are equivalent as per RFC - if ('HEAD' === $method = $this->context->getMethod()) { - $method = 'GET'; - } - $supportsTrailingSlash = 'GET' === $method && $this instanceof RedirectableUrlMatcherInterface; - $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/'; - - foreach ($routes as $name => $route) { - $compiledRoute = $route->compile(); - $staticPrefix = rtrim($compiledRoute->getStaticPrefix(), '/'); - $requiredMethods = $route->getMethods(); - - // check the static prefix of the URL first. Only use the more expensive preg_match when it matches - if ('' !== $staticPrefix && !str_starts_with($trimmedPathinfo, $staticPrefix)) { - $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); - continue; - } - $regex = $compiledRoute->getRegex(); - - $pos = strrpos($regex, '$'); - $hasTrailingSlash = '/' === $regex[$pos - 1]; - $regex = substr_replace($regex, '/?$', $pos - $hasTrailingSlash, 1 + $hasTrailingSlash); - - if (!preg_match($regex, $pathinfo, $matches)) { - // does it match without any requirements? - $r = new Route($route->getPath(), $route->getDefaults(), [], $route->getOptions()); - $cr = $r->compile(); - if (!preg_match($cr->getRegex(), $pathinfo)) { - $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); - - continue; - } - - foreach ($route->getRequirements() as $n => $regex) { - $r = new Route($route->getPath(), $route->getDefaults(), [$n => $regex], $route->getOptions()); - $cr = $r->compile(); - - if (\in_array($n, $cr->getVariables()) && !preg_match($cr->getRegex(), $pathinfo)) { - $this->addTrace(sprintf('Requirement for "%s" does not match (%s)', $n, $regex), self::ROUTE_ALMOST_MATCHES, $name, $route); - - continue 2; - } - } - - continue; - } - - $hasTrailingVar = $trimmedPathinfo !== $pathinfo && preg_match('#\{\w+\}/?$#', $route->getPath()); - - if ($hasTrailingVar && ($hasTrailingSlash || (null === $m = $matches[\count($compiledRoute->getPathVariables())] ?? null) || '/' !== ($m[-1] ?? '/')) && preg_match($regex, $trimmedPathinfo, $m)) { - if ($hasTrailingSlash) { - $matches = $m; - } else { - $hasTrailingVar = false; - } - } - - $hostMatches = []; - if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { - $this->addTrace(sprintf('Host "%s" does not match the requirement ("%s")', $this->context->getHost(), $route->getHost()), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - $status = $this->handleRouteRequirements($pathinfo, $name, $route); - - if (self::REQUIREMENT_MISMATCH === $status[0]) { - $this->addTrace(sprintf('Condition "%s" does not evaluate to "true"', $route->getCondition()), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - if ('/' !== $pathinfo && !$hasTrailingVar && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsTrailingSlash && (!$requiredMethods || \in_array('GET', $requiredMethods))) { - $this->addTrace('Route matches!', self::ROUTE_MATCHES, $name, $route); - - return $this->allow = $this->allowSchemes = []; - } - $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); - continue; - } - - if ($route->getSchemes() && !$route->hasScheme($this->context->getScheme())) { - $this->allowSchemes = array_merge($this->allowSchemes, $route->getSchemes()); - $this->addTrace(sprintf('Scheme "%s" does not match any of the required schemes (%s)', $this->context->getScheme(), implode(', ', $route->getSchemes())), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - if ($requiredMethods && !\in_array($method, $requiredMethods)) { - $this->allow = array_merge($this->allow, $requiredMethods); - $this->addTrace(sprintf('Method "%s" does not match any of the required methods (%s)', $this->context->getMethod(), implode(', ', $requiredMethods)), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - $this->addTrace('Route matches!', self::ROUTE_MATCHES, $name, $route); - - return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, $status[1] ?? [])); - } - - return []; - } - - private function addTrace(string $log, int $level = self::ROUTE_DOES_NOT_MATCH, string $name = null, Route $route = null) - { - $this->traces[] = [ - 'log' => $log, - 'name' => $name, - 'level' => $level, - 'path' => null !== $route ? $route->getPath() : null, - ]; - } -} diff --git a/lib/symfony/routing/Matcher/UrlMatcher.php b/lib/symfony/routing/Matcher/UrlMatcher.php deleted file mode 100644 index f076a2f5e..000000000 --- a/lib/symfony/routing/Matcher/UrlMatcher.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * UrlMatcher matches URL based on a set of routes. - * - * @author Fabien Potencier - */ -class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface -{ - public const REQUIREMENT_MATCH = 0; - public const REQUIREMENT_MISMATCH = 1; - public const ROUTE_MATCH = 2; - - /** @var RequestContext */ - protected $context; - - /** - * Collects HTTP methods that would be allowed for the request. - */ - protected $allow = []; - - /** - * Collects URI schemes that would be allowed for the request. - * - * @internal - */ - protected $allowSchemes = []; - - protected $routes; - protected $request; - protected $expressionLanguage; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - protected $expressionLanguageProviders = []; - - public function __construct(RouteCollection $routes, RequestContext $context) - { - $this->routes = $routes; - $this->context = $context; - } - - /** - * {@inheritdoc} - */ - public function setContext(RequestContext $context) - { - $this->context = $context; - } - - /** - * {@inheritdoc} - */ - public function getContext() - { - return $this->context; - } - - /** - * {@inheritdoc} - */ - public function match(string $pathinfo) - { - $this->allow = $this->allowSchemes = []; - - if ($ret = $this->matchCollection(rawurldecode($pathinfo) ?: '/', $this->routes)) { - return $ret; - } - - if ('/' === $pathinfo && !$this->allow && !$this->allowSchemes) { - throw new NoConfigurationException(); - } - - throw 0 < \count($this->allow) ? new MethodNotAllowedException(array_unique($this->allow)) : new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); - } - - /** - * {@inheritdoc} - */ - public function matchRequest(Request $request) - { - $this->request = $request; - - $ret = $this->match($request->getPathInfo()); - - $this->request = null; - - return $ret; - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * Tries to match a URL with a set of routes. - * - * @param string $pathinfo The path info to be parsed - * - * @return array - * - * @throws NoConfigurationException If no routing configuration could be found - * @throws ResourceNotFoundException If the resource could not be found - * @throws MethodNotAllowedException If the resource was found but the request method is not allowed - */ - protected function matchCollection(string $pathinfo, RouteCollection $routes) - { - // HEAD and GET are equivalent as per RFC - if ('HEAD' === $method = $this->context->getMethod()) { - $method = 'GET'; - } - $supportsTrailingSlash = 'GET' === $method && $this instanceof RedirectableUrlMatcherInterface; - $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/'; - - foreach ($routes as $name => $route) { - $compiledRoute = $route->compile(); - $staticPrefix = rtrim($compiledRoute->getStaticPrefix(), '/'); - $requiredMethods = $route->getMethods(); - - // check the static prefix of the URL first. Only use the more expensive preg_match when it matches - if ('' !== $staticPrefix && !str_starts_with($trimmedPathinfo, $staticPrefix)) { - continue; - } - $regex = $compiledRoute->getRegex(); - - $pos = strrpos($regex, '$'); - $hasTrailingSlash = '/' === $regex[$pos - 1]; - $regex = substr_replace($regex, '/?$', $pos - $hasTrailingSlash, 1 + $hasTrailingSlash); - - if (!preg_match($regex, $pathinfo, $matches)) { - continue; - } - - $hasTrailingVar = $trimmedPathinfo !== $pathinfo && preg_match('#\{\w+\}/?$#', $route->getPath()); - - if ($hasTrailingVar && ($hasTrailingSlash || (null === $m = $matches[\count($compiledRoute->getPathVariables())] ?? null) || '/' !== ($m[-1] ?? '/')) && preg_match($regex, $trimmedPathinfo, $m)) { - if ($hasTrailingSlash) { - $matches = $m; - } else { - $hasTrailingVar = false; - } - } - - $hostMatches = []; - if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { - continue; - } - - $status = $this->handleRouteRequirements($pathinfo, $name, $route); - - if (self::REQUIREMENT_MISMATCH === $status[0]) { - continue; - } - - if ('/' !== $pathinfo && !$hasTrailingVar && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsTrailingSlash && (!$requiredMethods || \in_array('GET', $requiredMethods))) { - return $this->allow = $this->allowSchemes = []; - } - continue; - } - - if ($route->getSchemes() && !$route->hasScheme($this->context->getScheme())) { - $this->allowSchemes = array_merge($this->allowSchemes, $route->getSchemes()); - continue; - } - - if ($requiredMethods && !\in_array($method, $requiredMethods)) { - $this->allow = array_merge($this->allow, $requiredMethods); - continue; - } - - return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, $status[1] ?? [])); - } - - return []; - } - - /** - * Returns an array of values to use as request attributes. - * - * As this method requires the Route object, it is not available - * in matchers that do not have access to the matched Route instance - * (like the PHP and Apache matcher dumpers). - * - * @return array - */ - protected function getAttributes(Route $route, string $name, array $attributes) - { - $defaults = $route->getDefaults(); - if (isset($defaults['_canonical_route'])) { - $name = $defaults['_canonical_route']; - unset($defaults['_canonical_route']); - } - $attributes['_route'] = $name; - - return $this->mergeDefaults($attributes, $defaults); - } - - /** - * Handles specific route requirements. - * - * @return array The first element represents the status, the second contains additional information - */ - protected function handleRouteRequirements(string $pathinfo, string $name, Route $route) - { - // expression condition - if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), ['context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)])) { - return [self::REQUIREMENT_MISMATCH, null]; - } - - return [self::REQUIREMENT_MATCH, null]; - } - - /** - * Get merged default parameters. - * - * @return array - */ - protected function mergeDefaults(array $params, array $defaults) - { - foreach ($params as $key => $value) { - if (!\is_int($key) && null !== $value) { - $defaults[$key] = $value; - } - } - - return $defaults; - } - - protected function getExpressionLanguage() - { - if (null === $this->expressionLanguage) { - if (!class_exists(ExpressionLanguage::class)) { - throw new \LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); - } - $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); - } - - return $this->expressionLanguage; - } - - /** - * @internal - */ - protected function createRequest(string $pathinfo): ?Request - { - if (!class_exists(Request::class)) { - return null; - } - - return Request::create($this->context->getScheme().'://'.$this->context->getHost().$this->context->getBaseUrl().$pathinfo, $this->context->getMethod(), $this->context->getParameters(), [], [], [ - 'SCRIPT_FILENAME' => $this->context->getBaseUrl(), - 'SCRIPT_NAME' => $this->context->getBaseUrl(), - ]); - } -} diff --git a/lib/symfony/routing/Matcher/UrlMatcherInterface.php b/lib/symfony/routing/Matcher/UrlMatcherInterface.php deleted file mode 100644 index 0a5be9744..000000000 --- a/lib/symfony/routing/Matcher/UrlMatcherInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * UrlMatcherInterface is the interface that all URL matcher classes must implement. - * - * @author Fabien Potencier - */ -interface UrlMatcherInterface extends RequestContextAwareInterface -{ - /** - * Tries to match a URL path with a set of routes. - * - * If the matcher cannot find information, it must throw one of the exceptions documented - * below. - * - * @param string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded) - * - * @return array - * - * @throws NoConfigurationException If no routing configuration could be found - * @throws ResourceNotFoundException If the resource could not be found - * @throws MethodNotAllowedException If the resource was found but the request method is not allowed - */ - public function match(string $pathinfo); -} diff --git a/lib/symfony/routing/README.md b/lib/symfony/routing/README.md deleted file mode 100644 index ae8284f54..000000000 --- a/lib/symfony/routing/README.md +++ /dev/null @@ -1,51 +0,0 @@ -Routing Component -================= - -The Routing component maps an HTTP request to a set of configuration variables. - -Getting Started ---------------- - -``` -$ composer require symfony/routing -``` - -```php -use App\Controller\BlogController; -use Symfony\Component\Routing\Generator\UrlGenerator; -use Symfony\Component\Routing\Matcher\UrlMatcher; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -$route = new Route('/blog/{slug}', ['_controller' => BlogController::class]); -$routes = new RouteCollection(); -$routes->add('blog_show', $route); - -$context = new RequestContext(); - -// Routing can match routes with incoming requests -$matcher = new UrlMatcher($routes, $context); -$parameters = $matcher->match('/blog/lorem-ipsum'); -// $parameters = [ -// '_controller' => 'App\Controller\BlogController', -// 'slug' => 'lorem-ipsum', -// '_route' => 'blog_show' -// ] - -// Routing can also generate URLs for a given route -$generator = new UrlGenerator($routes, $context); -$url = $generator->generate('blog_show', [ - 'slug' => 'my-blog-post', -]); -// $url = '/blog/my-blog-post' -``` - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/routing.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/routing/RequestContext.php b/lib/symfony/routing/RequestContext.php deleted file mode 100644 index f54c430ee..000000000 --- a/lib/symfony/routing/RequestContext.php +++ /dev/null @@ -1,327 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\HttpFoundation\Request; - -/** - * Holds information about the current request. - * - * This class implements a fluent interface. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class RequestContext -{ - private $baseUrl; - private $pathInfo; - private $method; - private $host; - private $scheme; - private $httpPort; - private $httpsPort; - private $queryString; - private $parameters = []; - - public function __construct(string $baseUrl = '', string $method = 'GET', string $host = 'localhost', string $scheme = 'http', int $httpPort = 80, int $httpsPort = 443, string $path = '/', string $queryString = '') - { - $this->setBaseUrl($baseUrl); - $this->setMethod($method); - $this->setHost($host); - $this->setScheme($scheme); - $this->setHttpPort($httpPort); - $this->setHttpsPort($httpsPort); - $this->setPathInfo($path); - $this->setQueryString($queryString); - } - - public static function fromUri(string $uri, string $host = 'localhost', string $scheme = 'http', int $httpPort = 80, int $httpsPort = 443): self - { - $uri = parse_url($uri); - $scheme = $uri['scheme'] ?? $scheme; - $host = $uri['host'] ?? $host; - - if (isset($uri['port'])) { - if ('http' === $scheme) { - $httpPort = $uri['port']; - } elseif ('https' === $scheme) { - $httpsPort = $uri['port']; - } - } - - return new self($uri['path'] ?? '', 'GET', $host, $scheme, $httpPort, $httpsPort); - } - - /** - * Updates the RequestContext information based on a HttpFoundation Request. - * - * @return $this - */ - public function fromRequest(Request $request) - { - $this->setBaseUrl($request->getBaseUrl()); - $this->setPathInfo($request->getPathInfo()); - $this->setMethod($request->getMethod()); - $this->setHost($request->getHost()); - $this->setScheme($request->getScheme()); - $this->setHttpPort($request->isSecure() || null === $request->getPort() ? $this->httpPort : $request->getPort()); - $this->setHttpsPort($request->isSecure() && null !== $request->getPort() ? $request->getPort() : $this->httpsPort); - $this->setQueryString($request->server->get('QUERY_STRING', '')); - - return $this; - } - - /** - * Gets the base URL. - * - * @return string - */ - public function getBaseUrl() - { - return $this->baseUrl; - } - - /** - * Sets the base URL. - * - * @return $this - */ - public function setBaseUrl(string $baseUrl) - { - $this->baseUrl = rtrim($baseUrl, '/'); - - return $this; - } - - /** - * Gets the path info. - * - * @return string - */ - public function getPathInfo() - { - return $this->pathInfo; - } - - /** - * Sets the path info. - * - * @return $this - */ - public function setPathInfo(string $pathInfo) - { - $this->pathInfo = $pathInfo; - - return $this; - } - - /** - * Gets the HTTP method. - * - * The method is always an uppercased string. - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Sets the HTTP method. - * - * @return $this - */ - public function setMethod(string $method) - { - $this->method = strtoupper($method); - - return $this; - } - - /** - * Gets the HTTP host. - * - * The host is always lowercased because it must be treated case-insensitive. - * - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Sets the HTTP host. - * - * @return $this - */ - public function setHost(string $host) - { - $this->host = strtolower($host); - - return $this; - } - - /** - * Gets the HTTP scheme. - * - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * Sets the HTTP scheme. - * - * @return $this - */ - public function setScheme(string $scheme) - { - $this->scheme = strtolower($scheme); - - return $this; - } - - /** - * Gets the HTTP port. - * - * @return int - */ - public function getHttpPort() - { - return $this->httpPort; - } - - /** - * Sets the HTTP port. - * - * @return $this - */ - public function setHttpPort(int $httpPort) - { - $this->httpPort = $httpPort; - - return $this; - } - - /** - * Gets the HTTPS port. - * - * @return int - */ - public function getHttpsPort() - { - return $this->httpsPort; - } - - /** - * Sets the HTTPS port. - * - * @return $this - */ - public function setHttpsPort(int $httpsPort) - { - $this->httpsPort = $httpsPort; - - return $this; - } - - /** - * Gets the query string without the "?". - * - * @return string - */ - public function getQueryString() - { - return $this->queryString; - } - - /** - * Sets the query string. - * - * @return $this - */ - public function setQueryString(?string $queryString) - { - // string cast to be fault-tolerant, accepting null - $this->queryString = (string) $queryString; - - return $this; - } - - /** - * Returns the parameters. - * - * @return array - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Sets the parameters. - * - * @param array $parameters The parameters - * - * @return $this - */ - public function setParameters(array $parameters) - { - $this->parameters = $parameters; - - return $this; - } - - /** - * Gets a parameter value. - * - * @return mixed - */ - public function getParameter(string $name) - { - return $this->parameters[$name] ?? null; - } - - /** - * Checks if a parameter value is set for the given parameter. - * - * @return bool - */ - public function hasParameter(string $name) - { - return \array_key_exists($name, $this->parameters); - } - - /** - * Sets a parameter value. - * - * @param mixed $parameter The parameter value - * - * @return $this - */ - public function setParameter(string $name, $parameter) - { - $this->parameters[$name] = $parameter; - - return $this; - } - - public function isSecure(): bool - { - return 'https' === $this->scheme; - } -} diff --git a/lib/symfony/routing/RequestContextAwareInterface.php b/lib/symfony/routing/RequestContextAwareInterface.php deleted file mode 100644 index 270a2b084..000000000 --- a/lib/symfony/routing/RequestContextAwareInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -interface RequestContextAwareInterface -{ - /** - * Sets the request context. - */ - public function setContext(RequestContext $context); - - /** - * Gets the request context. - * - * @return RequestContext - */ - public function getContext(); -} diff --git a/lib/symfony/routing/Route.php b/lib/symfony/routing/Route.php deleted file mode 100644 index c67bd2de5..000000000 --- a/lib/symfony/routing/Route.php +++ /dev/null @@ -1,507 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * A Route describes a route and its parameters. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class Route implements \Serializable -{ - private $path = '/'; - private $host = ''; - private $schemes = []; - private $methods = []; - private $defaults = []; - private $requirements = []; - private $options = []; - private $condition = ''; - - /** - * @var CompiledRoute|null - */ - private $compiled; - - /** - * Constructor. - * - * Available options: - * - * * compiler_class: A class name able to compile this route instance (RouteCompiler by default) - * * utf8: Whether UTF-8 matching is enforced ot not - * - * @param string $path The path pattern to match - * @param array $defaults An array of default parameter values - * @param array $requirements An array of requirements for parameters (regexes) - * @param array $options An array of options - * @param string|null $host The host pattern to match - * @param string|string[] $schemes A required URI scheme or an array of restricted schemes - * @param string|string[] $methods A required HTTP method or an array of restricted methods - * @param string|null $condition A condition that should evaluate to true for the route to match - */ - public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', $schemes = [], $methods = [], ?string $condition = '') - { - $this->setPath($path); - $this->addDefaults($defaults); - $this->addRequirements($requirements); - $this->setOptions($options); - $this->setHost($host); - $this->setSchemes($schemes); - $this->setMethods($methods); - $this->setCondition($condition); - } - - public function __serialize(): array - { - return [ - 'path' => $this->path, - 'host' => $this->host, - 'defaults' => $this->defaults, - 'requirements' => $this->requirements, - 'options' => $this->options, - 'schemes' => $this->schemes, - 'methods' => $this->methods, - 'condition' => $this->condition, - 'compiled' => $this->compiled, - ]; - } - - /** - * @internal - */ - final public function serialize(): string - { - return serialize($this->__serialize()); - } - - public function __unserialize(array $data): void - { - $this->path = $data['path']; - $this->host = $data['host']; - $this->defaults = $data['defaults']; - $this->requirements = $data['requirements']; - $this->options = $data['options']; - $this->schemes = $data['schemes']; - $this->methods = $data['methods']; - - if (isset($data['condition'])) { - $this->condition = $data['condition']; - } - if (isset($data['compiled'])) { - $this->compiled = $data['compiled']; - } - } - - /** - * @internal - */ - final public function unserialize($serialized) - { - $this->__unserialize(unserialize($serialized)); - } - - /** - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * @return $this - */ - public function setPath(string $pattern) - { - $pattern = $this->extractInlineDefaultsAndRequirements($pattern); - - // A pattern must start with a slash and must not have multiple slashes at the beginning because the - // generated path for this route would be confused with a network path, e.g. '//domain.com/path'. - $this->path = '/'.ltrim(trim($pattern), '/'); - $this->compiled = null; - - return $this; - } - - /** - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * @return $this - */ - public function setHost(?string $pattern) - { - $this->host = $this->extractInlineDefaultsAndRequirements((string) $pattern); - $this->compiled = null; - - return $this; - } - - /** - * Returns the lowercased schemes this route is restricted to. - * So an empty array means that any scheme is allowed. - * - * @return string[] - */ - public function getSchemes() - { - return $this->schemes; - } - - /** - * Sets the schemes (e.g. 'https') this route is restricted to. - * So an empty array means that any scheme is allowed. - * - * @param string|string[] $schemes The scheme or an array of schemes - * - * @return $this - */ - public function setSchemes($schemes) - { - $this->schemes = array_map('strtolower', (array) $schemes); - $this->compiled = null; - - return $this; - } - - /** - * Checks if a scheme requirement has been set. - * - * @return bool - */ - public function hasScheme(string $scheme) - { - return \in_array(strtolower($scheme), $this->schemes, true); - } - - /** - * Returns the uppercased HTTP methods this route is restricted to. - * So an empty array means that any method is allowed. - * - * @return string[] - */ - public function getMethods() - { - return $this->methods; - } - - /** - * Sets the HTTP methods (e.g. 'POST') this route is restricted to. - * So an empty array means that any method is allowed. - * - * @param string|string[] $methods The method or an array of methods - * - * @return $this - */ - public function setMethods($methods) - { - $this->methods = array_map('strtoupper', (array) $methods); - $this->compiled = null; - - return $this; - } - - /** - * @return array - */ - public function getOptions() - { - return $this->options; - } - - /** - * @return $this - */ - public function setOptions(array $options) - { - $this->options = [ - 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', - ]; - - return $this->addOptions($options); - } - - /** - * @return $this - */ - public function addOptions(array $options) - { - foreach ($options as $name => $option) { - $this->options[$name] = $option; - } - $this->compiled = null; - - return $this; - } - - /** - * Sets an option value. - * - * @param mixed $value The option value - * - * @return $this - */ - public function setOption(string $name, $value) - { - $this->options[$name] = $value; - $this->compiled = null; - - return $this; - } - - /** - * Returns the option value or null when not found. - * - * @return mixed - */ - public function getOption(string $name) - { - return $this->options[$name] ?? null; - } - - /** - * @return bool - */ - public function hasOption(string $name) - { - return \array_key_exists($name, $this->options); - } - - /** - * @return array - */ - public function getDefaults() - { - return $this->defaults; - } - - /** - * @return $this - */ - public function setDefaults(array $defaults) - { - $this->defaults = []; - - return $this->addDefaults($defaults); - } - - /** - * @return $this - */ - public function addDefaults(array $defaults) - { - if (isset($defaults['_locale']) && $this->isLocalized()) { - unset($defaults['_locale']); - } - - foreach ($defaults as $name => $default) { - $this->defaults[$name] = $default; - } - $this->compiled = null; - - return $this; - } - - /** - * @return mixed - */ - public function getDefault(string $name) - { - return $this->defaults[$name] ?? null; - } - - /** - * @return bool - */ - public function hasDefault(string $name) - { - return \array_key_exists($name, $this->defaults); - } - - /** - * Sets a default value. - * - * @param mixed $default The default value - * - * @return $this - */ - public function setDefault(string $name, $default) - { - if ('_locale' === $name && $this->isLocalized()) { - return $this; - } - - $this->defaults[$name] = $default; - $this->compiled = null; - - return $this; - } - - /** - * @return array - */ - public function getRequirements() - { - return $this->requirements; - } - - /** - * @return $this - */ - public function setRequirements(array $requirements) - { - $this->requirements = []; - - return $this->addRequirements($requirements); - } - - /** - * @return $this - */ - public function addRequirements(array $requirements) - { - if (isset($requirements['_locale']) && $this->isLocalized()) { - unset($requirements['_locale']); - } - - foreach ($requirements as $key => $regex) { - $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); - } - $this->compiled = null; - - return $this; - } - - /** - * @return string|null - */ - public function getRequirement(string $key) - { - return $this->requirements[$key] ?? null; - } - - /** - * @return bool - */ - public function hasRequirement(string $key) - { - return \array_key_exists($key, $this->requirements); - } - - /** - * @return $this - */ - public function setRequirement(string $key, string $regex) - { - if ('_locale' === $key && $this->isLocalized()) { - return $this; - } - - $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); - $this->compiled = null; - - return $this; - } - - /** - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * @return $this - */ - public function setCondition(?string $condition) - { - $this->condition = (string) $condition; - $this->compiled = null; - - return $this; - } - - /** - * Compiles the route. - * - * @return CompiledRoute - * - * @throws \LogicException If the Route cannot be compiled because the - * path or host pattern is invalid - * - * @see RouteCompiler which is responsible for the compilation process - */ - public function compile() - { - if (null !== $this->compiled) { - return $this->compiled; - } - - $class = $this->getOption('compiler_class'); - - return $this->compiled = $class::compile($this); - } - - private function extractInlineDefaultsAndRequirements(string $pattern): string - { - if (false === strpbrk($pattern, '?<')) { - return $pattern; - } - - return preg_replace_callback('#\{(!?)(\w++)(<.*?>)?(\?[^\}]*+)?\}#', function ($m) { - if (isset($m[4][0])) { - $this->setDefault($m[2], '?' !== $m[4] ? substr($m[4], 1) : null); - } - if (isset($m[3][0])) { - $this->setRequirement($m[2], substr($m[3], 1, -1)); - } - - return '{'.$m[1].$m[2].'}'; - }, $pattern); - } - - private function sanitizeRequirement(string $key, string $regex) - { - if ('' !== $regex) { - if ('^' === $regex[0]) { - $regex = substr($regex, 1); - } elseif (0 === strpos($regex, '\\A')) { - $regex = substr($regex, 2); - } - } - - if (str_ends_with($regex, '$')) { - $regex = substr($regex, 0, -1); - } elseif (\strlen($regex) - 2 === strpos($regex, '\\z')) { - $regex = substr($regex, 0, -2); - } - - if ('' === $regex) { - throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty.', $key)); - } - - return $regex; - } - - private function isLocalized(): bool - { - return isset($this->defaults['_locale']) && isset($this->defaults['_canonical_route']) && ($this->requirements['_locale'] ?? null) === preg_quote($this->defaults['_locale']); - } -} diff --git a/lib/symfony/routing/RouteCollection.php b/lib/symfony/routing/RouteCollection.php deleted file mode 100644 index a0700bba3..000000000 --- a/lib/symfony/routing/RouteCollection.php +++ /dev/null @@ -1,383 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Routing\Exception\InvalidArgumentException; -use Symfony\Component\Routing\Exception\RouteCircularReferenceException; - -/** - * A RouteCollection represents a set of Route instances. - * - * When adding a route at the end of the collection, an existing route - * with the same name is removed first. So there can only be one route - * with a given name. - * - * @author Fabien Potencier - * @author Tobias Schultze - * - * @implements \IteratorAggregate - */ -class RouteCollection implements \IteratorAggregate, \Countable -{ - /** - * @var array - */ - private $routes = []; - - /** - * @var array - */ - private $aliases = []; - - /** - * @var array - */ - private $resources = []; - - /** - * @var array - */ - private $priorities = []; - - public function __clone() - { - foreach ($this->routes as $name => $route) { - $this->routes[$name] = clone $route; - } - - foreach ($this->aliases as $name => $alias) { - $this->aliases[$name] = clone $alias; - } - } - - /** - * Gets the current RouteCollection as an Iterator that includes all routes. - * - * It implements \IteratorAggregate. - * - * @see all() - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->all()); - } - - /** - * Gets the number of Routes in this collection. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->routes); - } - - /** - * @param int $priority - */ - public function add(string $name, Route $route/* , int $priority = 0 */) - { - if (\func_num_args() < 3 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface && !$this instanceof \Mockery\MockInterface) { - trigger_deprecation('symfony/routing', '5.1', 'The "%s()" method will have a new "int $priority = 0" argument in version 6.0, not defining it is deprecated.', __METHOD__); - } - - unset($this->routes[$name], $this->priorities[$name], $this->aliases[$name]); - - $this->routes[$name] = $route; - - if ($priority = 3 <= \func_num_args() ? func_get_arg(2) : 0) { - $this->priorities[$name] = $priority; - } - } - - /** - * Returns all routes in this collection. - * - * @return array - */ - public function all() - { - if ($this->priorities) { - $priorities = $this->priorities; - $keysOrder = array_flip(array_keys($this->routes)); - uksort($this->routes, static function ($n1, $n2) use ($priorities, $keysOrder) { - return (($priorities[$n2] ?? 0) <=> ($priorities[$n1] ?? 0)) ?: ($keysOrder[$n1] <=> $keysOrder[$n2]); - }); - } - - return $this->routes; - } - - /** - * Gets a route by name. - * - * @return Route|null - */ - public function get(string $name) - { - $visited = []; - while (null !== $alias = $this->aliases[$name] ?? null) { - if (false !== $searchKey = array_search($name, $visited)) { - $visited[] = $name; - - throw new RouteCircularReferenceException($name, \array_slice($visited, $searchKey)); - } - - if ($alias->isDeprecated()) { - $deprecation = $alias->getDeprecation($name); - - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - $visited[] = $name; - $name = $alias->getId(); - } - - return $this->routes[$name] ?? null; - } - - /** - * Removes a route or an array of routes by name from the collection. - * - * @param string|string[] $name The route name or an array of route names - */ - public function remove($name) - { - foreach ((array) $name as $n) { - unset($this->routes[$n], $this->priorities[$n], $this->aliases[$n]); - } - } - - /** - * Adds a route collection at the end of the current set by appending all - * routes of the added collection. - */ - public function addCollection(self $collection) - { - // we need to remove all routes with the same names first because just replacing them - // would not place the new route at the end of the merged array - foreach ($collection->all() as $name => $route) { - unset($this->routes[$name], $this->priorities[$name], $this->aliases[$name]); - $this->routes[$name] = $route; - - if (isset($collection->priorities[$name])) { - $this->priorities[$name] = $collection->priorities[$name]; - } - } - - foreach ($collection->getAliases() as $name => $alias) { - unset($this->routes[$name], $this->priorities[$name], $this->aliases[$name]); - - $this->aliases[$name] = $alias; - } - - foreach ($collection->getResources() as $resource) { - $this->addResource($resource); - } - } - - /** - * Adds a prefix to the path of all child routes. - */ - public function addPrefix(string $prefix, array $defaults = [], array $requirements = []) - { - $prefix = trim(trim($prefix), '/'); - - if ('' === $prefix) { - return; - } - - foreach ($this->routes as $route) { - $route->setPath('/'.$prefix.$route->getPath()); - $route->addDefaults($defaults); - $route->addRequirements($requirements); - } - } - - /** - * Adds a prefix to the name of all the routes within in the collection. - */ - public function addNamePrefix(string $prefix) - { - $prefixedRoutes = []; - $prefixedPriorities = []; - $prefixedAliases = []; - - foreach ($this->routes as $name => $route) { - $prefixedRoutes[$prefix.$name] = $route; - if (null !== $canonicalName = $route->getDefault('_canonical_route')) { - $route->setDefault('_canonical_route', $prefix.$canonicalName); - } - if (isset($this->priorities[$name])) { - $prefixedPriorities[$prefix.$name] = $this->priorities[$name]; - } - } - - foreach ($this->aliases as $name => $alias) { - $prefixedAliases[$prefix.$name] = $alias->withId($prefix.$alias->getId()); - } - - $this->routes = $prefixedRoutes; - $this->priorities = $prefixedPriorities; - $this->aliases = $prefixedAliases; - } - - /** - * Sets the host pattern on all routes. - */ - public function setHost(?string $pattern, array $defaults = [], array $requirements = []) - { - foreach ($this->routes as $route) { - $route->setHost($pattern); - $route->addDefaults($defaults); - $route->addRequirements($requirements); - } - } - - /** - * Sets a condition on all routes. - * - * Existing conditions will be overridden. - */ - public function setCondition(?string $condition) - { - foreach ($this->routes as $route) { - $route->setCondition($condition); - } - } - - /** - * Adds defaults to all routes. - * - * An existing default value under the same name in a route will be overridden. - */ - public function addDefaults(array $defaults) - { - if ($defaults) { - foreach ($this->routes as $route) { - $route->addDefaults($defaults); - } - } - } - - /** - * Adds requirements to all routes. - * - * An existing requirement under the same name in a route will be overridden. - */ - public function addRequirements(array $requirements) - { - if ($requirements) { - foreach ($this->routes as $route) { - $route->addRequirements($requirements); - } - } - } - - /** - * Adds options to all routes. - * - * An existing option value under the same name in a route will be overridden. - */ - public function addOptions(array $options) - { - if ($options) { - foreach ($this->routes as $route) { - $route->addOptions($options); - } - } - } - - /** - * Sets the schemes (e.g. 'https') all child routes are restricted to. - * - * @param string|string[] $schemes The scheme or an array of schemes - */ - public function setSchemes($schemes) - { - foreach ($this->routes as $route) { - $route->setSchemes($schemes); - } - } - - /** - * Sets the HTTP methods (e.g. 'POST') all child routes are restricted to. - * - * @param string|string[] $methods The method or an array of methods - */ - public function setMethods($methods) - { - foreach ($this->routes as $route) { - $route->setMethods($methods); - } - } - - /** - * Returns an array of resources loaded to build this collection. - * - * @return ResourceInterface[] - */ - public function getResources() - { - return array_values($this->resources); - } - - /** - * Adds a resource for this collection. If the resource already exists - * it is not added. - */ - public function addResource(ResourceInterface $resource) - { - $key = (string) $resource; - - if (!isset($this->resources[$key])) { - $this->resources[$key] = $resource; - } - } - - /** - * Sets an alias for an existing route. - * - * @param string $name The alias to create - * @param string $alias The route to alias - * - * @throws InvalidArgumentException if the alias is for itself - */ - public function addAlias(string $name, string $alias): Alias - { - if ($name === $alias) { - throw new InvalidArgumentException(sprintf('Route alias "%s" can not reference itself.', $name)); - } - - unset($this->routes[$name], $this->priorities[$name]); - - return $this->aliases[$name] = new Alias($alias); - } - - /** - * @return array - */ - public function getAliases(): array - { - return $this->aliases; - } - - public function getAlias(string $name): ?Alias - { - return $this->aliases[$name] ?? null; - } -} diff --git a/lib/symfony/routing/RouteCollectionBuilder.php b/lib/symfony/routing/RouteCollectionBuilder.php deleted file mode 100644 index d7eed31eb..000000000 --- a/lib/symfony/routing/RouteCollectionBuilder.php +++ /dev/null @@ -1,364 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; - -trigger_deprecation('symfony/routing', '5.1', 'The "%s" class is deprecated, use "%s" instead.', RouteCollectionBuilder::class, RoutingConfigurator::class); - -/** - * Helps add and import routes into a RouteCollection. - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.1, use RoutingConfigurator instead - */ -class RouteCollectionBuilder -{ - /** - * @var Route[]|RouteCollectionBuilder[] - */ - private $routes = []; - - private $loader; - private $defaults = []; - private $prefix; - private $host; - private $condition; - private $requirements = []; - private $options = []; - private $schemes; - private $methods; - private $resources = []; - - public function __construct(LoaderInterface $loader = null) - { - $this->loader = $loader; - } - - /** - * Import an external routing resource and returns the RouteCollectionBuilder. - * - * $routes->import('blog.yml', '/blog'); - * - * @param mixed $resource - * - * @return self - * - * @throws LoaderLoadException - */ - public function import($resource, string $prefix = '/', string $type = null) - { - /** @var RouteCollection[] $collections */ - $collections = $this->load($resource, $type); - - // create a builder from the RouteCollection - $builder = $this->createBuilder(); - - foreach ($collections as $collection) { - if (null === $collection) { - continue; - } - - foreach ($collection->all() as $name => $route) { - $builder->addRoute($route, $name); - } - - foreach ($collection->getResources() as $resource) { - $builder->addResource($resource); - } - } - - // mount into this builder - $this->mount($prefix, $builder); - - return $builder; - } - - /** - * Adds a route and returns it for future modification. - * - * @return Route - */ - public function add(string $path, string $controller, string $name = null) - { - $route = new Route($path); - $route->setDefault('_controller', $controller); - $this->addRoute($route, $name); - - return $route; - } - - /** - * Returns a RouteCollectionBuilder that can be configured and then added with mount(). - * - * @return self - */ - public function createBuilder() - { - return new self($this->loader); - } - - /** - * Add a RouteCollectionBuilder. - */ - public function mount(string $prefix, self $builder) - { - $builder->prefix = trim(trim($prefix), '/'); - $this->routes[] = $builder; - } - - /** - * Adds a Route object to the builder. - * - * @return $this - */ - public function addRoute(Route $route, string $name = null) - { - if (null === $name) { - // used as a flag to know which routes will need a name later - $name = '_unnamed_route_'.spl_object_hash($route); - } - - $this->routes[$name] = $route; - - return $this; - } - - /** - * Sets the host on all embedded routes (unless already set). - * - * @return $this - */ - public function setHost(?string $pattern) - { - $this->host = $pattern; - - return $this; - } - - /** - * Sets a condition on all embedded routes (unless already set). - * - * @return $this - */ - public function setCondition(?string $condition) - { - $this->condition = $condition; - - return $this; - } - - /** - * Sets a default value that will be added to all embedded routes (unless that - * default value is already set). - * - * @param mixed $value - * - * @return $this - */ - public function setDefault(string $key, $value) - { - $this->defaults[$key] = $value; - - return $this; - } - - /** - * Sets a requirement that will be added to all embedded routes (unless that - * requirement is already set). - * - * @param mixed $regex - * - * @return $this - */ - public function setRequirement(string $key, $regex) - { - $this->requirements[$key] = $regex; - - return $this; - } - - /** - * Sets an option that will be added to all embedded routes (unless that - * option is already set). - * - * @param mixed $value - * - * @return $this - */ - public function setOption(string $key, $value) - { - $this->options[$key] = $value; - - return $this; - } - - /** - * Sets the schemes on all embedded routes (unless already set). - * - * @param array|string $schemes - * - * @return $this - */ - public function setSchemes($schemes) - { - $this->schemes = $schemes; - - return $this; - } - - /** - * Sets the methods on all embedded routes (unless already set). - * - * @param array|string $methods - * - * @return $this - */ - public function setMethods($methods) - { - $this->methods = $methods; - - return $this; - } - - /** - * Adds a resource for this collection. - * - * @return $this - */ - private function addResource(ResourceInterface $resource): self - { - $this->resources[] = $resource; - - return $this; - } - - /** - * Creates the final RouteCollection and returns it. - * - * @return RouteCollection - */ - public function build() - { - $routeCollection = new RouteCollection(); - - foreach ($this->routes as $name => $route) { - if ($route instanceof Route) { - $route->setDefaults(array_merge($this->defaults, $route->getDefaults())); - $route->setOptions(array_merge($this->options, $route->getOptions())); - - foreach ($this->requirements as $key => $val) { - if (!$route->hasRequirement($key)) { - $route->setRequirement($key, $val); - } - } - - if (null !== $this->prefix) { - $route->setPath('/'.$this->prefix.$route->getPath()); - } - - if (!$route->getHost()) { - $route->setHost($this->host); - } - - if (!$route->getCondition()) { - $route->setCondition($this->condition); - } - - if (!$route->getSchemes()) { - $route->setSchemes($this->schemes); - } - - if (!$route->getMethods()) { - $route->setMethods($this->methods); - } - - // auto-generate the route name if it's been marked - if ('_unnamed_route_' === substr($name, 0, 15)) { - $name = $this->generateRouteName($route); - } - - $routeCollection->add($name, $route); - } else { - /* @var self $route */ - $subCollection = $route->build(); - if (null !== $this->prefix) { - $subCollection->addPrefix($this->prefix); - } - - $routeCollection->addCollection($subCollection); - } - } - - foreach ($this->resources as $resource) { - $routeCollection->addResource($resource); - } - - return $routeCollection; - } - - /** - * Generates a route name based on details of this route. - */ - private function generateRouteName(Route $route): string - { - $methods = implode('_', $route->getMethods()).'_'; - - $routeName = $methods.$route->getPath(); - $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName); - $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName); - - // Collapse consecutive underscores down into a single underscore. - $routeName = preg_replace('/_+/', '_', $routeName); - - return $routeName; - } - - /** - * Finds a loader able to load an imported resource and loads it. - * - * @param mixed $resource A resource - * @param string|null $type The resource type or null if unknown - * - * @return RouteCollection[] - * - * @throws LoaderLoadException If no loader is found - */ - private function load($resource, string $type = null): array - { - if (null === $this->loader) { - throw new \BadMethodCallException('Cannot import other routing resources: you must pass a LoaderInterface when constructing RouteCollectionBuilder.'); - } - - if ($this->loader->supports($resource, $type)) { - $collections = $this->loader->load($resource, $type); - - return \is_array($collections) ? $collections : [$collections]; - } - - if (null === $resolver = $this->loader->getResolver()) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - if (false === $loader = $resolver->resolve($resource, $type)) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - $collections = $loader->load($resource, $type); - - return \is_array($collections) ? $collections : [$collections]; - } -} diff --git a/lib/symfony/routing/RouteCompiler.php b/lib/symfony/routing/RouteCompiler.php deleted file mode 100644 index 7e78c2931..000000000 --- a/lib/symfony/routing/RouteCompiler.php +++ /dev/null @@ -1,346 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * RouteCompiler compiles Route instances to CompiledRoute instances. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class RouteCompiler implements RouteCompilerInterface -{ - /** - * @deprecated since Symfony 5.1, to be removed in 6.0 - */ - public const REGEX_DELIMITER = '#'; - - /** - * This string defines the characters that are automatically considered separators in front of - * optional placeholders (with default and no static text following). Such a single separator - * can be left out together with the optional placeholder from matching and generating URLs. - */ - public const SEPARATORS = '/,;.:-_~+*=@|'; - - /** - * The maximum supported length of a PCRE subpattern name - * http://pcre.org/current/doc/html/pcre2pattern.html#SEC16. - * - * @internal - */ - public const VARIABLE_MAXIMUM_LENGTH = 32; - - /** - * {@inheritdoc} - * - * @throws \InvalidArgumentException if a path variable is named _fragment - * @throws \LogicException if a variable is referenced more than once - * @throws \DomainException if a variable name starts with a digit or if it is too long to be successfully used as - * a PCRE subpattern - */ - public static function compile(Route $route) - { - $hostVariables = []; - $variables = []; - $hostRegex = null; - $hostTokens = []; - - if ('' !== $host = $route->getHost()) { - $result = self::compilePattern($route, $host, true); - - $hostVariables = $result['variables']; - $variables = $hostVariables; - - $hostTokens = $result['tokens']; - $hostRegex = $result['regex']; - } - - $locale = $route->getDefault('_locale'); - if (null !== $locale && null !== $route->getDefault('_canonical_route') && preg_quote($locale) === $route->getRequirement('_locale')) { - $requirements = $route->getRequirements(); - unset($requirements['_locale']); - $route->setRequirements($requirements); - $route->setPath(str_replace('{_locale}', $locale, $route->getPath())); - } - - $path = $route->getPath(); - - $result = self::compilePattern($route, $path, false); - - $staticPrefix = $result['staticPrefix']; - - $pathVariables = $result['variables']; - - foreach ($pathVariables as $pathParam) { - if ('_fragment' === $pathParam) { - throw new \InvalidArgumentException(sprintf('Route pattern "%s" cannot contain "_fragment" as a path parameter.', $route->getPath())); - } - } - - $variables = array_merge($variables, $pathVariables); - - $tokens = $result['tokens']; - $regex = $result['regex']; - - return new CompiledRoute( - $staticPrefix, - $regex, - $tokens, - $pathVariables, - $hostRegex, - $hostTokens, - $hostVariables, - array_unique($variables) - ); - } - - private static function compilePattern(Route $route, string $pattern, bool $isHost): array - { - $tokens = []; - $variables = []; - $matches = []; - $pos = 0; - $defaultSeparator = $isHost ? '.' : '/'; - $useUtf8 = preg_match('//u', $pattern); - $needsUtf8 = $route->getOption('utf8'); - - if (!$needsUtf8 && $useUtf8 && preg_match('/[\x80-\xFF]/', $pattern)) { - throw new \LogicException(sprintf('Cannot use UTF-8 route patterns without setting the "utf8" option for route "%s".', $route->getPath())); - } - if (!$useUtf8 && $needsUtf8) { - throw new \LogicException(sprintf('Cannot mix UTF-8 requirements with non-UTF-8 pattern "%s".', $pattern)); - } - - // Match all variables enclosed in "{}" and iterate over them. But we only want to match the innermost variable - // in case of nested "{}", e.g. {foo{bar}}. This in ensured because \w does not match "{" or "}" itself. - preg_match_all('#\{(!)?(\w+)\}#', $pattern, $matches, \PREG_OFFSET_CAPTURE | \PREG_SET_ORDER); - foreach ($matches as $match) { - $important = $match[1][1] >= 0; - $varName = $match[2][0]; - // get all static text preceding the current variable - $precedingText = substr($pattern, $pos, $match[0][1] - $pos); - $pos = $match[0][1] + \strlen($match[0][0]); - - if (!\strlen($precedingText)) { - $precedingChar = ''; - } elseif ($useUtf8) { - preg_match('/.$/u', $precedingText, $precedingChar); - $precedingChar = $precedingChar[0]; - } else { - $precedingChar = substr($precedingText, -1); - } - $isSeparator = '' !== $precedingChar && str_contains(static::SEPARATORS, $precedingChar); - - // A PCRE subpattern name must start with a non-digit. Also a PHP variable cannot start with a digit so the - // variable would not be usable as a Controller action argument. - if (preg_match('/^\d/', $varName)) { - throw new \DomainException(sprintf('Variable name "%s" cannot start with a digit in route pattern "%s". Please use a different name.', $varName, $pattern)); - } - if (\in_array($varName, $variables)) { - throw new \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $pattern, $varName)); - } - - if (\strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) { - throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %d characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern)); - } - - if ($isSeparator && $precedingText !== $precedingChar) { - $tokens[] = ['text', substr($precedingText, 0, -\strlen($precedingChar))]; - } elseif (!$isSeparator && '' !== $precedingText) { - $tokens[] = ['text', $precedingText]; - } - - $regexp = $route->getRequirement($varName); - if (null === $regexp) { - $followingPattern = (string) substr($pattern, $pos); - // Find the next static character after the variable that functions as a separator. By default, this separator and '/' - // are disallowed for the variable. This default requirement makes sure that optional variables can be matched at all - // and that the generating-matching-combination of URLs unambiguous, i.e. the params used for generating the URL are - // the same that will be matched. Example: new Route('/{page}.{_format}', ['_format' => 'html']) - // If {page} would also match the separating dot, {_format} would never match as {page} will eagerly consume everything. - // Also even if {_format} was not optional the requirement prevents that {page} matches something that was originally - // part of {_format} when generating the URL, e.g. _format = 'mobile.html'. - $nextSeparator = self::findNextSeparator($followingPattern, $useUtf8); - $regexp = sprintf( - '[^%s%s]+', - preg_quote($defaultSeparator), - $defaultSeparator !== $nextSeparator && '' !== $nextSeparator ? preg_quote($nextSeparator) : '' - ); - if (('' !== $nextSeparator && !preg_match('#^\{\w+\}#', $followingPattern)) || '' === $followingPattern) { - // When we have a separator, which is disallowed for the variable, we can optimize the regex with a possessive - // quantifier. This prevents useless backtracking of PCRE and improves performance by 20% for matching those patterns. - // Given the above example, there is no point in backtracking into {page} (that forbids the dot) when a dot must follow - // after it. This optimization cannot be applied when the next char is no real separator or when the next variable is - // directly adjacent, e.g. '/{x}{y}'. - $regexp .= '+'; - } - } else { - if (!preg_match('//u', $regexp)) { - $useUtf8 = false; - } elseif (!$needsUtf8 && preg_match('/[\x80-\xFF]|(?= 0; --$i) { - $token = $tokens[$i]; - // variable is optional when it is not important and has a default value - if ('variable' === $token[0] && !($token[5] ?? false) && $route->hasDefault($token[3])) { - $firstOptional = $i; - } else { - break; - } - } - } - - // compute the matching regexp - $regexp = ''; - for ($i = 0, $nbToken = \count($tokens); $i < $nbToken; ++$i) { - $regexp .= self::computeRegexp($tokens, $i, $firstOptional); - } - $regexp = '{^'.$regexp.'$}sD'.($isHost ? 'i' : ''); - - // enable Utf8 matching if really required - if ($needsUtf8) { - $regexp .= 'u'; - for ($i = 0, $nbToken = \count($tokens); $i < $nbToken; ++$i) { - if ('variable' === $tokens[$i][0]) { - $tokens[$i][4] = true; - } - } - } - - return [ - 'staticPrefix' => self::determineStaticPrefix($route, $tokens), - 'regex' => $regexp, - 'tokens' => array_reverse($tokens), - 'variables' => $variables, - ]; - } - - /** - * Determines the longest static prefix possible for a route. - */ - private static function determineStaticPrefix(Route $route, array $tokens): string - { - if ('text' !== $tokens[0][0]) { - return ($route->hasDefault($tokens[0][3]) || '/' === $tokens[0][1]) ? '' : $tokens[0][1]; - } - - $prefix = $tokens[0][1]; - - if (isset($tokens[1][1]) && '/' !== $tokens[1][1] && false === $route->hasDefault($tokens[1][3])) { - $prefix .= $tokens[1][1]; - } - - return $prefix; - } - - /** - * Returns the next static character in the Route pattern that will serve as a separator (or the empty string when none available). - */ - private static function findNextSeparator(string $pattern, bool $useUtf8): string - { - if ('' == $pattern) { - // return empty string if pattern is empty or false (false which can be returned by substr) - return ''; - } - // first remove all placeholders from the pattern so we can find the next real static character - if ('' === $pattern = preg_replace('#\{\w+\}#', '', $pattern)) { - return ''; - } - if ($useUtf8) { - preg_match('/^./u', $pattern, $pattern); - } - - return str_contains(static::SEPARATORS, $pattern[0]) ? $pattern[0] : ''; - } - - /** - * Computes the regexp used to match a specific token. It can be static text or a subpattern. - * - * @param array $tokens The route tokens - * @param int $index The index of the current token - * @param int $firstOptional The index of the first optional token - */ - private static function computeRegexp(array $tokens, int $index, int $firstOptional): string - { - $token = $tokens[$index]; - if ('text' === $token[0]) { - // Text tokens - return preg_quote($token[1]); - } else { - // Variable tokens - if (0 === $index && 0 === $firstOptional) { - // When the only token is an optional variable token, the separator is required - return sprintf('%s(?P<%s>%s)?', preg_quote($token[1]), $token[3], $token[2]); - } else { - $regexp = sprintf('%s(?P<%s>%s)', preg_quote($token[1]), $token[3], $token[2]); - if ($index >= $firstOptional) { - // Enclose each optional token in a subpattern to make it optional. - // "?:" means it is non-capturing, i.e. the portion of the subject string that - // matched the optional subpattern is not passed back. - $regexp = "(?:$regexp"; - $nbTokens = \count($tokens); - if ($nbTokens - 1 == $index) { - // Close the optional subpatterns - $regexp .= str_repeat(')?', $nbTokens - $firstOptional - (0 === $firstOptional ? 1 : 0)); - } - } - - return $regexp; - } - } - } - - private static function transformCapturingGroupsToNonCapturings(string $regexp): string - { - for ($i = 0; $i < \strlen($regexp); ++$i) { - if ('\\' === $regexp[$i]) { - ++$i; - continue; - } - if ('(' !== $regexp[$i] || !isset($regexp[$i + 2])) { - continue; - } - if ('*' === $regexp[++$i] || '?' === $regexp[$i]) { - ++$i; - continue; - } - $regexp = substr_replace($regexp, '?:', $i, 0); - ++$i; - } - - return $regexp; - } -} diff --git a/lib/symfony/routing/RouteCompilerInterface.php b/lib/symfony/routing/RouteCompilerInterface.php deleted file mode 100644 index 9bae33a91..000000000 --- a/lib/symfony/routing/RouteCompilerInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * RouteCompilerInterface is the interface that all RouteCompiler classes must implement. - * - * @author Fabien Potencier - */ -interface RouteCompilerInterface -{ - /** - * Compiles the current route instance. - * - * @return CompiledRoute - * - * @throws \LogicException If the Route cannot be compiled because the - * path or host pattern is invalid - */ - public static function compile(Route $route); -} diff --git a/lib/symfony/routing/Router.php b/lib/symfony/routing/Router.php deleted file mode 100644 index 89b14925e..000000000 --- a/lib/symfony/routing/Router.php +++ /dev/null @@ -1,393 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Config\ConfigCacheFactory; -use Symfony\Component\Config\ConfigCacheFactoryInterface; -use Symfony\Component\Config\ConfigCacheInterface; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Generator\CompiledUrlGenerator; -use Symfony\Component\Routing\Generator\ConfigurableRequirementsInterface; -use Symfony\Component\Routing\Generator\Dumper\CompiledUrlGeneratorDumper; -use Symfony\Component\Routing\Generator\Dumper\GeneratorDumperInterface; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\Matcher\CompiledUrlMatcher; -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper; -use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface; -use Symfony\Component\Routing\Matcher\RequestMatcherInterface; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; - -/** - * The Router class is an example of the integration of all pieces of the - * routing system for easier use. - * - * @author Fabien Potencier - */ -class Router implements RouterInterface, RequestMatcherInterface -{ - /** - * @var UrlMatcherInterface|null - */ - protected $matcher; - - /** - * @var UrlGeneratorInterface|null - */ - protected $generator; - - /** - * @var RequestContext - */ - protected $context; - - /** - * @var LoaderInterface - */ - protected $loader; - - /** - * @var RouteCollection|null - */ - protected $collection; - - /** - * @var mixed - */ - protected $resource; - - /** - * @var array - */ - protected $options = []; - - /** - * @var LoggerInterface|null - */ - protected $logger; - - /** - * @var string|null - */ - protected $defaultLocale; - - /** - * @var ConfigCacheFactoryInterface|null - */ - private $configCacheFactory; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private $expressionLanguageProviders = []; - - private static $cache = []; - - /** - * @param mixed $resource The main resource to load - */ - public function __construct(LoaderInterface $loader, $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->loader = $loader; - $this->resource = $resource; - $this->logger = $logger; - $this->context = $context ?? new RequestContext(); - $this->setOptions($options); - $this->defaultLocale = $defaultLocale; - } - - /** - * Sets options. - * - * Available options: - * - * * cache_dir: The cache directory (or null to disable caching) - * * debug: Whether to enable debugging or not (false by default) - * * generator_class: The name of a UrlGeneratorInterface implementation - * * generator_dumper_class: The name of a GeneratorDumperInterface implementation - * * matcher_class: The name of a UrlMatcherInterface implementation - * * matcher_dumper_class: The name of a MatcherDumperInterface implementation - * * resource_type: Type hint for the main resource (optional) - * * strict_requirements: Configure strict requirement checking for generators - * implementing ConfigurableRequirementsInterface (default is true) - * - * @throws \InvalidArgumentException When unsupported option is provided - */ - public function setOptions(array $options) - { - $this->options = [ - 'cache_dir' => null, - 'debug' => false, - 'generator_class' => CompiledUrlGenerator::class, - 'generator_dumper_class' => CompiledUrlGeneratorDumper::class, - 'matcher_class' => CompiledUrlMatcher::class, - 'matcher_dumper_class' => CompiledUrlMatcherDumper::class, - 'resource_type' => null, - 'strict_requirements' => true, - ]; - - // check option names and live merge, if errors are encountered Exception will be thrown - $invalid = []; - foreach ($options as $key => $value) { - if (\array_key_exists($key, $this->options)) { - $this->options[$key] = $value; - } else { - $invalid[] = $key; - } - } - - if ($invalid) { - throw new \InvalidArgumentException(sprintf('The Router does not support the following options: "%s".', implode('", "', $invalid))); - } - } - - /** - * Sets an option. - * - * @param mixed $value The value - * - * @throws \InvalidArgumentException - */ - public function setOption(string $key, $value) - { - if (!\array_key_exists($key, $this->options)) { - throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); - } - - $this->options[$key] = $value; - } - - /** - * Gets an option value. - * - * @return mixed - * - * @throws \InvalidArgumentException - */ - public function getOption(string $key) - { - if (!\array_key_exists($key, $this->options)) { - throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); - } - - return $this->options[$key]; - } - - /** - * {@inheritdoc} - */ - public function getRouteCollection() - { - if (null === $this->collection) { - $this->collection = $this->loader->load($this->resource, $this->options['resource_type']); - } - - return $this->collection; - } - - /** - * {@inheritdoc} - */ - public function setContext(RequestContext $context) - { - $this->context = $context; - - if (null !== $this->matcher) { - $this->getMatcher()->setContext($context); - } - if (null !== $this->generator) { - $this->getGenerator()->setContext($context); - } - } - - /** - * {@inheritdoc} - */ - public function getContext() - { - return $this->context; - } - - /** - * Sets the ConfigCache factory to use. - */ - public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) - { - $this->configCacheFactory = $configCacheFactory; - } - - /** - * {@inheritdoc} - */ - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH) - { - return $this->getGenerator()->generate($name, $parameters, $referenceType); - } - - /** - * {@inheritdoc} - */ - public function match(string $pathinfo) - { - return $this->getMatcher()->match($pathinfo); - } - - /** - * {@inheritdoc} - */ - public function matchRequest(Request $request) - { - $matcher = $this->getMatcher(); - if (!$matcher instanceof RequestMatcherInterface) { - // fallback to the default UrlMatcherInterface - return $matcher->match($request->getPathInfo()); - } - - return $matcher->matchRequest($request); - } - - /** - * Gets the UrlMatcher or RequestMatcher instance associated with this Router. - * - * @return UrlMatcherInterface|RequestMatcherInterface - */ - public function getMatcher() - { - if (null !== $this->matcher) { - return $this->matcher; - } - - if (null === $this->options['cache_dir']) { - $routes = $this->getRouteCollection(); - $compiled = is_a($this->options['matcher_class'], CompiledUrlMatcher::class, true); - if ($compiled) { - $routes = (new CompiledUrlMatcherDumper($routes))->getCompiledRoutes(); - } - $this->matcher = new $this->options['matcher_class']($routes, $this->context); - if (method_exists($this->matcher, 'addExpressionLanguageProvider')) { - foreach ($this->expressionLanguageProviders as $provider) { - $this->matcher->addExpressionLanguageProvider($provider); - } - } - - return $this->matcher; - } - - $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/url_matching_routes.php', - function (ConfigCacheInterface $cache) { - $dumper = $this->getMatcherDumperInstance(); - if (method_exists($dumper, 'addExpressionLanguageProvider')) { - foreach ($this->expressionLanguageProviders as $provider) { - $dumper->addExpressionLanguageProvider($provider); - } - } - - $cache->write($dumper->dump(), $this->getRouteCollection()->getResources()); - } - ); - - return $this->matcher = new $this->options['matcher_class'](self::getCompiledRoutes($cache->getPath()), $this->context); - } - - /** - * Gets the UrlGenerator instance associated with this Router. - * - * @return UrlGeneratorInterface - */ - public function getGenerator() - { - if (null !== $this->generator) { - return $this->generator; - } - - if (null === $this->options['cache_dir']) { - $routes = $this->getRouteCollection(); - $aliases = []; - $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true); - if ($compiled) { - $generatorDumper = new CompiledUrlGeneratorDumper($routes); - $routes = $generatorDumper->getCompiledRoutes(); - $aliases = $generatorDumper->getCompiledAliases(); - } - $this->generator = new $this->options['generator_class'](array_merge($routes, $aliases), $this->context, $this->logger, $this->defaultLocale); - } else { - $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/url_generating_routes.php', - function (ConfigCacheInterface $cache) { - $dumper = $this->getGeneratorDumperInstance(); - - $cache->write($dumper->dump(), $this->getRouteCollection()->getResources()); - } - ); - - $this->generator = new $this->options['generator_class'](self::getCompiledRoutes($cache->getPath()), $this->context, $this->logger, $this->defaultLocale); - } - - if ($this->generator instanceof ConfigurableRequirementsInterface) { - $this->generator->setStrictRequirements($this->options['strict_requirements']); - } - - return $this->generator; - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * @return GeneratorDumperInterface - */ - protected function getGeneratorDumperInstance() - { - return new $this->options['generator_dumper_class']($this->getRouteCollection()); - } - - /** - * @return MatcherDumperInterface - */ - protected function getMatcherDumperInstance() - { - return new $this->options['matcher_dumper_class']($this->getRouteCollection()); - } - - /** - * Provides the ConfigCache factory implementation, falling back to a - * default implementation if necessary. - */ - private function getConfigCacheFactory(): ConfigCacheFactoryInterface - { - if (null === $this->configCacheFactory) { - $this->configCacheFactory = new ConfigCacheFactory($this->options['debug']); - } - - return $this->configCacheFactory; - } - - private static function getCompiledRoutes(string $path): array - { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { - self::$cache = null; - } - - if (null === self::$cache) { - return require $path; - } - - if (isset(self::$cache[$path])) { - return self::$cache[$path]; - } - - return self::$cache[$path] = require $path; - } -} diff --git a/lib/symfony/routing/RouterInterface.php b/lib/symfony/routing/RouterInterface.php deleted file mode 100644 index 6912f8a15..000000000 --- a/lib/symfony/routing/RouterInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; - -/** - * RouterInterface is the interface that all Router classes must implement. - * - * This interface is the concatenation of UrlMatcherInterface and UrlGeneratorInterface. - * - * @author Fabien Potencier - */ -interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface -{ - /** - * Gets the RouteCollection instance associated with this Router. - * - * WARNING: This method should never be used at runtime as it is SLOW. - * You might use it in a cache warmer though. - * - * @return RouteCollection - */ - public function getRouteCollection(); -} diff --git a/lib/symfony/routing/composer.json b/lib/symfony/routing/composer.json deleted file mode 100644 index b978c0626..000000000 --- a/lib/symfony/routing/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "symfony/routing", - "type": "library", - "description": "Maps an HTTP request to a set of configuration variables", - "keywords": ["routing", "router", "URL", "URI"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/config": "^5.3|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "doctrine/annotations": "^1.12", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<5.3", - "symfony/dependency-injection": "<4.4", - "symfony/yaml": "<4.4" - }, - "suggest": { - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/yaml": "For using the YAML loader", - "symfony/expression-language": "For using expression matching" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Routing\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/service-contracts/.gitignore b/lib/symfony/service-contracts/.gitignore deleted file mode 100644 index c49a5d8df..000000000 --- a/lib/symfony/service-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/lib/symfony/service-contracts/Attribute/Required.php b/lib/symfony/service-contracts/Attribute/Required.php deleted file mode 100644 index 9df851189..000000000 --- a/lib/symfony/service-contracts/Attribute/Required.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Attribute; - -/** - * A required dependency. - * - * This attribute indicates that a property holds a required dependency. The annotated property or method should be - * considered during the instantiation process of the containing class. - * - * @author Alexander M. Turek - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class Required -{ -} diff --git a/lib/symfony/service-contracts/Attribute/SubscribedService.php b/lib/symfony/service-contracts/Attribute/SubscribedService.php deleted file mode 100644 index 10d1bc38e..000000000 --- a/lib/symfony/service-contracts/Attribute/SubscribedService.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Attribute; - -use Symfony\Contracts\Service\ServiceSubscriberTrait; - -/** - * Use with {@see ServiceSubscriberTrait} to mark a method's return type - * as a subscribed service. - * - * @author Kevin Bond - */ -#[\Attribute(\Attribute::TARGET_METHOD)] -final class SubscribedService -{ - /** - * @param string|null $key The key to use for the service - * If null, use "ClassName::methodName" - */ - public function __construct( - public ?string $key = null - ) { - } -} diff --git a/lib/symfony/service-contracts/CHANGELOG.md b/lib/symfony/service-contracts/CHANGELOG.md deleted file mode 100644 index 7932e2613..000000000 --- a/lib/symfony/service-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/lib/symfony/service-contracts/LICENSE b/lib/symfony/service-contracts/LICENSE deleted file mode 100644 index 74cdc2dbf..000000000 --- a/lib/symfony/service-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/service-contracts/README.md b/lib/symfony/service-contracts/README.md deleted file mode 100644 index 41e054a10..000000000 --- a/lib/symfony/service-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Service Contracts -========================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/lib/symfony/service-contracts/ResetInterface.php b/lib/symfony/service-contracts/ResetInterface.php deleted file mode 100644 index 1af1075ee..000000000 --- a/lib/symfony/service-contracts/ResetInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * Provides a way to reset an object to its initial state. - * - * When calling the "reset()" method on an object, it should be put back to its - * initial state. This usually means clearing any internal buffers and forwarding - * the call to internal dependencies. All properties of the object should be put - * back to the same state it had when it was first ready to use. - * - * This method could be called, for example, to recycle objects that are used as - * services, so that they can be used to handle several requests in the same - * process loop (note that we advise making your services stateless instead of - * implementing this interface when possible.) - */ -interface ResetInterface -{ - public function reset(); -} diff --git a/lib/symfony/service-contracts/ServiceLocatorTrait.php b/lib/symfony/service-contracts/ServiceLocatorTrait.php deleted file mode 100644 index 74dfa4362..000000000 --- a/lib/symfony/service-contracts/ServiceLocatorTrait.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerExceptionInterface; -use Psr\Container\NotFoundExceptionInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ContainerExceptionInterface::class); -class_exists(NotFoundExceptionInterface::class); - -/** - * A trait to help implement ServiceProviderInterface. - * - * @author Robin Chalas - * @author Nicolas Grekas - */ -trait ServiceLocatorTrait -{ - private $factories; - private $loading = []; - private $providedTypes; - - /** - * @param callable[] $factories - */ - public function __construct(array $factories) - { - $this->factories = $factories; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function has(string $id) - { - return isset($this->factories[$id]); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get(string $id) - { - if (!isset($this->factories[$id])) { - throw $this->createNotFoundException($id); - } - - if (isset($this->loading[$id])) { - $ids = array_values($this->loading); - $ids = \array_slice($this->loading, array_search($id, $ids)); - $ids[] = $id; - - throw $this->createCircularReferenceException($id, $ids); - } - - $this->loading[$id] = $id; - try { - return $this->factories[$id]($this); - } finally { - unset($this->loading[$id]); - } - } - - /** - * {@inheritdoc} - */ - public function getProvidedServices(): array - { - if (null === $this->providedTypes) { - $this->providedTypes = []; - - foreach ($this->factories as $name => $factory) { - if (!\is_callable($factory)) { - $this->providedTypes[$name] = '?'; - } else { - $type = (new \ReflectionFunction($factory))->getReturnType(); - - $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?'; - } - } - } - - return $this->providedTypes; - } - - private function createNotFoundException(string $id): NotFoundExceptionInterface - { - if (!$alternatives = array_keys($this->factories)) { - $message = 'is empty...'; - } else { - $last = array_pop($alternatives); - if ($alternatives) { - $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last); - } else { - $message = sprintf('only knows about the "%s" service.', $last); - } - } - - if ($this->loading) { - $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message); - } else { - $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message); - } - - return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface { - }; - } - - private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface - { - return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface { - }; - } -} diff --git a/lib/symfony/service-contracts/ServiceProviderInterface.php b/lib/symfony/service-contracts/ServiceProviderInterface.php deleted file mode 100644 index c60ad0bd4..000000000 --- a/lib/symfony/service-contracts/ServiceProviderInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; - -/** - * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. - * - * @author Nicolas Grekas - * @author Mateusz Sip - */ -interface ServiceProviderInterface extends ContainerInterface -{ - /** - * Returns an associative array of service types keyed by the identifiers provided by the current container. - * - * Examples: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface - * * ['foo' => '?'] means the container provides service name "foo" of unspecified type - * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null - * - * @return string[] The provided service types, keyed by service names - */ - public function getProvidedServices(): array; -} diff --git a/lib/symfony/service-contracts/ServiceSubscriberInterface.php b/lib/symfony/service-contracts/ServiceSubscriberInterface.php deleted file mode 100644 index 098ab908c..000000000 --- a/lib/symfony/service-contracts/ServiceSubscriberInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. - * - * The getSubscribedServices method returns an array of service types required by such instances, - * optionally keyed by the service names used internally. Service types that start with an interrogation - * mark "?" are optional, while the other ones are mandatory service dependencies. - * - * The injected service locators SHOULD NOT allow access to any other services not specified by the method. - * - * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally. - * This interface does not dictate any injection method for these service locators, although constructor - * injection is recommended. - * - * @author Nicolas Grekas - */ -interface ServiceSubscriberInterface -{ - /** - * Returns an array of service types required by such instances, optionally keyed by the service names used internally. - * - * For mandatory dependencies: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name - * internally to fetch a service which must implement Psr\Log\LoggerInterface. - * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name - * internally to fetch an iterable of Psr\Log\LoggerInterface instances. - * * ['Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface'] - * - * otherwise: - * - * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency - * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency - * * ['?Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] - * - * @return string[] The required service types, optionally keyed by service names - */ - public static function getSubscribedServices(); -} diff --git a/lib/symfony/service-contracts/ServiceSubscriberTrait.php b/lib/symfony/service-contracts/ServiceSubscriberTrait.php deleted file mode 100644 index 16e3eb2c1..000000000 --- a/lib/symfony/service-contracts/ServiceSubscriberTrait.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\Attribute\SubscribedService; - -/** - * Implementation of ServiceSubscriberInterface that determines subscribed services from - * method return types. Service ids are available as "ClassName::methodName". - * - * @author Kevin Bond - */ -trait ServiceSubscriberTrait -{ - /** @var ContainerInterface */ - protected $container; - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices(): array - { - $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : []; - $attributeOptIn = false; - - if (\PHP_VERSION_ID >= 80000) { - foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { - if (self::class !== $method->getDeclaringClass()->name) { - continue; - } - - if (!$attribute = $method->getAttributes(SubscribedService::class)[0] ?? null) { - continue; - } - - if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { - throw new \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name)); - } - - if (!$returnType = $method->getReturnType()) { - throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class)); - } - - $serviceId = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; - - if ($returnType->allowsNull()) { - $serviceId = '?'.$serviceId; - } - - $services[$attribute->newInstance()->key ?? self::class.'::'.$method->name] = $serviceId; - $attributeOptIn = true; - } - } - - if (!$attributeOptIn) { - foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { - if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { - continue; - } - - if (self::class !== $method->getDeclaringClass()->name) { - continue; - } - - if (!($returnType = $method->getReturnType()) instanceof \ReflectionNamedType) { - continue; - } - - if ($returnType->isBuiltin()) { - continue; - } - - if (\PHP_VERSION_ID >= 80000) { - trigger_deprecation('symfony/service-contracts', '2.5', 'Using "%s" in "%s" without using the "%s" attribute on any method is deprecated.', ServiceSubscriberTrait::class, self::class, SubscribedService::class); - } - - $services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType); - } - } - - return $services; - } - - /** - * @required - * - * @return ContainerInterface|null - */ - public function setContainer(ContainerInterface $container) - { - $this->container = $container; - - if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { - return parent::setContainer($container); - } - - return null; - } -} diff --git a/lib/symfony/service-contracts/composer.json b/lib/symfony/service-contracts/composer.json deleted file mode 100644 index f05863701..000000000 --- a/lib/symfony/service-contracts/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/service-contracts", - "type": "library", - "description": "Generic abstractions related to writing services", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Service\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/lib/symfony/stopwatch/CHANGELOG.md b/lib/symfony/stopwatch/CHANGELOG.md deleted file mode 100644 index f2fd7d0f0..000000000 --- a/lib/symfony/stopwatch/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -CHANGELOG -========= - -5.2 ---- - - * Add `name` argument to the `StopWatchEvent` constructor, accessible via a new `StopwatchEvent::getName()` - -5.0.0 ------ - - * Removed support for passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead. - -4.4.0 ------ - - * Deprecated passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead. - -3.4.0 ------ - - * added the `Stopwatch::reset()` method - * allowed to measure sub-millisecond times by introducing an argument to the - constructor of `Stopwatch` diff --git a/lib/symfony/stopwatch/LICENSE b/lib/symfony/stopwatch/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/stopwatch/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/stopwatch/README.md b/lib/symfony/stopwatch/README.md deleted file mode 100644 index 13a9dfa5f..000000000 --- a/lib/symfony/stopwatch/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Stopwatch Component -=================== - -The Stopwatch component provides a way to profile code. - -Getting Started ---------------- - -``` -$ composer require symfony/stopwatch -``` - -```php -use Symfony\Component\Stopwatch\Stopwatch; - -$stopwatch = new Stopwatch(); - -// optionally group events into sections (e.g. phases of the execution) -$stopwatch->openSection(); - -// starts event named 'eventName' -$stopwatch->start('eventName'); - -// ... run your code here - -// optionally, start a new "lap" time -$stopwatch->lap('foo'); - -// ... run your code here - -$event = $stopwatch->stop('eventName'); - -$stopwatch->stopSection('phase_1'); -``` - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/stopwatch/Section.php b/lib/symfony/stopwatch/Section.php deleted file mode 100644 index 56cdc6f12..000000000 --- a/lib/symfony/stopwatch/Section.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Stopwatch; - -/** - * Stopwatch section. - * - * @author Fabien Potencier - */ -class Section -{ - /** - * @var StopwatchEvent[] - */ - private $events = []; - - /** - * @var float|null - */ - private $origin; - - /** - * @var bool - */ - private $morePrecision; - - /** - * @var string - */ - private $id; - - /** - * @var Section[] - */ - private $children = []; - - /** - * @param float|null $origin Set the origin of the events in this section, use null to set their origin to their start time - * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision - */ - public function __construct(float $origin = null, bool $morePrecision = false) - { - $this->origin = $origin; - $this->morePrecision = $morePrecision; - } - - /** - * Returns the child section. - * - * @return self|null - */ - public function get(string $id) - { - foreach ($this->children as $child) { - if ($id === $child->getId()) { - return $child; - } - } - - return null; - } - - /** - * Creates or re-opens a child section. - * - * @param string|null $id Null to create a new section, the identifier to re-open an existing one - * - * @return self - */ - public function open(?string $id) - { - if (null === $id || null === $session = $this->get($id)) { - $session = $this->children[] = new self(microtime(true) * 1000, $this->morePrecision); - } - - return $session; - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Sets the session identifier. - * - * @return $this - */ - public function setId(string $id) - { - $this->id = $id; - - return $this; - } - - /** - * Starts an event. - * - * @return StopwatchEvent - */ - public function startEvent(string $name, ?string $category) - { - if (!isset($this->events[$name])) { - $this->events[$name] = new StopwatchEvent($this->origin ?: microtime(true) * 1000, $category, $this->morePrecision, $name); - } - - return $this->events[$name]->start(); - } - - /** - * Checks if the event was started. - * - * @return bool - */ - public function isEventStarted(string $name) - { - return isset($this->events[$name]) && $this->events[$name]->isStarted(); - } - - /** - * Stops an event. - * - * @return StopwatchEvent - * - * @throws \LogicException When the event has not been started - */ - public function stopEvent(string $name) - { - if (!isset($this->events[$name])) { - throw new \LogicException(sprintf('Event "%s" is not started.', $name)); - } - - return $this->events[$name]->stop(); - } - - /** - * Stops then restarts an event. - * - * @return StopwatchEvent - * - * @throws \LogicException When the event has not been started - */ - public function lap(string $name) - { - return $this->stopEvent($name)->start(); - } - - /** - * Returns a specific event by name. - * - * @return StopwatchEvent - * - * @throws \LogicException When the event is not known - */ - public function getEvent(string $name) - { - if (!isset($this->events[$name])) { - throw new \LogicException(sprintf('Event "%s" is not known.', $name)); - } - - return $this->events[$name]; - } - - /** - * Returns the events from this section. - * - * @return StopwatchEvent[] - */ - public function getEvents() - { - return $this->events; - } -} diff --git a/lib/symfony/stopwatch/Stopwatch.php b/lib/symfony/stopwatch/Stopwatch.php deleted file mode 100644 index 2f46c5998..000000000 --- a/lib/symfony/stopwatch/Stopwatch.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Stopwatch; - -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(Section::class); - -/** - * Stopwatch provides a way to profile code. - * - * @author Fabien Potencier - */ -class Stopwatch implements ResetInterface -{ - /** - * @var bool - */ - private $morePrecision; - - /** - * @var Section[] - */ - private $sections; - - /** - * @var Section[] - */ - private $activeSections; - - /** - * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision - */ - public function __construct(bool $morePrecision = false) - { - $this->morePrecision = $morePrecision; - $this->reset(); - } - - /** - * @return Section[] - */ - public function getSections() - { - return $this->sections; - } - - /** - * Creates a new section or re-opens an existing section. - * - * @param string|null $id The id of the session to re-open, null to create a new one - * - * @throws \LogicException When the section to re-open is not reachable - */ - public function openSection(string $id = null) - { - $current = end($this->activeSections); - - if (null !== $id && null === $current->get($id)) { - throw new \LogicException(sprintf('The section "%s" has been started at an other level and cannot be opened.', $id)); - } - - $this->start('__section__.child', 'section'); - $this->activeSections[] = $current->open($id); - $this->start('__section__'); - } - - /** - * Stops the last started section. - * - * The id parameter is used to retrieve the events from this section. - * - * @see getSectionEvents() - * - * @throws \LogicException When there's no started section to be stopped - */ - public function stopSection(string $id) - { - $this->stop('__section__'); - - if (1 == \count($this->activeSections)) { - throw new \LogicException('There is no started section to stop.'); - } - - $this->sections[$id] = array_pop($this->activeSections)->setId($id); - $this->stop('__section__.child'); - } - - /** - * Starts an event. - * - * @return StopwatchEvent - */ - public function start(string $name, string $category = null) - { - return end($this->activeSections)->startEvent($name, $category); - } - - /** - * Checks if the event was started. - * - * @return bool - */ - public function isStarted(string $name) - { - return end($this->activeSections)->isEventStarted($name); - } - - /** - * Stops an event. - * - * @return StopwatchEvent - */ - public function stop(string $name) - { - return end($this->activeSections)->stopEvent($name); - } - - /** - * Stops then restarts an event. - * - * @return StopwatchEvent - */ - public function lap(string $name) - { - return end($this->activeSections)->stopEvent($name)->start(); - } - - /** - * Returns a specific event by name. - * - * @return StopwatchEvent - */ - public function getEvent(string $name) - { - return end($this->activeSections)->getEvent($name); - } - - /** - * Gets all events for a given section. - * - * @return StopwatchEvent[] - */ - public function getSectionEvents(string $id) - { - return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : []; - } - - /** - * Resets the stopwatch to its original state. - */ - public function reset() - { - $this->sections = $this->activeSections = ['__root__' => new Section(null, $this->morePrecision)]; - } -} diff --git a/lib/symfony/stopwatch/StopwatchEvent.php b/lib/symfony/stopwatch/StopwatchEvent.php deleted file mode 100644 index 945bc7029..000000000 --- a/lib/symfony/stopwatch/StopwatchEvent.php +++ /dev/null @@ -1,258 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Stopwatch; - -/** - * Represents an Event managed by Stopwatch. - * - * @author Fabien Potencier - */ -class StopwatchEvent -{ - /** - * @var StopwatchPeriod[] - */ - private $periods = []; - - /** - * @var float - */ - private $origin; - - /** - * @var string - */ - private $category; - - /** - * @var bool - */ - private $morePrecision; - - /** - * @var float[] - */ - private $started = []; - - /** - * @var string - */ - private $name; - - /** - * @param float $origin The origin time in milliseconds - * @param string|null $category The event category or null to use the default - * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision - * @param string|null $name The event name or null to define the name as default - * - * @throws \InvalidArgumentException When the raw time is not valid - */ - public function __construct(float $origin, string $category = null, bool $morePrecision = false, string $name = null) - { - $this->origin = $this->formatTime($origin); - $this->category = \is_string($category) ? $category : 'default'; - $this->morePrecision = $morePrecision; - $this->name = $name ?? 'default'; - } - - /** - * Gets the category. - * - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * Gets the origin in milliseconds. - * - * @return float - */ - public function getOrigin() - { - return $this->origin; - } - - /** - * Starts a new event period. - * - * @return $this - */ - public function start() - { - $this->started[] = $this->getNow(); - - return $this; - } - - /** - * Stops the last started event period. - * - * @return $this - * - * @throws \LogicException When stop() is called without a matching call to start() - */ - public function stop() - { - if (!\count($this->started)) { - throw new \LogicException('stop() called but start() has not been called before.'); - } - - $this->periods[] = new StopwatchPeriod(array_pop($this->started), $this->getNow(), $this->morePrecision); - - return $this; - } - - /** - * Checks if the event was started. - * - * @return bool - */ - public function isStarted() - { - return !empty($this->started); - } - - /** - * Stops the current period and then starts a new one. - * - * @return $this - */ - public function lap() - { - return $this->stop()->start(); - } - - /** - * Stops all non already stopped periods. - */ - public function ensureStopped() - { - while (\count($this->started)) { - $this->stop(); - } - } - - /** - * Gets all event periods. - * - * @return StopwatchPeriod[] - */ - public function getPeriods() - { - return $this->periods; - } - - /** - * Gets the relative time of the start of the first period in milliseconds. - * - * @return int|float - */ - public function getStartTime() - { - if (isset($this->periods[0])) { - return $this->periods[0]->getStartTime(); - } - - if ($this->started) { - return $this->started[0]; - } - - return 0; - } - - /** - * Gets the relative time of the end of the last period in milliseconds. - * - * @return int|float - */ - public function getEndTime() - { - $count = \count($this->periods); - - return $count ? $this->periods[$count - 1]->getEndTime() : 0; - } - - /** - * Gets the duration of the events in milliseconds (including all periods). - * - * @return int|float - */ - public function getDuration() - { - $periods = $this->periods; - $left = \count($this->started); - - for ($i = $left - 1; $i >= 0; --$i) { - $periods[] = new StopwatchPeriod($this->started[$i], $this->getNow(), $this->morePrecision); - } - - $total = 0; - foreach ($periods as $period) { - $total += $period->getDuration(); - } - - return $total; - } - - /** - * Gets the max memory usage of all periods in bytes. - * - * @return int - */ - public function getMemory() - { - $memory = 0; - foreach ($this->periods as $period) { - if ($period->getMemory() > $memory) { - $memory = $period->getMemory(); - } - } - - return $memory; - } - - /** - * Return the current time relative to origin in milliseconds. - * - * @return float - */ - protected function getNow() - { - return $this->formatTime(microtime(true) * 1000 - $this->origin); - } - - /** - * Formats a time. - * - * @throws \InvalidArgumentException When the raw time is not valid - */ - private function formatTime(float $time): float - { - return round($time, 1); - } - - /** - * Gets the event name. - */ - public function getName(): string - { - return $this->name; - } - - public function __toString(): string - { - return sprintf('%s/%s: %.2F MiB - %d ms', $this->getCategory(), $this->getName(), $this->getMemory() / 1024 / 1024, $this->getDuration()); - } -} diff --git a/lib/symfony/stopwatch/StopwatchPeriod.php b/lib/symfony/stopwatch/StopwatchPeriod.php deleted file mode 100644 index 7a7ae1a77..000000000 --- a/lib/symfony/stopwatch/StopwatchPeriod.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Stopwatch; - -/** - * Represents an Period for an Event. - * - * @author Fabien Potencier - */ -class StopwatchPeriod -{ - private $start; - private $end; - private $memory; - - /** - * @param int|float $start The relative time of the start of the period (in milliseconds) - * @param int|float $end The relative time of the end of the period (in milliseconds) - * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision - */ - public function __construct($start, $end, bool $morePrecision = false) - { - $this->start = $morePrecision ? (float) $start : (int) $start; - $this->end = $morePrecision ? (float) $end : (int) $end; - $this->memory = memory_get_usage(true); - } - - /** - * Gets the relative time of the start of the period in milliseconds. - * - * @return int|float - */ - public function getStartTime() - { - return $this->start; - } - - /** - * Gets the relative time of the end of the period in milliseconds. - * - * @return int|float - */ - public function getEndTime() - { - return $this->end; - } - - /** - * Gets the time spent in this period in milliseconds. - * - * @return int|float - */ - public function getDuration() - { - return $this->end - $this->start; - } - - /** - * Gets the memory usage in bytes. - * - * @return int - */ - public function getMemory() - { - return $this->memory; - } - - public function __toString(): string - { - return sprintf('%.2F MiB - %d ms', $this->getMemory() / 1024 / 1024, $this->getDuration()); - } -} diff --git a/lib/symfony/stopwatch/composer.json b/lib/symfony/stopwatch/composer.json deleted file mode 100644 index ed918d36f..000000000 --- a/lib/symfony/stopwatch/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "symfony/stopwatch", - "type": "library", - "description": "Provides a way to profile code", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Stopwatch\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/string/AbstractString.php b/lib/symfony/string/AbstractString.php deleted file mode 100644 index cf21fef1f..000000000 --- a/lib/symfony/string/AbstractString.php +++ /dev/null @@ -1,795 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; -use Symfony\Component\String\Exception\RuntimeException; - -/** - * Represents a string of abstract characters. - * - * Unicode defines 3 types of "characters" (bytes, code points and grapheme clusters). - * This class is the abstract type to use as a type-hint when the logic you want to - * implement doesn't care about the exact variant it deals with. - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -abstract class AbstractString implements \Stringable, \JsonSerializable -{ - public const PREG_PATTERN_ORDER = \PREG_PATTERN_ORDER; - public const PREG_SET_ORDER = \PREG_SET_ORDER; - public const PREG_OFFSET_CAPTURE = \PREG_OFFSET_CAPTURE; - public const PREG_UNMATCHED_AS_NULL = \PREG_UNMATCHED_AS_NULL; - - public const PREG_SPLIT = 0; - public const PREG_SPLIT_NO_EMPTY = \PREG_SPLIT_NO_EMPTY; - public const PREG_SPLIT_DELIM_CAPTURE = \PREG_SPLIT_DELIM_CAPTURE; - public const PREG_SPLIT_OFFSET_CAPTURE = \PREG_SPLIT_OFFSET_CAPTURE; - - protected $string = ''; - protected $ignoreCase = false; - - abstract public function __construct(string $string = ''); - - /** - * Unwraps instances of AbstractString back to strings. - * - * @return string[]|array - */ - public static function unwrap(array $values): array - { - foreach ($values as $k => $v) { - if ($v instanceof self) { - $values[$k] = $v->__toString(); - } elseif (\is_array($v) && $values[$k] !== $v = static::unwrap($v)) { - $values[$k] = $v; - } - } - - return $values; - } - - /** - * Wraps (and normalizes) strings in instances of AbstractString. - * - * @return static[]|array - */ - public static function wrap(array $values): array - { - $i = 0; - $keys = null; - - foreach ($values as $k => $v) { - if (\is_string($k) && '' !== $k && $k !== $j = (string) new static($k)) { - $keys = $keys ?? array_keys($values); - $keys[$i] = $j; - } - - if (\is_string($v)) { - $values[$k] = new static($v); - } elseif (\is_array($v) && $values[$k] !== $v = static::wrap($v)) { - $values[$k] = $v; - } - - ++$i; - } - - return null !== $keys ? array_combine($keys, $values) : $values; - } - - /** - * @param string|string[] $needle - * - * @return static - */ - public function after($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = \PHP_INT_MAX; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOf($n, $offset); - - if (null !== $j && $j < $i) { - $i = $j; - $str->string = $n; - } - } - - if (\PHP_INT_MAX === $i) { - return $str; - } - - if (!$includeNeedle) { - $i += $str->length(); - } - - return $this->slice($i); - } - - /** - * @param string|string[] $needle - * - * @return static - */ - public function afterLast($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = null; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOfLast($n, $offset); - - if (null !== $j && $j >= $i) { - $i = $offset = $j; - $str->string = $n; - } - } - - if (null === $i) { - return $str; - } - - if (!$includeNeedle) { - $i += $str->length(); - } - - return $this->slice($i); - } - - /** - * @return static - */ - abstract public function append(string ...$suffix): self; - - /** - * @param string|string[] $needle - * - * @return static - */ - public function before($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = \PHP_INT_MAX; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOf($n, $offset); - - if (null !== $j && $j < $i) { - $i = $j; - $str->string = $n; - } - } - - if (\PHP_INT_MAX === $i) { - return $str; - } - - if ($includeNeedle) { - $i += $str->length(); - } - - return $this->slice(0, $i); - } - - /** - * @param string|string[] $needle - * - * @return static - */ - public function beforeLast($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = null; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOfLast($n, $offset); - - if (null !== $j && $j >= $i) { - $i = $offset = $j; - $str->string = $n; - } - } - - if (null === $i) { - return $str; - } - - if ($includeNeedle) { - $i += $str->length(); - } - - return $this->slice(0, $i); - } - - /** - * @return int[] - */ - public function bytesAt(int $offset): array - { - $str = $this->slice($offset, 1); - - return '' === $str->string ? [] : array_values(unpack('C*', $str->string)); - } - - /** - * @return static - */ - abstract public function camel(): self; - - /** - * @return static[] - */ - abstract public function chunk(int $length = 1): array; - - /** - * @return static - */ - public function collapseWhitespace(): self - { - $str = clone $this; - $str->string = trim(preg_replace('/(?:\s{2,}+|[^\S ])/', ' ', $str->string)); - - return $str; - } - - /** - * @param string|string[] $needle - */ - public function containsAny($needle): bool - { - return null !== $this->indexOf($needle); - } - - /** - * @param string|string[] $suffix - */ - public function endsWith($suffix): bool - { - if (!\is_array($suffix) && !$suffix instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - foreach ($suffix as $s) { - if ($this->endsWith((string) $s)) { - return true; - } - } - - return false; - } - - /** - * @return static - */ - public function ensureEnd(string $suffix): self - { - if (!$this->endsWith($suffix)) { - return $this->append($suffix); - } - - $suffix = preg_quote($suffix); - $regex = '{('.$suffix.')(?:'.$suffix.')++$}D'; - - return $this->replaceMatches($regex.($this->ignoreCase ? 'i' : ''), '$1'); - } - - /** - * @return static - */ - public function ensureStart(string $prefix): self - { - $prefix = new static($prefix); - - if (!$this->startsWith($prefix)) { - return $this->prepend($prefix); - } - - $str = clone $this; - $i = $prefixLen = $prefix->length(); - - while ($this->indexOf($prefix, $i) === $i) { - $str = $str->slice($prefixLen); - $i += $prefixLen; - } - - return $str; - } - - /** - * @param string|string[] $string - */ - public function equalsTo($string): bool - { - if (!\is_array($string) && !$string instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - foreach ($string as $s) { - if ($this->equalsTo((string) $s)) { - return true; - } - } - - return false; - } - - /** - * @return static - */ - abstract public function folded(): self; - - /** - * @return static - */ - public function ignoreCase(): self - { - $str = clone $this; - $str->ignoreCase = true; - - return $str; - } - - /** - * @param string|string[] $needle - */ - public function indexOf($needle, int $offset = 0): ?int - { - if (!\is_array($needle) && !$needle instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - $i = \PHP_INT_MAX; - - foreach ($needle as $n) { - $j = $this->indexOf((string) $n, $offset); - - if (null !== $j && $j < $i) { - $i = $j; - } - } - - return \PHP_INT_MAX === $i ? null : $i; - } - - /** - * @param string|string[] $needle - */ - public function indexOfLast($needle, int $offset = 0): ?int - { - if (!\is_array($needle) && !$needle instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - $i = null; - - foreach ($needle as $n) { - $j = $this->indexOfLast((string) $n, $offset); - - if (null !== $j && $j >= $i) { - $i = $offset = $j; - } - } - - return $i; - } - - public function isEmpty(): bool - { - return '' === $this->string; - } - - /** - * @return static - */ - abstract public function join(array $strings, string $lastGlue = null): self; - - public function jsonSerialize(): string - { - return $this->string; - } - - abstract public function length(): int; - - /** - * @return static - */ - abstract public function lower(): self; - - /** - * Matches the string using a regular expression. - * - * Pass PREG_PATTERN_ORDER or PREG_SET_ORDER as $flags to get all occurrences matching the regular expression. - * - * @return array All matches in a multi-dimensional array ordered according to flags - */ - abstract public function match(string $regexp, int $flags = 0, int $offset = 0): array; - - /** - * @return static - */ - abstract public function padBoth(int $length, string $padStr = ' '): self; - - /** - * @return static - */ - abstract public function padEnd(int $length, string $padStr = ' '): self; - - /** - * @return static - */ - abstract public function padStart(int $length, string $padStr = ' '): self; - - /** - * @return static - */ - abstract public function prepend(string ...$prefix): self; - - /** - * @return static - */ - public function repeat(int $multiplier): self - { - if (0 > $multiplier) { - throw new InvalidArgumentException(sprintf('Multiplier must be positive, %d given.', $multiplier)); - } - - $str = clone $this; - $str->string = str_repeat($str->string, $multiplier); - - return $str; - } - - /** - * @return static - */ - abstract public function replace(string $from, string $to): self; - - /** - * @param string|callable $to - * - * @return static - */ - abstract public function replaceMatches(string $fromRegexp, $to): self; - - /** - * @return static - */ - abstract public function reverse(): self; - - /** - * @return static - */ - abstract public function slice(int $start = 0, int $length = null): self; - - /** - * @return static - */ - abstract public function snake(): self; - - /** - * @return static - */ - abstract public function splice(string $replacement, int $start = 0, int $length = null): self; - - /** - * @return static[] - */ - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (null === $flags) { - throw new \TypeError('Split behavior when $flags is null must be implemented by child classes.'); - } - - if ($this->ignoreCase) { - $delimiter .= 'i'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (false === $chunks = preg_split($delimiter, $this->string, $limit, $flags)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Splitting failed with '.$k.'.'); - } - } - - throw new RuntimeException('Splitting failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - $str = clone $this; - - if (self::PREG_SPLIT_OFFSET_CAPTURE & $flags) { - foreach ($chunks as &$chunk) { - $str->string = $chunk[0]; - $chunk[0] = clone $str; - } - } else { - foreach ($chunks as &$chunk) { - $str->string = $chunk; - $chunk = clone $str; - } - } - - return $chunks; - } - - /** - * @param string|string[] $prefix - */ - public function startsWith($prefix): bool - { - if (!\is_array($prefix) && !$prefix instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - foreach ($prefix as $prefix) { - if ($this->startsWith((string) $prefix)) { - return true; - } - } - - return false; - } - - /** - * @return static - */ - abstract public function title(bool $allWords = false): self; - - public function toByteString(string $toEncoding = null): ByteString - { - $b = new ByteString(); - - $toEncoding = \in_array($toEncoding, ['utf8', 'utf-8', 'UTF8'], true) ? 'UTF-8' : $toEncoding; - - if (null === $toEncoding || $toEncoding === $fromEncoding = $this instanceof AbstractUnicodeString || preg_match('//u', $b->string) ? 'UTF-8' : 'Windows-1252') { - $b->string = $this->string; - - return $b; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - try { - $b->string = mb_convert_encoding($this->string, $toEncoding, 'UTF-8'); - } catch (InvalidArgumentException $e) { - if (!\function_exists('iconv')) { - throw $e; - } - - $b->string = iconv('UTF-8', $toEncoding, $this->string); - } - } finally { - restore_error_handler(); - } - - return $b; - } - - public function toCodePointString(): CodePointString - { - return new CodePointString($this->string); - } - - public function toString(): string - { - return $this->string; - } - - public function toUnicodeString(): UnicodeString - { - return new UnicodeString($this->string); - } - - /** - * @return static - */ - abstract public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; - - /** - * @return static - */ - abstract public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; - - /** - * @param string|string[] $prefix - * - * @return static - */ - public function trimPrefix($prefix): self - { - if (\is_array($prefix) || $prefix instanceof \Traversable) { - foreach ($prefix as $s) { - $t = $this->trimPrefix($s); - - if ($t->string !== $this->string) { - return $t; - } - } - - return clone $this; - } - - $str = clone $this; - - if ($prefix instanceof self) { - $prefix = $prefix->string; - } else { - $prefix = (string) $prefix; - } - - if ('' !== $prefix && \strlen($this->string) >= \strlen($prefix) && 0 === substr_compare($this->string, $prefix, 0, \strlen($prefix), $this->ignoreCase)) { - $str->string = substr($this->string, \strlen($prefix)); - } - - return $str; - } - - /** - * @return static - */ - abstract public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; - - /** - * @param string|string[] $suffix - * - * @return static - */ - public function trimSuffix($suffix): self - { - if (\is_array($suffix) || $suffix instanceof \Traversable) { - foreach ($suffix as $s) { - $t = $this->trimSuffix($s); - - if ($t->string !== $this->string) { - return $t; - } - } - - return clone $this; - } - - $str = clone $this; - - if ($suffix instanceof self) { - $suffix = $suffix->string; - } else { - $suffix = (string) $suffix; - } - - if ('' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase)) { - $str->string = substr($this->string, 0, -\strlen($suffix)); - } - - return $str; - } - - /** - * @return static - */ - public function truncate(int $length, string $ellipsis = '', bool $cut = true): self - { - $stringLength = $this->length(); - - if ($stringLength <= $length) { - return clone $this; - } - - $ellipsisLength = '' !== $ellipsis ? (new static($ellipsis))->length() : 0; - - if ($length < $ellipsisLength) { - $ellipsisLength = 0; - } - - if (!$cut) { - if (null === $length = $this->indexOf([' ', "\r", "\n", "\t"], ($length ?: 1) - 1)) { - return clone $this; - } - - $length += $ellipsisLength; - } - - $str = $this->slice(0, $length - $ellipsisLength); - - return $ellipsisLength ? $str->trimEnd()->append($ellipsis) : $str; - } - - /** - * @return static - */ - abstract public function upper(): self; - - /** - * Returns the printable length on a terminal. - */ - abstract public function width(bool $ignoreAnsiDecoration = true): int; - - /** - * @return static - */ - public function wordwrap(int $width = 75, string $break = "\n", bool $cut = false): self - { - $lines = '' !== $break ? $this->split($break) : [clone $this]; - $chars = []; - $mask = ''; - - if (1 === \count($lines) && '' === $lines[0]->string) { - return $lines[0]; - } - - foreach ($lines as $i => $line) { - if ($i) { - $chars[] = $break; - $mask .= '#'; - } - - foreach ($line->chunk() as $char) { - $chars[] = $char->string; - $mask .= ' ' === $char->string ? ' ' : '?'; - } - } - - $string = ''; - $j = 0; - $b = $i = -1; - $mask = wordwrap($mask, $width, '#', $cut); - - while (false !== $b = strpos($mask, '#', $b + 1)) { - for (++$i; $i < $b; ++$i) { - $string .= $chars[$j]; - unset($chars[$j++]); - } - - if ($break === $chars[$j] || ' ' === $chars[$j]) { - unset($chars[$j++]); - } - - $string .= $break; - } - - $str = clone $this; - $str->string = $string.implode('', $chars); - - return $str; - } - - public function __sleep(): array - { - return ['string']; - } - - public function __clone() - { - $this->ignoreCase = false; - } - - public function __toString(): string - { - return $this->string; - } -} diff --git a/lib/symfony/string/AbstractUnicodeString.php b/lib/symfony/string/AbstractUnicodeString.php deleted file mode 100644 index a482300d2..000000000 --- a/lib/symfony/string/AbstractUnicodeString.php +++ /dev/null @@ -1,623 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; -use Symfony\Component\String\Exception\RuntimeException; - -/** - * Represents a string of abstract Unicode characters. - * - * Unicode defines 3 types of "characters" (bytes, code points and grapheme clusters). - * This class is the abstract type to use as a type-hint when the logic you want to - * implement is Unicode-aware but doesn't care about code points vs grapheme clusters. - * - * @author Nicolas Grekas - * - * @throws ExceptionInterface - */ -abstract class AbstractUnicodeString extends AbstractString -{ - public const NFC = \Normalizer::NFC; - public const NFD = \Normalizer::NFD; - public const NFKC = \Normalizer::NFKC; - public const NFKD = \Normalizer::NFKD; - - // all ASCII letters sorted by typical frequency of occurrence - private const ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - - // the subset of folded case mappings that is not in lower case mappings - private const FOLD_FROM = ['İ', 'µ', 'ſ', "\xCD\x85", 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', "\xE1\xBE\xBE", 'ß', 'İ', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'և', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ẞ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'ᾐ', 'ᾑ', 'ᾒ', 'ᾓ', 'ᾔ', 'ᾕ', 'ᾖ', 'ᾗ', 'ᾘ', 'ᾙ', 'ᾚ', 'ᾛ', 'ᾜ', 'ᾝ', 'ᾞ', 'ᾟ', 'ᾠ', 'ᾡ', 'ᾢ', 'ᾣ', 'ᾤ', 'ᾥ', 'ᾦ', 'ᾧ', 'ᾨ', 'ᾩ', 'ᾪ', 'ᾫ', 'ᾬ', 'ᾭ', 'ᾮ', 'ᾯ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'ᾼ', 'ῂ', 'ῃ', 'ῄ', 'ῆ', 'ῇ', 'ῌ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῲ', 'ῳ', 'ῴ', 'ῶ', 'ῷ', 'ῼ', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ']; - private const FOLD_TO = ['i̇', 'μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι', 'ss', 'i̇', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'եւ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'aʾ', 'ss', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὰι', 'αι', 'άι', 'ᾶ', 'ᾶι', 'αι', 'ὴι', 'ηι', 'ήι', 'ῆ', 'ῆι', 'ηι', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ὼι', 'ωι', 'ώι', 'ῶ', 'ῶι', 'ωι', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'st', 'st', 'մն', 'մե', 'մի', 'վն', 'մխ']; - - // the subset of upper case mappings that map one code point to many code points - private const UPPER_FROM = ['ß', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'և', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ', 'ʼn', 'ΐ', 'ΰ', 'ǰ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾶ', 'ῆ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῶ']; - private const UPPER_TO = ['SS', 'FF', 'FI', 'FL', 'FFI', 'FFL', 'ST', 'ST', 'ԵՒ', 'ՄՆ', 'ՄԵ', 'ՄԻ', 'ՎՆ', 'ՄԽ', 'ʼN', 'Ϊ́', 'Ϋ́', 'J̌', 'H̱', 'T̈', 'W̊', 'Y̊', 'Aʾ', 'Υ̓', 'Υ̓̀', 'Υ̓́', 'Υ̓͂', 'Α͂', 'Η͂', 'Ϊ̀', 'Ϊ́', 'Ι͂', 'Ϊ͂', 'Ϋ̀', 'Ϋ́', 'Ρ̓', 'Υ͂', 'Ϋ͂', 'Ω͂']; - - // the subset of https://github.com/unicode-org/cldr/blob/master/common/transforms/Latin-ASCII.xml that is not in NFKD - private const TRANSLIT_FROM = ['Æ', 'Ð', 'Ø', 'Þ', 'ß', 'æ', 'ð', 'ø', 'þ', 'Đ', 'đ', 'Ħ', 'ħ', 'ı', 'ĸ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'ʼn', 'Ŋ', 'ŋ', 'Œ', 'œ', 'Ŧ', 'ŧ', 'ƀ', 'Ɓ', 'Ƃ', 'ƃ', 'Ƈ', 'ƈ', 'Ɖ', 'Ɗ', 'Ƌ', 'ƌ', 'Ɛ', 'Ƒ', 'ƒ', 'Ɠ', 'ƕ', 'Ɩ', 'Ɨ', 'Ƙ', 'ƙ', 'ƚ', 'Ɲ', 'ƞ', 'Ƣ', 'ƣ', 'Ƥ', 'ƥ', 'ƫ', 'Ƭ', 'ƭ', 'Ʈ', 'Ʋ', 'Ƴ', 'ƴ', 'Ƶ', 'ƶ', 'DŽ', 'Dž', 'dž', 'Ǥ', 'ǥ', 'ȡ', 'Ȥ', 'ȥ', 'ȴ', 'ȵ', 'ȶ', 'ȷ', 'ȸ', 'ȹ', 'Ⱥ', 'Ȼ', 'ȼ', 'Ƚ', 'Ⱦ', 'ȿ', 'ɀ', 'Ƀ', 'Ʉ', 'Ɇ', 'ɇ', 'Ɉ', 'ɉ', 'Ɍ', 'ɍ', 'Ɏ', 'ɏ', 'ɓ', 'ɕ', 'ɖ', 'ɗ', 'ɛ', 'ɟ', 'ɠ', 'ɡ', 'ɢ', 'ɦ', 'ɧ', 'ɨ', 'ɪ', 'ɫ', 'ɬ', 'ɭ', 'ɱ', 'ɲ', 'ɳ', 'ɴ', 'ɶ', 'ɼ', 'ɽ', 'ɾ', 'ʀ', 'ʂ', 'ʈ', 'ʉ', 'ʋ', 'ʏ', 'ʐ', 'ʑ', 'ʙ', 'ʛ', 'ʜ', 'ʝ', 'ʟ', 'ʠ', 'ʣ', 'ʥ', 'ʦ', 'ʪ', 'ʫ', 'ᴀ', 'ᴁ', 'ᴃ', 'ᴄ', 'ᴅ', 'ᴆ', 'ᴇ', 'ᴊ', 'ᴋ', 'ᴌ', 'ᴍ', 'ᴏ', 'ᴘ', 'ᴛ', 'ᴜ', 'ᴠ', 'ᴡ', 'ᴢ', 'ᵫ', 'ᵬ', 'ᵭ', 'ᵮ', 'ᵯ', 'ᵰ', 'ᵱ', 'ᵲ', 'ᵳ', 'ᵴ', 'ᵵ', 'ᵶ', 'ᵺ', 'ᵻ', 'ᵽ', 'ᵾ', 'ᶀ', 'ᶁ', 'ᶂ', 'ᶃ', 'ᶄ', 'ᶅ', 'ᶆ', 'ᶇ', 'ᶈ', 'ᶉ', 'ᶊ', 'ᶌ', 'ᶍ', 'ᶎ', 'ᶏ', 'ᶑ', 'ᶒ', 'ᶓ', 'ᶖ', 'ᶙ', 'ẚ', 'ẜ', 'ẝ', 'ẞ', 'Ỻ', 'ỻ', 'Ỽ', 'ỽ', 'Ỿ', 'ỿ', '©', '®', '₠', '₢', '₣', '₤', '₧', '₺', '₹', 'ℌ', '℞', '㎧', '㎮', '㏆', '㏗', '㏞', '㏟', '¼', '½', '¾', '⅓', '⅔', '⅕', '⅖', '⅗', '⅘', '⅙', '⅚', '⅛', '⅜', '⅝', '⅞', '⅟', '〇', '‘', '’', '‚', '‛', '“', '”', '„', '‟', '′', '″', '〝', '〞', '«', '»', '‹', '›', '‐', '‑', '‒', '–', '—', '―', '︱', '︲', '﹘', '‖', '⁄', '⁅', '⁆', '⁎', '、', '。', '〈', '〉', '《', '》', '〔', '〕', '〘', '〙', '〚', '〛', '︑', '︒', '︹', '︺', '︽', '︾', '︿', '﹀', '﹑', '﹝', '﹞', '⦅', '⦆', '。', '、', '×', '÷', '−', '∕', '∖', '∣', '∥', '≪', '≫', '⦅', '⦆']; - private const TRANSLIT_TO = ['AE', 'D', 'O', 'TH', 'ss', 'ae', 'd', 'o', 'th', 'D', 'd', 'H', 'h', 'i', 'q', 'L', 'l', 'L', 'l', '\'n', 'N', 'n', 'OE', 'oe', 'T', 't', 'b', 'B', 'B', 'b', 'C', 'c', 'D', 'D', 'D', 'd', 'E', 'F', 'f', 'G', 'hv', 'I', 'I', 'K', 'k', 'l', 'N', 'n', 'OI', 'oi', 'P', 'p', 't', 'T', 't', 'T', 'V', 'Y', 'y', 'Z', 'z', 'DZ', 'Dz', 'dz', 'G', 'g', 'd', 'Z', 'z', 'l', 'n', 't', 'j', 'db', 'qp', 'A', 'C', 'c', 'L', 'T', 's', 'z', 'B', 'U', 'E', 'e', 'J', 'j', 'R', 'r', 'Y', 'y', 'b', 'c', 'd', 'd', 'e', 'j', 'g', 'g', 'G', 'h', 'h', 'i', 'I', 'l', 'l', 'l', 'm', 'n', 'n', 'N', 'OE', 'r', 'r', 'r', 'R', 's', 't', 'u', 'v', 'Y', 'z', 'z', 'B', 'G', 'H', 'j', 'L', 'q', 'dz', 'dz', 'ts', 'ls', 'lz', 'A', 'AE', 'B', 'C', 'D', 'D', 'E', 'J', 'K', 'L', 'M', 'O', 'P', 'T', 'U', 'V', 'W', 'Z', 'ue', 'b', 'd', 'f', 'm', 'n', 'p', 'r', 'r', 's', 't', 'z', 'th', 'I', 'p', 'U', 'b', 'd', 'f', 'g', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'v', 'x', 'z', 'a', 'd', 'e', 'e', 'i', 'u', 'a', 's', 's', 'SS', 'LL', 'll', 'V', 'v', 'Y', 'y', '(C)', '(R)', 'CE', 'Cr', 'Fr.', 'L.', 'Pts', 'TL', 'Rs', 'x', 'Rx', 'm/s', 'rad/s', 'C/kg', 'pH', 'V/m', 'A/m', ' 1/4', ' 1/2', ' 3/4', ' 1/3', ' 2/3', ' 1/5', ' 2/5', ' 3/5', ' 4/5', ' 1/6', ' 5/6', ' 1/8', ' 3/8', ' 5/8', ' 7/8', ' 1/', '0', '\'', '\'', ',', '\'', '"', '"', ',,', '"', '\'', '"', '"', '"', '<<', '>>', '<', '>', '-', '-', '-', '-', '-', '-', '-', '-', '-', '||', '/', '[', ']', '*', ',', '.', '<', '>', '<<', '>>', '[', ']', '[', ']', '[', ']', ',', '.', '[', ']', '<<', '>>', '<', '>', ',', '[', ']', '((', '))', '.', ',', '*', '/', '-', '/', '\\', '|', '||', '<<', '>>', '((', '))']; - - private static $transliterators = []; - private static $tableZero; - private static $tableWide; - - /** - * @return static - */ - public static function fromCodePoints(int ...$codes): self - { - $string = ''; - - foreach ($codes as $code) { - if (0x80 > $code %= 0x200000) { - $string .= \chr($code); - } elseif (0x800 > $code) { - $string .= \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $string .= \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $string .= \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - } - - return new static($string); - } - - /** - * Generic UTF-8 to ASCII transliteration. - * - * Install the intl extension for best results. - * - * @param string[]|\Transliterator[]|\Closure[] $rules See "*-Latin" rules from Transliterator::listIDs() - */ - public function ascii(array $rules = []): self - { - $str = clone $this; - $s = $str->string; - $str->string = ''; - - array_unshift($rules, 'nfd'); - $rules[] = 'latin-ascii'; - - if (\function_exists('transliterator_transliterate')) { - $rules[] = 'any-latin/bgn'; - } - - $rules[] = 'nfkd'; - $rules[] = '[:nonspacing mark:] remove'; - - while (\strlen($s) - 1 > $i = strspn($s, self::ASCII)) { - if (0 < --$i) { - $str->string .= substr($s, 0, $i); - $s = substr($s, $i); - } - - if (!$rule = array_shift($rules)) { - $rules = []; // An empty rule interrupts the next ones - } - - if ($rule instanceof \Transliterator) { - $s = $rule->transliterate($s); - } elseif ($rule instanceof \Closure) { - $s = $rule($s); - } elseif ($rule) { - if ('nfd' === $rule = strtolower($rule)) { - normalizer_is_normalized($s, self::NFD) ?: $s = normalizer_normalize($s, self::NFD); - } elseif ('nfkd' === $rule) { - normalizer_is_normalized($s, self::NFKD) ?: $s = normalizer_normalize($s, self::NFKD); - } elseif ('[:nonspacing mark:] remove' === $rule) { - $s = preg_replace('/\p{Mn}++/u', '', $s); - } elseif ('latin-ascii' === $rule) { - $s = str_replace(self::TRANSLIT_FROM, self::TRANSLIT_TO, $s); - } elseif ('de-ascii' === $rule) { - $s = preg_replace("/([AUO])\u{0308}(?=\p{Ll})/u", '$1e', $s); - $s = str_replace(["a\u{0308}", "o\u{0308}", "u\u{0308}", "A\u{0308}", "O\u{0308}", "U\u{0308}"], ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], $s); - } elseif (\function_exists('transliterator_transliterate')) { - if (null === $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule)) { - if ('any-latin/bgn' === $rule) { - $rule = 'any-latin'; - $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule); - } - - if (null === $transliterator) { - throw new InvalidArgumentException(sprintf('Unknown transliteration rule "%s".', $rule)); - } - - self::$transliterators['any-latin/bgn'] = $transliterator; - } - - $s = $transliterator->transliterate($s); - } - } elseif (!\function_exists('iconv')) { - $s = preg_replace('/[^\x00-\x7F]/u', '?', $s); - } else { - $s = @preg_replace_callback('/[^\x00-\x7F]/u', static function ($c) { - $c = (string) iconv('UTF-8', 'ASCII//TRANSLIT', $c[0]); - - if ('' === $c && '' === iconv('UTF-8', 'ASCII//TRANSLIT', '²')) { - throw new \LogicException(sprintf('"%s" requires a translit-able iconv implementation, try installing "gnu-libiconv" if you\'re using Alpine Linux.', static::class)); - } - - return 1 < \strlen($c) ? ltrim($c, '\'`"^~') : ('' !== $c ? $c : '?'); - }, $s); - } - } - - $str->string .= $s; - - return $str; - } - - public function camel(): parent - { - $str = clone $this; - $str->string = str_replace(' ', '', preg_replace_callback('/\b./u', static function ($m) use (&$i) { - return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); - }, preg_replace('/[^\pL0-9]++/u', ' ', $this->string))); - - return $str; - } - - /** - * @return int[] - */ - public function codePointsAt(int $offset): array - { - $str = $this->slice($offset, 1); - - if ('' === $str->string) { - return []; - } - - $codePoints = []; - - foreach (preg_split('//u', $str->string, -1, \PREG_SPLIT_NO_EMPTY) as $c) { - $codePoints[] = mb_ord($c, 'UTF-8'); - } - - return $codePoints; - } - - public function folded(bool $compat = true): parent - { - $str = clone $this; - - if (!$compat || \PHP_VERSION_ID < 70300 || !\defined('Normalizer::NFKC_CF')) { - $str->string = normalizer_normalize($str->string, $compat ? \Normalizer::NFKC : \Normalizer::NFC); - $str->string = mb_strtolower(str_replace(self::FOLD_FROM, self::FOLD_TO, $this->string), 'UTF-8'); - } else { - $str->string = normalizer_normalize($str->string, \Normalizer::NFKC_CF); - } - - return $str; - } - - public function join(array $strings, string $lastGlue = null): parent - { - $str = clone $this; - - $tail = null !== $lastGlue && 1 < \count($strings) ? $lastGlue.array_pop($strings) : ''; - $str->string = implode($this->string, $strings).$tail; - - if (!preg_match('//u', $str->string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function lower(): parent - { - $str = clone $this; - $str->string = mb_strtolower(str_replace('İ', 'i̇', $str->string), 'UTF-8'); - - return $str; - } - - public function match(string $regexp, int $flags = 0, int $offset = 0): array - { - $match = ((\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match'; - - if ($this->ignoreCase) { - $regexp .= 'i'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (false === $match($regexp.'u', $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - return $matches; - } - - /** - * @return static - */ - public function normalize(int $form = self::NFC): self - { - if (!\in_array($form, [self::NFC, self::NFD, self::NFKC, self::NFKD])) { - throw new InvalidArgumentException('Unsupported normalization form.'); - } - - $str = clone $this; - normalizer_is_normalized($str->string, $form) ?: $str->string = normalizer_normalize($str->string, $form); - - return $str; - } - - public function padBoth(int $length, string $padStr = ' '): parent - { - if ('' === $padStr || !preg_match('//u', $padStr)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $pad = clone $this; - $pad->string = $padStr; - - return $this->pad($length, $pad, \STR_PAD_BOTH); - } - - public function padEnd(int $length, string $padStr = ' '): parent - { - if ('' === $padStr || !preg_match('//u', $padStr)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $pad = clone $this; - $pad->string = $padStr; - - return $this->pad($length, $pad, \STR_PAD_RIGHT); - } - - public function padStart(int $length, string $padStr = ' '): parent - { - if ('' === $padStr || !preg_match('//u', $padStr)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $pad = clone $this; - $pad->string = $padStr; - - return $this->pad($length, $pad, \STR_PAD_LEFT); - } - - public function replaceMatches(string $fromRegexp, $to): parent - { - if ($this->ignoreCase) { - $fromRegexp .= 'i'; - } - - if (\is_array($to) || $to instanceof \Closure) { - if (!\is_callable($to)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class)); - } - - $replace = 'preg_replace_callback'; - $to = static function (array $m) use ($to): string { - $to = $to($m); - - if ('' !== $to && (!\is_string($to) || !preg_match('//u', $to))) { - throw new InvalidArgumentException('Replace callback must return a valid UTF-8 string.'); - } - - return $to; - }; - } elseif ('' !== $to && !preg_match('//u', $to)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } else { - $replace = 'preg_replace'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (null === $string = $replace($fromRegexp.'u', $to, $this->string)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - $str = clone $this; - $str->string = $string; - - return $str; - } - - public function reverse(): parent - { - $str = clone $this; - $str->string = implode('', array_reverse(preg_split('/(\X)/u', $str->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY))); - - return $str; - } - - public function snake(): parent - { - $str = $this->camel()->title(); - $str->string = mb_strtolower(preg_replace(['/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '/([\p{Ll}0-9])(\p{Lu})/u'], '\1_\2', $str->string), 'UTF-8'); - - return $str; - } - - public function title(bool $allWords = false): parent - { - $str = clone $this; - - $limit = $allWords ? -1 : 1; - - $str->string = preg_replace_callback('/\b./u', static function (array $m): string { - return mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); - }, $str->string, $limit); - - return $str; - } - - public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent - { - if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { - throw new InvalidArgumentException('Invalid UTF-8 chars.'); - } - $chars = preg_quote($chars); - - $str = clone $this; - $str->string = preg_replace("{^[$chars]++|[$chars]++$}uD", '', $str->string); - - return $str; - } - - public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent - { - if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { - throw new InvalidArgumentException('Invalid UTF-8 chars.'); - } - $chars = preg_quote($chars); - - $str = clone $this; - $str->string = preg_replace("{[$chars]++$}uD", '', $str->string); - - return $str; - } - - public function trimPrefix($prefix): parent - { - if (!$this->ignoreCase) { - return parent::trimPrefix($prefix); - } - - $str = clone $this; - - if ($prefix instanceof \Traversable) { - $prefix = iterator_to_array($prefix, false); - } elseif ($prefix instanceof parent) { - $prefix = $prefix->string; - } - - $prefix = implode('|', array_map('preg_quote', (array) $prefix)); - $str->string = preg_replace("{^(?:$prefix)}iuD", '', $this->string); - - return $str; - } - - public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent - { - if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { - throw new InvalidArgumentException('Invalid UTF-8 chars.'); - } - $chars = preg_quote($chars); - - $str = clone $this; - $str->string = preg_replace("{^[$chars]++}uD", '', $str->string); - - return $str; - } - - public function trimSuffix($suffix): parent - { - if (!$this->ignoreCase) { - return parent::trimSuffix($suffix); - } - - $str = clone $this; - - if ($suffix instanceof \Traversable) { - $suffix = iterator_to_array($suffix, false); - } elseif ($suffix instanceof parent) { - $suffix = $suffix->string; - } - - $suffix = implode('|', array_map('preg_quote', (array) $suffix)); - $str->string = preg_replace("{(?:$suffix)$}iuD", '', $this->string); - - return $str; - } - - public function upper(): parent - { - $str = clone $this; - $str->string = mb_strtoupper($str->string, 'UTF-8'); - - if (\PHP_VERSION_ID < 70300) { - $str->string = str_replace(self::UPPER_FROM, self::UPPER_TO, $str->string); - } - - return $str; - } - - public function width(bool $ignoreAnsiDecoration = true): int - { - $width = 0; - $s = str_replace(["\x00", "\x05", "\x07"], '', $this->string); - - if (false !== strpos($s, "\r")) { - $s = str_replace(["\r\n", "\r"], "\n", $s); - } - - if (!$ignoreAnsiDecoration) { - $s = preg_replace('/[\p{Cc}\x7F]++/u', '', $s); - } - - foreach (explode("\n", $s) as $s) { - if ($ignoreAnsiDecoration) { - $s = preg_replace('/(?:\x1B(?: - \[ [\x30-\x3F]*+ [\x20-\x2F]*+ [\x40-\x7E] - | [P\]X^_] .*? \x1B\\\\ - | [\x41-\x7E] - )|[\p{Cc}\x7F]++)/xu', '', $s); - } - - $lineWidth = $this->wcswidth($s); - - if ($lineWidth > $width) { - $width = $lineWidth; - } - } - - return $width; - } - - /** - * @return static - */ - private function pad(int $len, self $pad, int $type): parent - { - $sLen = $this->length(); - - if ($len <= $sLen) { - return clone $this; - } - - $padLen = $pad->length(); - $freeLen = $len - $sLen; - $len = $freeLen % $padLen; - - switch ($type) { - case \STR_PAD_RIGHT: - return $this->append(str_repeat($pad->string, intdiv($freeLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - case \STR_PAD_LEFT: - return $this->prepend(str_repeat($pad->string, intdiv($freeLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - case \STR_PAD_BOTH: - $freeLen /= 2; - - $rightLen = ceil($freeLen); - $len = $rightLen % $padLen; - $str = $this->append(str_repeat($pad->string, intdiv($rightLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - $leftLen = floor($freeLen); - $len = $leftLen % $padLen; - - return $str->prepend(str_repeat($pad->string, intdiv($leftLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - default: - throw new InvalidArgumentException('Invalid padding type.'); - } - } - - /** - * Based on https://github.com/jquast/wcwidth, a Python implementation of https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c. - */ - private function wcswidth(string $string): int - { - $width = 0; - - foreach (preg_split('//u', $string, -1, \PREG_SPLIT_NO_EMPTY) as $c) { - $codePoint = mb_ord($c, 'UTF-8'); - - if (0 === $codePoint // NULL - || 0x034F === $codePoint // COMBINING GRAPHEME JOINER - || (0x200B <= $codePoint && 0x200F >= $codePoint) // ZERO WIDTH SPACE to RIGHT-TO-LEFT MARK - || 0x2028 === $codePoint // LINE SEPARATOR - || 0x2029 === $codePoint // PARAGRAPH SEPARATOR - || (0x202A <= $codePoint && 0x202E >= $codePoint) // LEFT-TO-RIGHT EMBEDDING to RIGHT-TO-LEFT OVERRIDE - || (0x2060 <= $codePoint && 0x2063 >= $codePoint) // WORD JOINER to INVISIBLE SEPARATOR - ) { - continue; - } - - // Non printable characters - if (32 > $codePoint // C0 control characters - || (0x07F <= $codePoint && 0x0A0 > $codePoint) // C1 control characters and DEL - ) { - return -1; - } - - if (null === self::$tableZero) { - self::$tableZero = require __DIR__.'/Resources/data/wcswidth_table_zero.php'; - } - - if ($codePoint >= self::$tableZero[0][0] && $codePoint <= self::$tableZero[$ubound = \count(self::$tableZero) - 1][1]) { - $lbound = 0; - while ($ubound >= $lbound) { - $mid = floor(($lbound + $ubound) / 2); - - if ($codePoint > self::$tableZero[$mid][1]) { - $lbound = $mid + 1; - } elseif ($codePoint < self::$tableZero[$mid][0]) { - $ubound = $mid - 1; - } else { - continue 2; - } - } - } - - if (null === self::$tableWide) { - self::$tableWide = require __DIR__.'/Resources/data/wcswidth_table_wide.php'; - } - - if ($codePoint >= self::$tableWide[0][0] && $codePoint <= self::$tableWide[$ubound = \count(self::$tableWide) - 1][1]) { - $lbound = 0; - while ($ubound >= $lbound) { - $mid = floor(($lbound + $ubound) / 2); - - if ($codePoint > self::$tableWide[$mid][1]) { - $lbound = $mid + 1; - } elseif ($codePoint < self::$tableWide[$mid][0]) { - $ubound = $mid - 1; - } else { - $width += 2; - - continue 2; - } - } - } - - ++$width; - } - - return $width; - } -} diff --git a/lib/symfony/string/ByteString.php b/lib/symfony/string/ByteString.php deleted file mode 100644 index bbf8614cf..000000000 --- a/lib/symfony/string/ByteString.php +++ /dev/null @@ -1,506 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; -use Symfony\Component\String\Exception\RuntimeException; - -/** - * Represents a binary-safe string of bytes. - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -class ByteString extends AbstractString -{ - private const ALPHABET_ALPHANUMERIC = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; - - public function __construct(string $string = '') - { - $this->string = $string; - } - - /* - * The following method was derived from code of the Hack Standard Library (v4.40 - 2020-05-03) - * - * https://github.com/hhvm/hsl/blob/80a42c02f036f72a42f0415e80d6b847f4bf62d5/src/random/private.php#L16 - * - * Code subject to the MIT license (https://github.com/hhvm/hsl/blob/master/LICENSE). - * - * Copyright (c) 2004-2020, Facebook, Inc. (https://www.facebook.com/) - */ - - public static function fromRandom(int $length = 16, string $alphabet = null): self - { - if ($length <= 0) { - throw new InvalidArgumentException(sprintf('A strictly positive length is expected, "%d" given.', $length)); - } - - $alphabet = $alphabet ?? self::ALPHABET_ALPHANUMERIC; - $alphabetSize = \strlen($alphabet); - $bits = (int) ceil(log($alphabetSize, 2.0)); - if ($bits <= 0 || $bits > 56) { - throw new InvalidArgumentException('The length of the alphabet must in the [2^1, 2^56] range.'); - } - - $ret = ''; - while ($length > 0) { - $urandomLength = (int) ceil(2 * $length * $bits / 8.0); - $data = random_bytes($urandomLength); - $unpackedData = 0; - $unpackedBits = 0; - for ($i = 0; $i < $urandomLength && $length > 0; ++$i) { - // Unpack 8 bits - $unpackedData = ($unpackedData << 8) | \ord($data[$i]); - $unpackedBits += 8; - - // While we have enough bits to select a character from the alphabet, keep - // consuming the random data - for (; $unpackedBits >= $bits && $length > 0; $unpackedBits -= $bits) { - $index = ($unpackedData & ((1 << $bits) - 1)); - $unpackedData >>= $bits; - // Unfortunately, the alphabet size is not necessarily a power of two. - // Worst case, it is 2^k + 1, which means we need (k+1) bits and we - // have around a 50% chance of missing as k gets larger - if ($index < $alphabetSize) { - $ret .= $alphabet[$index]; - --$length; - } - } - } - } - - return new static($ret); - } - - public function bytesAt(int $offset): array - { - $str = $this->string[$offset] ?? ''; - - return '' === $str ? [] : [\ord($str)]; - } - - public function append(string ...$suffix): parent - { - $str = clone $this; - $str->string .= 1 >= \count($suffix) ? ($suffix[0] ?? '') : implode('', $suffix); - - return $str; - } - - public function camel(): parent - { - $str = clone $this; - $str->string = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); - - return $str; - } - - public function chunk(int $length = 1): array - { - if (1 > $length) { - throw new InvalidArgumentException('The chunk length must be greater than zero.'); - } - - if ('' === $this->string) { - return []; - } - - $str = clone $this; - $chunks = []; - - foreach (str_split($this->string, $length) as $chunk) { - $str->string = $chunk; - $chunks[] = clone $str; - } - - return $chunks; - } - - public function endsWith($suffix): bool - { - if ($suffix instanceof parent) { - $suffix = $suffix->string; - } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { - return parent::endsWith($suffix); - } else { - $suffix = (string) $suffix; - } - - return '' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase); - } - - public function equalsTo($string): bool - { - if ($string instanceof parent) { - $string = $string->string; - } elseif (\is_array($string) || $string instanceof \Traversable) { - return parent::equalsTo($string); - } else { - $string = (string) $string; - } - - if ('' !== $string && $this->ignoreCase) { - return 0 === strcasecmp($string, $this->string); - } - - return $string === $this->string; - } - - public function folded(): parent - { - $str = clone $this; - $str->string = strtolower($str->string); - - return $str; - } - - public function indexOf($needle, int $offset = 0): ?int - { - if ($needle instanceof parent) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOf($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? stripos($this->string, $needle, $offset) : strpos($this->string, $needle, $offset); - - return false === $i ? null : $i; - } - - public function indexOfLast($needle, int $offset = 0): ?int - { - if ($needle instanceof parent) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOfLast($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? strripos($this->string, $needle, $offset) : strrpos($this->string, $needle, $offset); - - return false === $i ? null : $i; - } - - public function isUtf8(): bool - { - return '' === $this->string || preg_match('//u', $this->string); - } - - public function join(array $strings, string $lastGlue = null): parent - { - $str = clone $this; - - $tail = null !== $lastGlue && 1 < \count($strings) ? $lastGlue.array_pop($strings) : ''; - $str->string = implode($this->string, $strings).$tail; - - return $str; - } - - public function length(): int - { - return \strlen($this->string); - } - - public function lower(): parent - { - $str = clone $this; - $str->string = strtolower($str->string); - - return $str; - } - - public function match(string $regexp, int $flags = 0, int $offset = 0): array - { - $match = ((\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match'; - - if ($this->ignoreCase) { - $regexp .= 'i'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (false === $match($regexp, $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - return $matches; - } - - public function padBoth(int $length, string $padStr = ' '): parent - { - $str = clone $this; - $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_BOTH); - - return $str; - } - - public function padEnd(int $length, string $padStr = ' '): parent - { - $str = clone $this; - $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_RIGHT); - - return $str; - } - - public function padStart(int $length, string $padStr = ' '): parent - { - $str = clone $this; - $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_LEFT); - - return $str; - } - - public function prepend(string ...$prefix): parent - { - $str = clone $this; - $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$str->string; - - return $str; - } - - public function replace(string $from, string $to): parent - { - $str = clone $this; - - if ('' !== $from) { - $str->string = $this->ignoreCase ? str_ireplace($from, $to, $this->string) : str_replace($from, $to, $this->string); - } - - return $str; - } - - public function replaceMatches(string $fromRegexp, $to): parent - { - if ($this->ignoreCase) { - $fromRegexp .= 'i'; - } - - if (\is_array($to)) { - if (!\is_callable($to)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class)); - } - - $replace = 'preg_replace_callback'; - } else { - $replace = $to instanceof \Closure ? 'preg_replace_callback' : 'preg_replace'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (null === $string = $replace($fromRegexp, $to, $this->string)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - $str = clone $this; - $str->string = $string; - - return $str; - } - - public function reverse(): parent - { - $str = clone $this; - $str->string = strrev($str->string); - - return $str; - } - - public function slice(int $start = 0, int $length = null): parent - { - $str = clone $this; - $str->string = (string) substr($this->string, $start, $length ?? \PHP_INT_MAX); - - return $str; - } - - public function snake(): parent - { - $str = $this->camel()->title(); - $str->string = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $str->string)); - - return $str; - } - - public function splice(string $replacement, int $start = 0, int $length = null): parent - { - $str = clone $this; - $str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX); - - return $str; - } - - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (1 > $limit = $limit ?? \PHP_INT_MAX) { - throw new InvalidArgumentException('Split limit must be a positive integer.'); - } - - if ('' === $delimiter) { - throw new InvalidArgumentException('Split delimiter is empty.'); - } - - if (null !== $flags) { - return parent::split($delimiter, $limit, $flags); - } - - $str = clone $this; - $chunks = $this->ignoreCase - ? preg_split('{'.preg_quote($delimiter).'}iD', $this->string, $limit) - : explode($delimiter, $this->string, $limit); - - foreach ($chunks as &$chunk) { - $str->string = $chunk; - $chunk = clone $str; - } - - return $chunks; - } - - public function startsWith($prefix): bool - { - if ($prefix instanceof parent) { - $prefix = $prefix->string; - } elseif (!\is_string($prefix)) { - return parent::startsWith($prefix); - } - - return '' !== $prefix && 0 === ($this->ignoreCase ? strncasecmp($this->string, $prefix, \strlen($prefix)) : strncmp($this->string, $prefix, \strlen($prefix))); - } - - public function title(bool $allWords = false): parent - { - $str = clone $this; - $str->string = $allWords ? ucwords($str->string) : ucfirst($str->string); - - return $str; - } - - public function toUnicodeString(string $fromEncoding = null): UnicodeString - { - return new UnicodeString($this->toCodePointString($fromEncoding)->string); - } - - public function toCodePointString(string $fromEncoding = null): CodePointString - { - $u = new CodePointString(); - - if (\in_array($fromEncoding, [null, 'utf8', 'utf-8', 'UTF8', 'UTF-8'], true) && preg_match('//u', $this->string)) { - $u->string = $this->string; - - return $u; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - try { - $validEncoding = false !== mb_detect_encoding($this->string, $fromEncoding ?? 'Windows-1252', true); - } catch (InvalidArgumentException $e) { - if (!\function_exists('iconv')) { - throw $e; - } - - $u->string = iconv($fromEncoding ?? 'Windows-1252', 'UTF-8', $this->string); - - return $u; - } - } finally { - restore_error_handler(); - } - - if (!$validEncoding) { - throw new InvalidArgumentException(sprintf('Invalid "%s" string.', $fromEncoding ?? 'Windows-1252')); - } - - $u->string = mb_convert_encoding($this->string, 'UTF-8', $fromEncoding ?? 'Windows-1252'); - - return $u; - } - - public function trim(string $chars = " \t\n\r\0\x0B\x0C"): parent - { - $str = clone $this; - $str->string = trim($str->string, $chars); - - return $str; - } - - public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C"): parent - { - $str = clone $this; - $str->string = rtrim($str->string, $chars); - - return $str; - } - - public function trimStart(string $chars = " \t\n\r\0\x0B\x0C"): parent - { - $str = clone $this; - $str->string = ltrim($str->string, $chars); - - return $str; - } - - public function upper(): parent - { - $str = clone $this; - $str->string = strtoupper($str->string); - - return $str; - } - - public function width(bool $ignoreAnsiDecoration = true): int - { - $string = preg_match('//u', $this->string) ? $this->string : preg_replace('/[\x80-\xFF]/', '?', $this->string); - - return (new CodePointString($string))->width($ignoreAnsiDecoration); - } -} diff --git a/lib/symfony/string/CHANGELOG.md b/lib/symfony/string/CHANGELOG.md deleted file mode 100644 index 53af36400..000000000 --- a/lib/symfony/string/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `trimSuffix()` and `trimPrefix()` methods - -5.3 ---- - - * Made `AsciiSlugger` fallback to parent locale's symbolsMap - -5.2.0 ------ - - * added a `FrenchInflector` class - -5.1.0 ------ - - * added the `AbstractString::reverse()` method - * made `AbstractString::width()` follow POSIX.1-2001 - * added `LazyString` which provides memoizing stringable objects - * The component is not marked as `@experimental` anymore - * added the `s()` helper method to get either an `UnicodeString` or `ByteString` instance, - depending of the input string UTF-8 compliancy - * added `$cut` parameter to `Symfony\Component\String\AbstractString::truncate()` - * added `AbstractString::containsAny()` - * allow passing a string of custom characters to `ByteString::fromRandom()` - -5.0.0 ------ - - * added the component as experimental diff --git a/lib/symfony/string/CodePointString.php b/lib/symfony/string/CodePointString.php deleted file mode 100644 index 8ab920941..000000000 --- a/lib/symfony/string/CodePointString.php +++ /dev/null @@ -1,270 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; - -/** - * Represents a string of Unicode code points encoded as UTF-8. - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -class CodePointString extends AbstractUnicodeString -{ - public function __construct(string $string = '') - { - if ('' !== $string && !preg_match('//u', $string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $this->string = $string; - } - - public function append(string ...$suffix): AbstractString - { - $str = clone $this; - $str->string .= 1 >= \count($suffix) ? ($suffix[0] ?? '') : implode('', $suffix); - - if (!preg_match('//u', $str->string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function chunk(int $length = 1): array - { - if (1 > $length) { - throw new InvalidArgumentException('The chunk length must be greater than zero.'); - } - - if ('' === $this->string) { - return []; - } - - $rx = '/('; - while (65535 < $length) { - $rx .= '.{65535}'; - $length -= 65535; - } - $rx .= '.{'.$length.'})/us'; - - $str = clone $this; - $chunks = []; - - foreach (preg_split($rx, $this->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY) as $chunk) { - $str->string = $chunk; - $chunks[] = clone $str; - } - - return $chunks; - } - - public function codePointsAt(int $offset): array - { - $str = $offset ? $this->slice($offset, 1) : $this; - - return '' === $str->string ? [] : [mb_ord($str->string, 'UTF-8')]; - } - - public function endsWith($suffix): bool - { - if ($suffix instanceof AbstractString) { - $suffix = $suffix->string; - } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { - return parent::endsWith($suffix); - } else { - $suffix = (string) $suffix; - } - - if ('' === $suffix || !preg_match('//u', $suffix)) { - return false; - } - - if ($this->ignoreCase) { - return preg_match('{'.preg_quote($suffix).'$}iuD', $this->string); - } - - return \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix)); - } - - public function equalsTo($string): bool - { - if ($string instanceof AbstractString) { - $string = $string->string; - } elseif (\is_array($string) || $string instanceof \Traversable) { - return parent::equalsTo($string); - } else { - $string = (string) $string; - } - - if ('' !== $string && $this->ignoreCase) { - return \strlen($string) === \strlen($this->string) && 0 === mb_stripos($this->string, $string, 0, 'UTF-8'); - } - - return $string === $this->string; - } - - public function indexOf($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOf($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? mb_stripos($this->string, $needle, $offset, 'UTF-8') : mb_strpos($this->string, $needle, $offset, 'UTF-8'); - - return false === $i ? null : $i; - } - - public function indexOfLast($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOfLast($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? mb_strripos($this->string, $needle, $offset, 'UTF-8') : mb_strrpos($this->string, $needle, $offset, 'UTF-8'); - - return false === $i ? null : $i; - } - - public function length(): int - { - return mb_strlen($this->string, 'UTF-8'); - } - - public function prepend(string ...$prefix): AbstractString - { - $str = clone $this; - $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$this->string; - - if (!preg_match('//u', $str->string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function replace(string $from, string $to): AbstractString - { - $str = clone $this; - - if ('' === $from || !preg_match('//u', $from)) { - return $str; - } - - if ('' !== $to && !preg_match('//u', $to)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - if ($this->ignoreCase) { - $str->string = implode($to, preg_split('{'.preg_quote($from).'}iuD', $this->string)); - } else { - $str->string = str_replace($from, $to, $this->string); - } - - return $str; - } - - public function slice(int $start = 0, int $length = null): AbstractString - { - $str = clone $this; - $str->string = mb_substr($this->string, $start, $length, 'UTF-8'); - - return $str; - } - - public function splice(string $replacement, int $start = 0, int $length = null): AbstractString - { - if (!preg_match('//u', $replacement)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $str = clone $this; - $start = $start ? \strlen(mb_substr($this->string, 0, $start, 'UTF-8')) : 0; - $length = $length ? \strlen(mb_substr($this->string, $start, $length, 'UTF-8')) : $length; - $str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX); - - return $str; - } - - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (1 > $limit = $limit ?? \PHP_INT_MAX) { - throw new InvalidArgumentException('Split limit must be a positive integer.'); - } - - if ('' === $delimiter) { - throw new InvalidArgumentException('Split delimiter is empty.'); - } - - if (null !== $flags) { - return parent::split($delimiter.'u', $limit, $flags); - } - - if (!preg_match('//u', $delimiter)) { - throw new InvalidArgumentException('Split delimiter is not a valid UTF-8 string.'); - } - - $str = clone $this; - $chunks = $this->ignoreCase - ? preg_split('{'.preg_quote($delimiter).'}iuD', $this->string, $limit) - : explode($delimiter, $this->string, $limit); - - foreach ($chunks as &$chunk) { - $str->string = $chunk; - $chunk = clone $str; - } - - return $chunks; - } - - public function startsWith($prefix): bool - { - if ($prefix instanceof AbstractString) { - $prefix = $prefix->string; - } elseif (\is_array($prefix) || $prefix instanceof \Traversable) { - return parent::startsWith($prefix); - } else { - $prefix = (string) $prefix; - } - - if ('' === $prefix || !preg_match('//u', $prefix)) { - return false; - } - - if ($this->ignoreCase) { - return 0 === mb_stripos($this->string, $prefix, 0, 'UTF-8'); - } - - return 0 === strncmp($this->string, $prefix, \strlen($prefix)); - } -} diff --git a/lib/symfony/string/Exception/ExceptionInterface.php b/lib/symfony/string/Exception/ExceptionInterface.php deleted file mode 100644 index 361978656..000000000 --- a/lib/symfony/string/Exception/ExceptionInterface.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Exception; - -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/string/Exception/InvalidArgumentException.php b/lib/symfony/string/Exception/InvalidArgumentException.php deleted file mode 100644 index 6aa586bcf..000000000 --- a/lib/symfony/string/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Exception; - -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/lib/symfony/string/Exception/RuntimeException.php b/lib/symfony/string/Exception/RuntimeException.php deleted file mode 100644 index 77cb091f9..000000000 --- a/lib/symfony/string/Exception/RuntimeException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Exception; - -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/string/Inflector/EnglishInflector.php b/lib/symfony/string/Inflector/EnglishInflector.php deleted file mode 100644 index 9f2fac675..000000000 --- a/lib/symfony/string/Inflector/EnglishInflector.php +++ /dev/null @@ -1,511 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Inflector; - -final class EnglishInflector implements InflectorInterface -{ - /** - * Map English plural to singular suffixes. - * - * @see http://english-zone.com/spelling/plurals.html - */ - private const PLURAL_MAP = [ - // First entry: plural suffix, reversed - // Second entry: length of plural suffix - // Third entry: Whether the suffix may succeed a vocal - // Fourth entry: Whether the suffix may succeed a consonant - // Fifth entry: singular suffix, normal - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['a', 1, true, true, ['on', 'um']], - - // nebulae (nebula) - ['ea', 2, true, true, 'a'], - - // services (service) - ['secivres', 8, true, true, 'service'], - - // mice (mouse), lice (louse) - ['eci', 3, false, true, 'ouse'], - - // geese (goose) - ['esee', 4, false, true, 'oose'], - - // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius) - ['i', 1, true, true, 'us'], - - // men (man), women (woman) - ['nem', 3, true, true, 'man'], - - // children (child) - ['nerdlihc', 8, true, true, 'child'], - - // oxen (ox) - ['nexo', 4, false, false, 'ox'], - - // indices (index), appendices (appendix), prices (price) - ['seci', 4, false, true, ['ex', 'ix', 'ice']], - - // selfies (selfie) - ['seifles', 7, true, true, 'selfie'], - - // zombies (zombie) - ['seibmoz', 7, true, true, 'zombie'], - - // movies (movie) - ['seivom', 6, true, true, 'movie'], - - // conspectuses (conspectus), prospectuses (prospectus) - ['sesutcep', 8, true, true, 'pectus'], - - // feet (foot) - ['teef', 4, true, true, 'foot'], - - // geese (goose) - ['eseeg', 5, true, true, 'goose'], - - // teeth (tooth) - ['hteet', 5, true, true, 'tooth'], - - // news (news) - ['swen', 4, true, true, 'news'], - - // series (series) - ['seires', 6, true, true, 'series'], - - // babies (baby) - ['sei', 3, false, true, 'y'], - - // accesses (access), addresses (address), kisses (kiss) - ['sess', 4, true, false, 'ss'], - - // analyses (analysis), ellipses (ellipsis), fungi (fungus), - // neuroses (neurosis), theses (thesis), emphases (emphasis), - // oases (oasis), crises (crisis), houses (house), bases (base), - // atlases (atlas) - ['ses', 3, true, true, ['s', 'se', 'sis']], - - // objectives (objective), alternative (alternatives) - ['sevit', 5, true, true, 'tive'], - - // drives (drive) - ['sevird', 6, false, true, 'drive'], - - // lives (life), wives (wife) - ['sevi', 4, false, true, 'ife'], - - // moves (move) - ['sevom', 5, true, true, 'move'], - - // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf), caves (cave), staves (staff) - ['sev', 3, true, true, ['f', 've', 'ff']], - - // axes (axis), axes (ax), axes (axe) - ['sexa', 4, false, false, ['ax', 'axe', 'axis']], - - // indexes (index), matrixes (matrix) - ['sex', 3, true, false, 'x'], - - // quizzes (quiz) - ['sezz', 4, true, false, 'z'], - - // bureaus (bureau) - ['suae', 4, false, true, 'eau'], - - // fees (fee), trees (tree), employees (employee) - ['see', 3, true, true, 'ee'], - - // edges (edge) - ['segd', 4, true, true, 'dge'], - - // roses (rose), garages (garage), cassettes (cassette), - // waltzes (waltz), heroes (hero), bushes (bush), arches (arch), - // shoes (shoe) - ['se', 2, true, true, ['', 'e']], - - // tags (tag) - ['s', 1, true, true, ''], - - // chateaux (chateau) - ['xuae', 4, false, true, 'eau'], - - // people (person) - ['elpoep', 6, true, true, 'person'], - ]; - - /** - * Map English singular to plural suffixes. - * - * @see http://english-zone.com/spelling/plurals.html - */ - private const SINGULAR_MAP = [ - // First entry: singular suffix, reversed - // Second entry: length of singular suffix - // Third entry: Whether the suffix may succeed a vocal - // Fourth entry: Whether the suffix may succeed a consonant - // Fifth entry: plural suffix, normal - - // criterion (criteria) - ['airetirc', 8, false, false, 'criterion'], - - // nebulae (nebula) - ['aluben', 6, false, false, 'nebulae'], - - // children (child) - ['dlihc', 5, true, true, 'children'], - - // prices (price) - ['eci', 3, false, true, 'ices'], - - // services (service) - ['ecivres', 7, true, true, 'services'], - - // lives (life), wives (wife) - ['efi', 3, false, true, 'ives'], - - // selfies (selfie) - ['eifles', 6, true, true, 'selfies'], - - // movies (movie) - ['eivom', 5, true, true, 'movies'], - - // lice (louse) - ['esuol', 5, false, true, 'lice'], - - // mice (mouse) - ['esuom', 5, false, true, 'mice'], - - // geese (goose) - ['esoo', 4, false, true, 'eese'], - - // houses (house), bases (base) - ['es', 2, true, true, 'ses'], - - // geese (goose) - ['esoog', 5, true, true, 'geese'], - - // caves (cave) - ['ev', 2, true, true, 'ves'], - - // drives (drive) - ['evird', 5, false, true, 'drives'], - - // objectives (objective), alternative (alternatives) - ['evit', 4, true, true, 'tives'], - - // moves (move) - ['evom', 4, true, true, 'moves'], - - // staves (staff) - ['ffats', 5, true, true, 'staves'], - - // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf) - ['ff', 2, true, true, 'ffs'], - - // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf) - ['f', 1, true, true, ['fs', 'ves']], - - // arches (arch) - ['hc', 2, true, true, 'ches'], - - // bushes (bush) - ['hs', 2, true, true, 'shes'], - - // teeth (tooth) - ['htoot', 5, true, true, 'teeth'], - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['mu', 2, true, true, 'a'], - - // men (man), women (woman) - ['nam', 3, true, true, 'men'], - - // people (person) - ['nosrep', 6, true, true, ['persons', 'people']], - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['noi', 3, true, true, 'ions'], - - // coupon (coupons) - ['nop', 3, true, true, 'pons'], - - // seasons (season), treasons (treason), poisons (poison), lessons (lesson) - ['nos', 3, true, true, 'sons'], - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['no', 2, true, true, 'a'], - - // echoes (echo) - ['ohce', 4, true, true, 'echoes'], - - // heroes (hero) - ['oreh', 4, true, true, 'heroes'], - - // atlases (atlas) - ['salta', 5, true, true, 'atlases'], - - // irises (iris) - ['siri', 4, true, true, 'irises'], - - // analyses (analysis), ellipses (ellipsis), neuroses (neurosis) - // theses (thesis), emphases (emphasis), oases (oasis), - // crises (crisis) - ['sis', 3, true, true, 'ses'], - - // accesses (access), addresses (address), kisses (kiss) - ['ss', 2, true, false, 'sses'], - - // syllabi (syllabus) - ['suballys', 8, true, true, 'syllabi'], - - // buses (bus) - ['sub', 3, true, true, 'buses'], - - // circuses (circus) - ['suc', 3, true, true, 'cuses'], - - // conspectuses (conspectus), prospectuses (prospectus) - ['sutcep', 6, true, true, 'pectuses'], - - // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius) - ['su', 2, true, true, 'i'], - - // news (news) - ['swen', 4, true, true, 'news'], - - // feet (foot) - ['toof', 4, true, true, 'feet'], - - // chateaux (chateau), bureaus (bureau) - ['uae', 3, false, true, ['eaus', 'eaux']], - - // oxen (ox) - ['xo', 2, false, false, 'oxen'], - - // hoaxes (hoax) - ['xaoh', 4, true, false, 'hoaxes'], - - // indices (index) - ['xedni', 5, false, true, ['indicies', 'indexes']], - - // boxes (box) - ['xo', 2, false, true, 'oxes'], - - // indexes (index), matrixes (matrix) - ['x', 1, true, false, ['cies', 'xes']], - - // appendices (appendix) - ['xi', 2, false, true, 'ices'], - - // babies (baby) - ['y', 1, false, true, 'ies'], - - // quizzes (quiz) - ['ziuq', 4, true, false, 'quizzes'], - - // waltzes (waltz) - ['z', 1, true, true, 'zes'], - ]; - - /** - * A list of words which should not be inflected, reversed. - */ - private const UNINFLECTED = [ - '', - - // data - 'atad', - - // deer - 'reed', - - // feedback - 'kcabdeef', - - // fish - 'hsif', - - // info - 'ofni', - - // moose - 'esoom', - - // series - 'seires', - - // sheep - 'peehs', - - // species - 'seiceps', - ]; - - /** - * {@inheritdoc} - */ - public function singularize(string $plural): array - { - $pluralRev = strrev($plural); - $lowerPluralRev = strtolower($pluralRev); - $pluralLength = \strlen($lowerPluralRev); - - // Check if the word is one which is not inflected, return early if so - if (\in_array($lowerPluralRev, self::UNINFLECTED, true)) { - return [$plural]; - } - - // The outer loop iterates over the entries of the plural table - // The inner loop $j iterates over the characters of the plural suffix - // in the plural table to compare them with the characters of the actual - // given plural suffix - foreach (self::PLURAL_MAP as $map) { - $suffix = $map[0]; - $suffixLength = $map[1]; - $j = 0; - - // Compare characters in the plural table and of the suffix of the - // given plural one by one - while ($suffix[$j] === $lowerPluralRev[$j]) { - // Let $j point to the next character - ++$j; - - // Successfully compared the last character - // Add an entry with the singular suffix to the singular array - if ($j === $suffixLength) { - // Is there any character preceding the suffix in the plural string? - if ($j < $pluralLength) { - $nextIsVocal = false !== strpos('aeiou', $lowerPluralRev[$j]); - - if (!$map[2] && $nextIsVocal) { - // suffix may not succeed a vocal but next char is one - break; - } - - if (!$map[3] && !$nextIsVocal) { - // suffix may not succeed a consonant but next char is one - break; - } - } - - $newBase = substr($plural, 0, $pluralLength - $suffixLength); - $newSuffix = $map[4]; - - // Check whether the first character in the plural suffix - // is uppercased. If yes, uppercase the first character in - // the singular suffix too - $firstUpper = ctype_upper($pluralRev[$j - 1]); - - if (\is_array($newSuffix)) { - $singulars = []; - - foreach ($newSuffix as $newSuffixEntry) { - $singulars[] = $newBase.($firstUpper ? ucfirst($newSuffixEntry) : $newSuffixEntry); - } - - return $singulars; - } - - return [$newBase.($firstUpper ? ucfirst($newSuffix) : $newSuffix)]; - } - - // Suffix is longer than word - if ($j === $pluralLength) { - break; - } - } - } - - // Assume that plural and singular is identical - return [$plural]; - } - - /** - * {@inheritdoc} - */ - public function pluralize(string $singular): array - { - $singularRev = strrev($singular); - $lowerSingularRev = strtolower($singularRev); - $singularLength = \strlen($lowerSingularRev); - - // Check if the word is one which is not inflected, return early if so - if (\in_array($lowerSingularRev, self::UNINFLECTED, true)) { - return [$singular]; - } - - // The outer loop iterates over the entries of the singular table - // The inner loop $j iterates over the characters of the singular suffix - // in the singular table to compare them with the characters of the actual - // given singular suffix - foreach (self::SINGULAR_MAP as $map) { - $suffix = $map[0]; - $suffixLength = $map[1]; - $j = 0; - - // Compare characters in the singular table and of the suffix of the - // given plural one by one - - while ($suffix[$j] === $lowerSingularRev[$j]) { - // Let $j point to the next character - ++$j; - - // Successfully compared the last character - // Add an entry with the plural suffix to the plural array - if ($j === $suffixLength) { - // Is there any character preceding the suffix in the plural string? - if ($j < $singularLength) { - $nextIsVocal = false !== strpos('aeiou', $lowerSingularRev[$j]); - - if (!$map[2] && $nextIsVocal) { - // suffix may not succeed a vocal but next char is one - break; - } - - if (!$map[3] && !$nextIsVocal) { - // suffix may not succeed a consonant but next char is one - break; - } - } - - $newBase = substr($singular, 0, $singularLength - $suffixLength); - $newSuffix = $map[4]; - - // Check whether the first character in the singular suffix - // is uppercased. If yes, uppercase the first character in - // the singular suffix too - $firstUpper = ctype_upper($singularRev[$j - 1]); - - if (\is_array($newSuffix)) { - $plurals = []; - - foreach ($newSuffix as $newSuffixEntry) { - $plurals[] = $newBase.($firstUpper ? ucfirst($newSuffixEntry) : $newSuffixEntry); - } - - return $plurals; - } - - return [$newBase.($firstUpper ? ucfirst($newSuffix) : $newSuffix)]; - } - - // Suffix is longer than word - if ($j === $singularLength) { - break; - } - } - } - - // Assume that plural is singular with a trailing `s` - return [$singular.'s']; - } -} diff --git a/lib/symfony/string/Inflector/FrenchInflector.php b/lib/symfony/string/Inflector/FrenchInflector.php deleted file mode 100644 index 612c8f2e0..000000000 --- a/lib/symfony/string/Inflector/FrenchInflector.php +++ /dev/null @@ -1,157 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Inflector; - -/** - * French inflector. - * - * This class does only inflect nouns; not adjectives nor composed words like "soixante-dix". - */ -final class FrenchInflector implements InflectorInterface -{ - /** - * A list of all rules for pluralise. - * - * @see https://la-conjugaison.nouvelobs.com/regles/grammaire/le-pluriel-des-noms-121.php - */ - private const PLURALIZE_REGEXP = [ - // First entry: regexp - // Second entry: replacement - - // Words finishing with "s", "x" or "z" are invariables - // Les mots finissant par "s", "x" ou "z" sont invariables - ['/(s|x|z)$/i', '\1'], - - // Words finishing with "eau" are pluralized with a "x" - // Les mots finissant par "eau" prennent tous un "x" au pluriel - ['/(eau)$/i', '\1x'], - - // Words finishing with "au" are pluralized with a "x" excepted "landau" - // Les mots finissant par "au" prennent un "x" au pluriel sauf "landau" - ['/^(landau)$/i', '\1s'], - ['/(au)$/i', '\1x'], - - // Words finishing with "eu" are pluralized with a "x" excepted "pneu", "bleu", "émeu" - // Les mots finissant en "eu" prennent un "x" au pluriel sauf "pneu", "bleu", "émeu" - ['/^(pneu|bleu|émeu)$/i', '\1s'], - ['/(eu)$/i', '\1x'], - - // Words finishing with "al" are pluralized with a "aux" excepted - // Les mots finissant en "al" se terminent en "aux" sauf - ['/^(bal|carnaval|caracal|chacal|choral|corral|étal|festival|récital|val)$/i', '\1s'], - ['/al$/i', '\1aux'], - - // Aspirail, bail, corail, émail, fermail, soupirail, travail, vantail et vitrail font leur pluriel en -aux - ['/^(aspir|b|cor|ém|ferm|soupir|trav|vant|vitr)ail$/i', '\1aux'], - - // Bijou, caillou, chou, genou, hibou, joujou et pou qui prennent un x au pluriel - ['/^(bij|caill|ch|gen|hib|jouj|p)ou$/i', '\1oux'], - - // Invariable words - ['/^(cinquante|soixante|mille)$/i', '\1'], - - // French titles - ['/^(mon|ma)(sieur|dame|demoiselle|seigneur)$/', 'mes\2s'], - ['/^(Mon|Ma)(sieur|dame|demoiselle|seigneur)$/', 'Mes\2s'], - ]; - - /** - * A list of all rules for singularize. - */ - private const SINGULARIZE_REGEXP = [ - // First entry: regexp - // Second entry: replacement - - // Aspirail, bail, corail, émail, fermail, soupirail, travail, vantail et vitrail font leur pluriel en -aux - ['/((aspir|b|cor|ém|ferm|soupir|trav|vant|vitr))aux$/i', '\1ail'], - - // Words finishing with "eau" are pluralized with a "x" - // Les mots finissant par "eau" prennent tous un "x" au pluriel - ['/(eau)x$/i', '\1'], - - // Words finishing with "al" are pluralized with a "aux" expected - // Les mots finissant en "al" se terminent en "aux" sauf - ['/(amir|anim|arsen|boc|can|capit|capor|chev|crist|génér|hopit|hôpit|idé|journ|littor|loc|m|mét|minér|princip|radic|termin)aux$/i', '\1al'], - - // Words finishing with "au" are pluralized with a "x" excepted "landau" - // Les mots finissant par "au" prennent un "x" au pluriel sauf "landau" - ['/(au)x$/i', '\1'], - - // Words finishing with "eu" are pluralized with a "x" excepted "pneu", "bleu", "émeu" - // Les mots finissant en "eu" prennent un "x" au pluriel sauf "pneu", "bleu", "émeu" - ['/(eu)x$/i', '\1'], - - // Words finishing with "ou" are pluralized with a "s" excepted bijou, caillou, chou, genou, hibou, joujou, pou - // Les mots finissant par "ou" prennent un "s" sauf bijou, caillou, chou, genou, hibou, joujou, pou - ['/(bij|caill|ch|gen|hib|jouj|p)oux$/i', '\1ou'], - - // French titles - ['/^mes(dame|demoiselle)s$/', 'ma\1'], - ['/^Mes(dame|demoiselle)s$/', 'Ma\1'], - ['/^mes(sieur|seigneur)s$/', 'mon\1'], - ['/^Mes(sieur|seigneur)s$/', 'Mon\1'], - - // Default rule - ['/s$/i', ''], - ]; - - /** - * A list of words which should not be inflected. - * This list is only used by singularize. - */ - private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i'; - - /** - * {@inheritdoc} - */ - public function singularize(string $plural): array - { - if ($this->isInflectedWord($plural)) { - return [$plural]; - } - - foreach (self::SINGULARIZE_REGEXP as $rule) { - [$regexp, $replace] = $rule; - - if (1 === preg_match($regexp, $plural)) { - return [preg_replace($regexp, $replace, $plural)]; - } - } - - return [$plural]; - } - - /** - * {@inheritdoc} - */ - public function pluralize(string $singular): array - { - if ($this->isInflectedWord($singular)) { - return [$singular]; - } - - foreach (self::PLURALIZE_REGEXP as $rule) { - [$regexp, $replace] = $rule; - - if (1 === preg_match($regexp, $singular)) { - return [preg_replace($regexp, $replace, $singular)]; - } - } - - return [$singular.'s']; - } - - private function isInflectedWord(string $word): bool - { - return 1 === preg_match(self::UNINFLECTED, $word); - } -} diff --git a/lib/symfony/string/Inflector/InflectorInterface.php b/lib/symfony/string/Inflector/InflectorInterface.php deleted file mode 100644 index 67f283404..000000000 --- a/lib/symfony/string/Inflector/InflectorInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Inflector; - -interface InflectorInterface -{ - /** - * Returns the singular forms of a string. - * - * If the method can't determine the form with certainty, several possible singulars are returned. - * - * @return string[] - */ - public function singularize(string $plural): array; - - /** - * Returns the plural forms of a string. - * - * If the method can't determine the form with certainty, several possible plurals are returned. - * - * @return string[] - */ - public function pluralize(string $singular): array; -} diff --git a/lib/symfony/string/LICENSE b/lib/symfony/string/LICENSE deleted file mode 100644 index 9c907a46a..000000000 --- a/lib/symfony/string/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/string/LazyString.php b/lib/symfony/string/LazyString.php deleted file mode 100644 index 3b10595f3..000000000 --- a/lib/symfony/string/LazyString.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -/** - * A string whose value is computed lazily by a callback. - * - * @author Nicolas Grekas - */ -class LazyString implements \Stringable, \JsonSerializable -{ - private $value; - - /** - * @param callable|array $callback A callable or a [Closure, method] lazy-callable - * - * @return static - */ - public static function fromCallable($callback, ...$arguments): self - { - if (!\is_callable($callback) && !(\is_array($callback) && isset($callback[0]) && $callback[0] instanceof \Closure && 2 >= \count($callback))) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a callable or a [Closure, method] lazy-callable, "%s" given.', __METHOD__, get_debug_type($callback))); - } - - $lazyString = new static(); - $lazyString->value = static function () use (&$callback, &$arguments, &$value): string { - if (null !== $arguments) { - if (!\is_callable($callback)) { - $callback[0] = $callback[0](); - $callback[1] = $callback[1] ?? '__invoke'; - } - $value = $callback(...$arguments); - $callback = self::getPrettyName($callback); - $arguments = null; - } - - return $value ?? ''; - }; - - return $lazyString; - } - - /** - * @param string|int|float|bool|\Stringable $value - * - * @return static - */ - public static function fromStringable($value): self - { - if (!self::isStringable($value)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a scalar or a stringable object, "%s" given.', __METHOD__, get_debug_type($value))); - } - - if (\is_object($value)) { - return static::fromCallable([$value, '__toString']); - } - - $lazyString = new static(); - $lazyString->value = (string) $value; - - return $lazyString; - } - - /** - * Tells whether the provided value can be cast to string. - */ - final public static function isStringable($value): bool - { - return \is_string($value) || $value instanceof self || (\is_object($value) ? method_exists($value, '__toString') : \is_scalar($value)); - } - - /** - * Casts scalars and stringable objects to strings. - * - * @param object|string|int|float|bool $value - * - * @throws \TypeError When the provided value is not stringable - */ - final public static function resolve($value): string - { - return $value; - } - - /** - * @return string - */ - public function __toString() - { - if (\is_string($this->value)) { - return $this->value; - } - - try { - return $this->value = ($this->value)(); - } catch (\Throwable $e) { - if (\TypeError::class === \get_class($e) && __FILE__ === $e->getFile()) { - $type = explode(', ', $e->getMessage()); - $type = substr(array_pop($type), 0, -\strlen(' returned')); - $r = new \ReflectionFunction($this->value); - $callback = $r->getStaticVariables()['callback']; - - $e = new \TypeError(sprintf('Return value of %s() passed to %s::fromCallable() must be of the type string, %s returned.', $callback, static::class, $type)); - } - - if (\PHP_VERSION_ID < 70400) { - // leverage the ErrorHandler component with graceful fallback when it's not available - return trigger_error($e, \E_USER_ERROR); - } - - throw $e; - } - } - - public function __sleep(): array - { - $this->__toString(); - - return ['value']; - } - - public function jsonSerialize(): string - { - return $this->__toString(); - } - - private function __construct() - { - } - - private static function getPrettyName(callable $callback): string - { - if (\is_string($callback)) { - return $callback; - } - - if (\is_array($callback)) { - $class = \is_object($callback[0]) ? get_debug_type($callback[0]) : $callback[0]; - $method = $callback[1]; - } elseif ($callback instanceof \Closure) { - $r = new \ReflectionFunction($callback); - - if (false !== strpos($r->name, '{closure}') || !$class = $r->getClosureScopeClass()) { - return $r->name; - } - - $class = $class->name; - $method = $r->name; - } else { - $class = get_debug_type($callback); - $method = '__invoke'; - } - - return $class.'::'.$method; - } -} diff --git a/lib/symfony/string/README.md b/lib/symfony/string/README.md deleted file mode 100644 index 9c7e1e190..000000000 --- a/lib/symfony/string/README.md +++ /dev/null @@ -1,14 +0,0 @@ -String Component -================ - -The String component provides an object-oriented API to strings and deals -with bytes, UTF-8 code points and grapheme clusters in a unified way. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/string.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/string/Resources/data/wcswidth_table_wide.php b/lib/symfony/string/Resources/data/wcswidth_table_wide.php deleted file mode 100644 index 43c802d05..000000000 --- a/lib/symfony/string/Resources/data/wcswidth_table_wide.php +++ /dev/null @@ -1,1135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -if (!\function_exists(u::class)) { - function u(?string $string = ''): UnicodeString - { - return new UnicodeString($string ?? ''); - } -} - -if (!\function_exists(b::class)) { - function b(?string $string = ''): ByteString - { - return new ByteString($string ?? ''); - } -} - -if (!\function_exists(s::class)) { - /** - * @return UnicodeString|ByteString - */ - function s(?string $string = ''): AbstractString - { - $string = $string ?? ''; - - return preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string); - } -} diff --git a/lib/symfony/string/Slugger/AsciiSlugger.php b/lib/symfony/string/Slugger/AsciiSlugger.php deleted file mode 100644 index 5aecfeb5f..000000000 --- a/lib/symfony/string/Slugger/AsciiSlugger.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Slugger; - -use Symfony\Component\String\AbstractUnicodeString; -use Symfony\Component\String\UnicodeString; -use Symfony\Contracts\Translation\LocaleAwareInterface; - -if (!interface_exists(LocaleAwareInterface::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\String\Slugger\AsciiSlugger" as the "symfony/translation-contracts" package is not installed. Try running "composer require symfony/translation-contracts".'); -} - -/** - * @author Titouan Galopin - */ -class AsciiSlugger implements SluggerInterface, LocaleAwareInterface -{ - private const LOCALE_TO_TRANSLITERATOR_ID = [ - 'am' => 'Amharic-Latin', - 'ar' => 'Arabic-Latin', - 'az' => 'Azerbaijani-Latin', - 'be' => 'Belarusian-Latin', - 'bg' => 'Bulgarian-Latin', - 'bn' => 'Bengali-Latin', - 'de' => 'de-ASCII', - 'el' => 'Greek-Latin', - 'fa' => 'Persian-Latin', - 'he' => 'Hebrew-Latin', - 'hy' => 'Armenian-Latin', - 'ka' => 'Georgian-Latin', - 'kk' => 'Kazakh-Latin', - 'ky' => 'Kirghiz-Latin', - 'ko' => 'Korean-Latin', - 'mk' => 'Macedonian-Latin', - 'mn' => 'Mongolian-Latin', - 'or' => 'Oriya-Latin', - 'ps' => 'Pashto-Latin', - 'ru' => 'Russian-Latin', - 'sr' => 'Serbian-Latin', - 'sr_Cyrl' => 'Serbian-Latin', - 'th' => 'Thai-Latin', - 'tk' => 'Turkmen-Latin', - 'uk' => 'Ukrainian-Latin', - 'uz' => 'Uzbek-Latin', - 'zh' => 'Han-Latin', - ]; - - private $defaultLocale; - private $symbolsMap = [ - 'en' => ['@' => 'at', '&' => 'and'], - ]; - - /** - * Cache of transliterators per locale. - * - * @var \Transliterator[] - */ - private $transliterators = []; - - /** - * @param array|\Closure|null $symbolsMap - */ - public function __construct(string $defaultLocale = null, $symbolsMap = null) - { - if (null !== $symbolsMap && !\is_array($symbolsMap) && !$symbolsMap instanceof \Closure) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be array, Closure or null, "%s" given.', __METHOD__, \gettype($symbolsMap))); - } - - $this->defaultLocale = $defaultLocale; - $this->symbolsMap = $symbolsMap ?? $this->symbolsMap; - } - - /** - * {@inheritdoc} - */ - public function setLocale($locale) - { - $this->defaultLocale = $locale; - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->defaultLocale; - } - - /** - * {@inheritdoc} - */ - public function slug(string $string, string $separator = '-', string $locale = null): AbstractUnicodeString - { - $locale = $locale ?? $this->defaultLocale; - - $transliterator = []; - if ($locale && ('de' === $locale || 0 === strpos($locale, 'de_'))) { - // Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl) - $transliterator = ['de-ASCII']; - } elseif (\function_exists('transliterator_transliterate') && $locale) { - $transliterator = (array) $this->createTransliterator($locale); - } - - if ($this->symbolsMap instanceof \Closure) { - // If the symbols map is passed as a closure, there is no need to fallback to the parent locale - // as the closure can just provide substitutions for all locales of interest. - $symbolsMap = $this->symbolsMap; - array_unshift($transliterator, static function ($s) use ($symbolsMap, $locale) { - return $symbolsMap($s, $locale); - }); - } - - $unicodeString = (new UnicodeString($string))->ascii($transliterator); - - if (\is_array($this->symbolsMap)) { - $map = null; - if (isset($this->symbolsMap[$locale])) { - $map = $this->symbolsMap[$locale]; - } else { - $parent = self::getParentLocale($locale); - if ($parent && isset($this->symbolsMap[$parent])) { - $map = $this->symbolsMap[$parent]; - } - } - if ($map) { - foreach ($map as $char => $replace) { - $unicodeString = $unicodeString->replace($char, ' '.$replace.' '); - } - } - } - - return $unicodeString - ->replaceMatches('/[^A-Za-z0-9]++/', $separator) - ->trim($separator) - ; - } - - private function createTransliterator(string $locale): ?\Transliterator - { - if (\array_key_exists($locale, $this->transliterators)) { - return $this->transliterators[$locale]; - } - - // Exact locale supported, cache and return - if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$locale] ?? null) { - return $this->transliterators[$locale] = \Transliterator::create($id.'/BGN') ?? \Transliterator::create($id); - } - - // Locale not supported and no parent, fallback to any-latin - if (!$parent = self::getParentLocale($locale)) { - return $this->transliterators[$locale] = null; - } - - // Try to use the parent locale (ie. try "de" for "de_AT") and cache both locales - if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$parent] ?? null) { - $transliterator = \Transliterator::create($id.'/BGN') ?? \Transliterator::create($id); - } - - return $this->transliterators[$locale] = $this->transliterators[$parent] = $transliterator ?? null; - } - - private static function getParentLocale(?string $locale): ?string - { - if (!$locale) { - return null; - } - if (false === $str = strrchr($locale, '_')) { - // no parent locale - return null; - } - - return substr($locale, 0, -\strlen($str)); - } -} diff --git a/lib/symfony/string/Slugger/SluggerInterface.php b/lib/symfony/string/Slugger/SluggerInterface.php deleted file mode 100644 index c679ed933..000000000 --- a/lib/symfony/string/Slugger/SluggerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Slugger; - -use Symfony\Component\String\AbstractUnicodeString; - -/** - * Creates a URL-friendly slug from a given string. - * - * @author Titouan Galopin - */ -interface SluggerInterface -{ - /** - * Creates a slug for the given string and locale, using appropriate transliteration when needed. - */ - public function slug(string $string, string $separator = '-', string $locale = null): AbstractUnicodeString; -} diff --git a/lib/symfony/string/UnicodeString.php b/lib/symfony/string/UnicodeString.php deleted file mode 100644 index 9b906c6fc..000000000 --- a/lib/symfony/string/UnicodeString.php +++ /dev/null @@ -1,377 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; - -/** - * Represents a string of Unicode grapheme clusters encoded as UTF-8. - * - * A letter followed by combining characters (accents typically) form what Unicode defines - * as a grapheme cluster: a character as humans mean it in written texts. This class knows - * about the concept and won't split a letter apart from its combining accents. It also - * ensures all string comparisons happen on their canonically-composed representation, - * ignoring e.g. the order in which accents are listed when a letter has many of them. - * - * @see https://unicode.org/reports/tr15/ - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -class UnicodeString extends AbstractUnicodeString -{ - public function __construct(string $string = '') - { - $this->string = normalizer_is_normalized($string) ? $string : normalizer_normalize($string); - - if (false === $this->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - } - - public function append(string ...$suffix): AbstractString - { - $str = clone $this; - $str->string = $this->string.(1 >= \count($suffix) ? ($suffix[0] ?? '') : implode('', $suffix)); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function chunk(int $length = 1): array - { - if (1 > $length) { - throw new InvalidArgumentException('The chunk length must be greater than zero.'); - } - - if ('' === $this->string) { - return []; - } - - $rx = '/('; - while (65535 < $length) { - $rx .= '\X{65535}'; - $length -= 65535; - } - $rx .= '\X{'.$length.'})/u'; - - $str = clone $this; - $chunks = []; - - foreach (preg_split($rx, $this->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY) as $chunk) { - $str->string = $chunk; - $chunks[] = clone $str; - } - - return $chunks; - } - - public function endsWith($suffix): bool - { - if ($suffix instanceof AbstractString) { - $suffix = $suffix->string; - } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { - return parent::endsWith($suffix); - } else { - $suffix = (string) $suffix; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($suffix, $form) ?: $suffix = normalizer_normalize($suffix, $form); - - if ('' === $suffix || false === $suffix) { - return false; - } - - if ($this->ignoreCase) { - return 0 === mb_stripos(grapheme_extract($this->string, \strlen($suffix), \GRAPHEME_EXTR_MAXBYTES, \strlen($this->string) - \strlen($suffix)), $suffix, 0, 'UTF-8'); - } - - return $suffix === grapheme_extract($this->string, \strlen($suffix), \GRAPHEME_EXTR_MAXBYTES, \strlen($this->string) - \strlen($suffix)); - } - - public function equalsTo($string): bool - { - if ($string instanceof AbstractString) { - $string = $string->string; - } elseif (\is_array($string) || $string instanceof \Traversable) { - return parent::equalsTo($string); - } else { - $string = (string) $string; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($string, $form) ?: $string = normalizer_normalize($string, $form); - - if ('' !== $string && false !== $string && $this->ignoreCase) { - return \strlen($string) === \strlen($this->string) && 0 === mb_stripos($this->string, $string, 0, 'UTF-8'); - } - - return $string === $this->string; - } - - public function indexOf($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOf($needle, $offset); - } else { - $needle = (string) $needle; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($needle, $form) ?: $needle = normalizer_normalize($needle, $form); - - if ('' === $needle || false === $needle) { - return null; - } - - try { - $i = $this->ignoreCase ? grapheme_stripos($this->string, $needle, $offset) : grapheme_strpos($this->string, $needle, $offset); - } catch (\ValueError $e) { - return null; - } - - return false === $i ? null : $i; - } - - public function indexOfLast($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOfLast($needle, $offset); - } else { - $needle = (string) $needle; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($needle, $form) ?: $needle = normalizer_normalize($needle, $form); - - if ('' === $needle || false === $needle) { - return null; - } - - $string = $this->string; - - if (0 > $offset) { - // workaround https://bugs.php.net/74264 - if (0 > $offset += grapheme_strlen($needle)) { - $string = grapheme_substr($string, 0, $offset); - } - $offset = 0; - } - - $i = $this->ignoreCase ? grapheme_strripos($string, $needle, $offset) : grapheme_strrpos($string, $needle, $offset); - - return false === $i ? null : $i; - } - - public function join(array $strings, string $lastGlue = null): AbstractString - { - $str = parent::join($strings, $lastGlue); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - return $str; - } - - public function length(): int - { - return grapheme_strlen($this->string); - } - - /** - * @return static - */ - public function normalize(int $form = self::NFC): parent - { - $str = clone $this; - - if (\in_array($form, [self::NFC, self::NFKC], true)) { - normalizer_is_normalized($str->string, $form) ?: $str->string = normalizer_normalize($str->string, $form); - } elseif (!\in_array($form, [self::NFD, self::NFKD], true)) { - throw new InvalidArgumentException('Unsupported normalization form.'); - } elseif (!normalizer_is_normalized($str->string, $form)) { - $str->string = normalizer_normalize($str->string, $form); - $str->ignoreCase = null; - } - - return $str; - } - - public function prepend(string ...$prefix): AbstractString - { - $str = clone $this; - $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$this->string; - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function replace(string $from, string $to): AbstractString - { - $str = clone $this; - normalizer_is_normalized($from) ?: $from = normalizer_normalize($from); - - if ('' !== $from && false !== $from) { - $tail = $str->string; - $result = ''; - $indexOf = $this->ignoreCase ? 'grapheme_stripos' : 'grapheme_strpos'; - - while ('' !== $tail && false !== $i = $indexOf($tail, $from)) { - $slice = grapheme_substr($tail, 0, $i); - $result .= $slice.$to; - $tail = substr($tail, \strlen($slice) + \strlen($from)); - } - - $str->string = $result.$tail; - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - } - - return $str; - } - - public function replaceMatches(string $fromRegexp, $to): AbstractString - { - $str = parent::replaceMatches($fromRegexp, $to); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - return $str; - } - - public function slice(int $start = 0, int $length = null): AbstractString - { - $str = clone $this; - - if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { - $start = 0; - } - $str->string = (string) grapheme_substr($this->string, $start, $length ?? 2147483647); - - return $str; - } - - public function splice(string $replacement, int $start = 0, int $length = null): AbstractString - { - $str = clone $this; - - if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { - $start = 0; - } - $start = $start ? \strlen(grapheme_substr($this->string, 0, $start)) : 0; - $length = $length ? \strlen(grapheme_substr($this->string, $start, $length ?? 2147483647)) : $length; - $str->string = substr_replace($this->string, $replacement, $start, $length ?? 2147483647); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (1 > $limit = $limit ?? 2147483647) { - throw new InvalidArgumentException('Split limit must be a positive integer.'); - } - - if ('' === $delimiter) { - throw new InvalidArgumentException('Split delimiter is empty.'); - } - - if (null !== $flags) { - return parent::split($delimiter.'u', $limit, $flags); - } - - normalizer_is_normalized($delimiter) ?: $delimiter = normalizer_normalize($delimiter); - - if (false === $delimiter) { - throw new InvalidArgumentException('Split delimiter is not a valid UTF-8 string.'); - } - - $str = clone $this; - $tail = $this->string; - $chunks = []; - $indexOf = $this->ignoreCase ? 'grapheme_stripos' : 'grapheme_strpos'; - - while (1 < $limit && false !== $i = $indexOf($tail, $delimiter)) { - $str->string = grapheme_substr($tail, 0, $i); - $chunks[] = clone $str; - $tail = substr($tail, \strlen($str->string) + \strlen($delimiter)); - --$limit; - } - - $str->string = $tail; - $chunks[] = clone $str; - - return $chunks; - } - - public function startsWith($prefix): bool - { - if ($prefix instanceof AbstractString) { - $prefix = $prefix->string; - } elseif (\is_array($prefix) || $prefix instanceof \Traversable) { - return parent::startsWith($prefix); - } else { - $prefix = (string) $prefix; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($prefix, $form) ?: $prefix = normalizer_normalize($prefix, $form); - - if ('' === $prefix || false === $prefix) { - return false; - } - - if ($this->ignoreCase) { - return 0 === mb_stripos(grapheme_extract($this->string, \strlen($prefix), \GRAPHEME_EXTR_MAXBYTES), $prefix, 0, 'UTF-8'); - } - - return $prefix === grapheme_extract($this->string, \strlen($prefix), \GRAPHEME_EXTR_MAXBYTES); - } - - public function __wakeup() - { - if (!\is_string($this->string)) { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - normalizer_is_normalized($this->string) ?: $this->string = normalizer_normalize($this->string); - } - - public function __clone() - { - if (null === $this->ignoreCase) { - normalizer_is_normalized($this->string) ?: $this->string = normalizer_normalize($this->string); - } - - $this->ignoreCase = false; - } -} diff --git a/lib/symfony/string/composer.json b/lib/symfony/string/composer.json deleted file mode 100644 index 2b88fd529..000000000 --- a/lib/symfony/string/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "symfony/string", - "type": "library", - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "keywords": ["string", "utf8", "utf-8", "grapheme", "i18n", "unicode"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\String\\": "" }, - "files": [ "Resources/functions.php" ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/translation-contracts/.gitignore b/lib/symfony/translation-contracts/.gitignore deleted file mode 100644 index c49a5d8df..000000000 --- a/lib/symfony/translation-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/lib/symfony/translation-contracts/CHANGELOG.md b/lib/symfony/translation-contracts/CHANGELOG.md deleted file mode 100644 index 7932e2613..000000000 --- a/lib/symfony/translation-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/lib/symfony/translation-contracts/LICENSE b/lib/symfony/translation-contracts/LICENSE deleted file mode 100644 index 74cdc2dbf..000000000 --- a/lib/symfony/translation-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/translation-contracts/LocaleAwareInterface.php b/lib/symfony/translation-contracts/LocaleAwareInterface.php deleted file mode 100644 index 693f92ba9..000000000 --- a/lib/symfony/translation-contracts/LocaleAwareInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -interface LocaleAwareInterface -{ - /** - * Sets the current locale. - * - * @param string $locale The locale - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function setLocale(string $locale); - - /** - * Returns the current locale. - * - * @return string - */ - public function getLocale(); -} diff --git a/lib/symfony/translation-contracts/README.md b/lib/symfony/translation-contracts/README.md deleted file mode 100644 index 42e5c5175..000000000 --- a/lib/symfony/translation-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Translation Contracts -============================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/lib/symfony/translation-contracts/TranslatableInterface.php b/lib/symfony/translation-contracts/TranslatableInterface.php deleted file mode 100644 index 47fd6fa02..000000000 --- a/lib/symfony/translation-contracts/TranslatableInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -/** - * @author Nicolas Grekas - */ -interface TranslatableInterface -{ - public function trans(TranslatorInterface $translator, string $locale = null): string; -} diff --git a/lib/symfony/translation-contracts/TranslatorInterface.php b/lib/symfony/translation-contracts/TranslatorInterface.php deleted file mode 100644 index 77b7a9c58..000000000 --- a/lib/symfony/translation-contracts/TranslatorInterface.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -/** - * @author Fabien Potencier - * - * @method string getLocale() Returns the default locale - */ -interface TranslatorInterface -{ - /** - * Translates the given message. - * - * When a number is provided as a parameter named "%count%", the message is parsed for plural - * forms and a translation is chosen according to this number using the following rules: - * - * Given a message with different plural translations separated by a - * pipe (|), this method returns the correct portion of the message based - * on the given number, locale and the pluralization rules in the message - * itself. - * - * The message supports two different types of pluralization rules: - * - * interval: {0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples - * indexed: There is one apple|There are %count% apples - * - * The indexed solution can also contain labels (e.g. one: There is one apple). - * This is purely for making the translations more clear - it does not - * affect the functionality. - * - * The two methods can also be mixed: - * {0} There are no apples|one: There is one apple|more: There are %count% apples - * - * An interval can represent a finite set of numbers: - * {1,2,3,4} - * - * An interval can represent numbers between two numbers: - * [1, +Inf] - * ]-1,2[ - * - * The left delimiter can be [ (inclusive) or ] (exclusive). - * The right delimiter can be [ (exclusive) or ] (inclusive). - * Beside numbers, you can use -Inf and +Inf for the infinite. - * - * @see https://en.wikipedia.org/wiki/ISO_31-11 - * - * @param string $id The message id (may also be an object that can be cast to string) - * @param array $parameters An array of parameters for the message - * @param string|null $domain The domain for the message or null to use the default - * @param string|null $locale The locale or null to use the default - * - * @return string - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null); -} diff --git a/lib/symfony/translation-contracts/TranslatorTrait.php b/lib/symfony/translation-contracts/TranslatorTrait.php deleted file mode 100644 index 405ce8d70..000000000 --- a/lib/symfony/translation-contracts/TranslatorTrait.php +++ /dev/null @@ -1,262 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; - -/** - * A trait to help implement TranslatorInterface and LocaleAwareInterface. - * - * @author Fabien Potencier - */ -trait TranslatorTrait -{ - private $locale; - - /** - * {@inheritdoc} - */ - public function setLocale(string $locale) - { - $this->locale = $locale; - } - - /** - * {@inheritdoc} - * - * @return string - */ - public function getLocale() - { - return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); - } - - /** - * {@inheritdoc} - */ - public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string - { - if (null === $id || '' === $id) { - return ''; - } - - if (!isset($parameters['%count%']) || !is_numeric($parameters['%count%'])) { - return strtr($id, $parameters); - } - - $number = (float) $parameters['%count%']; - $locale = $locale ?: $this->getLocale(); - - $parts = []; - if (preg_match('/^\|++$/', $id)) { - $parts = explode('|', $id); - } elseif (preg_match_all('/(?:\|\||[^\|])++/', $id, $matches)) { - $parts = $matches[0]; - } - - $intervalRegexp = <<<'EOF' -/^(?P - ({\s* - (\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*) - \s*}) - - | - - (?P[\[\]]) - \s* - (?P-Inf|\-?\d+(\.\d+)?) - \s*,\s* - (?P\+?Inf|\-?\d+(\.\d+)?) - \s* - (?P[\[\]]) -)\s*(?P.*?)$/xs -EOF; - - $standardRules = []; - foreach ($parts as $part) { - $part = trim(str_replace('||', '|', $part)); - - // try to match an explicit rule, then fallback to the standard ones - if (preg_match($intervalRegexp, $part, $matches)) { - if ($matches[2]) { - foreach (explode(',', $matches[3]) as $n) { - if ($number == $n) { - return strtr($matches['message'], $parameters); - } - } - } else { - $leftNumber = '-Inf' === $matches['left'] ? -\INF : (float) $matches['left']; - $rightNumber = is_numeric($matches['right']) ? (float) $matches['right'] : \INF; - - if (('[' === $matches['left_delimiter'] ? $number >= $leftNumber : $number > $leftNumber) - && (']' === $matches['right_delimiter'] ? $number <= $rightNumber : $number < $rightNumber) - ) { - return strtr($matches['message'], $parameters); - } - } - } elseif (preg_match('/^\w+\:\s*(.*?)$/', $part, $matches)) { - $standardRules[] = $matches[1]; - } else { - $standardRules[] = $part; - } - } - - $position = $this->getPluralizationRule($number, $locale); - - if (!isset($standardRules[$position])) { - // when there's exactly one rule given, and that rule is a standard - // rule, use this rule - if (1 === \count($parts) && isset($standardRules[0])) { - return strtr($standardRules[0], $parameters); - } - - $message = sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number); - - if (class_exists(InvalidArgumentException::class)) { - throw new InvalidArgumentException($message); - } - - throw new \InvalidArgumentException($message); - } - - return strtr($standardRules[$position], $parameters); - } - - /** - * Returns the plural position to use for the given locale and number. - * - * The plural rules are derived from code of the Zend Framework (2010-09-25), - * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). - * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - */ - private function getPluralizationRule(float $number, string $locale): int - { - $number = abs($number); - - switch ('pt_BR' !== $locale && 'en_US_POSIX' !== $locale && \strlen($locale) > 3 ? substr($locale, 0, strrpos($locale, '_')) : $locale) { - case 'af': - case 'bn': - case 'bg': - case 'ca': - case 'da': - case 'de': - case 'el': - case 'en': - case 'en_US_POSIX': - case 'eo': - case 'es': - case 'et': - case 'eu': - case 'fa': - case 'fi': - case 'fo': - case 'fur': - case 'fy': - case 'gl': - case 'gu': - case 'ha': - case 'he': - case 'hu': - case 'is': - case 'it': - case 'ku': - case 'lb': - case 'ml': - case 'mn': - case 'mr': - case 'nah': - case 'nb': - case 'ne': - case 'nl': - case 'nn': - case 'no': - case 'oc': - case 'om': - case 'or': - case 'pa': - case 'pap': - case 'ps': - case 'pt': - case 'so': - case 'sq': - case 'sv': - case 'sw': - case 'ta': - case 'te': - case 'tk': - case 'ur': - case 'zu': - return (1 == $number) ? 0 : 1; - - case 'am': - case 'bh': - case 'fil': - case 'fr': - case 'gun': - case 'hi': - case 'hy': - case 'ln': - case 'mg': - case 'nso': - case 'pt_BR': - case 'ti': - case 'wa': - return ($number < 2) ? 0 : 1; - - case 'be': - case 'bs': - case 'hr': - case 'ru': - case 'sh': - case 'sr': - case 'uk': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'cs': - case 'sk': - return (1 == $number) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); - - case 'ga': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : 2); - - case 'lt': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'sl': - return (1 == $number % 100) ? 0 : ((2 == $number % 100) ? 1 : (((3 == $number % 100) || (4 == $number % 100)) ? 2 : 3)); - - case 'mk': - return (1 == $number % 10) ? 0 : 1; - - case 'mt': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); - - case 'lv': - return (0 == $number) ? 0 : (((1 == $number % 10) && (11 != $number % 100)) ? 1 : 2); - - case 'pl': - return (1 == $number) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); - - case 'cy': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : (((8 == $number) || (11 == $number)) ? 2 : 3)); - - case 'ro': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); - - case 'ar': - return (0 == $number) ? 0 : ((1 == $number) ? 1 : ((2 == $number) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); - - default: - return 0; - } - } -} diff --git a/lib/symfony/translation-contracts/composer.json b/lib/symfony/translation-contracts/composer.json deleted file mode 100644 index 65fe243a4..000000000 --- a/lib/symfony/translation-contracts/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/translation-contracts", - "type": "library", - "description": "Generic abstractions related to translation", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Translation\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/lib/symfony/twig-bridge/AppVariable.php b/lib/symfony/twig-bridge/AppVariable.php deleted file mode 100644 index 23683eb35..000000000 --- a/lib/symfony/twig-bridge/AppVariable.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Exposes some Symfony parameters and services as an "app" global variable. - * - * @author Fabien Potencier - */ -class AppVariable -{ - private $tokenStorage; - private $requestStack; - private $environment; - private $debug; - - public function setTokenStorage(TokenStorageInterface $tokenStorage) - { - $this->tokenStorage = $tokenStorage; - } - - public function setRequestStack(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - } - - public function setEnvironment(string $environment) - { - $this->environment = $environment; - } - - public function setDebug(bool $debug) - { - $this->debug = $debug; - } - - /** - * Returns the current token. - * - * @return TokenInterface|null - * - * @throws \RuntimeException When the TokenStorage is not available - */ - public function getToken() - { - if (null === $tokenStorage = $this->tokenStorage) { - throw new \RuntimeException('The "app.token" variable is not available.'); - } - - return $tokenStorage->getToken(); - } - - /** - * Returns the current user. - * - * @return UserInterface|null - * - * @see TokenInterface::getUser() - */ - public function getUser() - { - if (null === $tokenStorage = $this->tokenStorage) { - throw new \RuntimeException('The "app.user" variable is not available.'); - } - - if (!$token = $tokenStorage->getToken()) { - return null; - } - - $user = $token->getUser(); - - // @deprecated since Symfony 5.4, $user will always be a UserInterface instance - return \is_object($user) ? $user : null; - } - - /** - * Returns the current request. - * - * @return Request|null - */ - public function getRequest() - { - if (null === $this->requestStack) { - throw new \RuntimeException('The "app.request" variable is not available.'); - } - - return $this->requestStack->getCurrentRequest(); - } - - /** - * Returns the current session. - * - * @return Session|null - */ - public function getSession() - { - if (null === $this->requestStack) { - throw new \RuntimeException('The "app.session" variable is not available.'); - } - $request = $this->getRequest(); - - return $request && $request->hasSession() ? $request->getSession() : null; - } - - /** - * Returns the current app environment. - * - * @return string - */ - public function getEnvironment() - { - if (null === $this->environment) { - throw new \RuntimeException('The "app.environment" variable is not available.'); - } - - return $this->environment; - } - - /** - * Returns the current app debug mode. - * - * @return bool - */ - public function getDebug() - { - if (null === $this->debug) { - throw new \RuntimeException('The "app.debug" variable is not available.'); - } - - return $this->debug; - } - - /** - * Returns some or all the existing flash messages: - * * getFlashes() returns all the flash messages - * * getFlashes('notice') returns a simple array with flash messages of that type - * * getFlashes(['notice', 'error']) returns a nested array of type => messages. - * - * @return array - */ - public function getFlashes($types = null) - { - try { - if (null === $session = $this->getSession()) { - return []; - } - } catch (\RuntimeException $e) { - return []; - } - - if (null === $types || '' === $types || [] === $types) { - return $session->getFlashBag()->all(); - } - - if (\is_string($types)) { - return $session->getFlashBag()->get($types); - } - - $result = []; - foreach ($types as $type) { - $result[$type] = $session->getFlashBag()->get($type); - } - - return $result; - } -} diff --git a/lib/symfony/twig-bridge/CHANGELOG.md b/lib/symfony/twig-bridge/CHANGELOG.md deleted file mode 100644 index 535df0c08..000000000 --- a/lib/symfony/twig-bridge/CHANGELOG.md +++ /dev/null @@ -1,169 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - -* Add `github` format & autodetection to render errors as annotations when - running the Twig linter command in a Github Actions environment. - -5.3 ---- - - * Add a new `markAsPublic` method on `NotificationEmail` to change the `importance` context option to null after creation - * Add a new `fragment_uri()` helper to generate the URI of a fragment - * Add support of Bootstrap 5 for form theming - * Add a new `serialize` filter to serialize objects using the Serializer component - -5.2.0 ------ - - * added the `impersonation_exit_url()` and `impersonation_exit_path()` functions. They return a URL that allows to switch back to the original user. - * added the `workflow_transition()` function to easily retrieve a specific transition object - * added support for translating `TranslatableInterface` objects - * added the `t()` function to easily create `TranslatableMessage` objects - * Added support for extracting messages from the `t()` function - * Added `field_*` Twig functions to access string values from Form fields - * changed the `importance` context option of `NotificationEmail` to allow `null` - -5.0.0 ------ - - * removed `TwigEngine` class, use `\Twig\Environment` instead. - * removed `transChoice` filter and token - * `HttpFoundationExtension` requires a `UrlHelper` on instantiation - * removed support for implicit STDIN usage in the `lint:twig` command, use `lint:twig -` (append a dash) instead to make it explicit. - * added form theme for Foundation 6 - * added support for Foundation 6 switches: add the `switch-input` class to the attributes of a `CheckboxType` - -4.4.0 ------ - - * added a new `TwigErrorRenderer` for `html` format, integrated with the `ErrorHandler` component - * marked all classes extending twig as `@final` - * deprecated to pass `$rootDir` and `$fileLinkFormatter` as 5th and 6th argument respectively to the - `DebugCommand::__construct()` method, swap the variables position. - * the `LintCommand` lints all the templates stored in all configured Twig paths if none argument is provided - * deprecated accepting STDIN implicitly when using the `lint:twig` command, use `lint:twig -` (append a dash) instead to make it explicit. - * added `--show-deprecations` option to the `lint:twig` command - * added support for Bootstrap4 switches: add the `switch-custom` class to the label attributes of a `CheckboxType` - * Marked the `TwigDataCollector` class as `@final`. - -4.3.0 ------ - - * added the `form_parent()` function that allows to reliably retrieve the parent form in Twig templates - * added the `workflow_transition_blockers()` function - * deprecated the `$requestStack` and `$requestContext` arguments of the - `HttpFoundationExtension`, pass a `Symfony\Component\HttpFoundation\UrlHelper` - instance as the only argument instead - -4.2.0 ------ - - * add bundle name suggestion on wrongly overridden templates paths - * added `name` argument in `debug:twig` command and changed `filter` argument as `--filter` option - * deprecated the `transchoice` tag and filter, use the `trans` ones instead with a `%count%` parameter - -4.1.0 ------ - - * add a `workflow_metadata` function - -3.4.0 ------ - - * added an `only` keyword to `form_theme` tag to disable usage of default themes when rendering a form - * deprecated `Symfony\Bridge\Twig\Form\TwigRenderer` - * deprecated `DebugCommand::set/getTwigEnvironment`. Pass an instance of - `Twig\Environment` as first argument of the constructor instead - * deprecated `LintCommand::set/getTwigEnvironment`. Pass an instance of - `Twig\Environment` as first argument of the constructor instead - -3.3.0 ------ - - * added a `workflow_has_marked_place` function - * added a `workflow_marked_places` function - -3.2.0 ------ - - * added `AppVariable::getToken()` - * Deprecated the possibility to inject the Form `TwigRenderer` into the `FormExtension`. - * [BC BREAK] Registering the `FormExtension` without configuring a runtime loader for the `TwigRenderer` - doesn't work anymore. - - Before: - - ```php - use Symfony\Bridge\Twig\Extension\FormExtension; - use Symfony\Bridge\Twig\Form\TwigRenderer; - use Symfony\Bridge\Twig\Form\TwigRendererEngine; - - // ... - $rendererEngine = new TwigRendererEngine(['form_div_layout.html.twig']); - $rendererEngine->setEnvironment($twig); - $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager))); - ``` - - After: - - ```php - // ... - $rendererEngine = new TwigRendererEngine(['form_div_layout.html.twig'], $twig); - // require Twig 1.30+ - $twig->addRuntimeLoader(new \Twig\RuntimeLoader\FactoryRuntimeLoader([ - TwigRenderer::class => function () use ($rendererEngine, $csrfTokenManager) { - return new TwigRenderer($rendererEngine, $csrfTokenManager); - }, - ])); - $twig->addExtension(new FormExtension()); - ``` - * Deprecated the `TwigRendererEngineInterface` interface. - * added WorkflowExtension (provides `workflow_can` and `workflow_transitions`) - -2.7.0 ------ - - * added LogoutUrlExtension (provides `logout_url` and `logout_path`) - * added an HttpFoundation extension (provides the `absolute_url` and the `relative_path` functions) - * added AssetExtension (provides the `asset` and `asset_version` functions) - * Added possibility to extract translation messages from a file or files besides extracting from a directory - -2.5.0 ------ - - * moved command `twig:lint` from `TwigBundle` - -2.4.0 ------ - - * added stopwatch tag to time templates with the WebProfilerBundle - -2.3.0 ------ - - * added helpers form(), form_start() and form_end() - * deprecated form_enctype() in favor of form_start() - -2.2.0 ------ - - * added a `controller` function to help generating controller references - * added a `render_esi` and a `render_hinclude` function - * [BC BREAK] restricted the `render` tag to only accept URIs or ControllerReference instances (the signature changed) - * added a `render` function to render a request - * The `app` global variable is now injected even when using the twig service directly. - * Added an optional parameter to the `path` and `url` function which allows to generate - relative paths (e.g. "../parent-file") and scheme-relative URLs (e.g. "//example.com/dir/file"). - -2.1.0 ------ - - * added global variables access in a form theme - * added TwigEngine - * added TwigExtractor - * added a csrf_token function - * added a way to specify a default domain for a Twig template (via the - 'trans_default_domain' tag) diff --git a/lib/symfony/twig-bridge/Command/DebugCommand.php b/lib/symfony/twig-bridge/Command/DebugCommand.php deleted file mode 100644 index d4c782101..000000000 --- a/lib/symfony/twig-bridge/Command/DebugCommand.php +++ /dev/null @@ -1,600 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Twig\Environment; -use Twig\Loader\ChainLoader; -use Twig\Loader\FilesystemLoader; - -/** - * Lists twig functions, filters, globals and tests present in the current project. - * - * @author Jordi Boggiano - */ -class DebugCommand extends Command -{ - protected static $defaultName = 'debug:twig'; - protected static $defaultDescription = 'Show a list of twig functions, filters, globals and tests'; - - private $twig; - private $projectDir; - private $bundlesMetadata; - private $twigDefaultPath; - private $filesystemLoaders; - private $fileLinkFormatter; - - public function __construct(Environment $twig, string $projectDir = null, array $bundlesMetadata = [], string $twigDefaultPath = null, FileLinkFormatter $fileLinkFormatter = null) - { - parent::__construct(); - - $this->twig = $twig; - $this->projectDir = $projectDir; - $this->bundlesMetadata = $bundlesMetadata; - $this->twigDefaultPath = $twigDefaultPath; - $this->fileLinkFormatter = $fileLinkFormatter; - } - - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'The template name'), - new InputOption('filter', null, InputOption::VALUE_REQUIRED, 'Show details for all entries matching this filter'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (text or json)', 'text'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command outputs a list of twig functions, -filters, globals and tests. - - php %command.full_name% - -The command lists all functions, filters, etc. - - php %command.full_name% @Twig/Exception/error.html.twig - -The command lists all paths that match the given template name. - - php %command.full_name% --filter=date - -The command lists everything that contains the word date. - - php %command.full_name% --format=json - -The command lists everything in a machine readable json format. -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $name = $input->getArgument('name'); - $filter = $input->getOption('filter'); - - if (null !== $name && [] === $this->getFilesystemLoaders()) { - throw new InvalidArgumentException(sprintf('Argument "name" not supported, it requires the Twig loader "%s".', FilesystemLoader::class)); - } - - switch ($input->getOption('format')) { - case 'text': - $name ? $this->displayPathsText($io, $name) : $this->displayGeneralText($io, $filter); - break; - case 'json': - $name ? $this->displayPathsJson($io, $name) : $this->displayGeneralJson($io, $filter); - break; - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->getLoaderPaths())); - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['text', 'json']); - } - } - - private function displayPathsText(SymfonyStyle $io, string $name) - { - $file = new \ArrayIterator($this->findTemplateFiles($name)); - $paths = $this->getLoaderPaths($name); - - $io->section('Matched File'); - if ($file->valid()) { - if ($fileLink = $this->getFileLink($file->key())) { - $io->block($file->current(), 'OK', sprintf('fg=black;bg=green;href=%s', $fileLink), ' ', true); - } else { - $io->success($file->current()); - } - $file->next(); - - if ($file->valid()) { - $io->section('Overridden Files'); - do { - if ($fileLink = $this->getFileLink($file->key())) { - $io->text(sprintf('* %s', $fileLink, $file->current())); - } else { - $io->text(sprintf('* %s', $file->current())); - } - $file->next(); - } while ($file->valid()); - } - } else { - $alternatives = []; - - if ($paths) { - $shortnames = []; - $dirs = []; - foreach (current($paths) as $path) { - $dirs[] = $this->isAbsolutePath($path) ? $path : $this->projectDir.'/'.$path; - } - foreach (Finder::create()->files()->followLinks()->in($dirs) as $file) { - $shortnames[] = str_replace('\\', '/', $file->getRelativePathname()); - } - - [$namespace, $shortname] = $this->parseTemplateName($name); - $alternatives = $this->findAlternatives($shortname, $shortnames); - if (FilesystemLoader::MAIN_NAMESPACE !== $namespace) { - $alternatives = array_map(function ($shortname) use ($namespace) { - return '@'.$namespace.'/'.$shortname; - }, $alternatives); - } - } - - $this->error($io, sprintf('Template name "%s" not found', $name), $alternatives); - } - - $io->section('Configured Paths'); - if ($paths) { - $io->table(['Namespace', 'Paths'], $this->buildTableRows($paths)); - } else { - $alternatives = []; - $namespace = $this->parseTemplateName($name)[0]; - - if (FilesystemLoader::MAIN_NAMESPACE === $namespace) { - $message = 'No template paths configured for your application'; - } else { - $message = sprintf('No template paths configured for "@%s" namespace', $namespace); - foreach ($this->getFilesystemLoaders() as $loader) { - $namespaces = $loader->getNamespaces(); - foreach ($this->findAlternatives($namespace, $namespaces) as $namespace) { - $alternatives[] = '@'.$namespace; - } - } - } - - $this->error($io, $message, $alternatives); - - if (!$alternatives && $paths = $this->getLoaderPaths()) { - $io->table(['Namespace', 'Paths'], $this->buildTableRows($paths)); - } - } - } - - private function displayPathsJson(SymfonyStyle $io, string $name) - { - $files = $this->findTemplateFiles($name); - $paths = $this->getLoaderPaths($name); - - if ($files) { - $data['matched_file'] = array_shift($files); - if ($files) { - $data['overridden_files'] = $files; - } - } else { - $data['matched_file'] = sprintf('Template name "%s" not found', $name); - } - $data['loader_paths'] = $paths; - - $io->writeln(json_encode($data)); - } - - private function displayGeneralText(SymfonyStyle $io, string $filter = null) - { - $decorated = $io->isDecorated(); - $types = ['functions', 'filters', 'tests', 'globals']; - foreach ($types as $index => $type) { - $items = []; - foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) { - if (!$filter || str_contains($name, $filter)) { - $items[$name] = $name.$this->getPrettyMetadata($type, $entity, $decorated); - } - } - - if (!$items) { - continue; - } - - $io->section(ucfirst($type)); - - ksort($items); - $io->listing($items); - } - - if (!$filter && $paths = $this->getLoaderPaths()) { - $io->section('Loader Paths'); - $io->table(['Namespace', 'Paths'], $this->buildTableRows($paths)); - } - - if ($wrongBundles = $this->findWrongBundleOverrides()) { - foreach ($this->buildWarningMessages($wrongBundles) as $message) { - $io->warning($message); - } - } - } - - private function displayGeneralJson(SymfonyStyle $io, ?string $filter) - { - $decorated = $io->isDecorated(); - $types = ['functions', 'filters', 'tests', 'globals']; - $data = []; - foreach ($types as $type) { - foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) { - if (!$filter || str_contains($name, $filter)) { - $data[$type][$name] = $this->getMetadata($type, $entity); - } - } - } - if (isset($data['tests'])) { - $data['tests'] = array_keys($data['tests']); - } - - if (!$filter && $paths = $this->getLoaderPaths($filter)) { - $data['loader_paths'] = $paths; - } - - if ($wrongBundles = $this->findWrongBundleOverrides()) { - $data['warnings'] = $this->buildWarningMessages($wrongBundles); - } - - $data = json_encode($data, \JSON_PRETTY_PRINT); - $io->writeln($decorated ? OutputFormatter::escape($data) : $data); - } - - private function getLoaderPaths(string $name = null): array - { - $loaderPaths = []; - foreach ($this->getFilesystemLoaders() as $loader) { - $namespaces = $loader->getNamespaces(); - if (null !== $name) { - $namespace = $this->parseTemplateName($name)[0]; - $namespaces = array_intersect([$namespace], $namespaces); - } - - foreach ($namespaces as $namespace) { - $paths = array_map([$this, 'getRelativePath'], $loader->getPaths($namespace)); - - if (FilesystemLoader::MAIN_NAMESPACE === $namespace) { - $namespace = '(None)'; - } else { - $namespace = '@'.$namespace; - } - - $loaderPaths[$namespace] = array_merge($loaderPaths[$namespace] ?? [], $paths); - } - } - - return $loaderPaths; - } - - private function getMetadata(string $type, $entity) - { - if ('globals' === $type) { - return $entity; - } - if ('tests' === $type) { - return null; - } - if ('functions' === $type || 'filters' === $type) { - $cb = $entity->getCallable(); - if (null === $cb) { - return null; - } - if (\is_array($cb)) { - if (!method_exists($cb[0], $cb[1])) { - return null; - } - $refl = new \ReflectionMethod($cb[0], $cb[1]); - } elseif (\is_object($cb) && method_exists($cb, '__invoke')) { - $refl = new \ReflectionMethod($cb, '__invoke'); - } elseif (\function_exists($cb)) { - $refl = new \ReflectionFunction($cb); - } elseif (\is_string($cb) && preg_match('{^(.+)::(.+)$}', $cb, $m) && method_exists($m[1], $m[2])) { - $refl = new \ReflectionMethod($m[1], $m[2]); - } else { - throw new \UnexpectedValueException('Unsupported callback type.'); - } - - $args = $refl->getParameters(); - - // filter out context/environment args - if ($entity->needsEnvironment()) { - array_shift($args); - } - if ($entity->needsContext()) { - array_shift($args); - } - - if ('filters' === $type) { - // remove the value the filter is applied on - array_shift($args); - } - - // format args - $args = array_map(function (\ReflectionParameter $param) { - if ($param->isDefaultValueAvailable()) { - return $param->getName().' = '.json_encode($param->getDefaultValue()); - } - - return $param->getName(); - }, $args); - - return $args; - } - - return null; - } - - private function getPrettyMetadata(string $type, $entity, bool $decorated): ?string - { - if ('tests' === $type) { - return ''; - } - - try { - $meta = $this->getMetadata($type, $entity); - if (null === $meta) { - return '(unknown?)'; - } - } catch (\UnexpectedValueException $e) { - return sprintf(' %s', $decorated ? OutputFormatter::escape($e->getMessage()) : $e->getMessage()); - } - - if ('globals' === $type) { - if (\is_object($meta)) { - return ' = object('.\get_class($meta).')'; - } - - $description = substr(@json_encode($meta), 0, 50); - - return sprintf(' = %s', $decorated ? OutputFormatter::escape($description) : $description); - } - - if ('functions' === $type) { - return '('.implode(', ', $meta).')'; - } - - if ('filters' === $type) { - return $meta ? '('.implode(', ', $meta).')' : ''; - } - - return null; - } - - private function findWrongBundleOverrides(): array - { - $alternatives = []; - $bundleNames = []; - - if ($this->twigDefaultPath && $this->projectDir) { - $folders = glob($this->twigDefaultPath.'/bundles/*', \GLOB_ONLYDIR); - $relativePath = ltrim(substr($this->twigDefaultPath.'/bundles/', \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - $bundleNames = array_reduce($folders, function ($carry, $absolutePath) use ($relativePath) { - if (str_starts_with($absolutePath, $this->projectDir)) { - $name = basename($absolutePath); - $path = ltrim($relativePath.$name, \DIRECTORY_SEPARATOR); - $carry[$name] = $path; - } - - return $carry; - }, $bundleNames); - } - - if ($notFoundBundles = array_diff_key($bundleNames, $this->bundlesMetadata)) { - $alternatives = []; - foreach ($notFoundBundles as $notFoundBundle => $path) { - $alternatives[$path] = $this->findAlternatives($notFoundBundle, array_keys($this->bundlesMetadata)); - } - } - - return $alternatives; - } - - private function buildWarningMessages(array $wrongBundles): array - { - $messages = []; - foreach ($wrongBundles as $path => $alternatives) { - $message = sprintf('Path "%s" not matching any bundle found', $path); - if ($alternatives) { - if (1 === \count($alternatives)) { - $message .= sprintf(", did you mean \"%s\"?\n", $alternatives[0]); - } else { - $message .= ", did you mean one of these:\n"; - foreach ($alternatives as $bundle) { - $message .= sprintf(" - %s\n", $bundle); - } - } - } - $messages[] = trim($message); - } - - return $messages; - } - - private function error(SymfonyStyle $io, string $message, array $alternatives = []): void - { - if ($alternatives) { - if (1 === \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - $io->block($message, null, 'fg=white;bg=red', ' ', true); - } - - private function findTemplateFiles(string $name): array - { - [$namespace, $shortname] = $this->parseTemplateName($name); - - $files = []; - foreach ($this->getFilesystemLoaders() as $loader) { - foreach ($loader->getPaths($namespace) as $path) { - if (!$this->isAbsolutePath($path)) { - $path = $this->projectDir.'/'.$path; - } - $filename = $path.'/'.$shortname; - - if (is_file($filename)) { - if (false !== $realpath = realpath($filename)) { - $files[$realpath] = $this->getRelativePath($realpath); - } else { - $files[$filename] = $this->getRelativePath($filename); - } - } - } - } - - return $files; - } - - private function parseTemplateName(string $name, string $default = FilesystemLoader::MAIN_NAMESPACE): array - { - if (isset($name[0]) && '@' === $name[0]) { - if (false === ($pos = strpos($name, '/')) || $pos === \strlen($name) - 1) { - throw new InvalidArgumentException(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name)); - } - - $namespace = substr($name, 1, $pos - 1); - $shortname = substr($name, $pos + 1); - - return [$namespace, $shortname]; - } - - return [$default, $name]; - } - - private function buildTableRows(array $loaderPaths): array - { - $rows = []; - $firstNamespace = true; - $prevHasSeparator = false; - - foreach ($loaderPaths as $namespace => $paths) { - if (!$firstNamespace && !$prevHasSeparator && \count($paths) > 1) { - $rows[] = ['', '']; - } - $firstNamespace = false; - foreach ($paths as $path) { - $rows[] = [$namespace, $path.\DIRECTORY_SEPARATOR]; - $namespace = ''; - } - if (\count($paths) > 1) { - $rows[] = ['', '']; - $prevHasSeparator = true; - } else { - $prevHasSeparator = false; - } - } - if ($prevHasSeparator) { - array_pop($rows); - } - - return $rows; - } - - private function findAlternatives(string $name, array $collection): array - { - $alternatives = []; - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $threshold = 1e3; - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); - - return array_keys($alternatives); - } - - private function getRelativePath(string $path): string - { - if (null !== $this->projectDir && str_starts_with($path, $this->projectDir)) { - return ltrim(substr($path, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - } - - return $path; - } - - private function isAbsolutePath(string $file): bool - { - return strspn($file, '/\\', 0, 1) || (\strlen($file) > 3 && ctype_alpha($file[0]) && ':' === $file[1] && strspn($file, '/\\', 2, 1)) || null !== parse_url($file, \PHP_URL_SCHEME); - } - - /** - * @return FilesystemLoader[] - */ - private function getFilesystemLoaders(): array - { - if (null !== $this->filesystemLoaders) { - return $this->filesystemLoaders; - } - $this->filesystemLoaders = []; - - $loader = $this->twig->getLoader(); - if ($loader instanceof FilesystemLoader) { - $this->filesystemLoaders[] = $loader; - } elseif ($loader instanceof ChainLoader) { - foreach ($loader->getLoaders() as $l) { - if ($l instanceof FilesystemLoader) { - $this->filesystemLoaders[] = $l; - } - } - } - - return $this->filesystemLoaders; - } - - private function getFileLink(string $absolutePath): string - { - if (null === $this->fileLinkFormatter) { - return ''; - } - - return (string) $this->fileLinkFormatter->format($absolutePath, 1); - } -} diff --git a/lib/symfony/twig-bridge/Command/LintCommand.php b/lib/symfony/twig-bridge/Command/LintCommand.php deleted file mode 100644 index b91110b34..000000000 --- a/lib/symfony/twig-bridge/Command/LintCommand.php +++ /dev/null @@ -1,296 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Command; - -use Symfony\Component\Console\CI\GithubActionReporter; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Finder\Finder; -use Twig\Environment; -use Twig\Error\Error; -use Twig\Loader\ArrayLoader; -use Twig\Loader\FilesystemLoader; -use Twig\Source; - -/** - * Command that will validate your template syntax and output encountered errors. - * - * @author Marc Weistroff - * @author Jérôme Tamarelle - */ -class LintCommand extends Command -{ - protected static $defaultName = 'lint:twig'; - protected static $defaultDescription = 'Lint a Twig template and outputs encountered errors'; - - private $twig; - - /** - * @var string|null - */ - private $format; - - public function __construct(Environment $twig) - { - parent::__construct(); - - $this->twig = $twig; - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format') - ->addOption('show-deprecations', null, InputOption::VALUE_NONE, 'Show deprecations as errors') - ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->setHelp(<<<'EOF' -The %command.name% command lints a template and outputs to STDOUT -the first encountered syntax error. - -You can validate the syntax of contents passed from STDIN: - - cat filename | php %command.full_name% - - -Or the syntax of a file: - - php %command.full_name% filename - -Or of a whole directory: - - php %command.full_name% dirname - php %command.full_name% dirname --format=json - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $filenames = $input->getArgument('filename'); - $showDeprecations = $input->getOption('show-deprecations'); - $this->format = $input->getOption('format'); - - if (null === $this->format) { - $this->format = GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'; - } - - if (['-'] === $filenames) { - return $this->display($input, $output, $io, [$this->validate(file_get_contents('php://stdin'), uniqid('sf_', true))]); - } - - if (!$filenames) { - $loader = $this->twig->getLoader(); - if ($loader instanceof FilesystemLoader) { - $paths = []; - foreach ($loader->getNamespaces() as $namespace) { - $paths[] = $loader->getPaths($namespace); - } - $filenames = array_merge(...$paths); - } - - if (!$filenames) { - throw new RuntimeException('Please provide a filename or pipe template content to STDIN.'); - } - } - - if ($showDeprecations) { - $prevErrorHandler = set_error_handler(static function ($level, $message, $file, $line) use (&$prevErrorHandler) { - if (\E_USER_DEPRECATED === $level) { - $templateLine = 0; - if (preg_match('/ at line (\d+)[ .]/', $message, $matches)) { - $templateLine = $matches[1]; - } - - throw new Error($message, $templateLine); - } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; - }); - } - - try { - $filesInfo = $this->getFilesInfo($filenames); - } finally { - if ($showDeprecations) { - restore_error_handler(); - } - } - - return $this->display($input, $output, $io, $filesInfo); - } - - private function getFilesInfo(array $filenames): array - { - $filesInfo = []; - foreach ($filenames as $filename) { - foreach ($this->findFiles($filename) as $file) { - $filesInfo[] = $this->validate(file_get_contents($file), $file); - } - } - - return $filesInfo; - } - - protected function findFiles(string $filename) - { - if (is_file($filename)) { - return [$filename]; - } elseif (is_dir($filename)) { - return Finder::create()->files()->in($filename)->name('*.twig'); - } - - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); - } - - private function validate(string $template, string $file): array - { - $realLoader = $this->twig->getLoader(); - try { - $temporaryLoader = new ArrayLoader([$file => $template]); - $this->twig->setLoader($temporaryLoader); - $nodeTree = $this->twig->parse($this->twig->tokenize(new Source($template, $file))); - $this->twig->compile($nodeTree); - $this->twig->setLoader($realLoader); - } catch (Error $e) { - $this->twig->setLoader($realLoader); - - return ['template' => $template, 'file' => $file, 'line' => $e->getTemplateLine(), 'valid' => false, 'exception' => $e]; - } - - return ['template' => $template, 'file' => $file, 'valid' => true]; - } - - private function display(InputInterface $input, OutputInterface $output, SymfonyStyle $io, array $files) - { - switch ($this->format) { - case 'txt': - return $this->displayTxt($output, $io, $files); - case 'json': - return $this->displayJson($output, $files); - case 'github': - return $this->displayTxt($output, $io, $files, true); - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); - } - } - - private function displayTxt(OutputInterface $output, SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false) - { - $errors = 0; - $githubReporter = $errorAsGithubAnnotations ? new GithubActionReporter($output) : null; - - foreach ($filesInfo as $info) { - if ($info['valid'] && $output->isVerbose()) { - $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - } elseif (!$info['valid']) { - ++$errors; - $this->renderException($io, $info['template'], $info['exception'], $info['file'], $githubReporter); - } - } - - if (0 === $errors) { - $io->success(sprintf('All %d Twig files contain valid syntax.', \count($filesInfo))); - } else { - $io->warning(sprintf('%d Twig files have valid syntax and %d contain errors.', \count($filesInfo) - $errors, $errors)); - } - - return min($errors, 1); - } - - private function displayJson(OutputInterface $output, array $filesInfo) - { - $errors = 0; - - array_walk($filesInfo, function (&$v) use (&$errors) { - $v['file'] = (string) $v['file']; - unset($v['template']); - if (!$v['valid']) { - $v['message'] = $v['exception']->getMessage(); - unset($v['exception']); - ++$errors; - } - }); - - $output->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)); - - return min($errors, 1); - } - - private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, GithubActionReporter $githubReporter = null) - { - $line = $exception->getTemplateLine(); - - if ($githubReporter) { - $githubReporter->error($exception->getRawMessage(), $file, $line <= 0 ? null : $line); - } - - if ($file) { - $output->text(sprintf(' ERROR in %s (line %s)', $file, $line)); - } else { - $output->text(sprintf(' ERROR (line %s)', $line)); - } - - // If the line is not known (this might happen for deprecations if we fail at detecting the line for instance), - // we render the message without context, to ensure the message is displayed. - if ($line <= 0) { - $output->text(sprintf(' >> %s ', $exception->getRawMessage())); - - return; - } - - foreach ($this->getContext($template, $line) as $lineNumber => $code) { - $output->text(sprintf( - '%s %-6s %s', - $lineNumber === $line ? ' >> ' : ' ', - $lineNumber, - $code - )); - if ($lineNumber === $line) { - $output->text(sprintf(' >> %s ', $exception->getRawMessage())); - } - } - } - - private function getContext(string $template, int $line, int $context = 3) - { - $lines = explode("\n", $template); - - $position = max(0, $line - $context); - $max = min(\count($lines), $line - 1 + $context); - - $result = []; - while ($position < $max) { - $result[$position + 1] = $lines[$position]; - ++$position; - } - - return $result; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['txt', 'json', 'github']); - } - } -} diff --git a/lib/symfony/twig-bridge/DataCollector/TwigDataCollector.php b/lib/symfony/twig-bridge/DataCollector/TwigDataCollector.php deleted file mode 100644 index 4a4697810..000000000 --- a/lib/symfony/twig-bridge/DataCollector/TwigDataCollector.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Twig\Environment; -use Twig\Error\LoaderError; -use Twig\Markup; -use Twig\Profiler\Dumper\HtmlDumper; -use Twig\Profiler\Profile; - -/** - * @author Fabien Potencier - * - * @final - */ -class TwigDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $profile; - private $twig; - private $computed; - - public function __construct(Profile $profile, Environment $twig = null) - { - $this->profile = $profile; - $this->twig = $twig; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->profile->reset(); - $this->computed = null; - $this->data = []; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - $this->data['profile'] = serialize($this->profile); - $this->data['template_paths'] = []; - - if (null === $this->twig) { - return; - } - - $templateFinder = function (Profile $profile) use (&$templateFinder) { - if ($profile->isTemplate()) { - try { - $template = $this->twig->load($name = $profile->getName()); - } catch (LoaderError $e) { - $template = null; - } - - if (null !== $template && '' !== $path = $template->getSourceContext()->getPath()) { - $this->data['template_paths'][$name] = $path; - } - } - - foreach ($profile as $p) { - $templateFinder($p); - } - }; - $templateFinder($this->profile); - } - - public function getTime() - { - return $this->getProfile()->getDuration() * 1000; - } - - public function getTemplateCount() - { - return $this->getComputedData('template_count'); - } - - public function getTemplatePaths() - { - return $this->data['template_paths']; - } - - public function getTemplates() - { - return $this->getComputedData('templates'); - } - - public function getBlockCount() - { - return $this->getComputedData('block_count'); - } - - public function getMacroCount() - { - return $this->getComputedData('macro_count'); - } - - public function getHtmlCallGraph() - { - $dumper = new HtmlDumper(); - $dump = $dumper->dump($this->getProfile()); - - // needed to remove the hardcoded CSS styles - $dump = str_replace([ - '', - '', - '', - '', - ], [ - '', - '', - '', - '', - ], $dump); - - return new Markup($dump, 'UTF-8'); - } - - public function getProfile() - { - if (null === $this->profile) { - $this->profile = unserialize($this->data['profile'], ['allowed_classes' => ['Twig_Profiler_Profile', 'Twig\Profiler\Profile']]); - } - - return $this->profile; - } - - private function getComputedData(string $index) - { - if (null === $this->computed) { - $this->computed = $this->computeData($this->getProfile()); - } - - return $this->computed[$index]; - } - - private function computeData(Profile $profile) - { - $data = [ - 'template_count' => 0, - 'block_count' => 0, - 'macro_count' => 0, - ]; - - $templates = []; - foreach ($profile as $p) { - $d = $this->computeData($p); - - $data['template_count'] += ($p->isTemplate() ? 1 : 0) + $d['template_count']; - $data['block_count'] += ($p->isBlock() ? 1 : 0) + $d['block_count']; - $data['macro_count'] += ($p->isMacro() ? 1 : 0) + $d['macro_count']; - - if ($p->isTemplate()) { - if (!isset($templates[$p->getTemplate()])) { - $templates[$p->getTemplate()] = 1; - } else { - ++$templates[$p->getTemplate()]; - } - } - - foreach ($d['templates'] as $template => $count) { - if (!isset($templates[$template])) { - $templates[$template] = $count; - } else { - $templates[$template] += $count; - } - } - } - $data['templates'] = $templates; - - return $data; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'twig'; - } -} diff --git a/lib/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php b/lib/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php deleted file mode 100644 index b0ccd684e..000000000 --- a/lib/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\ErrorRenderer; - -use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface; -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\RequestStack; -use Twig\Environment; - -/** - * Provides the ability to render custom Twig-based HTML error pages - * in non-debug mode, otherwise falls back to HtmlErrorRenderer. - * - * @author Yonel Ceruto - */ -class TwigErrorRenderer implements ErrorRendererInterface -{ - private $twig; - private $fallbackErrorRenderer; - private $debug; - - /** - * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it - */ - public function __construct(Environment $twig, HtmlErrorRenderer $fallbackErrorRenderer = null, $debug = false) - { - if (!\is_bool($debug) && !\is_callable($debug)) { - throw new \TypeError(sprintf('Argument 3 passed to "%s()" must be a boolean or a callable, "%s" given.', __METHOD__, get_debug_type($debug))); - } - - $this->twig = $twig; - $this->fallbackErrorRenderer = $fallbackErrorRenderer ?? new HtmlErrorRenderer(); - $this->debug = $debug; - } - - /** - * {@inheritdoc} - */ - public function render(\Throwable $exception): FlattenException - { - $exception = $this->fallbackErrorRenderer->render($exception); - $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); - - if ($debug || !$template = $this->findTemplate($exception->getStatusCode())) { - return $exception; - } - - return $exception->setAsString($this->twig->render($template, [ - 'exception' => $exception, - 'status_code' => $exception->getStatusCode(), - 'status_text' => $exception->getStatusText(), - ])); - } - - public static function isDebug(RequestStack $requestStack, bool $debug): \Closure - { - return static function () use ($requestStack, $debug): bool { - if (!$request = $requestStack->getCurrentRequest()) { - return $debug; - } - - return $debug && $request->attributes->getBoolean('showException', true); - }; - } - - private function findTemplate(int $statusCode): ?string - { - $template = sprintf('@Twig/Exception/error%s.html.twig', $statusCode); - if ($this->twig->getLoader()->exists($template)) { - return $template; - } - - $template = '@Twig/Exception/error.html.twig'; - if ($this->twig->getLoader()->exists($template)) { - return $template; - } - - return null; - } -} diff --git a/lib/symfony/twig-bridge/Extension/AssetExtension.php b/lib/symfony/twig-bridge/Extension/AssetExtension.php deleted file mode 100644 index 694821f7b..000000000 --- a/lib/symfony/twig-bridge/Extension/AssetExtension.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Asset\Packages; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Twig extension for the Symfony Asset component. - * - * @author Fabien Potencier - */ -final class AssetExtension extends AbstractExtension -{ - private $packages; - - public function __construct(Packages $packages) - { - $this->packages = $packages; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('asset', [$this, 'getAssetUrl']), - new TwigFunction('asset_version', [$this, 'getAssetVersion']), - ]; - } - - /** - * Returns the public url/path of an asset. - * - * If the package used to generate the path is an instance of - * UrlPackage, you will always get a URL and not a path. - */ - public function getAssetUrl(string $path, string $packageName = null): string - { - return $this->packages->getUrl($path, $packageName); - } - - /** - * Returns the version of an asset. - */ - public function getAssetVersion(string $path, string $packageName = null): string - { - return $this->packages->getVersion($path, $packageName); - } -} diff --git a/lib/symfony/twig-bridge/Extension/CodeExtension.php b/lib/symfony/twig-bridge/Extension/CodeExtension.php deleted file mode 100644 index 3bf8ccd29..000000000 --- a/lib/symfony/twig-bridge/Extension/CodeExtension.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; - -/** - * Twig extension relate to PHP code and used by the profiler and the default exception templates. - * - * @author Fabien Potencier - */ -final class CodeExtension extends AbstractExtension -{ - private $fileLinkFormat; - private $charset; - private $projectDir; - - /** - * @param string|FileLinkFormatter $fileLinkFormat The format for links to source files - */ - public function __construct($fileLinkFormat, string $projectDir, string $charset) - { - $this->fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->projectDir = str_replace('\\', '/', $projectDir).'/'; - $this->charset = $charset; - } - - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('abbr_class', [$this, 'abbrClass'], ['is_safe' => ['html']]), - new TwigFilter('abbr_method', [$this, 'abbrMethod'], ['is_safe' => ['html']]), - new TwigFilter('format_args', [$this, 'formatArgs'], ['is_safe' => ['html']]), - new TwigFilter('format_args_as_text', [$this, 'formatArgsAsText']), - new TwigFilter('file_excerpt', [$this, 'fileExcerpt'], ['is_safe' => ['html']]), - new TwigFilter('format_file', [$this, 'formatFile'], ['is_safe' => ['html']]), - new TwigFilter('format_file_from_text', [$this, 'formatFileFromText'], ['is_safe' => ['html']]), - new TwigFilter('format_log_message', [$this, 'formatLogMessage'], ['is_safe' => ['html']]), - new TwigFilter('file_link', [$this, 'getFileLink']), - new TwigFilter('file_relative', [$this, 'getFileRelative']), - ]; - } - - public function abbrClass(string $class): string - { - $parts = explode('\\', $class); - $short = array_pop($parts); - - return sprintf('%s', $class, $short); - } - - public function abbrMethod(string $method): string - { - if (str_contains($method, '::')) { - [$class, $method] = explode('::', $method, 2); - $result = sprintf('%s::%s()', $this->abbrClass($class), $method); - } elseif ('Closure' === $method) { - $result = sprintf('%1$s', $method); - } else { - $result = sprintf('%1$s()', $method); - } - - return $result; - } - - /** - * Formats an array as a string. - */ - public function formatArgs(array $args): string - { - $result = []; - foreach ($args as $key => $item) { - if ('object' === $item[0]) { - $parts = explode('\\', $item[1]); - $short = array_pop($parts); - $formattedValue = sprintf('object(%s)', $item[1], $short); - } elseif ('array' === $item[0]) { - $formattedValue = sprintf('array(%s)', \is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); - } elseif ('null' === $item[0]) { - $formattedValue = 'null'; - } elseif ('boolean' === $item[0]) { - $formattedValue = ''.strtolower(var_export($item[1], true)).''; - } elseif ('resource' === $item[0]) { - $formattedValue = 'resource'; - } else { - $formattedValue = str_replace("\n", '', htmlspecialchars(var_export($item[1], true), \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset)); - } - - $result[] = \is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue); - } - - return implode(', ', $result); - } - - /** - * Formats an array as a string. - */ - public function formatArgsAsText(array $args): string - { - return strip_tags($this->formatArgs($args)); - } - - /** - * Returns an excerpt of a code file around the given line number. - */ - public function fileExcerpt(string $file, int $line, int $srcContext = 3): ?string - { - if (is_file($file) && is_readable($file)) { - // highlight_file could throw warnings - // see https://bugs.php.net/25725 - $code = @highlight_file($file, true); - // remove main code/span tags - $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); - // split multiline spans - $code = preg_replace_callback('#]++)>((?:[^<]*+
    )++[^<]*+)
    #', function ($m) { - return "".str_replace('
    ', "

    ", $m[2]).''; - }, $code); - $content = explode('
    ', $code); - - $lines = []; - if (0 > $srcContext) { - $srcContext = \count($content); - } - - for ($i = max($line - $srcContext, 1), $max = min($line + $srcContext, \count($content)); $i <= $max; ++$i) { - $lines[] = ''.self::fixCodeMarkup($content[$i - 1]).''; - } - - return '
      '.implode("\n", $lines).'
    '; - } - - return null; - } - - /** - * Formats a file path. - */ - public function formatFile(string $file, int $line, string $text = null): string - { - $file = trim($file); - - if (null === $text) { - $text = $file; - if (null !== $rel = $this->getFileRelative($text)) { - $rel = explode('/', $rel, 2); - $text = sprintf('%s%s', $this->projectDir, $rel[0], '/'.($rel[1] ?? '')); - } - } - - if (0 < $line) { - $text .= ' at line '.$line; - } - - if (false !== $link = $this->getFileLink($file, $line)) { - return sprintf('%s', htmlspecialchars($link, \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset), $text); - } - - return $text; - } - - /** - * Returns the link for a given file/line pair. - * - * @return string|false - */ - public function getFileLink(string $file, int $line) - { - if ($fmt = $this->fileLinkFormat) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); - } - - return false; - } - - public function getFileRelative(string $file): ?string - { - $file = str_replace('\\', '/', $file); - - if (null !== $this->projectDir && str_starts_with($file, $this->projectDir)) { - return ltrim(substr($file, \strlen($this->projectDir)), '/'); - } - - return null; - } - - public function formatFileFromText(string $text): string - { - return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) { - return 'in '.$this->formatFile($match[2], $match[3]); - }, $text); - } - - /** - * @internal - */ - public function formatLogMessage(string $message, array $context): string - { - if ($context && str_contains($message, '{')) { - $replacements = []; - foreach ($context as $key => $val) { - if (\is_scalar($val)) { - $replacements['{'.$key.'}'] = $val; - } - } - - if ($replacements) { - $message = strtr($message, $replacements); - } - } - - return htmlspecialchars($message, \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset); - } - - protected static function fixCodeMarkup(string $line): string - { - //
    ending tag from previous line - $opening = strpos($line, ''); - if (false !== $closing && (false === $opening || $closing < $opening)) { - $line = substr_replace($line, '', $closing, 7); - } - - // missing
    tag at the end of line - $opening = strpos($line, ''); - if (false !== $opening && (false === $closing || $closing > $opening)) { - $line .= '
    '; - } - - return trim($line); - } -} diff --git a/lib/symfony/twig-bridge/Extension/CsrfExtension.php b/lib/symfony/twig-bridge/Extension/CsrfExtension.php deleted file mode 100644 index 646a48798..000000000 --- a/lib/symfony/twig-bridge/Extension/CsrfExtension.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * @author Christian Flothmann - * @author Titouan Galopin - */ -final class CsrfExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('csrf_token', [CsrfRuntime::class, 'getCsrfToken']), - ]; - } -} diff --git a/lib/symfony/twig-bridge/Extension/CsrfRuntime.php b/lib/symfony/twig-bridge/Extension/CsrfRuntime.php deleted file mode 100644 index c3d5da647..000000000 --- a/lib/symfony/twig-bridge/Extension/CsrfRuntime.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; - -/** - * @author Christian Flothmann - * @author Titouan Galopin - */ -final class CsrfRuntime -{ - private $csrfTokenManager; - - public function __construct(CsrfTokenManagerInterface $csrfTokenManager) - { - $this->csrfTokenManager = $csrfTokenManager; - } - - public function getCsrfToken(string $tokenId): string - { - return $this->csrfTokenManager->getToken($tokenId)->getValue(); - } -} diff --git a/lib/symfony/twig-bridge/Extension/DumpExtension.php b/lib/symfony/twig-bridge/Extension/DumpExtension.php deleted file mode 100644 index 46ad8eaf6..000000000 --- a/lib/symfony/twig-bridge/Extension/DumpExtension.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\TokenParser\DumpTokenParser; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Twig\Environment; -use Twig\Extension\AbstractExtension; -use Twig\Template; -use Twig\TwigFunction; - -/** - * Provides integration of the dump() function with Twig. - * - * @author Nicolas Grekas - */ -final class DumpExtension extends AbstractExtension -{ - private $cloner; - private $dumper; - - public function __construct(ClonerInterface $cloner, HtmlDumper $dumper = null) - { - $this->cloner = $cloner; - $this->dumper = $dumper; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('dump', [$this, 'dump'], ['is_safe' => ['html'], 'needs_context' => true, 'needs_environment' => true]), - ]; - } - - /** - * {@inheritdoc} - */ - public function getTokenParsers(): array - { - return [new DumpTokenParser()]; - } - - public function dump(Environment $env, array $context): ?string - { - if (!$env->isDebug()) { - return null; - } - - if (2 === \func_num_args()) { - $vars = []; - foreach ($context as $key => $value) { - if (!$value instanceof Template) { - $vars[$key] = $value; - } - } - - $vars = [$vars]; - } else { - $vars = \func_get_args(); - unset($vars[0], $vars[1]); - } - - $dump = fopen('php://memory', 'r+'); - $this->dumper = $this->dumper ?? new HtmlDumper(); - $this->dumper->setCharset($env->getCharset()); - - foreach ($vars as $value) { - $this->dumper->dump($this->cloner->cloneVar($value), $dump); - } - - return stream_get_contents($dump, -1, 0); - } -} diff --git a/lib/symfony/twig-bridge/Extension/ExpressionExtension.php b/lib/symfony/twig-bridge/Extension/ExpressionExtension.php deleted file mode 100644 index 8d2a35c99..000000000 --- a/lib/symfony/twig-bridge/Extension/ExpressionExtension.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\ExpressionLanguage\Expression; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * ExpressionExtension gives a way to create Expressions from a template. - * - * @author Fabien Potencier - */ -final class ExpressionExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('expression', [$this, 'createExpression']), - ]; - } - - public function createExpression(string $expression): Expression - { - return new Expression($expression); - } -} diff --git a/lib/symfony/twig-bridge/Extension/FormExtension.php b/lib/symfony/twig-bridge/Extension/FormExtension.php deleted file mode 100644 index 7f0b1ed59..000000000 --- a/lib/symfony/twig-bridge/Extension/FormExtension.php +++ /dev/null @@ -1,219 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser; -use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; -use Symfony\Component\Form\ChoiceList\View\ChoiceView; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormView; -use Symfony\Contracts\Translation\TranslatorInterface; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; -use Twig\TwigFunction; -use Twig\TwigTest; - -/** - * FormExtension extends Twig with form capabilities. - * - * @author Fabien Potencier - * @author Bernhard Schussek - */ -final class FormExtension extends AbstractExtension -{ - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function getTokenParsers(): array - { - return [ - // {% form_theme form "SomeBundle::widgets.twig" %} - new FormThemeTokenParser(), - ]; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('form_widget', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_errors', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_label', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_help', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_row', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_rest', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form', null, ['node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_start', null, ['node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_end', null, ['node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('csrf_token', ['Symfony\Component\Form\FormRenderer', 'renderCsrfToken']), - new TwigFunction('form_parent', 'Symfony\Bridge\Twig\Extension\twig_get_form_parent'), - new TwigFunction('field_name', [$this, 'getFieldName']), - new TwigFunction('field_value', [$this, 'getFieldValue']), - new TwigFunction('field_label', [$this, 'getFieldLabel']), - new TwigFunction('field_help', [$this, 'getFieldHelp']), - new TwigFunction('field_errors', [$this, 'getFieldErrors']), - new TwigFunction('field_choices', [$this, 'getFieldChoices']), - ]; - } - - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('humanize', ['Symfony\Component\Form\FormRenderer', 'humanize']), - new TwigFilter('form_encode_currency', ['Symfony\Component\Form\FormRenderer', 'encodeCurrency'], ['is_safe' => ['html'], 'needs_environment' => true]), - ]; - } - - /** - * {@inheritdoc} - */ - public function getTests(): array - { - return [ - new TwigTest('selectedchoice', 'Symfony\Bridge\Twig\Extension\twig_is_selected_choice'), - new TwigTest('rootform', 'Symfony\Bridge\Twig\Extension\twig_is_root_form'), - ]; - } - - public function getFieldName(FormView $view): string - { - $view->setRendered(); - - return $view->vars['full_name']; - } - - /** - * @return string|array - */ - public function getFieldValue(FormView $view) - { - return $view->vars['value']; - } - - public function getFieldLabel(FormView $view): ?string - { - if (false === $label = $view->vars['label']) { - return null; - } - - if (!$label && $labelFormat = $view->vars['label_format']) { - $label = str_replace(['%id%', '%name%'], [$view->vars['id'], $view->vars['name']], $labelFormat); - } elseif (!$label) { - $label = ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $view->vars['name'])))); - } - - return $this->createFieldTranslation( - $label, - $view->vars['label_translation_parameters'] ?: [], - $view->vars['translation_domain'] - ); - } - - public function getFieldHelp(FormView $view): ?string - { - return $this->createFieldTranslation( - $view->vars['help'], - $view->vars['help_translation_parameters'] ?: [], - $view->vars['translation_domain'] - ); - } - - /** - * @return string[] - */ - public function getFieldErrors(FormView $view): iterable - { - /** @var FormError $error */ - foreach ($view->vars['errors'] as $error) { - yield $error->getMessage(); - } - } - - /** - * @return string[]|string[][] - */ - public function getFieldChoices(FormView $view): iterable - { - yield from $this->createFieldChoicesList($view->vars['choices'], $view->vars['choice_translation_domain']); - } - - private function createFieldChoicesList(iterable $choices, $translationDomain): iterable - { - foreach ($choices as $choice) { - $translatableLabel = $this->createFieldTranslation($choice->label, [], $translationDomain); - - if ($choice instanceof ChoiceGroupView) { - yield $translatableLabel => $this->createFieldChoicesList($choice, $translationDomain); - - continue; - } - - /* @var ChoiceView $choice */ - yield $translatableLabel => $choice->value; - } - } - - private function createFieldTranslation(?string $value, array $parameters, $domain): ?string - { - if (!$this->translator || !$value || false === $domain) { - return $value; - } - - return $this->translator->trans($value, $parameters, $domain); - } -} - -/** - * Returns whether a choice is selected for a given form value. - * - * This is a function and not callable due to performance reasons. - * - * @param string|array $selectedValue The selected value to compare - * - * @see ChoiceView::isSelected() - */ -function twig_is_selected_choice(ChoiceView $choice, $selectedValue): bool -{ - if (\is_array($selectedValue)) { - return \in_array($choice->value, $selectedValue, true); - } - - return $choice->value === $selectedValue; -} - -/** - * @internal - */ -function twig_is_root_form(FormView $formView): bool -{ - return null === $formView->parent; -} - -/** - * @internal - */ -function twig_get_form_parent(FormView $formView): ?FormView -{ - return $formView->parent; -} diff --git a/lib/symfony/twig-bridge/Extension/HttpFoundationExtension.php b/lib/symfony/twig-bridge/Extension/HttpFoundationExtension.php deleted file mode 100644 index a9ee05c4d..000000000 --- a/lib/symfony/twig-bridge/Extension/HttpFoundationExtension.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\UrlHelper; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Twig extension for the Symfony HttpFoundation component. - * - * @author Fabien Potencier - */ -final class HttpFoundationExtension extends AbstractExtension -{ - private $urlHelper; - - public function __construct(UrlHelper $urlHelper) - { - $this->urlHelper = $urlHelper; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('absolute_url', [$this, 'generateAbsoluteUrl']), - new TwigFunction('relative_path', [$this, 'generateRelativePath']), - ]; - } - - /** - * Returns the absolute URL for the given absolute or relative path. - * - * This method returns the path unchanged if no request is available. - * - * @see Request::getUriForPath() - */ - public function generateAbsoluteUrl(string $path): string - { - return $this->urlHelper->getAbsoluteUrl($path); - } - - /** - * Returns a relative path based on the current Request. - * - * This method returns the path unchanged if no request is available. - * - * @see Request::getRelativeUriForPath() - */ - public function generateRelativePath(string $path): string - { - return $this->urlHelper->getRelativePath($path); - } -} diff --git a/lib/symfony/twig-bridge/Extension/HttpKernelExtension.php b/lib/symfony/twig-bridge/Extension/HttpKernelExtension.php deleted file mode 100644 index 1af9ddb23..000000000 --- a/lib/symfony/twig-bridge/Extension/HttpKernelExtension.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Provides integration with the HttpKernel component. - * - * @author Fabien Potencier - */ -final class HttpKernelExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('render', [HttpKernelRuntime::class, 'renderFragment'], ['is_safe' => ['html']]), - new TwigFunction('render_*', [HttpKernelRuntime::class, 'renderFragmentStrategy'], ['is_safe' => ['html']]), - new TwigFunction('fragment_uri', [HttpKernelRuntime::class, 'generateFragmentUri']), - new TwigFunction('controller', static::class.'::controller'), - ]; - } - - public static function controller(string $controller, array $attributes = [], array $query = []): ControllerReference - { - return new ControllerReference($controller, $attributes, $query); - } -} diff --git a/lib/symfony/twig-bridge/Extension/HttpKernelRuntime.php b/lib/symfony/twig-bridge/Extension/HttpKernelRuntime.php deleted file mode 100644 index ab83054a9..000000000 --- a/lib/symfony/twig-bridge/Extension/HttpKernelRuntime.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\Fragment\FragmentHandler; -use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface; - -/** - * Provides integration with the HttpKernel component. - * - * @author Fabien Potencier - */ -final class HttpKernelRuntime -{ - private $handler; - private $fragmentUriGenerator; - - public function __construct(FragmentHandler $handler, FragmentUriGeneratorInterface $fragmentUriGenerator = null) - { - $this->handler = $handler; - $this->fragmentUriGenerator = $fragmentUriGenerator; - } - - /** - * Renders a fragment. - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @see FragmentHandler::render() - */ - public function renderFragment($uri, array $options = []): string - { - $strategy = $options['strategy'] ?? 'inline'; - unset($options['strategy']); - - return $this->handler->render($uri, $strategy, $options); - } - - /** - * Renders a fragment. - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @see FragmentHandler::render() - */ - public function renderFragmentStrategy(string $strategy, $uri, array $options = []): string - { - return $this->handler->render($uri, $strategy, $options); - } - - public function generateFragmentUri(ControllerReference $controller, bool $absolute = false, bool $strict = true, bool $sign = true): string - { - if (null === $this->fragmentUriGenerator) { - throw new \LogicException(sprintf('An instance of "%s" must be provided to use "%s()".', FragmentUriGeneratorInterface::class, __METHOD__)); - } - - return $this->fragmentUriGenerator->generate($controller, null, $absolute, $strict, $sign); - } -} diff --git a/lib/symfony/twig-bridge/Extension/LogoutUrlExtension.php b/lib/symfony/twig-bridge/Extension/LogoutUrlExtension.php deleted file mode 100644 index 071b9ff24..000000000 --- a/lib/symfony/twig-bridge/Extension/LogoutUrlExtension.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * LogoutUrlHelper provides generator functions for the logout URL to Twig. - * - * @author Jeremy Mikola - */ -final class LogoutUrlExtension extends AbstractExtension -{ - private $generator; - - public function __construct(LogoutUrlGenerator $generator) - { - $this->generator = $generator; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('logout_url', [$this, 'getLogoutUrl']), - new TwigFunction('logout_path', [$this, 'getLogoutPath']), - ]; - } - - /** - * Generates the relative logout URL for the firewall. - * - * @param string|null $key The firewall key or null to use the current firewall key - */ - public function getLogoutPath(string $key = null): string - { - return $this->generator->getLogoutPath($key); - } - - /** - * Generates the absolute logout URL for the firewall. - * - * @param string|null $key The firewall key or null to use the current firewall key - */ - public function getLogoutUrl(string $key = null): string - { - return $this->generator->getLogoutUrl($key); - } -} diff --git a/lib/symfony/twig-bridge/Extension/ProfilerExtension.php b/lib/symfony/twig-bridge/Extension/ProfilerExtension.php deleted file mode 100644 index 51d6eba2d..000000000 --- a/lib/symfony/twig-bridge/Extension/ProfilerExtension.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\Stopwatch\StopwatchEvent; -use Twig\Extension\ProfilerExtension as BaseProfilerExtension; -use Twig\Profiler\Profile; - -/** - * @author Fabien Potencier - */ -final class ProfilerExtension extends BaseProfilerExtension -{ - private $stopwatch; - - /** - * @var \SplObjectStorage - */ - private $events; - - public function __construct(Profile $profile, Stopwatch $stopwatch = null) - { - parent::__construct($profile); - - $this->stopwatch = $stopwatch; - $this->events = new \SplObjectStorage(); - } - - public function enter(Profile $profile): void - { - if ($this->stopwatch && $profile->isTemplate()) { - $this->events[$profile] = $this->stopwatch->start($profile->getName(), 'template'); - } - - parent::enter($profile); - } - - public function leave(Profile $profile): void - { - parent::leave($profile); - - if ($this->stopwatch && $profile->isTemplate()) { - $this->events[$profile]->stop(); - unset($this->events[$profile]); - } - } -} diff --git a/lib/symfony/twig-bridge/Extension/RoutingExtension.php b/lib/symfony/twig-bridge/Extension/RoutingExtension.php deleted file mode 100644 index 800c22f6d..000000000 --- a/lib/symfony/twig-bridge/Extension/RoutingExtension.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Twig\Extension\AbstractExtension; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Node; -use Twig\TwigFunction; - -/** - * Provides integration of the Routing component with Twig. - * - * @author Fabien Potencier - */ -final class RoutingExtension extends AbstractExtension -{ - private $generator; - - public function __construct(UrlGeneratorInterface $generator) - { - $this->generator = $generator; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('url', [$this, 'getUrl'], ['is_safe_callback' => [$this, 'isUrlGenerationSafe']]), - new TwigFunction('path', [$this, 'getPath'], ['is_safe_callback' => [$this, 'isUrlGenerationSafe']]), - ]; - } - - public function getPath(string $name, array $parameters = [], bool $relative = false): string - { - return $this->generator->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH); - } - - public function getUrl(string $name, array $parameters = [], bool $schemeRelative = false): string - { - return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL); - } - - /** - * Determines at compile time whether the generated URL will be safe and thus - * saving the unneeded automatic escaping for performance reasons. - * - * The URL generation process percent encodes non-alphanumeric characters. So there is no risk - * that malicious/invalid characters are part of the URL. The only character within an URL that - * must be escaped in html is the ampersand ("&") which separates query params. So we cannot mark - * the URL generation as always safe, but only when we are sure there won't be multiple query - * params. This is the case when there are none or only one constant parameter given. - * E.g. we know beforehand this will be safe: - * - path('route') - * - path('route', {'param': 'value'}) - * But the following may not: - * - path('route', var) - * - path('route', {'param': ['val1', 'val2'] }) // a sub-array - * - path('route', {'param1': 'value1', 'param2': 'value2'}) - * If param1 and param2 reference placeholder in the route, it would still be safe. But we don't know. - * - * @param Node $argsNode The arguments of the path/url function - * - * @return array An array with the contexts the URL is safe - */ - public function isUrlGenerationSafe(Node $argsNode): array - { - // support named arguments - $paramsNode = $argsNode->hasNode('parameters') ? $argsNode->getNode('parameters') : ( - $argsNode->hasNode(1) ? $argsNode->getNode(1) : null - ); - - if (null === $paramsNode || $paramsNode instanceof ArrayExpression && \count($paramsNode) <= 2 && - (!$paramsNode->hasNode(1) || $paramsNode->getNode(1) instanceof ConstantExpression) - ) { - return ['html']; - } - - return []; - } -} diff --git a/lib/symfony/twig-bridge/Extension/SecurityExtension.php b/lib/symfony/twig-bridge/Extension/SecurityExtension.php deleted file mode 100644 index 0e58fc0ec..000000000 --- a/lib/symfony/twig-bridge/Extension/SecurityExtension.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Security\Acl\Voter\FieldVote; -use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; -use Symfony\Component\Security\Http\Impersonate\ImpersonateUrlGenerator; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * SecurityExtension exposes security context features. - * - * @author Fabien Potencier - */ -final class SecurityExtension extends AbstractExtension -{ - private $securityChecker; - - private $impersonateUrlGenerator; - - public function __construct(AuthorizationCheckerInterface $securityChecker = null, ImpersonateUrlGenerator $impersonateUrlGenerator = null) - { - $this->securityChecker = $securityChecker; - $this->impersonateUrlGenerator = $impersonateUrlGenerator; - } - - /** - * @param mixed $object - */ - public function isGranted($role, $object = null, string $field = null): bool - { - if (null === $this->securityChecker) { - return false; - } - - if (null !== $field) { - $object = new FieldVote($object, $field); - } - - try { - return $this->securityChecker->isGranted($role, $object); - } catch (AuthenticationCredentialsNotFoundException $e) { - return false; - } - } - - public function getImpersonateExitUrl(string $exitTo = null): string - { - if (null === $this->impersonateUrlGenerator) { - return ''; - } - - return $this->impersonateUrlGenerator->generateExitUrl($exitTo); - } - - public function getImpersonateExitPath(string $exitTo = null): string - { - if (null === $this->impersonateUrlGenerator) { - return ''; - } - - return $this->impersonateUrlGenerator->generateExitPath($exitTo); - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('is_granted', [$this, 'isGranted']), - new TwigFunction('impersonation_exit_url', [$this, 'getImpersonateExitUrl']), - new TwigFunction('impersonation_exit_path', [$this, 'getImpersonateExitPath']), - ]; - } -} diff --git a/lib/symfony/twig-bridge/Extension/SerializerExtension.php b/lib/symfony/twig-bridge/Extension/SerializerExtension.php deleted file mode 100644 index f38571efa..000000000 --- a/lib/symfony/twig-bridge/Extension/SerializerExtension.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; - -/** - * @author Jesse Rushlow - */ -final class SerializerExtension extends AbstractExtension -{ - public function getFilters(): array - { - return [ - new TwigFilter('serialize', [SerializerRuntime::class, 'serialize']), - ]; - } -} diff --git a/lib/symfony/twig-bridge/Extension/SerializerRuntime.php b/lib/symfony/twig-bridge/Extension/SerializerRuntime.php deleted file mode 100644 index 3a4087aa7..000000000 --- a/lib/symfony/twig-bridge/Extension/SerializerRuntime.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Serializer\SerializerInterface; -use Twig\Extension\RuntimeExtensionInterface; - -/** - * @author Jesse Rushlow - */ -final class SerializerRuntime implements RuntimeExtensionInterface -{ - private $serializer; - - public function __construct(SerializerInterface $serializer) - { - $this->serializer = $serializer; - } - - public function serialize($data, string $format = 'json', array $context = []): string - { - return $this->serializer->serialize($data, $format, $context); - } -} diff --git a/lib/symfony/twig-bridge/Extension/StopwatchExtension.php b/lib/symfony/twig-bridge/Extension/StopwatchExtension.php deleted file mode 100644 index 80a25a949..000000000 --- a/lib/symfony/twig-bridge/Extension/StopwatchExtension.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\TokenParser\StopwatchTokenParser; -use Symfony\Component\Stopwatch\Stopwatch; -use Twig\Extension\AbstractExtension; -use Twig\TokenParser\TokenParserInterface; - -/** - * Twig extension for the stopwatch helper. - * - * @author Wouter J - */ -final class StopwatchExtension extends AbstractExtension -{ - private $stopwatch; - private $enabled; - - public function __construct(Stopwatch $stopwatch = null, bool $enabled = true) - { - $this->stopwatch = $stopwatch; - $this->enabled = $enabled; - } - - public function getStopwatch(): Stopwatch - { - return $this->stopwatch; - } - - /** - * @return TokenParserInterface[] - */ - public function getTokenParsers(): array - { - return [ - /* - * {% stopwatch foo %} - * Some stuff which will be recorded on the timeline - * {% endstopwatch %} - */ - new StopwatchTokenParser(null !== $this->stopwatch && $this->enabled), - ]; - } -} diff --git a/lib/symfony/twig-bridge/Extension/TranslationExtension.php b/lib/symfony/twig-bridge/Extension/TranslationExtension.php deleted file mode 100644 index c2797d837..000000000 --- a/lib/symfony/twig-bridge/Extension/TranslationExtension.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\NodeVisitor\TranslationDefaultDomainNodeVisitor; -use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor; -use Symfony\Bridge\Twig\TokenParser\TransDefaultDomainTokenParser; -use Symfony\Bridge\Twig\TokenParser\TransTokenParser; -use Symfony\Component\Translation\TranslatableMessage; -use Symfony\Contracts\Translation\TranslatableInterface; -use Symfony\Contracts\Translation\TranslatorInterface; -use Symfony\Contracts\Translation\TranslatorTrait; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; -use Twig\TwigFunction; - -// Help opcache.preload discover always-needed symbols -class_exists(TranslatorInterface::class); -class_exists(TranslatorTrait::class); - -/** - * Provides integration of the Translation component with Twig. - * - * @author Fabien Potencier - */ -final class TranslationExtension extends AbstractExtension -{ - private $translator; - private $translationNodeVisitor; - - public function __construct(TranslatorInterface $translator = null, TranslationNodeVisitor $translationNodeVisitor = null) - { - $this->translator = $translator; - $this->translationNodeVisitor = $translationNodeVisitor; - } - - public function getTranslator(): TranslatorInterface - { - if (null === $this->translator) { - if (!interface_exists(TranslatorInterface::class)) { - throw new \LogicException(sprintf('You cannot use the "%s" if the Translation Contracts are not available. Try running "composer require symfony/translation".', __CLASS__)); - } - - $this->translator = new class() implements TranslatorInterface { - use TranslatorTrait; - }; - } - - return $this->translator; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('t', [$this, 'createTranslatable']), - ]; - } - - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('trans', [$this, 'trans']), - ]; - } - - /** - * {@inheritdoc} - */ - public function getTokenParsers(): array - { - return [ - // {% trans %}Symfony is great!{% endtrans %} - new TransTokenParser(), - - // {% trans_default_domain "foobar" %} - new TransDefaultDomainTokenParser(), - ]; - } - - /** - * {@inheritdoc} - */ - public function getNodeVisitors(): array - { - return [$this->getTranslationNodeVisitor(), new TranslationDefaultDomainNodeVisitor()]; - } - - public function getTranslationNodeVisitor(): TranslationNodeVisitor - { - return $this->translationNodeVisitor ?: $this->translationNodeVisitor = new TranslationNodeVisitor(); - } - - /** - * @param string|\Stringable|TranslatableInterface|null $message - * @param array|string $arguments Can be the locale as a string when $message is a TranslatableInterface - */ - public function trans($message, $arguments = [], string $domain = null, string $locale = null, int $count = null): string - { - if ($message instanceof TranslatableInterface) { - if ([] !== $arguments && !\is_string($arguments)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be a locale passed as a string when the message is a "%s", "%s" given.', __METHOD__, TranslatableInterface::class, get_debug_type($arguments))); - } - - return $message->trans($this->getTranslator(), $locale ?? (\is_string($arguments) ? $arguments : null)); - } - - if (!\is_array($arguments)) { - throw new \TypeError(sprintf('Unless the message is a "%s", argument 2 passed to "%s()" must be an array of parameters, "%s" given.', TranslatableInterface::class, __METHOD__, get_debug_type($arguments))); - } - - if ('' === $message = (string) $message) { - return ''; - } - - if (null !== $count) { - $arguments['%count%'] = $count; - } - - return $this->getTranslator()->trans($message, $arguments, $domain, $locale); - } - - public function createTranslatable(string $message, array $parameters = [], string $domain = null): TranslatableMessage - { - if (!class_exists(TranslatableMessage::class)) { - throw new \LogicException(sprintf('You cannot use the "%s" as the Translation Component is not installed. Try running "composer require symfony/translation".', __CLASS__)); - } - - return new TranslatableMessage($message, $parameters, $domain); - } -} diff --git a/lib/symfony/twig-bridge/Extension/WebLinkExtension.php b/lib/symfony/twig-bridge/Extension/WebLinkExtension.php deleted file mode 100644 index 652a75762..000000000 --- a/lib/symfony/twig-bridge/Extension/WebLinkExtension.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\WebLink\GenericLinkProvider; -use Symfony\Component\WebLink\Link; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Twig extension for the Symfony WebLink component. - * - * @author Kévin Dunglas - */ -final class WebLinkExtension extends AbstractExtension -{ - private $requestStack; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('link', [$this, 'link']), - new TwigFunction('preload', [$this, 'preload']), - new TwigFunction('dns_prefetch', [$this, 'dnsPrefetch']), - new TwigFunction('preconnect', [$this, 'preconnect']), - new TwigFunction('prefetch', [$this, 'prefetch']), - new TwigFunction('prerender', [$this, 'prerender']), - ]; - } - - /** - * Adds a "Link" HTTP header. - * - * @param string $rel The relation type (e.g. "preload", "prefetch", "prerender" or "dns-prefetch") - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The relation URI - */ - public function link(string $uri, string $rel, array $attributes = []): string - { - if (!$request = $this->requestStack->getMainRequest()) { - return $uri; - } - - $link = new Link($rel, $uri); - foreach ($attributes as $key => $value) { - $link = $link->withAttribute($key, $value); - } - - $linkProvider = $request->attributes->get('_links', new GenericLinkProvider()); - $request->attributes->set('_links', $linkProvider->withLink($link)); - - return $uri; - } - - /** - * Preloads a resource. - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['crossorigin' => 'use-credentials']") - * - * @return string The path of the asset - */ - public function preload(string $uri, array $attributes = []): string - { - return $this->link($uri, 'preload', $attributes); - } - - /** - * Resolves a resource origin as early as possible. - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function dnsPrefetch(string $uri, array $attributes = []): string - { - return $this->link($uri, 'dns-prefetch', $attributes); - } - - /** - * Initiates a early connection to a resource (DNS resolution, TCP handshake, TLS negotiation). - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function preconnect(string $uri, array $attributes = []): string - { - return $this->link($uri, 'preconnect', $attributes); - } - - /** - * Indicates to the client that it should prefetch this resource. - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function prefetch(string $uri, array $attributes = []): string - { - return $this->link($uri, 'prefetch', $attributes); - } - - /** - * Indicates to the client that it should prerender this resource . - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function prerender(string $uri, array $attributes = []): string - { - return $this->link($uri, 'prerender', $attributes); - } -} diff --git a/lib/symfony/twig-bridge/Extension/WorkflowExtension.php b/lib/symfony/twig-bridge/Extension/WorkflowExtension.php deleted file mode 100644 index 9b5911ec2..000000000 --- a/lib/symfony/twig-bridge/Extension/WorkflowExtension.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Workflow\Registry; -use Symfony\Component\Workflow\Transition; -use Symfony\Component\Workflow\TransitionBlockerList; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * WorkflowExtension. - * - * @author Grégoire Pineau - * @author Carlos Pereira De Amorim - */ -final class WorkflowExtension extends AbstractExtension -{ - private $workflowRegistry; - - public function __construct(Registry $workflowRegistry) - { - $this->workflowRegistry = $workflowRegistry; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('workflow_can', [$this, 'canTransition']), - new TwigFunction('workflow_transitions', [$this, 'getEnabledTransitions']), - new TwigFunction('workflow_transition', [$this, 'getEnabledTransition']), - new TwigFunction('workflow_has_marked_place', [$this, 'hasMarkedPlace']), - new TwigFunction('workflow_marked_places', [$this, 'getMarkedPlaces']), - new TwigFunction('workflow_metadata', [$this, 'getMetadata']), - new TwigFunction('workflow_transition_blockers', [$this, 'buildTransitionBlockerList']), - ]; - } - - /** - * Returns true if the transition is enabled. - */ - public function canTransition(object $subject, string $transitionName, string $name = null): bool - { - return $this->workflowRegistry->get($subject, $name)->can($subject, $transitionName); - } - - /** - * Returns all enabled transitions. - * - * @return Transition[] - */ - public function getEnabledTransitions(object $subject, string $name = null): array - { - return $this->workflowRegistry->get($subject, $name)->getEnabledTransitions($subject); - } - - public function getEnabledTransition(object $subject, string $transition, string $name = null): ?Transition - { - return $this->workflowRegistry->get($subject, $name)->getEnabledTransition($subject, $transition); - } - - /** - * Returns true if the place is marked. - */ - public function hasMarkedPlace(object $subject, string $placeName, string $name = null): bool - { - return $this->workflowRegistry->get($subject, $name)->getMarking($subject)->has($placeName); - } - - /** - * Returns marked places. - * - * @return string[]|int[] - */ - public function getMarkedPlaces(object $subject, bool $placesNameOnly = true, string $name = null): array - { - $places = $this->workflowRegistry->get($subject, $name)->getMarking($subject)->getPlaces(); - - if ($placesNameOnly) { - return array_keys($places); - } - - return $places; - } - - /** - * Returns the metadata for a specific subject. - * - * @param string|Transition|null $metadataSubject Use null to get workflow metadata - * Use a string (the place name) to get place metadata - * Use a Transition instance to get transition metadata - */ - public function getMetadata(object $subject, string $key, $metadataSubject = null, string $name = null) - { - return $this - ->workflowRegistry - ->get($subject, $name) - ->getMetadataStore() - ->getMetadata($key, $metadataSubject) - ; - } - - public function buildTransitionBlockerList(object $subject, string $transitionName, string $name = null): TransitionBlockerList - { - $workflow = $this->workflowRegistry->get($subject, $name); - - return $workflow->buildTransitionBlockerList($subject, $transitionName); - } -} diff --git a/lib/symfony/twig-bridge/Extension/YamlExtension.php b/lib/symfony/twig-bridge/Extension/YamlExtension.php deleted file mode 100644 index 63df13360..000000000 --- a/lib/symfony/twig-bridge/Extension/YamlExtension.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Yaml\Dumper as YamlDumper; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; - -/** - * Provides integration of the Yaml component with Twig. - * - * @author Fabien Potencier - */ -final class YamlExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('yaml_encode', [$this, 'encode']), - new TwigFilter('yaml_dump', [$this, 'dump']), - ]; - } - - public function encode($input, int $inline = 0, int $dumpObjects = 0): string - { - static $dumper; - - if (null === $dumper) { - $dumper = new YamlDumper(); - } - - if (\defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) { - return $dumper->dump($input, $inline, 0, $dumpObjects); - } - - return $dumper->dump($input, $inline, 0, false, $dumpObjects); - } - - public function dump($value, int $inline = 0, int $dumpObjects = 0): string - { - if (\is_resource($value)) { - return '%Resource%'; - } - - if (\is_array($value) || \is_object($value)) { - return '%'.\gettype($value).'% '.$this->encode($value, $inline, $dumpObjects); - } - - return $this->encode($value, $inline, $dumpObjects); - } -} diff --git a/lib/symfony/twig-bridge/Form/TwigRendererEngine.php b/lib/symfony/twig-bridge/Form/TwigRendererEngine.php deleted file mode 100644 index b17da3409..000000000 --- a/lib/symfony/twig-bridge/Form/TwigRendererEngine.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Form; - -use Symfony\Component\Form\AbstractRendererEngine; -use Symfony\Component\Form\FormView; -use Twig\Environment; -use Twig\Template; - -/** - * @author Bernhard Schussek - */ -class TwigRendererEngine extends AbstractRendererEngine -{ - /** - * @var Environment - */ - private $environment; - - /** - * @var Template - */ - private $template; - - public function __construct(array $defaultThemes, Environment $environment) - { - parent::__construct($defaultThemes); - $this->environment = $environment; - } - - /** - * {@inheritdoc} - */ - public function renderBlock(FormView $view, $resource, string $blockName, array $variables = []) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - - $context = $this->environment->mergeGlobals($variables); - - ob_start(); - - // By contract,This method can only be called after getting the resource - // (which is passed to the method). Getting a resource for the first time - // (with an empty cache) is guaranteed to invoke loadResourcesFromTheme(), - // where the property $template is initialized. - - // We do not call renderBlock here to avoid too many nested level calls - // (XDebug limits the level to 100 by default) - $this->template->displayBlock($blockName, $context, $this->resources[$cacheKey]); - - return ob_get_clean(); - } - - /** - * Loads the cache with the resource for a given block name. - * - * This implementation eagerly loads all blocks of the themes assigned to the given view - * and all of its ancestors views. This is necessary, because Twig receives the - * list of blocks later. At that point, all blocks must already be loaded, for the - * case that the function "block()" is used in the Twig template. - * - * @see getResourceForBlock() - * - * @return bool - */ - protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName) - { - // The caller guarantees that $this->resources[$cacheKey][$block] is - // not set, but it doesn't have to check whether $this->resources[$cacheKey] - // is set. If $this->resources[$cacheKey] is set, all themes for this - // $cacheKey are already loaded (due to the eager population, see doc comment). - if (isset($this->resources[$cacheKey])) { - // As said in the previous, the caller guarantees that - // $this->resources[$cacheKey][$block] is not set. Since the themes are - // already loaded, it can only be a non-existing block. - $this->resources[$cacheKey][$blockName] = false; - - return false; - } - - // Recursively try to find the block in the themes assigned to $view, - // then of its parent view, then of the parent view of the parent and so on. - // When the root view is reached in this recursion, also the default - // themes are taken into account. - - // Check each theme whether it contains the searched block - if (isset($this->themes[$cacheKey])) { - for ($i = \count($this->themes[$cacheKey]) - 1; $i >= 0; --$i) { - $this->loadResourcesFromTheme($cacheKey, $this->themes[$cacheKey][$i]); - // CONTINUE LOADING (see doc comment) - } - } - - // Check the default themes once we reach the root view without success - if (!$view->parent) { - if (!isset($this->useDefaultThemes[$cacheKey]) || $this->useDefaultThemes[$cacheKey]) { - for ($i = \count($this->defaultThemes) - 1; $i >= 0; --$i) { - $this->loadResourcesFromTheme($cacheKey, $this->defaultThemes[$i]); - // CONTINUE LOADING (see doc comment) - } - } - } - - // Proceed with the themes of the parent view - if ($view->parent) { - $parentCacheKey = $view->parent->vars[self::CACHE_KEY_VAR]; - - if (!isset($this->resources[$parentCacheKey])) { - $this->loadResourceForBlockName($parentCacheKey, $view->parent, $blockName); - } - - // EAGER CACHE POPULATION (see doc comment) - foreach ($this->resources[$parentCacheKey] as $nestedBlockName => $resource) { - if (!isset($this->resources[$cacheKey][$nestedBlockName])) { - $this->resources[$cacheKey][$nestedBlockName] = $resource; - } - } - } - - // Even though we loaded the themes, it can happen that none of them - // contains the searched block - if (!isset($this->resources[$cacheKey][$blockName])) { - // Cache that we didn't find anything to speed up further accesses - $this->resources[$cacheKey][$blockName] = false; - } - - return false !== $this->resources[$cacheKey][$blockName]; - } - - /** - * Loads the resources for all blocks in a theme. - * - * @param mixed $theme The theme to load the block from. This parameter - * is passed by reference, because it might be necessary - * to initialize the theme first. Any changes made to - * this variable will be kept and be available upon - * further calls to this method using the same theme. - */ - protected function loadResourcesFromTheme(string $cacheKey, &$theme) - { - if (!$theme instanceof Template) { - /* @var Template $theme */ - $theme = $this->environment->load($theme)->unwrap(); - } - - if (null === $this->template) { - // Store the first Template instance that we find so that - // we can call displayBlock() later on. It doesn't matter *which* - // template we use for that, since we pass the used blocks manually - // anyway. - $this->template = $theme; - } - - // Use a separate variable for the inheritance traversal, because - // theme is a reference and we don't want to change it. - $currentTheme = $theme; - - $context = $this->environment->mergeGlobals([]); - - // The do loop takes care of template inheritance. - // Add blocks from all templates in the inheritance tree, but avoid - // overriding blocks already set. - do { - foreach ($currentTheme->getBlocks() as $block => $blockData) { - if (!isset($this->resources[$cacheKey][$block])) { - // The resource given back is the key to the bucket that - // contains this block. - $this->resources[$cacheKey][$block] = $blockData; - } - } - } while (false !== $currentTheme = $currentTheme->getParent($context)); - } -} diff --git a/lib/symfony/twig-bridge/LICENSE b/lib/symfony/twig-bridge/LICENSE deleted file mode 100644 index 88bf75bb4..000000000 --- a/lib/symfony/twig-bridge/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/twig-bridge/Mime/BodyRenderer.php b/lib/symfony/twig-bridge/Mime/BodyRenderer.php deleted file mode 100644 index 47901d310..000000000 --- a/lib/symfony/twig-bridge/Mime/BodyRenderer.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use League\HTMLToMarkdown\HtmlConverter; -use Symfony\Component\Mime\BodyRendererInterface; -use Symfony\Component\Mime\Exception\InvalidArgumentException; -use Symfony\Component\Mime\Message; -use Twig\Environment; - -/** - * @author Fabien Potencier - */ -final class BodyRenderer implements BodyRendererInterface -{ - private $twig; - private $context; - private $converter; - - public function __construct(Environment $twig, array $context = []) - { - $this->twig = $twig; - $this->context = $context; - if (class_exists(HtmlConverter::class)) { - $this->converter = new HtmlConverter([ - 'hard_break' => true, - 'strip_tags' => true, - 'remove_nodes' => 'head style', - ]); - } - } - - public function render(Message $message): void - { - if (!$message instanceof TemplatedEmail) { - return; - } - - $messageContext = $message->getContext(); - - $previousRenderingKey = $messageContext[__CLASS__] ?? null; - unset($messageContext[__CLASS__]); - $currentRenderingKey = $this->getFingerPrint($message); - if ($previousRenderingKey === $currentRenderingKey) { - return; - } - - if (isset($messageContext['email'])) { - throw new InvalidArgumentException(sprintf('A "%s" context cannot have an "email" entry as this is a reserved variable.', get_debug_type($message))); - } - - $vars = array_merge($this->context, $messageContext, [ - 'email' => new WrappedTemplatedEmail($this->twig, $message), - ]); - - if ($template = $message->getTextTemplate()) { - $message->text($this->twig->render($template, $vars)); - } - - if ($template = $message->getHtmlTemplate()) { - $message->html($this->twig->render($template, $vars)); - } - - // if text body is empty, compute one from the HTML body - if (!$message->getTextBody() && null !== $html = $message->getHtmlBody()) { - $message->text($this->convertHtmlToText(\is_resource($html) ? stream_get_contents($html) : $html)); - } - $message->context($message->getContext() + [__CLASS__ => $currentRenderingKey]); - } - - private function getFingerPrint(TemplatedEmail $message): string - { - $messageContext = $message->getContext(); - unset($messageContext[__CLASS__]); - - $payload = [$messageContext, $message->getTextTemplate(), $message->getHtmlTemplate()]; - try { - $serialized = serialize($payload); - } catch (\Exception $e) { - // Serialization of 'Closure' is not allowed - // Happens when context contain a closure, in that case, we assume that context always change. - $serialized = random_bytes(8); - } - - return md5($serialized); - } - - private function convertHtmlToText(string $html): string - { - if (null !== $this->converter) { - return $this->converter->convert($html); - } - - return strip_tags(preg_replace('{<(head|style)\b.*?}is', '', $html)); - } -} diff --git a/lib/symfony/twig-bridge/Mime/NotificationEmail.php b/lib/symfony/twig-bridge/Mime/NotificationEmail.php deleted file mode 100644 index 3bdcd71dd..000000000 --- a/lib/symfony/twig-bridge/Mime/NotificationEmail.php +++ /dev/null @@ -1,250 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\Mime\Header\Headers; -use Symfony\Component\Mime\Part\AbstractPart; -use Twig\Extra\CssInliner\CssInlinerExtension; -use Twig\Extra\Inky\InkyExtension; -use Twig\Extra\Markdown\MarkdownExtension; - -/** - * @author Fabien Potencier - */ -class NotificationEmail extends TemplatedEmail -{ - public const IMPORTANCE_URGENT = 'urgent'; - public const IMPORTANCE_HIGH = 'high'; - public const IMPORTANCE_MEDIUM = 'medium'; - public const IMPORTANCE_LOW = 'low'; - - private $theme = 'default'; - private $context = [ - 'importance' => self::IMPORTANCE_LOW, - 'content' => '', - 'exception' => false, - 'action_text' => null, - 'action_url' => null, - 'markdown' => false, - 'raw' => false, - 'footer_text' => 'Notification e-mail sent by Symfony', - ]; - - public function __construct(Headers $headers = null, AbstractPart $body = null) - { - $missingPackages = []; - if (!class_exists(CssInlinerExtension::class)) { - $missingPackages['twig/cssinliner-extra'] = 'CSS Inliner'; - } - - if (!class_exists(InkyExtension::class)) { - $missingPackages['twig/inky-extra'] = 'Inky'; - } - - if ($missingPackages) { - throw new \LogicException(sprintf('You cannot use "%s" if the "%s" Twig extension%s not available; try running "%s".', static::class, implode('" and "', $missingPackages), \count($missingPackages) > 1 ? 's are' : ' is', 'composer require '.implode(' ', array_keys($missingPackages)))); - } - - parent::__construct($headers, $body); - } - - /** - * Creates a NotificationEmail instance that is appropriate to send to normal (non-admin) users. - */ - public static function asPublicEmail(Headers $headers = null, AbstractPart $body = null): self - { - $email = new static($headers, $body); - $email->markAsPublic(); - - return $email; - } - - /** - * @return $this - */ - public function markAsPublic(): self - { - $this->context['importance'] = null; - $this->context['footer_text'] = null; - - return $this; - } - - /** - * @return $this - */ - public function markdown(string $content) - { - if (!class_exists(MarkdownExtension::class)) { - throw new \LogicException(sprintf('You cannot use "%s" if the Markdown Twig extension is not available; try running "composer require twig/markdown-extra".', __METHOD__)); - } - - $this->context['markdown'] = true; - - return $this->content($content); - } - - /** - * @return $this - */ - public function content(string $content, bool $raw = false) - { - $this->context['content'] = $content; - $this->context['raw'] = $raw; - - return $this; - } - - /** - * @return $this - */ - public function action(string $text, string $url) - { - $this->context['action_text'] = $text; - $this->context['action_url'] = $url; - - return $this; - } - - /** - * @return $this - */ - public function importance(string $importance) - { - $this->context['importance'] = $importance; - - return $this; - } - - /** - * @param \Throwable|FlattenException $exception - * - * @return $this - */ - public function exception($exception) - { - if (!$exception instanceof \Throwable && !$exception instanceof FlattenException) { - throw new \LogicException(sprintf('"%s" accepts "%s" or "%s" instances.', __METHOD__, \Throwable::class, FlattenException::class)); - } - - $exceptionAsString = $this->getExceptionAsString($exception); - - $this->context['exception'] = true; - $this->attach($exceptionAsString, 'exception.txt', 'text/plain'); - $this->importance(self::IMPORTANCE_URGENT); - - if (!$this->getSubject()) { - $this->subject($exception->getMessage()); - } - - return $this; - } - - /** - * @return $this - */ - public function theme(string $theme) - { - $this->theme = $theme; - - return $this; - } - - public function getTextTemplate(): ?string - { - if ($template = parent::getTextTemplate()) { - return $template; - } - - return '@email/'.$this->theme.'/notification/body.txt.twig'; - } - - public function getHtmlTemplate(): ?string - { - if ($template = parent::getHtmlTemplate()) { - return $template; - } - - return '@email/'.$this->theme.'/notification/body.html.twig'; - } - - public function getContext(): array - { - return array_merge($this->context, parent::getContext()); - } - - public function getPreparedHeaders(): Headers - { - $headers = parent::getPreparedHeaders(); - - $importance = $this->context['importance'] ?? self::IMPORTANCE_LOW; - $this->priority($this->determinePriority($importance)); - if ($this->context['importance']) { - $headers->setHeaderBody('Text', 'Subject', sprintf('[%s] %s', strtoupper($importance), $this->getSubject())); - } - - return $headers; - } - - private function determinePriority(string $importance): int - { - switch ($importance) { - case self::IMPORTANCE_URGENT: - return self::PRIORITY_HIGHEST; - case self::IMPORTANCE_HIGH: - return self::PRIORITY_HIGH; - case self::IMPORTANCE_MEDIUM: - return self::PRIORITY_NORMAL; - case self::IMPORTANCE_LOW: - default: - return self::PRIORITY_LOW; - } - } - - private function getExceptionAsString($exception): string - { - if (class_exists(FlattenException::class)) { - $exception = $exception instanceof FlattenException ? $exception : FlattenException::createFromThrowable($exception); - - return $exception->getAsString(); - } - - $message = \get_class($exception); - if ('' !== $exception->getMessage()) { - $message .= ': '.$exception->getMessage(); - } - - $message .= ' in '.$exception->getFile().':'.$exception->getLine()."\n"; - $message .= "Stack trace:\n".$exception->getTraceAsString()."\n\n"; - - return rtrim($message); - } - - /** - * @internal - */ - public function __serialize(): array - { - return [$this->context, parent::__serialize()]; - } - - /** - * @internal - */ - public function __unserialize(array $data): void - { - [$this->context, $parentData] = $data; - - parent::__unserialize($parentData); - } -} diff --git a/lib/symfony/twig-bridge/Mime/TemplatedEmail.php b/lib/symfony/twig-bridge/Mime/TemplatedEmail.php deleted file mode 100644 index 6dd9202de..000000000 --- a/lib/symfony/twig-bridge/Mime/TemplatedEmail.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use Symfony\Component\Mime\Email; - -/** - * @author Fabien Potencier - */ -class TemplatedEmail extends Email -{ - private $htmlTemplate; - private $textTemplate; - private $context = []; - - /** - * @return $this - */ - public function textTemplate(?string $template) - { - $this->textTemplate = $template; - - return $this; - } - - /** - * @return $this - */ - public function htmlTemplate(?string $template) - { - $this->htmlTemplate = $template; - - return $this; - } - - public function getTextTemplate(): ?string - { - return $this->textTemplate; - } - - public function getHtmlTemplate(): ?string - { - return $this->htmlTemplate; - } - - /** - * @return $this - */ - public function context(array $context) - { - $this->context = $context; - - return $this; - } - - public function getContext(): array - { - return $this->context; - } - - /** - * @internal - */ - public function __serialize(): array - { - return [$this->htmlTemplate, $this->textTemplate, $this->context, parent::__serialize()]; - } - - /** - * @internal - */ - public function __unserialize(array $data): void - { - [$this->htmlTemplate, $this->textTemplate, $this->context, $parentData] = $data; - - parent::__unserialize($parentData); - } -} diff --git a/lib/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php b/lib/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php deleted file mode 100644 index f1726914b..000000000 --- a/lib/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php +++ /dev/null @@ -1,194 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use Symfony\Component\Mime\Address; -use Twig\Environment; - -/** - * @internal - * - * @author Fabien Potencier - */ -final class WrappedTemplatedEmail -{ - private $twig; - private $message; - - public function __construct(Environment $twig, TemplatedEmail $message) - { - $this->twig = $twig; - $this->message = $message; - } - - public function toName(): string - { - return $this->message->getTo()[0]->getName(); - } - - public function image(string $image, string $contentType = null): string - { - $file = $this->twig->getLoader()->getSourceContext($image); - if ($path = $file->getPath()) { - $this->message->embedFromPath($path, $image, $contentType); - } else { - $this->message->embed($file->getCode(), $image, $contentType); - } - - return 'cid:'.$image; - } - - public function attach(string $file, string $name = null, string $contentType = null): void - { - $file = $this->twig->getLoader()->getSourceContext($file); - if ($path = $file->getPath()) { - $this->message->attachFromPath($path, $name, $contentType); - } else { - $this->message->attach($file->getCode(), $name, $contentType); - } - } - - /** - * @return $this - */ - public function setSubject(string $subject): self - { - $this->message->subject($subject); - - return $this; - } - - public function getSubject(): ?string - { - return $this->message->getSubject(); - } - - /** - * @return $this - */ - public function setReturnPath(string $address): self - { - $this->message->returnPath($address); - - return $this; - } - - public function getReturnPath(): string - { - return $this->message->getReturnPath(); - } - - /** - * @return $this - */ - public function addFrom(string $address, string $name = ''): self - { - $this->message->addFrom(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getFrom(): array - { - return $this->message->getFrom(); - } - - /** - * @return $this - */ - public function addReplyTo(string $address): self - { - $this->message->addReplyTo($address); - - return $this; - } - - /** - * @return Address[] - */ - public function getReplyTo(): array - { - return $this->message->getReplyTo(); - } - - /** - * @return $this - */ - public function addTo(string $address, string $name = ''): self - { - $this->message->addTo(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getTo(): array - { - return $this->message->getTo(); - } - - /** - * @return $this - */ - public function addCc(string $address, string $name = ''): self - { - $this->message->addCc(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getCc(): array - { - return $this->message->getCc(); - } - - /** - * @return $this - */ - public function addBcc(string $address, string $name = ''): self - { - $this->message->addBcc(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getBcc(): array - { - return $this->message->getBcc(); - } - - /** - * @return $this - */ - public function setPriority(int $priority): self - { - $this->message->priority($priority); - - return $this; - } - - public function getPriority(): int - { - return $this->message->getPriority(); - } -} diff --git a/lib/symfony/twig-bridge/Node/DumpNode.php b/lib/symfony/twig-bridge/Node/DumpNode.php deleted file mode 100644 index 68c00556f..000000000 --- a/lib/symfony/twig-bridge/Node/DumpNode.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Node; - -/** - * @author Julien Galenski - */ -final class DumpNode extends Node -{ - private $varPrefix; - - public function __construct(string $varPrefix, ?Node $values, int $lineno, string $tag = null) - { - $nodes = []; - if (null !== $values) { - $nodes['values'] = $values; - } - - parent::__construct($nodes, [], $lineno, $tag); - $this->varPrefix = $varPrefix; - } - - public function compile(Compiler $compiler): void - { - $compiler - ->write("if (\$this->env->isDebug()) {\n") - ->indent(); - - if (!$this->hasNode('values')) { - // remove embedded templates (macros) from the context - $compiler - ->write(sprintf('$%svars = [];'."\n", $this->varPrefix)) - ->write(sprintf('foreach ($context as $%1$skey => $%1$sval) {'."\n", $this->varPrefix)) - ->indent() - ->write(sprintf('if (!$%sval instanceof \Twig\Template) {'."\n", $this->varPrefix)) - ->indent() - ->write(sprintf('$%1$svars[$%1$skey] = $%1$sval;'."\n", $this->varPrefix)) - ->outdent() - ->write("}\n") - ->outdent() - ->write("}\n") - ->addDebugInfo($this) - ->write(sprintf('\Symfony\Component\VarDumper\VarDumper::dump($%svars);'."\n", $this->varPrefix)); - } elseif (($values = $this->getNode('values')) && 1 === $values->count()) { - $compiler - ->addDebugInfo($this) - ->write('\Symfony\Component\VarDumper\VarDumper::dump(') - ->subcompile($values->getNode(0)) - ->raw(");\n"); - } else { - $compiler - ->addDebugInfo($this) - ->write('\Symfony\Component\VarDumper\VarDumper::dump(['."\n") - ->indent(); - foreach ($values as $node) { - $compiler->write(''); - if ($node->hasAttribute('name')) { - $compiler - ->string($node->getAttribute('name')) - ->raw(' => '); - } - $compiler - ->subcompile($node) - ->raw(",\n"); - } - $compiler - ->outdent() - ->write("]);\n"); - } - - $compiler - ->outdent() - ->write("}\n"); - } -} diff --git a/lib/symfony/twig-bridge/Node/FormThemeNode.php b/lib/symfony/twig-bridge/Node/FormThemeNode.php deleted file mode 100644 index e37311267..000000000 --- a/lib/symfony/twig-bridge/Node/FormThemeNode.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Symfony\Component\Form\FormRenderer; -use Twig\Compiler; -use Twig\Node\Node; - -/** - * @author Fabien Potencier - */ -final class FormThemeNode extends Node -{ - public function __construct(Node $form, Node $resources, int $lineno, string $tag = null, bool $only = false) - { - parent::__construct(['form' => $form, 'resources' => $resources], ['only' => $only], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('$this->env->getRuntime(') - ->string(FormRenderer::class) - ->raw(')->setTheme(') - ->subcompile($this->getNode('form')) - ->raw(', ') - ->subcompile($this->getNode('resources')) - ->raw(', ') - ->raw(false === $this->getAttribute('only') ? 'true' : 'false') - ->raw(");\n"); - } -} diff --git a/lib/symfony/twig-bridge/Node/RenderBlockNode.php b/lib/symfony/twig-bridge/Node/RenderBlockNode.php deleted file mode 100644 index 4d4cf6136..000000000 --- a/lib/symfony/twig-bridge/Node/RenderBlockNode.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\FunctionExpression; - -/** - * Compiles a call to {@link \Symfony\Component\Form\FormRendererInterface::renderBlock()}. - * - * The function name is used as block name. For example, if the function name - * is "foo", the block "foo" will be rendered. - * - * @author Bernhard Schussek - */ -final class RenderBlockNode extends FunctionExpression -{ - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - $arguments = iterator_to_array($this->getNode('arguments')); - $compiler->write('$this->env->getRuntime(\'Symfony\Component\Form\FormRenderer\')->renderBlock('); - - if (isset($arguments[0])) { - $compiler->subcompile($arguments[0]); - $compiler->raw(', \''.$this->getAttribute('name').'\''); - - if (isset($arguments[1])) { - $compiler->raw(', '); - $compiler->subcompile($arguments[1]); - } - } - - $compiler->raw(')'); - } -} diff --git a/lib/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php b/lib/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php deleted file mode 100644 index 9967639d1..000000000 --- a/lib/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\FunctionExpression; - -/** - * @author Bernhard Schussek - */ -final class SearchAndRenderBlockNode extends FunctionExpression -{ - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - $compiler->raw('$this->env->getRuntime(\'Symfony\Component\Form\FormRenderer\')->searchAndRenderBlock('); - - preg_match('/_([^_]+)$/', $this->getAttribute('name'), $matches); - - $arguments = iterator_to_array($this->getNode('arguments')); - $blockNameSuffix = $matches[1]; - - if (isset($arguments[0])) { - $compiler->subcompile($arguments[0]); - $compiler->raw(', \''.$blockNameSuffix.'\''); - - if (isset($arguments[1])) { - if ('label' === $blockNameSuffix) { - // The "label" function expects the label in the second and - // the variables in the third argument - $label = $arguments[1]; - $variables = $arguments[2] ?? null; - $lineno = $label->getTemplateLine(); - - if ($label instanceof ConstantExpression) { - // If the label argument is given as a constant, we can either - // strip it away if it is empty, or integrate it into the array - // of variables at compile time. - $labelIsExpression = false; - - // Only insert the label into the array if it is not empty - if (!twig_test_empty($label->getAttribute('value'))) { - $originalVariables = $variables; - $variables = new ArrayExpression([], $lineno); - $labelKey = new ConstantExpression('label', $lineno); - - if (null !== $originalVariables) { - foreach ($originalVariables->getKeyValuePairs() as $pair) { - // Don't copy the original label attribute over if it exists - if ((string) $labelKey !== (string) $pair['key']) { - $variables->addElement($pair['value'], $pair['key']); - } - } - } - - // Insert the label argument into the array - $variables->addElement($label, $labelKey); - } - } else { - // The label argument is not a constant, but some kind of - // expression. This expression needs to be evaluated at runtime. - // Depending on the result (whether it is null or not), the - // label in the arguments should take precedence over the label - // in the attributes or not. - $labelIsExpression = true; - } - } else { - // All other functions than "label" expect the variables - // in the second argument - $label = null; - $variables = $arguments[1]; - $labelIsExpression = false; - } - - if (null !== $variables || $labelIsExpression) { - $compiler->raw(', '); - - if (null !== $variables) { - $compiler->subcompile($variables); - } - - if ($labelIsExpression) { - if (null !== $variables) { - $compiler->raw(' + '); - } - - // Check at runtime whether the label is empty. - // If not, add it to the array at runtime. - $compiler->raw('(twig_test_empty($_label_ = '); - $compiler->subcompile($label); - $compiler->raw(') ? [] : ["label" => $_label_])'); - } - } - } - } - - $compiler->raw(')'); - } -} diff --git a/lib/symfony/twig-bridge/Node/StopwatchNode.php b/lib/symfony/twig-bridge/Node/StopwatchNode.php deleted file mode 100644 index cfa4d8a19..000000000 --- a/lib/symfony/twig-bridge/Node/StopwatchNode.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\AssignNameExpression; -use Twig\Node\Node; - -/** - * Represents a stopwatch node. - * - * @author Wouter J - */ -final class StopwatchNode extends Node -{ - public function __construct(Node $name, Node $body, AssignNameExpression $var, int $lineno = 0, string $tag = null) - { - parent::__construct(['body' => $body, 'name' => $name, 'var' => $var], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('') - ->subcompile($this->getNode('var')) - ->raw(' = ') - ->subcompile($this->getNode('name')) - ->write(";\n") - ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->start(") - ->subcompile($this->getNode('var')) - ->raw(", 'template');\n") - ->subcompile($this->getNode('body')) - ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->stop(") - ->subcompile($this->getNode('var')) - ->raw(");\n") - ; - } -} diff --git a/lib/symfony/twig-bridge/Node/TransDefaultDomainNode.php b/lib/symfony/twig-bridge/Node/TransDefaultDomainNode.php deleted file mode 100644 index df29f0a19..000000000 --- a/lib/symfony/twig-bridge/Node/TransDefaultDomainNode.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\AbstractExpression; -use Twig\Node\Node; - -/** - * @author Fabien Potencier - */ -final class TransDefaultDomainNode extends Node -{ - public function __construct(AbstractExpression $expr, int $lineno = 0, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - // noop as this node is just a marker for TranslationDefaultDomainNodeVisitor - } -} diff --git a/lib/symfony/twig-bridge/Node/TransNode.php b/lib/symfony/twig-bridge/Node/TransNode.php deleted file mode 100644 index 8a126ba56..000000000 --- a/lib/symfony/twig-bridge/Node/TransNode.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\AbstractExpression; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\NameExpression; -use Twig\Node\Node; -use Twig\Node\TextNode; - -/** - * @author Fabien Potencier - */ -final class TransNode extends Node -{ - public function __construct(Node $body, Node $domain = null, AbstractExpression $count = null, AbstractExpression $vars = null, AbstractExpression $locale = null, int $lineno = 0, string $tag = null) - { - $nodes = ['body' => $body]; - if (null !== $domain) { - $nodes['domain'] = $domain; - } - if (null !== $count) { - $nodes['count'] = $count; - } - if (null !== $vars) { - $nodes['vars'] = $vars; - } - if (null !== $locale) { - $nodes['locale'] = $locale; - } - - parent::__construct($nodes, [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - $defaults = new ArrayExpression([], -1); - if ($this->hasNode('vars') && ($vars = $this->getNode('vars')) instanceof ArrayExpression) { - $defaults = $this->getNode('vars'); - $vars = null; - } - [$msg, $defaults] = $this->compileString($this->getNode('body'), $defaults, (bool) $vars); - - $compiler - ->write('echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans(') - ->subcompile($msg) - ; - - $compiler->raw(', '); - - if (null !== $vars) { - $compiler - ->raw('array_merge(') - ->subcompile($defaults) - ->raw(', ') - ->subcompile($this->getNode('vars')) - ->raw(')') - ; - } else { - $compiler->subcompile($defaults); - } - - $compiler->raw(', '); - - if (!$this->hasNode('domain')) { - $compiler->repr('messages'); - } else { - $compiler->subcompile($this->getNode('domain')); - } - - if ($this->hasNode('locale')) { - $compiler - ->raw(', ') - ->subcompile($this->getNode('locale')) - ; - } elseif ($this->hasNode('count')) { - $compiler->raw(', null'); - } - - if ($this->hasNode('count')) { - $compiler - ->raw(', ') - ->subcompile($this->getNode('count')) - ; - } - - $compiler->raw(");\n"); - } - - private function compileString(Node $body, ArrayExpression $vars, bool $ignoreStrictCheck = false): array - { - if ($body instanceof ConstantExpression) { - $msg = $body->getAttribute('value'); - } elseif ($body instanceof TextNode) { - $msg = $body->getAttribute('data'); - } else { - return [$body, $vars]; - } - - preg_match_all('/(?getTemplateLine()); - if (!$vars->hasElement($key)) { - if ('count' === $var && $this->hasNode('count')) { - $vars->addElement($this->getNode('count'), $key); - } else { - $varExpr = new NameExpression($var, $body->getTemplateLine()); - $varExpr->setAttribute('ignore_strict_check', $ignoreStrictCheck); - $vars->addElement($varExpr, $key); - } - } - } - - return [new ConstantExpression(str_replace('%%', '%', trim($msg)), $body->getTemplateLine()), $vars]; - } -} diff --git a/lib/symfony/twig-bridge/NodeVisitor/Scope.php b/lib/symfony/twig-bridge/NodeVisitor/Scope.php deleted file mode 100644 index 765b4b69b..000000000 --- a/lib/symfony/twig-bridge/NodeVisitor/Scope.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\NodeVisitor; - -/** - * @author Jean-François Simon - */ -class Scope -{ - private $parent; - private $data = []; - private $left = false; - - public function __construct(self $parent = null) - { - $this->parent = $parent; - } - - /** - * Opens a new child scope. - * - * @return self - */ - public function enter() - { - return new self($this); - } - - /** - * Closes current scope and returns parent one. - * - * @return self|null - */ - public function leave() - { - $this->left = true; - - return $this->parent; - } - - /** - * Stores data into current scope. - * - * @return $this - * - * @throws \LogicException - */ - public function set(string $key, $value) - { - if ($this->left) { - throw new \LogicException('Left scope is not mutable.'); - } - - $this->data[$key] = $value; - - return $this; - } - - /** - * Tests if a data is visible from current scope. - * - * @return bool - */ - public function has(string $key) - { - if (\array_key_exists($key, $this->data)) { - return true; - } - - if (null === $this->parent) { - return false; - } - - return $this->parent->has($key); - } - - /** - * Returns data visible from current scope. - * - * @return mixed - */ - public function get(string $key, $default = null) - { - if (\array_key_exists($key, $this->data)) { - return $this->data[$key]; - } - - if (null === $this->parent) { - return $default; - } - - return $this->parent->get($key, $default); - } -} diff --git a/lib/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/lib/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php deleted file mode 100644 index 213365ed9..000000000 --- a/lib/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\NodeVisitor; - -use Symfony\Bridge\Twig\Node\TransDefaultDomainNode; -use Symfony\Bridge\Twig\Node\TransNode; -use Twig\Environment; -use Twig\Node\BlockNode; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\AssignNameExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\FilterExpression; -use Twig\Node\Expression\NameExpression; -use Twig\Node\ModuleNode; -use Twig\Node\Node; -use Twig\Node\SetNode; -use Twig\NodeVisitor\AbstractNodeVisitor; - -/** - * @author Fabien Potencier - */ -final class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor -{ - private $scope; - - public function __construct() - { - $this->scope = new Scope(); - } - - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node - { - if ($node instanceof BlockNode || $node instanceof ModuleNode) { - $this->scope = $this->scope->enter(); - } - - if ($node instanceof TransDefaultDomainNode) { - if ($node->getNode('expr') instanceof ConstantExpression) { - $this->scope->set('domain', $node->getNode('expr')); - - return $node; - } else { - $var = $this->getVarName(); - $name = new AssignNameExpression($var, $node->getTemplateLine()); - $this->scope->set('domain', new NameExpression($var, $node->getTemplateLine())); - - return new SetNode(false, new Node([$name]), new Node([$node->getNode('expr')]), $node->getTemplateLine()); - } - } - - if (!$this->scope->has('domain')) { - return $node; - } - - if ($node instanceof FilterExpression && 'trans' === $node->getNode('filter')->getAttribute('value')) { - $arguments = $node->getNode('arguments'); - if ($this->isNamedArguments($arguments)) { - if (!$arguments->hasNode('domain') && !$arguments->hasNode(1)) { - $arguments->setNode('domain', $this->scope->get('domain')); - } - } elseif (!$arguments->hasNode(1)) { - if (!$arguments->hasNode(0)) { - $arguments->setNode(0, new ArrayExpression([], $node->getTemplateLine())); - } - - $arguments->setNode(1, $this->scope->get('domain')); - } - } elseif ($node instanceof TransNode) { - if (!$node->hasNode('domain')) { - $node->setNode('domain', $this->scope->get('domain')); - } - } - - return $node; - } - - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof TransDefaultDomainNode) { - return null; - } - - if ($node instanceof BlockNode || $node instanceof ModuleNode) { - $this->scope = $this->scope->leave(); - } - - return $node; - } - - /** - * {@inheritdoc} - */ - public function getPriority(): int - { - return -10; - } - - private function isNamedArguments(Node $arguments): bool - { - foreach ($arguments as $name => $node) { - if (!\is_int($name)) { - return true; - } - } - - return false; - } - - private function getVarName(): string - { - return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); - } -} diff --git a/lib/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php b/lib/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php deleted file mode 100644 index d42245e2b..000000000 --- a/lib/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\NodeVisitor; - -use Symfony\Bridge\Twig\Node\TransNode; -use Twig\Environment; -use Twig\Node\Expression\Binary\ConcatBinary; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\FilterExpression; -use Twig\Node\Expression\FunctionExpression; -use Twig\Node\Node; -use Twig\NodeVisitor\AbstractNodeVisitor; - -/** - * TranslationNodeVisitor extracts translation messages. - * - * @author Fabien Potencier - */ -final class TranslationNodeVisitor extends AbstractNodeVisitor -{ - public const UNDEFINED_DOMAIN = '_undefined'; - - private $enabled = false; - private $messages = []; - - public function enable(): void - { - $this->enabled = true; - $this->messages = []; - } - - public function disable(): void - { - $this->enabled = false; - $this->messages = []; - } - - public function getMessages(): array - { - return $this->messages; - } - - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node - { - if (!$this->enabled) { - return $node; - } - - if ( - $node instanceof FilterExpression && - 'trans' === $node->getNode('filter')->getAttribute('value') && - $node->getNode('node') instanceof ConstantExpression - ) { - // extract constant nodes with a trans filter - $this->messages[] = [ - $node->getNode('node')->getAttribute('value'), - $this->getReadDomainFromArguments($node->getNode('arguments'), 1), - ]; - } elseif ( - $node instanceof FunctionExpression && - 't' === $node->getAttribute('name') - ) { - $nodeArguments = $node->getNode('arguments'); - - if ($nodeArguments->getIterator()->current() instanceof ConstantExpression) { - $this->messages[] = [ - $this->getReadMessageFromArguments($nodeArguments, 0), - $this->getReadDomainFromArguments($nodeArguments, 2), - ]; - } - } elseif ($node instanceof TransNode) { - // extract trans nodes - $this->messages[] = [ - $node->getNode('body')->getAttribute('data'), - $node->hasNode('domain') ? $this->getReadDomainFromNode($node->getNode('domain')) : null, - ]; - } elseif ( - $node instanceof FilterExpression && - 'trans' === $node->getNode('filter')->getAttribute('value') && - $node->getNode('node') instanceof ConcatBinary && - $message = $this->getConcatValueFromNode($node->getNode('node'), null) - ) { - $this->messages[] = [ - $message, - $this->getReadDomainFromArguments($node->getNode('arguments'), 1), - ]; - } - - return $node; - } - - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node - { - return $node; - } - - /** - * {@inheritdoc} - */ - public function getPriority(): int - { - return 0; - } - - private function getReadMessageFromArguments(Node $arguments, int $index): ?string - { - if ($arguments->hasNode('message')) { - $argument = $arguments->getNode('message'); - } elseif ($arguments->hasNode($index)) { - $argument = $arguments->getNode($index); - } else { - return null; - } - - return $this->getReadMessageFromNode($argument); - } - - private function getReadMessageFromNode(Node $node): ?string - { - if ($node instanceof ConstantExpression) { - return $node->getAttribute('value'); - } - - return null; - } - - private function getReadDomainFromArguments(Node $arguments, int $index): ?string - { - if ($arguments->hasNode('domain')) { - $argument = $arguments->getNode('domain'); - } elseif ($arguments->hasNode($index)) { - $argument = $arguments->getNode($index); - } else { - return null; - } - - return $this->getReadDomainFromNode($argument); - } - - private function getReadDomainFromNode(Node $node): ?string - { - if ($node instanceof ConstantExpression) { - return $node->getAttribute('value'); - } - - return self::UNDEFINED_DOMAIN; - } - - private function getConcatValueFromNode(Node $node, ?string $value): ?string - { - if ($node instanceof ConcatBinary) { - foreach ($node as $nextNode) { - if ($nextNode instanceof ConcatBinary) { - $nextValue = $this->getConcatValueFromNode($nextNode, $value); - if (null === $nextValue) { - return null; - } - $value .= $nextValue; - } elseif ($nextNode instanceof ConstantExpression) { - $value .= $nextNode->getAttribute('value'); - } else { - // this is a node we cannot process (variable, or translation in translation) - return null; - } - } - } elseif ($node instanceof ConstantExpression) { - $value .= $node->getAttribute('value'); - } - - return $value; - } -} diff --git a/lib/symfony/twig-bridge/README.md b/lib/symfony/twig-bridge/README.md deleted file mode 100644 index 533d573db..000000000 --- a/lib/symfony/twig-bridge/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Twig Bridge -=========== - -The Twig bridge provides integration for [Twig](https://twig.symfony.com/) with -various Symfony components. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/twig-bridge/Resources/views/Email/default/notification/body.html.twig b/lib/symfony/twig-bridge/Resources/views/Email/default/notification/body.html.twig deleted file mode 100644 index 902754686..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Email/default/notification/body.html.twig +++ /dev/null @@ -1 +0,0 @@ -{% extends "@email/zurb_2/notification/body.html.twig" %} diff --git a/lib/symfony/twig-bridge/Resources/views/Email/default/notification/body.txt.twig b/lib/symfony/twig-bridge/Resources/views/Email/default/notification/body.txt.twig deleted file mode 100644 index 37671b1f2..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Email/default/notification/body.txt.twig +++ /dev/null @@ -1 +0,0 @@ -{% extends "@email/zurb_2/notification/body.txt.twig" %} diff --git a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/main.css b/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/main.css deleted file mode 100644 index b826813ec..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/main.css +++ /dev/null @@ -1,1667 +0,0 @@ -/* - * Copyright (c) 2017 ZURB, inc. -- MIT License - * - * https://raw.githubusercontent.com/foundation/foundation-emails/v2.2.1/dist/foundation-emails.css - */ - -.wrapper { - width: 100%; -} - -#outlook a { - padding: 0; -} - -body { - width: 100% !important; - min-width: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - margin: 0; - Margin: 0; - padding: 0; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.ExternalClass { - width: 100%; -} - -.ExternalClass, -.ExternalClass p, -.ExternalClass span, -.ExternalClass font, -.ExternalClass td, -.ExternalClass div { - line-height: 100%; -} - -#backgroundTable { - margin: 0; - Margin: 0; - padding: 0; - width: 100% !important; - line-height: 100% !important; -} - -img { - outline: none; - text-decoration: none; - -ms-interpolation-mode: bicubic; - width: auto; - max-width: 100%; - clear: both; - display: block; -} - -center { - width: 100%; - min-width: 580px; -} - -a img { - border: none; -} - -p { - margin: 0 0 0 10px; - Margin: 0 0 0 10px; -} - -table { - border-spacing: 0; - border-collapse: collapse; -} - -td { - word-wrap: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - border-collapse: collapse !important; -} - -table, -tr, -td { - padding: 0; - vertical-align: top; - text-align: left; -} - -@media only screen { - html { - min-height: 100%; - background: #f3f3f3; - } -} - -table.body { - background: #f3f3f3; - height: 100%; - width: 100%; -} - -table.container { - background: #fefefe; - width: 580px; - margin: 0 auto; - Margin: 0 auto; - text-align: inherit; -} - -table.row { - padding: 0; - width: 100%; - position: relative; -} - -table.spacer { - width: 100%; -} - -table.spacer td { - mso-line-height-rule: exactly; -} - -table.container table.row { - display: table; -} - -td.columns, -td.column, -th.columns, -th.column { - margin: 0 auto; - Margin: 0 auto; - padding-left: 16px; - padding-bottom: 16px; -} - -td.columns .column, -td.columns .columns, -td.column .column, -td.column .columns, -th.columns .column, -th.columns .columns, -th.column .column, -th.column .columns { - padding-left: 0 !important; - padding-right: 0 !important; -} - -td.columns .column center, -td.columns .columns center, -td.column .column center, -td.column .columns center, -th.columns .column center, -th.columns .columns center, -th.column .column center, -th.column .columns center { - min-width: none !important; -} - -td.columns.last, -td.column.last, -th.columns.last, -th.column.last { - padding-right: 16px; -} - -td.columns table:not(.button), -td.column table:not(.button), -th.columns table:not(.button), -th.column table:not(.button) { - width: 100%; -} - -td.large-1, -th.large-1 { - width: 32.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-1.first, -th.large-1.first { - padding-left: 16px; -} - -td.large-1.last, -th.large-1.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-1, -.collapse>tbody>tr>th.large-1 { - padding-right: 0; - padding-left: 0; - width: 48.33333px; -} - -.collapse td.large-1.first, -.collapse th.large-1.first, -.collapse td.large-1.last, -.collapse th.large-1.last { - width: 56.33333px; -} - -td.large-1 center, -th.large-1 center { - min-width: 0.33333px; -} - -.body .columns td.large-1, -.body .column td.large-1, -.body .columns th.large-1, -.body .column th.large-1 { - width: 8.33333%; -} - -td.large-2, -th.large-2 { - width: 80.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-2.first, -th.large-2.first { - padding-left: 16px; -} - -td.large-2.last, -th.large-2.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-2, -.collapse>tbody>tr>th.large-2 { - padding-right: 0; - padding-left: 0; - width: 96.66667px; -} - -.collapse td.large-2.first, -.collapse th.large-2.first, -.collapse td.large-2.last, -.collapse th.large-2.last { - width: 104.66667px; -} - -td.large-2 center, -th.large-2 center { - min-width: 48.66667px; -} - -.body .columns td.large-2, -.body .column td.large-2, -.body .columns th.large-2, -.body .column th.large-2 { - width: 16.66667%; -} - -td.large-3, -th.large-3 { - width: 129px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-3.first, -th.large-3.first { - padding-left: 16px; -} - -td.large-3.last, -th.large-3.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-3, -.collapse>tbody>tr>th.large-3 { - padding-right: 0; - padding-left: 0; - width: 145px; -} - -.collapse td.large-3.first, -.collapse th.large-3.first, -.collapse td.large-3.last, -.collapse th.large-3.last { - width: 153px; -} - -td.large-3 center, -th.large-3 center { - min-width: 97px; -} - -.body .columns td.large-3, -.body .column td.large-3, -.body .columns th.large-3, -.body .column th.large-3 { - width: 25%; -} - -td.large-4, -th.large-4 { - width: 177.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-4.first, -th.large-4.first { - padding-left: 16px; -} - -td.large-4.last, -th.large-4.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-4, -.collapse>tbody>tr>th.large-4 { - padding-right: 0; - padding-left: 0; - width: 193.33333px; -} - -.collapse td.large-4.first, -.collapse th.large-4.first, -.collapse td.large-4.last, -.collapse th.large-4.last { - width: 201.33333px; -} - -td.large-4 center, -th.large-4 center { - min-width: 145.33333px; -} - -.body .columns td.large-4, -.body .column td.large-4, -.body .columns th.large-4, -.body .column th.large-4 { - width: 33.33333%; -} - -td.large-5, -th.large-5 { - width: 225.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-5.first, -th.large-5.first { - padding-left: 16px; -} - -td.large-5.last, -th.large-5.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-5, -.collapse>tbody>tr>th.large-5 { - padding-right: 0; - padding-left: 0; - width: 241.66667px; -} - -.collapse td.large-5.first, -.collapse th.large-5.first, -.collapse td.large-5.last, -.collapse th.large-5.last { - width: 249.66667px; -} - -td.large-5 center, -th.large-5 center { - min-width: 193.66667px; -} - -.body .columns td.large-5, -.body .column td.large-5, -.body .columns th.large-5, -.body .column th.large-5 { - width: 41.66667%; -} - -td.large-6, -th.large-6 { - width: 274px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-6.first, -th.large-6.first { - padding-left: 16px; -} - -td.large-6.last, -th.large-6.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-6, -.collapse>tbody>tr>th.large-6 { - padding-right: 0; - padding-left: 0; - width: 290px; -} - -.collapse td.large-6.first, -.collapse th.large-6.first, -.collapse td.large-6.last, -.collapse th.large-6.last { - width: 298px; -} - -td.large-6 center, -th.large-6 center { - min-width: 242px; -} - -.body .columns td.large-6, -.body .column td.large-6, -.body .columns th.large-6, -.body .column th.large-6 { - width: 50%; -} - -td.large-7, -th.large-7 { - width: 322.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-7.first, -th.large-7.first { - padding-left: 16px; -} - -td.large-7.last, -th.large-7.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-7, -.collapse>tbody>tr>th.large-7 { - padding-right: 0; - padding-left: 0; - width: 338.33333px; -} - -.collapse td.large-7.first, -.collapse th.large-7.first, -.collapse td.large-7.last, -.collapse th.large-7.last { - width: 346.33333px; -} - -td.large-7 center, -th.large-7 center { - min-width: 290.33333px; -} - -.body .columns td.large-7, -.body .column td.large-7, -.body .columns th.large-7, -.body .column th.large-7 { - width: 58.33333%; -} - -td.large-8, -th.large-8 { - width: 370.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-8.first, -th.large-8.first { - padding-left: 16px; -} - -td.large-8.last, -th.large-8.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-8, -.collapse>tbody>tr>th.large-8 { - padding-right: 0; - padding-left: 0; - width: 386.66667px; -} - -.collapse td.large-8.first, -.collapse th.large-8.first, -.collapse td.large-8.last, -.collapse th.large-8.last { - width: 394.66667px; -} - -td.large-8 center, -th.large-8 center { - min-width: 338.66667px; -} - -.body .columns td.large-8, -.body .column td.large-8, -.body .columns th.large-8, -.body .column th.large-8 { - width: 66.66667%; -} - -td.large-9, -th.large-9 { - width: 419px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-9.first, -th.large-9.first { - padding-left: 16px; -} - -td.large-9.last, -th.large-9.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-9, -.collapse>tbody>tr>th.large-9 { - padding-right: 0; - padding-left: 0; - width: 435px; -} - -.collapse td.large-9.first, -.collapse th.large-9.first, -.collapse td.large-9.last, -.collapse th.large-9.last { - width: 443px; -} - -td.large-9 center, -th.large-9 center { - min-width: 387px; -} - -.body .columns td.large-9, -.body .column td.large-9, -.body .columns th.large-9, -.body .column th.large-9 { - width: 75%; -} - -td.large-10, -th.large-10 { - width: 467.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-10.first, -th.large-10.first { - padding-left: 16px; -} - -td.large-10.last, -th.large-10.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-10, -.collapse>tbody>tr>th.large-10 { - padding-right: 0; - padding-left: 0; - width: 483.33333px; -} - -.collapse td.large-10.first, -.collapse th.large-10.first, -.collapse td.large-10.last, -.collapse th.large-10.last { - width: 491.33333px; -} - -td.large-10 center, -th.large-10 center { - min-width: 435.33333px; -} - -.body .columns td.large-10, -.body .column td.large-10, -.body .columns th.large-10, -.body .column th.large-10 { - width: 83.33333%; -} - -td.large-11, -th.large-11 { - width: 515.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-11.first, -th.large-11.first { - padding-left: 16px; -} - -td.large-11.last, -th.large-11.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-11, -.collapse>tbody>tr>th.large-11 { - padding-right: 0; - padding-left: 0; - width: 531.66667px; -} - -.collapse td.large-11.first, -.collapse th.large-11.first, -.collapse td.large-11.last, -.collapse th.large-11.last { - width: 539.66667px; -} - -td.large-11 center, -th.large-11 center { - min-width: 483.66667px; -} - -.body .columns td.large-11, -.body .column td.large-11, -.body .columns th.large-11, -.body .column th.large-11 { - width: 91.66667%; -} - -td.large-12, -th.large-12 { - width: 564px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-12.first, -th.large-12.first { - padding-left: 16px; -} - -td.large-12.last, -th.large-12.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-12, -.collapse>tbody>tr>th.large-12 { - padding-right: 0; - padding-left: 0; - width: 580px; -} - -.collapse td.large-12.first, -.collapse th.large-12.first, -.collapse td.large-12.last, -.collapse th.large-12.last { - width: 588px; -} - -td.large-12 center, -th.large-12 center { - min-width: 532px; -} - -.body .columns td.large-12, -.body .column td.large-12, -.body .columns th.large-12, -.body .column th.large-12 { - width: 100%; -} - -td.large-offset-1, -td.large-offset-1.first, -td.large-offset-1.last, -th.large-offset-1, -th.large-offset-1.first, -th.large-offset-1.last { - padding-left: 64.33333px; -} - -td.large-offset-2, -td.large-offset-2.first, -td.large-offset-2.last, -th.large-offset-2, -th.large-offset-2.first, -th.large-offset-2.last { - padding-left: 112.66667px; -} - -td.large-offset-3, -td.large-offset-3.first, -td.large-offset-3.last, -th.large-offset-3, -th.large-offset-3.first, -th.large-offset-3.last { - padding-left: 161px; -} - -td.large-offset-4, -td.large-offset-4.first, -td.large-offset-4.last, -th.large-offset-4, -th.large-offset-4.first, -th.large-offset-4.last { - padding-left: 209.33333px; -} - -td.large-offset-5, -td.large-offset-5.first, -td.large-offset-5.last, -th.large-offset-5, -th.large-offset-5.first, -th.large-offset-5.last { - padding-left: 257.66667px; -} - -td.large-offset-6, -td.large-offset-6.first, -td.large-offset-6.last, -th.large-offset-6, -th.large-offset-6.first, -th.large-offset-6.last { - padding-left: 306px; -} - -td.large-offset-7, -td.large-offset-7.first, -td.large-offset-7.last, -th.large-offset-7, -th.large-offset-7.first, -th.large-offset-7.last { - padding-left: 354.33333px; -} - -td.large-offset-8, -td.large-offset-8.first, -td.large-offset-8.last, -th.large-offset-8, -th.large-offset-8.first, -th.large-offset-8.last { - padding-left: 402.66667px; -} - -td.large-offset-9, -td.large-offset-9.first, -td.large-offset-9.last, -th.large-offset-9, -th.large-offset-9.first, -th.large-offset-9.last { - padding-left: 451px; -} - -td.large-offset-10, -td.large-offset-10.first, -td.large-offset-10.last, -th.large-offset-10, -th.large-offset-10.first, -th.large-offset-10.last { - padding-left: 499.33333px; -} - -td.large-offset-11, -td.large-offset-11.first, -td.large-offset-11.last, -th.large-offset-11, -th.large-offset-11.first, -th.large-offset-11.last { - padding-left: 547.66667px; -} - -td.expander, -th.expander { - visibility: hidden; - width: 0; - padding: 0 !important; -} - -table.container.radius { - border-radius: 0; - border-collapse: separate; -} - -.block-grid { - width: 100%; - max-width: 580px; -} - -.block-grid td { - display: inline-block; - padding: 8px; -} - -.up-2 td { - width: 274px !important; -} - -.up-3 td { - width: 177px !important; -} - -.up-4 td { - width: 129px !important; -} - -.up-5 td { - width: 100px !important; -} - -.up-6 td { - width: 80px !important; -} - -.up-7 td { - width: 66px !important; -} - -.up-8 td { - width: 56px !important; -} - -table.text-center, -th.text-center, -td.text-center, -h1.text-center, -h2.text-center, -h3.text-center, -h4.text-center, -h5.text-center, -h6.text-center, -p.text-center, -span.text-center { - text-align: center; -} - -table.text-left, -th.text-left, -td.text-left, -h1.text-left, -h2.text-left, -h3.text-left, -h4.text-left, -h5.text-left, -h6.text-left, -p.text-left, -span.text-left { - text-align: left; -} - -table.text-right, -th.text-right, -td.text-right, -h1.text-right, -h2.text-right, -h3.text-right, -h4.text-right, -h5.text-right, -h6.text-right, -p.text-right, -span.text-right { - text-align: right; -} - -span.text-center { - display: block; - width: 100%; - text-align: center; -} - -@media only screen and (max-width: 596px) { - .small-float-center { - margin: 0 auto !important; - float: none !important; - text-align: center !important; - } - .small-text-center { - text-align: center !important; - } - .small-text-left { - text-align: left !important; - } - .small-text-right { - text-align: right !important; - } -} - -img.float-left { - float: left; - text-align: left; -} - -img.float-right { - float: right; - text-align: right; -} - -img.float-center, -img.text-center { - margin: 0 auto; - Margin: 0 auto; - float: none; - text-align: center; -} - -table.float-center, -td.float-center, -th.float-center { - margin: 0 auto; - Margin: 0 auto; - float: none; - text-align: center; -} - -.hide-for-large { - display: none !important; - mso-hide: all; - overflow: hidden; - max-height: 0; - font-size: 0; - width: 0; - line-height: 0; -} - -@media only screen and (max-width: 596px) { - .hide-for-large { - display: block !important; - width: auto !important; - overflow: visible !important; - max-height: none !important; - font-size: inherit !important; - line-height: inherit !important; - } -} - -table.body table.container .hide-for-large * { - mso-hide: all; -} - -@media only screen and (max-width: 596px) { - table.body table.container .hide-for-large, - table.body table.container .row.hide-for-large { - display: table !important; - width: 100% !important; - } -} - -@media only screen and (max-width: 596px) { - table.body table.container .callout-inner.hide-for-large { - display: table-cell !important; - width: 100% !important; - } -} - -@media only screen and (max-width: 596px) { - table.body table.container .show-for-large { - display: none !important; - width: 0; - mso-hide: all; - overflow: hidden; - } -} - -body, -table.body, -h1, -h2, -h3, -h4, -h5, -h6, -p, -td, -th, -a { - color: #0a0a0a; - font-family: Helvetica, Arial, sans-serif; - font-weight: normal; - padding: 0; - margin: 0; - Margin: 0; - text-align: left; - line-height: 1.3; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - color: inherit; - word-wrap: normal; - font-family: Helvetica, Arial, sans-serif; - font-weight: normal; - margin-bottom: 10px; - Margin-bottom: 10px; -} - -h1 { - font-size: 34px; -} - -h2 { - font-size: 30px; -} - -h3 { - font-size: 28px; -} - -h4 { - font-size: 24px; -} - -h5 { - font-size: 20px; -} - -h6 { - font-size: 18px; -} - -body, -table.body, -p, -td, -th { - font-size: 16px; - line-height: 1.3; -} - -p { - margin-bottom: 10px; - Margin-bottom: 10px; -} - -p.lead { - font-size: 20px; - line-height: 1.6; -} - -p.subheader { - margin-top: 4px; - margin-bottom: 8px; - Margin-top: 4px; - Margin-bottom: 8px; - font-weight: normal; - line-height: 1.4; - color: #8a8a8a; -} - -small { - font-size: 80%; - color: #cacaca; -} - -a { - color: #2199e8; - text-decoration: none; -} - -a:hover { - color: #147dc2; -} - -a:active { - color: #147dc2; -} - -a:visited { - color: #2199e8; -} - -h1 a, -h1 a:visited, -h2 a, -h2 a:visited, -h3 a, -h3 a:visited, -h4 a, -h4 a:visited, -h5 a, -h5 a:visited, -h6 a, -h6 a:visited { - color: #2199e8; -} - -pre { - background: #f3f3f3; - margin: 30px 0; - Margin: 30px 0; -} - -pre code { - color: #cacaca; -} - -pre code span.callout { - color: #8a8a8a; - font-weight: bold; -} - -pre code span.callout-strong { - color: #ff6908; - font-weight: bold; -} - -table.hr { - width: 100%; -} - -table.hr th { - height: 0; - max-width: 580px; - border-top: 0; - border-right: 0; - border-bottom: 1px solid #0a0a0a; - border-left: 0; - margin: 20px auto; - Margin: 20px auto; - clear: both; -} - -.stat { - font-size: 40px; - line-height: 1; -} - -p+.stat { - margin-top: -16px; - Margin-top: -16px; -} - -span.preheader { - display: none !important; - visibility: hidden; - mso-hide: all !important; - font-size: 1px; - color: #f3f3f3; - line-height: 1px; - max-height: 0px; - max-width: 0px; - opacity: 0; - overflow: hidden; -} - -table.button { - width: auto; - margin: 0 0 16px 0; - Margin: 0 0 16px 0; -} - -table.button table td { - text-align: left; - color: #fefefe; - background: #2199e8; - border: 2px solid #2199e8; -} - -table.button table td a { - font-family: Helvetica, Arial, sans-serif; - font-size: 16px; - font-weight: bold; - color: #fefefe; - text-decoration: none; - display: inline-block; - padding: 8px 16px 8px 16px; - border: 0 solid #2199e8; - border-radius: 3px; -} - -table.button.radius table td { - border-radius: 3px; - border: none; -} - -table.button.rounded table td { - border-radius: 500px; - border: none; -} - -table.button:hover table tr td a, -table.button:active table tr td a, -table.button table tr td a:visited, -table.button.tiny:hover table tr td a, -table.button.tiny:active table tr td a, -table.button.tiny table tr td a:visited, -table.button.small:hover table tr td a, -table.button.small:active table tr td a, -table.button.small table tr td a:visited, -table.button.large:hover table tr td a, -table.button.large:active table tr td a, -table.button.large table tr td a:visited { - color: #fefefe; -} - -table.button.tiny table td, -table.button.tiny table a { - padding: 4px 8px 4px 8px; -} - -table.button.tiny table a { - font-size: 10px; - font-weight: normal; -} - -table.button.small table td, -table.button.small table a { - padding: 5px 10px 5px 10px; - font-size: 12px; -} - -table.button.large table a { - padding: 10px 20px 10px 20px; - font-size: 20px; -} - -table.button.expand, -table.button.expanded { - width: 100% !important; -} - -table.button.expand table, -table.button.expanded table { - width: 100%; -} - -table.button.expand table a, -table.button.expanded table a { - text-align: center; - width: 100%; - padding-left: 0; - padding-right: 0; -} - -table.button.expand center, -table.button.expanded center { - min-width: 0; -} - -table.button:hover table td, -table.button:visited table td, -table.button:active table td { - background: #147dc2; - color: #fefefe; -} - -table.button:hover table a, -table.button:visited table a, -table.button:active table a { - border: 0 solid #147dc2; -} - -table.button.secondary table td { - background: #777777; - color: #fefefe; - border: 0px solid #777777; -} - -table.button.secondary table a { - color: #fefefe; - border: 0 solid #777777; -} - -table.button.secondary:hover table td { - background: #919191; - color: #fefefe; -} - -table.button.secondary:hover table a { - border: 0 solid #919191; -} - -table.button.secondary:hover table td a { - color: #fefefe; -} - -table.button.secondary:active table td a { - color: #fefefe; -} - -table.button.secondary table td a:visited { - color: #fefefe; -} - -table.button.success table td { - background: #3adb76; - border: 0px solid #3adb76; -} - -table.button.success table a { - border: 0 solid #3adb76; -} - -table.button.success:hover table td { - background: #23bf5d; -} - -table.button.success:hover table a { - border: 0 solid #23bf5d; -} - -table.button.alert table td { - background: #ec5840; - border: 0px solid #ec5840; -} - -table.button.alert table a { - border: 0 solid #ec5840; -} - -table.button.alert:hover table td { - background: #e23317; -} - -table.button.alert:hover table a { - border: 0 solid #e23317; -} - -table.button.warning table td { - background: #ffae00; - border: 0px solid #ffae00; -} - -table.button.warning table a { - border: 0px solid #ffae00; -} - -table.button.warning:hover table td { - background: #cc8b00; -} - -table.button.warning:hover table a { - border: 0px solid #cc8b00; -} - -table.callout { - margin-bottom: 16px; - Margin-bottom: 16px; -} - -th.callout-inner { - width: 100%; - border: 1px solid #cbcbcb; - padding: 10px; - background: #fefefe; -} - -th.callout-inner.primary { - background: #def0fc; - border: 1px solid #444444; - color: #0a0a0a; -} - -th.callout-inner.secondary { - background: #ebebeb; - border: 1px solid #444444; - color: #0a0a0a; -} - -th.callout-inner.success { - background: #e1faea; - border: 1px solid #1b9448; - color: #fefefe; -} - -th.callout-inner.warning { - background: #fff3d9; - border: 1px solid #996800; - color: #fefefe; -} - -th.callout-inner.alert { - background: #fce6e2; - border: 1px solid #b42912; - color: #fefefe; -} - -.thumbnail { - border: solid 4px #fefefe; - box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.2); - display: inline-block; - line-height: 0; - max-width: 100%; - transition: box-shadow 200ms ease-out; - border-radius: 3px; - margin-bottom: 16px; -} - -.thumbnail:hover, -.thumbnail:focus { - box-shadow: 0 0 6px 1px rgba(33, 153, 232, 0.5); -} - -table.menu { - width: 580px; -} - -table.menu td.menu-item, -table.menu th.menu-item { - padding: 10px; - padding-right: 10px; -} - -table.menu td.menu-item a, -table.menu th.menu-item a { - color: #2199e8; -} - -table.menu.vertical td.menu-item, -table.menu.vertical th.menu-item { - padding: 10px; - padding-right: 0; - display: block; -} - -table.menu.vertical td.menu-item a, -table.menu.vertical th.menu-item a { - width: 100%; -} - -table.menu.vertical td.menu-item table.menu.vertical td.menu-item, -table.menu.vertical td.menu-item table.menu.vertical th.menu-item, -table.menu.vertical th.menu-item table.menu.vertical td.menu-item, -table.menu.vertical th.menu-item table.menu.vertical th.menu-item { - padding-left: 10px; -} - -table.menu.text-center a { - text-align: center; -} - -.menu[align="center"] { - width: auto !important; -} - -body.outlook p { - display: inline !important; -} - -@media only screen and (max-width: 596px) { - table.body img { - width: auto; - height: auto; - } - table.body center { - min-width: 0 !important; - } - table.body .container { - width: 95% !important; - } - table.body .columns, - table.body .column { - height: auto !important; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-left: 16px !important; - padding-right: 16px !important; - } - table.body .columns .column, - table.body .columns .columns, - table.body .column .column, - table.body .column .columns { - padding-left: 0 !important; - padding-right: 0 !important; - } - table.body .collapse .columns, - table.body .collapse .column { - padding-left: 0 !important; - padding-right: 0 !important; - } - td.small-1, - th.small-1 { - display: inline-block !important; - width: 8.33333% !important; - } - td.small-2, - th.small-2 { - display: inline-block !important; - width: 16.66667% !important; - } - td.small-3, - th.small-3 { - display: inline-block !important; - width: 25% !important; - } - td.small-4, - th.small-4 { - display: inline-block !important; - width: 33.33333% !important; - } - td.small-5, - th.small-5 { - display: inline-block !important; - width: 41.66667% !important; - } - td.small-6, - th.small-6 { - display: inline-block !important; - width: 50% !important; - } - td.small-7, - th.small-7 { - display: inline-block !important; - width: 58.33333% !important; - } - td.small-8, - th.small-8 { - display: inline-block !important; - width: 66.66667% !important; - } - td.small-9, - th.small-9 { - display: inline-block !important; - width: 75% !important; - } - td.small-10, - th.small-10 { - display: inline-block !important; - width: 83.33333% !important; - } - td.small-11, - th.small-11 { - display: inline-block !important; - width: 91.66667% !important; - } - td.small-12, - th.small-12 { - display: inline-block !important; - width: 100% !important; - } - .columns td.small-12, - .column td.small-12, - .columns th.small-12, - .column th.small-12 { - display: block !important; - width: 100% !important; - } - table.body td.small-offset-1, - table.body th.small-offset-1 { - margin-left: 8.33333% !important; - Margin-left: 8.33333% !important; - } - table.body td.small-offset-2, - table.body th.small-offset-2 { - margin-left: 16.66667% !important; - Margin-left: 16.66667% !important; - } - table.body td.small-offset-3, - table.body th.small-offset-3 { - margin-left: 25% !important; - Margin-left: 25% !important; - } - table.body td.small-offset-4, - table.body th.small-offset-4 { - margin-left: 33.33333% !important; - Margin-left: 33.33333% !important; - } - table.body td.small-offset-5, - table.body th.small-offset-5 { - margin-left: 41.66667% !important; - Margin-left: 41.66667% !important; - } - table.body td.small-offset-6, - table.body th.small-offset-6 { - margin-left: 50% !important; - Margin-left: 50% !important; - } - table.body td.small-offset-7, - table.body th.small-offset-7 { - margin-left: 58.33333% !important; - Margin-left: 58.33333% !important; - } - table.body td.small-offset-8, - table.body th.small-offset-8 { - margin-left: 66.66667% !important; - Margin-left: 66.66667% !important; - } - table.body td.small-offset-9, - table.body th.small-offset-9 { - margin-left: 75% !important; - Margin-left: 75% !important; - } - table.body td.small-offset-10, - table.body th.small-offset-10 { - margin-left: 83.33333% !important; - Margin-left: 83.33333% !important; - } - table.body td.small-offset-11, - table.body th.small-offset-11 { - margin-left: 91.66667% !important; - Margin-left: 91.66667% !important; - } - table.body table.columns td.expander, - table.body table.columns th.expander { - display: none !important; - } - table.body .right-text-pad, - table.body .text-pad-right { - padding-left: 10px !important; - } - table.body .left-text-pad, - table.body .text-pad-left { - padding-right: 10px !important; - } - table.menu { - width: 100% !important; - } - table.menu td, - table.menu th { - width: auto !important; - display: inline-block !important; - } - table.menu.vertical td, - table.menu.vertical th, - table.menu.small-vertical td, - table.menu.small-vertical th { - display: block !important; - } - table.menu[align="center"] { - width: auto !important; - } - table.button.small-expand, - table.button.small-expanded { - width: 100% !important; - } - table.button.small-expand table, - table.button.small-expanded table { - width: 100%; - } - table.button.small-expand table a, - table.button.small-expanded table a { - text-align: center !important; - width: 100% !important; - padding-left: 0 !important; - padding-right: 0 !important; - } - table.button.small-expand center, - table.button.small-expanded center { - min-width: 0; - } -} diff --git a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.html.twig b/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.html.twig deleted file mode 100644 index 0a52d36b3..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.html.twig +++ /dev/null @@ -1,67 +0,0 @@ -{% apply inky_to_html|inline_css %} - - - - - - - - - - - - {% block lead %} - {% if importance is not null %}{{ importance|upper }}{% endif %} -

    - {{ email.subject }} -

    - {% endblock %} - - {% block content %} - {% if markdown %} - {{ include('@email/zurb_2/notification/content_markdown.html.twig') }} - {% else %} - {{ (raw ? content|raw : content)|nl2br }} - {% endif %} - {% endblock %} - - {% block action %} - {% if action_url %} - - - {% endif %} - {% endblock %} - - {% block exception %} - {% if exception %} - -

    Exception stack trace attached.

    - {% endif %} - {% endblock %} -
    -
    - - - - {% block footer %} - {% if footer_text is defined and footer_text is not null %} - - - {% block footer_content %} -

    {{ footer_text }}

    - {% endblock %} -
    -
    - {% endif %} - {% endblock %} -
    -
    -
    - - -{% endapply %} diff --git a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.txt.twig b/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.txt.twig deleted file mode 100644 index c98bb08a7..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.txt.twig +++ /dev/null @@ -1,20 +0,0 @@ -{% block lead %} -{{ email.subject }} -{% endblock %} - -{% block content %} -{{ content }} -{% endblock %} - -{% block action %} -{% if action_url %} -{{ action_text }}: {{ action_url }} -{% endif %} -{% endblock %} - -{% block exception %} -{% if exception %} -Exception stack trace attached. -{{ exception }} -{% endif %} -{% endblock %} diff --git a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/content_markdown.html.twig b/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/content_markdown.html.twig deleted file mode 100644 index 120b2caad..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/content_markdown.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ content|markdown_to_html }} diff --git a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/local.css b/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/local.css deleted file mode 100644 index 2e68dcd3e..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/local.css +++ /dev/null @@ -1,19 +0,0 @@ -body { - background: #f3f3f3; -} - -.wrapper.secondary { - background: #f3f3f3; -} - -.container.body_alert { - border-top: 8px solid #ec5840; -} - -.container.body_warning { - border-top: 8px solid #ffae00; -} - -.container.body_default { - border-top: 8px solid #aaaaaa; -} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig deleted file mode 100644 index 49cd80439..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig +++ /dev/null @@ -1,71 +0,0 @@ -{% use "bootstrap_3_layout.html.twig" %} - -{% block form_start -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-horizontal')|trim}) %} - {{- parent() -}} -{%- endblock form_start %} - -{# Labels #} - -{% block form_label -%} - {%- if label is same as(false) -%} -
    - {%- else -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} - {{- parent() -}} - {%- endif -%} -{%- endblock form_label %} - -{% block form_label_class -%} -col-sm-2 -{%- endblock form_label_class %} - -{# Rows #} - -{% block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    -{##}
    -{%- endblock form_row %} - -{% block submit_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock submit_row %} - -{% block reset_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock reset_row %} - -{% block form_group_class -%} -col-sm-10 -{%- endblock form_group_class %} - -{% block checkbox_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    {#--#} - -{%- endblock checkbox_row %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_3_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_3_layout.html.twig deleted file mode 100644 index 865f9078a..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_3_layout.html.twig +++ /dev/null @@ -1,216 +0,0 @@ -{% use "bootstrap_base_layout.html.twig" %} - -{# Widgets #} - -{% block form_widget_simple -%} - {% if type is not defined or type not in ['file', 'hidden'] %} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} - {% endif %} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{% block button_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-default') ~ ' btn')|trim}) -%} - {{- parent() -}} -{%- endblock button_widget %} - -{% block money_widget -%} - {% set prepend = not (money_pattern starts with '{{') %} - {% set append = not (money_pattern ends with '}}') %} - {% if prepend or append %} -
    - {% if prepend %} - {{ money_pattern|form_encode_currency }} - {% endif %} - {{- block('form_widget_simple') -}} - {% if append %} - {{ money_pattern|form_encode_currency }} - {% endif %} -
    - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock money_widget %} - -{% block checkbox_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {% if 'checkbox-inline' in parent_label_class %} - {{- form_label(form, null, { widget: parent() }) -}} - {% else -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock checkbox_widget %} - -{% block radio_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if 'radio-inline' in parent_label_class -%} - {{- form_label(form, null, { widget: parent() }) -}} - {%- else -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock radio_widget %} - -{% block choice_widget_collapsed -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} - {{- parent() -}} -{%- endblock choice_widget_collapsed %} - -{# Labels #} - -{% block form_label -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' control-label')|trim}) -%} - {{- parent() -}} -{%- endblock form_label %} - -{% block choice_label -%} - {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} - {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) -%} - {{- block('form_label') -}} -{% endblock %} - -{% block checkbox_label -%} - {%- set label_attr = label_attr|merge({'for': id}) -%} - - {{- block('checkbox_radio_label') -}} -{%- endblock checkbox_label %} - -{% block radio_label -%} - {%- set label_attr = label_attr|merge({'for': id}) -%} - - {{- block('checkbox_radio_label') -}} -{%- endblock radio_label %} - -{% block checkbox_radio_label -%} - {# Do not display the label if widget is not defined in order to prevent double label rendering #} - {%- if widget is defined -%} - {%- if required -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%} - {%- endif -%} - {%- if label is not same as(false) and label is empty -%} - {%- if label_format is not empty -%} - {%- set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) -%} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - - {#- if statement must be kept on the same line, to force the space between widget and label -#} - {{- widget|raw }} {% if label is not same as(false) -%} - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{ label -}} - {%- else -%} - {{ label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{ label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{ label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{% block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) }} {# -#} - {{ form_widget(form, widget_attr) }} {# -#} - {{- form_help(form) -}} - {{ form_errors(form) }} {# -#} - {# -#} -{%- endblock form_row %} - -{% block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row %} - -{% block choice_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock choice_row %} - -{% block date_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock date_row %} - -{% block time_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock time_row %} - -{% block datetime_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock datetime_row %} - -{% block checkbox_row -%} - - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} - -{%- endblock checkbox_row %} - -{% block radio_row -%} - - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} - -{%- endblock radio_row %} - -{# Errors #} - -{% block form_errors -%} - {% if errors|length > 0 -%} - {% if form is not rootform %}{% else %}
    {% endif %} -
      - {%- for error in errors -%} -
    • {{ error.message }}
    • - {%- endfor -%} -
    - {% if form is not rootform %}{% else %}
    {% endif %} - {%- endif %} -{%- endblock form_errors %} - -{# Help #} - -{% block form_help -%} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-block')|trim}) -%} - - {%- if translation_domain is same as(false) -%} - {%- if help_html is same as(false) -%} - {{- help -}} - {%- else -%} - {{- help|raw -}} - {%- endif -%} - {%- else -%} - {%- if help_html is same as(false) -%} - {{- help|trans(help_translation_parameters, translation_domain) -}} - {%- else -%} - {{- help|trans(help_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock form_help %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig deleted file mode 100644 index 990b324cb..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig +++ /dev/null @@ -1,88 +0,0 @@ -{% use "bootstrap_4_layout.html.twig" %} - -{# Labels #} - -{% block form_label -%} - {%- if label is same as(false) -%} -
    - {%- else -%} - {%- if expanded is not defined or not expanded -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%} - {%- endif -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} - {{- parent() -}} - {%- endif -%} -{%- endblock form_label %} - -{% block form_label_class -%} -col-sm-2 -{%- endblock form_label_class %} - -{# Rows #} - -{% block form_row -%} - {%- if expanded is defined and expanded -%} - {{ block('fieldset_form_row') }} - {%- else -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} -
    - {##} - {%- endif -%} -{%- endblock form_row %} - -{% block fieldset_form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - -
    - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    -
    -{##} -{%- endblock fieldset_form_row %} - -{% block submit_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock submit_row %} - -{% block reset_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock reset_row %} - -{% block form_group_class -%} -col-sm-10 -{%- endblock form_group_class %} - -{% block checkbox_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} - {{- form_help(form) -}} -
    {#--#} - -{%- endblock checkbox_row %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig deleted file mode 100644 index 0e8084054..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig +++ /dev/null @@ -1,371 +0,0 @@ -{% use "bootstrap_base_layout.html.twig" %} - -{# Widgets #} - -{% block money_widget -%} - {%- set prepend = not (money_pattern starts with '{{') -%} - {%- set append = not (money_pattern ends with '}}') -%} - {%- if prepend or append -%} -
    - {%- if prepend -%} -
    - {{ money_pattern|form_encode_currency }} -
    - {%- endif -%} - {{- block('form_widget_simple') -}} - {%- if append -%} -
    - {{ money_pattern|form_encode_currency }} -
    - {%- endif -%} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock money_widget %} - -{% block datetime_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {{- parent() -}} -{%- endblock datetime_widget %} - -{% block date_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {{- parent() -}} -{%- endblock date_widget %} - -{% block time_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {{- parent() -}} -{%- endblock time_widget %} - -{% block dateinterval_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} -
    - {%- if with_years -%} -
    - {{ form_label(form.years) }} - {{ form_widget(form.years) }} -
    - {%- endif -%} - {%- if with_months -%} -
    - {{ form_label(form.months) }} - {{ form_widget(form.months) }} -
    - {%- endif -%} - {%- if with_weeks -%} -
    - {{ form_label(form.weeks) }} - {{ form_widget(form.weeks) }} -
    - {%- endif -%} - {%- if with_days -%} -
    - {{ form_label(form.days) }} - {{ form_widget(form.days) }} -
    - {%- endif -%} - {%- if with_hours -%} -
    - {{ form_label(form.hours) }} - {{ form_widget(form.hours) }} -
    - {%- endif -%} - {%- if with_minutes -%} -
    - {{ form_label(form.minutes) }} - {{ form_widget(form.minutes) }} -
    - {%- endif -%} - {%- if with_seconds -%} -
    - {{ form_label(form.seconds) }} - {{ form_widget(form.seconds) }} -
    - {%- endif -%} - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} -
    - {{ symbol|default('%') }} -
    -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block file_widget -%} - <{{ element|default('div') }} class="custom-file"> - {%- set type = type|default('file') -%} - {%- set input_lang = 'en' -%} - {% if app is defined and app.request is defined %}{%- set input_lang = app.request.locale -%}{%- endif -%} - {%- set attr = {lang: input_lang} | merge(attr) -%} - {{- block('form_widget_simple') -}} - {%- set label_attr = label_attr|merge({ class: (label_attr.class|default('') ~ ' custom-file-label')|trim })|filter((value, key) => key != 'id') -%} - - -{% endblock %} - -{% block form_widget_simple -%} - {%- if type is not defined or type != 'hidden' -%} - {%- set className = ' form-control' -%} - {%- if type|default('') == 'file' -%} - {%- set className = ' custom-file-input' -%} - {%- elseif type|default('') == 'range' -%} - {%- set className = ' form-control-range' -%} - {%- endif -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ className)|trim}) -%} - {%- endif -%} - {%- if type is defined and (type == 'range' or type == 'color') %} - {# Attribute "required" is not supported #} - {%- set required = false -%} - {% endif %} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{% block widget_attributes -%} - {%- if not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) %} - {%- endif -%} - {{ parent() }} -{%- endblock widget_attributes %} - -{% block button_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-secondary') ~ ' btn')|trim}) -%} - {{- parent() -}} -{%- endblock button_widget %} - -{% block submit_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-primary'))|trim}) -%} - {{- parent() -}} -{%- endblock submit_widget %} - -{% block checkbox_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if 'checkbox-custom' in parent_label_class -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' custom-control-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- elseif 'switch-custom' in parent_label_class -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' custom-control-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock checkbox_widget %} - -{% block radio_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if 'radio-custom' in parent_label_class -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' custom-control-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock radio_widget %} - -{% block choice_widget_collapsed -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} - {{- parent() -}} -{%- endblock choice_widget_collapsed %} - -{% block choice_widget_expanded -%} -
    - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - valid: valid, - }) -}} - {% endfor -%} -
    -{%- endblock choice_widget_expanded %} - -{# Labels #} - -{% block form_label -%} - {% if label is not same as(false) -%} - {%- if compound is defined and compound -%} - {%- set element = 'legend' -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%} - {%- else -%} - {%- set label_attr = label_attr|merge({for: id}) -%} - {%- endif -%} - {% if required -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %} - {%- endif -%} - {% if label is empty -%} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - <{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}> - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {% block form_label_errors %}{{- form_errors(form) -}}{% endblock form_label_errors %} - {%- else -%} - {%- if errors|length > 0 -%} -
    - {{- form_errors(form) -}} -
    - {%- endif -%} - {%- endif -%} -{%- endblock form_label %} - -{% block checkbox_radio_label -%} - {#- Do not display the label if widget is not defined in order to prevent double label rendering -#} - {%- if widget is defined -%} - {% set is_parent_custom = parent_label_class is defined and ('checkbox-custom' in parent_label_class or 'radio-custom' in parent_label_class or 'switch-custom' in parent_label_class) %} - {% set is_custom = label_attr.class is defined and ('checkbox-custom' in label_attr.class or 'radio-custom' in label_attr.class or 'switch-custom' in label_attr.class) %} - {%- if is_parent_custom or is_custom -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' custom-control-label')|trim}) -%} - {%- else %} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-check-label')|trim}) -%} - {%- endif %} - {%- if not compound -%} - {% set label_attr = label_attr|merge({'for': id}) %} - {%- endif -%} - {%- if required -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%} - {%- endif -%} - {%- if label is not same as(false) and label is empty -%} - {%- if label_format is not empty -%} - {%- set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) -%} - {%- else -%} - {%- set label = name|humanize -%} - {%- endif -%} - {%- endif -%} - - {{ widget|raw }} - - {%- if label is not same as(false) -%} - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {{- form_errors(form) -}} - - {%- endif -%} -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{% block form_row -%} - {%- if compound is defined and compound -%} - {%- set element = 'fieldset' -%} - {%- endif -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - <{{ element|default('div') }}{% with {attr: row_attr|merge({class: (row_attr.class|default('') ~ ' form-group')|trim})} %}{{ block('attributes') }}{% endwith %}> - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - -{%- endblock form_row %} - -{# Errors #} - -{% block form_errors -%} - {%- if errors|length > 0 -%} - - {%- for error in errors -%} - - {{ 'Error'|trans({}, 'validators') }} {{ error.message }} - - {%- endfor -%} - - {%- endif %} -{%- endblock form_errors %} - -{# Help #} - -{% block form_help -%} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' form-text text-muted')|trim}) -%} - - {%- if translation_domain is same as(false) -%} - {%- if help_html is same as(false) -%} - {{- help -}} - {%- else -%} - {{- help|raw -}} - {%- endif -%} - {%- else -%} - {%- if help_html is same as(false) -%} - {{- help|trans(help_translation_parameters, translation_domain) -}} - {%- else -%} - {{- help|trans(help_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock form_help %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_5_horizontal_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_5_horizontal_layout.html.twig deleted file mode 100644 index 3c24166d4..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_5_horizontal_layout.html.twig +++ /dev/null @@ -1,130 +0,0 @@ -{% use "bootstrap_5_layout.html.twig" %} - -{# Labels #} - -{% block form_label -%} - {%- if label is same as(false) -%} -
    - {%- else -%} - {%- set row_class = row_class|default(row_attr.class|default('')) -%} - {%- if 'form-floating' not in row_class and 'input-group' not in row_class -%} - {%- if expanded is not defined or not expanded -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%} - {%- endif -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} - {%- endif -%} - {{- parent() -}} - {%- endif -%} -{%- endblock form_label %} - -{% block form_label_class -%} - col-sm-2 -{%- endblock form_label_class %} - -{# Rows #} - -{% block form_row -%} - {%- if expanded is defined and expanded -%} - {{ block('fieldset_form_row') }} - {%- else -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - {%- set row_class = row_class|default(row_attr.class|default('mb-3')) -%} - {%- set is_form_floating = is_form_floating|default('form-floating' in row_class) -%} - {%- set is_input_group = is_input_group|default('input-group' in row_class) -%} - {#- Remove behavior class from the main container -#} - {%- set row_class = row_class|replace({'form-floating': '', 'input-group': ''}) -%} - - {%- if is_form_floating or is_input_group -%} -
    -
    - {%- if is_form_floating -%} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_label(form) -}} -
    - {%- elseif is_input_group -%} -
    - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {#- Hack to properly display help with input group -#} - {{- form_help(form) -}} -
    - {%- endif -%} - {%- if not is_input_group -%} - {{- form_help(form) -}} - {%- endif -%} - {{- form_errors(form) -}} -
    - {%- else -%} - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    - {%- endif -%} - {##} - {%- endif -%} -{%- endblock form_row %} - -{% block fieldset_form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - -
    - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    -
    - -{%- endblock fieldset_form_row %} - -{% block submit_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock submit_row %} - -{% block reset_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock reset_row %} - -{% block button_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock button_row %} - -{% block checkbox_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    {#--#} - -{%- endblock checkbox_row %} - -{% block form_group_class -%} - col-sm-10 -{%- endblock form_group_class %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_5_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_5_layout.html.twig deleted file mode 100644 index 92c603a64..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_5_layout.html.twig +++ /dev/null @@ -1,374 +0,0 @@ -{% use "bootstrap_base_layout.html.twig" %} - -{# Widgets #} - -{% block money_widget -%} - {%- set prepend = not (money_pattern starts with '{{') -%} - {%- set append = not (money_pattern ends with '}}') -%} - {%- if prepend or append -%} -
    - {%- if prepend -%} - {{ money_pattern|form_encode_currency }} - {%- endif -%} - {{- block('form_widget_simple') -}} - {%- if append -%} - {{ money_pattern|form_encode_currency }} - {%- endif -%} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock money_widget %} - -{% block date_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} - {%- if datetime is not defined or not datetime -%} -
    - {%- endif %} - {%- if label is not same as(false) -%} -
    - {{- form_label(form.year) -}} - {{- form_label(form.month) -}} - {{- form_label(form.day) -}} -
    - {%- endif -%} -
    - {{- date_pattern|replace({ - '{{ year }}': form_widget(form.year), - '{{ month }}': form_widget(form.month), - '{{ day }}': form_widget(form.day), - })|raw -}} -
    - {%- if datetime is not defined or not datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock date_widget %} - -{% block time_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- if label is not same as(false) -%} -
    - {{- form_label(form.hour) -}} - {%- if with_minutes -%}{{ form_label(form.minute) }}{%- endif -%} - {%- if with_seconds -%}{{ form_label(form.second) }}{%- endif -%} -
    - {%- endif -%} - {% if with_minutes or with_seconds %} -
    - {% endif %} - {{- form_widget(form.hour) -}} - {%- if with_minutes -%} - : - {{- form_widget(form.minute) -}} - {%- endif -%} - {%- if with_seconds -%} - : - {{- form_widget(form.second) -}} - {%- endif -%} - {% if with_minutes or with_seconds %} -
    - {% endif %} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock time_widget %} - -{% block datetime_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} -
    - {{- form_widget(form.date, { datetime: true } ) -}} - {{- form_errors(form.date) -}} - {{- form_widget(form.time, { datetime: true } ) -}} - {{- form_errors(form.time) -}} -
    - {%- endif -%} -{%- endblock datetime_widget %} - -{% block dateinterval_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} -
    - {%- if with_years -%} -
    - {{ form_label(form.years) }} - {{ form_widget(form.years) }} -
    - {%- endif -%} - {%- if with_months -%} -
    - {{ form_label(form.months) }} - {{ form_widget(form.months) }} -
    - {%- endif -%} - {%- if with_weeks -%} -
    - {{ form_label(form.weeks) }} - {{ form_widget(form.weeks) }} -
    - {%- endif -%} - {%- if with_days -%} -
    - {{ form_label(form.days) }} - {{ form_widget(form.days) }} -
    - {%- endif -%} - {%- if with_hours -%} -
    - {{ form_label(form.hours) }} - {{ form_widget(form.hours) }} -
    - {%- endif -%} - {%- if with_minutes -%} -
    - {{ form_label(form.minutes) }} - {{ form_widget(form.minutes) }} -
    - {%- endif -%} - {%- if with_seconds -%} -
    - {{ form_label(form.seconds) }} - {{ form_widget(form.seconds) }} -
    - {%- endif -%} - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} - {{ symbol|default('%') }} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block form_widget_simple -%} - {%- if type is not defined or type != 'hidden' %} - {%- set widget_class = ' form-control' %} - {%- if type|default('') == 'color' -%} - {%- set widget_class = widget_class ~ ' form-control-color' -%} - {%- elseif type|default('') == 'range' -%} - {%- set widget_class = ' form-range' -%} - {%- endif -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ widget_class)|trim}) -%} - {% endif -%} - {%- if type is defined and type in ['range', 'color'] %} - {# Attribute "required" is not supported #} - {% set required = false %} - {% endif -%} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{%- block widget_attributes -%} - {%- if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) %} - {% endif -%} - {{ parent() }} -{%- endblock widget_attributes -%}form_labelform_label - -{%- block button_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-secondary') ~ ' btn')|trim}) -%} - {{- parent() -}} -{%- endblock button_widget %} - -{%- block submit_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-primary'))|trim}) -%} - {{- parent() -}} -{%- endblock submit_widget %} - -{%- block checkbox_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- set row_class = 'form-check' -%} - {%- if 'checkbox-inline' in parent_label_class %} - {% set row_class = row_class ~ ' form-check-inline' %} - {% endif -%} - {%- if 'checkbox-switch' in parent_label_class %} - {% set row_class = row_class ~ ' form-switch' %} - {% endif -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    -{%- endblock checkbox_widget %} - -{%- block radio_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- set row_class = 'form-check' -%} - {%- if 'radio-inline' in parent_label_class -%} - {%- set row_class = row_class ~ ' form-check-inline' -%} - {%- endif -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    -{%- endblock radio_widget %} - -{%- block choice_widget_collapsed -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-select')|trim}) -%} - {{- parent() -}} -{%- endblock choice_widget_collapsed -%} - -{%- block choice_widget_expanded -%} -
    - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - valid: valid, - }) -}} - {% endfor -%} -
    -{%- endblock choice_widget_expanded %} - -{# Labels #} - -{%- block form_label -%} - {% if label is not same as(false) -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if compound is defined and compound -%} - {%- set element = 'legend' -%} - {%- if 'col-form-label' not in parent_label_class -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label' )|trim}) -%} - {%- endif -%} - {%- else -%} - {%- set row_class = row_class|default(row_attr.class|default('')) -%} - {%- set label_attr = label_attr|merge({for: id}) -%} - {%- if 'col-form-label' not in parent_label_class -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ('input-group' in row_class ? ' input-group-text' : ' form-label') )|trim}) -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {{- parent() -}} -{%- endblock form_label %} - -{%- block checkbox_radio_label -%} - {#- Do not display the label if widget is not defined in order to prevent double label rendering -#} - {%- if widget is defined -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-check-label')|trim}) -%} - {%- if not compound -%} - {% set label_attr = label_attr|merge({'for': id}) %} - {%- endif -%} - {%- if required -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%} - {%- endif -%} - {%- if parent_label_class is defined -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) -%} - {%- endif -%} - {%- if label is not same as(false) and label is empty -%} - {%- if label_format is not empty -%} - {%- set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) -%} - {%- else -%} - {%- set label = name|humanize -%} - {%- endif -%} - {%- endif -%} - - {{ widget|raw }} - - {%- if label is not same as(false) -%} - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{%- block form_row -%} - {%- if compound is defined and compound -%} - {%- set element = 'fieldset' -%} - {%- endif -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - {%- set row_class = row_class|default(row_attr.class|default('mb-3')|trim) -%} - <{{ element|default('div') }}{% with {attr: row_attr|merge({class: row_class})} %}{{ block('attributes') }}{% endwith %}> - {%- if 'form-floating' in row_class -%} - {{- form_widget(form, widget_attr) -}} - {{- form_label(form) -}} - {%- else -%} - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {%- endif -%} - {{- form_help(form) -}} - {{- form_errors(form) -}} - -{%- endblock form_row %} - -{%- block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row %} - -{# Errors #} - -{%- block form_errors -%} - {%- if errors|length > 0 -%} - {%- for error in errors -%} -
    {{ error.message }}
    - {%- endfor -%} - {%- endif %} -{%- endblock form_errors %} - -{# Help #} - -{%- block form_help -%} - {% set row_class = row_attr.class|default('') %} - {% set help_class = ' form-text' %} - {% if 'input-group' in row_class %} - {#- Hack to properly display help with input group -#} - {% set help_class = ' input-group-text' %} - {% endif %} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ help_class ~ ' mb-0')|trim}) -%} - {%- endif -%} - {{- parent() -}} -{%- endblock form_help %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_base_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_base_layout.html.twig deleted file mode 100644 index b8cb8c44a..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/bootstrap_base_layout.html.twig +++ /dev/null @@ -1,208 +0,0 @@ -{% use "form_div_layout.html.twig" %} - -{# Widgets #} - -{% block textarea_widget -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %} - {{- parent() -}} -{%- endblock textarea_widget %} - -{% block money_widget -%} - {% set prepend = not (money_pattern starts with '{{') %} - {% set append = not (money_pattern ends with '}}') %} - {% if prepend or append %} -
    - {% if prepend %} - {{ money_pattern|form_encode_currency }} - {% endif %} - {{- block('form_widget_simple') -}} - {% if append %} - {{ money_pattern|form_encode_currency }} - {% endif %} -
    - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock money_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} - {{ symbol|default('%') }} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block datetime_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} -
    - {{- form_errors(form.date) -}} - {{- form_errors(form.time) -}} - -
    - {%- if form.date.year is defined %}{{ form_label(form.date.year) }}{% endif -%} - {%- if form.date.month is defined %}{{ form_label(form.date.month) }}{% endif -%} - {%- if form.date.day is defined %}{{ form_label(form.date.day) }}{% endif -%} - {%- if form.time.hour is defined %}{{ form_label(form.time.hour) }}{% endif -%} - {%- if form.time.minute is defined %}{{ form_label(form.time.minute) }}{% endif -%} - {%- if form.time.second is defined %}{{ form_label(form.time.second) }}{% endif -%} -
    - - {{- form_widget(form.date, { datetime: true } ) -}} - {{- form_widget(form.time, { datetime: true } ) -}} -
    - {%- endif -%} -{%- endblock datetime_widget %} - -{% block date_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} - {%- if datetime is not defined or not datetime -%} -
    - {%- endif %} - {%- if label is not same as(false) -%} -
    - {{ form_label(form.year) }} - {{ form_label(form.month) }} - {{ form_label(form.day) }} -
    - {%- endif -%} - - {{- date_pattern|replace({ - '{{ year }}': form_widget(form.year), - '{{ month }}': form_widget(form.month), - '{{ day }}': form_widget(form.day), - })|raw -}} - {%- if datetime is not defined or not datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock date_widget %} - -{% block time_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- if label is not same as(false) -%}
    {{ form_label(form.hour) }}
    {%- endif -%} - {{- form_widget(form.hour) -}} - {%- if with_minutes -%}:{%- if label is not same as(false) -%}
    {{ form_label(form.minute) }}
    {%- endif -%}{{ form_widget(form.minute) }}{%- endif -%} - {%- if with_seconds -%}:{%- if label is not same as(false) -%}
    {{ form_label(form.second) }}
    {%- endif -%}{{ form_widget(form.second) }}{%- endif -%} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock time_widget %} - -{%- block dateinterval_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} -
    - {{- form_errors(form) -}} -
    - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - -
    - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget -%} - -{% block choice_widget_expanded -%} - {%- if '-inline' in label_attr.class|default('') -%} - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - }) -}} - {% endfor -%} - {%- else -%} -
    - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - }) -}} - {%- endfor -%} -
    - {%- endif -%} -{%- endblock choice_widget_expanded %} - -{# Labels #} - -{% block choice_label -%} - {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} - {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': '', 'checkbox-custom': '', 'radio-custom': '', 'switch-custom': ''})|trim}) -%} - {{- block('form_label') -}} -{% endblock choice_label %} - -{% block checkbox_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock checkbox_label %} - -{% block radio_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock radio_label %} - -{# Rows #} - -{% block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row %} - -{% block choice_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock choice_row %} - -{% block date_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock date_row %} - -{% block time_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock time_row %} - -{% block datetime_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock datetime_row %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig deleted file mode 100644 index 94f87dc16..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig +++ /dev/null @@ -1,476 +0,0 @@ -{# Widgets #} - -{%- block form_widget -%} - {% if compound %} - {{- block('form_widget_compound') -}} - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock form_widget -%} - -{%- block form_widget_simple -%} - {%- set type = type|default('text') -%} - {%- if type == 'range' or type == 'color' -%} - {# Attribute "required" is not supported #} - {%- set required = false -%} - {%- endif -%} - -{%- endblock form_widget_simple -%} - -{%- block form_widget_compound -%} -
    - {%- if form is rootform -%} - {{ form_errors(form) }} - {%- endif -%} - {{- block('form_rows') -}} - {{- form_rest(form) -}} -
    -{%- endblock form_widget_compound -%} - -{%- block collection_widget -%} - {% if prototype is defined and not prototype.rendered %} - {%- set attr = attr|merge({'data-prototype': form_row(prototype) }) -%} - {% endif %} - {{- block('form_widget') -}} -{%- endblock collection_widget -%} - -{%- block textarea_widget -%} - -{%- endblock textarea_widget -%} - -{%- block choice_widget -%} - {% if expanded %} - {{- block('choice_widget_expanded') -}} - {% else %} - {{- block('choice_widget_collapsed') -}} - {% endif %} -{%- endblock choice_widget -%} - -{%- block choice_widget_expanded -%} -
    - {%- for child in form %} - {{- form_widget(child) -}} - {{- form_label(child, null, {translation_domain: choice_translation_domain}) -}} - {% endfor -%} -
    -{%- endblock choice_widget_expanded -%} - -{%- block choice_widget_collapsed -%} - {%- if required and placeholder is none and not placeholder_in_choices and not multiple and (attr.size is not defined or attr.size <= 1) -%} - {% set required = false %} - {%- endif -%} - -{%- endblock choice_widget_collapsed -%} - -{%- block choice_widget_options -%} - {% for group_label, choice in options %} - {%- if choice is iterable -%} - - {% set options = choice %} - {{- block('choice_widget_options') -}} - - {%- else -%} - - {%- endif -%} - {% endfor %} -{%- endblock choice_widget_options -%} - -{%- block checkbox_widget -%} - -{%- endblock checkbox_widget -%} - -{%- block radio_widget -%} - -{%- endblock radio_widget -%} - -{%- block datetime_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {%- else -%} -
    - {{- form_errors(form.date) -}} - {{- form_errors(form.time) -}} - {{- form_widget(form.date) -}} - {{- form_widget(form.time) -}} -
    - {%- endif -%} -{%- endblock datetime_widget -%} - -{%- block date_widget -%} - {%- if widget == 'single_text' -%} - {{ block('form_widget_simple') }} - {%- else -%} -
    - {{- date_pattern|replace({ - '{{ year }}': form_widget(form.year), - '{{ month }}': form_widget(form.month), - '{{ day }}': form_widget(form.day), - })|raw -}} -
    - {%- endif -%} -{%- endblock date_widget -%} - -{%- block time_widget -%} - {%- if widget == 'single_text' -%} - {{ block('form_widget_simple') }} - {%- else -%} - {%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%} -
    - {{ form_widget(form.hour, vars) }}{% if with_minutes %}:{{ form_widget(form.minute, vars) }}{% endif %}{% if with_seconds %}:{{ form_widget(form.second, vars) }}{% endif %} -
    - {%- endif -%} -{%- endblock time_widget -%} - -{%- block dateinterval_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} -
    - {{- form_errors(form) -}} - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget -%} - -{%- block number_widget -%} - {# type="number" doesn't work with floats in localized formats #} - {%- set type = type|default('text') -%} - {{ block('form_widget_simple') }} -{%- endblock number_widget -%} - -{%- block integer_widget -%} - {%- set type = type|default('number') -%} - {{ block('form_widget_simple') }} -{%- endblock integer_widget -%} - -{%- block money_widget -%} - {{ money_pattern|form_encode_currency(block('form_widget_simple')) }} -{%- endblock money_widget -%} - -{%- block url_widget -%} - {%- set type = type|default('url') -%} - {{ block('form_widget_simple') }} -{%- endblock url_widget -%} - -{%- block search_widget -%} - {%- set type = type|default('search') -%} - {{ block('form_widget_simple') }} -{%- endblock search_widget -%} - -{%- block percent_widget -%} - {%- set type = type|default('text') -%} - {{ block('form_widget_simple') }}{% if symbol %} {{ symbol|default('%') }}{% endif %} -{%- endblock percent_widget -%} - -{%- block password_widget -%} - {%- set type = type|default('password') -%} - {{ block('form_widget_simple') }} -{%- endblock password_widget -%} - -{%- block hidden_widget -%} - {%- set type = type|default('hidden') -%} - {{ block('form_widget_simple') }} -{%- endblock hidden_widget -%} - -{%- block email_widget -%} - {%- set type = type|default('email') -%} - {{ block('form_widget_simple') }} -{%- endblock email_widget -%} - -{%- block range_widget -%} - {% set type = type|default('range') %} - {{- block('form_widget_simple') -}} -{%- endblock range_widget %} - -{%- block button_widget -%} - {%- if label is empty -%} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- elseif label is not same as(false) -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - -{%- endblock button_widget -%} - -{%- block submit_widget -%} - {%- set type = type|default('submit') -%} - {{ block('button_widget') }} -{%- endblock submit_widget -%} - -{%- block reset_widget -%} - {%- set type = type|default('reset') -%} - {{ block('button_widget') }} -{%- endblock reset_widget -%} - -{%- block tel_widget -%} - {%- set type = type|default('tel') -%} - {{ block('form_widget_simple') }} -{%- endblock tel_widget -%} - -{%- block color_widget -%} - {%- set type = type|default('color') -%} - {{ block('form_widget_simple') }} -{%- endblock color_widget -%} - -{%- block week_widget -%} - {%- if widget == 'single_text' -%} - {{ block('form_widget_simple') }} - {%- else -%} - {%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%} -
    - {{ form_widget(form.year, vars) }}-{{ form_widget(form.week, vars) }} -
    - {%- endif -%} -{%- endblock week_widget -%} - -{# Labels #} - -{%- block form_label -%} - {% if label is not same as(false) -%} - {% if not compound -%} - {% set label_attr = label_attr|merge({'for': id}) %} - {%- endif -%} - {% if required -%} - {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %} - {%- endif -%} - {% if label is empty -%} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - <{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}> - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock form_label -%} - -{%- block button_label -%}{%- endblock -%} - -{# Help #} - -{% block form_help -%} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-text')|trim}) -%} -

    - {%- if translation_domain is same as(false) -%} - {%- if help_html is same as(false) -%} - {{- help -}} - {%- else -%} - {{- help|raw -}} - {%- endif -%} - {%- else -%} - {%- if help_html is same as(false) -%} - {{- help|trans(help_translation_parameters, translation_domain) -}} - {%- else -%} - {{- help|trans(help_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} -

    - {%- endif -%} -{%- endblock form_help %} - -{# Rows #} - -{%- block repeated_row -%} - {# - No need to render the errors here, as all errors are mapped - to the first child (see RepeatedTypeValidatorExtension). - #} - {{- block('form_rows') -}} -{%- endblock repeated_row -%} - -{%- block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) -}} - {{- form_errors(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - -{%- endblock form_row -%} - -{%- block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row -%} - -{%- block hidden_row -%} - {{ form_widget(form) }} -{%- endblock hidden_row -%} - -{# Misc #} - -{%- block form -%} - {{ form_start(form) }} - {{- form_widget(form) -}} - {{ form_end(form) }} -{%- endblock form -%} - -{%- block form_start -%} - {%- do form.setMethodRendered() -%} - {% set method = method|upper %} - {%- if method in ["GET", "POST"] -%} - {% set form_method = method %} - {%- else -%} - {% set form_method = "POST" %} - {%- endif -%} - - {%- if form_method != method -%} - - {%- endif -%} -{%- endblock form_start -%} - -{%- block form_end -%} - {%- if not render_rest is defined or render_rest -%} - {{ form_rest(form) }} - {%- endif -%} - -{%- endblock form_end -%} - -{%- block form_errors -%} - {%- if errors|length > 0 -%} -
      - {%- for error in errors -%} -
    • {{ error.message }}
    • - {%- endfor -%} -
    - {%- endif -%} -{%- endblock form_errors -%} - -{%- block form_rest -%} - {% for child in form -%} - {% if not child.rendered %} - {{- form_row(child) -}} - {% endif %} - {%- endfor -%} - - {% if not form.methodRendered and form is rootform %} - {%- do form.setMethodRendered() -%} - {% set method = method|upper %} - {%- if method in ["GET", "POST"] -%} - {% set form_method = method %} - {%- else -%} - {% set form_method = "POST" %} - {%- endif -%} - - {%- if form_method != method -%} - - {%- endif -%} - {% endif -%} -{% endblock form_rest %} - -{# Support #} - -{%- block form_rows -%} - {% for child in form|filter(child => not child.rendered) %} - {{- form_row(child) -}} - {% endfor %} -{%- endblock form_rows -%} - -{%- block widget_attributes -%} - id="{{ id }}" name="{{ full_name }}" - {%- if disabled %} disabled="disabled"{% endif -%} - {%- if required %} required="required"{% endif -%} - {{ block('attributes') }} -{%- endblock widget_attributes -%} - -{%- block widget_container_attributes -%} - {%- if id is not empty %}id="{{ id }}"{% endif -%} - {{ block('attributes') }} -{%- endblock widget_container_attributes -%} - -{%- block button_attributes -%} - id="{{ id }}" name="{{ full_name }}"{% if disabled %} disabled="disabled"{% endif -%} - {{ block('attributes') }} -{%- endblock button_attributes -%} - -{% block attributes -%} - {%- for attrname, attrvalue in attr -%} - {{- " " -}} - {%- if attrname in ['placeholder', 'title'] -%} - {{- attrname }}="{{ translation_domain is same as(false) or attrvalue is null ? attrvalue : attrvalue|trans(attr_translation_parameters, translation_domain) }}" - {%- elseif attrvalue is same as(true) -%} - {{- attrname }}="{{ attrname }}" - {%- elseif attrvalue is not same as(false) -%} - {{- attrname }}="{{ attrvalue }}" - {%- endif -%} - {%- endfor -%} -{%- endblock attributes -%} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/form_table_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/form_table_layout.html.twig deleted file mode 100644 index 00a51ab04..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/form_table_layout.html.twig +++ /dev/null @@ -1,50 +0,0 @@ -{% use "form_div_layout.html.twig" %} - -{%- block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - - {{- form_label(form) -}} - - - {{- form_errors(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - - -{%- endblock form_row -%} - -{%- block button_row -%} - - - - {{- form_widget(form) -}} - - -{%- endblock button_row -%} - -{%- block hidden_row -%} - {%- set style = row_attr.style is defined ? (row_attr.style ~ (row_attr.style|trim|last != ';' ? '; ')) -%} - - - {{- form_widget(form) -}} - - -{%- endblock hidden_row -%} - -{%- block form_widget_compound -%} - - {%- if form is rootform and errors|length > 0 -%} - - - - {%- endif -%} - {{- block('form_rows') -}} - {{- form_rest(form) -}} -
    - {{- form_errors(form) -}} -
    -{%- endblock form_widget_compound -%} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/foundation_5_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/foundation_5_layout.html.twig deleted file mode 100644 index f8c51b83d..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/foundation_5_layout.html.twig +++ /dev/null @@ -1,340 +0,0 @@ -{% extends "form_div_layout.html.twig" %} - -{# Based on Foundation 5 Doc #} -{# Widgets #} - -{% block form_widget_simple -%} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{% block textarea_widget -%} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {{- parent() -}} -{%- endblock textarea_widget %} - -{% block button_widget -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' button')|trim}) %} - {{- parent() -}} -{%- endblock button_widget %} - -{% block money_widget -%} -
    - {% set prepend = '{{' == money_pattern[0:2] %} - {% if not prepend %} -
    - {{ money_pattern|form_encode_currency }} -
    - {% endif %} -
    - {{- block('form_widget_simple') -}} -
    - {% if prepend %} -
    - {{ money_pattern|form_encode_currency }} -
    - {% endif %} -
    -{%- endblock money_widget %} - -{% block percent_widget -%} -
    - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} -
    -
    - {{ symbol|default('%') }} -
    - {%- else -%} -
    - {{- block('form_widget_simple') -}} -
    - {%- endif -%} -
    -{%- endblock percent_widget %} - -{% block datetime_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {% else %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} -
    -
    {{ form_errors(form.date) }}
    -
    {{ form_errors(form.time) }}
    -
    -
    -
    {{ form_widget(form.date, { datetime: true } ) }}
    -
    {{ form_widget(form.time, { datetime: true } ) }}
    -
    - {% endif %} -{%- endblock datetime_widget %} - -{% block date_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {% else %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} - {% if datetime is not defined or not datetime %} -
    - {% endif %} - {{- date_pattern|replace({ - '{{ year }}': '
    ' ~ form_widget(form.year) ~ '
    ', - '{{ month }}': '
    ' ~ form_widget(form.month) ~ '
    ', - '{{ day }}': '
    ' ~ form_widget(form.day) ~ '
    ', - })|raw -}} - {% if datetime is not defined or not datetime %} -
    - {% endif %} - {% endif %} -{%- endblock date_widget %} - -{% block time_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {% else %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} - {% if datetime is not defined or false == datetime %} -
    - {% endif %} - {% if with_seconds %} -
    {{ form_widget(form.hour) }}
    -
    -
    -
    - : -
    -
    - {{ form_widget(form.minute) }} -
    -
    -
    -
    -
    -
    - : -
    -
    - {{ form_widget(form.second) }} -
    -
    -
    - {% else %} -
    {{ form_widget(form.hour) }}
    -
    -
    -
    - : -
    -
    - {{ form_widget(form.minute) }} -
    -
    -
    - {% endif %} - {% if datetime is not defined or false == datetime %} -
    - {% endif %} - {% endif %} -{%- endblock time_widget %} - -{% block choice_widget_collapsed -%} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - - {% if multiple -%} - {% set attr = attr|merge({style: (attr.style|default('') ~ ' height: auto; background-image: none;')|trim}) %} - {% endif %} - - {% if required and placeholder is none and not placeholder_in_choices and not multiple -%} - {% set required = false %} - {%- endif -%} - -{%- endblock choice_widget_collapsed %} - -{% block choice_widget_expanded -%} - {% if '-inline' in label_attr.class|default('') %} -
      - {% for child in form %} -
    • {{ form_widget(child, { - parent_label_class: label_attr.class|default(''), - }) }}
    • - {% endfor %} -
    - {% else %} -
    - {% for child in form %} - {{ form_widget(child, { - parent_label_class: label_attr.class|default(''), - }) }} - {% endfor %} -
    - {% endif %} -{%- endblock choice_widget_expanded %} - -{% block checkbox_widget -%} - {% set parent_label_class = parent_label_class|default('') %} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {% if 'checkbox-inline' in parent_label_class %} - {{ form_label(form, null, { widget: parent() }) }} - {% else %} -
    - {{ form_label(form, null, { widget: parent() }) }} -
    - {% endif %} -{%- endblock checkbox_widget %} - -{% block radio_widget -%} - {% set parent_label_class = parent_label_class|default('') %} - {% if 'radio-inline' in parent_label_class %} - {{ form_label(form, null, { widget: parent() }) }} - {% else %} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} -
    - {{ form_label(form, null, { widget: parent() }) }} -
    - {% endif %} -{%- endblock radio_widget %} - -{# Labels #} - -{% block form_label -%} - {% if errors|length > 0 -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {{- parent() -}} -{%- endblock form_label %} - -{% block choice_label -%} - {% if errors|length > 0 -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} - {% set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) %} - {{- block('form_label') -}} -{%- endblock choice_label %} - -{% block checkbox_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock checkbox_label %} - -{% block radio_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock radio_label %} - -{% block checkbox_radio_label -%} - {% if required %} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %} - {% endif %} - {% if errors|length > 0 -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {% if label is empty %} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {% endif %} - - {{ widget|raw }} - {{ translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain) }} - -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{% block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - -
    - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    - -{%- endblock form_row %} - -{% block choice_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock choice_row %} - -{% block date_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock date_row %} - -{% block time_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock time_row %} - -{% block datetime_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock datetime_row %} - -{% block checkbox_row -%} - -
    - {{ form_widget(form) }} - {{- form_help(form) -}} - {{ form_errors(form) }} -
    - -{%- endblock checkbox_row %} - -{% block radio_row -%} - -
    - {{ form_widget(form) }} - {{- form_help(form) -}} - {{ form_errors(form) }} -
    - -{%- endblock radio_row %} - -{# Errors #} - -{% block form_errors -%} - {% if errors|length > 0 -%} - {% if form is not rootform %}{% else %}
    {% endif %} - {%- for error in errors -%} - {{ error.message }} - {% if not loop.last %}, {% endif %} - {%- endfor -%} - {% if form is not rootform %}{% else %}
    {% endif %} - {%- endif %} -{%- endblock form_errors %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/foundation_6_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/foundation_6_layout.html.twig deleted file mode 100644 index 04ed730f5..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/foundation_6_layout.html.twig +++ /dev/null @@ -1,50 +0,0 @@ -{% extends "form_div_layout.html.twig" %} - -{%- block checkbox_row -%} - {%- set parent_class = parent_class|default(attr.class|default('')) -%} - {%- if 'switch-input' in parent_class -%} - {{- form_label(form) -}} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' switch-input')|trim}) -%} - {{- form_widget(form) -}} - - {{- form_errors(form) -}} - {%- else -%} - {{- block('form_row') -}} - {%- endif -%} -{%- endblock checkbox_row -%} - -{% block money_widget -%} - {% set prepend = not (money_pattern starts with '{{') %} - {% set append = not (money_pattern ends with '}}') %} - {% if prepend or append %} -
    - {% if prepend %} - {{ money_pattern|form_encode_currency }} - {% endif %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' input-group-field')|trim}) %} - {{- block('form_widget_simple') -}} - {% if append %} - {{ money_pattern|form_encode_currency }} - {% endif %} -
    - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock money_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {% set attr = attr|merge({class: (attr.class|default('') ~ ' input-group-field')|trim}) %} - {{- block('form_widget_simple') -}} - {{ symbol|default('%') }} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block button_widget -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' button')|trim}) %} - {{- parent() -}} -{%- endblock button_widget %} diff --git a/lib/symfony/twig-bridge/Resources/views/Form/tailwind_2_layout.html.twig b/lib/symfony/twig-bridge/Resources/views/Form/tailwind_2_layout.html.twig deleted file mode 100644 index 7f31e70b7..000000000 --- a/lib/symfony/twig-bridge/Resources/views/Form/tailwind_2_layout.html.twig +++ /dev/null @@ -1,69 +0,0 @@ -{% use 'form_div_layout.html.twig' %} - -{%- block form_row -%} - {%- set row_attr = row_attr|merge({ class: row_attr.class|default(row_class|default('mb-6')) }) -%} - {{- parent() -}} -{%- endblock form_row -%} - -{%- block widget_attributes -%} - {%- set attr = attr|merge({ class: attr.class|default(widget_class|default('mt-1 w-full')) ~ (disabled ? ' ' ~ widget_disabled_class|default('border-gray-300 text-gray-500')) ~ (errors|length ? ' ' ~ widget_errors_class|default('border-red-700')) }) -%} - {{- parent() -}} -{%- endblock widget_attributes -%} - -{%- block form_label -%} - {%- set label_attr = label_attr|merge({ class: label_attr.class|default(label_class|default('block text-gray-800')) }) -%} - {{- parent() -}} -{%- endblock form_label -%} - -{%- block form_help -%} - {%- set help_attr = help_attr|merge({ class: help_attr.class|default(help_class|default('mt-1 text-gray-600')) }) -%} - {{- parent() -}} -{%- endblock form_help -%} - -{%- block form_errors -%} - {%- if errors|length > 0 -%} -
      - {%- for error in errors -%} -
    • {{ error.message }}
    • - {%- endfor -%} -
    - {%- endif -%} -{%- endblock form_errors -%} - -{%- block choice_widget_expanded -%} - {%- set attr = attr|merge({ class: attr.class|default('mt-2') }) -%} -
    - {%- for child in form %} -
    - {{- form_widget(child) -}} - {{- form_label(child, null, { translation_domain: choice_translation_domain }) -}} -
    - {% endfor -%} -
    -{%- endblock choice_widget_expanded -%} - -{%- block checkbox_row -%} - {%- set row_attr = row_attr|merge({ class: row_attr.class|default(row_class|default('mb-6')) }) -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_errors(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_label(form) -}} -
    - {{- form_help(form) -}} - -{%- endblock checkbox_row -%} - -{%- block checkbox_widget -%} - {%- set widget_class = widget_class|default('mr-2') -%} - {{- parent() -}} -{%- endblock checkbox_widget -%} - -{%- block radio_widget -%} - {%- set widget_class = widget_class|default('mr-2') -%} - {{- parent() -}} -{%- endblock radio_widget -%} diff --git a/lib/symfony/twig-bridge/TokenParser/DumpTokenParser.php b/lib/symfony/twig-bridge/TokenParser/DumpTokenParser.php deleted file mode 100644 index 341dc4185..000000000 --- a/lib/symfony/twig-bridge/TokenParser/DumpTokenParser.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\DumpNode; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'dump' tag. - * - * Dump variables with: - * - * {% dump %} - * {% dump foo %} - * {% dump foo, bar %} - * - * @author Julien Galenski - */ -final class DumpTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $values = null; - if (!$this->parser->getStream()->test(Token::BLOCK_END_TYPE)) { - $values = $this->parser->getExpressionParser()->parseMultitargetExpression(); - } - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new DumpNode($this->parser->getVarName(), $values, $token->getLine(), $this->getTag()); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'dump'; - } -} diff --git a/lib/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php b/lib/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php deleted file mode 100644 index ef5dacb59..000000000 --- a/lib/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\FormThemeNode; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'form_theme' tag. - * - * @author Fabien Potencier - */ -final class FormThemeTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - - $form = $this->parser->getExpressionParser()->parseExpression(); - $only = false; - - if ($this->parser->getStream()->test(Token::NAME_TYPE, 'with')) { - $this->parser->getStream()->next(); - $resources = $this->parser->getExpressionParser()->parseExpression(); - - if ($this->parser->getStream()->nextIf(Token::NAME_TYPE, 'only')) { - $only = true; - } - } else { - $resources = new ArrayExpression([], $stream->getCurrent()->getLine()); - do { - $resources->addElement($this->parser->getExpressionParser()->parseExpression()); - } while (!$stream->test(Token::BLOCK_END_TYPE)); - } - - $stream->expect(Token::BLOCK_END_TYPE); - - return new FormThemeNode($form, $resources, $lineno, $this->getTag(), $only); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'form_theme'; - } -} diff --git a/lib/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php b/lib/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php deleted file mode 100644 index a70e94b80..000000000 --- a/lib/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\StopwatchNode; -use Twig\Node\Expression\AssignNameExpression; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the stopwatch tag. - * - * @author Wouter J - */ -final class StopwatchTokenParser extends AbstractTokenParser -{ - protected $stopwatchIsAvailable; - - public function __construct(bool $stopwatchIsAvailable) - { - $this->stopwatchIsAvailable = $stopwatchIsAvailable; - } - - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - - // {% stopwatch 'bar' %} - $name = $this->parser->getExpressionParser()->parseExpression(); - - $stream->expect(Token::BLOCK_END_TYPE); - - // {% endstopwatch %} - $body = $this->parser->subparse([$this, 'decideStopwatchEnd'], true); - $stream->expect(Token::BLOCK_END_TYPE); - - if ($this->stopwatchIsAvailable) { - return new StopwatchNode($name, $body, new AssignNameExpression($this->parser->getVarName(), $token->getLine()), $lineno, $this->getTag()); - } - - return $body; - } - - public function decideStopwatchEnd(Token $token): bool - { - return $token->test('endstopwatch'); - } - - public function getTag(): string - { - return 'stopwatch'; - } -} diff --git a/lib/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php b/lib/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php deleted file mode 100644 index 19b820497..000000000 --- a/lib/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\TransDefaultDomainNode; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'trans_default_domain' tag. - * - * @author Fabien Potencier - */ -final class TransDefaultDomainTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $expr = $this->parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new TransDefaultDomainNode($expr, $token->getLine(), $this->getTag()); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'trans_default_domain'; - } -} diff --git a/lib/symfony/twig-bridge/TokenParser/TransTokenParser.php b/lib/symfony/twig-bridge/TokenParser/TransTokenParser.php deleted file mode 100644 index ffe882859..000000000 --- a/lib/symfony/twig-bridge/TokenParser/TransTokenParser.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\TransNode; -use Twig\Error\SyntaxError; -use Twig\Node\Expression\AbstractExpression; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Node; -use Twig\Node\TextNode; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'trans' tag. - * - * @author Fabien Potencier - */ -final class TransTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - - $count = null; - $vars = new ArrayExpression([], $lineno); - $domain = null; - $locale = null; - if (!$stream->test(Token::BLOCK_END_TYPE)) { - if ($stream->test('count')) { - // {% trans count 5 %} - $stream->next(); - $count = $this->parser->getExpressionParser()->parseExpression(); - } - - if ($stream->test('with')) { - // {% trans with vars %} - $stream->next(); - $vars = $this->parser->getExpressionParser()->parseExpression(); - } - - if ($stream->test('from')) { - // {% trans from "messages" %} - $stream->next(); - $domain = $this->parser->getExpressionParser()->parseExpression(); - } - - if ($stream->test('into')) { - // {% trans into "fr" %} - $stream->next(); - $locale = $this->parser->getExpressionParser()->parseExpression(); - } elseif (!$stream->test(Token::BLOCK_END_TYPE)) { - throw new SyntaxError('Unexpected token. Twig was looking for the "with", "from", or "into" keyword.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - - // {% trans %}message{% endtrans %} - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideTransFork'], true); - - if (!$body instanceof TextNode && !$body instanceof AbstractExpression) { - throw new SyntaxError('A message inside a trans tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()); - } - - $stream->expect(Token::BLOCK_END_TYPE); - - return new TransNode($body, $domain, $count, $vars, $locale, $lineno, $this->getTag()); - } - - public function decideTransFork(Token $token): bool - { - return $token->test(['endtrans']); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'trans'; - } -} diff --git a/lib/symfony/twig-bridge/Translation/TwigExtractor.php b/lib/symfony/twig-bridge/Translation/TwigExtractor.php deleted file mode 100644 index e79ec697e..000000000 --- a/lib/symfony/twig-bridge/Translation/TwigExtractor.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Translation; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\Translation\Extractor\AbstractFileExtractor; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\MessageCatalogue; -use Twig\Environment; -use Twig\Error\Error; -use Twig\Source; - -/** - * TwigExtractor extracts translation messages from a twig template. - * - * @author Michel Salib - * @author Fabien Potencier - */ -class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface -{ - /** - * Default domain for found messages. - * - * @var string - */ - private $defaultDomain = 'messages'; - - /** - * Prefix for found message. - * - * @var string - */ - private $prefix = ''; - - private $twig; - - public function __construct(Environment $twig) - { - $this->twig = $twig; - } - - /** - * {@inheritdoc} - */ - public function extract($resource, MessageCatalogue $catalogue) - { - foreach ($this->extractFiles($resource) as $file) { - try { - $this->extractTemplate(file_get_contents($file->getPathname()), $catalogue); - } catch (Error $e) { - // ignore errors, these should be fixed by using the linter - } - } - } - - /** - * {@inheritdoc} - */ - public function setPrefix(string $prefix) - { - $this->prefix = $prefix; - } - - protected function extractTemplate(string $template, MessageCatalogue $catalogue) - { - $visitor = $this->twig->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->getTranslationNodeVisitor(); - $visitor->enable(); - - $this->twig->parse($this->twig->tokenize(new Source($template, ''))); - - foreach ($visitor->getMessages() as $message) { - $catalogue->set(trim($message[0]), $this->prefix.trim($message[0]), $message[1] ?: $this->defaultDomain); - } - - $visitor->disable(); - } - - /** - * @return bool - */ - protected function canBeExtracted(string $file) - { - return $this->isFile($file) && 'twig' === pathinfo($file, \PATHINFO_EXTENSION); - } - - /** - * {@inheritdoc} - */ - protected function extractFromDirectory($directory) - { - $finder = new Finder(); - - return $finder->files()->name('*.twig')->in($directory); - } -} diff --git a/lib/symfony/twig-bridge/UndefinedCallableHandler.php b/lib/symfony/twig-bridge/UndefinedCallableHandler.php deleted file mode 100644 index 608bbaa8e..000000000 --- a/lib/symfony/twig-bridge/UndefinedCallableHandler.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig; - -use Symfony\Bundle\FullStack; -use Twig\Error\SyntaxError; -use Twig\TwigFilter; -use Twig\TwigFunction; - -/** - * @internal - */ -class UndefinedCallableHandler -{ - private const FILTER_COMPONENTS = [ - 'humanize' => 'form', - 'trans' => 'translation', - 'yaml_encode' => 'yaml', - 'yaml_dump' => 'yaml', - ]; - - private const FUNCTION_COMPONENTS = [ - 'asset' => 'asset', - 'asset_version' => 'asset', - 'dump' => 'debug-bundle', - 'encore_entry_link_tags' => 'webpack-encore-bundle', - 'encore_entry_script_tags' => 'webpack-encore-bundle', - 'expression' => 'expression-language', - 'form_widget' => 'form', - 'form_errors' => 'form', - 'form_label' => 'form', - 'form_help' => 'form', - 'form_row' => 'form', - 'form_rest' => 'form', - 'form' => 'form', - 'form_start' => 'form', - 'form_end' => 'form', - 'csrf_token' => 'form', - 'logout_url' => 'security-http', - 'logout_path' => 'security-http', - 'is_granted' => 'security-core', - 'link' => 'web-link', - 'preload' => 'web-link', - 'dns_prefetch' => 'web-link', - 'preconnect' => 'web-link', - 'prefetch' => 'web-link', - 'prerender' => 'web-link', - 'workflow_can' => 'workflow', - 'workflow_transitions' => 'workflow', - 'workflow_has_marked_place' => 'workflow', - 'workflow_marked_places' => 'workflow', - ]; - - private const FULL_STACK_ENABLE = [ - 'form' => 'enable "framework.form"', - 'security-core' => 'add the "SecurityBundle"', - 'security-http' => 'add the "SecurityBundle"', - 'web-link' => 'enable "framework.web_link"', - 'workflow' => 'enable "framework.workflows"', - ]; - - /** - * @return TwigFilter|false - */ - public static function onUndefinedFilter(string $name) - { - if (!isset(self::FILTER_COMPONENTS[$name])) { - return false; - } - - throw new SyntaxError(self::onUndefined($name, 'filter', self::FILTER_COMPONENTS[$name])); - } - - /** - * @return TwigFunction|false - */ - public static function onUndefinedFunction(string $name) - { - if (!isset(self::FUNCTION_COMPONENTS[$name])) { - return false; - } - - if ('webpack-encore-bundle' === self::FUNCTION_COMPONENTS[$name]) { - return new TwigFunction($name, static function () { return ''; }); - } - - throw new SyntaxError(self::onUndefined($name, 'function', self::FUNCTION_COMPONENTS[$name])); - } - - private static function onUndefined(string $name, string $type, string $component): string - { - if (class_exists(FullStack::class) && isset(self::FULL_STACK_ENABLE[$component])) { - return sprintf('Did you forget to %s? Unknown %s "%s".', self::FULL_STACK_ENABLE[$component], $type, $name); - } - - return sprintf('Did you forget to run "composer require symfony/%s"? Unknown %s "%s".', $component, $type, $name); - } -} diff --git a/lib/symfony/twig-bridge/composer.json b/lib/symfony/twig-bridge/composer.json deleted file mode 100644 index 63b072605..000000000 --- a/lib/symfony/twig-bridge/composer.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "symfony/twig-bridge", - "type": "symfony-bridge", - "description": "Provides integration for Twig with various Symfony components", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" - }, - "require-dev": { - "doctrine/annotations": "^1.12", - "egulias/email-validator": "^2.1.10|^3", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^5.3|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/mime": "^5.2|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/security-acl": "^2.8|^3.0", - "symfony/security-core": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/security-http": "^4.4|^5.0|^6.0", - "symfony/serializer": "^5.2|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/console": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/workflow": "^5.2|^6.0", - "twig/cssinliner-extra": "^2.12|^3", - "twig/inky-extra": "^2.12|^3", - "twig/markdown-extra": "^2.12|^3" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/console": "<5.3", - "symfony/form": "<5.3", - "symfony/http-foundation": "<5.3", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<5.2", - "symfony/workflow": "<5.2" - }, - "suggest": { - "symfony/finder": "", - "symfony/asset": "For using the AssetExtension", - "symfony/form": "For using the FormExtension", - "symfony/http-kernel": "For using the HttpKernelExtension", - "symfony/routing": "For using the RoutingExtension", - "symfony/translation": "For using the TranslationExtension", - "symfony/yaml": "For using the YamlExtension", - "symfony/security-core": "For using the SecurityExtension", - "symfony/security-csrf": "For using the CsrfExtension", - "symfony/security-http": "For using the LogoutUrlExtension", - "symfony/stopwatch": "For using the StopwatchExtension", - "symfony/var-dumper": "For using the DumpExtension", - "symfony/expression-language": "For using the ExpressionExtension", - "symfony/web-link": "For using the WebLinkExtension" - }, - "autoload": { - "psr-4": { "Symfony\\Bridge\\Twig\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/twig-bundle/CHANGELOG.md b/lib/symfony/twig-bundle/CHANGELOG.md deleted file mode 100644 index 83a6cccf9..000000000 --- a/lib/symfony/twig-bundle/CHANGELOG.md +++ /dev/null @@ -1,94 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - - * Add support for the new `serialize` filter (from Twig Bridge) - -5.2.0 ------ - - * deprecated the public `twig` service to private - -5.0.0 ------ - - * updated default value for the `strict_variables` option to `%kernel.debug%` parameter - * removed support to load templates from the legacy directories `src/Resources/views/` and `src/Resources//views/` - * removed `TwigEngine` class, use `Twig\Environment` instead - * removed `FilesystemLoader` and `NativeFilesystemLoader`, use Twig notation for templates instead - * removed `twig.exception_controller` configuration option, use `framework.error_controller` option instead - * removed `ExceptionController`, `PreviewErrorController` and all built-in error templates in favor of the new error renderer mechanism - -4.4.0 ------ - - * marked the `TemplateIterator` as `internal` - * added HTML comment to beginning and end of `exception_full.html.twig` - * deprecated `ExceptionController` and `PreviewErrorController` controllers, use `ErrorController` from the `HttpKernel` component instead - * deprecated all built-in error templates in favor of the new error renderer mechanism - * deprecated `twig.exception_controller` configuration option, set it to "null" and use `framework.error_controller` configuration instead - -4.2.0 ------ - - * deprecated support for legacy templates directories `src/Resources/views/` and `src/Resources//views/`, use `templates/` and `templates/bundles//` instead. - -4.1.0 ------ - - * added priority to Twig extensions - * deprecated relying on the default value (`false`) of the `twig.strict_variables` configuration option. The `%kernel.debug%` parameter will be the new default in 5.0 - -4.0.0 ------ - - * removed `ContainerAwareRuntimeLoader` - -3.4.0 ------ - - * added exclusive Twig namespace only for root bundles - * deprecated `Symfony\Bundle\TwigBundle\Command\DebugCommand`, use `Symfony\Bridge\Twig\Command\DebugCommand` instead - * deprecated relying on the `ContainerAwareInterface` implementation for `Symfony\Bundle\TwigBundle\Command\LintCommand` - * added option to configure default path templates (via `default_path`) - -3.3.0 ------ - - * Deprecated `ContainerAwareRuntimeLoader` - -2.7.0 ------ - - * made it possible to configure the default formats for both the `date` and the `number_format` filter - * added support for the new Asset component (from Twig bridge) - * deprecated the assets extension (use the one from the Twig bridge instead) - -2.6.0 ------ - - * [BC BREAK] changed exception.json.twig to match same structure as error.json.twig making clients independent of runtime environment. - -2.3.0 ------ - - * added option to configure a custom template escaping guesser (via `autoescape_service` and `autoescape_service_method`) - -2.2.0 ------ - - * moved the exception controller to be a service (`twig.controller.exception:showAction` vs `Symfony\\Bundle\\TwigBundle\\Controller\\ExceptionController::showAction`) - * added support for multiple loaders via the "twig.loader" tag. - * added automatic registration of namespaced paths for registered bundles - * added support for namespaced paths - -2.1.0 ------ - - * added a new setting ("paths") to configure more paths for the Twig filesystem loader - * added contextual escaping based on the template file name (disabled if you explicitly pass an autoescape option) - * added a command that extracts translation messages from templates - * added the real template name when an error occurs in a Twig template - * added the twig:lint command that will validate a Twig template syntax. diff --git a/lib/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php b/lib/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php deleted file mode 100644 index 4a15dcf2f..000000000 --- a/lib/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\CacheWarmer; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Twig\Environment; -use Twig\Error\Error; - -/** - * Generates the Twig cache for all templates. - * - * @author Fabien Potencier - */ -class TemplateCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface -{ - private $container; - private $twig; - private $iterator; - - public function __construct(ContainerInterface $container, iterable $iterator) - { - // As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected. - $this->container = $container; - $this->iterator = $iterator; - } - - /** - * {@inheritdoc} - * - * @return string[] A list of template files to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir) - { - if (null === $this->twig) { - $this->twig = $this->container->get('twig'); - } - - $files = []; - - foreach ($this->iterator as $template) { - try { - $template = $this->twig->load($template); - - if (\is_callable([$template, 'unwrap'])) { - $files[] = (new \ReflectionClass($template->unwrap()))->getFileName(); - } - } catch (Error $e) { - /* - * Problem during compilation, give up for this template (e.g. syntax errors). - * Failing silently here allows to ignore templates that rely on functions that aren't available in - * the current environment. For example, the WebProfilerBundle shouldn't be available in the prod - * environment, but some templates that are never used in prod might rely on functions the bundle provides. - * As we can't detect which templates are "really" important, we try to load all of them and ignore - * errors. Error checks may be performed by calling the lint:twig command. - */ - } - } - - return $files; - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices() - { - return [ - 'twig' => Environment::class, - ]; - } -} diff --git a/lib/symfony/twig-bundle/Command/LintCommand.php b/lib/symfony/twig-bundle/Command/LintCommand.php deleted file mode 100644 index a0a52e28a..000000000 --- a/lib/symfony/twig-bundle/Command/LintCommand.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\Command; - -use Symfony\Bridge\Twig\Command\LintCommand as BaseLintCommand; -use Symfony\Component\Finder\Finder; - -/** - * Command that will validate your template syntax and output encountered errors. - * - * @author Marc Weistroff - * @author Jérôme Tamarelle - */ -final class LintCommand extends BaseLintCommand -{ - protected static $defaultName = 'lint:twig'; - protected static $defaultDescription = 'Lint a Twig template and outputs encountered errors'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - parent::configure(); - - $this - ->setHelp( - $this->getHelp().<<<'EOF' - -Or all template files in a bundle: - - php %command.full_name% @AcmeDemoBundle - -EOF - ) - ; - } - - protected function findFiles(string $filename): iterable - { - if (str_starts_with($filename, '@')) { - $dir = $this->getApplication()->getKernel()->locateResource($filename); - - return Finder::create()->files()->in($dir)->name('*.twig'); - } - - return parent::findFiles($filename); - } -} diff --git a/lib/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php b/lib/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php deleted file mode 100644 index 12724e0f1..000000000 --- a/lib/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\Asset\Packages; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Workflow\Workflow; -use Symfony\Component\Yaml\Yaml; - -/** - * @author Jean-François Simon - */ -class ExtensionPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!class_exists(Packages::class)) { - $container->removeDefinition('twig.extension.assets'); - } - - if (!class_exists(Expression::class)) { - $container->removeDefinition('twig.extension.expression'); - } - - if (!interface_exists(UrlGeneratorInterface::class)) { - $container->removeDefinition('twig.extension.routing'); - } - - if (!class_exists(Yaml::class)) { - $container->removeDefinition('twig.extension.yaml'); - } - - $viewDir = \dirname((new \ReflectionClass(\Symfony\Bridge\Twig\Extension\FormExtension::class))->getFileName(), 2).'/Resources/views'; - $templateIterator = $container->getDefinition('twig.template_iterator'); - $templatePaths = $templateIterator->getArgument(1); - $loader = $container->getDefinition('twig.loader.native_filesystem'); - - if ($container->has('mailer')) { - $emailPath = $viewDir.'/Email'; - $loader->addMethodCall('addPath', [$emailPath, 'email']); - $loader->addMethodCall('addPath', [$emailPath, '!email']); - $templatePaths[$emailPath] = 'email'; - } - - if ($container->has('form.extension')) { - $container->getDefinition('twig.extension.form')->addTag('twig.extension'); - - $coreThemePath = $viewDir.'/Form'; - $loader->addMethodCall('addPath', [$coreThemePath]); - $templatePaths[$coreThemePath] = null; - } - - $templateIterator->replaceArgument(1, $templatePaths); - - if ($container->has('router')) { - $container->getDefinition('twig.extension.routing')->addTag('twig.extension'); - } - - if ($container->has('fragment.handler')) { - $container->getDefinition('twig.extension.httpkernel')->addTag('twig.extension'); - $container->getDefinition('twig.runtime.httpkernel')->addTag('twig.runtime'); - - if ($container->hasDefinition('fragment.renderer.hinclude')) { - $container->getDefinition('fragment.renderer.hinclude') - ->addTag('kernel.fragment_renderer', ['alias' => 'hinclude']) - ; - } - } - - if ($container->has('request_stack')) { - $container->getDefinition('twig.extension.httpfoundation')->addTag('twig.extension'); - } - - if ($container->getParameter('kernel.debug')) { - $container->getDefinition('twig.extension.profiler')->addTag('twig.extension'); - - // only register if the improved version from DebugBundle is *not* present - if (!$container->has('twig.extension.dump')) { - $container->getDefinition('twig.extension.debug')->addTag('twig.extension'); - } - } - - if ($container->has('web_link.add_link_header_listener')) { - $container->getDefinition('twig.extension.weblink')->addTag('twig.extension'); - } - - $container->setAlias('twig.loader.filesystem', new Alias('twig.loader.native_filesystem', false)); - - if ($container->has('assets.packages')) { - $container->getDefinition('twig.extension.assets')->addTag('twig.extension'); - } - - if ($container->hasDefinition('twig.extension.yaml')) { - $container->getDefinition('twig.extension.yaml')->addTag('twig.extension'); - } - - if (class_exists(\Symfony\Component\Stopwatch\Stopwatch::class)) { - $container->getDefinition('twig.extension.debug.stopwatch')->addTag('twig.extension'); - } - - if ($container->hasDefinition('twig.extension.expression')) { - $container->getDefinition('twig.extension.expression')->addTag('twig.extension'); - } - - if (!class_exists(Workflow::class) || !$container->has('workflow.registry')) { - $container->removeDefinition('workflow.twig_extension'); - } else { - $container->getDefinition('workflow.twig_extension')->addTag('twig.extension'); - } - - if ($container->has('serializer')) { - $container->getDefinition('twig.runtime.serializer')->addTag('twig.runtime'); - $container->getDefinition('twig.extension.serializer')->addTag('twig.extension'); - } - } -} diff --git a/lib/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php b/lib/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php deleted file mode 100644 index 82cf1c145..000000000 --- a/lib/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Registers Twig runtime services. - */ -class RuntimeLoaderPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('twig.runtime_loader')) { - return; - } - - $definition = $container->getDefinition('twig.runtime_loader'); - $mapping = []; - foreach ($container->findTaggedServiceIds('twig.runtime', true) as $id => $attributes) { - $def = $container->getDefinition($id); - $mapping[$def->getClass()] = new Reference($id); - } - - $definition->replaceArgument(0, ServiceLocatorTagPass::register($container, $mapping)); - } -} diff --git a/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php b/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php deleted file mode 100644 index 45413dc93..000000000 --- a/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Adds tagged twig.extension services to twig service. - * - * @author Fabien Potencier - */ -class TwigEnvironmentPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition('twig')) { - return; - } - - $definition = $container->getDefinition('twig'); - - // Extensions must always be registered before everything else. - // For instance, global variable definitions must be registered - // afterward. If not, the globals from the extensions will never - // be registered. - $currentMethodCalls = $definition->getMethodCalls(); - $twigBridgeExtensionsMethodCalls = []; - $othersExtensionsMethodCalls = []; - foreach ($this->findAndSortTaggedServices('twig.extension', $container) as $extension) { - $methodCall = ['addExtension', [$extension]]; - $extensionClass = $container->getDefinition((string) $extension)->getClass(); - - if (\is_string($extensionClass) && str_starts_with($extensionClass, 'Symfony\Bridge\Twig\Extension')) { - $twigBridgeExtensionsMethodCalls[] = $methodCall; - } else { - $othersExtensionsMethodCalls[] = $methodCall; - } - } - - if (!empty($twigBridgeExtensionsMethodCalls) || !empty($othersExtensionsMethodCalls)) { - $definition->setMethodCalls(array_merge($twigBridgeExtensionsMethodCalls, $othersExtensionsMethodCalls, $currentMethodCalls)); - } - } -} diff --git a/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php b/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php deleted file mode 100644 index a422f6682..000000000 --- a/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds services tagged twig.loader as Twig loaders. - * - * @author Daniel Leech - */ -class TwigLoaderPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition('twig')) { - return; - } - - $prioritizedLoaders = []; - $found = 0; - - foreach ($container->findTaggedServiceIds('twig.loader', true) as $id => $attributes) { - $priority = $attributes[0]['priority'] ?? 0; - $prioritizedLoaders[$priority][] = $id; - ++$found; - } - - if (!$found) { - throw new LogicException('No twig loaders found. You need to tag at least one loader with "twig.loader".'); - } - - if (1 === $found) { - $container->setAlias('twig.loader', $id); - } else { - $chainLoader = $container->getDefinition('twig.loader.chain'); - krsort($prioritizedLoaders); - - foreach ($prioritizedLoaders as $loaders) { - foreach ($loaders as $loader) { - $chainLoader->addMethodCall('addLoader', [new Reference($loader)]); - } - } - - $container->setAlias('twig.loader', 'twig.loader.chain'); - } - } -} diff --git a/lib/symfony/twig-bundle/DependencyInjection/Configuration.php b/lib/symfony/twig-bundle/DependencyInjection/Configuration.php deleted file mode 100644 index 76faa0107..000000000 --- a/lib/symfony/twig-bundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection; - -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * TwigExtension configuration structure. - * - * @author Jeremy Mikola - */ -class Configuration implements ConfigurationInterface -{ - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder('twig'); - $rootNode = $treeBuilder->getRootNode(); - - $rootNode->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && \array_key_exists('exception_controller', $v); }) - ->then(function ($v) { - if (isset($v['exception_controller'])) { - throw new InvalidConfigurationException('Option "exception_controller" under "twig" must be null or unset, use "error_controller" under "framework" instead.'); - } - - unset($v['exception_controller']); - - return $v; - }) - ->end(); - - $this->addFormThemesSection($rootNode); - $this->addGlobalsSection($rootNode); - $this->addTwigOptions($rootNode); - $this->addTwigFormatOptions($rootNode); - - return $treeBuilder; - } - - private function addFormThemesSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('form_theme') - ->children() - ->arrayNode('form_themes') - ->addDefaultChildrenIfNoneSet() - ->prototype('scalar')->defaultValue('form_div_layout.html.twig')->end() - ->example(['@My/form.html.twig']) - ->validate() - ->ifTrue(function ($v) { return !\in_array('form_div_layout.html.twig', $v); }) - ->then(function ($v) { - return array_merge(['form_div_layout.html.twig'], $v); - }) - ->end() - ->end() - ->end() - ; - } - - private function addGlobalsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('global') - ->children() - ->arrayNode('globals') - ->normalizeKeys(false) - ->useAttributeAsKey('key') - ->example(['foo' => '@bar', 'pi' => 3.14]) - ->prototype('array') - ->normalizeKeys(false) - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_string($v) && str_starts_with($v, '@'); }) - ->then(function ($v) { - if (str_starts_with($v, '@@')) { - return substr($v, 1); - } - - return ['id' => substr($v, 1), 'type' => 'service']; - }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { - if (\is_array($v)) { - $keys = array_keys($v); - sort($keys); - - return $keys !== ['id', 'type'] && $keys !== ['value']; - } - - return true; - }) - ->then(function ($v) { return ['value' => $v]; }) - ->end() - ->children() - ->scalarNode('id')->end() - ->scalarNode('type') - ->validate() - ->ifNotInArray(['service']) - ->thenInvalid('The %s type is not supported') - ->end() - ->end() - ->variableNode('value')->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addTwigOptions(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('path') - ->children() - ->variableNode('autoescape')->defaultValue('name')->end() - ->scalarNode('autoescape_service')->defaultNull()->end() - ->scalarNode('autoescape_service_method')->defaultNull()->end() - ->scalarNode('base_template_class')->example('Twig\Template')->cannotBeEmpty()->end() - ->scalarNode('cache')->defaultValue('%kernel.cache_dir%/twig')->end() - ->scalarNode('charset')->defaultValue('%kernel.charset%')->end() - ->booleanNode('debug')->defaultValue('%kernel.debug%')->end() - ->booleanNode('strict_variables')->defaultValue('%kernel.debug%')->end() - ->scalarNode('auto_reload')->end() - ->integerNode('optimizations')->min(-1)->end() - ->scalarNode('default_path') - ->info('The default path used to load templates') - ->defaultValue('%kernel.project_dir%/templates') - ->end() - ->arrayNode('paths') - ->normalizeKeys(false) - ->useAttributeAsKey('paths') - ->beforeNormalization() - ->always() - ->then(function ($paths) { - $normalized = []; - foreach ($paths as $path => $namespace) { - if (\is_array($namespace)) { - // xml - $path = $namespace['value']; - $namespace = $namespace['namespace']; - } - - // path within the default namespace - if (ctype_digit((string) $path)) { - $path = $namespace; - $namespace = null; - } - - $normalized[$path] = $namespace; - } - - return $normalized; - }) - ->end() - ->prototype('variable')->end() - ->end() - ->end() - ; - } - - private function addTwigFormatOptions(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('date') - ->info('The default format options used by the date filter') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('format')->defaultValue('F j, Y H:i')->end() - ->scalarNode('interval_format')->defaultValue('%d days')->end() - ->scalarNode('timezone') - ->info('The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used') - ->defaultNull() - ->end() - ->end() - ->end() - ->arrayNode('number_format') - ->info('The default format options for the number_format filter') - ->addDefaultsIfNotSet() - ->children() - ->integerNode('decimals')->defaultValue(0)->end() - ->scalarNode('decimal_point')->defaultValue('.')->end() - ->scalarNode('thousands_separator')->defaultValue(',')->end() - ->end() - ->end() - ->end() - ; - } -} diff --git a/lib/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php b/lib/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php deleted file mode 100644 index 07ec69176..000000000 --- a/lib/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Configurator; - -use Symfony\Bridge\Twig\UndefinedCallableHandler; -use Twig\Environment; - -// BC/FC with namespaced Twig -class_exists(Environment::class); - -/** - * Twig environment configurator. - * - * @author Christian Flothmann - */ -class EnvironmentConfigurator -{ - private $dateFormat; - private $intervalFormat; - private $timezone; - private $decimals; - private $decimalPoint; - private $thousandsSeparator; - - public function __construct(string $dateFormat, string $intervalFormat, ?string $timezone, int $decimals, string $decimalPoint, string $thousandsSeparator) - { - $this->dateFormat = $dateFormat; - $this->intervalFormat = $intervalFormat; - $this->timezone = $timezone; - $this->decimals = $decimals; - $this->decimalPoint = $decimalPoint; - $this->thousandsSeparator = $thousandsSeparator; - } - - public function configure(Environment $environment) - { - $environment->getExtension('Twig\Extension\CoreExtension')->setDateFormat($this->dateFormat, $this->intervalFormat); - - if (null !== $this->timezone) { - $environment->getExtension('Twig\Extension\CoreExtension')->setTimezone($this->timezone); - } - - $environment->getExtension('Twig\Extension\CoreExtension')->setNumberFormat($this->decimals, $this->decimalPoint, $this->thousandsSeparator); - - // wrap UndefinedCallableHandler in closures for lazy-autoloading - $environment->registerUndefinedFilterCallback(function ($name) { return UndefinedCallableHandler::onUndefinedFilter($name); }); - $environment->registerUndefinedFunctionCallback(function ($name) { return UndefinedCallableHandler::onUndefinedFunction($name); }); - } -} diff --git a/lib/symfony/twig-bundle/DependencyInjection/TwigExtension.php b/lib/symfony/twig-bundle/DependencyInjection/TwigExtension.php deleted file mode 100644 index 4cec78064..000000000 --- a/lib/symfony/twig-bundle/DependencyInjection/TwigExtension.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection; - -use Composer\InstalledVersions; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Console\Application; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Form\AbstractRendererEngine; -use Symfony\Component\Form\Form; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Translation\Translator; -use Symfony\Contracts\Service\ResetInterface; -use Twig\Extension\ExtensionInterface; -use Twig\Extension\RuntimeExtensionInterface; -use Twig\Loader\LoaderInterface; - -/** - * TwigExtension. - * - * @author Fabien Potencier - * @author Jeremy Mikola - */ -class TwigExtension extends Extension -{ - public function load(array $configs, ContainerBuilder $container) - { - if (!class_exists(InstalledVersions::class)) { - trigger_deprecation('symfony/twig-bundle', '5.4', 'Configuring Symfony without the Composer Runtime API is deprecated. Consider upgrading to Composer 2.1 or later.'); - } - - $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - $loader->load('twig.php'); - - if ($container::willBeAvailable('symfony/form', Form::class, ['symfony/twig-bundle'], true)) { - $loader->load('form.php'); - - if (is_subclass_of(AbstractRendererEngine::class, ResetInterface::class)) { - $container->getDefinition('twig.form.engine')->addTag('kernel.reset', [ - 'method' => 'reset', - ]); - } - } - - if ($container::willBeAvailable('symfony/console', Application::class, ['symfony/twig-bundle'], true)) { - $loader->load('console.php'); - } - - if ($container::willBeAvailable('symfony/mailer', Mailer::class, ['symfony/twig-bundle'], true)) { - $loader->load('mailer.php'); - } - - if (!$container::willBeAvailable('symfony/translation', Translator::class, ['symfony/twig-bundle'], true)) { - $container->removeDefinition('twig.translation.extractor'); - } - - foreach ($configs as $key => $config) { - if (isset($config['globals'])) { - foreach ($config['globals'] as $name => $value) { - if (\is_array($value) && isset($value['key'])) { - $configs[$key]['globals'][$name] = [ - 'key' => $name, - 'value' => $value, - ]; - } - } - } - } - - $configuration = $this->getConfiguration($configs, $container); - - $config = $this->processConfiguration($configuration, $configs); - - $container->setParameter('twig.form.resources', $config['form_themes']); - $container->setParameter('twig.default_path', $config['default_path']); - $defaultTwigPath = $container->getParameterBag()->resolveValue($config['default_path']); - - $envConfiguratorDefinition = $container->getDefinition('twig.configurator.environment'); - $envConfiguratorDefinition->replaceArgument(0, $config['date']['format']); - $envConfiguratorDefinition->replaceArgument(1, $config['date']['interval_format']); - $envConfiguratorDefinition->replaceArgument(2, $config['date']['timezone']); - $envConfiguratorDefinition->replaceArgument(3, $config['number_format']['decimals']); - $envConfiguratorDefinition->replaceArgument(4, $config['number_format']['decimal_point']); - $envConfiguratorDefinition->replaceArgument(5, $config['number_format']['thousands_separator']); - - $twigFilesystemLoaderDefinition = $container->getDefinition('twig.loader.native_filesystem'); - - // register user-configured paths - foreach ($config['paths'] as $path => $namespace) { - if (!$namespace) { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path]); - } else { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path, $namespace]); - } - } - - // paths are modified in ExtensionPass if forms are enabled - $container->getDefinition('twig.template_iterator')->replaceArgument(1, $config['paths']); - - foreach ($this->getBundleTemplatePaths($container, $config) as $name => $paths) { - $namespace = $this->normalizeBundleName($name); - foreach ($paths as $path) { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path, $namespace]); - } - - if ($paths) { - // the last path must be the bundle views directory - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path, '!'.$namespace]); - } - } - - if (file_exists($defaultTwigPath)) { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$defaultTwigPath]); - } - $container->addResource(new FileExistenceResource($defaultTwigPath)); - - if (!empty($config['globals'])) { - $def = $container->getDefinition('twig'); - foreach ($config['globals'] as $key => $global) { - if (isset($global['type']) && 'service' === $global['type']) { - $def->addMethodCall('addGlobal', [$key, new Reference($global['id'])]); - } else { - $def->addMethodCall('addGlobal', [$key, $global['value']]); - } - } - } - - if (isset($config['autoescape_service']) && isset($config['autoescape_service_method'])) { - $config['autoescape'] = [new Reference($config['autoescape_service']), $config['autoescape_service_method']]; - } - - $container->getDefinition('twig')->replaceArgument(1, array_intersect_key($config, [ - 'debug' => true, - 'charset' => true, - 'base_template_class' => true, - 'strict_variables' => true, - 'autoescape' => true, - 'cache' => true, - 'auto_reload' => true, - 'optimizations' => true, - ])); - - $container->registerForAutoconfiguration(\Twig_ExtensionInterface::class)->addTag('twig.extension'); - $container->registerForAutoconfiguration(\Twig_LoaderInterface::class)->addTag('twig.loader'); - $container->registerForAutoconfiguration(ExtensionInterface::class)->addTag('twig.extension'); - $container->registerForAutoconfiguration(LoaderInterface::class)->addTag('twig.loader'); - $container->registerForAutoconfiguration(RuntimeExtensionInterface::class)->addTag('twig.runtime'); - - if (false === $config['cache']) { - $container->removeDefinition('twig.template_cache_warmer'); - } - } - - private function getBundleTemplatePaths(ContainerBuilder $container, array $config): array - { - $bundleHierarchy = []; - foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { - $defaultOverrideBundlePath = $container->getParameterBag()->resolveValue($config['default_path']).'/bundles/'.$name; - - if (file_exists($defaultOverrideBundlePath)) { - $bundleHierarchy[$name][] = $defaultOverrideBundlePath; - } - $container->addResource(new FileExistenceResource($defaultOverrideBundlePath)); - - if (file_exists($dir = $bundle['path'].'/Resources/views') || file_exists($dir = $bundle['path'].'/templates')) { - $bundleHierarchy[$name][] = $dir; - } - $container->addResource(new FileExistenceResource($dir)); - } - - return $bundleHierarchy; - } - - private function normalizeBundleName(string $name): string - { - if (str_ends_with($name, 'Bundle')) { - $name = substr($name, 0, -6); - } - - return $name; - } - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return __DIR__.'/../Resources/config/schema'; - } - - public function getNamespace() - { - return 'http://symfony.com/schema/dic/twig'; - } -} diff --git a/lib/symfony/twig-bundle/LICENSE b/lib/symfony/twig-bundle/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/twig-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/twig-bundle/README.md b/lib/symfony/twig-bundle/README.md deleted file mode 100644 index 3ae2985ba..000000000 --- a/lib/symfony/twig-bundle/README.md +++ /dev/null @@ -1,13 +0,0 @@ -TwigBundle -========== - -TwigBundle provides a tight integration of Twig into the Symfony full-stack -framework. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/twig-bundle/Resources/config/console.php b/lib/symfony/twig-bundle/Resources/config/console.php deleted file mode 100644 index 0dc7ebdb7..000000000 --- a/lib/symfony/twig-bundle/Resources/config/console.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Command\DebugCommand; -use Symfony\Bundle\TwigBundle\Command\LintCommand; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig.command.debug', DebugCommand::class) - ->args([ - service('twig'), - param('kernel.project_dir'), - param('kernel.bundles_metadata'), - param('twig.default_path'), - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('twig.command.lint', LintCommand::class) - ->args([service('twig')]) - ->tag('console.command') - ; -}; diff --git a/lib/symfony/twig-bundle/Resources/config/form.php b/lib/symfony/twig-bundle/Resources/config/form.php deleted file mode 100644 index 9f2efdf94..000000000 --- a/lib/symfony/twig-bundle/Resources/config/form.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Extension\FormExtension; -use Symfony\Bridge\Twig\Form\TwigRendererEngine; -use Symfony\Component\Form\FormRenderer; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig.extension.form', FormExtension::class) - ->args([service('translator')->nullOnInvalid()]) - - ->set('twig.form.engine', TwigRendererEngine::class) - ->args([param('twig.form.resources'), service('twig')]) - - ->set('twig.form.renderer', FormRenderer::class) - ->args([service('twig.form.engine'), service('security.csrf.token_manager')->nullOnInvalid()]) - ->tag('twig.runtime') - ; -}; diff --git a/lib/symfony/twig-bundle/Resources/config/mailer.php b/lib/symfony/twig-bundle/Resources/config/mailer.php deleted file mode 100644 index 1444481f2..000000000 --- a/lib/symfony/twig-bundle/Resources/config/mailer.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Mime\BodyRenderer; -use Symfony\Component\Mailer\EventListener\MessageListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig.mailer.message_listener', MessageListener::class) - ->args([null, service('twig.mime_body_renderer')]) - ->tag('kernel.event_subscriber') - - ->set('twig.mime_body_renderer', BodyRenderer::class) - ->args([service('twig')]) - ; -}; diff --git a/lib/symfony/twig-bundle/Resources/config/schema/twig-1.0.xsd b/lib/symfony/twig-bundle/Resources/config/schema/twig-1.0.xsd deleted file mode 100644 index 429c91db6..000000000 --- a/lib/symfony/twig-bundle/Resources/config/schema/twig-1.0.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/symfony/twig-bundle/Resources/config/twig.php b/lib/symfony/twig-bundle/Resources/config/twig.php deleted file mode 100644 index 3bc7f66fa..000000000 --- a/lib/symfony/twig-bundle/Resources/config/twig.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Container\ContainerInterface; -use Symfony\Bridge\Twig\AppVariable; -use Symfony\Bridge\Twig\DataCollector\TwigDataCollector; -use Symfony\Bridge\Twig\ErrorRenderer\TwigErrorRenderer; -use Symfony\Bridge\Twig\Extension\AssetExtension; -use Symfony\Bridge\Twig\Extension\CodeExtension; -use Symfony\Bridge\Twig\Extension\ExpressionExtension; -use Symfony\Bridge\Twig\Extension\HttpFoundationExtension; -use Symfony\Bridge\Twig\Extension\HttpKernelExtension; -use Symfony\Bridge\Twig\Extension\HttpKernelRuntime; -use Symfony\Bridge\Twig\Extension\ProfilerExtension; -use Symfony\Bridge\Twig\Extension\RoutingExtension; -use Symfony\Bridge\Twig\Extension\SerializerExtension; -use Symfony\Bridge\Twig\Extension\SerializerRuntime; -use Symfony\Bridge\Twig\Extension\StopwatchExtension; -use Symfony\Bridge\Twig\Extension\TranslationExtension; -use Symfony\Bridge\Twig\Extension\WebLinkExtension; -use Symfony\Bridge\Twig\Extension\WorkflowExtension; -use Symfony\Bridge\Twig\Extension\YamlExtension; -use Symfony\Bridge\Twig\Translation\TwigExtractor; -use Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheWarmer; -use Symfony\Bundle\TwigBundle\DependencyInjection\Configurator\EnvironmentConfigurator; -use Symfony\Bundle\TwigBundle\TemplateIterator; -use Twig\Cache\FilesystemCache; -use Twig\Environment; -use Twig\Extension\CoreExtension; -use Twig\Extension\DebugExtension; -use Twig\Extension\EscaperExtension; -use Twig\Extension\OptimizerExtension; -use Twig\Extension\StagingExtension; -use Twig\ExtensionSet; -use Twig\Loader\ChainLoader; -use Twig\Loader\FilesystemLoader; -use Twig\Profiler\Profile; -use Twig\RuntimeLoader\ContainerRuntimeLoader; -use Twig\Template; -use Twig\TemplateWrapper; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig', Environment::class) - ->public() - ->args([service('twig.loader'), abstract_arg('Twig options')]) - ->call('addGlobal', ['app', service('twig.app_variable')]) - ->call('addRuntimeLoader', [service('twig.runtime_loader')]) - ->configurator([service('twig.configurator.environment'), 'configure']) - ->tag('container.preload', ['class' => FilesystemCache::class]) - ->tag('container.preload', ['class' => CoreExtension::class]) - ->tag('container.preload', ['class' => EscaperExtension::class]) - ->tag('container.preload', ['class' => OptimizerExtension::class]) - ->tag('container.preload', ['class' => StagingExtension::class]) - ->tag('container.preload', ['class' => ExtensionSet::class]) - ->tag('container.preload', ['class' => Template::class]) - ->tag('container.preload', ['class' => TemplateWrapper::class]) - ->tag('container.private', ['package' => 'symfony/twig-bundle', 'version' => '5.2']) - - ->alias('Twig_Environment', 'twig') - ->alias(Environment::class, 'twig') - - ->set('twig.app_variable', AppVariable::class) - ->call('setEnvironment', [param('kernel.environment')]) - ->call('setDebug', [param('kernel.debug')]) - ->call('setTokenStorage', [service('security.token_storage')->ignoreOnInvalid()]) - ->call('setRequestStack', [service('request_stack')->ignoreOnInvalid()]) - - ->set('twig.template_iterator', TemplateIterator::class) - ->args([service('kernel'), abstract_arg('Twig paths'), param('twig.default_path')]) - - ->set('twig.template_cache_warmer', TemplateCacheWarmer::class) - ->args([service(ContainerInterface::class), service('twig.template_iterator')]) - ->tag('kernel.cache_warmer') - ->tag('container.service_subscriber', ['id' => 'twig']) - - ->set('twig.loader.native_filesystem', FilesystemLoader::class) - ->args([[], param('kernel.project_dir')]) - ->tag('twig.loader') - - ->set('twig.loader.chain', ChainLoader::class) - - ->set('twig.extension.profiler', ProfilerExtension::class) - ->args([service('twig.profile'), service('debug.stopwatch')->ignoreOnInvalid()]) - - ->set('twig.profile', Profile::class) - - ->set('data_collector.twig', TwigDataCollector::class) - ->args([service('twig.profile'), service('twig')]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/twig.html.twig', 'id' => 'twig', 'priority' => 257]) - - ->set('twig.extension.trans', TranslationExtension::class) - ->args([service('translator')->nullOnInvalid()]) - ->tag('twig.extension') - - ->set('twig.extension.assets', AssetExtension::class) - ->args([service('assets.packages')]) - - ->set('twig.extension.code', CodeExtension::class) - ->args([service('debug.file_link_formatter')->ignoreOnInvalid(), param('kernel.project_dir'), param('kernel.charset')]) - ->tag('twig.extension') - - ->set('twig.extension.routing', RoutingExtension::class) - ->args([service('router')]) - - ->set('twig.extension.yaml', YamlExtension::class) - - ->set('twig.extension.debug.stopwatch', StopwatchExtension::class) - ->args([service('debug.stopwatch')->ignoreOnInvalid(), param('kernel.debug')]) - - ->set('twig.extension.expression', ExpressionExtension::class) - - ->set('twig.extension.httpkernel', HttpKernelExtension::class) - - ->set('twig.runtime.httpkernel', HttpKernelRuntime::class) - ->args([service('fragment.handler'), service('fragment.uri_generator')->ignoreOnInvalid()]) - - ->set('twig.extension.httpfoundation', HttpFoundationExtension::class) - ->args([service('url_helper')]) - - ->set('twig.extension.debug', DebugExtension::class) - - ->set('twig.extension.weblink', WebLinkExtension::class) - ->args([service('request_stack')]) - - ->set('twig.translation.extractor', TwigExtractor::class) - ->args([service('twig')]) - ->tag('translation.extractor', ['alias' => 'twig']) - - ->set('workflow.twig_extension', WorkflowExtension::class) - ->args([service('workflow.registry')]) - - ->set('twig.configurator.environment', EnvironmentConfigurator::class) - ->args([ - abstract_arg('date format, set in TwigExtension'), - abstract_arg('interval format, set in TwigExtension'), - abstract_arg('timezone, set in TwigExtension'), - abstract_arg('decimals, set in TwigExtension'), - abstract_arg('decimal point, set in TwigExtension'), - abstract_arg('thousands separator, set in TwigExtension'), - ]) - - ->set('twig.runtime_loader', ContainerRuntimeLoader::class) - ->args([abstract_arg('runtime locator')]) - - ->set('twig.error_renderer.html', TwigErrorRenderer::class) - ->decorate('error_renderer.html') - ->args([ - service('twig'), - service('twig.error_renderer.html.inner'), - inline_service('bool') - ->factory([TwigErrorRenderer::class, 'isDebug']) - ->args([service('request_stack'), param('kernel.debug')]), - ]) - - ->set('twig.runtime.serializer', SerializerRuntime::class) - ->args([service('serializer')]) - - ->set('twig.extension.serializer', SerializerExtension::class) - ; -}; diff --git a/lib/symfony/twig-bundle/TemplateIterator.php b/lib/symfony/twig-bundle/TemplateIterator.php deleted file mode 100644 index 8cc0ffc4d..000000000 --- a/lib/symfony/twig-bundle/TemplateIterator.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Iterator for all templates in bundles and in the application Resources directory. - * - * @author Fabien Potencier - * - * @internal - * - * @implements \IteratorAggregate - */ -class TemplateIterator implements \IteratorAggregate -{ - private $kernel; - private $templates; - private $paths; - private $defaultPath; - - /** - * @param array $paths Additional Twig paths to warm - * @param string|null $defaultPath The directory where global templates can be stored - */ - public function __construct(KernelInterface $kernel, array $paths = [], string $defaultPath = null) - { - $this->kernel = $kernel; - $this->paths = $paths; - $this->defaultPath = $defaultPath; - } - - public function getIterator(): \Traversable - { - if (null !== $this->templates) { - return $this->templates; - } - - $templates = null !== $this->defaultPath ? [$this->findTemplatesInDirectory($this->defaultPath, null, ['bundles'])] : []; - - foreach ($this->kernel->getBundles() as $bundle) { - $name = $bundle->getName(); - if (str_ends_with($name, 'Bundle')) { - $name = substr($name, 0, -6); - } - - $bundleTemplatesDir = is_dir($bundle->getPath().'/Resources/views') ? $bundle->getPath().'/Resources/views' : $bundle->getPath().'/templates'; - - $templates[] = $this->findTemplatesInDirectory($bundleTemplatesDir, $name); - if (null !== $this->defaultPath) { - $templates[] = $this->findTemplatesInDirectory($this->defaultPath.'/bundles/'.$bundle->getName(), $name); - } - } - - foreach ($this->paths as $dir => $namespace) { - $templates[] = $this->findTemplatesInDirectory($dir, $namespace); - } - - return $this->templates = new \ArrayIterator(array_unique(array_merge([], ...$templates))); - } - - /** - * Find templates in the given directory. - * - * @return string[] - */ - private function findTemplatesInDirectory(string $dir, string $namespace = null, array $excludeDirs = []): array - { - if (!is_dir($dir)) { - return []; - } - - $templates = []; - foreach (Finder::create()->files()->followLinks()->in($dir)->exclude($excludeDirs) as $file) { - $templates[] = (null !== $namespace ? '@'.$namespace.'/' : '').str_replace('\\', '/', $file->getRelativePathname()); - } - - return $templates; - } -} diff --git a/lib/symfony/twig-bundle/TwigBundle.php b/lib/symfony/twig-bundle/TwigBundle.php deleted file mode 100644 index 3910dd5e2..000000000 --- a/lib/symfony/twig-bundle/TwigBundle.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle; - -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass; -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\RuntimeLoaderPass; -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigEnvironmentPass; -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass; -use Symfony\Component\Console\Application; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\Bundle\Bundle; - -/** - * Bundle. - * - * @author Fabien Potencier - */ -class TwigBundle extends Bundle -{ - public function build(ContainerBuilder $container) - { - parent::build($container); - - // ExtensionPass must be run before the FragmentRendererPass as it adds tags that are processed later - $container->addCompilerPass(new ExtensionPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); - $container->addCompilerPass(new TwigEnvironmentPass()); - $container->addCompilerPass(new TwigLoaderPass()); - $container->addCompilerPass(new RuntimeLoaderPass(), PassConfig::TYPE_BEFORE_REMOVING); - } - - public function registerCommands(Application $application) - { - // noop - } -} diff --git a/lib/symfony/twig-bundle/composer.json b/lib/symfony/twig-bundle/composer.json deleted file mode 100644 index a92b08930..000000000 --- a/lib/symfony/twig-bundle/composer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "symfony/twig-bundle", - "type": "symfony-bundle", - "description": "Provides a tight integration of Twig into the Symfony full-stack framework", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/twig-bridge": "^5.3|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "twig/twig": "^2.13|^3.0.4" - }, - "require-dev": { - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "doctrine/annotations": "^1.10.4|^2", - "doctrine/cache": "^1.0|^2.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.3", - "symfony/framework-bundle": "<5.0", - "symfony/service-contracts": ">=3.0", - "symfony/translation": "<5.0" - }, - "autoload": { - "psr-4": { "Symfony\\Bundle\\TwigBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/var-dumper/CHANGELOG.md b/lib/symfony/var-dumper/CHANGELOG.md deleted file mode 100644 index f58ed3170..000000000 --- a/lib/symfony/var-dumper/CHANGELOG.md +++ /dev/null @@ -1,72 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add ability to style integer and double values independently - * Add casters for Symfony's UUIDs and ULIDs - * Add support for `Fiber` - -5.2.0 ------ - - * added support for PHPUnit `--colors` option - * added `VAR_DUMPER_FORMAT=server` env var value support - * prevent replacing the handler when the `VAR_DUMPER_FORMAT` env var is set - -5.1.0 ------ - - * added `RdKafka` support - -4.4.0 ------ - - * added `VarDumperTestTrait::setUpVarDumper()` and `VarDumperTestTrait::tearDownVarDumper()` - to configure casters & flags to use in tests - * added `ImagineCaster` and infrastructure to dump images - * added the stamps of a message after it is dispatched in `TraceableMessageBus` and `MessengerDataCollector` collected data - * added `UuidCaster` - * made all casters final - * added support for the `NO_COLOR` env var (https://no-color.org/) - -4.3.0 ------ - - * added `DsCaster` to support dumping the contents of data structures from the Ds extension - -4.2.0 ------ - - * support selecting the format to use by setting the environment variable `VAR_DUMPER_FORMAT` to `html` or `cli` - -4.1.0 ------ - - * added a `ServerDumper` to send serialized Data clones to a server - * added a `ServerDumpCommand` and `DumpServer` to run a server collecting - and displaying dumps on a single place with multiple formats support - * added `CliDescriptor` and `HtmlDescriptor` descriptors for `server:dump` CLI and HTML formats support - -4.0.0 ------ - - * support for passing `\ReflectionClass` instances to the `Caster::castObject()` - method has been dropped, pass class names as strings instead - * the `Data::getRawData()` method has been removed - * the `VarDumperTestTrait::assertDumpEquals()` method expects a 3rd `$filter = 0` - argument and moves `$message = ''` argument at 4th position. - * the `VarDumperTestTrait::assertDumpMatchesFormat()` method expects a 3rd `$filter = 0` - argument and moves `$message = ''` argument at 4th position. - -3.4.0 ------ - - * added `AbstractCloner::setMinDepth()` function to ensure minimum tree depth - * deprecated `MongoCaster` - -2.7.0 ------ - - * deprecated `Cloner\Data::getLimitedClone()`. Use `withMaxDepth`, `withMaxItemsPerDepth` or `withRefHandles` instead. diff --git a/lib/symfony/var-dumper/Caster/AmqpCaster.php b/lib/symfony/var-dumper/Caster/AmqpCaster.php deleted file mode 100644 index dc3b62198..000000000 --- a/lib/symfony/var-dumper/Caster/AmqpCaster.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Amqp related classes to array representation. - * - * @author Grégoire Pineau - * - * @final - */ -class AmqpCaster -{ - private const FLAGS = [ - \AMQP_DURABLE => 'AMQP_DURABLE', - \AMQP_PASSIVE => 'AMQP_PASSIVE', - \AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', - \AMQP_AUTODELETE => 'AMQP_AUTODELETE', - \AMQP_INTERNAL => 'AMQP_INTERNAL', - \AMQP_NOLOCAL => 'AMQP_NOLOCAL', - \AMQP_AUTOACK => 'AMQP_AUTOACK', - \AMQP_IFEMPTY => 'AMQP_IFEMPTY', - \AMQP_IFUNUSED => 'AMQP_IFUNUSED', - \AMQP_MANDATORY => 'AMQP_MANDATORY', - \AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', - \AMQP_MULTIPLE => 'AMQP_MULTIPLE', - \AMQP_NOWAIT => 'AMQP_NOWAIT', - \AMQP_REQUEUE => 'AMQP_REQUEUE', - ]; - - private const EXCHANGE_TYPES = [ - \AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', - \AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', - \AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', - \AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', - ]; - - public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPConnection\x00login"])) { - return $a; - } - - // BC layer in the amqp lib - if (method_exists($c, 'getReadTimeout')) { - $timeout = $c->getReadTimeout(); - } else { - $timeout = $c->getTimeout(); - } - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'login' => $c->getLogin(), - $prefix.'password' => $c->getPassword(), - $prefix.'host' => $c->getHost(), - $prefix.'vhost' => $c->getVhost(), - $prefix.'port' => $c->getPort(), - $prefix.'read_timeout' => $timeout, - ]; - - return $a; - } - - public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'channel_id' => $c->getChannelId(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPChannel\x00connection"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'prefetch_size' => $c->getPrefetchSize(), - $prefix.'prefetch_count' => $c->getPrefetchCount(), - ]; - - return $a; - } - - public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPQueue\x00name"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - $type = isset(self::EXCHANGE_TYPES[$c->getType()]) ? new ConstStub(self::EXCHANGE_TYPES[$c->getType()], $c->getType()) : $c->getType(); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPExchange\x00name"])) { - $a["\x00AMQPExchange\x00type"] = $type; - - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'type' => $type, - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $deliveryMode = new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPEnvelope\x00body"])) { - $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; - - return $a; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $a += [$prefix.'body' => $c->getBody()]; - } - - $a += [ - $prefix.'delivery_tag' => $c->getDeliveryTag(), - $prefix.'is_redelivery' => $c->isRedelivery(), - $prefix.'exchange_name' => $c->getExchangeName(), - $prefix.'routing_key' => $c->getRoutingKey(), - $prefix.'content_type' => $c->getContentType(), - $prefix.'content_encoding' => $c->getContentEncoding(), - $prefix.'headers' => $c->getHeaders(), - $prefix.'delivery_mode' => $deliveryMode, - $prefix.'priority' => $c->getPriority(), - $prefix.'correlation_id' => $c->getCorrelationId(), - $prefix.'reply_to' => $c->getReplyTo(), - $prefix.'expiration' => $c->getExpiration(), - $prefix.'message_id' => $c->getMessageId(), - $prefix.'timestamp' => $c->getTimeStamp(), - $prefix.'type' => $c->getType(), - $prefix.'user_id' => $c->getUserId(), - $prefix.'app_id' => $c->getAppId(), - ]; - - return $a; - } - - private static function extractFlags(int $flags): ConstStub - { - $flagsArray = []; - - foreach (self::FLAGS as $value => $name) { - if ($flags & $value) { - $flagsArray[] = $name; - } - } - - if (!$flagsArray) { - $flagsArray = ['AMQP_NOPARAM']; - } - - return new ConstStub(implode('|', $flagsArray), $flags); - } -} diff --git a/lib/symfony/var-dumper/Caster/ArgsStub.php b/lib/symfony/var-dumper/Caster/ArgsStub.php deleted file mode 100644 index b3f7bbee3..000000000 --- a/lib/symfony/var-dumper/Caster/ArgsStub.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a list of function arguments. - * - * @author Nicolas Grekas - */ -class ArgsStub extends EnumStub -{ - private static $parameters = []; - - public function __construct(array $args, string $function, ?string $class) - { - [$variadic, $params] = self::getParameters($function, $class); - - $values = []; - foreach ($args as $k => $v) { - $values[$k] = !\is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; - } - if (null === $params) { - parent::__construct($values, false); - - return; - } - if (\count($values) < \count($params)) { - $params = \array_slice($params, 0, \count($values)); - } elseif (\count($values) > \count($params)) { - $values[] = new EnumStub(array_splice($values, \count($params)), false); - $params[] = $variadic; - } - if (['...'] === $params) { - $this->dumpKeys = false; - $this->value = $values[0]->value; - } else { - $this->value = array_combine($params, $values); - } - } - - private static function getParameters(string $function, ?string $class): array - { - if (isset(self::$parameters[$k = $class.'::'.$function])) { - return self::$parameters[$k]; - } - - try { - $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); - } catch (\ReflectionException $e) { - return [null, null]; - } - - $variadic = '...'; - $params = []; - foreach ($r->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - if ($v->isVariadic()) { - $variadic .= $k; - } else { - $params[] = $k; - } - } - - return self::$parameters[$k] = [$variadic, $params]; - } -} diff --git a/lib/symfony/var-dumper/Caster/Caster.php b/lib/symfony/var-dumper/Caster/Caster.php deleted file mode 100644 index 53f4461d0..000000000 --- a/lib/symfony/var-dumper/Caster/Caster.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Helper for filtering out properties in casters. - * - * @author Nicolas Grekas - * - * @final - */ -class Caster -{ - public const EXCLUDE_VERBOSE = 1; - public const EXCLUDE_VIRTUAL = 2; - public const EXCLUDE_DYNAMIC = 4; - public const EXCLUDE_PUBLIC = 8; - public const EXCLUDE_PROTECTED = 16; - public const EXCLUDE_PRIVATE = 32; - public const EXCLUDE_NULL = 64; - public const EXCLUDE_EMPTY = 128; - public const EXCLUDE_NOT_IMPORTANT = 256; - public const EXCLUDE_STRICT = 512; - - public const PREFIX_VIRTUAL = "\0~\0"; - public const PREFIX_DYNAMIC = "\0+\0"; - public const PREFIX_PROTECTED = "\0*\0"; - - /** - * Casts objects to arrays and adds the dynamic property prefix. - * - * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not - */ - public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array - { - if ($hasDebugInfo) { - try { - $debugInfo = $obj->__debugInfo(); - } catch (\Exception $e) { - // ignore failing __debugInfo() - $hasDebugInfo = false; - } - } - - $a = $obj instanceof \Closure ? [] : (array) $obj; - - if ($obj instanceof \__PHP_Incomplete_Class) { - return $a; - } - - if ($a) { - static $publicProperties = []; - $debugClass = $debugClass ?? get_debug_type($obj); - - $i = 0; - $prefixedKeys = []; - foreach ($a as $k => $v) { - if ("\0" !== ($k[0] ?? '')) { - if (!isset($publicProperties[$class])) { - foreach ((new \ReflectionClass($class))->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) { - $publicProperties[$class][$prop->name] = true; - } - } - if (!isset($publicProperties[$class][$k])) { - $prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k; - } - } elseif ($debugClass !== $class && 1 === strpos($k, $class)) { - $prefixedKeys[$i] = "\0".$debugClass.strrchr($k, "\0"); - } - ++$i; - } - if ($prefixedKeys) { - $keys = array_keys($a); - foreach ($prefixedKeys as $i => $k) { - $keys[$i] = $k; - } - $a = array_combine($keys, $a); - } - } - - if ($hasDebugInfo && \is_array($debugInfo)) { - foreach ($debugInfo as $k => $v) { - if (!isset($k[0]) || "\0" !== $k[0]) { - if (\array_key_exists(self::PREFIX_DYNAMIC.$k, $a)) { - continue; - } - $k = self::PREFIX_VIRTUAL.$k; - } - - unset($a[$k]); - $a[$k] = $v; - } - } - - return $a; - } - - /** - * Filters out the specified properties. - * - * By default, a single match in the $filter bit field filters properties out, following an "or" logic. - * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. - * - * @param array $a The array containing the properties to filter - * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out - * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set - * @param int &$count Set to the number of removed properties - */ - public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array - { - $count = 0; - - foreach ($a as $k => $v) { - $type = self::EXCLUDE_STRICT & $filter; - - if (null === $v) { - $type |= self::EXCLUDE_NULL & $filter; - $type |= self::EXCLUDE_EMPTY & $filter; - } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { - $type |= self::EXCLUDE_EMPTY & $filter; - } - if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_NOT_IMPORTANT; - } - if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_VERBOSE; - } - - if (!isset($k[1]) || "\0" !== $k[0]) { - $type |= self::EXCLUDE_PUBLIC & $filter; - } elseif ('~' === $k[1]) { - $type |= self::EXCLUDE_VIRTUAL & $filter; - } elseif ('+' === $k[1]) { - $type |= self::EXCLUDE_DYNAMIC & $filter; - } elseif ('*' === $k[1]) { - $type |= self::EXCLUDE_PROTECTED & $filter; - } else { - $type |= self::EXCLUDE_PRIVATE & $filter; - } - - if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { - unset($a[$k]); - ++$count; - } - } - - return $a; - } - - public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, bool $isNested): array - { - if (isset($a['__PHP_Incomplete_Class_Name'])) { - $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; - unset($a['__PHP_Incomplete_Class_Name']); - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/ClassStub.php b/lib/symfony/var-dumper/Caster/ClassStub.php deleted file mode 100644 index 48f848354..000000000 --- a/lib/symfony/var-dumper/Caster/ClassStub.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP class identifier. - * - * @author Nicolas Grekas - */ -class ClassStub extends ConstStub -{ - /** - * @param string $identifier A PHP identifier, e.g. a class, method, interface, etc. name - * @param callable $callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier - */ - public function __construct(string $identifier, $callable = null) - { - $this->value = $identifier; - - try { - if (null !== $callable) { - if ($callable instanceof \Closure) { - $r = new \ReflectionFunction($callable); - } elseif (\is_object($callable)) { - $r = [$callable, '__invoke']; - } elseif (\is_array($callable)) { - $r = $callable; - } elseif (false !== $i = strpos($callable, '::')) { - $r = [substr($callable, 0, $i), substr($callable, 2 + $i)]; - } else { - $r = new \ReflectionFunction($callable); - } - } elseif (0 < $i = strpos($identifier, '::') ?: strpos($identifier, '->')) { - $r = [substr($identifier, 0, $i), substr($identifier, 2 + $i)]; - } else { - $r = new \ReflectionClass($identifier); - } - - if (\is_array($r)) { - try { - $r = new \ReflectionMethod($r[0], $r[1]); - } catch (\ReflectionException $e) { - $r = new \ReflectionClass($r[0]); - } - } - - if (str_contains($identifier, "@anonymous\0")) { - $this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $identifier); - } - - if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) { - $s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE); - $s = ReflectionCaster::getSignature($s); - - if (str_ends_with($identifier, '()')) { - $this->value = substr_replace($identifier, $s, -2); - } else { - $this->value .= $s; - } - } - } catch (\ReflectionException $e) { - return; - } finally { - if (0 < $i = strrpos($this->value, '\\')) { - $this->attr['ellipsis'] = \strlen($this->value) - $i; - $this->attr['ellipsis-type'] = 'class'; - $this->attr['ellipsis-tail'] = 1; - } - } - - if ($f = $r->getFileName()) { - $this->attr['file'] = $f; - $this->attr['line'] = $r->getStartLine(); - } - } - - public static function wrapCallable($callable) - { - if (\is_object($callable) || !\is_callable($callable)) { - return $callable; - } - - if (!\is_array($callable)) { - $callable = new static($callable, $callable); - } elseif (\is_string($callable[0])) { - $callable[0] = new static($callable[0], $callable); - } else { - $callable[1] = new static($callable[1], $callable); - } - - return $callable; - } -} diff --git a/lib/symfony/var-dumper/Caster/ConstStub.php b/lib/symfony/var-dumper/Caster/ConstStub.php deleted file mode 100644 index 8b0179745..000000000 --- a/lib/symfony/var-dumper/Caster/ConstStub.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP constant and its value. - * - * @author Nicolas Grekas - */ -class ConstStub extends Stub -{ - public function __construct(string $name, $value = null) - { - $this->class = $name; - $this->value = 1 < \func_num_args() ? $value : $name; - } - - /** - * @return string - */ - public function __toString() - { - return (string) $this->value; - } -} diff --git a/lib/symfony/var-dumper/Caster/CutArrayStub.php b/lib/symfony/var-dumper/Caster/CutArrayStub.php deleted file mode 100644 index 0e4fb363d..000000000 --- a/lib/symfony/var-dumper/Caster/CutArrayStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a cut array. - * - * @author Nicolas Grekas - */ -class CutArrayStub extends CutStub -{ - public $preservedSubset; - - public function __construct(array $value, array $preservedKeys) - { - parent::__construct($value); - - $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); - $this->cut -= \count($this->preservedSubset); - } -} diff --git a/lib/symfony/var-dumper/Caster/CutStub.php b/lib/symfony/var-dumper/Caster/CutStub.php deleted file mode 100644 index 464c6dbd1..000000000 --- a/lib/symfony/var-dumper/Caster/CutStub.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents the main properties of a PHP variable, pre-casted by a caster. - * - * @author Nicolas Grekas - */ -class CutStub extends Stub -{ - public function __construct($value) - { - $this->value = $value; - - switch (\gettype($value)) { - case 'object': - $this->type = self::TYPE_OBJECT; - $this->class = \get_class($value); - - if ($value instanceof \Closure) { - ReflectionCaster::castClosure($value, [], $this, true, Caster::EXCLUDE_VERBOSE); - } - - $this->cut = -1; - break; - - case 'array': - $this->type = self::TYPE_ARRAY; - $this->class = self::ARRAY_ASSOC; - $this->cut = $this->value = \count($value); - break; - - case 'resource': - case 'unknown type': - case 'resource (closed)': - $this->type = self::TYPE_RESOURCE; - $this->handle = (int) $value; - if ('Unknown' === $this->class = @get_resource_type($value)) { - $this->class = 'Closed'; - } - $this->cut = -1; - break; - - case 'string': - $this->type = self::TYPE_STRING; - $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; - $this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8'); - $this->value = ''; - break; - } - } -} diff --git a/lib/symfony/var-dumper/Caster/DOMCaster.php b/lib/symfony/var-dumper/Caster/DOMCaster.php deleted file mode 100644 index 4dd16e0ee..000000000 --- a/lib/symfony/var-dumper/Caster/DOMCaster.php +++ /dev/null @@ -1,304 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DOM related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class DOMCaster -{ - private const ERROR_CODES = [ - \DOM_PHP_ERR => 'DOM_PHP_ERR', - \DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', - \DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', - \DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', - \DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', - \DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', - \DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', - \DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', - \DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', - \DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', - \DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', - \DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', - \DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', - \DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', - \DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', - \DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', - \DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', - ]; - - private const NODE_TYPES = [ - \XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', - \XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', - \XML_TEXT_NODE => 'XML_TEXT_NODE', - \XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', - \XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', - \XML_ENTITY_NODE => 'XML_ENTITY_NODE', - \XML_PI_NODE => 'XML_PI_NODE', - \XML_COMMENT_NODE => 'XML_COMMENT_NODE', - \XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', - \XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', - \XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', - \XML_NOTATION_NODE => 'XML_NOTATION_NODE', - \XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', - \XML_DTD_NODE => 'XML_DTD_NODE', - \XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', - \XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', - \XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', - \XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', - ]; - - public static function castException(\DOMException $e, array $a, Stub $stub, bool $isNested) - { - $k = Caster::PREFIX_PROTECTED.'code'; - if (isset($a[$k], self::ERROR_CODES[$a[$k]])) { - $a[$k] = new ConstStub(self::ERROR_CODES[$a[$k]], $a[$k]); - } - - return $a; - } - - public static function castLength($dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castImplementation(\DOMImplementation $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'Core' => '1.0', - Caster::PREFIX_VIRTUAL.'XML' => '2.0', - ]; - - return $a; - } - - public static function castNode(\DOMNode $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'parentNode' => new CutStub($dom->parentNode), - 'childNodes' => $dom->childNodes, - 'firstChild' => new CutStub($dom->firstChild), - 'lastChild' => new CutStub($dom->lastChild), - 'previousSibling' => new CutStub($dom->previousSibling), - 'nextSibling' => new CutStub($dom->nextSibling), - 'attributes' => $dom->attributes, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'namespaceURI' => $dom->namespaceURI, - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, - 'textContent' => new CutStub($dom->textContent), - ]; - - return $a; - } - - public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'namespaceURI' => $dom->namespaceURI, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'parentNode' => new CutStub($dom->parentNode), - ]; - - return $a; - } - - public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - 'doctype' => $dom->doctype, - 'implementation' => $dom->implementation, - 'documentElement' => new CutStub($dom->documentElement), - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'xmlEncoding' => $dom->xmlEncoding, - 'standalone' => $dom->standalone, - 'xmlStandalone' => $dom->xmlStandalone, - 'version' => $dom->version, - 'xmlVersion' => $dom->xmlVersion, - 'strictErrorChecking' => $dom->strictErrorChecking, - 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, - 'config' => $dom->config, - 'formatOutput' => $dom->formatOutput, - 'validateOnParse' => $dom->validateOnParse, - 'resolveExternals' => $dom->resolveExternals, - 'preserveWhiteSpace' => $dom->preserveWhiteSpace, - 'recover' => $dom->recover, - 'substituteEntities' => $dom->substituteEntities, - ]; - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $formatOutput = $dom->formatOutput; - $dom->formatOutput = true; - $a += [Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()]; - $dom->formatOutput = $formatOutput; - } - - return $a; - } - - public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'data' => $dom->data, - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'name' => $dom->name, - 'specified' => $dom->specified, - 'value' => $dom->value, - 'ownerElement' => $dom->ownerElement, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castElement(\DOMElement $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'tagName' => $dom->tagName, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castText(\DOMText $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'wholeText' => $dom->wholeText, - ]; - - return $a; - } - - public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'typeName' => $dom->typeName, - 'typeNamespace' => $dom->typeNamespace, - ]; - - return $a; - } - - public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'severity' => $dom->severity, - 'message' => $dom->message, - 'type' => $dom->type, - 'relatedException' => $dom->relatedException, - 'related_data' => $dom->related_data, - 'location' => $dom->location, - ]; - - return $a; - } - - public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'lineNumber' => $dom->lineNumber, - 'columnNumber' => $dom->columnNumber, - 'offset' => $dom->offset, - 'relatedNode' => $dom->relatedNode, - 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, - ]; - - return $a; - } - - public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'name' => $dom->name, - 'entities' => $dom->entities, - 'notations' => $dom->notations, - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'internalSubset' => $dom->internalSubset, - ]; - - return $a; - } - - public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - ]; - - return $a; - } - - public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'notationName' => $dom->notationName, - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'version' => $dom->version, - ]; - - return $a; - } - - public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'target' => $dom->target, - 'data' => $dom->data, - ]; - - return $a; - } - - public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'document' => $dom->document, - ]; - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/DateCaster.php b/lib/symfony/var-dumper/Caster/DateCaster.php deleted file mode 100644 index 18641fbc1..000000000 --- a/lib/symfony/var-dumper/Caster/DateCaster.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DateTimeInterface related classes to array representation. - * - * @author Dany Maillard - * - * @final - */ -class DateCaster -{ - private const PERIOD_LIMIT = 3; - - public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, bool $isNested, int $filter) - { - $prefix = Caster::PREFIX_VIRTUAL; - $location = $d->getTimezone()->getLocation(); - $fromNow = (new \DateTime())->diff($d); - - $title = $d->format('l, F j, Y') - ."\n".self::formatInterval($fromNow).' from now' - .($location ? ($d->format('I') ? "\nDST On" : "\nDST Off") : '') - ; - - unset( - $a[Caster::PREFIX_DYNAMIC.'date'], - $a[Caster::PREFIX_DYNAMIC.'timezone'], - $a[Caster::PREFIX_DYNAMIC.'timezone_type'] - ); - $a[$prefix.'date'] = new ConstStub(self::formatDateTime($d, $location ? ' e (P)' : ' P'), $title); - - $stub->class .= $d->format(' @U'); - - return $a; - } - - public static function castInterval(\DateInterval $interval, array $a, Stub $stub, bool $isNested, int $filter) - { - $now = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); - $numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp(); - $title = number_format($numberOfSeconds, 0, '.', ' ').'s'; - - $i = [Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $i : $i + $a; - } - - private static function formatInterval(\DateInterval $i): string - { - $format = '%R '; - - if (0 === $i->y && 0 === $i->m && ($i->h >= 24 || $i->i >= 60 || $i->s >= 60)) { - $d = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); - $i = $d->diff($d->add($i)); // recalculate carry over points - $format .= 0 < $i->days ? '%ad ' : ''; - } else { - $format .= ($i->y ? '%yy ' : '').($i->m ? '%mm ' : '').($i->d ? '%dd ' : ''); - } - - $format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:'.self::formatSeconds($i->s, substr($i->f, 2)) : ''; - $format = '%R ' === $format ? '0s' : $format; - - return $i->format(rtrim($format)); - } - - public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stub, bool $isNested, int $filter) - { - $location = $timeZone->getLocation(); - $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); - $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : ''; - - $z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $z : $z + $a; - } - - public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, bool $isNested, int $filter) - { - $dates = []; - foreach (clone $p as $i => $d) { - if (self::PERIOD_LIMIT === $i) { - $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC')); - $dates[] = sprintf('%s more', ($end = $p->getEndDate()) - ? ceil(($end->format('U.u') - $d->format('U.u')) / ((int) $now->add($p->getDateInterval())->format('U.u') - (int) $now->format('U.u'))) - : $p->recurrences - $i - ); - break; - } - $dates[] = sprintf('%s) %s', $i + 1, self::formatDateTime($d)); - } - - $period = sprintf( - 'every %s, from %s%s %s', - self::formatInterval($p->getDateInterval()), - $p->include_start_date ? '[' : ']', - self::formatDateTime($p->getStartDate()), - ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end).(\PHP_VERSION_ID >= 80200 && $p->include_end_date ? ']' : '[') : 'recurring '.$p->recurrences.' time/s' - ); - - $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $p : $p + $a; - } - - private static function formatDateTime(\DateTimeInterface $d, string $extra = ''): string - { - return $d->format('Y-m-d H:i:'.self::formatSeconds($d->format('s'), $d->format('u')).$extra); - } - - private static function formatSeconds(string $s, string $us): string - { - return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); - } -} diff --git a/lib/symfony/var-dumper/Caster/DoctrineCaster.php b/lib/symfony/var-dumper/Caster/DoctrineCaster.php deleted file mode 100644 index 129b2cb47..000000000 --- a/lib/symfony/var-dumper/Caster/DoctrineCaster.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Doctrine\Common\Proxy\Proxy as CommonProxy; -use Doctrine\ORM\PersistentCollection; -use Doctrine\ORM\Proxy\Proxy as OrmProxy; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Doctrine related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class DoctrineCaster -{ - public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, bool $isNested) - { - foreach (['__cloner__', '__initializer__'] as $k) { - if (\array_key_exists($k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, bool $isNested) - { - foreach (['_entityPersister', '_identifier'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, bool $isNested) - { - foreach (['snapshot', 'association', 'typeClass'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { - $a[$k] = new CutStub($a[$k]); - } - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/DsCaster.php b/lib/symfony/var-dumper/Caster/DsCaster.php deleted file mode 100644 index b34b67004..000000000 --- a/lib/symfony/var-dumper/Caster/DsCaster.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ds\Collection; -use Ds\Map; -use Ds\Pair; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Ds extension classes to array representation. - * - * @author Jáchym Toušek - * - * @final - */ -class DsCaster -{ - public static function castCollection(Collection $c, array $a, Stub $stub, bool $isNested): array - { - $a[Caster::PREFIX_VIRTUAL.'count'] = $c->count(); - $a[Caster::PREFIX_VIRTUAL.'capacity'] = $c->capacity(); - - if (!$c instanceof Map) { - $a += $c->toArray(); - } - - return $a; - } - - public static function castMap(Map $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c as $k => $v) { - $a[] = new DsPairStub($k, $v); - } - - return $a; - } - - public static function castPair(Pair $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c->toArray() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } - - public static function castPairStub(DsPairStub $c, array $a, Stub $stub, bool $isNested): array - { - if ($isNested) { - $stub->class = Pair::class; - $stub->value = null; - $stub->handle = 0; - - $a = $c->value; - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/DsPairStub.php b/lib/symfony/var-dumper/Caster/DsPairStub.php deleted file mode 100644 index a1dcc1561..000000000 --- a/lib/symfony/var-dumper/Caster/DsPairStub.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - */ -class DsPairStub extends Stub -{ - public function __construct($key, $value) - { - $this->value = [ - Caster::PREFIX_VIRTUAL.'key' => $key, - Caster::PREFIX_VIRTUAL.'value' => $value, - ]; - } -} diff --git a/lib/symfony/var-dumper/Caster/EnumStub.php b/lib/symfony/var-dumper/Caster/EnumStub.php deleted file mode 100644 index 7a4e98a21..000000000 --- a/lib/symfony/var-dumper/Caster/EnumStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents an enumeration of values. - * - * @author Nicolas Grekas - */ -class EnumStub extends Stub -{ - public $dumpKeys = true; - - public function __construct(array $values, bool $dumpKeys = true) - { - $this->value = $values; - $this->dumpKeys = $dumpKeys; - } -} diff --git a/lib/symfony/var-dumper/Caster/ExceptionCaster.php b/lib/symfony/var-dumper/Caster/ExceptionCaster.php deleted file mode 100644 index 7f5cb65eb..000000000 --- a/lib/symfony/var-dumper/Caster/ExceptionCaster.php +++ /dev/null @@ -1,388 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * Casts common Exception classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class ExceptionCaster -{ - public static $srcContext = 1; - public static $traceArgs = true; - public static $errorTypes = [ - \E_DEPRECATED => 'E_DEPRECATED', - \E_USER_DEPRECATED => 'E_USER_DEPRECATED', - \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', - \E_ERROR => 'E_ERROR', - \E_WARNING => 'E_WARNING', - \E_PARSE => 'E_PARSE', - \E_NOTICE => 'E_NOTICE', - \E_CORE_ERROR => 'E_CORE_ERROR', - \E_CORE_WARNING => 'E_CORE_WARNING', - \E_COMPILE_ERROR => 'E_COMPILE_ERROR', - \E_COMPILE_WARNING => 'E_COMPILE_WARNING', - \E_USER_ERROR => 'E_USER_ERROR', - \E_USER_WARNING => 'E_USER_WARNING', - \E_USER_NOTICE => 'E_USER_NOTICE', - \E_STRICT => 'E_STRICT', - ]; - - private static $framesCache = []; - - public static function castError(\Error $e, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); - } - - public static function castException(\Exception $e, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); - } - - public static function castErrorException(\ErrorException $e, array $a, Stub $stub, bool $isNested) - { - if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - return $a; - } - - public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, bool $isNested) - { - $trace = Caster::PREFIX_VIRTUAL.'trace'; - $prefix = Caster::PREFIX_PROTECTED; - $xPrefix = "\0Exception\0"; - - if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) { - $b = (array) $a[$xPrefix.'previous']; - $class = get_debug_type($a[$xPrefix.'previous']); - self::traceUnshift($b[$xPrefix.'trace'], $class, $b[$prefix.'file'], $b[$prefix.'line']); - $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value)); - } - - unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); - - return $a; - } - - public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, bool $isNested) - { - $sPrefix = "\0".SilencedErrorContext::class."\0"; - - if (!isset($a[$s = $sPrefix.'severity'])) { - return $a; - } - - if (isset(self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - $trace = [[ - 'file' => $a[$sPrefix.'file'], - 'line' => $a[$sPrefix.'line'], - ]]; - - if (isset($a[$sPrefix.'trace'])) { - $trace = array_merge($trace, $a[$sPrefix.'trace']); - } - - unset($a[$sPrefix.'file'], $a[$sPrefix.'line'], $a[$sPrefix.'trace']); - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - - return $a; - } - - public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, bool $isNested) - { - if (!$isNested) { - return $a; - } - $stub->class = ''; - $stub->handle = 0; - $frames = $trace->value; - $prefix = Caster::PREFIX_VIRTUAL; - - $a = []; - $j = \count($frames); - if (0 > $i = $trace->sliceOffset) { - $i = max(0, $j + $i); - } - if (!isset($trace->value[$i])) { - return []; - } - $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; - $frames[] = ['function' => '']; - $collapse = false; - - for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { - $f = $frames[$i]; - $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'] : '???'; - - $frame = new FrameStub( - [ - 'object' => $f['object'] ?? null, - 'class' => $f['class'] ?? null, - 'type' => $f['type'] ?? null, - 'function' => $f['function'] ?? null, - ] + $frames[$i - 1], - false, - true - ); - $f = self::castFrameStub($frame, [], $frame, true); - if (isset($f[$prefix.'src'])) { - foreach ($f[$prefix.'src']->value as $label => $frame) { - if (str_starts_with($label, "\0~collapse=0")) { - if ($collapse) { - $label = substr_replace($label, '1', 11, 1); - } else { - $collapse = true; - } - } - $label = substr_replace($label, "title=Stack level $j.&", 2, 0); - } - $f = $frames[$i - 1]; - if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) { - $frame->value['arguments'] = new ArgsStub($f['args'], $f['function'] ?? null, $f['class'] ?? null); - } - } elseif ('???' !== $lastCall) { - $label = new ClassStub($lastCall); - if (isset($label->attr['ellipsis'])) { - $label->attr['ellipsis'] += 2; - $label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()'; - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()'; - } - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall; - } - $a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame; - - $lastCall = $call; - } - if (null !== $trace->sliceLength) { - $a = \array_slice($a, 0, $trace->sliceLength, true); - } - - return $a; - } - - public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, bool $isNested) - { - if (!$isNested) { - return $a; - } - $f = $frame->value; - $prefix = Caster::PREFIX_VIRTUAL; - - if (isset($f['file'], $f['line'])) { - $cacheKey = $f; - unset($cacheKey['object'], $cacheKey['args']); - $cacheKey[] = self::$srcContext; - $cacheKey = implode('-', $cacheKey); - - if (isset(self::$framesCache[$cacheKey])) { - $a[$prefix.'src'] = self::$framesCache[$cacheKey]; - } else { - if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { - $f['file'] = substr($f['file'], 0, -\strlen($match[0])); - $f['line'] = (int) $match[1]; - } - $src = $f['line']; - $srcKey = $f['file']; - $ellipsis = new LinkStub($srcKey, 0); - $srcAttr = 'collapse='.(int) $ellipsis->inVendor; - $ellipsisTail = $ellipsis->attr['ellipsis-tail'] ?? 0; - $ellipsis = $ellipsis->attr['ellipsis'] ?? 0; - - if (is_file($f['file']) && 0 <= self::$srcContext) { - if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) { - $template = null; - if (isset($f['object'])) { - $template = $f['object']; - } elseif ((new \ReflectionClass($f['class']))->isInstantiable()) { - $template = unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class'])); - } - if (null !== $template) { - $ellipsis = 0; - $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); - $templateInfo = $template->getDebugInfo(); - if (isset($templateInfo[$f['line']])) { - if (!method_exists($template, 'getSourceContext') || !is_file($templatePath = $template->getSourceContext()->getPath())) { - $templatePath = null; - } - if ($templateSrc) { - $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, 'twig', $templatePath, $f); - $srcKey = ($templatePath ?: $template->getTemplateName()).':'.$templateInfo[$f['line']]; - } - } - } - } - if ($srcKey == $f['file']) { - $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, 'php', $f['file'], $f); - $srcKey .= ':'.$f['line']; - if ($ellipsis) { - $ellipsis += 1 + \strlen($f['line']); - } - } - $srcAttr .= sprintf('&separator= &file=%s&line=%d', rawurlencode($f['file']), $f['line']); - } else { - $srcAttr .= '&separator=:'; - } - $srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : ''; - self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(["\0~$srcAttr\0$srcKey" => $src]); - } - } - - unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); - if ($frame->inTraceStub) { - unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); - } - foreach ($a as $k => $v) { - if (!$v) { - unset($a[$k]); - } - } - if ($frame->keepArgs && !empty($f['args'])) { - $a[$prefix.'arguments'] = new ArgsStub($f['args'], $f['function'], $f['class']); - } - - return $a; - } - - private static function filterExceptionArray(string $xClass, array $a, string $xPrefix, int $filter): array - { - if (isset($a[$xPrefix.'trace'])) { - $trace = $a[$xPrefix.'trace']; - unset($a[$xPrefix.'trace']); // Ensures the trace is always last - } else { - $trace = []; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $trace) { - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - } - if (empty($a[$xPrefix.'previous'])) { - unset($a[$xPrefix.'previous']); - } - unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); - - if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) { - $a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $a[Caster::PREFIX_PROTECTED.'message']); - } - - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - - return $a; - } - - private static function traceUnshift(array &$trace, ?string $class, string $file, int $line): void - { - if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { - return; - } - array_unshift($trace, [ - 'function' => $class ? 'new '.$class : null, - 'file' => $file, - 'line' => $line, - ]); - } - - private static function extractSource(string $srcLines, int $line, int $srcContext, string $lang, ?string $file, array $frame): EnumStub - { - $srcLines = explode("\n", $srcLines); - $src = []; - - for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { - $src[] = ($srcLines[$i] ?? '')."\n"; - } - - if ($frame['function'] ?? false) { - $stub = new CutStub(new \stdClass()); - $stub->class = (isset($frame['class']) ? $frame['class'].$frame['type'] : '').$frame['function']; - $stub->type = Stub::TYPE_OBJECT; - $stub->attr['cut_hash'] = true; - $stub->attr['file'] = $frame['file']; - $stub->attr['line'] = $frame['line']; - - try { - $caller = isset($frame['class']) ? new \ReflectionMethod($frame['class'], $frame['function']) : new \ReflectionFunction($frame['function']); - $stub->class .= ReflectionCaster::getSignature(ReflectionCaster::castFunctionAbstract($caller, [], $stub, true, Caster::EXCLUDE_VERBOSE)); - - if ($f = $caller->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $caller->getStartLine(); - } - } catch (\ReflectionException $e) { - // ignore fake class/function - } - - $srcLines = ["\0~separator=\0" => $stub]; - } else { - $stub = null; - $srcLines = []; - } - - $ltrim = 0; - do { - $pad = null; - for ($i = $srcContext << 1; $i >= 0; --$i) { - if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { - if (null === $pad) { - $pad = $c; - } - if ((' ' !== $c && "\t" !== $c) || $pad !== $c) { - break; - } - } - } - ++$ltrim; - } while (0 > $i && null !== $pad); - - --$ltrim; - - foreach ($src as $i => $c) { - if ($ltrim) { - $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? substr($c, $ltrim) : ltrim($c, " \t"); - } - $c = substr($c, 0, -1); - if ($i !== $srcContext) { - $c = new ConstStub('default', $c); - } else { - $c = new ConstStub($c, $stub ? 'in '.$stub->class : ''); - if (null !== $file) { - $c->attr['file'] = $file; - $c->attr['line'] = $line; - } - } - $c->attr['lang'] = $lang; - $srcLines[sprintf("\0~separator=› &%d\0", $i + $line - $srcContext)] = $c; - } - - return new EnumStub($srcLines); - } -} diff --git a/lib/symfony/var-dumper/Caster/FiberCaster.php b/lib/symfony/var-dumper/Caster/FiberCaster.php deleted file mode 100644 index c74a9e59c..000000000 --- a/lib/symfony/var-dumper/Caster/FiberCaster.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Fiber related classes to array representation. - * - * @author Grégoire Pineau - */ -final class FiberCaster -{ - public static function castFiber(\Fiber $fiber, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($fiber->isTerminated()) { - $status = 'terminated'; - } elseif ($fiber->isRunning()) { - $status = 'running'; - } elseif ($fiber->isSuspended()) { - $status = 'suspended'; - } elseif ($fiber->isStarted()) { - $status = 'started'; - } else { - $status = 'not started'; - } - - $a[$prefix.'status'] = $status; - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/FrameStub.php b/lib/symfony/var-dumper/Caster/FrameStub.php deleted file mode 100644 index 878675528..000000000 --- a/lib/symfony/var-dumper/Caster/FrameStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas - */ -class FrameStub extends EnumStub -{ - public $keepArgs; - public $inTraceStub; - - public function __construct(array $frame, bool $keepArgs = true, bool $inTraceStub = false) - { - $this->value = $frame; - $this->keepArgs = $keepArgs; - $this->inTraceStub = $inTraceStub; - } -} diff --git a/lib/symfony/var-dumper/Caster/GmpCaster.php b/lib/symfony/var-dumper/Caster/GmpCaster.php deleted file mode 100644 index b018cc7f8..000000000 --- a/lib/symfony/var-dumper/Caster/GmpCaster.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts GMP objects to array representation. - * - * @author Hamza Amrouche - * @author Nicolas Grekas - * - * @final - */ -class GmpCaster -{ - public static function castGmp(\GMP $gmp, array $a, Stub $stub, bool $isNested, int $filter): array - { - $a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp)); - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/ImagineCaster.php b/lib/symfony/var-dumper/Caster/ImagineCaster.php deleted file mode 100644 index d1289da33..000000000 --- a/lib/symfony/var-dumper/Caster/ImagineCaster.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Imagine\Image\ImageInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau - */ -final class ImagineCaster -{ - public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array - { - $imgData = $c->get('png'); - if (\strlen($imgData) > 1 * 1000 * 1000) { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()), - ]; - } else { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()), - ]; - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/ImgStub.php b/lib/symfony/var-dumper/Caster/ImgStub.php deleted file mode 100644 index a16681f73..000000000 --- a/lib/symfony/var-dumper/Caster/ImgStub.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * @author Grégoire Pineau - */ -class ImgStub extends ConstStub -{ - public function __construct(string $data, string $contentType, string $size = '') - { - $this->value = ''; - $this->attr['img-data'] = $data; - $this->attr['img-size'] = $size; - $this->attr['content-type'] = $contentType; - } -} diff --git a/lib/symfony/var-dumper/Caster/IntlCaster.php b/lib/symfony/var-dumper/Caster/IntlCaster.php deleted file mode 100644 index 1ed91d4d6..000000000 --- a/lib/symfony/var-dumper/Caster/IntlCaster.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * @author Jan Schädlich - * - * @final - */ -class IntlCaster -{ - public static function castMessageFormatter(\MessageFormatter $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - return self::castError($c, $a); - } - - public static function castNumberFormatter(\NumberFormatter $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += 3; - - return self::castError($c, $a); - } - - $a += [ - Caster::PREFIX_VIRTUAL.'attributes' => new EnumStub( - [ - 'PARSE_INT_ONLY' => $c->getAttribute(\NumberFormatter::PARSE_INT_ONLY), - 'GROUPING_USED' => $c->getAttribute(\NumberFormatter::GROUPING_USED), - 'DECIMAL_ALWAYS_SHOWN' => $c->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN), - 'MAX_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS), - 'MIN_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS), - 'INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::INTEGER_DIGITS), - 'MAX_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS), - 'MIN_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS), - 'FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::FRACTION_DIGITS), - 'MULTIPLIER' => $c->getAttribute(\NumberFormatter::MULTIPLIER), - 'GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::GROUPING_SIZE), - 'ROUNDING_MODE' => $c->getAttribute(\NumberFormatter::ROUNDING_MODE), - 'ROUNDING_INCREMENT' => $c->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), - 'FORMAT_WIDTH' => $c->getAttribute(\NumberFormatter::FORMAT_WIDTH), - 'PADDING_POSITION' => $c->getAttribute(\NumberFormatter::PADDING_POSITION), - 'SECONDARY_GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE), - 'SIGNIFICANT_DIGITS_USED' => $c->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED), - 'MIN_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS), - 'MAX_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS), - 'LENIENT_PARSE' => $c->getAttribute(\NumberFormatter::LENIENT_PARSE), - ] - ), - Caster::PREFIX_VIRTUAL.'text_attributes' => new EnumStub( - [ - 'POSITIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX), - 'POSITIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX), - 'NEGATIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX), - 'NEGATIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX), - 'PADDING_CHARACTER' => $c->getTextAttribute(\NumberFormatter::PADDING_CHARACTER), - 'CURRENCY_CODE' => $c->getTextAttribute(\NumberFormatter::CURRENCY_CODE), - 'DEFAULT_RULESET' => $c->getTextAttribute(\NumberFormatter::DEFAULT_RULESET), - 'PUBLIC_RULESETS' => $c->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS), - ] - ), - Caster::PREFIX_VIRTUAL.'symbols' => new EnumStub( - [ - 'DECIMAL_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL), - 'GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL), - 'PATTERN_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL), - 'PERCENT_SYMBOL' => $c->getSymbol(\NumberFormatter::PERCENT_SYMBOL), - 'ZERO_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL), - 'DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::DIGIT_SYMBOL), - 'MINUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL), - 'PLUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL), - 'CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::CURRENCY_SYMBOL), - 'INTL_CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL), - 'MONETARY_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL), - 'EXPONENTIAL_SYMBOL' => $c->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL), - 'PERMILL_SYMBOL' => $c->getSymbol(\NumberFormatter::PERMILL_SYMBOL), - 'PAD_ESCAPE_SYMBOL' => $c->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL), - 'INFINITY_SYMBOL' => $c->getSymbol(\NumberFormatter::INFINITY_SYMBOL), - 'NAN_SYMBOL' => $c->getSymbol(\NumberFormatter::NAN_SYMBOL), - 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), - 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL), - ] - ), - ]; - - return self::castError($c, $a); - } - - public static function castIntlTimeZone(\IntlTimeZone $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'display_name' => $c->getDisplayName(), - Caster::PREFIX_VIRTUAL.'id' => $c->getID(), - Caster::PREFIX_VIRTUAL.'raw_offset' => $c->getRawOffset(), - ]; - - if ($c->useDaylightTime()) { - $a += [ - Caster::PREFIX_VIRTUAL.'dst_savings' => $c->getDSTSavings(), - ]; - } - - return self::castError($c, $a); - } - - public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'type' => $c->getType(), - Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(), - Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(), - Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'time' => $c->getTime(), - Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(), - Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - public static function castIntlDateFormatter(\IntlDateFormatter $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - Caster::PREFIX_VIRTUAL.'calendar' => $c->getCalendar(), - Caster::PREFIX_VIRTUAL.'time_zone_id' => $c->getTimeZoneId(), - Caster::PREFIX_VIRTUAL.'time_type' => $c->getTimeType(), - Caster::PREFIX_VIRTUAL.'date_type' => $c->getDateType(), - Caster::PREFIX_VIRTUAL.'calendar_object' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getCalendarObject()) : $c->getCalendarObject(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - private static function castError(object $c, array $a): array - { - if ($errorCode = $c->getErrorCode()) { - $a += [ - Caster::PREFIX_VIRTUAL.'error_code' => $errorCode, - Caster::PREFIX_VIRTUAL.'error_message' => $c->getErrorMessage(), - ]; - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/LinkStub.php b/lib/symfony/var-dumper/Caster/LinkStub.php deleted file mode 100644 index 7e0780339..000000000 --- a/lib/symfony/var-dumper/Caster/LinkStub.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a file or a URL. - * - * @author Nicolas Grekas - */ -class LinkStub extends ConstStub -{ - public $inVendor = false; - - private static $vendorRoots; - private static $composerRoots; - - public function __construct(string $label, int $line = 0, string $href = null) - { - $this->value = $label; - - if (null === $href) { - $href = $label; - } - if (!\is_string($href)) { - return; - } - if (str_starts_with($href, 'file://')) { - if ($href === $label) { - $label = substr($label, 7); - } - $href = substr($href, 7); - } elseif (str_contains($href, '://')) { - $this->attr['href'] = $href; - - return; - } - if (!is_file($href)) { - return; - } - if ($line) { - $this->attr['line'] = $line; - } - if ($label !== $this->attr['file'] = realpath($href) ?: $href) { - return; - } - if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) { - $this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1; - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode('', \array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); - } elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) { - $this->attr['ellipsis'] = 2 + \strlen(implode('', \array_slice($ellipsis, -2))); - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1; - } - } - - private function getComposerRoot(string $file, bool &$inVendor) - { - if (null === self::$vendorRoots) { - self::$vendorRoots = []; - - foreach (get_declared_classes() as $class) { - if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $v = \dirname($r->getFileName(), 2); - if (is_file($v.'/composer/installed.json')) { - self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR; - } - } - } - } - $inVendor = false; - - if (isset(self::$composerRoots[$dir = \dirname($file)])) { - return self::$composerRoots[$dir]; - } - - foreach (self::$vendorRoots as $root) { - if ($inVendor = str_starts_with($file, $root)) { - return $root; - } - } - - $parent = $dir; - while (!@is_file($parent.'/composer.json')) { - if (!@file_exists($parent)) { - // open_basedir restriction in effect - break; - } - if ($parent === \dirname($parent)) { - return self::$composerRoots[$dir] = false; - } - - $parent = \dirname($parent); - } - - return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR; - } -} diff --git a/lib/symfony/var-dumper/Caster/MemcachedCaster.php b/lib/symfony/var-dumper/Caster/MemcachedCaster.php deleted file mode 100644 index cfef19acc..000000000 --- a/lib/symfony/var-dumper/Caster/MemcachedCaster.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Jan Schädlich - * - * @final - */ -class MemcachedCaster -{ - private static $optionConstants; - private static $defaultOptions; - - public static function castMemcached(\Memcached $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'servers' => $c->getServerList(), - Caster::PREFIX_VIRTUAL.'options' => new EnumStub( - self::getNonDefaultOptions($c) - ), - ]; - - return $a; - } - - private static function getNonDefaultOptions(\Memcached $c): array - { - self::$defaultOptions = self::$defaultOptions ?? self::discoverDefaultOptions(); - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - $nonDefaultOptions = []; - foreach (self::$optionConstants as $constantKey => $value) { - if (self::$defaultOptions[$constantKey] !== $option = $c->getOption($value)) { - $nonDefaultOptions[$constantKey] = $option; - } - } - - return $nonDefaultOptions; - } - - private static function discoverDefaultOptions(): array - { - $defaultMemcached = new \Memcached(); - $defaultMemcached->addServer('127.0.0.1', 11211); - - $defaultOptions = []; - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - foreach (self::$optionConstants as $constantKey => $value) { - $defaultOptions[$constantKey] = $defaultMemcached->getOption($value); - } - - return $defaultOptions; - } - - private static function getOptionConstants(): array - { - $reflectedMemcached = new \ReflectionClass(\Memcached::class); - - $optionConstants = []; - foreach ($reflectedMemcached->getConstants() as $constantKey => $value) { - if (str_starts_with($constantKey, 'OPT_')) { - $optionConstants[$constantKey] = $value; - } - } - - return $optionConstants; - } -} diff --git a/lib/symfony/var-dumper/Caster/MysqliCaster.php b/lib/symfony/var-dumper/Caster/MysqliCaster.php deleted file mode 100644 index bfe6f0822..000000000 --- a/lib/symfony/var-dumper/Caster/MysqliCaster.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class MysqliCaster -{ - public static function castMysqliDriver(\mysqli_driver $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($a as $k => $v) { - if (isset($c->$k)) { - $a[$k] = $c->$k; - } - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/PdoCaster.php b/lib/symfony/var-dumper/Caster/PdoCaster.php deleted file mode 100644 index 140473b53..000000000 --- a/lib/symfony/var-dumper/Caster/PdoCaster.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts PDO related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class PdoCaster -{ - private const PDO_ATTRIBUTES = [ - 'CASE' => [ - \PDO::CASE_LOWER => 'LOWER', - \PDO::CASE_NATURAL => 'NATURAL', - \PDO::CASE_UPPER => 'UPPER', - ], - 'ERRMODE' => [ - \PDO::ERRMODE_SILENT => 'SILENT', - \PDO::ERRMODE_WARNING => 'WARNING', - \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', - ], - 'TIMEOUT', - 'PREFETCH', - 'AUTOCOMMIT', - 'PERSISTENT', - 'DRIVER_NAME', - 'SERVER_INFO', - 'ORACLE_NULLS' => [ - \PDO::NULL_NATURAL => 'NATURAL', - \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', - \PDO::NULL_TO_STRING => 'TO_STRING', - ], - 'CLIENT_VERSION', - 'SERVER_VERSION', - 'STATEMENT_CLASS', - 'EMULATE_PREPARES', - 'CONNECTION_STATUS', - 'STRINGIFY_FETCHES', - 'DEFAULT_FETCH_MODE' => [ - \PDO::FETCH_ASSOC => 'ASSOC', - \PDO::FETCH_BOTH => 'BOTH', - \PDO::FETCH_LAZY => 'LAZY', - \PDO::FETCH_NUM => 'NUM', - \PDO::FETCH_OBJ => 'OBJ', - ], - ]; - - public static function castPdo(\PDO $c, array $a, Stub $stub, bool $isNested) - { - $attr = []; - $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); - $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - - foreach (self::PDO_ATTRIBUTES as $k => $v) { - if (!isset($k[0])) { - $k = $v; - $v = []; - } - - try { - $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k)); - if ($v && isset($v[$attr[$k]])) { - $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); - } - } catch (\Exception $e) { - } - } - if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { - if ($attr[$k][1]) { - $attr[$k][1] = new ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); - } - $attr[$k][0] = new ClassStub($attr[$k][0]); - } - - $prefix = Caster::PREFIX_VIRTUAL; - $a += [ - $prefix.'inTransaction' => method_exists($c, 'inTransaction'), - $prefix.'errorInfo' => $c->errorInfo(), - $prefix.'attributes' => new EnumStub($attr), - ]; - - if ($a[$prefix.'inTransaction']) { - $a[$prefix.'inTransaction'] = $c->inTransaction(); - } else { - unset($a[$prefix.'inTransaction']); - } - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); - - return $a; - } - - public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $a[$prefix.'errorInfo'] = $c->errorInfo(); - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/PgSqlCaster.php b/lib/symfony/var-dumper/Caster/PgSqlCaster.php deleted file mode 100644 index d8e5b5253..000000000 --- a/lib/symfony/var-dumper/Caster/PgSqlCaster.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts pqsql resources to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class PgSqlCaster -{ - private const PARAM_CODES = [ - 'server_encoding', - 'client_encoding', - 'is_superuser', - 'session_authorization', - 'DateStyle', - 'TimeZone', - 'IntervalStyle', - 'integer_datetimes', - 'application_name', - 'standard_conforming_strings', - ]; - - private const TRANSACTION_STATUS = [ - \PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', - \PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', - \PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', - \PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', - \PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', - ]; - - private const RESULT_STATUS = [ - \PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', - \PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', - \PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', - \PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', - \PGSQL_COPY_IN => 'PGSQL_COPY_IN', - \PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', - \PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', - \PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', - ]; - - private const DIAG_CODES = [ - 'severity' => \PGSQL_DIAG_SEVERITY, - 'sqlstate' => \PGSQL_DIAG_SQLSTATE, - 'message' => \PGSQL_DIAG_MESSAGE_PRIMARY, - 'detail' => \PGSQL_DIAG_MESSAGE_DETAIL, - 'hint' => \PGSQL_DIAG_MESSAGE_HINT, - 'statement position' => \PGSQL_DIAG_STATEMENT_POSITION, - 'internal position' => \PGSQL_DIAG_INTERNAL_POSITION, - 'internal query' => \PGSQL_DIAG_INTERNAL_QUERY, - 'context' => \PGSQL_DIAG_CONTEXT, - 'file' => \PGSQL_DIAG_SOURCE_FILE, - 'line' => \PGSQL_DIAG_SOURCE_LINE, - 'function' => \PGSQL_DIAG_SOURCE_FUNCTION, - ]; - - public static function castLargeObject($lo, array $a, Stub $stub, bool $isNested) - { - $a['seek position'] = pg_lo_tell($lo); - - return $a; - } - - public static function castLink($link, array $a, Stub $stub, bool $isNested) - { - $a['status'] = pg_connection_status($link); - $a['status'] = new ConstStub(\PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); - $a['busy'] = pg_connection_busy($link); - - $a['transaction'] = pg_transaction_status($link); - if (isset(self::TRANSACTION_STATUS[$a['transaction']])) { - $a['transaction'] = new ConstStub(self::TRANSACTION_STATUS[$a['transaction']], $a['transaction']); - } - - $a['pid'] = pg_get_pid($link); - $a['last error'] = pg_last_error($link); - $a['last notice'] = pg_last_notice($link); - $a['host'] = pg_host($link); - $a['port'] = pg_port($link); - $a['dbname'] = pg_dbname($link); - $a['options'] = pg_options($link); - $a['version'] = pg_version($link); - - foreach (self::PARAM_CODES as $v) { - if (false !== $s = pg_parameter_status($link, $v)) { - $a['param'][$v] = $s; - } - } - - $a['param']['client_encoding'] = pg_client_encoding($link); - $a['param'] = new EnumStub($a['param']); - - return $a; - } - - public static function castResult($result, array $a, Stub $stub, bool $isNested) - { - $a['num rows'] = pg_num_rows($result); - $a['status'] = pg_result_status($result); - if (isset(self::RESULT_STATUS[$a['status']])) { - $a['status'] = new ConstStub(self::RESULT_STATUS[$a['status']], $a['status']); - } - $a['command-completion tag'] = pg_result_status($result, \PGSQL_STATUS_STRING); - - if (-1 === $a['num rows']) { - foreach (self::DIAG_CODES as $k => $v) { - $a['error'][$k] = pg_result_error_field($result, $v); - } - } - - $a['affected rows'] = pg_affected_rows($result); - $a['last OID'] = pg_last_oid($result); - - $fields = pg_num_fields($result); - - for ($i = 0; $i < $fields; ++$i) { - $field = [ - 'name' => pg_field_name($result, $i), - 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), - 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), - 'nullable' => (bool) pg_field_is_null($result, $i), - 'storage' => pg_field_size($result, $i).' bytes', - 'display' => pg_field_prtlen($result, $i).' chars', - ]; - if (' (OID: )' === $field['table']) { - $field['table'] = null; - } - if ('-1 bytes' === $field['storage']) { - $field['storage'] = 'variable size'; - } elseif ('1 bytes' === $field['storage']) { - $field['storage'] = '1 byte'; - } - if ('1 chars' === $field['display']) { - $field['display'] = '1 char'; - } - $a['fields'][] = new EnumStub($field); - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/ProxyManagerCaster.php b/lib/symfony/var-dumper/Caster/ProxyManagerCaster.php deleted file mode 100644 index e7120191f..000000000 --- a/lib/symfony/var-dumper/Caster/ProxyManagerCaster.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use ProxyManager\Proxy\ProxyInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * - * @final - */ -class ProxyManagerCaster -{ - public static function castProxy(ProxyInterface $c, array $a, Stub $stub, bool $isNested) - { - if ($parent = get_parent_class($c)) { - $stub->class .= ' - '.$parent; - } - $stub->class .= '@proxy'; - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/RdKafkaCaster.php b/lib/symfony/var-dumper/Caster/RdKafkaCaster.php deleted file mode 100644 index db4bba8d3..000000000 --- a/lib/symfony/var-dumper/Caster/RdKafkaCaster.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use RdKafka\Conf; -use RdKafka\Exception as RdKafkaException; -use RdKafka\KafkaConsumer; -use RdKafka\Message; -use RdKafka\Metadata\Broker as BrokerMetadata; -use RdKafka\Metadata\Collection as CollectionMetadata; -use RdKafka\Metadata\Partition as PartitionMetadata; -use RdKafka\Metadata\Topic as TopicMetadata; -use RdKafka\Topic; -use RdKafka\TopicConf; -use RdKafka\TopicPartition; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts RdKafka related classes to array representation. - * - * @author Romain Neutron - */ -class RdKafkaCaster -{ - public static function castKafkaConsumer(KafkaConsumer $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - try { - $assignment = $c->getAssignment(); - } catch (RdKafkaException $e) { - $assignment = []; - } - - $a += [ - $prefix.'subscription' => $c->getSubscription(), - $prefix.'assignment' => $assignment, - ]; - - $a += self::extractMetadata($c); - - return $a; - } - - public static function castTopic(Topic $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'name' => $c->getName(), - ]; - - return $a; - } - - public static function castTopicPartition(TopicPartition $c, array $a) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'offset' => $c->getOffset(), - $prefix.'partition' => $c->getPartition(), - $prefix.'topic' => $c->getTopic(), - ]; - - return $a; - } - - public static function castMessage(Message $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'errstr' => $c->errstr(), - ]; - - return $a; - } - - public static function castConf(Conf $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($c->dump() as $key => $value) { - $a[$prefix.$key] = $value; - } - - return $a; - } - - public static function castTopicConf(TopicConf $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($c->dump() as $key => $value) { - $a[$prefix.$key] = $value; - } - - return $a; - } - - public static function castRdKafka(\RdKafka $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'out_q_len' => $c->getOutQLen(), - ]; - - $a += self::extractMetadata($c); - - return $a; - } - - public static function castCollectionMetadata(CollectionMetadata $c, array $a, Stub $stub, bool $isNested) - { - $a += iterator_to_array($c); - - return $a; - } - - public static function castTopicMetadata(TopicMetadata $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'name' => $c->getTopic(), - $prefix.'partitions' => $c->getPartitions(), - ]; - - return $a; - } - - public static function castPartitionMetadata(PartitionMetadata $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'id' => $c->getId(), - $prefix.'err' => $c->getErr(), - $prefix.'leader' => $c->getLeader(), - ]; - - return $a; - } - - public static function castBrokerMetadata(BrokerMetadata $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'id' => $c->getId(), - $prefix.'host' => $c->getHost(), - $prefix.'port' => $c->getPort(), - ]; - - return $a; - } - - private static function extractMetadata($c) - { - $prefix = Caster::PREFIX_VIRTUAL; - - try { - $m = $c->getMetadata(true, null, 500); - } catch (RdKafkaException $e) { - return []; - } - - return [ - $prefix.'orig_broker_id' => $m->getOrigBrokerId(), - $prefix.'orig_broker_name' => $m->getOrigBrokerName(), - $prefix.'brokers' => $m->getBrokers(), - $prefix.'topics' => $m->getTopics(), - ]; - } -} diff --git a/lib/symfony/var-dumper/Caster/RedisCaster.php b/lib/symfony/var-dumper/Caster/RedisCaster.php deleted file mode 100644 index 8f97eaad3..000000000 --- a/lib/symfony/var-dumper/Caster/RedisCaster.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Redis class from ext-redis to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class RedisCaster -{ - private const SERIALIZERS = [ - \Redis::SERIALIZER_NONE => 'NONE', - \Redis::SERIALIZER_PHP => 'PHP', - 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY - ]; - - private const MODES = [ - \Redis::ATOMIC => 'ATOMIC', - \Redis::MULTI => 'MULTI', - \Redis::PIPELINE => 'PIPELINE', - ]; - - private const COMPRESSION_MODES = [ - 0 => 'NONE', // Redis::COMPRESSION_NONE - 1 => 'LZF', // Redis::COMPRESSION_LZF - ]; - - private const FAILOVER_OPTIONS = [ - \RedisCluster::FAILOVER_NONE => 'NONE', - \RedisCluster::FAILOVER_ERROR => 'ERROR', - \RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', - \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES', - ]; - - public static function castRedis(\Redis $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if (!$connected = $c->isConnected()) { - return $a + [ - $prefix.'isConnected' => $connected, - ]; - } - - $mode = $c->getMode(); - - return $a + [ - $prefix.'isConnected' => $connected, - $prefix.'host' => $c->getHost(), - $prefix.'port' => $c->getPort(), - $prefix.'auth' => $c->getAuth(), - $prefix.'mode' => isset(self::MODES[$mode]) ? new ConstStub(self::MODES[$mode], $mode) : $mode, - $prefix.'dbNum' => $c->getDbNum(), - $prefix.'timeout' => $c->getTimeout(), - $prefix.'lastError' => $c->getLastError(), - $prefix.'persistentId' => $c->getPersistentID(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - return $a + [ - $prefix.'hosts' => $c->_hosts(), - $prefix.'function' => ClassStub::wrapCallable($c->_function()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisCluster(\RedisCluster $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER); - - $a += [ - $prefix.'_masters' => $c->_masters(), - $prefix.'_redir' => $c->_redir(), - $prefix.'mode' => new ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c, [ - 'SLAVE_FAILOVER' => isset(self::FAILOVER_OPTIONS[$failover]) ? new ConstStub(self::FAILOVER_OPTIONS[$failover], $failover) : $failover, - ]), - ]; - - return $a; - } - - /** - * @param \Redis|\RedisArray|\RedisCluster $redis - */ - private static function getRedisOptions($redis, array $options = []): EnumStub - { - $serializer = $redis->getOption(\Redis::OPT_SERIALIZER); - if (\is_array($serializer)) { - foreach ($serializer as &$v) { - if (isset(self::SERIALIZERS[$v])) { - $v = new ConstStub(self::SERIALIZERS[$v], $v); - } - } - } elseif (isset(self::SERIALIZERS[$serializer])) { - $serializer = new ConstStub(self::SERIALIZERS[$serializer], $serializer); - } - - $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0; - if (\is_array($compression)) { - foreach ($compression as &$v) { - if (isset(self::COMPRESSION_MODES[$v])) { - $v = new ConstStub(self::COMPRESSION_MODES[$v], $v); - } - } - } elseif (isset(self::COMPRESSION_MODES[$compression])) { - $compression = new ConstStub(self::COMPRESSION_MODES[$compression], $compression); - } - - $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0; - if (\is_array($retry)) { - foreach ($retry as &$v) { - $v = new ConstStub($v ? 'RETRY' : 'NORETRY', $v); - } - } else { - $retry = new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry); - } - - $options += [ - 'TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0, - 'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT), - 'COMPRESSION' => $compression, - 'SERIALIZER' => $serializer, - 'PREFIX' => $redis->getOption(\Redis::OPT_PREFIX), - 'SCAN' => $retry, - ]; - - return new EnumStub($options); - } -} diff --git a/lib/symfony/var-dumper/Caster/ReflectionCaster.php b/lib/symfony/var-dumper/Caster/ReflectionCaster.php deleted file mode 100644 index 274ee0d98..000000000 --- a/lib/symfony/var-dumper/Caster/ReflectionCaster.php +++ /dev/null @@ -1,442 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Reflector related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class ReflectionCaster -{ - public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo']; - - private const EXTRA_MAP = [ - 'docComment' => 'getDocComment', - 'extension' => 'getExtensionName', - 'isDisabled' => 'isDisabled', - 'isDeprecated' => 'isDeprecated', - 'isInternal' => 'isInternal', - 'isUserDefined' => 'isUserDefined', - 'isGenerator' => 'isGenerator', - 'isVariadic' => 'isVariadic', - ]; - - public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - $c = new \ReflectionFunction($c); - - $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); - - if (!str_contains($c->name, '{closure}')) { - $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; - unset($a[$prefix.'class']); - } - unset($a[$prefix.'extra']); - - $stub->class .= self::getSignature($a); - - if ($f = $c->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $c->getStartLine(); - } - - unset($a[$prefix.'parameters']); - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += ($c->getFileName() ? 2 : 0) + \count($a); - - return []; - } - - if ($f) { - $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); - $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - return $a; - } - - public static function unsetClosureFileInfo(\Closure $c, array $a) - { - unset($a[Caster::PREFIX_VIRTUAL.'file'], $a[Caster::PREFIX_VIRTUAL.'line']); - - return $a; - } - - public static function castGenerator(\Generator $c, array $a, Stub $stub, bool $isNested) - { - // Cannot create ReflectionGenerator based on a terminated Generator - try { - $reflectionGenerator = new \ReflectionGenerator($c); - } catch (\Exception $e) { - $a[Caster::PREFIX_VIRTUAL.'closed'] = true; - - return $a; - } - - return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); - } - - public static function castType(\ReflectionType $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c instanceof \ReflectionNamedType || \PHP_VERSION_ID < 80000) { - $a += [ - $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c, - $prefix.'allowsNull' => $c->allowsNull(), - $prefix.'isBuiltin' => $c->isBuiltin(), - ]; - } elseif ($c instanceof \ReflectionUnionType || $c instanceof \ReflectionIntersectionType) { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - self::addMap($a, $c, [ - 'types' => 'getTypes', - ]); - } else { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - } - - return $a; - } - - public static function castAttribute(\ReflectionAttribute $c, array $a, Stub $stub, bool $isNested) - { - self::addMap($a, $c, [ - 'name' => 'getName', - 'arguments' => 'getArguments', - ]); - - return $a; - } - - public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c->getThis()) { - $a[$prefix.'this'] = new CutStub($c->getThis()); - } - $function = $c->getFunction(); - $frame = [ - 'class' => $function->class ?? null, - 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, - 'function' => $function->name, - 'file' => $c->getExecutingFile(), - 'line' => $c->getExecutingLine(), - ]; - if ($trace = $c->getTrace(\DEBUG_BACKTRACE_IGNORE_ARGS)) { - $function = new \ReflectionGenerator($c->getExecutingGenerator()); - array_unshift($trace, [ - 'function' => 'yield', - 'file' => $function->getExecutingFile(), - 'line' => $function->getExecutingLine() - (int) (\PHP_VERSION_ID < 80100), - ]); - $trace[] = $frame; - $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); - } else { - $function = new FrameStub($frame, false, true); - $function = ExceptionCaster::castFrameStub($function, [], $function, true); - $a[$prefix.'executing'] = $function[$prefix.'src']; - } - - $a[Caster::PREFIX_VIRTUAL.'closed'] = false; - - return $a; - } - - public static function castClass(\ReflectionClass $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($n = \Reflection::getModifierNames($c->getModifiers())) { - $a[$prefix.'modifiers'] = implode(' ', $n); - } - - self::addMap($a, $c, [ - 'extends' => 'getParentClass', - 'implements' => 'getInterfaceNames', - 'constants' => 'getReflectionConstants', - ]); - - foreach ($c->getProperties() as $n) { - $a[$prefix.'properties'][$n->name] = $n; - } - - foreach ($c->getMethods() as $n) { - $a[$prefix.'methods'][$n->name] = $n; - } - - self::addAttributes($a, $c, $prefix); - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'returnsReference' => 'returnsReference', - 'returnType' => 'getReturnType', - 'class' => 'getClosureScopeClass', - 'this' => 'getClosureThis', - ]); - - if (isset($a[$prefix.'returnType'])) { - $v = $a[$prefix.'returnType']; - $v = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType'] instanceof \ReflectionNamedType && $a[$prefix.'returnType']->allowsNull() && 'mixed' !== $v ? '?'.$v : $v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } - if (isset($a[$prefix.'class'])) { - $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); - } - if (isset($a[$prefix.'this'])) { - $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); - } - - foreach ($c->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isVariadic()) { - $k = '...'.$k; - } - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - $a[$prefix.'parameters'][$k] = $v; - } - if (isset($a[$prefix.'parameters'])) { - $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); - } - - self::addAttributes($a, $c, $prefix); - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $v = $c->getStaticVariables()) { - foreach ($v as $k => &$v) { - if (\is_object($v)) { - $a[$prefix.'use']['$'.$k] = new CutStub($v); - } else { - $a[$prefix.'use']['$'.$k] = &$v; - } - } - unset($v); - $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castClassConstant(\ReflectionClassConstant $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - $a[Caster::PREFIX_VIRTUAL.'value'] = $c->getValue(); - - self::addAttributes($a, $c); - - return $a; - } - - public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - - return $a; - } - - public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'position' => 'getPosition', - 'isVariadic' => 'isVariadic', - 'byReference' => 'isPassedByReference', - 'allowsNull' => 'allowsNull', - ]); - - self::addAttributes($a, $c, $prefix); - - if ($v = $c->getType()) { - $a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - } - - if (isset($a[$prefix.'typeHint'])) { - $v = $a[$prefix.'typeHint']; - $a[$prefix.'typeHint'] = new ClassStub($v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } else { - unset($a[$prefix.'allowsNull']); - } - - if ($c->isOptional()) { - try { - $a[$prefix.'default'] = $v = $c->getDefaultValue(); - if ($c->isDefaultValueConstant()) { - $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); - } - if (null === $v) { - unset($a[$prefix.'allowsNull']); - } - } catch (\ReflectionException $e) { - } - } - - return $a; - } - - public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - - self::addAttributes($a, $c); - self::addExtra($a, $c); - - return $a; - } - - public static function castReference(\ReflectionReference $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'id'] = $c->getId(); - - return $a; - } - - public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, bool $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'dependencies' => 'getDependencies', - 'iniEntries' => 'getIniEntries', - 'isPersistent' => 'isPersistent', - 'isTemporary' => 'isTemporary', - 'constants' => 'getConstants', - 'functions' => 'getFunctions', - 'classes' => 'getClasses', - ]); - - return $a; - } - - public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, bool $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'author' => 'getAuthor', - 'copyright' => 'getCopyright', - 'url' => 'getURL', - ]); - - return $a; - } - - public static function getSignature(array $a) - { - $prefix = Caster::PREFIX_VIRTUAL; - $signature = ''; - - if (isset($a[$prefix.'parameters'])) { - foreach ($a[$prefix.'parameters']->value as $k => $param) { - $signature .= ', '; - if ($type = $param->getType()) { - if (!$type instanceof \ReflectionNamedType) { - $signature .= $type.' '; - } else { - if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) { - $signature .= '?'; - } - $signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' '; - } - } - $signature .= $k; - - if (!$param->isDefaultValueAvailable()) { - continue; - } - $v = $param->getDefaultValue(); - $signature .= ' = '; - - if ($param->isDefaultValueConstant()) { - $signature .= substr(strrchr('\\'.$param->getDefaultValueConstantName(), '\\'), 1); - } elseif (null === $v) { - $signature .= 'null'; - } elseif (\is_array($v)) { - $signature .= $v ? '[…'.\count($v).']' : '[]'; - } elseif (\is_string($v)) { - $signature .= 10 > \strlen($v) && !str_contains($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'"; - } elseif (\is_bool($v)) { - $signature .= $v ? 'true' : 'false'; - } elseif (\is_object($v)) { - $signature .= 'new '.substr(strrchr('\\'.get_debug_type($v), '\\'), 1); - } else { - $signature .= $v; - } - } - } - $signature = (empty($a[$prefix.'returnsReference']) ? '' : '&').'('.substr($signature, 2).')'; - - if (isset($a[$prefix.'returnType'])) { - $signature .= ': '.substr(strrchr('\\'.$a[$prefix.'returnType'], '\\'), 1); - } - - return $signature; - } - - private static function addExtra(array &$a, \Reflector $c) - { - $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : []; - - if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { - $x['file'] = new LinkStub($m, $c->getStartLine()); - $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - self::addMap($x, $c, self::EXTRA_MAP, ''); - - if ($x) { - $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); - } - } - - private static function addMap(array &$a, object $c, array $map, string $prefix = Caster::PREFIX_VIRTUAL) - { - foreach ($map as $k => $m) { - if (\PHP_VERSION_ID >= 80000 && 'isDisabled' === $k) { - continue; - } - - if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { - $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; - } - } - } - - private static function addAttributes(array &$a, \Reflector $c, string $prefix = Caster::PREFIX_VIRTUAL): void - { - if (\PHP_VERSION_ID >= 80000) { - foreach ($c->getAttributes() as $n) { - $a[$prefix.'attributes'][] = $n; - } - } - } -} diff --git a/lib/symfony/var-dumper/Caster/ResourceCaster.php b/lib/symfony/var-dumper/Caster/ResourceCaster.php deleted file mode 100644 index 2c34ca917..000000000 --- a/lib/symfony/var-dumper/Caster/ResourceCaster.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts common resource types to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class ResourceCaster -{ - /** - * @param \CurlHandle|resource $h - */ - public static function castCurl($h, array $a, Stub $stub, bool $isNested): array - { - return curl_getinfo($h); - } - - public static function castDba($dba, array $a, Stub $stub, bool $isNested) - { - $list = dba_list(); - $a['file'] = $list[(int) $dba]; - - return $a; - } - - public static function castProcess($process, array $a, Stub $stub, bool $isNested) - { - return proc_get_status($process); - } - - public static function castStream($stream, array $a, Stub $stub, bool $isNested) - { - $a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); - if ($a['uri'] ?? false) { - $a['uri'] = new LinkStub($a['uri']); - } - - return $a; - } - - public static function castStreamContext($stream, array $a, Stub $stub, bool $isNested) - { - return @stream_context_get_params($stream) ?: $a; - } - - public static function castGd($gd, array $a, Stub $stub, bool $isNested) - { - $a['size'] = imagesx($gd).'x'.imagesy($gd); - $a['trueColor'] = imageistruecolor($gd); - - return $a; - } - - public static function castMysqlLink($h, array $a, Stub $stub, bool $isNested) - { - $a['host'] = mysql_get_host_info($h); - $a['protocol'] = mysql_get_proto_info($h); - $a['server'] = mysql_get_server_info($h); - - return $a; - } - - public static function castOpensslX509($h, array $a, Stub $stub, bool $isNested) - { - $stub->cut = -1; - $info = openssl_x509_parse($h, false); - - $pin = openssl_pkey_get_public($h); - $pin = openssl_pkey_get_details($pin)['key']; - $pin = \array_slice(explode("\n", $pin), 1, -2); - $pin = base64_decode(implode('', $pin)); - $pin = base64_encode(hash('sha256', $pin, true)); - - $a += [ - 'subject' => new EnumStub(array_intersect_key($info['subject'], ['organizationName' => true, 'commonName' => true])), - 'issuer' => new EnumStub(array_intersect_key($info['issuer'], ['organizationName' => true, 'commonName' => true])), - 'expiry' => new ConstStub(date(\DateTime::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']), - 'fingerprint' => new EnumStub([ - 'md5' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'md5')), 2, ':', true)), - 'sha1' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha1')), 2, ':', true)), - 'sha256' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha256')), 2, ':', true)), - 'pin-sha256' => new ConstStub($pin), - ]), - ]; - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/SplCaster.php b/lib/symfony/var-dumper/Caster/SplCaster.php deleted file mode 100644 index 07f445116..000000000 --- a/lib/symfony/var-dumper/Caster/SplCaster.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts SPL related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class SplCaster -{ - private const SPL_FILE_OBJECT_FLAGS = [ - \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', - \SplFileObject::READ_AHEAD => 'READ_AHEAD', - \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', - \SplFileObject::READ_CSV => 'READ_CSV', - ]; - - public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, bool $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castArrayIterator(\ArrayIterator $c, array $a, Stub $stub, bool $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castHeap(\Iterator $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), - ]; - - return $a; - } - - public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $mode = $c->getIteratorMode(); - $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); - - $a += [ - $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), - $prefix.'dllist' => iterator_to_array($c), - ]; - $c->setIteratorMode($mode); - - return $a; - } - - public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, bool $isNested) - { - static $map = [ - 'path' => 'getPath', - 'filename' => 'getFilename', - 'basename' => 'getBasename', - 'pathname' => 'getPathname', - 'extension' => 'getExtension', - 'realPath' => 'getRealPath', - 'aTime' => 'getATime', - 'mTime' => 'getMTime', - 'cTime' => 'getCTime', - 'inode' => 'getInode', - 'size' => 'getSize', - 'perms' => 'getPerms', - 'owner' => 'getOwner', - 'group' => 'getGroup', - 'type' => 'getType', - 'writable' => 'isWritable', - 'readable' => 'isReadable', - 'executable' => 'isExecutable', - 'file' => 'isFile', - 'dir' => 'isDir', - 'link' => 'isLink', - 'linkTarget' => 'getLinkTarget', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - unset($a["\0SplFileInfo\0fileName"]); - unset($a["\0SplFileInfo\0pathName"]); - - if (\PHP_VERSION_ID < 80000) { - if (false === $c->getPathname()) { - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } else { - try { - $c->isReadable(); - } catch (\RuntimeException $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } catch (\Error $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if ($a[$prefix.'realPath'] ?? false) { - $a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']); - } - - if (isset($a[$prefix.'perms'])) { - $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); - } - - static $mapDate = ['aTime', 'mTime', 'cTime']; - foreach ($mapDate as $key) { - if (isset($a[$prefix.$key])) { - $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); - } - } - - return $a; - } - - public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, bool $isNested) - { - static $map = [ - 'csvControl' => 'getCsvControl', - 'flags' => 'getFlags', - 'maxLineLen' => 'getMaxLineLen', - 'fstat' => 'fstat', - 'eof' => 'eof', - 'key' => 'key', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if (isset($a[$prefix.'flags'])) { - $flagsArray = []; - foreach (self::SPL_FILE_OBJECT_FLAGS as $value => $name) { - if ($a[$prefix.'flags'] & $value) { - $flagsArray[] = $name; - } - } - $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); - } - - if (isset($a[$prefix.'fstat'])) { - $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], ['dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks']); - } - - return $a; - } - - public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, bool $isNested) - { - $storage = []; - unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 - unset($a["\0SplObjectStorage\0storage"]); - - $clone = clone $c; - foreach ($clone as $obj) { - $storage[] = [ - 'object' => $obj, - 'info' => $clone->getInfo(), - ]; - } - - $a += [ - Caster::PREFIX_VIRTUAL.'storage' => $storage, - ]; - - return $a; - } - - public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); - - return $a; - } - - public static function castWeakReference(\WeakReference $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'object'] = $c->get(); - - return $a; - } - - private static function castSplArray($c, array $a, Stub $stub, bool $isNested): array - { - $prefix = Caster::PREFIX_VIRTUAL; - $flags = $c->getFlags(); - - if (!($flags & \ArrayObject::STD_PROP_LIST)) { - $c->setFlags(\ArrayObject::STD_PROP_LIST); - $a = Caster::castObject($c, \get_class($c), method_exists($c, '__debugInfo'), $stub->class); - $c->setFlags($flags); - } - if (\PHP_VERSION_ID < 70400) { - $a[$prefix.'storage'] = $c->getArrayCopy(); - } - $a += [ - $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), - $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), - ]; - if ($c instanceof \ArrayObject) { - $a[$prefix.'iteratorClass'] = new ClassStub($c->getIteratorClass()); - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/StubCaster.php b/lib/symfony/var-dumper/Caster/StubCaster.php deleted file mode 100644 index 32ead7c27..000000000 --- a/lib/symfony/var-dumper/Caster/StubCaster.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts a caster's Stub. - * - * @author Nicolas Grekas - * - * @final - */ -class StubCaster -{ - public static function castStub(Stub $c, array $a, Stub $stub, bool $isNested) - { - if ($isNested) { - $stub->type = $c->type; - $stub->class = $c->class; - $stub->value = $c->value; - $stub->handle = $c->handle; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) { - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - } - - $a = []; - } - - return $a; - } - - public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, bool $isNested) - { - return $isNested ? $c->preservedSubset : $a; - } - - public static function cutInternals($obj, array $a, Stub $stub, bool $isNested) - { - if ($isNested) { - $stub->cut += \count($a); - - return []; - } - - return $a; - } - - public static function castEnum(EnumStub $c, array $a, Stub $stub, bool $isNested) - { - if ($isNested) { - $stub->class = $c->dumpKeys ? '' : null; - $stub->handle = 0; - $stub->value = null; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - $a = []; - - if ($c->value) { - foreach (array_keys($c->value) as $k) { - $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; - } - // Preserve references with array_combine() - $a = array_combine($keys, $c->value); - } - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/SymfonyCaster.php b/lib/symfony/var-dumper/Caster/SymfonyCaster.php deleted file mode 100644 index 08428b927..000000000 --- a/lib/symfony/var-dumper/Caster/SymfonyCaster.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Uid\Ulid; -use Symfony\Component\Uid\Uuid; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @final - */ -class SymfonyCaster -{ - private const REQUEST_GETTERS = [ - 'pathInfo' => 'getPathInfo', - 'requestUri' => 'getRequestUri', - 'baseUrl' => 'getBaseUrl', - 'basePath' => 'getBasePath', - 'method' => 'getMethod', - 'format' => 'getRequestFormat', - ]; - - public static function castRequest(Request $request, array $a, Stub $stub, bool $isNested) - { - $clone = null; - - foreach (self::REQUEST_GETTERS as $prop => $getter) { - $key = Caster::PREFIX_PROTECTED.$prop; - if (\array_key_exists($key, $a) && null === $a[$key]) { - if (null === $clone) { - $clone = clone $request; - } - $a[Caster::PREFIX_VIRTUAL.$prop] = $clone->{$getter}(); - } - } - - return $a; - } - - public static function castHttpClient($client, array $a, Stub $stub, bool $isNested) - { - $multiKey = sprintf("\0%s\0multi", \get_class($client)); - if (isset($a[$multiKey])) { - $a[$multiKey] = new CutStub($a[$multiKey]); - } - - return $a; - } - - public static function castHttpClientResponse($response, array $a, Stub $stub, bool $isNested) - { - $stub->cut += \count($a); - $a = []; - - foreach ($response->getInfo() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } - - public static function castUuid(Uuid $uuid, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'toBase58'] = $uuid->toBase58(); - $a[Caster::PREFIX_VIRTUAL.'toBase32'] = $uuid->toBase32(); - - // symfony/uid >= 5.3 - if (method_exists($uuid, 'getDateTime')) { - $a[Caster::PREFIX_VIRTUAL.'time'] = $uuid->getDateTime()->format('Y-m-d H:i:s.u \U\T\C'); - } - - return $a; - } - - public static function castUlid(Ulid $ulid, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'toBase58'] = $ulid->toBase58(); - $a[Caster::PREFIX_VIRTUAL.'toRfc4122'] = $ulid->toRfc4122(); - - // symfony/uid >= 5.3 - if (method_exists($ulid, 'getDateTime')) { - $a[Caster::PREFIX_VIRTUAL.'time'] = $ulid->getDateTime()->format('Y-m-d H:i:s.v \U\T\C'); - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/TraceStub.php b/lib/symfony/var-dumper/Caster/TraceStub.php deleted file mode 100644 index 5eea1c876..000000000 --- a/lib/symfony/var-dumper/Caster/TraceStub.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas - */ -class TraceStub extends Stub -{ - public $keepArgs; - public $sliceOffset; - public $sliceLength; - public $numberingOffset; - - public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0) - { - $this->value = $trace; - $this->keepArgs = $keepArgs; - $this->sliceOffset = $sliceOffset; - $this->sliceLength = $sliceLength; - $this->numberingOffset = $numberingOffset; - } -} diff --git a/lib/symfony/var-dumper/Caster/UuidCaster.php b/lib/symfony/var-dumper/Caster/UuidCaster.php deleted file mode 100644 index b10277457..000000000 --- a/lib/symfony/var-dumper/Caster/UuidCaster.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ramsey\Uuid\UuidInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau - */ -final class UuidCaster -{ - public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array - { - $a += [ - Caster::PREFIX_VIRTUAL.'uuid' => (string) $c, - ]; - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Caster/XmlReaderCaster.php b/lib/symfony/var-dumper/Caster/XmlReaderCaster.php deleted file mode 100644 index 5b455651b..000000000 --- a/lib/symfony/var-dumper/Caster/XmlReaderCaster.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XmlReader class to array representation. - * - * @author Baptiste Clavié - * - * @final - */ -class XmlReaderCaster -{ - private const NODE_TYPES = [ - \XMLReader::NONE => 'NONE', - \XMLReader::ELEMENT => 'ELEMENT', - \XMLReader::ATTRIBUTE => 'ATTRIBUTE', - \XMLReader::TEXT => 'TEXT', - \XMLReader::CDATA => 'CDATA', - \XMLReader::ENTITY_REF => 'ENTITY_REF', - \XMLReader::ENTITY => 'ENTITY', - \XMLReader::PI => 'PI (Processing Instruction)', - \XMLReader::COMMENT => 'COMMENT', - \XMLReader::DOC => 'DOC', - \XMLReader::DOC_TYPE => 'DOC_TYPE', - \XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT', - \XMLReader::NOTATION => 'NOTATION', - \XMLReader::WHITESPACE => 'WHITESPACE', - \XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', - \XMLReader::END_ELEMENT => 'END_ELEMENT', - \XMLReader::END_ENTITY => 'END_ENTITY', - \XMLReader::XML_DECLARATION => 'XML_DECLARATION', - ]; - - public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, bool $isNested) - { - try { - $properties = [ - 'LOADDTD' => @$reader->getParserProperty(\XMLReader::LOADDTD), - 'DEFAULTATTRS' => @$reader->getParserProperty(\XMLReader::DEFAULTATTRS), - 'VALIDATE' => @$reader->getParserProperty(\XMLReader::VALIDATE), - 'SUBST_ENTITIES' => @$reader->getParserProperty(\XMLReader::SUBST_ENTITIES), - ]; - } catch (\Error $e) { - $properties = [ - 'LOADDTD' => false, - 'DEFAULTATTRS' => false, - 'VALIDATE' => false, - 'SUBST_ENTITIES' => false, - ]; - } - - $props = Caster::PREFIX_VIRTUAL.'parserProperties'; - $info = [ - 'localName' => $reader->localName, - 'prefix' => $reader->prefix, - 'nodeType' => new ConstStub(self::NODE_TYPES[$reader->nodeType], $reader->nodeType), - 'depth' => $reader->depth, - 'isDefault' => $reader->isDefault, - 'isEmptyElement' => \XMLReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, - 'xmlLang' => $reader->xmlLang, - 'attributeCount' => $reader->attributeCount, - 'value' => $reader->value, - 'namespaceURI' => $reader->namespaceURI, - 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, - $props => $properties, - ]; - - if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, [], $count)) { - $info[$props] = new EnumStub($info[$props]); - $info[$props]->cut = $count; - } - - $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, [], $count); - // +2 because hasValue and hasAttributes are always filtered - $stub->cut += $count + 2; - - return $a + $info; - } -} diff --git a/lib/symfony/var-dumper/Caster/XmlResourceCaster.php b/lib/symfony/var-dumper/Caster/XmlResourceCaster.php deleted file mode 100644 index ba55fcedd..000000000 --- a/lib/symfony/var-dumper/Caster/XmlResourceCaster.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XML resources to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class XmlResourceCaster -{ - private const XML_ERRORS = [ - \XML_ERROR_NONE => 'XML_ERROR_NONE', - \XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', - \XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', - \XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', - \XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', - \XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', - \XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', - \XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', - \XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', - \XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', - \XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', - \XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', - \XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', - \XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', - \XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', - \XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', - \XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', - \XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', - \XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', - \XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', - \XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', - \XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', - ]; - - public static function castXml($h, array $a, Stub $stub, bool $isNested) - { - $a['current_byte_index'] = xml_get_current_byte_index($h); - $a['current_column_number'] = xml_get_current_column_number($h); - $a['current_line_number'] = xml_get_current_line_number($h); - $a['error_code'] = xml_get_error_code($h); - - if (isset(self::XML_ERRORS[$a['error_code']])) { - $a['error_code'] = new ConstStub(self::XML_ERRORS[$a['error_code']], $a['error_code']); - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Cloner/AbstractCloner.php b/lib/symfony/var-dumper/Cloner/AbstractCloner.php deleted file mode 100644 index f74a61d7a..000000000 --- a/lib/symfony/var-dumper/Cloner/AbstractCloner.php +++ /dev/null @@ -1,400 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * AbstractCloner implements a generic caster mechanism for objects and resources. - * - * @author Nicolas Grekas - */ -abstract class AbstractCloner implements ClonerInterface -{ - public static $defaultCasters = [ - '__PHP_Incomplete_Class' => ['Symfony\Component\VarDumper\Caster\Caster', 'castPhpIncompleteClass'], - - 'Symfony\Component\VarDumper\Caster\CutStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\CutArrayStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castCutArray'], - 'Symfony\Component\VarDumper\Caster\ConstStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\EnumStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castEnum'], - - 'Fiber' => ['Symfony\Component\VarDumper\Caster\FiberCaster', 'castFiber'], - - 'Closure' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClosure'], - 'Generator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castGenerator'], - 'ReflectionType' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castType'], - 'ReflectionAttribute' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castAttribute'], - 'ReflectionGenerator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReflectionGenerator'], - 'ReflectionClass' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClass'], - 'ReflectionClassConstant' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClassConstant'], - 'ReflectionFunctionAbstract' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castFunctionAbstract'], - 'ReflectionMethod' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castMethod'], - 'ReflectionParameter' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castParameter'], - 'ReflectionProperty' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castProperty'], - 'ReflectionReference' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReference'], - 'ReflectionExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castExtension'], - 'ReflectionZendExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castZendExtension'], - - 'Doctrine\Common\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Doctrine\Common\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castCommonProxy'], - 'Doctrine\ORM\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castOrmProxy'], - 'Doctrine\ORM\PersistentCollection' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castPersistentCollection'], - 'Doctrine\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'DOMException' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castException'], - 'DOMStringList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNameList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMImplementation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castImplementation'], - 'DOMImplementationList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNode'], - 'DOMNameSpaceNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNameSpaceNode'], - 'DOMDocument' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocument'], - 'DOMNodeList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNamedNodeMap' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMCharacterData' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castCharacterData'], - 'DOMAttr' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'], - 'DOMElement' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'], - 'DOMText' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'], - 'DOMTypeinfo' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'], - 'DOMDomError' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'], - 'DOMLocator' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'], - 'DOMDocumentType' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'], - 'DOMNotation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'], - 'DOMEntity' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'], - 'DOMProcessingInstruction' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castProcessingInstruction'], - 'DOMXPath' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castXPath'], - - 'XMLReader' => ['Symfony\Component\VarDumper\Caster\XmlReaderCaster', 'castXmlReader'], - - 'ErrorException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castErrorException'], - 'Exception' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castException'], - 'Error' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castError'], - 'Symfony\Bridge\Monolog\Logger' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\DependencyInjection\ContainerInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\EventDispatcher\EventDispatcherInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\HttpClient\AmpHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\CurlHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\NativeHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\Response\AmpResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpClient\Response\CurlResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpClient\Response\NativeResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'], - 'Symfony\Component\Uid\Ulid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUlid'], - 'Symfony\Component\Uid\Uuid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUuid'], - 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'], - 'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'], - 'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'], - 'Symfony\Component\VarDumper\Cloner\AbstractCloner' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\ErrorHandler\Exception\SilencedErrorContext' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'], - - 'Imagine\Image\ImageInterface' => ['Symfony\Component\VarDumper\Caster\ImagineCaster', 'castImage'], - - 'Ramsey\Uuid\UuidInterface' => ['Symfony\Component\VarDumper\Caster\UuidCaster', 'castRamseyUuid'], - - 'ProxyManager\Proxy\ProxyInterface' => ['Symfony\Component\VarDumper\Caster\ProxyManagerCaster', 'castProxy'], - 'PHPUnit_Framework_MockObject_MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\Stub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Prophecy\Prophecy\ProphecySubjectInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Mockery\MockInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'PDO' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdo'], - 'PDOStatement' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdoStatement'], - - 'AMQPConnection' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castConnection'], - 'AMQPChannel' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castChannel'], - 'AMQPQueue' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castQueue'], - 'AMQPExchange' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castExchange'], - 'AMQPEnvelope' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castEnvelope'], - - 'ArrayObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayObject'], - 'ArrayIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayIterator'], - 'SplDoublyLinkedList' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castDoublyLinkedList'], - 'SplFileInfo' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileInfo'], - 'SplFileObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileObject'], - 'SplHeap' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'SplObjectStorage' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castObjectStorage'], - 'SplPriorityQueue' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'OuterIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castOuterIterator'], - 'WeakReference' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castWeakReference'], - - 'Redis' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'], - 'RedisArray' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'], - 'RedisCluster' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisCluster'], - - 'DateTimeInterface' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'], - 'DateInterval' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'], - 'DateTimeZone' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castTimeZone'], - 'DatePeriod' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castPeriod'], - - 'GMP' => ['Symfony\Component\VarDumper\Caster\GmpCaster', 'castGmp'], - - 'MessageFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castMessageFormatter'], - 'NumberFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castNumberFormatter'], - 'IntlTimeZone' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlTimeZone'], - 'IntlCalendar' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlCalendar'], - 'IntlDateFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlDateFormatter'], - - 'Memcached' => ['Symfony\Component\VarDumper\Caster\MemcachedCaster', 'castMemcached'], - - 'Ds\Collection' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castCollection'], - 'Ds\Map' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castMap'], - 'Ds\Pair' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPair'], - 'Symfony\Component\VarDumper\Caster\DsPairStub' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPairStub'], - - 'mysqli_driver' => ['Symfony\Component\VarDumper\Caster\MysqliCaster', 'castMysqliDriver'], - - 'CurlHandle' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - ':curl' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - - ':dba' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - ':dba persistent' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - - 'GdImage' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - ':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - - ':mysql link' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'], - ':pgsql large object' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'], - ':pgsql link' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql link persistent' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql result' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castResult'], - ':process' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castProcess'], - ':stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - - 'OpenSSLCertificate' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - ':OpenSSL X.509' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - - ':persistent stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - ':stream-context' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStreamContext'], - - 'XmlParser' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - ':xml' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - - 'RdKafka' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castRdKafka'], - 'RdKafka\Conf' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castConf'], - 'RdKafka\KafkaConsumer' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castKafkaConsumer'], - 'RdKafka\Metadata\Broker' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castBrokerMetadata'], - 'RdKafka\Metadata\Collection' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castCollectionMetadata'], - 'RdKafka\Metadata\Partition' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castPartitionMetadata'], - 'RdKafka\Metadata\Topic' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicMetadata'], - 'RdKafka\Message' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castMessage'], - 'RdKafka\Topic' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopic'], - 'RdKafka\TopicPartition' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicPartition'], - 'RdKafka\TopicConf' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicConf'], - ]; - - protected $maxItems = 2500; - protected $maxString = -1; - protected $minDepth = 1; - - /** - * @var array> - */ - private $casters = []; - - /** - * @var callable|null - */ - private $prevErrorHandler; - - private $classInfo = []; - private $filter = 0; - - /** - * @param callable[]|null $casters A map of casters - * - * @see addCasters - */ - public function __construct(array $casters = null) - { - if (null === $casters) { - $casters = static::$defaultCasters; - } - $this->addCasters($casters); - } - - /** - * Adds casters for resources and objects. - * - * Maps resources or objects types to a callback. - * Types are in the key, with a callable caster for value. - * Resource types are to be prefixed with a `:`, - * see e.g. static::$defaultCasters. - * - * @param callable[] $casters A map of casters - */ - public function addCasters(array $casters) - { - foreach ($casters as $type => $callback) { - $this->casters[$type][] = $callback; - } - } - - /** - * Sets the maximum number of items to clone past the minimum depth in nested structures. - */ - public function setMaxItems(int $maxItems) - { - $this->maxItems = $maxItems; - } - - /** - * Sets the maximum cloned length for strings. - */ - public function setMaxString(int $maxString) - { - $this->maxString = $maxString; - } - - /** - * Sets the minimum tree depth where we are guaranteed to clone all the items. After this - * depth is reached, only setMaxItems items will be cloned. - */ - public function setMinDepth(int $minDepth) - { - $this->minDepth = $minDepth; - } - - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * @param int $filter A bit field of Caster::EXCLUDE_* constants - * - * @return Data - */ - public function cloneVar($var, int $filter = 0) - { - $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) { - if (\E_RECOVERABLE_ERROR === $type || \E_USER_ERROR === $type) { - // Cloner never dies - throw new \ErrorException($msg, 0, $type, $file, $line); - } - - if ($this->prevErrorHandler) { - return ($this->prevErrorHandler)($type, $msg, $file, $line, $context); - } - - return false; - }); - $this->filter = $filter; - - if ($gc = gc_enabled()) { - gc_disable(); - } - try { - return new Data($this->doClone($var)); - } finally { - if ($gc) { - gc_enable(); - } - restore_error_handler(); - $this->prevErrorHandler = null; - } - } - - /** - * Effectively clones the PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return array - */ - abstract protected function doClone($var); - - /** - * Casts an object to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array - */ - protected function castObject(Stub $stub, bool $isNested) - { - $obj = $stub->value; - $class = $stub->class; - - if (\PHP_VERSION_ID < 80000 ? "\0" === ($class[15] ?? null) : str_contains($class, "@anonymous\0")) { - $stub->class = get_debug_type($obj); - } - if (isset($this->classInfo[$class])) { - [$i, $parents, $hasDebugInfo, $fileInfo] = $this->classInfo[$class]; - } else { - $i = 2; - $parents = [$class]; - $hasDebugInfo = method_exists($class, '__debugInfo'); - - foreach (class_parents($class) as $p) { - $parents[] = $p; - ++$i; - } - foreach (class_implements($class) as $p) { - $parents[] = $p; - ++$i; - } - $parents[] = '*'; - - $r = new \ReflectionClass($class); - $fileInfo = $r->isInternal() || $r->isSubclassOf(Stub::class) ? [] : [ - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - - $this->classInfo[$class] = [$i, $parents, $hasDebugInfo, $fileInfo]; - } - - $stub->attr += $fileInfo; - $a = Caster::castObject($obj, $class, $hasDebugInfo, $stub->class); - - try { - while ($i--) { - if (!empty($this->casters[$p = $parents[$i]])) { - foreach ($this->casters[$p] as $callback) { - $a = $callback($obj, $a, $stub, $isNested, $this->filter); - } - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } - - /** - * Casts a resource to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array - */ - protected function castResource(Stub $stub, bool $isNested) - { - $a = []; - $res = $stub->value; - $type = $stub->class; - - try { - if (!empty($this->casters[':'.$type])) { - foreach ($this->casters[':'.$type] as $callback) { - $a = $callback($res, $a, $stub, $isNested, $this->filter); - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } -} diff --git a/lib/symfony/var-dumper/Cloner/ClonerInterface.php b/lib/symfony/var-dumper/Cloner/ClonerInterface.php deleted file mode 100644 index 90b149532..000000000 --- a/lib/symfony/var-dumper/Cloner/ClonerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas - */ -interface ClonerInterface -{ - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return Data - */ - public function cloneVar($var); -} diff --git a/lib/symfony/var-dumper/Cloner/Cursor.php b/lib/symfony/var-dumper/Cloner/Cursor.php deleted file mode 100644 index 1fd796d67..000000000 --- a/lib/symfony/var-dumper/Cloner/Cursor.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the current state of a dumper while dumping. - * - * @author Nicolas Grekas - */ -class Cursor -{ - public const HASH_INDEXED = Stub::ARRAY_INDEXED; - public const HASH_ASSOC = Stub::ARRAY_ASSOC; - public const HASH_OBJECT = Stub::TYPE_OBJECT; - public const HASH_RESOURCE = Stub::TYPE_RESOURCE; - - public $depth = 0; - public $refIndex = 0; - public $softRefTo = 0; - public $softRefCount = 0; - public $softRefHandle = 0; - public $hardRefTo = 0; - public $hardRefCount = 0; - public $hardRefHandle = 0; - public $hashType; - public $hashKey; - public $hashKeyIsBinary; - public $hashIndex = 0; - public $hashLength = 0; - public $hashCut = 0; - public $stop = false; - public $attr = []; - public $skipChildren = false; -} diff --git a/lib/symfony/var-dumper/Cloner/Data.php b/lib/symfony/var-dumper/Cloner/Data.php deleted file mode 100644 index ea8f0f33a..000000000 --- a/lib/symfony/var-dumper/Cloner/Data.php +++ /dev/null @@ -1,468 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; - -/** - * @author Nicolas Grekas - */ -class Data implements \ArrayAccess, \Countable, \IteratorAggregate -{ - private $data; - private $position = 0; - private $key = 0; - private $maxDepth = 20; - private $maxItemsPerDepth = -1; - private $useRefHandles = -1; - private $context = []; - - /** - * @param array $data An array as returned by ClonerInterface::cloneVar() - */ - public function __construct(array $data) - { - $this->data = $data; - } - - /** - * @return string|null - */ - public function getType() - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!$item instanceof Stub) { - return \gettype($item); - } - if (Stub::TYPE_STRING === $item->type) { - return 'string'; - } - if (Stub::TYPE_ARRAY === $item->type) { - return 'array'; - } - if (Stub::TYPE_OBJECT === $item->type) { - return $item->class; - } - if (Stub::TYPE_RESOURCE === $item->type) { - return $item->class.' resource'; - } - - return null; - } - - /** - * Returns a native representation of the original value. - * - * @param array|bool $recursive Whether values should be resolved recursively or not - * - * @return string|int|float|bool|array|Data[]|null - */ - public function getValue($recursive = false) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub) { - return $item; - } - if (Stub::TYPE_STRING === $item->type) { - return $item->value; - } - - $children = $item->position ? $this->data[$item->position] : []; - - foreach ($children as $k => $v) { - if ($recursive && !($v = $this->getStub($v)) instanceof Stub) { - continue; - } - $children[$k] = clone $this; - $children[$k]->key = $k; - $children[$k]->position = $item->position; - - if ($recursive) { - if (Stub::TYPE_REF === $v->type && ($v = $this->getStub($v->value)) instanceof Stub) { - $recursive = (array) $recursive; - if (isset($recursive[$v->position])) { - continue; - } - $recursive[$v->position] = true; - } - $children[$k] = $children[$k]->getValue($recursive); - } - } - - return $children; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->getValue()); - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (!\is_array($value = $this->getValue())) { - throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, get_debug_type($value))); - } - - yield from $value; - } - - public function __get(string $key) - { - if (null !== $data = $this->seek($key)) { - $item = $this->getStub($data->data[$data->position][$data->key]); - - return $item instanceof Stub || [] === $item ? $data : $item; - } - - return null; - } - - /** - * @return bool - */ - public function __isset(string $key) - { - return null !== $this->seek($key); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->__isset($key); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->__get($key); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return string - */ - public function __toString() - { - $value = $this->getValue(); - - if (!\is_array($value)) { - return (string) $value; - } - - return sprintf('%s (count=%d)', $this->getType(), \count($value)); - } - - /** - * Returns a depth limited clone of $this. - * - * @return static - */ - public function withMaxDepth(int $maxDepth) - { - $data = clone $this; - $data->maxDepth = $maxDepth; - - return $data; - } - - /** - * Limits the number of elements per depth level. - * - * @return static - */ - public function withMaxItemsPerDepth(int $maxItemsPerDepth) - { - $data = clone $this; - $data->maxItemsPerDepth = $maxItemsPerDepth; - - return $data; - } - - /** - * Enables/disables objects' identifiers tracking. - * - * @param bool $useRefHandles False to hide global ref. handles - * - * @return static - */ - public function withRefHandles(bool $useRefHandles) - { - $data = clone $this; - $data->useRefHandles = $useRefHandles ? -1 : 0; - - return $data; - } - - /** - * @return static - */ - public function withContext(array $context) - { - $data = clone $this; - $data->context = $context; - - return $data; - } - - /** - * Seeks to a specific key in nested data structures. - * - * @param string|int $key The key to seek to - * - * @return static|null - */ - public function seek($key) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub || !$item->position) { - return null; - } - $keys = [$key]; - - switch ($item->type) { - case Stub::TYPE_OBJECT: - $keys[] = Caster::PREFIX_DYNAMIC.$key; - $keys[] = Caster::PREFIX_PROTECTED.$key; - $keys[] = Caster::PREFIX_VIRTUAL.$key; - $keys[] = "\0$item->class\0$key"; - // no break - case Stub::TYPE_ARRAY: - case Stub::TYPE_RESOURCE: - break; - default: - return null; - } - - $data = null; - $children = $this->data[$item->position]; - - foreach ($keys as $key) { - if (isset($children[$key]) || \array_key_exists($key, $children)) { - $data = clone $this; - $data->key = $key; - $data->position = $item->position; - break; - } - } - - return $data; - } - - /** - * Dumps data with a DumperInterface dumper. - */ - public function dump(DumperInterface $dumper) - { - $refs = [0]; - $cursor = new Cursor(); - - if ($cursor->attr = $this->context[SourceContextProvider::class] ?? []) { - $cursor->attr['if_links'] = true; - $cursor->hashType = -1; - $dumper->dumpScalar($cursor, 'default', '^'); - $cursor->attr = ['if_links' => true]; - $dumper->dumpScalar($cursor, 'default', ' '); - $cursor->hashType = 0; - } - - $this->dumpItem($dumper, $cursor, $refs, $this->data[$this->position][$this->key]); - } - - /** - * Depth-first dumping of items. - * - * @param mixed $item A Stub object or the original value being dumped - */ - private function dumpItem(DumperInterface $dumper, Cursor $cursor, array &$refs, $item) - { - $cursor->refIndex = 0; - $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; - $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; - $firstSeen = true; - - if (!$item instanceof Stub) { - $cursor->attr = []; - $type = \gettype($item); - if ($item && 'array' === $type) { - $item = $this->getStub($item); - } - } elseif (Stub::TYPE_REF === $item->type) { - if ($item->handle) { - if (!isset($refs[$r = $item->handle - (\PHP_INT_MAX >> 1)])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->hardRefTo = $refs[$r]; - $cursor->hardRefHandle = $this->useRefHandles & $item->handle; - $cursor->hardRefCount = 0 < $item->handle ? $item->refCount : 0; - } - $cursor->attr = $item->attr; - $type = $item->class ?: \gettype($item->value); - $item = $this->getStub($item->value); - } - if ($item instanceof Stub) { - if ($item->refCount) { - if (!isset($refs[$r = $item->handle])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->softRefTo = $refs[$r]; - } - $cursor->softRefHandle = $this->useRefHandles & $item->handle; - $cursor->softRefCount = $item->refCount; - $cursor->attr = $item->attr; - $cut = $item->cut; - - if ($item->position && $firstSeen) { - $children = $this->data[$item->position]; - - if ($cursor->stop) { - if ($cut >= 0) { - $cut += \count($children); - } - $children = []; - } - } else { - $children = []; - } - switch ($item->type) { - case Stub::TYPE_STRING: - $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); - break; - - case Stub::TYPE_ARRAY: - $item = clone $item; - $item->type = $item->class; - $item->class = $item->value; - // no break - case Stub::TYPE_OBJECT: - case Stub::TYPE_RESOURCE: - $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; - $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); - if ($withChildren) { - if ($cursor->skipChildren) { - $withChildren = false; - $cut = -1; - } else { - $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); - } - } elseif ($children && 0 <= $cut) { - $cut += \count($children); - } - $cursor->skipChildren = false; - $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); - break; - - default: - throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type)); - } - } elseif ('array' === $type) { - $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); - $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); - } elseif ('string' === $type) { - $dumper->dumpString($cursor, $item, false, 0); - } else { - $dumper->dumpScalar($cursor, $type, $item); - } - } - - /** - * Dumps children of hash structures. - * - * @return int The final number of removed items - */ - private function dumpChildren(DumperInterface $dumper, Cursor $parentCursor, array &$refs, array $children, int $hashCut, int $hashType, bool $dumpKeys): int - { - $cursor = clone $parentCursor; - ++$cursor->depth; - $cursor->hashType = $hashType; - $cursor->hashIndex = 0; - $cursor->hashLength = \count($children); - $cursor->hashCut = $hashCut; - foreach ($children as $key => $child) { - $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); - $cursor->hashKey = $dumpKeys ? $key : null; - $this->dumpItem($dumper, $cursor, $refs, $child); - if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { - $parentCursor->stop = true; - - return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; - } - } - - return $hashCut; - } - - private function getStub($item) - { - if (!$item || !\is_array($item)) { - return $item; - } - - $stub = new Stub(); - $stub->type = Stub::TYPE_ARRAY; - foreach ($item as $stub->class => $stub->position) { - } - if (isset($item[0])) { - $stub->cut = $item[0]; - } - $stub->value = $stub->cut + ($stub->position ? \count($this->data[$stub->position]) : 0); - - return $stub; - } -} diff --git a/lib/symfony/var-dumper/Cloner/DumperInterface.php b/lib/symfony/var-dumper/Cloner/DumperInterface.php deleted file mode 100644 index 6d60b723c..000000000 --- a/lib/symfony/var-dumper/Cloner/DumperInterface.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * DumperInterface used by Data objects. - * - * @author Nicolas Grekas - */ -interface DumperInterface -{ - /** - * Dumps a scalar value. - * - * @param string $type The PHP type of the value being dumped - * @param string|int|float|bool $value The scalar value being dumped - */ - public function dumpScalar(Cursor $cursor, string $type, $value); - - /** - * Dumps a string. - * - * @param string $str The string being dumped - * @param bool $bin Whether $str is UTF-8 or binary encoded - * @param int $cut The number of characters $str has been cut by - */ - public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut); - - /** - * Dumps while entering an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - */ - public function enterHash(Cursor $cursor, int $type, $class, bool $hasChild); - - /** - * Dumps while leaving an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int $cut); -} diff --git a/lib/symfony/var-dumper/Cloner/Stub.php b/lib/symfony/var-dumper/Cloner/Stub.php deleted file mode 100644 index 073c56efb..000000000 --- a/lib/symfony/var-dumper/Cloner/Stub.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the main properties of a PHP variable. - * - * @author Nicolas Grekas - */ -class Stub -{ - public const TYPE_REF = 1; - public const TYPE_STRING = 2; - public const TYPE_ARRAY = 3; - public const TYPE_OBJECT = 4; - public const TYPE_RESOURCE = 5; - - public const STRING_BINARY = 1; - public const STRING_UTF8 = 2; - - public const ARRAY_ASSOC = 1; - public const ARRAY_INDEXED = 2; - - public $type = self::TYPE_REF; - public $class = ''; - public $value; - public $cut = 0; - public $handle = 0; - public $refCount = 0; - public $position = 0; - public $attr = []; - - private static $defaultProperties = []; - - /** - * @internal - */ - public function __sleep(): array - { - $properties = []; - - if (!isset(self::$defaultProperties[$c = static::class])) { - self::$defaultProperties[$c] = get_class_vars($c); - - foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { - unset(self::$defaultProperties[$c][$k]); - } - } - - foreach (self::$defaultProperties[$c] as $k => $v) { - if ($this->$k !== $v) { - $properties[] = $k; - } - } - - return $properties; - } -} diff --git a/lib/symfony/var-dumper/Cloner/VarCloner.php b/lib/symfony/var-dumper/Cloner/VarCloner.php deleted file mode 100644 index 80c4a2f83..000000000 --- a/lib/symfony/var-dumper/Cloner/VarCloner.php +++ /dev/null @@ -1,311 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas - */ -class VarCloner extends AbstractCloner -{ - private static $gid; - private static $arrayCache = []; - - /** - * {@inheritdoc} - */ - protected function doClone($var) - { - $len = 1; // Length of $queue - $pos = 0; // Number of cloned items past the minimum depth - $refsCounter = 0; // Hard references counter - $queue = [[$var]]; // This breadth-first queue is the return value - $hardRefs = []; // Map of original zval ids to stub objects - $objRefs = []; // Map of original object handles to their stub object counterpart - $objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning - $resRefs = []; // Map of original resource handles to their stub object counterpart - $values = []; // Map of stub objects' ids to original values - $maxItems = $this->maxItems; - $maxString = $this->maxString; - $minDepth = $this->minDepth; - $currentDepth = 0; // Current tree depth - $currentDepthFinalIndex = 0; // Final $queue index for current tree depth - $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached - $cookie = (object) []; // Unique object used to detect hard references - $a = null; // Array cast for nested structures - $stub = null; // Stub capturing the main properties of an original item value - // or null if the original value is used directly - - if (!$gid = self::$gid) { - $gid = self::$gid = md5(random_bytes(6)); // Unique string used to detect the special $GLOBALS variable - } - $arrayStub = new Stub(); - $arrayStub->type = Stub::TYPE_ARRAY; - $fromObjCast = false; - - for ($i = 0; $i < $len; ++$i) { - // Detect when we move on to the next tree depth - if ($i > $currentDepthFinalIndex) { - ++$currentDepth; - $currentDepthFinalIndex = $len - 1; - if ($currentDepth >= $minDepth) { - $minimumDepthReached = true; - } - } - - $refs = $vals = $queue[$i]; - foreach ($vals as $k => $v) { - // $v is the original value or a stub object in case of hard references - - if (\PHP_VERSION_ID >= 70400) { - $zvalRef = ($r = \ReflectionReference::fromArrayElement($vals, $k)) ? $r->getId() : null; - } else { - $refs[$k] = $cookie; - $zvalRef = $vals[$k] === $cookie; - } - - if ($zvalRef) { - $vals[$k] = &$stub; // Break hard references to make $queue completely - unset($stub); // independent from the original structure - if (\PHP_VERSION_ID >= 70400 ? null !== $vals[$k] = $hardRefs[$zvalRef] ?? null : $v instanceof Stub && isset($hardRefs[spl_object_id($v)])) { - if (\PHP_VERSION_ID >= 70400) { - $v = $vals[$k]; - } else { - $refs[$k] = $vals[$k] = $v; - } - if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { - ++$v->value->refCount; - } - ++$v->refCount; - continue; - } - $vals[$k] = new Stub(); - $vals[$k]->value = $v; - $vals[$k]->handle = ++$refsCounter; - - if (\PHP_VERSION_ID >= 70400) { - $hardRefs[$zvalRef] = $vals[$k]; - } else { - $refs[$k] = $vals[$k]; - $h = spl_object_id($refs[$k]); - $hardRefs[$h] = &$refs[$k]; - $values[$h] = $v; - } - } - // Create $stub when the original value $v cannot be used directly - // If $v is a nested structure, put that structure in array $a - switch (true) { - case null === $v: - case \is_bool($v): - case \is_int($v): - case \is_float($v): - continue 2; - case \is_string($v): - if ('' === $v) { - continue 2; - } - if (!preg_match('//u', $v)) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - if (0 <= $maxString && 0 < $cut = \strlen($v) - $maxString) { - $stub->cut = $cut; - $stub->value = substr($v, 0, -$cut); - } else { - $stub->value = $v; - } - } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_UTF8; - $stub->cut = $cut; - $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); - } else { - continue 2; - } - $a = null; - break; - - case \is_array($v): - if (!$v) { - continue 2; - } - $stub = $arrayStub; - - if (\PHP_VERSION_ID >= 80100) { - $stub->class = array_is_list($v) ? Stub::ARRAY_INDEXED : Stub::ARRAY_ASSOC; - $a = $v; - break; - } - - $stub->class = Stub::ARRAY_INDEXED; - - $j = -1; - foreach ($v as $gk => $gv) { - if ($gk !== ++$j) { - $stub->class = Stub::ARRAY_ASSOC; - $a = $v; - $a[$gid] = true; - break; - } - } - - // Copies of $GLOBALS have very strange behavior, - // let's detect them with some black magic - if (isset($v[$gid])) { - unset($v[$gid]); - $a = []; - foreach ($v as $gk => &$gv) { - if ($v === $gv && (\PHP_VERSION_ID < 70400 || !isset($hardRefs[\ReflectionReference::fromArrayElement($v, $gk)->getId()]))) { - unset($v); - $v = new Stub(); - $v->value = [$v->cut = \count($gv), Stub::TYPE_ARRAY => 0]; - $v->handle = -1; - if (\PHP_VERSION_ID >= 70400) { - $gv = &$a[$gk]; - $hardRefs[\ReflectionReference::fromArrayElement($a, $gk)->getId()] = &$gv; - } else { - $gv = &$hardRefs[spl_object_id($v)]; - } - $gv = $v; - } - - $a[$gk] = &$gv; - } - unset($gv); - } else { - $a = $v; - } - break; - - case \is_object($v): - if (empty($objRefs[$h = spl_object_id($v)])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_OBJECT; - $stub->class = \get_class($v); - $stub->value = $v; - $stub->handle = $h; - $a = $this->castObject($stub, 0 < $i); - if ($v !== $stub->value) { - if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { - break; - } - $stub->handle = $h = spl_object_id($stub->value); - } - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($objRefs[$h])) { - $objRefs[$h] = $stub; - $objects[] = $v; - } else { - $stub = $objRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - - default: // resource - if (empty($resRefs[$h = (int) $v])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_RESOURCE; - if ('Unknown' === $stub->class = @get_resource_type($v)) { - $stub->class = 'Closed'; - } - $stub->value = $v; - $stub->handle = $h; - $a = $this->castResource($stub, 0 < $i); - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($resRefs[$h])) { - $resRefs[$h] = $stub; - } else { - $stub = $resRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - } - - if ($a) { - if (!$minimumDepthReached || 0 > $maxItems) { - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($pos < $maxItems) { - if ($maxItems < $pos += \count($a)) { - $a = \array_slice($a, 0, $maxItems - $pos, true); - if ($stub->cut >= 0) { - $stub->cut += $pos - $maxItems; - } - } - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($stub->cut >= 0) { - $stub->cut += \count($a); - $stub->position = 0; - } - } - - if ($arrayStub === $stub) { - if ($arrayStub->cut) { - $stub = [$arrayStub->cut, $arrayStub->class => $arrayStub->position]; - $arrayStub->cut = 0; - } elseif (isset(self::$arrayCache[$arrayStub->class][$arrayStub->position])) { - $stub = self::$arrayCache[$arrayStub->class][$arrayStub->position]; - } else { - self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = [$arrayStub->class => $arrayStub->position]; - } - } - - if (!$zvalRef) { - $vals[$k] = $stub; - } elseif (\PHP_VERSION_ID >= 70400) { - $hardRefs[$zvalRef]->value = $stub; - } else { - $refs[$k]->value = $stub; - } - } - - if ($fromObjCast) { - $fromObjCast = false; - $refs = $vals; - $vals = []; - $j = -1; - foreach ($queue[$i] as $k => $v) { - foreach ([$k => true] as $gk => $gv) { - } - if ($gk !== $k) { - $vals = (object) $vals; - $vals->{$k} = $refs[++$j]; - $vals = (array) $vals; - } else { - $vals[$k] = $refs[++$j]; - } - } - } - - $queue[$i] = $vals; - } - - foreach ($values as $h => $v) { - $hardRefs[$h] = $v; - } - - return $queue; - } -} diff --git a/lib/symfony/var-dumper/Command/Descriptor/CliDescriptor.php b/lib/symfony/var-dumper/Command/Descriptor/CliDescriptor.php deleted file mode 100644 index 2afaa7bf3..000000000 --- a/lib/symfony/var-dumper/Command/Descriptor/CliDescriptor.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * Describe collected data clones for cli output. - * - * @author Maxime Steinhausser - * - * @final - */ -class CliDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $lastIdentifier; - - public function __construct(CliDumper $dumper) - { - $this->dumper = $dumper; - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - $io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); - $this->dumper->setColors($output->isDecorated()); - - $rows = [['date', date('r', (int) $context['timestamp'])]]; - $lastIdentifier = $this->lastIdentifier; - $this->lastIdentifier = $clientId; - - $section = "Received from client #$clientId"; - if (isset($context['request'])) { - $request = $context['request']; - $this->lastIdentifier = $request['identifier']; - $section = sprintf('%s %s', $request['method'], $request['uri']); - if ($controller = $request['controller']) { - $rows[] = ['controller', rtrim($this->dumper->dump($controller, true), "\n")]; - } - } elseif (isset($context['cli'])) { - $this->lastIdentifier = $context['cli']['identifier']; - $section = '$ '.$context['cli']['command_line']; - } - - if ($this->lastIdentifier !== $lastIdentifier) { - $io->section($section); - } - - if (isset($context['source'])) { - $source = $context['source']; - $sourceInfo = sprintf('%s on line %d', $source['name'], $source['line']); - if ($fileLink = $source['file_link'] ?? null) { - $sourceInfo = sprintf('%s', $fileLink, $sourceInfo); - } - $rows[] = ['source', $sourceInfo]; - $file = $source['file_relative'] ?? $source['file']; - $rows[] = ['file', $file]; - } - - $io->table([], $rows); - - $this->dumper->dump($data); - $io->newLine(); - } -} diff --git a/lib/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php b/lib/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php deleted file mode 100644 index 267d27bfa..000000000 --- a/lib/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Maxime Steinhausser - */ -interface DumpDescriptorInterface -{ - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void; -} diff --git a/lib/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/lib/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php deleted file mode 100644 index 636b61828..000000000 --- a/lib/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -/** - * Describe collected data clones for html output. - * - * @author Maxime Steinhausser - * - * @final - */ -class HtmlDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $initialized = false; - - public function __construct(HtmlDumper $dumper) - { - $this->dumper = $dumper; - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - if (!$this->initialized) { - $styles = file_get_contents(__DIR__.'/../../Resources/css/htmlDescriptor.css'); - $scripts = file_get_contents(__DIR__.'/../../Resources/js/htmlDescriptor.js'); - $output->writeln(""); - $this->initialized = true; - } - - $title = '-'; - if (isset($context['request'])) { - $request = $context['request']; - $controller = "{$this->dumper->dump($request['controller'], true, ['maxDepth' => 0])}"; - $title = sprintf('%s %s', $request['method'], $uri = $request['uri'], $uri); - $dedupIdentifier = $request['identifier']; - } elseif (isset($context['cli'])) { - $title = '$ '.$context['cli']['command_line']; - $dedupIdentifier = $context['cli']['identifier']; - } else { - $dedupIdentifier = uniqid('', true); - } - - $sourceDescription = ''; - if (isset($context['source'])) { - $source = $context['source']; - $projectDir = $source['project_dir'] ?? null; - $sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']); - if (isset($source['file_link'])) { - $sourceDescription = sprintf('%s', $source['file_link'], $sourceDescription); - } - } - - $isoDate = $this->extractDate($context, 'c'); - $tags = array_filter([ - 'controller' => $controller ?? null, - 'project dir' => $projectDir ?? null, - ]); - - $output->writeln(<< -
    -
    -

    $title

    - -
    - {$this->renderTags($tags)} -
    -
    -

    - $sourceDescription -

    - {$this->dumper->dump($data, true)} -
    - -HTML - ); - } - - private function extractDate(array $context, string $format = 'r'): string - { - return date($format, (int) $context['timestamp']); - } - - private function renderTags(array $tags): string - { - if (!$tags) { - return ''; - } - - $renderedTags = ''; - foreach ($tags as $key => $value) { - $renderedTags .= sprintf('
  • %s%s
  • ', $key, $value); - } - - return << -
      - $renderedTags -
    - -HTML; - } -} diff --git a/lib/symfony/var-dumper/Command/ServerDumpCommand.php b/lib/symfony/var-dumper/Command/ServerDumpCommand.php deleted file mode 100644 index 3a6959522..000000000 --- a/lib/symfony/var-dumper/Command/ServerDumpCommand.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; -use Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface; -use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Server\DumpServer; - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser - * - * @final - */ -class ServerDumpCommand extends Command -{ - protected static $defaultName = 'server:dump'; - protected static $defaultDescription = 'Start a dump server that collects and displays dumps in a single place'; - - private $server; - - /** @var DumpDescriptorInterface[] */ - private $descriptors; - - public function __construct(DumpServer $server, array $descriptors = []) - { - $this->server = $server; - $this->descriptors = $descriptors + [ - 'cli' => new CliDescriptor(new CliDumper()), - 'html' => new HtmlDescriptor(new HtmlDumper()), - ]; - - parent::__construct(); - } - - protected function configure() - { - $this - ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', implode(', ', $this->getAvailableFormats())), 'cli') - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -%command.name% starts a dump server that collects and displays -dumps in a single place for debugging you application: - - php %command.full_name% - -You can consult dumped data in HTML format in your browser by providing the --format=html option -and redirecting the output to a file: - - php %command.full_name% --format="html" > dump.html - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $format = $input->getOption('format'); - - if (!$descriptor = $this->descriptors[$format] ?? null) { - throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format)); - } - - $errorIo = $io->getErrorStyle(); - $errorIo->title('Symfony Var Dumper Server'); - - $this->server->start(); - - $errorIo->success(sprintf('Server listening on %s', $this->server->getHost())); - $errorIo->comment('Quit the server with CONTROL-C.'); - - $this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) { - $descriptor->describe($io, $data, $context, $clientId); - }); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues($this->getAvailableFormats()); - } - } - - private function getAvailableFormats(): array - { - return array_keys($this->descriptors); - } -} diff --git a/lib/symfony/var-dumper/Dumper/AbstractDumper.php b/lib/symfony/var-dumper/Dumper/AbstractDumper.php deleted file mode 100644 index ae19faf61..000000000 --- a/lib/symfony/var-dumper/Dumper/AbstractDumper.php +++ /dev/null @@ -1,202 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\DumperInterface; - -/** - * Abstract mechanism for dumping a Data object. - * - * @author Nicolas Grekas - */ -abstract class AbstractDumper implements DataDumperInterface, DumperInterface -{ - public const DUMP_LIGHT_ARRAY = 1; - public const DUMP_STRING_LENGTH = 2; - public const DUMP_COMMA_SEPARATOR = 4; - public const DUMP_TRAILING_COMMA = 8; - - public static $defaultOutput = 'php://output'; - - protected $line = ''; - protected $lineDumper; - protected $outputStream; - protected $decimalPoint; // This is locale dependent - protected $indentPad = ' '; - protected $flags; - - private $charset = ''; - - /** - * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput - * @param string|null $charset The default character encoding to use for non-UTF8 strings - * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - $this->flags = $flags; - $this->setCharset($charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8'); - $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point']; - $this->setOutput($output ?: static::$defaultOutput); - if (!$output && \is_string(static::$defaultOutput)) { - static::$defaultOutput = $this->outputStream; - } - } - - /** - * Sets the output destination of the dumps. - * - * @param callable|resource|string $output A line dumper callable, an opened stream or an output path - * - * @return callable|resource|string The previous output destination - */ - public function setOutput($output) - { - $prev = $this->outputStream ?? $this->lineDumper; - - if (\is_callable($output)) { - $this->outputStream = null; - $this->lineDumper = $output; - } else { - if (\is_string($output)) { - $output = fopen($output, 'w'); - } - $this->outputStream = $output; - $this->lineDumper = [$this, 'echoLine']; - } - - return $prev; - } - - /** - * Sets the default character encoding to use for non-UTF8 strings. - * - * @return string The previous charset - */ - public function setCharset(string $charset) - { - $prev = $this->charset; - - $charset = strtoupper($charset); - $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; - - $this->charset = $charset; - - return $prev; - } - - /** - * Sets the indentation pad string. - * - * @param string $pad A string that will be prepended to dumped lines, repeated by nesting level - * - * @return string The previous indent pad - */ - public function setIndentPad(string $pad) - { - $prev = $this->indentPad; - $this->indentPad = $pad; - - return $prev; - } - - /** - * Dumps a Data object. - * - * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump - * - * @return string|null The dump as string when $output is true - */ - public function dump(Data $data, $output = null) - { - $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point']; - - if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { - setlocale(\LC_NUMERIC, 'C'); - } - - if ($returnDump = true === $output) { - $output = fopen('php://memory', 'r+'); - } - if ($output) { - $prevOutput = $this->setOutput($output); - } - try { - $data->dump($this); - $this->dumpLine(-1); - - if ($returnDump) { - $result = stream_get_contents($output, -1, 0); - fclose($output); - - return $result; - } - } finally { - if ($output) { - $this->setOutput($prevOutput); - } - if ($locale) { - setlocale(\LC_NUMERIC, $locale); - } - } - - return null; - } - - /** - * Dumps the current line. - * - * @param int $depth The recursive depth in the dumped structure for the line being dumped, - * or -1 to signal the end-of-dump to the line dumper callable - */ - protected function dumpLine(int $depth) - { - ($this->lineDumper)($this->line, $depth, $this->indentPad); - $this->line = ''; - } - - /** - * Generic line dumper callback. - */ - protected function echoLine(string $line, int $depth, string $indentPad) - { - if (-1 !== $depth) { - fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); - } - } - - /** - * Converts a non-UTF-8 string to UTF-8. - * - * @return string|null - */ - protected function utf8Encode(?string $s) - { - if (null === $s || preg_match('//u', $s)) { - return $s; - } - - if (!\function_exists('iconv')) { - throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); - } - - if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { - return $c; - } - if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { - return $c; - } - - return iconv('CP850', 'UTF-8', $s); - } -} diff --git a/lib/symfony/var-dumper/Dumper/CliDumper.php b/lib/symfony/var-dumper/Dumper/CliDumper.php deleted file mode 100644 index 94dc8ee97..000000000 --- a/lib/symfony/var-dumper/Dumper/CliDumper.php +++ /dev/null @@ -1,652 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * CliDumper dumps variables for command line output. - * - * @author Nicolas Grekas - */ -class CliDumper extends AbstractDumper -{ - public static $defaultColors; - public static $defaultOutput = 'php://stdout'; - - protected $colors; - protected $maxStringWidth = 0; - protected $styles = [ - // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics - 'default' => '0;38;5;208', - 'num' => '1;38;5;38', - 'const' => '1;38;5;208', - 'str' => '1;38;5;113', - 'note' => '38;5;38', - 'ref' => '38;5;247', - 'public' => '', - 'protected' => '', - 'private' => '', - 'meta' => '38;5;170', - 'key' => '38;5;113', - 'index' => '38;5;38', - ]; - - protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; - protected static $controlCharsMap = [ - "\t" => '\t', - "\n" => '\n', - "\v" => '\v', - "\f" => '\f', - "\r" => '\r', - "\033" => '\e', - ]; - - protected $collapseNextHash = false; - protected $expandNextHash = false; - - private $displayOptions = [ - 'fileLinkFormat' => null, - ]; - - private $handlesHrefGracefully; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - parent::__construct($output, $charset, $flags); - - if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { - // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI - $this->setStyles([ - 'default' => '31', - 'num' => '1;34', - 'const' => '1;31', - 'str' => '1;32', - 'note' => '34', - 'ref' => '1;30', - 'meta' => '35', - 'key' => '32', - 'index' => '34', - ]); - } - - $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; - } - - /** - * Enables/disables colored output. - */ - public function setColors(bool $colors) - { - $this->colors = $colors; - } - - /** - * Sets the maximum number of characters per line for dumped strings. - */ - public function setMaxStringWidth(int $maxStringWidth) - { - $this->maxStringWidth = $maxStringWidth; - } - - /** - * Configures styles. - * - * @param array $styles A map of style names to style definitions - */ - public function setStyles(array $styles) - { - $this->styles = $styles + $this->styles; - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * {@inheritdoc} - */ - public function dumpScalar(Cursor $cursor, string $type, $value) - { - $this->dumpKey($cursor); - - $style = 'const'; - $attr = $cursor->attr; - - switch ($type) { - case 'default': - $style = 'default'; - break; - - case 'integer': - $style = 'num'; - - if (isset($this->styles['integer'])) { - $style = 'integer'; - } - - break; - - case 'double': - $style = 'num'; - - if (isset($this->styles['float'])) { - $style = 'float'; - } - - switch (true) { - case \INF === $value: $value = 'INF'; break; - case -\INF === $value: $value = '-INF'; break; - case is_nan($value): $value = 'NAN'; break; - default: - $value = (string) $value; - if (!str_contains($value, $this->decimalPoint)) { - $value .= $this->decimalPoint.'0'; - } - break; - } - break; - - case 'NULL': - $value = 'null'; - break; - - case 'boolean': - $value = $value ? 'true' : 'false'; - break; - - default: - $attr += ['value' => $this->utf8Encode($value)]; - $value = $this->utf8Encode($type); - break; - } - - $this->line .= $this->style($style, $value, $attr); - - $this->endValue($cursor); - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) - { - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($bin) { - $str = $this->utf8Encode($str); - } - if ('' === $str) { - $this->line .= '""'; - $this->endValue($cursor); - } else { - $attr += [ - 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, - 'binary' => $bin, - ]; - $str = $bin && false !== strpos($str, "\0") ? [$str] : explode("\n", $str); - if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { - unset($str[1]); - $str[0] .= "\n"; - } - $m = \count($str) - 1; - $i = $lineCut = 0; - - if (self::DUMP_STRING_LENGTH & $this->flags) { - $this->line .= '('.$attr['length'].') '; - } - if ($bin) { - $this->line .= 'b'; - } - - if ($m) { - $this->line .= '"""'; - $this->dumpLine($cursor->depth); - } else { - $this->line .= '"'; - } - - foreach ($str as $str) { - if ($i < $m) { - $str .= "\n"; - } - if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = mb_strlen($str, 'UTF-8')) { - $str = mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); - $lineCut = $len - $this->maxStringWidth; - } - if ($m && 0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - if ('' !== $str) { - $this->line .= $this->style('str', $str, $attr); - } - if ($i++ == $m) { - if ($m) { - if ('' !== $str) { - $this->dumpLine($cursor->depth); - if (0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - } - $this->line .= '"""'; - } else { - $this->line .= '"'; - } - if ($cut < 0) { - $this->line .= '…'; - $lineCut = 0; - } elseif ($cut) { - $lineCut += $cut; - } - } - if ($lineCut) { - $this->line .= '…'.$lineCut; - $lineCut = 0; - } - - if ($i > $m) { - $this->endValue($cursor); - } else { - $this->dumpLine($cursor->depth); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, int $type, $class, bool $hasChild) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($this->collapseNextHash) { - $cursor->skipChildren = true; - $this->collapseNextHash = $hasChild = false; - } - - $class = $this->utf8Encode($class); - if (Cursor::HASH_OBJECT === $type) { - $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class, $attr).(empty($attr['cut_hash']) ? ' {' : '') : '{'; - } elseif (Cursor::HASH_RESOURCE === $type) { - $prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' '); - } else { - $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; - } - - if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) { - $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); - } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { - $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, ['count' => $cursor->hardRefCount]); - } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { - $prefix = substr($prefix, 0, -1); - } - - $this->line .= $prefix; - - if ($hasChild) { - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int $cut) - { - if (empty($cursor->attr['cut_hash'])) { - $this->dumpEllipsis($cursor, $hasChild, $cut); - $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); - } - - $this->endValue($cursor); - } - - /** - * Dumps an ellipsis for cut children. - * - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - protected function dumpEllipsis(Cursor $cursor, bool $hasChild, int $cut) - { - if ($cut) { - $this->line .= ' …'; - if (0 < $cut) { - $this->line .= $cut; - } - if ($hasChild) { - $this->dumpLine($cursor->depth + 1); - } - } - } - - /** - * Dumps a key in a hash structure. - */ - protected function dumpKey(Cursor $cursor) - { - if (null !== $key = $cursor->hashKey) { - if ($cursor->hashKeyIsBinary) { - $key = $this->utf8Encode($key); - } - $attr = ['binary' => $cursor->hashKeyIsBinary]; - $bin = $cursor->hashKeyIsBinary ? 'b' : ''; - $style = 'key'; - switch ($cursor->hashType) { - default: - case Cursor::HASH_INDEXED: - if (self::DUMP_LIGHT_ARRAY & $this->flags) { - break; - } - $style = 'index'; - // no break - case Cursor::HASH_ASSOC: - if (\is_int($key)) { - $this->line .= $this->style($style, $key).' => '; - } else { - $this->line .= $bin.'"'.$this->style($style, $key).'" => '; - } - break; - - case Cursor::HASH_RESOURCE: - $key = "\0~\0".$key; - // no break - case Cursor::HASH_OBJECT: - if (!isset($key[0]) || "\0" !== $key[0]) { - $this->line .= '+'.$bin.$this->style('public', $key).': '; - } elseif (0 < strpos($key, "\0", 1)) { - $key = explode("\0", substr($key, 1), 2); - - switch ($key[0][0]) { - case '+': // User inserted keys - $attr['dynamic'] = true; - $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; - break 2; - case '~': - $style = 'meta'; - if (isset($key[0][1])) { - parse_str(substr($key[0], 1), $attr); - $attr += ['binary' => $cursor->hashKeyIsBinary]; - } - break; - case '*': - $style = 'protected'; - $bin = '#'.$bin; - break; - default: - $attr['class'] = $key[0]; - $style = 'private'; - $bin = '-'.$bin; - break; - } - - if (isset($attr['collapse'])) { - if ($attr['collapse']) { - $this->collapseNextHash = true; - } else { - $this->expandNextHash = true; - } - } - - $this->line .= $bin.$this->style($style, $key[1], $attr).($attr['separator'] ?? ': '); - } else { - // This case should not happen - $this->line .= '-'.$bin.'"'.$this->style('private', $key, ['class' => '']).'": '; - } - break; - } - - if ($cursor->hardRefTo) { - $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]).' '; - } - } - } - - /** - * Decorates a value with some style. - * - * @param string $style The type of style being applied - * @param string $value The value being styled - * @param array $attr Optional context information - * - * @return string - */ - protected function style(string $style, string $value, array $attr = []) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - if (null === $this->handlesHrefGracefully) { - $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); - } - - if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { - $prefix = substr($value, 0, -$attr['ellipsis']); - if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && str_starts_with($prefix, $_SERVER[$pwd])) { - $prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd])); - } - if (!empty($attr['ellipsis-tail'])) { - $prefix .= substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']); - $value = substr($value, -$attr['ellipsis'] + $attr['ellipsis-tail']); - } else { - $value = substr($value, -$attr['ellipsis']); - } - - $value = $this->style('default', $prefix).$this->style($style, $value); - - goto href; - } - - $map = static::$controlCharsMap; - $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; - $endCchr = $this->colors ? "\033[m\033[{$this->styles[$style]}m" : ''; - $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { - $s = $startCchr; - $c = $c[$i = 0]; - do { - $s .= $map[$c[$i]] ?? sprintf('\x%02X', \ord($c[$i])); - } while (isset($c[++$i])); - - return $s.$endCchr; - }, $value, -1, $cchrCount); - - if ($this->colors) { - if ($cchrCount && "\033" === $value[0]) { - $value = substr($value, \strlen($startCchr)); - } else { - $value = "\033[{$this->styles[$style]}m".$value; - } - if ($cchrCount && str_ends_with($value, $endCchr)) { - $value = substr($value, 0, -\strlen($endCchr)); - } else { - $value .= "\033[{$this->styles['default']}m"; - } - } - - href: - if ($this->colors && $this->handlesHrefGracefully) { - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - if ('note' === $style) { - $value .= "\033]8;;{$href}\033\\^\033]8;;\033\\"; - } else { - $attr['href'] = $href; - } - } - if (isset($attr['href'])) { - $value = "\033]8;;{$attr['href']}\033\\{$value}\033]8;;\033\\"; - } - } elseif ($attr['if_links'] ?? false) { - return ''; - } - - return $value; - } - - /** - * @return bool - */ - protected function supportsColors() - { - if ($this->outputStream !== static::$defaultOutput) { - return $this->hasColorSupport($this->outputStream); - } - if (null !== static::$defaultColors) { - return static::$defaultColors; - } - if (isset($_SERVER['argv'][1])) { - $colors = $_SERVER['argv']; - $i = \count($colors); - while (--$i > 0) { - if (isset($colors[$i][5])) { - switch ($colors[$i]) { - case '--ansi': - case '--color': - case '--color=yes': - case '--color=force': - case '--color=always': - case '--colors=always': - return static::$defaultColors = true; - - case '--no-ansi': - case '--color=no': - case '--color=none': - case '--color=never': - case '--colors=never': - return static::$defaultColors = false; - } - } - } - } - - $h = stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; - $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'w') : $this->outputStream; - - return static::$defaultColors = $this->hasColorSupport($h); - } - - /** - * {@inheritdoc} - */ - protected function dumpLine(int $depth, bool $endOfValue = false) - { - if ($this->colors) { - $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); - } - parent::dumpLine($depth); - } - - protected function endValue(Cursor $cursor) - { - if (-1 === $cursor->hashType) { - return; - } - - if (Stub::ARRAY_INDEXED === $cursor->hashType || Stub::ARRAY_ASSOC === $cursor->hashType) { - if (self::DUMP_TRAILING_COMMA & $this->flags && 0 < $cursor->depth) { - $this->line .= ','; - } elseif (self::DUMP_COMMA_SEPARATOR & $this->flags && 1 < $cursor->hashLength - $cursor->hashIndex) { - $this->line .= ','; - } - } - - $this->dumpLine($cursor->depth, true); - } - - /** - * Returns true if the stream supports colorization. - * - * Reference: Composer\XdebugHandler\Process::supportsColor - * https://github.com/composer/xdebug-handler - * - * @param mixed $stream A CLI output stream - */ - private function hasColorSupport($stream): bool - { - if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { - return false; - } - - // Follow https://no-color.org/ - if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { - return false; - } - - if ('Hyper' === getenv('TERM_PROGRAM')) { - return true; - } - - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - return stream_isatty($stream); - } - - /** - * Returns true if the Windows terminal supports true color. - * - * Note that this does not check an output stream, but relies on environment - * variables from known implementations, or a PHP and Windows version that - * supports true color. - */ - private function isWindowsTrueColor(): bool - { - $result = 183 <= getenv('ANSICON_VER') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM') - || 'Hyper' === getenv('TERM_PROGRAM'); - - if (!$result) { - $version = sprintf( - '%s.%s.%s', - PHP_WINDOWS_VERSION_MAJOR, - PHP_WINDOWS_VERSION_MINOR, - PHP_WINDOWS_VERSION_BUILD - ); - $result = $version >= '10.0.15063'; - } - - return $result; - } - - private function getSourceLink(string $file, int $line) - { - if ($fmt = $this->displayOptions['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://'.$file.'#L'.$line); - } - - return false; - } -} diff --git a/lib/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/lib/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php deleted file mode 100644 index 38f878971..000000000 --- a/lib/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Tries to provide context on CLI. - * - * @author Maxime Steinhausser - */ -final class CliContextProvider implements ContextProviderInterface -{ - public function getContext(): ?array - { - if ('cli' !== \PHP_SAPI) { - return null; - } - - return [ - 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []), - 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']), - ]; - } -} diff --git a/lib/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php b/lib/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php deleted file mode 100644 index 532aa0f96..000000000 --- a/lib/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Interface to provide contextual data about dump data clones sent to a server. - * - * @author Maxime Steinhausser - */ -interface ContextProviderInterface -{ - public function getContext(): ?array; -} diff --git a/lib/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php b/lib/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php deleted file mode 100644 index 3684a4753..000000000 --- a/lib/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * Tries to provide context from a request. - * - * @author Maxime Steinhausser - */ -final class RequestContextProvider implements ContextProviderInterface -{ - private $requestStack; - private $cloner; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - $this->cloner = new VarCloner(); - $this->cloner->setMaxItems(0); - $this->cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - } - - public function getContext(): ?array - { - if (null === $request = $this->requestStack->getCurrentRequest()) { - return null; - } - - $controller = $request->attributes->get('_controller'); - - return [ - 'uri' => $request->getUri(), - 'method' => $request->getMethod(), - 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, - 'identifier' => spl_object_hash($request), - ]; - } -} diff --git a/lib/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/lib/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php deleted file mode 100644 index 2e2c81816..000000000 --- a/lib/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\VarDumper; -use Twig\Template; - -/** - * Tries to provide context from sources (class name, file, line, code excerpt, ...). - * - * @author Nicolas Grekas - * @author Maxime Steinhausser - */ -final class SourceContextProvider implements ContextProviderInterface -{ - private $limit; - private $charset; - private $projectDir; - private $fileLinkFormatter; - - public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) - { - $this->charset = $charset; - $this->projectDir = $projectDir; - $this->fileLinkFormatter = $fileLinkFormatter; - $this->limit = $limit; - } - - public function getContext(): ?array - { - $trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, $this->limit); - - $file = $trace[1]['file']; - $line = $trace[1]['line']; - $name = false; - $fileExcerpt = false; - - for ($i = 2; $i < $this->limit; ++$i) { - if (isset($trace[$i]['class'], $trace[$i]['function']) - && 'dump' === $trace[$i]['function'] - && VarDumper::class === $trace[$i]['class'] - ) { - $file = $trace[$i]['file'] ?? $file; - $line = $trace[$i]['line'] ?? $line; - - while (++$i < $this->limit) { - if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) { - $file = $trace[$i]['file']; - $line = $trace[$i]['line']; - - break; - } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) { - $template = $trace[$i]['object']; - $name = $template->getTemplateName(); - $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); - $info = $template->getDebugInfo(); - if (isset($info[$trace[$i - 1]['line']])) { - $line = $info[$trace[$i - 1]['line']]; - $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; - - if ($src) { - $src = explode("\n", $src); - $fileExcerpt = []; - - for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { - $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; - } - - $fileExcerpt = '
      '.implode("\n", $fileExcerpt).'
    '; - } - } - break; - } - } - break; - } - } - - if (false === $name) { - $name = str_replace('\\', '/', $file); - $name = substr($name, strrpos($name, '/') + 1); - } - - $context = ['name' => $name, 'file' => $file, 'line' => $line]; - $context['file_excerpt'] = $fileExcerpt; - - if (null !== $this->projectDir) { - $context['project_dir'] = $this->projectDir; - if (str_starts_with($file, $this->projectDir)) { - $context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - } - } - - if ($this->fileLinkFormatter && $fileLink = $this->fileLinkFormatter->format($context['file'], $context['line'])) { - $context['file_link'] = $fileLink; - } - - return $context; - } - - private function htmlEncode(string $s): string - { - $html = ''; - - $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); - $dumper->setDumpHeader(''); - $dumper->setDumpBoundaries('', ''); - - $cloner = new VarCloner(); - $dumper->dump($cloner->cloneVar($s)); - - return substr(strip_tags($html), 1, -1); - } -} diff --git a/lib/symfony/var-dumper/Dumper/ContextualizedDumper.php b/lib/symfony/var-dumper/Dumper/ContextualizedDumper.php deleted file mode 100644 index 76384176e..000000000 --- a/lib/symfony/var-dumper/Dumper/ContextualizedDumper.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * @author Kévin Thérage - */ -class ContextualizedDumper implements DataDumperInterface -{ - private $wrappedDumper; - private $contextProviders; - - /** - * @param ContextProviderInterface[] $contextProviders - */ - public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders) - { - $this->wrappedDumper = $wrappedDumper; - $this->contextProviders = $contextProviders; - } - - public function dump(Data $data) - { - $context = []; - foreach ($this->contextProviders as $contextProvider) { - $context[\get_class($contextProvider)] = $contextProvider->getContext(); - } - - $this->wrappedDumper->dump($data->withContext($context)); - } -} diff --git a/lib/symfony/var-dumper/Dumper/DataDumperInterface.php b/lib/symfony/var-dumper/Dumper/DataDumperInterface.php deleted file mode 100644 index b173bccf3..000000000 --- a/lib/symfony/var-dumper/Dumper/DataDumperInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * DataDumperInterface for dumping Data objects. - * - * @author Nicolas Grekas - */ -interface DataDumperInterface -{ - public function dump(Data $data); -} diff --git a/lib/symfony/var-dumper/Dumper/HtmlDumper.php b/lib/symfony/var-dumper/Dumper/HtmlDumper.php deleted file mode 100644 index af4de9613..000000000 --- a/lib/symfony/var-dumper/Dumper/HtmlDumper.php +++ /dev/null @@ -1,986 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * HtmlDumper dumps variables as HTML. - * - * @author Nicolas Grekas - */ -class HtmlDumper extends CliDumper -{ - public static $defaultOutput = 'php://output'; - - protected static $themes = [ - 'dark' => [ - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#56DB3A', - 'note' => 'color:#1299DA', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#B729D9', - 'key' => 'color:#56DB3A', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#FF8400', - 'ns' => 'user-select:none;', - ], - 'light' => [ - 'default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#629755;', - 'note' => 'color:#6897BB', - 'ref' => 'color:#6E6E6E', - 'public' => 'color:#262626', - 'protected' => 'color:#262626', - 'private' => 'color:#262626', - 'meta' => 'color:#B729D9', - 'key' => 'color:#789339', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#CC7832', - 'ns' => 'user-select:none;', - ], - ]; - - protected $dumpHeader; - protected $dumpPrefix = '
    ';
    -    protected $dumpSuffix = '
    '; - protected $dumpId = 'sf-dump'; - protected $colors = true; - protected $headerIsDumped = false; - protected $lastDepth = -1; - protected $styles; - - private $displayOptions = [ - 'maxDepth' => 1, - 'maxStringLength' => 160, - 'fileLinkFormat' => null, - ]; - private $extraDisplayOptions = []; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - AbstractDumper::__construct($output, $charset, $flags); - $this->dumpId = 'sf-dump-'.mt_rand(); - $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->styles = static::$themes['dark'] ?? self::$themes['dark']; - } - - /** - * {@inheritdoc} - */ - public function setStyles(array $styles) - { - $this->headerIsDumped = false; - $this->styles = $styles + $this->styles; - } - - public function setTheme(string $themeName) - { - if (!isset(static::$themes[$themeName])) { - throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); - } - - $this->setStyles(static::$themes[$themeName]); - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->headerIsDumped = false; - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * Sets an HTML header that will be dumped once in the output stream. - */ - public function setDumpHeader(?string $header) - { - $this->dumpHeader = $header; - } - - /** - * Sets an HTML prefix and suffix that will encapse every single dump. - */ - public function setDumpBoundaries(string $prefix, string $suffix) - { - $this->dumpPrefix = $prefix; - $this->dumpSuffix = $suffix; - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data, $output = null, array $extraDisplayOptions = []) - { - $this->extraDisplayOptions = $extraDisplayOptions; - $result = parent::dump($data, $output); - $this->dumpId = 'sf-dump-'.mt_rand(); - - return $result; - } - - /** - * Dumps the HTML header. - */ - protected function getDumpHeader() - { - $this->headerIsDumped = $this->outputStream ?? $this->lineDumper; - - if (null !== $this->dumpHeader) { - return $this->dumpHeader; - } - - $line = str_replace('{$options}', json_encode($this->displayOptions, \JSON_FORCE_OBJECT), <<<'EOHTML' -'.$this->dumpHeader; - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) - { - if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) { - $this->dumpKey($cursor); - $this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []); - $this->line .= $cursor->depth >= $this->displayOptions['maxDepth'] ? ' ' : ' '; - $this->endValue($cursor); - $this->line .= $this->indentPad; - $this->line .= sprintf('', $cursor->attr['content-type'], base64_encode($cursor->attr['img-data'])); - $this->endValue($cursor); - } else { - parent::dumpString($cursor, $str, $bin, $cut); - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, int $type, $class, bool $hasChild) - { - if (Cursor::HASH_OBJECT === $type) { - $cursor->attr['depth'] = $cursor->depth; - } - parent::enterHash($cursor, $type, $class, false); - - if ($cursor->skipChildren || $cursor->depth >= $this->displayOptions['maxDepth']) { - $cursor->skipChildren = false; - $eol = ' class=sf-dump-compact>'; - } else { - $this->expandNextHash = false; - $eol = ' class=sf-dump-expanded>'; - } - - if ($hasChild) { - $this->line .= 'dumpId, $r); - } - $this->line .= $eol; - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int $cut) - { - $this->dumpEllipsis($cursor, $hasChild, $cut); - if ($hasChild) { - $this->line .= ''; - } - parent::leaveHash($cursor, $type, $class, $hasChild, 0); - } - - /** - * {@inheritdoc} - */ - protected function style(string $style, string $value, array $attr = []) - { - if ('' === $value) { - return ''; - } - - $v = esc($value); - - if ('ref' === $style) { - if (empty($attr['count'])) { - return sprintf('%s', $v); - } - $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); - - return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); - } - - if ('const' === $style && isset($attr['value'])) { - $style .= sprintf(' title="%s"', esc(\is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); - } elseif ('public' === $style) { - $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); - } elseif ('str' === $style && 1 < $attr['length']) { - $style .= sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); - } elseif ('note' === $style && 0 < ($attr['depth'] ?? 0) && false !== $c = strrpos($value, '\\')) { - $style .= ' title=""'; - $attr += [ - 'ellipsis' => \strlen($value) - $c, - 'ellipsis-type' => 'note', - 'ellipsis-tail' => 1, - ]; - } elseif ('protected' === $style) { - $style .= ' title="Protected property"'; - } elseif ('meta' === $style && isset($attr['title'])) { - $style .= sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); - } elseif ('private' === $style) { - $style .= sprintf(' title="Private property defined in class: `%s`"', esc($this->utf8Encode($attr['class']))); - } - $map = static::$controlCharsMap; - - if (isset($attr['ellipsis'])) { - $class = 'sf-dump-ellipsis'; - if (isset($attr['ellipsis-type'])) { - $class = sprintf('"%s sf-dump-ellipsis-%s"', $class, $attr['ellipsis-type']); - } - $label = esc(substr($value, -$attr['ellipsis'])); - $style = str_replace(' title="', " title=\"$v\n", $style); - $v = sprintf('%s', $class, substr($v, 0, -\strlen($label))); - - if (!empty($attr['ellipsis-tail'])) { - $tail = \strlen(esc(substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); - $v .= sprintf('%s%s', $class, substr($label, 0, $tail), substr($label, $tail)); - } else { - $v .= $label; - } - } - - $v = "".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { - $s = $b = ''; - }, $v).''; - - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - $attr['href'] = $href; - } - if (isset($attr['href'])) { - $target = isset($attr['file']) ? '' : ' target="_blank"'; - $v = sprintf('%s', esc($this->utf8Encode($attr['href'])), $target, $v); - } - if (isset($attr['lang'])) { - $v = sprintf('%s', esc($attr['lang']), $v); - } - - return $v; - } - - /** - * {@inheritdoc} - */ - protected function dumpLine(int $depth, bool $endOfValue = false) - { - if (-1 === $this->lastDepth) { - $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; - } - if ($this->headerIsDumped !== ($this->outputStream ?? $this->lineDumper)) { - $this->line = $this->getDumpHeader().$this->line; - } - - if (-1 === $depth) { - $args = ['"'.$this->dumpId.'"']; - if ($this->extraDisplayOptions) { - $args[] = json_encode($this->extraDisplayOptions, \JSON_FORCE_OBJECT); - } - // Replace is for BC - $this->line .= sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args)); - } - $this->lastDepth = $depth; - - $this->line = mb_encode_numericentity($this->line, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8'); - - if (-1 === $depth) { - AbstractDumper::dumpLine(0); - } - AbstractDumper::dumpLine($depth); - } - - private function getSourceLink(string $file, int $line) - { - $options = $this->extraDisplayOptions + $this->displayOptions; - - if ($fmt = $options['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); - } - - return false; - } -} - -function esc(string $str) -{ - return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8'); -} diff --git a/lib/symfony/var-dumper/Dumper/ServerDumper.php b/lib/symfony/var-dumper/Dumper/ServerDumper.php deleted file mode 100644 index 94795bf6d..000000000 --- a/lib/symfony/var-dumper/Dumper/ServerDumper.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; -use Symfony\Component\VarDumper\Server\Connection; - -/** - * ServerDumper forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser - */ -class ServerDumper implements DataDumperInterface -{ - private $connection; - private $wrappedDumper; - - /** - * @param string $host The server host - * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, DataDumperInterface $wrappedDumper = null, array $contextProviders = []) - { - $this->connection = new Connection($host, $contextProviders); - $this->wrappedDumper = $wrappedDumper; - } - - public function getContextProviders(): array - { - return $this->connection->getContextProviders(); - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data) - { - if (!$this->connection->write($data) && $this->wrappedDumper) { - $this->wrappedDumper->dump($data); - } - } -} diff --git a/lib/symfony/var-dumper/Exception/ThrowingCasterException.php b/lib/symfony/var-dumper/Exception/ThrowingCasterException.php deleted file mode 100644 index 122f0d358..000000000 --- a/lib/symfony/var-dumper/Exception/ThrowingCasterException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Exception; - -/** - * @author Nicolas Grekas - */ -class ThrowingCasterException extends \Exception -{ - /** - * @param \Throwable $prev The exception thrown from the caster - */ - public function __construct(\Throwable $prev) - { - parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); - } -} diff --git a/lib/symfony/var-dumper/LICENSE b/lib/symfony/var-dumper/LICENSE deleted file mode 100644 index a843ec124..000000000 --- a/lib/symfony/var-dumper/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/var-dumper/README.md b/lib/symfony/var-dumper/README.md deleted file mode 100644 index a0da8c9ab..000000000 --- a/lib/symfony/var-dumper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -VarDumper Component -=================== - -The VarDumper component provides mechanisms for walking through any arbitrary -PHP variable. It provides a better `dump()` function that you can use instead -of `var_dump()`. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/var-dumper/Resources/bin/var-dump-server b/lib/symfony/var-dumper/Resources/bin/var-dump-server deleted file mode 100644 index 98c813a06..000000000 --- a/lib/symfony/var-dumper/Resources/bin/var-dump-server +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser - */ - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Logger\ConsoleLogger; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\VarDumper\Command\ServerDumpCommand; -use Symfony\Component\VarDumper\Server\DumpServer; - -function includeIfExists(string $file): bool -{ - return file_exists($file) && include $file; -} - -if ( - !includeIfExists(__DIR__ . '/../../../../autoload.php') && - !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && - !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') -) { - fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); - exit(1); -} - -if (!class_exists(Application::class)) { - fwrite(STDERR, 'You need the "symfony/console" component in order to run the VarDumper server.'.PHP_EOL); - exit(1); -} - -$input = new ArgvInput(); -$output = new ConsoleOutput(); -$defaultHost = '127.0.0.1:9912'; -$host = $input->getParameterOption(['--host'], $_SERVER['VAR_DUMPER_SERVER'] ?? $defaultHost, true); -$logger = interface_exists(LoggerInterface::class) ? new ConsoleLogger($output->getErrorOutput()) : null; - -$app = new Application(); - -$app->getDefinition()->addOption( - new InputOption('--host', null, InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost) -); - -$app->add($command = new ServerDumpCommand(new DumpServer($host, $logger))) - ->getApplication() - ->setDefaultCommand($command->getName(), true) - ->run($input, $output) -; diff --git a/lib/symfony/var-dumper/Resources/css/htmlDescriptor.css b/lib/symfony/var-dumper/Resources/css/htmlDescriptor.css deleted file mode 100644 index 8f706d640..000000000 --- a/lib/symfony/var-dumper/Resources/css/htmlDescriptor.css +++ /dev/null @@ -1,130 +0,0 @@ -body { - display: flex; - flex-direction: column-reverse; - justify-content: flex-end; - max-width: 1140px; - margin: auto; - padding: 15px; - word-wrap: break-word; - background-color: #F9F9F9; - color: #222; - font-family: Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.4; -} -p { - margin: 0; -} -a { - color: #218BC3; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -.text-small { - font-size: 12px !important; -} -article { - margin: 5px; - margin-bottom: 10px; -} -article > header > .row { - display: flex; - flex-direction: row; - align-items: baseline; - margin-bottom: 10px; -} -article > header > .row > .col { - flex: 1; - display: flex; - align-items: baseline; -} -article > header > .row > h2 { - font-size: 14px; - color: #222; - font-weight: normal; - font-family: "Lucida Console", monospace, sans-serif; - word-break: break-all; - margin: 20px 5px 0 0; - user-select: all; -} -article > header > .row > h2 > code { - white-space: nowrap; - user-select: none; - color: #cc2255; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; - border-radius: 3px; - margin-right: 5px; - padding: 0 3px; -} -article > header > .row > time.col { - flex: 0; - text-align: right; - white-space: nowrap; - color: #999; - font-style: italic; -} -article > header ul.tags { - list-style: none; - padding: 0; - margin: 0; - font-size: 12px; -} -article > header ul.tags > li { - user-select: all; - margin-bottom: 2px; -} -article > header ul.tags > li > span.badge { - display: inline-block; - padding: .25em .4em; - margin-right: 5px; - border-radius: 4px; - background-color: #6c757d3b; - color: #524d4d; - font-size: 12px; - text-align: center; - font-weight: 700; - line-height: 1; - white-space: nowrap; - vertical-align: baseline; - user-select: none; -} -article > section.body { - border: 1px solid #d8d8d8; - background: #FFF; - padding: 10px; - border-radius: 3px; -} -pre.sf-dump { - border-radius: 3px; - margin-bottom: 0; -} -.hidden { - display: none !important; -} -.dumped-tag > .sf-dump { - display: inline-block; - margin: 0; - padding: 1px 5px; - line-height: 1.4; - vertical-align: top; - background-color: transparent; - user-select: auto; -} -.dumped-tag > pre.sf-dump, -.dumped-tag > .sf-dump-default { - color: #CC7832; - background: none; -} -.dumped-tag > .sf-dump .sf-dump-str { color: #629755; } -.dumped-tag > .sf-dump .sf-dump-private, -.dumped-tag > .sf-dump .sf-dump-protected, -.dumped-tag > .sf-dump .sf-dump-public { color: #262626; } -.dumped-tag > .sf-dump .sf-dump-note { color: #6897BB; } -.dumped-tag > .sf-dump .sf-dump-key { color: #789339; } -.dumped-tag > .sf-dump .sf-dump-ref { color: #6E6E6E; } -.dumped-tag > .sf-dump .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } -.dumped-tag > .sf-dump .sf-dump-ellipsis-path { max-width: 5em; } -.dumped-tag > .sf-dump .sf-dump-ns { user-select: none; } diff --git a/lib/symfony/var-dumper/Resources/functions/dump.php b/lib/symfony/var-dumper/Resources/functions/dump.php deleted file mode 100644 index f26aad5bd..000000000 --- a/lib/symfony/var-dumper/Resources/functions/dump.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\VarDumper\VarDumper; - -if (!function_exists('dump')) { - /** - * @author Nicolas Grekas - */ - function dump($var, ...$moreVars) - { - VarDumper::dump($var); - - foreach ($moreVars as $v) { - VarDumper::dump($v); - } - - if (1 < func_num_args()) { - return func_get_args(); - } - - return $var; - } -} - -if (!function_exists('dd')) { - /** - * @return never - */ - function dd(...$vars) - { - if (!in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - - foreach ($vars as $v) { - VarDumper::dump($v); - } - - exit(1); - } -} diff --git a/lib/symfony/var-dumper/Resources/js/htmlDescriptor.js b/lib/symfony/var-dumper/Resources/js/htmlDescriptor.js deleted file mode 100644 index 63101e57c..000000000 --- a/lib/symfony/var-dumper/Resources/js/htmlDescriptor.js +++ /dev/null @@ -1,10 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - let prev = null; - Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) { - const dedupId = article.dataset.dedupId; - if (dedupId === prev) { - article.getElementsByTagName('header')[0].classList.add('hidden'); - } - prev = dedupId; - }); -}); diff --git a/lib/symfony/var-dumper/Server/Connection.php b/lib/symfony/var-dumper/Server/Connection.php deleted file mode 100644 index d0611a1f6..000000000 --- a/lib/symfony/var-dumper/Server/Connection.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * Forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser - */ -class Connection -{ - private $host; - private $contextProviders; - - /** - * @var resource|null - */ - private $socket; - - /** - * @param string $host The server host - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, array $contextProviders = []) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->contextProviders = $contextProviders; - } - - public function getContextProviders(): array - { - return $this->contextProviders; - } - - public function write(Data $data): bool - { - $socketIsFresh = !$this->socket; - if (!$this->socket = $this->socket ?: $this->createSocket()) { - return false; - } - - $context = ['timestamp' => microtime(true)]; - foreach ($this->contextProviders as $name => $provider) { - $context[$name] = $provider->getContext(); - } - $context = array_filter($context); - $encodedPayload = base64_encode(serialize([$data, $context]))."\n"; - - set_error_handler([self::class, 'nullErrorHandler']); - try { - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - if (!$socketIsFresh) { - stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR); - fclose($this->socket); - $this->socket = $this->createSocket(); - } - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - } finally { - restore_error_handler(); - } - - return false; - } - - private static function nullErrorHandler(int $t, string $m) - { - // no-op - } - - private function createSocket() - { - set_error_handler([self::class, 'nullErrorHandler']); - try { - return stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT); - } finally { - restore_error_handler(); - } - } -} diff --git a/lib/symfony/var-dumper/Server/DumpServer.php b/lib/symfony/var-dumper/Server/DumpServer.php deleted file mode 100644 index f9735db78..000000000 --- a/lib/symfony/var-dumper/Server/DumpServer.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Psr\Log\LoggerInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * A server collecting Data clones sent by a ServerDumper. - * - * @author Maxime Steinhausser - * - * @final - */ -class DumpServer -{ - private $host; - private $logger; - - /** - * @var resource|null - */ - private $socket; - - public function __construct(string $host, LoggerInterface $logger = null) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->logger = $logger; - } - - public function start(): void - { - if (!$this->socket = stream_socket_server($this->host, $errno, $errstr)) { - throw new \RuntimeException(sprintf('Server start failed on "%s": ', $this->host).$errstr.' '.$errno); - } - } - - public function listen(callable $callback): void - { - if (null === $this->socket) { - $this->start(); - } - - foreach ($this->getMessages() as $clientId => $message) { - if ($this->logger) { - $this->logger->info('Received a payload from client {clientId}', ['clientId' => $clientId]); - } - - $payload = @unserialize(base64_decode($message), ['allowed_classes' => [Data::class, Stub::class]]); - - // Impossible to decode the message, give up. - if (false === $payload) { - if ($this->logger) { - $this->logger->warning('Unable to decode a message from {clientId} client.', ['clientId' => $clientId]); - } - - continue; - } - - if (!\is_array($payload) || \count($payload) < 2 || !$payload[0] instanceof Data || !\is_array($payload[1])) { - if ($this->logger) { - $this->logger->warning('Invalid payload from {clientId} client. Expected an array of two elements (Data $data, array $context)', ['clientId' => $clientId]); - } - - continue; - } - - [$data, $context] = $payload; - - $callback($data, $context, $clientId); - } - } - - public function getHost(): string - { - return $this->host; - } - - private function getMessages(): iterable - { - $sockets = [(int) $this->socket => $this->socket]; - $write = []; - - while (true) { - $read = $sockets; - stream_select($read, $write, $write, null); - - foreach ($read as $stream) { - if ($this->socket === $stream) { - $stream = stream_socket_accept($this->socket); - $sockets[(int) $stream] = $stream; - } elseif (feof($stream)) { - unset($sockets[(int) $stream]); - fclose($stream); - } else { - yield (int) $stream => fgets($stream); - } - } - } - } -} diff --git a/lib/symfony/var-dumper/VarDumper.php b/lib/symfony/var-dumper/VarDumper.php deleted file mode 100644 index 20429ac78..000000000 --- a/lib/symfony/var-dumper/VarDumper.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\ContextProvider\CliContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextualizedDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Dumper\ServerDumper; - -// Load the global dump() function -require_once __DIR__.'/Resources/functions/dump.php'; - -/** - * @author Nicolas Grekas - */ -class VarDumper -{ - /** - * @var callable|null - */ - private static $handler; - - public static function dump($var) - { - if (null === self::$handler) { - self::register(); - } - - return (self::$handler)($var); - } - - /** - * @return callable|null - */ - public static function setHandler(callable $callable = null) - { - $prevHandler = self::$handler; - - // Prevent replacing the handler with expected format as soon as the env var was set: - if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { - return $prevHandler; - } - - self::$handler = $callable; - - return $prevHandler; - } - - private static function register(): void - { - $cloner = new VarCloner(); - $cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - - $format = $_SERVER['VAR_DUMPER_FORMAT'] ?? null; - switch (true) { - case 'html' === $format: - $dumper = new HtmlDumper(); - break; - case 'cli' === $format: - $dumper = new CliDumper(); - break; - case 'server' === $format: - case $format && 'tcp' === parse_url($format, \PHP_URL_SCHEME): - $host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format; - $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper(); - $dumper = new ServerDumper($host, $dumper, self::getDefaultContextProviders()); - break; - default: - $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper(); - } - - if (!$dumper instanceof ServerDumper) { - $dumper = new ContextualizedDumper($dumper, [new SourceContextProvider()]); - } - - self::$handler = function ($var) use ($cloner, $dumper) { - $dumper->dump($cloner->cloneVar($var)); - }; - } - - private static function getDefaultContextProviders(): array - { - $contextProviders = []; - - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && class_exists(Request::class)) { - $requestStack = new RequestStack(); - $requestStack->push(Request::createFromGlobals()); - $contextProviders['request'] = new RequestContextProvider($requestStack); - } - - $fileLinkFormatter = class_exists(FileLinkFormatter::class) ? new FileLinkFormatter(null, $requestStack ?? null) : null; - - return $contextProviders + [ - 'cli' => new CliContextProvider(), - 'source' => new SourceContextProvider(null, null, $fileLinkFormatter), - ]; - } -} diff --git a/lib/symfony/var-dumper/composer.json b/lib/symfony/var-dumper/composer.json deleted file mode 100644 index dc46f58d9..000000000 --- a/lib/symfony/var-dumper/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "symfony/var-dumper", - "type": "library", - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "keywords": ["dump", "debug"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "autoload": { - "files": [ "Resources/functions/dump.php" ], - "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "bin": [ - "Resources/bin/var-dump-server" - ], - "minimum-stability": "dev" -} diff --git a/lib/symfony/var-exporter/CHANGELOG.md b/lib/symfony/var-exporter/CHANGELOG.md deleted file mode 100644 index 3406c30ef..000000000 --- a/lib/symfony/var-exporter/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -CHANGELOG -========= - -5.1.0 ------ - - * added argument `array &$foundClasses` to `VarExporter::export()` to ease with preloading exported values - -4.2.0 ------ - - * added the component diff --git a/lib/symfony/var-exporter/Exception/ClassNotFoundException.php b/lib/symfony/var-exporter/Exception/ClassNotFoundException.php deleted file mode 100644 index 4cebe44b0..000000000 --- a/lib/symfony/var-exporter/Exception/ClassNotFoundException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -class ClassNotFoundException extends \Exception implements ExceptionInterface -{ - public function __construct(string $class, \Throwable $previous = null) - { - parent::__construct(sprintf('Class "%s" not found.', $class), 0, $previous); - } -} diff --git a/lib/symfony/var-exporter/Exception/ExceptionInterface.php b/lib/symfony/var-exporter/Exception/ExceptionInterface.php deleted file mode 100644 index adfaed47c..000000000 --- a/lib/symfony/var-exporter/Exception/ExceptionInterface.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/var-exporter/Exception/NotInstantiableTypeException.php b/lib/symfony/var-exporter/Exception/NotInstantiableTypeException.php deleted file mode 100644 index 771ee612d..000000000 --- a/lib/symfony/var-exporter/Exception/NotInstantiableTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -class NotInstantiableTypeException extends \Exception implements ExceptionInterface -{ - public function __construct(string $type, \Throwable $previous = null) - { - parent::__construct(sprintf('Type "%s" is not instantiable.', $type), 0, $previous); - } -} diff --git a/lib/symfony/var-exporter/Instantiator.php b/lib/symfony/var-exporter/Instantiator.php deleted file mode 100644 index 368c769ac..000000000 --- a/lib/symfony/var-exporter/Instantiator.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter; - -use Symfony\Component\VarExporter\Exception\ExceptionInterface; -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; - -/** - * A utility class to create objects without calling their constructor. - * - * @author Nicolas Grekas - */ -final class Instantiator -{ - /** - * Creates an object and sets its properties without calling its constructor nor any other methods. - * - * For example: - * - * // creates an empty instance of Foo - * Instantiator::instantiate(Foo::class); - * - * // creates a Foo instance and sets one of its properties - * Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]); - * - * // creates a Foo instance and sets a private property defined on its parent Bar class - * Instantiator::instantiate(Foo::class, [], [ - * Bar::class => ['privateBarProperty' => $propertyValue], - * ]); - * - * Instances of ArrayObject, ArrayIterator and SplObjectStorage can be created - * by using the special "\0" property name to define their internal value: - * - * // creates an SplObjectStorage where $info1 is attached to $obj1, etc. - * Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]); - * - * // creates an ArrayObject populated with $inputArray - * Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray]]); - * - * @param string $class The class of the instance to create - * @param array $properties The properties to set on the instance - * @param array $privateProperties The private properties to set on the instance, - * keyed by their declaring class - * - * @throws ExceptionInterface When the instance cannot be created - */ - public static function instantiate(string $class, array $properties = [], array $privateProperties = []): object - { - $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); - - if (Registry::$cloneable[$class]) { - $wrappedInstance = [clone Registry::$prototypes[$class]]; - } elseif (Registry::$instantiableWithoutConstructor[$class]) { - $wrappedInstance = [$reflector->newInstanceWithoutConstructor()]; - } elseif (null === Registry::$prototypes[$class]) { - throw new NotInstantiableTypeException($class); - } elseif ($reflector->implementsInterface('Serializable') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize'))) { - $wrappedInstance = [unserialize('C:'.\strlen($class).':"'.$class.'":0:{}')]; - } else { - $wrappedInstance = [unserialize('O:'.\strlen($class).':"'.$class.'":0:{}')]; - } - - if ($properties) { - $privateProperties[$class] = isset($privateProperties[$class]) ? $properties + $privateProperties[$class] : $properties; - } - - foreach ($privateProperties as $class => $properties) { - if (!$properties) { - continue; - } - foreach ($properties as $name => $value) { - // because they're also used for "unserialization", hydrators - // deal with array of instances, so we need to wrap values - $properties[$name] = [$value]; - } - (Hydrator::$hydrators[$class] ?? Hydrator::getHydrator($class))($properties, $wrappedInstance); - } - - return $wrappedInstance[0]; - } -} diff --git a/lib/symfony/var-exporter/Internal/Exporter.php b/lib/symfony/var-exporter/Internal/Exporter.php deleted file mode 100644 index a034dddb9..000000000 --- a/lib/symfony/var-exporter/Internal/Exporter.php +++ /dev/null @@ -1,406 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Exporter -{ - /** - * Prepares an array of values for VarExporter. - * - * For performance this method is public and has no type-hints. - * - * @param array &$values - * @param \SplObjectStorage $objectsPool - * @param array &$refsPool - * @param int &$objectsCount - * @param bool &$valuesAreStatic - * - * @throws NotInstantiableTypeException When a value cannot be serialized - */ - public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount, &$valuesAreStatic): array - { - $refs = $values; - foreach ($values as $k => $value) { - if (\is_resource($value)) { - throw new NotInstantiableTypeException(get_resource_type($value).' resource'); - } - $refs[$k] = $objectsPool; - - if ($isRef = !$valueIsStatic = $values[$k] !== $objectsPool) { - $values[$k] = &$value; // Break hard references to make $values completely - unset($value); // independent from the original structure - $refs[$k] = $value = $values[$k]; - if ($value instanceof Reference && 0 > $value->id) { - $valuesAreStatic = false; - ++$value->count; - continue; - } - $refsPool[] = [&$refs[$k], $value, &$value]; - $refs[$k] = $values[$k] = new Reference(-\count($refsPool), $value); - } - - if (\is_array($value)) { - if ($value) { - $value = self::prepare($value, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); - } - goto handle_value; - } elseif (!\is_object($value) || $value instanceof \UnitEnum) { - goto handle_value; - } - - $valueIsStatic = false; - if (isset($objectsPool[$value])) { - ++$objectsCount; - $value = new Reference($objectsPool[$value][0]); - goto handle_value; - } - - $class = \get_class($value); - $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); - - if ($reflector->hasMethod('__serialize')) { - if (!$reflector->getMethod('__serialize')->isPublic()) { - throw new \Error(sprintf('Call to %s method "%s::__serialize()".', $reflector->getMethod('__serialize')->isProtected() ? 'protected' : 'private', $class)); - } - - if (!\is_array($properties = $value->__serialize())) { - throw new \TypeError($class.'::__serialize() must return an array'); - } - - goto prepare_value; - } - - $properties = []; - $sleep = null; - $proto = Registry::$prototypes[$class]; - - if (($value instanceof \ArrayIterator || $value instanceof \ArrayObject) && null !== $proto) { - // ArrayIterator and ArrayObject need special care because their "flags" - // option changes the behavior of the (array) casting operator. - [$arrayValue, $properties] = self::getArrayObjectProperties($value, $proto); - - // populates Registry::$prototypes[$class] with a new instance - Registry::getClassReflector($class, Registry::$instantiableWithoutConstructor[$class], Registry::$cloneable[$class]); - } elseif ($value instanceof \SplObjectStorage && Registry::$cloneable[$class] && null !== $proto) { - // By implementing Serializable, SplObjectStorage breaks - // internal references; let's deal with it on our own. - foreach (clone $value as $v) { - $properties[] = $v; - $properties[] = $value[$v]; - } - $properties = ['SplObjectStorage' => ["\0" => $properties]]; - $arrayValue = (array) $value; - } elseif ($value instanceof \Serializable - || $value instanceof \__PHP_Incomplete_Class - || \PHP_VERSION_ID < 80200 && $value instanceof \DatePeriod - ) { - ++$objectsCount; - $objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0]; - $value = new Reference($id); - goto handle_value; - } else { - if (method_exists($class, '__sleep')) { - if (!\is_array($sleep = $value->__sleep())) { - trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', \E_USER_NOTICE); - $value = null; - goto handle_value; - } - $sleep = array_flip($sleep); - } - - $arrayValue = (array) $value; - } - - $proto = (array) $proto; - - foreach ($arrayValue as $name => $v) { - $i = 0; - $n = (string) $name; - if ('' === $n || "\0" !== $n[0]) { - $c = \PHP_VERSION_ID >= 80100 && $reflector->hasProperty($n) && ($p = $reflector->getProperty($n))->isReadOnly() ? $p->class : 'stdClass'; - } elseif ('*' === $n[1]) { - $n = substr($n, 3); - $c = $reflector->getProperty($n)->class; - if ('Error' === $c) { - $c = 'TypeError'; - } elseif ('Exception' === $c) { - $c = 'ErrorException'; - } - } else { - $i = strpos($n, "\0", 2); - $c = substr($n, 1, $i - 1); - $n = substr($n, 1 + $i); - } - if (null !== $sleep) { - if (!isset($sleep[$n]) || ($i && $c !== $class)) { - continue; - } - $sleep[$n] = false; - } - if (!\array_key_exists($name, $proto) || $proto[$name] !== $v || "\x00Error\x00trace" === $name || "\x00Exception\x00trace" === $name) { - $properties[$c][$n] = $v; - } - } - if ($sleep) { - foreach ($sleep as $n => $v) { - if (false !== $v) { - trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $n), \E_USER_NOTICE); - } - } - } - - prepare_value: - $objectsPool[$value] = [$id = \count($objectsPool)]; - $properties = self::prepare($properties, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); - ++$objectsCount; - $objectsPool[$value] = [$id, $class, $properties, method_exists($class, '__unserialize') ? -$objectsCount : (method_exists($class, '__wakeup') ? $objectsCount : 0)]; - - $value = new Reference($id); - - handle_value: - if ($isRef) { - unset($value); // Break the hard reference created above - } elseif (!$valueIsStatic) { - $values[$k] = $value; - } - $valuesAreStatic = $valueIsStatic && $valuesAreStatic; - } - - return $values; - } - - public static function export($value, string $indent = '') - { - switch (true) { - case \is_int($value) || \is_float($value): return var_export($value, true); - case [] === $value: return '[]'; - case false === $value: return 'false'; - case true === $value: return 'true'; - case null === $value: return 'null'; - case '' === $value: return "''"; - case $value instanceof \UnitEnum: return ltrim(var_export($value, true), '\\'); - } - - if ($value instanceof Reference) { - if (0 <= $value->id) { - return '$o['.$value->id.']'; - } - if (!$value->count) { - return self::export($value->value, $indent); - } - $value = -$value->id; - - return '&$r['.$value.']'; - } - $subIndent = $indent.' '; - - if (\is_string($value)) { - $code = sprintf("'%s'", addcslashes($value, "'\\")); - - $code = preg_replace_callback("/((?:[\\0\\r\\n]|\u{202A}|\u{202B}|\u{202D}|\u{202E}|\u{2066}|\u{2067}|\u{2068}|\u{202C}|\u{2069})++)(.)/", function ($m) use ($subIndent) { - $m[1] = sprintf('\'."%s".\'', str_replace( - ["\0", "\r", "\n", "\u{202A}", "\u{202B}", "\u{202D}", "\u{202E}", "\u{2066}", "\u{2067}", "\u{2068}", "\u{202C}", "\u{2069}", '\n\\'], - ['\0', '\r', '\n', '\u{202A}', '\u{202B}', '\u{202D}', '\u{202E}', '\u{2066}', '\u{2067}', '\u{2068}', '\u{202C}', '\u{2069}', '\n"'."\n".$subIndent.'."\\'], - $m[1] - )); - - if ("'" === $m[2]) { - return substr($m[1], 0, -2); - } - - if ('n".\'' === substr($m[1], -4)) { - return substr_replace($m[1], "\n".$subIndent.".'".$m[2], -2); - } - - return $m[1].$m[2]; - }, $code, -1, $count); - - if ($count && str_starts_with($code, "''.")) { - $code = substr($code, 3); - } - - return $code; - } - - if (\is_array($value)) { - $j = -1; - $code = ''; - foreach ($value as $k => $v) { - $code .= $subIndent; - if (!\is_int($k) || 1 !== $k - $j) { - $code .= self::export($k, $subIndent).' => '; - } - if (\is_int($k) && $k > $j) { - $j = $k; - } - $code .= self::export($v, $subIndent).",\n"; - } - - return "[\n".$code.$indent.']'; - } - - if ($value instanceof Values) { - $code = $subIndent."\$r = [],\n"; - foreach ($value->values as $k => $v) { - $code .= $subIndent.'$r['.$k.'] = '.self::export($v, $subIndent).",\n"; - } - - return "[\n".$code.$indent.']'; - } - - if ($value instanceof Registry) { - return self::exportRegistry($value, $indent, $subIndent); - } - - if ($value instanceof Hydrator) { - return self::exportHydrator($value, $indent, $subIndent); - } - - throw new \UnexpectedValueException(sprintf('Cannot export value of type "%s".', get_debug_type($value))); - } - - private static function exportRegistry(Registry $value, string $indent, string $subIndent): string - { - $code = ''; - $serializables = []; - $seen = []; - $prototypesAccess = 0; - $factoriesAccess = 0; - $r = '\\'.Registry::class; - $j = -1; - - foreach ($value->classes as $k => $class) { - if (':' === ($class[1] ?? null)) { - $serializables[$k] = $class; - continue; - } - if (!Registry::$instantiableWithoutConstructor[$class]) { - if (is_subclass_of($class, 'Serializable') && !method_exists($class, '__unserialize')) { - $serializables[$k] = 'C:'.\strlen($class).':"'.$class.'":0:{}'; - } else { - $serializables[$k] = 'O:'.\strlen($class).':"'.$class.'":0:{}'; - } - if (is_subclass_of($class, 'Throwable')) { - $eol = is_subclass_of($class, 'Error') ? "\0Error\0" : "\0Exception\0"; - $serializables[$k] = substr_replace($serializables[$k], '1:{s:'.(5 + \strlen($eol)).':"'.$eol.'trace";a:0:{}}', -4); - } - continue; - } - $code .= $subIndent.(1 !== $k - $j ? $k.' => ' : ''); - $j = $k; - $eol = ",\n"; - $c = '['.self::export($class).']'; - - if ($seen[$class] ?? false) { - if (Registry::$cloneable[$class]) { - ++$prototypesAccess; - $code .= 'clone $p'.$c; - } else { - ++$factoriesAccess; - $code .= '$f'.$c.'()'; - } - } else { - $seen[$class] = true; - if (Registry::$cloneable[$class]) { - $code .= 'clone ('.($prototypesAccess++ ? '$p' : '($p = &'.$r.'::$prototypes)').$c.' ?? '.$r.'::p'; - } else { - $code .= '('.($factoriesAccess++ ? '$f' : '($f = &'.$r.'::$factories)').$c.' ?? '.$r.'::f'; - $eol = '()'.$eol; - } - $code .= '('.substr($c, 1, -1).'))'; - } - $code .= $eol; - } - - if (1 === $prototypesAccess) { - $code = str_replace('($p = &'.$r.'::$prototypes)', $r.'::$prototypes', $code); - } - if (1 === $factoriesAccess) { - $code = str_replace('($f = &'.$r.'::$factories)', $r.'::$factories', $code); - } - if ('' !== $code) { - $code = "\n".$code.$indent; - } - - if ($serializables) { - $code = $r.'::unserialize(['.$code.'], '.self::export($serializables, $indent).')'; - } else { - $code = '['.$code.']'; - } - - return '$o = '.$code; - } - - private static function exportHydrator(Hydrator $value, string $indent, string $subIndent): string - { - $code = ''; - foreach ($value->properties as $class => $properties) { - $code .= $subIndent.' '.self::export($class).' => '.self::export($properties, $subIndent.' ').",\n"; - } - - $code = [ - self::export($value->registry, $subIndent), - self::export($value->values, $subIndent), - '' !== $code ? "[\n".$code.$subIndent.']' : '[]', - self::export($value->value, $subIndent), - self::export($value->wakeups, $subIndent), - ]; - - return '\\'.\get_class($value)."::hydrate(\n".$subIndent.implode(",\n".$subIndent, $code)."\n".$indent.')'; - } - - /** - * @param \ArrayIterator|\ArrayObject $value - * @param \ArrayIterator|\ArrayObject $proto - */ - private static function getArrayObjectProperties($value, $proto): array - { - $reflector = $value instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject'; - $reflector = Registry::$reflectors[$reflector] ?? Registry::getClassReflector($reflector); - - $properties = [ - $arrayValue = (array) $value, - $reflector->getMethod('getFlags')->invoke($value), - $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator', - ]; - - $reflector = $reflector->getMethod('setFlags'); - $reflector->invoke($proto, \ArrayObject::STD_PROP_LIST); - - if ($properties[1] & \ArrayObject::STD_PROP_LIST) { - $reflector->invoke($value, 0); - $properties[0] = (array) $value; - } else { - $reflector->invoke($value, \ArrayObject::STD_PROP_LIST); - $arrayValue = (array) $value; - } - $reflector->invoke($value, $properties[1]); - - if ([[], 0, 'ArrayIterator'] === $properties) { - $properties = []; - } else { - if ('ArrayIterator' === $properties[2]) { - unset($properties[2]); - } - $properties = [$reflector->class => ["\0" => $properties]]; - } - - return [$arrayValue, $properties]; - } -} diff --git a/lib/symfony/var-exporter/Internal/Hydrator.php b/lib/symfony/var-exporter/Internal/Hydrator.php deleted file mode 100644 index 5ed6bdc94..000000000 --- a/lib/symfony/var-exporter/Internal/Hydrator.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\ClassNotFoundException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Hydrator -{ - public static $hydrators = []; - - public $registry; - public $values; - public $properties; - public $value; - public $wakeups; - - public function __construct(?Registry $registry, ?Values $values, array $properties, $value, array $wakeups) - { - $this->registry = $registry; - $this->values = $values; - $this->properties = $properties; - $this->value = $value; - $this->wakeups = $wakeups; - } - - public static function hydrate($objects, $values, $properties, $value, $wakeups) - { - foreach ($properties as $class => $vars) { - (self::$hydrators[$class] ?? self::getHydrator($class))($vars, $objects); - } - foreach ($wakeups as $k => $v) { - if (\is_array($v)) { - $objects[-$k]->__unserialize($v); - } else { - $objects[$v]->__wakeup(); - } - } - - return $value; - } - - public static function getHydrator($class) - { - switch ($class) { - case 'stdClass': - return self::$hydrators[$class] = static function ($properties, $objects) { - foreach ($properties as $name => $values) { - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - - case 'ErrorException': - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \ErrorException { - }); - - case 'TypeError': - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \Error { - }); - - case 'SplObjectStorage': - return self::$hydrators[$class] = static function ($properties, $objects) { - foreach ($properties as $name => $values) { - if ("\0" === $name) { - foreach ($values as $i => $v) { - for ($j = 0; $j < \count($v); ++$j) { - $objects[$i]->attach($v[$j], $v[++$j]); - } - } - continue; - } - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - } - - if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { - throw new ClassNotFoundException($class); - } - $classReflector = new \ReflectionClass($class); - - switch ($class) { - case 'ArrayIterator': - case 'ArrayObject': - $constructor = \Closure::fromCallable([$classReflector->getConstructor(), 'invokeArgs']); - - return self::$hydrators[$class] = static function ($properties, $objects) use ($constructor) { - foreach ($properties as $name => $values) { - if ("\0" !== $name) { - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - } - foreach ($properties["\0"] ?? [] as $i => $v) { - $constructor($objects[$i], $v); - } - }; - } - - if (!$classReflector->isInternal()) { - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, $class); - } - - if ($classReflector->name !== $class) { - return self::$hydrators[$classReflector->name] ?? self::getHydrator($classReflector->name); - } - - $propertySetters = []; - foreach ($classReflector->getProperties() as $propertyReflector) { - if (!$propertyReflector->isStatic()) { - $propertyReflector->setAccessible(true); - $propertySetters[$propertyReflector->name] = \Closure::fromCallable([$propertyReflector, 'setValue']); - } - } - - if (!$propertySetters) { - return self::$hydrators[$class] = self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'); - } - - return self::$hydrators[$class] = static function ($properties, $objects) use ($propertySetters) { - foreach ($properties as $name => $values) { - if ($setValue = $propertySetters[$name] ?? null) { - foreach ($values as $i => $v) { - $setValue($objects[$i], $v); - } - continue; - } - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - } -} diff --git a/lib/symfony/var-exporter/Internal/Reference.php b/lib/symfony/var-exporter/Internal/Reference.php deleted file mode 100644 index e371c07b8..000000000 --- a/lib/symfony/var-exporter/Internal/Reference.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Reference -{ - public $id; - public $value; - public $count = 0; - - public function __construct(int $id, $value = null) - { - $this->id = $id; - $this->value = $value; - } -} diff --git a/lib/symfony/var-exporter/Internal/Registry.php b/lib/symfony/var-exporter/Internal/Registry.php deleted file mode 100644 index 24b77b9ef..000000000 --- a/lib/symfony/var-exporter/Internal/Registry.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\ClassNotFoundException; -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Registry -{ - public static $reflectors = []; - public static $prototypes = []; - public static $factories = []; - public static $cloneable = []; - public static $instantiableWithoutConstructor = []; - - public $classes = []; - - public function __construct(array $classes) - { - $this->classes = $classes; - } - - public static function unserialize($objects, $serializables) - { - $unserializeCallback = ini_set('unserialize_callback_func', __CLASS__.'::getClassReflector'); - - try { - foreach ($serializables as $k => $v) { - $objects[$k] = unserialize($v); - } - } finally { - ini_set('unserialize_callback_func', $unserializeCallback); - } - - return $objects; - } - - public static function p($class) - { - self::getClassReflector($class, true, true); - - return self::$prototypes[$class]; - } - - public static function f($class) - { - $reflector = self::$reflectors[$class] ?? self::getClassReflector($class, true, false); - - return self::$factories[$class] = \Closure::fromCallable([$reflector, 'newInstanceWithoutConstructor']); - } - - public static function getClassReflector($class, $instantiableWithoutConstructor = false, $cloneable = null) - { - if (!($isClass = class_exists($class)) && !interface_exists($class, false) && !trait_exists($class, false)) { - throw new ClassNotFoundException($class); - } - $reflector = new \ReflectionClass($class); - - if ($instantiableWithoutConstructor) { - $proto = $reflector->newInstanceWithoutConstructor(); - } elseif (!$isClass || $reflector->isAbstract()) { - throw new NotInstantiableTypeException($class); - } elseif ($reflector->name !== $class) { - $reflector = self::$reflectors[$name = $reflector->name] ?? self::getClassReflector($name, false, $cloneable); - self::$cloneable[$class] = self::$cloneable[$name]; - self::$instantiableWithoutConstructor[$class] = self::$instantiableWithoutConstructor[$name]; - self::$prototypes[$class] = self::$prototypes[$name]; - - return self::$reflectors[$class] = $reflector; - } else { - try { - $proto = $reflector->newInstanceWithoutConstructor(); - $instantiableWithoutConstructor = true; - } catch (\ReflectionException $e) { - $proto = $reflector->implementsInterface('Serializable') && !method_exists($class, '__unserialize') ? 'C:' : 'O:'; - if ('C:' === $proto && !$reflector->getMethod('unserialize')->isInternal()) { - $proto = null; - } else { - try { - $proto = @unserialize($proto.\strlen($class).':"'.$class.'":0:{}'); - } catch (\Exception $e) { - if (__FILE__ !== $e->getFile()) { - throw $e; - } - throw new NotInstantiableTypeException($class, $e); - } - if (false === $proto) { - throw new NotInstantiableTypeException($class); - } - } - } - if (null !== $proto && !$proto instanceof \Throwable && !$proto instanceof \Serializable && !method_exists($class, '__sleep') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__serialize'))) { - try { - serialize($proto); - } catch (\Exception $e) { - throw new NotInstantiableTypeException($class, $e); - } - } - } - - if (null === $cloneable) { - if (($proto instanceof \Reflector || $proto instanceof \ReflectionGenerator || $proto instanceof \ReflectionType || $proto instanceof \IteratorIterator || $proto instanceof \RecursiveIteratorIterator) && (!$proto instanceof \Serializable && !method_exists($proto, '__wakeup') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize')))) { - throw new NotInstantiableTypeException($class); - } - - $cloneable = $reflector->isCloneable() && !$reflector->hasMethod('__clone'); - } - - self::$cloneable[$class] = $cloneable; - self::$instantiableWithoutConstructor[$class] = $instantiableWithoutConstructor; - self::$prototypes[$class] = $proto; - - if ($proto instanceof \Throwable) { - static $setTrace; - - if (null === $setTrace) { - $setTrace = [ - new \ReflectionProperty(\Error::class, 'trace'), - new \ReflectionProperty(\Exception::class, 'trace'), - ]; - $setTrace[0]->setAccessible(true); - $setTrace[1]->setAccessible(true); - $setTrace[0] = \Closure::fromCallable([$setTrace[0], 'setValue']); - $setTrace[1] = \Closure::fromCallable([$setTrace[1], 'setValue']); - } - - $setTrace[$proto instanceof \Exception]($proto, []); - } - - return self::$reflectors[$class] = $reflector; - } -} diff --git a/lib/symfony/var-exporter/Internal/Values.php b/lib/symfony/var-exporter/Internal/Values.php deleted file mode 100644 index 21ae04e68..000000000 --- a/lib/symfony/var-exporter/Internal/Values.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Values -{ - public $values; - - public function __construct(array $values) - { - $this->values = $values; - } -} diff --git a/lib/symfony/var-exporter/LICENSE b/lib/symfony/var-exporter/LICENSE deleted file mode 100644 index 74cdc2dbf..000000000 --- a/lib/symfony/var-exporter/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/var-exporter/README.md b/lib/symfony/var-exporter/README.md deleted file mode 100644 index a34e4c23d..000000000 --- a/lib/symfony/var-exporter/README.md +++ /dev/null @@ -1,38 +0,0 @@ -VarExporter Component -===================== - -The VarExporter component allows exporting any serializable PHP data structure to -plain PHP code. While doing so, it preserves all the semantics associated with -the serialization mechanism of PHP (`__wakeup`, `__sleep`, `Serializable`, -`__serialize`, `__unserialize`). - -It also provides an instantiator that allows creating and populating objects -without calling their constructor nor any other methods. - -The reason to use this component *vs* `serialize()` or -[igbinary](https://github.com/igbinary/igbinary) is performance: thanks to -OPcache, the resulting code is significantly faster and more memory efficient -than using `unserialize()` or `igbinary_unserialize()`. - -Unlike `var_export()`, this works on any serializable PHP value. - -It also provides a few improvements over `var_export()`/`serialize()`: - - * the output is PSR-2 compatible; - * the output can be re-indented without messing up with `\r` or `\n` in the data - * missing classes throw a `ClassNotFoundException` instead of being unserialized to - `PHP_Incomplete_Class` objects; - * references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` - instances are preserved; - * `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes - throw an exception when being serialized (their unserialized version is broken - anyway, see https://bugs.php.net/76737). - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/var_exporter.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/var-exporter/VarExporter.php b/lib/symfony/var-exporter/VarExporter.php deleted file mode 100644 index 003388e79..000000000 --- a/lib/symfony/var-exporter/VarExporter.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter; - -use Symfony\Component\VarExporter\Exception\ExceptionInterface; -use Symfony\Component\VarExporter\Internal\Exporter; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; -use Symfony\Component\VarExporter\Internal\Values; - -/** - * Exports serializable PHP values to PHP code. - * - * VarExporter allows serializing PHP data structures to plain PHP code (like var_export()) - * while preserving all the semantics associated with serialize() (unlike var_export()). - * - * By leveraging OPcache, the generated PHP code is faster than doing the same with unserialize(). - * - * @author Nicolas Grekas - */ -final class VarExporter -{ - /** - * Exports a serializable PHP value to PHP code. - * - * @param mixed $value The value to export - * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise - * @param bool &$classes Classes found in the value are added to this list as both keys and values - * - * @throws ExceptionInterface When the provided value cannot be serialized - */ - public static function export($value, bool &$isStaticValue = null, array &$foundClasses = []): string - { - $isStaticValue = true; - - if (!\is_object($value) && !(\is_array($value) && $value) && !\is_resource($value) || $value instanceof \UnitEnum) { - return Exporter::export($value); - } - - $objectsPool = new \SplObjectStorage(); - $refsPool = []; - $objectsCount = 0; - - try { - $value = Exporter::prepare([$value], $objectsPool, $refsPool, $objectsCount, $isStaticValue)[0]; - } finally { - $references = []; - foreach ($refsPool as $i => $v) { - if ($v[0]->count) { - $references[1 + $i] = $v[2]; - } - $v[0] = $v[1]; - } - } - - if ($isStaticValue) { - return Exporter::export($value); - } - - $classes = []; - $values = []; - $states = []; - foreach ($objectsPool as $i => $v) { - [, $class, $values[], $wakeup] = $objectsPool[$v]; - $foundClasses[$class] = $classes[] = $class; - - if (0 < $wakeup) { - $states[$wakeup] = $i; - } elseif (0 > $wakeup) { - $states[-$wakeup] = [$i, array_pop($values)]; - $values[] = []; - } - } - ksort($states); - - $wakeups = [null]; - foreach ($states as $k => $v) { - if (\is_array($v)) { - $wakeups[-$v[0]] = $v[1]; - } else { - $wakeups[] = $v; - } - } - - if (null === $wakeups[0]) { - unset($wakeups[0]); - } - - $properties = []; - foreach ($values as $i => $vars) { - foreach ($vars as $class => $values) { - foreach ($values as $name => $v) { - $properties[$class][$name][$i] = $v; - } - } - } - - if ($classes || $references) { - $value = new Hydrator(new Registry($classes), $references ? new Values($references) : null, $properties, $value, $wakeups); - } else { - $isStaticValue = true; - } - - return Exporter::export($value); - } -} diff --git a/lib/symfony/var-exporter/composer.json b/lib/symfony/var-exporter/composer.json deleted file mode 100644 index 29d4901d3..000000000 --- a/lib/symfony/var-exporter/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "symfony/var-exporter", - "type": "library", - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "keywords": ["export", "serialize", "instantiate", "hydrate", "construct", "clone"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\VarExporter\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/web-profiler-bundle/CHANGELOG.md b/lib/symfony/web-profiler-bundle/CHANGELOG.md deleted file mode 100644 index f0974a6ed..000000000 --- a/lib/symfony/web-profiler-bundle/CHANGELOG.md +++ /dev/null @@ -1,95 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add a "preview" tab in mailer profiler for HTML email - -5.2.0 ------ - - * added session usage - -5.0.0 ------ - - * removed the `ExceptionController`, use `ExceptionPanelController` instead - * removed the `TemplateManager::templateExists()` method - -4.4.0 ------ - - * added support for the Mailer component - * added support for the HttpClient component - * added button to clear the ajax request tab - * deprecated the `ExceptionController::templateExists()` method - * deprecated the `TemplateManager::templateExists()` method - * deprecated the `ExceptionController` in favor of `ExceptionPanelController` - * marked all classes of the WebProfilerBundle as internal - * added a section with the stamps of a message after it is dispatched in the Messenger panel - -4.3.0 ------ - - * Replaced the canvas performance graph renderer with an SVG renderer - -4.1.0 ------ - - * added information about orphaned events - * made the toolbar auto-update with info from ajax reponses when they set the - `Symfony-Debug-Toolbar-Replace header` to `1` - -4.0.0 ------ - - * removed the `WebProfilerExtension::dumpValue()` method - * removed the `getTemplates()` method of the `TemplateManager` class in favor of the ``getNames()`` method - * removed the `web_profiler.position` config option and the - `web_profiler.debug_toolbar.position` container parameter - -3.4.0 ------ - - * Deprecated the `web_profiler.position` config option (in 4.0 version the toolbar - will always be displayed at the bottom) and the `web_profiler.debug_toolbar.position` - container parameter. - -3.1.0 ------ - - * added information about redirected and forwarded requests to the profiler - -3.0.0 ------ - - * removed profiler:import and profiler:export commands - -2.8.0 ------ - - * deprecated profiler:import and profiler:export commands - -2.7.0 ------ - - * [BC BREAK] if you are using a DB to store profiles, the table must be dropped - * added the HTTP status code to profiles - -2.3.0 ------ - - * draw retina canvas if devicePixelRatio is bigger than 1 - -2.1.0 ------ - - * deprecated the verbose setting (not relevant anymore) - * [BC BREAK] You must clear old profiles after upgrading to 2.1 (don't forget - to remove the table if you are using a DB) - * added support for the request method - * added a routing panel - * added a timeline panel - * The toolbar position can now be configured via the `position` option (can - be `top` or `bottom`) diff --git a/lib/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php b/lib/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php deleted file mode 100644 index 4941208c8..000000000 --- a/lib/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Controller; - -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profiler; - -/** - * Renders the exception panel. - * - * @author Yonel Ceruto - * - * @internal - */ -class ExceptionPanelController -{ - private $errorRenderer; - private $profiler; - - public function __construct(HtmlErrorRenderer $errorRenderer, Profiler $profiler = null) - { - $this->errorRenderer = $errorRenderer; - $this->profiler = $profiler; - } - - /** - * Renders the exception panel stacktrace for the given token. - */ - public function body(string $token): Response - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - $exception = $this->profiler->loadProfile($token) - ->getCollector('exception') - ->getException() - ; - - return new Response($this->errorRenderer->getBody($exception), 200, ['Content-Type' => 'text/html']); - } - - /** - * Renders the exception panel stylesheet. - */ - public function stylesheet(): Response - { - return new Response($this->errorRenderer->getStylesheet(), 200, ['Content-Type' => 'text/css']); - } -} diff --git a/lib/symfony/web-profiler-bundle/Controller/ProfilerController.php b/lib/symfony/web-profiler-bundle/Controller/ProfilerController.php deleted file mode 100644 index 2ad7df329..000000000 --- a/lib/symfony/web-profiler-bundle/Controller/ProfilerController.php +++ /dev/null @@ -1,391 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Controller; - -use Symfony\Bundle\FullStack; -use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; -use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; -use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; -use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profiler; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Twig\Environment; - -/** - * @author Fabien Potencier - * - * @internal - */ -class ProfilerController -{ - private $templateManager; - private $generator; - private $profiler; - private $twig; - private $templates; - private $cspHandler; - private $baseDir; - - public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, Environment $twig, array $templates, ContentSecurityPolicyHandler $cspHandler = null, string $baseDir = null) - { - $this->generator = $generator; - $this->profiler = $profiler; - $this->twig = $twig; - $this->templates = $templates; - $this->cspHandler = $cspHandler; - $this->baseDir = $baseDir; - } - - /** - * Redirects to the last profiles. - * - * @throws NotFoundHttpException - */ - public function homeAction(): RedirectResponse - { - $this->denyAccessIfProfilerDisabled(); - - return new RedirectResponse($this->generator->generate('_profiler_search_results', ['token' => 'empty', 'limit' => 10]), 302, ['Content-Type' => 'text/html']); - } - - /** - * Renders a profiler panel for the given token. - * - * @throws NotFoundHttpException - */ - public function panelAction(Request $request, string $token): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - $panel = $request->query->get('panel'); - $page = $request->query->get('page', 'home'); - - if ('latest' === $token && $latest = current($this->profiler->find(null, null, 1, null, null, null))) { - $token = $latest['token']; - } - - if (!$profile = $this->profiler->loadProfile($token)) { - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/info.html.twig', ['about' => 'no_token', 'token' => $token, 'request' => $request]); - } - - if (null === $panel) { - $panel = 'request'; - - foreach ($profile->getCollectors() as $collector) { - if ($collector instanceof ExceptionDataCollector && $collector->hasException()) { - $panel = $collector->getName(); - - break; - } - - if ($collector instanceof DumpDataCollector && $collector->getDumpsCount() > 0) { - $panel = $collector->getName(); - } - } - } - - if (!$profile->hasCollector($panel)) { - throw new NotFoundHttpException(sprintf('Panel "%s" is not available for token "%s".', $panel, $token)); - } - - return $this->renderWithCspNonces($request, $this->getTemplateManager()->getName($profile, $panel), [ - 'token' => $token, - 'profile' => $profile, - 'collector' => $profile->getCollector($panel), - 'panel' => $panel, - 'page' => $page, - 'request' => $request, - 'templates' => $this->getTemplateManager()->getNames($profile), - 'is_ajax' => $request->isXmlHttpRequest(), - 'profiler_markup_version' => 2, // 1 = original profiler, 2 = Symfony 2.8+ profiler - ]); - } - - /** - * Renders the Web Debug Toolbar. - * - * @throws NotFoundHttpException - */ - public function toolbarAction(Request $request, string $token = null): Response - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - if ($request->hasSession() && ($session = $request->getSession())->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) { - // keep current flashes for one more request if using AutoExpireFlashBag - $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); - } - - if ('empty' === $token || null === $token) { - return new Response('', 200, ['Content-Type' => 'text/html']); - } - - $this->profiler->disable(); - - if (!$profile = $this->profiler->loadProfile($token)) { - return new Response('', 404, ['Content-Type' => 'text/html']); - } - - $url = null; - try { - $url = $this->generator->generate('_profiler', ['token' => $token], UrlGeneratorInterface::ABSOLUTE_URL); - } catch (\Exception $e) { - // the profiler is not enabled - } - - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/toolbar.html.twig', [ - 'full_stack' => class_exists(FullStack::class), - 'request' => $request, - 'profile' => $profile, - 'templates' => $this->getTemplateManager()->getNames($profile), - 'profiler_url' => $url, - 'token' => $token, - 'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar - ]); - } - - /** - * Renders the profiler search bar. - * - * @throws NotFoundHttpException - */ - public function searchBarAction(Request $request): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - if (!$request->hasSession()) { - $ip = - $method = - $statusCode = - $url = - $start = - $end = - $limit = - $token = null; - } else { - $session = $request->getSession(); - - $ip = $request->query->get('ip', $session->get('_profiler_search_ip')); - $method = $request->query->get('method', $session->get('_profiler_search_method')); - $statusCode = $request->query->get('status_code', $session->get('_profiler_search_status_code')); - $url = $request->query->get('url', $session->get('_profiler_search_url')); - $start = $request->query->get('start', $session->get('_profiler_search_start')); - $end = $request->query->get('end', $session->get('_profiler_search_end')); - $limit = $request->query->get('limit', $session->get('_profiler_search_limit')); - $token = $request->query->get('token', $session->get('_profiler_search_token')); - } - - return new Response( - $this->twig->render('@WebProfiler/Profiler/search.html.twig', [ - 'token' => $token, - 'ip' => $ip, - 'method' => $method, - 'status_code' => $statusCode, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, - 'request' => $request, - ]), - 200, - ['Content-Type' => 'text/html'] - ); - } - - /** - * Renders the search results. - * - * @throws NotFoundHttpException - */ - public function searchResultsAction(Request $request, string $token): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - $profile = $this->profiler->loadProfile($token); - - $ip = $request->query->get('ip'); - $method = $request->query->get('method'); - $statusCode = $request->query->get('status_code'); - $url = $request->query->get('url'); - $start = $request->query->get('start', null); - $end = $request->query->get('end', null); - $limit = $request->query->get('limit'); - - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/results.html.twig', [ - 'request' => $request, - 'token' => $token, - 'profile' => $profile, - 'tokens' => $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode), - 'ip' => $ip, - 'method' => $method, - 'status_code' => $statusCode, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, - 'panel' => null, - ]); - } - - /** - * Narrows the search bar. - * - * @throws NotFoundHttpException - */ - public function searchAction(Request $request): Response - { - $this->denyAccessIfProfilerDisabled(); - - $ip = $request->query->get('ip'); - $method = $request->query->get('method'); - $statusCode = $request->query->get('status_code'); - $url = $request->query->get('url'); - $start = $request->query->get('start', null); - $end = $request->query->get('end', null); - $limit = $request->query->get('limit'); - $token = $request->query->get('token'); - - if ($request->hasSession()) { - $session = $request->getSession(); - - $session->set('_profiler_search_ip', $ip); - $session->set('_profiler_search_method', $method); - $session->set('_profiler_search_status_code', $statusCode); - $session->set('_profiler_search_url', $url); - $session->set('_profiler_search_start', $start); - $session->set('_profiler_search_end', $end); - $session->set('_profiler_search_limit', $limit); - $session->set('_profiler_search_token', $token); - } - - if (!empty($token)) { - return new RedirectResponse($this->generator->generate('_profiler', ['token' => $token]), 302, ['Content-Type' => 'text/html']); - } - - $tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode); - - return new RedirectResponse($this->generator->generate('_profiler_search_results', [ - 'token' => $tokens ? $tokens[0]['token'] : 'empty', - 'ip' => $ip, - 'method' => $method, - 'status_code' => $statusCode, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, - ]), 302, ['Content-Type' => 'text/html']); - } - - /** - * Displays the PHP info. - * - * @throws NotFoundHttpException - */ - public function phpinfoAction(): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - ob_start(); - phpinfo(); - $phpinfo = ob_get_clean(); - - return new Response($phpinfo, 200, ['Content-Type' => 'text/html']); - } - - /** - * Displays the source of a file. - * - * @throws NotFoundHttpException - */ - public function openAction(Request $request): Response - { - if (null === $this->baseDir) { - throw new NotFoundHttpException('The base dir should be set.'); - } - - if ($this->profiler) { - $this->profiler->disable(); - } - - $file = $request->query->get('file'); - $line = $request->query->get('line'); - - $filename = $this->baseDir.\DIRECTORY_SEPARATOR.$file; - - if (preg_match("'(^|[/\\\\])\.'", $file) || !is_readable($filename)) { - throw new NotFoundHttpException(sprintf('The file "%s" cannot be opened.', $file)); - } - - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/open.html.twig', [ - 'filename' => $filename, - 'file' => $file, - 'line' => $line, - ]); - } - - /** - * Gets the Template Manager. - */ - protected function getTemplateManager(): TemplateManager - { - if (null === $this->templateManager) { - $this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates); - } - - return $this->templateManager; - } - - private function denyAccessIfProfilerDisabled() - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - $this->profiler->disable(); - } - - private function renderWithCspNonces(Request $request, string $template, array $variables, int $code = 200, array $headers = ['Content-Type' => 'text/html']): Response - { - $response = new Response('', $code, $headers); - - $nonces = $this->cspHandler ? $this->cspHandler->getNonces($request, $response) : []; - - $variables['csp_script_nonce'] = $nonces['csp_script_nonce'] ?? null; - $variables['csp_style_nonce'] = $nonces['csp_style_nonce'] ?? null; - - $response->setContent($this->twig->render($template, $variables)); - - return $response; - } -} diff --git a/lib/symfony/web-profiler-bundle/Controller/RouterController.php b/lib/symfony/web-profiler-bundle/Controller/RouterController.php deleted file mode 100644 index 50560e0b3..000000000 --- a/lib/symfony/web-profiler-bundle/Controller/RouterController.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Controller; - -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profiler; -use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RouterInterface; -use Twig\Environment; - -/** - * @author Fabien Potencier - * - * @internal - */ -class RouterController -{ - private $profiler; - private $twig; - private $matcher; - private $routes; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private $expressionLanguageProviders = []; - - public function __construct(Profiler $profiler = null, Environment $twig, UrlMatcherInterface $matcher = null, RouteCollection $routes = null, iterable $expressionLanguageProviders = []) - { - $this->profiler = $profiler; - $this->twig = $twig; - $this->matcher = $matcher; - $this->routes = (null === $routes && $matcher instanceof RouterInterface) ? $matcher->getRouteCollection() : $routes; - $this->expressionLanguageProviders = $expressionLanguageProviders; - } - - /** - * Renders the profiler panel for the given token. - * - * @throws NotFoundHttpException - */ - public function panelAction(string $token): Response - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - $this->profiler->disable(); - - if (null === $this->matcher || null === $this->routes) { - return new Response('The Router is not enabled.', 200, ['Content-Type' => 'text/html']); - } - - $profile = $this->profiler->loadProfile($token); - - /** @var RequestDataCollector $request */ - $request = $profile->getCollector('request'); - - return new Response($this->twig->render('@WebProfiler/Router/panel.html.twig', [ - 'request' => $request, - 'router' => $profile->getCollector('router'), - 'traces' => $this->getTraces($request, $profile->getMethod()), - ]), 200, ['Content-Type' => 'text/html']); - } - - /** - * Returns the routing traces associated to the given request. - */ - private function getTraces(RequestDataCollector $request, string $method): array - { - $traceRequest = Request::create( - $request->getPathInfo(), - $request->getRequestServer(true)->get('REQUEST_METHOD'), - \in_array($request->getMethod(), ['DELETE', 'PATCH', 'POST', 'PUT'], true) ? $request->getRequestRequest()->all() : $request->getRequestQuery()->all(), - $request->getRequestCookies(true)->all(), - [], - $request->getRequestServer(true)->all() - ); - - $context = $this->matcher->getContext(); - $context->setMethod($method); - $matcher = new TraceableUrlMatcher($this->routes, $context); - foreach ($this->expressionLanguageProviders as $provider) { - $matcher->addExpressionLanguageProvider($provider); - } - - return $matcher->getTracesForRequest($traceRequest); - } -} diff --git a/lib/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php b/lib/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php deleted file mode 100644 index ce2413692..000000000 --- a/lib/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php +++ /dev/null @@ -1,270 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Csp; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Handles Content-Security-Policy HTTP header for the WebProfiler Bundle. - * - * @author Romain Neutron - * - * @internal - */ -class ContentSecurityPolicyHandler -{ - private $nonceGenerator; - private $cspDisabled = false; - - public function __construct(NonceGenerator $nonceGenerator) - { - $this->nonceGenerator = $nonceGenerator; - } - - /** - * Returns an array of nonces to be used in Twig templates and Content-Security-Policy headers. - * - * Nonce can be provided by; - * - The request - In case HTML content is fetched via AJAX and inserted in DOM, it must use the same nonce as origin - * - The response - A call to getNonces() has already been done previously. Same nonce are returned - * - They are otherwise randomly generated - */ - public function getNonces(Request $request, Response $response): array - { - if ($request->headers->has('X-SymfonyProfiler-Script-Nonce') && $request->headers->has('X-SymfonyProfiler-Style-Nonce')) { - return [ - 'csp_script_nonce' => $request->headers->get('X-SymfonyProfiler-Script-Nonce'), - 'csp_style_nonce' => $request->headers->get('X-SymfonyProfiler-Style-Nonce'), - ]; - } - - if ($response->headers->has('X-SymfonyProfiler-Script-Nonce') && $response->headers->has('X-SymfonyProfiler-Style-Nonce')) { - return [ - 'csp_script_nonce' => $response->headers->get('X-SymfonyProfiler-Script-Nonce'), - 'csp_style_nonce' => $response->headers->get('X-SymfonyProfiler-Style-Nonce'), - ]; - } - - $nonces = [ - 'csp_script_nonce' => $this->generateNonce(), - 'csp_style_nonce' => $this->generateNonce(), - ]; - - $response->headers->set('X-SymfonyProfiler-Script-Nonce', $nonces['csp_script_nonce']); - $response->headers->set('X-SymfonyProfiler-Style-Nonce', $nonces['csp_style_nonce']); - - return $nonces; - } - - /** - * Disables Content-Security-Policy. - * - * All related headers will be removed. - */ - public function disableCsp() - { - $this->cspDisabled = true; - } - - /** - * Cleanup temporary headers and updates Content-Security-Policy headers. - * - * @return array Nonces used by the bundle in Content-Security-Policy header - */ - public function updateResponseHeaders(Request $request, Response $response): array - { - if ($this->cspDisabled) { - $this->removeCspHeaders($response); - - return []; - } - - $nonces = $this->getNonces($request, $response); - $this->cleanHeaders($response); - $this->updateCspHeaders($response, $nonces); - - return $nonces; - } - - private function cleanHeaders(Response $response) - { - $response->headers->remove('X-SymfonyProfiler-Script-Nonce'); - $response->headers->remove('X-SymfonyProfiler-Style-Nonce'); - } - - private function removeCspHeaders(Response $response) - { - $response->headers->remove('X-Content-Security-Policy'); - $response->headers->remove('Content-Security-Policy'); - $response->headers->remove('Content-Security-Policy-Report-Only'); - } - - /** - * Updates Content-Security-Policy headers in a response. - */ - private function updateCspHeaders(Response $response, array $nonces = []): array - { - $nonces = array_replace([ - 'csp_script_nonce' => $this->generateNonce(), - 'csp_style_nonce' => $this->generateNonce(), - ], $nonces); - - $ruleIsSet = false; - - $headers = $this->getCspHeaders($response); - - $types = [ - 'script-src' => 'csp_script_nonce', - 'script-src-elem' => 'csp_script_nonce', - 'style-src' => 'csp_style_nonce', - 'style-src-elem' => 'csp_style_nonce', - ]; - - foreach ($headers as $header => $directives) { - foreach ($types as $type => $tokenName) { - if ($this->authorizesInline($directives, $type)) { - continue; - } - if (!isset($headers[$header][$type])) { - if (null === $fallback = $this->getDirectiveFallback($directives, $type)) { - continue; - } - - if (['\'none\''] === $fallback) { - // Fallback came from "default-src: 'none'" - // 'none' is invalid if it's not the only expression in the source list, so we leave it out - $fallback = []; - } - - $headers[$header][$type] = $fallback; - } - $ruleIsSet = true; - if (!\in_array('\'unsafe-inline\'', $headers[$header][$type], true)) { - $headers[$header][$type][] = '\'unsafe-inline\''; - } - $headers[$header][$type][] = sprintf('\'nonce-%s\'', $nonces[$tokenName]); - } - } - - if (!$ruleIsSet) { - return $nonces; - } - - foreach ($headers as $header => $directives) { - $response->headers->set($header, $this->generateCspHeader($directives)); - } - - return $nonces; - } - - /** - * Generates a valid Content-Security-Policy nonce. - */ - private function generateNonce(): string - { - return $this->nonceGenerator->generate(); - } - - /** - * Converts a directive set array into Content-Security-Policy header. - */ - private function generateCspHeader(array $directives): string - { - return array_reduce(array_keys($directives), function ($res, $name) use ($directives) { - return ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])); - }, ''); - } - - /** - * Converts a Content-Security-Policy header value into a directive set array. - */ - private function parseDirectives(string $header): array - { - $directives = []; - - foreach (explode(';', $header) as $directive) { - $parts = explode(' ', trim($directive)); - if (\count($parts) < 1) { - continue; - } - $name = array_shift($parts); - $directives[$name] = $parts; - } - - return $directives; - } - - /** - * Detects if the 'unsafe-inline' is prevented for a directive within the directive set. - */ - private function authorizesInline(array $directivesSet, string $type): bool - { - if (isset($directivesSet[$type])) { - $directives = $directivesSet[$type]; - } elseif (null === $directives = $this->getDirectiveFallback($directivesSet, $type)) { - return false; - } - - return \in_array('\'unsafe-inline\'', $directives, true) && !$this->hasHashOrNonce($directives); - } - - private function hasHashOrNonce(array $directives): bool - { - foreach ($directives as $directive) { - if (!str_ends_with($directive, '\'')) { - continue; - } - if ('\'nonce-' === substr($directive, 0, 7)) { - return true; - } - if (\in_array(substr($directive, 0, 8), ['\'sha256-', '\'sha384-', '\'sha512-'], true)) { - return true; - } - } - - return false; - } - - private function getDirectiveFallback(array $directiveSet, string $type) - { - if (\in_array($type, ['script-src-elem', 'style-src-elem'], true) || !isset($directiveSet['default-src'])) { - // Let the browser fallback on it's own - return null; - } - - return $directiveSet['default-src']; - } - - /** - * Retrieves the Content-Security-Policy headers (either X-Content-Security-Policy or Content-Security-Policy) from - * a response. - */ - private function getCspHeaders(Response $response): array - { - $headers = []; - - if ($response->headers->has('Content-Security-Policy')) { - $headers['Content-Security-Policy'] = $this->parseDirectives($response->headers->get('Content-Security-Policy')); - } - - if ($response->headers->has('Content-Security-Policy-Report-Only')) { - $headers['Content-Security-Policy-Report-Only'] = $this->parseDirectives($response->headers->get('Content-Security-Policy-Report-Only')); - } - - if ($response->headers->has('X-Content-Security-Policy')) { - $headers['X-Content-Security-Policy'] = $this->parseDirectives($response->headers->get('X-Content-Security-Policy')); - } - - return $headers; - } -} diff --git a/lib/symfony/web-profiler-bundle/Csp/NonceGenerator.php b/lib/symfony/web-profiler-bundle/Csp/NonceGenerator.php deleted file mode 100644 index 19af84969..000000000 --- a/lib/symfony/web-profiler-bundle/Csp/NonceGenerator.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Csp; - -/** - * Generates Content-Security-Policy nonce. - * - * @author Romain Neutron - * - * @internal - */ -class NonceGenerator -{ - public function generate(): string - { - return bin2hex(random_bytes(16)); - } -} diff --git a/lib/symfony/web-profiler-bundle/DependencyInjection/Configuration.php b/lib/symfony/web-profiler-bundle/DependencyInjection/Configuration.php deleted file mode 100644 index 041c3350a..000000000 --- a/lib/symfony/web-profiler-bundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection; - -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; - -/** - * This class contains the configuration information for the bundle. - * - * This information is solely responsible for how the different configuration - * sections are normalized, and merged. - * - * @author Fabien Potencier - */ -class Configuration implements ConfigurationInterface -{ - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder('web_profiler'); - - $treeBuilder->getRootNode() - ->children() - ->booleanNode('toolbar')->defaultFalse()->end() - ->booleanNode('intercept_redirects')->defaultFalse()->end() - ->scalarNode('excluded_ajax_paths')->defaultValue('^/((index|app(_[\w]+)?)\.php/)?_wdt')->end() - ->end() - ; - - return $treeBuilder; - } -} diff --git a/lib/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php b/lib/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php deleted file mode 100644 index 0bb949c09..000000000 --- a/lib/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection; - -use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\Extension; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; - -/** - * WebProfilerExtension. - * - * Usage: - * - * - * - * @author Fabien Potencier - */ -class WebProfilerExtension extends Extension -{ - /** - * Loads the web profiler configuration. - * - * @param array $configs An array of configuration settings - */ - public function load(array $configs, ContainerBuilder $container) - { - $configuration = $this->getConfiguration($configs, $container); - $config = $this->processConfiguration($configuration, $configs); - - $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - $loader->load('profiler.php'); - - if ($config['toolbar'] || $config['intercept_redirects']) { - $loader->load('toolbar.php'); - $container->getDefinition('web_profiler.debug_toolbar')->replaceArgument(4, $config['excluded_ajax_paths']); - $container->setParameter('web_profiler.debug_toolbar.intercept_redirects', $config['intercept_redirects']); - $container->setParameter('web_profiler.debug_toolbar.mode', $config['toolbar'] ? WebDebugToolbarListener::ENABLED : WebDebugToolbarListener::DISABLED); - } - - $container->getDefinition('debug.file_link_formatter') - ->replaceArgument(3, new ServiceClosureArgument(new Reference('debug.file_link_formatter.url_format'))); - } - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return __DIR__.'/../Resources/config/schema'; - } - - public function getNamespace() - { - return 'http://symfony.com/schema/dic/webprofiler'; - } -} diff --git a/lib/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php b/lib/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php deleted file mode 100644 index b2e7db269..000000000 --- a/lib/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\EventListener; - -use Symfony\Bundle\FullStack; -use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; -use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Twig\Environment; - -/** - * WebDebugToolbarListener injects the Web Debug Toolbar. - * - * The onKernelResponse method must be connected to the kernel.response event. - * - * The WDT is only injected on well-formed HTML (with a proper tag). - * This means that the WDT is never included in sub-requests or ESI requests. - * - * @author Fabien Potencier - * - * @final - */ -class WebDebugToolbarListener implements EventSubscriberInterface -{ - public const DISABLED = 1; - public const ENABLED = 2; - - protected $twig; - protected $urlGenerator; - protected $interceptRedirects; - protected $mode; - protected $excludedAjaxPaths; - private $cspHandler; - private $dumpDataCollector; - - public function __construct(Environment $twig, bool $interceptRedirects = false, int $mode = self::ENABLED, UrlGeneratorInterface $urlGenerator = null, string $excludedAjaxPaths = '^/bundles|^/_wdt', ContentSecurityPolicyHandler $cspHandler = null, DumpDataCollector $dumpDataCollector = null) - { - $this->twig = $twig; - $this->urlGenerator = $urlGenerator; - $this->interceptRedirects = $interceptRedirects; - $this->mode = $mode; - $this->excludedAjaxPaths = $excludedAjaxPaths; - $this->cspHandler = $cspHandler; - $this->dumpDataCollector = $dumpDataCollector; - } - - public function isEnabled(): bool - { - return self::DISABLED !== $this->mode; - } - - public function setMode(int $mode): void - { - if (self::DISABLED !== $mode && self::ENABLED !== $mode) { - throw new \InvalidArgumentException(sprintf('Invalid value provided for mode, use one of "%s::DISABLED" or "%s::ENABLED".', self::class, self::class)); - } - - $this->mode = $mode; - } - - public function onKernelResponse(ResponseEvent $event) - { - $response = $event->getResponse(); - $request = $event->getRequest(); - - if ($response->headers->has('X-Debug-Token') && null !== $this->urlGenerator) { - try { - $response->headers->set( - 'X-Debug-Token-Link', - $this->urlGenerator->generate('_profiler', ['token' => $response->headers->get('X-Debug-Token')], UrlGeneratorInterface::ABSOLUTE_URL) - ); - } catch (\Exception $e) { - $response->headers->set('X-Debug-Error', \get_class($e).': '.preg_replace('/\s+/', ' ', $e->getMessage())); - } - } - - if (!$event->isMainRequest()) { - return; - } - - $nonces = []; - if ($this->cspHandler) { - if ($this->dumpDataCollector && $this->dumpDataCollector->getDumpsCount() > 0) { - $this->cspHandler->disableCsp(); - } - - $nonces = $this->cspHandler->updateResponseHeaders($request, $response); - } - - // do not capture redirects or modify XML HTTP Requests - if ($request->isXmlHttpRequest()) { - return; - } - - if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects && 'html' === $request->getRequestFormat()) { - if ($request->hasSession() && ($session = $request->getSession())->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) { - // keep current flashes for one more request if using AutoExpireFlashBag - $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); - } - - $response->setContent($this->twig->render('@WebProfiler/Profiler/toolbar_redirect.html.twig', ['location' => $response->headers->get('Location')])); - $response->setStatusCode(200); - $response->headers->remove('Location'); - } - - if (self::DISABLED === $this->mode - || !$response->headers->has('X-Debug-Token') - || $response->isRedirection() - || ($response->headers->has('Content-Type') && !str_contains($response->headers->get('Content-Type'), 'html')) - || 'html' !== $request->getRequestFormat() - || false !== stripos($response->headers->get('Content-Disposition', ''), 'attachment;') - ) { - return; - } - - $this->injectToolbar($response, $request, $nonces); - } - - /** - * Injects the web debug toolbar into the given Response. - */ - protected function injectToolbar(Response $response, Request $request, array $nonces) - { - $content = $response->getContent(); - $pos = strripos($content, ''); - - if (false !== $pos) { - $toolbar = "\n".str_replace("\n", '', $this->twig->render( - '@WebProfiler/Profiler/toolbar_js.html.twig', - [ - 'full_stack' => class_exists(FullStack::class), - 'excluded_ajax_paths' => $this->excludedAjaxPaths, - 'token' => $response->headers->get('X-Debug-Token'), - 'request' => $request, - 'csp_script_nonce' => $nonces['csp_script_nonce'] ?? null, - 'csp_style_nonce' => $nonces['csp_style_nonce'] ?? null, - ] - ))."\n"; - $content = substr($content, 0, $pos).$toolbar.substr($content, $pos); - $response->setContent($content); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => ['onKernelResponse', -128], - ]; - } -} diff --git a/lib/symfony/web-profiler-bundle/LICENSE b/lib/symfony/web-profiler-bundle/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/web-profiler-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/web-profiler-bundle/Profiler/TemplateManager.php b/lib/symfony/web-profiler-bundle/Profiler/TemplateManager.php deleted file mode 100644 index f962e69f1..000000000 --- a/lib/symfony/web-profiler-bundle/Profiler/TemplateManager.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Profiler; - -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profile; -use Symfony\Component\HttpKernel\Profiler\Profiler; -use Twig\Environment; - -/** - * @author Fabien Potencier - * @author Artur Wielogórski - * - * @internal - */ -class TemplateManager -{ - protected $twig; - protected $templates; - protected $profiler; - - public function __construct(Profiler $profiler, Environment $twig, array $templates) - { - $this->profiler = $profiler; - $this->twig = $twig; - $this->templates = $templates; - } - - /** - * Gets the template name for a given panel. - * - * @return mixed - * - * @throws NotFoundHttpException - */ - public function getName(Profile $profile, string $panel) - { - $templates = $this->getNames($profile); - - if (!isset($templates[$panel])) { - throw new NotFoundHttpException(sprintf('Panel "%s" is not registered in profiler or is not present in viewed profile.', $panel)); - } - - return $templates[$panel]; - } - - /** - * Gets template names of templates that are present in the viewed profile. - * - * @throws \UnexpectedValueException - */ - public function getNames(Profile $profile): array - { - $loader = $this->twig->getLoader(); - $templates = []; - - foreach ($this->templates as $arguments) { - if (null === $arguments) { - continue; - } - - [$name, $template] = $arguments; - - if (!$this->profiler->has($name) || !$profile->hasCollector($name)) { - continue; - } - - if (str_ends_with($template, '.html.twig')) { - $template = substr($template, 0, -10); - } - - if (!$loader->exists($template.'.html.twig')) { - throw new \UnexpectedValueException(sprintf('The profiler template "%s.html.twig" for data collector "%s" does not exist.', $template, $name)); - } - - $templates[$name] = $template.'.html.twig'; - } - - return $templates; - } -} diff --git a/lib/symfony/web-profiler-bundle/README.md b/lib/symfony/web-profiler-bundle/README.md deleted file mode 100644 index e3c1400b1..000000000 --- a/lib/symfony/web-profiler-bundle/README.md +++ /dev/null @@ -1,16 +0,0 @@ -WebProfilerBundle -================= - -WebProfilerBundle provides a **development tool** that gives detailed -information about the execution of any request. - -**Never** enable it on production servers as it will lead to major security -vulnerabilities in your project. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/web-profiler-bundle/Resources/ICONS_LICENSE.txt b/lib/symfony/web-profiler-bundle/Resources/ICONS_LICENSE.txt deleted file mode 100644 index 2e2027267..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/ICONS_LICENSE.txt +++ /dev/null @@ -1,5 +0,0 @@ -Icons License -============= - -Icons created by Sensio (http://www.sensio.com/) are shared under a Creative -Commons Attribution license (http://creativecommons.org/licenses/by-sa/3.0/). \ No newline at end of file diff --git a/lib/symfony/web-profiler-bundle/Resources/config/profiler.php b/lib/symfony/web-profiler-bundle/Resources/config/profiler.php deleted file mode 100644 index 85c64f268..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/config/profiler.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\WebProfilerBundle\Controller\ExceptionPanelController; -use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController; -use Symfony\Bundle\WebProfilerBundle\Controller\RouterController; -use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; -use Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator; -use Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -return static function (ContainerConfigurator $container) { - $container->services() - - ->set('web_profiler.controller.profiler', ProfilerController::class) - ->public() - ->args([ - service('router')->nullOnInvalid(), - service('profiler')->nullOnInvalid(), - service('twig'), - param('data_collector.templates'), - service('web_profiler.csp.handler'), - param('kernel.project_dir'), - ]) - - ->set('web_profiler.controller.router', RouterController::class) - ->public() - ->args([ - service('profiler')->nullOnInvalid(), - service('twig'), - service('router')->nullOnInvalid(), - null, - tagged_iterator('routing.expression_language_provider'), - ]) - - ->set('web_profiler.controller.exception_panel', ExceptionPanelController::class) - ->public() - ->args([ - service('error_handler.error_renderer.html'), - service('profiler')->nullOnInvalid(), - ]) - - ->set('web_profiler.csp.handler', ContentSecurityPolicyHandler::class) - ->args([ - inline_service(NonceGenerator::class), - ]) - - ->set('twig.extension.webprofiler', WebProfilerExtension::class) - ->args([ - inline_service(HtmlDumper::class) - ->args([null, param('kernel.charset'), HtmlDumper::DUMP_LIGHT_ARRAY]) - ->call('setDisplayOptions', [['maxStringLength' => 4096, 'fileLinkFormat' => service('debug.file_link_formatter')]]), - ]) - ->tag('twig.extension') - - ->set('debug.file_link_formatter', FileLinkFormatter::class) - ->args([ - param('debug.file_link_format'), - service('request_stack')->ignoreOnInvalid(), - param('kernel.project_dir'), - '/_profiler/open?file=%%f&line=%%l#line%%l', - ]) - - ->set('debug.file_link_formatter.url_format', 'string') - ->factory([FileLinkFormatter::class, 'generateUrlFormat']) - ->args([ - service('router'), - '_profiler_open_file', - '?file=%%f&line=%%l#line%%l', - ]) - ; -}; diff --git a/lib/symfony/web-profiler-bundle/Resources/config/routing/profiler.xml b/lib/symfony/web-profiler-bundle/Resources/config/routing/profiler.xml deleted file mode 100644 index f20cba0e6..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/config/routing/profiler.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - web_profiler.controller.profiler::homeAction - - - - web_profiler.controller.profiler::searchAction - - - - web_profiler.controller.profiler::searchBarAction - - - - web_profiler.controller.profiler::phpinfoAction - - - - web_profiler.controller.profiler::searchResultsAction - - - - web_profiler.controller.profiler::openAction - - - - web_profiler.controller.profiler::panelAction - - - - web_profiler.controller.router::panelAction - - - - web_profiler.controller.exception_panel::body - - - - web_profiler.controller.exception_panel::stylesheet - - - diff --git a/lib/symfony/web-profiler-bundle/Resources/config/routing/wdt.xml b/lib/symfony/web-profiler-bundle/Resources/config/routing/wdt.xml deleted file mode 100644 index 0f7e960cc..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/config/routing/wdt.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - web_profiler.controller.profiler::toolbarAction - - diff --git a/lib/symfony/web-profiler-bundle/Resources/config/schema/webprofiler-1.0.xsd b/lib/symfony/web-profiler-bundle/Resources/config/schema/webprofiler-1.0.xsd deleted file mode 100644 index e22105a17..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/config/schema/webprofiler-1.0.xsd +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/lib/symfony/web-profiler-bundle/Resources/config/toolbar.php b/lib/symfony/web-profiler-bundle/Resources/config/toolbar.php deleted file mode 100644 index 473b3630f..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/config/toolbar.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; - -return static function (ContainerConfigurator $container) { - $container->services() - - ->set('web_profiler.debug_toolbar', WebDebugToolbarListener::class) - ->args([ - service('twig'), - param('web_profiler.debug_toolbar.intercept_redirects'), - param('web_profiler.debug_toolbar.mode'), - service('router')->ignoreOnInvalid(), - abstract_arg('paths that should be excluded from the AJAX requests shown in the toolbar'), - service('web_profiler.csp.handler'), - service('data_collector.dump')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/ajax.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/ajax.html.twig deleted file mode 100644 index e4e7d6418..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/ajax.html.twig +++ /dev/null @@ -1,35 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set icon %} - {{ include('@WebProfiler/Icon/ajax.svg') }} - 0 - {% endset %} - - {% set text %} -
    - - - (Clear) - -
    -
    - - - - - - - - - - - - - -
    #ProfileMethodTypeStatusURLTime
    -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false }) }} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/cache.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/cache.html.twig deleted file mode 100644 index 0c406e944..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/cache.html.twig +++ /dev/null @@ -1,153 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if collector.totals.calls > 0 %} - {% set icon %} - {{ include('@WebProfiler/Icon/cache.svg') }} - {{ collector.totals.calls }} - - in - {{ '%0.2f'|format(collector.totals.time * 1000) }} - ms - - {% endset %} - {% set text %} -
    - Cache Calls - {{ collector.totals.calls }} -
    -
    - Total time - {{ '%0.2f'|format(collector.totals.time * 1000) }} ms -
    -
    - Cache hits - {{ collector.totals.hits }} / {{ collector.totals.reads }}{% if collector.totals.hit_read_ratio is not null %} ({{ collector.totals.hit_read_ratio }}%){% endif %} -
    -
    - Cache writes - {{ collector.totals.writes }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - - {{ include('@WebProfiler/Icon/cache.svg') }} - - Cache - -{% endblock %} - -{% block panel %} -

    Cache

    - - {% if collector.totals.calls == 0 %} -
    -

    No cache calls were made.

    -
    - {% else %} -
    -
    - {{ collector.totals.calls }} - Total calls -
    -
    - {{ '%0.2f'|format(collector.totals.time * 1000) }} ms - Total time -
    -
    -
    - {{ collector.totals.reads }} - Total reads -
    -
    - {{ collector.totals.writes }} - Total writes -
    -
    - {{ collector.totals.deletes }} - Total deletes -
    -
    -
    - {{ collector.totals.hits }} - Total hits -
    -
    - {{ collector.totals.misses }} - Total misses -
    -
    - - {{ collector.totals.hit_read_ratio ?? 0 }} % - - Hits/reads -
    -
    - -

    Pools

    -
    - {% for name, calls in collector.calls %} -
    -

    {{ name }} {{ collector.statistics[name].calls }}

    - -
    - {% if calls|length == 0 %} -
    -

    No calls were made for {{ name }} pool.

    -
    - {% else %} -

    Metrics

    -
    - {% for key, value in collector.statistics[name] %} -
    - - {% if key == 'time' %} - {{ '%0.2f'|format(1000 * value) }} ms - {% elseif key == 'hit_read_ratio' %} - {{ value ?? 0 }} % - {% else %} - {{ value }} - {% endif %} - - {{ key == 'hit_read_ratio' ? 'Hits/reads' : key|capitalize }} -
    - {% if key == 'time' or key == 'deletes' %} -
    - {% endif %} - {% endfor %} -
    - -

    Calls

    - - - - - - - - - - - {% for call in calls %} - - - - - - - {% endfor %} - -
    #TimeCallHit
    {{ loop.index }}{{ '%0.2f'|format((call.end - call.start) * 1000) }} ms{{ call.name }}(){{ profiler_dump(call.value.result, maxDepth=2) }}
    - {% endif %} -
    -
    - {% endfor %} -
    - {% endif %} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/config.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/config.html.twig deleted file mode 100644 index 6dfd27bcb..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/config.html.twig +++ /dev/null @@ -1,226 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if 'unknown' == collector.symfonyState %} - {% set block_status = '' %} - {% set symfony_version_status = 'Unable to retrieve information about the Symfony version.' %} - {% elseif 'eol' == collector.symfonyState %} - {% set block_status = 'red' %} - {% set symfony_version_status = 'This Symfony version will no longer receive security fixes.' %} - {% elseif 'eom' == collector.symfonyState %} - {% set block_status = 'yellow' %} - {% set symfony_version_status = 'This Symfony version will only receive security fixes.' %} - {% elseif 'dev' == collector.symfonyState %} - {% set block_status = 'yellow' %} - {% set symfony_version_status = 'This Symfony version is still in the development phase.' %} - {% else %} - {% set block_status = '' %} - {% set symfony_version_status = '' %} - {% endif %} - - {% set icon %} - - {{ include('@WebProfiler/Icon/symfony.svg') }} - - {{ collector.symfonyState is defined ? collector.symfonyversion : 'n/a' }} - {% endset %} - - {% set text %} -
    -
    - Profiler token - - {% if profiler_url %} - {{ collector.token }} - {% else %} - {{ collector.token }} - {% endif %} - -
    - - {% if 'n/a' is not same as(collector.env) %} -
    - Environment - {{ collector.env }} -
    - {% endif %} - - {% if 'n/a' is not same as(collector.debug) %} -
    - Debug - {{ collector.debug ? 'enabled' : 'disabled' }} -
    - {% endif %} -
    - -
    -
    - PHP version - - {{ collector.phpversion }} -   View phpinfo() - -
    - -
    - PHP Extensions - xdebug {{ collector.hasxdebug ? '✓' : '✗' }} - APCu {{ collector.hasapcu ? '✓' : '✗' }} - OPcache {{ collector.haszendopcache ? '✓' : '✗' }} -
    - -
    - PHP SAPI - {{ collector.sapiName }} -
    -
    - -
    - {% if collector.symfonyversion is defined %} - - - {% endif %} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true, name: 'config', status: block_status, additional_classes: 'sf-toolbar-block-right', block_attrs: 'title="' ~ symfony_version_status ~ '"' }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/config.svg') }} - Configuration - -{% endblock %} - -{% block panel %} -

    Symfony Configuration

    - -
    -
    - {{ collector.symfonyversion }} - Symfony version -
    - - {% if 'n/a' is not same as(collector.env) %} -
    - {{ collector.env }} - Environment -
    - {% endif %} - - {% if 'n/a' is not same as(collector.debug) %} -
    - {{ collector.debug ? 'enabled' : 'disabled' }} - Debug -
    - {% endif %} -
    - - {% set symfony_status = { dev: 'Unstable Version', stable: 'Stable Version', eom: 'Maintenance Ended', eol: 'Version Expired' } %} - {% set symfony_status_class = { dev: 'warning', stable: 'success', eom: 'warning', eol: 'error' } %} - - - - - - - - - - - - - - - - - -
    Symfony StatusBugs {{ collector.symfonystate in ['eom', 'eol'] ? 'were' : 'are' }} fixed untilSecurity issues {{ collector.symfonystate == 'eol' ? 'were' : 'are' }} fixed until
    - {{ symfony_status[collector.symfonystate]|upper }} - {% if collector.symfonylts %} -   Long-Term Support - {% endif %} - {{ collector.symfonyeom }}{{ collector.symfonyeol }} - View roadmap -
    - -

    PHP Configuration

    - -
    -
    - {{ collector.phpversion }}{% if collector.phpversionextra %} {{ collector.phpversionextra }}{% endif %} - PHP version -
    - -
    - {{ collector.phparchitecture }} bits - Architecture -
    - -
    - {{ collector.phpintllocale }} - Intl locale -
    - -
    - {{ collector.phptimezone }} - Timezone -
    -
    - -
    -
    - {{ include('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }} - OPcache -
    - -
    - {{ include('@WebProfiler/Icon/' ~ (collector.hasapcu ? 'yes' : 'no-gray') ~ '.svg') }} - APCu -
    - -
    - {{ include('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no-gray') ~ '.svg') }} - Xdebug -
    -
    - -

    - View full PHP configuration -

    - - {% if collector.bundles %} -

    Enabled Bundles ({{ collector.bundles|length }})

    - - - - - - - - - {% for name in collector.bundles|keys|sort %} - - - - - {% endfor %} - -
    NameClass
    {{ name }}{{ profiler_dump(collector.bundles[name]) }}
    - {% endif %} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/events.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/events.html.twig deleted file mode 100644 index c0be48a37..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/events.html.twig +++ /dev/null @@ -1,119 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/event.svg') }} - Events - -{% endblock %} - -{% block panel %} -

    Event Dispatcher

    - - {% if collector.calledlisteners is empty %} -
    -

    No events have been recorded. Check that debugging is enabled in the kernel.

    -
    - {% else %} -
    -
    -

    Called Listeners {{ collector.calledlisteners|length }}

    - -
    - {{ helper.render_table(collector.calledlisteners) }} -
    -
    - -
    -

    Not Called Listeners {{ collector.notcalledlisteners|length }}

    -
    - {% if collector.notcalledlisteners is empty %} -
    -

    - There are no uncalled listeners. -

    -

    - All listeners were called for this request or an error occurred - when trying to collect uncalled listeners (in which case check the - logs to get more information). -

    -
    - {% else %} - {{ helper.render_table(collector.notcalledlisteners) }} - {% endif %} -
    -
    - -
    -

    Orphaned Events {{ collector.orphanedEvents|length }}

    -
    - {% if collector.orphanedEvents is empty %} -
    -

    - There are no orphaned events. -

    -

    - All dispatched events were handled or an error occurred - when trying to collect orphaned events (in which case check the - logs to get more information). -

    -
    - {% else %} - - - - - - - - {% for event in collector.orphanedEvents %} - - - - {% endfor %} - -
    Event
    {{ event }}
    - {% endif %} -
    -
    -
    - {% endif %} -{% endblock %} - -{% macro render_table(listeners) %} - - - - - - - - - {% set previous_event = (listeners|first).event %} - {% for listener in listeners %} - {% if loop.first or listener.event != previous_event %} - {% if not loop.first %} - - {% endif %} - - - - - - - {% set previous_event = listener.event %} - {% endif %} - - - - - - - {% if loop.last %} - - {% endif %} - {% endfor %} -
    PriorityListener
    {{ listener.event }}
    {{ listener.priority|default('-') }}{{ profiler_dump(listener.stub) }}
    -{% endmacro %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/exception.css.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/exception.css.twig deleted file mode 100644 index aad7625a2..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/exception.css.twig +++ /dev/null @@ -1,32 +0,0 @@ -.container { - max-width: none; - margin: 0; - padding: 0; -} -.container .container { - padding: 0; -} - -.exception-summary { - background: var(--base-0); - border: var(--border); - box-shadow: 0 0 1px rgba(128, 128, 128, .2); - margin: 1em 0; - padding: 10px; -} -.exception-summary.exception-without-message { - display: none; -} - -.exception-message { - color: var(--color-error); -} - -.exception-metadata, -.exception-illustration { - display: none; -} - -.exception-message-wrapper .container { - min-height: unset; -} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig deleted file mode 100644 index 1fe0f5d47..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig +++ /dev/null @@ -1,37 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block head %} - {% if collector.hasexception %} - - {% endif %} - {{ parent() }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/exception.svg') }} - Exception - {% if collector.hasexception %} - - 1 - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Exceptions

    - - {% if not collector.hasexception %} -
    -

    No exception was thrown and caught during the request.

    -
    - {% else %} -
    - {{ render(controller('web_profiler.controller.exception_panel::body', { token: token })) }} -
    - {% endif %} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/form.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/form.html.twig deleted file mode 100644 index d99ad4f77..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/form.html.twig +++ /dev/null @@ -1,731 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% from _self import form_tree_entry, form_tree_details %} - -{% block toolbar %} - {% if collector.data.nb_errors > 0 or collector.data.forms|length %} - {% set status_color = collector.data.nb_errors ? 'red' %} - {% set icon %} - {{ include('@WebProfiler/Icon/form.svg') }} - - {{ collector.data.nb_errors ?: collector.data.forms|length }} - - {% endset %} - - {% set text %} -
    - Number of forms - {{ collector.data.forms|length }} -
    -
    - Number of errors - {{ collector.data.nb_errors }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/form.svg') }} - Forms - {% if collector.data.nb_errors > 0 %} - - {{ collector.data.nb_errors }} - - {% endif %} - -{% endblock %} - -{% block head %} - {{ parent() }} - - -{% endblock %} - -{% block panel %} -

    Forms

    - - {% if collector.data.forms|length %} -
    -
      - {% for formName, formData in collector.data.forms %} - {{ form_tree_entry(formName, formData, true) }} - {% endfor %} -
    -
    - -
    - {% for formName, formData in collector.data.forms %} - {{ form_tree_details(formName, formData, collector.data.forms_by_hash, loop.first) }} - {% endfor %} -
    - {% else %} -
    -

    No forms were submitted for this request.

    -
    - {% endif %} - - -{% endblock %} - -{% macro form_tree_entry(name, data, is_root) %} - {% import _self as tree %} - {% set has_error = data.errors is defined and data.errors|length > 0 %} -
  • -
    - {% if has_error %} -
    {{ data.errors|length }}
    - {% endif %} - - {% if data.children is not empty %} - - {% else %} -
    - {% endif %} - - - {{ name|default('(no name)') }} - -
    - - {% if data.children is not empty %} -
      - {% for childName, childData in data.children %} - {{ tree.form_tree_entry(childName, childData, false) }} - {% endfor %} -
    - {% endif %} -
  • -{% endmacro %} - -{% macro form_tree_details(name, data, forms_by_hash, show) %} - {% import _self as tree %} -
    -

    {{ name|default('(no name)') }}

    - {% if data.type_class is defined %} -

    {{ profiler_dump(data.type_class) }}

    - {% endif %} - - {% if data.errors is defined and data.errors|length > 0 %} -
    -

    - - Errors - -

    - - - - - - - - - - - {% for error in data.errors %} - - - - - - {% endfor %} - -
    MessageOriginCause
    {{ error.message }} - {% if error.origin is empty %} - This form. - {% elseif forms_by_hash[error.origin] is not defined %} - Unknown. - {% else %} - {{ forms_by_hash[error.origin].name }} - {% endif %} - - {% if error.trace %} - Caused by: - {% for stacked in error.trace %} - {{ profiler_dump(stacked) }} - {% endfor %} - {% else %} - Unknown. - {% endif %} -
    -
    - {% endif %} - - {% if data.default_data is defined %} -

    - - Default Data - -

    - -
    - - - - - - - - - - - - - - - - - - - - - -
    PropertyValue
    Model Format - {% if data.default_data.model is defined %} - {{ profiler_dump(data.default_data.seek('model')) }} - {% else %} - same as normalized format - {% endif %} -
    Normalized Format{{ profiler_dump(data.default_data.seek('norm')) }}
    View Format - {% if data.default_data.view is defined %} - {{ profiler_dump(data.default_data.seek('view')) }} - {% else %} - same as normalized format - {% endif %} -
    -
    - {% endif %} - - {% if data.submitted_data is defined %} -

    - - Submitted Data - -

    - -
    - {% if data.submitted_data.norm is defined %} - - - - - - - - - - - - - - - - - - - - - -
    PropertyValue
    View Format - {% if data.submitted_data.view is defined %} - {{ profiler_dump(data.submitted_data.seek('view')) }} - {% else %} - same as normalized format - {% endif %} -
    Normalized Format{{ profiler_dump(data.submitted_data.seek('norm')) }}
    Model Format - {% if data.submitted_data.model is defined %} - {{ profiler_dump(data.submitted_data.seek('model')) }} - {% else %} - same as normalized format - {% endif %} -
    - {% else %} -
    -

    This form was not submitted.

    -
    - {% endif %} -
    - {% endif %} - - {% if data.passed_options is defined %} -

    - - Passed Options - -

    - -
    - {% if data.passed_options|length %} - - - - - - - - - - {% for option, value in data.passed_options %} - - - - - - {% endfor %} - -
    OptionPassed ValueResolved Value
    {{ option }}{{ profiler_dump(value) }} - {# values can be stubs #} - {% set option_value = value.value|default(value) %} - {% set resolved_option_value = data.resolved_options[option].value|default(data.resolved_options[option]) %} - {% if resolved_option_value == option_value %} - same as passed value - {% else %} - {{ profiler_dump(data.resolved_options.seek(option)) }} - {% endif %} -
    - {% else %} -
    -

    No options were passed when constructing this form.

    -
    - {% endif %} -
    - {% endif %} - - {% if data.resolved_options is defined %} -

    - - Resolved Options - -

    - - - {% endif %} - - {% if data.view_vars is defined %} -

    - - View Variables - -

    - - - {% endif %} -
    - - {% for childName, childData in data.children %} - {{ tree.form_tree_details(childName, childData, forms_by_hash) }} - {% endfor %} -{% endmacro %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/http_client.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/http_client.html.twig deleted file mode 100644 index 8496ef186..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/http_client.html.twig +++ /dev/null @@ -1,131 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if collector.requestCount %} - {% set icon %} - {{ include('@WebProfiler/Icon/http-client.svg') }} - {% set status_color = '' %} - {{ collector.requestCount }} - {% endset %} - - {% set text %} -
    - Total requests - {{ collector.requestCount }} -
    -
    - HTTP errors - {{ collector.errorCount }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/http-client.svg') }} - HTTP Client - {% if collector.requestCount %} - - {{ collector.requestCount }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    HTTP Client

    - {% if collector.requestCount == 0 %} -
    -

    No HTTP requests were made.

    -
    - {% else %} -
    -
    - {{ collector.requestCount }} - Total requests -
    -
    - {{ collector.errorCount }} - HTTP errors -
    -
    -

    Clients

    -
    - {% for name, client in collector.clients %} -
    -

    {{ name }} {{ client.traces|length }}

    -
    - {% if client.traces|length == 0 %} -
    -

    No requests were made with the "{{ name }}" service.

    -
    - {% else %} -

    Requests

    - {% for trace in client.traces %} - {% set profiler_token = '' %} - {% set profiler_link = '' %} - {% if trace.info.response_headers is defined %} - {% for header in trace.info.response_headers %} - {% if header matches '/^x-debug-token: .*$/i' %} - {% set profiler_token = (header.getValue | slice('x-debug-token: ' | length)) %} - {% endif %} - {% if header matches '/^x-debug-token-link: .*$/i' %} - {% set profiler_link = (header.getValue | slice('x-debug-token-link: ' | length)) %} - {% endif %} - {% endfor %} - {% endif %} - - - - - - {% if profiler_token and profiler_link %} - - {% endif %} - - - - - - - {% if profiler_token and profiler_link %} - - {% endif %} - - -
    - {{ trace.method }} - - {{ trace.url }} - {% if trace.options is not empty %} - {{ profiler_dump(trace.options, maxDepth=1) }} - {% endif %} - - Profile -
    - {% if trace.http_code >= 500 %} - {% set responseStatus = 'error' %} - {% elseif trace.http_code >= 400 %} - {% set responseStatus = 'warning' %} - {% else %} - {% set responseStatus = 'success' %} - {% endif %} - - {{ trace.http_code }} - - - {{ profiler_dump(trace.info, maxDepth=1) }} - - {{ profiler_token }} -
    - {% endfor %} - {% endif %} -
    -
    - {% endfor %} - {% endif %} -
    -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig deleted file mode 100644 index b1642d4e1..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig +++ /dev/null @@ -1,270 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% if collector.counterrors or collector.countdeprecations or collector.countwarnings %} - {% set icon %} - {% set status_color = collector.counterrors ? 'red' : collector.countwarnings ? 'yellow' : 'none' %} - {{ include('@WebProfiler/Icon/logger.svg') }} - {{ collector.counterrors ?: (collector.countdeprecations + collector.countwarnings) }} - {% endset %} - - {% set text %} -
    - Errors - {{ collector.counterrors|default(0) }} -
    - -
    - Warnings - {{ collector.countwarnings|default(0) }} -
    - -
    - Deprecations - {{ collector.countdeprecations|default(0) }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/logger.svg') }} - Logs - {% if collector.counterrors or collector.countdeprecations or collector.countwarnings %} - - {{ collector.counterrors ?: (collector.countdeprecations + collector.countwarnings) }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Log Messages

    - - {% if collector.processedLogs is empty %} -
    -

    No log messages available.

    -
    - {% else %} - {% set has_error_logs = collector.processedLogs|column('type')|filter(type => 'error' == type)|length > 0 %} - {% set has_deprecation_logs = collector.processedLogs|column('type')|filter(type => 'deprecation' == type)|length > 0 %} - - {% set filters = collector.filters %} -
    -
    -
      -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • -
    -
    - -
    - - {{ include('@WebProfiler/Icon/filter.svg') }} - Level ({{ filters.priority|length - 1 }}) - - -
    -
    - - -
    - - {% for label, value in filters.priority %} -
    - - -
    - {% endfor %} -
    -
    - -
    - - {{ include('@WebProfiler/Icon/filter.svg') }} - Channel ({{ filters.channel|length - 1 }}) - - -
    -
    - - -
    - - {% for value in filters.channel %} -
    - - -
    - {% endfor %} -
    -
    -
    - - - - - - - - - - - - - - {% for log in collector.processedLogs %} - {% set css_class = 'error' == log.type ? 'error' - : (log.priorityName == 'WARNING' or 'deprecation' == log.type) ? 'warning' - : 'silenced' == log.type ? 'silenced' - %} - - - - - - {% endfor %} - -
    TimeMessage
    - - - {% if log.type in ['error', 'deprecation', 'silenced'] or 'WARNING' == log.priorityName %} - - {% if 'error' == log.type or 'WARNING' == log.priorityName %} - {{ log.priorityName|lower }} - {% else %} - {{ log.type|lower }} - {% endif %} - - {% else %} - - {{ log.priorityName|lower }} - - {% endif %} - - {{ helper.render_log_message('debug', loop.index, log) }} -
    - -
    -

    There are no log messages.

    -
    - - - {% endif %} - - {% set compilerLogTotal = 0 %} - {% for logs in collector.compilerLogs %} - {% set compilerLogTotal = compilerLogTotal + logs|length %} - {% endfor %} - -
    - -

    Container Compilation Logs ({{ compilerLogTotal }})

    -

    Log messages generated during the compilation of the service container.

    -
    - - {% if collector.compilerLogs is empty %} -
    -

    There are no compiler log messages.

    -
    - {% else %} - - - - - - - - - - {% for class, logs in collector.compilerLogs %} - - - - - {% endfor %} - -
    MessagesClass
    {{ logs|length }} - {% set context_id = 'context-compiler-' ~ loop.index %} - - - -
    -
      - {% for log in logs %} -
    • {{ profiler_dump_log(log.message) }}
    • - {% endfor %} -
    -
    -
    - {% endif %} -
    -{% endblock %} - -{% macro render_log_message(category, log_index, log) %} - {% set has_context = log.context is defined and log.context is not empty %} - {% set has_trace = log.context.exception.trace is defined %} - - {% if not has_context %} - {{ profiler_dump_log(log.message) }} - {% else %} - {{ profiler_dump_log(log.message, log.context) }} - {% endif %} - - -{% endmacro %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/mailer.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/mailer.html.twig deleted file mode 100644 index dab2e9c6c..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/mailer.html.twig +++ /dev/null @@ -1,217 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set events = collector.events %} - - {% if events.messages|length %} - {% set icon %} - {% include('@WebProfiler/Icon/mailer.svg') %} - {{ events.messages|length }} - {% endset %} - - {% set text %} -
    - Queued messages - {{ events.events|filter(e => e.isQueued())|length }} -
    -
    - Sent messages - {{ events.events|filter(e => not e.isQueued())|length }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': profiler_url }) }} - {% endif %} -{% endblock %} - -{% block head %} - {{ parent() }} - -{% endblock %} - -{% block menu %} - {% set events = collector.events %} - - - {{ include('@WebProfiler/Icon/mailer.svg') }} - - E-mails - {% if events.messages|length > 0 %} - - {{ events.messages|length }} - - {% endif %} - -{% endblock %} - -{% block panel %} - {% set events = collector.events %} - -

    Emails

    - - {% if not events.messages|length %} -
    -

    No emails were sent.

    -
    - {% endif %} - -
    -
    - {{ events.events|filter(e => e.isQueued())|length }} - Queued -
    - -
    - {{ events.events|filter(e => not e.isQueued())|length }} - Sent -
    -
    - - {% for transport in events.transports %} -
    -
    - {% for event in events.events(transport) %} - {% set message = event.message %} -
    -

    Email {{ event.isQueued() ? 'queued' : 'sent via ' ~ transport }}

    -
    -
    - {% if message.headers is not defined %} - {# RawMessage instance #} -
    -
    {{ message.toString() }}
    -
    - {% else %} - {# Message instance #} -
    -
    -
    -

    Headers

    -
    - Subject -

    {{ message.headers.get('subject').bodyAsString() ?? '(empty)' }}

    -
    -
    - From -
    {{ (message.headers.get('from').bodyAsString() ?? '(empty)')|replace({'From:': ''}) }}
    - - To -
    {{ (message.headers.get('to').bodyAsString() ?? '(empty)')|replace({'To:': ''}) }}
    -
    -
    - Headers -
    {% for header in message.headers.all|filter(header => (header.name ?? '') not in ['Subject', 'From', 'To']) %}
    -                                                                {{- header.toString }}
    -                                                            {%~ endfor %}
    -
    -
    -
    -
    - {% if message.htmlBody is defined %} - {# Email instance #} - {% set htmlBody = message.htmlBody() %} - {% if htmlBody is not null %} -
    -

    HTML Preview

    -
    -
    -                                                                
    -                                                            
    -
    -
    -
    -

    HTML Content

    -
    -
    -                                                                {%- if message.htmlCharset() %}
    -                                                                    {{- htmlBody|convert_encoding('UTF-8', message.htmlCharset()) }}
    -                                                                {%- else %}
    -                                                                    {{- htmlBody }}
    -                                                                {%- endif -%}
    -                                                            
    -
    -
    - {% endif %} - {% set textBody = message.textBody() %} - {% if textBody is not null %} -
    -

    Text Content

    -
    -
    -                                                                {%- if message.textCharset() %}
    -                                                                    {{- textBody|convert_encoding('UTF-8', message.textCharset()) }}
    -                                                                {%- else %}
    -                                                                    {{- textBody }}
    -                                                                {%- endif -%}
    -                                                            
    -
    -
    - {% endif %} - {% for attachment in message.attachments %} -
    -

    Attachment #{{ loop.index }}

    -
    -
    {{ attachment.toString() }}
    -
    -
    - {% endfor %} - {% endif %} -
    -

    Parts Hierarchy

    -
    -
    {{ message.body().asDebugString() }}
    -
    -
    -
    -

    Raw

    -
    -
    {{ message.toString() }}
    -
    -
    -
    -
    - {% endif %} -
    -
    -
    - {% endfor %} -
    -
    - {% endfor %} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/memory.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/memory.html.twig deleted file mode 100644 index 1336a57a2..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/memory.html.twig +++ /dev/null @@ -1,24 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set icon %} - {% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' %} - {{ include('@WebProfiler/Icon/memory.svg') }} - {{ '%.1f'|format(collector.memory / 1024 / 1024) }} - MiB - {% endset %} - - {% set text %} -
    - Peak memory usage - {{ '%.1f'|format(collector.memory / 1024 / 1024) }} MiB -
    - -
    - PHP memory limit - {{ collector.memoryLimit == -1 ? 'Unlimited' : '%.0f MiB'|format(collector.memoryLimit / 1024 / 1024) }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, name: 'time', status: status_color }) }} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/messenger.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/messenger.html.twig deleted file mode 100644 index b48aaa82e..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/messenger.html.twig +++ /dev/null @@ -1,201 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% if collector.messages|length > 0 %} - {% set status_color = collector.exceptionsCount ? 'red' %} - {% set icon %} - {{ include('@WebProfiler/Icon/messenger.svg') }} - {{ collector.messages|length }} - {% endset %} - - {% set text %} - {% for bus in collector.buses %} - {% set exceptionsCount = collector.exceptionsCount(bus) %} -
    - {{ bus }} - - {{ collector.messages(bus)|length }} - -
    - {% endfor %} - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: 'messenger', status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/messenger.svg') }} - Messages - {% if collector.exceptionsCount > 0 %} - - {{ collector.exceptionsCount }} - - {% endif %} - -{% endblock %} - -{% block head %} - {{ parent() }} - -{% endblock %} - -{% block panel %} - {% import _self as helper %} - -

    Messages

    - - {% if collector.messages is empty %} -
    -

    No messages have been collected.

    -
    - {% else %} -
    -
    - {% set messages = collector.messages %} - {% set exceptionsCount = collector.exceptionsCount %} -

    All{{ messages|length }}

    - -
    -

    Ordered list of dispatched messages across all your buses

    - {{ helper.render_bus_messages(messages, true) }} -
    -
    - - {% for bus in collector.buses %} -
    - {% set messages = collector.messages(bus) %} - {% set exceptionsCount = collector.exceptionsCount(bus) %} -

    {{ bus }}{{ messages|length }}

    - -
    -

    Ordered list of messages dispatched on the {{ bus }} bus

    - {{ helper.render_bus_messages(messages) }} -
    -
    - {% endfor %} -
    - {% endif %} - -{% endblock %} - -{% macro render_bus_messages(messages, showBus = false) %} - {% set discr = random() %} - {% for dispatchCall in messages %} - - - - - - - - - - - {% if showBus %} - - - - - {% endif %} - - - - - - - - - {% if dispatchCall.stamps_after_dispatch is defined %} - - - - - {% endif %} - {% if dispatchCall.exception is defined %} - - - - - {% endif %} - -
    - {{ profiler_dump(dispatchCall.message.type) }} - {% if showBus %} - {{ dispatchCall.bus }} - {% endif %} - {% if dispatchCall.exception is defined %} - exception - {% endif %} - - {{ include('@WebProfiler/images/icon-minus-square.svg') }} - {{ include('@WebProfiler/images/icon-plus-square.svg') }} - -
    - - - -
    Bus{{ dispatchCall.bus }}
    Message{{ profiler_dump(dispatchCall.message.value, maxDepth=2) }}
    Envelope stamps when dispatching - {% for item in dispatchCall.stamps %} - {{ profiler_dump(item) }} - {% else %} - No items - {% endfor %} -
    Envelope stamps after dispatch - {% for item in dispatchCall.stamps_after_dispatch %} - {{ profiler_dump(item) }} - {% else %} - No items - {% endfor %} -
    Exception - {{ profiler_dump(dispatchCall.exception.value, maxDepth=1) }} -
    - {% endfor %} -{% endmacro %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/notifier.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/notifier.html.twig deleted file mode 100644 index dd17fab98..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/notifier.html.twig +++ /dev/null @@ -1,168 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set events = collector.events %} - - {% if events.messages|length %} - {% set icon %} - {% include('@WebProfiler/Icon/notifier.svg') %} - {{ events.messages|length }} - {% endset %} - - {% set text %} -
    - Sent notifications - {{ events.messages|length }} -
    - - {% for transport in events.transports %} -
    - {{ transport }} - {{ events.messages(transport)|length }} -
    - {% endfor %} - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': profiler_url }) }} - {% endif %} -{% endblock %} - -{% block head %} - {{ parent() }} - -{% endblock %} - -{% block menu %} - {% set events = collector.events %} - - - {{ include('@WebProfiler/Icon/notifier.svg') }} - - Notifications - {% if events.messages|length > 0 %} - - {{ events.messages|length }} - - {% endif %} - -{% endblock %} - -{% block panel %} - {% set events = collector.events %} - -

    Notifications

    - - {% if not events.messages|length %} -
    -

    No notifications were sent.

    -
    - {% endif %} - -
    - {% for transport in events.transports %} -
    - {{ events.messages(transport)|length }} - {{ transport }} -
    - {% endfor %} -
    - - {% for transport in events.transports %} -

    {{ transport }}

    - -
    -
    - {% for event in events.events(transport) %} - {% set message = event.message %} -
    -

    Message #{{ loop.index }} ({{ event.isQueued() ? 'queued' : 'sent' }})

    -
    -
    -
    - Subject -

    {{ message.getSubject() ?? '(empty)' }}

    -
    - {% if message.getNotification is defined %} -
    -
    -
    - Content -
    {{ message.getNotification().getContent() ?? '(empty)' }}
    - Importance -
    {{ message.getNotification().getImportance() }}
    -
    -
    -
    - {% endif %} -
    -
    - {% if message.getNotification is defined %} -
    -

    Notification

    - {% set notification = event.message.getNotification() %} -
    -
    -                                                            {{- 'Subject: ' ~ notification.getSubject() }}
    - {{- 'Content: ' ~ notification.getContent() }}
    - {{- 'Importance: ' ~ notification.getImportance() }}
    - {{- 'Emoji: ' ~ (notification.getEmoji() is empty ? '(empty)' : notification.getEmoji()) }}
    - {{- 'Exception: ' ~ notification.getException() ?? '(empty)' }}
    - {{- 'ExceptionAsString: ' ~ (notification.getExceptionAsString() is empty ? '(empty)' : notification.getExceptionAsString()) }} -
    -
    -
    - {% endif %} -
    -

    Message Options

    -
    -
    -                                                            {%- if message.getOptions() is null %}
    -                                                                {{- '(empty)' }}
    -                                                            {%- else %}
    -                                                                {{- message.getOptions()|json_encode(constant('JSON_PRETTY_PRINT')) }}
    -                                                            {%- endif %}
    -                                                        
    -
    -
    -
    -
    -
    -
    -
    - {% endfor %} -
    -
    - {% endfor %} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/request.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/request.html.twig deleted file mode 100644 index 18311c169..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/request.html.twig +++ /dev/null @@ -1,392 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% import _self as helper %} - {% set request_handler %} - {{ helper.set_handler(collector.controller) }} - {% endset %} - - {% if collector.redirect %} - {% set redirect_handler %} - {{ helper.set_handler(collector.redirect.controller, collector.redirect.route, 'GET' != collector.redirect.method ? collector.redirect.method) }} - {% endset %} - {% endif %} - - {% if collector.forwardtoken %} - {% set forward_profile = profile.childByToken(collector.forwardtoken) %} - {% set forward_handler %} - {{ helper.set_handler(forward_profile ? forward_profile.collector('request').controller : 'n/a') }} - {% endset %} - {% endif %} - - {% set request_status_code_color = (collector.statuscode >= 400) ? 'red' : (collector.statuscode >= 300) ? 'yellow' : 'green' %} - - {% set icon %} - {{ collector.statuscode }} - {% if collector.route %} - {% if collector.redirect %}{{ include('@WebProfiler/Icon/redirect.svg') }}{% endif %} - {% if collector.forwardtoken %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %} - {{ 'GET' != collector.method ? collector.method }} @ - {{ collector.route }} - {% endif %} - {% endset %} - - {% set text %} -
    -
    - HTTP status - {{ collector.statuscode }} {{ collector.statustext }} -
    - - {% if 'GET' != collector.method -%} -
    - Method - {{ collector.method }} -
    - {%- endif %} - -
    - Controller - {{ request_handler }} -
    - -
    - Route name - {{ collector.route|default('n/a') }} -
    - -
    - Has session - {% if collector.sessionmetadata|length %}yes{% else %}no{% endif %} -
    - -
    - Stateless Check - {% if collector.statelesscheck %}yes{% else %}no{% endif %} -
    -
    - - {% if redirect_handler is defined -%} -
    -
    - - {{ collector.redirect.status_code }} - Redirect from - - - {{ redirect_handler }} - ({{ collector.redirect.token }}) - -
    -
    - {% endif %} - - {% if forward_handler is defined %} -
    -
    - Forwarded to - - {{ forward_handler }} - ({{ collector.forwardtoken }}) - -
    -
    - {% endif %} - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/request.svg') }} - Request / Response - -{% endblock %} - -{% block panel %} - {% import _self as helper %} - -

    - {{ helper.set_handler(collector.controller) }} -

    - -
    -
    -

    Request

    - -
    -

    GET Parameters

    - - {% if collector.requestquery.all is empty %} -
    -

    No GET parameters

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestquery, maxDepth: 1 }, with_context = false) }} - {% endif %} - -

    POST Parameters

    - - {% if collector.requestrequest.all is empty %} -
    -

    No POST parameters

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestrequest, maxDepth: 1 }, with_context = false) }} - {% endif %} - -

    Uploaded Files

    - - {% if collector.requestfiles is empty %} -
    -

    No files were uploaded

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestfiles, maxDepth: 1 }, with_context = false) }} - {% endif %} - -

    Request Attributes

    - - {% if collector.requestattributes.all is empty %} -
    -

    No attributes

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestattributes }, with_context = false) }} - {% endif %} - -

    Request Headers

    - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }} - -

    Request Content

    - - {% if collector.content == false %} -
    -

    Request content not available (it was retrieved as a resource).

    -
    - {% elseif collector.content %} -
    - {% set prettyJson = collector.isJsonRequest ? collector.prettyJson : null %} - {% if prettyJson is not null %} -
    -

    Pretty

    -
    -
    -
    {{ prettyJson }}
    -
    -
    -
    - {% endif %} - -
    -

    Raw

    -
    -
    -
    {{ collector.content }}
    -
    -
    -
    -
    - {% else %} -
    -

    No content

    -
    - {% endif %} -
    -
    - -
    -

    Response

    - -
    -

    Response Headers

    - - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responseheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }} -
    -
    - -
    -

    Cookies

    - -
    -

    Request Cookies

    - - {% if collector.requestcookies.all is empty %} -
    -

    No request cookies

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestcookies }, with_context = false) }} - {% endif %} - -

    Response Cookies

    - - {% if collector.responsecookies.all is empty %} -
    -

    No response cookies

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responsecookies }, with_context = true) }} - {% endif %} -
    -
    - - - -
    -

    Flashes

    - -
    -

    Flashes

    - - {% if collector.flashes is empty %} -
    -

    No flash messages were created.

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.flashes }, with_context = false) }} - {% endif %} -
    -
    - -
    -

    Server Parameters

    -
    -

    Server Parameters

    -

    Defined in .env

    - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.dotenvvars }, with_context = false) }} - -

    Defined as regular env variables

    - {% set requestserver = [] %} - {% for key, value in collector.requestserver|filter((_, key) => key not in collector.dotenvvars.keys) %} - {% set requestserver = requestserver|merge({(key): value}) %} - {% endfor %} - {{ include('@WebProfiler/Profiler/table.html.twig', { data: requestserver }, with_context = false) }} -
    -
    - - {% if profile.parent %} -
    -

    Parent Request

    - -
    -

    - Return to parent request - (token = {{ profile.parent.token }}) -

    - - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: profile.parent.getcollector('request').requestattributes }, with_context = false) }} -
    -
    - {% endif %} - - {% if profile.children|length %} -
    -

    Sub Requests {{ profile.children|length }}

    - -
    - {% for child in profile.children %} -

    - {{ helper.set_handler(child.getcollector('request').controller) }} - (token = {{ child.token }}) -

    - - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: child.getcollector('request').requestattributes }, with_context = false) }} - {% endfor %} -
    -
    - {% endif %} -
    -{% endblock %} - -{% macro set_handler(controller, route, method) %} - {% if controller.class is defined -%} - {%- if method|default(false) %}{{ method }}{% endif -%} - {%- set link = controller.file|file_link(controller.line) %} - {%- if link %}{% else %}{% endif %} - - {%- if route|default(false) -%} - @{{ route }} - {%- else -%} - {{- controller.class|abbr_class|striptags -}} - {{- controller.method ? ' :: ' ~ controller.method -}} - {%- endif -%} - - {%- if link %}{% else %}
    {% endif %} - {%- else -%} - {{ route|default(controller) }} - {%- endif %} -{% endmacro %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/router.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/router.html.twig deleted file mode 100644 index a1449c2b2..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/router.html.twig +++ /dev/null @@ -1,14 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %}{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/router.svg') }} - Routing - -{% endblock %} - -{% block panel %} - {{ render(controller('web_profiler.controller.router::panelAction', { token: token })) }} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.css.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.css.twig deleted file mode 100644 index b64b6ff86..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.css.twig +++ /dev/null @@ -1,64 +0,0 @@ -/* Legend */ - -.sf-profiler-timeline .legends .timeline-category { - border: none; - background: none; - border-left: 1em solid transparent; - line-height: 1em; - margin: 0 1em 0 0; - padding: 0 0.5em; - display: none; - opacity: 0.5; -} - -.sf-profiler-timeline .legends .timeline-category.active { - opacity: 1; -} - -.sf-profiler-timeline .legends .timeline-category.present { - display: inline-block; -} - -.timeline-graph { - margin: 1em 0; - width: 100%; - background-color: var(--table-background); - border: 1px solid var(--table-border); -} - -/* Typography */ - -.timeline-graph .timeline-label { - font-family: var(--font-sans-serif); - font-size: 12px; - line-height: 12px; - font-weight: normal; - fill: var(--color-text); -} - -.timeline-graph .timeline-label .timeline-sublabel { - margin-left: 1em; - fill: var(--color-muted); -} - -.timeline-graph .timeline-subrequest, -.timeline-graph .timeline-border { - fill: none; - stroke: var(--table-border); - stroke-width: 1px; -} - -.timeline-graph .timeline-subrequest { - fill: url(#subrequest); - fill-opacity: 0.5; -} - -.timeline-subrequest-pattern { - fill: var(--table-border); -} - -/* Timeline periods */ - -.timeline-graph .timeline-period { - stroke-width: 0; -} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.html.twig deleted file mode 100644 index 0ed3ddc09..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.html.twig +++ /dev/null @@ -1,214 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% set has_time_events = collector.events|length > 0 %} - {% set total_time = has_time_events ? '%.0f'|format(collector.duration) : 'n/a' %} - {% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %} - {% set status_color = has_time_events and collector.duration > 1000 ? 'yellow' %} - - {% set icon %} - {{ include('@WebProfiler/Icon/time.svg') }} - {{ total_time }} - ms - {% endset %} - - {% set text %} -
    - Total time - {{ total_time }} ms -
    -
    - Initialization time - {{ initialization_time }} ms -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/time.svg') }} - Performance - -{% endblock %} - -{% block panel %} - {% set has_time_events = collector.events|length > 0 %} -

    Performance metrics

    - -
    -
    - {{ '%.0f'|format(collector.duration) }} ms - Total execution time -
    - -
    - {{ '%.0f'|format(collector.inittime) }} ms - Symfony initialization -
    - - {% if profile.collectors.memory %} -
    - {{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} MiB - Peak memory usage -
    - {% endif %} - - {% if profile.children|length > 0 %} -
    - -
    - {{ profile.children|length }} - Sub-Request{{ profile.children|length > 1 ? 's' }} -
    - - {% if has_time_events %} - {% set subrequests_time = 0 %} - {% for child in profile.children %} - {% set subrequests_time = subrequests_time + child.getcollector('time').events.__section__.duration %} - {% endfor %} - {% else %} - {% set subrequests_time = 'n/a' %} - {% endif %} - -
    - {{ subrequests_time }} ms - Sub-Request{{ profile.children|length > 1 ? 's' }} time -
    - {% endif %} -
    - -

    Execution timeline

    - - {% if not collector.isStopwatchInstalled() %} -
    -

    The Stopwatch component is not installed. If you want to see timing events, run: composer require symfony/stopwatch.

    -
    - {% elseif collector.events is empty %} -
    -

    No timing events have been recorded. Check that symfony/stopwatch is installed and debugging enabled in the kernel.

    -
    - {% else %} - {{ block('panelContent') }} - {% endif %} -{% endblock %} - -{% block panelContent %} -
    - - - ms - (timeline only displays events with a duration longer than this threshold) -
    - - {% if profile.parent %} -

    - Sub-Request {{ profiler_dump(profile.getcollector('request').requestattributes.get('_controller')) }} - - {{ collector.events.__section__.duration }} ms - Return to parent request - -

    - {% elseif profile.children|length > 0 %} -

    - Main Request {{ collector.events.__section__.duration }} ms -

    - {% endif %} - - {{ helper.display_timeline(token, collector.events, collector.events.__section__.origin) }} - - {% if profile.children|length %} -

    Note: sections with a striped background correspond to sub-requests.

    - -

    Sub-requests ({{ profile.children|length }})

    - - {% for child in profile.children %} - {% set events = child.getcollector('time').events %} -

    - {{ child.getcollector('request').identifier }} - {{ events.__section__.duration }} ms -

    - - {{ helper.display_timeline(child.token, events, collector.events.__section__.origin) }} - {% endfor %} - {% endif %} - - - - - - - - - - -{% endblock %} - -{% macro dump_request_data(token, events, origin) %} -{% autoescape 'js' %} -{% from _self import dump_events %} -{ - id: "{{ token }}", - left: {{ "%F"|format(events.__section__.origin - origin) }}, - end: "{{ '%F'|format(events.__section__.endtime) }}", - events: [ {{ dump_events(events) }} ], -} -{% endautoescape %} -{% endmacro %} - -{% macro dump_events(events) %} -{% autoescape 'js' %} -{% for name, event in events %} -{% if '__section__' != name %} -{ - name: "{{ name }}", - category: "{{ event.category }}", - origin: {{ "%F"|format(event.origin) }}, - starttime: {{ "%F"|format(event.starttime) }}, - endtime: {{ "%F"|format(event.endtime) }}, - duration: {{ "%F"|format(event.duration) }}, - memory: {{ "%.1F"|format(event.memory / 1024 / 1024) }}, - elements: {}, - periods: [ - {%- for period in event.periods -%} - { - start: {{ "%F"|format(period.starttime) }}, - end: {{ "%F"|format(period.endtime) }}, - duration: {{ "%F"|format(period.duration) }}, - elements: {} - }, - {%- endfor -%} - ], -}, -{% endif %} -{% endfor %} -{% endautoescape %} -{% endmacro %} - -{% macro display_timeline(token, events, origin) %} -{% import _self as helper %} -
    -
    - - -
    -{% endmacro %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.js b/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.js deleted file mode 100644 index 156c9343f..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/time.js +++ /dev/null @@ -1,457 +0,0 @@ -'use strict'; - -class TimelineEngine { - /** - * @param {Theme} theme - * @param {Renderer} renderer - * @param {Legend} legend - * @param {Element} threshold - * @param {Object} request - * @param {Number} eventHeight - * @param {Number} horizontalMargin - */ - constructor(theme, renderer, legend, threshold, request, eventHeight = 36, horizontalMargin = 10) { - this.theme = theme; - this.renderer = renderer; - this.legend = legend; - this.threshold = threshold; - this.request = request; - this.scale = renderer.width / request.end; - this.eventHeight = eventHeight; - this.horizontalMargin = horizontalMargin; - this.labelY = Math.round(this.eventHeight * 0.48); - this.periodY = Math.round(this.eventHeight * 0.66); - this.FqcnMatcher = /\\([^\\]+)$/i; - this.origin = null; - - this.createEventElements = this.createEventElements.bind(this); - this.createBackground = this.createBackground.bind(this); - this.createPeriod = this.createPeriod.bind(this); - this.render = this.render.bind(this); - this.renderEvent = this.renderEvent.bind(this); - this.renderPeriod = this.renderPeriod.bind(this); - this.onResize = this.onResize.bind(this); - this.isActive = this.isActive.bind(this); - - this.threshold.addEventListener('change', this.render); - this.legend.addEventListener('change', this.render); - - window.addEventListener('resize', this.onResize); - - this.createElements(); - this.render(); - } - - onResize() { - this.renderer.measure(); - this.setScale(this.renderer.width / this.request.end); - } - - setScale(scale) { - if (scale !== this.scale) { - this.scale = scale; - this.render(); - } - } - - createElements() { - this.origin = this.renderer.setFullVerticalLine(this.createBorder(), 0); - this.renderer.add(this.origin); - - this.request.events - .filter(event => event.category === 'section') - .map(this.createBackground) - .forEach(this.renderer.add); - - this.request.events - .map(this.createEventElements) - .forEach(this.renderer.add); - } - - createBackground(event) { - const subrequest = event.name === '__section__.child'; - const background = this.renderer.create('rect', subrequest ? 'timeline-subrequest' : 'timeline-border'); - - event.elements = Object.assign(event.elements || {}, { background }); - - return background; - } - - createEventElements(event) { - const { name, category, duration, memory, periods } = event; - const border = this.renderer.setFullHorizontalLine(this.createBorder(), 0); - const lines = periods.map(period => this.createPeriod(period, category)); - const label = this.createLabel(this.getShortName(name), duration, memory, periods[0]); - const title = this.renderer.createTitle(name); - const group = this.renderer.group([title, border, label].concat(lines), this.theme.getCategoryColor(event.category)); - - event.elements = Object.assign(event.elements || {}, { group, label, border }); - - this.legend.add(event.category) - - return group; - } - - createLabel(name, duration, memory, period) { - const label = this.renderer.createText(name, period.start * this.scale, this.labelY, 'timeline-label'); - const sublabel = this.renderer.createTspan(` ${duration} ms / ${memory} MiB`, 'timeline-sublabel'); - - label.appendChild(sublabel); - - return label; - } - - createPeriod(period, category) { - const timeline = this.renderer.createPath(null, 'timeline-period', this.theme.getCategoryColor(category)); - - period.draw = category === 'section' ? this.renderer.setSectionLine : this.renderer.setPeriodLine; - period.elements = Object.assign(period.elements || {}, { timeline }); - - return timeline; - } - - createBorder() { - return this.renderer.createPath(null, 'timeline-border'); - } - - isActive(event) { - const { duration, category } = event; - - return duration >= this.threshold.value && this.legend.isActive(category); - } - - render() { - const events = this.request.events.filter(this.isActive); - const width = this.renderer.width + this.horizontalMargin * 2; - const height = this.eventHeight * events.length; - - // Set view box - this.renderer.setViewBox(-this.horizontalMargin, 0, width, height); - - // Show 0ms origin - this.renderer.setFullVerticalLine(this.origin, 0); - - // Render all events - this.request.events.forEach(event => this.renderEvent(event, events.indexOf(event))); - } - - renderEvent(event, index) { - const { name, category, duration, memory, periods, elements } = event; - const { group, label, border, background } = elements; - const visible = index >= 0; - - group.setAttribute('visibility', visible ? 'visible' : 'hidden'); - - if (background) { - background.setAttribute('visibility', visible ? 'visible' : 'hidden'); - - if (visible) { - const [min, max] = this.getEventLimits(event); - - this.renderer.setFullRectangle(background, min * this.scale, max * this.scale); - } - } - - if (visible) { - // Position the group - group.setAttribute('transform', `translate(0, ${index * this.eventHeight})`); - - // Update top border - this.renderer.setFullHorizontalLine(border, 0); - - // render label and ensure it doesn't escape the viewport - this.renderLabel(label, event); - - // Update periods - periods.forEach(this.renderPeriod); - } - } - - renderLabel(label, event) { - const width = this.getLabelWidth(label); - const [min, max] = this.getEventLimits(event); - const alignLeft = (min * this.scale) + width <= this.renderer.width; - - label.setAttribute('x', (alignLeft ? min : max) * this.scale); - label.setAttribute('text-anchor', alignLeft ? 'start' : 'end'); - } - - renderPeriod(period) { - const { elements, start, duration } = period; - - period.draw(elements.timeline, start * this.scale, this.periodY, Math.max(duration * this.scale, 1)); - } - - getLabelWidth(label) { - if (typeof label.width === 'undefined') { - label.width = label.getBBox().width; - } - - return label.width; - } - - getEventLimits(event) { - if (typeof event.limits === 'undefined') { - const { periods } = event; - - event.limits = [ - periods[0].start, - periods[periods.length - 1].end - ]; - } - - return event.limits; - } - - getShortName(name) { - const matches = this.FqcnMatcher.exec(name); - - if (matches) { - return matches[1]; - } - - return name; - } -} - -class Legend { - constructor(element, theme) { - this.element = element; - this.theme = theme; - - this.toggle = this.toggle.bind(this); - this.createCategory = this.createCategory.bind(this); - - this.categories = []; - this.theme.getDefaultCategories().forEach(this.createCategory); - } - - add(category) { - this.get(category).classList.add('present'); - } - - createCategory(category) { - const element = document.createElement('button'); - element.className = `timeline-category active`; - element.style.borderColor = this.theme.getCategoryColor(category); - element.innerText = category; - element.value = category; - element.type = 'button'; - element.addEventListener('click', this.toggle); - - this.element.appendChild(element); - - this.categories.push(element); - - return element; - } - - toggle(event) { - event.target.classList.toggle('active'); - - this.emit('change'); - } - - isActive(category) { - return this.get(category).classList.contains('active'); - } - - get(category) { - return this.categories.find(element => element.value === category) || this.createCategory(category); - } - - emit(name) { - this.element.dispatchEvent(new Event(name)); - } - - addEventListener(name, callback) { - this.element.addEventListener(name, callback); - } - - removeEventListener(name, callback) { - this.element.removeEventListener(name, callback); - } -} - -class SvgRenderer { - /** - * @param {SVGElement} element - */ - constructor(element) { - this.ns = 'http://www.w3.org/2000/svg'; - this.width = null; - this.viewBox = {}; - this.element = element; - - this.add = this.add.bind(this); - - this.setViewBox(0, 0, 0, 0); - this.measure(); - } - - setViewBox(x, y, width, height) { - this.viewBox = { x, y, width, height }; - this.element.setAttribute('viewBox', `${x} ${y} ${width} ${height}`); - } - - measure() { - this.width = this.element.getBoundingClientRect().width; - } - - add(element) { - this.element.appendChild(element); - } - - group(elements, className) { - const group = this.create('g', className); - - elements.forEach(element => group.appendChild(element)); - - return group; - } - - setHorizontalLine(element, x, y, width) { - element.setAttribute('d', `M${x},${y} h${width}`); - - return element; - } - - setVerticalLine(element, x, y, height) { - element.setAttribute('d', `M${x},${y} v${height}`); - - return element; - } - - setFullHorizontalLine(element, y) { - return this.setHorizontalLine(element, this.viewBox.x, y, this.viewBox.width); - } - - setFullVerticalLine(element, x) { - return this.setVerticalLine(element, x, this.viewBox.y, this.viewBox.height); - } - - setFullRectangle(element, min, max) { - element.setAttribute('x', min); - element.setAttribute('y', this.viewBox.y); - element.setAttribute('width', max - min); - element.setAttribute('height', this.viewBox.height); - } - - setSectionLine(element, x, y, width, height = 4, markerSize = 6) { - const totalHeight = height + markerSize; - const maxMarkerWidth = Math.min(markerSize, width / 2); - const widthWithoutMarker = Math.max(0, width - (maxMarkerWidth * 2)); - - element.setAttribute('d', `M${x},${y + totalHeight} v${-totalHeight} h${width} v${totalHeight} l${-maxMarkerWidth} ${-markerSize} h${-widthWithoutMarker} Z`); - } - - setPeriodLine(element, x, y, width, height = 4, markerWidth = 2, markerHeight = 4) { - const totalHeight = height + markerHeight; - const maxMarkerWidth = Math.min(markerWidth, width); - - element.setAttribute('d', `M${x + maxMarkerWidth},${y + totalHeight} h${-maxMarkerWidth} v${-totalHeight} h${width} v${height} h${maxMarkerWidth-width}Z`); - } - - createText(content, x, y, className) { - const element = this.create('text', className); - - element.setAttribute('x', x); - element.setAttribute('y', y); - element.textContent = content; - - return element; - } - - createTspan(content, className) { - const element = this.create('tspan', className); - - element.textContent = content; - - return element; - } - - createTitle(content) { - const element = this.create('title'); - - element.textContent = content; - - return element; - } - - createPath(path = null, className = null, color = null) { - const element = this.create('path', className); - - if (path) { - element.setAttribute('d', path); - } - - if (color) { - element.setAttribute('fill', color); - } - - return element; - } - - create(name, className = null) { - const element = document.createElementNS(this.ns, name); - - if (className) { - element.setAttribute('class', className); - } - - return element; - } -} - -class Theme { - constructor(element) { - this.reservedCategoryColors = { - 'default': '#777', - 'section': '#999', - 'event_listener': '#00b8f5', - 'template': '#66cc00', - 'doctrine': '#ff6633', - 'messenger_middleware': '#bdb81e', - 'controller.argument_value_resolver': '#8c5de6', - 'http_client': '#ffa333', - }; - - this.customCategoryColors = [ - '#dbab09', // dark yellow - '#ea4aaa', // pink - '#964b00', // brown - '#22863a', // dark green - '#0366d6', // dark blue - '#17a2b8', // teal - ]; - - this.getCategoryColor = this.getCategoryColor.bind(this); - this.getDefaultCategories = this.getDefaultCategories.bind(this); - } - - getDefaultCategories() { - return Object.keys(this.reservedCategoryColors); - } - - getCategoryColor(category) { - return this.reservedCategoryColors[category] || this.getRandomColor(category); - } - - getRandomColor(category) { - // instead of pure randomness, colors are assigned deterministically based on the - // category name, to ensure that each custom category always displays the same color - return this.customCategoryColors[this.hash(category) % this.customCategoryColors.length]; - } - - // copied from https://github.com/darkskyapp/string-hash - hash(string) { - var hash = 5381; - var i = string.length; - - while(i) { - hash = (hash * 33) ^ string.charCodeAt(--i); - } - - return hash >>> 0; - } -} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/translation.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/translation.html.twig deleted file mode 100644 index a8a5c2736..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/translation.html.twig +++ /dev/null @@ -1,210 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% if collector.messages|length %} - {% set icon %} - {{ include('@WebProfiler/Icon/translation.svg') }} - {% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' %} - {% set error_count = collector.countMissings + collector.countFallbacks %} - {{ error_count ?: collector.countDefines }} - {% endset %} - - {% set text %} -
    - Default locale - - {{ collector.locale|default('-') }} - -
    -
    - Missing messages - - {{ collector.countMissings }} - -
    - -
    - Fallback messages - - {{ collector.countFallbacks }} - -
    - -
    - Defined messages - {{ collector.countDefines }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/translation.svg') }} - Translation - {% if collector.countMissings or collector.countFallbacks %} - {% set error_count = collector.countMissings + collector.countFallbacks %} - - {{ error_count }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Translation

    - -
    -
    - {{ collector.locale|default('-') }} - Default locale -
    -
    - {{ collector.fallbackLocales|join(', ')|default('-') }} - Fallback locale{{ collector.fallbackLocales|length != 1 ? 's' }} -
    -
    - -

    Messages

    - - {% if collector.messages is empty %} -
    -

    No translations have been called.

    -
    - {% else %} - {% block messages %} - - {# sort translation messages in groups #} - {% set messages_defined, messages_missing, messages_fallback = [], [], [] %} - {% for message in collector.messages %} - {% if message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_DEFINED') %} - {% set messages_defined = messages_defined|merge([message]) %} - {% elseif message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING') %} - {% set messages_missing = messages_missing|merge([message]) %} - {% elseif message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK') %} - {% set messages_fallback = messages_fallback|merge([message]) %} - {% endif %} - {% endfor %} - -
    -
    -

    Defined {{ collector.countDefines }}

    - -
    -

    - These messages are correctly translated into the given locale. -

    - - {% if messages_defined is empty %} -
    -

    None of the used translation messages are defined for the given locale.

    -
    - {% else %} - {% block defined_messages %} - {{ helper.render_table(messages_defined) }} - {% endblock %} - {% endif %} -
    -
    - -
    -

    Fallback {{ collector.countFallbacks }}

    - -
    -

    - These messages are not available for the given locale - but Symfony found them in the fallback locale catalog. -

    - - {% if messages_fallback is empty %} -
    -

    No fallback translation messages were used.

    -
    - {% else %} - {% block fallback_messages %} - {{ helper.render_table(messages_fallback, true) }} - {% endblock %} - {% endif %} -
    -
    - -
    -

    Missing {{ collector.countMissings }}

    - -
    -

    - These messages are not available for the given locale and cannot - be found in the fallback locales. Add them to the translation - catalogue to avoid Symfony outputting untranslated contents. -

    - - {% if messages_missing is empty %} -
    -

    There are no messages of this category.

    -
    - {% else %} - {% block missing_messages %} - {{ helper.render_table(messages_missing) }} - {% endblock %} - {% endif %} -
    -
    -
    - - - - {% endblock messages %} - {% endif %} - -{% endblock %} - -{% macro render_table(messages, is_fallback) %} - - - - - {% if is_fallback %} - - {% endif %} - - - - - - - - {% for message in messages %} - - - {% if is_fallback %} - - {% endif %} - - - - - - {% endfor %} - -
    LocaleFallback localeDomainTimes usedMessage IDMessage Preview
    {{ message.locale }}{{ message.fallbackLocale|default('-') }}{{ message.domain }}{{ message.count }} - {{ message.id }} - - {% if message.transChoiceNumber is not null %} - (pluralization is used) - {% endif %} - - {% if message.parameters|length > 0 %} - - - - {% endif %} - {{ message.translation }}
    -{% endmacro %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/twig.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/twig.html.twig deleted file mode 100644 index be84c19b1..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/twig.html.twig +++ /dev/null @@ -1,115 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %} - {% set icon %} - {{ include('@WebProfiler/Icon/twig.svg') }} - {{ time }} - ms - {% endset %} - - {% set text %} -
    - Render Time - {{ time }} ms -
    -
    - Template Calls - {{ collector.templatecount }} -
    -
    - Block Calls - {{ collector.blockcount }} -
    -
    - Macro Calls - {{ collector.macrocount }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/twig.svg') }} - Twig - -{% endblock %} - -{% block panel %} - {% if collector.templatecount == 0 %} -

    Twig

    - -
    -

    No Twig templates were rendered for this request.

    -
    - {% else %} -

    Twig Metrics

    - -
    -
    - {{ '%0.0f'|format(collector.time) }} ms - Render time -
    - -
    - {{ collector.templatecount }} - Template calls -
    - -
    - {{ collector.blockcount }} - Block calls -
    - -
    - {{ collector.macrocount }} - Macro calls -
    -
    - -

    - Render time includes sub-requests rendering time (if any). -

    - -

    Rendered Templates

    - - - - - - - - - - {% for template, count in collector.templates %} - - {%- set file = collector.templatePaths[template]|default(false) -%} - {%- set link = file ? file|file_link(1) : false -%} - - - - {% endfor %} - -
    Template Name & PathRender Count
    - {{ include('@WebProfiler/Icon/twig.svg') }} - {% if link %} - {{ template }} - - {% else %} - {{ template }} - {% endif %} - {{ count }}
    - -

    Rendering Call Graph

    - -
    - {{ collector.htmlcallgraph }} -
    - {% endif %} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Collector/validator.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Collector/validator.html.twig deleted file mode 100644 index f3b7b7656..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Collector/validator.html.twig +++ /dev/null @@ -1,103 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if collector.violationsCount > 0 or collector.calls|length %} - {% set status_color = collector.violationsCount ? 'red' %} - {% set icon %} - {{ include('@WebProfiler/Icon/validator.svg') }} - - {{ collector.violationsCount ?: collector.calls|length }} - - {% endset %} - - {% set text %} -
    - Validator calls - {{ collector.calls|length }} -
    -
    - Number of violations - {{ collector.violationsCount }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/validator.svg') }} - Validator - {% if collector.violationsCount > 0 %} - - {{ collector.violationsCount }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Validator calls

    - - {% for call in collector.calls %} -
    - - - - - - - {% if call.violations|length %} - - - - - - - - - - {% for violation in call.violations %} - - - - - - - {% endfor %} -
    PathMessageInvalid valueViolation
    {{ violation.propertyPath }}{{ violation.message }}{{ profiler_dump(violation.seek('invalidValue')) }}{{ profiler_dump(violation) }}
    - {% else %} - No violations - {% endif %} -
    - {% else %} -
    -

    No calls to the validator were collected during this request.

    -
    - {% endfor %} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/ajax.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/ajax.svg deleted file mode 100644 index 4019e3249..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/ajax.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/cache.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/cache.svg deleted file mode 100644 index 798198928..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/cache.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/close.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/close.svg deleted file mode 100644 index 6038d73f9..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/close.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/config.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/config.svg deleted file mode 100644 index ba51407d1..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/config.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/event.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/event.svg deleted file mode 100644 index 76eaa3245..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/event.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/exception.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/exception.svg deleted file mode 100644 index 0e4df2b23..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/exception.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/filter.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/filter.svg deleted file mode 100644 index 8800f1c05..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/filter.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/form.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/form.svg deleted file mode 100644 index e1307960b..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/form.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/forward.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/forward.svg deleted file mode 100644 index 28a960a5b..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/forward.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/http-client.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/http-client.svg deleted file mode 100644 index e6b1fb2fe..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/http-client.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/logger.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/logger.svg deleted file mode 100644 index ae8c5aae4..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/logger.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/mailer.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/mailer.svg deleted file mode 100644 index ed649d068..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/mailer.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/memory.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/memory.svg deleted file mode 100644 index deb047fc4..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/memory.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/menu.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/menu.svg deleted file mode 100644 index afccc7f62..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/menu.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/messenger.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/messenger.svg deleted file mode 100644 index 3af517813..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/messenger.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/no-gray.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/no-gray.svg deleted file mode 100644 index ea0089159..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/no-gray.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/no.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/no.svg deleted file mode 100644 index 5ffc020f4..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/no.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/notifier.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/notifier.svg deleted file mode 100644 index 0648f126e..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/notifier.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/redirect.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/redirect.svg deleted file mode 100644 index 8c329d052..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/redirect.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/request.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/request.svg deleted file mode 100644 index 67d6c643f..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/request.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/router.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/router.svg deleted file mode 100644 index e16c617eb..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/router.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/search.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/search.svg deleted file mode 100644 index cae0a67f9..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/search.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/symfony.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/symfony.svg deleted file mode 100644 index c3beff6c8..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/symfony.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/time.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/time.svg deleted file mode 100644 index d49851d44..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/time.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/translation.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/translation.svg deleted file mode 100644 index 735bb92c7..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/translation.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/twig.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/twig.svg deleted file mode 100644 index 4a6ef7ab3..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/twig.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/validator.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/validator.svg deleted file mode 100644 index 6a81d92da..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/validator.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Icon/yes.svg b/lib/symfony/web-profiler-bundle/Resources/views/Icon/yes.svg deleted file mode 100644 index dbbff93d0..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Icon/yes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/ajax_layout.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/ajax_layout.html.twig deleted file mode 100644 index 3e2f6f09f..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/ajax_layout.html.twig +++ /dev/null @@ -1 +0,0 @@ -{% block panel '' %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/bag.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/bag.html.twig deleted file mode 100644 index 4df5ccf1c..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/bag.html.twig +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - {% for key in bag.keys|sort %} - - - - - {% else %} - - - - {% endfor %} - -
    {{ labels is defined ? labels[0] : 'Key' }}{{ labels is defined ? labels[1] : 'Value' }}
    {{ key }}{{ profiler_dump(bag.get(key), maxDepth=maxDepth|default(0)) }}
    (no data)
    diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/base.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/base.html.twig deleted file mode 100644 index 1a74431d8..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/base.html.twig +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - {% block title %}Symfony Profiler{% endblock %} - - - {% block head %} - - {{ include('@WebProfiler/Profiler/profiler.css.twig') }} - - {% endblock %} - - - - if (null === localStorage.getItem('symfony/profiler/theme') || 'theme-auto' === localStorage.getItem('symfony/profiler/theme')) { - document.body.classList.add((matchMedia('(prefers-color-scheme: dark)').matches ? 'theme-dark' : 'theme-light')); - // needed to respond dynamically to OS changes without having to refresh the page - window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => { - document.body.classList.remove('theme-light', 'theme-dark'); - document.body.classList.add(e.matches ? 'theme-dark' : 'theme-light'); - }); - } else { - document.body.classList.add(localStorage.getItem('symfony/profiler/theme')); - } - - document.body.classList.add(localStorage.getItem('symfony/profiler/width') || 'width-normal'); - - - {% block body '' %} - - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/base_js.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/base_js.html.twig deleted file mode 100644 index af36bc033..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/base_js.html.twig +++ /dev/null @@ -1,874 +0,0 @@ -{# This file is partially duplicated in src/Symfony/Component/ErrorHandler/Resources/assets/js/exception.js. - If you make any change in this file, verify the same change is needed in the other file. #} -/* 0) { - addClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); - } else if (successStreak < 4) { - addClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); - removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); - } else { - removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); - removeClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); - } - }; - - var startAjaxRequest = function(index) { - var tbody = document.querySelector('.sf-toolbar-ajax-request-list'); - if (!tbody) { - return; - } - - var nbOfAjaxRequest = tbody.rows.length; - if (nbOfAjaxRequest >= 100) { - tbody.deleteRow(0); - } - - var request = requestStack[index]; - pendingRequests++; - var row = document.createElement('tr'); - request.DOMNode = row; - - var requestNumberCell = document.createElement('td'); - requestNumberCell.textContent = index + 1; - row.appendChild(requestNumberCell); - - var profilerCell = document.createElement('td'); - profilerCell.textContent = 'n/a'; - row.appendChild(profilerCell); - - var methodCell = document.createElement('td'); - methodCell.textContent = request.method; - row.appendChild(methodCell); - - var typeCell = document.createElement('td'); - typeCell.textContent = request.type; - row.appendChild(typeCell); - - var statusCodeCell = document.createElement('td'); - var statusCode = document.createElement('span'); - statusCode.textContent = 'n/a'; - statusCodeCell.appendChild(statusCode); - row.appendChild(statusCodeCell); - - var pathCell = document.createElement('td'); - pathCell.className = 'sf-ajax-request-url'; - if ('GET' === request.method) { - var pathLink = document.createElement('a'); - pathLink.setAttribute('href', request.url); - pathLink.textContent = request.url; - pathCell.appendChild(pathLink); - } else { - pathCell.textContent = request.url; - } - pathCell.setAttribute('title', request.url); - row.appendChild(pathCell); - - var durationCell = document.createElement('td'); - durationCell.className = 'sf-ajax-request-duration'; - durationCell.textContent = 'n/a'; - row.appendChild(durationCell); - - request.liveDurationHandle = setInterval(function() { - durationCell.textContent = (new Date() - request.start) + ' ms'; - }, 100); - - row.className = 'sf-ajax-request sf-ajax-request-loading'; - tbody.insertBefore(row, null); - - var toolbarInfo = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info'); - toolbarInfo.scrollTop = toolbarInfo.scrollHeight; - - renderAjaxRequests(); - }; - - var finishAjaxRequest = function(index) { - var request = requestStack[index]; - clearInterval(request.liveDurationHandle); - - if (!request.DOMNode) { - return; - } - - if (request.toolbarReplace && !request.toolbarReplaceFinished && request.profile) { - /* Flag as complete because finishAjaxRequest can be called multiple times. */ - request.toolbarReplaceFinished = true; - /* Search up through the DOM to find the toolbar's container ID. */ - for (var elem = request.DOMNode; elem && elem !== document; elem = elem.parentNode) { - if (elem.id.match(/^sfwdt/)) { - Sfjs.loadToolbar(elem.id.replace(/^sfwdt/, ''), request.profile); - break; - } - } - } - - pendingRequests--; - var row = request.DOMNode; - /* Unpack the children from the row */ - var profilerCell = row.children[1]; - var methodCell = row.children[2]; - var statusCodeCell = row.children[4]; - var statusCodeElem = statusCodeCell.children[0]; - var durationCell = row.children[6]; - - if (request.error) { - row.className = 'sf-ajax-request sf-ajax-request-error'; - methodCell.className = 'sf-ajax-request-error'; - successStreak = 0; - } else { - row.className = 'sf-ajax-request sf-ajax-request-ok'; - successStreak++; - } - - if (request.statusCode) { - if (request.statusCode < 300) { - statusCodeElem.setAttribute('class', 'sf-toolbar-status'); - } else if (request.statusCode < 400) { - statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-yellow'); - } else { - statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red'); - } - statusCodeElem.textContent = request.statusCode; - } else { - statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red'); - } - - if (request.duration) { - durationCell.textContent = request.duration + ' ms'; - } - - if (request.profilerUrl) { - profilerCell.textContent = ''; - var profilerLink = document.createElement('a'); - profilerLink.setAttribute('href', request.profilerUrl); - profilerLink.textContent = request.profile; - profilerCell.appendChild(profilerLink); - } - - renderAjaxRequests(); - }; - - {% if excluded_ajax_paths is defined %} - if (window.fetch && window.fetch.polyfill === undefined) { - var oldFetch = window.fetch; - window.fetch = function () { - var promise = oldFetch.apply(this, arguments); - var url = arguments[0]; - var params = arguments[1]; - var paramType = Object.prototype.toString.call(arguments[0]); - if (paramType === '[object Request]') { - url = arguments[0].url; - params = { - method: arguments[0].method, - credentials: arguments[0].credentials, - headers: arguments[0].headers, - mode: arguments[0].mode, - redirect: arguments[0].redirect - }; - } else { - url = String(url); - } - if (!url.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) { - var method = 'GET'; - if (params && params.method !== undefined) { - method = params.method; - } - - var stackElement = { - error: false, - url: url, - method: method, - type: 'fetch', - start: new Date() - }; - - var idx = requestStack.push(stackElement) - 1; - promise.then(function (r) { - stackElement.duration = new Date() - stackElement.start; - stackElement.error = r.status < 200 || r.status >= 400; - stackElement.statusCode = r.status; - stackElement.profile = r.headers.get('x-debug-token'); - stackElement.profilerUrl = r.headers.get('x-debug-token-link'); - stackElement.toolbarReplaceFinished = false; - stackElement.toolbarReplace = '1' === r.headers.get('Symfony-Debug-Toolbar-Replace'); - finishAjaxRequest(idx); - }, function (e){ - stackElement.error = true; - finishAjaxRequest(idx); - }); - startAjaxRequest(idx); - } - - return promise; - }; - } - if (window.XMLHttpRequest && XMLHttpRequest.prototype.addEventListener) { - var proxied = XMLHttpRequest.prototype.open; - - XMLHttpRequest.prototype.open = function(method, url, async, user, pass) { - var self = this; - - /* prevent logging AJAX calls to static and inline files, like templates */ - var path = url; - if (url.slice(0, 1) === '/') { - if (0 === url.indexOf('{{ request.basePath|e('js') }}')) { - path = url.slice({{ request.basePath|length }}); - } - } - else if (0 === url.indexOf('{{ (request.schemeAndHttpHost ~ request.basePath)|e('js') }}')) { - path = url.slice({{ (request.schemeAndHttpHost ~ request.basePath)|length }}); - } - - if (!path.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) { - var stackElement = { - error: false, - url: url, - method: method, - type: 'xhr', - start: new Date() - }; - - var idx = requestStack.push(stackElement) - 1; - - this.addEventListener('readystatechange', function() { - if (self.readyState == 4) { - stackElement.duration = new Date() - stackElement.start; - stackElement.error = self.status < 200 || self.status >= 400; - stackElement.statusCode = self.status; - extractHeaders(self, stackElement); - - finishAjaxRequest(idx); - } - }, false); - - startAjaxRequest(idx); - } - - proxied.apply(this, Array.prototype.slice.call(arguments)); - }; - } - {% endif %} - - return { - hasClass: hasClass, - - removeClass: removeClass, - - addClass: addClass, - - toggleClass: toggleClass, - - getPreference: getPreference, - - setPreference: setPreference, - - addEventListener: addEventListener, - - request: request, - - renderAjaxRequests: renderAjaxRequests, - - getSfwdt: function(token) { - if (!this.sfwdt) { - this.sfwdt = document.getElementById('sfwdt' + token); - } - - return this.sfwdt; - }, - - load: function(selector, url, onSuccess, onError, options) { - var el = document.getElementById(selector); - - if (el && el.getAttribute('data-sfurl') !== url) { - request( - url, - function(xhr) { - el.innerHTML = xhr.responseText; - el.setAttribute('data-sfurl', url); - removeClass(el, 'loading'); - var pending = pendingRequests; - for (var i = 0; i < requestStack.length; i++) { - startAjaxRequest(i); - if (requestStack[i].duration) { - finishAjaxRequest(i); - } - } - /* Revert the pending state in case there was a start called without a finish above. */ - pendingRequests = pending; - (onSuccess || noop)(xhr, el); - }, - function(xhr) { (onError || noop)(xhr, el); }, - '', - options - ); - } - - return this; - }, - - showToolbar: function(token) { - var sfwdt = this.getSfwdt(token); - removeClass(sfwdt, 'sf-display-none'); - - if (getPreference('toolbar/displayState') == 'none') { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'none'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'none'; - document.getElementById('sfMiniToolbar-' + token).style.display = 'block'; - } else { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'block'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'block'; - document.getElementById('sfMiniToolbar-' + token).style.display = 'none'; - } - }, - - hideToolbar: function(token) { - var sfwdt = this.getSfwdt(token); - addClass(sfwdt, 'sf-display-none'); - }, - - initToolbar: function(token) { - this.showToolbar(token); - - var hideButton = document.getElementById('sfToolbarHideButton-' + token); - var hideButtonSvg = hideButton.querySelector('svg'); - hideButtonSvg.setAttribute('aria-hidden', 'true'); - hideButtonSvg.setAttribute('focusable', 'false'); - addEventListener(hideButton, 'click', function (event) { - event.preventDefault(); - - var p = this.parentNode; - p.style.display = 'none'; - (p.previousElementSibling || p.previousSibling).style.display = 'none'; - document.getElementById('sfMiniToolbar-' + token).style.display = 'block'; - setPreference('toolbar/displayState', 'none'); - }); - - var showButton = document.getElementById('sfToolbarMiniToggler-' + token); - var showButtonSvg = showButton.querySelector('svg'); - showButtonSvg.setAttribute('aria-hidden', 'true'); - showButtonSvg.setAttribute('focusable', 'false'); - addEventListener(showButton, 'click', function (event) { - event.preventDefault(); - - var elem = this.parentNode; - if (elem.style.display == 'none') { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'none'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'none'; - elem.style.display = 'block'; - } else { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'block'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'block'; - elem.style.display = 'none' - } - - setPreference('toolbar/displayState', 'block'); - }); - }, - - loadToolbar: function(token, newToken) { - var that = this; - var triesCounter = document.getElementById('sfLoadCounter-' + token); - - var options = { - retry: true, - onSend: function (count) { - if (count === 3) { - that.initToolbar(token); - } - - if (triesCounter) { - triesCounter.textContent = count; - } - }, - }; - - var cancelButton = document.getElementById('sfLoadCancel-' + token); - if (cancelButton) { - addEventListener(cancelButton, 'click', function (event) { - event.preventDefault(); - - options.stop = true; - that.hideToolbar(token); - }); - } - - newToken = (newToken || token); - - this.load( - 'sfwdt' + token, - '{{ url("_wdt", { "token": "xxxxxx" })|escape('js') }}'.replace(/xxxxxx/, newToken), - function(xhr, el) { - /* Do nothing in the edge case where the toolbar has already been replaced with a new one */ - if (!document.getElementById('sfToolbarMainContent-' + newToken)) { - return; - } - - /* Evaluate in global scope scripts embedded inside the toolbar */ - var i, scripts = [].slice.call(el.querySelectorAll('script')); - for (i = 0; i < scripts.length; ++i) { - eval.call({}, scripts[i].firstChild.nodeValue); - } - - el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none'; - - if (el.style.display == 'none') { - return; - } - - that.initToolbar(newToken); - - /* Handle toolbar-info position */ - var toolbarBlocks = [].slice.call(el.querySelectorAll('.sf-toolbar-block')); - for (i = 0; i < toolbarBlocks.length; ++i) { - toolbarBlocks[i].onmouseover = function () { - var toolbarInfo = this.querySelectorAll('.sf-toolbar-info')[0]; - var pageWidth = document.body.clientWidth; - var elementWidth = toolbarInfo.offsetWidth; - var leftValue = (elementWidth + this.offsetLeft) - pageWidth; - var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth; - - /* Reset right and left value, useful on window resize */ - toolbarInfo.style.right = ''; - toolbarInfo.style.left = ''; - - if (elementWidth > pageWidth) { - toolbarInfo.style.left = 0; - } - else if (leftValue > 0 && rightValue > 0) { - toolbarInfo.style.right = (rightValue * -1) + 'px'; - } else if (leftValue < 0) { - toolbarInfo.style.left = 0; - } else { - toolbarInfo.style.right = '0px'; - } - }; - } - - renderAjaxRequests(); - addEventListener(document.querySelector('.sf-toolbar-ajax-clear'), 'click', function() { - requestStack = []; - renderAjaxRequests(); - successStreak = 4; - document.querySelector('.sf-toolbar-ajax-request-list').innerHTML = ''; - }); - addEventListener(document.querySelector('.sf-toolbar-block-ajax'), 'mouseenter', function (event) { - var elem = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info'); - elem.scrollTop = elem.scrollHeight; - }); - addEventListener(document.querySelector('.sf-toolbar-block-ajax > .sf-toolbar-icon'), 'click', function (event) { - event.preventDefault(); - - toggleClass(this.parentNode, 'hover'); - }); - - var dumpInfo = document.querySelector('.sf-toolbar-block-dump .sf-toolbar-info'); - if (null !== dumpInfo) { - addEventListener(dumpInfo, 'sfbeforedumpcollapse', function () { - dumpInfo.style.minHeight = dumpInfo.getBoundingClientRect().height+'px'; - }); - addEventListener(dumpInfo, 'mouseleave', function () { - dumpInfo.style.minHeight = ''; - }); - } - }, - function(xhr) { - if (xhr.status !== 0 && !options.stop) { - var sfwdt = that.getSfwdt(token); - sfwdt.innerHTML = '\ -
    \ -
    \ - An error occurred while loading the web debug toolbar. Open the web profiler.\ -
    \ - '; - sfwdt.setAttribute('class', 'sf-toolbar sf-error-toolbar'); - } - }, - options - ); - - return this; - }, - - toggle: function(selector, elOn, elOff) { - var tmp = elOn.style.display, - el = document.getElementById(selector); - - elOn.style.display = elOff.style.display; - elOff.style.display = tmp; - - if (el) { - el.style.display = 'none' === tmp ? 'none' : 'block'; - } - - return this; - }, - - createTabs: function() { - var tabGroups = document.querySelectorAll('.sf-tabs:not([data-processed=true])'); - - /* create the tab navigation for each group of tabs */ - for (var i = 0; i < tabGroups.length; i++) { - var tabs = tabGroups[i].querySelectorAll(':scope > .tab'); - var tabNavigation = document.createElement('ul'); - tabNavigation.className = 'tab-navigation'; - - var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */ - for (var j = 0; j < tabs.length; j++) { - var tabId = 'tab-' + i + '-' + j; - var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; - - var tabNavigationItem = document.createElement('li'); - tabNavigationItem.setAttribute('data-tab-id', tabId); - if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; } - if (hasClass(tabs[j], 'disabled')) { addClass(tabNavigationItem, 'disabled'); } - tabNavigationItem.innerHTML = tabTitle; - tabNavigation.appendChild(tabNavigationItem); - - var tabContent = tabs[j].querySelector('.tab-content'); - tabContent.parentElement.setAttribute('id', tabId); - } - - tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); - addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active'); - } - - /* display the active tab and add the 'click' event listeners */ - for (i = 0; i < tabGroups.length; i++) { - tabNavigation = tabGroups[i].querySelectorAll(':scope > .tab-navigation li'); - - for (j = 0; j < tabNavigation.length; j++) { - tabId = tabNavigation[j].getAttribute('data-tab-id'); - document.getElementById(tabId).querySelector('.tab-title').className = 'hidden'; - - if (hasClass(tabNavigation[j], 'active')) { - document.getElementById(tabId).className = 'block'; - } else { - document.getElementById(tabId).className = 'hidden'; - } - - tabNavigation[j].addEventListener('click', function(e) { - var activeTab = e.target || e.srcElement; - - /* needed because when the tab contains HTML contents, user can click */ - /* on any of those elements instead of their parent '
  • ' element */ - while (activeTab.tagName.toLowerCase() !== 'li') { - activeTab = activeTab.parentNode; - } - - /* get the full list of tabs through the parent of the active tab element */ - var tabNavigation = activeTab.parentNode.children; - for (var k = 0; k < tabNavigation.length; k++) { - var tabId = tabNavigation[k].getAttribute('data-tab-id'); - document.getElementById(tabId).className = 'hidden'; - removeClass(tabNavigation[k], 'active'); - } - - addClass(activeTab, 'active'); - var activeTabId = activeTab.getAttribute('data-tab-id'); - document.getElementById(activeTabId).className = 'block'; - }); - } - - tabGroups[i].setAttribute('data-processed', 'true'); - } - }, - - createToggles: function() { - var toggles = document.querySelectorAll('.sf-toggle:not([data-processed=true])'); - - for (var i = 0; i < toggles.length; i++) { - var elementSelector = toggles[i].getAttribute('data-toggle-selector'); - var element = document.querySelector(elementSelector); - - addClass(element, 'sf-toggle-content'); - - if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') { - addClass(toggles[i], 'sf-toggle-on'); - addClass(element, 'sf-toggle-visible'); - } else { - addClass(toggles[i], 'sf-toggle-off'); - addClass(element, 'sf-toggle-hidden'); - } - - addEventListener(toggles[i], 'click', function(e) { - e.preventDefault(); - - if ('' !== window.getSelection().toString()) { - /* Don't do anything on text selection */ - return; - } - - var toggle = e.target || e.srcElement; - - /* needed because when the toggle contains HTML contents, user can click */ - /* on any of those elements instead of their parent '.sf-toggle' element */ - while (!hasClass(toggle, 'sf-toggle')) { - toggle = toggle.parentNode; - } - - var element = document.querySelector(toggle.getAttribute('data-toggle-selector')); - - toggleClass(toggle, 'sf-toggle-on'); - toggleClass(toggle, 'sf-toggle-off'); - toggleClass(element, 'sf-toggle-hidden'); - toggleClass(element, 'sf-toggle-visible'); - - /* the toggle doesn't change its contents when clicking on it */ - if (!toggle.hasAttribute('data-toggle-alt-content')) { - return; - } - - if (!toggle.hasAttribute('data-toggle-original-content')) { - toggle.setAttribute('data-toggle-original-content', toggle.innerHTML); - } - - var currentContent = toggle.innerHTML; - var originalContent = toggle.getAttribute('data-toggle-original-content'); - var altContent = toggle.getAttribute('data-toggle-alt-content'); - toggle.innerHTML = currentContent !== altContent ? altContent : originalContent; - }); - - /* Prevents from disallowing clicks on links inside toggles */ - var toggleLinks = toggles[i].querySelectorAll('a'); - for (var j = 0; j < toggleLinks.length; j++) { - addEventListener(toggleLinks[j], 'click', function(e) { - e.stopPropagation(); - }); - } - - /* Prevents from disallowing clicks on "copy to clipboard" elements inside toggles */ - var copyToClipboardElements = toggles[i].querySelectorAll('span[data-clipboard-text]'); - for (var k = 0; k < copyToClipboardElements.length; k++) { - addEventListener(copyToClipboardElements[k], 'click', function(e) { - e.stopPropagation(); - }); - } - - toggles[i].setAttribute('data-processed', 'true'); - } - }, - - initializeLogsTable: function() { - Sfjs.updateLogsTable(); - - document.querySelectorAll('.log-filter input').forEach((input) => { - input.addEventListener('change', () => { Sfjs.updateLogsTable(); }); - }); - - document.querySelectorAll('.filter-select-all-or-none button').forEach((link) => { - link.addEventListener('click', () => { - const selectAll = link.classList.contains('select-all'); - link.closest('.log-filter-content').querySelectorAll('input').forEach((input) => { - input.checked = selectAll; - }); - - Sfjs.updateLogsTable(); - }); - }); - - document.body.addEventListener('click', (event) => { - document.querySelectorAll('details.log-filter').forEach((filterElement) => { - if (!filterElement.contains(event.target) && filterElement.open) { - filterElement.open = false; - } - }); - }); - }, - - updateLogsTable: function() { - const selectedType = document.querySelector('#log-filter-type input:checked').value; - const priorities = document.querySelectorAll('#log-filter-priority input'); - const allPriorities = Array.from(priorities).map((input) => input.value); - const selectedPriorities = Array.from(priorities).filter((input) => input.checked).map((input) => input.value); - const channels = document.querySelectorAll('#log-filter-channel input'); - const selectedChannels = Array.from(channels).filter((input) => input.checked).map((input) => input.value); - - const logs = document.querySelector('table.logs'); - if (null === logs) { - return; - } - - /* hide rows that don't match the current filters */ - let numVisibleRows = 0; - logs.querySelectorAll('tbody tr').forEach((row) => { - if ('all' !== selectedType && selectedType !== row.getAttribute('data-type')) { - row.style.display = 'none'; - return; - } - - const priority = row.getAttribute('data-priority'); - if (false === selectedPriorities.includes(priority) && true === allPriorities.includes(priority)) { - row.style.display = 'none'; - return; - } - - if ('' !== row.getAttribute('data-channel') && false === selectedChannels.includes(row.getAttribute('data-channel'))) { - row.style.display = 'none'; - return; - } - - row.style.display = 'table-row'; - numVisibleRows++; - }); - - document.querySelector('table.logs').style.display = 0 === numVisibleRows ? 'none' : 'table'; - document.querySelector('.no-logs-message').style.display = 0 === numVisibleRows ? 'block' : 'none'; - - /* update the selected totals of all filters */ - document.querySelector('#log-filter-priority .filter-active-num').innerText = (priorities.length === selectedPriorities.length) ? 'All' : selectedPriorities.length; - document.querySelector('#log-filter-channel .filter-active-num').innerText = (channels.length === selectedChannels.length) ? 'All' : selectedChannels.length; - - /* update the currently selected "log type" tab */ - document.querySelectorAll('#log-filter-type li').forEach((tab) => tab.classList.remove('active')); - document.querySelector(`#log-filter-type input[value="${selectedType}"]`).parentElement.classList.add('active'); - }, - }; - })(); - - Sfjs.addEventListener(document, 'DOMContentLoaded', function() { - Sfjs.createTabs(); - Sfjs.createToggles(); - }); -} -/*]]>*/ diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/cancel.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/cancel.html.twig deleted file mode 100644 index 6f1763d3a..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/cancel.html.twig +++ /dev/null @@ -1,25 +0,0 @@ -{% block toolbar %} - {% set icon %} - {{ include('@WebProfiler/Icon/symfony.svg') }} - - - Loading… - - {% endset %} - - {% set text %} -
    - Loading the web debug toolbar… -
    -
    - Attempt # -
    -
    - - - -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/header.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/header.html.twig deleted file mode 100644 index d04cf37e6..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/header.html.twig +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/info.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/info.html.twig deleted file mode 100644 index 43404393e..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/info.html.twig +++ /dev/null @@ -1,22 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% set messages = { - 'no_token' : { - status: 'error', - title: (token|default('') == 'latest') ? 'There are no profiles' : 'Token not found', - message: (token|default('') == 'latest') ? 'No profiles found.' : 'Token "' ~ token|default('') ~ '" not found.' - } -} %} - -{% block summary %} -
    -
    -

    {{ messages[about].status|title }}

    -
    -
    -{% endblock %} - -{% block panel %} -

    {{ messages[about].title }}

    -

    {{ messages[about].message }}

    -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig deleted file mode 100644 index 00c64cadf..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig +++ /dev/null @@ -1,153 +0,0 @@ -{% extends '@WebProfiler/Profiler/base.html.twig' %} - -{% block body %} - {{ include('@WebProfiler/Profiler/header.html.twig', with_context = false) }} - -
    - {% block summary %} - {% if profile is defined %} - {% set request_collector = profile.collectors.request|default(false) %} - {% set status_code = request_collector ? request_collector.statuscode|default(0) : 0 %} - {% set css_class = status_code > 399 ? 'status-error' : status_code > 299 ? 'status-warning' : 'status-success' %} - -
    -
    -

    - {% if profile.method|upper in ['GET', 'HEAD'] %} - {{ profile.url }} - {% else %} - {{ profile.url }} - {% set referer = request_collector ? request_collector.requestheaders.get('referer') : null %} - {% if referer %} - Return to referer URL - {% endif %} - {% endif %} -

    - - {% if request_collector and request_collector.redirect -%} - {%- set redirect = request_collector.redirect -%} - {%- set controller = redirect.controller -%} - {%- set redirect_route = '@' ~ redirect.route %} - - {%- endif %} - - {% if request_collector and request_collector.forwardtoken -%} - {% set forward_profile = profile.childByToken(request_collector.forwardtoken) %} - {% set controller = forward_profile ? forward_profile.collector('request').controller : 'n/a' %} - - {%- endif %} - - -
    -
    - {% endif %} - {% endblock %} -
    - -
    -
    - - -
    -
    - {{ include('@WebProfiler/Profiler/base_js.html.twig') }} - {% block panel '' %} -
    -
    -
    -
    - -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/open.css.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/open.css.twig deleted file mode 100644 index 747d73f5d..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/open.css.twig +++ /dev/null @@ -1,79 +0,0 @@ -{# Mixins - ========================================================================= #} -{% set mixins = { - 'break_long_words': '-ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto;', - 'monospace_font': 'font-family: monospace; font-size: 13px; font-size-adjust: 0.5;', - 'sans_serif_font': 'font-family: Helvetica, Arial, sans-serif;', - 'subtle_border_and_shadow': 'background: #FFF; border: 1px solid #E0E0E0; box-shadow: 0px 0px 1px rgba(128, 128, 128, .2);' -} %} - -{# Normalization - (normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css) - ========================================================================= #} -html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0} - -{# Basic styles - ========================================================================= #} -html, body { - height: 100%; - width: 100%; -} -body { - background-color: #F9F9F9; - color: #aaa; - display: flex; - flex-direction: column; - {{ mixins.sans_serif_font|raw }} - font-size: 14px; - line-height: 1.4; -} -.header { - background-color: #222; - position: fixed; - top: 0; - display: flex; - width: 100%; -} -.header h1 { - color: #FFF; - font-weight: normal; - font-size: 21px; - margin: 0; - padding: 10px 10px 8px; - word-break: break-all; -} - -a.doc { - color: #FFF; - text-decoration: none; - margin: auto; - margin-right: 10px; -} - -a.doc:hover { - text-decoration: underline; -} - -.empty { - padding: 10px; - color: #555; -} - -.source { - margin-top: 41px; -} - -.source li code { - color: #555; -} - -.source li.selected { - background: rgba(255, 255, 153, 0.5); -} - -.anchor { - position: relative; - display: inline-block; - top: -7em; - visibility: hidden; -} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/open.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/open.html.twig deleted file mode 100644 index ba94bc0ef..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/open.html.twig +++ /dev/null @@ -1,22 +0,0 @@ -{% extends '@WebProfiler/Profiler/base.html.twig' %} - -{% block head %} - -{% endblock %} - -{% block body %} - {% set source = filename|file_excerpt(line, -1) %} -
    -

    {{ file }}{% if 0 < line %} line {{ line }}{% endif %}

    - Open in your IDE? -
    -
    - {% if source is null %} -

    The file is not readable.

    - {% else %} - {{ source|raw }} - {% endif %} -
    -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/profiler.css.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/profiler.css.twig deleted file mode 100644 index 24ec0863d..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/profiler.css.twig +++ /dev/null @@ -1,1479 +0,0 @@ -{# This file is partially duplicated in TwigBundle/Resources/views/exceotion.css.twig. - If you make any change in this file, verify the same change is needed in the other file. #} -{# Normalization - (normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css) - ========================================================================= #} -*{-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0} - -:root { - --font-sans-serif: Helvetica, Arial, sans-serif; - --page-background: #f9f9f9; - --color-text: #222; - --color-muted: #999; - --color-link: #218BC3; - /* when updating any of these colors, do the same in toolbar.css.twig */ - --color-success: #4f805d; - --color-warning: #a46a1f; - --color-error: #b0413e; - --badge-background: #f5f5f5; - --badge-color: #666; - --badge-warning-background: #FEF3C7; - --badge-warning-color: #B45309; - --badge-danger-background: #FEE2E2; - --badge-danger-color: #B91C1C; - --tab-background: #fff; - --tab-color: #444; - --tab-active-background: #666; - --tab-active-color: #fafafa; - --tab-disabled-background: #f5f5f5; - --tab-disabled-color: #999; - --log-filter-button-background: #fff; - --log-filter-button-border: #999; - --log-filter-button-color: #555; - --log-filter-active-num-color: #2563EB; - --log-timestamp-color: #555; - --metric-value-background: #fff; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #e0e0e0; - --metric-label-color: inherit; - --trace-selected-background: #F7E5A1; - --table-border: #e0e0e0; - --table-background: #fff; - --table-header: #e0e0e0; - --info-background: #ddf; - --tree-active-background: #F7E5A1; - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(128, 128, 128, .2); - --border: 1px solid #e0e0e0; - --background-error: var(--color-error); - --highlight-comment: #969896; - --highlight-default: #222222; - --highlight-keyword: #a71d5d; - --highlight-string: #183691; - --highlight-selected-line: rgba(255, 255, 153, 0.5); - --base-0: #fff; - --base-1: #f5f5f5; - --base-2: #e0e0e0; - --base-3: #ccc; - --base-4: #666; - --base-5: #444; - --base-6: #222; - --card-label-background: #eee; - --card-label-color: var(--base-6); -} - -.theme-dark { - --page-background: #36393e; - --color-text: #e0e0e0; - --color-muted: #777; - --color-link: #93C5FD; - --color-error: #d43934; - --badge-background: #555; - --badge-color: #ddd; - --badge-warning-background: #B45309; - --badge-warning-color: #FEF3C7; - --badge-danger-background: #B91C1C; - --badge-danger-color: #FEE2E2; - --tab-background: #555; - --tab-color: #ccc; - --tab-active-background: #888; - --tab-active-color: #fafafa; - --tab-disabled-background: var(--page-background); - --tab-disabled-color: #777; - --log-filter-button-background: #555; - --log-filter-button-border: #999; - --log-filter-button-color: #ccc; - --log-filter-active-num-color: #93C5FD; - --log-timestamp-color: #ccc; - --metric-value-background: #555; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #777; - --metric-label-color: #e0e0e0; - --trace-selected-background: #71663acc; - --table-border: #444; - --table-background: #333; - --table-header: #555; - --info-background: rgba(79, 148, 195, 0.5); - --tree-active-background: var(--metric-label-background); - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(32, 32, 32, .2); - --border: 1px solid #666; - --background-error: #b0413e; - --highlight-comment: #dedede; - --highlight-default: var(--base-6); - --highlight-keyword: #ff413c; - --highlight-string: #70a6fd; - --highlight-selected-line: rgba(14, 14, 14, 0.5); - --base-0: #2e3136; - --base-1: #444; - --base-2: #666; - --base-3: #666; - --base-4: #666; - --base-5: #e0e0e0; - --base-6: #f5f5f5; - --card-label-background: var(--tab-active-background); - --card-label-color: var(--tab-active-color); -} - -{# Basic styles - ========================================================================= #} -html, body { - height: 100%; - width: 100%; -} -body { - background-color: var(--page-background); - color: var(--base-6); - display: flex; - flex-direction: column; - font-family: var(--font-sans-serif); - font-size: 14px; - line-height: 1.4; -} - -h2, h3, h4 { - font-weight: 500; - margin: 1.5em 0 .5em; -} -h2 + h3, -h3 + h4 { - margin-top: 1em; -} -h2 { - font-size: 24px; -} -h3 { - font-size: 21px; -} -h4 { - font-size: 18px; -} -h2 span, h3 span, h4 span, -h2 small, h3 small, h4 small { - color: var(--color-muted); -} - -li { - margin-bottom: 10px; -} - -p { - font-size: 16px; - margin-bottom: 1em; -} - -a { - color: var(--color-link); - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -a.link-inverse { - text-decoration: underline; -} -a.link-inverse:hover { - text-decoration: none; -} -a:active, -a:hover { - outline: 0; -} -h2 a, -h3 a, -h4 a { - text-decoration: underline; -} -h2 a:hover, -h3 a:hover, -h4 a:hover { - text-decoration: none; -} - -abbr { - border-bottom: 1px dotted var(--base-5); - cursor: help; -} - -code, pre { - font-family: monospace; - font-size: 13px; -} - -{# Buttons (the colors of this element don't change based on the selected theme) - ------------------------------------------------------------------------- #} -button { - font-family: var(--font-sans-serif); -} -.btn { - background: #777; - border-radius: 2px; - border: 0; - color: #f5f5f5; - display: inline-block; - padding: .5em .75em; -} -.btn:hover { - cursor: pointer; - opacity: 0.8; - text-decoration: none; -} -.btn-sm { - font-size: 12px; -} -.btn-sm svg { - height: 16px; - width: 16px; - vertical-align: middle; -} -.btn-link { - border-color: transparent; - color: var(--color-link); - text-decoration: none; - background-color: transparent; - outline: none; - border: 0; - padding: 0; - cursor: pointer; -} -.btn-link:hover { - text-decoration: underline; -} -{# Tables - ------------------------------------------------------------------------- #} -table, tr, th, td { - background: var(--table-background); - border-collapse: collapse; - line-height: 1.5; - vertical-align: top; -} -table { - background: var(--base-0); - border: var(--border); - box-shadow: var(--shadow); - margin: 1em 0; - width: 100%; -} - -table th, table td { - padding: 8px 10px; -} - -table th { - font-weight: bold; - text-align: left; -} -table thead th { - background-color: var(--table-header); -} -table thead th.key { - width: 19%; -} -table thead.small th { - font-size: 12px; - padding: 4px 10px; -} - -table tbody th, -table tbody td { - border: 1px solid var(--base-2); - border-width: 1px 0; - font-family: monospace; - font-size: 13px; -} - -table tbody div { - margin: .25em 0; -} -table tbody ul { - margin: 0; - padding: 0 0 0 1em; -} - -table thead th.num-col, -table tbody td.num-col { - text-align: center; -} - -{# Utility classes - ========================================================================= #} -.block { - display: block; -} -.full-width { - width: 100%; -} -.hidden { - display: none; -} -.nowrap { - white-space: pre; -} -.prewrap { - white-space: pre-wrap; -} -.newline { - display: block; -} -.break-long-words { - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; -} -.text-small { - font-size: 12px !important; -} -.text-muted { - color: var(--color-muted); -} -.text-danger { - color: var(--color-error); -} -.text-bold { - font-weight: bold; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.font-normal { - font-family: var(--font-sans-serif); - font-size: 14px; -} -.help { - color: var(--color-muted); - font-size: 14px; - margin-bottom: .5em; -} -.empty { - border: 4px dashed var(--base-2); - color: var(--color-muted); - margin: 1em 0; - padding: .5em 2em; -} - -.label { - background-color: var(--base-4); - color: #FAFAFA; - display: inline-block; - font-size: 12px; - font-weight: bold; - padding: 3px 7px; - white-space: nowrap; -} -.label.same-width { - min-width: 70px; - text-align: center; -} -.label.status-success { background: var(--color-success); color: #FFF; } -.label.status-warning { background: var(--color-warning); color: #FFF; } -.label.status-error { background: var(--background-error); color: #FFF; } - -{# Metrics - ------------------------------------------------------------------------- #} -.metrics { - margin: 1em 0 0; - overflow: auto; -} -.metrics .metric { - float: left; - margin: 0 1em 1em 0; -} - -.metric { - background: var(--metric-value-background); - border: 1px solid var(--table-border); - box-shadow: var(--shadow); - color: var(--metric-value-color); - min-width: 100px; - min-height: 70px; -} -.metric .value { - display: block; - font-size: 28px; - padding: 8px 15px 4px; - text-align: center; -} -.metric .value svg { - margin: 5px 0 -5px; -} -.metric .unit { - color: var(--metric-unit-color); - font-size: 18px; - margin-left: -4px; -} -.metric .label { - background: var(--metric-label-background); - color: var(--metric-label-color); - display: block; - font-size: 12px; - padding: 5px; - text-align: center; -} - -.metrics-horizontal .metric { - min-height: 0; - min-width: 0; -} -.metrics-horizontal .metric .value, -.metrics-horizontal .metric .label { - display: inline; - padding: 2px 6px; -} -.metrics-horizontal .metric .label { - display: inline-block; - padding: 6px; -} -.metrics-horizontal .metric .value { - font-size: 16px; -} -.metrics-horizontal .metric .value svg { - max-height: 14px; - line-height: 10px; - margin: 0; - padding-left: 4px; - vertical-align: middle; -} - -.metric-divider { - float: left; - margin: 0 1em; - min-height: 1px; {# required to apply 'margin' to an empty 'div' #} -} - -{# Cards - ------------------------------------------------------------------------- #} -.card { - background: var(--base-0); - border: var(--border); - box-shadow: var(--shadow); - margin: 1em 0; - padding: 10px; -} -.card-block + .card-block { - border-top: 1px solid var(--base-2); - padding-top: 10px; -} -.card *:first-child, -.card-block *:first-child { - margin-top: 0; -} -.card .label { - background-color: var(--card-label-background); - color: var(--card-label-color); -} - -{# Status - ------------------------------------------------------------------------- #} -.status-success { - background: rgba(94, 151, 110, 0.3); -} -.status-warning { - background: rgba(240, 181, 24, 0.3); -} -.status-error { - background: rgba(176, 65, 62, 0.2); -} -.status-success td, -.status-warning td, -.status-error td { - background: transparent; -} -tr.status-error td, -tr.status-warning td { - border-bottom: 1px solid var(--base-2); - border-top: 1px solid var(--base-2); -} - -.status-warning .colored { - color: var(--color-warning); -} -.status-error .colored { - color: var(--color-error); -} - -{# Syntax highlighting - ========================================================================= #} -.highlight pre { - margin: 0; - white-space: pre-wrap; -} - -.highlight .keyword { color: #8959A8; font-weight: bold; } -.highlight .word { color: var(--color-text); } -.highlight .variable { color: #916319; } -.highlight .symbol { color: var(--color-text); } -.highlight .comment { color: #999999; } -.highlight .backtick { color: #718C00; } -.highlight .string { color: #718C00; } -.highlight .number { color: #F5871F; font-weight: bold; } -.highlight .error { color: #C82829; } - -{# Icons - ========================================================================= #} -.sf-icon { - vertical-align: middle; - background-repeat: no-repeat; - background-size: contain; - width: 16px; - height: 16px; - display: inline-block; -} -.sf-icon svg { - width: 16px; - height: 16px; -} -.sf-icon.sf-medium, -.sf-icon.sf-medium svg { - width: 24px; - height: 24px; -} -.sf-icon.sf-large, -.sf-icon.sf-large svg { - width: 32px; - height: 32px; -} - - -{# Layout - ========================================================================= #} -.container { - max-width: 1300px; - padding-right: 15px; -} -#header { - flex: 0 0 auto; -} -#header .container { - display: flex; - flex-direction: row; - justify-content: space-between; -} -#summary { - flex: 0 0 auto; -} -#content { - height: 100%; -} -#main { - display: flex; - flex-direction: row; - min-height: 100%; -} -#sidebar { - flex: 0 0 220px; -} -#collector-wrapper { - flex: 0 1 100%; - min-width: 0; -} -#collector-content { - margin: 0 0 30px 0; - padding: 14px 0 14px 20px; -} - -#main h2:first-of-type { - margin-top: 0; -} - -{# Header (the colors of this element don't change based on the selected theme) - ========================================================================= #} -#header { - background-color: #222; - overflow: hidden; -} -#header h1 { - color: #fff; - flex: 1; - font-weight: normal; - font-size: 21px; - margin: 0; - padding: 10px 10px 8px; -} -#header h1 span { - color: #ccc; -} -#header h1 svg { - height: 40px; - width: 40px; - margin-top: -4px; - vertical-align: middle; -} -#header h1 svg path, -#header h1 svg .sf-svg-path { - fill: #fff; -} -#header .search { - padding-top: 11px; -} -#header .search input { - border: 1px solid #ddd; - margin-right: 4px; - padding: 7px 8px; - width: 200px; -} - -{# Summary - ========================================================================= #} -#summary .status { - background: var(--base-2); - border: solid rgba(0, 0, 0, 0.1); - border-width: 2px 0; - padding: 10px; -} -#summary h2, -#summary h2 a { - color: var(--base-6); - font-size: 21px; - margin: 0; - text-decoration: none; - vertical-align: middle; -} -#summary h2 a:hover { - text-decoration: underline; -} -#summary h2 a.referer { - margin-left: .5em; - font-size: 75%; - color: rgba(255, 255, 255, 0.5); -} -#summary h2 a.referer:before { - content: '\1F503\00a0'; -} - -#summary .status-success { background: var(--color-success); } -#summary .status-warning { background: var(--color-warning); } -#summary .status-error { background: var(--background-error); } - -#summary .status-success h2, -#summary .status-success a, -#summary .status-warning h2, -#summary .status-warning a, -#summary .status-error h2, -#summary .status-error a { - color: #FFF; -} - -#summary dl.metadata, -#summary dl.metadata a { - margin: 5px 0 0; - color: rgba(255, 255, 255, 0.75); -} -#summary dl.metadata dt, -#summary dl.metadata dd { - display: inline-block; - font-size: 13px; -} -#summary dl.metadata dt { - font-weight: bold; -} -#summary dl.metadata dt:after { - content: ':'; -} -#summary dl.metadata dd { - margin: 0 1.5em 0 0; -} - -#summary dl.metadata .label { - background: rgba(255, 255, 255, 0.2); -} - -{# Sidebar - ========================================================================= #} -#sidebar { - background: #444; - color: #ccc; - padding-bottom: 30px; - position: relative; - width: 220px; - z-index: 9999; -} -#sidebar .module { - padding: 10px; - width: 220px; -} - -{# Sidebar Shortcuts - ------------------------------------------------------------------------- #} -#sidebar #sidebar-shortcuts { - background: #333; - width: 220px; -} -#sidebar #sidebar-shortcuts .shortcuts { - position: relative; - padding: 16px 10px; -} -#sidebar-shortcuts .icon { - display: block; - float: left; - width: 50px; - margin: 2px 0 0 -10px; - text-align: center; -} -#sidebar #sidebar-shortcuts .btn { - color: #f5f5f5; -} -#sidebar #sidebar-shortcuts .btn + .btn { - margin-left: 5px; -} -#sidebar #sidebar-shortcuts .btn { - padding: .5em; -} - -{# Sidebar Search (the colors of this element don't change based on the selected theme) - ------------------------------------------------------------------------- #} -#sidebar-search .form-group:first-of-type { - padding-top: 20px; -} -#sidebar-search .form-group { - clear: both; - overflow: hidden; - padding-bottom: 10px; -} -#sidebar-search .form-group label { - float: left; - font-size: 13px; - line-height: 24px; - width: 60px; -} -#sidebar-search .form-group input, -#sidebar-search .form-group select { - float: left; - font-size: 13px; - padding: 3px 6px; -} -#sidebar-search .form-group input { - background: #ccc; - border: 1px solid var(--color-muted); - color: #222; - width: 120px; -} -#sidebar-search .form-group select { - color: #222; -} -#sidebar-search .form-group .btn { - float: right; - margin-right: 10px; -} - -{# Sidebar Menu (the colors of this element don't change based on the selected theme) - ------------------------------------------------------------------------- #} -#menu-profiler { - margin: 0; - padding: 0; - list-style-type: none; -} -#menu-profiler li { - position: relative; - margin-bottom: 0; -} -#menu-profiler li a { - border: solid transparent; - border-width: 2px 0; - color: var(--base-3); - display: block; -} -#menu-profiler li a:hover { - text-decoration: none; -} -#menu-profiler li a .label { - background: transparent; - color: #EEE; - display: block; - padding: 8px 10px 8px 50px; - overflow: hidden; - white-space: nowrap; -} -#menu-profiler li a .label .icon { - display: block; - position: absolute; - left: 0; - top: 8px; - width: 50px; - text-align: center; -} -#menu-profiler .label .icon img, -#menu-profiler .label .icon svg { - height: 24px; - max-width: 24px; -} -#menu-profiler li a .label .icon svg path, -#menu-profiler li a .label .icon svg .sf-svg-path { - fill: #DDD; -} -#menu-profiler li a .label strong { - font-size: 16px; - font-weight: normal; -} -#menu-profiler li a .label.disabled { - opacity: .25; -} -#menu-profiler li a:hover .label.disabled, -#menu-profiler li.selected a .label.disabled { - opacity: 1; -} - -#menu-profiler li.selected a, -#menu-profiler:hover li.selected a:hover, -#menu-profiler li a:hover { - background: #666; - border: solid #555; - border-width: 2px 0; -} -#menu-profiler li.selected a .label, -#menu-profiler li a:hover .label { - color: #FFF; -} -#menu-profiler li.selected a .icon svg path, -#menu-profiler li.selected a .icon svg .sf-svg-path, -#menu-profiler li a:hover .icon svg path, -#menu-profiler li a:hover .icon svg .sf-svg-path { - fill: #fff; -} - -#menu-profiler li a .count { - background-color: #666; - color: #fff; - display: inline-block; - font-weight: bold; - min-width: 10px; - padding: 2px 6px; - position: absolute; - right: 10px; - text-align: center; - vertical-align: baseline; - white-space: nowrap; -} -#menu-profiler li a span.count span { - font-size: 12px; - -} -#menu-profiler li a span.count span + span::before { - content: " / "; - color: #AAA; -} - -#menu-profiler .label-status-warning .count { - background: var(--color-warning); -} -#menu-profiler .label-status-error .count { - background: var(--background-error); -} - -{# Timeline panel - ========================================================================= #} -#timeline-control { - background: var(--table-background); - box-shadow: var(--shadow); - margin: 1em 0; - padding: 10px; -} -#timeline-control label { - font-weight: bold; - margin-right: 1em; -} -#timeline-control input { - background: var(--metric-value-background); - border: 1px solid var(--table-border); - font-size: 16px; - padding: 4px; - text-align: right; - width: 5em; -} -#timeline-control .help { - margin-left: 1em; -} - -.sf-profiler-timeline .legends { - font-size: 12px; - line-height: 1.5em; -} -.sf-profiler-timeline + p.help { - margin-top: 0; -} - -{# Tabbed navigation - ========================================================================= #} -.tab-navigation { - margin: 0 0 1em 0; - padding: 0; -} -.tab-navigation li { - background: var(--tab-background); - border: 1px solid var(--table-border); - color: var(--tab-color); - cursor: pointer; - display: inline-block; - font-size: 16px; - margin: 0 0 0 -1px; - padding: .5em .75em; - z-index: 1; -} -.tab-navigation li .badge { - background-color: var(--base-1); - color: var(--base-4); - display: inline-block; - font-size: 14px; - font-weight: bold; - margin-left: 8px; - min-width: 10px; - padding: 1px 6px; - text-align: center; - white-space: nowrap; -} -.tab-navigation li.disabled { - background: var(--tab-disabled-background); - color: var(--tab-disabled-color); -} -.tab-navigation li.active { - background: var(--tab-active-background); - color: var(--tab-active-color); - z-index: 1100; -} -.tab-navigation li.active .badge { - background-color: var(--base-5); - color: var(--base-2); -} -.tab-content > *:first-child { - margin-top: 0; -} -.tab-navigation li .badge.status-warning { background: var(--color-warning); color: #FFF; } -.tab-navigation li .badge.status-error { background: var(--background-error); color: #FFF; } - -.sf-tabs .tab:not(:first-child) { display: none; } - -{# Toggles - ========================================================================= #} -.sf-toggle-content { - -moz-transition: display .25s ease; - -webkit-transition: display .25s ease; - transition: display .25s ease; -} -.sf-toggle-content.sf-toggle-hidden { - display: none; -} -.sf-toggle-content.sf-toggle-visible { - display: block; -} - -{# Filters - ========================================================================= #} -[data-filters] { position: relative; } -[data-filtered] { cursor: pointer; } -[data-filtered]:after { content: '\00a0\25BE'; } -[data-filtered]:hover .filter-list li { display: inline-flex; } -[class*="filter-hidden-"] { display: none; } -.filter-list { position: absolute; border: var(--border); box-shadow: var(--shadow); margin: 0; padding: 0; display: flex; flex-direction: column; } -.filter-list :after { content: ''; } -.filter-list li { - background: var(--tab-disabled-background); - border-bottom: var(--border); - color: var(--tab-disabled-color); - display: none; - list-style: none; - margin: 0; - padding: 5px 10px; - text-align: left; - font-weight: normal; -} -.filter-list li.active { - background: var(--tab-background); - color: var(--tab-color); -} -.filter-list li.last-active { - background: var(--tab-active-background); - color: var(--tab-active-color); -} - -.filter-list-level li { cursor: s-resize; } -.filter-list-level li.active { cursor: n-resize; } -.filter-list-level li.last-active { cursor: default; } -.filter-list-level li.last-active:before { content: '\2714\00a0'; } -.filter-list-choice li:before { content: '\2714\00a0'; color: transparent; } -.filter-list-choice li.active:before { color: unset; } - -{# Twig panel - ========================================================================= #} -#twig-dump pre { - font-size: 12px; - line-height: 1.7; - background-color: var(--base-0); - border: var(--border); - padding: 15px; - box-shadow: 0 0 1px rgba(128, 128, 128, .2); -} -#twig-dump span { - border-radius: 2px; - padding: 1px 2px; -} -#twig-dump .status-error { background: transparent; color: var(--color-error); } -#twig-dump .status-warning { background: rgba(240, 181, 24, 0.3); } -#twig-dump .status-success { background: rgba(100, 189, 99, 0.2); } -#twig-dump .status-info { background: var(--info-background); } - -#twig-table tbody td { - vertical-align: middle; -} -#twig-table tbody td > a { - margin-left: -5px; -} -#twig-table tbody td div { - margin: 0; -} - -.icon-twig { - vertical-align: text-bottom; -} -.icon-twig svg path { - fill: #7eea12; -} - -{# Logger panel - ========================================================================= #} -.badge { - background: var(--badge-background); - border-radius: 4px; - color: var(--badge-color); - font-size: 12px; - font-weight: bold; - padding: 1px 4px; -} -.badge-warning { - background: var(--badge-warning-background); - color: var(--badge-warning-color); -} - -.log-filters { - display: flex; -} -.log-filters .log-filter { - position: relative; -} -.log-filters .log-filter + .log-filter { - margin-left: 15px; -} -.log-filters .log-filter summary { - align-items: center; - background: var(--log-filter-button-background); - border-radius: 2px; - border: 1px solid var(--log-filter-button-border); - color: var(--log-filter-button-color); - cursor: pointer; - display: flex; - padding: 5px 8px; -} -.log-filters .log-filter summary .icon { - height: 18px; - width: 18px; - margin: 0 7px 0 0; -} -.log-filters .log-filter summary svg { - height: 18px; - width: 18px; - opacity: 0.7; -} -.log-filters .log-filter summary .filter-active-num { - color: var(--log-filter-active-num-color); - font-weight: bold; - padding: 0 1px; -} -.log-filter .tab-navigation { - margin-bottom: 0; -} -.log-filter .tab-navigation li:first-child { - border-top-left-radius: 2px; - border-bottom-left-radius: 2px; -} -.log-filter .tab-navigation li:last-child { - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; -} -.log-filter .tab-navigation li { - border-color: var(--log-filter-button-border); - padding: 0; -} -.log-filter .tab-navigation li + li { - margin-left: -5px; -} -.log-filter .tab-navigation li .badge { - font-size: 13px; - padding: 0 6px; -} -.log-filter .tab-navigation li input { - display: none; -} -.log-filter .tab-navigation li label { - align-items: center; - cursor: pointer; - padding: 5px 10px; - display: inline-flex; - font-size: 14px; -} - -.log-filters .log-filter .log-filter-content { - background: var(--base-0); - border: 1px solid var(--table-border); - border-radius: 2px; - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); - padding: 15px; - position: absolute; - left: 0; - top: 36px; - max-width: 400px; - min-width: 200px; - z-index: 9999; -} -.log-filters .log-filter .log-filter-content .log-filter-option { - align-items: center; - display: flex; -} -.log-filter .filter-select-all-or-none { - margin-bottom: 10px; -} -.log-filter .filter-select-all-or-none button + button { - margin-left: 15px; -} -.log-filters .log-filter .log-filter-content .log-filter-option + .log-filter-option { - margin: 7px 0 0; -} -.log-filters .log-filter .log-filter-content .log-filter-option label { - cursor: pointer; - flex: 1; - padding-left: 10px; -} - -table.logs .metadata { - display: block; - font-size: 12px; -} -.theme-dark tr.status-error td, -.theme-dark tr.status-warning td { border-bottom: unset; border-top: unset; } - -table.logs .log-timestamp { - color: var(--log-timestamp-color); -} -table.logs .log-metadata { - margin: 8px 0 0; -} -table.logs .log-metadata > span { - display: inline-block; -} -table.logs .log-metadata > span + span { - margin-left: 10px; -} -table.logs .log-metadata .log-channel { - color: var(--base-1); - font-size: 13px; - font-weight: bold; -} -table.logs .log-metadata .log-num-occurrences { - color: var(--color-muted); - font-size: 13px; -} -.log-type-badge { - display: inline-block; - font-family: var(--font-sans-serif); - margin-top: 5px; -} -.log-type-badge.badge-deprecation { - background: var(--badge-warning-background); - color: var(--badge-warning-color); -} -.log-type-badge.badge-error { - background: var(--badge-danger-background); - color: var(--badge-danger-color); -} -.log-type-badge.badge-silenced { - background: #EDE9FE; - color: #6D28D9; -} -.theme-dark .log-type-badge.badge-silenced { - background: #5B21B6; - color: #EDE9FE; -} - -tr.log-status-warning { - border-left: 4px solid #F59E0B; -} -tr.log-status-error { - border-left: 4px solid #EF4444; -} -tr.log-status-silenced { - border-left: 4px solid #A78BFA; -} - -.container-compilation-logs { - background: var(--table-background); - border: 1px solid var(--base-2); - margin-top: 30px; - padding: 15px; -} -.container-compilation-logs summary { - cursor: pointer; -} -.container-compilation-logs summary h4 { - margin: 0 0 5px; -} -.container-compilation-logs summary p { - margin: 0; -} - -{# Doctrine panel - ========================================================================= #} -.sql-runnable { - background: var(--base-1); - margin: .5em 0; - padding: 1em; -} -.sql-explain { - overflow-x: auto; - max-width: 920px; -} -.sql-explain table td, .sql-explain table tr { - word-break: normal; -} -.queries-table pre { - margin: 0; - white-space: pre-wrap; - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; -} - -{# Security panel - ========================================================================= #} -#collector-content .decision-log .voter_result td { - border-top-width: 1px; - border-bottom-width: 0; - padding-bottom: 0; -} - -#collector-content .decision-log .voter_details td { - border-top-width: 0; - border-bottom-width: 1px; - padding-bottom: 0; -} - -#collector-content .decision-log .voter_details table { - border: 0; - margin: 0; - box-shadow: unset; -} - -#collector-content .decision-log .voter_details table td { - border: 0; - padding: 0 0 8px 0; -} - -{# Validator panel - ========================================================================= #} - -#collector-content .sf-validator { - margin-bottom: 2em; -} - -#collector-content .sf-validator .sf-validator-context, -#collector-content .sf-validator .trace { - border: var(--border); - background: var(--base-0); - padding: 10px; - margin: 0.5em 0; - overflow: auto; -} -#collector-content .sf-validator .trace { - font-size: 12px; -} -#collector-content .sf-validator .trace li { - margin-bottom: 0; - padding: 0; -} -#collector-content .sf-validator .trace li.selected { - background: var(--highlight-selected-line); -} - -{# Messenger panel - ========================================================================= #} - -#collector-content .message-bus .trace { - border: var(--border); - background: var(--base-0); - padding: 10px; - margin: 0.5em 0; - overflow: auto; -} -#collector-content .message-bus .trace { - font-size: 12px; -} -#collector-content .message-bus .trace li { - margin-bottom: 0; - padding: 0; -} -#collector-content .message-bus .trace li.selected { - background: var(--highlight-selected-line); -} - -{# Dump panel - ========================================================================= #} -pre.sf-dump, pre.sf-dump .sf-dump-default { - z-index: 1000 !important; -} - -#collector-content .sf-dump { - margin-bottom: 2em; -} -#collector-content pre.sf-dump, -#collector-content .sf-dump code, -#collector-content .sf-dump samp { - font-family: monospace; - font-size: 13px; -} -#collector-content .sf-dump a { - cursor: pointer; -} -#collector-content .sf-dump pre.sf-dump, -#collector-content .sf-dump .trace { - border: var(--border); - padding: 10px; - margin: 0.5em 0; - overflow: auto; -} - -#collector-content pre.sf-dump, -#collector-content .sf-dump-default { - background: none; -} -#collector-content .sf-dump-ellipsis { max-width: 100em; } - -#collector-content .sf-dump { - margin: 0; - padding: 0; - line-height: 1.4; -} - -#collector-content .dump-inline .sf-dump { - display: inline; - white-space: normal; - font-size: inherit; - line-height: inherit; -} -#collector-content .dump-inline .sf-dump:after { - display: none; -} - -#collector-content .sf-dump .trace { - font-size: 12px; -} -#collector-content .sf-dump .trace li { - margin-bottom: 0; - padding: 0; -} - -{# Search Results page - ========================================================================= #} -#search-results td { - font-family: var(--font-sans-serif); - vertical-align: middle; -} - -#search-results .sf-search { - visibility: hidden; - margin-left: 2px; -} -#search-results tr:hover .sf-search { - visibility: visible; -} - -{# Small screens - ========================================================================= #} - -.visible-small { - display: none; -} -.hidden-small { - display: inherit; -} - -@media (max-width: 768px) { - #sidebar { - flex-basis: 50px; - overflow-x: hidden; - transition: flex-basis 200ms ease-out; - } - #sidebar:hover, #sidebar.expanded { - flex-basis: 220px; - } - - #sidebar-search { - display: none; - } - #sidebar:hover #sidebar-search.sf-toggle-visible, #sidebar.expanded #sidebar-search.sf-toggle-visible { - display: block; - } - - #sidebar .module { - display: none; - } - #sidebar:hover .module, #sidebar.expanded .module { - display: block; - } - - #sidebar:not(:hover):not(.expanded) .label .count { - border-radius: 50%; - border: 1px solid #eee; - height: 8px; - min-width: 0; - padding: 0; - right: 4px; - text-indent: -9999px; - top: 50%; - width: 8px; - } - - .visible-small { - display: inherit; - } - .hidden-small { - display: none; - } - - .btn-sm svg { - margin-left: 2px; - } -} - -{# Config Options - ========================================================================= #} -body.width-full .container { - max-width: 100%; -} - -body.theme-light #collector-content .sf-dump pre.sf-dump, -body.theme-light #collector-content .sf-dump .trace { - background: #FFF; -} -body.theme-light #collector-content pre.sf-dump, -body.theme-light #collector-content .sf-dump-default { - color: #CC7832; -} -body.theme-light #collector-content .sf-dump-str { color: #629755; } -body.theme-light #collector-content .sf-dump-private, -body.theme-light #collector-content .sf-dump-protected, -body.theme-light #collector-content .sf-dump-public { color: #262626; } -body.theme-light #collector-content .sf-dump-note { color: #6897BB; } -body.theme-light #collector-content .sf-dump-key { color: #789339; } -body.theme-light #collector-content .sf-dump-ref { color: #6E6E6E; } -body.theme-light #collector-content .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } -body.theme-light #collector-content .sf-dump-ellipsis-path { max-width: 5em; } -body.theme-light #collector-content .sf-dump .trace li.selected { - background: rgba(255, 255, 153, 0.5); -} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/results.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/results.html.twig deleted file mode 100644 index 7ddbf9c4f..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/results.html.twig +++ /dev/null @@ -1,67 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% macro profile_search_filter(request, result, property) %} - {%- if request.hasSession -%} - {{ include('@WebProfiler/Icon/search.svg') }} - {%- endif -%} -{% endmacro %} - -{% import _self as helper %} - -{% block summary %} -
    -
    -

    Profile Search

    -
    -
    -{% endblock %} - -{% block panel %} -

    {{ tokens ? tokens|length : 'No' }} results found

    - - {% if tokens %} - - - - - - - - - - - - - {% for result in tokens %} - {% set css_class = result.status_code|default(0) > 399 ? 'status-error' : result.status_code|default(0) > 299 ? 'status-warning' : 'status-success' %} - - - - - - - - - - {% endfor %} - -
    StatusIPMethodURLTimeToken
    - {{ result.status_code|default('n/a') }} - - {{ result.ip }} {{ helper.profile_search_filter(request, result, 'ip') }} - - {{ result.method }} {{ helper.profile_search_filter(request, result, 'method') }} - - {{ result.url }} - {{ helper.profile_search_filter(request, result, 'url') }} - - {{ result.time|date('d-M-Y') }} - {{ result.time|date('H:i:s') }} - {{ result.token }}
    - {% else %} -
    -

    The query returned no result.

    -
    - {% endif %} - -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/search.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/search.html.twig deleted file mode 100644 index 7494b4ec7..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/search.html.twig +++ /dev/null @@ -1,56 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/settings.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/settings.html.twig deleted file mode 100644 index 4b2394687..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/settings.html.twig +++ /dev/null @@ -1,193 +0,0 @@ - - -Settings - - - - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/table.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/table.html.twig deleted file mode 100644 index cb9986bd2..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/table.html.twig +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - {% for key in data|keys|sort %} - - - - - {% endfor %} - -
    {{ labels is defined ? labels[0] : 'Key' }}{{ labels is defined ? labels[1] : 'Value' }}
    {{ key }}{{ profiler_dump(data[key]) }}
    diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.css.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.css.twig deleted file mode 100644 index 5e675b960..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.css.twig +++ /dev/null @@ -1,562 +0,0 @@ -{# when updating any of these colors, do the same in profiler.css.twig #} -{% set colors = { 'success': '#4F805D', 'warning': '#A46A1F', 'error': '#B0413E' } %} - -.sf-minitoolbar { - background-color: #222; - border-top-left-radius: 4px; - bottom: 0; - box-sizing: border-box; - display: none; - height: 36px; - padding: 6px; - position: fixed; - right: 0; - z-index: 99999; -} - -.sf-minitoolbar button { - background-color: transparent; - padding: 0; - border: none; -} -.sf-minitoolbar svg, -.sf-minitoolbar img { - max-height: 24px; - max-width: 24px; - display: inline; -} - -.sf-toolbar-clearer { - clear: both; - height: 36px; -} - -.sf-display-none { - display: none; -} - -.sf-toolbarreset * { - box-sizing: content-box; - vertical-align: baseline; - letter-spacing: normal; - width: auto; -} - -.sf-toolbarreset { - background-color: #222; - bottom: 0; - box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - color: #EEE; - font: 11px Arial, sans-serif; - left: 0; - margin: 0; - padding: 0 36px 0 0; - position: fixed; - right: 0; - text-align: left; - text-transform: none; - z-index: 99999; - direction: ltr; - - /* neutralize the aliasing defined by external CSS styles */ - -webkit-font-smoothing: subpixel-antialiased; - -moz-osx-font-smoothing: auto; -} -.sf-toolbarreset abbr { - border: dashed #777; - border-width: 0 0 1px; -} -.sf-toolbarreset svg, -.sf-toolbarreset img { - height: 20px; - width: 20px; - display: inline-block; -} - -.sf-toolbarreset .sf-cancel-button { - color: #444; -} - -.sf-toolbarreset .hide-button { - background: #444; - display: block; - position: absolute; - top: 0; - right: 0; - width: 36px; - height: 36px; - cursor: pointer; - text-align: center; - border: none; - margin: 0; - padding: 0; -} -.sf-toolbarreset .hide-button svg { - max-height: 18px; - margin-top: 1px; -} - -.sf-toolbar-block { - cursor: default; - display: block; - float: left; - height: 36px; - margin-right: 0; - white-space: nowrap; - max-width: 15%; -} -.sf-toolbar-block > a, -.sf-toolbar-block > a:hover { - display: block; - text-decoration: none; - background-color: transparent; - color: inherit; -} - -.sf-toolbar-block span { - display: inline-block; -} -.sf-toolbar-block .sf-toolbar-value { - color: #F5F5F5; - font-size: 13px; - line-height: 36px; - padding: 0; -} -.sf-toolbar-block .sf-toolbar-label, -.sf-toolbar-block .sf-toolbar-class-separator { - color: #AAA; - font-size: 12px; -} - -.sf-toolbar-block .sf-toolbar-info { - border-collapse: collapse; - display: table; - z-index: 100000; -} -.sf-toolbar-block hr { - border-top: 1px solid #777; - margin: 4px 0; - padding-top: 4px; -} -.sf-toolbar-block .sf-toolbar-info-piece { - /* this 'border-bottom' trick is needed because 'margin-bottom' doesn't work for table rows */ - border-bottom: solid transparent 3px; - display: table-row; -} -.sf-toolbar-block .sf-toolbar-info-piece-additional, -.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { - display: none; -} -.sf-toolbar-block .sf-toolbar-info-group { - margin-bottom: 4px; - padding-bottom: 2px; - border-bottom: 1px solid #333333; -} -.sf-toolbar-block .sf-toolbar-info-group:last-child { - margin-bottom: 0; - padding-bottom: 0; - border-bottom: none; -} - -.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { - padding: 2px 5px; - margin-bottom: 0; -} -.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status + .sf-toolbar-status { - margin-left: 4px; -} - -.sf-toolbar-block .sf-toolbar-info-piece:last-child { - margin-bottom: 0; -} - -div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece a { - color: #99CDD8; - text-decoration: underline; -} -div.sf-toolbar .sf-toolbar-block a:hover { - text-decoration: none; -} - -.sf-toolbar-block .sf-toolbar-info-piece b { - color: #AAA; - display: table-cell; - font-size: 11px; - padding: 4px 8px 4px 0; -} -.sf-toolbar-block:not(.sf-toolbar-block-dump) .sf-toolbar-info-piece span { - color: #F5F5F5; -} -.sf-toolbar-block .sf-toolbar-info-piece span { - font-size: 12px; -} - -.sf-toolbar-block .sf-toolbar-info { - background-color: #444; - bottom: 36px; - color: #F5F5F5; - display: none; - padding: 9px 0; - position: absolute; -} - -.sf-toolbar-block .sf-toolbar-info:empty { - visibility: hidden; -} - -.sf-toolbar-block .sf-toolbar-status { - display: inline-block; - color: #FFF; - background-color: #666; - padding: 3px 6px; - margin-bottom: 2px; - vertical-align: middle; - min-width: 15px; - min-height: 13px; - text-align: center; -} - -.sf-toolbar-block .sf-toolbar-status-green { - background-color: {{ colors.success|raw }}; -} -.sf-toolbar-block .sf-toolbar-status-red { - background-color: {{ colors.error|raw }}; -} -.sf-toolbar-block .sf-toolbar-status-yellow { - background-color: {{ colors.warning|raw }}; -} - -.sf-toolbar-block.sf-toolbar-status-green { - background-color: {{ colors.success|raw }}; - color: #FFF; -} -.sf-toolbar-block.sf-toolbar-status-red { - background-color: {{ colors.error|raw }}; - color: #FFF; -} -.sf-toolbar-block.sf-toolbar-status-yellow { - background-color: {{ colors.warning|raw }}; - color: #FFF; -} - -.sf-toolbar-block-request .sf-toolbar-status { - color: #FFF; - display: inline-block; - font-size: 14px; - height: 36px; - line-height: 36px; - padding: 0 10px; -} -.sf-toolbar-block-request .sf-toolbar-info-piece a { - background-color: transparent; - text-decoration: none; -} -.sf-toolbar-block-request .sf-toolbar-info-piece a:hover { - text-decoration: underline; -} -.sf-toolbar-block-request .sf-toolbar-redirection-status { - font-weight: normal; - padding: 2px 4px; - line-height: 18px; -} -.sf-toolbar-block-request .sf-toolbar-info-piece span.sf-toolbar-redirection-method { - font-size: 12px; - height: 17px; - line-height: 17px; - margin-right: 5px; -} - -.sf-toolbar-block-ajax .sf-toolbar-icon { - cursor: pointer; -} - -.sf-toolbar-status-green .sf-toolbar-label, -.sf-toolbar-status-yellow .sf-toolbar-label, -.sf-toolbar-status-red .sf-toolbar-label { - color: #FFF; -} -.sf-toolbar-status-green svg path, -.sf-toolbar-status-green svg .sf-svg-path, -.sf-toolbar-status-red svg path, -.sf-toolbar-status-red svg .sf-svg-path, -.sf-toolbar-status-yellow svg path, -.sf-toolbar-status-yellow svg .sf-svg-path { - fill: #FFF; -} -.sf-toolbar-block-config svg path, -.sf-toolbar-block-config svg .sf-svg-path { - fill: #FFF; -} - -.sf-toolbar-block .sf-toolbar-icon { - display: block; - height: 36px; - padding: 0 7px; - overflow: hidden; - text-overflow: ellipsis; -} -.sf-toolbar-block-request .sf-toolbar-icon { - padding-left: 0; - padding-right: 0; -} - -.sf-toolbar-block .sf-toolbar-icon img, -.sf-toolbar-block .sf-toolbar-icon svg { - border-width: 0; - position: relative; - top: 8px; - vertical-align: baseline; -} - -.sf-toolbar-block .sf-toolbar-icon img + span, -.sf-toolbar-block .sf-toolbar-icon svg + span { - margin-left: 4px; -} -.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-value { - margin-left: 4px; -} - -.sf-toolbar-block:hover, -.sf-toolbar-block.hover { - position: relative; -} -.sf-toolbar-block:hover .sf-toolbar-icon, -.sf-toolbar-block.hover .sf-toolbar-icon { - background-color: #444; - position: relative; - z-index: 10002; -} -.sf-toolbar-block-ajax.hover .sf-toolbar-info { - z-index: 10001; -} -.sf-toolbar-block:hover .sf-toolbar-info, -.sf-toolbar-block.hover .sf-toolbar-info { - display: block; - padding: 10px; - max-width: 525px; - max-height: 480px; - word-wrap: break-word; - overflow: hidden; - overflow-y: auto; -} -.sf-toolbar-info-piece b.sf-toolbar-ajax-info { - color: #F5F5F5; -} -.sf-toolbar-ajax-requests { - table-layout: auto; - width: 100%; -} -.sf-toolbar-ajax-requests td { - background-color: #444; - border-bottom: 1px solid #777; - color: #F5F5F5; - font-size: 12px; - padding: 4px; -} -.sf-toolbar-ajax-requests tr:last-child td { - border-bottom: 0; -} -.sf-toolbar-ajax-requests th { - background-color: #222; - border-bottom: 0; - color: #AAA; - font-size: 11px; - padding: 4px; -} -.sf-ajax-request-url { - max-width: 250px; - line-height: 9px; - overflow: hidden; - text-overflow: ellipsis; -} -.sf-toolbar-ajax-requests .sf-ajax-request-url a { - text-decoration: none; -} -.sf-toolbar-ajax-requests .sf-ajax-request-url a:hover { - text-decoration: underline; -} -.sf-ajax-request-duration { - text-align: right; -} -.sf-ajax-request-loading { - animation: sf-blink .5s ease-in-out infinite; -} -@keyframes sf-blink { - 0% { background: #222; } - 50% { background: #444; } - 100% { background: #222; } -} - -.sf-toolbar-block.sf-toolbar-block-dump .sf-toolbar-info { - max-width: none; - width: 100%; - position: fixed; - box-sizing: border-box; - left: 0; -} - -.sf-toolbar-block-dump pre.sf-dump { - background-color: #222; - border-color: #777; - border-radius: 0; - margin: 6px 0 12px 0; -} -.sf-toolbar-block-dump pre.sf-dump:last-child { - margin-bottom: 0; -} -.sf-toolbar-block-dump pre.sf-dump .sf-dump-search-wrapper { - margin-bottom: 5px; -} -.sf-toolbar-block-dump pre.sf-dump span.sf-dump-search-count { - color: #333; - font-size: 12px; -} -.sf-toolbar-block-dump .sf-toolbar-info-piece { - display: block; -} -.sf-toolbar-block-dump .sf-toolbar-info-piece .sf-toolbar-file-line { - color: #AAA; - margin-left: 4px; -} -.sf-toolbar-block-dump .sf-toolbar-info img { - display: none; -} - -/* Responsive Design */ -.sf-toolbar-icon .sf-toolbar-label, -.sf-toolbar-icon .sf-toolbar-value { - display: none; -} -.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label { - display: inline-block; -} - -/* Legacy Design - these styles are maintained to make old panels look - a bit better on the new toolbar */ -.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { - color: #AAA; - font-size: 12px; -} -.sf-toolbar-status-green .sf-toolbar-info-piece-additional-detail, -.sf-toolbar-status-yellow .sf-toolbar-info-piece-additional-detail, -.sf-toolbar-status-red .sf-toolbar-info-piece-additional-detail { - color: #FFF; -} - -@media (min-width: 768px) { - - .sf-toolbar-icon .sf-toolbar-label, - .sf-toolbar-icon .sf-toolbar-value { - display: inline; - } - - .sf-toolbar-block .sf-toolbar-icon img, - .sf-toolbar-block .sf-toolbar-icon svg { - top: 6px; - } - .sf-toolbar-block-time .sf-toolbar-icon svg, - .sf-toolbar-block-memory .sf-toolbar-icon svg { - display: none; - } - .sf-toolbar-block-time .sf-toolbar-icon svg + span, - .sf-toolbar-block-memory .sf-toolbar-icon svg + span { - margin-left: 0; - } - - .sf-toolbar-block .sf-toolbar-icon { - padding: 0 10px; - } - .sf-toolbar-block-time .sf-toolbar-icon { - padding-right: 5px; - } - .sf-toolbar-block-memory .sf-toolbar-icon { - padding-left: 5px; - } - .sf-toolbar-block-request .sf-toolbar-icon { - padding-left: 0; - padding-right: 0; - } - .sf-toolbar-block-request .sf-toolbar-label { - margin-left: 5px; - } - .sf-toolbar-block-request .sf-toolbar-status + svg { - margin-left: 5px; - } - .sf-toolbar-block-request .sf-toolbar-icon svg + .sf-toolbar-label { - margin-left: 0; - } - .sf-toolbar-block-request .sf-toolbar-label + .sf-toolbar-value { - margin-right: 10px; - } - - .sf-toolbar-block-request:hover .sf-toolbar-info { - max-width: none; - } - - .sf-toolbar-block .sf-toolbar-info-piece b { - font-size: 12px; - } - .sf-toolbar-block .sf-toolbar-info-piece span { - font-size: 13px; - } - - .sf-toolbar-block-right { - float: right; - margin-left: 0; - margin-right: 0; - } -} - -@media (min-width: 1024px) { - .sf-toolbar-block .sf-toolbar-info-piece-additional, - .sf-toolbar-block .sf-toolbar-info-piece-additional-detail { - display: inline; - } - - .sf-toolbar-block .sf-toolbar-info-piece-additional:empty, - .sf-toolbar-block .sf-toolbar-info-piece-additional-detail:empty { - display: none; - } -} - -/***** Error Toolbar *****/ -.sf-error-toolbar .sf-toolbarreset { - background: #222; - color: #f5f5f5; - font: 13px/36px Arial, sans-serif; - height: 36px; - padding: 0 15px; - text-align: left; -} - -.sf-error-toolbar .sf-toolbarreset svg { - height: auto; -} - -.sf-error-toolbar .sf-toolbarreset a { - color: #99cdd8; - margin-left: 5px; - text-decoration: underline; -} - -.sf-error-toolbar .sf-toolbarreset a:hover { - text-decoration: none; -} - -.sf-error-toolbar .sf-toolbarreset .sf-toolbar-icon { - float: left; - padding: 5px 0; - margin-right: 10px; -} - -.sf-full-stack { - left: 0px; - font-size: 12px; -} - -/***** Media query print: Do not print the Toolbar. *****/ -@media print { - .sf-toolbar { - display: none !important; - } -} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.html.twig deleted file mode 100644 index 236fc70da..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.html.twig +++ /dev/null @@ -1,46 +0,0 @@ - -
    - -
    -
    - -
    - {% for name, template in templates %} - {% if block('toolbar', template) is defined %} - {% with { - collector: profile ? profile.getcollector(name) : null, - profiler_url: profiler_url, - token: token ?? (profile ? profile.token : null), - name: name, - profiler_markup_version: profiler_markup_version, - csp_script_nonce: csp_script_nonce, - csp_style_nonce: csp_style_nonce - } %} - {{ block('toolbar', template) }} - {% endwith %} - {% endif %} - {% endfor %} - {% if full_stack %} -
    -
    - Using symfony/symfony is NOT supported -
    -
    -

    This project is using Symfony via the "symfony/symfony" package.

    -

    This is NOT supported anymore since Symfony 4.0.

    -

    Even if it seems to work well, it has some important limitations with no workarounds.

    -

    Using this package also makes your project slower.

    - - Please, stop using this package and replace it with individual packages instead. -
    -
    -
    - {% endif %} - - -
    - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_item.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_item.html.twig deleted file mode 100644 index d81e87797..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_item.html.twig +++ /dev/null @@ -1,6 +0,0 @@ -
    - {% if link is not defined or link %}{% endif %} -
    {{ icon|default('') }}
    - {% if link|default(false) %}
    {% endif %} -
    {{ text|default('') }}
    -
    diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_js.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_js.html.twig deleted file mode 100644 index 352fbb0ea..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_js.html.twig +++ /dev/null @@ -1,21 +0,0 @@ -
    - {% include('@WebProfiler/Profiler/toolbar.html.twig') with { - templates: { - 'request': '@WebProfiler/Profiler/cancel.html.twig' - }, - profile: null, - profiler_url: url('_profiler', {token: token}), - profiler_markup_version: 2, - } %} -
    - -{{ include('@WebProfiler/Profiler/base_js.html.twig') }} - - - {{ include('@WebProfiler/Profiler/toolbar.css.twig') }} - -/**/ diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_redirect.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_redirect.html.twig deleted file mode 100644 index 18d43b225..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_redirect.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -{% extends '@WebProfiler/Profiler/base.html.twig' %} - -{% block title 'Redirection Intercepted' %} - -{% block body %} -
    -
    -

    This request redirects to {{ location }}.

    - -

    - - The redirect was intercepted by the web debug toolbar to help debugging. - For more information, see the "intercept-redirects" option of the Profiler. - -

    -
    -
    -{% endblock %} diff --git a/lib/symfony/web-profiler-bundle/Resources/views/Router/panel.html.twig b/lib/symfony/web-profiler-bundle/Resources/views/Router/panel.html.twig deleted file mode 100644 index 41636d144..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/Router/panel.html.twig +++ /dev/null @@ -1,71 +0,0 @@ -

    Routing

    - -
    -
    - {{ request.route ?: '(none)' }} - Matched route -
    -
    - -{% if request.route %} -

    Route Parameters

    - - {% if request.routeParams is empty %} -
    -

    No parameters.

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/table.html.twig', { data: request.routeParams, labels: ['Name', 'Value'] }, with_context = false) }} - {% endif %} -{% endif %} - -{% if router.redirect %} -

    Route Redirection

    - -

    This page redirects to:

    -
    - {{ router.targetUrl }} - {% if router.targetRoute %}(route: "{{ router.targetRoute }}"){% endif %} -
    -{% endif %} - -

    Route Matching Logs

    - -
    - Path to match: {{ request.pathinfo }} -
    - - - - - - - - - - - - {% for trace in traces %} - - - - - - - {% endfor %} - -
    #Route namePathLog
    {{ loop.index }}{{ trace.name }}{{ trace.path }} - {% if trace.level == 1 %} - Path almost matches, but - {{ trace.log }} - {% elseif trace.level == 2 %} - {{ trace.log }} - {% else %} - Path does not match - {% endif %} -
    - -

    - Note: These matching logs are based on the current router configuration, - which might differ from the configuration used when profiling this request. -

    diff --git a/lib/symfony/web-profiler-bundle/Resources/views/images/icon-minus-square.svg b/lib/symfony/web-profiler-bundle/Resources/views/images/icon-minus-square.svg deleted file mode 100644 index 471c2741c..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/images/icon-minus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Resources/views/images/icon-plus-square.svg b/lib/symfony/web-profiler-bundle/Resources/views/images/icon-plus-square.svg deleted file mode 100644 index 2f5c3b358..000000000 --- a/lib/symfony/web-profiler-bundle/Resources/views/images/icon-plus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php b/lib/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php deleted file mode 100644 index b5f0f3cad..000000000 --- a/lib/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Twig; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Twig\Environment; -use Twig\Extension\ProfilerExtension; -use Twig\Profiler\Profile; -use Twig\TwigFunction; - -/** - * Twig extension for the profiler. - * - * @author Fabien Potencier - * - * @internal - */ -class WebProfilerExtension extends ProfilerExtension -{ - /** - * @var HtmlDumper - */ - private $dumper; - - /** - * @var resource - */ - private $output; - - /** - * @var int - */ - private $stackLevel = 0; - - public function __construct(HtmlDumper $dumper = null) - { - $this->dumper = $dumper ?? new HtmlDumper(); - $this->dumper->setOutput($this->output = fopen('php://memory', 'r+')); - } - - public function enter(Profile $profile): void - { - ++$this->stackLevel; - } - - public function leave(Profile $profile): void - { - if (0 === --$this->stackLevel) { - $this->dumper->setOutput($this->output = fopen('php://memory', 'r+')); - } - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('profiler_dump', [$this, 'dumpData'], ['is_safe' => ['html'], 'needs_environment' => true]), - new TwigFunction('profiler_dump_log', [$this, 'dumpLog'], ['is_safe' => ['html'], 'needs_environment' => true]), - ]; - } - - public function dumpData(Environment $env, Data $data, int $maxDepth = 0) - { - $this->dumper->setCharset($env->getCharset()); - $this->dumper->dump($data, null, [ - 'maxDepth' => $maxDepth, - ]); - - $dump = stream_get_contents($this->output, -1, 0); - rewind($this->output); - ftruncate($this->output, 0); - - return str_replace("\n$1"', $message); - - $replacements = []; - foreach ($context ?? [] as $k => $v) { - $k = '{'.twig_escape_filter($env, $k).'}'; - if (str_contains($message, $k)) { - $replacements[$k] = $v; - } - } - - if (!$replacements) { - return ''.$message.''; - } - - foreach ($replacements as $k => $v) { - $replacements['"'.$k.'"'] = $replacements['"'.$k.'"'] = $replacements[$k] = $this->dumpData($env, $v); - } - - return ''.strtr($message, $replacements).''; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'profiler'; - } -} diff --git a/lib/symfony/web-profiler-bundle/WebProfilerBundle.php b/lib/symfony/web-profiler-bundle/WebProfilerBundle.php deleted file mode 100644 index 7fcc4ec47..000000000 --- a/lib/symfony/web-profiler-bundle/WebProfilerBundle.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle; - -use Symfony\Component\HttpKernel\Bundle\Bundle; - -/** - * @author Fabien Potencier - */ -class WebProfilerBundle extends Bundle -{ - public function boot() - { - if ('prod' === $this->container->getParameter('kernel.environment')) { - @trigger_error('Using WebProfilerBundle in production is not supported and puts your project at risk, disable it.', \E_USER_WARNING); - } - } -} diff --git a/lib/symfony/web-profiler-bundle/composer.json b/lib/symfony/web-profiler-bundle/composer.json deleted file mode 100644 index 3f67bb6ff..000000000 --- a/lib/symfony/web-profiler-bundle/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "symfony/web-profiler-bundle", - "type": "symfony-bundle", - "description": "Provides a development tool that gives detailed information about the execution of any request", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.3|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/polyfill-php80": "^1.16", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "require-dev": { - "symfony/browser-kit": "^4.4|^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "conflict": { - "symfony/form": "<4.4", - "symfony/mailer": "<5.4", - "symfony/messenger": "<4.4", - "symfony/dependency-injection": "<5.2" - }, - "autoload": { - "psr-4": { "Symfony\\Bundle\\WebProfilerBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/lib/symfony/yaml/CHANGELOG.md b/lib/symfony/yaml/CHANGELOG.md deleted file mode 100644 index b9561b2af..000000000 --- a/lib/symfony/yaml/CHANGELOG.md +++ /dev/null @@ -1,237 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add new `lint:yaml dirname --exclude=/dirname/foo.yaml --exclude=/dirname/bar.yaml` - option to exclude one or more specific files from multiple file list - * Allow negatable for the parse tags option with `--no-parse-tags` - -5.3 ---- - - * Added `github` format support & autodetection to render errors as annotations - when running the YAML linter command in a Github Action environment. - -5.1.0 ------ - - * Added support for parsing numbers prefixed with `0o` as octal numbers. - * Deprecated support for parsing numbers starting with `0` as octal numbers. They will be parsed as strings as of Symfony 6.0. Prefix numbers with `0o` - so that they are parsed as octal numbers. - - Before: - - ```yaml - Yaml::parse('072'); - ``` - - After: - - ```yaml - Yaml::parse('0o72'); - ``` - - * Added `yaml-lint` binary. - * Deprecated using the `!php/object` and `!php/const` tags without a value. - -5.0.0 ------ - - * Removed support for mappings inside multi-line strings. - * removed support for implicit STDIN usage in the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit. - -4.4.0 ------ - - * Added support for parsing the inline notation spanning multiple lines. - * Added support to dump `null` as `~` by using the `Yaml::DUMP_NULL_AS_TILDE` flag. - * deprecated accepting STDIN implicitly when using the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit. - -4.3.0 ------ - - * Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0. - -4.2.0 ------ - - * added support for multiple files or directories in `LintCommand` - -4.0.0 ------ - - * The behavior of the non-specific tag `!` is changed and now forces - non-evaluating your values. - * complex mappings will throw a `ParseException` - * support for the comma as a group separator for floats has been dropped, use - the underscore instead - * support for the `!!php/object` tag has been dropped, use the `!php/object` - tag instead - * duplicate mapping keys throw a `ParseException` - * non-string mapping keys throw a `ParseException`, use the `Yaml::PARSE_KEYS_AS_STRINGS` - flag to cast them to strings - * `%` at the beginning of an unquoted string throw a `ParseException` - * mappings with a colon (`:`) that is not followed by a whitespace throw a - `ParseException` - * the `Dumper::setIndentation()` method has been removed - * being able to pass boolean options to the `Yaml::parse()`, `Yaml::dump()`, - `Parser::parse()`, and `Dumper::dump()` methods to configure the behavior of - the parser and dumper is no longer supported, pass bitmask flags instead - * the constructor arguments of the `Parser` class have been removed - * the `Inline` class is internal and no longer part of the BC promise - * removed support for the `!str` tag, use the `!!str` tag instead - * added support for tagged scalars. - - ```yml - Yaml::parse('!foo bar', Yaml::PARSE_CUSTOM_TAGS); - // returns TaggedValue('foo', 'bar'); - ``` - -3.4.0 ------ - - * added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method - - * the `Dumper`, `Parser`, and `Yaml` classes are marked as final - - * Deprecated the `!php/object:` tag which will be replaced by the - `!php/object` tag (without the colon) in 4.0. - - * Deprecated the `!php/const:` tag which will be replaced by the - `!php/const` tag (without the colon) in 4.0. - - * Support for the `!str` tag is deprecated, use the `!!str` tag instead. - - * Deprecated using the non-specific tag `!` as its behavior will change in 4.0. - It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead. - -3.3.0 ------ - - * Starting an unquoted string with a question mark followed by a space is - deprecated and will throw a `ParseException` in Symfony 4.0. - - * Deprecated support for implicitly parsing non-string mapping keys as strings. - Mapping keys that are no strings will lead to a `ParseException` in Symfony - 4.0. Use quotes to opt-in for keys to be parsed as strings. - - Before: - - ```php - $yaml = << new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT); - ``` - -3.0.0 ------ - - * Yaml::parse() now throws an exception when a blackslash is not escaped - in double-quoted strings - -2.8.0 ------ - - * Deprecated usage of a colon in an unquoted mapping value - * Deprecated usage of @, \`, | and > at the beginning of an unquoted string - * When surrounding strings with double-quotes, you must now escape `\` characters. Not - escaping those characters (when surrounded by double-quotes) is deprecated. - - Before: - - ```yml - class: "Foo\Var" - ``` - - After: - - ```yml - class: "Foo\\Var" - ``` - -2.1.0 ------ - - * Yaml::parse() does not evaluate loaded files as PHP files by default - anymore (call Yaml::enablePhpParsing() to get back the old behavior) diff --git a/lib/symfony/yaml/Command/LintCommand.php b/lib/symfony/yaml/Command/LintCommand.php deleted file mode 100644 index 3ebd570e7..000000000 --- a/lib/symfony/yaml/Command/LintCommand.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Command; - -use Symfony\Component\Console\CI\GithubActionReporter; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser; -use Symfony\Component\Yaml\Yaml; - -/** - * Validates YAML files syntax and outputs encountered errors. - * - * @author Grégoire Pineau - * @author Robin Chalas - */ -class LintCommand extends Command -{ - protected static $defaultName = 'lint:yaml'; - protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors'; - - private $parser; - private $format; - private $displayCorrectFiles; - private $directoryIteratorProvider; - private $isReadableProvider; - - public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null) - { - parent::__construct($name); - - $this->directoryIteratorProvider = $directoryIteratorProvider; - $this->isReadableProvider = $isReadableProvider; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format') - ->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude') - ->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null) - ->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT -the first encountered syntax error. - -You can validates YAML contents passed from STDIN: - - cat filename | php %command.full_name% - - -You can also validate the syntax of a file: - - php %command.full_name% filename - -Or of a whole directory: - - php %command.full_name% dirname - php %command.full_name% dirname --format=json - -You can also exclude one or more specific files: - - php %command.full_name% dirname --exclude="dirname/foo.yaml" --exclude="dirname/bar.yaml" - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $filenames = (array) $input->getArgument('filename'); - $excludes = $input->getOption('exclude'); - $this->format = $input->getOption('format'); - $flags = $input->getOption('parse-tags'); - - if ('github' === $this->format && !class_exists(GithubActionReporter::class)) { - throw new \InvalidArgumentException('The "github" format is only available since "symfony/console" >= 5.3.'); - } - - if (null === $this->format) { - // Autodetect format according to CI environment - $this->format = class_exists(GithubActionReporter::class) && GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'; - } - - $flags = $flags ? Yaml::PARSE_CUSTOM_TAGS : 0; - - $this->displayCorrectFiles = $output->isVerbose(); - - if (['-'] === $filenames) { - return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]); - } - - if (!$filenames) { - throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); - } - - $filesInfo = []; - foreach ($filenames as $filename) { - if (!$this->isReadable($filename)) { - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); - } - - foreach ($this->getFiles($filename) as $file) { - if (!\in_array($file->getPathname(), $excludes, true)) { - $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file); - } - } - } - - return $this->display($io, $filesInfo); - } - - private function validate(string $content, int $flags, string $file = null) - { - $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) { - if (\E_USER_DEPRECATED === $level) { - throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1); - } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; - }); - - try { - $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags); - } catch (ParseException $e) { - return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()]; - } finally { - restore_error_handler(); - } - - return ['file' => $file, 'valid' => true]; - } - - private function display(SymfonyStyle $io, array $files): int - { - switch ($this->format) { - case 'txt': - return $this->displayTxt($io, $files); - case 'json': - return $this->displayJson($io, $files); - case 'github': - return $this->displayTxt($io, $files, true); - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); - } - } - - private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false): int - { - $countFiles = \count($filesInfo); - $erroredFiles = 0; - $suggestTagOption = false; - - if ($errorAsGithubAnnotations) { - $githubReporter = new GithubActionReporter($io); - } - - foreach ($filesInfo as $info) { - if ($info['valid'] && $this->displayCorrectFiles) { - $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - } elseif (!$info['valid']) { - ++$erroredFiles; - $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - $io->text(sprintf(' >> %s', $info['message'])); - - if (false !== strpos($info['message'], 'PARSE_CUSTOM_TAGS')) { - $suggestTagOption = true; - } - - if ($errorAsGithubAnnotations) { - $githubReporter->error($info['message'], $info['file'] ?? 'php://stdin', $info['line']); - } - } - } - - if (0 === $erroredFiles) { - $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles)); - } else { - $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.%s', $countFiles - $erroredFiles, $erroredFiles, $suggestTagOption ? ' Use the --parse-tags option if you want parse custom tags.' : '')); - } - - return min($erroredFiles, 1); - } - - private function displayJson(SymfonyStyle $io, array $filesInfo): int - { - $errors = 0; - - array_walk($filesInfo, function (&$v) use (&$errors) { - $v['file'] = (string) $v['file']; - if (!$v['valid']) { - ++$errors; - } - - if (isset($v['message']) && false !== strpos($v['message'], 'PARSE_CUSTOM_TAGS')) { - $v['message'] .= ' Use the --parse-tags option if you want parse custom tags.'; - } - }); - - $io->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)); - - return min($errors, 1); - } - - private function getFiles(string $fileOrDirectory): iterable - { - if (is_file($fileOrDirectory)) { - yield new \SplFileInfo($fileOrDirectory); - - return; - } - - foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!\in_array($file->getExtension(), ['yml', 'yaml'])) { - continue; - } - - yield $file; - } - } - - private function getParser(): Parser - { - if (!$this->parser) { - $this->parser = new Parser(); - } - - return $this->parser; - } - - private function getDirectoryIterator(string $directory): iterable - { - $default = function ($directory) { - return new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - }; - - if (null !== $this->directoryIteratorProvider) { - return ($this->directoryIteratorProvider)($directory, $default); - } - - return $default($directory); - } - - private function isReadable(string $fileOrDirectory): bool - { - $default = function ($fileOrDirectory) { - return is_readable($fileOrDirectory); - }; - - if (null !== $this->isReadableProvider) { - return ($this->isReadableProvider)($fileOrDirectory, $default); - } - - return $default($fileOrDirectory); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['txt', 'json', 'github']); - } - } -} diff --git a/lib/symfony/yaml/Dumper.php b/lib/symfony/yaml/Dumper.php deleted file mode 100644 index 679d533cb..000000000 --- a/lib/symfony/yaml/Dumper.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Dumper dumps PHP variables to YAML strings. - * - * @author Fabien Potencier - * - * @final - */ -class Dumper -{ - /** - * The amount of spaces to use for indentation of nested nodes. - * - * @var int - */ - protected $indentation; - - public function __construct(int $indentation = 4) - { - if ($indentation < 1) { - throw new \InvalidArgumentException('The indentation must be greater than zero.'); - } - - $this->indentation = $indentation; - } - - /** - * Dumps a PHP value to YAML. - * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The level of indentation (used internally) - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - */ - public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string - { - $output = ''; - $prefix = $indent ? str_repeat(' ', $indent) : ''; - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $input); - } - - if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) { - $output .= $prefix.Inline::dump($input, $flags); - } elseif ($input instanceof TaggedValue) { - $output .= $this->dumpTaggedValue($input, $inline, $indent, $flags, $prefix); - } else { - $dumpAsMap = Inline::isHash($input); - - foreach ($input as $key => $value) { - if ('' !== $output && "\n" !== $output[-1]) { - $output .= "\n"; - } - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) { - // If the first line starts with a space character, the spec requires a blockIndicationIndicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - $blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : ''; - - if (isset($value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) { - $blockChompingIndicator = '+'; - } elseif ("\n" === $value[-1]) { - $blockChompingIndicator = ''; - } else { - $blockChompingIndicator = '-'; - } - - $output .= sprintf('%s%s%s |%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator, $blockChompingIndicator); - - foreach (explode("\n", $value) as $row) { - if ('' === $row) { - $output .= "\n"; - } else { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - } - - continue; - } - - if ($value instanceof TaggedValue) { - $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag()); - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) { - // If the first line starts with a space character, the spec requires a blockIndicationIndicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - $blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : ''; - $output .= sprintf(' |%s', $blockIndentationIndicator); - - foreach (explode("\n", $value->getValue()) as $row) { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - - continue; - } - - if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) { - $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n"; - } else { - $output .= "\n"; - $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags); - } - - continue; - } - - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $value); - } - - $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value); - - $output .= sprintf('%s%s%s%s', - $prefix, - $dumpAsMap ? Inline::dump($key, $flags).':' : '-', - $willBeInlined ? ' ' : "\n", - $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags) - ).($willBeInlined ? "\n" : ''); - } - } - - return $output; - } - - private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix): string - { - $output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag()); - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) { - // If the first line starts with a space character, the spec requires a blockIndicationIndicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - $blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : ''; - $output .= sprintf(' |%s', $blockIndentationIndicator); - - foreach (explode("\n", $value->getValue()) as $row) { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - - return $output; - } - - if ($inline - 1 <= 0 || null === $value->getValue() || \is_scalar($value->getValue())) { - return $output.' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n"; - } - - return $output."\n".$this->dump($value->getValue(), $inline - 1, $indent, $flags); - } -} diff --git a/lib/symfony/yaml/Escaper.php b/lib/symfony/yaml/Escaper.php deleted file mode 100644 index e8090d8c6..000000000 --- a/lib/symfony/yaml/Escaper.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -/** - * Escaper encapsulates escaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Escaper -{ - // Characters that would cause a dumped string to require double quoting. - public const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\x7f|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; - - // Mapping arrays for escaping a double quoted string. The backslash is - // first to ensure proper escaping because str_replace operates iteratively - // on the input arrays. This ordering of the characters avoids the use of strtr, - // which performs more slowly. - private const ESCAPEES = ['\\', '\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\x7f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9", - ]; - private const ESCAPED = ['\\\\', '\\"', '\\\\', '\\"', - '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', - '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', - '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', - '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', - '\\x7f', - '\\N', '\\_', '\\L', '\\P', - ]; - - /** - * Determines if a PHP value would require double quoting in YAML. - * - * @param string $value A PHP value - */ - public static function requiresDoubleQuoting(string $value): bool - { - return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); - } - - /** - * Escapes and surrounds a PHP value with double quotes. - * - * @param string $value A PHP value - */ - public static function escapeWithDoubleQuotes(string $value): string - { - return sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value)); - } - - /** - * Determines if a PHP value would require single quoting in YAML. - * - * @param string $value A PHP value - */ - public static function requiresSingleQuoting(string $value): bool - { - // Determines if a PHP value is entirely composed of a value that would - // require single quoting in YAML. - if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) { - return true; - } - - // Determines if the PHP value contains any single characters that would - // cause it to require single quoting in YAML. - return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` \p{Zs}]/xu', $value); - } - - /** - * Escapes and surrounds a PHP value with single quotes. - * - * @param string $value A PHP value - */ - public static function escapeWithSingleQuotes(string $value): string - { - return sprintf("'%s'", str_replace('\'', '\'\'', $value)); - } -} diff --git a/lib/symfony/yaml/Exception/DumpException.php b/lib/symfony/yaml/Exception/DumpException.php deleted file mode 100644 index cce972f24..000000000 --- a/lib/symfony/yaml/Exception/DumpException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during dumping. - * - * @author Fabien Potencier - */ -class DumpException extends RuntimeException -{ -} diff --git a/lib/symfony/yaml/Exception/ExceptionInterface.php b/lib/symfony/yaml/Exception/ExceptionInterface.php deleted file mode 100644 index 909131684..000000000 --- a/lib/symfony/yaml/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception interface for all exceptions thrown by the component. - * - * @author Fabien Potencier - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/lib/symfony/yaml/Exception/ParseException.php b/lib/symfony/yaml/Exception/ParseException.php deleted file mode 100644 index 8748d2b22..000000000 --- a/lib/symfony/yaml/Exception/ParseException.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Fabien Potencier - */ -class ParseException extends RuntimeException -{ - private $parsedFile; - private $parsedLine; - private $snippet; - private $rawMessage; - - /** - * @param string $message The error message - * @param int $parsedLine The line where the error occurred - * @param string|null $snippet The snippet of code near the problem - * @param string|null $parsedFile The file name where the error occurred - */ - public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null) - { - $this->parsedFile = $parsedFile; - $this->parsedLine = $parsedLine; - $this->snippet = $snippet; - $this->rawMessage = $message; - - $this->updateRepr(); - - parent::__construct($this->message, 0, $previous); - } - - /** - * Gets the snippet of code near the error. - * - * @return string - */ - public function getSnippet() - { - return $this->snippet; - } - - /** - * Sets the snippet of code near the error. - */ - public function setSnippet(string $snippet) - { - $this->snippet = $snippet; - - $this->updateRepr(); - } - - /** - * Gets the filename where the error occurred. - * - * This method returns null if a string is parsed. - * - * @return string - */ - public function getParsedFile() - { - return $this->parsedFile; - } - - /** - * Sets the filename where the error occurred. - */ - public function setParsedFile(string $parsedFile) - { - $this->parsedFile = $parsedFile; - - $this->updateRepr(); - } - - /** - * Gets the line where the error occurred. - * - * @return int - */ - public function getParsedLine() - { - return $this->parsedLine; - } - - /** - * Sets the line where the error occurred. - */ - public function setParsedLine(int $parsedLine) - { - $this->parsedLine = $parsedLine; - - $this->updateRepr(); - } - - private function updateRepr() - { - $this->message = $this->rawMessage; - - $dot = false; - if ('.' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $dot = true; - } - - if (null !== $this->parsedFile) { - $this->message .= sprintf(' in %s', json_encode($this->parsedFile, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); - } - - if ($this->parsedLine >= 0) { - $this->message .= sprintf(' at line %d', $this->parsedLine); - } - - if ($this->snippet) { - $this->message .= sprintf(' (near "%s")', $this->snippet); - } - - if ($dot) { - $this->message .= '.'; - } - } -} diff --git a/lib/symfony/yaml/Exception/RuntimeException.php b/lib/symfony/yaml/Exception/RuntimeException.php deleted file mode 100644 index 3f36b73be..000000000 --- a/lib/symfony/yaml/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Romain Neutron - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/lib/symfony/yaml/Inline.php b/lib/symfony/yaml/Inline.php deleted file mode 100644 index 8118a43ab..000000000 --- a/lib/symfony/yaml/Inline.php +++ /dev/null @@ -1,811 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\DumpException; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Inline implements a YAML parser/dumper for the YAML inline syntax. - * - * @author Fabien Potencier - * - * @internal - */ -class Inline -{ - public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; - - public static $parsedLineNumber = -1; - public static $parsedFilename; - - private static $exceptionOnInvalidType = false; - private static $objectSupport = false; - private static $objectForMap = false; - private static $constantSupport = false; - - public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null) - { - self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); - self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); - self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags); - self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags); - self::$parsedFilename = $parsedFilename; - - if (null !== $parsedLineNumber) { - self::$parsedLineNumber = $parsedLineNumber; - } - } - - /** - * Converts a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior - * @param array $references Mapping of variable names to values - * - * @return mixed - * - * @throws ParseException - */ - public static function parse(string $value = null, int $flags = 0, array &$references = []) - { - self::initialize($flags); - - $value = trim($value); - - if ('' === $value) { - return ''; - } - - if (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); - } - - try { - $i = 0; - $tag = self::parseTag($value, $i, $flags); - switch ($value[$i]) { - case '[': - $result = self::parseSequence($value, $flags, $i, $references); - ++$i; - break; - case '{': - $result = self::parseMapping($value, $flags, $i, $references); - ++$i; - break; - default: - $result = self::parseScalar($value, $flags, null, $i, true, $references); - } - - // some comments are allowed at the end - if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if (null !== $tag && '' !== $tag) { - return new TaggedValue($tag, $result); - } - - return $result; - } finally { - if (isset($mbEncoding)) { - mb_internal_encoding($mbEncoding); - } - } - } - - /** - * Dumps a given PHP variable to a YAML string. - * - * @param mixed $value The PHP variable to convert - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - * - * @throws DumpException When trying to dump PHP resource - */ - public static function dump($value, int $flags = 0): string - { - switch (true) { - case \is_resource($value): - if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { - throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); - } - - return self::dumpNull($flags); - case $value instanceof \DateTimeInterface: - return $value->format('c'); - case $value instanceof \UnitEnum: - return sprintf('!php/const %s::%s', \get_class($value), $value->name); - case \is_object($value): - if ($value instanceof TaggedValue) { - return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags); - } - - if (Yaml::DUMP_OBJECT & $flags) { - return '!php/object '.self::dump(serialize($value)); - } - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) { - $output = []; - - foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); - } - - return sprintf('{ %s }', implode(', ', $output)); - } - - if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { - throw new DumpException('Object support when dumping a YAML file has been disabled.'); - } - - return self::dumpNull($flags); - case \is_array($value): - return self::dumpArray($value, $flags); - case null === $value: - return self::dumpNull($flags); - case true === $value: - return 'true'; - case false === $value: - return 'false'; - case \is_int($value): - return $value; - case is_numeric($value) && false === strpbrk($value, "\f\n\r\t\v"): - $locale = setlocale(\LC_NUMERIC, 0); - if (false !== $locale) { - setlocale(\LC_NUMERIC, 'C'); - } - if (\is_float($value)) { - $repr = (string) $value; - if (is_infinite($value)) { - $repr = str_ireplace('INF', '.Inf', $repr); - } elseif (floor($value) == $value && $repr == $value) { - // Preserve float data type since storing a whole number will result in integer value. - if (false === strpos($repr, 'E')) { - $repr = $repr.'.0'; - } - } - } else { - $repr = \is_string($value) ? "'$value'" : (string) $value; - } - if (false !== $locale) { - setlocale(\LC_NUMERIC, $locale); - } - - return $repr; - case '' == $value: - return "''"; - case self::isBinaryString($value): - return '!!binary '.base64_encode($value); - case Escaper::requiresDoubleQuoting($value): - return Escaper::escapeWithDoubleQuotes($value); - case Escaper::requiresSingleQuoting($value): - case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value): - case Parser::preg_match(self::getHexRegex(), $value): - case Parser::preg_match(self::getTimestampRegex(), $value): - return Escaper::escapeWithSingleQuotes($value); - default: - return $value; - } - } - - /** - * Check if given array is hash or just normal indexed array. - * - * @param array|\ArrayObject|\stdClass $value The PHP array or array-like object to check - */ - public static function isHash($value): bool - { - if ($value instanceof \stdClass || $value instanceof \ArrayObject) { - return true; - } - - $expectedKey = 0; - - foreach ($value as $key => $val) { - if ($key !== $expectedKey++) { - return true; - } - } - - return false; - } - - /** - * Dumps a PHP array to a YAML string. - * - * @param array $value The PHP array to dump - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - */ - private static function dumpArray(array $value, int $flags): string - { - // array - if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) { - $output = []; - foreach ($value as $val) { - $output[] = self::dump($val, $flags); - } - - return sprintf('[%s]', implode(', ', $output)); - } - - // hash - $output = []; - foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); - } - - return sprintf('{ %s }', implode(', ', $output)); - } - - private static function dumpNull(int $flags): string - { - if (Yaml::DUMP_NULL_AS_TILDE & $flags) { - return '~'; - } - - return 'null'; - } - - /** - * Parses a YAML scalar. - * - * @return mixed - * - * @throws ParseException When malformed inline YAML string is parsed - */ - public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null) - { - if (\in_array($scalar[$i], ['"', "'"], true)) { - // quoted scalar - $isQuoted = true; - $output = self::parseQuotedScalar($scalar, $i); - - if (null !== $delimiters) { - $tmp = ltrim(substr($scalar, $i), " \n"); - if ('' === $tmp) { - throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - if (!\in_array($tmp[0], $delimiters)) { - throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - } - } else { - // "normal" string - $isQuoted = false; - - if (!$delimiters) { - $output = substr($scalar, $i); - $i += \strlen($output); - - // remove comments - if (Parser::preg_match('/[ \t]+#/', $output, $match, \PREG_OFFSET_CAPTURE)) { - $output = substr($output, 0, $match[0][1]); - } - } elseif (Parser::preg_match('/^(.*?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) { - $output = $match[1]; - $i += \strlen($output); - $output = trim($output); - } else { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) - if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0] || '%' === $output[0])) { - throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename); - } - - if ($evaluate) { - $output = self::evaluateScalar($output, $flags, $references, $isQuoted); - } - } - - return $output; - } - - /** - * Parses a YAML quoted scalar. - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseQuotedScalar(string $scalar, int &$i = 0): string - { - if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - $output = substr($match[0], 1, -1); - - $unescaper = new Unescaper(); - if ('"' == $scalar[$i]) { - $output = $unescaper->unescapeDoubleQuotedString($output); - } else { - $output = $unescaper->unescapeSingleQuotedString($output); - } - - $i += \strlen($match[0]); - - return $output; - } - - /** - * Parses a YAML sequence. - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseSequence(string $sequence, int $flags, int &$i = 0, array &$references = []): array - { - $output = []; - $len = \strlen($sequence); - ++$i; - - // [foo, bar, ...] - while ($i < $len) { - if (']' === $sequence[$i]) { - return $output; - } - if (',' === $sequence[$i] || ' ' === $sequence[$i]) { - ++$i; - - continue; - } - - $tag = self::parseTag($sequence, $i, $flags); - switch ($sequence[$i]) { - case '[': - // nested sequence - $value = self::parseSequence($sequence, $flags, $i, $references); - break; - case '{': - // nested mapping - $value = self::parseMapping($sequence, $flags, $i, $references); - break; - default: - $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references, $isQuoted); - - // the value can be an array if a reference has been resolved to an array var - if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) { - // embedded mapping? - try { - $pos = 0; - $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references); - } catch (\InvalidArgumentException $e) { - // no, it's not - } - } - - if (!$isQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { - $references[$matches['ref']] = $matches['value']; - $value = $matches['value']; - } - - --$i; - } - - if (null !== $tag && '' !== $tag) { - $value = new TaggedValue($tag, $value); - } - - $output[] = $value; - - ++$i; - } - - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - /** - * Parses a YAML mapping. - * - * @return array|\stdClass - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = []) - { - $output = []; - $len = \strlen($mapping); - ++$i; - $allowOverwrite = false; - - // {foo: bar, bar:foo, ...} - while ($i < $len) { - switch ($mapping[$i]) { - case ' ': - case ',': - case "\n": - ++$i; - continue 2; - case '}': - if (self::$objectForMap) { - return (object) $output; - } - - return $output; - } - - // key - $offsetBeforeKeyParsing = $i; - $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true); - $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false); - - if ($offsetBeforeKeyParsing === $i) { - throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping); - } - - if ('!php/const' === $key) { - $key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false); - $key = self::evaluateScalar($key, $flags); - } - - if (false === $i = strpos($mapping, ':', $i)) { - break; - } - - if (!$isKeyQuoted) { - $evaluatedKey = self::evaluateScalar($key, $flags, $references); - - if ('' !== $key && $evaluatedKey !== $key && !\is_string($evaluatedKey) && !\is_int($evaluatedKey)) { - throw new ParseException('Implicit casting of incompatible mapping keys to strings is not supported. Quote your evaluable mapping keys instead.', self::$parsedLineNumber + 1, $mapping); - } - } - - if (!$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], [' ', ',', '[', ']', '{', '}', "\n"], true))) { - throw new ParseException('Colons must be followed by a space or an indication character (i.e. " ", ",", "[", "]", "{", "}").', self::$parsedLineNumber + 1, $mapping); - } - - if ('<<' === $key) { - $allowOverwrite = true; - } - - while ($i < $len) { - if (':' === $mapping[$i] || ' ' === $mapping[$i] || "\n" === $mapping[$i]) { - ++$i; - - continue; - } - - $tag = self::parseTag($mapping, $i, $flags); - switch ($mapping[$i]) { - case '[': - // nested sequence - $value = self::parseSequence($mapping, $flags, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - foreach ($value as $parsedValue) { - $output += $parsedValue; - } - } elseif ($allowOverwrite || !isset($output[$key])) { - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - break; - case '{': - // nested mapping - $value = self::parseMapping($mapping, $flags, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - break; - default: - $value = self::parseScalar($mapping, $flags, [',', '}', "\n"], $i, null === $tag, $references, $isValueQuoted); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - if (!$isValueQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { - $references[$matches['ref']] = $matches['value']; - $value = $matches['value']; - } - - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - --$i; - } - ++$i; - - continue 2; - } - } - - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - /** - * Evaluates scalars and replaces magic values. - * - * @return mixed - * - * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved - */ - private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null) - { - $isQuotedString = false; - $scalar = trim($scalar); - - if (0 === strpos($scalar, '*')) { - if (false !== $pos = strpos($scalar, '#')) { - $value = substr($scalar, 1, $pos - 2); - } else { - $value = substr($scalar, 1); - } - - // an unquoted * - if (false === $value || '' === $value) { - throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if (!\array_key_exists($value, $references)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - return $references[$value]; - } - - $scalarLower = strtolower($scalar); - - switch (true) { - case 'null' === $scalarLower: - case '' === $scalar: - case '~' === $scalar: - return null; - case 'true' === $scalarLower: - return true; - case 'false' === $scalarLower: - return false; - case '!' === $scalar[0]: - switch (true) { - case 0 === strpos($scalar, '!!str '): - $s = (string) substr($scalar, 6); - - if (\in_array($s[0] ?? '', ['"', "'"], true)) { - $isQuotedString = true; - $s = self::parseQuotedScalar($s); - } - - return $s; - case 0 === strpos($scalar, '! '): - return substr($scalar, 2); - case 0 === strpos($scalar, '!php/object'): - if (self::$objectSupport) { - if (!isset($scalar[12])) { - trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/object tag without a value is deprecated.'); - - return false; - } - - return unserialize(self::parseScalar(substr($scalar, 12))); - } - - if (self::$exceptionOnInvalidType) { - throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return null; - case 0 === strpos($scalar, '!php/const'): - if (self::$constantSupport) { - if (!isset($scalar[11])) { - trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/const tag without a value is deprecated.'); - - return ''; - } - - $i = 0; - if (\defined($const = self::parseScalar(substr($scalar, 11), 0, null, $i, false))) { - return \constant($const); - } - - throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - if (self::$exceptionOnInvalidType) { - throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return null; - case 0 === strpos($scalar, '!!float '): - return (float) substr($scalar, 8); - case 0 === strpos($scalar, '!!binary '): - return self::evaluateBinaryScalar(substr($scalar, 9)); - } - - throw new ParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename); - case preg_match('/^(?:\+|-)?0o(?P[0-7_]++)$/', $scalar, $matches): - $value = str_replace('_', '', $matches['value']); - - if ('-' === $scalar[0]) { - return -octdec($value); - } - - return octdec($value); - case \in_array($scalar[0], ['+', '-', '.'], true) || is_numeric($scalar[0]): - if (Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar)) { - $scalar = str_replace('_', '', $scalar); - } - - switch (true) { - case ctype_digit($scalar): - if (preg_match('/^0[0-7]+$/', $scalar)) { - trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '0o'.substr($scalar, 1)); - - return octdec($scalar); - } - - $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; - case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): - if (preg_match('/^-0[0-7]+$/', $scalar)) { - trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '-0o'.substr($scalar, 2)); - - return -octdec(substr($scalar, 1)); - } - - $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; - case is_numeric($scalar): - case Parser::preg_match(self::getHexRegex(), $scalar): - $scalar = str_replace('_', '', $scalar); - - return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar; - case '.inf' === $scalarLower: - case '.nan' === $scalarLower: - return -log(0); - case '-.inf' === $scalarLower: - return log(0); - case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar): - return (float) str_replace('_', '', $scalar); - case Parser::preg_match(self::getTimestampRegex(), $scalar): - // When no timezone is provided in the parsed date, YAML spec says we must assume UTC. - $time = new \DateTime($scalar, new \DateTimeZone('UTC')); - - if (Yaml::PARSE_DATETIME & $flags) { - return $time; - } - - try { - if (false !== $scalar = $time->getTimestamp()) { - return $scalar; - } - } catch (\ValueError $e) { - // no-op - } - - return $time->format('U'); - } - } - - return (string) $scalar; - } - - private static function parseTag(string $value, int &$i, int $flags): ?string - { - if ('!' !== $value[$i]) { - return null; - } - - $tagLength = strcspn($value, " \t\n[]{},", $i + 1); - $tag = substr($value, $i + 1, $tagLength); - - $nextOffset = $i + $tagLength + 1; - $nextOffset += strspn($value, ' ', $nextOffset); - - if ('' === $tag && (!isset($value[$nextOffset]) || \in_array($value[$nextOffset], [']', '}', ','], true))) { - throw new ParseException('Using the unquoted scalar value "!" is not supported. You must quote it.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - // Is followed by a scalar and is a built-in tag - if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || 'str' === $tag || 'php/const' === $tag || 'php/object' === $tag)) { - // Manage in {@link self::evaluateScalar()} - return null; - } - - $i = $nextOffset; - - // Built-in tags - if ('' !== $tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if ('' !== $tag && !isset($value[$i])) { - throw new ParseException(sprintf('Missing value for tag "%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if ('' === $tag || Yaml::PARSE_CUSTOM_TAGS & $flags) { - return $tag; - } - - throw new ParseException(sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - public static function evaluateBinaryScalar(string $scalar): string - { - $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar)); - - if (0 !== (\strlen($parsedBinaryData) % 4)) { - throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) { - throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return base64_decode($parsedBinaryData, true); - } - - private static function isBinaryString(string $value): bool - { - return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value); - } - - /** - * Gets a regex that matches a YAML date. - * - * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 - */ - private static function getTimestampRegex(): string - { - return <<[0-9][0-9][0-9][0-9]) - -(?P[0-9][0-9]?) - -(?P[0-9][0-9]?) - (?:(?:[Tt]|[ \t]+) - (?P[0-9][0-9]?) - :(?P[0-9][0-9]) - :(?P[0-9][0-9]) - (?:\.(?P[0-9]*))? - (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) - (?::(?P[0-9][0-9]))?))?)? - $~x -EOF; - } - - /** - * Gets a regex that matches a YAML number in hexadecimal notation. - */ - private static function getHexRegex(): string - { - return '~^0x[0-9a-f_]++$~i'; - } -} diff --git a/lib/symfony/yaml/LICENSE b/lib/symfony/yaml/LICENSE deleted file mode 100644 index 008370457..000000000 --- a/lib/symfony/yaml/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2023 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/symfony/yaml/Parser.php b/lib/symfony/yaml/Parser.php deleted file mode 100644 index d8886bb18..000000000 --- a/lib/symfony/yaml/Parser.php +++ /dev/null @@ -1,1305 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Parser parses YAML strings to convert them to PHP arrays. - * - * @author Fabien Potencier - * - * @final - */ -class Parser -{ - public const TAG_PATTERN = '(?P![\w!.\/:-]+)'; - public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; - public const REFERENCE_PATTERN = '#^&(?P[^ ]++) *+(?P.*)#u'; - - private $filename; - private $offset = 0; - private $numberOfParsedLines = 0; - private $totalNumberOfLines; - private $lines = []; - private $currentLineNb = -1; - private $currentLine = ''; - private $refs = []; - private $skippedLineNumbers = []; - private $locallySkippedLineNumbers = []; - private $refsBeingParsed = []; - - /** - * Parses a YAML file into a PHP value. - * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the file could not be read or the YAML is not valid - */ - public function parseFile(string $filename, int $flags = 0) - { - if (!is_file($filename)) { - throw new ParseException(sprintf('File "%s" does not exist.', $filename)); - } - - if (!is_readable($filename)) { - throw new ParseException(sprintf('File "%s" cannot be read.', $filename)); - } - - $this->filename = $filename; - - try { - return $this->parse(file_get_contents($filename), $flags); - } finally { - $this->filename = null; - } - } - - /** - * Parses a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the YAML is not valid - */ - public function parse(string $value, int $flags = 0) - { - if (false === preg_match('//u', $value)) { - throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename); - } - - $this->refs = []; - - $mbEncoding = null; - - if (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('UTF-8'); - } - - try { - $data = $this->doParse($value, $flags); - } finally { - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } - $this->refsBeingParsed = []; - $this->offset = 0; - $this->lines = []; - $this->currentLine = ''; - $this->numberOfParsedLines = 0; - $this->refs = []; - $this->skippedLineNumbers = []; - $this->locallySkippedLineNumbers = []; - $this->totalNumberOfLines = null; - } - - return $data; - } - - private function doParse(string $value, int $flags) - { - $this->currentLineNb = -1; - $this->currentLine = ''; - $value = $this->cleanup($value); - $this->lines = explode("\n", $value); - $this->numberOfParsedLines = \count($this->lines); - $this->locallySkippedLineNumbers = []; - - if (null === $this->totalNumberOfLines) { - $this->totalNumberOfLines = $this->numberOfParsedLines; - } - - if (!$this->moveToNextLine()) { - return null; - } - - $data = []; - $context = null; - $allowOverwrite = false; - - while ($this->isCurrentLineEmpty()) { - if (!$this->moveToNextLine()) { - return null; - } - } - - // Resolves the tag and returns if end of the document - if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, false)) && !$this->moveToNextLine()) { - return new TaggedValue($tag, ''); - } - - do { - if ($this->isCurrentLineEmpty()) { - continue; - } - - // tab? - if ("\t" === $this->currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename); - - $isRef = $mergeNode = false; - if ('-' === $this->currentLine[0] && self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) { - if ($context && 'mapping' == $context) { - throw new ParseException('You cannot define a sequence item when in a mapping.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - $context = 'sequence'; - - if (isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { - $isRef = $matches['ref']; - $this->refsBeingParsed[] = $isRef; - $values['value'] = $matches['value']; - } - - if (isset($values['value'][1]) && '?' === $values['value'][0] && ' ' === $values['value'][1]) { - throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // array - if (isset($values['value']) && 0 === strpos(ltrim($values['value'], ' '), '-')) { - // Inline first child - $currentLineNumber = $this->getRealCurrentLineNb(); - - $sequenceIndentation = \strlen($values['leadspaces']) + 1; - $sequenceYaml = substr($this->currentLine, $sequenceIndentation); - $sequenceYaml .= "\n".$this->getNextEmbedBlock($sequenceIndentation, true); - - $data[] = $this->parseBlock($currentLineNumber, rtrim($sequenceYaml), $flags); - } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { - $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true) ?? '', $flags); - } elseif (null !== $subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags)) { - $data[] = new TaggedValue( - $subTag, - $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $flags) - ); - } else { - if ( - isset($values['leadspaces']) - && ( - '!' === $values['value'][0] - || self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $this->trimTag($values['value']), $matches) - ) - ) { - // this is a compact notation element, add to next block and parse - $block = $values['value']; - if ($this->isNextLineIndented()) { - $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1); - } - - $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $flags); - } else { - $data[] = $this->parseValue($values['value'], $flags, $context); - } - } - if ($isRef) { - $this->refs[$isRef] = end($data); - array_pop($this->refsBeingParsed); - } - } elseif ( - self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P.+))?$#u', rtrim($this->currentLine), $values) - && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"])) - ) { - if ($context && 'sequence' == $context) { - throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - $context = 'mapping'; - - try { - $key = Inline::parseScalar($values['key']); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - if (!\is_string($key) && !\is_int($key)) { - throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string').' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // Convert float keys to strings, to avoid being converted to integers by PHP - if (\is_float($key)) { - $key = (string) $key; - } - - if ('<<' === $key && (!isset($values['value']) || '&' !== $values['value'][0] || !self::preg_match('#^&(?P[^ ]+)#u', $values['value'], $refMatches))) { - $mergeNode = true; - $allowOverwrite = true; - if (isset($values['value'][0]) && '*' === $values['value'][0]) { - $refName = substr(rtrim($values['value']), 1); - if (!\array_key_exists($refName, $this->refs)) { - if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$refName])), $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - $refValue = $this->refs[$refName]; - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $refValue instanceof \stdClass) { - $refValue = (array) $refValue; - } - - if (!\is_array($refValue)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - $data += $refValue; // array union - } else { - if (isset($values['value']) && '' !== $values['value']) { - $value = $values['value']; - } else { - $value = $this->getNextEmbedBlock(); - } - $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags); - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsed instanceof \stdClass) { - $parsed = (array) $parsed; - } - - if (!\is_array($parsed)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if (isset($parsed[0])) { - // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes - // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier - // in the sequence override keys specified in later mapping nodes. - foreach ($parsed as $parsedItem) { - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsedItem instanceof \stdClass) { - $parsedItem = (array) $parsedItem; - } - - if (!\is_array($parsedItem)) { - throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem, $this->filename); - } - - $data += $parsedItem; // array union - } - } else { - // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the - // current mapping, unless the key already exists in it. - $data += $parsed; // array union - } - } - } elseif ('<<' !== $key && isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { - $isRef = $matches['ref']; - $this->refsBeingParsed[] = $isRef; - $values['value'] = $matches['value']; - } - - $subTag = null; - if ($mergeNode) { - // Merge keys - } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { - // hash - // if next line is less indented or equal, then it means that the current value is null - if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - if (null !== $subTag) { - $data[$key] = new TaggedValue($subTag, ''); - } else { - $data[$key] = null; - } - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } else { - // remember the parsed line number here in case we need it to provide some contexts in error messages below - $realCurrentLineNbKey = $this->getRealCurrentLineNb(); - $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags); - if ('<<' === $key) { - $this->refs[$refMatches['ref']] = $value; - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $value instanceof \stdClass) { - $value = (array) $value; - } - - $data += $value; - } elseif ($allowOverwrite || !isset($data[$key])) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if (null !== $subTag) { - $data[$key] = new TaggedValue($subTag, $value); - } else { - $data[$key] = $value; - } - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine); - } - } - } else { - $value = $this->parseValue(rtrim($values['value']), $flags, $context); - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - $data[$key] = $value; - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } - if ($isRef) { - $this->refs[$isRef] = $data[$key]; - array_pop($this->refsBeingParsed); - } - } elseif ('"' === $this->currentLine[0] || "'" === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - return Inline::parse($this->lexInlineQuotedString(), $flags, $this->refs); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } elseif ('{' === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - $parsedMapping = Inline::parse($this->lexInlineMapping(), $flags, $this->refs); - - while ($this->moveToNextLine()) { - if (!$this->isCurrentLineEmpty()) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return $parsedMapping; - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } elseif ('[' === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - $parsedSequence = Inline::parse($this->lexInlineSequence(), $flags, $this->refs); - - while ($this->moveToNextLine()) { - if (!$this->isCurrentLineEmpty()) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return $parsedSequence; - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } else { - // multiple documents are not supported - if ('---' === $this->currentLine) { - throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - if ($deprecatedUsage = (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1])) { - throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // 1-liner optionally followed by newline(s) - if (\is_string($value) && $this->lines[0] === trim($value)) { - try { - $value = Inline::parse($this->lines[0], $flags, $this->refs); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - return $value; - } - - // try to parse the value as a multi-line string as a last resort - if (0 === $this->currentLineNb) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - $value = ''; - - foreach ($this->lines as $line) { - $trimmedLine = trim($line); - if ('#' === ($trimmedLine[0] ?? '')) { - continue; - } - // If the indentation is not consistent at offset 0, it is to be considered as a ParseError - if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if (false !== strpos($line, ': ')) { - throw new ParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if ('' === $trimmedLine) { - $value .= "\n"; - } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { - $value .= ' '; - } - - if ('' !== $trimmedLine && '\\' === substr($line, -1)) { - $value .= ltrim(substr($line, 0, -1)); - } elseif ('' !== $trimmedLine) { - $value .= $trimmedLine; - } - - if ('' === $trimmedLine) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - } elseif ('\\' === substr($line, -1)) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; - } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - } - } - - try { - return Inline::parse(trim($value)); - } catch (ParseException $e) { - // fall-through to the ParseException thrown below - } - } - - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } while ($this->moveToNextLine()); - - if (null !== $tag) { - $data = new TaggedValue($tag, $data); - } - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && 'mapping' === $context && !\is_object($data)) { - $object = new \stdClass(); - - foreach ($data as $key => $value) { - $object->$key = $value; - } - - $data = $object; - } - - return empty($data) ? null : $data; - } - - private function parseBlock(int $offset, string $yaml, int $flags) - { - $skippedLineNumbers = $this->skippedLineNumbers; - - foreach ($this->locallySkippedLineNumbers as $lineNumber) { - if ($lineNumber < $offset) { - continue; - } - - $skippedLineNumbers[] = $lineNumber; - } - - $parser = new self(); - $parser->offset = $offset; - $parser->totalNumberOfLines = $this->totalNumberOfLines; - $parser->skippedLineNumbers = $skippedLineNumbers; - $parser->refs = &$this->refs; - $parser->refsBeingParsed = $this->refsBeingParsed; - - return $parser->doParse($yaml, $flags); - } - - /** - * Returns the current line number (takes the offset into account). - * - * @internal - */ - public function getRealCurrentLineNb(): int - { - $realCurrentLineNumber = $this->currentLineNb + $this->offset; - - foreach ($this->skippedLineNumbers as $skippedLineNumber) { - if ($skippedLineNumber > $realCurrentLineNumber) { - break; - } - - ++$realCurrentLineNumber; - } - - return $realCurrentLineNumber; - } - - /** - * Returns the current line indentation. - */ - private function getCurrentLineIndentation(): int - { - if (' ' !== ($this->currentLine[0] ?? '')) { - return 0; - } - - return \strlen($this->currentLine) - \strlen(ltrim($this->currentLine, ' ')); - } - - /** - * Returns the next embed block of YAML. - * - * @param int|null $indentation The indent level at which the block is to be read, or null for default - * @param bool $inSequence True if the enclosing data structure is a sequence - * - * @throws ParseException When indentation problem are detected - */ - private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string - { - $oldLineIndentation = $this->getCurrentLineIndentation(); - - if (!$this->moveToNextLine()) { - return ''; - } - - if (null === $indentation) { - $newIndent = null; - $movements = 0; - - do { - $EOF = false; - - // empty and comment-like lines do not influence the indentation depth - if ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } else { - $newIndent = $this->getCurrentLineIndentation(); - } - } while (!$EOF && null === $newIndent); - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); - - if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } else { - $newIndent = $indentation; - } - - $data = []; - - if ($this->getCurrentLineIndentation() >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent ?? 0); - } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { - $data[] = $this->currentLine; - } else { - $this->moveToPreviousLine(); - - return ''; - } - - if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) { - // the previous line contained a dash but no item content, this line is a sequence item with the same indentation - // and therefore no nested list or mapping - $this->moveToPreviousLine(); - - return ''; - } - - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - $isItComment = $this->isCurrentLineComment(); - - while ($this->moveToNextLine()) { - if ($isItComment && !$isItUnindentedCollection) { - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - $isItComment = $this->isCurrentLineComment(); - } - - $indent = $this->getCurrentLineIndentation(); - - if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { - $this->moveToPreviousLine(); - break; - } - - if ($this->isCurrentLineBlank()) { - $data[] = substr($this->currentLine, $newIndent); - continue; - } - - if ($indent >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); - } elseif ($this->isCurrentLineComment()) { - $data[] = $this->currentLine; - } elseif (0 == $indent) { - $this->moveToPreviousLine(); - - break; - } else { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return implode("\n", $data); - } - - private function hasMoreLines(): bool - { - return (\count($this->lines) - 1) > $this->currentLineNb; - } - - /** - * Moves the parser to the next line. - */ - private function moveToNextLine(): bool - { - if ($this->currentLineNb >= $this->numberOfParsedLines - 1) { - return false; - } - - $this->currentLine = $this->lines[++$this->currentLineNb]; - - return true; - } - - /** - * Moves the parser to the previous line. - */ - private function moveToPreviousLine(): bool - { - if ($this->currentLineNb < 1) { - return false; - } - - $this->currentLine = $this->lines[--$this->currentLineNb]; - - return true; - } - - /** - * Parses a YAML value. - * - * @param string $value A YAML value - * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior - * @param string $context The parser context (either sequence or mapping) - * - * @return mixed - * - * @throws ParseException When reference does not exist - */ - private function parseValue(string $value, int $flags, string $context) - { - if (0 === strpos($value, '*')) { - if (false !== $pos = strpos($value, '#')) { - $value = substr($value, 1, $pos - 2); - } else { - $value = substr($value, 1); - } - - if (!\array_key_exists($value, $this->refs)) { - if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$value])), $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - return $this->refs[$value]; - } - - if (\in_array($value[0], ['!', '|', '>'], true) && self::preg_match('/^(?:'.self::TAG_PATTERN.' +)?'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { - $modifiers = $matches['modifiers'] ?? ''; - - $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers)); - - if ('' !== $matches['tag'] && '!' !== $matches['tag']) { - if ('!!binary' === $matches['tag']) { - return Inline::evaluateBinaryScalar($data); - } - - return new TaggedValue(substr($matches['tag'], 1), $data); - } - - return $data; - } - - try { - if ('' !== $value && '{' === $value[0]) { - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - - return Inline::parse($this->lexInlineMapping($cursor), $flags, $this->refs); - } elseif ('' !== $value && '[' === $value[0]) { - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - - return Inline::parse($this->lexInlineSequence($cursor), $flags, $this->refs); - } - - switch ($value[0] ?? '') { - case '"': - case "'": - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - $parsedValue = Inline::parse($this->lexInlineQuotedString($cursor), $flags, $this->refs); - - if (isset($this->currentLine[$cursor]) && preg_replace('/\s*(#.*)?$/A', '', substr($this->currentLine, $cursor))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($this->currentLine, $cursor))); - } - - return $parsedValue; - default: - $lines = []; - - while ($this->moveToNextLine()) { - // unquoted strings end before the first unindented line - if (0 === $this->getCurrentLineIndentation()) { - $this->moveToPreviousLine(); - - break; - } - - $lines[] = trim($this->currentLine); - } - - for ($i = 0, $linesCount = \count($lines), $previousLineBlank = false; $i < $linesCount; ++$i) { - if ('' === $lines[$i]) { - $value .= "\n"; - $previousLineBlank = true; - } elseif ($previousLineBlank) { - $value .= $lines[$i]; - $previousLineBlank = false; - } else { - $value .= ' '.$lines[$i]; - $previousLineBlank = false; - } - } - - Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); - - $parsedValue = Inline::parse($value, $flags, $this->refs); - - if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { - throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - return $parsedValue; - } - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } - - /** - * Parses a block scalar. - * - * @param string $style The style indicator that was used to begin this block scalar (| or >) - * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -) - * @param int $indentation The indentation indicator that was used to begin this block scalar - */ - private function parseBlockScalar(string $style, string $chomping = '', int $indentation = 0): string - { - $notEOF = $this->moveToNextLine(); - if (!$notEOF) { - return ''; - } - - $isCurrentLineBlank = $this->isCurrentLineBlank(); - $blockLines = []; - - // leading blank lines are consumed before determining indentation - while ($notEOF && $isCurrentLineBlank) { - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $blockLines[] = ''; - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - - // determine indentation if not specified - if (0 === $indentation) { - $currentLineLength = \strlen($this->currentLine); - - for ($i = 0; $i < $currentLineLength && ' ' === $this->currentLine[$i]; ++$i) { - ++$indentation; - } - } - - if ($indentation > 0) { - $pattern = sprintf('/^ {%d}(.*)$/', $indentation); - - while ( - $notEOF && ( - $isCurrentLineBlank || - self::preg_match($pattern, $this->currentLine, $matches) - ) - ) { - if ($isCurrentLineBlank && \strlen($this->currentLine) > $indentation) { - $blockLines[] = substr($this->currentLine, $indentation); - } elseif ($isCurrentLineBlank) { - $blockLines[] = ''; - } else { - $blockLines[] = $matches[1]; - } - - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - } elseif ($notEOF) { - $blockLines[] = ''; - } - - if ($notEOF) { - $blockLines[] = ''; - $this->moveToPreviousLine(); - } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { - $blockLines[] = ''; - } - - // folded style - if ('>' === $style) { - $text = ''; - $previousLineIndented = false; - $previousLineBlank = false; - - for ($i = 0, $blockLinesCount = \count($blockLines); $i < $blockLinesCount; ++$i) { - if ('' === $blockLines[$i]) { - $text .= "\n"; - $previousLineIndented = false; - $previousLineBlank = true; - } elseif (' ' === $blockLines[$i][0]) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = true; - $previousLineBlank = false; - } elseif ($previousLineIndented) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } elseif ($previousLineBlank || 0 === $i) { - $text .= $blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } else { - $text .= ' '.$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } - } - } else { - $text = implode("\n", $blockLines); - } - - // deal with trailing newlines - if ('' === $chomping) { - $text = preg_replace('/\n+$/', "\n", $text); - } elseif ('-' === $chomping) { - $text = preg_replace('/\n+$/', '', $text); - } - - return $text; - } - - /** - * Returns true if the next line is indented. - */ - private function isNextLineIndented(): bool - { - $currentIndentation = $this->getCurrentLineIndentation(); - $movements = 0; - - do { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - - if ($EOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() > $currentIndentation; - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - return $ret; - } - - /** - * Returns true if the current line is blank or if it is a comment line. - */ - private function isCurrentLineEmpty(): bool - { - return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); - } - - /** - * Returns true if the current line is blank. - */ - private function isCurrentLineBlank(): bool - { - return '' === $this->currentLine || '' === trim($this->currentLine, ' '); - } - - /** - * Returns true if the current line is a comment line. - */ - private function isCurrentLineComment(): bool - { - // checking explicitly the first char of the trim is faster than loops or strpos - $ltrimmedLine = '' !== $this->currentLine && ' ' === $this->currentLine[0] ? ltrim($this->currentLine, ' ') : $this->currentLine; - - return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0]; - } - - private function isCurrentLineLastLineInDocument(): bool - { - return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); - } - - /** - * Cleanups a YAML string to be parsed. - * - * @param string $value The input YAML string - */ - private function cleanup(string $value): string - { - $value = str_replace(["\r\n", "\r"], "\n", $value); - - // strip YAML header - $count = 0; - $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count); - $this->offset += $count; - - // remove leading comments - $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); - if (1 === $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - } - - // remove start of the document marker (---) - $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); - if (1 === $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - - // remove end of the document marker (...) - $value = preg_replace('#\.\.\.\s*$#', '', $value); - } - - return $value; - } - - /** - * Returns true if the next line starts unindented collection. - */ - private function isNextLineUnIndentedCollection(): bool - { - $currentIndentation = $this->getCurrentLineIndentation(); - $movements = 0; - - do { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - - if ($EOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem(); - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - return $ret; - } - - /** - * Returns true if the string is un-indented collection item. - */ - private function isStringUnIndentedCollectionItem(): bool - { - return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); - } - - /** - * A local wrapper for "preg_match" which will throw a ParseException if there - * is an internal error in the PCRE engine. - * - * This avoids us needing to check for "false" every time PCRE is used - * in the YAML engine - * - * @throws ParseException on a PCRE internal error - * - * @see preg_last_error() - * - * @internal - */ - public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int - { - if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - $error = 'Internal PCRE error.'; - break; - case \PREG_BACKTRACK_LIMIT_ERROR: - $error = 'pcre.backtrack_limit reached.'; - break; - case \PREG_RECURSION_LIMIT_ERROR: - $error = 'pcre.recursion_limit reached.'; - break; - case \PREG_BAD_UTF8_ERROR: - $error = 'Malformed UTF-8 data.'; - break; - case \PREG_BAD_UTF8_OFFSET_ERROR: - $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.'; - break; - default: - $error = 'Error.'; - } - - throw new ParseException($error); - } - - return $ret; - } - - /** - * Trim the tag on top of the value. - * - * Prevent values such as "!foo {quz: bar}" to be considered as - * a mapping block. - */ - private function trimTag(string $value): string - { - if ('!' === $value[0]) { - return ltrim(substr($value, 1, strcspn($value, " \r\n", 1)), ' '); - } - - return $value; - } - - private function getLineTag(string $value, int $flags, bool $nextLineCheck = true): ?string - { - if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^'.self::TAG_PATTERN.' *( +#.*)?$/', $value, $matches)) { - return null; - } - - if ($nextLineCheck && !$this->isNextLineIndented()) { - return null; - } - - $tag = substr($matches['tag'], 1); - - // Built-in tags - if ($tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - if (Yaml::PARSE_CUSTOM_TAGS & $flags) { - return $tag; - } - - throw new ParseException(sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - private function lexInlineQuotedString(int &$cursor = 0): string - { - $quotation = $this->currentLine[$cursor]; - $value = $quotation; - ++$cursor; - - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - $lineNumber = 0; - - do { - if (++$lineNumber > 1) { - $cursor += strspn($this->currentLine, ' ', $cursor); - } - - if ($this->isCurrentLineBlank()) { - $value .= "\n"; - } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { - $value .= ' '; - } - - for (; \strlen($this->currentLine) > $cursor; ++$cursor) { - switch ($this->currentLine[$cursor]) { - case '\\': - if ("'" === $quotation) { - $value .= '\\'; - } elseif (isset($this->currentLine[++$cursor])) { - $value .= '\\'.$this->currentLine[$cursor]; - } - - break; - case $quotation: - ++$cursor; - - if ("'" === $quotation && isset($this->currentLine[$cursor]) && "'" === $this->currentLine[$cursor]) { - $value .= "''"; - break; - } - - return $value.$quotation; - default: - $value .= $this->currentLine[$cursor]; - } - } - - if ($this->isCurrentLineBlank()) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - } elseif ('\\' === $this->currentLine[-1]) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; - } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - throw new ParseException('Malformed inline YAML string.'); - } - - private function lexUnquotedString(int &$cursor): string - { - $offset = $cursor; - $cursor += strcspn($this->currentLine, '[]{},: ', $cursor); - - if ($cursor === $offset) { - throw new ParseException('Malformed unquoted YAML string.'); - } - - return substr($this->currentLine, $offset, $cursor - $offset); - } - - private function lexInlineMapping(int &$cursor = 0): string - { - return $this->lexInlineStructure($cursor, '}'); - } - - private function lexInlineSequence(int &$cursor = 0): string - { - return $this->lexInlineStructure($cursor, ']'); - } - - private function lexInlineStructure(int &$cursor, string $closingTag): string - { - $value = $this->currentLine[$cursor]; - ++$cursor; - - do { - $this->consumeWhitespaces($cursor); - - while (isset($this->currentLine[$cursor])) { - switch ($this->currentLine[$cursor]) { - case '"': - case "'": - $value .= $this->lexInlineQuotedString($cursor); - break; - case ':': - case ',': - $value .= $this->currentLine[$cursor]; - ++$cursor; - break; - case '{': - $value .= $this->lexInlineMapping($cursor); - break; - case '[': - $value .= $this->lexInlineSequence($cursor); - break; - case $closingTag: - $value .= $this->currentLine[$cursor]; - ++$cursor; - - return $value; - case '#': - break 2; - default: - $value .= $this->lexUnquotedString($cursor); - } - - if ($this->consumeWhitespaces($cursor)) { - $value .= ' '; - } - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - throw new ParseException('Malformed inline YAML string.'); - } - - private function consumeWhitespaces(int &$cursor): bool - { - $whitespacesConsumed = 0; - - do { - $whitespaceOnlyTokenLength = strspn($this->currentLine, ' ', $cursor); - $whitespacesConsumed += $whitespaceOnlyTokenLength; - $cursor += $whitespaceOnlyTokenLength; - - if (isset($this->currentLine[$cursor])) { - return 0 < $whitespacesConsumed; - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - return 0 < $whitespacesConsumed; - } -} diff --git a/lib/symfony/yaml/README.md b/lib/symfony/yaml/README.md deleted file mode 100644 index ac25024b6..000000000 --- a/lib/symfony/yaml/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Yaml Component -============== - -The Yaml component loads and dumps YAML files. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/yaml.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/lib/symfony/yaml/Resources/bin/yaml-lint b/lib/symfony/yaml/Resources/bin/yaml-lint deleted file mode 100644 index 143869e01..000000000 --- a/lib/symfony/yaml/Resources/bin/yaml-lint +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if ('cli' !== \PHP_SAPI) { - throw new Exception('This script must be run from the command line.'); -} - -/** - * Runs the Yaml lint command. - * - * @author Jan Schädlich - */ - -use Symfony\Component\Console\Application; -use Symfony\Component\Yaml\Command\LintCommand; - -function includeIfExists(string $file): bool -{ - return file_exists($file) && include $file; -} - -if ( - !includeIfExists(__DIR__ . '/../../../../autoload.php') && - !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && - !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') -) { - fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); - exit(1); -} - -if (!class_exists(Application::class)) { - fwrite(STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.'.PHP_EOL); - exit(1); -} - -(new Application())->add($command = new LintCommand()) - ->getApplication() - ->setDefaultCommand($command->getName(), true) - ->run() -; diff --git a/lib/symfony/yaml/Tag/TaggedValue.php b/lib/symfony/yaml/Tag/TaggedValue.php deleted file mode 100644 index 4ea340613..000000000 --- a/lib/symfony/yaml/Tag/TaggedValue.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Tag; - -/** - * @author Nicolas Grekas - * @author Guilhem N. - */ -final class TaggedValue -{ - private $tag; - private $value; - - public function __construct(string $tag, $value) - { - $this->tag = $tag; - $this->value = $value; - } - - public function getTag(): string - { - return $this->tag; - } - - public function getValue() - { - return $this->value; - } -} diff --git a/lib/symfony/yaml/Unescaper.php b/lib/symfony/yaml/Unescaper.php deleted file mode 100644 index d1ef04123..000000000 --- a/lib/symfony/yaml/Unescaper.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - -/** - * Unescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Unescaper -{ - /** - * Regex fragment that matches an escaped character in a double quoted string. - */ - public const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; - - /** - * Unescapes a single quoted string. - * - * @param string $value A single quoted string - */ - public function unescapeSingleQuotedString(string $value): string - { - return str_replace('\'\'', '\'', $value); - } - - /** - * Unescapes a double quoted string. - * - * @param string $value A double quoted string - */ - public function unescapeDoubleQuotedString(string $value): string - { - $callback = function ($match) { - return $this->unescapeCharacter($match[0]); - }; - - // evaluate the string - return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); - } - - /** - * Unescapes a character that was found in a double-quoted string. - * - * @param string $value An escaped character - */ - private function unescapeCharacter(string $value): string - { - switch ($value[1]) { - case '0': - return "\x0"; - case 'a': - return "\x7"; - case 'b': - return "\x8"; - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return "\xB"; - case 'f': - return "\xC"; - case 'r': - return "\r"; - case 'e': - return "\x1B"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\xC2\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\xC2\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\xE2\x80\xA8"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\xE2\x80\xA9"; - case 'x': - return self::utf8chr(hexdec(substr($value, 2, 2))); - case 'u': - return self::utf8chr(hexdec(substr($value, 2, 4))); - case 'U': - return self::utf8chr(hexdec(substr($value, 2, 8))); - default: - throw new ParseException(sprintf('Found unknown escape character "%s".', $value)); - } - } - - /** - * Get the UTF-8 character for the given code point. - */ - private static function utf8chr(int $c): string - { - if (0x80 > $c %= 0x200000) { - return \chr($c); - } - if (0x800 > $c) { - return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F); - } - if (0x10000 > $c) { - return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } - - return \chr(0xF0 | $c >> 18).\chr(0x80 | $c >> 12 & 0x3F).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } -} diff --git a/lib/symfony/yaml/Yaml.php b/lib/symfony/yaml/Yaml.php deleted file mode 100644 index ea1304528..000000000 --- a/lib/symfony/yaml/Yaml.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - -/** - * Yaml offers convenience methods to load and dump YAML. - * - * @author Fabien Potencier - * - * @final - */ -class Yaml -{ - public const DUMP_OBJECT = 1; - public const PARSE_EXCEPTION_ON_INVALID_TYPE = 2; - public const PARSE_OBJECT = 4; - public const PARSE_OBJECT_FOR_MAP = 8; - public const DUMP_EXCEPTION_ON_INVALID_TYPE = 16; - public const PARSE_DATETIME = 32; - public const DUMP_OBJECT_AS_MAP = 64; - public const DUMP_MULTI_LINE_LITERAL_BLOCK = 128; - public const PARSE_CONSTANT = 256; - public const PARSE_CUSTOM_TAGS = 512; - public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; - public const DUMP_NULL_AS_TILDE = 2048; - - /** - * Parses a YAML file into a PHP value. - * - * Usage: - * - * $array = Yaml::parseFile('config.yml'); - * print_r($array); - * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the file could not be read or the YAML is not valid - */ - public static function parseFile(string $filename, int $flags = 0) - { - $yaml = new Parser(); - - return $yaml->parseFile($filename, $flags); - } - - /** - * Parses YAML into a PHP value. - * - * Usage: - * - * $array = Yaml::parse(file_get_contents('config.yml')); - * print_r($array); - * - * - * @param string $input A string containing YAML - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the YAML is not valid - */ - public static function parse(string $input, int $flags = 0) - { - $yaml = new Parser(); - - return $yaml->parse($input, $flags); - } - - /** - * Dumps a PHP value to a YAML string. - * - * The dump method, when supplied with an array, will do its best - * to convert the array into friendly YAML. - * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The amount of spaces to use for indentation of nested nodes - * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string - */ - public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0): string - { - $yaml = new Dumper($indent); - - return $yaml->dump($input, $inline, 0, $flags); - } -} diff --git a/lib/symfony/yaml/composer.json b/lib/symfony/yaml/composer.json deleted file mode 100644 index 7fa6e2cc5..000000000 --- a/lib/symfony/yaml/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/yaml", - "type": "library", - "description": "Loads and dumps YAML files", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Yaml\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "minimum-stability": "dev" -} diff --git a/lib/thenetworg/oauth2-azure/.devcontainer/Dockerfile b/lib/thenetworg/oauth2-azure/.devcontainer/Dockerfile deleted file mode 100644 index 35ab8f9c4..000000000 --- a/lib/thenetworg/oauth2-azure/.devcontainer/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/php/.devcontainer/base.Dockerfile -ARG VARIANT="7" -FROM mcr.microsoft.com/vscode/devcontainers/php:0-${VARIANT} - -# [Optional] Install a version of Node.js using nvm for front end dev -ARG INSTALL_NODE="true" -ARG NODE_VERSION="lts/*" -RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -# [Optional] Uncomment this line to install global node packages. -# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 \ No newline at end of file diff --git a/lib/thenetworg/oauth2-azure/.devcontainer/devcontainer.json b/lib/thenetworg/oauth2-azure/.devcontainer/devcontainer.json deleted file mode 100644 index 676de3dcb..000000000 --- a/lib/thenetworg/oauth2-azure/.devcontainer/devcontainer.json +++ /dev/null @@ -1,29 +0,0 @@ -// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/php -{ - "name": "PHP", - "build": { - "dockerfile": "Dockerfile", - "args": { - // Update VARIANT to pick a PHP version: 7, 7.4, 7.3 - "VARIANT": "7", - "INSTALL_NODE": "false", - "NODE_VERSION": "lts/*" - } - }, - // Set *default* container specific settings.json values on container create. - "settings": { - "terminal.integrated.shell.linux": "/bin/bash" - }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "felixfbecker.php-debug", - "felixfbecker.php-intellisense" - ], - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "php -v", - // Comment out to connect as root instead. - "remoteUser": "vscode" -} \ No newline at end of file diff --git a/lib/thenetworg/oauth2-azure/.gitignore b/lib/thenetworg/oauth2-azure/.gitignore deleted file mode 100644 index 57a23bd06..000000000 --- a/lib/thenetworg/oauth2-azure/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/build -/vendor -composer.phar -composer.lock -.DS_Store - -# IDE -/.idea -/.vscode diff --git a/lib/thenetworg/oauth2-azure/.php_cs b/lib/thenetworg/oauth2-azure/.php_cs deleted file mode 100644 index 47be3dfc0..000000000 --- a/lib/thenetworg/oauth2-azure/.php_cs +++ /dev/null @@ -1,70 +0,0 @@ -in(__DIR__ . '/src'); - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setUsingCache(false) - ->setRules([ - '@PSR2' => true, - 'align_multiline_comment' => true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => ['default' => 'align_single_space_minimal'], - 'blank_line_after_opening_tag' => true, - 'class_attributes_separation' => true, - 'combine_consecutive_issets' => true, - 'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'package', 'subpackage']], - 'declare_equal_normalize' => ['space' => 'single'], - 'dir_constant' => true, - 'fully_qualified_strict_types' => true, - 'function_typehint_space' => true, - 'heredoc_to_nowdoc' => true, - 'include' => true, - 'is_null' => ['use_yoda_style' => true], - 'linebreak_after_opening_tag' => true, - 'lowercase_cast' => true, - 'modernize_types_casting' => true, - 'new_with_braces' => true, - 'no_alias_functions' => true, - 'no_alternative_syntax' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => ['use' => 'echo'], - 'no_multiline_whitespace_before_semicolons' => true, - 'no_null_property_initialization' => true, - 'no_php4_constructor' => true, - 'no_short_echo_tag' => false, - 'no_unreachable_default_argument_value' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'ordered_class_elements' => true, - 'ordered_imports' => true, - 'phpdoc_add_missing_param_annotation' => ['only_untyped' => false], - 'phpdoc_order' => true, - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_to_comment' => true, - 'phpdoc_trim' => true, - 'phpdoc_types' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last'], - 'phpdoc_var_without_name' => true, - 'short_scalar_cast' => true, - 'simplified_null_return' => true, - 'single_blank_line_before_namespace' => true, - 'single_line_comment_style' => true, - 'single_quote' => ['strings_containing_single_quote_chars' => true], - 'standardize_increment' => true, - 'standardize_not_equals' => true, - 'trailing_comma_in_multiline_array' => true, - 'trim_array_spaces' => true, - 'whitespace_after_comma_in_array' => true, - 'yoda_style' => true, - ]) - ->setFinder($finder); diff --git a/lib/thenetworg/oauth2-azure/.vscode/launch.json b/lib/thenetworg/oauth2-azure/.vscode/launch.json deleted file mode 100644 index c69965a9e..000000000 --- a/lib/thenetworg/oauth2-azure/.vscode/launch.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Launch application", - "type": "php", - "request": "launch", - "program": "${workspaceFolder}/index.php", - "cwd": "${workspaceFolder}", - "port": 9000 - }, - { - "name": "Listen for XDebug", - "type": "php", - "request": "launch", - "port": 9000 - }, - { - "name": "Launch currently open script", - "type": "php", - "request": "launch", - "program": "${file}", - "cwd": "${fileDirname}", - "port": 9000 - } - ] -} \ No newline at end of file diff --git a/lib/thenetworg/oauth2-azure/CHANGELOG.md b/lib/thenetworg/oauth2-azure/CHANGELOG.md deleted file mode 100644 index 689c66685..000000000 --- a/lib/thenetworg/oauth2-azure/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Changelog -All Notable changes to `oauth2-azure` will be documented in this file - -## v1.0.0 - 16NOV2015 -- Initial release \ No newline at end of file diff --git a/lib/thenetworg/oauth2-azure/LICENSE.md b/lib/thenetworg/oauth2-azure/LICENSE.md deleted file mode 100644 index 196dd8655..000000000 --- a/lib/thenetworg/oauth2-azure/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 TheNetw.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/lib/thenetworg/oauth2-azure/README.md b/lib/thenetworg/oauth2-azure/README.md deleted file mode 100644 index ee6f06d3f..000000000 --- a/lib/thenetworg/oauth2-azure/README.md +++ /dev/null @@ -1,283 +0,0 @@ -# Azure Active Directory Provider for OAuth 2.0 Client -[![Latest Version](https://img.shields.io/github/release/thenetworg/oauth2-azure.svg?style=flat-square)](https://github.com/thenetworg/oauth2-azure/releases) -[![Total Downloads](https://img.shields.io/packagist/dt/thenetworg/oauth2-azure.svg?style=flat-square)](https://packagist.org/packages/thenetworg/oauth2-azure) -[![Software License](https://img.shields.io/packagist/l/thenetworg/oauth2-azure.svg?style=flat-square)](LICENSE.md) - -This package provides [Azure Active Directory](https://azure.microsoft.com/en-us/services/active-directory/) OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client). - -## Table of Contents -- [Installation](#installation) -- [Usage](#usage) - - [Authorization Code Flow](#authorization-code-flow) - - [Advanced flow](#advanced-flow) - - [Using custom parameters](#using-custom-parameters) - - [**NEW** - Call on behalf of a token provided by another app](#call-on-behalf-of-a-token-provided-by-another-app) - - [**NEW** - Logging out](#logging-out) -- [Making API Requests](#making-api-requests) - - [Variables](#variables) -- [Resource Owner](#resource-owner) -- [**UPDATED** - Microsoft Graph](#microsoft-graph) -- [**NEW** - Protecting your API - *experimental*](#protecting-your-api---experimental) -- [Azure Active Directory B2C - *experimental*](#azure-active-directory-b2c---experimental) -- [Multipurpose refresh tokens - *experimental*](#multipurpose-refresh-tokens---experimental) -- [Known users](#known-users) -- [Contributing](#contributing) -- [Credits](#credits) -- [Support](#support) -- [License](#license) - -## Installation - -To install, use composer: - -``` -composer require thenetworg/oauth2-azure -``` - -## Usage - -Usage is the same as The League's OAuth client, using `\TheNetworg\OAuth2\Client\Provider\Azure` as the provider. - -### Authorization Code Flow - -```php -$provider = new TheNetworg\OAuth2\Client\Provider\Azure([ - 'clientId' => '{azure-client-id}', - 'clientSecret' => '{azure-client-secret}', - 'redirectUri' => 'https://example.com/callback-url', - //Optional - 'scopes' => ['openid'], - //Optional - 'defaultEndPointVersion' => '2.0' -]); - -// Set to use v2 API, skip the line or set the value to Azure::ENDPOINT_VERSION_1_0 if willing to use v1 API -$provider->defaultEndPointVersion = TheNetworg\OAuth2\Client\Provider\Azure::ENDPOINT_VERSION_2_0; - -$baseGraphUri = $provider->getRootMicrosoftGraphUri(null); -$provider->scope = 'openid profile email offline_access ' . $baseGraphUri . '/User.Read'; - -if (isset($_GET['code']) && isset($_SESSION['OAuth2.state']) && isset($_GET['state'])) { - if ($_GET['state'] == $_SESSION['OAuth2.state']) { - unset($_SESSION['OAuth2.state']); - - // Try to get an access token (using the authorization code grant) - /** @var AccessToken $token */ - $token = $provider->getAccessToken('authorization_code', [ - 'scope' => $provider->scope, - 'code' => $_GET['code'], - ]); - - // Verify token - // Save it to local server session data - - return $token->getToken(); - } else { - echo 'Invalid state'; - - return null; - } -} else { - // // Check local server's session data for a token - // // and verify if still valid - // /** @var ?AccessToken $token */ - // $token = // token cached in session data, null if not found; - // - // if (isset($token)) { - // $me = $provider->get($provider->getRootMicrosoftGraphUri($token) . '/v1.0/me', $token); - // $userEmail = $me['mail']; - // - // if ($token->hasExpired()) { - // if (!is_null($token->getRefreshToken())) { - // $token = $provider->getAccessToken('refresh_token', [ - // 'scope' => $provider->scope, - // 'refresh_token' => $token->getRefreshToken() - // ]); - // } else { - // $token = null; - // } - // } - //} - // - // If the token is not found in - // if (!isset($token)) { - $authorizationUrl = $provider->getAuthorizationUrl(['scope' => $provider->scope]); - - $_SESSION['OAuth2.state'] = $provider->getState(); - - header('Location: ' . $authorizationUrl); - - exit; - // } - - return $token->getToken(); -} -``` - -#### Advanced flow - -The [Authorization Code Grant Flow](https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx) is a little bit different for Azure Active Directory. Instead of scopes, you specify the resource which you would like to access - there is a param `$provider->authWithResource` which will automatically populate the `resource` param of request with the value of either `$provider->resource` or `$provider->urlAPI`. This feature is mostly intended for v2.0 endpoint of Azure AD (see more [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison#scopes-not-resources)). - -#### Using custom parameters - -With [oauth2-client](https://github.com/thephpleague/oauth2-client) of version 1.3.0 and higher, it is now possible to specify custom parameters for the authorization URL, so you can now make use of options like `prompt`, `login_hint` and similar. See the following example of obtaining an authorization URL which will force the user to reauthenticate: -```php -$authUrl = $provider->getAuthorizationUrl([ - 'prompt' => 'login' -]); -``` -You can find additional parameters [here](https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx). - -### Logging out -If you need to quickly generate a logout URL for the user, you can do following: -```php -// Assuming you have provider properly initialized. -$post_logout_redirect_uri = 'https://www.msn.com'; // The logout destination after the user is logged out from their account. -$logoutUrl = $provider->getLogoutUrl($post_logout_redirect_uri); -header('Location: '.$logoutUrl); // Redirect the user to the generated URL -``` - -#### Call on behalf of a token provided by another app - -```php -// Use token provided by the other app -// Make sure the other app mentioned this app in the scope when requesting the token -$suppliedToken = ''; - -$provider = xxxxx;// Initialize provider - -// Call this to get claims -// $claims = $provider->validateAccessToken($suppliedToken); - -/** @var AccessToken $token */ -$token = $provider->getAccessToken('jwt_bearer', [ - 'scope' => $provider->scope, - 'assertion' => $suppliedToken, - 'requested_token_use' => 'on_behalf_of', -]); -``` - -## Making API Requests - -This library also provides easy interface to make it easier to interact with [Azure Graph API](https://msdn.microsoft.com/en-us/library/azure/hh974476.aspx) and [Microsoft Graph](http://graph.microsoft.io), the following methods are available on `provider` object (it also handles automatic token refresh flow should it be needed during making the request): - -- `get($ref, $accessToken, $headers = [])` -- `post($ref, $body, $accessToken, $headers = [])` -- `put($ref, $body, $accessToken, $headers = [])` -- `delete($ref, $body, $accessToken, $headers = [])` -- `patch($ref, $body, $accessToken, $headers = [])` -- `getObjects($tenant, $ref, $accessToken, $headers = [])` This is used for example for listing large amount of data - where you need to list all users for example - it automatically follows `odata.nextLink` until the end. - - `$tenant` tenant has to be provided since the `odata.nextLink` doesn't contain it. -- `request($method, $ref, $accessToken, $options = [])` See [#36](https://github.com/TheNetworg/oauth2-azure/issues/36) for use case. - -*Please note that if you need to create a custom request, the method getAuthenticatedRequest and getResponse can still be used.* - -### Variables -- `$ref` The URL reference without the leading `/`, for example `myOrganization/groups` -- `$body` The contents of the request, make has to be either string (so make sure to use `json_encode` to encode the request)s or stream (see [Guzzle HTTP](http://docs.guzzlephp.org/en/latest/request-options.html#body)) -- `$accessToken` The access token object obtained by using `getAccessToken` method -- `$headers` Ability to set custom headers for the request (see [Guzzle HTTP](http://docs.guzzlephp.org/en/latest/request-options.html#headers)) - -## Resource Owner -With version 1.1.0 and onward, the Resource Owner information is parsed from the JWT passed in `access_token` by Azure Active Directory. It exposes few attributes and one function. - -**Example:** -```php -$resourceOwner = $provider->getResourceOwner($token); -echo 'Hello, '.$resourceOwner->getFirstName().'!'; -``` -The exposed attributes and function are: -- `getId()` - Gets user's object id - unique for each user -- `getFirstName()` - Gets user's first name -- `getLastName()` - Gets user's family name/surname -- `getTenantId()` - Gets id of tenant which the user is member of -- `getUpn()` - Gets user's User Principal Name, which can be also used as user's e-mail address -- `claim($name)` - Gets any other claim (specified as `$name`) from the JWT, full list can be found [here](https://azure.microsoft.com/en-us/documentation/articles/active-directory-token-and-claims/) - -## Microsoft Graph -Calling [Microsoft Graph](http://graph.microsoft.io/) is very simple with this library. After provider initialization simply change the API URL followingly (replace `v1.0` with your desired version): -```php -// Mention Microsoft Graph scope when initializing the provider -$baseGraphUri = $provider->getRootMicrosoftGraphUri(null); -$provider->scope = 'your scope ' . $baseGraphUri . '/User.Read'; - -// Call a query -$provider->get($provider->getRootMicrosoftGraphUri($token) . '/v1.0/me', $token); -``` -After that, when requesting access token, refresh token or so, provide the `resource` with value `https://graph.microsoft.com/` in order to be able to make calls to the Graph (see more about `resource` [here](#advanced-flow)). - -## Protecting your API - *experimental* -With version 1.2.0 you can now use this library to protect your API with Azure Active Directory authentication very easily. The Provider now also exposes `validateAccessToken(string $token)` which lets you pass an access token inside which you for example received in the `Authorization` header of the request on your API. You can use the function followingly (in vanilla PHP): -```php -// Assuming you have already initialized the $provider - -// Obtain the accessToken - in this case, we are getting it from Authorization header -$headers = getallheaders(); -// Assuming you got the value of Authorization header as "Bearer [the_access_token]" we parse it -$authorization = explode(' ', $headers['Authorization']); -$accessToken = $authorization[1]; - -try { - $claims = $provider->validateAccessToken($accessToken); -} catch (Exception $e) { - // Something happened, handle the error -} - -// The access token is valid, you can now proceed with your code. You can also access the $claims as defined in JWT - for example roles, group memberships etc. -``` - -You may also need to access some other resource from the API like the Microsoft Graph to get some additional information. In order to do that, there is `urn:ietf:params:oauth:grant-type:jwt-bearer` grant available ([RFC](https://tools.ietf.org/html/draft-jones-oauth-jwt-bearer-03)). An example (assuming you have the code above working and you have the required permissions configured correctly in the Azure AD application): -```php -$graphAccessToken = $provider->getAccessToken('jwt_bearer', [ - 'resource' => 'https://graph.microsoft.com/v1.0/', - 'assertion' => $accessToken, - 'requested_token_use' => 'on_behalf_of' -]); - -$me = $provider->get('https://graph.microsoft.com/v1.0/me', $graphAccessToken); -print_r($me); -``` -Just to make it easier so you don't have to remember entire name for `grant_type` (`urn:ietf:params:oauth:grant-type:jwt-bearer`), you just use short `jwt_bearer` instead. - -## Azure Active Directory B2C - *experimental* -You can also now very simply make use of [Azure Active Directory B2C](https://azure.microsoft.com/en-us/documentation/articles/active-directory-b2c-reference-oauth-code/). Before authentication, change the endpoints using `pathAuthorize`, `pathToken` and `scope` and additionally specify your [login policy](https://azure.microsoft.com/en-gb/documentation/articles/active-directory-b2c-reference-policies/). **Please note that the B2C support is still experimental and wasn't fully tested.** -```php -$provider->pathAuthorize = "/oauth2/v2.0/authorize"; -$provider->pathToken = "/oauth2/v2.0/token"; -$provider->scope = ["idtoken"]; - -// Specify custom policy in our authorization URL -$authUrl = $provider->getAuthorizationUrl([ - 'p' => 'b2c_1_siup' -]); -``` - -## Multipurpose refresh tokens - *experimental* -In cause that you need to access multiple resources (like your API and Microsoft Graph), you can use multipurpose [refresh tokens](https://msdn.microsoft.com/en-us/library/azure/dn645538.aspx). Once obtaining a token for first resource, you can simply request another token for different resource like so: -```php -$accessToken2 = $provider->getAccessToken('refresh_token', [ - 'refresh_token' => $accessToken1->getRefreshToken(), - 'resource' => 'http://urlOfYourSecondResource' -]); -``` -At the moment, there is one issue: When you make a call to your API and the token has expired, it will have the value of `$provider->urlAPI` which is obviously wrong for `$accessToken2`. The solution is very simple - set the `$provider->urlAPI` to the resource which you want to call. This issue will be addressed in future release. **Please note that this is experimental and wasn't fully tested.** - -## Known users -If you are using this library and would like to be listed here, please let us know! -- [TheNetworg/DreamSpark-SSO](https://github.com/thenetworg/dreamspark-sso) - -## Contributing -We accept contributions via [Pull Requests on Github](https://github.com/thenetworg/oauth2-azure). - -## Credits -- [Jan Hajek](https://github.com/hajekj) ([TheNetw.org](https://thenetw.org)) -- [Vittorio Bertocci](https://github.com/vibronet) (Microsoft) - - Thanks for the splendid support while implementing #16 -- [Martin Cetkovský](https://github.com/mcetkovsky) ([cetkovsky.eu](https://www.cetkovsky.eu)] -- [All Contributors](https://github.com/thenetworg/oauth2-azure/contributors) - -## Support -If you find a bug or encounter any issue or have a problem/question with this library please create a [new issue](https://github.com/TheNetworg/oauth2-azure/issues). - -## License -The MIT License (MIT). Please see [License File](https://github.com/thenetworg/oauth2-azure/blob/master/LICENSE) for more information. diff --git a/lib/thenetworg/oauth2-azure/composer.json b/lib/thenetworg/oauth2-azure/composer.json deleted file mode 100644 index 4fb348463..000000000 --- a/lib/thenetworg/oauth2-azure/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "thenetworg/oauth2-azure", - "description": "Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client", - "license": "MIT", - "authors": [ - { - "name": "Jan Hajek", - "email": "jan.hajek@thenetw.org", - "homepage": "https://thenetw.org" - } - ], - "keywords": [ - "oauth", - "oauth2", - "client", - "authorization", - "microsoft", - "windows azure", - "azure", - "azure active directory", - "aad", - "sso" - ], - "require": { - "ext-json": "*", - "ext-openssl": "*", - "php": "^7.1|^8.0", - "league/oauth2-client": "~2.0", - "firebase/php-jwt": "~3.0||~4.0||~5.0||~6.0" - }, - "autoload": { - "psr-4": { - "TheNetworg\\OAuth2\\Client\\": "src/" - } - } -} diff --git a/lib/thenetworg/oauth2-azure/src/Grant/JwtBearer.php b/lib/thenetworg/oauth2-azure/src/Grant/JwtBearer.php deleted file mode 100644 index c23772855..000000000 --- a/lib/thenetworg/oauth2-azure/src/Grant/JwtBearer.php +++ /dev/null @@ -1,19 +0,0 @@ -scope = array_merge($options['scopes'], $this->scope); - } - if (isset($options['defaultEndPointVersion']) && - in_array($options['defaultEndPointVersion'], self::ENDPOINT_VERSIONS, true)) { - $this->defaultEndPointVersion = $options['defaultEndPointVersion']; - } - $this->grantFactory->setGrant('jwt_bearer', new JwtBearer()); - } - - /** - * @param string $tenant - * @param string $version - */ - protected function getOpenIdConfiguration($tenant, $version) { - if (!is_array($this->openIdConfiguration)) { - $this->openIdConfiguration = []; - } - if (!array_key_exists($tenant, $this->openIdConfiguration)) { - $this->openIdConfiguration[$tenant] = []; - } - if (!array_key_exists($version, $this->openIdConfiguration[$tenant])) { - $versionInfix = $this->getVersionUriInfix($version); - $openIdConfigurationUri = $this->urlLogin . $tenant . $versionInfix . '/.well-known/openid-configuration?appid=' . $this->clientId; - - $factory = $this->getRequestFactory(); - $request = $factory->getRequestWithOptions( - 'get', - $openIdConfigurationUri, - [] - ); - $response = $this->getParsedResponse($request); - $this->openIdConfiguration[$tenant][$version] = $response; - } - - return $this->openIdConfiguration[$tenant][$version]; - } - - /** - * @inheritdoc - */ - public function getBaseAuthorizationUrl(): string - { - $openIdConfiguration = $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); - return $openIdConfiguration['authorization_endpoint']; - } - - /** - * @inheritdoc - */ - public function getBaseAccessTokenUrl(array $params): string - { - $openIdConfiguration = $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); - return $openIdConfiguration['token_endpoint']; - } - - /** - * @inheritdoc - */ - public function getAccessToken($grant, array $options = []): AccessTokenInterface - { - if ($this->defaultEndPointVersion != self::ENDPOINT_VERSION_2_0) { - // Version 2.0 does not support the resources parameter - // https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow - // while version 1.0 does recommend it - // https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code - if ($this->authWithResource) { - $options['resource'] = $this->resource ? $this->resource : $this->urlAPI; - } - } - return parent::getAccessToken($grant, $options); - } - - /** - * @inheritdoc - */ - public function getResourceOwner(\League\OAuth2\Client\Token\AccessToken $token): ResourceOwnerInterface - { - $data = $token->getIdTokenClaims(); - return $this->createResourceOwner($data, $token); - } - - /** - * @inheritdoc - */ - public function getResourceOwnerDetailsUrl(\League\OAuth2\Client\Token\AccessToken $token): string - { - return ''; // shouldn't that return such a URL? - } - - public function getObjects($tenant, $ref, &$accessToken, $headers = []) - { - $objects = []; - - $response = null; - do { - if (false === filter_var($ref, FILTER_VALIDATE_URL)) { - $ref = $tenant . '/' . $ref; - } - - $response = $this->request('get', $ref, $accessToken, ['headers' => $headers]); - $values = $response; - if (isset($response['value'])) { - $values = $response['value']; - } - foreach ($values as $value) { - $objects[] = $value; - } - if (isset($response['odata.nextLink'])) { - $ref = $response['odata.nextLink']; - } elseif (isset($response['@odata.nextLink'])) { - $ref = $response['@odata.nextLink']; - } else { - $ref = null; - } - } while (null != $ref); - - return $objects; - } - - /** - * @param $accessToken AccessToken|null - * @return string - */ - public function getRootMicrosoftGraphUri($accessToken) - { - if (is_null($accessToken)) { - $tenant = $this->tenant; - $version = $this->defaultEndPointVersion; - } else { - $idTokenClaims = $accessToken->getIdTokenClaims(); - $tenant = array_key_exists('tid', $idTokenClaims) ? $idTokenClaims['tid'] : $this->tenant; - $version = array_key_exists('ver', $idTokenClaims) ? $idTokenClaims['ver'] : $this->defaultEndPointVersion; - } - $openIdConfiguration = $this->getOpenIdConfiguration($tenant, $version); - return 'https://' . $openIdConfiguration['msgraph_host']; - } - - public function get($ref, &$accessToken, $headers = [], $doNotWrap = false) - { - $response = $this->request('get', $ref, $accessToken, ['headers' => $headers]); - - return $doNotWrap ? $response : $this->wrapResponse($response); - } - - public function post($ref, $body, &$accessToken, $headers = []) - { - $response = $this->request('post', $ref, $accessToken, ['body' => $body, 'headers' => $headers]); - - return $this->wrapResponse($response); - } - - public function put($ref, $body, &$accessToken, $headers = []) - { - $response = $this->request('put', $ref, $accessToken, ['body' => $body, 'headers' => $headers]); - - return $this->wrapResponse($response); - } - - public function delete($ref, &$accessToken, $headers = []) - { - $response = $this->request('delete', $ref, $accessToken, ['headers' => $headers]); - - return $this->wrapResponse($response); - } - - public function patch($ref, $body, &$accessToken, $headers = []) - { - $response = $this->request('patch', $ref, $accessToken, ['body' => $body, 'headers' => $headers]); - - return $this->wrapResponse($response); - } - - public function request($method, $ref, &$accessToken, $options = []) - { - if ($accessToken->hasExpired()) { - $accessToken = $this->getAccessToken('refresh_token', [ - 'refresh_token' => $accessToken->getRefreshToken(), - ]); - } - - $url = null; - if (false !== filter_var($ref, FILTER_VALIDATE_URL)) { - $url = $ref; - } else { - if (false !== strpos($this->urlAPI, 'graph.windows.net')) { - $tenant = 'common'; - if (property_exists($this, 'tenant')) { - $tenant = $this->tenant; - } - $ref = "$tenant/$ref"; - - $url = $this->urlAPI . $ref; - - $url .= (false === strrpos($url, '?')) ? '?' : '&'; - $url .= 'api-version=' . $this->API_VERSION; - } else { - $url = $this->urlAPI . $ref; - } - } - - if (isset($options['body']) && ('array' == gettype($options['body']) || 'object' == gettype($options['body']))) { - $options['body'] = json_encode($options['body']); - } - if (!isset($options['headers']['Content-Type']) && isset($options['body'])) { - $options['headers']['Content-Type'] = 'application/json'; - } - - $request = $this->getAuthenticatedRequest($method, $url, $accessToken, $options); - $response = $this->getParsedResponse($request); - - return $response; - } - - public function getClientId() - { - return $this->clientId; - } - - /** - * Obtain URL for logging out the user. - * - * @param $post_logout_redirect_uri string The URL which the user should be redirected to after logout - * - * @return string - */ - public function getLogoutUrl($post_logout_redirect_uri = "") - { - $openIdConfiguration = $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); - $logoutUri = $openIdConfiguration['end_session_endpoint']; - - if (!empty($post_logout_redirect_uri)) { - $logoutUri .= '?post_logout_redirect_uri=' . rawurlencode($post_logout_redirect_uri); - } - - return $logoutUri; - } - - /** - * Validate the access token you received in your application. - * - * @param $accessToken string The access token you received in the authorization header. - * - * @return array - */ - public function validateAccessToken($accessToken) - { - $keys = $this->getJwtVerificationKeys(); - $tokenClaims = (array)JWT::decode($accessToken, $keys, ['RS256']); - - $this->validateTokenClaims($tokenClaims); - - return $tokenClaims; - } - - /** - * Validate the access token claims from an access token you received in your application. - * - * @param $tokenClaims array The token claims from an access token you received in the authorization header. - * - * @return void - */ - public function validateTokenClaims($tokenClaims) { - if ($this->getClientId() != $tokenClaims['aud']) { - throw new \RuntimeException('The client_id / audience is invalid!'); - } - if ($tokenClaims['nbf'] > time() || $tokenClaims['exp'] < time()) { - // Additional validation is being performed in firebase/JWT itself - throw new \RuntimeException('The id_token is invalid!'); - } - - if ('common' == $this->tenant) { - $this->tenant = $tokenClaims['tid']; - } - - $version = array_key_exists('ver', $tokenClaims) ? $tokenClaims['ver'] : $this->defaultEndPointVersion; - $tenant = $this->getTenantDetails($this->tenant, $version); - if ($tokenClaims['iss'] != $tenant['issuer']) { - throw new \RuntimeException('Invalid token issuer (tokenClaims[iss]' . $tokenClaims['iss'] . ', tenant[issuer] ' . $tenant['issuer'] . ')!'); - } - } - - /** - * Get JWT verification keys from Azure Active Directory. - * - * @return array - */ - public function getJwtVerificationKeys() - { - $openIdConfiguration = $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); - $keysUri = $openIdConfiguration['jwks_uri']; - - $factory = $this->getRequestFactory(); - $request = $factory->getRequestWithOptions('get', $keysUri, []); - - $response = $this->getParsedResponse($request); - - $keys = []; - foreach ($response['keys'] as $i => $keyinfo) { - if (isset($keyinfo['x5c']) && is_array($keyinfo['x5c'])) { - foreach ($keyinfo['x5c'] as $encodedkey) { - $cert = - '-----BEGIN CERTIFICATE-----' . PHP_EOL - . chunk_split($encodedkey, 64, PHP_EOL) - . '-----END CERTIFICATE-----' . PHP_EOL; - - $cert_object = openssl_x509_read($cert); - - if ($cert_object === false) { - throw new \RuntimeException('An attempt to read ' . $encodedkey . ' as a certificate failed.'); - } - - $pkey_object = openssl_pkey_get_public($cert_object); - - if ($pkey_object === false) { - throw new \RuntimeException('An attempt to read a public key from a ' . $encodedkey . ' certificate failed.'); - } - - $pkey_array = openssl_pkey_get_details($pkey_object); - - if ($pkey_array === false) { - throw new \RuntimeException('An attempt to get a public key as an array from a ' . $encodedkey . ' certificate failed.'); - } - - $publicKey = $pkey_array ['key']; - - $keys[$keyinfo['kid']] = new Key($publicKey, 'RS256'); - } - } else if (isset($keyinfo['n']) && isset($keyinfo['e'])) { - $pkey_object = JWK::parseKey($keyinfo); - - if ($pkey_object === false) { - throw new \RuntimeException('An attempt to read a public key from a ' . $keyinfo['n'] . ' certificate failed.'); - } - - $pkey_array = openssl_pkey_get_details($pkey_object); - - if ($pkey_array === false) { - throw new \RuntimeException('An attempt to get a public key as an array from a ' . $keyinfo['n'] . ' certificate failed.'); - } - - $publicKey = $pkey_array ['key']; - - $keys[$keyinfo['kid']] = new Key($publicKey, 'RS256');; - } - } - - return $keys; - } - - protected function getVersionUriInfix($version) - { - return - ($version == self::ENDPOINT_VERSION_2_0) - ? '/v' . self::ENDPOINT_VERSION_2_0 - : ''; - } - - /** - * Get the specified tenant's details. - * - * @param string $tenant - * @param string|null $version - * - * @return array - * @throws IdentityProviderException - */ - public function getTenantDetails($tenant, $version) - { - return $this->getOpenIdConfiguration($this->tenant, $this->defaultEndPointVersion); - } - - /** - * @inheritdoc - */ - protected function checkResponse(ResponseInterface $response, $data): void - { - if (isset($data['odata.error']) || isset($data['error'])) { - if (isset($data['odata.error']['message']['value'])) { - $message = $data['odata.error']['message']['value']; - } elseif (isset($data['error']['message'])) { - $message = $data['error']['message']; - } elseif (isset($data['error']) && !is_array($data['error'])) { - $message = $data['error']; - } else { - $message = $response->getReasonPhrase(); - } - - if (isset($data['error_description']) && !is_array($data['error_description'])) { - $message .= PHP_EOL . $data['error_description']; - } - - throw new IdentityProviderException( - $message, - $response->getStatusCode(), - $response->getBody() - ); - } - } - - /** - * @inheritdoc - */ - protected function getDefaultScopes(): array - { - return $this->scope; - } - - /** - * @inheritdoc - */ - protected function getScopeSeparator(): string - { - return $this->scopeSeparator; - } - - /** - * @inheritdoc - */ - protected function createAccessToken(array $response, AbstractGrant $grant): AccessToken - { - return new AccessToken($response, $this); - } - - /** - * @inheritdoc - */ - protected function createResourceOwner(array $response, \League\OAuth2\Client\Token\AccessToken $token): AzureResourceOwner - { - return new AzureResourceOwner($response); - } - - private function wrapResponse($response) - { - if (empty($response)) { - return; - } elseif (isset($response['value'])) { - return $response['value']; - } - - return $response; - } -} diff --git a/lib/thenetworg/oauth2-azure/src/Provider/AzureResourceOwner.php b/lib/thenetworg/oauth2-azure/src/Provider/AzureResourceOwner.php deleted file mode 100644 index 337ae5125..000000000 --- a/lib/thenetworg/oauth2-azure/src/Provider/AzureResourceOwner.php +++ /dev/null @@ -1,97 +0,0 @@ -data = $data; - } - - /** - * Retrieves id of resource owner. - * - * @return string|null - */ - public function getId() - { - return $this->claim('oid'); - } - - /** - * Retrieves first name of resource owner. - * - * @return string|null - */ - public function getFirstName() - { - return $this->claim('given_name'); - } - - /** - * Retrieves last name of resource owner. - * - * @return string|null - */ - public function getLastName() - { - return $this->claim('family_name'); - } - - /** - * Retrieves user principal name of resource owner. - * - * @return string|null - */ - public function getUpn() - { - return $this->claim('upn'); - } - - /** - * Retrieves tenant id of resource owner. - * - * @return string|null - */ - public function getTenantId() - { - return $this->claim('tid'); - } - - /** - * Returns a field from the parsed JWT data. - * - * @param string $name - * - * @return mixed|null - */ - public function claim($name) - { - return isset($this->data[$name]) ? $this->data[$name] : null; - } - - /** - * Returns all the data obtained about the user. - * - * @return array - */ - public function toArray() - { - return $this->data; - } -} diff --git a/lib/thenetworg/oauth2-azure/src/Token/AccessToken.php b/lib/thenetworg/oauth2-azure/src/Token/AccessToken.php deleted file mode 100644 index 7de80f9e5..000000000 --- a/lib/thenetworg/oauth2-azure/src/Token/AccessToken.php +++ /dev/null @@ -1,73 +0,0 @@ -idToken = $options['id_token']; - - unset($this->values['id_token']); - - $keys = $provider->getJwtVerificationKeys(); - $idTokenClaims = null; - try { - $tks = explode('.', $this->idToken); - // Check if the id_token contains signature - if (3 == count($tks) && !empty($tks[2])) { - $idTokenClaims = (array)JWT::decode($this->idToken, $keys, ['RS256']); - } else { - // The id_token is unsigned (coming from v1.0 endpoint) - https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx - - // Since idToken is not signed, we just do OAuth2 flow without validating the id_token - // // Validate the access_token signature first by parsing it as JWT into claims - // $accessTokenClaims = (array)JWT::decode($options['access_token'], $keys, ['RS256']); - // Then parse the idToken claims only without validating the signature - $idTokenClaims = (array)JWT::jsonDecode(JWT::urlsafeB64Decode($tks[1])); - } - } catch (JWT_Exception $e) { - throw new RuntimeException('Unable to parse the id_token!'); - } - - $provider->validateTokenClaims($idTokenClaims); - - $this->idTokenClaims = $idTokenClaims; - } - } - - public function getIdToken() - { - return $this->idToken; - } - - public function getIdTokenClaims() - { - return $this->idTokenClaims; - } - - /** - * @inheritdoc - */ - public function jsonSerialize() - { - $parameters = parent::jsonSerialize(); - - if ($this->idToken) { - $parameters['id_token'] = $this->idToken; - } - - return $parameters; - } -} diff --git a/lib/twig/twig/.editorconfig b/lib/twig/twig/.editorconfig deleted file mode 100644 index 270f1d1b7..000000000 --- a/lib/twig/twig/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -; top-most EditorConfig file -root = true - -; Unix-style newlines -[*] -end_of_line = LF - -[*.php] -indent_style = space -indent_size = 4 - -[*.test] -indent_style = space -indent_size = 4 - -[*.rst] -indent_style = space -indent_size = 4 diff --git a/lib/twig/twig/.gitattributes b/lib/twig/twig/.gitattributes deleted file mode 100644 index 06bc36713..000000000 --- a/lib/twig/twig/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -/doc/ export-ignore -/extra/ export-ignore -/tests/ export-ignore -/phpunit.xml.dist export-ignore diff --git a/lib/twig/twig/.github/workflows/ci.yml b/lib/twig/twig/.github/workflows/ci.yml deleted file mode 100644 index 50f23f9a4..000000000 --- a/lib/twig/twig/.github/workflows/ci.yml +++ /dev/null @@ -1,149 +0,0 @@ -name: "CI" - -on: - pull_request: - push: - branches: - - '3.x' - -env: - SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1 - -permissions: - contents: read - -jobs: - tests: - name: "PHP ${{ matrix.php-version }}" - - runs-on: 'ubuntu-latest' - - continue-on-error: ${{ matrix.experimental }} - - strategy: - matrix: - php-version: - - '7.2.5' - - '7.3' - - '7.4' - - '8.0' - - '8.1' - experimental: [false] - - steps: - - name: "Checkout code" - uses: actions/checkout@v2 - - - name: "Install PHP with extensions" - uses: shivammathur/setup-php@v2 - with: - coverage: "none" - php-version: ${{ matrix.php-version }} - ini-values: memory_limit=-1 - - - name: "Add PHPUnit matcher" - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - run: composer install - - - name: "Install PHPUnit" - run: vendor/bin/simple-phpunit install - - - name: "PHPUnit version" - run: vendor/bin/simple-phpunit --version - - - name: "Run tests" - run: vendor/bin/simple-phpunit - - extension-tests: - needs: - - 'tests' - - name: "${{ matrix.extension }} with PHP ${{ matrix.php-version }}" - - runs-on: 'ubuntu-latest' - - continue-on-error: true - - strategy: - matrix: - php-version: - - '7.2.5' - - '7.3' - - '7.4' - - '8.0' - - '8.1' - extension: - - 'extra/cache-extra' - - 'extra/cssinliner-extra' - - 'extra/html-extra' - - 'extra/inky-extra' - - 'extra/intl-extra' - - 'extra/markdown-extra' - - 'extra/string-extra' - - 'extra/twig-extra-bundle' - experimental: [false] - - steps: - - name: "Checkout code" - uses: actions/checkout@v2 - - - name: "Install PHP with extensions" - uses: shivammathur/setup-php@v2 - with: - coverage: "none" - php-version: ${{ matrix.php-version }} - ini-values: memory_limit=-1 - - - name: "Add PHPUnit matcher" - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - run: composer install - - - name: "Install PHPUnit" - run: vendor/bin/simple-phpunit install - - - name: "PHPUnit version" - run: vendor/bin/simple-phpunit --version - - - name: "Composer install" - working-directory: ${{ matrix.extension}} - run: composer install - - - name: "Run tests" - working-directory: ${{ matrix.extension}} - run: ../../vendor/bin/simple-phpunit - -# -# Drupal does not support Twig 3 now! -# -# integration-tests: -# needs: -# - 'tests' -# -# name: "Integration tests with PHP ${{ matrix.php-version }}" -# -# runs-on: 'ubuntu-20.04' -# -# continue-on-error: true -# -# strategy: -# matrix: -# php-version: -# - '7.3' -# -# steps: -# - name: "Checkout code" -# uses: actions/checkout@v2 -# -# - name: "Install PHP with extensions" -# uses: shivammathur/setup-php@2 -# with: -# coverage: "none" -# extensions: "gd, pdo_sqlite" -# php-version: ${{ matrix.php-version }} -# ini-values: memory_limit=-1 -# tools: composer:v2 -# -# - run: bash ./tests/drupal_test.sh -# shell: "bash" diff --git a/lib/twig/twig/.github/workflows/documentation.yml b/lib/twig/twig/.github/workflows/documentation.yml deleted file mode 100644 index ee83b5887..000000000 --- a/lib/twig/twig/.github/workflows/documentation.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: "Documentation" - -on: - pull_request: - push: - branches: - - '2.x' - - '3.x' - -permissions: - contents: read - -jobs: - build: - name: "Build" - - runs-on: ubuntu-latest - - steps: - - name: "Checkout code" - uses: actions/checkout@v2 - - - name: "Set-up PHP" - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - coverage: none - tools: "composer:v2" - - - name: Get composer cache directory - id: composercache - working-directory: doc/_build - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: "Install dependencies" - working-directory: doc/_build - run: composer install --prefer-dist --no-progress - - - name: "Build the docs" - working-directory: doc/_build - run: php build.php --disable-cache - - doctor-rst: - name: "DOCtor-RST" - - runs-on: ubuntu-latest - - steps: - - name: "Checkout code" - uses: actions/checkout@v2 - - - name: "Run DOCtor-RST" - uses: docker://oskarstark/doctor-rst - with: - args: --short - env: - DOCS_DIR: 'doc/' diff --git a/lib/twig/twig/.gitignore b/lib/twig/twig/.gitignore deleted file mode 100644 index b197246ba..000000000 --- a/lib/twig/twig/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/doc/_build/vendor -/doc/_build/output -/composer.lock -/phpunit.xml -/vendor -.phpunit.result.cache diff --git a/lib/twig/twig/.php-cs-fixer.dist.php b/lib/twig/twig/.php-cs-fixer.dist.php deleted file mode 100644 index b07ac7fca..000000000 --- a/lib/twig/twig/.php-cs-fixer.dist.php +++ /dev/null @@ -1,20 +0,0 @@ -setRules([ - '@Symfony' => true, - '@Symfony:risky' => true, - '@PHPUnit75Migration:risky' => true, - 'php_unit_dedicate_assert' => ['target' => '5.6'], - 'array_syntax' => ['syntax' => 'short'], - 'php_unit_fqcn_annotation' => true, - 'no_unreachable_default_argument_value' => false, - 'braces' => ['allow_single_line_closure' => true], - 'heredoc_to_nowdoc' => false, - 'ordered_imports' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'], - ]) - ->setRiskyAllowed(true) - ->setFinder((new PhpCsFixer\Finder())->in(__DIR__)) -; diff --git a/lib/twig/twig/CHANGELOG b/lib/twig/twig/CHANGELOG deleted file mode 100644 index 379387644..000000000 --- a/lib/twig/twig/CHANGELOG +++ /dev/null @@ -1,150 +0,0 @@ -# 3.4.3 (2022-09-28) - - * Fix a security issue on filesystem loader (possibility to load a template outside a configured directory) - -# 3.4.2 (2022-08-12) - - * Allow inherited magic method to still run with calling class - * Fix CallExpression::reflectCallable() throwing TypeError - * Fix typo in naming (currency_code) - -# 3.4.1 (2022-05-17) - -* Fix optimizing non-public named closures - -# 3.4.0 (2022-05-22) - - * Add support for named closures - -# 3.3.10 (2022-04-06) - - * Enable bytecode invalidation when auto_reload is enabled - -# 3.3.9 (2022-03-25) - - * Fix custom escapers when using multiple Twig environments - * Add support for "constant('class', object)" - * Do not reuse internally generated variable names during parsing - -# 3.3.8 (2022-02-04) - - * Fix a security issue when in a sandbox: the `sort` filter must require a Closure for the `arrow` parameter - * Fix deprecation notice on `round` - * Fix call to deprecated `convertToHtml` method - -# 3.3.7 (2022-01-03) - -* Allow more null support when Twig expects a string (for better 8.1 support) -* Only use Commonmark extensions if markdown enabled - -# 3.3.6 (2022-01-03) - -* Only use Commonmark extensions if markdown enabled - -# 3.3.5 (2022-01-03) - -* Allow CommonMark extensions to easily be added -* Allow null when Twig expects a string (for better 8.1 support) -* Make some performance optimizations -* Allow Symfony translation contract v3+ - -# 3.3.4 (2021-11-25) - - * Bump minimum supported Symfony component versions - * Fix a deprecated message - -# 3.3.3 (2021-09-17) - - * Allow Symfony 6 - * Improve compatibility with PHP 8.1 - * Explicitly specify the encoding for mb_ord in JS escaper - -# 3.3.2 (2021-05-16) - - * Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)" - -# 3.3.1 (2021-05-12) - - * Fix PHP 8.1 compatibility - * Throw a proper exception when a template name is an absolute path (as it has never been supported) - -# 3.3.0 (2021-02-08) - - * Fix macro calls in a "cache" tag - * Add the slug filter - * Allow extra bundle to be compatible with Twig 2 - -# 3.2.1 (2021-01-05) - - * Fix extra bundle compat with older versions of Symfony - -# 3.2.0 (2021-01-05) - - * Add the Cache extension in the "extra" repositories: "cache" tag - * Add "registerUndefinedTokenParserCallback" - * Mark built-in node visitors as @internal - * Fix "odd" not working for negative numbers - -# 3.1.1 (2020-10-27) - - * Fix "include(template_from_string())" - -# 3.1.0 (2020-10-21) - - * Fix sandbox support when using "include(template_from_string())" - * Make round brackets optional for one argument tests like "same as" or "divisible by" - * Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a } - -# 3.0.5 (2020-08-05) - - * Fix twig_compare w.r.t. whitespace trimming - * Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag - * Fix a regression when not using a space before an operator - * Restrict callables to closures in filters - * Allow trailing commas in argument lists (in calls as well as definitions) - -# 3.0.4 (2020-07-05) - - * Fix comparison operators - * Fix options not taken into account when using "Michelf\MarkdownExtra" - * Fix "Twig\Extra\Intl\IntlExtension::getCountryName()" to accept "null" as a first argument - * Throw exception in case non-Traversable data is passed to "filter" - * Fix context optimization on PHP 7.4 - * Fix PHP 8 compatibility - * Fix ambiguous syntax parsing - -# 3.0.3 (2020-02-11) - - * Add a check to ensure that iconv() is defined - -# 3.0.2 (2020-02-11) - - * Avoid exceptions when an intl resource is not found - * Fix implementation of case-insensitivity for method names - -# 3.0.1 (2019-12-28) - - * fixed Symfony 5.0 support for the HTML extra extension - -# 3.0.0 (2019-11-15) - - * fixed number formatter in Intl extra extension when using a formatter prototype - -# 3.0.0-BETA1 (2019-11-11) - - * removed the "if" condition support on the "for" tag - * made the in, <, >, <=, >=, ==, and != operators more strict when comparing strings and integers/floats - * removed the "filter" tag - * added type hints everywhere - * changed Environment::resolveTemplate() to always return a TemplateWrapper instance - * removed Template::__toString() - * removed Parser::isReservedMacroName() - * removed SanboxedPrintNode - * removed Node::setTemplateName() - * made classes maked as "@final" final - * removed InitRuntimeInterface, ExistsLoaderInterface, and SourceContextLoaderInterface - * removed the "spaceless" tag - * removed Twig\Environment::getBaseTemplateClass() and Twig\Environment::setBaseTemplateClass() - * removed the "base_template_class" option on Twig\Environment - * bumped minimum PHP version to 7.2 - * removed PSR-0 classes diff --git a/lib/twig/twig/LICENSE b/lib/twig/twig/LICENSE deleted file mode 100644 index 8711927f6..000000000 --- a/lib/twig/twig/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009-2022 by the Twig Team. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Twig nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/twig/twig/README.rst b/lib/twig/twig/README.rst deleted file mode 100644 index fbe7e9a9f..000000000 --- a/lib/twig/twig/README.rst +++ /dev/null @@ -1,23 +0,0 @@ -Twig, the flexible, fast, and secure template language for PHP -============================================================== - -Twig is a template language for PHP. - -Twig uses a syntax similar to the Django and Jinja template languages which -inspired the Twig runtime environment. - -Sponsors --------- - -.. raw:: html - - - Blackfire.io - - -More Information ----------------- - -Read the `documentation`_ for more information. - -.. _documentation: https://twig.symfony.com/documentation diff --git a/lib/twig/twig/composer.json b/lib/twig/twig/composer.json deleted file mode 100644 index 33e46405c..000000000 --- a/lib/twig/twig/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "twig/twig", - "type": "library", - "description": "Twig, the flexible, fast, and secure template language for PHP", - "keywords": ["templating"], - "homepage": "https://twig.symfony.com", - "license": "BSD-3-Clause", - "minimum-stability": "dev", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0", - "psr/container": "^1.0" - }, - "autoload": { - "psr-4" : { - "Twig\\" : "src/" - } - }, - "autoload-dev": { - "psr-4" : { - "Twig\\Tests\\" : "tests/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - } -} diff --git a/lib/twig/twig/src/Cache/CacheInterface.php b/lib/twig/twig/src/Cache/CacheInterface.php deleted file mode 100644 index 6e8c409be..000000000 --- a/lib/twig/twig/src/Cache/CacheInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -interface CacheInterface -{ - /** - * Generates a cache key for the given template class name. - */ - public function generateKey(string $name, string $className): string; - - /** - * Writes the compiled template to cache. - * - * @param string $content The template representation as a PHP class - */ - public function write(string $key, string $content): void; - - /** - * Loads a template from the cache. - */ - public function load(string $key): void; - - /** - * Returns the modification timestamp of a key. - */ - public function getTimestamp(string $key): int; -} diff --git a/lib/twig/twig/src/Cache/FilesystemCache.php b/lib/twig/twig/src/Cache/FilesystemCache.php deleted file mode 100644 index e075563ae..000000000 --- a/lib/twig/twig/src/Cache/FilesystemCache.php +++ /dev/null @@ -1,87 +0,0 @@ - - */ -class FilesystemCache implements CacheInterface -{ - public const FORCE_BYTECODE_INVALIDATION = 1; - - private $directory; - private $options; - - public function __construct(string $directory, int $options = 0) - { - $this->directory = rtrim($directory, '\/').'/'; - $this->options = $options; - } - - public function generateKey(string $name, string $className): string - { - $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $className); - - return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php'; - } - - public function load(string $key): void - { - if (is_file($key)) { - @include_once $key; - } - } - - public function write(string $key, string $content): void - { - $dir = \dirname($key); - if (!is_dir($dir)) { - if (false === @mkdir($dir, 0777, true)) { - clearstatcache(true, $dir); - if (!is_dir($dir)) { - throw new \RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir)); - } - } - } elseif (!is_writable($dir)) { - throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir)); - } - - $tmpFile = tempnam($dir, basename($key)); - if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) { - @chmod($key, 0666 & ~umask()); - - if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) { - // Compile cached file into bytecode cache - if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) { - @opcache_invalidate($key, true); - } elseif (\function_exists('apc_compile_file')) { - apc_compile_file($key); - } - } - - return; - } - - throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $key)); - } - - public function getTimestamp(string $key): int - { - if (!is_file($key)) { - return 0; - } - - return (int) @filemtime($key); - } -} diff --git a/lib/twig/twig/src/Cache/NullCache.php b/lib/twig/twig/src/Cache/NullCache.php deleted file mode 100644 index 8d20d59d8..000000000 --- a/lib/twig/twig/src/Cache/NullCache.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -final class NullCache implements CacheInterface -{ - public function generateKey(string $name, string $className): string - { - return ''; - } - - public function write(string $key, string $content): void - { - } - - public function load(string $key): void - { - } - - public function getTimestamp(string $key): int - { - return 0; - } -} diff --git a/lib/twig/twig/src/Compiler.php b/lib/twig/twig/src/Compiler.php deleted file mode 100644 index 95e1f183b..000000000 --- a/lib/twig/twig/src/Compiler.php +++ /dev/null @@ -1,214 +0,0 @@ - - */ -class Compiler -{ - private $lastLine; - private $source; - private $indentation; - private $env; - private $debugInfo = []; - private $sourceOffset; - private $sourceLine; - private $varNameSalt = 0; - - public function __construct(Environment $env) - { - $this->env = $env; - } - - public function getEnvironment(): Environment - { - return $this->env; - } - - public function getSource(): string - { - return $this->source; - } - - /** - * @return $this - */ - public function compile(Node $node, int $indentation = 0) - { - $this->lastLine = null; - $this->source = ''; - $this->debugInfo = []; - $this->sourceOffset = 0; - // source code starts at 1 (as we then increment it when we encounter new lines) - $this->sourceLine = 1; - $this->indentation = $indentation; - $this->varNameSalt = 0; - - $node->compile($this); - - return $this; - } - - /** - * @return $this - */ - public function subcompile(Node $node, bool $raw = true) - { - if (false === $raw) { - $this->source .= str_repeat(' ', $this->indentation * 4); - } - - $node->compile($this); - - return $this; - } - - /** - * Adds a raw string to the compiled code. - * - * @return $this - */ - public function raw(string $string) - { - $this->source .= $string; - - return $this; - } - - /** - * Writes a string to the compiled code by adding indentation. - * - * @return $this - */ - public function write(...$strings) - { - foreach ($strings as $string) { - $this->source .= str_repeat(' ', $this->indentation * 4).$string; - } - - return $this; - } - - /** - * Adds a quoted string to the compiled code. - * - * @return $this - */ - public function string(string $value) - { - $this->source .= sprintf('"%s"', addcslashes($value, "\0\t\"\$\\")); - - return $this; - } - - /** - * Returns a PHP representation of a given value. - * - * @return $this - */ - public function repr($value) - { - if (\is_int($value) || \is_float($value)) { - if (false !== $locale = setlocale(\LC_NUMERIC, '0')) { - setlocale(\LC_NUMERIC, 'C'); - } - - $this->raw(var_export($value, true)); - - if (false !== $locale) { - setlocale(\LC_NUMERIC, $locale); - } - } elseif (null === $value) { - $this->raw('null'); - } elseif (\is_bool($value)) { - $this->raw($value ? 'true' : 'false'); - } elseif (\is_array($value)) { - $this->raw('array('); - $first = true; - foreach ($value as $key => $v) { - if (!$first) { - $this->raw(', '); - } - $first = false; - $this->repr($key); - $this->raw(' => '); - $this->repr($v); - } - $this->raw(')'); - } else { - $this->string($value); - } - - return $this; - } - - /** - * @return $this - */ - public function addDebugInfo(Node $node) - { - if ($node->getTemplateLine() != $this->lastLine) { - $this->write(sprintf("// line %d\n", $node->getTemplateLine())); - - $this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset); - $this->sourceOffset = \strlen($this->source); - $this->debugInfo[$this->sourceLine] = $node->getTemplateLine(); - - $this->lastLine = $node->getTemplateLine(); - } - - return $this; - } - - public function getDebugInfo(): array - { - ksort($this->debugInfo); - - return $this->debugInfo; - } - - /** - * @return $this - */ - public function indent(int $step = 1) - { - $this->indentation += $step; - - return $this; - } - - /** - * @return $this - * - * @throws \LogicException When trying to outdent too much so the indentation would become negative - */ - public function outdent(int $step = 1) - { - // can't outdent by more steps than the current indentation level - if ($this->indentation < $step) { - throw new \LogicException('Unable to call outdent() as the indentation would become negative.'); - } - - $this->indentation -= $step; - - return $this; - } - - public function getVarName(): string - { - return sprintf('__internal_compile_%d', $this->varNameSalt++); - } -} diff --git a/lib/twig/twig/src/Environment.php b/lib/twig/twig/src/Environment.php deleted file mode 100644 index 85aaab916..000000000 --- a/lib/twig/twig/src/Environment.php +++ /dev/null @@ -1,832 +0,0 @@ - - */ -class Environment -{ - public const VERSION = '3.4.3'; - public const VERSION_ID = 30403; - public const MAJOR_VERSION = 3; - public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 3; - public const EXTRA_VERSION = ''; - - private $charset; - private $loader; - private $debug; - private $autoReload; - private $cache; - private $lexer; - private $parser; - private $compiler; - private $globals = []; - private $resolvedGlobals; - private $loadedTemplates; - private $strictVariables; - private $templateClassPrefix = '__TwigTemplate_'; - private $originalCache; - private $extensionSet; - private $runtimeLoaders = []; - private $runtimes = []; - private $optionsHash; - - /** - * Constructor. - * - * Available options: - * - * * debug: When set to true, it automatically set "auto_reload" to true as - * well (default to false). - * - * * charset: The charset used by the templates (default to UTF-8). - * - * * cache: An absolute path where to store the compiled templates, - * a \Twig\Cache\CacheInterface implementation, - * or false to disable compilation cache (default). - * - * * auto_reload: Whether to reload the template if the original source changed. - * If you don't provide the auto_reload option, it will be - * determined automatically based on the debug value. - * - * * strict_variables: Whether to ignore invalid variables in templates - * (default to false). - * - * * autoescape: Whether to enable auto-escaping (default to html): - * * false: disable auto-escaping - * * html, js: set the autoescaping to one of the supported strategies - * * name: set the autoescaping strategy based on the template name extension - * * PHP callback: a PHP callback that returns an escaping strategy based on the template "name" - * - * * optimizations: A flag that indicates which optimizations to apply - * (default to -1 which means that all optimizations are enabled; - * set it to 0 to disable). - */ - public function __construct(LoaderInterface $loader, $options = []) - { - $this->setLoader($loader); - - $options = array_merge([ - 'debug' => false, - 'charset' => 'UTF-8', - 'strict_variables' => false, - 'autoescape' => 'html', - 'cache' => false, - 'auto_reload' => null, - 'optimizations' => -1, - ], $options); - - $this->debug = (bool) $options['debug']; - $this->setCharset($options['charset'] ?? 'UTF-8'); - $this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload']; - $this->strictVariables = (bool) $options['strict_variables']; - $this->setCache($options['cache']); - $this->extensionSet = new ExtensionSet(); - - $this->addExtension(new CoreExtension()); - $this->addExtension(new EscaperExtension($options['autoescape'])); - $this->addExtension(new OptimizerExtension($options['optimizations'])); - } - - /** - * Enables debugging mode. - */ - public function enableDebug() - { - $this->debug = true; - $this->updateOptionsHash(); - } - - /** - * Disables debugging mode. - */ - public function disableDebug() - { - $this->debug = false; - $this->updateOptionsHash(); - } - - /** - * Checks if debug mode is enabled. - * - * @return bool true if debug mode is enabled, false otherwise - */ - public function isDebug() - { - return $this->debug; - } - - /** - * Enables the auto_reload option. - */ - public function enableAutoReload() - { - $this->autoReload = true; - } - - /** - * Disables the auto_reload option. - */ - public function disableAutoReload() - { - $this->autoReload = false; - } - - /** - * Checks if the auto_reload option is enabled. - * - * @return bool true if auto_reload is enabled, false otherwise - */ - public function isAutoReload() - { - return $this->autoReload; - } - - /** - * Enables the strict_variables option. - */ - public function enableStrictVariables() - { - $this->strictVariables = true; - $this->updateOptionsHash(); - } - - /** - * Disables the strict_variables option. - */ - public function disableStrictVariables() - { - $this->strictVariables = false; - $this->updateOptionsHash(); - } - - /** - * Checks if the strict_variables option is enabled. - * - * @return bool true if strict_variables is enabled, false otherwise - */ - public function isStrictVariables() - { - return $this->strictVariables; - } - - /** - * Gets the current cache implementation. - * - * @param bool $original Whether to return the original cache option or the real cache instance - * - * @return CacheInterface|string|false A Twig\Cache\CacheInterface implementation, - * an absolute path to the compiled templates, - * or false to disable cache - */ - public function getCache($original = true) - { - return $original ? $this->originalCache : $this->cache; - } - - /** - * Sets the current cache implementation. - * - * @param CacheInterface|string|false $cache A Twig\Cache\CacheInterface implementation, - * an absolute path to the compiled templates, - * or false to disable cache - */ - public function setCache($cache) - { - if (\is_string($cache)) { - $this->originalCache = $cache; - $this->cache = new FilesystemCache($cache, $this->autoReload ? FilesystemCache::FORCE_BYTECODE_INVALIDATION : 0); - } elseif (false === $cache) { - $this->originalCache = $cache; - $this->cache = new NullCache(); - } elseif ($cache instanceof CacheInterface) { - $this->originalCache = $this->cache = $cache; - } else { - throw new \LogicException('Cache can only be a string, false, or a \Twig\Cache\CacheInterface implementation.'); - } - } - - /** - * Gets the template class associated with the given string. - * - * The generated template class is based on the following parameters: - * - * * The cache key for the given template; - * * The currently enabled extensions; - * * Whether the Twig C extension is available or not; - * * PHP version; - * * Twig version; - * * Options with what environment was created. - * - * @param string $name The name for which to calculate the template class name - * @param int|null $index The index if it is an embedded template - * - * @internal - */ - public function getTemplateClass(string $name, int $index = null): string - { - $key = $this->getLoader()->getCacheKey($name).$this->optionsHash; - - return $this->templateClassPrefix.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $key).(null === $index ? '' : '___'.$index); - } - - /** - * Renders a template. - * - * @param string|TemplateWrapper $name The template name - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - * @throws RuntimeError When an error occurred during rendering - */ - public function render($name, array $context = []): string - { - return $this->load($name)->render($context); - } - - /** - * Displays a template. - * - * @param string|TemplateWrapper $name The template name - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - * @throws RuntimeError When an error occurred during rendering - */ - public function display($name, array $context = []): void - { - $this->load($name)->display($context); - } - - /** - * Loads a template. - * - * @param string|TemplateWrapper $name The template name - * - * @throws LoaderError When the template cannot be found - * @throws RuntimeError When a previously generated cache is corrupted - * @throws SyntaxError When an error occurred during compilation - */ - public function load($name): TemplateWrapper - { - if ($name instanceof TemplateWrapper) { - return $name; - } - - return new TemplateWrapper($this, $this->loadTemplate($this->getTemplateClass($name), $name)); - } - - /** - * Loads a template internal representation. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The template name - * @param int $index The index if it is an embedded template - * - * @throws LoaderError When the template cannot be found - * @throws RuntimeError When a previously generated cache is corrupted - * @throws SyntaxError When an error occurred during compilation - * - * @internal - */ - public function loadTemplate(string $cls, string $name, int $index = null): Template - { - $mainCls = $cls; - if (null !== $index) { - $cls .= '___'.$index; - } - - if (isset($this->loadedTemplates[$cls])) { - return $this->loadedTemplates[$cls]; - } - - if (!class_exists($cls, false)) { - $key = $this->cache->generateKey($name, $mainCls); - - if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) { - $this->cache->load($key); - } - - $source = null; - if (!class_exists($cls, false)) { - $source = $this->getLoader()->getSourceContext($name); - $content = $this->compileSource($source); - $this->cache->write($key, $content); - $this->cache->load($key); - - if (!class_exists($mainCls, false)) { - /* Last line of defense if either $this->bcWriteCacheFile was used, - * $this->cache is implemented as a no-op or we have a race condition - * where the cache was cleared between the above calls to write to and load from - * the cache. - */ - eval('?>'.$content); - } - - if (!class_exists($cls, false)) { - throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source); - } - } - } - - $this->extensionSet->initRuntime(); - - return $this->loadedTemplates[$cls] = new $cls($this); - } - - /** - * Creates a template from source. - * - * This method should not be used as a generic way to load templates. - * - * @param string $template The template source - * @param string $name An optional name of the template to be used in error messages - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - */ - public function createTemplate(string $template, string $name = null): TemplateWrapper - { - $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $template, false); - if (null !== $name) { - $name = sprintf('%s (string template %s)', $name, $hash); - } else { - $name = sprintf('__string_template__%s', $hash); - } - - $loader = new ChainLoader([ - new ArrayLoader([$name => $template]), - $current = $this->getLoader(), - ]); - - $this->setLoader($loader); - try { - return new TemplateWrapper($this, $this->loadTemplate($this->getTemplateClass($name), $name)); - } finally { - $this->setLoader($current); - } - } - - /** - * Returns true if the template is still fresh. - * - * Besides checking the loader for freshness information, - * this method also checks if the enabled extensions have - * not changed. - * - * @param int $time The last modification time of the cached template - */ - public function isTemplateFresh(string $name, int $time): bool - { - return $this->extensionSet->getLastModified() <= $time && $this->getLoader()->isFresh($name, $time); - } - - /** - * Tries to load a template consecutively from an array. - * - * Similar to load() but it also accepts instances of \Twig\Template and - * \Twig\TemplateWrapper, and an array of templates where each is tried to be loaded. - * - * @param string|TemplateWrapper|array $names A template or an array of templates to try consecutively - * - * @throws LoaderError When none of the templates can be found - * @throws SyntaxError When an error occurred during compilation - */ - public function resolveTemplate($names): TemplateWrapper - { - if (!\is_array($names)) { - return $this->load($names); - } - - $count = \count($names); - foreach ($names as $name) { - if ($name instanceof Template) { - return $name; - } - if ($name instanceof TemplateWrapper) { - return $name; - } - - if (1 !== $count && !$this->getLoader()->exists($name)) { - continue; - } - - return $this->load($name); - } - - throw new LoaderError(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names))); - } - - public function setLexer(Lexer $lexer) - { - $this->lexer = $lexer; - } - - /** - * @throws SyntaxError When the code is syntactically wrong - */ - public function tokenize(Source $source): TokenStream - { - if (null === $this->lexer) { - $this->lexer = new Lexer($this); - } - - return $this->lexer->tokenize($source); - } - - public function setParser(Parser $parser) - { - $this->parser = $parser; - } - - /** - * Converts a token stream to a node tree. - * - * @throws SyntaxError When the token stream is syntactically or semantically wrong - */ - public function parse(TokenStream $stream): ModuleNode - { - if (null === $this->parser) { - $this->parser = new Parser($this); - } - - return $this->parser->parse($stream); - } - - public function setCompiler(Compiler $compiler) - { - $this->compiler = $compiler; - } - - /** - * Compiles a node and returns the PHP code. - */ - public function compile(Node $node): string - { - if (null === $this->compiler) { - $this->compiler = new Compiler($this); - } - - return $this->compiler->compile($node)->getSource(); - } - - /** - * Compiles a template source code. - * - * @throws SyntaxError When there was an error during tokenizing, parsing or compiling - */ - public function compileSource(Source $source): string - { - try { - return $this->compile($this->parse($this->tokenize($source))); - } catch (Error $e) { - $e->setSourceContext($source); - throw $e; - } catch (\Exception $e) { - throw new SyntaxError(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e); - } - } - - public function setLoader(LoaderInterface $loader) - { - $this->loader = $loader; - } - - public function getLoader(): LoaderInterface - { - return $this->loader; - } - - public function setCharset(string $charset) - { - if ('UTF8' === $charset = null === $charset ? null : strtoupper($charset)) { - // iconv on Windows requires "UTF-8" instead of "UTF8" - $charset = 'UTF-8'; - } - - $this->charset = $charset; - } - - public function getCharset(): string - { - return $this->charset; - } - - public function hasExtension(string $class): bool - { - return $this->extensionSet->hasExtension($class); - } - - public function addRuntimeLoader(RuntimeLoaderInterface $loader) - { - $this->runtimeLoaders[] = $loader; - } - - /** - * @template TExtension of ExtensionInterface - * - * @param class-string $class - * - * @return TExtension - */ - public function getExtension(string $class): ExtensionInterface - { - return $this->extensionSet->getExtension($class); - } - - /** - * Returns the runtime implementation of a Twig element (filter/function/tag/test). - * - * @template TRuntime of object - * - * @param class-string $class A runtime class name - * - * @return TRuntime The runtime implementation - * - * @throws RuntimeError When the template cannot be found - */ - public function getRuntime(string $class) - { - if (isset($this->runtimes[$class])) { - return $this->runtimes[$class]; - } - - foreach ($this->runtimeLoaders as $loader) { - if (null !== $runtime = $loader->load($class)) { - return $this->runtimes[$class] = $runtime; - } - } - - throw new RuntimeError(sprintf('Unable to load the "%s" runtime.', $class)); - } - - public function addExtension(ExtensionInterface $extension) - { - $this->extensionSet->addExtension($extension); - $this->updateOptionsHash(); - } - - /** - * @param ExtensionInterface[] $extensions An array of extensions - */ - public function setExtensions(array $extensions) - { - $this->extensionSet->setExtensions($extensions); - $this->updateOptionsHash(); - } - - /** - * @return ExtensionInterface[] An array of extensions (keys are for internal usage only and should not be relied on) - */ - public function getExtensions(): array - { - return $this->extensionSet->getExtensions(); - } - - public function addTokenParser(TokenParserInterface $parser) - { - $this->extensionSet->addTokenParser($parser); - } - - /** - * @return TokenParserInterface[] - * - * @internal - */ - public function getTokenParsers(): array - { - return $this->extensionSet->getTokenParsers(); - } - - /** - * @internal - */ - public function getTokenParser(string $name): ?TokenParserInterface - { - return $this->extensionSet->getTokenParser($name); - } - - public function registerUndefinedTokenParserCallback(callable $callable): void - { - $this->extensionSet->registerUndefinedTokenParserCallback($callable); - } - - public function addNodeVisitor(NodeVisitorInterface $visitor) - { - $this->extensionSet->addNodeVisitor($visitor); - } - - /** - * @return NodeVisitorInterface[] - * - * @internal - */ - public function getNodeVisitors(): array - { - return $this->extensionSet->getNodeVisitors(); - } - - public function addFilter(TwigFilter $filter) - { - $this->extensionSet->addFilter($filter); - } - - /** - * @internal - */ - public function getFilter(string $name): ?TwigFilter - { - return $this->extensionSet->getFilter($name); - } - - public function registerUndefinedFilterCallback(callable $callable): void - { - $this->extensionSet->registerUndefinedFilterCallback($callable); - } - - /** - * Gets the registered Filters. - * - * Be warned that this method cannot return filters defined with registerUndefinedFilterCallback. - * - * @return TwigFilter[] - * - * @see registerUndefinedFilterCallback - * - * @internal - */ - public function getFilters(): array - { - return $this->extensionSet->getFilters(); - } - - public function addTest(TwigTest $test) - { - $this->extensionSet->addTest($test); - } - - /** - * @return TwigTest[] - * - * @internal - */ - public function getTests(): array - { - return $this->extensionSet->getTests(); - } - - /** - * @internal - */ - public function getTest(string $name): ?TwigTest - { - return $this->extensionSet->getTest($name); - } - - public function addFunction(TwigFunction $function) - { - $this->extensionSet->addFunction($function); - } - - /** - * @internal - */ - public function getFunction(string $name): ?TwigFunction - { - return $this->extensionSet->getFunction($name); - } - - public function registerUndefinedFunctionCallback(callable $callable): void - { - $this->extensionSet->registerUndefinedFunctionCallback($callable); - } - - /** - * Gets registered functions. - * - * Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback. - * - * @return TwigFunction[] - * - * @see registerUndefinedFunctionCallback - * - * @internal - */ - public function getFunctions(): array - { - return $this->extensionSet->getFunctions(); - } - - /** - * Registers a Global. - * - * New globals can be added before compiling or rendering a template; - * but after, you can only update existing globals. - * - * @param mixed $value The global value - */ - public function addGlobal(string $name, $value) - { - if ($this->extensionSet->isInitialized() && !\array_key_exists($name, $this->getGlobals())) { - throw new \LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name)); - } - - if (null !== $this->resolvedGlobals) { - $this->resolvedGlobals[$name] = $value; - } else { - $this->globals[$name] = $value; - } - } - - /** - * @internal - */ - public function getGlobals(): array - { - if ($this->extensionSet->isInitialized()) { - if (null === $this->resolvedGlobals) { - $this->resolvedGlobals = array_merge($this->extensionSet->getGlobals(), $this->globals); - } - - return $this->resolvedGlobals; - } - - return array_merge($this->extensionSet->getGlobals(), $this->globals); - } - - public function mergeGlobals(array $context): array - { - // we don't use array_merge as the context being generally - // bigger than globals, this code is faster. - foreach ($this->getGlobals() as $key => $value) { - if (!\array_key_exists($key, $context)) { - $context[$key] = $value; - } - } - - return $context; - } - - /** - * @internal - */ - public function getUnaryOperators(): array - { - return $this->extensionSet->getUnaryOperators(); - } - - /** - * @internal - */ - public function getBinaryOperators(): array - { - return $this->extensionSet->getBinaryOperators(); - } - - private function updateOptionsHash(): void - { - $this->optionsHash = implode(':', [ - $this->extensionSet->getSignature(), - \PHP_MAJOR_VERSION, - \PHP_MINOR_VERSION, - self::VERSION, - (int) $this->debug, - (int) $this->strictVariables, - ]); - } -} diff --git a/lib/twig/twig/src/Error/Error.php b/lib/twig/twig/src/Error/Error.php deleted file mode 100644 index a68be65f2..000000000 --- a/lib/twig/twig/src/Error/Error.php +++ /dev/null @@ -1,227 +0,0 @@ - - */ -class Error extends \Exception -{ - private $lineno; - private $name; - private $rawMessage; - private $sourcePath; - private $sourceCode; - - /** - * Constructor. - * - * By default, automatic guessing is enabled. - * - * @param string $message The error message - * @param int $lineno The template line where the error occurred - * @param Source|null $source The source context where the error occurred - */ - public function __construct(string $message, int $lineno = -1, Source $source = null, \Exception $previous = null) - { - parent::__construct('', 0, $previous); - - if (null === $source) { - $name = null; - } else { - $name = $source->getName(); - $this->sourceCode = $source->getCode(); - $this->sourcePath = $source->getPath(); - } - - $this->lineno = $lineno; - $this->name = $name; - $this->rawMessage = $message; - $this->updateRepr(); - } - - public function getRawMessage(): string - { - return $this->rawMessage; - } - - public function getTemplateLine(): int - { - return $this->lineno; - } - - public function setTemplateLine(int $lineno): void - { - $this->lineno = $lineno; - - $this->updateRepr(); - } - - public function getSourceContext(): ?Source - { - return $this->name ? new Source($this->sourceCode, $this->name, $this->sourcePath) : null; - } - - public function setSourceContext(Source $source = null): void - { - if (null === $source) { - $this->sourceCode = $this->name = $this->sourcePath = null; - } else { - $this->sourceCode = $source->getCode(); - $this->name = $source->getName(); - $this->sourcePath = $source->getPath(); - } - - $this->updateRepr(); - } - - public function guess(): void - { - $this->guessTemplateInfo(); - $this->updateRepr(); - } - - public function appendMessage($rawMessage): void - { - $this->rawMessage .= $rawMessage; - $this->updateRepr(); - } - - private function updateRepr(): void - { - $this->message = $this->rawMessage; - - if ($this->sourcePath && $this->lineno > 0) { - $this->file = $this->sourcePath; - $this->line = $this->lineno; - - return; - } - - $dot = false; - if ('.' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $dot = true; - } - - $questionMark = false; - if ('?' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $questionMark = true; - } - - if ($this->name) { - if (\is_string($this->name) || (\is_object($this->name) && method_exists($this->name, '__toString'))) { - $name = sprintf('"%s"', $this->name); - } else { - $name = json_encode($this->name); - } - $this->message .= sprintf(' in %s', $name); - } - - if ($this->lineno && $this->lineno >= 0) { - $this->message .= sprintf(' at line %d', $this->lineno); - } - - if ($dot) { - $this->message .= '.'; - } - - if ($questionMark) { - $this->message .= '?'; - } - } - - private function guessTemplateInfo(): void - { - $template = null; - $templateClass = null; - - $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT); - foreach ($backtrace as $trace) { - if (isset($trace['object']) && $trace['object'] instanceof Template) { - $currentClass = \get_class($trace['object']); - $isEmbedContainer = null === $templateClass ? false : 0 === strpos($templateClass, $currentClass); - if (null === $this->name || ($this->name == $trace['object']->getTemplateName() && !$isEmbedContainer)) { - $template = $trace['object']; - $templateClass = \get_class($trace['object']); - } - } - } - - // update template name - if (null !== $template && null === $this->name) { - $this->name = $template->getTemplateName(); - } - - // update template path if any - if (null !== $template && null === $this->sourcePath) { - $src = $template->getSourceContext(); - $this->sourceCode = $src->getCode(); - $this->sourcePath = $src->getPath(); - } - - if (null === $template || $this->lineno > -1) { - return; - } - - $r = new \ReflectionObject($template); - $file = $r->getFileName(); - - $exceptions = [$e = $this]; - while ($e = $e->getPrevious()) { - $exceptions[] = $e; - } - - while ($e = array_pop($exceptions)) { - $traces = $e->getTrace(); - array_unshift($traces, ['file' => $e->getFile(), 'line' => $e->getLine()]); - - while ($trace = array_shift($traces)) { - if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) { - continue; - } - - foreach ($template->getDebugInfo() as $codeLine => $templateLine) { - if ($codeLine <= $trace['line']) { - // update template line - $this->lineno = $templateLine; - - return; - } - } - } - } - } -} diff --git a/lib/twig/twig/src/Error/LoaderError.php b/lib/twig/twig/src/Error/LoaderError.php deleted file mode 100644 index 7c8c23c19..000000000 --- a/lib/twig/twig/src/Error/LoaderError.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -class LoaderError extends Error -{ -} diff --git a/lib/twig/twig/src/Error/RuntimeError.php b/lib/twig/twig/src/Error/RuntimeError.php deleted file mode 100644 index f6b84766c..000000000 --- a/lib/twig/twig/src/Error/RuntimeError.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ -class RuntimeError extends Error -{ -} diff --git a/lib/twig/twig/src/Error/SyntaxError.php b/lib/twig/twig/src/Error/SyntaxError.php deleted file mode 100644 index 726b3309e..000000000 --- a/lib/twig/twig/src/Error/SyntaxError.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class SyntaxError extends Error -{ - /** - * Tweaks the error message to include suggestions. - * - * @param string $name The original name of the item that does not exist - * @param array $items An array of possible items - */ - public function addSuggestions(string $name, array $items): void - { - $alternatives = []; - foreach ($items as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) { - $alternatives[$item] = $lev; - } - } - - if (!$alternatives) { - return; - } - - asort($alternatives); - - $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', array_keys($alternatives)))); - } -} diff --git a/lib/twig/twig/src/ExpressionParser.php b/lib/twig/twig/src/ExpressionParser.php deleted file mode 100644 index 70b6eb05c..000000000 --- a/lib/twig/twig/src/ExpressionParser.php +++ /dev/null @@ -1,825 +0,0 @@ - - * - * @internal - */ -class ExpressionParser -{ - public const OPERATOR_LEFT = 1; - public const OPERATOR_RIGHT = 2; - - private $parser; - private $env; - private $unaryOperators; - private $binaryOperators; - - public function __construct(Parser $parser, Environment $env) - { - $this->parser = $parser; - $this->env = $env; - $this->unaryOperators = $env->getUnaryOperators(); - $this->binaryOperators = $env->getBinaryOperators(); - } - - public function parseExpression($precedence = 0, $allowArrow = false) - { - if ($allowArrow && $arrow = $this->parseArrow()) { - return $arrow; - } - - $expr = $this->getPrimary(); - $token = $this->parser->getCurrentToken(); - while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $precedence) { - $op = $this->binaryOperators[$token->getValue()]; - $this->parser->getStream()->next(); - - if ('is not' === $token->getValue()) { - $expr = $this->parseNotTestExpression($expr); - } elseif ('is' === $token->getValue()) { - $expr = $this->parseTestExpression($expr); - } elseif (isset($op['callable'])) { - $expr = $op['callable']($this->parser, $expr); - } else { - $expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']); - $class = $op['class']; - $expr = new $class($expr, $expr1, $token->getLine()); - } - - $token = $this->parser->getCurrentToken(); - } - - if (0 === $precedence) { - return $this->parseConditionalExpression($expr); - } - - return $expr; - } - - /** - * @return ArrowFunctionExpression|null - */ - private function parseArrow() - { - $stream = $this->parser->getStream(); - - // short array syntax (one argument, no parentheses)? - if ($stream->look(1)->test(/* Token::ARROW_TYPE */ 12)) { - $line = $stream->getCurrent()->getLine(); - $token = $stream->expect(/* Token::NAME_TYPE */ 5); - $names = [new AssignNameExpression($token->getValue(), $token->getLine())]; - $stream->expect(/* Token::ARROW_TYPE */ 12); - - return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line); - } - - // first, determine if we are parsing an arrow function by finding => (long form) - $i = 0; - if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - return null; - } - ++$i; - while (true) { - // variable name - ++$i; - if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - ++$i; - } - if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) { - return null; - } - ++$i; - if (!$stream->look($i)->test(/* Token::ARROW_TYPE */ 12)) { - return null; - } - - // yes, let's parse it properly - $token = $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '('); - $line = $token->getLine(); - - $names = []; - while (true) { - $token = $stream->expect(/* Token::NAME_TYPE */ 5); - $names[] = new AssignNameExpression($token->getValue(), $token->getLine()); - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ')'); - $stream->expect(/* Token::ARROW_TYPE */ 12); - - return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line); - } - - private function getPrimary(): AbstractExpression - { - $token = $this->parser->getCurrentToken(); - - if ($this->isUnary($token)) { - $operator = $this->unaryOperators[$token->getValue()]; - $this->parser->getStream()->next(); - $expr = $this->parseExpression($operator['precedence']); - $class = $operator['class']; - - return $this->parsePostfixExpression(new $class($expr, $token->getLine())); - } elseif ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $this->parser->getStream()->next(); - $expr = $this->parseExpression(); - $this->parser->getStream()->expect(/* Token::PUNCTUATION_TYPE */ 9, ')', 'An opened parenthesis is not properly closed'); - - return $this->parsePostfixExpression($expr); - } - - return $this->parsePrimaryExpression(); - } - - private function parseConditionalExpression($expr): AbstractExpression - { - while ($this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, '?')) { - if (!$this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $expr2 = $this->parseExpression(); - if ($this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $expr3 = $this->parseExpression(); - } else { - $expr3 = new ConstantExpression('', $this->parser->getCurrentToken()->getLine()); - } - } else { - $expr2 = $expr; - $expr3 = $this->parseExpression(); - } - - $expr = new ConditionalExpression($expr, $expr2, $expr3, $this->parser->getCurrentToken()->getLine()); - } - - return $expr; - } - - private function isUnary(Token $token): bool - { - return $token->test(/* Token::OPERATOR_TYPE */ 8) && isset($this->unaryOperators[$token->getValue()]); - } - - private function isBinary(Token $token): bool - { - return $token->test(/* Token::OPERATOR_TYPE */ 8) && isset($this->binaryOperators[$token->getValue()]); - } - - public function parsePrimaryExpression() - { - $token = $this->parser->getCurrentToken(); - switch ($token->getType()) { - case /* Token::NAME_TYPE */ 5: - $this->parser->getStream()->next(); - switch ($token->getValue()) { - case 'true': - case 'TRUE': - $node = new ConstantExpression(true, $token->getLine()); - break; - - case 'false': - case 'FALSE': - $node = new ConstantExpression(false, $token->getLine()); - break; - - case 'none': - case 'NONE': - case 'null': - case 'NULL': - $node = new ConstantExpression(null, $token->getLine()); - break; - - default: - if ('(' === $this->parser->getCurrentToken()->getValue()) { - $node = $this->getFunctionNode($token->getValue(), $token->getLine()); - } else { - $node = new NameExpression($token->getValue(), $token->getLine()); - } - } - break; - - case /* Token::NUMBER_TYPE */ 6: - $this->parser->getStream()->next(); - $node = new ConstantExpression($token->getValue(), $token->getLine()); - break; - - case /* Token::STRING_TYPE */ 7: - case /* Token::INTERPOLATION_START_TYPE */ 10: - $node = $this->parseStringExpression(); - break; - - case /* Token::OPERATOR_TYPE */ 8: - if (preg_match(Lexer::REGEX_NAME, $token->getValue(), $matches) && $matches[0] == $token->getValue()) { - // in this context, string operators are variable names - $this->parser->getStream()->next(); - $node = new NameExpression($token->getValue(), $token->getLine()); - break; - } - - if (isset($this->unaryOperators[$token->getValue()])) { - $class = $this->unaryOperators[$token->getValue()]['class']; - if (!\in_array($class, [NegUnary::class, PosUnary::class])) { - throw new SyntaxError(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } - - $this->parser->getStream()->next(); - $expr = $this->parsePrimaryExpression(); - - $node = new $class($expr, $token->getLine()); - break; - } - - // no break - default: - if ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '[')) { - $node = $this->parseArrayExpression(); - } elseif ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '{')) { - $node = $this->parseHashExpression(); - } elseif ($token->test(/* Token::OPERATOR_TYPE */ 8, '=') && ('==' === $this->parser->getStream()->look(-1)->getValue() || '!=' === $this->parser->getStream()->look(-1)->getValue())) { - throw new SyntaxError(sprintf('Unexpected operator of value "%s". Did you try to use "===" or "!==" for strict comparison? Use "is same as(value)" instead.', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } else { - throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } - } - - return $this->parsePostfixExpression($node); - } - - public function parseStringExpression() - { - $stream = $this->parser->getStream(); - - $nodes = []; - // a string cannot be followed by another string in a single expression - $nextCanBeString = true; - while (true) { - if ($nextCanBeString && $token = $stream->nextIf(/* Token::STRING_TYPE */ 7)) { - $nodes[] = new ConstantExpression($token->getValue(), $token->getLine()); - $nextCanBeString = false; - } elseif ($stream->nextIf(/* Token::INTERPOLATION_START_TYPE */ 10)) { - $nodes[] = $this->parseExpression(); - $stream->expect(/* Token::INTERPOLATION_END_TYPE */ 11); - $nextCanBeString = true; - } else { - break; - } - } - - $expr = array_shift($nodes); - foreach ($nodes as $node) { - $expr = new ConcatBinary($expr, $node, $node->getTemplateLine()); - } - - return $expr; - } - - public function parseArrayExpression() - { - $stream = $this->parser->getStream(); - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '[', 'An array element was expected'); - - $node = new ArrayExpression([], $stream->getCurrent()->getLine()); - $first = true; - while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) { - if (!$first) { - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'An array element must be followed by a comma'); - - // trailing ,? - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) { - break; - } - } - $first = false; - - $node->addElement($this->parseExpression()); - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']', 'An opened array is not properly closed'); - - return $node; - } - - public function parseHashExpression() - { - $stream = $this->parser->getStream(); - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '{', 'A hash element was expected'); - - $node = new ArrayExpression([], $stream->getCurrent()->getLine()); - $first = true; - while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, '}')) { - if (!$first) { - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'A hash value must be followed by a comma'); - - // trailing ,? - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '}')) { - break; - } - } - $first = false; - - // a hash key can be: - // - // * a number -- 12 - // * a string -- 'a' - // * a name, which is equivalent to a string -- a - // * an expression, which must be enclosed in parentheses -- (1 + 2) - if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) { - $key = new ConstantExpression($token->getValue(), $token->getLine()); - - // {a} is a shortcut for {a:a} - if ($stream->test(Token::PUNCTUATION_TYPE, [',', '}'])) { - $value = new NameExpression($key->getAttribute('value'), $key->getTemplateLine()); - $node->addElement($value, $key); - continue; - } - } elseif (($token = $stream->nextIf(/* Token::STRING_TYPE */ 7)) || $token = $stream->nextIf(/* Token::NUMBER_TYPE */ 6)) { - $key = new ConstantExpression($token->getValue(), $token->getLine()); - } elseif ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $key = $this->parseExpression(); - } else { - $current = $stream->getCurrent(); - - throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $stream->getSourceContext()); - } - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ':', 'A hash key must be followed by a colon (:)'); - $value = $this->parseExpression(); - - $node->addElement($value, $key); - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '}', 'An opened hash is not properly closed'); - - return $node; - } - - public function parsePostfixExpression($node) - { - while (true) { - $token = $this->parser->getCurrentToken(); - if (/* Token::PUNCTUATION_TYPE */ 9 == $token->getType()) { - if ('.' == $token->getValue() || '[' == $token->getValue()) { - $node = $this->parseSubscriptExpression($node); - } elseif ('|' == $token->getValue()) { - $node = $this->parseFilterExpression($node); - } else { - break; - } - } else { - break; - } - } - - return $node; - } - - public function getFunctionNode($name, $line) - { - switch ($name) { - case 'parent': - $this->parseArguments(); - if (!\count($this->parser->getBlockStack())) { - throw new SyntaxError('Calling "parent" outside a block is forbidden.', $line, $this->parser->getStream()->getSourceContext()); - } - - if (!$this->parser->getParent() && !$this->parser->hasTraits()) { - throw new SyntaxError('Calling "parent" on a template that does not extend nor "use" another template is forbidden.', $line, $this->parser->getStream()->getSourceContext()); - } - - return new ParentExpression($this->parser->peekBlockStack(), $line); - case 'block': - $args = $this->parseArguments(); - if (\count($args) < 1) { - throw new SyntaxError('The "block" function takes one argument (the block name).', $line, $this->parser->getStream()->getSourceContext()); - } - - return new BlockReferenceExpression($args->getNode(0), \count($args) > 1 ? $args->getNode(1) : null, $line); - case 'attribute': - $args = $this->parseArguments(); - if (\count($args) < 2) { - throw new SyntaxError('The "attribute" function takes at least two arguments (the variable and the attributes).', $line, $this->parser->getStream()->getSourceContext()); - } - - return new GetAttrExpression($args->getNode(0), $args->getNode(1), \count($args) > 2 ? $args->getNode(2) : null, Template::ANY_CALL, $line); - default: - if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) { - $arguments = new ArrayExpression([], $line); - foreach ($this->parseArguments() as $n) { - $arguments->addElement($n); - } - - $node = new MethodCallExpression($alias['node'], $alias['name'], $arguments, $line); - $node->setAttribute('safe', true); - - return $node; - } - - $args = $this->parseArguments(true); - $class = $this->getFunctionNodeClass($name, $line); - - return new $class($name, $args, $line); - } - } - - public function parseSubscriptExpression($node) - { - $stream = $this->parser->getStream(); - $token = $stream->next(); - $lineno = $token->getLine(); - $arguments = new ArrayExpression([], $lineno); - $type = Template::ANY_CALL; - if ('.' == $token->getValue()) { - $token = $stream->next(); - if ( - /* Token::NAME_TYPE */ 5 == $token->getType() - || - /* Token::NUMBER_TYPE */ 6 == $token->getType() - || - (/* Token::OPERATOR_TYPE */ 8 == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue())) - ) { - $arg = new ConstantExpression($token->getValue(), $lineno); - - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $type = Template::METHOD_CALL; - foreach ($this->parseArguments() as $n) { - $arguments->addElement($n); - } - } - } else { - throw new SyntaxError(sprintf('Expected name or number, got value "%s" of type %s.', $token->getValue(), Token::typeToEnglish($token->getType())), $lineno, $stream->getSourceContext()); - } - - if ($node instanceof NameExpression && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) { - if (!$arg instanceof ConstantExpression) { - throw new SyntaxError(sprintf('Dynamic macro names are not supported (called on "%s").', $node->getAttribute('name')), $token->getLine(), $stream->getSourceContext()); - } - - $name = $arg->getAttribute('value'); - - $node = new MethodCallExpression($node, 'macro_'.$name, $arguments, $lineno); - $node->setAttribute('safe', true); - - return $node; - } - } else { - $type = Template::ARRAY_CALL; - - // slice? - $slice = false; - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $slice = true; - $arg = new ConstantExpression(0, $token->getLine()); - } else { - $arg = $this->parseExpression(); - } - - if ($stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $slice = true; - } - - if ($slice) { - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) { - $length = new ConstantExpression(null, $token->getLine()); - } else { - $length = $this->parseExpression(); - } - - $class = $this->getFilterNodeClass('slice', $token->getLine()); - $arguments = new Node([$arg, $length]); - $filter = new $class($node, new ConstantExpression('slice', $token->getLine()), $arguments, $token->getLine()); - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']'); - - return $filter; - } - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']'); - } - - return new GetAttrExpression($node, $arg, $arguments, $type, $lineno); - } - - public function parseFilterExpression($node) - { - $this->parser->getStream()->next(); - - return $this->parseFilterExpressionRaw($node); - } - - public function parseFilterExpressionRaw($node, $tag = null) - { - while (true) { - $token = $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5); - - $name = new ConstantExpression($token->getValue(), $token->getLine()); - if (!$this->parser->getStream()->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $arguments = new Node(); - } else { - $arguments = $this->parseArguments(true, false, true); - } - - $class = $this->getFilterNodeClass($name->getAttribute('value'), $token->getLine()); - - $node = new $class($node, $name, $arguments, $token->getLine(), $tag); - - if (!$this->parser->getStream()->test(/* Token::PUNCTUATION_TYPE */ 9, '|')) { - break; - } - - $this->parser->getStream()->next(); - } - - return $node; - } - - /** - * Parses arguments. - * - * @param bool $namedArguments Whether to allow named arguments or not - * @param bool $definition Whether we are parsing arguments for a function definition - * - * @return Node - * - * @throws SyntaxError - */ - public function parseArguments($namedArguments = false, $definition = false, $allowArrow = false) - { - $args = []; - $stream = $this->parser->getStream(); - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '(', 'A list of arguments must begin with an opening parenthesis'); - while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) { - if (!empty($args)) { - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'Arguments must be separated by a comma'); - - // if the comma above was a trailing comma, early exit the argument parse loop - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) { - break; - } - } - - if ($definition) { - $token = $stream->expect(/* Token::NAME_TYPE */ 5, null, 'An argument must be a name'); - $value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine()); - } else { - $value = $this->parseExpression(0, $allowArrow); - } - - $name = null; - if ($namedArguments && $token = $stream->nextIf(/* Token::OPERATOR_TYPE */ 8, '=')) { - if (!$value instanceof NameExpression) { - throw new SyntaxError(sprintf('A parameter name must be a string, "%s" given.', \get_class($value)), $token->getLine(), $stream->getSourceContext()); - } - $name = $value->getAttribute('name'); - - if ($definition) { - $value = $this->parsePrimaryExpression(); - - if (!$this->checkConstantExpression($value)) { - throw new SyntaxError('A default value for an argument must be a constant (a boolean, a string, a number, or an array).', $token->getLine(), $stream->getSourceContext()); - } - } else { - $value = $this->parseExpression(0, $allowArrow); - } - } - - if ($definition) { - if (null === $name) { - $name = $value->getAttribute('name'); - $value = new ConstantExpression(null, $this->parser->getCurrentToken()->getLine()); - } - $args[$name] = $value; - } else { - if (null === $name) { - $args[] = $value; - } else { - $args[$name] = $value; - } - } - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ')', 'A list of arguments must be closed by a parenthesis'); - - return new Node($args); - } - - public function parseAssignmentExpression() - { - $stream = $this->parser->getStream(); - $targets = []; - while (true) { - $token = $this->parser->getCurrentToken(); - if ($stream->test(/* Token::OPERATOR_TYPE */ 8) && preg_match(Lexer::REGEX_NAME, $token->getValue())) { - // in this context, string operators are variable names - $this->parser->getStream()->next(); - } else { - $stream->expect(/* Token::NAME_TYPE */ 5, null, 'Only variables can be assigned to'); - } - $value = $token->getValue(); - if (\in_array(strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), ['true', 'false', 'none', 'null'])) { - throw new SyntaxError(sprintf('You cannot assign a value to "%s".', $value), $token->getLine(), $stream->getSourceContext()); - } - $targets[] = new AssignNameExpression($value, $token->getLine()); - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } - - return new Node($targets); - } - - public function parseMultitargetExpression() - { - $targets = []; - while (true) { - $targets[] = $this->parseExpression(); - if (!$this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } - - return new Node($targets); - } - - private function parseNotTestExpression(Node $node): NotUnary - { - return new NotUnary($this->parseTestExpression($node), $this->parser->getCurrentToken()->getLine()); - } - - private function parseTestExpression(Node $node): TestExpression - { - $stream = $this->parser->getStream(); - list($name, $test) = $this->getTest($node->getTemplateLine()); - - $class = $this->getTestNodeClass($test); - $arguments = null; - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $arguments = $this->parseArguments(true); - } elseif ($test->hasOneMandatoryArgument()) { - $arguments = new Node([0 => $this->parsePrimaryExpression()]); - } - - if ('defined' === $name && $node instanceof NameExpression && null !== $alias = $this->parser->getImportedSymbol('function', $node->getAttribute('name'))) { - $node = new MethodCallExpression($alias['node'], $alias['name'], new ArrayExpression([], $node->getTemplateLine()), $node->getTemplateLine()); - $node->setAttribute('safe', true); - } - - return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine()); - } - - private function getTest(int $line): array - { - $stream = $this->parser->getStream(); - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - if ($test = $this->env->getTest($name)) { - return [$name, $test]; - } - - if ($stream->test(/* Token::NAME_TYPE */ 5)) { - // try 2-words tests - $name = $name.' '.$this->parser->getCurrentToken()->getValue(); - - if ($test = $this->env->getTest($name)) { - $stream->next(); - - return [$name, $test]; - } - } - - $e = new SyntaxError(sprintf('Unknown "%s" test.', $name), $line, $stream->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getTests())); - - throw $e; - } - - private function getTestNodeClass(TwigTest $test): string - { - if ($test->isDeprecated()) { - $stream = $this->parser->getStream(); - $message = sprintf('Twig Test "%s" is deprecated', $test->getName()); - - if ($test->getDeprecatedVersion()) { - $message .= sprintf(' since version %s', $test->getDeprecatedVersion()); - } - if ($test->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $test->getAlternative()); - } - $src = $stream->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $stream->getCurrent()->getLine()); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - return $test->getNodeClass(); - } - - private function getFunctionNodeClass(string $name, int $line): string - { - if (!$function = $this->env->getFunction($name)) { - $e = new SyntaxError(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getFunctions())); - - throw $e; - } - - if ($function->isDeprecated()) { - $message = sprintf('Twig Function "%s" is deprecated', $function->getName()); - if ($function->getDeprecatedVersion()) { - $message .= sprintf(' since version %s', $function->getDeprecatedVersion()); - } - if ($function->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $function->getAlternative()); - } - $src = $this->parser->getStream()->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - return $function->getNodeClass(); - } - - private function getFilterNodeClass(string $name, int $line): string - { - if (!$filter = $this->env->getFilter($name)) { - $e = new SyntaxError(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getFilters())); - - throw $e; - } - - if ($filter->isDeprecated()) { - $message = sprintf('Twig Filter "%s" is deprecated', $filter->getName()); - if ($filter->getDeprecatedVersion()) { - $message .= sprintf(' since version %s', $filter->getDeprecatedVersion()); - } - if ($filter->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $filter->getAlternative()); - } - $src = $this->parser->getStream()->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - return $filter->getNodeClass(); - } - - // checks that the node only contains "constant" elements - private function checkConstantExpression(Node $node): bool - { - if (!($node instanceof ConstantExpression || $node instanceof ArrayExpression - || $node instanceof NegUnary || $node instanceof PosUnary - )) { - return false; - } - - foreach ($node as $n) { - if (!$this->checkConstantExpression($n)) { - return false; - } - } - - return true; - } -} diff --git a/lib/twig/twig/src/Extension/AbstractExtension.php b/lib/twig/twig/src/Extension/AbstractExtension.php deleted file mode 100644 index 422925f31..000000000 --- a/lib/twig/twig/src/Extension/AbstractExtension.php +++ /dev/null @@ -1,45 +0,0 @@ -dateFormats[0] = $format; - } - - if (null !== $dateIntervalFormat) { - $this->dateFormats[1] = $dateIntervalFormat; - } - } - - /** - * Gets the default format to be used by the date filter. - * - * @return array The default date format string and the default date interval format string - */ - public function getDateFormat() - { - return $this->dateFormats; - } - - /** - * Sets the default timezone to be used by the date filter. - * - * @param \DateTimeZone|string $timezone The default timezone string or a \DateTimeZone object - */ - public function setTimezone($timezone) - { - $this->timezone = $timezone instanceof \DateTimeZone ? $timezone : new \DateTimeZone($timezone); - } - - /** - * Gets the default timezone to be used by the date filter. - * - * @return \DateTimeZone The default timezone currently in use - */ - public function getTimezone() - { - if (null === $this->timezone) { - $this->timezone = new \DateTimeZone(date_default_timezone_get()); - } - - return $this->timezone; - } - - /** - * Sets the default format to be used by the number_format filter. - * - * @param int $decimal the number of decimal places to use - * @param string $decimalPoint the character(s) to use for the decimal point - * @param string $thousandSep the character(s) to use for the thousands separator - */ - public function setNumberFormat($decimal, $decimalPoint, $thousandSep) - { - $this->numberFormat = [$decimal, $decimalPoint, $thousandSep]; - } - - /** - * Get the default format used by the number_format filter. - * - * @return array The arguments for number_format() - */ - public function getNumberFormat() - { - return $this->numberFormat; - } - - public function getTokenParsers(): array - { - return [ - new ApplyTokenParser(), - new ForTokenParser(), - new IfTokenParser(), - new ExtendsTokenParser(), - new IncludeTokenParser(), - new BlockTokenParser(), - new UseTokenParser(), - new MacroTokenParser(), - new ImportTokenParser(), - new FromTokenParser(), - new SetTokenParser(), - new FlushTokenParser(), - new DoTokenParser(), - new EmbedTokenParser(), - new WithTokenParser(), - new DeprecatedTokenParser(), - ]; - } - - public function getFilters(): array - { - return [ - // formatting filters - new TwigFilter('date', 'twig_date_format_filter', ['needs_environment' => true]), - new TwigFilter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]), - new TwigFilter('format', 'twig_sprintf'), - new TwigFilter('replace', 'twig_replace_filter'), - new TwigFilter('number_format', 'twig_number_format_filter', ['needs_environment' => true]), - new TwigFilter('abs', 'abs'), - new TwigFilter('round', 'twig_round'), - - // encoding - new TwigFilter('url_encode', 'twig_urlencode_filter'), - new TwigFilter('json_encode', 'json_encode'), - new TwigFilter('convert_encoding', 'twig_convert_encoding'), - - // string filters - new TwigFilter('title', 'twig_title_string_filter', ['needs_environment' => true]), - new TwigFilter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]), - new TwigFilter('upper', 'twig_upper_filter', ['needs_environment' => true]), - new TwigFilter('lower', 'twig_lower_filter', ['needs_environment' => true]), - new TwigFilter('striptags', 'twig_striptags'), - new TwigFilter('trim', 'twig_trim_filter'), - new TwigFilter('nl2br', 'twig_nl2br', ['pre_escape' => 'html', 'is_safe' => ['html']]), - new TwigFilter('spaceless', 'twig_spaceless', ['is_safe' => ['html']]), - - // array helpers - new TwigFilter('join', 'twig_join_filter'), - new TwigFilter('split', 'twig_split_filter', ['needs_environment' => true]), - new TwigFilter('sort', 'twig_sort_filter', ['needs_environment' => true]), - new TwigFilter('merge', 'twig_array_merge'), - new TwigFilter('batch', 'twig_array_batch'), - new TwigFilter('column', 'twig_array_column'), - new TwigFilter('filter', 'twig_array_filter', ['needs_environment' => true]), - new TwigFilter('map', 'twig_array_map', ['needs_environment' => true]), - new TwigFilter('reduce', 'twig_array_reduce', ['needs_environment' => true]), - - // string/array filters - new TwigFilter('reverse', 'twig_reverse_filter', ['needs_environment' => true]), - new TwigFilter('length', 'twig_length_filter', ['needs_environment' => true]), - new TwigFilter('slice', 'twig_slice', ['needs_environment' => true]), - new TwigFilter('first', 'twig_first', ['needs_environment' => true]), - new TwigFilter('last', 'twig_last', ['needs_environment' => true]), - - // iteration and runtime - new TwigFilter('default', '_twig_default_filter', ['node_class' => DefaultFilter::class]), - new TwigFilter('keys', 'twig_get_array_keys_filter'), - ]; - } - - public function getFunctions(): array - { - return [ - new TwigFunction('max', 'max'), - new TwigFunction('min', 'min'), - new TwigFunction('range', 'range'), - new TwigFunction('constant', 'twig_constant'), - new TwigFunction('cycle', 'twig_cycle'), - new TwigFunction('random', 'twig_random', ['needs_environment' => true]), - new TwigFunction('date', 'twig_date_converter', ['needs_environment' => true]), - new TwigFunction('include', 'twig_include', ['needs_environment' => true, 'needs_context' => true, 'is_safe' => ['all']]), - new TwigFunction('source', 'twig_source', ['needs_environment' => true, 'is_safe' => ['all']]), - ]; - } - - public function getTests(): array - { - return [ - new TwigTest('even', null, ['node_class' => EvenTest::class]), - new TwigTest('odd', null, ['node_class' => OddTest::class]), - new TwigTest('defined', null, ['node_class' => DefinedTest::class]), - new TwigTest('same as', null, ['node_class' => SameasTest::class, 'one_mandatory_argument' => true]), - new TwigTest('none', null, ['node_class' => NullTest::class]), - new TwigTest('null', null, ['node_class' => NullTest::class]), - new TwigTest('divisible by', null, ['node_class' => DivisiblebyTest::class, 'one_mandatory_argument' => true]), - new TwigTest('constant', null, ['node_class' => ConstantTest::class]), - new TwigTest('empty', 'twig_test_empty'), - new TwigTest('iterable', 'twig_test_iterable'), - ]; - } - - public function getNodeVisitors(): array - { - return [new MacroAutoImportNodeVisitor()]; - } - - public function getOperators(): array - { - return [ - [ - 'not' => ['precedence' => 50, 'class' => NotUnary::class], - '-' => ['precedence' => 500, 'class' => NegUnary::class], - '+' => ['precedence' => 500, 'class' => PosUnary::class], - ], - [ - 'or' => ['precedence' => 10, 'class' => OrBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'and' => ['precedence' => 15, 'class' => AndBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-or' => ['precedence' => 16, 'class' => BitwiseOrBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-xor' => ['precedence' => 17, 'class' => BitwiseXorBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-and' => ['precedence' => 18, 'class' => BitwiseAndBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '==' => ['precedence' => 20, 'class' => EqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '!=' => ['precedence' => 20, 'class' => NotEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<=>' => ['precedence' => 20, 'class' => SpaceshipBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<' => ['precedence' => 20, 'class' => LessBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '>' => ['precedence' => 20, 'class' => GreaterBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '>=' => ['precedence' => 20, 'class' => GreaterEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<=' => ['precedence' => 20, 'class' => LessEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'not in' => ['precedence' => 20, 'class' => NotInBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'in' => ['precedence' => 20, 'class' => InBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'matches' => ['precedence' => 20, 'class' => MatchesBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'starts with' => ['precedence' => 20, 'class' => StartsWithBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'ends with' => ['precedence' => 20, 'class' => EndsWithBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '..' => ['precedence' => 25, 'class' => RangeBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '+' => ['precedence' => 30, 'class' => AddBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '-' => ['precedence' => 30, 'class' => SubBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '~' => ['precedence' => 40, 'class' => ConcatBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '*' => ['precedence' => 60, 'class' => MulBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '/' => ['precedence' => 60, 'class' => DivBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '//' => ['precedence' => 60, 'class' => FloorDivBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '%' => ['precedence' => 60, 'class' => ModBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'is' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'is not' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '**' => ['precedence' => 200, 'class' => PowerBinary::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT], - '??' => ['precedence' => 300, 'class' => NullCoalesceExpression::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT], - ], - ]; - } -} -} - -namespace { - use Twig\Environment; - use Twig\Error\LoaderError; - use Twig\Error\RuntimeError; - use Twig\Extension\CoreExtension; - use Twig\Extension\SandboxExtension; - use Twig\Markup; - use Twig\Source; - use Twig\Template; - use Twig\TemplateWrapper; - -/** - * Cycles over a value. - * - * @param \ArrayAccess|array $values - * @param int $position The cycle position - * - * @return string The next value in the cycle - */ -function twig_cycle($values, $position) -{ - if (!\is_array($values) && !$values instanceof \ArrayAccess) { - return $values; - } - - return $values[$position % \count($values)]; -} - -/** - * Returns a random value depending on the supplied parameter type: - * - a random item from a \Traversable or array - * - a random character from a string - * - a random integer between 0 and the integer parameter. - * - * @param \Traversable|array|int|float|string $values The values to pick a random item from - * @param int|null $max Maximum value used when $values is an int - * - * @throws RuntimeError when $values is an empty array (does not apply to an empty string which is returned as is) - * - * @return mixed A random value from the given sequence - */ -function twig_random(Environment $env, $values = null, $max = null) -{ - if (null === $values) { - return null === $max ? mt_rand() : mt_rand(0, (int) $max); - } - - if (\is_int($values) || \is_float($values)) { - if (null === $max) { - if ($values < 0) { - $max = 0; - $min = $values; - } else { - $max = $values; - $min = 0; - } - } else { - $min = $values; - $max = $max; - } - - return mt_rand((int) $min, (int) $max); - } - - if (\is_string($values)) { - if ('' === $values) { - return ''; - } - - $charset = $env->getCharset(); - - if ('UTF-8' !== $charset) { - $values = twig_convert_encoding($values, 'UTF-8', $charset); - } - - // unicode version of str_split() - // split at all positions, but not after the start and not before the end - $values = preg_split('/(? $value) { - $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8'); - } - } - } - - if (!twig_test_iterable($values)) { - return $values; - } - - $values = twig_to_array($values); - - if (0 === \count($values)) { - throw new RuntimeError('The random function cannot pick from an empty array.'); - } - - return $values[array_rand($values, 1)]; -} - -/** - * Converts a date to the given format. - * - * {{ post.published_at|date("m/d/Y") }} - * - * @param \DateTimeInterface|\DateInterval|string $date A date - * @param string|null $format The target format, null to use the default - * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged - * - * @return string The formatted date - */ -function twig_date_format_filter(Environment $env, $date, $format = null, $timezone = null) -{ - if (null === $format) { - $formats = $env->getExtension(CoreExtension::class)->getDateFormat(); - $format = $date instanceof \DateInterval ? $formats[1] : $formats[0]; - } - - if ($date instanceof \DateInterval) { - return $date->format($format); - } - - return twig_date_converter($env, $date, $timezone)->format($format); -} - -/** - * Returns a new date object modified. - * - * {{ post.published_at|date_modify("-1day")|date("m/d/Y") }} - * - * @param \DateTimeInterface|string $date A date - * @param string $modifier A modifier string - * - * @return \DateTimeInterface - */ -function twig_date_modify_filter(Environment $env, $date, $modifier) -{ - $date = twig_date_converter($env, $date, false); - - return $date->modify($modifier); -} - -/** - * Returns a formatted string. - * - * @param string|null $format - * @param ...$values - * - * @return string - */ -function twig_sprintf($format, ...$values) -{ - return sprintf($format ?? '', ...$values); -} - -/** - * Converts an input to a \DateTime instance. - * - * {% if date(user.created_at) < date('+2days') %} - * {# do something #} - * {% endif %} - * - * @param \DateTimeInterface|string|null $date A date or null to use the current time - * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged - * - * @return \DateTimeInterface - */ -function twig_date_converter(Environment $env, $date = null, $timezone = null) -{ - // determine the timezone - if (false !== $timezone) { - if (null === $timezone) { - $timezone = $env->getExtension(CoreExtension::class)->getTimezone(); - } elseif (!$timezone instanceof \DateTimeZone) { - $timezone = new \DateTimeZone($timezone); - } - } - - // immutable dates - if ($date instanceof \DateTimeImmutable) { - return false !== $timezone ? $date->setTimezone($timezone) : $date; - } - - if ($date instanceof \DateTimeInterface) { - $date = clone $date; - if (false !== $timezone) { - $date->setTimezone($timezone); - } - - return $date; - } - - if (null === $date || 'now' === $date) { - if (null === $date) { - $date = 'now'; - } - - return new \DateTime($date, false !== $timezone ? $timezone : $env->getExtension(CoreExtension::class)->getTimezone()); - } - - $asString = (string) $date; - if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) { - $date = new \DateTime('@'.$date); - } else { - $date = new \DateTime($date, $env->getExtension(CoreExtension::class)->getTimezone()); - } - - if (false !== $timezone) { - $date->setTimezone($timezone); - } - - return $date; -} - -/** - * Replaces strings within a string. - * - * @param string|null $str String to replace in - * @param array|\Traversable $from Replace values - * - * @return string - */ -function twig_replace_filter($str, $from) -{ - if (!twig_test_iterable($from)) { - throw new RuntimeError(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".', \is_object($from) ? \get_class($from) : \gettype($from))); - } - - return strtr($str ?? '', twig_to_array($from)); -} - -/** - * Rounds a number. - * - * @param int|float|string|null $value The value to round - * @param int|float $precision The rounding precision - * @param string $method The method to use for rounding - * - * @return int|float The rounded number - */ -function twig_round($value, $precision = 0, $method = 'common') -{ - $value = (float) $value; - - if ('common' === $method) { - return round($value, $precision); - } - - if ('ceil' !== $method && 'floor' !== $method) { - throw new RuntimeError('The round filter only supports the "common", "ceil", and "floor" methods.'); - } - - return $method($value * 10 ** $precision) / 10 ** $precision; -} - -/** - * Number format filter. - * - * All of the formatting options can be left null, in that case the defaults will - * be used. Supplying any of the parameters will override the defaults set in the - * environment object. - * - * @param mixed $number A float/int/string of the number to format - * @param int $decimal the number of decimal points to display - * @param string $decimalPoint the character(s) to use for the decimal point - * @param string $thousandSep the character(s) to use for the thousands separator - * - * @return string The formatted number - */ -function twig_number_format_filter(Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null) -{ - $defaults = $env->getExtension(CoreExtension::class)->getNumberFormat(); - if (null === $decimal) { - $decimal = $defaults[0]; - } - - if (null === $decimalPoint) { - $decimalPoint = $defaults[1]; - } - - if (null === $thousandSep) { - $thousandSep = $defaults[2]; - } - - return number_format((float) $number, $decimal, $decimalPoint, $thousandSep); -} - -/** - * URL encodes (RFC 3986) a string as a path segment or an array as a query string. - * - * @param string|array|null $url A URL or an array of query parameters - * - * @return string The URL encoded value - */ -function twig_urlencode_filter($url) -{ - if (\is_array($url)) { - return http_build_query($url, '', '&', \PHP_QUERY_RFC3986); - } - - return rawurlencode($url ?? ''); -} - -/** - * Merges an array with another one. - * - * {% set items = { 'apple': 'fruit', 'orange': 'fruit' } %} - * - * {% set items = items|merge({ 'peugeot': 'car' }) %} - * - * {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car' } #} - * - * @param array|\Traversable $arr1 An array - * @param array|\Traversable $arr2 An array - * - * @return array The merged array - */ -function twig_array_merge($arr1, $arr2) -{ - if (!twig_test_iterable($arr1)) { - throw new RuntimeError(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($arr1))); - } - - if (!twig_test_iterable($arr2)) { - throw new RuntimeError(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as second argument.', \gettype($arr2))); - } - - return array_merge(twig_to_array($arr1), twig_to_array($arr2)); -} - -/** - * Slices a variable. - * - * @param mixed $item A variable - * @param int $start Start of the slice - * @param int $length Size of the slice - * @param bool $preserveKeys Whether to preserve key or not (when the input is an array) - * - * @return mixed The sliced variable - */ -function twig_slice(Environment $env, $item, $start, $length = null, $preserveKeys = false) -{ - if ($item instanceof \Traversable) { - while ($item instanceof \IteratorAggregate) { - $item = $item->getIterator(); - } - - if ($start >= 0 && $length >= 0 && $item instanceof \Iterator) { - try { - return iterator_to_array(new \LimitIterator($item, $start, null === $length ? -1 : $length), $preserveKeys); - } catch (\OutOfBoundsException $e) { - return []; - } - } - - $item = iterator_to_array($item, $preserveKeys); - } - - if (\is_array($item)) { - return \array_slice($item, $start, $length, $preserveKeys); - } - - return (string) mb_substr((string) $item, $start, $length, $env->getCharset()); -} - -/** - * Returns the first element of the item. - * - * @param mixed $item A variable - * - * @return mixed The first element of the item - */ -function twig_first(Environment $env, $item) -{ - $elements = twig_slice($env, $item, 0, 1, false); - - return \is_string($elements) ? $elements : current($elements); -} - -/** - * Returns the last element of the item. - * - * @param mixed $item A variable - * - * @return mixed The last element of the item - */ -function twig_last(Environment $env, $item) -{ - $elements = twig_slice($env, $item, -1, 1, false); - - return \is_string($elements) ? $elements : current($elements); -} - -/** - * Joins the values to a string. - * - * The separators between elements are empty strings per default, you can define them with the optional parameters. - * - * {{ [1, 2, 3]|join(', ', ' and ') }} - * {# returns 1, 2 and 3 #} - * - * {{ [1, 2, 3]|join('|') }} - * {# returns 1|2|3 #} - * - * {{ [1, 2, 3]|join }} - * {# returns 123 #} - * - * @param array $value An array - * @param string $glue The separator - * @param string|null $and The separator for the last pair - * - * @return string The concatenated string - */ -function twig_join_filter($value, $glue = '', $and = null) -{ - if (!twig_test_iterable($value)) { - $value = (array) $value; - } - - $value = twig_to_array($value, false); - - if (0 === \count($value)) { - return ''; - } - - if (null === $and || $and === $glue) { - return implode($glue, $value); - } - - if (1 === \count($value)) { - return $value[0]; - } - - return implode($glue, \array_slice($value, 0, -1)).$and.$value[\count($value) - 1]; -} - -/** - * Splits the string into an array. - * - * {{ "one,two,three"|split(',') }} - * {# returns [one, two, three] #} - * - * {{ "one,two,three,four,five"|split(',', 3) }} - * {# returns [one, two, "three,four,five"] #} - * - * {{ "123"|split('') }} - * {# returns [1, 2, 3] #} - * - * {{ "aabbcc"|split('', 2) }} - * {# returns [aa, bb, cc] #} - * - * @param string|null $value A string - * @param string $delimiter The delimiter - * @param int $limit The limit - * - * @return array The split string as an array - */ -function twig_split_filter(Environment $env, $value, $delimiter, $limit = null) -{ - $value = $value ?? ''; - - if (\strlen($delimiter) > 0) { - return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit); - } - - if ($limit <= 1) { - return preg_split('/(?getCharset()); - if ($length < $limit) { - return [$value]; - } - - $r = []; - for ($i = 0; $i < $length; $i += $limit) { - $r[] = mb_substr($value, $i, $limit, $env->getCharset()); - } - - return $r; -} - -// The '_default' filter is used internally to avoid using the ternary operator -// which costs a lot for big contexts (before PHP 5.4). So, on average, -// a function call is cheaper. -/** - * @internal - */ -function _twig_default_filter($value, $default = '') -{ - if (twig_test_empty($value)) { - return $default; - } - - return $value; -} - -/** - * Returns the keys for the given array. - * - * It is useful when you want to iterate over the keys of an array: - * - * {% for key in array|keys %} - * {# ... #} - * {% endfor %} - * - * @param array $array An array - * - * @return array The keys - */ -function twig_get_array_keys_filter($array) -{ - if ($array instanceof \Traversable) { - while ($array instanceof \IteratorAggregate) { - $array = $array->getIterator(); - } - - $keys = []; - if ($array instanceof \Iterator) { - $array->rewind(); - while ($array->valid()) { - $keys[] = $array->key(); - $array->next(); - } - - return $keys; - } - - foreach ($array as $key => $item) { - $keys[] = $key; - } - - return $keys; - } - - if (!\is_array($array)) { - return []; - } - - return array_keys($array); -} - -/** - * Reverses a variable. - * - * @param array|\Traversable|string|null $item An array, a \Traversable instance, or a string - * @param bool $preserveKeys Whether to preserve key or not - * - * @return mixed The reversed input - */ -function twig_reverse_filter(Environment $env, $item, $preserveKeys = false) -{ - if ($item instanceof \Traversable) { - return array_reverse(iterator_to_array($item), $preserveKeys); - } - - if (\is_array($item)) { - return array_reverse($item, $preserveKeys); - } - - $string = (string) $item; - - $charset = $env->getCharset(); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - preg_match_all('/./us', $string, $matches); - - $string = implode('', array_reverse($matches[0])); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, $charset, 'UTF-8'); - } - - return $string; -} - -/** - * Sorts an array. - * - * @param array|\Traversable $array - * - * @return array - */ -function twig_sort_filter(Environment $env, $array, $arrow = null) -{ - if ($array instanceof \Traversable) { - $array = iterator_to_array($array); - } elseif (!\is_array($array)) { - throw new RuntimeError(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', \gettype($array))); - } - - if (null !== $arrow) { - twig_check_arrow_in_sandbox($env, $arrow, 'sort', 'filter'); - - uasort($array, $arrow); - } else { - asort($array); - } - - return $array; -} - -/** - * @internal - */ -function twig_in_filter($value, $compare) -{ - if ($value instanceof Markup) { - $value = (string) $value; - } - if ($compare instanceof Markup) { - $compare = (string) $compare; - } - - if (\is_string($compare)) { - if (\is_string($value) || \is_int($value) || \is_float($value)) { - return '' === $value || false !== strpos($compare, (string) $value); - } - - return false; - } - - if (!is_iterable($compare)) { - return false; - } - - if (\is_object($value) || \is_resource($value)) { - if (!\is_array($compare)) { - foreach ($compare as $item) { - if ($item === $value) { - return true; - } - } - - return false; - } - - return \in_array($value, $compare, true); - } - - foreach ($compare as $item) { - if (0 === twig_compare($value, $item)) { - return true; - } - } - - return false; -} - -/** - * Compares two values using a more strict version of the PHP non-strict comparison operator. - * - * @see https://wiki.php.net/rfc/string_to_number_comparison - * @see https://wiki.php.net/rfc/trailing_whitespace_numerics - * - * @internal - */ -function twig_compare($a, $b) -{ - // int <=> string - if (\is_int($a) && \is_string($b)) { - $bTrim = trim($b, " \t\n\r\v\f"); - if (!is_numeric($bTrim)) { - return (string) $a <=> $b; - } - if ((int) $bTrim == $bTrim) { - return $a <=> (int) $bTrim; - } else { - return (float) $a <=> (float) $bTrim; - } - } - if (\is_string($a) && \is_int($b)) { - $aTrim = trim($a, " \t\n\r\v\f"); - if (!is_numeric($aTrim)) { - return $a <=> (string) $b; - } - if ((int) $aTrim == $aTrim) { - return (int) $aTrim <=> $b; - } else { - return (float) $aTrim <=> (float) $b; - } - } - - // float <=> string - if (\is_float($a) && \is_string($b)) { - if (is_nan($a)) { - return 1; - } - $bTrim = trim($b, " \t\n\r\v\f"); - if (!is_numeric($bTrim)) { - return (string) $a <=> $b; - } - - return $a <=> (float) $bTrim; - } - if (\is_string($a) && \is_float($b)) { - if (is_nan($b)) { - return 1; - } - $aTrim = trim($a, " \t\n\r\v\f"); - if (!is_numeric($aTrim)) { - return $a <=> (string) $b; - } - - return (float) $aTrim <=> $b; - } - - // fallback to <=> - return $a <=> $b; -} - -/** - * Returns a trimmed string. - * - * @param string|null $string - * @param string|null $characterMask - * @param string $side - * - * @return string - * - * @throws RuntimeError When an invalid trimming side is used (not a string or not 'left', 'right', or 'both') - */ -function twig_trim_filter($string, $characterMask = null, $side = 'both') -{ - if (null === $characterMask) { - $characterMask = " \t\n\r\0\x0B"; - } - - switch ($side) { - case 'both': - return trim($string ?? '', $characterMask); - case 'left': - return ltrim($string ?? '', $characterMask); - case 'right': - return rtrim($string ?? '', $characterMask); - default: - throw new RuntimeError('Trimming side must be "left", "right" or "both".'); - } -} - -/** - * Inserts HTML line breaks before all newlines in a string. - * - * @param string|null $string - * - * @return string - */ -function twig_nl2br($string) -{ - return nl2br($string ?? ''); -} - -/** - * Removes whitespaces between HTML tags. - * - * @param string|null $string - * - * @return string - */ -function twig_spaceless($content) -{ - return trim(preg_replace('/>\s+<', $content ?? '')); -} - -/** - * @param string|null $string - * @param string $to - * @param string $from - * - * @return string - */ -function twig_convert_encoding($string, $to, $from) -{ - if (!\function_exists('iconv')) { - throw new RuntimeError('Unable to convert encoding: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); - } - - return iconv($from, $to, $string ?? ''); -} - -/** - * Returns the length of a variable. - * - * @param mixed $thing A variable - * - * @return int The length of the value - */ -function twig_length_filter(Environment $env, $thing) -{ - if (null === $thing) { - return 0; - } - - if (is_scalar($thing)) { - return mb_strlen($thing, $env->getCharset()); - } - - if ($thing instanceof \Countable || \is_array($thing) || $thing instanceof \SimpleXMLElement) { - return \count($thing); - } - - if ($thing instanceof \Traversable) { - return iterator_count($thing); - } - - if (method_exists($thing, '__toString') && !$thing instanceof \Countable) { - return mb_strlen((string) $thing, $env->getCharset()); - } - - return 1; -} - -/** - * Converts a string to uppercase. - * - * @param string|null $string A string - * - * @return string The uppercased string - */ -function twig_upper_filter(Environment $env, $string) -{ - return mb_strtoupper($string ?? '', $env->getCharset()); -} - -/** - * Converts a string to lowercase. - * - * @param string|null $string A string - * - * @return string The lowercased string - */ -function twig_lower_filter(Environment $env, $string) -{ - return mb_strtolower($string ?? '', $env->getCharset()); -} - -/** - * Strips HTML and PHP tags from a string. - * - * @param string|null $string - * @param string[]|string|null $string - * - * @return string - */ -function twig_striptags($string, $allowable_tags = null) -{ - return strip_tags($string ?? '', $allowable_tags); -} - -/** - * Returns a titlecased string. - * - * @param string|null $string A string - * - * @return string The titlecased string - */ -function twig_title_string_filter(Environment $env, $string) -{ - if (null !== $charset = $env->getCharset()) { - return mb_convert_case($string ?? '', \MB_CASE_TITLE, $charset); - } - - return ucwords(strtolower($string ?? '')); -} - -/** - * Returns a capitalized string. - * - * @param string|null $string A string - * - * @return string The capitalized string - */ -function twig_capitalize_string_filter(Environment $env, $string) -{ - $charset = $env->getCharset(); - - return mb_strtoupper(mb_substr($string ?? '', 0, 1, $charset), $charset).mb_strtolower(mb_substr($string ?? '', 1, null, $charset), $charset); -} - -/** - * @internal - */ -function twig_call_macro(Template $template, string $method, array $args, int $lineno, array $context, Source $source) -{ - if (!method_exists($template, $method)) { - $parent = $template; - while ($parent = $parent->getParent($context)) { - if (method_exists($parent, $method)) { - return $parent->$method(...$args); - } - } - - throw new RuntimeError(sprintf('Macro "%s" is not defined in template "%s".', substr($method, \strlen('macro_')), $template->getTemplateName()), $lineno, $source); - } - - return $template->$method(...$args); -} - -/** - * @internal - */ -function twig_ensure_traversable($seq) -{ - if ($seq instanceof \Traversable || \is_array($seq)) { - return $seq; - } - - return []; -} - -/** - * @internal - */ -function twig_to_array($seq, $preserveKeys = true) -{ - if ($seq instanceof \Traversable) { - return iterator_to_array($seq, $preserveKeys); - } - - if (!\is_array($seq)) { - return $seq; - } - - return $preserveKeys ? $seq : array_values($seq); -} - -/** - * Checks if a variable is empty. - * - * {# evaluates to true if the foo variable is null, false, or the empty string #} - * {% if foo is empty %} - * {# ... #} - * {% endif %} - * - * @param mixed $value A variable - * - * @return bool true if the value is empty, false otherwise - */ -function twig_test_empty($value) -{ - if ($value instanceof \Countable) { - return 0 === \count($value); - } - - if ($value instanceof \Traversable) { - return !iterator_count($value); - } - - if (\is_object($value) && method_exists($value, '__toString')) { - return '' === (string) $value; - } - - return '' === $value || false === $value || null === $value || [] === $value; -} - -/** - * Checks if a variable is traversable. - * - * {# evaluates to true if the foo variable is an array or a traversable object #} - * {% if foo is iterable %} - * {# ... #} - * {% endif %} - * - * @param mixed $value A variable - * - * @return bool true if the value is traversable - */ -function twig_test_iterable($value) -{ - return $value instanceof \Traversable || \is_array($value); -} - -/** - * Renders a template. - * - * @param array $context - * @param string|array $template The template to render or an array of templates to try consecutively - * @param array $variables The variables to pass to the template - * @param bool $withContext - * @param bool $ignoreMissing Whether to ignore missing templates or not - * @param bool $sandboxed Whether to sandbox the template or not - * - * @return string The rendered template - */ -function twig_include(Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false) -{ - $alreadySandboxed = false; - $sandbox = null; - if ($withContext) { - $variables = array_merge($context, $variables); - } - - if ($isSandboxed = $sandboxed && $env->hasExtension(SandboxExtension::class)) { - $sandbox = $env->getExtension(SandboxExtension::class); - if (!$alreadySandboxed = $sandbox->isSandboxed()) { - $sandbox->enableSandbox(); - } - - foreach ((\is_array($template) ? $template : [$template]) as $name) { - // if a Template instance is passed, it might have been instantiated outside of a sandbox, check security - if ($name instanceof TemplateWrapper || $name instanceof Template) { - $name->unwrap()->checkSecurity(); - } - } - } - - try { - $loaded = null; - try { - $loaded = $env->resolveTemplate($template); - } catch (LoaderError $e) { - if (!$ignoreMissing) { - throw $e; - } - } - - return $loaded ? $loaded->render($variables) : ''; - } finally { - if ($isSandboxed && !$alreadySandboxed) { - $sandbox->disableSandbox(); - } - } -} - -/** - * Returns a template content without rendering it. - * - * @param string $name The template name - * @param bool $ignoreMissing Whether to ignore missing templates or not - * - * @return string The template source - */ -function twig_source(Environment $env, $name, $ignoreMissing = false) -{ - $loader = $env->getLoader(); - try { - return $loader->getSourceContext($name)->getCode(); - } catch (LoaderError $e) { - if (!$ignoreMissing) { - throw $e; - } - } -} - -/** - * Provides the ability to get constants from instances as well as class/global constants. - * - * @param string $constant The name of the constant - * @param object|null $object The object to get the constant from - * - * @return string - */ -function twig_constant($constant, $object = null) -{ - if (null !== $object) { - if ('class' === $constant) { - return \get_class($object); - } - - $constant = \get_class($object).'::'.$constant; - } - - return \constant($constant); -} - -/** - * Checks if a constant exists. - * - * @param string $constant The name of the constant - * @param object|null $object The object to get the constant from - * - * @return bool - */ -function twig_constant_is_defined($constant, $object = null) -{ - if (null !== $object) { - if ('class' === $constant) { - return true; - } - - $constant = \get_class($object).'::'.$constant; - } - - return \defined($constant); -} - -/** - * Batches item. - * - * @param array $items An array of items - * @param int $size The size of the batch - * @param mixed $fill A value used to fill missing items - * - * @return array - */ -function twig_array_batch($items, $size, $fill = null, $preserveKeys = true) -{ - if (!twig_test_iterable($items)) { - throw new RuntimeError(sprintf('The "batch" filter expects an array or "Traversable", got "%s".', \is_object($items) ? \get_class($items) : \gettype($items))); - } - - $size = ceil($size); - - $result = array_chunk(twig_to_array($items, $preserveKeys), $size, $preserveKeys); - - if (null !== $fill && $result) { - $last = \count($result) - 1; - if ($fillCount = $size - \count($result[$last])) { - for ($i = 0; $i < $fillCount; ++$i) { - $result[$last][] = $fill; - } - } - } - - return $result; -} - -/** - * Returns the attribute value for a given array/object. - * - * @param mixed $object The object or array from where to get the item - * @param mixed $item The item to get from the array or object - * @param array $arguments An array of arguments to pass if the item is an object method - * @param string $type The type of attribute (@see \Twig\Template constants) - * @param bool $isDefinedTest Whether this is only a defined check - * @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not - * @param int $lineno The template line where the attribute was called - * - * @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true - * - * @throws RuntimeError if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false - * - * @internal - */ -function twig_get_attribute(Environment $env, Source $source, $object, $item, array $arguments = [], $type = /* Template::ANY_CALL */ 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false, int $lineno = -1) -{ - // array - if (/* Template::METHOD_CALL */ 'method' !== $type) { - $arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item; - - if (((\is_array($object) || $object instanceof \ArrayObject) && (isset($object[$arrayItem]) || \array_key_exists($arrayItem, (array) $object))) - || ($object instanceof ArrayAccess && isset($object[$arrayItem])) - ) { - if ($isDefinedTest) { - return true; - } - - return $object[$arrayItem]; - } - - if (/* Template::ARRAY_CALL */ 'array' === $type || !\is_object($object)) { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$env->isStrictVariables()) { - return; - } - - if ($object instanceof ArrayAccess) { - $message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, \get_class($object)); - } elseif (\is_object($object)) { - $message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object)); - } elseif (\is_array($object)) { - if (empty($object)) { - $message = sprintf('Key "%s" does not exist as the array is empty.', $arrayItem); - } else { - $message = sprintf('Key "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object))); - } - } elseif (/* Template::ARRAY_CALL */ 'array' === $type) { - if (null === $object) { - $message = sprintf('Impossible to access a key ("%s") on a null variable.', $item); - } else { - $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - } elseif (null === $object) { - $message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item); - } else { - $message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - - throw new RuntimeError($message, $lineno, $source); - } - } - - if (!\is_object($object)) { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$env->isStrictVariables()) { - return; - } - - if (null === $object) { - $message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item); - } elseif (\is_array($object)) { - $message = sprintf('Impossible to invoke a method ("%s") on an array.', $item); - } else { - $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - - throw new RuntimeError($message, $lineno, $source); - } - - if ($object instanceof Template) { - throw new RuntimeError('Accessing \Twig\Template attributes is forbidden.', $lineno, $source); - } - - // object property - if (/* Template::METHOD_CALL */ 'method' !== $type) { - if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) { - if ($isDefinedTest) { - return true; - } - - if ($sandboxed) { - $env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $item, $lineno, $source); - } - - return $object->$item; - } - } - - static $cache = []; - - $class = \get_class($object); - - // object method - // precedence: getXxx() > isXxx() > hasXxx() - if (!isset($cache[$class])) { - $methods = get_class_methods($object); - sort($methods); - $lcMethods = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, $methods); - $classCache = []; - foreach ($methods as $i => $method) { - $classCache[$method] = $method; - $classCache[$lcName = $lcMethods[$i]] = $method; - - if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) { - $name = substr($method, 3); - $lcName = substr($lcName, 3); - } elseif ('i' === $lcName[0] && 0 === strpos($lcName, 'is')) { - $name = substr($method, 2); - $lcName = substr($lcName, 2); - } elseif ('h' === $lcName[0] && 0 === strpos($lcName, 'has')) { - $name = substr($method, 3); - $lcName = substr($lcName, 3); - if (\in_array('is'.$lcName, $lcMethods)) { - continue; - } - } else { - continue; - } - - // skip get() and is() methods (in which case, $name is empty) - if ($name) { - if (!isset($classCache[$name])) { - $classCache[$name] = $method; - } - - if (!isset($classCache[$lcName])) { - $classCache[$lcName] = $method; - } - } - } - $cache[$class] = $classCache; - } - - $call = false; - if (isset($cache[$class][$item])) { - $method = $cache[$class][$item]; - } elseif (isset($cache[$class][$lcItem = strtr($item, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')])) { - $method = $cache[$class][$lcItem]; - } elseif (isset($cache[$class]['__call'])) { - $method = $item; - $call = true; - } else { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$env->isStrictVariables()) { - return; - } - - throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()"/"has%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), $lineno, $source); - } - - if ($isDefinedTest) { - return true; - } - - if ($sandboxed) { - $env->getExtension(SandboxExtension::class)->checkMethodAllowed($object, $method, $lineno, $source); - } - - // Some objects throw exceptions when they have __call, and the method we try - // to call is not supported. If ignoreStrictCheck is true, we should return null. - try { - $ret = $object->$method(...$arguments); - } catch (\BadMethodCallException $e) { - if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) { - return; - } - throw $e; - } - - return $ret; -} - -/** - * Returns the values from a single column in the input array. - * - *
    - *  {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
    - *
    - *  {% set fruits = items|column('fruit') %}
    - *
    - *  {# fruits now contains ['apple', 'orange'] #}
    - * 
    - * - * @param array|Traversable $array An array - * @param mixed $name The column name - * @param mixed $index The column to use as the index/keys for the returned array - * - * @return array The array of values - */ -function twig_array_column($array, $name, $index = null): array -{ - if ($array instanceof Traversable) { - $array = iterator_to_array($array); - } elseif (!\is_array($array)) { - throw new RuntimeError(sprintf('The column filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array))); - } - - return array_column($array, $name, $index); -} - -function twig_array_filter(Environment $env, $array, $arrow) -{ - if (!twig_test_iterable($array)) { - throw new RuntimeError(sprintf('The "filter" filter expects an array or "Traversable", got "%s".', \is_object($array) ? \get_class($array) : \gettype($array))); - } - - twig_check_arrow_in_sandbox($env, $arrow, 'filter', 'filter'); - - if (\is_array($array)) { - return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH); - } - - // the IteratorIterator wrapping is needed as some internal PHP classes are \Traversable but do not implement \Iterator - return new \CallbackFilterIterator(new \IteratorIterator($array), $arrow); -} - -function twig_array_map(Environment $env, $array, $arrow) -{ - twig_check_arrow_in_sandbox($env, $arrow, 'map', 'filter'); - - $r = []; - foreach ($array as $k => $v) { - $r[$k] = $arrow($v, $k); - } - - return $r; -} - -function twig_array_reduce(Environment $env, $array, $arrow, $initial = null) -{ - twig_check_arrow_in_sandbox($env, $arrow, 'reduce', 'filter'); - - if (!\is_array($array)) { - if (!$array instanceof \Traversable) { - throw new RuntimeError(sprintf('The "reduce" filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array))); - } - - $array = iterator_to_array($array); - } - - return array_reduce($array, $arrow, $initial); -} - -function twig_check_arrow_in_sandbox(Environment $env, $arrow, $thing, $type) -{ - if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) { - throw new RuntimeError(sprintf('The callable passed to the "%s" %s must be a Closure in sandbox mode.', $thing, $type)); - } -} -} diff --git a/lib/twig/twig/src/Extension/DebugExtension.php b/lib/twig/twig/src/Extension/DebugExtension.php deleted file mode 100644 index bfb23d7bd..000000000 --- a/lib/twig/twig/src/Extension/DebugExtension.php +++ /dev/null @@ -1,64 +0,0 @@ - $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true, 'is_variadic' => true]), - ]; - } -} -} - -namespace { -use Twig\Environment; -use Twig\Template; -use Twig\TemplateWrapper; - -function twig_var_dump(Environment $env, $context, ...$vars) -{ - if (!$env->isDebug()) { - return; - } - - ob_start(); - - if (!$vars) { - $vars = []; - foreach ($context as $key => $value) { - if (!$value instanceof Template && !$value instanceof TemplateWrapper) { - $vars[$key] = $value; - } - } - - var_dump($vars); - } else { - var_dump(...$vars); - } - - return ob_get_clean(); -} -} diff --git a/lib/twig/twig/src/Extension/EscaperExtension.php b/lib/twig/twig/src/Extension/EscaperExtension.php deleted file mode 100644 index 9d2251dc6..000000000 --- a/lib/twig/twig/src/Extension/EscaperExtension.php +++ /dev/null @@ -1,416 +0,0 @@ -setDefaultStrategy($defaultStrategy); - } - - public function getTokenParsers(): array - { - return [new AutoEscapeTokenParser()]; - } - - public function getNodeVisitors(): array - { - return [new EscaperNodeVisitor()]; - } - - public function getFilters(): array - { - return [ - new TwigFilter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), - new TwigFilter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), - new TwigFilter('raw', 'twig_raw_filter', ['is_safe' => ['all']]), - ]; - } - - /** - * Sets the default strategy to use when not defined by the user. - * - * The strategy can be a valid PHP callback that takes the template - * name as an argument and returns the strategy to use. - * - * @param string|false|callable $defaultStrategy An escaping strategy - */ - public function setDefaultStrategy($defaultStrategy): void - { - if ('name' === $defaultStrategy) { - $defaultStrategy = [FileExtensionEscapingStrategy::class, 'guess']; - } - - $this->defaultStrategy = $defaultStrategy; - } - - /** - * Gets the default strategy to use when not defined by the user. - * - * @param string $name The template name - * - * @return string|false The default strategy to use for the template - */ - public function getDefaultStrategy(string $name) - { - // disable string callables to avoid calling a function named html or js, - // or any other upcoming escaping strategy - if (!\is_string($this->defaultStrategy) && false !== $this->defaultStrategy) { - return \call_user_func($this->defaultStrategy, $name); - } - - return $this->defaultStrategy; - } - - /** - * Defines a new escaper to be used via the escape filter. - * - * @param string $strategy The strategy name that should be used as a strategy in the escape call - * @param callable $callable A valid PHP callable - */ - public function setEscaper($strategy, callable $callable) - { - $this->escapers[$strategy] = $callable; - } - - /** - * Gets all defined escapers. - * - * @return callable[] An array of escapers - */ - public function getEscapers() - { - return $this->escapers; - } - - public function setSafeClasses(array $safeClasses = []) - { - $this->safeClasses = []; - $this->safeLookup = []; - foreach ($safeClasses as $class => $strategies) { - $this->addSafeClass($class, $strategies); - } - } - - public function addSafeClass(string $class, array $strategies) - { - $class = ltrim($class, '\\'); - if (!isset($this->safeClasses[$class])) { - $this->safeClasses[$class] = []; - } - $this->safeClasses[$class] = array_merge($this->safeClasses[$class], $strategies); - - foreach ($strategies as $strategy) { - $this->safeLookup[$strategy][$class] = true; - } - } -} -} - -namespace { -use Twig\Environment; -use Twig\Error\RuntimeError; -use Twig\Extension\EscaperExtension; -use Twig\Markup; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Node; - -/** - * Marks a variable as being safe. - * - * @param string $string A PHP variable - */ -function twig_raw_filter($string) -{ - return $string; -} - -/** - * Escapes a string. - * - * @param mixed $string The value to be escaped - * @param string $strategy The escaping strategy - * @param string $charset The charset - * @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false) - * - * @return string - */ -function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false) -{ - if ($autoescape && $string instanceof Markup) { - return $string; - } - - if (!\is_string($string)) { - if (\is_object($string) && method_exists($string, '__toString')) { - if ($autoescape) { - $c = \get_class($string); - $ext = $env->getExtension(EscaperExtension::class); - if (!isset($ext->safeClasses[$c])) { - $ext->safeClasses[$c] = []; - foreach (class_parents($string) + class_implements($string) as $class) { - if (isset($ext->safeClasses[$class])) { - $ext->safeClasses[$c] = array_unique(array_merge($ext->safeClasses[$c], $ext->safeClasses[$class])); - foreach ($ext->safeClasses[$class] as $s) { - $ext->safeLookup[$s][$c] = true; - } - } - } - } - if (isset($ext->safeLookup[$strategy][$c]) || isset($ext->safeLookup['all'][$c])) { - return (string) $string; - } - } - - $string = (string) $string; - } elseif (\in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) { - return $string; - } - } - - if ('' === $string) { - return ''; - } - - if (null === $charset) { - $charset = $env->getCharset(); - } - - switch ($strategy) { - case 'html': - // see https://www.php.net/htmlspecialchars - - // Using a static variable to avoid initializing the array - // each time the function is called. Moving the declaration on the - // top of the function slow downs other escaping strategies. - static $htmlspecialcharsCharsets = [ - 'ISO-8859-1' => true, 'ISO8859-1' => true, - 'ISO-8859-15' => true, 'ISO8859-15' => true, - 'utf-8' => true, 'UTF-8' => true, - 'CP866' => true, 'IBM866' => true, '866' => true, - 'CP1251' => true, 'WINDOWS-1251' => true, 'WIN-1251' => true, - '1251' => true, - 'CP1252' => true, 'WINDOWS-1252' => true, '1252' => true, - 'KOI8-R' => true, 'KOI8-RU' => true, 'KOI8R' => true, - 'BIG5' => true, '950' => true, - 'GB2312' => true, '936' => true, - 'BIG5-HKSCS' => true, - 'SHIFT_JIS' => true, 'SJIS' => true, '932' => true, - 'EUC-JP' => true, 'EUCJP' => true, - 'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true, - ]; - - if (isset($htmlspecialcharsCharsets[$charset])) { - return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset); - } - - if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) { - // cache the lowercase variant for future iterations - $htmlspecialcharsCharsets[$charset] = true; - - return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset); - } - - $string = twig_convert_encoding($string, 'UTF-8', $charset); - $string = htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8'); - - return iconv('UTF-8', $charset, $string); - - case 'js': - // escape all non-alphanumeric characters - // into their \x or \uHHHH representations - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', function ($matches) { - $char = $matches[0]; - - /* - * A few characters have short escape sequences in JSON and JavaScript. - * Escape sequences supported only by JavaScript, not JSON, are omitted. - * \" is also supported but omitted, because the resulting string is not HTML safe. - */ - static $shortMap = [ - '\\' => '\\\\', - '/' => '\\/', - "\x08" => '\b', - "\x0C" => '\f', - "\x0A" => '\n', - "\x0D" => '\r', - "\x09" => '\t', - ]; - - if (isset($shortMap[$char])) { - return $shortMap[$char]; - } - - $codepoint = mb_ord($char, 'UTF-8'); - if (0x10000 > $codepoint) { - return sprintf('\u%04X', $codepoint); - } - - // Split characters outside the BMP into surrogate pairs - // https://tools.ietf.org/html/rfc2781.html#section-2.1 - $u = $codepoint - 0x10000; - $high = 0xD800 | ($u >> 10); - $low = 0xDC00 | ($u & 0x3FF); - - return sprintf('\u%04X\u%04X', $high, $low); - }, $string); - - if ('UTF-8' !== $charset) { - $string = iconv('UTF-8', $charset, $string); - } - - return $string; - - case 'css': - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', function ($matches) { - $char = $matches[0]; - - return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : mb_ord($char, 'UTF-8')); - }, $string); - - if ('UTF-8' !== $charset) { - $string = iconv('UTF-8', $charset, $string); - } - - return $string; - - case 'html_attr': - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', function ($matches) { - /** - * This function is adapted from code coming from Zend Framework. - * - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com) - * @license https://framework.zend.com/license/new-bsd New BSD License - */ - $chr = $matches[0]; - $ord = \ord($chr); - - /* - * The following replaces characters undefined in HTML with the - * hex entity for the Unicode replacement character. - */ - if (($ord <= 0x1f && "\t" != $chr && "\n" != $chr && "\r" != $chr) || ($ord >= 0x7f && $ord <= 0x9f)) { - return '�'; - } - - /* - * Check if the current character to escape has a name entity we should - * replace it with while grabbing the hex value of the character. - */ - if (1 === \strlen($chr)) { - /* - * While HTML supports far more named entities, the lowest common denominator - * has become HTML5's XML Serialisation which is restricted to the those named - * entities that XML supports. Using HTML entities would result in this error: - * XML Parsing Error: undefined entity - */ - static $entityMap = [ - 34 => '"', /* quotation mark */ - 38 => '&', /* ampersand */ - 60 => '<', /* less-than sign */ - 62 => '>', /* greater-than sign */ - ]; - - if (isset($entityMap[$ord])) { - return $entityMap[$ord]; - } - - return sprintf('&#x%02X;', $ord); - } - - /* - * Per OWASP recommendations, we'll use hex entities for any other - * characters where a named entity does not exist. - */ - return sprintf('&#x%04X;', mb_ord($chr, 'UTF-8')); - }, $string); - - if ('UTF-8' !== $charset) { - $string = iconv('UTF-8', $charset, $string); - } - - return $string; - - case 'url': - return rawurlencode($string); - - default: - $escapers = $env->getExtension(EscaperExtension::class)->getEscapers(); - if (array_key_exists($strategy, $escapers)) { - return $escapers[$strategy]($env, $string, $charset); - } - - $validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers))); - - throw new RuntimeError(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies)); - } -} - -/** - * @internal - */ -function twig_escape_filter_is_safe(Node $filterArgs) -{ - foreach ($filterArgs as $arg) { - if ($arg instanceof ConstantExpression) { - return [$arg->getAttribute('value')]; - } - - return []; - } - - return ['html']; -} -} diff --git a/lib/twig/twig/src/Extension/ExtensionInterface.php b/lib/twig/twig/src/Extension/ExtensionInterface.php deleted file mode 100644 index 75fa237e1..000000000 --- a/lib/twig/twig/src/Extension/ExtensionInterface.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -interface ExtensionInterface -{ - /** - * Returns the token parser instances to add to the existing list. - * - * @return TokenParserInterface[] - */ - public function getTokenParsers(); - - /** - * Returns the node visitor instances to add to the existing list. - * - * @return NodeVisitorInterface[] - */ - public function getNodeVisitors(); - - /** - * Returns a list of filters to add to the existing list. - * - * @return TwigFilter[] - */ - public function getFilters(); - - /** - * Returns a list of tests to add to the existing list. - * - * @return TwigTest[] - */ - public function getTests(); - - /** - * Returns a list of functions to add to the existing list. - * - * @return TwigFunction[] - */ - public function getFunctions(); - - /** - * Returns a list of operators to add to the existing list. - * - * @return array First array of unary operators, second array of binary operators - */ - public function getOperators(); -} diff --git a/lib/twig/twig/src/Extension/GlobalsInterface.php b/lib/twig/twig/src/Extension/GlobalsInterface.php deleted file mode 100644 index ec0c68292..000000000 --- a/lib/twig/twig/src/Extension/GlobalsInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ -interface GlobalsInterface -{ - public function getGlobals(): array; -} diff --git a/lib/twig/twig/src/Extension/OptimizerExtension.php b/lib/twig/twig/src/Extension/OptimizerExtension.php deleted file mode 100644 index 965bfdb04..000000000 --- a/lib/twig/twig/src/Extension/OptimizerExtension.php +++ /dev/null @@ -1,29 +0,0 @@ -optimizers = $optimizers; - } - - public function getNodeVisitors(): array - { - return [new OptimizerNodeVisitor($this->optimizers)]; - } -} diff --git a/lib/twig/twig/src/Extension/ProfilerExtension.php b/lib/twig/twig/src/Extension/ProfilerExtension.php deleted file mode 100644 index 43e4a449e..000000000 --- a/lib/twig/twig/src/Extension/ProfilerExtension.php +++ /dev/null @@ -1,52 +0,0 @@ -actives[] = $profile; - } - - /** - * @return void - */ - public function enter(Profile $profile) - { - $this->actives[0]->addProfile($profile); - array_unshift($this->actives, $profile); - } - - /** - * @return void - */ - public function leave(Profile $profile) - { - $profile->leave(); - array_shift($this->actives); - - if (1 === \count($this->actives)) { - $this->actives[0]->leave(); - } - } - - public function getNodeVisitors(): array - { - return [new ProfilerNodeVisitor(static::class)]; - } -} diff --git a/lib/twig/twig/src/Extension/RuntimeExtensionInterface.php b/lib/twig/twig/src/Extension/RuntimeExtensionInterface.php deleted file mode 100644 index 63bc3b1ab..000000000 --- a/lib/twig/twig/src/Extension/RuntimeExtensionInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ -interface RuntimeExtensionInterface -{ -} diff --git a/lib/twig/twig/src/Extension/SandboxExtension.php b/lib/twig/twig/src/Extension/SandboxExtension.php deleted file mode 100644 index c861159b6..000000000 --- a/lib/twig/twig/src/Extension/SandboxExtension.php +++ /dev/null @@ -1,123 +0,0 @@ -policy = $policy; - $this->sandboxedGlobally = $sandboxed; - } - - public function getTokenParsers(): array - { - return [new SandboxTokenParser()]; - } - - public function getNodeVisitors(): array - { - return [new SandboxNodeVisitor()]; - } - - public function enableSandbox(): void - { - $this->sandboxed = true; - } - - public function disableSandbox(): void - { - $this->sandboxed = false; - } - - public function isSandboxed(): bool - { - return $this->sandboxedGlobally || $this->sandboxed; - } - - public function isSandboxedGlobally(): bool - { - return $this->sandboxedGlobally; - } - - public function setSecurityPolicy(SecurityPolicyInterface $policy) - { - $this->policy = $policy; - } - - public function getSecurityPolicy(): SecurityPolicyInterface - { - return $this->policy; - } - - public function checkSecurity($tags, $filters, $functions): void - { - if ($this->isSandboxed()) { - $this->policy->checkSecurity($tags, $filters, $functions); - } - } - - public function checkMethodAllowed($obj, $method, int $lineno = -1, Source $source = null): void - { - if ($this->isSandboxed()) { - try { - $this->policy->checkMethodAllowed($obj, $method); - } catch (SecurityNotAllowedMethodError $e) { - $e->setSourceContext($source); - $e->setTemplateLine($lineno); - - throw $e; - } - } - } - - public function checkPropertyAllowed($obj, $property, int $lineno = -1, Source $source = null): void - { - if ($this->isSandboxed()) { - try { - $this->policy->checkPropertyAllowed($obj, $property); - } catch (SecurityNotAllowedPropertyError $e) { - $e->setSourceContext($source); - $e->setTemplateLine($lineno); - - throw $e; - } - } - } - - public function ensureToStringAllowed($obj, int $lineno = -1, Source $source = null) - { - if ($this->isSandboxed() && \is_object($obj) && method_exists($obj, '__toString')) { - try { - $this->policy->checkMethodAllowed($obj, '__toString'); - } catch (SecurityNotAllowedMethodError $e) { - $e->setSourceContext($source); - $e->setTemplateLine($lineno); - - throw $e; - } - } - - return $obj; - } -} diff --git a/lib/twig/twig/src/Extension/StagingExtension.php b/lib/twig/twig/src/Extension/StagingExtension.php deleted file mode 100644 index 0ea47f90c..000000000 --- a/lib/twig/twig/src/Extension/StagingExtension.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * @internal - */ -final class StagingExtension extends AbstractExtension -{ - private $functions = []; - private $filters = []; - private $visitors = []; - private $tokenParsers = []; - private $tests = []; - - public function addFunction(TwigFunction $function): void - { - if (isset($this->functions[$function->getName()])) { - throw new \LogicException(sprintf('Function "%s" is already registered.', $function->getName())); - } - - $this->functions[$function->getName()] = $function; - } - - public function getFunctions(): array - { - return $this->functions; - } - - public function addFilter(TwigFilter $filter): void - { - if (isset($this->filters[$filter->getName()])) { - throw new \LogicException(sprintf('Filter "%s" is already registered.', $filter->getName())); - } - - $this->filters[$filter->getName()] = $filter; - } - - public function getFilters(): array - { - return $this->filters; - } - - public function addNodeVisitor(NodeVisitorInterface $visitor): void - { - $this->visitors[] = $visitor; - } - - public function getNodeVisitors(): array - { - return $this->visitors; - } - - public function addTokenParser(TokenParserInterface $parser): void - { - if (isset($this->tokenParsers[$parser->getTag()])) { - throw new \LogicException(sprintf('Tag "%s" is already registered.', $parser->getTag())); - } - - $this->tokenParsers[$parser->getTag()] = $parser; - } - - public function getTokenParsers(): array - { - return $this->tokenParsers; - } - - public function addTest(TwigTest $test): void - { - if (isset($this->tests[$test->getName()])) { - throw new \LogicException(sprintf('Test "%s" is already registered.', $test->getName())); - } - - $this->tests[$test->getName()] = $test; - } - - public function getTests(): array - { - return $this->tests; - } -} diff --git a/lib/twig/twig/src/Extension/StringLoaderExtension.php b/lib/twig/twig/src/Extension/StringLoaderExtension.php deleted file mode 100644 index 7b4514710..000000000 --- a/lib/twig/twig/src/Extension/StringLoaderExtension.php +++ /dev/null @@ -1,42 +0,0 @@ - true]), - ]; - } -} -} - -namespace { -use Twig\Environment; -use Twig\TemplateWrapper; - -/** - * Loads a template from a string. - * - * {{ include(template_from_string("Hello {{ name }}")) }} - * - * @param string $template A template as a string or object implementing __toString() - * @param string $name An optional name of the template to be used in error messages - */ -function twig_template_from_string(Environment $env, $template, string $name = null): TemplateWrapper -{ - return $env->createTemplate((string) $template, $name); -} -} diff --git a/lib/twig/twig/src/ExtensionSet.php b/lib/twig/twig/src/ExtensionSet.php deleted file mode 100644 index 36e5bbc59..000000000 --- a/lib/twig/twig/src/ExtensionSet.php +++ /dev/null @@ -1,463 +0,0 @@ - - * - * @internal - */ -final class ExtensionSet -{ - private $extensions; - private $initialized = false; - private $runtimeInitialized = false; - private $staging; - private $parsers; - private $visitors; - private $filters; - private $tests; - private $functions; - private $unaryOperators; - private $binaryOperators; - private $globals; - private $functionCallbacks = []; - private $filterCallbacks = []; - private $parserCallbacks = []; - private $lastModified = 0; - - public function __construct() - { - $this->staging = new StagingExtension(); - } - - public function initRuntime() - { - $this->runtimeInitialized = true; - } - - public function hasExtension(string $class): bool - { - return isset($this->extensions[ltrim($class, '\\')]); - } - - public function getExtension(string $class): ExtensionInterface - { - $class = ltrim($class, '\\'); - - if (!isset($this->extensions[$class])) { - throw new RuntimeError(sprintf('The "%s" extension is not enabled.', $class)); - } - - return $this->extensions[$class]; - } - - /** - * @param ExtensionInterface[] $extensions - */ - public function setExtensions(array $extensions): void - { - foreach ($extensions as $extension) { - $this->addExtension($extension); - } - } - - /** - * @return ExtensionInterface[] - */ - public function getExtensions(): array - { - return $this->extensions; - } - - public function getSignature(): string - { - return json_encode(array_keys($this->extensions)); - } - - public function isInitialized(): bool - { - return $this->initialized || $this->runtimeInitialized; - } - - public function getLastModified(): int - { - if (0 !== $this->lastModified) { - return $this->lastModified; - } - - foreach ($this->extensions as $extension) { - $r = new \ReflectionObject($extension); - if (is_file($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModified) { - $this->lastModified = $extensionTime; - } - } - - return $this->lastModified; - } - - public function addExtension(ExtensionInterface $extension): void - { - $class = \get_class($extension); - - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $class)); - } - - if (isset($this->extensions[$class])) { - throw new \LogicException(sprintf('Unable to register extension "%s" as it is already registered.', $class)); - } - - $this->extensions[$class] = $extension; - } - - public function addFunction(TwigFunction $function): void - { - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $function->getName())); - } - - $this->staging->addFunction($function); - } - - /** - * @return TwigFunction[] - */ - public function getFunctions(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->functions; - } - - public function getFunction(string $name): ?TwigFunction - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->functions[$name])) { - return $this->functions[$name]; - } - - foreach ($this->functions as $pattern => $function) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $function->setArguments($matches); - - return $function; - } - } - - foreach ($this->functionCallbacks as $callback) { - if (false !== $function = $callback($name)) { - return $function; - } - } - - return null; - } - - public function registerUndefinedFunctionCallback(callable $callable): void - { - $this->functionCallbacks[] = $callable; - } - - public function addFilter(TwigFilter $filter): void - { - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $filter->getName())); - } - - $this->staging->addFilter($filter); - } - - /** - * @return TwigFilter[] - */ - public function getFilters(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->filters; - } - - public function getFilter(string $name): ?TwigFilter - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->filters[$name])) { - return $this->filters[$name]; - } - - foreach ($this->filters as $pattern => $filter) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $filter->setArguments($matches); - - return $filter; - } - } - - foreach ($this->filterCallbacks as $callback) { - if (false !== $filter = $callback($name)) { - return $filter; - } - } - - return null; - } - - public function registerUndefinedFilterCallback(callable $callable): void - { - $this->filterCallbacks[] = $callable; - } - - public function addNodeVisitor(NodeVisitorInterface $visitor): void - { - if ($this->initialized) { - throw new \LogicException('Unable to add a node visitor as extensions have already been initialized.'); - } - - $this->staging->addNodeVisitor($visitor); - } - - /** - * @return NodeVisitorInterface[] - */ - public function getNodeVisitors(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->visitors; - } - - public function addTokenParser(TokenParserInterface $parser): void - { - if ($this->initialized) { - throw new \LogicException('Unable to add a token parser as extensions have already been initialized.'); - } - - $this->staging->addTokenParser($parser); - } - - /** - * @return TokenParserInterface[] - */ - public function getTokenParsers(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->parsers; - } - - public function getTokenParser(string $name): ?TokenParserInterface - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->parsers[$name])) { - return $this->parsers[$name]; - } - - foreach ($this->parserCallbacks as $callback) { - if (false !== $parser = $callback($name)) { - return $parser; - } - } - - return null; - } - - public function registerUndefinedTokenParserCallback(callable $callable): void - { - $this->parserCallbacks[] = $callable; - } - - public function getGlobals(): array - { - if (null !== $this->globals) { - return $this->globals; - } - - $globals = []; - foreach ($this->extensions as $extension) { - if (!$extension instanceof GlobalsInterface) { - continue; - } - - $extGlobals = $extension->getGlobals(); - if (!\is_array($extGlobals)) { - throw new \UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', \get_class($extension))); - } - - $globals = array_merge($globals, $extGlobals); - } - - if ($this->initialized) { - $this->globals = $globals; - } - - return $globals; - } - - public function addTest(TwigTest $test): void - { - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $test->getName())); - } - - $this->staging->addTest($test); - } - - /** - * @return TwigTest[] - */ - public function getTests(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->tests; - } - - public function getTest(string $name): ?TwigTest - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->tests[$name])) { - return $this->tests[$name]; - } - - foreach ($this->tests as $pattern => $test) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count) { - if (preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $test->setArguments($matches); - - return $test; - } - } - } - - return null; - } - - public function getUnaryOperators(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->unaryOperators; - } - - public function getBinaryOperators(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->binaryOperators; - } - - private function initExtensions(): void - { - $this->parsers = []; - $this->filters = []; - $this->functions = []; - $this->tests = []; - $this->visitors = []; - $this->unaryOperators = []; - $this->binaryOperators = []; - - foreach ($this->extensions as $extension) { - $this->initExtension($extension); - } - $this->initExtension($this->staging); - // Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception - $this->initialized = true; - } - - private function initExtension(ExtensionInterface $extension): void - { - // filters - foreach ($extension->getFilters() as $filter) { - $this->filters[$filter->getName()] = $filter; - } - - // functions - foreach ($extension->getFunctions() as $function) { - $this->functions[$function->getName()] = $function; - } - - // tests - foreach ($extension->getTests() as $test) { - $this->tests[$test->getName()] = $test; - } - - // token parsers - foreach ($extension->getTokenParsers() as $parser) { - if (!$parser instanceof TokenParserInterface) { - throw new \LogicException('getTokenParsers() must return an array of \Twig\TokenParser\TokenParserInterface.'); - } - - $this->parsers[$parser->getTag()] = $parser; - } - - // node visitors - foreach ($extension->getNodeVisitors() as $visitor) { - $this->visitors[] = $visitor; - } - - // operators - if ($operators = $extension->getOperators()) { - if (!\is_array($operators)) { - throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', \get_class($extension), \is_object($operators) ? \get_class($operators) : \gettype($operators).(\is_resource($operators) ? '' : '#'.$operators))); - } - - if (2 !== \count($operators)) { - throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array of 2 elements, got %d.', \get_class($extension), \count($operators))); - } - - $this->unaryOperators = array_merge($this->unaryOperators, $operators[0]); - $this->binaryOperators = array_merge($this->binaryOperators, $operators[1]); - } - } -} diff --git a/lib/twig/twig/src/FileExtensionEscapingStrategy.php b/lib/twig/twig/src/FileExtensionEscapingStrategy.php deleted file mode 100644 index 65198bbb6..000000000 --- a/lib/twig/twig/src/FileExtensionEscapingStrategy.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -class FileExtensionEscapingStrategy -{ - /** - * Guesses the best autoescaping strategy based on the file name. - * - * @param string $name The template name - * - * @return string|false The escaping strategy name to use or false to disable - */ - public static function guess(string $name) - { - if (\in_array(substr($name, -1), ['/', '\\'])) { - return 'html'; // return html for directories - } - - if ('.twig' === substr($name, -5)) { - $name = substr($name, 0, -5); - } - - $extension = pathinfo($name, \PATHINFO_EXTENSION); - - switch ($extension) { - case 'js': - return 'js'; - - case 'css': - return 'css'; - - case 'txt': - return false; - - default: - return 'html'; - } - } -} diff --git a/lib/twig/twig/src/Lexer.php b/lib/twig/twig/src/Lexer.php deleted file mode 100644 index 9ff028c87..000000000 --- a/lib/twig/twig/src/Lexer.php +++ /dev/null @@ -1,501 +0,0 @@ - - */ -class Lexer -{ - private $tokens; - private $code; - private $cursor; - private $lineno; - private $end; - private $state; - private $states; - private $brackets; - private $env; - private $source; - private $options; - private $regexes; - private $position; - private $positions; - private $currentVarBlockLine; - - public const STATE_DATA = 0; - public const STATE_BLOCK = 1; - public const STATE_VAR = 2; - public const STATE_STRING = 3; - public const STATE_INTERPOLATION = 4; - - public const REGEX_NAME = '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A'; - public const REGEX_NUMBER = '/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A'; - public const REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As'; - public const REGEX_DQ_STRING_DELIM = '/"/A'; - public const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As'; - public const PUNCTUATION = '()[]{}?:.,|'; - - public function __construct(Environment $env, array $options = []) - { - $this->env = $env; - - $this->options = array_merge([ - 'tag_comment' => ['{#', '#}'], - 'tag_block' => ['{%', '%}'], - 'tag_variable' => ['{{', '}}'], - 'whitespace_trim' => '-', - 'whitespace_line_trim' => '~', - 'whitespace_line_chars' => ' \t\0\x0B', - 'interpolation' => ['#{', '}'], - ], $options); - - // when PHP 7.3 is the min version, we will be able to remove the '#' part in preg_quote as it's part of the default - $this->regexes = [ - // }} - 'lex_var' => '{ - \s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '#').'\s*'. // -}}\s* - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~}}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_variable'][1], '#'). // }} - ') - }Ax', - - // %} - 'lex_block' => '{ - \s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*\n?'. // -%}\s*\n? - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#').'\n?'. // %}\n? - ') - }Ax', - - // {% endverbatim %} - 'lex_raw_data' => '{'. - preg_quote($this->options['tag_block'][0], '#'). // {% - '('. - $this->options['whitespace_trim']. // - - '|'. - $this->options['whitespace_line_trim']. // ~ - ')?\s*endverbatim\s*'. - '(?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%} - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#'). // %} - ') - }sx', - - 'operator' => $this->getOperatorRegex(), - - // #} - 'lex_comment' => '{ - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_comment'][1], '#').'\s*\n?'. // -#}\s*\n? - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_comment'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~#}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_comment'][1], '#').'\n?'. // #}\n? - ') - }sx', - - // verbatim %} - 'lex_block_raw' => '{ - \s*verbatim\s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}\s* - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#'). // %} - ') - }Asx', - - 'lex_block_line' => '{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '#').'}As', - - // {{ or {% or {# - 'lex_tokens_start' => '{ - ('. - preg_quote($this->options['tag_variable'][0], '#'). // {{ - '|'. - preg_quote($this->options['tag_block'][0], '#'). // {% - '|'. - preg_quote($this->options['tag_comment'][0], '#'). // {# - ')('. - preg_quote($this->options['whitespace_trim'], '#'). // - - '|'. - preg_quote($this->options['whitespace_line_trim'], '#'). // ~ - ')? - }sx', - 'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A', - 'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A', - ]; - } - - public function tokenize(Source $source): TokenStream - { - $this->source = $source; - $this->code = str_replace(["\r\n", "\r"], "\n", $source->getCode()); - $this->cursor = 0; - $this->lineno = 1; - $this->end = \strlen($this->code); - $this->tokens = []; - $this->state = self::STATE_DATA; - $this->states = []; - $this->brackets = []; - $this->position = -1; - - // find all token starts in one go - preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, \PREG_OFFSET_CAPTURE); - $this->positions = $matches; - - while ($this->cursor < $this->end) { - // dispatch to the lexing functions depending - // on the current state - switch ($this->state) { - case self::STATE_DATA: - $this->lexData(); - break; - - case self::STATE_BLOCK: - $this->lexBlock(); - break; - - case self::STATE_VAR: - $this->lexVar(); - break; - - case self::STATE_STRING: - $this->lexString(); - break; - - case self::STATE_INTERPOLATION: - $this->lexInterpolation(); - break; - } - } - - $this->pushToken(/* Token::EOF_TYPE */ -1); - - if (!empty($this->brackets)) { - list($expect, $lineno) = array_pop($this->brackets); - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - - return new TokenStream($this->tokens, $this->source); - } - - private function lexData(): void - { - // if no matches are left we return the rest of the template as simple text token - if ($this->position == \count($this->positions[0]) - 1) { - $this->pushToken(/* Token::TEXT_TYPE */ 0, substr($this->code, $this->cursor)); - $this->cursor = $this->end; - - return; - } - - // Find the first token after the current cursor - $position = $this->positions[0][++$this->position]; - while ($position[1] < $this->cursor) { - if ($this->position == \count($this->positions[0]) - 1) { - return; - } - $position = $this->positions[0][++$this->position]; - } - - // push the template text first - $text = $textContent = substr($this->code, $this->cursor, $position[1] - $this->cursor); - - // trim? - if (isset($this->positions[2][$this->position][0])) { - if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) { - // whitespace_trim detected ({%-, {{- or {#-) - $text = rtrim($text); - } elseif ($this->options['whitespace_line_trim'] === $this->positions[2][$this->position][0]) { - // whitespace_line_trim detected ({%~, {{~ or {#~) - // don't trim \r and \n - $text = rtrim($text, " \t\0\x0B"); - } - } - $this->pushToken(/* Token::TEXT_TYPE */ 0, $text); - $this->moveCursor($textContent.$position[0]); - - switch ($this->positions[1][$this->position][0]) { - case $this->options['tag_comment'][0]: - $this->lexComment(); - break; - - case $this->options['tag_block'][0]: - // raw data? - if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - $this->lexRawData(); - // {% line \d+ %} - } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - $this->lineno = (int) $match[1]; - } else { - $this->pushToken(/* Token::BLOCK_START_TYPE */ 1); - $this->pushState(self::STATE_BLOCK); - $this->currentVarBlockLine = $this->lineno; - } - break; - - case $this->options['tag_variable'][0]: - $this->pushToken(/* Token::VAR_START_TYPE */ 2); - $this->pushState(self::STATE_VAR); - $this->currentVarBlockLine = $this->lineno; - break; - } - } - - private function lexBlock(): void - { - if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::BLOCK_END_TYPE */ 3); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - private function lexVar(): void - { - if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::VAR_END_TYPE */ 4); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - private function lexExpression(): void - { - // whitespace - if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - - if ($this->cursor >= $this->end) { - throw new SyntaxError(sprintf('Unclosed "%s".', self::STATE_BLOCK === $this->state ? 'block' : 'variable'), $this->currentVarBlockLine, $this->source); - } - } - - // arrow function - if ('=' === $this->code[$this->cursor] && '>' === $this->code[$this->cursor + 1]) { - $this->pushToken(Token::ARROW_TYPE, '=>'); - $this->moveCursor('=>'); - } - // operators - elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::OPERATOR_TYPE */ 8, preg_replace('/\s+/', ' ', $match[0])); - $this->moveCursor($match[0]); - } - // names - elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::NAME_TYPE */ 5, $match[0]); - $this->moveCursor($match[0]); - } - // numbers - elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0, $this->cursor)) { - $number = (float) $match[0]; // floats - if (ctype_digit($match[0]) && $number <= \PHP_INT_MAX) { - $number = (int) $match[0]; // integers lower than the maximum - } - $this->pushToken(/* Token::NUMBER_TYPE */ 6, $number); - $this->moveCursor($match[0]); - } - // punctuation - elseif (false !== strpos(self::PUNCTUATION, $this->code[$this->cursor])) { - // opening bracket - if (false !== strpos('([{', $this->code[$this->cursor])) { - $this->brackets[] = [$this->code[$this->cursor], $this->lineno]; - } - // closing bracket - elseif (false !== strpos(')]}', $this->code[$this->cursor])) { - if (empty($this->brackets)) { - throw new SyntaxError(sprintf('Unexpected "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - - list($expect, $lineno) = array_pop($this->brackets); - if ($this->code[$this->cursor] != strtr($expect, '([{', ')]}')) { - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - } - - $this->pushToken(/* Token::PUNCTUATION_TYPE */ 9, $this->code[$this->cursor]); - ++$this->cursor; - } - // strings - elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::STRING_TYPE */ 7, stripcslashes(substr($match[0], 1, -1))); - $this->moveCursor($match[0]); - } - // opening double quoted string - elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) { - $this->brackets[] = ['"', $this->lineno]; - $this->pushState(self::STATE_STRING); - $this->moveCursor($match[0]); - } - // unlexable - else { - throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - } - - private function lexRawData(): void - { - if (!preg_match($this->regexes['lex_raw_data'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) { - throw new SyntaxError('Unexpected end of file: Unclosed "verbatim" block.', $this->lineno, $this->source); - } - - $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor); - $this->moveCursor($text.$match[0][0]); - - // trim? - if (isset($match[1][0])) { - if ($this->options['whitespace_trim'] === $match[1][0]) { - // whitespace_trim detected ({%-, {{- or {#-) - $text = rtrim($text); - } else { - // whitespace_line_trim detected ({%~, {{~ or {#~) - // don't trim \r and \n - $text = rtrim($text, " \t\0\x0B"); - } - } - - $this->pushToken(/* Token::TEXT_TYPE */ 0, $text); - } - - private function lexComment(): void - { - if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) { - throw new SyntaxError('Unclosed comment.', $this->lineno, $this->source); - } - - $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]); - } - - private function lexString(): void - { - if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) { - $this->brackets[] = [$this->options['interpolation'][0], $this->lineno]; - $this->pushToken(/* Token::INTERPOLATION_START_TYPE */ 10); - $this->moveCursor($match[0]); - $this->pushState(self::STATE_INTERPOLATION); - } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && \strlen($match[0]) > 0) { - $this->pushToken(/* Token::STRING_TYPE */ 7, stripcslashes($match[0])); - $this->moveCursor($match[0]); - } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) { - list($expect, $lineno) = array_pop($this->brackets); - if ('"' != $this->code[$this->cursor]) { - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - - $this->popState(); - ++$this->cursor; - } else { - // unlexable - throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - } - - private function lexInterpolation(): void - { - $bracket = end($this->brackets); - if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->cursor)) { - array_pop($this->brackets); - $this->pushToken(/* Token::INTERPOLATION_END_TYPE */ 11); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - private function pushToken($type, $value = ''): void - { - // do not push empty text tokens - if (/* Token::TEXT_TYPE */ 0 === $type && '' === $value) { - return; - } - - $this->tokens[] = new Token($type, $value, $this->lineno); - } - - private function moveCursor($text): void - { - $this->cursor += \strlen($text); - $this->lineno += substr_count($text, "\n"); - } - - private function getOperatorRegex(): string - { - $operators = array_merge( - ['='], - array_keys($this->env->getUnaryOperators()), - array_keys($this->env->getBinaryOperators()) - ); - - $operators = array_combine($operators, array_map('strlen', $operators)); - arsort($operators); - - $regex = []; - foreach ($operators as $operator => $length) { - // an operator that ends with a character must be followed by - // a whitespace, a parenthesis, an opening map [ or sequence { - $r = preg_quote($operator, '/'); - if (ctype_alpha($operator[$length - 1])) { - $r .= '(?=[\s()\[{])'; - } - - // an operator that begins with a character must not have a dot or pipe before - if (ctype_alpha($operator[0])) { - $r = '(?states[] = $this->state; - $this->state = $state; - } - - private function popState(): void - { - if (0 === \count($this->states)) { - throw new \LogicException('Cannot pop state without a previous state.'); - } - - $this->state = array_pop($this->states); - } -} diff --git a/lib/twig/twig/src/Loader/ArrayLoader.php b/lib/twig/twig/src/Loader/ArrayLoader.php deleted file mode 100644 index 5d726c35a..000000000 --- a/lib/twig/twig/src/Loader/ArrayLoader.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -final class ArrayLoader implements LoaderInterface -{ - private $templates = []; - - /** - * @param array $templates An array of templates (keys are the names, and values are the source code) - */ - public function __construct(array $templates = []) - { - $this->templates = $templates; - } - - public function setTemplate(string $name, string $template): void - { - $this->templates[$name] = $template; - } - - public function getSourceContext(string $name): Source - { - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return new Source($this->templates[$name], $name); - } - - public function exists(string $name): bool - { - return isset($this->templates[$name]); - } - - public function getCacheKey(string $name): string - { - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return $name.':'.$this->templates[$name]; - } - - public function isFresh(string $name, int $time): bool - { - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return true; - } -} diff --git a/lib/twig/twig/src/Loader/ChainLoader.php b/lib/twig/twig/src/Loader/ChainLoader.php deleted file mode 100644 index fbf4f3a06..000000000 --- a/lib/twig/twig/src/Loader/ChainLoader.php +++ /dev/null @@ -1,119 +0,0 @@ - - */ -final class ChainLoader implements LoaderInterface -{ - private $hasSourceCache = []; - private $loaders = []; - - /** - * @param LoaderInterface[] $loaders - */ - public function __construct(array $loaders = []) - { - foreach ($loaders as $loader) { - $this->addLoader($loader); - } - } - - public function addLoader(LoaderInterface $loader): void - { - $this->loaders[] = $loader; - $this->hasSourceCache = []; - } - - /** - * @return LoaderInterface[] - */ - public function getLoaders(): array - { - return $this->loaders; - } - - public function getSourceContext(string $name): Source - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if (!$loader->exists($name)) { - continue; - } - - try { - return $loader->getSourceContext($name); - } catch (LoaderError $e) { - $exceptions[] = $e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } - - public function exists(string $name): bool - { - if (isset($this->hasSourceCache[$name])) { - return $this->hasSourceCache[$name]; - } - - foreach ($this->loaders as $loader) { - if ($loader->exists($name)) { - return $this->hasSourceCache[$name] = true; - } - } - - return $this->hasSourceCache[$name] = false; - } - - public function getCacheKey(string $name): string - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if (!$loader->exists($name)) { - continue; - } - - try { - return $loader->getCacheKey($name); - } catch (LoaderError $e) { - $exceptions[] = \get_class($loader).': '.$e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } - - public function isFresh(string $name, int $time): bool - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if (!$loader->exists($name)) { - continue; - } - - try { - return $loader->isFresh($name, $time); - } catch (LoaderError $e) { - $exceptions[] = \get_class($loader).': '.$e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } -} diff --git a/lib/twig/twig/src/Loader/FilesystemLoader.php b/lib/twig/twig/src/Loader/FilesystemLoader.php deleted file mode 100644 index 62267a11c..000000000 --- a/lib/twig/twig/src/Loader/FilesystemLoader.php +++ /dev/null @@ -1,283 +0,0 @@ - - */ -class FilesystemLoader implements LoaderInterface -{ - /** Identifier of the main namespace. */ - public const MAIN_NAMESPACE = '__main__'; - - protected $paths = []; - protected $cache = []; - protected $errorCache = []; - - private $rootPath; - - /** - * @param string|array $paths A path or an array of paths where to look for templates - * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) - */ - public function __construct($paths = [], string $rootPath = null) - { - $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR; - if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) { - $this->rootPath = $realPath.\DIRECTORY_SEPARATOR; - } - - if ($paths) { - $this->setPaths($paths); - } - } - - /** - * Returns the paths to the templates. - */ - public function getPaths(string $namespace = self::MAIN_NAMESPACE): array - { - return $this->paths[$namespace] ?? []; - } - - /** - * Returns the path namespaces. - * - * The main namespace is always defined. - */ - public function getNamespaces(): array - { - return array_keys($this->paths); - } - - /** - * @param string|array $paths A path or an array of paths where to look for templates - */ - public function setPaths($paths, string $namespace = self::MAIN_NAMESPACE): void - { - if (!\is_array($paths)) { - $paths = [$paths]; - } - - $this->paths[$namespace] = []; - foreach ($paths as $path) { - $this->addPath($path, $namespace); - } - } - - /** - * @throws LoaderError - */ - public function addPath(string $path, string $namespace = self::MAIN_NAMESPACE): void - { - // invalidate the cache - $this->cache = $this->errorCache = []; - - $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; - if (!is_dir($checkPath)) { - throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); - } - - $this->paths[$namespace][] = rtrim($path, '/\\'); - } - - /** - * @throws LoaderError - */ - public function prependPath(string $path, string $namespace = self::MAIN_NAMESPACE): void - { - // invalidate the cache - $this->cache = $this->errorCache = []; - - $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; - if (!is_dir($checkPath)) { - throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); - } - - $path = rtrim($path, '/\\'); - - if (!isset($this->paths[$namespace])) { - $this->paths[$namespace][] = $path; - } else { - array_unshift($this->paths[$namespace], $path); - } - } - - public function getSourceContext(string $name): Source - { - if (null === $path = $this->findTemplate($name)) { - return new Source('', $name, ''); - } - - return new Source(file_get_contents($path), $name, $path); - } - - public function getCacheKey(string $name): string - { - if (null === $path = $this->findTemplate($name)) { - return ''; - } - $len = \strlen($this->rootPath); - if (0 === strncmp($this->rootPath, $path, $len)) { - return substr($path, $len); - } - - return $path; - } - - /** - * @return bool - */ - public function exists(string $name) - { - $name = $this->normalizeName($name); - - if (isset($this->cache[$name])) { - return true; - } - - return null !== $this->findTemplate($name, false); - } - - public function isFresh(string $name, int $time): bool - { - // false support to be removed in 3.0 - if (null === $path = $this->findTemplate($name)) { - return false; - } - - return filemtime($path) < $time; - } - - /** - * @return string|null - */ - protected function findTemplate(string $name, bool $throw = true) - { - $name = $this->normalizeName($name); - - if (isset($this->cache[$name])) { - return $this->cache[$name]; - } - - if (isset($this->errorCache[$name])) { - if (!$throw) { - return null; - } - - throw new LoaderError($this->errorCache[$name]); - } - - try { - list($namespace, $shortname) = $this->parseName($name); - - $this->validateName($shortname); - } catch (LoaderError $e) { - if (!$throw) { - return null; - } - - throw $e; - } - - if (!isset($this->paths[$namespace])) { - $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace); - - if (!$throw) { - return null; - } - - throw new LoaderError($this->errorCache[$name]); - } - - foreach ($this->paths[$namespace] as $path) { - if (!$this->isAbsolutePath($path)) { - $path = $this->rootPath.$path; - } - - if (is_file($path.'/'.$shortname)) { - if (false !== $realpath = realpath($path.'/'.$shortname)) { - return $this->cache[$name] = $realpath; - } - - return $this->cache[$name] = $path.'/'.$shortname; - } - } - - $this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])); - - if (!$throw) { - return null; - } - - throw new LoaderError($this->errorCache[$name]); - } - - private function normalizeName(string $name): string - { - return preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name)); - } - - private function parseName(string $name, string $default = self::MAIN_NAMESPACE): array - { - if (isset($name[0]) && '@' == $name[0]) { - if (false === $pos = strpos($name, '/')) { - throw new LoaderError(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name)); - } - - $namespace = substr($name, 1, $pos - 1); - $shortname = substr($name, $pos + 1); - - return [$namespace, $shortname]; - } - - return [$default, $name]; - } - - private function validateName(string $name): void - { - if (false !== strpos($name, "\0")) { - throw new LoaderError('A template name cannot contain NUL bytes.'); - } - - $name = ltrim($name, '/'); - $parts = explode('/', $name); - $level = 0; - foreach ($parts as $part) { - if ('..' === $part) { - --$level; - } elseif ('.' !== $part) { - ++$level; - } - - if ($level < 0) { - throw new LoaderError(sprintf('Looks like you try to load a template outside configured directories (%s).', $name)); - } - } - } - - private function isAbsolutePath(string $file): bool - { - return strspn($file, '/\\', 0, 1) - || (\strlen($file) > 3 && ctype_alpha($file[0]) - && ':' === $file[1] - && strspn($file, '/\\', 2, 1) - ) - || null !== parse_url($file, \PHP_URL_SCHEME) - ; - } -} diff --git a/lib/twig/twig/src/Loader/LoaderInterface.php b/lib/twig/twig/src/Loader/LoaderInterface.php deleted file mode 100644 index fec7e85ff..000000000 --- a/lib/twig/twig/src/Loader/LoaderInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -interface LoaderInterface -{ - /** - * Returns the source context for a given template logical name. - * - * @throws LoaderError When $name is not found - */ - public function getSourceContext(string $name): Source; - - /** - * Gets the cache key to use for the cache for a given template name. - * - * @throws LoaderError When $name is not found - */ - public function getCacheKey(string $name): string; - - /** - * @param int $time Timestamp of the last modification time of the cached template - * - * @throws LoaderError When $name is not found - */ - public function isFresh(string $name, int $time): bool; - - /** - * @return bool - */ - public function exists(string $name); -} diff --git a/lib/twig/twig/src/Markup.php b/lib/twig/twig/src/Markup.php deleted file mode 100644 index 1788acc4f..000000000 --- a/lib/twig/twig/src/Markup.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class Markup implements \Countable, \JsonSerializable -{ - private $content; - private $charset; - - public function __construct($content, $charset) - { - $this->content = (string) $content; - $this->charset = $charset; - } - - public function __toString() - { - return $this->content; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return mb_strlen($this->content, $this->charset); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->content; - } -} diff --git a/lib/twig/twig/src/Node/AutoEscapeNode.php b/lib/twig/twig/src/Node/AutoEscapeNode.php deleted file mode 100644 index cd970411b..000000000 --- a/lib/twig/twig/src/Node/AutoEscapeNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class AutoEscapeNode extends Node -{ - public function __construct($value, Node $body, int $lineno, string $tag = 'autoescape') - { - parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->subcompile($this->getNode('body')); - } -} diff --git a/lib/twig/twig/src/Node/BlockNode.php b/lib/twig/twig/src/Node/BlockNode.php deleted file mode 100644 index 0632ba747..000000000 --- a/lib/twig/twig/src/Node/BlockNode.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class BlockNode extends Node -{ - public function __construct(string $name, Node $body, int $lineno, string $tag = null) - { - parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n") - ->indent() - ->write("\$macros = \$this->macros;\n") - ; - - $compiler - ->subcompile($this->getNode('body')) - ->outdent() - ->write("}\n\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/BlockReferenceNode.php b/lib/twig/twig/src/Node/BlockReferenceNode.php deleted file mode 100644 index cc8af5b52..000000000 --- a/lib/twig/twig/src/Node/BlockReferenceNode.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class BlockReferenceNode extends Node implements NodeOutputInterface -{ - public function __construct(string $name, int $lineno, string $tag = null) - { - parent::__construct([], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write(sprintf("\$this->displayBlock('%s', \$context, \$blocks);\n", $this->getAttribute('name'))) - ; - } -} diff --git a/lib/twig/twig/src/Node/BodyNode.php b/lib/twig/twig/src/Node/BodyNode.php deleted file mode 100644 index 041cbf685..000000000 --- a/lib/twig/twig/src/Node/BodyNode.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -class BodyNode extends Node -{ -} diff --git a/lib/twig/twig/src/Node/CheckSecurityCallNode.php b/lib/twig/twig/src/Node/CheckSecurityCallNode.php deleted file mode 100644 index a78a38d80..000000000 --- a/lib/twig/twig/src/Node/CheckSecurityCallNode.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -class CheckSecurityCallNode extends Node -{ - public function compile(Compiler $compiler) - { - $compiler - ->write("\$this->sandbox = \$this->env->getExtension('\Twig\Extension\SandboxExtension');\n") - ->write("\$this->checkSecurity();\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/CheckSecurityNode.php b/lib/twig/twig/src/Node/CheckSecurityNode.php deleted file mode 100644 index 472732796..000000000 --- a/lib/twig/twig/src/Node/CheckSecurityNode.php +++ /dev/null @@ -1,88 +0,0 @@ - - */ -class CheckSecurityNode extends Node -{ - private $usedFilters; - private $usedTags; - private $usedFunctions; - - public function __construct(array $usedFilters, array $usedTags, array $usedFunctions) - { - $this->usedFilters = $usedFilters; - $this->usedTags = $usedTags; - $this->usedFunctions = $usedFunctions; - - parent::__construct(); - } - - public function compile(Compiler $compiler): void - { - $tags = $filters = $functions = []; - foreach (['tags', 'filters', 'functions'] as $type) { - foreach ($this->{'used'.ucfirst($type)} as $name => $node) { - if ($node instanceof Node) { - ${$type}[$name] = $node->getTemplateLine(); - } else { - ${$type}[$node] = null; - } - } - } - - $compiler - ->write("\n") - ->write("public function checkSecurity()\n") - ->write("{\n") - ->indent() - ->write('static $tags = ')->repr(array_filter($tags))->raw(";\n") - ->write('static $filters = ')->repr(array_filter($filters))->raw(";\n") - ->write('static $functions = ')->repr(array_filter($functions))->raw(";\n\n") - ->write("try {\n") - ->indent() - ->write("\$this->sandbox->checkSecurity(\n") - ->indent() - ->write(!$tags ? "[],\n" : "['".implode("', '", array_keys($tags))."'],\n") - ->write(!$filters ? "[],\n" : "['".implode("', '", array_keys($filters))."'],\n") - ->write(!$functions ? "[]\n" : "['".implode("', '", array_keys($functions))."']\n") - ->outdent() - ->write(");\n") - ->outdent() - ->write("} catch (SecurityError \$e) {\n") - ->indent() - ->write("\$e->setSourceContext(\$this->source);\n\n") - ->write("if (\$e instanceof SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n") - ->outdent() - ->write("} elseif (\$e instanceof SecurityNotAllowedFilterError && isset(\$filters[\$e->getFilterName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n") - ->outdent() - ->write("} elseif (\$e instanceof SecurityNotAllowedFunctionError && isset(\$functions[\$e->getFunctionName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n") - ->outdent() - ->write("}\n\n") - ->write("throw \$e;\n") - ->outdent() - ->write("}\n\n") - ->outdent() - ->write("}\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/CheckToStringNode.php b/lib/twig/twig/src/Node/CheckToStringNode.php deleted file mode 100644 index c7a9d6984..000000000 --- a/lib/twig/twig/src/Node/CheckToStringNode.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class CheckToStringNode extends AbstractExpression -{ - public function __construct(AbstractExpression $expr) - { - parent::__construct(['expr' => $expr], [], $expr->getTemplateLine(), $expr->getNodeTag()); - } - - public function compile(Compiler $compiler): void - { - $expr = $this->getNode('expr'); - $compiler - ->raw('$this->sandbox->ensureToStringAllowed(') - ->subcompile($expr) - ->raw(', ') - ->repr($expr->getTemplateLine()) - ->raw(', $this->source)') - ; - } -} diff --git a/lib/twig/twig/src/Node/DeprecatedNode.php b/lib/twig/twig/src/Node/DeprecatedNode.php deleted file mode 100644 index 5ff44307f..000000000 --- a/lib/twig/twig/src/Node/DeprecatedNode.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -class DeprecatedNode extends Node -{ - public function __construct(AbstractExpression $expr, int $lineno, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - $expr = $this->getNode('expr'); - - if ($expr instanceof ConstantExpression) { - $compiler->write('@trigger_error(') - ->subcompile($expr); - } else { - $varName = $compiler->getVarName(); - $compiler->write(sprintf('$%s = ', $varName)) - ->subcompile($expr) - ->raw(";\n") - ->write(sprintf('@trigger_error($%s', $varName)); - } - - $compiler - ->raw('.') - ->string(sprintf(' ("%s" at line %d).', $this->getTemplateName(), $this->getTemplateLine())) - ->raw(", E_USER_DEPRECATED);\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/DoNode.php b/lib/twig/twig/src/Node/DoNode.php deleted file mode 100644 index f7783d19f..000000000 --- a/lib/twig/twig/src/Node/DoNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class DoNode extends Node -{ - public function __construct(AbstractExpression $expr, int $lineno, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('') - ->subcompile($this->getNode('expr')) - ->raw(";\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/EmbedNode.php b/lib/twig/twig/src/Node/EmbedNode.php deleted file mode 100644 index 903c3f6c7..000000000 --- a/lib/twig/twig/src/Node/EmbedNode.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class EmbedNode extends IncludeNode -{ - // we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module) - public function __construct(string $name, int $index, ?AbstractExpression $variables, bool $only, bool $ignoreMissing, int $lineno, string $tag = null) - { - parent::__construct(new ConstantExpression('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag); - - $this->setAttribute('name', $name); - $this->setAttribute('index', $index); - } - - protected function addGetTemplate(Compiler $compiler): void - { - $compiler - ->write('$this->loadTemplate(') - ->string($this->getAttribute('name')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(', ') - ->string($this->getAttribute('index')) - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/AbstractExpression.php b/lib/twig/twig/src/Node/Expression/AbstractExpression.php deleted file mode 100644 index 42da0559d..000000000 --- a/lib/twig/twig/src/Node/Expression/AbstractExpression.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -abstract class AbstractExpression extends Node -{ -} diff --git a/lib/twig/twig/src/Node/Expression/ArrayExpression.php b/lib/twig/twig/src/Node/Expression/ArrayExpression.php deleted file mode 100644 index 0e25fe46a..000000000 --- a/lib/twig/twig/src/Node/Expression/ArrayExpression.php +++ /dev/null @@ -1,85 +0,0 @@ -index = -1; - foreach ($this->getKeyValuePairs() as $pair) { - if ($pair['key'] instanceof ConstantExpression && ctype_digit((string) $pair['key']->getAttribute('value')) && $pair['key']->getAttribute('value') > $this->index) { - $this->index = $pair['key']->getAttribute('value'); - } - } - } - - public function getKeyValuePairs(): array - { - $pairs = []; - foreach (array_chunk($this->nodes, 2) as $pair) { - $pairs[] = [ - 'key' => $pair[0], - 'value' => $pair[1], - ]; - } - - return $pairs; - } - - public function hasElement(AbstractExpression $key): bool - { - foreach ($this->getKeyValuePairs() as $pair) { - // we compare the string representation of the keys - // to avoid comparing the line numbers which are not relevant here. - if ((string) $key === (string) $pair['key']) { - return true; - } - } - - return false; - } - - public function addElement(AbstractExpression $value, AbstractExpression $key = null): void - { - if (null === $key) { - $key = new ConstantExpression(++$this->index, $value->getTemplateLine()); - } - - array_push($this->nodes, $key, $value); - } - - public function compile(Compiler $compiler): void - { - $compiler->raw('['); - $first = true; - foreach ($this->getKeyValuePairs() as $pair) { - if (!$first) { - $compiler->raw(', '); - } - $first = false; - - $compiler - ->subcompile($pair['key']) - ->raw(' => ') - ->subcompile($pair['value']) - ; - } - $compiler->raw(']'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/ArrowFunctionExpression.php b/lib/twig/twig/src/Node/Expression/ArrowFunctionExpression.php deleted file mode 100644 index eaad03c9c..000000000 --- a/lib/twig/twig/src/Node/Expression/ArrowFunctionExpression.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ -class ArrowFunctionExpression extends AbstractExpression -{ - public function __construct(AbstractExpression $expr, Node $names, $lineno, $tag = null) - { - parent::__construct(['expr' => $expr, 'names' => $names], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->raw('function (') - ; - foreach ($this->getNode('names') as $i => $name) { - if ($i) { - $compiler->raw(', '); - } - - $compiler - ->raw('$__') - ->raw($name->getAttribute('name')) - ->raw('__') - ; - } - $compiler - ->raw(') use ($context, $macros) { ') - ; - foreach ($this->getNode('names') as $name) { - $compiler - ->raw('$context["') - ->raw($name->getAttribute('name')) - ->raw('"] = $__') - ->raw($name->getAttribute('name')) - ->raw('__; ') - ; - } - $compiler - ->raw('return ') - ->subcompile($this->getNode('expr')) - ->raw('; }') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/AssignNameExpression.php b/lib/twig/twig/src/Node/Expression/AssignNameExpression.php deleted file mode 100644 index 7dd1bc4a3..000000000 --- a/lib/twig/twig/src/Node/Expression/AssignNameExpression.php +++ /dev/null @@ -1,27 +0,0 @@ -raw('$context[') - ->string($this->getAttribute('name')) - ->raw(']') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/AbstractBinary.php b/lib/twig/twig/src/Node/Expression/Binary/AbstractBinary.php deleted file mode 100644 index c424e5cc5..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/AbstractBinary.php +++ /dev/null @@ -1,42 +0,0 @@ - $left, 'right' => $right], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('left')) - ->raw(' ') - ; - $this->operator($compiler); - $compiler - ->raw(' ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - abstract public function operator(Compiler $compiler): Compiler; -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/AddBinary.php b/lib/twig/twig/src/Node/Expression/Binary/AddBinary.php deleted file mode 100644 index ee4307e33..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/AddBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('+'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/AndBinary.php b/lib/twig/twig/src/Node/Expression/Binary/AndBinary.php deleted file mode 100644 index 5f2380da5..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/AndBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('&&'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php b/lib/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php deleted file mode 100644 index db7d6d612..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('&'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php b/lib/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php deleted file mode 100644 index ce803dd90..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('|'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php b/lib/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php deleted file mode 100644 index 5c2978501..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('^'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/ConcatBinary.php b/lib/twig/twig/src/Node/Expression/Binary/ConcatBinary.php deleted file mode 100644 index f825ab874..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/ConcatBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('.'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/DivBinary.php b/lib/twig/twig/src/Node/Expression/Binary/DivBinary.php deleted file mode 100644 index e3817d1cd..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/DivBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('/'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php b/lib/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php deleted file mode 100644 index c3516b853..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -getVarName(); - $right = $compiler->getVarName(); - $compiler - ->raw(sprintf('(is_string($%s = ', $left)) - ->subcompile($this->getNode('left')) - ->raw(sprintf(') && is_string($%s = ', $right)) - ->subcompile($this->getNode('right')) - ->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right)) - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw(''); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/EqualBinary.php b/lib/twig/twig/src/Node/Expression/Binary/EqualBinary.php deleted file mode 100644 index 6b48549ef..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/EqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 === twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('=='); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php b/lib/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php deleted file mode 100644 index d7e7980ef..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php +++ /dev/null @@ -1,29 +0,0 @@ -raw('(int) floor('); - parent::compile($compiler); - $compiler->raw(')'); - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('/'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/GreaterBinary.php b/lib/twig/twig/src/Node/Expression/Binary/GreaterBinary.php deleted file mode 100644 index e1dd06780..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/GreaterBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(1 === twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('>'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php b/lib/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php deleted file mode 100644 index df9bfcfbf..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 <= twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('>='); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/InBinary.php b/lib/twig/twig/src/Node/Expression/Binary/InBinary.php deleted file mode 100644 index 6dbfa97f0..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/InBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('twig_in_filter(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('in'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/LessBinary.php b/lib/twig/twig/src/Node/Expression/Binary/LessBinary.php deleted file mode 100644 index 598e62913..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/LessBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(-1 === twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('<'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php b/lib/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php deleted file mode 100644 index e3c4af58d..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 >= twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('<='); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/MatchesBinary.php b/lib/twig/twig/src/Node/Expression/Binary/MatchesBinary.php deleted file mode 100644 index bc97292cd..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/MatchesBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('preg_match(') - ->subcompile($this->getNode('right')) - ->raw(', ') - ->subcompile($this->getNode('left')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw(''); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/ModBinary.php b/lib/twig/twig/src/Node/Expression/Binary/ModBinary.php deleted file mode 100644 index 271b45cac..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/ModBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('%'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/MulBinary.php b/lib/twig/twig/src/Node/Expression/Binary/MulBinary.php deleted file mode 100644 index 6d4c1e0b6..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/MulBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('*'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php b/lib/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php deleted file mode 100644 index db47a2890..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 !== twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('!='); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/NotInBinary.php b/lib/twig/twig/src/Node/Expression/Binary/NotInBinary.php deleted file mode 100644 index fcba6cca1..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/NotInBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('!twig_in_filter(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('not in'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/OrBinary.php b/lib/twig/twig/src/Node/Expression/Binary/OrBinary.php deleted file mode 100644 index 21f87c91b..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/OrBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('||'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/PowerBinary.php b/lib/twig/twig/src/Node/Expression/Binary/PowerBinary.php deleted file mode 100644 index c9f4c6697..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/PowerBinary.php +++ /dev/null @@ -1,22 +0,0 @@ -raw('**'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/RangeBinary.php b/lib/twig/twig/src/Node/Expression/Binary/RangeBinary.php deleted file mode 100644 index 55982c819..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/RangeBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('range(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('..'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php b/lib/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php deleted file mode 100644 index ae5a4a493..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php +++ /dev/null @@ -1,22 +0,0 @@ -raw('<=>'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php b/lib/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php deleted file mode 100644 index d0df1c4b6..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -getVarName(); - $right = $compiler->getVarName(); - $compiler - ->raw(sprintf('(is_string($%s = ', $left)) - ->subcompile($this->getNode('left')) - ->raw(sprintf(') && is_string($%s = ', $right)) - ->subcompile($this->getNode('right')) - ->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right)) - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw(''); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Binary/SubBinary.php b/lib/twig/twig/src/Node/Expression/Binary/SubBinary.php deleted file mode 100644 index eeb87faca..000000000 --- a/lib/twig/twig/src/Node/Expression/Binary/SubBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('-'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/BlockReferenceExpression.php b/lib/twig/twig/src/Node/Expression/BlockReferenceExpression.php deleted file mode 100644 index b1e2a8f7b..000000000 --- a/lib/twig/twig/src/Node/Expression/BlockReferenceExpression.php +++ /dev/null @@ -1,86 +0,0 @@ - - */ -class BlockReferenceExpression extends AbstractExpression -{ - public function __construct(Node $name, ?Node $template, int $lineno, string $tag = null) - { - $nodes = ['name' => $name]; - if (null !== $template) { - $nodes['template'] = $template; - } - - parent::__construct($nodes, ['is_defined_test' => false, 'output' => false], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('is_defined_test')) { - $this->compileTemplateCall($compiler, 'hasBlock'); - } else { - if ($this->getAttribute('output')) { - $compiler->addDebugInfo($this); - - $this - ->compileTemplateCall($compiler, 'displayBlock') - ->raw(";\n"); - } else { - $this->compileTemplateCall($compiler, 'renderBlock'); - } - } - } - - private function compileTemplateCall(Compiler $compiler, string $method): Compiler - { - if (!$this->hasNode('template')) { - $compiler->write('$this'); - } else { - $compiler - ->write('$this->loadTemplate(') - ->subcompile($this->getNode('template')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')') - ; - } - - $compiler->raw(sprintf('->%s', $method)); - - return $this->compileBlockArguments($compiler); - } - - private function compileBlockArguments(Compiler $compiler): Compiler - { - $compiler - ->raw('(') - ->subcompile($this->getNode('name')) - ->raw(', $context'); - - if (!$this->hasNode('template')) { - $compiler->raw(', $blocks'); - } - - return $compiler->raw(')'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/CallExpression.php b/lib/twig/twig/src/Node/Expression/CallExpression.php deleted file mode 100644 index 28881066b..000000000 --- a/lib/twig/twig/src/Node/Expression/CallExpression.php +++ /dev/null @@ -1,319 +0,0 @@ -getAttribute('callable'); - - if (\is_string($callable) && false === strpos($callable, '::')) { - $compiler->raw($callable); - } else { - [$r, $callable] = $this->reflectCallable($callable); - - if (\is_string($callable)) { - $compiler->raw($callable); - } elseif (\is_array($callable) && \is_string($callable[0])) { - if (!$r instanceof \ReflectionMethod || $r->isStatic()) { - $compiler->raw(sprintf('%s::%s', $callable[0], $callable[1])); - } else { - $compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1])); - } - } elseif (\is_array($callable) && $callable[0] instanceof ExtensionInterface) { - $class = \get_class($callable[0]); - if (!$compiler->getEnvironment()->hasExtension($class)) { - // Compile a non-optimized call to trigger a \Twig\Error\RuntimeError, which cannot be a compile-time error - $compiler->raw(sprintf('$this->env->getExtension(\'%s\')', $class)); - } else { - $compiler->raw(sprintf('$this->extensions[\'%s\']', ltrim($class, '\\'))); - } - - $compiler->raw(sprintf('->%s', $callable[1])); - } else { - $compiler->raw(sprintf('$this->env->get%s(\'%s\')->getCallable()', ucfirst($this->getAttribute('type')), $this->getAttribute('name'))); - } - } - - $this->compileArguments($compiler); - } - - protected function compileArguments(Compiler $compiler, $isArray = false): void - { - $compiler->raw($isArray ? '[' : '('); - - $first = true; - - if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { - $compiler->raw('$this->env'); - $first = false; - } - - if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->raw('$context'); - $first = false; - } - - if ($this->hasAttribute('arguments')) { - foreach ($this->getAttribute('arguments') as $argument) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->string($argument); - $first = false; - } - } - - if ($this->hasNode('node')) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->subcompile($this->getNode('node')); - $first = false; - } - - if ($this->hasNode('arguments')) { - $callable = $this->getAttribute('callable'); - $arguments = $this->getArguments($callable, $this->getNode('arguments')); - foreach ($arguments as $node) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->subcompile($node); - $first = false; - } - } - - $compiler->raw($isArray ? ']' : ')'); - } - - protected function getArguments($callable, $arguments) - { - $callType = $this->getAttribute('type'); - $callName = $this->getAttribute('name'); - - $parameters = []; - $named = false; - foreach ($arguments as $name => $node) { - if (!\is_int($name)) { - $named = true; - $name = $this->normalizeName($name); - } elseif ($named) { - throw new SyntaxError(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - - $parameters[$name] = $node; - } - - $isVariadic = $this->hasAttribute('is_variadic') && $this->getAttribute('is_variadic'); - if (!$named && !$isVariadic) { - return $parameters; - } - - if (!$callable) { - if ($named) { - $message = sprintf('Named arguments are not supported for %s "%s".', $callType, $callName); - } else { - $message = sprintf('Arbitrary positional arguments are not supported for %s "%s".', $callType, $callName); - } - - throw new \LogicException($message); - } - - list($callableParameters, $isPhpVariadic) = $this->getCallableParameters($callable, $isVariadic); - $arguments = []; - $names = []; - $missingArguments = []; - $optionalArguments = []; - $pos = 0; - foreach ($callableParameters as $callableParameter) { - $name = $this->normalizeName($callableParameter->name); - if (\PHP_VERSION_ID >= 80000 && 'range' === $callable) { - if ('start' === $name) { - $name = 'low'; - } elseif ('end' === $name) { - $name = 'high'; - } - } - - $names[] = $name; - - if (\array_key_exists($name, $parameters)) { - if (\array_key_exists($pos, $parameters)) { - throw new SyntaxError(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - - if (\count($missingArguments)) { - throw new SyntaxError(sprintf( - 'Argument "%s" could not be assigned for %s "%s(%s)" because it is mapped to an internal PHP function which cannot determine default value for optional argument%s "%s".', - $name, $callType, $callName, implode(', ', $names), \count($missingArguments) > 1 ? 's' : '', implode('", "', $missingArguments) - ), $this->getTemplateLine(), $this->getSourceContext()); - } - - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $parameters[$name]; - unset($parameters[$name]); - $optionalArguments = []; - } elseif (\array_key_exists($pos, $parameters)) { - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $parameters[$pos]; - unset($parameters[$pos]); - $optionalArguments = []; - ++$pos; - } elseif ($callableParameter->isDefaultValueAvailable()) { - $optionalArguments[] = new ConstantExpression($callableParameter->getDefaultValue(), -1); - } elseif ($callableParameter->isOptional()) { - if (empty($parameters)) { - break; - } else { - $missingArguments[] = $name; - } - } else { - throw new SyntaxError(sprintf('Value for argument "%s" is required for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - } - - if ($isVariadic) { - $arbitraryArguments = $isPhpVariadic ? new VariadicExpression([], -1) : new ArrayExpression([], -1); - foreach ($parameters as $key => $value) { - if (\is_int($key)) { - $arbitraryArguments->addElement($value); - } else { - $arbitraryArguments->addElement($value, new ConstantExpression($key, -1)); - } - unset($parameters[$key]); - } - - if ($arbitraryArguments->count()) { - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $arbitraryArguments; - } - } - - if (!empty($parameters)) { - $unknownParameter = null; - foreach ($parameters as $parameter) { - if ($parameter instanceof Node) { - $unknownParameter = $parameter; - break; - } - } - - throw new SyntaxError( - sprintf( - 'Unknown argument%s "%s" for %s "%s(%s)".', - \count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $callType, $callName, implode(', ', $names) - ), - $unknownParameter ? $unknownParameter->getTemplateLine() : $this->getTemplateLine(), - $unknownParameter ? $unknownParameter->getSourceContext() : $this->getSourceContext() - ); - } - - return $arguments; - } - - protected function normalizeName(string $name): string - { - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name)); - } - - private function getCallableParameters($callable, bool $isVariadic): array - { - [$r, , $callableName] = $this->reflectCallable($callable); - - $parameters = $r->getParameters(); - if ($this->hasNode('node')) { - array_shift($parameters); - } - if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { - array_shift($parameters); - } - if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { - array_shift($parameters); - } - if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) { - foreach ($this->getAttribute('arguments') as $argument) { - array_shift($parameters); - } - } - $isPhpVariadic = false; - if ($isVariadic) { - $argument = end($parameters); - $isArray = $argument && $argument->hasType() && 'array' === $argument->getType()->getName(); - if ($isArray && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) { - array_pop($parameters); - } elseif ($argument && $argument->isVariadic()) { - array_pop($parameters); - $isPhpVariadic = true; - } else { - throw new \LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); - } - } - - return [$parameters, $isPhpVariadic]; - } - - private function reflectCallable($callable) - { - if (null !== $this->reflector) { - return $this->reflector; - } - - if (\is_string($callable) && false !== $pos = strpos($callable, '::')) { - $callable = [substr($callable, 0, $pos), substr($callable, 2 + $pos)]; - } - - if (\is_array($callable) && method_exists($callable[0], $callable[1])) { - $r = new \ReflectionMethod($callable[0], $callable[1]); - - return $this->reflector = [$r, $callable, $r->class.'::'.$r->name]; - } - - $checkVisibility = $callable instanceof \Closure; - try { - $closure = \Closure::fromCallable($callable); - } catch (\TypeError $e) { - throw new \LogicException(sprintf('Callback for %s "%s" is not callable in the current scope.', $this->getAttribute('type'), $this->getAttribute('name')), 0, $e); - } - $r = new \ReflectionFunction($closure); - - if (false !== strpos($r->name, '{closure}')) { - return $this->reflector = [$r, $callable, 'Closure']; - } - - if ($object = $r->getClosureThis()) { - $callable = [$object, $r->name]; - $callableName = (\function_exists('get_debug_type') ? get_debug_type($object) : \get_class($object)).'::'.$r->name; - } elseif ($class = $r->getClosureScopeClass()) { - $callableName = (\is_array($callable) ? $callable[0] : $class->name).'::'.$r->name; - } else { - $callable = $callableName = $r->name; - } - - if ($checkVisibility && \is_array($callable) && method_exists(...$callable) && !(new \ReflectionMethod(...$callable))->isPublic()) { - $callable = $r->getClosure(); - } - - return $this->reflector = [$r, $callable, $callableName]; - } -} diff --git a/lib/twig/twig/src/Node/Expression/ConditionalExpression.php b/lib/twig/twig/src/Node/Expression/ConditionalExpression.php deleted file mode 100644 index 2c7bd0a27..000000000 --- a/lib/twig/twig/src/Node/Expression/ConditionalExpression.php +++ /dev/null @@ -1,36 +0,0 @@ - $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('((') - ->subcompile($this->getNode('expr1')) - ->raw(') ? (') - ->subcompile($this->getNode('expr2')) - ->raw(') : (') - ->subcompile($this->getNode('expr3')) - ->raw('))') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/ConstantExpression.php b/lib/twig/twig/src/Node/Expression/ConstantExpression.php deleted file mode 100644 index 7ddbcc6fa..000000000 --- a/lib/twig/twig/src/Node/Expression/ConstantExpression.php +++ /dev/null @@ -1,28 +0,0 @@ - $value], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler->repr($this->getAttribute('value')); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Filter/DefaultFilter.php b/lib/twig/twig/src/Node/Expression/Filter/DefaultFilter.php deleted file mode 100644 index 6a572d488..000000000 --- a/lib/twig/twig/src/Node/Expression/Filter/DefaultFilter.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class DefaultFilter extends FilterExpression -{ - public function __construct(Node $node, ConstantExpression $filterName, Node $arguments, int $lineno, string $tag = null) - { - $default = new FilterExpression($node, new ConstantExpression('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine()); - - if ('default' === $filterName->getAttribute('value') && ($node instanceof NameExpression || $node instanceof GetAttrExpression)) { - $test = new DefinedTest(clone $node, 'defined', new Node(), $node->getTemplateLine()); - $false = \count($arguments) ? $arguments->getNode(0) : new ConstantExpression('', $node->getTemplateLine()); - - $node = new ConditionalExpression($test, $default, $false, $node->getTemplateLine()); - } else { - $node = $default; - } - - parent::__construct($node, $filterName, $arguments, $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->subcompile($this->getNode('node')); - } -} diff --git a/lib/twig/twig/src/Node/Expression/FilterExpression.php b/lib/twig/twig/src/Node/Expression/FilterExpression.php deleted file mode 100644 index 0fc158869..000000000 --- a/lib/twig/twig/src/Node/Expression/FilterExpression.php +++ /dev/null @@ -1,40 +0,0 @@ - $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $name = $this->getNode('filter')->getAttribute('value'); - $filter = $compiler->getEnvironment()->getFilter($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'filter'); - $this->setAttribute('needs_environment', $filter->needsEnvironment()); - $this->setAttribute('needs_context', $filter->needsContext()); - $this->setAttribute('arguments', $filter->getArguments()); - $this->setAttribute('callable', $filter->getCallable()); - $this->setAttribute('is_variadic', $filter->isVariadic()); - - $this->compileCallable($compiler); - } -} diff --git a/lib/twig/twig/src/Node/Expression/FunctionExpression.php b/lib/twig/twig/src/Node/Expression/FunctionExpression.php deleted file mode 100644 index 71269775c..000000000 --- a/lib/twig/twig/src/Node/Expression/FunctionExpression.php +++ /dev/null @@ -1,43 +0,0 @@ - $arguments], ['name' => $name, 'is_defined_test' => false], $lineno); - } - - public function compile(Compiler $compiler) - { - $name = $this->getAttribute('name'); - $function = $compiler->getEnvironment()->getFunction($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'function'); - $this->setAttribute('needs_environment', $function->needsEnvironment()); - $this->setAttribute('needs_context', $function->needsContext()); - $this->setAttribute('arguments', $function->getArguments()); - $callable = $function->getCallable(); - if ('constant' === $name && $this->getAttribute('is_defined_test')) { - $callable = 'twig_constant_is_defined'; - } - $this->setAttribute('callable', $callable); - $this->setAttribute('is_variadic', $function->isVariadic()); - - $this->compileCallable($compiler); - } -} diff --git a/lib/twig/twig/src/Node/Expression/GetAttrExpression.php b/lib/twig/twig/src/Node/Expression/GetAttrExpression.php deleted file mode 100644 index e6a75ce94..000000000 --- a/lib/twig/twig/src/Node/Expression/GetAttrExpression.php +++ /dev/null @@ -1,87 +0,0 @@ - $node, 'attribute' => $attribute]; - if (null !== $arguments) { - $nodes['arguments'] = $arguments; - } - - parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'optimizable' => true], $lineno); - } - - public function compile(Compiler $compiler): void - { - $env = $compiler->getEnvironment(); - - // optimize array calls - if ( - $this->getAttribute('optimizable') - && (!$env->isStrictVariables() || $this->getAttribute('ignore_strict_check')) - && !$this->getAttribute('is_defined_test') - && Template::ARRAY_CALL === $this->getAttribute('type') - ) { - $var = '$'.$compiler->getVarName(); - $compiler - ->raw('(('.$var.' = ') - ->subcompile($this->getNode('node')) - ->raw(') && is_array(') - ->raw($var) - ->raw(') || ') - ->raw($var) - ->raw(' instanceof ArrayAccess ? (') - ->raw($var) - ->raw('[') - ->subcompile($this->getNode('attribute')) - ->raw('] ?? null) : null)') - ; - - return; - } - - $compiler->raw('twig_get_attribute($this->env, $this->source, '); - - if ($this->getAttribute('ignore_strict_check')) { - $this->getNode('node')->setAttribute('ignore_strict_check', true); - } - - $compiler - ->subcompile($this->getNode('node')) - ->raw(', ') - ->subcompile($this->getNode('attribute')) - ; - - if ($this->hasNode('arguments')) { - $compiler->raw(', ')->subcompile($this->getNode('arguments')); - } else { - $compiler->raw(', []'); - } - - $compiler->raw(', ') - ->repr($this->getAttribute('type')) - ->raw(', ')->repr($this->getAttribute('is_defined_test')) - ->raw(', ')->repr($this->getAttribute('ignore_strict_check')) - ->raw(', ')->repr($env->hasExtension(SandboxExtension::class)) - ->raw(', ')->repr($this->getNode('node')->getTemplateLine()) - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/InlinePrint.php b/lib/twig/twig/src/Node/Expression/InlinePrint.php deleted file mode 100644 index 1ad4751e4..000000000 --- a/lib/twig/twig/src/Node/Expression/InlinePrint.php +++ /dev/null @@ -1,35 +0,0 @@ - $node], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('print (') - ->subcompile($this->getNode('node')) - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/MethodCallExpression.php b/lib/twig/twig/src/Node/Expression/MethodCallExpression.php deleted file mode 100644 index d5ec0b6ef..000000000 --- a/lib/twig/twig/src/Node/Expression/MethodCallExpression.php +++ /dev/null @@ -1,62 +0,0 @@ - $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false, 'is_defined_test' => false], $lineno); - - if ($node instanceof NameExpression) { - $node->setAttribute('always_defined', true); - } - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('is_defined_test')) { - $compiler - ->raw('method_exists($macros[') - ->repr($this->getNode('node')->getAttribute('name')) - ->raw('], ') - ->repr($this->getAttribute('method')) - ->raw(')') - ; - - return; - } - - $compiler - ->raw('twig_call_macro($macros[') - ->repr($this->getNode('node')->getAttribute('name')) - ->raw('], ') - ->repr($this->getAttribute('method')) - ->raw(', [') - ; - $first = true; - foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) { - if (!$first) { - $compiler->raw(', '); - } - $first = false; - - $compiler->subcompile($pair['value']); - } - $compiler - ->raw('], ') - ->repr($this->getTemplateLine()) - ->raw(', $context, $this->getSourceContext())'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/NameExpression.php b/lib/twig/twig/src/Node/Expression/NameExpression.php deleted file mode 100644 index c3563f012..000000000 --- a/lib/twig/twig/src/Node/Expression/NameExpression.php +++ /dev/null @@ -1,97 +0,0 @@ - '$this->getTemplateName()', - '_context' => '$context', - '_charset' => '$this->env->getCharset()', - ]; - - public function __construct(string $name, int $lineno) - { - parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno); - } - - public function compile(Compiler $compiler): void - { - $name = $this->getAttribute('name'); - - $compiler->addDebugInfo($this); - - if ($this->getAttribute('is_defined_test')) { - if ($this->isSpecial()) { - $compiler->repr(true); - } elseif (\PHP_VERSION_ID >= 70400) { - $compiler - ->raw('array_key_exists(') - ->string($name) - ->raw(', $context)') - ; - } else { - $compiler - ->raw('(isset($context[') - ->string($name) - ->raw(']) || array_key_exists(') - ->string($name) - ->raw(', $context))') - ; - } - } elseif ($this->isSpecial()) { - $compiler->raw($this->specialVars[$name]); - } elseif ($this->getAttribute('always_defined')) { - $compiler - ->raw('$context[') - ->string($name) - ->raw(']') - ; - } else { - if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) { - $compiler - ->raw('($context[') - ->string($name) - ->raw('] ?? null)') - ; - } else { - $compiler - ->raw('(isset($context[') - ->string($name) - ->raw(']) || array_key_exists(') - ->string($name) - ->raw(', $context) ? $context[') - ->string($name) - ->raw('] : (function () { throw new RuntimeError(\'Variable ') - ->string($name) - ->raw(' does not exist.\', ') - ->repr($this->lineno) - ->raw(', $this->source); })()') - ->raw(')') - ; - } - } - } - - public function isSpecial() - { - return isset($this->specialVars[$this->getAttribute('name')]); - } - - public function isSimple() - { - return !$this->isSpecial() && !$this->getAttribute('is_defined_test'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/NullCoalesceExpression.php b/lib/twig/twig/src/Node/Expression/NullCoalesceExpression.php deleted file mode 100644 index a72bc4fc6..000000000 --- a/lib/twig/twig/src/Node/Expression/NullCoalesceExpression.php +++ /dev/null @@ -1,60 +0,0 @@ -getTemplateLine()); - // for "block()", we don't need the null test as the return value is always a string - if (!$left instanceof BlockReferenceExpression) { - $test = new AndBinary( - $test, - new NotUnary(new NullTest($left, 'null', new Node(), $left->getTemplateLine()), $left->getTemplateLine()), - $left->getTemplateLine() - ); - } - - parent::__construct($test, $left, $right, $lineno); - } - - public function compile(Compiler $compiler): void - { - /* - * This optimizes only one case. PHP 7 also supports more complex expressions - * that can return null. So, for instance, if log is defined, log("foo") ?? "..." works, - * but log($a["foo"]) ?? "..." does not if $a["foo"] is not defined. More advanced - * cases might be implemented as an optimizer node visitor, but has not been done - * as benefits are probably not worth the added complexity. - */ - if ($this->getNode('expr2') instanceof NameExpression) { - $this->getNode('expr2')->setAttribute('always_defined', true); - $compiler - ->raw('((') - ->subcompile($this->getNode('expr2')) - ->raw(') ?? (') - ->subcompile($this->getNode('expr3')) - ->raw('))') - ; - } else { - parent::compile($compiler); - } - } -} diff --git a/lib/twig/twig/src/Node/Expression/ParentExpression.php b/lib/twig/twig/src/Node/Expression/ParentExpression.php deleted file mode 100644 index 254919718..000000000 --- a/lib/twig/twig/src/Node/Expression/ParentExpression.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class ParentExpression extends AbstractExpression -{ - public function __construct(string $name, int $lineno, string $tag = null) - { - parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('output')) { - $compiler - ->addDebugInfo($this) - ->write('$this->displayParentBlock(') - ->string($this->getAttribute('name')) - ->raw(", \$context, \$blocks);\n") - ; - } else { - $compiler - ->raw('$this->renderParentBlock(') - ->string($this->getAttribute('name')) - ->raw(', $context, $blocks)') - ; - } - } -} diff --git a/lib/twig/twig/src/Node/Expression/TempNameExpression.php b/lib/twig/twig/src/Node/Expression/TempNameExpression.php deleted file mode 100644 index 004c704a5..000000000 --- a/lib/twig/twig/src/Node/Expression/TempNameExpression.php +++ /dev/null @@ -1,31 +0,0 @@ - $name], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('$_') - ->raw($this->getAttribute('name')) - ->raw('_') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/Test/ConstantTest.php b/lib/twig/twig/src/Node/Expression/Test/ConstantTest.php deleted file mode 100644 index 57e9319d5..000000000 --- a/lib/twig/twig/src/Node/Expression/Test/ConstantTest.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class ConstantTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' === constant(') - ; - - if ($this->getNode('arguments')->hasNode(1)) { - $compiler - ->raw('get_class(') - ->subcompile($this->getNode('arguments')->getNode(1)) - ->raw(')."::".') - ; - } - - $compiler - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw('))') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/Test/DefinedTest.php b/lib/twig/twig/src/Node/Expression/Test/DefinedTest.php deleted file mode 100644 index 3953bbbe2..000000000 --- a/lib/twig/twig/src/Node/Expression/Test/DefinedTest.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ -class DefinedTest extends TestExpression -{ - public function __construct(Node $node, string $name, ?Node $arguments, int $lineno) - { - if ($node instanceof NameExpression) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof GetAttrExpression) { - $node->setAttribute('is_defined_test', true); - $this->changeIgnoreStrictCheck($node); - } elseif ($node instanceof BlockReferenceExpression) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof FunctionExpression && 'constant' === $node->getAttribute('name')) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) { - $node = new ConstantExpression(true, $node->getTemplateLine()); - } elseif ($node instanceof MethodCallExpression) { - $node->setAttribute('is_defined_test', true); - } else { - throw new SyntaxError('The "defined" test only works with simple variables.', $lineno); - } - - parent::__construct($node, $name, $arguments, $lineno); - } - - private function changeIgnoreStrictCheck(GetAttrExpression $node) - { - $node->setAttribute('optimizable', false); - $node->setAttribute('ignore_strict_check', true); - - if ($node->getNode('node') instanceof GetAttrExpression) { - $this->changeIgnoreStrictCheck($node->getNode('node')); - } - } - - public function compile(Compiler $compiler): void - { - $compiler->subcompile($this->getNode('node')); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php b/lib/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php deleted file mode 100644 index 4cb3ee096..000000000 --- a/lib/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class DivisiblebyTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(0 == ') - ->subcompile($this->getNode('node')) - ->raw(' % ') - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/Test/EvenTest.php b/lib/twig/twig/src/Node/Expression/Test/EvenTest.php deleted file mode 100644 index a0e3ed62c..000000000 --- a/lib/twig/twig/src/Node/Expression/Test/EvenTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class EvenTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' % 2 == 0') - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/Test/NullTest.php b/lib/twig/twig/src/Node/Expression/Test/NullTest.php deleted file mode 100644 index 45b54ae37..000000000 --- a/lib/twig/twig/src/Node/Expression/Test/NullTest.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class NullTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(null === ') - ->subcompile($this->getNode('node')) - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/Test/OddTest.php b/lib/twig/twig/src/Node/Expression/Test/OddTest.php deleted file mode 100644 index d56c71116..000000000 --- a/lib/twig/twig/src/Node/Expression/Test/OddTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class OddTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' % 2 != 0') - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/Test/SameasTest.php b/lib/twig/twig/src/Node/Expression/Test/SameasTest.php deleted file mode 100644 index c96d2bc01..000000000 --- a/lib/twig/twig/src/Node/Expression/Test/SameasTest.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class SameasTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' === ') - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw(')') - ; - } -} diff --git a/lib/twig/twig/src/Node/Expression/TestExpression.php b/lib/twig/twig/src/Node/Expression/TestExpression.php deleted file mode 100644 index e518bd8f1..000000000 --- a/lib/twig/twig/src/Node/Expression/TestExpression.php +++ /dev/null @@ -1,42 +0,0 @@ - $node]; - if (null !== $arguments) { - $nodes['arguments'] = $arguments; - } - - parent::__construct($nodes, ['name' => $name], $lineno); - } - - public function compile(Compiler $compiler): void - { - $name = $this->getAttribute('name'); - $test = $compiler->getEnvironment()->getTest($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'test'); - $this->setAttribute('arguments', $test->getArguments()); - $this->setAttribute('callable', $test->getCallable()); - $this->setAttribute('is_variadic', $test->isVariadic()); - - $this->compileCallable($compiler); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Unary/AbstractUnary.php b/lib/twig/twig/src/Node/Expression/Unary/AbstractUnary.php deleted file mode 100644 index e31e3f84b..000000000 --- a/lib/twig/twig/src/Node/Expression/Unary/AbstractUnary.php +++ /dev/null @@ -1,34 +0,0 @@ - $node], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler->raw(' '); - $this->operator($compiler); - $compiler->subcompile($this->getNode('node')); - } - - abstract public function operator(Compiler $compiler): Compiler; -} diff --git a/lib/twig/twig/src/Node/Expression/Unary/NegUnary.php b/lib/twig/twig/src/Node/Expression/Unary/NegUnary.php deleted file mode 100644 index dc2f2350a..000000000 --- a/lib/twig/twig/src/Node/Expression/Unary/NegUnary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('-'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Unary/NotUnary.php b/lib/twig/twig/src/Node/Expression/Unary/NotUnary.php deleted file mode 100644 index 55c11bacf..000000000 --- a/lib/twig/twig/src/Node/Expression/Unary/NotUnary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('!'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/Unary/PosUnary.php b/lib/twig/twig/src/Node/Expression/Unary/PosUnary.php deleted file mode 100644 index 4b0a06208..000000000 --- a/lib/twig/twig/src/Node/Expression/Unary/PosUnary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('+'); - } -} diff --git a/lib/twig/twig/src/Node/Expression/VariadicExpression.php b/lib/twig/twig/src/Node/Expression/VariadicExpression.php deleted file mode 100644 index a1bdb48c2..000000000 --- a/lib/twig/twig/src/Node/Expression/VariadicExpression.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('...'); - - parent::compile($compiler); - } -} diff --git a/lib/twig/twig/src/Node/FlushNode.php b/lib/twig/twig/src/Node/FlushNode.php deleted file mode 100644 index fa50a88ee..000000000 --- a/lib/twig/twig/src/Node/FlushNode.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class FlushNode extends Node -{ - public function __construct(int $lineno, string $tag) - { - parent::__construct([], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write("flush();\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/ForLoopNode.php b/lib/twig/twig/src/Node/ForLoopNode.php deleted file mode 100644 index d5ce845a7..000000000 --- a/lib/twig/twig/src/Node/ForLoopNode.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class ForLoopNode extends Node -{ - public function __construct(int $lineno, string $tag = null) - { - parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('else')) { - $compiler->write("\$context['_iterated'] = true;\n"); - } - - if ($this->getAttribute('with_loop')) { - $compiler - ->write("++\$context['loop']['index0'];\n") - ->write("++\$context['loop']['index'];\n") - ->write("\$context['loop']['first'] = false;\n") - ->write("if (isset(\$context['loop']['length'])) {\n") - ->indent() - ->write("--\$context['loop']['revindex0'];\n") - ->write("--\$context['loop']['revindex'];\n") - ->write("\$context['loop']['last'] = 0 === \$context['loop']['revindex0'];\n") - ->outdent() - ->write("}\n") - ; - } - } -} diff --git a/lib/twig/twig/src/Node/ForNode.php b/lib/twig/twig/src/Node/ForNode.php deleted file mode 100644 index 04addfbfe..000000000 --- a/lib/twig/twig/src/Node/ForNode.php +++ /dev/null @@ -1,107 +0,0 @@ - - */ -class ForNode extends Node -{ - private $loop; - - public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?Node $ifexpr, Node $body, ?Node $else, int $lineno, string $tag = null) - { - $body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]); - - $nodes = ['key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body]; - if (null !== $else) { - $nodes['else'] = $else; - } - - parent::__construct($nodes, ['with_loop' => true], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write("\$context['_parent'] = \$context;\n") - ->write("\$context['_seq'] = twig_ensure_traversable(") - ->subcompile($this->getNode('seq')) - ->raw(");\n") - ; - - if ($this->hasNode('else')) { - $compiler->write("\$context['_iterated'] = false;\n"); - } - - if ($this->getAttribute('with_loop')) { - $compiler - ->write("\$context['loop'] = [\n") - ->write(" 'parent' => \$context['_parent'],\n") - ->write(" 'index0' => 0,\n") - ->write(" 'index' => 1,\n") - ->write(" 'first' => true,\n") - ->write("];\n") - ->write("if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof \Countable)) {\n") - ->indent() - ->write("\$length = count(\$context['_seq']);\n") - ->write("\$context['loop']['revindex0'] = \$length - 1;\n") - ->write("\$context['loop']['revindex'] = \$length;\n") - ->write("\$context['loop']['length'] = \$length;\n") - ->write("\$context['loop']['last'] = 1 === \$length;\n") - ->outdent() - ->write("}\n") - ; - } - - $this->loop->setAttribute('else', $this->hasNode('else')); - $this->loop->setAttribute('with_loop', $this->getAttribute('with_loop')); - - $compiler - ->write("foreach (\$context['_seq'] as ") - ->subcompile($this->getNode('key_target')) - ->raw(' => ') - ->subcompile($this->getNode('value_target')) - ->raw(") {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->outdent() - ->write("}\n") - ; - - if ($this->hasNode('else')) { - $compiler - ->write("if (!\$context['_iterated']) {\n") - ->indent() - ->subcompile($this->getNode('else')) - ->outdent() - ->write("}\n") - ; - } - - $compiler->write("\$_parent = \$context['_parent'];\n"); - - // remove some "private" loop variables (needed for nested loops) - $compiler->write('unset($context[\'_seq\'], $context[\'_iterated\'], $context[\''.$this->getNode('key_target')->getAttribute('name').'\'], $context[\''.$this->getNode('value_target')->getAttribute('name').'\'], $context[\'_parent\'], $context[\'loop\']);'."\n"); - - // keep the values set in the inner context for variables defined in the outer context - $compiler->write("\$context = array_intersect_key(\$context, \$_parent) + \$_parent;\n"); - } -} diff --git a/lib/twig/twig/src/Node/IfNode.php b/lib/twig/twig/src/Node/IfNode.php deleted file mode 100644 index 5fa20082a..000000000 --- a/lib/twig/twig/src/Node/IfNode.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -class IfNode extends Node -{ - public function __construct(Node $tests, ?Node $else, int $lineno, string $tag = null) - { - $nodes = ['tests' => $tests]; - if (null !== $else) { - $nodes['else'] = $else; - } - - parent::__construct($nodes, [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - for ($i = 0, $count = \count($this->getNode('tests')); $i < $count; $i += 2) { - if ($i > 0) { - $compiler - ->outdent() - ->write('} elseif (') - ; - } else { - $compiler - ->write('if (') - ; - } - - $compiler - ->subcompile($this->getNode('tests')->getNode($i)) - ->raw(") {\n") - ->indent() - ->subcompile($this->getNode('tests')->getNode($i + 1)) - ; - } - - if ($this->hasNode('else')) { - $compiler - ->outdent() - ->write("} else {\n") - ->indent() - ->subcompile($this->getNode('else')) - ; - } - - $compiler - ->outdent() - ->write("}\n"); - } -} diff --git a/lib/twig/twig/src/Node/ImportNode.php b/lib/twig/twig/src/Node/ImportNode.php deleted file mode 100644 index 5378d799e..000000000 --- a/lib/twig/twig/src/Node/ImportNode.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -class ImportNode extends Node -{ - public function __construct(AbstractExpression $expr, AbstractExpression $var, int $lineno, string $tag = null, bool $global = true) - { - parent::__construct(['expr' => $expr, 'var' => $var], ['global' => $global], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('$macros[') - ->repr($this->getNode('var')->getAttribute('name')) - ->raw('] = ') - ; - - if ($this->getAttribute('global')) { - $compiler - ->raw('$this->macros[') - ->repr($this->getNode('var')->getAttribute('name')) - ->raw('] = ') - ; - } - - if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) { - $compiler->raw('$this'); - } else { - $compiler - ->raw('$this->loadTemplate(') - ->subcompile($this->getNode('expr')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')->unwrap()') - ; - } - - $compiler->raw(";\n"); - } -} diff --git a/lib/twig/twig/src/Node/IncludeNode.php b/lib/twig/twig/src/Node/IncludeNode.php deleted file mode 100644 index d540d6b23..000000000 --- a/lib/twig/twig/src/Node/IncludeNode.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ -class IncludeNode extends Node implements NodeOutputInterface -{ - public function __construct(AbstractExpression $expr, ?AbstractExpression $variables, bool $only, bool $ignoreMissing, int $lineno, string $tag = null) - { - $nodes = ['expr' => $expr]; - if (null !== $variables) { - $nodes['variables'] = $variables; - } - - parent::__construct($nodes, ['only' => $only, 'ignore_missing' => $ignoreMissing], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - if ($this->getAttribute('ignore_missing')) { - $template = $compiler->getVarName(); - - $compiler - ->write(sprintf("$%s = null;\n", $template)) - ->write("try {\n") - ->indent() - ->write(sprintf('$%s = ', $template)) - ; - - $this->addGetTemplate($compiler); - - $compiler - ->raw(";\n") - ->outdent() - ->write("} catch (LoaderError \$e) {\n") - ->indent() - ->write("// ignore missing template\n") - ->outdent() - ->write("}\n") - ->write(sprintf("if ($%s) {\n", $template)) - ->indent() - ->write(sprintf('$%s->display(', $template)) - ; - $this->addTemplateArguments($compiler); - $compiler - ->raw(");\n") - ->outdent() - ->write("}\n") - ; - } else { - $this->addGetTemplate($compiler); - $compiler->raw('->display('); - $this->addTemplateArguments($compiler); - $compiler->raw(");\n"); - } - } - - protected function addGetTemplate(Compiler $compiler) - { - $compiler - ->write('$this->loadTemplate(') - ->subcompile($this->getNode('expr')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')') - ; - } - - protected function addTemplateArguments(Compiler $compiler) - { - if (!$this->hasNode('variables')) { - $compiler->raw(false === $this->getAttribute('only') ? '$context' : '[]'); - } elseif (false === $this->getAttribute('only')) { - $compiler - ->raw('twig_array_merge($context, ') - ->subcompile($this->getNode('variables')) - ->raw(')') - ; - } else { - $compiler->raw('twig_to_array('); - $compiler->subcompile($this->getNode('variables')); - $compiler->raw(')'); - } - } -} diff --git a/lib/twig/twig/src/Node/MacroNode.php b/lib/twig/twig/src/Node/MacroNode.php deleted file mode 100644 index 7f1b24d53..000000000 --- a/lib/twig/twig/src/Node/MacroNode.php +++ /dev/null @@ -1,113 +0,0 @@ - - */ -class MacroNode extends Node -{ - public const VARARGS_NAME = 'varargs'; - - public function __construct(string $name, Node $body, Node $arguments, int $lineno, string $tag = null) - { - foreach ($arguments as $argumentName => $argument) { - if (self::VARARGS_NAME === $argumentName) { - throw new SyntaxError(sprintf('The argument "%s" in macro "%s" cannot be defined because the variable "%s" is reserved for arbitrary arguments.', self::VARARGS_NAME, $name, self::VARARGS_NAME), $argument->getTemplateLine(), $argument->getSourceContext()); - } - } - - parent::__construct(['body' => $body, 'arguments' => $arguments], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write(sprintf('public function macro_%s(', $this->getAttribute('name'))) - ; - - $count = \count($this->getNode('arguments')); - $pos = 0; - foreach ($this->getNode('arguments') as $name => $default) { - $compiler - ->raw('$__'.$name.'__ = ') - ->subcompile($default) - ; - - if (++$pos < $count) { - $compiler->raw(', '); - } - } - - if ($count) { - $compiler->raw(', '); - } - - $compiler - ->raw('...$__varargs__') - ->raw(")\n") - ->write("{\n") - ->indent() - ->write("\$macros = \$this->macros;\n") - ->write("\$context = \$this->env->mergeGlobals([\n") - ->indent() - ; - - foreach ($this->getNode('arguments') as $name => $default) { - $compiler - ->write('') - ->string($name) - ->raw(' => $__'.$name.'__') - ->raw(",\n") - ; - } - - $compiler - ->write('') - ->string(self::VARARGS_NAME) - ->raw(' => ') - ; - - $compiler - ->raw("\$__varargs__,\n") - ->outdent() - ->write("]);\n\n") - ->write("\$blocks = [];\n\n") - ; - if ($compiler->getEnvironment()->isDebug()) { - $compiler->write("ob_start();\n"); - } else { - $compiler->write("ob_start(function () { return ''; });\n"); - } - $compiler - ->write("try {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->raw("\n") - ->write("return ('' === \$tmp = ob_get_contents()) ? '' : new Markup(\$tmp, \$this->env->getCharset());\n") - ->outdent() - ->write("} finally {\n") - ->indent() - ->write("ob_end_clean();\n") - ->outdent() - ->write("}\n") - ->outdent() - ->write("}\n\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/ModuleNode.php b/lib/twig/twig/src/Node/ModuleNode.php deleted file mode 100644 index e972b6ba5..000000000 --- a/lib/twig/twig/src/Node/ModuleNode.php +++ /dev/null @@ -1,464 +0,0 @@ - - */ -final class ModuleNode extends Node -{ - public function __construct(Node $body, ?AbstractExpression $parent, Node $blocks, Node $macros, Node $traits, $embeddedTemplates, Source $source) - { - $nodes = [ - 'body' => $body, - 'blocks' => $blocks, - 'macros' => $macros, - 'traits' => $traits, - 'display_start' => new Node(), - 'display_end' => new Node(), - 'constructor_start' => new Node(), - 'constructor_end' => new Node(), - 'class_end' => new Node(), - ]; - if (null !== $parent) { - $nodes['parent'] = $parent; - } - - // embedded templates are set as attributes so that they are only visited once by the visitors - parent::__construct($nodes, [ - 'index' => null, - 'embedded_templates' => $embeddedTemplates, - ], 1); - - // populate the template name of all node children - $this->setSourceContext($source); - } - - public function setIndex($index) - { - $this->setAttribute('index', $index); - } - - public function compile(Compiler $compiler): void - { - $this->compileTemplate($compiler); - - foreach ($this->getAttribute('embedded_templates') as $template) { - $compiler->subcompile($template); - } - } - - protected function compileTemplate(Compiler $compiler) - { - if (!$this->getAttribute('index')) { - $compiler->write('compileClassHeader($compiler); - - $this->compileConstructor($compiler); - - $this->compileGetParent($compiler); - - $this->compileDisplay($compiler); - - $compiler->subcompile($this->getNode('blocks')); - - $this->compileMacros($compiler); - - $this->compileGetTemplateName($compiler); - - $this->compileIsTraitable($compiler); - - $this->compileDebugInfo($compiler); - - $this->compileGetSourceContext($compiler); - - $this->compileClassFooter($compiler); - } - - protected function compileGetParent(Compiler $compiler) - { - if (!$this->hasNode('parent')) { - return; - } - $parent = $this->getNode('parent'); - - $compiler - ->write("protected function doGetParent(array \$context)\n", "{\n") - ->indent() - ->addDebugInfo($parent) - ->write('return ') - ; - - if ($parent instanceof ConstantExpression) { - $compiler->subcompile($parent); - } else { - $compiler - ->raw('$this->loadTemplate(') - ->subcompile($parent) - ->raw(', ') - ->repr($this->getSourceContext()->getName()) - ->raw(', ') - ->repr($parent->getTemplateLine()) - ->raw(')') - ; - } - - $compiler - ->raw(";\n") - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileClassHeader(Compiler $compiler) - { - $compiler - ->write("\n\n") - ; - if (!$this->getAttribute('index')) { - $compiler - ->write("use Twig\Environment;\n") - ->write("use Twig\Error\LoaderError;\n") - ->write("use Twig\Error\RuntimeError;\n") - ->write("use Twig\Extension\SandboxExtension;\n") - ->write("use Twig\Markup;\n") - ->write("use Twig\Sandbox\SecurityError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedTagError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedFilterError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedFunctionError;\n") - ->write("use Twig\Source;\n") - ->write("use Twig\Template;\n\n") - ; - } - $compiler - // if the template name contains */, add a blank to avoid a PHP parse error - ->write('/* '.str_replace('*/', '* /', $this->getSourceContext()->getName())." */\n") - ->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(), $this->getAttribute('index'))) - ->raw(" extends Template\n") - ->write("{\n") - ->indent() - ->write("private \$source;\n") - ->write("private \$macros = [];\n\n") - ; - } - - protected function compileConstructor(Compiler $compiler) - { - $compiler - ->write("public function __construct(Environment \$env)\n", "{\n") - ->indent() - ->subcompile($this->getNode('constructor_start')) - ->write("parent::__construct(\$env);\n\n") - ->write("\$this->source = \$this->getSourceContext();\n\n") - ; - - // parent - if (!$this->hasNode('parent')) { - $compiler->write("\$this->parent = false;\n\n"); - } - - $countTraits = \count($this->getNode('traits')); - if ($countTraits) { - // traits - foreach ($this->getNode('traits') as $i => $trait) { - $node = $trait->getNode('template'); - - $compiler - ->addDebugInfo($node) - ->write(sprintf('$_trait_%s = $this->loadTemplate(', $i)) - ->subcompile($node) - ->raw(', ') - ->repr($node->getTemplateName()) - ->raw(', ') - ->repr($node->getTemplateLine()) - ->raw(");\n") - ->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i)) - ->indent() - ->write("throw new RuntimeError('Template \"'.") - ->subcompile($trait->getNode('template')) - ->raw(".'\" cannot be used as a trait.', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->source);\n") - ->outdent() - ->write("}\n") - ->write(sprintf("\$_trait_%s_blocks = \$_trait_%s->getBlocks();\n\n", $i, $i)) - ; - - foreach ($trait->getNode('targets') as $key => $value) { - $compiler - ->write(sprintf('if (!isset($_trait_%s_blocks[', $i)) - ->string($key) - ->raw("])) {\n") - ->indent() - ->write("throw new RuntimeError('Block ") - ->string($key) - ->raw(' is not defined in trait ') - ->subcompile($trait->getNode('template')) - ->raw(".', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->source);\n") - ->outdent() - ->write("}\n\n") - - ->write(sprintf('$_trait_%s_blocks[', $i)) - ->subcompile($value) - ->raw(sprintf('] = $_trait_%s_blocks[', $i)) - ->string($key) - ->raw(sprintf(']; unset($_trait_%s_blocks[', $i)) - ->string($key) - ->raw("]);\n\n") - ; - } - } - - if ($countTraits > 1) { - $compiler - ->write("\$this->traits = array_merge(\n") - ->indent() - ; - - for ($i = 0; $i < $countTraits; ++$i) { - $compiler - ->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ? '' : ',')."\n", $i)) - ; - } - - $compiler - ->outdent() - ->write(");\n\n") - ; - } else { - $compiler - ->write("\$this->traits = \$_trait_0_blocks;\n\n") - ; - } - - $compiler - ->write("\$this->blocks = array_merge(\n") - ->indent() - ->write("\$this->traits,\n") - ->write("[\n") - ; - } else { - $compiler - ->write("\$this->blocks = [\n") - ; - } - - // blocks - $compiler - ->indent() - ; - - foreach ($this->getNode('blocks') as $name => $node) { - $compiler - ->write(sprintf("'%s' => [\$this, 'block_%s'],\n", $name, $name)) - ; - } - - if ($countTraits) { - $compiler - ->outdent() - ->write("]\n") - ->outdent() - ->write(");\n") - ; - } else { - $compiler - ->outdent() - ->write("];\n") - ; - } - - $compiler - ->subcompile($this->getNode('constructor_end')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileDisplay(Compiler $compiler) - { - $compiler - ->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n") - ->indent() - ->write("\$macros = \$this->macros;\n") - ->subcompile($this->getNode('display_start')) - ->subcompile($this->getNode('body')) - ; - - if ($this->hasNode('parent')) { - $parent = $this->getNode('parent'); - - $compiler->addDebugInfo($parent); - if ($parent instanceof ConstantExpression) { - $compiler - ->write('$this->parent = $this->loadTemplate(') - ->subcompile($parent) - ->raw(', ') - ->repr($this->getSourceContext()->getName()) - ->raw(', ') - ->repr($parent->getTemplateLine()) - ->raw(");\n") - ; - $compiler->write('$this->parent'); - } else { - $compiler->write('$this->getParent($context)'); - } - $compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n"); - } - - $compiler - ->subcompile($this->getNode('display_end')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileClassFooter(Compiler $compiler) - { - $compiler - ->subcompile($this->getNode('class_end')) - ->outdent() - ->write("}\n") - ; - } - - protected function compileMacros(Compiler $compiler) - { - $compiler->subcompile($this->getNode('macros')); - } - - protected function compileGetTemplateName(Compiler $compiler) - { - $compiler - ->write("public function getTemplateName()\n", "{\n") - ->indent() - ->write('return ') - ->repr($this->getSourceContext()->getName()) - ->raw(";\n") - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileIsTraitable(Compiler $compiler) - { - // A template can be used as a trait if: - // * it has no parent - // * it has no macros - // * it has no body - // - // Put another way, a template can be used as a trait if it - // only contains blocks and use statements. - $traitable = !$this->hasNode('parent') && 0 === \count($this->getNode('macros')); - if ($traitable) { - if ($this->getNode('body') instanceof BodyNode) { - $nodes = $this->getNode('body')->getNode(0); - } else { - $nodes = $this->getNode('body'); - } - - if (!\count($nodes)) { - $nodes = new Node([$nodes]); - } - - foreach ($nodes as $node) { - if (!\count($node)) { - continue; - } - - if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) { - continue; - } - - if ($node instanceof BlockReferenceNode) { - continue; - } - - $traitable = false; - break; - } - } - - if ($traitable) { - return; - } - - $compiler - ->write("public function isTraitable()\n", "{\n") - ->indent() - ->write(sprintf("return %s;\n", $traitable ? 'true' : 'false')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileDebugInfo(Compiler $compiler) - { - $compiler - ->write("public function getDebugInfo()\n", "{\n") - ->indent() - ->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true)))) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileGetSourceContext(Compiler $compiler) - { - $compiler - ->write("public function getSourceContext()\n", "{\n") - ->indent() - ->write('return new Source(') - ->string($compiler->getEnvironment()->isDebug() ? $this->getSourceContext()->getCode() : '') - ->raw(', ') - ->string($this->getSourceContext()->getName()) - ->raw(', ') - ->string($this->getSourceContext()->getPath()) - ->raw(");\n") - ->outdent() - ->write("}\n") - ; - } - - protected function compileLoadTemplate(Compiler $compiler, $node, $var) - { - if ($node instanceof ConstantExpression) { - $compiler - ->write(sprintf('%s = $this->loadTemplate(', $var)) - ->subcompile($node) - ->raw(', ') - ->repr($node->getTemplateName()) - ->raw(', ') - ->repr($node->getTemplateLine()) - ->raw(");\n") - ; - } else { - throw new \LogicException('Trait templates can only be constant nodes.'); - } - } -} diff --git a/lib/twig/twig/src/Node/Node.php b/lib/twig/twig/src/Node/Node.php deleted file mode 100644 index c0558b9af..000000000 --- a/lib/twig/twig/src/Node/Node.php +++ /dev/null @@ -1,179 +0,0 @@ - - */ -class Node implements \Countable, \IteratorAggregate -{ - protected $nodes; - protected $attributes; - protected $lineno; - protected $tag; - - private $name; - private $sourceContext; - - /** - * @param array $nodes An array of named nodes - * @param array $attributes An array of attributes (should not be nodes) - * @param int $lineno The line number - * @param string $tag The tag name associated with the Node - */ - public function __construct(array $nodes = [], array $attributes = [], int $lineno = 0, string $tag = null) - { - foreach ($nodes as $name => $node) { - if (!$node instanceof self) { - throw new \InvalidArgumentException(sprintf('Using "%s" for the value of node "%s" of "%s" is not supported. You must pass a \Twig\Node\Node instance.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class)); - } - } - $this->nodes = $nodes; - $this->attributes = $attributes; - $this->lineno = $lineno; - $this->tag = $tag; - } - - public function __toString() - { - $attributes = []; - foreach ($this->attributes as $name => $value) { - $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true))); - } - - $repr = [static::class.'('.implode(', ', $attributes)]; - - if (\count($this->nodes)) { - foreach ($this->nodes as $name => $node) { - $len = \strlen($name) + 4; - $noderepr = []; - foreach (explode("\n", (string) $node) as $line) { - $noderepr[] = str_repeat(' ', $len).$line; - } - - $repr[] = sprintf(' %s: %s', $name, ltrim(implode("\n", $noderepr))); - } - - $repr[] = ')'; - } else { - $repr[0] .= ')'; - } - - return implode("\n", $repr); - } - - /** - * @return void - */ - public function compile(Compiler $compiler) - { - foreach ($this->nodes as $node) { - $node->compile($compiler); - } - } - - public function getTemplateLine(): int - { - return $this->lineno; - } - - public function getNodeTag(): ?string - { - return $this->tag; - } - - public function hasAttribute(string $name): bool - { - return \array_key_exists($name, $this->attributes); - } - - public function getAttribute(string $name) - { - if (!\array_key_exists($name, $this->attributes)) { - throw new \LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, static::class)); - } - - return $this->attributes[$name]; - } - - public function setAttribute(string $name, $value): void - { - $this->attributes[$name] = $value; - } - - public function removeAttribute(string $name): void - { - unset($this->attributes[$name]); - } - - public function hasNode(string $name): bool - { - return isset($this->nodes[$name]); - } - - public function getNode(string $name): self - { - if (!isset($this->nodes[$name])) { - throw new \LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, static::class)); - } - - return $this->nodes[$name]; - } - - public function setNode(string $name, self $node): void - { - $this->nodes[$name] = $node; - } - - public function removeNode(string $name): void - { - unset($this->nodes[$name]); - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->nodes); - } - - public function getIterator(): \Traversable - { - return new \ArrayIterator($this->nodes); - } - - public function getTemplateName(): ?string - { - return $this->sourceContext ? $this->sourceContext->getName() : null; - } - - public function setSourceContext(Source $source): void - { - $this->sourceContext = $source; - foreach ($this->nodes as $node) { - $node->setSourceContext($source); - } - } - - public function getSourceContext(): ?Source - { - return $this->sourceContext; - } -} diff --git a/lib/twig/twig/src/Node/NodeCaptureInterface.php b/lib/twig/twig/src/Node/NodeCaptureInterface.php deleted file mode 100644 index 9fb6a0ca1..000000000 --- a/lib/twig/twig/src/Node/NodeCaptureInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -interface NodeCaptureInterface -{ -} diff --git a/lib/twig/twig/src/Node/NodeOutputInterface.php b/lib/twig/twig/src/Node/NodeOutputInterface.php deleted file mode 100644 index 5e35b406b..000000000 --- a/lib/twig/twig/src/Node/NodeOutputInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -interface NodeOutputInterface -{ -} diff --git a/lib/twig/twig/src/Node/PrintNode.php b/lib/twig/twig/src/Node/PrintNode.php deleted file mode 100644 index 60386d299..000000000 --- a/lib/twig/twig/src/Node/PrintNode.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class PrintNode extends Node implements NodeOutputInterface -{ - public function __construct(AbstractExpression $expr, int $lineno, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('echo ') - ->subcompile($this->getNode('expr')) - ->raw(";\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/SandboxNode.php b/lib/twig/twig/src/Node/SandboxNode.php deleted file mode 100644 index 4d5666bff..000000000 --- a/lib/twig/twig/src/Node/SandboxNode.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class SandboxNode extends Node -{ - public function __construct(Node $body, int $lineno, string $tag = null) - { - parent::__construct(['body' => $body], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write("if (!\$alreadySandboxed = \$this->sandbox->isSandboxed()) {\n") - ->indent() - ->write("\$this->sandbox->enableSandbox();\n") - ->outdent() - ->write("}\n") - ->write("try {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->outdent() - ->write("} finally {\n") - ->indent() - ->write("if (!\$alreadySandboxed) {\n") - ->indent() - ->write("\$this->sandbox->disableSandbox();\n") - ->outdent() - ->write("}\n") - ->outdent() - ->write("}\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/SetNode.php b/lib/twig/twig/src/Node/SetNode.php deleted file mode 100644 index 96b6bd8bf..000000000 --- a/lib/twig/twig/src/Node/SetNode.php +++ /dev/null @@ -1,105 +0,0 @@ - - */ -class SetNode extends Node implements NodeCaptureInterface -{ - public function __construct(bool $capture, Node $names, Node $values, int $lineno, string $tag = null) - { - parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag); - - /* - * Optimizes the node when capture is used for a large block of text. - * - * {% set foo %}foo{% endset %} is compiled to $context['foo'] = new Twig\Markup("foo"); - */ - if ($this->getAttribute('capture')) { - $this->setAttribute('safe', true); - - $values = $this->getNode('values'); - if ($values instanceof TextNode) { - $this->setNode('values', new ConstantExpression($values->getAttribute('data'), $values->getTemplateLine())); - $this->setAttribute('capture', false); - } - } - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - if (\count($this->getNode('names')) > 1) { - $compiler->write('list('); - foreach ($this->getNode('names') as $idx => $node) { - if ($idx) { - $compiler->raw(', '); - } - - $compiler->subcompile($node); - } - $compiler->raw(')'); - } else { - if ($this->getAttribute('capture')) { - if ($compiler->getEnvironment()->isDebug()) { - $compiler->write("ob_start();\n"); - } else { - $compiler->write("ob_start(function () { return ''; });\n"); - } - $compiler - ->subcompile($this->getNode('values')) - ; - } - - $compiler->subcompile($this->getNode('names'), false); - - if ($this->getAttribute('capture')) { - $compiler->raw(" = ('' === \$tmp = ob_get_clean()) ? '' : new Markup(\$tmp, \$this->env->getCharset())"); - } - } - - if (!$this->getAttribute('capture')) { - $compiler->raw(' = '); - - if (\count($this->getNode('names')) > 1) { - $compiler->write('['); - foreach ($this->getNode('values') as $idx => $value) { - if ($idx) { - $compiler->raw(', '); - } - - $compiler->subcompile($value); - } - $compiler->raw(']'); - } else { - if ($this->getAttribute('safe')) { - $compiler - ->raw("('' === \$tmp = ") - ->subcompile($this->getNode('values')) - ->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())") - ; - } else { - $compiler->subcompile($this->getNode('values')); - } - } - } - - $compiler->raw(";\n"); - } -} diff --git a/lib/twig/twig/src/Node/TextNode.php b/lib/twig/twig/src/Node/TextNode.php deleted file mode 100644 index d74ebe630..000000000 --- a/lib/twig/twig/src/Node/TextNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class TextNode extends Node implements NodeOutputInterface -{ - public function __construct(string $data, int $lineno) - { - parent::__construct([], ['data' => $data], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('echo ') - ->string($this->getAttribute('data')) - ->raw(";\n") - ; - } -} diff --git a/lib/twig/twig/src/Node/WithNode.php b/lib/twig/twig/src/Node/WithNode.php deleted file mode 100644 index 56a334496..000000000 --- a/lib/twig/twig/src/Node/WithNode.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -class WithNode extends Node -{ - public function __construct(Node $body, ?Node $variables, bool $only, int $lineno, string $tag = null) - { - $nodes = ['body' => $body]; - if (null !== $variables) { - $nodes['variables'] = $variables; - } - - parent::__construct($nodes, ['only' => $only], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - $parentContextName = $compiler->getVarName(); - - $compiler->write(sprintf("\$%s = \$context;\n", $parentContextName)); - - if ($this->hasNode('variables')) { - $node = $this->getNode('variables'); - $varsName = $compiler->getVarName(); - $compiler - ->write(sprintf('$%s = ', $varsName)) - ->subcompile($node) - ->raw(";\n") - ->write(sprintf("if (!twig_test_iterable(\$%s)) {\n", $varsName)) - ->indent() - ->write("throw new RuntimeError('Variables passed to the \"with\" tag must be a hash.', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->getSourceContext());\n") - ->outdent() - ->write("}\n") - ->write(sprintf("\$%s = twig_to_array(\$%s);\n", $varsName, $varsName)) - ; - - if ($this->getAttribute('only')) { - $compiler->write("\$context = [];\n"); - } - - $compiler->write(sprintf("\$context = \$this->env->mergeGlobals(array_merge(\$context, \$%s));\n", $varsName)); - } - - $compiler - ->subcompile($this->getNode('body')) - ->write(sprintf("\$context = \$%s;\n", $parentContextName)) - ; - } -} diff --git a/lib/twig/twig/src/NodeTraverser.php b/lib/twig/twig/src/NodeTraverser.php deleted file mode 100644 index 47a2d5ca3..000000000 --- a/lib/twig/twig/src/NodeTraverser.php +++ /dev/null @@ -1,76 +0,0 @@ - - */ -final class NodeTraverser -{ - private $env; - private $visitors = []; - - /** - * @param NodeVisitorInterface[] $visitors - */ - public function __construct(Environment $env, array $visitors = []) - { - $this->env = $env; - foreach ($visitors as $visitor) { - $this->addVisitor($visitor); - } - } - - public function addVisitor(NodeVisitorInterface $visitor): void - { - $this->visitors[$visitor->getPriority()][] = $visitor; - } - - /** - * Traverses a node and calls the registered visitors. - */ - public function traverse(Node $node): Node - { - ksort($this->visitors); - foreach ($this->visitors as $visitors) { - foreach ($visitors as $visitor) { - $node = $this->traverseForVisitor($visitor, $node); - } - } - - return $node; - } - - private function traverseForVisitor(NodeVisitorInterface $visitor, Node $node): ?Node - { - $node = $visitor->enterNode($node, $this->env); - - foreach ($node as $k => $n) { - if (null !== $m = $this->traverseForVisitor($visitor, $n)) { - if ($m !== $n) { - $node->setNode($k, $m); - } - } else { - $node->removeNode($k); - } - } - - return $visitor->leaveNode($node, $this->env); - } -} diff --git a/lib/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php b/lib/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php deleted file mode 100644 index d7036ae55..000000000 --- a/lib/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -abstract class AbstractNodeVisitor implements NodeVisitorInterface -{ - final public function enterNode(Node $node, Environment $env): Node - { - return $this->doEnterNode($node, $env); - } - - final public function leaveNode(Node $node, Environment $env): ?Node - { - return $this->doLeaveNode($node, $env); - } - - /** - * Called before child nodes are visited. - * - * @return Node The modified node - */ - abstract protected function doEnterNode(Node $node, Environment $env); - - /** - * Called after child nodes are visited. - * - * @return Node|null The modified node or null if the node must be removed - */ - abstract protected function doLeaveNode(Node $node, Environment $env); -} diff --git a/lib/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php b/lib/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php deleted file mode 100644 index fe56ea307..000000000 --- a/lib/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * @internal - */ -final class EscaperNodeVisitor implements NodeVisitorInterface -{ - private $statusStack = []; - private $blocks = []; - private $safeAnalysis; - private $traverser; - private $defaultStrategy = false; - private $safeVars = []; - - public function __construct() - { - $this->safeAnalysis = new SafeAnalysisNodeVisitor(); - } - - public function enterNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - if ($env->hasExtension(EscaperExtension::class) && $defaultStrategy = $env->getExtension(EscaperExtension::class)->getDefaultStrategy($node->getTemplateName())) { - $this->defaultStrategy = $defaultStrategy; - } - $this->safeVars = []; - $this->blocks = []; - } elseif ($node instanceof AutoEscapeNode) { - $this->statusStack[] = $node->getAttribute('value'); - } elseif ($node instanceof BlockNode) { - $this->statusStack[] = isset($this->blocks[$node->getAttribute('name')]) ? $this->blocks[$node->getAttribute('name')] : $this->needEscaping($env); - } elseif ($node instanceof ImportNode) { - $this->safeVars[] = $node->getNode('var')->getAttribute('name'); - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ModuleNode) { - $this->defaultStrategy = false; - $this->safeVars = []; - $this->blocks = []; - } elseif ($node instanceof FilterExpression) { - return $this->preEscapeFilterNode($node, $env); - } elseif ($node instanceof PrintNode && false !== $type = $this->needEscaping($env)) { - $expression = $node->getNode('expr'); - if ($expression instanceof ConditionalExpression && $this->shouldUnwrapConditional($expression, $env, $type)) { - return new DoNode($this->unwrapConditional($expression, $env, $type), $expression->getTemplateLine()); - } - - return $this->escapePrintNode($node, $env, $type); - } - - if ($node instanceof AutoEscapeNode || $node instanceof BlockNode) { - array_pop($this->statusStack); - } elseif ($node instanceof BlockReferenceNode) { - $this->blocks[$node->getAttribute('name')] = $this->needEscaping($env); - } - - return $node; - } - - private function shouldUnwrapConditional(ConditionalExpression $expression, Environment $env, string $type): bool - { - $expr2Safe = $this->isSafeFor($type, $expression->getNode('expr2'), $env); - $expr3Safe = $this->isSafeFor($type, $expression->getNode('expr3'), $env); - - return $expr2Safe !== $expr3Safe; - } - - private function unwrapConditional(ConditionalExpression $expression, Environment $env, string $type): ConditionalExpression - { - // convert "echo a ? b : c" to "a ? echo b : echo c" recursively - $expr2 = $expression->getNode('expr2'); - if ($expr2 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr2, $env, $type)) { - $expr2 = $this->unwrapConditional($expr2, $env, $type); - } else { - $expr2 = $this->escapeInlinePrintNode(new InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type); - } - $expr3 = $expression->getNode('expr3'); - if ($expr3 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr3, $env, $type)) { - $expr3 = $this->unwrapConditional($expr3, $env, $type); - } else { - $expr3 = $this->escapeInlinePrintNode(new InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type); - } - - return new ConditionalExpression($expression->getNode('expr1'), $expr2, $expr3, $expression->getTemplateLine()); - } - - private function escapeInlinePrintNode(InlinePrint $node, Environment $env, string $type): Node - { - $expression = $node->getNode('node'); - - if ($this->isSafeFor($type, $expression, $env)) { - return $node; - } - - return new InlinePrint($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); - } - - private function escapePrintNode(PrintNode $node, Environment $env, string $type): Node - { - if (false === $type) { - return $node; - } - - $expression = $node->getNode('expr'); - - if ($this->isSafeFor($type, $expression, $env)) { - return $node; - } - - $class = \get_class($node); - - return new $class($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); - } - - private function preEscapeFilterNode(FilterExpression $filter, Environment $env): FilterExpression - { - $name = $filter->getNode('filter')->getAttribute('value'); - - $type = $env->getFilter($name)->getPreEscape(); - if (null === $type) { - return $filter; - } - - $node = $filter->getNode('node'); - if ($this->isSafeFor($type, $node, $env)) { - return $filter; - } - - $filter->setNode('node', $this->getEscaperFilter($type, $node)); - - return $filter; - } - - private function isSafeFor(string $type, Node $expression, Environment $env): bool - { - $safe = $this->safeAnalysis->getSafe($expression); - - if (null === $safe) { - if (null === $this->traverser) { - $this->traverser = new NodeTraverser($env, [$this->safeAnalysis]); - } - - $this->safeAnalysis->setSafeVars($this->safeVars); - - $this->traverser->traverse($expression); - $safe = $this->safeAnalysis->getSafe($expression); - } - - return \in_array($type, $safe) || \in_array('all', $safe); - } - - private function needEscaping(Environment $env) - { - if (\count($this->statusStack)) { - return $this->statusStack[\count($this->statusStack) - 1]; - } - - return $this->defaultStrategy ? $this->defaultStrategy : false; - } - - private function getEscaperFilter(string $type, Node $node): FilterExpression - { - $line = $node->getTemplateLine(); - $name = new ConstantExpression('escape', $line); - $args = new Node([new ConstantExpression($type, $line), new ConstantExpression(null, $line), new ConstantExpression(true, $line)]); - - return new FilterExpression($node, $name, $args, $line); - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/lib/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php b/lib/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php deleted file mode 100644 index af477e653..000000000 --- a/lib/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * @internal - */ -final class MacroAutoImportNodeVisitor implements NodeVisitorInterface -{ - private $inAModule = false; - private $hasMacroCalls = false; - - public function enterNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = true; - $this->hasMacroCalls = false; - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = false; - if ($this->hasMacroCalls) { - $node->getNode('constructor_end')->setNode('_auto_macro_import', new ImportNode(new NameExpression('_self', 0), new AssignNameExpression('_self', 0), 0, 'import', true)); - } - } elseif ($this->inAModule) { - if ( - $node instanceof GetAttrExpression && - $node->getNode('node') instanceof NameExpression && - '_self' === $node->getNode('node')->getAttribute('name') && - $node->getNode('attribute') instanceof ConstantExpression - ) { - $this->hasMacroCalls = true; - - $name = $node->getNode('attribute')->getAttribute('value'); - $node = new MethodCallExpression($node->getNode('node'), 'macro_'.$name, $node->getNode('arguments'), $node->getTemplateLine()); - $node->setAttribute('safe', true); - } - } - - return $node; - } - - public function getPriority(): int - { - // we must be ran before auto-escaping - return -10; - } -} diff --git a/lib/twig/twig/src/NodeVisitor/NodeVisitorInterface.php b/lib/twig/twig/src/NodeVisitor/NodeVisitorInterface.php deleted file mode 100644 index 59e836dbd..000000000 --- a/lib/twig/twig/src/NodeVisitor/NodeVisitorInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -interface NodeVisitorInterface -{ - /** - * Called before child nodes are visited. - * - * @return Node The modified node - */ - public function enterNode(Node $node, Environment $env): Node; - - /** - * Called after child nodes are visited. - * - * @return Node|null The modified node or null if the node must be removed - */ - public function leaveNode(Node $node, Environment $env): ?Node; - - /** - * Returns the priority for this visitor. - * - * Priority should be between -10 and 10 (0 is the default). - * - * @return int The priority level - */ - public function getPriority(); -} diff --git a/lib/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php b/lib/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php deleted file mode 100644 index 7ac75e41a..000000000 --- a/lib/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * @internal - */ -final class OptimizerNodeVisitor implements NodeVisitorInterface -{ - public const OPTIMIZE_ALL = -1; - public const OPTIMIZE_NONE = 0; - public const OPTIMIZE_FOR = 2; - public const OPTIMIZE_RAW_FILTER = 4; - - private $loops = []; - private $loopsTargets = []; - private $optimizers; - - /** - * @param int $optimizers The optimizer mode - */ - public function __construct(int $optimizers = -1) - { - if ($optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER)) { - throw new \InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers)); - } - - $this->optimizers = $optimizers; - } - - public function enterNode(Node $node, Environment $env): Node - { - if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { - $this->enterOptimizeFor($node, $env); - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { - $this->leaveOptimizeFor($node, $env); - } - - if (self::OPTIMIZE_RAW_FILTER === (self::OPTIMIZE_RAW_FILTER & $this->optimizers)) { - $node = $this->optimizeRawFilter($node, $env); - } - - $node = $this->optimizePrintNode($node, $env); - - return $node; - } - - /** - * Optimizes print nodes. - * - * It replaces: - * - * * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()" - */ - private function optimizePrintNode(Node $node, Environment $env): Node - { - if (!$node instanceof PrintNode) { - return $node; - } - - $exprNode = $node->getNode('expr'); - if ( - $exprNode instanceof BlockReferenceExpression || - $exprNode instanceof ParentExpression - ) { - $exprNode->setAttribute('output', true); - - return $exprNode; - } - - return $node; - } - - /** - * Removes "raw" filters. - */ - private function optimizeRawFilter(Node $node, Environment $env): Node - { - if ($node instanceof FilterExpression && 'raw' == $node->getNode('filter')->getAttribute('value')) { - return $node->getNode('node'); - } - - return $node; - } - - /** - * Optimizes "for" tag by removing the "loop" variable creation whenever possible. - */ - private function enterOptimizeFor(Node $node, Environment $env): void - { - if ($node instanceof ForNode) { - // disable the loop variable by default - $node->setAttribute('with_loop', false); - array_unshift($this->loops, $node); - array_unshift($this->loopsTargets, $node->getNode('value_target')->getAttribute('name')); - array_unshift($this->loopsTargets, $node->getNode('key_target')->getAttribute('name')); - } elseif (!$this->loops) { - // we are outside a loop - return; - } - - // when do we need to add the loop variable back? - - // the loop variable is referenced for the current loop - elseif ($node instanceof NameExpression && 'loop' === $node->getAttribute('name')) { - $node->setAttribute('always_defined', true); - $this->addLoopToCurrent(); - } - - // optimize access to loop targets - elseif ($node instanceof NameExpression && \in_array($node->getAttribute('name'), $this->loopsTargets)) { - $node->setAttribute('always_defined', true); - } - - // block reference - elseif ($node instanceof BlockReferenceNode || $node instanceof BlockReferenceExpression) { - $this->addLoopToCurrent(); - } - - // include without the only attribute - elseif ($node instanceof IncludeNode && !$node->getAttribute('only')) { - $this->addLoopToAll(); - } - - // include function without the with_context=false parameter - elseif ($node instanceof FunctionExpression - && 'include' === $node->getAttribute('name') - && (!$node->getNode('arguments')->hasNode('with_context') - || false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value') - ) - ) { - $this->addLoopToAll(); - } - - // the loop variable is referenced via an attribute - elseif ($node instanceof GetAttrExpression - && (!$node->getNode('attribute') instanceof ConstantExpression - || 'parent' === $node->getNode('attribute')->getAttribute('value') - ) - && (true === $this->loops[0]->getAttribute('with_loop') - || ($node->getNode('node') instanceof NameExpression - && 'loop' === $node->getNode('node')->getAttribute('name') - ) - ) - ) { - $this->addLoopToAll(); - } - } - - /** - * Optimizes "for" tag by removing the "loop" variable creation whenever possible. - */ - private function leaveOptimizeFor(Node $node, Environment $env): void - { - if ($node instanceof ForNode) { - array_shift($this->loops); - array_shift($this->loopsTargets); - array_shift($this->loopsTargets); - } - } - - private function addLoopToCurrent(): void - { - $this->loops[0]->setAttribute('with_loop', true); - } - - private function addLoopToAll(): void - { - foreach ($this->loops as $loop) { - $loop->setAttribute('with_loop', true); - } - } - - public function getPriority(): int - { - return 255; - } -} diff --git a/lib/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php b/lib/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php deleted file mode 100644 index 90d6f2e0f..000000000 --- a/lib/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php +++ /dev/null @@ -1,160 +0,0 @@ -safeVars = $safeVars; - } - - public function getSafe(Node $node) - { - $hash = spl_object_hash($node); - if (!isset($this->data[$hash])) { - return; - } - - foreach ($this->data[$hash] as $bucket) { - if ($bucket['key'] !== $node) { - continue; - } - - if (\in_array('html_attr', $bucket['value'])) { - $bucket['value'][] = 'html'; - } - - return $bucket['value']; - } - } - - private function setSafe(Node $node, array $safe): void - { - $hash = spl_object_hash($node); - if (isset($this->data[$hash])) { - foreach ($this->data[$hash] as &$bucket) { - if ($bucket['key'] === $node) { - $bucket['value'] = $safe; - - return; - } - } - } - $this->data[$hash][] = [ - 'key' => $node, - 'value' => $safe, - ]; - } - - public function enterNode(Node $node, Environment $env): Node - { - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ConstantExpression) { - // constants are marked safe for all - $this->setSafe($node, ['all']); - } elseif ($node instanceof BlockReferenceExpression) { - // blocks are safe by definition - $this->setSafe($node, ['all']); - } elseif ($node instanceof ParentExpression) { - // parent block is safe by definition - $this->setSafe($node, ['all']); - } elseif ($node instanceof ConditionalExpression) { - // intersect safeness of both operands - $safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3'))); - $this->setSafe($node, $safe); - } elseif ($node instanceof FilterExpression) { - // filter expression is safe when the filter is safe - $name = $node->getNode('filter')->getAttribute('value'); - $args = $node->getNode('arguments'); - if ($filter = $env->getFilter($name)) { - $safe = $filter->getSafe($args); - if (null === $safe) { - $safe = $this->intersectSafe($this->getSafe($node->getNode('node')), $filter->getPreservesSafety()); - } - $this->setSafe($node, $safe); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof FunctionExpression) { - // function expression is safe when the function is safe - $name = $node->getAttribute('name'); - $args = $node->getNode('arguments'); - if ($function = $env->getFunction($name)) { - $this->setSafe($node, $function->getSafe($args)); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof MethodCallExpression) { - if ($node->getAttribute('safe')) { - $this->setSafe($node, ['all']); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression) { - $name = $node->getNode('node')->getAttribute('name'); - if (\in_array($name, $this->safeVars)) { - $this->setSafe($node, ['all']); - } else { - $this->setSafe($node, []); - } - } else { - $this->setSafe($node, []); - } - - return $node; - } - - private function intersectSafe(array $a = null, array $b = null): array - { - if (null === $a || null === $b) { - return []; - } - - if (\in_array('all', $a)) { - return $b; - } - - if (\in_array('all', $b)) { - return $a; - } - - return array_intersect($a, $b); - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/lib/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php b/lib/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php deleted file mode 100644 index 1446cee6b..000000000 --- a/lib/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * @internal - */ -final class SandboxNodeVisitor implements NodeVisitorInterface -{ - private $inAModule = false; - private $tags; - private $filters; - private $functions; - private $needsToStringWrap = false; - - public function enterNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = true; - $this->tags = []; - $this->filters = []; - $this->functions = []; - - return $node; - } elseif ($this->inAModule) { - // look for tags - if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) { - $this->tags[$node->getNodeTag()] = $node; - } - - // look for filters - if ($node instanceof FilterExpression && !isset($this->filters[$node->getNode('filter')->getAttribute('value')])) { - $this->filters[$node->getNode('filter')->getAttribute('value')] = $node; - } - - // look for functions - if ($node instanceof FunctionExpression && !isset($this->functions[$node->getAttribute('name')])) { - $this->functions[$node->getAttribute('name')] = $node; - } - - // the .. operator is equivalent to the range() function - if ($node instanceof RangeBinary && !isset($this->functions['range'])) { - $this->functions['range'] = $node; - } - - if ($node instanceof PrintNode) { - $this->needsToStringWrap = true; - $this->wrapNode($node, 'expr'); - } - - if ($node instanceof SetNode && !$node->getAttribute('capture')) { - $this->needsToStringWrap = true; - } - - // wrap outer nodes that can implicitly call __toString() - if ($this->needsToStringWrap) { - if ($node instanceof ConcatBinary) { - $this->wrapNode($node, 'left'); - $this->wrapNode($node, 'right'); - } - if ($node instanceof FilterExpression) { - $this->wrapNode($node, 'node'); - $this->wrapArrayNode($node, 'arguments'); - } - if ($node instanceof FunctionExpression) { - $this->wrapArrayNode($node, 'arguments'); - } - } - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = false; - - $node->setNode('constructor_end', new Node([new CheckSecurityCallNode(), $node->getNode('constructor_end')])); - $node->setNode('class_end', new Node([new CheckSecurityNode($this->filters, $this->tags, $this->functions), $node->getNode('class_end')])); - } elseif ($this->inAModule) { - if ($node instanceof PrintNode || $node instanceof SetNode) { - $this->needsToStringWrap = false; - } - } - - return $node; - } - - private function wrapNode(Node $node, string $name): void - { - $expr = $node->getNode($name); - if ($expr instanceof NameExpression || $expr instanceof GetAttrExpression) { - $node->setNode($name, new CheckToStringNode($expr)); - } - } - - private function wrapArrayNode(Node $node, string $name): void - { - $args = $node->getNode($name); - foreach ($args as $name => $_) { - $this->wrapNode($args, $name); - } - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/lib/twig/twig/src/Parser.php b/lib/twig/twig/src/Parser.php deleted file mode 100644 index 4428208fe..000000000 --- a/lib/twig/twig/src/Parser.php +++ /dev/null @@ -1,348 +0,0 @@ - - */ -class Parser -{ - private $stack = []; - private $stream; - private $parent; - private $visitors; - private $expressionParser; - private $blocks; - private $blockStack; - private $macros; - private $env; - private $importedSymbols; - private $traits; - private $embeddedTemplates = []; - private $varNameSalt = 0; - - public function __construct(Environment $env) - { - $this->env = $env; - } - - public function getVarName(): string - { - return sprintf('__internal_parse_%d', $this->varNameSalt++); - } - - public function parse(TokenStream $stream, $test = null, bool $dropNeedle = false): ModuleNode - { - $vars = get_object_vars($this); - unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames'], $vars['varNameSalt']); - $this->stack[] = $vars; - - // node visitors - if (null === $this->visitors) { - $this->visitors = $this->env->getNodeVisitors(); - } - - if (null === $this->expressionParser) { - $this->expressionParser = new ExpressionParser($this, $this->env); - } - - $this->stream = $stream; - $this->parent = null; - $this->blocks = []; - $this->macros = []; - $this->traits = []; - $this->blockStack = []; - $this->importedSymbols = [[]]; - $this->embeddedTemplates = []; - - try { - $body = $this->subparse($test, $dropNeedle); - - if (null !== $this->parent && null === $body = $this->filterBodyNodes($body)) { - $body = new Node(); - } - } catch (SyntaxError $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($this->stream->getSourceContext()); - } - - if (!$e->getTemplateLine()) { - $e->setTemplateLine($this->stream->getCurrent()->getLine()); - } - - throw $e; - } - - $node = new ModuleNode(new BodyNode([$body]), $this->parent, new Node($this->blocks), new Node($this->macros), new Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); - - $traverser = new NodeTraverser($this->env, $this->visitors); - - $node = $traverser->traverse($node); - - // restore previous stack so previous parse() call can resume working - foreach (array_pop($this->stack) as $key => $val) { - $this->$key = $val; - } - - return $node; - } - - public function subparse($test, bool $dropNeedle = false): Node - { - $lineno = $this->getCurrentToken()->getLine(); - $rv = []; - while (!$this->stream->isEOF()) { - switch ($this->getCurrentToken()->getType()) { - case /* Token::TEXT_TYPE */ 0: - $token = $this->stream->next(); - $rv[] = new TextNode($token->getValue(), $token->getLine()); - break; - - case /* Token::VAR_START_TYPE */ 2: - $token = $this->stream->next(); - $expr = $this->expressionParser->parseExpression(); - $this->stream->expect(/* Token::VAR_END_TYPE */ 4); - $rv[] = new PrintNode($expr, $token->getLine()); - break; - - case /* Token::BLOCK_START_TYPE */ 1: - $this->stream->next(); - $token = $this->getCurrentToken(); - - if (/* Token::NAME_TYPE */ 5 !== $token->getType()) { - throw new SyntaxError('A block must start with a tag name.', $token->getLine(), $this->stream->getSourceContext()); - } - - if (null !== $test && $test($token)) { - if ($dropNeedle) { - $this->stream->next(); - } - - if (1 === \count($rv)) { - return $rv[0]; - } - - return new Node($rv, [], $lineno); - } - - if (!$subparser = $this->env->getTokenParser($token->getValue())) { - if (null !== $test) { - $e = new SyntaxError(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); - - if (\is_array($test) && isset($test[0]) && $test[0] instanceof TokenParserInterface) { - $e->appendMessage(sprintf(' (expecting closing tag for the "%s" tag defined near line %s).', $test[0]->getTag(), $lineno)); - } - } else { - $e = new SyntaxError(sprintf('Unknown "%s" tag.', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); - $e->addSuggestions($token->getValue(), array_keys($this->env->getTokenParsers())); - } - - throw $e; - } - - $this->stream->next(); - - $subparser->setParser($this); - $node = $subparser->parse($token); - if (null !== $node) { - $rv[] = $node; - } - break; - - default: - throw new SyntaxError('Lexer or parser ended up in unsupported state.', $this->getCurrentToken()->getLine(), $this->stream->getSourceContext()); - } - } - - if (1 === \count($rv)) { - return $rv[0]; - } - - return new Node($rv, [], $lineno); - } - - public function getBlockStack(): array - { - return $this->blockStack; - } - - public function peekBlockStack() - { - return $this->blockStack[\count($this->blockStack) - 1] ?? null; - } - - public function popBlockStack(): void - { - array_pop($this->blockStack); - } - - public function pushBlockStack($name): void - { - $this->blockStack[] = $name; - } - - public function hasBlock(string $name): bool - { - return isset($this->blocks[$name]); - } - - public function getBlock(string $name): Node - { - return $this->blocks[$name]; - } - - public function setBlock(string $name, BlockNode $value): void - { - $this->blocks[$name] = new BodyNode([$value], [], $value->getTemplateLine()); - } - - public function hasMacro(string $name): bool - { - return isset($this->macros[$name]); - } - - public function setMacro(string $name, MacroNode $node): void - { - $this->macros[$name] = $node; - } - - public function addTrait($trait): void - { - $this->traits[] = $trait; - } - - public function hasTraits(): bool - { - return \count($this->traits) > 0; - } - - public function embedTemplate(ModuleNode $template) - { - $template->setIndex(mt_rand()); - - $this->embeddedTemplates[] = $template; - } - - public function addImportedSymbol(string $type, string $alias, string $name = null, AbstractExpression $node = null): void - { - $this->importedSymbols[0][$type][$alias] = ['name' => $name, 'node' => $node]; - } - - public function getImportedSymbol(string $type, string $alias) - { - // if the symbol does not exist in the current scope (0), try in the main/global scope (last index) - return $this->importedSymbols[0][$type][$alias] ?? ($this->importedSymbols[\count($this->importedSymbols) - 1][$type][$alias] ?? null); - } - - public function isMainScope(): bool - { - return 1 === \count($this->importedSymbols); - } - - public function pushLocalScope(): void - { - array_unshift($this->importedSymbols, []); - } - - public function popLocalScope(): void - { - array_shift($this->importedSymbols); - } - - public function getExpressionParser(): ExpressionParser - { - return $this->expressionParser; - } - - public function getParent(): ?Node - { - return $this->parent; - } - - public function setParent(?Node $parent): void - { - $this->parent = $parent; - } - - public function getStream(): TokenStream - { - return $this->stream; - } - - public function getCurrentToken(): Token - { - return $this->stream->getCurrent(); - } - - private function filterBodyNodes(Node $node, bool $nested = false): ?Node - { - // check that the body does not contain non-empty output nodes - if ( - ($node instanceof TextNode && !ctype_space($node->getAttribute('data'))) - || - (!$node instanceof TextNode && !$node instanceof BlockReferenceNode && $node instanceof NodeOutputInterface) - ) { - if (false !== strpos((string) $node, \chr(0xEF).\chr(0xBB).\chr(0xBF))) { - $t = substr($node->getAttribute('data'), 3); - if ('' === $t || ctype_space($t)) { - // bypass empty nodes starting with a BOM - return null; - } - } - - throw new SyntaxError('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext()); - } - - // bypass nodes that "capture" the output - if ($node instanceof NodeCaptureInterface) { - // a "block" tag in such a node will serve as a block definition AND be displayed in place as well - return $node; - } - - // "block" tags that are not captured (see above) are only used for defining - // the content of the block. In such a case, nesting it does not work as - // expected as the definition is not part of the default template code flow. - if ($nested && $node instanceof BlockReferenceNode) { - throw new SyntaxError('A block definition cannot be nested under non-capturing nodes.', $node->getTemplateLine(), $this->stream->getSourceContext()); - } - - if ($node instanceof NodeOutputInterface) { - return null; - } - - // here, $nested means "being at the root level of a child template" - // we need to discard the wrapping "Node" for the "body" node - $nested = $nested || Node::class !== \get_class($node); - foreach ($node as $k => $n) { - if (null !== $n && null === $this->filterBodyNodes($n, $nested)) { - $node->removeNode($k); - } - } - - return $node; - } -} diff --git a/lib/twig/twig/src/Profiler/Dumper/BaseDumper.php b/lib/twig/twig/src/Profiler/Dumper/BaseDumper.php deleted file mode 100644 index 4da43e475..000000000 --- a/lib/twig/twig/src/Profiler/Dumper/BaseDumper.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -abstract class BaseDumper -{ - private $root; - - public function dump(Profile $profile): string - { - return $this->dumpProfile($profile); - } - - abstract protected function formatTemplate(Profile $profile, $prefix): string; - - abstract protected function formatNonTemplate(Profile $profile, $prefix): string; - - abstract protected function formatTime(Profile $profile, $percent): string; - - private function dumpProfile(Profile $profile, $prefix = '', $sibling = false): string - { - if ($profile->isRoot()) { - $this->root = $profile->getDuration(); - $start = $profile->getName(); - } else { - if ($profile->isTemplate()) { - $start = $this->formatTemplate($profile, $prefix); - } else { - $start = $this->formatNonTemplate($profile, $prefix); - } - $prefix .= $sibling ? '│ ' : ' '; - } - - $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0; - - if ($profile->getDuration() * 1000 < 1) { - $str = $start."\n"; - } else { - $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent)); - } - - $nCount = \count($profile->getProfiles()); - foreach ($profile as $i => $p) { - $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount); - } - - return $str; - } -} diff --git a/lib/twig/twig/src/Profiler/Dumper/BlackfireDumper.php b/lib/twig/twig/src/Profiler/Dumper/BlackfireDumper.php deleted file mode 100644 index 03abe0fa0..000000000 --- a/lib/twig/twig/src/Profiler/Dumper/BlackfireDumper.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ -final class BlackfireDumper -{ - public function dump(Profile $profile): string - { - $data = []; - $this->dumpProfile('main()', $profile, $data); - $this->dumpChildren('main()', $profile, $data); - - $start = sprintf('%f', microtime(true)); - $str = << $values) { - $str .= "$name//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n"; - } - - return $str; - } - - private function dumpChildren(string $parent, Profile $profile, &$data) - { - foreach ($profile as $p) { - if ($p->isTemplate()) { - $name = $p->getTemplate(); - } else { - $name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName()); - } - $this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data); - $this->dumpChildren($name, $p, $data); - } - } - - private function dumpProfile(string $edge, Profile $profile, &$data) - { - if (isset($data[$edge])) { - ++$data[$edge]['ct']; - $data[$edge]['wt'] += floor($profile->getDuration() * 1000000); - $data[$edge]['mu'] += $profile->getMemoryUsage(); - $data[$edge]['pmu'] += $profile->getPeakMemoryUsage(); - } else { - $data[$edge] = [ - 'ct' => 1, - 'wt' => floor($profile->getDuration() * 1000000), - 'mu' => $profile->getMemoryUsage(), - 'pmu' => $profile->getPeakMemoryUsage(), - ]; - } - } -} diff --git a/lib/twig/twig/src/Profiler/Dumper/HtmlDumper.php b/lib/twig/twig/src/Profiler/Dumper/HtmlDumper.php deleted file mode 100644 index 1f2433b4d..000000000 --- a/lib/twig/twig/src/Profiler/Dumper/HtmlDumper.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -final class HtmlDumper extends BaseDumper -{ - private static $colors = [ - 'block' => '#dfd', - 'macro' => '#ddf', - 'template' => '#ffd', - 'big' => '#d44', - ]; - - public function dump(Profile $profile): string - { - return '
    '.parent::dump($profile).'
    '; - } - - protected function formatTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s', $prefix, self::$colors['template'], $profile->getTemplate()); - } - - protected function formatNonTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName()); - } - - protected function formatTime(Profile $profile, $percent): string - { - return sprintf('%.2fms/%.0f%%', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent); - } -} diff --git a/lib/twig/twig/src/Profiler/Dumper/TextDumper.php b/lib/twig/twig/src/Profiler/Dumper/TextDumper.php deleted file mode 100644 index 31561c466..000000000 --- a/lib/twig/twig/src/Profiler/Dumper/TextDumper.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -final class TextDumper extends BaseDumper -{ - protected function formatTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s', $prefix, $profile->getTemplate()); - } - - protected function formatNonTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName()); - } - - protected function formatTime(Profile $profile, $percent): string - { - return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent); - } -} diff --git a/lib/twig/twig/src/Profiler/Node/EnterProfileNode.php b/lib/twig/twig/src/Profiler/Node/EnterProfileNode.php deleted file mode 100644 index 1494baf44..000000000 --- a/lib/twig/twig/src/Profiler/Node/EnterProfileNode.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class EnterProfileNode extends Node -{ - public function __construct(string $extensionName, string $type, string $name, string $varName) - { - parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->write(sprintf('$%s = $this->extensions[', $this->getAttribute('var_name'))) - ->repr($this->getAttribute('extension_name')) - ->raw("];\n") - ->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) - ->repr($this->getAttribute('type')) - ->raw(', ') - ->repr($this->getAttribute('name')) - ->raw("));\n\n") - ; - } -} diff --git a/lib/twig/twig/src/Profiler/Node/LeaveProfileNode.php b/lib/twig/twig/src/Profiler/Node/LeaveProfileNode.php deleted file mode 100644 index 94cebbaa8..000000000 --- a/lib/twig/twig/src/Profiler/Node/LeaveProfileNode.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class LeaveProfileNode extends Node -{ - public function __construct(string $varName) - { - parent::__construct([], ['var_name' => $varName]); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->write("\n") - ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) - ; - } -} diff --git a/lib/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php b/lib/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php deleted file mode 100644 index 91abee807..000000000 --- a/lib/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -final class ProfilerNodeVisitor implements NodeVisitorInterface -{ - private $extensionName; - private $varName; - - public function __construct(string $extensionName) - { - $this->extensionName = $extensionName; - $this->varName = sprintf('__internal_%s', hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $extensionName)); - } - - public function enterNode(Node $node, Environment $env): Node - { - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ModuleNode) { - $node->setNode('display_start', new Node([new EnterProfileNode($this->extensionName, Profile::TEMPLATE, $node->getTemplateName(), $this->varName), $node->getNode('display_start')])); - $node->setNode('display_end', new Node([new LeaveProfileNode($this->varName), $node->getNode('display_end')])); - } elseif ($node instanceof BlockNode) { - $node->setNode('body', new BodyNode([ - new EnterProfileNode($this->extensionName, Profile::BLOCK, $node->getAttribute('name'), $this->varName), - $node->getNode('body'), - new LeaveProfileNode($this->varName), - ])); - } elseif ($node instanceof MacroNode) { - $node->setNode('body', new BodyNode([ - new EnterProfileNode($this->extensionName, Profile::MACRO, $node->getAttribute('name'), $this->varName), - $node->getNode('body'), - new LeaveProfileNode($this->varName), - ])); - } - - return $node; - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/lib/twig/twig/src/Profiler/Profile.php b/lib/twig/twig/src/Profiler/Profile.php deleted file mode 100644 index 252ca9b0c..000000000 --- a/lib/twig/twig/src/Profiler/Profile.php +++ /dev/null @@ -1,181 +0,0 @@ - - */ -final class Profile implements \IteratorAggregate, \Serializable -{ - public const ROOT = 'ROOT'; - public const BLOCK = 'block'; - public const TEMPLATE = 'template'; - public const MACRO = 'macro'; - - private $template; - private $name; - private $type; - private $starts = []; - private $ends = []; - private $profiles = []; - - public function __construct(string $template = 'main', string $type = self::ROOT, string $name = 'main') - { - $this->template = $template; - $this->type = $type; - $this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name; - $this->enter(); - } - - public function getTemplate(): string - { - return $this->template; - } - - public function getType(): string - { - return $this->type; - } - - public function getName(): string - { - return $this->name; - } - - public function isRoot(): bool - { - return self::ROOT === $this->type; - } - - public function isTemplate(): bool - { - return self::TEMPLATE === $this->type; - } - - public function isBlock(): bool - { - return self::BLOCK === $this->type; - } - - public function isMacro(): bool - { - return self::MACRO === $this->type; - } - - /** - * @return Profile[] - */ - public function getProfiles(): array - { - return $this->profiles; - } - - public function addProfile(self $profile): void - { - $this->profiles[] = $profile; - } - - /** - * Returns the duration in microseconds. - */ - public function getDuration(): float - { - if ($this->isRoot() && $this->profiles) { - // for the root node with children, duration is the sum of all child durations - $duration = 0; - foreach ($this->profiles as $profile) { - $duration += $profile->getDuration(); - } - - return $duration; - } - - return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0; - } - - /** - * Returns the memory usage in bytes. - */ - public function getMemoryUsage(): int - { - return isset($this->ends['mu']) && isset($this->starts['mu']) ? $this->ends['mu'] - $this->starts['mu'] : 0; - } - - /** - * Returns the peak memory usage in bytes. - */ - public function getPeakMemoryUsage(): int - { - return isset($this->ends['pmu']) && isset($this->starts['pmu']) ? $this->ends['pmu'] - $this->starts['pmu'] : 0; - } - - /** - * Starts the profiling. - */ - public function enter(): void - { - $this->starts = [ - 'wt' => microtime(true), - 'mu' => memory_get_usage(), - 'pmu' => memory_get_peak_usage(), - ]; - } - - /** - * Stops the profiling. - */ - public function leave(): void - { - $this->ends = [ - 'wt' => microtime(true), - 'mu' => memory_get_usage(), - 'pmu' => memory_get_peak_usage(), - ]; - } - - public function reset(): void - { - $this->starts = $this->ends = $this->profiles = []; - $this->enter(); - } - - public function getIterator(): \Traversable - { - return new \ArrayIterator($this->profiles); - } - - public function serialize(): string - { - return serialize($this->__serialize()); - } - - public function unserialize($data): void - { - $this->__unserialize(unserialize($data)); - } - - /** - * @internal - */ - public function __serialize(): array - { - return [$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles]; - } - - /** - * @internal - */ - public function __unserialize(array $data): void - { - list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = $data; - } -} diff --git a/lib/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php b/lib/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php deleted file mode 100644 index b360d7bea..000000000 --- a/lib/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @author Robin Chalas - */ -class ContainerRuntimeLoader implements RuntimeLoaderInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - public function load(string $class) - { - return $this->container->has($class) ? $this->container->get($class) : null; - } -} diff --git a/lib/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php b/lib/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php deleted file mode 100644 index 130648392..000000000 --- a/lib/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class FactoryRuntimeLoader implements RuntimeLoaderInterface -{ - private $map; - - /** - * @param array $map An array where keys are class names and values factory callables - */ - public function __construct(array $map = []) - { - $this->map = $map; - } - - public function load(string $class) - { - if (!isset($this->map[$class])) { - return null; - } - - $runtimeFactory = $this->map[$class]; - - return $runtimeFactory(); - } -} diff --git a/lib/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php b/lib/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php deleted file mode 100644 index 9e5b2048e..000000000 --- a/lib/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -interface RuntimeLoaderInterface -{ - /** - * Creates the runtime implementation of a Twig element (filter/function/test). - * - * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class - */ - public function load(string $class); -} diff --git a/lib/twig/twig/src/Sandbox/SecurityError.php b/lib/twig/twig/src/Sandbox/SecurityError.php deleted file mode 100644 index 30a404f28..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityError.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -class SecurityError extends Error -{ -} diff --git a/lib/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php b/lib/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php deleted file mode 100644 index 02d306360..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -final class SecurityNotAllowedFilterError extends SecurityError -{ - private $filterName; - - public function __construct(string $message, string $functionName) - { - parent::__construct($message); - $this->filterName = $functionName; - } - - public function getFilterName(): string - { - return $this->filterName; - } -} diff --git a/lib/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php b/lib/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php deleted file mode 100644 index 4f76dc6ec..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -final class SecurityNotAllowedFunctionError extends SecurityError -{ - private $functionName; - - public function __construct(string $message, string $functionName) - { - parent::__construct($message); - $this->functionName = $functionName; - } - - public function getFunctionName(): string - { - return $this->functionName; - } -} diff --git a/lib/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php b/lib/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php deleted file mode 100644 index 8df9d0baa..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -final class SecurityNotAllowedMethodError extends SecurityError -{ - private $className; - private $methodName; - - public function __construct(string $message, string $className, string $methodName) - { - parent::__construct($message); - $this->className = $className; - $this->methodName = $methodName; - } - - public function getClassName(): string - { - return $this->className; - } - - public function getMethodName() - { - return $this->methodName; - } -} diff --git a/lib/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php b/lib/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php deleted file mode 100644 index 42ec4f386..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -final class SecurityNotAllowedPropertyError extends SecurityError -{ - private $className; - private $propertyName; - - public function __construct(string $message, string $className, string $propertyName) - { - parent::__construct($message); - $this->className = $className; - $this->propertyName = $propertyName; - } - - public function getClassName(): string - { - return $this->className; - } - - public function getPropertyName() - { - return $this->propertyName; - } -} diff --git a/lib/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php b/lib/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php deleted file mode 100644 index 4522150e1..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -final class SecurityNotAllowedTagError extends SecurityError -{ - private $tagName; - - public function __construct(string $message, string $tagName) - { - parent::__construct($message); - $this->tagName = $tagName; - } - - public function getTagName(): string - { - return $this->tagName; - } -} diff --git a/lib/twig/twig/src/Sandbox/SecurityPolicy.php b/lib/twig/twig/src/Sandbox/SecurityPolicy.php deleted file mode 100644 index 2fc0d0131..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityPolicy.php +++ /dev/null @@ -1,126 +0,0 @@ - - */ -final class SecurityPolicy implements SecurityPolicyInterface -{ - private $allowedTags; - private $allowedFilters; - private $allowedMethods; - private $allowedProperties; - private $allowedFunctions; - - public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = []) - { - $this->allowedTags = $allowedTags; - $this->allowedFilters = $allowedFilters; - $this->setAllowedMethods($allowedMethods); - $this->allowedProperties = $allowedProperties; - $this->allowedFunctions = $allowedFunctions; - } - - public function setAllowedTags(array $tags): void - { - $this->allowedTags = $tags; - } - - public function setAllowedFilters(array $filters): void - { - $this->allowedFilters = $filters; - } - - public function setAllowedMethods(array $methods): void - { - $this->allowedMethods = []; - foreach ($methods as $class => $m) { - $this->allowedMethods[$class] = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]); - } - } - - public function setAllowedProperties(array $properties): void - { - $this->allowedProperties = $properties; - } - - public function setAllowedFunctions(array $functions): void - { - $this->allowedFunctions = $functions; - } - - public function checkSecurity($tags, $filters, $functions): void - { - foreach ($tags as $tag) { - if (!\in_array($tag, $this->allowedTags)) { - throw new SecurityNotAllowedTagError(sprintf('Tag "%s" is not allowed.', $tag), $tag); - } - } - - foreach ($filters as $filter) { - if (!\in_array($filter, $this->allowedFilters)) { - throw new SecurityNotAllowedFilterError(sprintf('Filter "%s" is not allowed.', $filter), $filter); - } - } - - foreach ($functions as $function) { - if (!\in_array($function, $this->allowedFunctions)) { - throw new SecurityNotAllowedFunctionError(sprintf('Function "%s" is not allowed.', $function), $function); - } - } - } - - public function checkMethodAllowed($obj, $method): void - { - if ($obj instanceof Template || $obj instanceof Markup) { - return; - } - - $allowed = false; - $method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - foreach ($this->allowedMethods as $class => $methods) { - if ($obj instanceof $class) { - $allowed = \in_array($method, $methods); - - break; - } - } - - if (!$allowed) { - $class = \get_class($obj); - throw new SecurityNotAllowedMethodError(sprintf('Calling "%s" method on a "%s" object is not allowed.', $method, $class), $class, $method); - } - } - - public function checkPropertyAllowed($obj, $property): void - { - $allowed = false; - foreach ($this->allowedProperties as $class => $properties) { - if ($obj instanceof $class) { - $allowed = \in_array($property, \is_array($properties) ? $properties : [$properties]); - - break; - } - } - - if (!$allowed) { - $class = \get_class($obj); - throw new SecurityNotAllowedPropertyError(sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, $class), $class, $property); - } - } -} diff --git a/lib/twig/twig/src/Sandbox/SecurityPolicyInterface.php b/lib/twig/twig/src/Sandbox/SecurityPolicyInterface.php deleted file mode 100644 index 36471c54c..000000000 --- a/lib/twig/twig/src/Sandbox/SecurityPolicyInterface.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -interface SecurityPolicyInterface -{ - /** - * @param string[] $tags - * @param string[] $filters - * @param string[] $functions - * - * @throws SecurityError - */ - public function checkSecurity($tags, $filters, $functions): void; - - /** - * @param object $obj - * @param string $method - * - * @throws SecurityNotAllowedMethodError - */ - public function checkMethodAllowed($obj, $method): void; - - /** - * @param object $obj - * @param string $property - * - * @throws SecurityNotAllowedPropertyError - */ - public function checkPropertyAllowed($obj, $property): void; -} diff --git a/lib/twig/twig/src/Source.php b/lib/twig/twig/src/Source.php deleted file mode 100644 index 3cb02403c..000000000 --- a/lib/twig/twig/src/Source.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -final class Source -{ - private $code; - private $name; - private $path; - - /** - * @param string $code The template source code - * @param string $name The template logical name - * @param string $path The filesystem path of the template if any - */ - public function __construct(string $code, string $name, string $path = '') - { - $this->code = $code; - $this->name = $name; - $this->path = $path; - } - - public function getCode(): string - { - return $this->code; - } - - public function getName(): string - { - return $this->name; - } - - public function getPath(): string - { - return $this->path; - } -} diff --git a/lib/twig/twig/src/Template.php b/lib/twig/twig/src/Template.php deleted file mode 100644 index e04bd04a6..000000000 --- a/lib/twig/twig/src/Template.php +++ /dev/null @@ -1,422 +0,0 @@ -load() - * instead, which returns an instance of \Twig\TemplateWrapper. - * - * @author Fabien Potencier - * - * @internal - */ -abstract class Template -{ - public const ANY_CALL = 'any'; - public const ARRAY_CALL = 'array'; - public const METHOD_CALL = 'method'; - - protected $parent; - protected $parents = []; - protected $env; - protected $blocks = []; - protected $traits = []; - protected $extensions = []; - protected $sandbox; - - public function __construct(Environment $env) - { - $this->env = $env; - $this->extensions = $env->getExtensions(); - } - - /** - * Returns the template name. - * - * @return string The template name - */ - abstract public function getTemplateName(); - - /** - * Returns debug information about the template. - * - * @return array Debug information - */ - abstract public function getDebugInfo(); - - /** - * Returns information about the original template source code. - * - * @return Source - */ - abstract public function getSourceContext(); - - /** - * Returns the parent template. - * - * This method is for internal use only and should never be called - * directly. - * - * @return Template|TemplateWrapper|false The parent template or false if there is no parent - */ - public function getParent(array $context) - { - if (null !== $this->parent) { - return $this->parent; - } - - try { - $parent = $this->doGetParent($context); - - if (false === $parent) { - return false; - } - - if ($parent instanceof self || $parent instanceof TemplateWrapper) { - return $this->parents[$parent->getSourceContext()->getName()] = $parent; - } - - if (!isset($this->parents[$parent])) { - $this->parents[$parent] = $this->loadTemplate($parent); - } - } catch (LoaderError $e) { - $e->setSourceContext(null); - $e->guess(); - - throw $e; - } - - return $this->parents[$parent]; - } - - protected function doGetParent(array $context) - { - return false; - } - - public function isTraitable() - { - return true; - } - - /** - * Displays a parent block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to display from the parent - * @param array $context The context - * @param array $blocks The current set of blocks - */ - public function displayParentBlock($name, array $context, array $blocks = []) - { - if (isset($this->traits[$name])) { - $this->traits[$name][0]->displayBlock($name, $context, $blocks, false); - } elseif (false !== $parent = $this->getParent($context)) { - $parent->displayBlock($name, $context, $blocks, false); - } else { - throw new RuntimeError(sprintf('The template has no parent and no traits defining the "%s" block.', $name), -1, $this->getSourceContext()); - } - } - - /** - * Displays a block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to display - * @param array $context The context - * @param array $blocks The current set of blocks - * @param bool $useBlocks Whether to use the current set of blocks - */ - public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true, self $templateContext = null) - { - if ($useBlocks && isset($blocks[$name])) { - $template = $blocks[$name][0]; - $block = $blocks[$name][1]; - } elseif (isset($this->blocks[$name])) { - $template = $this->blocks[$name][0]; - $block = $this->blocks[$name][1]; - } else { - $template = null; - $block = null; - } - - // avoid RCEs when sandbox is enabled - if (null !== $template && !$template instanceof self) { - throw new \LogicException('A block must be a method on a \Twig\Template instance.'); - } - - if (null !== $template) { - try { - $template->$block($context, $blocks); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($template->getSourceContext()); - } - - // this is mostly useful for \Twig\Error\LoaderError exceptions - // see \Twig\Error\LoaderError - if (-1 === $e->getTemplateLine()) { - $e->guess(); - } - - throw $e; - } catch (\Exception $e) { - $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e); - $e->guess(); - - throw $e; - } - } elseif (false !== $parent = $this->getParent($context)) { - $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this); - } elseif (isset($blocks[$name])) { - throw new RuntimeError(sprintf('Block "%s" should not call parent() in "%s" as the block does not exist in the parent template "%s".', $name, $blocks[$name][0]->getTemplateName(), $this->getTemplateName()), -1, $blocks[$name][0]->getSourceContext()); - } else { - throw new RuntimeError(sprintf('Block "%s" on template "%s" does not exist.', $name, $this->getTemplateName()), -1, ($templateContext ?? $this)->getSourceContext()); - } - } - - /** - * Renders a parent block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to render from the parent - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return string The rendered block - */ - public function renderParentBlock($name, array $context, array $blocks = []) - { - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - $this->displayParentBlock($name, $context, $blocks); - - return ob_get_clean(); - } - - /** - * Renders a block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to render - * @param array $context The context - * @param array $blocks The current set of blocks - * @param bool $useBlocks Whether to use the current set of blocks - * - * @return string The rendered block - */ - public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true) - { - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - $this->displayBlock($name, $context, $blocks, $useBlocks); - - return ob_get_clean(); - } - - /** - * Returns whether a block exists or not in the current context of the template. - * - * This method checks blocks defined in the current template - * or defined in "used" traits or defined in parent templates. - * - * @param string $name The block name - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return bool true if the block exists, false otherwise - */ - public function hasBlock($name, array $context, array $blocks = []) - { - if (isset($blocks[$name])) { - return $blocks[$name][0] instanceof self; - } - - if (isset($this->blocks[$name])) { - return true; - } - - if (false !== $parent = $this->getParent($context)) { - return $parent->hasBlock($name, $context); - } - - return false; - } - - /** - * Returns all block names in the current context of the template. - * - * This method checks blocks defined in the current template - * or defined in "used" traits or defined in parent templates. - * - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return array An array of block names - */ - public function getBlockNames(array $context, array $blocks = []) - { - $names = array_merge(array_keys($blocks), array_keys($this->blocks)); - - if (false !== $parent = $this->getParent($context)) { - $names = array_merge($names, $parent->getBlockNames($context)); - } - - return array_unique($names); - } - - /** - * @return Template|TemplateWrapper - */ - protected function loadTemplate($template, $templateName = null, $line = null, $index = null) - { - try { - if (\is_array($template)) { - return $this->env->resolveTemplate($template); - } - - if ($template instanceof self || $template instanceof TemplateWrapper) { - return $template; - } - - if ($template === $this->getTemplateName()) { - $class = static::class; - if (false !== $pos = strrpos($class, '___', -1)) { - $class = substr($class, 0, $pos); - } - } else { - $class = $this->env->getTemplateClass($template); - } - - return $this->env->loadTemplate($class, $template, $index); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($templateName ? new Source('', $templateName) : $this->getSourceContext()); - } - - if ($e->getTemplateLine() > 0) { - throw $e; - } - - if (!$line) { - $e->guess(); - } else { - $e->setTemplateLine($line); - } - - throw $e; - } - } - - /** - * @internal - * - * @return Template - */ - public function unwrap() - { - return $this; - } - - /** - * Returns all blocks. - * - * This method is for internal use only and should never be called - * directly. - * - * @return array An array of blocks - */ - public function getBlocks() - { - return $this->blocks; - } - - public function display(array $context, array $blocks = []) - { - $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); - } - - public function render(array $context) - { - $level = ob_get_level(); - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - try { - $this->display($context); - } catch (\Throwable $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - - return ob_get_clean(); - } - - protected function displayWithErrorHandling(array $context, array $blocks = []) - { - try { - $this->doDisplay($context, $blocks); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($this->getSourceContext()); - } - - // this is mostly useful for \Twig\Error\LoaderError exceptions - // see \Twig\Error\LoaderError - if (-1 === $e->getTemplateLine()) { - $e->guess(); - } - - throw $e; - } catch (\Exception $e) { - $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e); - $e->guess(); - - throw $e; - } - } - - /** - * Auto-generated method to display the template with the given context. - * - * @param array $context An array of parameters to pass to the template - * @param array $blocks An array of blocks to pass to the template - */ - abstract protected function doDisplay(array $context, array $blocks = []); -} diff --git a/lib/twig/twig/src/TemplateWrapper.php b/lib/twig/twig/src/TemplateWrapper.php deleted file mode 100644 index c9c6b07c6..000000000 --- a/lib/twig/twig/src/TemplateWrapper.php +++ /dev/null @@ -1,109 +0,0 @@ - - */ -final class TemplateWrapper -{ - private $env; - private $template; - - /** - * This method is for internal use only and should never be called - * directly (use Twig\Environment::load() instead). - * - * @internal - */ - public function __construct(Environment $env, Template $template) - { - $this->env = $env; - $this->template = $template; - } - - public function render(array $context = []): string - { - // using func_get_args() allows to not expose the blocks argument - // as it should only be used by internal code - return $this->template->render($context, \func_get_args()[1] ?? []); - } - - public function display(array $context = []) - { - // using func_get_args() allows to not expose the blocks argument - // as it should only be used by internal code - $this->template->display($context, \func_get_args()[1] ?? []); - } - - public function hasBlock(string $name, array $context = []): bool - { - return $this->template->hasBlock($name, $context); - } - - /** - * @return string[] An array of defined template block names - */ - public function getBlockNames(array $context = []): array - { - return $this->template->getBlockNames($context); - } - - public function renderBlock(string $name, array $context = []): string - { - $context = $this->env->mergeGlobals($context); - $level = ob_get_level(); - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - try { - $this->template->displayBlock($name, $context); - } catch (\Throwable $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - - return ob_get_clean(); - } - - public function displayBlock(string $name, array $context = []) - { - $this->template->displayBlock($name, $this->env->mergeGlobals($context)); - } - - public function getSourceContext(): Source - { - return $this->template->getSourceContext(); - } - - public function getTemplateName(): string - { - return $this->template->getTemplateName(); - } - - /** - * @internal - * - * @return Template - */ - public function unwrap() - { - return $this->template; - } -} diff --git a/lib/twig/twig/src/Token.php b/lib/twig/twig/src/Token.php deleted file mode 100644 index 53a6cafc3..000000000 --- a/lib/twig/twig/src/Token.php +++ /dev/null @@ -1,178 +0,0 @@ - - */ -final class Token -{ - private $value; - private $type; - private $lineno; - - public const EOF_TYPE = -1; - public const TEXT_TYPE = 0; - public const BLOCK_START_TYPE = 1; - public const VAR_START_TYPE = 2; - public const BLOCK_END_TYPE = 3; - public const VAR_END_TYPE = 4; - public const NAME_TYPE = 5; - public const NUMBER_TYPE = 6; - public const STRING_TYPE = 7; - public const OPERATOR_TYPE = 8; - public const PUNCTUATION_TYPE = 9; - public const INTERPOLATION_START_TYPE = 10; - public const INTERPOLATION_END_TYPE = 11; - public const ARROW_TYPE = 12; - - public function __construct(int $type, $value, int $lineno) - { - $this->type = $type; - $this->value = $value; - $this->lineno = $lineno; - } - - public function __toString() - { - return sprintf('%s(%s)', self::typeToString($this->type, true), $this->value); - } - - /** - * Tests the current token for a type and/or a value. - * - * Parameters may be: - * * just type - * * type and value (or array of possible values) - * * just value (or array of possible values) (NAME_TYPE is used as type) - * - * @param array|string|int $type The type to test - * @param array|string|null $values The token value - */ - public function test($type, $values = null): bool - { - if (null === $values && !\is_int($type)) { - $values = $type; - $type = self::NAME_TYPE; - } - - return ($this->type === $type) && ( - null === $values || - (\is_array($values) && \in_array($this->value, $values)) || - $this->value == $values - ); - } - - public function getLine(): int - { - return $this->lineno; - } - - public function getType(): int - { - return $this->type; - } - - public function getValue() - { - return $this->value; - } - - public static function typeToString(int $type, bool $short = false): string - { - switch ($type) { - case self::EOF_TYPE: - $name = 'EOF_TYPE'; - break; - case self::TEXT_TYPE: - $name = 'TEXT_TYPE'; - break; - case self::BLOCK_START_TYPE: - $name = 'BLOCK_START_TYPE'; - break; - case self::VAR_START_TYPE: - $name = 'VAR_START_TYPE'; - break; - case self::BLOCK_END_TYPE: - $name = 'BLOCK_END_TYPE'; - break; - case self::VAR_END_TYPE: - $name = 'VAR_END_TYPE'; - break; - case self::NAME_TYPE: - $name = 'NAME_TYPE'; - break; - case self::NUMBER_TYPE: - $name = 'NUMBER_TYPE'; - break; - case self::STRING_TYPE: - $name = 'STRING_TYPE'; - break; - case self::OPERATOR_TYPE: - $name = 'OPERATOR_TYPE'; - break; - case self::PUNCTUATION_TYPE: - $name = 'PUNCTUATION_TYPE'; - break; - case self::INTERPOLATION_START_TYPE: - $name = 'INTERPOLATION_START_TYPE'; - break; - case self::INTERPOLATION_END_TYPE: - $name = 'INTERPOLATION_END_TYPE'; - break; - case self::ARROW_TYPE: - $name = 'ARROW_TYPE'; - break; - default: - throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type)); - } - - return $short ? $name : 'Twig\Token::'.$name; - } - - public static function typeToEnglish(int $type): string - { - switch ($type) { - case self::EOF_TYPE: - return 'end of template'; - case self::TEXT_TYPE: - return 'text'; - case self::BLOCK_START_TYPE: - return 'begin of statement block'; - case self::VAR_START_TYPE: - return 'begin of print statement'; - case self::BLOCK_END_TYPE: - return 'end of statement block'; - case self::VAR_END_TYPE: - return 'end of print statement'; - case self::NAME_TYPE: - return 'name'; - case self::NUMBER_TYPE: - return 'number'; - case self::STRING_TYPE: - return 'string'; - case self::OPERATOR_TYPE: - return 'operator'; - case self::PUNCTUATION_TYPE: - return 'punctuation'; - case self::INTERPOLATION_START_TYPE: - return 'begin of string interpolation'; - case self::INTERPOLATION_END_TYPE: - return 'end of string interpolation'; - case self::ARROW_TYPE: - return 'arrow function'; - default: - throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type)); - } - } -} diff --git a/lib/twig/twig/src/TokenParser/AbstractTokenParser.php b/lib/twig/twig/src/TokenParser/AbstractTokenParser.php deleted file mode 100644 index 720ea6762..000000000 --- a/lib/twig/twig/src/TokenParser/AbstractTokenParser.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -abstract class AbstractTokenParser implements TokenParserInterface -{ - /** - * @var Parser - */ - protected $parser; - - public function setParser(Parser $parser): void - { - $this->parser = $parser; - } -} diff --git a/lib/twig/twig/src/TokenParser/ApplyTokenParser.php b/lib/twig/twig/src/TokenParser/ApplyTokenParser.php deleted file mode 100644 index 4dbf30406..000000000 --- a/lib/twig/twig/src/TokenParser/ApplyTokenParser.php +++ /dev/null @@ -1,60 +0,0 @@ -getLine(); - $name = $this->parser->getVarName(); - - $ref = new TempNameExpression($name, $lineno); - $ref->setAttribute('always_defined', true); - - $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideApplyEnd'], true); - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new Node([ - new SetNode(true, $ref, $body, $lineno, $this->getTag()), - new PrintNode($filter, $lineno, $this->getTag()), - ]); - } - - public function decideApplyEnd(Token $token): bool - { - return $token->test('endapply'); - } - - public function getTag(): string - { - return 'apply'; - } -} diff --git a/lib/twig/twig/src/TokenParser/AutoEscapeTokenParser.php b/lib/twig/twig/src/TokenParser/AutoEscapeTokenParser.php deleted file mode 100644 index b674bea4a..000000000 --- a/lib/twig/twig/src/TokenParser/AutoEscapeTokenParser.php +++ /dev/null @@ -1,58 +0,0 @@ -getLine(); - $stream = $this->parser->getStream(); - - if ($stream->test(/* Token::BLOCK_END_TYPE */ 3)) { - $value = 'html'; - } else { - $expr = $this->parser->getExpressionParser()->parseExpression(); - if (!$expr instanceof ConstantExpression) { - throw new SyntaxError('An escaping strategy must be a string or false.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - $value = $expr->getAttribute('value'); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new AutoEscapeNode($value, $body, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endautoescape'); - } - - public function getTag(): string - { - return 'autoescape'; - } -} diff --git a/lib/twig/twig/src/TokenParser/BlockTokenParser.php b/lib/twig/twig/src/TokenParser/BlockTokenParser.php deleted file mode 100644 index 5878131be..000000000 --- a/lib/twig/twig/src/TokenParser/BlockTokenParser.php +++ /dev/null @@ -1,78 +0,0 @@ - - * {% block title %}{% endblock %} - My Webpage - * {% endblock %} - * - * @internal - */ -final class BlockTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - if ($this->parser->hasBlock($name)) { - throw new SyntaxError(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - $this->parser->setBlock($name, $block = new BlockNode($name, new Node([]), $lineno)); - $this->parser->pushLocalScope(); - $this->parser->pushBlockStack($name); - - if ($stream->nextIf(/* Token::BLOCK_END_TYPE */ 3)) { - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) { - $value = $token->getValue(); - - if ($value != $name) { - throw new SyntaxError(sprintf('Expected endblock for block "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - } else { - $body = new Node([ - new PrintNode($this->parser->getExpressionParser()->parseExpression(), $lineno), - ]); - } - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $block->setNode('body', $body); - $this->parser->popBlockStack(); - $this->parser->popLocalScope(); - - return new BlockReferenceNode($name, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endblock'); - } - - public function getTag(): string - { - return 'block'; - } -} diff --git a/lib/twig/twig/src/TokenParser/DeprecatedTokenParser.php b/lib/twig/twig/src/TokenParser/DeprecatedTokenParser.php deleted file mode 100644 index 31416c79c..000000000 --- a/lib/twig/twig/src/TokenParser/DeprecatedTokenParser.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * @internal - */ -final class DeprecatedTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $expr = $this->parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new DeprecatedNode($expr, $token->getLine(), $this->getTag()); - } - - public function getTag(): string - { - return 'deprecated'; - } -} diff --git a/lib/twig/twig/src/TokenParser/DoTokenParser.php b/lib/twig/twig/src/TokenParser/DoTokenParser.php deleted file mode 100644 index 32c8f12ff..000000000 --- a/lib/twig/twig/src/TokenParser/DoTokenParser.php +++ /dev/null @@ -1,38 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new DoNode($expr, $token->getLine(), $this->getTag()); - } - - public function getTag(): string - { - return 'do'; - } -} diff --git a/lib/twig/twig/src/TokenParser/EmbedTokenParser.php b/lib/twig/twig/src/TokenParser/EmbedTokenParser.php deleted file mode 100644 index 64b4f296f..000000000 --- a/lib/twig/twig/src/TokenParser/EmbedTokenParser.php +++ /dev/null @@ -1,73 +0,0 @@ -parser->getStream(); - - $parent = $this->parser->getExpressionParser()->parseExpression(); - - list($variables, $only, $ignoreMissing) = $this->parseArguments(); - - $parentToken = $fakeParentToken = new Token(/* Token::STRING_TYPE */ 7, '__parent__', $token->getLine()); - if ($parent instanceof ConstantExpression) { - $parentToken = new Token(/* Token::STRING_TYPE */ 7, $parent->getAttribute('value'), $token->getLine()); - } elseif ($parent instanceof NameExpression) { - $parentToken = new Token(/* Token::NAME_TYPE */ 5, $parent->getAttribute('name'), $token->getLine()); - } - - // inject a fake parent to make the parent() function work - $stream->injectTokens([ - new Token(/* Token::BLOCK_START_TYPE */ 1, '', $token->getLine()), - new Token(/* Token::NAME_TYPE */ 5, 'extends', $token->getLine()), - $parentToken, - new Token(/* Token::BLOCK_END_TYPE */ 3, '', $token->getLine()), - ]); - - $module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true); - - // override the parent with the correct one - if ($fakeParentToken === $parentToken) { - $module->setNode('parent', $parent); - } - - $this->parser->embedTemplate($module); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new EmbedNode($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endembed'); - } - - public function getTag(): string - { - return 'embed'; - } -} diff --git a/lib/twig/twig/src/TokenParser/ExtendsTokenParser.php b/lib/twig/twig/src/TokenParser/ExtendsTokenParser.php deleted file mode 100644 index 0ca46dd29..000000000 --- a/lib/twig/twig/src/TokenParser/ExtendsTokenParser.php +++ /dev/null @@ -1,52 +0,0 @@ -parser->getStream(); - - if ($this->parser->peekBlockStack()) { - throw new SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceContext()); - } elseif (!$this->parser->isMainScope()) { - throw new SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceContext()); - } - - if (null !== $this->parser->getParent()) { - throw new SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext()); - } - $this->parser->setParent($this->parser->getExpressionParser()->parseExpression()); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new Node(); - } - - public function getTag(): string - { - return 'extends'; - } -} diff --git a/lib/twig/twig/src/TokenParser/FlushTokenParser.php b/lib/twig/twig/src/TokenParser/FlushTokenParser.php deleted file mode 100644 index 02c74aa13..000000000 --- a/lib/twig/twig/src/TokenParser/FlushTokenParser.php +++ /dev/null @@ -1,38 +0,0 @@ -parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new FlushNode($token->getLine(), $this->getTag()); - } - - public function getTag(): string - { - return 'flush'; - } -} diff --git a/lib/twig/twig/src/TokenParser/ForTokenParser.php b/lib/twig/twig/src/TokenParser/ForTokenParser.php deleted file mode 100644 index bac8ba2da..000000000 --- a/lib/twig/twig/src/TokenParser/ForTokenParser.php +++ /dev/null @@ -1,78 +0,0 @@ - - * {% for user in users %} - *
  • {{ user.username|e }}
  • - * {% endfor %} - * - * - * @internal - */ -final class ForTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $targets = $this->parser->getExpressionParser()->parseAssignmentExpression(); - $stream->expect(/* Token::OPERATOR_TYPE */ 8, 'in'); - $seq = $this->parser->getExpressionParser()->parseExpression(); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideForFork']); - if ('else' == $stream->next()->getValue()) { - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $else = $this->parser->subparse([$this, 'decideForEnd'], true); - } else { - $else = null; - } - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - if (\count($targets) > 1) { - $keyTarget = $targets->getNode(0); - $keyTarget = new AssignNameExpression($keyTarget->getAttribute('name'), $keyTarget->getTemplateLine()); - $valueTarget = $targets->getNode(1); - } else { - $keyTarget = new AssignNameExpression('_key', $lineno); - $valueTarget = $targets->getNode(0); - } - $valueTarget = new AssignNameExpression($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine()); - - return new ForNode($keyTarget, $valueTarget, $seq, null, $body, $else, $lineno, $this->getTag()); - } - - public function decideForFork(Token $token): bool - { - return $token->test(['else', 'endfor']); - } - - public function decideForEnd(Token $token): bool - { - return $token->test('endfor'); - } - - public function getTag(): string - { - return 'for'; - } -} diff --git a/lib/twig/twig/src/TokenParser/FromTokenParser.php b/lib/twig/twig/src/TokenParser/FromTokenParser.php deleted file mode 100644 index 35098c267..000000000 --- a/lib/twig/twig/src/TokenParser/FromTokenParser.php +++ /dev/null @@ -1,66 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - $stream->expect(/* Token::NAME_TYPE */ 5, 'import'); - - $targets = []; - do { - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - $alias = $name; - if ($stream->nextIf('as')) { - $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - } - - $targets[$name] = $alias; - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } while (true); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $var = new AssignNameExpression($this->parser->getVarName(), $token->getLine()); - $node = new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope()); - - foreach ($targets as $name => $alias) { - $this->parser->addImportedSymbol('function', $alias, 'macro_'.$name, $var); - } - - return $node; - } - - public function getTag(): string - { - return 'from'; - } -} diff --git a/lib/twig/twig/src/TokenParser/IfTokenParser.php b/lib/twig/twig/src/TokenParser/IfTokenParser.php deleted file mode 100644 index c0fe6df0d..000000000 --- a/lib/twig/twig/src/TokenParser/IfTokenParser.php +++ /dev/null @@ -1,89 +0,0 @@ - - * {% for user in users %} - *
  • {{ user.username|e }}
  • - * {% endfor %} - * - * {% endif %} - * - * @internal - */ -final class IfTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $expr = $this->parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideIfFork']); - $tests = [$expr, $body]; - $else = null; - - $end = false; - while (!$end) { - switch ($stream->next()->getValue()) { - case 'else': - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $else = $this->parser->subparse([$this, 'decideIfEnd']); - break; - - case 'elseif': - $expr = $this->parser->getExpressionParser()->parseExpression(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideIfFork']); - $tests[] = $expr; - $tests[] = $body; - break; - - case 'endif': - $end = true; - break; - - default: - throw new SyntaxError(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d).', $lineno), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new IfNode(new Node($tests), $else, $lineno, $this->getTag()); - } - - public function decideIfFork(Token $token): bool - { - return $token->test(['elseif', 'else', 'endif']); - } - - public function decideIfEnd(Token $token): bool - { - return $token->test(['endif']); - } - - public function getTag(): string - { - return 'if'; - } -} diff --git a/lib/twig/twig/src/TokenParser/ImportTokenParser.php b/lib/twig/twig/src/TokenParser/ImportTokenParser.php deleted file mode 100644 index 44cb4dad7..000000000 --- a/lib/twig/twig/src/TokenParser/ImportTokenParser.php +++ /dev/null @@ -1,44 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5, 'as'); - $var = new AssignNameExpression($this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5)->getValue(), $token->getLine()); - $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3); - - $this->parser->addImportedSymbol('template', $var->getAttribute('name')); - - return new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope()); - } - - public function getTag(): string - { - return 'import'; - } -} diff --git a/lib/twig/twig/src/TokenParser/IncludeTokenParser.php b/lib/twig/twig/src/TokenParser/IncludeTokenParser.php deleted file mode 100644 index 28beb8ae4..000000000 --- a/lib/twig/twig/src/TokenParser/IncludeTokenParser.php +++ /dev/null @@ -1,69 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - - list($variables, $only, $ignoreMissing) = $this->parseArguments(); - - return new IncludeNode($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); - } - - protected function parseArguments() - { - $stream = $this->parser->getStream(); - - $ignoreMissing = false; - if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'ignore')) { - $stream->expect(/* Token::NAME_TYPE */ 5, 'missing'); - - $ignoreMissing = true; - } - - $variables = null; - if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'with')) { - $variables = $this->parser->getExpressionParser()->parseExpression(); - } - - $only = false; - if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'only')) { - $only = true; - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return [$variables, $only, $ignoreMissing]; - } - - public function getTag(): string - { - return 'include'; - } -} diff --git a/lib/twig/twig/src/TokenParser/MacroTokenParser.php b/lib/twig/twig/src/TokenParser/MacroTokenParser.php deleted file mode 100644 index f584927e9..000000000 --- a/lib/twig/twig/src/TokenParser/MacroTokenParser.php +++ /dev/null @@ -1,66 +0,0 @@ - - * {% endmacro %} - * - * @internal - */ -final class MacroTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - $arguments = $this->parser->getExpressionParser()->parseArguments(true, true); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $this->parser->pushLocalScope(); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) { - $value = $token->getValue(); - - if ($value != $name) { - throw new SyntaxError(sprintf('Expected endmacro for macro "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - $this->parser->popLocalScope(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag())); - - return new Node(); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endmacro'); - } - - public function getTag(): string - { - return 'macro'; - } -} diff --git a/lib/twig/twig/src/TokenParser/SandboxTokenParser.php b/lib/twig/twig/src/TokenParser/SandboxTokenParser.php deleted file mode 100644 index c919556ec..000000000 --- a/lib/twig/twig/src/TokenParser/SandboxTokenParser.php +++ /dev/null @@ -1,66 +0,0 @@ -parser->getStream(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - // in a sandbox tag, only include tags are allowed - if (!$body instanceof IncludeNode) { - foreach ($body as $node) { - if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) { - continue; - } - - if (!$node instanceof IncludeNode) { - throw new SyntaxError('Only "include" tags are allowed within a "sandbox" section.', $node->getTemplateLine(), $stream->getSourceContext()); - } - } - } - - return new SandboxNode($body, $token->getLine(), $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endsandbox'); - } - - public function getTag(): string - { - return 'sandbox'; - } -} diff --git a/lib/twig/twig/src/TokenParser/SetTokenParser.php b/lib/twig/twig/src/TokenParser/SetTokenParser.php deleted file mode 100644 index 2fbdfe090..000000000 --- a/lib/twig/twig/src/TokenParser/SetTokenParser.php +++ /dev/null @@ -1,73 +0,0 @@ -getLine(); - $stream = $this->parser->getStream(); - $names = $this->parser->getExpressionParser()->parseAssignmentExpression(); - - $capture = false; - if ($stream->nextIf(/* Token::OPERATOR_TYPE */ 8, '=')) { - $values = $this->parser->getExpressionParser()->parseMultitargetExpression(); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - if (\count($names) !== \count($values)) { - throw new SyntaxError('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } else { - $capture = true; - - if (\count($names) > 1) { - throw new SyntaxError('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $values = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - } - - return new SetNode($capture, $names, $values, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endset'); - } - - public function getTag(): string - { - return 'set'; - } -} diff --git a/lib/twig/twig/src/TokenParser/TokenParserInterface.php b/lib/twig/twig/src/TokenParser/TokenParserInterface.php deleted file mode 100644 index bb8db3e5c..000000000 --- a/lib/twig/twig/src/TokenParser/TokenParserInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -interface TokenParserInterface -{ - /** - * Sets the parser associated with this token parser. - */ - public function setParser(Parser $parser): void; - - /** - * Parses a token and returns a node. - * - * @return Node - * - * @throws SyntaxError - */ - public function parse(Token $token); - - /** - * Gets the tag name associated with this token parser. - * - * @return string - */ - public function getTag(); -} diff --git a/lib/twig/twig/src/TokenParser/UseTokenParser.php b/lib/twig/twig/src/TokenParser/UseTokenParser.php deleted file mode 100644 index d0a2de41a..000000000 --- a/lib/twig/twig/src/TokenParser/UseTokenParser.php +++ /dev/null @@ -1,73 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - - if (!$template instanceof ConstantExpression) { - throw new SyntaxError('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - - $targets = []; - if ($stream->nextIf('with')) { - do { - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - $alias = $name; - if ($stream->nextIf('as')) { - $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - } - - $targets[$name] = new ConstantExpression($alias, -1); - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } while (true); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $this->parser->addTrait(new Node(['template' => $template, 'targets' => new Node($targets)])); - - return new Node(); - } - - public function getTag(): string - { - return 'use'; - } -} diff --git a/lib/twig/twig/src/TokenParser/WithTokenParser.php b/lib/twig/twig/src/TokenParser/WithTokenParser.php deleted file mode 100644 index 7d8cbe261..000000000 --- a/lib/twig/twig/src/TokenParser/WithTokenParser.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * @internal - */ -final class WithTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $stream = $this->parser->getStream(); - - $variables = null; - $only = false; - if (!$stream->test(/* Token::BLOCK_END_TYPE */ 3)) { - $variables = $this->parser->getExpressionParser()->parseExpression(); - $only = (bool) $stream->nextIf(/* Token::NAME_TYPE */ 5, 'only'); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $body = $this->parser->subparse([$this, 'decideWithEnd'], true); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag()); - } - - public function decideWithEnd(Token $token): bool - { - return $token->test('endwith'); - } - - public function getTag(): string - { - return 'with'; - } -} diff --git a/lib/twig/twig/src/TokenStream.php b/lib/twig/twig/src/TokenStream.php deleted file mode 100644 index 1eac11a02..000000000 --- a/lib/twig/twig/src/TokenStream.php +++ /dev/null @@ -1,132 +0,0 @@ - - */ -final class TokenStream -{ - private $tokens; - private $current = 0; - private $source; - - public function __construct(array $tokens, Source $source = null) - { - $this->tokens = $tokens; - $this->source = $source ?: new Source('', ''); - } - - public function __toString() - { - return implode("\n", $this->tokens); - } - - public function injectTokens(array $tokens) - { - $this->tokens = array_merge(\array_slice($this->tokens, 0, $this->current), $tokens, \array_slice($this->tokens, $this->current)); - } - - /** - * Sets the pointer to the next token and returns the old one. - */ - public function next(): Token - { - if (!isset($this->tokens[++$this->current])) { - throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->source); - } - - return $this->tokens[$this->current - 1]; - } - - /** - * Tests a token, sets the pointer to the next one and returns it or throws a syntax error. - * - * @return Token|null The next token if the condition is true, null otherwise - */ - public function nextIf($primary, $secondary = null) - { - if ($this->tokens[$this->current]->test($primary, $secondary)) { - return $this->next(); - } - } - - /** - * Tests a token and returns it or throws a syntax error. - */ - public function expect($type, $value = null, string $message = null): Token - { - $token = $this->tokens[$this->current]; - if (!$token->test($type, $value)) { - $line = $token->getLine(); - throw new SyntaxError(sprintf('%sUnexpected token "%s"%s ("%s" expected%s).', - $message ? $message.'. ' : '', - Token::typeToEnglish($token->getType()), - $token->getValue() ? sprintf(' of value "%s"', $token->getValue()) : '', - Token::typeToEnglish($type), $value ? sprintf(' with value "%s"', $value) : ''), - $line, - $this->source - ); - } - $this->next(); - - return $token; - } - - /** - * Looks at the next token. - */ - public function look(int $number = 1): Token - { - if (!isset($this->tokens[$this->current + $number])) { - throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->source); - } - - return $this->tokens[$this->current + $number]; - } - - /** - * Tests the current token. - */ - public function test($primary, $secondary = null): bool - { - return $this->tokens[$this->current]->test($primary, $secondary); - } - - /** - * Checks if end of stream was reached. - */ - public function isEOF(): bool - { - return /* Token::EOF_TYPE */ -1 === $this->tokens[$this->current]->getType(); - } - - public function getCurrent(): Token - { - return $this->tokens[$this->current]; - } - - /** - * Gets the source associated with this stream. - * - * @internal - */ - public function getSourceContext(): Source - { - return $this->source; - } -} diff --git a/lib/twig/twig/src/TwigFilter.php b/lib/twig/twig/src/TwigFilter.php deleted file mode 100644 index 94e5f9b01..000000000 --- a/lib/twig/twig/src/TwigFilter.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * @see https://twig.symfony.com/doc/templates.html#filters - */ -final class TwigFilter -{ - private $name; - private $callable; - private $options; - private $arguments = []; - - /** - * @param callable|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation. - */ - public function __construct(string $name, $callable = null, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'needs_environment' => false, - 'needs_context' => false, - 'is_variadic' => false, - 'is_safe' => null, - 'is_safe_callback' => null, - 'pre_escape' => null, - 'preserves_safety' => null, - 'node_class' => FilterExpression::class, - 'deprecated' => false, - 'alternative' => null, - ], $options); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Returns the callable to execute for this filter. - * - * @return callable|null - */ - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass(): string - { - return $this->options['node_class']; - } - - public function setArguments(array $arguments): void - { - $this->arguments = $arguments; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function needsEnvironment(): bool - { - return $this->options['needs_environment']; - } - - public function needsContext(): bool - { - return $this->options['needs_context']; - } - - public function getSafe(Node $filterArgs): ?array - { - if (null !== $this->options['is_safe']) { - return $this->options['is_safe']; - } - - if (null !== $this->options['is_safe_callback']) { - return $this->options['is_safe_callback']($filterArgs); - } - - return null; - } - - public function getPreservesSafety(): ?array - { - return $this->options['preserves_safety']; - } - - public function getPreEscape(): ?string - { - return $this->options['pre_escape']; - } - - public function isVariadic(): bool - { - return $this->options['is_variadic']; - } - - public function isDeprecated(): bool - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion(): string - { - return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated']; - } - - public function getAlternative(): ?string - { - return $this->options['alternative']; - } -} diff --git a/lib/twig/twig/src/TwigFunction.php b/lib/twig/twig/src/TwigFunction.php deleted file mode 100644 index 494d45b08..000000000 --- a/lib/twig/twig/src/TwigFunction.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * @see https://twig.symfony.com/doc/templates.html#functions - */ -final class TwigFunction -{ - private $name; - private $callable; - private $options; - private $arguments = []; - - /** - * @param callable|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation. - */ - public function __construct(string $name, $callable = null, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'needs_environment' => false, - 'needs_context' => false, - 'is_variadic' => false, - 'is_safe' => null, - 'is_safe_callback' => null, - 'node_class' => FunctionExpression::class, - 'deprecated' => false, - 'alternative' => null, - ], $options); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Returns the callable to execute for this function. - * - * @return callable|null - */ - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass(): string - { - return $this->options['node_class']; - } - - public function setArguments(array $arguments): void - { - $this->arguments = $arguments; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function needsEnvironment(): bool - { - return $this->options['needs_environment']; - } - - public function needsContext(): bool - { - return $this->options['needs_context']; - } - - public function getSafe(Node $functionArgs): ?array - { - if (null !== $this->options['is_safe']) { - return $this->options['is_safe']; - } - - if (null !== $this->options['is_safe_callback']) { - return $this->options['is_safe_callback']($functionArgs); - } - - return []; - } - - public function isVariadic(): bool - { - return (bool) $this->options['is_variadic']; - } - - public function isDeprecated(): bool - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion(): string - { - return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated']; - } - - public function getAlternative(): ?string - { - return $this->options['alternative']; - } -} diff --git a/lib/twig/twig/src/TwigTest.php b/lib/twig/twig/src/TwigTest.php deleted file mode 100644 index 4c18632f5..000000000 --- a/lib/twig/twig/src/TwigTest.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * @see https://twig.symfony.com/doc/templates.html#test-operator - */ -final class TwigTest -{ - private $name; - private $callable; - private $options; - private $arguments = []; - - /** - * @param callable|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation. - */ - public function __construct(string $name, $callable = null, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'is_variadic' => false, - 'node_class' => TestExpression::class, - 'deprecated' => false, - 'alternative' => null, - 'one_mandatory_argument' => false, - ], $options); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Returns the callable to execute for this test. - * - * @return callable|null - */ - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass(): string - { - return $this->options['node_class']; - } - - public function setArguments(array $arguments): void - { - $this->arguments = $arguments; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function isVariadic(): bool - { - return (bool) $this->options['is_variadic']; - } - - public function isDeprecated(): bool - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion(): string - { - return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated']; - } - - public function getAlternative(): ?string - { - return $this->options['alternative']; - } - - public function hasOneMandatoryArgument(): bool - { - return (bool) $this->options['one_mandatory_argument']; - } -} diff --git a/lib/twig/twig/src/Util/DeprecationCollector.php b/lib/twig/twig/src/Util/DeprecationCollector.php deleted file mode 100644 index 378b666bd..000000000 --- a/lib/twig/twig/src/Util/DeprecationCollector.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -final class DeprecationCollector -{ - private $twig; - - public function __construct(Environment $twig) - { - $this->twig = $twig; - } - - /** - * Returns deprecations for templates contained in a directory. - * - * @param string $dir A directory where templates are stored - * @param string $ext Limit the loaded templates by extension - * - * @return array An array of deprecations - */ - public function collectDir(string $dir, string $ext = '.twig'): array - { - $iterator = new \RegexIterator( - new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY - ), '{'.preg_quote($ext).'$}' - ); - - return $this->collect(new TemplateDirIterator($iterator)); - } - - /** - * Returns deprecations for passed templates. - * - * @param \Traversable $iterator An iterator of templates (where keys are template names and values the contents of the template) - * - * @return array An array of deprecations - */ - public function collect(\Traversable $iterator): array - { - $deprecations = []; - set_error_handler(function ($type, $msg) use (&$deprecations) { - if (\E_USER_DEPRECATED === $type) { - $deprecations[] = $msg; - } - }); - - foreach ($iterator as $name => $contents) { - try { - $this->twig->parse($this->twig->tokenize(new Source($contents, $name))); - } catch (SyntaxError $e) { - // ignore templates containing syntax errors - } - } - - restore_error_handler(); - - return $deprecations; - } -} diff --git a/lib/twig/twig/src/Util/TemplateDirIterator.php b/lib/twig/twig/src/Util/TemplateDirIterator.php deleted file mode 100644 index 3bef14bee..000000000 --- a/lib/twig/twig/src/Util/TemplateDirIterator.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class TemplateDirIterator extends \IteratorIterator -{ - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function current() - { - return file_get_contents(parent::current()); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function key() - { - return (string) parent::key(); - } -} diff --git a/lib/web.config b/lib/web.config deleted file mode 100644 index 88956be1b..000000000 --- a/lib/web.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/webmozart/assert/CHANGELOG.md b/lib/webmozart/assert/CHANGELOG.md deleted file mode 100644 index 56c8011de..000000000 --- a/lib/webmozart/assert/CHANGELOG.md +++ /dev/null @@ -1,207 +0,0 @@ -Changelog -========= - -## UNRELEASED - -## 1.11.0 - -### Added - -* Added explicit (non magic) `allNullOr*` methods, with `@psalm-assert` annotations, for better Psalm support. - -### Changed - -* Trait methods will now check the assertion themselves, instead of using `__callStatic` -* `isList` will now deal correctly with (modified) lists that contain `NaN` -* `reportInvalidArgument` now has a return type of `never`. - -### Removed - -* Removed `symfony/polyfill-ctype` as a dependency, and require `ext-cytpe` instead. - * You can still require the `symfony/polyfill-ctype` in your project if you need it, as it provides `ext-ctype` - -## 1.10.0 - -### Added - -* On invalid assertion, we throw a `Webmozart\Assert\InvalidArgumentException` -* Added `Assert::positiveInteger()` - -### Changed - -* Using a trait with real implementations of `all*()` and `nullOr*()` methods to improve psalm compatibility. - -### Removed - -* Support for PHP <7.2 - -## 1.9.1 - -## Fixed - -* provisional support for PHP 8.0 - -## 1.9.0 - -* added better Psalm support for `all*` & `nullOr*` methods -* These methods are now understood by Psalm through a mixin. You may need a newer version of Psalm in order to use this -* added `@psalm-pure` annotation to `Assert::notFalse()` -* added more `@psalm-assert` annotations where appropriate - -## Changed - -* the `all*` & `nullOr*` methods are now declared on an interface, instead of `@method` annotations. -This interface is linked to the `Assert` class with a `@mixin` annotation. Most IDE's have supported this -for a long time, and you should not lose any autocompletion capabilities. PHPStan has supported this since -version `0.12.20`. This package is marked incompatible (with a composer conflict) with phpstan version prior to that. -If you do not use PHPStan than this does not matter. - -## 1.8.0 - -### Added - -* added `Assert::notStartsWith()` -* added `Assert::notEndsWith()` -* added `Assert::inArray()` -* added `@psalm-pure` annotations to pure assertions - -### Fixed - -* Exception messages of comparisons between `DateTime(Immutable)` objects now display their date & time. -* Custom Exception messages for `Assert::count()` now use the values to render the exception message. - -## 1.7.0 (2020-02-14) - -### Added - -* added `Assert::notFalse()` -* added `Assert::isAOf()` -* added `Assert::isAnyOf()` -* added `Assert::isNotA()` - -## 1.6.0 (2019-11-24) - -### Added - -* added `Assert::validArrayKey()` -* added `Assert::isNonEmptyList()` -* added `Assert::isNonEmptyMap()` -* added `@throws InvalidArgumentException` annotations to all methods that throw. -* added `@psalm-assert` for the list type to the `isList` assertion. - -### Fixed - -* `ResourceBundle` & `SimpleXMLElement` now pass the `isCountable` assertions. -They are countable, without implementing the `Countable` interface. -* The doc block of `range` now has the proper variables. -* An empty array will now pass `isList` and `isMap`. As it is a valid form of both. -If a non-empty variant is needed, use `isNonEmptyList` or `isNonEmptyMap`. - -### Changed - -* Removed some `@psalm-assert` annotations, that were 'side effect' assertions See: - * [#144](https://github.com/webmozart/assert/pull/144) - * [#145](https://github.com/webmozart/assert/issues/145) - * [#146](https://github.com/webmozart/assert/pull/146) - * [#150](https://github.com/webmozart/assert/pull/150) -* If you use Psalm, the minimum version needed is `3.6.0`. Which is enforced through a composer conflict. -If you don't use Psalm, then this has no impact. - -## 1.5.0 (2019-08-24) - -### Added - -* added `Assert::uniqueValues()` -* added `Assert::unicodeLetters()` -* added: `Assert::email()` -* added support for [Psalm](https://github.com/vimeo/psalm), by adding `@psalm-assert` annotations where appropriate. - -### Fixed - -* `Assert::endsWith()` would not give the correct result when dealing with a multibyte suffix. -* `Assert::length(), minLength, maxLength, lengthBetween` would not give the correct result when dealing with multibyte characters. - -**NOTE**: These 2 changes may break your assertions if you relied on the fact that multibyte characters didn't behave correctly. - -### Changed - -* The names of some variables have been updated to better reflect what they are. -* All function calls are now in their FQN form, slightly increasing performance. -* Tests are now properly ran against HHVM-3.30 and PHP nightly. - -### Deprecation - -* deprecated `Assert::isTraversable()` in favor of `Assert::isIterable()` - * This was already done in 1.3.0, but it was only done through a silenced `trigger_error`. It is now annotated as well. - -## 1.4.0 (2018-12-25) - -### Added - -* added `Assert::ip()` -* added `Assert::ipv4()` -* added `Assert::ipv6()` -* added `Assert::notRegex()` -* added `Assert::interfaceExists()` -* added `Assert::isList()` -* added `Assert::isMap()` -* added polyfill for ctype - -### Fixed - -* Special case when comparing objects implementing `__toString()` - -## 1.3.0 (2018-01-29) - -### Added - -* added `Assert::minCount()` -* added `Assert::maxCount()` -* added `Assert::countBetween()` -* added `Assert::isCountable()` -* added `Assert::notWhitespaceOnly()` -* added `Assert::natural()` -* added `Assert::notContains()` -* added `Assert::isArrayAccessible()` -* added `Assert::isInstanceOfAny()` -* added `Assert::isIterable()` - -### Fixed - -* `stringNotEmpty` will no longer report "0" is an empty string - -### Deprecation - -* deprecated `Assert::isTraversable()` in favor of `Assert::isIterable()` - -## 1.2.0 (2016-11-23) - - * added `Assert::throws()` - * added `Assert::count()` - * added extension point `Assert::reportInvalidArgument()` for custom subclasses - -## 1.1.0 (2016-08-09) - - * added `Assert::object()` - * added `Assert::propertyExists()` - * added `Assert::propertyNotExists()` - * added `Assert::methodExists()` - * added `Assert::methodNotExists()` - * added `Assert::uuid()` - -## 1.0.2 (2015-08-24) - - * integrated Style CI - * add tests for minimum package dependencies on Travis CI - -## 1.0.1 (2015-05-12) - - * added support for PHP 5.3.3 - -## 1.0.0 (2015-05-12) - - * first stable release - -## 1.0.0-beta (2015-03-19) - - * first beta release diff --git a/lib/webmozart/assert/LICENSE b/lib/webmozart/assert/LICENSE deleted file mode 100644 index 9e2e3075e..000000000 --- a/lib/webmozart/assert/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Bernhard Schussek - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/webmozart/assert/README.md b/lib/webmozart/assert/README.md deleted file mode 100644 index 3b2397a1a..000000000 --- a/lib/webmozart/assert/README.md +++ /dev/null @@ -1,287 +0,0 @@ -Webmozart Assert -================ - -[![Latest Stable Version](https://poser.pugx.org/webmozart/assert/v/stable.svg)](https://packagist.org/packages/webmozart/assert) -[![Total Downloads](https://poser.pugx.org/webmozart/assert/downloads.svg)](https://packagist.org/packages/webmozart/assert) - -This library contains efficient assertions to test the input and output of -your methods. With these assertions, you can greatly reduce the amount of coding -needed to write a safe implementation. - -All assertions in the [`Assert`] class throw an `Webmozart\Assert\InvalidArgumentException` if -they fail. - -FAQ ---- - -**What's the difference to [beberlei/assert]?** - -This library is heavily inspired by Benjamin Eberlei's wonderful [assert package], -but fixes a usability issue with error messages that can't be fixed there without -breaking backwards compatibility. - -This package features usable error messages by default. However, you can also -easily write custom error messages: - -``` -Assert::string($path, 'The path is expected to be a string. Got: %s'); -``` - -In [beberlei/assert], the ordering of the `%s` placeholders is different for -every assertion. This package, on the contrary, provides consistent placeholder -ordering for all assertions: - -* `%s`: The tested value as string, e.g. `"/foo/bar"`. -* `%2$s`, `%3$s`, ...: Additional assertion-specific values, e.g. the - minimum/maximum length, allowed values, etc. - -Check the source code of the assertions to find out details about the additional -available placeholders. - -Installation ------------- - -Use [Composer] to install the package: - -```bash -composer require webmozart/assert -``` - -Example -------- - -```php -use Webmozart\Assert\Assert; - -class Employee -{ - public function __construct($id) - { - Assert::integer($id, 'The employee ID must be an integer. Got: %s'); - Assert::greaterThan($id, 0, 'The employee ID must be a positive integer. Got: %s'); - } -} -``` - -If you create an employee with an invalid ID, an exception is thrown: - -```php -new Employee('foobar'); -// => Webmozart\Assert\InvalidArgumentException: -// The employee ID must be an integer. Got: string - -new Employee(-10); -// => Webmozart\Assert\InvalidArgumentException: -// The employee ID must be a positive integer. Got: -10 -``` - -Assertions ----------- - -The [`Assert`] class provides the following assertions: - -### Type Assertions - -Method | Description --------------------------------------------------------- | -------------------------------------------------- -`string($value, $message = '')` | Check that a value is a string -`stringNotEmpty($value, $message = '')` | Check that a value is a non-empty string -`integer($value, $message = '')` | Check that a value is an integer -`integerish($value, $message = '')` | Check that a value casts to an integer -`positiveInteger($value, $message = '')` | Check that a value is a positive (non-zero) integer -`float($value, $message = '')` | Check that a value is a float -`numeric($value, $message = '')` | Check that a value is numeric -`natural($value, $message= ''')` | Check that a value is a non-negative integer -`boolean($value, $message = '')` | Check that a value is a boolean -`scalar($value, $message = '')` | Check that a value is a scalar -`object($value, $message = '')` | Check that a value is an object -`resource($value, $type = null, $message = '')` | Check that a value is a resource -`isCallable($value, $message = '')` | Check that a value is a callable -`isArray($value, $message = '')` | Check that a value is an array -`isTraversable($value, $message = '')` (deprecated) | Check that a value is an array or a `\Traversable` -`isIterable($value, $message = '')` | Check that a value is an array or a `\Traversable` -`isCountable($value, $message = '')` | Check that a value is an array or a `\Countable` -`isInstanceOf($value, $class, $message = '')` | Check that a value is an `instanceof` a class -`isInstanceOfAny($value, array $classes, $message = '')` | Check that a value is an `instanceof` at least one class on the array of classes -`notInstanceOf($value, $class, $message = '')` | Check that a value is not an `instanceof` a class -`isAOf($value, $class, $message = '')` | Check that a value is of the class or has one of its parents -`isAnyOf($value, array $classes, $message = '')` | Check that a value is of at least one of the classes or has one of its parents -`isNotA($value, $class, $message = '')` | Check that a value is not of the class or has not one of its parents -`isArrayAccessible($value, $message = '')` | Check that a value can be accessed as an array -`uniqueValues($values, $message = '')` | Check that the given array contains unique values - -### Comparison Assertions - -Method | Description ------------------------------------------------ | ------------------------------------------------------------------ -`true($value, $message = '')` | Check that a value is `true` -`false($value, $message = '')` | Check that a value is `false` -`notFalse($value, $message = '')` | Check that a value is not `false` -`null($value, $message = '')` | Check that a value is `null` -`notNull($value, $message = '')` | Check that a value is not `null` -`isEmpty($value, $message = '')` | Check that a value is `empty()` -`notEmpty($value, $message = '')` | Check that a value is not `empty()` -`eq($value, $value2, $message = '')` | Check that a value equals another (`==`) -`notEq($value, $value2, $message = '')` | Check that a value does not equal another (`!=`) -`same($value, $value2, $message = '')` | Check that a value is identical to another (`===`) -`notSame($value, $value2, $message = '')` | Check that a value is not identical to another (`!==`) -`greaterThan($value, $value2, $message = '')` | Check that a value is greater than another -`greaterThanEq($value, $value2, $message = '')` | Check that a value is greater than or equal to another -`lessThan($value, $value2, $message = '')` | Check that a value is less than another -`lessThanEq($value, $value2, $message = '')` | Check that a value is less than or equal to another -`range($value, $min, $max, $message = '')` | Check that a value is within a range -`inArray($value, array $values, $message = '')` | Check that a value is one of a list of values -`oneOf($value, array $values, $message = '')` | Check that a value is one of a list of values (alias of `inArray`) - -### String Assertions - -You should check that a value is a string with `Assert::string()` before making -any of the following assertions. - -Method | Description ---------------------------------------------------- | ----------------------------------------------------------------- -`contains($value, $subString, $message = '')` | Check that a string contains a substring -`notContains($value, $subString, $message = '')` | Check that a string does not contain a substring -`startsWith($value, $prefix, $message = '')` | Check that a string has a prefix -`notStartsWith($value, $prefix, $message = '')` | Check that a string does not have a prefix -`startsWithLetter($value, $message = '')` | Check that a string starts with a letter -`endsWith($value, $suffix, $message = '')` | Check that a string has a suffix -`notEndsWith($value, $suffix, $message = '')` | Check that a string does not have a suffix -`regex($value, $pattern, $message = '')` | Check that a string matches a regular expression -`notRegex($value, $pattern, $message = '')` | Check that a string does not match a regular expression -`unicodeLetters($value, $message = '')` | Check that a string contains Unicode letters only -`alpha($value, $message = '')` | Check that a string contains letters only -`digits($value, $message = '')` | Check that a string contains digits only -`alnum($value, $message = '')` | Check that a string contains letters and digits only -`lower($value, $message = '')` | Check that a string contains lowercase characters only -`upper($value, $message = '')` | Check that a string contains uppercase characters only -`length($value, $length, $message = '')` | Check that a string has a certain number of characters -`minLength($value, $min, $message = '')` | Check that a string has at least a certain number of characters -`maxLength($value, $max, $message = '')` | Check that a string has at most a certain number of characters -`lengthBetween($value, $min, $max, $message = '')` | Check that a string has a length in the given range -`uuid($value, $message = '')` | Check that a string is a valid UUID -`ip($value, $message = '')` | Check that a string is a valid IP (either IPv4 or IPv6) -`ipv4($value, $message = '')` | Check that a string is a valid IPv4 -`ipv6($value, $message = '')` | Check that a string is a valid IPv6 -`email($value, $message = '')` | Check that a string is a valid e-mail address -`notWhitespaceOnly($value, $message = '')` | Check that a string contains at least one non-whitespace character - -### File Assertions - -Method | Description ------------------------------------ | -------------------------------------------------- -`fileExists($value, $message = '')` | Check that a value is an existing path -`file($value, $message = '')` | Check that a value is an existing file -`directory($value, $message = '')` | Check that a value is an existing directory -`readable($value, $message = '')` | Check that a value is a readable path -`writable($value, $message = '')` | Check that a value is a writable path - -### Object Assertions - -Method | Description ------------------------------------------------------ | -------------------------------------------------- -`classExists($value, $message = '')` | Check that a value is an existing class name -`subclassOf($value, $class, $message = '')` | Check that a class is a subclass of another -`interfaceExists($value, $message = '')` | Check that a value is an existing interface name -`implementsInterface($value, $class, $message = '')` | Check that a class implements an interface -`propertyExists($value, $property, $message = '')` | Check that a property exists in a class/object -`propertyNotExists($value, $property, $message = '')` | Check that a property does not exist in a class/object -`methodExists($value, $method, $message = '')` | Check that a method exists in a class/object -`methodNotExists($value, $method, $message = '')` | Check that a method does not exist in a class/object - -### Array Assertions - -Method | Description --------------------------------------------------- | ------------------------------------------------------------------ -`keyExists($array, $key, $message = '')` | Check that a key exists in an array -`keyNotExists($array, $key, $message = '')` | Check that a key does not exist in an array -`validArrayKey($key, $message = '')` | Check that a value is a valid array key (int or string) -`count($array, $number, $message = '')` | Check that an array contains a specific number of elements -`minCount($array, $min, $message = '')` | Check that an array contains at least a certain number of elements -`maxCount($array, $max, $message = '')` | Check that an array contains at most a certain number of elements -`countBetween($array, $min, $max, $message = '')` | Check that an array has a count in the given range -`isList($array, $message = '')` | Check that an array is a non-associative list -`isNonEmptyList($array, $message = '')` | Check that an array is a non-associative list, and not empty -`isMap($array, $message = '')` | Check that an array is associative and has strings as keys -`isNonEmptyMap($array, $message = '')` | Check that an array is associative and has strings as keys, and is not empty - -### Function Assertions - -Method | Description -------------------------------------------- | ----------------------------------------------------------------------------------------------------- -`throws($closure, $class, $message = '')` | Check that a function throws a certain exception. Subclasses of the exception class will be accepted. - -### Collection Assertions - -All of the above assertions can be prefixed with `all*()` to test the contents -of an array or a `\Traversable`: - -```php -Assert::allIsInstanceOf($employees, 'Acme\Employee'); -``` - -### Nullable Assertions - -All of the above assertions can be prefixed with `nullOr*()` to run the -assertion only if it the value is not `null`: - -```php -Assert::nullOrString($middleName, 'The middle name must be a string or null. Got: %s'); -``` - -### Extending Assert - -The `Assert` class comes with a few methods, which can be overridden to change the class behaviour. You can also extend it to -add your own assertions. - -#### Overriding methods - -Overriding the following methods in your assertion class allows you to change the behaviour of the assertions: - -* `public static function __callStatic($name, $arguments)` - * This method is used to 'create' the `nullOr` and `all` versions of the assertions. -* `protected static function valueToString($value)` - * This method is used for error messages, to convert the value to a string value for displaying. You could use this for representing a value object with a `__toString` method for example. -* `protected static function typeToString($value)` - * This method is used for error messages, to convert the a value to a string representing its type. -* `protected static function strlen($value)` - * This method is used to calculate string length for relevant methods, using the `mb_strlen` if available and useful. -* `protected static function reportInvalidArgument($message)` - * This method is called when an assertion fails, with the specified error message. Here you can throw your own exception, or log something. - -## Static analysis support - -Where applicable, assertion functions are annotated to support Psalm's -[Assertion syntax](https://psalm.dev/docs/annotating_code/assertion_syntax/). -A dedicated [PHPStan Plugin](https://github.com/phpstan/phpstan-webmozart-assert) is -required for proper type support. - -Authors -------- - -* [Bernhard Schussek] a.k.a. [@webmozart] -* [The Community Contributors] - -Contribute ----------- - -Contributions to the package are always welcome! - -* Report any bugs or issues you find on the [issue tracker]. -* You can grab the source code at the package's [Git repository]. - -License -------- - -All contents of this package are licensed under the [MIT license]. - -[beberlei/assert]: https://github.com/beberlei/assert -[assert package]: https://github.com/beberlei/assert -[Composer]: https://getcomposer.org -[Bernhard Schussek]: https://webmozarts.com -[The Community Contributors]: https://github.com/webmozart/assert/graphs/contributors -[issue tracker]: https://github.com/webmozart/assert/issues -[Git repository]: https://github.com/webmozart/assert -[@webmozart]: https://twitter.com/webmozart -[MIT license]: LICENSE -[`Assert`]: src/Assert.php diff --git a/lib/webmozart/assert/composer.json b/lib/webmozart/assert/composer.json deleted file mode 100644 index b340452c7..000000000 --- a/lib/webmozart/assert/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "webmozart/assert", - "description": "Assertions to validate method input/output with nice error messages.", - "license": "MIT", - "keywords": [ - "assert", - "check", - "validate" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "require": { - "php": "^7.2 || ^8.0", - "ext-ctype": "*" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Webmozart\\Assert\\Tests\\": "tests/", - "Webmozart\\Assert\\Bin\\": "bin/src" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - } -} diff --git a/lib/webmozart/assert/src/Assert.php b/lib/webmozart/assert/src/Assert.php deleted file mode 100644 index db1f3a51a..000000000 --- a/lib/webmozart/assert/src/Assert.php +++ /dev/null @@ -1,2080 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Webmozart\Assert; - -use ArrayAccess; -use BadMethodCallException; -use Closure; -use Countable; -use DateTime; -use DateTimeImmutable; -use Exception; -use ResourceBundle; -use SimpleXMLElement; -use Throwable; -use Traversable; - -/** - * Efficient assertions to validate the input/output of your methods. - * - * @since 1.0 - * - * @author Bernhard Schussek - */ -class Assert -{ - use Mixin; - - /** - * @psalm-pure - * @psalm-assert string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function string($value, $message = '') - { - if (!\is_string($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a string. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function stringNotEmpty($value, $message = '') - { - static::string($value, $message); - static::notEq($value, '', $message); - } - - /** - * @psalm-pure - * @psalm-assert int $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function integer($value, $message = '') - { - if (!\is_int($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an integer. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function integerish($value, $message = '') - { - if (!\is_numeric($value) || $value != (int) $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an integerish value. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function positiveInteger($value, $message = '') - { - if (!(\is_int($value) && $value > 0)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a positive integer. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert float $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function float($value, $message = '') - { - if (!\is_float($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a float. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function numeric($value, $message = '') - { - if (!\is_numeric($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a numeric. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int|0 $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function natural($value, $message = '') - { - if (!\is_int($value) || $value < 0) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-negative integer. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert bool $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function boolean($value, $message = '') - { - if (!\is_bool($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a boolean. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert scalar $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function scalar($value, $message = '') - { - if (!\is_scalar($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a scalar. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert object $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function object($value, $message = '') - { - if (!\is_object($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an object. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert resource $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function resource($value, $type = null, $message = '') - { - if (!\is_resource($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a resource. Got: %s', - static::typeToString($value) - )); - } - - if ($type && $type !== \get_resource_type($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a resource of type %2$s. Got: %s', - static::typeToString($value), - $type - )); - } - } - - /** - * @psalm-pure - * @psalm-assert callable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isCallable($value, $message = '') - { - if (!\is_callable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a callable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert array $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isArray($value, $message = '') - { - if (!\is_array($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isTraversable($value, $message = '') - { - @\trigger_error( - \sprintf( - 'The "%s" assertion is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "isIterable" or "isInstanceOf" instead.', - __METHOD__ - ), - \E_USER_DEPRECATED - ); - - if (!\is_array($value) && !($value instanceof Traversable)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a traversable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert array|ArrayAccess $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isArrayAccessible($value, $message = '') - { - if (!\is_array($value) && !($value instanceof ArrayAccess)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array accessible. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert countable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isCountable($value, $message = '') - { - if ( - !\is_array($value) - && !($value instanceof Countable) - && !($value instanceof ResourceBundle) - && !($value instanceof SimpleXMLElement) - ) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a countable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isIterable($value, $message = '') - { - if (!\is_array($value) && !($value instanceof Traversable)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an iterable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isInstanceOf($value, $class, $message = '') - { - if (!($value instanceof $class)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance of %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert !ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notInstanceOf($value, $class, $message = '') - { - if ($value instanceof $class) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance other than %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isInstanceOfAny($value, array $classes, $message = '') - { - foreach ($classes as $class) { - if ($value instanceof $class) { - return; - } - } - - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance of any of %2$s. Got: %s', - static::typeToString($value), - \implode(', ', \array_map(array(static::class, 'valueToString'), $classes)) - )); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|class-string $value - * - * @param object|string $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isAOf($value, $class, $message = '') - { - static::string($class, 'Expected class as a string. Got: %s'); - - if (!\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s', - static::valueToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * @psalm-assert !UnexpectedType $value - * @psalm-assert !class-string $value - * - * @param object|string $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNotA($value, $class, $message = '') - { - static::string($class, 'Expected class as a string. Got: %s'); - - if (\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s', - static::valueToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param object|string $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isAnyOf($value, array $classes, $message = '') - { - foreach ($classes as $class) { - static::string($class, 'Expected class as a string. Got: %s'); - - if (\is_a($value, $class, \is_string($value))) { - return; - } - } - - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s', - static::valueToString($value), - \implode(', ', $classes) - )); - } - - /** - * @psalm-pure - * @psalm-assert empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isEmpty($value, $message = '') - { - if (!empty($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an empty value. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEmpty($value, $message = '') - { - if (empty($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-empty value. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function null($value, $message = '') - { - if (null !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected null. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notNull($value, $message = '') - { - if (null === $value) { - static::reportInvalidArgument( - $message ?: 'Expected a value other than null.' - ); - } - } - - /** - * @psalm-pure - * @psalm-assert true $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function true($value, $message = '') - { - if (true !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be true. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert false $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function false($value, $message = '') - { - if (false !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be false. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !false $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notFalse($value, $message = '') - { - if (false === $value) { - static::reportInvalidArgument( - $message ?: 'Expected a value other than false.' - ); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ip($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IP. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ipv4($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IPv4. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ipv6($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IPv6. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function email($value, $message = '') - { - if (false === \filter_var($value, FILTER_VALIDATE_EMAIL)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be a valid e-mail address. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. - * - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function uniqueValues(array $values, $message = '') - { - $allValues = \count($values); - $uniqueValues = \count(\array_unique($values)); - - if ($allValues !== $uniqueValues) { - $difference = $allValues - $uniqueValues; - - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array of unique values, but %s of them %s duplicated', - $difference, - (1 === $difference ? 'is' : 'are') - )); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function eq($value, $expect, $message = '') - { - if ($expect != $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($expect) - )); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEq($value, $expect, $message = '') - { - if ($expect == $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a different value than %s.', - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function same($value, $expect, $message = '') - { - if ($expect !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value identical to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notSame($value, $expect, $message = '') - { - if ($expect === $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not identical to %s.', - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function greaterThan($value, $limit, $message = '') - { - if ($value <= $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value greater than %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function greaterThanEq($value, $limit, $message = '') - { - if ($value < $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value greater than or equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lessThan($value, $limit, $message = '') - { - if ($value >= $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value less than %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lessThanEq($value, $limit, $message = '') - { - if ($value > $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value less than or equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * Inclusive range, so Assert::(3, 3, 5) passes. - * - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function range($value, $min, $max, $message = '') - { - if ($value < $min || $value > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value between %2$s and %3$s. Got: %s', - static::valueToString($value), - static::valueToString($min), - static::valueToString($max) - )); - } - } - - /** - * A more human-readable alias of Assert::inArray(). - * - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function oneOf($value, array $values, $message = '') - { - static::inArray($value, $values, $message); - } - - /** - * Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. - * - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function inArray($value, array $values, $message = '') - { - if (!\in_array($value, $values, true)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected one of: %2$s. Got: %s', - static::valueToString($value), - \implode(', ', \array_map(array(static::class, 'valueToString'), $values)) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function contains($value, $subString, $message = '') - { - if (false === \strpos($value, $subString)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain %2$s. Got: %s', - static::valueToString($value), - static::valueToString($subString) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notContains($value, $subString, $message = '') - { - if (false !== \strpos($value, $subString)) { - static::reportInvalidArgument(\sprintf( - $message ?: '%2$s was not expected to be contained in a value. Got: %s', - static::valueToString($value), - static::valueToString($subString) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notWhitespaceOnly($value, $message = '') - { - if (\preg_match('/^\s*$/', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-whitespace string. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function startsWith($value, $prefix, $message = '') - { - if (0 !== \strpos($value, $prefix)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to start with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($prefix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notStartsWith($value, $prefix, $message = '') - { - if (0 === \strpos($value, $prefix)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not to start with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($prefix) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function startsWithLetter($value, $message = '') - { - static::string($value); - - $valid = isset($value[0]); - - if ($valid) { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = \ctype_alpha($value[0]); - \setlocale(LC_CTYPE, $locale); - } - - if (!$valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to start with a letter. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function endsWith($value, $suffix, $message = '') - { - if ($suffix !== \substr($value, -\strlen($suffix))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to end with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($suffix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEndsWith($value, $suffix, $message = '') - { - if ($suffix === \substr($value, -\strlen($suffix))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not to end with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($suffix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function regex($value, $pattern, $message = '') - { - if (!\preg_match($pattern, $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The value %s does not match the expected pattern.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notRegex($value, $pattern, $message = '') - { - if (\preg_match($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The value %s matches the pattern %s (at offset %d).', - static::valueToString($value), - static::valueToString($pattern), - $matches[0][1] - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function unicodeLetters($value, $message = '') - { - static::string($value); - - if (!\preg_match('/^\p{L}+$/u', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain only Unicode letters. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function alpha($value, $message = '') - { - static::string($value); - - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_alpha($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain only letters. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function digits($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_digit($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain digits only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function alnum($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_alnum($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain letters and digits only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert lowercase-string $value - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lower($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_lower($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain lowercase characters only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !lowercase-string $value - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function upper($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_upper($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain uppercase characters only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function length($value, $length, $message = '') - { - if ($length !== static::strlen($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain %2$s characters. Got: %s', - static::valueToString($value), - $length - )); - } - } - - /** - * Inclusive min. - * - * @psalm-pure - * - * @param string $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function minLength($value, $min, $message = '') - { - if (static::strlen($value) < $min) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain at least %2$s characters. Got: %s', - static::valueToString($value), - $min - )); - } - } - - /** - * Inclusive max. - * - * @psalm-pure - * - * @param string $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function maxLength($value, $max, $message = '') - { - if (static::strlen($value) > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain at most %2$s characters. Got: %s', - static::valueToString($value), - $max - )); - } - } - - /** - * Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. - * - * @psalm-pure - * - * @param string $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lengthBetween($value, $min, $max, $message = '') - { - $length = static::strlen($value); - - if ($length < $min || $length > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s', - static::valueToString($value), - $min, - $max - )); - } - } - - /** - * Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function fileExists($value, $message = '') - { - static::string($value); - - if (!\file_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The file %s does not exist.', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function file($value, $message = '') - { - static::fileExists($value, $message); - - if (!\is_file($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not a file.', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function directory($value, $message = '') - { - static::fileExists($value, $message); - - if (!\is_dir($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is no directory.', - static::valueToString($value) - )); - } - } - - /** - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function readable($value, $message = '') - { - if (!\is_readable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not readable.', - static::valueToString($value) - )); - } - } - - /** - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function writable($value, $message = '') - { - if (!\is_writable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not writable.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-assert class-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function classExists($value, $message = '') - { - if (!\class_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an existing class name. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert class-string|ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function subclassOf($value, $class, $message = '') - { - if (!\is_subclass_of($value, $class)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a sub-class of %2$s. Got: %s', - static::valueToString($value), - static::valueToString($class) - )); - } - } - - /** - * @psalm-assert class-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function interfaceExists($value, $message = '') - { - if (!\interface_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an existing interface name. got %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert class-string $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function implementsInterface($value, $interface, $message = '') - { - if (!\in_array($interface, \class_implements($value))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an implementation of %2$s. Got: %s', - static::valueToString($value), - static::valueToString($interface) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function propertyExists($classOrObject, $property, $message = '') - { - if (!\property_exists($classOrObject, $property)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the property %s to exist.', - static::valueToString($property) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function propertyNotExists($classOrObject, $property, $message = '') - { - if (\property_exists($classOrObject, $property)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the property %s to not exist.', - static::valueToString($property) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function methodExists($classOrObject, $method, $message = '') - { - if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the method %s to exist.', - static::valueToString($method) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function methodNotExists($classOrObject, $method, $message = '') - { - if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the method %s to not exist.', - static::valueToString($method) - )); - } - } - - /** - * @psalm-pure - * - * @param array $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function keyExists($array, $key, $message = '') - { - if (!(isset($array[$key]) || \array_key_exists($key, $array))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the key %s to exist.', - static::valueToString($key) - )); - } - } - - /** - * @psalm-pure - * - * @param array $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function keyNotExists($array, $key, $message = '') - { - if (isset($array[$key]) || \array_key_exists($key, $array)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the key %s to not exist.', - static::valueToString($key) - )); - } - } - - /** - * Checks if a value is a valid array key (int or string). - * - * @psalm-pure - * @psalm-assert array-key $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function validArrayKey($value, $message = '') - { - if (!(\is_int($value) || \is_string($value))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected string or integer. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function count($array, $number, $message = '') - { - static::eq( - \count($array), - $number, - \sprintf( - $message ?: 'Expected an array to contain %d elements. Got: %d.', - $number, - \count($array) - ) - ); - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function minCount($array, $min, $message = '') - { - if (\count($array) < $min) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain at least %2$d elements. Got: %d', - \count($array), - $min - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function maxCount($array, $max, $message = '') - { - if (\count($array) > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain at most %2$d elements. Got: %d', - \count($array), - $max - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function countBetween($array, $min, $max, $message = '') - { - $count = \count($array); - - if ($count < $min || $count > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain between %2$d and %3$d elements. Got: %d', - $count, - $min, - $max - )); - } - } - - /** - * @psalm-pure - * @psalm-assert list $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isList($array, $message = '') - { - if (!\is_array($array)) { - static::reportInvalidArgument( - $message ?: 'Expected list - non-associative array.' - ); - } - - if ($array === \array_values($array)) { - return; - } - - $nextKey = -1; - foreach ($array as $k => $v) { - if ($k !== ++$nextKey) { - static::reportInvalidArgument( - $message ?: 'Expected list - non-associative array.' - ); - } - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-list $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNonEmptyList($array, $message = '') - { - static::isList($array, $message); - static::notEmpty($array, $message); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array $array - * @psalm-assert array $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isMap($array, $message = '') - { - if ( - !\is_array($array) || - \array_keys($array) !== \array_filter(\array_keys($array), '\is_string') - ) { - static::reportInvalidArgument( - $message ?: 'Expected map - associative array with string keys.' - ); - } - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array $array - * @psalm-assert array $array - * @psalm-assert !empty $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNonEmptyMap($array, $message = '') - { - static::isMap($array, $message); - static::notEmpty($array, $message); - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function uuid($value, $message = '') - { - $value = \str_replace(array('urn:', 'uuid:', '{', '}'), '', $value); - - // The nil UUID is special form of UUID that is specified to have all - // 128 bits set to zero. - if ('00000000-0000-0000-0000-000000000000' === $value) { - return; - } - - if (!\preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Value %s is not a valid UUID.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-param class-string $class - * - * @param Closure $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function throws(Closure $expression, $class = 'Exception', $message = '') - { - static::string($class); - - $actual = 'none'; - - try { - $expression(); - } catch (Exception $e) { - $actual = \get_class($e); - if ($e instanceof $class) { - return; - } - } catch (Throwable $e) { - $actual = \get_class($e); - if ($e instanceof $class) { - return; - } - } - - static::reportInvalidArgument($message ?: \sprintf( - 'Expected to throw "%s", got "%s"', - $class, - $actual - )); - } - - /** - * @throws BadMethodCallException - */ - public static function __callStatic($name, $arguments) - { - if ('nullOr' === \substr($name, 0, 6)) { - if (null !== $arguments[0]) { - $method = \lcfirst(\substr($name, 6)); - \call_user_func_array(array(static::class, $method), $arguments); - } - - return; - } - - if ('all' === \substr($name, 0, 3)) { - static::isIterable($arguments[0]); - - $method = \lcfirst(\substr($name, 3)); - $args = $arguments; - - foreach ($arguments[0] as $entry) { - $args[0] = $entry; - - \call_user_func_array(array(static::class, $method), $args); - } - - return; - } - - throw new BadMethodCallException('No such method: '.$name); - } - - /** - * @param mixed $value - * - * @return string - */ - protected static function valueToString($value) - { - if (null === $value) { - return 'null'; - } - - if (true === $value) { - return 'true'; - } - - if (false === $value) { - return 'false'; - } - - if (\is_array($value)) { - return 'array'; - } - - if (\is_object($value)) { - if (\method_exists($value, '__toString')) { - return \get_class($value).': '.self::valueToString($value->__toString()); - } - - if ($value instanceof DateTime || $value instanceof DateTimeImmutable) { - return \get_class($value).': '.self::valueToString($value->format('c')); - } - - return \get_class($value); - } - - if (\is_resource($value)) { - return 'resource'; - } - - if (\is_string($value)) { - return '"'.$value.'"'; - } - - return (string) $value; - } - - /** - * @param mixed $value - * - * @return string - */ - protected static function typeToString($value) - { - return \is_object($value) ? \get_class($value) : \gettype($value); - } - - protected static function strlen($value) - { - if (!\function_exists('mb_detect_encoding')) { - return \strlen($value); - } - - if (false === $encoding = \mb_detect_encoding($value)) { - return \strlen($value); - } - - return \mb_strlen($value, $encoding); - } - - /** - * @param string $message - * - * @throws InvalidArgumentException - * - * @psalm-pure this method is not supposed to perform side-effects - * @psalm-return never - */ - protected static function reportInvalidArgument($message) - { - throw new InvalidArgumentException($message); - } - - private function __construct() - { - } -} diff --git a/lib/webmozart/assert/src/InvalidArgumentException.php b/lib/webmozart/assert/src/InvalidArgumentException.php deleted file mode 100644 index 9d95a58c5..000000000 --- a/lib/webmozart/assert/src/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Webmozart\Assert; - -class InvalidArgumentException extends \InvalidArgumentException -{ -} diff --git a/lib/webmozart/assert/src/Mixin.php b/lib/webmozart/assert/src/Mixin.php deleted file mode 100644 index 0f0a75e33..000000000 --- a/lib/webmozart/assert/src/Mixin.php +++ /dev/null @@ -1,5089 +0,0 @@ - $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allString($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::string($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrString($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::string($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStringNotEmpty($value, $message = '') - { - null === $value || static::stringNotEmpty($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStringNotEmpty($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::stringNotEmpty($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrStringNotEmpty($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::stringNotEmpty($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert int|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInteger($value, $message = '') - { - null === $value || static::integer($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInteger($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::integer($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrInteger($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::integer($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIntegerish($value, $message = '') - { - null === $value || static::integerish($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIntegerish($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::integerish($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIntegerish($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::integerish($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPositiveInteger($value, $message = '') - { - null === $value || static::positiveInteger($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPositiveInteger($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::positiveInteger($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrPositiveInteger($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::positiveInteger($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert float|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFloat($value, $message = '') - { - null === $value || static::float($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFloat($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::float($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrFloat($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::float($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNumeric($value, $message = '') - { - null === $value || static::numeric($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNumeric($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::numeric($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNumeric($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::numeric($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int|0|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNatural($value, $message = '') - { - null === $value || static::natural($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNatural($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::natural($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNatural($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::natural($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert bool|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrBoolean($value, $message = '') - { - null === $value || static::boolean($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allBoolean($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::boolean($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrBoolean($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::boolean($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert scalar|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrScalar($value, $message = '') - { - null === $value || static::scalar($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allScalar($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::scalar($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrScalar($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::scalar($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert object|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrObject($value, $message = '') - { - null === $value || static::object($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allObject($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::object($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrObject($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::object($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert resource|null $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrResource($value, $type = null, $message = '') - { - null === $value || static::resource($value, $type, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allResource($value, $type = null, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::resource($entry, $type, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrResource($value, $type = null, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::resource($entry, $type, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert callable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsCallable($value, $message = '') - { - null === $value || static::isCallable($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsCallable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isCallable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsCallable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isCallable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert array|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsArray($value, $message = '') - { - null === $value || static::isArray($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsArray($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isArray($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsArray($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isArray($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable|null $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsTraversable($value, $message = '') - { - null === $value || static::isTraversable($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsTraversable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isTraversable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsTraversable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isTraversable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert array|ArrayAccess|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsArrayAccessible($value, $message = '') - { - null === $value || static::isArrayAccessible($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsArrayAccessible($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isArrayAccessible($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsArrayAccessible($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isArrayAccessible($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert countable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsCountable($value, $message = '') - { - null === $value || static::isCountable($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsCountable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isCountable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsCountable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isCountable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsIterable($value, $message = '') - { - null === $value || static::isIterable($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsIterable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isIterable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsIterable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isIterable($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|null $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsInstanceOf($value, $class, $message = '') - { - null === $value || static::isInstanceOf($value, $class, $message); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsInstanceOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isInstanceOf($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsInstanceOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isInstanceOf($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotInstanceOf($value, $class, $message = '') - { - null === $value || static::notInstanceOf($value, $class, $message); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotInstanceOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notInstanceOf($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotInstanceOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notInstanceOf($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsInstanceOfAny($value, $classes, $message = '') - { - null === $value || static::isInstanceOfAny($value, $classes, $message); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsInstanceOfAny($value, $classes, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isInstanceOfAny($entry, $classes, $message); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsInstanceOfAny($value, $classes, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isInstanceOfAny($entry, $classes, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|class-string|null $value - * - * @param object|string|null $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsAOf($value, $class, $message = '') - { - null === $value || static::isAOf($value, $class, $message); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable> $value - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsAOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isAOf($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable|null> $value - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsAOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isAOf($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * - * @param object|string|null $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNotA($value, $class, $message = '') - { - null === $value || static::isNotA($value, $class, $message); - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNotA($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isNotA($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable $value - * @psalm-assert iterable|null> $value - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsNotA($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isNotA($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param object|string|null $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsAnyOf($value, $classes, $message = '') - { - null === $value || static::isAnyOf($value, $classes, $message); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param iterable $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsAnyOf($value, $classes, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isAnyOf($entry, $classes, $message); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param iterable $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsAnyOf($value, $classes, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isAnyOf($entry, $classes, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsEmpty($value, $message = '') - { - null === $value || static::isEmpty($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsEmpty($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::isEmpty($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsEmpty($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::isEmpty($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEmpty($value, $message = '') - { - null === $value || static::notEmpty($value, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEmpty($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notEmpty($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotEmpty($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notEmpty($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNull($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::null($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotNull($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notNull($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert true|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrTrue($value, $message = '') - { - null === $value || static::true($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allTrue($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::true($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrTrue($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::true($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert false|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFalse($value, $message = '') - { - null === $value || static::false($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFalse($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::false($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrFalse($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::false($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotFalse($value, $message = '') - { - null === $value || static::notFalse($value, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotFalse($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notFalse($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotFalse($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notFalse($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIp($value, $message = '') - { - null === $value || static::ip($value, $message); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIp($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::ip($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIp($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::ip($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIpv4($value, $message = '') - { - null === $value || static::ipv4($value, $message); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIpv4($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::ipv4($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIpv4($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::ipv4($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIpv6($value, $message = '') - { - null === $value || static::ipv6($value, $message); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIpv6($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::ipv6($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIpv6($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::ipv6($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEmail($value, $message = '') - { - null === $value || static::email($value, $message); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEmail($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::email($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrEmail($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::email($entry, $message); - } - } - - /** - * @param array|null $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUniqueValues($values, $message = '') - { - null === $values || static::uniqueValues($values, $message); - } - - /** - * @param iterable $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUniqueValues($values, $message = '') - { - static::isIterable($values); - - foreach ($values as $entry) { - static::uniqueValues($entry, $message); - } - } - - /** - * @param iterable $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrUniqueValues($values, $message = '') - { - static::isIterable($values); - - foreach ($values as $entry) { - null === $entry || static::uniqueValues($entry, $message); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEq($value, $expect, $message = '') - { - null === $value || static::eq($value, $expect, $message); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEq($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::eq($entry, $expect, $message); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrEq($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::eq($entry, $expect, $message); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEq($value, $expect, $message = '') - { - null === $value || static::notEq($value, $expect, $message); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEq($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notEq($entry, $expect, $message); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotEq($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notEq($entry, $expect, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrSame($value, $expect, $message = '') - { - null === $value || static::same($value, $expect, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allSame($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::same($entry, $expect, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrSame($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::same($entry, $expect, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotSame($value, $expect, $message = '') - { - null === $value || static::notSame($value, $expect, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotSame($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notSame($entry, $expect, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotSame($value, $expect, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notSame($entry, $expect, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrGreaterThan($value, $limit, $message = '') - { - null === $value || static::greaterThan($value, $limit, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allGreaterThan($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::greaterThan($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrGreaterThan($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::greaterThan($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrGreaterThanEq($value, $limit, $message = '') - { - null === $value || static::greaterThanEq($value, $limit, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allGreaterThanEq($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::greaterThanEq($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrGreaterThanEq($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::greaterThanEq($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLessThan($value, $limit, $message = '') - { - null === $value || static::lessThan($value, $limit, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLessThan($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::lessThan($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrLessThan($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::lessThan($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLessThanEq($value, $limit, $message = '') - { - null === $value || static::lessThanEq($value, $limit, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLessThanEq($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::lessThanEq($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrLessThanEq($value, $limit, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::lessThanEq($entry, $limit, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrRange($value, $min, $max, $message = '') - { - null === $value || static::range($value, $min, $max, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allRange($value, $min, $max, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::range($entry, $min, $max, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrRange($value, $min, $max, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::range($entry, $min, $max, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrOneOf($value, $values, $message = '') - { - null === $value || static::oneOf($value, $values, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allOneOf($value, $values, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::oneOf($entry, $values, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrOneOf($value, $values, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::oneOf($entry, $values, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInArray($value, $values, $message = '') - { - null === $value || static::inArray($value, $values, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInArray($value, $values, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::inArray($entry, $values, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrInArray($value, $values, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::inArray($entry, $values, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrContains($value, $subString, $message = '') - { - null === $value || static::contains($value, $subString, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allContains($value, $subString, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::contains($entry, $subString, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrContains($value, $subString, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::contains($entry, $subString, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotContains($value, $subString, $message = '') - { - null === $value || static::notContains($value, $subString, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotContains($value, $subString, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notContains($entry, $subString, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotContains($value, $subString, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notContains($entry, $subString, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotWhitespaceOnly($value, $message = '') - { - null === $value || static::notWhitespaceOnly($value, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotWhitespaceOnly($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notWhitespaceOnly($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotWhitespaceOnly($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notWhitespaceOnly($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStartsWith($value, $prefix, $message = '') - { - null === $value || static::startsWith($value, $prefix, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStartsWith($value, $prefix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::startsWith($entry, $prefix, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrStartsWith($value, $prefix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::startsWith($entry, $prefix, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotStartsWith($value, $prefix, $message = '') - { - null === $value || static::notStartsWith($value, $prefix, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotStartsWith($value, $prefix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notStartsWith($entry, $prefix, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotStartsWith($value, $prefix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notStartsWith($entry, $prefix, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStartsWithLetter($value, $message = '') - { - null === $value || static::startsWithLetter($value, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStartsWithLetter($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::startsWithLetter($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrStartsWithLetter($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::startsWithLetter($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEndsWith($value, $suffix, $message = '') - { - null === $value || static::endsWith($value, $suffix, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEndsWith($value, $suffix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::endsWith($entry, $suffix, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrEndsWith($value, $suffix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::endsWith($entry, $suffix, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEndsWith($value, $suffix, $message = '') - { - null === $value || static::notEndsWith($value, $suffix, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEndsWith($value, $suffix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notEndsWith($entry, $suffix, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotEndsWith($value, $suffix, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notEndsWith($entry, $suffix, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrRegex($value, $pattern, $message = '') - { - null === $value || static::regex($value, $pattern, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allRegex($value, $pattern, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::regex($entry, $pattern, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrRegex($value, $pattern, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::regex($entry, $pattern, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotRegex($value, $pattern, $message = '') - { - null === $value || static::notRegex($value, $pattern, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotRegex($value, $pattern, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::notRegex($entry, $pattern, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrNotRegex($value, $pattern, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::notRegex($entry, $pattern, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUnicodeLetters($value, $message = '') - { - null === $value || static::unicodeLetters($value, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUnicodeLetters($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::unicodeLetters($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrUnicodeLetters($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::unicodeLetters($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrAlpha($value, $message = '') - { - null === $value || static::alpha($value, $message); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allAlpha($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::alpha($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrAlpha($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::alpha($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrDigits($value, $message = '') - { - null === $value || static::digits($value, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allDigits($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::digits($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrDigits($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::digits($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrAlnum($value, $message = '') - { - null === $value || static::alnum($value, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allAlnum($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::alnum($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrAlnum($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::alnum($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert lowercase-string|null $value - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLower($value, $message = '') - { - null === $value || static::lower($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLower($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::lower($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrLower($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::lower($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUpper($value, $message = '') - { - null === $value || static::upper($value, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUpper($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::upper($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrUpper($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::upper($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLength($value, $length, $message = '') - { - null === $value || static::length($value, $length, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLength($value, $length, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::length($entry, $length, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrLength($value, $length, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::length($entry, $length, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMinLength($value, $min, $message = '') - { - null === $value || static::minLength($value, $min, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMinLength($value, $min, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::minLength($entry, $min, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrMinLength($value, $min, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::minLength($entry, $min, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMaxLength($value, $max, $message = '') - { - null === $value || static::maxLength($value, $max, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMaxLength($value, $max, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::maxLength($entry, $max, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrMaxLength($value, $max, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::maxLength($entry, $max, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLengthBetween($value, $min, $max, $message = '') - { - null === $value || static::lengthBetween($value, $min, $max, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLengthBetween($value, $min, $max, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::lengthBetween($entry, $min, $max, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrLengthBetween($value, $min, $max, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::lengthBetween($entry, $min, $max, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFileExists($value, $message = '') - { - null === $value || static::fileExists($value, $message); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFileExists($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::fileExists($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrFileExists($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::fileExists($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFile($value, $message = '') - { - null === $value || static::file($value, $message); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFile($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::file($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrFile($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::file($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrDirectory($value, $message = '') - { - null === $value || static::directory($value, $message); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allDirectory($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::directory($entry, $message); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrDirectory($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::directory($entry, $message); - } - } - - /** - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrReadable($value, $message = '') - { - null === $value || static::readable($value, $message); - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allReadable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::readable($entry, $message); - } - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrReadable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::readable($entry, $message); - } - } - - /** - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrWritable($value, $message = '') - { - null === $value || static::writable($value, $message); - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allWritable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::writable($entry, $message); - } - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrWritable($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::writable($entry, $message); - } - } - - /** - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrClassExists($value, $message = '') - { - null === $value || static::classExists($value, $message); - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allClassExists($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::classExists($entry, $message); - } - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrClassExists($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::classExists($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert class-string|ExpectedType|null $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrSubclassOf($value, $class, $message = '') - { - null === $value || static::subclassOf($value, $class, $message); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable|ExpectedType> $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allSubclassOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::subclassOf($entry, $class, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable|ExpectedType|null> $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrSubclassOf($value, $class, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::subclassOf($entry, $class, $message); - } - } - - /** - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInterfaceExists($value, $message = '') - { - null === $value || static::interfaceExists($value, $message); - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInterfaceExists($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::interfaceExists($entry, $message); - } - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrInterfaceExists($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::interfaceExists($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrImplementsInterface($value, $interface, $message = '') - { - null === $value || static::implementsInterface($value, $interface, $message); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert iterable> $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allImplementsInterface($value, $interface, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::implementsInterface($entry, $interface, $message); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert iterable|null> $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrImplementsInterface($value, $interface, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::implementsInterface($entry, $interface, $message); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPropertyExists($classOrObject, $property, $message = '') - { - null === $classOrObject || static::propertyExists($classOrObject, $property, $message); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPropertyExists($classOrObject, $property, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - static::propertyExists($entry, $property, $message); - } - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrPropertyExists($classOrObject, $property, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - null === $entry || static::propertyExists($entry, $property, $message); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPropertyNotExists($classOrObject, $property, $message = '') - { - null === $classOrObject || static::propertyNotExists($classOrObject, $property, $message); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPropertyNotExists($classOrObject, $property, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - static::propertyNotExists($entry, $property, $message); - } - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrPropertyNotExists($classOrObject, $property, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - null === $entry || static::propertyNotExists($entry, $property, $message); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMethodExists($classOrObject, $method, $message = '') - { - null === $classOrObject || static::methodExists($classOrObject, $method, $message); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMethodExists($classOrObject, $method, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - static::methodExists($entry, $method, $message); - } - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrMethodExists($classOrObject, $method, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - null === $entry || static::methodExists($entry, $method, $message); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMethodNotExists($classOrObject, $method, $message = '') - { - null === $classOrObject || static::methodNotExists($classOrObject, $method, $message); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMethodNotExists($classOrObject, $method, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - static::methodNotExists($entry, $method, $message); - } - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrMethodNotExists($classOrObject, $method, $message = '') - { - static::isIterable($classOrObject); - - foreach ($classOrObject as $entry) { - null === $entry || static::methodNotExists($entry, $method, $message); - } - } - - /** - * @psalm-pure - * - * @param array|null $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrKeyExists($array, $key, $message = '') - { - null === $array || static::keyExists($array, $key, $message); - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allKeyExists($array, $key, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::keyExists($entry, $key, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrKeyExists($array, $key, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::keyExists($entry, $key, $message); - } - } - - /** - * @psalm-pure - * - * @param array|null $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrKeyNotExists($array, $key, $message = '') - { - null === $array || static::keyNotExists($array, $key, $message); - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allKeyNotExists($array, $key, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::keyNotExists($entry, $key, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrKeyNotExists($array, $key, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::keyNotExists($entry, $key, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert array-key|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrValidArrayKey($value, $message = '') - { - null === $value || static::validArrayKey($value, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allValidArrayKey($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::validArrayKey($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrValidArrayKey($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::validArrayKey($entry, $message); - } - } - - /** - * @param Countable|array|null $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrCount($array, $number, $message = '') - { - null === $array || static::count($array, $number, $message); - } - - /** - * @param iterable $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allCount($array, $number, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::count($entry, $number, $message); - } - } - - /** - * @param iterable $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrCount($array, $number, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::count($entry, $number, $message); - } - } - - /** - * @param Countable|array|null $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMinCount($array, $min, $message = '') - { - null === $array || static::minCount($array, $min, $message); - } - - /** - * @param iterable $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMinCount($array, $min, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::minCount($entry, $min, $message); - } - } - - /** - * @param iterable $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrMinCount($array, $min, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::minCount($entry, $min, $message); - } - } - - /** - * @param Countable|array|null $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMaxCount($array, $max, $message = '') - { - null === $array || static::maxCount($array, $max, $message); - } - - /** - * @param iterable $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMaxCount($array, $max, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::maxCount($entry, $max, $message); - } - } - - /** - * @param iterable $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrMaxCount($array, $max, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::maxCount($entry, $max, $message); - } - } - - /** - * @param Countable|array|null $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrCountBetween($array, $min, $max, $message = '') - { - null === $array || static::countBetween($array, $min, $max, $message); - } - - /** - * @param iterable $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allCountBetween($array, $min, $max, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::countBetween($entry, $min, $max, $message); - } - } - - /** - * @param iterable $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrCountBetween($array, $min, $max, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::countBetween($entry, $min, $max, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert list|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsList($array, $message = '') - { - null === $array || static::isList($array, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsList($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::isList($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsList($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::isList($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-list|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNonEmptyList($array, $message = '') - { - null === $array || static::isNonEmptyList($array, $message); - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNonEmptyList($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::isNonEmptyList($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsNonEmptyList($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::isNonEmptyList($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array|null $array - * @psalm-assert array|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsMap($array, $message = '') - { - null === $array || static::isMap($array, $message); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable> $array - * @psalm-assert iterable> $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsMap($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::isMap($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable|null> $array - * @psalm-assert iterable|null> $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsMap($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::isMap($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNonEmptyMap($array, $message = '') - { - null === $array || static::isNonEmptyMap($array, $message); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable> $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNonEmptyMap($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - static::isNonEmptyMap($entry, $message); - } - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable|null> $array - * @psalm-assert iterable|null> $array - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrIsNonEmptyMap($array, $message = '') - { - static::isIterable($array); - - foreach ($array as $entry) { - null === $entry || static::isNonEmptyMap($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUuid($value, $message = '') - { - null === $value || static::uuid($value, $message); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUuid($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - static::uuid($entry, $message); - } - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrUuid($value, $message = '') - { - static::isIterable($value); - - foreach ($value as $entry) { - null === $entry || static::uuid($entry, $message); - } - } - - /** - * @psalm-param class-string $class - * - * @param Closure|null $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrThrows($expression, $class = 'Exception', $message = '') - { - null === $expression || static::throws($expression, $class, $message); - } - - /** - * @psalm-param class-string $class - * - * @param iterable $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allThrows($expression, $class = 'Exception', $message = '') - { - static::isIterable($expression); - - foreach ($expression as $entry) { - static::throws($entry, $class, $message); - } - } - - /** - * @psalm-param class-string $class - * - * @param iterable $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNullOrThrows($expression, $class = 'Exception', $message = '') - { - static::isIterable($expression); - - foreach ($expression as $entry) { - null === $entry || static::throws($entry, $class, $message); - } - } -} diff --git a/sources/DI/Controller/Controller.php b/sources/DI/Controller/Controller.php index c34630b99..1db7cc5cc 100644 --- a/sources/DI/Controller/Controller.php +++ b/sources/DI/Controller/Controller.php @@ -2,16 +2,18 @@ namespace Combodo\iTop\DI\Controller; -use Combodo\iTop\DI\Form\Type\ConfigurationType; -use Combodo\iTop\DI\Form\Type\ObjectType; -use Combodo\iTop\DI\Form\Type\ObjectSingleAttributeType; +use Combodo\iTop\DI\Form\Type\Compound\ConfigurationType; +use Combodo\iTop\DI\Form\Type\Compound\ObjectSingleAttributeType; +use Combodo\iTop\DI\Form\Type\Compound\ObjectType; use Combodo\iTop\DI\Services\ObjectService; use Exception; use MetaModel; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\Routing\Annotation\Route; class Controller extends AbstractController @@ -38,7 +40,7 @@ class Controller extends AbstractController */ public function objectView(string $class, int $id) : Response { - // retrieve person + // retrieve object try{ $oObject = MetaModel::GetObject($class, $id); } @@ -46,7 +48,7 @@ class Controller extends AbstractController throw $this->createNotFoundException("The $class $id does not exist"); } - // return person view + // return object view return $this->render('DI/object/view.html.twig', [ 'id' => $id, 'class' => $class, @@ -59,7 +61,7 @@ class Controller extends AbstractController */ public function objectJSon(string $class, int $id) : Response { - // retrieve person + // retrieve object try{ $oObject = MetaModel::GetObject($class, $id); } @@ -67,7 +69,7 @@ class Controller extends AbstractController throw $this->createNotFoundException("The $class $id does not exist"); } - // return person as json response + // return object as json response $oResponse = new JsonResponse($oObject->GetValues()); $oResponse->setEncodingOptions($oResponse->getEncodingOptions() | JSON_PRETTY_PRINT); return $oResponse; @@ -78,14 +80,9 @@ class Controller extends AbstractController */ public function objectEdit(Request $request, string $class, int $id, ObjectService $oObjectService) : Response { - // retrieve person + // retrieve object try{ - if($id !== 0){ - $oObject = MetaModel::GetObject($class, $id); - } - else{ - $oObject = MetaModel::NewObject($class); - } + $oObject= $oObjectService->getObject($class, $id); } catch(Exception $e){ throw $this->createNotFoundException("The $class $id does not exist"); @@ -93,7 +90,10 @@ class Controller extends AbstractController // create object form $oForm = $this->createForm(ObjectType::class, $oObject, [ - 'object_class' => $class + 'object_class' => $class, + 'attr' => [ + 'data-reload-url' => $this->generateUrl('object_reload', ['class' => $class, "id" => $id]) + ] ]); // handle HTTP request @@ -105,11 +105,16 @@ class Controller extends AbstractController // retrieve object $oObject = $oForm->getData(); - // handle link set (apply DbInsert, DbDelete, DbUpdate) could be automatic ? - $oObjectService->handleLinkSetDB($oObject); + try { + // handle link set (apply DbInsert, DbDelete, DbUpdate) could be automatic ? + $oObjectService->handleLinkSetDB($oObject); - // save object - $oObject->DBUpdate(); + // save object + $oObject->DBUpdate(); + } + catch(Exception $e){ + throw new HttpException(500, 'Error while trying to save object'); + } // redirect to view object return $this->redirectToRoute('object_view', [ @@ -118,35 +123,94 @@ class Controller extends AbstractController ]); } - // return person edition form + // return object edition form return $this->renderForm('DI/object/edit.html.twig', [ 'id' => $id, 'class' => $class, 'form' => $oForm, - 'reload_url' => $this->generateUrl('object_reload', ['class' => $class, "id" => $id]), 'db_host' => $oObjectService->getDbHost(), 'db_name' => $oObjectService->getDbName() ]); } + /** + * @Route("/{class<\w+>}/{id<\d+>}/{name<\w+>}/form", name="object_form", methods={"POST"}) + */ + public function objectForm(Request $request, string $name, string $class, int $id, ObjectService $oObjectService, FormFactoryInterface $oFormFactory) : Response + { + // retrieve object + try{ + $oObject= $oObjectService->getObject($class, $id); + } + catch(Exception $e){ + throw $this->createNotFoundException("The $class $id does not exist"); + } + + // decode data + $aData = json_decode($request->getContent(), true); + + // create object form + $oForm = $oFormFactory->createNamed($name, ObjectType::class, $oObject, [ + 'object_class' => $class, + 'locked_attributes' => $aData['locked_attributes'], + 'attr' => [ + 'data-reload-url' => $this->generateUrl('object_reload', [ + 'class' => $class, + 'id' => $id + ]) + ] + ]); + + // handle HTTP request + $oForm->handleRequest($request); + + // submitted and valid + if ($oForm->isSubmitted() && $oForm->isValid()) { + + // retrieve object + $oObject = $oForm->getData(); + + try { + // handle link set (apply DbInsert, DbDelete, DbUpdate) could be automatic ? + $oObjectService->handleLinkSetDB($oObject); + + // save object + $oObject->DBUpdate(); + } + catch(Exception $e){ + throw new HttpException(500, 'Error while trying to save object'); + } + + // redirect to view object + return new JsonResponse(); + } + + // return object form + return new JsonResponse([ + 'template' => $this->renderView('DI/form.html.twig', [ + 'id' => $id, + 'class' => $class, + 'form' => $oForm->createView(), + ]) + ]); + } /** * @Route("/{class<\w+>}/{id<\d+>}/reload", name="object_reload") */ - public function objectReload(Request $request, string $class, int $id) : Response + public function objectReload(Request $request, string $class, int $id, ObjectService $oObjectService) : Response { - // retrieve person + // retrieve object try{ - $oObject = MetaModel::GetObject($class, $id); + $oObject= $oObjectService->getObject($class, $id); } catch(Exception $e){ throw $this->createNotFoundException("The $class $id does not exist"); } // create form with request data (dependent field) - $oForm = $this->createForm(ObjectSingleAttributeType::class, $oObject, [ + $oForm = $this->createForm(ObjectType::class, $oObject, [ 'object_class' => $class, - 'att_code' => $request->get('dependency_att_code') ]); // handle form data @@ -161,8 +225,8 @@ class Controller extends AbstractController 'att_code' => $request->get('att_code') ]); - // return person edition form - return $this->renderForm('DI/object/object_single_attribute.html.twig', [ + // return object form + return $this->renderForm('DI/form.html.twig', [ 'form' => $oForm, ]); } @@ -178,7 +242,7 @@ class Controller extends AbstractController // handle HTTP request $oForm->handleRequest($request); - // return person edition form + // return object form return $this->renderForm('DI/configuration/edit.html.twig', [ 'form' => $oForm ]); diff --git a/sources/DI/Form/Builder/AttributeBuilder.php b/sources/DI/Form/Builder/AttributeBuilder.php new file mode 100644 index 000000000..c87110e76 --- /dev/null +++ b/sources/DI/Form/Builder/AttributeBuilder.php @@ -0,0 +1,195 @@ +oObjectService = $oObjectService; + } + + /** + * Map AttributeDefinition >> FormType + * + * @param string $sObjectClass + * @param string $sCode + * @param array|null $lockedAttributes + * + * @return array|null + * @throws \CoreException + */ + public function createAttribute(string $sObjectClass, string $sCode, ?array $lockedAttributes) : ?array + { + // load attribute definition + try { + $oAttributeDefinition = MetaModel::GetAttributeDef($sObjectClass, $sCode); + $sLabel = $oAttributeDefinition->GetLabel(); + } + catch(Exception $e){ + return null; + } + + // locked state + $bIsLocked = $lockedAttributes !== null && array_key_exists($sCode, $lockedAttributes); + + // create global form type (default as text) + $aFormType = [ + 'type' => TextType::class, + 'label' => $sLabel, + 'options' => [ + 'required' => !$oAttributeDefinition->IsNullAllowed(), + 'disabled' => !$oAttributeDefinition->IsWritable() || $bIsLocked, + 'attr' => [ + 'data-att-code' => $sCode + ], + 'row_attr' => [ + 'data-block' => 'container' + ], + 'label_attr' => [ + 'class' => $bIsLocked ? 'locked' : '' + ] + ] + ]; + + // register dependencies + if(count($oAttributeDefinition->GetPrerequisiteAttributes()) > 0){ + $dependencies = implode(' ', $oAttributeDefinition->GetPrerequisiteAttributes()); + $aFormType['options']['attr']['data-depends-on'] = $dependencies; + $aFormType['depends_on'] = $dependencies; + } + + // inject corresponding configuration + if($oAttributeDefinition instanceof AttributeExternalKey){ + $aFormType['type'] = ExternalKeyType::class; + $aFormType['options']['allow_target_creation'] = $oAttributeDefinition->AllowTargetCreation(); + $aFormType['options']['object_class'] = $oAttributeDefinition->GetTargetClass(); + $aFormType['options']['att_code'] = $oAttributeDefinition->GetCode(); + try{ + $oObjectsSet = MetaModel::GetAllowedValuesAsObjectSet($oAttributeDefinition->GetHostClass(), $oAttributeDefinition->GetCode(), []); + $aFormType['options']['choices'] = $this->oObjectService->ToChoices($oObjectsSet); + } + catch(Exception $e){ + + } + } + else if($oAttributeDefinition instanceof AttributeExternalField){ + $aFormType['type'] = ExternalFieldType::class; + $bIsExternalKey = $oAttributeDefinition->IsExternalKey(EXTKEY_ABSOLUTE); + if($bIsExternalKey){ + $aFormType['options']['is_external_key'] = true; + $aFormType['options']['object_class'] = $oAttributeDefinition->GetExtAttDef()->GetTargetClass(); + } + } + else if($oAttributeDefinition instanceof AttributeEmailAddress){ + $aFormType['type'] = EmailType::class; + } + else if($oAttributeDefinition instanceof AttributePassword){ + $aFormType['type'] = PasswordType::class; + } + else if($oAttributeDefinition instanceof AttributePhoneNumber){ + $aFormType['type'] = TelType::class; + $aFormType['options']['attr'] = [ + 'pattern' => '\+[0-9]{2}\s[0-9]\s[0-9]{2}\s[0-9]{2}\s[0-9]{2}\s[0-9]{2}', + 'placeholder' => '+-- - -- -- --' + ]; + } + else if($oAttributeDefinition instanceof AttributeBoolean){ + $aFormType['type'] = CheckboxType::class; + } + else if($oAttributeDefinition instanceof AttributeEnum){ + $aFormType['type'] = ChoiceType::class; + try{ + $aOptions = array_flip($oAttributeDefinition->GetAllowedValues()); + } + catch(Exception $e){ + $aOptions = []; + } + $aFormType['options']['choices'] = $aOptions; + } + else if($oAttributeDefinition instanceof AttributeImage){ + $aFormType['type'] = DocumentType::class; + } + else if($oAttributeDefinition instanceof AttributeLinkedSet){ + + $aFormType['type'] = LinkSetType::class; + $aFormType['options']['is_indirect'] = $oAttributeDefinition->IsIndirect(); + $aFormType['options']['is_abstract'] = MetaModel::IsAbstract(LinkSetModel::GetTargetClass($oAttributeDefinition)); + $aFormType['options']['target_class'] = LinkSetModel::GetTargetClass($oAttributeDefinition); + if($aFormType['options']['is_abstract']){ + $aFormType['options']['object_classes'] = MetaModel::EnumChildClasses(LinkSetModel::GetTargetClass($oAttributeDefinition)); + } + $aFormType['options']['entry_options'] = [ + 'object_class' => $oAttributeDefinition->GetLinkedClass(), + 'data_class' => $oAttributeDefinition->GetLinkedClass(), + 'is_link_set' => true, + 'ext_key_to_me' => $oAttributeDefinition->GetExtKeyToMe(), + 'z_list' => 'list', + 'attr' => [ + 'class' => 'z_list_list' + ] + ]; + $aFormType['options']['attr'] = [ + 'class' => 'link_set' + ]; + $aFormType['options']['label_attr'] = [ + 'class' => 'combodo-field-set-label' + ]; + } + else if($oAttributeDefinition instanceof AttributeText){ + $aFormType['type'] = TextareaType::class; + $aFormType['options']['attr']['rows'] = 10; + $aFormType['options']['attr']['data-widget'] = 'text_widget'; + } + else if($oAttributeDefinition instanceof AttributeDate){ + $aFormType['type'] = DateType::class; + $aFormType['options']['input'] = 'string'; + } + else if($oAttributeDefinition instanceof AttributeDateTime){ + $aFormType['type'] = DateTimeType::class; + $aFormType['options']['input'] = 'string'; + $aFormType['options']['widget'] = 'single_text'; + $aFormType['options']['with_seconds'] = true; + } + + return $aFormType; + } +} \ No newline at end of file diff --git a/sources/DI/Form/Builder/LayoutBuilder.php b/sources/DI/Form/Builder/LayoutBuilder.php new file mode 100644 index 000000000..6a9b98515 --- /dev/null +++ b/sources/DI/Form/Builder/LayoutBuilder.php @@ -0,0 +1,79 @@ + RowType::class, + 'options' => [ + 'items' => $columns, + 'label' => false, + 'row_attr' => [ + 'data-block' => 'container' + ] + ] + ]; + } + + /** + * createColumn. + * + * @param $key + * @param $item + * @param $dataClass + * + * @return array + */ + public function createColumn($key, $items) : array + { + return [ + 'type' => ColumnType::class, + 'options' => [ + 'items' => $items, + 'label' => false, + 'row_attr' => [ + 'data-block' => 'container' + ] + ] + ]; + } + + /** + * createFieldSet. + * + * @param $key + * @param $item + * @param $dataClass + * + * @return array + */ + public function createFieldSet($key, $items) : array + { + return [ + 'type' => FieldSetType::class, + 'options' => [ + 'items' => $items, + 'label' => Dict::S(substr($key, 9)), + 'row_attr' => [ + 'data-block' => 'container' + ] + ] + ]; + } +} \ No newline at end of file diff --git a/sources/DI/Form/Listener/IFormTypeOptionModifier.php b/sources/DI/Form/Listener/IFormTypeOptionModifier.php index f3a788be1..639007c5c 100644 --- a/sources/DI/Form/Listener/IFormTypeOptionModifier.php +++ b/sources/DI/Form/Listener/IFormTypeOptionModifier.php @@ -11,10 +11,12 @@ use DBObject; interface IFormTypeOptionModifier { /** - * @param array $aInitialOptions form type option + * Return new form type options for the provided DB object. + * + * @param array $aInitialOptions initial form type options * @param DBObject $oObject iTop DB object * - * @return array + * @return array new form type options */ public function getNewOptions(array $aInitialOptions, DBObject $oObject) : array; } \ No newline at end of file diff --git a/sources/DI/Form/Listener/ObjectFormListener.php b/sources/DI/Form/Listener/ObjectFormListener.php index ede3c68bd..90ff17433 100644 --- a/sources/DI/Form/Listener/ObjectFormListener.php +++ b/sources/DI/Form/Listener/ObjectFormListener.php @@ -36,7 +36,7 @@ class ObjectFormListener implements EventSubscriberInterface * When form is first initialized, it hasn't data set yet. * So we listen for form PRE_SET_DATA event to modify form with data. * - * @param FormEvent $oEvent + * @param FormEvent $oEvent form event * * @suppress-unused-warning */ @@ -50,7 +50,7 @@ class ObjectFormListener implements EventSubscriberInterface * Previous preSetData handling doesn't know about form submission data. * So, to allow us to use our DBObject for filters we need to update it before. * - * @param FormEvent $oEvent + * @param FormEvent $oEvent form event * * @suppress-unused-warning */ @@ -71,6 +71,7 @@ class ObjectFormListener implements EventSubscriberInterface * * We need to reset fields to take into account object values. * The form fields options can't be changed at this time. + * All fields are reset to keep fields order. * * @param FormInterface $oForm * @param FormEvent $oEvent @@ -113,6 +114,8 @@ class ObjectFormListener implements EventSubscriberInterface /** * Handle posted data. + * The data are the view data. We skipped data transformation !! + * @todo handle data transformation * * @param FormInterface $form * @param DBObject $oDBObject diff --git a/sources/DI/Form/Transformer/DocumentTransformer.php b/sources/DI/Form/Transformer/DocumentTransformer.php new file mode 100644 index 000000000..9e7bbf699 --- /dev/null +++ b/sources/DI/Form/Transformer/DocumentTransformer.php @@ -0,0 +1,31 @@ +getRealPath()); + return new ormDocument($doc_content, $value->getClientMimeType(), $value->getRealPath()); + } +} diff --git a/sources/DI/Form/Transformer/ExternalKeyTransformer.php b/sources/DI/Form/Transformer/ExternalKeyTransformer.php new file mode 100644 index 000000000..8a0dc232b --- /dev/null +++ b/sources/DI/Form/Transformer/ExternalKeyTransformer.php @@ -0,0 +1,42 @@ +sObjectClass = $sObjectClass; + } + + /** @inheritdoc */ + public function transform($value) + { + try{ + return MetaModel::GetObject($this->sObjectClass, $value)->GetName(); + } + catch(Exception $e){ + return null; + } + } + + /** @inheritdoc */ + public function reverseTransform($value) + { + return $value; + } +} diff --git a/sources/DI/Form/Type/Simple/DocumentType.php b/sources/DI/Form/Type/Attribute/DocumentType.php similarity index 60% rename from sources/DI/Form/Type/Simple/DocumentType.php rename to sources/DI/Form/Type/Attribute/DocumentType.php index 8d0cbf4c9..09d4ec05e 100644 --- a/sources/DI/Form/Type/Simple/DocumentType.php +++ b/sources/DI/Form/Type/Attribute/DocumentType.php @@ -1,15 +1,14 @@ addModelTransformer(new CallbackTransformer( - - // transform - function (?ormDocument $oDocument){ - return null; - }, - - // reverse - function (?UploadedFile $oFileData){ - if($oFileData === null){ - return null; - } - - $doc_content = file_get_contents($oFileData->getRealPath()); - return new ormDocument($doc_content, $oFileData->getClientMimeType(), $oFileData->getRealPath()); - }, - )); + $builder->addModelTransformer(new DocumentTransformer()); } /** @inheritdoc */ @@ -47,7 +30,7 @@ class DocumentType extends AbstractType { /** @var ormDocument $oOrmDocument */ $oOrmDocument = $form->getData(); - $view->vars['data'] = 'data:image/' . $oOrmDocument->GetMimeType() . ';base64,' . base64_encode($oOrmDocument->GetData());; + $view->vars['data'] = 'data:image/' . $oOrmDocument->GetMimeType() . ';base64,' . base64_encode($oOrmDocument->GetData()); $view->vars['mime_type'] = $oOrmDocument->GetMimeType(); $view->vars['filename'] = $oOrmDocument->GetFileName(); } diff --git a/sources/DI/Form/Type/Attribute/ExternalFieldType.php b/sources/DI/Form/Type/Attribute/ExternalFieldType.php new file mode 100644 index 000000000..d61477376 --- /dev/null +++ b/sources/DI/Form/Type/Attribute/ExternalFieldType.php @@ -0,0 +1,38 @@ +setDefaults([ + 'object_class' => null, + 'is_external_key' => false, + ]); + + } + /** @inheritdoc */ + public function buildForm(FormBuilderInterface $builder, array $options) + { + if($options['is_external_key']){ + $builder->addViewTransformer(new ExternalKeyTransformer($options['object_class'])); + } + + } + + /** @inheritdoc */ + public function getParent(): string + { + return TextType::class; + } + +} diff --git a/sources/DI/Form/Type/Simple/ExternalKeyType.php b/sources/DI/Form/Type/Attribute/ExternalKeyType.php similarity index 86% rename from sources/DI/Form/Type/Simple/ExternalKeyType.php rename to sources/DI/Form/Type/Attribute/ExternalKeyType.php index bf8d50b31..a5b44b653 100644 --- a/sources/DI/Form/Type/Simple/ExternalKeyType.php +++ b/sources/DI/Form/Type/Attribute/ExternalKeyType.php @@ -1,6 +1,6 @@ setDefaults([ - 'display_style' => 'list', 'allow_target_creation' => false, 'object_class' => null, 'att_code' => null, ]); - - $resolver->setAllowedTypes('display_style', 'string'); - $resolver->setAllowedValues('display_style', ['radio', 'radio_horizontal', 'radio_vertical', 'select', 'list']); } /** @inheritdoc */ @@ -58,7 +54,8 @@ class ExternalKeyType extends AbstractType implements IFormTypeOptionModifier public function getNewOptions(array $aInitialOptions, DBObject $oObject) : array { try{ - $oObjectsSet = MetaModel::GetAllowedValuesAsObjectSet(get_class($oObject), $aInitialOptions['att_code'], ['this' => $oObject]); +// $iVal = $oObject->Get($aInitialOptions['att_code']); // because we can't list all items du to performance, we want to force current value to be present, even if it's not part of the result + $oObjectsSet = MetaModel::GetAllowedValuesAsObjectSet(get_class($oObject), $aInitialOptions['att_code'], ['this' => $oObject]/*, null, $iVal*/); $aInitialOptions['choices'] = $this->oObjectService->ToChoices($oObjectsSet); } catch(Exception $e){ diff --git a/sources/DI/Form/Type/Simple/LinkSetType.php b/sources/DI/Form/Type/Attribute/LinkSetType.php similarity index 66% rename from sources/DI/Form/Type/Simple/LinkSetType.php rename to sources/DI/Form/Type/Attribute/LinkSetType.php index 12f2bbd5e..f3658bca9 100644 --- a/sources/DI/Form/Type/Simple/LinkSetType.php +++ b/sources/DI/Form/Type/Attribute/LinkSetType.php @@ -1,10 +1,9 @@ setDefaults([ 'entry_type' => ObjectType::class, - 'entry_options' => [ - 'object_class' => null - ], + 'is_indirect' => false, + 'is_abstract' => false, + 'object_classes' => null, + 'target_class' => null, + 'entry_options' => null, 'allow_add' => true, 'allow_delete' => true, ]); @@ -53,6 +54,12 @@ class LinkSetType extends AbstractType /** @inheritdoc */ public function buildView(FormView $view, FormInterface $form, array $options): void { - $view->vars['labels'] = $this->oObjectService->getFormPresentationLabels($options['entry_options']['object_class'], 'list', $options['entry_options']['ext_key_to_me']);; + $view->vars['labels'] = $this->oObjectService->getFormPresentationLabels($options['entry_options']['object_class'], 'list', $options['entry_options']['ext_key_to_me']); + $view->vars['object_class'] = $options['entry_options']['object_class']; + $view->vars['ext_key_to_me'] = $options['entry_options']['ext_key_to_me']; + $view->vars['target_class'] = $options['target_class']; + $view->vars['is_indirect'] = $options['is_indirect']; + $view->vars['is_abstract'] = $options['is_abstract']; + $view->vars['object_classes'] = $options['object_classes']; } } diff --git a/sources/DI/Form/Type/ConfigurationType.php b/sources/DI/Form/Type/Compound/ConfigurationType.php similarity index 85% rename from sources/DI/Form/Type/ConfigurationType.php rename to sources/DI/Form/Type/Compound/ConfigurationType.php index 7c1c4d98b..4459739f3 100644 --- a/sources/DI/Form/Type/ConfigurationType.php +++ b/sources/DI/Form/Type/Compound/ConfigurationType.php @@ -1,6 +1,6 @@ $sValue) { @@ -145,12 +145,12 @@ class ConfigurationType extends AbstractType * Handle array of entries. * * @param array $aEntries - * @param $aSettings - * @param $builder + * @param array $aSettings + * @param FormBuilderInterface $builder * * @return void */ - private function handleEntries(array $aEntries, $aSettings, $builder) + private function handleEntries(array $aEntries, array $aSettings, FormBuilderInterface $builder) { // iterate throw entries... foreach ($aEntries as $sKey => $aValue){ @@ -168,12 +168,12 @@ class ConfigurationType extends AbstractType /** * Return form type depending on settings definition. * - * @param $aSettings - * @param $sKey + * @param array $aSettings + * @param string $sKey * * @return string */ - private function getFormType($aSettings, $sKey) : string{ + private function getFormType(array $aSettings, string $sKey) : string{ if(!array_key_exists($sKey, $aSettings)){ return TextType::class; @@ -190,13 +190,16 @@ class ConfigurationType extends AbstractType } /** - * @param $aSettings - * @param $sKey - * @param $sTopic + * Get parameter setting topic. * - * @return string + * @param array $aSettings + * @param string $sKey + * @param string $sTopic + * + * @return string|null */ - private function getTopic($aSettings, $sKey, $sTopic) : ?string{ + private function getTopic(array $aSettings, string $sKey, string $sTopic) : ?string + { if(!array_key_exists($sKey, $aSettings)){ return null; diff --git a/sources/DI/Form/Type/ObjectSingleAttributeType.php b/sources/DI/Form/Type/Compound/ObjectSingleAttributeType.php similarity index 66% rename from sources/DI/Form/Type/ObjectSingleAttributeType.php rename to sources/DI/Form/Type/Compound/ObjectSingleAttributeType.php index 7e6344704..4199e368d 100644 --- a/sources/DI/Form/Type/ObjectSingleAttributeType.php +++ b/sources/DI/Form/Type/Compound/ObjectSingleAttributeType.php @@ -1,9 +1,9 @@ oObjectFormModifier = $oObjectFormModifier; - $this->objectPresentationService = $objectPresentationService; + $this->oAttributeBuilder = $oAttributeBuilder; } /** @inheritdoc */ @@ -41,11 +41,13 @@ class ObjectSingleAttributeType extends AbstractType ]); } - /** @inheritdoc */ + /** @inheritdoc + * @throws \CoreException + */ public function buildForm(FormBuilderInterface $builder, array $options): void { // build form from options - $sFormType = $this->objectPresentationService->GetAttributeFormType($options['object_class'], $options['att_code']); + $sFormType = $this->oAttributeBuilder->createAttribute($options['object_class'], $options['att_code']); // add form field $builder->add($options['att_code'], $sFormType['type'], $sFormType['options']); diff --git a/sources/DI/Form/Type/ObjectType.php b/sources/DI/Form/Type/Compound/ObjectType.php similarity index 63% rename from sources/DI/Form/Type/ObjectType.php rename to sources/DI/Form/Type/Compound/ObjectType.php index fdff793ac..142aa3aff 100644 --- a/sources/DI/Form/Type/ObjectType.php +++ b/sources/DI/Form/Type/Compound/ObjectType.php @@ -1,8 +1,10 @@ oObjectFormModifier = $oObjectFormModifier; $this->objectPresentationService = $objectPresentationService; + $this->oAttributeBuilder = $oAttributeBuilder; + $this->oLayoutBuilder = $oLayoutBuilder; } /** @inheritdoc */ @@ -48,24 +60,29 @@ class ObjectType extends AbstractType 'class' => 'z_list_details' ], 'object_class' => null, + 'locked_attributes' => null, 'data_class' => cmdbAbstractObject::class, ]); } - /** - * @inheritdoc - * @throws \Exception - */ + /** @inheritdoc */ public function buildForm(FormBuilderInterface $builder, array $options): void { // build form from presentation - $this->objectPresentationService->buildFormFromPresentation($options['object_class'], $options['z_list'], $options['is_link_set'], $options['ext_key_to_me'], $builder); + $this->objectPresentationService->buildFormFromPresentation( + $options['object_class'], + $options['z_list'], + $options['is_link_set'], + $options['ext_key_to_me'], + $options['locked_attributes'], + $builder); // dynamic form handling $builder->addEventSubscriber($this->oObjectFormModifier); } + /** @inheritdoc */ public function buildView(FormView $view, FormInterface $form, array $options) { parent::buildView($view, $form, $options); diff --git a/sources/DI/ITopKernel.php b/sources/DI/ITopKernel.php index 4a0cc1b99..8a7d7656c 100644 --- a/sources/DI/ITopKernel.php +++ b/sources/DI/ITopKernel.php @@ -40,6 +40,8 @@ class ITopKernel extends BaseKernel * @param \Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $container * * @return void + * + * @suppress-unused-warning */ protected function configureContainer(ContainerConfigurator $container): void { diff --git a/sources/DI/Services/ObjectPresentationService.php b/sources/DI/Services/ObjectPresentationService.php index d0089c23d..65868f62f 100644 --- a/sources/DI/Services/ObjectPresentationService.php +++ b/sources/DI/Services/ObjectPresentationService.php @@ -2,35 +2,10 @@ namespace Combodo\iTop\DI\Services; -use AttributeBoolean; -use AttributeDate; -use AttributeDateTime; -use AttributeEmailAddress; -use AttributeEnum; -use AttributeExternalKey; -use AttributeImage; -use AttributeLinkedSet; -use AttributePassword; -use AttributePhoneNumber; -use AttributeText; -use Combodo\iTop\DI\Form\Type\Layout\ColumnType; -use Combodo\iTop\DI\Form\Type\Simple\ExternalKeyType; -use Combodo\iTop\DI\Form\Type\Layout\FieldSetType; -use Combodo\iTop\DI\Form\Type\Layout\RowType; -use Combodo\iTop\DI\Form\Type\Simple\DocumentType; -use Combodo\iTop\DI\Form\Type\Simple\LinkSetType; +use Combodo\iTop\DI\Form\Builder\AttributeBuilder; +use Combodo\iTop\DI\Form\Builder\LayoutBuilder; use Dict; -use Exception; use MetaModel; -use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\DateTimeType; -use Symfony\Component\Form\Extension\Core\Type\DateType; -use Symfony\Component\Form\Extension\Core\Type\EmailType; -use Symfony\Component\Form\Extension\Core\Type\PasswordType; -use Symfony\Component\Form\Extension\Core\Type\TelType; -use Symfony\Component\Form\Extension\Core\Type\TextareaType; -use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; /** @@ -39,54 +14,71 @@ use Symfony\Component\Form\FormBuilderInterface; */ class ObjectPresentationService { + /** @var \Combodo\iTop\DI\Form\Builder\LayoutBuilder $oLayoutBuilder */ + private LayoutBuilder $oLayoutBuilder; + /** @var \Combodo\iTop\DI\Form\Builder\AttributeBuilder $oAttributeBuilder */ + private AttributeBuilder $oAttributeBuilder; + + /** + * @param \Combodo\iTop\DI\Form\Builder\LayoutBuilder $oLayoutBuilder + * @param \Combodo\iTop\DI\Form\Builder\AttributeBuilder $oAttributeBuilder + */ + public function __construct(LayoutBuilder $oLayoutBuilder, AttributeBuilder $oAttributeBuilder) + { + $this->oLayoutBuilder = $oLayoutBuilder; + $this->oAttributeBuilder = $oAttributeBuilder; + } /** * buildFormFromPresentation. * - * @param $class - * @param $zList - * @param $isLinkSet - * @param $sExtKeyToMe + * @param string $class + * @param string $sZList + * @param bool $isLinkSet + * @param string|null $sExtKeyToMe + * @param array|null $lockedAttributes * @param \Symfony\Component\Form\FormBuilderInterface $builder * * @return void + * @throws \Exception */ - public function buildFormFromPresentation($class, $zList, $isLinkSet, $sExtKeyToMe, FormBuilderInterface $builder) + public function buildFormFromPresentation(string $class, string $sZList, bool $isLinkSet, ?string $sExtKeyToMe, ?array $lockedAttributes, FormBuilderInterface $builder) { // retrieve presentation - $aPresentation = MetaModel::GetZListItems($class, $zList); + $aPresentation = MetaModel::GetZListItems($class, $sZList); + // filter zList for links set if($isLinkSet){ - $aPresentation = $this->filterLinkSetpresentation($aPresentation, $class, $sExtKeyToMe); + $aPresentation = $this->filterLinkSetPresentation($aPresentation, $class, $sExtKeyToMe); } - $level = $this->handleLevel($aPresentation, $class); - + // handle level + $level = $this->handleLevel($aPresentation, $class, $lockedAttributes); foreach ($level as $key => $value) { - $value['options']['attr']['data-att-code'] = $key; $builder->add($key, $value['type'], $value['options']); } } /** - * filterLinkSetpresentation. + * filterLinkSetPresentation. * - * @param $aPresentation - * @param $class - * @param $sExtKeyToMe + * @param array $aPresentation + * @param string $sClass + * @param string|null $sExtKeyToMe * * @return array * @throws \Exception */ - private function filterLinkSetpresentation($aPresentation, $class, $sExtKeyToMe){ + private function filterLinkSetPresentation(array $aPresentation, string $sClass, ?string $sExtKeyToMe) : array + { $aNewPresentation = []; foreach($aPresentation as $sLinkedAttCode) { if ($sLinkedAttCode != $sExtKeyToMe) { - $oAttDef = MetaModel::GetAttributeDef($class, $sLinkedAttCode); + $oAttDef = MetaModel::GetAttributeDef($sClass, $sLinkedAttCode); if ((!$oAttDef->IsExternalField() || ($oAttDef->GetKeyAttCode() != $sExtKeyToMe)) && (!$oAttDef->IsLinkSet()) ) @@ -101,20 +93,34 @@ class ObjectPresentationService return $aNewPresentation; } - - public function getFormPresentationLabels($class, $zList, $sExtKeyToMe) + /** + * @param $class + * @param $zList + * @param $sExtKeyToMe + * + * @return array + * @throws \Exception + */ + public function getFormPresentationLabels($class, $zList, $sExtKeyToMe) : array { // retrieve presentation $aPresentation = MetaModel::GetZListItems($class, $zList); $aPresentation = $this->filterLinkSetpresentation($aPresentation, $class, $sExtKeyToMe); - $level = $this->handleLevel($aPresentation, $class); - $labels = []; + $level = $this->handleLevel($aPresentation, $class, null, null); + $aLabels = []; foreach ($level as $key => $value) { $value['options']['attr']['data-att-code'] = $key; - $labels[] = $key; + + $sKey = "Class:$class/Attribute:$key"; + if(Dict::Exists($sKey)){ + $aLabels[] = Dict::S($sKey); + } + else{ + $aLabels[] = $key; + } } - return $labels; + return $aLabels; } @@ -122,26 +128,30 @@ class ObjectPresentationService * handleLevel. * * @param array $aElement - * @param $dataClass + * @param string $sDataClass + * @param array|null $lockedAttributes * * @return array + * @throws \CoreException */ - private function handleLevel(array $aElement, $dataClass) : array + private function handleLevel(array $aElement, string $sDataClass, ?array $lockedAttributes) : array { $aChildren = []; - $aRowCol = []; + $aRowCols = []; // iterate trow level entries... foreach ($aElement as $key => $item){ // column if(str_starts_with($key, 'col')){ - $aRowCol[$key] = $this->createColumn($key, $item, $dataClass); - $this->handleDynamics($key, $aRowCol[$key]); + $aItems = $this->handleLevel($item, $sDataClass, $lockedAttributes); + $aRowCols[$key] = $this->oLayoutBuilder->createColumn($key, $aItems); + $this->handleDynamics($key, $aRowCols[$key]); } // field set else if(str_starts_with($key, 'fieldset')){ - $aChildren[$key] =$this->createFieldSet($key, $item, $dataClass); + $aItems = $this->handleLevel($item, $sDataClass, $lockedAttributes); + $aChildren[$key] = $this->oLayoutBuilder->createFieldSet($key, $aItems); $this->handleDynamics($key, $aChildren[$key]); } // logs @@ -150,7 +160,7 @@ class ObjectPresentationService } // others else{ - $sFormType = $this->GetAttributeFormType($dataClass, $item); + $sFormType = $this->oAttributeBuilder->createAttribute($sDataClass, $item, $lockedAttributes); if($sFormType !== null){ $sFormType['options']['attr']['data-att-code'] = $item; $aChildren[$item] = $sFormType; @@ -159,8 +169,8 @@ class ObjectPresentationService } } - if(count($aRowCol)){ - $aChildren['row'] = $this->createRow('row', $aRowCol, $dataClass); + if(count($aRowCols)){ + $aChildren['row'] = $this->oLayoutBuilder->createRow('row', $aRowCols); } return $aChildren; @@ -201,207 +211,4 @@ class ObjectPresentationService } } - /** - * createRow. - * - * @param $key - * @param $columns - * @param $dataClass - * - * @return array - */ - private function createRow($key, $columns, $dataClass) : array - { - return [ - 'type' => RowType::class, - 'options' => [ - 'items' => $columns, - 'label' => false, - 'row_attr' => [ - 'data-block' => 'container' - ] - ] - ]; - } - - /** - * createColumn. - * - * @param $key - * @param $item - * @param $dataClass - * - * @return array - */ - private function createColumn($key, $item, $dataClass) : array - { - return [ - 'type' => ColumnType::class, - 'options' => [ - 'items' => $this->handleLevel($item, $dataClass), - 'label' => false, - 'row_attr' => [ - 'data-block' => 'container' - ] - ] - ]; - } - - /** - * createFieldSet. - * - * @param $key - * @param $item - * @param $dataClass - * - * @return array - */ - private function createFieldSet($key, $item, $dataClass) : array - { - return [ - 'type' => FieldSetType::class, - 'options' => [ - 'items' => $this->handleLevel($item, $dataClass), - 'label' => Dict::S(substr($key, 9)), - 'row_attr' => [ - 'data-block' => 'container' - ] - ] - ]; - } - - /** - * Map AttributeDefinition >> FormType - * - * @param string $sObjectClass - * @param string $sCode - * - * @return array|null - */ - public function GetAttributeFormType(string $sObjectClass, string $sCode) : ?array - { - // load attribute definition - try { - $oAttributeDefinition = MetaModel::GetAttributeDef($sObjectClass, $sCode); - $sLabel = $oAttributeDefinition->GetLabel(); - } - catch(Exception $e){ - return null; - } - - // create global form type - $aFormType = [ - 'type' => TextType::class, - 'label' => $sLabel, - 'options' => [ - 'required' => !$oAttributeDefinition->IsNullAllowed(), - 'disabled' => !$oAttributeDefinition->IsWritable(), - ] - ]; - - // inject corresponding configuration - if($oAttributeDefinition instanceof AttributeExternalKey){ - $aFormType['type'] = ExternalKeyType::class; - $aFormType['options']['display_style'] = 'list'; - $aFormType['options']['allow_target_creation'] = true; - $aFormType['options']['object_class'] = $oAttributeDefinition->GetTargetClass(); - $aFormType['options']['att_code'] = $oAttributeDefinition->GetCode(); - - try{ - $oObjectsSet = MetaModel::GetAllowedValuesAsObjectSet($oAttributeDefinition->GetHostClass(), $oAttributeDefinition->GetCode(), []); - $aFormType['options']['choices'] = $this->ToChoices($oObjectsSet); - } - catch(Exception $e){ - - } - - } - else if($oAttributeDefinition instanceof AttributeEmailAddress){ - $aFormType['type'] = EmailType::class; - } - else if($oAttributeDefinition instanceof AttributePassword){ - $aFormType['type'] = PasswordType::class; - } - else if($oAttributeDefinition instanceof AttributePhoneNumber){ - $aFormType['type'] = TelType::class; - $aFormType['options']['attr'] = [ - 'pattern' => '\+[0-9]{2}\s[0-9]\s[0-9]{2}\s[0-9]{2}\s[0-9]{2}\s[0-9]{2}', - 'placeholder' => '+-- - -- -- --' - ]; - } - else if($oAttributeDefinition instanceof AttributeBoolean){ - $aFormType['type'] = CheckboxType::class; - } - else if($oAttributeDefinition instanceof AttributeEnum){ - $aFormType['type'] = ChoiceType::class; - try{ - $aOptions = array_flip($oAttributeDefinition->GetAllowedValues()); - } - catch(Exception $e){ - $aOptions = []; - } - $aFormType['options']['choices'] = $aOptions; - } - else if($oAttributeDefinition instanceof AttributeImage){ - $aFormType['type'] = DocumentType::class; - } - else if($oAttributeDefinition instanceof AttributeLinkedSet){ - $aFormType['type'] = LinkSetType::class; - $aFormType['options']['entry_options'] = [ - 'object_class' => $oAttributeDefinition->GetLinkedClass(), - 'data_class' => $oAttributeDefinition->GetLinkedClass(), - 'is_link_set' => true, - 'ext_key_to_me' => $oAttributeDefinition->GetExtKeyToMe(), - 'z_list' => 'list', - 'attr' => [ - 'class' => 'z_list_list' - ] - ]; - $aFormType['options']['attr'] = [ - 'class' => 'link_set' - ]; - $aFormType['options']['label_attr'] = [ - 'class' => 'combodo-field-set-label' - ]; - } - else if($oAttributeDefinition instanceof AttributeText){ - $aFormType['type'] = TextareaType::class; - $aFormType['options']['attr']['rows'] = 10; - $aFormType['options']['attr']['data-widget'] = 'text_widget'; - } - else if($oAttributeDefinition instanceof AttributeDate){ - $aFormType['type'] = DateType::class; - $aFormType['options']['input'] = 'string'; - } - else if($oAttributeDefinition instanceof AttributeDateTime){ - $aFormType['type'] = DateTimeType::class; - $aFormType['options']['input'] = 'string'; - $aFormType['options']['widget'] = 'single_text'; - $aFormType['options']['with_seconds'] = true; - } - - if(count($oAttributeDefinition->GetPrerequisiteAttributes()) > 0){ - $dependencies = implode(' ', $oAttributeDefinition->GetPrerequisiteAttributes()); - $aFormType['options']['attr']['data-depends-on'] = $dependencies; - $aFormType['depends_on'] = $dependencies; - } - - $aFormType['options']['row_attr']['data-block'] = 'container'; - - return $aFormType; - } - - public function ToChoices($oObjectsSet) : array - { - $aChoices = []; - - $i = 0; - - while ($i < 100 && $oObj = $oObjectsSet->Fetch()) { - $aChoices[$oObj->GetName()] = $oObj->GetKey(); - $i++; - } - - return $aChoices; - } } \ No newline at end of file diff --git a/sources/DI/Services/ObjectService.php b/sources/DI/Services/ObjectService.php index 29fface07..ff0084e01 100644 --- a/sources/DI/Services/ObjectService.php +++ b/sources/DI/Services/ObjectService.php @@ -3,7 +3,10 @@ namespace Combodo\iTop\DI\Services; use AttributeLinkedSet; +use Combodo\iTop\Core\MetaModel\FriendlyNameType; +use Combodo\iTop\Service\Base\ObjectRepository; use DBObject; +use DBObjectSet; use MetaModel; use ormLinkSet; @@ -27,20 +30,52 @@ class ObjectService $this->sDbName = $sDbName; } + /** + * @param string $sClass + * @param $sRef + * + * @return DBObject + * @throws \ArchivedObjectException + * @throws \CoreException + */ + public function getObject(string $sClass, $sRef) : DBObject + { + if($sRef !== 0){ + return MetaModel::GetObject($sClass, $sRef); + } + else{ + return MetaModel::NewObject($sClass); + } + } + /** * Convert object set to array of choices. * - * @param $oObjectsSet + * @param DBObjectSet $oObjectsSet * * @return array + * @throws \CoreException + * @throws \CoreUnexpectedValue + * @throws \DictExceptionMissingString + * @throws \MySQLException */ - public function ToChoices($oObjectsSet) : array + public function ToChoices(DBObjectSet $oObjectsSet) : array { $aChoices = []; - $i = 0; + // Retrieve friendly name complementary specification + $aComplementAttributeSpec = MetaModel::GetNameSpec($oObjectsSet->GetClass(), FriendlyNameType::COMPLEMENTARY); - while ($i < 100 && $oObj = $oObjectsSet->Fetch()) { + // Retrieve image attribute code + $sObjectImageAttCode = MetaModel::GetImageAttributeCode($oObjectsSet->GetClass()); + + // Prepare fields to load + $aDefaultFieldsToLoad = ObjectRepository::GetDefaultFieldsToLoad($aComplementAttributeSpec, $sObjectImageAttCode); + + $oObjectsSet->OptimizeColumnLoad([$oObjectsSet->GetClassAlias() => $aDefaultFieldsToLoad]); + + $i = 0; + while ($i < 30 && $oObj = $oObjectsSet->Fetch()) { $aChoices[$oObj->GetName()] = $oObj->GetKey(); $i++; } @@ -64,12 +99,27 @@ class ObjectService return $this->sDbName; } + /** + * @param \DBObject $object + * + * @return void + * @throws \ArchivedObjectException + * @throws \CoreCannotSaveObjectException + * @throws \CoreException + * @throws \CoreUnexpectedValue + * @throws \CoreWarning + * @throws \DeleteException + * @throws \MySQLException + * @throws \MySQLHasGoneAwayException + * @throws \OQLException + * @throws \Exception + */ public function handleLinkSetDB(DBObject $object){ foreach($object->GetValues() as $key => $value){ if($value instanceof ormLinkSet){ - /** @var AttributeLinkedSet $a */ - $a = MetaModel::GetAttributeDef(get_class($object), $key); + /** @var AttributeLinkedSet $a */ + $a = MetaModel::GetAttributeDef(get_class($object), $key); /** @var DBObject $link */ foreach($value->ListModifiedLinks() as $link){ @@ -78,7 +128,6 @@ class ObjectService } } - /** @var DBObject $link */ foreach($value->ListModifiedLinks() as $link){ if($link->IsNew()){ diff --git a/sources/DI/Services/TwigHelper.php b/sources/DI/Services/TwigHelper.php index 7a275ae14..4eb9e16ea 100644 --- a/sources/DI/Services/TwigHelper.php +++ b/sources/DI/Services/TwigHelper.php @@ -2,6 +2,7 @@ namespace Combodo\iTop\DI\Services; +use MetaModel; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; @@ -11,7 +12,8 @@ use Twig\TwigFunction; */ class TwigHelper extends AbstractExtension { - private string $sAppRoot = ''; + /** @var string|mixed application root */ + private string $sAppRoot; /** * Constructor. @@ -19,7 +21,7 @@ class TwigHelper extends AbstractExtension */ public function __construct() { - $this->sAppRoot = \MetaModel::GetConfig()->Get('app_root_url'); + $this->sAppRoot = MetaModel::GetConfig()->Get('app_root_url'); } /** @inheritdoc */ @@ -37,7 +39,7 @@ class TwigHelper extends AbstractExtension * * @return string */ - public function asset_js($name) + public function asset_js($name) : string { return $this->sAppRoot . 'js/' . $name; } @@ -47,7 +49,7 @@ class TwigHelper extends AbstractExtension * * @return string */ - public function asset_css($name) + public function asset_css($name) : string { return $this->sAppRoot . 'css/' . $name; } @@ -57,7 +59,7 @@ class TwigHelper extends AbstractExtension * * @return string */ - public function asset_image($name) + public function asset_image($name) : string { return $this->sAppRoot . 'images/' . $name; } diff --git a/templates/DI/base.html.twig b/templates/DI/base.html.twig index 96ad0aeb2..905466214 100644 --- a/templates/DI/base.html.twig +++ b/templates/DI/base.html.twig @@ -1,138 +1,128 @@ - - {% block title %}{% endblock %} - - - - - - - - - - - {% block head %}{% endblock %} + - + + + + + + + - const collectionHolder = document.querySelector('.' + e.currentTarget.dataset.collectionHolderClass); + {# css #} + - const item = document.createElement('tr'); + {# JS #} + + + + + - item.innerHTML = collectionHolder - .dataset - .prototype - .replace( - /__name__/g, - collectionHolder.dataset.index - ); + {# - BLOCK HEAD - #} + {% block head %}{% endblock %} - collectionHolder.appendChild(item); + - collectionHolder.dataset.index++; - }; + - - - - -
    - {% block body %}{% endblock %} -
    -
    -
    - + + + + + + diff --git a/templates/DI/object/object_single_attribute.html.twig b/templates/DI/form.html.twig similarity index 100% rename from templates/DI/object/object_single_attribute.html.twig rename to templates/DI/form.html.twig diff --git a/templates/DI/form/classic_theme.html.twig b/templates/DI/form/classic_theme.html.twig new file mode 100644 index 000000000..264217950 --- /dev/null +++ b/templates/DI/form/classic_theme.html.twig @@ -0,0 +1,165 @@ +{% use "bootstrap_5_layout.html.twig" %} + +{# LAYOUT #} + +{# column #} +{%- block column_widget -%} + + {{ form_widget(form, {'attr': {'class': 'combodo-column'}}) }} + {{ form_help(form) }} + {{ form_errors(form) }} + +{%- endblock column_widget -%} + +{# row #} +{%- block row_widget -%} + + {{ form_widget(form, {'attr': {'class': 'combodo-row'}}) }} + {{ form_help(form) }} + {{ form_errors(form) }} + +{%- endblock row_widget -%} + +{# fieldset #} +{%- block field_set_widget -%} + + {{ form_widget(form, {'attr': {'class': 'combodo-field-set'}}) }} + {{ form_help(form) }} + {{ form_errors(form) }} + +{%- endblock field_set_widget -%} + +{# ATTRIBUTE #} + +{# DocumentType #} +{%- block document_widget -%} + +
    + +
    +
    Type:{{ mime_type }}
    +
    Finename:{{ filename }}
    +
    +
    + + {{ form_widget(form, {'attr': {'class': 'combodo-document'}}) }} + {{ form_help(form) }} + {{ form_errors(form) }} + +{%- endblock document_widget -%} + +{# ExternalKeyType #} +{%- block external_key_widget -%} + +
    + +
    + {{ form_widget(form) }} +
    + + {% if allow_target_creation %} + + {% endif %} +
    + +{%- endblock external_key_widget -%} + +{# LinkSetType #} +{%- block link_set_widget -%} + + {% if is_indirect %} + Indirect + {% endif %} + + {% if is_abstract %} + abstract + {% endif %} + + {# container #} + + + {{ form_help(form) }} + {{ form_errors(form) }} + +{%- endblock link_set_widget -%} + +{# COMPOUND #} + +{# Object #} +{%- block object_widget -%} + + {% if z_list == 'list' %} + + {% for child in form %} + + {{ form_widget(child) }} + + {% endfor %} + + + + + {% else %} + + {{ form_widget(form) }} + + {% endif %} + +{%- endblock object_widget -%} + diff --git a/templates/DI/form/external_key_widget.html.twig b/templates/DI/form/external_key_widget.html.twig deleted file mode 100644 index 94f04b86c..000000000 --- a/templates/DI/form/external_key_widget.html.twig +++ /dev/null @@ -1,16 +0,0 @@ -{% use "bootstrap_5_layout.html.twig" %} - -{%- block external_key_widget -%} - -
    - -
    - {{ form_widget(form) }} -
    - - {% if allow_target_creation %} - - {% endif %} -
    - -{%- endblock external_key_widget -%} \ No newline at end of file diff --git a/templates/DI/form/form_layout.html.twig b/templates/DI/form/form_layout.html.twig deleted file mode 100644 index 800958988..000000000 --- a/templates/DI/form/form_layout.html.twig +++ /dev/null @@ -1,134 +0,0 @@ -{# column #} -{%- block column_widget -%} - - {{ form_widget(form, {'attr': {'class': 'combodo-column'}}) }} - {{ form_help(form) }} - {{ form_errors(form) }} - -{%- endblock column_widget -%} - -{# row #} -{%- block row_widget -%} - - {{ form_widget(form, {'attr': {'class': 'combodo-row'}}) }} - {{ form_help(form) }} - {{ form_errors(form) }} - -{%- endblock row_widget -%} - -{# fieldset #} -{%- block field_set_widget -%} - - {{ form_widget(form, {'attr': {'class': 'combodo-field-set'}}) }} - {{ form_help(form) }} - {{ form_errors(form) }} - -{%- endblock field_set_widget -%} - -{# DocumentType #} -{%- block document_widget -%} - -
    - -
    -
    Type:{{ mime_type }}
    -
    Finename:{{ filename }}
    -
    -
    - - {{ form_widget(form, {'attr': {'class': 'combodo-document'}}) }} - {{ form_help(form) }} - {{ form_errors(form) }} - -{%- endblock document_widget -%} - - -{# fieldset #} -{%- block link_set_widget -%} - - - - - - - - - {% for l in labels %} - - {% endfor %} - - - - - {% for child in form %} - - {% for child2 in child %} - - {% endfor %} - - - {% else %} - - {% endfor %} - - - - - - {{ form_help(form) }} - {{ form_errors(form) }} - -{%- endblock link_set_widget -%} - - - -{# Object #} -{%- block object_widget -%} - - {% if z_list == 'list' %} - - - {% for child in form %} - - {{ form_widget(child) }} - - {% endfor %} - - - - - {% else %} - - {{ form_widget(form) }} - - {% endif %} - -{%- endblock object_widget -%} \ No newline at end of file diff --git a/templates/DI/home.html.twig b/templates/DI/home.html.twig index d4af01ca5..fd15ed8f0 100644 --- a/templates/DI/home.html.twig +++ b/templates/DI/home.html.twig @@ -1,7 +1,7 @@ {% extends "DI/base.html.twig" %} {% block title %} - Router / DI / Forms + Forms SDK {% endblock %} {% block body %} diff --git a/templates/DI/object/edit.html.twig b/templates/DI/object/edit.html.twig index 5e35d495e..842d799ae 100644 --- a/templates/DI/object/edit.html.twig +++ b/templates/DI/object/edit.html.twig @@ -4,35 +4,57 @@ Object Edition {% endblock %} +{% block head %} + + + +{% endblock %} + {% block actions %} - - - + + + + +{% endblock %} + +{% block toasts %} + + {# database information toast #} + + {% endblock %} {% block body %} + {# inject form #}
    - - {# database informations #} - - - {# inject form #} -
    - {{ form(form, {'attr': {'id' : 'object_form'}}) }} -
    - + {{ form(form, {'attr': {'id' : 'object_form'}}) }}
    - + {# Widget #} + const oWidget = new Widget(); + oWidget.handleElement(document); + + {# Form #} + const oForm = new Form(oWidget); + oForm.handleElement(document); + + {# Collection #} + const oCollection = new Collection(oForm, '{{ path('object_form', {'class': 'object_class', 'id' : 0, 'name': 'form_name'}) }}'); + oCollection.handleElement(document); + + {# toast database information #} + const toastLiveExample = document.getElementById('toast') + const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLiveExample) + toastBootstrap.show(); {% endblock %} \ No newline at end of file